From 7301a2415adab88038b291fc54caeeb3a5a47a44 Mon Sep 17 00:00:00 2001 From: hansonr Date: Fri, 24 Jul 2015 10:27:35 +0100 Subject: [PATCH] JAL-1807 includes ?j2sdebug flag and DebugJS._(msg) --- .j2s | 16 +- bin/.gitignore | 9 + bin/MCview/Atom.js | 110 +- bin/MCview/Bond.js | 68 +- bin/MCview/PDBChain.class | Bin 12367 -> 12365 bytes bin/MCview/PDBChain.js | 572 +- bin/MCview/PDBfile.class | Bin 13881 -> 13876 bytes bin/MCview/PDBfile.js | 640 +- bin/MCview/Residue.js | 42 +- bin/awt2swing/Button.js | 8 +- bin/awt2swing/Canvas.js | 8 +- bin/awt2swing/Checkbox.js | 24 +- bin/awt2swing/CheckboxMenuItem.js | 32 +- bin/awt2swing/Choice.js | 16 +- bin/awt2swing/Frame.js | 42 +- bin/awt2swing/Label.js | 16 +- bin/awt2swing/Menu.js | 28 +- bin/awt2swing/MenuBar.js | 8 +- bin/awt2swing/MenuItem.js | 8 +- bin/awt2swing/Panel.js | 18 +- bin/awt2swing/PopupMenu.js | 8 +- bin/awt2swing/ScrollPane.js | 8 +- bin/awt2swing/Scrollbar.js | 8 +- bin/awt2swing/TextArea.js | 8 +- bin/awt2swing/TextField.js | 46 +- bin/com/stevesoft/pat/AmpersandRule.js | 32 +- bin/com/stevesoft/pat/Any.js | 60 +- bin/com/stevesoft/pat/BackG.js | 68 +- bin/com/stevesoft/pat/BackMatch.js | 72 +- bin/com/stevesoft/pat/BackRefRule.js | 50 +- bin/com/stevesoft/pat/Backup.js | 68 +- bin/com/stevesoft/pat/BasicStringBufferLike.js | 4 +- bin/com/stevesoft/pat/Bits.js | 5916 +-- bin/com/stevesoft/pat/Boundary.js | 104 +- bin/com/stevesoft/pat/Bracket.js | 120 +- bin/com/stevesoft/pat/CaseMgr.js | 188 +- bin/com/stevesoft/pat/ChangeRule.js | 70 +- bin/com/stevesoft/pat/CodeRule.js | 48 +- bin/com/stevesoft/pat/Ctrl.js | 8 +- bin/com/stevesoft/pat/Custom.js | 82 +- bin/com/stevesoft/pat/CustomEndpoint.js | 54 +- bin/com/stevesoft/pat/DirFileRegex.js | 8 +- bin/com/stevesoft/pat/DotMulti.class | Bin 3105 -> 3082 bytes bin/com/stevesoft/pat/DotMulti.js | 258 +- bin/com/stevesoft/pat/End.js | 76 +- bin/com/stevesoft/pat/FastBracket.js | 312 +- bin/com/stevesoft/pat/FastMulti.class | Bin 3480 -> 3453 bytes bin/com/stevesoft/pat/FastMulti.js | 216 +- bin/com/stevesoft/pat/FileRegex.js | 8 +- bin/com/stevesoft/pat/Group.js | 96 +- bin/com/stevesoft/pat/LeftRule.js | 32 +- bin/com/stevesoft/pat/MessageManager.js | 24 +- bin/com/stevesoft/pat/Multi.js | 124 +- bin/com/stevesoft/pat/MultiMin.js | 18 +- bin/com/stevesoft/pat/Multi_stage2.js | 190 +- bin/com/stevesoft/pat/NoPattern.js | 32 +- bin/com/stevesoft/pat/NonDirFileRegex.js | 8 +- bin/com/stevesoft/pat/NotImplementedError.js | 8 +- bin/com/stevesoft/pat/NullPattern.js | 40 +- bin/com/stevesoft/pat/NullRule.js | 30 +- bin/com/stevesoft/pat/Or.js | 184 +- bin/com/stevesoft/pat/OrMark.js | 108 +- bin/com/stevesoft/pat/PartialBuffer.js | 100 +- bin/com/stevesoft/pat/Pattern.js | 306 +- bin/com/stevesoft/pat/PatternSub.js | 14 +- bin/com/stevesoft/pat/PopRule.js | 24 +- bin/com/stevesoft/pat/Prop.js | 80 +- bin/com/stevesoft/pat/Pthings.js | 26 +- bin/com/stevesoft/pat/PushRule.js | 70 +- bin/com/stevesoft/pat/RBuffer.js | 64 +- bin/com/stevesoft/pat/Range.js | 130 +- bin/com/stevesoft/pat/RegOpt.class | Bin 4112 -> 4111 bytes bin/com/stevesoft/pat/RegOpt.js | 508 +- bin/com/stevesoft/pat/RegRes.js | 310 +- bin/com/stevesoft/pat/RegSyntax.js | 16 +- bin/com/stevesoft/pat/RegSyntaxError.js | 32 +- bin/com/stevesoft/pat/Regex.class | Bin 27436 -> 27425 bytes bin/com/stevesoft/pat/Regex.js | 2052 +- bin/com/stevesoft/pat/RegexReader.class | Bin 5183 -> 5182 bytes bin/com/stevesoft/pat/RegexReader.js | 328 +- bin/com/stevesoft/pat/RegexTokenizer.js | 208 +- bin/com/stevesoft/pat/RegexWriter.class | Bin 4599 -> 4597 bytes bin/com/stevesoft/pat/RegexWriter.js | 268 +- bin/com/stevesoft/pat/ReplaceRule.class | Bin 7171 -> 7164 bytes bin/com/stevesoft/pat/ReplaceRule.js | 406 +- bin/com/stevesoft/pat/Replacer.class | Bin 7103 -> 7102 bytes bin/com/stevesoft/pat/Replacer.js | 460 +- bin/com/stevesoft/pat/RightRule.js | 32 +- bin/com/stevesoft/pat/Rthings.js | 70 +- bin/com/stevesoft/pat/RuleHolder.js | 64 +- bin/com/stevesoft/pat/Skip.js | 216 +- bin/com/stevesoft/pat/Skip2.js | 62 +- bin/com/stevesoft/pat/SkipBMH.js | 308 +- bin/com/stevesoft/pat/Skipped.js | 68 +- bin/com/stevesoft/pat/SpecialRule.js | 22 +- bin/com/stevesoft/pat/Start.js | 70 +- bin/com/stevesoft/pat/StrPos.class | Bin 2499 -> 2498 bytes bin/com/stevesoft/pat/StrPos.js | 218 +- bin/com/stevesoft/pat/StringBufferLike.class | Bin 1770 -> 1769 bytes bin/com/stevesoft/pat/StringBufferLike.js | 124 +- bin/com/stevesoft/pat/StringLike.js | 4 +- bin/com/stevesoft/pat/StringRule.js | 48 +- bin/com/stevesoft/pat/SubMark.js | 42 +- bin/com/stevesoft/pat/TransPat.js | 70 +- bin/com/stevesoft/pat/Transformer.js | 260 +- bin/com/stevesoft/pat/UniValidator.js | 24 +- bin/com/stevesoft/pat/Util.js | 4 +- bin/com/stevesoft/pat/Validator.js | 48 +- bin/com/stevesoft/pat/WantMoreTextReplaceRule.js | 30 +- bin/com/stevesoft/pat/lookAhead.js | 124 +- bin/com/stevesoft/pat/oneChar.js | 110 +- bin/com/stevesoft/pat/package.js | 68 +- bin/com/stevesoft/pat/parsePerl.class | Bin 5344 -> 5368 bytes bin/com/stevesoft/pat/parsePerl.js | 534 +- bin/com/stevesoft/pat/patInf.js | 18 +- bin/com/stevesoft/pat/patInt.js | 188 +- bin/com/stevesoft/pat/wrap/CharArrayBufferWrap.js | 76 +- bin/com/stevesoft/pat/wrap/CharArrayWrap.js | 102 +- bin/com/stevesoft/pat/wrap/RandomAccessFileWrap.js | 4 +- bin/com/stevesoft/pat/wrap/StringBufferWrap.js | 68 +- bin/com/stevesoft/pat/wrap/StringWrap.js | 78 +- bin/com/stevesoft/pat/wrap/WriterWrap.js | 82 +- bin/fr/orsay/lri/varna/models/rna/RNA.js | 20 +- bin/jalview/analysis/AAFrequency.class | Bin 12621 -> 12618 bytes bin/jalview/analysis/AAFrequency.js | 616 +- bin/jalview/analysis/AlignSeq.class | Bin 20989 -> 20964 bytes bin/jalview/analysis/AlignSeq.js | 1172 +- .../analysis/AlignmentAnnotationUtils.class | Bin 5384 -> 5381 bytes bin/jalview/analysis/AlignmentAnnotationUtils.js | 146 +- bin/jalview/analysis/AlignmentSorter.class | Bin 15128 -> 15127 bytes bin/jalview/analysis/AlignmentSorter.js | 766 +- bin/jalview/analysis/AlignmentUtils.class | Bin 28010 -> 28007 bytes bin/jalview/analysis/AlignmentUtils.js | 1064 +- bin/jalview/analysis/AnnotationSorter.js | 342 +- bin/jalview/analysis/CodingUtils.js | 128 +- bin/jalview/analysis/CodonComparator.js | 42 +- bin/jalview/analysis/Conservation.class | Bin 11919 -> 11933 bytes bin/jalview/analysis/Conservation.js | 741 +- bin/jalview/analysis/Dna.class | Bin 14855 -> 14853 bytes bin/jalview/analysis/Dna.js | 654 +- bin/jalview/analysis/Finder.class | Bin 6101 -> 6100 bytes bin/jalview/analysis/Finder.js | 364 +- bin/jalview/analysis/Grouping.js | 176 +- bin/jalview/analysis/NJTree.class | Bin 16357 -> 16353 bytes bin/jalview/analysis/NJTree.js | 1154 +- bin/jalview/analysis/PCA.js | 326 +- bin/jalview/analysis/ParseProperties.js | 150 +- bin/jalview/analysis/Rna.js | 212 +- bin/jalview/analysis/SecStrConsensus.class | Bin 5370 -> 5369 bytes bin/jalview/analysis/SecStrConsensus.js | 278 +- bin/jalview/analysis/SeqsetUtils.js | 248 +- .../analysis/SequenceIdMatcher$SeqIdName.class | Bin 1883 -> 1875 bytes bin/jalview/analysis/SequenceIdMatcher.js | 334 +- bin/jalview/analysis/StructureFrequency.class | Bin 9031 -> 9030 bytes bin/jalview/analysis/StructureFrequency.js | 520 +- bin/jalview/analysis/WUSSParseException.js | 40 +- bin/jalview/analysis/package.js | 10 +- .../analysis/scoremodels/FeatureScoreModel.js | 172 +- bin/jalview/analysis/scoremodels/PIDScoreModel.js | 64 +- .../analysis/scoremodels/PairwiseSeqScoreModel.js | 78 +- bin/jalview/analysis/scoremodels/SWScoreModel.js | 90 +- bin/jalview/api/AlignCalcManagerI.js | 4 +- bin/jalview/api/AlignCalcWorkerI.js | 4 +- bin/jalview/api/AlignExportSettingI.js | 4 +- bin/jalview/api/AlignViewControllerGuiI.js | 4 +- bin/jalview/api/AlignViewControllerI.js | 4 +- bin/jalview/api/AlignViewportI.js | 8 +- bin/jalview/api/AlignmentViewPanel.js | 8 +- bin/jalview/api/ComplexAlignFile.js | 4 +- bin/jalview/api/FeatureRenderer.js | 4 +- bin/jalview/api/FeatureSettingsControllerI.js | 4 +- bin/jalview/api/FeatureSettingsModelI.js | 4 +- bin/jalview/api/FeaturesDisplayedI.js | 4 +- bin/jalview/api/OOMHandlerI.js | 4 +- bin/jalview/api/RotatableCanvasI.js | 4 +- bin/jalview/api/SequenceRenderer.js | 4 +- bin/jalview/api/SequenceStructureBinding.js | 4 +- bin/jalview/api/SplitContainerI.js | 4 +- .../api/StructureSelectionManagerProvider.js | 4 +- bin/jalview/api/ViewStyleI.js | 4 +- bin/jalview/api/analysis/ScoreModelI.js | 4 +- bin/jalview/api/analysis/ViewBasedAnalysisI.js | 4 +- .../api/structures/JalviewStructureDisplayI.js | 4 +- bin/jalview/appletgui/APopupMenu.class | Bin 33298 -> 33291 bytes bin/jalview/appletgui/APopupMenu.js | 1594 +- bin/jalview/appletgui/AlignFrame.class | Bin 80437 -> 80413 bytes bin/jalview/appletgui/AlignFrame.js | 4780 +- bin/jalview/appletgui/AlignViewport.js | 458 +- bin/jalview/appletgui/AlignmentPanel.class | Bin 21305 -> 21282 bytes bin/jalview/appletgui/AlignmentPanel.js | 1220 +- .../appletgui/AnnotationColourChooser.class | Bin 13452 -> 13451 bytes bin/jalview/appletgui/AnnotationColourChooser.js | 696 +- .../appletgui/AnnotationColumnChooser.class | Bin 16700 -> 16698 bytes bin/jalview/appletgui/AnnotationColumnChooser.js | 1244 +- bin/jalview/appletgui/AnnotationLabels.class | Bin 18071 -> 18068 bytes bin/jalview/appletgui/AnnotationLabels.js | 932 +- bin/jalview/appletgui/AnnotationPanel.class | Bin 13891 -> 13890 bytes bin/jalview/appletgui/AnnotationPanel.js | 728 +- bin/jalview/appletgui/AnnotationRowFilter.js | 262 +- bin/jalview/appletgui/AppletJmol.js | 96 +- bin/jalview/appletgui/AppletJmolBinding.js | 4 +- bin/jalview/appletgui/CutAndPasteTransfer.class | Bin 12941 -> 12939 bytes bin/jalview/appletgui/CutAndPasteTransfer.js | 528 +- bin/jalview/appletgui/EditNameDialog.js | 88 +- bin/jalview/appletgui/EmbmenuFrame.js | 220 +- bin/jalview/appletgui/ExtJmol.js | 34 +- bin/jalview/appletgui/FeatureColourChooser.class | Bin 11646 -> 11645 bytes bin/jalview/appletgui/FeatureColourChooser.js | 584 +- bin/jalview/appletgui/FeatureRenderer.class | Bin 8664 -> 8663 bytes bin/jalview/appletgui/FeatureRenderer.js | 544 +- bin/jalview/appletgui/FeatureSettings.js | 888 +- bin/jalview/appletgui/Finder.js | 368 +- bin/jalview/appletgui/FontChooser.js | 518 +- bin/jalview/appletgui/IdCanvas.class | Bin 8177 -> 8175 bytes bin/jalview/appletgui/IdCanvas.js | 382 +- bin/jalview/appletgui/IdPanel.js | 570 +- bin/jalview/appletgui/IdwidthAdjuster.js | 132 +- bin/jalview/appletgui/JVDialog.js | 80 +- bin/jalview/appletgui/OverviewPanel.class | Bin 10000 -> 9997 bytes bin/jalview/appletgui/OverviewPanel.js | 524 +- bin/jalview/appletgui/PCAPanel.class | Bin 10507 -> 10506 bytes bin/jalview/appletgui/PCAPanel.js | 506 +- bin/jalview/appletgui/PaintRefresher.class | Bin 4754 -> 4753 bytes bin/jalview/appletgui/PaintRefresher.js | 252 +- bin/jalview/appletgui/PairwiseAlignPanel.class | Bin 5835 -> 5834 bytes bin/jalview/appletgui/PairwiseAlignPanel.js | 200 +- bin/jalview/appletgui/RedundancyPanel.js | 330 +- bin/jalview/appletgui/RotatableCanvas.js | 742 +- bin/jalview/appletgui/ScalePanel.class | Bin 8976 -> 8974 bytes bin/jalview/appletgui/ScalePanel.js | 496 +- bin/jalview/appletgui/SeqCanvas.class | Bin 14498 -> 14493 bytes bin/jalview/appletgui/SeqCanvas.js | 822 +- bin/jalview/appletgui/SeqPanel.class | Bin 31615 -> 31601 bytes bin/jalview/appletgui/SeqPanel.js | 1924 +- bin/jalview/appletgui/SequenceRenderer.class | Bin 7516 -> 7513 bytes bin/jalview/appletgui/SequenceRenderer.js | 392 +- bin/jalview/appletgui/SliderPanel.class | Bin 9217 -> 9215 bytes bin/jalview/appletgui/SliderPanel.js | 540 +- bin/jalview/appletgui/SplitFrame.js | 216 +- bin/jalview/appletgui/TitledPanel.js | 86 +- bin/jalview/appletgui/Tooltip.js | 134 +- bin/jalview/appletgui/TreeCanvas.class | Bin 16085 -> 16082 bytes bin/jalview/appletgui/TreeCanvas.js | 750 +- bin/jalview/appletgui/TreePanel$TreeLoader.class | Bin 4901 -> 4900 bytes bin/jalview/appletgui/TreePanel.class | Bin 8600 -> 8599 bytes bin/jalview/appletgui/TreePanel.js | 522 +- bin/jalview/appletgui/UserDefinedColours.class | Bin 17293 -> 17291 bytes bin/jalview/appletgui/UserDefinedColours.js | 962 +- bin/jalview/bin/Cache.js | 58 +- bin/jalview/bin/JalviewLite$4.class | Bin 1978 -> 1977 bytes bin/jalview/bin/JalviewLite$LoadJmolThread.class | Bin 1682 -> 1680 bytes bin/jalview/bin/JalviewLite$LoadingThread.class | Bin 15453 -> 15460 bytes bin/jalview/bin/JalviewLite.class | Bin 39237 -> 39228 bytes bin/jalview/bin/JalviewLite.js | 3234 +- bin/jalview/commands/ChangeCaseCommand.js | 148 +- bin/jalview/commands/CommandI.js | 4 +- bin/jalview/commands/EditCommand.class | Bin 20593 -> 20580 bytes bin/jalview/commands/EditCommand.js | 1322 +- bin/jalview/commands/OrderCommand.js | 76 +- bin/jalview/commands/RemoveGapColCommand.js | 90 +- bin/jalview/commands/RemoveGapsCommand.js | 112 +- bin/jalview/commands/SlideSequencesCommand.js | 96 +- bin/jalview/commands/TrimRegionCommand.class | Bin 3917 -> 3916 bytes bin/jalview/commands/TrimRegionCommand.js | 182 +- bin/jalview/controller/AlignViewController.class | Bin 11025 -> 11020 bytes bin/jalview/controller/AlignViewController.js | 438 +- .../controller/FeatureSettingsController.js | 14 +- .../controller/FeatureSettingsControllerGuiI.js | 4 +- bin/jalview/datamodel/ASequence.js | 8 +- bin/jalview/datamodel/ASequenceI.js | 4 +- bin/jalview/datamodel/AlignedCodon.js | 84 +- bin/jalview/datamodel/AlignedCodonFrame.class | Bin 7101 -> 7098 bytes bin/jalview/datamodel/AlignedCodonFrame.js | 396 +- bin/jalview/datamodel/Alignment.class | Bin 28118 -> 28115 bytes bin/jalview/datamodel/Alignment.js | 1630 +- bin/jalview/datamodel/AlignmentAnnotation.class | Bin 19214 -> 19217 bytes bin/jalview/datamodel/AlignmentAnnotation.js | 1246 +- bin/jalview/datamodel/AlignmentI.js | 8 +- bin/jalview/datamodel/AlignmentOrder.js | 236 +- bin/jalview/datamodel/AlignmentView.class | Bin 20040 -> 20024 bytes bin/jalview/datamodel/AlignmentView.js | 1250 +- bin/jalview/datamodel/AnnotatedCollectionI.js | 8 +- bin/jalview/datamodel/Annotation.class | Bin 2497 -> 2539 bytes bin/jalview/datamodel/Annotation.js | 144 +- bin/jalview/datamodel/BinaryNode.js | 224 +- bin/jalview/datamodel/BinarySequence.js | 198 +- bin/jalview/datamodel/CigarArray.class | Bin 6709 -> 6708 bytes bin/jalview/datamodel/CigarArray.js | 376 +- bin/jalview/datamodel/CigarBase.class | Bin 7756 -> 7753 bytes bin/jalview/datamodel/CigarBase.js | 620 +- bin/jalview/datamodel/CigarCigar.js | 44 +- bin/jalview/datamodel/CigarSimple.js | 8 +- bin/jalview/datamodel/ColumnSelection.class | Bin 20097 -> 20107 bytes bin/jalview/datamodel/ColumnSelection.js | 1364 +- bin/jalview/datamodel/DBRefEntry.js | 186 +- bin/jalview/datamodel/DBRefSource.js | 58 +- bin/jalview/datamodel/FeatureProperties.js | 40 +- bin/jalview/datamodel/GraphLine.js | 72 +- bin/jalview/datamodel/HiddenSequences.class | Bin 6278 -> 6277 bytes bin/jalview/datamodel/HiddenSequences.js | 324 +- bin/jalview/datamodel/IncompleteCodonException.js | 8 +- bin/jalview/datamodel/Mapping.js | 608 +- bin/jalview/datamodel/NodeTransformI.js | 4 +- bin/jalview/datamodel/PDBEntry.js | 176 +- bin/jalview/datamodel/Provenance.js | 50 +- bin/jalview/datamodel/ProvenanceEntry.js | 62 +- bin/jalview/datamodel/RnaViewerModel.js | 42 +- bin/jalview/datamodel/SearchResults.js | 274 +- .../datamodel/SecondaryStructureAnnotation.js | 46 +- bin/jalview/datamodel/SeqCigar.class | Bin 10229 -> 10227 bytes bin/jalview/datamodel/SeqCigar.js | 518 +- bin/jalview/datamodel/Sequence.class | Bin 18984 -> 18983 bytes bin/jalview/datamodel/Sequence.js | 1316 +- bin/jalview/datamodel/SequenceCollectionI.js | 4 +- bin/jalview/datamodel/SequenceDummy.js | 40 +- bin/jalview/datamodel/SequenceFeature.js | 340 +- bin/jalview/datamodel/SequenceGroup.class | Bin 21295 -> 21296 bytes bin/jalview/datamodel/SequenceGroup.js | 1202 +- bin/jalview/datamodel/SequenceI.js | 8 +- bin/jalview/datamodel/SequenceNode.js | 128 +- bin/jalview/datamodel/SequencePoint.js | 24 +- bin/jalview/datamodel/StructureViewerModel.js | 312 +- bin/jalview/datamodel/UniprotEntry.js | 116 +- bin/jalview/datamodel/UniprotFile.js | 26 +- bin/jalview/datamodel/UniprotProteinName.js | 26 +- bin/jalview/datamodel/UniprotSequence.js | 42 +- bin/jalview/ext/jmol/JmolCommands.class | Bin 5225 -> 5223 bytes bin/jalview/ext/jmol/JmolCommands.js | 138 +- bin/jalview/ext/varna/JalviewVarnaBinding.js | 8 +- bin/jalview/ext/varna/RnaModel.js | 34 +- bin/jalview/ext/varna/VarnaCommands.class | Bin 4789 -> 4787 bytes bin/jalview/ext/varna/VarnaCommands.js | 132 +- bin/jalview/io/AlignFile.js | 316 +- bin/jalview/io/AlignmentProperties.js | 156 +- bin/jalview/io/AnnotationFile.class | Bin 36134 -> 36157 bytes bin/jalview/io/AnnotationFile.js | 2006 +- bin/jalview/io/AppletFormatAdapter.class | Bin 16230 -> 16239 bytes bin/jalview/io/AppletFormatAdapter.js | 778 +- bin/jalview/io/FastaFile.class | Bin 4722 -> 4720 bytes bin/jalview/io/FastaFile.js | 188 +- bin/jalview/io/FeaturesFile.class | Bin 30520 -> 30386 bytes bin/jalview/io/FeaturesFile.js | 1544 +- bin/jalview/io/FileParse.class | Bin 9190 -> 9187 bytes bin/jalview/io/FileParse.js | 500 +- bin/jalview/io/IdentifyFile.class | Bin 4982 -> 4956 bytes bin/jalview/io/IdentifyFile.js | 314 +- bin/jalview/io/JPredFile.class | Bin 7157 -> 7157 bytes bin/jalview/io/JPredFile.js | 370 +- bin/jalview/io/JnetAnnotationMaker.class | Bin 5784 -> 5782 bytes bin/jalview/io/JnetAnnotationMaker.js | 180 +- bin/jalview/io/MSFfile.class | Bin 7530 -> 7525 bytes bin/jalview/io/MSFfile.js | 380 +- bin/jalview/io/ModellerDescription.class | Bin 8332 -> 8330 bytes bin/jalview/io/ModellerDescription.js | 472 +- bin/jalview/io/NewickFile.class | Bin 16004 -> 15963 bytes bin/jalview/io/NewickFile.js | 816 +- bin/jalview/io/PIRFile.class | Bin 4310 -> 4308 bytes bin/jalview/io/PIRFile.js | 202 +- bin/jalview/io/PfamFile.js | 152 +- bin/jalview/io/PhylipFile.js | 206 +- bin/jalview/io/PileUpfile.class | Bin 3335 -> 3334 bytes bin/jalview/io/PileUpfile.js | 164 +- bin/jalview/io/SequenceAnnotationReport.class | Bin 9279 -> 9255 bytes bin/jalview/io/SequenceAnnotationReport.js | 362 +- bin/jalview/io/TCoffeeScoreFile.class | Bin 12222 -> 12230 bytes bin/jalview/io/TCoffeeScoreFile.js | 548 +- bin/jalview/javascript/JSFunctionExec$1.class | Bin 3133 -> 3139 bytes bin/jalview/javascript/JSFunctionExec.class | Bin 3701 -> 3700 bytes bin/jalview/javascript/JSFunctionExec.js | 332 +- bin/jalview/javascript/JalviewLiteJsApi.js | 4 +- bin/jalview/javascript/JsCallBack.js | 4 +- bin/jalview/javascript/JsSelectionSender.js | 140 +- bin/jalview/javascript/MouseOverListener.js | 92 +- .../javascript/MouseOverStructureListener.js | 286 +- bin/jalview/jsdev/Constants.js | 26 +- bin/jalview/jsdev/GenericFileAdapter.js | 170 +- bin/jalview/jsdev/JSRegex.js | 110 +- bin/jalview/jsdev/JavaScriptRegExp.js | 4 +- bin/jalview/jsdev/RegExp.js | 30 +- bin/jalview/jsdev/api/RegExpInterface.js | 4 +- bin/jalview/jsdev/api/VarnaRNA.js | 4 +- bin/jalview/math/AlignmentDimension.js | 54 +- bin/jalview/math/Matrix.class | Bin 9779 -> 9741 bytes bin/jalview/math/Matrix.js | 846 +- bin/jalview/math/RotatableMatrix.js | 228 +- bin/jalview/renderer/AnnotationRenderer.class | Bin 23751 -> 23745 bytes bin/jalview/renderer/AnnotationRenderer.js | 1610 +- bin/jalview/renderer/AwtRenderPanelI.js | 8 +- .../renderer/seqfeatures/FeatureRenderer.class | Bin 7512 -> 7505 bytes .../renderer/seqfeatures/FeatureRenderer.js | 374 +- bin/jalview/schemes/AnnotationColourGradient.class | Bin 8212 -> 8210 bytes bin/jalview/schemes/AnnotationColourGradient.js | 400 +- bin/jalview/schemes/Blosum62ColourScheme.class | Bin 2366 -> 2363 bytes bin/jalview/schemes/Blosum62ColourScheme.js | 74 +- bin/jalview/schemes/BuriedColourScheme.js | 24 +- bin/jalview/schemes/ClustalxColourScheme.js | 474 +- bin/jalview/schemes/ColourSchemeI.js | 4 +- bin/jalview/schemes/ColourSchemeProperty.js | 584 +- bin/jalview/schemes/Consensus.js | 90 +- bin/jalview/schemes/CovariationColourScheme.js | 82 +- bin/jalview/schemes/FollowerColourScheme.js | 52 +- bin/jalview/schemes/GraduatedColor.js | 320 +- bin/jalview/schemes/HelixColourScheme.js | 24 +- bin/jalview/schemes/HydrophobicColourScheme.js | 24 +- bin/jalview/schemes/NucleotideColourScheme.js | 62 +- bin/jalview/schemes/PIDColourScheme.js | 78 +- .../schemes/PurinePyrimidineColourScheme.js | 62 +- bin/jalview/schemes/RNAHelicesColour.js | 136 +- bin/jalview/schemes/RNAHelicesColourChooser.js | 126 +- bin/jalview/schemes/RNAInteractionColourScheme.js | 54 +- bin/jalview/schemes/ResidueColourScheme.js | 292 +- bin/jalview/schemes/ResidueProperties.class | Bin 39973 -> 39971 bytes bin/jalview/schemes/ResidueProperties.js | 2180 +- bin/jalview/schemes/ScoreColourScheme.js | 86 +- bin/jalview/schemes/ScoreMatrix.js | 172 +- bin/jalview/schemes/StrandColourScheme.js | 24 +- bin/jalview/schemes/TCoffeeColourScheme.js | 90 +- bin/jalview/schemes/TaylorColourScheme.js | 16 +- bin/jalview/schemes/TurnColourScheme.js | 24 +- bin/jalview/schemes/UserColourScheme.class | Bin 5830 -> 5795 bytes bin/jalview/schemes/UserColourScheme.js | 330 +- bin/jalview/schemes/ZappoColourScheme.js | 16 +- bin/jalview/schemes/package.js | 10 +- .../structure/AlignmentViewPanelListener.js | 4 +- bin/jalview/structure/AtomSpec.js | 70 +- bin/jalview/structure/CommandListener.js | 4 +- .../structure/SecondaryStructureListener.js | 4 +- bin/jalview/structure/SelectionListener.js | 4 +- bin/jalview/structure/SelectionSource.js | 4 +- bin/jalview/structure/SequenceListener.js | 4 +- bin/jalview/structure/StructureListener.js | 4 +- bin/jalview/structure/StructureMapping.js | 138 +- .../structure/StructureMappingcommandSet.js | 26 +- .../structure/StructureSelectionManager.class | Bin 24238 -> 24256 bytes bin/jalview/structure/StructureSelectionManager.js | 1022 +- bin/jalview/structure/VamsasListener.js | 4 +- bin/jalview/structure/VamsasSource.js | 4 +- .../models/AAStructureBindingModel.class | Bin 11991 -> 12013 bytes .../structures/models/AAStructureBindingModel.js | 612 +- .../models/SequenceStructureBindingModel.js | 48 +- bin/jalview/util/AWTConsole.js | 187 - bin/jalview/util/BrowserLauncher.js | 487 - bin/jalview/util/ColorUtils.js | 60 +- bin/jalview/util/Comparison.class | Bin 4549 -> 4548 bytes bin/jalview/util/Comparison.js | 262 +- bin/jalview/util/DBRefUtils.class | Bin 6392 -> 6391 bytes bin/jalview/util/DBRefUtils.js | 368 +- bin/jalview/util/Format.class | Bin 9260 -> 9228 bytes bin/jalview/util/Format.js | 778 +- bin/jalview/util/GroupUrlLink.class | Bin 14688 -> 14684 bytes bin/jalview/util/GroupUrlLink.js | 726 +- bin/jalview/util/MapList.class | Bin 10604 -> 10600 bytes bin/jalview/util/MapList.js | 818 +- bin/jalview/util/MappingUtils.js | 490 +- bin/jalview/util/MessageManager.class | Bin 3363 -> 3362 bytes bin/jalview/util/MessageManager.js | 146 +- bin/jalview/util/ParseHtmlBodyAndLinks.class | Bin 3530 -> 3529 bytes bin/jalview/util/ParseHtmlBodyAndLinks.js | 156 +- bin/jalview/util/Platform.js | 60 +- bin/jalview/util/QuickSort.js | 462 +- bin/jalview/util/ReverseListIterator.js | 46 +- bin/jalview/util/ShiftList.js | 134 +- bin/jalview/util/StringUtils.js | 216 +- bin/jalview/util/TableSorter.js | 774 +- bin/jalview/util/UrlLink.class | Bin 6555 -> 6552 bytes bin/jalview/util/UrlLink.js | 296 +- bin/jalview/util/jarInputStreamProvider.js | 2 - bin/jalview/viewmodel/AlignmentViewport.js | 2508 +- bin/jalview/viewmodel/PCAModel.class | Bin 4995 -> 4999 bytes bin/jalview/viewmodel/PCAModel.js | 268 +- .../annotationfilter/AnnotationFilterParameter.js | 166 +- .../seqfeatures/FeatureRendererModel.class | Bin 17327 -> 17325 bytes .../viewmodel/seqfeatures/FeatureRendererModel.js | 962 +- .../seqfeatures/FeatureRendererSettings.js | 86 +- .../viewmodel/seqfeatures/FeatureSettingsModel.js | 8 +- .../viewmodel/seqfeatures/FeaturesDisplayed.js | 136 +- bin/jalview/viewmodel/styles/ViewStyle.js | 914 +- bin/jalview/workers/AlignCalcManager.js | 384 +- bin/jalview/workers/AlignCalcWorker.js | 108 +- bin/jalview/workers/ComplementConsensusThread.js | 92 +- bin/jalview/workers/ConsensusThread.js | 298 +- bin/jalview/workers/ConservationThread.js | 216 +- bin/jalview/workers/StrucConsensusThread.class | Bin 4790 -> 4841 bytes bin/jalview/workers/StrucConsensusThread.js | 190 +- bin/java.policy.applet | 7 - bin/javajs/J2SIgnoreImport.js | 2 +- bin/javajs/J2SRequireImport.js | 2 +- bin/javajs/api/BytePoster.js | 4 +- bin/javajs/api/EigenInterface.js | 4 +- bin/javajs/api/EventManager.js | 4 +- bin/javajs/api/FontManager.js | 4 +- bin/javajs/api/GenericBinaryDocument.js | 4 +- bin/javajs/api/GenericCifDataParser.js | 8 +- bin/javajs/api/GenericColor.js | 4 +- bin/javajs/api/GenericFileInterface.js | 4 +- bin/javajs/api/GenericImageDialog.js | 4 +- bin/javajs/api/GenericImageEncoder.js | 4 +- bin/javajs/api/GenericLineReader.js | 4 +- bin/javajs/api/GenericMenuInterface.js | 4 +- bin/javajs/api/GenericMouseInterface.js | 4 +- bin/javajs/api/GenericPlatform.js | 22 +- bin/javajs/api/GenericZipInputStream.js | 8 +- bin/javajs/api/GenericZipTools.js | 4 +- bin/javajs/api/HTMLElement.js | 4 +- bin/javajs/api/HTMLWindowEvent.js | 4 +- bin/javajs/api/Interface.js | 32 +- bin/javajs/api/JSInterface.js | 4 +- bin/javajs/api/JSONEncodable.js | 4 +- bin/javajs/api/JmolObjectInterface.js | 4 +- bin/javajs/api/PlatformViewer.js | 4 +- bin/javajs/api/SC.js | 4 +- bin/javajs/api/SwingController.js | 4 +- bin/javajs/api/ZInputStream.js | 4 +- bin/javajs/awt/BorderLayout.js | 20 +- bin/javajs/awt/Color.js | 86 +- bin/javajs/awt/Component.js | 240 +- bin/javajs/awt/Container.js | 130 +- bin/javajs/awt/Dimension.js | 32 +- bin/javajs/awt/Font.js | 210 +- bin/javajs/awt/LayoutManager.js | 4 +- bin/javajs/awt/event/ActionEvent.js | 22 +- bin/javajs/awt/event/ActionListener.js | 4 +- bin/javajs/awt/event/Event.js | 98 +- bin/javajs/awt/event/ItemEvent.js | 8 +- bin/javajs/awt/event/WindowEvent.js | 8 +- bin/javajs/awt/event/WindowListener.js | 4 +- bin/javajs/export/PDFCreator.js | 600 +- bin/javajs/export/PDFObject.class | Bin 5790 -> 5789 bytes bin/javajs/export/PDFObject.js | 230 +- bin/javajs/img/BMPDecoder.js | 288 +- bin/javajs/img/CRCEncoder.js | 148 +- bin/javajs/img/GifEncoder$ColorCell.class | Bin 3202 -> 3200 bytes bin/javajs/img/GifEncoder.class | Bin 16064 -> 16060 bytes bin/javajs/img/GifEncoder.js | 1254 +- bin/javajs/img/ImageEncoder.js | 82 +- bin/javajs/img/Jpg64Encoder.js | 46 +- bin/javajs/img/JpgEncoder.js | 1506 +- bin/javajs/img/PdfEncoder.js | 116 +- bin/javajs/img/PngEncoder.js | 346 +- bin/javajs/img/PpmEncoder.js | 46 +- bin/javajs/img/package.js | 14 +- bin/javajs/swing/AbstractButton.js | 164 +- bin/javajs/swing/AbstractTableModel.js | 8 +- bin/javajs/swing/ButtonGroup.js | 30 +- bin/javajs/swing/Cell.js | 42 +- bin/javajs/swing/ColumnSelectionModel.js | 4 +- bin/javajs/swing/Document.js | 4 +- bin/javajs/swing/FlowLayout.js | 8 +- bin/javajs/swing/Grid.js | 92 +- bin/javajs/swing/GridBagConstraints.js | 82 +- bin/javajs/swing/GridBagLayout.js | 8 +- bin/javajs/swing/Insets.js | 30 +- bin/javajs/swing/JButton.js | 28 +- bin/javajs/swing/JCheckBox.js | 26 +- bin/javajs/swing/JCheckBoxMenuItem.js | 16 +- bin/javajs/swing/JComboBox.js | 72 +- bin/javajs/swing/JComponent.js | 50 +- bin/javajs/swing/JComponentImp.js | 16 +- bin/javajs/swing/JContentPane.js | 34 +- bin/javajs/swing/JDialog.js | 164 +- bin/javajs/swing/JEditorPane.js | 30 +- bin/javajs/swing/JLabel.js | 34 +- bin/javajs/swing/JMenu.js | 48 +- bin/javajs/swing/JMenuItem.js | 72 +- bin/javajs/swing/JPanel.js | 78 +- bin/javajs/swing/JPopupMenu.js | 74 +- bin/javajs/swing/JRadioButtonMenuItem.js | 22 +- bin/javajs/swing/JScrollPane.js | 44 +- bin/javajs/swing/JSplitPane.js | 134 +- bin/javajs/swing/JTable.js | 134 +- bin/javajs/swing/JTextField.js | 30 +- bin/javajs/swing/JTextPane.js | 48 +- bin/javajs/swing/ListSelectionModel.js | 4 +- bin/javajs/swing/SwingConstants.js | 12 +- bin/javajs/swing/TableCellRenderer.js | 4 +- bin/javajs/swing/TableColumn.js | 4 +- bin/javajs/util/A4.js | 178 +- bin/javajs/util/AU.js | 702 +- bin/javajs/util/AjaxURLConnection.js | 78 +- bin/javajs/util/AjaxURLStreamHandler.js | 68 +- bin/javajs/util/AjaxURLStreamHandlerFactory.js | 32 +- bin/javajs/util/ArrayDataReader.js | 62 +- bin/javajs/util/BArray.js | 54 +- bin/javajs/util/BC.js | 130 +- bin/javajs/util/BS.js | 714 +- bin/javajs/util/Base64.js | 108 +- bin/javajs/util/BinaryDocument.js | 436 +- bin/javajs/util/CU.js | 270 +- bin/javajs/util/CifDataParser.class | Bin 9700 -> 9697 bytes bin/javajs/util/CifDataParser.js | 606 +- bin/javajs/util/CompoundDocDirEntry.js | 116 +- bin/javajs/util/CompoundDocHeader.js | 132 +- bin/javajs/util/CompoundDocument.class | Bin 9953 -> 9947 bytes bin/javajs/util/CompoundDocument.js | 572 +- bin/javajs/util/DF.js | 156 +- bin/javajs/util/DataReader.js | 68 +- bin/javajs/util/Eigen.js | 508 +- bin/javajs/util/Encoding.js | 20 +- bin/javajs/util/LimitedLineReader.js | 66 +- bin/javajs/util/ListDataReader.js | 62 +- bin/javajs/util/Lst.js | 28 +- bin/javajs/util/M3.js | 596 +- bin/javajs/util/M34.js | 672 +- bin/javajs/util/M4.js | 972 +- bin/javajs/util/Matrix.js | 446 +- bin/javajs/util/Measure.class | Bin 16239 -> 16237 bytes bin/javajs/util/Measure.js | 788 +- bin/javajs/util/OC.class | Bin 6744 -> 6742 bytes bin/javajs/util/OC.js | 472 +- bin/javajs/util/P3.js | 52 +- bin/javajs/util/P3i.js | 24 +- bin/javajs/util/P4.js | 48 +- bin/javajs/util/PT.class | Bin 29031 -> 28987 bytes bin/javajs/util/PT.js | 1890 +- bin/javajs/util/Quat.js | 854 +- bin/javajs/util/Rdr.class | Bin 10808 -> 10811 bytes bin/javajs/util/Rdr.js | 622 +- bin/javajs/util/SB.js | 302 +- bin/javajs/util/StringDataReader.js | 24 +- bin/javajs/util/T3.js | 282 +- bin/javajs/util/T3d.js | 174 +- bin/javajs/util/T3i.js | 96 +- bin/javajs/util/T4.js | 74 +- bin/javajs/util/V3.js | 62 +- bin/javajs/util/V3d.js | 54 +- bin/javajs/util/XmlUtil.js | 146 +- bin/javajs/util/ZipData.js | 90 +- bin/javajs/util/ZipTools.class | Bin 12857 -> 12812 bytes bin/javajs/util/ZipTools.js | 616 +- bin/lang/Messages.properties | 1247 - bin/lang/Messages_es.properties | 1136 - bin/netscape/javascript/JSException.js | 8 +- bin/netscape/javascript/JSObject.js | 38 +- bin/org/exolab/castor/mapping/Mapping.js | 16 +- bin/org/exolab/castor/xml/Unmarshaller.js | 48 +- bin/org/jmol/viewer/Viewer.js | 4 +- bin/swingjs/JSEvent.js | 4 - bin/swingjs/JSThread.js | 98 +- bin/swingjs/api/DOMNode.js | 116 +- bin/swingjs/api/JSFunction.js | 4 +- bin/uniref50.fa | 60 - resources/.cvsignore | 4 +- resources/authors.props | 6 +- resources/biojs_templates/BioJsMSA_1.0.txt |18096 +++---- resources/biojs_templates/BioJsMSA_1.1.txt |18096 +++---- resources/biojs_templates/Latest_BioJsMSA_1.2.txt |18096 +++---- resources/embl_mapping.xml | 304 +- resources/images/.cvsignore | 20 +- resources/lang/Messages.properties | 2494 +- resources/lang/Messages_es.properties | 2270 +- resources/uniprot_mapping.xml | 194 +- site/j2s/JU/DebugJS.js | 9 + site/j2s/awt2swing/Scrollbar.js | 4 + site/j2s/core/core.js | 2980 ++ site/j2s/core/core.z.js | 26 +- site/j2s/core/coreswingjs.js |52988 +++++++++++++++++++ site/j2s/core/coreswingjs.z.js |55132 +------------------- site/j2s/jalview/analysis/AlignSeq.js | 2 +- site/j2s/jalview/analysis/Conservation.js | 8 +- site/j2s/jalview/datamodel/Annotation.js | 6 +- site/j2s/jalview/io/AnnotationFile.js | 6 +- site/j2s/jalview/io/FeaturesFile.js | 8 +- site/j2s/jalview/io/SequenceAnnotationReport.js | 2 +- site/j2s/jalview/viewmodel/PCAModel.js | 6 +- site/j2s/jalview/workers/StrucConsensusThread.js | 117 +- site/j2s/swingjs/JSImage.js | 5 +- site/j2s/swingjs/JSToolkit.js | 14 +- site/j2s/swingjs/plaf/HTML5LookAndFeel.java | 4988 +- site/j2s/swingjs/plaf/JSButtonListener.java | 680 +- site/j2s/swingjs/plaf/JSButtonUI.java | 1130 +- site/j2s/swingjs/plaf/JSCheckBoxMenuItemUI.java | 58 +- site/j2s/swingjs/plaf/JSCheckBoxUI.java | 58 +- site/j2s/swingjs/plaf/JSComboBoxUI.java | 102 +- site/j2s/swingjs/plaf/JSFormattedTextFieldUI.java | 54 +- site/j2s/swingjs/plaf/JSLabelUI.java | 56 +- site/j2s/swingjs/plaf/JSMenuBarUI.java | 152 +- site/j2s/swingjs/plaf/JSMenuItemUI.java | 1096 +- site/j2s/swingjs/plaf/JSMenuUI.java | 102 +- site/j2s/swingjs/plaf/JSPanelUI.java | 102 +- site/j2s/swingjs/plaf/JSPasswordFieldUI.java | 32 +- site/j2s/swingjs/plaf/JSPopupMenuUI.java | 102 +- site/j2s/swingjs/plaf/JSRadioButtonMenuItemUI.java | 38 +- site/j2s/swingjs/plaf/JSRadioButtonUI.java | 188 +- site/j2s/swingjs/plaf/JSRootPaneUI.java | 60 +- site/j2s/swingjs/plaf/JSScrollBarUI.java | 52 +- site/j2s/swingjs/plaf/JSScrollBarUI.js | 6 + site/j2s/swingjs/plaf/JSScrollPaneUI.java | 124 +- site/j2s/swingjs/plaf/JSSeparatorUI.java | 106 +- site/j2s/swingjs/plaf/JSSliderUI.java | 346 +- site/j2s/swingjs/plaf/JSSliderUI.js | 4 +- site/j2s/swingjs/plaf/JSTextAreaUI.java | 74 +- site/j2s/swingjs/plaf/JSTextFieldUI.java | 114 +- site/j2s/swingjs/plaf/JSTextUI.java | 5590 +- site/j2s/swingjs/plaf/JSToolBarSeparatorUI.java | 106 +- site/j2s/swingjs/plaf/JSViewportUI.java | 102 +- site/j2s/swingjs/plaf/LazyActionMap.java | 350 +- site/j2s/swingjs/plaf/TextListener.java | 410 +- site/js/JSmol.js | 1 - site/js/SwingJS.js | 9 +- site/js/SwingJSJavaExt.js | 2843 + site/js/SwingJSjQueryExt.js | 292 + site/js/j2sSwingJS.js | 5427 ++ site/test.htm | 6 +- site/test_2.htm | 6 +- src/awt2swing/Scrollbar.java | 27 + src/fr/orsay/lri/varna/models/rna/RNA.java | 6 + src/jalview/analysis/Conservation.java | 3 + .../datamodel/SecondaryStructureAnnotation.java | 5 + src/jalview/ext/varna/RnaModel.java | 9 + src/jalview/workers/StrucConsensusThread.java | 217 +- src/javajs/api/Interface.java | 13 +- src/javajs/util/DebugJS.java | 28 + 712 files changed, 170827 insertions(+), 160086 deletions(-) create mode 100644 bin/.gitignore delete mode 100644 bin/jalview/util/AWTConsole.js delete mode 100644 bin/jalview/util/BrowserLauncher.js delete mode 100644 bin/jalview/util/jarInputStreamProvider.js delete mode 100644 bin/java.policy.applet delete mode 100644 bin/lang/Messages.properties delete mode 100644 bin/lang/Messages_es.properties delete mode 100644 bin/swingjs/JSEvent.js delete mode 100644 bin/uniref50.fa create mode 100644 site/j2s/JU/DebugJS.js create mode 100644 site/j2s/core/core.js create mode 100644 site/j2s/core/coreswingjs.js create mode 100644 site/js/SwingJSJavaExt.js create mode 100644 site/js/SwingJSjQueryExt.js create mode 100644 site/js/j2sSwingJS.js create mode 100644 src/javajs/util/DebugJS.java diff --git a/.j2s b/.j2s index c403133..e061f63 100644 --- a/.j2s +++ b/.j2s @@ -1,8 +1,8 @@ -#Java2Script Configuration -#Thu Jul 23 11:58:58 BST 2015 -j2s.compiler.abbreviation=false -j2s.resources.list=bin/JStest.js,bin/com/sun/awt/AWTUtilities.js,bin/com/sun/awt/SecurityWarning.js,bin/com/sun/beans/ObjectHandler.js,bin/com/sun/beans/TypeResolver.js,bin/com/sun/beans/WeakCache.js,bin/com/sun/beans/WildcardTypeImpl.js,bin/com/sun/beans/editors/BooleanEditor.js,bin/com/sun/beans/editors/ByteEditor.js,bin/com/sun/beans/editors/ColorEditor.js,bin/com/sun/beans/editors/DoubleEditor.js,bin/com/sun/beans/editors/EnumEditor.js,bin/com/sun/beans/editors/FloatEditor.js,bin/com/sun/beans/editors/FontEditor.js,bin/com/sun/beans/editors/IntegerEditor.js,bin/com/sun/beans/editors/LongEditor.js,bin/com/sun/beans/editors/NumberEditor.js,bin/com/sun/beans/editors/ShortEditor.js,bin/com/sun/beans/editors/StringEditor.js,bin/com/sun/beans/finder/ClassFinder.js,bin/com/sun/beans/finder/PrimitiveTypeMap.js,bin/com/sun/beans/infos/ComponentBeanInfo.js,bin/com/sun/crypto/provider/AESCipher.js,bin/com/sun/crypto/provider/AESConstants.js,bin/com/sun/crypto/provider/AESCrypt.js,bin/com/sun/crypto/provider/AESKeyGenerator.js,bin/com/sun/crypto/provider/AESParameters.js,bin/com/sun/crypto/provider/AESWrapCipher.js,bin/com/sun/crypto/provider/ARCFOURCipher.js,bin/com/sun/crypto/provider/BlockCipherParamsCore.js,bin/com/sun/crypto/provider/BlowfishCipher.js,bin/com/sun/crypto/provider/BlowfishConstants.js,bin/com/sun/crypto/provider/BlowfishCrypt.js,bin/com/sun/crypto/provider/BlowfishKeyGenerator.js,bin/com/sun/crypto/provider/BlowfishParameters.js,bin/com/sun/crypto/provider/CipherBlockChaining.js,bin/com/sun/crypto/provider/CipherCore.js,bin/com/sun/crypto/provider/CipherFeedback.js,bin/com/sun/crypto/provider/CipherTextStealing.js,bin/com/sun/crypto/provider/CipherWithWrappingSpi.js,bin/com/sun/crypto/provider/ConstructKeys.js,bin/com/sun/crypto/provider/CounterMode.js,bin/com/sun/crypto/provider/DESCipher.js,bin/com/sun/crypto/provider/DESConstants.js,bin/com/sun/crypto/provider/DESCrypt.js,bin/com/sun/crypto/provider/DESKey.js,bin/com/sun/crypto/provider/DESKeyFactory.js,bin/com/sun/crypto/provider/DESKeyGenerator.js,bin/com/sun/crypto/provider/DESParameters.js,bin/com/sun/crypto/provider/DESedeCipher.js,bin/com/sun/crypto/provider/DESedeCrypt.js,bin/com/sun/crypto/provider/DESedeKey.js,bin/com/sun/crypto/provider/DESedeKeyFactory.js,bin/com/sun/crypto/provider/DESedeKeyGenerator.js,bin/com/sun/crypto/provider/DESedeParameters.js,bin/com/sun/crypto/provider/DESedeWrapCipher.js,bin/com/sun/crypto/provider/DHKeyAgreement.js,bin/com/sun/crypto/provider/DHKeyFactory.js,bin/com/sun/crypto/provider/DHKeyPairGenerator.js,bin/com/sun/crypto/provider/DHParameterGenerator.js,bin/com/sun/crypto/provider/DHParameters.js,bin/com/sun/crypto/provider/DHPrivateKey.js,bin/com/sun/crypto/provider/DHPublicKey.js,bin/com/sun/crypto/provider/ElectronicCodeBook.js,bin/com/sun/crypto/provider/EncryptedPrivateKeyInfo.js,bin/com/sun/crypto/provider/FeedbackCipher.js,bin/com/sun/crypto/provider/HmacCore.js,bin/com/sun/crypto/provider/HmacMD5.js,bin/com/sun/crypto/provider/HmacMD5KeyGenerator.js,bin/com/sun/crypto/provider/HmacPKCS12PBESHA1.js,bin/com/sun/crypto/provider/HmacSHA1.js,bin/com/sun/crypto/provider/HmacSHA1KeyGenerator.js,bin/com/sun/crypto/provider/ISO10126Padding.js,bin/com/sun/crypto/provider/JceKeyStore.js,bin/com/sun/crypto/provider/KeyGeneratorCore.js,bin/com/sun/crypto/provider/KeyProtector.js,bin/com/sun/crypto/provider/OAEPParameters.js,bin/com/sun/crypto/provider/OutputFeedback.js,bin/com/sun/crypto/provider/PBECipherCore.js,bin/com/sun/crypto/provider/PBEKey.js,bin/com/sun/crypto/provider/PBEKeyFactory.js,bin/com/sun/crypto/provider/PBEParameters.js,bin/com/sun/crypto/provider/PBEWithMD5AndDESCipher.js,bin/com/sun/crypto/provider/PBEWithMD5AndTripleDESCipher.js,bin/com/sun/crypto/provider/PBKDF2HmacSHA1Factory.js,bin/com/sun/crypto/provider/PBKDF2KeyImpl.js,bin/com/sun/crypto/provider/PCBC.js,bin/com/sun/crypto/provider/PKCS12PBECipherCore.js,bin/com/sun/crypto/provider/PKCS5Padding.js,bin/com/sun/crypto/provider/Padding.js,bin/com/sun/crypto/provider/PrivateKeyInfo.js,bin/com/sun/crypto/provider/RC2Cipher.js,bin/com/sun/crypto/provider/RC2Crypt.js,bin/com/sun/crypto/provider/RC2Parameters.js,bin/com/sun/crypto/provider/RSACipher.js,bin/com/sun/crypto/provider/SslMacCore.js,bin/com/sun/crypto/provider/SunJCE.js,bin/com/sun/crypto/provider/SymmetricCipher.js,bin/com/sun/crypto/provider/TlsKeyMaterialGenerator.js,bin/com/sun/crypto/provider/TlsMasterSecretGenerator.js,bin/com/sun/crypto/provider/TlsPrfGenerator.js,bin/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.js,bin/com/sun/crypto/provider/ai.js,bin/com/sun/demo/jvmti/hprof/Tracker.js,bin/com/sun/imageio/plugins/bmp/BMPConstants.js,bin/com/sun/imageio/plugins/bmp/BMPImageReader.js,bin/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.js,bin/com/sun/imageio/plugins/bmp/BMPImageWriter.js,bin/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.js,bin/com/sun/imageio/plugins/bmp/BMPMetadata.js,bin/com/sun/imageio/plugins/bmp/BMPMetadataFormat.js,bin/com/sun/imageio/plugins/bmp/BMPMetadataFormatResources.js,bin/com/sun/imageio/plugins/common/BitFile.js,bin/com/sun/imageio/plugins/common/BogusColorSpace.js,bin/com/sun/imageio/plugins/common/I18N.js,bin/com/sun/imageio/plugins/common/I18NImpl.js,bin/com/sun/imageio/plugins/common/ImageUtil.js,bin/com/sun/imageio/plugins/common/InputStreamAdapter.js,bin/com/sun/imageio/plugins/common/LZWCompressor.js,bin/com/sun/imageio/plugins/common/LZWStringTable.js,bin/com/sun/imageio/plugins/common/PaletteBuilder.js,bin/com/sun/imageio/plugins/common/ReaderUtil.js,bin/com/sun/imageio/plugins/common/StandardMetadataFormat.js,bin/com/sun/imageio/plugins/common/StandardMetadataFormatResources.js,bin/com/sun/imageio/plugins/common/SubImageInputStream.js,bin/com/sun/imageio/plugins/gif/GIFImageMetadata.js,bin/com/sun/imageio/plugins/gif/GIFImageMetadataFormat.js,bin/com/sun/imageio/plugins/gif/GIFImageMetadataFormatResources.js,bin/com/sun/imageio/plugins/gif/GIFImageReader.js,bin/com/sun/imageio/plugins/gif/GIFImageReaderSpi.js,bin/com/sun/imageio/plugins/gif/GIFImageWriter.js,bin/com/sun/imageio/plugins/gif/GIFImageWriterSpi.js,bin/com/sun/imageio/plugins/gif/GIFMetadata.js,bin/com/sun/imageio/plugins/gif/GIFStreamMetadata.js,bin/com/sun/imageio/plugins/gif/GIFStreamMetadataFormat.js,bin/com/sun/imageio/plugins/gif/GIFStreamMetadataFormatResources.js,bin/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.js,bin/com/sun/imageio/plugins/gif/GIFWritableStreamMetadata.js,bin/com/sun/imageio/plugins/jpeg/AdobeMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/COMMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/DRIMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/JPEG.js,bin/com/sun/imageio/plugins/jpeg/JPEGBuffer.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormat.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormatResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageReader.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageReaderResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageWriter.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageWriterResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.js,bin/com/sun/imageio/plugins/jpeg/JPEGMetadata.js,bin/com/sun/imageio/plugins/jpeg/JPEGMetadataFormat.js,bin/com/sun/imageio/plugins/jpeg/JPEGMetadataFormatResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormat.js,bin/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormatResources.js,bin/com/sun/imageio/plugins/jpeg/MarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.js,bin/com/sun/imageio/plugins/png/PNGImageReader.js,bin/com/sun/imageio/plugins/png/PNGImageReaderSpi.js,bin/com/sun/imageio/plugins/png/PNGImageWriter.js,bin/com/sun/imageio/plugins/png/PNGImageWriterSpi.js,bin/com/sun/imageio/plugins/png/PNGMetadata.js,bin/com/sun/imageio/plugins/png/PNGMetadataFormat.js,bin/com/sun/imageio/plugins/png/PNGMetadataFormatResources.js,bin/com/sun/imageio/plugins/png/RowFilter.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageReader.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageWriter.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.js,bin/com/sun/imageio/plugins/wbmp/WBMPMetadata.js,bin/com/sun/imageio/plugins/wbmp/WBMPMetadataFormat.js,bin/com/sun/imageio/spi/FileImageInputStreamSpi.js,bin/com/sun/imageio/spi/FileImageOutputStreamSpi.js,bin/com/sun/imageio/spi/InputStreamImageInputStreamSpi.js,bin/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.js,bin/com/sun/imageio/spi/RAFImageInputStreamSpi.js,bin/com/sun/imageio/spi/RAFImageOutputStreamSpi.js,bin/com/sun/imageio/stream/CloseableDisposerRecord.js,bin/com/sun/imageio/stream/StreamCloser.js,bin/com/sun/imageio/stream/StreamFinalizer.js,bin/com/sun/inputmethods/internal/indicim/DevanagariInputMethodDescriptor.js,bin/com/sun/inputmethods/internal/indicim/DevanagariTables.js,bin/com/sun/inputmethods/internal/indicim/IndicInputMethod.js,bin/com/sun/inputmethods/internal/indicim/IndicInputMethodImpl.js,bin/com/sun/inputmethods/internal/thaiim/ThaiInputMethod.js,bin/com/sun/inputmethods/internal/thaiim/ThaiInputMethodDescriptor.js,bin/com/sun/inputmethods/internal/thaiim/ThaiInputMethodImpl.js,bin/com/sun/inputmethods/internal/thaiim/ThaiRules.js,bin/com/sun/jarsigner/ContentSigner.js,bin/com/sun/jarsigner/ContentSignerParameters.js,bin/com/sun/java/browser/dom/DOMAccessException.js,bin/com/sun/java/browser/dom/DOMAccessor.js,bin/com/sun/java/browser/dom/DOMAction.js,bin/com/sun/java/browser/dom/DOMService.js,bin/com/sun/java/browser/dom/DOMServiceProvider.js,bin/com/sun/java/browser/dom/DOMUnsupportedException.js,bin/com/sun/java/browser/net/ProxyInfo.js,bin/com/sun/java/browser/net/ProxyService.js,bin/com/sun/java/browser/net/ProxyServiceProvider.js,bin/com/sun/java/swing/Painter.js,bin/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.js,bin/com/sun/java/swing/plaf/gtk/GTKColorType.js,bin/com/sun/java/swing/plaf/gtk/GTKConstants.js,bin/com/sun/java/swing/plaf/gtk/GTKEngine.js,bin/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.js,bin/com/sun/java/swing/plaf/gtk/GTKGraphicsUtils.js,bin/com/sun/java/swing/plaf/gtk/GTKIconFactory.js,bin/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.js,bin/com/sun/java/swing/plaf/gtk/GTKPainter.js,bin/com/sun/java/swing/plaf/gtk/GTKRegion.js,bin/com/sun/java/swing/plaf/gtk/GTKStyle.js,bin/com/sun/java/swing/plaf/gtk/GTKStyleFactory.js,bin/com/sun/java/swing/plaf/gtk/Metacity.js,bin/com/sun/java/swing/plaf/gtk/PangoFonts.js,bin/com/sun/java/swing/plaf/gtk/XColors.js,bin/com/sun/java/swing/plaf/motif/MotifBorders.js,bin/com/sun/java/swing/plaf/motif/MotifButtonListener.js,bin/com/sun/java/swing/plaf/motif/MotifButtonUI.js,bin/com/sun/java/swing/plaf/motif/MotifCheckBoxMenuItemUI.js,bin/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.js,bin/com/sun/java/swing/plaf/motif/MotifComboBoxUI.js,bin/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.js,bin/com/sun/java/swing/plaf/motif/MotifDesktopPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifEditorPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifFileChooserUI.js,bin/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.js,bin/com/sun/java/swing/plaf/motif/MotifIconFactory.js,bin/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.js,bin/com/sun/java/swing/plaf/motif/MotifInternalFrameUI.js,bin/com/sun/java/swing/plaf/motif/MotifLabelUI.js,bin/com/sun/java/swing/plaf/motif/MotifLookAndFeel.js,bin/com/sun/java/swing/plaf/motif/MotifMenuBarUI.js,bin/com/sun/java/swing/plaf/motif/MotifMenuItemUI.js,bin/com/sun/java/swing/plaf/motif/MotifMenuMouseListener.js,bin/com/sun/java/swing/plaf/motif/MotifMenuMouseMotionListener.js,bin/com/sun/java/swing/plaf/motif/MotifMenuUI.js,bin/com/sun/java/swing/plaf/motif/MotifOptionPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifPasswordFieldUI.js,bin/com/sun/java/swing/plaf/motif/MotifPopupMenuSeparatorUI.js,bin/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.js,bin/com/sun/java/swing/plaf/motif/MotifProgressBarUI.js,bin/com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI.js,bin/com/sun/java/swing/plaf/motif/MotifRadioButtonUI.js,bin/com/sun/java/swing/plaf/motif/MotifScrollBarButton.js,bin/com/sun/java/swing/plaf/motif/MotifScrollBarUI.js,bin/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifSeparatorUI.js,bin/com/sun/java/swing/plaf/motif/MotifSliderUI.js,bin/com/sun/java/swing/plaf/motif/MotifSplitPaneDivider.js,bin/com/sun/java/swing/plaf/motif/MotifSplitPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifTabbedPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextAreaUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextFieldUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextUI.js,bin/com/sun/java/swing/plaf/motif/MotifToggleButtonUI.js,bin/com/sun/java/swing/plaf/motif/MotifTreeCellRenderer.js,bin/com/sun/java/swing/plaf/motif/MotifTreeUI.js,bin/com/sun/java/swing/plaf/nimbus/AbstractRegionPainter.js,bin/com/sun/java/swing/plaf/nimbus/DerivedColor.js,bin/com/sun/java/swing/plaf/nimbus/DropShadowEffect.js,bin/com/sun/java/swing/plaf/nimbus/Effect.js,bin/com/sun/java/swing/plaf/nimbus/EffectUtils.js,bin/com/sun/java/swing/plaf/nimbus/ImageCache.js,bin/com/sun/java/swing/plaf/nimbus/ImageScalingHelper.js,bin/com/sun/java/swing/plaf/nimbus/InnerGlowEffect.js,bin/com/sun/java/swing/plaf/nimbus/InnerShadowEffect.js,bin/com/sun/java/swing/plaf/nimbus/LoweredBorder.js,bin/com/sun/java/swing/plaf/nimbus/NimbusIcon.js,bin/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.js,bin/com/sun/java/swing/plaf/nimbus/NimbusStyle.js,bin/com/sun/java/swing/plaf/nimbus/OuterGlowEffect.js,bin/com/sun/java/swing/plaf/nimbus/ShadowEffect.js,bin/com/sun/java/swing/plaf/nimbus/State.js,bin/com/sun/java/swing/plaf/nimbus/SynthPainterImpl.js,bin/com/sun/java/swing/plaf/nimbus/TableScrollPaneCorner.js,bin/com/sun/java/swing/plaf/nimbus/ToolBarSeparatorPainter.js,bin/com/sun/java/swing/plaf/windows/AnimationController.js,bin/com/sun/java/swing/plaf/windows/DesktopProperty.js,bin/com/sun/java/swing/plaf/windows/TMSchema.js,bin/com/sun/java/swing/plaf/windows/WindowsBorders.js,bin/com/sun/java/swing/plaf/windows/WindowsButtonListener.js,bin/com/sun/java/swing/plaf/windows/WindowsButtonUI.js,bin/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.js,bin/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.js,bin/com/sun/java/swing/plaf/windows/WindowsClassicLookAndFeel.js,bin/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.js,bin/com/sun/java/swing/plaf/windows/WindowsDesktopIconUI.js,bin/com/sun/java/swing/plaf/windows/WindowsDesktopManager.js,bin/com/sun/java/swing/plaf/windows/WindowsDesktopPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsEditorPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.js,bin/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.js,bin/com/sun/java/swing/plaf/windows/WindowsIconFactory.js,bin/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.js,bin/com/sun/java/swing/plaf/windows/WindowsInternalFrameUI.js,bin/com/sun/java/swing/plaf/windows/WindowsLabelUI.js,bin/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuItemUIAccessor.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuUI.js,bin/com/sun/java/swing/plaf/windows/WindowsOptionPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPasswordFieldUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPopupMenuSeparatorUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPopupMenuUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPopupWindow.js,bin/com/sun/java/swing/plaf/windows/WindowsProgressBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.js,bin/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI.js,bin/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsScrollPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSeparatorUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSliderUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSpinnerUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSplitPaneDivider.js,bin/com/sun/java/swing/plaf/windows/WindowsSplitPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextAreaUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextFieldUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextUI.js,bin/com/sun/java/swing/plaf/windows/WindowsToggleButtonUI.js,bin/com/sun/java/swing/plaf/windows/WindowsToolBarSeparatorUI.js,bin/com/sun/java/swing/plaf/windows/WindowsToolBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTreeUI.js,bin/com/sun/java/swing/plaf/windows/XPStyle.js,bin/com/sun/java/util/jar/pack/AdaptiveCoding.js,bin/com/sun/java/util/jar/pack/Attribute.js,bin/com/sun/java/util/jar/pack/BandStructure.js,bin/com/sun/java/util/jar/pack/ClassReader.js,bin/com/sun/java/util/jar/pack/ClassWriter.js,bin/com/sun/java/util/jar/pack/Code.js,bin/com/sun/java/util/jar/pack/Coding.js,bin/com/sun/java/util/jar/pack/CodingChooser.js,bin/com/sun/java/util/jar/pack/CodingMethod.js,bin/com/sun/java/util/jar/pack/ConstantPool.js,bin/com/sun/java/util/jar/pack/Constants.js,bin/com/sun/java/util/jar/pack/Driver.js,bin/com/sun/java/util/jar/pack/DriverResource.js,bin/com/sun/java/util/jar/pack/Fixups.js,bin/com/sun/java/util/jar/pack/Histogram.js,bin/com/sun/java/util/jar/pack/Instruction.js,bin/com/sun/java/util/jar/pack/NativeUnpack.js,bin/com/sun/java/util/jar/pack/Package.js,bin/com/sun/java/util/jar/pack/PackageReader.js,bin/com/sun/java/util/jar/pack/PackageWriter.js,bin/com/sun/java/util/jar/pack/PackerImpl.js,bin/com/sun/java/util/jar/pack/PopulationCoding.js,bin/com/sun/java/util/jar/pack/PropMap.js,bin/com/sun/java/util/jar/pack/UnpackerImpl.js,bin/com/sun/java/util/jar/pack/Utils.js,bin/com/sun/jdi/AbsentInformationException.js,bin/com/sun/jdi/Accessible.js,bin/com/sun/jdi/ArrayReference.js,bin/com/sun/jdi/ArrayType.js,bin/com/sun/jdi/BooleanType.js,bin/com/sun/jdi/BooleanValue.js,bin/com/sun/jdi/Bootstrap.js,bin/com/sun/jdi/ByteType.js,bin/com/sun/jdi/ByteValue.js,bin/com/sun/jdi/CharType.js,bin/com/sun/jdi/CharValue.js,bin/com/sun/jdi/ClassLoaderReference.js,bin/com/sun/jdi/ClassNotLoadedException.js,bin/com/sun/jdi/ClassNotPreparedException.js,bin/com/sun/jdi/ClassObjectReference.js,bin/com/sun/jdi/ClassType.js,bin/com/sun/jdi/DoubleType.js,bin/com/sun/jdi/DoubleValue.js,bin/com/sun/jdi/Field.js,bin/com/sun/jdi/FloatType.js,bin/com/sun/jdi/FloatValue.js,bin/com/sun/jdi/IncompatibleThreadStateException.js,bin/com/sun/jdi/InconsistentDebugInfoException.js,bin/com/sun/jdi/IntegerType.js,bin/com/sun/jdi/IntegerValue.js,bin/com/sun/jdi/InterfaceType.js,bin/com/sun/jdi/InternalException.js,bin/com/sun/jdi/InvalidCodeIndexException.js,bin/com/sun/jdi/InvalidLineNumberException.js,bin/com/sun/jdi/InvalidStackFrameException.js,bin/com/sun/jdi/InvalidTypeException.js,bin/com/sun/jdi/InvocationException.js,bin/com/sun/jdi/JDIPermission.js,bin/com/sun/jdi/LocalVariable.js,bin/com/sun/jdi/Locatable.js,bin/com/sun/jdi/Location.js,bin/com/sun/jdi/LongType.js,bin/com/sun/jdi/LongValue.js,bin/com/sun/jdi/Method.js,bin/com/sun/jdi/Mirror.js,bin/com/sun/jdi/MonitorInfo.js,bin/com/sun/jdi/NativeMethodException.js,bin/com/sun/jdi/ObjectCollectedException.js,bin/com/sun/jdi/ObjectReference.js,bin/com/sun/jdi/PathSearchingVirtualMachine.js,bin/com/sun/jdi/PrimitiveType.js,bin/com/sun/jdi/PrimitiveValue.js,bin/com/sun/jdi/ReferenceType.js,bin/com/sun/jdi/ShortType.js,bin/com/sun/jdi/ShortValue.js,bin/com/sun/jdi/StackFrame.js,bin/com/sun/jdi/StringReference.js,bin/com/sun/jdi/ThreadGroupReference.js,bin/com/sun/jdi/ThreadReference.js,bin/com/sun/jdi/Type.js,bin/com/sun/jdi/TypeComponent.js,bin/com/sun/jdi/VMCannotBeModifiedException.js,bin/com/sun/jdi/VMDisconnectedException.js,bin/com/sun/jdi/VMMismatchException.js,bin/com/sun/jdi/VMOutOfMemoryException.js,bin/com/sun/jdi/Value.js,bin/com/sun/jdi/VirtualMachine.js,bin/com/sun/jdi/VirtualMachineManager.js,bin/com/sun/jdi/VoidType.js,bin/com/sun/jdi/VoidValue.js,bin/com/sun/jdi/connect/AttachingConnector.js,bin/com/sun/jdi/connect/Connector.js,bin/com/sun/jdi/connect/IllegalConnectorArgumentsException.js,bin/com/sun/jdi/connect/LaunchingConnector.js,bin/com/sun/jdi/connect/ListeningConnector.js,bin/com/sun/jdi/connect/Transport.js,bin/com/sun/jdi/connect/TransportTimeoutException.js,bin/com/sun/jdi/connect/VMStartException.js,bin/com/sun/jdi/connect/spi/ClosedConnectionException.js,bin/com/sun/jdi/connect/spi/Connection.js,bin/com/sun/jdi/connect/spi/TransportService.js,bin/com/sun/jdi/event/AccessWatchpointEvent.js,bin/com/sun/jdi/event/BreakpointEvent.js,bin/com/sun/jdi/event/ClassPrepareEvent.js,bin/com/sun/jdi/event/ClassUnloadEvent.js,bin/com/sun/jdi/event/Event.js,bin/com/sun/jdi/event/EventIterator.js,bin/com/sun/jdi/event/EventQueue.js,bin/com/sun/jdi/event/EventSet.js,bin/com/sun/jdi/event/ExceptionEvent.js,bin/com/sun/jdi/event/LocatableEvent.js,bin/com/sun/jdi/event/MethodEntryEvent.js,bin/com/sun/jdi/event/MethodExitEvent.js,bin/com/sun/jdi/event/ModificationWatchpointEvent.js,bin/com/sun/jdi/event/MonitorContendedEnterEvent.js,bin/com/sun/jdi/event/MonitorContendedEnteredEvent.js,bin/com/sun/jdi/event/MonitorWaitEvent.js,bin/com/sun/jdi/event/MonitorWaitedEvent.js,bin/com/sun/jdi/event/StepEvent.js,bin/com/sun/jdi/event/ThreadDeathEvent.js,bin/com/sun/jdi/event/ThreadStartEvent.js,bin/com/sun/jdi/event/VMDeathEvent.js,bin/com/sun/jdi/event/VMDisconnectEvent.js,bin/com/sun/jdi/event/VMStartEvent.js,bin/com/sun/jdi/event/WatchpointEvent.js,bin/com/sun/jdi/request/AccessWatchpointRequest.js,bin/com/sun/jdi/request/BreakpointRequest.js,bin/com/sun/jdi/request/ClassPrepareRequest.js,bin/com/sun/jdi/request/ClassUnloadRequest.js,bin/com/sun/jdi/request/DuplicateRequestException.js,bin/com/sun/jdi/request/EventRequest.js,bin/com/sun/jdi/request/EventRequestManager.js,bin/com/sun/jdi/request/ExceptionRequest.js,bin/com/sun/jdi/request/InvalidRequestStateException.js,bin/com/sun/jdi/request/MethodEntryRequest.js,bin/com/sun/jdi/request/MethodExitRequest.js,bin/com/sun/jdi/request/ModificationWatchpointRequest.js,bin/com/sun/jdi/request/MonitorContendedEnterRequest.js,bin/com/sun/jdi/request/MonitorContendedEnteredRequest.js,bin/com/sun/jdi/request/MonitorWaitRequest.js,bin/com/sun/jdi/request/MonitorWaitedRequest.js,bin/com/sun/jdi/request/StepRequest.js,bin/com/sun/jdi/request/ThreadDeathRequest.js,bin/com/sun/jdi/request/ThreadStartRequest.js,bin/com/sun/jdi/request/VMDeathRequest.js,bin/com/sun/jdi/request/WatchpointRequest.js,bin/com/sun/jmx/defaults/JmxProperties.js,bin/com/sun/jmx/defaults/ServiceName.js,bin/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.js,bin/com/sun/jmx/interceptor/MBeanServerInterceptor.js,bin/com/sun/jmx/mbeanserver/ClassLoaderRepositorySupport.js,bin/com/sun/jmx/mbeanserver/ConvertingMethod.js,bin/com/sun/jmx/mbeanserver/DescriptorCache.js,bin/com/sun/jmx/mbeanserver/DynamicMBean2.js,bin/com/sun/jmx/mbeanserver/GetPropertyAction.js,bin/com/sun/jmx/mbeanserver/Introspector.js,bin/com/sun/jmx/mbeanserver/JmxMBeanServer.js,bin/com/sun/jmx/mbeanserver/JmxMBeanServerBuilder.js,bin/com/sun/jmx/mbeanserver/MBeanAnalyzer.js,bin/com/sun/jmx/mbeanserver/MBeanInstantiator.js,bin/com/sun/jmx/mbeanserver/MBeanIntrospector.js,bin/com/sun/jmx/mbeanserver/MBeanServerDelegateImpl.js,bin/com/sun/jmx/mbeanserver/MBeanSupport.js,bin/com/sun/jmx/mbeanserver/MXBeanIntrospector.js,bin/com/sun/jmx/mbeanserver/MXBeanLookup.js,bin/com/sun/jmx/mbeanserver/MXBeanProxy.js,bin/com/sun/jmx/mbeanserver/MXBeanSupport.js,bin/com/sun/jmx/mbeanserver/ModifiableClassLoaderRepository.js,bin/com/sun/jmx/mbeanserver/NamedObject.js,bin/com/sun/jmx/mbeanserver/ObjectInputStreamWithLoader.js,bin/com/sun/jmx/mbeanserver/OpenConverter.js,bin/com/sun/jmx/mbeanserver/PerInterface.js,bin/com/sun/jmx/mbeanserver/Repository.js,bin/com/sun/jmx/mbeanserver/SecureClassLoaderRepository.js,bin/com/sun/jmx/mbeanserver/StandardMBeanIntrospector.js,bin/com/sun/jmx/mbeanserver/StandardMBeanSupport.js,bin/com/sun/jmx/mbeanserver/SunJmxMBeanServer.js,bin/com/sun/jmx/mbeanserver/Util.js,bin/com/sun/jmx/mbeanserver/WeakIdentityHashMap.js,bin/com/sun/jmx/remote/internal/ArrayNotificationBuffer.js,bin/com/sun/jmx/remote/internal/ArrayQueue.js,bin/com/sun/jmx/remote/internal/ClientCommunicatorAdmin.js,bin/com/sun/jmx/remote/internal/ClientListenerInfo.js,bin/com/sun/jmx/remote/internal/ClientNotifForwarder.js,bin/com/sun/jmx/remote/internal/NotificationBuffer.js,bin/com/sun/jmx/remote/internal/NotificationBufferFilter.js,bin/com/sun/jmx/remote/internal/ProxyInputStream.js,bin/com/sun/jmx/remote/internal/ProxyRef.js,bin/com/sun/jmx/remote/internal/RMIExporter.js,bin/com/sun/jmx/remote/internal/ServerCommunicatorAdmin.js,bin/com/sun/jmx/remote/internal/ServerNotifForwarder.js,bin/com/sun/jmx/remote/internal/Unmarshal.js,bin/com/sun/jmx/remote/protocol/iiop/ClientProvider.js,bin/com/sun/jmx/remote/protocol/iiop/ServerProvider.js,bin/com/sun/jmx/remote/protocol/rmi/ClientProvider.js,bin/com/sun/jmx/remote/protocol/rmi/ServerProvider.js,bin/com/sun/jmx/remote/security/FileLoginModule.js,bin/com/sun/jmx/remote/security/JMXPluggableAuthenticator.js,bin/com/sun/jmx/remote/security/JMXSubjectDomainCombiner.js,bin/com/sun/jmx/remote/security/MBeanServerAccessController.js,bin/com/sun/jmx/remote/security/MBeanServerFileAccessController.js,bin/com/sun/jmx/remote/security/NotificationAccessController.js,bin/com/sun/jmx/remote/security/SubjectDelegator.js,bin/com/sun/jmx/remote/util/ClassLoaderWithRepository.js,bin/com/sun/jmx/remote/util/ClassLogger.js,bin/com/sun/jmx/remote/util/EnvHelp.js,bin/com/sun/jmx/remote/util/OrderClassLoaders.js,bin/com/sun/jmx/snmp/BerDecoder.js,bin/com/sun/jmx/snmp/BerEncoder.js,bin/com/sun/jmx/snmp/BerException.js,bin/com/sun/jmx/snmp/EnumRowStatus.js,bin/com/sun/jmx/snmp/Enumerated.js,bin/com/sun/jmx/snmp/IPAcl/ASCII_CharStream.js,bin/com/sun/jmx/snmp/IPAcl/AclEntryImpl.js,bin/com/sun/jmx/snmp/IPAcl/AclImpl.js,bin/com/sun/jmx/snmp/IPAcl/GroupImpl.js,bin/com/sun/jmx/snmp/IPAcl/Host.js,bin/com/sun/jmx/snmp/IPAcl/JDMAccess.js,bin/com/sun/jmx/snmp/IPAcl/JDMAclBlock.js,bin/com/sun/jmx/snmp/IPAcl/JDMAclItem.js,bin/com/sun/jmx/snmp/IPAcl/JDMCommunities.js,bin/com/sun/jmx/snmp/IPAcl/JDMCommunity.js,bin/com/sun/jmx/snmp/IPAcl/JDMEnterprise.js,bin/com/sun/jmx/snmp/IPAcl/JDMHost.js,bin/com/sun/jmx/snmp/IPAcl/JDMHostInform.js,bin/com/sun/jmx/snmp/IPAcl/JDMHostName.js,bin/com/sun/jmx/snmp/IPAcl/JDMHostTrap.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformBlock.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformCommunity.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformInterestedHost.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformItem.js,bin/com/sun/jmx/snmp/IPAcl/JDMIpAddress.js,bin/com/sun/jmx/snmp/IPAcl/JDMIpMask.js,bin/com/sun/jmx/snmp/IPAcl/JDMIpV6Address.js,bin/com/sun/jmx/snmp/IPAcl/JDMManagers.js,bin/com/sun/jmx/snmp/IPAcl/JDMNetMask.js,bin/com/sun/jmx/snmp/IPAcl/JDMNetMaskV6.js,bin/com/sun/jmx/snmp/IPAcl/JDMSecurityDefs.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapBlock.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapCommunity.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapInterestedHost.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapItem.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapNum.js,bin/com/sun/jmx/snmp/IPAcl/JJTParserState.js,bin/com/sun/jmx/snmp/IPAcl/NetMaskImpl.js,bin/com/sun/jmx/snmp/IPAcl/Node.js,bin/com/sun/jmx/snmp/IPAcl/OwnerImpl.js,bin/com/sun/jmx/snmp/IPAcl/ParseError.js,bin/com/sun/jmx/snmp/IPAcl/ParseException.js,bin/com/sun/jmx/snmp/IPAcl/Parser.js,bin/com/sun/jmx/snmp/IPAcl/ParserConstants.js,bin/com/sun/jmx/snmp/IPAcl/ParserTokenManager.js,bin/com/sun/jmx/snmp/IPAcl/ParserTreeConstants.js,bin/com/sun/jmx/snmp/IPAcl/PermissionImpl.js,bin/com/sun/jmx/snmp/IPAcl/PrincipalImpl.js,bin/com/sun/jmx/snmp/IPAcl/SimpleNode.js,bin/com/sun/jmx/snmp/IPAcl/SnmpAcl.js,bin/com/sun/jmx/snmp/IPAcl/Token.js,bin/com/sun/jmx/snmp/IPAcl/TokenMgrError.js,bin/com/sun/jmx/snmp/InetAddressAcl.js,bin/com/sun/jmx/snmp/ServiceName.js,bin/com/sun/jmx/snmp/SnmpAckPdu.js,bin/com/sun/jmx/snmp/SnmpBadSecurityLevelException.js,bin/com/sun/jmx/snmp/SnmpCounter.js,bin/com/sun/jmx/snmp/SnmpCounter64.js,bin/com/sun/jmx/snmp/SnmpEngine.js,bin/com/sun/jmx/snmp/SnmpEngineFactory.js,bin/com/sun/jmx/snmp/SnmpEngineId.js,bin/com/sun/jmx/snmp/SnmpEngineParameters.js,bin/com/sun/jmx/snmp/SnmpGauge.js,bin/com/sun/jmx/snmp/SnmpInt.js,bin/com/sun/jmx/snmp/SnmpIpAddress.js,bin/com/sun/jmx/snmp/SnmpMessage.js,bin/com/sun/jmx/snmp/SnmpMsg.js,bin/com/sun/jmx/snmp/SnmpNull.js,bin/com/sun/jmx/snmp/SnmpOpaque.js,bin/com/sun/jmx/snmp/SnmpParams.js,bin/com/sun/jmx/snmp/SnmpPdu.js,bin/com/sun/jmx/snmp/SnmpPduBulk.js,bin/com/sun/jmx/snmp/SnmpPduBulkType.js,bin/com/sun/jmx/snmp/SnmpPduFactory.js,bin/com/sun/jmx/snmp/SnmpPduFactoryBER.js,bin/com/sun/jmx/snmp/SnmpPduRequest.js,bin/com/sun/jmx/snmp/SnmpPduRequestType.js,bin/com/sun/jmx/snmp/SnmpPduTrap.js,bin/com/sun/jmx/snmp/SnmpScopedPduBulk.js,bin/com/sun/jmx/snmp/SnmpScopedPduPacket.js,bin/com/sun/jmx/snmp/SnmpScopedPduRequest.js,bin/com/sun/jmx/snmp/SnmpSecurityException.js,bin/com/sun/jmx/snmp/SnmpSecurityParameters.js,bin/com/sun/jmx/snmp/SnmpStatusException.js,bin/com/sun/jmx/snmp/SnmpString.js,bin/com/sun/jmx/snmp/SnmpStringFixed.js,bin/com/sun/jmx/snmp/SnmpTooBigException.js,bin/com/sun/jmx/snmp/SnmpUnknownAccContrModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownModelLcdException.js,bin/com/sun/jmx/snmp/SnmpUnknownMsgProcModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownSecModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownSubSystemException.js,bin/com/sun/jmx/snmp/SnmpUnsignedInt.js,bin/com/sun/jmx/snmp/SnmpUsmKeyHandler.js,bin/com/sun/jmx/snmp/SnmpV3Message.js,bin/com/sun/jmx/snmp/SnmpValue.js,bin/com/sun/jmx/snmp/ThreadContext.js,bin/com/sun/jmx/snmp/UserAcl.js,bin/com/sun/jmx/snmp/agent/SnmpEntryOid.js,bin/com/sun/jmx/snmp/agent/SnmpErrorHandlerAgent.js,bin/com/sun/jmx/snmp/agent/SnmpGenericMetaServer.js,bin/com/sun/jmx/snmp/agent/SnmpGenericObjectServer.js,bin/com/sun/jmx/snmp/agent/SnmpIndex.js,bin/com/sun/jmx/snmp/agent/SnmpMib.js,bin/com/sun/jmx/snmp/agent/SnmpMibAgent.js,bin/com/sun/jmx/snmp/agent/SnmpMibAgentMBean.js,bin/com/sun/jmx/snmp/agent/SnmpMibEntry.js,bin/com/sun/jmx/snmp/agent/SnmpMibGroup.js,bin/com/sun/jmx/snmp/agent/SnmpMibHandler.js,bin/com/sun/jmx/snmp/agent/SnmpMibNode.js,bin/com/sun/jmx/snmp/agent/SnmpMibOid.js,bin/com/sun/jmx/snmp/agent/SnmpMibRequest.js,bin/com/sun/jmx/snmp/agent/SnmpMibRequestImpl.js,bin/com/sun/jmx/snmp/agent/SnmpMibSubRequest.js,bin/com/sun/jmx/snmp/agent/SnmpMibTable.js,bin/com/sun/jmx/snmp/agent/SnmpRequestTree.js,bin/com/sun/jmx/snmp/agent/SnmpStandardMetaServer.js,bin/com/sun/jmx/snmp/agent/SnmpStandardObjectServer.js,bin/com/sun/jmx/snmp/agent/SnmpTableCallbackHandler.js,bin/com/sun/jmx/snmp/agent/SnmpTableEntryFactory.js,bin/com/sun/jmx/snmp/agent/SnmpTableEntryNotification.js,bin/com/sun/jmx/snmp/agent/SnmpTableSupport.js,bin/com/sun/jmx/snmp/agent/SnmpUserDataFactory.js,bin/com/sun/jmx/snmp/daemon/ClientHandler.js,bin/com/sun/jmx/snmp/daemon/CommunicationException.js,bin/com/sun/jmx/snmp/daemon/CommunicatorServer.js,bin/com/sun/jmx/snmp/daemon/CommunicatorServerMBean.js,bin/com/sun/jmx/snmp/daemon/SnmpAdaptorServer.js,bin/com/sun/jmx/snmp/daemon/SnmpAdaptorServerMBean.js,bin/com/sun/jmx/snmp/daemon/SnmpInformHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpMibTree.js,bin/com/sun/jmx/snmp/daemon/SnmpRequestHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.js,bin/com/sun/jmx/snmp/defaults/DefaultPaths.js,bin/com/sun/jmx/snmp/defaults/SnmpProperties.js,bin/com/sun/jmx/snmp/internal/SnmpAccessControlModel.js,bin/com/sun/jmx/snmp/internal/SnmpAccessControlSubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpDecryptedPdu.js,bin/com/sun/jmx/snmp/internal/SnmpEngineImpl.js,bin/com/sun/jmx/snmp/internal/SnmpIncomingRequest.js,bin/com/sun/jmx/snmp/internal/SnmpIncomingResponse.js,bin/com/sun/jmx/snmp/internal/SnmpLcd.js,bin/com/sun/jmx/snmp/internal/SnmpModel.js,bin/com/sun/jmx/snmp/internal/SnmpModelLcd.js,bin/com/sun/jmx/snmp/internal/SnmpMsgProcessingModel.js,bin/com/sun/jmx/snmp/internal/SnmpMsgProcessingSubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpOutgoingRequest.js,bin/com/sun/jmx/snmp/internal/SnmpSecurityCache.js,bin/com/sun/jmx/snmp/internal/SnmpSecurityModel.js,bin/com/sun/jmx/snmp/internal/SnmpSecuritySubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpSubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpTools.js,bin/com/sun/jmx/snmp/mpm/SnmpMsgTranslator.js,bin/com/sun/jmx/snmp/tasks/Task.js,bin/com/sun/jmx/snmp/tasks/TaskServer.js,bin/com/sun/jmx/snmp/tasks/ThreadService.js,bin/com/sun/jndi/cosnaming/CNBindingEnumeration.js,bin/com/sun/jndi/cosnaming/CNCtx.js,bin/com/sun/jndi/cosnaming/CNCtxFactory.js,bin/com/sun/jndi/cosnaming/CNNameParser.js,bin/com/sun/jndi/cosnaming/CorbanameUrl.js,bin/com/sun/jndi/cosnaming/ExceptionMapper.js,bin/com/sun/jndi/cosnaming/IiopUrl.js,bin/com/sun/jndi/cosnaming/OrbReuseTracker.js,bin/com/sun/jndi/cosnaming/RemoteToCorba.js,bin/com/sun/jndi/dns/DnsClient.js,bin/com/sun/jndi/dns/DnsContext.js,bin/com/sun/jndi/dns/DnsContextFactory.js,bin/com/sun/jndi/dns/DnsName.js,bin/com/sun/jndi/dns/DnsNameParser.js,bin/com/sun/jndi/dns/DnsUrl.js,bin/com/sun/jndi/dns/Header.js,bin/com/sun/jndi/dns/NameNode.js,bin/com/sun/jndi/dns/Resolver.js,bin/com/sun/jndi/dns/ResourceRecord.js,bin/com/sun/jndi/dns/ResourceRecords.js,bin/com/sun/jndi/dns/ZoneNode.js,bin/com/sun/jndi/ldap/BasicControl.js,bin/com/sun/jndi/ldap/Ber.js,bin/com/sun/jndi/ldap/BerDecoder.js,bin/com/sun/jndi/ldap/BerEncoder.js,bin/com/sun/jndi/ldap/BindingWithControls.js,bin/com/sun/jndi/ldap/ClientId.js,bin/com/sun/jndi/ldap/Connection.js,bin/com/sun/jndi/ldap/DefaultResponseControlFactory.js,bin/com/sun/jndi/ldap/DigestClientId.js,bin/com/sun/jndi/ldap/EntryChangeResponseControl.js,bin/com/sun/jndi/ldap/EventQueue.js,bin/com/sun/jndi/ldap/EventSupport.js,bin/com/sun/jndi/ldap/Filter.js,bin/com/sun/jndi/ldap/LdapAttribute.js,bin/com/sun/jndi/ldap/LdapBindingEnumeration.js,bin/com/sun/jndi/ldap/LdapClient.js,bin/com/sun/jndi/ldap/LdapClientFactory.js,bin/com/sun/jndi/ldap/LdapCtx.js,bin/com/sun/jndi/ldap/LdapCtxFactory.js,bin/com/sun/jndi/ldap/LdapEntry.js,bin/com/sun/jndi/ldap/LdapName.js,bin/com/sun/jndi/ldap/LdapNameParser.js,bin/com/sun/jndi/ldap/LdapNamingEnumeration.js,bin/com/sun/jndi/ldap/LdapPoolManager.js,bin/com/sun/jndi/ldap/LdapReferralContext.js,bin/com/sun/jndi/ldap/LdapReferralException.js,bin/com/sun/jndi/ldap/LdapRequest.js,bin/com/sun/jndi/ldap/LdapResult.js,bin/com/sun/jndi/ldap/LdapSchemaCtx.js,bin/com/sun/jndi/ldap/LdapSchemaParser.js,bin/com/sun/jndi/ldap/LdapSearchEnumeration.js,bin/com/sun/jndi/ldap/LdapURL.js,bin/com/sun/jndi/ldap/ManageReferralControl.js,bin/com/sun/jndi/ldap/NameClassPairWithControls.js,bin/com/sun/jndi/ldap/NamingEventNotifier.js,bin/com/sun/jndi/ldap/NotifierArgs.js,bin/com/sun/jndi/ldap/Obj.js,bin/com/sun/jndi/ldap/PersistentSearchControl.js,bin/com/sun/jndi/ldap/ReferralEnumeration.js,bin/com/sun/jndi/ldap/SearchResultWithControls.js,bin/com/sun/jndi/ldap/ServiceLocator.js,bin/com/sun/jndi/ldap/SimpleClientId.js,bin/com/sun/jndi/ldap/UnsolicitedResponseImpl.js,bin/com/sun/jndi/ldap/VersionHelper.js,bin/com/sun/jndi/ldap/VersionHelper12.js,bin/com/sun/jndi/ldap/ext/StartTlsResponseImpl.js,bin/com/sun/jndi/ldap/pool/ConnectionDesc.js,bin/com/sun/jndi/ldap/pool/Connections.js,bin/com/sun/jndi/ldap/pool/ConnectionsRef.js,bin/com/sun/jndi/ldap/pool/ConnectionsWeakRef.js,bin/com/sun/jndi/ldap/pool/Pool.js,bin/com/sun/jndi/ldap/pool/PoolCallback.js,bin/com/sun/jndi/ldap/pool/PoolCleaner.js,bin/com/sun/jndi/ldap/pool/PooledConnection.js,bin/com/sun/jndi/ldap/pool/PooledConnectionFactory.js,bin/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.js,bin/com/sun/jndi/ldap/sasl/LdapSasl.js,bin/com/sun/jndi/ldap/sasl/SaslInputStream.js,bin/com/sun/jndi/ldap/sasl/SaslOutputStream.js,bin/com/sun/jndi/rmi/registry/ReferenceWrapper.js,bin/com/sun/jndi/rmi/registry/RegistryContext.js,bin/com/sun/jndi/rmi/registry/RegistryContextFactory.js,bin/com/sun/jndi/rmi/registry/RemoteReference.js,bin/com/sun/jndi/toolkit/corba/CorbaUtils.js,bin/com/sun/jndi/toolkit/ctx/AtomicContext.js,bin/com/sun/jndi/toolkit/ctx/AtomicDirContext.js,bin/com/sun/jndi/toolkit/ctx/ComponentContext.js,bin/com/sun/jndi/toolkit/ctx/ComponentDirContext.js,bin/com/sun/jndi/toolkit/ctx/Continuation.js,bin/com/sun/jndi/toolkit/ctx/HeadTail.js,bin/com/sun/jndi/toolkit/ctx/PartialCompositeContext.js,bin/com/sun/jndi/toolkit/ctx/PartialCompositeDirContext.js,bin/com/sun/jndi/toolkit/ctx/StringHeadTail.js,bin/com/sun/jndi/toolkit/dir/AttrFilter.js,bin/com/sun/jndi/toolkit/dir/ContainmentFilter.js,bin/com/sun/jndi/toolkit/dir/ContextEnumerator.js,bin/com/sun/jndi/toolkit/dir/DirSearch.js,bin/com/sun/jndi/toolkit/dir/HierMemDirCtx.js,bin/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.js,bin/com/sun/jndi/toolkit/dir/SearchFilter.js,bin/com/sun/jndi/toolkit/url/GenericURLContext.js,bin/com/sun/jndi/toolkit/url/GenericURLDirContext.js,bin/com/sun/jndi/toolkit/url/Uri.js,bin/com/sun/jndi/toolkit/url/UrlUtil.js,bin/com/sun/jndi/url/corbaname/corbanameURLContextFactory.js,bin/com/sun/jndi/url/dns/dnsURLContext.js,bin/com/sun/jndi/url/dns/dnsURLContextFactory.js,bin/com/sun/jndi/url/iiop/iiopURLContext.js,bin/com/sun/jndi/url/iiop/iiopURLContextFactory.js,bin/com/sun/jndi/url/iiopname/iiopnameURLContextFactory.js,bin/com/sun/jndi/url/ldap/ldapURLContext.js,bin/com/sun/jndi/url/ldap/ldapURLContextFactory.js,bin/com/sun/jndi/url/ldaps/ldapsURLContextFactory.js,bin/com/sun/jndi/url/rmi/rmiURLContext.js,bin/com/sun/jndi/url/rmi/rmiURLContextFactory.js,bin/com/sun/management/GarbageCollectorMXBean.js,bin/com/sun/management/GcInfo.js,bin/com/sun/management/HotSpotDiagnosticMXBean.js,bin/com/sun/management/OperatingSystemMXBean.js,bin/com/sun/management/UnixOperatingSystemMXBean.js,bin/com/sun/management/VMOption.js,bin/com/sun/media/sound/AbstractDataLine.js,bin/com/sun/media/sound/AbstractLine.js,bin/com/sun/media/sound/AbstractMidiDevice.js,bin/com/sun/media/sound/AbstractMidiDeviceProvider.js,bin/com/sun/media/sound/AbstractMixer.js,bin/com/sun/media/sound/AiffFileFormat.js,bin/com/sun/media/sound/AiffFileReader.js,bin/com/sun/media/sound/AiffFileWriter.js,bin/com/sun/media/sound/AlawCodec.js,bin/com/sun/media/sound/AuFileFormat.js,bin/com/sun/media/sound/AuFileReader.js,bin/com/sun/media/sound/AuFileWriter.js,bin/com/sun/media/sound/AudioFileSoundbankReader.js,bin/com/sun/media/sound/AudioFloatConverter.js,bin/com/sun/media/sound/AudioFloatFormatConverter.js,bin/com/sun/media/sound/AudioFloatInputStream.js,bin/com/sun/media/sound/AudioSynthesizer.js,bin/com/sun/media/sound/AudioSynthesizerPropertyInfo.js,bin/com/sun/media/sound/AutoClosingClip.js,bin/com/sun/media/sound/AutoConnectSequencer.js,bin/com/sun/media/sound/DLSInfo.js,bin/com/sun/media/sound/DLSInstrument.js,bin/com/sun/media/sound/DLSModulator.js,bin/com/sun/media/sound/DLSRegion.js,bin/com/sun/media/sound/DLSSample.js,bin/com/sun/media/sound/DLSSampleLoop.js,bin/com/sun/media/sound/DLSSampleOptions.js,bin/com/sun/media/sound/DLSSoundbank.js,bin/com/sun/media/sound/DLSSoundbankReader.js,bin/com/sun/media/sound/DataPusher.js,bin/com/sun/media/sound/DirectAudioDevice.js,bin/com/sun/media/sound/DirectAudioDeviceProvider.js,bin/com/sun/media/sound/EmergencySoundbank.js,bin/com/sun/media/sound/EventDispatcher.js,bin/com/sun/media/sound/FFT.js,bin/com/sun/media/sound/FastShortMessage.js,bin/com/sun/media/sound/FastSysexMessage.js,bin/com/sun/media/sound/InvalidDataException.js,bin/com/sun/media/sound/InvalidFormatException.js,bin/com/sun/media/sound/JARSoundbankReader.js,bin/com/sun/media/sound/JDK13Services.js,bin/com/sun/media/sound/JSSecurityManager.js,bin/com/sun/media/sound/JavaSoundAudioClip.js,bin/com/sun/media/sound/MidiDeviceReceiver.js,bin/com/sun/media/sound/MidiInDevice.js,bin/com/sun/media/sound/MidiInDeviceProvider.js,bin/com/sun/media/sound/MidiOutDevice.js,bin/com/sun/media/sound/MidiOutDeviceProvider.js,bin/com/sun/media/sound/MidiUtils.js,bin/com/sun/media/sound/ModelAbstractChannelMixer.js,bin/com/sun/media/sound/ModelAbstractOscillator.js,bin/com/sun/media/sound/ModelByteBuffer.js,bin/com/sun/media/sound/ModelByteBufferWavetable.js,bin/com/sun/media/sound/ModelChannelMixer.js,bin/com/sun/media/sound/ModelConnectionBlock.js,bin/com/sun/media/sound/ModelDestination.js,bin/com/sun/media/sound/ModelDirectedPlayer.js,bin/com/sun/media/sound/ModelDirector.js,bin/com/sun/media/sound/ModelIdentifier.js,bin/com/sun/media/sound/ModelInstrument.js,bin/com/sun/media/sound/ModelInstrumentComparator.js,bin/com/sun/media/sound/ModelMappedInstrument.js,bin/com/sun/media/sound/ModelOscillator.js,bin/com/sun/media/sound/ModelOscillatorStream.js,bin/com/sun/media/sound/ModelPatch.js,bin/com/sun/media/sound/ModelPerformer.js,bin/com/sun/media/sound/ModelSource.js,bin/com/sun/media/sound/ModelStandardDirector.js,bin/com/sun/media/sound/ModelStandardIndexedDirector.js,bin/com/sun/media/sound/ModelStandardTransform.js,bin/com/sun/media/sound/ModelTransform.js,bin/com/sun/media/sound/ModelWavetable.js,bin/com/sun/media/sound/PCMtoPCMCodec.js,bin/com/sun/media/sound/Platform.js,bin/com/sun/media/sound/PortMixer.js,bin/com/sun/media/sound/PortMixerProvider.js,bin/com/sun/media/sound/Printer.js,bin/com/sun/media/sound/RIFFInvalidDataException.js,bin/com/sun/media/sound/RIFFInvalidFormatException.js,bin/com/sun/media/sound/RIFFReader.js,bin/com/sun/media/sound/RIFFWriter.js,bin/com/sun/media/sound/RealTimeSequencer.js,bin/com/sun/media/sound/RealTimeSequencerProvider.js,bin/com/sun/media/sound/ReferenceCountingDevice.js,bin/com/sun/media/sound/SF2GlobalRegion.js,bin/com/sun/media/sound/SF2Instrument.js,bin/com/sun/media/sound/SF2InstrumentRegion.js,bin/com/sun/media/sound/SF2Layer.js,bin/com/sun/media/sound/SF2LayerRegion.js,bin/com/sun/media/sound/SF2Modulator.js,bin/com/sun/media/sound/SF2Region.js,bin/com/sun/media/sound/SF2Sample.js,bin/com/sun/media/sound/SF2Soundbank.js,bin/com/sun/media/sound/SF2SoundbankReader.js,bin/com/sun/media/sound/SimpleInstrument.js,bin/com/sun/media/sound/SimpleSoundbank.js,bin/com/sun/media/sound/SoftAbstractResampler.js,bin/com/sun/media/sound/SoftAudioBuffer.js,bin/com/sun/media/sound/SoftAudioProcessor.js,bin/com/sun/media/sound/SoftAudioPusher.js,bin/com/sun/media/sound/SoftChannel.js,bin/com/sun/media/sound/SoftChannelProxy.js,bin/com/sun/media/sound/SoftChorus.js,bin/com/sun/media/sound/SoftControl.js,bin/com/sun/media/sound/SoftCubicResampler.js,bin/com/sun/media/sound/SoftEnvelopeGenerator.js,bin/com/sun/media/sound/SoftFilter.js,bin/com/sun/media/sound/SoftInstrument.js,bin/com/sun/media/sound/SoftJitterCorrector.js,bin/com/sun/media/sound/SoftLanczosResampler.js,bin/com/sun/media/sound/SoftLimiter.js,bin/com/sun/media/sound/SoftLinearResampler.js,bin/com/sun/media/sound/SoftLinearResampler2.js,bin/com/sun/media/sound/SoftLowFrequencyOscillator.js,bin/com/sun/media/sound/SoftMainMixer.js,bin/com/sun/media/sound/SoftMidiAudioFileReader.js,bin/com/sun/media/sound/SoftMixingClip.js,bin/com/sun/media/sound/SoftMixingDataLine.js,bin/com/sun/media/sound/SoftMixingMainMixer.js,bin/com/sun/media/sound/SoftMixingMixer.js,bin/com/sun/media/sound/SoftMixingMixerProvider.js,bin/com/sun/media/sound/SoftMixingSourceDataLine.js,bin/com/sun/media/sound/SoftPerformer.js,bin/com/sun/media/sound/SoftPointResampler.js,bin/com/sun/media/sound/SoftProcess.js,bin/com/sun/media/sound/SoftProvider.js,bin/com/sun/media/sound/SoftReceiver.js,bin/com/sun/media/sound/SoftResampler.js,bin/com/sun/media/sound/SoftResamplerStreamer.js,bin/com/sun/media/sound/SoftReverb.js,bin/com/sun/media/sound/SoftShortMessage.js,bin/com/sun/media/sound/SoftSincResampler.js,bin/com/sun/media/sound/SoftSynthesizer.js,bin/com/sun/media/sound/SoftTuning.js,bin/com/sun/media/sound/SoftVoice.js,bin/com/sun/media/sound/StandardMidiFileReader.js,bin/com/sun/media/sound/StandardMidiFileWriter.js,bin/com/sun/media/sound/SunCodec.js,bin/com/sun/media/sound/SunFileReader.js,bin/com/sun/media/sound/SunFileWriter.js,bin/com/sun/media/sound/Toolkit.js,bin/com/sun/media/sound/UlawCodec.js,bin/com/sun/media/sound/WaveExtensibleFileReader.js,bin/com/sun/media/sound/WaveFileFormat.js,bin/com/sun/media/sound/WaveFileReader.js,bin/com/sun/media/sound/WaveFileWriter.js,bin/com/sun/media/sound/WaveFloatFileReader.js,bin/com/sun/media/sound/WaveFloatFileWriter.js,bin/com/sun/naming/internal/FactoryEnumeration.js,bin/com/sun/naming/internal/NamedWeakReference.js,bin/com/sun/naming/internal/ResourceManager.js,bin/com/sun/naming/internal/VersionHelper.js,bin/com/sun/naming/internal/VersionHelper12.js,bin/com/sun/net/httpserver/Authenticator.js,bin/com/sun/net/httpserver/BasicAuthenticator.js,bin/com/sun/net/httpserver/Filter.js,bin/com/sun/net/httpserver/Headers.js,bin/com/sun/net/httpserver/HttpContext.js,bin/com/sun/net/httpserver/HttpExchange.js,bin/com/sun/net/httpserver/HttpHandler.js,bin/com/sun/net/httpserver/HttpPrincipal.js,bin/com/sun/net/httpserver/HttpServer.js,bin/com/sun/net/httpserver/HttpsConfigurator.js,bin/com/sun/net/httpserver/HttpsExchange.js,bin/com/sun/net/httpserver/HttpsParameters.js,bin/com/sun/net/httpserver/HttpsServer.js,bin/com/sun/net/httpserver/package-info.js,bin/com/sun/net/httpserver/spi/HttpServerProvider.js,bin/com/sun/net/httpserver/spi/package-info.js,bin/com/sun/net/ssl/HostnameVerifier.js,bin/com/sun/net/ssl/HttpsURLConnection.js,bin/com/sun/net/ssl/KeyManager.js,bin/com/sun/net/ssl/KeyManagerFactory.js,bin/com/sun/net/ssl/KeyManagerFactorySpi.js,bin/com/sun/net/ssl/SSLContext.js,bin/com/sun/net/ssl/SSLContextSpi.js,bin/com/sun/net/ssl/SSLPermission.js,bin/com/sun/net/ssl/SSLSecurity.js,bin/com/sun/net/ssl/TrustManager.js,bin/com/sun/net/ssl/TrustManagerFactory.js,bin/com/sun/net/ssl/TrustManagerFactorySpi.js,bin/com/sun/net/ssl/X509KeyManager.js,bin/com/sun/net/ssl/X509TrustManager.js,bin/com/sun/net/ssl/internal/ssl/Provider.js,bin/com/sun/net/ssl/internal/ssl/X509ExtendedTrustManager.js,bin/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.js,bin/com/sun/net/ssl/internal/www/protocol/https/Handler.js,bin/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.js,bin/com/sun/org/apache/xml/internal/security/Init.js,bin/com/sun/org/apache/xml/internal/security/algorithms/Algorithm.js,bin/com/sun/org/apache/xml/internal/security/algorithms/ClassLoaderUtils.js,bin/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.js,bin/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.js,bin/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.js,bin/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.js,bin/com/sun/org/apache/xml/internal/security/c14n/CanonicalizationException.js,bin/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.js,bin/com/sun/org/apache/xml/internal/security/c14n/CanonicalizerSpi.js,bin/com/sun/org/apache/xml/internal/security/c14n/InvalidCanonicalizerException.js,bin/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.js,bin/com/sun/org/apache/xml/internal/security/c14n/helper/C14nHelper.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/UtfHelpper.js,bin/com/sun/org/apache/xml/internal/security/encryption/AgreementMethod.js,bin/com/sun/org/apache/xml/internal/security/encryption/CipherData.js,bin/com/sun/org/apache/xml/internal/security/encryption/CipherReference.js,bin/com/sun/org/apache/xml/internal/security/encryption/CipherValue.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptedData.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptedKey.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptedType.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptionMethod.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptionProperties.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptionProperty.js,bin/com/sun/org/apache/xml/internal/security/encryption/Reference.js,bin/com/sun/org/apache/xml/internal/security/encryption/ReferenceList.js,bin/com/sun/org/apache/xml/internal/security/encryption/Transforms.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLCipherInput.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLCipherParameters.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLEncryptionException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/AlgorithmAlreadyRegisteredException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/Base64DecodingException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityRuntimeException.js,bin/com/sun/org/apache/xml/internal/security/keys/ContentHandlerAlreadyRegisteredException.js,bin/com/sun/org/apache/xml/internal/security/keys/KeyInfo.js,bin/com/sun/org/apache/xml/internal/security/keys/KeyUtils.js,bin/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoContent.js,bin/com/sun/org/apache/xml/internal/security/keys/content/KeyName.js,bin/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.js,bin/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.js,bin/com/sun/org/apache/xml/internal/security/keys/content/PGPData.js,bin/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.js,bin/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.js,bin/com/sun/org/apache/xml/internal/security/keys/content/X509Data.js,bin/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.js,bin/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/KeyValueContent.js,bin/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509DataContent.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/InvalidKeyResolverException.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverException.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverSpi.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/DSAKeyValueResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/EncryptedKeyResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509IssuerSerialResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverException.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverSpi.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/implementations/CertsInFilesystemDirectoryResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.js,bin/com/sun/org/apache/xml/internal/security/signature/InvalidDigestValueException.js,bin/com/sun/org/apache/xml/internal/security/signature/InvalidSignatureValueException.js,bin/com/sun/org/apache/xml/internal/security/signature/Manifest.js,bin/com/sun/org/apache/xml/internal/security/signature/MissingResourceFailureException.js,bin/com/sun/org/apache/xml/internal/security/signature/NodeFilter.js,bin/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.js,bin/com/sun/org/apache/xml/internal/security/signature/Reference.js,bin/com/sun/org/apache/xml/internal/security/signature/ReferenceNotInitializedException.js,bin/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.js,bin/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.js,bin/com/sun/org/apache/xml/internal/security/signature/SignedInfo.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignature.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignatureException.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInputDebugger.js,bin/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderUtils.js,bin/com/sun/org/apache/xml/internal/security/transforms/InvalidTransformException.js,bin/com/sun/org/apache/xml/internal/security/transforms/Transform.js,bin/com/sun/org/apache/xml/internal/security/transforms/TransformParam.js,bin/com/sun/org/apache/xml/internal/security/transforms/TransformSpi.js,bin/com/sun/org/apache/xml/internal/security/transforms/TransformationException.js,bin/com/sun/org/apache/xml/internal/security/transforms/Transforms.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHereContext.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformBase64Decode.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11_WithComments.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusive.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NWithComments.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformEnvelopedSignature.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath2Filter.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPointer.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXSLT.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/InclusiveNamespaces.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer04.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPathContainer.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPathFilterCHGPContainer.js,bin/com/sun/org/apache/xml/internal/security/utils/Base64.js,bin/com/sun/org/apache/xml/internal/security/utils/CachedXPathAPIHolder.js,bin/com/sun/org/apache/xml/internal/security/utils/CachedXPathFuncHereAPI.js,bin/com/sun/org/apache/xml/internal/security/utils/Constants.js,bin/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/ElementChecker.js,bin/com/sun/org/apache/xml/internal/security/utils/ElementCheckerImpl.js,bin/com/sun/org/apache/xml/internal/security/utils/ElementProxy.js,bin/com/sun/org/apache/xml/internal/security/utils/EncryptionConstants.js,bin/com/sun/org/apache/xml/internal/security/utils/EncryptionElementProxy.js,bin/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.js,bin/com/sun/org/apache/xml/internal/security/utils/I18n.js,bin/com/sun/org/apache/xml/internal/security/utils/IdResolver.js,bin/com/sun/org/apache/xml/internal/security/utils/IgnoreAllErrorHandler.js,bin/com/sun/org/apache/xml/internal/security/utils/JavaUtils.js,bin/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.js,bin/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.js,bin/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/UnsyncBufferedOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/XMLUtils.js,bin/com/sun/org/apache/xml/internal/security/utils/XPathFuncHereAPI.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverException.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverSpi.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverAnonymous.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.js,bin/com/sun/pept/Delegate.js,bin/com/sun/pept/encoding/Decoder.js,bin/com/sun/pept/encoding/Encoder.js,bin/com/sun/pept/ept/Acceptor.js,bin/com/sun/pept/ept/ContactInfo.js,bin/com/sun/pept/ept/ContactInfoList.js,bin/com/sun/pept/ept/ContactInfoListIterator.js,bin/com/sun/pept/ept/EPTFactory.js,bin/com/sun/pept/ept/MessageInfo.js,bin/com/sun/pept/presentation/MessageStruct.js,bin/com/sun/pept/presentation/Stub.js,bin/com/sun/pept/presentation/TargetFinder.js,bin/com/sun/pept/presentation/Tie.js,bin/com/sun/pept/protocol/Interceptors.js,bin/com/sun/pept/protocol/MessageDispatcher.js,bin/com/sun/pept/transport/Connection.js,bin/com/sun/rmi/rmid/ExecOptionPermission.js,bin/com/sun/rmi/rmid/ExecPermission.js,bin/com/sun/rowset/CachedRowSetImpl.js,bin/com/sun/rowset/FilteredRowSetImpl.js,bin/com/sun/rowset/JdbcRowSetImpl.js,bin/com/sun/rowset/JdbcRowSetResourceBundle.js,bin/com/sun/rowset/JoinRowSetImpl.js,bin/com/sun/rowset/WebRowSetImpl.js,bin/com/sun/rowset/internal/BaseRow.js,bin/com/sun/rowset/internal/CachedRowSetReader.js,bin/com/sun/rowset/internal/CachedRowSetWriter.js,bin/com/sun/rowset/internal/InsertRow.js,bin/com/sun/rowset/internal/Row.js,bin/com/sun/rowset/internal/SyncResolverImpl.js,bin/com/sun/rowset/internal/WebRowSetXmlReader.js,bin/com/sun/rowset/internal/WebRowSetXmlWriter.js,bin/com/sun/rowset/internal/XmlErrorHandler.js,bin/com/sun/rowset/internal/XmlReaderContentHandler.js,bin/com/sun/rowset/internal/XmlResolver.js,bin/com/sun/rowset/providers/RIOptimisticProvider.js,bin/com/sun/rowset/providers/RIXMLProvider.js,bin/com/sun/script/javascript/ExternalScriptable.js,bin/com/sun/script/javascript/JSAdapter.js,bin/com/sun/script/javascript/JavaAdapter.js,bin/com/sun/script/javascript/RhinoClassShutter.js,bin/com/sun/script/javascript/RhinoCompiledScript.js,bin/com/sun/script/javascript/RhinoScriptEngine.js,bin/com/sun/script/javascript/RhinoScriptEngineFactory.js,bin/com/sun/script/javascript/RhinoTopLevel.js,bin/com/sun/script/javascript/RhinoWrapFactory.js,bin/com/sun/script/util/BindingsBase.js,bin/com/sun/script/util/BindingsEntrySet.js,bin/com/sun/script/util/BindingsImpl.js,bin/com/sun/script/util/InterfaceImplementor.js,bin/com/sun/script/util/ScriptEngineFactoryBase.js,bin/com/sun/security/auth/LdapPrincipal.js,bin/com/sun/security/auth/NTDomainPrincipal.js,bin/com/sun/security/auth/NTNumericCredential.js,bin/com/sun/security/auth/NTSid.js,bin/com/sun/security/auth/NTSidDomainPrincipal.js,bin/com/sun/security/auth/NTSidGroupPrincipal.js,bin/com/sun/security/auth/NTSidPrimaryGroupPrincipal.js,bin/com/sun/security/auth/NTSidUserPrincipal.js,bin/com/sun/security/auth/NTUserPrincipal.js,bin/com/sun/security/auth/PolicyFile.js,bin/com/sun/security/auth/PolicyParser.js,bin/com/sun/security/auth/PrincipalComparator.js,bin/com/sun/security/auth/SolarisNumericGroupPrincipal.js,bin/com/sun/security/auth/SolarisNumericUserPrincipal.js,bin/com/sun/security/auth/SolarisPrincipal.js,bin/com/sun/security/auth/SubjectCodeSource.js,bin/com/sun/security/auth/UnixNumericGroupPrincipal.js,bin/com/sun/security/auth/UnixNumericUserPrincipal.js,bin/com/sun/security/auth/UnixPrincipal.js,bin/com/sun/security/auth/UserPrincipal.js,bin/com/sun/security/auth/X500Principal.js,bin/com/sun/security/auth/callback/DialogCallbackHandler.js,bin/com/sun/security/auth/callback/TextCallbackHandler.js,bin/com/sun/security/auth/login/ConfigFile.js,bin/com/sun/security/auth/module/Crypt.js,bin/com/sun/security/auth/module/JndiLoginModule.js,bin/com/sun/security/auth/module/KeyStoreLoginModule.js,bin/com/sun/security/auth/module/Krb5LoginModule.js,bin/com/sun/security/auth/module/LdapLoginModule.js,bin/com/sun/security/auth/module/NTLoginModule.js,bin/com/sun/security/auth/module/NTSystem.js,bin/com/sun/security/auth/module/SolarisLoginModule.js,bin/com/sun/security/auth/module/SolarisSystem.js,bin/com/sun/security/auth/module/UnixLoginModule.js,bin/com/sun/security/auth/module/UnixSystem.js,bin/com/sun/security/cert/internal/x509/X509V1CertImpl.js,bin/com/sun/security/jgss/GSSUtil.js,bin/com/sun/security/sasl/ClientFactoryImpl.js,bin/com/sun/security/sasl/CramMD5Base.js,bin/com/sun/security/sasl/CramMD5Client.js,bin/com/sun/security/sasl/CramMD5Server.js,bin/com/sun/security/sasl/ExternalClient.js,bin/com/sun/security/sasl/PlainClient.js,bin/com/sun/security/sasl/Provider.js,bin/com/sun/security/sasl/ServerFactoryImpl.js,bin/com/sun/security/sasl/digest/DigestMD5Base.js,bin/com/sun/security/sasl/digest/DigestMD5Client.js,bin/com/sun/security/sasl/digest/DigestMD5Server.js,bin/com/sun/security/sasl/digest/FactoryImpl.js,bin/com/sun/security/sasl/digest/SecurityCtx.js,bin/com/sun/security/sasl/gsskerb/FactoryImpl.js,bin/com/sun/security/sasl/gsskerb/GssKrb5Base.js,bin/com/sun/security/sasl/gsskerb/GssKrb5Client.js,bin/com/sun/security/sasl/gsskerb/GssKrb5Server.js,bin/com/sun/security/sasl/util/AbstractSaslImpl.js,bin/com/sun/security/sasl/util/PolicyUtils.js,bin/com/sun/tools/attach/AgentInitializationException.js,bin/com/sun/tools/attach/AgentLoadException.js,bin/com/sun/tools/attach/AttachNotSupportedException.js,bin/com/sun/tools/attach/AttachPermission.js,bin/com/sun/tools/attach/VirtualMachine.js,bin/com/sun/tools/attach/VirtualMachineDescriptor.js,bin/com/sun/tools/attach/spi/AttachProvider.js,bin/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.js,bin/com/sun/tools/example/debug/bdi/AmbiguousMethodException.js,bin/com/sun/tools/example/debug/bdi/BreakpointSpec.js,bin/com/sun/tools/example/debug/bdi/ChildSession.js,bin/com/sun/tools/example/debug/bdi/EvaluationException.js,bin/com/sun/tools/example/debug/bdi/EventRequestSpec.js,bin/com/sun/tools/example/debug/bdi/EventRequestSpecList.js,bin/com/sun/tools/example/debug/bdi/ExceptionSpec.js,bin/com/sun/tools/example/debug/bdi/ExecutionManager.js,bin/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.js,bin/com/sun/tools/example/debug/bdi/InputListener.js,bin/com/sun/tools/example/debug/bdi/JDIEventSource.js,bin/com/sun/tools/example/debug/bdi/LineBreakpointSpec.js,bin/com/sun/tools/example/debug/bdi/LineNotFoundException.js,bin/com/sun/tools/example/debug/bdi/MalformedMemberNameException.js,bin/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.js,bin/com/sun/tools/example/debug/bdi/MethodNotFoundException.js,bin/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.js,bin/com/sun/tools/example/debug/bdi/NoSessionException.js,bin/com/sun/tools/example/debug/bdi/NoThreadException.js,bin/com/sun/tools/example/debug/bdi/OutputListener.js,bin/com/sun/tools/example/debug/bdi/ParseException.js,bin/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.js,bin/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.js,bin/com/sun/tools/example/debug/bdi/Session.js,bin/com/sun/tools/example/debug/bdi/SessionListener.js,bin/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.js,bin/com/sun/tools/example/debug/bdi/SpecErrorEvent.js,bin/com/sun/tools/example/debug/bdi/SpecEvent.js,bin/com/sun/tools/example/debug/bdi/SpecListener.js,bin/com/sun/tools/example/debug/bdi/ThreadGroupIterator.js,bin/com/sun/tools/example/debug/bdi/ThreadInfo.js,bin/com/sun/tools/example/debug/bdi/ThreadIterator.js,bin/com/sun/tools/example/debug/bdi/Utils.js,bin/com/sun/tools/example/debug/bdi/VMLaunchFailureException.js,bin/com/sun/tools/example/debug/bdi/VMNotInterruptedException.js,bin/com/sun/tools/example/debug/bdi/WatchpointSpec.js,bin/com/sun/tools/example/debug/event/AbstractEventSet.js,bin/com/sun/tools/example/debug/event/AccessWatchpointEventSet.js,bin/com/sun/tools/example/debug/event/ClassPrepareEventSet.js,bin/com/sun/tools/example/debug/event/ClassUnloadEventSet.js,bin/com/sun/tools/example/debug/event/ExceptionEventSet.js,bin/com/sun/tools/example/debug/event/JDIAdapter.js,bin/com/sun/tools/example/debug/event/JDIListener.js,bin/com/sun/tools/example/debug/event/LocatableEventSet.js,bin/com/sun/tools/example/debug/event/LocationTriggerEventSet.js,bin/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.js,bin/com/sun/tools/example/debug/event/ThreadDeathEventSet.js,bin/com/sun/tools/example/debug/event/ThreadStartEventSet.js,bin/com/sun/tools/example/debug/event/VMDeathEventSet.js,bin/com/sun/tools/example/debug/event/VMDisconnectEventSet.js,bin/com/sun/tools/example/debug/event/VMStartEventSet.js,bin/com/sun/tools/example/debug/event/WatchpointEventSet.js,bin/com/sun/tools/example/debug/expr/ASCII_UCodeESC_CharStream.js,bin/com/sun/tools/example/debug/expr/ExpressionParser.js,bin/com/sun/tools/example/debug/expr/ExpressionParserConstants.js,bin/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.js,bin/com/sun/tools/example/debug/expr/LValue.js,bin/com/sun/tools/example/debug/expr/ParseException.js,bin/com/sun/tools/example/debug/expr/Token.js,bin/com/sun/tools/example/debug/expr/TokenMgrError.js,bin/com/sun/tools/example/debug/gui/ApplicationTool.js,bin/com/sun/tools/example/debug/gui/ClassManager.js,bin/com/sun/tools/example/debug/gui/ClassTreeTool.js,bin/com/sun/tools/example/debug/gui/CommandInterpreter.js,bin/com/sun/tools/example/debug/gui/CommandTool.js,bin/com/sun/tools/example/debug/gui/ContextListener.js,bin/com/sun/tools/example/debug/gui/ContextManager.js,bin/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.js,bin/com/sun/tools/example/debug/gui/Environment.js,bin/com/sun/tools/example/debug/gui/GUI.js,bin/com/sun/tools/example/debug/gui/Icons.js,bin/com/sun/tools/example/debug/gui/JDBFileFilter.js,bin/com/sun/tools/example/debug/gui/JDBMenuBar.js,bin/com/sun/tools/example/debug/gui/JDBToolBar.js,bin/com/sun/tools/example/debug/gui/LaunchTool.js,bin/com/sun/tools/example/debug/gui/MonitorListModel.js,bin/com/sun/tools/example/debug/gui/MonitorTool.js,bin/com/sun/tools/example/debug/gui/OutputSink.js,bin/com/sun/tools/example/debug/gui/SearchPath.js,bin/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.js,bin/com/sun/tools/example/debug/gui/SourceListener.js,bin/com/sun/tools/example/debug/gui/SourceManager.js,bin/com/sun/tools/example/debug/gui/SourceModel.js,bin/com/sun/tools/example/debug/gui/SourceTool.js,bin/com/sun/tools/example/debug/gui/SourceTreeTool.js,bin/com/sun/tools/example/debug/gui/SourcepathChangedEvent.js,bin/com/sun/tools/example/debug/gui/StackTraceTool.js,bin/com/sun/tools/example/debug/gui/ThreadTreeTool.js,bin/com/sun/tools/example/debug/gui/TypeScript.js,bin/com/sun/tools/example/debug/gui/TypeScriptOutputListener.js,bin/com/sun/tools/example/debug/gui/TypeScriptWriter.js,bin/com/sun/tools/example/debug/tty/AccessWatchpointSpec.js,bin/com/sun/tools/example/debug/tty/AmbiguousMethodException.js,bin/com/sun/tools/example/debug/tty/BreakpointSpec.js,bin/com/sun/tools/example/debug/tty/Commands.js,bin/com/sun/tools/example/debug/tty/Env.js,bin/com/sun/tools/example/debug/tty/EventHandler.js,bin/com/sun/tools/example/debug/tty/EventNotifier.js,bin/com/sun/tools/example/debug/tty/EventRequestSpec.js,bin/com/sun/tools/example/debug/tty/EventRequestSpecList.js,bin/com/sun/tools/example/debug/tty/ExceptionSpec.js,bin/com/sun/tools/example/debug/tty/LineNotFoundException.js,bin/com/sun/tools/example/debug/tty/MalformedMemberNameException.js,bin/com/sun/tools/example/debug/tty/MessageOutput.js,bin/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.js,bin/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.js,bin/com/sun/tools/example/debug/tty/ReferenceTypeSpec.js,bin/com/sun/tools/example/debug/tty/SourceMapper.js,bin/com/sun/tools/example/debug/tty/TTY.js,bin/com/sun/tools/example/debug/tty/TTYResources.js,bin/com/sun/tools/example/debug/tty/TTYResources_ja.js,bin/com/sun/tools/example/debug/tty/TTYResources_zh_CN.js,bin/com/sun/tools/example/debug/tty/ThreadGroupIterator.js,bin/com/sun/tools/example/debug/tty/ThreadInfo.js,bin/com/sun/tools/example/debug/tty/ThreadIterator.js,bin/com/sun/tools/example/debug/tty/VMConnection.js,bin/com/sun/tools/example/debug/tty/VMNotConnectedException.js,bin/com/sun/tools/example/debug/tty/WatchpointSpec.js,bin/com/sun/tools/example/trace/EventThread.js,bin/com/sun/tools/example/trace/StreamRedirectThread.js,bin/com/sun/tools/example/trace/Trace.js,bin/com/sun/tools/extcheck/ExtCheck.js,bin/com/sun/tools/extcheck/Main.js,bin/com/sun/tools/hat/Main.js,bin/com/sun/tools/hat/internal/model/AbstractJavaHeapObjectVisitor.js,bin/com/sun/tools/hat/internal/model/ArrayTypeCodes.js,bin/com/sun/tools/hat/internal/model/HackJavaValue.js,bin/com/sun/tools/hat/internal/model/JavaBoolean.js,bin/com/sun/tools/hat/internal/model/JavaByte.js,bin/com/sun/tools/hat/internal/model/JavaChar.js,bin/com/sun/tools/hat/internal/model/JavaClass.js,bin/com/sun/tools/hat/internal/model/JavaDouble.js,bin/com/sun/tools/hat/internal/model/JavaField.js,bin/com/sun/tools/hat/internal/model/JavaFloat.js,bin/com/sun/tools/hat/internal/model/JavaHeapObject.js,bin/com/sun/tools/hat/internal/model/JavaHeapObjectVisitor.js,bin/com/sun/tools/hat/internal/model/JavaInt.js,bin/com/sun/tools/hat/internal/model/JavaLazyReadObject.js,bin/com/sun/tools/hat/internal/model/JavaLong.js,bin/com/sun/tools/hat/internal/model/JavaObject.js,bin/com/sun/tools/hat/internal/model/JavaObjectArray.js,bin/com/sun/tools/hat/internal/model/JavaObjectRef.js,bin/com/sun/tools/hat/internal/model/JavaShort.js,bin/com/sun/tools/hat/internal/model/JavaStatic.js,bin/com/sun/tools/hat/internal/model/JavaThing.js,bin/com/sun/tools/hat/internal/model/JavaValue.js,bin/com/sun/tools/hat/internal/model/JavaValueArray.js,bin/com/sun/tools/hat/internal/model/ReachableExcludes.js,bin/com/sun/tools/hat/internal/model/ReachableExcludesImpl.js,bin/com/sun/tools/hat/internal/model/ReachableObjects.js,bin/com/sun/tools/hat/internal/model/ReferenceChain.js,bin/com/sun/tools/hat/internal/model/Root.js,bin/com/sun/tools/hat/internal/model/Snapshot.js,bin/com/sun/tools/hat/internal/model/StackFrame.js,bin/com/sun/tools/hat/internal/model/StackTrace.js,bin/com/sun/tools/hat/internal/oql/OQLEngine.js,bin/com/sun/tools/hat/internal/oql/OQLException.js,bin/com/sun/tools/hat/internal/oql/OQLQuery.js,bin/com/sun/tools/hat/internal/oql/ObjectVisitor.js,bin/com/sun/tools/hat/internal/parser/FileReadBuffer.js,bin/com/sun/tools/hat/internal/parser/HprofReader.js,bin/com/sun/tools/hat/internal/parser/MappedReadBuffer.js,bin/com/sun/tools/hat/internal/parser/PositionDataInputStream.js,bin/com/sun/tools/hat/internal/parser/PositionInputStream.js,bin/com/sun/tools/hat/internal/parser/ReadBuffer.js,bin/com/sun/tools/hat/internal/parser/Reader.js,bin/com/sun/tools/hat/internal/server/AllClassesQuery.js,bin/com/sun/tools/hat/internal/server/AllRootsQuery.js,bin/com/sun/tools/hat/internal/server/ClassQuery.js,bin/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.js,bin/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.js,bin/com/sun/tools/hat/internal/server/HistogramQuery.js,bin/com/sun/tools/hat/internal/server/HttpReader.js,bin/com/sun/tools/hat/internal/server/InstancesCountQuery.js,bin/com/sun/tools/hat/internal/server/InstancesQuery.js,bin/com/sun/tools/hat/internal/server/OQLHelp.js,bin/com/sun/tools/hat/internal/server/OQLQuery.js,bin/com/sun/tools/hat/internal/server/ObjectQuery.js,bin/com/sun/tools/hat/internal/server/PlatformClasses.js,bin/com/sun/tools/hat/internal/server/QueryHandler.js,bin/com/sun/tools/hat/internal/server/QueryListener.js,bin/com/sun/tools/hat/internal/server/ReachableQuery.js,bin/com/sun/tools/hat/internal/server/RefsByTypeQuery.js,bin/com/sun/tools/hat/internal/server/RootStackQuery.js,bin/com/sun/tools/hat/internal/server/RootsQuery.js,bin/com/sun/tools/hat/internal/util/ArraySorter.js,bin/com/sun/tools/hat/internal/util/Comparer.js,bin/com/sun/tools/hat/internal/util/CompositeEnumeration.js,bin/com/sun/tools/hat/internal/util/Misc.js,bin/com/sun/tools/hat/internal/util/VectorSorter.js,bin/com/sun/tools/jconsole/JConsoleContext.js,bin/com/sun/tools/jconsole/JConsolePlugin.js,bin/com/sun/tools/jdi/AbstractLauncher.js,bin/com/sun/tools/jdi/ArrayReferenceImpl.js,bin/com/sun/tools/jdi/ArrayTypeImpl.js,bin/com/sun/tools/jdi/BaseLineInfo.js,bin/com/sun/tools/jdi/BooleanTypeImpl.js,bin/com/sun/tools/jdi/BooleanValueImpl.js,bin/com/sun/tools/jdi/ByteTypeImpl.js,bin/com/sun/tools/jdi/ByteValueImpl.js,bin/com/sun/tools/jdi/CharTypeImpl.js,bin/com/sun/tools/jdi/CharValueImpl.js,bin/com/sun/tools/jdi/ClassLoaderReferenceImpl.js,bin/com/sun/tools/jdi/ClassObjectReferenceImpl.js,bin/com/sun/tools/jdi/ClassTypeImpl.js,bin/com/sun/tools/jdi/CommandSender.js,bin/com/sun/tools/jdi/ConcreteMethodImpl.js,bin/com/sun/tools/jdi/ConnectorImpl.js,bin/com/sun/tools/jdi/DoubleTypeImpl.js,bin/com/sun/tools/jdi/DoubleValueImpl.js,bin/com/sun/tools/jdi/EventQueueImpl.js,bin/com/sun/tools/jdi/EventRequestManagerImpl.js,bin/com/sun/tools/jdi/EventSetImpl.js,bin/com/sun/tools/jdi/FieldImpl.js,bin/com/sun/tools/jdi/FloatTypeImpl.js,bin/com/sun/tools/jdi/FloatValueImpl.js,bin/com/sun/tools/jdi/GenericAttachingConnector.js,bin/com/sun/tools/jdi/GenericListeningConnector.js,bin/com/sun/tools/jdi/IntegerTypeImpl.js,bin/com/sun/tools/jdi/IntegerValueImpl.js,bin/com/sun/tools/jdi/InterfaceTypeImpl.js,bin/com/sun/tools/jdi/InternalEventHandler.js,bin/com/sun/tools/jdi/JDWPException.js,bin/com/sun/tools/jdi/JNITypeParser.js,bin/com/sun/tools/jdi/LineInfo.js,bin/com/sun/tools/jdi/LinkedHashMap.js,bin/com/sun/tools/jdi/LocalVariableImpl.js,bin/com/sun/tools/jdi/LocationImpl.js,bin/com/sun/tools/jdi/LockObject.js,bin/com/sun/tools/jdi/LongTypeImpl.js,bin/com/sun/tools/jdi/LongValueImpl.js,bin/com/sun/tools/jdi/MethodImpl.js,bin/com/sun/tools/jdi/MirrorImpl.js,bin/com/sun/tools/jdi/MonitorInfoImpl.js,bin/com/sun/tools/jdi/NonConcreteMethodImpl.js,bin/com/sun/tools/jdi/ObjectReferenceImpl.js,bin/com/sun/tools/jdi/ObsoleteMethodImpl.js,bin/com/sun/tools/jdi/Packet.js,bin/com/sun/tools/jdi/PacketStream.js,bin/com/sun/tools/jdi/PrimitiveTypeImpl.js,bin/com/sun/tools/jdi/PrimitiveValueImpl.js,bin/com/sun/tools/jdi/ProcessAttachingConnector.js,bin/com/sun/tools/jdi/RawCommandLineLauncher.js,bin/com/sun/tools/jdi/ReferenceTypeImpl.js,bin/com/sun/tools/jdi/SDE.js,bin/com/sun/tools/jdi/ShortTypeImpl.js,bin/com/sun/tools/jdi/ShortValueImpl.js,bin/com/sun/tools/jdi/SocketAttachingConnector.js,bin/com/sun/tools/jdi/SocketListeningConnector.js,bin/com/sun/tools/jdi/SocketTransportService.js,bin/com/sun/tools/jdi/StackFrameImpl.js,bin/com/sun/tools/jdi/StratumLineInfo.js,bin/com/sun/tools/jdi/StringReferenceImpl.js,bin/com/sun/tools/jdi/SunCommandLineLauncher.js,bin/com/sun/tools/jdi/TargetVM.js,bin/com/sun/tools/jdi/ThreadAction.js,bin/com/sun/tools/jdi/ThreadGroupReferenceImpl.js,bin/com/sun/tools/jdi/ThreadListener.js,bin/com/sun/tools/jdi/ThreadReferenceImpl.js,bin/com/sun/tools/jdi/TypeComponentImpl.js,bin/com/sun/tools/jdi/TypeImpl.js,bin/com/sun/tools/jdi/VMAction.js,bin/com/sun/tools/jdi/VMListener.js,bin/com/sun/tools/jdi/VMModifiers.js,bin/com/sun/tools/jdi/VMState.js,bin/com/sun/tools/jdi/ValueContainer.js,bin/com/sun/tools/jdi/ValueImpl.js,bin/com/sun/tools/jdi/VirtualMachineImpl.js,bin/com/sun/tools/jdi/VirtualMachineManagerImpl.js,bin/com/sun/tools/jdi/VirtualMachineManagerService.js,bin/com/sun/tools/jdi/VoidTypeImpl.js,bin/com/sun/tools/jdi/VoidValueImpl.js,bin/com/sun/tools/script/shell/Main.js,bin/java/applet/Applet.js,bin/java/applet/AppletContext.js,bin/java/applet/AppletStub.js,bin/java/applet/AudioClip.js,bin/java/awt/AWTError.js,bin/java/awt/AWTEvent.js,bin/java/awt/AWTEventMulticaster.js,bin/java/awt/AWTException.js,bin/java/awt/AWTKeyStroke.js,bin/java/awt/AWTPermission.js,bin/java/awt/ActiveEvent.js,bin/java/awt/Adjustable.js,bin/java/awt/AlphaComposite.js,bin/java/awt/AttributeValue.js,bin/java/awt/BasicStroke.js,bin/java/awt/BorderLayout.js,bin/java/awt/BufferCapabilities.js,bin/java/awt/Button.js,bin/java/awt/Canvas.js,bin/java/awt/CardLayout.js,bin/java/awt/Checkbox.js,bin/java/awt/CheckboxGroup.js,bin/java/awt/CheckboxMenuItem.js,bin/java/awt/Choice.js,bin/java/awt/Color.js,bin/java/awt/ColorPaintContext.js,bin/java/awt/Component.js,bin/java/awt/ComponentOrientation.js,bin/java/awt/Composite.js,bin/java/awt/CompositeContext.js,bin/java/awt/Conditional.js,bin/java/awt/Container.js,bin/java/awt/ContainerOrderFocusTraversalPolicy.js,bin/java/awt/Cursor.js,bin/java/awt/DefaultFocusTraversalPolicy.js,bin/java/awt/DefaultKeyboardFocusManager.js,bin/java/awt/Desktop.js,bin/java/awt/Dialog.js,bin/java/awt/Dimension.js,bin/java/awt/DisplayMode.js,bin/java/awt/Event.js,bin/java/awt/EventDispatchThread.js,bin/java/awt/EventFilter.js,bin/java/awt/EventQueue.js,bin/java/awt/FileDialog.js,bin/java/awt/FlowLayout.js,bin/java/awt/FocusTraversalPolicy.js,bin/java/awt/Font.js,bin/java/awt/FontFormatException.js,bin/java/awt/FontMetrics.js,bin/java/awt/Frame.js,bin/java/awt/GradientPaint.js,bin/java/awt/GradientPaintContext.js,bin/java/awt/Graphics.js,bin/java/awt/Graphics2D.js,bin/java/awt/GraphicsCallback.js,bin/java/awt/GraphicsConfigTemplate.js,bin/java/awt/GraphicsConfiguration.js,bin/java/awt/GraphicsDevice.js,bin/java/awt/GraphicsEnvironment.js,bin/java/awt/GridBagConstraints.js,bin/java/awt/GridBagLayout.js,bin/java/awt/GridBagLayoutInfo.js,bin/java/awt/GridLayout.js,bin/java/awt/HeadlessException.js,bin/java/awt/IllegalComponentStateException.js,bin/java/awt/Image.js,bin/java/awt/ImageCapabilities.js,bin/java/awt/Insets.js,bin/java/awt/ItemSelectable.js,bin/java/awt/JobAttributes.js,bin/java/awt/KeyEventDispatcher.js,bin/java/awt/KeyEventPostProcessor.js,bin/java/awt/KeyboardFocusManager.js,bin/java/awt/Label.js,bin/java/awt/LayoutManager.js,bin/java/awt/LayoutManager2.js,bin/java/awt/LinearGradientPaint.js,bin/java/awt/LinearGradientPaintContext.js,bin/java/awt/List.js,bin/java/awt/MediaTracker.js,bin/java/awt/Menu.js,bin/java/awt/MenuBar.js,bin/java/awt/MenuComponent.js,bin/java/awt/MenuContainer.js,bin/java/awt/MenuItem.js,bin/java/awt/MenuShortcut.js,bin/java/awt/ModalEventFilter.js,bin/java/awt/MouseInfo.js,bin/java/awt/MultipleGradientPaint.js,bin/java/awt/MultipleGradientPaintContext.js,bin/java/awt/PageAttributes.js,bin/java/awt/Paint.js,bin/java/awt/PaintContext.js,bin/java/awt/Panel.js,bin/java/awt/Point.js,bin/java/awt/PointerInfo.js,bin/java/awt/Polygon.js,bin/java/awt/PopupMenu.js,bin/java/awt/PrintGraphics.js,bin/java/awt/PrintJob.js,bin/java/awt/RadialGradientPaint.js,bin/java/awt/RadialGradientPaintContext.js,bin/java/awt/Rectangle.js,bin/java/awt/RenderingHints.js,bin/java/awt/Robot.js,bin/java/awt/ScrollPane.js,bin/java/awt/ScrollPaneAdjustable.js,bin/java/awt/Scrollbar.js,bin/java/awt/SentEvent.js,bin/java/awt/SequencedEvent.js,bin/java/awt/Shape.js,bin/java/awt/SplashScreen.js,bin/java/awt/Stroke.js,bin/java/awt/SystemColor.js,bin/java/awt/SystemTray.js,bin/java/awt/TextArea.js,bin/java/awt/TextComponent.js,bin/java/awt/TextField.js,bin/java/awt/TexturePaint.js,bin/java/awt/TexturePaintContext.js,bin/java/awt/Toolkit.js,bin/java/awt/Transparency.js,bin/java/awt/TrayIcon.js,bin/java/awt/Window.js,bin/java/awt/color/CMMException.js,bin/java/awt/color/ColorSpace.js,bin/java/awt/color/ICC_ColorSpace.js,bin/java/awt/color/ICC_Profile.js,bin/java/awt/color/ICC_ProfileGray.js,bin/java/awt/color/ICC_ProfileRGB.js,bin/java/awt/color/ProfileDataException.js,bin/java/awt/datatransfer/Clipboard.js,bin/java/awt/datatransfer/ClipboardOwner.js,bin/java/awt/datatransfer/DataFlavor.js,bin/java/awt/datatransfer/FlavorEvent.js,bin/java/awt/datatransfer/FlavorListener.js,bin/java/awt/datatransfer/FlavorMap.js,bin/java/awt/datatransfer/FlavorTable.js,bin/java/awt/datatransfer/MimeType.js,bin/java/awt/datatransfer/MimeTypeParameterList.js,bin/java/awt/datatransfer/MimeTypeParseException.js,bin/java/awt/datatransfer/StringSelection.js,bin/java/awt/datatransfer/SystemFlavorMap.js,bin/java/awt/datatransfer/Transferable.js,bin/java/awt/datatransfer/UnsupportedFlavorException.js,bin/java/awt/dnd/Autoscroll.js,bin/java/awt/dnd/DnDConstants.js,bin/java/awt/dnd/DnDEventMulticaster.js,bin/java/awt/dnd/DragGestureEvent.js,bin/java/awt/dnd/DragGestureListener.js,bin/java/awt/dnd/DragGestureRecognizer.js,bin/java/awt/dnd/DragSource.js,bin/java/awt/dnd/DragSourceAdapter.js,bin/java/awt/dnd/DragSourceContext.js,bin/java/awt/dnd/DragSourceDragEvent.js,bin/java/awt/dnd/DragSourceDropEvent.js,bin/java/awt/dnd/DragSourceEvent.js,bin/java/awt/dnd/DragSourceListener.js,bin/java/awt/dnd/DragSourceMotionListener.js,bin/java/awt/dnd/DropTarget.js,bin/java/awt/dnd/DropTargetAdapter.js,bin/java/awt/dnd/DropTargetContext.js,bin/java/awt/dnd/DropTargetDragEvent.js,bin/java/awt/dnd/DropTargetDropEvent.js,bin/java/awt/dnd/DropTargetEvent.js,bin/java/awt/dnd/DropTargetListener.js,bin/java/awt/dnd/InvalidDnDOperationException.js,bin/java/awt/dnd/MouseDragGestureRecognizer.js,bin/java/awt/dnd/SerializationTester.js,bin/java/awt/dnd/peer/DragSourceContextPeer.js,bin/java/awt/dnd/peer/DropTargetContextPeer.js,bin/java/awt/dnd/peer/DropTargetPeer.js,bin/java/awt/event/AWTEventListener.js,bin/java/awt/event/AWTEventListenerProxy.js,bin/java/awt/event/ActionEvent.js,bin/java/awt/event/ActionListener.js,bin/java/awt/event/AdjustmentEvent.js,bin/java/awt/event/AdjustmentListener.js,bin/java/awt/event/ComponentAdapter.js,bin/java/awt/event/ComponentEvent.js,bin/java/awt/event/ComponentListener.js,bin/java/awt/event/ContainerAdapter.js,bin/java/awt/event/ContainerEvent.js,bin/java/awt/event/ContainerListener.js,bin/java/awt/event/FocusAdapter.js,bin/java/awt/event/FocusEvent.js,bin/java/awt/event/FocusListener.js,bin/java/awt/event/HierarchyBoundsAdapter.js,bin/java/awt/event/HierarchyBoundsListener.js,bin/java/awt/event/HierarchyEvent.js,bin/java/awt/event/HierarchyListener.js,bin/java/awt/event/InputEvent.js,bin/java/awt/event/InputMethodEvent.js,bin/java/awt/event/InputMethodListener.js,bin/java/awt/event/InvocationEvent.js,bin/java/awt/event/ItemEvent.js,bin/java/awt/event/ItemListener.js,bin/java/awt/event/KeyAdapter.js,bin/java/awt/event/KeyEvent.js,bin/java/awt/event/KeyListener.js,bin/java/awt/event/MouseAdapter.js,bin/java/awt/event/MouseEvent.js,bin/java/awt/event/MouseListener.js,bin/java/awt/event/MouseMotionAdapter.js,bin/java/awt/event/MouseMotionListener.js,bin/java/awt/event/MouseWheelEvent.js,bin/java/awt/event/MouseWheelListener.js,bin/java/awt/event/NativeLibLoader.js,bin/java/awt/event/PaintEvent.js,bin/java/awt/event/TextEvent.js,bin/java/awt/event/TextListener.js,bin/java/awt/event/WindowAdapter.js,bin/java/awt/event/WindowEvent.js,bin/java/awt/event/WindowFocusListener.js,bin/java/awt/event/WindowListener.js,bin/java/awt/event/WindowStateListener.js,bin/java/awt/font/CharArrayIterator.js,bin/java/awt/font/FontRenderContext.js,bin/java/awt/font/GlyphJustificationInfo.js,bin/java/awt/font/GlyphMetrics.js,bin/java/awt/font/GlyphVector.js,bin/java/awt/font/GraphicAttribute.js,bin/java/awt/font/ImageGraphicAttribute.js,bin/java/awt/font/LayoutPath.js,bin/java/awt/font/LineBreakMeasurer.js,bin/java/awt/font/LineMetrics.js,bin/java/awt/font/MultipleMaster.js,bin/java/awt/font/NumericShaper.js,bin/java/awt/font/OpenType.js,bin/java/awt/font/ShapeGraphicAttribute.js,bin/java/awt/font/StyledParagraph.js,bin/java/awt/font/TextAttribute.js,bin/java/awt/font/TextHitInfo.js,bin/java/awt/font/TextJustifier.js,bin/java/awt/font/TextLayout.js,bin/java/awt/font/TextLine.js,bin/java/awt/font/TextMeasurer.js,bin/java/awt/font/TransformAttribute.js,bin/java/awt/geom/AffineTransform.js,bin/java/awt/geom/Arc2D.js,bin/java/awt/geom/ArcIterator.js,bin/java/awt/geom/Area.js,bin/java/awt/geom/CubicCurve2D.js,bin/java/awt/geom/CubicIterator.js,bin/java/awt/geom/Dimension2D.js,bin/java/awt/geom/Ellipse2D.js,bin/java/awt/geom/EllipseIterator.js,bin/java/awt/geom/FlatteningPathIterator.js,bin/java/awt/geom/GeneralPath.js,bin/java/awt/geom/IllegalPathStateException.js,bin/java/awt/geom/Line2D.js,bin/java/awt/geom/LineIterator.js,bin/java/awt/geom/NoninvertibleTransformException.js,bin/java/awt/geom/Path2D.js,bin/java/awt/geom/PathIterator.js,bin/java/awt/geom/Point2D.js,bin/java/awt/geom/QuadCurve2D.js,bin/java/awt/geom/QuadIterator.js,bin/java/awt/geom/RectIterator.js,bin/java/awt/geom/Rectangle2D.js,bin/java/awt/geom/RectangularShape.js,bin/java/awt/geom/RoundRectIterator.js,bin/java/awt/geom/RoundRectangle2D.js,bin/java/awt/im/InputContext.js,bin/java/awt/im/InputMethodHighlight.js,bin/java/awt/im/InputMethodRequests.js,bin/java/awt/im/InputSubset.js,bin/java/awt/im/spi/InputMethod.js,bin/java/awt/im/spi/InputMethodContext.js,bin/java/awt/im/spi/InputMethodDescriptor.js,bin/java/awt/image/AffineTransformOp.js,bin/java/awt/image/AreaAveragingScaleFilter.js,bin/java/awt/image/BandCombineOp.js,bin/java/awt/image/BandedSampleModel.js,bin/java/awt/image/BufferStrategy.js,bin/java/awt/image/BufferedImage.js,bin/java/awt/image/BufferedImageFilter.js,bin/java/awt/image/BufferedImageOp.js,bin/java/awt/image/ByteLookupTable.js,bin/java/awt/image/ColorConvertOp.js,bin/java/awt/image/ColorModel.js,bin/java/awt/image/ComponentColorModel.js,bin/java/awt/image/ComponentSampleModel.js,bin/java/awt/image/ConvolveOp.js,bin/java/awt/image/CropImageFilter.js,bin/java/awt/image/DataBuffer.js,bin/java/awt/image/DataBufferByte.js,bin/java/awt/image/DataBufferDouble.js,bin/java/awt/image/DataBufferFloat.js,bin/java/awt/image/DataBufferInt.js,bin/java/awt/image/DataBufferShort.js,bin/java/awt/image/DataBufferUShort.js,bin/java/awt/image/DirectColorModel.js,bin/java/awt/image/FilteredImageSource.js,bin/java/awt/image/ImageConsumer.js,bin/java/awt/image/ImageFilter.js,bin/java/awt/image/ImageObserver.js,bin/java/awt/image/ImageProducer.js,bin/java/awt/image/ImagingOpException.js,bin/java/awt/image/IndexColorModel.js,bin/java/awt/image/Kernel.js,bin/java/awt/image/LookupOp.js,bin/java/awt/image/LookupTable.js,bin/java/awt/image/MemoryImageSource.js,bin/java/awt/image/MultiPixelPackedSampleModel.js,bin/java/awt/image/PackedColorModel.js,bin/java/awt/image/PixelGrabber.js,bin/java/awt/image/PixelInterleavedSampleModel.js,bin/java/awt/image/RGBImageFilter.js,bin/java/awt/image/Raster.js,bin/java/awt/image/RasterFormatException.js,bin/java/awt/image/RasterOp.js,bin/java/awt/image/RenderedImage.js,bin/java/awt/image/ReplicateScaleFilter.js,bin/java/awt/image/RescaleOp.js,bin/java/awt/image/SampleModel.js,bin/java/awt/image/ShortLookupTable.js,bin/java/awt/image/SinglePixelPackedSampleModel.js,bin/java/awt/image/TileObserver.js,bin/java/awt/image/VolatileImage.js,bin/java/awt/image/WritableRaster.js,bin/java/awt/image/WritableRenderedImage.js,bin/java/awt/image/renderable/ContextualRenderedImageFactory.js,bin/java/awt/image/renderable/ParameterBlock.js,bin/java/awt/image/renderable/RenderContext.js,bin/java/awt/image/renderable/RenderableImage.js,bin/java/awt/image/renderable/RenderableImageOp.js,bin/java/awt/image/renderable/RenderableImageProducer.js,bin/java/awt/image/renderable/RenderedImageFactory.js,bin/java/awt/peer/ButtonPeer.js,bin/java/awt/peer/CanvasPeer.js,bin/java/awt/peer/CheckboxMenuItemPeer.js,bin/java/awt/peer/CheckboxPeer.js,bin/java/awt/peer/ChoicePeer.js,bin/java/awt/peer/ComponentPeer.js,bin/java/awt/peer/ContainerPeer.js,bin/java/awt/peer/DesktopPeer.js,bin/java/awt/peer/DialogPeer.js,bin/java/awt/peer/FileDialogPeer.js,bin/java/awt/peer/FontPeer.js,bin/java/awt/peer/FramePeer.js,bin/java/awt/peer/KeyboardFocusManagerPeer.js,bin/java/awt/peer/LabelPeer.js,bin/java/awt/peer/LightweightPeer.js,bin/java/awt/peer/ListPeer.js,bin/java/awt/peer/MenuBarPeer.js,bin/java/awt/peer/MenuComponentPeer.js,bin/java/awt/peer/MenuItemPeer.js,bin/java/awt/peer/MenuPeer.js,bin/java/awt/peer/MouseInfoPeer.js,bin/java/awt/peer/PanelPeer.js,bin/java/awt/peer/PopupMenuPeer.js,bin/java/awt/peer/RobotPeer.js,bin/java/awt/peer/ScrollPanePeer.js,bin/java/awt/peer/ScrollbarPeer.js,bin/java/awt/peer/SystemTrayPeer.js,bin/java/awt/peer/TextAreaPeer.js,bin/java/awt/peer/TextComponentPeer.js,bin/java/awt/peer/TextFieldPeer.js,bin/java/awt/peer/TrayIconPeer.js,bin/java/awt/peer/WindowPeer.js,bin/java/awt/print/Book.js,bin/java/awt/print/PageFormat.js,bin/java/awt/print/Pageable.js,bin/java/awt/print/Paper.js,bin/java/awt/print/Printable.js,bin/java/awt/print/PrinterAbortException.js,bin/java/awt/print/PrinterException.js,bin/java/awt/print/PrinterGraphics.js,bin/java/awt/print/PrinterIOException.js,bin/java/awt/print/PrinterJob.js,bin/java/beans/AppletInitializer.js,bin/java/beans/BeanDescriptor.js,bin/java/beans/BeanInfo.js,bin/java/beans/Beans.js,bin/java/beans/ChangeListenerMap.js,bin/java/beans/ConstructorProperties.js,bin/java/beans/Customizer.js,bin/java/beans/DefaultPersistenceDelegate.js,bin/java/beans/DesignMode.js,bin/java/beans/Encoder.js,bin/java/beans/EventHandler.js,bin/java/beans/EventSetDescriptor.js,bin/java/beans/ExceptionListener.js,bin/java/beans/Expression.js,bin/java/beans/FeatureDescriptor.js,bin/java/beans/IndexedPropertyChangeEvent.js,bin/java/beans/IndexedPropertyDescriptor.js,bin/java/beans/IntrospectionException.js,bin/java/beans/Introspector.js,bin/java/beans/MetaData.js,bin/java/beans/MethodDescriptor.js,bin/java/beans/NameGenerator.js,bin/java/beans/ParameterDescriptor.js,bin/java/beans/PersistenceDelegate.js,bin/java/beans/PropertyChangeEvent.js,bin/java/beans/PropertyChangeListener.js,bin/java/beans/PropertyChangeListenerProxy.js,bin/java/beans/PropertyChangeSupport.js,bin/java/beans/PropertyDescriptor.js,bin/java/beans/PropertyEditor.js,bin/java/beans/PropertyEditorManager.js,bin/java/beans/PropertyEditorSupport.js,bin/java/beans/PropertyVetoException.js,bin/java/beans/ReflectionUtils.js,bin/java/beans/SimpleBeanInfo.js,bin/java/beans/Statement.js,bin/java/beans/ThreadGroupContext.js,bin/java/beans/VetoableChangeListener.js,bin/java/beans/VetoableChangeListenerProxy.js,bin/java/beans/VetoableChangeSupport.js,bin/java/beans/Visibility.js,bin/java/beans/WeakIdentityMap.js,bin/java/beans/XMLDecoder.js,bin/java/beans/XMLEncoder.js,bin/java/beans/beancontext/BeanContext.js,bin/java/beans/beancontext/BeanContextChild.js,bin/java/beans/beancontext/BeanContextChildComponentProxy.js,bin/java/beans/beancontext/BeanContextChildSupport.js,bin/java/beans/beancontext/BeanContextContainerProxy.js,bin/java/beans/beancontext/BeanContextEvent.js,bin/java/beans/beancontext/BeanContextMembershipEvent.js,bin/java/beans/beancontext/BeanContextMembershipListener.js,bin/java/beans/beancontext/BeanContextProxy.js,bin/java/beans/beancontext/BeanContextServiceAvailableEvent.js,bin/java/beans/beancontext/BeanContextServiceProvider.js,bin/java/beans/beancontext/BeanContextServiceProviderBeanInfo.js,bin/java/beans/beancontext/BeanContextServiceRevokedEvent.js,bin/java/beans/beancontext/BeanContextServiceRevokedListener.js,bin/java/beans/beancontext/BeanContextServices.js,bin/java/beans/beancontext/BeanContextServicesListener.js,bin/java/beans/beancontext/BeanContextServicesSupport.js,bin/java/beans/beancontext/BeanContextSupport.js,bin/java/io/Bits.js,bin/java/io/BufferedInputStream.js,bin/java/io/BufferedOutputStream.js,bin/java/io/BufferedReader.js,bin/java/io/BufferedWriter.js,bin/java/io/ByteArrayInputStream.js,bin/java/io/ByteArrayOutputStream.js,bin/java/io/CharArrayReader.js,bin/java/io/CharArrayWriter.js,bin/java/io/CharConversionException.js,bin/javax/swing/plaf/synth/SynthConstants.js,bin/javax/management/openmbean/SimpleType.js,bin/sun/security/util/SecurityConstants.js,bin/sun/java2d/pipe/hw/ExtendedBufferCapabilities.js,bin/sun/font/EAttribute.js,bin/sun/java2d/StateTrackable.js,bin/java/lang/annotation/ElementType.js,bin/java/lang/annotation/RetentionPolicy.js,bin/java/lang/Object.js,bin/java/lang/Enum.js,bin/java/lang/Comparable.js,bin/java/lang/package-info.js,bin/java/io/Serializable.js,bin/java/lang/reflect/WildcardType.js,bin/java/lang/reflect/Type.js,bin/java/lang/reflect/package-info.js,bin/javax/accessibility/Accessible.js,bin/javax/crypto/CipherSpi.js,bin/javax/crypto/KeyGeneratorSpi.js,bin/java/security/AlgorithmParametersSpi.js,bin/javax/crypto/SecretKey.js,bin/java/security/Key.js,bin/javax/crypto/SecretKeyFactorySpi.js,bin/javax/crypto/KeyAgreementSpi.js,bin/java/security/KeyFactorySpi.js,bin/java/security/KeyPairGeneratorSpi.js,bin/java/security/AlgorithmParameterGeneratorSpi.js,bin/java/security/PrivateKey.js,bin/javax/crypto/interfaces/DHPrivateKey.js,bin/javax/crypto/interfaces/DHKey.js,bin/java/security/PublicKey.js,bin/javax/crypto/interfaces/DHPublicKey.js,bin/java/lang/Cloneable.js,bin/javax/crypto/MacSpi.js,bin/java/security/KeyStoreSpi.js,bin/java/security/KeyStore.js,bin/javax/crypto/Cipher.js,bin/javax/crypto/SealedObject.js,bin/javax/crypto/interfaces/PBEKey.js,bin/java/security/Provider.js,bin/java/util/Properties.js,bin/java/util/Hashtable.js,bin/java/util/Dictionary.js,bin/java/util/Map.js,bin/sun/security/internal/interfaces/TlsMasterSecret.js,bin/java/lang/Deprecated.js,bin/javax/imageio/ImageReader.js,bin/javax/imageio/event/IIOReadProgressListener.js,bin/java/util/EventListener.js,bin/javax/imageio/spi/ImageReaderSpi.js,bin/javax/imageio/spi/ImageReaderWriterSpi.js,bin/javax/imageio/spi/IIOServiceProvider.js,bin/javax/imageio/spi/RegisterableService.js,bin/javax/imageio/ImageWriter.js,bin/javax/imageio/ImageTranscoder.js,bin/javax/imageio/event/IIOWriteProgressListener.js,bin/javax/imageio/spi/ImageWriterSpi.js,bin/javax/imageio/metadata/IIOMetadata.js,bin/javax/imageio/metadata/IIOMetadataFormatImpl.js,bin/javax/imageio/metadata/IIOMetadataFormat.js,bin/java/util/ListResourceBundle.js,bin/java/util/ResourceBundle.js,bin/java/io/InputStream.js,bin/java/io/Closeable.js,bin/javax/imageio/stream/ImageInputStreamImpl.js,bin/javax/imageio/stream/ImageInputStream.js,bin/java/io/DataInput.js,bin/javax/imageio/ImageWriteParam.js,bin/javax/imageio/IIOParam.js,bin/java/lang/Exception.js,bin/java/lang/Throwable.js,bin/sun/java2d/DisposerRecord.js,bin/java/util/Enumeration.js,bin/javax/imageio/stream/ImageOutputStreamImpl.js,bin/javax/imageio/stream/ImageOutputStream.js,bin/java/io/DataOutput.js,bin/javax/imageio/spi/ImageInputStreamSpi.js,bin/javax/imageio/spi/ImageOutputStreamSpi.js,bin/java/text/AttributedCharacterIterator.js,bin/java/text/CharacterIterator.js,bin/javax/swing/colorchooser/AbstractColorChooserPanel.js,bin/javax/swing/JPanel.js,bin/javax/swing/JComponent.js,bin/javax/swing/ClientPropertyKey.js,bin/javax/swing/TransferHandler.js,bin/javax/swing/event/ChangeListener.js,bin/javax/swing/AbstractAction.js,bin/javax/swing/Action.js,bin/javax/swing/JLabel.js,bin/javax/swing/SwingConstants.js,bin/javax/swing/plaf/synth/ColorType.js,bin/javax/swing/plaf/synth/Region.js,bin/sun/swing/plaf/synth/SynthFileChooserUI.js,bin/javax/swing/plaf/basic/BasicFileChooserUI.js,bin/javax/swing/plaf/FileChooserUI.js,bin/javax/swing/plaf/ComponentUI.js,bin/sun/swing/plaf/synth/SynthUI.js,bin/javax/swing/filechooser/FileView.js,bin/javax/swing/event/ListSelectionListener.js,bin/javax/swing/plaf/basic/BasicDirectoryModel.js,bin/javax/swing/AbstractListModel.js,bin/javax/swing/ListModel.js,bin/javax/swing/event/ListDataListener.js,bin/javax/swing/DefaultListCellRenderer.js,bin/javax/swing/ListCellRenderer.js,bin/javax/swing/ComboBoxModel.js,bin/javax/swing/plaf/UIResource.js,bin/javax/swing/plaf/synth/SynthGraphicsUtils.js,bin/sun/swing/plaf/synth/SynthIcon.js,bin/javax/swing/Icon.js,bin/javax/swing/plaf/synth/SynthLookAndFeel.js,bin/javax/swing/plaf/basic/BasicLookAndFeel.js,bin/javax/swing/LookAndFeel.js,bin/java/lang/ref/WeakReference.js,bin/java/lang/ref/Reference.js,bin/sun/swing/DefaultLayoutStyle.js,bin/javax/swing/LayoutStyle.js,bin/javax/swing/plaf/synth/SynthPainter.js,bin/javax/swing/border/AbstractBorder.js,bin/javax/swing/border/Border.js,bin/javax/swing/plaf/synth/SynthStyle.js,bin/javax/swing/UIDefaults.js,bin/javax/swing/plaf/synth/SynthStyleFactory.js,bin/java/security/PrivilegedAction.js,bin/java/util/StringTokenizer.js,bin/javax/swing/plaf/basic/BasicButtonListener.js,bin/javax/swing/plaf/basic/BasicButtonUI.js,bin/javax/swing/plaf/ButtonUI.js,bin/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.js,bin/javax/swing/plaf/basic/BasicMenuItemUI.js,bin/javax/swing/plaf/MenuItemUI.js,bin/javax/swing/event/MouseInputListener.js,bin/javax/swing/plaf/basic/BasicRadioButtonUI.js,bin/javax/swing/plaf/basic/BasicToggleButtonUI.js,bin/javax/swing/plaf/basic/BasicComboBoxUI.js,bin/javax/swing/plaf/ComboBoxUI.js,bin/javax/swing/plaf/basic/BasicComboPopup.js,bin/javax/swing/JPopupMenu.js,bin/javax/swing/MenuElement.js,bin/javax/swing/plaf/basic/ComboPopup.js,bin/javax/swing/plaf/basic/BasicDesktopIconUI.js,bin/javax/swing/plaf/DesktopIconUI.js,bin/javax/swing/JButton.js,bin/javax/swing/AbstractButton.js,bin/javax/swing/plaf/basic/BasicDesktopPaneUI.js,bin/javax/swing/plaf/DesktopPaneUI.js,bin/javax/swing/DefaultDesktopManager.js,bin/javax/swing/DesktopManager.js,bin/javax/swing/plaf/basic/BasicEditorPaneUI.js,bin/javax/swing/plaf/basic/BasicTextUI.js,bin/javax/swing/plaf/TextUI.js,bin/javax/swing/text/ViewFactory.js,bin/javax/swing/plaf/basic/BasicInternalFrameTitlePane.js,bin/javax/swing/plaf/basic/BasicInternalFrameUI.js,bin/javax/swing/plaf/InternalFrameUI.js,bin/javax/swing/plaf/basic/BasicLabelUI.js,bin/javax/swing/plaf/LabelUI.js,bin/javax/swing/plaf/basic/BasicMenuBarUI.js,bin/javax/swing/plaf/MenuBarUI.js,bin/javax/swing/plaf/basic/BasicMenuUI.js,bin/javax/swing/plaf/basic/BasicOptionPaneUI.js,bin/javax/swing/plaf/OptionPaneUI.js,bin/javax/swing/plaf/basic/BasicPasswordFieldUI.js,bin/javax/swing/plaf/basic/BasicTextFieldUI.js,bin/javax/swing/plaf/basic/BasicSeparatorUI.js,bin/javax/swing/plaf/SeparatorUI.js,bin/javax/swing/plaf/basic/BasicPopupMenuUI.js,bin/javax/swing/plaf/PopupMenuUI.js,bin/javax/swing/plaf/basic/BasicProgressBarUI.js,bin/javax/swing/plaf/ProgressBarUI.js,bin/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.js,bin/javax/swing/plaf/basic/BasicArrowButton.js,bin/javax/swing/plaf/basic/BasicScrollBarUI.js,bin/javax/swing/plaf/ScrollBarUI.js,bin/javax/swing/plaf/basic/BasicScrollPaneUI.js,bin/javax/swing/plaf/ScrollPaneUI.js,bin/javax/swing/ScrollPaneConstants.js,bin/javax/swing/plaf/basic/BasicSliderUI.js,bin/javax/swing/plaf/SliderUI.js,bin/javax/swing/plaf/basic/BasicSplitPaneDivider.js,bin/javax/swing/plaf/basic/BasicSplitPaneUI.js,bin/javax/swing/plaf/SplitPaneUI.js,bin/javax/swing/plaf/basic/BasicTabbedPaneUI.js,bin/javax/swing/plaf/TabbedPaneUI.js,bin/javax/swing/plaf/basic/BasicTextAreaUI.js,bin/javax/swing/plaf/basic/BasicTextPaneUI.js,bin/javax/swing/text/DefaultCaret.js,bin/javax/swing/text/Caret.js,bin/javax/swing/tree/DefaultTreeCellRenderer.js,bin/javax/swing/tree/TreeCellRenderer.js,bin/javax/swing/plaf/basic/BasicTreeUI.js,bin/javax/swing/plaf/TreeUI.js,bin/java/lang/ref/SoftReference.js,bin/sun/swing/UIClientPropertyKey.js,bin/javax/swing/border/LineBorder.js,bin/javax/swing/plaf/basic/BasicComboBoxEditor.js,bin/javax/swing/ComboBoxEditor.js,bin/javax/swing/plaf/basic/BasicComboBoxRenderer.js,bin/sun/swing/FilePane.js,bin/sun/swing/MenuItemCheckIconFactory.js,bin/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.js,bin/javax/swing/JWindow.js,bin/javax/swing/RootPaneContainer.js,bin/javax/swing/plaf/basic/BasicRootPaneUI.js,bin/javax/swing/plaf/RootPaneUI.js,bin/javax/swing/event/MouseInputAdapter.js,bin/javax/swing/plaf/basic/BasicSpinnerUI.js,bin/javax/swing/plaf/SpinnerUI.js,bin/javax/swing/plaf/basic/BasicTableHeaderUI.js,bin/javax/swing/plaf/TableHeaderUI.js,bin/sun/swing/table/DefaultTableCellHeaderRenderer.js,bin/javax/swing/table/DefaultTableCellRenderer.js,bin/javax/swing/table/TableCellRenderer.js,bin/java/lang/Runnable.js,bin/javax/swing/text/DefaultHighlighter.js,bin/javax/swing/text/LayeredHighlighter.js,bin/javax/swing/text/Highlighter.js,bin/javax/swing/plaf/basic/BasicToolBarSeparatorUI.js,bin/javax/swing/plaf/basic/BasicToolBarUI.js,bin/javax/swing/plaf/ToolBarUI.js,bin/javax/swing/border/EmptyBorder.js,bin/sun/swing/CachedPainter.js,bin/java/io/IOException.js,bin/java/io/FilterOutputStream.js,bin/java/io/OutputStream.js,bin/java/io/Flushable.js,bin/java/util/AbstractList.js,bin/java/util/AbstractCollection.js,bin/java/util/Collection.js,bin/java/lang/Iterable.js,bin/java/util/List.js,bin/java/util/Iterator.js,bin/java/io/FilterInputStream.js,bin/java/util/jar/Pack200.js,bin/java/util/TreeMap.js,bin/java/util/AbstractMap.js,bin/java/util/NavigableMap.js,bin/java/util/SortedMap.js,bin/java/lang/RuntimeException.js,bin/java/security/BasicPermission.js,bin/java/security/Permission.js,bin/java/security/Guard.js,bin/java/lang/UnsupportedOperationException.js,bin/java/util/Set.js,bin/javax/management/MBeanServerConnection.js,bin/javax/management/NotificationListener.js,bin/javax/management/loading/ClassLoaderRepository.js,bin/javax/management/DynamicMBean.js,bin/java/lang/String.js,bin/java/lang/CharSequence.js,bin/javax/management/MBeanServer.js,bin/javax/management/MBeanServerBuilder.js,bin/java/util/Comparator.js,bin/java/lang/reflect/Method.js,bin/java/lang/reflect/AccessibleObject.js,bin/java/lang/reflect/AnnotatedElement.js,bin/java/lang/reflect/GenericDeclaration.js,bin/java/lang/reflect/Member.js,bin/java/util/WeakHashMap.js,bin/java/lang/Class.js,bin/javax/management/MBeanInfo.js,bin/javax/management/DescriptorRead.js,bin/javax/management/MBeanServerDelegate.js,bin/javax/management/MBeanServerDelegateMBean.js,bin/javax/management/NotificationEmitter.js,bin/javax/management/NotificationBroadcaster.js,bin/javax/management/MBeanRegistration.js,bin/java/io/ObjectInputStream.js,bin/java/io/ObjectInput.js,bin/java/io/ObjectStreamConstants.js,bin/javax/management/openmbean/OpenType.js,bin/javax/management/QueryEval.js,bin/javax/management/QueryExp.js,bin/java/util/concurrent/Executor.js,bin/java/util/concurrent/package-info.js,bin/java/rmi/server/RemoteRef.js,bin/java/io/Externalizable.js,bin/javax/management/remote/JMXConnectorProvider.js,bin/javax/management/remote/JMXConnectorServerProvider.js,bin/javax/security/auth/spi/LoginModule.js,bin/javax/management/remote/JMXAuthenticator.js,bin/javax/security/auth/callback/CallbackHandler.js,bin/javax/security/auth/login/Configuration.js,bin/javax/security/auth/SubjectDomainCombiner.js,bin/java/security/DomainCombiner.js,bin/javax/management/remote/MBeanServerForwarder.js,bin/java/lang/ClassLoader.js,bin/java/security/acl/AclEntry.js,bin/java/security/acl/Owner.js,bin/java/security/acl/Acl.js,bin/java/security/Principal.js,bin/java/security/acl/Group.js,bin/java/security/acl/Permission.js,bin/java/lang/Error.js,bin/java/util/Vector.js,bin/java/util/RandomAccess.js,bin/javax/management/Notification.js,bin/java/util/EventObject.js,bin/javax/management/JMRuntimeException.js,bin/java/lang/Thread.js,bin/javax/naming/NamingEnumeration.js,bin/javax/naming/Context.js,bin/javax/naming/spi/InitialContextFactory.js,bin/javax/naming/NameParser.js,bin/javax/naming/CompoundName.js,bin/javax/naming/Name.js,bin/javax/naming/spi/StateFactory.js,bin/javax/naming/spi/Resolver.js,bin/javax/naming/directory/DirContext.js,bin/javax/naming/ldap/Control.js,bin/javax/naming/Binding.js,bin/javax/naming/NameClassPair.js,bin/javax/naming/ldap/HasControls.js,bin/javax/naming/ldap/ControlFactory.js,bin/javax/naming/directory/BasicAttribute.js,bin/javax/naming/directory/Attribute.js,bin/javax/naming/event/EventDirContext.js,bin/javax/naming/event/EventContext.js,bin/javax/naming/ldap/LdapContext.js,bin/javax/naming/spi/ObjectFactory.js,bin/javax/naming/ldap/LdapReferralException.js,bin/javax/naming/ReferralException.js,bin/javax/naming/NamingException.js,bin/javax/naming/directory/SearchResult.js,bin/javax/naming/ldap/UnsolicitedNotification.js,bin/javax/naming/ldap/ExtendedResponse.js,bin/javax/naming/ldap/StartTlsResponse.js,bin/java/rmi/server/UnicastRemoteObject.js,bin/java/rmi/server/RemoteServer.js,bin/java/rmi/server/RemoteObject.js,bin/java/rmi/Remote.js,bin/javax/naming/Referenceable.js,bin/javax/naming/spi/ResolveResult.js,bin/java/lang/management/GarbageCollectorMXBean.js,bin/java/lang/management/MemoryManagerMXBean.js,bin/javax/management/openmbean/CompositeData.js,bin/javax/management/openmbean/CompositeDataView.js,bin/java/lang/management/OperatingSystemMXBean.js,bin/javax/sound/sampled/Line.js,bin/javax/sound/sampled/DataLine.js,bin/javax/sound/midi/MidiDevice.js,bin/javax/sound/midi/Receiver.js,bin/javax/sound/midi/Transmitter.js,bin/javax/sound/midi/spi/MidiDeviceProvider.js,bin/javax/sound/sampled/Mixer.js,bin/javax/sound/sampled/AudioFileFormat.js,bin/javax/sound/sampled/spi/AudioFileReader.js,bin/javax/sound/sampled/spi/AudioFileWriter.js,bin/javax/sound/sampled/spi/FormatConversionProvider.js,bin/javax/sound/sampled/AudioInputStream.js,bin/javax/sound/midi/spi/SoundbankReader.js,bin/javax/sound/midi/Synthesizer.js,bin/javax/sound/sampled/Clip.js,bin/javax/sound/midi/Instrument.js,bin/javax/sound/midi/SoundbankResource.js,bin/javax/sound/midi/Soundbank.js,bin/javax/sound/sampled/FloatControl.js,bin/javax/sound/sampled/Control.js,bin/javax/sound/sampled/BooleanControl.js,bin/javax/sound/sampled/SourceDataLine.js,bin/javax/sound/sampled/TargetDataLine.js,bin/javax/sound/sampled/spi/MixerProvider.js,bin/javax/sound/midi/ShortMessage.js,bin/javax/sound/midi/MidiMessage.js,bin/javax/sound/midi/SysexMessage.js,bin/javax/sound/midi/MetaEventListener.js,bin/javax/sound/sampled/LineListener.js,bin/javax/sound/midi/MidiChannel.js,bin/javax/sound/midi/Patch.js,bin/javax/sound/sampled/Port.js,bin/javax/sound/sampled/CompoundControl.js,bin/javax/sound/midi/Sequencer.js,bin/javax/sound/midi/VoiceStatus.js,bin/javax/sound/midi/spi/MidiFileReader.js,bin/javax/sound/midi/spi/MidiFileWriter.js,bin/java/net/HttpURLConnection.js,bin/java/net/URLConnection.js,bin/javax/net/ssl/X509KeyManager.js,bin/javax/net/ssl/KeyManager.js,bin/javax/net/ssl/X509TrustManager.js,bin/javax/net/ssl/TrustManager.js,bin/sun/security/ssl/SunJSSE.js,bin/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.js,bin/sun/net/www/protocol/http/HttpURLConnection.js,bin/javax/net/ssl/HostnameVerifier.js,bin/sun/net/www/protocol/https/Handler.js,bin/sun/net/www/protocol/http/Handler.js,bin/java/net/URLStreamHandler.js,bin/java/security/PermissionCollection.js,bin/javax/sql/rowset/BaseRowSet.js,bin/javax/sql/RowSet.js,bin/java/sql/ResultSet.js,bin/java/sql/Wrapper.js,bin/javax/sql/RowSetInternal.js,bin/javax/sql/rowset/CachedRowSet.js,bin/javax/sql/rowset/Joinable.js,bin/javax/sql/rowset/WebRowSet.js,bin/javax/sql/rowset/FilteredRowSet.js,bin/javax/sql/rowset/JdbcRowSet.js,bin/javax/sql/rowset/JoinRowSet.js,bin/javax/sql/RowSetReader.js,bin/javax/sql/rowset/spi/TransactionalWriter.js,bin/javax/sql/RowSetWriter.js,bin/javax/sql/rowset/spi/SyncResolver.js,bin/javax/sql/rowset/spi/XmlReader.js,bin/javax/sql/rowset/spi/XmlWriter.js,bin/javax/sql/rowset/spi/SyncProvider.js,bin/javax/script/CompiledScript.js,bin/javax/script/AbstractScriptEngine.js,bin/javax/script/ScriptEngine.js,bin/javax/script/Invocable.js,bin/javax/script/Compilable.js,bin/javax/script/ScriptEngineFactory.js,bin/javax/script/Bindings.js,bin/java/util/AbstractSet.js,bin/java/lang/reflect/InvocationHandler.js,bin/javax/security/auth/Policy.js,bin/java/security/GeneralSecurityException.js,bin/java/security/CodeSource.js,bin/javax/security/cert/X509Certificate.js,bin/javax/security/cert/Certificate.js,bin/javax/security/sasl/SaslClientFactory.js,bin/javax/security/sasl/SaslClient.js,bin/javax/security/sasl/SaslServer.js,bin/javax/security/sasl/SaslServerFactory.js,bin/java/lang/IndexOutOfBoundsException.js,bin/javax/swing/tree/DefaultMutableTreeNode.js,bin/javax/swing/tree/MutableTreeNode.js,bin/javax/swing/tree/TreeNode.js,bin/javax/swing/filechooser/FileFilter.js,bin/javax/swing/JMenuBar.js,bin/javax/swing/JToolBar.js,bin/java/io/PrintWriter.js,bin/java/io/Writer.js,bin/java/lang/Appendable.js,bin/javax/swing/tree/DefaultTreeSelectionModel.js,bin/javax/swing/tree/TreeSelectionModel.js,bin/java/io/FilenameFilter.js,bin/java/io/DataInputStream.js,bin/java/util/ArrayList.js,bin/javax/accessibility/AccessibleContext.js,bin/javax/accessibility/AccessibleComponent.js,bin/javax/accessibility/AccessibleAction.js,bin/javax/accessibility/AccessibleValue.js,bin/javax/accessibility/AccessibleSelection.js,bin/sun/awt/SubRegionShowable.js,bin/sun/awt/RequestFocusController.js,bin/sun/awt/SunGraphicsCallback.js,bin/java/lang/IllegalStateException.js,bin/javax/accessibility/AccessibleText.js,bin/sun/awt/datatransfer/DataTransferer.js,bin/java/util/EventListenerProxy.js,bin/java/lang/Character.js,bin/java/lang/annotation/Annotation.js,bin/java/io/Reader.js,bin/java/lang/Readable.js,bin/javax/security/auth/Destroyable.js,bin/javax/accessibility/AccessibleExtendedComponent.js,bin/java/io/ObjectInputValidation.js,bin/sun/swing/UIAction.js,bin/javax/accessibility/AccessibleKeyBinding.js,bin/javax/swing/plaf/basic/BasicTransferable.js,bin/javax/swing/event/MenuDragMouseListener.js,bin/javax/swing/JComboBox.js,bin/javax/swing/JSeparator.js,bin/javax/swing/ActionPropertyChangeListener.js,bin/javax/swing/text/html/StyleSheet.js,bin/javax/swing/text/StyleContext.js,bin/javax/swing/text/AbstractDocument.js,bin/javax/swing/text/Document.js,bin/javax/swing/text/View.js,bin/javax/swing/event/DocumentListener.js,bin/javax/swing/text/TextAction.js,bin/javax/swing/plaf/basic/DragRecognitionSupport.js,bin/javax/swing/event/InternalFrameListener.js,bin/javax/swing/event/MenuKeyListener.js,bin/javax/swing/JTextField.js,bin/javax/swing/text/JTextComponent.js,bin/javax/swing/Scrollable.js,bin/javax/swing/text/ParagraphView.js,bin/javax/swing/text/FlowView.js,bin/javax/swing/text/BoxView.js,bin/javax/swing/text/CompositeView.js,bin/javax/swing/text/TabExpander.js,bin/javax/swing/event/PopupMenuListener.js,bin/javax/swing/JViewport.js,bin/javax/swing/text/NavigationFilter.js,bin/javax/swing/event/TreeExpansionListener.js,bin/javax/swing/event/TreeModelListener.js,bin/javax/swing/event/TreeSelectionListener.js,bin/javax/swing/event/CellEditorListener.js,bin/javax/swing/tree/AbstractLayoutCache.js,bin/javax/swing/tree/RowMapper.js,bin/javax/swing/event/TableModelListener.js,bin/javax/swing/event/RowSorterListener.js,bin/javax/swing/table/AbstractTableModel.js,bin/javax/swing/table/TableModel.js,bin/javax/swing/table/TableRowSorter.js,bin/javax/swing/DefaultRowSorter.js,bin/java/lang/Integer.js,bin/java/lang/Number.js,bin/javax/swing/RowSorter.js,bin/java/io/File.js,bin/javax/swing/DefaultCellEditor.js,bin/javax/swing/AbstractCellEditor.js,bin/javax/swing/CellEditor.js,bin/javax/swing/table/TableCellEditor.js,bin/javax/swing/tree/TreeCellEditor.js,bin/javax/swing/plaf/ComponentInputMapUIResource.js,bin/javax/swing/ComponentInputMap.js,bin/javax/swing/InputMap.js,bin/java/util/ListIterator.js,bin/java/util/NavigableSet.js,bin/java/util/SortedSet.js,bin/java/lang/Boolean.js,bin/java/security/PrivilegedExceptionAction.js,bin/java/net/ContentHandler.js,bin/javax/swing/text/SimpleAttributeSet.js,bin/javax/swing/text/MutableAttributeSet.js,bin/javax/swing/text/AttributeSet.js,bin/javax/swing/text/html/MuxingAttributeSet.js,bin/javax/swing/text/Style.js,bin/javax/swing/text/html/CSSParser.js,bin/javax/swing/text/Element.js,bin/javax/swing/undo/CompoundEdit.js,bin/javax/swing/undo/AbstractUndoableEdit.js,bin/javax/swing/undo/UndoableEdit.js,bin/javax/swing/event/DocumentEvent.js,bin/javax/swing/text/DocumentFilter.js,bin/javax/swing/event/CaretListener.js,bin/javax/accessibility/AccessibleEditableText.js,bin/javax/accessibility/AccessibleExtendedText.js,bin/javax/swing/text/Segment.js,bin/javax/swing/text/Keymap.js,bin/javax/swing/ActionMap.js,bin/javax/swing/event/CaretEvent.js,bin/javax/swing/RowFilter.js,bin/sun/awt/AWTAccessor.js,bin/sun/awt/SunToolkit.js,bin/sun/awt/WindowClosingSupport.js,bin/sun/awt/WindowClosingListener.js,bin/sun/awt/ComponentFactory.js,bin/sun/awt/InputMethodSupport.js,bin/sun/awt/ModalityListener.js,bin/java/lang/CloneNotSupportedException.js,bin/java/lang/InterruptedException.js,bin/java/lang/ClassNotFoundException.js,bin/java/io/ObjectStreamException.js,bin/java/lang/NullPointerException.js,bin/java/lang/IllegalArgumentException.js,bin/java/io/StringReader.js,bin/java/util/Locale.js,bin/sun/util/LocaleServiceProviderPool.js,bin/java/util/spi/LocaleNameProvider.js,bin/java/util/spi/LocaleServiceProvider.js,bin/java/lang/StringBuffer.js,bin/java/lang/AbstractStringBuilder.js,bin/java/lang/annotation/Documented.js,bin/java/lang/annotation/package-info.js,bin/java/lang/annotation/Retention.js,bin/java/lang/annotation/Target.js,bin/java/util/HashMap.js,bin/java/lang/Byte.js,bin/java/lang/Short.js,bin/java/lang/Long.js,bin/java/lang/Float.js,bin/java/lang/Double.js,bin/java/lang/Void.js,bin/java/lang/NumberFormatException.js,bin/java/lang/reflect/Array.js,bin/java/lang/NegativeArraySizeException.js,bin/java/lang/reflect/Field.js,bin/sun/reflect/misc/FieldUtil.js,bin/java/lang/NoSuchFieldException.js,bin/sun/reflect/CallerSensitive.js,bin/java/lang/IllegalAccessException.js,bin/java/lang/SuppressWarnings.js,bin/java/lang/reflect/GenericArrayType.js,bin/java/lang/reflect/ParameterizedType.js,bin/java/lang/reflect/TypeVariable.js,bin/sun/reflect/generics/reflectiveObjects/GenericArrayTypeImpl.js,bin/sun/reflect/generics/reflectiveObjects/ParameterizedTypeImpl.js,bin/java/lang/ref/ReferenceQueue.js,bin/java/util/Arrays.js,bin/java/lang/Override.js,bin/sun/reflect/generics/reflectiveObjects/WildcardTypeImpl.js,bin/sun/reflect/generics/reflectiveObjects/LazyReflectiveObjectGenerator.js,bin/java/lang/StringBuilder.js,bin/sun/java2d/pipe/Region.js,bin/java/io/PrintStream.js,bin/java/io/ObjectOutputStream.js,bin/java/io/ObjectOutput.js,bin/java/security/AccessControlContext.js,bin/javax/accessibility/AccessibleStateSet.js,bin/sun/awt/CausedFocusEvent.js,bin/java/lang/System.js,bin/sun/reflect/misc/ReflectUtil.js,bin/java/security/ProtectionDomain.js,bin/sun/reflect/annotation/AnnotationType.js,bin/java/lang/reflect/Constructor.js,bin/sun/reflect/generics/repository/ClassRepository.js,bin/sun/reflect/generics/repository/GenericDeclRepository.js,bin/sun/reflect/generics/tree/ClassSignature.js,bin/sun/reflect/generics/tree/Signature.js,bin/sun/reflect/generics/tree/Tree.js,bin/sun/reflect/generics/repository/AbstractRepository.js,bin/sun/reflect/ReflectionFactory.js,bin/java/io/ObjectStreamField.js,bin/java/lang/SecurityException.js,bin/javax/crypto/BadPaddingException.js,bin/javax/crypto/IllegalBlockSizeException.js,bin/javax/crypto/ShortBufferException.js,bin/java/security/InvalidKeyException.js,bin/java/security/KeyException.js,bin/java/security/AlgorithmParameters.js,bin/java/security/SecureRandom.js,bin/java/util/Random.js,bin/java/security/InvalidAlgorithmParameterException.js,bin/java/security/spec/AlgorithmParameterSpec.js,bin/java/security/NoSuchAlgorithmException.js,bin/javax/crypto/NoSuchPaddingException.js,bin/java/security/InvalidParameterException.js,bin/javax/crypto/spec/SecretKeySpec.js,bin/java/security/spec/KeySpec.js,bin/java/security/spec/InvalidParameterSpecException.js,bin/javax/crypto/spec/IvParameterSpec.js,bin/sun/misc/HexDumpEncoder.js,bin/sun/misc/CharacterEncoder.js,bin/sun/security/util/DerInputStream.js,bin/sun/security/util/DerOutputStream.js,bin/sun/security/util/DerEncoder.js,bin/javax/crypto/spec/RC2ParameterSpec.js,bin/java/security/NoSuchProviderException.js,bin/java/security/KeyFactory.js,bin/java/security/spec/PKCS8EncodedKeySpec.js,bin/java/security/spec/EncodedKeySpec.js,bin/java/security/spec/X509EncodedKeySpec.js,bin/java/security/spec/InvalidKeySpecException.js,bin/java/security/KeyRep.js,bin/javax/crypto/spec/DESKeySpec.js,bin/javax/crypto/SecretKeyFactory.js,bin/javax/crypto/spec/DESedeKeySpec.js,bin/java/security/MessageDigest.js,bin/java/security/MessageDigestSpi.js,bin/java/security/DigestException.js,bin/java/math/BigInteger.js,bin/java/math/package-info.js,bin/sun/security/util/KeyUtil.js,bin/javax/crypto/spec/DHParameterSpec.js,bin/javax/crypto/spec/DHPublicKeySpec.js,bin/javax/crypto/spec/DHPrivateKeySpec.js,bin/javax/crypto/spec/DHGenParameterSpec.js,bin/sun/security/provider/ParameterCache.js,bin/java/security/KeyPair.js,bin/java/security/ProviderException.js,bin/java/lang/Math.js,bin/java/security/KeyPairGenerator.js,bin/java/security/AlgorithmParameterGenerator.js,bin/java/security/spec/DSAParameterSpec.js,bin/java/security/interfaces/DSAParams.js,bin/sun/security/util/DerValue.js,bin/sun/security/util/DerInputBuffer.js,bin/sun/security/util/Debug.js,bin/sun/security/util/ObjectIdentifier.js,bin/sun/security/x509/AlgorithmId.js,bin/java/nio/Buffer.js,bin/javax/crypto/spec/PBEParameterSpec.js,bin/java/security/DigestInputStream.js,bin/java/security/DigestOutputStream.js,bin/java/security/KeyStoreException.js,bin/java/security/UnrecoverableKeyException.js,bin/java/security/UnrecoverableEntryException.js,bin/java/security/cert/Certificate.js,bin/java/security/cert/CertificateFactory.js,bin/java/security/cert/X509Certificate.js,bin/java/security/cert/X509Extension.js,bin/java/security/cert/CertificateException.js,bin/java/util/Date.js,bin/java/io/UnsupportedEncodingException.js,bin/java/io/DataOutputStream.js,bin/java/security/cert/CertificateEncodingException.js,bin/java/lang/OutOfMemoryError.js,bin/java/lang/VirtualMachineError.js,bin/java/nio/charset/Charset.js,bin/java/security/Security.js,bin/javax/crypto/CryptoPermission.js,bin/javax/crypto/ExemptionMechanism.js,bin/javax/crypto/spec/PBEKeySpec.js,bin/java/security/spec/MGF1ParameterSpec.js,bin/javax/crypto/spec/PSource.js,bin/javax/crypto/spec/OAEPParameterSpec.js,bin/java/util/HashSet.js,bin/javax/crypto/Mac.js,bin/sun/security/jca/Providers.js,bin/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.js,bin/sun/security/rsa/RSAPadding.js,bin/java/security/interfaces/RSAPrivateKey.js,bin/java/security/interfaces/RSAKey.js,bin/java/security/interfaces/RSAPublicKey.js,bin/sun/security/jca/ProviderList.js,bin/sun/security/rsa/RSAKeyFactory.js,bin/sun/security/rsa/RSACore.js,bin/java/lang/AssertionError.js,bin/java/security/AccessController.js,bin/java/net/URL.js,bin/java/util/InvalidPropertiesFormatException.js,bin/java/io/StreamCorruptedException.js,bin/java/security/PrivilegedActionException.js,bin/sun/security/internal/spec/TlsKeyMaterialParameterSpec.js,bin/sun/security/internal/spec/TlsKeyMaterialSpec.js,bin/sun/security/internal/spec/TlsMasterSecretParameterSpec.js,bin/sun/security/internal/spec/TlsPrfParameterSpec.js,bin/javax/imageio/IIOException.js,bin/javax/imageio/ImageIO.js,bin/javax/imageio/spi/ServiceRegistry.js,bin/javax/imageio/ImageReadParam.js,bin/javax/imageio/ImageTypeSpecifier.js,bin/javax/imageio/event/IIOReadUpdateListener.js,bin/javax/imageio/event/IIOReadWarningListener.js,bin/javax/imageio/IIOImage.js,bin/java/nio/ByteOrder.js,bin/javax/imageio/spi/IIORegistry.js,bin/javax/imageio/metadata/IIOMetadataNode.js,bin/javax/imageio/metadata/IIOInvalidTreeException.js,bin/javax/imageio/event/IIOWriteWarningListener.js,bin/javax/imageio/plugins/bmp/BMPImageWriteParam.js,bin/javax/imageio/metadata/IIOMetadataController.js,bin/java/lang/ArrayIndexOutOfBoundsException.js,bin/java/util/PropertyResourceBundle.js,bin/javax/imageio/stream/IIOByteBuffer.js,bin/java/io/EOFException.js,bin/javax/imageio/IIOParamController.js,bin/javax/imageio/plugins/jpeg/JPEGHuffmanTable.js,bin/javax/imageio/plugins/jpeg/JPEGQTable.js,bin/javax/imageio/stream/MemoryCacheImageOutputStream.js,bin/java/lang/StackTraceElement.js,bin/java/lang/InternalError.js,bin/javax/imageio/plugins/jpeg/JPEGImageReadParam.js,bin/sun/java2d/Disposer.js,bin/sun/security/action/LoadLibraryAction.js,bin/javax/imageio/plugins/jpeg/JPEGImageWriteParam.js,bin/java/io/SequenceInputStream.js,bin/java/util/zip/Inflater.js,bin/java/util/zip/InflaterInputStream.js,bin/sun/awt/image/ByteInterleavedRaster.js,bin/sun/awt/image/ByteComponentRaster.js,bin/sun/awt/image/SunWritableRaster.js,bin/java/util/zip/ZipException.js,bin/java/util/zip/Deflater.js,bin/java/util/zip/DeflaterOutputStream.js,bin/javax/imageio/stream/FileImageInputStream.js,bin/java/io/FileNotFoundException.js,bin/javax/imageio/stream/FileImageOutputStream.js,bin/javax/imageio/stream/FileCacheImageInputStream.js,bin/javax/imageio/stream/MemoryCacheImageInputStream.js,bin/javax/imageio/stream/FileCacheImageOutputStream.js,bin/java/io/RandomAccessFile.js,bin/java/lang/ThreadGroup.js,bin/java/lang/Runtime.js,bin/java/util/MissingResourceException.js,bin/java/io/InvalidObjectException.js,bin/java/text/AttributedString.js,bin/java/net/URI.js,bin/java/util/zip/ZipFile.js,bin/java/util/zip/ZipConstants.js,bin/sun/security/action/GetPropertyAction.js,bin/java/lang/InstantiationException.js,bin/javax/swing/JSpinner.js,bin/javax/swing/text/DateFormatter.js,bin/javax/swing/text/InternationalFormatter.js,bin/javax/swing/text/DefaultFormatter.js,bin/javax/swing/JFormattedTextField.js,bin/javax/swing/text/NumberFormatter.js,bin/javax/swing/event/ChangeEvent.js,bin/javax/swing/JColorChooser.js,bin/javax/swing/JDialog.js,bin/javax/swing/WindowConstants.js,bin/javax/swing/colorchooser/ColorSelectionModel.js,bin/javax/swing/plaf/PanelUI.js,bin/javax/swing/event/AncestorListener.js,bin/javax/swing/JToolTip.js,bin/javax/swing/KeyStroke.js,bin/javax/swing/AncestorNotifier.js,bin/javax/swing/ArrayTable.js,bin/javax/swing/InputVerifier.js,bin/javax/swing/JRootPane.js,bin/javax/swing/UIManager.js,bin/javax/swing/plaf/ActionMapUIResource.js,bin/javax/swing/SwingUtilities.js,bin/javax/swing/SpinnerNumberModel.js,bin/javax/swing/AbstractSpinnerModel.js,bin/javax/swing/SpinnerModel.js,bin/javax/swing/Box.js,bin/javax/swing/plaf/ColorUIResource.js,bin/sun/swing/ImageCache.js,bin/javax/swing/plaf/synth/SynthContext.js,bin/javax/swing/JScrollBar.js,bin/javax/swing/JSlider.js,bin/javax/swing/JProgressBar.js,bin/javax/swing/JSplitPane.js,bin/java/text/MessageFormat.js,bin/java/text/Format.js,bin/sun/swing/SwingUtilities2.js,bin/sun/swing/DefaultLookup.js,bin/sun/awt/shell/ShellFolder.js,bin/javax/swing/JList.js,bin/javax/swing/JFileChooser.js,bin/javax/swing/JScrollPane.js,bin/javax/swing/event/ListSelectionEvent.js,bin/javax/swing/filechooser/FileSystemView.js,bin/javax/swing/event/ListDataEvent.js,bin/java/util/Collections.js,bin/java/util/AbstractQueue.js,bin/java/util/Queue.js,bin/javax/swing/JOptionPane.js,bin/javax/swing/ListSelectionModel.js,bin/javax/swing/DefaultListSelectionModel.js,bin/java/text/FieldPosition.js,bin/javax/swing/text/BadLocationException.js,bin/java/lang/reflect/InvocationTargetException.js,bin/sun/awt/AppContext.js,bin/sun/awt/ConstrainableGraphics.js,bin/sun/awt/EmbeddedFrame.js,bin/sun/awt/NullComponentPeer.js,bin/sun/awt/dnd/SunDropTargetEvent.js,bin/sun/awt/im/CompositionArea.js,bin/sun/java2d/SunGraphics2D.js,bin/sun/java2d/DestSurfaceProvider.js,bin/sun/awt/image/VSyncedBSManager.js,bin/sun/java2d/SunGraphicsEnvironment.js,bin/sun/java2d/FontSupport.js,bin/sun/awt/DisplayChangedListener.js,bin/javax/swing/BoxLayout.js,bin/javax/swing/table/JTableHeader.js,bin/javax/swing/event/TableColumnModelListener.js,bin/javax/swing/JTable.js,bin/javax/swing/JCheckBox.js,bin/javax/swing/JToggleButton.js,bin/javax/accessibility/AccessibleExtendedTable.js,bin/javax/accessibility/AccessibleTable.js,bin/javax/accessibility/AccessibleTableModelChange.js,bin/javax/swing/DefaultButtonModel.js,bin/javax/swing/ButtonModel.js,bin/javax/swing/BoundedRangeModel.js,bin/javax/swing/DropMode.js,bin/javax/print/PrintService.js,bin/javax/print/attribute/PrintRequestAttributeSet.js,bin/javax/print/attribute/AttributeSet.js,bin/java/util/LinkedList.js,bin/java/util/AbstractSequentialList.js,bin/java/util/Deque.js,bin/java/util/logging/Level.js,bin/java/util/logging/Logger.js,bin/sun/awt/HeadlessToolkit.js,bin/javax/swing/plaf/synth/SynthMenuItemLayoutHelper.js,bin/sun/swing/MenuItemLayoutHelper.js,bin/java/lang/NoSuchMethodException.js,bin/javax/swing/text/DefaultEditorKit.js,bin/javax/swing/text/EditorKit.js,bin/sun/awt/OSInfo.js,bin/java/text/ParseException.js,bin/sun/swing/SwingLazyValue.js,bin/javax/swing/plaf/InsetsUIResource.js,bin/javax/swing/plaf/DimensionUIResource.js,bin/javax/swing/JTabbedPane.js,bin/javax/swing/plaf/FontUIResource.js,bin/javax/swing/ImageIcon.js,bin/javax/accessibility/AccessibleIcon.js,bin/javax/swing/JInternalFrame.js,bin/java/io/FileSystem.js,bin/java/net/MalformedURLException.js,bin/java/io/InputStreamReader.js,bin/java/util/NoSuchElementException.js,bin/sun/font/FontManager.js,bin/javax/swing/plaf/basic/LazyActionMap.js,bin/javax/swing/JMenuItem.js,bin/javax/swing/MenuSelectionManager.js,bin/javax/swing/event/MenuKeyEvent.js,bin/javax/swing/Popup.js,bin/sun/awt/ModalExclude.js,bin/javax/swing/SingleSelectionModel.js,bin/javax/swing/CellRendererPane.js,bin/javax/swing/JDesktopPane.js,bin/javax/swing/JLayeredPane.js,bin/javax/swing/text/Position.js,bin/javax/swing/JMenu.js,bin/javax/swing/event/InternalFrameEvent.js,bin/javax/swing/BorderFactory.js,bin/javax/swing/border/BevelBorder.js,bin/javax/swing/plaf/basic/BasicBorders.js,bin/javax/swing/plaf/BorderUIResource.js,bin/javax/swing/border/CompoundBorder.js,bin/javax/swing/border/EtchedBorder.js,bin/javax/swing/border/MatteBorder.js,bin/javax/swing/border/TitledBorder.js,bin/javax/swing/event/MenuListener.js,bin/javax/swing/JTree.js,bin/javax/swing/Timer.js,bin/javax/swing/plaf/IconUIResource.js,bin/javax/swing/tree/TreePath.js,bin/javax/swing/tree/TreeModel.js,bin/sun/awt/SunHints.js,bin/java/util/LinkedHashMap.js,bin/java/util/concurrent/locks/ReadWriteLock.js,bin/java/util/concurrent/locks/package-info.js,bin/java/util/concurrent/locks/ReentrantReadWriteLock.js,bin/java/util/concurrent/locks/AbstractQueuedSynchronizer.js,bin/java/util/concurrent/locks/AbstractOwnableSynchronizer.js,bin/java/lang/ThreadLocal.js,bin/java/util/concurrent/locks/Lock.js,bin/java/util/concurrent/locks/Condition.js,bin/javax/swing/GrayFilter.js,bin/sun/swing/ImageIconUIResource.js,bin/sun/swing/plaf/GTKKeybindings.js,bin/sun/swing/plaf/WindowsKeybindings.js,bin/sun/security/action/GetBooleanAction.js,bin/java/util/EnumMap.js,bin/java/lang/Package.js,bin/javax/swing/plaf/basic/BasicGraphicsUtils.js,bin/javax/swing/JRadioButton.js,bin/sun/swing/StringUIClientPropertyKey.js,bin/sun/swing/WindowsPlacesBar.js,bin/javax/swing/ButtonGroup.js,bin/javax/swing/JRadioButtonMenuItem.js,bin/javax/swing/event/PopupMenuEvent.js,bin/javax/swing/JCheckBoxMenuItem.js,bin/javax/swing/PopupFactory.js,bin/javax/swing/SwingHeavyWeight.js,bin/sun/awt/util/IdentityArrayList.js,bin/javax/swing/JFrame.js,bin/javax/swing/plaf/InputMapUIResource.js,bin/javax/swing/table/TableColumn.js,bin/javax/swing/SortOrder.js,bin/java/lang/StringIndexOutOfBoundsException.js,bin/java/util/logging/LogRecord.js,bin/java/util/logging/Handler.js,bin/java/util/logging/Filter.js,bin/java/util/logging/LogManager.js,bin/java/io/FileOutputStream.js,bin/java/lang/reflect/Modifier.js,bin/java/io/FileInputStream.js,bin/java/util/jar/JarFile.js,bin/java/util/jar/JarEntry.js,bin/java/util/zip/ZipEntry.js,bin/java/util/zip/GZIPOutputStream.js,bin/java/util/jar/JarInputStream.js,bin/java/util/zip/ZipInputStream.js,bin/java/util/zip/GZIPInputStream.js,bin/java/util/jar/JarOutputStream.js,bin/java/util/zip/ZipOutputStream.js,bin/java/util/jar/Manifest.js,bin/sun/misc/IOUtils.js,bin/java/util/zip/CRC32.js,bin/java/util/zip/Checksum.js,bin/java/util/TimeZone.js,bin/java/util/zip/CheckedOutputStream.js,bin/java/security/Permissions.js,bin/java/lang/SecurityManager.js,bin/java/lang/Process.js,bin/java/lang/NoClassDefFoundError.js,bin/java/lang/LinkageError.js,bin/java/lang/VerifyError.js,bin/java/lang/ClassFormatError.js,bin/java/lang/ClassCircularityError.js,bin/java/lang/UnsupportedClassVersionError.js,bin/java/lang/IllegalThreadStateException.js,bin/java/util/ConcurrentModificationException.js,bin/java/io/StringWriter.js,bin/javax/management/Attribute.js,bin/javax/management/AttributeList.js,bin/javax/management/AttributeNotFoundException.js,bin/javax/management/OperationsException.js,bin/javax/management/JMException.js,bin/javax/management/InstanceAlreadyExistsException.js,bin/javax/management/InstanceNotFoundException.js,bin/javax/management/IntrospectionException.js,bin/javax/management/InvalidAttributeValueException.js,bin/javax/management/ListenerNotFoundException.js,bin/javax/management/MalformedObjectNameException.js,bin/javax/management/MBeanException.js,bin/javax/management/MBeanPermission.js,bin/javax/management/MBeanRegistrationException.js,bin/javax/management/MBeanServerNotification.js,bin/javax/management/MBeanTrustPermission.js,bin/javax/management/NotCompliantMBeanException.js,bin/javax/management/NotificationFilter.js,bin/javax/management/ObjectInstance.js,bin/javax/management/ObjectName.js,bin/javax/management/ReflectionException.js,bin/javax/management/RuntimeErrorException.js,bin/javax/management/RuntimeMBeanException.js,bin/javax/management/RuntimeOperationsException.js,bin/javax/management/BadStringOperationException.js,bin/javax/management/BadBinaryOpValueExpException.js,bin/javax/management/BadAttributeValueExpException.js,bin/javax/management/InvalidApplicationException.js,bin/javax/management/MBeanAttributeInfo.js,bin/javax/management/MBeanFeatureInfo.js,bin/javax/management/MBeanNotificationInfo.js,bin/javax/management/loading/PrivateClassLoader.js,bin/javax/management/Descriptor.js,bin/javax/management/openmbean/OpenDataException.js,bin/sun/reflect/misc/MethodUtil.js,bin/java/security/SecureClassLoader.js,bin/javax/management/ImmutableDescriptor.js,bin/javax/management/JMX.js,bin/java/lang/reflect/UndeclaredThrowableException.js,bin/javax/management/DescriptorKey.js,bin/javax/management/MBeanServerPermission.js,bin/javax/management/MBeanServerFactory.js,bin/sun/reflect/misc/ConstructorUtil.js,bin/java/lang/NoSuchMethodError.js,bin/java/lang/IncompatibleClassChangeError.js,bin/javax/management/MBeanConstructorInfo.js,bin/javax/management/MBeanOperationInfo.js,bin/javax/management/MBeanParameterInfo.js,bin/javax/management/openmbean/OpenMBeanAttributeInfoSupport.js,bin/javax/management/openmbean/OpenMBeanAttributeInfo.js,bin/javax/management/openmbean/OpenMBeanParameterInfo.js,bin/javax/management/openmbean/OpenMBeanOperationInfoSupport.js,bin/javax/management/openmbean/OpenMBeanOperationInfo.js,bin/javax/management/openmbean/OpenMBeanParameterInfoSupport.js,bin/java/lang/reflect/Proxy.js,bin/javax/management/MBeanServerInvocationHandler.js,bin/java/io/ObjectStreamClass.js,bin/java/io/NotActiveException.js,bin/java/util/BitSet.js,bin/java/util/TreeSet.js,bin/javax/management/openmbean/ArrayType.js,bin/javax/management/openmbean/CompositeDataInvocationHandler.js,bin/javax/management/openmbean/CompositeDataSupport.js,bin/javax/management/openmbean/CompositeType.js,bin/javax/management/openmbean/TabularData.js,bin/javax/management/openmbean/TabularDataSupport.js,bin/javax/management/openmbean/TabularType.js,bin/java/math/BigDecimal.js,bin/java/util/IdentityHashMap.js,bin/javax/management/NotificationBroadcasterSupport.js,bin/javax/management/NotificationFilterSupport.js,bin/javax/management/remote/NotificationResult.js,bin/javax/management/remote/TargetedNotification.js,bin/java/io/InterruptedIOException.js,bin/javax/security/auth/Subject.js,bin/java/io/NotSerializableException.js,bin/sun/nio/ch/Interruptible.js,bin/java/rmi/RemoteException.js,bin/java/rmi/server/Operation.js,bin/java/rmi/server/RemoteCall.js,bin/java/rmi/NoSuchObjectException.js,bin/java/rmi/server/RMIClientSocketFactory.js,bin/java/rmi/server/RMIServerSocketFactory.js,bin/java/rmi/server/RemoteStub.js,bin/sun/rmi/server/UnicastServerRef.js,bin/sun/rmi/server/UnicastRef.js,bin/java/rmi/server/ServerRef.js,bin/sun/rmi/server/Dispatcher.js,bin/sun/rmi/server/WeakClassHashMap.js,bin/java/lang/ClassCastException.js,bin/java/rmi/MarshalledObject.js,bin/sun/rmi/server/MarshalOutputStream.js,bin/sun/rmi/server/MarshalInputStream.js,bin/javax/management/remote/JMXConnector.js,bin/javax/management/remote/JMXServiceURL.js,bin/javax/management/remote/rmi/RMIConnector.js,bin/javax/management/remote/JMXAddressable.js,bin/javax/management/remote/rmi/RMIServer.js,bin/javax/management/remote/JMXConnectorServer.js,bin/javax/management/remote/JMXConnectorServerMBean.js,bin/javax/management/remote/rmi/RMIConnectorServer.js,bin/javax/management/remote/rmi/RMIServerImpl.js,bin/java/io/FilePermission.js,bin/java/security/AccessControlException.js,bin/javax/management/remote/JMXPrincipal.js,bin/sun/management/jmxremote/ConnectorBootstrap.js,bin/sun/management/AgentConfigurationError.js,bin/javax/security/auth/login/LoginException.js,bin/java/net/InetAddress.js,bin/java/net/UnknownHostException.js,bin/java/rmi/registry/Registry.js,bin/java/lang/management/ManagementFactory.js,bin/javax/management/remote/JMXConnectorServerFactory.js,bin/javax/rmi/ssl/SslRMIClientSocketFactory.js,bin/javax/rmi/ssl/SslRMIServerSocketFactory.js,bin/sun/rmi/server/UnicastServerRef2.js,bin/sun/management/Agent.js,bin/sun/management/FileSystem.js,bin/javax/security/auth/login/FailedLoginException.js,bin/javax/security/auth/callback/Callback.js,bin/javax/security/auth/callback/NameCallback.js,bin/javax/security/auth/callback/PasswordCallback.js,bin/javax/security/auth/callback/UnsupportedCallbackException.js,bin/javax/security/auth/AuthPermission.js,bin/javax/security/auth/login/AppConfigurationEntry.js,bin/javax/security/auth/login/LoginContext.js,bin/java/security/CodeSigner.js,bin/java/util/regex/Pattern.js,bin/javax/management/remote/SubjectDelegationPermission.js,bin/sun/misc/URLClassPath.js,bin/java/lang/AssertionStatusDirectives.js,bin/javax/management/remote/JMXConnectorFactory.js,bin/java/lang/ArithmeticException.js,bin/java/security/acl/NotOwnerException.js,bin/java/security/acl/LastOwnerException.js,bin/java/util/Stack.js,bin/java/util/EmptyStackException.js,bin/javax/management/ServiceNotFoundException.js,bin/javax/management/AttributeChangeNotification.js,bin/java/net/DatagramSocket.js,bin/java/net/DatagramPacket.js,bin/java/net/SocketException.js,bin/java/net/DatagramSocketImpl.js,bin/java/net/SocketOptions.js,bin/java/net/SocketAddress.js,bin/javax/naming/spi/NamingManager.js,bin/javax/naming/CannotProceedException.js,bin/javax/naming/ConfigurationException.js,bin/javax/naming/InvalidNameException.js,bin/javax/naming/CommunicationException.js,bin/javax/naming/CompositeName.js,bin/javax/naming/NotContextException.js,bin/javax/naming/Reference.js,bin/javax/naming/RefAddr.js,bin/javax/naming/NameNotFoundException.js,bin/javax/naming/OperationNotSupportedException.js,bin/javax/naming/NameAlreadyBoundException.js,bin/javax/naming/ContextNotEmptyException.js,bin/java/rmi/server/ExportException.js,bin/java/net/Socket.js,bin/sun/security/jca/JCAUtil.js,bin/javax/naming/ServiceUnavailableException.js,bin/java/net/Proxy.js,bin/java/net/SocketImpl.js,bin/javax/naming/spi/DirectoryManager.js,bin/javax/naming/directory/InvalidAttributeIdentifierException.js,bin/javax/naming/directory/Attributes.js,bin/javax/naming/directory/ModificationItem.js,bin/javax/naming/directory/SearchControls.js,bin/javax/naming/directory/BasicAttributes.js,bin/sun/net/dns/ResolverConfiguration.js,bin/javax/net/SocketFactory.js,bin/javax/naming/InterruptedNamingException.js,bin/javax/naming/ldap/SortResponseControl.js,bin/javax/naming/ldap/BasicControl.js,bin/javax/naming/ldap/PagedResultsResponseControl.js,bin/javax/naming/event/NamingEvent.js,bin/javax/naming/event/NamingExceptionEvent.js,bin/javax/naming/event/NamingListener.js,bin/javax/naming/ldap/UnsolicitedNotificationEvent.js,bin/javax/naming/ldap/UnsolicitedNotificationListener.js,bin/javax/naming/event/ObjectChangeListener.js,bin/javax/naming/event/NamespaceChangeListener.js,bin/javax/naming/directory/InvalidSearchFilterException.js,bin/javax/naming/InitialContext.js,bin/javax/naming/directory/InitialDirContext.js,bin/javax/naming/NoInitialContextException.js,bin/javax/naming/AuthenticationNotSupportedException.js,bin/javax/naming/NamingSecurityException.js,bin/javax/naming/AuthenticationException.js,bin/javax/naming/directory/InvalidAttributeValueException.js,bin/javax/naming/ldap/LdapName.js,bin/javax/naming/ldap/Rdn.js,bin/javax/naming/ldap/ExtendedRequest.js,bin/javax/naming/directory/SchemaViolationException.js,bin/javax/naming/PartialResultException.js,bin/javax/naming/LimitExceededException.js,bin/javax/naming/directory/AttributeInUseException.js,bin/javax/naming/NoPermissionException.js,bin/javax/naming/directory/NoSuchAttributeException.js,bin/javax/naming/SizeLimitExceededException.js,bin/javax/naming/TimeLimitExceededException.js,bin/javax/naming/StringRefAddr.js,bin/javax/naming/spi/DirStateFactory.js,bin/sun/misc/BASE64Encoder.js,bin/sun/misc/BASE64Decoder.js,bin/sun/misc/CharacterDecoder.js,bin/java/lang/IllegalAccessError.js,bin/javax/naming/directory/InvalidAttributesException.js,bin/java/net/URLClassLoader.js,bin/sun/misc/SharedSecrets.js,bin/sun/misc/JavaLangAccess.js,bin/javax/security/auth/kerberos/KerberosPrincipal.js,bin/javax/net/ssl/SSLSession.js,bin/javax/net/ssl/SSLSocket.js,bin/javax/net/ssl/SSLSocketFactory.js,bin/javax/net/ssl/SSLPeerUnverifiedException.js,bin/javax/net/ssl/SSLException.js,bin/javax/net/ssl/SSLContext.js,bin/sun/security/util/HostnameChecker.js,bin/java/lang/AbstractMethodError.js,bin/javax/naming/ldap/StartTlsRequest.js,bin/javax/security/sasl/RealmCallback.js,bin/javax/security/auth/callback/TextInputCallback.js,bin/javax/security/sasl/RealmChoiceCallback.js,bin/javax/security/auth/callback/ChoiceCallback.js,bin/javax/security/sasl/Sasl.js,bin/javax/security/sasl/SaslException.js,bin/java/rmi/server/ServerNotActiveException.js,bin/java/rmi/registry/LocateRegistry.js,bin/java/rmi/NotBoundException.js,bin/java/rmi/AccessException.js,bin/java/rmi/AlreadyBoundException.js,bin/java/rmi/ConnectException.js,bin/java/rmi/StubNotFoundException.js,bin/java/rmi/UnknownHostException.js,bin/java/rmi/server/SocketSecurityException.js,bin/java/rmi/ConnectIOException.js,bin/java/rmi/MarshalException.js,bin/java/rmi/UnmarshalException.js,bin/java/rmi/ServerException.js,bin/java/rmi/RMISecurityManager.js,bin/javax/naming/LinkRef.js,bin/javax/naming/directory/AttributeModificationException.js,bin/java/lang/management/MemoryUsage.js,bin/sun/management/GcInfoCompositeData.js,bin/sun/management/LazyCompositeData.js,bin/sun/management/GcInfoBuilder.js,bin/sun/management/VMOptionCompositeData.js,bin/javax/sound/sampled/AudioFormat.js,bin/javax/sound/sampled/AudioSystem.js,bin/javax/sound/sampled/LineEvent.js,bin/javax/sound/sampled/LineUnavailableException.js,bin/javax/sound/midi/MidiUnavailableException.js,bin/javax/sound/midi/InvalidMidiDataException.js,bin/javax/sound/sampled/UnsupportedAudioFileException.js,bin/javax/sound/midi/ControllerEventListener.js,bin/javax/sound/midi/MetaMessage.js,bin/javax/sound/sampled/AudioPermission.js,bin/sun/misc/Service.js,bin/sun/misc/ServiceConfigurationError.js,bin/javax/sound/midi/MidiSystem.js,bin/javax/sound/midi/MidiFileFormat.js,bin/javax/sound/midi/Sequence.js,bin/javax/sound/midi/Track.js,bin/javax/sound/midi/MidiEvent.js,bin/javax/sound/sampled/EnumControl.js,bin/java/util/prefs/BackingStoreException.js,bin/java/util/prefs/Preferences.js,bin/java/io/FileFilter.js,bin/java/io/PipedInputStream.js,bin/java/io/PipedOutputStream.js,bin/sun/net/www/MessageHeader.js,bin/java/net/InetSocketAddress.js,bin/java/net/BindException.js,bin/javax/net/ssl/SSLParameters.js,bin/java/lang/RuntimePermission.js,bin/sun/net/httpserver/DefaultHttpServerProvider.js,bin/java/net/ProtocolException.js,bin/java/net/UnknownServiceException.js,bin/java/net/FileNameMap.js,bin/java/net/ContentHandlerFactory.js,bin/javax/net/ssl/HttpsURLConnection.js,bin/javax/net/ssl/KeyManagerFactory.js,bin/javax/net/ssl/KeyManagerFactorySpi.js,bin/sun/security/ssl/SSLSocketFactoryImpl.js,bin/sun/security/ssl/SSLServerSocketFactoryImpl.js,bin/javax/net/ssl/SSLServerSocketFactory.js,bin/javax/net/ServerSocketFactory.js,bin/java/security/KeyManagementException.js,bin/javax/net/ssl/SSLContextSpi.js,bin/javax/net/ssl/SSLPermission.js,bin/javax/net/ssl/TrustManagerFactory.js,bin/javax/net/ssl/SSLEngine.js,bin/javax/net/ssl/ManagerFactoryParameters.js,bin/javax/net/ssl/TrustManagerFactorySpi.js,bin/javax/security/auth/x500/X500Principal.js,bin/sun/security/x509/X500Name.js,bin/sun/security/x509/GeneralNameInterface.js,bin/sun/net/www/http/HttpClient.js,bin/sun/net/NetworkClient.js,bin/sun/net/www/protocol/http/AuthenticationHeader.js,bin/sun/net/www/protocol/http/AuthenticationInfo.js,bin/sun/net/www/protocol/http/AuthCacheValue.js,bin/java/net/Authenticator.js,bin/java/net/PasswordAuthentication.js,bin/sun/net/www/protocol/http/HttpAuthenticator.js,bin/java/security/cert/CertificateParsingException.js,bin/java/util/concurrent/ConcurrentHashMap.js,bin/java/util/concurrent/ConcurrentMap.js,bin/java/util/concurrent/locks/ReentrantLock.js,bin/java/security/Signature.js,bin/java/security/SignatureSpi.js,bin/java/security/SignatureException.js,bin/sun/security/jca/GetInstance.js,bin/java/net/URISyntaxException.js,bin/java/security/interfaces/DSAPublicKey.js,bin/java/security/interfaces/DSAKey.js,bin/java/security/spec/DSAPublicKeySpec.js,bin/java/security/spec/RSAPublicKeySpec.js,bin/java/util/concurrent/CopyOnWriteArrayList.js,bin/java/security/cert/CertificateExpiredException.js,bin/java/security/cert/CertificateNotYetValidException.js,bin/java/security/SecurityPermission.js,bin/java/util/concurrent/atomic/AtomicInteger.js,bin/java/util/concurrent/atomic/package-info.js,bin/java/sql/ResultSetMetaData.js,bin/javax/sql/rowset/RowSetMetaDataImpl.js,bin/javax/sql/RowSetMetaData.js,bin/java/sql/Connection.js,bin/javax/sql/rowset/RowSetWarning.js,bin/java/sql/SQLException.js,bin/java/sql/SQLWarning.js,bin/javax/sql/rowset/spi/SyncProviderException.js,bin/java/sql/Array.js,bin/java/sql/Blob.js,bin/java/sql/Clob.js,bin/java/sql/Date.js,bin/java/util/Calendar.js,bin/java/sql/NClob.js,bin/java/sql/Ref.js,bin/java/sql/RowId.js,bin/java/sql/SQLXML.js,bin/java/sql/Statement.js,bin/java/sql/Time.js,bin/java/sql/Timestamp.js,bin/java/sql/Savepoint.js,bin/javax/sql/RowSetEvent.js,bin/javax/sql/RowSetListener.js,bin/javax/sql/rowset/spi/SyncFactory.js,bin/javax/sql/rowset/spi/SyncFactoryException.js,bin/java/sql/Struct.js,bin/javax/sql/rowset/serial/SerialStruct.js,bin/javax/sql/rowset/serial/SerialException.js,bin/java/sql/SQLData.js,bin/javax/sql/rowset/serial/SerialBlob.js,bin/javax/sql/rowset/serial/SerialClob.js,bin/javax/sql/rowset/serial/SerialArray.js,bin/java/sql/DatabaseMetaData.js,bin/java/io/OptionalDataException.js,bin/java/math/MathContext.js,bin/java/math/RoundingMode.js,bin/java/sql/Types.js,bin/java/text/DateFormat.js,bin/java/text/spi/DateFormatProvider.js,bin/java/text/ParsePosition.js,bin/java/io/StringBufferInputStream.js,bin/javax/sql/rowset/serial/SQLInputImpl.js,bin/java/sql/SQLInput.js,bin/javax/sql/rowset/serial/SerialRef.js,bin/java/sql/SQLFeatureNotSupportedException.js,bin/java/sql/SQLNonTransientException.js,bin/javax/sql/rowset/Predicate.js,bin/java/sql/PreparedStatement.js,bin/java/sql/ParameterMetaData.js,bin/javax/sql/DataSource.js,bin/javax/sql/CommonDataSource.js,bin/java/sql/DriverManager.js,bin/java/io/OutputStreamWriter.js,bin/javax/script/ScriptContext.js,bin/sun/misc/FloatingDecimal.js,bin/sun/misc/FpUtils.js,bin/sun/misc/FloatConsts.js,bin/sun/misc/DoubleConsts.js,bin/javax/script/ScriptException.js,bin/java/security/AllPermission.js,bin/javax/script/SimpleBindings.js,bin/javax/script/SimpleScriptContext.js,bin/sun/security/util/ResourcesMgr.js,bin/java/security/Identity.js,bin/java/security/IdentityScope.js,bin/java/security/UnresolvedPermission.js,bin/javax/security/auth/PrivateCredentialPermission.js,bin/sun/security/util/PropertyExpander.js,bin/java/security/Policy.js,bin/java/net/SocketPermission.js,bin/java/io/StreamTokenizer.js,bin/java/io/FileReader.js,bin/java/io/FileWriter.js,bin/sun/security/provider/PolicyParser.js,bin/javax/security/auth/callback/ConfirmationCallback.js,bin/javax/security/auth/callback/TextOutputCallback.js,bin/javax/swing/JPasswordField.js,bin/java/io/PushbackInputStream.js,bin/sun/security/util/Password.js,bin/sun/security/util/AuthResources.js,bin/java/security/AuthProvider.js,bin/javax/security/auth/DestroyFailedException.js,bin/java/security/cert/CertPath.js,bin/javax/security/auth/x500/X500PrivateCredential.js,bin/sun/security/krb5/Config.js,bin/sun/security/krb5/RealmException.js,bin/sun/security/krb5/KrbException.js,bin/sun/security/jgss/krb5/Krb5Util.js,bin/sun/security/krb5/Credentials.js,bin/sun/security/krb5/EncryptionKey.js,bin/javax/security/auth/kerberos/KerberosKey.js,bin/javax/security/auth/kerberos/KerberosTicket.js,bin/javax/security/auth/Refreshable.js,bin/sun/security/krb5/PrincipalName.js,bin/sun/security/krb5/Asn1Exception.js,bin/javax/security/auth/RefreshFailedException.js,bin/java/util/regex/Matcher.js,bin/java/util/regex/MatchResult.js,bin/javax/naming/ldap/InitialLdapContext.js,bin/javax/security/cert/CertificateException.js,bin/javax/security/cert/CertificateExpiredException.js,bin/javax/security/cert/CertificateNotYetValidException.js,bin/javax/security/cert/CertificateEncodingException.js,bin/org/ietf/jgss/GSSName.js,bin/org/ietf/jgss/GSSCredential.js,bin/sun/security/jgss/GSSUtil.js,bin/javax/security/sasl/AuthorizeCallback.js,bin/org/ietf/jgss/Oid.js,bin/org/ietf/jgss/MessageProp.js,bin/org/ietf/jgss/GSSContext.js,bin/org/ietf/jgss/GSSException.js,bin/org/ietf/jgss/GSSManager.js,bin/java/util/ServiceLoader.js,bin/java/lang/ThreadDeath.js,bin/java/lang/ArrayStoreException.js,bin/javax/swing/tree/DefaultTreeModel.js,bin/javax/swing/UnsupportedLookAndFeelException.js,bin/javax/swing/event/TreeSelectionEvent.js,bin/javax/swing/DefaultListModel.js,bin/javax/swing/JTextArea.js,bin/java/text/NumberFormat.js,bin/java/text/spi/NumberFormatProvider.js,bin/java/util/jar/Attributes.js,bin/java/net/JarURLConnection.js,bin/sun/net/www/ParseUtil.js,bin/sun/misc/ASCIICaseInsensitiveComparator.js,bin/java/nio/channels/FileChannel.js,bin/java/nio/channels/spi/AbstractInterruptibleChannel.js,bin/java/nio/channels/Channel.js,bin/java/nio/channels/InterruptibleChannel.js,bin/java/nio/channels/ByteChannel.js,bin/java/nio/channels/ReadableByteChannel.js,bin/java/nio/channels/WritableByteChannel.js,bin/java/nio/channels/GatheringByteChannel.js,bin/java/nio/channels/ScatteringByteChannel.js,bin/java/nio/MappedByteBuffer.js,bin/java/net/URLDecoder.js,bin/java/net/URLEncoder.js,bin/java/net/ServerSocket.js,bin/javax/swing/event/SwingPropertyChangeSupport.js,bin/javax/swing/SwingWorker.js,bin/java/util/concurrent/RunnableFuture.js,bin/java/util/concurrent/Future.js,bin/sun/swing/AccumulativeRunnable.js,bin/java/util/concurrent/FutureTask.js,bin/java/lang/UnsatisfiedLinkError.js,bin/java/net/Inet6Address.js,bin/java/net/SocketTimeoutException.js,bin/javax/script/ScriptEngineManager.js,bin/javax/accessibility/AccessibleRole.js,bin/javax/accessibility/AccessibleBundle.js,bin/javax/accessibility/AccessibleRelationSet.js,bin/javax/accessibility/AccessibleState.js,bin/sun/applet/AppletAudioClip.js,bin/javax/swing/event/EventListenerList.js,bin/java/lang/ExceptionInInitializerError.js,bin/sun/java2d/SunCompositeContext.js,bin/sun/java2d/pipe/RenderingEngine.js,bin/sun/awt/image/IntegerComponentRaster.js,bin/javax/swing/BufferStrategyPaintManager.js,bin/javax/swing/RepaintManager.js,bin/sun/font/FontDesignMetrics.js,bin/sun/awt/im/InputContext.js,bin/sun/awt/PeerEvent.js,bin/sun/awt/dnd/SunDropTargetContextPeer.js,bin/sun/awt/DesktopBrowse.js,bin/java/util/concurrent/atomic/AtomicLong.js,bin/sun/awt/util/IdentityLinkedList.js,bin/sun/awt/AWTAutoShutdown.js,bin/sun/awt/dnd/SunDragSourceContextPeer.js,bin/sun/misc/JavaSecurityAccess.js,bin/java/text/StringCharacterIterator.js,bin/sun/font/StandardGlyphVector.js,bin/sun/font/AttributeMap.js,bin/sun/font/AttributeValues.js,bin/sun/font/CompositeFont.js,bin/sun/font/Font2D.js,bin/sun/font/CreatedFontTracker.js,bin/sun/font/Font2DHandle.js,bin/sun/font/GlyphLayout.js,bin/sun/font/FontLineMetrics.js,bin/sun/font/CoreMetrics.js,bin/java/text/Bidi.js,bin/java/text/Annotation.js,bin/sun/awt/image/SunVolatileImage.js,bin/sun/java2d/pipe/hw/AccelSurface.js,bin/sun/java2d/pipe/hw/BufferedContextProvider.js,bin/sun/java2d/Surface.js,bin/sun/java2d/HeadlessGraphicsEnvironment.js,bin/sun/awt/image/SurfaceManager.js,bin/sun/awt/geom/Crossings.js,bin/sun/awt/ScrollPaneWheelScroller.js,bin/java/text/BreakIterator.js,bin/java/text/spi/BreakIteratorProvider.js,bin/javax/accessibility/AccessibleTextSequence.js,bin/sun/awt/image/IntegerInterleavedRaster.js,bin/sun/awt/UngrabEvent.js,bin/java/lang/Compiler.js,bin/java/util/concurrent/atomic/AtomicBoolean.js,bin/sun/java2d/cmm/PCMM.js,bin/sun/java2d/cmm/CMSManager.js,bin/sun/java2d/cmm/ColorTransform.js,bin/sun/java2d/cmm/ProfileDeferralMgr.js,bin/sun/java2d/cmm/ProfileDeferralInfo.js,bin/sun/java2d/cmm/ProfileActivator.js,bin/sun/awt/EventListenerAggregate.js,bin/java/util/TooManyListenersException.js,bin/sun/security/action/GetIntegerAction.js,bin/sun/awt/datatransfer/TransferableProxy.js,bin/sun/font/Decoration.js,bin/sun/font/FontResolver.js,bin/sun/text/CodePointIterator.js,bin/sun/font/GraphicComponent.js,bin/sun/font/TextLineComponent.js,bin/sun/font/LayoutPathImpl.js,bin/sun/awt/geom/Curve.js,bin/sun/font/BidiUtils.js,bin/sun/font/TextLabelFactory.js,bin/sun/font/ExtendedTextLabel.js,bin/sun/font/TextLabel.js,bin/sun/awt/geom/AreaOp.js,bin/sun/awt/im/InputMethodContext.js,bin/sun/awt/image/ImagingLib.js,bin/sun/awt/image/BytePackedRaster.js,bin/sun/awt/image/ShortComponentRaster.js,bin/sun/awt/image/OffScreenImageSource.js,bin/sun/java2d/StateTrackableDelegate.js,bin/sun/awt/image/BufImgSurfaceData.js,bin/sun/java2d/SurfaceData.js,bin/sun/java2d/DisposerTarget.js,bin/sun/awt/image/ShortInterleavedRaster.js,bin/sun/awt/image/ByteBandedRaster.js,bin/sun/awt/image/ShortBandedRaster.js,bin/javax/print/DocFlavor.js,bin/javax/print/PrintServiceLookup.js,bin/javax/print/StreamPrintServiceFactory.js,bin/javax/print/attribute/standard/Media.js,bin/javax/print/attribute/EnumSyntax.js,bin/javax/print/attribute/DocAttribute.js,bin/javax/print/attribute/Attribute.js,bin/javax/print/attribute/PrintRequestAttribute.js,bin/javax/print/attribute/PrintJobAttribute.js,bin/javax/print/attribute/standard/MediaPrintableArea.js,bin/javax/print/attribute/standard/MediaSize.js,bin/javax/print/attribute/Size2DSyntax.js,bin/javax/print/attribute/standard/MediaSizeName.js,bin/javax/print/attribute/standard/OrientationRequested.js,bin/sun/swing/PrintColorUIResource.js,bin/java/util/EnumSet.js,bin/javax/swing/DefaultComboBoxModel.js,bin/javax/swing/MutableComboBoxModel.js,bin/javax/swing/ToolTipManager.js,bin/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.js,bin/java/io/LineNumberReader.js,bin/java/util/PropertyPermission.js,bin/java/net/NetPermission.js,bin/sun/java2d/StateTracker.js,bin/java/lang/IllegalMonitorStateException.js,bin/java/io/InvalidClassException.js,bin/java/lang/TypeNotPresentException.js,bin/java/lang/reflect/MalformedParameterizedTypeException.js,bin/javax/crypto/KeyGenerator.js,bin/java/security/Signer.js,bin/java/security/Certificate.js,bin/java/security/interfaces/DSAPrivateKey.js,bin/java/security/interfaces/RSAPrivateCrtKey.js,bin/javax/net/ssl/KeyStoreBuilderParameters.js,bin/javax/crypto/JceSecurityManager.js,bin/javax/crypto/CryptoAllPermission.js,bin/sun/security/jca/ServiceId.js,bin/javax/crypto/JceSecurity.js,bin/javax/crypto/NullCipher.js,bin/javax/crypto/ExemptionMechanismException.js,bin/javax/crypto/spec/RC5ParameterSpec.js,bin/java/security/cert/CertStoreParameters.js,bin/java/util/LinkedHashSet.js,bin/java/util/XMLUtils.js,bin/javax/imageio/spi/ImageTranscoderSpi.js,bin/sun/util/ResourceBundleEnumeration.js,bin/sun/reflect/Reflection.js,bin/java/io/UTFDataFormatException.js,bin/java/io/WriteAbortedException.js,bin/javax/swing/DebugGraphics.js,bin/javax/swing/SortingFocusTraversalPolicy.js,bin/javax/swing/InternalFrameFocusTraversalPolicy.js,bin/javax/swing/LegacyGlueFocusTraversalPolicy.js,bin/javax/swing/KeyboardManager.js,bin/javax/swing/Autoscroller.js,bin/javax/swing/event/AncestorEvent.js,bin/sun/swing/AccessibleMethod.js,bin/javax/accessibility/AccessibleRelation.js,bin/javax/swing/text/StyledDocument.js,bin/java/util/regex/PatternSyntaxException.js,bin/sun/swing/plaf/synth/SynthFileChooserUIImpl.js,bin/javax/swing/plaf/basic/BasicHTML.js,bin/javax/swing/text/html/HTMLEditorKit.js,bin/javax/swing/text/StyledEditorKit.js,bin/javax/swing/text/html/HTMLDocument.js,bin/javax/swing/text/DefaultStyledDocument.js,bin/javax/swing/text/html/BlockView.js,bin/javax/swing/text/PlainDocument.js,bin/javax/swing/plaf/synth/SynthButtonUI.js,bin/javax/swing/plaf/synth/SynthCheckBoxUI.js,bin/javax/swing/plaf/synth/SynthRadioButtonUI.js,bin/javax/swing/plaf/synth/SynthToggleButtonUI.js,bin/javax/swing/plaf/synth/SynthCheckBoxMenuItemUI.js,bin/javax/swing/plaf/synth/SynthMenuItemUI.js,bin/javax/swing/plaf/synth/SynthColorChooserUI.js,bin/javax/swing/plaf/basic/BasicColorChooserUI.js,bin/javax/swing/plaf/ColorChooserUI.js,bin/javax/swing/plaf/synth/SynthComboBoxUI.js,bin/javax/swing/plaf/synth/SynthDesktopPaneUI.js,bin/javax/swing/plaf/synth/SynthDesktopIconUI.js,bin/javax/swing/plaf/synth/SynthEditorPaneUI.js,bin/javax/swing/plaf/synth/SynthFormattedTextFieldUI.js,bin/javax/swing/plaf/synth/SynthTextFieldUI.js,bin/javax/swing/plaf/synth/SynthInternalFrameUI.js,bin/javax/swing/plaf/synth/SynthLabelUI.js,bin/javax/swing/plaf/synth/SynthListUI.js,bin/javax/swing/plaf/basic/BasicListUI.js,bin/javax/swing/plaf/ListUI.js,bin/javax/swing/plaf/synth/SynthMenuBarUI.js,bin/javax/swing/plaf/synth/SynthMenuUI.js,bin/javax/swing/plaf/synth/SynthOptionPaneUI.js,bin/javax/swing/plaf/synth/SynthPanelUI.js,bin/javax/swing/plaf/basic/BasicPanelUI.js,bin/javax/swing/plaf/synth/SynthPasswordFieldUI.js,bin/javax/swing/plaf/synth/SynthSeparatorUI.js,bin/javax/swing/plaf/synth/SynthPopupMenuUI.js,bin/javax/swing/plaf/synth/SynthProgressBarUI.js,bin/javax/swing/plaf/synth/SynthRadioButtonMenuItemUI.js,bin/javax/swing/plaf/synth/SynthRootPaneUI.js,bin/javax/swing/plaf/synth/SynthScrollBarUI.js,bin/javax/swing/plaf/synth/SynthScrollPaneUI.js,bin/javax/swing/plaf/synth/SynthSliderUI.js,bin/javax/swing/plaf/synth/SynthSpinnerUI.js,bin/javax/swing/plaf/synth/SynthArrowButton.js,bin/javax/swing/plaf/synth/SynthSplitPaneUI.js,bin/javax/swing/plaf/synth/SynthTabbedPaneUI.js,bin/javax/swing/plaf/synth/SynthTableUI.js,bin/javax/swing/plaf/basic/BasicTableUI.js,bin/javax/swing/plaf/TableUI.js,bin/javax/swing/plaf/synth/SynthTableHeaderUI.js,bin/javax/swing/plaf/synth/SynthTextAreaUI.js,bin/javax/swing/plaf/synth/SynthTextPaneUI.js,bin/javax/swing/plaf/synth/SynthToolBarUI.js,bin/javax/swing/plaf/synth/SynthToolTipUI.js,bin/javax/swing/plaf/basic/BasicToolTipUI.js,bin/javax/swing/plaf/ToolTipUI.js,bin/javax/swing/plaf/synth/SynthTreeUI.js,bin/javax/swing/tree/DefaultTreeCellEditor.js,bin/javax/swing/plaf/synth/SynthViewportUI.js,bin/javax/swing/plaf/ViewportUI.js,bin/javax/swing/plaf/synth/DefaultSynthStyleFactory.js,bin/javax/swing/plaf/synth/SynthParser.js,bin/javax/swing/plaf/synth/SynthDefaultLookup.js,bin/javax/swing/FocusManager.js,bin/javax/swing/LayoutFocusTraversalPolicy.js,bin/sun/misc/Cleaner.js,bin/java/lang/ref/PhantomReference.js,bin/javax/swing/plaf/synth/SynthBorder.js,bin/javax/swing/event/MenuDragMouseEvent.js,bin/javax/swing/DefaultSingleSelectionModel.js,bin/javax/swing/OverlayLayout.js,bin/javax/swing/text/html/CSS.js,bin/javax/swing/text/html/HTML.js,bin/javax/swing/JEditorPane.js,bin/javax/accessibility/AccessibleHypertext.js,bin/javax/accessibility/AccessibleHyperlink.js,bin/javax/swing/text/StyleConstants.js,bin/javax/swing/plaf/basic/DefaultMenuLayout.js,bin/javax/swing/text/PasswordView.js,bin/javax/swing/text/FieldView.js,bin/javax/swing/text/PlainView.js,bin/javax/swing/text/TabSet.js,bin/javax/swing/SizeRequirements.js,bin/javax/swing/text/GlyphView.js,bin/javax/swing/text/TabableView.js,bin/javax/swing/JApplet.js,bin/javax/swing/text/WrappedPlainView.js,bin/javax/swing/text/StateInvariantError.js,bin/javax/swing/event/TreeExpansionEvent.js,bin/javax/swing/event/TreeModelEvent.js,bin/javax/swing/tree/FixedHeightLayoutCache.js,bin/javax/swing/tree/VariableHeightLayoutCache.js,bin/javax/swing/event/RowSorterEvent.js,bin/javax/swing/event/TableModelEvent.js,bin/sun/awt/shell/ShellFolderColumnInfo.js,bin/javax/swing/table/TableStringConverter.js,bin/javax/swing/table/TableColumnModel.js,bin/javax/swing/table/DefaultTableColumnModel.js,bin/javax/swing/event/TableColumnModelEvent.js,bin/javax/swing/SizeSequence.js,bin/javax/swing/SpinnerDateModel.js,bin/java/text/SimpleDateFormat.js,bin/java/util/GregorianCalendar.js,bin/java/util/concurrent/Callable.js,bin/java/security/GuardedObject.js,bin/java/util/Formatter.js,bin/java/text/Collator.js,bin/java/text/spi/CollatorProvider.js,bin/java/lang/StringCoding.js,bin/java/lang/ConditionalSpecialCasing.js,bin/javax/management/Query.js,bin/javax/management/AttributeValueExp.js,bin/javax/management/ValueExp.js,bin/sun/reflect/MethodAccessor.js,bin/sun/reflect/generics/repository/MethodRepository.js,bin/sun/reflect/generics/repository/ConstructorRepository.js,bin/sun/reflect/generics/tree/MethodTypeSignature.js,bin/sun/reflect/generics/factory/CoreReflectionFactory.js,bin/sun/reflect/generics/factory/GenericsFactory.js,bin/sun/reflect/generics/scope/MethodScope.js,bin/sun/reflect/generics/scope/AbstractScope.js,bin/sun/reflect/generics/scope/Scope.js,bin/sun/reflect/annotation/AnnotationParser.js,bin/java/lang/annotation/AnnotationFormatError.js,bin/java/lang/reflect/GenericSignatureFormatError.js,bin/sun/reflect/ConstantPool.js,bin/sun/reflect/annotation/ExceptionProxy.js,bin/java/lang/reflect/ReflectPermission.js,bin/java/lang/EnumConstantNotPresentException.js,bin/java/lang/annotation/AnnotationTypeMismatchException.js,bin/java/lang/annotation/IncompleteAnnotationException.js,bin/sun/misc/Unsafe.js,bin/sun/reflect/SignatureIterator.js,bin/sun/reflect/generics/scope/ClassScope.js,bin/java/io/SerialCallbackContext.js,bin/java/io/SerializablePermission.js,bin/java/lang/InheritableThreadLocal.js,bin/java/util/concurrent/RejectedExecutionException.js,bin/java/util/concurrent/ExecutorService.js,bin/java/util/concurrent/ThreadPoolExecutor.js,bin/java/util/concurrent/AbstractExecutorService.js,bin/java/util/concurrent/RejectedExecutionHandler.js,bin/java/util/concurrent/Executors.js,bin/java/util/concurrent/ThreadFactory.js,bin/java/util/concurrent/ScheduledExecutorService.js,bin/java/util/concurrent/ScheduledThreadPoolExecutor.js,bin/java/util/concurrent/RunnableScheduledFuture.js,bin/java/util/concurrent/ScheduledFuture.js,bin/java/util/concurrent/Delayed.js,bin/java/util/concurrent/BlockingQueue.js,bin/java/util/concurrent/ExecutorCompletionService.js,bin/java/util/concurrent/CompletionService.js,bin/java/util/concurrent/ConcurrentLinkedQueue.js,bin/java/util/concurrent/LinkedBlockingQueue.js,bin/java/util/concurrent/ArrayBlockingQueue.js,bin/java/util/concurrent/SynchronousQueue.js,bin/java/util/concurrent/PriorityBlockingQueue.js,bin/java/util/concurrent/DelayQueue.js,bin/java/util/concurrent/BlockingDeque.js,bin/java/util/concurrent/LinkedBlockingDeque.js,bin/java/util/concurrent/TimeUnit.js,bin/java/util/concurrent/Semaphore.js,bin/java/util/concurrent/CountDownLatch.js,bin/java/util/concurrent/CyclicBarrier.js,bin/java/util/concurrent/Exchanger.js,bin/java/util/concurrent/atomic/AtomicReference.js,bin/java/util/concurrent/ConcurrentSkipListMap.js,bin/java/util/concurrent/ConcurrentNavigableMap.js,bin/java/util/concurrent/ConcurrentSkipListSet.js,bin/java/util/concurrent/CopyOnWriteArraySet.js,bin/javax/security/auth/login/ConfigurationSpi.js,bin/sun/misc/ClassFileTransformer.js,bin/sun/misc/CompoundEnumeration.js,bin/sun/misc/Resource.js,bin/sun/misc/VM.js,bin/sun/misc/Launcher.js,bin/java/net/URLStreamHandlerFactory.js,bin/java/util/concurrent/locks/LockSupport.js,bin/sun/misc/SoftCache.js,bin/java/lang/StackOverflowError.js,bin/java/nio/channels/Selector.js,bin/javax/naming/spi/InitialContextFactoryBuilder.js,bin/javax/naming/NameImpl.js,bin/javax/naming/directory/InvalidSearchControlsException.js,bin/javax/naming/spi/ObjectFactoryBuilder.js,bin/java/rmi/server/ServerCloneException.js,bin/sun/rmi/transport/LiveRef.js,bin/sun/rmi/transport/ObjectTable.js,bin/java/rmi/server/RemoteObjectInvocationHandler.js,bin/sun/rmi/runtime/Log.js,bin/java/util/logging/StreamHandler.js,bin/java/rmi/ServerError.js,bin/java/rmi/server/Skeleton.js,bin/java/rmi/server/SkeletonNotFoundException.js,bin/sun/rmi/transport/Target.js,bin/sun/rmi/transport/tcp/TCPTransport.js,bin/sun/rmi/transport/Transport.js,bin/sun/rmi/server/Util.js,bin/java/rmi/activation/Activatable.js,bin/java/lang/management/MemoryMXBean.js,bin/javax/management/openmbean/InvalidKeyException.js,bin/javax/management/MXBean.js,bin/sun/net/www/MimeTable.js,bin/java/net/SecureCacheResponse.js,bin/java/net/CacheResponse.js,bin/sun/net/www/protocol/https/HttpsClient.js,bin/javax/net/ssl/HandshakeCompletedListener.js,bin/java/net/HttpRetryException.js,bin/java/net/ProxySelector.js,bin/java/net/CookieHandler.js,bin/java/net/ResponseCache.js,bin/java/net/CacheRequest.js,bin/sun/net/www/http/PosterOutputStream.js,bin/sun/net/www/http/ChunkedInputStream.js,bin/sun/net/www/http/Hurryable.js,bin/sun/net/www/http/ChunkedOutputStream.js,bin/sun/net/www/http/HttpCapture.js,bin/sun/net/www/protocol/http/AuthScheme.js,bin/sun/net/www/protocol/http/DigestAuthentication.js,bin/sun/net/ProgressSource.js,bin/sun/net/ApplicationProxy.js,bin/sun/net/ProgressMonitor.js,bin/sun/net/ProgressMeteringPolicy.js,bin/sun/net/www/protocol/http/HttpCallerInfo.js,bin/sun/net/www/HeaderParser.js,bin/sun/net/www/protocol/http/BasicAuthentication.js,bin/sun/net/www/protocol/http/NTLMAuthenticationProxy.js,bin/sun/net/www/protocol/http/NegotiateAuthentication.js,bin/sun/net/www/MeteredStream.js,bin/sun/net/www/protocol/https/HttpsURLConnectionImpl.js,bin/sun/net/util/IPAddressUtil.js,bin/java/security/Timestamp.js,bin/javax/swing/filechooser/FileNameExtensionFilter.js,bin/java/io/FilterWriter.js,bin/java/io/PipedWriter.js,bin/javax/accessibility/AccessibleAttributeSequence.js,bin/sun/awt/Graphics2Delegate.js,bin/sun/awt/image/ImageRepresentation.js,bin/sun/awt/image/ImageWatched.js,bin/sun/awt/image/ToolkitImage.js,bin/sun/awt/datatransfer/ToolkitThreadBlockedHandler.js,bin/java/nio/charset/CoderResult.js,bin/java/lang/CharacterData.js,bin/java/io/FilterReader.js,bin/java/io/PushbackReader.js,bin/java/io/PipedReader.js,bin/javax/swing/event/UndoableEditListener.js,bin/javax/swing/event/UndoableEditEvent.js,bin/javax/swing/undo/CannotRedoException.js,bin/javax/swing/undo/CannotUndoException.js,bin/javax/swing/text/Utilities.js,bin/javax/swing/text/SegmentCache.js,bin/javax/swing/text/LabelView.js,bin/javax/swing/DefaultBoundedRangeModel.js,bin/sun/swing/PrintingStatus.js,bin/sun/swing/text/TextComponentPrintable.js,bin/sun/swing/text/CountingPrintable.js,bin/javax/print/attribute/HashPrintRequestAttributeSet.js,bin/javax/print/attribute/HashAttributeSet.js,bin/java/util/concurrent/ExecutionException.js,bin/java/util/concurrent/TimeoutException.js,bin/javax/swing/text/TabStop.js,bin/javax/swing/text/ComponentView.js,bin/javax/swing/ViewportLayout.js,bin/javax/swing/table/DefaultTableModel.js,bin/sun/misc/JavaIODeleteOnExitAccess.js,bin/java/io/DeleteOnExitHook.js,bin/sun/misc/JavaIOFileAccess.js,bin/java/nio/channels/FileLock.js,bin/sun/awt/DefaultMouseInfoPeer.js,bin/sun/awt/ModalityEvent.js,bin/sun/awt/DebugSettings.js,bin/sun/awt/KeyboardFocusManagerPeerImpl.js,bin/sun/awt/image/URLImageSource.js,bin/sun/awt/image/InputStreamImageSource.js,bin/sun/awt/image/ImageFetchable.js,bin/sun/awt/image/FileImageSource.js,bin/sun/awt/image/ByteArrayImageSource.js,bin/sun/awt/im/SimpleInputMethodWindow.js,bin/sun/awt/im/InputMethodWindow.js,bin/sun/util/resources/LocaleData.js,bin/sun/util/resources/OpenListResourceBundle.js,bin/java/util/LocaleISOData.js,bin/java/util/ServiceConfigurationError.js,bin/java/text/spi/DateFormatSymbolsProvider.js,bin/java/text/spi/DecimalFormatSymbolsProvider.js,bin/java/util/spi/CurrencyNameProvider.js,bin/java/util/spi/TimeZoneNameProvider.js,bin/sun/reflect/FieldAccessor.js,bin/sun/reflect/generics/repository/FieldRepository.js,bin/sun/reflect/generics/tree/TypeSignature.js,bin/sun/reflect/generics/tree/ReturnType.js,bin/sun/reflect/generics/tree/TypeTree.js,bin/sun/reflect/generics/tree/FieldTypeSignature.js,bin/sun/reflect/generics/tree/BaseType.js,bin/sun/reflect/generics/tree/TypeArgument.js,bin/java/lang/ref/FinalReference.js,bin/sun/reflect/generics/visitor/Reifier.js,bin/sun/reflect/generics/visitor/TypeTreeVisitor.js,bin/sun/java2d/pipe/SpanIterator.js,bin/sun/java2d/pipe/RegionIterator.js,bin/sun/java2d/pipe/ShapeSpanIterator.js,bin/sun/awt/geom/PathConsumer2D.js,bin/sun/java2d/pipe/RegionSpanIterator.js,bin/sun/java2d/pipe/RegionClipSpanIterator.js,bin/java/nio/channels/spi/SelectorProvider.js,bin/sun/net/InetAddressCachePolicy.js,bin/java/io/Console.js,bin/sun/misc/JavaIOAccess.js,bin/java/lang/ProcessBuilder.js,bin/java/io/ExpiringCache.js,bin/java/io/IOError.js,bin/java/io/LineNumberInputStream.js,bin/java/io/SyncFailedException.js,bin/java/lang/ApplicationShutdownHooks.js,bin/java/lang/InstantiationError.js,bin/java/lang/NoSuchFieldError.js,bin/java/lang/Shutdown.js,bin/java/lang/StrictMath.js,bin/java/lang/UnknownError.js,bin/java/lang/annotation/Inherited.js,bin/java/lang/instrument/ClassDefinition.js,bin/java/lang/instrument/ClassFileTransformer.js,bin/java/lang/instrument/IllegalClassFormatException.js,bin/java/lang/instrument/Instrumentation.js,bin/java/lang/instrument/UnmodifiableClassException.js,bin/java/lang/management/ClassLoadingMXBean.js,bin/java/lang/management/CompilationMXBean.js,bin/java/lang/management/LockInfo.js,bin/java/lang/management/ManagementPermission.js,bin/java/lang/management/MemoryNotificationInfo.js,bin/java/lang/management/MemoryPoolMXBean.js,bin/java/lang/management/MemoryType.js,bin/java/lang/management/MonitorInfo.js,bin/java/lang/management/RuntimeMXBean.js,bin/java/lang/management/ThreadInfo.js,bin/java/lang/management/ThreadMXBean.js,bin/java/lang/ref/Finalizer.js,bin/java/lang/reflect/ReflectAccess.js,bin/java/math/BitSieve.js,bin/java/math/MutableBigInteger.js,bin/java/math/SignedMutableBigInteger.js,bin/java/net/AbstractPlainDatagramSocketImpl.js,bin/java/net/AbstractPlainSocketImpl.js,bin/java/net/ConnectException.js,bin/java/net/CookieManager.js,bin/java/net/CookiePolicy.js,bin/java/net/CookieStore.js,bin/java/net/DatagramSocketImplFactory.js,bin/java/net/HttpCookie.js,bin/java/net/IDN.js,bin/java/net/Inet4Address.js,bin/java/net/Inet4AddressImpl.js,bin/java/net/Inet6AddressImpl.js,bin/java/net/InetAddressImpl.js,bin/java/net/InterfaceAddress.js,bin/java/net/MulticastSocket.js,bin/java/net/NetUtil.js,bin/java/net/NetworkInterface.js,bin/java/net/NoRouteToHostException.js,bin/java/net/PortUnreachableException.js,bin/java/net/SocketImplFactory.js,bin/java/net/SocketInputStream.js,bin/java/net/SocketOutputStream.js,bin/java/net/SocksConsts.js,bin/java/net/SocksSocketImpl.js,bin/java/nio/Bits.js,bin/java/nio/ByteBufferAs-X-Buffer.js,bin/java/nio/Direct-X-Buffer-bin.js,bin/java/nio/Direct-X-Buffer.js,bin/java/nio/Heap-X-Buffer.js,bin/java/nio/StringCharBuffer.js,bin/java/nio/X-Buffer-bin.js,bin/java/nio/X-Buffer.js,bin/java/nio/channels/Channels.js,bin/java/nio/channels/DatagramChannel.js,bin/java/nio/channels/Pipe.js,bin/java/nio/channels/SelectableChannel.js,bin/java/nio/channels/SelectionKey.js,bin/java/nio/channels/ServerSocketChannel.js,bin/java/nio/channels/SocketChannel.js,bin/java/nio/channels/spi/AbstractSelectableChannel.js,bin/java/nio/channels/spi/AbstractSelectionKey.js,bin/java/nio/channels/spi/AbstractSelector.js,bin/java/nio/charset/Charset-X-Coder.js,bin/java/nio/charset/CoderMalfunctionError.js,bin/java/nio/charset/CodingErrorAction.js,bin/java/nio/charset/MalformedInputException.js,bin/java/nio/charset/UnmappableCharacterException.js,bin/java/nio/charset/spi/CharsetProvider.js,bin/java/rmi/Naming.js,bin/java/rmi/RMISecurityException.js,bin/java/rmi/ServerRuntimeException.js,bin/java/rmi/UnexpectedException.js,bin/java/rmi/activation/ActivateFailedException.js,bin/java/rmi/activation/ActivationDesc.js,bin/java/rmi/activation/ActivationException.js,bin/java/rmi/activation/ActivationGroup.js,bin/java/rmi/activation/ActivationGroupDesc.js,bin/java/rmi/activation/ActivationGroupID.js,bin/java/rmi/activation/ActivationID.js,bin/java/rmi/activation/ActivationInstantiator.js,bin/java/rmi/activation/ActivationMonitor.js,bin/java/rmi/activation/ActivationSystem.js,bin/java/rmi/activation/Activator.js,bin/java/rmi/activation/UnknownGroupException.js,bin/java/rmi/activation/UnknownObjectException.js,bin/java/rmi/dgc/DGC.js,bin/java/rmi/dgc/Lease.js,bin/java/rmi/dgc/VMID.js,bin/java/rmi/registry/RegistryHandler.js,bin/java/rmi/server/LoaderHandler.js,bin/java/rmi/server/LogStream.js,bin/java/rmi/server/ObjID.js,bin/java/rmi/server/RMIClassLoader.js,bin/java/rmi/server/RMIClassLoaderSpi.js,bin/java/rmi/server/RMIFailureHandler.js,bin/java/rmi/server/RMISocketFactory.js,bin/java/rmi/server/SkeletonMismatchException.js,bin/java/rmi/server/UID.js,bin/java/rmi/server/Unreferenced.js,bin/java/security/PolicySpi.js,bin/java/security/SecureRandomSpi.js,bin/java/security/SignedObject.js,bin/java/security/URIParameter.js,bin/java/security/UnresolvedPermissionCollection.js,bin/java/security/acl/AclNotFoundException.js,bin/java/security/cert/CRL.js,bin/java/security/cert/CRLException.js,bin/java/security/cert/CRLSelector.js,bin/java/security/cert/CertPathBuilder.js,bin/java/security/cert/CertPathBuilderException.js,bin/java/security/cert/CertPathBuilderResult.js,bin/java/security/cert/CertPathBuilderSpi.js,bin/java/security/cert/CertPathHelperImpl.js,bin/java/security/cert/CertPathParameters.js,bin/java/security/cert/CertPathValidator.js,bin/java/security/cert/CertPathValidatorException.js,bin/java/security/cert/CertPathValidatorResult.js,bin/java/security/cert/CertPathValidatorSpi.js,bin/java/security/cert/CertSelector.js,bin/java/security/cert/CertStore.js,bin/java/security/cert/CertStoreException.js,bin/java/security/cert/CertStoreSpi.js,bin/java/security/cert/CertificateFactorySpi.js,bin/java/security/cert/CollectionCertStoreParameters.js,bin/java/security/cert/LDAPCertStoreParameters.js,bin/java/security/cert/PKIXBuilderParameters.js,bin/java/security/cert/PKIXCertPathBuilderResult.js,bin/java/security/cert/PKIXCertPathChecker.js,bin/java/security/cert/PKIXCertPathValidatorResult.js,bin/java/security/cert/PKIXParameters.js,bin/java/security/cert/PolicyNode.js,bin/java/security/cert/PolicyQualifierInfo.js,bin/java/security/cert/TrustAnchor.js,bin/java/security/cert/X509CRL.js,bin/java/security/cert/X509CRLEntry.js,bin/java/security/cert/X509CRLSelector.js,bin/java/security/cert/X509CertSelector.js,bin/java/security/interfaces/DSAKeyPairGenerator.js,bin/java/security/interfaces/ECKey.js,bin/java/security/interfaces/ECPrivateKey.js,bin/java/security/interfaces/ECPublicKey.js,bin/java/security/interfaces/RSAMultiPrimePrivateCrtKey.js,bin/java/security/spec/DSAPrivateKeySpec.js,bin/java/security/spec/ECField.js,bin/java/security/spec/ECFieldF2m.js,bin/java/security/spec/ECFieldFp.js,bin/java/security/spec/ECGenParameterSpec.js,bin/java/security/spec/ECParameterSpec.js,bin/java/security/spec/ECPoint.js,bin/java/security/spec/ECPrivateKeySpec.js,bin/java/security/spec/ECPublicKeySpec.js,bin/java/security/spec/EllipticCurve.js,bin/java/security/spec/PSSParameterSpec.js,bin/java/security/spec/RSAKeyGenParameterSpec.js,bin/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.js,bin/java/security/spec/RSAOtherPrimeInfo.js,bin/java/security/spec/RSAPrivateCrtKeySpec.js,bin/java/security/spec/RSAPrivateKeySpec.js,bin/java/sql/BatchUpdateException.js,bin/java/sql/CallableStatement.js,bin/java/sql/ClientInfoStatus.js,bin/java/sql/DataTruncation.js,bin/java/sql/Driver.js,bin/java/sql/DriverPropertyInfo.js,bin/java/sql/RowIdLifetime.js,bin/java/sql/SQLClientInfoException.js,bin/java/sql/SQLDataException.js,bin/java/sql/SQLIntegrityConstraintViolationException.js,bin/java/sql/SQLInvalidAuthorizationSpecException.js,bin/java/sql/SQLNonTransientConnectionException.js,bin/java/sql/SQLOutput.js,bin/java/sql/SQLPermission.js,bin/java/sql/SQLRecoverableException.js,bin/java/sql/SQLSyntaxErrorException.js,bin/java/sql/SQLTimeoutException.js,bin/java/sql/SQLTransactionRollbackException.js,bin/java/sql/SQLTransientConnectionException.js,bin/java/sql/SQLTransientException.js,bin/java/text/BreakDictionary.js,bin/java/text/CharacterIteratorFieldDelegate.js,bin/java/text/ChoiceFormat.js,bin/java/text/CollationElementIterator.js,bin/java/text/CollationKey.js,bin/java/text/CollationRules.js,bin/java/text/DateFormatSymbols.js,bin/java/text/DecimalFormat.js,bin/java/text/DecimalFormatSymbols.js,bin/java/text/DictionaryBasedBreakIterator.js,bin/java/text/DigitList.js,bin/java/text/DontCareFieldPosition.js,bin/java/text/EntryPair.js,bin/java/text/MergeCollation.js,bin/java/text/Normalizer.js,bin/java/text/PatternEntry.js,bin/java/text/RBCollationTables.js,bin/java/text/RBTableBuilder.js,bin/java/text/RuleBasedBreakIterator.js,bin/java/text/RuleBasedCollationKey.js,bin/java/text/RuleBasedCollator.js,bin/java/util/ArrayDeque.js,bin/java/util/Currency.js,bin/java/util/DuplicateFormatFlagsException.js,bin/java/util/FormatFlagsConversionMismatchException.js,bin/java/util/Formattable.js,bin/java/util/FormattableFlags.js,bin/java/util/FormatterClosedException.js,bin/java/util/IllegalFormatCodePointException.js,bin/java/util/IllegalFormatConversionException.js,bin/java/util/IllegalFormatException.js,bin/java/util/IllegalFormatFlagsException.js,bin/java/util/IllegalFormatPrecisionException.js,bin/java/util/IllegalFormatWidthException.js,bin/java/util/InputMismatchException.js,bin/java/util/JapaneseImperialCalendar.js,bin/java/util/JumboEnumSet.js,bin/java/util/MissingFormatArgumentException.js,bin/java/util/MissingFormatWidthException.js,bin/java/util/Observable.js,bin/java/util/Observer.js,bin/java/util/PriorityQueue.js,bin/java/util/RegularEnumSet.js,bin/java/util/Scanner.js,bin/java/util/SimpleTimeZone.js,bin/java/util/Timer.js,bin/java/util/TimerTask.js,bin/java/util/UUID.js,bin/java/util/UnknownFormatConversionException.js,bin/java/util/UnknownFormatFlagsException.js,bin/java/util/concurrent/BrokenBarrierException.js,bin/java/util/concurrent/CancellationException.js,bin/java/util/concurrent/atomic/AtomicIntegerArray.js,bin/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.js,bin/java/util/concurrent/atomic/AtomicLongArray.js,bin/java/util/concurrent/atomic/AtomicLongFieldUpdater.js,bin/java/util/concurrent/atomic/AtomicMarkableReference.js,bin/java/util/concurrent/atomic/AtomicReferenceArray.js,bin/java/util/concurrent/atomic/AtomicStampedReference.js,bin/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.js,bin/java/util/jar/JarException.js,bin/java/util/jar/JarVerifier.js,bin/java/util/jar/JavaUtilJarAccessImpl.js,bin/java/util/logging/ConsoleHandler.js,bin/java/util/logging/ErrorManager.js,bin/java/util/logging/FileHandler.js,bin/java/util/logging/Formatter.js,bin/java/util/logging/Logging.js,bin/java/util/logging/LoggingMXBean.js,bin/java/util/logging/LoggingPermission.js,bin/java/util/logging/MemoryHandler.js,bin/java/util/logging/SimpleFormatter.js,bin/java/util/logging/SocketHandler.js,bin/java/util/logging/XMLFormatter.js,bin/java/util/prefs/AbstractPreferences.js,bin/java/util/prefs/Base64.js,bin/java/util/prefs/InvalidPreferencesFormatException.js,bin/java/util/prefs/NodeChangeEvent.js,bin/java/util/prefs/NodeChangeListener.js,bin/java/util/prefs/PreferenceChangeEvent.js,bin/java/util/prefs/PreferenceChangeListener.js,bin/java/util/prefs/PreferencesFactory.js,bin/java/util/prefs/XmlSupport.js,bin/java/util/regex/ASCII.js,bin/java/util/zip/Adler32.js,bin/java/util/zip/CheckedInputStream.js,bin/java/util/zip/DataFormatException.js,bin/java/util/zip/DeflaterInputStream.js,bin/java/util/zip/InflaterOutputStream.js,bin/java/util/zip/ZStreamRef.js,bin/java/util/zip/ZipError.js,bin/javax/accessibility/AccessibleResourceBundle.js,bin/javax/accessibility/AccessibleStreamable.js,bin/javax/crypto/CipherInputStream.js,bin/javax/crypto/CipherOutputStream.js,bin/javax/crypto/CryptoPermissions.js,bin/javax/crypto/CryptoPolicyParser.js,bin/javax/crypto/EncryptedPrivateKeyInfo.js,bin/javax/crypto/ExemptionMechanismSpi.js,bin/javax/crypto/JarVerifier.js,bin/javax/crypto/KeyAgreement.js,bin/javax/crypto/NullCipherSpi.js,bin/javax/imageio/spi/DigraphNode.js,bin/javax/imageio/spi/PartiallyOrderedSet.js,bin/javax/imageio/stream/MemoryCache.js,bin/javax/management/AndQueryExp.js,bin/javax/management/AttributeChangeNotificationFilter.js,bin/javax/management/BetweenQueryExp.js,bin/javax/management/BinaryOpValueExp.js,bin/javax/management/BinaryRelQueryExp.js,bin/javax/management/BooleanValueExp.js,bin/javax/management/ClassAttributeValueExp.js,bin/javax/management/DefaultLoaderRepository.js,bin/javax/management/DescriptorAccess.js,bin/javax/management/InQueryExp.js,bin/javax/management/InstanceOfQueryExp.js,bin/javax/management/MatchQueryExp.js,bin/javax/management/NotQueryExp.js,bin/javax/management/NumericValueExp.js,bin/javax/management/OrQueryExp.js,bin/javax/management/PersistentMBean.js,bin/javax/management/QualifiedAttributeValueExp.js,bin/javax/management/StandardEmitterMBean.js,bin/javax/management/StandardMBean.js,bin/javax/management/StringValueExp.js,bin/javax/management/loading/DefaultLoaderRepository.js,bin/javax/management/loading/MLet.js,bin/javax/management/loading/MLetContent.js,bin/javax/management/loading/MLetMBean.js,bin/javax/management/loading/MLetObjectInputStream.js,bin/javax/management/loading/MLetParser.js,bin/javax/management/loading/PrivateMLet.js,bin/javax/management/modelmbean/DescriptorSupport.js,bin/javax/management/modelmbean/InvalidTargetObjectTypeException.js,bin/javax/management/modelmbean/ModelMBean.js,bin/javax/management/modelmbean/ModelMBeanAttributeInfo.js,bin/javax/management/modelmbean/ModelMBeanConstructorInfo.js,bin/javax/management/modelmbean/ModelMBeanInfo.js,bin/javax/management/modelmbean/ModelMBeanInfoSupport.js,bin/javax/management/modelmbean/ModelMBeanNotificationBroadcaster.js,bin/javax/management/modelmbean/ModelMBeanNotificationInfo.js,bin/javax/management/modelmbean/ModelMBeanOperationInfo.js,bin/javax/management/modelmbean/RequiredModelMBean.js,bin/javax/management/modelmbean/XMLParseException.js,bin/javax/management/monitor/CounterMonitor.js,bin/javax/management/monitor/CounterMonitorMBean.js,bin/javax/management/monitor/GaugeMonitor.js,bin/javax/management/monitor/GaugeMonitorMBean.js,bin/javax/management/monitor/Monitor.js,bin/javax/management/monitor/MonitorMBean.js,bin/javax/management/monitor/MonitorNotification.js,bin/javax/management/monitor/MonitorSettingException.js,bin/javax/management/monitor/StringMonitor.js,bin/javax/management/monitor/StringMonitorMBean.js,bin/javax/management/openmbean/InvalidOpenTypeException.js,bin/javax/management/openmbean/KeyAlreadyExistsException.js,bin/javax/management/openmbean/OpenMBeanConstructorInfo.js,bin/javax/management/openmbean/OpenMBeanConstructorInfoSupport.js,bin/javax/management/openmbean/OpenMBeanInfo.js,bin/javax/management/openmbean/OpenMBeanInfoSupport.js,bin/javax/management/relation/InvalidRelationIdException.js,bin/javax/management/relation/InvalidRelationServiceException.js,bin/javax/management/relation/InvalidRelationTypeException.js,bin/javax/management/relation/InvalidRoleInfoException.js,bin/javax/management/relation/InvalidRoleValueException.js,bin/javax/management/relation/MBeanServerNotificationFilter.js,bin/javax/management/relation/Relation.js,bin/javax/management/relation/RelationException.js,bin/javax/management/relation/RelationNotFoundException.js,bin/javax/management/relation/RelationNotification.js,bin/javax/management/relation/RelationService.js,bin/javax/management/relation/RelationServiceMBean.js,bin/javax/management/relation/RelationServiceNotRegisteredException.js,bin/javax/management/relation/RelationSupport.js,bin/javax/management/relation/RelationSupportMBean.js,bin/javax/management/relation/RelationType.js,bin/javax/management/relation/RelationTypeNotFoundException.js,bin/javax/management/relation/RelationTypeSupport.js,bin/javax/management/relation/Role.js,bin/javax/management/relation/RoleInfo.js,bin/javax/management/relation/RoleInfoNotFoundException.js,bin/javax/management/relation/RoleList.js,bin/javax/management/relation/RoleNotFoundException.js,bin/javax/management/relation/RoleResult.js,bin/javax/management/relation/RoleStatus.js,bin/javax/management/relation/RoleUnresolved.js,bin/javax/management/relation/RoleUnresolvedList.js,bin/javax/management/remote/JMXConnectionNotification.js,bin/javax/management/remote/JMXProviderException.js,bin/javax/management/remote/JMXServerErrorException.js,bin/javax/management/remote/rmi/NoCallStackClassLoader.js,bin/javax/management/remote/rmi/RMIConnection.js,bin/javax/management/remote/rmi/RMIConnectionImpl.js,bin/javax/management/remote/rmi/RMIIIOPServerImpl.js,bin/javax/management/remote/rmi/RMIJRMPServerImpl.js,bin/javax/management/timer/Timer.js,bin/javax/management/timer/TimerAlarmClockNotification.js,bin/javax/management/timer/TimerMBean.js,bin/javax/management/timer/TimerNotification.js,bin/javax/naming/BinaryRefAddr.js,bin/javax/naming/InsufficientResourcesException.js,bin/javax/naming/LinkException.js,bin/javax/naming/LinkLoopException.js,bin/javax/naming/MalformedLinkException.js,bin/javax/naming/ldap/ManageReferralControl.js,bin/javax/naming/ldap/PagedResultsControl.js,bin/javax/naming/ldap/Rfc2253Parser.js,bin/javax/naming/ldap/SortControl.js,bin/javax/naming/ldap/SortKey.js,bin/javax/naming/spi/ContinuationContext.js,bin/javax/naming/spi/ContinuationDirContext.js,bin/javax/naming/spi/DirObjectFactory.js,bin/javax/net/ssl/CertPathTrustManagerParameters.js,bin/javax/net/ssl/HandshakeCompletedEvent.js,bin/javax/net/ssl/SSLEngineResult.js,bin/javax/net/ssl/SSLHandshakeException.js,bin/javax/net/ssl/SSLKeyException.js,bin/javax/net/ssl/SSLProtocolException.js,bin/javax/net/ssl/SSLServerSocket.js,bin/javax/net/ssl/SSLSessionBindingEvent.js,bin/javax/net/ssl/SSLSessionBindingListener.js,bin/javax/net/ssl/SSLSessionContext.js,bin/javax/net/ssl/X509ExtendedKeyManager.js,bin/javax/print/AttributeException.js,bin/javax/print/CancelablePrintJob.js,bin/javax/print/Doc.js,bin/javax/print/DocPrintJob.js,bin/javax/print/FlavorException.js,bin/javax/print/MimeType.js,bin/javax/print/MultiDoc.js,bin/javax/print/MultiDocPrintJob.js,bin/javax/print/MultiDocPrintService.js,bin/javax/print/PrintException.js,bin/javax/print/ServiceUI.js,bin/javax/print/ServiceUIFactory.js,bin/javax/print/SimpleDoc.js,bin/javax/print/StreamPrintService.js,bin/javax/print/URIException.js,bin/javax/print/attribute/AttributeSetUtilities.js,bin/javax/print/attribute/DateTimeSyntax.js,bin/javax/print/attribute/DocAttributeSet.js,bin/javax/print/attribute/HashDocAttributeSet.js,bin/javax/print/attribute/HashPrintJobAttributeSet.js,bin/javax/print/attribute/HashPrintServiceAttributeSet.js,bin/javax/print/attribute/IntegerSyntax.js,bin/javax/print/attribute/PrintJobAttributeSet.js,bin/javax/print/attribute/PrintServiceAttribute.js,bin/javax/print/attribute/PrintServiceAttributeSet.js,bin/javax/print/attribute/ResolutionSyntax.js,bin/javax/print/attribute/SetOfIntegerSyntax.js,bin/javax/print/attribute/SupportedValuesAttribute.js,bin/javax/print/attribute/TextSyntax.js,bin/javax/print/attribute/URISyntax.js,bin/javax/print/attribute/UnmodifiableSetException.js,bin/javax/print/attribute/standard/Chromaticity.js,bin/javax/print/attribute/standard/ColorSupported.js,bin/javax/print/attribute/standard/Compression.js,bin/javax/print/attribute/standard/Copies.js,bin/javax/print/attribute/standard/CopiesSupported.js,bin/javax/print/attribute/standard/DateTimeAtCompleted.js,bin/javax/print/attribute/standard/DateTimeAtCreation.js,bin/javax/print/attribute/standard/DateTimeAtProcessing.js,bin/javax/print/attribute/standard/Destination.js,bin/javax/print/attribute/standard/DocumentName.js,bin/javax/print/attribute/standard/Fidelity.js,bin/javax/print/attribute/standard/Finishings.js,bin/javax/print/attribute/standard/JobHoldUntil.js,bin/javax/print/attribute/standard/JobImpressions.js,bin/javax/print/attribute/standard/JobImpressionsCompleted.js,bin/javax/print/attribute/standard/JobImpressionsSupported.js,bin/javax/print/attribute/standard/JobKOctets.js,bin/javax/print/attribute/standard/JobKOctetsProcessed.js,bin/javax/print/attribute/standard/JobKOctetsSupported.js,bin/javax/print/attribute/standard/JobMediaSheets.js,bin/javax/print/attribute/standard/JobMediaSheetsCompleted.js,bin/javax/print/attribute/standard/JobMediaSheetsSupported.js,bin/javax/print/attribute/standard/JobMessageFromOperator.js,bin/javax/print/attribute/standard/JobName.js,bin/javax/print/attribute/standard/JobOriginatingUserName.js,bin/javax/print/attribute/standard/JobPriority.js,bin/javax/print/attribute/standard/JobPrioritySupported.js,bin/javax/print/attribute/standard/JobSheets.js,bin/javax/print/attribute/standard/JobState.js,bin/javax/print/attribute/standard/JobStateReason.js,bin/javax/print/attribute/standard/JobStateReasons.js,bin/javax/print/attribute/standard/MediaName.js,bin/javax/print/attribute/standard/MediaTray.js,bin/javax/print/attribute/standard/MultipleDocumentHandling.js,bin/javax/print/attribute/standard/NumberOfDocuments.js,bin/javax/print/attribute/standard/NumberOfInterveningJobs.js,bin/javax/print/attribute/standard/NumberUp.js,bin/javax/print/attribute/standard/NumberUpSupported.js,bin/javax/print/attribute/standard/OutputDeviceAssigned.js,bin/javax/print/attribute/standard/PDLOverrideSupported.js,bin/javax/print/attribute/standard/PageRanges.js,bin/javax/print/attribute/standard/PagesPerMinute.js,bin/javax/print/attribute/standard/PagesPerMinuteColor.js,bin/javax/print/attribute/standard/PresentationDirection.js,bin/javax/print/attribute/standard/PrintQuality.js,bin/javax/print/attribute/standard/PrinterInfo.js,bin/javax/print/attribute/standard/PrinterIsAcceptingJobs.js,bin/javax/print/attribute/standard/PrinterLocation.js,bin/javax/print/attribute/standard/PrinterMakeAndModel.js,bin/javax/print/attribute/standard/PrinterMessageFromOperator.js,bin/javax/print/attribute/standard/PrinterMoreInfo.js,bin/javax/print/attribute/standard/PrinterMoreInfoManufacturer.js,bin/javax/print/attribute/standard/PrinterName.js,bin/javax/print/attribute/standard/PrinterResolution.js,bin/javax/print/attribute/standard/PrinterState.js,bin/javax/print/attribute/standard/PrinterStateReason.js,bin/javax/print/attribute/standard/PrinterStateReasons.js,bin/javax/print/attribute/standard/PrinterURI.js,bin/javax/print/attribute/standard/QueuedJobCount.js,bin/javax/print/attribute/standard/ReferenceUriSchemesSupported.js,bin/javax/print/attribute/standard/RequestingUserName.js,bin/javax/print/attribute/standard/Severity.js,bin/javax/print/attribute/standard/SheetCollate.js,bin/javax/print/attribute/standard/Sides.js,bin/javax/print/event/PrintEvent.js,bin/javax/print/event/PrintJobAdapter.js,bin/javax/print/event/PrintJobAttributeEvent.js,bin/javax/print/event/PrintJobAttributeListener.js,bin/javax/print/event/PrintJobEvent.js,bin/javax/print/event/PrintJobListener.js,bin/javax/print/event/PrintServiceAttributeEvent.js,bin/javax/print/event/PrintServiceAttributeListener.js,bin/javax/security/auth/callback/LanguageCallback.js,bin/javax/security/auth/kerberos/DelegationPermission.js,bin/javax/security/auth/kerberos/KeyImpl.js,bin/javax/security/auth/kerberos/ServicePermission.js,bin/javax/security/auth/login/AccountException.js,bin/javax/security/auth/login/AccountExpiredException.js,bin/javax/security/auth/login/AccountLockedException.js,bin/javax/security/auth/login/AccountNotFoundException.js,bin/javax/security/auth/login/CredentialException.js,bin/javax/security/auth/login/CredentialExpiredException.js,bin/javax/security/auth/login/CredentialNotFoundException.js,bin/javax/security/cert/CertificateParsingException.js,bin/javax/security/sasl/AuthenticationException.js,bin/javax/smartcardio/ATR.js,bin/javax/smartcardio/Card.js,bin/javax/smartcardio/CardChannel.js,bin/javax/smartcardio/CardException.js,bin/javax/smartcardio/CardNotPresentException.js,bin/javax/smartcardio/CardPermission.js,bin/javax/smartcardio/CardTerminal.js,bin/javax/smartcardio/CardTerminals.js,bin/javax/smartcardio/CommandAPDU.js,bin/javax/smartcardio/ResponseAPDU.js,bin/javax/smartcardio/TerminalFactory.js,bin/javax/smartcardio/TerminalFactorySpi.js,bin/javax/sound/sampled/ReverbType.js,bin/javax/sql/ConnectionEvent.js,bin/javax/sql/ConnectionEventListener.js,bin/javax/sql/ConnectionPoolDataSource.js,bin/javax/sql/PooledConnection.js,bin/javax/sql/StatementEvent.js,bin/javax/sql/StatementEventListener.js,bin/javax/sql/XAConnection.js,bin/javax/sql/XADataSource.js,bin/javax/sql/rowset/serial/SQLOutputImpl.js,bin/javax/sql/rowset/serial/SerialDatalink.js,bin/javax/sql/rowset/serial/SerialJavaObject.js,bin/javax/swing/DebugGraphicsFilter.js,bin/javax/swing/DebugGraphicsInfo.js,bin/javax/swing/DebugGraphicsObserver.js,bin/javax/swing/DefaultFocusManager.js,bin/javax/swing/DelegatingDefaultFocusManager.js,bin/javax/swing/GraphicsWrapper.js,bin/javax/swing/GroupLayout.js,bin/javax/swing/JTextPane.js,bin/javax/swing/LayoutComparator.js,bin/javax/swing/MultiUIDefaults.js,bin/javax/swing/ProgressMonitor.js,bin/javax/swing/ProgressMonitorInputStream.js,bin/javax/swing/Renderer.js,bin/javax/swing/ScrollPaneLayout.js,bin/javax/swing/SpinnerListModel.js,bin/javax/swing/Spring.js,bin/javax/swing/SpringLayout.js,bin/javax/swing/SwingPaintEventDispatcher.js,bin/javax/swing/TablePrintable.js,bin/javax/swing/TimerQueue.js,bin/javax/swing/border/SoftBevelBorder.js,bin/javax/swing/colorchooser/CenterLayout.js,bin/javax/swing/colorchooser/ColorChooserComponentFactory.js,bin/javax/swing/colorchooser/DefaultColorSelectionModel.js,bin/javax/swing/colorchooser/DefaultHSBChooserPanel.js,bin/javax/swing/colorchooser/DefaultPreviewPanel.js,bin/javax/swing/colorchooser/DefaultRGBChooserPanel.js,bin/javax/swing/colorchooser/DefaultSwatchChooserPanel.js,bin/javax/swing/colorchooser/SmartGridLayout.js,bin/javax/swing/colorchooser/SyntheticImage.js,bin/javax/swing/event/HyperlinkEvent.js,bin/javax/swing/event/HyperlinkListener.js,bin/javax/swing/event/InternalFrameAdapter.js,bin/javax/swing/event/MenuEvent.js,bin/javax/swing/event/TreeWillExpandListener.js,bin/javax/swing/plaf/basic/BasicCheckBoxUI.js,bin/javax/swing/plaf/basic/BasicFormattedTextFieldUI.js,bin/javax/swing/plaf/basic/BasicIconFactory.js,bin/javax/swing/plaf/basic/BasicViewportUI.js,bin/javax/swing/plaf/basic/CenterLayout.js,bin/javax/swing/plaf/metal/DefaultMetalTheme.js,bin/javax/swing/plaf/metal/MetalBorders.js,bin/javax/swing/plaf/metal/MetalBumps.js,bin/javax/swing/plaf/metal/MetalButtonUI.js,bin/javax/swing/plaf/metal/MetalCheckBoxIcon.js,bin/javax/swing/plaf/metal/MetalCheckBoxUI.js,bin/javax/swing/plaf/metal/MetalComboBoxButton.js,bin/javax/swing/plaf/metal/MetalComboBoxEditor.js,bin/javax/swing/plaf/metal/MetalComboBoxIcon.js,bin/javax/swing/plaf/metal/MetalComboBoxUI.js,bin/javax/swing/plaf/metal/MetalDesktopIconUI.js,bin/javax/swing/plaf/metal/MetalFileChooserUI.js,bin/javax/swing/plaf/metal/MetalFontDesktopProperty.js,bin/javax/swing/plaf/metal/MetalHighContrastTheme.js,bin/javax/swing/plaf/metal/MetalIconFactory.js,bin/javax/swing/plaf/metal/MetalInternalFrameTitlePane.js,bin/javax/swing/plaf/metal/MetalInternalFrameUI.js,bin/javax/swing/plaf/metal/MetalLabelUI.js,bin/javax/swing/plaf/metal/MetalLookAndFeel.js,bin/javax/swing/plaf/metal/MetalMenuBarUI.js,bin/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.js,bin/javax/swing/plaf/metal/MetalProgressBarUI.js,bin/javax/swing/plaf/metal/MetalRadioButtonUI.js,bin/javax/swing/plaf/metal/MetalRootPaneUI.js,bin/javax/swing/plaf/metal/MetalScrollBarUI.js,bin/javax/swing/plaf/metal/MetalScrollButton.js,bin/javax/swing/plaf/metal/MetalScrollPaneUI.js,bin/javax/swing/plaf/metal/MetalSeparatorUI.js,bin/javax/swing/plaf/metal/MetalSliderUI.js,bin/javax/swing/plaf/metal/MetalSplitPaneDivider.js,bin/javax/swing/plaf/metal/MetalSplitPaneUI.js,bin/javax/swing/plaf/metal/MetalTabbedPaneUI.js,bin/javax/swing/plaf/metal/MetalTextFieldUI.js,bin/javax/swing/plaf/metal/MetalTheme.js,bin/javax/swing/plaf/metal/MetalTitlePane.js,bin/javax/swing/plaf/metal/MetalToggleButtonUI.js,bin/javax/swing/plaf/metal/MetalToolBarUI.js,bin/javax/swing/plaf/metal/MetalToolTipUI.js,bin/javax/swing/plaf/metal/MetalTreeUI.js,bin/javax/swing/plaf/metal/MetalUtils.js,bin/javax/swing/plaf/metal/OceanTheme.js,bin/javax/swing/plaf/multi/MultiButtonUI.js,bin/javax/swing/plaf/multi/MultiColorChooserUI.js,bin/javax/swing/plaf/multi/MultiComboBoxUI.js,bin/javax/swing/plaf/multi/MultiDesktopIconUI.js,bin/javax/swing/plaf/multi/MultiDesktopPaneUI.js,bin/javax/swing/plaf/multi/MultiFileChooserUI.js,bin/javax/swing/plaf/multi/MultiInternalFrameUI.js,bin/javax/swing/plaf/multi/MultiLabelUI.js,bin/javax/swing/plaf/multi/MultiListUI.js,bin/javax/swing/plaf/multi/MultiLookAndFeel.js,bin/javax/swing/plaf/multi/MultiMenuBarUI.js,bin/javax/swing/plaf/multi/MultiMenuItemUI.js,bin/javax/swing/plaf/multi/MultiOptionPaneUI.js,bin/javax/swing/plaf/multi/MultiPanelUI.js,bin/javax/swing/plaf/multi/MultiPopupMenuUI.js,bin/javax/swing/plaf/multi/MultiProgressBarUI.js,bin/javax/swing/plaf/multi/MultiRootPaneUI.js,bin/javax/swing/plaf/multi/MultiScrollBarUI.js,bin/javax/swing/plaf/multi/MultiScrollPaneUI.js,bin/javax/swing/plaf/multi/MultiSeparatorUI.js,bin/javax/swing/plaf/multi/MultiSliderUI.js,bin/javax/swing/plaf/multi/MultiSpinnerUI.js,bin/javax/swing/plaf/multi/MultiSplitPaneUI.js,bin/javax/swing/plaf/multi/MultiTabbedPaneUI.js,bin/javax/swing/plaf/multi/MultiTableHeaderUI.js,bin/javax/swing/plaf/multi/MultiTableUI.js,bin/javax/swing/plaf/multi/MultiTextUI.js,bin/javax/swing/plaf/multi/MultiToolBarUI.js,bin/javax/swing/plaf/multi/MultiToolTipUI.js,bin/javax/swing/plaf/multi/MultiTreeUI.js,bin/javax/swing/plaf/multi/MultiViewportUI.js,bin/javax/swing/plaf/synth/DefaultMenuLayout.js,bin/javax/swing/plaf/synth/ImagePainter.js,bin/javax/swing/plaf/synth/ParsedSynthStyle.js,bin/javax/swing/plaf/synth/SynthComboPopup.js,bin/javax/swing/plaf/synth/SynthInternalFrameTitlePane.js,bin/javax/swing/plaf/synth/SynthSplitPaneDivider.js,bin/javax/swing/text/AbstractWriter.js,bin/javax/swing/text/AsyncBoxView.js,bin/javax/swing/text/ChangedCharSetException.js,bin/javax/swing/text/DefaultFormatterFactory.js,bin/javax/swing/text/DefaultTextUI.js,bin/javax/swing/text/ElementIterator.js,bin/javax/swing/text/GapContent.js,bin/javax/swing/text/GapVector.js,bin/javax/swing/text/GlyphPainter1.js,bin/javax/swing/text/GlyphPainter2.js,bin/javax/swing/text/IconView.js,bin/javax/swing/text/LayoutQueue.js,bin/javax/swing/text/MaskFormatter.js,bin/javax/swing/text/StringContent.js,bin/javax/swing/text/TableView.js,bin/javax/swing/text/TextLayoutStrategy.js,bin/javax/swing/text/WhitespaceBasedBreakIterator.js,bin/javax/swing/text/ZoneView.js,bin/javax/swing/text/html/AccessibleHTML.js,bin/javax/swing/text/html/BRView.js,bin/javax/swing/text/html/CommentView.js,bin/javax/swing/text/html/EditableView.js,bin/javax/swing/text/html/FormSubmitEvent.js,bin/javax/swing/text/html/FormView.js,bin/javax/swing/text/html/FrameSetView.js,bin/javax/swing/text/html/FrameView.js,bin/javax/swing/text/html/HRuleView.js,bin/javax/swing/text/html/HTMLFrameHyperlinkEvent.js,bin/javax/swing/text/html/HTMLWriter.js,bin/javax/swing/text/html/HiddenTagView.js,bin/javax/swing/text/html/ImageView.js,bin/javax/swing/text/html/InlineView.js,bin/javax/swing/text/html/IsindexView.js,bin/javax/swing/text/html/LineView.js,bin/javax/swing/text/html/ListView.js,bin/javax/swing/text/html/Map.js,bin/javax/swing/text/html/MinimalHTMLWriter.js,bin/javax/swing/text/html/NoFramesView.js,bin/javax/swing/text/html/ObjectView.js,bin/javax/swing/text/html/Option.js,bin/javax/swing/text/html/OptionComboBoxModel.js,bin/javax/swing/text/html/OptionListModel.js,bin/javax/swing/text/html/ParagraphView.js,bin/javax/swing/text/html/ResourceLoader.js,bin/javax/swing/text/html/TableView.js,bin/javax/swing/text/html/TextAreaDocument.js,bin/javax/swing/text/html/parser/AttributeList.js,bin/javax/swing/text/html/parser/ContentModel.js,bin/javax/swing/text/html/parser/ContentModelState.js,bin/javax/swing/text/html/parser/DTD.js,bin/javax/swing/text/html/parser/DTDConstants.js,bin/javax/swing/text/html/parser/DocumentParser.js,bin/javax/swing/text/html/parser/Element.js,bin/javax/swing/text/html/parser/Entity.js,bin/javax/swing/text/html/parser/Parser.js,bin/javax/swing/text/html/parser/ParserDelegator.js,bin/javax/swing/text/html/parser/ResourceLoader.js,bin/javax/swing/text/html/parser/TagElement.js,bin/javax/swing/text/html/parser/TagStack.js,bin/javax/swing/text/rtf/AbstractFilter.js,bin/javax/swing/text/rtf/Constants.js,bin/javax/swing/text/rtf/MockAttributeSet.js,bin/javax/swing/text/rtf/RTFAttribute.js,bin/javax/swing/text/rtf/RTFAttributes.js,bin/javax/swing/text/rtf/RTFEditorKit.js,bin/javax/swing/text/rtf/RTFGenerator.js,bin/javax/swing/text/rtf/RTFParser.js,bin/javax/swing/text/rtf/RTFReader.js,bin/javax/swing/tree/ExpandVetoException.js,bin/javax/swing/undo/StateEdit.js,bin/javax/swing/undo/StateEditable.js,bin/javax/swing/undo/UndoManager.js,bin/javax/swing/undo/UndoableEditSupport.js,bin/javax/xml/crypto/AlgorithmMethod.js,bin/javax/xml/crypto/Data.js,bin/javax/xml/crypto/KeySelector.js,bin/javax/xml/crypto/KeySelectorException.js,bin/javax/xml/crypto/KeySelectorResult.js,bin/javax/xml/crypto/MarshalException.js,bin/javax/xml/crypto/NoSuchMechanismException.js,bin/javax/xml/crypto/NodeSetData.js,bin/javax/xml/crypto/OctetStreamData.js,bin/javax/xml/crypto/URIDereferencer.js,bin/javax/xml/crypto/URIReference.js,bin/javax/xml/crypto/URIReferenceException.js,bin/javax/xml/crypto/XMLCryptoContext.js,bin/javax/xml/crypto/XMLStructure.js,bin/javax/xml/crypto/dom/DOMCryptoContext.js,bin/javax/xml/crypto/dom/DOMStructure.js,bin/javax/xml/crypto/dom/DOMURIReference.js,bin/javax/xml/crypto/dsig/CanonicalizationMethod.js,bin/javax/xml/crypto/dsig/DigestMethod.js,bin/javax/xml/crypto/dsig/Manifest.js,bin/javax/xml/crypto/dsig/Reference.js,bin/javax/xml/crypto/dsig/SignatureMethod.js,bin/javax/xml/crypto/dsig/SignatureProperties.js,bin/javax/xml/crypto/dsig/SignatureProperty.js,bin/javax/xml/crypto/dsig/SignedInfo.js,bin/javax/xml/crypto/dsig/Transform.js,bin/javax/xml/crypto/dsig/TransformException.js,bin/javax/xml/crypto/dsig/TransformService.js,bin/javax/xml/crypto/dsig/XMLObject.js,bin/javax/xml/crypto/dsig/XMLSignContext.js,bin/javax/xml/crypto/dsig/XMLSignature.js,bin/javax/xml/crypto/dsig/XMLSignatureException.js,bin/javax/xml/crypto/dsig/XMLSignatureFactory.js,bin/javax/xml/crypto/dsig/XMLValidateContext.js,bin/javax/xml/crypto/dsig/dom/DOMSignContext.js,bin/javax/xml/crypto/dsig/dom/DOMValidateContext.js,bin/javax/xml/crypto/dsig/keyinfo/KeyInfo.js,bin/javax/xml/crypto/dsig/keyinfo/KeyInfoFactory.js,bin/javax/xml/crypto/dsig/keyinfo/KeyName.js,bin/javax/xml/crypto/dsig/keyinfo/KeyValue.js,bin/javax/xml/crypto/dsig/keyinfo/PGPData.js,bin/javax/xml/crypto/dsig/keyinfo/RetrievalMethod.js,bin/javax/xml/crypto/dsig/keyinfo/X509Data.js,bin/javax/xml/crypto/dsig/keyinfo/X509IssuerSerial.js,bin/javax/xml/crypto/dsig/spec/C14NMethodParameterSpec.js,bin/javax/xml/crypto/dsig/spec/DigestMethodParameterSpec.js,bin/javax/xml/crypto/dsig/spec/ExcC14NParameterSpec.js,bin/javax/xml/crypto/dsig/spec/HMACParameterSpec.js,bin/javax/xml/crypto/dsig/spec/SignatureMethodParameterSpec.js,bin/javax/xml/crypto/dsig/spec/TransformParameterSpec.js,bin/javax/xml/crypto/dsig/spec/XPathFilter2ParameterSpec.js,bin/javax/xml/crypto/dsig/spec/XPathFilterParameterSpec.js,bin/javax/xml/crypto/dsig/spec/XPathType.js,bin/javax/xml/crypto/dsig/spec/XSLTTransformParameterSpec.js,bin/org/ietf/jgss/ChannelBinding.js,bin/org/jcp/xml/dsig/internal/DigesterOutputStream.js,bin/org/jcp/xml/dsig/internal/MacOutputStream.js,bin/org/jcp/xml/dsig/internal/SignerOutputStream.js,bin/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.js,bin/org/jcp/xml/dsig/internal/dom/ApacheData.js,bin/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.js,bin/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.js,bin/org/jcp/xml/dsig/internal/dom/ApacheTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMBase64Transform.js,bin/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.js,bin/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.js,bin/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyName.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyValue.js,bin/org/jcp/xml/dsig/internal/dom/DOMManifest.js,bin/org/jcp/xml/dsig/internal/dom/DOMPGPData.js,bin/org/jcp/xml/dsig/internal/dom/DOMReference.js,bin/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.js,bin/org/jcp/xml/dsig/internal/dom/DOMStructure.js,bin/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.js,bin/org/jcp/xml/dsig/internal/dom/DOMTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.js,bin/org/jcp/xml/dsig/internal/dom/DOMUtils.js,bin/org/jcp/xml/dsig/internal/dom/DOMX509Data.js,bin/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.js,bin/org/jcp/xml/dsig/internal/dom/DOMXMLObject.js,bin/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.js,bin/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.js,bin/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.js,bin/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.js,bin/org/jcp/xml/dsig/internal/dom/Utils.js,bin/org/jcp/xml/dsig/internal/dom/XMLDSigRI.js,bin/sun/applet/AppletClassLoader.js,bin/sun/applet/AppletEvent.js,bin/sun/applet/AppletEventMulticaster.js,bin/sun/applet/AppletIOException.js,bin/sun/applet/AppletIllegalArgumentException.js,bin/sun/applet/AppletImageRef.js,bin/sun/applet/AppletListener.js,bin/sun/applet/AppletMessageHandler.js,bin/sun/applet/AppletObjectInputStream.js,bin/sun/applet/AppletPanel.js,bin/sun/applet/AppletProps.js,bin/sun/applet/AppletResourceLoader.js,bin/sun/applet/AppletSecurity.js,bin/sun/applet/AppletSecurityException.js,bin/sun/applet/AppletThreadGroup.js,bin/sun/applet/AppletViewer.js,bin/sun/applet/AppletViewerFactory.js,bin/sun/applet/AppletViewerPanel.js,bin/sun/applet/Main.js,bin/sun/applet/resources/MsgAppletViewer.js,bin/sun/applet/resources/MsgAppletViewer_de.js,bin/sun/applet/resources/MsgAppletViewer_es.js,bin/sun/applet/resources/MsgAppletViewer_fr.js,bin/sun/applet/resources/MsgAppletViewer_it.js,bin/sun/applet/resources/MsgAppletViewer_ja.js,bin/sun/applet/resources/MsgAppletViewer_ko.js,bin/sun/applet/resources/MsgAppletViewer_pt_BR.js,bin/sun/applet/resources/MsgAppletViewer_sv.js,bin/sun/applet/resources/MsgAppletViewer_zh_CN.js,bin/sun/applet/resources/MsgAppletViewer_zh_TW.js,bin/sun/audio/AudioData.js,bin/sun/audio/AudioDataStream.js,bin/sun/audio/AudioDevice.js,bin/sun/audio/AudioPlayer.js,bin/sun/audio/AudioSecurityAction.js,bin/sun/audio/AudioSecurityExceptionAction.js,bin/sun/audio/AudioStream.js,bin/sun/audio/AudioStreamSequence.js,bin/sun/audio/AudioTranslatorStream.js,bin/sun/audio/ContinuousAudioDataStream.js,bin/sun/audio/InvalidAudioFormatException.js,bin/sun/audio/NativeAudioStream.js,bin/sun/awt/AWTCharset.js,bin/sun/awt/AWTSecurityManager.js,bin/sun/awt/CharsetString.js,bin/sun/awt/ComponentAccessor.js,bin/sun/awt/CustomCursor.js,bin/sun/awt/FocusingTextField.js,bin/sun/awt/FontConfiguration.js,bin/sun/awt/FontDescriptor.js,bin/sun/awt/GlobalCursorManager.js,bin/sun/awt/HKSCS.js,bin/sun/awt/HorizBagLayout.js,bin/sun/awt/Mutex.js,bin/sun/awt/NativeLibLoader.js,bin/sun/awt/OrientableFlowLayout.js,bin/sun/awt/PaintEventDispatcher.js,bin/sun/awt/PlatformFont.js,bin/sun/awt/RepaintArea.js,bin/sun/awt/SunDisplayChanger.js,bin/sun/awt/Symbol.js,bin/sun/awt/TracedEventQueue.js,bin/sun/awt/VariableGridLayout.js,bin/sun/awt/VerticalBagLayout.js,bin/sun/awt/WindowAccessor.js,bin/sun/awt/WindowIDProvider.js,bin/sun/awt/datatransfer/ClipboardTransferable.js,bin/sun/awt/datatransfer/SunClipboard.js,bin/sun/awt/event/IgnorePaintEvent.js,bin/sun/awt/geom/ChainEnd.js,bin/sun/awt/geom/CurveLink.js,bin/sun/awt/geom/Edge.js,bin/sun/awt/geom/Order0.js,bin/sun/awt/geom/Order1.js,bin/sun/awt/geom/Order2.js,bin/sun/awt/geom/Order3.js,bin/sun/awt/im/CompositionAreaHandler.js,bin/sun/awt/im/InputMethodAdapter.js,bin/sun/awt/im/InputMethodJFrame.js,bin/sun/awt/im/InputMethodLocator.js,bin/sun/awt/im/InputMethodManager.js,bin/sun/awt/im/InputMethodPopupMenu.js,bin/sun/awt/image/BadDepthException.js,bin/sun/awt/image/BufImgSurfaceManager.js,bin/sun/awt/image/BufImgVolatileSurfaceManager.js,bin/sun/awt/image/BufferedImageDevice.js,bin/sun/awt/image/BufferedImageGraphicsConfig.js,bin/sun/awt/image/DataBufferNative.js,bin/sun/awt/image/GifImageDecoder.js,bin/sun/awt/image/ImageAccessException.js,bin/sun/awt/image/ImageConsumerQueue.js,bin/sun/awt/image/ImageDecoder.js,bin/sun/awt/image/ImageFetcher.js,bin/sun/awt/image/ImageFormatException.js,bin/sun/awt/image/JPEGImageDecoder.js,bin/sun/awt/image/NativeLibLoader.js,bin/sun/awt/image/OffScreenImage.js,bin/sun/awt/image/PNGImageDecoder.js,bin/sun/awt/image/PixelConverter.js,bin/sun/awt/image/VolatileSurfaceManager.js,bin/sun/awt/image/WritableRasterNative.js,bin/sun/awt/image/XbmImageDecoder.js,bin/sun/awt/shell/DefaultShellFolder.js,bin/sun/awt/shell/ShellFolderManager.js,bin/sun/dc/DuctusRenderingEngine.js,bin/sun/font/CMap.js,bin/sun/font/CharToGlyphMapper.js,bin/sun/font/CompositeFontDescriptor.js,bin/sun/font/CompositeGlyphMapper.js,bin/sun/font/CompositeStrike.js,bin/sun/font/DelegatingShape.js,bin/sun/font/ExtendedTextSourceLabel.js,bin/sun/font/FileFont.js,bin/sun/font/FileFontStrike.js,bin/sun/font/FontFamily.js,bin/sun/font/FontManagerNativeLibrary.js,bin/sun/font/FontRunIterator.js,bin/sun/font/FontScaler.js,bin/sun/font/FontScalerException.js,bin/sun/font/FontStrike.js,bin/sun/font/FontStrikeDesc.js,bin/sun/font/FontStrikeDisposer.js,bin/sun/font/FreetypeFontScaler.js,bin/sun/font/GlyphList.js,bin/sun/font/NullFontScaler.js,bin/sun/font/PhysicalFont.js,bin/sun/font/PhysicalStrike.js,bin/sun/font/Script.js,bin/sun/font/ScriptRun.js,bin/sun/font/ScriptRunData.js,bin/sun/font/StandardTextSource.js,bin/sun/font/StrikeCache.js,bin/sun/font/StrikeMetrics.js,bin/sun/font/SunLayoutEngine.js,bin/sun/font/TextRecord.js,bin/sun/font/TextSource.js,bin/sun/font/TextSourceLabel.js,bin/sun/font/TrueTypeFont.js,bin/sun/font/TrueTypeGlyphMapper.js,bin/sun/font/Type1Font.js,bin/sun/font/Type1GlyphMapper.js,bin/sun/font/Underline.js,bin/sun/instrument/InstrumentationImpl.js,bin/sun/instrument/TransformerManager.js,bin/sun/io/ByteToCharASCII.js,bin/sun/io/ByteToCharBig5.js,bin/sun/io/ByteToCharBig5_HKSCS.js,bin/sun/io/ByteToCharBig5_Solaris.js,bin/sun/io/ByteToCharConverter.js,bin/sun/io/ByteToCharCp037.js,bin/sun/io/ByteToCharCp1006.js,bin/sun/io/ByteToCharCp1025.js,bin/sun/io/ByteToCharCp1026.js,bin/sun/io/ByteToCharCp1046.js,bin/sun/io/ByteToCharCp1047.js,bin/sun/io/ByteToCharCp1097.js,bin/sun/io/ByteToCharCp1098.js,bin/sun/io/ByteToCharCp1112.js,bin/sun/io/ByteToCharCp1122.js,bin/sun/io/ByteToCharCp1123.js,bin/sun/io/ByteToCharCp1124.js,bin/sun/io/ByteToCharCp1140.js,bin/sun/io/ByteToCharCp1141.js,bin/sun/io/ByteToCharCp1142.js,bin/sun/io/ByteToCharCp1143.js,bin/sun/io/ByteToCharCp1144.js,bin/sun/io/ByteToCharCp1145.js,bin/sun/io/ByteToCharCp1146.js,bin/sun/io/ByteToCharCp1147.js,bin/sun/io/ByteToCharCp1148.js,bin/sun/io/ByteToCharCp1149.js,bin/sun/io/ByteToCharCp1250.js,bin/sun/io/ByteToCharCp1251.js,bin/sun/io/ByteToCharCp1252.js,bin/sun/io/ByteToCharCp1253.js,bin/sun/io/ByteToCharCp1254.js,bin/sun/io/ByteToCharCp1255.js,bin/sun/io/ByteToCharCp1256.js,bin/sun/io/ByteToCharCp1257.js,bin/sun/io/ByteToCharCp1258.js,bin/sun/io/ByteToCharCp1381.js,bin/sun/io/ByteToCharCp1383.js,bin/sun/io/ByteToCharCp273.js,bin/sun/io/ByteToCharCp277.js,bin/sun/io/ByteToCharCp278.js,bin/sun/io/ByteToCharCp280.js,bin/sun/io/ByteToCharCp284.js,bin/sun/io/ByteToCharCp285.js,bin/sun/io/ByteToCharCp297.js,bin/sun/io/ByteToCharCp33722.js,bin/sun/io/ByteToCharCp420.js,bin/sun/io/ByteToCharCp424.js,bin/sun/io/ByteToCharCp437.js,bin/sun/io/ByteToCharCp500.js,bin/sun/io/ByteToCharCp737.js,bin/sun/io/ByteToCharCp775.js,bin/sun/io/ByteToCharCp834.js,bin/sun/io/ByteToCharCp838.js,bin/sun/io/ByteToCharCp850.js,bin/sun/io/ByteToCharCp852.js,bin/sun/io/ByteToCharCp855.js,bin/sun/io/ByteToCharCp856.js,bin/sun/io/ByteToCharCp857.js,bin/sun/io/ByteToCharCp858.js,bin/sun/io/ByteToCharCp860.js,bin/sun/io/ByteToCharCp861.js,bin/sun/io/ByteToCharCp862.js,bin/sun/io/ByteToCharCp863.js,bin/sun/io/ByteToCharCp864.js,bin/sun/io/ByteToCharCp865.js,bin/sun/io/ByteToCharCp866.js,bin/sun/io/ByteToCharCp868.js,bin/sun/io/ByteToCharCp869.js,bin/sun/io/ByteToCharCp870.js,bin/sun/io/ByteToCharCp871.js,bin/sun/io/ByteToCharCp874.js,bin/sun/io/ByteToCharCp875.js,bin/sun/io/ByteToCharCp918.js,bin/sun/io/ByteToCharCp921.js,bin/sun/io/ByteToCharCp922.js,bin/sun/io/ByteToCharCp930.js,bin/sun/io/ByteToCharCp933.js,bin/sun/io/ByteToCharCp935.js,bin/sun/io/ByteToCharCp937.js,bin/sun/io/ByteToCharCp939.js,bin/sun/io/ByteToCharCp942.js,bin/sun/io/ByteToCharCp942C.js,bin/sun/io/ByteToCharCp943.js,bin/sun/io/ByteToCharCp943C.js,bin/sun/io/ByteToCharCp948.js,bin/sun/io/ByteToCharCp949.js,bin/sun/io/ByteToCharCp949C.js,bin/sun/io/ByteToCharCp950.js,bin/sun/io/ByteToCharCp964.js,bin/sun/io/ByteToCharCp970.js,bin/sun/io/ByteToCharDBCS_ASCII.js,bin/sun/io/ByteToCharDBCS_EBCDIC.js,bin/sun/io/ByteToCharDoubleByte.js,bin/sun/io/ByteToCharEUC.js,bin/sun/io/ByteToCharEUC_CN.js,bin/sun/io/ByteToCharEUC_JP.js,bin/sun/io/ByteToCharEUC_JP_LINUX.js,bin/sun/io/ByteToCharEUC_JP_Solaris.js,bin/sun/io/ByteToCharEUC_KR.js,bin/sun/io/ByteToCharEUC_TW.js,bin/sun/io/ByteToCharGB18030.js,bin/sun/io/ByteToCharGB18030DB.js,bin/sun/io/ByteToCharGBK.js,bin/sun/io/ByteToCharHKSCS.js,bin/sun/io/ByteToCharHKSCS_2001.js,bin/sun/io/ByteToCharISCII91.js,bin/sun/io/ByteToCharISO2022.js,bin/sun/io/ByteToCharISO2022CN.js,bin/sun/io/ByteToCharISO2022JP.js,bin/sun/io/ByteToCharISO2022KR.js,bin/sun/io/ByteToCharISO8859_1.js,bin/sun/io/ByteToCharISO8859_13.js,bin/sun/io/ByteToCharISO8859_15.js,bin/sun/io/ByteToCharISO8859_2.js,bin/sun/io/ByteToCharISO8859_3.js,bin/sun/io/ByteToCharISO8859_4.js,bin/sun/io/ByteToCharISO8859_5.js,bin/sun/io/ByteToCharISO8859_6.js,bin/sun/io/ByteToCharISO8859_7.js,bin/sun/io/ByteToCharISO8859_8.js,bin/sun/io/ByteToCharISO8859_9.js,bin/sun/io/ByteToCharJIS0201.js,bin/sun/io/ByteToCharJIS0208.js,bin/sun/io/ByteToCharJIS0208_Solaris.js,bin/sun/io/ByteToCharJIS0212.js,bin/sun/io/ByteToCharJIS0212_Solaris.js,bin/sun/io/ByteToCharJISAutoDetect.js,bin/sun/io/ByteToCharJohab.js,bin/sun/io/ByteToCharKOI8_R.js,bin/sun/io/ByteToCharMS874.js,bin/sun/io/ByteToCharMS932.js,bin/sun/io/ByteToCharMS932DB.js,bin/sun/io/ByteToCharMS936.js,bin/sun/io/ByteToCharMS949.js,bin/sun/io/ByteToCharMS950.js,bin/sun/io/ByteToCharMS950_HKSCS.js,bin/sun/io/ByteToCharMacArabic.js,bin/sun/io/ByteToCharMacCentralEurope.js,bin/sun/io/ByteToCharMacCroatian.js,bin/sun/io/ByteToCharMacCyrillic.js,bin/sun/io/ByteToCharMacDingbat.js,bin/sun/io/ByteToCharMacGreek.js,bin/sun/io/ByteToCharMacHebrew.js,bin/sun/io/ByteToCharMacIceland.js,bin/sun/io/ByteToCharMacRoman.js,bin/sun/io/ByteToCharMacRomania.js,bin/sun/io/ByteToCharMacSymbol.js,bin/sun/io/ByteToCharMacThai.js,bin/sun/io/ByteToCharMacTurkish.js,bin/sun/io/ByteToCharMacUkraine.js,bin/sun/io/ByteToCharPCK.js,bin/sun/io/ByteToCharSJIS.js,bin/sun/io/ByteToCharSingleByte.js,bin/sun/io/ByteToCharTIS620.js,bin/sun/io/ByteToCharUTF16.js,bin/sun/io/ByteToCharUTF8.js,bin/sun/io/ByteToCharUnicode.js,bin/sun/io/ByteToCharUnicodeBig.js,bin/sun/io/ByteToCharUnicodeBigUnmarked.js,bin/sun/io/ByteToCharUnicodeLittle.js,bin/sun/io/ByteToCharUnicodeLittleUnmarked.js,bin/sun/io/CharToByteASCII.js,bin/sun/io/CharToByteBig5.js,bin/sun/io/CharToByteBig5_HKSCS.js,bin/sun/io/CharToByteBig5_Solaris.js,bin/sun/io/CharToByteConverter.js,bin/sun/io/CharToByteCp037.js,bin/sun/io/CharToByteCp1006.js,bin/sun/io/CharToByteCp1025.js,bin/sun/io/CharToByteCp1026.js,bin/sun/io/CharToByteCp1046.js,bin/sun/io/CharToByteCp1047.js,bin/sun/io/CharToByteCp1097.js,bin/sun/io/CharToByteCp1098.js,bin/sun/io/CharToByteCp1112.js,bin/sun/io/CharToByteCp1122.js,bin/sun/io/CharToByteCp1123.js,bin/sun/io/CharToByteCp1124.js,bin/sun/io/CharToByteCp1140.js,bin/sun/io/CharToByteCp1141.js,bin/sun/io/CharToByteCp1142.js,bin/sun/io/CharToByteCp1143.js,bin/sun/io/CharToByteCp1144.js,bin/sun/io/CharToByteCp1145.js,bin/sun/io/CharToByteCp1146.js,bin/sun/io/CharToByteCp1147.js,bin/sun/io/CharToByteCp1148.js,bin/sun/io/CharToByteCp1149.js,bin/sun/io/CharToByteCp1250.js,bin/sun/io/CharToByteCp1251.js,bin/sun/io/CharToByteCp1252.js,bin/sun/io/CharToByteCp1253.js,bin/sun/io/CharToByteCp1254.js,bin/sun/io/CharToByteCp1255.js,bin/sun/io/CharToByteCp1256.js,bin/sun/io/CharToByteCp1257.js,bin/sun/io/CharToByteCp1258.js,bin/sun/io/CharToByteCp1381.js,bin/sun/io/CharToByteCp1383.js,bin/sun/io/CharToByteCp273.js,bin/sun/io/CharToByteCp277.js,bin/sun/io/CharToByteCp278.js,bin/sun/io/CharToByteCp280.js,bin/sun/io/CharToByteCp284.js,bin/sun/io/CharToByteCp285.js,bin/sun/io/CharToByteCp297.js,bin/sun/io/CharToByteCp33722.js,bin/sun/io/CharToByteCp420.js,bin/sun/io/CharToByteCp424.js,bin/sun/io/CharToByteCp437.js,bin/sun/io/CharToByteCp500.js,bin/sun/io/CharToByteCp737.js,bin/sun/io/CharToByteCp775.js,bin/sun/io/CharToByteCp834.js,bin/sun/io/CharToByteCp838.js,bin/sun/io/CharToByteCp850.js,bin/sun/io/CharToByteCp852.js,bin/sun/io/CharToByteCp855.js,bin/sun/io/CharToByteCp856.js,bin/sun/io/CharToByteCp857.js,bin/sun/io/CharToByteCp858.js,bin/sun/io/CharToByteCp860.js,bin/sun/io/CharToByteCp861.js,bin/sun/io/CharToByteCp862.js,bin/sun/io/CharToByteCp863.js,bin/sun/io/CharToByteCp864.js,bin/sun/io/CharToByteCp865.js,bin/sun/io/CharToByteCp866.js,bin/sun/io/CharToByteCp868.js,bin/sun/io/CharToByteCp869.js,bin/sun/io/CharToByteCp870.js,bin/sun/io/CharToByteCp871.js,bin/sun/io/CharToByteCp874.js,bin/sun/io/CharToByteCp875.js,bin/sun/io/CharToByteCp918.js,bin/sun/io/CharToByteCp921.js,bin/sun/io/CharToByteCp922.js,bin/sun/io/CharToByteCp930.js,bin/sun/io/CharToByteCp933.js,bin/sun/io/CharToByteCp935.js,bin/sun/io/CharToByteCp937.js,bin/sun/io/CharToByteCp939.js,bin/sun/io/CharToByteCp942.js,bin/sun/io/CharToByteCp942C.js,bin/sun/io/CharToByteCp943.js,bin/sun/io/CharToByteCp943C.js,bin/sun/io/CharToByteCp948.js,bin/sun/io/CharToByteCp949.js,bin/sun/io/CharToByteCp949C.js,bin/sun/io/CharToByteCp950.js,bin/sun/io/CharToByteCp964.js,bin/sun/io/CharToByteCp970.js,bin/sun/io/CharToByteDBCS_ASCII.js,bin/sun/io/CharToByteDBCS_EBCDIC.js,bin/sun/io/CharToByteDoubleByte.js,bin/sun/io/CharToByteEUC.js,bin/sun/io/CharToByteEUC_CN.js,bin/sun/io/CharToByteEUC_JP.js,bin/sun/io/CharToByteEUC_JP_LINUX.js,bin/sun/io/CharToByteEUC_JP_Solaris.js,bin/sun/io/CharToByteEUC_KR.js,bin/sun/io/CharToByteEUC_TW.js,bin/sun/io/CharToByteGB18030.js,bin/sun/io/CharToByteGBK.js,bin/sun/io/CharToByteHKSCS.js,bin/sun/io/CharToByteHKSCS_2001.js,bin/sun/io/CharToByteISCII91.js,bin/sun/io/CharToByteISO2022.js,bin/sun/io/CharToByteISO2022CN_CNS.js,bin/sun/io/CharToByteISO2022CN_GB.js,bin/sun/io/CharToByteISO2022JP.js,bin/sun/io/CharToByteISO2022KR.js,bin/sun/io/CharToByteISO8859_1.js,bin/sun/io/CharToByteISO8859_13.js,bin/sun/io/CharToByteISO8859_15.js,bin/sun/io/CharToByteISO8859_2.js,bin/sun/io/CharToByteISO8859_3.js,bin/sun/io/CharToByteISO8859_4.js,bin/sun/io/CharToByteISO8859_5.js,bin/sun/io/CharToByteISO8859_6.js,bin/sun/io/CharToByteISO8859_7.js,bin/sun/io/CharToByteISO8859_8.js,bin/Native.js,bin/Security.js,bin/Toolkit.js,bin/PriviledgedAction.js,bin/PrivilegedAction.js,bin/JSToolkit.js,bin/ToolkitNative.js,bin/test/JSToolkit.js,bin/test/PrivilegedAction.js,bin/test/Security.js,bin/test/Toolkit.js,bin/test/AccessController.js,bin/CellListener.js,bin/LifeCells.js,bin/MainWindow.js,bin/Neighbor.js,bin/SimulationListener.js,bin/TanSugd3.js,bin/TanSugd3S.js,bin/test/Point2D.js,bin/jalview/ws/uimodel/PDBRestResponse.js,bin/jalview/ws/uimodel/PDBRestRequest.js,bin/jalview/ws/uimodel/AlignAnalysisUIText.js,bin/jalview/ws/seqfetcher/DbSourceProxyImpl.js,bin/jalview/ws/seqfetcher/DbSourceProxy.js,bin/jalview/ws/seqfetcher/ASequenceFetcher.js,bin/jalview/ws/rest/params/Tree.js,bin/jalview/ws/rest/params/SeqVector.js,bin/jalview/ws/rest/params/SeqIdVector.js,bin/jalview/ws/rest/params/SeqGroupIndexVector.js,bin/jalview/ws/rest/params/JobConstant.js,bin/jalview/ws/rest/params/AnnotationFile.js,bin/jalview/ws/rest/params/Alignment.js,bin/jalview/ws/rest/RestServiceDescription.js,bin/jalview/ws/rest/RestJobThread.js,bin/jalview/ws/rest/RestJob.js,bin/jalview/ws/rest/RestClient.js,bin/jalview/ws/rest/NoValidInputDataException.js,bin/jalview/ws/rest/InputType.js,bin/jalview/ws/rest/HttpResultSet.js,bin/jalview/ws/rest/AlignmentProcessor.js,bin/jalview/ws/params/simple/StringChoiceParameter.js,bin/jalview/ws/params/simple/Parameter.js,bin/jalview/ws/params/simple/Option.js,bin/jalview/ws/params/simple/IntegerParameter.js,bin/jalview/ws/params/simple/BooleanOption.js,bin/jalview/ws/params/WsParamSetI.js,bin/jalview/ws/params/ValueConstrainI.js,bin/jalview/ws/params/ParameterI.js,bin/jalview/ws/params/ParamManager.js,bin/jalview/ws/params/ParamDatastoreI.js,bin/jalview/ws/params/OptionI.js,bin/jalview/ws/params/InvalidArgumentException.js,bin/jalview/ws/params/AutoCalcSetting.js,bin/jalview/ws/params/ArgumentI.js,bin/jalview/ws/jws2/jabaws2/Jws2InstanceFactory.js,bin/jalview/ws/jws2/jabaws2/Jws2Instance.js,bin/jalview/ws/jws2/dm/JabaWsParamSet.js,bin/jalview/ws/jws2/dm/JabaValueConstrain.js,bin/jalview/ws/jws2/dm/JabaParameter.js,bin/jalview/ws/jws2/dm/JabaOption.js,bin/jalview/ws/jws2/dm/AAConSettings.js,bin/jalview/ws/jws2/SequenceAnnotationWSClient.js,bin/jalview/ws/jws2/RNAalifoldClient.js,bin/jalview/ws/jws2/ParameterUtils.js,bin/jalview/ws/jws2/MsaWSThread.js,bin/jalview/ws/jws2/MsaWSClient.js,bin/jalview/ws/jws2/Jws2Discoverer.js,bin/jalview/ws/jws2/Jws2Client.js,bin/jalview/ws/jws2/JabawsMsaInterfaceAlignCalcWorker.js,bin/jalview/ws/jws2/JabawsCalcWorker.js,bin/jalview/ws/jws2/JabaWsServerQuery.js,bin/jalview/ws/jws2/JabaPreset.js,bin/jalview/ws/jws2/JabaParamStore.js,bin/jalview/ws/jws2/JWs2Job.js,bin/jalview/ws/jws2/JPred301Client.js,bin/jalview/ws/jws2/AbstractJabaCalcWorker.js,bin/jalview/ws/jws2/AWS2Thread.js,bin/jalview/ws/jws2/AADisorderClient.js,bin/jalview/ws/jws2/AAConClient.js,bin/jalview/ws/jws1/WSJob.js,bin/jalview/ws/jws1/WS1Client.js,bin/jalview/ws/jws1/SeqSearchWSThread.js,bin/jalview/ws/jws1/SeqSearchWSClient.js,bin/jalview/ws/jws1/MsaWSThread.js,bin/jalview/ws/jws1/MsaWSClient.js,bin/jalview/ws/jws1/JWS1Thread.js,bin/jalview/ws/jws1/JPredThread.js,bin/jalview/ws/jws1/JPredClient.js,bin/jalview/ws/jws1/Discoverer.js,bin/jalview/ws/jws1/Annotate3D.js,bin/jalview/ws/io/mime/MimeTypes.js,bin/jalview/ws/io/mime/JalviewMimeContentHandler.js,bin/jalview/ws/io/mime/HttpContentHandler.js,bin/jalview/ws/ebi/EBIFetchClient.js,bin/jalview/ws/dbsources/das/datamodel/JalviewSource.js,bin/jalview/ws/dbsources/das/datamodel/DasSourceRegistry.js,bin/jalview/ws/dbsources/das/datamodel/DasSequenceSource.js,bin/jalview/ws/dbsources/das/api/jalviewSourceI.js,bin/jalview/ws/dbsources/das/api/DasSourceRegistryI.js,bin/jalview/ws/dbsources/Xfam.js,bin/jalview/ws/dbsources/UnprotName.js,bin/jalview/ws/dbsources/Uniprot.js,bin/jalview/ws/dbsources/RfamSeed.js,bin/jalview/ws/dbsources/RfamFull.js,bin/jalview/ws/dbsources/Rfam.js,bin/jalview/ws/dbsources/PfamSeed.js,bin/jalview/ws/dbsources/PfamFull.js,bin/jalview/ws/dbsources/Pfam.js,bin/jalview/ws/dbsources/Pdb.js,bin/jalview/ws/dbsources/PDBRestClient.js,bin/jalview/ws/dbsources/GeneDbSource.js,bin/jalview/ws/dbsources/EmblXmlSource.js,bin/jalview/ws/dbsources/EmblSource.js,bin/jalview/ws/dbsources/EmblCdsSouce.js,bin/jalview/ws/dbsources/EbiFileRetrievedProxy.js,bin/jalview/ws/WSMenuEntryProviderI.js,bin/jalview/ws/WSClientI.js,bin/jalview/ws/WSClient.js,bin/jalview/ws/SequenceFetcher.js,bin/jalview/ws/JobStateSummary.js,bin/jalview/ws/HttpClientUtils.js,bin/jalview/ws/DasSequenceFeatureFetcher.js,bin/jalview/ws/DBRefFetcher.js,bin/jalview/ws/AWsJob.js,bin/jalview/ws/AWSThread.js,bin/jalview/workers/StrucConsensusThread.js,bin/jalview/workers/ConservationThread.js,bin/jalview/workers/ConsensusThread.js,bin/jalview/workers/ComplementConsensusThread.js,bin/jalview/workers/AlignCalcWorker.js,bin/jalview/workers/AlignCalcManager.js,bin/jalview/viewmodel/styles/ViewStyle.js,bin/jalview/viewmodel/seqfeatures/FeaturesDisplayed.js,bin/jalview/viewmodel/seqfeatures/FeatureSettingsModel.js,bin/jalview/viewmodel/seqfeatures/FeatureRendererSettings.js,bin/jalview/viewmodel/seqfeatures/FeatureRendererModel.js,bin/jalview/viewmodel/annotationfilter/AnnotationFilterParameter.js,bin/jalview/viewmodel/PCAModel.js,bin/jalview/viewmodel/AlignmentViewport.js,bin/jalview/util/jarInputStreamProvider.js,bin/jalview/util/UrlLink.js,bin/jalview/util/TableSorter.js,bin/jalview/util/StringUtils.js,bin/jalview/util/ShiftList.js,bin/jalview/util/ReverseListIterator.js,bin/jalview/util/QuickSort.js,bin/jalview/util/Platform.js,bin/jalview/util/ParseHtmlBodyAndLinks.js,bin/jalview/util/MessageManager.js,bin/jalview/util/MappingUtils.js,bin/jalview/util/MapList.js,bin/jalview/util/ImageMaker.js,bin/jalview/util/GroupUrlLink.js,bin/jalview/util/Format.js,bin/jalview/util/DBRefUtils.js,bin/jalview/util/Comparison.js,bin/jalview/util/ColorUtils.js,bin/jalview/util/BrowserLauncher.js,bin/jalview/util/AWTConsole.js,bin/jalview/structures/models/SequenceStructureBindingModel.js,bin/jalview/structures/models/AAStructureBindingModel.js,bin/jalview/structure/VamsasSource.js,bin/jalview/structure/VamsasListener.js,bin/jalview/structure/StructureSelectionManager.js,bin/jalview/structure/StructureMappingcommandSet.js,bin/jalview/structure/StructureMapping.js,bin/jalview/structure/StructureListener.js,bin/jalview/structure/SequenceListener.js,bin/jalview/structure/SelectionSource.js,bin/jalview/structure/SelectionListener.js,bin/jalview/structure/SecondaryStructureListener.js,bin/jalview/structure/CommandListener.js,bin/jalview/structure/AtomSpec.js,bin/jalview/structure/AlignmentViewPanelListener.js,bin/jalview/schemes/ZappoColourScheme.js,bin/jalview/schemes/UserColourScheme.js,bin/jalview/schemes/TurnColourScheme.js,bin/jalview/schemes/TaylorColourScheme.js,bin/jalview/schemes/TCoffeeColourScheme.js,bin/jalview/schemes/StrandColourScheme.js,bin/jalview/schemes/ScoreMatrix.js,bin/jalview/schemes/ScoreColourScheme.js,bin/jalview/schemes/ResidueProperties.js,bin/jalview/schemes/ResidueColourScheme.js,bin/jalview/schemes/RNAInteractionColourScheme.js,bin/jalview/schemes/RNAHelicesColourChooser.js,bin/jalview/schemes/RNAHelicesColour.js,bin/jalview/schemes/PurinePyrimidineColourScheme.js,bin/jalview/schemes/PIDColourScheme.js,bin/jalview/schemes/NucleotideColourScheme.js,bin/jalview/schemes/HydrophobicColourScheme.js,bin/jalview/schemes/HelixColourScheme.js,bin/jalview/schemes/GraduatedColor.js,bin/jalview/schemes/FollowerColourScheme.js,bin/jalview/schemes/CovariationColourScheme.js,bin/jalview/schemes/Consensus.js,bin/jalview/schemes/ColourSchemeProperty.js,bin/jalview/schemes/ColourSchemeI.js,bin/jalview/schemes/ClustalxColourScheme.js,bin/jalview/schemes/BuriedColourScheme.js,bin/jalview/schemes/Blosum62ColourScheme.js,bin/jalview/schemes/AnnotationColourGradient.js,bin/jalview/schemabinding/version2/descriptors/WebServiceParameterSetDescriptor.js,bin/jalview/schemabinding/version2/descriptors/ViewportDescriptor.js,bin/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.js,bin/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.js,bin/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.js,bin/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/TreeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.js,bin/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SettingDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SecondaryStructureDescriptor.js,bin/jalview/schemabinding/version2/descriptors/RnaViewerDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PropertyDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.js,bin/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MappingDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MapListToDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JSeqDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JGroupDescriptor.js,bin/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.js,bin/jalview/schemabinding/version2/descriptors/GroupDescriptor.js,bin/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.js,bin/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.js,bin/jalview/schemabinding/version2/descriptors/FeatureDescriptor.js,bin/jalview/schemabinding/version2/descriptors/DBRefDescriptor.js,bin/jalview/schemabinding/version2/descriptors/ColourDescriptor.js,bin/jalview/schemabinding/version2/descriptors/CalcIdParamDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationColourSchemeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.js,bin/jalview/schemabinding/version2/WebServiceParameterSet.js,bin/jalview/schemabinding/version2/Viewport.js,bin/jalview/schemabinding/version2/VamsasModel.js,bin/jalview/schemabinding/version2/VAMSAS.js,bin/jalview/schemabinding/version2/UserColours.js,bin/jalview/schemabinding/version2/UserColourScheme.js,bin/jalview/schemabinding/version2/Tree.js,bin/jalview/schemabinding/version2/ThresholdLine.js,bin/jalview/schemabinding/version2/StructureState.js,bin/jalview/schemabinding/version2/Setting.js,bin/jalview/schemabinding/version2/SequenceType.js,bin/jalview/schemabinding/version2/SequenceSetProperties.js,bin/jalview/schemabinding/version2/SequenceSet.js,bin/jalview/schemabinding/version2/Sequence.js,bin/jalview/schemabinding/version2/SecondaryStructure.js,bin/jalview/schemabinding/version2/RnaViewer.js,bin/jalview/schemabinding/version2/Property.js,bin/jalview/schemabinding/version2/Pdbids.js,bin/jalview/schemabinding/version2/PdbentryItem.js,bin/jalview/schemabinding/version2/Pdbentry.js,bin/jalview/schemabinding/version2/OtherData.js,bin/jalview/schemabinding/version2/MappingChoice.js,bin/jalview/schemabinding/version2/Mapping.js,bin/jalview/schemabinding/version2/MapListType.js,bin/jalview/schemabinding/version2/MapListTo.js,bin/jalview/schemabinding/version2/MapListFrom.js,bin/jalview/schemabinding/version2/JalviewUserColours.js,bin/jalview/schemabinding/version2/JalviewModelSequence.js,bin/jalview/schemabinding/version2/JalviewModel.js,bin/jalview/schemabinding/version2/JSeq.js,bin/jalview/schemabinding/version2/JGroup.js,bin/jalview/schemabinding/version2/HiddenColumns.js,bin/jalview/schemabinding/version2/Group.js,bin/jalview/schemabinding/version2/Features.js,bin/jalview/schemabinding/version2/FeatureSettings.js,bin/jalview/schemabinding/version2/Feature.js,bin/jalview/schemabinding/version2/DBRef.js,bin/jalview/schemabinding/version2/Colour.js,bin/jalview/schemabinding/version2/CalcIdParam.js,bin/jalview/schemabinding/version2/AnnotationElement.js,bin/jalview/schemabinding/version2/AnnotationColours.js,bin/jalview/schemabinding/version2/AnnotationColourScheme.js,bin/jalview/schemabinding/version2/Annotation.js,bin/jalview/schemabinding/version2/AlcodonFrame.js,bin/jalview/schemabinding/version2/Alcodon.js,bin/jalview/schemabinding/version2/AlcodMap.js,bin/jalview/rest/RestHandler.js,bin/jalview/renderer/seqfeatures/FeatureRenderer.js,bin/jalview/renderer/AwtRenderPanelI.js,bin/jalview/renderer/AnnotationRenderer.js,bin/jalview/math/RotatableMatrix.js,bin/jalview/math/Matrix.js,bin/jalview/math/AlignmentDimension.js,bin/jalview/json/binding/v1/SequencePojo.js,bin/jalview/json/binding/v1/SequenceGrpPojo.js,bin/jalview/json/binding/v1/SequenceFeaturesPojo.js,bin/jalview/json/binding/v1/BioJSRepositoryPojo.js,bin/jalview/json/binding/v1/BioJSReleasePojo.js,bin/jalview/json/binding/v1/AppSettingsPojo.js,bin/jalview/json/binding/v1/AnnotationPojo.js,bin/jalview/json/binding/v1/AlignmentPojo.js,bin/jalview/json/binding/v1/AlignmentAnnotationPojo.js,bin/jalview/jbgui/PDBDocFieldPreferences.js,bin/jalview/jbgui/GWsPreferences.js,bin/jalview/jbgui/GWebserviceInfo.js,bin/jalview/jbgui/GUserDefinedColours.js,bin/jalview/jbgui/GTreePanel.js,bin/jalview/jbgui/GStructureViewer.js,bin/jalview/jbgui/GStructureChooser.js,bin/jalview/jbgui/GSplitFrame.js,bin/jalview/jbgui/GSliderPanel.js,bin/jalview/jbgui/GSequenceLink.js,bin/jalview/jbgui/GRnaStructureViewer.js,bin/jalview/jbgui/GRestServiceEditorPane.js,bin/jalview/jbgui/GRestInputParamEditDialog.js,bin/jalview/jbgui/GPreferences.js,bin/jalview/jbgui/GPairwiseAlignPanel.js,bin/jalview/jbgui/GPDBSearchPanel.js,bin/jalview/jbgui/GPCAPanel.js,bin/jalview/jbgui/GFontChooser.js,bin/jalview/jbgui/GFinder.js,bin/jalview/jbgui/GDesktop.js,bin/jalview/jbgui/GDasSourceBrowser.js,bin/jalview/jbgui/GCutAndPasteTransfer.js,bin/jalview/jbgui/GCutAndPasteHtmlTransfer.js,bin/jalview/jbgui/GAlignmentPanel.js,bin/jalview/jbgui/GAlignFrame.js,bin/jalview/jbgui/GAlignExportSettings.js,bin/jalview/javascript/MouseOverStructureListener.js,bin/jalview/javascript/MouseOverListener.js,bin/jalview/javascript/JsSelectionSender.js,bin/jalview/javascript/JsCallBack.js,bin/jalview/javascript/JalviewLiteJsApi.js,bin/jalview/javascript/JSFunctionExec.js,bin/jalview/io/vamsas/Tree.js,bin/jalview/io/vamsas/Sequencemapping.js,bin/jalview/io/vamsas/Sequencefeature.js,bin/jalview/io/vamsas/Rangetype.js,bin/jalview/io/vamsas/LocalDocSyncObject.js,bin/jalview/io/vamsas/Dbref.js,bin/jalview/io/vamsas/DatastoreRegistry.js,bin/jalview/io/vamsas/DatastoreItem.js,bin/jalview/io/vamsas/Datasetsequence.js,bin/jalview/io/packed/SimpleDataProvider.js,bin/jalview/io/packed/ParsePackedSet.js,bin/jalview/io/packed/JalviewDataset.js,bin/jalview/io/packed/DataProvider.js,bin/jalview/io/WSWUBlastClient.js,bin/jalview/io/VamsasAppDatastore.js,bin/jalview/io/TCoffeeScoreFile.js,bin/jalview/io/StockholmFile.js,bin/jalview/io/SimpleBlastFile.js,bin/jalview/io/SequenceAnnotationReport.js,bin/jalview/io/RnamlFile.js,bin/jalview/io/PileUpfile.js,bin/jalview/io/PhylipFile.js,bin/jalview/io/PfamFile.js,bin/jalview/io/PIRFile.js,bin/jalview/io/NewickFile.js,bin/jalview/io/ModellerDescription.js,bin/jalview/io/MatrixFile.js,bin/jalview/io/MSFfile.js,bin/jalview/io/JnetAnnotationMaker.js,bin/jalview/io/JalviewFileView.js,bin/jalview/io/JalviewFileFilter.js,bin/jalview/io/JalviewFileChooser.js,bin/jalview/io/JSONFile.js,bin/jalview/io/JPredFile.js,bin/jalview/io/InputStreamParser.js,bin/jalview/io/IdentifyFile.js,bin/jalview/io/HtmlSvgOutput.js,bin/jalview/io/HtmlFile.js,bin/jalview/io/HTMLOutput.js,bin/jalview/io/Gff3File.js,bin/jalview/io/FormatAdapter.js,bin/jalview/io/FileParse.js,bin/jalview/io/FileLoader.js,bin/jalview/io/FeaturesFile.js,bin/jalview/io/FastaFile.js,bin/jalview/io/DBRefFile.js,bin/jalview/io/ClustalFile.js,bin/jalview/io/ClansFile.js,bin/jalview/io/BioJsHTMLOutput.js,bin/jalview/io/BLCFile.js,bin/jalview/io/AppletFormatAdapter.js,bin/jalview/io/AnnotationFile.js,bin/jalview/io/AlignmentProperties.js,bin/jalview/io/AlignFile.js,bin/jalview/io/AMSAFile.js,bin/jalview/httpserver/HttpServer.js,bin/jalview/httpserver/AbstractRequestHandler.js,bin/jalview/gui/WsPreferences.js,bin/jalview/gui/WsParamSetManager.js,bin/jalview/gui/WsJobParameters.js,bin/jalview/gui/WebserviceInfo.js,bin/jalview/gui/ViewSelectionMenu.js,bin/jalview/gui/VamsasApplication.js,bin/jalview/gui/UserQuestionnaireCheck.js,bin/jalview/gui/UserDefinedColours.js,bin/jalview/gui/TreePanel.js,bin/jalview/gui/TreeCanvas.js,bin/jalview/gui/TextColourChooser.js,bin/jalview/gui/StructureViewerBase.js,bin/jalview/gui/StructureViewer.js,bin/jalview/gui/StructureChooser.js,bin/jalview/gui/SplitFrame.js,bin/jalview/gui/SplashScreen.js,bin/jalview/gui/SliderPanel.js,bin/jalview/gui/SequenceRenderer.js,bin/jalview/gui/SequenceFetcher.js,bin/jalview/gui/SeqPanel.js,bin/jalview/gui/SeqCanvas.js,bin/jalview/gui/ScalePanel.js,bin/jalview/gui/SVGOptions.js,bin/jalview/gui/RotatableCanvas.js,bin/jalview/gui/RestServiceEditorPane.js,bin/jalview/gui/RestInputParamEditDialog.js,bin/jalview/gui/RedundancyPanel.js,bin/jalview/gui/PromptUserConfig.js,bin/jalview/gui/ProgressBar.js,bin/jalview/gui/Preferences.js,bin/jalview/gui/PopupMenu.js,bin/jalview/gui/PairwiseAlignPanel.js,bin/jalview/gui/PaintRefresher.js,bin/jalview/gui/PDBSearchPanel.js,bin/jalview/gui/PCAPanel.js,bin/jalview/gui/OverviewPanel.js,bin/jalview/gui/OptsParametersContainerI.js,bin/jalview/gui/OptsAndParamsPage.js,bin/jalview/gui/OOMWarning.js,bin/jalview/gui/MenuChooser.js,bin/jalview/gui/JvSwingUtils.js,bin/jalview/gui/JalviewDialog.js,bin/jalview/gui/JalviewChimeraBindingModel.js,bin/jalview/gui/JalviewChangeSupport.js,bin/jalview/gui/JalviewAppender.js,bin/jalview/gui/Jalview2XML_V1.js,bin/jalview/gui/Jalview2XML.js,bin/jalview/gui/JDatabaseTree.js,bin/jalview/gui/IdwidthAdjuster.js,bin/jalview/gui/IdPanel.js,bin/jalview/gui/IdCanvas.js,bin/jalview/gui/IProgressIndicatorHandler.js,bin/jalview/gui/IProgressIndicator.js,bin/jalview/gui/Help.js,bin/jalview/gui/HTMLOptions.js,bin/jalview/gui/FontChooser.js,bin/jalview/gui/Finder.js,bin/jalview/gui/FeatureSettings.js,bin/jalview/gui/FeatureRenderer.js,bin/jalview/gui/FeatureColourChooser.js,bin/jalview/gui/EditNameDialog.js,bin/jalview/gui/EPSOptions.js,bin/jalview/gui/Desktop.js,bin/jalview/gui/DasSourceBrowser.js,bin/jalview/gui/CutAndPasteTransfer.js,bin/jalview/gui/CutAndPasteHtmlTransfer.js,bin/jalview/gui/Console.js,bin/jalview/gui/ChimeraViewFrame.js,bin/jalview/gui/BlogReader.js,bin/jalview/gui/AssociatePdbFileWithSeq.js,bin/jalview/gui/AppVarnaBinding.js,bin/jalview/gui/AppVarna.js,bin/jalview/gui/AppJmolBinding.js,bin/jalview/gui/AppJmol.js,bin/jalview/gui/AnnotationRowFilter.js,bin/jalview/gui/AnnotationPanel.js,bin/jalview/gui/AnnotationLabels.js,bin/jalview/gui/AnnotationExporter.js,bin/jalview/gui/AnnotationColumnChooser.js,bin/jalview/gui/AnnotationColourChooser.js,bin/jalview/gui/AnnotationChooser.js,bin/jalview/gui/AlignmentPanel.js,bin/jalview/gui/AlignViewport.js,bin/jalview/gui/AlignFrame.js,bin/jalview/gui/AlignExportSettings.js,bin/jalview/ext/varna/VarnaCommands.js,bin/jalview/ext/varna/RnaModel.js,bin/jalview/ext/varna/JalviewVarnaBinding.js,bin/jalview/ext/rbvi/chimera/JalviewChimeraBinding.js,bin/jalview/ext/rbvi/chimera/ChimeraListener.js,bin/jalview/ext/rbvi/chimera/ChimeraCommands.js,bin/jalview/ext/paradise/Annotate3D.js,bin/jalview/ext/jmol/PDBFileWithJmol.js,bin/jalview/ext/jmol/JmolCommands.js,bin/jalview/ext/jmol/JalviewJmolBinding.js,bin/jalview/exceptions/NoFileSelectedException.js,bin/jalview/exceptions/JalviewException.js,bin/jalview/datamodel/xdb/embl/Qualifier.js,bin/jalview/datamodel/xdb/embl/EmblSequence.js,bin/jalview/datamodel/xdb/embl/EmblFile.js,bin/jalview/datamodel/xdb/embl/EmblFeatureLocations.js,bin/jalview/datamodel/xdb/embl/EmblFeatureLocElement.js,bin/jalview/datamodel/xdb/embl/EmblFeature.js,bin/jalview/datamodel/xdb/embl/EmblError.js,bin/jalview/datamodel/xdb/embl/EmblEntry.js,bin/jalview/datamodel/xdb/embl/BasePosition.js,bin/jalview/datamodel/UniprotSequence.js,bin/jalview/datamodel/UniprotProteinName.js,bin/jalview/datamodel/UniprotFile.js,bin/jalview/datamodel/UniprotEntry.js,bin/jalview/datamodel/StructureViewerModel.js,bin/jalview/datamodel/SequencePoint.js,bin/jalview/datamodel/SequenceNode.js,bin/jalview/datamodel/SequenceI.js,bin/jalview/datamodel/SequenceGroup.js,bin/jalview/datamodel/SequenceFeature.js,bin/jalview/datamodel/SequenceDummy.js,bin/jalview/datamodel/SequenceCollectionI.js,bin/jalview/datamodel/Sequence.js,bin/jalview/datamodel/SeqCigar.js,bin/jalview/datamodel/SecondaryStructureAnnotation.js,bin/jalview/datamodel/SearchResults.js,bin/jalview/datamodel/RnaViewerModel.js,bin/jalview/datamodel/ProvenanceEntry.js,bin/jalview/datamodel/Provenance.js,bin/jalview/datamodel/PDBEntry.js,bin/jalview/datamodel/NodeTransformI.js,bin/jalview/datamodel/Mapping.js,bin/jalview/datamodel/IncompleteCodonException.js,bin/jalview/datamodel/HiddenSequences.js,bin/jalview/datamodel/GraphLine.js,bin/jalview/datamodel/FeatureProperties.js,bin/jalview/datamodel/DBRefSource.js,bin/jalview/datamodel/DBRefEntry.js,bin/jalview/datamodel/ColumnSelection.js,bin/jalview/datamodel/CigarSimple.js,bin/jalview/datamodel/CigarCigar.js,bin/jalview/datamodel/CigarBase.js,bin/jalview/datamodel/CigarArray.js,bin/jalview/datamodel/BinarySequence.js,bin/jalview/datamodel/BinaryNode.js,bin/jalview/datamodel/Annotation.js,bin/jalview/datamodel/AnnotatedCollectionI.js,bin/jalview/datamodel/AlignmentView.js,bin/jalview/datamodel/AlignmentOrder.js,bin/jalview/datamodel/AlignmentI.js,bin/jalview/datamodel/AlignmentExportData.js,bin/jalview/datamodel/AlignmentAnnotation.js,bin/jalview/datamodel/Alignment.js,bin/jalview/datamodel/AlignedCodonFrame.js,bin/jalview/datamodel/AlignedCodon.js,bin/jalview/datamodel/ASequenceI.js,bin/jalview/datamodel/ASequence.js,bin/jalview/controller/FeatureSettingsControllerGuiI.js,bin/jalview/controller/FeatureSettingsController.js,bin/jalview/controller/AlignViewController.js,bin/jalview/commands/TrimRegionCommand.js,bin/jalview/commands/SlideSequencesCommand.js,bin/jalview/commands/RemoveGapsCommand.js,bin/jalview/commands/RemoveGapColCommand.js,bin/jalview/commands/OrderCommand.js,bin/jalview/commands/EditCommand.js,bin/jalview/commands/CommandI.js,bin/jalview/commands/ChangeCaseCommand.js,bin/jalview/binding/Viewport.js,bin/jalview/binding/VamsasModel.js,bin/jalview/binding/VAMSAS.js,bin/jalview/binding/UserColours.js,bin/jalview/binding/UserColourScheme.js,bin/jalview/binding/Tree.js,bin/jalview/binding/Setting.js,bin/jalview/binding/SequenceType.js,bin/jalview/binding/SequenceSet.js,bin/jalview/binding/Sequence.js,bin/jalview/binding/Property.js,bin/jalview/binding/Pdbids.js,bin/jalview/binding/PdbentryItem.js,bin/jalview/binding/Pdbentry.js,bin/jalview/binding/JalviewUserColours.js,bin/jalview/binding/JalviewModelSequence.js,bin/jalview/binding/JalviewModel.js,bin/jalview/binding/JSeq.js,bin/jalview/binding/JGroup.js,bin/jalview/binding/Features.js,bin/jalview/binding/FeatureSettings.js,bin/jalview/binding/Feature.js,bin/jalview/binding/Colour.js,bin/jalview/binding/AnnotationElement.js,bin/jalview/binding/Annotation.js,bin/jalview/binding/Alignment.js,bin/jalview/bin/JalviewLiteURLRetrieve.js,bin/jalview/bin/JalviewLite.js,bin/jalview/bin/Jalview.js,bin/jalview/bin/Cache.js,bin/jalview/appletgui/UserDefinedColours.js,bin/jalview/appletgui/TreePanel.js,bin/jalview/appletgui/TreeCanvas.js,bin/jalview/appletgui/Tooltip.js,bin/jalview/appletgui/TitledPanel.js,bin/jalview/appletgui/SplitFrame.js,bin/jalview/appletgui/SliderPanel.js,bin/jalview/appletgui/SequenceRenderer.js,bin/jalview/appletgui/SeqPanel.js,bin/jalview/appletgui/SeqCanvas.js,bin/jalview/appletgui/ScalePanel.js,bin/jalview/appletgui/RotatableCanvas.js,bin/jalview/appletgui/RedundancyPanel.js,bin/jalview/appletgui/PairwiseAlignPanel.js,bin/jalview/appletgui/PaintRefresher.js,bin/jalview/appletgui/PCAPanel.js,bin/jalview/appletgui/OverviewPanel.js,bin/jalview/appletgui/JVDialog.js,bin/jalview/appletgui/IdwidthAdjuster.js,bin/jalview/appletgui/IdPanel.js,bin/jalview/appletgui/IdCanvas.js,bin/jalview/appletgui/FontChooser.js,bin/jalview/appletgui/Finder.js,bin/jalview/appletgui/FeatureSettings.js,bin/jalview/appletgui/FeatureRenderer.js,bin/jalview/appletgui/FeatureColourChooser.js,bin/jalview/appletgui/ExtJmol.js,bin/jalview/appletgui/EmbmenuFrame.js,bin/jalview/appletgui/EditNameDialog.js,bin/jalview/appletgui/CutAndPasteTransfer.js,bin/jalview/appletgui/AppletJmolBinding.js,bin/jalview/appletgui/AppletJmol.js,bin/jalview/appletgui/AnnotationRowFilter.js,bin/jalview/appletgui/AnnotationPanel.js,bin/jalview/appletgui/AnnotationLabels.js,bin/jalview/appletgui/AnnotationColumnChooser.js,bin/jalview/appletgui/AnnotationColourChooser.js,bin/jalview/appletgui/AlignmentPanel.js,bin/jalview/appletgui/AlignViewport.js,bin/jalview/appletgui/AlignFrame.js,bin/jalview/appletgui/APopupMenu.js,bin/jalview/api/structures/JalviewStructureDisplayI.js,bin/jalview/api/analysis/ViewBasedAnalysisI.js,bin/jalview/api/analysis/ScoreModelI.js,bin/jalview/api/ViewStyleI.js,bin/jalview/api/StructureSelectionManagerProvider.js,bin/jalview/api/SplitContainerI.js,bin/jalview/api/SequenceStructureBinding.js,bin/jalview/api/SequenceRenderer.js,bin/jalview/api/RotatableCanvasI.js,bin/jalview/api/OOMHandlerI.js,bin/jalview/api/FeaturesDisplayedI.js,bin/jalview/api/FeatureSettingsModelI.js,bin/jalview/api/FeatureSettingsControllerI.js,bin/jalview/api/FeatureRenderer.js,bin/jalview/api/ComplexAlignFile.js,bin/jalview/api/AlignmentViewPanel.js,bin/jalview/api/AlignViewportI.js,bin/jalview/api/AlignViewControllerI.js,bin/jalview/api/AlignViewControllerGuiI.js,bin/jalview/api/AlignExportSettingI.js,bin/jalview/api/AlignCalcWorkerI.js,bin/jalview/api/AlignCalcManagerI.js,bin/jalview/analysis/scoremodels/SWScoreModel.js,bin/jalview/analysis/scoremodels/PairwiseSeqScoreModel.js,bin/jalview/analysis/scoremodels/PIDScoreModel.js,bin/jalview/analysis/scoremodels/FeatureScoreModel.js,bin/jalview/analysis/WUSSParseException.js,bin/jalview/analysis/StructureFrequency.js,bin/jalview/analysis/SequenceIdMatcher.js,bin/jalview/analysis/SeqsetUtils.js,bin/jalview/analysis/SecStrConsensus.js,bin/jalview/analysis/Rna.js,bin/jalview/analysis/ParseProperties.js,bin/jalview/analysis/PCA.js,bin/jalview/analysis/NJTree.js,bin/jalview/analysis/Grouping.js,bin/jalview/analysis/Finder.js,bin/jalview/analysis/Dna.js,bin/jalview/analysis/CrossRef.js,bin/jalview/analysis/Conservation.js,bin/jalview/analysis/CodonComparator.js,bin/jalview/analysis/CodingUtils.js,bin/jalview/analysis/AnnotationSorter.js,bin/jalview/analysis/AlignmentUtils.js,bin/jalview/analysis/AlignmentSorter.js,bin/jalview/analysis/AlignmentAnnotationUtils.js,bin/jalview/analysis/AlignSeq.js,bin/jalview/analysis/AAFrequency.js,bin/org/jmol/viewer/Viewer.js,bin/org/exolab/castor/xml/Unmarshaller.js,bin/org/exolab/castor/mapping/Mapping.js,bin/netscape/javascript/JSObject.js,bin/netscape/javascript/JSException.js,bin/javajs/util/ZipTools.js,bin/javajs/util/ZipData.js,bin/javajs/util/XmlUtil.js,bin/javajs/util/V3d.js,bin/javajs/util/V3.js,bin/javajs/util/T4.js,bin/javajs/util/T3i.js,bin/javajs/util/T3d.js,bin/javajs/util/T3.js,bin/javajs/util/StringDataReader.js,bin/javajs/util/SB.js,bin/javajs/util/Rdr.js,bin/javajs/util/Quat.js,bin/javajs/util/PT.js,bin/javajs/util/P4.js,bin/javajs/util/P3i.js,bin/javajs/util/P3.js,bin/javajs/util/OC.js,bin/javajs/util/Measure.js,bin/javajs/util/Matrix.js,bin/javajs/util/M4.js,bin/javajs/util/M34.js,bin/javajs/util/M3.js,bin/javajs/util/Lst.js,bin/javajs/util/ListDataReader.js,bin/javajs/util/LimitedLineReader.js,bin/javajs/util/Encoding.js,bin/javajs/util/Eigen.js,bin/javajs/util/DataReader.js,bin/javajs/util/DF.js,bin/javajs/util/CompoundDocument.js,bin/javajs/util/CompoundDocHeader.js,bin/javajs/util/CompoundDocDirEntry.js,bin/javajs/util/CifDataParser.js,bin/javajs/util/CU.js,bin/javajs/util/BinaryDocument.js,bin/javajs/util/Base64.js,bin/javajs/util/BS.js,bin/javajs/util/BC.js,bin/javajs/util/BArray.js,bin/javajs/util/ArrayDataReader.js,bin/javajs/util/AjaxURLStreamHandlerFactory.js,bin/javajs/util/AjaxURLStreamHandler.js,bin/javajs/util/AjaxURLConnection.js,bin/javajs/util/AU.js,bin/javajs/util/A4.js,bin/javajs/swing/TableColumn.js,bin/javajs/swing/TableCellRenderer.js,bin/javajs/swing/SwingConstants.js,bin/javajs/swing/ListSelectionModel.js,bin/javajs/swing/JTextPane.js,bin/javajs/swing/JTextField.js,bin/javajs/swing/JTable.js,bin/javajs/swing/JSplitPane.js,bin/javajs/swing/JScrollPane.js,bin/javajs/swing/JRadioButtonMenuItem.js,bin/javajs/swing/JPopupMenu.js,bin/javajs/swing/JPanel.js,bin/javajs/swing/JMenuItem.js,bin/javajs/swing/JMenu.js,bin/javajs/swing/JLabel.js,bin/javajs/swing/JEditorPane.js,bin/javajs/swing/JDialog.js,bin/javajs/swing/JContentPane.js,bin/javajs/swing/JComponentImp.js,bin/javajs/swing/JComponent.js,bin/javajs/swing/JComboBox.js,bin/javajs/swing/JCheckBoxMenuItem.js,bin/javajs/swing/JCheckBox.js,bin/javajs/swing/JButton.js,bin/javajs/swing/Insets.js,bin/javajs/swing/GridBagLayout.js,bin/javajs/swing/GridBagConstraints.js,bin/javajs/swing/Grid.js,bin/javajs/swing/FlowLayout.js,bin/javajs/swing/Document.js,bin/javajs/swing/ColumnSelectionModel.js,bin/javajs/swing/Cell.js,bin/javajs/swing/ButtonGroup.js,bin/javajs/swing/AbstractTableModel.js,bin/javajs/swing/AbstractButton.js,bin/javajs/img/PpmEncoder.js,bin/javajs/img/PngEncoder.js,bin/javajs/img/PdfEncoder.js,bin/javajs/img/JpgEncoder.js,bin/javajs/img/Jpg64Encoder.js,bin/javajs/img/ImageEncoder.js,bin/javajs/img/GifEncoder.js,bin/javajs/img/CRCEncoder.js,bin/javajs/img/BMPDecoder.js,bin/javajs/export/PDFObject.js,bin/javajs/export/PDFCreator.js,bin/javajs/awt/event/WindowListener.js,bin/javajs/awt/event/WindowEvent.js,bin/javajs/awt/event/ItemEvent.js,bin/javajs/awt/event/Event.js,bin/javajs/awt/event/ActionListener.js,bin/javajs/awt/event/ActionEvent.js,bin/javajs/awt/LayoutManager.js,bin/javajs/awt/Font.js,bin/javajs/awt/Dimension.js,bin/javajs/awt/Container.js,bin/javajs/awt/Component.js,bin/javajs/awt/Color.js,bin/javajs/awt/BorderLayout.js,bin/javajs/api/ZInputStream.js,bin/javajs/api/SwingController.js,bin/javajs/api/SC.js,bin/javajs/api/PlatformViewer.js,bin/javajs/api/JmolObjectInterface.js,bin/javajs/api/JSONEncodable.js,bin/javajs/api/JSInterface.js,bin/javajs/api/Interface.js,bin/javajs/api/HTMLWindowEvent.js,bin/javajs/api/HTMLElement.js,bin/javajs/api/GenericZipTools.js,bin/javajs/api/GenericZipInputStream.js,bin/javajs/api/GenericPlatform.js,bin/javajs/api/GenericMouseInterface.js,bin/javajs/api/GenericMenuInterface.js,bin/javajs/api/GenericLineReader.js,bin/javajs/api/GenericImageEncoder.js,bin/javajs/api/GenericImageDialog.js,bin/javajs/api/GenericFileInterface.js,bin/javajs/api/GenericColor.js,bin/javajs/api/GenericCifDataParser.js,bin/javajs/api/GenericBinaryDocument.js,bin/javajs/api/FontManager.js,bin/javajs/api/EventManager.js,bin/javajs/api/EigenInterface.js,bin/javajs/api/BytePoster.js,bin/javajs/J2SRequireImport.js,bin/javajs/J2SIgnoreImport.js,bin/jalview/jsdev/api/VarnaRNA.js,bin/jalview/jsdev/GenericFileAdapter.js,bin/jalview/jsdev/Constants.js,bin/fr/orsay/lri/varna/models/rna/RNA.js,bin/com/stevesoft/pat/wrap/WriterWrap.js,bin/com/stevesoft/pat/wrap/StringWrap.js,bin/com/stevesoft/pat/wrap/StringBufferWrap.js,bin/com/stevesoft/pat/wrap/RandomAccessFileWrap.js,bin/com/stevesoft/pat/wrap/CharArrayWrap.js,bin/com/stevesoft/pat/wrap/CharArrayBufferWrap.js,bin/com/stevesoft/pat/patInt.js,bin/com/stevesoft/pat/patInf.js,bin/com/stevesoft/pat/parsePerl.js,bin/com/stevesoft/pat/oneChar.js,bin/com/stevesoft/pat/lookAhead.js,bin/com/stevesoft/pat/WantMoreTextReplaceRule.js,bin/com/stevesoft/pat/Validator.js,bin/com/stevesoft/pat/UniValidator.js,bin/com/stevesoft/pat/Transformer.js,bin/com/stevesoft/pat/TransPat.js,bin/com/stevesoft/pat/SubMark.js,bin/com/stevesoft/pat/StringRule.js,bin/com/stevesoft/pat/StringLike.js,bin/com/stevesoft/pat/StringBufferLike.js,bin/com/stevesoft/pat/StrPos.js,bin/com/stevesoft/pat/Start.js,bin/com/stevesoft/pat/SpecialRule.js,bin/com/stevesoft/pat/Skipped.js,bin/com/stevesoft/pat/SkipBMH.js,bin/com/stevesoft/pat/Skip2.js,bin/com/stevesoft/pat/Skip.js,bin/com/stevesoft/pat/RuleHolder.js,bin/com/stevesoft/pat/Rthings.js,bin/com/stevesoft/pat/RightRule.js,bin/com/stevesoft/pat/Replacer.js,bin/com/stevesoft/pat/ReplaceRule.js,bin/com/stevesoft/pat/RegexWriter.js,bin/com/stevesoft/pat/RegexTokenizer.js,bin/com/stevesoft/pat/RegexReader.js,bin/com/stevesoft/pat/Regex.js,bin/com/stevesoft/pat/RegSyntaxError.js,bin/com/stevesoft/pat/RegSyntax.js,bin/com/stevesoft/pat/RegRes.js,bin/com/stevesoft/pat/RegOpt.js,bin/com/stevesoft/pat/Range.js,bin/com/stevesoft/pat/RBuffer.js,bin/com/stevesoft/pat/PushRule.js,bin/com/stevesoft/pat/Pthings.js,bin/com/stevesoft/pat/Prop.js,bin/com/stevesoft/pat/PopRule.js,bin/com/stevesoft/pat/PatternSub.js,bin/com/stevesoft/pat/Pattern.js,bin/com/stevesoft/pat/PartialBuffer.js,bin/com/stevesoft/pat/OrMark.js,bin/com/stevesoft/pat/Or.js,bin/com/stevesoft/pat/NullRule.js,bin/com/stevesoft/pat/NullPattern.js,bin/com/stevesoft/pat/NotImplementedError.js,bin/com/stevesoft/pat/NonDirFileRegex.js,bin/com/stevesoft/pat/NoPattern.js,bin/com/stevesoft/pat/Multi_stage2.js,bin/com/stevesoft/pat/MultiMin.js,bin/com/stevesoft/pat/Multi.js,bin/com/stevesoft/pat/LeftRule.js,bin/com/stevesoft/pat/Group.js,bin/com/stevesoft/pat/FileRegex.js,bin/com/stevesoft/pat/FastMulti.js,bin/com/stevesoft/pat/FastBracket.js,bin/com/stevesoft/pat/End.js,bin/com/stevesoft/pat/DotMulti.js,bin/com/stevesoft/pat/DirFileRegex.js,bin/com/stevesoft/pat/CustomEndpoint.js,bin/com/stevesoft/pat/Custom.js,bin/com/stevesoft/pat/Ctrl.js,bin/com/stevesoft/pat/CodeRule.js,bin/com/stevesoft/pat/ChangeRule.js,bin/com/stevesoft/pat/CaseMgr.js,bin/com/stevesoft/pat/Bracket.js,bin/com/stevesoft/pat/Boundary.js,bin/com/stevesoft/pat/Bits.js,bin/com/stevesoft/pat/BasicStringBufferLike.js,bin/com/stevesoft/pat/Backup.js,bin/com/stevesoft/pat/BackRefRule.js,bin/com/stevesoft/pat/BackMatch.js,bin/com/stevesoft/pat/BackG.js,bin/com/stevesoft/pat/Any.js,bin/com/stevesoft/pat/AmpersandRule.js,bin/awt2swing/TextField.js,bin/awt2swing/TextArea.js,bin/awt2swing/Scrollbar.js,bin/awt2swing/ScrollPane.js,bin/awt2swing/PopupMenu.js,bin/awt2swing/Panel.js,bin/awt2swing/MenuItem.js,bin/awt2swing/MenuBar.js,bin/awt2swing/Menu.js,bin/awt2swing/Label.js,bin/awt2swing/Frame.js,bin/awt2swing/CheckboxMenuItem.js,bin/awt2swing/Checkbox.js,bin/MCview/Residue.js,bin/MCview/PDBfile.js,bin/MCview/PDBChain.js,bin/MCview/Bond.js,bin/MCview/Atom.js,bin/awt2swing/Button.js,bin/awt2swing/Canvas.js,bin/awt2swing/Choice.js,bin/jalview/appletgui/Cache.js,bin/com/stevesoft/pat/Util.js,bin/jalview/jsdev/Regex.js,bin/jalview/jsdev/RegexJS.js,bin/com/stevesoft/pat/MessageManager.js,bin/jalview/jsdev/api/RegexInterface.js,bin/jalview/jsdev/api/RegExpInterface.js,bin/jalview/jsdev/RegExp.js,bin/jalview/jsdev/JavaScriptRegExp.js,bin/jalview/jsdev/JSRegex.js,bin/swingjs/JSEvent.js,bin/swingjs/JSThread.js,bin/swingjs/api/JSFunction.js,bin/swingjs/JSImage.js,bin/swingjs/api/DOMNode.js -j2s.compiler.abbreviation.prefix=$_ -j2s.output.path=bin -j2s.abandoned.resources.list= -j2s.compiler.status=enable +#Java2Script Configuration +#Thu Jul 23 16:06:48 BST 2015 +j2s.compiler.abbreviation=false +j2s.resources.list=bin/JStest.js,bin/com/sun/awt/AWTUtilities.js,bin/com/sun/awt/SecurityWarning.js,bin/com/sun/beans/ObjectHandler.js,bin/com/sun/beans/TypeResolver.js,bin/com/sun/beans/WeakCache.js,bin/com/sun/beans/WildcardTypeImpl.js,bin/com/sun/beans/editors/BooleanEditor.js,bin/com/sun/beans/editors/ByteEditor.js,bin/com/sun/beans/editors/ColorEditor.js,bin/com/sun/beans/editors/DoubleEditor.js,bin/com/sun/beans/editors/EnumEditor.js,bin/com/sun/beans/editors/FloatEditor.js,bin/com/sun/beans/editors/FontEditor.js,bin/com/sun/beans/editors/IntegerEditor.js,bin/com/sun/beans/editors/LongEditor.js,bin/com/sun/beans/editors/NumberEditor.js,bin/com/sun/beans/editors/ShortEditor.js,bin/com/sun/beans/editors/StringEditor.js,bin/com/sun/beans/finder/ClassFinder.js,bin/com/sun/beans/finder/PrimitiveTypeMap.js,bin/com/sun/beans/infos/ComponentBeanInfo.js,bin/com/sun/crypto/provider/AESCipher.js,bin/com/sun/crypto/provider/AESConstants.js,bin/com/sun/crypto/provider/AESCrypt.js,bin/com/sun/crypto/provider/AESKeyGenerator.js,bin/com/sun/crypto/provider/AESParameters.js,bin/com/sun/crypto/provider/AESWrapCipher.js,bin/com/sun/crypto/provider/ARCFOURCipher.js,bin/com/sun/crypto/provider/BlockCipherParamsCore.js,bin/com/sun/crypto/provider/BlowfishCipher.js,bin/com/sun/crypto/provider/BlowfishConstants.js,bin/com/sun/crypto/provider/BlowfishCrypt.js,bin/com/sun/crypto/provider/BlowfishKeyGenerator.js,bin/com/sun/crypto/provider/BlowfishParameters.js,bin/com/sun/crypto/provider/CipherBlockChaining.js,bin/com/sun/crypto/provider/CipherCore.js,bin/com/sun/crypto/provider/CipherFeedback.js,bin/com/sun/crypto/provider/CipherTextStealing.js,bin/com/sun/crypto/provider/CipherWithWrappingSpi.js,bin/com/sun/crypto/provider/ConstructKeys.js,bin/com/sun/crypto/provider/CounterMode.js,bin/com/sun/crypto/provider/DESCipher.js,bin/com/sun/crypto/provider/DESConstants.js,bin/com/sun/crypto/provider/DESCrypt.js,bin/com/sun/crypto/provider/DESKey.js,bin/com/sun/crypto/provider/DESKeyFactory.js,bin/com/sun/crypto/provider/DESKeyGenerator.js,bin/com/sun/crypto/provider/DESParameters.js,bin/com/sun/crypto/provider/DESedeCipher.js,bin/com/sun/crypto/provider/DESedeCrypt.js,bin/com/sun/crypto/provider/DESedeKey.js,bin/com/sun/crypto/provider/DESedeKeyFactory.js,bin/com/sun/crypto/provider/DESedeKeyGenerator.js,bin/com/sun/crypto/provider/DESedeParameters.js,bin/com/sun/crypto/provider/DESedeWrapCipher.js,bin/com/sun/crypto/provider/DHKeyAgreement.js,bin/com/sun/crypto/provider/DHKeyFactory.js,bin/com/sun/crypto/provider/DHKeyPairGenerator.js,bin/com/sun/crypto/provider/DHParameterGenerator.js,bin/com/sun/crypto/provider/DHParameters.js,bin/com/sun/crypto/provider/DHPrivateKey.js,bin/com/sun/crypto/provider/DHPublicKey.js,bin/com/sun/crypto/provider/ElectronicCodeBook.js,bin/com/sun/crypto/provider/EncryptedPrivateKeyInfo.js,bin/com/sun/crypto/provider/FeedbackCipher.js,bin/com/sun/crypto/provider/HmacCore.js,bin/com/sun/crypto/provider/HmacMD5.js,bin/com/sun/crypto/provider/HmacMD5KeyGenerator.js,bin/com/sun/crypto/provider/HmacPKCS12PBESHA1.js,bin/com/sun/crypto/provider/HmacSHA1.js,bin/com/sun/crypto/provider/HmacSHA1KeyGenerator.js,bin/com/sun/crypto/provider/ISO10126Padding.js,bin/com/sun/crypto/provider/JceKeyStore.js,bin/com/sun/crypto/provider/KeyGeneratorCore.js,bin/com/sun/crypto/provider/KeyProtector.js,bin/com/sun/crypto/provider/OAEPParameters.js,bin/com/sun/crypto/provider/OutputFeedback.js,bin/com/sun/crypto/provider/PBECipherCore.js,bin/com/sun/crypto/provider/PBEKey.js,bin/com/sun/crypto/provider/PBEKeyFactory.js,bin/com/sun/crypto/provider/PBEParameters.js,bin/com/sun/crypto/provider/PBEWithMD5AndDESCipher.js,bin/com/sun/crypto/provider/PBEWithMD5AndTripleDESCipher.js,bin/com/sun/crypto/provider/PBKDF2HmacSHA1Factory.js,bin/com/sun/crypto/provider/PBKDF2KeyImpl.js,bin/com/sun/crypto/provider/PCBC.js,bin/com/sun/crypto/provider/PKCS12PBECipherCore.js,bin/com/sun/crypto/provider/PKCS5Padding.js,bin/com/sun/crypto/provider/Padding.js,bin/com/sun/crypto/provider/PrivateKeyInfo.js,bin/com/sun/crypto/provider/RC2Cipher.js,bin/com/sun/crypto/provider/RC2Crypt.js,bin/com/sun/crypto/provider/RC2Parameters.js,bin/com/sun/crypto/provider/RSACipher.js,bin/com/sun/crypto/provider/SslMacCore.js,bin/com/sun/crypto/provider/SunJCE.js,bin/com/sun/crypto/provider/SymmetricCipher.js,bin/com/sun/crypto/provider/TlsKeyMaterialGenerator.js,bin/com/sun/crypto/provider/TlsMasterSecretGenerator.js,bin/com/sun/crypto/provider/TlsPrfGenerator.js,bin/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.js,bin/com/sun/crypto/provider/ai.js,bin/com/sun/demo/jvmti/hprof/Tracker.js,bin/com/sun/imageio/plugins/bmp/BMPConstants.js,bin/com/sun/imageio/plugins/bmp/BMPImageReader.js,bin/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.js,bin/com/sun/imageio/plugins/bmp/BMPImageWriter.js,bin/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.js,bin/com/sun/imageio/plugins/bmp/BMPMetadata.js,bin/com/sun/imageio/plugins/bmp/BMPMetadataFormat.js,bin/com/sun/imageio/plugins/bmp/BMPMetadataFormatResources.js,bin/com/sun/imageio/plugins/common/BitFile.js,bin/com/sun/imageio/plugins/common/BogusColorSpace.js,bin/com/sun/imageio/plugins/common/I18N.js,bin/com/sun/imageio/plugins/common/I18NImpl.js,bin/com/sun/imageio/plugins/common/ImageUtil.js,bin/com/sun/imageio/plugins/common/InputStreamAdapter.js,bin/com/sun/imageio/plugins/common/LZWCompressor.js,bin/com/sun/imageio/plugins/common/LZWStringTable.js,bin/com/sun/imageio/plugins/common/PaletteBuilder.js,bin/com/sun/imageio/plugins/common/ReaderUtil.js,bin/com/sun/imageio/plugins/common/StandardMetadataFormat.js,bin/com/sun/imageio/plugins/common/StandardMetadataFormatResources.js,bin/com/sun/imageio/plugins/common/SubImageInputStream.js,bin/com/sun/imageio/plugins/gif/GIFImageMetadata.js,bin/com/sun/imageio/plugins/gif/GIFImageMetadataFormat.js,bin/com/sun/imageio/plugins/gif/GIFImageMetadataFormatResources.js,bin/com/sun/imageio/plugins/gif/GIFImageReader.js,bin/com/sun/imageio/plugins/gif/GIFImageReaderSpi.js,bin/com/sun/imageio/plugins/gif/GIFImageWriter.js,bin/com/sun/imageio/plugins/gif/GIFImageWriterSpi.js,bin/com/sun/imageio/plugins/gif/GIFMetadata.js,bin/com/sun/imageio/plugins/gif/GIFStreamMetadata.js,bin/com/sun/imageio/plugins/gif/GIFStreamMetadataFormat.js,bin/com/sun/imageio/plugins/gif/GIFStreamMetadataFormatResources.js,bin/com/sun/imageio/plugins/gif/GIFWritableImageMetadata.js,bin/com/sun/imageio/plugins/gif/GIFWritableStreamMetadata.js,bin/com/sun/imageio/plugins/jpeg/AdobeMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/COMMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/DHTMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/DQTMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/DRIMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/JPEG.js,bin/com/sun/imageio/plugins/jpeg/JPEGBuffer.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormat.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageMetadataFormatResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageReader.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageReaderResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageWriter.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageWriterResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.js,bin/com/sun/imageio/plugins/jpeg/JPEGMetadata.js,bin/com/sun/imageio/plugins/jpeg/JPEGMetadataFormat.js,bin/com/sun/imageio/plugins/jpeg/JPEGMetadataFormatResources.js,bin/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormat.js,bin/com/sun/imageio/plugins/jpeg/JPEGStreamMetadataFormatResources.js,bin/com/sun/imageio/plugins/jpeg/MarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/SOFMarkerSegment.js,bin/com/sun/imageio/plugins/jpeg/SOSMarkerSegment.js,bin/com/sun/imageio/plugins/png/PNGImageReader.js,bin/com/sun/imageio/plugins/png/PNGImageReaderSpi.js,bin/com/sun/imageio/plugins/png/PNGImageWriter.js,bin/com/sun/imageio/plugins/png/PNGImageWriterSpi.js,bin/com/sun/imageio/plugins/png/PNGMetadata.js,bin/com/sun/imageio/plugins/png/PNGMetadataFormat.js,bin/com/sun/imageio/plugins/png/PNGMetadataFormatResources.js,bin/com/sun/imageio/plugins/png/RowFilter.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageReader.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageWriter.js,bin/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.js,bin/com/sun/imageio/plugins/wbmp/WBMPMetadata.js,bin/com/sun/imageio/plugins/wbmp/WBMPMetadataFormat.js,bin/com/sun/imageio/spi/FileImageInputStreamSpi.js,bin/com/sun/imageio/spi/FileImageOutputStreamSpi.js,bin/com/sun/imageio/spi/InputStreamImageInputStreamSpi.js,bin/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.js,bin/com/sun/imageio/spi/RAFImageInputStreamSpi.js,bin/com/sun/imageio/spi/RAFImageOutputStreamSpi.js,bin/com/sun/imageio/stream/CloseableDisposerRecord.js,bin/com/sun/imageio/stream/StreamCloser.js,bin/com/sun/imageio/stream/StreamFinalizer.js,bin/com/sun/inputmethods/internal/indicim/DevanagariInputMethodDescriptor.js,bin/com/sun/inputmethods/internal/indicim/DevanagariTables.js,bin/com/sun/inputmethods/internal/indicim/IndicInputMethod.js,bin/com/sun/inputmethods/internal/indicim/IndicInputMethodImpl.js,bin/com/sun/inputmethods/internal/thaiim/ThaiInputMethod.js,bin/com/sun/inputmethods/internal/thaiim/ThaiInputMethodDescriptor.js,bin/com/sun/inputmethods/internal/thaiim/ThaiInputMethodImpl.js,bin/com/sun/inputmethods/internal/thaiim/ThaiRules.js,bin/com/sun/jarsigner/ContentSigner.js,bin/com/sun/jarsigner/ContentSignerParameters.js,bin/com/sun/java/browser/dom/DOMAccessException.js,bin/com/sun/java/browser/dom/DOMAccessor.js,bin/com/sun/java/browser/dom/DOMAction.js,bin/com/sun/java/browser/dom/DOMService.js,bin/com/sun/java/browser/dom/DOMServiceProvider.js,bin/com/sun/java/browser/dom/DOMUnsupportedException.js,bin/com/sun/java/browser/net/ProxyInfo.js,bin/com/sun/java/browser/net/ProxyService.js,bin/com/sun/java/browser/net/ProxyServiceProvider.js,bin/com/sun/java/swing/Painter.js,bin/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.js,bin/com/sun/java/swing/plaf/gtk/GTKColorType.js,bin/com/sun/java/swing/plaf/gtk/GTKConstants.js,bin/com/sun/java/swing/plaf/gtk/GTKEngine.js,bin/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.js,bin/com/sun/java/swing/plaf/gtk/GTKGraphicsUtils.js,bin/com/sun/java/swing/plaf/gtk/GTKIconFactory.js,bin/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.js,bin/com/sun/java/swing/plaf/gtk/GTKPainter.js,bin/com/sun/java/swing/plaf/gtk/GTKRegion.js,bin/com/sun/java/swing/plaf/gtk/GTKStyle.js,bin/com/sun/java/swing/plaf/gtk/GTKStyleFactory.js,bin/com/sun/java/swing/plaf/gtk/Metacity.js,bin/com/sun/java/swing/plaf/gtk/PangoFonts.js,bin/com/sun/java/swing/plaf/gtk/XColors.js,bin/com/sun/java/swing/plaf/motif/MotifBorders.js,bin/com/sun/java/swing/plaf/motif/MotifButtonListener.js,bin/com/sun/java/swing/plaf/motif/MotifButtonUI.js,bin/com/sun/java/swing/plaf/motif/MotifCheckBoxMenuItemUI.js,bin/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.js,bin/com/sun/java/swing/plaf/motif/MotifComboBoxUI.js,bin/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.js,bin/com/sun/java/swing/plaf/motif/MotifDesktopPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifEditorPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifFileChooserUI.js,bin/com/sun/java/swing/plaf/motif/MotifGraphicsUtils.js,bin/com/sun/java/swing/plaf/motif/MotifIconFactory.js,bin/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.js,bin/com/sun/java/swing/plaf/motif/MotifInternalFrameUI.js,bin/com/sun/java/swing/plaf/motif/MotifLabelUI.js,bin/com/sun/java/swing/plaf/motif/MotifLookAndFeel.js,bin/com/sun/java/swing/plaf/motif/MotifMenuBarUI.js,bin/com/sun/java/swing/plaf/motif/MotifMenuItemUI.js,bin/com/sun/java/swing/plaf/motif/MotifMenuMouseListener.js,bin/com/sun/java/swing/plaf/motif/MotifMenuMouseMotionListener.js,bin/com/sun/java/swing/plaf/motif/MotifMenuUI.js,bin/com/sun/java/swing/plaf/motif/MotifOptionPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifPasswordFieldUI.js,bin/com/sun/java/swing/plaf/motif/MotifPopupMenuSeparatorUI.js,bin/com/sun/java/swing/plaf/motif/MotifPopupMenuUI.js,bin/com/sun/java/swing/plaf/motif/MotifProgressBarUI.js,bin/com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI.js,bin/com/sun/java/swing/plaf/motif/MotifRadioButtonUI.js,bin/com/sun/java/swing/plaf/motif/MotifScrollBarButton.js,bin/com/sun/java/swing/plaf/motif/MotifScrollBarUI.js,bin/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifSeparatorUI.js,bin/com/sun/java/swing/plaf/motif/MotifSliderUI.js,bin/com/sun/java/swing/plaf/motif/MotifSplitPaneDivider.js,bin/com/sun/java/swing/plaf/motif/MotifSplitPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifTabbedPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextAreaUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextFieldUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextPaneUI.js,bin/com/sun/java/swing/plaf/motif/MotifTextUI.js,bin/com/sun/java/swing/plaf/motif/MotifToggleButtonUI.js,bin/com/sun/java/swing/plaf/motif/MotifTreeCellRenderer.js,bin/com/sun/java/swing/plaf/motif/MotifTreeUI.js,bin/com/sun/java/swing/plaf/nimbus/AbstractRegionPainter.js,bin/com/sun/java/swing/plaf/nimbus/DerivedColor.js,bin/com/sun/java/swing/plaf/nimbus/DropShadowEffect.js,bin/com/sun/java/swing/plaf/nimbus/Effect.js,bin/com/sun/java/swing/plaf/nimbus/EffectUtils.js,bin/com/sun/java/swing/plaf/nimbus/ImageCache.js,bin/com/sun/java/swing/plaf/nimbus/ImageScalingHelper.js,bin/com/sun/java/swing/plaf/nimbus/InnerGlowEffect.js,bin/com/sun/java/swing/plaf/nimbus/InnerShadowEffect.js,bin/com/sun/java/swing/plaf/nimbus/LoweredBorder.js,bin/com/sun/java/swing/plaf/nimbus/NimbusIcon.js,bin/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.js,bin/com/sun/java/swing/plaf/nimbus/NimbusStyle.js,bin/com/sun/java/swing/plaf/nimbus/OuterGlowEffect.js,bin/com/sun/java/swing/plaf/nimbus/ShadowEffect.js,bin/com/sun/java/swing/plaf/nimbus/State.js,bin/com/sun/java/swing/plaf/nimbus/SynthPainterImpl.js,bin/com/sun/java/swing/plaf/nimbus/TableScrollPaneCorner.js,bin/com/sun/java/swing/plaf/nimbus/ToolBarSeparatorPainter.js,bin/com/sun/java/swing/plaf/windows/AnimationController.js,bin/com/sun/java/swing/plaf/windows/DesktopProperty.js,bin/com/sun/java/swing/plaf/windows/TMSchema.js,bin/com/sun/java/swing/plaf/windows/WindowsBorders.js,bin/com/sun/java/swing/plaf/windows/WindowsButtonListener.js,bin/com/sun/java/swing/plaf/windows/WindowsButtonUI.js,bin/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.js,bin/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.js,bin/com/sun/java/swing/plaf/windows/WindowsClassicLookAndFeel.js,bin/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.js,bin/com/sun/java/swing/plaf/windows/WindowsDesktopIconUI.js,bin/com/sun/java/swing/plaf/windows/WindowsDesktopManager.js,bin/com/sun/java/swing/plaf/windows/WindowsDesktopPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsEditorPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.js,bin/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.js,bin/com/sun/java/swing/plaf/windows/WindowsIconFactory.js,bin/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.js,bin/com/sun/java/swing/plaf/windows/WindowsInternalFrameUI.js,bin/com/sun/java/swing/plaf/windows/WindowsLabelUI.js,bin/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuItemUIAccessor.js,bin/com/sun/java/swing/plaf/windows/WindowsMenuUI.js,bin/com/sun/java/swing/plaf/windows/WindowsOptionPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPasswordFieldUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPopupMenuSeparatorUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPopupMenuUI.js,bin/com/sun/java/swing/plaf/windows/WindowsPopupWindow.js,bin/com/sun/java/swing/plaf/windows/WindowsProgressBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.js,bin/com/sun/java/swing/plaf/windows/WindowsRadioButtonUI.js,bin/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsScrollBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsScrollPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSeparatorUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSliderUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSpinnerUI.js,bin/com/sun/java/swing/plaf/windows/WindowsSplitPaneDivider.js,bin/com/sun/java/swing/plaf/windows/WindowsSplitPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextAreaUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextFieldUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextPaneUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTextUI.js,bin/com/sun/java/swing/plaf/windows/WindowsToggleButtonUI.js,bin/com/sun/java/swing/plaf/windows/WindowsToolBarSeparatorUI.js,bin/com/sun/java/swing/plaf/windows/WindowsToolBarUI.js,bin/com/sun/java/swing/plaf/windows/WindowsTreeUI.js,bin/com/sun/java/swing/plaf/windows/XPStyle.js,bin/com/sun/java/util/jar/pack/AdaptiveCoding.js,bin/com/sun/java/util/jar/pack/Attribute.js,bin/com/sun/java/util/jar/pack/BandStructure.js,bin/com/sun/java/util/jar/pack/ClassReader.js,bin/com/sun/java/util/jar/pack/ClassWriter.js,bin/com/sun/java/util/jar/pack/Code.js,bin/com/sun/java/util/jar/pack/Coding.js,bin/com/sun/java/util/jar/pack/CodingChooser.js,bin/com/sun/java/util/jar/pack/CodingMethod.js,bin/com/sun/java/util/jar/pack/ConstantPool.js,bin/com/sun/java/util/jar/pack/Constants.js,bin/com/sun/java/util/jar/pack/Driver.js,bin/com/sun/java/util/jar/pack/DriverResource.js,bin/com/sun/java/util/jar/pack/Fixups.js,bin/com/sun/java/util/jar/pack/Histogram.js,bin/com/sun/java/util/jar/pack/Instruction.js,bin/com/sun/java/util/jar/pack/NativeUnpack.js,bin/com/sun/java/util/jar/pack/Package.js,bin/com/sun/java/util/jar/pack/PackageReader.js,bin/com/sun/java/util/jar/pack/PackageWriter.js,bin/com/sun/java/util/jar/pack/PackerImpl.js,bin/com/sun/java/util/jar/pack/PopulationCoding.js,bin/com/sun/java/util/jar/pack/PropMap.js,bin/com/sun/java/util/jar/pack/UnpackerImpl.js,bin/com/sun/java/util/jar/pack/Utils.js,bin/com/sun/jdi/AbsentInformationException.js,bin/com/sun/jdi/Accessible.js,bin/com/sun/jdi/ArrayReference.js,bin/com/sun/jdi/ArrayType.js,bin/com/sun/jdi/BooleanType.js,bin/com/sun/jdi/BooleanValue.js,bin/com/sun/jdi/Bootstrap.js,bin/com/sun/jdi/ByteType.js,bin/com/sun/jdi/ByteValue.js,bin/com/sun/jdi/CharType.js,bin/com/sun/jdi/CharValue.js,bin/com/sun/jdi/ClassLoaderReference.js,bin/com/sun/jdi/ClassNotLoadedException.js,bin/com/sun/jdi/ClassNotPreparedException.js,bin/com/sun/jdi/ClassObjectReference.js,bin/com/sun/jdi/ClassType.js,bin/com/sun/jdi/DoubleType.js,bin/com/sun/jdi/DoubleValue.js,bin/com/sun/jdi/Field.js,bin/com/sun/jdi/FloatType.js,bin/com/sun/jdi/FloatValue.js,bin/com/sun/jdi/IncompatibleThreadStateException.js,bin/com/sun/jdi/InconsistentDebugInfoException.js,bin/com/sun/jdi/IntegerType.js,bin/com/sun/jdi/IntegerValue.js,bin/com/sun/jdi/InterfaceType.js,bin/com/sun/jdi/InternalException.js,bin/com/sun/jdi/InvalidCodeIndexException.js,bin/com/sun/jdi/InvalidLineNumberException.js,bin/com/sun/jdi/InvalidStackFrameException.js,bin/com/sun/jdi/InvalidTypeException.js,bin/com/sun/jdi/InvocationException.js,bin/com/sun/jdi/JDIPermission.js,bin/com/sun/jdi/LocalVariable.js,bin/com/sun/jdi/Locatable.js,bin/com/sun/jdi/Location.js,bin/com/sun/jdi/LongType.js,bin/com/sun/jdi/LongValue.js,bin/com/sun/jdi/Method.js,bin/com/sun/jdi/Mirror.js,bin/com/sun/jdi/MonitorInfo.js,bin/com/sun/jdi/NativeMethodException.js,bin/com/sun/jdi/ObjectCollectedException.js,bin/com/sun/jdi/ObjectReference.js,bin/com/sun/jdi/PathSearchingVirtualMachine.js,bin/com/sun/jdi/PrimitiveType.js,bin/com/sun/jdi/PrimitiveValue.js,bin/com/sun/jdi/ReferenceType.js,bin/com/sun/jdi/ShortType.js,bin/com/sun/jdi/ShortValue.js,bin/com/sun/jdi/StackFrame.js,bin/com/sun/jdi/StringReference.js,bin/com/sun/jdi/ThreadGroupReference.js,bin/com/sun/jdi/ThreadReference.js,bin/com/sun/jdi/Type.js,bin/com/sun/jdi/TypeComponent.js,bin/com/sun/jdi/VMCannotBeModifiedException.js,bin/com/sun/jdi/VMDisconnectedException.js,bin/com/sun/jdi/VMMismatchException.js,bin/com/sun/jdi/VMOutOfMemoryException.js,bin/com/sun/jdi/Value.js,bin/com/sun/jdi/VirtualMachine.js,bin/com/sun/jdi/VirtualMachineManager.js,bin/com/sun/jdi/VoidType.js,bin/com/sun/jdi/VoidValue.js,bin/com/sun/jdi/connect/AttachingConnector.js,bin/com/sun/jdi/connect/Connector.js,bin/com/sun/jdi/connect/IllegalConnectorArgumentsException.js,bin/com/sun/jdi/connect/LaunchingConnector.js,bin/com/sun/jdi/connect/ListeningConnector.js,bin/com/sun/jdi/connect/Transport.js,bin/com/sun/jdi/connect/TransportTimeoutException.js,bin/com/sun/jdi/connect/VMStartException.js,bin/com/sun/jdi/connect/spi/ClosedConnectionException.js,bin/com/sun/jdi/connect/spi/Connection.js,bin/com/sun/jdi/connect/spi/TransportService.js,bin/com/sun/jdi/event/AccessWatchpointEvent.js,bin/com/sun/jdi/event/BreakpointEvent.js,bin/com/sun/jdi/event/ClassPrepareEvent.js,bin/com/sun/jdi/event/ClassUnloadEvent.js,bin/com/sun/jdi/event/Event.js,bin/com/sun/jdi/event/EventIterator.js,bin/com/sun/jdi/event/EventQueue.js,bin/com/sun/jdi/event/EventSet.js,bin/com/sun/jdi/event/ExceptionEvent.js,bin/com/sun/jdi/event/LocatableEvent.js,bin/com/sun/jdi/event/MethodEntryEvent.js,bin/com/sun/jdi/event/MethodExitEvent.js,bin/com/sun/jdi/event/ModificationWatchpointEvent.js,bin/com/sun/jdi/event/MonitorContendedEnterEvent.js,bin/com/sun/jdi/event/MonitorContendedEnteredEvent.js,bin/com/sun/jdi/event/MonitorWaitEvent.js,bin/com/sun/jdi/event/MonitorWaitedEvent.js,bin/com/sun/jdi/event/StepEvent.js,bin/com/sun/jdi/event/ThreadDeathEvent.js,bin/com/sun/jdi/event/ThreadStartEvent.js,bin/com/sun/jdi/event/VMDeathEvent.js,bin/com/sun/jdi/event/VMDisconnectEvent.js,bin/com/sun/jdi/event/VMStartEvent.js,bin/com/sun/jdi/event/WatchpointEvent.js,bin/com/sun/jdi/request/AccessWatchpointRequest.js,bin/com/sun/jdi/request/BreakpointRequest.js,bin/com/sun/jdi/request/ClassPrepareRequest.js,bin/com/sun/jdi/request/ClassUnloadRequest.js,bin/com/sun/jdi/request/DuplicateRequestException.js,bin/com/sun/jdi/request/EventRequest.js,bin/com/sun/jdi/request/EventRequestManager.js,bin/com/sun/jdi/request/ExceptionRequest.js,bin/com/sun/jdi/request/InvalidRequestStateException.js,bin/com/sun/jdi/request/MethodEntryRequest.js,bin/com/sun/jdi/request/MethodExitRequest.js,bin/com/sun/jdi/request/ModificationWatchpointRequest.js,bin/com/sun/jdi/request/MonitorContendedEnterRequest.js,bin/com/sun/jdi/request/MonitorContendedEnteredRequest.js,bin/com/sun/jdi/request/MonitorWaitRequest.js,bin/com/sun/jdi/request/MonitorWaitedRequest.js,bin/com/sun/jdi/request/StepRequest.js,bin/com/sun/jdi/request/ThreadDeathRequest.js,bin/com/sun/jdi/request/ThreadStartRequest.js,bin/com/sun/jdi/request/VMDeathRequest.js,bin/com/sun/jdi/request/WatchpointRequest.js,bin/com/sun/jmx/defaults/JmxProperties.js,bin/com/sun/jmx/defaults/ServiceName.js,bin/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.js,bin/com/sun/jmx/interceptor/MBeanServerInterceptor.js,bin/com/sun/jmx/mbeanserver/ClassLoaderRepositorySupport.js,bin/com/sun/jmx/mbeanserver/ConvertingMethod.js,bin/com/sun/jmx/mbeanserver/DescriptorCache.js,bin/com/sun/jmx/mbeanserver/DynamicMBean2.js,bin/com/sun/jmx/mbeanserver/GetPropertyAction.js,bin/com/sun/jmx/mbeanserver/Introspector.js,bin/com/sun/jmx/mbeanserver/JmxMBeanServer.js,bin/com/sun/jmx/mbeanserver/JmxMBeanServerBuilder.js,bin/com/sun/jmx/mbeanserver/MBeanAnalyzer.js,bin/com/sun/jmx/mbeanserver/MBeanInstantiator.js,bin/com/sun/jmx/mbeanserver/MBeanIntrospector.js,bin/com/sun/jmx/mbeanserver/MBeanServerDelegateImpl.js,bin/com/sun/jmx/mbeanserver/MBeanSupport.js,bin/com/sun/jmx/mbeanserver/MXBeanIntrospector.js,bin/com/sun/jmx/mbeanserver/MXBeanLookup.js,bin/com/sun/jmx/mbeanserver/MXBeanProxy.js,bin/com/sun/jmx/mbeanserver/MXBeanSupport.js,bin/com/sun/jmx/mbeanserver/ModifiableClassLoaderRepository.js,bin/com/sun/jmx/mbeanserver/NamedObject.js,bin/com/sun/jmx/mbeanserver/ObjectInputStreamWithLoader.js,bin/com/sun/jmx/mbeanserver/OpenConverter.js,bin/com/sun/jmx/mbeanserver/PerInterface.js,bin/com/sun/jmx/mbeanserver/Repository.js,bin/com/sun/jmx/mbeanserver/SecureClassLoaderRepository.js,bin/com/sun/jmx/mbeanserver/StandardMBeanIntrospector.js,bin/com/sun/jmx/mbeanserver/StandardMBeanSupport.js,bin/com/sun/jmx/mbeanserver/SunJmxMBeanServer.js,bin/com/sun/jmx/mbeanserver/Util.js,bin/com/sun/jmx/mbeanserver/WeakIdentityHashMap.js,bin/com/sun/jmx/remote/internal/ArrayNotificationBuffer.js,bin/com/sun/jmx/remote/internal/ArrayQueue.js,bin/com/sun/jmx/remote/internal/ClientCommunicatorAdmin.js,bin/com/sun/jmx/remote/internal/ClientListenerInfo.js,bin/com/sun/jmx/remote/internal/ClientNotifForwarder.js,bin/com/sun/jmx/remote/internal/NotificationBuffer.js,bin/com/sun/jmx/remote/internal/NotificationBufferFilter.js,bin/com/sun/jmx/remote/internal/ProxyInputStream.js,bin/com/sun/jmx/remote/internal/ProxyRef.js,bin/com/sun/jmx/remote/internal/RMIExporter.js,bin/com/sun/jmx/remote/internal/ServerCommunicatorAdmin.js,bin/com/sun/jmx/remote/internal/ServerNotifForwarder.js,bin/com/sun/jmx/remote/internal/Unmarshal.js,bin/com/sun/jmx/remote/protocol/iiop/ClientProvider.js,bin/com/sun/jmx/remote/protocol/iiop/ServerProvider.js,bin/com/sun/jmx/remote/protocol/rmi/ClientProvider.js,bin/com/sun/jmx/remote/protocol/rmi/ServerProvider.js,bin/com/sun/jmx/remote/security/FileLoginModule.js,bin/com/sun/jmx/remote/security/JMXPluggableAuthenticator.js,bin/com/sun/jmx/remote/security/JMXSubjectDomainCombiner.js,bin/com/sun/jmx/remote/security/MBeanServerAccessController.js,bin/com/sun/jmx/remote/security/MBeanServerFileAccessController.js,bin/com/sun/jmx/remote/security/NotificationAccessController.js,bin/com/sun/jmx/remote/security/SubjectDelegator.js,bin/com/sun/jmx/remote/util/ClassLoaderWithRepository.js,bin/com/sun/jmx/remote/util/ClassLogger.js,bin/com/sun/jmx/remote/util/EnvHelp.js,bin/com/sun/jmx/remote/util/OrderClassLoaders.js,bin/com/sun/jmx/snmp/BerDecoder.js,bin/com/sun/jmx/snmp/BerEncoder.js,bin/com/sun/jmx/snmp/BerException.js,bin/com/sun/jmx/snmp/EnumRowStatus.js,bin/com/sun/jmx/snmp/Enumerated.js,bin/com/sun/jmx/snmp/IPAcl/ASCII_CharStream.js,bin/com/sun/jmx/snmp/IPAcl/AclEntryImpl.js,bin/com/sun/jmx/snmp/IPAcl/AclImpl.js,bin/com/sun/jmx/snmp/IPAcl/GroupImpl.js,bin/com/sun/jmx/snmp/IPAcl/Host.js,bin/com/sun/jmx/snmp/IPAcl/JDMAccess.js,bin/com/sun/jmx/snmp/IPAcl/JDMAclBlock.js,bin/com/sun/jmx/snmp/IPAcl/JDMAclItem.js,bin/com/sun/jmx/snmp/IPAcl/JDMCommunities.js,bin/com/sun/jmx/snmp/IPAcl/JDMCommunity.js,bin/com/sun/jmx/snmp/IPAcl/JDMEnterprise.js,bin/com/sun/jmx/snmp/IPAcl/JDMHost.js,bin/com/sun/jmx/snmp/IPAcl/JDMHostInform.js,bin/com/sun/jmx/snmp/IPAcl/JDMHostName.js,bin/com/sun/jmx/snmp/IPAcl/JDMHostTrap.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformBlock.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformCommunity.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformInterestedHost.js,bin/com/sun/jmx/snmp/IPAcl/JDMInformItem.js,bin/com/sun/jmx/snmp/IPAcl/JDMIpAddress.js,bin/com/sun/jmx/snmp/IPAcl/JDMIpMask.js,bin/com/sun/jmx/snmp/IPAcl/JDMIpV6Address.js,bin/com/sun/jmx/snmp/IPAcl/JDMManagers.js,bin/com/sun/jmx/snmp/IPAcl/JDMNetMask.js,bin/com/sun/jmx/snmp/IPAcl/JDMNetMaskV6.js,bin/com/sun/jmx/snmp/IPAcl/JDMSecurityDefs.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapBlock.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapCommunity.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapInterestedHost.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapItem.js,bin/com/sun/jmx/snmp/IPAcl/JDMTrapNum.js,bin/com/sun/jmx/snmp/IPAcl/JJTParserState.js,bin/com/sun/jmx/snmp/IPAcl/NetMaskImpl.js,bin/com/sun/jmx/snmp/IPAcl/Node.js,bin/com/sun/jmx/snmp/IPAcl/OwnerImpl.js,bin/com/sun/jmx/snmp/IPAcl/ParseError.js,bin/com/sun/jmx/snmp/IPAcl/ParseException.js,bin/com/sun/jmx/snmp/IPAcl/Parser.js,bin/com/sun/jmx/snmp/IPAcl/ParserConstants.js,bin/com/sun/jmx/snmp/IPAcl/ParserTokenManager.js,bin/com/sun/jmx/snmp/IPAcl/ParserTreeConstants.js,bin/com/sun/jmx/snmp/IPAcl/PermissionImpl.js,bin/com/sun/jmx/snmp/IPAcl/PrincipalImpl.js,bin/com/sun/jmx/snmp/IPAcl/SimpleNode.js,bin/com/sun/jmx/snmp/IPAcl/SnmpAcl.js,bin/com/sun/jmx/snmp/IPAcl/Token.js,bin/com/sun/jmx/snmp/IPAcl/TokenMgrError.js,bin/com/sun/jmx/snmp/InetAddressAcl.js,bin/com/sun/jmx/snmp/ServiceName.js,bin/com/sun/jmx/snmp/SnmpAckPdu.js,bin/com/sun/jmx/snmp/SnmpBadSecurityLevelException.js,bin/com/sun/jmx/snmp/SnmpCounter.js,bin/com/sun/jmx/snmp/SnmpCounter64.js,bin/com/sun/jmx/snmp/SnmpEngine.js,bin/com/sun/jmx/snmp/SnmpEngineFactory.js,bin/com/sun/jmx/snmp/SnmpEngineId.js,bin/com/sun/jmx/snmp/SnmpEngineParameters.js,bin/com/sun/jmx/snmp/SnmpGauge.js,bin/com/sun/jmx/snmp/SnmpInt.js,bin/com/sun/jmx/snmp/SnmpIpAddress.js,bin/com/sun/jmx/snmp/SnmpMessage.js,bin/com/sun/jmx/snmp/SnmpMsg.js,bin/com/sun/jmx/snmp/SnmpNull.js,bin/com/sun/jmx/snmp/SnmpOpaque.js,bin/com/sun/jmx/snmp/SnmpParams.js,bin/com/sun/jmx/snmp/SnmpPdu.js,bin/com/sun/jmx/snmp/SnmpPduBulk.js,bin/com/sun/jmx/snmp/SnmpPduBulkType.js,bin/com/sun/jmx/snmp/SnmpPduFactory.js,bin/com/sun/jmx/snmp/SnmpPduFactoryBER.js,bin/com/sun/jmx/snmp/SnmpPduRequest.js,bin/com/sun/jmx/snmp/SnmpPduRequestType.js,bin/com/sun/jmx/snmp/SnmpPduTrap.js,bin/com/sun/jmx/snmp/SnmpScopedPduBulk.js,bin/com/sun/jmx/snmp/SnmpScopedPduPacket.js,bin/com/sun/jmx/snmp/SnmpScopedPduRequest.js,bin/com/sun/jmx/snmp/SnmpSecurityException.js,bin/com/sun/jmx/snmp/SnmpSecurityParameters.js,bin/com/sun/jmx/snmp/SnmpStatusException.js,bin/com/sun/jmx/snmp/SnmpString.js,bin/com/sun/jmx/snmp/SnmpStringFixed.js,bin/com/sun/jmx/snmp/SnmpTooBigException.js,bin/com/sun/jmx/snmp/SnmpUnknownAccContrModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownModelLcdException.js,bin/com/sun/jmx/snmp/SnmpUnknownMsgProcModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownSecModelException.js,bin/com/sun/jmx/snmp/SnmpUnknownSubSystemException.js,bin/com/sun/jmx/snmp/SnmpUnsignedInt.js,bin/com/sun/jmx/snmp/SnmpUsmKeyHandler.js,bin/com/sun/jmx/snmp/SnmpV3Message.js,bin/com/sun/jmx/snmp/SnmpValue.js,bin/com/sun/jmx/snmp/ThreadContext.js,bin/com/sun/jmx/snmp/UserAcl.js,bin/com/sun/jmx/snmp/agent/SnmpEntryOid.js,bin/com/sun/jmx/snmp/agent/SnmpErrorHandlerAgent.js,bin/com/sun/jmx/snmp/agent/SnmpGenericMetaServer.js,bin/com/sun/jmx/snmp/agent/SnmpGenericObjectServer.js,bin/com/sun/jmx/snmp/agent/SnmpIndex.js,bin/com/sun/jmx/snmp/agent/SnmpMib.js,bin/com/sun/jmx/snmp/agent/SnmpMibAgent.js,bin/com/sun/jmx/snmp/agent/SnmpMibAgentMBean.js,bin/com/sun/jmx/snmp/agent/SnmpMibEntry.js,bin/com/sun/jmx/snmp/agent/SnmpMibGroup.js,bin/com/sun/jmx/snmp/agent/SnmpMibHandler.js,bin/com/sun/jmx/snmp/agent/SnmpMibNode.js,bin/com/sun/jmx/snmp/agent/SnmpMibOid.js,bin/com/sun/jmx/snmp/agent/SnmpMibRequest.js,bin/com/sun/jmx/snmp/agent/SnmpMibRequestImpl.js,bin/com/sun/jmx/snmp/agent/SnmpMibSubRequest.js,bin/com/sun/jmx/snmp/agent/SnmpMibTable.js,bin/com/sun/jmx/snmp/agent/SnmpRequestTree.js,bin/com/sun/jmx/snmp/agent/SnmpStandardMetaServer.js,bin/com/sun/jmx/snmp/agent/SnmpStandardObjectServer.js,bin/com/sun/jmx/snmp/agent/SnmpTableCallbackHandler.js,bin/com/sun/jmx/snmp/agent/SnmpTableEntryFactory.js,bin/com/sun/jmx/snmp/agent/SnmpTableEntryNotification.js,bin/com/sun/jmx/snmp/agent/SnmpTableSupport.js,bin/com/sun/jmx/snmp/agent/SnmpUserDataFactory.js,bin/com/sun/jmx/snmp/daemon/ClientHandler.js,bin/com/sun/jmx/snmp/daemon/CommunicationException.js,bin/com/sun/jmx/snmp/daemon/CommunicatorServer.js,bin/com/sun/jmx/snmp/daemon/CommunicatorServerMBean.js,bin/com/sun/jmx/snmp/daemon/SnmpAdaptorServer.js,bin/com/sun/jmx/snmp/daemon/SnmpAdaptorServerMBean.js,bin/com/sun/jmx/snmp/daemon/SnmpInformHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpMibTree.js,bin/com/sun/jmx/snmp/daemon/SnmpRequestHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.js,bin/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.js,bin/com/sun/jmx/snmp/defaults/DefaultPaths.js,bin/com/sun/jmx/snmp/defaults/SnmpProperties.js,bin/com/sun/jmx/snmp/internal/SnmpAccessControlModel.js,bin/com/sun/jmx/snmp/internal/SnmpAccessControlSubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpDecryptedPdu.js,bin/com/sun/jmx/snmp/internal/SnmpEngineImpl.js,bin/com/sun/jmx/snmp/internal/SnmpIncomingRequest.js,bin/com/sun/jmx/snmp/internal/SnmpIncomingResponse.js,bin/com/sun/jmx/snmp/internal/SnmpLcd.js,bin/com/sun/jmx/snmp/internal/SnmpModel.js,bin/com/sun/jmx/snmp/internal/SnmpModelLcd.js,bin/com/sun/jmx/snmp/internal/SnmpMsgProcessingModel.js,bin/com/sun/jmx/snmp/internal/SnmpMsgProcessingSubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpOutgoingRequest.js,bin/com/sun/jmx/snmp/internal/SnmpSecurityCache.js,bin/com/sun/jmx/snmp/internal/SnmpSecurityModel.js,bin/com/sun/jmx/snmp/internal/SnmpSecuritySubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpSubSystem.js,bin/com/sun/jmx/snmp/internal/SnmpTools.js,bin/com/sun/jmx/snmp/mpm/SnmpMsgTranslator.js,bin/com/sun/jmx/snmp/tasks/Task.js,bin/com/sun/jmx/snmp/tasks/TaskServer.js,bin/com/sun/jmx/snmp/tasks/ThreadService.js,bin/com/sun/jndi/cosnaming/CNBindingEnumeration.js,bin/com/sun/jndi/cosnaming/CNCtx.js,bin/com/sun/jndi/cosnaming/CNCtxFactory.js,bin/com/sun/jndi/cosnaming/CNNameParser.js,bin/com/sun/jndi/cosnaming/CorbanameUrl.js,bin/com/sun/jndi/cosnaming/ExceptionMapper.js,bin/com/sun/jndi/cosnaming/IiopUrl.js,bin/com/sun/jndi/cosnaming/OrbReuseTracker.js,bin/com/sun/jndi/cosnaming/RemoteToCorba.js,bin/com/sun/jndi/dns/DnsClient.js,bin/com/sun/jndi/dns/DnsContext.js,bin/com/sun/jndi/dns/DnsContextFactory.js,bin/com/sun/jndi/dns/DnsName.js,bin/com/sun/jndi/dns/DnsNameParser.js,bin/com/sun/jndi/dns/DnsUrl.js,bin/com/sun/jndi/dns/Header.js,bin/com/sun/jndi/dns/NameNode.js,bin/com/sun/jndi/dns/Resolver.js,bin/com/sun/jndi/dns/ResourceRecord.js,bin/com/sun/jndi/dns/ResourceRecords.js,bin/com/sun/jndi/dns/ZoneNode.js,bin/com/sun/jndi/ldap/BasicControl.js,bin/com/sun/jndi/ldap/Ber.js,bin/com/sun/jndi/ldap/BerDecoder.js,bin/com/sun/jndi/ldap/BerEncoder.js,bin/com/sun/jndi/ldap/BindingWithControls.js,bin/com/sun/jndi/ldap/ClientId.js,bin/com/sun/jndi/ldap/Connection.js,bin/com/sun/jndi/ldap/DefaultResponseControlFactory.js,bin/com/sun/jndi/ldap/DigestClientId.js,bin/com/sun/jndi/ldap/EntryChangeResponseControl.js,bin/com/sun/jndi/ldap/EventQueue.js,bin/com/sun/jndi/ldap/EventSupport.js,bin/com/sun/jndi/ldap/Filter.js,bin/com/sun/jndi/ldap/LdapAttribute.js,bin/com/sun/jndi/ldap/LdapBindingEnumeration.js,bin/com/sun/jndi/ldap/LdapClient.js,bin/com/sun/jndi/ldap/LdapClientFactory.js,bin/com/sun/jndi/ldap/LdapCtx.js,bin/com/sun/jndi/ldap/LdapCtxFactory.js,bin/com/sun/jndi/ldap/LdapEntry.js,bin/com/sun/jndi/ldap/LdapName.js,bin/com/sun/jndi/ldap/LdapNameParser.js,bin/com/sun/jndi/ldap/LdapNamingEnumeration.js,bin/com/sun/jndi/ldap/LdapPoolManager.js,bin/com/sun/jndi/ldap/LdapReferralContext.js,bin/com/sun/jndi/ldap/LdapReferralException.js,bin/com/sun/jndi/ldap/LdapRequest.js,bin/com/sun/jndi/ldap/LdapResult.js,bin/com/sun/jndi/ldap/LdapSchemaCtx.js,bin/com/sun/jndi/ldap/LdapSchemaParser.js,bin/com/sun/jndi/ldap/LdapSearchEnumeration.js,bin/com/sun/jndi/ldap/LdapURL.js,bin/com/sun/jndi/ldap/ManageReferralControl.js,bin/com/sun/jndi/ldap/NameClassPairWithControls.js,bin/com/sun/jndi/ldap/NamingEventNotifier.js,bin/com/sun/jndi/ldap/NotifierArgs.js,bin/com/sun/jndi/ldap/Obj.js,bin/com/sun/jndi/ldap/PersistentSearchControl.js,bin/com/sun/jndi/ldap/ReferralEnumeration.js,bin/com/sun/jndi/ldap/SearchResultWithControls.js,bin/com/sun/jndi/ldap/ServiceLocator.js,bin/com/sun/jndi/ldap/SimpleClientId.js,bin/com/sun/jndi/ldap/UnsolicitedResponseImpl.js,bin/com/sun/jndi/ldap/VersionHelper.js,bin/com/sun/jndi/ldap/VersionHelper12.js,bin/com/sun/jndi/ldap/ext/StartTlsResponseImpl.js,bin/com/sun/jndi/ldap/pool/ConnectionDesc.js,bin/com/sun/jndi/ldap/pool/Connections.js,bin/com/sun/jndi/ldap/pool/ConnectionsRef.js,bin/com/sun/jndi/ldap/pool/ConnectionsWeakRef.js,bin/com/sun/jndi/ldap/pool/Pool.js,bin/com/sun/jndi/ldap/pool/PoolCallback.js,bin/com/sun/jndi/ldap/pool/PoolCleaner.js,bin/com/sun/jndi/ldap/pool/PooledConnection.js,bin/com/sun/jndi/ldap/pool/PooledConnectionFactory.js,bin/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.js,bin/com/sun/jndi/ldap/sasl/LdapSasl.js,bin/com/sun/jndi/ldap/sasl/SaslInputStream.js,bin/com/sun/jndi/ldap/sasl/SaslOutputStream.js,bin/com/sun/jndi/rmi/registry/ReferenceWrapper.js,bin/com/sun/jndi/rmi/registry/RegistryContext.js,bin/com/sun/jndi/rmi/registry/RegistryContextFactory.js,bin/com/sun/jndi/rmi/registry/RemoteReference.js,bin/com/sun/jndi/toolkit/corba/CorbaUtils.js,bin/com/sun/jndi/toolkit/ctx/AtomicContext.js,bin/com/sun/jndi/toolkit/ctx/AtomicDirContext.js,bin/com/sun/jndi/toolkit/ctx/ComponentContext.js,bin/com/sun/jndi/toolkit/ctx/ComponentDirContext.js,bin/com/sun/jndi/toolkit/ctx/Continuation.js,bin/com/sun/jndi/toolkit/ctx/HeadTail.js,bin/com/sun/jndi/toolkit/ctx/PartialCompositeContext.js,bin/com/sun/jndi/toolkit/ctx/PartialCompositeDirContext.js,bin/com/sun/jndi/toolkit/ctx/StringHeadTail.js,bin/com/sun/jndi/toolkit/dir/AttrFilter.js,bin/com/sun/jndi/toolkit/dir/ContainmentFilter.js,bin/com/sun/jndi/toolkit/dir/ContextEnumerator.js,bin/com/sun/jndi/toolkit/dir/DirSearch.js,bin/com/sun/jndi/toolkit/dir/HierMemDirCtx.js,bin/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.js,bin/com/sun/jndi/toolkit/dir/SearchFilter.js,bin/com/sun/jndi/toolkit/url/GenericURLContext.js,bin/com/sun/jndi/toolkit/url/GenericURLDirContext.js,bin/com/sun/jndi/toolkit/url/Uri.js,bin/com/sun/jndi/toolkit/url/UrlUtil.js,bin/com/sun/jndi/url/corbaname/corbanameURLContextFactory.js,bin/com/sun/jndi/url/dns/dnsURLContext.js,bin/com/sun/jndi/url/dns/dnsURLContextFactory.js,bin/com/sun/jndi/url/iiop/iiopURLContext.js,bin/com/sun/jndi/url/iiop/iiopURLContextFactory.js,bin/com/sun/jndi/url/iiopname/iiopnameURLContextFactory.js,bin/com/sun/jndi/url/ldap/ldapURLContext.js,bin/com/sun/jndi/url/ldap/ldapURLContextFactory.js,bin/com/sun/jndi/url/ldaps/ldapsURLContextFactory.js,bin/com/sun/jndi/url/rmi/rmiURLContext.js,bin/com/sun/jndi/url/rmi/rmiURLContextFactory.js,bin/com/sun/management/GarbageCollectorMXBean.js,bin/com/sun/management/GcInfo.js,bin/com/sun/management/HotSpotDiagnosticMXBean.js,bin/com/sun/management/OperatingSystemMXBean.js,bin/com/sun/management/UnixOperatingSystemMXBean.js,bin/com/sun/management/VMOption.js,bin/com/sun/media/sound/AbstractDataLine.js,bin/com/sun/media/sound/AbstractLine.js,bin/com/sun/media/sound/AbstractMidiDevice.js,bin/com/sun/media/sound/AbstractMidiDeviceProvider.js,bin/com/sun/media/sound/AbstractMixer.js,bin/com/sun/media/sound/AiffFileFormat.js,bin/com/sun/media/sound/AiffFileReader.js,bin/com/sun/media/sound/AiffFileWriter.js,bin/com/sun/media/sound/AlawCodec.js,bin/com/sun/media/sound/AuFileFormat.js,bin/com/sun/media/sound/AuFileReader.js,bin/com/sun/media/sound/AuFileWriter.js,bin/com/sun/media/sound/AudioFileSoundbankReader.js,bin/com/sun/media/sound/AudioFloatConverter.js,bin/com/sun/media/sound/AudioFloatFormatConverter.js,bin/com/sun/media/sound/AudioFloatInputStream.js,bin/com/sun/media/sound/AudioSynthesizer.js,bin/com/sun/media/sound/AudioSynthesizerPropertyInfo.js,bin/com/sun/media/sound/AutoClosingClip.js,bin/com/sun/media/sound/AutoConnectSequencer.js,bin/com/sun/media/sound/DLSInfo.js,bin/com/sun/media/sound/DLSInstrument.js,bin/com/sun/media/sound/DLSModulator.js,bin/com/sun/media/sound/DLSRegion.js,bin/com/sun/media/sound/DLSSample.js,bin/com/sun/media/sound/DLSSampleLoop.js,bin/com/sun/media/sound/DLSSampleOptions.js,bin/com/sun/media/sound/DLSSoundbank.js,bin/com/sun/media/sound/DLSSoundbankReader.js,bin/com/sun/media/sound/DataPusher.js,bin/com/sun/media/sound/DirectAudioDevice.js,bin/com/sun/media/sound/DirectAudioDeviceProvider.js,bin/com/sun/media/sound/EmergencySoundbank.js,bin/com/sun/media/sound/EventDispatcher.js,bin/com/sun/media/sound/FFT.js,bin/com/sun/media/sound/FastShortMessage.js,bin/com/sun/media/sound/FastSysexMessage.js,bin/com/sun/media/sound/InvalidDataException.js,bin/com/sun/media/sound/InvalidFormatException.js,bin/com/sun/media/sound/JARSoundbankReader.js,bin/com/sun/media/sound/JDK13Services.js,bin/com/sun/media/sound/JSSecurityManager.js,bin/com/sun/media/sound/JavaSoundAudioClip.js,bin/com/sun/media/sound/MidiDeviceReceiver.js,bin/com/sun/media/sound/MidiInDevice.js,bin/com/sun/media/sound/MidiInDeviceProvider.js,bin/com/sun/media/sound/MidiOutDevice.js,bin/com/sun/media/sound/MidiOutDeviceProvider.js,bin/com/sun/media/sound/MidiUtils.js,bin/com/sun/media/sound/ModelAbstractChannelMixer.js,bin/com/sun/media/sound/ModelAbstractOscillator.js,bin/com/sun/media/sound/ModelByteBuffer.js,bin/com/sun/media/sound/ModelByteBufferWavetable.js,bin/com/sun/media/sound/ModelChannelMixer.js,bin/com/sun/media/sound/ModelConnectionBlock.js,bin/com/sun/media/sound/ModelDestination.js,bin/com/sun/media/sound/ModelDirectedPlayer.js,bin/com/sun/media/sound/ModelDirector.js,bin/com/sun/media/sound/ModelIdentifier.js,bin/com/sun/media/sound/ModelInstrument.js,bin/com/sun/media/sound/ModelInstrumentComparator.js,bin/com/sun/media/sound/ModelMappedInstrument.js,bin/com/sun/media/sound/ModelOscillator.js,bin/com/sun/media/sound/ModelOscillatorStream.js,bin/com/sun/media/sound/ModelPatch.js,bin/com/sun/media/sound/ModelPerformer.js,bin/com/sun/media/sound/ModelSource.js,bin/com/sun/media/sound/ModelStandardDirector.js,bin/com/sun/media/sound/ModelStandardIndexedDirector.js,bin/com/sun/media/sound/ModelStandardTransform.js,bin/com/sun/media/sound/ModelTransform.js,bin/com/sun/media/sound/ModelWavetable.js,bin/com/sun/media/sound/PCMtoPCMCodec.js,bin/com/sun/media/sound/Platform.js,bin/com/sun/media/sound/PortMixer.js,bin/com/sun/media/sound/PortMixerProvider.js,bin/com/sun/media/sound/Printer.js,bin/com/sun/media/sound/RIFFInvalidDataException.js,bin/com/sun/media/sound/RIFFInvalidFormatException.js,bin/com/sun/media/sound/RIFFReader.js,bin/com/sun/media/sound/RIFFWriter.js,bin/com/sun/media/sound/RealTimeSequencer.js,bin/com/sun/media/sound/RealTimeSequencerProvider.js,bin/com/sun/media/sound/ReferenceCountingDevice.js,bin/com/sun/media/sound/SF2GlobalRegion.js,bin/com/sun/media/sound/SF2Instrument.js,bin/com/sun/media/sound/SF2InstrumentRegion.js,bin/com/sun/media/sound/SF2Layer.js,bin/com/sun/media/sound/SF2LayerRegion.js,bin/com/sun/media/sound/SF2Modulator.js,bin/com/sun/media/sound/SF2Region.js,bin/com/sun/media/sound/SF2Sample.js,bin/com/sun/media/sound/SF2Soundbank.js,bin/com/sun/media/sound/SF2SoundbankReader.js,bin/com/sun/media/sound/SimpleInstrument.js,bin/com/sun/media/sound/SimpleSoundbank.js,bin/com/sun/media/sound/SoftAbstractResampler.js,bin/com/sun/media/sound/SoftAudioBuffer.js,bin/com/sun/media/sound/SoftAudioProcessor.js,bin/com/sun/media/sound/SoftAudioPusher.js,bin/com/sun/media/sound/SoftChannel.js,bin/com/sun/media/sound/SoftChannelProxy.js,bin/com/sun/media/sound/SoftChorus.js,bin/com/sun/media/sound/SoftControl.js,bin/com/sun/media/sound/SoftCubicResampler.js,bin/com/sun/media/sound/SoftEnvelopeGenerator.js,bin/com/sun/media/sound/SoftFilter.js,bin/com/sun/media/sound/SoftInstrument.js,bin/com/sun/media/sound/SoftJitterCorrector.js,bin/com/sun/media/sound/SoftLanczosResampler.js,bin/com/sun/media/sound/SoftLimiter.js,bin/com/sun/media/sound/SoftLinearResampler.js,bin/com/sun/media/sound/SoftLinearResampler2.js,bin/com/sun/media/sound/SoftLowFrequencyOscillator.js,bin/com/sun/media/sound/SoftMainMixer.js,bin/com/sun/media/sound/SoftMidiAudioFileReader.js,bin/com/sun/media/sound/SoftMixingClip.js,bin/com/sun/media/sound/SoftMixingDataLine.js,bin/com/sun/media/sound/SoftMixingMainMixer.js,bin/com/sun/media/sound/SoftMixingMixer.js,bin/com/sun/media/sound/SoftMixingMixerProvider.js,bin/com/sun/media/sound/SoftMixingSourceDataLine.js,bin/com/sun/media/sound/SoftPerformer.js,bin/com/sun/media/sound/SoftPointResampler.js,bin/com/sun/media/sound/SoftProcess.js,bin/com/sun/media/sound/SoftProvider.js,bin/com/sun/media/sound/SoftReceiver.js,bin/com/sun/media/sound/SoftResampler.js,bin/com/sun/media/sound/SoftResamplerStreamer.js,bin/com/sun/media/sound/SoftReverb.js,bin/com/sun/media/sound/SoftShortMessage.js,bin/com/sun/media/sound/SoftSincResampler.js,bin/com/sun/media/sound/SoftSynthesizer.js,bin/com/sun/media/sound/SoftTuning.js,bin/com/sun/media/sound/SoftVoice.js,bin/com/sun/media/sound/StandardMidiFileReader.js,bin/com/sun/media/sound/StandardMidiFileWriter.js,bin/com/sun/media/sound/SunCodec.js,bin/com/sun/media/sound/SunFileReader.js,bin/com/sun/media/sound/SunFileWriter.js,bin/com/sun/media/sound/Toolkit.js,bin/com/sun/media/sound/UlawCodec.js,bin/com/sun/media/sound/WaveExtensibleFileReader.js,bin/com/sun/media/sound/WaveFileFormat.js,bin/com/sun/media/sound/WaveFileReader.js,bin/com/sun/media/sound/WaveFileWriter.js,bin/com/sun/media/sound/WaveFloatFileReader.js,bin/com/sun/media/sound/WaveFloatFileWriter.js,bin/com/sun/naming/internal/FactoryEnumeration.js,bin/com/sun/naming/internal/NamedWeakReference.js,bin/com/sun/naming/internal/ResourceManager.js,bin/com/sun/naming/internal/VersionHelper.js,bin/com/sun/naming/internal/VersionHelper12.js,bin/com/sun/net/httpserver/Authenticator.js,bin/com/sun/net/httpserver/BasicAuthenticator.js,bin/com/sun/net/httpserver/Filter.js,bin/com/sun/net/httpserver/Headers.js,bin/com/sun/net/httpserver/HttpContext.js,bin/com/sun/net/httpserver/HttpExchange.js,bin/com/sun/net/httpserver/HttpHandler.js,bin/com/sun/net/httpserver/HttpPrincipal.js,bin/com/sun/net/httpserver/HttpServer.js,bin/com/sun/net/httpserver/HttpsConfigurator.js,bin/com/sun/net/httpserver/HttpsExchange.js,bin/com/sun/net/httpserver/HttpsParameters.js,bin/com/sun/net/httpserver/HttpsServer.js,bin/com/sun/net/httpserver/package-info.js,bin/com/sun/net/httpserver/spi/HttpServerProvider.js,bin/com/sun/net/httpserver/spi/package-info.js,bin/com/sun/net/ssl/HostnameVerifier.js,bin/com/sun/net/ssl/HttpsURLConnection.js,bin/com/sun/net/ssl/KeyManager.js,bin/com/sun/net/ssl/KeyManagerFactory.js,bin/com/sun/net/ssl/KeyManagerFactorySpi.js,bin/com/sun/net/ssl/SSLContext.js,bin/com/sun/net/ssl/SSLContextSpi.js,bin/com/sun/net/ssl/SSLPermission.js,bin/com/sun/net/ssl/SSLSecurity.js,bin/com/sun/net/ssl/TrustManager.js,bin/com/sun/net/ssl/TrustManagerFactory.js,bin/com/sun/net/ssl/TrustManagerFactorySpi.js,bin/com/sun/net/ssl/X509KeyManager.js,bin/com/sun/net/ssl/X509TrustManager.js,bin/com/sun/net/ssl/internal/ssl/Provider.js,bin/com/sun/net/ssl/internal/ssl/X509ExtendedTrustManager.js,bin/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.js,bin/com/sun/net/ssl/internal/www/protocol/https/Handler.js,bin/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.js,bin/com/sun/org/apache/xml/internal/security/Init.js,bin/com/sun/org/apache/xml/internal/security/algorithms/Algorithm.js,bin/com/sun/org/apache/xml/internal/security/algorithms/ClassLoaderUtils.js,bin/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.js,bin/com/sun/org/apache/xml/internal/security/algorithms/MessageDigestAlgorithm.js,bin/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.js,bin/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithmSpi.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/IntegrityHmac.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureBaseRSA.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.js,bin/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureECDSA.js,bin/com/sun/org/apache/xml/internal/security/c14n/CanonicalizationException.js,bin/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.js,bin/com/sun/org/apache/xml/internal/security/c14n/CanonicalizerSpi.js,bin/com/sun/org/apache/xml/internal/security/c14n/InvalidCanonicalizerException.js,bin/com/sun/org/apache/xml/internal/security/c14n/helper/AttrCompare.js,bin/com/sun/org/apache/xml/internal/security/c14n/helper/C14nHelper.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_OmitComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11_WithComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclOmitComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315ExclWithComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315OmitComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315WithComments.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/NameSpaceSymbTable.js,bin/com/sun/org/apache/xml/internal/security/c14n/implementations/UtfHelpper.js,bin/com/sun/org/apache/xml/internal/security/encryption/AgreementMethod.js,bin/com/sun/org/apache/xml/internal/security/encryption/CipherData.js,bin/com/sun/org/apache/xml/internal/security/encryption/CipherReference.js,bin/com/sun/org/apache/xml/internal/security/encryption/CipherValue.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptedData.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptedKey.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptedType.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptionMethod.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptionProperties.js,bin/com/sun/org/apache/xml/internal/security/encryption/EncryptionProperty.js,bin/com/sun/org/apache/xml/internal/security/encryption/Reference.js,bin/com/sun/org/apache/xml/internal/security/encryption/ReferenceList.js,bin/com/sun/org/apache/xml/internal/security/encryption/Transforms.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLCipherInput.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLCipherParameters.js,bin/com/sun/org/apache/xml/internal/security/encryption/XMLEncryptionException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/AlgorithmAlreadyRegisteredException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/Base64DecodingException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityException.js,bin/com/sun/org/apache/xml/internal/security/exceptions/XMLSecurityRuntimeException.js,bin/com/sun/org/apache/xml/internal/security/keys/ContentHandlerAlreadyRegisteredException.js,bin/com/sun/org/apache/xml/internal/security/keys/KeyInfo.js,bin/com/sun/org/apache/xml/internal/security/keys/KeyUtils.js,bin/com/sun/org/apache/xml/internal/security/keys/content/KeyInfoContent.js,bin/com/sun/org/apache/xml/internal/security/keys/content/KeyName.js,bin/com/sun/org/apache/xml/internal/security/keys/content/KeyValue.js,bin/com/sun/org/apache/xml/internal/security/keys/content/MgmtData.js,bin/com/sun/org/apache/xml/internal/security/keys/content/PGPData.js,bin/com/sun/org/apache/xml/internal/security/keys/content/RetrievalMethod.js,bin/com/sun/org/apache/xml/internal/security/keys/content/SPKIData.js,bin/com/sun/org/apache/xml/internal/security/keys/content/X509Data.js,bin/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/DSAKeyValue.js,bin/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/KeyValueContent.js,bin/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/RSAKeyValue.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509CRL.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509Certificate.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509DataContent.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509IssuerSerial.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SKI.js,bin/com/sun/org/apache/xml/internal/security/keys/content/x509/XMLX509SubjectName.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/InvalidKeyResolverException.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverException.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverSpi.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/DSAKeyValueResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/EncryptedKeyResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RSAKeyValueResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/RetrievalMethodResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509CertificateResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509IssuerSerialResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SKIResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/X509SubjectNameResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverException.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/StorageResolverSpi.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/implementations/CertsInFilesystemDirectoryResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/implementations/KeyStoreResolver.js,bin/com/sun/org/apache/xml/internal/security/keys/storage/implementations/SingleCertificateResolver.js,bin/com/sun/org/apache/xml/internal/security/signature/InvalidDigestValueException.js,bin/com/sun/org/apache/xml/internal/security/signature/InvalidSignatureValueException.js,bin/com/sun/org/apache/xml/internal/security/signature/Manifest.js,bin/com/sun/org/apache/xml/internal/security/signature/MissingResourceFailureException.js,bin/com/sun/org/apache/xml/internal/security/signature/NodeFilter.js,bin/com/sun/org/apache/xml/internal/security/signature/ObjectContainer.js,bin/com/sun/org/apache/xml/internal/security/signature/Reference.js,bin/com/sun/org/apache/xml/internal/security/signature/ReferenceNotInitializedException.js,bin/com/sun/org/apache/xml/internal/security/signature/SignatureProperties.js,bin/com/sun/org/apache/xml/internal/security/signature/SignatureProperty.js,bin/com/sun/org/apache/xml/internal/security/signature/SignedInfo.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignature.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignatureException.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInput.js,bin/com/sun/org/apache/xml/internal/security/signature/XMLSignatureInputDebugger.js,bin/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderUtils.js,bin/com/sun/org/apache/xml/internal/security/transforms/InvalidTransformException.js,bin/com/sun/org/apache/xml/internal/security/transforms/Transform.js,bin/com/sun/org/apache/xml/internal/security/transforms/TransformParam.js,bin/com/sun/org/apache/xml/internal/security/transforms/TransformSpi.js,bin/com/sun/org/apache/xml/internal/security/transforms/TransformationException.js,bin/com/sun/org/apache/xml/internal/security/transforms/Transforms.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHere.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/FuncHereContext.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformBase64Decode.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14N11_WithComments.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusive.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NExclusiveWithComments.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformC14NWithComments.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformEnvelopedSignature.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPath2Filter.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXPointer.js,bin/com/sun/org/apache/xml/internal/security/transforms/implementations/TransformXSLT.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/InclusiveNamespaces.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer04.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPathContainer.js,bin/com/sun/org/apache/xml/internal/security/transforms/params/XPathFilterCHGPContainer.js,bin/com/sun/org/apache/xml/internal/security/utils/Base64.js,bin/com/sun/org/apache/xml/internal/security/utils/CachedXPathAPIHolder.js,bin/com/sun/org/apache/xml/internal/security/utils/CachedXPathFuncHereAPI.js,bin/com/sun/org/apache/xml/internal/security/utils/Constants.js,bin/com/sun/org/apache/xml/internal/security/utils/DigesterOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/ElementChecker.js,bin/com/sun/org/apache/xml/internal/security/utils/ElementCheckerImpl.js,bin/com/sun/org/apache/xml/internal/security/utils/ElementProxy.js,bin/com/sun/org/apache/xml/internal/security/utils/EncryptionConstants.js,bin/com/sun/org/apache/xml/internal/security/utils/EncryptionElementProxy.js,bin/com/sun/org/apache/xml/internal/security/utils/HelperNodeList.js,bin/com/sun/org/apache/xml/internal/security/utils/I18n.js,bin/com/sun/org/apache/xml/internal/security/utils/IdResolver.js,bin/com/sun/org/apache/xml/internal/security/utils/IgnoreAllErrorHandler.js,bin/com/sun/org/apache/xml/internal/security/utils/JavaUtils.js,bin/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.js,bin/com/sun/org/apache/xml/internal/security/utils/SignatureElementProxy.js,bin/com/sun/org/apache/xml/internal/security/utils/SignerOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/UnsyncBufferedOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.js,bin/com/sun/org/apache/xml/internal/security/utils/XMLUtils.js,bin/com/sun/org/apache/xml/internal/security/utils/XPathFuncHereAPI.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverException.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolverSpi.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverAnonymous.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverDirectHTTP.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverFragment.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverLocalFilesystem.js,bin/com/sun/org/apache/xml/internal/security/utils/resolver/implementations/ResolverXPointer.js,bin/com/sun/pept/Delegate.js,bin/com/sun/pept/encoding/Decoder.js,bin/com/sun/pept/encoding/Encoder.js,bin/com/sun/pept/ept/Acceptor.js,bin/com/sun/pept/ept/ContactInfo.js,bin/com/sun/pept/ept/ContactInfoList.js,bin/com/sun/pept/ept/ContactInfoListIterator.js,bin/com/sun/pept/ept/EPTFactory.js,bin/com/sun/pept/ept/MessageInfo.js,bin/com/sun/pept/presentation/MessageStruct.js,bin/com/sun/pept/presentation/Stub.js,bin/com/sun/pept/presentation/TargetFinder.js,bin/com/sun/pept/presentation/Tie.js,bin/com/sun/pept/protocol/Interceptors.js,bin/com/sun/pept/protocol/MessageDispatcher.js,bin/com/sun/pept/transport/Connection.js,bin/com/sun/rmi/rmid/ExecOptionPermission.js,bin/com/sun/rmi/rmid/ExecPermission.js,bin/com/sun/rowset/CachedRowSetImpl.js,bin/com/sun/rowset/FilteredRowSetImpl.js,bin/com/sun/rowset/JdbcRowSetImpl.js,bin/com/sun/rowset/JdbcRowSetResourceBundle.js,bin/com/sun/rowset/JoinRowSetImpl.js,bin/com/sun/rowset/WebRowSetImpl.js,bin/com/sun/rowset/internal/BaseRow.js,bin/com/sun/rowset/internal/CachedRowSetReader.js,bin/com/sun/rowset/internal/CachedRowSetWriter.js,bin/com/sun/rowset/internal/InsertRow.js,bin/com/sun/rowset/internal/Row.js,bin/com/sun/rowset/internal/SyncResolverImpl.js,bin/com/sun/rowset/internal/WebRowSetXmlReader.js,bin/com/sun/rowset/internal/WebRowSetXmlWriter.js,bin/com/sun/rowset/internal/XmlErrorHandler.js,bin/com/sun/rowset/internal/XmlReaderContentHandler.js,bin/com/sun/rowset/internal/XmlResolver.js,bin/com/sun/rowset/providers/RIOptimisticProvider.js,bin/com/sun/rowset/providers/RIXMLProvider.js,bin/com/sun/script/javascript/ExternalScriptable.js,bin/com/sun/script/javascript/JSAdapter.js,bin/com/sun/script/javascript/JavaAdapter.js,bin/com/sun/script/javascript/RhinoClassShutter.js,bin/com/sun/script/javascript/RhinoCompiledScript.js,bin/com/sun/script/javascript/RhinoScriptEngine.js,bin/com/sun/script/javascript/RhinoScriptEngineFactory.js,bin/com/sun/script/javascript/RhinoTopLevel.js,bin/com/sun/script/javascript/RhinoWrapFactory.js,bin/com/sun/script/util/BindingsBase.js,bin/com/sun/script/util/BindingsEntrySet.js,bin/com/sun/script/util/BindingsImpl.js,bin/com/sun/script/util/InterfaceImplementor.js,bin/com/sun/script/util/ScriptEngineFactoryBase.js,bin/com/sun/security/auth/LdapPrincipal.js,bin/com/sun/security/auth/NTDomainPrincipal.js,bin/com/sun/security/auth/NTNumericCredential.js,bin/com/sun/security/auth/NTSid.js,bin/com/sun/security/auth/NTSidDomainPrincipal.js,bin/com/sun/security/auth/NTSidGroupPrincipal.js,bin/com/sun/security/auth/NTSidPrimaryGroupPrincipal.js,bin/com/sun/security/auth/NTSidUserPrincipal.js,bin/com/sun/security/auth/NTUserPrincipal.js,bin/com/sun/security/auth/PolicyFile.js,bin/com/sun/security/auth/PolicyParser.js,bin/com/sun/security/auth/PrincipalComparator.js,bin/com/sun/security/auth/SolarisNumericGroupPrincipal.js,bin/com/sun/security/auth/SolarisNumericUserPrincipal.js,bin/com/sun/security/auth/SolarisPrincipal.js,bin/com/sun/security/auth/SubjectCodeSource.js,bin/com/sun/security/auth/UnixNumericGroupPrincipal.js,bin/com/sun/security/auth/UnixNumericUserPrincipal.js,bin/com/sun/security/auth/UnixPrincipal.js,bin/com/sun/security/auth/UserPrincipal.js,bin/com/sun/security/auth/X500Principal.js,bin/com/sun/security/auth/callback/DialogCallbackHandler.js,bin/com/sun/security/auth/callback/TextCallbackHandler.js,bin/com/sun/security/auth/login/ConfigFile.js,bin/com/sun/security/auth/module/Crypt.js,bin/com/sun/security/auth/module/JndiLoginModule.js,bin/com/sun/security/auth/module/KeyStoreLoginModule.js,bin/com/sun/security/auth/module/Krb5LoginModule.js,bin/com/sun/security/auth/module/LdapLoginModule.js,bin/com/sun/security/auth/module/NTLoginModule.js,bin/com/sun/security/auth/module/NTSystem.js,bin/com/sun/security/auth/module/SolarisLoginModule.js,bin/com/sun/security/auth/module/SolarisSystem.js,bin/com/sun/security/auth/module/UnixLoginModule.js,bin/com/sun/security/auth/module/UnixSystem.js,bin/com/sun/security/cert/internal/x509/X509V1CertImpl.js,bin/com/sun/security/jgss/GSSUtil.js,bin/com/sun/security/sasl/ClientFactoryImpl.js,bin/com/sun/security/sasl/CramMD5Base.js,bin/com/sun/security/sasl/CramMD5Client.js,bin/com/sun/security/sasl/CramMD5Server.js,bin/com/sun/security/sasl/ExternalClient.js,bin/com/sun/security/sasl/PlainClient.js,bin/com/sun/security/sasl/Provider.js,bin/com/sun/security/sasl/ServerFactoryImpl.js,bin/com/sun/security/sasl/digest/DigestMD5Base.js,bin/com/sun/security/sasl/digest/DigestMD5Client.js,bin/com/sun/security/sasl/digest/DigestMD5Server.js,bin/com/sun/security/sasl/digest/FactoryImpl.js,bin/com/sun/security/sasl/digest/SecurityCtx.js,bin/com/sun/security/sasl/gsskerb/FactoryImpl.js,bin/com/sun/security/sasl/gsskerb/GssKrb5Base.js,bin/com/sun/security/sasl/gsskerb/GssKrb5Client.js,bin/com/sun/security/sasl/gsskerb/GssKrb5Server.js,bin/com/sun/security/sasl/util/AbstractSaslImpl.js,bin/com/sun/security/sasl/util/PolicyUtils.js,bin/com/sun/tools/attach/AgentInitializationException.js,bin/com/sun/tools/attach/AgentLoadException.js,bin/com/sun/tools/attach/AttachNotSupportedException.js,bin/com/sun/tools/attach/AttachPermission.js,bin/com/sun/tools/attach/VirtualMachine.js,bin/com/sun/tools/attach/VirtualMachineDescriptor.js,bin/com/sun/tools/attach/spi/AttachProvider.js,bin/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.js,bin/com/sun/tools/example/debug/bdi/AmbiguousMethodException.js,bin/com/sun/tools/example/debug/bdi/BreakpointSpec.js,bin/com/sun/tools/example/debug/bdi/ChildSession.js,bin/com/sun/tools/example/debug/bdi/EvaluationException.js,bin/com/sun/tools/example/debug/bdi/EventRequestSpec.js,bin/com/sun/tools/example/debug/bdi/EventRequestSpecList.js,bin/com/sun/tools/example/debug/bdi/ExceptionSpec.js,bin/com/sun/tools/example/debug/bdi/ExecutionManager.js,bin/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.js,bin/com/sun/tools/example/debug/bdi/InputListener.js,bin/com/sun/tools/example/debug/bdi/JDIEventSource.js,bin/com/sun/tools/example/debug/bdi/LineBreakpointSpec.js,bin/com/sun/tools/example/debug/bdi/LineNotFoundException.js,bin/com/sun/tools/example/debug/bdi/MalformedMemberNameException.js,bin/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.js,bin/com/sun/tools/example/debug/bdi/MethodNotFoundException.js,bin/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.js,bin/com/sun/tools/example/debug/bdi/NoSessionException.js,bin/com/sun/tools/example/debug/bdi/NoThreadException.js,bin/com/sun/tools/example/debug/bdi/OutputListener.js,bin/com/sun/tools/example/debug/bdi/ParseException.js,bin/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.js,bin/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.js,bin/com/sun/tools/example/debug/bdi/Session.js,bin/com/sun/tools/example/debug/bdi/SessionListener.js,bin/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.js,bin/com/sun/tools/example/debug/bdi/SpecErrorEvent.js,bin/com/sun/tools/example/debug/bdi/SpecEvent.js,bin/com/sun/tools/example/debug/bdi/SpecListener.js,bin/com/sun/tools/example/debug/bdi/ThreadGroupIterator.js,bin/com/sun/tools/example/debug/bdi/ThreadInfo.js,bin/com/sun/tools/example/debug/bdi/ThreadIterator.js,bin/com/sun/tools/example/debug/bdi/Utils.js,bin/com/sun/tools/example/debug/bdi/VMLaunchFailureException.js,bin/com/sun/tools/example/debug/bdi/VMNotInterruptedException.js,bin/com/sun/tools/example/debug/bdi/WatchpointSpec.js,bin/com/sun/tools/example/debug/event/AbstractEventSet.js,bin/com/sun/tools/example/debug/event/AccessWatchpointEventSet.js,bin/com/sun/tools/example/debug/event/ClassPrepareEventSet.js,bin/com/sun/tools/example/debug/event/ClassUnloadEventSet.js,bin/com/sun/tools/example/debug/event/ExceptionEventSet.js,bin/com/sun/tools/example/debug/event/JDIAdapter.js,bin/com/sun/tools/example/debug/event/JDIListener.js,bin/com/sun/tools/example/debug/event/LocatableEventSet.js,bin/com/sun/tools/example/debug/event/LocationTriggerEventSet.js,bin/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.js,bin/com/sun/tools/example/debug/event/ThreadDeathEventSet.js,bin/com/sun/tools/example/debug/event/ThreadStartEventSet.js,bin/com/sun/tools/example/debug/event/VMDeathEventSet.js,bin/com/sun/tools/example/debug/event/VMDisconnectEventSet.js,bin/com/sun/tools/example/debug/event/VMStartEventSet.js,bin/com/sun/tools/example/debug/event/WatchpointEventSet.js,bin/com/sun/tools/example/debug/expr/ASCII_UCodeESC_CharStream.js,bin/com/sun/tools/example/debug/expr/ExpressionParser.js,bin/com/sun/tools/example/debug/expr/ExpressionParserConstants.js,bin/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.js,bin/com/sun/tools/example/debug/expr/LValue.js,bin/com/sun/tools/example/debug/expr/ParseException.js,bin/com/sun/tools/example/debug/expr/Token.js,bin/com/sun/tools/example/debug/expr/TokenMgrError.js,bin/com/sun/tools/example/debug/gui/ApplicationTool.js,bin/com/sun/tools/example/debug/gui/ClassManager.js,bin/com/sun/tools/example/debug/gui/ClassTreeTool.js,bin/com/sun/tools/example/debug/gui/CommandInterpreter.js,bin/com/sun/tools/example/debug/gui/CommandTool.js,bin/com/sun/tools/example/debug/gui/ContextListener.js,bin/com/sun/tools/example/debug/gui/ContextManager.js,bin/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.js,bin/com/sun/tools/example/debug/gui/Environment.js,bin/com/sun/tools/example/debug/gui/GUI.js,bin/com/sun/tools/example/debug/gui/Icons.js,bin/com/sun/tools/example/debug/gui/JDBFileFilter.js,bin/com/sun/tools/example/debug/gui/JDBMenuBar.js,bin/com/sun/tools/example/debug/gui/JDBToolBar.js,bin/com/sun/tools/example/debug/gui/LaunchTool.js,bin/com/sun/tools/example/debug/gui/MonitorListModel.js,bin/com/sun/tools/example/debug/gui/MonitorTool.js,bin/com/sun/tools/example/debug/gui/OutputSink.js,bin/com/sun/tools/example/debug/gui/SearchPath.js,bin/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.js,bin/com/sun/tools/example/debug/gui/SourceListener.js,bin/com/sun/tools/example/debug/gui/SourceManager.js,bin/com/sun/tools/example/debug/gui/SourceModel.js,bin/com/sun/tools/example/debug/gui/SourceTool.js,bin/com/sun/tools/example/debug/gui/SourceTreeTool.js,bin/com/sun/tools/example/debug/gui/SourcepathChangedEvent.js,bin/com/sun/tools/example/debug/gui/StackTraceTool.js,bin/com/sun/tools/example/debug/gui/ThreadTreeTool.js,bin/com/sun/tools/example/debug/gui/TypeScript.js,bin/com/sun/tools/example/debug/gui/TypeScriptOutputListener.js,bin/com/sun/tools/example/debug/gui/TypeScriptWriter.js,bin/com/sun/tools/example/debug/tty/AccessWatchpointSpec.js,bin/com/sun/tools/example/debug/tty/AmbiguousMethodException.js,bin/com/sun/tools/example/debug/tty/BreakpointSpec.js,bin/com/sun/tools/example/debug/tty/Commands.js,bin/com/sun/tools/example/debug/tty/Env.js,bin/com/sun/tools/example/debug/tty/EventHandler.js,bin/com/sun/tools/example/debug/tty/EventNotifier.js,bin/com/sun/tools/example/debug/tty/EventRequestSpec.js,bin/com/sun/tools/example/debug/tty/EventRequestSpecList.js,bin/com/sun/tools/example/debug/tty/ExceptionSpec.js,bin/com/sun/tools/example/debug/tty/LineNotFoundException.js,bin/com/sun/tools/example/debug/tty/MalformedMemberNameException.js,bin/com/sun/tools/example/debug/tty/MessageOutput.js,bin/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.js,bin/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.js,bin/com/sun/tools/example/debug/tty/ReferenceTypeSpec.js,bin/com/sun/tools/example/debug/tty/SourceMapper.js,bin/com/sun/tools/example/debug/tty/TTY.js,bin/com/sun/tools/example/debug/tty/TTYResources.js,bin/com/sun/tools/example/debug/tty/TTYResources_ja.js,bin/com/sun/tools/example/debug/tty/TTYResources_zh_CN.js,bin/com/sun/tools/example/debug/tty/ThreadGroupIterator.js,bin/com/sun/tools/example/debug/tty/ThreadInfo.js,bin/com/sun/tools/example/debug/tty/ThreadIterator.js,bin/com/sun/tools/example/debug/tty/VMConnection.js,bin/com/sun/tools/example/debug/tty/VMNotConnectedException.js,bin/com/sun/tools/example/debug/tty/WatchpointSpec.js,bin/com/sun/tools/example/trace/EventThread.js,bin/com/sun/tools/example/trace/StreamRedirectThread.js,bin/com/sun/tools/example/trace/Trace.js,bin/com/sun/tools/extcheck/ExtCheck.js,bin/com/sun/tools/extcheck/Main.js,bin/com/sun/tools/hat/Main.js,bin/com/sun/tools/hat/internal/model/AbstractJavaHeapObjectVisitor.js,bin/com/sun/tools/hat/internal/model/ArrayTypeCodes.js,bin/com/sun/tools/hat/internal/model/HackJavaValue.js,bin/com/sun/tools/hat/internal/model/JavaBoolean.js,bin/com/sun/tools/hat/internal/model/JavaByte.js,bin/com/sun/tools/hat/internal/model/JavaChar.js,bin/com/sun/tools/hat/internal/model/JavaClass.js,bin/com/sun/tools/hat/internal/model/JavaDouble.js,bin/com/sun/tools/hat/internal/model/JavaField.js,bin/com/sun/tools/hat/internal/model/JavaFloat.js,bin/com/sun/tools/hat/internal/model/JavaHeapObject.js,bin/com/sun/tools/hat/internal/model/JavaHeapObjectVisitor.js,bin/com/sun/tools/hat/internal/model/JavaInt.js,bin/com/sun/tools/hat/internal/model/JavaLazyReadObject.js,bin/com/sun/tools/hat/internal/model/JavaLong.js,bin/com/sun/tools/hat/internal/model/JavaObject.js,bin/com/sun/tools/hat/internal/model/JavaObjectArray.js,bin/com/sun/tools/hat/internal/model/JavaObjectRef.js,bin/com/sun/tools/hat/internal/model/JavaShort.js,bin/com/sun/tools/hat/internal/model/JavaStatic.js,bin/com/sun/tools/hat/internal/model/JavaThing.js,bin/com/sun/tools/hat/internal/model/JavaValue.js,bin/com/sun/tools/hat/internal/model/JavaValueArray.js,bin/com/sun/tools/hat/internal/model/ReachableExcludes.js,bin/com/sun/tools/hat/internal/model/ReachableExcludesImpl.js,bin/com/sun/tools/hat/internal/model/ReachableObjects.js,bin/com/sun/tools/hat/internal/model/ReferenceChain.js,bin/com/sun/tools/hat/internal/model/Root.js,bin/com/sun/tools/hat/internal/model/Snapshot.js,bin/com/sun/tools/hat/internal/model/StackFrame.js,bin/com/sun/tools/hat/internal/model/StackTrace.js,bin/com/sun/tools/hat/internal/oql/OQLEngine.js,bin/com/sun/tools/hat/internal/oql/OQLException.js,bin/com/sun/tools/hat/internal/oql/OQLQuery.js,bin/com/sun/tools/hat/internal/oql/ObjectVisitor.js,bin/com/sun/tools/hat/internal/parser/FileReadBuffer.js,bin/com/sun/tools/hat/internal/parser/HprofReader.js,bin/com/sun/tools/hat/internal/parser/MappedReadBuffer.js,bin/com/sun/tools/hat/internal/parser/PositionDataInputStream.js,bin/com/sun/tools/hat/internal/parser/PositionInputStream.js,bin/com/sun/tools/hat/internal/parser/ReadBuffer.js,bin/com/sun/tools/hat/internal/parser/Reader.js,bin/com/sun/tools/hat/internal/server/AllClassesQuery.js,bin/com/sun/tools/hat/internal/server/AllRootsQuery.js,bin/com/sun/tools/hat/internal/server/ClassQuery.js,bin/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.js,bin/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.js,bin/com/sun/tools/hat/internal/server/HistogramQuery.js,bin/com/sun/tools/hat/internal/server/HttpReader.js,bin/com/sun/tools/hat/internal/server/InstancesCountQuery.js,bin/com/sun/tools/hat/internal/server/InstancesQuery.js,bin/com/sun/tools/hat/internal/server/OQLHelp.js,bin/com/sun/tools/hat/internal/server/OQLQuery.js,bin/com/sun/tools/hat/internal/server/ObjectQuery.js,bin/com/sun/tools/hat/internal/server/PlatformClasses.js,bin/com/sun/tools/hat/internal/server/QueryHandler.js,bin/com/sun/tools/hat/internal/server/QueryListener.js,bin/com/sun/tools/hat/internal/server/ReachableQuery.js,bin/com/sun/tools/hat/internal/server/RefsByTypeQuery.js,bin/com/sun/tools/hat/internal/server/RootStackQuery.js,bin/com/sun/tools/hat/internal/server/RootsQuery.js,bin/com/sun/tools/hat/internal/util/ArraySorter.js,bin/com/sun/tools/hat/internal/util/Comparer.js,bin/com/sun/tools/hat/internal/util/CompositeEnumeration.js,bin/com/sun/tools/hat/internal/util/Misc.js,bin/com/sun/tools/hat/internal/util/VectorSorter.js,bin/com/sun/tools/jconsole/JConsoleContext.js,bin/com/sun/tools/jconsole/JConsolePlugin.js,bin/com/sun/tools/jdi/AbstractLauncher.js,bin/com/sun/tools/jdi/ArrayReferenceImpl.js,bin/com/sun/tools/jdi/ArrayTypeImpl.js,bin/com/sun/tools/jdi/BaseLineInfo.js,bin/com/sun/tools/jdi/BooleanTypeImpl.js,bin/com/sun/tools/jdi/BooleanValueImpl.js,bin/com/sun/tools/jdi/ByteTypeImpl.js,bin/com/sun/tools/jdi/ByteValueImpl.js,bin/com/sun/tools/jdi/CharTypeImpl.js,bin/com/sun/tools/jdi/CharValueImpl.js,bin/com/sun/tools/jdi/ClassLoaderReferenceImpl.js,bin/com/sun/tools/jdi/ClassObjectReferenceImpl.js,bin/com/sun/tools/jdi/ClassTypeImpl.js,bin/com/sun/tools/jdi/CommandSender.js,bin/com/sun/tools/jdi/ConcreteMethodImpl.js,bin/com/sun/tools/jdi/ConnectorImpl.js,bin/com/sun/tools/jdi/DoubleTypeImpl.js,bin/com/sun/tools/jdi/DoubleValueImpl.js,bin/com/sun/tools/jdi/EventQueueImpl.js,bin/com/sun/tools/jdi/EventRequestManagerImpl.js,bin/com/sun/tools/jdi/EventSetImpl.js,bin/com/sun/tools/jdi/FieldImpl.js,bin/com/sun/tools/jdi/FloatTypeImpl.js,bin/com/sun/tools/jdi/FloatValueImpl.js,bin/com/sun/tools/jdi/GenericAttachingConnector.js,bin/com/sun/tools/jdi/GenericListeningConnector.js,bin/com/sun/tools/jdi/IntegerTypeImpl.js,bin/com/sun/tools/jdi/IntegerValueImpl.js,bin/com/sun/tools/jdi/InterfaceTypeImpl.js,bin/com/sun/tools/jdi/InternalEventHandler.js,bin/com/sun/tools/jdi/JDWPException.js,bin/com/sun/tools/jdi/JNITypeParser.js,bin/com/sun/tools/jdi/LineInfo.js,bin/com/sun/tools/jdi/LinkedHashMap.js,bin/com/sun/tools/jdi/LocalVariableImpl.js,bin/com/sun/tools/jdi/LocationImpl.js,bin/com/sun/tools/jdi/LockObject.js,bin/com/sun/tools/jdi/LongTypeImpl.js,bin/com/sun/tools/jdi/LongValueImpl.js,bin/com/sun/tools/jdi/MethodImpl.js,bin/com/sun/tools/jdi/MirrorImpl.js,bin/com/sun/tools/jdi/MonitorInfoImpl.js,bin/com/sun/tools/jdi/NonConcreteMethodImpl.js,bin/com/sun/tools/jdi/ObjectReferenceImpl.js,bin/com/sun/tools/jdi/ObsoleteMethodImpl.js,bin/com/sun/tools/jdi/Packet.js,bin/com/sun/tools/jdi/PacketStream.js,bin/com/sun/tools/jdi/PrimitiveTypeImpl.js,bin/com/sun/tools/jdi/PrimitiveValueImpl.js,bin/com/sun/tools/jdi/ProcessAttachingConnector.js,bin/com/sun/tools/jdi/RawCommandLineLauncher.js,bin/com/sun/tools/jdi/ReferenceTypeImpl.js,bin/com/sun/tools/jdi/SDE.js,bin/com/sun/tools/jdi/ShortTypeImpl.js,bin/com/sun/tools/jdi/ShortValueImpl.js,bin/com/sun/tools/jdi/SocketAttachingConnector.js,bin/com/sun/tools/jdi/SocketListeningConnector.js,bin/com/sun/tools/jdi/SocketTransportService.js,bin/com/sun/tools/jdi/StackFrameImpl.js,bin/com/sun/tools/jdi/StratumLineInfo.js,bin/com/sun/tools/jdi/StringReferenceImpl.js,bin/com/sun/tools/jdi/SunCommandLineLauncher.js,bin/com/sun/tools/jdi/TargetVM.js,bin/com/sun/tools/jdi/ThreadAction.js,bin/com/sun/tools/jdi/ThreadGroupReferenceImpl.js,bin/com/sun/tools/jdi/ThreadListener.js,bin/com/sun/tools/jdi/ThreadReferenceImpl.js,bin/com/sun/tools/jdi/TypeComponentImpl.js,bin/com/sun/tools/jdi/TypeImpl.js,bin/com/sun/tools/jdi/VMAction.js,bin/com/sun/tools/jdi/VMListener.js,bin/com/sun/tools/jdi/VMModifiers.js,bin/com/sun/tools/jdi/VMState.js,bin/com/sun/tools/jdi/ValueContainer.js,bin/com/sun/tools/jdi/ValueImpl.js,bin/com/sun/tools/jdi/VirtualMachineImpl.js,bin/com/sun/tools/jdi/VirtualMachineManagerImpl.js,bin/com/sun/tools/jdi/VirtualMachineManagerService.js,bin/com/sun/tools/jdi/VoidTypeImpl.js,bin/com/sun/tools/jdi/VoidValueImpl.js,bin/com/sun/tools/script/shell/Main.js,bin/java/applet/Applet.js,bin/java/applet/AppletContext.js,bin/java/applet/AppletStub.js,bin/java/applet/AudioClip.js,bin/java/awt/AWTError.js,bin/java/awt/AWTEvent.js,bin/java/awt/AWTEventMulticaster.js,bin/java/awt/AWTException.js,bin/java/awt/AWTKeyStroke.js,bin/java/awt/AWTPermission.js,bin/java/awt/ActiveEvent.js,bin/java/awt/Adjustable.js,bin/java/awt/AlphaComposite.js,bin/java/awt/AttributeValue.js,bin/java/awt/BasicStroke.js,bin/java/awt/BorderLayout.js,bin/java/awt/BufferCapabilities.js,bin/java/awt/Button.js,bin/java/awt/Canvas.js,bin/java/awt/CardLayout.js,bin/java/awt/Checkbox.js,bin/java/awt/CheckboxGroup.js,bin/java/awt/CheckboxMenuItem.js,bin/java/awt/Choice.js,bin/java/awt/Color.js,bin/java/awt/ColorPaintContext.js,bin/java/awt/Component.js,bin/java/awt/ComponentOrientation.js,bin/java/awt/Composite.js,bin/java/awt/CompositeContext.js,bin/java/awt/Conditional.js,bin/java/awt/Container.js,bin/java/awt/ContainerOrderFocusTraversalPolicy.js,bin/java/awt/Cursor.js,bin/java/awt/DefaultFocusTraversalPolicy.js,bin/java/awt/DefaultKeyboardFocusManager.js,bin/java/awt/Desktop.js,bin/java/awt/Dialog.js,bin/java/awt/Dimension.js,bin/java/awt/DisplayMode.js,bin/java/awt/Event.js,bin/java/awt/EventDispatchThread.js,bin/java/awt/EventFilter.js,bin/java/awt/EventQueue.js,bin/java/awt/FileDialog.js,bin/java/awt/FlowLayout.js,bin/java/awt/FocusTraversalPolicy.js,bin/java/awt/Font.js,bin/java/awt/FontFormatException.js,bin/java/awt/FontMetrics.js,bin/java/awt/Frame.js,bin/java/awt/GradientPaint.js,bin/java/awt/GradientPaintContext.js,bin/java/awt/Graphics.js,bin/java/awt/Graphics2D.js,bin/java/awt/GraphicsCallback.js,bin/java/awt/GraphicsConfigTemplate.js,bin/java/awt/GraphicsConfiguration.js,bin/java/awt/GraphicsDevice.js,bin/java/awt/GraphicsEnvironment.js,bin/java/awt/GridBagConstraints.js,bin/java/awt/GridBagLayout.js,bin/java/awt/GridBagLayoutInfo.js,bin/java/awt/GridLayout.js,bin/java/awt/HeadlessException.js,bin/java/awt/IllegalComponentStateException.js,bin/java/awt/Image.js,bin/java/awt/ImageCapabilities.js,bin/java/awt/Insets.js,bin/java/awt/ItemSelectable.js,bin/java/awt/JobAttributes.js,bin/java/awt/KeyEventDispatcher.js,bin/java/awt/KeyEventPostProcessor.js,bin/java/awt/KeyboardFocusManager.js,bin/java/awt/Label.js,bin/java/awt/LayoutManager.js,bin/java/awt/LayoutManager2.js,bin/java/awt/LinearGradientPaint.js,bin/java/awt/LinearGradientPaintContext.js,bin/java/awt/List.js,bin/java/awt/MediaTracker.js,bin/java/awt/Menu.js,bin/java/awt/MenuBar.js,bin/java/awt/MenuComponent.js,bin/java/awt/MenuContainer.js,bin/java/awt/MenuItem.js,bin/java/awt/MenuShortcut.js,bin/java/awt/ModalEventFilter.js,bin/java/awt/MouseInfo.js,bin/java/awt/MultipleGradientPaint.js,bin/java/awt/MultipleGradientPaintContext.js,bin/java/awt/PageAttributes.js,bin/java/awt/Paint.js,bin/java/awt/PaintContext.js,bin/java/awt/Panel.js,bin/java/awt/Point.js,bin/java/awt/PointerInfo.js,bin/java/awt/Polygon.js,bin/java/awt/PopupMenu.js,bin/java/awt/PrintGraphics.js,bin/java/awt/PrintJob.js,bin/java/awt/RadialGradientPaint.js,bin/java/awt/RadialGradientPaintContext.js,bin/java/awt/Rectangle.js,bin/java/awt/RenderingHints.js,bin/java/awt/Robot.js,bin/java/awt/ScrollPane.js,bin/java/awt/ScrollPaneAdjustable.js,bin/java/awt/Scrollbar.js,bin/java/awt/SentEvent.js,bin/java/awt/SequencedEvent.js,bin/java/awt/Shape.js,bin/java/awt/SplashScreen.js,bin/java/awt/Stroke.js,bin/java/awt/SystemColor.js,bin/java/awt/SystemTray.js,bin/java/awt/TextArea.js,bin/java/awt/TextComponent.js,bin/java/awt/TextField.js,bin/java/awt/TexturePaint.js,bin/java/awt/TexturePaintContext.js,bin/java/awt/Toolkit.js,bin/java/awt/Transparency.js,bin/java/awt/TrayIcon.js,bin/java/awt/Window.js,bin/java/awt/color/CMMException.js,bin/java/awt/color/ColorSpace.js,bin/java/awt/color/ICC_ColorSpace.js,bin/java/awt/color/ICC_Profile.js,bin/java/awt/color/ICC_ProfileGray.js,bin/java/awt/color/ICC_ProfileRGB.js,bin/java/awt/color/ProfileDataException.js,bin/java/awt/datatransfer/Clipboard.js,bin/java/awt/datatransfer/ClipboardOwner.js,bin/java/awt/datatransfer/DataFlavor.js,bin/java/awt/datatransfer/FlavorEvent.js,bin/java/awt/datatransfer/FlavorListener.js,bin/java/awt/datatransfer/FlavorMap.js,bin/java/awt/datatransfer/FlavorTable.js,bin/java/awt/datatransfer/MimeType.js,bin/java/awt/datatransfer/MimeTypeParameterList.js,bin/java/awt/datatransfer/MimeTypeParseException.js,bin/java/awt/datatransfer/StringSelection.js,bin/java/awt/datatransfer/SystemFlavorMap.js,bin/java/awt/datatransfer/Transferable.js,bin/java/awt/datatransfer/UnsupportedFlavorException.js,bin/java/awt/dnd/Autoscroll.js,bin/java/awt/dnd/DnDConstants.js,bin/java/awt/dnd/DnDEventMulticaster.js,bin/java/awt/dnd/DragGestureEvent.js,bin/java/awt/dnd/DragGestureListener.js,bin/java/awt/dnd/DragGestureRecognizer.js,bin/java/awt/dnd/DragSource.js,bin/java/awt/dnd/DragSourceAdapter.js,bin/java/awt/dnd/DragSourceContext.js,bin/java/awt/dnd/DragSourceDragEvent.js,bin/java/awt/dnd/DragSourceDropEvent.js,bin/java/awt/dnd/DragSourceEvent.js,bin/java/awt/dnd/DragSourceListener.js,bin/java/awt/dnd/DragSourceMotionListener.js,bin/java/awt/dnd/DropTarget.js,bin/java/awt/dnd/DropTargetAdapter.js,bin/java/awt/dnd/DropTargetContext.js,bin/java/awt/dnd/DropTargetDragEvent.js,bin/java/awt/dnd/DropTargetDropEvent.js,bin/java/awt/dnd/DropTargetEvent.js,bin/java/awt/dnd/DropTargetListener.js,bin/java/awt/dnd/InvalidDnDOperationException.js,bin/java/awt/dnd/MouseDragGestureRecognizer.js,bin/java/awt/dnd/SerializationTester.js,bin/java/awt/dnd/peer/DragSourceContextPeer.js,bin/java/awt/dnd/peer/DropTargetContextPeer.js,bin/java/awt/dnd/peer/DropTargetPeer.js,bin/java/awt/event/AWTEventListener.js,bin/java/awt/event/AWTEventListenerProxy.js,bin/java/awt/event/ActionEvent.js,bin/java/awt/event/ActionListener.js,bin/java/awt/event/AdjustmentEvent.js,bin/java/awt/event/AdjustmentListener.js,bin/java/awt/event/ComponentAdapter.js,bin/java/awt/event/ComponentEvent.js,bin/java/awt/event/ComponentListener.js,bin/java/awt/event/ContainerAdapter.js,bin/java/awt/event/ContainerEvent.js,bin/java/awt/event/ContainerListener.js,bin/java/awt/event/FocusAdapter.js,bin/java/awt/event/FocusEvent.js,bin/java/awt/event/FocusListener.js,bin/java/awt/event/HierarchyBoundsAdapter.js,bin/java/awt/event/HierarchyBoundsListener.js,bin/java/awt/event/HierarchyEvent.js,bin/java/awt/event/HierarchyListener.js,bin/java/awt/event/InputEvent.js,bin/java/awt/event/InputMethodEvent.js,bin/java/awt/event/InputMethodListener.js,bin/java/awt/event/InvocationEvent.js,bin/java/awt/event/ItemEvent.js,bin/java/awt/event/ItemListener.js,bin/java/awt/event/KeyAdapter.js,bin/java/awt/event/KeyEvent.js,bin/java/awt/event/KeyListener.js,bin/java/awt/event/MouseAdapter.js,bin/java/awt/event/MouseEvent.js,bin/java/awt/event/MouseListener.js,bin/java/awt/event/MouseMotionAdapter.js,bin/java/awt/event/MouseMotionListener.js,bin/java/awt/event/MouseWheelEvent.js,bin/java/awt/event/MouseWheelListener.js,bin/java/awt/event/NativeLibLoader.js,bin/java/awt/event/PaintEvent.js,bin/java/awt/event/TextEvent.js,bin/java/awt/event/TextListener.js,bin/java/awt/event/WindowAdapter.js,bin/java/awt/event/WindowEvent.js,bin/java/awt/event/WindowFocusListener.js,bin/java/awt/event/WindowListener.js,bin/java/awt/event/WindowStateListener.js,bin/java/awt/font/CharArrayIterator.js,bin/java/awt/font/FontRenderContext.js,bin/java/awt/font/GlyphJustificationInfo.js,bin/java/awt/font/GlyphMetrics.js,bin/java/awt/font/GlyphVector.js,bin/java/awt/font/GraphicAttribute.js,bin/java/awt/font/ImageGraphicAttribute.js,bin/java/awt/font/LayoutPath.js,bin/java/awt/font/LineBreakMeasurer.js,bin/java/awt/font/LineMetrics.js,bin/java/awt/font/MultipleMaster.js,bin/java/awt/font/NumericShaper.js,bin/java/awt/font/OpenType.js,bin/java/awt/font/ShapeGraphicAttribute.js,bin/java/awt/font/StyledParagraph.js,bin/java/awt/font/TextAttribute.js,bin/java/awt/font/TextHitInfo.js,bin/java/awt/font/TextJustifier.js,bin/java/awt/font/TextLayout.js,bin/java/awt/font/TextLine.js,bin/java/awt/font/TextMeasurer.js,bin/java/awt/font/TransformAttribute.js,bin/java/awt/geom/AffineTransform.js,bin/java/awt/geom/Arc2D.js,bin/java/awt/geom/ArcIterator.js,bin/java/awt/geom/Area.js,bin/java/awt/geom/CubicCurve2D.js,bin/java/awt/geom/CubicIterator.js,bin/java/awt/geom/Dimension2D.js,bin/java/awt/geom/Ellipse2D.js,bin/java/awt/geom/EllipseIterator.js,bin/java/awt/geom/FlatteningPathIterator.js,bin/java/awt/geom/GeneralPath.js,bin/java/awt/geom/IllegalPathStateException.js,bin/java/awt/geom/Line2D.js,bin/java/awt/geom/LineIterator.js,bin/java/awt/geom/NoninvertibleTransformException.js,bin/java/awt/geom/Path2D.js,bin/java/awt/geom/PathIterator.js,bin/java/awt/geom/Point2D.js,bin/java/awt/geom/QuadCurve2D.js,bin/java/awt/geom/QuadIterator.js,bin/java/awt/geom/RectIterator.js,bin/java/awt/geom/Rectangle2D.js,bin/java/awt/geom/RectangularShape.js,bin/java/awt/geom/RoundRectIterator.js,bin/java/awt/geom/RoundRectangle2D.js,bin/java/awt/im/InputContext.js,bin/java/awt/im/InputMethodHighlight.js,bin/java/awt/im/InputMethodRequests.js,bin/java/awt/im/InputSubset.js,bin/java/awt/im/spi/InputMethod.js,bin/java/awt/im/spi/InputMethodContext.js,bin/java/awt/im/spi/InputMethodDescriptor.js,bin/java/awt/image/AffineTransformOp.js,bin/java/awt/image/AreaAveragingScaleFilter.js,bin/java/awt/image/BandCombineOp.js,bin/java/awt/image/BandedSampleModel.js,bin/java/awt/image/BufferStrategy.js,bin/java/awt/image/BufferedImage.js,bin/java/awt/image/BufferedImageFilter.js,bin/java/awt/image/BufferedImageOp.js,bin/java/awt/image/ByteLookupTable.js,bin/java/awt/image/ColorConvertOp.js,bin/java/awt/image/ColorModel.js,bin/java/awt/image/ComponentColorModel.js,bin/java/awt/image/ComponentSampleModel.js,bin/java/awt/image/ConvolveOp.js,bin/java/awt/image/CropImageFilter.js,bin/java/awt/image/DataBuffer.js,bin/java/awt/image/DataBufferByte.js,bin/java/awt/image/DataBufferDouble.js,bin/java/awt/image/DataBufferFloat.js,bin/java/awt/image/DataBufferInt.js,bin/java/awt/image/DataBufferShort.js,bin/java/awt/image/DataBufferUShort.js,bin/java/awt/image/DirectColorModel.js,bin/java/awt/image/FilteredImageSource.js,bin/java/awt/image/ImageConsumer.js,bin/java/awt/image/ImageFilter.js,bin/java/awt/image/ImageObserver.js,bin/java/awt/image/ImageProducer.js,bin/java/awt/image/ImagingOpException.js,bin/java/awt/image/IndexColorModel.js,bin/java/awt/image/Kernel.js,bin/java/awt/image/LookupOp.js,bin/java/awt/image/LookupTable.js,bin/java/awt/image/MemoryImageSource.js,bin/java/awt/image/MultiPixelPackedSampleModel.js,bin/java/awt/image/PackedColorModel.js,bin/java/awt/image/PixelGrabber.js,bin/java/awt/image/PixelInterleavedSampleModel.js,bin/java/awt/image/RGBImageFilter.js,bin/java/awt/image/Raster.js,bin/java/awt/image/RasterFormatException.js,bin/java/awt/image/RasterOp.js,bin/java/awt/image/RenderedImage.js,bin/java/awt/image/ReplicateScaleFilter.js,bin/java/awt/image/RescaleOp.js,bin/java/awt/image/SampleModel.js,bin/java/awt/image/ShortLookupTable.js,bin/java/awt/image/SinglePixelPackedSampleModel.js,bin/java/awt/image/TileObserver.js,bin/java/awt/image/VolatileImage.js,bin/java/awt/image/WritableRaster.js,bin/java/awt/image/WritableRenderedImage.js,bin/java/awt/image/renderable/ContextualRenderedImageFactory.js,bin/java/awt/image/renderable/ParameterBlock.js,bin/java/awt/image/renderable/RenderContext.js,bin/java/awt/image/renderable/RenderableImage.js,bin/java/awt/image/renderable/RenderableImageOp.js,bin/java/awt/image/renderable/RenderableImageProducer.js,bin/java/awt/image/renderable/RenderedImageFactory.js,bin/java/awt/peer/ButtonPeer.js,bin/java/awt/peer/CanvasPeer.js,bin/java/awt/peer/CheckboxMenuItemPeer.js,bin/java/awt/peer/CheckboxPeer.js,bin/java/awt/peer/ChoicePeer.js,bin/java/awt/peer/ComponentPeer.js,bin/java/awt/peer/ContainerPeer.js,bin/java/awt/peer/DesktopPeer.js,bin/java/awt/peer/DialogPeer.js,bin/java/awt/peer/FileDialogPeer.js,bin/java/awt/peer/FontPeer.js,bin/java/awt/peer/FramePeer.js,bin/java/awt/peer/KeyboardFocusManagerPeer.js,bin/java/awt/peer/LabelPeer.js,bin/java/awt/peer/LightweightPeer.js,bin/java/awt/peer/ListPeer.js,bin/java/awt/peer/MenuBarPeer.js,bin/java/awt/peer/MenuComponentPeer.js,bin/java/awt/peer/MenuItemPeer.js,bin/java/awt/peer/MenuPeer.js,bin/java/awt/peer/MouseInfoPeer.js,bin/java/awt/peer/PanelPeer.js,bin/java/awt/peer/PopupMenuPeer.js,bin/java/awt/peer/RobotPeer.js,bin/java/awt/peer/ScrollPanePeer.js,bin/java/awt/peer/ScrollbarPeer.js,bin/java/awt/peer/SystemTrayPeer.js,bin/java/awt/peer/TextAreaPeer.js,bin/java/awt/peer/TextComponentPeer.js,bin/java/awt/peer/TextFieldPeer.js,bin/java/awt/peer/TrayIconPeer.js,bin/java/awt/peer/WindowPeer.js,bin/java/awt/print/Book.js,bin/java/awt/print/PageFormat.js,bin/java/awt/print/Pageable.js,bin/java/awt/print/Paper.js,bin/java/awt/print/Printable.js,bin/java/awt/print/PrinterAbortException.js,bin/java/awt/print/PrinterException.js,bin/java/awt/print/PrinterGraphics.js,bin/java/awt/print/PrinterIOException.js,bin/java/awt/print/PrinterJob.js,bin/java/beans/AppletInitializer.js,bin/java/beans/BeanDescriptor.js,bin/java/beans/BeanInfo.js,bin/java/beans/Beans.js,bin/java/beans/ChangeListenerMap.js,bin/java/beans/ConstructorProperties.js,bin/java/beans/Customizer.js,bin/java/beans/DefaultPersistenceDelegate.js,bin/java/beans/DesignMode.js,bin/java/beans/Encoder.js,bin/java/beans/EventHandler.js,bin/java/beans/EventSetDescriptor.js,bin/java/beans/ExceptionListener.js,bin/java/beans/Expression.js,bin/java/beans/FeatureDescriptor.js,bin/java/beans/IndexedPropertyChangeEvent.js,bin/java/beans/IndexedPropertyDescriptor.js,bin/java/beans/IntrospectionException.js,bin/java/beans/Introspector.js,bin/java/beans/MetaData.js,bin/java/beans/MethodDescriptor.js,bin/java/beans/NameGenerator.js,bin/java/beans/ParameterDescriptor.js,bin/java/beans/PersistenceDelegate.js,bin/java/beans/PropertyChangeEvent.js,bin/java/beans/PropertyChangeListener.js,bin/java/beans/PropertyChangeListenerProxy.js,bin/java/beans/PropertyChangeSupport.js,bin/java/beans/PropertyDescriptor.js,bin/java/beans/PropertyEditor.js,bin/java/beans/PropertyEditorManager.js,bin/java/beans/PropertyEditorSupport.js,bin/java/beans/PropertyVetoException.js,bin/java/beans/ReflectionUtils.js,bin/java/beans/SimpleBeanInfo.js,bin/java/beans/Statement.js,bin/java/beans/ThreadGroupContext.js,bin/java/beans/VetoableChangeListener.js,bin/java/beans/VetoableChangeListenerProxy.js,bin/java/beans/VetoableChangeSupport.js,bin/java/beans/Visibility.js,bin/java/beans/WeakIdentityMap.js,bin/java/beans/XMLDecoder.js,bin/java/beans/XMLEncoder.js,bin/java/beans/beancontext/BeanContext.js,bin/java/beans/beancontext/BeanContextChild.js,bin/java/beans/beancontext/BeanContextChildComponentProxy.js,bin/java/beans/beancontext/BeanContextChildSupport.js,bin/java/beans/beancontext/BeanContextContainerProxy.js,bin/java/beans/beancontext/BeanContextEvent.js,bin/java/beans/beancontext/BeanContextMembershipEvent.js,bin/java/beans/beancontext/BeanContextMembershipListener.js,bin/java/beans/beancontext/BeanContextProxy.js,bin/java/beans/beancontext/BeanContextServiceAvailableEvent.js,bin/java/beans/beancontext/BeanContextServiceProvider.js,bin/java/beans/beancontext/BeanContextServiceProviderBeanInfo.js,bin/java/beans/beancontext/BeanContextServiceRevokedEvent.js,bin/java/beans/beancontext/BeanContextServiceRevokedListener.js,bin/java/beans/beancontext/BeanContextServices.js,bin/java/beans/beancontext/BeanContextServicesListener.js,bin/java/beans/beancontext/BeanContextServicesSupport.js,bin/java/beans/beancontext/BeanContextSupport.js,bin/java/io/Bits.js,bin/java/io/BufferedInputStream.js,bin/java/io/BufferedOutputStream.js,bin/java/io/BufferedReader.js,bin/java/io/BufferedWriter.js,bin/java/io/ByteArrayInputStream.js,bin/java/io/ByteArrayOutputStream.js,bin/java/io/CharArrayReader.js,bin/java/io/CharArrayWriter.js,bin/java/io/CharConversionException.js,bin/javax/swing/plaf/synth/SynthConstants.js,bin/javax/management/openmbean/SimpleType.js,bin/sun/security/util/SecurityConstants.js,bin/sun/java2d/pipe/hw/ExtendedBufferCapabilities.js,bin/sun/font/EAttribute.js,bin/sun/java2d/StateTrackable.js,bin/java/lang/annotation/ElementType.js,bin/java/lang/annotation/RetentionPolicy.js,bin/java/lang/Object.js,bin/java/lang/Enum.js,bin/java/lang/Comparable.js,bin/java/lang/package-info.js,bin/java/io/Serializable.js,bin/java/lang/reflect/WildcardType.js,bin/java/lang/reflect/Type.js,bin/java/lang/reflect/package-info.js,bin/javax/accessibility/Accessible.js,bin/javax/crypto/CipherSpi.js,bin/javax/crypto/KeyGeneratorSpi.js,bin/java/security/AlgorithmParametersSpi.js,bin/javax/crypto/SecretKey.js,bin/java/security/Key.js,bin/javax/crypto/SecretKeyFactorySpi.js,bin/javax/crypto/KeyAgreementSpi.js,bin/java/security/KeyFactorySpi.js,bin/java/security/KeyPairGeneratorSpi.js,bin/java/security/AlgorithmParameterGeneratorSpi.js,bin/java/security/PrivateKey.js,bin/javax/crypto/interfaces/DHPrivateKey.js,bin/javax/crypto/interfaces/DHKey.js,bin/java/security/PublicKey.js,bin/javax/crypto/interfaces/DHPublicKey.js,bin/java/lang/Cloneable.js,bin/javax/crypto/MacSpi.js,bin/java/security/KeyStoreSpi.js,bin/java/security/KeyStore.js,bin/javax/crypto/Cipher.js,bin/javax/crypto/SealedObject.js,bin/javax/crypto/interfaces/PBEKey.js,bin/java/security/Provider.js,bin/java/util/Properties.js,bin/java/util/Hashtable.js,bin/java/util/Dictionary.js,bin/java/util/Map.js,bin/sun/security/internal/interfaces/TlsMasterSecret.js,bin/java/lang/Deprecated.js,bin/javax/imageio/ImageReader.js,bin/javax/imageio/event/IIOReadProgressListener.js,bin/java/util/EventListener.js,bin/javax/imageio/spi/ImageReaderSpi.js,bin/javax/imageio/spi/ImageReaderWriterSpi.js,bin/javax/imageio/spi/IIOServiceProvider.js,bin/javax/imageio/spi/RegisterableService.js,bin/javax/imageio/ImageWriter.js,bin/javax/imageio/ImageTranscoder.js,bin/javax/imageio/event/IIOWriteProgressListener.js,bin/javax/imageio/spi/ImageWriterSpi.js,bin/javax/imageio/metadata/IIOMetadata.js,bin/javax/imageio/metadata/IIOMetadataFormatImpl.js,bin/javax/imageio/metadata/IIOMetadataFormat.js,bin/java/util/ListResourceBundle.js,bin/java/util/ResourceBundle.js,bin/java/io/InputStream.js,bin/java/io/Closeable.js,bin/javax/imageio/stream/ImageInputStreamImpl.js,bin/javax/imageio/stream/ImageInputStream.js,bin/java/io/DataInput.js,bin/javax/imageio/ImageWriteParam.js,bin/javax/imageio/IIOParam.js,bin/java/lang/Exception.js,bin/java/lang/Throwable.js,bin/sun/java2d/DisposerRecord.js,bin/java/util/Enumeration.js,bin/javax/imageio/stream/ImageOutputStreamImpl.js,bin/javax/imageio/stream/ImageOutputStream.js,bin/java/io/DataOutput.js,bin/javax/imageio/spi/ImageInputStreamSpi.js,bin/javax/imageio/spi/ImageOutputStreamSpi.js,bin/java/text/AttributedCharacterIterator.js,bin/java/text/CharacterIterator.js,bin/javax/swing/colorchooser/AbstractColorChooserPanel.js,bin/javax/swing/JPanel.js,bin/javax/swing/JComponent.js,bin/javax/swing/ClientPropertyKey.js,bin/javax/swing/TransferHandler.js,bin/javax/swing/event/ChangeListener.js,bin/javax/swing/AbstractAction.js,bin/javax/swing/Action.js,bin/javax/swing/JLabel.js,bin/javax/swing/SwingConstants.js,bin/javax/swing/plaf/synth/ColorType.js,bin/javax/swing/plaf/synth/Region.js,bin/sun/swing/plaf/synth/SynthFileChooserUI.js,bin/javax/swing/plaf/basic/BasicFileChooserUI.js,bin/javax/swing/plaf/FileChooserUI.js,bin/javax/swing/plaf/ComponentUI.js,bin/sun/swing/plaf/synth/SynthUI.js,bin/javax/swing/filechooser/FileView.js,bin/javax/swing/event/ListSelectionListener.js,bin/javax/swing/plaf/basic/BasicDirectoryModel.js,bin/javax/swing/AbstractListModel.js,bin/javax/swing/ListModel.js,bin/javax/swing/event/ListDataListener.js,bin/javax/swing/DefaultListCellRenderer.js,bin/javax/swing/ListCellRenderer.js,bin/javax/swing/ComboBoxModel.js,bin/javax/swing/plaf/UIResource.js,bin/javax/swing/plaf/synth/SynthGraphicsUtils.js,bin/sun/swing/plaf/synth/SynthIcon.js,bin/javax/swing/Icon.js,bin/javax/swing/plaf/synth/SynthLookAndFeel.js,bin/javax/swing/plaf/basic/BasicLookAndFeel.js,bin/javax/swing/LookAndFeel.js,bin/java/lang/ref/WeakReference.js,bin/java/lang/ref/Reference.js,bin/sun/swing/DefaultLayoutStyle.js,bin/javax/swing/LayoutStyle.js,bin/javax/swing/plaf/synth/SynthPainter.js,bin/javax/swing/border/AbstractBorder.js,bin/javax/swing/border/Border.js,bin/javax/swing/plaf/synth/SynthStyle.js,bin/javax/swing/UIDefaults.js,bin/javax/swing/plaf/synth/SynthStyleFactory.js,bin/java/security/PrivilegedAction.js,bin/java/util/StringTokenizer.js,bin/javax/swing/plaf/basic/BasicButtonListener.js,bin/javax/swing/plaf/basic/BasicButtonUI.js,bin/javax/swing/plaf/ButtonUI.js,bin/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.js,bin/javax/swing/plaf/basic/BasicMenuItemUI.js,bin/javax/swing/plaf/MenuItemUI.js,bin/javax/swing/event/MouseInputListener.js,bin/javax/swing/plaf/basic/BasicRadioButtonUI.js,bin/javax/swing/plaf/basic/BasicToggleButtonUI.js,bin/javax/swing/plaf/basic/BasicComboBoxUI.js,bin/javax/swing/plaf/ComboBoxUI.js,bin/javax/swing/plaf/basic/BasicComboPopup.js,bin/javax/swing/JPopupMenu.js,bin/javax/swing/MenuElement.js,bin/javax/swing/plaf/basic/ComboPopup.js,bin/javax/swing/plaf/basic/BasicDesktopIconUI.js,bin/javax/swing/plaf/DesktopIconUI.js,bin/javax/swing/JButton.js,bin/javax/swing/AbstractButton.js,bin/javax/swing/plaf/basic/BasicDesktopPaneUI.js,bin/javax/swing/plaf/DesktopPaneUI.js,bin/javax/swing/DefaultDesktopManager.js,bin/javax/swing/DesktopManager.js,bin/javax/swing/plaf/basic/BasicEditorPaneUI.js,bin/javax/swing/plaf/basic/BasicTextUI.js,bin/javax/swing/plaf/TextUI.js,bin/javax/swing/text/ViewFactory.js,bin/javax/swing/plaf/basic/BasicInternalFrameTitlePane.js,bin/javax/swing/plaf/basic/BasicInternalFrameUI.js,bin/javax/swing/plaf/InternalFrameUI.js,bin/javax/swing/plaf/basic/BasicLabelUI.js,bin/javax/swing/plaf/LabelUI.js,bin/javax/swing/plaf/basic/BasicMenuBarUI.js,bin/javax/swing/plaf/MenuBarUI.js,bin/javax/swing/plaf/basic/BasicMenuUI.js,bin/javax/swing/plaf/basic/BasicOptionPaneUI.js,bin/javax/swing/plaf/OptionPaneUI.js,bin/javax/swing/plaf/basic/BasicPasswordFieldUI.js,bin/javax/swing/plaf/basic/BasicTextFieldUI.js,bin/javax/swing/plaf/basic/BasicSeparatorUI.js,bin/javax/swing/plaf/SeparatorUI.js,bin/javax/swing/plaf/basic/BasicPopupMenuUI.js,bin/javax/swing/plaf/PopupMenuUI.js,bin/javax/swing/plaf/basic/BasicProgressBarUI.js,bin/javax/swing/plaf/ProgressBarUI.js,bin/javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.js,bin/javax/swing/plaf/basic/BasicArrowButton.js,bin/javax/swing/plaf/basic/BasicScrollBarUI.js,bin/javax/swing/plaf/ScrollBarUI.js,bin/javax/swing/plaf/basic/BasicScrollPaneUI.js,bin/javax/swing/plaf/ScrollPaneUI.js,bin/javax/swing/ScrollPaneConstants.js,bin/javax/swing/plaf/basic/BasicSliderUI.js,bin/javax/swing/plaf/SliderUI.js,bin/javax/swing/plaf/basic/BasicSplitPaneDivider.js,bin/javax/swing/plaf/basic/BasicSplitPaneUI.js,bin/javax/swing/plaf/SplitPaneUI.js,bin/javax/swing/plaf/basic/BasicTabbedPaneUI.js,bin/javax/swing/plaf/TabbedPaneUI.js,bin/javax/swing/plaf/basic/BasicTextAreaUI.js,bin/javax/swing/plaf/basic/BasicTextPaneUI.js,bin/javax/swing/text/DefaultCaret.js,bin/javax/swing/text/Caret.js,bin/javax/swing/tree/DefaultTreeCellRenderer.js,bin/javax/swing/tree/TreeCellRenderer.js,bin/javax/swing/plaf/basic/BasicTreeUI.js,bin/javax/swing/plaf/TreeUI.js,bin/java/lang/ref/SoftReference.js,bin/sun/swing/UIClientPropertyKey.js,bin/javax/swing/border/LineBorder.js,bin/javax/swing/plaf/basic/BasicComboBoxEditor.js,bin/javax/swing/ComboBoxEditor.js,bin/javax/swing/plaf/basic/BasicComboBoxRenderer.js,bin/sun/swing/FilePane.js,bin/sun/swing/MenuItemCheckIconFactory.js,bin/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.js,bin/javax/swing/JWindow.js,bin/javax/swing/RootPaneContainer.js,bin/javax/swing/plaf/basic/BasicRootPaneUI.js,bin/javax/swing/plaf/RootPaneUI.js,bin/javax/swing/event/MouseInputAdapter.js,bin/javax/swing/plaf/basic/BasicSpinnerUI.js,bin/javax/swing/plaf/SpinnerUI.js,bin/javax/swing/plaf/basic/BasicTableHeaderUI.js,bin/javax/swing/plaf/TableHeaderUI.js,bin/sun/swing/table/DefaultTableCellHeaderRenderer.js,bin/javax/swing/table/DefaultTableCellRenderer.js,bin/javax/swing/table/TableCellRenderer.js,bin/java/lang/Runnable.js,bin/javax/swing/text/DefaultHighlighter.js,bin/javax/swing/text/LayeredHighlighter.js,bin/javax/swing/text/Highlighter.js,bin/javax/swing/plaf/basic/BasicToolBarSeparatorUI.js,bin/javax/swing/plaf/basic/BasicToolBarUI.js,bin/javax/swing/plaf/ToolBarUI.js,bin/javax/swing/border/EmptyBorder.js,bin/sun/swing/CachedPainter.js,bin/java/io/IOException.js,bin/java/io/FilterOutputStream.js,bin/java/io/OutputStream.js,bin/java/io/Flushable.js,bin/java/util/AbstractList.js,bin/java/util/AbstractCollection.js,bin/java/util/Collection.js,bin/java/lang/Iterable.js,bin/java/util/List.js,bin/java/util/Iterator.js,bin/java/io/FilterInputStream.js,bin/java/util/jar/Pack200.js,bin/java/util/TreeMap.js,bin/java/util/AbstractMap.js,bin/java/util/NavigableMap.js,bin/java/util/SortedMap.js,bin/java/lang/RuntimeException.js,bin/java/security/BasicPermission.js,bin/java/security/Permission.js,bin/java/security/Guard.js,bin/java/lang/UnsupportedOperationException.js,bin/java/util/Set.js,bin/javax/management/MBeanServerConnection.js,bin/javax/management/NotificationListener.js,bin/javax/management/loading/ClassLoaderRepository.js,bin/javax/management/DynamicMBean.js,bin/java/lang/String.js,bin/java/lang/CharSequence.js,bin/javax/management/MBeanServer.js,bin/javax/management/MBeanServerBuilder.js,bin/java/util/Comparator.js,bin/java/lang/reflect/Method.js,bin/java/lang/reflect/AccessibleObject.js,bin/java/lang/reflect/AnnotatedElement.js,bin/java/lang/reflect/GenericDeclaration.js,bin/java/lang/reflect/Member.js,bin/java/util/WeakHashMap.js,bin/java/lang/Class.js,bin/javax/management/MBeanInfo.js,bin/javax/management/DescriptorRead.js,bin/javax/management/MBeanServerDelegate.js,bin/javax/management/MBeanServerDelegateMBean.js,bin/javax/management/NotificationEmitter.js,bin/javax/management/NotificationBroadcaster.js,bin/javax/management/MBeanRegistration.js,bin/java/io/ObjectInputStream.js,bin/java/io/ObjectInput.js,bin/java/io/ObjectStreamConstants.js,bin/javax/management/openmbean/OpenType.js,bin/javax/management/QueryEval.js,bin/javax/management/QueryExp.js,bin/java/util/concurrent/Executor.js,bin/java/util/concurrent/package-info.js,bin/java/rmi/server/RemoteRef.js,bin/java/io/Externalizable.js,bin/javax/management/remote/JMXConnectorProvider.js,bin/javax/management/remote/JMXConnectorServerProvider.js,bin/javax/security/auth/spi/LoginModule.js,bin/javax/management/remote/JMXAuthenticator.js,bin/javax/security/auth/callback/CallbackHandler.js,bin/javax/security/auth/login/Configuration.js,bin/javax/security/auth/SubjectDomainCombiner.js,bin/java/security/DomainCombiner.js,bin/javax/management/remote/MBeanServerForwarder.js,bin/java/lang/ClassLoader.js,bin/java/security/acl/AclEntry.js,bin/java/security/acl/Owner.js,bin/java/security/acl/Acl.js,bin/java/security/Principal.js,bin/java/security/acl/Group.js,bin/java/security/acl/Permission.js,bin/java/lang/Error.js,bin/java/util/Vector.js,bin/java/util/RandomAccess.js,bin/javax/management/Notification.js,bin/java/util/EventObject.js,bin/javax/management/JMRuntimeException.js,bin/java/lang/Thread.js,bin/javax/naming/NamingEnumeration.js,bin/javax/naming/Context.js,bin/javax/naming/spi/InitialContextFactory.js,bin/javax/naming/NameParser.js,bin/javax/naming/CompoundName.js,bin/javax/naming/Name.js,bin/javax/naming/spi/StateFactory.js,bin/javax/naming/spi/Resolver.js,bin/javax/naming/directory/DirContext.js,bin/javax/naming/ldap/Control.js,bin/javax/naming/Binding.js,bin/javax/naming/NameClassPair.js,bin/javax/naming/ldap/HasControls.js,bin/javax/naming/ldap/ControlFactory.js,bin/javax/naming/directory/BasicAttribute.js,bin/javax/naming/directory/Attribute.js,bin/javax/naming/event/EventDirContext.js,bin/javax/naming/event/EventContext.js,bin/javax/naming/ldap/LdapContext.js,bin/javax/naming/spi/ObjectFactory.js,bin/javax/naming/ldap/LdapReferralException.js,bin/javax/naming/ReferralException.js,bin/javax/naming/NamingException.js,bin/javax/naming/directory/SearchResult.js,bin/javax/naming/ldap/UnsolicitedNotification.js,bin/javax/naming/ldap/ExtendedResponse.js,bin/javax/naming/ldap/StartTlsResponse.js,bin/java/rmi/server/UnicastRemoteObject.js,bin/java/rmi/server/RemoteServer.js,bin/java/rmi/server/RemoteObject.js,bin/java/rmi/Remote.js,bin/javax/naming/Referenceable.js,bin/javax/naming/spi/ResolveResult.js,bin/java/lang/management/GarbageCollectorMXBean.js,bin/java/lang/management/MemoryManagerMXBean.js,bin/javax/management/openmbean/CompositeData.js,bin/javax/management/openmbean/CompositeDataView.js,bin/java/lang/management/OperatingSystemMXBean.js,bin/javax/sound/sampled/Line.js,bin/javax/sound/sampled/DataLine.js,bin/javax/sound/midi/MidiDevice.js,bin/javax/sound/midi/Receiver.js,bin/javax/sound/midi/Transmitter.js,bin/javax/sound/midi/spi/MidiDeviceProvider.js,bin/javax/sound/sampled/Mixer.js,bin/javax/sound/sampled/AudioFileFormat.js,bin/javax/sound/sampled/spi/AudioFileReader.js,bin/javax/sound/sampled/spi/AudioFileWriter.js,bin/javax/sound/sampled/spi/FormatConversionProvider.js,bin/javax/sound/sampled/AudioInputStream.js,bin/javax/sound/midi/spi/SoundbankReader.js,bin/javax/sound/midi/Synthesizer.js,bin/javax/sound/sampled/Clip.js,bin/javax/sound/midi/Instrument.js,bin/javax/sound/midi/SoundbankResource.js,bin/javax/sound/midi/Soundbank.js,bin/javax/sound/sampled/FloatControl.js,bin/javax/sound/sampled/Control.js,bin/javax/sound/sampled/BooleanControl.js,bin/javax/sound/sampled/SourceDataLine.js,bin/javax/sound/sampled/TargetDataLine.js,bin/javax/sound/sampled/spi/MixerProvider.js,bin/javax/sound/midi/ShortMessage.js,bin/javax/sound/midi/MidiMessage.js,bin/javax/sound/midi/SysexMessage.js,bin/javax/sound/midi/MetaEventListener.js,bin/javax/sound/sampled/LineListener.js,bin/javax/sound/midi/MidiChannel.js,bin/javax/sound/midi/Patch.js,bin/javax/sound/sampled/Port.js,bin/javax/sound/sampled/CompoundControl.js,bin/javax/sound/midi/Sequencer.js,bin/javax/sound/midi/VoiceStatus.js,bin/javax/sound/midi/spi/MidiFileReader.js,bin/javax/sound/midi/spi/MidiFileWriter.js,bin/java/net/HttpURLConnection.js,bin/java/net/URLConnection.js,bin/javax/net/ssl/X509KeyManager.js,bin/javax/net/ssl/KeyManager.js,bin/javax/net/ssl/X509TrustManager.js,bin/javax/net/ssl/TrustManager.js,bin/sun/security/ssl/SunJSSE.js,bin/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.js,bin/sun/net/www/protocol/http/HttpURLConnection.js,bin/javax/net/ssl/HostnameVerifier.js,bin/sun/net/www/protocol/https/Handler.js,bin/sun/net/www/protocol/http/Handler.js,bin/java/net/URLStreamHandler.js,bin/java/security/PermissionCollection.js,bin/javax/sql/rowset/BaseRowSet.js,bin/javax/sql/RowSet.js,bin/java/sql/ResultSet.js,bin/java/sql/Wrapper.js,bin/javax/sql/RowSetInternal.js,bin/javax/sql/rowset/CachedRowSet.js,bin/javax/sql/rowset/Joinable.js,bin/javax/sql/rowset/WebRowSet.js,bin/javax/sql/rowset/FilteredRowSet.js,bin/javax/sql/rowset/JdbcRowSet.js,bin/javax/sql/rowset/JoinRowSet.js,bin/javax/sql/RowSetReader.js,bin/javax/sql/rowset/spi/TransactionalWriter.js,bin/javax/sql/RowSetWriter.js,bin/javax/sql/rowset/spi/SyncResolver.js,bin/javax/sql/rowset/spi/XmlReader.js,bin/javax/sql/rowset/spi/XmlWriter.js,bin/javax/sql/rowset/spi/SyncProvider.js,bin/javax/script/CompiledScript.js,bin/javax/script/AbstractScriptEngine.js,bin/javax/script/ScriptEngine.js,bin/javax/script/Invocable.js,bin/javax/script/Compilable.js,bin/javax/script/ScriptEngineFactory.js,bin/javax/script/Bindings.js,bin/java/util/AbstractSet.js,bin/java/lang/reflect/InvocationHandler.js,bin/javax/security/auth/Policy.js,bin/java/security/GeneralSecurityException.js,bin/java/security/CodeSource.js,bin/javax/security/cert/X509Certificate.js,bin/javax/security/cert/Certificate.js,bin/javax/security/sasl/SaslClientFactory.js,bin/javax/security/sasl/SaslClient.js,bin/javax/security/sasl/SaslServer.js,bin/javax/security/sasl/SaslServerFactory.js,bin/java/lang/IndexOutOfBoundsException.js,bin/javax/swing/tree/DefaultMutableTreeNode.js,bin/javax/swing/tree/MutableTreeNode.js,bin/javax/swing/tree/TreeNode.js,bin/javax/swing/filechooser/FileFilter.js,bin/javax/swing/JMenuBar.js,bin/javax/swing/JToolBar.js,bin/java/io/PrintWriter.js,bin/java/io/Writer.js,bin/java/lang/Appendable.js,bin/javax/swing/tree/DefaultTreeSelectionModel.js,bin/javax/swing/tree/TreeSelectionModel.js,bin/java/io/FilenameFilter.js,bin/java/io/DataInputStream.js,bin/java/util/ArrayList.js,bin/javax/accessibility/AccessibleContext.js,bin/javax/accessibility/AccessibleComponent.js,bin/javax/accessibility/AccessibleAction.js,bin/javax/accessibility/AccessibleValue.js,bin/javax/accessibility/AccessibleSelection.js,bin/sun/awt/SubRegionShowable.js,bin/sun/awt/RequestFocusController.js,bin/sun/awt/SunGraphicsCallback.js,bin/java/lang/IllegalStateException.js,bin/javax/accessibility/AccessibleText.js,bin/sun/awt/datatransfer/DataTransferer.js,bin/java/util/EventListenerProxy.js,bin/java/lang/Character.js,bin/java/lang/annotation/Annotation.js,bin/java/io/Reader.js,bin/java/lang/Readable.js,bin/javax/security/auth/Destroyable.js,bin/javax/accessibility/AccessibleExtendedComponent.js,bin/java/io/ObjectInputValidation.js,bin/sun/swing/UIAction.js,bin/javax/accessibility/AccessibleKeyBinding.js,bin/javax/swing/plaf/basic/BasicTransferable.js,bin/javax/swing/event/MenuDragMouseListener.js,bin/javax/swing/JComboBox.js,bin/javax/swing/JSeparator.js,bin/javax/swing/ActionPropertyChangeListener.js,bin/javax/swing/text/html/StyleSheet.js,bin/javax/swing/text/StyleContext.js,bin/javax/swing/text/AbstractDocument.js,bin/javax/swing/text/Document.js,bin/javax/swing/text/View.js,bin/javax/swing/event/DocumentListener.js,bin/javax/swing/text/TextAction.js,bin/javax/swing/plaf/basic/DragRecognitionSupport.js,bin/javax/swing/event/InternalFrameListener.js,bin/javax/swing/event/MenuKeyListener.js,bin/javax/swing/JTextField.js,bin/javax/swing/text/JTextComponent.js,bin/javax/swing/Scrollable.js,bin/javax/swing/text/ParagraphView.js,bin/javax/swing/text/FlowView.js,bin/javax/swing/text/BoxView.js,bin/javax/swing/text/CompositeView.js,bin/javax/swing/text/TabExpander.js,bin/javax/swing/event/PopupMenuListener.js,bin/javax/swing/JViewport.js,bin/javax/swing/text/NavigationFilter.js,bin/javax/swing/event/TreeExpansionListener.js,bin/javax/swing/event/TreeModelListener.js,bin/javax/swing/event/TreeSelectionListener.js,bin/javax/swing/event/CellEditorListener.js,bin/javax/swing/tree/AbstractLayoutCache.js,bin/javax/swing/tree/RowMapper.js,bin/javax/swing/event/TableModelListener.js,bin/javax/swing/event/RowSorterListener.js,bin/javax/swing/table/AbstractTableModel.js,bin/javax/swing/table/TableModel.js,bin/javax/swing/table/TableRowSorter.js,bin/javax/swing/DefaultRowSorter.js,bin/java/lang/Integer.js,bin/java/lang/Number.js,bin/javax/swing/RowSorter.js,bin/java/io/File.js,bin/javax/swing/DefaultCellEditor.js,bin/javax/swing/AbstractCellEditor.js,bin/javax/swing/CellEditor.js,bin/javax/swing/table/TableCellEditor.js,bin/javax/swing/tree/TreeCellEditor.js,bin/javax/swing/plaf/ComponentInputMapUIResource.js,bin/javax/swing/ComponentInputMap.js,bin/javax/swing/InputMap.js,bin/java/util/ListIterator.js,bin/java/util/NavigableSet.js,bin/java/util/SortedSet.js,bin/java/lang/Boolean.js,bin/java/security/PrivilegedExceptionAction.js,bin/java/net/ContentHandler.js,bin/javax/swing/text/SimpleAttributeSet.js,bin/javax/swing/text/MutableAttributeSet.js,bin/javax/swing/text/AttributeSet.js,bin/javax/swing/text/html/MuxingAttributeSet.js,bin/javax/swing/text/Style.js,bin/javax/swing/text/html/CSSParser.js,bin/javax/swing/text/Element.js,bin/javax/swing/undo/CompoundEdit.js,bin/javax/swing/undo/AbstractUndoableEdit.js,bin/javax/swing/undo/UndoableEdit.js,bin/javax/swing/event/DocumentEvent.js,bin/javax/swing/text/DocumentFilter.js,bin/javax/swing/event/CaretListener.js,bin/javax/accessibility/AccessibleEditableText.js,bin/javax/accessibility/AccessibleExtendedText.js,bin/javax/swing/text/Segment.js,bin/javax/swing/text/Keymap.js,bin/javax/swing/ActionMap.js,bin/javax/swing/event/CaretEvent.js,bin/javax/swing/RowFilter.js,bin/sun/awt/AWTAccessor.js,bin/sun/awt/SunToolkit.js,bin/sun/awt/WindowClosingSupport.js,bin/sun/awt/WindowClosingListener.js,bin/sun/awt/ComponentFactory.js,bin/sun/awt/InputMethodSupport.js,bin/sun/awt/ModalityListener.js,bin/java/lang/CloneNotSupportedException.js,bin/java/lang/InterruptedException.js,bin/java/lang/ClassNotFoundException.js,bin/java/io/ObjectStreamException.js,bin/java/lang/NullPointerException.js,bin/java/lang/IllegalArgumentException.js,bin/java/io/StringReader.js,bin/java/util/Locale.js,bin/sun/util/LocaleServiceProviderPool.js,bin/java/util/spi/LocaleNameProvider.js,bin/java/util/spi/LocaleServiceProvider.js,bin/java/lang/StringBuffer.js,bin/java/lang/AbstractStringBuilder.js,bin/java/lang/annotation/Documented.js,bin/java/lang/annotation/package-info.js,bin/java/lang/annotation/Retention.js,bin/java/lang/annotation/Target.js,bin/java/util/HashMap.js,bin/java/lang/Byte.js,bin/java/lang/Short.js,bin/java/lang/Long.js,bin/java/lang/Float.js,bin/java/lang/Double.js,bin/java/lang/Void.js,bin/java/lang/NumberFormatException.js,bin/java/lang/reflect/Array.js,bin/java/lang/NegativeArraySizeException.js,bin/java/lang/reflect/Field.js,bin/sun/reflect/misc/FieldUtil.js,bin/java/lang/NoSuchFieldException.js,bin/sun/reflect/CallerSensitive.js,bin/java/lang/IllegalAccessException.js,bin/java/lang/SuppressWarnings.js,bin/java/lang/reflect/GenericArrayType.js,bin/java/lang/reflect/ParameterizedType.js,bin/java/lang/reflect/TypeVariable.js,bin/sun/reflect/generics/reflectiveObjects/GenericArrayTypeImpl.js,bin/sun/reflect/generics/reflectiveObjects/ParameterizedTypeImpl.js,bin/java/lang/ref/ReferenceQueue.js,bin/java/util/Arrays.js,bin/java/lang/Override.js,bin/sun/reflect/generics/reflectiveObjects/WildcardTypeImpl.js,bin/sun/reflect/generics/reflectiveObjects/LazyReflectiveObjectGenerator.js,bin/java/lang/StringBuilder.js,bin/sun/java2d/pipe/Region.js,bin/java/io/PrintStream.js,bin/java/io/ObjectOutputStream.js,bin/java/io/ObjectOutput.js,bin/java/security/AccessControlContext.js,bin/javax/accessibility/AccessibleStateSet.js,bin/sun/awt/CausedFocusEvent.js,bin/java/lang/System.js,bin/sun/reflect/misc/ReflectUtil.js,bin/java/security/ProtectionDomain.js,bin/sun/reflect/annotation/AnnotationType.js,bin/java/lang/reflect/Constructor.js,bin/sun/reflect/generics/repository/ClassRepository.js,bin/sun/reflect/generics/repository/GenericDeclRepository.js,bin/sun/reflect/generics/tree/ClassSignature.js,bin/sun/reflect/generics/tree/Signature.js,bin/sun/reflect/generics/tree/Tree.js,bin/sun/reflect/generics/repository/AbstractRepository.js,bin/sun/reflect/ReflectionFactory.js,bin/java/io/ObjectStreamField.js,bin/java/lang/SecurityException.js,bin/javax/crypto/BadPaddingException.js,bin/javax/crypto/IllegalBlockSizeException.js,bin/javax/crypto/ShortBufferException.js,bin/java/security/InvalidKeyException.js,bin/java/security/KeyException.js,bin/java/security/AlgorithmParameters.js,bin/java/security/SecureRandom.js,bin/java/util/Random.js,bin/java/security/InvalidAlgorithmParameterException.js,bin/java/security/spec/AlgorithmParameterSpec.js,bin/java/security/NoSuchAlgorithmException.js,bin/javax/crypto/NoSuchPaddingException.js,bin/java/security/InvalidParameterException.js,bin/javax/crypto/spec/SecretKeySpec.js,bin/java/security/spec/KeySpec.js,bin/java/security/spec/InvalidParameterSpecException.js,bin/javax/crypto/spec/IvParameterSpec.js,bin/sun/misc/HexDumpEncoder.js,bin/sun/misc/CharacterEncoder.js,bin/sun/security/util/DerInputStream.js,bin/sun/security/util/DerOutputStream.js,bin/sun/security/util/DerEncoder.js,bin/javax/crypto/spec/RC2ParameterSpec.js,bin/java/security/NoSuchProviderException.js,bin/java/security/KeyFactory.js,bin/java/security/spec/PKCS8EncodedKeySpec.js,bin/java/security/spec/EncodedKeySpec.js,bin/java/security/spec/X509EncodedKeySpec.js,bin/java/security/spec/InvalidKeySpecException.js,bin/java/security/KeyRep.js,bin/javax/crypto/spec/DESKeySpec.js,bin/javax/crypto/SecretKeyFactory.js,bin/javax/crypto/spec/DESedeKeySpec.js,bin/java/security/MessageDigest.js,bin/java/security/MessageDigestSpi.js,bin/java/security/DigestException.js,bin/java/math/BigInteger.js,bin/java/math/package-info.js,bin/sun/security/util/KeyUtil.js,bin/javax/crypto/spec/DHParameterSpec.js,bin/javax/crypto/spec/DHPublicKeySpec.js,bin/javax/crypto/spec/DHPrivateKeySpec.js,bin/javax/crypto/spec/DHGenParameterSpec.js,bin/sun/security/provider/ParameterCache.js,bin/java/security/KeyPair.js,bin/java/security/ProviderException.js,bin/java/lang/Math.js,bin/java/security/KeyPairGenerator.js,bin/java/security/AlgorithmParameterGenerator.js,bin/java/security/spec/DSAParameterSpec.js,bin/java/security/interfaces/DSAParams.js,bin/sun/security/util/DerValue.js,bin/sun/security/util/DerInputBuffer.js,bin/sun/security/util/Debug.js,bin/sun/security/util/ObjectIdentifier.js,bin/sun/security/x509/AlgorithmId.js,bin/java/nio/Buffer.js,bin/javax/crypto/spec/PBEParameterSpec.js,bin/java/security/DigestInputStream.js,bin/java/security/DigestOutputStream.js,bin/java/security/KeyStoreException.js,bin/java/security/UnrecoverableKeyException.js,bin/java/security/UnrecoverableEntryException.js,bin/java/security/cert/Certificate.js,bin/java/security/cert/CertificateFactory.js,bin/java/security/cert/X509Certificate.js,bin/java/security/cert/X509Extension.js,bin/java/security/cert/CertificateException.js,bin/java/util/Date.js,bin/java/io/UnsupportedEncodingException.js,bin/java/io/DataOutputStream.js,bin/java/security/cert/CertificateEncodingException.js,bin/java/lang/OutOfMemoryError.js,bin/java/lang/VirtualMachineError.js,bin/java/nio/charset/Charset.js,bin/java/security/Security.js,bin/javax/crypto/CryptoPermission.js,bin/javax/crypto/ExemptionMechanism.js,bin/javax/crypto/spec/PBEKeySpec.js,bin/java/security/spec/MGF1ParameterSpec.js,bin/javax/crypto/spec/PSource.js,bin/javax/crypto/spec/OAEPParameterSpec.js,bin/java/util/HashSet.js,bin/javax/crypto/Mac.js,bin/sun/security/jca/Providers.js,bin/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.js,bin/sun/security/rsa/RSAPadding.js,bin/java/security/interfaces/RSAPrivateKey.js,bin/java/security/interfaces/RSAKey.js,bin/java/security/interfaces/RSAPublicKey.js,bin/sun/security/jca/ProviderList.js,bin/sun/security/rsa/RSAKeyFactory.js,bin/sun/security/rsa/RSACore.js,bin/java/lang/AssertionError.js,bin/java/security/AccessController.js,bin/java/net/URL.js,bin/java/util/InvalidPropertiesFormatException.js,bin/java/io/StreamCorruptedException.js,bin/java/security/PrivilegedActionException.js,bin/sun/security/internal/spec/TlsKeyMaterialParameterSpec.js,bin/sun/security/internal/spec/TlsKeyMaterialSpec.js,bin/sun/security/internal/spec/TlsMasterSecretParameterSpec.js,bin/sun/security/internal/spec/TlsPrfParameterSpec.js,bin/javax/imageio/IIOException.js,bin/javax/imageio/ImageIO.js,bin/javax/imageio/spi/ServiceRegistry.js,bin/javax/imageio/ImageReadParam.js,bin/javax/imageio/ImageTypeSpecifier.js,bin/javax/imageio/event/IIOReadUpdateListener.js,bin/javax/imageio/event/IIOReadWarningListener.js,bin/javax/imageio/IIOImage.js,bin/java/nio/ByteOrder.js,bin/javax/imageio/spi/IIORegistry.js,bin/javax/imageio/metadata/IIOMetadataNode.js,bin/javax/imageio/metadata/IIOInvalidTreeException.js,bin/javax/imageio/event/IIOWriteWarningListener.js,bin/javax/imageio/plugins/bmp/BMPImageWriteParam.js,bin/javax/imageio/metadata/IIOMetadataController.js,bin/java/lang/ArrayIndexOutOfBoundsException.js,bin/java/util/PropertyResourceBundle.js,bin/javax/imageio/stream/IIOByteBuffer.js,bin/java/io/EOFException.js,bin/javax/imageio/IIOParamController.js,bin/javax/imageio/plugins/jpeg/JPEGHuffmanTable.js,bin/javax/imageio/plugins/jpeg/JPEGQTable.js,bin/javax/imageio/stream/MemoryCacheImageOutputStream.js,bin/java/lang/StackTraceElement.js,bin/java/lang/InternalError.js,bin/javax/imageio/plugins/jpeg/JPEGImageReadParam.js,bin/sun/java2d/Disposer.js,bin/sun/security/action/LoadLibraryAction.js,bin/javax/imageio/plugins/jpeg/JPEGImageWriteParam.js,bin/java/io/SequenceInputStream.js,bin/java/util/zip/Inflater.js,bin/java/util/zip/InflaterInputStream.js,bin/sun/awt/image/ByteInterleavedRaster.js,bin/sun/awt/image/ByteComponentRaster.js,bin/sun/awt/image/SunWritableRaster.js,bin/java/util/zip/ZipException.js,bin/java/util/zip/Deflater.js,bin/java/util/zip/DeflaterOutputStream.js,bin/javax/imageio/stream/FileImageInputStream.js,bin/java/io/FileNotFoundException.js,bin/javax/imageio/stream/FileImageOutputStream.js,bin/javax/imageio/stream/FileCacheImageInputStream.js,bin/javax/imageio/stream/MemoryCacheImageInputStream.js,bin/javax/imageio/stream/FileCacheImageOutputStream.js,bin/java/io/RandomAccessFile.js,bin/java/lang/ThreadGroup.js,bin/java/lang/Runtime.js,bin/java/util/MissingResourceException.js,bin/java/io/InvalidObjectException.js,bin/java/text/AttributedString.js,bin/java/net/URI.js,bin/java/util/zip/ZipFile.js,bin/java/util/zip/ZipConstants.js,bin/sun/security/action/GetPropertyAction.js,bin/java/lang/InstantiationException.js,bin/javax/swing/JSpinner.js,bin/javax/swing/text/DateFormatter.js,bin/javax/swing/text/InternationalFormatter.js,bin/javax/swing/text/DefaultFormatter.js,bin/javax/swing/JFormattedTextField.js,bin/javax/swing/text/NumberFormatter.js,bin/javax/swing/event/ChangeEvent.js,bin/javax/swing/JColorChooser.js,bin/javax/swing/JDialog.js,bin/javax/swing/WindowConstants.js,bin/javax/swing/colorchooser/ColorSelectionModel.js,bin/javax/swing/plaf/PanelUI.js,bin/javax/swing/event/AncestorListener.js,bin/javax/swing/JToolTip.js,bin/javax/swing/KeyStroke.js,bin/javax/swing/AncestorNotifier.js,bin/javax/swing/ArrayTable.js,bin/javax/swing/InputVerifier.js,bin/javax/swing/JRootPane.js,bin/javax/swing/UIManager.js,bin/javax/swing/plaf/ActionMapUIResource.js,bin/javax/swing/SwingUtilities.js,bin/javax/swing/SpinnerNumberModel.js,bin/javax/swing/AbstractSpinnerModel.js,bin/javax/swing/SpinnerModel.js,bin/javax/swing/Box.js,bin/javax/swing/plaf/ColorUIResource.js,bin/sun/swing/ImageCache.js,bin/javax/swing/plaf/synth/SynthContext.js,bin/javax/swing/JScrollBar.js,bin/javax/swing/JSlider.js,bin/javax/swing/JProgressBar.js,bin/javax/swing/JSplitPane.js,bin/java/text/MessageFormat.js,bin/java/text/Format.js,bin/sun/swing/SwingUtilities2.js,bin/sun/swing/DefaultLookup.js,bin/sun/awt/shell/ShellFolder.js,bin/javax/swing/JList.js,bin/javax/swing/JFileChooser.js,bin/javax/swing/JScrollPane.js,bin/javax/swing/event/ListSelectionEvent.js,bin/javax/swing/filechooser/FileSystemView.js,bin/javax/swing/event/ListDataEvent.js,bin/java/util/Collections.js,bin/java/util/AbstractQueue.js,bin/java/util/Queue.js,bin/javax/swing/JOptionPane.js,bin/javax/swing/ListSelectionModel.js,bin/javax/swing/DefaultListSelectionModel.js,bin/java/text/FieldPosition.js,bin/javax/swing/text/BadLocationException.js,bin/java/lang/reflect/InvocationTargetException.js,bin/sun/awt/AppContext.js,bin/sun/awt/ConstrainableGraphics.js,bin/sun/awt/EmbeddedFrame.js,bin/sun/awt/NullComponentPeer.js,bin/sun/awt/dnd/SunDropTargetEvent.js,bin/sun/awt/im/CompositionArea.js,bin/sun/java2d/SunGraphics2D.js,bin/sun/java2d/DestSurfaceProvider.js,bin/sun/awt/image/VSyncedBSManager.js,bin/sun/java2d/SunGraphicsEnvironment.js,bin/sun/java2d/FontSupport.js,bin/sun/awt/DisplayChangedListener.js,bin/javax/swing/BoxLayout.js,bin/javax/swing/table/JTableHeader.js,bin/javax/swing/event/TableColumnModelListener.js,bin/javax/swing/JTable.js,bin/javax/swing/JCheckBox.js,bin/javax/swing/JToggleButton.js,bin/javax/accessibility/AccessibleExtendedTable.js,bin/javax/accessibility/AccessibleTable.js,bin/javax/accessibility/AccessibleTableModelChange.js,bin/javax/swing/DefaultButtonModel.js,bin/javax/swing/ButtonModel.js,bin/javax/swing/BoundedRangeModel.js,bin/javax/swing/DropMode.js,bin/javax/print/PrintService.js,bin/javax/print/attribute/PrintRequestAttributeSet.js,bin/javax/print/attribute/AttributeSet.js,bin/java/util/LinkedList.js,bin/java/util/AbstractSequentialList.js,bin/java/util/Deque.js,bin/java/util/logging/Level.js,bin/java/util/logging/Logger.js,bin/sun/awt/HeadlessToolkit.js,bin/javax/swing/plaf/synth/SynthMenuItemLayoutHelper.js,bin/sun/swing/MenuItemLayoutHelper.js,bin/java/lang/NoSuchMethodException.js,bin/javax/swing/text/DefaultEditorKit.js,bin/javax/swing/text/EditorKit.js,bin/sun/awt/OSInfo.js,bin/java/text/ParseException.js,bin/sun/swing/SwingLazyValue.js,bin/javax/swing/plaf/InsetsUIResource.js,bin/javax/swing/plaf/DimensionUIResource.js,bin/javax/swing/JTabbedPane.js,bin/javax/swing/plaf/FontUIResource.js,bin/javax/swing/ImageIcon.js,bin/javax/accessibility/AccessibleIcon.js,bin/javax/swing/JInternalFrame.js,bin/java/io/FileSystem.js,bin/java/net/MalformedURLException.js,bin/java/io/InputStreamReader.js,bin/java/util/NoSuchElementException.js,bin/sun/font/FontManager.js,bin/javax/swing/plaf/basic/LazyActionMap.js,bin/javax/swing/JMenuItem.js,bin/javax/swing/MenuSelectionManager.js,bin/javax/swing/event/MenuKeyEvent.js,bin/javax/swing/Popup.js,bin/sun/awt/ModalExclude.js,bin/javax/swing/SingleSelectionModel.js,bin/javax/swing/CellRendererPane.js,bin/javax/swing/JDesktopPane.js,bin/javax/swing/JLayeredPane.js,bin/javax/swing/text/Position.js,bin/javax/swing/JMenu.js,bin/javax/swing/event/InternalFrameEvent.js,bin/javax/swing/BorderFactory.js,bin/javax/swing/border/BevelBorder.js,bin/javax/swing/plaf/basic/BasicBorders.js,bin/javax/swing/plaf/BorderUIResource.js,bin/javax/swing/border/CompoundBorder.js,bin/javax/swing/border/EtchedBorder.js,bin/javax/swing/border/MatteBorder.js,bin/javax/swing/border/TitledBorder.js,bin/javax/swing/event/MenuListener.js,bin/javax/swing/JTree.js,bin/javax/swing/Timer.js,bin/javax/swing/plaf/IconUIResource.js,bin/javax/swing/tree/TreePath.js,bin/javax/swing/tree/TreeModel.js,bin/sun/awt/SunHints.js,bin/java/util/LinkedHashMap.js,bin/java/util/concurrent/locks/ReadWriteLock.js,bin/java/util/concurrent/locks/package-info.js,bin/java/util/concurrent/locks/ReentrantReadWriteLock.js,bin/java/util/concurrent/locks/AbstractQueuedSynchronizer.js,bin/java/util/concurrent/locks/AbstractOwnableSynchronizer.js,bin/java/lang/ThreadLocal.js,bin/java/util/concurrent/locks/Lock.js,bin/java/util/concurrent/locks/Condition.js,bin/javax/swing/GrayFilter.js,bin/sun/swing/ImageIconUIResource.js,bin/sun/swing/plaf/GTKKeybindings.js,bin/sun/swing/plaf/WindowsKeybindings.js,bin/sun/security/action/GetBooleanAction.js,bin/java/util/EnumMap.js,bin/java/lang/Package.js,bin/javax/swing/plaf/basic/BasicGraphicsUtils.js,bin/javax/swing/JRadioButton.js,bin/sun/swing/StringUIClientPropertyKey.js,bin/sun/swing/WindowsPlacesBar.js,bin/javax/swing/ButtonGroup.js,bin/javax/swing/JRadioButtonMenuItem.js,bin/javax/swing/event/PopupMenuEvent.js,bin/javax/swing/JCheckBoxMenuItem.js,bin/javax/swing/PopupFactory.js,bin/javax/swing/SwingHeavyWeight.js,bin/sun/awt/util/IdentityArrayList.js,bin/javax/swing/JFrame.js,bin/javax/swing/plaf/InputMapUIResource.js,bin/javax/swing/table/TableColumn.js,bin/javax/swing/SortOrder.js,bin/java/lang/StringIndexOutOfBoundsException.js,bin/java/util/logging/LogRecord.js,bin/java/util/logging/Handler.js,bin/java/util/logging/Filter.js,bin/java/util/logging/LogManager.js,bin/java/io/FileOutputStream.js,bin/java/lang/reflect/Modifier.js,bin/java/io/FileInputStream.js,bin/java/util/jar/JarFile.js,bin/java/util/jar/JarEntry.js,bin/java/util/zip/ZipEntry.js,bin/java/util/zip/GZIPOutputStream.js,bin/java/util/jar/JarInputStream.js,bin/java/util/zip/ZipInputStream.js,bin/java/util/zip/GZIPInputStream.js,bin/java/util/jar/JarOutputStream.js,bin/java/util/zip/ZipOutputStream.js,bin/java/util/jar/Manifest.js,bin/sun/misc/IOUtils.js,bin/java/util/zip/CRC32.js,bin/java/util/zip/Checksum.js,bin/java/util/TimeZone.js,bin/java/util/zip/CheckedOutputStream.js,bin/java/security/Permissions.js,bin/java/lang/SecurityManager.js,bin/java/lang/Process.js,bin/java/lang/NoClassDefFoundError.js,bin/java/lang/LinkageError.js,bin/java/lang/VerifyError.js,bin/java/lang/ClassFormatError.js,bin/java/lang/ClassCircularityError.js,bin/java/lang/UnsupportedClassVersionError.js,bin/java/lang/IllegalThreadStateException.js,bin/java/util/ConcurrentModificationException.js,bin/java/io/StringWriter.js,bin/javax/management/Attribute.js,bin/javax/management/AttributeList.js,bin/javax/management/AttributeNotFoundException.js,bin/javax/management/OperationsException.js,bin/javax/management/JMException.js,bin/javax/management/InstanceAlreadyExistsException.js,bin/javax/management/InstanceNotFoundException.js,bin/javax/management/IntrospectionException.js,bin/javax/management/InvalidAttributeValueException.js,bin/javax/management/ListenerNotFoundException.js,bin/javax/management/MalformedObjectNameException.js,bin/javax/management/MBeanException.js,bin/javax/management/MBeanPermission.js,bin/javax/management/MBeanRegistrationException.js,bin/javax/management/MBeanServerNotification.js,bin/javax/management/MBeanTrustPermission.js,bin/javax/management/NotCompliantMBeanException.js,bin/javax/management/NotificationFilter.js,bin/javax/management/ObjectInstance.js,bin/javax/management/ObjectName.js,bin/javax/management/ReflectionException.js,bin/javax/management/RuntimeErrorException.js,bin/javax/management/RuntimeMBeanException.js,bin/javax/management/RuntimeOperationsException.js,bin/javax/management/BadStringOperationException.js,bin/javax/management/BadBinaryOpValueExpException.js,bin/javax/management/BadAttributeValueExpException.js,bin/javax/management/InvalidApplicationException.js,bin/javax/management/MBeanAttributeInfo.js,bin/javax/management/MBeanFeatureInfo.js,bin/javax/management/MBeanNotificationInfo.js,bin/javax/management/loading/PrivateClassLoader.js,bin/javax/management/Descriptor.js,bin/javax/management/openmbean/OpenDataException.js,bin/sun/reflect/misc/MethodUtil.js,bin/java/security/SecureClassLoader.js,bin/javax/management/ImmutableDescriptor.js,bin/javax/management/JMX.js,bin/java/lang/reflect/UndeclaredThrowableException.js,bin/javax/management/DescriptorKey.js,bin/javax/management/MBeanServerPermission.js,bin/javax/management/MBeanServerFactory.js,bin/sun/reflect/misc/ConstructorUtil.js,bin/java/lang/NoSuchMethodError.js,bin/java/lang/IncompatibleClassChangeError.js,bin/javax/management/MBeanConstructorInfo.js,bin/javax/management/MBeanOperationInfo.js,bin/javax/management/MBeanParameterInfo.js,bin/javax/management/openmbean/OpenMBeanAttributeInfoSupport.js,bin/javax/management/openmbean/OpenMBeanAttributeInfo.js,bin/javax/management/openmbean/OpenMBeanParameterInfo.js,bin/javax/management/openmbean/OpenMBeanOperationInfoSupport.js,bin/javax/management/openmbean/OpenMBeanOperationInfo.js,bin/javax/management/openmbean/OpenMBeanParameterInfoSupport.js,bin/java/lang/reflect/Proxy.js,bin/javax/management/MBeanServerInvocationHandler.js,bin/java/io/ObjectStreamClass.js,bin/java/io/NotActiveException.js,bin/java/util/BitSet.js,bin/java/util/TreeSet.js,bin/javax/management/openmbean/ArrayType.js,bin/javax/management/openmbean/CompositeDataInvocationHandler.js,bin/javax/management/openmbean/CompositeDataSupport.js,bin/javax/management/openmbean/CompositeType.js,bin/javax/management/openmbean/TabularData.js,bin/javax/management/openmbean/TabularDataSupport.js,bin/javax/management/openmbean/TabularType.js,bin/java/math/BigDecimal.js,bin/java/util/IdentityHashMap.js,bin/javax/management/NotificationBroadcasterSupport.js,bin/javax/management/NotificationFilterSupport.js,bin/javax/management/remote/NotificationResult.js,bin/javax/management/remote/TargetedNotification.js,bin/java/io/InterruptedIOException.js,bin/javax/security/auth/Subject.js,bin/java/io/NotSerializableException.js,bin/sun/nio/ch/Interruptible.js,bin/java/rmi/RemoteException.js,bin/java/rmi/server/Operation.js,bin/java/rmi/server/RemoteCall.js,bin/java/rmi/NoSuchObjectException.js,bin/java/rmi/server/RMIClientSocketFactory.js,bin/java/rmi/server/RMIServerSocketFactory.js,bin/java/rmi/server/RemoteStub.js,bin/sun/rmi/server/UnicastServerRef.js,bin/sun/rmi/server/UnicastRef.js,bin/java/rmi/server/ServerRef.js,bin/sun/rmi/server/Dispatcher.js,bin/sun/rmi/server/WeakClassHashMap.js,bin/java/lang/ClassCastException.js,bin/java/rmi/MarshalledObject.js,bin/sun/rmi/server/MarshalOutputStream.js,bin/sun/rmi/server/MarshalInputStream.js,bin/javax/management/remote/JMXConnector.js,bin/javax/management/remote/JMXServiceURL.js,bin/javax/management/remote/rmi/RMIConnector.js,bin/javax/management/remote/JMXAddressable.js,bin/javax/management/remote/rmi/RMIServer.js,bin/javax/management/remote/JMXConnectorServer.js,bin/javax/management/remote/JMXConnectorServerMBean.js,bin/javax/management/remote/rmi/RMIConnectorServer.js,bin/javax/management/remote/rmi/RMIServerImpl.js,bin/java/io/FilePermission.js,bin/java/security/AccessControlException.js,bin/javax/management/remote/JMXPrincipal.js,bin/sun/management/jmxremote/ConnectorBootstrap.js,bin/sun/management/AgentConfigurationError.js,bin/javax/security/auth/login/LoginException.js,bin/java/net/InetAddress.js,bin/java/net/UnknownHostException.js,bin/java/rmi/registry/Registry.js,bin/java/lang/management/ManagementFactory.js,bin/javax/management/remote/JMXConnectorServerFactory.js,bin/javax/rmi/ssl/SslRMIClientSocketFactory.js,bin/javax/rmi/ssl/SslRMIServerSocketFactory.js,bin/sun/rmi/server/UnicastServerRef2.js,bin/sun/management/Agent.js,bin/sun/management/FileSystem.js,bin/javax/security/auth/login/FailedLoginException.js,bin/javax/security/auth/callback/Callback.js,bin/javax/security/auth/callback/NameCallback.js,bin/javax/security/auth/callback/PasswordCallback.js,bin/javax/security/auth/callback/UnsupportedCallbackException.js,bin/javax/security/auth/AuthPermission.js,bin/javax/security/auth/login/AppConfigurationEntry.js,bin/javax/security/auth/login/LoginContext.js,bin/java/security/CodeSigner.js,bin/java/util/regex/Pattern.js,bin/javax/management/remote/SubjectDelegationPermission.js,bin/sun/misc/URLClassPath.js,bin/java/lang/AssertionStatusDirectives.js,bin/javax/management/remote/JMXConnectorFactory.js,bin/java/lang/ArithmeticException.js,bin/java/security/acl/NotOwnerException.js,bin/java/security/acl/LastOwnerException.js,bin/java/util/Stack.js,bin/java/util/EmptyStackException.js,bin/javax/management/ServiceNotFoundException.js,bin/javax/management/AttributeChangeNotification.js,bin/java/net/DatagramSocket.js,bin/java/net/DatagramPacket.js,bin/java/net/SocketException.js,bin/java/net/DatagramSocketImpl.js,bin/java/net/SocketOptions.js,bin/java/net/SocketAddress.js,bin/javax/naming/spi/NamingManager.js,bin/javax/naming/CannotProceedException.js,bin/javax/naming/ConfigurationException.js,bin/javax/naming/InvalidNameException.js,bin/javax/naming/CommunicationException.js,bin/javax/naming/CompositeName.js,bin/javax/naming/NotContextException.js,bin/javax/naming/Reference.js,bin/javax/naming/RefAddr.js,bin/javax/naming/NameNotFoundException.js,bin/javax/naming/OperationNotSupportedException.js,bin/javax/naming/NameAlreadyBoundException.js,bin/javax/naming/ContextNotEmptyException.js,bin/java/rmi/server/ExportException.js,bin/java/net/Socket.js,bin/sun/security/jca/JCAUtil.js,bin/javax/naming/ServiceUnavailableException.js,bin/java/net/Proxy.js,bin/java/net/SocketImpl.js,bin/javax/naming/spi/DirectoryManager.js,bin/javax/naming/directory/InvalidAttributeIdentifierException.js,bin/javax/naming/directory/Attributes.js,bin/javax/naming/directory/ModificationItem.js,bin/javax/naming/directory/SearchControls.js,bin/javax/naming/directory/BasicAttributes.js,bin/sun/net/dns/ResolverConfiguration.js,bin/javax/net/SocketFactory.js,bin/javax/naming/InterruptedNamingException.js,bin/javax/naming/ldap/SortResponseControl.js,bin/javax/naming/ldap/BasicControl.js,bin/javax/naming/ldap/PagedResultsResponseControl.js,bin/javax/naming/event/NamingEvent.js,bin/javax/naming/event/NamingExceptionEvent.js,bin/javax/naming/event/NamingListener.js,bin/javax/naming/ldap/UnsolicitedNotificationEvent.js,bin/javax/naming/ldap/UnsolicitedNotificationListener.js,bin/javax/naming/event/ObjectChangeListener.js,bin/javax/naming/event/NamespaceChangeListener.js,bin/javax/naming/directory/InvalidSearchFilterException.js,bin/javax/naming/InitialContext.js,bin/javax/naming/directory/InitialDirContext.js,bin/javax/naming/NoInitialContextException.js,bin/javax/naming/AuthenticationNotSupportedException.js,bin/javax/naming/NamingSecurityException.js,bin/javax/naming/AuthenticationException.js,bin/javax/naming/directory/InvalidAttributeValueException.js,bin/javax/naming/ldap/LdapName.js,bin/javax/naming/ldap/Rdn.js,bin/javax/naming/ldap/ExtendedRequest.js,bin/javax/naming/directory/SchemaViolationException.js,bin/javax/naming/PartialResultException.js,bin/javax/naming/LimitExceededException.js,bin/javax/naming/directory/AttributeInUseException.js,bin/javax/naming/NoPermissionException.js,bin/javax/naming/directory/NoSuchAttributeException.js,bin/javax/naming/SizeLimitExceededException.js,bin/javax/naming/TimeLimitExceededException.js,bin/javax/naming/StringRefAddr.js,bin/javax/naming/spi/DirStateFactory.js,bin/sun/misc/BASE64Encoder.js,bin/sun/misc/BASE64Decoder.js,bin/sun/misc/CharacterDecoder.js,bin/java/lang/IllegalAccessError.js,bin/javax/naming/directory/InvalidAttributesException.js,bin/java/net/URLClassLoader.js,bin/sun/misc/SharedSecrets.js,bin/sun/misc/JavaLangAccess.js,bin/javax/security/auth/kerberos/KerberosPrincipal.js,bin/javax/net/ssl/SSLSession.js,bin/javax/net/ssl/SSLSocket.js,bin/javax/net/ssl/SSLSocketFactory.js,bin/javax/net/ssl/SSLPeerUnverifiedException.js,bin/javax/net/ssl/SSLException.js,bin/javax/net/ssl/SSLContext.js,bin/sun/security/util/HostnameChecker.js,bin/java/lang/AbstractMethodError.js,bin/javax/naming/ldap/StartTlsRequest.js,bin/javax/security/sasl/RealmCallback.js,bin/javax/security/auth/callback/TextInputCallback.js,bin/javax/security/sasl/RealmChoiceCallback.js,bin/javax/security/auth/callback/ChoiceCallback.js,bin/javax/security/sasl/Sasl.js,bin/javax/security/sasl/SaslException.js,bin/java/rmi/server/ServerNotActiveException.js,bin/java/rmi/registry/LocateRegistry.js,bin/java/rmi/NotBoundException.js,bin/java/rmi/AccessException.js,bin/java/rmi/AlreadyBoundException.js,bin/java/rmi/ConnectException.js,bin/java/rmi/StubNotFoundException.js,bin/java/rmi/UnknownHostException.js,bin/java/rmi/server/SocketSecurityException.js,bin/java/rmi/ConnectIOException.js,bin/java/rmi/MarshalException.js,bin/java/rmi/UnmarshalException.js,bin/java/rmi/ServerException.js,bin/java/rmi/RMISecurityManager.js,bin/javax/naming/LinkRef.js,bin/javax/naming/directory/AttributeModificationException.js,bin/java/lang/management/MemoryUsage.js,bin/sun/management/GcInfoCompositeData.js,bin/sun/management/LazyCompositeData.js,bin/sun/management/GcInfoBuilder.js,bin/sun/management/VMOptionCompositeData.js,bin/javax/sound/sampled/AudioFormat.js,bin/javax/sound/sampled/AudioSystem.js,bin/javax/sound/sampled/LineEvent.js,bin/javax/sound/sampled/LineUnavailableException.js,bin/javax/sound/midi/MidiUnavailableException.js,bin/javax/sound/midi/InvalidMidiDataException.js,bin/javax/sound/sampled/UnsupportedAudioFileException.js,bin/javax/sound/midi/ControllerEventListener.js,bin/javax/sound/midi/MetaMessage.js,bin/javax/sound/sampled/AudioPermission.js,bin/sun/misc/Service.js,bin/sun/misc/ServiceConfigurationError.js,bin/javax/sound/midi/MidiSystem.js,bin/javax/sound/midi/MidiFileFormat.js,bin/javax/sound/midi/Sequence.js,bin/javax/sound/midi/Track.js,bin/javax/sound/midi/MidiEvent.js,bin/javax/sound/sampled/EnumControl.js,bin/java/util/prefs/BackingStoreException.js,bin/java/util/prefs/Preferences.js,bin/java/io/FileFilter.js,bin/java/io/PipedInputStream.js,bin/java/io/PipedOutputStream.js,bin/sun/net/www/MessageHeader.js,bin/java/net/InetSocketAddress.js,bin/java/net/BindException.js,bin/javax/net/ssl/SSLParameters.js,bin/java/lang/RuntimePermission.js,bin/sun/net/httpserver/DefaultHttpServerProvider.js,bin/java/net/ProtocolException.js,bin/java/net/UnknownServiceException.js,bin/java/net/FileNameMap.js,bin/java/net/ContentHandlerFactory.js,bin/javax/net/ssl/HttpsURLConnection.js,bin/javax/net/ssl/KeyManagerFactory.js,bin/javax/net/ssl/KeyManagerFactorySpi.js,bin/sun/security/ssl/SSLSocketFactoryImpl.js,bin/sun/security/ssl/SSLServerSocketFactoryImpl.js,bin/javax/net/ssl/SSLServerSocketFactory.js,bin/javax/net/ServerSocketFactory.js,bin/java/security/KeyManagementException.js,bin/javax/net/ssl/SSLContextSpi.js,bin/javax/net/ssl/SSLPermission.js,bin/javax/net/ssl/TrustManagerFactory.js,bin/javax/net/ssl/SSLEngine.js,bin/javax/net/ssl/ManagerFactoryParameters.js,bin/javax/net/ssl/TrustManagerFactorySpi.js,bin/javax/security/auth/x500/X500Principal.js,bin/sun/security/x509/X500Name.js,bin/sun/security/x509/GeneralNameInterface.js,bin/sun/net/www/http/HttpClient.js,bin/sun/net/NetworkClient.js,bin/sun/net/www/protocol/http/AuthenticationHeader.js,bin/sun/net/www/protocol/http/AuthenticationInfo.js,bin/sun/net/www/protocol/http/AuthCacheValue.js,bin/java/net/Authenticator.js,bin/java/net/PasswordAuthentication.js,bin/sun/net/www/protocol/http/HttpAuthenticator.js,bin/java/security/cert/CertificateParsingException.js,bin/java/util/concurrent/ConcurrentHashMap.js,bin/java/util/concurrent/ConcurrentMap.js,bin/java/util/concurrent/locks/ReentrantLock.js,bin/java/security/Signature.js,bin/java/security/SignatureSpi.js,bin/java/security/SignatureException.js,bin/sun/security/jca/GetInstance.js,bin/java/net/URISyntaxException.js,bin/java/security/interfaces/DSAPublicKey.js,bin/java/security/interfaces/DSAKey.js,bin/java/security/spec/DSAPublicKeySpec.js,bin/java/security/spec/RSAPublicKeySpec.js,bin/java/util/concurrent/CopyOnWriteArrayList.js,bin/java/security/cert/CertificateExpiredException.js,bin/java/security/cert/CertificateNotYetValidException.js,bin/java/security/SecurityPermission.js,bin/java/util/concurrent/atomic/AtomicInteger.js,bin/java/util/concurrent/atomic/package-info.js,bin/java/sql/ResultSetMetaData.js,bin/javax/sql/rowset/RowSetMetaDataImpl.js,bin/javax/sql/RowSetMetaData.js,bin/java/sql/Connection.js,bin/javax/sql/rowset/RowSetWarning.js,bin/java/sql/SQLException.js,bin/java/sql/SQLWarning.js,bin/javax/sql/rowset/spi/SyncProviderException.js,bin/java/sql/Array.js,bin/java/sql/Blob.js,bin/java/sql/Clob.js,bin/java/sql/Date.js,bin/java/util/Calendar.js,bin/java/sql/NClob.js,bin/java/sql/Ref.js,bin/java/sql/RowId.js,bin/java/sql/SQLXML.js,bin/java/sql/Statement.js,bin/java/sql/Time.js,bin/java/sql/Timestamp.js,bin/java/sql/Savepoint.js,bin/javax/sql/RowSetEvent.js,bin/javax/sql/RowSetListener.js,bin/javax/sql/rowset/spi/SyncFactory.js,bin/javax/sql/rowset/spi/SyncFactoryException.js,bin/java/sql/Struct.js,bin/javax/sql/rowset/serial/SerialStruct.js,bin/javax/sql/rowset/serial/SerialException.js,bin/java/sql/SQLData.js,bin/javax/sql/rowset/serial/SerialBlob.js,bin/javax/sql/rowset/serial/SerialClob.js,bin/javax/sql/rowset/serial/SerialArray.js,bin/java/sql/DatabaseMetaData.js,bin/java/io/OptionalDataException.js,bin/java/math/MathContext.js,bin/java/math/RoundingMode.js,bin/java/sql/Types.js,bin/java/text/DateFormat.js,bin/java/text/spi/DateFormatProvider.js,bin/java/text/ParsePosition.js,bin/java/io/StringBufferInputStream.js,bin/javax/sql/rowset/serial/SQLInputImpl.js,bin/java/sql/SQLInput.js,bin/javax/sql/rowset/serial/SerialRef.js,bin/java/sql/SQLFeatureNotSupportedException.js,bin/java/sql/SQLNonTransientException.js,bin/javax/sql/rowset/Predicate.js,bin/java/sql/PreparedStatement.js,bin/java/sql/ParameterMetaData.js,bin/javax/sql/DataSource.js,bin/javax/sql/CommonDataSource.js,bin/java/sql/DriverManager.js,bin/java/io/OutputStreamWriter.js,bin/javax/script/ScriptContext.js,bin/sun/misc/FloatingDecimal.js,bin/sun/misc/FpUtils.js,bin/sun/misc/FloatConsts.js,bin/sun/misc/DoubleConsts.js,bin/javax/script/ScriptException.js,bin/java/security/AllPermission.js,bin/javax/script/SimpleBindings.js,bin/javax/script/SimpleScriptContext.js,bin/sun/security/util/ResourcesMgr.js,bin/java/security/Identity.js,bin/java/security/IdentityScope.js,bin/java/security/UnresolvedPermission.js,bin/javax/security/auth/PrivateCredentialPermission.js,bin/sun/security/util/PropertyExpander.js,bin/java/security/Policy.js,bin/java/net/SocketPermission.js,bin/java/io/StreamTokenizer.js,bin/java/io/FileReader.js,bin/java/io/FileWriter.js,bin/sun/security/provider/PolicyParser.js,bin/javax/security/auth/callback/ConfirmationCallback.js,bin/javax/security/auth/callback/TextOutputCallback.js,bin/javax/swing/JPasswordField.js,bin/java/io/PushbackInputStream.js,bin/sun/security/util/Password.js,bin/sun/security/util/AuthResources.js,bin/java/security/AuthProvider.js,bin/javax/security/auth/DestroyFailedException.js,bin/java/security/cert/CertPath.js,bin/javax/security/auth/x500/X500PrivateCredential.js,bin/sun/security/krb5/Config.js,bin/sun/security/krb5/RealmException.js,bin/sun/security/krb5/KrbException.js,bin/sun/security/jgss/krb5/Krb5Util.js,bin/sun/security/krb5/Credentials.js,bin/sun/security/krb5/EncryptionKey.js,bin/javax/security/auth/kerberos/KerberosKey.js,bin/javax/security/auth/kerberos/KerberosTicket.js,bin/javax/security/auth/Refreshable.js,bin/sun/security/krb5/PrincipalName.js,bin/sun/security/krb5/Asn1Exception.js,bin/javax/security/auth/RefreshFailedException.js,bin/java/util/regex/Matcher.js,bin/java/util/regex/MatchResult.js,bin/javax/naming/ldap/InitialLdapContext.js,bin/javax/security/cert/CertificateException.js,bin/javax/security/cert/CertificateExpiredException.js,bin/javax/security/cert/CertificateNotYetValidException.js,bin/javax/security/cert/CertificateEncodingException.js,bin/org/ietf/jgss/GSSName.js,bin/org/ietf/jgss/GSSCredential.js,bin/sun/security/jgss/GSSUtil.js,bin/javax/security/sasl/AuthorizeCallback.js,bin/org/ietf/jgss/Oid.js,bin/org/ietf/jgss/MessageProp.js,bin/org/ietf/jgss/GSSContext.js,bin/org/ietf/jgss/GSSException.js,bin/org/ietf/jgss/GSSManager.js,bin/java/util/ServiceLoader.js,bin/java/lang/ThreadDeath.js,bin/java/lang/ArrayStoreException.js,bin/javax/swing/tree/DefaultTreeModel.js,bin/javax/swing/UnsupportedLookAndFeelException.js,bin/javax/swing/event/TreeSelectionEvent.js,bin/javax/swing/DefaultListModel.js,bin/javax/swing/JTextArea.js,bin/java/text/NumberFormat.js,bin/java/text/spi/NumberFormatProvider.js,bin/java/util/jar/Attributes.js,bin/java/net/JarURLConnection.js,bin/sun/net/www/ParseUtil.js,bin/sun/misc/ASCIICaseInsensitiveComparator.js,bin/java/nio/channels/FileChannel.js,bin/java/nio/channels/spi/AbstractInterruptibleChannel.js,bin/java/nio/channels/Channel.js,bin/java/nio/channels/InterruptibleChannel.js,bin/java/nio/channels/ByteChannel.js,bin/java/nio/channels/ReadableByteChannel.js,bin/java/nio/channels/WritableByteChannel.js,bin/java/nio/channels/GatheringByteChannel.js,bin/java/nio/channels/ScatteringByteChannel.js,bin/java/nio/MappedByteBuffer.js,bin/java/net/URLDecoder.js,bin/java/net/URLEncoder.js,bin/java/net/ServerSocket.js,bin/javax/swing/event/SwingPropertyChangeSupport.js,bin/javax/swing/SwingWorker.js,bin/java/util/concurrent/RunnableFuture.js,bin/java/util/concurrent/Future.js,bin/sun/swing/AccumulativeRunnable.js,bin/java/util/concurrent/FutureTask.js,bin/java/lang/UnsatisfiedLinkError.js,bin/java/net/Inet6Address.js,bin/java/net/SocketTimeoutException.js,bin/javax/script/ScriptEngineManager.js,bin/javax/accessibility/AccessibleRole.js,bin/javax/accessibility/AccessibleBundle.js,bin/javax/accessibility/AccessibleRelationSet.js,bin/javax/accessibility/AccessibleState.js,bin/sun/applet/AppletAudioClip.js,bin/javax/swing/event/EventListenerList.js,bin/java/lang/ExceptionInInitializerError.js,bin/sun/java2d/SunCompositeContext.js,bin/sun/java2d/pipe/RenderingEngine.js,bin/sun/awt/image/IntegerComponentRaster.js,bin/javax/swing/BufferStrategyPaintManager.js,bin/javax/swing/RepaintManager.js,bin/sun/font/FontDesignMetrics.js,bin/sun/awt/im/InputContext.js,bin/sun/awt/PeerEvent.js,bin/sun/awt/dnd/SunDropTargetContextPeer.js,bin/sun/awt/DesktopBrowse.js,bin/java/util/concurrent/atomic/AtomicLong.js,bin/sun/awt/util/IdentityLinkedList.js,bin/sun/awt/AWTAutoShutdown.js,bin/sun/awt/dnd/SunDragSourceContextPeer.js,bin/sun/misc/JavaSecurityAccess.js,bin/java/text/StringCharacterIterator.js,bin/sun/font/StandardGlyphVector.js,bin/sun/font/AttributeMap.js,bin/sun/font/AttributeValues.js,bin/sun/font/CompositeFont.js,bin/sun/font/Font2D.js,bin/sun/font/CreatedFontTracker.js,bin/sun/font/Font2DHandle.js,bin/sun/font/GlyphLayout.js,bin/sun/font/FontLineMetrics.js,bin/sun/font/CoreMetrics.js,bin/java/text/Bidi.js,bin/java/text/Annotation.js,bin/sun/awt/image/SunVolatileImage.js,bin/sun/java2d/pipe/hw/AccelSurface.js,bin/sun/java2d/pipe/hw/BufferedContextProvider.js,bin/sun/java2d/Surface.js,bin/sun/java2d/HeadlessGraphicsEnvironment.js,bin/sun/awt/image/SurfaceManager.js,bin/sun/awt/geom/Crossings.js,bin/sun/awt/ScrollPaneWheelScroller.js,bin/java/text/BreakIterator.js,bin/java/text/spi/BreakIteratorProvider.js,bin/javax/accessibility/AccessibleTextSequence.js,bin/sun/awt/image/IntegerInterleavedRaster.js,bin/sun/awt/UngrabEvent.js,bin/java/lang/Compiler.js,bin/java/util/concurrent/atomic/AtomicBoolean.js,bin/sun/java2d/cmm/PCMM.js,bin/sun/java2d/cmm/CMSManager.js,bin/sun/java2d/cmm/ColorTransform.js,bin/sun/java2d/cmm/ProfileDeferralMgr.js,bin/sun/java2d/cmm/ProfileDeferralInfo.js,bin/sun/java2d/cmm/ProfileActivator.js,bin/sun/awt/EventListenerAggregate.js,bin/java/util/TooManyListenersException.js,bin/sun/security/action/GetIntegerAction.js,bin/sun/awt/datatransfer/TransferableProxy.js,bin/sun/font/Decoration.js,bin/sun/font/FontResolver.js,bin/sun/text/CodePointIterator.js,bin/sun/font/GraphicComponent.js,bin/sun/font/TextLineComponent.js,bin/sun/font/LayoutPathImpl.js,bin/sun/awt/geom/Curve.js,bin/sun/font/BidiUtils.js,bin/sun/font/TextLabelFactory.js,bin/sun/font/ExtendedTextLabel.js,bin/sun/font/TextLabel.js,bin/sun/awt/geom/AreaOp.js,bin/sun/awt/im/InputMethodContext.js,bin/sun/awt/image/ImagingLib.js,bin/sun/awt/image/BytePackedRaster.js,bin/sun/awt/image/ShortComponentRaster.js,bin/sun/awt/image/OffScreenImageSource.js,bin/sun/java2d/StateTrackableDelegate.js,bin/sun/awt/image/BufImgSurfaceData.js,bin/sun/java2d/SurfaceData.js,bin/sun/java2d/DisposerTarget.js,bin/sun/awt/image/ShortInterleavedRaster.js,bin/sun/awt/image/ByteBandedRaster.js,bin/sun/awt/image/ShortBandedRaster.js,bin/javax/print/DocFlavor.js,bin/javax/print/PrintServiceLookup.js,bin/javax/print/StreamPrintServiceFactory.js,bin/javax/print/attribute/standard/Media.js,bin/javax/print/attribute/EnumSyntax.js,bin/javax/print/attribute/DocAttribute.js,bin/javax/print/attribute/Attribute.js,bin/javax/print/attribute/PrintRequestAttribute.js,bin/javax/print/attribute/PrintJobAttribute.js,bin/javax/print/attribute/standard/MediaPrintableArea.js,bin/javax/print/attribute/standard/MediaSize.js,bin/javax/print/attribute/Size2DSyntax.js,bin/javax/print/attribute/standard/MediaSizeName.js,bin/javax/print/attribute/standard/OrientationRequested.js,bin/sun/swing/PrintColorUIResource.js,bin/java/util/EnumSet.js,bin/javax/swing/DefaultComboBoxModel.js,bin/javax/swing/MutableComboBoxModel.js,bin/javax/swing/ToolTipManager.js,bin/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.js,bin/java/io/LineNumberReader.js,bin/java/util/PropertyPermission.js,bin/java/net/NetPermission.js,bin/sun/java2d/StateTracker.js,bin/java/lang/IllegalMonitorStateException.js,bin/java/io/InvalidClassException.js,bin/java/lang/TypeNotPresentException.js,bin/java/lang/reflect/MalformedParameterizedTypeException.js,bin/javax/crypto/KeyGenerator.js,bin/java/security/Signer.js,bin/java/security/Certificate.js,bin/java/security/interfaces/DSAPrivateKey.js,bin/java/security/interfaces/RSAPrivateCrtKey.js,bin/javax/net/ssl/KeyStoreBuilderParameters.js,bin/javax/crypto/JceSecurityManager.js,bin/javax/crypto/CryptoAllPermission.js,bin/sun/security/jca/ServiceId.js,bin/javax/crypto/JceSecurity.js,bin/javax/crypto/NullCipher.js,bin/javax/crypto/ExemptionMechanismException.js,bin/javax/crypto/spec/RC5ParameterSpec.js,bin/java/security/cert/CertStoreParameters.js,bin/java/util/LinkedHashSet.js,bin/java/util/XMLUtils.js,bin/javax/imageio/spi/ImageTranscoderSpi.js,bin/sun/util/ResourceBundleEnumeration.js,bin/sun/reflect/Reflection.js,bin/java/io/UTFDataFormatException.js,bin/java/io/WriteAbortedException.js,bin/javax/swing/DebugGraphics.js,bin/javax/swing/SortingFocusTraversalPolicy.js,bin/javax/swing/InternalFrameFocusTraversalPolicy.js,bin/javax/swing/LegacyGlueFocusTraversalPolicy.js,bin/javax/swing/KeyboardManager.js,bin/javax/swing/Autoscroller.js,bin/javax/swing/event/AncestorEvent.js,bin/sun/swing/AccessibleMethod.js,bin/javax/accessibility/AccessibleRelation.js,bin/javax/swing/text/StyledDocument.js,bin/java/util/regex/PatternSyntaxException.js,bin/sun/swing/plaf/synth/SynthFileChooserUIImpl.js,bin/javax/swing/plaf/basic/BasicHTML.js,bin/javax/swing/text/html/HTMLEditorKit.js,bin/javax/swing/text/StyledEditorKit.js,bin/javax/swing/text/html/HTMLDocument.js,bin/javax/swing/text/DefaultStyledDocument.js,bin/javax/swing/text/html/BlockView.js,bin/javax/swing/text/PlainDocument.js,bin/javax/swing/plaf/synth/SynthButtonUI.js,bin/javax/swing/plaf/synth/SynthCheckBoxUI.js,bin/javax/swing/plaf/synth/SynthRadioButtonUI.js,bin/javax/swing/plaf/synth/SynthToggleButtonUI.js,bin/javax/swing/plaf/synth/SynthCheckBoxMenuItemUI.js,bin/javax/swing/plaf/synth/SynthMenuItemUI.js,bin/javax/swing/plaf/synth/SynthColorChooserUI.js,bin/javax/swing/plaf/basic/BasicColorChooserUI.js,bin/javax/swing/plaf/ColorChooserUI.js,bin/javax/swing/plaf/synth/SynthComboBoxUI.js,bin/javax/swing/plaf/synth/SynthDesktopPaneUI.js,bin/javax/swing/plaf/synth/SynthDesktopIconUI.js,bin/javax/swing/plaf/synth/SynthEditorPaneUI.js,bin/javax/swing/plaf/synth/SynthFormattedTextFieldUI.js,bin/javax/swing/plaf/synth/SynthTextFieldUI.js,bin/javax/swing/plaf/synth/SynthInternalFrameUI.js,bin/javax/swing/plaf/synth/SynthLabelUI.js,bin/javax/swing/plaf/synth/SynthListUI.js,bin/javax/swing/plaf/basic/BasicListUI.js,bin/javax/swing/plaf/ListUI.js,bin/javax/swing/plaf/synth/SynthMenuBarUI.js,bin/javax/swing/plaf/synth/SynthMenuUI.js,bin/javax/swing/plaf/synth/SynthOptionPaneUI.js,bin/javax/swing/plaf/synth/SynthPanelUI.js,bin/javax/swing/plaf/basic/BasicPanelUI.js,bin/javax/swing/plaf/synth/SynthPasswordFieldUI.js,bin/javax/swing/plaf/synth/SynthSeparatorUI.js,bin/javax/swing/plaf/synth/SynthPopupMenuUI.js,bin/javax/swing/plaf/synth/SynthProgressBarUI.js,bin/javax/swing/plaf/synth/SynthRadioButtonMenuItemUI.js,bin/javax/swing/plaf/synth/SynthRootPaneUI.js,bin/javax/swing/plaf/synth/SynthScrollBarUI.js,bin/javax/swing/plaf/synth/SynthScrollPaneUI.js,bin/javax/swing/plaf/synth/SynthSliderUI.js,bin/javax/swing/plaf/synth/SynthSpinnerUI.js,bin/javax/swing/plaf/synth/SynthArrowButton.js,bin/javax/swing/plaf/synth/SynthSplitPaneUI.js,bin/javax/swing/plaf/synth/SynthTabbedPaneUI.js,bin/javax/swing/plaf/synth/SynthTableUI.js,bin/javax/swing/plaf/basic/BasicTableUI.js,bin/javax/swing/plaf/TableUI.js,bin/javax/swing/plaf/synth/SynthTableHeaderUI.js,bin/javax/swing/plaf/synth/SynthTextAreaUI.js,bin/javax/swing/plaf/synth/SynthTextPaneUI.js,bin/javax/swing/plaf/synth/SynthToolBarUI.js,bin/javax/swing/plaf/synth/SynthToolTipUI.js,bin/javax/swing/plaf/basic/BasicToolTipUI.js,bin/javax/swing/plaf/ToolTipUI.js,bin/javax/swing/plaf/synth/SynthTreeUI.js,bin/javax/swing/tree/DefaultTreeCellEditor.js,bin/javax/swing/plaf/synth/SynthViewportUI.js,bin/javax/swing/plaf/ViewportUI.js,bin/javax/swing/plaf/synth/DefaultSynthStyleFactory.js,bin/javax/swing/plaf/synth/SynthParser.js,bin/javax/swing/plaf/synth/SynthDefaultLookup.js,bin/javax/swing/FocusManager.js,bin/javax/swing/LayoutFocusTraversalPolicy.js,bin/sun/misc/Cleaner.js,bin/java/lang/ref/PhantomReference.js,bin/javax/swing/plaf/synth/SynthBorder.js,bin/javax/swing/event/MenuDragMouseEvent.js,bin/javax/swing/DefaultSingleSelectionModel.js,bin/javax/swing/OverlayLayout.js,bin/javax/swing/text/html/CSS.js,bin/javax/swing/text/html/HTML.js,bin/javax/swing/JEditorPane.js,bin/javax/accessibility/AccessibleHypertext.js,bin/javax/accessibility/AccessibleHyperlink.js,bin/javax/swing/text/StyleConstants.js,bin/javax/swing/plaf/basic/DefaultMenuLayout.js,bin/javax/swing/text/PasswordView.js,bin/javax/swing/text/FieldView.js,bin/javax/swing/text/PlainView.js,bin/javax/swing/text/TabSet.js,bin/javax/swing/SizeRequirements.js,bin/javax/swing/text/GlyphView.js,bin/javax/swing/text/TabableView.js,bin/javax/swing/JApplet.js,bin/javax/swing/text/WrappedPlainView.js,bin/javax/swing/text/StateInvariantError.js,bin/javax/swing/event/TreeExpansionEvent.js,bin/javax/swing/event/TreeModelEvent.js,bin/javax/swing/tree/FixedHeightLayoutCache.js,bin/javax/swing/tree/VariableHeightLayoutCache.js,bin/javax/swing/event/RowSorterEvent.js,bin/javax/swing/event/TableModelEvent.js,bin/sun/awt/shell/ShellFolderColumnInfo.js,bin/javax/swing/table/TableStringConverter.js,bin/javax/swing/table/TableColumnModel.js,bin/javax/swing/table/DefaultTableColumnModel.js,bin/javax/swing/event/TableColumnModelEvent.js,bin/javax/swing/SizeSequence.js,bin/javax/swing/SpinnerDateModel.js,bin/java/text/SimpleDateFormat.js,bin/java/util/GregorianCalendar.js,bin/java/util/concurrent/Callable.js,bin/java/security/GuardedObject.js,bin/java/util/Formatter.js,bin/java/text/Collator.js,bin/java/text/spi/CollatorProvider.js,bin/java/lang/StringCoding.js,bin/java/lang/ConditionalSpecialCasing.js,bin/javax/management/Query.js,bin/javax/management/AttributeValueExp.js,bin/javax/management/ValueExp.js,bin/sun/reflect/MethodAccessor.js,bin/sun/reflect/generics/repository/MethodRepository.js,bin/sun/reflect/generics/repository/ConstructorRepository.js,bin/sun/reflect/generics/tree/MethodTypeSignature.js,bin/sun/reflect/generics/factory/CoreReflectionFactory.js,bin/sun/reflect/generics/factory/GenericsFactory.js,bin/sun/reflect/generics/scope/MethodScope.js,bin/sun/reflect/generics/scope/AbstractScope.js,bin/sun/reflect/generics/scope/Scope.js,bin/sun/reflect/annotation/AnnotationParser.js,bin/java/lang/annotation/AnnotationFormatError.js,bin/java/lang/reflect/GenericSignatureFormatError.js,bin/sun/reflect/ConstantPool.js,bin/sun/reflect/annotation/ExceptionProxy.js,bin/java/lang/reflect/ReflectPermission.js,bin/java/lang/EnumConstantNotPresentException.js,bin/java/lang/annotation/AnnotationTypeMismatchException.js,bin/java/lang/annotation/IncompleteAnnotationException.js,bin/sun/misc/Unsafe.js,bin/sun/reflect/SignatureIterator.js,bin/sun/reflect/generics/scope/ClassScope.js,bin/java/io/SerialCallbackContext.js,bin/java/io/SerializablePermission.js,bin/java/lang/InheritableThreadLocal.js,bin/java/util/concurrent/RejectedExecutionException.js,bin/java/util/concurrent/ExecutorService.js,bin/java/util/concurrent/ThreadPoolExecutor.js,bin/java/util/concurrent/AbstractExecutorService.js,bin/java/util/concurrent/RejectedExecutionHandler.js,bin/java/util/concurrent/Executors.js,bin/java/util/concurrent/ThreadFactory.js,bin/java/util/concurrent/ScheduledExecutorService.js,bin/java/util/concurrent/ScheduledThreadPoolExecutor.js,bin/java/util/concurrent/RunnableScheduledFuture.js,bin/java/util/concurrent/ScheduledFuture.js,bin/java/util/concurrent/Delayed.js,bin/java/util/concurrent/BlockingQueue.js,bin/java/util/concurrent/ExecutorCompletionService.js,bin/java/util/concurrent/CompletionService.js,bin/java/util/concurrent/ConcurrentLinkedQueue.js,bin/java/util/concurrent/LinkedBlockingQueue.js,bin/java/util/concurrent/ArrayBlockingQueue.js,bin/java/util/concurrent/SynchronousQueue.js,bin/java/util/concurrent/PriorityBlockingQueue.js,bin/java/util/concurrent/DelayQueue.js,bin/java/util/concurrent/BlockingDeque.js,bin/java/util/concurrent/LinkedBlockingDeque.js,bin/java/util/concurrent/TimeUnit.js,bin/java/util/concurrent/Semaphore.js,bin/java/util/concurrent/CountDownLatch.js,bin/java/util/concurrent/CyclicBarrier.js,bin/java/util/concurrent/Exchanger.js,bin/java/util/concurrent/atomic/AtomicReference.js,bin/java/util/concurrent/ConcurrentSkipListMap.js,bin/java/util/concurrent/ConcurrentNavigableMap.js,bin/java/util/concurrent/ConcurrentSkipListSet.js,bin/java/util/concurrent/CopyOnWriteArraySet.js,bin/javax/security/auth/login/ConfigurationSpi.js,bin/sun/misc/ClassFileTransformer.js,bin/sun/misc/CompoundEnumeration.js,bin/sun/misc/Resource.js,bin/sun/misc/VM.js,bin/sun/misc/Launcher.js,bin/java/net/URLStreamHandlerFactory.js,bin/java/util/concurrent/locks/LockSupport.js,bin/sun/misc/SoftCache.js,bin/java/lang/StackOverflowError.js,bin/java/nio/channels/Selector.js,bin/javax/naming/spi/InitialContextFactoryBuilder.js,bin/javax/naming/NameImpl.js,bin/javax/naming/directory/InvalidSearchControlsException.js,bin/javax/naming/spi/ObjectFactoryBuilder.js,bin/java/rmi/server/ServerCloneException.js,bin/sun/rmi/transport/LiveRef.js,bin/sun/rmi/transport/ObjectTable.js,bin/java/rmi/server/RemoteObjectInvocationHandler.js,bin/sun/rmi/runtime/Log.js,bin/java/util/logging/StreamHandler.js,bin/java/rmi/ServerError.js,bin/java/rmi/server/Skeleton.js,bin/java/rmi/server/SkeletonNotFoundException.js,bin/sun/rmi/transport/Target.js,bin/sun/rmi/transport/tcp/TCPTransport.js,bin/sun/rmi/transport/Transport.js,bin/sun/rmi/server/Util.js,bin/java/rmi/activation/Activatable.js,bin/java/lang/management/MemoryMXBean.js,bin/javax/management/openmbean/InvalidKeyException.js,bin/javax/management/MXBean.js,bin/sun/net/www/MimeTable.js,bin/java/net/SecureCacheResponse.js,bin/java/net/CacheResponse.js,bin/sun/net/www/protocol/https/HttpsClient.js,bin/javax/net/ssl/HandshakeCompletedListener.js,bin/java/net/HttpRetryException.js,bin/java/net/ProxySelector.js,bin/java/net/CookieHandler.js,bin/java/net/ResponseCache.js,bin/java/net/CacheRequest.js,bin/sun/net/www/http/PosterOutputStream.js,bin/sun/net/www/http/ChunkedInputStream.js,bin/sun/net/www/http/Hurryable.js,bin/sun/net/www/http/ChunkedOutputStream.js,bin/sun/net/www/http/HttpCapture.js,bin/sun/net/www/protocol/http/AuthScheme.js,bin/sun/net/www/protocol/http/DigestAuthentication.js,bin/sun/net/ProgressSource.js,bin/sun/net/ApplicationProxy.js,bin/sun/net/ProgressMonitor.js,bin/sun/net/ProgressMeteringPolicy.js,bin/sun/net/www/protocol/http/HttpCallerInfo.js,bin/sun/net/www/HeaderParser.js,bin/sun/net/www/protocol/http/BasicAuthentication.js,bin/sun/net/www/protocol/http/NTLMAuthenticationProxy.js,bin/sun/net/www/protocol/http/NegotiateAuthentication.js,bin/sun/net/www/MeteredStream.js,bin/sun/net/www/protocol/https/HttpsURLConnectionImpl.js,bin/sun/net/util/IPAddressUtil.js,bin/java/security/Timestamp.js,bin/javax/swing/filechooser/FileNameExtensionFilter.js,bin/java/io/FilterWriter.js,bin/java/io/PipedWriter.js,bin/javax/accessibility/AccessibleAttributeSequence.js,bin/sun/awt/Graphics2Delegate.js,bin/sun/awt/image/ImageRepresentation.js,bin/sun/awt/image/ImageWatched.js,bin/sun/awt/image/ToolkitImage.js,bin/sun/awt/datatransfer/ToolkitThreadBlockedHandler.js,bin/java/nio/charset/CoderResult.js,bin/java/lang/CharacterData.js,bin/java/io/FilterReader.js,bin/java/io/PushbackReader.js,bin/java/io/PipedReader.js,bin/javax/swing/event/UndoableEditListener.js,bin/javax/swing/event/UndoableEditEvent.js,bin/javax/swing/undo/CannotRedoException.js,bin/javax/swing/undo/CannotUndoException.js,bin/javax/swing/text/Utilities.js,bin/javax/swing/text/SegmentCache.js,bin/javax/swing/text/LabelView.js,bin/javax/swing/DefaultBoundedRangeModel.js,bin/sun/swing/PrintingStatus.js,bin/sun/swing/text/TextComponentPrintable.js,bin/sun/swing/text/CountingPrintable.js,bin/javax/print/attribute/HashPrintRequestAttributeSet.js,bin/javax/print/attribute/HashAttributeSet.js,bin/java/util/concurrent/ExecutionException.js,bin/java/util/concurrent/TimeoutException.js,bin/javax/swing/text/TabStop.js,bin/javax/swing/text/ComponentView.js,bin/javax/swing/ViewportLayout.js,bin/javax/swing/table/DefaultTableModel.js,bin/sun/misc/JavaIODeleteOnExitAccess.js,bin/java/io/DeleteOnExitHook.js,bin/sun/misc/JavaIOFileAccess.js,bin/java/nio/channels/FileLock.js,bin/sun/awt/DefaultMouseInfoPeer.js,bin/sun/awt/ModalityEvent.js,bin/sun/awt/DebugSettings.js,bin/sun/awt/KeyboardFocusManagerPeerImpl.js,bin/sun/awt/image/URLImageSource.js,bin/sun/awt/image/InputStreamImageSource.js,bin/sun/awt/image/ImageFetchable.js,bin/sun/awt/image/FileImageSource.js,bin/sun/awt/image/ByteArrayImageSource.js,bin/sun/awt/im/SimpleInputMethodWindow.js,bin/sun/awt/im/InputMethodWindow.js,bin/sun/util/resources/LocaleData.js,bin/sun/util/resources/OpenListResourceBundle.js,bin/java/util/LocaleISOData.js,bin/java/util/ServiceConfigurationError.js,bin/java/text/spi/DateFormatSymbolsProvider.js,bin/java/text/spi/DecimalFormatSymbolsProvider.js,bin/java/util/spi/CurrencyNameProvider.js,bin/java/util/spi/TimeZoneNameProvider.js,bin/sun/reflect/FieldAccessor.js,bin/sun/reflect/generics/repository/FieldRepository.js,bin/sun/reflect/generics/tree/TypeSignature.js,bin/sun/reflect/generics/tree/ReturnType.js,bin/sun/reflect/generics/tree/TypeTree.js,bin/sun/reflect/generics/tree/FieldTypeSignature.js,bin/sun/reflect/generics/tree/BaseType.js,bin/sun/reflect/generics/tree/TypeArgument.js,bin/java/lang/ref/FinalReference.js,bin/sun/reflect/generics/visitor/Reifier.js,bin/sun/reflect/generics/visitor/TypeTreeVisitor.js,bin/sun/java2d/pipe/SpanIterator.js,bin/sun/java2d/pipe/RegionIterator.js,bin/sun/java2d/pipe/ShapeSpanIterator.js,bin/sun/awt/geom/PathConsumer2D.js,bin/sun/java2d/pipe/RegionSpanIterator.js,bin/sun/java2d/pipe/RegionClipSpanIterator.js,bin/java/nio/channels/spi/SelectorProvider.js,bin/sun/net/InetAddressCachePolicy.js,bin/java/io/Console.js,bin/sun/misc/JavaIOAccess.js,bin/java/lang/ProcessBuilder.js,bin/java/io/ExpiringCache.js,bin/java/io/IOError.js,bin/java/io/LineNumberInputStream.js,bin/java/io/SyncFailedException.js,bin/java/lang/ApplicationShutdownHooks.js,bin/java/lang/InstantiationError.js,bin/java/lang/NoSuchFieldError.js,bin/java/lang/Shutdown.js,bin/java/lang/StrictMath.js,bin/java/lang/UnknownError.js,bin/java/lang/annotation/Inherited.js,bin/java/lang/instrument/ClassDefinition.js,bin/java/lang/instrument/ClassFileTransformer.js,bin/java/lang/instrument/IllegalClassFormatException.js,bin/java/lang/instrument/Instrumentation.js,bin/java/lang/instrument/UnmodifiableClassException.js,bin/java/lang/management/ClassLoadingMXBean.js,bin/java/lang/management/CompilationMXBean.js,bin/java/lang/management/LockInfo.js,bin/java/lang/management/ManagementPermission.js,bin/java/lang/management/MemoryNotificationInfo.js,bin/java/lang/management/MemoryPoolMXBean.js,bin/java/lang/management/MemoryType.js,bin/java/lang/management/MonitorInfo.js,bin/java/lang/management/RuntimeMXBean.js,bin/java/lang/management/ThreadInfo.js,bin/java/lang/management/ThreadMXBean.js,bin/java/lang/ref/Finalizer.js,bin/java/lang/reflect/ReflectAccess.js,bin/java/math/BitSieve.js,bin/java/math/MutableBigInteger.js,bin/java/math/SignedMutableBigInteger.js,bin/java/net/AbstractPlainDatagramSocketImpl.js,bin/java/net/AbstractPlainSocketImpl.js,bin/java/net/ConnectException.js,bin/java/net/CookieManager.js,bin/java/net/CookiePolicy.js,bin/java/net/CookieStore.js,bin/java/net/DatagramSocketImplFactory.js,bin/java/net/HttpCookie.js,bin/java/net/IDN.js,bin/java/net/Inet4Address.js,bin/java/net/Inet4AddressImpl.js,bin/java/net/Inet6AddressImpl.js,bin/java/net/InetAddressImpl.js,bin/java/net/InterfaceAddress.js,bin/java/net/MulticastSocket.js,bin/java/net/NetUtil.js,bin/java/net/NetworkInterface.js,bin/java/net/NoRouteToHostException.js,bin/java/net/PortUnreachableException.js,bin/java/net/SocketImplFactory.js,bin/java/net/SocketInputStream.js,bin/java/net/SocketOutputStream.js,bin/java/net/SocksConsts.js,bin/java/net/SocksSocketImpl.js,bin/java/nio/Bits.js,bin/java/nio/ByteBufferAs-X-Buffer.js,bin/java/nio/Direct-X-Buffer-bin.js,bin/java/nio/Direct-X-Buffer.js,bin/java/nio/Heap-X-Buffer.js,bin/java/nio/StringCharBuffer.js,bin/java/nio/X-Buffer-bin.js,bin/java/nio/X-Buffer.js,bin/java/nio/channels/Channels.js,bin/java/nio/channels/DatagramChannel.js,bin/java/nio/channels/Pipe.js,bin/java/nio/channels/SelectableChannel.js,bin/java/nio/channels/SelectionKey.js,bin/java/nio/channels/ServerSocketChannel.js,bin/java/nio/channels/SocketChannel.js,bin/java/nio/channels/spi/AbstractSelectableChannel.js,bin/java/nio/channels/spi/AbstractSelectionKey.js,bin/java/nio/channels/spi/AbstractSelector.js,bin/java/nio/charset/Charset-X-Coder.js,bin/java/nio/charset/CoderMalfunctionError.js,bin/java/nio/charset/CodingErrorAction.js,bin/java/nio/charset/MalformedInputException.js,bin/java/nio/charset/UnmappableCharacterException.js,bin/java/nio/charset/spi/CharsetProvider.js,bin/java/rmi/Naming.js,bin/java/rmi/RMISecurityException.js,bin/java/rmi/ServerRuntimeException.js,bin/java/rmi/UnexpectedException.js,bin/java/rmi/activation/ActivateFailedException.js,bin/java/rmi/activation/ActivationDesc.js,bin/java/rmi/activation/ActivationException.js,bin/java/rmi/activation/ActivationGroup.js,bin/java/rmi/activation/ActivationGroupDesc.js,bin/java/rmi/activation/ActivationGroupID.js,bin/java/rmi/activation/ActivationID.js,bin/java/rmi/activation/ActivationInstantiator.js,bin/java/rmi/activation/ActivationMonitor.js,bin/java/rmi/activation/ActivationSystem.js,bin/java/rmi/activation/Activator.js,bin/java/rmi/activation/UnknownGroupException.js,bin/java/rmi/activation/UnknownObjectException.js,bin/java/rmi/dgc/DGC.js,bin/java/rmi/dgc/Lease.js,bin/java/rmi/dgc/VMID.js,bin/java/rmi/registry/RegistryHandler.js,bin/java/rmi/server/LoaderHandler.js,bin/java/rmi/server/LogStream.js,bin/java/rmi/server/ObjID.js,bin/java/rmi/server/RMIClassLoader.js,bin/java/rmi/server/RMIClassLoaderSpi.js,bin/java/rmi/server/RMIFailureHandler.js,bin/java/rmi/server/RMISocketFactory.js,bin/java/rmi/server/SkeletonMismatchException.js,bin/java/rmi/server/UID.js,bin/java/rmi/server/Unreferenced.js,bin/java/security/PolicySpi.js,bin/java/security/SecureRandomSpi.js,bin/java/security/SignedObject.js,bin/java/security/URIParameter.js,bin/java/security/UnresolvedPermissionCollection.js,bin/java/security/acl/AclNotFoundException.js,bin/java/security/cert/CRL.js,bin/java/security/cert/CRLException.js,bin/java/security/cert/CRLSelector.js,bin/java/security/cert/CertPathBuilder.js,bin/java/security/cert/CertPathBuilderException.js,bin/java/security/cert/CertPathBuilderResult.js,bin/java/security/cert/CertPathBuilderSpi.js,bin/java/security/cert/CertPathHelperImpl.js,bin/java/security/cert/CertPathParameters.js,bin/java/security/cert/CertPathValidator.js,bin/java/security/cert/CertPathValidatorException.js,bin/java/security/cert/CertPathValidatorResult.js,bin/java/security/cert/CertPathValidatorSpi.js,bin/java/security/cert/CertSelector.js,bin/java/security/cert/CertStore.js,bin/java/security/cert/CertStoreException.js,bin/java/security/cert/CertStoreSpi.js,bin/java/security/cert/CertificateFactorySpi.js,bin/java/security/cert/CollectionCertStoreParameters.js,bin/java/security/cert/LDAPCertStoreParameters.js,bin/java/security/cert/PKIXBuilderParameters.js,bin/java/security/cert/PKIXCertPathBuilderResult.js,bin/java/security/cert/PKIXCertPathChecker.js,bin/java/security/cert/PKIXCertPathValidatorResult.js,bin/java/security/cert/PKIXParameters.js,bin/java/security/cert/PolicyNode.js,bin/java/security/cert/PolicyQualifierInfo.js,bin/java/security/cert/TrustAnchor.js,bin/java/security/cert/X509CRL.js,bin/java/security/cert/X509CRLEntry.js,bin/java/security/cert/X509CRLSelector.js,bin/java/security/cert/X509CertSelector.js,bin/java/security/interfaces/DSAKeyPairGenerator.js,bin/java/security/interfaces/ECKey.js,bin/java/security/interfaces/ECPrivateKey.js,bin/java/security/interfaces/ECPublicKey.js,bin/java/security/interfaces/RSAMultiPrimePrivateCrtKey.js,bin/java/security/spec/DSAPrivateKeySpec.js,bin/java/security/spec/ECField.js,bin/java/security/spec/ECFieldF2m.js,bin/java/security/spec/ECFieldFp.js,bin/java/security/spec/ECGenParameterSpec.js,bin/java/security/spec/ECParameterSpec.js,bin/java/security/spec/ECPoint.js,bin/java/security/spec/ECPrivateKeySpec.js,bin/java/security/spec/ECPublicKeySpec.js,bin/java/security/spec/EllipticCurve.js,bin/java/security/spec/PSSParameterSpec.js,bin/java/security/spec/RSAKeyGenParameterSpec.js,bin/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.js,bin/java/security/spec/RSAOtherPrimeInfo.js,bin/java/security/spec/RSAPrivateCrtKeySpec.js,bin/java/security/spec/RSAPrivateKeySpec.js,bin/java/sql/BatchUpdateException.js,bin/java/sql/CallableStatement.js,bin/java/sql/ClientInfoStatus.js,bin/java/sql/DataTruncation.js,bin/java/sql/Driver.js,bin/java/sql/DriverPropertyInfo.js,bin/java/sql/RowIdLifetime.js,bin/java/sql/SQLClientInfoException.js,bin/java/sql/SQLDataException.js,bin/java/sql/SQLIntegrityConstraintViolationException.js,bin/java/sql/SQLInvalidAuthorizationSpecException.js,bin/java/sql/SQLNonTransientConnectionException.js,bin/java/sql/SQLOutput.js,bin/java/sql/SQLPermission.js,bin/java/sql/SQLRecoverableException.js,bin/java/sql/SQLSyntaxErrorException.js,bin/java/sql/SQLTimeoutException.js,bin/java/sql/SQLTransactionRollbackException.js,bin/java/sql/SQLTransientConnectionException.js,bin/java/sql/SQLTransientException.js,bin/java/text/BreakDictionary.js,bin/java/text/CharacterIteratorFieldDelegate.js,bin/java/text/ChoiceFormat.js,bin/java/text/CollationElementIterator.js,bin/java/text/CollationKey.js,bin/java/text/CollationRules.js,bin/java/text/DateFormatSymbols.js,bin/java/text/DecimalFormat.js,bin/java/text/DecimalFormatSymbols.js,bin/java/text/DictionaryBasedBreakIterator.js,bin/java/text/DigitList.js,bin/java/text/DontCareFieldPosition.js,bin/java/text/EntryPair.js,bin/java/text/MergeCollation.js,bin/java/text/Normalizer.js,bin/java/text/PatternEntry.js,bin/java/text/RBCollationTables.js,bin/java/text/RBTableBuilder.js,bin/java/text/RuleBasedBreakIterator.js,bin/java/text/RuleBasedCollationKey.js,bin/java/text/RuleBasedCollator.js,bin/java/util/ArrayDeque.js,bin/java/util/Currency.js,bin/java/util/DuplicateFormatFlagsException.js,bin/java/util/FormatFlagsConversionMismatchException.js,bin/java/util/Formattable.js,bin/java/util/FormattableFlags.js,bin/java/util/FormatterClosedException.js,bin/java/util/IllegalFormatCodePointException.js,bin/java/util/IllegalFormatConversionException.js,bin/java/util/IllegalFormatException.js,bin/java/util/IllegalFormatFlagsException.js,bin/java/util/IllegalFormatPrecisionException.js,bin/java/util/IllegalFormatWidthException.js,bin/java/util/InputMismatchException.js,bin/java/util/JapaneseImperialCalendar.js,bin/java/util/JumboEnumSet.js,bin/java/util/MissingFormatArgumentException.js,bin/java/util/MissingFormatWidthException.js,bin/java/util/Observable.js,bin/java/util/Observer.js,bin/java/util/PriorityQueue.js,bin/java/util/RegularEnumSet.js,bin/java/util/Scanner.js,bin/java/util/SimpleTimeZone.js,bin/java/util/Timer.js,bin/java/util/TimerTask.js,bin/java/util/UUID.js,bin/java/util/UnknownFormatConversionException.js,bin/java/util/UnknownFormatFlagsException.js,bin/java/util/concurrent/BrokenBarrierException.js,bin/java/util/concurrent/CancellationException.js,bin/java/util/concurrent/atomic/AtomicIntegerArray.js,bin/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.js,bin/java/util/concurrent/atomic/AtomicLongArray.js,bin/java/util/concurrent/atomic/AtomicLongFieldUpdater.js,bin/java/util/concurrent/atomic/AtomicMarkableReference.js,bin/java/util/concurrent/atomic/AtomicReferenceArray.js,bin/java/util/concurrent/atomic/AtomicStampedReference.js,bin/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.js,bin/java/util/jar/JarException.js,bin/java/util/jar/JarVerifier.js,bin/java/util/jar/JavaUtilJarAccessImpl.js,bin/java/util/logging/ConsoleHandler.js,bin/java/util/logging/ErrorManager.js,bin/java/util/logging/FileHandler.js,bin/java/util/logging/Formatter.js,bin/java/util/logging/Logging.js,bin/java/util/logging/LoggingMXBean.js,bin/java/util/logging/LoggingPermission.js,bin/java/util/logging/MemoryHandler.js,bin/java/util/logging/SimpleFormatter.js,bin/java/util/logging/SocketHandler.js,bin/java/util/logging/XMLFormatter.js,bin/java/util/prefs/AbstractPreferences.js,bin/java/util/prefs/Base64.js,bin/java/util/prefs/InvalidPreferencesFormatException.js,bin/java/util/prefs/NodeChangeEvent.js,bin/java/util/prefs/NodeChangeListener.js,bin/java/util/prefs/PreferenceChangeEvent.js,bin/java/util/prefs/PreferenceChangeListener.js,bin/java/util/prefs/PreferencesFactory.js,bin/java/util/prefs/XmlSupport.js,bin/java/util/regex/ASCII.js,bin/java/util/zip/Adler32.js,bin/java/util/zip/CheckedInputStream.js,bin/java/util/zip/DataFormatException.js,bin/java/util/zip/DeflaterInputStream.js,bin/java/util/zip/InflaterOutputStream.js,bin/java/util/zip/ZStreamRef.js,bin/java/util/zip/ZipError.js,bin/javax/accessibility/AccessibleResourceBundle.js,bin/javax/accessibility/AccessibleStreamable.js,bin/javax/crypto/CipherInputStream.js,bin/javax/crypto/CipherOutputStream.js,bin/javax/crypto/CryptoPermissions.js,bin/javax/crypto/CryptoPolicyParser.js,bin/javax/crypto/EncryptedPrivateKeyInfo.js,bin/javax/crypto/ExemptionMechanismSpi.js,bin/javax/crypto/JarVerifier.js,bin/javax/crypto/KeyAgreement.js,bin/javax/crypto/NullCipherSpi.js,bin/javax/imageio/spi/DigraphNode.js,bin/javax/imageio/spi/PartiallyOrderedSet.js,bin/javax/imageio/stream/MemoryCache.js,bin/javax/management/AndQueryExp.js,bin/javax/management/AttributeChangeNotificationFilter.js,bin/javax/management/BetweenQueryExp.js,bin/javax/management/BinaryOpValueExp.js,bin/javax/management/BinaryRelQueryExp.js,bin/javax/management/BooleanValueExp.js,bin/javax/management/ClassAttributeValueExp.js,bin/javax/management/DefaultLoaderRepository.js,bin/javax/management/DescriptorAccess.js,bin/javax/management/InQueryExp.js,bin/javax/management/InstanceOfQueryExp.js,bin/javax/management/MatchQueryExp.js,bin/javax/management/NotQueryExp.js,bin/javax/management/NumericValueExp.js,bin/javax/management/OrQueryExp.js,bin/javax/management/PersistentMBean.js,bin/javax/management/QualifiedAttributeValueExp.js,bin/javax/management/StandardEmitterMBean.js,bin/javax/management/StandardMBean.js,bin/javax/management/StringValueExp.js,bin/javax/management/loading/DefaultLoaderRepository.js,bin/javax/management/loading/MLet.js,bin/javax/management/loading/MLetContent.js,bin/javax/management/loading/MLetMBean.js,bin/javax/management/loading/MLetObjectInputStream.js,bin/javax/management/loading/MLetParser.js,bin/javax/management/loading/PrivateMLet.js,bin/javax/management/modelmbean/DescriptorSupport.js,bin/javax/management/modelmbean/InvalidTargetObjectTypeException.js,bin/javax/management/modelmbean/ModelMBean.js,bin/javax/management/modelmbean/ModelMBeanAttributeInfo.js,bin/javax/management/modelmbean/ModelMBeanConstructorInfo.js,bin/javax/management/modelmbean/ModelMBeanInfo.js,bin/javax/management/modelmbean/ModelMBeanInfoSupport.js,bin/javax/management/modelmbean/ModelMBeanNotificationBroadcaster.js,bin/javax/management/modelmbean/ModelMBeanNotificationInfo.js,bin/javax/management/modelmbean/ModelMBeanOperationInfo.js,bin/javax/management/modelmbean/RequiredModelMBean.js,bin/javax/management/modelmbean/XMLParseException.js,bin/javax/management/monitor/CounterMonitor.js,bin/javax/management/monitor/CounterMonitorMBean.js,bin/javax/management/monitor/GaugeMonitor.js,bin/javax/management/monitor/GaugeMonitorMBean.js,bin/javax/management/monitor/Monitor.js,bin/javax/management/monitor/MonitorMBean.js,bin/javax/management/monitor/MonitorNotification.js,bin/javax/management/monitor/MonitorSettingException.js,bin/javax/management/monitor/StringMonitor.js,bin/javax/management/monitor/StringMonitorMBean.js,bin/javax/management/openmbean/InvalidOpenTypeException.js,bin/javax/management/openmbean/KeyAlreadyExistsException.js,bin/javax/management/openmbean/OpenMBeanConstructorInfo.js,bin/javax/management/openmbean/OpenMBeanConstructorInfoSupport.js,bin/javax/management/openmbean/OpenMBeanInfo.js,bin/javax/management/openmbean/OpenMBeanInfoSupport.js,bin/javax/management/relation/InvalidRelationIdException.js,bin/javax/management/relation/InvalidRelationServiceException.js,bin/javax/management/relation/InvalidRelationTypeException.js,bin/javax/management/relation/InvalidRoleInfoException.js,bin/javax/management/relation/InvalidRoleValueException.js,bin/javax/management/relation/MBeanServerNotificationFilter.js,bin/javax/management/relation/Relation.js,bin/javax/management/relation/RelationException.js,bin/javax/management/relation/RelationNotFoundException.js,bin/javax/management/relation/RelationNotification.js,bin/javax/management/relation/RelationService.js,bin/javax/management/relation/RelationServiceMBean.js,bin/javax/management/relation/RelationServiceNotRegisteredException.js,bin/javax/management/relation/RelationSupport.js,bin/javax/management/relation/RelationSupportMBean.js,bin/javax/management/relation/RelationType.js,bin/javax/management/relation/RelationTypeNotFoundException.js,bin/javax/management/relation/RelationTypeSupport.js,bin/javax/management/relation/Role.js,bin/javax/management/relation/RoleInfo.js,bin/javax/management/relation/RoleInfoNotFoundException.js,bin/javax/management/relation/RoleList.js,bin/javax/management/relation/RoleNotFoundException.js,bin/javax/management/relation/RoleResult.js,bin/javax/management/relation/RoleStatus.js,bin/javax/management/relation/RoleUnresolved.js,bin/javax/management/relation/RoleUnresolvedList.js,bin/javax/management/remote/JMXConnectionNotification.js,bin/javax/management/remote/JMXProviderException.js,bin/javax/management/remote/JMXServerErrorException.js,bin/javax/management/remote/rmi/NoCallStackClassLoader.js,bin/javax/management/remote/rmi/RMIConnection.js,bin/javax/management/remote/rmi/RMIConnectionImpl.js,bin/javax/management/remote/rmi/RMIIIOPServerImpl.js,bin/javax/management/remote/rmi/RMIJRMPServerImpl.js,bin/javax/management/timer/Timer.js,bin/javax/management/timer/TimerAlarmClockNotification.js,bin/javax/management/timer/TimerMBean.js,bin/javax/management/timer/TimerNotification.js,bin/javax/naming/BinaryRefAddr.js,bin/javax/naming/InsufficientResourcesException.js,bin/javax/naming/LinkException.js,bin/javax/naming/LinkLoopException.js,bin/javax/naming/MalformedLinkException.js,bin/javax/naming/ldap/ManageReferralControl.js,bin/javax/naming/ldap/PagedResultsControl.js,bin/javax/naming/ldap/Rfc2253Parser.js,bin/javax/naming/ldap/SortControl.js,bin/javax/naming/ldap/SortKey.js,bin/javax/naming/spi/ContinuationContext.js,bin/javax/naming/spi/ContinuationDirContext.js,bin/javax/naming/spi/DirObjectFactory.js,bin/javax/net/ssl/CertPathTrustManagerParameters.js,bin/javax/net/ssl/HandshakeCompletedEvent.js,bin/javax/net/ssl/SSLEngineResult.js,bin/javax/net/ssl/SSLHandshakeException.js,bin/javax/net/ssl/SSLKeyException.js,bin/javax/net/ssl/SSLProtocolException.js,bin/javax/net/ssl/SSLServerSocket.js,bin/javax/net/ssl/SSLSessionBindingEvent.js,bin/javax/net/ssl/SSLSessionBindingListener.js,bin/javax/net/ssl/SSLSessionContext.js,bin/javax/net/ssl/X509ExtendedKeyManager.js,bin/javax/print/AttributeException.js,bin/javax/print/CancelablePrintJob.js,bin/javax/print/Doc.js,bin/javax/print/DocPrintJob.js,bin/javax/print/FlavorException.js,bin/javax/print/MimeType.js,bin/javax/print/MultiDoc.js,bin/javax/print/MultiDocPrintJob.js,bin/javax/print/MultiDocPrintService.js,bin/javax/print/PrintException.js,bin/javax/print/ServiceUI.js,bin/javax/print/ServiceUIFactory.js,bin/javax/print/SimpleDoc.js,bin/javax/print/StreamPrintService.js,bin/javax/print/URIException.js,bin/javax/print/attribute/AttributeSetUtilities.js,bin/javax/print/attribute/DateTimeSyntax.js,bin/javax/print/attribute/DocAttributeSet.js,bin/javax/print/attribute/HashDocAttributeSet.js,bin/javax/print/attribute/HashPrintJobAttributeSet.js,bin/javax/print/attribute/HashPrintServiceAttributeSet.js,bin/javax/print/attribute/IntegerSyntax.js,bin/javax/print/attribute/PrintJobAttributeSet.js,bin/javax/print/attribute/PrintServiceAttribute.js,bin/javax/print/attribute/PrintServiceAttributeSet.js,bin/javax/print/attribute/ResolutionSyntax.js,bin/javax/print/attribute/SetOfIntegerSyntax.js,bin/javax/print/attribute/SupportedValuesAttribute.js,bin/javax/print/attribute/TextSyntax.js,bin/javax/print/attribute/URISyntax.js,bin/javax/print/attribute/UnmodifiableSetException.js,bin/javax/print/attribute/standard/Chromaticity.js,bin/javax/print/attribute/standard/ColorSupported.js,bin/javax/print/attribute/standard/Compression.js,bin/javax/print/attribute/standard/Copies.js,bin/javax/print/attribute/standard/CopiesSupported.js,bin/javax/print/attribute/standard/DateTimeAtCompleted.js,bin/javax/print/attribute/standard/DateTimeAtCreation.js,bin/javax/print/attribute/standard/DateTimeAtProcessing.js,bin/javax/print/attribute/standard/Destination.js,bin/javax/print/attribute/standard/DocumentName.js,bin/javax/print/attribute/standard/Fidelity.js,bin/javax/print/attribute/standard/Finishings.js,bin/javax/print/attribute/standard/JobHoldUntil.js,bin/javax/print/attribute/standard/JobImpressions.js,bin/javax/print/attribute/standard/JobImpressionsCompleted.js,bin/javax/print/attribute/standard/JobImpressionsSupported.js,bin/javax/print/attribute/standard/JobKOctets.js,bin/javax/print/attribute/standard/JobKOctetsProcessed.js,bin/javax/print/attribute/standard/JobKOctetsSupported.js,bin/javax/print/attribute/standard/JobMediaSheets.js,bin/javax/print/attribute/standard/JobMediaSheetsCompleted.js,bin/javax/print/attribute/standard/JobMediaSheetsSupported.js,bin/javax/print/attribute/standard/JobMessageFromOperator.js,bin/javax/print/attribute/standard/JobName.js,bin/javax/print/attribute/standard/JobOriginatingUserName.js,bin/javax/print/attribute/standard/JobPriority.js,bin/javax/print/attribute/standard/JobPrioritySupported.js,bin/javax/print/attribute/standard/JobSheets.js,bin/javax/print/attribute/standard/JobState.js,bin/javax/print/attribute/standard/JobStateReason.js,bin/javax/print/attribute/standard/JobStateReasons.js,bin/javax/print/attribute/standard/MediaName.js,bin/javax/print/attribute/standard/MediaTray.js,bin/javax/print/attribute/standard/MultipleDocumentHandling.js,bin/javax/print/attribute/standard/NumberOfDocuments.js,bin/javax/print/attribute/standard/NumberOfInterveningJobs.js,bin/javax/print/attribute/standard/NumberUp.js,bin/javax/print/attribute/standard/NumberUpSupported.js,bin/javax/print/attribute/standard/OutputDeviceAssigned.js,bin/javax/print/attribute/standard/PDLOverrideSupported.js,bin/javax/print/attribute/standard/PageRanges.js,bin/javax/print/attribute/standard/PagesPerMinute.js,bin/javax/print/attribute/standard/PagesPerMinuteColor.js,bin/javax/print/attribute/standard/PresentationDirection.js,bin/javax/print/attribute/standard/PrintQuality.js,bin/javax/print/attribute/standard/PrinterInfo.js,bin/javax/print/attribute/standard/PrinterIsAcceptingJobs.js,bin/javax/print/attribute/standard/PrinterLocation.js,bin/javax/print/attribute/standard/PrinterMakeAndModel.js,bin/javax/print/attribute/standard/PrinterMessageFromOperator.js,bin/javax/print/attribute/standard/PrinterMoreInfo.js,bin/javax/print/attribute/standard/PrinterMoreInfoManufacturer.js,bin/javax/print/attribute/standard/PrinterName.js,bin/javax/print/attribute/standard/PrinterResolution.js,bin/javax/print/attribute/standard/PrinterState.js,bin/javax/print/attribute/standard/PrinterStateReason.js,bin/javax/print/attribute/standard/PrinterStateReasons.js,bin/javax/print/attribute/standard/PrinterURI.js,bin/javax/print/attribute/standard/QueuedJobCount.js,bin/javax/print/attribute/standard/ReferenceUriSchemesSupported.js,bin/javax/print/attribute/standard/RequestingUserName.js,bin/javax/print/attribute/standard/Severity.js,bin/javax/print/attribute/standard/SheetCollate.js,bin/javax/print/attribute/standard/Sides.js,bin/javax/print/event/PrintEvent.js,bin/javax/print/event/PrintJobAdapter.js,bin/javax/print/event/PrintJobAttributeEvent.js,bin/javax/print/event/PrintJobAttributeListener.js,bin/javax/print/event/PrintJobEvent.js,bin/javax/print/event/PrintJobListener.js,bin/javax/print/event/PrintServiceAttributeEvent.js,bin/javax/print/event/PrintServiceAttributeListener.js,bin/javax/security/auth/callback/LanguageCallback.js,bin/javax/security/auth/kerberos/DelegationPermission.js,bin/javax/security/auth/kerberos/KeyImpl.js,bin/javax/security/auth/kerberos/ServicePermission.js,bin/javax/security/auth/login/AccountException.js,bin/javax/security/auth/login/AccountExpiredException.js,bin/javax/security/auth/login/AccountLockedException.js,bin/javax/security/auth/login/AccountNotFoundException.js,bin/javax/security/auth/login/CredentialException.js,bin/javax/security/auth/login/CredentialExpiredException.js,bin/javax/security/auth/login/CredentialNotFoundException.js,bin/javax/security/cert/CertificateParsingException.js,bin/javax/security/sasl/AuthenticationException.js,bin/javax/smartcardio/ATR.js,bin/javax/smartcardio/Card.js,bin/javax/smartcardio/CardChannel.js,bin/javax/smartcardio/CardException.js,bin/javax/smartcardio/CardNotPresentException.js,bin/javax/smartcardio/CardPermission.js,bin/javax/smartcardio/CardTerminal.js,bin/javax/smartcardio/CardTerminals.js,bin/javax/smartcardio/CommandAPDU.js,bin/javax/smartcardio/ResponseAPDU.js,bin/javax/smartcardio/TerminalFactory.js,bin/javax/smartcardio/TerminalFactorySpi.js,bin/javax/sound/sampled/ReverbType.js,bin/javax/sql/ConnectionEvent.js,bin/javax/sql/ConnectionEventListener.js,bin/javax/sql/ConnectionPoolDataSource.js,bin/javax/sql/PooledConnection.js,bin/javax/sql/StatementEvent.js,bin/javax/sql/StatementEventListener.js,bin/javax/sql/XAConnection.js,bin/javax/sql/XADataSource.js,bin/javax/sql/rowset/serial/SQLOutputImpl.js,bin/javax/sql/rowset/serial/SerialDatalink.js,bin/javax/sql/rowset/serial/SerialJavaObject.js,bin/javax/swing/DebugGraphicsFilter.js,bin/javax/swing/DebugGraphicsInfo.js,bin/javax/swing/DebugGraphicsObserver.js,bin/javax/swing/DefaultFocusManager.js,bin/javax/swing/DelegatingDefaultFocusManager.js,bin/javax/swing/GraphicsWrapper.js,bin/javax/swing/GroupLayout.js,bin/javax/swing/JTextPane.js,bin/javax/swing/LayoutComparator.js,bin/javax/swing/MultiUIDefaults.js,bin/javax/swing/ProgressMonitor.js,bin/javax/swing/ProgressMonitorInputStream.js,bin/javax/swing/Renderer.js,bin/javax/swing/ScrollPaneLayout.js,bin/javax/swing/SpinnerListModel.js,bin/javax/swing/Spring.js,bin/javax/swing/SpringLayout.js,bin/javax/swing/SwingPaintEventDispatcher.js,bin/javax/swing/TablePrintable.js,bin/javax/swing/TimerQueue.js,bin/javax/swing/border/SoftBevelBorder.js,bin/javax/swing/colorchooser/CenterLayout.js,bin/javax/swing/colorchooser/ColorChooserComponentFactory.js,bin/javax/swing/colorchooser/DefaultColorSelectionModel.js,bin/javax/swing/colorchooser/DefaultHSBChooserPanel.js,bin/javax/swing/colorchooser/DefaultPreviewPanel.js,bin/javax/swing/colorchooser/DefaultRGBChooserPanel.js,bin/javax/swing/colorchooser/DefaultSwatchChooserPanel.js,bin/javax/swing/colorchooser/SmartGridLayout.js,bin/javax/swing/colorchooser/SyntheticImage.js,bin/javax/swing/event/HyperlinkEvent.js,bin/javax/swing/event/HyperlinkListener.js,bin/javax/swing/event/InternalFrameAdapter.js,bin/javax/swing/event/MenuEvent.js,bin/javax/swing/event/TreeWillExpandListener.js,bin/javax/swing/plaf/basic/BasicCheckBoxUI.js,bin/javax/swing/plaf/basic/BasicFormattedTextFieldUI.js,bin/javax/swing/plaf/basic/BasicIconFactory.js,bin/javax/swing/plaf/basic/BasicViewportUI.js,bin/javax/swing/plaf/basic/CenterLayout.js,bin/javax/swing/plaf/metal/DefaultMetalTheme.js,bin/javax/swing/plaf/metal/MetalBorders.js,bin/javax/swing/plaf/metal/MetalBumps.js,bin/javax/swing/plaf/metal/MetalButtonUI.js,bin/javax/swing/plaf/metal/MetalCheckBoxIcon.js,bin/javax/swing/plaf/metal/MetalCheckBoxUI.js,bin/javax/swing/plaf/metal/MetalComboBoxButton.js,bin/javax/swing/plaf/metal/MetalComboBoxEditor.js,bin/javax/swing/plaf/metal/MetalComboBoxIcon.js,bin/javax/swing/plaf/metal/MetalComboBoxUI.js,bin/javax/swing/plaf/metal/MetalDesktopIconUI.js,bin/javax/swing/plaf/metal/MetalFileChooserUI.js,bin/javax/swing/plaf/metal/MetalFontDesktopProperty.js,bin/javax/swing/plaf/metal/MetalHighContrastTheme.js,bin/javax/swing/plaf/metal/MetalIconFactory.js,bin/javax/swing/plaf/metal/MetalInternalFrameTitlePane.js,bin/javax/swing/plaf/metal/MetalInternalFrameUI.js,bin/javax/swing/plaf/metal/MetalLabelUI.js,bin/javax/swing/plaf/metal/MetalLookAndFeel.js,bin/javax/swing/plaf/metal/MetalMenuBarUI.js,bin/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.js,bin/javax/swing/plaf/metal/MetalProgressBarUI.js,bin/javax/swing/plaf/metal/MetalRadioButtonUI.js,bin/javax/swing/plaf/metal/MetalRootPaneUI.js,bin/javax/swing/plaf/metal/MetalScrollBarUI.js,bin/javax/swing/plaf/metal/MetalScrollButton.js,bin/javax/swing/plaf/metal/MetalScrollPaneUI.js,bin/javax/swing/plaf/metal/MetalSeparatorUI.js,bin/javax/swing/plaf/metal/MetalSliderUI.js,bin/javax/swing/plaf/metal/MetalSplitPaneDivider.js,bin/javax/swing/plaf/metal/MetalSplitPaneUI.js,bin/javax/swing/plaf/metal/MetalTabbedPaneUI.js,bin/javax/swing/plaf/metal/MetalTextFieldUI.js,bin/javax/swing/plaf/metal/MetalTheme.js,bin/javax/swing/plaf/metal/MetalTitlePane.js,bin/javax/swing/plaf/metal/MetalToggleButtonUI.js,bin/javax/swing/plaf/metal/MetalToolBarUI.js,bin/javax/swing/plaf/metal/MetalToolTipUI.js,bin/javax/swing/plaf/metal/MetalTreeUI.js,bin/javax/swing/plaf/metal/MetalUtils.js,bin/javax/swing/plaf/metal/OceanTheme.js,bin/javax/swing/plaf/multi/MultiButtonUI.js,bin/javax/swing/plaf/multi/MultiColorChooserUI.js,bin/javax/swing/plaf/multi/MultiComboBoxUI.js,bin/javax/swing/plaf/multi/MultiDesktopIconUI.js,bin/javax/swing/plaf/multi/MultiDesktopPaneUI.js,bin/javax/swing/plaf/multi/MultiFileChooserUI.js,bin/javax/swing/plaf/multi/MultiInternalFrameUI.js,bin/javax/swing/plaf/multi/MultiLabelUI.js,bin/javax/swing/plaf/multi/MultiListUI.js,bin/javax/swing/plaf/multi/MultiLookAndFeel.js,bin/javax/swing/plaf/multi/MultiMenuBarUI.js,bin/javax/swing/plaf/multi/MultiMenuItemUI.js,bin/javax/swing/plaf/multi/MultiOptionPaneUI.js,bin/javax/swing/plaf/multi/MultiPanelUI.js,bin/javax/swing/plaf/multi/MultiPopupMenuUI.js,bin/javax/swing/plaf/multi/MultiProgressBarUI.js,bin/javax/swing/plaf/multi/MultiRootPaneUI.js,bin/javax/swing/plaf/multi/MultiScrollBarUI.js,bin/javax/swing/plaf/multi/MultiScrollPaneUI.js,bin/javax/swing/plaf/multi/MultiSeparatorUI.js,bin/javax/swing/plaf/multi/MultiSliderUI.js,bin/javax/swing/plaf/multi/MultiSpinnerUI.js,bin/javax/swing/plaf/multi/MultiSplitPaneUI.js,bin/javax/swing/plaf/multi/MultiTabbedPaneUI.js,bin/javax/swing/plaf/multi/MultiTableHeaderUI.js,bin/javax/swing/plaf/multi/MultiTableUI.js,bin/javax/swing/plaf/multi/MultiTextUI.js,bin/javax/swing/plaf/multi/MultiToolBarUI.js,bin/javax/swing/plaf/multi/MultiToolTipUI.js,bin/javax/swing/plaf/multi/MultiTreeUI.js,bin/javax/swing/plaf/multi/MultiViewportUI.js,bin/javax/swing/plaf/synth/DefaultMenuLayout.js,bin/javax/swing/plaf/synth/ImagePainter.js,bin/javax/swing/plaf/synth/ParsedSynthStyle.js,bin/javax/swing/plaf/synth/SynthComboPopup.js,bin/javax/swing/plaf/synth/SynthInternalFrameTitlePane.js,bin/javax/swing/plaf/synth/SynthSplitPaneDivider.js,bin/javax/swing/text/AbstractWriter.js,bin/javax/swing/text/AsyncBoxView.js,bin/javax/swing/text/ChangedCharSetException.js,bin/javax/swing/text/DefaultFormatterFactory.js,bin/javax/swing/text/DefaultTextUI.js,bin/javax/swing/text/ElementIterator.js,bin/javax/swing/text/GapContent.js,bin/javax/swing/text/GapVector.js,bin/javax/swing/text/GlyphPainter1.js,bin/javax/swing/text/GlyphPainter2.js,bin/javax/swing/text/IconView.js,bin/javax/swing/text/LayoutQueue.js,bin/javax/swing/text/MaskFormatter.js,bin/javax/swing/text/StringContent.js,bin/javax/swing/text/TableView.js,bin/javax/swing/text/TextLayoutStrategy.js,bin/javax/swing/text/WhitespaceBasedBreakIterator.js,bin/javax/swing/text/ZoneView.js,bin/javax/swing/text/html/AccessibleHTML.js,bin/javax/swing/text/html/BRView.js,bin/javax/swing/text/html/CommentView.js,bin/javax/swing/text/html/EditableView.js,bin/javax/swing/text/html/FormSubmitEvent.js,bin/javax/swing/text/html/FormView.js,bin/javax/swing/text/html/FrameSetView.js,bin/javax/swing/text/html/FrameView.js,bin/javax/swing/text/html/HRuleView.js,bin/javax/swing/text/html/HTMLFrameHyperlinkEvent.js,bin/javax/swing/text/html/HTMLWriter.js,bin/javax/swing/text/html/HiddenTagView.js,bin/javax/swing/text/html/ImageView.js,bin/javax/swing/text/html/InlineView.js,bin/javax/swing/text/html/IsindexView.js,bin/javax/swing/text/html/LineView.js,bin/javax/swing/text/html/ListView.js,bin/javax/swing/text/html/Map.js,bin/javax/swing/text/html/MinimalHTMLWriter.js,bin/javax/swing/text/html/NoFramesView.js,bin/javax/swing/text/html/ObjectView.js,bin/javax/swing/text/html/Option.js,bin/javax/swing/text/html/OptionComboBoxModel.js,bin/javax/swing/text/html/OptionListModel.js,bin/javax/swing/text/html/ParagraphView.js,bin/javax/swing/text/html/ResourceLoader.js,bin/javax/swing/text/html/TableView.js,bin/javax/swing/text/html/TextAreaDocument.js,bin/javax/swing/text/html/parser/AttributeList.js,bin/javax/swing/text/html/parser/ContentModel.js,bin/javax/swing/text/html/parser/ContentModelState.js,bin/javax/swing/text/html/parser/DTD.js,bin/javax/swing/text/html/parser/DTDConstants.js,bin/javax/swing/text/html/parser/DocumentParser.js,bin/javax/swing/text/html/parser/Element.js,bin/javax/swing/text/html/parser/Entity.js,bin/javax/swing/text/html/parser/Parser.js,bin/javax/swing/text/html/parser/ParserDelegator.js,bin/javax/swing/text/html/parser/ResourceLoader.js,bin/javax/swing/text/html/parser/TagElement.js,bin/javax/swing/text/html/parser/TagStack.js,bin/javax/swing/text/rtf/AbstractFilter.js,bin/javax/swing/text/rtf/Constants.js,bin/javax/swing/text/rtf/MockAttributeSet.js,bin/javax/swing/text/rtf/RTFAttribute.js,bin/javax/swing/text/rtf/RTFAttributes.js,bin/javax/swing/text/rtf/RTFEditorKit.js,bin/javax/swing/text/rtf/RTFGenerator.js,bin/javax/swing/text/rtf/RTFParser.js,bin/javax/swing/text/rtf/RTFReader.js,bin/javax/swing/tree/ExpandVetoException.js,bin/javax/swing/undo/StateEdit.js,bin/javax/swing/undo/StateEditable.js,bin/javax/swing/undo/UndoManager.js,bin/javax/swing/undo/UndoableEditSupport.js,bin/javax/xml/crypto/AlgorithmMethod.js,bin/javax/xml/crypto/Data.js,bin/javax/xml/crypto/KeySelector.js,bin/javax/xml/crypto/KeySelectorException.js,bin/javax/xml/crypto/KeySelectorResult.js,bin/javax/xml/crypto/MarshalException.js,bin/javax/xml/crypto/NoSuchMechanismException.js,bin/javax/xml/crypto/NodeSetData.js,bin/javax/xml/crypto/OctetStreamData.js,bin/javax/xml/crypto/URIDereferencer.js,bin/javax/xml/crypto/URIReference.js,bin/javax/xml/crypto/URIReferenceException.js,bin/javax/xml/crypto/XMLCryptoContext.js,bin/javax/xml/crypto/XMLStructure.js,bin/javax/xml/crypto/dom/DOMCryptoContext.js,bin/javax/xml/crypto/dom/DOMStructure.js,bin/javax/xml/crypto/dom/DOMURIReference.js,bin/javax/xml/crypto/dsig/CanonicalizationMethod.js,bin/javax/xml/crypto/dsig/DigestMethod.js,bin/javax/xml/crypto/dsig/Manifest.js,bin/javax/xml/crypto/dsig/Reference.js,bin/javax/xml/crypto/dsig/SignatureMethod.js,bin/javax/xml/crypto/dsig/SignatureProperties.js,bin/javax/xml/crypto/dsig/SignatureProperty.js,bin/javax/xml/crypto/dsig/SignedInfo.js,bin/javax/xml/crypto/dsig/Transform.js,bin/javax/xml/crypto/dsig/TransformException.js,bin/javax/xml/crypto/dsig/TransformService.js,bin/javax/xml/crypto/dsig/XMLObject.js,bin/javax/xml/crypto/dsig/XMLSignContext.js,bin/javax/xml/crypto/dsig/XMLSignature.js,bin/javax/xml/crypto/dsig/XMLSignatureException.js,bin/javax/xml/crypto/dsig/XMLSignatureFactory.js,bin/javax/xml/crypto/dsig/XMLValidateContext.js,bin/javax/xml/crypto/dsig/dom/DOMSignContext.js,bin/javax/xml/crypto/dsig/dom/DOMValidateContext.js,bin/javax/xml/crypto/dsig/keyinfo/KeyInfo.js,bin/javax/xml/crypto/dsig/keyinfo/KeyInfoFactory.js,bin/javax/xml/crypto/dsig/keyinfo/KeyName.js,bin/javax/xml/crypto/dsig/keyinfo/KeyValue.js,bin/javax/xml/crypto/dsig/keyinfo/PGPData.js,bin/javax/xml/crypto/dsig/keyinfo/RetrievalMethod.js,bin/javax/xml/crypto/dsig/keyinfo/X509Data.js,bin/javax/xml/crypto/dsig/keyinfo/X509IssuerSerial.js,bin/javax/xml/crypto/dsig/spec/C14NMethodParameterSpec.js,bin/javax/xml/crypto/dsig/spec/DigestMethodParameterSpec.js,bin/javax/xml/crypto/dsig/spec/ExcC14NParameterSpec.js,bin/javax/xml/crypto/dsig/spec/HMACParameterSpec.js,bin/javax/xml/crypto/dsig/spec/SignatureMethodParameterSpec.js,bin/javax/xml/crypto/dsig/spec/TransformParameterSpec.js,bin/javax/xml/crypto/dsig/spec/XPathFilter2ParameterSpec.js,bin/javax/xml/crypto/dsig/spec/XPathFilterParameterSpec.js,bin/javax/xml/crypto/dsig/spec/XPathType.js,bin/javax/xml/crypto/dsig/spec/XSLTTransformParameterSpec.js,bin/org/ietf/jgss/ChannelBinding.js,bin/org/jcp/xml/dsig/internal/DigesterOutputStream.js,bin/org/jcp/xml/dsig/internal/MacOutputStream.js,bin/org/jcp/xml/dsig/internal/SignerOutputStream.js,bin/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.js,bin/org/jcp/xml/dsig/internal/dom/ApacheData.js,bin/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.js,bin/org/jcp/xml/dsig/internal/dom/ApacheOctetStreamData.js,bin/org/jcp/xml/dsig/internal/dom/ApacheTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMBase64Transform.js,bin/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14N11Method.js,bin/org/jcp/xml/dsig/internal/dom/DOMCanonicalXMLC14NMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMCanonicalizationMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.js,bin/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMEnvelopedTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyName.js,bin/org/jcp/xml/dsig/internal/dom/DOMKeyValue.js,bin/org/jcp/xml/dsig/internal/dom/DOMManifest.js,bin/org/jcp/xml/dsig/internal/dom/DOMPGPData.js,bin/org/jcp/xml/dsig/internal/dom/DOMReference.js,bin/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.js,bin/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.js,bin/org/jcp/xml/dsig/internal/dom/DOMStructure.js,bin/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.js,bin/org/jcp/xml/dsig/internal/dom/DOMTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.js,bin/org/jcp/xml/dsig/internal/dom/DOMUtils.js,bin/org/jcp/xml/dsig/internal/dom/DOMX509Data.js,bin/org/jcp/xml/dsig/internal/dom/DOMX509IssuerSerial.js,bin/org/jcp/xml/dsig/internal/dom/DOMXMLObject.js,bin/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.js,bin/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.js,bin/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.js,bin/org/jcp/xml/dsig/internal/dom/DOMXPathTransform.js,bin/org/jcp/xml/dsig/internal/dom/DOMXSLTTransform.js,bin/org/jcp/xml/dsig/internal/dom/Utils.js,bin/org/jcp/xml/dsig/internal/dom/XMLDSigRI.js,bin/sun/applet/AppletClassLoader.js,bin/sun/applet/AppletEvent.js,bin/sun/applet/AppletEventMulticaster.js,bin/sun/applet/AppletIOException.js,bin/sun/applet/AppletIllegalArgumentException.js,bin/sun/applet/AppletImageRef.js,bin/sun/applet/AppletListener.js,bin/sun/applet/AppletMessageHandler.js,bin/sun/applet/AppletObjectInputStream.js,bin/sun/applet/AppletPanel.js,bin/sun/applet/AppletProps.js,bin/sun/applet/AppletResourceLoader.js,bin/sun/applet/AppletSecurity.js,bin/sun/applet/AppletSecurityException.js,bin/sun/applet/AppletThreadGroup.js,bin/sun/applet/AppletViewer.js,bin/sun/applet/AppletViewerFactory.js,bin/sun/applet/AppletViewerPanel.js,bin/sun/applet/Main.js,bin/sun/applet/resources/MsgAppletViewer.js,bin/sun/applet/resources/MsgAppletViewer_de.js,bin/sun/applet/resources/MsgAppletViewer_es.js,bin/sun/applet/resources/MsgAppletViewer_fr.js,bin/sun/applet/resources/MsgAppletViewer_it.js,bin/sun/applet/resources/MsgAppletViewer_ja.js,bin/sun/applet/resources/MsgAppletViewer_ko.js,bin/sun/applet/resources/MsgAppletViewer_pt_BR.js,bin/sun/applet/resources/MsgAppletViewer_sv.js,bin/sun/applet/resources/MsgAppletViewer_zh_CN.js,bin/sun/applet/resources/MsgAppletViewer_zh_TW.js,bin/sun/audio/AudioData.js,bin/sun/audio/AudioDataStream.js,bin/sun/audio/AudioDevice.js,bin/sun/audio/AudioPlayer.js,bin/sun/audio/AudioSecurityAction.js,bin/sun/audio/AudioSecurityExceptionAction.js,bin/sun/audio/AudioStream.js,bin/sun/audio/AudioStreamSequence.js,bin/sun/audio/AudioTranslatorStream.js,bin/sun/audio/ContinuousAudioDataStream.js,bin/sun/audio/InvalidAudioFormatException.js,bin/sun/audio/NativeAudioStream.js,bin/sun/awt/AWTCharset.js,bin/sun/awt/AWTSecurityManager.js,bin/sun/awt/CharsetString.js,bin/sun/awt/ComponentAccessor.js,bin/sun/awt/CustomCursor.js,bin/sun/awt/FocusingTextField.js,bin/sun/awt/FontConfiguration.js,bin/sun/awt/FontDescriptor.js,bin/sun/awt/GlobalCursorManager.js,bin/sun/awt/HKSCS.js,bin/sun/awt/HorizBagLayout.js,bin/sun/awt/Mutex.js,bin/sun/awt/NativeLibLoader.js,bin/sun/awt/OrientableFlowLayout.js,bin/sun/awt/PaintEventDispatcher.js,bin/sun/awt/PlatformFont.js,bin/sun/awt/RepaintArea.js,bin/sun/awt/SunDisplayChanger.js,bin/sun/awt/Symbol.js,bin/sun/awt/TracedEventQueue.js,bin/sun/awt/VariableGridLayout.js,bin/sun/awt/VerticalBagLayout.js,bin/sun/awt/WindowAccessor.js,bin/sun/awt/WindowIDProvider.js,bin/sun/awt/datatransfer/ClipboardTransferable.js,bin/sun/awt/datatransfer/SunClipboard.js,bin/sun/awt/event/IgnorePaintEvent.js,bin/sun/awt/geom/ChainEnd.js,bin/sun/awt/geom/CurveLink.js,bin/sun/awt/geom/Edge.js,bin/sun/awt/geom/Order0.js,bin/sun/awt/geom/Order1.js,bin/sun/awt/geom/Order2.js,bin/sun/awt/geom/Order3.js,bin/sun/awt/im/CompositionAreaHandler.js,bin/sun/awt/im/InputMethodAdapter.js,bin/sun/awt/im/InputMethodJFrame.js,bin/sun/awt/im/InputMethodLocator.js,bin/sun/awt/im/InputMethodManager.js,bin/sun/awt/im/InputMethodPopupMenu.js,bin/sun/awt/image/BadDepthException.js,bin/sun/awt/image/BufImgSurfaceManager.js,bin/sun/awt/image/BufImgVolatileSurfaceManager.js,bin/sun/awt/image/BufferedImageDevice.js,bin/sun/awt/image/BufferedImageGraphicsConfig.js,bin/sun/awt/image/DataBufferNative.js,bin/sun/awt/image/GifImageDecoder.js,bin/sun/awt/image/ImageAccessException.js,bin/sun/awt/image/ImageConsumerQueue.js,bin/sun/awt/image/ImageDecoder.js,bin/sun/awt/image/ImageFetcher.js,bin/sun/awt/image/ImageFormatException.js,bin/sun/awt/image/JPEGImageDecoder.js,bin/sun/awt/image/NativeLibLoader.js,bin/sun/awt/image/OffScreenImage.js,bin/sun/awt/image/PNGImageDecoder.js,bin/sun/awt/image/PixelConverter.js,bin/sun/awt/image/VolatileSurfaceManager.js,bin/sun/awt/image/WritableRasterNative.js,bin/sun/awt/image/XbmImageDecoder.js,bin/sun/awt/shell/DefaultShellFolder.js,bin/sun/awt/shell/ShellFolderManager.js,bin/sun/dc/DuctusRenderingEngine.js,bin/sun/font/CMap.js,bin/sun/font/CharToGlyphMapper.js,bin/sun/font/CompositeFontDescriptor.js,bin/sun/font/CompositeGlyphMapper.js,bin/sun/font/CompositeStrike.js,bin/sun/font/DelegatingShape.js,bin/sun/font/ExtendedTextSourceLabel.js,bin/sun/font/FileFont.js,bin/sun/font/FileFontStrike.js,bin/sun/font/FontFamily.js,bin/sun/font/FontManagerNativeLibrary.js,bin/sun/font/FontRunIterator.js,bin/sun/font/FontScaler.js,bin/sun/font/FontScalerException.js,bin/sun/font/FontStrike.js,bin/sun/font/FontStrikeDesc.js,bin/sun/font/FontStrikeDisposer.js,bin/sun/font/FreetypeFontScaler.js,bin/sun/font/GlyphList.js,bin/sun/font/NullFontScaler.js,bin/sun/font/PhysicalFont.js,bin/sun/font/PhysicalStrike.js,bin/sun/font/Script.js,bin/sun/font/ScriptRun.js,bin/sun/font/ScriptRunData.js,bin/sun/font/StandardTextSource.js,bin/sun/font/StrikeCache.js,bin/sun/font/StrikeMetrics.js,bin/sun/font/SunLayoutEngine.js,bin/sun/font/TextRecord.js,bin/sun/font/TextSource.js,bin/sun/font/TextSourceLabel.js,bin/sun/font/TrueTypeFont.js,bin/sun/font/TrueTypeGlyphMapper.js,bin/sun/font/Type1Font.js,bin/sun/font/Type1GlyphMapper.js,bin/sun/font/Underline.js,bin/sun/instrument/InstrumentationImpl.js,bin/sun/instrument/TransformerManager.js,bin/sun/io/ByteToCharASCII.js,bin/sun/io/ByteToCharBig5.js,bin/sun/io/ByteToCharBig5_HKSCS.js,bin/sun/io/ByteToCharBig5_Solaris.js,bin/sun/io/ByteToCharConverter.js,bin/sun/io/ByteToCharCp037.js,bin/sun/io/ByteToCharCp1006.js,bin/sun/io/ByteToCharCp1025.js,bin/sun/io/ByteToCharCp1026.js,bin/sun/io/ByteToCharCp1046.js,bin/sun/io/ByteToCharCp1047.js,bin/sun/io/ByteToCharCp1097.js,bin/sun/io/ByteToCharCp1098.js,bin/sun/io/ByteToCharCp1112.js,bin/sun/io/ByteToCharCp1122.js,bin/sun/io/ByteToCharCp1123.js,bin/sun/io/ByteToCharCp1124.js,bin/sun/io/ByteToCharCp1140.js,bin/sun/io/ByteToCharCp1141.js,bin/sun/io/ByteToCharCp1142.js,bin/sun/io/ByteToCharCp1143.js,bin/sun/io/ByteToCharCp1144.js,bin/sun/io/ByteToCharCp1145.js,bin/sun/io/ByteToCharCp1146.js,bin/sun/io/ByteToCharCp1147.js,bin/sun/io/ByteToCharCp1148.js,bin/sun/io/ByteToCharCp1149.js,bin/sun/io/ByteToCharCp1250.js,bin/sun/io/ByteToCharCp1251.js,bin/sun/io/ByteToCharCp1252.js,bin/sun/io/ByteToCharCp1253.js,bin/sun/io/ByteToCharCp1254.js,bin/sun/io/ByteToCharCp1255.js,bin/sun/io/ByteToCharCp1256.js,bin/sun/io/ByteToCharCp1257.js,bin/sun/io/ByteToCharCp1258.js,bin/sun/io/ByteToCharCp1381.js,bin/sun/io/ByteToCharCp1383.js,bin/sun/io/ByteToCharCp273.js,bin/sun/io/ByteToCharCp277.js,bin/sun/io/ByteToCharCp278.js,bin/sun/io/ByteToCharCp280.js,bin/sun/io/ByteToCharCp284.js,bin/sun/io/ByteToCharCp285.js,bin/sun/io/ByteToCharCp297.js,bin/sun/io/ByteToCharCp33722.js,bin/sun/io/ByteToCharCp420.js,bin/sun/io/ByteToCharCp424.js,bin/sun/io/ByteToCharCp437.js,bin/sun/io/ByteToCharCp500.js,bin/sun/io/ByteToCharCp737.js,bin/sun/io/ByteToCharCp775.js,bin/sun/io/ByteToCharCp834.js,bin/sun/io/ByteToCharCp838.js,bin/sun/io/ByteToCharCp850.js,bin/sun/io/ByteToCharCp852.js,bin/sun/io/ByteToCharCp855.js,bin/sun/io/ByteToCharCp856.js,bin/sun/io/ByteToCharCp857.js,bin/sun/io/ByteToCharCp858.js,bin/sun/io/ByteToCharCp860.js,bin/sun/io/ByteToCharCp861.js,bin/sun/io/ByteToCharCp862.js,bin/sun/io/ByteToCharCp863.js,bin/sun/io/ByteToCharCp864.js,bin/sun/io/ByteToCharCp865.js,bin/sun/io/ByteToCharCp866.js,bin/sun/io/ByteToCharCp868.js,bin/sun/io/ByteToCharCp869.js,bin/sun/io/ByteToCharCp870.js,bin/sun/io/ByteToCharCp871.js,bin/sun/io/ByteToCharCp874.js,bin/sun/io/ByteToCharCp875.js,bin/sun/io/ByteToCharCp918.js,bin/sun/io/ByteToCharCp921.js,bin/sun/io/ByteToCharCp922.js,bin/sun/io/ByteToCharCp930.js,bin/sun/io/ByteToCharCp933.js,bin/sun/io/ByteToCharCp935.js,bin/sun/io/ByteToCharCp937.js,bin/sun/io/ByteToCharCp939.js,bin/sun/io/ByteToCharCp942.js,bin/sun/io/ByteToCharCp942C.js,bin/sun/io/ByteToCharCp943.js,bin/sun/io/ByteToCharCp943C.js,bin/sun/io/ByteToCharCp948.js,bin/sun/io/ByteToCharCp949.js,bin/sun/io/ByteToCharCp949C.js,bin/sun/io/ByteToCharCp950.js,bin/sun/io/ByteToCharCp964.js,bin/sun/io/ByteToCharCp970.js,bin/sun/io/ByteToCharDBCS_ASCII.js,bin/sun/io/ByteToCharDBCS_EBCDIC.js,bin/sun/io/ByteToCharDoubleByte.js,bin/sun/io/ByteToCharEUC.js,bin/sun/io/ByteToCharEUC_CN.js,bin/sun/io/ByteToCharEUC_JP.js,bin/sun/io/ByteToCharEUC_JP_LINUX.js,bin/sun/io/ByteToCharEUC_JP_Solaris.js,bin/sun/io/ByteToCharEUC_KR.js,bin/sun/io/ByteToCharEUC_TW.js,bin/sun/io/ByteToCharGB18030.js,bin/sun/io/ByteToCharGB18030DB.js,bin/sun/io/ByteToCharGBK.js,bin/sun/io/ByteToCharHKSCS.js,bin/sun/io/ByteToCharHKSCS_2001.js,bin/sun/io/ByteToCharISCII91.js,bin/sun/io/ByteToCharISO2022.js,bin/sun/io/ByteToCharISO2022CN.js,bin/sun/io/ByteToCharISO2022JP.js,bin/sun/io/ByteToCharISO2022KR.js,bin/sun/io/ByteToCharISO8859_1.js,bin/sun/io/ByteToCharISO8859_13.js,bin/sun/io/ByteToCharISO8859_15.js,bin/sun/io/ByteToCharISO8859_2.js,bin/sun/io/ByteToCharISO8859_3.js,bin/sun/io/ByteToCharISO8859_4.js,bin/sun/io/ByteToCharISO8859_5.js,bin/sun/io/ByteToCharISO8859_6.js,bin/sun/io/ByteToCharISO8859_7.js,bin/sun/io/ByteToCharISO8859_8.js,bin/sun/io/ByteToCharISO8859_9.js,bin/sun/io/ByteToCharJIS0201.js,bin/sun/io/ByteToCharJIS0208.js,bin/sun/io/ByteToCharJIS0208_Solaris.js,bin/sun/io/ByteToCharJIS0212.js,bin/sun/io/ByteToCharJIS0212_Solaris.js,bin/sun/io/ByteToCharJISAutoDetect.js,bin/sun/io/ByteToCharJohab.js,bin/sun/io/ByteToCharKOI8_R.js,bin/sun/io/ByteToCharMS874.js,bin/sun/io/ByteToCharMS932.js,bin/sun/io/ByteToCharMS932DB.js,bin/sun/io/ByteToCharMS936.js,bin/sun/io/ByteToCharMS949.js,bin/sun/io/ByteToCharMS950.js,bin/sun/io/ByteToCharMS950_HKSCS.js,bin/sun/io/ByteToCharMacArabic.js,bin/sun/io/ByteToCharMacCentralEurope.js,bin/sun/io/ByteToCharMacCroatian.js,bin/sun/io/ByteToCharMacCyrillic.js,bin/sun/io/ByteToCharMacDingbat.js,bin/sun/io/ByteToCharMacGreek.js,bin/sun/io/ByteToCharMacHebrew.js,bin/sun/io/ByteToCharMacIceland.js,bin/sun/io/ByteToCharMacRoman.js,bin/sun/io/ByteToCharMacRomania.js,bin/sun/io/ByteToCharMacSymbol.js,bin/sun/io/ByteToCharMacThai.js,bin/sun/io/ByteToCharMacTurkish.js,bin/sun/io/ByteToCharMacUkraine.js,bin/sun/io/ByteToCharPCK.js,bin/sun/io/ByteToCharSJIS.js,bin/sun/io/ByteToCharSingleByte.js,bin/sun/io/ByteToCharTIS620.js,bin/sun/io/ByteToCharUTF16.js,bin/sun/io/ByteToCharUTF8.js,bin/sun/io/ByteToCharUnicode.js,bin/sun/io/ByteToCharUnicodeBig.js,bin/sun/io/ByteToCharUnicodeBigUnmarked.js,bin/sun/io/ByteToCharUnicodeLittle.js,bin/sun/io/ByteToCharUnicodeLittleUnmarked.js,bin/sun/io/CharToByteASCII.js,bin/sun/io/CharToByteBig5.js,bin/sun/io/CharToByteBig5_HKSCS.js,bin/sun/io/CharToByteBig5_Solaris.js,bin/sun/io/CharToByteConverter.js,bin/sun/io/CharToByteCp037.js,bin/sun/io/CharToByteCp1006.js,bin/sun/io/CharToByteCp1025.js,bin/sun/io/CharToByteCp1026.js,bin/sun/io/CharToByteCp1046.js,bin/sun/io/CharToByteCp1047.js,bin/sun/io/CharToByteCp1097.js,bin/sun/io/CharToByteCp1098.js,bin/sun/io/CharToByteCp1112.js,bin/sun/io/CharToByteCp1122.js,bin/sun/io/CharToByteCp1123.js,bin/sun/io/CharToByteCp1124.js,bin/sun/io/CharToByteCp1140.js,bin/sun/io/CharToByteCp1141.js,bin/sun/io/CharToByteCp1142.js,bin/sun/io/CharToByteCp1143.js,bin/sun/io/CharToByteCp1144.js,bin/sun/io/CharToByteCp1145.js,bin/sun/io/CharToByteCp1146.js,bin/sun/io/CharToByteCp1147.js,bin/sun/io/CharToByteCp1148.js,bin/sun/io/CharToByteCp1149.js,bin/sun/io/CharToByteCp1250.js,bin/sun/io/CharToByteCp1251.js,bin/sun/io/CharToByteCp1252.js,bin/sun/io/CharToByteCp1253.js,bin/sun/io/CharToByteCp1254.js,bin/sun/io/CharToByteCp1255.js,bin/sun/io/CharToByteCp1256.js,bin/sun/io/CharToByteCp1257.js,bin/sun/io/CharToByteCp1258.js,bin/sun/io/CharToByteCp1381.js,bin/sun/io/CharToByteCp1383.js,bin/sun/io/CharToByteCp273.js,bin/sun/io/CharToByteCp277.js,bin/sun/io/CharToByteCp278.js,bin/sun/io/CharToByteCp280.js,bin/sun/io/CharToByteCp284.js,bin/sun/io/CharToByteCp285.js,bin/sun/io/CharToByteCp297.js,bin/sun/io/CharToByteCp33722.js,bin/sun/io/CharToByteCp420.js,bin/sun/io/CharToByteCp424.js,bin/sun/io/CharToByteCp437.js,bin/sun/io/CharToByteCp500.js,bin/sun/io/CharToByteCp737.js,bin/sun/io/CharToByteCp775.js,bin/sun/io/CharToByteCp834.js,bin/sun/io/CharToByteCp838.js,bin/sun/io/CharToByteCp850.js,bin/sun/io/CharToByteCp852.js,bin/sun/io/CharToByteCp855.js,bin/sun/io/CharToByteCp856.js,bin/sun/io/CharToByteCp857.js,bin/sun/io/CharToByteCp858.js,bin/sun/io/CharToByteCp860.js,bin/sun/io/CharToByteCp861.js,bin/sun/io/CharToByteCp862.js,bin/sun/io/CharToByteCp863.js,bin/sun/io/CharToByteCp864.js,bin/sun/io/CharToByteCp865.js,bin/sun/io/CharToByteCp866.js,bin/sun/io/CharToByteCp868.js,bin/sun/io/CharToByteCp869.js,bin/sun/io/CharToByteCp870.js,bin/sun/io/CharToByteCp871.js,bin/sun/io/CharToByteCp874.js,bin/sun/io/CharToByteCp875.js,bin/sun/io/CharToByteCp918.js,bin/sun/io/CharToByteCp921.js,bin/sun/io/CharToByteCp922.js,bin/sun/io/CharToByteCp930.js,bin/sun/io/CharToByteCp933.js,bin/sun/io/CharToByteCp935.js,bin/sun/io/CharToByteCp937.js,bin/sun/io/CharToByteCp939.js,bin/sun/io/CharToByteCp942.js,bin/sun/io/CharToByteCp942C.js,bin/sun/io/CharToByteCp943.js,bin/sun/io/CharToByteCp943C.js,bin/sun/io/CharToByteCp948.js,bin/sun/io/CharToByteCp949.js,bin/sun/io/CharToByteCp949C.js,bin/sun/io/CharToByteCp950.js,bin/sun/io/CharToByteCp964.js,bin/sun/io/CharToByteCp970.js,bin/sun/io/CharToByteDBCS_ASCII.js,bin/sun/io/CharToByteDBCS_EBCDIC.js,bin/sun/io/CharToByteDoubleByte.js,bin/sun/io/CharToByteEUC.js,bin/sun/io/CharToByteEUC_CN.js,bin/sun/io/CharToByteEUC_JP.js,bin/sun/io/CharToByteEUC_JP_LINUX.js,bin/sun/io/CharToByteEUC_JP_Solaris.js,bin/sun/io/CharToByteEUC_KR.js,bin/sun/io/CharToByteEUC_TW.js,bin/sun/io/CharToByteGB18030.js,bin/sun/io/CharToByteGBK.js,bin/sun/io/CharToByteHKSCS.js,bin/sun/io/CharToByteHKSCS_2001.js,bin/sun/io/CharToByteISCII91.js,bin/sun/io/CharToByteISO2022.js,bin/sun/io/CharToByteISO2022CN_CNS.js,bin/sun/io/CharToByteISO2022CN_GB.js,bin/sun/io/CharToByteISO2022JP.js,bin/sun/io/CharToByteISO2022KR.js,bin/sun/io/CharToByteISO8859_1.js,bin/sun/io/CharToByteISO8859_13.js,bin/sun/io/CharToByteISO8859_15.js,bin/sun/io/CharToByteISO8859_2.js,bin/sun/io/CharToByteISO8859_3.js,bin/sun/io/CharToByteISO8859_4.js,bin/sun/io/CharToByteISO8859_5.js,bin/sun/io/CharToByteISO8859_6.js,bin/sun/io/CharToByteISO8859_7.js,bin/sun/io/CharToByteISO8859_8.js,bin/Native.js,bin/Security.js,bin/Toolkit.js,bin/PriviledgedAction.js,bin/PrivilegedAction.js,bin/JSToolkit.js,bin/ToolkitNative.js,bin/test/JSToolkit.js,bin/test/PrivilegedAction.js,bin/test/Security.js,bin/test/Toolkit.js,bin/test/AccessController.js,bin/CellListener.js,bin/LifeCells.js,bin/MainWindow.js,bin/Neighbor.js,bin/SimulationListener.js,bin/TanSugd3.js,bin/TanSugd3S.js,bin/test/Point2D.js,bin/jalview/ws/uimodel/PDBRestResponse.js,bin/jalview/ws/uimodel/PDBRestRequest.js,bin/jalview/ws/uimodel/AlignAnalysisUIText.js,bin/jalview/ws/seqfetcher/DbSourceProxyImpl.js,bin/jalview/ws/seqfetcher/DbSourceProxy.js,bin/jalview/ws/seqfetcher/ASequenceFetcher.js,bin/jalview/ws/rest/params/Tree.js,bin/jalview/ws/rest/params/SeqVector.js,bin/jalview/ws/rest/params/SeqIdVector.js,bin/jalview/ws/rest/params/SeqGroupIndexVector.js,bin/jalview/ws/rest/params/JobConstant.js,bin/jalview/ws/rest/params/AnnotationFile.js,bin/jalview/ws/rest/params/Alignment.js,bin/jalview/ws/rest/RestServiceDescription.js,bin/jalview/ws/rest/RestJobThread.js,bin/jalview/ws/rest/RestJob.js,bin/jalview/ws/rest/RestClient.js,bin/jalview/ws/rest/NoValidInputDataException.js,bin/jalview/ws/rest/InputType.js,bin/jalview/ws/rest/HttpResultSet.js,bin/jalview/ws/rest/AlignmentProcessor.js,bin/jalview/ws/params/simple/StringChoiceParameter.js,bin/jalview/ws/params/simple/Parameter.js,bin/jalview/ws/params/simple/Option.js,bin/jalview/ws/params/simple/IntegerParameter.js,bin/jalview/ws/params/simple/BooleanOption.js,bin/jalview/ws/params/WsParamSetI.js,bin/jalview/ws/params/ValueConstrainI.js,bin/jalview/ws/params/ParameterI.js,bin/jalview/ws/params/ParamManager.js,bin/jalview/ws/params/ParamDatastoreI.js,bin/jalview/ws/params/OptionI.js,bin/jalview/ws/params/InvalidArgumentException.js,bin/jalview/ws/params/AutoCalcSetting.js,bin/jalview/ws/params/ArgumentI.js,bin/jalview/ws/jws2/jabaws2/Jws2InstanceFactory.js,bin/jalview/ws/jws2/jabaws2/Jws2Instance.js,bin/jalview/ws/jws2/dm/JabaWsParamSet.js,bin/jalview/ws/jws2/dm/JabaValueConstrain.js,bin/jalview/ws/jws2/dm/JabaParameter.js,bin/jalview/ws/jws2/dm/JabaOption.js,bin/jalview/ws/jws2/dm/AAConSettings.js,bin/jalview/ws/jws2/SequenceAnnotationWSClient.js,bin/jalview/ws/jws2/RNAalifoldClient.js,bin/jalview/ws/jws2/ParameterUtils.js,bin/jalview/ws/jws2/MsaWSThread.js,bin/jalview/ws/jws2/MsaWSClient.js,bin/jalview/ws/jws2/Jws2Discoverer.js,bin/jalview/ws/jws2/Jws2Client.js,bin/jalview/ws/jws2/JabawsMsaInterfaceAlignCalcWorker.js,bin/jalview/ws/jws2/JabawsCalcWorker.js,bin/jalview/ws/jws2/JabaWsServerQuery.js,bin/jalview/ws/jws2/JabaPreset.js,bin/jalview/ws/jws2/JabaParamStore.js,bin/jalview/ws/jws2/JWs2Job.js,bin/jalview/ws/jws2/JPred301Client.js,bin/jalview/ws/jws2/AbstractJabaCalcWorker.js,bin/jalview/ws/jws2/AWS2Thread.js,bin/jalview/ws/jws2/AADisorderClient.js,bin/jalview/ws/jws2/AAConClient.js,bin/jalview/ws/jws1/WSJob.js,bin/jalview/ws/jws1/WS1Client.js,bin/jalview/ws/jws1/SeqSearchWSThread.js,bin/jalview/ws/jws1/SeqSearchWSClient.js,bin/jalview/ws/jws1/MsaWSThread.js,bin/jalview/ws/jws1/MsaWSClient.js,bin/jalview/ws/jws1/JWS1Thread.js,bin/jalview/ws/jws1/JPredThread.js,bin/jalview/ws/jws1/JPredClient.js,bin/jalview/ws/jws1/Discoverer.js,bin/jalview/ws/jws1/Annotate3D.js,bin/jalview/ws/io/mime/MimeTypes.js,bin/jalview/ws/io/mime/JalviewMimeContentHandler.js,bin/jalview/ws/io/mime/HttpContentHandler.js,bin/jalview/ws/ebi/EBIFetchClient.js,bin/jalview/ws/dbsources/das/datamodel/JalviewSource.js,bin/jalview/ws/dbsources/das/datamodel/DasSourceRegistry.js,bin/jalview/ws/dbsources/das/datamodel/DasSequenceSource.js,bin/jalview/ws/dbsources/das/api/jalviewSourceI.js,bin/jalview/ws/dbsources/das/api/DasSourceRegistryI.js,bin/jalview/ws/dbsources/Xfam.js,bin/jalview/ws/dbsources/UnprotName.js,bin/jalview/ws/dbsources/Uniprot.js,bin/jalview/ws/dbsources/RfamSeed.js,bin/jalview/ws/dbsources/RfamFull.js,bin/jalview/ws/dbsources/Rfam.js,bin/jalview/ws/dbsources/PfamSeed.js,bin/jalview/ws/dbsources/PfamFull.js,bin/jalview/ws/dbsources/Pfam.js,bin/jalview/ws/dbsources/Pdb.js,bin/jalview/ws/dbsources/PDBRestClient.js,bin/jalview/ws/dbsources/GeneDbSource.js,bin/jalview/ws/dbsources/EmblXmlSource.js,bin/jalview/ws/dbsources/EmblSource.js,bin/jalview/ws/dbsources/EmblCdsSouce.js,bin/jalview/ws/dbsources/EbiFileRetrievedProxy.js,bin/jalview/ws/WSMenuEntryProviderI.js,bin/jalview/ws/WSClientI.js,bin/jalview/ws/WSClient.js,bin/jalview/ws/SequenceFetcher.js,bin/jalview/ws/JobStateSummary.js,bin/jalview/ws/HttpClientUtils.js,bin/jalview/ws/DasSequenceFeatureFetcher.js,bin/jalview/ws/DBRefFetcher.js,bin/jalview/ws/AWsJob.js,bin/jalview/ws/AWSThread.js,bin/jalview/workers/StrucConsensusThread.js,bin/jalview/workers/ConservationThread.js,bin/jalview/workers/ConsensusThread.js,bin/jalview/workers/ComplementConsensusThread.js,bin/jalview/workers/AlignCalcWorker.js,bin/jalview/workers/AlignCalcManager.js,bin/jalview/viewmodel/styles/ViewStyle.js,bin/jalview/viewmodel/seqfeatures/FeaturesDisplayed.js,bin/jalview/viewmodel/seqfeatures/FeatureSettingsModel.js,bin/jalview/viewmodel/seqfeatures/FeatureRendererSettings.js,bin/jalview/viewmodel/seqfeatures/FeatureRendererModel.js,bin/jalview/viewmodel/annotationfilter/AnnotationFilterParameter.js,bin/jalview/viewmodel/PCAModel.js,bin/jalview/viewmodel/AlignmentViewport.js,bin/jalview/util/jarInputStreamProvider.js,bin/jalview/util/UrlLink.js,bin/jalview/util/TableSorter.js,bin/jalview/util/StringUtils.js,bin/jalview/util/ShiftList.js,bin/jalview/util/ReverseListIterator.js,bin/jalview/util/QuickSort.js,bin/jalview/util/Platform.js,bin/jalview/util/ParseHtmlBodyAndLinks.js,bin/jalview/util/MessageManager.js,bin/jalview/util/MappingUtils.js,bin/jalview/util/MapList.js,bin/jalview/util/ImageMaker.js,bin/jalview/util/GroupUrlLink.js,bin/jalview/util/Format.js,bin/jalview/util/DBRefUtils.js,bin/jalview/util/Comparison.js,bin/jalview/util/ColorUtils.js,bin/jalview/util/BrowserLauncher.js,bin/jalview/util/AWTConsole.js,bin/jalview/structures/models/SequenceStructureBindingModel.js,bin/jalview/structures/models/AAStructureBindingModel.js,bin/jalview/structure/VamsasSource.js,bin/jalview/structure/VamsasListener.js,bin/jalview/structure/StructureSelectionManager.js,bin/jalview/structure/StructureMappingcommandSet.js,bin/jalview/structure/StructureMapping.js,bin/jalview/structure/StructureListener.js,bin/jalview/structure/SequenceListener.js,bin/jalview/structure/SelectionSource.js,bin/jalview/structure/SelectionListener.js,bin/jalview/structure/SecondaryStructureListener.js,bin/jalview/structure/CommandListener.js,bin/jalview/structure/AtomSpec.js,bin/jalview/structure/AlignmentViewPanelListener.js,bin/jalview/schemes/ZappoColourScheme.js,bin/jalview/schemes/UserColourScheme.js,bin/jalview/schemes/TurnColourScheme.js,bin/jalview/schemes/TaylorColourScheme.js,bin/jalview/schemes/TCoffeeColourScheme.js,bin/jalview/schemes/StrandColourScheme.js,bin/jalview/schemes/ScoreMatrix.js,bin/jalview/schemes/ScoreColourScheme.js,bin/jalview/schemes/ResidueProperties.js,bin/jalview/schemes/ResidueColourScheme.js,bin/jalview/schemes/RNAInteractionColourScheme.js,bin/jalview/schemes/RNAHelicesColourChooser.js,bin/jalview/schemes/RNAHelicesColour.js,bin/jalview/schemes/PurinePyrimidineColourScheme.js,bin/jalview/schemes/PIDColourScheme.js,bin/jalview/schemes/NucleotideColourScheme.js,bin/jalview/schemes/HydrophobicColourScheme.js,bin/jalview/schemes/HelixColourScheme.js,bin/jalview/schemes/GraduatedColor.js,bin/jalview/schemes/FollowerColourScheme.js,bin/jalview/schemes/CovariationColourScheme.js,bin/jalview/schemes/Consensus.js,bin/jalview/schemes/ColourSchemeProperty.js,bin/jalview/schemes/ColourSchemeI.js,bin/jalview/schemes/ClustalxColourScheme.js,bin/jalview/schemes/BuriedColourScheme.js,bin/jalview/schemes/Blosum62ColourScheme.js,bin/jalview/schemes/AnnotationColourGradient.js,bin/jalview/schemabinding/version2/descriptors/WebServiceParameterSetDescriptor.js,bin/jalview/schemabinding/version2/descriptors/ViewportDescriptor.js,bin/jalview/schemabinding/version2/descriptors/VamsasModelDescriptor.js,bin/jalview/schemabinding/version2/descriptors/VAMSASDescriptor.js,bin/jalview/schemabinding/version2/descriptors/UserColoursDescriptor.js,bin/jalview/schemabinding/version2/descriptors/UserColourSchemeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/TreeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/ThresholdLineDescriptor.js,bin/jalview/schemabinding/version2/descriptors/StructureStateDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SettingDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceTypeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceSetPropertiesDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceSetDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SequenceDescriptor.js,bin/jalview/schemabinding/version2/descriptors/SecondaryStructureDescriptor.js,bin/jalview/schemabinding/version2/descriptors/RnaViewerDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PropertyDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PdbidsDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PdbentryItemDescriptor.js,bin/jalview/schemabinding/version2/descriptors/PdbentryDescriptor.js,bin/jalview/schemabinding/version2/descriptors/OtherDataDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MappingDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MappingChoiceDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MapListTypeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MapListToDescriptor.js,bin/jalview/schemabinding/version2/descriptors/MapListFromDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JalviewUserColoursDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JalviewModelSequenceDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JalviewModelDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JSeqDescriptor.js,bin/jalview/schemabinding/version2/descriptors/JGroupDescriptor.js,bin/jalview/schemabinding/version2/descriptors/HiddenColumnsDescriptor.js,bin/jalview/schemabinding/version2/descriptors/GroupDescriptor.js,bin/jalview/schemabinding/version2/descriptors/FeaturesDescriptor.js,bin/jalview/schemabinding/version2/descriptors/FeatureSettingsDescriptor.js,bin/jalview/schemabinding/version2/descriptors/FeatureDescriptor.js,bin/jalview/schemabinding/version2/descriptors/DBRefDescriptor.js,bin/jalview/schemabinding/version2/descriptors/ColourDescriptor.js,bin/jalview/schemabinding/version2/descriptors/CalcIdParamDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationElementDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationColoursDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AnnotationColourSchemeDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AlcodonFrameDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AlcodonDescriptor.js,bin/jalview/schemabinding/version2/descriptors/AlcodMapDescriptor.js,bin/jalview/schemabinding/version2/WebServiceParameterSet.js,bin/jalview/schemabinding/version2/Viewport.js,bin/jalview/schemabinding/version2/VamsasModel.js,bin/jalview/schemabinding/version2/VAMSAS.js,bin/jalview/schemabinding/version2/UserColours.js,bin/jalview/schemabinding/version2/UserColourScheme.js,bin/jalview/schemabinding/version2/Tree.js,bin/jalview/schemabinding/version2/ThresholdLine.js,bin/jalview/schemabinding/version2/StructureState.js,bin/jalview/schemabinding/version2/Setting.js,bin/jalview/schemabinding/version2/SequenceType.js,bin/jalview/schemabinding/version2/SequenceSetProperties.js,bin/jalview/schemabinding/version2/SequenceSet.js,bin/jalview/schemabinding/version2/Sequence.js,bin/jalview/schemabinding/version2/SecondaryStructure.js,bin/jalview/schemabinding/version2/RnaViewer.js,bin/jalview/schemabinding/version2/Property.js,bin/jalview/schemabinding/version2/Pdbids.js,bin/jalview/schemabinding/version2/PdbentryItem.js,bin/jalview/schemabinding/version2/Pdbentry.js,bin/jalview/schemabinding/version2/OtherData.js,bin/jalview/schemabinding/version2/MappingChoice.js,bin/jalview/schemabinding/version2/Mapping.js,bin/jalview/schemabinding/version2/MapListType.js,bin/jalview/schemabinding/version2/MapListTo.js,bin/jalview/schemabinding/version2/MapListFrom.js,bin/jalview/schemabinding/version2/JalviewUserColours.js,bin/jalview/schemabinding/version2/JalviewModelSequence.js,bin/jalview/schemabinding/version2/JalviewModel.js,bin/jalview/schemabinding/version2/JSeq.js,bin/jalview/schemabinding/version2/JGroup.js,bin/jalview/schemabinding/version2/HiddenColumns.js,bin/jalview/schemabinding/version2/Group.js,bin/jalview/schemabinding/version2/Features.js,bin/jalview/schemabinding/version2/FeatureSettings.js,bin/jalview/schemabinding/version2/Feature.js,bin/jalview/schemabinding/version2/DBRef.js,bin/jalview/schemabinding/version2/Colour.js,bin/jalview/schemabinding/version2/CalcIdParam.js,bin/jalview/schemabinding/version2/AnnotationElement.js,bin/jalview/schemabinding/version2/AnnotationColours.js,bin/jalview/schemabinding/version2/AnnotationColourScheme.js,bin/jalview/schemabinding/version2/Annotation.js,bin/jalview/schemabinding/version2/AlcodonFrame.js,bin/jalview/schemabinding/version2/Alcodon.js,bin/jalview/schemabinding/version2/AlcodMap.js,bin/jalview/rest/RestHandler.js,bin/jalview/renderer/seqfeatures/FeatureRenderer.js,bin/jalview/renderer/AwtRenderPanelI.js,bin/jalview/renderer/AnnotationRenderer.js,bin/jalview/math/RotatableMatrix.js,bin/jalview/math/Matrix.js,bin/jalview/math/AlignmentDimension.js,bin/jalview/json/binding/v1/SequencePojo.js,bin/jalview/json/binding/v1/SequenceGrpPojo.js,bin/jalview/json/binding/v1/SequenceFeaturesPojo.js,bin/jalview/json/binding/v1/BioJSRepositoryPojo.js,bin/jalview/json/binding/v1/BioJSReleasePojo.js,bin/jalview/json/binding/v1/AppSettingsPojo.js,bin/jalview/json/binding/v1/AnnotationPojo.js,bin/jalview/json/binding/v1/AlignmentPojo.js,bin/jalview/json/binding/v1/AlignmentAnnotationPojo.js,bin/jalview/jbgui/PDBDocFieldPreferences.js,bin/jalview/jbgui/GWsPreferences.js,bin/jalview/jbgui/GWebserviceInfo.js,bin/jalview/jbgui/GUserDefinedColours.js,bin/jalview/jbgui/GTreePanel.js,bin/jalview/jbgui/GStructureViewer.js,bin/jalview/jbgui/GStructureChooser.js,bin/jalview/jbgui/GSplitFrame.js,bin/jalview/jbgui/GSliderPanel.js,bin/jalview/jbgui/GSequenceLink.js,bin/jalview/jbgui/GRnaStructureViewer.js,bin/jalview/jbgui/GRestServiceEditorPane.js,bin/jalview/jbgui/GRestInputParamEditDialog.js,bin/jalview/jbgui/GPreferences.js,bin/jalview/jbgui/GPairwiseAlignPanel.js,bin/jalview/jbgui/GPDBSearchPanel.js,bin/jalview/jbgui/GPCAPanel.js,bin/jalview/jbgui/GFontChooser.js,bin/jalview/jbgui/GFinder.js,bin/jalview/jbgui/GDesktop.js,bin/jalview/jbgui/GDasSourceBrowser.js,bin/jalview/jbgui/GCutAndPasteTransfer.js,bin/jalview/jbgui/GCutAndPasteHtmlTransfer.js,bin/jalview/jbgui/GAlignmentPanel.js,bin/jalview/jbgui/GAlignFrame.js,bin/jalview/jbgui/GAlignExportSettings.js,bin/jalview/javascript/MouseOverStructureListener.js,bin/jalview/javascript/MouseOverListener.js,bin/jalview/javascript/JsSelectionSender.js,bin/jalview/javascript/JsCallBack.js,bin/jalview/javascript/JalviewLiteJsApi.js,bin/jalview/javascript/JSFunctionExec.js,bin/jalview/io/vamsas/Tree.js,bin/jalview/io/vamsas/Sequencemapping.js,bin/jalview/io/vamsas/Sequencefeature.js,bin/jalview/io/vamsas/Rangetype.js,bin/jalview/io/vamsas/LocalDocSyncObject.js,bin/jalview/io/vamsas/Dbref.js,bin/jalview/io/vamsas/DatastoreRegistry.js,bin/jalview/io/vamsas/DatastoreItem.js,bin/jalview/io/vamsas/Datasetsequence.js,bin/jalview/io/packed/SimpleDataProvider.js,bin/jalview/io/packed/ParsePackedSet.js,bin/jalview/io/packed/JalviewDataset.js,bin/jalview/io/packed/DataProvider.js,bin/jalview/io/WSWUBlastClient.js,bin/jalview/io/VamsasAppDatastore.js,bin/jalview/io/TCoffeeScoreFile.js,bin/jalview/io/StockholmFile.js,bin/jalview/io/SimpleBlastFile.js,bin/jalview/io/SequenceAnnotationReport.js,bin/jalview/io/RnamlFile.js,bin/jalview/io/PileUpfile.js,bin/jalview/io/PhylipFile.js,bin/jalview/io/PfamFile.js,bin/jalview/io/PIRFile.js,bin/jalview/io/NewickFile.js,bin/jalview/io/ModellerDescription.js,bin/jalview/io/MatrixFile.js,bin/jalview/io/MSFfile.js,bin/jalview/io/JnetAnnotationMaker.js,bin/jalview/io/JalviewFileView.js,bin/jalview/io/JalviewFileFilter.js,bin/jalview/io/JalviewFileChooser.js,bin/jalview/io/JSONFile.js,bin/jalview/io/JPredFile.js,bin/jalview/io/InputStreamParser.js,bin/jalview/io/IdentifyFile.js,bin/jalview/io/HtmlSvgOutput.js,bin/jalview/io/HtmlFile.js,bin/jalview/io/HTMLOutput.js,bin/jalview/io/Gff3File.js,bin/jalview/io/FormatAdapter.js,bin/jalview/io/FileParse.js,bin/jalview/io/FileLoader.js,bin/jalview/io/FeaturesFile.js,bin/jalview/io/FastaFile.js,bin/jalview/io/DBRefFile.js,bin/jalview/io/ClustalFile.js,bin/jalview/io/ClansFile.js,bin/jalview/io/BioJsHTMLOutput.js,bin/jalview/io/BLCFile.js,bin/jalview/io/AppletFormatAdapter.js,bin/jalview/io/AnnotationFile.js,bin/jalview/io/AlignmentProperties.js,bin/jalview/io/AlignFile.js,bin/jalview/io/AMSAFile.js,bin/jalview/httpserver/HttpServer.js,bin/jalview/httpserver/AbstractRequestHandler.js,bin/jalview/gui/WsPreferences.js,bin/jalview/gui/WsParamSetManager.js,bin/jalview/gui/WsJobParameters.js,bin/jalview/gui/WebserviceInfo.js,bin/jalview/gui/ViewSelectionMenu.js,bin/jalview/gui/VamsasApplication.js,bin/jalview/gui/UserQuestionnaireCheck.js,bin/jalview/gui/UserDefinedColours.js,bin/jalview/gui/TreePanel.js,bin/jalview/gui/TreeCanvas.js,bin/jalview/gui/TextColourChooser.js,bin/jalview/gui/StructureViewerBase.js,bin/jalview/gui/StructureViewer.js,bin/jalview/gui/StructureChooser.js,bin/jalview/gui/SplitFrame.js,bin/jalview/gui/SplashScreen.js,bin/jalview/gui/SliderPanel.js,bin/jalview/gui/SequenceRenderer.js,bin/jalview/gui/SequenceFetcher.js,bin/jalview/gui/SeqPanel.js,bin/jalview/gui/SeqCanvas.js,bin/jalview/gui/ScalePanel.js,bin/jalview/gui/SVGOptions.js,bin/jalview/gui/RotatableCanvas.js,bin/jalview/gui/RestServiceEditorPane.js,bin/jalview/gui/RestInputParamEditDialog.js,bin/jalview/gui/RedundancyPanel.js,bin/jalview/gui/PromptUserConfig.js,bin/jalview/gui/ProgressBar.js,bin/jalview/gui/Preferences.js,bin/jalview/gui/PopupMenu.js,bin/jalview/gui/PairwiseAlignPanel.js,bin/jalview/gui/PaintRefresher.js,bin/jalview/gui/PDBSearchPanel.js,bin/jalview/gui/PCAPanel.js,bin/jalview/gui/OverviewPanel.js,bin/jalview/gui/OptsParametersContainerI.js,bin/jalview/gui/OptsAndParamsPage.js,bin/jalview/gui/OOMWarning.js,bin/jalview/gui/MenuChooser.js,bin/jalview/gui/JvSwingUtils.js,bin/jalview/gui/JalviewDialog.js,bin/jalview/gui/JalviewChimeraBindingModel.js,bin/jalview/gui/JalviewChangeSupport.js,bin/jalview/gui/JalviewAppender.js,bin/jalview/gui/Jalview2XML_V1.js,bin/jalview/gui/Jalview2XML.js,bin/jalview/gui/JDatabaseTree.js,bin/jalview/gui/IdwidthAdjuster.js,bin/jalview/gui/IdPanel.js,bin/jalview/gui/IdCanvas.js,bin/jalview/gui/IProgressIndicatorHandler.js,bin/jalview/gui/IProgressIndicator.js,bin/jalview/gui/Help.js,bin/jalview/gui/HTMLOptions.js,bin/jalview/gui/FontChooser.js,bin/jalview/gui/Finder.js,bin/jalview/gui/FeatureSettings.js,bin/jalview/gui/FeatureRenderer.js,bin/jalview/gui/FeatureColourChooser.js,bin/jalview/gui/EditNameDialog.js,bin/jalview/gui/EPSOptions.js,bin/jalview/gui/Desktop.js,bin/jalview/gui/DasSourceBrowser.js,bin/jalview/gui/CutAndPasteTransfer.js,bin/jalview/gui/CutAndPasteHtmlTransfer.js,bin/jalview/gui/Console.js,bin/jalview/gui/ChimeraViewFrame.js,bin/jalview/gui/BlogReader.js,bin/jalview/gui/AssociatePdbFileWithSeq.js,bin/jalview/gui/AppVarnaBinding.js,bin/jalview/gui/AppVarna.js,bin/jalview/gui/AppJmolBinding.js,bin/jalview/gui/AppJmol.js,bin/jalview/gui/AnnotationRowFilter.js,bin/jalview/gui/AnnotationPanel.js,bin/jalview/gui/AnnotationLabels.js,bin/jalview/gui/AnnotationExporter.js,bin/jalview/gui/AnnotationColumnChooser.js,bin/jalview/gui/AnnotationColourChooser.js,bin/jalview/gui/AnnotationChooser.js,bin/jalview/gui/AlignmentPanel.js,bin/jalview/gui/AlignViewport.js,bin/jalview/gui/AlignFrame.js,bin/jalview/gui/AlignExportSettings.js,bin/jalview/ext/varna/VarnaCommands.js,bin/jalview/ext/varna/RnaModel.js,bin/jalview/ext/varna/JalviewVarnaBinding.js,bin/jalview/ext/rbvi/chimera/JalviewChimeraBinding.js,bin/jalview/ext/rbvi/chimera/ChimeraListener.js,bin/jalview/ext/rbvi/chimera/ChimeraCommands.js,bin/jalview/ext/paradise/Annotate3D.js,bin/jalview/ext/jmol/PDBFileWithJmol.js,bin/jalview/ext/jmol/JmolCommands.js,bin/jalview/ext/jmol/JalviewJmolBinding.js,bin/jalview/exceptions/NoFileSelectedException.js,bin/jalview/exceptions/JalviewException.js,bin/jalview/datamodel/xdb/embl/Qualifier.js,bin/jalview/datamodel/xdb/embl/EmblSequence.js,bin/jalview/datamodel/xdb/embl/EmblFile.js,bin/jalview/datamodel/xdb/embl/EmblFeatureLocations.js,bin/jalview/datamodel/xdb/embl/EmblFeatureLocElement.js,bin/jalview/datamodel/xdb/embl/EmblFeature.js,bin/jalview/datamodel/xdb/embl/EmblError.js,bin/jalview/datamodel/xdb/embl/EmblEntry.js,bin/jalview/datamodel/xdb/embl/BasePosition.js,bin/jalview/datamodel/UniprotSequence.js,bin/jalview/datamodel/UniprotProteinName.js,bin/jalview/datamodel/UniprotFile.js,bin/jalview/datamodel/UniprotEntry.js,bin/jalview/datamodel/StructureViewerModel.js,bin/jalview/datamodel/SequencePoint.js,bin/jalview/datamodel/SequenceNode.js,bin/jalview/datamodel/SequenceI.js,bin/jalview/datamodel/SequenceGroup.js,bin/jalview/datamodel/SequenceFeature.js,bin/jalview/datamodel/SequenceDummy.js,bin/jalview/datamodel/SequenceCollectionI.js,bin/jalview/datamodel/Sequence.js,bin/jalview/datamodel/SeqCigar.js,bin/jalview/datamodel/SecondaryStructureAnnotation.js,bin/jalview/datamodel/SearchResults.js,bin/jalview/datamodel/RnaViewerModel.js,bin/jalview/datamodel/ProvenanceEntry.js,bin/jalview/datamodel/Provenance.js,bin/jalview/datamodel/PDBEntry.js,bin/jalview/datamodel/NodeTransformI.js,bin/jalview/datamodel/Mapping.js,bin/jalview/datamodel/IncompleteCodonException.js,bin/jalview/datamodel/HiddenSequences.js,bin/jalview/datamodel/GraphLine.js,bin/jalview/datamodel/FeatureProperties.js,bin/jalview/datamodel/DBRefSource.js,bin/jalview/datamodel/DBRefEntry.js,bin/jalview/datamodel/ColumnSelection.js,bin/jalview/datamodel/CigarSimple.js,bin/jalview/datamodel/CigarCigar.js,bin/jalview/datamodel/CigarBase.js,bin/jalview/datamodel/CigarArray.js,bin/jalview/datamodel/BinarySequence.js,bin/jalview/datamodel/BinaryNode.js,bin/jalview/datamodel/Annotation.js,bin/jalview/datamodel/AnnotatedCollectionI.js,bin/jalview/datamodel/AlignmentView.js,bin/jalview/datamodel/AlignmentOrder.js,bin/jalview/datamodel/AlignmentI.js,bin/jalview/datamodel/AlignmentExportData.js,bin/jalview/datamodel/AlignmentAnnotation.js,bin/jalview/datamodel/Alignment.js,bin/jalview/datamodel/AlignedCodonFrame.js,bin/jalview/datamodel/AlignedCodon.js,bin/jalview/datamodel/ASequenceI.js,bin/jalview/datamodel/ASequence.js,bin/jalview/controller/FeatureSettingsControllerGuiI.js,bin/jalview/controller/FeatureSettingsController.js,bin/jalview/controller/AlignViewController.js,bin/jalview/commands/TrimRegionCommand.js,bin/jalview/commands/SlideSequencesCommand.js,bin/jalview/commands/RemoveGapsCommand.js,bin/jalview/commands/RemoveGapColCommand.js,bin/jalview/commands/OrderCommand.js,bin/jalview/commands/EditCommand.js,bin/jalview/commands/CommandI.js,bin/jalview/commands/ChangeCaseCommand.js,bin/jalview/binding/Viewport.js,bin/jalview/binding/VamsasModel.js,bin/jalview/binding/VAMSAS.js,bin/jalview/binding/UserColours.js,bin/jalview/binding/UserColourScheme.js,bin/jalview/binding/Tree.js,bin/jalview/binding/Setting.js,bin/jalview/binding/SequenceType.js,bin/jalview/binding/SequenceSet.js,bin/jalview/binding/Sequence.js,bin/jalview/binding/Property.js,bin/jalview/binding/Pdbids.js,bin/jalview/binding/PdbentryItem.js,bin/jalview/binding/Pdbentry.js,bin/jalview/binding/JalviewUserColours.js,bin/jalview/binding/JalviewModelSequence.js,bin/jalview/binding/JalviewModel.js,bin/jalview/binding/JSeq.js,bin/jalview/binding/JGroup.js,bin/jalview/binding/Features.js,bin/jalview/binding/FeatureSettings.js,bin/jalview/binding/Feature.js,bin/jalview/binding/Colour.js,bin/jalview/binding/AnnotationElement.js,bin/jalview/binding/Annotation.js,bin/jalview/binding/Alignment.js,bin/jalview/bin/JalviewLiteURLRetrieve.js,bin/jalview/bin/JalviewLite.js,bin/jalview/bin/Jalview.js,bin/jalview/bin/Cache.js,bin/jalview/appletgui/UserDefinedColours.js,bin/jalview/appletgui/TreePanel.js,bin/jalview/appletgui/TreeCanvas.js,bin/jalview/appletgui/Tooltip.js,bin/jalview/appletgui/TitledPanel.js,bin/jalview/appletgui/SplitFrame.js,bin/jalview/appletgui/SliderPanel.js,bin/jalview/appletgui/SequenceRenderer.js,bin/jalview/appletgui/SeqPanel.js,bin/jalview/appletgui/SeqCanvas.js,bin/jalview/appletgui/ScalePanel.js,bin/jalview/appletgui/RotatableCanvas.js,bin/jalview/appletgui/RedundancyPanel.js,bin/jalview/appletgui/PairwiseAlignPanel.js,bin/jalview/appletgui/PaintRefresher.js,bin/jalview/appletgui/PCAPanel.js,bin/jalview/appletgui/OverviewPanel.js,bin/jalview/appletgui/JVDialog.js,bin/jalview/appletgui/IdwidthAdjuster.js,bin/jalview/appletgui/IdPanel.js,bin/jalview/appletgui/IdCanvas.js,bin/jalview/appletgui/FontChooser.js,bin/jalview/appletgui/Finder.js,bin/jalview/appletgui/FeatureSettings.js,bin/jalview/appletgui/FeatureRenderer.js,bin/jalview/appletgui/FeatureColourChooser.js,bin/jalview/appletgui/ExtJmol.js,bin/jalview/appletgui/EmbmenuFrame.js,bin/jalview/appletgui/EditNameDialog.js,bin/jalview/appletgui/CutAndPasteTransfer.js,bin/jalview/appletgui/AppletJmolBinding.js,bin/jalview/appletgui/AppletJmol.js,bin/jalview/appletgui/AnnotationRowFilter.js,bin/jalview/appletgui/AnnotationPanel.js,bin/jalview/appletgui/AnnotationLabels.js,bin/jalview/appletgui/AnnotationColumnChooser.js,bin/jalview/appletgui/AnnotationColourChooser.js,bin/jalview/appletgui/AlignmentPanel.js,bin/jalview/appletgui/AlignViewport.js,bin/jalview/appletgui/AlignFrame.js,bin/jalview/appletgui/APopupMenu.js,bin/jalview/api/structures/JalviewStructureDisplayI.js,bin/jalview/api/analysis/ViewBasedAnalysisI.js,bin/jalview/api/analysis/ScoreModelI.js,bin/jalview/api/ViewStyleI.js,bin/jalview/api/StructureSelectionManagerProvider.js,bin/jalview/api/SplitContainerI.js,bin/jalview/api/SequenceStructureBinding.js,bin/jalview/api/SequenceRenderer.js,bin/jalview/api/RotatableCanvasI.js,bin/jalview/api/OOMHandlerI.js,bin/jalview/api/FeaturesDisplayedI.js,bin/jalview/api/FeatureSettingsModelI.js,bin/jalview/api/FeatureSettingsControllerI.js,bin/jalview/api/FeatureRenderer.js,bin/jalview/api/ComplexAlignFile.js,bin/jalview/api/AlignmentViewPanel.js,bin/jalview/api/AlignViewportI.js,bin/jalview/api/AlignViewControllerI.js,bin/jalview/api/AlignViewControllerGuiI.js,bin/jalview/api/AlignExportSettingI.js,bin/jalview/api/AlignCalcWorkerI.js,bin/jalview/api/AlignCalcManagerI.js,bin/jalview/analysis/scoremodels/SWScoreModel.js,bin/jalview/analysis/scoremodels/PairwiseSeqScoreModel.js,bin/jalview/analysis/scoremodels/PIDScoreModel.js,bin/jalview/analysis/scoremodels/FeatureScoreModel.js,bin/jalview/analysis/WUSSParseException.js,bin/jalview/analysis/StructureFrequency.js,bin/jalview/analysis/SequenceIdMatcher.js,bin/jalview/analysis/SeqsetUtils.js,bin/jalview/analysis/SecStrConsensus.js,bin/jalview/analysis/Rna.js,bin/jalview/analysis/ParseProperties.js,bin/jalview/analysis/PCA.js,bin/jalview/analysis/NJTree.js,bin/jalview/analysis/Grouping.js,bin/jalview/analysis/Finder.js,bin/jalview/analysis/Dna.js,bin/jalview/analysis/CrossRef.js,bin/jalview/analysis/Conservation.js,bin/jalview/analysis/CodonComparator.js,bin/jalview/analysis/CodingUtils.js,bin/jalview/analysis/AnnotationSorter.js,bin/jalview/analysis/AlignmentUtils.js,bin/jalview/analysis/AlignmentSorter.js,bin/jalview/analysis/AlignmentAnnotationUtils.js,bin/jalview/analysis/AlignSeq.js,bin/jalview/analysis/AAFrequency.js,bin/org/jmol/viewer/Viewer.js,bin/org/exolab/castor/xml/Unmarshaller.js,bin/org/exolab/castor/mapping/Mapping.js,bin/netscape/javascript/JSObject.js,bin/netscape/javascript/JSException.js,bin/javajs/util/ZipTools.js,bin/javajs/util/ZipData.js,bin/javajs/util/XmlUtil.js,bin/javajs/util/V3d.js,bin/javajs/util/V3.js,bin/javajs/util/T4.js,bin/javajs/util/T3i.js,bin/javajs/util/T3d.js,bin/javajs/util/T3.js,bin/javajs/util/StringDataReader.js,bin/javajs/util/SB.js,bin/javajs/util/Rdr.js,bin/javajs/util/Quat.js,bin/javajs/util/PT.js,bin/javajs/util/P4.js,bin/javajs/util/P3i.js,bin/javajs/util/P3.js,bin/javajs/util/OC.js,bin/javajs/util/Measure.js,bin/javajs/util/Matrix.js,bin/javajs/util/M4.js,bin/javajs/util/M34.js,bin/javajs/util/M3.js,bin/javajs/util/Lst.js,bin/javajs/util/ListDataReader.js,bin/javajs/util/LimitedLineReader.js,bin/javajs/util/Encoding.js,bin/javajs/util/Eigen.js,bin/javajs/util/DataReader.js,bin/javajs/util/DF.js,bin/javajs/util/CompoundDocument.js,bin/javajs/util/CompoundDocHeader.js,bin/javajs/util/CompoundDocDirEntry.js,bin/javajs/util/CifDataParser.js,bin/javajs/util/CU.js,bin/javajs/util/BinaryDocument.js,bin/javajs/util/Base64.js,bin/javajs/util/BS.js,bin/javajs/util/BC.js,bin/javajs/util/BArray.js,bin/javajs/util/ArrayDataReader.js,bin/javajs/util/AjaxURLStreamHandlerFactory.js,bin/javajs/util/AjaxURLStreamHandler.js,bin/javajs/util/AjaxURLConnection.js,bin/javajs/util/AU.js,bin/javajs/util/A4.js,bin/javajs/swing/TableColumn.js,bin/javajs/swing/TableCellRenderer.js,bin/javajs/swing/SwingConstants.js,bin/javajs/swing/ListSelectionModel.js,bin/javajs/swing/JTextPane.js,bin/javajs/swing/JTextField.js,bin/javajs/swing/JTable.js,bin/javajs/swing/JSplitPane.js,bin/javajs/swing/JScrollPane.js,bin/javajs/swing/JRadioButtonMenuItem.js,bin/javajs/swing/JPopupMenu.js,bin/javajs/swing/JPanel.js,bin/javajs/swing/JMenuItem.js,bin/javajs/swing/JMenu.js,bin/javajs/swing/JLabel.js,bin/javajs/swing/JEditorPane.js,bin/javajs/swing/JDialog.js,bin/javajs/swing/JContentPane.js,bin/javajs/swing/JComponentImp.js,bin/javajs/swing/JComponent.js,bin/javajs/swing/JComboBox.js,bin/javajs/swing/JCheckBoxMenuItem.js,bin/javajs/swing/JCheckBox.js,bin/javajs/swing/JButton.js,bin/javajs/swing/Insets.js,bin/javajs/swing/GridBagLayout.js,bin/javajs/swing/GridBagConstraints.js,bin/javajs/swing/Grid.js,bin/javajs/swing/FlowLayout.js,bin/javajs/swing/Document.js,bin/javajs/swing/ColumnSelectionModel.js,bin/javajs/swing/Cell.js,bin/javajs/swing/ButtonGroup.js,bin/javajs/swing/AbstractTableModel.js,bin/javajs/swing/AbstractButton.js,bin/javajs/img/PpmEncoder.js,bin/javajs/img/PngEncoder.js,bin/javajs/img/PdfEncoder.js,bin/javajs/img/JpgEncoder.js,bin/javajs/img/Jpg64Encoder.js,bin/javajs/img/ImageEncoder.js,bin/javajs/img/GifEncoder.js,bin/javajs/img/CRCEncoder.js,bin/javajs/img/BMPDecoder.js,bin/javajs/export/PDFObject.js,bin/javajs/export/PDFCreator.js,bin/javajs/awt/event/WindowListener.js,bin/javajs/awt/event/WindowEvent.js,bin/javajs/awt/event/ItemEvent.js,bin/javajs/awt/event/Event.js,bin/javajs/awt/event/ActionListener.js,bin/javajs/awt/event/ActionEvent.js,bin/javajs/awt/LayoutManager.js,bin/javajs/awt/Font.js,bin/javajs/awt/Dimension.js,bin/javajs/awt/Container.js,bin/javajs/awt/Component.js,bin/javajs/awt/Color.js,bin/javajs/awt/BorderLayout.js,bin/javajs/api/ZInputStream.js,bin/javajs/api/SwingController.js,bin/javajs/api/SC.js,bin/javajs/api/PlatformViewer.js,bin/javajs/api/JmolObjectInterface.js,bin/javajs/api/JSONEncodable.js,bin/javajs/api/JSInterface.js,bin/javajs/api/Interface.js,bin/javajs/api/HTMLWindowEvent.js,bin/javajs/api/HTMLElement.js,bin/javajs/api/GenericZipTools.js,bin/javajs/api/GenericZipInputStream.js,bin/javajs/api/GenericPlatform.js,bin/javajs/api/GenericMouseInterface.js,bin/javajs/api/GenericMenuInterface.js,bin/javajs/api/GenericLineReader.js,bin/javajs/api/GenericImageEncoder.js,bin/javajs/api/GenericImageDialog.js,bin/javajs/api/GenericFileInterface.js,bin/javajs/api/GenericColor.js,bin/javajs/api/GenericCifDataParser.js,bin/javajs/api/GenericBinaryDocument.js,bin/javajs/api/FontManager.js,bin/javajs/api/EventManager.js,bin/javajs/api/EigenInterface.js,bin/javajs/api/BytePoster.js,bin/javajs/J2SRequireImport.js,bin/javajs/J2SIgnoreImport.js,bin/jalview/jsdev/api/VarnaRNA.js,bin/jalview/jsdev/GenericFileAdapter.js,bin/jalview/jsdev/Constants.js,bin/fr/orsay/lri/varna/models/rna/RNA.js,bin/com/stevesoft/pat/wrap/WriterWrap.js,bin/com/stevesoft/pat/wrap/StringWrap.js,bin/com/stevesoft/pat/wrap/StringBufferWrap.js,bin/com/stevesoft/pat/wrap/RandomAccessFileWrap.js,bin/com/stevesoft/pat/wrap/CharArrayWrap.js,bin/com/stevesoft/pat/wrap/CharArrayBufferWrap.js,bin/com/stevesoft/pat/patInt.js,bin/com/stevesoft/pat/patInf.js,bin/com/stevesoft/pat/parsePerl.js,bin/com/stevesoft/pat/oneChar.js,bin/com/stevesoft/pat/lookAhead.js,bin/com/stevesoft/pat/WantMoreTextReplaceRule.js,bin/com/stevesoft/pat/Validator.js,bin/com/stevesoft/pat/UniValidator.js,bin/com/stevesoft/pat/Transformer.js,bin/com/stevesoft/pat/TransPat.js,bin/com/stevesoft/pat/SubMark.js,bin/com/stevesoft/pat/StringRule.js,bin/com/stevesoft/pat/StringLike.js,bin/com/stevesoft/pat/StringBufferLike.js,bin/com/stevesoft/pat/StrPos.js,bin/com/stevesoft/pat/Start.js,bin/com/stevesoft/pat/SpecialRule.js,bin/com/stevesoft/pat/Skipped.js,bin/com/stevesoft/pat/SkipBMH.js,bin/com/stevesoft/pat/Skip2.js,bin/com/stevesoft/pat/Skip.js,bin/com/stevesoft/pat/RuleHolder.js,bin/com/stevesoft/pat/Rthings.js,bin/com/stevesoft/pat/RightRule.js,bin/com/stevesoft/pat/Replacer.js,bin/com/stevesoft/pat/ReplaceRule.js,bin/com/stevesoft/pat/RegexWriter.js,bin/com/stevesoft/pat/RegexTokenizer.js,bin/com/stevesoft/pat/RegexReader.js,bin/com/stevesoft/pat/Regex.js,bin/com/stevesoft/pat/RegSyntaxError.js,bin/com/stevesoft/pat/RegSyntax.js,bin/com/stevesoft/pat/RegRes.js,bin/com/stevesoft/pat/RegOpt.js,bin/com/stevesoft/pat/Range.js,bin/com/stevesoft/pat/RBuffer.js,bin/com/stevesoft/pat/PushRule.js,bin/com/stevesoft/pat/Pthings.js,bin/com/stevesoft/pat/Prop.js,bin/com/stevesoft/pat/PopRule.js,bin/com/stevesoft/pat/PatternSub.js,bin/com/stevesoft/pat/Pattern.js,bin/com/stevesoft/pat/PartialBuffer.js,bin/com/stevesoft/pat/OrMark.js,bin/com/stevesoft/pat/Or.js,bin/com/stevesoft/pat/NullRule.js,bin/com/stevesoft/pat/NullPattern.js,bin/com/stevesoft/pat/NotImplementedError.js,bin/com/stevesoft/pat/NonDirFileRegex.js,bin/com/stevesoft/pat/NoPattern.js,bin/com/stevesoft/pat/Multi_stage2.js,bin/com/stevesoft/pat/MultiMin.js,bin/com/stevesoft/pat/Multi.js,bin/com/stevesoft/pat/LeftRule.js,bin/com/stevesoft/pat/Group.js,bin/com/stevesoft/pat/FileRegex.js,bin/com/stevesoft/pat/FastMulti.js,bin/com/stevesoft/pat/FastBracket.js,bin/com/stevesoft/pat/End.js,bin/com/stevesoft/pat/DotMulti.js,bin/com/stevesoft/pat/DirFileRegex.js,bin/com/stevesoft/pat/CustomEndpoint.js,bin/com/stevesoft/pat/Custom.js,bin/com/stevesoft/pat/Ctrl.js,bin/com/stevesoft/pat/CodeRule.js,bin/com/stevesoft/pat/ChangeRule.js,bin/com/stevesoft/pat/CaseMgr.js,bin/com/stevesoft/pat/Bracket.js,bin/com/stevesoft/pat/Boundary.js,bin/com/stevesoft/pat/Bits.js,bin/com/stevesoft/pat/BasicStringBufferLike.js,bin/com/stevesoft/pat/Backup.js,bin/com/stevesoft/pat/BackRefRule.js,bin/com/stevesoft/pat/BackMatch.js,bin/com/stevesoft/pat/BackG.js,bin/com/stevesoft/pat/Any.js,bin/com/stevesoft/pat/AmpersandRule.js,bin/awt2swing/TextField.js,bin/awt2swing/TextArea.js,bin/awt2swing/Scrollbar.js,bin/awt2swing/ScrollPane.js,bin/awt2swing/PopupMenu.js,bin/awt2swing/Panel.js,bin/awt2swing/MenuItem.js,bin/awt2swing/MenuBar.js,bin/awt2swing/Menu.js,bin/awt2swing/Label.js,bin/awt2swing/Frame.js,bin/awt2swing/CheckboxMenuItem.js,bin/awt2swing/Checkbox.js,bin/MCview/Residue.js,bin/MCview/PDBfile.js,bin/MCview/PDBChain.js,bin/MCview/Bond.js,bin/MCview/Atom.js,bin/awt2swing/Button.js,bin/awt2swing/Canvas.js,bin/awt2swing/Choice.js,bin/jalview/appletgui/Cache.js,bin/com/stevesoft/pat/Util.js,bin/jalview/jsdev/Regex.js,bin/jalview/jsdev/RegexJS.js,bin/com/stevesoft/pat/MessageManager.js,bin/jalview/jsdev/api/RegexInterface.js,bin/jalview/jsdev/api/RegExpInterface.js,bin/jalview/jsdev/RegExp.js,bin/jalview/jsdev/JavaScriptRegExp.js,bin/jalview/jsdev/JSRegex.js,bin/swingjs/JSEvent.js,bin/swingjs/JSThread.js,bin/swingjs/api/JSFunction.js,bin/swingjs/JSImage.js,bin/swingjs/api/DOMNode.js +j2s.compiler.abbreviation.prefix=$_ +j2s.abandoned.resources.list= +j2s.output.path=bin +j2s.compiler.status=enable diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..77d60bf --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,9 @@ +/MCview/ +/awt2swing/ +/com/ +/fr/ +/jalview/ +/javajs/ +/netscape/ +/org/ +/swingjs/ diff --git a/bin/MCview/Atom.js b/bin/MCview/Atom.js index 1f4c66f..ff57b47 100644 --- a/bin/MCview/Atom.js +++ b/bin/MCview/Atom.js @@ -1,55 +1,55 @@ -Clazz.declarePackage ("MCview"); -Clazz.load (["java.awt.Color"], "MCview.Atom", ["java.lang.Float"], function () { -c$ = Clazz.decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.z = 0; -this.number = 0; -this.name = null; -this.resName = null; -this.resNumber = 0; -this.insCode = ' '; -this.resNumIns = null; -this.type = 0; -this.color = null; -this.chain = null; -this.alignmentMapping = -1; -this.atomIndex = 0; -this.occupancy = 0; -this.tfactor = 0; -this.isSelected = false; -Clazz.instantialize (this, arguments); -}, MCview, "Atom"); -Clazz.prepareFields (c$, function () { -this.color = java.awt.Color.lightGray; -}); -Clazz.makeConstructor (c$, -function (str) { -this.atomIndex = Integer.parseInt (str.substring (6, 11).trim ()); -this.name = str.substring (12, 15).trim (); -this.resName = str.substring (17, 20); -this.chain = str.substring (21, 22); -this.resNumber = Integer.parseInt (str.substring (22, 26).trim ()); -this.resNumIns = str.substring (22, 27).trim (); -this.insCode = str.substring (26, 27).charAt (0); -this.x = ( new Float (str.substring (30, 38).trim ()).floatValue ()); -this.y = ( new Float (str.substring (38, 46).trim ()).floatValue ()); -this.z = ( new Float (str.substring (47, 55).trim ()).floatValue ()); -var tm = str.substring (54, 60).trim (); -if (tm.length > 0) { -this.occupancy = ( new Float (tm)).floatValue (); -} else { -this.occupancy = 1; -}tm = str.substring (60, 66).trim (); -if (tm.length > 0) { -this.tfactor = ( new Float (tm).floatValue ()); -} else { -this.tfactor = 1; -}}, "~S"); -Clazz.makeConstructor (c$, -function (x, y, z) { -this.x = x; -this.y = y; -this.z = z; -}, "~N,~N,~N"); -}); +Clazz.declarePackage ("MCview"); +Clazz.load (["java.awt.Color"], "MCview.Atom", ["java.lang.Float"], function () { +c$ = Clazz.decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.z = 0; +this.number = 0; +this.name = null; +this.resName = null; +this.resNumber = 0; +this.insCode = ' '; +this.resNumIns = null; +this.type = 0; +this.color = null; +this.chain = null; +this.alignmentMapping = -1; +this.atomIndex = 0; +this.occupancy = 0; +this.tfactor = 0; +this.isSelected = false; +Clazz.instantialize (this, arguments); +}, MCview, "Atom"); +Clazz.prepareFields (c$, function () { +this.color = java.awt.Color.lightGray; +}); +Clazz.makeConstructor (c$, +function (str) { +this.atomIndex = Integer.parseInt (str.substring (6, 11).trim ()); +this.name = str.substring (12, 15).trim (); +this.resName = str.substring (17, 20); +this.chain = str.substring (21, 22); +this.resNumber = Integer.parseInt (str.substring (22, 26).trim ()); +this.resNumIns = str.substring (22, 27).trim (); +this.insCode = str.substring (26, 27).charAt (0); +this.x = ( new Float (str.substring (30, 38).trim ()).floatValue ()); +this.y = ( new Float (str.substring (38, 46).trim ()).floatValue ()); +this.z = ( new Float (str.substring (47, 55).trim ()).floatValue ()); +var tm = str.substring (54, 60).trim (); +if (tm.length > 0) { +this.occupancy = ( new Float (tm)).floatValue (); +} else { +this.occupancy = 1; +}tm = str.substring (60, 66).trim (); +if (tm.length > 0) { +this.tfactor = ( new Float (tm).floatValue ()); +} else { +this.tfactor = 1; +}}, "~S"); +Clazz.makeConstructor (c$, +function (x, y, z) { +this.x = x; +this.y = y; +this.z = z; +}, "~N,~N,~N"); +}); diff --git a/bin/MCview/Bond.js b/bin/MCview/Bond.js index 539e323..9aaba45 100644 --- a/bin/MCview/Bond.js +++ b/bin/MCview/Bond.js @@ -1,34 +1,34 @@ -Clazz.declarePackage ("MCview"); -Clazz.load (["java.awt.Color"], "MCview.Bond", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.start = null; -this.end = null; -this.startCol = null; -this.endCol = null; -this.at1 = null; -this.at2 = null; -Clazz.instantialize (this, arguments); -}, MCview, "Bond"); -Clazz.prepareFields (c$, function () { -this.startCol = java.awt.Color.lightGray; -this.endCol = java.awt.Color.lightGray; -}); -Clazz.makeConstructor (c$, -function (at1, at2) { -this.start = Clazz.newFloatArray (-1, [at1.x, at1.y, at1.z]); -this.end = Clazz.newFloatArray (-1, [at2.x, at2.y, at2.z]); -this.startCol = at1.color; -this.endCol = at2.color; -this.at1 = at1; -this.at2 = at2; -}, "MCview.Atom,MCview.Atom"); -Clazz.defineMethod (c$, "translate", -function (x, y, z) { -this.start[0] = this.start[0] + x; -this.end[0] = this.end[0] + x; -this.start[1] = this.start[1] + y; -this.end[1] = this.end[1] + y; -this.start[2] = this.start[2] + z; -this.end[2] = this.end[2] + z; -}, "~N,~N,~N"); -}); +Clazz.declarePackage ("MCview"); +Clazz.load (["java.awt.Color"], "MCview.Bond", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.start = null; +this.end = null; +this.startCol = null; +this.endCol = null; +this.at1 = null; +this.at2 = null; +Clazz.instantialize (this, arguments); +}, MCview, "Bond"); +Clazz.prepareFields (c$, function () { +this.startCol = java.awt.Color.lightGray; +this.endCol = java.awt.Color.lightGray; +}); +Clazz.makeConstructor (c$, +function (at1, at2) { +this.start = Clazz.newFloatArray (-1, [at1.x, at1.y, at1.z]); +this.end = Clazz.newFloatArray (-1, [at2.x, at2.y, at2.z]); +this.startCol = at1.color; +this.endCol = at2.color; +this.at1 = at1; +this.at2 = at2; +}, "MCview.Atom,MCview.Atom"); +Clazz.defineMethod (c$, "translate", +function (x, y, z) { +this.start[0] = this.start[0] + x; +this.end[0] = this.end[0] + x; +this.start[1] = this.start[1] + y; +this.end[1] = this.end[1] + y; +this.start[2] = this.start[2] + z; +this.end[2] = this.end[2] + z; +}, "~N,~N,~N"); +}); diff --git a/bin/MCview/PDBChain.class b/bin/MCview/PDBChain.class index 3e017ed153ee3caa0f240c67576004e6421d13d6..8244cf66d0a0eac72f9e12a128a3080b16f0cd6d 100644 GIT binary patch delta 87 zcmX?~a5iB>q5|XP%}EOL7*$Ld*#9wbGBPs$X9#5AU}pfb7}*)NgHZ)LLj?na0@q|! nrFzB-o0lr3vNC5eNN(oUux4cAdzIT delta 89 zcmX?`a6Vx}q5|WU%}EOL7*$OfIQ}tkGBPs$X9#5AU}pfb7}*)NgHZ)LLj?na0z1=W p6{UK{i<_4yrLr<-Ge~Xb(XeJ@XJg_O_|L#PnO{R 0 && (Clazz.doubleToInt (numNa / (this.residues.size () - 1)) > 0.99)) { -this.isNa = true; -}}); -Clazz.defineMethod (c$, "makeBond", -function (at1, at2) { -this.bonds.addElement ( new MCview.Bond (at1, at2)); -}, "MCview.Atom,MCview.Atom"); -Clazz.defineMethod (c$, "makeResidueList", -function (visibleChainAnnotation) { -var count = 0; -var symbol; -var deoxyn = false; -var nucleotide = false; -var seq = new StringBuilder (256); -var resFeatures = new java.util.Vector (); -var resAnnotation = new java.util.Vector (); -var i; -var iSize = this.atoms.size () - 1; -var resNumber = -1; -for (i = 0; i <= iSize; i++) { -var tmp = this.atoms.elementAt (i); -resNumber = tmp.resNumber; -var res = resNumber; -if (i == 0) { -this.offset = resNumber; -}var resAtoms = new java.util.Vector (); -while ((resNumber == res) && (i < this.atoms.size ())) { -resAtoms.add (this.atoms.elementAt (i)); -i++; -if (i < this.atoms.size ()) { -resNumber = this.atoms.elementAt (i).resNumber; -} else { -resNumber++; -}} -i--; -this.residues.addElement ( new MCview.Residue (resAtoms, resNumber - 1, count)); -var tmpres = this.residues.lastElement (); -var tmpat = tmpres.atoms.get (0); -var sf = new jalview.datamodel.SequenceFeature ("RESNUM", tmpat.resName + ":" + tmpat.resNumIns + " " + this.pdbid + this.id, "", this.offset + count, this.offset + count, this.pdbid); -resFeatures.addElement (sf); -resAnnotation.addElement ( new jalview.datamodel.Annotation (tmpat.tfactor)); -if ((symbol = jalview.schemes.ResidueProperties.getAA3Hash ().get (tmpat.resName)) == null) { -var nucname = tmpat.resName.trim (); -deoxyn = nucname.length == 2 && jalview.schemes.ResidueProperties.aaIndex[nucname.charCodeAt (0)] == jalview.schemes.ResidueProperties.aaIndex['D'.charCodeAt (0)]; -if (tmpat.name.equalsIgnoreCase ("CA") || jalview.schemes.ResidueProperties.nucleotideIndex[nucname.charCodeAt ((deoxyn ? 1 : 0))] == -1) { -seq.append ("X"); -} else { -nucleotide = true; -seq.append (nucname.charAt ((deoxyn ? 1 : 0))); -}} else { -if (nucleotide) { -System.err.println ("Warning: mixed nucleotide and amino acid chain.. its gonna do bad things to you!"); -}seq.append (jalview.schemes.ResidueProperties.aa[(symbol).intValue ()]); -}count++; -} -if (this.id.length < 1) { -this.id = " "; -}this.isNa = nucleotide; -this.sequence = new jalview.datamodel.Sequence (this.id, seq.toString (), this.offset, resNumber - 1); -for (i = 0, iSize = resFeatures.size (); i < iSize; i++) { -this.sequence.addSequenceFeature (resFeatures.elementAt (i)); -resFeatures.setElementAt (null, i); -} -if (visibleChainAnnotation) { -var annots = new Array (resAnnotation.size ()); -var max = 0; -for (i = 0, iSize = annots.length; i < iSize; i++) { -annots[i] = resAnnotation.elementAt (i); -if (annots[i].value > max) { -max = annots[i].value; -}resAnnotation.setElementAt (null, i); -} -var tfactorann = new jalview.datamodel.AlignmentAnnotation ("Temperature Factor", "Temperature Factor for " + this.pdbid + this.id, annots, 0, max, 2); -tfactorann.setSequenceRef (this.sequence); -this.sequence.addAlignmentAnnotation (tfactorann); -}}, "~B"); -Clazz.defineMethod (c$, "setChargeColours", -function () { -for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { -if (b.at1 != null && b.at2 != null) { -b.startCol = MCview.PDBChain.getChargeColour (b.at1.resName); -b.endCol = MCview.PDBChain.getChargeColour (b.at2.resName); -} else { -b.startCol = java.awt.Color.gray; -b.endCol = java.awt.Color.gray; -}} -}); -c$.getChargeColour = Clazz.defineMethod (c$, "getChargeColour", -function (resName) { -var result = java.awt.Color.lightGray; -if ("ASP".equals (resName) || "GLU".equals (resName)) { -result = java.awt.Color.red; -} else if ("LYS".equals (resName) || "ARG".equals (resName)) { -result = java.awt.Color.blue; -} else if ("CYS".equals (resName)) { -result = java.awt.Color.yellow; -}return result; -}, "~S"); -Clazz.defineMethod (c$, "setChainColours", -function (cs) { -var index; -for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { -try { -index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at1.resName).intValue (); -b.startCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); -index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at2.resName).intValue (); -b.endCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -b.startCol = java.awt.Color.gray; -b.endCol = java.awt.Color.gray; -} else { -throw e; -} -} -} -}, "jalview.schemes.ColourSchemeI"); -Clazz.defineMethod (c$, "setChainColours", -function (col) { -for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { -b.startCol = col; -b.endCol = col; -} -}, "java.awt.Color"); -Clazz.defineMethod (c$, "transferResidueAnnotation", -function (mapping, sqmpping) { -var sq = mapping.getSequence (); -var dsq = sq; -if (sq != null) { -while (dsq.getDatasetSequence () != null) { -dsq = dsq.getDatasetSequence (); -} -if (this.shadow != null && this.shadow.getAnnotation () != null) { -for (var ana, $ana = 0, $$ana = this.shadow.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { -var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); -if (transfer == null || transfer.size () == 0) { -ana = new jalview.datamodel.AlignmentAnnotation (ana); -ana.liftOver (this.sequence, this.shadowMap); -ana.liftOver (dsq, sqmpping); -dsq.addAlignmentAnnotation (ana); -} else { -continue; -}} -} else { -if (this.sequence != null && this.sequence.getAnnotation () != null) { -for (var ana, $ana = 0, $$ana = this.sequence.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { -var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); -if (transfer == null || transfer.size () == 0) { -ana = new jalview.datamodel.AlignmentAnnotation (ana); -ana.liftOver (dsq, sqmpping); -} else { -continue; -}} -}}if (false) { -var min = -1; -var max = 0; -var an = new Array (sq.getEnd () - sq.getStart () + 1); -for (var i = sq.getStart (), j = sq.getEnd (), k = 0; i <= j; i++, k++) { -var prn = mapping.getPDBResNum (k + 1); -an[k] = new jalview.datamodel.Annotation (prn); -if (min == -1) { -min = k; -max = k; -} else { -if (min > k) { -min = k; -} else if (max < k) { -max = k; -}}} -sq.addAlignmentAnnotation ( new jalview.datamodel.AlignmentAnnotation ("PDB.RESNUM", "PDB Residue Numbering for " + this.pdbid + ":" + this.id, an, min, max, 2)); -}}}, "jalview.structure.StructureMapping,jalview.datamodel.Mapping"); -Clazz.defineStatics (c$, -"PDBFILEFEATURE", "PDBFile", -"IEASTATUS", "IEA:jalview"); -}); +Clazz.declarePackage ("MCview"); +Clazz.load (["java.util.Vector"], "MCview.PDBChain", ["MCview.Bond", "$.Residue", "jalview.datamodel.AlignmentAnnotation", "$.Annotation", "$.Sequence", "$.SequenceFeature", "jalview.schemes.ResidueProperties", "java.awt.Color", "java.lang.StringBuilder"], function () { +c$ = Clazz.decorateAsClass (function () { +this.id = null; +this.bonds = null; +this.atoms = null; +this.residues = null; +this.offset = 0; +this.sequence = null; +this.shadow = null; +this.isNa = false; +this.isVisible = true; +this.pdbstart = 0; +this.pdbend = 0; +this.seqstart = 0; +this.seqend = 0; +this.pdbid = ""; +this.newline = null; +this.shadowMap = null; +Clazz.instantialize (this, arguments); +}, MCview, "PDBChain"); +Clazz.prepareFields (c$, function () { +this.bonds = new java.util.Vector (); +this.atoms = new java.util.Vector (); +this.residues = new java.util.Vector (); +this.newline = System.getProperty ("line.separator"); +}); +Clazz.makeConstructor (c$, +function (pdbid, id) { +this.pdbid = pdbid.toLowerCase (); +this.id = id; +}, "~S,~S"); +Clazz.defineMethod (c$, "setNewlineString", +function (nl) { +this.newline = nl; +}, "~S"); +Clazz.defineMethod (c$, "getNewlineString", +function () { +return this.newline; +}); +Clazz.defineMethod (c$, "print", +function () { +var tmp = new StringBuilder (256); +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +tmp.append (b.at1.resName).append (" ").append (b.at1.resNumber).append (" ").append (this.offset).append (this.newline); +} +return tmp.toString (); +}); +Clazz.defineMethod (c$, "makeExactMapping", +function (as, s1) { +var pdbpos = as.getSeq2Start () - 2; +var alignpos = s1.getStart () + as.getSeq1Start () - 3; +for (var atom, $atom = this.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { +atom.alignmentMapping = -1; +} +for (var i = 0; i < as.astr1.length; i++) { +if (as.astr1.charAt (i) != '-') { +alignpos++; +}if (as.astr2.charAt (i) != '-') { +pdbpos++; +}if (as.astr1.charAt (i) == as.astr2.charAt (i)) { +var res = this.residues.elementAt (pdbpos); +for (var atom, $atom = res.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { +atom.alignmentMapping = alignpos; +} +}} +}, "jalview.analysis.AlignSeq,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "transferRESNUMFeatures", +function (seq, status) { +var sq = seq; +while (sq != null && sq.getDatasetSequence () != null) { +sq = sq.getDatasetSequence (); +if (sq === this.sequence) { +return null; +}} +if (status == null) { +status = "IEA:jalview"; +}var features = this.sequence.getSequenceFeatures (); +for (var i = 0; i < features.length; i++) { +if (features[i].getFeatureGroup ().equals (this.pdbid)) { +var tx = new jalview.datamodel.SequenceFeature (features[i]); +tx.setBegin (1 + this.residues.elementAt (tx.getBegin () - this.offset).atoms.elementAt (0).alignmentMapping); +tx.setEnd (1 + this.residues.elementAt (tx.getEnd () - this.offset).atoms.elementAt (0).alignmentMapping); +tx.setStatus (status + ((tx.getStatus () == null || tx.getStatus ().length == 0) ? "" : ":" + tx.getStatus ())); +if (tx.begin != 0 && tx.end != 0) { +sq.addSequenceFeature (tx); +}}} +return features; +}, "jalview.datamodel.SequenceI,~S"); +Clazz.defineMethod (c$, "makeCaBondList", +function () { +var na = false; +var numNa = 0; +for (var i = 0; i < (this.residues.size () - 1); i++) { +var tmpres = this.residues.elementAt (i); +var tmpres2 = this.residues.elementAt (i + 1); +var at1 = tmpres.findAtom ("CA"); +var at2 = tmpres2.findAtom ("CA"); +na = false; +if ((at1 == null) && (at2 == null)) { +na = true; +at1 = tmpres.findAtom ("P"); +at2 = tmpres2.findAtom ("P"); +}if ((at1 != null) && (at2 != null)) { +if (at1.chain.equals (at2.chain)) { +if (na) { +numNa++; +}this.makeBond (at1, at2); +}} else { +System.out.println ("not found " + i); +}} +if (this.residues.size () > 0 && (Clazz.doubleToInt (numNa / (this.residues.size () - 1)) > 0.99)) { +this.isNa = true; +}}); +Clazz.defineMethod (c$, "makeBond", +function (at1, at2) { +this.bonds.addElement ( new MCview.Bond (at1, at2)); +}, "MCview.Atom,MCview.Atom"); +Clazz.defineMethod (c$, "makeResidueList", +function (visibleChainAnnotation) { +var count = 0; +var symbol; +var deoxyn = false; +var nucleotide = false; +var seq = new StringBuilder (256); +var resFeatures = new java.util.Vector (); +var resAnnotation = new java.util.Vector (); +var i; +var iSize = this.atoms.size () - 1; +var resNumber = -1; +for (i = 0; i <= iSize; i++) { +var tmp = this.atoms.elementAt (i); +resNumber = tmp.resNumber; +var res = resNumber; +if (i == 0) { +this.offset = resNumber; +}var resAtoms = new java.util.Vector (); +while ((resNumber == res) && (i < this.atoms.size ())) { +resAtoms.add (this.atoms.elementAt (i)); +i++; +if (i < this.atoms.size ()) { +resNumber = this.atoms.elementAt (i).resNumber; +} else { +resNumber++; +}} +i--; +this.residues.addElement ( new MCview.Residue (resAtoms, resNumber - 1, count)); +var tmpres = this.residues.lastElement (); +var tmpat = tmpres.atoms.get (0); +var sf = new jalview.datamodel.SequenceFeature ("RESNUM", tmpat.resName + ":" + tmpat.resNumIns + " " + this.pdbid + this.id, "", this.offset + count, this.offset + count, this.pdbid); +resFeatures.addElement (sf); +resAnnotation.addElement ( new jalview.datamodel.Annotation (tmpat.tfactor)); +if ((symbol = jalview.schemes.ResidueProperties.getAA3Hash ().get (tmpat.resName)) == null) { +var nucname = tmpat.resName.trim (); +deoxyn = nucname.length == 2 && jalview.schemes.ResidueProperties.aaIndex[nucname.charCodeAt (0)] == jalview.schemes.ResidueProperties.aaIndex['D'.charCodeAt (0)]; +if (tmpat.name.equalsIgnoreCase ("CA") || jalview.schemes.ResidueProperties.nucleotideIndex[nucname.charCodeAt ((deoxyn ? 1 : 0))] == -1) { +seq.append ("X"); +} else { +nucleotide = true; +seq.append (nucname.charAt ((deoxyn ? 1 : 0))); +}} else { +if (nucleotide) { +System.err.println ("Warning: mixed nucleotide and amino acid chain.. its gonna do bad things to you!"); +}seq.append (jalview.schemes.ResidueProperties.aa[(symbol).intValue ()]); +}count++; +} +if (this.id.length < 1) { +this.id = " "; +}this.isNa = nucleotide; +this.sequence = new jalview.datamodel.Sequence (this.id, seq.toString (), this.offset, resNumber - 1); +for (i = 0, iSize = resFeatures.size (); i < iSize; i++) { +this.sequence.addSequenceFeature (resFeatures.elementAt (i)); +resFeatures.setElementAt (null, i); +} +if (visibleChainAnnotation) { +var annots = new Array (resAnnotation.size ()); +var max = 0; +for (i = 0, iSize = annots.length; i < iSize; i++) { +annots[i] = resAnnotation.elementAt (i); +if (annots[i].value > max) { +max = annots[i].value; +}resAnnotation.setElementAt (null, i); +} +var tfactorann = new jalview.datamodel.AlignmentAnnotation ("Temperature Factor", "Temperature Factor for " + this.pdbid + this.id, annots, 0, max, 2); +tfactorann.setSequenceRef (this.sequence); +this.sequence.addAlignmentAnnotation (tfactorann); +}}, "~B"); +Clazz.defineMethod (c$, "setChargeColours", +function () { +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +if (b.at1 != null && b.at2 != null) { +b.startCol = MCview.PDBChain.getChargeColour (b.at1.resName); +b.endCol = MCview.PDBChain.getChargeColour (b.at2.resName); +} else { +b.startCol = java.awt.Color.gray; +b.endCol = java.awt.Color.gray; +}} +}); +c$.getChargeColour = Clazz.defineMethod (c$, "getChargeColour", +function (resName) { +var result = java.awt.Color.lightGray; +if ("ASP".equals (resName) || "GLU".equals (resName)) { +result = java.awt.Color.red; +} else if ("LYS".equals (resName) || "ARG".equals (resName)) { +result = java.awt.Color.blue; +} else if ("CYS".equals (resName)) { +result = java.awt.Color.yellow; +}return result; +}, "~S"); +Clazz.defineMethod (c$, "setChainColours", +function (cs) { +var index; +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +try { +index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at1.resName).intValue (); +b.startCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); +index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at2.resName).intValue (); +b.endCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +b.startCol = java.awt.Color.gray; +b.endCol = java.awt.Color.gray; +} else { +throw e; +} +} +} +}, "jalview.schemes.ColourSchemeI"); +Clazz.defineMethod (c$, "setChainColours", +function (col) { +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +b.startCol = col; +b.endCol = col; +} +}, "java.awt.Color"); +Clazz.defineMethod (c$, "transferResidueAnnotation", +function (mapping, sqmpping) { +var sq = mapping.getSequence (); +var dsq = sq; +if (sq != null) { +while (dsq.getDatasetSequence () != null) { +dsq = dsq.getDatasetSequence (); +} +if (this.shadow != null && this.shadow.getAnnotation () != null) { +for (var ana, $ana = 0, $$ana = this.shadow.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { +var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); +if (transfer == null || transfer.size () == 0) { +ana = new jalview.datamodel.AlignmentAnnotation (ana); +ana.liftOver (this.sequence, this.shadowMap); +ana.liftOver (dsq, sqmpping); +dsq.addAlignmentAnnotation (ana); +} else { +continue; +}} +} else { +if (this.sequence != null && this.sequence.getAnnotation () != null) { +for (var ana, $ana = 0, $$ana = this.sequence.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { +var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); +if (transfer == null || transfer.size () == 0) { +ana = new jalview.datamodel.AlignmentAnnotation (ana); +ana.liftOver (dsq, sqmpping); +} else { +continue; +}} +}}if (false) { +var min = -1; +var max = 0; +var an = new Array (sq.getEnd () - sq.getStart () + 1); +for (var i = sq.getStart (), j = sq.getEnd (), k = 0; i <= j; i++, k++) { +var prn = mapping.getPDBResNum (k + 1); +an[k] = new jalview.datamodel.Annotation (prn); +if (min == -1) { +min = k; +max = k; +} else { +if (min > k) { +min = k; +} else if (max < k) { +max = k; +}}} +sq.addAlignmentAnnotation ( new jalview.datamodel.AlignmentAnnotation ("PDB.RESNUM", "PDB Residue Numbering for " + this.pdbid + ":" + this.id, an, min, max, 2)); +}}}, "jalview.structure.StructureMapping,jalview.datamodel.Mapping"); +Clazz.defineStatics (c$, +"PDBFILEFEATURE", "PDBFile", +"IEASTATUS", "IEA:jalview"); +}); diff --git a/bin/MCview/PDBfile.class b/bin/MCview/PDBfile.class index 251deb77dd63d33fa94c2bd2d8591821928339ed..a9bf8743bbf50abf4656690829a0e6e965f64269 100644 GIT binary patch delta 159 zcmdm)vn6N440%S)%`@dSSlAi0Xu${b6MT$%B4+A$lL(nep0>wkvs$@g^RC-2sA;udFMVrO7vXV}ZYxS3OTB@-jd=FR#G x7}=6R%3>x@FqD)sV_=6UVP{;x&bXSL@eDg713SZd28PMKhB7E7Y&C3Q0RYb`Dj@&> delta 145 zcmdmzvomMI40%TF%`@dSSlAgE86^HQ*iK%cBFV#`_lJR-ogs+#7X#DeH_DqC#X!PL z3{IPOsc^F~x^6zEb&ip(jDhVxL-*u6I`Wfu>NxR;Ffg$*FtRi3WdN#U(_P8L$hLWd k{sKm}R0j6{3^9{?3?&(jCl>%orpcX#GN|e|7`Ctg0Qg}iL;wH) diff --git a/bin/MCview/PDBfile.js b/bin/MCview/PDBfile.js index dfc40cc..c6af5ca 100644 --- a/bin/MCview/PDBfile.js +++ b/bin/MCview/PDBfile.js @@ -1,320 +1,320 @@ -Clazz.declarePackage ("MCview"); -Clazz.load (["jalview.io.AlignFile"], "MCview.PDBfile", ["MCview.Atom", "$.PDBChain", "jalview.analysis.AlignSeq", "jalview.datamodel.Alignment", "$.AlignmentI", "$.PDBEntry", "jalview.io.FileParse", "jalview.util.MessageManager", "java.awt.Color", "java.io.IOException", "java.util.ArrayList", "$.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.chains = null; -this.id = null; -this.visibleChainAnnotation = false; -this.$predictSecondaryStructure = true; -this.externalSecondaryStructure = false; -Clazz.instantialize (this, arguments); -}, MCview, "PDBfile", jalview.io.AlignFile); -Clazz.makeConstructor (c$, -function (addAlignmentAnnotations, predictSecondaryStructure, externalSecStr) { -Clazz.superConstructor (this, MCview.PDBfile); -this.visibleChainAnnotation = addAlignmentAnnotations; -this.$predictSecondaryStructure = predictSecondaryStructure; -this.externalSecondaryStructure = externalSecStr; -}, "~B,~B,~B"); -Clazz.makeConstructor (c$, -function (addAlignmentAnnotations, predictSecondaryStructure, externalSecStr, file, protocol) { -Clazz.superConstructor (this, MCview.PDBfile, [false, file, protocol]); -this.visibleChainAnnotation = addAlignmentAnnotations; -this.$predictSecondaryStructure = predictSecondaryStructure; -this.externalSecondaryStructure = externalSecStr; -this.doParse (); -}, "~B,~B,~B,~S,~S"); -Clazz.makeConstructor (c$, -function (addAlignmentAnnotations, predictSecondaryStructure, externalSecStr, source) { -Clazz.superConstructor (this, MCview.PDBfile, [false, source]); -this.visibleChainAnnotation = addAlignmentAnnotations; -this.$predictSecondaryStructure = predictSecondaryStructure; -this.externalSecondaryStructure = externalSecStr; -this.doParse (); -}, "~B,~B,~B,jalview.io.FileParse"); -Clazz.overrideMethod (c$, "print", -function () { -return null; -}); -Clazz.overrideMethod (c$, "parse", -function () { -this.id = this.safeName (this.getDataName ()); -this.chains = new java.util.Vector (); -var rna = new java.util.ArrayList (); -var prot = new java.util.ArrayList (); -var tmpchain; -var line = null; -var modelFlag = false; -var terFlag = false; -var lastID = ""; -var indexx = 0; -var atomnam = null; -try { -while ((line = this.nextLine ()) != null) { -if (line.indexOf ("HEADER") == 0) { -if (line.length > 62) { -var tid; -if (line.length > 67) { -tid = line.substring (62, 67).trim (); -} else { -tid = line.substring (62).trim (); -}if (tid.length > 0) { -this.id = tid; -}continue; -}}if (line.indexOf ("SEQRES") == 0) { -}if (line.indexOf ("MODEL") == 0) { -modelFlag = true; -}if (line.indexOf ("TER") == 0) { -terFlag = true; -}if (modelFlag && line.indexOf ("ENDMDL") == 0) { -break; -}if (line.indexOf ("ATOM") == 0 || (line.indexOf ("HETATM") == 0 && !terFlag)) { -terFlag = false; -atomnam = line.substring (12, 15).trim (); -if (!atomnam.equals ("CA") && !atomnam.equals ("P")) { -continue; -}var tmpatom = new MCview.Atom (line); -tmpchain = this.findChain (tmpatom.chain); -if (tmpchain != null) { -if (tmpatom.resNumIns.trim ().equals (lastID)) { -continue; -}tmpchain.atoms.addElement (tmpatom); -} else { -tmpchain = new MCview.PDBChain (this.id, tmpatom.chain); -this.chains.addElement (tmpchain); -tmpchain.atoms.addElement (tmpatom); -}lastID = tmpatom.resNumIns.trim (); -}this.index++; -} -this.makeResidueList (); -this.makeCaBondList (); -if (this.id == null) { -this.id = this.inFile.getName (); -}for (var chain, $chain = this.chains.iterator (); $chain.hasNext () && ((chain = $chain.next ()) || true);) { -var chainseq = this.postProcessChain (chain); -if (MCview.PDBfile.isRNA (chainseq)) { -rna.add (chainseq); -} else { -prot.add (chainseq); -}} -if (this.$predictSecondaryStructure) { -this.predictSecondaryStructure (rna, prot); -}} catch (e$$) { -if (Clazz.exceptionOf (e$$, OutOfMemoryError)) { -var er = e$$; -{ -System.out.println ("OUT OF MEMORY LOADING PDB FILE"); -throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.outofmemory_loading_pdb_file")); -} -} else if (Clazz.exceptionOf (e$$, NumberFormatException)) { -var ex = e$$; -{ -if (line != null) { -System.err.println ("Couldn't read number from line:"); -System.err.println (line); -}} -} else { -throw e$$; -} -} -this.markCalcIds (); -}); -Clazz.defineMethod (c$, "predictSecondaryStructure", -function (rnaSequences, proteinSequences) { -if (this.externalSecondaryStructure && rnaSequences.size () > 0) { -try { -this.processPdbFileWithAnnotate3d (rnaSequences); -} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -System.err.println ("Exceptions when dealing with RNA in pdb file"); -x.printStackTrace (); -} else { -throw x; -} -} -}if (proteinSequences.size () > 0) { -try { -this.processPdbFileWithJmol (proteinSequences); -} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -System.err.println ("Exceptions from Jmol when processing data in pdb file"); -x.printStackTrace (); -} else { -throw x; -} -} -}}, "java.util.List,java.util.List"); -Clazz.defineMethod (c$, "postProcessChain", -function (chain) { -var dataset = chain.sequence; -dataset.setName (this.id + "|" + dataset.getName ()); -var entry = new jalview.datamodel.PDBEntry (); -entry.setId (this.id); -entry.setType (jalview.datamodel.PDBEntry.Type.PDB); -entry.setProperty ( new java.util.Hashtable ()); -if (chain.id != null) { -entry.setChainCode (String.valueOf (chain.id)); -}if (this.inFile != null) { -entry.setFile (this.inFile.getAbsolutePath ()); -} else { -entry.setFile (this.getDataName ()); -}dataset.addPDBId (entry); -var chainseq = dataset.deriveSequence (); -this.seqs.addElement (chainseq); -var chainannot = chainseq.getAnnotation (); -if (chainannot != null && this.visibleChainAnnotation) { -for (var ai = 0; ai < chainannot.length; ai++) { -chainannot[ai].visible = this.visibleChainAnnotation; -this.annotations.addElement (chainannot[ai]); -} -}return chainseq; -}, "MCview.PDBChain"); -c$.isCalcIdHandled = Clazz.defineMethod (c$, "isCalcIdHandled", -function (calcId) { -return calcId != null && (MCview.PDBfile.CALC_ID_PREFIX.equals (calcId)); -}, "~S"); -c$.isCalcIdForFile = Clazz.defineMethod (c$, "isCalcIdForFile", -function (alan, pdbFile) { -return alan.getCalcId () != null && MCview.PDBfile.CALC_ID_PREFIX.equals (alan.getCalcId ()) && pdbFile.equals (alan.getProperty ("PDBID")); -}, "jalview.datamodel.AlignmentAnnotation,~S"); -c$.relocateCalcId = Clazz.defineMethod (c$, "relocateCalcId", -function (calcId, alreadyLoadedPDB) { -var s = MCview.PDBfile.CALC_ID_PREFIX.length; -var end = calcId.indexOf (MCview.PDBfile.CALC_ID_PREFIX, s); -var between = calcId.substring (s, end - 1); -return MCview.PDBfile.CALC_ID_PREFIX + alreadyLoadedPDB.get (between) + ":" + calcId.substring (end); -}, "~S,java.util.Hashtable"); -Clazz.defineMethod (c$, "markCalcIds", -($fz = function () { -for (var sq, $sq = this.seqs.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -if (sq.getAnnotation () != null) { -for (var aa, $aa = 0, $$aa = sq.getAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { -var oldId = aa.getCalcId (); -if (oldId == null) { -oldId = ""; -}aa.setCalcId (MCview.PDBfile.CALC_ID_PREFIX); -aa.setProperty ("PDBID", this.id); -aa.setProperty ("oldCalcId", oldId); -} -}} -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "processPdbFileWithJmol", -($fz = function (prot) { -try { -var cl = Class.forName ("jalview.ext.jmol.PDBFileWithJmol"); -if (cl != null) { -var constructor = cl.getConstructor ( Clazz.newArray (-1, [jalview.io.FileParse])); -var args = Clazz.newArray (-1, [ new jalview.io.FileParse (this.getDataName (), this.type)]); -var jmf = constructor.newInstance (args); -var al = new jalview.datamodel.Alignment (cl.getMethod ("getSeqsAsArray", Clazz.newArray (-1, [])).invoke (jmf, [])); -cl.getMethod ("addAnnotations", Clazz.newArray (-1, [jalview.datamodel.AlignmentI])).invoke (jmf, [al]); -for (var sq, $sq = al.getSequences ().iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -if (sq.getDatasetSequence () != null) { -sq.getDatasetSequence ().getPDBId ().clear (); -} else { -sq.getPDBId ().clear (); -}} -this.replaceAndUpdateChains (prot, al, "pep", false); -}} catch (q) { -if (Clazz.exceptionOf (q, ClassNotFoundException)) { -} else { -throw q; -} -} -}, $fz.isPrivate = true, $fz), "java.util.List"); -Clazz.defineMethod (c$, "replaceAndUpdateChains", -($fz = function (prot, al, pep, b) { -var replaced = jalview.analysis.AlignSeq.replaceMatchingSeqsWith (this.seqs, this.annotations, prot, al, pep, false); -for (var ch, $ch = this.chains.iterator (); $ch.hasNext () && ((ch = $ch.next ()) || true);) { -var p = 0; -for (var sq, $sq = replaced.get (0).iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -p++; -if (sq === ch.sequence || sq.getDatasetSequence () === ch.sequence) { -p = -p; -break; -}} -if (p < 0) { -p = -p - 1; -ch.shadow = replaced.get (1).get (p); -ch.shadowMap = (replaced.get (2).get (p)).getMappingFromS1 (false); -}} -}, $fz.isPrivate = true, $fz), "java.util.List,jalview.datamodel.AlignmentI,~S,~B"); -Clazz.defineMethod (c$, "processPdbFileWithAnnotate3d", -($fz = function (rna) { -try { -var cl = Class.forName ("jalview.ws.jws1.Annotate3D"); -if (cl != null) { -var annotate3d = cl.getConstructor ( Clazz.newArray (-1, [])).newInstance ( Clazz.newArray (-1, [])); -var al = (cl.getMethod ("getRNAMLFor", Clazz.newArray (-1, [jalview.io.FileParse])).invoke (annotate3d, Clazz.newArray (-1, [ new jalview.io.FileParse (this.getDataName (), this.type)]))); -for (var sq, $sq = al.getSequences ().iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -if (sq.getDatasetSequence () != null) { -if (sq.getDatasetSequence ().getPDBId () != null) { -sq.getDatasetSequence ().getPDBId ().clear (); -}} else { -if (sq.getPDBId () != null) { -sq.getPDBId ().clear (); -}}} -this.replaceAndUpdateChains (rna, al, "dna", false); -}} catch (x) { -if (Clazz.exceptionOf (x, ClassNotFoundException)) { -} else { -throw x; -} -} -;}, $fz.isPrivate = true, $fz), "java.util.List"); -Clazz.defineMethod (c$, "safeName", -($fz = function (dataName) { -var p = 0; -while ((p = dataName.indexOf ("/")) > -1 && p < dataName.length) { -dataName = dataName.substring (p + 1); -} -return dataName; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "makeResidueList", -function () { -for (var i = 0; i < this.chains.size (); i++) { -this.chains.elementAt (i).makeResidueList (this.visibleChainAnnotation); -} -}); -Clazz.defineMethod (c$, "makeCaBondList", -function () { -for (var i = 0; i < this.chains.size (); i++) { -this.chains.elementAt (i).makeCaBondList (); -} -}); -Clazz.defineMethod (c$, "findChain", -function (id) { -for (var i = 0; i < this.chains.size (); i++) { -if (this.chains.elementAt (i).id.equals (id)) { -return this.chains.elementAt (i); -}} -return null; -}, "~S"); -Clazz.defineMethod (c$, "setChargeColours", -function () { -for (var i = 0; i < this.chains.size (); i++) { -this.chains.elementAt (i).setChargeColours (); -} -}); -Clazz.defineMethod (c$, "setColours", -function (cs) { -for (var i = 0; i < this.chains.size (); i++) { -this.chains.elementAt (i).setChainColours (cs); -} -}, "jalview.schemes.ColourSchemeI"); -Clazz.defineMethod (c$, "setChainColours", -function () { -for (var i = 0; i < this.chains.size (); i++) { -this.chains.elementAt (i).setChainColours (java.awt.Color.getHSBColor (1.0 / i, .4, 1.0)); -} -}); -c$.isRNA = Clazz.defineMethod (c$, "isRNA", -function (seq) { -for (var c, $c = 0, $$c = seq.getSequence (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { -if ((c != 'A') && (c != 'C') && (c != 'G') && (c != 'U')) { -return false; -}} -return true; -}, "jalview.datamodel.SequenceI"); -Clazz.defineStatics (c$, -"CALC_ID_PREFIX", "JalviewPDB"); -}); +Clazz.declarePackage ("MCview"); +Clazz.load (["jalview.io.AlignFile"], "MCview.PDBfile", ["MCview.Atom", "$.PDBChain", "jalview.analysis.AlignSeq", "jalview.datamodel.Alignment", "$.AlignmentI", "$.PDBEntry", "jalview.io.FileParse", "jalview.util.MessageManager", "java.awt.Color", "java.io.IOException", "java.util.ArrayList", "$.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.chains = null; +this.id = null; +this.visibleChainAnnotation = false; +this.$predictSecondaryStructure = true; +this.externalSecondaryStructure = false; +Clazz.instantialize (this, arguments); +}, MCview, "PDBfile", jalview.io.AlignFile); +Clazz.makeConstructor (c$, +function (addAlignmentAnnotations, predictSecondaryStructure, externalSecStr) { +Clazz.superConstructor (this, MCview.PDBfile); +this.visibleChainAnnotation = addAlignmentAnnotations; +this.$predictSecondaryStructure = predictSecondaryStructure; +this.externalSecondaryStructure = externalSecStr; +}, "~B,~B,~B"); +Clazz.makeConstructor (c$, +function (addAlignmentAnnotations, predictSecondaryStructure, externalSecStr, file, protocol) { +Clazz.superConstructor (this, MCview.PDBfile, [false, file, protocol]); +this.visibleChainAnnotation = addAlignmentAnnotations; +this.$predictSecondaryStructure = predictSecondaryStructure; +this.externalSecondaryStructure = externalSecStr; +this.doParse (); +}, "~B,~B,~B,~S,~S"); +Clazz.makeConstructor (c$, +function (addAlignmentAnnotations, predictSecondaryStructure, externalSecStr, source) { +Clazz.superConstructor (this, MCview.PDBfile, [false, source]); +this.visibleChainAnnotation = addAlignmentAnnotations; +this.$predictSecondaryStructure = predictSecondaryStructure; +this.externalSecondaryStructure = externalSecStr; +this.doParse (); +}, "~B,~B,~B,jalview.io.FileParse"); +Clazz.overrideMethod (c$, "print", +function () { +return null; +}); +Clazz.overrideMethod (c$, "parse", +function () { +this.id = this.safeName (this.getDataName ()); +this.chains = new java.util.Vector (); +var rna = new java.util.ArrayList (); +var prot = new java.util.ArrayList (); +var tmpchain; +var line = null; +var modelFlag = false; +var terFlag = false; +var lastID = ""; +var indexx = 0; +var atomnam = null; +try { +while ((line = this.nextLine ()) != null) { +if (line.indexOf ("HEADER") == 0) { +if (line.length > 62) { +var tid; +if (line.length > 67) { +tid = line.substring (62, 67).trim (); +} else { +tid = line.substring (62).trim (); +}if (tid.length > 0) { +this.id = tid; +}continue; +}}if (line.indexOf ("SEQRES") == 0) { +}if (line.indexOf ("MODEL") == 0) { +modelFlag = true; +}if (line.indexOf ("TER") == 0) { +terFlag = true; +}if (modelFlag && line.indexOf ("ENDMDL") == 0) { +break; +}if (line.indexOf ("ATOM") == 0 || (line.indexOf ("HETATM") == 0 && !terFlag)) { +terFlag = false; +atomnam = line.substring (12, 15).trim (); +if (!atomnam.equals ("CA") && !atomnam.equals ("P")) { +continue; +}var tmpatom = new MCview.Atom (line); +tmpchain = this.findChain (tmpatom.chain); +if (tmpchain != null) { +if (tmpatom.resNumIns.trim ().equals (lastID)) { +continue; +}tmpchain.atoms.addElement (tmpatom); +} else { +tmpchain = new MCview.PDBChain (this.id, tmpatom.chain); +this.chains.addElement (tmpchain); +tmpchain.atoms.addElement (tmpatom); +}lastID = tmpatom.resNumIns.trim (); +}this.index++; +} +this.makeResidueList (); +this.makeCaBondList (); +if (this.id == null) { +this.id = this.inFile.getName (); +}for (var chain, $chain = this.chains.iterator (); $chain.hasNext () && ((chain = $chain.next ()) || true);) { +var chainseq = this.postProcessChain (chain); +if (MCview.PDBfile.isRNA (chainseq)) { +rna.add (chainseq); +} else { +prot.add (chainseq); +}} +if (this.$predictSecondaryStructure) { +this.predictSecondaryStructure (rna, prot); +}} catch (e$$) { +if (Clazz.exceptionOf (e$$, OutOfMemoryError)) { +var er = e$$; +{ +System.out.println ("OUT OF MEMORY LOADING PDB FILE"); +throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.outofmemory_loading_pdb_file")); +} +} else if (Clazz.exceptionOf (e$$, NumberFormatException)) { +var ex = e$$; +{ +if (line != null) { +System.err.println ("Couldn't read number from line:"); +System.err.println (line); +}} +} else { +throw e$$; +} +} +this.markCalcIds (); +}); +Clazz.defineMethod (c$, "predictSecondaryStructure", +function (rnaSequences, proteinSequences) { +if (this.externalSecondaryStructure && rnaSequences.size () > 0) { +try { +this.processPdbFileWithAnnotate3d (rnaSequences); +} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +System.err.println ("Exceptions when dealing with RNA in pdb file"); +x.printStackTrace (); +} else { +throw x; +} +} +}if (proteinSequences.size () > 0) { +try { +this.processPdbFileWithJmol (proteinSequences); +} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +System.err.println ("Exceptions from Jmol when processing data in pdb file"); +x.printStackTrace (); +} else { +throw x; +} +} +}}, "java.util.List,java.util.List"); +Clazz.defineMethod (c$, "postProcessChain", +function (chain) { +var dataset = chain.sequence; +dataset.setName (this.id + "|" + dataset.getName ()); +var entry = new jalview.datamodel.PDBEntry (); +entry.setId (this.id); +entry.setType (jalview.datamodel.PDBEntry.Type.PDB); +entry.setProperty ( new java.util.Hashtable ()); +if (chain.id != null) { +entry.setChainCode (String.valueOf (chain.id)); +}if (this.inFile != null) { +entry.setFile (this.inFile.getAbsolutePath ()); +} else { +entry.setFile (this.getDataName ()); +}dataset.addPDBId (entry); +var chainseq = dataset.deriveSequence (); +this.seqs.addElement (chainseq); +var chainannot = chainseq.getAnnotation (); +if (chainannot != null && this.visibleChainAnnotation) { +for (var ai = 0; ai < chainannot.length; ai++) { +chainannot[ai].visible = this.visibleChainAnnotation; +this.annotations.addElement (chainannot[ai]); +} +}return chainseq; +}, "MCview.PDBChain"); +c$.isCalcIdHandled = Clazz.defineMethod (c$, "isCalcIdHandled", +function (calcId) { +return calcId != null && (MCview.PDBfile.CALC_ID_PREFIX.equals (calcId)); +}, "~S"); +c$.isCalcIdForFile = Clazz.defineMethod (c$, "isCalcIdForFile", +function (alan, pdbFile) { +return alan.getCalcId () != null && MCview.PDBfile.CALC_ID_PREFIX.equals (alan.getCalcId ()) && pdbFile.equals (alan.getProperty ("PDBID")); +}, "jalview.datamodel.AlignmentAnnotation,~S"); +c$.relocateCalcId = Clazz.defineMethod (c$, "relocateCalcId", +function (calcId, alreadyLoadedPDB) { +var s = MCview.PDBfile.CALC_ID_PREFIX.length; +var end = calcId.indexOf (MCview.PDBfile.CALC_ID_PREFIX, s); +var between = calcId.substring (s, end - 1); +return MCview.PDBfile.CALC_ID_PREFIX + alreadyLoadedPDB.get (between) + ":" + calcId.substring (end); +}, "~S,java.util.Hashtable"); +Clazz.defineMethod (c$, "markCalcIds", +($fz = function () { +for (var sq, $sq = this.seqs.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +if (sq.getAnnotation () != null) { +for (var aa, $aa = 0, $$aa = sq.getAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { +var oldId = aa.getCalcId (); +if (oldId == null) { +oldId = ""; +}aa.setCalcId (MCview.PDBfile.CALC_ID_PREFIX); +aa.setProperty ("PDBID", this.id); +aa.setProperty ("oldCalcId", oldId); +} +}} +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "processPdbFileWithJmol", +($fz = function (prot) { +try { +var cl = Class.forName ("jalview.ext.jmol.PDBFileWithJmol"); +if (cl != null) { +var constructor = cl.getConstructor ( Clazz.newArray (-1, [jalview.io.FileParse])); +var args = Clazz.newArray (-1, [ new jalview.io.FileParse (this.getDataName (), this.type)]); +var jmf = constructor.newInstance (args); +var al = new jalview.datamodel.Alignment (cl.getMethod ("getSeqsAsArray", Clazz.newArray (-1, [])).invoke (jmf, [])); +cl.getMethod ("addAnnotations", Clazz.newArray (-1, [jalview.datamodel.AlignmentI])).invoke (jmf, [al]); +for (var sq, $sq = al.getSequences ().iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +if (sq.getDatasetSequence () != null) { +sq.getDatasetSequence ().getPDBId ().clear (); +} else { +sq.getPDBId ().clear (); +}} +this.replaceAndUpdateChains (prot, al, "pep", false); +}} catch (q) { +if (Clazz.exceptionOf (q, ClassNotFoundException)) { +} else { +throw q; +} +} +}, $fz.isPrivate = true, $fz), "java.util.List"); +Clazz.defineMethod (c$, "replaceAndUpdateChains", +($fz = function (prot, al, pep, b) { +var replaced = jalview.analysis.AlignSeq.replaceMatchingSeqsWith (this.seqs, this.annotations, prot, al, pep, false); +for (var ch, $ch = this.chains.iterator (); $ch.hasNext () && ((ch = $ch.next ()) || true);) { +var p = 0; +for (var sq, $sq = replaced.get (0).iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +p++; +if (sq === ch.sequence || sq.getDatasetSequence () === ch.sequence) { +p = -p; +break; +}} +if (p < 0) { +p = -p - 1; +ch.shadow = replaced.get (1).get (p); +ch.shadowMap = (replaced.get (2).get (p)).getMappingFromS1 (false); +}} +}, $fz.isPrivate = true, $fz), "java.util.List,jalview.datamodel.AlignmentI,~S,~B"); +Clazz.defineMethod (c$, "processPdbFileWithAnnotate3d", +($fz = function (rna) { +try { +var cl = Class.forName ("jalview.ws.jws1.Annotate3D"); +if (cl != null) { +var annotate3d = cl.getConstructor ( Clazz.newArray (-1, [])).newInstance ( Clazz.newArray (-1, [])); +var al = (cl.getMethod ("getRNAMLFor", Clazz.newArray (-1, [jalview.io.FileParse])).invoke (annotate3d, Clazz.newArray (-1, [ new jalview.io.FileParse (this.getDataName (), this.type)]))); +for (var sq, $sq = al.getSequences ().iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +if (sq.getDatasetSequence () != null) { +if (sq.getDatasetSequence ().getPDBId () != null) { +sq.getDatasetSequence ().getPDBId ().clear (); +}} else { +if (sq.getPDBId () != null) { +sq.getPDBId ().clear (); +}}} +this.replaceAndUpdateChains (rna, al, "dna", false); +}} catch (x) { +if (Clazz.exceptionOf (x, ClassNotFoundException)) { +} else { +throw x; +} +} +;}, $fz.isPrivate = true, $fz), "java.util.List"); +Clazz.defineMethod (c$, "safeName", +($fz = function (dataName) { +var p = 0; +while ((p = dataName.indexOf ("/")) > -1 && p < dataName.length) { +dataName = dataName.substring (p + 1); +} +return dataName; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "makeResidueList", +function () { +for (var i = 0; i < this.chains.size (); i++) { +this.chains.elementAt (i).makeResidueList (this.visibleChainAnnotation); +} +}); +Clazz.defineMethod (c$, "makeCaBondList", +function () { +for (var i = 0; i < this.chains.size (); i++) { +this.chains.elementAt (i).makeCaBondList (); +} +}); +Clazz.defineMethod (c$, "findChain", +function (id) { +for (var i = 0; i < this.chains.size (); i++) { +if (this.chains.elementAt (i).id.equals (id)) { +return this.chains.elementAt (i); +}} +return null; +}, "~S"); +Clazz.defineMethod (c$, "setChargeColours", +function () { +for (var i = 0; i < this.chains.size (); i++) { +this.chains.elementAt (i).setChargeColours (); +} +}); +Clazz.defineMethod (c$, "setColours", +function (cs) { +for (var i = 0; i < this.chains.size (); i++) { +this.chains.elementAt (i).setChainColours (cs); +} +}, "jalview.schemes.ColourSchemeI"); +Clazz.defineMethod (c$, "setChainColours", +function () { +for (var i = 0; i < this.chains.size (); i++) { +this.chains.elementAt (i).setChainColours (java.awt.Color.getHSBColor (1.0 / i, .4, 1.0)); +} +}); +c$.isRNA = Clazz.defineMethod (c$, "isRNA", +function (seq) { +for (var c, $c = 0, $$c = seq.getSequence (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { +if ((c != 'A') && (c != 'C') && (c != 'G') && (c != 'U')) { +return false; +}} +return true; +}, "jalview.datamodel.SequenceI"); +Clazz.defineStatics (c$, +"CALC_ID_PREFIX", "JalviewPDB"); +}); diff --git a/bin/MCview/Residue.js b/bin/MCview/Residue.js index 93e2930..6cb43ed 100644 --- a/bin/MCview/Residue.js +++ b/bin/MCview/Residue.js @@ -1,21 +1,21 @@ -Clazz.declarePackage ("MCview"); -c$ = Clazz.decorateAsClass (function () { -this.atoms = null; -this.number = 0; -this.count = 0; -Clazz.instantialize (this, arguments); -}, MCview, "Residue"); -Clazz.makeConstructor (c$, -function (resAtoms, number, count) { -this.atoms = resAtoms; -this.number = number; -this.count = count; -}, "java.util.Vector,~N,~N"); -Clazz.defineMethod (c$, "findAtom", -function (name) { -for (var atom, $atom = this.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { -if (atom.name.equals (name)) { -return atom; -}} -return null; -}, "~S"); +Clazz.declarePackage ("MCview"); +c$ = Clazz.decorateAsClass (function () { +this.atoms = null; +this.number = 0; +this.count = 0; +Clazz.instantialize (this, arguments); +}, MCview, "Residue"); +Clazz.makeConstructor (c$, +function (resAtoms, number, count) { +this.atoms = resAtoms; +this.number = number; +this.count = count; +}, "java.util.Vector,~N,~N"); +Clazz.defineMethod (c$, "findAtom", +function (name) { +for (var atom, $atom = this.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { +if (atom.name.equals (name)) { +return atom; +}} +return null; +}, "~S"); diff --git a/bin/awt2swing/Button.js b/bin/awt2swing/Button.js index b25baa7..80ce87e 100644 --- a/bin/awt2swing/Button.js +++ b/bin/awt2swing/Button.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JButton"], "awt2swing.Button", null, function () { -c$ = Clazz.declareType (awt2swing, "Button", javax.swing.JButton); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JButton"], "awt2swing.Button", null, function () { +c$ = Clazz.declareType (awt2swing, "Button", javax.swing.JButton); +}); diff --git a/bin/awt2swing/Canvas.js b/bin/awt2swing/Canvas.js index df3f0b9..cf449b4 100644 --- a/bin/awt2swing/Canvas.js +++ b/bin/awt2swing/Canvas.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["awt2swing.Panel"], "awt2swing.Canvas", null, function () { -c$ = Clazz.declareType (awt2swing, "Canvas", awt2swing.Panel); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["awt2swing.Panel"], "awt2swing.Canvas", null, function () { +c$ = Clazz.declareType (awt2swing, "Canvas", awt2swing.Panel); +}); diff --git a/bin/awt2swing/Checkbox.js b/bin/awt2swing/Checkbox.js index cd50679..cfc477c 100644 --- a/bin/awt2swing/Checkbox.js +++ b/bin/awt2swing/Checkbox.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JCheckBox"], "awt2swing.Checkbox", null, function () { -c$ = Clazz.declareType (awt2swing, "Checkbox", javax.swing.JCheckBox); -Clazz.defineMethod (c$, "getState", -function () { -return this.isSelected (); -}); -Clazz.defineMethod (c$, "setState", -function (b) { -this.setSelected (b); -}, "~B"); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JCheckBox"], "awt2swing.Checkbox", null, function () { +c$ = Clazz.declareType (awt2swing, "Checkbox", javax.swing.JCheckBox); +Clazz.defineMethod (c$, "getState", +function () { +return this.isSelected (); +}); +Clazz.defineMethod (c$, "setState", +function (b) { +this.setSelected (b); +}, "~B"); +}); diff --git a/bin/awt2swing/CheckboxMenuItem.js b/bin/awt2swing/CheckboxMenuItem.js index 782c150..9364af7 100644 --- a/bin/awt2swing/CheckboxMenuItem.js +++ b/bin/awt2swing/CheckboxMenuItem.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JCheckBoxMenuItem"], "awt2swing.CheckboxMenuItem", null, function () { -c$ = Clazz.declareType (awt2swing, "CheckboxMenuItem", javax.swing.JCheckBoxMenuItem); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, awt2swing.CheckboxMenuItem, []); -}); -Clazz.overrideMethod (c$, "getState", -function () { -return this.isSelected (); -}); -Clazz.overrideMethod (c$, "setState", -function (tf) { -this.setSelected (tf); -}, "~B"); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JCheckBoxMenuItem"], "awt2swing.CheckboxMenuItem", null, function () { +c$ = Clazz.declareType (awt2swing, "CheckboxMenuItem", javax.swing.JCheckBoxMenuItem); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, awt2swing.CheckboxMenuItem, []); +}); +Clazz.overrideMethod (c$, "getState", +function () { +return this.isSelected (); +}); +Clazz.overrideMethod (c$, "setState", +function (tf) { +this.setSelected (tf); +}, "~B"); +}); diff --git a/bin/awt2swing/Choice.js b/bin/awt2swing/Choice.js index a4208b1..0eb2843 100644 --- a/bin/awt2swing/Choice.js +++ b/bin/awt2swing/Choice.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JComboBox"], "awt2swing.Choice", null, function () { -c$ = Clazz.declareType (awt2swing, "Choice", javax.swing.JComboBox); -Clazz.defineMethod (c$, "select", -function (key) { -this.setSelectedItem (key); -}, "~O"); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JComboBox"], "awt2swing.Choice", null, function () { +c$ = Clazz.declareType (awt2swing, "Choice", javax.swing.JComboBox); +Clazz.defineMethod (c$, "select", +function (key) { +this.setSelectedItem (key); +}, "~O"); +}); diff --git a/bin/awt2swing/Frame.js b/bin/awt2swing/Frame.js index 027d871..a4e228b 100644 --- a/bin/awt2swing/Frame.js +++ b/bin/awt2swing/Frame.js @@ -1,21 +1,21 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JFrame"], "awt2swing.Frame", null, function () { -c$ = Clazz.declareType (awt2swing, "Frame", javax.swing.JFrame); -Clazz.defineMethod (c$, "remove", -function (i) { -{ -this.removeInt(i); -}}, "~N"); -Clazz.defineMethod (c$, "setMenuBar", -function (m) { -this.setJMenuBar (m); -}, "awt2swing.MenuBar"); -Clazz.defineMethod (c$, "unsetMenuBar", -function () { -this.setJMenuBar (null); -}); -Clazz.defineMethod (c$, "getMenubar", -function () { -return this.getJMenuBar (); -}); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JFrame"], "awt2swing.Frame", null, function () { +c$ = Clazz.declareType (awt2swing, "Frame", javax.swing.JFrame); +Clazz.defineMethod (c$, "remove", +function (i) { +{ +this.removeInt(i); +}}, "~N"); +Clazz.defineMethod (c$, "setMenuBar", +function (m) { +this.setJMenuBar (m); +}, "awt2swing.MenuBar"); +Clazz.defineMethod (c$, "unsetMenuBar", +function () { +this.setJMenuBar (null); +}); +Clazz.defineMethod (c$, "getMenubar", +function () { +return this.getJMenuBar (); +}); +}); diff --git a/bin/awt2swing/Label.js b/bin/awt2swing/Label.js index 380eaf6..713f8b3 100644 --- a/bin/awt2swing/Label.js +++ b/bin/awt2swing/Label.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JLabel"], "awt2swing.Label", null, function () { -c$ = Clazz.declareType (awt2swing, "Label", javax.swing.JLabel); -Clazz.defineMethod (c$, "setAlignment", -function (alignment) { -this.setAlignmentX (alignment); -}, "~N"); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JLabel"], "awt2swing.Label", null, function () { +c$ = Clazz.declareType (awt2swing, "Label", javax.swing.JLabel); +Clazz.defineMethod (c$, "setAlignment", +function (alignment) { +this.setAlignmentX (alignment); +}, "~N"); +}); diff --git a/bin/awt2swing/Menu.js b/bin/awt2swing/Menu.js index da1b846..867b6ab 100644 --- a/bin/awt2swing/Menu.js +++ b/bin/awt2swing/Menu.js @@ -1,14 +1,14 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JMenu"], "awt2swing.Menu", null, function () { -c$ = Clazz.declareType (awt2swing, "Menu", javax.swing.JMenu); -Clazz.makeConstructor (c$, -function (title) { -Clazz.superConstructor (this, awt2swing.Menu, [title]); -title = null; -}, "~S"); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, awt2swing.Menu); -var s = null; -}); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JMenu"], "awt2swing.Menu", null, function () { +c$ = Clazz.declareType (awt2swing, "Menu", javax.swing.JMenu); +Clazz.makeConstructor (c$, +function (title) { +Clazz.superConstructor (this, awt2swing.Menu, [title]); +title = null; +}, "~S"); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, awt2swing.Menu); +var s = null; +}); +}); diff --git a/bin/awt2swing/MenuBar.js b/bin/awt2swing/MenuBar.js index 4865fdd..3b43191 100644 --- a/bin/awt2swing/MenuBar.js +++ b/bin/awt2swing/MenuBar.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JMenuBar"], "awt2swing.MenuBar", null, function () { -c$ = Clazz.declareType (awt2swing, "MenuBar", javax.swing.JMenuBar); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JMenuBar"], "awt2swing.MenuBar", null, function () { +c$ = Clazz.declareType (awt2swing, "MenuBar", javax.swing.JMenuBar); +}); diff --git a/bin/awt2swing/MenuItem.js b/bin/awt2swing/MenuItem.js index d20f729..f610760 100644 --- a/bin/awt2swing/MenuItem.js +++ b/bin/awt2swing/MenuItem.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JMenuItem"], "awt2swing.MenuItem", null, function () { -c$ = Clazz.declareType (awt2swing, "MenuItem", javax.swing.JMenuItem); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JMenuItem"], "awt2swing.MenuItem", null, function () { +c$ = Clazz.declareType (awt2swing, "MenuItem", javax.swing.JMenuItem); +}); diff --git a/bin/awt2swing/Panel.js b/bin/awt2swing/Panel.js index 5e33047..b6061d0 100644 --- a/bin/awt2swing/Panel.js +++ b/bin/awt2swing/Panel.js @@ -1,9 +1,9 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JPanel"], "awt2swing.Panel", null, function () { -c$ = Clazz.declareType (awt2swing, "Panel", javax.swing.JPanel); -Clazz.defineMethod (c$, "setName", -function (name) { -System.out.println (name); -Clazz.superCall (this, awt2swing.Panel, "setName", [name]); -}, "~S"); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JPanel"], "awt2swing.Panel", null, function () { +c$ = Clazz.declareType (awt2swing, "Panel", javax.swing.JPanel); +Clazz.defineMethod (c$, "setName", +function (name) { +System.out.println (name); +Clazz.superCall (this, awt2swing.Panel, "setName", [name]); +}, "~S"); +}); diff --git a/bin/awt2swing/PopupMenu.js b/bin/awt2swing/PopupMenu.js index 007642a..4af0e16 100644 --- a/bin/awt2swing/PopupMenu.js +++ b/bin/awt2swing/PopupMenu.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JPopupMenu"], "awt2swing.PopupMenu", null, function () { -c$ = Clazz.declareType (awt2swing, "PopupMenu", javax.swing.JPopupMenu); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JPopupMenu"], "awt2swing.PopupMenu", null, function () { +c$ = Clazz.declareType (awt2swing, "PopupMenu", javax.swing.JPopupMenu); +}); diff --git a/bin/awt2swing/ScrollPane.js b/bin/awt2swing/ScrollPane.js index 2ea1cea..3ba78cf 100644 --- a/bin/awt2swing/ScrollPane.js +++ b/bin/awt2swing/ScrollPane.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JScrollPane"], "awt2swing.ScrollPane", null, function () { -c$ = Clazz.declareType (awt2swing, "ScrollPane", javax.swing.JScrollPane); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JScrollPane"], "awt2swing.ScrollPane", null, function () { +c$ = Clazz.declareType (awt2swing, "ScrollPane", javax.swing.JScrollPane); +}); diff --git a/bin/awt2swing/Scrollbar.js b/bin/awt2swing/Scrollbar.js index b68bd0c..3859a96 100644 --- a/bin/awt2swing/Scrollbar.js +++ b/bin/awt2swing/Scrollbar.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JScrollBar"], "awt2swing.Scrollbar", null, function () { -c$ = Clazz.declareType (awt2swing, "Scrollbar", javax.swing.JScrollBar); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JScrollBar"], "awt2swing.Scrollbar", null, function () { +c$ = Clazz.declareType (awt2swing, "Scrollbar", javax.swing.JScrollBar); +}); diff --git a/bin/awt2swing/TextArea.js b/bin/awt2swing/TextArea.js index 3aec891..4358c37 100644 --- a/bin/awt2swing/TextArea.js +++ b/bin/awt2swing/TextArea.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JTextArea"], "awt2swing.TextArea", null, function () { -c$ = Clazz.declareType (awt2swing, "TextArea", javax.swing.JTextArea); -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JTextArea"], "awt2swing.TextArea", null, function () { +c$ = Clazz.declareType (awt2swing, "TextArea", javax.swing.JTextArea); +}); diff --git a/bin/awt2swing/TextField.js b/bin/awt2swing/TextField.js index e8c1558..ef48b75 100644 --- a/bin/awt2swing/TextField.js +++ b/bin/awt2swing/TextField.js @@ -1,23 +1,23 @@ -Clazz.declarePackage ("awt2swing"); -Clazz.load (["javax.swing.JTextField"], "awt2swing.TextField", ["java.awt.event.TextEvent", "javax.swing.event.DocumentListener"], function () { -c$ = Clazz.declareType (awt2swing, "TextField", javax.swing.JTextField); -Clazz.defineMethod (c$, "addTextListener", -function (textListener) { -this.getDocument ().addDocumentListener (((Clazz.isClassDefined ("awt2swing.TextField$1") ? 0 : awt2swing.TextField.$TextField$1$ ()), Clazz.innerTypeInstance (awt2swing.TextField$1, this, Clazz.cloneFinals ("textListener", textListener)))); -}, "java.awt.event.TextListener"); -c$.$TextField$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (awt2swing, "TextField$1", null, javax.swing.event.DocumentListener); -Clazz.overrideMethod (c$, "insertUpdate", -function (e) { -}, "javax.swing.event.DocumentEvent"); -Clazz.overrideMethod (c$, "removeUpdate", -function (e) { -}, "javax.swing.event.DocumentEvent"); -Clazz.overrideMethod (c$, "changedUpdate", -function (e) { -this.f$.textListener.textValueChanged ( new java.awt.event.TextEvent (this, 0)); -}, "javax.swing.event.DocumentEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("awt2swing"); +Clazz.load (["javax.swing.JTextField"], "awt2swing.TextField", ["java.awt.event.TextEvent", "javax.swing.event.DocumentListener"], function () { +c$ = Clazz.declareType (awt2swing, "TextField", javax.swing.JTextField); +Clazz.defineMethod (c$, "addTextListener", +function (textListener) { +this.getDocument ().addDocumentListener (((Clazz.isClassDefined ("awt2swing.TextField$1") ? 0 : awt2swing.TextField.$TextField$1$ ()), Clazz.innerTypeInstance (awt2swing.TextField$1, this, Clazz.cloneFinals ("textListener", textListener)))); +}, "java.awt.event.TextListener"); +c$.$TextField$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (awt2swing, "TextField$1", null, javax.swing.event.DocumentListener); +Clazz.overrideMethod (c$, "insertUpdate", +function (e) { +}, "javax.swing.event.DocumentEvent"); +Clazz.overrideMethod (c$, "removeUpdate", +function (e) { +}, "javax.swing.event.DocumentEvent"); +Clazz.overrideMethod (c$, "changedUpdate", +function (e) { +this.f$.textListener.textValueChanged ( new java.awt.event.TextEvent (this, 0)); +}, "javax.swing.event.DocumentEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/com/stevesoft/pat/AmpersandRule.js b/bin/com/stevesoft/pat/AmpersandRule.js index ac1ce77..6d1f622 100644 --- a/bin/com/stevesoft/pat/AmpersandRule.js +++ b/bin/com/stevesoft/pat/AmpersandRule.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.AmpersandRule", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "AmpersandRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.AmpersandRule, []); -}); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -sb.append (res.stringMatched ()); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return "$&"; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.AmpersandRule", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "AmpersandRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.AmpersandRule, []); +}); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +sb.append (res.stringMatched ()); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return "$&"; +}); +}); diff --git a/bin/com/stevesoft/pat/Any.js b/bin/com/stevesoft/pat/Any.js index f129d92..503de21 100644 --- a/bin/com/stevesoft/pat/Any.js +++ b/bin/com/stevesoft/pat/Any.js @@ -1,30 +1,30 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Any", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "Any", com.stevesoft.pat.Pattern); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (pos < pt.src.length ()) { -if (pt.dotDoesntMatchCR) { -if (pt.src.charAt (pos) != '\n') { -return this.nextMatch (pos + 1, pt); -}} else { -return this.nextMatch (pos + 1, pt); -}}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -return "." + this.nextString (); -}); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.Any (); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Any", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "Any", com.stevesoft.pat.Pattern); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (pos < pt.src.length ()) { +if (pt.dotDoesntMatchCR) { +if (pt.src.charAt (pos) != '\n') { +return this.nextMatch (pos + 1, pt); +}} else { +return this.nextMatch (pos + 1, pt); +}}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +return "." + this.nextString (); +}); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Any (); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/BackG.js b/bin/com/stevesoft/pat/BackG.js index 28d17cd..a9d07b7 100644 --- a/bin/com/stevesoft/pat/BackG.js +++ b/bin/com/stevesoft/pat/BackG.js @@ -1,34 +1,34 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.BackG", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.c = '\0'; -this.altc = '\0'; -this.altc2 = '\0'; -this.mask = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "BackG", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.BackG, []); -}); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -return pos == pt.lastPos ? this.nextMatch (pos, pt) : -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -return "\\G" + this.nextString (); -}); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.BackG (); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.BackG", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.c = '\0'; +this.altc = '\0'; +this.altc2 = '\0'; +this.mask = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "BackG", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.BackG, []); +}); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +return pos == pt.lastPos ? this.nextMatch (pos, pt) : -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +return "\\G" + this.nextString (); +}); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.BackG (); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/BackMatch.js b/bin/com/stevesoft/pat/BackMatch.js index 018cdda..f3a2ea9 100644 --- a/bin/com/stevesoft/pat/BackMatch.js +++ b/bin/com/stevesoft/pat/BackMatch.js @@ -1,36 +1,36 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.BackMatch", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.id = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "BackMatch", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (id) { -Clazz.superConstructor (this, com.stevesoft.pat.BackMatch, []); -this.id = id; -}, "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return "\\" + (this.id) + this.nextString (); -}); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, p) { -var i1 = p.marks[this.id]; -var i2 = p.marks[this.id + p.nMarks]; -var imax = i2 - i1; -if (i1 < 0 || imax < 0 || pos + imax > p.src.length ()) { -return -1; -}var ns = p.src.length () - pos; -if (imax < ns) { -ns = imax; -}for (var i = 0; i < ns; i++) { -if (p.src.charAt (i + i1) != p.src.charAt (pos + i)) { -return -1; -}} -return this.nextMatch (pos + imax, p); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.BackMatch (this.id); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.BackMatch", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.id = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "BackMatch", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (id) { +Clazz.superConstructor (this, com.stevesoft.pat.BackMatch, []); +this.id = id; +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return "\\" + (this.id) + this.nextString (); +}); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, p) { +var i1 = p.marks[this.id]; +var i2 = p.marks[this.id + p.nMarks]; +var imax = i2 - i1; +if (i1 < 0 || imax < 0 || pos + imax > p.src.length ()) { +return -1; +}var ns = p.src.length () - pos; +if (imax < ns) { +ns = imax; +}for (var i = 0; i < ns; i++) { +if (p.src.charAt (i + i1) != p.src.charAt (pos + i)) { +return -1; +}} +return this.nextMatch (pos + imax, p); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.BackMatch (this.id); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/BackRefRule.js b/bin/com/stevesoft/pat/BackRefRule.js index d6a1e2e..f744c08 100644 --- a/bin/com/stevesoft/pat/BackRefRule.js +++ b/bin/com/stevesoft/pat/BackRefRule.js @@ -1,25 +1,25 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.BackRefRule", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.n = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "BackRefRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function (n) { -Clazz.superConstructor (this, com.stevesoft.pat.BackRefRule, []); -this.n = n; -}, "~N"); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -var x = res.stringMatchedI (this.n); -sb.append (x == null ? "" : x); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return "$" + this.n; -}); -Clazz.overrideMethod (c$, "clone1", -function () { -return new com.stevesoft.pat.BackRefRule (this.n); -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.BackRefRule", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.n = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "BackRefRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function (n) { +Clazz.superConstructor (this, com.stevesoft.pat.BackRefRule, []); +this.n = n; +}, "~N"); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +var x = res.stringMatchedI (this.n); +sb.append (x == null ? "" : x); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return "$" + this.n; +}); +Clazz.overrideMethod (c$, "clone1", +function () { +return new com.stevesoft.pat.BackRefRule (this.n); +}); +}); diff --git a/bin/com/stevesoft/pat/Backup.js b/bin/com/stevesoft/pat/Backup.js index f155142..3063b71 100644 --- a/bin/com/stevesoft/pat/Backup.js +++ b/bin/com/stevesoft/pat/Backup.js @@ -1,34 +1,34 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Backup", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.bk = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Backup", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (ii) { -Clazz.superConstructor (this, com.stevesoft.pat.Backup, []); -this.bk = ii; -}, "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return "(?" + (this.bk < 0 ? ">" + (-this.bk) : "<" + this.bk) + ")" + this.nextString (); -}); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (pos < this.bk) { -return -1; -}return this.nextMatch (pos - this.bk, pt); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (-this.bk); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (-this.bk); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.Backup (this.bk); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Backup", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.bk = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Backup", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (ii) { +Clazz.superConstructor (this, com.stevesoft.pat.Backup, []); +this.bk = ii; +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return "(?" + (this.bk < 0 ? ">" + (-this.bk) : "<" + this.bk) + ")" + this.nextString (); +}); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (pos < this.bk) { +return -1; +}return this.nextMatch (pos - this.bk, pt); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (-this.bk); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (-this.bk); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Backup (this.bk); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/BasicStringBufferLike.js b/bin/com/stevesoft/pat/BasicStringBufferLike.js index f4df37f..c492d08 100644 --- a/bin/com/stevesoft/pat/BasicStringBufferLike.js +++ b/bin/com/stevesoft/pat/BasicStringBufferLike.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.declareInterface (com.stevesoft.pat, "BasicStringBufferLike"); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.declareInterface (com.stevesoft.pat, "BasicStringBufferLike"); diff --git a/bin/com/stevesoft/pat/Bits.js b/bin/com/stevesoft/pat/Bits.js index ec8b74c..61bb0fd 100644 --- a/bin/com/stevesoft/pat/Bits.js +++ b/bin/com/stevesoft/pat/Bits.js @@ -1,2958 +1,2958 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -c$ = Clazz.decorateAsClass (function () { -this.carray = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Bits"); -Clazz.makeConstructor (c$, -function (carray) { -this.carray = carray; -}, "~A"); -Clazz.defineMethod (c$, "get", -function (i) { -return ((this.carray[i >> 4]).charCodeAt (0) & (1 << (i & 15))) != 0; -}, "~N"); -Clazz.defineMethod (c$, "set", -function (i, b) { -if (b) { -this.carray[i >> 4] = String.fromCharCode ((this.carray[i >> 4]).charCodeAt (0) | ((String.fromCharCode (1)).charCodeAt (0) << (i & 15))); -} else { -this.carray[i >> 4] = String.fromCharCode ((this.carray[i >> 4]).charCodeAt (0) & (String.fromCharCode (~(1 << (i & 15)))).charCodeAt (0)); -}}, "~N,~B"); -c$.upper_f = Clazz.defineMethod (c$, "upper_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.upper = new com.stevesoft.pat.Bits (data); -data[4] = String.fromCharCode (0xfffe); -data[5] = String.fromCharCode (0x07ff); -data[12] = String.fromCharCode (0xffff); -data[13] = String.fromCharCode (0x7f7f); -data[16] = String.fromCharCode (0x5555); -data[17] = String.fromCharCode (0x5555); -data[18] = String.fromCharCode (0x5555); -data[19] = String.fromCharCode (0xaa55); -data[20] = String.fromCharCode (0x54aa); -data[21] = String.fromCharCode (0x5555); -data[22] = String.fromCharCode (0x5555); -data[23] = String.fromCharCode (0x2b55); -data[24] = String.fromCharCode (0xced6); -data[25] = String.fromCharCode (0xb1db); -data[26] = String.fromCharCode (0xd2d5); -data[27] = String.fromCharCode (0x11ae); -data[28] = String.fromCharCode (0xa490); -data[29] = String.fromCharCode (0x4aaa); -data[30] = String.fromCharCode (0x5555); -data[31] = String.fromCharCode (0x5412); -data[32] = String.fromCharCode (0x5555); -data[33] = 'U'; -data[56] = String.fromCharCode (0xd740); -data[57] = String.fromCharCode (0xfffe); -data[58] = String.fromCharCode (0x0ffb); -data[61] = String.fromCharCode (0x541c); -data[62] = String.fromCharCode (0x5555); -data[64] = String.fromCharCode (0xdffe); -data[65] = String.fromCharCode (0xffff); -data[66] = String.fromCharCode (0xffff); -data[70] = String.fromCharCode (0x5555); -data[71] = String.fromCharCode (0x5555); -data[72] = String.fromCharCode (0x0001); -data[73] = String.fromCharCode (0x5555); -data[74] = String.fromCharCode (0x5555); -data[75] = String.fromCharCode (0x5555); -data[76] = String.fromCharCode (0x088a); -data[77] = String.fromCharCode (0x5555); -data[78] = String.fromCharCode (0x4555); -data[79] = String.fromCharCode (0x0115); -data[83] = String.fromCharCode (0xfffe); -data[84] = String.fromCharCode (0xffff); -data[85] = String.fromCharCode (0x007f); -data[266] = String.fromCharCode (0xffff); -data[267] = String.fromCharCode (0xffff); -data[268] = String.fromCharCode (0x003f); -data[480] = String.fromCharCode (0x5555); -data[481] = String.fromCharCode (0x5555); -data[482] = String.fromCharCode (0x5555); -data[483] = String.fromCharCode (0x5555); -data[484] = String.fromCharCode (0x5555); -data[485] = String.fromCharCode (0x5555); -data[486] = String.fromCharCode (0x5555); -data[487] = String.fromCharCode (0x5555); -data[488] = String.fromCharCode (0x5555); -data[489] = String.fromCharCode (0x0015); -data[490] = String.fromCharCode (0x5555); -data[491] = String.fromCharCode (0x5555); -data[492] = String.fromCharCode (0x5555); -data[493] = String.fromCharCode (0x5555); -data[494] = String.fromCharCode (0x5555); -data[495] = String.fromCharCode (0x0155); -data[496] = String.fromCharCode (0xff00); -data[497] = String.fromCharCode (0x3f00); -data[498] = String.fromCharCode (0xff00); -data[499] = String.fromCharCode (0xff00); -data[500] = String.fromCharCode (0x3f00); -data[501] = String.fromCharCode (0xaa00); -data[502] = String.fromCharCode (0xff00); -data[504] = String.fromCharCode (0xff00); -data[505] = String.fromCharCode (0xff00); -data[506] = String.fromCharCode (0xff00); -data[507] = String.fromCharCode (0x5f00); -data[508] = String.fromCharCode (0x1f00); -data[509] = String.fromCharCode (0x0f00); -data[510] = String.fromCharCode (0x1f00); -data[511] = String.fromCharCode (0x1f00); -data[528] = String.fromCharCode (0x3884); -data[529] = String.fromCharCode (0x3f27); -data[530] = String.fromCharCode (0x3d50); -data[531] = String.fromCharCode (0x000b); -data[4082] = String.fromCharCode (0xfffe); -data[4083] = String.fromCharCode (0x07ff); -data[4100] = String.fromCharCode (0xfffe); -data[4101] = String.fromCharCode (0x07ff); -data[4108] = String.fromCharCode (0xffff); -data[4109] = String.fromCharCode (0x7f7f); -data[4112] = String.fromCharCode (0x5555); -data[4113] = String.fromCharCode (0x5555); -data[4114] = String.fromCharCode (0x5555); -data[4115] = String.fromCharCode (0xaa55); -data[4116] = String.fromCharCode (0x54aa); -data[4117] = String.fromCharCode (0x5555); -data[4118] = String.fromCharCode (0x5555); -data[4119] = String.fromCharCode (0x2b55); -data[4120] = String.fromCharCode (0xced6); -data[4121] = String.fromCharCode (0xb1db); -data[4122] = String.fromCharCode (0xd2d5); -data[4123] = String.fromCharCode (0x11ae); -data[4124] = String.fromCharCode (0xa490); -data[4125] = String.fromCharCode (0x4aaa); -data[4126] = String.fromCharCode (0x5555); -data[4127] = String.fromCharCode (0x5412); -data[4128] = String.fromCharCode (0x5555); -data[4129] = 'U'; -data[4152] = String.fromCharCode (0xd740); -data[4153] = String.fromCharCode (0xfffe); -data[4154] = String.fromCharCode (0x0ffb); -data[4157] = String.fromCharCode (0x541c); -data[4158] = 'U'; -}); -c$.lower_f = Clazz.defineMethod (c$, "lower_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.lower = new com.stevesoft.pat.Bits (data); -data[6] = String.fromCharCode (0xfffe); -data[7] = String.fromCharCode (0x07ff); -data[10] = String.fromCharCode (0x0400); -data[11] = String.fromCharCode (0x0420); -data[13] = String.fromCharCode (0x8000); -data[14] = String.fromCharCode (0xffff); -data[15] = String.fromCharCode (0xff7f); -data[16] = String.fromCharCode (0xaaaa); -data[17] = String.fromCharCode (0xaaaa); -data[18] = String.fromCharCode (0xaaaa); -data[19] = String.fromCharCode (0x55aa); -data[20] = String.fromCharCode (0xab55); -data[21] = String.fromCharCode (0xaaaa); -data[22] = String.fromCharCode (0xaaaa); -data[23] = String.fromCharCode (0xd4aa); -data[24] = String.fromCharCode (0x3129); -data[25] = String.fromCharCode (0x4e24); -data[26] = String.fromCharCode (0x292a); -data[27] = String.fromCharCode (0x2651); -data[28] = String.fromCharCode (0x5240); -data[29] = String.fromCharCode (0xb555); -data[30] = String.fromCharCode (0xaaaa); -data[31] = String.fromCharCode (0xa829); -data[32] = String.fromCharCode (0xaaaa); -data[33] = String.fromCharCode (0x00aa); -data[37] = String.fromCharCode (0xffff); -data[38] = String.fromCharCode (0xffff); -data[39] = String.fromCharCode (0xffff); -data[40] = String.fromCharCode (0xffff); -data[41] = String.fromCharCode (0xffff); -data[42] = String.fromCharCode (0x01ff); -data[57] = String.fromCharCode (0x0001); -data[58] = String.fromCharCode (0xf000); -data[59] = String.fromCharCode (0xffff); -data[60] = String.fromCharCode (0x7fff); -data[61] = 'c'; -data[62] = String.fromCharCode (0xaaa8); -data[63] = String.fromCharCode (0x0007); -data[67] = String.fromCharCode (0xffff); -data[68] = String.fromCharCode (0xffff); -data[69] = String.fromCharCode (0xdffe); -data[70] = String.fromCharCode (0xaaaa); -data[71] = String.fromCharCode (0xaaaa); -data[72] = String.fromCharCode (0x0002); -data[73] = String.fromCharCode (0xaaaa); -data[74] = String.fromCharCode (0xaaaa); -data[75] = String.fromCharCode (0xaaaa); -data[76] = String.fromCharCode (0x1114); -data[77] = String.fromCharCode (0xaaaa); -data[78] = String.fromCharCode (0x8aaa); -data[79] = String.fromCharCode (0x022a); -data[86] = String.fromCharCode (0xfffe); -data[87] = String.fromCharCode (0xffff); -data[88] = String.fromCharCode (0x00ff); -data[269] = String.fromCharCode (0xffff); -data[270] = String.fromCharCode (0xffff); -data[271] = String.fromCharCode (0x007f); -data[480] = String.fromCharCode (0xaaaa); -data[481] = String.fromCharCode (0xaaaa); -data[482] = String.fromCharCode (0xaaaa); -data[483] = String.fromCharCode (0xaaaa); -data[484] = String.fromCharCode (0xaaaa); -data[485] = String.fromCharCode (0xaaaa); -data[486] = String.fromCharCode (0xaaaa); -data[487] = String.fromCharCode (0xaaaa); -data[488] = String.fromCharCode (0xaaaa); -data[489] = String.fromCharCode (0x0fea); -data[490] = String.fromCharCode (0xaaaa); -data[491] = String.fromCharCode (0xaaaa); -data[492] = String.fromCharCode (0xaaaa); -data[493] = String.fromCharCode (0xaaaa); -data[494] = String.fromCharCode (0xaaaa); -data[495] = String.fromCharCode (0x02aa); -data[496] = String.fromCharCode (0x00ff); -data[497] = String.fromCharCode (0x003f); -data[498] = String.fromCharCode (0x00ff); -data[499] = String.fromCharCode (0x00ff); -data[500] = String.fromCharCode (0x003f); -data[501] = String.fromCharCode (0x00ff); -data[502] = String.fromCharCode (0x00ff); -data[503] = String.fromCharCode (0x3fff); -data[504] = String.fromCharCode (0x00ff); -data[505] = String.fromCharCode (0x00ff); -data[506] = String.fromCharCode (0x00ff); -data[507] = String.fromCharCode (0x00df); -data[508] = String.fromCharCode (0x00dc); -data[509] = String.fromCharCode (0x00cf); -data[510] = String.fromCharCode (0x00ff); -data[511] = String.fromCharCode (0x00dc); -data[519] = String.fromCharCode (0x8000); -data[528] = String.fromCharCode (0xc400); -data[529] = String.fromCharCode (0x0008); -data[530] = String.fromCharCode (0xc000); -data[531] = String.fromCharCode (0x0010); -data[4016] = String.fromCharCode (0x007f); -data[4017] = String.fromCharCode (0x00f8); -data[4084] = String.fromCharCode (0xfffe); -data[4085] = String.fromCharCode (0x07ff); -data[4102] = String.fromCharCode (0xfffe); -data[4103] = String.fromCharCode (0x07ff); -data[4106] = String.fromCharCode (0x0400); -data[4107] = String.fromCharCode (0x0420); -data[4109] = String.fromCharCode (0x8000); -data[4110] = String.fromCharCode (0xffff); -data[4111] = String.fromCharCode (0xff7f); -data[4112] = String.fromCharCode (0xaaaa); -data[4113] = String.fromCharCode (0xaaaa); -data[4114] = String.fromCharCode (0xaaaa); -data[4115] = String.fromCharCode (0x55aa); -data[4116] = String.fromCharCode (0xab55); -data[4117] = String.fromCharCode (0xaaaa); -data[4118] = String.fromCharCode (0xaaaa); -data[4119] = String.fromCharCode (0xd4aa); -data[4120] = String.fromCharCode (0x3129); -data[4121] = String.fromCharCode (0x4e24); -data[4122] = String.fromCharCode (0x292a); -data[4123] = String.fromCharCode (0x2651); -data[4124] = String.fromCharCode (0x5240); -data[4125] = String.fromCharCode (0xb555); -data[4126] = String.fromCharCode (0xaaaa); -data[4127] = String.fromCharCode (0xa829); -data[4128] = String.fromCharCode (0xaaaa); -data[4129] = String.fromCharCode (0x00aa); -data[4133] = String.fromCharCode (0xffff); -data[4134] = String.fromCharCode (0xffff); -data[4135] = String.fromCharCode (0xffff); -data[4136] = String.fromCharCode (0xffff); -data[4137] = String.fromCharCode (0xffff); -data[4138] = String.fromCharCode (0x01ff); -data[4153] = String.fromCharCode (0x0001); -data[4154] = String.fromCharCode (0xf000); -data[4155] = String.fromCharCode (0xffff); -data[4156] = String.fromCharCode (0x7fff); -data[4157] = 'c'; -data[4158] = String.fromCharCode (0x00a8); -}); -c$.title_f = Clazz.defineMethod (c$, "title_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.title = new com.stevesoft.pat.Bits (data); -data[6] = String.fromCharCode (0xfffe); -data[7] = String.fromCharCode (0x07ff); -data[10] = String.fromCharCode (0x0400); -data[11] = String.fromCharCode (0x0420); -data[13] = String.fromCharCode (0x8000); -data[14] = String.fromCharCode (0xffff); -data[15] = String.fromCharCode (0xff7f); -data[16] = String.fromCharCode (0xaaaa); -data[17] = String.fromCharCode (0xaaaa); -data[18] = String.fromCharCode (0xaaaa); -data[19] = String.fromCharCode (0x55aa); -data[20] = String.fromCharCode (0xab55); -data[21] = String.fromCharCode (0xaaaa); -data[22] = String.fromCharCode (0xaaaa); -data[23] = String.fromCharCode (0xd4aa); -data[24] = String.fromCharCode (0x3129); -data[25] = String.fromCharCode (0x4e24); -data[26] = String.fromCharCode (0x292a); -data[27] = String.fromCharCode (0x2651); -data[28] = String.fromCharCode (0x5240); -data[29] = String.fromCharCode (0xb555); -data[30] = String.fromCharCode (0xaaaa); -data[31] = String.fromCharCode (0xa829); -data[32] = String.fromCharCode (0xaaaa); -data[33] = String.fromCharCode (0x00aa); -data[37] = String.fromCharCode (0xffff); -data[38] = String.fromCharCode (0xffff); -data[39] = String.fromCharCode (0xffff); -data[40] = String.fromCharCode (0xffff); -data[41] = String.fromCharCode (0xffff); -data[42] = String.fromCharCode (0x01ff); -data[57] = String.fromCharCode (0x0001); -data[58] = String.fromCharCode (0xf000); -data[59] = String.fromCharCode (0xffff); -data[60] = String.fromCharCode (0x7fff); -data[61] = 'c'; -data[62] = String.fromCharCode (0xaaa8); -data[63] = String.fromCharCode (0x0007); -data[67] = String.fromCharCode (0xffff); -data[68] = String.fromCharCode (0xffff); -data[69] = String.fromCharCode (0xdffe); -data[70] = String.fromCharCode (0xaaaa); -data[71] = String.fromCharCode (0xaaaa); -data[72] = String.fromCharCode (0x0002); -data[73] = String.fromCharCode (0xaaaa); -data[74] = String.fromCharCode (0xaaaa); -data[75] = String.fromCharCode (0xaaaa); -data[76] = String.fromCharCode (0x1114); -data[77] = String.fromCharCode (0xaaaa); -data[78] = String.fromCharCode (0x8aaa); -data[79] = String.fromCharCode (0x022a); -data[86] = String.fromCharCode (0xfffe); -data[87] = String.fromCharCode (0xffff); -data[88] = String.fromCharCode (0x00ff); -data[269] = String.fromCharCode (0xffff); -data[270] = String.fromCharCode (0xffff); -data[271] = String.fromCharCode (0x007f); -data[480] = String.fromCharCode (0xaaaa); -data[481] = String.fromCharCode (0xaaaa); -data[482] = String.fromCharCode (0xaaaa); -data[483] = String.fromCharCode (0xaaaa); -data[484] = String.fromCharCode (0xaaaa); -data[485] = String.fromCharCode (0xaaaa); -data[486] = String.fromCharCode (0xaaaa); -data[487] = String.fromCharCode (0xaaaa); -data[488] = String.fromCharCode (0xaaaa); -data[489] = String.fromCharCode (0x0fea); -data[490] = String.fromCharCode (0xaaaa); -data[491] = String.fromCharCode (0xaaaa); -data[492] = String.fromCharCode (0xaaaa); -data[493] = String.fromCharCode (0xaaaa); -data[494] = String.fromCharCode (0xaaaa); -data[495] = String.fromCharCode (0x02aa); -data[496] = String.fromCharCode (0x00ff); -data[497] = String.fromCharCode (0x003f); -data[498] = String.fromCharCode (0x00ff); -data[499] = String.fromCharCode (0x00ff); -data[500] = String.fromCharCode (0x003f); -data[501] = String.fromCharCode (0x00ff); -data[502] = String.fromCharCode (0x00ff); -data[503] = String.fromCharCode (0x3fff); -data[504] = String.fromCharCode (0x00ff); -data[505] = String.fromCharCode (0x00ff); -data[506] = String.fromCharCode (0x00ff); -data[507] = String.fromCharCode (0x00df); -data[508] = String.fromCharCode (0x00dc); -data[509] = String.fromCharCode (0x00cf); -data[510] = String.fromCharCode (0x00ff); -data[511] = String.fromCharCode (0x00dc); -data[519] = String.fromCharCode (0x8000); -data[528] = String.fromCharCode (0xc400); -data[529] = String.fromCharCode (0x0008); -data[530] = String.fromCharCode (0xc000); -data[531] = String.fromCharCode (0x0010); -data[4016] = String.fromCharCode (0x007f); -data[4017] = String.fromCharCode (0x00f8); -data[4084] = String.fromCharCode (0xfffe); -data[4085] = String.fromCharCode (0x07ff); -data[4102] = String.fromCharCode (0xfffe); -data[4103] = String.fromCharCode (0x07ff); -data[4106] = String.fromCharCode (0x0400); -data[4107] = String.fromCharCode (0x0420); -data[4109] = String.fromCharCode (0x8000); -data[4110] = String.fromCharCode (0xffff); -data[4111] = String.fromCharCode (0xff7f); -data[4112] = String.fromCharCode (0xaaaa); -data[4113] = String.fromCharCode (0xaaaa); -data[4114] = String.fromCharCode (0xaaaa); -data[4115] = String.fromCharCode (0x55aa); -data[4116] = String.fromCharCode (0xab55); -data[4117] = String.fromCharCode (0xaaaa); -data[4118] = String.fromCharCode (0xaaaa); -data[4119] = String.fromCharCode (0xd4aa); -data[4120] = String.fromCharCode (0x3129); -data[4121] = String.fromCharCode (0x4e24); -data[4122] = String.fromCharCode (0x292a); -data[4123] = String.fromCharCode (0x2651); -data[4124] = String.fromCharCode (0x5240); -data[4125] = String.fromCharCode (0xb555); -data[4126] = String.fromCharCode (0xaaaa); -data[4127] = String.fromCharCode (0xa829); -data[4128] = String.fromCharCode (0xaaaa); -data[4129] = String.fromCharCode (0x00aa); -data[4133] = String.fromCharCode (0xffff); -data[4134] = String.fromCharCode (0xffff); -data[4135] = String.fromCharCode (0xffff); -data[4136] = String.fromCharCode (0xffff); -data[4137] = String.fromCharCode (0xffff); -data[4138] = String.fromCharCode (0x01ff); -data[4153] = String.fromCharCode (0x0001); -data[4154] = String.fromCharCode (0xf000); -data[4155] = String.fromCharCode (0xffff); -data[4156] = String.fromCharCode (0x7fff); -data[4157] = 'c'; -data[4158] = String.fromCharCode (0x00a8); -}); -c$.currency_f = Clazz.defineMethod (c$, "currency_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.currency = new com.stevesoft.pat.Bits (data); -data[2] = String.fromCharCode (0x0010); -data[10] = String.fromCharCode (0x003c); -data[159] = String.fromCharCode (0x000c); -data[227] = String.fromCharCode (0x8000); -data[522] = String.fromCharCode (0x1fff); -data[4070] = String.fromCharCode (0x0200); -data[4080] = String.fromCharCode (0x0010); -data[4094] = 'c'; -data[4098] = String.fromCharCode (0x0010); -data[4106] = String.fromCharCode (0x003c); -}); -c$.decimal_digit_f = Clazz.defineMethod (c$, "decimal_digit_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.decimal_digit = new com.stevesoft.pat.Bits (data); -data[3] = String.fromCharCode (0x03ff); -data[102] = String.fromCharCode (0x03ff); -data[111] = String.fromCharCode (0x03ff); -data[150] = String.fromCharCode (0xffc0); -data[158] = String.fromCharCode (0xffc0); -data[166] = String.fromCharCode (0xffc0); -data[174] = String.fromCharCode (0xffc0); -data[182] = String.fromCharCode (0xffc0); -data[190] = String.fromCharCode (0xff80); -data[198] = String.fromCharCode (0xffc0); -data[206] = String.fromCharCode (0xffc0); -data[214] = String.fromCharCode (0xffc0); -data[229] = String.fromCharCode (0x03ff); -data[237] = String.fromCharCode (0x03ff); -data[242] = String.fromCharCode (0x03ff); -data[4081] = String.fromCharCode (0x03ff); -data[4099] = String.fromCharCode (0x03ff); -}); -c$.math_f = Clazz.defineMethod (c$, "math_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.math = new com.stevesoft.pat.Bits (data); -data[2] = String.fromCharCode (0x0800); -data[3] = String.fromCharCode (0x7000); -data[7] = String.fromCharCode (0x5000); -data[10] = String.fromCharCode (0x1000); -data[11] = String.fromCharCode (0x0002); -data[13] = String.fromCharCode (0x0080); -data[15] = String.fromCharCode (0x0080); -data[516] = String.fromCharCode (0x0010); -data[519] = String.fromCharCode (0x1c00); -data[520] = String.fromCharCode (0x1c00); -data[537] = String.fromCharCode (0x001f); -data[541] = String.fromCharCode (0x0014); -data[544] = String.fromCharCode (0xffff); -data[545] = String.fromCharCode (0xffff); -data[546] = String.fromCharCode (0xffff); -data[547] = String.fromCharCode (0xffff); -data[548] = String.fromCharCode (0xffff); -data[549] = String.fromCharCode (0xffff); -data[550] = String.fromCharCode (0xffff); -data[551] = String.fromCharCode (0xffff); -data[552] = String.fromCharCode (0xffff); -data[553] = String.fromCharCode (0xffff); -data[554] = String.fromCharCode (0xffff); -data[555] = String.fromCharCode (0xffff); -data[556] = String.fromCharCode (0xffff); -data[557] = String.fromCharCode (0xffff); -data[558] = String.fromCharCode (0xffff); -data[559] = String.fromCharCode (0x0003); -data[560] = String.fromCharCode (0x0f00); -data[562] = String.fromCharCode (0x0003); -data[4018] = String.fromCharCode (0x0200); -data[4070] = 't'; -data[4080] = String.fromCharCode (0x0800); -data[4081] = String.fromCharCode (0x7000); -data[4085] = String.fromCharCode (0x5000); -data[4094] = String.fromCharCode (0x1f04); -data[4098] = String.fromCharCode (0x0800); -data[4099] = String.fromCharCode (0x7000); -data[4103] = String.fromCharCode (0x5000); -data[4106] = String.fromCharCode (0x1000); -data[4107] = String.fromCharCode (0x0002); -data[4109] = String.fromCharCode (0x0080); -data[4111] = String.fromCharCode (0x0080); -}); -c$.letter_f = Clazz.defineMethod (c$, "letter_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.letter = new com.stevesoft.pat.Bits (data); -data[4] = String.fromCharCode (0xfffe); -data[5] = String.fromCharCode (0x07ff); -data[6] = String.fromCharCode (0xfffe); -data[7] = String.fromCharCode (0x07ff); -data[10] = String.fromCharCode (0x0400); -data[11] = String.fromCharCode (0x0420); -data[12] = String.fromCharCode (0xffff); -data[13] = String.fromCharCode (0xff7f); -data[14] = String.fromCharCode (0xffff); -data[15] = String.fromCharCode (0xff7f); -data[16] = String.fromCharCode (0xffff); -data[17] = String.fromCharCode (0xffff); -data[18] = String.fromCharCode (0xffff); -data[19] = String.fromCharCode (0xffff); -data[20] = String.fromCharCode (0xffff); -data[21] = String.fromCharCode (0xffff); -data[22] = String.fromCharCode (0xffff); -data[23] = String.fromCharCode (0xffff); -data[24] = String.fromCharCode (0xffff); -data[25] = String.fromCharCode (0xffff); -data[26] = String.fromCharCode (0xffff); -data[27] = String.fromCharCode (0xffff); -data[28] = String.fromCharCode (0xffff); -data[29] = String.fromCharCode (0xffff); -data[30] = String.fromCharCode (0xffff); -data[31] = String.fromCharCode (0xfc3f); -data[32] = String.fromCharCode (0xffff); -data[33] = String.fromCharCode (0x00ff); -data[37] = String.fromCharCode (0xffff); -data[38] = String.fromCharCode (0xffff); -data[39] = String.fromCharCode (0xffff); -data[40] = String.fromCharCode (0xffff); -data[41] = String.fromCharCode (0xffff); -data[42] = String.fromCharCode (0x01ff); -data[43] = String.fromCharCode (0xf9ff); -data[44] = String.fromCharCode (0x0003); -data[45] = String.fromCharCode (0x0003); -data[46] = String.fromCharCode (0x001f); -data[55] = String.fromCharCode (0x0400); -data[56] = String.fromCharCode (0xd740); -data[57] = String.fromCharCode (0xffff); -data[58] = String.fromCharCode (0xfffb); -data[59] = String.fromCharCode (0xffff); -data[60] = String.fromCharCode (0x7fff); -data[61] = String.fromCharCode (0x547f); -data[62] = String.fromCharCode (0xfffd); -data[63] = String.fromCharCode (0x000f); -data[64] = String.fromCharCode (0xdffe); -data[65] = String.fromCharCode (0xffff); -data[66] = String.fromCharCode (0xffff); -data[67] = String.fromCharCode (0xffff); -data[68] = String.fromCharCode (0xffff); -data[69] = String.fromCharCode (0xdffe); -data[70] = String.fromCharCode (0xffff); -data[71] = String.fromCharCode (0xffff); -data[72] = String.fromCharCode (0x0003); -data[73] = String.fromCharCode (0xffff); -data[74] = String.fromCharCode (0xffff); -data[75] = String.fromCharCode (0xffff); -data[76] = String.fromCharCode (0x199f); -data[77] = String.fromCharCode (0xffff); -data[78] = String.fromCharCode (0xcfff); -data[79] = String.fromCharCode (0x033f); -data[83] = String.fromCharCode (0xfffe); -data[84] = String.fromCharCode (0xffff); -data[85] = String.fromCharCode (0x027f); -data[86] = String.fromCharCode (0xfffe); -data[87] = String.fromCharCode (0xffff); -data[88] = String.fromCharCode (0x00ff); -data[93] = String.fromCharCode (0xffff); -data[94] = String.fromCharCode (0x07ff); -data[95] = String.fromCharCode (0x0007); -data[98] = String.fromCharCode (0xfffe); -data[99] = String.fromCharCode (0x07ff); -data[100] = String.fromCharCode (0x07ff); -data[103] = String.fromCharCode (0xfffe); -data[104] = String.fromCharCode (0xffff); -data[105] = String.fromCharCode (0xffff); -data[106] = String.fromCharCode (0xffff); -data[107] = String.fromCharCode (0x7cff); -data[108] = String.fromCharCode (0x7fff); -data[109] = String.fromCharCode (0x002f); -data[110] = String.fromCharCode (0x0060); -data[144] = String.fromCharCode (0xffe0); -data[145] = String.fromCharCode (0xffff); -data[146] = String.fromCharCode (0xffff); -data[147] = String.fromCharCode (0x23ff); -data[149] = String.fromCharCode (0xff00); -data[150] = String.fromCharCode (0x0003); -data[152] = String.fromCharCode (0x9fe0); -data[153] = String.fromCharCode (0xfff9); -data[154] = String.fromCharCode (0xfdff); -data[155] = String.fromCharCode (0x03c5); -data[157] = String.fromCharCode (0xb000); -data[158] = String.fromCharCode (0x0003); -data[159] = String.fromCharCode (0x0003); -data[160] = String.fromCharCode (0x87e0); -data[161] = String.fromCharCode (0xfff9); -data[162] = String.fromCharCode (0xfdff); -data[163] = String.fromCharCode (0x036d); -data[165] = String.fromCharCode (0x5e00); -data[167] = String.fromCharCode (0x001c); -data[168] = String.fromCharCode (0xafe0); -data[169] = String.fromCharCode (0xfffb); -data[170] = String.fromCharCode (0xfdff); -data[171] = String.fromCharCode (0x23ed); -data[174] = String.fromCharCode (0x0001); -data[176] = String.fromCharCode (0x9fe0); -data[177] = String.fromCharCode (0xfff9); -data[178] = String.fromCharCode (0xfdff); -data[179] = String.fromCharCode (0x23cd); -data[181] = String.fromCharCode (0xb000); -data[182] = String.fromCharCode (0x0003); -data[184] = String.fromCharCode (0xc7e0); -data[185] = String.fromCharCode (0xd63d); -data[186] = String.fromCharCode (0xc718); -data[187] = String.fromCharCode (0x03bf); -data[192] = String.fromCharCode (0xdfe0); -data[193] = String.fromCharCode (0xfffd); -data[194] = String.fromCharCode (0xfdff); -data[195] = String.fromCharCode (0x03ef); -data[198] = String.fromCharCode (0x0003); -data[200] = String.fromCharCode (0xdfe0); -data[201] = String.fromCharCode (0xfffd); -data[202] = String.fromCharCode (0xfdff); -data[203] = String.fromCharCode (0x03ef); -data[205] = String.fromCharCode (0x4000); -data[206] = String.fromCharCode (0x0003); -data[208] = String.fromCharCode (0xdfe0); -data[209] = String.fromCharCode (0xfffd); -data[210] = String.fromCharCode (0xfdff); -data[211] = String.fromCharCode (0x03ff); -data[214] = String.fromCharCode (0x0003); -data[224] = String.fromCharCode (0xfffe); -data[225] = String.fromCharCode (0xffff); -data[226] = String.fromCharCode (0x7fff); -data[227] = String.fromCharCode (0x000d); -data[228] = String.fromCharCode (0x007f); -data[232] = String.fromCharCode (0x2596); -data[233] = String.fromCharCode (0xfef0); -data[234] = String.fromCharCode (0x6cae); -data[235] = String.fromCharCode (0x200d); -data[236] = String.fromCharCode (0x005f); -data[237] = String.fromCharCode (0x3000); -data[244] = String.fromCharCode (0xfeff); -data[245] = String.fromCharCode (0xffff); -data[246] = String.fromCharCode (0x03ff); -data[266] = String.fromCharCode (0xffff); -data[267] = String.fromCharCode (0xffff); -data[268] = String.fromCharCode (0x003f); -data[269] = String.fromCharCode (0xffff); -data[270] = String.fromCharCode (0xffff); -data[271] = String.fromCharCode (0x007f); -data[272] = String.fromCharCode (0xffff); -data[273] = String.fromCharCode (0xffff); -data[274] = String.fromCharCode (0xffff); -data[275] = String.fromCharCode (0xffff); -data[276] = String.fromCharCode (0xffff); -data[277] = String.fromCharCode (0x83ff); -data[278] = String.fromCharCode (0xffff); -data[279] = String.fromCharCode (0xffff); -data[280] = String.fromCharCode (0xffff); -data[281] = String.fromCharCode (0xffff); -data[282] = String.fromCharCode (0xff07); -data[283] = String.fromCharCode (0xffff); -data[284] = String.fromCharCode (0xffff); -data[285] = String.fromCharCode (0xffff); -data[286] = String.fromCharCode (0xffff); -data[287] = String.fromCharCode (0x03ff); -data[480] = String.fromCharCode (0xffff); -data[481] = String.fromCharCode (0xffff); -data[482] = String.fromCharCode (0xffff); -data[483] = String.fromCharCode (0xffff); -data[484] = String.fromCharCode (0xffff); -data[485] = String.fromCharCode (0xffff); -data[486] = String.fromCharCode (0xffff); -data[487] = String.fromCharCode (0xffff); -data[488] = String.fromCharCode (0xffff); -data[489] = String.fromCharCode (0x0fff); -data[490] = String.fromCharCode (0xffff); -data[491] = String.fromCharCode (0xffff); -data[492] = String.fromCharCode (0xffff); -data[493] = String.fromCharCode (0xffff); -data[494] = String.fromCharCode (0xffff); -data[495] = String.fromCharCode (0x03ff); -data[496] = String.fromCharCode (0xffff); -data[497] = String.fromCharCode (0x3f3f); -data[498] = String.fromCharCode (0xffff); -data[499] = String.fromCharCode (0xffff); -data[500] = String.fromCharCode (0x3f3f); -data[501] = String.fromCharCode (0xaaff); -data[502] = String.fromCharCode (0xffff); -data[503] = String.fromCharCode (0x3fff); -data[504] = String.fromCharCode (0xffff); -data[505] = String.fromCharCode (0xffff); -data[506] = String.fromCharCode (0xffff); -data[507] = String.fromCharCode (0x5fdf); -data[508] = String.fromCharCode (0x1fdc); -data[509] = String.fromCharCode (0x0fcf); -data[510] = String.fromCharCode (0x1fff); -data[511] = String.fromCharCode (0x1fdc); -data[519] = String.fromCharCode (0x8000); -data[528] = String.fromCharCode (0xfc84); -data[529] = String.fromCharCode (0x3f2f); -data[530] = String.fromCharCode (0xfd50); -data[531] = String.fromCharCode (0x01fb); -data[768] = String.fromCharCode (0x0020); -data[771] = String.fromCharCode (0x003e); -data[772] = String.fromCharCode (0xfffe); -data[773] = String.fromCharCode (0xffff); -data[774] = String.fromCharCode (0xffff); -data[775] = String.fromCharCode (0xffff); -data[776] = String.fromCharCode (0xffff); -data[777] = String.fromCharCode (0x781f); -data[778] = String.fromCharCode (0xfffe); -data[779] = String.fromCharCode (0xffff); -data[780] = String.fromCharCode (0xffff); -data[781] = String.fromCharCode (0xffff); -data[782] = String.fromCharCode (0xffff); -data[783] = String.fromCharCode (0x77ff); -data[784] = String.fromCharCode (0xffe0); -data[785] = String.fromCharCode (0xffff); -data[786] = String.fromCharCode (0x1fff); -data[787] = String.fromCharCode (0xfffe); -data[788] = String.fromCharCode (0xffff); -data[789] = String.fromCharCode (0xffff); -data[790] = String.fromCharCode (0xffff); -data[791] = String.fromCharCode (0xffff); -data[792] = String.fromCharCode (0x7fff); -data[1248] = String.fromCharCode (0xffff); -data[1249] = String.fromCharCode (0xffff); -data[1250] = String.fromCharCode (0xffff); -data[1251] = String.fromCharCode (0xffff); -data[1252] = String.fromCharCode (0xffff); -data[1253] = String.fromCharCode (0xffff); -data[1254] = String.fromCharCode (0xffff); -data[1255] = String.fromCharCode (0xffff); -data[1256] = String.fromCharCode (0xffff); -data[1257] = String.fromCharCode (0xffff); -data[1258] = String.fromCharCode (0xffff); -data[1259] = String.fromCharCode (0xffff); -data[1260] = String.fromCharCode (0xffff); -data[1261] = String.fromCharCode (0xffff); -data[1262] = String.fromCharCode (0xffff); -data[1263] = String.fromCharCode (0xffff); -data[1264] = String.fromCharCode (0xffff); -data[1265] = String.fromCharCode (0xffff); -data[1266] = String.fromCharCode (0xffff); -data[1267] = String.fromCharCode (0xffff); -data[1268] = String.fromCharCode (0xffff); -data[1269] = String.fromCharCode (0xffff); -data[1270] = String.fromCharCode (0xffff); -data[1271] = String.fromCharCode (0xffff); -data[1272] = String.fromCharCode (0xffff); -data[1273] = String.fromCharCode (0xffff); -data[1274] = String.fromCharCode (0xffff); -data[1275] = String.fromCharCode (0xffff); -data[1276] = String.fromCharCode (0xffff); -data[1277] = String.fromCharCode (0xffff); -data[1278] = String.fromCharCode (0xffff); -data[1279] = String.fromCharCode (0xffff); -data[1280] = String.fromCharCode (0xffff); -data[1281] = String.fromCharCode (0xffff); -data[1282] = String.fromCharCode (0xffff); -data[1283] = String.fromCharCode (0xffff); -data[1284] = String.fromCharCode (0xffff); -data[1285] = String.fromCharCode (0xffff); -data[1286] = String.fromCharCode (0xffff); -data[1287] = String.fromCharCode (0xffff); -data[1288] = String.fromCharCode (0xffff); -data[1289] = String.fromCharCode (0xffff); -data[1290] = String.fromCharCode (0xffff); -data[1291] = String.fromCharCode (0xffff); -data[1292] = String.fromCharCode (0xffff); -data[1293] = String.fromCharCode (0xffff); -data[1294] = String.fromCharCode (0xffff); -data[1295] = String.fromCharCode (0xffff); -data[1296] = String.fromCharCode (0xffff); -data[1297] = String.fromCharCode (0xffff); -data[1298] = String.fromCharCode (0xffff); -data[1299] = String.fromCharCode (0xffff); -data[1300] = String.fromCharCode (0xffff); -data[1301] = String.fromCharCode (0xffff); -data[1302] = String.fromCharCode (0xffff); -data[1303] = String.fromCharCode (0xffff); -data[1304] = String.fromCharCode (0xffff); -data[1305] = String.fromCharCode (0xffff); -data[1306] = String.fromCharCode (0xffff); -data[1307] = String.fromCharCode (0xffff); -data[1308] = String.fromCharCode (0xffff); -data[1309] = String.fromCharCode (0xffff); -data[1310] = String.fromCharCode (0xffff); -data[1311] = String.fromCharCode (0xffff); -data[1312] = String.fromCharCode (0xffff); -data[1313] = String.fromCharCode (0xffff); -data[1314] = String.fromCharCode (0xffff); -data[1315] = String.fromCharCode (0xffff); -data[1316] = String.fromCharCode (0xffff); -data[1317] = String.fromCharCode (0xffff); -data[1318] = String.fromCharCode (0xffff); -data[1319] = String.fromCharCode (0xffff); -data[1320] = String.fromCharCode (0xffff); -data[1321] = String.fromCharCode (0xffff); -data[1322] = String.fromCharCode (0xffff); -data[1323] = String.fromCharCode (0xffff); -data[1324] = String.fromCharCode (0xffff); -data[1325] = String.fromCharCode (0xffff); -data[1326] = String.fromCharCode (0xffff); -data[1327] = String.fromCharCode (0xffff); -data[1328] = String.fromCharCode (0xffff); -data[1329] = String.fromCharCode (0xffff); -data[1330] = String.fromCharCode (0xffff); -data[1331] = String.fromCharCode (0xffff); -data[1332] = String.fromCharCode (0xffff); -data[1333] = String.fromCharCode (0xffff); -data[1334] = String.fromCharCode (0xffff); -data[1335] = String.fromCharCode (0xffff); -data[1336] = String.fromCharCode (0xffff); -data[1337] = String.fromCharCode (0xffff); -data[1338] = String.fromCharCode (0xffff); -data[1339] = String.fromCharCode (0xffff); -data[1340] = String.fromCharCode (0xffff); -data[1341] = String.fromCharCode (0xffff); -data[1342] = String.fromCharCode (0xffff); -data[1343] = String.fromCharCode (0xffff); -data[1344] = String.fromCharCode (0xffff); -data[1345] = String.fromCharCode (0xffff); -data[1346] = String.fromCharCode (0xffff); -data[1347] = String.fromCharCode (0xffff); -data[1348] = String.fromCharCode (0xffff); -data[1349] = String.fromCharCode (0xffff); -data[1350] = String.fromCharCode (0xffff); -data[1351] = String.fromCharCode (0xffff); -data[1352] = String.fromCharCode (0xffff); -data[1353] = String.fromCharCode (0xffff); -data[1354] = String.fromCharCode (0xffff); -data[1355] = String.fromCharCode (0xffff); -data[1356] = String.fromCharCode (0xffff); -data[1357] = String.fromCharCode (0xffff); -data[1358] = String.fromCharCode (0xffff); -data[1359] = String.fromCharCode (0xffff); -data[1360] = String.fromCharCode (0xffff); -data[1361] = String.fromCharCode (0xffff); -data[1362] = String.fromCharCode (0xffff); -data[1363] = String.fromCharCode (0xffff); -data[1364] = String.fromCharCode (0xffff); -data[1365] = String.fromCharCode (0xffff); -data[1366] = String.fromCharCode (0xffff); -data[1367] = String.fromCharCode (0xffff); -data[1368] = String.fromCharCode (0xffff); -data[1369] = String.fromCharCode (0xffff); -data[1370] = String.fromCharCode (0xffff); -data[1371] = String.fromCharCode (0xffff); -data[1372] = String.fromCharCode (0xffff); -data[1373] = String.fromCharCode (0xffff); -data[1374] = String.fromCharCode (0xffff); -data[1375] = String.fromCharCode (0xffff); -data[1376] = String.fromCharCode (0xffff); -data[1377] = String.fromCharCode (0xffff); -data[1378] = String.fromCharCode (0xffff); -data[1379] = String.fromCharCode (0xffff); -data[1380] = String.fromCharCode (0xffff); -data[1381] = String.fromCharCode (0xffff); -data[1382] = String.fromCharCode (0xffff); -data[1383] = String.fromCharCode (0xffff); -data[1384] = String.fromCharCode (0xffff); -data[1385] = String.fromCharCode (0xffff); -data[1386] = String.fromCharCode (0xffff); -data[1387] = String.fromCharCode (0xffff); -data[1388] = String.fromCharCode (0xffff); -data[1389] = String.fromCharCode (0xffff); -data[1390] = String.fromCharCode (0xffff); -data[1391] = String.fromCharCode (0xffff); -data[1392] = String.fromCharCode (0xffff); -data[1393] = String.fromCharCode (0xffff); -data[1394] = String.fromCharCode (0xffff); -data[1395] = String.fromCharCode (0xffff); -data[1396] = String.fromCharCode (0xffff); -data[1397] = String.fromCharCode (0xffff); -data[1398] = String.fromCharCode (0xffff); -data[1399] = String.fromCharCode (0xffff); -data[1400] = String.fromCharCode (0xffff); -data[1401] = String.fromCharCode (0xffff); -data[1402] = String.fromCharCode (0xffff); -data[1403] = String.fromCharCode (0xffff); -data[1404] = String.fromCharCode (0xffff); -data[1405] = String.fromCharCode (0xffff); -data[1406] = String.fromCharCode (0xffff); -data[1407] = String.fromCharCode (0xffff); -data[1408] = String.fromCharCode (0xffff); -data[1409] = String.fromCharCode (0xffff); -data[1410] = String.fromCharCode (0xffff); -data[1411] = String.fromCharCode (0xffff); -data[1412] = String.fromCharCode (0xffff); -data[1413] = String.fromCharCode (0xffff); -data[1414] = String.fromCharCode (0xffff); -data[1415] = String.fromCharCode (0xffff); -data[1416] = String.fromCharCode (0xffff); -data[1417] = String.fromCharCode (0xffff); -data[1418] = String.fromCharCode (0xffff); -data[1419] = String.fromCharCode (0xffff); -data[1420] = String.fromCharCode (0xffff); -data[1421] = String.fromCharCode (0xffff); -data[1422] = String.fromCharCode (0xffff); -data[1423] = String.fromCharCode (0xffff); -data[1424] = String.fromCharCode (0xffff); -data[1425] = String.fromCharCode (0xffff); -data[1426] = String.fromCharCode (0xffff); -data[1427] = String.fromCharCode (0xffff); -data[1428] = String.fromCharCode (0xffff); -data[1429] = String.fromCharCode (0xffff); -data[1430] = String.fromCharCode (0xffff); -data[1431] = String.fromCharCode (0xffff); -data[1432] = String.fromCharCode (0xffff); -data[1433] = String.fromCharCode (0xffff); -data[1434] = String.fromCharCode (0xffff); -data[1435] = String.fromCharCode (0xffff); -data[1436] = String.fromCharCode (0xffff); -data[1437] = String.fromCharCode (0xffff); -data[1438] = String.fromCharCode (0xffff); -data[1439] = String.fromCharCode (0xffff); -data[1440] = String.fromCharCode (0xffff); -data[1441] = String.fromCharCode (0xffff); -data[1442] = String.fromCharCode (0xffff); -data[1443] = String.fromCharCode (0xffff); -data[1444] = String.fromCharCode (0xffff); -data[1445] = String.fromCharCode (0xffff); -data[1446] = String.fromCharCode (0xffff); -data[1447] = String.fromCharCode (0xffff); -data[1448] = String.fromCharCode (0xffff); -data[1449] = String.fromCharCode (0xffff); -data[1450] = String.fromCharCode (0xffff); -data[1451] = String.fromCharCode (0xffff); -data[1452] = String.fromCharCode (0xffff); -data[1453] = String.fromCharCode (0xffff); -data[1454] = String.fromCharCode (0xffff); -data[1455] = String.fromCharCode (0xffff); -data[1456] = String.fromCharCode (0xffff); -data[1457] = String.fromCharCode (0xffff); -data[1458] = String.fromCharCode (0xffff); -data[1459] = String.fromCharCode (0xffff); -data[1460] = String.fromCharCode (0xffff); -data[1461] = String.fromCharCode (0xffff); -data[1462] = String.fromCharCode (0xffff); -data[1463] = String.fromCharCode (0xffff); -data[1464] = String.fromCharCode (0xffff); -data[1465] = String.fromCharCode (0xffff); -data[1466] = String.fromCharCode (0xffff); -data[1467] = String.fromCharCode (0xffff); -data[1468] = String.fromCharCode (0xffff); -data[1469] = String.fromCharCode (0xffff); -data[1470] = String.fromCharCode (0xffff); -data[1471] = String.fromCharCode (0xffff); -data[1472] = String.fromCharCode (0xffff); -data[1473] = String.fromCharCode (0xffff); -data[1474] = String.fromCharCode (0xffff); -data[1475] = String.fromCharCode (0xffff); -data[1476] = String.fromCharCode (0xffff); -data[1477] = String.fromCharCode (0xffff); -data[1478] = String.fromCharCode (0xffff); -data[1479] = String.fromCharCode (0xffff); -data[1480] = String.fromCharCode (0xffff); -data[1481] = String.fromCharCode (0xffff); -data[1482] = String.fromCharCode (0xffff); -data[1483] = String.fromCharCode (0xffff); -data[1484] = String.fromCharCode (0xffff); -data[1485] = String.fromCharCode (0xffff); -data[1486] = String.fromCharCode (0xffff); -data[1487] = String.fromCharCode (0xffff); -data[1488] = String.fromCharCode (0xffff); -data[1489] = String.fromCharCode (0xffff); -data[1490] = String.fromCharCode (0xffff); -data[1491] = String.fromCharCode (0xffff); -data[1492] = String.fromCharCode (0xffff); -data[1493] = String.fromCharCode (0xffff); -data[1494] = String.fromCharCode (0xffff); -data[1495] = String.fromCharCode (0xffff); -data[1496] = String.fromCharCode (0xffff); -data[1497] = String.fromCharCode (0xffff); -data[1498] = String.fromCharCode (0xffff); -data[1499] = String.fromCharCode (0xffff); -data[1500] = String.fromCharCode (0xffff); -data[1501] = String.fromCharCode (0xffff); -data[1502] = String.fromCharCode (0xffff); -data[1503] = String.fromCharCode (0xffff); -data[1504] = String.fromCharCode (0xffff); -data[1505] = String.fromCharCode (0xffff); -data[1506] = String.fromCharCode (0xffff); -data[1507] = String.fromCharCode (0xffff); -data[1508] = String.fromCharCode (0xffff); -data[1509] = String.fromCharCode (0xffff); -data[1510] = String.fromCharCode (0xffff); -data[1511] = String.fromCharCode (0xffff); -data[1512] = String.fromCharCode (0xffff); -data[1513] = String.fromCharCode (0xffff); -data[1514] = String.fromCharCode (0xffff); -data[1515] = String.fromCharCode (0xffff); -data[1516] = String.fromCharCode (0xffff); -data[1517] = String.fromCharCode (0xffff); -data[1518] = String.fromCharCode (0xffff); -data[1519] = String.fromCharCode (0xffff); -data[1520] = String.fromCharCode (0xffff); -data[1521] = String.fromCharCode (0xffff); -data[1522] = String.fromCharCode (0xffff); -data[1523] = String.fromCharCode (0xffff); -data[1524] = String.fromCharCode (0xffff); -data[1525] = String.fromCharCode (0xffff); -data[1526] = String.fromCharCode (0xffff); -data[1527] = String.fromCharCode (0xffff); -data[1528] = String.fromCharCode (0xffff); -data[1529] = String.fromCharCode (0xffff); -data[1530] = String.fromCharCode (0xffff); -data[1531] = String.fromCharCode (0xffff); -data[1532] = String.fromCharCode (0xffff); -data[1533] = String.fromCharCode (0xffff); -data[1534] = String.fromCharCode (0xffff); -data[1535] = String.fromCharCode (0xffff); -data[1536] = String.fromCharCode (0xffff); -data[1537] = String.fromCharCode (0xffff); -data[1538] = String.fromCharCode (0xffff); -data[1539] = String.fromCharCode (0xffff); -data[1540] = String.fromCharCode (0xffff); -data[1541] = String.fromCharCode (0xffff); -data[1542] = String.fromCharCode (0xffff); -data[1543] = String.fromCharCode (0xffff); -data[1544] = String.fromCharCode (0xffff); -data[1545] = String.fromCharCode (0xffff); -data[1546] = String.fromCharCode (0xffff); -data[1547] = String.fromCharCode (0xffff); -data[1548] = String.fromCharCode (0xffff); -data[1549] = String.fromCharCode (0xffff); -data[1550] = String.fromCharCode (0xffff); -data[1551] = String.fromCharCode (0xffff); -data[1552] = String.fromCharCode (0xffff); -data[1553] = String.fromCharCode (0xffff); -data[1554] = String.fromCharCode (0xffff); -data[1555] = String.fromCharCode (0xffff); -data[1556] = String.fromCharCode (0xffff); -data[1557] = String.fromCharCode (0xffff); -data[1558] = String.fromCharCode (0xffff); -data[1559] = String.fromCharCode (0xffff); -data[1560] = String.fromCharCode (0xffff); -data[1561] = String.fromCharCode (0xffff); -data[1562] = String.fromCharCode (0xffff); -data[1563] = String.fromCharCode (0xffff); -data[1564] = String.fromCharCode (0xffff); -data[1565] = String.fromCharCode (0xffff); -data[1566] = String.fromCharCode (0xffff); -data[1567] = String.fromCharCode (0xffff); -data[1568] = String.fromCharCode (0xffff); -data[1569] = String.fromCharCode (0xffff); -data[1570] = String.fromCharCode (0xffff); -data[1571] = String.fromCharCode (0xffff); -data[1572] = String.fromCharCode (0xffff); -data[1573] = String.fromCharCode (0xffff); -data[1574] = String.fromCharCode (0xffff); -data[1575] = String.fromCharCode (0xffff); -data[1576] = String.fromCharCode (0xffff); -data[1577] = String.fromCharCode (0xffff); -data[1578] = String.fromCharCode (0xffff); -data[1579] = String.fromCharCode (0xffff); -data[1580] = String.fromCharCode (0xffff); -data[1581] = String.fromCharCode (0xffff); -data[1582] = String.fromCharCode (0xffff); -data[1583] = String.fromCharCode (0xffff); -data[1584] = String.fromCharCode (0xffff); -data[1585] = String.fromCharCode (0xffff); -data[1586] = String.fromCharCode (0xffff); -data[1587] = String.fromCharCode (0xffff); -data[1588] = String.fromCharCode (0xffff); -data[1589] = String.fromCharCode (0xffff); -data[1590] = String.fromCharCode (0xffff); -data[1591] = String.fromCharCode (0xffff); -data[1592] = String.fromCharCode (0xffff); -data[1593] = String.fromCharCode (0xffff); -data[1594] = String.fromCharCode (0xffff); -data[1595] = String.fromCharCode (0xffff); -data[1596] = String.fromCharCode (0xffff); -data[1597] = String.fromCharCode (0xffff); -data[1598] = String.fromCharCode (0xffff); -data[1599] = String.fromCharCode (0xffff); -data[1600] = String.fromCharCode (0xffff); -data[1601] = String.fromCharCode (0xffff); -data[1602] = String.fromCharCode (0xffff); -data[1603] = String.fromCharCode (0xffff); -data[1604] = String.fromCharCode (0xffff); -data[1605] = String.fromCharCode (0xffff); -data[1606] = String.fromCharCode (0xffff); -data[1607] = String.fromCharCode (0xffff); -data[1608] = String.fromCharCode (0xffff); -data[1609] = String.fromCharCode (0xffff); -data[1610] = String.fromCharCode (0xffff); -data[1611] = String.fromCharCode (0xffff); -data[1612] = String.fromCharCode (0xffff); -data[1613] = String.fromCharCode (0xffff); -data[1614] = String.fromCharCode (0xffff); -data[1615] = String.fromCharCode (0xffff); -data[1616] = String.fromCharCode (0xffff); -data[1617] = String.fromCharCode (0xffff); -data[1618] = String.fromCharCode (0xffff); -data[1619] = String.fromCharCode (0xffff); -data[1620] = String.fromCharCode (0xffff); -data[1621] = String.fromCharCode (0xffff); -data[1622] = String.fromCharCode (0xffff); -data[1623] = String.fromCharCode (0xffff); -data[1624] = String.fromCharCode (0xffff); -data[1625] = String.fromCharCode (0xffff); -data[1626] = String.fromCharCode (0xffff); -data[1627] = String.fromCharCode (0xffff); -data[1628] = String.fromCharCode (0xffff); -data[1629] = String.fromCharCode (0xffff); -data[1630] = String.fromCharCode (0xffff); -data[1631] = String.fromCharCode (0xffff); -data[1632] = String.fromCharCode (0xffff); -data[1633] = String.fromCharCode (0xffff); -data[1634] = String.fromCharCode (0xffff); -data[1635] = String.fromCharCode (0xffff); -data[1636] = String.fromCharCode (0xffff); -data[1637] = String.fromCharCode (0xffff); -data[1638] = String.fromCharCode (0xffff); -data[1639] = String.fromCharCode (0xffff); -data[1640] = String.fromCharCode (0xffff); -data[1641] = String.fromCharCode (0xffff); -data[1642] = String.fromCharCode (0xffff); -data[1643] = String.fromCharCode (0xffff); -data[1644] = String.fromCharCode (0xffff); -data[1645] = String.fromCharCode (0xffff); -data[1646] = String.fromCharCode (0xffff); -data[1647] = String.fromCharCode (0xffff); -data[1648] = String.fromCharCode (0xffff); -data[1649] = String.fromCharCode (0xffff); -data[1650] = String.fromCharCode (0xffff); -data[1651] = String.fromCharCode (0xffff); -data[1652] = String.fromCharCode (0xffff); -data[1653] = String.fromCharCode (0xffff); -data[1654] = String.fromCharCode (0xffff); -data[1655] = String.fromCharCode (0xffff); -data[1656] = String.fromCharCode (0xffff); -data[1657] = String.fromCharCode (0xffff); -data[1658] = String.fromCharCode (0xffff); -data[1659] = String.fromCharCode (0xffff); -data[1660] = String.fromCharCode (0xffff); -data[1661] = String.fromCharCode (0xffff); -data[1662] = String.fromCharCode (0xffff); -data[1663] = String.fromCharCode (0xffff); -data[1664] = String.fromCharCode (0xffff); -data[1665] = String.fromCharCode (0xffff); -data[1666] = String.fromCharCode (0xffff); -data[1667] = String.fromCharCode (0xffff); -data[1668] = String.fromCharCode (0xffff); -data[1669] = String.fromCharCode (0xffff); -data[1670] = String.fromCharCode (0xffff); -data[1671] = String.fromCharCode (0xffff); -data[1672] = String.fromCharCode (0xffff); -data[1673] = String.fromCharCode (0xffff); -data[1674] = String.fromCharCode (0xffff); -data[1675] = String.fromCharCode (0xffff); -data[1676] = String.fromCharCode (0xffff); -data[1677] = String.fromCharCode (0xffff); -data[1678] = String.fromCharCode (0xffff); -data[1679] = String.fromCharCode (0xffff); -data[1680] = String.fromCharCode (0xffff); -data[1681] = String.fromCharCode (0xffff); -data[1682] = String.fromCharCode (0xffff); -data[1683] = String.fromCharCode (0xffff); -data[1684] = String.fromCharCode (0xffff); -data[1685] = String.fromCharCode (0xffff); -data[1686] = String.fromCharCode (0xffff); -data[1687] = String.fromCharCode (0xffff); -data[1688] = String.fromCharCode (0xffff); -data[1689] = String.fromCharCode (0xffff); -data[1690] = String.fromCharCode (0xffff); -data[1691] = String.fromCharCode (0xffff); -data[1692] = String.fromCharCode (0xffff); -data[1693] = String.fromCharCode (0xffff); -data[1694] = String.fromCharCode (0xffff); -data[1695] = String.fromCharCode (0xffff); -data[1696] = String.fromCharCode (0xffff); -data[1697] = String.fromCharCode (0xffff); -data[1698] = String.fromCharCode (0xffff); -data[1699] = String.fromCharCode (0xffff); -data[1700] = String.fromCharCode (0xffff); -data[1701] = String.fromCharCode (0xffff); -data[1702] = String.fromCharCode (0xffff); -data[1703] = String.fromCharCode (0xffff); -data[1704] = String.fromCharCode (0xffff); -data[1705] = String.fromCharCode (0xffff); -data[1706] = String.fromCharCode (0xffff); -data[1707] = String.fromCharCode (0xffff); -data[1708] = String.fromCharCode (0xffff); -data[1709] = String.fromCharCode (0xffff); -data[1710] = String.fromCharCode (0xffff); -data[1711] = String.fromCharCode (0xffff); -data[1712] = String.fromCharCode (0xffff); -data[1713] = String.fromCharCode (0xffff); -data[1714] = String.fromCharCode (0xffff); -data[1715] = String.fromCharCode (0xffff); -data[1716] = String.fromCharCode (0xffff); -data[1717] = String.fromCharCode (0xffff); -data[1718] = String.fromCharCode (0xffff); -data[1719] = String.fromCharCode (0xffff); -data[1720] = String.fromCharCode (0xffff); -data[1721] = String.fromCharCode (0xffff); -data[1722] = String.fromCharCode (0xffff); -data[1723] = String.fromCharCode (0xffff); -data[1724] = String.fromCharCode (0xffff); -data[1725] = String.fromCharCode (0xffff); -data[1726] = String.fromCharCode (0xffff); -data[1727] = String.fromCharCode (0xffff); -data[1728] = String.fromCharCode (0xffff); -data[1729] = String.fromCharCode (0xffff); -data[1730] = String.fromCharCode (0xffff); -data[1731] = String.fromCharCode (0xffff); -data[1732] = String.fromCharCode (0xffff); -data[1733] = String.fromCharCode (0xffff); -data[1734] = String.fromCharCode (0xffff); -data[1735] = String.fromCharCode (0xffff); -data[1736] = String.fromCharCode (0xffff); -data[1737] = String.fromCharCode (0xffff); -data[1738] = String.fromCharCode (0xffff); -data[1739] = String.fromCharCode (0xffff); -data[1740] = String.fromCharCode (0xffff); -data[1741] = String.fromCharCode (0xffff); -data[1742] = String.fromCharCode (0xffff); -data[1743] = String.fromCharCode (0xffff); -data[1744] = String.fromCharCode (0xffff); -data[1745] = String.fromCharCode (0xffff); -data[1746] = String.fromCharCode (0xffff); -data[1747] = String.fromCharCode (0xffff); -data[1748] = String.fromCharCode (0xffff); -data[1749] = String.fromCharCode (0xffff); -data[1750] = String.fromCharCode (0xffff); -data[1751] = String.fromCharCode (0xffff); -data[1752] = String.fromCharCode (0xffff); -data[1753] = String.fromCharCode (0xffff); -data[1754] = String.fromCharCode (0xffff); -data[1755] = String.fromCharCode (0xffff); -data[1756] = String.fromCharCode (0xffff); -data[1757] = String.fromCharCode (0xffff); -data[1758] = String.fromCharCode (0xffff); -data[1759] = String.fromCharCode (0xffff); -data[1760] = String.fromCharCode (0xffff); -data[1761] = String.fromCharCode (0xffff); -data[1762] = String.fromCharCode (0xffff); -data[1763] = String.fromCharCode (0xffff); -data[1764] = String.fromCharCode (0xffff); -data[1765] = String.fromCharCode (0xffff); -data[1766] = String.fromCharCode (0xffff); -data[1767] = String.fromCharCode (0xffff); -data[1768] = String.fromCharCode (0xffff); -data[1769] = String.fromCharCode (0xffff); -data[1770] = String.fromCharCode (0xffff); -data[1771] = String.fromCharCode (0xffff); -data[1772] = String.fromCharCode (0xffff); -data[1773] = String.fromCharCode (0xffff); -data[1774] = String.fromCharCode (0xffff); -data[1775] = String.fromCharCode (0xffff); -data[1776] = String.fromCharCode (0xffff); -data[1777] = String.fromCharCode (0xffff); -data[1778] = String.fromCharCode (0xffff); -data[1779] = String.fromCharCode (0xffff); -data[1780] = String.fromCharCode (0xffff); -data[1781] = String.fromCharCode (0xffff); -data[1782] = String.fromCharCode (0xffff); -data[1783] = String.fromCharCode (0xffff); -data[1784] = String.fromCharCode (0xffff); -data[1785] = String.fromCharCode (0xffff); -data[1786] = String.fromCharCode (0xffff); -data[1787] = String.fromCharCode (0xffff); -data[1788] = String.fromCharCode (0xffff); -data[1789] = String.fromCharCode (0xffff); -data[1790] = String.fromCharCode (0xffff); -data[1791] = String.fromCharCode (0xffff); -data[1792] = String.fromCharCode (0xffff); -data[1793] = String.fromCharCode (0xffff); -data[1794] = String.fromCharCode (0xffff); -data[1795] = String.fromCharCode (0xffff); -data[1796] = String.fromCharCode (0xffff); -data[1797] = String.fromCharCode (0xffff); -data[1798] = String.fromCharCode (0xffff); -data[1799] = String.fromCharCode (0xffff); -data[1800] = String.fromCharCode (0xffff); -data[1801] = String.fromCharCode (0xffff); -data[1802] = String.fromCharCode (0xffff); -data[1803] = String.fromCharCode (0xffff); -data[1804] = String.fromCharCode (0xffff); -data[1805] = String.fromCharCode (0xffff); -data[1806] = String.fromCharCode (0xffff); -data[1807] = String.fromCharCode (0xffff); -data[1808] = String.fromCharCode (0xffff); -data[1809] = String.fromCharCode (0xffff); -data[1810] = String.fromCharCode (0xffff); -data[1811] = String.fromCharCode (0xffff); -data[1812] = String.fromCharCode (0xffff); -data[1813] = String.fromCharCode (0xffff); -data[1814] = String.fromCharCode (0xffff); -data[1815] = String.fromCharCode (0xffff); -data[1816] = String.fromCharCode (0xffff); -data[1817] = String.fromCharCode (0xffff); -data[1818] = String.fromCharCode (0xffff); -data[1819] = String.fromCharCode (0xffff); -data[1820] = String.fromCharCode (0xffff); -data[1821] = String.fromCharCode (0xffff); -data[1822] = String.fromCharCode (0xffff); -data[1823] = String.fromCharCode (0xffff); -data[1824] = String.fromCharCode (0xffff); -data[1825] = String.fromCharCode (0xffff); -data[1826] = String.fromCharCode (0xffff); -data[1827] = String.fromCharCode (0xffff); -data[1828] = String.fromCharCode (0xffff); -data[1829] = String.fromCharCode (0xffff); -data[1830] = String.fromCharCode (0xffff); -data[1831] = String.fromCharCode (0xffff); -data[1832] = String.fromCharCode (0xffff); -data[1833] = String.fromCharCode (0xffff); -data[1834] = String.fromCharCode (0xffff); -data[1835] = String.fromCharCode (0xffff); -data[1836] = String.fromCharCode (0xffff); -data[1837] = String.fromCharCode (0xffff); -data[1838] = String.fromCharCode (0xffff); -data[1839] = String.fromCharCode (0xffff); -data[1840] = String.fromCharCode (0xffff); -data[1841] = String.fromCharCode (0xffff); -data[1842] = String.fromCharCode (0xffff); -data[1843] = String.fromCharCode (0xffff); -data[1844] = String.fromCharCode (0xffff); -data[1845] = String.fromCharCode (0xffff); -data[1846] = String.fromCharCode (0xffff); -data[1847] = String.fromCharCode (0xffff); -data[1848] = String.fromCharCode (0xffff); -data[1849] = String.fromCharCode (0xffff); -data[1850] = String.fromCharCode (0xffff); -data[1851] = String.fromCharCode (0xffff); -data[1852] = String.fromCharCode (0xffff); -data[1853] = String.fromCharCode (0xffff); -data[1854] = String.fromCharCode (0xffff); -data[1855] = String.fromCharCode (0xffff); -data[1856] = String.fromCharCode (0xffff); -data[1857] = String.fromCharCode (0xffff); -data[1858] = String.fromCharCode (0xffff); -data[1859] = String.fromCharCode (0xffff); -data[1860] = String.fromCharCode (0xffff); -data[1861] = String.fromCharCode (0xffff); -data[1862] = String.fromCharCode (0xffff); -data[1863] = String.fromCharCode (0xffff); -data[1864] = String.fromCharCode (0xffff); -data[1865] = String.fromCharCode (0xffff); -data[1866] = String.fromCharCode (0xffff); -data[1867] = String.fromCharCode (0xffff); -data[1868] = String.fromCharCode (0xffff); -data[1869] = String.fromCharCode (0xffff); -data[1870] = String.fromCharCode (0xffff); -data[1871] = String.fromCharCode (0xffff); -data[1872] = String.fromCharCode (0xffff); -data[1873] = String.fromCharCode (0xffff); -data[1874] = String.fromCharCode (0xffff); -data[1875] = String.fromCharCode (0xffff); -data[1876] = String.fromCharCode (0xffff); -data[1877] = String.fromCharCode (0xffff); -data[1878] = String.fromCharCode (0xffff); -data[1879] = String.fromCharCode (0xffff); -data[1880] = String.fromCharCode (0xffff); -data[1881] = String.fromCharCode (0xffff); -data[1882] = String.fromCharCode (0xffff); -data[1883] = String.fromCharCode (0xffff); -data[1884] = String.fromCharCode (0xffff); -data[1885] = String.fromCharCode (0xffff); -data[1886] = String.fromCharCode (0xffff); -data[1887] = String.fromCharCode (0xffff); -data[1888] = String.fromCharCode (0xffff); -data[1889] = String.fromCharCode (0xffff); -data[1890] = String.fromCharCode (0xffff); -data[1891] = String.fromCharCode (0xffff); -data[1892] = String.fromCharCode (0xffff); -data[1893] = String.fromCharCode (0xffff); -data[1894] = String.fromCharCode (0xffff); -data[1895] = String.fromCharCode (0xffff); -data[1896] = String.fromCharCode (0xffff); -data[1897] = String.fromCharCode (0xffff); -data[1898] = String.fromCharCode (0xffff); -data[1899] = String.fromCharCode (0xffff); -data[1900] = String.fromCharCode (0xffff); -data[1901] = String.fromCharCode (0xffff); -data[1902] = String.fromCharCode (0xffff); -data[1903] = String.fromCharCode (0xffff); -data[1904] = String.fromCharCode (0xffff); -data[1905] = String.fromCharCode (0xffff); -data[1906] = String.fromCharCode (0xffff); -data[1907] = String.fromCharCode (0xffff); -data[1908] = String.fromCharCode (0xffff); -data[1909] = String.fromCharCode (0xffff); -data[1910] = String.fromCharCode (0xffff); -data[1911] = String.fromCharCode (0xffff); -data[1912] = String.fromCharCode (0xffff); -data[1913] = String.fromCharCode (0xffff); -data[1914] = String.fromCharCode (0xffff); -data[1915] = String.fromCharCode (0xffff); -data[1916] = String.fromCharCode (0xffff); -data[1917] = String.fromCharCode (0xffff); -data[1918] = String.fromCharCode (0xffff); -data[1919] = String.fromCharCode (0xffff); -data[1920] = String.fromCharCode (0xffff); -data[1921] = String.fromCharCode (0xffff); -data[1922] = String.fromCharCode (0xffff); -data[1923] = String.fromCharCode (0xffff); -data[1924] = String.fromCharCode (0xffff); -data[1925] = String.fromCharCode (0xffff); -data[1926] = String.fromCharCode (0xffff); -data[1927] = String.fromCharCode (0xffff); -data[1928] = String.fromCharCode (0xffff); -data[1929] = String.fromCharCode (0xffff); -data[1930] = String.fromCharCode (0xffff); -data[1931] = String.fromCharCode (0xffff); -data[1932] = String.fromCharCode (0xffff); -data[1933] = String.fromCharCode (0xffff); -data[1934] = String.fromCharCode (0xffff); -data[1935] = String.fromCharCode (0xffff); -data[1936] = String.fromCharCode (0xffff); -data[1937] = String.fromCharCode (0xffff); -data[1938] = String.fromCharCode (0xffff); -data[1939] = String.fromCharCode (0xffff); -data[1940] = String.fromCharCode (0xffff); -data[1941] = String.fromCharCode (0xffff); -data[1942] = String.fromCharCode (0xffff); -data[1943] = String.fromCharCode (0xffff); -data[1944] = String.fromCharCode (0xffff); -data[1945] = String.fromCharCode (0xffff); -data[1946] = String.fromCharCode (0xffff); -data[1947] = String.fromCharCode (0xffff); -data[1948] = String.fromCharCode (0xffff); -data[1949] = String.fromCharCode (0xffff); -data[1950] = String.fromCharCode (0xffff); -data[1951] = String.fromCharCode (0xffff); -data[1952] = String.fromCharCode (0xffff); -data[1953] = String.fromCharCode (0xffff); -data[1954] = String.fromCharCode (0xffff); -data[1955] = String.fromCharCode (0xffff); -data[1956] = String.fromCharCode (0xffff); -data[1957] = String.fromCharCode (0xffff); -data[1958] = String.fromCharCode (0xffff); -data[1959] = String.fromCharCode (0xffff); -data[1960] = String.fromCharCode (0xffff); -data[1961] = String.fromCharCode (0xffff); -data[1962] = String.fromCharCode (0xffff); -data[1963] = String.fromCharCode (0xffff); -data[1964] = String.fromCharCode (0xffff); -data[1965] = String.fromCharCode (0xffff); -data[1966] = String.fromCharCode (0xffff); -data[1967] = String.fromCharCode (0xffff); -data[1968] = String.fromCharCode (0xffff); -data[1969] = String.fromCharCode (0xffff); -data[1970] = String.fromCharCode (0xffff); -data[1971] = String.fromCharCode (0xffff); -data[1972] = String.fromCharCode (0xffff); -data[1973] = String.fromCharCode (0xffff); -data[1974] = String.fromCharCode (0xffff); -data[1975] = String.fromCharCode (0xffff); -data[1976] = String.fromCharCode (0xffff); -data[1977] = String.fromCharCode (0xffff); -data[1978] = String.fromCharCode (0xffff); -data[1979] = String.fromCharCode (0xffff); -data[1980] = String.fromCharCode (0xffff); -data[1981] = String.fromCharCode (0xffff); -data[1982] = String.fromCharCode (0xffff); -data[1983] = String.fromCharCode (0xffff); -data[1984] = String.fromCharCode (0xffff); -data[1985] = String.fromCharCode (0xffff); -data[1986] = String.fromCharCode (0xffff); -data[1987] = String.fromCharCode (0xffff); -data[1988] = String.fromCharCode (0xffff); -data[1989] = String.fromCharCode (0xffff); -data[1990] = String.fromCharCode (0xffff); -data[1991] = String.fromCharCode (0xffff); -data[1992] = String.fromCharCode (0xffff); -data[1993] = String.fromCharCode (0xffff); -data[1994] = String.fromCharCode (0xffff); -data[1995] = String.fromCharCode (0xffff); -data[1996] = String.fromCharCode (0xffff); -data[1997] = String.fromCharCode (0xffff); -data[1998] = String.fromCharCode (0xffff); -data[1999] = String.fromCharCode (0xffff); -data[2000] = String.fromCharCode (0xffff); -data[2001] = String.fromCharCode (0xffff); -data[2002] = String.fromCharCode (0xffff); -data[2003] = String.fromCharCode (0xffff); -data[2004] = String.fromCharCode (0xffff); -data[2005] = String.fromCharCode (0xffff); -data[2006] = String.fromCharCode (0xffff); -data[2007] = String.fromCharCode (0xffff); -data[2008] = String.fromCharCode (0xffff); -data[2009] = String.fromCharCode (0xffff); -data[2010] = String.fromCharCode (0xffff); -data[2011] = String.fromCharCode (0xffff); -data[2012] = String.fromCharCode (0xffff); -data[2013] = String.fromCharCode (0xffff); -data[2014] = String.fromCharCode (0xffff); -data[2015] = String.fromCharCode (0xffff); -data[2016] = String.fromCharCode (0xffff); -data[2017] = String.fromCharCode (0xffff); -data[2018] = String.fromCharCode (0xffff); -data[2019] = String.fromCharCode (0xffff); -data[2020] = String.fromCharCode (0xffff); -data[2021] = String.fromCharCode (0xffff); -data[2022] = String.fromCharCode (0xffff); -data[2023] = String.fromCharCode (0xffff); -data[2024] = String.fromCharCode (0xffff); -data[2025] = String.fromCharCode (0xffff); -data[2026] = String.fromCharCode (0xffff); -data[2027] = String.fromCharCode (0xffff); -data[2028] = String.fromCharCode (0xffff); -data[2029] = String.fromCharCode (0xffff); -data[2030] = String.fromCharCode (0xffff); -data[2031] = String.fromCharCode (0xffff); -data[2032] = String.fromCharCode (0xffff); -data[2033] = String.fromCharCode (0xffff); -data[2034] = String.fromCharCode (0xffff); -data[2035] = String.fromCharCode (0xffff); -data[2036] = String.fromCharCode (0xffff); -data[2037] = String.fromCharCode (0xffff); -data[2038] = String.fromCharCode (0xffff); -data[2039] = String.fromCharCode (0xffff); -data[2040] = String.fromCharCode (0xffff); -data[2041] = String.fromCharCode (0xffff); -data[2042] = String.fromCharCode (0xffff); -data[2043] = String.fromCharCode (0xffff); -data[2044] = String.fromCharCode (0xffff); -data[2045] = String.fromCharCode (0xffff); -data[2046] = String.fromCharCode (0xffff); -data[2047] = String.fromCharCode (0xffff); -data[2048] = String.fromCharCode (0xffff); -data[2049] = String.fromCharCode (0xffff); -data[2050] = String.fromCharCode (0xffff); -data[2051] = String.fromCharCode (0xffff); -data[2052] = String.fromCharCode (0xffff); -data[2053] = String.fromCharCode (0xffff); -data[2054] = String.fromCharCode (0xffff); -data[2055] = String.fromCharCode (0xffff); -data[2056] = String.fromCharCode (0xffff); -data[2057] = String.fromCharCode (0xffff); -data[2058] = String.fromCharCode (0xffff); -data[2059] = String.fromCharCode (0xffff); -data[2060] = String.fromCharCode (0xffff); -data[2061] = String.fromCharCode (0xffff); -data[2062] = String.fromCharCode (0xffff); -data[2063] = String.fromCharCode (0xffff); -data[2064] = String.fromCharCode (0xffff); -data[2065] = String.fromCharCode (0xffff); -data[2066] = String.fromCharCode (0xffff); -data[2067] = String.fromCharCode (0xffff); -data[2068] = String.fromCharCode (0xffff); -data[2069] = String.fromCharCode (0xffff); -data[2070] = String.fromCharCode (0xffff); -data[2071] = String.fromCharCode (0xffff); -data[2072] = String.fromCharCode (0xffff); -data[2073] = String.fromCharCode (0xffff); -data[2074] = String.fromCharCode (0xffff); -data[2075] = String.fromCharCode (0xffff); -data[2076] = String.fromCharCode (0xffff); -data[2077] = String.fromCharCode (0xffff); -data[2078] = String.fromCharCode (0xffff); -data[2079] = String.fromCharCode (0xffff); -data[2080] = String.fromCharCode (0xffff); -data[2081] = String.fromCharCode (0xffff); -data[2082] = String.fromCharCode (0xffff); -data[2083] = String.fromCharCode (0xffff); -data[2084] = String.fromCharCode (0xffff); -data[2085] = String.fromCharCode (0xffff); -data[2086] = String.fromCharCode (0xffff); -data[2087] = String.fromCharCode (0xffff); -data[2088] = String.fromCharCode (0xffff); -data[2089] = String.fromCharCode (0xffff); -data[2090] = String.fromCharCode (0xffff); -data[2091] = String.fromCharCode (0xffff); -data[2092] = String.fromCharCode (0xffff); -data[2093] = String.fromCharCode (0xffff); -data[2094] = String.fromCharCode (0xffff); -data[2095] = String.fromCharCode (0xffff); -data[2096] = String.fromCharCode (0xffff); -data[2097] = String.fromCharCode (0xffff); -data[2098] = String.fromCharCode (0xffff); -data[2099] = String.fromCharCode (0xffff); -data[2100] = String.fromCharCode (0xffff); -data[2101] = String.fromCharCode (0xffff); -data[2102] = String.fromCharCode (0xffff); -data[2103] = String.fromCharCode (0xffff); -data[2104] = String.fromCharCode (0xffff); -data[2105] = String.fromCharCode (0xffff); -data[2106] = String.fromCharCode (0xffff); -data[2107] = String.fromCharCode (0xffff); -data[2108] = String.fromCharCode (0xffff); -data[2109] = String.fromCharCode (0xffff); -data[2110] = String.fromCharCode (0xffff); -data[2111] = String.fromCharCode (0xffff); -data[2112] = String.fromCharCode (0xffff); -data[2113] = String.fromCharCode (0xffff); -data[2114] = String.fromCharCode (0xffff); -data[2115] = String.fromCharCode (0xffff); -data[2116] = String.fromCharCode (0xffff); -data[2117] = String.fromCharCode (0xffff); -data[2118] = String.fromCharCode (0xffff); -data[2119] = String.fromCharCode (0xffff); -data[2120] = String.fromCharCode (0xffff); -data[2121] = String.fromCharCode (0xffff); -data[2122] = String.fromCharCode (0xffff); -data[2123] = String.fromCharCode (0xffff); -data[2124] = String.fromCharCode (0xffff); -data[2125] = String.fromCharCode (0xffff); -data[2126] = String.fromCharCode (0xffff); -data[2127] = String.fromCharCode (0xffff); -data[2128] = String.fromCharCode (0xffff); -data[2129] = String.fromCharCode (0xffff); -data[2130] = String.fromCharCode (0xffff); -data[2131] = String.fromCharCode (0xffff); -data[2132] = String.fromCharCode (0xffff); -data[2133] = String.fromCharCode (0xffff); -data[2134] = String.fromCharCode (0xffff); -data[2135] = String.fromCharCode (0xffff); -data[2136] = String.fromCharCode (0xffff); -data[2137] = String.fromCharCode (0xffff); -data[2138] = String.fromCharCode (0xffff); -data[2139] = String.fromCharCode (0xffff); -data[2140] = String.fromCharCode (0xffff); -data[2141] = String.fromCharCode (0xffff); -data[2142] = String.fromCharCode (0xffff); -data[2143] = String.fromCharCode (0xffff); -data[2144] = String.fromCharCode (0xffff); -data[2145] = String.fromCharCode (0xffff); -data[2146] = String.fromCharCode (0xffff); -data[2147] = String.fromCharCode (0xffff); -data[2148] = String.fromCharCode (0xffff); -data[2149] = String.fromCharCode (0xffff); -data[2150] = String.fromCharCode (0xffff); -data[2151] = String.fromCharCode (0xffff); -data[2152] = String.fromCharCode (0xffff); -data[2153] = String.fromCharCode (0xffff); -data[2154] = String.fromCharCode (0xffff); -data[2155] = String.fromCharCode (0xffff); -data[2156] = String.fromCharCode (0xffff); -data[2157] = String.fromCharCode (0xffff); -data[2158] = String.fromCharCode (0xffff); -data[2159] = String.fromCharCode (0xffff); -data[2160] = String.fromCharCode (0xffff); -data[2161] = String.fromCharCode (0xffff); -data[2162] = String.fromCharCode (0xffff); -data[2163] = String.fromCharCode (0xffff); -data[2164] = String.fromCharCode (0xffff); -data[2165] = String.fromCharCode (0xffff); -data[2166] = String.fromCharCode (0xffff); -data[2167] = String.fromCharCode (0xffff); -data[2168] = String.fromCharCode (0xffff); -data[2169] = String.fromCharCode (0xffff); -data[2170] = String.fromCharCode (0xffff); -data[2171] = String.fromCharCode (0xffff); -data[2172] = String.fromCharCode (0xffff); -data[2173] = String.fromCharCode (0xffff); -data[2174] = String.fromCharCode (0xffff); -data[2175] = String.fromCharCode (0xffff); -data[2176] = String.fromCharCode (0xffff); -data[2177] = String.fromCharCode (0xffff); -data[2178] = String.fromCharCode (0xffff); -data[2179] = String.fromCharCode (0xffff); -data[2180] = String.fromCharCode (0xffff); -data[2181] = String.fromCharCode (0xffff); -data[2182] = String.fromCharCode (0xffff); -data[2183] = String.fromCharCode (0xffff); -data[2184] = String.fromCharCode (0xffff); -data[2185] = String.fromCharCode (0xffff); -data[2186] = String.fromCharCode (0xffff); -data[2187] = String.fromCharCode (0xffff); -data[2188] = String.fromCharCode (0xffff); -data[2189] = String.fromCharCode (0xffff); -data[2190] = String.fromCharCode (0xffff); -data[2191] = String.fromCharCode (0xffff); -data[2192] = String.fromCharCode (0xffff); -data[2193] = String.fromCharCode (0xffff); -data[2194] = String.fromCharCode (0xffff); -data[2195] = String.fromCharCode (0xffff); -data[2196] = String.fromCharCode (0xffff); -data[2197] = String.fromCharCode (0xffff); -data[2198] = String.fromCharCode (0xffff); -data[2199] = String.fromCharCode (0xffff); -data[2200] = String.fromCharCode (0xffff); -data[2201] = String.fromCharCode (0xffff); -data[2202] = String.fromCharCode (0xffff); -data[2203] = String.fromCharCode (0xffff); -data[2204] = String.fromCharCode (0xffff); -data[2205] = String.fromCharCode (0xffff); -data[2206] = String.fromCharCode (0xffff); -data[2207] = String.fromCharCode (0xffff); -data[2208] = String.fromCharCode (0xffff); -data[2209] = String.fromCharCode (0xffff); -data[2210] = String.fromCharCode (0xffff); -data[2211] = String.fromCharCode (0xffff); -data[2212] = String.fromCharCode (0xffff); -data[2213] = String.fromCharCode (0xffff); -data[2214] = String.fromCharCode (0xffff); -data[2215] = String.fromCharCode (0xffff); -data[2216] = String.fromCharCode (0xffff); -data[2217] = String.fromCharCode (0xffff); -data[2218] = String.fromCharCode (0xffff); -data[2219] = String.fromCharCode (0xffff); -data[2220] = String.fromCharCode (0xffff); -data[2221] = String.fromCharCode (0xffff); -data[2222] = String.fromCharCode (0xffff); -data[2223] = String.fromCharCode (0xffff); -data[2224] = String.fromCharCode (0xffff); -data[2225] = String.fromCharCode (0xffff); -data[2226] = String.fromCharCode (0xffff); -data[2227] = String.fromCharCode (0xffff); -data[2228] = String.fromCharCode (0xffff); -data[2229] = String.fromCharCode (0xffff); -data[2230] = String.fromCharCode (0xffff); -data[2231] = String.fromCharCode (0xffff); -data[2232] = String.fromCharCode (0xffff); -data[2233] = String.fromCharCode (0xffff); -data[2234] = String.fromCharCode (0xffff); -data[2235] = String.fromCharCode (0xffff); -data[2236] = String.fromCharCode (0xffff); -data[2237] = String.fromCharCode (0xffff); -data[2238] = String.fromCharCode (0xffff); -data[2239] = String.fromCharCode (0xffff); -data[2240] = String.fromCharCode (0xffff); -data[2241] = String.fromCharCode (0xffff); -data[2242] = String.fromCharCode (0xffff); -data[2243] = String.fromCharCode (0xffff); -data[2244] = String.fromCharCode (0xffff); -data[2245] = String.fromCharCode (0xffff); -data[2246] = String.fromCharCode (0xffff); -data[2247] = String.fromCharCode (0xffff); -data[2248] = String.fromCharCode (0xffff); -data[2249] = String.fromCharCode (0xffff); -data[2250] = String.fromCharCode (0xffff); -data[2251] = String.fromCharCode (0xffff); -data[2252] = String.fromCharCode (0xffff); -data[2253] = String.fromCharCode (0xffff); -data[2254] = String.fromCharCode (0xffff); -data[2255] = String.fromCharCode (0xffff); -data[2256] = String.fromCharCode (0xffff); -data[2257] = String.fromCharCode (0xffff); -data[2258] = String.fromCharCode (0xffff); -data[2259] = String.fromCharCode (0xffff); -data[2260] = String.fromCharCode (0xffff); -data[2261] = String.fromCharCode (0xffff); -data[2262] = String.fromCharCode (0xffff); -data[2263] = String.fromCharCode (0xffff); -data[2264] = String.fromCharCode (0xffff); -data[2265] = String.fromCharCode (0xffff); -data[2266] = String.fromCharCode (0xffff); -data[2267] = String.fromCharCode (0xffff); -data[2268] = String.fromCharCode (0xffff); -data[2269] = String.fromCharCode (0xffff); -data[2270] = String.fromCharCode (0xffff); -data[2271] = String.fromCharCode (0xffff); -data[2272] = String.fromCharCode (0xffff); -data[2273] = String.fromCharCode (0xffff); -data[2274] = String.fromCharCode (0xffff); -data[2275] = String.fromCharCode (0xffff); -data[2276] = String.fromCharCode (0xffff); -data[2277] = String.fromCharCode (0xffff); -data[2278] = String.fromCharCode (0xffff); -data[2279] = String.fromCharCode (0xffff); -data[2280] = String.fromCharCode (0xffff); -data[2281] = String.fromCharCode (0xffff); -data[2282] = String.fromCharCode (0xffff); -data[2283] = String.fromCharCode (0xffff); -data[2284] = String.fromCharCode (0xffff); -data[2285] = String.fromCharCode (0xffff); -data[2286] = String.fromCharCode (0xffff); -data[2287] = String.fromCharCode (0xffff); -data[2288] = String.fromCharCode (0xffff); -data[2289] = String.fromCharCode (0xffff); -data[2290] = String.fromCharCode (0xffff); -data[2291] = String.fromCharCode (0xffff); -data[2292] = String.fromCharCode (0xffff); -data[2293] = String.fromCharCode (0xffff); -data[2294] = String.fromCharCode (0xffff); -data[2295] = String.fromCharCode (0xffff); -data[2296] = String.fromCharCode (0xffff); -data[2297] = String.fromCharCode (0xffff); -data[2298] = String.fromCharCode (0xffff); -data[2299] = String.fromCharCode (0xffff); -data[2300] = String.fromCharCode (0xffff); -data[2301] = String.fromCharCode (0xffff); -data[2302] = String.fromCharCode (0xffff); -data[2303] = String.fromCharCode (0xffff); -data[2304] = String.fromCharCode (0xffff); -data[2305] = String.fromCharCode (0xffff); -data[2306] = String.fromCharCode (0xffff); -data[2307] = String.fromCharCode (0xffff); -data[2308] = String.fromCharCode (0xffff); -data[2309] = String.fromCharCode (0xffff); -data[2310] = String.fromCharCode (0xffff); -data[2311] = String.fromCharCode (0xffff); -data[2312] = String.fromCharCode (0xffff); -data[2313] = String.fromCharCode (0xffff); -data[2314] = String.fromCharCode (0xffff); -data[2315] = String.fromCharCode (0xffff); -data[2316] = String.fromCharCode (0xffff); -data[2317] = String.fromCharCode (0xffff); -data[2318] = String.fromCharCode (0xffff); -data[2319] = String.fromCharCode (0xffff); -data[2320] = String.fromCharCode (0xffff); -data[2321] = String.fromCharCode (0xffff); -data[2322] = String.fromCharCode (0xffff); -data[2323] = String.fromCharCode (0xffff); -data[2324] = String.fromCharCode (0xffff); -data[2325] = String.fromCharCode (0xffff); -data[2326] = String.fromCharCode (0xffff); -data[2327] = String.fromCharCode (0xffff); -data[2328] = String.fromCharCode (0xffff); -data[2329] = String.fromCharCode (0xffff); -data[2330] = String.fromCharCode (0xffff); -data[2331] = String.fromCharCode (0xffff); -data[2332] = String.fromCharCode (0xffff); -data[2333] = String.fromCharCode (0xffff); -data[2334] = String.fromCharCode (0xffff); -data[2335] = String.fromCharCode (0xffff); -data[2336] = String.fromCharCode (0xffff); -data[2337] = String.fromCharCode (0xffff); -data[2338] = String.fromCharCode (0xffff); -data[2339] = String.fromCharCode (0xffff); -data[2340] = String.fromCharCode (0xffff); -data[2341] = String.fromCharCode (0xffff); -data[2342] = String.fromCharCode (0xffff); -data[2343] = String.fromCharCode (0xffff); -data[2344] = String.fromCharCode (0xffff); -data[2345] = String.fromCharCode (0xffff); -data[2346] = String.fromCharCode (0xffff); -data[2347] = String.fromCharCode (0xffff); -data[2348] = String.fromCharCode (0xffff); -data[2349] = String.fromCharCode (0xffff); -data[2350] = String.fromCharCode (0xffff); -data[2351] = String.fromCharCode (0xffff); -data[2352] = String.fromCharCode (0xffff); -data[2353] = String.fromCharCode (0xffff); -data[2354] = String.fromCharCode (0xffff); -data[2355] = String.fromCharCode (0xffff); -data[2356] = String.fromCharCode (0xffff); -data[2357] = String.fromCharCode (0xffff); -data[2358] = String.fromCharCode (0xffff); -data[2359] = String.fromCharCode (0xffff); -data[2360] = String.fromCharCode (0xffff); -data[2361] = String.fromCharCode (0xffff); -data[2362] = String.fromCharCode (0xffff); -data[2363] = String.fromCharCode (0xffff); -data[2364] = String.fromCharCode (0xffff); -data[2365] = String.fromCharCode (0xffff); -data[2366] = String.fromCharCode (0xffff); -data[2367] = String.fromCharCode (0xffff); -data[2368] = String.fromCharCode (0xffff); -data[2369] = String.fromCharCode (0xffff); -data[2370] = String.fromCharCode (0xffff); -data[2371] = String.fromCharCode (0xffff); -data[2372] = String.fromCharCode (0xffff); -data[2373] = String.fromCharCode (0xffff); -data[2374] = String.fromCharCode (0xffff); -data[2375] = String.fromCharCode (0xffff); -data[2376] = String.fromCharCode (0xffff); -data[2377] = String.fromCharCode (0xffff); -data[2378] = String.fromCharCode (0xffff); -data[2379] = String.fromCharCode (0xffff); -data[2380] = String.fromCharCode (0xffff); -data[2381] = String.fromCharCode (0xffff); -data[2382] = String.fromCharCode (0xffff); -data[2383] = String.fromCharCode (0xffff); -data[2384] = String.fromCharCode (0xffff); -data[2385] = String.fromCharCode (0xffff); -data[2386] = String.fromCharCode (0xffff); -data[2387] = String.fromCharCode (0xffff); -data[2388] = String.fromCharCode (0xffff); -data[2389] = String.fromCharCode (0xffff); -data[2390] = String.fromCharCode (0xffff); -data[2391] = String.fromCharCode (0xffff); -data[2392] = String.fromCharCode (0xffff); -data[2393] = String.fromCharCode (0xffff); -data[2394] = String.fromCharCode (0xffff); -data[2395] = String.fromCharCode (0xffff); -data[2396] = String.fromCharCode (0xffff); -data[2397] = String.fromCharCode (0xffff); -data[2398] = String.fromCharCode (0xffff); -data[2399] = String.fromCharCode (0xffff); -data[2400] = String.fromCharCode (0xffff); -data[2401] = String.fromCharCode (0xffff); -data[2402] = String.fromCharCode (0xffff); -data[2403] = String.fromCharCode (0xffff); -data[2404] = String.fromCharCode (0xffff); -data[2405] = String.fromCharCode (0xffff); -data[2406] = String.fromCharCode (0xffff); -data[2407] = String.fromCharCode (0xffff); -data[2408] = String.fromCharCode (0xffff); -data[2409] = String.fromCharCode (0xffff); -data[2410] = String.fromCharCode (0xffff); -data[2411] = String.fromCharCode (0xffff); -data[2412] = String.fromCharCode (0xffff); -data[2413] = String.fromCharCode (0xffff); -data[2414] = String.fromCharCode (0xffff); -data[2415] = String.fromCharCode (0xffff); -data[2416] = String.fromCharCode (0xffff); -data[2417] = String.fromCharCode (0xffff); -data[2418] = String.fromCharCode (0xffff); -data[2419] = String.fromCharCode (0xffff); -data[2420] = String.fromCharCode (0xffff); -data[2421] = String.fromCharCode (0xffff); -data[2422] = String.fromCharCode (0xffff); -data[2423] = String.fromCharCode (0xffff); -data[2424] = String.fromCharCode (0xffff); -data[2425] = String.fromCharCode (0xffff); -data[2426] = String.fromCharCode (0xffff); -data[2427] = String.fromCharCode (0xffff); -data[2428] = String.fromCharCode (0xffff); -data[2429] = String.fromCharCode (0xffff); -data[2430] = String.fromCharCode (0xffff); -data[2431] = String.fromCharCode (0xffff); -data[2432] = String.fromCharCode (0xffff); -data[2433] = String.fromCharCode (0xffff); -data[2434] = String.fromCharCode (0xffff); -data[2435] = String.fromCharCode (0xffff); -data[2436] = String.fromCharCode (0xffff); -data[2437] = String.fromCharCode (0xffff); -data[2438] = String.fromCharCode (0xffff); -data[2439] = String.fromCharCode (0xffff); -data[2440] = String.fromCharCode (0xffff); -data[2441] = String.fromCharCode (0xffff); -data[2442] = String.fromCharCode (0xffff); -data[2443] = String.fromCharCode (0xffff); -data[2444] = String.fromCharCode (0xffff); -data[2445] = String.fromCharCode (0xffff); -data[2446] = String.fromCharCode (0xffff); -data[2447] = String.fromCharCode (0xffff); -data[2448] = String.fromCharCode (0xffff); -data[2449] = String.fromCharCode (0xffff); -data[2450] = String.fromCharCode (0xffff); -data[2451] = String.fromCharCode (0xffff); -data[2452] = String.fromCharCode (0xffff); -data[2453] = String.fromCharCode (0xffff); -data[2454] = String.fromCharCode (0xffff); -data[2455] = String.fromCharCode (0xffff); -data[2456] = String.fromCharCode (0xffff); -data[2457] = String.fromCharCode (0xffff); -data[2458] = String.fromCharCode (0xffff); -data[2459] = String.fromCharCode (0xffff); -data[2460] = String.fromCharCode (0xffff); -data[2461] = String.fromCharCode (0xffff); -data[2462] = String.fromCharCode (0xffff); -data[2463] = String.fromCharCode (0xffff); -data[2464] = String.fromCharCode (0xffff); -data[2465] = String.fromCharCode (0xffff); -data[2466] = String.fromCharCode (0xffff); -data[2467] = String.fromCharCode (0xffff); -data[2468] = String.fromCharCode (0xffff); -data[2469] = String.fromCharCode (0xffff); -data[2470] = String.fromCharCode (0xffff); -data[2471] = String.fromCharCode (0xffff); -data[2472] = String.fromCharCode (0xffff); -data[2473] = String.fromCharCode (0xffff); -data[2474] = String.fromCharCode (0xffff); -data[2475] = String.fromCharCode (0xffff); -data[2476] = String.fromCharCode (0xffff); -data[2477] = String.fromCharCode (0xffff); -data[2478] = String.fromCharCode (0xffff); -data[2479] = String.fromCharCode (0xffff); -data[2480] = String.fromCharCode (0xffff); -data[2481] = String.fromCharCode (0xffff); -data[2482] = String.fromCharCode (0xffff); -data[2483] = String.fromCharCode (0xffff); -data[2484] = String.fromCharCode (0xffff); -data[2485] = String.fromCharCode (0xffff); -data[2486] = String.fromCharCode (0xffff); -data[2487] = String.fromCharCode (0xffff); -data[2488] = String.fromCharCode (0xffff); -data[2489] = String.fromCharCode (0xffff); -data[2490] = String.fromCharCode (0xffff); -data[2491] = String.fromCharCode (0xffff); -data[2492] = String.fromCharCode (0xffff); -data[2493] = String.fromCharCode (0xffff); -data[2494] = String.fromCharCode (0xffff); -data[2495] = String.fromCharCode (0xffff); -data[2496] = String.fromCharCode (0xffff); -data[2497] = String.fromCharCode (0xffff); -data[2498] = String.fromCharCode (0xffff); -data[2499] = String.fromCharCode (0xffff); -data[2500] = String.fromCharCode (0xffff); -data[2501] = String.fromCharCode (0xffff); -data[2502] = String.fromCharCode (0xffff); -data[2503] = String.fromCharCode (0xffff); -data[2504] = String.fromCharCode (0xffff); -data[2505] = String.fromCharCode (0xffff); -data[2506] = String.fromCharCode (0xffff); -data[2507] = String.fromCharCode (0xffff); -data[2508] = String.fromCharCode (0xffff); -data[2509] = String.fromCharCode (0xffff); -data[2510] = String.fromCharCode (0xffff); -data[2511] = String.fromCharCode (0xffff); -data[2512] = String.fromCharCode (0xffff); -data[2513] = String.fromCharCode (0xffff); -data[2514] = String.fromCharCode (0xffff); -data[2515] = String.fromCharCode (0xffff); -data[2516] = String.fromCharCode (0xffff); -data[2517] = String.fromCharCode (0xffff); -data[2518] = String.fromCharCode (0xffff); -data[2519] = String.fromCharCode (0xffff); -data[2520] = String.fromCharCode (0xffff); -data[2521] = String.fromCharCode (0xffff); -data[2522] = String.fromCharCode (0xffff); -data[2523] = String.fromCharCode (0xffff); -data[2524] = String.fromCharCode (0xffff); -data[2525] = String.fromCharCode (0xffff); -data[2526] = String.fromCharCode (0xffff); -data[2527] = String.fromCharCode (0xffff); -data[2528] = String.fromCharCode (0xffff); -data[2529] = String.fromCharCode (0xffff); -data[2530] = String.fromCharCode (0xffff); -data[2531] = String.fromCharCode (0xffff); -data[2532] = String.fromCharCode (0xffff); -data[2533] = String.fromCharCode (0xffff); -data[2534] = String.fromCharCode (0xffff); -data[2535] = String.fromCharCode (0xffff); -data[2536] = String.fromCharCode (0xffff); -data[2537] = String.fromCharCode (0xffff); -data[2538] = String.fromCharCode (0xffff); -data[2539] = String.fromCharCode (0xffff); -data[2540] = String.fromCharCode (0xffff); -data[2541] = String.fromCharCode (0xffff); -data[2542] = String.fromCharCode (0xffff); -data[2543] = String.fromCharCode (0xffff); -data[2544] = String.fromCharCode (0xffff); -data[2545] = String.fromCharCode (0xffff); -data[2546] = String.fromCharCode (0xffff); -data[2547] = String.fromCharCode (0xffff); -data[2548] = String.fromCharCode (0xffff); -data[2549] = String.fromCharCode (0xffff); -data[2550] = String.fromCharCode (0xffff); -data[2551] = String.fromCharCode (0xffff); -data[2552] = String.fromCharCode (0xffff); -data[2553] = String.fromCharCode (0xffff); -data[2554] = String.fromCharCode (0x003f); -data[2752] = String.fromCharCode (0xffff); -data[2753] = String.fromCharCode (0xffff); -data[2754] = String.fromCharCode (0xffff); -data[2755] = String.fromCharCode (0xffff); -data[2756] = String.fromCharCode (0xffff); -data[2757] = String.fromCharCode (0xffff); -data[2758] = String.fromCharCode (0xffff); -data[2759] = String.fromCharCode (0xffff); -data[2760] = String.fromCharCode (0xffff); -data[2761] = String.fromCharCode (0xffff); -data[2762] = String.fromCharCode (0xffff); -data[2763] = String.fromCharCode (0xffff); -data[2764] = String.fromCharCode (0xffff); -data[2765] = String.fromCharCode (0xffff); -data[2766] = String.fromCharCode (0xffff); -data[2767] = String.fromCharCode (0xffff); -data[2768] = String.fromCharCode (0xffff); -data[2769] = String.fromCharCode (0xffff); -data[2770] = String.fromCharCode (0xffff); -data[2771] = String.fromCharCode (0xffff); -data[2772] = String.fromCharCode (0xffff); -data[2773] = String.fromCharCode (0xffff); -data[2774] = String.fromCharCode (0xffff); -data[2775] = String.fromCharCode (0xffff); -data[2776] = String.fromCharCode (0xffff); -data[2777] = String.fromCharCode (0xffff); -data[2778] = String.fromCharCode (0xffff); -data[2779] = String.fromCharCode (0xffff); -data[2780] = String.fromCharCode (0xffff); -data[2781] = String.fromCharCode (0xffff); -data[2782] = String.fromCharCode (0xffff); -data[2783] = String.fromCharCode (0xffff); -data[2784] = String.fromCharCode (0xffff); -data[2785] = String.fromCharCode (0xffff); -data[2786] = String.fromCharCode (0xffff); -data[2787] = String.fromCharCode (0xffff); -data[2788] = String.fromCharCode (0xffff); -data[2789] = String.fromCharCode (0xffff); -data[2790] = String.fromCharCode (0xffff); -data[2791] = String.fromCharCode (0xffff); -data[2792] = String.fromCharCode (0xffff); -data[2793] = String.fromCharCode (0xffff); -data[2794] = String.fromCharCode (0xffff); -data[2795] = String.fromCharCode (0xffff); -data[2796] = String.fromCharCode (0xffff); -data[2797] = String.fromCharCode (0xffff); -data[2798] = String.fromCharCode (0xffff); -data[2799] = String.fromCharCode (0xffff); -data[2800] = String.fromCharCode (0xffff); -data[2801] = String.fromCharCode (0xffff); -data[2802] = String.fromCharCode (0xffff); -data[2803] = String.fromCharCode (0xffff); -data[2804] = String.fromCharCode (0xffff); -data[2805] = String.fromCharCode (0xffff); -data[2806] = String.fromCharCode (0xffff); -data[2807] = String.fromCharCode (0xffff); -data[2808] = String.fromCharCode (0xffff); -data[2809] = String.fromCharCode (0xffff); -data[2810] = String.fromCharCode (0xffff); -data[2811] = String.fromCharCode (0xffff); -data[2812] = String.fromCharCode (0xffff); -data[2813] = String.fromCharCode (0xffff); -data[2814] = String.fromCharCode (0xffff); -data[2815] = String.fromCharCode (0xffff); -data[2816] = String.fromCharCode (0xffff); -data[2817] = String.fromCharCode (0xffff); -data[2818] = String.fromCharCode (0xffff); -data[2819] = String.fromCharCode (0xffff); -data[2820] = String.fromCharCode (0xffff); -data[2821] = String.fromCharCode (0xffff); -data[2822] = String.fromCharCode (0xffff); -data[2823] = String.fromCharCode (0xffff); -data[2824] = String.fromCharCode (0xffff); -data[2825] = String.fromCharCode (0xffff); -data[2826] = String.fromCharCode (0xffff); -data[2827] = String.fromCharCode (0xffff); -data[2828] = String.fromCharCode (0xffff); -data[2829] = String.fromCharCode (0xffff); -data[2830] = String.fromCharCode (0xffff); -data[2831] = String.fromCharCode (0xffff); -data[2832] = String.fromCharCode (0xffff); -data[2833] = String.fromCharCode (0xffff); -data[2834] = String.fromCharCode (0xffff); -data[2835] = String.fromCharCode (0xffff); -data[2836] = String.fromCharCode (0xffff); -data[2837] = String.fromCharCode (0xffff); -data[2838] = String.fromCharCode (0xffff); -data[2839] = String.fromCharCode (0xffff); -data[2840] = String.fromCharCode (0xffff); -data[2841] = String.fromCharCode (0xffff); -data[2842] = String.fromCharCode (0xffff); -data[2843] = String.fromCharCode (0xffff); -data[2844] = String.fromCharCode (0xffff); -data[2845] = String.fromCharCode (0xffff); -data[2846] = String.fromCharCode (0xffff); -data[2847] = String.fromCharCode (0xffff); -data[2848] = String.fromCharCode (0xffff); -data[2849] = String.fromCharCode (0xffff); -data[2850] = String.fromCharCode (0xffff); -data[2851] = String.fromCharCode (0xffff); -data[2852] = String.fromCharCode (0xffff); -data[2853] = String.fromCharCode (0xffff); -data[2854] = String.fromCharCode (0xffff); -data[2855] = String.fromCharCode (0xffff); -data[2856] = String.fromCharCode (0xffff); -data[2857] = String.fromCharCode (0xffff); -data[2858] = String.fromCharCode (0xffff); -data[2859] = String.fromCharCode (0xffff); -data[2860] = String.fromCharCode (0xffff); -data[2861] = String.fromCharCode (0xffff); -data[2862] = String.fromCharCode (0xffff); -data[2863] = String.fromCharCode (0xffff); -data[2864] = String.fromCharCode (0xffff); -data[2865] = String.fromCharCode (0xffff); -data[2866] = String.fromCharCode (0xffff); -data[2867] = String.fromCharCode (0xffff); -data[2868] = String.fromCharCode (0xffff); -data[2869] = String.fromCharCode (0xffff); -data[2870] = String.fromCharCode (0xffff); -data[2871] = String.fromCharCode (0xffff); -data[2872] = String.fromCharCode (0xffff); -data[2873] = String.fromCharCode (0xffff); -data[2874] = String.fromCharCode (0xffff); -data[2875] = String.fromCharCode (0xffff); -data[2876] = String.fromCharCode (0xffff); -data[2877] = String.fromCharCode (0xffff); -data[2878] = String.fromCharCode (0xffff); -data[2879] = String.fromCharCode (0xffff); -data[2880] = String.fromCharCode (0xffff); -data[2881] = String.fromCharCode (0xffff); -data[2882] = String.fromCharCode (0xffff); -data[2883] = String.fromCharCode (0xffff); -data[2884] = String.fromCharCode (0xffff); -data[2885] = String.fromCharCode (0xffff); -data[2886] = String.fromCharCode (0xffff); -data[2887] = String.fromCharCode (0xffff); -data[2888] = String.fromCharCode (0xffff); -data[2889] = String.fromCharCode (0xffff); -data[2890] = String.fromCharCode (0xffff); -data[2891] = String.fromCharCode (0xffff); -data[2892] = String.fromCharCode (0xffff); -data[2893] = String.fromCharCode (0xffff); -data[2894] = String.fromCharCode (0xffff); -data[2895] = String.fromCharCode (0xffff); -data[2896] = String.fromCharCode (0xffff); -data[2897] = String.fromCharCode (0xffff); -data[2898] = String.fromCharCode (0xffff); -data[2899] = String.fromCharCode (0xffff); -data[2900] = String.fromCharCode (0xffff); -data[2901] = String.fromCharCode (0xffff); -data[2902] = String.fromCharCode (0xffff); -data[2903] = String.fromCharCode (0xffff); -data[2904] = String.fromCharCode (0xffff); -data[2905] = String.fromCharCode (0xffff); -data[2906] = String.fromCharCode (0xffff); -data[2907] = String.fromCharCode (0xffff); -data[2908] = String.fromCharCode (0xffff); -data[2909] = String.fromCharCode (0xffff); -data[2910] = String.fromCharCode (0xffff); -data[2911] = String.fromCharCode (0xffff); -data[2912] = String.fromCharCode (0xffff); -data[2913] = String.fromCharCode (0xffff); -data[2914] = String.fromCharCode (0xffff); -data[2915] = String.fromCharCode (0xffff); -data[2916] = String.fromCharCode (0xffff); -data[2917] = String.fromCharCode (0xffff); -data[2918] = String.fromCharCode (0xffff); -data[2919] = String.fromCharCode (0xffff); -data[2920] = String.fromCharCode (0xffff); -data[2921] = String.fromCharCode (0xffff); -data[2922] = String.fromCharCode (0xffff); -data[2923] = String.fromCharCode (0xffff); -data[2924] = String.fromCharCode (0xffff); -data[2925] = String.fromCharCode (0xffff); -data[2926] = String.fromCharCode (0xffff); -data[2927] = String.fromCharCode (0xffff); -data[2928] = String.fromCharCode (0xffff); -data[2929] = String.fromCharCode (0xffff); -data[2930] = String.fromCharCode (0xffff); -data[2931] = String.fromCharCode (0xffff); -data[2932] = String.fromCharCode (0xffff); -data[2933] = String.fromCharCode (0xffff); -data[2934] = String.fromCharCode (0xffff); -data[2935] = String.fromCharCode (0xffff); -data[2936] = String.fromCharCode (0xffff); -data[2937] = String.fromCharCode (0xffff); -data[2938] = String.fromCharCode (0xffff); -data[2939] = String.fromCharCode (0xffff); -data[2940] = String.fromCharCode (0xffff); -data[2941] = String.fromCharCode (0xffff); -data[2942] = String.fromCharCode (0xffff); -data[2943] = String.fromCharCode (0xffff); -data[2944] = String.fromCharCode (0xffff); -data[2945] = String.fromCharCode (0xffff); -data[2946] = String.fromCharCode (0xffff); -data[2947] = String.fromCharCode (0xffff); -data[2948] = String.fromCharCode (0xffff); -data[2949] = String.fromCharCode (0xffff); -data[2950] = String.fromCharCode (0xffff); -data[2951] = String.fromCharCode (0xffff); -data[2952] = String.fromCharCode (0xffff); -data[2953] = String.fromCharCode (0xffff); -data[2954] = String.fromCharCode (0xffff); -data[2955] = String.fromCharCode (0xffff); -data[2956] = String.fromCharCode (0xffff); -data[2957] = String.fromCharCode (0xffff); -data[2958] = String.fromCharCode (0xffff); -data[2959] = String.fromCharCode (0xffff); -data[2960] = String.fromCharCode (0xffff); -data[2961] = String.fromCharCode (0xffff); -data[2962] = String.fromCharCode (0xffff); -data[2963] = String.fromCharCode (0xffff); -data[2964] = String.fromCharCode (0xffff); -data[2965] = String.fromCharCode (0xffff); -data[2966] = String.fromCharCode (0xffff); -data[2967] = String.fromCharCode (0xffff); -data[2968] = String.fromCharCode (0xffff); -data[2969] = String.fromCharCode (0xffff); -data[2970] = String.fromCharCode (0xffff); -data[2971] = String.fromCharCode (0xffff); -data[2972] = String.fromCharCode (0xffff); -data[2973] = String.fromCharCode (0xffff); -data[2974] = String.fromCharCode (0xffff); -data[2975] = String.fromCharCode (0xffff); -data[2976] = String.fromCharCode (0xffff); -data[2977] = String.fromCharCode (0xffff); -data[2978] = String.fromCharCode (0xffff); -data[2979] = String.fromCharCode (0xffff); -data[2980] = String.fromCharCode (0xffff); -data[2981] = String.fromCharCode (0xffff); -data[2982] = String.fromCharCode (0xffff); -data[2983] = String.fromCharCode (0xffff); -data[2984] = String.fromCharCode (0xffff); -data[2985] = String.fromCharCode (0xffff); -data[2986] = String.fromCharCode (0xffff); -data[2987] = String.fromCharCode (0xffff); -data[2988] = String.fromCharCode (0xffff); -data[2989] = String.fromCharCode (0xffff); -data[2990] = String.fromCharCode (0xffff); -data[2991] = String.fromCharCode (0xffff); -data[2992] = String.fromCharCode (0xffff); -data[2993] = String.fromCharCode (0xffff); -data[2994] = String.fromCharCode (0xffff); -data[2995] = String.fromCharCode (0xffff); -data[2996] = String.fromCharCode (0xffff); -data[2997] = String.fromCharCode (0xffff); -data[2998] = String.fromCharCode (0xffff); -data[2999] = String.fromCharCode (0xffff); -data[3000] = String.fromCharCode (0xffff); -data[3001] = String.fromCharCode (0xffff); -data[3002] = String.fromCharCode (0xffff); -data[3003] = String.fromCharCode (0xffff); -data[3004] = String.fromCharCode (0xffff); -data[3005] = String.fromCharCode (0xffff); -data[3006] = String.fromCharCode (0xffff); -data[3007] = String.fromCharCode (0xffff); -data[3008] = String.fromCharCode (0xffff); -data[3009] = String.fromCharCode (0xffff); -data[3010] = String.fromCharCode (0xffff); -data[3011] = String.fromCharCode (0xffff); -data[3012] = String.fromCharCode (0xffff); -data[3013] = String.fromCharCode (0xffff); -data[3014] = String.fromCharCode (0xffff); -data[3015] = String.fromCharCode (0xffff); -data[3016] = String.fromCharCode (0xffff); -data[3017] = String.fromCharCode (0xffff); -data[3018] = String.fromCharCode (0xffff); -data[3019] = String.fromCharCode (0xffff); -data[3020] = String.fromCharCode (0xffff); -data[3021] = String.fromCharCode (0xffff); -data[3022] = String.fromCharCode (0xffff); -data[3023] = String.fromCharCode (0xffff); -data[3024] = String.fromCharCode (0xffff); -data[3025] = String.fromCharCode (0xffff); -data[3026] = String.fromCharCode (0xffff); -data[3027] = String.fromCharCode (0xffff); -data[3028] = String.fromCharCode (0xffff); -data[3029] = String.fromCharCode (0xffff); -data[3030] = String.fromCharCode (0xffff); -data[3031] = String.fromCharCode (0xffff); -data[3032] = String.fromCharCode (0xffff); -data[3033] = String.fromCharCode (0xffff); -data[3034] = String.fromCharCode (0xffff); -data[3035] = String.fromCharCode (0xffff); -data[3036] = String.fromCharCode (0xffff); -data[3037] = String.fromCharCode (0xffff); -data[3038] = String.fromCharCode (0xffff); -data[3039] = String.fromCharCode (0xffff); -data[3040] = String.fromCharCode (0xffff); -data[3041] = String.fromCharCode (0xffff); -data[3042] = String.fromCharCode (0xffff); -data[3043] = String.fromCharCode (0xffff); -data[3044] = String.fromCharCode (0xffff); -data[3045] = String.fromCharCode (0xffff); -data[3046] = String.fromCharCode (0xffff); -data[3047] = String.fromCharCode (0xffff); -data[3048] = String.fromCharCode (0xffff); -data[3049] = String.fromCharCode (0xffff); -data[3050] = String.fromCharCode (0xffff); -data[3051] = String.fromCharCode (0xffff); -data[3052] = String.fromCharCode (0xffff); -data[3053] = String.fromCharCode (0xffff); -data[3054] = String.fromCharCode (0xffff); -data[3055] = String.fromCharCode (0xffff); -data[3056] = String.fromCharCode (0xffff); -data[3057] = String.fromCharCode (0xffff); -data[3058] = String.fromCharCode (0xffff); -data[3059] = String.fromCharCode (0xffff); -data[3060] = String.fromCharCode (0xffff); -data[3061] = String.fromCharCode (0xffff); -data[3062] = String.fromCharCode (0xffff); -data[3063] = String.fromCharCode (0xffff); -data[3064] = String.fromCharCode (0xffff); -data[3065] = String.fromCharCode (0xffff); -data[3066] = String.fromCharCode (0xffff); -data[3067] = String.fromCharCode (0xffff); -data[3068] = String.fromCharCode (0xffff); -data[3069] = String.fromCharCode (0xffff); -data[3070] = String.fromCharCode (0xffff); -data[3071] = String.fromCharCode (0xffff); -data[3072] = String.fromCharCode (0xffff); -data[3073] = String.fromCharCode (0xffff); -data[3074] = String.fromCharCode (0xffff); -data[3075] = String.fromCharCode (0xffff); -data[3076] = String.fromCharCode (0xffff); -data[3077] = String.fromCharCode (0xffff); -data[3078] = String.fromCharCode (0xffff); -data[3079] = String.fromCharCode (0xffff); -data[3080] = String.fromCharCode (0xffff); -data[3081] = String.fromCharCode (0xffff); -data[3082] = String.fromCharCode (0xffff); -data[3083] = String.fromCharCode (0xffff); -data[3084] = String.fromCharCode (0xffff); -data[3085] = String.fromCharCode (0xffff); -data[3086] = String.fromCharCode (0xffff); -data[3087] = String.fromCharCode (0xffff); -data[3088] = String.fromCharCode (0xffff); -data[3089] = String.fromCharCode (0xffff); -data[3090] = String.fromCharCode (0xffff); -data[3091] = String.fromCharCode (0xffff); -data[3092] = String.fromCharCode (0xffff); -data[3093] = String.fromCharCode (0xffff); -data[3094] = String.fromCharCode (0xffff); -data[3095] = String.fromCharCode (0xffff); -data[3096] = String.fromCharCode (0xffff); -data[3097] = String.fromCharCode (0xffff); -data[3098] = String.fromCharCode (0xffff); -data[3099] = String.fromCharCode (0xffff); -data[3100] = String.fromCharCode (0xffff); -data[3101] = String.fromCharCode (0xffff); -data[3102] = String.fromCharCode (0xffff); -data[3103] = String.fromCharCode (0xffff); -data[3104] = String.fromCharCode (0xffff); -data[3105] = String.fromCharCode (0xffff); -data[3106] = String.fromCharCode (0xffff); -data[3107] = String.fromCharCode (0xffff); -data[3108] = String.fromCharCode (0xffff); -data[3109] = String.fromCharCode (0xffff); -data[3110] = String.fromCharCode (0xffff); -data[3111] = String.fromCharCode (0xffff); -data[3112] = String.fromCharCode (0xffff); -data[3113] = String.fromCharCode (0xffff); -data[3114] = String.fromCharCode (0xffff); -data[3115] = String.fromCharCode (0xffff); -data[3116] = String.fromCharCode (0xffff); -data[3117] = String.fromCharCode (0xffff); -data[3118] = String.fromCharCode (0xffff); -data[3119] = String.fromCharCode (0xffff); -data[3120] = String.fromCharCode (0xffff); -data[3121] = String.fromCharCode (0xffff); -data[3122] = String.fromCharCode (0xffff); -data[3123] = String.fromCharCode (0xffff); -data[3124] = String.fromCharCode (0xffff); -data[3125] = String.fromCharCode (0xffff); -data[3126] = String.fromCharCode (0xffff); -data[3127] = String.fromCharCode (0xffff); -data[3128] = String.fromCharCode (0xffff); -data[3129] = String.fromCharCode (0xffff); -data[3130] = String.fromCharCode (0xffff); -data[3131] = String.fromCharCode (0xffff); -data[3132] = String.fromCharCode (0xffff); -data[3133] = String.fromCharCode (0xffff); -data[3134] = String.fromCharCode (0xffff); -data[3135] = String.fromCharCode (0xffff); -data[3136] = String.fromCharCode (0xffff); -data[3137] = String.fromCharCode (0xffff); -data[3138] = String.fromCharCode (0xffff); -data[3139] = String.fromCharCode (0xffff); -data[3140] = String.fromCharCode (0xffff); -data[3141] = String.fromCharCode (0xffff); -data[3142] = String.fromCharCode (0xffff); -data[3143] = String.fromCharCode (0xffff); -data[3144] = String.fromCharCode (0xffff); -data[3145] = String.fromCharCode (0xffff); -data[3146] = String.fromCharCode (0xffff); -data[3147] = String.fromCharCode (0xffff); -data[3148] = String.fromCharCode (0xffff); -data[3149] = String.fromCharCode (0xffff); -data[3150] = String.fromCharCode (0xffff); -data[3151] = String.fromCharCode (0xffff); -data[3152] = String.fromCharCode (0xffff); -data[3153] = String.fromCharCode (0xffff); -data[3154] = String.fromCharCode (0xffff); -data[3155] = String.fromCharCode (0xffff); -data[3156] = String.fromCharCode (0xffff); -data[3157] = String.fromCharCode (0xffff); -data[3158] = String.fromCharCode (0xffff); -data[3159] = String.fromCharCode (0xffff); -data[3160] = String.fromCharCode (0xffff); -data[3161] = String.fromCharCode (0xffff); -data[3162] = String.fromCharCode (0xffff); -data[3163] = String.fromCharCode (0xffff); -data[3164] = String.fromCharCode (0xffff); -data[3165] = String.fromCharCode (0xffff); -data[3166] = String.fromCharCode (0xffff); -data[3167] = String.fromCharCode (0xffff); -data[3168] = String.fromCharCode (0xffff); -data[3169] = String.fromCharCode (0xffff); -data[3170] = String.fromCharCode (0xffff); -data[3171] = String.fromCharCode (0xffff); -data[3172] = String.fromCharCode (0xffff); -data[3173] = String.fromCharCode (0xffff); -data[3174] = String.fromCharCode (0xffff); -data[3175] = String.fromCharCode (0xffff); -data[3176] = String.fromCharCode (0xffff); -data[3177] = String.fromCharCode (0xffff); -data[3178] = String.fromCharCode (0xffff); -data[3179] = String.fromCharCode (0xffff); -data[3180] = String.fromCharCode (0xffff); -data[3181] = String.fromCharCode (0xffff); -data[3182] = String.fromCharCode (0xffff); -data[3183] = String.fromCharCode (0xffff); -data[3184] = String.fromCharCode (0xffff); -data[3185] = String.fromCharCode (0xffff); -data[3186] = String.fromCharCode (0xffff); -data[3187] = String.fromCharCode (0xffff); -data[3188] = String.fromCharCode (0xffff); -data[3189] = String.fromCharCode (0xffff); -data[3190] = String.fromCharCode (0xffff); -data[3191] = String.fromCharCode (0xffff); -data[3192] = String.fromCharCode (0xffff); -data[3193] = String.fromCharCode (0xffff); -data[3194] = String.fromCharCode (0xffff); -data[3195] = String.fromCharCode (0xffff); -data[3196] = String.fromCharCode (0xffff); -data[3197] = String.fromCharCode (0xffff); -data[3198] = String.fromCharCode (0xffff); -data[3199] = String.fromCharCode (0xffff); -data[3200] = String.fromCharCode (0xffff); -data[3201] = String.fromCharCode (0xffff); -data[3202] = String.fromCharCode (0xffff); -data[3203] = String.fromCharCode (0xffff); -data[3204] = String.fromCharCode (0xffff); -data[3205] = String.fromCharCode (0xffff); -data[3206] = String.fromCharCode (0xffff); -data[3207] = String.fromCharCode (0xffff); -data[3208] = String.fromCharCode (0xffff); -data[3209] = String.fromCharCode (0xffff); -data[3210] = String.fromCharCode (0xffff); -data[3211] = String.fromCharCode (0xffff); -data[3212] = String.fromCharCode (0xffff); -data[3213] = String.fromCharCode (0xffff); -data[3214] = String.fromCharCode (0xffff); -data[3215] = String.fromCharCode (0xffff); -data[3216] = String.fromCharCode (0xffff); -data[3217] = String.fromCharCode (0xffff); -data[3218] = String.fromCharCode (0xffff); -data[3219] = String.fromCharCode (0xffff); -data[3220] = String.fromCharCode (0xffff); -data[3221] = String.fromCharCode (0xffff); -data[3222] = String.fromCharCode (0xffff); -data[3223] = String.fromCharCode (0xffff); -data[3224] = String.fromCharCode (0xffff); -data[3225] = String.fromCharCode (0xffff); -data[3226] = String.fromCharCode (0xffff); -data[3227] = String.fromCharCode (0xffff); -data[3228] = String.fromCharCode (0xffff); -data[3229] = String.fromCharCode (0xffff); -data[3230] = String.fromCharCode (0xffff); -data[3231] = String.fromCharCode (0xffff); -data[3232] = String.fromCharCode (0xffff); -data[3233] = String.fromCharCode (0xffff); -data[3234] = String.fromCharCode (0xffff); -data[3235] = String.fromCharCode (0xffff); -data[3236] = String.fromCharCode (0xffff); -data[3237] = String.fromCharCode (0xffff); -data[3238] = String.fromCharCode (0xffff); -data[3239] = String.fromCharCode (0xffff); -data[3240] = String.fromCharCode (0xffff); -data[3241] = String.fromCharCode (0xffff); -data[3242] = String.fromCharCode (0xffff); -data[3243] = String.fromCharCode (0xffff); -data[3244] = String.fromCharCode (0xffff); -data[3245] = String.fromCharCode (0xffff); -data[3246] = String.fromCharCode (0xffff); -data[3247] = String.fromCharCode (0xffff); -data[3248] = String.fromCharCode (0xffff); -data[3249] = String.fromCharCode (0xffff); -data[3250] = String.fromCharCode (0xffff); -data[3251] = String.fromCharCode (0xffff); -data[3252] = String.fromCharCode (0xffff); -data[3253] = String.fromCharCode (0xffff); -data[3254] = String.fromCharCode (0xffff); -data[3255] = String.fromCharCode (0xffff); -data[3256] = String.fromCharCode (0xffff); -data[3257] = String.fromCharCode (0xffff); -data[3258] = String.fromCharCode (0xffff); -data[3259] = String.fromCharCode (0xffff); -data[3260] = String.fromCharCode (0xffff); -data[3261] = String.fromCharCode (0xffff); -data[3262] = String.fromCharCode (0xffff); -data[3263] = String.fromCharCode (0xffff); -data[3264] = String.fromCharCode (0xffff); -data[3265] = String.fromCharCode (0xffff); -data[3266] = String.fromCharCode (0xffff); -data[3267] = String.fromCharCode (0xffff); -data[3268] = String.fromCharCode (0xffff); -data[3269] = String.fromCharCode (0xffff); -data[3270] = String.fromCharCode (0xffff); -data[3271] = String.fromCharCode (0xffff); -data[3272] = String.fromCharCode (0xffff); -data[3273] = String.fromCharCode (0xffff); -data[3274] = String.fromCharCode (0xffff); -data[3275] = String.fromCharCode (0xffff); -data[3276] = String.fromCharCode (0xffff); -data[3277] = String.fromCharCode (0xffff); -data[3278] = String.fromCharCode (0xffff); -data[3279] = String.fromCharCode (0xffff); -data[3280] = String.fromCharCode (0xffff); -data[3281] = String.fromCharCode (0xffff); -data[3282] = String.fromCharCode (0xffff); -data[3283] = String.fromCharCode (0xffff); -data[3284] = String.fromCharCode (0xffff); -data[3285] = String.fromCharCode (0xffff); -data[3286] = String.fromCharCode (0xffff); -data[3287] = String.fromCharCode (0xffff); -data[3288] = String.fromCharCode (0xffff); -data[3289] = String.fromCharCode (0xffff); -data[3290] = String.fromCharCode (0xffff); -data[3291] = String.fromCharCode (0xffff); -data[3292] = String.fromCharCode (0xffff); -data[3293] = String.fromCharCode (0xffff); -data[3294] = String.fromCharCode (0xffff); -data[3295] = String.fromCharCode (0xffff); -data[3296] = String.fromCharCode (0xffff); -data[3297] = String.fromCharCode (0xffff); -data[3298] = String.fromCharCode (0xffff); -data[3299] = String.fromCharCode (0xffff); -data[3300] = String.fromCharCode (0xffff); -data[3301] = String.fromCharCode (0xffff); -data[3302] = String.fromCharCode (0xffff); -data[3303] = String.fromCharCode (0xffff); -data[3304] = String.fromCharCode (0xffff); -data[3305] = String.fromCharCode (0xffff); -data[3306] = String.fromCharCode (0xffff); -data[3307] = String.fromCharCode (0xffff); -data[3308] = String.fromCharCode (0xffff); -data[3309] = String.fromCharCode (0xffff); -data[3310] = String.fromCharCode (0xffff); -data[3311] = String.fromCharCode (0xffff); -data[3312] = String.fromCharCode (0xffff); -data[3313] = String.fromCharCode (0xffff); -data[3314] = String.fromCharCode (0xffff); -data[3315] = String.fromCharCode (0xffff); -data[3316] = String.fromCharCode (0xffff); -data[3317] = String.fromCharCode (0xffff); -data[3318] = String.fromCharCode (0xffff); -data[3319] = String.fromCharCode (0xffff); -data[3320] = String.fromCharCode (0xffff); -data[3321] = String.fromCharCode (0xffff); -data[3322] = String.fromCharCode (0xffff); -data[3323] = String.fromCharCode (0xffff); -data[3324] = String.fromCharCode (0xffff); -data[3325] = String.fromCharCode (0xffff); -data[3326] = String.fromCharCode (0xffff); -data[3327] = String.fromCharCode (0xffff); -data[3328] = String.fromCharCode (0xffff); -data[3329] = String.fromCharCode (0xffff); -data[3330] = String.fromCharCode (0xffff); -data[3331] = String.fromCharCode (0xffff); -data[3332] = String.fromCharCode (0xffff); -data[3333] = String.fromCharCode (0xffff); -data[3334] = String.fromCharCode (0xffff); -data[3335] = String.fromCharCode (0xffff); -data[3336] = String.fromCharCode (0xffff); -data[3337] = String.fromCharCode (0xffff); -data[3338] = String.fromCharCode (0xffff); -data[3339] = String.fromCharCode (0xffff); -data[3340] = String.fromCharCode (0xffff); -data[3341] = String.fromCharCode (0xffff); -data[3342] = String.fromCharCode (0xffff); -data[3343] = String.fromCharCode (0xffff); -data[3344] = String.fromCharCode (0xffff); -data[3345] = String.fromCharCode (0xffff); -data[3346] = String.fromCharCode (0xffff); -data[3347] = String.fromCharCode (0xffff); -data[3348] = String.fromCharCode (0xffff); -data[3349] = String.fromCharCode (0xffff); -data[3350] = String.fromCharCode (0xffff); -data[3351] = String.fromCharCode (0xffff); -data[3352] = String.fromCharCode (0xffff); -data[3353] = String.fromCharCode (0xffff); -data[3354] = String.fromCharCode (0xffff); -data[3355] = String.fromCharCode (0xffff); -data[3356] = String.fromCharCode (0xffff); -data[3357] = String.fromCharCode (0xffff); -data[3358] = String.fromCharCode (0xffff); -data[3359] = String.fromCharCode (0xffff); -data[3360] = String.fromCharCode (0xffff); -data[3361] = String.fromCharCode (0xffff); -data[3362] = String.fromCharCode (0xffff); -data[3363] = String.fromCharCode (0xffff); -data[3364] = String.fromCharCode (0xffff); -data[3365] = String.fromCharCode (0xffff); -data[3366] = String.fromCharCode (0xffff); -data[3367] = String.fromCharCode (0xffff); -data[3368] = String.fromCharCode (0xffff); -data[3369] = String.fromCharCode (0xffff); -data[3370] = String.fromCharCode (0xffff); -data[3371] = String.fromCharCode (0xffff); -data[3372] = String.fromCharCode (0xffff); -data[3373] = String.fromCharCode (0xffff); -data[3374] = String.fromCharCode (0xffff); -data[3375] = String.fromCharCode (0xffff); -data[3376] = String.fromCharCode (0xffff); -data[3377] = String.fromCharCode (0xffff); -data[3378] = String.fromCharCode (0xffff); -data[3379] = String.fromCharCode (0xffff); -data[3380] = String.fromCharCode (0xffff); -data[3381] = String.fromCharCode (0xffff); -data[3382] = String.fromCharCode (0xffff); -data[3383] = String.fromCharCode (0xffff); -data[3384] = String.fromCharCode (0xffff); -data[3385] = String.fromCharCode (0xffff); -data[3386] = String.fromCharCode (0xffff); -data[3387] = String.fromCharCode (0xffff); -data[3388] = String.fromCharCode (0xffff); -data[3389] = String.fromCharCode (0xffff); -data[3390] = String.fromCharCode (0xffff); -data[3391] = String.fromCharCode (0xffff); -data[3392] = String.fromCharCode (0xffff); -data[3393] = String.fromCharCode (0xffff); -data[3394] = String.fromCharCode (0xffff); -data[3395] = String.fromCharCode (0xffff); -data[3396] = String.fromCharCode (0xffff); -data[3397] = String.fromCharCode (0xffff); -data[3398] = String.fromCharCode (0xffff); -data[3399] = String.fromCharCode (0xffff); -data[3400] = String.fromCharCode (0xffff); -data[3401] = String.fromCharCode (0xffff); -data[3402] = String.fromCharCode (0xffff); -data[3403] = String.fromCharCode (0xffff); -data[3404] = String.fromCharCode (0xffff); -data[3405] = String.fromCharCode (0xffff); -data[3406] = String.fromCharCode (0xffff); -data[3407] = String.fromCharCode (0xffff); -data[3408] = String.fromCharCode (0xffff); -data[3409] = String.fromCharCode (0xffff); -data[3410] = String.fromCharCode (0xffff); -data[3411] = String.fromCharCode (0xffff); -data[3412] = String.fromCharCode (0xffff); -data[3413] = String.fromCharCode (0xffff); -data[3414] = String.fromCharCode (0xffff); -data[3415] = String.fromCharCode (0xffff); -data[3416] = String.fromCharCode (0xffff); -data[3417] = String.fromCharCode (0xffff); -data[3418] = String.fromCharCode (0xffff); -data[3419] = String.fromCharCode (0xffff); -data[3420] = String.fromCharCode (0xffff); -data[3421] = String.fromCharCode (0xffff); -data[3422] = String.fromCharCode (0xffff); -data[3423] = String.fromCharCode (0xffff); -data[3424] = String.fromCharCode (0xffff); -data[3425] = String.fromCharCode (0xffff); -data[3426] = String.fromCharCode (0xffff); -data[3427] = String.fromCharCode (0xffff); -data[3428] = String.fromCharCode (0xffff); -data[3429] = String.fromCharCode (0xffff); -data[3430] = String.fromCharCode (0xffff); -data[3431] = String.fromCharCode (0xffff); -data[3432] = String.fromCharCode (0xffff); -data[3433] = String.fromCharCode (0xffff); -data[3434] = String.fromCharCode (0xffff); -data[3435] = String.fromCharCode (0xffff); -data[3436] = String.fromCharCode (0xffff); -data[3437] = String.fromCharCode (0xffff); -data[3438] = String.fromCharCode (0xffff); -data[3439] = String.fromCharCode (0xffff); -data[3440] = String.fromCharCode (0xffff); -data[3441] = String.fromCharCode (0xffff); -data[3442] = String.fromCharCode (0xffff); -data[3443] = String.fromCharCode (0xffff); -data[3444] = String.fromCharCode (0xffff); -data[3445] = String.fromCharCode (0xffff); -data[3446] = String.fromCharCode (0xffff); -data[3447] = String.fromCharCode (0xffff); -data[3448] = String.fromCharCode (0xffff); -data[3449] = String.fromCharCode (0xffff); -data[3450] = String.fromCharCode (0x000f); -data[3984] = String.fromCharCode (0xffff); -data[3985] = String.fromCharCode (0xffff); -data[3986] = String.fromCharCode (0xffff); -data[3987] = String.fromCharCode (0xffff); -data[3988] = String.fromCharCode (0xffff); -data[3989] = String.fromCharCode (0xffff); -data[3990] = String.fromCharCode (0xffff); -data[3991] = String.fromCharCode (0xffff); -data[3992] = String.fromCharCode (0xffff); -data[3993] = String.fromCharCode (0xffff); -data[3994] = String.fromCharCode (0xffff); -data[3995] = String.fromCharCode (0xffff); -data[3996] = String.fromCharCode (0xffff); -data[3997] = String.fromCharCode (0xffff); -data[3998] = String.fromCharCode (0xffff); -data[3999] = String.fromCharCode (0xffff); -data[4000] = String.fromCharCode (0xffff); -data[4001] = String.fromCharCode (0xffff); -data[4002] = String.fromCharCode (0x3fff); -data[4016] = String.fromCharCode (0x007f); -data[4017] = String.fromCharCode (0x80f8); -data[4018] = String.fromCharCode (0xfdff); -data[4019] = String.fromCharCode (0x5f7f); -data[4020] = String.fromCharCode (0xffdb); -data[4021] = String.fromCharCode (0xffff); -data[4022] = String.fromCharCode (0xffff); -data[4023] = String.fromCharCode (0xffff); -data[4024] = String.fromCharCode (0xffff); -data[4025] = String.fromCharCode (0xffff); -data[4026] = String.fromCharCode (0xffff); -data[4027] = String.fromCharCode (0x0003); -data[4029] = String.fromCharCode (0xfff8); -data[4030] = String.fromCharCode (0xffff); -data[4031] = String.fromCharCode (0xffff); -data[4032] = String.fromCharCode (0xffff); -data[4033] = String.fromCharCode (0xffff); -data[4034] = String.fromCharCode (0xffff); -data[4035] = String.fromCharCode (0xffff); -data[4036] = String.fromCharCode (0xffff); -data[4037] = String.fromCharCode (0xffff); -data[4038] = String.fromCharCode (0xffff); -data[4039] = String.fromCharCode (0xffff); -data[4040] = String.fromCharCode (0xffff); -data[4041] = String.fromCharCode (0xffff); -data[4042] = String.fromCharCode (0xffff); -data[4043] = String.fromCharCode (0xffff); -data[4044] = String.fromCharCode (0xffff); -data[4045] = String.fromCharCode (0xffff); -data[4046] = String.fromCharCode (0xffff); -data[4047] = String.fromCharCode (0xffff); -data[4048] = String.fromCharCode (0xffff); -data[4049] = String.fromCharCode (0xffff); -data[4050] = String.fromCharCode (0xffff); -data[4051] = String.fromCharCode (0x3fff); -data[4053] = String.fromCharCode (0xffff); -data[4054] = String.fromCharCode (0xffff); -data[4055] = String.fromCharCode (0xffff); -data[4056] = String.fromCharCode (0xffff); -data[4057] = String.fromCharCode (0xfffc); -data[4058] = String.fromCharCode (0xffff); -data[4059] = String.fromCharCode (0xffff); -data[4060] = String.fromCharCode (0x00ff); -data[4063] = String.fromCharCode (0x0fff); -data[4071] = String.fromCharCode (0xffd7); -data[4072] = String.fromCharCode (0xffff); -data[4073] = String.fromCharCode (0xffff); -data[4074] = String.fromCharCode (0xffff); -data[4075] = String.fromCharCode (0xffff); -data[4076] = String.fromCharCode (0xffff); -data[4077] = String.fromCharCode (0xffff); -data[4078] = String.fromCharCode (0xffff); -data[4079] = String.fromCharCode (0x1fff); -data[4082] = String.fromCharCode (0xfffe); -data[4083] = String.fromCharCode (0x07ff); -data[4084] = String.fromCharCode (0xfffe); -data[4085] = String.fromCharCode (0x07ff); -data[4086] = String.fromCharCode (0xffc0); -data[4087] = String.fromCharCode (0xffff); -data[4088] = String.fromCharCode (0xffff); -data[4089] = String.fromCharCode (0xffff); -data[4090] = String.fromCharCode (0xffff); -data[4091] = String.fromCharCode (0x7fff); -data[4092] = String.fromCharCode (0xfcfc); -data[4093] = String.fromCharCode (0x1cfc); -data[4100] = String.fromCharCode (0xfffe); -data[4101] = String.fromCharCode (0x07ff); -data[4102] = String.fromCharCode (0xfffe); -data[4103] = String.fromCharCode (0x07ff); -data[4106] = String.fromCharCode (0x0400); -data[4107] = String.fromCharCode (0x0420); -data[4108] = String.fromCharCode (0xffff); -data[4109] = String.fromCharCode (0xff7f); -data[4110] = String.fromCharCode (0xffff); -data[4111] = String.fromCharCode (0xff7f); -data[4112] = String.fromCharCode (0xffff); -data[4113] = String.fromCharCode (0xffff); -data[4114] = String.fromCharCode (0xffff); -data[4115] = String.fromCharCode (0xffff); -data[4116] = String.fromCharCode (0xffff); -data[4117] = String.fromCharCode (0xffff); -data[4118] = String.fromCharCode (0xffff); -data[4119] = String.fromCharCode (0xffff); -data[4120] = String.fromCharCode (0xffff); -data[4121] = String.fromCharCode (0xffff); -data[4122] = String.fromCharCode (0xffff); -data[4123] = String.fromCharCode (0xffff); -data[4124] = String.fromCharCode (0xffff); -data[4125] = String.fromCharCode (0xffff); -data[4126] = String.fromCharCode (0xffff); -data[4127] = String.fromCharCode (0xfc3f); -data[4128] = String.fromCharCode (0xffff); -data[4129] = String.fromCharCode (0x00ff); -data[4133] = String.fromCharCode (0xffff); -data[4134] = String.fromCharCode (0xffff); -data[4135] = String.fromCharCode (0xffff); -data[4136] = String.fromCharCode (0xffff); -data[4137] = String.fromCharCode (0xffff); -data[4138] = String.fromCharCode (0x01ff); -data[4139] = String.fromCharCode (0xf9ff); -data[4140] = String.fromCharCode (0x0003); -data[4141] = String.fromCharCode (0x0003); -data[4142] = String.fromCharCode (0x001f); -data[4151] = String.fromCharCode (0x0400); -data[4152] = String.fromCharCode (0xd740); -data[4153] = String.fromCharCode (0xffff); -data[4154] = String.fromCharCode (0xfffb); -data[4155] = String.fromCharCode (0xffff); -data[4156] = String.fromCharCode (0x7fff); -data[4157] = String.fromCharCode (0x547f); -data[4158] = String.fromCharCode (0x00fd); -}); -c$.white_f = Clazz.defineMethod (c$, "white_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.white = new com.stevesoft.pat.Bits (data); -data[0] = String.fromCharCode (0x3e00); -data[1] = String.fromCharCode (0xf000); -data[2] = String.fromCharCode (0x0001); -data[512] = String.fromCharCode (0x0fff); -data[514] = String.fromCharCode (0x0300); -data[768] = String.fromCharCode (0x0001); -data[4096] = String.fromCharCode (0x3e00); -data[4097] = String.fromCharCode (0xf000); -data[4098] = String.fromCharCode (0x0001); -}); -c$.punct_f = Clazz.defineMethod (c$, "punct_f", -function () { -var data = Clazz.newCharArray (4159, '\0'); -com.stevesoft.pat.Bits.punct = new com.stevesoft.pat.Bits (data); -data[2] = String.fromCharCode (0xf7ee); -data[3] = String.fromCharCode (0x8c00); -data[4] = String.fromCharCode (0x0001); -data[5] = String.fromCharCode (0xb800); -data[7] = String.fromCharCode (0x2800); -data[10] = String.fromCharCode (0x2802); -data[11] = String.fromCharCode (0x8880); -data[55] = String.fromCharCode (0x4030); -data[56] = String.fromCharCode (0x0080); -data[85] = String.fromCharCode (0xfc00); -data[88] = String.fromCharCode (0x0200); -data[91] = String.fromCharCode (0x4000); -data[92] = String.fromCharCode (0x0009); -data[95] = String.fromCharCode (0x0018); -data[96] = String.fromCharCode (0x1000); -data[97] = String.fromCharCode (0x8800); -data[102] = String.fromCharCode (0x3c00); -data[109] = String.fromCharCode (0x0010); -data[150] = '0'; -data[151] = String.fromCharCode (0x0001); -data[226] = String.fromCharCode (0x8000); -data[229] = String.fromCharCode (0x0c00); -data[234] = String.fromCharCode (0x8000); -data[240] = String.fromCharCode (0xfff0); -data[241] = String.fromCharCode (0x0007); -data[243] = String.fromCharCode (0x3c00); -data[248] = String.fromCharCode (0x0020); -data[271] = String.fromCharCode (0x0800); -data[513] = String.fromCharCode (0xffff); -data[514] = String.fromCharCode (0x00ff); -data[515] = String.fromCharCode (0xffff); -data[516] = 'o'; -data[519] = String.fromCharCode (0x6000); -data[520] = String.fromCharCode (0x6000); -data[562] = String.fromCharCode (0x0600); -data[768] = String.fromCharCode (0xff4e); -data[769] = String.fromCharCode (0xfff3); -data[771] = String.fromCharCode (0x0001); -data[783] = String.fromCharCode (0x0800); -data[4051] = String.fromCharCode (0xc000); -data[4067] = String.fromCharCode (0xffff); -data[4068] = String.fromCharCode (0xfe1f); -data[4069] = String.fromCharCode (0xfff7); -data[4070] = String.fromCharCode (0x0d0b); -data[4080] = String.fromCharCode (0xf7ee); -data[4081] = String.fromCharCode (0x8c00); -data[4082] = String.fromCharCode (0x0001); -data[4083] = String.fromCharCode (0xb800); -data[4085] = String.fromCharCode (0x2800); -data[4086] = String.fromCharCode (0x003e); -data[4098] = String.fromCharCode (0xf7ee); -data[4099] = String.fromCharCode (0x8c00); -data[4100] = String.fromCharCode (0x0001); -data[4101] = String.fromCharCode (0xb800); -data[4103] = String.fromCharCode (0x2800); -data[4106] = String.fromCharCode (0x2802); -data[4107] = String.fromCharCode (0x8880); -data[4151] = String.fromCharCode (0x4030); -data[4152] = String.fromCharCode (0x0080); -}); -Clazz.defineStatics (c$, -"upper", null, -"lower", null, -"title", null, -"currency", null, -"decimal_digit", null, -"math", null, -"letter", null, -"white", null, -"punct", null); +Clazz.declarePackage ("com.stevesoft.pat"); +c$ = Clazz.decorateAsClass (function () { +this.carray = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Bits"); +Clazz.makeConstructor (c$, +function (carray) { +this.carray = carray; +}, "~A"); +Clazz.defineMethod (c$, "get", +function (i) { +return ((this.carray[i >> 4]).charCodeAt (0) & (1 << (i & 15))) != 0; +}, "~N"); +Clazz.defineMethod (c$, "set", +function (i, b) { +if (b) { +this.carray[i >> 4] = String.fromCharCode ((this.carray[i >> 4]).charCodeAt (0) | ((String.fromCharCode (1)).charCodeAt (0) << (i & 15))); +} else { +this.carray[i >> 4] = String.fromCharCode ((this.carray[i >> 4]).charCodeAt (0) & (String.fromCharCode (~(1 << (i & 15)))).charCodeAt (0)); +}}, "~N,~B"); +c$.upper_f = Clazz.defineMethod (c$, "upper_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.upper = new com.stevesoft.pat.Bits (data); +data[4] = String.fromCharCode (0xfffe); +data[5] = String.fromCharCode (0x07ff); +data[12] = String.fromCharCode (0xffff); +data[13] = String.fromCharCode (0x7f7f); +data[16] = String.fromCharCode (0x5555); +data[17] = String.fromCharCode (0x5555); +data[18] = String.fromCharCode (0x5555); +data[19] = String.fromCharCode (0xaa55); +data[20] = String.fromCharCode (0x54aa); +data[21] = String.fromCharCode (0x5555); +data[22] = String.fromCharCode (0x5555); +data[23] = String.fromCharCode (0x2b55); +data[24] = String.fromCharCode (0xced6); +data[25] = String.fromCharCode (0xb1db); +data[26] = String.fromCharCode (0xd2d5); +data[27] = String.fromCharCode (0x11ae); +data[28] = String.fromCharCode (0xa490); +data[29] = String.fromCharCode (0x4aaa); +data[30] = String.fromCharCode (0x5555); +data[31] = String.fromCharCode (0x5412); +data[32] = String.fromCharCode (0x5555); +data[33] = 'U'; +data[56] = String.fromCharCode (0xd740); +data[57] = String.fromCharCode (0xfffe); +data[58] = String.fromCharCode (0x0ffb); +data[61] = String.fromCharCode (0x541c); +data[62] = String.fromCharCode (0x5555); +data[64] = String.fromCharCode (0xdffe); +data[65] = String.fromCharCode (0xffff); +data[66] = String.fromCharCode (0xffff); +data[70] = String.fromCharCode (0x5555); +data[71] = String.fromCharCode (0x5555); +data[72] = String.fromCharCode (0x0001); +data[73] = String.fromCharCode (0x5555); +data[74] = String.fromCharCode (0x5555); +data[75] = String.fromCharCode (0x5555); +data[76] = String.fromCharCode (0x088a); +data[77] = String.fromCharCode (0x5555); +data[78] = String.fromCharCode (0x4555); +data[79] = String.fromCharCode (0x0115); +data[83] = String.fromCharCode (0xfffe); +data[84] = String.fromCharCode (0xffff); +data[85] = String.fromCharCode (0x007f); +data[266] = String.fromCharCode (0xffff); +data[267] = String.fromCharCode (0xffff); +data[268] = String.fromCharCode (0x003f); +data[480] = String.fromCharCode (0x5555); +data[481] = String.fromCharCode (0x5555); +data[482] = String.fromCharCode (0x5555); +data[483] = String.fromCharCode (0x5555); +data[484] = String.fromCharCode (0x5555); +data[485] = String.fromCharCode (0x5555); +data[486] = String.fromCharCode (0x5555); +data[487] = String.fromCharCode (0x5555); +data[488] = String.fromCharCode (0x5555); +data[489] = String.fromCharCode (0x0015); +data[490] = String.fromCharCode (0x5555); +data[491] = String.fromCharCode (0x5555); +data[492] = String.fromCharCode (0x5555); +data[493] = String.fromCharCode (0x5555); +data[494] = String.fromCharCode (0x5555); +data[495] = String.fromCharCode (0x0155); +data[496] = String.fromCharCode (0xff00); +data[497] = String.fromCharCode (0x3f00); +data[498] = String.fromCharCode (0xff00); +data[499] = String.fromCharCode (0xff00); +data[500] = String.fromCharCode (0x3f00); +data[501] = String.fromCharCode (0xaa00); +data[502] = String.fromCharCode (0xff00); +data[504] = String.fromCharCode (0xff00); +data[505] = String.fromCharCode (0xff00); +data[506] = String.fromCharCode (0xff00); +data[507] = String.fromCharCode (0x5f00); +data[508] = String.fromCharCode (0x1f00); +data[509] = String.fromCharCode (0x0f00); +data[510] = String.fromCharCode (0x1f00); +data[511] = String.fromCharCode (0x1f00); +data[528] = String.fromCharCode (0x3884); +data[529] = String.fromCharCode (0x3f27); +data[530] = String.fromCharCode (0x3d50); +data[531] = String.fromCharCode (0x000b); +data[4082] = String.fromCharCode (0xfffe); +data[4083] = String.fromCharCode (0x07ff); +data[4100] = String.fromCharCode (0xfffe); +data[4101] = String.fromCharCode (0x07ff); +data[4108] = String.fromCharCode (0xffff); +data[4109] = String.fromCharCode (0x7f7f); +data[4112] = String.fromCharCode (0x5555); +data[4113] = String.fromCharCode (0x5555); +data[4114] = String.fromCharCode (0x5555); +data[4115] = String.fromCharCode (0xaa55); +data[4116] = String.fromCharCode (0x54aa); +data[4117] = String.fromCharCode (0x5555); +data[4118] = String.fromCharCode (0x5555); +data[4119] = String.fromCharCode (0x2b55); +data[4120] = String.fromCharCode (0xced6); +data[4121] = String.fromCharCode (0xb1db); +data[4122] = String.fromCharCode (0xd2d5); +data[4123] = String.fromCharCode (0x11ae); +data[4124] = String.fromCharCode (0xa490); +data[4125] = String.fromCharCode (0x4aaa); +data[4126] = String.fromCharCode (0x5555); +data[4127] = String.fromCharCode (0x5412); +data[4128] = String.fromCharCode (0x5555); +data[4129] = 'U'; +data[4152] = String.fromCharCode (0xd740); +data[4153] = String.fromCharCode (0xfffe); +data[4154] = String.fromCharCode (0x0ffb); +data[4157] = String.fromCharCode (0x541c); +data[4158] = 'U'; +}); +c$.lower_f = Clazz.defineMethod (c$, "lower_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.lower = new com.stevesoft.pat.Bits (data); +data[6] = String.fromCharCode (0xfffe); +data[7] = String.fromCharCode (0x07ff); +data[10] = String.fromCharCode (0x0400); +data[11] = String.fromCharCode (0x0420); +data[13] = String.fromCharCode (0x8000); +data[14] = String.fromCharCode (0xffff); +data[15] = String.fromCharCode (0xff7f); +data[16] = String.fromCharCode (0xaaaa); +data[17] = String.fromCharCode (0xaaaa); +data[18] = String.fromCharCode (0xaaaa); +data[19] = String.fromCharCode (0x55aa); +data[20] = String.fromCharCode (0xab55); +data[21] = String.fromCharCode (0xaaaa); +data[22] = String.fromCharCode (0xaaaa); +data[23] = String.fromCharCode (0xd4aa); +data[24] = String.fromCharCode (0x3129); +data[25] = String.fromCharCode (0x4e24); +data[26] = String.fromCharCode (0x292a); +data[27] = String.fromCharCode (0x2651); +data[28] = String.fromCharCode (0x5240); +data[29] = String.fromCharCode (0xb555); +data[30] = String.fromCharCode (0xaaaa); +data[31] = String.fromCharCode (0xa829); +data[32] = String.fromCharCode (0xaaaa); +data[33] = String.fromCharCode (0x00aa); +data[37] = String.fromCharCode (0xffff); +data[38] = String.fromCharCode (0xffff); +data[39] = String.fromCharCode (0xffff); +data[40] = String.fromCharCode (0xffff); +data[41] = String.fromCharCode (0xffff); +data[42] = String.fromCharCode (0x01ff); +data[57] = String.fromCharCode (0x0001); +data[58] = String.fromCharCode (0xf000); +data[59] = String.fromCharCode (0xffff); +data[60] = String.fromCharCode (0x7fff); +data[61] = 'c'; +data[62] = String.fromCharCode (0xaaa8); +data[63] = String.fromCharCode (0x0007); +data[67] = String.fromCharCode (0xffff); +data[68] = String.fromCharCode (0xffff); +data[69] = String.fromCharCode (0xdffe); +data[70] = String.fromCharCode (0xaaaa); +data[71] = String.fromCharCode (0xaaaa); +data[72] = String.fromCharCode (0x0002); +data[73] = String.fromCharCode (0xaaaa); +data[74] = String.fromCharCode (0xaaaa); +data[75] = String.fromCharCode (0xaaaa); +data[76] = String.fromCharCode (0x1114); +data[77] = String.fromCharCode (0xaaaa); +data[78] = String.fromCharCode (0x8aaa); +data[79] = String.fromCharCode (0x022a); +data[86] = String.fromCharCode (0xfffe); +data[87] = String.fromCharCode (0xffff); +data[88] = String.fromCharCode (0x00ff); +data[269] = String.fromCharCode (0xffff); +data[270] = String.fromCharCode (0xffff); +data[271] = String.fromCharCode (0x007f); +data[480] = String.fromCharCode (0xaaaa); +data[481] = String.fromCharCode (0xaaaa); +data[482] = String.fromCharCode (0xaaaa); +data[483] = String.fromCharCode (0xaaaa); +data[484] = String.fromCharCode (0xaaaa); +data[485] = String.fromCharCode (0xaaaa); +data[486] = String.fromCharCode (0xaaaa); +data[487] = String.fromCharCode (0xaaaa); +data[488] = String.fromCharCode (0xaaaa); +data[489] = String.fromCharCode (0x0fea); +data[490] = String.fromCharCode (0xaaaa); +data[491] = String.fromCharCode (0xaaaa); +data[492] = String.fromCharCode (0xaaaa); +data[493] = String.fromCharCode (0xaaaa); +data[494] = String.fromCharCode (0xaaaa); +data[495] = String.fromCharCode (0x02aa); +data[496] = String.fromCharCode (0x00ff); +data[497] = String.fromCharCode (0x003f); +data[498] = String.fromCharCode (0x00ff); +data[499] = String.fromCharCode (0x00ff); +data[500] = String.fromCharCode (0x003f); +data[501] = String.fromCharCode (0x00ff); +data[502] = String.fromCharCode (0x00ff); +data[503] = String.fromCharCode (0x3fff); +data[504] = String.fromCharCode (0x00ff); +data[505] = String.fromCharCode (0x00ff); +data[506] = String.fromCharCode (0x00ff); +data[507] = String.fromCharCode (0x00df); +data[508] = String.fromCharCode (0x00dc); +data[509] = String.fromCharCode (0x00cf); +data[510] = String.fromCharCode (0x00ff); +data[511] = String.fromCharCode (0x00dc); +data[519] = String.fromCharCode (0x8000); +data[528] = String.fromCharCode (0xc400); +data[529] = String.fromCharCode (0x0008); +data[530] = String.fromCharCode (0xc000); +data[531] = String.fromCharCode (0x0010); +data[4016] = String.fromCharCode (0x007f); +data[4017] = String.fromCharCode (0x00f8); +data[4084] = String.fromCharCode (0xfffe); +data[4085] = String.fromCharCode (0x07ff); +data[4102] = String.fromCharCode (0xfffe); +data[4103] = String.fromCharCode (0x07ff); +data[4106] = String.fromCharCode (0x0400); +data[4107] = String.fromCharCode (0x0420); +data[4109] = String.fromCharCode (0x8000); +data[4110] = String.fromCharCode (0xffff); +data[4111] = String.fromCharCode (0xff7f); +data[4112] = String.fromCharCode (0xaaaa); +data[4113] = String.fromCharCode (0xaaaa); +data[4114] = String.fromCharCode (0xaaaa); +data[4115] = String.fromCharCode (0x55aa); +data[4116] = String.fromCharCode (0xab55); +data[4117] = String.fromCharCode (0xaaaa); +data[4118] = String.fromCharCode (0xaaaa); +data[4119] = String.fromCharCode (0xd4aa); +data[4120] = String.fromCharCode (0x3129); +data[4121] = String.fromCharCode (0x4e24); +data[4122] = String.fromCharCode (0x292a); +data[4123] = String.fromCharCode (0x2651); +data[4124] = String.fromCharCode (0x5240); +data[4125] = String.fromCharCode (0xb555); +data[4126] = String.fromCharCode (0xaaaa); +data[4127] = String.fromCharCode (0xa829); +data[4128] = String.fromCharCode (0xaaaa); +data[4129] = String.fromCharCode (0x00aa); +data[4133] = String.fromCharCode (0xffff); +data[4134] = String.fromCharCode (0xffff); +data[4135] = String.fromCharCode (0xffff); +data[4136] = String.fromCharCode (0xffff); +data[4137] = String.fromCharCode (0xffff); +data[4138] = String.fromCharCode (0x01ff); +data[4153] = String.fromCharCode (0x0001); +data[4154] = String.fromCharCode (0xf000); +data[4155] = String.fromCharCode (0xffff); +data[4156] = String.fromCharCode (0x7fff); +data[4157] = 'c'; +data[4158] = String.fromCharCode (0x00a8); +}); +c$.title_f = Clazz.defineMethod (c$, "title_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.title = new com.stevesoft.pat.Bits (data); +data[6] = String.fromCharCode (0xfffe); +data[7] = String.fromCharCode (0x07ff); +data[10] = String.fromCharCode (0x0400); +data[11] = String.fromCharCode (0x0420); +data[13] = String.fromCharCode (0x8000); +data[14] = String.fromCharCode (0xffff); +data[15] = String.fromCharCode (0xff7f); +data[16] = String.fromCharCode (0xaaaa); +data[17] = String.fromCharCode (0xaaaa); +data[18] = String.fromCharCode (0xaaaa); +data[19] = String.fromCharCode (0x55aa); +data[20] = String.fromCharCode (0xab55); +data[21] = String.fromCharCode (0xaaaa); +data[22] = String.fromCharCode (0xaaaa); +data[23] = String.fromCharCode (0xd4aa); +data[24] = String.fromCharCode (0x3129); +data[25] = String.fromCharCode (0x4e24); +data[26] = String.fromCharCode (0x292a); +data[27] = String.fromCharCode (0x2651); +data[28] = String.fromCharCode (0x5240); +data[29] = String.fromCharCode (0xb555); +data[30] = String.fromCharCode (0xaaaa); +data[31] = String.fromCharCode (0xa829); +data[32] = String.fromCharCode (0xaaaa); +data[33] = String.fromCharCode (0x00aa); +data[37] = String.fromCharCode (0xffff); +data[38] = String.fromCharCode (0xffff); +data[39] = String.fromCharCode (0xffff); +data[40] = String.fromCharCode (0xffff); +data[41] = String.fromCharCode (0xffff); +data[42] = String.fromCharCode (0x01ff); +data[57] = String.fromCharCode (0x0001); +data[58] = String.fromCharCode (0xf000); +data[59] = String.fromCharCode (0xffff); +data[60] = String.fromCharCode (0x7fff); +data[61] = 'c'; +data[62] = String.fromCharCode (0xaaa8); +data[63] = String.fromCharCode (0x0007); +data[67] = String.fromCharCode (0xffff); +data[68] = String.fromCharCode (0xffff); +data[69] = String.fromCharCode (0xdffe); +data[70] = String.fromCharCode (0xaaaa); +data[71] = String.fromCharCode (0xaaaa); +data[72] = String.fromCharCode (0x0002); +data[73] = String.fromCharCode (0xaaaa); +data[74] = String.fromCharCode (0xaaaa); +data[75] = String.fromCharCode (0xaaaa); +data[76] = String.fromCharCode (0x1114); +data[77] = String.fromCharCode (0xaaaa); +data[78] = String.fromCharCode (0x8aaa); +data[79] = String.fromCharCode (0x022a); +data[86] = String.fromCharCode (0xfffe); +data[87] = String.fromCharCode (0xffff); +data[88] = String.fromCharCode (0x00ff); +data[269] = String.fromCharCode (0xffff); +data[270] = String.fromCharCode (0xffff); +data[271] = String.fromCharCode (0x007f); +data[480] = String.fromCharCode (0xaaaa); +data[481] = String.fromCharCode (0xaaaa); +data[482] = String.fromCharCode (0xaaaa); +data[483] = String.fromCharCode (0xaaaa); +data[484] = String.fromCharCode (0xaaaa); +data[485] = String.fromCharCode (0xaaaa); +data[486] = String.fromCharCode (0xaaaa); +data[487] = String.fromCharCode (0xaaaa); +data[488] = String.fromCharCode (0xaaaa); +data[489] = String.fromCharCode (0x0fea); +data[490] = String.fromCharCode (0xaaaa); +data[491] = String.fromCharCode (0xaaaa); +data[492] = String.fromCharCode (0xaaaa); +data[493] = String.fromCharCode (0xaaaa); +data[494] = String.fromCharCode (0xaaaa); +data[495] = String.fromCharCode (0x02aa); +data[496] = String.fromCharCode (0x00ff); +data[497] = String.fromCharCode (0x003f); +data[498] = String.fromCharCode (0x00ff); +data[499] = String.fromCharCode (0x00ff); +data[500] = String.fromCharCode (0x003f); +data[501] = String.fromCharCode (0x00ff); +data[502] = String.fromCharCode (0x00ff); +data[503] = String.fromCharCode (0x3fff); +data[504] = String.fromCharCode (0x00ff); +data[505] = String.fromCharCode (0x00ff); +data[506] = String.fromCharCode (0x00ff); +data[507] = String.fromCharCode (0x00df); +data[508] = String.fromCharCode (0x00dc); +data[509] = String.fromCharCode (0x00cf); +data[510] = String.fromCharCode (0x00ff); +data[511] = String.fromCharCode (0x00dc); +data[519] = String.fromCharCode (0x8000); +data[528] = String.fromCharCode (0xc400); +data[529] = String.fromCharCode (0x0008); +data[530] = String.fromCharCode (0xc000); +data[531] = String.fromCharCode (0x0010); +data[4016] = String.fromCharCode (0x007f); +data[4017] = String.fromCharCode (0x00f8); +data[4084] = String.fromCharCode (0xfffe); +data[4085] = String.fromCharCode (0x07ff); +data[4102] = String.fromCharCode (0xfffe); +data[4103] = String.fromCharCode (0x07ff); +data[4106] = String.fromCharCode (0x0400); +data[4107] = String.fromCharCode (0x0420); +data[4109] = String.fromCharCode (0x8000); +data[4110] = String.fromCharCode (0xffff); +data[4111] = String.fromCharCode (0xff7f); +data[4112] = String.fromCharCode (0xaaaa); +data[4113] = String.fromCharCode (0xaaaa); +data[4114] = String.fromCharCode (0xaaaa); +data[4115] = String.fromCharCode (0x55aa); +data[4116] = String.fromCharCode (0xab55); +data[4117] = String.fromCharCode (0xaaaa); +data[4118] = String.fromCharCode (0xaaaa); +data[4119] = String.fromCharCode (0xd4aa); +data[4120] = String.fromCharCode (0x3129); +data[4121] = String.fromCharCode (0x4e24); +data[4122] = String.fromCharCode (0x292a); +data[4123] = String.fromCharCode (0x2651); +data[4124] = String.fromCharCode (0x5240); +data[4125] = String.fromCharCode (0xb555); +data[4126] = String.fromCharCode (0xaaaa); +data[4127] = String.fromCharCode (0xa829); +data[4128] = String.fromCharCode (0xaaaa); +data[4129] = String.fromCharCode (0x00aa); +data[4133] = String.fromCharCode (0xffff); +data[4134] = String.fromCharCode (0xffff); +data[4135] = String.fromCharCode (0xffff); +data[4136] = String.fromCharCode (0xffff); +data[4137] = String.fromCharCode (0xffff); +data[4138] = String.fromCharCode (0x01ff); +data[4153] = String.fromCharCode (0x0001); +data[4154] = String.fromCharCode (0xf000); +data[4155] = String.fromCharCode (0xffff); +data[4156] = String.fromCharCode (0x7fff); +data[4157] = 'c'; +data[4158] = String.fromCharCode (0x00a8); +}); +c$.currency_f = Clazz.defineMethod (c$, "currency_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.currency = new com.stevesoft.pat.Bits (data); +data[2] = String.fromCharCode (0x0010); +data[10] = String.fromCharCode (0x003c); +data[159] = String.fromCharCode (0x000c); +data[227] = String.fromCharCode (0x8000); +data[522] = String.fromCharCode (0x1fff); +data[4070] = String.fromCharCode (0x0200); +data[4080] = String.fromCharCode (0x0010); +data[4094] = 'c'; +data[4098] = String.fromCharCode (0x0010); +data[4106] = String.fromCharCode (0x003c); +}); +c$.decimal_digit_f = Clazz.defineMethod (c$, "decimal_digit_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.decimal_digit = new com.stevesoft.pat.Bits (data); +data[3] = String.fromCharCode (0x03ff); +data[102] = String.fromCharCode (0x03ff); +data[111] = String.fromCharCode (0x03ff); +data[150] = String.fromCharCode (0xffc0); +data[158] = String.fromCharCode (0xffc0); +data[166] = String.fromCharCode (0xffc0); +data[174] = String.fromCharCode (0xffc0); +data[182] = String.fromCharCode (0xffc0); +data[190] = String.fromCharCode (0xff80); +data[198] = String.fromCharCode (0xffc0); +data[206] = String.fromCharCode (0xffc0); +data[214] = String.fromCharCode (0xffc0); +data[229] = String.fromCharCode (0x03ff); +data[237] = String.fromCharCode (0x03ff); +data[242] = String.fromCharCode (0x03ff); +data[4081] = String.fromCharCode (0x03ff); +data[4099] = String.fromCharCode (0x03ff); +}); +c$.math_f = Clazz.defineMethod (c$, "math_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.math = new com.stevesoft.pat.Bits (data); +data[2] = String.fromCharCode (0x0800); +data[3] = String.fromCharCode (0x7000); +data[7] = String.fromCharCode (0x5000); +data[10] = String.fromCharCode (0x1000); +data[11] = String.fromCharCode (0x0002); +data[13] = String.fromCharCode (0x0080); +data[15] = String.fromCharCode (0x0080); +data[516] = String.fromCharCode (0x0010); +data[519] = String.fromCharCode (0x1c00); +data[520] = String.fromCharCode (0x1c00); +data[537] = String.fromCharCode (0x001f); +data[541] = String.fromCharCode (0x0014); +data[544] = String.fromCharCode (0xffff); +data[545] = String.fromCharCode (0xffff); +data[546] = String.fromCharCode (0xffff); +data[547] = String.fromCharCode (0xffff); +data[548] = String.fromCharCode (0xffff); +data[549] = String.fromCharCode (0xffff); +data[550] = String.fromCharCode (0xffff); +data[551] = String.fromCharCode (0xffff); +data[552] = String.fromCharCode (0xffff); +data[553] = String.fromCharCode (0xffff); +data[554] = String.fromCharCode (0xffff); +data[555] = String.fromCharCode (0xffff); +data[556] = String.fromCharCode (0xffff); +data[557] = String.fromCharCode (0xffff); +data[558] = String.fromCharCode (0xffff); +data[559] = String.fromCharCode (0x0003); +data[560] = String.fromCharCode (0x0f00); +data[562] = String.fromCharCode (0x0003); +data[4018] = String.fromCharCode (0x0200); +data[4070] = 't'; +data[4080] = String.fromCharCode (0x0800); +data[4081] = String.fromCharCode (0x7000); +data[4085] = String.fromCharCode (0x5000); +data[4094] = String.fromCharCode (0x1f04); +data[4098] = String.fromCharCode (0x0800); +data[4099] = String.fromCharCode (0x7000); +data[4103] = String.fromCharCode (0x5000); +data[4106] = String.fromCharCode (0x1000); +data[4107] = String.fromCharCode (0x0002); +data[4109] = String.fromCharCode (0x0080); +data[4111] = String.fromCharCode (0x0080); +}); +c$.letter_f = Clazz.defineMethod (c$, "letter_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.letter = new com.stevesoft.pat.Bits (data); +data[4] = String.fromCharCode (0xfffe); +data[5] = String.fromCharCode (0x07ff); +data[6] = String.fromCharCode (0xfffe); +data[7] = String.fromCharCode (0x07ff); +data[10] = String.fromCharCode (0x0400); +data[11] = String.fromCharCode (0x0420); +data[12] = String.fromCharCode (0xffff); +data[13] = String.fromCharCode (0xff7f); +data[14] = String.fromCharCode (0xffff); +data[15] = String.fromCharCode (0xff7f); +data[16] = String.fromCharCode (0xffff); +data[17] = String.fromCharCode (0xffff); +data[18] = String.fromCharCode (0xffff); +data[19] = String.fromCharCode (0xffff); +data[20] = String.fromCharCode (0xffff); +data[21] = String.fromCharCode (0xffff); +data[22] = String.fromCharCode (0xffff); +data[23] = String.fromCharCode (0xffff); +data[24] = String.fromCharCode (0xffff); +data[25] = String.fromCharCode (0xffff); +data[26] = String.fromCharCode (0xffff); +data[27] = String.fromCharCode (0xffff); +data[28] = String.fromCharCode (0xffff); +data[29] = String.fromCharCode (0xffff); +data[30] = String.fromCharCode (0xffff); +data[31] = String.fromCharCode (0xfc3f); +data[32] = String.fromCharCode (0xffff); +data[33] = String.fromCharCode (0x00ff); +data[37] = String.fromCharCode (0xffff); +data[38] = String.fromCharCode (0xffff); +data[39] = String.fromCharCode (0xffff); +data[40] = String.fromCharCode (0xffff); +data[41] = String.fromCharCode (0xffff); +data[42] = String.fromCharCode (0x01ff); +data[43] = String.fromCharCode (0xf9ff); +data[44] = String.fromCharCode (0x0003); +data[45] = String.fromCharCode (0x0003); +data[46] = String.fromCharCode (0x001f); +data[55] = String.fromCharCode (0x0400); +data[56] = String.fromCharCode (0xd740); +data[57] = String.fromCharCode (0xffff); +data[58] = String.fromCharCode (0xfffb); +data[59] = String.fromCharCode (0xffff); +data[60] = String.fromCharCode (0x7fff); +data[61] = String.fromCharCode (0x547f); +data[62] = String.fromCharCode (0xfffd); +data[63] = String.fromCharCode (0x000f); +data[64] = String.fromCharCode (0xdffe); +data[65] = String.fromCharCode (0xffff); +data[66] = String.fromCharCode (0xffff); +data[67] = String.fromCharCode (0xffff); +data[68] = String.fromCharCode (0xffff); +data[69] = String.fromCharCode (0xdffe); +data[70] = String.fromCharCode (0xffff); +data[71] = String.fromCharCode (0xffff); +data[72] = String.fromCharCode (0x0003); +data[73] = String.fromCharCode (0xffff); +data[74] = String.fromCharCode (0xffff); +data[75] = String.fromCharCode (0xffff); +data[76] = String.fromCharCode (0x199f); +data[77] = String.fromCharCode (0xffff); +data[78] = String.fromCharCode (0xcfff); +data[79] = String.fromCharCode (0x033f); +data[83] = String.fromCharCode (0xfffe); +data[84] = String.fromCharCode (0xffff); +data[85] = String.fromCharCode (0x027f); +data[86] = String.fromCharCode (0xfffe); +data[87] = String.fromCharCode (0xffff); +data[88] = String.fromCharCode (0x00ff); +data[93] = String.fromCharCode (0xffff); +data[94] = String.fromCharCode (0x07ff); +data[95] = String.fromCharCode (0x0007); +data[98] = String.fromCharCode (0xfffe); +data[99] = String.fromCharCode (0x07ff); +data[100] = String.fromCharCode (0x07ff); +data[103] = String.fromCharCode (0xfffe); +data[104] = String.fromCharCode (0xffff); +data[105] = String.fromCharCode (0xffff); +data[106] = String.fromCharCode (0xffff); +data[107] = String.fromCharCode (0x7cff); +data[108] = String.fromCharCode (0x7fff); +data[109] = String.fromCharCode (0x002f); +data[110] = String.fromCharCode (0x0060); +data[144] = String.fromCharCode (0xffe0); +data[145] = String.fromCharCode (0xffff); +data[146] = String.fromCharCode (0xffff); +data[147] = String.fromCharCode (0x23ff); +data[149] = String.fromCharCode (0xff00); +data[150] = String.fromCharCode (0x0003); +data[152] = String.fromCharCode (0x9fe0); +data[153] = String.fromCharCode (0xfff9); +data[154] = String.fromCharCode (0xfdff); +data[155] = String.fromCharCode (0x03c5); +data[157] = String.fromCharCode (0xb000); +data[158] = String.fromCharCode (0x0003); +data[159] = String.fromCharCode (0x0003); +data[160] = String.fromCharCode (0x87e0); +data[161] = String.fromCharCode (0xfff9); +data[162] = String.fromCharCode (0xfdff); +data[163] = String.fromCharCode (0x036d); +data[165] = String.fromCharCode (0x5e00); +data[167] = String.fromCharCode (0x001c); +data[168] = String.fromCharCode (0xafe0); +data[169] = String.fromCharCode (0xfffb); +data[170] = String.fromCharCode (0xfdff); +data[171] = String.fromCharCode (0x23ed); +data[174] = String.fromCharCode (0x0001); +data[176] = String.fromCharCode (0x9fe0); +data[177] = String.fromCharCode (0xfff9); +data[178] = String.fromCharCode (0xfdff); +data[179] = String.fromCharCode (0x23cd); +data[181] = String.fromCharCode (0xb000); +data[182] = String.fromCharCode (0x0003); +data[184] = String.fromCharCode (0xc7e0); +data[185] = String.fromCharCode (0xd63d); +data[186] = String.fromCharCode (0xc718); +data[187] = String.fromCharCode (0x03bf); +data[192] = String.fromCharCode (0xdfe0); +data[193] = String.fromCharCode (0xfffd); +data[194] = String.fromCharCode (0xfdff); +data[195] = String.fromCharCode (0x03ef); +data[198] = String.fromCharCode (0x0003); +data[200] = String.fromCharCode (0xdfe0); +data[201] = String.fromCharCode (0xfffd); +data[202] = String.fromCharCode (0xfdff); +data[203] = String.fromCharCode (0x03ef); +data[205] = String.fromCharCode (0x4000); +data[206] = String.fromCharCode (0x0003); +data[208] = String.fromCharCode (0xdfe0); +data[209] = String.fromCharCode (0xfffd); +data[210] = String.fromCharCode (0xfdff); +data[211] = String.fromCharCode (0x03ff); +data[214] = String.fromCharCode (0x0003); +data[224] = String.fromCharCode (0xfffe); +data[225] = String.fromCharCode (0xffff); +data[226] = String.fromCharCode (0x7fff); +data[227] = String.fromCharCode (0x000d); +data[228] = String.fromCharCode (0x007f); +data[232] = String.fromCharCode (0x2596); +data[233] = String.fromCharCode (0xfef0); +data[234] = String.fromCharCode (0x6cae); +data[235] = String.fromCharCode (0x200d); +data[236] = String.fromCharCode (0x005f); +data[237] = String.fromCharCode (0x3000); +data[244] = String.fromCharCode (0xfeff); +data[245] = String.fromCharCode (0xffff); +data[246] = String.fromCharCode (0x03ff); +data[266] = String.fromCharCode (0xffff); +data[267] = String.fromCharCode (0xffff); +data[268] = String.fromCharCode (0x003f); +data[269] = String.fromCharCode (0xffff); +data[270] = String.fromCharCode (0xffff); +data[271] = String.fromCharCode (0x007f); +data[272] = String.fromCharCode (0xffff); +data[273] = String.fromCharCode (0xffff); +data[274] = String.fromCharCode (0xffff); +data[275] = String.fromCharCode (0xffff); +data[276] = String.fromCharCode (0xffff); +data[277] = String.fromCharCode (0x83ff); +data[278] = String.fromCharCode (0xffff); +data[279] = String.fromCharCode (0xffff); +data[280] = String.fromCharCode (0xffff); +data[281] = String.fromCharCode (0xffff); +data[282] = String.fromCharCode (0xff07); +data[283] = String.fromCharCode (0xffff); +data[284] = String.fromCharCode (0xffff); +data[285] = String.fromCharCode (0xffff); +data[286] = String.fromCharCode (0xffff); +data[287] = String.fromCharCode (0x03ff); +data[480] = String.fromCharCode (0xffff); +data[481] = String.fromCharCode (0xffff); +data[482] = String.fromCharCode (0xffff); +data[483] = String.fromCharCode (0xffff); +data[484] = String.fromCharCode (0xffff); +data[485] = String.fromCharCode (0xffff); +data[486] = String.fromCharCode (0xffff); +data[487] = String.fromCharCode (0xffff); +data[488] = String.fromCharCode (0xffff); +data[489] = String.fromCharCode (0x0fff); +data[490] = String.fromCharCode (0xffff); +data[491] = String.fromCharCode (0xffff); +data[492] = String.fromCharCode (0xffff); +data[493] = String.fromCharCode (0xffff); +data[494] = String.fromCharCode (0xffff); +data[495] = String.fromCharCode (0x03ff); +data[496] = String.fromCharCode (0xffff); +data[497] = String.fromCharCode (0x3f3f); +data[498] = String.fromCharCode (0xffff); +data[499] = String.fromCharCode (0xffff); +data[500] = String.fromCharCode (0x3f3f); +data[501] = String.fromCharCode (0xaaff); +data[502] = String.fromCharCode (0xffff); +data[503] = String.fromCharCode (0x3fff); +data[504] = String.fromCharCode (0xffff); +data[505] = String.fromCharCode (0xffff); +data[506] = String.fromCharCode (0xffff); +data[507] = String.fromCharCode (0x5fdf); +data[508] = String.fromCharCode (0x1fdc); +data[509] = String.fromCharCode (0x0fcf); +data[510] = String.fromCharCode (0x1fff); +data[511] = String.fromCharCode (0x1fdc); +data[519] = String.fromCharCode (0x8000); +data[528] = String.fromCharCode (0xfc84); +data[529] = String.fromCharCode (0x3f2f); +data[530] = String.fromCharCode (0xfd50); +data[531] = String.fromCharCode (0x01fb); +data[768] = String.fromCharCode (0x0020); +data[771] = String.fromCharCode (0x003e); +data[772] = String.fromCharCode (0xfffe); +data[773] = String.fromCharCode (0xffff); +data[774] = String.fromCharCode (0xffff); +data[775] = String.fromCharCode (0xffff); +data[776] = String.fromCharCode (0xffff); +data[777] = String.fromCharCode (0x781f); +data[778] = String.fromCharCode (0xfffe); +data[779] = String.fromCharCode (0xffff); +data[780] = String.fromCharCode (0xffff); +data[781] = String.fromCharCode (0xffff); +data[782] = String.fromCharCode (0xffff); +data[783] = String.fromCharCode (0x77ff); +data[784] = String.fromCharCode (0xffe0); +data[785] = String.fromCharCode (0xffff); +data[786] = String.fromCharCode (0x1fff); +data[787] = String.fromCharCode (0xfffe); +data[788] = String.fromCharCode (0xffff); +data[789] = String.fromCharCode (0xffff); +data[790] = String.fromCharCode (0xffff); +data[791] = String.fromCharCode (0xffff); +data[792] = String.fromCharCode (0x7fff); +data[1248] = String.fromCharCode (0xffff); +data[1249] = String.fromCharCode (0xffff); +data[1250] = String.fromCharCode (0xffff); +data[1251] = String.fromCharCode (0xffff); +data[1252] = String.fromCharCode (0xffff); +data[1253] = String.fromCharCode (0xffff); +data[1254] = String.fromCharCode (0xffff); +data[1255] = String.fromCharCode (0xffff); +data[1256] = String.fromCharCode (0xffff); +data[1257] = String.fromCharCode (0xffff); +data[1258] = String.fromCharCode (0xffff); +data[1259] = String.fromCharCode (0xffff); +data[1260] = String.fromCharCode (0xffff); +data[1261] = String.fromCharCode (0xffff); +data[1262] = String.fromCharCode (0xffff); +data[1263] = String.fromCharCode (0xffff); +data[1264] = String.fromCharCode (0xffff); +data[1265] = String.fromCharCode (0xffff); +data[1266] = String.fromCharCode (0xffff); +data[1267] = String.fromCharCode (0xffff); +data[1268] = String.fromCharCode (0xffff); +data[1269] = String.fromCharCode (0xffff); +data[1270] = String.fromCharCode (0xffff); +data[1271] = String.fromCharCode (0xffff); +data[1272] = String.fromCharCode (0xffff); +data[1273] = String.fromCharCode (0xffff); +data[1274] = String.fromCharCode (0xffff); +data[1275] = String.fromCharCode (0xffff); +data[1276] = String.fromCharCode (0xffff); +data[1277] = String.fromCharCode (0xffff); +data[1278] = String.fromCharCode (0xffff); +data[1279] = String.fromCharCode (0xffff); +data[1280] = String.fromCharCode (0xffff); +data[1281] = String.fromCharCode (0xffff); +data[1282] = String.fromCharCode (0xffff); +data[1283] = String.fromCharCode (0xffff); +data[1284] = String.fromCharCode (0xffff); +data[1285] = String.fromCharCode (0xffff); +data[1286] = String.fromCharCode (0xffff); +data[1287] = String.fromCharCode (0xffff); +data[1288] = String.fromCharCode (0xffff); +data[1289] = String.fromCharCode (0xffff); +data[1290] = String.fromCharCode (0xffff); +data[1291] = String.fromCharCode (0xffff); +data[1292] = String.fromCharCode (0xffff); +data[1293] = String.fromCharCode (0xffff); +data[1294] = String.fromCharCode (0xffff); +data[1295] = String.fromCharCode (0xffff); +data[1296] = String.fromCharCode (0xffff); +data[1297] = String.fromCharCode (0xffff); +data[1298] = String.fromCharCode (0xffff); +data[1299] = String.fromCharCode (0xffff); +data[1300] = String.fromCharCode (0xffff); +data[1301] = String.fromCharCode (0xffff); +data[1302] = String.fromCharCode (0xffff); +data[1303] = String.fromCharCode (0xffff); +data[1304] = String.fromCharCode (0xffff); +data[1305] = String.fromCharCode (0xffff); +data[1306] = String.fromCharCode (0xffff); +data[1307] = String.fromCharCode (0xffff); +data[1308] = String.fromCharCode (0xffff); +data[1309] = String.fromCharCode (0xffff); +data[1310] = String.fromCharCode (0xffff); +data[1311] = String.fromCharCode (0xffff); +data[1312] = String.fromCharCode (0xffff); +data[1313] = String.fromCharCode (0xffff); +data[1314] = String.fromCharCode (0xffff); +data[1315] = String.fromCharCode (0xffff); +data[1316] = String.fromCharCode (0xffff); +data[1317] = String.fromCharCode (0xffff); +data[1318] = String.fromCharCode (0xffff); +data[1319] = String.fromCharCode (0xffff); +data[1320] = String.fromCharCode (0xffff); +data[1321] = String.fromCharCode (0xffff); +data[1322] = String.fromCharCode (0xffff); +data[1323] = String.fromCharCode (0xffff); +data[1324] = String.fromCharCode (0xffff); +data[1325] = String.fromCharCode (0xffff); +data[1326] = String.fromCharCode (0xffff); +data[1327] = String.fromCharCode (0xffff); +data[1328] = String.fromCharCode (0xffff); +data[1329] = String.fromCharCode (0xffff); +data[1330] = String.fromCharCode (0xffff); +data[1331] = String.fromCharCode (0xffff); +data[1332] = String.fromCharCode (0xffff); +data[1333] = String.fromCharCode (0xffff); +data[1334] = String.fromCharCode (0xffff); +data[1335] = String.fromCharCode (0xffff); +data[1336] = String.fromCharCode (0xffff); +data[1337] = String.fromCharCode (0xffff); +data[1338] = String.fromCharCode (0xffff); +data[1339] = String.fromCharCode (0xffff); +data[1340] = String.fromCharCode (0xffff); +data[1341] = String.fromCharCode (0xffff); +data[1342] = String.fromCharCode (0xffff); +data[1343] = String.fromCharCode (0xffff); +data[1344] = String.fromCharCode (0xffff); +data[1345] = String.fromCharCode (0xffff); +data[1346] = String.fromCharCode (0xffff); +data[1347] = String.fromCharCode (0xffff); +data[1348] = String.fromCharCode (0xffff); +data[1349] = String.fromCharCode (0xffff); +data[1350] = String.fromCharCode (0xffff); +data[1351] = String.fromCharCode (0xffff); +data[1352] = String.fromCharCode (0xffff); +data[1353] = String.fromCharCode (0xffff); +data[1354] = String.fromCharCode (0xffff); +data[1355] = String.fromCharCode (0xffff); +data[1356] = String.fromCharCode (0xffff); +data[1357] = String.fromCharCode (0xffff); +data[1358] = String.fromCharCode (0xffff); +data[1359] = String.fromCharCode (0xffff); +data[1360] = String.fromCharCode (0xffff); +data[1361] = String.fromCharCode (0xffff); +data[1362] = String.fromCharCode (0xffff); +data[1363] = String.fromCharCode (0xffff); +data[1364] = String.fromCharCode (0xffff); +data[1365] = String.fromCharCode (0xffff); +data[1366] = String.fromCharCode (0xffff); +data[1367] = String.fromCharCode (0xffff); +data[1368] = String.fromCharCode (0xffff); +data[1369] = String.fromCharCode (0xffff); +data[1370] = String.fromCharCode (0xffff); +data[1371] = String.fromCharCode (0xffff); +data[1372] = String.fromCharCode (0xffff); +data[1373] = String.fromCharCode (0xffff); +data[1374] = String.fromCharCode (0xffff); +data[1375] = String.fromCharCode (0xffff); +data[1376] = String.fromCharCode (0xffff); +data[1377] = String.fromCharCode (0xffff); +data[1378] = String.fromCharCode (0xffff); +data[1379] = String.fromCharCode (0xffff); +data[1380] = String.fromCharCode (0xffff); +data[1381] = String.fromCharCode (0xffff); +data[1382] = String.fromCharCode (0xffff); +data[1383] = String.fromCharCode (0xffff); +data[1384] = String.fromCharCode (0xffff); +data[1385] = String.fromCharCode (0xffff); +data[1386] = String.fromCharCode (0xffff); +data[1387] = String.fromCharCode (0xffff); +data[1388] = String.fromCharCode (0xffff); +data[1389] = String.fromCharCode (0xffff); +data[1390] = String.fromCharCode (0xffff); +data[1391] = String.fromCharCode (0xffff); +data[1392] = String.fromCharCode (0xffff); +data[1393] = String.fromCharCode (0xffff); +data[1394] = String.fromCharCode (0xffff); +data[1395] = String.fromCharCode (0xffff); +data[1396] = String.fromCharCode (0xffff); +data[1397] = String.fromCharCode (0xffff); +data[1398] = String.fromCharCode (0xffff); +data[1399] = String.fromCharCode (0xffff); +data[1400] = String.fromCharCode (0xffff); +data[1401] = String.fromCharCode (0xffff); +data[1402] = String.fromCharCode (0xffff); +data[1403] = String.fromCharCode (0xffff); +data[1404] = String.fromCharCode (0xffff); +data[1405] = String.fromCharCode (0xffff); +data[1406] = String.fromCharCode (0xffff); +data[1407] = String.fromCharCode (0xffff); +data[1408] = String.fromCharCode (0xffff); +data[1409] = String.fromCharCode (0xffff); +data[1410] = String.fromCharCode (0xffff); +data[1411] = String.fromCharCode (0xffff); +data[1412] = String.fromCharCode (0xffff); +data[1413] = String.fromCharCode (0xffff); +data[1414] = String.fromCharCode (0xffff); +data[1415] = String.fromCharCode (0xffff); +data[1416] = String.fromCharCode (0xffff); +data[1417] = String.fromCharCode (0xffff); +data[1418] = String.fromCharCode (0xffff); +data[1419] = String.fromCharCode (0xffff); +data[1420] = String.fromCharCode (0xffff); +data[1421] = String.fromCharCode (0xffff); +data[1422] = String.fromCharCode (0xffff); +data[1423] = String.fromCharCode (0xffff); +data[1424] = String.fromCharCode (0xffff); +data[1425] = String.fromCharCode (0xffff); +data[1426] = String.fromCharCode (0xffff); +data[1427] = String.fromCharCode (0xffff); +data[1428] = String.fromCharCode (0xffff); +data[1429] = String.fromCharCode (0xffff); +data[1430] = String.fromCharCode (0xffff); +data[1431] = String.fromCharCode (0xffff); +data[1432] = String.fromCharCode (0xffff); +data[1433] = String.fromCharCode (0xffff); +data[1434] = String.fromCharCode (0xffff); +data[1435] = String.fromCharCode (0xffff); +data[1436] = String.fromCharCode (0xffff); +data[1437] = String.fromCharCode (0xffff); +data[1438] = String.fromCharCode (0xffff); +data[1439] = String.fromCharCode (0xffff); +data[1440] = String.fromCharCode (0xffff); +data[1441] = String.fromCharCode (0xffff); +data[1442] = String.fromCharCode (0xffff); +data[1443] = String.fromCharCode (0xffff); +data[1444] = String.fromCharCode (0xffff); +data[1445] = String.fromCharCode (0xffff); +data[1446] = String.fromCharCode (0xffff); +data[1447] = String.fromCharCode (0xffff); +data[1448] = String.fromCharCode (0xffff); +data[1449] = String.fromCharCode (0xffff); +data[1450] = String.fromCharCode (0xffff); +data[1451] = String.fromCharCode (0xffff); +data[1452] = String.fromCharCode (0xffff); +data[1453] = String.fromCharCode (0xffff); +data[1454] = String.fromCharCode (0xffff); +data[1455] = String.fromCharCode (0xffff); +data[1456] = String.fromCharCode (0xffff); +data[1457] = String.fromCharCode (0xffff); +data[1458] = String.fromCharCode (0xffff); +data[1459] = String.fromCharCode (0xffff); +data[1460] = String.fromCharCode (0xffff); +data[1461] = String.fromCharCode (0xffff); +data[1462] = String.fromCharCode (0xffff); +data[1463] = String.fromCharCode (0xffff); +data[1464] = String.fromCharCode (0xffff); +data[1465] = String.fromCharCode (0xffff); +data[1466] = String.fromCharCode (0xffff); +data[1467] = String.fromCharCode (0xffff); +data[1468] = String.fromCharCode (0xffff); +data[1469] = String.fromCharCode (0xffff); +data[1470] = String.fromCharCode (0xffff); +data[1471] = String.fromCharCode (0xffff); +data[1472] = String.fromCharCode (0xffff); +data[1473] = String.fromCharCode (0xffff); +data[1474] = String.fromCharCode (0xffff); +data[1475] = String.fromCharCode (0xffff); +data[1476] = String.fromCharCode (0xffff); +data[1477] = String.fromCharCode (0xffff); +data[1478] = String.fromCharCode (0xffff); +data[1479] = String.fromCharCode (0xffff); +data[1480] = String.fromCharCode (0xffff); +data[1481] = String.fromCharCode (0xffff); +data[1482] = String.fromCharCode (0xffff); +data[1483] = String.fromCharCode (0xffff); +data[1484] = String.fromCharCode (0xffff); +data[1485] = String.fromCharCode (0xffff); +data[1486] = String.fromCharCode (0xffff); +data[1487] = String.fromCharCode (0xffff); +data[1488] = String.fromCharCode (0xffff); +data[1489] = String.fromCharCode (0xffff); +data[1490] = String.fromCharCode (0xffff); +data[1491] = String.fromCharCode (0xffff); +data[1492] = String.fromCharCode (0xffff); +data[1493] = String.fromCharCode (0xffff); +data[1494] = String.fromCharCode (0xffff); +data[1495] = String.fromCharCode (0xffff); +data[1496] = String.fromCharCode (0xffff); +data[1497] = String.fromCharCode (0xffff); +data[1498] = String.fromCharCode (0xffff); +data[1499] = String.fromCharCode (0xffff); +data[1500] = String.fromCharCode (0xffff); +data[1501] = String.fromCharCode (0xffff); +data[1502] = String.fromCharCode (0xffff); +data[1503] = String.fromCharCode (0xffff); +data[1504] = String.fromCharCode (0xffff); +data[1505] = String.fromCharCode (0xffff); +data[1506] = String.fromCharCode (0xffff); +data[1507] = String.fromCharCode (0xffff); +data[1508] = String.fromCharCode (0xffff); +data[1509] = String.fromCharCode (0xffff); +data[1510] = String.fromCharCode (0xffff); +data[1511] = String.fromCharCode (0xffff); +data[1512] = String.fromCharCode (0xffff); +data[1513] = String.fromCharCode (0xffff); +data[1514] = String.fromCharCode (0xffff); +data[1515] = String.fromCharCode (0xffff); +data[1516] = String.fromCharCode (0xffff); +data[1517] = String.fromCharCode (0xffff); +data[1518] = String.fromCharCode (0xffff); +data[1519] = String.fromCharCode (0xffff); +data[1520] = String.fromCharCode (0xffff); +data[1521] = String.fromCharCode (0xffff); +data[1522] = String.fromCharCode (0xffff); +data[1523] = String.fromCharCode (0xffff); +data[1524] = String.fromCharCode (0xffff); +data[1525] = String.fromCharCode (0xffff); +data[1526] = String.fromCharCode (0xffff); +data[1527] = String.fromCharCode (0xffff); +data[1528] = String.fromCharCode (0xffff); +data[1529] = String.fromCharCode (0xffff); +data[1530] = String.fromCharCode (0xffff); +data[1531] = String.fromCharCode (0xffff); +data[1532] = String.fromCharCode (0xffff); +data[1533] = String.fromCharCode (0xffff); +data[1534] = String.fromCharCode (0xffff); +data[1535] = String.fromCharCode (0xffff); +data[1536] = String.fromCharCode (0xffff); +data[1537] = String.fromCharCode (0xffff); +data[1538] = String.fromCharCode (0xffff); +data[1539] = String.fromCharCode (0xffff); +data[1540] = String.fromCharCode (0xffff); +data[1541] = String.fromCharCode (0xffff); +data[1542] = String.fromCharCode (0xffff); +data[1543] = String.fromCharCode (0xffff); +data[1544] = String.fromCharCode (0xffff); +data[1545] = String.fromCharCode (0xffff); +data[1546] = String.fromCharCode (0xffff); +data[1547] = String.fromCharCode (0xffff); +data[1548] = String.fromCharCode (0xffff); +data[1549] = String.fromCharCode (0xffff); +data[1550] = String.fromCharCode (0xffff); +data[1551] = String.fromCharCode (0xffff); +data[1552] = String.fromCharCode (0xffff); +data[1553] = String.fromCharCode (0xffff); +data[1554] = String.fromCharCode (0xffff); +data[1555] = String.fromCharCode (0xffff); +data[1556] = String.fromCharCode (0xffff); +data[1557] = String.fromCharCode (0xffff); +data[1558] = String.fromCharCode (0xffff); +data[1559] = String.fromCharCode (0xffff); +data[1560] = String.fromCharCode (0xffff); +data[1561] = String.fromCharCode (0xffff); +data[1562] = String.fromCharCode (0xffff); +data[1563] = String.fromCharCode (0xffff); +data[1564] = String.fromCharCode (0xffff); +data[1565] = String.fromCharCode (0xffff); +data[1566] = String.fromCharCode (0xffff); +data[1567] = String.fromCharCode (0xffff); +data[1568] = String.fromCharCode (0xffff); +data[1569] = String.fromCharCode (0xffff); +data[1570] = String.fromCharCode (0xffff); +data[1571] = String.fromCharCode (0xffff); +data[1572] = String.fromCharCode (0xffff); +data[1573] = String.fromCharCode (0xffff); +data[1574] = String.fromCharCode (0xffff); +data[1575] = String.fromCharCode (0xffff); +data[1576] = String.fromCharCode (0xffff); +data[1577] = String.fromCharCode (0xffff); +data[1578] = String.fromCharCode (0xffff); +data[1579] = String.fromCharCode (0xffff); +data[1580] = String.fromCharCode (0xffff); +data[1581] = String.fromCharCode (0xffff); +data[1582] = String.fromCharCode (0xffff); +data[1583] = String.fromCharCode (0xffff); +data[1584] = String.fromCharCode (0xffff); +data[1585] = String.fromCharCode (0xffff); +data[1586] = String.fromCharCode (0xffff); +data[1587] = String.fromCharCode (0xffff); +data[1588] = String.fromCharCode (0xffff); +data[1589] = String.fromCharCode (0xffff); +data[1590] = String.fromCharCode (0xffff); +data[1591] = String.fromCharCode (0xffff); +data[1592] = String.fromCharCode (0xffff); +data[1593] = String.fromCharCode (0xffff); +data[1594] = String.fromCharCode (0xffff); +data[1595] = String.fromCharCode (0xffff); +data[1596] = String.fromCharCode (0xffff); +data[1597] = String.fromCharCode (0xffff); +data[1598] = String.fromCharCode (0xffff); +data[1599] = String.fromCharCode (0xffff); +data[1600] = String.fromCharCode (0xffff); +data[1601] = String.fromCharCode (0xffff); +data[1602] = String.fromCharCode (0xffff); +data[1603] = String.fromCharCode (0xffff); +data[1604] = String.fromCharCode (0xffff); +data[1605] = String.fromCharCode (0xffff); +data[1606] = String.fromCharCode (0xffff); +data[1607] = String.fromCharCode (0xffff); +data[1608] = String.fromCharCode (0xffff); +data[1609] = String.fromCharCode (0xffff); +data[1610] = String.fromCharCode (0xffff); +data[1611] = String.fromCharCode (0xffff); +data[1612] = String.fromCharCode (0xffff); +data[1613] = String.fromCharCode (0xffff); +data[1614] = String.fromCharCode (0xffff); +data[1615] = String.fromCharCode (0xffff); +data[1616] = String.fromCharCode (0xffff); +data[1617] = String.fromCharCode (0xffff); +data[1618] = String.fromCharCode (0xffff); +data[1619] = String.fromCharCode (0xffff); +data[1620] = String.fromCharCode (0xffff); +data[1621] = String.fromCharCode (0xffff); +data[1622] = String.fromCharCode (0xffff); +data[1623] = String.fromCharCode (0xffff); +data[1624] = String.fromCharCode (0xffff); +data[1625] = String.fromCharCode (0xffff); +data[1626] = String.fromCharCode (0xffff); +data[1627] = String.fromCharCode (0xffff); +data[1628] = String.fromCharCode (0xffff); +data[1629] = String.fromCharCode (0xffff); +data[1630] = String.fromCharCode (0xffff); +data[1631] = String.fromCharCode (0xffff); +data[1632] = String.fromCharCode (0xffff); +data[1633] = String.fromCharCode (0xffff); +data[1634] = String.fromCharCode (0xffff); +data[1635] = String.fromCharCode (0xffff); +data[1636] = String.fromCharCode (0xffff); +data[1637] = String.fromCharCode (0xffff); +data[1638] = String.fromCharCode (0xffff); +data[1639] = String.fromCharCode (0xffff); +data[1640] = String.fromCharCode (0xffff); +data[1641] = String.fromCharCode (0xffff); +data[1642] = String.fromCharCode (0xffff); +data[1643] = String.fromCharCode (0xffff); +data[1644] = String.fromCharCode (0xffff); +data[1645] = String.fromCharCode (0xffff); +data[1646] = String.fromCharCode (0xffff); +data[1647] = String.fromCharCode (0xffff); +data[1648] = String.fromCharCode (0xffff); +data[1649] = String.fromCharCode (0xffff); +data[1650] = String.fromCharCode (0xffff); +data[1651] = String.fromCharCode (0xffff); +data[1652] = String.fromCharCode (0xffff); +data[1653] = String.fromCharCode (0xffff); +data[1654] = String.fromCharCode (0xffff); +data[1655] = String.fromCharCode (0xffff); +data[1656] = String.fromCharCode (0xffff); +data[1657] = String.fromCharCode (0xffff); +data[1658] = String.fromCharCode (0xffff); +data[1659] = String.fromCharCode (0xffff); +data[1660] = String.fromCharCode (0xffff); +data[1661] = String.fromCharCode (0xffff); +data[1662] = String.fromCharCode (0xffff); +data[1663] = String.fromCharCode (0xffff); +data[1664] = String.fromCharCode (0xffff); +data[1665] = String.fromCharCode (0xffff); +data[1666] = String.fromCharCode (0xffff); +data[1667] = String.fromCharCode (0xffff); +data[1668] = String.fromCharCode (0xffff); +data[1669] = String.fromCharCode (0xffff); +data[1670] = String.fromCharCode (0xffff); +data[1671] = String.fromCharCode (0xffff); +data[1672] = String.fromCharCode (0xffff); +data[1673] = String.fromCharCode (0xffff); +data[1674] = String.fromCharCode (0xffff); +data[1675] = String.fromCharCode (0xffff); +data[1676] = String.fromCharCode (0xffff); +data[1677] = String.fromCharCode (0xffff); +data[1678] = String.fromCharCode (0xffff); +data[1679] = String.fromCharCode (0xffff); +data[1680] = String.fromCharCode (0xffff); +data[1681] = String.fromCharCode (0xffff); +data[1682] = String.fromCharCode (0xffff); +data[1683] = String.fromCharCode (0xffff); +data[1684] = String.fromCharCode (0xffff); +data[1685] = String.fromCharCode (0xffff); +data[1686] = String.fromCharCode (0xffff); +data[1687] = String.fromCharCode (0xffff); +data[1688] = String.fromCharCode (0xffff); +data[1689] = String.fromCharCode (0xffff); +data[1690] = String.fromCharCode (0xffff); +data[1691] = String.fromCharCode (0xffff); +data[1692] = String.fromCharCode (0xffff); +data[1693] = String.fromCharCode (0xffff); +data[1694] = String.fromCharCode (0xffff); +data[1695] = String.fromCharCode (0xffff); +data[1696] = String.fromCharCode (0xffff); +data[1697] = String.fromCharCode (0xffff); +data[1698] = String.fromCharCode (0xffff); +data[1699] = String.fromCharCode (0xffff); +data[1700] = String.fromCharCode (0xffff); +data[1701] = String.fromCharCode (0xffff); +data[1702] = String.fromCharCode (0xffff); +data[1703] = String.fromCharCode (0xffff); +data[1704] = String.fromCharCode (0xffff); +data[1705] = String.fromCharCode (0xffff); +data[1706] = String.fromCharCode (0xffff); +data[1707] = String.fromCharCode (0xffff); +data[1708] = String.fromCharCode (0xffff); +data[1709] = String.fromCharCode (0xffff); +data[1710] = String.fromCharCode (0xffff); +data[1711] = String.fromCharCode (0xffff); +data[1712] = String.fromCharCode (0xffff); +data[1713] = String.fromCharCode (0xffff); +data[1714] = String.fromCharCode (0xffff); +data[1715] = String.fromCharCode (0xffff); +data[1716] = String.fromCharCode (0xffff); +data[1717] = String.fromCharCode (0xffff); +data[1718] = String.fromCharCode (0xffff); +data[1719] = String.fromCharCode (0xffff); +data[1720] = String.fromCharCode (0xffff); +data[1721] = String.fromCharCode (0xffff); +data[1722] = String.fromCharCode (0xffff); +data[1723] = String.fromCharCode (0xffff); +data[1724] = String.fromCharCode (0xffff); +data[1725] = String.fromCharCode (0xffff); +data[1726] = String.fromCharCode (0xffff); +data[1727] = String.fromCharCode (0xffff); +data[1728] = String.fromCharCode (0xffff); +data[1729] = String.fromCharCode (0xffff); +data[1730] = String.fromCharCode (0xffff); +data[1731] = String.fromCharCode (0xffff); +data[1732] = String.fromCharCode (0xffff); +data[1733] = String.fromCharCode (0xffff); +data[1734] = String.fromCharCode (0xffff); +data[1735] = String.fromCharCode (0xffff); +data[1736] = String.fromCharCode (0xffff); +data[1737] = String.fromCharCode (0xffff); +data[1738] = String.fromCharCode (0xffff); +data[1739] = String.fromCharCode (0xffff); +data[1740] = String.fromCharCode (0xffff); +data[1741] = String.fromCharCode (0xffff); +data[1742] = String.fromCharCode (0xffff); +data[1743] = String.fromCharCode (0xffff); +data[1744] = String.fromCharCode (0xffff); +data[1745] = String.fromCharCode (0xffff); +data[1746] = String.fromCharCode (0xffff); +data[1747] = String.fromCharCode (0xffff); +data[1748] = String.fromCharCode (0xffff); +data[1749] = String.fromCharCode (0xffff); +data[1750] = String.fromCharCode (0xffff); +data[1751] = String.fromCharCode (0xffff); +data[1752] = String.fromCharCode (0xffff); +data[1753] = String.fromCharCode (0xffff); +data[1754] = String.fromCharCode (0xffff); +data[1755] = String.fromCharCode (0xffff); +data[1756] = String.fromCharCode (0xffff); +data[1757] = String.fromCharCode (0xffff); +data[1758] = String.fromCharCode (0xffff); +data[1759] = String.fromCharCode (0xffff); +data[1760] = String.fromCharCode (0xffff); +data[1761] = String.fromCharCode (0xffff); +data[1762] = String.fromCharCode (0xffff); +data[1763] = String.fromCharCode (0xffff); +data[1764] = String.fromCharCode (0xffff); +data[1765] = String.fromCharCode (0xffff); +data[1766] = String.fromCharCode (0xffff); +data[1767] = String.fromCharCode (0xffff); +data[1768] = String.fromCharCode (0xffff); +data[1769] = String.fromCharCode (0xffff); +data[1770] = String.fromCharCode (0xffff); +data[1771] = String.fromCharCode (0xffff); +data[1772] = String.fromCharCode (0xffff); +data[1773] = String.fromCharCode (0xffff); +data[1774] = String.fromCharCode (0xffff); +data[1775] = String.fromCharCode (0xffff); +data[1776] = String.fromCharCode (0xffff); +data[1777] = String.fromCharCode (0xffff); +data[1778] = String.fromCharCode (0xffff); +data[1779] = String.fromCharCode (0xffff); +data[1780] = String.fromCharCode (0xffff); +data[1781] = String.fromCharCode (0xffff); +data[1782] = String.fromCharCode (0xffff); +data[1783] = String.fromCharCode (0xffff); +data[1784] = String.fromCharCode (0xffff); +data[1785] = String.fromCharCode (0xffff); +data[1786] = String.fromCharCode (0xffff); +data[1787] = String.fromCharCode (0xffff); +data[1788] = String.fromCharCode (0xffff); +data[1789] = String.fromCharCode (0xffff); +data[1790] = String.fromCharCode (0xffff); +data[1791] = String.fromCharCode (0xffff); +data[1792] = String.fromCharCode (0xffff); +data[1793] = String.fromCharCode (0xffff); +data[1794] = String.fromCharCode (0xffff); +data[1795] = String.fromCharCode (0xffff); +data[1796] = String.fromCharCode (0xffff); +data[1797] = String.fromCharCode (0xffff); +data[1798] = String.fromCharCode (0xffff); +data[1799] = String.fromCharCode (0xffff); +data[1800] = String.fromCharCode (0xffff); +data[1801] = String.fromCharCode (0xffff); +data[1802] = String.fromCharCode (0xffff); +data[1803] = String.fromCharCode (0xffff); +data[1804] = String.fromCharCode (0xffff); +data[1805] = String.fromCharCode (0xffff); +data[1806] = String.fromCharCode (0xffff); +data[1807] = String.fromCharCode (0xffff); +data[1808] = String.fromCharCode (0xffff); +data[1809] = String.fromCharCode (0xffff); +data[1810] = String.fromCharCode (0xffff); +data[1811] = String.fromCharCode (0xffff); +data[1812] = String.fromCharCode (0xffff); +data[1813] = String.fromCharCode (0xffff); +data[1814] = String.fromCharCode (0xffff); +data[1815] = String.fromCharCode (0xffff); +data[1816] = String.fromCharCode (0xffff); +data[1817] = String.fromCharCode (0xffff); +data[1818] = String.fromCharCode (0xffff); +data[1819] = String.fromCharCode (0xffff); +data[1820] = String.fromCharCode (0xffff); +data[1821] = String.fromCharCode (0xffff); +data[1822] = String.fromCharCode (0xffff); +data[1823] = String.fromCharCode (0xffff); +data[1824] = String.fromCharCode (0xffff); +data[1825] = String.fromCharCode (0xffff); +data[1826] = String.fromCharCode (0xffff); +data[1827] = String.fromCharCode (0xffff); +data[1828] = String.fromCharCode (0xffff); +data[1829] = String.fromCharCode (0xffff); +data[1830] = String.fromCharCode (0xffff); +data[1831] = String.fromCharCode (0xffff); +data[1832] = String.fromCharCode (0xffff); +data[1833] = String.fromCharCode (0xffff); +data[1834] = String.fromCharCode (0xffff); +data[1835] = String.fromCharCode (0xffff); +data[1836] = String.fromCharCode (0xffff); +data[1837] = String.fromCharCode (0xffff); +data[1838] = String.fromCharCode (0xffff); +data[1839] = String.fromCharCode (0xffff); +data[1840] = String.fromCharCode (0xffff); +data[1841] = String.fromCharCode (0xffff); +data[1842] = String.fromCharCode (0xffff); +data[1843] = String.fromCharCode (0xffff); +data[1844] = String.fromCharCode (0xffff); +data[1845] = String.fromCharCode (0xffff); +data[1846] = String.fromCharCode (0xffff); +data[1847] = String.fromCharCode (0xffff); +data[1848] = String.fromCharCode (0xffff); +data[1849] = String.fromCharCode (0xffff); +data[1850] = String.fromCharCode (0xffff); +data[1851] = String.fromCharCode (0xffff); +data[1852] = String.fromCharCode (0xffff); +data[1853] = String.fromCharCode (0xffff); +data[1854] = String.fromCharCode (0xffff); +data[1855] = String.fromCharCode (0xffff); +data[1856] = String.fromCharCode (0xffff); +data[1857] = String.fromCharCode (0xffff); +data[1858] = String.fromCharCode (0xffff); +data[1859] = String.fromCharCode (0xffff); +data[1860] = String.fromCharCode (0xffff); +data[1861] = String.fromCharCode (0xffff); +data[1862] = String.fromCharCode (0xffff); +data[1863] = String.fromCharCode (0xffff); +data[1864] = String.fromCharCode (0xffff); +data[1865] = String.fromCharCode (0xffff); +data[1866] = String.fromCharCode (0xffff); +data[1867] = String.fromCharCode (0xffff); +data[1868] = String.fromCharCode (0xffff); +data[1869] = String.fromCharCode (0xffff); +data[1870] = String.fromCharCode (0xffff); +data[1871] = String.fromCharCode (0xffff); +data[1872] = String.fromCharCode (0xffff); +data[1873] = String.fromCharCode (0xffff); +data[1874] = String.fromCharCode (0xffff); +data[1875] = String.fromCharCode (0xffff); +data[1876] = String.fromCharCode (0xffff); +data[1877] = String.fromCharCode (0xffff); +data[1878] = String.fromCharCode (0xffff); +data[1879] = String.fromCharCode (0xffff); +data[1880] = String.fromCharCode (0xffff); +data[1881] = String.fromCharCode (0xffff); +data[1882] = String.fromCharCode (0xffff); +data[1883] = String.fromCharCode (0xffff); +data[1884] = String.fromCharCode (0xffff); +data[1885] = String.fromCharCode (0xffff); +data[1886] = String.fromCharCode (0xffff); +data[1887] = String.fromCharCode (0xffff); +data[1888] = String.fromCharCode (0xffff); +data[1889] = String.fromCharCode (0xffff); +data[1890] = String.fromCharCode (0xffff); +data[1891] = String.fromCharCode (0xffff); +data[1892] = String.fromCharCode (0xffff); +data[1893] = String.fromCharCode (0xffff); +data[1894] = String.fromCharCode (0xffff); +data[1895] = String.fromCharCode (0xffff); +data[1896] = String.fromCharCode (0xffff); +data[1897] = String.fromCharCode (0xffff); +data[1898] = String.fromCharCode (0xffff); +data[1899] = String.fromCharCode (0xffff); +data[1900] = String.fromCharCode (0xffff); +data[1901] = String.fromCharCode (0xffff); +data[1902] = String.fromCharCode (0xffff); +data[1903] = String.fromCharCode (0xffff); +data[1904] = String.fromCharCode (0xffff); +data[1905] = String.fromCharCode (0xffff); +data[1906] = String.fromCharCode (0xffff); +data[1907] = String.fromCharCode (0xffff); +data[1908] = String.fromCharCode (0xffff); +data[1909] = String.fromCharCode (0xffff); +data[1910] = String.fromCharCode (0xffff); +data[1911] = String.fromCharCode (0xffff); +data[1912] = String.fromCharCode (0xffff); +data[1913] = String.fromCharCode (0xffff); +data[1914] = String.fromCharCode (0xffff); +data[1915] = String.fromCharCode (0xffff); +data[1916] = String.fromCharCode (0xffff); +data[1917] = String.fromCharCode (0xffff); +data[1918] = String.fromCharCode (0xffff); +data[1919] = String.fromCharCode (0xffff); +data[1920] = String.fromCharCode (0xffff); +data[1921] = String.fromCharCode (0xffff); +data[1922] = String.fromCharCode (0xffff); +data[1923] = String.fromCharCode (0xffff); +data[1924] = String.fromCharCode (0xffff); +data[1925] = String.fromCharCode (0xffff); +data[1926] = String.fromCharCode (0xffff); +data[1927] = String.fromCharCode (0xffff); +data[1928] = String.fromCharCode (0xffff); +data[1929] = String.fromCharCode (0xffff); +data[1930] = String.fromCharCode (0xffff); +data[1931] = String.fromCharCode (0xffff); +data[1932] = String.fromCharCode (0xffff); +data[1933] = String.fromCharCode (0xffff); +data[1934] = String.fromCharCode (0xffff); +data[1935] = String.fromCharCode (0xffff); +data[1936] = String.fromCharCode (0xffff); +data[1937] = String.fromCharCode (0xffff); +data[1938] = String.fromCharCode (0xffff); +data[1939] = String.fromCharCode (0xffff); +data[1940] = String.fromCharCode (0xffff); +data[1941] = String.fromCharCode (0xffff); +data[1942] = String.fromCharCode (0xffff); +data[1943] = String.fromCharCode (0xffff); +data[1944] = String.fromCharCode (0xffff); +data[1945] = String.fromCharCode (0xffff); +data[1946] = String.fromCharCode (0xffff); +data[1947] = String.fromCharCode (0xffff); +data[1948] = String.fromCharCode (0xffff); +data[1949] = String.fromCharCode (0xffff); +data[1950] = String.fromCharCode (0xffff); +data[1951] = String.fromCharCode (0xffff); +data[1952] = String.fromCharCode (0xffff); +data[1953] = String.fromCharCode (0xffff); +data[1954] = String.fromCharCode (0xffff); +data[1955] = String.fromCharCode (0xffff); +data[1956] = String.fromCharCode (0xffff); +data[1957] = String.fromCharCode (0xffff); +data[1958] = String.fromCharCode (0xffff); +data[1959] = String.fromCharCode (0xffff); +data[1960] = String.fromCharCode (0xffff); +data[1961] = String.fromCharCode (0xffff); +data[1962] = String.fromCharCode (0xffff); +data[1963] = String.fromCharCode (0xffff); +data[1964] = String.fromCharCode (0xffff); +data[1965] = String.fromCharCode (0xffff); +data[1966] = String.fromCharCode (0xffff); +data[1967] = String.fromCharCode (0xffff); +data[1968] = String.fromCharCode (0xffff); +data[1969] = String.fromCharCode (0xffff); +data[1970] = String.fromCharCode (0xffff); +data[1971] = String.fromCharCode (0xffff); +data[1972] = String.fromCharCode (0xffff); +data[1973] = String.fromCharCode (0xffff); +data[1974] = String.fromCharCode (0xffff); +data[1975] = String.fromCharCode (0xffff); +data[1976] = String.fromCharCode (0xffff); +data[1977] = String.fromCharCode (0xffff); +data[1978] = String.fromCharCode (0xffff); +data[1979] = String.fromCharCode (0xffff); +data[1980] = String.fromCharCode (0xffff); +data[1981] = String.fromCharCode (0xffff); +data[1982] = String.fromCharCode (0xffff); +data[1983] = String.fromCharCode (0xffff); +data[1984] = String.fromCharCode (0xffff); +data[1985] = String.fromCharCode (0xffff); +data[1986] = String.fromCharCode (0xffff); +data[1987] = String.fromCharCode (0xffff); +data[1988] = String.fromCharCode (0xffff); +data[1989] = String.fromCharCode (0xffff); +data[1990] = String.fromCharCode (0xffff); +data[1991] = String.fromCharCode (0xffff); +data[1992] = String.fromCharCode (0xffff); +data[1993] = String.fromCharCode (0xffff); +data[1994] = String.fromCharCode (0xffff); +data[1995] = String.fromCharCode (0xffff); +data[1996] = String.fromCharCode (0xffff); +data[1997] = String.fromCharCode (0xffff); +data[1998] = String.fromCharCode (0xffff); +data[1999] = String.fromCharCode (0xffff); +data[2000] = String.fromCharCode (0xffff); +data[2001] = String.fromCharCode (0xffff); +data[2002] = String.fromCharCode (0xffff); +data[2003] = String.fromCharCode (0xffff); +data[2004] = String.fromCharCode (0xffff); +data[2005] = String.fromCharCode (0xffff); +data[2006] = String.fromCharCode (0xffff); +data[2007] = String.fromCharCode (0xffff); +data[2008] = String.fromCharCode (0xffff); +data[2009] = String.fromCharCode (0xffff); +data[2010] = String.fromCharCode (0xffff); +data[2011] = String.fromCharCode (0xffff); +data[2012] = String.fromCharCode (0xffff); +data[2013] = String.fromCharCode (0xffff); +data[2014] = String.fromCharCode (0xffff); +data[2015] = String.fromCharCode (0xffff); +data[2016] = String.fromCharCode (0xffff); +data[2017] = String.fromCharCode (0xffff); +data[2018] = String.fromCharCode (0xffff); +data[2019] = String.fromCharCode (0xffff); +data[2020] = String.fromCharCode (0xffff); +data[2021] = String.fromCharCode (0xffff); +data[2022] = String.fromCharCode (0xffff); +data[2023] = String.fromCharCode (0xffff); +data[2024] = String.fromCharCode (0xffff); +data[2025] = String.fromCharCode (0xffff); +data[2026] = String.fromCharCode (0xffff); +data[2027] = String.fromCharCode (0xffff); +data[2028] = String.fromCharCode (0xffff); +data[2029] = String.fromCharCode (0xffff); +data[2030] = String.fromCharCode (0xffff); +data[2031] = String.fromCharCode (0xffff); +data[2032] = String.fromCharCode (0xffff); +data[2033] = String.fromCharCode (0xffff); +data[2034] = String.fromCharCode (0xffff); +data[2035] = String.fromCharCode (0xffff); +data[2036] = String.fromCharCode (0xffff); +data[2037] = String.fromCharCode (0xffff); +data[2038] = String.fromCharCode (0xffff); +data[2039] = String.fromCharCode (0xffff); +data[2040] = String.fromCharCode (0xffff); +data[2041] = String.fromCharCode (0xffff); +data[2042] = String.fromCharCode (0xffff); +data[2043] = String.fromCharCode (0xffff); +data[2044] = String.fromCharCode (0xffff); +data[2045] = String.fromCharCode (0xffff); +data[2046] = String.fromCharCode (0xffff); +data[2047] = String.fromCharCode (0xffff); +data[2048] = String.fromCharCode (0xffff); +data[2049] = String.fromCharCode (0xffff); +data[2050] = String.fromCharCode (0xffff); +data[2051] = String.fromCharCode (0xffff); +data[2052] = String.fromCharCode (0xffff); +data[2053] = String.fromCharCode (0xffff); +data[2054] = String.fromCharCode (0xffff); +data[2055] = String.fromCharCode (0xffff); +data[2056] = String.fromCharCode (0xffff); +data[2057] = String.fromCharCode (0xffff); +data[2058] = String.fromCharCode (0xffff); +data[2059] = String.fromCharCode (0xffff); +data[2060] = String.fromCharCode (0xffff); +data[2061] = String.fromCharCode (0xffff); +data[2062] = String.fromCharCode (0xffff); +data[2063] = String.fromCharCode (0xffff); +data[2064] = String.fromCharCode (0xffff); +data[2065] = String.fromCharCode (0xffff); +data[2066] = String.fromCharCode (0xffff); +data[2067] = String.fromCharCode (0xffff); +data[2068] = String.fromCharCode (0xffff); +data[2069] = String.fromCharCode (0xffff); +data[2070] = String.fromCharCode (0xffff); +data[2071] = String.fromCharCode (0xffff); +data[2072] = String.fromCharCode (0xffff); +data[2073] = String.fromCharCode (0xffff); +data[2074] = String.fromCharCode (0xffff); +data[2075] = String.fromCharCode (0xffff); +data[2076] = String.fromCharCode (0xffff); +data[2077] = String.fromCharCode (0xffff); +data[2078] = String.fromCharCode (0xffff); +data[2079] = String.fromCharCode (0xffff); +data[2080] = String.fromCharCode (0xffff); +data[2081] = String.fromCharCode (0xffff); +data[2082] = String.fromCharCode (0xffff); +data[2083] = String.fromCharCode (0xffff); +data[2084] = String.fromCharCode (0xffff); +data[2085] = String.fromCharCode (0xffff); +data[2086] = String.fromCharCode (0xffff); +data[2087] = String.fromCharCode (0xffff); +data[2088] = String.fromCharCode (0xffff); +data[2089] = String.fromCharCode (0xffff); +data[2090] = String.fromCharCode (0xffff); +data[2091] = String.fromCharCode (0xffff); +data[2092] = String.fromCharCode (0xffff); +data[2093] = String.fromCharCode (0xffff); +data[2094] = String.fromCharCode (0xffff); +data[2095] = String.fromCharCode (0xffff); +data[2096] = String.fromCharCode (0xffff); +data[2097] = String.fromCharCode (0xffff); +data[2098] = String.fromCharCode (0xffff); +data[2099] = String.fromCharCode (0xffff); +data[2100] = String.fromCharCode (0xffff); +data[2101] = String.fromCharCode (0xffff); +data[2102] = String.fromCharCode (0xffff); +data[2103] = String.fromCharCode (0xffff); +data[2104] = String.fromCharCode (0xffff); +data[2105] = String.fromCharCode (0xffff); +data[2106] = String.fromCharCode (0xffff); +data[2107] = String.fromCharCode (0xffff); +data[2108] = String.fromCharCode (0xffff); +data[2109] = String.fromCharCode (0xffff); +data[2110] = String.fromCharCode (0xffff); +data[2111] = String.fromCharCode (0xffff); +data[2112] = String.fromCharCode (0xffff); +data[2113] = String.fromCharCode (0xffff); +data[2114] = String.fromCharCode (0xffff); +data[2115] = String.fromCharCode (0xffff); +data[2116] = String.fromCharCode (0xffff); +data[2117] = String.fromCharCode (0xffff); +data[2118] = String.fromCharCode (0xffff); +data[2119] = String.fromCharCode (0xffff); +data[2120] = String.fromCharCode (0xffff); +data[2121] = String.fromCharCode (0xffff); +data[2122] = String.fromCharCode (0xffff); +data[2123] = String.fromCharCode (0xffff); +data[2124] = String.fromCharCode (0xffff); +data[2125] = String.fromCharCode (0xffff); +data[2126] = String.fromCharCode (0xffff); +data[2127] = String.fromCharCode (0xffff); +data[2128] = String.fromCharCode (0xffff); +data[2129] = String.fromCharCode (0xffff); +data[2130] = String.fromCharCode (0xffff); +data[2131] = String.fromCharCode (0xffff); +data[2132] = String.fromCharCode (0xffff); +data[2133] = String.fromCharCode (0xffff); +data[2134] = String.fromCharCode (0xffff); +data[2135] = String.fromCharCode (0xffff); +data[2136] = String.fromCharCode (0xffff); +data[2137] = String.fromCharCode (0xffff); +data[2138] = String.fromCharCode (0xffff); +data[2139] = String.fromCharCode (0xffff); +data[2140] = String.fromCharCode (0xffff); +data[2141] = String.fromCharCode (0xffff); +data[2142] = String.fromCharCode (0xffff); +data[2143] = String.fromCharCode (0xffff); +data[2144] = String.fromCharCode (0xffff); +data[2145] = String.fromCharCode (0xffff); +data[2146] = String.fromCharCode (0xffff); +data[2147] = String.fromCharCode (0xffff); +data[2148] = String.fromCharCode (0xffff); +data[2149] = String.fromCharCode (0xffff); +data[2150] = String.fromCharCode (0xffff); +data[2151] = String.fromCharCode (0xffff); +data[2152] = String.fromCharCode (0xffff); +data[2153] = String.fromCharCode (0xffff); +data[2154] = String.fromCharCode (0xffff); +data[2155] = String.fromCharCode (0xffff); +data[2156] = String.fromCharCode (0xffff); +data[2157] = String.fromCharCode (0xffff); +data[2158] = String.fromCharCode (0xffff); +data[2159] = String.fromCharCode (0xffff); +data[2160] = String.fromCharCode (0xffff); +data[2161] = String.fromCharCode (0xffff); +data[2162] = String.fromCharCode (0xffff); +data[2163] = String.fromCharCode (0xffff); +data[2164] = String.fromCharCode (0xffff); +data[2165] = String.fromCharCode (0xffff); +data[2166] = String.fromCharCode (0xffff); +data[2167] = String.fromCharCode (0xffff); +data[2168] = String.fromCharCode (0xffff); +data[2169] = String.fromCharCode (0xffff); +data[2170] = String.fromCharCode (0xffff); +data[2171] = String.fromCharCode (0xffff); +data[2172] = String.fromCharCode (0xffff); +data[2173] = String.fromCharCode (0xffff); +data[2174] = String.fromCharCode (0xffff); +data[2175] = String.fromCharCode (0xffff); +data[2176] = String.fromCharCode (0xffff); +data[2177] = String.fromCharCode (0xffff); +data[2178] = String.fromCharCode (0xffff); +data[2179] = String.fromCharCode (0xffff); +data[2180] = String.fromCharCode (0xffff); +data[2181] = String.fromCharCode (0xffff); +data[2182] = String.fromCharCode (0xffff); +data[2183] = String.fromCharCode (0xffff); +data[2184] = String.fromCharCode (0xffff); +data[2185] = String.fromCharCode (0xffff); +data[2186] = String.fromCharCode (0xffff); +data[2187] = String.fromCharCode (0xffff); +data[2188] = String.fromCharCode (0xffff); +data[2189] = String.fromCharCode (0xffff); +data[2190] = String.fromCharCode (0xffff); +data[2191] = String.fromCharCode (0xffff); +data[2192] = String.fromCharCode (0xffff); +data[2193] = String.fromCharCode (0xffff); +data[2194] = String.fromCharCode (0xffff); +data[2195] = String.fromCharCode (0xffff); +data[2196] = String.fromCharCode (0xffff); +data[2197] = String.fromCharCode (0xffff); +data[2198] = String.fromCharCode (0xffff); +data[2199] = String.fromCharCode (0xffff); +data[2200] = String.fromCharCode (0xffff); +data[2201] = String.fromCharCode (0xffff); +data[2202] = String.fromCharCode (0xffff); +data[2203] = String.fromCharCode (0xffff); +data[2204] = String.fromCharCode (0xffff); +data[2205] = String.fromCharCode (0xffff); +data[2206] = String.fromCharCode (0xffff); +data[2207] = String.fromCharCode (0xffff); +data[2208] = String.fromCharCode (0xffff); +data[2209] = String.fromCharCode (0xffff); +data[2210] = String.fromCharCode (0xffff); +data[2211] = String.fromCharCode (0xffff); +data[2212] = String.fromCharCode (0xffff); +data[2213] = String.fromCharCode (0xffff); +data[2214] = String.fromCharCode (0xffff); +data[2215] = String.fromCharCode (0xffff); +data[2216] = String.fromCharCode (0xffff); +data[2217] = String.fromCharCode (0xffff); +data[2218] = String.fromCharCode (0xffff); +data[2219] = String.fromCharCode (0xffff); +data[2220] = String.fromCharCode (0xffff); +data[2221] = String.fromCharCode (0xffff); +data[2222] = String.fromCharCode (0xffff); +data[2223] = String.fromCharCode (0xffff); +data[2224] = String.fromCharCode (0xffff); +data[2225] = String.fromCharCode (0xffff); +data[2226] = String.fromCharCode (0xffff); +data[2227] = String.fromCharCode (0xffff); +data[2228] = String.fromCharCode (0xffff); +data[2229] = String.fromCharCode (0xffff); +data[2230] = String.fromCharCode (0xffff); +data[2231] = String.fromCharCode (0xffff); +data[2232] = String.fromCharCode (0xffff); +data[2233] = String.fromCharCode (0xffff); +data[2234] = String.fromCharCode (0xffff); +data[2235] = String.fromCharCode (0xffff); +data[2236] = String.fromCharCode (0xffff); +data[2237] = String.fromCharCode (0xffff); +data[2238] = String.fromCharCode (0xffff); +data[2239] = String.fromCharCode (0xffff); +data[2240] = String.fromCharCode (0xffff); +data[2241] = String.fromCharCode (0xffff); +data[2242] = String.fromCharCode (0xffff); +data[2243] = String.fromCharCode (0xffff); +data[2244] = String.fromCharCode (0xffff); +data[2245] = String.fromCharCode (0xffff); +data[2246] = String.fromCharCode (0xffff); +data[2247] = String.fromCharCode (0xffff); +data[2248] = String.fromCharCode (0xffff); +data[2249] = String.fromCharCode (0xffff); +data[2250] = String.fromCharCode (0xffff); +data[2251] = String.fromCharCode (0xffff); +data[2252] = String.fromCharCode (0xffff); +data[2253] = String.fromCharCode (0xffff); +data[2254] = String.fromCharCode (0xffff); +data[2255] = String.fromCharCode (0xffff); +data[2256] = String.fromCharCode (0xffff); +data[2257] = String.fromCharCode (0xffff); +data[2258] = String.fromCharCode (0xffff); +data[2259] = String.fromCharCode (0xffff); +data[2260] = String.fromCharCode (0xffff); +data[2261] = String.fromCharCode (0xffff); +data[2262] = String.fromCharCode (0xffff); +data[2263] = String.fromCharCode (0xffff); +data[2264] = String.fromCharCode (0xffff); +data[2265] = String.fromCharCode (0xffff); +data[2266] = String.fromCharCode (0xffff); +data[2267] = String.fromCharCode (0xffff); +data[2268] = String.fromCharCode (0xffff); +data[2269] = String.fromCharCode (0xffff); +data[2270] = String.fromCharCode (0xffff); +data[2271] = String.fromCharCode (0xffff); +data[2272] = String.fromCharCode (0xffff); +data[2273] = String.fromCharCode (0xffff); +data[2274] = String.fromCharCode (0xffff); +data[2275] = String.fromCharCode (0xffff); +data[2276] = String.fromCharCode (0xffff); +data[2277] = String.fromCharCode (0xffff); +data[2278] = String.fromCharCode (0xffff); +data[2279] = String.fromCharCode (0xffff); +data[2280] = String.fromCharCode (0xffff); +data[2281] = String.fromCharCode (0xffff); +data[2282] = String.fromCharCode (0xffff); +data[2283] = String.fromCharCode (0xffff); +data[2284] = String.fromCharCode (0xffff); +data[2285] = String.fromCharCode (0xffff); +data[2286] = String.fromCharCode (0xffff); +data[2287] = String.fromCharCode (0xffff); +data[2288] = String.fromCharCode (0xffff); +data[2289] = String.fromCharCode (0xffff); +data[2290] = String.fromCharCode (0xffff); +data[2291] = String.fromCharCode (0xffff); +data[2292] = String.fromCharCode (0xffff); +data[2293] = String.fromCharCode (0xffff); +data[2294] = String.fromCharCode (0xffff); +data[2295] = String.fromCharCode (0xffff); +data[2296] = String.fromCharCode (0xffff); +data[2297] = String.fromCharCode (0xffff); +data[2298] = String.fromCharCode (0xffff); +data[2299] = String.fromCharCode (0xffff); +data[2300] = String.fromCharCode (0xffff); +data[2301] = String.fromCharCode (0xffff); +data[2302] = String.fromCharCode (0xffff); +data[2303] = String.fromCharCode (0xffff); +data[2304] = String.fromCharCode (0xffff); +data[2305] = String.fromCharCode (0xffff); +data[2306] = String.fromCharCode (0xffff); +data[2307] = String.fromCharCode (0xffff); +data[2308] = String.fromCharCode (0xffff); +data[2309] = String.fromCharCode (0xffff); +data[2310] = String.fromCharCode (0xffff); +data[2311] = String.fromCharCode (0xffff); +data[2312] = String.fromCharCode (0xffff); +data[2313] = String.fromCharCode (0xffff); +data[2314] = String.fromCharCode (0xffff); +data[2315] = String.fromCharCode (0xffff); +data[2316] = String.fromCharCode (0xffff); +data[2317] = String.fromCharCode (0xffff); +data[2318] = String.fromCharCode (0xffff); +data[2319] = String.fromCharCode (0xffff); +data[2320] = String.fromCharCode (0xffff); +data[2321] = String.fromCharCode (0xffff); +data[2322] = String.fromCharCode (0xffff); +data[2323] = String.fromCharCode (0xffff); +data[2324] = String.fromCharCode (0xffff); +data[2325] = String.fromCharCode (0xffff); +data[2326] = String.fromCharCode (0xffff); +data[2327] = String.fromCharCode (0xffff); +data[2328] = String.fromCharCode (0xffff); +data[2329] = String.fromCharCode (0xffff); +data[2330] = String.fromCharCode (0xffff); +data[2331] = String.fromCharCode (0xffff); +data[2332] = String.fromCharCode (0xffff); +data[2333] = String.fromCharCode (0xffff); +data[2334] = String.fromCharCode (0xffff); +data[2335] = String.fromCharCode (0xffff); +data[2336] = String.fromCharCode (0xffff); +data[2337] = String.fromCharCode (0xffff); +data[2338] = String.fromCharCode (0xffff); +data[2339] = String.fromCharCode (0xffff); +data[2340] = String.fromCharCode (0xffff); +data[2341] = String.fromCharCode (0xffff); +data[2342] = String.fromCharCode (0xffff); +data[2343] = String.fromCharCode (0xffff); +data[2344] = String.fromCharCode (0xffff); +data[2345] = String.fromCharCode (0xffff); +data[2346] = String.fromCharCode (0xffff); +data[2347] = String.fromCharCode (0xffff); +data[2348] = String.fromCharCode (0xffff); +data[2349] = String.fromCharCode (0xffff); +data[2350] = String.fromCharCode (0xffff); +data[2351] = String.fromCharCode (0xffff); +data[2352] = String.fromCharCode (0xffff); +data[2353] = String.fromCharCode (0xffff); +data[2354] = String.fromCharCode (0xffff); +data[2355] = String.fromCharCode (0xffff); +data[2356] = String.fromCharCode (0xffff); +data[2357] = String.fromCharCode (0xffff); +data[2358] = String.fromCharCode (0xffff); +data[2359] = String.fromCharCode (0xffff); +data[2360] = String.fromCharCode (0xffff); +data[2361] = String.fromCharCode (0xffff); +data[2362] = String.fromCharCode (0xffff); +data[2363] = String.fromCharCode (0xffff); +data[2364] = String.fromCharCode (0xffff); +data[2365] = String.fromCharCode (0xffff); +data[2366] = String.fromCharCode (0xffff); +data[2367] = String.fromCharCode (0xffff); +data[2368] = String.fromCharCode (0xffff); +data[2369] = String.fromCharCode (0xffff); +data[2370] = String.fromCharCode (0xffff); +data[2371] = String.fromCharCode (0xffff); +data[2372] = String.fromCharCode (0xffff); +data[2373] = String.fromCharCode (0xffff); +data[2374] = String.fromCharCode (0xffff); +data[2375] = String.fromCharCode (0xffff); +data[2376] = String.fromCharCode (0xffff); +data[2377] = String.fromCharCode (0xffff); +data[2378] = String.fromCharCode (0xffff); +data[2379] = String.fromCharCode (0xffff); +data[2380] = String.fromCharCode (0xffff); +data[2381] = String.fromCharCode (0xffff); +data[2382] = String.fromCharCode (0xffff); +data[2383] = String.fromCharCode (0xffff); +data[2384] = String.fromCharCode (0xffff); +data[2385] = String.fromCharCode (0xffff); +data[2386] = String.fromCharCode (0xffff); +data[2387] = String.fromCharCode (0xffff); +data[2388] = String.fromCharCode (0xffff); +data[2389] = String.fromCharCode (0xffff); +data[2390] = String.fromCharCode (0xffff); +data[2391] = String.fromCharCode (0xffff); +data[2392] = String.fromCharCode (0xffff); +data[2393] = String.fromCharCode (0xffff); +data[2394] = String.fromCharCode (0xffff); +data[2395] = String.fromCharCode (0xffff); +data[2396] = String.fromCharCode (0xffff); +data[2397] = String.fromCharCode (0xffff); +data[2398] = String.fromCharCode (0xffff); +data[2399] = String.fromCharCode (0xffff); +data[2400] = String.fromCharCode (0xffff); +data[2401] = String.fromCharCode (0xffff); +data[2402] = String.fromCharCode (0xffff); +data[2403] = String.fromCharCode (0xffff); +data[2404] = String.fromCharCode (0xffff); +data[2405] = String.fromCharCode (0xffff); +data[2406] = String.fromCharCode (0xffff); +data[2407] = String.fromCharCode (0xffff); +data[2408] = String.fromCharCode (0xffff); +data[2409] = String.fromCharCode (0xffff); +data[2410] = String.fromCharCode (0xffff); +data[2411] = String.fromCharCode (0xffff); +data[2412] = String.fromCharCode (0xffff); +data[2413] = String.fromCharCode (0xffff); +data[2414] = String.fromCharCode (0xffff); +data[2415] = String.fromCharCode (0xffff); +data[2416] = String.fromCharCode (0xffff); +data[2417] = String.fromCharCode (0xffff); +data[2418] = String.fromCharCode (0xffff); +data[2419] = String.fromCharCode (0xffff); +data[2420] = String.fromCharCode (0xffff); +data[2421] = String.fromCharCode (0xffff); +data[2422] = String.fromCharCode (0xffff); +data[2423] = String.fromCharCode (0xffff); +data[2424] = String.fromCharCode (0xffff); +data[2425] = String.fromCharCode (0xffff); +data[2426] = String.fromCharCode (0xffff); +data[2427] = String.fromCharCode (0xffff); +data[2428] = String.fromCharCode (0xffff); +data[2429] = String.fromCharCode (0xffff); +data[2430] = String.fromCharCode (0xffff); +data[2431] = String.fromCharCode (0xffff); +data[2432] = String.fromCharCode (0xffff); +data[2433] = String.fromCharCode (0xffff); +data[2434] = String.fromCharCode (0xffff); +data[2435] = String.fromCharCode (0xffff); +data[2436] = String.fromCharCode (0xffff); +data[2437] = String.fromCharCode (0xffff); +data[2438] = String.fromCharCode (0xffff); +data[2439] = String.fromCharCode (0xffff); +data[2440] = String.fromCharCode (0xffff); +data[2441] = String.fromCharCode (0xffff); +data[2442] = String.fromCharCode (0xffff); +data[2443] = String.fromCharCode (0xffff); +data[2444] = String.fromCharCode (0xffff); +data[2445] = String.fromCharCode (0xffff); +data[2446] = String.fromCharCode (0xffff); +data[2447] = String.fromCharCode (0xffff); +data[2448] = String.fromCharCode (0xffff); +data[2449] = String.fromCharCode (0xffff); +data[2450] = String.fromCharCode (0xffff); +data[2451] = String.fromCharCode (0xffff); +data[2452] = String.fromCharCode (0xffff); +data[2453] = String.fromCharCode (0xffff); +data[2454] = String.fromCharCode (0xffff); +data[2455] = String.fromCharCode (0xffff); +data[2456] = String.fromCharCode (0xffff); +data[2457] = String.fromCharCode (0xffff); +data[2458] = String.fromCharCode (0xffff); +data[2459] = String.fromCharCode (0xffff); +data[2460] = String.fromCharCode (0xffff); +data[2461] = String.fromCharCode (0xffff); +data[2462] = String.fromCharCode (0xffff); +data[2463] = String.fromCharCode (0xffff); +data[2464] = String.fromCharCode (0xffff); +data[2465] = String.fromCharCode (0xffff); +data[2466] = String.fromCharCode (0xffff); +data[2467] = String.fromCharCode (0xffff); +data[2468] = String.fromCharCode (0xffff); +data[2469] = String.fromCharCode (0xffff); +data[2470] = String.fromCharCode (0xffff); +data[2471] = String.fromCharCode (0xffff); +data[2472] = String.fromCharCode (0xffff); +data[2473] = String.fromCharCode (0xffff); +data[2474] = String.fromCharCode (0xffff); +data[2475] = String.fromCharCode (0xffff); +data[2476] = String.fromCharCode (0xffff); +data[2477] = String.fromCharCode (0xffff); +data[2478] = String.fromCharCode (0xffff); +data[2479] = String.fromCharCode (0xffff); +data[2480] = String.fromCharCode (0xffff); +data[2481] = String.fromCharCode (0xffff); +data[2482] = String.fromCharCode (0xffff); +data[2483] = String.fromCharCode (0xffff); +data[2484] = String.fromCharCode (0xffff); +data[2485] = String.fromCharCode (0xffff); +data[2486] = String.fromCharCode (0xffff); +data[2487] = String.fromCharCode (0xffff); +data[2488] = String.fromCharCode (0xffff); +data[2489] = String.fromCharCode (0xffff); +data[2490] = String.fromCharCode (0xffff); +data[2491] = String.fromCharCode (0xffff); +data[2492] = String.fromCharCode (0xffff); +data[2493] = String.fromCharCode (0xffff); +data[2494] = String.fromCharCode (0xffff); +data[2495] = String.fromCharCode (0xffff); +data[2496] = String.fromCharCode (0xffff); +data[2497] = String.fromCharCode (0xffff); +data[2498] = String.fromCharCode (0xffff); +data[2499] = String.fromCharCode (0xffff); +data[2500] = String.fromCharCode (0xffff); +data[2501] = String.fromCharCode (0xffff); +data[2502] = String.fromCharCode (0xffff); +data[2503] = String.fromCharCode (0xffff); +data[2504] = String.fromCharCode (0xffff); +data[2505] = String.fromCharCode (0xffff); +data[2506] = String.fromCharCode (0xffff); +data[2507] = String.fromCharCode (0xffff); +data[2508] = String.fromCharCode (0xffff); +data[2509] = String.fromCharCode (0xffff); +data[2510] = String.fromCharCode (0xffff); +data[2511] = String.fromCharCode (0xffff); +data[2512] = String.fromCharCode (0xffff); +data[2513] = String.fromCharCode (0xffff); +data[2514] = String.fromCharCode (0xffff); +data[2515] = String.fromCharCode (0xffff); +data[2516] = String.fromCharCode (0xffff); +data[2517] = String.fromCharCode (0xffff); +data[2518] = String.fromCharCode (0xffff); +data[2519] = String.fromCharCode (0xffff); +data[2520] = String.fromCharCode (0xffff); +data[2521] = String.fromCharCode (0xffff); +data[2522] = String.fromCharCode (0xffff); +data[2523] = String.fromCharCode (0xffff); +data[2524] = String.fromCharCode (0xffff); +data[2525] = String.fromCharCode (0xffff); +data[2526] = String.fromCharCode (0xffff); +data[2527] = String.fromCharCode (0xffff); +data[2528] = String.fromCharCode (0xffff); +data[2529] = String.fromCharCode (0xffff); +data[2530] = String.fromCharCode (0xffff); +data[2531] = String.fromCharCode (0xffff); +data[2532] = String.fromCharCode (0xffff); +data[2533] = String.fromCharCode (0xffff); +data[2534] = String.fromCharCode (0xffff); +data[2535] = String.fromCharCode (0xffff); +data[2536] = String.fromCharCode (0xffff); +data[2537] = String.fromCharCode (0xffff); +data[2538] = String.fromCharCode (0xffff); +data[2539] = String.fromCharCode (0xffff); +data[2540] = String.fromCharCode (0xffff); +data[2541] = String.fromCharCode (0xffff); +data[2542] = String.fromCharCode (0xffff); +data[2543] = String.fromCharCode (0xffff); +data[2544] = String.fromCharCode (0xffff); +data[2545] = String.fromCharCode (0xffff); +data[2546] = String.fromCharCode (0xffff); +data[2547] = String.fromCharCode (0xffff); +data[2548] = String.fromCharCode (0xffff); +data[2549] = String.fromCharCode (0xffff); +data[2550] = String.fromCharCode (0xffff); +data[2551] = String.fromCharCode (0xffff); +data[2552] = String.fromCharCode (0xffff); +data[2553] = String.fromCharCode (0xffff); +data[2554] = String.fromCharCode (0x003f); +data[2752] = String.fromCharCode (0xffff); +data[2753] = String.fromCharCode (0xffff); +data[2754] = String.fromCharCode (0xffff); +data[2755] = String.fromCharCode (0xffff); +data[2756] = String.fromCharCode (0xffff); +data[2757] = String.fromCharCode (0xffff); +data[2758] = String.fromCharCode (0xffff); +data[2759] = String.fromCharCode (0xffff); +data[2760] = String.fromCharCode (0xffff); +data[2761] = String.fromCharCode (0xffff); +data[2762] = String.fromCharCode (0xffff); +data[2763] = String.fromCharCode (0xffff); +data[2764] = String.fromCharCode (0xffff); +data[2765] = String.fromCharCode (0xffff); +data[2766] = String.fromCharCode (0xffff); +data[2767] = String.fromCharCode (0xffff); +data[2768] = String.fromCharCode (0xffff); +data[2769] = String.fromCharCode (0xffff); +data[2770] = String.fromCharCode (0xffff); +data[2771] = String.fromCharCode (0xffff); +data[2772] = String.fromCharCode (0xffff); +data[2773] = String.fromCharCode (0xffff); +data[2774] = String.fromCharCode (0xffff); +data[2775] = String.fromCharCode (0xffff); +data[2776] = String.fromCharCode (0xffff); +data[2777] = String.fromCharCode (0xffff); +data[2778] = String.fromCharCode (0xffff); +data[2779] = String.fromCharCode (0xffff); +data[2780] = String.fromCharCode (0xffff); +data[2781] = String.fromCharCode (0xffff); +data[2782] = String.fromCharCode (0xffff); +data[2783] = String.fromCharCode (0xffff); +data[2784] = String.fromCharCode (0xffff); +data[2785] = String.fromCharCode (0xffff); +data[2786] = String.fromCharCode (0xffff); +data[2787] = String.fromCharCode (0xffff); +data[2788] = String.fromCharCode (0xffff); +data[2789] = String.fromCharCode (0xffff); +data[2790] = String.fromCharCode (0xffff); +data[2791] = String.fromCharCode (0xffff); +data[2792] = String.fromCharCode (0xffff); +data[2793] = String.fromCharCode (0xffff); +data[2794] = String.fromCharCode (0xffff); +data[2795] = String.fromCharCode (0xffff); +data[2796] = String.fromCharCode (0xffff); +data[2797] = String.fromCharCode (0xffff); +data[2798] = String.fromCharCode (0xffff); +data[2799] = String.fromCharCode (0xffff); +data[2800] = String.fromCharCode (0xffff); +data[2801] = String.fromCharCode (0xffff); +data[2802] = String.fromCharCode (0xffff); +data[2803] = String.fromCharCode (0xffff); +data[2804] = String.fromCharCode (0xffff); +data[2805] = String.fromCharCode (0xffff); +data[2806] = String.fromCharCode (0xffff); +data[2807] = String.fromCharCode (0xffff); +data[2808] = String.fromCharCode (0xffff); +data[2809] = String.fromCharCode (0xffff); +data[2810] = String.fromCharCode (0xffff); +data[2811] = String.fromCharCode (0xffff); +data[2812] = String.fromCharCode (0xffff); +data[2813] = String.fromCharCode (0xffff); +data[2814] = String.fromCharCode (0xffff); +data[2815] = String.fromCharCode (0xffff); +data[2816] = String.fromCharCode (0xffff); +data[2817] = String.fromCharCode (0xffff); +data[2818] = String.fromCharCode (0xffff); +data[2819] = String.fromCharCode (0xffff); +data[2820] = String.fromCharCode (0xffff); +data[2821] = String.fromCharCode (0xffff); +data[2822] = String.fromCharCode (0xffff); +data[2823] = String.fromCharCode (0xffff); +data[2824] = String.fromCharCode (0xffff); +data[2825] = String.fromCharCode (0xffff); +data[2826] = String.fromCharCode (0xffff); +data[2827] = String.fromCharCode (0xffff); +data[2828] = String.fromCharCode (0xffff); +data[2829] = String.fromCharCode (0xffff); +data[2830] = String.fromCharCode (0xffff); +data[2831] = String.fromCharCode (0xffff); +data[2832] = String.fromCharCode (0xffff); +data[2833] = String.fromCharCode (0xffff); +data[2834] = String.fromCharCode (0xffff); +data[2835] = String.fromCharCode (0xffff); +data[2836] = String.fromCharCode (0xffff); +data[2837] = String.fromCharCode (0xffff); +data[2838] = String.fromCharCode (0xffff); +data[2839] = String.fromCharCode (0xffff); +data[2840] = String.fromCharCode (0xffff); +data[2841] = String.fromCharCode (0xffff); +data[2842] = String.fromCharCode (0xffff); +data[2843] = String.fromCharCode (0xffff); +data[2844] = String.fromCharCode (0xffff); +data[2845] = String.fromCharCode (0xffff); +data[2846] = String.fromCharCode (0xffff); +data[2847] = String.fromCharCode (0xffff); +data[2848] = String.fromCharCode (0xffff); +data[2849] = String.fromCharCode (0xffff); +data[2850] = String.fromCharCode (0xffff); +data[2851] = String.fromCharCode (0xffff); +data[2852] = String.fromCharCode (0xffff); +data[2853] = String.fromCharCode (0xffff); +data[2854] = String.fromCharCode (0xffff); +data[2855] = String.fromCharCode (0xffff); +data[2856] = String.fromCharCode (0xffff); +data[2857] = String.fromCharCode (0xffff); +data[2858] = String.fromCharCode (0xffff); +data[2859] = String.fromCharCode (0xffff); +data[2860] = String.fromCharCode (0xffff); +data[2861] = String.fromCharCode (0xffff); +data[2862] = String.fromCharCode (0xffff); +data[2863] = String.fromCharCode (0xffff); +data[2864] = String.fromCharCode (0xffff); +data[2865] = String.fromCharCode (0xffff); +data[2866] = String.fromCharCode (0xffff); +data[2867] = String.fromCharCode (0xffff); +data[2868] = String.fromCharCode (0xffff); +data[2869] = String.fromCharCode (0xffff); +data[2870] = String.fromCharCode (0xffff); +data[2871] = String.fromCharCode (0xffff); +data[2872] = String.fromCharCode (0xffff); +data[2873] = String.fromCharCode (0xffff); +data[2874] = String.fromCharCode (0xffff); +data[2875] = String.fromCharCode (0xffff); +data[2876] = String.fromCharCode (0xffff); +data[2877] = String.fromCharCode (0xffff); +data[2878] = String.fromCharCode (0xffff); +data[2879] = String.fromCharCode (0xffff); +data[2880] = String.fromCharCode (0xffff); +data[2881] = String.fromCharCode (0xffff); +data[2882] = String.fromCharCode (0xffff); +data[2883] = String.fromCharCode (0xffff); +data[2884] = String.fromCharCode (0xffff); +data[2885] = String.fromCharCode (0xffff); +data[2886] = String.fromCharCode (0xffff); +data[2887] = String.fromCharCode (0xffff); +data[2888] = String.fromCharCode (0xffff); +data[2889] = String.fromCharCode (0xffff); +data[2890] = String.fromCharCode (0xffff); +data[2891] = String.fromCharCode (0xffff); +data[2892] = String.fromCharCode (0xffff); +data[2893] = String.fromCharCode (0xffff); +data[2894] = String.fromCharCode (0xffff); +data[2895] = String.fromCharCode (0xffff); +data[2896] = String.fromCharCode (0xffff); +data[2897] = String.fromCharCode (0xffff); +data[2898] = String.fromCharCode (0xffff); +data[2899] = String.fromCharCode (0xffff); +data[2900] = String.fromCharCode (0xffff); +data[2901] = String.fromCharCode (0xffff); +data[2902] = String.fromCharCode (0xffff); +data[2903] = String.fromCharCode (0xffff); +data[2904] = String.fromCharCode (0xffff); +data[2905] = String.fromCharCode (0xffff); +data[2906] = String.fromCharCode (0xffff); +data[2907] = String.fromCharCode (0xffff); +data[2908] = String.fromCharCode (0xffff); +data[2909] = String.fromCharCode (0xffff); +data[2910] = String.fromCharCode (0xffff); +data[2911] = String.fromCharCode (0xffff); +data[2912] = String.fromCharCode (0xffff); +data[2913] = String.fromCharCode (0xffff); +data[2914] = String.fromCharCode (0xffff); +data[2915] = String.fromCharCode (0xffff); +data[2916] = String.fromCharCode (0xffff); +data[2917] = String.fromCharCode (0xffff); +data[2918] = String.fromCharCode (0xffff); +data[2919] = String.fromCharCode (0xffff); +data[2920] = String.fromCharCode (0xffff); +data[2921] = String.fromCharCode (0xffff); +data[2922] = String.fromCharCode (0xffff); +data[2923] = String.fromCharCode (0xffff); +data[2924] = String.fromCharCode (0xffff); +data[2925] = String.fromCharCode (0xffff); +data[2926] = String.fromCharCode (0xffff); +data[2927] = String.fromCharCode (0xffff); +data[2928] = String.fromCharCode (0xffff); +data[2929] = String.fromCharCode (0xffff); +data[2930] = String.fromCharCode (0xffff); +data[2931] = String.fromCharCode (0xffff); +data[2932] = String.fromCharCode (0xffff); +data[2933] = String.fromCharCode (0xffff); +data[2934] = String.fromCharCode (0xffff); +data[2935] = String.fromCharCode (0xffff); +data[2936] = String.fromCharCode (0xffff); +data[2937] = String.fromCharCode (0xffff); +data[2938] = String.fromCharCode (0xffff); +data[2939] = String.fromCharCode (0xffff); +data[2940] = String.fromCharCode (0xffff); +data[2941] = String.fromCharCode (0xffff); +data[2942] = String.fromCharCode (0xffff); +data[2943] = String.fromCharCode (0xffff); +data[2944] = String.fromCharCode (0xffff); +data[2945] = String.fromCharCode (0xffff); +data[2946] = String.fromCharCode (0xffff); +data[2947] = String.fromCharCode (0xffff); +data[2948] = String.fromCharCode (0xffff); +data[2949] = String.fromCharCode (0xffff); +data[2950] = String.fromCharCode (0xffff); +data[2951] = String.fromCharCode (0xffff); +data[2952] = String.fromCharCode (0xffff); +data[2953] = String.fromCharCode (0xffff); +data[2954] = String.fromCharCode (0xffff); +data[2955] = String.fromCharCode (0xffff); +data[2956] = String.fromCharCode (0xffff); +data[2957] = String.fromCharCode (0xffff); +data[2958] = String.fromCharCode (0xffff); +data[2959] = String.fromCharCode (0xffff); +data[2960] = String.fromCharCode (0xffff); +data[2961] = String.fromCharCode (0xffff); +data[2962] = String.fromCharCode (0xffff); +data[2963] = String.fromCharCode (0xffff); +data[2964] = String.fromCharCode (0xffff); +data[2965] = String.fromCharCode (0xffff); +data[2966] = String.fromCharCode (0xffff); +data[2967] = String.fromCharCode (0xffff); +data[2968] = String.fromCharCode (0xffff); +data[2969] = String.fromCharCode (0xffff); +data[2970] = String.fromCharCode (0xffff); +data[2971] = String.fromCharCode (0xffff); +data[2972] = String.fromCharCode (0xffff); +data[2973] = String.fromCharCode (0xffff); +data[2974] = String.fromCharCode (0xffff); +data[2975] = String.fromCharCode (0xffff); +data[2976] = String.fromCharCode (0xffff); +data[2977] = String.fromCharCode (0xffff); +data[2978] = String.fromCharCode (0xffff); +data[2979] = String.fromCharCode (0xffff); +data[2980] = String.fromCharCode (0xffff); +data[2981] = String.fromCharCode (0xffff); +data[2982] = String.fromCharCode (0xffff); +data[2983] = String.fromCharCode (0xffff); +data[2984] = String.fromCharCode (0xffff); +data[2985] = String.fromCharCode (0xffff); +data[2986] = String.fromCharCode (0xffff); +data[2987] = String.fromCharCode (0xffff); +data[2988] = String.fromCharCode (0xffff); +data[2989] = String.fromCharCode (0xffff); +data[2990] = String.fromCharCode (0xffff); +data[2991] = String.fromCharCode (0xffff); +data[2992] = String.fromCharCode (0xffff); +data[2993] = String.fromCharCode (0xffff); +data[2994] = String.fromCharCode (0xffff); +data[2995] = String.fromCharCode (0xffff); +data[2996] = String.fromCharCode (0xffff); +data[2997] = String.fromCharCode (0xffff); +data[2998] = String.fromCharCode (0xffff); +data[2999] = String.fromCharCode (0xffff); +data[3000] = String.fromCharCode (0xffff); +data[3001] = String.fromCharCode (0xffff); +data[3002] = String.fromCharCode (0xffff); +data[3003] = String.fromCharCode (0xffff); +data[3004] = String.fromCharCode (0xffff); +data[3005] = String.fromCharCode (0xffff); +data[3006] = String.fromCharCode (0xffff); +data[3007] = String.fromCharCode (0xffff); +data[3008] = String.fromCharCode (0xffff); +data[3009] = String.fromCharCode (0xffff); +data[3010] = String.fromCharCode (0xffff); +data[3011] = String.fromCharCode (0xffff); +data[3012] = String.fromCharCode (0xffff); +data[3013] = String.fromCharCode (0xffff); +data[3014] = String.fromCharCode (0xffff); +data[3015] = String.fromCharCode (0xffff); +data[3016] = String.fromCharCode (0xffff); +data[3017] = String.fromCharCode (0xffff); +data[3018] = String.fromCharCode (0xffff); +data[3019] = String.fromCharCode (0xffff); +data[3020] = String.fromCharCode (0xffff); +data[3021] = String.fromCharCode (0xffff); +data[3022] = String.fromCharCode (0xffff); +data[3023] = String.fromCharCode (0xffff); +data[3024] = String.fromCharCode (0xffff); +data[3025] = String.fromCharCode (0xffff); +data[3026] = String.fromCharCode (0xffff); +data[3027] = String.fromCharCode (0xffff); +data[3028] = String.fromCharCode (0xffff); +data[3029] = String.fromCharCode (0xffff); +data[3030] = String.fromCharCode (0xffff); +data[3031] = String.fromCharCode (0xffff); +data[3032] = String.fromCharCode (0xffff); +data[3033] = String.fromCharCode (0xffff); +data[3034] = String.fromCharCode (0xffff); +data[3035] = String.fromCharCode (0xffff); +data[3036] = String.fromCharCode (0xffff); +data[3037] = String.fromCharCode (0xffff); +data[3038] = String.fromCharCode (0xffff); +data[3039] = String.fromCharCode (0xffff); +data[3040] = String.fromCharCode (0xffff); +data[3041] = String.fromCharCode (0xffff); +data[3042] = String.fromCharCode (0xffff); +data[3043] = String.fromCharCode (0xffff); +data[3044] = String.fromCharCode (0xffff); +data[3045] = String.fromCharCode (0xffff); +data[3046] = String.fromCharCode (0xffff); +data[3047] = String.fromCharCode (0xffff); +data[3048] = String.fromCharCode (0xffff); +data[3049] = String.fromCharCode (0xffff); +data[3050] = String.fromCharCode (0xffff); +data[3051] = String.fromCharCode (0xffff); +data[3052] = String.fromCharCode (0xffff); +data[3053] = String.fromCharCode (0xffff); +data[3054] = String.fromCharCode (0xffff); +data[3055] = String.fromCharCode (0xffff); +data[3056] = String.fromCharCode (0xffff); +data[3057] = String.fromCharCode (0xffff); +data[3058] = String.fromCharCode (0xffff); +data[3059] = String.fromCharCode (0xffff); +data[3060] = String.fromCharCode (0xffff); +data[3061] = String.fromCharCode (0xffff); +data[3062] = String.fromCharCode (0xffff); +data[3063] = String.fromCharCode (0xffff); +data[3064] = String.fromCharCode (0xffff); +data[3065] = String.fromCharCode (0xffff); +data[3066] = String.fromCharCode (0xffff); +data[3067] = String.fromCharCode (0xffff); +data[3068] = String.fromCharCode (0xffff); +data[3069] = String.fromCharCode (0xffff); +data[3070] = String.fromCharCode (0xffff); +data[3071] = String.fromCharCode (0xffff); +data[3072] = String.fromCharCode (0xffff); +data[3073] = String.fromCharCode (0xffff); +data[3074] = String.fromCharCode (0xffff); +data[3075] = String.fromCharCode (0xffff); +data[3076] = String.fromCharCode (0xffff); +data[3077] = String.fromCharCode (0xffff); +data[3078] = String.fromCharCode (0xffff); +data[3079] = String.fromCharCode (0xffff); +data[3080] = String.fromCharCode (0xffff); +data[3081] = String.fromCharCode (0xffff); +data[3082] = String.fromCharCode (0xffff); +data[3083] = String.fromCharCode (0xffff); +data[3084] = String.fromCharCode (0xffff); +data[3085] = String.fromCharCode (0xffff); +data[3086] = String.fromCharCode (0xffff); +data[3087] = String.fromCharCode (0xffff); +data[3088] = String.fromCharCode (0xffff); +data[3089] = String.fromCharCode (0xffff); +data[3090] = String.fromCharCode (0xffff); +data[3091] = String.fromCharCode (0xffff); +data[3092] = String.fromCharCode (0xffff); +data[3093] = String.fromCharCode (0xffff); +data[3094] = String.fromCharCode (0xffff); +data[3095] = String.fromCharCode (0xffff); +data[3096] = String.fromCharCode (0xffff); +data[3097] = String.fromCharCode (0xffff); +data[3098] = String.fromCharCode (0xffff); +data[3099] = String.fromCharCode (0xffff); +data[3100] = String.fromCharCode (0xffff); +data[3101] = String.fromCharCode (0xffff); +data[3102] = String.fromCharCode (0xffff); +data[3103] = String.fromCharCode (0xffff); +data[3104] = String.fromCharCode (0xffff); +data[3105] = String.fromCharCode (0xffff); +data[3106] = String.fromCharCode (0xffff); +data[3107] = String.fromCharCode (0xffff); +data[3108] = String.fromCharCode (0xffff); +data[3109] = String.fromCharCode (0xffff); +data[3110] = String.fromCharCode (0xffff); +data[3111] = String.fromCharCode (0xffff); +data[3112] = String.fromCharCode (0xffff); +data[3113] = String.fromCharCode (0xffff); +data[3114] = String.fromCharCode (0xffff); +data[3115] = String.fromCharCode (0xffff); +data[3116] = String.fromCharCode (0xffff); +data[3117] = String.fromCharCode (0xffff); +data[3118] = String.fromCharCode (0xffff); +data[3119] = String.fromCharCode (0xffff); +data[3120] = String.fromCharCode (0xffff); +data[3121] = String.fromCharCode (0xffff); +data[3122] = String.fromCharCode (0xffff); +data[3123] = String.fromCharCode (0xffff); +data[3124] = String.fromCharCode (0xffff); +data[3125] = String.fromCharCode (0xffff); +data[3126] = String.fromCharCode (0xffff); +data[3127] = String.fromCharCode (0xffff); +data[3128] = String.fromCharCode (0xffff); +data[3129] = String.fromCharCode (0xffff); +data[3130] = String.fromCharCode (0xffff); +data[3131] = String.fromCharCode (0xffff); +data[3132] = String.fromCharCode (0xffff); +data[3133] = String.fromCharCode (0xffff); +data[3134] = String.fromCharCode (0xffff); +data[3135] = String.fromCharCode (0xffff); +data[3136] = String.fromCharCode (0xffff); +data[3137] = String.fromCharCode (0xffff); +data[3138] = String.fromCharCode (0xffff); +data[3139] = String.fromCharCode (0xffff); +data[3140] = String.fromCharCode (0xffff); +data[3141] = String.fromCharCode (0xffff); +data[3142] = String.fromCharCode (0xffff); +data[3143] = String.fromCharCode (0xffff); +data[3144] = String.fromCharCode (0xffff); +data[3145] = String.fromCharCode (0xffff); +data[3146] = String.fromCharCode (0xffff); +data[3147] = String.fromCharCode (0xffff); +data[3148] = String.fromCharCode (0xffff); +data[3149] = String.fromCharCode (0xffff); +data[3150] = String.fromCharCode (0xffff); +data[3151] = String.fromCharCode (0xffff); +data[3152] = String.fromCharCode (0xffff); +data[3153] = String.fromCharCode (0xffff); +data[3154] = String.fromCharCode (0xffff); +data[3155] = String.fromCharCode (0xffff); +data[3156] = String.fromCharCode (0xffff); +data[3157] = String.fromCharCode (0xffff); +data[3158] = String.fromCharCode (0xffff); +data[3159] = String.fromCharCode (0xffff); +data[3160] = String.fromCharCode (0xffff); +data[3161] = String.fromCharCode (0xffff); +data[3162] = String.fromCharCode (0xffff); +data[3163] = String.fromCharCode (0xffff); +data[3164] = String.fromCharCode (0xffff); +data[3165] = String.fromCharCode (0xffff); +data[3166] = String.fromCharCode (0xffff); +data[3167] = String.fromCharCode (0xffff); +data[3168] = String.fromCharCode (0xffff); +data[3169] = String.fromCharCode (0xffff); +data[3170] = String.fromCharCode (0xffff); +data[3171] = String.fromCharCode (0xffff); +data[3172] = String.fromCharCode (0xffff); +data[3173] = String.fromCharCode (0xffff); +data[3174] = String.fromCharCode (0xffff); +data[3175] = String.fromCharCode (0xffff); +data[3176] = String.fromCharCode (0xffff); +data[3177] = String.fromCharCode (0xffff); +data[3178] = String.fromCharCode (0xffff); +data[3179] = String.fromCharCode (0xffff); +data[3180] = String.fromCharCode (0xffff); +data[3181] = String.fromCharCode (0xffff); +data[3182] = String.fromCharCode (0xffff); +data[3183] = String.fromCharCode (0xffff); +data[3184] = String.fromCharCode (0xffff); +data[3185] = String.fromCharCode (0xffff); +data[3186] = String.fromCharCode (0xffff); +data[3187] = String.fromCharCode (0xffff); +data[3188] = String.fromCharCode (0xffff); +data[3189] = String.fromCharCode (0xffff); +data[3190] = String.fromCharCode (0xffff); +data[3191] = String.fromCharCode (0xffff); +data[3192] = String.fromCharCode (0xffff); +data[3193] = String.fromCharCode (0xffff); +data[3194] = String.fromCharCode (0xffff); +data[3195] = String.fromCharCode (0xffff); +data[3196] = String.fromCharCode (0xffff); +data[3197] = String.fromCharCode (0xffff); +data[3198] = String.fromCharCode (0xffff); +data[3199] = String.fromCharCode (0xffff); +data[3200] = String.fromCharCode (0xffff); +data[3201] = String.fromCharCode (0xffff); +data[3202] = String.fromCharCode (0xffff); +data[3203] = String.fromCharCode (0xffff); +data[3204] = String.fromCharCode (0xffff); +data[3205] = String.fromCharCode (0xffff); +data[3206] = String.fromCharCode (0xffff); +data[3207] = String.fromCharCode (0xffff); +data[3208] = String.fromCharCode (0xffff); +data[3209] = String.fromCharCode (0xffff); +data[3210] = String.fromCharCode (0xffff); +data[3211] = String.fromCharCode (0xffff); +data[3212] = String.fromCharCode (0xffff); +data[3213] = String.fromCharCode (0xffff); +data[3214] = String.fromCharCode (0xffff); +data[3215] = String.fromCharCode (0xffff); +data[3216] = String.fromCharCode (0xffff); +data[3217] = String.fromCharCode (0xffff); +data[3218] = String.fromCharCode (0xffff); +data[3219] = String.fromCharCode (0xffff); +data[3220] = String.fromCharCode (0xffff); +data[3221] = String.fromCharCode (0xffff); +data[3222] = String.fromCharCode (0xffff); +data[3223] = String.fromCharCode (0xffff); +data[3224] = String.fromCharCode (0xffff); +data[3225] = String.fromCharCode (0xffff); +data[3226] = String.fromCharCode (0xffff); +data[3227] = String.fromCharCode (0xffff); +data[3228] = String.fromCharCode (0xffff); +data[3229] = String.fromCharCode (0xffff); +data[3230] = String.fromCharCode (0xffff); +data[3231] = String.fromCharCode (0xffff); +data[3232] = String.fromCharCode (0xffff); +data[3233] = String.fromCharCode (0xffff); +data[3234] = String.fromCharCode (0xffff); +data[3235] = String.fromCharCode (0xffff); +data[3236] = String.fromCharCode (0xffff); +data[3237] = String.fromCharCode (0xffff); +data[3238] = String.fromCharCode (0xffff); +data[3239] = String.fromCharCode (0xffff); +data[3240] = String.fromCharCode (0xffff); +data[3241] = String.fromCharCode (0xffff); +data[3242] = String.fromCharCode (0xffff); +data[3243] = String.fromCharCode (0xffff); +data[3244] = String.fromCharCode (0xffff); +data[3245] = String.fromCharCode (0xffff); +data[3246] = String.fromCharCode (0xffff); +data[3247] = String.fromCharCode (0xffff); +data[3248] = String.fromCharCode (0xffff); +data[3249] = String.fromCharCode (0xffff); +data[3250] = String.fromCharCode (0xffff); +data[3251] = String.fromCharCode (0xffff); +data[3252] = String.fromCharCode (0xffff); +data[3253] = String.fromCharCode (0xffff); +data[3254] = String.fromCharCode (0xffff); +data[3255] = String.fromCharCode (0xffff); +data[3256] = String.fromCharCode (0xffff); +data[3257] = String.fromCharCode (0xffff); +data[3258] = String.fromCharCode (0xffff); +data[3259] = String.fromCharCode (0xffff); +data[3260] = String.fromCharCode (0xffff); +data[3261] = String.fromCharCode (0xffff); +data[3262] = String.fromCharCode (0xffff); +data[3263] = String.fromCharCode (0xffff); +data[3264] = String.fromCharCode (0xffff); +data[3265] = String.fromCharCode (0xffff); +data[3266] = String.fromCharCode (0xffff); +data[3267] = String.fromCharCode (0xffff); +data[3268] = String.fromCharCode (0xffff); +data[3269] = String.fromCharCode (0xffff); +data[3270] = String.fromCharCode (0xffff); +data[3271] = String.fromCharCode (0xffff); +data[3272] = String.fromCharCode (0xffff); +data[3273] = String.fromCharCode (0xffff); +data[3274] = String.fromCharCode (0xffff); +data[3275] = String.fromCharCode (0xffff); +data[3276] = String.fromCharCode (0xffff); +data[3277] = String.fromCharCode (0xffff); +data[3278] = String.fromCharCode (0xffff); +data[3279] = String.fromCharCode (0xffff); +data[3280] = String.fromCharCode (0xffff); +data[3281] = String.fromCharCode (0xffff); +data[3282] = String.fromCharCode (0xffff); +data[3283] = String.fromCharCode (0xffff); +data[3284] = String.fromCharCode (0xffff); +data[3285] = String.fromCharCode (0xffff); +data[3286] = String.fromCharCode (0xffff); +data[3287] = String.fromCharCode (0xffff); +data[3288] = String.fromCharCode (0xffff); +data[3289] = String.fromCharCode (0xffff); +data[3290] = String.fromCharCode (0xffff); +data[3291] = String.fromCharCode (0xffff); +data[3292] = String.fromCharCode (0xffff); +data[3293] = String.fromCharCode (0xffff); +data[3294] = String.fromCharCode (0xffff); +data[3295] = String.fromCharCode (0xffff); +data[3296] = String.fromCharCode (0xffff); +data[3297] = String.fromCharCode (0xffff); +data[3298] = String.fromCharCode (0xffff); +data[3299] = String.fromCharCode (0xffff); +data[3300] = String.fromCharCode (0xffff); +data[3301] = String.fromCharCode (0xffff); +data[3302] = String.fromCharCode (0xffff); +data[3303] = String.fromCharCode (0xffff); +data[3304] = String.fromCharCode (0xffff); +data[3305] = String.fromCharCode (0xffff); +data[3306] = String.fromCharCode (0xffff); +data[3307] = String.fromCharCode (0xffff); +data[3308] = String.fromCharCode (0xffff); +data[3309] = String.fromCharCode (0xffff); +data[3310] = String.fromCharCode (0xffff); +data[3311] = String.fromCharCode (0xffff); +data[3312] = String.fromCharCode (0xffff); +data[3313] = String.fromCharCode (0xffff); +data[3314] = String.fromCharCode (0xffff); +data[3315] = String.fromCharCode (0xffff); +data[3316] = String.fromCharCode (0xffff); +data[3317] = String.fromCharCode (0xffff); +data[3318] = String.fromCharCode (0xffff); +data[3319] = String.fromCharCode (0xffff); +data[3320] = String.fromCharCode (0xffff); +data[3321] = String.fromCharCode (0xffff); +data[3322] = String.fromCharCode (0xffff); +data[3323] = String.fromCharCode (0xffff); +data[3324] = String.fromCharCode (0xffff); +data[3325] = String.fromCharCode (0xffff); +data[3326] = String.fromCharCode (0xffff); +data[3327] = String.fromCharCode (0xffff); +data[3328] = String.fromCharCode (0xffff); +data[3329] = String.fromCharCode (0xffff); +data[3330] = String.fromCharCode (0xffff); +data[3331] = String.fromCharCode (0xffff); +data[3332] = String.fromCharCode (0xffff); +data[3333] = String.fromCharCode (0xffff); +data[3334] = String.fromCharCode (0xffff); +data[3335] = String.fromCharCode (0xffff); +data[3336] = String.fromCharCode (0xffff); +data[3337] = String.fromCharCode (0xffff); +data[3338] = String.fromCharCode (0xffff); +data[3339] = String.fromCharCode (0xffff); +data[3340] = String.fromCharCode (0xffff); +data[3341] = String.fromCharCode (0xffff); +data[3342] = String.fromCharCode (0xffff); +data[3343] = String.fromCharCode (0xffff); +data[3344] = String.fromCharCode (0xffff); +data[3345] = String.fromCharCode (0xffff); +data[3346] = String.fromCharCode (0xffff); +data[3347] = String.fromCharCode (0xffff); +data[3348] = String.fromCharCode (0xffff); +data[3349] = String.fromCharCode (0xffff); +data[3350] = String.fromCharCode (0xffff); +data[3351] = String.fromCharCode (0xffff); +data[3352] = String.fromCharCode (0xffff); +data[3353] = String.fromCharCode (0xffff); +data[3354] = String.fromCharCode (0xffff); +data[3355] = String.fromCharCode (0xffff); +data[3356] = String.fromCharCode (0xffff); +data[3357] = String.fromCharCode (0xffff); +data[3358] = String.fromCharCode (0xffff); +data[3359] = String.fromCharCode (0xffff); +data[3360] = String.fromCharCode (0xffff); +data[3361] = String.fromCharCode (0xffff); +data[3362] = String.fromCharCode (0xffff); +data[3363] = String.fromCharCode (0xffff); +data[3364] = String.fromCharCode (0xffff); +data[3365] = String.fromCharCode (0xffff); +data[3366] = String.fromCharCode (0xffff); +data[3367] = String.fromCharCode (0xffff); +data[3368] = String.fromCharCode (0xffff); +data[3369] = String.fromCharCode (0xffff); +data[3370] = String.fromCharCode (0xffff); +data[3371] = String.fromCharCode (0xffff); +data[3372] = String.fromCharCode (0xffff); +data[3373] = String.fromCharCode (0xffff); +data[3374] = String.fromCharCode (0xffff); +data[3375] = String.fromCharCode (0xffff); +data[3376] = String.fromCharCode (0xffff); +data[3377] = String.fromCharCode (0xffff); +data[3378] = String.fromCharCode (0xffff); +data[3379] = String.fromCharCode (0xffff); +data[3380] = String.fromCharCode (0xffff); +data[3381] = String.fromCharCode (0xffff); +data[3382] = String.fromCharCode (0xffff); +data[3383] = String.fromCharCode (0xffff); +data[3384] = String.fromCharCode (0xffff); +data[3385] = String.fromCharCode (0xffff); +data[3386] = String.fromCharCode (0xffff); +data[3387] = String.fromCharCode (0xffff); +data[3388] = String.fromCharCode (0xffff); +data[3389] = String.fromCharCode (0xffff); +data[3390] = String.fromCharCode (0xffff); +data[3391] = String.fromCharCode (0xffff); +data[3392] = String.fromCharCode (0xffff); +data[3393] = String.fromCharCode (0xffff); +data[3394] = String.fromCharCode (0xffff); +data[3395] = String.fromCharCode (0xffff); +data[3396] = String.fromCharCode (0xffff); +data[3397] = String.fromCharCode (0xffff); +data[3398] = String.fromCharCode (0xffff); +data[3399] = String.fromCharCode (0xffff); +data[3400] = String.fromCharCode (0xffff); +data[3401] = String.fromCharCode (0xffff); +data[3402] = String.fromCharCode (0xffff); +data[3403] = String.fromCharCode (0xffff); +data[3404] = String.fromCharCode (0xffff); +data[3405] = String.fromCharCode (0xffff); +data[3406] = String.fromCharCode (0xffff); +data[3407] = String.fromCharCode (0xffff); +data[3408] = String.fromCharCode (0xffff); +data[3409] = String.fromCharCode (0xffff); +data[3410] = String.fromCharCode (0xffff); +data[3411] = String.fromCharCode (0xffff); +data[3412] = String.fromCharCode (0xffff); +data[3413] = String.fromCharCode (0xffff); +data[3414] = String.fromCharCode (0xffff); +data[3415] = String.fromCharCode (0xffff); +data[3416] = String.fromCharCode (0xffff); +data[3417] = String.fromCharCode (0xffff); +data[3418] = String.fromCharCode (0xffff); +data[3419] = String.fromCharCode (0xffff); +data[3420] = String.fromCharCode (0xffff); +data[3421] = String.fromCharCode (0xffff); +data[3422] = String.fromCharCode (0xffff); +data[3423] = String.fromCharCode (0xffff); +data[3424] = String.fromCharCode (0xffff); +data[3425] = String.fromCharCode (0xffff); +data[3426] = String.fromCharCode (0xffff); +data[3427] = String.fromCharCode (0xffff); +data[3428] = String.fromCharCode (0xffff); +data[3429] = String.fromCharCode (0xffff); +data[3430] = String.fromCharCode (0xffff); +data[3431] = String.fromCharCode (0xffff); +data[3432] = String.fromCharCode (0xffff); +data[3433] = String.fromCharCode (0xffff); +data[3434] = String.fromCharCode (0xffff); +data[3435] = String.fromCharCode (0xffff); +data[3436] = String.fromCharCode (0xffff); +data[3437] = String.fromCharCode (0xffff); +data[3438] = String.fromCharCode (0xffff); +data[3439] = String.fromCharCode (0xffff); +data[3440] = String.fromCharCode (0xffff); +data[3441] = String.fromCharCode (0xffff); +data[3442] = String.fromCharCode (0xffff); +data[3443] = String.fromCharCode (0xffff); +data[3444] = String.fromCharCode (0xffff); +data[3445] = String.fromCharCode (0xffff); +data[3446] = String.fromCharCode (0xffff); +data[3447] = String.fromCharCode (0xffff); +data[3448] = String.fromCharCode (0xffff); +data[3449] = String.fromCharCode (0xffff); +data[3450] = String.fromCharCode (0x000f); +data[3984] = String.fromCharCode (0xffff); +data[3985] = String.fromCharCode (0xffff); +data[3986] = String.fromCharCode (0xffff); +data[3987] = String.fromCharCode (0xffff); +data[3988] = String.fromCharCode (0xffff); +data[3989] = String.fromCharCode (0xffff); +data[3990] = String.fromCharCode (0xffff); +data[3991] = String.fromCharCode (0xffff); +data[3992] = String.fromCharCode (0xffff); +data[3993] = String.fromCharCode (0xffff); +data[3994] = String.fromCharCode (0xffff); +data[3995] = String.fromCharCode (0xffff); +data[3996] = String.fromCharCode (0xffff); +data[3997] = String.fromCharCode (0xffff); +data[3998] = String.fromCharCode (0xffff); +data[3999] = String.fromCharCode (0xffff); +data[4000] = String.fromCharCode (0xffff); +data[4001] = String.fromCharCode (0xffff); +data[4002] = String.fromCharCode (0x3fff); +data[4016] = String.fromCharCode (0x007f); +data[4017] = String.fromCharCode (0x80f8); +data[4018] = String.fromCharCode (0xfdff); +data[4019] = String.fromCharCode (0x5f7f); +data[4020] = String.fromCharCode (0xffdb); +data[4021] = String.fromCharCode (0xffff); +data[4022] = String.fromCharCode (0xffff); +data[4023] = String.fromCharCode (0xffff); +data[4024] = String.fromCharCode (0xffff); +data[4025] = String.fromCharCode (0xffff); +data[4026] = String.fromCharCode (0xffff); +data[4027] = String.fromCharCode (0x0003); +data[4029] = String.fromCharCode (0xfff8); +data[4030] = String.fromCharCode (0xffff); +data[4031] = String.fromCharCode (0xffff); +data[4032] = String.fromCharCode (0xffff); +data[4033] = String.fromCharCode (0xffff); +data[4034] = String.fromCharCode (0xffff); +data[4035] = String.fromCharCode (0xffff); +data[4036] = String.fromCharCode (0xffff); +data[4037] = String.fromCharCode (0xffff); +data[4038] = String.fromCharCode (0xffff); +data[4039] = String.fromCharCode (0xffff); +data[4040] = String.fromCharCode (0xffff); +data[4041] = String.fromCharCode (0xffff); +data[4042] = String.fromCharCode (0xffff); +data[4043] = String.fromCharCode (0xffff); +data[4044] = String.fromCharCode (0xffff); +data[4045] = String.fromCharCode (0xffff); +data[4046] = String.fromCharCode (0xffff); +data[4047] = String.fromCharCode (0xffff); +data[4048] = String.fromCharCode (0xffff); +data[4049] = String.fromCharCode (0xffff); +data[4050] = String.fromCharCode (0xffff); +data[4051] = String.fromCharCode (0x3fff); +data[4053] = String.fromCharCode (0xffff); +data[4054] = String.fromCharCode (0xffff); +data[4055] = String.fromCharCode (0xffff); +data[4056] = String.fromCharCode (0xffff); +data[4057] = String.fromCharCode (0xfffc); +data[4058] = String.fromCharCode (0xffff); +data[4059] = String.fromCharCode (0xffff); +data[4060] = String.fromCharCode (0x00ff); +data[4063] = String.fromCharCode (0x0fff); +data[4071] = String.fromCharCode (0xffd7); +data[4072] = String.fromCharCode (0xffff); +data[4073] = String.fromCharCode (0xffff); +data[4074] = String.fromCharCode (0xffff); +data[4075] = String.fromCharCode (0xffff); +data[4076] = String.fromCharCode (0xffff); +data[4077] = String.fromCharCode (0xffff); +data[4078] = String.fromCharCode (0xffff); +data[4079] = String.fromCharCode (0x1fff); +data[4082] = String.fromCharCode (0xfffe); +data[4083] = String.fromCharCode (0x07ff); +data[4084] = String.fromCharCode (0xfffe); +data[4085] = String.fromCharCode (0x07ff); +data[4086] = String.fromCharCode (0xffc0); +data[4087] = String.fromCharCode (0xffff); +data[4088] = String.fromCharCode (0xffff); +data[4089] = String.fromCharCode (0xffff); +data[4090] = String.fromCharCode (0xffff); +data[4091] = String.fromCharCode (0x7fff); +data[4092] = String.fromCharCode (0xfcfc); +data[4093] = String.fromCharCode (0x1cfc); +data[4100] = String.fromCharCode (0xfffe); +data[4101] = String.fromCharCode (0x07ff); +data[4102] = String.fromCharCode (0xfffe); +data[4103] = String.fromCharCode (0x07ff); +data[4106] = String.fromCharCode (0x0400); +data[4107] = String.fromCharCode (0x0420); +data[4108] = String.fromCharCode (0xffff); +data[4109] = String.fromCharCode (0xff7f); +data[4110] = String.fromCharCode (0xffff); +data[4111] = String.fromCharCode (0xff7f); +data[4112] = String.fromCharCode (0xffff); +data[4113] = String.fromCharCode (0xffff); +data[4114] = String.fromCharCode (0xffff); +data[4115] = String.fromCharCode (0xffff); +data[4116] = String.fromCharCode (0xffff); +data[4117] = String.fromCharCode (0xffff); +data[4118] = String.fromCharCode (0xffff); +data[4119] = String.fromCharCode (0xffff); +data[4120] = String.fromCharCode (0xffff); +data[4121] = String.fromCharCode (0xffff); +data[4122] = String.fromCharCode (0xffff); +data[4123] = String.fromCharCode (0xffff); +data[4124] = String.fromCharCode (0xffff); +data[4125] = String.fromCharCode (0xffff); +data[4126] = String.fromCharCode (0xffff); +data[4127] = String.fromCharCode (0xfc3f); +data[4128] = String.fromCharCode (0xffff); +data[4129] = String.fromCharCode (0x00ff); +data[4133] = String.fromCharCode (0xffff); +data[4134] = String.fromCharCode (0xffff); +data[4135] = String.fromCharCode (0xffff); +data[4136] = String.fromCharCode (0xffff); +data[4137] = String.fromCharCode (0xffff); +data[4138] = String.fromCharCode (0x01ff); +data[4139] = String.fromCharCode (0xf9ff); +data[4140] = String.fromCharCode (0x0003); +data[4141] = String.fromCharCode (0x0003); +data[4142] = String.fromCharCode (0x001f); +data[4151] = String.fromCharCode (0x0400); +data[4152] = String.fromCharCode (0xd740); +data[4153] = String.fromCharCode (0xffff); +data[4154] = String.fromCharCode (0xfffb); +data[4155] = String.fromCharCode (0xffff); +data[4156] = String.fromCharCode (0x7fff); +data[4157] = String.fromCharCode (0x547f); +data[4158] = String.fromCharCode (0x00fd); +}); +c$.white_f = Clazz.defineMethod (c$, "white_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.white = new com.stevesoft.pat.Bits (data); +data[0] = String.fromCharCode (0x3e00); +data[1] = String.fromCharCode (0xf000); +data[2] = String.fromCharCode (0x0001); +data[512] = String.fromCharCode (0x0fff); +data[514] = String.fromCharCode (0x0300); +data[768] = String.fromCharCode (0x0001); +data[4096] = String.fromCharCode (0x3e00); +data[4097] = String.fromCharCode (0xf000); +data[4098] = String.fromCharCode (0x0001); +}); +c$.punct_f = Clazz.defineMethod (c$, "punct_f", +function () { +var data = Clazz.newCharArray (4159, '\0'); +com.stevesoft.pat.Bits.punct = new com.stevesoft.pat.Bits (data); +data[2] = String.fromCharCode (0xf7ee); +data[3] = String.fromCharCode (0x8c00); +data[4] = String.fromCharCode (0x0001); +data[5] = String.fromCharCode (0xb800); +data[7] = String.fromCharCode (0x2800); +data[10] = String.fromCharCode (0x2802); +data[11] = String.fromCharCode (0x8880); +data[55] = String.fromCharCode (0x4030); +data[56] = String.fromCharCode (0x0080); +data[85] = String.fromCharCode (0xfc00); +data[88] = String.fromCharCode (0x0200); +data[91] = String.fromCharCode (0x4000); +data[92] = String.fromCharCode (0x0009); +data[95] = String.fromCharCode (0x0018); +data[96] = String.fromCharCode (0x1000); +data[97] = String.fromCharCode (0x8800); +data[102] = String.fromCharCode (0x3c00); +data[109] = String.fromCharCode (0x0010); +data[150] = '0'; +data[151] = String.fromCharCode (0x0001); +data[226] = String.fromCharCode (0x8000); +data[229] = String.fromCharCode (0x0c00); +data[234] = String.fromCharCode (0x8000); +data[240] = String.fromCharCode (0xfff0); +data[241] = String.fromCharCode (0x0007); +data[243] = String.fromCharCode (0x3c00); +data[248] = String.fromCharCode (0x0020); +data[271] = String.fromCharCode (0x0800); +data[513] = String.fromCharCode (0xffff); +data[514] = String.fromCharCode (0x00ff); +data[515] = String.fromCharCode (0xffff); +data[516] = 'o'; +data[519] = String.fromCharCode (0x6000); +data[520] = String.fromCharCode (0x6000); +data[562] = String.fromCharCode (0x0600); +data[768] = String.fromCharCode (0xff4e); +data[769] = String.fromCharCode (0xfff3); +data[771] = String.fromCharCode (0x0001); +data[783] = String.fromCharCode (0x0800); +data[4051] = String.fromCharCode (0xc000); +data[4067] = String.fromCharCode (0xffff); +data[4068] = String.fromCharCode (0xfe1f); +data[4069] = String.fromCharCode (0xfff7); +data[4070] = String.fromCharCode (0x0d0b); +data[4080] = String.fromCharCode (0xf7ee); +data[4081] = String.fromCharCode (0x8c00); +data[4082] = String.fromCharCode (0x0001); +data[4083] = String.fromCharCode (0xb800); +data[4085] = String.fromCharCode (0x2800); +data[4086] = String.fromCharCode (0x003e); +data[4098] = String.fromCharCode (0xf7ee); +data[4099] = String.fromCharCode (0x8c00); +data[4100] = String.fromCharCode (0x0001); +data[4101] = String.fromCharCode (0xb800); +data[4103] = String.fromCharCode (0x2800); +data[4106] = String.fromCharCode (0x2802); +data[4107] = String.fromCharCode (0x8880); +data[4151] = String.fromCharCode (0x4030); +data[4152] = String.fromCharCode (0x0080); +}); +Clazz.defineStatics (c$, +"upper", null, +"lower", null, +"title", null, +"currency", null, +"decimal_digit", null, +"math", null, +"letter", null, +"white", null, +"punct", null); diff --git a/bin/com/stevesoft/pat/Boundary.js b/bin/com/stevesoft/pat/Boundary.js index 58bb19c..9eaff99 100644 --- a/bin/com/stevesoft/pat/Boundary.js +++ b/bin/com/stevesoft/pat/Boundary.js @@ -1,52 +1,52 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Boundary", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "Boundary", com.stevesoft.pat.Pattern); -Clazz.overrideMethod (c$, "toString", -function () { -return "\\b" + this.nextString (); -}); -Clazz.defineMethod (c$, "isAChar", -function (c) { -if (c >= 'a' && c <= 'z') { -return true; -}if (c >= 'A' && c <= 'Z') { -return true; -}if (c >= '0' && c <= '9') { -return true; -}if (c == '_') { -return true; -}return false; -}, "~S"); -Clazz.defineMethod (c$, "matchLeft", -function (pos, pt) { -if (pos <= 0) { -return true; -}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos - 1))) { -return false; -}return true; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "matchRight", -function (pos, pt) { -if (pos < 0) { -return false; -}if (pos + 1 >= pt.src.length ()) { -return true; -}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos + 1))) { -return false; -}return true; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (this.matchRight (pos - 1, pt) || this.matchLeft (pos, pt)) { -return this.nextMatch (pos, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.Boundary (); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Boundary", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "Boundary", com.stevesoft.pat.Pattern); +Clazz.overrideMethod (c$, "toString", +function () { +return "\\b" + this.nextString (); +}); +Clazz.defineMethod (c$, "isAChar", +function (c) { +if (c >= 'a' && c <= 'z') { +return true; +}if (c >= 'A' && c <= 'Z') { +return true; +}if (c >= '0' && c <= '9') { +return true; +}if (c == '_') { +return true; +}return false; +}, "~S"); +Clazz.defineMethod (c$, "matchLeft", +function (pos, pt) { +if (pos <= 0) { +return true; +}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos - 1))) { +return false; +}return true; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "matchRight", +function (pos, pt) { +if (pos < 0) { +return false; +}if (pos + 1 >= pt.src.length ()) { +return true; +}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos + 1))) { +return false; +}return true; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (this.matchRight (pos - 1, pt) || this.matchLeft (pos, pt)) { +return this.nextMatch (pos, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Boundary (); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/Bracket.js b/bin/com/stevesoft/pat/Bracket.js index 26a2303..064ec34 100644 --- a/bin/com/stevesoft/pat/Bracket.js +++ b/bin/com/stevesoft/pat/Bracket.js @@ -1,60 +1,60 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.Bracket", ["com.stevesoft.pat.patInt", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.neg = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Bracket", com.stevesoft.pat.Or); -Clazz.makeConstructor (c$, -function (n) { -Clazz.superConstructor (this, com.stevesoft.pat.Bracket, []); -this.neg = n; -}, "~B"); -Clazz.overrideMethod (c$, "leftForm", -function () { -if (this.neg) { -return "[^"; -} else { -return "["; -}}); -Clazz.overrideMethod (c$, "rightForm", -function () { -return "]"; -}); -Clazz.overrideMethod (c$, "sepForm", -function () { -return ""; -}); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -if (pos >= pt.src.length ()) { -return -1; -}var r = Clazz.superCall (this, com.stevesoft.pat.Bracket, "matchInternal", [pos, pt]); -if ((this.neg && r < 0) || (!this.neg && r >= 0)) { -return this.nextMatch (pos + 1, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "addOr", -function (p) { -this.pv = null; -this.v.addElement (p); -p.setParent (null); -return this; -}, "com.stevesoft.pat.Pattern"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var b = new com.stevesoft.pat.Bracket (this.neg); -b.v = new java.util.Vector (); -for (var i = 0; i < this.v.size (); i++) { -b.v.addElement ((this.v.elementAt (i)).clone1 (h)); -} -return b; -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.Bracket", ["com.stevesoft.pat.patInt", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.neg = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Bracket", com.stevesoft.pat.Or); +Clazz.makeConstructor (c$, +function (n) { +Clazz.superConstructor (this, com.stevesoft.pat.Bracket, []); +this.neg = n; +}, "~B"); +Clazz.overrideMethod (c$, "leftForm", +function () { +if (this.neg) { +return "[^"; +} else { +return "["; +}}); +Clazz.overrideMethod (c$, "rightForm", +function () { +return "]"; +}); +Clazz.overrideMethod (c$, "sepForm", +function () { +return ""; +}); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +if (pos >= pt.src.length ()) { +return -1; +}var r = Clazz.superCall (this, com.stevesoft.pat.Bracket, "matchInternal", [pos, pt]); +if ((this.neg && r < 0) || (!this.neg && r >= 0)) { +return this.nextMatch (pos + 1, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "addOr", +function (p) { +this.pv = null; +this.v.addElement (p); +p.setParent (null); +return this; +}, "com.stevesoft.pat.Pattern"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var b = new com.stevesoft.pat.Bracket (this.neg); +b.v = new java.util.Vector (); +for (var i = 0; i < this.v.size (); i++) { +b.v.addElement ((this.v.elementAt (i)).clone1 (h)); +} +return b; +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/CaseMgr.js b/bin/com/stevesoft/pat/CaseMgr.js index e35645b..30fe2ec 100644 --- a/bin/com/stevesoft/pat/CaseMgr.js +++ b/bin/com/stevesoft/pat/CaseMgr.js @@ -1,94 +1,94 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.CaseMgr", ["java.lang.Character"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "CaseMgr"); -c$.toUpperCaseC = Clazz.defineMethod (c$, "toUpperCaseC", -function (c) { -return Character.toUpperCase (c); -}, "~S"); -c$.toLowerCaseC = Clazz.defineMethod (c$, "toLowerCaseC", -function (c) { -return Character.toLowerCase (c); -}, "~S"); -c$.toUpperCase = Clazz.defineMethod (c$, "toUpperCase", -function (s) { -return s.toUpperCase (); -}, "~S"); -c$.toLowerCase = Clazz.defineMethod (c$, "toLowerCase", -function (s) { -return s.toLowerCase (); -}, "~S"); -c$.toTitleCaseC = Clazz.defineMethod (c$, "toTitleCaseC", -function (c) { -return Character.toUpperCase (c); -}, "~S"); -c$.regionMatchesLike = Clazz.defineMethod (c$, "regionMatchesLike", -function (s1, ign, i1, s2, i2, i3) { -var itot = i2 + i3; -if (itot > s2.length () || i1 + i3 > s1.length ()) { -return false; -}if (!ign) { -for (var i = i2; i < itot; i++) { -if (s2.charAt (i) != s1.charAt (i1++)) { -return false; -}} -} else { -for (var i = i2; i < itot; i++) { -if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { -return false; -}} -}return true; -}, "com.stevesoft.pat.StringLike,~B,~N,com.stevesoft.pat.StringLike,~N,~N"); -c$.regionMatches = Clazz.defineMethod (c$, "regionMatches", -function (s1, ign, i1, s2, i2, i3) { -var itot = i2 + i3; -if (itot > s2.length () || i1 + i3 > s1.length) { -return false; -}if (!ign) { -for (var i = i2; i < itot; i++) { -if (s2.charAt (i) != s1.charAt (i1++)) { -return false; -}} -} else { -for (var i = i2; i < itot; i++) { -if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { -return false; -}} -}return true; -}, "~S,~B,~N,com.stevesoft.pat.StringLike,~N,~N"); -c$.regionMatchesLike2 = Clazz.defineMethod (c$, "regionMatchesLike2", -function (s1, ign, i1, s2, i2, i3) { -var itot = i2 + i3; -if (itot > s2.length || i1 + i3 > s1.length ()) { -return false; -}if (!ign) { -for (var i = i2; i < itot; i++) { -if (s2.charAt (i) != s1.charAt (i1++)) { -return false; -}} -} else { -for (var i = i2; i < itot; i++) { -if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { -return false; -}} -}return true; -}, "com.stevesoft.pat.StringLike,~B,~N,~S,~N,~N"); -c$.regionMatches2 = Clazz.defineMethod (c$, "regionMatches2", -function (s1, ign, i1, s2, i2, i3) { -var itot = i2 + i3; -if (itot > s2.length || i1 + i3 > s1.length) { -return false; -}if (!ign) { -for (var i = i2; i < itot; i++) { -if (s2.charAt (i) != s1.charAt (i1++)) { -return false; -}} -} else { -for (var i = i2; i < itot; i++) { -if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { -return false; -}} -}return true; -}, "~S,~B,~N,~S,~N,~N"); -Clazz.defineStatics (c$, -"java_1_0", false); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.CaseMgr", ["java.lang.Character"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "CaseMgr"); +c$.toUpperCaseC = Clazz.defineMethod (c$, "toUpperCaseC", +function (c) { +return Character.toUpperCase (c); +}, "~S"); +c$.toLowerCaseC = Clazz.defineMethod (c$, "toLowerCaseC", +function (c) { +return Character.toLowerCase (c); +}, "~S"); +c$.toUpperCase = Clazz.defineMethod (c$, "toUpperCase", +function (s) { +return s.toUpperCase (); +}, "~S"); +c$.toLowerCase = Clazz.defineMethod (c$, "toLowerCase", +function (s) { +return s.toLowerCase (); +}, "~S"); +c$.toTitleCaseC = Clazz.defineMethod (c$, "toTitleCaseC", +function (c) { +return Character.toUpperCase (c); +}, "~S"); +c$.regionMatchesLike = Clazz.defineMethod (c$, "regionMatchesLike", +function (s1, ign, i1, s2, i2, i3) { +var itot = i2 + i3; +if (itot > s2.length () || i1 + i3 > s1.length ()) { +return false; +}if (!ign) { +for (var i = i2; i < itot; i++) { +if (s2.charAt (i) != s1.charAt (i1++)) { +return false; +}} +} else { +for (var i = i2; i < itot; i++) { +if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { +return false; +}} +}return true; +}, "com.stevesoft.pat.StringLike,~B,~N,com.stevesoft.pat.StringLike,~N,~N"); +c$.regionMatches = Clazz.defineMethod (c$, "regionMatches", +function (s1, ign, i1, s2, i2, i3) { +var itot = i2 + i3; +if (itot > s2.length () || i1 + i3 > s1.length) { +return false; +}if (!ign) { +for (var i = i2; i < itot; i++) { +if (s2.charAt (i) != s1.charAt (i1++)) { +return false; +}} +} else { +for (var i = i2; i < itot; i++) { +if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { +return false; +}} +}return true; +}, "~S,~B,~N,com.stevesoft.pat.StringLike,~N,~N"); +c$.regionMatchesLike2 = Clazz.defineMethod (c$, "regionMatchesLike2", +function (s1, ign, i1, s2, i2, i3) { +var itot = i2 + i3; +if (itot > s2.length || i1 + i3 > s1.length ()) { +return false; +}if (!ign) { +for (var i = i2; i < itot; i++) { +if (s2.charAt (i) != s1.charAt (i1++)) { +return false; +}} +} else { +for (var i = i2; i < itot; i++) { +if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { +return false; +}} +}return true; +}, "com.stevesoft.pat.StringLike,~B,~N,~S,~N,~N"); +c$.regionMatches2 = Clazz.defineMethod (c$, "regionMatches2", +function (s1, ign, i1, s2, i2, i3) { +var itot = i2 + i3; +if (itot > s2.length || i1 + i3 > s1.length) { +return false; +}if (!ign) { +for (var i = i2; i < itot; i++) { +if (s2.charAt (i) != s1.charAt (i1++)) { +return false; +}} +} else { +for (var i = i2; i < itot; i++) { +if (com.stevesoft.pat.CaseMgr.toLowerCaseC (s2.charAt (i)) != com.stevesoft.pat.CaseMgr.toLowerCaseC (s1.charAt (i1++))) { +return false; +}} +}return true; +}, "~S,~B,~N,~S,~N,~N"); +Clazz.defineStatics (c$, +"java_1_0", false); +}); diff --git a/bin/com/stevesoft/pat/ChangeRule.js b/bin/com/stevesoft/pat/ChangeRule.js index 1a6f683..3edb0ff 100644 --- a/bin/com/stevesoft/pat/ChangeRule.js +++ b/bin/com/stevesoft/pat/ChangeRule.js @@ -1,35 +1,35 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.ChangeRule", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.NewRule = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "ChangeRule", com.stevesoft.pat.SpecialRule); -Clazz.makeConstructor (c$, -function (c) { -Clazz.superConstructor (this, com.stevesoft.pat.ChangeRule, []); -this.NewRule = c.NewRule; -}, "com.stevesoft.pat.ChangeRule"); -Clazz.makeConstructor (c$, -function (nm, rr) { -Clazz.superConstructor (this, com.stevesoft.pat.ChangeRule, []); -this.name = nm; -this.NewRule = rr; -}, "~S,com.stevesoft.pat.Regex"); -Clazz.makeConstructor (c$, -function (nm, tr) { -Clazz.superConstructor (this, com.stevesoft.pat.ChangeRule, []); -this.name = nm; -this.NewRule = tr.rp; -}, "~S,com.stevesoft.pat.Transformer"); -Clazz.overrideMethod (c$, "clone1", -function () { -return new com.stevesoft.pat.ChangeRule (this); -}); -Clazz.overrideMethod (c$, "toString1", -function () { -return "${=" + this.name + "}"; -}); -Clazz.overrideMethod (c$, "apply", -function (sb, rr) { -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.ChangeRule", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.NewRule = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "ChangeRule", com.stevesoft.pat.SpecialRule); +Clazz.makeConstructor (c$, +function (c) { +Clazz.superConstructor (this, com.stevesoft.pat.ChangeRule, []); +this.NewRule = c.NewRule; +}, "com.stevesoft.pat.ChangeRule"); +Clazz.makeConstructor (c$, +function (nm, rr) { +Clazz.superConstructor (this, com.stevesoft.pat.ChangeRule, []); +this.name = nm; +this.NewRule = rr; +}, "~S,com.stevesoft.pat.Regex"); +Clazz.makeConstructor (c$, +function (nm, tr) { +Clazz.superConstructor (this, com.stevesoft.pat.ChangeRule, []); +this.name = nm; +this.NewRule = tr.rp; +}, "~S,com.stevesoft.pat.Transformer"); +Clazz.overrideMethod (c$, "clone1", +function () { +return new com.stevesoft.pat.ChangeRule (this); +}); +Clazz.overrideMethod (c$, "toString1", +function () { +return "${=" + this.name + "}"; +}); +Clazz.overrideMethod (c$, "apply", +function (sb, rr) { +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +}); diff --git a/bin/com/stevesoft/pat/CodeRule.js b/bin/com/stevesoft/pat/CodeRule.js index 85a0917..92c00f3 100644 --- a/bin/com/stevesoft/pat/CodeRule.js +++ b/bin/com/stevesoft/pat/CodeRule.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.CodeRule", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.c = 'E'; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "CodeRule", com.stevesoft.pat.SpecialRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.CodeRule, []); -}); -Clazz.makeConstructor (c$, -function (c) { -Clazz.superConstructor (this, com.stevesoft.pat.CodeRule, []); -this.c = c; -}, "~S"); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -sb.setMode (this.c); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return "\\" + this.c; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.CodeRule", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.c = 'E'; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "CodeRule", com.stevesoft.pat.SpecialRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.CodeRule, []); +}); +Clazz.makeConstructor (c$, +function (c) { +Clazz.superConstructor (this, com.stevesoft.pat.CodeRule, []); +this.c = c; +}, "~S"); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +sb.setMode (this.c); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return "\\" + this.c; +}); +}); diff --git a/bin/com/stevesoft/pat/Ctrl.js b/bin/com/stevesoft/pat/Ctrl.js index 9a42c67..43250ce 100644 --- a/bin/com/stevesoft/pat/Ctrl.js +++ b/bin/com/stevesoft/pat/Ctrl.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -c$ = Clazz.declareType (com.stevesoft.pat, "Ctrl"); -Clazz.defineStatics (c$, -"cmap", Clazz.newCharArray (-1, [String.fromCharCode (64), 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', String.fromCharCode (91), String.fromCharCode (92), String.fromCharCode (93), String.fromCharCode (94), String.fromCharCode (95), String.fromCharCode (96), 'a', 'a', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', String.fromCharCode (123), String.fromCharCode (124), String.fromCharCode (125), String.fromCharCode (126), String.fromCharCode (127), String.fromCharCode (0), String.fromCharCode (1), String.fromCharCode (2), String.fromCharCode (3), String.fromCharCode (4), String.fromCharCode (5), String.fromCharCode (6), String.fromCharCode (7), String.fromCharCode (8), String.fromCharCode (9), String.fromCharCode (10), String.fromCharCode (11), String.fromCharCode (12), String.fromCharCode (13), String.fromCharCode (14), String.fromCharCode (15), String.fromCharCode (16), String.fromCharCode (17), String.fromCharCode (18), String.fromCharCode (19), String.fromCharCode (20), String.fromCharCode (21), String.fromCharCode (22), String.fromCharCode (23), String.fromCharCode (24), String.fromCharCode (25), String.fromCharCode (26), String.fromCharCode (27), String.fromCharCode (27), String.fromCharCode (29), String.fromCharCode (30), String.fromCharCode (31), String.fromCharCode (32), String.fromCharCode (1), String.fromCharCode (2), String.fromCharCode (3), String.fromCharCode (4), String.fromCharCode (5), String.fromCharCode (6), String.fromCharCode (7), String.fromCharCode (8), String.fromCharCode (9), String.fromCharCode (10), String.fromCharCode (11), String.fromCharCode (12), String.fromCharCode (13), String.fromCharCode (14), String.fromCharCode (15), String.fromCharCode (16), String.fromCharCode (17), String.fromCharCode (18), String.fromCharCode (19), String.fromCharCode (20), String.fromCharCode (21), String.fromCharCode (22), String.fromCharCode (23), String.fromCharCode (24), String.fromCharCode (25), String.fromCharCode (26), String.fromCharCode (59), String.fromCharCode (60), String.fromCharCode (61), String.fromCharCode (62), String.fromCharCode (63), String.fromCharCode (192), String.fromCharCode (193), String.fromCharCode (194), String.fromCharCode (195), String.fromCharCode (196), String.fromCharCode (197), String.fromCharCode (198), String.fromCharCode (199), String.fromCharCode (200), String.fromCharCode (201), String.fromCharCode (202), String.fromCharCode (203), String.fromCharCode (204), String.fromCharCode (205), String.fromCharCode (206), String.fromCharCode (207), String.fromCharCode (208), String.fromCharCode (209), String.fromCharCode (210), String.fromCharCode (211), String.fromCharCode (212), String.fromCharCode (213), String.fromCharCode (214), String.fromCharCode (215), String.fromCharCode (216), String.fromCharCode (217), String.fromCharCode (218), String.fromCharCode (219), String.fromCharCode (220), String.fromCharCode (221), String.fromCharCode (222), String.fromCharCode (223), String.fromCharCode (224), String.fromCharCode (225), String.fromCharCode (226), String.fromCharCode (227), String.fromCharCode (228), String.fromCharCode (229), String.fromCharCode (230), String.fromCharCode (231), String.fromCharCode (232), String.fromCharCode (233), String.fromCharCode (234), String.fromCharCode (235), String.fromCharCode (236), String.fromCharCode (237), String.fromCharCode (238), String.fromCharCode (239), String.fromCharCode (240), String.fromCharCode (241), String.fromCharCode (242), String.fromCharCode (243), String.fromCharCode (244), String.fromCharCode (245), String.fromCharCode (246), String.fromCharCode (247), String.fromCharCode (248), String.fromCharCode (249), String.fromCharCode (250), String.fromCharCode (251), String.fromCharCode (252), String.fromCharCode (253), String.fromCharCode (254), String.fromCharCode (255), String.fromCharCode (128), String.fromCharCode (129), String.fromCharCode (130), String.fromCharCode (131), String.fromCharCode (132), String.fromCharCode (133), String.fromCharCode (134), String.fromCharCode (135), String.fromCharCode (136), String.fromCharCode (137), String.fromCharCode (138), String.fromCharCode (139), String.fromCharCode (140), String.fromCharCode (141), String.fromCharCode (142), String.fromCharCode (143), String.fromCharCode (144), String.fromCharCode (145), String.fromCharCode (146), String.fromCharCode (147), String.fromCharCode (148), String.fromCharCode (149), String.fromCharCode (150), String.fromCharCode (151), String.fromCharCode (152), String.fromCharCode (153), String.fromCharCode (154), String.fromCharCode (155), String.fromCharCode (156), String.fromCharCode (157), String.fromCharCode (158), String.fromCharCode (159), String.fromCharCode (160), String.fromCharCode (161), String.fromCharCode (162), String.fromCharCode (163), String.fromCharCode (164), String.fromCharCode (165), String.fromCharCode (166), String.fromCharCode (167), String.fromCharCode (168), String.fromCharCode (169), String.fromCharCode (170), String.fromCharCode (171), String.fromCharCode (172), String.fromCharCode (173), String.fromCharCode (174), String.fromCharCode (175), String.fromCharCode (176), String.fromCharCode (177), String.fromCharCode (178), String.fromCharCode (179), String.fromCharCode (180), String.fromCharCode (181), String.fromCharCode (182), String.fromCharCode (183), String.fromCharCode (184), String.fromCharCode (185), String.fromCharCode (186), String.fromCharCode (187), String.fromCharCode (188), String.fromCharCode (189), String.fromCharCode (190), String.fromCharCode (191)])); +Clazz.declarePackage ("com.stevesoft.pat"); +c$ = Clazz.declareType (com.stevesoft.pat, "Ctrl"); +Clazz.defineStatics (c$, +"cmap", Clazz.newCharArray (-1, [String.fromCharCode (64), 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', String.fromCharCode (91), String.fromCharCode (92), String.fromCharCode (93), String.fromCharCode (94), String.fromCharCode (95), String.fromCharCode (96), 'a', 'a', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', String.fromCharCode (123), String.fromCharCode (124), String.fromCharCode (125), String.fromCharCode (126), String.fromCharCode (127), String.fromCharCode (0), String.fromCharCode (1), String.fromCharCode (2), String.fromCharCode (3), String.fromCharCode (4), String.fromCharCode (5), String.fromCharCode (6), String.fromCharCode (7), String.fromCharCode (8), String.fromCharCode (9), String.fromCharCode (10), String.fromCharCode (11), String.fromCharCode (12), String.fromCharCode (13), String.fromCharCode (14), String.fromCharCode (15), String.fromCharCode (16), String.fromCharCode (17), String.fromCharCode (18), String.fromCharCode (19), String.fromCharCode (20), String.fromCharCode (21), String.fromCharCode (22), String.fromCharCode (23), String.fromCharCode (24), String.fromCharCode (25), String.fromCharCode (26), String.fromCharCode (27), String.fromCharCode (27), String.fromCharCode (29), String.fromCharCode (30), String.fromCharCode (31), String.fromCharCode (32), String.fromCharCode (1), String.fromCharCode (2), String.fromCharCode (3), String.fromCharCode (4), String.fromCharCode (5), String.fromCharCode (6), String.fromCharCode (7), String.fromCharCode (8), String.fromCharCode (9), String.fromCharCode (10), String.fromCharCode (11), String.fromCharCode (12), String.fromCharCode (13), String.fromCharCode (14), String.fromCharCode (15), String.fromCharCode (16), String.fromCharCode (17), String.fromCharCode (18), String.fromCharCode (19), String.fromCharCode (20), String.fromCharCode (21), String.fromCharCode (22), String.fromCharCode (23), String.fromCharCode (24), String.fromCharCode (25), String.fromCharCode (26), String.fromCharCode (59), String.fromCharCode (60), String.fromCharCode (61), String.fromCharCode (62), String.fromCharCode (63), String.fromCharCode (192), String.fromCharCode (193), String.fromCharCode (194), String.fromCharCode (195), String.fromCharCode (196), String.fromCharCode (197), String.fromCharCode (198), String.fromCharCode (199), String.fromCharCode (200), String.fromCharCode (201), String.fromCharCode (202), String.fromCharCode (203), String.fromCharCode (204), String.fromCharCode (205), String.fromCharCode (206), String.fromCharCode (207), String.fromCharCode (208), String.fromCharCode (209), String.fromCharCode (210), String.fromCharCode (211), String.fromCharCode (212), String.fromCharCode (213), String.fromCharCode (214), String.fromCharCode (215), String.fromCharCode (216), String.fromCharCode (217), String.fromCharCode (218), String.fromCharCode (219), String.fromCharCode (220), String.fromCharCode (221), String.fromCharCode (222), String.fromCharCode (223), String.fromCharCode (224), String.fromCharCode (225), String.fromCharCode (226), String.fromCharCode (227), String.fromCharCode (228), String.fromCharCode (229), String.fromCharCode (230), String.fromCharCode (231), String.fromCharCode (232), String.fromCharCode (233), String.fromCharCode (234), String.fromCharCode (235), String.fromCharCode (236), String.fromCharCode (237), String.fromCharCode (238), String.fromCharCode (239), String.fromCharCode (240), String.fromCharCode (241), String.fromCharCode (242), String.fromCharCode (243), String.fromCharCode (244), String.fromCharCode (245), String.fromCharCode (246), String.fromCharCode (247), String.fromCharCode (248), String.fromCharCode (249), String.fromCharCode (250), String.fromCharCode (251), String.fromCharCode (252), String.fromCharCode (253), String.fromCharCode (254), String.fromCharCode (255), String.fromCharCode (128), String.fromCharCode (129), String.fromCharCode (130), String.fromCharCode (131), String.fromCharCode (132), String.fromCharCode (133), String.fromCharCode (134), String.fromCharCode (135), String.fromCharCode (136), String.fromCharCode (137), String.fromCharCode (138), String.fromCharCode (139), String.fromCharCode (140), String.fromCharCode (141), String.fromCharCode (142), String.fromCharCode (143), String.fromCharCode (144), String.fromCharCode (145), String.fromCharCode (146), String.fromCharCode (147), String.fromCharCode (148), String.fromCharCode (149), String.fromCharCode (150), String.fromCharCode (151), String.fromCharCode (152), String.fromCharCode (153), String.fromCharCode (154), String.fromCharCode (155), String.fromCharCode (156), String.fromCharCode (157), String.fromCharCode (158), String.fromCharCode (159), String.fromCharCode (160), String.fromCharCode (161), String.fromCharCode (162), String.fromCharCode (163), String.fromCharCode (164), String.fromCharCode (165), String.fromCharCode (166), String.fromCharCode (167), String.fromCharCode (168), String.fromCharCode (169), String.fromCharCode (170), String.fromCharCode (171), String.fromCharCode (172), String.fromCharCode (173), String.fromCharCode (174), String.fromCharCode (175), String.fromCharCode (176), String.fromCharCode (177), String.fromCharCode (178), String.fromCharCode (179), String.fromCharCode (180), String.fromCharCode (181), String.fromCharCode (182), String.fromCharCode (183), String.fromCharCode (184), String.fromCharCode (185), String.fromCharCode (186), String.fromCharCode (187), String.fromCharCode (188), String.fromCharCode (189), String.fromCharCode (190), String.fromCharCode (191)])); diff --git a/bin/com/stevesoft/pat/Custom.js b/bin/com/stevesoft/pat/Custom.js index 4e0fa72..44fa656 100644 --- a/bin/com/stevesoft/pat/Custom.js +++ b/bin/com/stevesoft/pat/Custom.js @@ -1,41 +1,41 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Custom", ["com.stevesoft.pat.Regex"], function () { -c$ = Clazz.decorateAsClass (function () { -this.select = null; -this.v = null; -this.start = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Custom", com.stevesoft.pat.PatternSub); -Clazz.makeConstructor (c$, -function (s) { -Clazz.superConstructor (this, com.stevesoft.pat.Custom, []); -this.select = s; -this.v = com.stevesoft.pat.Regex.validators.get (s); -}, "~S"); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -this.start = pos; -return this.sub.matchInternal (pos, pt); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -var a = this.v.argsave == null ? "" : ":" + this.v.argsave; -return "(??" + this.select + a + ")" + this.nextString (); -}); -Clazz.overrideMethod (c$, "minChars", -function () { -return this.v.minChars (); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return this.v.maxChars (); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var c = new com.stevesoft.pat.Custom (this.select); -h.put (c, c); -h.put (this, c); -c.sub = this.sub.clone (h); -return c; -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Custom", ["com.stevesoft.pat.Regex"], function () { +c$ = Clazz.decorateAsClass (function () { +this.select = null; +this.v = null; +this.start = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Custom", com.stevesoft.pat.PatternSub); +Clazz.makeConstructor (c$, +function (s) { +Clazz.superConstructor (this, com.stevesoft.pat.Custom, []); +this.select = s; +this.v = com.stevesoft.pat.Regex.validators.get (s); +}, "~S"); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +this.start = pos; +return this.sub.matchInternal (pos, pt); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +var a = this.v.argsave == null ? "" : ":" + this.v.argsave; +return "(??" + this.select + a + ")" + this.nextString (); +}); +Clazz.overrideMethod (c$, "minChars", +function () { +return this.v.minChars (); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return this.v.maxChars (); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var c = new com.stevesoft.pat.Custom (this.select); +h.put (c, c); +h.put (this, c); +c.sub = this.sub.clone (h); +return c; +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/CustomEndpoint.js b/bin/com/stevesoft/pat/CustomEndpoint.js index f5cb0ed..800608f 100644 --- a/bin/com/stevesoft/pat/CustomEndpoint.js +++ b/bin/com/stevesoft/pat/CustomEndpoint.js @@ -1,27 +1,27 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.CustomEndpoint", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.c = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "CustomEndpoint", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (cm) { -Clazz.superConstructor (this, com.stevesoft.pat.CustomEndpoint, []); -this.c = cm; -}, "com.stevesoft.pat.Custom"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -var npos = this.c.v.validate (pt.src, this.c.start, pos); -if (npos >= 0) { -return this.nextMatch (npos, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -return ""; -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.CustomEndpoint (this.c.clone (h)); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.CustomEndpoint", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.c = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "CustomEndpoint", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (cm) { +Clazz.superConstructor (this, com.stevesoft.pat.CustomEndpoint, []); +this.c = cm; +}, "com.stevesoft.pat.Custom"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +var npos = this.c.v.validate (pt.src, this.c.start, pos); +if (npos >= 0) { +return this.nextMatch (npos, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +return ""; +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.CustomEndpoint (this.c.clone (h)); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/DirFileRegex.js b/bin/com/stevesoft/pat/DirFileRegex.js index 0a2470f..b078e11 100644 --- a/bin/com/stevesoft/pat/DirFileRegex.js +++ b/bin/com/stevesoft/pat/DirFileRegex.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.FileRegex"], "com.stevesoft.pat.DirFileRegex", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "DirFileRegex", com.stevesoft.pat.FileRegex); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.FileRegex"], "com.stevesoft.pat.DirFileRegex", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "DirFileRegex", com.stevesoft.pat.FileRegex); +}); diff --git a/bin/com/stevesoft/pat/DotMulti.class b/bin/com/stevesoft/pat/DotMulti.class index 3ec04e2d2bc419b0f63078f4e3c026dac3f9b55f..25dfe0a71579a0a95e51452699c7f0cd45413f0d 100644 GIT binary patch delta 29 kcmZ1|(Iv4VfrHU-b0P;TGqW~>_~cA(1tvbR$&0w_0dPMD8vpkj0{Xb1|tWPFw^92 G?s@- diff --git a/bin/com/stevesoft/pat/DotMulti.js b/bin/com/stevesoft/pat/DotMulti.js index 3584af1..172397b 100644 --- a/bin/com/stevesoft/pat/DotMulti.js +++ b/bin/com/stevesoft/pat/DotMulti.js @@ -1,129 +1,129 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.DotMulti", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.fewestMatches = null; -this.mostMatches = null; -this.matchFewest = false; -this.src = null; -this.srclength = 0; -this.dotDoesntMatchCR = true; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "DotMulti", com.stevesoft.pat.PatternSub); -Clazz.overrideMethod (c$, "minChars", -function () { -return this.fewestMatches; -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return this.mostMatches; -}); -Clazz.makeConstructor (c$, -function (a, b) { -Clazz.superConstructor (this, com.stevesoft.pat.DotMulti, []); -this.fewestMatches = a; -this.mostMatches = b; -}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt"); -Clazz.overrideMethod (c$, "toString", -function () { -return ".{" + this.fewestMatches + "," + this.mostMatches + "}" + (this.matchFewest ? "?" : "") + "(?# <= dot multi)" + this.nextString (); -}); -Clazz.defineMethod (c$, "submatchInternal", -function (pos, pt) { -if (pos < this.srclength) { -if (this.dotDoesntMatchCR) { -if (this.src.charAt (pos) != '\n') { -return 1 + pos; -}} else { -return 1 + pos; -}}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -var m = -1; -var i = pos; -this.src = pt.src; -this.srclength = this.src.length (); -this.dotDoesntMatchCR = pt.dotDoesntMatchCR; -if (this.matchFewest) { -var nMatches = 0; -while (this.fewestMatches.intValue () > nMatches) { -i = this.submatchInternal (i, pt); -if (i < 0) { -return -1; -}nMatches++; -} -if (i < 0) { -return -1; -}var ii = this.nextMatch (i, pt); -if (ii >= 0) { -return ii; -}if (!this.mostMatches.finite ()) { -while (i >= 0) { -i = this.submatchInternal (i, pt); -if (i < 0) { -return -1; -}ii = this.nextMatch (i, pt); -if (ii >= 0) { -return ii; -}} -} else { -while (i > 0) { -i = this.submatchInternal (i, pt); -if (i < 0) { -return -1; -}nMatches++; -if (nMatches > this.mostMatches.intValue ()) { -return -1; -}ii = this.nextMatch (i, pt); -if (ii >= 0) { -return ii; -}} -}return -1; -}var nMatches = 0; -while (this.fewestMatches.intValue () > nMatches) { -i = this.submatchInternal (i, pt); -if (i >= 0) { -nMatches++; -} else { -return -1; -}} -m = i; -if (this.mostMatches.finite ()) { -while (nMatches < this.mostMatches.intValue ()) { -i = this.submatchInternal (i, pt); -if (i >= 0) { -m = i; -nMatches++; -} else { -break; -}} -} else { -while (true) { -i = this.submatchInternal (i, pt); -if (i >= 0) { -m = i; -nMatches++; -} else { -break; -}} -}while (m >= pos) { -var r = this.nextMatch (m, pt); -if (r >= 0) { -return r; -}m -= 1; -nMatches--; -if (nMatches < this.fewestMatches.intValue ()) { -return -1; -}} -return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var dm = new com.stevesoft.pat.DotMulti (this.fewestMatches, this.mostMatches); -dm.matchFewest = this.matchFewest; -return dm; -}, "java.util.Hashtable"); -Clazz.defineStatics (c$, -"step", 1, -"idcount", 1); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.DotMulti", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.fewestMatches = null; +this.mostMatches = null; +this.matchFewest = false; +this.src = null; +this.srclength = 0; +this.dotDoesntMatchCR = true; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "DotMulti", com.stevesoft.pat.PatternSub); +Clazz.overrideMethod (c$, "minChars", +function () { +return this.fewestMatches; +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return this.mostMatches; +}); +Clazz.makeConstructor (c$, +function (a, b) { +Clazz.superConstructor (this, com.stevesoft.pat.DotMulti, []); +this.fewestMatches = a; +this.mostMatches = b; +}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt"); +Clazz.overrideMethod (c$, "toString", +function () { +return ".{" + this.fewestMatches + "," + this.mostMatches + "}" + (this.matchFewest ? "?" : "") + "(?# <= dot multi)" + this.nextString (); +}); +Clazz.defineMethod (c$, "submatchInternal", +function (pos, pt) { +if (pos < this.srclength) { +if (this.dotDoesntMatchCR) { +if (this.src.charAt (pos) != '\n') { +return 1 + pos; +}} else { +return 1 + pos; +}}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +var m = -1; +var i = pos; +this.src = pt.src; +this.srclength = this.src.length (); +this.dotDoesntMatchCR = pt.dotDoesntMatchCR; +if (this.matchFewest) { +var nMatches = 0; +while (this.fewestMatches.intValue () > nMatches) { +i = this.submatchInternal (i, pt); +if (i < 0) { +return -1; +}nMatches++; +} +if (i < 0) { +return -1; +}var ii = this.nextMatch (i, pt); +if (ii >= 0) { +return ii; +}if (!this.mostMatches.finite ()) { +while (i >= 0) { +i = this.submatchInternal (i, pt); +if (i < 0) { +return -1; +}ii = this.nextMatch (i, pt); +if (ii >= 0) { +return ii; +}} +} else { +while (i > 0) { +i = this.submatchInternal (i, pt); +if (i < 0) { +return -1; +}nMatches++; +if (nMatches > this.mostMatches.intValue ()) { +return -1; +}ii = this.nextMatch (i, pt); +if (ii >= 0) { +return ii; +}} +}return -1; +}var nMatches = 0; +while (this.fewestMatches.intValue () > nMatches) { +i = this.submatchInternal (i, pt); +if (i >= 0) { +nMatches++; +} else { +return -1; +}} +m = i; +if (this.mostMatches.finite ()) { +while (nMatches < this.mostMatches.intValue ()) { +i = this.submatchInternal (i, pt); +if (i >= 0) { +m = i; +nMatches++; +} else { +break; +}} +} else { +while (true) { +i = this.submatchInternal (i, pt); +if (i >= 0) { +m = i; +nMatches++; +} else { +break; +}} +}while (m >= pos) { +var r = this.nextMatch (m, pt); +if (r >= 0) { +return r; +}m -= 1; +nMatches--; +if (nMatches < this.fewestMatches.intValue ()) { +return -1; +}} +return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var dm = new com.stevesoft.pat.DotMulti (this.fewestMatches, this.mostMatches); +dm.matchFewest = this.matchFewest; +return dm; +}, "java.util.Hashtable"); +Clazz.defineStatics (c$, +"step", 1, +"idcount", 1); +}); diff --git a/bin/com/stevesoft/pat/End.js b/bin/com/stevesoft/pat/End.js index b332682..3df399f 100644 --- a/bin/com/stevesoft/pat/End.js +++ b/bin/com/stevesoft/pat/End.js @@ -1,38 +1,38 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.End", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.retIsEnd = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "End", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (b) { -Clazz.superConstructor (this, com.stevesoft.pat.End, []); -this.retIsEnd = b; -}, "~B"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (this.retIsEnd && pt.mFlag && pos < pt.src.length ()) { -if (pt.src.charAt (pos) == '\n') { -return this.nextMatch (pos, pt); -}}if (pt.src.length () == pos) { -return this.nextMatch (pos, pt); -} else if (pos < pt.src.length ()) { -pt.src.charAt (pos); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -if (this.retIsEnd) { -return "$"; -} else { -return "\\Z"; -}}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.End (this.retIsEnd); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.End", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.retIsEnd = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "End", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (b) { +Clazz.superConstructor (this, com.stevesoft.pat.End, []); +this.retIsEnd = b; +}, "~B"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (this.retIsEnd && pt.mFlag && pos < pt.src.length ()) { +if (pt.src.charAt (pos) == '\n') { +return this.nextMatch (pos, pt); +}}if (pt.src.length () == pos) { +return this.nextMatch (pos, pt); +} else if (pos < pt.src.length ()) { +pt.src.charAt (pos); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +if (this.retIsEnd) { +return "$"; +} else { +return "\\Z"; +}}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.End (this.retIsEnd); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/FastBracket.js b/bin/com/stevesoft/pat/FastBracket.js index 0e7d38a..d26c009 100644 --- a/bin/com/stevesoft/pat/FastBracket.js +++ b/bin/com/stevesoft/pat/FastBracket.js @@ -1,156 +1,156 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Bracket"], "com.stevesoft.pat.FastBracket", ["com.stevesoft.pat.Range", "$.oneChar", "java.util.BitSet", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.$min = 0; -this.$max = 0; -this.bs = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "FastBracket", com.stevesoft.pat.Bracket); -c$.process = Clazz.defineMethod (c$, "process", -function (b, ignc) { -var v = b.v; -b.pv = null; -try { -var nv = v; -if (ignc) { -nv = new java.util.Vector (); -for (var i = 0; i < v.size (); i++) { -var p = v.elementAt (i); -nv.addElement (p); -if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar)) { -var oc = p; -nv.addElement ( new com.stevesoft.pat.oneChar (oc.altc)); -} else if (Clazz.instanceOf (p, com.stevesoft.pat.Range)) { -var ra = p; -nv.addElement ( new com.stevesoft.pat.Range (ra.altlo, ra.althi)); -}} -}v = nv; -for (var i = 0; i < v.size () - 1; i++) { -for (var j = 0; j < v.size () - 1; j++) { -var c1 = com.stevesoft.pat.FastBracket.getl (v.elementAt (j)); -var c2 = com.stevesoft.pat.FastBracket.getl (v.elementAt (j + 1)); -if (c2 < c1) { -var o = v.elementAt (j); -v.setElementAt (v.elementAt (j + 1), j); -v.setElementAt (o, j + 1); -}} -} -nv = new java.util.Vector (); -var p = v.elementAt (0); -nv.addElement (p); -for (var i = 1; i < v.size (); i++) { -if ((com.stevesoft.pat.FastBracket.geth (p)).charCodeAt (0) + 1 >= (com.stevesoft.pat.FastBracket.getl (v.elementAt (i))).charCodeAt (0)) { -var p2 = v.elementAt (i); -var lo = com.stevesoft.pat.FastBracket.min (com.stevesoft.pat.FastBracket.getl (p), com.stevesoft.pat.FastBracket.getl (p2)); -var hi = com.stevesoft.pat.FastBracket.max (com.stevesoft.pat.FastBracket.geth (p), com.stevesoft.pat.FastBracket.geth (p2)); -nv.setElementAt (p = com.stevesoft.pat.FastBracket.mkelem (lo, hi), nv.size () - 1); -} else { -p = v.elementAt (i); -nv.addElement (p); -}} -b.v = v = nv; -} catch (e) { -if (Clazz.exceptionOf (e, com.stevesoft.pat.RegSyntax)) { -e.printStackTrace (); -} else { -throw e; -} -} -var negv = com.stevesoft.pat.FastBracket.neg (v); -if (v.size () == 1) { -return b; -}if (negv.size () == 1) { -b.v = negv; -b.neg = !b.neg; -return b; -}var fb = com.stevesoft.pat.FastBracket.newbrack (v, b.neg); -if (fb == null) { -fb = com.stevesoft.pat.FastBracket.newbrack (negv, !b.neg); -}if (fb != null) { -fb.parent = b.parent; -fb.next = b.next; -return fb; -}return b; -}, "com.stevesoft.pat.Bracket,~B"); -c$.newbrack = Clazz.defineMethod (c$, "newbrack", -function (v, neg) { -var fb = new com.stevesoft.pat.FastBracket (neg); -fb.v = v; -if (v.size () == 0) { -return null; -}fb.$min = (com.stevesoft.pat.FastBracket.getl (v.elementAt (0))).charCodeAt (0); -fb.$max = (com.stevesoft.pat.FastBracket.geth (v.elementAt (v.size () - 1))).charCodeAt (0); -if (fb.$max - fb.$min <= 256) { -fb.bs = new java.util.BitSet (fb.$max - fb.$min + 1); -for (var i = 0; i < v.size (); i++) { -var o = v.elementAt (i); -var min0 = (com.stevesoft.pat.FastBracket.getl (o)).charCodeAt (0) - fb.$min; -var max0 = (com.stevesoft.pat.FastBracket.geth (o)).charCodeAt (0) - fb.$min; -for (var j = min0; j <= max0; j++) { -fb.bs.set (j); -} -} -return fb; -}return null; -}, "java.util.Vector,~B"); -c$.neg = Clazz.defineMethod (c$, "neg", -function (v) { -try { -var nv = new java.util.Vector (); -if (v.size () == 0) { -nv.addElement ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (65535))); -return nv; -}var p0 = (com.stevesoft.pat.FastBracket.getl (v.elementAt (0))).charCodeAt (0); -if (p0 != 0) { -nv.addElement (com.stevesoft.pat.FastBracket.mkelem (String.fromCharCode (0), String.fromCharCode (p0 - 1))); -}for (var i = 0; i < v.size () - 1; i++) { -var hi = (com.stevesoft.pat.FastBracket.getl (v.elementAt (i + 1))).charCodeAt (0) - 1; -var lo = (com.stevesoft.pat.FastBracket.geth (v.elementAt (i))).charCodeAt (0) + 1; -nv.addElement (com.stevesoft.pat.FastBracket.mkelem (String.fromCharCode (lo), String.fromCharCode (hi))); -} -var pN = (com.stevesoft.pat.FastBracket.geth (v.lastElement ())).charCodeAt (0); -if (pN != 65535) { -nv.addElement (com.stevesoft.pat.FastBracket.mkelem (String.fromCharCode (pN + 1), String.fromCharCode (65535))); -}return nv; -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -return null; -} else { -throw rs; -} -} -}, "java.util.Vector"); -c$.mkelem = Clazz.defineMethod (c$, "mkelem", -function (lo, hi) { -return lo == hi ? ( new com.stevesoft.pat.oneChar (lo)) : ( new com.stevesoft.pat.Range (lo, hi)); -}, "~S,~S"); -c$.min = Clazz.defineMethod (c$, "min", -function (a, b) { -return a < b ? a : b; -}, "~S,~S"); -c$.max = Clazz.defineMethod (c$, "max", -function (a, b) { -return a > b ? a : b; -}, "~S,~S"); -c$.getl = Clazz.defineMethod (c$, "getl", -function (o) { -var p = o; -if (Clazz.instanceOf (p, com.stevesoft.pat.Range)) { -return (p).lo; -}return (p).c; -}, "~O"); -c$.geth = Clazz.defineMethod (c$, "geth", -function (o) { -var p = o; -if (Clazz.instanceOf (p, com.stevesoft.pat.Range)) { -return (p).hi; -}return (p).c; -}, "~O"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (pos >= pt.src.length () || this.Masked (pos, pt)) { -return -1; -}var c = pt.src.charAt (pos); -return ( new Boolean (this.neg ^ (c.charCodeAt (0) >= this.$min && c.charCodeAt (0) <= this.$max && this.bs.get (c.charCodeAt (0) - this.$min))).valueOf ()) ? this.nextMatch (pos + 1, pt) : -1; -}, "~N,com.stevesoft.pat.Pthings"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Bracket"], "com.stevesoft.pat.FastBracket", ["com.stevesoft.pat.Range", "$.oneChar", "java.util.BitSet", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.$min = 0; +this.$max = 0; +this.bs = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "FastBracket", com.stevesoft.pat.Bracket); +c$.process = Clazz.defineMethod (c$, "process", +function (b, ignc) { +var v = b.v; +b.pv = null; +try { +var nv = v; +if (ignc) { +nv = new java.util.Vector (); +for (var i = 0; i < v.size (); i++) { +var p = v.elementAt (i); +nv.addElement (p); +if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar)) { +var oc = p; +nv.addElement ( new com.stevesoft.pat.oneChar (oc.altc)); +} else if (Clazz.instanceOf (p, com.stevesoft.pat.Range)) { +var ra = p; +nv.addElement ( new com.stevesoft.pat.Range (ra.altlo, ra.althi)); +}} +}v = nv; +for (var i = 0; i < v.size () - 1; i++) { +for (var j = 0; j < v.size () - 1; j++) { +var c1 = com.stevesoft.pat.FastBracket.getl (v.elementAt (j)); +var c2 = com.stevesoft.pat.FastBracket.getl (v.elementAt (j + 1)); +if (c2 < c1) { +var o = v.elementAt (j); +v.setElementAt (v.elementAt (j + 1), j); +v.setElementAt (o, j + 1); +}} +} +nv = new java.util.Vector (); +var p = v.elementAt (0); +nv.addElement (p); +for (var i = 1; i < v.size (); i++) { +if ((com.stevesoft.pat.FastBracket.geth (p)).charCodeAt (0) + 1 >= (com.stevesoft.pat.FastBracket.getl (v.elementAt (i))).charCodeAt (0)) { +var p2 = v.elementAt (i); +var lo = com.stevesoft.pat.FastBracket.min (com.stevesoft.pat.FastBracket.getl (p), com.stevesoft.pat.FastBracket.getl (p2)); +var hi = com.stevesoft.pat.FastBracket.max (com.stevesoft.pat.FastBracket.geth (p), com.stevesoft.pat.FastBracket.geth (p2)); +nv.setElementAt (p = com.stevesoft.pat.FastBracket.mkelem (lo, hi), nv.size () - 1); +} else { +p = v.elementAt (i); +nv.addElement (p); +}} +b.v = v = nv; +} catch (e) { +if (Clazz.exceptionOf (e, com.stevesoft.pat.RegSyntax)) { +e.printStackTrace (); +} else { +throw e; +} +} +var negv = com.stevesoft.pat.FastBracket.neg (v); +if (v.size () == 1) { +return b; +}if (negv.size () == 1) { +b.v = negv; +b.neg = !b.neg; +return b; +}var fb = com.stevesoft.pat.FastBracket.newbrack (v, b.neg); +if (fb == null) { +fb = com.stevesoft.pat.FastBracket.newbrack (negv, !b.neg); +}if (fb != null) { +fb.parent = b.parent; +fb.next = b.next; +return fb; +}return b; +}, "com.stevesoft.pat.Bracket,~B"); +c$.newbrack = Clazz.defineMethod (c$, "newbrack", +function (v, neg) { +var fb = new com.stevesoft.pat.FastBracket (neg); +fb.v = v; +if (v.size () == 0) { +return null; +}fb.$min = (com.stevesoft.pat.FastBracket.getl (v.elementAt (0))).charCodeAt (0); +fb.$max = (com.stevesoft.pat.FastBracket.geth (v.elementAt (v.size () - 1))).charCodeAt (0); +if (fb.$max - fb.$min <= 256) { +fb.bs = new java.util.BitSet (fb.$max - fb.$min + 1); +for (var i = 0; i < v.size (); i++) { +var o = v.elementAt (i); +var min0 = (com.stevesoft.pat.FastBracket.getl (o)).charCodeAt (0) - fb.$min; +var max0 = (com.stevesoft.pat.FastBracket.geth (o)).charCodeAt (0) - fb.$min; +for (var j = min0; j <= max0; j++) { +fb.bs.set (j); +} +} +return fb; +}return null; +}, "java.util.Vector,~B"); +c$.neg = Clazz.defineMethod (c$, "neg", +function (v) { +try { +var nv = new java.util.Vector (); +if (v.size () == 0) { +nv.addElement ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (65535))); +return nv; +}var p0 = (com.stevesoft.pat.FastBracket.getl (v.elementAt (0))).charCodeAt (0); +if (p0 != 0) { +nv.addElement (com.stevesoft.pat.FastBracket.mkelem (String.fromCharCode (0), String.fromCharCode (p0 - 1))); +}for (var i = 0; i < v.size () - 1; i++) { +var hi = (com.stevesoft.pat.FastBracket.getl (v.elementAt (i + 1))).charCodeAt (0) - 1; +var lo = (com.stevesoft.pat.FastBracket.geth (v.elementAt (i))).charCodeAt (0) + 1; +nv.addElement (com.stevesoft.pat.FastBracket.mkelem (String.fromCharCode (lo), String.fromCharCode (hi))); +} +var pN = (com.stevesoft.pat.FastBracket.geth (v.lastElement ())).charCodeAt (0); +if (pN != 65535) { +nv.addElement (com.stevesoft.pat.FastBracket.mkelem (String.fromCharCode (pN + 1), String.fromCharCode (65535))); +}return nv; +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +return null; +} else { +throw rs; +} +} +}, "java.util.Vector"); +c$.mkelem = Clazz.defineMethod (c$, "mkelem", +function (lo, hi) { +return lo == hi ? ( new com.stevesoft.pat.oneChar (lo)) : ( new com.stevesoft.pat.Range (lo, hi)); +}, "~S,~S"); +c$.min = Clazz.defineMethod (c$, "min", +function (a, b) { +return a < b ? a : b; +}, "~S,~S"); +c$.max = Clazz.defineMethod (c$, "max", +function (a, b) { +return a > b ? a : b; +}, "~S,~S"); +c$.getl = Clazz.defineMethod (c$, "getl", +function (o) { +var p = o; +if (Clazz.instanceOf (p, com.stevesoft.pat.Range)) { +return (p).lo; +}return (p).c; +}, "~O"); +c$.geth = Clazz.defineMethod (c$, "geth", +function (o) { +var p = o; +if (Clazz.instanceOf (p, com.stevesoft.pat.Range)) { +return (p).hi; +}return (p).c; +}, "~O"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (pos >= pt.src.length () || this.Masked (pos, pt)) { +return -1; +}var c = pt.src.charAt (pos); +return ( new Boolean (this.neg ^ (c.charCodeAt (0) >= this.$min && c.charCodeAt (0) <= this.$max && this.bs.get (c.charCodeAt (0) - this.$min))).valueOf ()) ? this.nextMatch (pos + 1, pt) : -1; +}, "~N,com.stevesoft.pat.Pthings"); +}); diff --git a/bin/com/stevesoft/pat/FastMulti.class b/bin/com/stevesoft/pat/FastMulti.class index 9de4ac64ec56d8d387f652630c201567262a7c37..5baa0147e612e90954c0eaadf0fe59f710f4892e 100644 GIT binary patch delta 29 lcmbOs{a0#(02kxo&4OIhnV7X1_$IIBQDEYeocw}k0|1An2*v;a delta 56 zcmew>HA8xX02kxE&4OIhnV8)e1ShZNQIP%5z{J48&cMjX&QQb%BBdD_n1B=`2a_1n I= 0) { -return ii; -}}while (i >= 0 && i <= endstr) { -i = this.sub.matchInternal (i, pt); -if (i >= 0) { -matches.inc (); -if (this.fewestMatches.lessEq (matches)) { -var ii = this.nextMatch (i, pt); -if (ii >= 0) { -return ii; -}}if (matches.equals (this.mostMatches)) { -return -1; -}}} -return -1; -}var nMatches = 0; -while (this.fewestMatches.intValue () > nMatches) { -i = this.sub.matchInternal (i, pt); -if (i >= 0) { -nMatches++; -} else { -return -1; -}} -m = i; -if (this.mostMatches.finite ()) { -while (nMatches < this.mostMatches.intValue ()) { -i = this.sub.matchInternal (i, pt); -if (i >= 0) { -m = i; -nMatches++; -} else { -break; -}} -} else { -while (true) { -i = this.sub.matchInternal (i, pt); -if (i >= 0) { -m = i; -nMatches++; -} else { -break; -}} -}while (m >= pos) { -var r = this.nextMatch (m, pt); -if (r >= 0) { -return r; -}m -= this.step; -nMatches--; -if (nMatches < this.fewestMatches.intValue ()) { -return -1; -}} -return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -try { -var fm = new com.stevesoft.pat.FastMulti (this.fewestMatches, this.mostMatches, this.sub.clone (h)); -fm.matchFewest = this.matchFewest; -return fm; -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -return null; -} else { -throw rs; -} -} -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.FastMulti", ["com.stevesoft.pat.RegSyntaxError", "$.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fewestMatches = null; +this.mostMatches = null; +this.matchFewest = false; +this.step = -1; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "FastMulti", com.stevesoft.pat.PatternSub); +Clazz.overrideMethod (c$, "minChars", +function () { +return this.sub.countMinChars ().mul (this.fewestMatches); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return this.sub.countMaxChars ().mul (this.mostMatches); +}); +Clazz.makeConstructor (c$, +function (a, b, p) { +Clazz.superConstructor (this, com.stevesoft.pat.FastMulti, []); +if (p == null) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Null length pattern followed by *, +, or other Multi."); +}this.fewestMatches = a; +this.mostMatches = b; +this.sub = p; +this.step = p.countMinChars ().intValue (); +this.sub.setParent (null); +}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); +Clazz.defineMethod (c$, "toString", +function () { +return this.sub.toString () + "{" + this.fewestMatches + "," + this.mostMatches + "}" + (this.matchFewest ? "?" : "") + "(?# <= fast multi)" + this.nextString (); +}); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +var m = -1; +var i = pos; +var endstr = pt.src.length () - this.step; +var matches = new com.stevesoft.pat.patInt (0); +if (this.matchFewest) { +if (this.fewestMatches.lessEq (matches)) { +var ii = this.nextMatch (i, pt); +if (ii >= 0) { +return ii; +}}while (i >= 0 && i <= endstr) { +i = this.sub.matchInternal (i, pt); +if (i >= 0) { +matches.inc (); +if (this.fewestMatches.lessEq (matches)) { +var ii = this.nextMatch (i, pt); +if (ii >= 0) { +return ii; +}}if (matches.equals (this.mostMatches)) { +return -1; +}}} +return -1; +}var nMatches = 0; +while (this.fewestMatches.intValue () > nMatches) { +i = this.sub.matchInternal (i, pt); +if (i >= 0) { +nMatches++; +} else { +return -1; +}} +m = i; +if (this.mostMatches.finite ()) { +while (nMatches < this.mostMatches.intValue ()) { +i = this.sub.matchInternal (i, pt); +if (i >= 0) { +m = i; +nMatches++; +} else { +break; +}} +} else { +while (true) { +i = this.sub.matchInternal (i, pt); +if (i >= 0) { +m = i; +nMatches++; +} else { +break; +}} +}while (m >= pos) { +var r = this.nextMatch (m, pt); +if (r >= 0) { +return r; +}m -= this.step; +nMatches--; +if (nMatches < this.fewestMatches.intValue ()) { +return -1; +}} +return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +try { +var fm = new com.stevesoft.pat.FastMulti (this.fewestMatches, this.mostMatches, this.sub.clone (h)); +fm.matchFewest = this.matchFewest; +return fm; +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +return null; +} else { +throw rs; +} +} +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/FileRegex.js b/bin/com/stevesoft/pat/FileRegex.js index ca23839..8327c7c 100644 --- a/bin/com/stevesoft/pat/FileRegex.js +++ b/bin/com/stevesoft/pat/FileRegex.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Regex"], "com.stevesoft.pat.FileRegex", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "FileRegex", com.stevesoft.pat.Regex); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Regex"], "com.stevesoft.pat.FileRegex", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "FileRegex", com.stevesoft.pat.Regex); +}); diff --git a/bin/com/stevesoft/pat/Group.js b/bin/com/stevesoft/pat/Group.js index a9ebd1b..89fdd10 100644 --- a/bin/com/stevesoft/pat/Group.js +++ b/bin/com/stevesoft/pat/Group.js @@ -1,48 +1,48 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Group", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.op = '\0'; -this.cl = '\0'; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Group", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (opi, cli) { -Clazz.superConstructor (this, com.stevesoft.pat.Group, []); -this.op = opi; -this.cl = cli; -}, "~S,~S"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -var i; -var count = 1; -if (pos < pt.src.length ()) { -if (!this.Masked (pos, pt) && pt.src.charAt (pos) != this.op) { -return -1; -}}for (i = pos + 1; i < pt.src.length (); i++) { -var c = pt.src.charAt (i); -var b = !this.Masked (i, pt); -if (b && c == '\\') { -i++; -} else { -if (b && c == this.cl) { -count--; -}if (count == 0) { -return this.nextMatch (i + 1, pt); -}if (b && c == this.op) { -count++; -}}} -return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -return "(?@" + this.op + this.cl + ")" + this.nextString (); -}); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (2); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.Group (this.op, this.cl); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Group", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.op = '\0'; +this.cl = '\0'; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Group", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (opi, cli) { +Clazz.superConstructor (this, com.stevesoft.pat.Group, []); +this.op = opi; +this.cl = cli; +}, "~S,~S"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +var i; +var count = 1; +if (pos < pt.src.length ()) { +if (!this.Masked (pos, pt) && pt.src.charAt (pos) != this.op) { +return -1; +}}for (i = pos + 1; i < pt.src.length (); i++) { +var c = pt.src.charAt (i); +var b = !this.Masked (i, pt); +if (b && c == '\\') { +i++; +} else { +if (b && c == this.cl) { +count--; +}if (count == 0) { +return this.nextMatch (i + 1, pt); +}if (b && c == this.op) { +count++; +}}} +return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +return "(?@" + this.op + this.cl + ")" + this.nextString (); +}); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (2); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Group (this.op, this.cl); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/LeftRule.js b/bin/com/stevesoft/pat/LeftRule.js index f70f50c..df5c04a 100644 --- a/bin/com/stevesoft/pat/LeftRule.js +++ b/bin/com/stevesoft/pat/LeftRule.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.LeftRule", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "LeftRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.LeftRule, []); -}); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -sb.append (res.left ()); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return "$`"; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.LeftRule", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "LeftRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.LeftRule, []); +}); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +sb.append (res.left ()); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return "$`"; +}); +}); diff --git a/bin/com/stevesoft/pat/MessageManager.js b/bin/com/stevesoft/pat/MessageManager.js index 801e5de..23502c3 100644 --- a/bin/com/stevesoft/pat/MessageManager.js +++ b/bin/com/stevesoft/pat/MessageManager.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -c$ = Clazz.declareType (com.stevesoft.pat, "MessageManager"); -c$.getString = Clazz.defineMethod (c$, "getString", -function (string) { -return string; -}, "~S"); -c$.formatMessage = Clazz.defineMethod (c$, "formatMessage", -function (s, fields) { -for (var i = 0; i < fields.length; i++) s += " " + fields[i]; - -return s; -}, "~S,~A"); +Clazz.declarePackage ("com.stevesoft.pat"); +c$ = Clazz.declareType (com.stevesoft.pat, "MessageManager"); +c$.getString = Clazz.defineMethod (c$, "getString", +function (string) { +return string; +}, "~S"); +c$.formatMessage = Clazz.defineMethod (c$, "formatMessage", +function (s, fields) { +for (var i = 0; i < fields.length; i++) s += " " + fields[i]; + +return s; +}, "~S,~A"); diff --git a/bin/com/stevesoft/pat/Multi.js b/bin/com/stevesoft/pat/Multi.js index e98b4ff..e759c95 100644 --- a/bin/com/stevesoft/pat/Multi.js +++ b/bin/com/stevesoft/pat/Multi.js @@ -1,62 +1,62 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Multi", ["com.stevesoft.pat.Multi_stage2"], function () { -c$ = Clazz.decorateAsClass (function () { -this.a = null; -this.b = null; -this.p = null; -this.st2 = null; -this.matchFewest = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Multi", com.stevesoft.pat.PatternSub); -Clazz.overrideMethod (c$, "minChars", -function () { -return this.a.mul (this.p.countMinChars ()); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return this.b.mul (this.p.countMaxChars ()); -}); -Clazz.makeConstructor (c$, -function (a, b, p) { -Clazz.superConstructor (this, com.stevesoft.pat.Multi, []); -this.a = a; -this.b = b; -this.p = p; -this.st2 = new com.stevesoft.pat.Multi_stage2 (a, b, p); -this.st2.parent = this; -this.sub = this.st2.sub; -}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); -Clazz.overrideMethod (c$, "toString", -function () { -this.st2.matchFewest = this.matchFewest; -return this.st2.toString (); -}); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -try { -this.st2 = new com.stevesoft.pat.Multi_stage2 (this.a, this.b, this.p); -} catch (r__) { -if (Clazz.exceptionOf (r__, com.stevesoft.pat.RegSyntax)) { -} else { -throw r__; -} -} -this.st2.matchFewest = this.matchFewest; -this.st2.parent = this; -return this.st2.matchInternal (pos, pt); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -try { -var m = new com.stevesoft.pat.Multi (this.a, this.b, (this.p).clone (h)); -m.matchFewest = this.matchFewest; -return m; -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -return null; -} else { -throw rs; -} -} -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Multi", ["com.stevesoft.pat.Multi_stage2"], function () { +c$ = Clazz.decorateAsClass (function () { +this.a = null; +this.b = null; +this.p = null; +this.st2 = null; +this.matchFewest = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Multi", com.stevesoft.pat.PatternSub); +Clazz.overrideMethod (c$, "minChars", +function () { +return this.a.mul (this.p.countMinChars ()); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return this.b.mul (this.p.countMaxChars ()); +}); +Clazz.makeConstructor (c$, +function (a, b, p) { +Clazz.superConstructor (this, com.stevesoft.pat.Multi, []); +this.a = a; +this.b = b; +this.p = p; +this.st2 = new com.stevesoft.pat.Multi_stage2 (a, b, p); +this.st2.parent = this; +this.sub = this.st2.sub; +}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); +Clazz.overrideMethod (c$, "toString", +function () { +this.st2.matchFewest = this.matchFewest; +return this.st2.toString (); +}); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +try { +this.st2 = new com.stevesoft.pat.Multi_stage2 (this.a, this.b, this.p); +} catch (r__) { +if (Clazz.exceptionOf (r__, com.stevesoft.pat.RegSyntax)) { +} else { +throw r__; +} +} +this.st2.matchFewest = this.matchFewest; +this.st2.parent = this; +return this.st2.matchInternal (pos, pt); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +try { +var m = new com.stevesoft.pat.Multi (this.a, this.b, (this.p).clone (h)); +m.matchFewest = this.matchFewest; +return m; +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +return null; +} else { +throw rs; +} +} +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/MultiMin.js b/bin/com/stevesoft/pat/MultiMin.js index f536031..e749758 100644 --- a/bin/com/stevesoft/pat/MultiMin.js +++ b/bin/com/stevesoft/pat/MultiMin.js @@ -1,9 +1,9 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Multi"], "com.stevesoft.pat.MultiMin", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "MultiMin", com.stevesoft.pat.Multi); -Clazz.makeConstructor (c$, -function (i1, i2, p) { -Clazz.superConstructor (this, com.stevesoft.pat.MultiMin, [i1, i2, p]); -this.matchFewest = true; -}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Multi"], "com.stevesoft.pat.MultiMin", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "MultiMin", com.stevesoft.pat.Multi); +Clazz.makeConstructor (c$, +function (i1, i2, p) { +Clazz.superConstructor (this, com.stevesoft.pat.MultiMin, [i1, i2, p]); +this.matchFewest = true; +}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); +}); diff --git a/bin/com/stevesoft/pat/Multi_stage2.js b/bin/com/stevesoft/pat/Multi_stage2.js index 1d291ab..6d4f8fc 100644 --- a/bin/com/stevesoft/pat/Multi_stage2.js +++ b/bin/com/stevesoft/pat/Multi_stage2.js @@ -1,95 +1,95 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Multi_stage2", ["com.stevesoft.pat.RegSyntaxError", "$.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.nextRet = null; -this.count = null; -this.matchMin = null; -this.matchMax = null; -this.matchFewest = false; -this.pos_old = -1; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Multi_stage2", com.stevesoft.pat.PatternSub); -Clazz.defineMethod (c$, "toString", -function () { -var ret = ""; -ret += this.sub.toString (); -ret += "{" + this.matchMin + "," + this.matchMax + "}"; -if (this.matchFewest) { -ret += "?"; -}ret += this.parent.nextString (); -return ret; -}); -Clazz.makeConstructor (c$, -function (a, b, p) { -Clazz.superConstructor (this, com.stevesoft.pat.Multi_stage2, []); -if (p == null) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Multiple match of Null pattern requested."); -}this.sub = p; -this.nextRet = this; -this.sub.setParent (this); -this.matchMin = a; -this.matchMax = b; -this.count = new com.stevesoft.pat.patInt (0); -if (!a.lessEq (b)) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + ">" + b); -}var i = new com.stevesoft.pat.patInt (-1); -if (a.lessEq (i)) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + "< 0"); -}}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); -Clazz.defineMethod (c$, "getNext", -function () { -return this.nextRet; -}); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -this.sub.setParent (this); -var canUse = -1; -if (this.pos_old >= 0 && pos == this.pos_old) { -return -1; -}this.pos_old = pos; -if (this.matchMin.lessEq (this.count)) { -canUse = pos; -}if (!this.count.lessEq (this.matchMax) || pos > pt.src.length ()) { -return -1; -}if ((this.matchFewest || this.count.equals (this.matchMax)) && canUse >= 0) { -var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []); -if (n == null) { -return canUse; -}var ret = this.testMatch (n, pos, pt); -if (ret >= 0) { -return ret; -} else { -canUse = -1; -}}this.count.inc (); -try { -if (this.count.lessEq (this.matchMax)) { -var r = this.testMatch (this.sub, pos, pt); -if (r >= 0) { -return r; -}}} finally { -this.count.dec (); -} -if (!this.matchFewest && canUse >= 0) { -var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []); -if (n == null) { -return canUse; -}var ret = this.testMatch (n, pos, pt); -return ret; -} else { -return canUse; -}}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -try { -var m = new com.stevesoft.pat.Multi_stage2 (this.matchMin, this.matchMax, this.sub.clone (h)); -m.matchFewest = this.matchFewest; -return m; -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -return null; -} else { -throw rs; -} -} -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Multi_stage2", ["com.stevesoft.pat.RegSyntaxError", "$.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.nextRet = null; +this.count = null; +this.matchMin = null; +this.matchMax = null; +this.matchFewest = false; +this.pos_old = -1; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Multi_stage2", com.stevesoft.pat.PatternSub); +Clazz.defineMethod (c$, "toString", +function () { +var ret = ""; +ret += this.sub.toString (); +ret += "{" + this.matchMin + "," + this.matchMax + "}"; +if (this.matchFewest) { +ret += "?"; +}ret += this.parent.nextString (); +return ret; +}); +Clazz.makeConstructor (c$, +function (a, b, p) { +Clazz.superConstructor (this, com.stevesoft.pat.Multi_stage2, []); +if (p == null) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Multiple match of Null pattern requested."); +}this.sub = p; +this.nextRet = this; +this.sub.setParent (this); +this.matchMin = a; +this.matchMax = b; +this.count = new com.stevesoft.pat.patInt (0); +if (!a.lessEq (b)) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + ">" + b); +}var i = new com.stevesoft.pat.patInt (-1); +if (a.lessEq (i)) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + "< 0"); +}}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); +Clazz.defineMethod (c$, "getNext", +function () { +return this.nextRet; +}); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +this.sub.setParent (this); +var canUse = -1; +if (this.pos_old >= 0 && pos == this.pos_old) { +return -1; +}this.pos_old = pos; +if (this.matchMin.lessEq (this.count)) { +canUse = pos; +}if (!this.count.lessEq (this.matchMax) || pos > pt.src.length ()) { +return -1; +}if ((this.matchFewest || this.count.equals (this.matchMax)) && canUse >= 0) { +var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []); +if (n == null) { +return canUse; +}var ret = this.testMatch (n, pos, pt); +if (ret >= 0) { +return ret; +} else { +canUse = -1; +}}this.count.inc (); +try { +if (this.count.lessEq (this.matchMax)) { +var r = this.testMatch (this.sub, pos, pt); +if (r >= 0) { +return r; +}}} finally { +this.count.dec (); +} +if (!this.matchFewest && canUse >= 0) { +var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []); +if (n == null) { +return canUse; +}var ret = this.testMatch (n, pos, pt); +return ret; +} else { +return canUse; +}}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +try { +var m = new com.stevesoft.pat.Multi_stage2 (this.matchMin, this.matchMax, this.sub.clone (h)); +m.matchFewest = this.matchFewest; +return m; +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +return null; +} else { +throw rs; +} +} +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/NoPattern.js b/bin/com/stevesoft/pat/NoPattern.js index ec7438b..394e032 100644 --- a/bin/com/stevesoft/pat/NoPattern.js +++ b/bin/com/stevesoft/pat/NoPattern.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.NoPattern", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "NoPattern", com.stevesoft.pat.Pattern); -Clazz.overrideMethod (c$, "toString", -function () { -return "(?e=#)[^#d#D]"; -}); -Clazz.overrideMethod (c$, "matchInternal", -function (i, p) { -return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.NoPattern (); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.NoPattern", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "NoPattern", com.stevesoft.pat.Pattern); +Clazz.overrideMethod (c$, "toString", +function () { +return "(?e=#)[^#d#D]"; +}); +Clazz.overrideMethod (c$, "matchInternal", +function (i, p) { +return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.NoPattern (); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/NonDirFileRegex.js b/bin/com/stevesoft/pat/NonDirFileRegex.js index 59811e9..eb3a57d 100644 --- a/bin/com/stevesoft/pat/NonDirFileRegex.js +++ b/bin/com/stevesoft/pat/NonDirFileRegex.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.FileRegex"], "com.stevesoft.pat.NonDirFileRegex", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "NonDirFileRegex", com.stevesoft.pat.FileRegex); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.FileRegex"], "com.stevesoft.pat.NonDirFileRegex", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "NonDirFileRegex", com.stevesoft.pat.FileRegex); +}); diff --git a/bin/com/stevesoft/pat/NotImplementedError.js b/bin/com/stevesoft/pat/NotImplementedError.js index 45dd68f..4c44ef5 100644 --- a/bin/com/stevesoft/pat/NotImplementedError.js +++ b/bin/com/stevesoft/pat/NotImplementedError.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["java.lang.Error"], "com.stevesoft.pat.NotImplementedError", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "NotImplementedError", Error); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["java.lang.Error"], "com.stevesoft.pat.NotImplementedError", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "NotImplementedError", Error); +}); diff --git a/bin/com/stevesoft/pat/NullPattern.js b/bin/com/stevesoft/pat/NullPattern.js index 2198789..a8eda32 100644 --- a/bin/com/stevesoft/pat/NullPattern.js +++ b/bin/com/stevesoft/pat/NullPattern.js @@ -1,20 +1,20 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.NullPattern", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "NullPattern", com.stevesoft.pat.Pattern); -Clazz.overrideMethod (c$, "toString", -function () { -return this.nextString (); -}); -Clazz.overrideMethod (c$, "matchInternal", -function (p, pt) { -return this.nextMatch (p, pt); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.NullPattern (); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.NullPattern", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "NullPattern", com.stevesoft.pat.Pattern); +Clazz.overrideMethod (c$, "toString", +function () { +return this.nextString (); +}); +Clazz.overrideMethod (c$, "matchInternal", +function (p, pt) { +return this.nextMatch (p, pt); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.NullPattern (); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/NullRule.js b/bin/com/stevesoft/pat/NullRule.js index f6a1485..f781239 100644 --- a/bin/com/stevesoft/pat/NullRule.js +++ b/bin/com/stevesoft/pat/NullRule.js @@ -1,15 +1,15 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.NullRule", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "NullRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.NullRule, []); -}); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return ""; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.NullRule", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "NullRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.NullRule, []); +}); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return ""; +}); +}); diff --git a/bin/com/stevesoft/pat/Or.js b/bin/com/stevesoft/pat/Or.js index 1ca2671..9255825 100644 --- a/bin/com/stevesoft/pat/Or.js +++ b/bin/com/stevesoft/pat/Or.js @@ -1,92 +1,92 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Or", ["com.stevesoft.pat.patInt", "java.lang.StringBuffer", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.v = null; -this.pv = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Or", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.Or, []); -this.v = new java.util.Vector (); -}); -Clazz.defineMethod (c$, "leftForm", -function () { -return "(?:"; -}); -Clazz.defineMethod (c$, "rightForm", -function () { -return ")"; -}); -Clazz.defineMethod (c$, "sepForm", -function () { -return "|"; -}); -Clazz.defineMethod (c$, "addOr", -function (p) { -this.pv = null; -this.v.addElement (p); -p.setParent (this); -return this; -}, "com.stevesoft.pat.Pattern"); -Clazz.defineMethod (c$, "toString", -function () { -var i; -var sb = new StringBuffer (); -sb.append (this.leftForm ()); -if (this.v.size () > 0) { -sb.append ((this.v.elementAt (0)).toString ()); -}for (i = 1; i < this.v.size (); i++) { -sb.append (this.sepForm ()); -sb.append ((this.v.elementAt (i)).toString ()); -} -sb.append (this.rightForm ()); -sb.append (this.nextString ()); -return sb.toString (); -}); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -if (this.pv == null) { -this.pv = new Array (this.v.size ()); -this.v.copyInto (this.pv); -}for (var i = 0; i < this.v.size (); i++) { -var p = this.pv[i]; -var r = p.matchInternal (pos, pt); -if (r >= 0) { -return r; -}} -return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "minChars", -function () { -if (this.v.size () == 0) { -return new com.stevesoft.pat.patInt (0); -}var m = (this.v.elementAt (0)).countMinChars (); -for (var i = 1; i < this.v.size (); i++) { -var p = this.v.elementAt (i); -m.mineq (p.countMinChars ()); -} -return m; -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -if (this.v.size () == 0) { -return new com.stevesoft.pat.patInt (0); -}var m = (this.v.elementAt (0)).countMaxChars (); -for (var i = 1; i < this.v.size (); i++) { -var p = this.v.elementAt (i); -m.maxeq (p.countMaxChars ()); -} -return m; -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var o = new com.stevesoft.pat.Or (); -h.put (this, o); -h.put (o, o); -for (var i = 0; i < this.v.size (); i++) { -o.v.addElement ((this.v.elementAt (i)).clone (h)); -} -return o; -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Or", ["com.stevesoft.pat.patInt", "java.lang.StringBuffer", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.v = null; +this.pv = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Or", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.Or, []); +this.v = new java.util.Vector (); +}); +Clazz.defineMethod (c$, "leftForm", +function () { +return "(?:"; +}); +Clazz.defineMethod (c$, "rightForm", +function () { +return ")"; +}); +Clazz.defineMethod (c$, "sepForm", +function () { +return "|"; +}); +Clazz.defineMethod (c$, "addOr", +function (p) { +this.pv = null; +this.v.addElement (p); +p.setParent (this); +return this; +}, "com.stevesoft.pat.Pattern"); +Clazz.defineMethod (c$, "toString", +function () { +var i; +var sb = new StringBuffer (); +sb.append (this.leftForm ()); +if (this.v.size () > 0) { +sb.append ((this.v.elementAt (0)).toString ()); +}for (i = 1; i < this.v.size (); i++) { +sb.append (this.sepForm ()); +sb.append ((this.v.elementAt (i)).toString ()); +} +sb.append (this.rightForm ()); +sb.append (this.nextString ()); +return sb.toString (); +}); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +if (this.pv == null) { +this.pv = new Array (this.v.size ()); +this.v.copyInto (this.pv); +}for (var i = 0; i < this.v.size (); i++) { +var p = this.pv[i]; +var r = p.matchInternal (pos, pt); +if (r >= 0) { +return r; +}} +return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "minChars", +function () { +if (this.v.size () == 0) { +return new com.stevesoft.pat.patInt (0); +}var m = (this.v.elementAt (0)).countMinChars (); +for (var i = 1; i < this.v.size (); i++) { +var p = this.v.elementAt (i); +m.mineq (p.countMinChars ()); +} +return m; +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +if (this.v.size () == 0) { +return new com.stevesoft.pat.patInt (0); +}var m = (this.v.elementAt (0)).countMaxChars (); +for (var i = 1; i < this.v.size (); i++) { +var p = this.v.elementAt (i); +m.maxeq (p.countMaxChars ()); +} +return m; +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var o = new com.stevesoft.pat.Or (); +h.put (this, o); +h.put (o, o); +for (var i = 0; i < this.v.size (); i++) { +o.v.addElement ((this.v.elementAt (i)).clone (h)); +} +return o; +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/OrMark.js b/bin/com/stevesoft/pat/OrMark.js index bf47fca..7590a74 100644 --- a/bin/com/stevesoft/pat/OrMark.js +++ b/bin/com/stevesoft/pat/OrMark.js @@ -1,54 +1,54 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Or", "$.SubMark"], "com.stevesoft.pat.OrMark", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.sm = null; -this.id = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "OrMark", com.stevesoft.pat.Or); -Clazz.prepareFields (c$, function () { -this.sm = new com.stevesoft.pat.SubMark (); -}); -Clazz.makeConstructor (c$, -function (i) { -Clazz.superConstructor (this, com.stevesoft.pat.OrMark, []); -this.sm.om = this; -this.id = i; -}, "~N"); -Clazz.overrideMethod (c$, "leftForm", -function () { -return "("; -}); -Clazz.defineMethod (c$, "getNext", -function () { -return this.sm; -}); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -this.sm.next = Clazz.superCall (this, com.stevesoft.pat.OrMark, "getNext", []); -if (pt.marks == null) { -var n2 = 2 * pt.nMarks + 2; -pt.marks = Clazz.newIntArray (n2, 0); -for (var i = 0; i < n2; i++) { -pt.marks[i] = -1; -} -}pt.marks[this.id] = pos; -var ret = Clazz.superCall (this, com.stevesoft.pat.OrMark, "matchInternal", [pos, pt]); -if (ret < 0) { -pt.marks[this.id] = -1; -} else if (pt.marks[this.id] > pt.marks[this.id + pt.nMarks]) { -var swap = pt.marks[this.id]; -pt.marks[this.id] = pt.marks[this.id + pt.nMarks] + 1; -pt.marks[this.id + pt.nMarks] = swap + 1; -}return ret; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var om = new com.stevesoft.pat.OrMark (this.id); -h.put (om, om); -h.put (this, om); -for (var i = 0; i < this.v.size (); i++) { -om.v.addElement ((this.v.elementAt (i)).clone (h)); -} -return om; -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Or", "$.SubMark"], "com.stevesoft.pat.OrMark", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.sm = null; +this.id = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "OrMark", com.stevesoft.pat.Or); +Clazz.prepareFields (c$, function () { +this.sm = new com.stevesoft.pat.SubMark (); +}); +Clazz.makeConstructor (c$, +function (i) { +Clazz.superConstructor (this, com.stevesoft.pat.OrMark, []); +this.sm.om = this; +this.id = i; +}, "~N"); +Clazz.overrideMethod (c$, "leftForm", +function () { +return "("; +}); +Clazz.defineMethod (c$, "getNext", +function () { +return this.sm; +}); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +this.sm.next = Clazz.superCall (this, com.stevesoft.pat.OrMark, "getNext", []); +if (pt.marks == null) { +var n2 = 2 * pt.nMarks + 2; +pt.marks = Clazz.newIntArray (n2, 0); +for (var i = 0; i < n2; i++) { +pt.marks[i] = -1; +} +}pt.marks[this.id] = pos; +var ret = Clazz.superCall (this, com.stevesoft.pat.OrMark, "matchInternal", [pos, pt]); +if (ret < 0) { +pt.marks[this.id] = -1; +} else if (pt.marks[this.id] > pt.marks[this.id + pt.nMarks]) { +var swap = pt.marks[this.id]; +pt.marks[this.id] = pt.marks[this.id + pt.nMarks] + 1; +pt.marks[this.id + pt.nMarks] = swap + 1; +}return ret; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var om = new com.stevesoft.pat.OrMark (this.id); +h.put (om, om); +h.put (this, om); +for (var i = 0; i < this.v.size (); i++) { +om.v.addElement ((this.v.elementAt (i)).clone (h)); +} +return om; +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/PartialBuffer.js b/bin/com/stevesoft/pat/PartialBuffer.js index 8490ff2..02fc0e3 100644 --- a/bin/com/stevesoft/pat/PartialBuffer.js +++ b/bin/com/stevesoft/pat/PartialBuffer.js @@ -1,50 +1,50 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.StringLike"], "com.stevesoft.pat.PartialBuffer", ["java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.off = 0; -this.allowOverRun = true; -this.overRun = false; -this.sb = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "PartialBuffer", null, com.stevesoft.pat.StringLike); -Clazz.makeConstructor (c$, -function (sb) { -this.sb = sb; -}, "StringBuffer"); -Clazz.overrideMethod (c$, "charAt", -function (n) { -n += this.off; -if (n == this.sb.length ()) { -this.overRun = true; -return String.fromCharCode (0); -}return this.sb.charAt (n); -}, "~N"); -Clazz.overrideMethod (c$, "length", -function () { -return this.allowOverRun ? this.sb.length () + 1 : this.sb.length (); -}); -Clazz.overrideMethod (c$, "indexOf", -function (c) { -for (var i = 0; i < this.sb.length (); i++) { -if (this.sb.charAt (i) == c) { -return i; -}} -return -1; -}, "~S"); -Clazz.overrideMethod (c$, "unwrap", -function () { -return this.sb; -}); -Clazz.overrideMethod (c$, "substring", -function (i1, i2) { -var sb = new StringBuffer (i2 - i1); -for (var i = i1; i < i2; i++) { -sb.append (this.charAt (i)); -} -return sb.toString (); -}, "~N,~N"); -Clazz.overrideMethod (c$, "newStringBufferLike", -function () { -return null; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.StringLike"], "com.stevesoft.pat.PartialBuffer", ["java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.off = 0; +this.allowOverRun = true; +this.overRun = false; +this.sb = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "PartialBuffer", null, com.stevesoft.pat.StringLike); +Clazz.makeConstructor (c$, +function (sb) { +this.sb = sb; +}, "StringBuffer"); +Clazz.overrideMethod (c$, "charAt", +function (n) { +n += this.off; +if (n == this.sb.length ()) { +this.overRun = true; +return String.fromCharCode (0); +}return this.sb.charAt (n); +}, "~N"); +Clazz.overrideMethod (c$, "length", +function () { +return this.allowOverRun ? this.sb.length () + 1 : this.sb.length (); +}); +Clazz.overrideMethod (c$, "indexOf", +function (c) { +for (var i = 0; i < this.sb.length (); i++) { +if (this.sb.charAt (i) == c) { +return i; +}} +return -1; +}, "~S"); +Clazz.overrideMethod (c$, "unwrap", +function () { +return this.sb; +}); +Clazz.overrideMethod (c$, "substring", +function (i1, i2) { +var sb = new StringBuffer (i2 - i1); +for (var i = i1; i < i2; i++) { +sb.append (this.charAt (i)); +} +return sb.toString (); +}, "~N,~N"); +Clazz.overrideMethod (c$, "newStringBufferLike", +function () { +return null; +}); +}); diff --git a/bin/com/stevesoft/pat/Pattern.js b/bin/com/stevesoft/pat/Pattern.js index a4dc10b..a3dddd4 100644 --- a/bin/com/stevesoft/pat/Pattern.js +++ b/bin/com/stevesoft/pat/Pattern.js @@ -1,153 +1,153 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.Pattern", ["com.stevesoft.pat.MessageManager", "$.patInf", "$.patInt", "java.lang.Error", "$.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.next = null; -this.parent = null; -this.mfrom = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Pattern"); -Clazz.defineMethod (c$, "getNext", -function () { -return this.next != null ? this.next : (this.parent == null ? null : this.parent.getNext ()); -}); -Clazz.defineMethod (c$, "setParent", -function (p) { -if (this.next != null) { -this.next.setParent (p); -} else { -this.parent = p; -}}, "com.stevesoft.pat.Pattern"); -Clazz.defineMethod (c$, "nextMatch", -function (i, pt) { -var p = this.getNext (); -return p == null ? i : p.matchInternal (i, pt); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "nextString", -function () { -if (this.next == null) { -return ""; -}return this.next.toString (); -}); -c$.inString = Clazz.defineMethod (c$, "inString", -function (c, s) { -var i; -for (i = 0; i < s.length; i++) { -if (s.charAt (i) == c) { -return true; -}} -return false; -}, "~S,~S"); -c$.protect = Clazz.defineMethod (c$, "protect", -function (s, PROTECT_THESE, esc) { -var i; -var sb = new StringBuffer (); -var p = PROTECT_THESE + esc; -for (i = 0; i < s.length; i++) { -var c = s.charAt (i); -if (com.stevesoft.pat.Pattern.inString (c, p)) { -sb.append (esc); -}sb.append (c); -} -return sb.toString (); -}, "~S,~S,~S"); -Clazz.defineMethod (c$, "match", -function (s, pt) { -return this.matchAt (s, 0, pt); -}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "matchAt", -function (s, i, pt) { -pt.src = s; -var r = this.matchInternal (i, pt); -if (r < 0) { -return -1; -}this.mfrom = r < i ? r + 1 : i; -return r < i ? i - r - 1 : r - i; -}, "com.stevesoft.pat.StringLike,~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "Masked", -function (i, pt) { -return pt.cbits == null ? false : pt.cbits.get (i); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "add", -function (p) { -if (this.next == null) { -if (p == null) { -return this; -}this.next = p; -p.parent = this.parent; -this.parent = null; -} else { -this.next.add (p); -}return this; -}, "com.stevesoft.pat.Pattern"); -Clazz.defineMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.defineMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInf (); -}); -Clazz.defineMethod (c$, "countMinChars", -function () { -var p = this; -var sum = new com.stevesoft.pat.patInt (0); -while (p != null) { -sum.pluseq (p.minChars ()); -p = p.next; -} -return sum; -}); -Clazz.defineMethod (c$, "countMaxChars", -function () { -var p = this; -var sum = new com.stevesoft.pat.patInt (0); -while (p != null) { -sum.pluseq (p.maxChars ()); -p = p.next; -} -return sum; -}); -Clazz.defineMethod (c$, "testMatch", -function (p, pos, pt) { -var tab = null; -if (pt.marks != null) { -try { -tab = Clazz.newIntArray (pt.marks.length, 0); -for (var i = 0; i < tab.length; i++) { -tab[i] = pt.marks[i]; -} -} catch (t) { -} -}var ret = p.matchInternal (pos, pt); -if (ret < 0) { -pt.marks = tab; -}return ret; -}, "com.stevesoft.pat.Pattern,~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "clone1", -function (h) { -throw new Error (com.stevesoft.pat.MessageManager.formatMessage ("error.no_such_method_as_clone1_for", Clazz.newArray (-1, [this.getClass ().getName ()]))); -}, "java.util.Hashtable"); -Clazz.defineMethod (c$, "clone", -function (h) { -var p = h.get (this); -if (p != null) { -return p; -}p = this.clone1 (h); -if (p == null) { -throw new Error (com.stevesoft.pat.MessageManager.getString ("error.null_from_clone1")); -}h.put (this, p); -h.put (p, p); -if (this.next != null) { -p.next = this.next.clone (h); -}if (this.parent != null) { -p.parent = this.parent.clone (h); -}return p; -}, "java.util.Hashtable"); -Clazz.overrideMethod (c$, "equals", -function (o) { -return o === this; -}, "~O"); -Clazz.defineStatics (c$, -"ESC", '\\', -"PROTECT_THESE", "[]{}(),$,-\"^."); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.Pattern", ["com.stevesoft.pat.MessageManager", "$.patInf", "$.patInt", "java.lang.Error", "$.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.next = null; +this.parent = null; +this.mfrom = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Pattern"); +Clazz.defineMethod (c$, "getNext", +function () { +return this.next != null ? this.next : (this.parent == null ? null : this.parent.getNext ()); +}); +Clazz.defineMethod (c$, "setParent", +function (p) { +if (this.next != null) { +this.next.setParent (p); +} else { +this.parent = p; +}}, "com.stevesoft.pat.Pattern"); +Clazz.defineMethod (c$, "nextMatch", +function (i, pt) { +var p = this.getNext (); +return p == null ? i : p.matchInternal (i, pt); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "nextString", +function () { +if (this.next == null) { +return ""; +}return this.next.toString (); +}); +c$.inString = Clazz.defineMethod (c$, "inString", +function (c, s) { +var i; +for (i = 0; i < s.length; i++) { +if (s.charAt (i) == c) { +return true; +}} +return false; +}, "~S,~S"); +c$.protect = Clazz.defineMethod (c$, "protect", +function (s, PROTECT_THESE, esc) { +var i; +var sb = new StringBuffer (); +var p = PROTECT_THESE + esc; +for (i = 0; i < s.length; i++) { +var c = s.charAt (i); +if (com.stevesoft.pat.Pattern.inString (c, p)) { +sb.append (esc); +}sb.append (c); +} +return sb.toString (); +}, "~S,~S,~S"); +Clazz.defineMethod (c$, "match", +function (s, pt) { +return this.matchAt (s, 0, pt); +}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "matchAt", +function (s, i, pt) { +pt.src = s; +var r = this.matchInternal (i, pt); +if (r < 0) { +return -1; +}this.mfrom = r < i ? r + 1 : i; +return r < i ? i - r - 1 : r - i; +}, "com.stevesoft.pat.StringLike,~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "Masked", +function (i, pt) { +return pt.cbits == null ? false : pt.cbits.get (i); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "add", +function (p) { +if (this.next == null) { +if (p == null) { +return this; +}this.next = p; +p.parent = this.parent; +this.parent = null; +} else { +this.next.add (p); +}return this; +}, "com.stevesoft.pat.Pattern"); +Clazz.defineMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.defineMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInf (); +}); +Clazz.defineMethod (c$, "countMinChars", +function () { +var p = this; +var sum = new com.stevesoft.pat.patInt (0); +while (p != null) { +sum.pluseq (p.minChars ()); +p = p.next; +} +return sum; +}); +Clazz.defineMethod (c$, "countMaxChars", +function () { +var p = this; +var sum = new com.stevesoft.pat.patInt (0); +while (p != null) { +sum.pluseq (p.maxChars ()); +p = p.next; +} +return sum; +}); +Clazz.defineMethod (c$, "testMatch", +function (p, pos, pt) { +var tab = null; +if (pt.marks != null) { +try { +tab = Clazz.newIntArray (pt.marks.length, 0); +for (var i = 0; i < tab.length; i++) { +tab[i] = pt.marks[i]; +} +} catch (t) { +} +}var ret = p.matchInternal (pos, pt); +if (ret < 0) { +pt.marks = tab; +}return ret; +}, "com.stevesoft.pat.Pattern,~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "clone1", +function (h) { +throw new Error (com.stevesoft.pat.MessageManager.formatMessage ("error.no_such_method_as_clone1_for", Clazz.newArray (-1, [this.getClass ().getName ()]))); +}, "java.util.Hashtable"); +Clazz.defineMethod (c$, "clone", +function (h) { +var p = h.get (this); +if (p != null) { +return p; +}p = this.clone1 (h); +if (p == null) { +throw new Error (com.stevesoft.pat.MessageManager.getString ("error.null_from_clone1")); +}h.put (this, p); +h.put (p, p); +if (this.next != null) { +p.next = this.next.clone (h); +}if (this.parent != null) { +p.parent = this.parent.clone (h); +}return p; +}, "java.util.Hashtable"); +Clazz.overrideMethod (c$, "equals", +function (o) { +return o === this; +}, "~O"); +Clazz.defineStatics (c$, +"ESC", '\\', +"PROTECT_THESE", "[]{}(),$,-\"^."); +}); diff --git a/bin/com/stevesoft/pat/PatternSub.js b/bin/com/stevesoft/pat/PatternSub.js index 2199b2b..835661a 100644 --- a/bin/com/stevesoft/pat/PatternSub.js +++ b/bin/com/stevesoft/pat/PatternSub.js @@ -1,7 +1,7 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.PatternSub", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.sub = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "PatternSub", com.stevesoft.pat.Pattern); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.PatternSub", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.sub = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "PatternSub", com.stevesoft.pat.Pattern); +}); diff --git a/bin/com/stevesoft/pat/PopRule.js b/bin/com/stevesoft/pat/PopRule.js index d983d19..92af006 100644 --- a/bin/com/stevesoft/pat/PopRule.js +++ b/bin/com/stevesoft/pat/PopRule.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.PopRule", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "PopRule", com.stevesoft.pat.SpecialRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.PopRule, []); -}); -Clazz.overrideMethod (c$, "toString1", -function () { -return "${POP}"; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.PopRule", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "PopRule", com.stevesoft.pat.SpecialRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.PopRule, []); +}); +Clazz.overrideMethod (c$, "toString1", +function () { +return "${POP}"; +}); +}); diff --git a/bin/com/stevesoft/pat/Prop.js b/bin/com/stevesoft/pat/Prop.js index 7f99d0e..5dbb6db 100644 --- a/bin/com/stevesoft/pat/Prop.js +++ b/bin/com/stevesoft/pat/Prop.js @@ -1,40 +1,40 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.Prop", ["com.stevesoft.pat.Bits"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "Prop"); -c$.isDecimalDigit = Clazz.defineMethod (c$, "isDecimalDigit", -function (c) { -if (com.stevesoft.pat.Bits.decimal_digit == null) { -com.stevesoft.pat.Bits.decimal_digit_f (); -}return com.stevesoft.pat.Bits.decimal_digit.get (c.charCodeAt (0)); -}, "~S"); -c$.isAlphabetic = Clazz.defineMethod (c$, "isAlphabetic", -function (c) { -if (com.stevesoft.pat.Bits.letter == null) { -com.stevesoft.pat.Bits.letter_f (); -}return com.stevesoft.pat.Bits.letter.get (c.charCodeAt (0)); -}, "~S"); -c$.isMath = Clazz.defineMethod (c$, "isMath", -function (c) { -if (com.stevesoft.pat.Bits.math == null) { -com.stevesoft.pat.Bits.math_f (); -}return com.stevesoft.pat.Bits.math.get (c.charCodeAt (0)); -}, "~S"); -c$.isCurrency = Clazz.defineMethod (c$, "isCurrency", -function (c) { -if (com.stevesoft.pat.Bits.currency == null) { -com.stevesoft.pat.Bits.currency_f (); -}return com.stevesoft.pat.Bits.currency.get (c.charCodeAt (0)); -}, "~S"); -c$.isWhite = Clazz.defineMethod (c$, "isWhite", -function (c) { -if (com.stevesoft.pat.Bits.white == null) { -com.stevesoft.pat.Bits.white_f (); -}return com.stevesoft.pat.Bits.white.get (c.charCodeAt (0)); -}, "~S"); -c$.isPunct = Clazz.defineMethod (c$, "isPunct", -function (c) { -if (com.stevesoft.pat.Bits.punct == null) { -com.stevesoft.pat.Bits.punct_f (); -}return com.stevesoft.pat.Bits.punct.get (c.charCodeAt (0)); -}, "~S"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.Prop", ["com.stevesoft.pat.Bits"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "Prop"); +c$.isDecimalDigit = Clazz.defineMethod (c$, "isDecimalDigit", +function (c) { +if (com.stevesoft.pat.Bits.decimal_digit == null) { +com.stevesoft.pat.Bits.decimal_digit_f (); +}return com.stevesoft.pat.Bits.decimal_digit.get (c.charCodeAt (0)); +}, "~S"); +c$.isAlphabetic = Clazz.defineMethod (c$, "isAlphabetic", +function (c) { +if (com.stevesoft.pat.Bits.letter == null) { +com.stevesoft.pat.Bits.letter_f (); +}return com.stevesoft.pat.Bits.letter.get (c.charCodeAt (0)); +}, "~S"); +c$.isMath = Clazz.defineMethod (c$, "isMath", +function (c) { +if (com.stevesoft.pat.Bits.math == null) { +com.stevesoft.pat.Bits.math_f (); +}return com.stevesoft.pat.Bits.math.get (c.charCodeAt (0)); +}, "~S"); +c$.isCurrency = Clazz.defineMethod (c$, "isCurrency", +function (c) { +if (com.stevesoft.pat.Bits.currency == null) { +com.stevesoft.pat.Bits.currency_f (); +}return com.stevesoft.pat.Bits.currency.get (c.charCodeAt (0)); +}, "~S"); +c$.isWhite = Clazz.defineMethod (c$, "isWhite", +function (c) { +if (com.stevesoft.pat.Bits.white == null) { +com.stevesoft.pat.Bits.white_f (); +}return com.stevesoft.pat.Bits.white.get (c.charCodeAt (0)); +}, "~S"); +c$.isPunct = Clazz.defineMethod (c$, "isPunct", +function (c) { +if (com.stevesoft.pat.Bits.punct == null) { +com.stevesoft.pat.Bits.punct_f (); +}return com.stevesoft.pat.Bits.punct.get (c.charCodeAt (0)); +}, "~S"); +}); diff --git a/bin/com/stevesoft/pat/Pthings.js b/bin/com/stevesoft/pat/Pthings.js index 179ec6b..8969d4f 100644 --- a/bin/com/stevesoft/pat/Pthings.js +++ b/bin/com/stevesoft/pat/Pthings.js @@ -1,13 +1,13 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -c$ = Clazz.decorateAsClass (function () { -this.src = null; -this.ignoreCase = false; -this.mFlag = false; -this.cbits = null; -this.marks = null; -this.nMarks = 0; -this.dotDoesntMatchCR = false; -this.no_check = false; -this.lastPos = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Pthings"); +Clazz.declarePackage ("com.stevesoft.pat"); +c$ = Clazz.decorateAsClass (function () { +this.src = null; +this.ignoreCase = false; +this.mFlag = false; +this.cbits = null; +this.marks = null; +this.nMarks = 0; +this.dotDoesntMatchCR = false; +this.no_check = false; +this.lastPos = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Pthings"); diff --git a/bin/com/stevesoft/pat/PushRule.js b/bin/com/stevesoft/pat/PushRule.js index bac59ef..fd7d64e 100644 --- a/bin/com/stevesoft/pat/PushRule.js +++ b/bin/com/stevesoft/pat/PushRule.js @@ -1,35 +1,35 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.PushRule", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.NewRule = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "PushRule", com.stevesoft.pat.SpecialRule); -Clazz.makeConstructor (c$, -function (p) { -Clazz.superConstructor (this, com.stevesoft.pat.PushRule, []); -this.NewRule = p.NewRule; -}, "com.stevesoft.pat.PushRule"); -Clazz.makeConstructor (c$, -function (nm, rr) { -Clazz.superConstructor (this, com.stevesoft.pat.PushRule, []); -this.name = nm; -this.NewRule = rr; -}, "~S,com.stevesoft.pat.Regex"); -Clazz.makeConstructor (c$, -function (nm, tr) { -Clazz.superConstructor (this, com.stevesoft.pat.PushRule, []); -this.name = nm; -this.NewRule = tr.rp; -}, "~S,com.stevesoft.pat.Transformer"); -Clazz.overrideMethod (c$, "clone1", -function () { -return new com.stevesoft.pat.PushRule (this); -}); -Clazz.defineMethod (c$, "String1", -function () { -return "${+" + this.name + "}"; -}); -Clazz.overrideMethod (c$, "apply", -function (sbl, rr) { -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.PushRule", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.NewRule = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "PushRule", com.stevesoft.pat.SpecialRule); +Clazz.makeConstructor (c$, +function (p) { +Clazz.superConstructor (this, com.stevesoft.pat.PushRule, []); +this.NewRule = p.NewRule; +}, "com.stevesoft.pat.PushRule"); +Clazz.makeConstructor (c$, +function (nm, rr) { +Clazz.superConstructor (this, com.stevesoft.pat.PushRule, []); +this.name = nm; +this.NewRule = rr; +}, "~S,com.stevesoft.pat.Regex"); +Clazz.makeConstructor (c$, +function (nm, tr) { +Clazz.superConstructor (this, com.stevesoft.pat.PushRule, []); +this.name = nm; +this.NewRule = tr.rp; +}, "~S,com.stevesoft.pat.Transformer"); +Clazz.overrideMethod (c$, "clone1", +function () { +return new com.stevesoft.pat.PushRule (this); +}); +Clazz.defineMethod (c$, "String1", +function () { +return "${+" + this.name + "}"; +}); +Clazz.overrideMethod (c$, "apply", +function (sbl, rr) { +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +}); diff --git a/bin/com/stevesoft/pat/RBuffer.js b/bin/com/stevesoft/pat/RBuffer.js index 529f8a2..27970cf 100644 --- a/bin/com/stevesoft/pat/RBuffer.js +++ b/bin/com/stevesoft/pat/RBuffer.js @@ -1,32 +1,32 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.RBuffer", ["java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.done = false; -this.sb = null; -this.pos = 0; -this.epos = 0; -this.next = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "RBuffer"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (sb) { -this.sb = sb; -}, "StringBuffer"); -Clazz.overrideMethod (c$, "toString", -function () { -return "sb=" + this.sb.toString ().$replace ('\n', ' ') + " pos=" + this.pos + " epos=" + this.epos + " sb.length()=" + this.sb.length () + "\n" + this.sp (this.pos + 3) + "^" + this.sp (this.epos - this.pos - 1) + "^"; -}); -Clazz.defineMethod (c$, "sp", -function (n) { -if (n <= 0) { -return ""; -}var sb = new StringBuffer (n); -for (var i = 0; i < n; i++) { -sb.append (' '); -} -return sb.toString (); -}, "~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.RBuffer", ["java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.done = false; +this.sb = null; +this.pos = 0; +this.epos = 0; +this.next = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RBuffer"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (sb) { +this.sb = sb; +}, "StringBuffer"); +Clazz.overrideMethod (c$, "toString", +function () { +return "sb=" + this.sb.toString ().$replace ('\n', ' ') + " pos=" + this.pos + " epos=" + this.epos + " sb.length()=" + this.sb.length () + "\n" + this.sp (this.pos + 3) + "^" + this.sp (this.epos - this.pos - 1) + "^"; +}); +Clazz.defineMethod (c$, "sp", +function (n) { +if (n <= 0) { +return ""; +}var sb = new StringBuffer (n); +for (var i = 0; i < n; i++) { +sb.append (' '); +} +return sb.toString (); +}, "~N"); +}); diff --git a/bin/com/stevesoft/pat/Range.js b/bin/com/stevesoft/pat/Range.js index cb007c4..8294a31 100644 --- a/bin/com/stevesoft/pat/Range.js +++ b/bin/com/stevesoft/pat/Range.js @@ -1,65 +1,65 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern", "$.RegSyntax"], ["com.stevesoft.pat.BadRangeArgs", "$.Range"], ["com.stevesoft.pat.RegSyntaxError", "$.oneChar", "$.patInt"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "BadRangeArgs", com.stevesoft.pat.RegSyntax); -c$ = Clazz.decorateAsClass (function () { -this.lo = '\0'; -this.hi = '\0'; -this.altlo = '\0'; -this.althi = '\0'; -this.printBrackets = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Range", com.stevesoft.pat.Pattern); -Clazz.overrideMethod (c$, "toString", -function () { -var s = com.stevesoft.pat.Pattern.protect ("" + this.lo, "[]{}(),$,-\"^.", '\\') + "-" + com.stevesoft.pat.Pattern.protect ("" + this.hi, "[]{}(),$,-\"^.", '\\'); -if (!this.printBrackets) { -return s; -}return "[" + s + "]"; -}); -Clazz.makeConstructor (c$, -function (loi, hii) { -Clazz.superConstructor (this, com.stevesoft.pat.Range, []); -this.lo = loi; -this.hi = hii; -var o = null; -if (this.lo >= this.hi) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Badly formed []'s : " + this.lo + " >= " + this.hi); -}o = new com.stevesoft.pat.oneChar (this.lo); -this.altlo = o.altc; -o = new com.stevesoft.pat.oneChar (this.hi); -this.althi = o.altc; -}, "~S,~S"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (pos >= pt.src.length ()) { -return -1; -}if (this.Masked (pos, pt)) { -return -1; -}var c = pt.src.charAt (pos); -if (this.lo <= c && c <= this.hi || (pt.ignoreCase && (this.altlo <= c && c <= this.althi))) { -return this.nextMatch (pos + 1, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -try { -var r = new com.stevesoft.pat.Range (this.lo, this.hi); -r.printBrackets = this.printBrackets; -return r; -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -return null; -} else { -throw rs; -} -} -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern", "$.RegSyntax"], ["com.stevesoft.pat.BadRangeArgs", "$.Range"], ["com.stevesoft.pat.RegSyntaxError", "$.oneChar", "$.patInt"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "BadRangeArgs", com.stevesoft.pat.RegSyntax); +c$ = Clazz.decorateAsClass (function () { +this.lo = '\0'; +this.hi = '\0'; +this.altlo = '\0'; +this.althi = '\0'; +this.printBrackets = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Range", com.stevesoft.pat.Pattern); +Clazz.overrideMethod (c$, "toString", +function () { +var s = com.stevesoft.pat.Pattern.protect ("" + this.lo, "[]{}(),$,-\"^.", '\\') + "-" + com.stevesoft.pat.Pattern.protect ("" + this.hi, "[]{}(),$,-\"^.", '\\'); +if (!this.printBrackets) { +return s; +}return "[" + s + "]"; +}); +Clazz.makeConstructor (c$, +function (loi, hii) { +Clazz.superConstructor (this, com.stevesoft.pat.Range, []); +this.lo = loi; +this.hi = hii; +var o = null; +if (this.lo >= this.hi) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Badly formed []'s : " + this.lo + " >= " + this.hi); +}o = new com.stevesoft.pat.oneChar (this.lo); +this.altlo = o.altc; +o = new com.stevesoft.pat.oneChar (this.hi); +this.althi = o.altc; +}, "~S,~S"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (pos >= pt.src.length ()) { +return -1; +}if (this.Masked (pos, pt)) { +return -1; +}var c = pt.src.charAt (pos); +if (this.lo <= c && c <= this.hi || (pt.ignoreCase && (this.altlo <= c && c <= this.althi))) { +return this.nextMatch (pos + 1, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +try { +var r = new com.stevesoft.pat.Range (this.lo, this.hi); +r.printBrackets = this.printBrackets; +return r; +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +return null; +} else { +throw rs; +} +} +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/RegOpt.class b/bin/com/stevesoft/pat/RegOpt.class index b62aeb0f9890c347c2641cee9e763188d72e5f84..96c50d7b81c40d5d4e0d7ec9b1a7b33b2afa9bba 100644 GIT binary patch delta 29 lcmbQB(66xJJSSuC<_nyTEX>{vf|Et~bQ!HSJM*1o1OSh;2$cW; delta 30 mcmeBIn4qxXJSSt{<_nyTEX+O(LX$=KbeYVVHaqd1Wds10q6n7& diff --git a/bin/com/stevesoft/pat/RegOpt.js b/bin/com/stevesoft/pat/RegOpt.js index ed70432..54e0ed8 100644 --- a/bin/com/stevesoft/pat/RegOpt.js +++ b/bin/com/stevesoft/pat/RegOpt.js @@ -1,254 +1,254 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern", "$.oneChar", "java.util.Hashtable", "$.Vector"], ["com.stevesoft.pat.Branch", "$.RegOpt", "$.FastChar"], ["com.stevesoft.pat.Any", "$.Bracket", "$.Custom", "$.FastBracket", "$.FastMulti", "$.Multi", "$.NullPattern", "$.Or", "$.Range", "$.UniValidator", "$.patInt", "java.lang.Character", "$.StringBuffer"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "FastChar", com.stevesoft.pat.oneChar); -Clazz.overrideMethod (c$, "matchInternal", -function (p, pt) { -return (p < pt.src.length () && pt.src.charAt (p) == this.c) ? this.nextMatch (p + 1, pt) : -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.FastChar (this.c); -}, "java.util.Hashtable"); -c$ = Clazz.decorateAsClass (function () { -this.h = null; -this.keys = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Branch", com.stevesoft.pat.Pattern); -Clazz.prepareFields (c$, function () { -this.h = new java.util.Hashtable (); -this.keys = new java.util.Vector (); -}); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.Branch, []); -}); -Clazz.overrideMethod (c$, "clone1", -function (x) { -var b = new com.stevesoft.pat.Branch (); -b.keys = this.keys.clone (); -x.put (this, b); -x.put (b, b); -for (var i = 0; i < this.keys.size (); i++) { -var p = this.h.get (this.keys.elementAt (i)); -b.h.put (this.keys.elementAt (i), p.clone (x)); -} -return b; -}, "java.util.Hashtable"); -Clazz.defineMethod (c$, "reduce", -function (ignoreCase, dontMinQ) { -if (this.h.size () == 1) { -var e = this.h.keys (); -var c = e.nextElement (); -var oc; -if (ignoreCase || dontMinQ) { -oc = new com.stevesoft.pat.oneChar (c.charValue ()); -} else { -oc = new com.stevesoft.pat.FastChar (c.charValue ()); -}oc.next = this.h.get (c); -oc.add (this.next); -return oc; -} else if (this.h.size () == 0) { -return null; -}return this; -}, "~B,~B"); -Clazz.defineMethod (c$, "maxChars", -function () { -var e = this.h.keys (); -var count = new com.stevesoft.pat.patInt (0); -while (e.hasMoreElements ()) { -var key = e.nextElement (); -var pa = this.h.get (key); -var pi = pa.maxChars (); -pi.inc (); -count.maxeq (pi); -} -return count; -}); -Clazz.defineMethod (c$, "minChars", -function () { -var e = this.h.keys (); -var count = new com.stevesoft.pat.patInt (0); -while (e.hasMoreElements ()) { -var key = e.nextElement (); -var pa = this.h.get (key); -var pi = pa.minChars (); -pi.inc (); -count.mineq (pi); -} -return count; -}); -Clazz.defineMethod (c$, "addc", -function (o, ignoreCase, dontMinQ) { -var n = o.next; -if (n == null) { -n = new com.stevesoft.pat.NullPattern (); -} else { -n = com.stevesoft.pat.RegOpt.opt (n, ignoreCase, dontMinQ); -}n.setParent (this); -this.set ( new Character (o.c), n, ignoreCase, dontMinQ); -if (ignoreCase) { -if (o.c != o.altc) { -this.set ( new Character (o.altc), n, ignoreCase, dontMinQ); -}if (o.c != o.altc2 && o.altc != o.altc2) { -this.set ( new Character (o.altc2), n, ignoreCase, dontMinQ); -}}}, "com.stevesoft.pat.oneChar,~B,~B"); -Clazz.defineMethod (c$, "set", -function (c, n, igc, dontMinQ) { -var p = this.h.get (c); -this.next = null; -if (p == null) { -if (Clazz.instanceOf (n, com.stevesoft.pat.Or)) { -var np = new com.stevesoft.pat.NullPattern (); -np.add (n); -this.h.put (c, np); -} else { -this.h.put (c, n); -}this.keys.addElement (c); -} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or)) { -(p).addOr (n); -} else if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar) && Clazz.instanceOf (n, com.stevesoft.pat.oneChar) && (p).c != (n).c) { -var b = new com.stevesoft.pat.Branch (); -b.addc (p, igc, dontMinQ); -b.addc (n, igc, dontMinQ); -this.h.put (c, b); -b.setParent (this); -} else if (Clazz.instanceOf (p, com.stevesoft.pat.Branch) && Clazz.instanceOf (n, com.stevesoft.pat.oneChar)) { -(p).addc (n, igc, dontMinQ); -n.setParent (p); -} else { -var o = new com.stevesoft.pat.Or (); -o.setParent (this); -if (Clazz.instanceOf (p, com.stevesoft.pat.NullPattern) && p.parent == null && p.next != null) { -o.addOr (p.next); -} else { -o.addOr (p); -}o.addOr (n); -var optpat = com.stevesoft.pat.RegOpt.opt (o, igc, dontMinQ); -this.h.put (c, optpat); -optpat.setParent (this); -}}, "Character,com.stevesoft.pat.Pattern,~B,~B"); -Clazz.overrideMethod (c$, "toString", -function () { -var sb = new StringBuffer (); -sb.append ("(?:(?#branch)"); -for (var i = 0; i < this.keys.size (); i++) { -var c = this.keys.elementAt (i); -sb.append (c); -sb.append (this.h.get (c)); -if (i + 1 < this.keys.size ()) { -sb.append ("|"); -}} -sb.append (")"); -sb.append (this.nextString ()); -return sb.toString (); -}); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -if (pos >= pt.src.length ()) { -return -1; -}var n = this.h.get ( new Character (pt.src.charAt (pos))); -if (n == null) { -return -1; -}if (pt.cbits != null && pt.cbits.get (pos)) { -return -1; -}return n.matchInternal (pos + 1, pt); -}, "~N,com.stevesoft.pat.Pthings"); -c$ = Clazz.declareType (com.stevesoft.pat, "RegOpt"); -c$.opt = Clazz.defineMethod (c$, "opt", -function (p, ignoreCase, dontMinQ) { -if (p == null) { -return p; -}if (Clazz.instanceOf (p, com.stevesoft.pat.Bracket)) { -var b = p; -p = com.stevesoft.pat.FastBracket.process (b, ignoreCase); -p.next = b.next; -p.parent = b.parent; -} else if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar) && !ignoreCase && !dontMinQ) { -var o = p; -p = new com.stevesoft.pat.FastChar (o.c); -p.next = o.next; -p.parent = o.parent; -} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or) && (p).leftForm ().equals ("(?:") && (p).v.size () == 1) { -var o = p; -p = o.v.elementAt (0); -p.setParent (null); -p = com.stevesoft.pat.RegOpt.opt (p, ignoreCase, dontMinQ); -p.add (o.next); -} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or)) { -var o = p; -o.pv = null; -var v = o.v; -o.v = new java.util.Vector (); -var b = new com.stevesoft.pat.Branch (); -b.parent = o.parent; -for (var i = 0; i < v.size (); i++) { -var pp = v.elementAt (i); -if (Clazz.instanceOf (pp, com.stevesoft.pat.oneChar) && (b.h.size () >= 1 || (i + 1 < v.size () && Clazz.instanceOf (v.elementAt (i + 1), com.stevesoft.pat.oneChar)))) { -b.addc (pp, ignoreCase, dontMinQ); -} else { -if (b.keys.size () > 0) { -var p2 = b.reduce (ignoreCase, dontMinQ); -if (p2 != null) { -o.addOr (p2); -b = new com.stevesoft.pat.Branch (); -b.parent = o.parent; -}}o.addOr (com.stevesoft.pat.RegOpt.opt (pp, ignoreCase, dontMinQ)); -}} -if (b.keys.size () > 0) { -var p2 = b.reduce (ignoreCase, dontMinQ); -if (p2 != null) { -o.addOr (p2); -}}if (o.v.size () == 1 && o.leftForm ().equals ("(?:")) { -p = o.v.elementAt (0); -p.setParent (null); -p = com.stevesoft.pat.RegOpt.opt (p, ignoreCase, dontMinQ); -p.add (o.next); -}} else if (Clazz.instanceOf (p, com.stevesoft.pat.FastMulti)) { -var ps = p; -ps.sub = com.stevesoft.pat.RegOpt.opt (ps.sub, ignoreCase, dontMinQ); -} else if (Clazz.instanceOf (p, com.stevesoft.pat.Multi) && com.stevesoft.pat.RegOpt.safe4fm ((p).sub)) { -var m = p; -var fm = null; -try { -fm = new com.stevesoft.pat.FastMulti (m.a, m.b, com.stevesoft.pat.RegOpt.opt (m.sub, ignoreCase, dontMinQ)); -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -} else { -throw rs; -} -} -fm.parent = m.parent; -fm.matchFewest = m.matchFewest; -fm.next = m.next; -p = fm; -}if (p.next != null) { -p.next = com.stevesoft.pat.RegOpt.opt (p.next, ignoreCase, dontMinQ); -}return p; -}, "com.stevesoft.pat.Pattern,~B,~B"); -c$.safe4fm = Clazz.defineMethod (c$, "safe4fm", -function (x) { -while (x != null) { -if (Clazz.instanceOf (x, com.stevesoft.pat.Bracket)) { -;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Range)) { -;} else if (Clazz.instanceOf (x, com.stevesoft.pat.oneChar)) { -;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Any)) { -;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Custom) && Clazz.instanceOf ((x).v, com.stevesoft.pat.UniValidator)) { -;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Or)) { -var o = x; -if (!o.leftForm ().equals ("(?:")) { -return false; -}var lo = o.countMinChars (); -var hi = o.countMaxChars (); -if (!lo.equals (hi)) { -return false; -}for (var i = 0; i < o.v.size (); i++) { -if (!com.stevesoft.pat.RegOpt.safe4fm (o.v.elementAt (i))) { -return false; -}} -} else { -return false; -}x = x.next; -} -return true; -}, "com.stevesoft.pat.Pattern"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern", "$.oneChar", "java.util.Hashtable", "$.Vector"], ["com.stevesoft.pat.Branch", "$.RegOpt", "$.FastChar"], ["com.stevesoft.pat.Any", "$.Bracket", "$.Custom", "$.FastBracket", "$.FastMulti", "$.Multi", "$.NullPattern", "$.Or", "$.Range", "$.UniValidator", "$.patInt", "java.lang.Character", "$.StringBuffer"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "FastChar", com.stevesoft.pat.oneChar); +Clazz.overrideMethod (c$, "matchInternal", +function (p, pt) { +return (p < pt.src.length () && pt.src.charAt (p) == this.c) ? this.nextMatch (p + 1, pt) : -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.FastChar (this.c); +}, "java.util.Hashtable"); +c$ = Clazz.decorateAsClass (function () { +this.h = null; +this.keys = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Branch", com.stevesoft.pat.Pattern); +Clazz.prepareFields (c$, function () { +this.h = new java.util.Hashtable (); +this.keys = new java.util.Vector (); +}); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.Branch, []); +}); +Clazz.overrideMethod (c$, "clone1", +function (x) { +var b = new com.stevesoft.pat.Branch (); +b.keys = this.keys.clone (); +x.put (this, b); +x.put (b, b); +for (var i = 0; i < this.keys.size (); i++) { +var p = this.h.get (this.keys.elementAt (i)); +b.h.put (this.keys.elementAt (i), p.clone (x)); +} +return b; +}, "java.util.Hashtable"); +Clazz.defineMethod (c$, "reduce", +function (ignoreCase, dontMinQ) { +if (this.h.size () == 1) { +var e = this.h.keys (); +var c = e.nextElement (); +var oc; +if (ignoreCase || dontMinQ) { +oc = new com.stevesoft.pat.oneChar (c.charValue ()); +} else { +oc = new com.stevesoft.pat.FastChar (c.charValue ()); +}oc.next = this.h.get (c); +oc.add (this.next); +return oc; +} else if (this.h.size () == 0) { +return null; +}return this; +}, "~B,~B"); +Clazz.defineMethod (c$, "maxChars", +function () { +var e = this.h.keys (); +var count = new com.stevesoft.pat.patInt (0); +while (e.hasMoreElements ()) { +var key = e.nextElement (); +var pa = this.h.get (key); +var pi = pa.maxChars (); +pi.inc (); +count.maxeq (pi); +} +return count; +}); +Clazz.defineMethod (c$, "minChars", +function () { +var e = this.h.keys (); +var count = new com.stevesoft.pat.patInt (0); +while (e.hasMoreElements ()) { +var key = e.nextElement (); +var pa = this.h.get (key); +var pi = pa.minChars (); +pi.inc (); +count.mineq (pi); +} +return count; +}); +Clazz.defineMethod (c$, "addc", +function (o, ignoreCase, dontMinQ) { +var n = o.next; +if (n == null) { +n = new com.stevesoft.pat.NullPattern (); +} else { +n = com.stevesoft.pat.RegOpt.opt (n, ignoreCase, dontMinQ); +}n.setParent (this); +this.set ( new Character (o.c), n, ignoreCase, dontMinQ); +if (ignoreCase) { +if (o.c != o.altc) { +this.set ( new Character (o.altc), n, ignoreCase, dontMinQ); +}if (o.c != o.altc2 && o.altc != o.altc2) { +this.set ( new Character (o.altc2), n, ignoreCase, dontMinQ); +}}}, "com.stevesoft.pat.oneChar,~B,~B"); +Clazz.defineMethod (c$, "set", +function (c, n, igc, dontMinQ) { +var p = this.h.get (c); +this.next = null; +if (p == null) { +if (Clazz.instanceOf (n, com.stevesoft.pat.Or)) { +var np = new com.stevesoft.pat.NullPattern (); +np.add (n); +this.h.put (c, np); +} else { +this.h.put (c, n); +}this.keys.addElement (c); +} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or)) { +(p).addOr (n); +} else if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar) && Clazz.instanceOf (n, com.stevesoft.pat.oneChar) && (p).c != (n).c) { +var b = new com.stevesoft.pat.Branch (); +b.addc (p, igc, dontMinQ); +b.addc (n, igc, dontMinQ); +this.h.put (c, b); +b.setParent (this); +} else if (Clazz.instanceOf (p, com.stevesoft.pat.Branch) && Clazz.instanceOf (n, com.stevesoft.pat.oneChar)) { +(p).addc (n, igc, dontMinQ); +n.setParent (p); +} else { +var o = new com.stevesoft.pat.Or (); +o.setParent (this); +if (Clazz.instanceOf (p, com.stevesoft.pat.NullPattern) && p.parent == null && p.next != null) { +o.addOr (p.next); +} else { +o.addOr (p); +}o.addOr (n); +var optpat = com.stevesoft.pat.RegOpt.opt (o, igc, dontMinQ); +this.h.put (c, optpat); +optpat.setParent (this); +}}, "Character,com.stevesoft.pat.Pattern,~B,~B"); +Clazz.overrideMethod (c$, "toString", +function () { +var sb = new StringBuffer (); +sb.append ("(?:(?#branch)"); +for (var i = 0; i < this.keys.size (); i++) { +var c = this.keys.elementAt (i); +sb.append (c); +sb.append (this.h.get (c)); +if (i + 1 < this.keys.size ()) { +sb.append ("|"); +}} +sb.append (")"); +sb.append (this.nextString ()); +return sb.toString (); +}); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +if (pos >= pt.src.length ()) { +return -1; +}var n = this.h.get ( new Character (pt.src.charAt (pos))); +if (n == null) { +return -1; +}if (pt.cbits != null && pt.cbits.get (pos)) { +return -1; +}return n.matchInternal (pos + 1, pt); +}, "~N,com.stevesoft.pat.Pthings"); +c$ = Clazz.declareType (com.stevesoft.pat, "RegOpt"); +c$.opt = Clazz.defineMethod (c$, "opt", +function (p, ignoreCase, dontMinQ) { +if (p == null) { +return p; +}if (Clazz.instanceOf (p, com.stevesoft.pat.Bracket)) { +var b = p; +p = com.stevesoft.pat.FastBracket.process (b, ignoreCase); +p.next = b.next; +p.parent = b.parent; +} else if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar) && !ignoreCase && !dontMinQ) { +var o = p; +p = new com.stevesoft.pat.FastChar (o.c); +p.next = o.next; +p.parent = o.parent; +} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or) && (p).leftForm ().equals ("(?:") && (p).v.size () == 1) { +var o = p; +p = o.v.elementAt (0); +p.setParent (null); +p = com.stevesoft.pat.RegOpt.opt (p, ignoreCase, dontMinQ); +p.add (o.next); +} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or)) { +var o = p; +o.pv = null; +var v = o.v; +o.v = new java.util.Vector (); +var b = new com.stevesoft.pat.Branch (); +b.parent = o.parent; +for (var i = 0; i < v.size (); i++) { +var pp = v.elementAt (i); +if (Clazz.instanceOf (pp, com.stevesoft.pat.oneChar) && (b.h.size () >= 1 || (i + 1 < v.size () && Clazz.instanceOf (v.elementAt (i + 1), com.stevesoft.pat.oneChar)))) { +b.addc (pp, ignoreCase, dontMinQ); +} else { +if (b.keys.size () > 0) { +var p2 = b.reduce (ignoreCase, dontMinQ); +if (p2 != null) { +o.addOr (p2); +b = new com.stevesoft.pat.Branch (); +b.parent = o.parent; +}}o.addOr (com.stevesoft.pat.RegOpt.opt (pp, ignoreCase, dontMinQ)); +}} +if (b.keys.size () > 0) { +var p2 = b.reduce (ignoreCase, dontMinQ); +if (p2 != null) { +o.addOr (p2); +}}if (o.v.size () == 1 && o.leftForm ().equals ("(?:")) { +p = o.v.elementAt (0); +p.setParent (null); +p = com.stevesoft.pat.RegOpt.opt (p, ignoreCase, dontMinQ); +p.add (o.next); +}} else if (Clazz.instanceOf (p, com.stevesoft.pat.FastMulti)) { +var ps = p; +ps.sub = com.stevesoft.pat.RegOpt.opt (ps.sub, ignoreCase, dontMinQ); +} else if (Clazz.instanceOf (p, com.stevesoft.pat.Multi) && com.stevesoft.pat.RegOpt.safe4fm ((p).sub)) { +var m = p; +var fm = null; +try { +fm = new com.stevesoft.pat.FastMulti (m.a, m.b, com.stevesoft.pat.RegOpt.opt (m.sub, ignoreCase, dontMinQ)); +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +} else { +throw rs; +} +} +fm.parent = m.parent; +fm.matchFewest = m.matchFewest; +fm.next = m.next; +p = fm; +}if (p.next != null) { +p.next = com.stevesoft.pat.RegOpt.opt (p.next, ignoreCase, dontMinQ); +}return p; +}, "com.stevesoft.pat.Pattern,~B,~B"); +c$.safe4fm = Clazz.defineMethod (c$, "safe4fm", +function (x) { +while (x != null) { +if (Clazz.instanceOf (x, com.stevesoft.pat.Bracket)) { +;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Range)) { +;} else if (Clazz.instanceOf (x, com.stevesoft.pat.oneChar)) { +;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Any)) { +;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Custom) && Clazz.instanceOf ((x).v, com.stevesoft.pat.UniValidator)) { +;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Or)) { +var o = x; +if (!o.leftForm ().equals ("(?:")) { +return false; +}var lo = o.countMinChars (); +var hi = o.countMaxChars (); +if (!lo.equals (hi)) { +return false; +}for (var i = 0; i < o.v.size (); i++) { +if (!com.stevesoft.pat.RegOpt.safe4fm (o.v.elementAt (i))) { +return false; +}} +} else { +return false; +}x = x.next; +} +return true; +}, "com.stevesoft.pat.Pattern"); +}); diff --git a/bin/com/stevesoft/pat/RegRes.js b/bin/com/stevesoft/pat/RegRes.js index ec4def1..9a31c29 100644 --- a/bin/com/stevesoft/pat/RegRes.js +++ b/bin/com/stevesoft/pat/RegRes.js @@ -1,155 +1,155 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.RegRes", ["java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.marks = null; -this.didMatch_ = false; -this.src = null; -this.charsMatched_ = 0; -this.matchFrom_ = 0; -this.numSubs_ = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "RegRes"); -Clazz.defineMethod (c$, "getString", -function () { -return this.src.toString (); -}); -Clazz.defineMethod (c$, "getStringLike", -function () { -return this.src; -}); -Clazz.overrideMethod (c$, "toString", -function () { -var sb = new StringBuffer (); -sb.append ("match=" + this.matchedFrom () + ":" + this.charsMatched ()); -if (!this.didMatch ()) { -return sb.toString (); -}for (var i = 0; i < this.numSubs (); i++) { -var n = i + 1; -sb.append (" sub(" + n + ")=" + this.matchedFromI (n) + ":" + this.charsMatchedI (n)); -} -return sb.toString (); -}); -Clazz.defineMethod (c$, "copyOutOf", -function (r) { -if (r.marks == null) { -this.marks = null; -} else { -try { -this.marks = Clazz.newIntArray (r.marks.length, 0); -for (var i = 0; i < this.marks.length; i++) { -this.marks[i] = r.marks[i]; -} -} catch (t) { -} -}this.didMatch_ = r.didMatch_; -this.src = r.src; -this.charsMatched_ = r.charsMatched_; -this.matchFrom_ = r.matchFrom_; -this.numSubs_ = r.numSubs_; -}, "com.stevesoft.pat.RegRes"); -Clazz.defineMethod (c$, "equals", -function (r) { -if (this.charsMatched_ != r.charsMatched_ || this.matchFrom_ != r.matchFrom_ || this.didMatch_ != r.didMatch_ || this.numSubs_ != r.numSubs_ || !this.src.unwrap ().equals (r.src.unwrap ())) { -return false; -}if (this.marks == null && r.marks != null) { -return false; -}if (this.marks != null && r.marks == null) { -return false; -}for (var i = 1; i <= this.numSubs_; i++) { -if (this.matchedFromI (i) != r.matchedFromI (i)) { -return false; -} else if (this.charsMatchedI (i) != r.charsMatchedI (i)) { -return false; -}} -return true; -}, "com.stevesoft.pat.RegRes"); -Clazz.defineMethod (c$, "stringMatched", -function () { -var mf = this.matchedFrom (); -var cm = this.charsMatched (); -return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf, mf + cm); -}); -Clazz.defineMethod (c$, "matchedFromI", -function (i) { -if (this.marks == null || i > this.numSubs_) { -return -1; -}return this.marks[i]; -}, "~N"); -Clazz.defineMethod (c$, "charsMatchedI", -function (i) { -if (this.marks == null || i > this.numSubs_ || !this.didMatch_) { -return -1; -}var mf = this.matchedFromI (i); -return mf < 0 ? -1 : this.marks[i + this.numSubs_] - this.matchedFromI (i); -}, "~N"); -Clazz.defineMethod (c$, "matchedToI", -function (i) { -if (this.marks == null || i > this.numSubs_ || !this.didMatch_) { -return -1; -}return this.marks[i + this.numSubs_]; -}, "~N"); -Clazz.defineMethod (c$, "stringMatchedI", -function (i) { -var mf = this.matchedFromI (i); -var cm = this.charsMatchedI (i); -return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf, mf + cm); -}, "~N"); -Clazz.defineMethod (c$, "left", -function () { -var mf = this.matchedFrom (); -return !this.didMatch_ || (mf < 0) ? null : this.src.substring (0, mf); -}); -Clazz.defineMethod (c$, "leftI", -function (i) { -var mf = this.matchedFromI (i); -return !this.didMatch_ || (mf < 0) ? null : this.src.substring (0, mf); -}, "~N"); -Clazz.defineMethod (c$, "right", -function () { -var mf = this.matchedFrom (); -var cm = this.charsMatched (); -return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf + cm, this.src.length ()); -}); -Clazz.defineMethod (c$, "rightI", -function (i) { -var mf = this.matchedFromI (i); -var cm = this.charsMatchedI (i); -return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf + cm, this.src.length ()); -}, "~N"); -Clazz.defineMethod (c$, "matchedFrom", -function () { -return !this.didMatch_ ? -1 : this.matchFrom_; -}); -Clazz.defineMethod (c$, "charsMatched", -function () { -return !this.didMatch_ || this.matchFrom_ < 0 ? -1 : this.charsMatched_; -}); -Clazz.defineMethod (c$, "matchedTo", -function () { -return !this.didMatch_ ? -1 : this.matchFrom_ + this.charsMatched_; -}); -Clazz.defineMethod (c$, "numSubs", -function () { -return this.numSubs_; -}); -Clazz.defineMethod (c$, "didMatch", -function () { -return this.didMatch_; -}); -Clazz.defineMethod (c$, "matchFrom", -function () { -return this.matchedFrom (); -}); -Clazz.defineMethod (c$, "substring", -function () { -return this.stringMatched (); -}); -Clazz.defineMethod (c$, "matchFromI", -function (i) { -return this.matchedFromI (i); -}, "~N"); -Clazz.defineMethod (c$, "substringI", -function (i) { -return this.stringMatchedI (i); -}, "~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.RegRes", ["java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.marks = null; +this.didMatch_ = false; +this.src = null; +this.charsMatched_ = 0; +this.matchFrom_ = 0; +this.numSubs_ = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RegRes"); +Clazz.defineMethod (c$, "getString", +function () { +return this.src.toString (); +}); +Clazz.defineMethod (c$, "getStringLike", +function () { +return this.src; +}); +Clazz.overrideMethod (c$, "toString", +function () { +var sb = new StringBuffer (); +sb.append ("match=" + this.matchedFrom () + ":" + this.charsMatched ()); +if (!this.didMatch ()) { +return sb.toString (); +}for (var i = 0; i < this.numSubs (); i++) { +var n = i + 1; +sb.append (" sub(" + n + ")=" + this.matchedFromI (n) + ":" + this.charsMatchedI (n)); +} +return sb.toString (); +}); +Clazz.defineMethod (c$, "copyOutOf", +function (r) { +if (r.marks == null) { +this.marks = null; +} else { +try { +this.marks = Clazz.newIntArray (r.marks.length, 0); +for (var i = 0; i < this.marks.length; i++) { +this.marks[i] = r.marks[i]; +} +} catch (t) { +} +}this.didMatch_ = r.didMatch_; +this.src = r.src; +this.charsMatched_ = r.charsMatched_; +this.matchFrom_ = r.matchFrom_; +this.numSubs_ = r.numSubs_; +}, "com.stevesoft.pat.RegRes"); +Clazz.defineMethod (c$, "equals", +function (r) { +if (this.charsMatched_ != r.charsMatched_ || this.matchFrom_ != r.matchFrom_ || this.didMatch_ != r.didMatch_ || this.numSubs_ != r.numSubs_ || !this.src.unwrap ().equals (r.src.unwrap ())) { +return false; +}if (this.marks == null && r.marks != null) { +return false; +}if (this.marks != null && r.marks == null) { +return false; +}for (var i = 1; i <= this.numSubs_; i++) { +if (this.matchedFromI (i) != r.matchedFromI (i)) { +return false; +} else if (this.charsMatchedI (i) != r.charsMatchedI (i)) { +return false; +}} +return true; +}, "com.stevesoft.pat.RegRes"); +Clazz.defineMethod (c$, "stringMatched", +function () { +var mf = this.matchedFrom (); +var cm = this.charsMatched (); +return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf, mf + cm); +}); +Clazz.defineMethod (c$, "matchedFromI", +function (i) { +if (this.marks == null || i > this.numSubs_) { +return -1; +}return this.marks[i]; +}, "~N"); +Clazz.defineMethod (c$, "charsMatchedI", +function (i) { +if (this.marks == null || i > this.numSubs_ || !this.didMatch_) { +return -1; +}var mf = this.matchedFromI (i); +return mf < 0 ? -1 : this.marks[i + this.numSubs_] - this.matchedFromI (i); +}, "~N"); +Clazz.defineMethod (c$, "matchedToI", +function (i) { +if (this.marks == null || i > this.numSubs_ || !this.didMatch_) { +return -1; +}return this.marks[i + this.numSubs_]; +}, "~N"); +Clazz.defineMethod (c$, "stringMatchedI", +function (i) { +var mf = this.matchedFromI (i); +var cm = this.charsMatchedI (i); +return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf, mf + cm); +}, "~N"); +Clazz.defineMethod (c$, "left", +function () { +var mf = this.matchedFrom (); +return !this.didMatch_ || (mf < 0) ? null : this.src.substring (0, mf); +}); +Clazz.defineMethod (c$, "leftI", +function (i) { +var mf = this.matchedFromI (i); +return !this.didMatch_ || (mf < 0) ? null : this.src.substring (0, mf); +}, "~N"); +Clazz.defineMethod (c$, "right", +function () { +var mf = this.matchedFrom (); +var cm = this.charsMatched (); +return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf + cm, this.src.length ()); +}); +Clazz.defineMethod (c$, "rightI", +function (i) { +var mf = this.matchedFromI (i); +var cm = this.charsMatchedI (i); +return !this.didMatch_ || mf < 0 || cm < 0 ? null : this.src.substring (mf + cm, this.src.length ()); +}, "~N"); +Clazz.defineMethod (c$, "matchedFrom", +function () { +return !this.didMatch_ ? -1 : this.matchFrom_; +}); +Clazz.defineMethod (c$, "charsMatched", +function () { +return !this.didMatch_ || this.matchFrom_ < 0 ? -1 : this.charsMatched_; +}); +Clazz.defineMethod (c$, "matchedTo", +function () { +return !this.didMatch_ ? -1 : this.matchFrom_ + this.charsMatched_; +}); +Clazz.defineMethod (c$, "numSubs", +function () { +return this.numSubs_; +}); +Clazz.defineMethod (c$, "didMatch", +function () { +return this.didMatch_; +}); +Clazz.defineMethod (c$, "matchFrom", +function () { +return this.matchedFrom (); +}); +Clazz.defineMethod (c$, "substring", +function () { +return this.stringMatched (); +}); +Clazz.defineMethod (c$, "matchFromI", +function (i) { +return this.matchedFromI (i); +}, "~N"); +Clazz.defineMethod (c$, "substringI", +function (i) { +return this.stringMatchedI (i); +}, "~N"); +}); diff --git a/bin/com/stevesoft/pat/RegSyntax.js b/bin/com/stevesoft/pat/RegSyntax.js index 9275c48..8a6e621 100644 --- a/bin/com/stevesoft/pat/RegSyntax.js +++ b/bin/com/stevesoft/pat/RegSyntax.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["java.lang.Exception"], "com.stevesoft.pat.RegSyntax", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "RegSyntax", Exception); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.RegSyntax, []); -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["java.lang.Exception"], "com.stevesoft.pat.RegSyntax", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "RegSyntax", Exception); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.RegSyntax, []); +}); +}); diff --git a/bin/com/stevesoft/pat/RegSyntaxError.js b/bin/com/stevesoft/pat/RegSyntaxError.js index 5a81c21..3a127a5 100644 --- a/bin/com/stevesoft/pat/RegSyntaxError.js +++ b/bin/com/stevesoft/pat/RegSyntaxError.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["java.lang.Error"], "com.stevesoft.pat.RegSyntaxError", ["com.stevesoft.pat.RegSyntax"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "RegSyntaxError", Error); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.RegSyntaxError, []); -}); -c$.endItAll = Clazz.defineMethod (c$, "endItAll", -function (s) { -if (com.stevesoft.pat.RegSyntaxError.RegSyntaxErrorEnabled) { -throw new com.stevesoft.pat.RegSyntaxError (s); -}throw new com.stevesoft.pat.RegSyntax (s); -}, "~S"); -Clazz.defineStatics (c$, -"RegSyntaxErrorEnabled", false); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["java.lang.Error"], "com.stevesoft.pat.RegSyntaxError", ["com.stevesoft.pat.RegSyntax"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "RegSyntaxError", Error); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.RegSyntaxError, []); +}); +c$.endItAll = Clazz.defineMethod (c$, "endItAll", +function (s) { +if (com.stevesoft.pat.RegSyntaxError.RegSyntaxErrorEnabled) { +throw new com.stevesoft.pat.RegSyntaxError (s); +}throw new com.stevesoft.pat.RegSyntax (s); +}, "~S"); +Clazz.defineStatics (c$, +"RegSyntaxErrorEnabled", false); +}); diff --git a/bin/com/stevesoft/pat/Regex.class b/bin/com/stevesoft/pat/Regex.class index 89553f04e5d229c473dcc8b7222278d622fe529e..14f6f05c57d97868b50c5b8e349cb4e6029e7918 100644 GIT binary patch delta 240 zcmZ2;jd9^M#tnybIJFp9fRKTqeDWXdsL86j8$`qznEx{*GcdC=FtRgT1R@58z|F68 zT{#)gZZUknN`hT`PjuweNph=q)aK>Z91e;BNQW=cr#LV$?$WX5m>MuEx7 x;p&21C@QV>1UJWqPhw$o+x#J#nT^|tK}PBi&_zt~f|LIzYA_0I)=XmN1OQa3H~|0v delta 230 zcmZ2@jd9I2#tnybIJFsAfRKTqeDWXdsL86j8$=}-SpG94GcdC=FtRgT1R@3oKBvtu zbzM0b&u!K>U&JV&&A|GHfe$F-0L1?pY9>FlkYZ%o{M$l;kI{d#hc-VG2yVOp|58 z)rHwn6MYBpTxrGvH5v4GaHW!gPhbK1`c+ncs{1dUlTQ$_?b4#B{6dX0NS%Q AQ~&?~ diff --git a/bin/com/stevesoft/pat/Regex.js b/bin/com/stevesoft/pat/Regex.js index d05b95e..893eaa7 100644 --- a/bin/com/stevesoft/pat/Regex.js +++ b/bin/com/stevesoft/pat/Regex.js @@ -1,1026 +1,1026 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.RegRes", "$.UniValidator", "jalview.jsdev.api.RegExpInterface", "com.stevesoft.pat.NoPattern", "$.Pthings", "$.patInt", "java.util.Hashtable"], ["com.stevesoft.pat.UnicodeW", "$.UnicodeCurrency", "$.UnicodeAlpha", "$.UnicodeUpper", "$.NUnicodeCurrency", "$.NUnicodeW", "$.NUnicodeAlpha", "$.UnicodeMath", "$.UnicodeWhite", "$.UnicodeDigit", "$.NUnicodeMath", "$.Regex", "$.NUnicodeDigit", "$.NUnicodeWhite", "$.NUnicodePunct", "$.UnicodePunct", "$.UnicodeLower"], ["com.stevesoft.pat.Any", "$.BackG", "$.BackMatch", "$.Backup", "$.Boundary", "$.Bracket", "$.CaseMgr", "$.Ctrl", "$.Custom", "$.CustomEndpoint", "$.DotMulti", "$.End", "$.FastMulti", "$.Group", "$.MessageManager", "$.Multi", "$.NullPattern", "$.Or", "$.OrMark", "$.Prop", "$.Range", "$.RegOpt", "$.RegSyntax", "$.RegSyntaxError", "$.ReplaceRule", "$.Replacer", "$.Rthings", "$.Skip", "$.Skipped", "$.Start", "$.StrPos", "$.lookAhead", "$.oneChar", "$.parsePerl", "$.patInf", "com.stevesoft.pat.wrap.StringWrap", "java.lang.NullPointerException", "$.StringBuffer", "java.util.BitSet"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodePunct", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && com.stevesoft.pat.Prop.isPunct (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeWhite", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && com.stevesoft.pat.Prop.isWhite (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodePunct", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && !com.stevesoft.pat.Prop.isPunct (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeWhite", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && !com.stevesoft.pat.Prop.isWhite (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeW", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -if (from >= s.length ()) { -return -1; -}var c = s.charAt (from); -return (com.stevesoft.pat.Prop.isAlphabetic (c) || com.stevesoft.pat.Prop.isDecimalDigit (c) || c == '_') ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeW", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -if (from >= s.length ()) { -return -1; -}var c = s.charAt (from); -return !(com.stevesoft.pat.Prop.isAlphabetic (c) || com.stevesoft.pat.Prop.isDecimalDigit (c) || c == '_') ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeDigit", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && com.stevesoft.pat.Prop.isDecimalDigit (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeDigit", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && !com.stevesoft.pat.Prop.isDecimalDigit (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeMath", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && com.stevesoft.pat.Prop.isMath (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeMath", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && !com.stevesoft.pat.Prop.isMath (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeCurrency", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && com.stevesoft.pat.Prop.isCurrency (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeCurrency", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && !com.stevesoft.pat.Prop.isCurrency (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeAlpha", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && com.stevesoft.pat.Prop.isAlphabetic (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeAlpha", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && !com.stevesoft.pat.Prop.isAlphabetic (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeUpper", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && this.isUpper (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "isUpper", -function (c) { -return c == com.stevesoft.pat.CaseMgr.toUpperCaseC (c) && c != com.stevesoft.pat.CaseMgr.toLowerCaseC (c); -}, "~S"); -c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeLower", com.stevesoft.pat.UniValidator); -Clazz.overrideMethod (c$, "validate", -function (s, from, to) { -return from < s.length () && this.isLower (s.charAt (from)) ? to : -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "isLower", -function (c) { -return c != com.stevesoft.pat.CaseMgr.toUpperCaseC (c) && c == com.stevesoft.pat.CaseMgr.toLowerCaseC (c); -}, "~S"); -c$ = Clazz.decorateAsClass (function () { -this.thePattern = null; -this.minMatch = null; -this.rep = null; -this.dontMatchInQuotes = false; -this.ignoreCase = false; -this.repr = null; -this.esc = '\\'; -this.pt = null; -this.gFlags = null; -this.gFlagto = 0; -this.gFlag = false; -this.sFlag = false; -this.mFlag = false; -this.p = null; -this.or = null; -this.skipper = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Regex", com.stevesoft.pat.RegRes, [jalview.jsdev.api.RegExpInterface, Cloneable]); -Clazz.prepareFields (c$, function () { -this.thePattern = com.stevesoft.pat.Regex.none; -this.minMatch = new com.stevesoft.pat.patInt (0); -this.pt = new com.stevesoft.pat.Pthings (); -}); -Clazz.makeConstructor (c$, -function (s, strRp) { -Clazz.superConstructor (this, com.stevesoft.pat.Regex, []); -try { -if (s != null) this.compile (s); -if (strRp.length > 0) this.rep = com.stevesoft.pat.ReplaceRule.perlCode (strRp); -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -} else { -throw rs; -} -} -}, "~S,~S"); -Clazz.overrideMethod (c$, "clone", -function () { -return new com.stevesoft.pat.Regex (null, "").cloneFrom (this); -}); -Clazz.defineMethod (c$, "cloneFrom", -function (r) { -this.copyOutOf (r); -this.dontMatchInQuotes = r.dontMatchInQuotes; -this.esc = r.esc; -this.ignoreCase = r.ignoreCase; -this.gFlag = r.gFlag; -if (r.rep == null) { -this.rep = null; -} else { -this.rep = r.rep.clone (); -}this.thePattern = r.thePattern.clone ( new java.util.Hashtable ()); -this.minMatch = r.minMatch; -this.skipper = r.skipper; -return this; -}, "com.stevesoft.pat.Regex"); -Clazz.defineMethod (c$, "setDontMatchInQuotes", -function (b) { -this.dontMatchInQuotes = b; -}, "~B"); -Clazz.defineMethod (c$, "getDontMatchInQuotes", -function () { -return this.dontMatchInQuotes; -}); -Clazz.overrideMethod (c$, "setIgnoreCase", -function (b) { -this.ignoreCase = b; -}, "~B"); -Clazz.defineMethod (c$, "getIgnoreCase", -function () { -return this.ignoreCase; -}); -c$.setDefaultMFlag = Clazz.defineMethod (c$, "setDefaultMFlag", -function (mFlag) { -com.stevesoft.pat.Regex.defaultMFlag = mFlag; -}, "~B"); -c$.getDefaultMFlag = Clazz.defineMethod (c$, "getDefaultMFlag", -function () { -return com.stevesoft.pat.Regex.defaultMFlag; -}); -Clazz.defineMethod (c$, "setReplaceRuleStr", -function (rp) { -this.rep = com.stevesoft.pat.ReplaceRule.perlCode (rp); -this.repr = null; -}, "~S"); -Clazz.defineMethod (c$, "setReplaceRule", -function (rp) { -this.rep = rp; -}, "com.stevesoft.pat.ReplaceRule"); -c$.isDefined = Clazz.defineMethod (c$, "isDefined", -function (nm) { -return com.stevesoft.pat.Regex.validators.get (nm) != null; -}, "~S"); -c$.undefine = Clazz.defineMethod (c$, "undefine", -function (nm) { -com.stevesoft.pat.Regex.validators.remove (nm); -}, "~S"); -c$.defineV = Clazz.defineMethod (c$, "defineV", -function (nm, pat, v) { -v.pattern = pat; -com.stevesoft.pat.Regex.validators.put (nm, v); -}, "~S,~S,com.stevesoft.pat.Validator"); -c$.define = Clazz.defineMethod (c$, "define", -function (nm, pat) { -com.stevesoft.pat.Regex.validators.put (nm, pat); -}, "~S,~S"); -Clazz.defineMethod (c$, "getReplaceRule", -function () { -return this.rep; -}); -Clazz.defineMethod (c$, "_getReplacer", -function () { -return this.repr == null ? this.repr = new com.stevesoft.pat.Replacer () : this.repr; -}); -Clazz.defineMethod (c$, "getReplacer", -function () { -if (this.repr == null) { -this.repr = new com.stevesoft.pat.Replacer (); -}this.repr.rh.me = this; -this.repr.rh.prev = null; -return this.repr; -}); -Clazz.defineMethod (c$, "replaceFirst", -function (s) { -return this._getReplacer ().replaceFirstRegion (s, this, 0, s.length).toString (); -}, "~S"); -Clazz.defineMethod (c$, "replaceFirstFrom", -function (s, pos) { -return this._getReplacer ().replaceFirstRegion (s, this, pos, s.length).toString (); -}, "~S,~N"); -Clazz.defineMethod (c$, "replaceFirstRegion", -function (s, start, end) { -return this._getReplacer ().replaceFirstRegion (s, this, start, end).toString (); -}, "~S,~N,~N"); -Clazz.overrideMethod (c$, "replaceAll", -function (s) { -return this._getReplacer ().replaceAllRegion (s, this, 0, s.length).toString (); -}, "~S"); -Clazz.defineMethod (c$, "replaceAllLike", -function (s) { -return this._getReplacer ().replaceAllRegion (s, this, 0, s.length ()); -}, "com.stevesoft.pat.StringLike"); -Clazz.defineMethod (c$, "replaceAllFrom", -function (s, pos) { -return this._getReplacer ().replaceAllRegion (s, this, pos, s.length).toString (); -}, "~S,~N"); -Clazz.defineMethod (c$, "replaceAllRegion", -function (s, start, end) { -return this._getReplacer ().replaceAllRegion (s, this, start, end).toString (); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "compile", -function (prepat) { -var postpat = com.stevesoft.pat.parsePerl.codify (prepat, true); -var pat = postpat == null ? prepat : postpat; -this.minMatch = null; -this.ignoreCase = false; -this.dontMatchInQuotes = false; -var mk = new com.stevesoft.pat.Rthings (this); -var offset = mk.val; -var newpat = pat; -this.thePattern = com.stevesoft.pat.Regex.none; -this.p = null; -this.or = null; -this.minMatch = new com.stevesoft.pat.patInt (0); -var sp = new com.stevesoft.pat.StrPos (pat, 0); -if (sp.incMatch ("(?e=")) { -var newEsc = sp.c; -sp.inc (); -if (sp.match (')')) { -newpat = com.stevesoft.pat.Regex.reEscape (pat.substring (6), newEsc, '\\'); -}} else if (this.esc != '\\') { -newpat = com.stevesoft.pat.Regex.reEscape (pat, this.esc, '\\'); -}this.thePattern = this._compile (newpat, mk); -this.numSubs_ = mk.val - offset; -mk.set (this); -}, "~S"); -Clazz.defineMethod (c$, "equals", -function (o) { -if (Clazz.instanceOf (o, com.stevesoft.pat.Regex)) { -if (this.toString ().equals (o.toString ())) { -return Clazz.superCall (this, com.stevesoft.pat.Regex, "equals", [o]); -} else { -return false; -}} else { -return Clazz.superCall (this, com.stevesoft.pat.Regex, "equals", [o]); -}}, "~O"); -Clazz.defineMethod (c$, "prep", -function (s) { -this.pt.lastPos = this.matchedTo (); -if (this.pt.lastPos < 0) { -this.pt.lastPos = 0; -}if ((s == null ? null : s.unwrap ()) !== (this.src == null ? null : s.unwrap ())) { -this.pt.lastPos = 0; -}this.src = s; -this.pt.dotDoesntMatchCR = com.stevesoft.pat.Regex.dotDoesntMatchCR && (!this.sFlag); -this.pt.mFlag = ( new Boolean (this.mFlag | com.stevesoft.pat.Regex.defaultMFlag).valueOf ()); -this.pt.ignoreCase = this.ignoreCase; -this.pt.no_check = false; -if (this.pt.marks != null) { -for (var i = 0; i < this.pt.marks.length; i++) { -this.pt.marks[i] = -1; -} -}this.pt.marks = null; -this.pt.nMarks = this.numSubs_; -this.pt.src = s; -if (this.dontMatchInQuotes) { -com.stevesoft.pat.Regex.setCbits (s, this.pt); -} else { -this.pt.cbits = null; -}return this.pt; -}, "com.stevesoft.pat.StringLike"); -Clazz.defineMethod (c$, "matchAt", -function (s, start_pos) { -return this._search (s, start_pos, start_pos); -}, "~S,~N"); -Clazz.defineMethod (c$, "matchAtLike", -function (s, start_pos) { -return this._searchLike (s, start_pos, start_pos); -}, "com.stevesoft.pat.StringLike,~N"); -Clazz.overrideMethod (c$, "search", -function (s) { -if (s == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_given_to_regex_search")); -}return this._search (s, 0, s.length); -}, "~S"); -Clazz.defineMethod (c$, "searchLike", -function (sl) { -if (sl == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search")); -}return this._searchLike (sl, 0, sl.length ()); -}, "com.stevesoft.pat.StringLike"); -Clazz.defineMethod (c$, "reverseSearch", -function (s) { -if (s == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_given_to_regex_reverse_search")); -}return this._reverseSearch (s, 0, s.length); -}, "~S"); -Clazz.defineMethod (c$, "reverseSearchLike", -function (sl) { -if (sl == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_reverse_search")); -}return this._reverseSearchLike (sl, 0, sl.length ()); -}, "com.stevesoft.pat.StringLike"); -Clazz.overrideMethod (c$, "searchFrom", -function (s, start) { -if (s == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search_from")); -}return this._search (s, start, s.length); -}, "~S,~N"); -Clazz.defineMethod (c$, "searchFromLike", -function (s, start) { -if (s == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search_from")); -}return this._searchLike (s, start, s.length ()); -}, "com.stevesoft.pat.StringLike,~N"); -Clazz.defineMethod (c$, "searchRegion", -function (s, start, end) { -if (s == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search_region")); -}return this._search (s, start, end); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "setGFlag", -function (b) { -this.gFlag = b; -}, "~B"); -Clazz.defineMethod (c$, "getGFlag", -function () { -return this.gFlag; -}); -Clazz.defineMethod (c$, "getSFlag", -function () { -return this.sFlag; -}); -Clazz.defineMethod (c$, "getMFlag", -function () { -return this.mFlag; -}); -Clazz.defineMethod (c$, "_search", -function (s, start, end) { -return this._searchLike ( new com.stevesoft.pat.wrap.StringWrap (s), start, end); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "_searchLike", -function (s, start, end) { -if (this.gFlag && this.gFlagto > 0 && this.gFlags != null && s.unwrap () === this.gFlags.unwrap ()) { -start = this.gFlagto; -}this.gFlags = null; -var pt = this.prep (s); -var up = (this.minMatch == null ? end : end - this.minMatch.i); -if (up < start && end >= start) { -up = start; -}if (this.skipper == null) { -for (var i = start; i <= up; i++) { -this.charsMatched_ = this.thePattern.matchAt (s, i, pt); -if (this.charsMatched_ >= 0) { -this.matchFrom_ = this.thePattern.mfrom; -this.marks = pt.marks; -this.gFlagto = this.matchFrom_ + this.charsMatched_; -this.gFlags = s; -return this.didMatch_ = true; -}} -} else { -pt.no_check = true; -for (var i = start; i <= up; i++) { -i = this.skipper.find (this.src, i, up); -if (i < 0) { -this.charsMatched_ = this.matchFrom_ = -1; -return this.didMatch_ = false; -}this.charsMatched_ = this.thePattern.matchAt (s, i, pt); -if (this.charsMatched_ >= 0) { -this.matchFrom_ = this.thePattern.mfrom; -this.marks = pt.marks; -this.gFlagto = this.matchFrom_ + this.charsMatched_; -this.gFlags = s; -return this.didMatch_ = true; -}} -}return this.didMatch_ = false; -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "_reverseSearch", -function (s, start, end) { -return this._reverseSearchLike ( new com.stevesoft.pat.wrap.StringWrap (s), start, end); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "_reverseSearchLike", -function (s, start, end) { -if (this.gFlag && this.gFlagto > 0 && s.unwrap () === this.gFlags.unwrap ()) { -end = this.gFlagto; -}this.gFlags = null; -var pt = this.prep (s); -for (var i = end; i >= start; i--) { -this.charsMatched_ = this.thePattern.matchAt (s, i, pt); -if (this.charsMatched_ >= 0) { -this.matchFrom_ = this.thePattern.mfrom; -this.marks = pt.marks; -this.gFlagto = this.matchFrom_ - 1; -this.gFlags = s; -return this.didMatch_ = true; -}} -return this.didMatch_ = false; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$.setCbits = Clazz.defineMethod (c$, "setCbits", -function (s, pt) { -if (s === com.stevesoft.pat.Regex.lasts) { -pt.cbits = com.stevesoft.pat.Regex.lastbs; -return; -}var bs = new java.util.BitSet (s.length ()); -var qc = ' '; -var setBit = false; -for (var i = 0; i < s.length (); i++) { -if (setBit) { -bs.set (i); -}var c = s.charAt (i); -if (!setBit && c == '"') { -qc = c; -setBit = true; -bs.set (i); -} else if (!setBit && c == '\'') { -qc = c; -setBit = true; -bs.set (i); -} else if (setBit && c == qc) { -setBit = false; -} else if (setBit && c == '\\' && i + 1 < s.length ()) { -i++; -if (setBit) { -bs.set (i); -}}} -pt.cbits = com.stevesoft.pat.Regex.lastbs = bs; -com.stevesoft.pat.Regex.lasts = s; -}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "add", -function (p2) { -if (this.p == null) { -this.p = p2; -} else { -this.p.add (p2); -p2 = this.p; -}}, "com.stevesoft.pat.Pattern"); -Clazz.defineMethod (c$, "compileSP", -function (sp, mk) { -if (sp.match ('[')) { -sp.inc (); -this.add (this.matchBracket (sp)); -} else if (sp.match ('|')) { -if (this.or == null) { -this.or = new com.stevesoft.pat.Or (); -}if (this.p == null) { -this.p = new com.stevesoft.pat.NullPattern (); -}this.or.addOr (this.p); -this.p = null; -} else if (sp.incMatch ("(?<")) { -var i = sp.getPatInt (); -if (i == null) { -com.stevesoft.pat.RegSyntaxError.endItAll ("No int after (?<"); -}this.add ( new com.stevesoft.pat.Backup (i.intValue ())); -if (!sp.match (')')) { -com.stevesoft.pat.RegSyntaxError.endItAll ("No ) after (?<"); -}} else if (sp.incMatch ("(?>")) { -var i = sp.getPatInt (); -if (i == null) { -com.stevesoft.pat.RegSyntaxError.endItAll ("No int after (?>"); -}this.add ( new com.stevesoft.pat.Backup (-i.intValue ())); -if (!sp.match (')')) { -com.stevesoft.pat.RegSyntaxError.endItAll ("No ) after (?<"); -}} else if (sp.incMatch ("(?@")) { -var op = sp.c; -sp.inc (); -var cl = sp.c; -sp.inc (); -if (!sp.match (')')) { -com.stevesoft.pat.RegSyntaxError.endItAll ("(?@ does not have closing paren"); -}this.add ( new com.stevesoft.pat.Group (op, cl)); -} else if (sp.incMatch ("(?#")) { -while (!sp.match (')')) { -sp.inc (); -} -} else if (sp.dontMatch && sp.c == 'w') { -var b = new com.stevesoft.pat.Bracket (false); -b.addOr ( new com.stevesoft.pat.Range ('a', 'z')); -b.addOr ( new com.stevesoft.pat.Range ('A', 'Z')); -b.addOr ( new com.stevesoft.pat.Range ('0', '9')); -b.addOr ( new com.stevesoft.pat.oneChar ('_')); -this.add (b); -} else if (sp.dontMatch && sp.c == 'G') { -this.add ( new com.stevesoft.pat.BackG ()); -} else if (sp.dontMatch && sp.c == 's') { -var b = new com.stevesoft.pat.Bracket (false); -b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (32))); -b.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (8), String.fromCharCode (10))); -b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (13))); -this.add (b); -} else if (sp.dontMatch && sp.c == 'd') { -var digit = new com.stevesoft.pat.Range ('0', '9'); -digit.printBrackets = true; -this.add (digit); -} else if (sp.dontMatch && sp.c == 'W') { -var b = new com.stevesoft.pat.Bracket (true); -b.addOr ( new com.stevesoft.pat.Range ('a', 'z')); -b.addOr ( new com.stevesoft.pat.Range ('A', 'Z')); -b.addOr ( new com.stevesoft.pat.Range ('0', '9')); -b.addOr ( new com.stevesoft.pat.oneChar ('_')); -this.add (b); -} else if (sp.dontMatch && sp.c == 'S') { -var b = new com.stevesoft.pat.Bracket (true); -b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (32))); -b.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (8), String.fromCharCode (10))); -b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (13))); -this.add (b); -} else if (sp.dontMatch && sp.c == 'D') { -var b = new com.stevesoft.pat.Bracket (true); -b.addOr ( new com.stevesoft.pat.Range ('0', '9')); -this.add (b); -} else if (sp.dontMatch && sp.c == 'B') { -var r = new com.stevesoft.pat.Regex (null, ""); -r._compile ("(?!\\b)", mk); -this.add (r.thePattern); -} else if (this.isOctalString (sp)) { -var d = sp.c.charCodeAt (0) - 48; -sp.inc (); -d = 8 * d + sp.c.charCodeAt (0) - 48; -var sp2 = new com.stevesoft.pat.StrPos (sp); -sp2.inc (); -if (this.isOctalDigit (sp2, false)) { -sp.inc (); -d = 8 * d + sp.c.charCodeAt (0) - 48; -}this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); -} else if (sp.dontMatch && sp.c >= '1' && sp.c <= '9') { -var iv = sp.c.charCodeAt (0) - 48; -var s2 = new com.stevesoft.pat.StrPos (sp); -s2.inc (); -if (!s2.dontMatch && s2.c >= '0' && s2.c <= '9') { -iv = 10 * iv + (s2.c.charCodeAt (0) - 48); -sp.inc (); -}this.add ( new com.stevesoft.pat.BackMatch (iv)); -} else if (sp.dontMatch && sp.c == 'b') { -this.add ( new com.stevesoft.pat.Boundary ()); -} else if (sp.match ('\b')) { -this.add ( new com.stevesoft.pat.Boundary ()); -} else if (sp.match ('$')) { -this.add ( new com.stevesoft.pat.End (true)); -} else if (sp.dontMatch && sp.c == 'Z') { -this.add ( new com.stevesoft.pat.End (false)); -} else if (sp.match ('.')) { -this.add ( new com.stevesoft.pat.Any ()); -} else if (sp.incMatch ("(??")) { -var sb = new StringBuffer (); -var sb2 = new StringBuffer (); -while (!sp.match (')') && !sp.match (':')) { -sb.append (sp.c); -sp.inc (); -} -if (sp.incMatch (":")) { -while (!sp.match (')')) { -sb2.append (sp.c); -sp.inc (); -} -}var sbs = sb.toString (); -if (Clazz.instanceOf (com.stevesoft.pat.Regex.validators.get (sbs), String)) { -var pat = com.stevesoft.pat.Regex.validators.get (sbs); -var r = new com.stevesoft.pat.Regex (null, ""); -var rth = new com.stevesoft.pat.Rthings (this); -rth.noBackRefs = true; -r._compile (pat, rth); -this.add (r.thePattern); -} else { -var cm = new com.stevesoft.pat.Custom (sb.toString ()); -if (cm.v != null) { -var v2 = cm.v.arg (sb2.toString ()); -if (v2 != null) { -v2.argsave = sb2.toString (); -var p = cm.v.pattern; -cm.v = v2; -v2.pattern = p; -}var r = new com.stevesoft.pat.Regex (null, ""); -var rth = new com.stevesoft.pat.Rthings (this); -rth.noBackRefs = true; -r._compile (cm.v.pattern, rth); -cm.sub = r.thePattern; -cm.sub.add ( new com.stevesoft.pat.CustomEndpoint (cm)); -cm.sub.setParent (cm); -this.add (cm); -}}} else if (sp.match ('(')) { -mk.parenLevel++; -var r = new com.stevesoft.pat.Regex (null, ""); -sp.inc (); -if (sp.incMatch ("?:")) { -r.or = new com.stevesoft.pat.Or (); -} else if (sp.incMatch ("?=")) { -r.or = new com.stevesoft.pat.lookAhead (false); -} else if (sp.incMatch ("?!")) { -r.or = new com.stevesoft.pat.lookAhead (true); -} else if (sp.match ('?')) { -sp.inc (); -do { -if (sp.c == 'i') { -mk.ignoreCase = true; -}if (sp.c == 'Q') { -mk.dontMatchInQuotes = true; -}if (sp.c == 'o') { -mk.optimizeMe = true; -}if (sp.c == 'g') { -mk.gFlag = true; -}if (sp.c == 's') { -mk.sFlag = true; -}if (sp.c == 'm') { -mk.mFlag = true; -}sp.inc (); -} while (!sp.match (')') && !sp.$eos); -r = null; -mk.parenLevel--; -if (sp.$eos) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Unclosed ()"); -}} else { -r.or = mk.noBackRefs ? new com.stevesoft.pat.Or () : new com.stevesoft.pat.OrMark (mk.val++); -}if (r != null) { -this.add (r._compileSP (sp, mk)); -}} else if (sp.match ('^')) { -this.add ( new com.stevesoft.pat.Start (true)); -} else if (sp.dontMatch && sp.c == 'A') { -this.add ( new com.stevesoft.pat.Start (false)); -} else if (sp.match ('*')) { -this.addMulti ( new com.stevesoft.pat.patInt (0), new com.stevesoft.pat.patInf ()); -} else if (sp.match ('+')) { -this.addMulti ( new com.stevesoft.pat.patInt (1), new com.stevesoft.pat.patInf ()); -} else if (sp.match ('?')) { -this.addMulti ( new com.stevesoft.pat.patInt (0), new com.stevesoft.pat.patInt (1)); -} else if (sp.match ('{')) { -var bad = false; -var sp2 = new com.stevesoft.pat.StrPos (sp); -sp.inc (); -var i1 = sp.getPatInt (); -var i2 = null; -if (sp.match ('}')) { -i2 = i1; -} else { -if (!sp.match (',')) { -bad = true; -}sp.inc (); -if (sp.match ('}')) { -i2 = new com.stevesoft.pat.patInf (); -} else { -i2 = sp.getPatInt (); -}}if (i1 == null || i2 == null) { -bad = true; -}if (bad) { -sp.dup (sp2); -this.add ( new com.stevesoft.pat.oneChar (sp.c)); -} else { -this.addMulti (i1, i2); -}} else if (sp.escMatch ('x') && this.next2Hex (sp)) { -sp.inc (); -var d = this.getHexDigit (sp); -sp.inc (); -d = 16 * d + this.getHexDigit (sp); -this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); -} else if (sp.escMatch ('c')) { -sp.inc (); -if (sp.c.charCodeAt (0) < com.stevesoft.pat.Ctrl.cmap.length) { -this.add ( new com.stevesoft.pat.oneChar (com.stevesoft.pat.Ctrl.cmap[sp.c.charCodeAt (0)])); -} else { -this.add ( new com.stevesoft.pat.oneChar (sp.c)); -}} else if (sp.escMatch ('f')) { -this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (12))); -} else if (sp.escMatch ('a')) { -this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (7))); -} else if (sp.escMatch ('t')) { -this.add ( new com.stevesoft.pat.oneChar ('\t')); -} else if (sp.escMatch ('n')) { -this.add ( new com.stevesoft.pat.oneChar ('\n')); -} else if (sp.escMatch ('r')) { -this.add ( new com.stevesoft.pat.oneChar ('\r')); -} else if (sp.escMatch ('b')) { -this.add ( new com.stevesoft.pat.oneChar ('\b')); -} else if (sp.escMatch ('e')) { -this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (27))); -} else { -this.add ( new com.stevesoft.pat.oneChar (sp.c)); -if (sp.match (')')) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Unmatched right paren in pattern"); -}}}, "com.stevesoft.pat.StrPos,com.stevesoft.pat.Rthings"); -Clazz.defineMethod (c$, "_compile", -($fz = function (pat, mk) { -this.minMatch = null; -this.sFlag = this.mFlag = this.ignoreCase = this.gFlag = false; -var sp = new com.stevesoft.pat.StrPos (pat, 0); -this.thePattern = this._compileSP (sp, mk); -this.pt.marks = null; -return this.thePattern; -}, $fz.isPrivate = true, $fz), "~S,com.stevesoft.pat.Rthings"); -Clazz.defineMethod (c$, "_compileSP", -function (sp, mk) { -while (!(sp.$eos || (this.or != null && sp.match (')')))) { -this.compileSP (sp, mk); -sp.inc (); -} -if (sp.match (')')) { -mk.parenLevel--; -} else if (sp.$eos && mk.parenLevel != 0) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Unclosed Parenthesis! lvl=" + mk.parenLevel); -}if (this.or != null) { -if (this.p == null) { -this.p = new com.stevesoft.pat.NullPattern (); -}this.or.addOr (this.p); -return this.or; -}return this.p == null ? new com.stevesoft.pat.NullPattern () : this.p; -}, "com.stevesoft.pat.StrPos,com.stevesoft.pat.Rthings"); -Clazz.defineMethod (c$, "addMulti", -function (i1, i2) { -var last; -var last2; -for (last = this.p; last != null && last.next != null; last = last.next) { -;} -if (last == null || last === this.p) { -last2 = null; -} else { -for (last2 = this.p; last2.next !== last; last2 = last2.next) { -;} -}if (Clazz.instanceOf (last, com.stevesoft.pat.Multi) && i1.intValue () == 0 && i2.intValue () == 1) { -(last).matchFewest = true; -} else if (Clazz.instanceOf (last, com.stevesoft.pat.FastMulti) && i1.intValue () == 0 && i2.intValue () == 1) { -(last).matchFewest = true; -} else if (Clazz.instanceOf (last, com.stevesoft.pat.DotMulti) && i1.intValue () == 0 && i2.intValue () == 1) { -(last).matchFewest = true; -} else if (Clazz.instanceOf (last, com.stevesoft.pat.Multi) || Clazz.instanceOf (last, com.stevesoft.pat.DotMulti) || Clazz.instanceOf (last, com.stevesoft.pat.FastMulti)) { -throw new com.stevesoft.pat.RegSyntax ("Syntax error."); -} else if (last2 == null) { -this.p = com.stevesoft.pat.Regex.mkMulti (i1, i2, this.p); -} else { -last2.next = com.stevesoft.pat.Regex.mkMulti (i1, i2, last); -}}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt"); -c$.mkMulti = Clazz.defineMethod (c$, "mkMulti", -function (lo, hi, p) { -if (Clazz.instanceOf (p, com.stevesoft.pat.Any) && p.next == null) { -return new com.stevesoft.pat.DotMulti (lo, hi); -}return com.stevesoft.pat.RegOpt.safe4fm (p) ? new com.stevesoft.pat.FastMulti (lo, hi, p) : new com.stevesoft.pat.Multi (lo, hi, p); -}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); -Clazz.defineMethod (c$, "matchBracket", -function (sp) { -var ret; -if (sp.match ('^')) { -ret = new com.stevesoft.pat.Bracket (true); -sp.inc (); -} else { -ret = new com.stevesoft.pat.Bracket (false); -}if (sp.match (']')) { -com.stevesoft.pat.RegSyntaxError.endItAll ("Unmatched []"); -}while (!sp.$eos && !sp.match (']')) { -var s1 = new com.stevesoft.pat.StrPos (sp); -s1.inc (); -var s1_ = new com.stevesoft.pat.StrPos (s1); -s1_.inc (); -if (s1.match ('-') && !s1_.match (']')) { -var s2 = new com.stevesoft.pat.StrPos (s1); -s2.inc (); -if (!s2.$eos) { -ret.addOr ( new com.stevesoft.pat.Range (sp.c, s2.c)); -}sp.inc (); -sp.inc (); -} else if (sp.escMatch ('Q')) { -sp.inc (); -while (!sp.escMatch ('E')) { -ret.addOr ( new com.stevesoft.pat.oneChar (sp.c)); -sp.inc (); -} -} else if (sp.escMatch ('d')) { -ret.addOr ( new com.stevesoft.pat.Range ('0', '9')); -} else if (sp.escMatch ('s')) { -ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (32))); -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (8), String.fromCharCode (10))); -ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (13))); -} else if (sp.escMatch ('w')) { -ret.addOr ( new com.stevesoft.pat.Range ('a', 'z')); -ret.addOr ( new com.stevesoft.pat.Range ('A', 'Z')); -ret.addOr ( new com.stevesoft.pat.Range ('0', '9')); -ret.addOr ( new com.stevesoft.pat.oneChar ('_')); -} else if (sp.escMatch ('D')) { -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (47))); -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (58), String.fromCharCode (65535))); -} else if (sp.escMatch ('S')) { -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (7))); -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (11), String.fromCharCode (12))); -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (14), String.fromCharCode (31))); -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (33), String.fromCharCode (65535))); -} else if (sp.escMatch ('W')) { -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (64))); -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (91), String.fromCharCode (94))); -ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (96))); -ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (123), String.fromCharCode (65535))); -} else if (sp.escMatch ('x') && this.next2Hex (sp)) { -sp.inc (); -var d = this.getHexDigit (sp); -sp.inc (); -d = 16 * d + this.getHexDigit (sp); -ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); -} else if (sp.escMatch ('a')) { -ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (7))); -} else if (sp.escMatch ('f')) { -ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (12))); -} else if (sp.escMatch ('e')) { -ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (27))); -} else if (sp.escMatch ('n')) { -ret.addOr ( new com.stevesoft.pat.oneChar ('\n')); -} else if (sp.escMatch ('t')) { -ret.addOr ( new com.stevesoft.pat.oneChar ('\t')); -} else if (sp.escMatch ('r')) { -ret.addOr ( new com.stevesoft.pat.oneChar ('\r')); -} else if (sp.escMatch ('c')) { -sp.inc (); -if (sp.c.charCodeAt (0) < com.stevesoft.pat.Ctrl.cmap.length) { -ret.addOr ( new com.stevesoft.pat.oneChar (com.stevesoft.pat.Ctrl.cmap[sp.c.charCodeAt (0)])); -} else { -ret.addOr ( new com.stevesoft.pat.oneChar (sp.c)); -}} else if (this.isOctalString (sp)) { -var d = sp.c.charCodeAt (0) - 48; -sp.inc (); -d = 8 * d + sp.c.charCodeAt (0) - 48; -var sp2 = new com.stevesoft.pat.StrPos (sp); -sp2.inc (); -if (this.isOctalDigit (sp2, false)) { -sp.inc (); -d = 8 * d + sp.c.charCodeAt (0) - 48; -}ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); -} else { -ret.addOr ( new com.stevesoft.pat.oneChar (sp.c)); -}sp.inc (); -} -return ret; -}, "com.stevesoft.pat.StrPos"); -Clazz.overrideMethod (c$, "toString", -function () { -{ -var sb = new StringBuffer (); -if (this.esc != '\\') { -sb.append ("(?e="); -sb.append (this.esc); -sb.append (")"); -}if (this.gFlag || this.mFlag || !com.stevesoft.pat.Regex.dotDoesntMatchCR || this.sFlag || this.ignoreCase || this.dontMatchInQuotes || this.optimized ()) { -sb.append ("(?"); -if (this.ignoreCase) { -sb.append ("i"); -}if (this.mFlag) { -sb.append ("m"); -}if (this.sFlag || !com.stevesoft.pat.Regex.dotDoesntMatchCR) { -sb.append ("s"); -}if (this.dontMatchInQuotes) { -sb.append ("Q"); -}if (this.optimized ()) { -sb.append ("o"); -}if (this.gFlag) { -sb.append ("g"); -}sb.append (")"); -}var patstr = this.thePattern.toString (); -if (this.esc != '\\') { -patstr = com.stevesoft.pat.Regex.reEscape (patstr, '\\', this.esc); -}sb.append (patstr); -return sb.toString (); -}}); -c$.reEscape = Clazz.defineMethod (c$, "reEscape", -function (s, oldEsc, newEsc) { -if (oldEsc == newEsc) { -return s; -}var i; -var sb = new StringBuffer (); -for (i = 0; i < s.length; i++) { -if (s.charAt (i) == oldEsc && i + 1 < s.length) { -if (s.charAt (i + 1) == oldEsc) { -sb.append (oldEsc); -} else { -sb.append (newEsc); -sb.append (s.charAt (i + 1)); -}i++; -} else if (s.charAt (i) == newEsc) { -sb.append (newEsc); -sb.append (newEsc); -} else { -sb.append (s.charAt (i)); -}} -return sb.toString (); -}, "~S,~S,~S"); -Clazz.defineMethod (c$, "accept", -function (dir, s) { -return this.search (s); -}, "java.io.File,~S"); -c$.version = Clazz.defineMethod (c$, "version", -function () { -return "lgpl release 1.5.3"; -}); -Clazz.defineMethod (c$, "optimize", -function () { -if (this.optimized () || this.thePattern == null) { -return; -}this.minMatch = new com.stevesoft.pat.patInt (0); -this.thePattern = com.stevesoft.pat.RegOpt.opt (this.thePattern, this.ignoreCase, this.dontMatchInQuotes); -this.skipper = com.stevesoft.pat.Skip.findSkipRegex (this); -return; -}); -Clazz.defineMethod (c$, "optimized", -function () { -return this.minMatch != null; -}); -c$.perlCode = Clazz.defineMethod (c$, "perlCode", -function (s) { -return com.stevesoft.pat.parsePerl.parse (s); -}, "~S"); -Clazz.defineMethod (c$, "isLiteral", -function () { -var x = this.thePattern; -while (x != null) { -if (Clazz.instanceOf (x, com.stevesoft.pat.oneChar)) { -;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Skipped)) { -;} else { -return false; -}x = x.next; -} -return true; -}); -Clazz.defineMethod (c$, "countMinChars", -function () { -return this.thePattern.countMinChars (); -}); -Clazz.defineMethod (c$, "countMaxChars", -function () { -return this.thePattern.countMaxChars (); -}); -Clazz.defineMethod (c$, "isHexDigit", -function (sp) { -var r = !sp.$eos && !sp.dontMatch && ((sp.c >= '0' && sp.c <= '9') || (sp.c >= 'a' && sp.c <= 'f') || (sp.c >= 'A' && sp.c <= 'F')); -return r; -}, "com.stevesoft.pat.StrPos"); -Clazz.defineMethod (c$, "isOctalDigit", -function (sp, first) { -var r = !sp.$eos && !( new Boolean (first ^ sp.dontMatch).valueOf ()) && sp.c >= '0' && sp.c <= '7'; -return r; -}, "com.stevesoft.pat.StrPos,~B"); -Clazz.defineMethod (c$, "getHexDigit", -function (sp) { -if (sp.c >= '0' && sp.c <= '9') { -return sp.c.charCodeAt (0) - 48; -}if (sp.c >= 'a' && sp.c <= 'f') { -return sp.c.charCodeAt (0) - 97 + 10; -}return sp.c.charCodeAt (0) - 65 + 10; -}, "com.stevesoft.pat.StrPos"); -Clazz.defineMethod (c$, "next2Hex", -function (sp) { -var sp2 = new com.stevesoft.pat.StrPos (sp); -sp2.inc (); -if (!this.isHexDigit (sp2)) { -return false; -}sp2.inc (); -if (!this.isHexDigit (sp2)) { -return false; -}return true; -}, "com.stevesoft.pat.StrPos"); -Clazz.defineMethod (c$, "isOctalString", -function (sp) { -if (!this.isOctalDigit (sp, true)) { -return false; -}var sp2 = new com.stevesoft.pat.StrPos (sp); -sp2.inc (); -if (!this.isOctalDigit (sp2, false)) { -return false; -}return true; -}, "com.stevesoft.pat.StrPos"); -Clazz.defineStatics (c$, -"BackRefOffset", 1); -c$.none = c$.prototype.none = new com.stevesoft.pat.NoPattern (); -c$.validators = c$.prototype.validators = new java.util.Hashtable (); -{ -com.stevesoft.pat.Regex.defineV ("p", "(?>1)", new com.stevesoft.pat.UnicodePunct ()); -com.stevesoft.pat.Regex.defineV ("P", "(?>1)", new com.stevesoft.pat.NUnicodePunct ()); -com.stevesoft.pat.Regex.defineV ("s", "(?>1)", new com.stevesoft.pat.UnicodeWhite ()); -com.stevesoft.pat.Regex.defineV ("S", "(?>1)", new com.stevesoft.pat.NUnicodeWhite ()); -com.stevesoft.pat.Regex.defineV ("w", "(?>1)", new com.stevesoft.pat.UnicodeW ()); -com.stevesoft.pat.Regex.defineV ("W", "(?>1)", new com.stevesoft.pat.NUnicodeW ()); -com.stevesoft.pat.Regex.defineV ("d", "(?>1)", new com.stevesoft.pat.UnicodeDigit ()); -com.stevesoft.pat.Regex.defineV ("D", "(?>1)", new com.stevesoft.pat.NUnicodeDigit ()); -com.stevesoft.pat.Regex.defineV ("m", "(?>1)", new com.stevesoft.pat.UnicodeMath ()); -com.stevesoft.pat.Regex.defineV ("M", "(?>1)", new com.stevesoft.pat.NUnicodeMath ()); -com.stevesoft.pat.Regex.defineV ("c", "(?>1)", new com.stevesoft.pat.UnicodeCurrency ()); -com.stevesoft.pat.Regex.defineV ("C", "(?>1)", new com.stevesoft.pat.NUnicodeCurrency ()); -com.stevesoft.pat.Regex.defineV ("a", "(?>1)", new com.stevesoft.pat.UnicodeAlpha ()); -com.stevesoft.pat.Regex.defineV ("A", "(?>1)", new com.stevesoft.pat.NUnicodeAlpha ()); -com.stevesoft.pat.Regex.defineV ("uc", "(?>1)", new com.stevesoft.pat.UnicodeUpper ()); -com.stevesoft.pat.Regex.defineV ("lc", "(?>1)", new com.stevesoft.pat.UnicodeLower ()); -}Clazz.defineStatics (c$, -"defaultMFlag", false, -"dotDoesntMatchCR", true, -"lasts", null, -"lastbs", null, -"back_slash", '\\'); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.RegRes", "$.UniValidator", "jalview.jsdev.api.RegExpInterface", "com.stevesoft.pat.NoPattern", "$.Pthings", "$.patInt", "java.util.Hashtable"], ["com.stevesoft.pat.UnicodeW", "$.UnicodeCurrency", "$.UnicodeAlpha", "$.UnicodeUpper", "$.NUnicodeCurrency", "$.NUnicodeW", "$.NUnicodeAlpha", "$.UnicodeMath", "$.UnicodeWhite", "$.UnicodeDigit", "$.NUnicodeMath", "$.Regex", "$.NUnicodeDigit", "$.NUnicodeWhite", "$.NUnicodePunct", "$.UnicodePunct", "$.UnicodeLower"], ["com.stevesoft.pat.Any", "$.BackG", "$.BackMatch", "$.Backup", "$.Boundary", "$.Bracket", "$.CaseMgr", "$.Ctrl", "$.Custom", "$.CustomEndpoint", "$.DotMulti", "$.End", "$.FastMulti", "$.Group", "$.MessageManager", "$.Multi", "$.NullPattern", "$.Or", "$.OrMark", "$.Prop", "$.Range", "$.RegOpt", "$.RegSyntax", "$.RegSyntaxError", "$.ReplaceRule", "$.Replacer", "$.Rthings", "$.Skip", "$.Skipped", "$.Start", "$.StrPos", "$.lookAhead", "$.oneChar", "$.parsePerl", "$.patInf", "com.stevesoft.pat.wrap.StringWrap", "java.lang.NullPointerException", "$.StringBuffer", "java.util.BitSet"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodePunct", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && com.stevesoft.pat.Prop.isPunct (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeWhite", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && com.stevesoft.pat.Prop.isWhite (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodePunct", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && !com.stevesoft.pat.Prop.isPunct (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeWhite", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && !com.stevesoft.pat.Prop.isWhite (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeW", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +if (from >= s.length ()) { +return -1; +}var c = s.charAt (from); +return (com.stevesoft.pat.Prop.isAlphabetic (c) || com.stevesoft.pat.Prop.isDecimalDigit (c) || c == '_') ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeW", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +if (from >= s.length ()) { +return -1; +}var c = s.charAt (from); +return !(com.stevesoft.pat.Prop.isAlphabetic (c) || com.stevesoft.pat.Prop.isDecimalDigit (c) || c == '_') ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeDigit", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && com.stevesoft.pat.Prop.isDecimalDigit (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeDigit", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && !com.stevesoft.pat.Prop.isDecimalDigit (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeMath", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && com.stevesoft.pat.Prop.isMath (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeMath", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && !com.stevesoft.pat.Prop.isMath (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeCurrency", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && com.stevesoft.pat.Prop.isCurrency (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeCurrency", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && !com.stevesoft.pat.Prop.isCurrency (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeAlpha", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && com.stevesoft.pat.Prop.isAlphabetic (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "NUnicodeAlpha", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && !com.stevesoft.pat.Prop.isAlphabetic (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeUpper", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && this.isUpper (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "isUpper", +function (c) { +return c == com.stevesoft.pat.CaseMgr.toUpperCaseC (c) && c != com.stevesoft.pat.CaseMgr.toLowerCaseC (c); +}, "~S"); +c$ = Clazz.declareType (com.stevesoft.pat, "UnicodeLower", com.stevesoft.pat.UniValidator); +Clazz.overrideMethod (c$, "validate", +function (s, from, to) { +return from < s.length () && this.isLower (s.charAt (from)) ? to : -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "isLower", +function (c) { +return c != com.stevesoft.pat.CaseMgr.toUpperCaseC (c) && c == com.stevesoft.pat.CaseMgr.toLowerCaseC (c); +}, "~S"); +c$ = Clazz.decorateAsClass (function () { +this.thePattern = null; +this.minMatch = null; +this.rep = null; +this.dontMatchInQuotes = false; +this.ignoreCase = false; +this.repr = null; +this.esc = '\\'; +this.pt = null; +this.gFlags = null; +this.gFlagto = 0; +this.gFlag = false; +this.sFlag = false; +this.mFlag = false; +this.p = null; +this.or = null; +this.skipper = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Regex", com.stevesoft.pat.RegRes, [jalview.jsdev.api.RegExpInterface, Cloneable]); +Clazz.prepareFields (c$, function () { +this.thePattern = com.stevesoft.pat.Regex.none; +this.minMatch = new com.stevesoft.pat.patInt (0); +this.pt = new com.stevesoft.pat.Pthings (); +}); +Clazz.makeConstructor (c$, +function (s, strRp) { +Clazz.superConstructor (this, com.stevesoft.pat.Regex, []); +try { +if (s != null) this.compile (s); +if (strRp.length > 0) this.rep = com.stevesoft.pat.ReplaceRule.perlCode (strRp); +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +} else { +throw rs; +} +} +}, "~S,~S"); +Clazz.overrideMethod (c$, "clone", +function () { +return new com.stevesoft.pat.Regex (null, "").cloneFrom (this); +}); +Clazz.defineMethod (c$, "cloneFrom", +function (r) { +this.copyOutOf (r); +this.dontMatchInQuotes = r.dontMatchInQuotes; +this.esc = r.esc; +this.ignoreCase = r.ignoreCase; +this.gFlag = r.gFlag; +if (r.rep == null) { +this.rep = null; +} else { +this.rep = r.rep.clone (); +}this.thePattern = r.thePattern.clone ( new java.util.Hashtable ()); +this.minMatch = r.minMatch; +this.skipper = r.skipper; +return this; +}, "com.stevesoft.pat.Regex"); +Clazz.defineMethod (c$, "setDontMatchInQuotes", +function (b) { +this.dontMatchInQuotes = b; +}, "~B"); +Clazz.defineMethod (c$, "getDontMatchInQuotes", +function () { +return this.dontMatchInQuotes; +}); +Clazz.overrideMethod (c$, "setIgnoreCase", +function (b) { +this.ignoreCase = b; +}, "~B"); +Clazz.defineMethod (c$, "getIgnoreCase", +function () { +return this.ignoreCase; +}); +c$.setDefaultMFlag = Clazz.defineMethod (c$, "setDefaultMFlag", +function (mFlag) { +com.stevesoft.pat.Regex.defaultMFlag = mFlag; +}, "~B"); +c$.getDefaultMFlag = Clazz.defineMethod (c$, "getDefaultMFlag", +function () { +return com.stevesoft.pat.Regex.defaultMFlag; +}); +Clazz.defineMethod (c$, "setReplaceRuleStr", +function (rp) { +this.rep = com.stevesoft.pat.ReplaceRule.perlCode (rp); +this.repr = null; +}, "~S"); +Clazz.defineMethod (c$, "setReplaceRule", +function (rp) { +this.rep = rp; +}, "com.stevesoft.pat.ReplaceRule"); +c$.isDefined = Clazz.defineMethod (c$, "isDefined", +function (nm) { +return com.stevesoft.pat.Regex.validators.get (nm) != null; +}, "~S"); +c$.undefine = Clazz.defineMethod (c$, "undefine", +function (nm) { +com.stevesoft.pat.Regex.validators.remove (nm); +}, "~S"); +c$.defineV = Clazz.defineMethod (c$, "defineV", +function (nm, pat, v) { +v.pattern = pat; +com.stevesoft.pat.Regex.validators.put (nm, v); +}, "~S,~S,com.stevesoft.pat.Validator"); +c$.define = Clazz.defineMethod (c$, "define", +function (nm, pat) { +com.stevesoft.pat.Regex.validators.put (nm, pat); +}, "~S,~S"); +Clazz.defineMethod (c$, "getReplaceRule", +function () { +return this.rep; +}); +Clazz.defineMethod (c$, "_getReplacer", +function () { +return this.repr == null ? this.repr = new com.stevesoft.pat.Replacer () : this.repr; +}); +Clazz.defineMethod (c$, "getReplacer", +function () { +if (this.repr == null) { +this.repr = new com.stevesoft.pat.Replacer (); +}this.repr.rh.me = this; +this.repr.rh.prev = null; +return this.repr; +}); +Clazz.defineMethod (c$, "replaceFirst", +function (s) { +return this._getReplacer ().replaceFirstRegion (s, this, 0, s.length).toString (); +}, "~S"); +Clazz.defineMethod (c$, "replaceFirstFrom", +function (s, pos) { +return this._getReplacer ().replaceFirstRegion (s, this, pos, s.length).toString (); +}, "~S,~N"); +Clazz.defineMethod (c$, "replaceFirstRegion", +function (s, start, end) { +return this._getReplacer ().replaceFirstRegion (s, this, start, end).toString (); +}, "~S,~N,~N"); +Clazz.overrideMethod (c$, "replaceAll", +function (s) { +return this._getReplacer ().replaceAllRegion (s, this, 0, s.length).toString (); +}, "~S"); +Clazz.defineMethod (c$, "replaceAllLike", +function (s) { +return this._getReplacer ().replaceAllRegion (s, this, 0, s.length ()); +}, "com.stevesoft.pat.StringLike"); +Clazz.defineMethod (c$, "replaceAllFrom", +function (s, pos) { +return this._getReplacer ().replaceAllRegion (s, this, pos, s.length).toString (); +}, "~S,~N"); +Clazz.defineMethod (c$, "replaceAllRegion", +function (s, start, end) { +return this._getReplacer ().replaceAllRegion (s, this, start, end).toString (); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "compile", +function (prepat) { +var postpat = com.stevesoft.pat.parsePerl.codify (prepat, true); +var pat = postpat == null ? prepat : postpat; +this.minMatch = null; +this.ignoreCase = false; +this.dontMatchInQuotes = false; +var mk = new com.stevesoft.pat.Rthings (this); +var offset = mk.val; +var newpat = pat; +this.thePattern = com.stevesoft.pat.Regex.none; +this.p = null; +this.or = null; +this.minMatch = new com.stevesoft.pat.patInt (0); +var sp = new com.stevesoft.pat.StrPos (pat, 0); +if (sp.incMatch ("(?e=")) { +var newEsc = sp.c; +sp.inc (); +if (sp.match (')')) { +newpat = com.stevesoft.pat.Regex.reEscape (pat.substring (6), newEsc, '\\'); +}} else if (this.esc != '\\') { +newpat = com.stevesoft.pat.Regex.reEscape (pat, this.esc, '\\'); +}this.thePattern = this._compile (newpat, mk); +this.numSubs_ = mk.val - offset; +mk.set (this); +}, "~S"); +Clazz.defineMethod (c$, "equals", +function (o) { +if (Clazz.instanceOf (o, com.stevesoft.pat.Regex)) { +if (this.toString ().equals (o.toString ())) { +return Clazz.superCall (this, com.stevesoft.pat.Regex, "equals", [o]); +} else { +return false; +}} else { +return Clazz.superCall (this, com.stevesoft.pat.Regex, "equals", [o]); +}}, "~O"); +Clazz.defineMethod (c$, "prep", +function (s) { +this.pt.lastPos = this.matchedTo (); +if (this.pt.lastPos < 0) { +this.pt.lastPos = 0; +}if ((s == null ? null : s.unwrap ()) !== (this.src == null ? null : s.unwrap ())) { +this.pt.lastPos = 0; +}this.src = s; +this.pt.dotDoesntMatchCR = com.stevesoft.pat.Regex.dotDoesntMatchCR && (!this.sFlag); +this.pt.mFlag = ( new Boolean (this.mFlag | com.stevesoft.pat.Regex.defaultMFlag).valueOf ()); +this.pt.ignoreCase = this.ignoreCase; +this.pt.no_check = false; +if (this.pt.marks != null) { +for (var i = 0; i < this.pt.marks.length; i++) { +this.pt.marks[i] = -1; +} +}this.pt.marks = null; +this.pt.nMarks = this.numSubs_; +this.pt.src = s; +if (this.dontMatchInQuotes) { +com.stevesoft.pat.Regex.setCbits (s, this.pt); +} else { +this.pt.cbits = null; +}return this.pt; +}, "com.stevesoft.pat.StringLike"); +Clazz.defineMethod (c$, "matchAt", +function (s, start_pos) { +return this._search (s, start_pos, start_pos); +}, "~S,~N"); +Clazz.defineMethod (c$, "matchAtLike", +function (s, start_pos) { +return this._searchLike (s, start_pos, start_pos); +}, "com.stevesoft.pat.StringLike,~N"); +Clazz.overrideMethod (c$, "search", +function (s) { +if (s == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_given_to_regex_search")); +}return this._search (s, 0, s.length); +}, "~S"); +Clazz.defineMethod (c$, "searchLike", +function (sl) { +if (sl == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search")); +}return this._searchLike (sl, 0, sl.length ()); +}, "com.stevesoft.pat.StringLike"); +Clazz.defineMethod (c$, "reverseSearch", +function (s) { +if (s == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_given_to_regex_reverse_search")); +}return this._reverseSearch (s, 0, s.length); +}, "~S"); +Clazz.defineMethod (c$, "reverseSearchLike", +function (sl) { +if (sl == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_reverse_search")); +}return this._reverseSearchLike (sl, 0, sl.length ()); +}, "com.stevesoft.pat.StringLike"); +Clazz.overrideMethod (c$, "searchFrom", +function (s, start) { +if (s == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search_from")); +}return this._search (s, start, s.length); +}, "~S,~N"); +Clazz.defineMethod (c$, "searchFromLike", +function (s, start) { +if (s == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search_from")); +}return this._searchLike (s, start, s.length ()); +}, "com.stevesoft.pat.StringLike,~N"); +Clazz.defineMethod (c$, "searchRegion", +function (s, start, end) { +if (s == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.null_string_like_given_to_regex_search_region")); +}return this._search (s, start, end); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "setGFlag", +function (b) { +this.gFlag = b; +}, "~B"); +Clazz.defineMethod (c$, "getGFlag", +function () { +return this.gFlag; +}); +Clazz.defineMethod (c$, "getSFlag", +function () { +return this.sFlag; +}); +Clazz.defineMethod (c$, "getMFlag", +function () { +return this.mFlag; +}); +Clazz.defineMethod (c$, "_search", +function (s, start, end) { +return this._searchLike ( new com.stevesoft.pat.wrap.StringWrap (s), start, end); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "_searchLike", +function (s, start, end) { +if (this.gFlag && this.gFlagto > 0 && this.gFlags != null && s.unwrap () === this.gFlags.unwrap ()) { +start = this.gFlagto; +}this.gFlags = null; +var pt = this.prep (s); +var up = (this.minMatch == null ? end : end - this.minMatch.i); +if (up < start && end >= start) { +up = start; +}if (this.skipper == null) { +for (var i = start; i <= up; i++) { +this.charsMatched_ = this.thePattern.matchAt (s, i, pt); +if (this.charsMatched_ >= 0) { +this.matchFrom_ = this.thePattern.mfrom; +this.marks = pt.marks; +this.gFlagto = this.matchFrom_ + this.charsMatched_; +this.gFlags = s; +return this.didMatch_ = true; +}} +} else { +pt.no_check = true; +for (var i = start; i <= up; i++) { +i = this.skipper.find (this.src, i, up); +if (i < 0) { +this.charsMatched_ = this.matchFrom_ = -1; +return this.didMatch_ = false; +}this.charsMatched_ = this.thePattern.matchAt (s, i, pt); +if (this.charsMatched_ >= 0) { +this.matchFrom_ = this.thePattern.mfrom; +this.marks = pt.marks; +this.gFlagto = this.matchFrom_ + this.charsMatched_; +this.gFlags = s; +return this.didMatch_ = true; +}} +}return this.didMatch_ = false; +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "_reverseSearch", +function (s, start, end) { +return this._reverseSearchLike ( new com.stevesoft.pat.wrap.StringWrap (s), start, end); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "_reverseSearchLike", +function (s, start, end) { +if (this.gFlag && this.gFlagto > 0 && s.unwrap () === this.gFlags.unwrap ()) { +end = this.gFlagto; +}this.gFlags = null; +var pt = this.prep (s); +for (var i = end; i >= start; i--) { +this.charsMatched_ = this.thePattern.matchAt (s, i, pt); +if (this.charsMatched_ >= 0) { +this.matchFrom_ = this.thePattern.mfrom; +this.marks = pt.marks; +this.gFlagto = this.matchFrom_ - 1; +this.gFlags = s; +return this.didMatch_ = true; +}} +return this.didMatch_ = false; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$.setCbits = Clazz.defineMethod (c$, "setCbits", +function (s, pt) { +if (s === com.stevesoft.pat.Regex.lasts) { +pt.cbits = com.stevesoft.pat.Regex.lastbs; +return; +}var bs = new java.util.BitSet (s.length ()); +var qc = ' '; +var setBit = false; +for (var i = 0; i < s.length (); i++) { +if (setBit) { +bs.set (i); +}var c = s.charAt (i); +if (!setBit && c == '"') { +qc = c; +setBit = true; +bs.set (i); +} else if (!setBit && c == '\'') { +qc = c; +setBit = true; +bs.set (i); +} else if (setBit && c == qc) { +setBit = false; +} else if (setBit && c == '\\' && i + 1 < s.length ()) { +i++; +if (setBit) { +bs.set (i); +}}} +pt.cbits = com.stevesoft.pat.Regex.lastbs = bs; +com.stevesoft.pat.Regex.lasts = s; +}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "add", +function (p2) { +if (this.p == null) { +this.p = p2; +} else { +this.p.add (p2); +p2 = this.p; +}}, "com.stevesoft.pat.Pattern"); +Clazz.defineMethod (c$, "compileSP", +function (sp, mk) { +if (sp.match ('[')) { +sp.inc (); +this.add (this.matchBracket (sp)); +} else if (sp.match ('|')) { +if (this.or == null) { +this.or = new com.stevesoft.pat.Or (); +}if (this.p == null) { +this.p = new com.stevesoft.pat.NullPattern (); +}this.or.addOr (this.p); +this.p = null; +} else if (sp.incMatch ("(?<")) { +var i = sp.getPatInt (); +if (i == null) { +com.stevesoft.pat.RegSyntaxError.endItAll ("No int after (?<"); +}this.add ( new com.stevesoft.pat.Backup (i.intValue ())); +if (!sp.match (')')) { +com.stevesoft.pat.RegSyntaxError.endItAll ("No ) after (?<"); +}} else if (sp.incMatch ("(?>")) { +var i = sp.getPatInt (); +if (i == null) { +com.stevesoft.pat.RegSyntaxError.endItAll ("No int after (?>"); +}this.add ( new com.stevesoft.pat.Backup (-i.intValue ())); +if (!sp.match (')')) { +com.stevesoft.pat.RegSyntaxError.endItAll ("No ) after (?<"); +}} else if (sp.incMatch ("(?@")) { +var op = sp.c; +sp.inc (); +var cl = sp.c; +sp.inc (); +if (!sp.match (')')) { +com.stevesoft.pat.RegSyntaxError.endItAll ("(?@ does not have closing paren"); +}this.add ( new com.stevesoft.pat.Group (op, cl)); +} else if (sp.incMatch ("(?#")) { +while (!sp.match (')')) { +sp.inc (); +} +} else if (sp.dontMatch && sp.c == 'w') { +var b = new com.stevesoft.pat.Bracket (false); +b.addOr ( new com.stevesoft.pat.Range ('a', 'z')); +b.addOr ( new com.stevesoft.pat.Range ('A', 'Z')); +b.addOr ( new com.stevesoft.pat.Range ('0', '9')); +b.addOr ( new com.stevesoft.pat.oneChar ('_')); +this.add (b); +} else if (sp.dontMatch && sp.c == 'G') { +this.add ( new com.stevesoft.pat.BackG ()); +} else if (sp.dontMatch && sp.c == 's') { +var b = new com.stevesoft.pat.Bracket (false); +b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (32))); +b.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (8), String.fromCharCode (10))); +b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (13))); +this.add (b); +} else if (sp.dontMatch && sp.c == 'd') { +var digit = new com.stevesoft.pat.Range ('0', '9'); +digit.printBrackets = true; +this.add (digit); +} else if (sp.dontMatch && sp.c == 'W') { +var b = new com.stevesoft.pat.Bracket (true); +b.addOr ( new com.stevesoft.pat.Range ('a', 'z')); +b.addOr ( new com.stevesoft.pat.Range ('A', 'Z')); +b.addOr ( new com.stevesoft.pat.Range ('0', '9')); +b.addOr ( new com.stevesoft.pat.oneChar ('_')); +this.add (b); +} else if (sp.dontMatch && sp.c == 'S') { +var b = new com.stevesoft.pat.Bracket (true); +b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (32))); +b.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (8), String.fromCharCode (10))); +b.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (13))); +this.add (b); +} else if (sp.dontMatch && sp.c == 'D') { +var b = new com.stevesoft.pat.Bracket (true); +b.addOr ( new com.stevesoft.pat.Range ('0', '9')); +this.add (b); +} else if (sp.dontMatch && sp.c == 'B') { +var r = new com.stevesoft.pat.Regex (null, ""); +r._compile ("(?!\\b)", mk); +this.add (r.thePattern); +} else if (this.isOctalString (sp)) { +var d = sp.c.charCodeAt (0) - 48; +sp.inc (); +d = 8 * d + sp.c.charCodeAt (0) - 48; +var sp2 = new com.stevesoft.pat.StrPos (sp); +sp2.inc (); +if (this.isOctalDigit (sp2, false)) { +sp.inc (); +d = 8 * d + sp.c.charCodeAt (0) - 48; +}this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); +} else if (sp.dontMatch && sp.c >= '1' && sp.c <= '9') { +var iv = sp.c.charCodeAt (0) - 48; +var s2 = new com.stevesoft.pat.StrPos (sp); +s2.inc (); +if (!s2.dontMatch && s2.c >= '0' && s2.c <= '9') { +iv = 10 * iv + (s2.c.charCodeAt (0) - 48); +sp.inc (); +}this.add ( new com.stevesoft.pat.BackMatch (iv)); +} else if (sp.dontMatch && sp.c == 'b') { +this.add ( new com.stevesoft.pat.Boundary ()); +} else if (sp.match ('\b')) { +this.add ( new com.stevesoft.pat.Boundary ()); +} else if (sp.match ('$')) { +this.add ( new com.stevesoft.pat.End (true)); +} else if (sp.dontMatch && sp.c == 'Z') { +this.add ( new com.stevesoft.pat.End (false)); +} else if (sp.match ('.')) { +this.add ( new com.stevesoft.pat.Any ()); +} else if (sp.incMatch ("(??")) { +var sb = new StringBuffer (); +var sb2 = new StringBuffer (); +while (!sp.match (')') && !sp.match (':')) { +sb.append (sp.c); +sp.inc (); +} +if (sp.incMatch (":")) { +while (!sp.match (')')) { +sb2.append (sp.c); +sp.inc (); +} +}var sbs = sb.toString (); +if (Clazz.instanceOf (com.stevesoft.pat.Regex.validators.get (sbs), String)) { +var pat = com.stevesoft.pat.Regex.validators.get (sbs); +var r = new com.stevesoft.pat.Regex (null, ""); +var rth = new com.stevesoft.pat.Rthings (this); +rth.noBackRefs = true; +r._compile (pat, rth); +this.add (r.thePattern); +} else { +var cm = new com.stevesoft.pat.Custom (sb.toString ()); +if (cm.v != null) { +var v2 = cm.v.arg (sb2.toString ()); +if (v2 != null) { +v2.argsave = sb2.toString (); +var p = cm.v.pattern; +cm.v = v2; +v2.pattern = p; +}var r = new com.stevesoft.pat.Regex (null, ""); +var rth = new com.stevesoft.pat.Rthings (this); +rth.noBackRefs = true; +r._compile (cm.v.pattern, rth); +cm.sub = r.thePattern; +cm.sub.add ( new com.stevesoft.pat.CustomEndpoint (cm)); +cm.sub.setParent (cm); +this.add (cm); +}}} else if (sp.match ('(')) { +mk.parenLevel++; +var r = new com.stevesoft.pat.Regex (null, ""); +sp.inc (); +if (sp.incMatch ("?:")) { +r.or = new com.stevesoft.pat.Or (); +} else if (sp.incMatch ("?=")) { +r.or = new com.stevesoft.pat.lookAhead (false); +} else if (sp.incMatch ("?!")) { +r.or = new com.stevesoft.pat.lookAhead (true); +} else if (sp.match ('?')) { +sp.inc (); +do { +if (sp.c == 'i') { +mk.ignoreCase = true; +}if (sp.c == 'Q') { +mk.dontMatchInQuotes = true; +}if (sp.c == 'o') { +mk.optimizeMe = true; +}if (sp.c == 'g') { +mk.gFlag = true; +}if (sp.c == 's') { +mk.sFlag = true; +}if (sp.c == 'm') { +mk.mFlag = true; +}sp.inc (); +} while (!sp.match (')') && !sp.$eos); +r = null; +mk.parenLevel--; +if (sp.$eos) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Unclosed ()"); +}} else { +r.or = mk.noBackRefs ? new com.stevesoft.pat.Or () : new com.stevesoft.pat.OrMark (mk.val++); +}if (r != null) { +this.add (r._compileSP (sp, mk)); +}} else if (sp.match ('^')) { +this.add ( new com.stevesoft.pat.Start (true)); +} else if (sp.dontMatch && sp.c == 'A') { +this.add ( new com.stevesoft.pat.Start (false)); +} else if (sp.match ('*')) { +this.addMulti ( new com.stevesoft.pat.patInt (0), new com.stevesoft.pat.patInf ()); +} else if (sp.match ('+')) { +this.addMulti ( new com.stevesoft.pat.patInt (1), new com.stevesoft.pat.patInf ()); +} else if (sp.match ('?')) { +this.addMulti ( new com.stevesoft.pat.patInt (0), new com.stevesoft.pat.patInt (1)); +} else if (sp.match ('{')) { +var bad = false; +var sp2 = new com.stevesoft.pat.StrPos (sp); +sp.inc (); +var i1 = sp.getPatInt (); +var i2 = null; +if (sp.match ('}')) { +i2 = i1; +} else { +if (!sp.match (',')) { +bad = true; +}sp.inc (); +if (sp.match ('}')) { +i2 = new com.stevesoft.pat.patInf (); +} else { +i2 = sp.getPatInt (); +}}if (i1 == null || i2 == null) { +bad = true; +}if (bad) { +sp.dup (sp2); +this.add ( new com.stevesoft.pat.oneChar (sp.c)); +} else { +this.addMulti (i1, i2); +}} else if (sp.escMatch ('x') && this.next2Hex (sp)) { +sp.inc (); +var d = this.getHexDigit (sp); +sp.inc (); +d = 16 * d + this.getHexDigit (sp); +this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); +} else if (sp.escMatch ('c')) { +sp.inc (); +if (sp.c.charCodeAt (0) < com.stevesoft.pat.Ctrl.cmap.length) { +this.add ( new com.stevesoft.pat.oneChar (com.stevesoft.pat.Ctrl.cmap[sp.c.charCodeAt (0)])); +} else { +this.add ( new com.stevesoft.pat.oneChar (sp.c)); +}} else if (sp.escMatch ('f')) { +this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (12))); +} else if (sp.escMatch ('a')) { +this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (7))); +} else if (sp.escMatch ('t')) { +this.add ( new com.stevesoft.pat.oneChar ('\t')); +} else if (sp.escMatch ('n')) { +this.add ( new com.stevesoft.pat.oneChar ('\n')); +} else if (sp.escMatch ('r')) { +this.add ( new com.stevesoft.pat.oneChar ('\r')); +} else if (sp.escMatch ('b')) { +this.add ( new com.stevesoft.pat.oneChar ('\b')); +} else if (sp.escMatch ('e')) { +this.add ( new com.stevesoft.pat.oneChar (String.fromCharCode (27))); +} else { +this.add ( new com.stevesoft.pat.oneChar (sp.c)); +if (sp.match (')')) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Unmatched right paren in pattern"); +}}}, "com.stevesoft.pat.StrPos,com.stevesoft.pat.Rthings"); +Clazz.defineMethod (c$, "_compile", +($fz = function (pat, mk) { +this.minMatch = null; +this.sFlag = this.mFlag = this.ignoreCase = this.gFlag = false; +var sp = new com.stevesoft.pat.StrPos (pat, 0); +this.thePattern = this._compileSP (sp, mk); +this.pt.marks = null; +return this.thePattern; +}, $fz.isPrivate = true, $fz), "~S,com.stevesoft.pat.Rthings"); +Clazz.defineMethod (c$, "_compileSP", +function (sp, mk) { +while (!(sp.$eos || (this.or != null && sp.match (')')))) { +this.compileSP (sp, mk); +sp.inc (); +} +if (sp.match (')')) { +mk.parenLevel--; +} else if (sp.$eos && mk.parenLevel != 0) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Unclosed Parenthesis! lvl=" + mk.parenLevel); +}if (this.or != null) { +if (this.p == null) { +this.p = new com.stevesoft.pat.NullPattern (); +}this.or.addOr (this.p); +return this.or; +}return this.p == null ? new com.stevesoft.pat.NullPattern () : this.p; +}, "com.stevesoft.pat.StrPos,com.stevesoft.pat.Rthings"); +Clazz.defineMethod (c$, "addMulti", +function (i1, i2) { +var last; +var last2; +for (last = this.p; last != null && last.next != null; last = last.next) { +;} +if (last == null || last === this.p) { +last2 = null; +} else { +for (last2 = this.p; last2.next !== last; last2 = last2.next) { +;} +}if (Clazz.instanceOf (last, com.stevesoft.pat.Multi) && i1.intValue () == 0 && i2.intValue () == 1) { +(last).matchFewest = true; +} else if (Clazz.instanceOf (last, com.stevesoft.pat.FastMulti) && i1.intValue () == 0 && i2.intValue () == 1) { +(last).matchFewest = true; +} else if (Clazz.instanceOf (last, com.stevesoft.pat.DotMulti) && i1.intValue () == 0 && i2.intValue () == 1) { +(last).matchFewest = true; +} else if (Clazz.instanceOf (last, com.stevesoft.pat.Multi) || Clazz.instanceOf (last, com.stevesoft.pat.DotMulti) || Clazz.instanceOf (last, com.stevesoft.pat.FastMulti)) { +throw new com.stevesoft.pat.RegSyntax ("Syntax error."); +} else if (last2 == null) { +this.p = com.stevesoft.pat.Regex.mkMulti (i1, i2, this.p); +} else { +last2.next = com.stevesoft.pat.Regex.mkMulti (i1, i2, last); +}}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt"); +c$.mkMulti = Clazz.defineMethod (c$, "mkMulti", +function (lo, hi, p) { +if (Clazz.instanceOf (p, com.stevesoft.pat.Any) && p.next == null) { +return new com.stevesoft.pat.DotMulti (lo, hi); +}return com.stevesoft.pat.RegOpt.safe4fm (p) ? new com.stevesoft.pat.FastMulti (lo, hi, p) : new com.stevesoft.pat.Multi (lo, hi, p); +}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern"); +Clazz.defineMethod (c$, "matchBracket", +function (sp) { +var ret; +if (sp.match ('^')) { +ret = new com.stevesoft.pat.Bracket (true); +sp.inc (); +} else { +ret = new com.stevesoft.pat.Bracket (false); +}if (sp.match (']')) { +com.stevesoft.pat.RegSyntaxError.endItAll ("Unmatched []"); +}while (!sp.$eos && !sp.match (']')) { +var s1 = new com.stevesoft.pat.StrPos (sp); +s1.inc (); +var s1_ = new com.stevesoft.pat.StrPos (s1); +s1_.inc (); +if (s1.match ('-') && !s1_.match (']')) { +var s2 = new com.stevesoft.pat.StrPos (s1); +s2.inc (); +if (!s2.$eos) { +ret.addOr ( new com.stevesoft.pat.Range (sp.c, s2.c)); +}sp.inc (); +sp.inc (); +} else if (sp.escMatch ('Q')) { +sp.inc (); +while (!sp.escMatch ('E')) { +ret.addOr ( new com.stevesoft.pat.oneChar (sp.c)); +sp.inc (); +} +} else if (sp.escMatch ('d')) { +ret.addOr ( new com.stevesoft.pat.Range ('0', '9')); +} else if (sp.escMatch ('s')) { +ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (32))); +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (8), String.fromCharCode (10))); +ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (13))); +} else if (sp.escMatch ('w')) { +ret.addOr ( new com.stevesoft.pat.Range ('a', 'z')); +ret.addOr ( new com.stevesoft.pat.Range ('A', 'Z')); +ret.addOr ( new com.stevesoft.pat.Range ('0', '9')); +ret.addOr ( new com.stevesoft.pat.oneChar ('_')); +} else if (sp.escMatch ('D')) { +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (47))); +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (58), String.fromCharCode (65535))); +} else if (sp.escMatch ('S')) { +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (7))); +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (11), String.fromCharCode (12))); +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (14), String.fromCharCode (31))); +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (33), String.fromCharCode (65535))); +} else if (sp.escMatch ('W')) { +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (0), String.fromCharCode (64))); +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (91), String.fromCharCode (94))); +ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (96))); +ret.addOr ( new com.stevesoft.pat.Range (String.fromCharCode (123), String.fromCharCode (65535))); +} else if (sp.escMatch ('x') && this.next2Hex (sp)) { +sp.inc (); +var d = this.getHexDigit (sp); +sp.inc (); +d = 16 * d + this.getHexDigit (sp); +ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); +} else if (sp.escMatch ('a')) { +ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (7))); +} else if (sp.escMatch ('f')) { +ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (12))); +} else if (sp.escMatch ('e')) { +ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (27))); +} else if (sp.escMatch ('n')) { +ret.addOr ( new com.stevesoft.pat.oneChar ('\n')); +} else if (sp.escMatch ('t')) { +ret.addOr ( new com.stevesoft.pat.oneChar ('\t')); +} else if (sp.escMatch ('r')) { +ret.addOr ( new com.stevesoft.pat.oneChar ('\r')); +} else if (sp.escMatch ('c')) { +sp.inc (); +if (sp.c.charCodeAt (0) < com.stevesoft.pat.Ctrl.cmap.length) { +ret.addOr ( new com.stevesoft.pat.oneChar (com.stevesoft.pat.Ctrl.cmap[sp.c.charCodeAt (0)])); +} else { +ret.addOr ( new com.stevesoft.pat.oneChar (sp.c)); +}} else if (this.isOctalString (sp)) { +var d = sp.c.charCodeAt (0) - 48; +sp.inc (); +d = 8 * d + sp.c.charCodeAt (0) - 48; +var sp2 = new com.stevesoft.pat.StrPos (sp); +sp2.inc (); +if (this.isOctalDigit (sp2, false)) { +sp.inc (); +d = 8 * d + sp.c.charCodeAt (0) - 48; +}ret.addOr ( new com.stevesoft.pat.oneChar (String.fromCharCode (d))); +} else { +ret.addOr ( new com.stevesoft.pat.oneChar (sp.c)); +}sp.inc (); +} +return ret; +}, "com.stevesoft.pat.StrPos"); +Clazz.overrideMethod (c$, "toString", +function () { +{ +var sb = new StringBuffer (); +if (this.esc != '\\') { +sb.append ("(?e="); +sb.append (this.esc); +sb.append (")"); +}if (this.gFlag || this.mFlag || !com.stevesoft.pat.Regex.dotDoesntMatchCR || this.sFlag || this.ignoreCase || this.dontMatchInQuotes || this.optimized ()) { +sb.append ("(?"); +if (this.ignoreCase) { +sb.append ("i"); +}if (this.mFlag) { +sb.append ("m"); +}if (this.sFlag || !com.stevesoft.pat.Regex.dotDoesntMatchCR) { +sb.append ("s"); +}if (this.dontMatchInQuotes) { +sb.append ("Q"); +}if (this.optimized ()) { +sb.append ("o"); +}if (this.gFlag) { +sb.append ("g"); +}sb.append (")"); +}var patstr = this.thePattern.toString (); +if (this.esc != '\\') { +patstr = com.stevesoft.pat.Regex.reEscape (patstr, '\\', this.esc); +}sb.append (patstr); +return sb.toString (); +}}); +c$.reEscape = Clazz.defineMethod (c$, "reEscape", +function (s, oldEsc, newEsc) { +if (oldEsc == newEsc) { +return s; +}var i; +var sb = new StringBuffer (); +for (i = 0; i < s.length; i++) { +if (s.charAt (i) == oldEsc && i + 1 < s.length) { +if (s.charAt (i + 1) == oldEsc) { +sb.append (oldEsc); +} else { +sb.append (newEsc); +sb.append (s.charAt (i + 1)); +}i++; +} else if (s.charAt (i) == newEsc) { +sb.append (newEsc); +sb.append (newEsc); +} else { +sb.append (s.charAt (i)); +}} +return sb.toString (); +}, "~S,~S,~S"); +Clazz.defineMethod (c$, "accept", +function (dir, s) { +return this.search (s); +}, "java.io.File,~S"); +c$.version = Clazz.defineMethod (c$, "version", +function () { +return "lgpl release 1.5.3"; +}); +Clazz.defineMethod (c$, "optimize", +function () { +if (this.optimized () || this.thePattern == null) { +return; +}this.minMatch = new com.stevesoft.pat.patInt (0); +this.thePattern = com.stevesoft.pat.RegOpt.opt (this.thePattern, this.ignoreCase, this.dontMatchInQuotes); +this.skipper = com.stevesoft.pat.Skip.findSkipRegex (this); +return; +}); +Clazz.defineMethod (c$, "optimized", +function () { +return this.minMatch != null; +}); +c$.perlCode = Clazz.defineMethod (c$, "perlCode", +function (s) { +return com.stevesoft.pat.parsePerl.parse (s); +}, "~S"); +Clazz.defineMethod (c$, "isLiteral", +function () { +var x = this.thePattern; +while (x != null) { +if (Clazz.instanceOf (x, com.stevesoft.pat.oneChar)) { +;} else if (Clazz.instanceOf (x, com.stevesoft.pat.Skipped)) { +;} else { +return false; +}x = x.next; +} +return true; +}); +Clazz.defineMethod (c$, "countMinChars", +function () { +return this.thePattern.countMinChars (); +}); +Clazz.defineMethod (c$, "countMaxChars", +function () { +return this.thePattern.countMaxChars (); +}); +Clazz.defineMethod (c$, "isHexDigit", +function (sp) { +var r = !sp.$eos && !sp.dontMatch && ((sp.c >= '0' && sp.c <= '9') || (sp.c >= 'a' && sp.c <= 'f') || (sp.c >= 'A' && sp.c <= 'F')); +return r; +}, "com.stevesoft.pat.StrPos"); +Clazz.defineMethod (c$, "isOctalDigit", +function (sp, first) { +var r = !sp.$eos && !( new Boolean (first ^ sp.dontMatch).valueOf ()) && sp.c >= '0' && sp.c <= '7'; +return r; +}, "com.stevesoft.pat.StrPos,~B"); +Clazz.defineMethod (c$, "getHexDigit", +function (sp) { +if (sp.c >= '0' && sp.c <= '9') { +return sp.c.charCodeAt (0) - 48; +}if (sp.c >= 'a' && sp.c <= 'f') { +return sp.c.charCodeAt (0) - 97 + 10; +}return sp.c.charCodeAt (0) - 65 + 10; +}, "com.stevesoft.pat.StrPos"); +Clazz.defineMethod (c$, "next2Hex", +function (sp) { +var sp2 = new com.stevesoft.pat.StrPos (sp); +sp2.inc (); +if (!this.isHexDigit (sp2)) { +return false; +}sp2.inc (); +if (!this.isHexDigit (sp2)) { +return false; +}return true; +}, "com.stevesoft.pat.StrPos"); +Clazz.defineMethod (c$, "isOctalString", +function (sp) { +if (!this.isOctalDigit (sp, true)) { +return false; +}var sp2 = new com.stevesoft.pat.StrPos (sp); +sp2.inc (); +if (!this.isOctalDigit (sp2, false)) { +return false; +}return true; +}, "com.stevesoft.pat.StrPos"); +Clazz.defineStatics (c$, +"BackRefOffset", 1); +c$.none = c$.prototype.none = new com.stevesoft.pat.NoPattern (); +c$.validators = c$.prototype.validators = new java.util.Hashtable (); +{ +com.stevesoft.pat.Regex.defineV ("p", "(?>1)", new com.stevesoft.pat.UnicodePunct ()); +com.stevesoft.pat.Regex.defineV ("P", "(?>1)", new com.stevesoft.pat.NUnicodePunct ()); +com.stevesoft.pat.Regex.defineV ("s", "(?>1)", new com.stevesoft.pat.UnicodeWhite ()); +com.stevesoft.pat.Regex.defineV ("S", "(?>1)", new com.stevesoft.pat.NUnicodeWhite ()); +com.stevesoft.pat.Regex.defineV ("w", "(?>1)", new com.stevesoft.pat.UnicodeW ()); +com.stevesoft.pat.Regex.defineV ("W", "(?>1)", new com.stevesoft.pat.NUnicodeW ()); +com.stevesoft.pat.Regex.defineV ("d", "(?>1)", new com.stevesoft.pat.UnicodeDigit ()); +com.stevesoft.pat.Regex.defineV ("D", "(?>1)", new com.stevesoft.pat.NUnicodeDigit ()); +com.stevesoft.pat.Regex.defineV ("m", "(?>1)", new com.stevesoft.pat.UnicodeMath ()); +com.stevesoft.pat.Regex.defineV ("M", "(?>1)", new com.stevesoft.pat.NUnicodeMath ()); +com.stevesoft.pat.Regex.defineV ("c", "(?>1)", new com.stevesoft.pat.UnicodeCurrency ()); +com.stevesoft.pat.Regex.defineV ("C", "(?>1)", new com.stevesoft.pat.NUnicodeCurrency ()); +com.stevesoft.pat.Regex.defineV ("a", "(?>1)", new com.stevesoft.pat.UnicodeAlpha ()); +com.stevesoft.pat.Regex.defineV ("A", "(?>1)", new com.stevesoft.pat.NUnicodeAlpha ()); +com.stevesoft.pat.Regex.defineV ("uc", "(?>1)", new com.stevesoft.pat.UnicodeUpper ()); +com.stevesoft.pat.Regex.defineV ("lc", "(?>1)", new com.stevesoft.pat.UnicodeLower ()); +}Clazz.defineStatics (c$, +"defaultMFlag", false, +"dotDoesntMatchCR", true, +"lasts", null, +"lastbs", null, +"back_slash", '\\'); +}); diff --git a/bin/com/stevesoft/pat/RegexReader.class b/bin/com/stevesoft/pat/RegexReader.class index 2639d15b6733a3bb94f90cfac2cee2e8cfc3edea..613abb5c70474ffc85d26532e78deac0ec8a4f83 100644 GIT binary patch delta 36 scmdn5u}@<|ArE8T<{}7}*&Z85o#0-{nta0RY5G2)O_N diff --git a/bin/com/stevesoft/pat/RegexReader.js b/bin/com/stevesoft/pat/RegexReader.js index 301d8e7..d767d80 100644 --- a/bin/com/stevesoft/pat/RegexReader.js +++ b/bin/com/stevesoft/pat/RegexReader.js @@ -1,164 +1,164 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["java.io.Reader", "com.stevesoft.pat.PartialBuffer", "$.RBuffer", "java.lang.StringBuffer"], "com.stevesoft.pat.RegexReader", ["com.stevesoft.pat.StringBufferLike", "com.stevesoft.pat.wrap.StringBufferWrap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.rb = null; -this.wrap = null; -this.moreToRead = true; -this.r = null; -this.rp = null; -this.nmax = 2048; -this.max_lines = 2; -this.EOLchar = '\n'; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "RegexReader", java.io.Reader); -Clazz.prepareFields (c$, function () { -this.rb = new com.stevesoft.pat.RBuffer ( new StringBuffer ()); -this.wrap = new com.stevesoft.pat.PartialBuffer (this.rb.sb); -}); -Clazz.makeConstructor (c$, -function (rex, r) { -Clazz.superConstructor (this, com.stevesoft.pat.RegexReader, []); -this.r = r; -this.rp = rex.getReplacer (); -}, "com.stevesoft.pat.Regex,java.io.Reader"); -Clazz.makeConstructor (c$, -function (tex, r) { -Clazz.superConstructor (this, com.stevesoft.pat.RegexReader, []); -this.r = r; -this.rp = tex.getReplacer (); -}, "com.stevesoft.pat.Transformer,java.io.Reader"); -Clazz.defineMethod (c$, "reset", -function () { -this.r.reset (); -this.rb = new com.stevesoft.pat.RBuffer ( new StringBuffer ()); -this.wrap = new com.stevesoft.pat.PartialBuffer (this.rb.sb); -this.moreToRead = true; -}); -Clazz.defineMethod (c$, "readData", -function () { -var c; -var n = 0; -while ((c = this.r.read ()) != -1) { -this.rb.sb.append (String.fromCharCode (c)); -if (n++ > this.nmax) { -break; -}} -if (c == -1 && n == 0) { -this.moreToRead = false; -this.wrap.allowOverRun = false; -}}); -Clazz.defineMethod (c$, "getMoreData", -function () { -while (this.rb.pos >= this.rb.epos) { -this.wrap.overRun = false; -if (this.rb.next != null) { -this.rb = this.rb.next; -} else if (this.rb.done) { -break; -} else if (this.rb.epos >= this.rb.sb.length () && this.rb.epos > this.nmax) { -this.rb.pos = 1; -this.rb.epos = 1; -this.rb.sb.setLength (1); -this.readData (); -} else if (this.rb.epos >= this.rb.sb.length () && this.moreToRead) { -this.readData (); -} else if (this.rp.getRegex ().matchAtLike (this.wrap, this.rb.epos)) { -if (this.wrap.overRun) { -this.readData (); -} else { -var sbw = new com.stevesoft.pat.wrap.StringBufferWrap (); -var sbl = new com.stevesoft.pat.StringBufferLike (sbw); -var rex = this.rp.getRegex (); -var npos = rex.matchedTo (); -this.rp.setBuffer (sbl); -this.rp.setSource (this.wrap); -this.rp.setPos (npos); -this.rp.apply (rex, rex.getReplaceRule ()); -var opos = this.rb.epos; -var rb2 = new com.stevesoft.pat.RBuffer (sbw.unwrap ()); -rb2.epos = rb2.sb.length (); -var rb3 = new com.stevesoft.pat.RBuffer (this.rb.sb); -this.rb.next = rb2; -rb2.next = rb3; -if (npos == opos) { -rb3.epos = npos + 1; -if (rb3.epos > rb3.sb.length ()) { -if (this.rb.pos >= this.rb.epos) { -this.rb = this.rb.next; -}rb3.pos = rb3.epos = 0; -rb3.done = true; -}rb3.pos = npos; -} else { -rb3.pos = rb3.epos = npos; -}}} else { -if (this.wrap.overRun) { -this.readData (); -} else if (this.rb.epos < this.rb.sb.length ()) { -this.rb.epos++; -} else { -break; -}}} -}); -Clazz.defineMethod (c$, "read", -function () { -if (this.rb.pos >= this.rb.epos) { -this.getMoreData (); -if (this.rb.pos >= this.rb.epos) { -return -1; -}}return this.rb.sb.charAt (this.rb.pos++); -}); -Clazz.defineMethod (c$, "read", -function (buf, off, len) { -var c = -1; -var end = off + len; -for (var i = off; i < end; i++) { -c = this.read (); -if (c < 0) { -if (i == off) { -return -1; -}return i - off; -}buf[i] = String.fromCharCode (c); -} -return len; -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "close", -function () { -this.r.close (); -}); -Clazz.overrideMethod (c$, "markSupported", -function () { -return false; -}); -Clazz.defineMethod (c$, "getBufferSize", -function () { -return this.nmax; -}); -Clazz.defineMethod (c$, "setBufferSize", -function (n) { -this.nmax = n; -}, "~N"); -Clazz.defineMethod (c$, "getMaxLines", -function () { -return this.max_lines; -}); -Clazz.defineMethod (c$, "setMaxLines", -function (ml) { -this.max_lines = ml; -}, "~N"); -Clazz.defineMethod (c$, "getEOLchar", -function () { -return this.EOLchar; -}); -Clazz.defineMethod (c$, "setEOLchar", -function (c) { -this.EOLchar = c; -}, "~S"); -Clazz.overrideMethod (c$, "skip", -function (d) { -var n = 0; -while (n < d && this.read () != -1) { -n++; -} -return n; -}, "~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["java.io.Reader", "com.stevesoft.pat.PartialBuffer", "$.RBuffer", "java.lang.StringBuffer"], "com.stevesoft.pat.RegexReader", ["com.stevesoft.pat.StringBufferLike", "com.stevesoft.pat.wrap.StringBufferWrap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.rb = null; +this.wrap = null; +this.moreToRead = true; +this.r = null; +this.rp = null; +this.nmax = 2048; +this.max_lines = 2; +this.EOLchar = '\n'; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RegexReader", java.io.Reader); +Clazz.prepareFields (c$, function () { +this.rb = new com.stevesoft.pat.RBuffer ( new StringBuffer ()); +this.wrap = new com.stevesoft.pat.PartialBuffer (this.rb.sb); +}); +Clazz.makeConstructor (c$, +function (rex, r) { +Clazz.superConstructor (this, com.stevesoft.pat.RegexReader, []); +this.r = r; +this.rp = rex.getReplacer (); +}, "com.stevesoft.pat.Regex,java.io.Reader"); +Clazz.makeConstructor (c$, +function (tex, r) { +Clazz.superConstructor (this, com.stevesoft.pat.RegexReader, []); +this.r = r; +this.rp = tex.getReplacer (); +}, "com.stevesoft.pat.Transformer,java.io.Reader"); +Clazz.defineMethod (c$, "reset", +function () { +this.r.reset (); +this.rb = new com.stevesoft.pat.RBuffer ( new StringBuffer ()); +this.wrap = new com.stevesoft.pat.PartialBuffer (this.rb.sb); +this.moreToRead = true; +}); +Clazz.defineMethod (c$, "readData", +function () { +var c; +var n = 0; +while ((c = this.r.read ()) != -1) { +this.rb.sb.append (String.fromCharCode (c)); +if (n++ > this.nmax) { +break; +}} +if (c == -1 && n == 0) { +this.moreToRead = false; +this.wrap.allowOverRun = false; +}}); +Clazz.defineMethod (c$, "getMoreData", +function () { +while (this.rb.pos >= this.rb.epos) { +this.wrap.overRun = false; +if (this.rb.next != null) { +this.rb = this.rb.next; +} else if (this.rb.done) { +break; +} else if (this.rb.epos >= this.rb.sb.length () && this.rb.epos > this.nmax) { +this.rb.pos = 1; +this.rb.epos = 1; +this.rb.sb.setLength (1); +this.readData (); +} else if (this.rb.epos >= this.rb.sb.length () && this.moreToRead) { +this.readData (); +} else if (this.rp.getRegex ().matchAtLike (this.wrap, this.rb.epos)) { +if (this.wrap.overRun) { +this.readData (); +} else { +var sbw = new com.stevesoft.pat.wrap.StringBufferWrap (); +var sbl = new com.stevesoft.pat.StringBufferLike (sbw); +var rex = this.rp.getRegex (); +var npos = rex.matchedTo (); +this.rp.setBuffer (sbl); +this.rp.setSource (this.wrap); +this.rp.setPos (npos); +this.rp.apply (rex, rex.getReplaceRule ()); +var opos = this.rb.epos; +var rb2 = new com.stevesoft.pat.RBuffer (sbw.unwrap ()); +rb2.epos = rb2.sb.length (); +var rb3 = new com.stevesoft.pat.RBuffer (this.rb.sb); +this.rb.next = rb2; +rb2.next = rb3; +if (npos == opos) { +rb3.epos = npos + 1; +if (rb3.epos > rb3.sb.length ()) { +if (this.rb.pos >= this.rb.epos) { +this.rb = this.rb.next; +}rb3.pos = rb3.epos = 0; +rb3.done = true; +}rb3.pos = npos; +} else { +rb3.pos = rb3.epos = npos; +}}} else { +if (this.wrap.overRun) { +this.readData (); +} else if (this.rb.epos < this.rb.sb.length ()) { +this.rb.epos++; +} else { +break; +}}} +}); +Clazz.defineMethod (c$, "read", +function () { +if (this.rb.pos >= this.rb.epos) { +this.getMoreData (); +if (this.rb.pos >= this.rb.epos) { +return -1; +}}return this.rb.sb.charAt (this.rb.pos++); +}); +Clazz.defineMethod (c$, "read", +function (buf, off, len) { +var c = -1; +var end = off + len; +for (var i = off; i < end; i++) { +c = this.read (); +if (c < 0) { +if (i == off) { +return -1; +}return i - off; +}buf[i] = String.fromCharCode (c); +} +return len; +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "close", +function () { +this.r.close (); +}); +Clazz.overrideMethod (c$, "markSupported", +function () { +return false; +}); +Clazz.defineMethod (c$, "getBufferSize", +function () { +return this.nmax; +}); +Clazz.defineMethod (c$, "setBufferSize", +function (n) { +this.nmax = n; +}, "~N"); +Clazz.defineMethod (c$, "getMaxLines", +function () { +return this.max_lines; +}); +Clazz.defineMethod (c$, "setMaxLines", +function (ml) { +this.max_lines = ml; +}, "~N"); +Clazz.defineMethod (c$, "getEOLchar", +function () { +return this.EOLchar; +}); +Clazz.defineMethod (c$, "setEOLchar", +function (c) { +this.EOLchar = c; +}, "~S"); +Clazz.overrideMethod (c$, "skip", +function (d) { +var n = 0; +while (n < d && this.read () != -1) { +n++; +} +return n; +}, "~N"); +}); diff --git a/bin/com/stevesoft/pat/RegexTokenizer.js b/bin/com/stevesoft/pat/RegexTokenizer.js index 08cc754..c5774f3 100644 --- a/bin/com/stevesoft/pat/RegexTokenizer.js +++ b/bin/com/stevesoft/pat/RegexTokenizer.js @@ -1,104 +1,104 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["java.util.Enumeration", "$.Vector"], "com.stevesoft.pat.RegexTokenizer", ["com.stevesoft.pat.Regex"], function () { -c$ = Clazz.decorateAsClass (function () { -this.toParse = null; -this.r = null; -this.count = 0; -this.v = null; -this.vi = null; -this.pos = 0; -this.offset = 1; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "RegexTokenizer", null, java.util.Enumeration); -Clazz.prepareFields (c$, function () { -this.v = new java.util.Vector (); -this.vi = new java.util.Vector (); -}); -Clazz.defineMethod (c$, "getMore", -function () { -var s = this.r.right (); -if (this.r.searchFrom (this.toParse, this.pos)) { -this.v.addElement (this.r.left ().substring (this.pos)); -this.vi.addElement ( new Integer (this.r.matchFrom () + this.r.charsMatched ())); -for (var i = 0; i < this.r.numSubs (); i++) { -if (this.r.substring () != null) { -this.v.addElement (this.r.substringI (i + this.offset)); -this.vi.addElement ( new Integer (this.r.matchFromI (i + this.offset) + this.r.charsMatchedI (i + this.offset))); -}} -this.pos = this.r.matchFrom () + this.r.charsMatched (); -} else if (s != null) { -this.v.addElement (s); -}}); -Clazz.makeConstructor (c$, -function (txt, ptrn) { -this.toParse = txt; -this.r = new com.stevesoft.pat.Regex (ptrn, ""); -this.offset = com.stevesoft.pat.Regex.BackRefOffset; -this.getMore (); -}, "~S,~S"); -Clazz.makeConstructor (c$, -function (txt, r) { -this.toParse = txt; -this.r = r; -this.offset = com.stevesoft.pat.Regex.BackRefOffset; -this.getMore (); -}, "~S,com.stevesoft.pat.Regex"); -Clazz.overrideMethod (c$, "nextElement", -function () { -if (this.count >= this.v.size ()) { -this.getMore (); -}return this.v.elementAt (this.count++); -}); -Clazz.defineMethod (c$, "nextToken", -function () { -return this.nextElement (); -}); -Clazz.defineMethod (c$, "nextToken", -function (newpat) { -try { -this.r.compile (newpat); -} catch (r_) { -if (Clazz.exceptionOf (r_, com.stevesoft.pat.RegSyntax)) { -} else { -throw r_; -} -} -return this.nextToken (this.r); -}, "~S"); -Clazz.defineMethod (c$, "nextToken", -function (nr) { -this.r = nr; -if (this.vi.size () > this.count) { -this.pos = (this.vi.elementAt (this.count)).intValue (); -this.v.setSize (this.count); -this.vi.setSize (this.count); -}this.getMore (); -return this.nextToken (); -}, "com.stevesoft.pat.Regex"); -Clazz.overrideMethod (c$, "hasMoreElements", -function () { -if (this.count >= this.v.size ()) { -this.getMore (); -}return this.count < this.v.size (); -}); -Clazz.defineMethod (c$, "hasMoreTokens", -function () { -return this.hasMoreElements (); -}); -Clazz.defineMethod (c$, "countTokens", -function () { -var _count = this.count; -while (this.hasMoreTokens ()) { -this.nextToken (); -} -this.count = _count; -return this.v.size () - this.count; -}); -Clazz.defineMethod (c$, "allTokens", -function () { -this.countTokens (); -var ret = new Array (this.v.size ()); -this.v.copyInto (ret); -return ret; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["java.util.Enumeration", "$.Vector"], "com.stevesoft.pat.RegexTokenizer", ["com.stevesoft.pat.Regex"], function () { +c$ = Clazz.decorateAsClass (function () { +this.toParse = null; +this.r = null; +this.count = 0; +this.v = null; +this.vi = null; +this.pos = 0; +this.offset = 1; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RegexTokenizer", null, java.util.Enumeration); +Clazz.prepareFields (c$, function () { +this.v = new java.util.Vector (); +this.vi = new java.util.Vector (); +}); +Clazz.defineMethod (c$, "getMore", +function () { +var s = this.r.right (); +if (this.r.searchFrom (this.toParse, this.pos)) { +this.v.addElement (this.r.left ().substring (this.pos)); +this.vi.addElement ( new Integer (this.r.matchFrom () + this.r.charsMatched ())); +for (var i = 0; i < this.r.numSubs (); i++) { +if (this.r.substring () != null) { +this.v.addElement (this.r.substringI (i + this.offset)); +this.vi.addElement ( new Integer (this.r.matchFromI (i + this.offset) + this.r.charsMatchedI (i + this.offset))); +}} +this.pos = this.r.matchFrom () + this.r.charsMatched (); +} else if (s != null) { +this.v.addElement (s); +}}); +Clazz.makeConstructor (c$, +function (txt, ptrn) { +this.toParse = txt; +this.r = new com.stevesoft.pat.Regex (ptrn, ""); +this.offset = com.stevesoft.pat.Regex.BackRefOffset; +this.getMore (); +}, "~S,~S"); +Clazz.makeConstructor (c$, +function (txt, r) { +this.toParse = txt; +this.r = r; +this.offset = com.stevesoft.pat.Regex.BackRefOffset; +this.getMore (); +}, "~S,com.stevesoft.pat.Regex"); +Clazz.overrideMethod (c$, "nextElement", +function () { +if (this.count >= this.v.size ()) { +this.getMore (); +}return this.v.elementAt (this.count++); +}); +Clazz.defineMethod (c$, "nextToken", +function () { +return this.nextElement (); +}); +Clazz.defineMethod (c$, "nextToken", +function (newpat) { +try { +this.r.compile (newpat); +} catch (r_) { +if (Clazz.exceptionOf (r_, com.stevesoft.pat.RegSyntax)) { +} else { +throw r_; +} +} +return this.nextToken (this.r); +}, "~S"); +Clazz.defineMethod (c$, "nextToken", +function (nr) { +this.r = nr; +if (this.vi.size () > this.count) { +this.pos = (this.vi.elementAt (this.count)).intValue (); +this.v.setSize (this.count); +this.vi.setSize (this.count); +}this.getMore (); +return this.nextToken (); +}, "com.stevesoft.pat.Regex"); +Clazz.overrideMethod (c$, "hasMoreElements", +function () { +if (this.count >= this.v.size ()) { +this.getMore (); +}return this.count < this.v.size (); +}); +Clazz.defineMethod (c$, "hasMoreTokens", +function () { +return this.hasMoreElements (); +}); +Clazz.defineMethod (c$, "countTokens", +function () { +var _count = this.count; +while (this.hasMoreTokens ()) { +this.nextToken (); +} +this.count = _count; +return this.v.size () - this.count; +}); +Clazz.defineMethod (c$, "allTokens", +function () { +this.countTokens (); +var ret = new Array (this.v.size ()); +this.v.copyInto (ret); +return ret; +}); +}); diff --git a/bin/com/stevesoft/pat/RegexWriter.class b/bin/com/stevesoft/pat/RegexWriter.class index 36bb46587adf34e87116ecd3b22de5b8296c2e6e..e4e7fdd4a763d7fc6ed459cb584d377443a4439c 100644 GIT binary patch delta 35 rcmeya{8f2_91o-WW_cbxCVmM9&c6(r> this.bufferSize) { -for (var i = this.bufferSize; i < this.sb.length (); i++) { -this.sb.setCharAt (i - this.bufferSize, this.sb.charAt (i)); -} -this.pos -= this.bufferSize; -this.epos -= this.bufferSize; -this.sb.setLength (this.sb.length () - this.bufferSize); -}}); -Clazz.defineMethod (c$, "write", -function (ca, b, n) { -var m = b + n; -for (var i = b; i < m; i++) { -this.sb.append (ca[i]); -if (this.sb.length () % this.interval == this.interval - 1) { -this.wrap.overRun = false; -while (this.epos + this.interval < this.sb.length () && !this.wrap.overRun) { -this.write (); -} -}} -}, "~A,~N,~N"); -Clazz.overrideMethod (c$, "flush", -function () { -}); -Clazz.defineMethod (c$, "close", -function () { -this.wrap.allowOverRun = false; -this.wrap.overRun = false; -while (this.epos < this.sb.length ()) { -this.write (); -} -this.write (); -this.w.close (); -}); -Clazz.defineMethod (c$, "length", -function () { -return this.sb.length (); -}); -Clazz.defineMethod (c$, "charAt", -function (i) { -return this.sb.charAt (i); -}, "~N"); -Clazz.defineMethod (c$, "setInterval", -function (i) { -this.interval = i; -}, "~N"); -Clazz.defineMethod (c$, "getInterval", -function () { -return this.interval; -}); -Clazz.defineMethod (c$, "getBufferSize", -function () { -return this.bufferSize; -}); -Clazz.defineMethod (c$, "setBufferSize", -function (i) { -this.bufferSize = i; -}, "~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["java.io.Writer", "com.stevesoft.pat.PartialBuffer", "java.lang.StringBuffer"], "com.stevesoft.pat.RegexWriter", ["com.stevesoft.pat.StringBufferLike", "com.stevesoft.pat.wrap.WriterWrap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.repr = null; +this.w = null; +this.ww = null; +this.sb = null; +this.wrap = null; +this.pos = 0; +this.epos = 0; +this.interval = 128; +this.bufferSize = 2048; +this.EOLchar = '\n'; +this.max_lines = 2; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RegexWriter", java.io.Writer); +Clazz.prepareFields (c$, function () { +this.sb = new StringBuffer (); +this.wrap = new com.stevesoft.pat.PartialBuffer (this.sb); +}); +Clazz.makeConstructor (c$, +function (t, w) { +Clazz.superConstructor (this, com.stevesoft.pat.RegexWriter, []); +this.w = w; +this.ww = new com.stevesoft.pat.wrap.WriterWrap (w); +this.repr = t.getReplacer (); +this.repr.setBuffer ( new com.stevesoft.pat.StringBufferLike (this.ww)); +this.repr.setSource (this.wrap); +}, "com.stevesoft.pat.Transformer,java.io.Writer"); +Clazz.makeConstructor (c$, +function (r, w) { +Clazz.superConstructor (this, com.stevesoft.pat.RegexWriter, []); +this.w = w; +this.ww = new com.stevesoft.pat.wrap.WriterWrap (w); +this.repr = r.getReplacer (); +this.repr.setBuffer ( new com.stevesoft.pat.StringBufferLike (this.ww)); +this.repr.setSource (this.wrap); +}, "com.stevesoft.pat.Regex,java.io.Writer"); +Clazz.defineMethod (c$, "getEOLchar", +function () { +return this.EOLchar; +}); +Clazz.defineMethod (c$, "setEOLchar", +function (c) { +this.EOLchar = c; +}, "~S"); +Clazz.defineMethod (c$, "getMaxLines", +function () { +return this.max_lines; +}); +Clazz.defineMethod (c$, "setMaxLines", +function (ml) { +this.max_lines = ml; +}, "~N"); +Clazz.defineMethod (c$, "write", +function () { +var rex = this.repr.getRegex (); +var eposOld = this.epos; +if (rex.matchAtLike (this.wrap, this.epos) && !this.wrap.overRun) { +while (this.pos < this.epos) { +this.w.write (this.sb.charCodeAt (this.pos++)); +} +var to = rex.matchedTo (); +this.repr.setPos (to); +this.repr.apply (rex, rex.getReplaceRule ()); +this.epos = this.pos = to; +if (this.epos == eposOld && this.epos < this.sb.length ()) { +this.epos++; +}} else if (!this.wrap.overRun && this.epos < this.sb.length ()) { +this.epos++; +}while (this.pos < this.epos) { +this.w.write (this.sb.charCodeAt (this.pos++)); +} +if (this.epos == this.sb.length ()) { +this.sb.setLength (1); +this.pos = this.epos = 1; +} else if (this.pos > this.bufferSize) { +for (var i = this.bufferSize; i < this.sb.length (); i++) { +this.sb.setCharAt (i - this.bufferSize, this.sb.charAt (i)); +} +this.pos -= this.bufferSize; +this.epos -= this.bufferSize; +this.sb.setLength (this.sb.length () - this.bufferSize); +}}); +Clazz.defineMethod (c$, "write", +function (ca, b, n) { +var m = b + n; +for (var i = b; i < m; i++) { +this.sb.append (ca[i]); +if (this.sb.length () % this.interval == this.interval - 1) { +this.wrap.overRun = false; +while (this.epos + this.interval < this.sb.length () && !this.wrap.overRun) { +this.write (); +} +}} +}, "~A,~N,~N"); +Clazz.overrideMethod (c$, "flush", +function () { +}); +Clazz.defineMethod (c$, "close", +function () { +this.wrap.allowOverRun = false; +this.wrap.overRun = false; +while (this.epos < this.sb.length ()) { +this.write (); +} +this.write (); +this.w.close (); +}); +Clazz.defineMethod (c$, "length", +function () { +return this.sb.length (); +}); +Clazz.defineMethod (c$, "charAt", +function (i) { +return this.sb.charAt (i); +}, "~N"); +Clazz.defineMethod (c$, "setInterval", +function (i) { +this.interval = i; +}, "~N"); +Clazz.defineMethod (c$, "getInterval", +function () { +return this.interval; +}); +Clazz.defineMethod (c$, "getBufferSize", +function () { +return this.bufferSize; +}); +Clazz.defineMethod (c$, "setBufferSize", +function (i) { +this.bufferSize = i; +}, "~N"); +}); diff --git a/bin/com/stevesoft/pat/ReplaceRule.class b/bin/com/stevesoft/pat/ReplaceRule.class index 02e0acad6fd02739d66b8f9bb56cd49c8d15fb74..07dc4dea617471132f62fc8780b2bcdf86010090 100644 GIT binary patch delta 77 zcmZp+_+!4IOMp>kbGN_-cIIpbjmdTrT87g4LRxPSq+H(FzB)~ ZF#ci?{K)`h8!$?Oz%K^L%?l)wnE?ez65s#; delta 84 zcmexk-fXd%bGN_-cIF}m{mFI`S{4#a`ut2TrbrS9X diff --git a/bin/com/stevesoft/pat/ReplaceRule.js b/bin/com/stevesoft/pat/ReplaceRule.js index 795545b..7485c5f 100644 --- a/bin/com/stevesoft/pat/ReplaceRule.js +++ b/bin/com/stevesoft/pat/ReplaceRule.js @@ -1,203 +1,203 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["java.util.Hashtable"], "com.stevesoft.pat.ReplaceRule", ["com.stevesoft.pat.Ctrl", "$.Regex", "$.Transformer", "java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.next = null; -this.name = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "ReplaceRule"); -Clazz.prepareFields (c$, function () { -this.name = this.getClass ().getName (); -}); -Clazz.defineMethod (c$, "clone1", -function () { -return new com.stevesoft.pat.RuleHolder (this); -}); -Clazz.overrideMethod (c$, "clone", -function () { -var x = this.clone1 (); -var xsav = x; -var y = this; -while (y.next != null) { -x.next = y.next.clone1 (); -x.name = y.name; -x = x.next; -y = y.next; -} -return xsav; -}); -c$.add = Clazz.defineMethod (c$, "add", -function (head, adding) { -if (head == null) { -return head = adding; -}head.addRule (adding); -return head; -}, "com.stevesoft.pat.ReplaceRule,com.stevesoft.pat.ReplaceRule"); -Clazz.defineMethod (c$, "add", -function (adding) { -return com.stevesoft.pat.ReplaceRule.add (this, adding); -}, "com.stevesoft.pat.ReplaceRule"); -Clazz.defineMethod (c$, "addRule", -function (r) { -if (this.next == null) { -this.next = r; -} else { -this.next.addRule (r); -}}, "com.stevesoft.pat.ReplaceRule"); -c$.getv = Clazz.defineMethod (c$, "getv", -($fz = function () { -if (com.stevesoft.pat.ReplaceRule.getvar != null) { -return com.stevesoft.pat.ReplaceRule.getvar.clone (); -}com.stevesoft.pat.ReplaceRule.getvar = new com.stevesoft.pat.Regex ("(?:\\\\(\\d+)|\\$(?:(\\d+)|(\\w+)|([&\'`])|\\{(?:(\\d+)|([^\n}\\\\]+))})|\\\\([nrbtaef])|\\\\c([\u0000-\uffff])|\\\\x([A-Fa-f0-9]{2})|\\\\([\u0000-\uffff]))", ""); -com.stevesoft.pat.ReplaceRule.getvar.optimize (); -return com.stevesoft.pat.ReplaceRule.getvar; -}, $fz.isPrivate = true, $fz)); -c$.perlCode = Clazz.defineMethod (c$, "perlCode", -function (s) { -try { -var mf = 0; -var mt = 0; -var gv = com.stevesoft.pat.ReplaceRule.getv (); -var head = null; -var tmp = null; -while (gv.searchFrom (s, mt)) { -var off = com.stevesoft.pat.Regex.BackRefOffset - 1; -mf = gv.matchedFrom (); -if (mf > mt) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule (s.substring (mt, mf))); -}var $var = null; -if (($var = gv.stringMatchedI (1 + off)) != null || ($var = gv.stringMatchedI (2 + off)) != null || ($var = gv.stringMatchedI (5 + off)) != null) { -var d = 0; -for (var i = 0; i < $var.length; i++) { -d = 8 * d + ($var.charCodeAt (i) - 48); -} -if ($var.length == 1) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.BackRefRule (d)); -} else { -head = new com.stevesoft.pat.StringRule ("" + String.fromCharCode (d)); -}} else if (($var = gv.stringMatchedI (10 + off)) != null) { -if ("QELlUu".indexOf ($var) >= 0) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.CodeRule ($var.charAt (0))); -} else { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ($var)); -}} else if (($var = gv.stringMatchedI (3 + off)) != null || ($var = gv.stringMatchedI (4 + off)) != null || ($var = gv.stringMatchedI (6 + off)) != null) { -var arg = ""; -var pc; -if ((pc = $var.indexOf (':')) > 0) { -arg = $var.substring (pc + 1); -$var = $var.substring (0, pc); -}if ($var.equals ("&") || $var.equals ("MATCH")) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.AmpersandRule ()); -} else if ($var.equals ("`") || $var.equals ("PREMATCH")) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.LeftRule ()); -} else if ($var.equals ("'") || $var.equals ("POSTMATCH")) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.RightRule ()); -} else if ($var.equals ("WANT_MORE_TEXT")) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.WantMoreTextReplaceRule ()); -} else if ($var.equals ("POP")) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.PopRule ()); -} else if ($var.startsWith ("+") && (tmp = com.stevesoft.pat.ReplaceRule.defs.get ($var.substring (1))) != null) { -if (Clazz.instanceOf (tmp, com.stevesoft.pat.Regex)) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.PushRule ($var.substring (1), tmp)); -} else if (Clazz.instanceOf (tmp, com.stevesoft.pat.Transformer)) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.PushRule ($var.substring (1), tmp)); -} else { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("${" + $var + "}")); -}} else if ($var.startsWith ("=") && (tmp = com.stevesoft.pat.ReplaceRule.defs.get ($var.substring (1))) != null) { -if (Clazz.instanceOf (tmp, com.stevesoft.pat.Regex)) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.ChangeRule ($var.substring (1), tmp)); -} else if (Clazz.instanceOf (tmp, com.stevesoft.pat.Transformer)) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.ChangeRule ($var.substring (1), tmp)); -} else { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("${" + $var + "}")); -}} else if ((tmp = com.stevesoft.pat.ReplaceRule.defs.get ($var)) != null) { -if (Clazz.instanceOf (tmp, com.stevesoft.pat.ReplaceRule)) { -var alt = (tmp).arg (arg); -if (alt == null) { -alt = (tmp); -}head = com.stevesoft.pat.ReplaceRule.add (head, (alt.clone ())); -}} else { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("${" + $var + "}")); -}} else if (($var = gv.stringMatchedI (7 + off)) != null) { -var c = $var.charAt (0); -if (c == 'n') { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\n")); -} else if (c == 't') { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\t")); -} else if (c == 'r') { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\r")); -} else if (c == 'b') { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\r")); -} else if (c == 'a') { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\u0007")); -} else if (c == 'e') { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\u001b")); -} else if (c == 'f') { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\f")); -}} else if (($var = gv.stringMatchedI (8 + off)) != null) { -var c = $var.charAt (0); -if (c.charCodeAt (0) < com.stevesoft.pat.Ctrl.cmap.length) { -c = com.stevesoft.pat.Ctrl.cmap[c.charCodeAt (0)]; -}head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("" + c)); -} else if (($var = gv.stringMatchedI (9 + off)) != null) { -var d = 16 * com.stevesoft.pat.ReplaceRule.getHexDigit ($var.charAt (0)) + com.stevesoft.pat.ReplaceRule.getHexDigit ($var.charAt (1)); -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("" + String.fromCharCode (d))); -}mt = gv.matchedTo (); -} -if (mt <= s.length) { -head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule (s.substring (mt))); -}return head; -} finally { -} -}, "~S"); -c$.isDefined = Clazz.defineMethod (c$, "isDefined", -function (s) { -return com.stevesoft.pat.ReplaceRule.defs.get (s) != null; -}, "~S"); -c$.define = Clazz.defineMethod (c$, "define", -function (s, r) { -com.stevesoft.pat.ReplaceRule.defs.put (s, r); -}, "~S,com.stevesoft.pat.Regex"); -c$.define = Clazz.defineMethod (c$, "define", -function (s, r) { -com.stevesoft.pat.ReplaceRule.defs.put (s, r); -r.name = s; -}, "~S,com.stevesoft.pat.ReplaceRule"); -c$.define = Clazz.defineMethod (c$, "define", -function (s, t) { -com.stevesoft.pat.ReplaceRule.defs.put (s, t); -}, "~S,com.stevesoft.pat.Transformer"); -c$.undefine = Clazz.defineMethod (c$, "undefine", -function (s) { -com.stevesoft.pat.ReplaceRule.defs.remove (s); -}, "~S"); -Clazz.defineMethod (c$, "toString1", -function () { -return "${" + this.name + "}"; -}); -Clazz.overrideMethod (c$, "toString", -function () { -var sb = new StringBuffer (); -sb.append (this.toString1 ()); -var rr = this.next; -while (rr != null) { -sb.append (rr.toString1 ()); -rr = rr.next; -} -return sb.toString (); -}); -Clazz.defineMethod (c$, "arg", -function (s) { -return null; -}, "~S"); -c$.getHexDigit = Clazz.defineMethod (c$, "getHexDigit", -function (c) { -if (c >= '0' && c <= '9') { -return c.charCodeAt (0) - 48; -}if (c >= 'a' && c <= 'f') { -return c.charCodeAt (0) - 97 + 10; -}return c.charCodeAt (0) - 65 + 10; -}, "~S"); -Clazz.defineStatics (c$, -"getvar", null); -c$.defs = c$.prototype.defs = new java.util.Hashtable (); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["java.util.Hashtable"], "com.stevesoft.pat.ReplaceRule", ["com.stevesoft.pat.Ctrl", "$.Regex", "$.Transformer", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.next = null; +this.name = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "ReplaceRule"); +Clazz.prepareFields (c$, function () { +this.name = this.getClass ().getName (); +}); +Clazz.defineMethod (c$, "clone1", +function () { +return new com.stevesoft.pat.RuleHolder (this); +}); +Clazz.overrideMethod (c$, "clone", +function () { +var x = this.clone1 (); +var xsav = x; +var y = this; +while (y.next != null) { +x.next = y.next.clone1 (); +x.name = y.name; +x = x.next; +y = y.next; +} +return xsav; +}); +c$.add = Clazz.defineMethod (c$, "add", +function (head, adding) { +if (head == null) { +return head = adding; +}head.addRule (adding); +return head; +}, "com.stevesoft.pat.ReplaceRule,com.stevesoft.pat.ReplaceRule"); +Clazz.defineMethod (c$, "add", +function (adding) { +return com.stevesoft.pat.ReplaceRule.add (this, adding); +}, "com.stevesoft.pat.ReplaceRule"); +Clazz.defineMethod (c$, "addRule", +function (r) { +if (this.next == null) { +this.next = r; +} else { +this.next.addRule (r); +}}, "com.stevesoft.pat.ReplaceRule"); +c$.getv = Clazz.defineMethod (c$, "getv", +($fz = function () { +if (com.stevesoft.pat.ReplaceRule.getvar != null) { +return com.stevesoft.pat.ReplaceRule.getvar.clone (); +}com.stevesoft.pat.ReplaceRule.getvar = new com.stevesoft.pat.Regex ("(?:\\\\(\\d+)|\\$(?:(\\d+)|(\\w+)|([&\'`])|\\{(?:(\\d+)|([^\n}\\\\]+))})|\\\\([nrbtaef])|\\\\c([\u0000-\uffff])|\\\\x([A-Fa-f0-9]{2})|\\\\([\u0000-\uffff]))", ""); +com.stevesoft.pat.ReplaceRule.getvar.optimize (); +return com.stevesoft.pat.ReplaceRule.getvar; +}, $fz.isPrivate = true, $fz)); +c$.perlCode = Clazz.defineMethod (c$, "perlCode", +function (s) { +try { +var mf = 0; +var mt = 0; +var gv = com.stevesoft.pat.ReplaceRule.getv (); +var head = null; +var tmp = null; +while (gv.searchFrom (s, mt)) { +var off = com.stevesoft.pat.Regex.BackRefOffset - 1; +mf = gv.matchedFrom (); +if (mf > mt) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule (s.substring (mt, mf))); +}var $var = null; +if (($var = gv.stringMatchedI (1 + off)) != null || ($var = gv.stringMatchedI (2 + off)) != null || ($var = gv.stringMatchedI (5 + off)) != null) { +var d = 0; +for (var i = 0; i < $var.length; i++) { +d = 8 * d + ($var.charCodeAt (i) - 48); +} +if ($var.length == 1) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.BackRefRule (d)); +} else { +head = new com.stevesoft.pat.StringRule ("" + String.fromCharCode (d)); +}} else if (($var = gv.stringMatchedI (10 + off)) != null) { +if ("QELlUu".indexOf ($var) >= 0) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.CodeRule ($var.charAt (0))); +} else { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ($var)); +}} else if (($var = gv.stringMatchedI (3 + off)) != null || ($var = gv.stringMatchedI (4 + off)) != null || ($var = gv.stringMatchedI (6 + off)) != null) { +var arg = ""; +var pc; +if ((pc = $var.indexOf (':')) > 0) { +arg = $var.substring (pc + 1); +$var = $var.substring (0, pc); +}if ($var.equals ("&") || $var.equals ("MATCH")) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.AmpersandRule ()); +} else if ($var.equals ("`") || $var.equals ("PREMATCH")) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.LeftRule ()); +} else if ($var.equals ("'") || $var.equals ("POSTMATCH")) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.RightRule ()); +} else if ($var.equals ("WANT_MORE_TEXT")) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.WantMoreTextReplaceRule ()); +} else if ($var.equals ("POP")) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.PopRule ()); +} else if ($var.startsWith ("+") && (tmp = com.stevesoft.pat.ReplaceRule.defs.get ($var.substring (1))) != null) { +if (Clazz.instanceOf (tmp, com.stevesoft.pat.Regex)) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.PushRule ($var.substring (1), tmp)); +} else if (Clazz.instanceOf (tmp, com.stevesoft.pat.Transformer)) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.PushRule ($var.substring (1), tmp)); +} else { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("${" + $var + "}")); +}} else if ($var.startsWith ("=") && (tmp = com.stevesoft.pat.ReplaceRule.defs.get ($var.substring (1))) != null) { +if (Clazz.instanceOf (tmp, com.stevesoft.pat.Regex)) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.ChangeRule ($var.substring (1), tmp)); +} else if (Clazz.instanceOf (tmp, com.stevesoft.pat.Transformer)) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.ChangeRule ($var.substring (1), tmp)); +} else { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("${" + $var + "}")); +}} else if ((tmp = com.stevesoft.pat.ReplaceRule.defs.get ($var)) != null) { +if (Clazz.instanceOf (tmp, com.stevesoft.pat.ReplaceRule)) { +var alt = (tmp).arg (arg); +if (alt == null) { +alt = (tmp); +}head = com.stevesoft.pat.ReplaceRule.add (head, (alt.clone ())); +}} else { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("${" + $var + "}")); +}} else if (($var = gv.stringMatchedI (7 + off)) != null) { +var c = $var.charAt (0); +if (c == 'n') { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\n")); +} else if (c == 't') { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\t")); +} else if (c == 'r') { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\r")); +} else if (c == 'b') { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\r")); +} else if (c == 'a') { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\u0007")); +} else if (c == 'e') { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\u001b")); +} else if (c == 'f') { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("\f")); +}} else if (($var = gv.stringMatchedI (8 + off)) != null) { +var c = $var.charAt (0); +if (c.charCodeAt (0) < com.stevesoft.pat.Ctrl.cmap.length) { +c = com.stevesoft.pat.Ctrl.cmap[c.charCodeAt (0)]; +}head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("" + c)); +} else if (($var = gv.stringMatchedI (9 + off)) != null) { +var d = 16 * com.stevesoft.pat.ReplaceRule.getHexDigit ($var.charAt (0)) + com.stevesoft.pat.ReplaceRule.getHexDigit ($var.charAt (1)); +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule ("" + String.fromCharCode (d))); +}mt = gv.matchedTo (); +} +if (mt <= s.length) { +head = com.stevesoft.pat.ReplaceRule.add (head, new com.stevesoft.pat.StringRule (s.substring (mt))); +}return head; +} finally { +} +}, "~S"); +c$.isDefined = Clazz.defineMethod (c$, "isDefined", +function (s) { +return com.stevesoft.pat.ReplaceRule.defs.get (s) != null; +}, "~S"); +c$.define = Clazz.defineMethod (c$, "define", +function (s, r) { +com.stevesoft.pat.ReplaceRule.defs.put (s, r); +}, "~S,com.stevesoft.pat.Regex"); +c$.define = Clazz.defineMethod (c$, "define", +function (s, r) { +com.stevesoft.pat.ReplaceRule.defs.put (s, r); +r.name = s; +}, "~S,com.stevesoft.pat.ReplaceRule"); +c$.define = Clazz.defineMethod (c$, "define", +function (s, t) { +com.stevesoft.pat.ReplaceRule.defs.put (s, t); +}, "~S,com.stevesoft.pat.Transformer"); +c$.undefine = Clazz.defineMethod (c$, "undefine", +function (s) { +com.stevesoft.pat.ReplaceRule.defs.remove (s); +}, "~S"); +Clazz.defineMethod (c$, "toString1", +function () { +return "${" + this.name + "}"; +}); +Clazz.overrideMethod (c$, "toString", +function () { +var sb = new StringBuffer (); +sb.append (this.toString1 ()); +var rr = this.next; +while (rr != null) { +sb.append (rr.toString1 ()); +rr = rr.next; +} +return sb.toString (); +}); +Clazz.defineMethod (c$, "arg", +function (s) { +return null; +}, "~S"); +c$.getHexDigit = Clazz.defineMethod (c$, "getHexDigit", +function (c) { +if (c >= '0' && c <= '9') { +return c.charCodeAt (0) - 48; +}if (c >= 'a' && c <= 'f') { +return c.charCodeAt (0) - 97 + 10; +}return c.charCodeAt (0) - 65 + 10; +}, "~S"); +Clazz.defineStatics (c$, +"getvar", null); +c$.defs = c$.prototype.defs = new java.util.Hashtable (); +}); diff --git a/bin/com/stevesoft/pat/Replacer.class b/bin/com/stevesoft/pat/Replacer.class index 331ff3b10d722b7c8c5347972b3a5d7c1ca4b49b..813f56fef09ba5004f6ed143aa2f8eafe6160826 100644 GIT binary patch delta 56 zcmdmQzR!Ha6H!Lv%}+(Sm{c?vc!d~5rT#MTGBS$%XW(XFWoKYyXQ*UnC;(Cg3=A6j L@|#5@Rx<+tk%bGz delta 57 zcmdmIzTbSq6H!K!%}+(Sm{c_x_=FflrT#MTGBS$%XW(XFWoKYyXQ*UnC;(Cg3=A6j MGEAF=B~~*70GwP4#{d8T diff --git a/bin/com/stevesoft/pat/Replacer.js b/bin/com/stevesoft/pat/Replacer.js index 847b11c..996de92 100644 --- a/bin/com/stevesoft/pat/Replacer.js +++ b/bin/com/stevesoft/pat/Replacer.js @@ -1,230 +1,230 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, ["com.stevesoft.pat.RegHolder", "$.Replacer", "$.CodeVal"], ["com.stevesoft.pat.AmpersandRule", "$.ChangeRule", "$.MessageManager", "$.PopRule", "$.PushRule", "$.RuleHolder", "$.SpecialRule", "$.StringBufferLike", "$.WantMoreTextReplaceRule", "com.stevesoft.pat.wrap.StringWrap", "java.lang.NullPointerException"], function () { -c$ = Clazz.decorateAsClass (function () { -this.me = null; -this.prev = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "RegHolder"); -c$ = Clazz.decorateAsClass (function () { -this.pos = 0; -this.code = '\0'; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "CodeVal"); -Clazz.makeConstructor (c$, -function (p, c) { -this.pos = p; -this.code = c; -}, "~N,~S"); -Clazz.overrideMethod (c$, "toString", -function () { -return "(" + this.pos + "," + this.code + ")"; -}); -c$ = Clazz.decorateAsClass (function () { -this.first = false; -this.rh = null; -this.sb = null; -this.src = null; -this.pos = 0; -this.want_more_text = false; -this.want_more_text_enable = false; -this.$lastMatchedTo = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Replacer"); -Clazz.prepareFields (c$, function () { -this.rh = new com.stevesoft.pat.RegHolder (); -}); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "replaceFirstRegion", -function (s, r, start, end) { -return this.replaceFirstRegion ( new com.stevesoft.pat.wrap.StringWrap (s), r, start, end); -}, "~S,com.stevesoft.pat.Regex,~N,~N"); -Clazz.defineMethod (c$, "replaceFirstRegion", -function (s, r, start, end) { -this.first = true; -this.rh.me = r; -this.rh.prev = null; -return this.dorep (s, start, end); -}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Regex,~N,~N"); -Clazz.defineMethod (c$, "replaceFirst", -function (s) { -return this.replaceFirstRegion (s, 0, s.length ()); -}, "com.stevesoft.pat.StringLike"); -Clazz.defineMethod (c$, "replaceFirstFrom", -function (s, start) { -return this.replaceFirstRegion (s, start, s.length ()); -}, "com.stevesoft.pat.StringLike,~N"); -Clazz.defineMethod (c$, "replaceFirstRegion", -function (s, start, end) { -this.first = true; -return this.dorep (s, start, end); -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "replaceAllRegion", -function (s, r, start, end) { -return this.replaceAllRegion ( new com.stevesoft.pat.wrap.StringWrap (s), r, start, end); -}, "~S,com.stevesoft.pat.Regex,~N,~N"); -Clazz.defineMethod (c$, "replaceAllRegion", -function (s, r, start, end) { -this.first = false; -this.rh.me = r; -this.rh.prev = null; -return this.dorep (s, start, end); -}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Regex,~N,~N"); -Clazz.defineMethod (c$, "replaceAll", -function (s) { -return this.replaceAllRegion (s, 0, s.length ()); -}, "com.stevesoft.pat.StringLike"); -Clazz.defineMethod (c$, "replaceAllFrom", -function (s, start) { -return this.replaceAllRegion (s, start, s.length ()); -}, "com.stevesoft.pat.StringLike,~N"); -Clazz.defineMethod (c$, "replaceAllRegion", -function (s, start, end) { -this.first = false; -return this.dorep (s, start, end); -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "replaceAll", -function (s) { -return this.replaceAllRegion ( new com.stevesoft.pat.wrap.StringWrap (s), 0, s.length).toString (); -}, "~S"); -Clazz.defineMethod (c$, "replaceAllFrom", -function (s, start) { -return this.replaceAllRegion ( new com.stevesoft.pat.wrap.StringWrap (s), start, s.length).toString (); -}, "~S,~N"); -Clazz.defineMethod (c$, "replaceAllRegion", -function (s, start, end) { -this.first = false; -return this.dorep ( new com.stevesoft.pat.wrap.StringWrap (s), start, end).toString (); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "isSpecial", -function (x) { -while (x != null) { -if (Clazz.instanceOf (x, com.stevesoft.pat.SpecialRule) || (Clazz.instanceOf (x, com.stevesoft.pat.RuleHolder) && Clazz.instanceOf ((x).held, com.stevesoft.pat.SpecialRule))) { -return true; -}x = x.next; -} -return false; -}, "com.stevesoft.pat.ReplaceRule"); -Clazz.defineMethod (c$, "apply1", -function (rr) { -rr.charsMatched_++; -this.apply (rr, null); -rr.charsMatched_--; -}, "com.stevesoft.pat.RegRes"); -Clazz.defineMethod (c$, "dorep", -function (s, start, end) { -var ret = s; -this.want_more_text = false; -this.$lastMatchedTo = 0; -if (this.rh.me == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.replace_null_regex_pointer")); -}if (this.rh.me._searchLike (s, start, end)) { -var rmn = this.rh.me.matchedTo (); -if (this.rh.me.charsMatched () == 0 && !this.isSpecial (this.rh.me.getReplaceRule ())) { -this.apply1 (this.rh.me); -rmn++; -}this.apply (this.rh.me); -if (!this.first) { -for (var i = rmn; !this.want_more_text && this.rh.me._searchLike (s, i, end); i = rmn) { -rmn = this.rh.me.matchedTo (); -if (this.rh.me.charsMatched () == 0) { -if (!this.isSpecial (this.rh.me.getReplaceRule ())) { -this.apply1 (this.rh.me); -}rmn++; -}this.apply (this.rh.me); -} -}ret = this.finish (); -ret = ret == null ? s : ret; -}return ret; -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "apply", -function (r, rp) { -if (rp == null || (rp.next == null && Clazz.instanceOf (rp, com.stevesoft.pat.AmpersandRule))) { -return; -}if (r.didMatch ()) { -if (this.src == null) { -this.src = r.getStringLike (); -}if (this.sb == null) { -this.sb = new com.stevesoft.pat.StringBufferLike (this.src.newStringBufferLike ()); -}var rmf = r.matchedFrom (); -for (var ii = this.pos; ii < rmf; ii++) { -this.sb.appendC (this.src.charAt (ii)); -} -for (var x = rp; x != null; x = x.next) { -x.apply (this.sb, r); -if (Clazz.instanceOf (x, com.stevesoft.pat.SpecialRule)) { -if (Clazz.instanceOf (x, com.stevesoft.pat.WantMoreTextReplaceRule) && this.want_more_text_enable) { -this.want_more_text = true; -} else if (Clazz.instanceOf (x, com.stevesoft.pat.PushRule)) { -var rh2 = new com.stevesoft.pat.RegHolder (); -rh2.me = (x).NewRule; -rh2.prev = this.rh; -this.rh = rh2; -} else if (Clazz.instanceOf (x, com.stevesoft.pat.PopRule)) { -if (this.rh.prev != null) { -this.rh = this.rh.prev; -}} else if (Clazz.instanceOf (x, com.stevesoft.pat.ChangeRule)) { -this.rh.me = (x).NewRule; -}}} -if (!this.want_more_text) { -this.pos = r.matchedTo (); -}}}, "com.stevesoft.pat.RegRes,com.stevesoft.pat.ReplaceRule"); -Clazz.defineMethod (c$, "WantMoreText", -function () { -return this.want_more_text; -}); -Clazz.defineMethod (c$, "apply", -function (r) { -this.apply (r, r.getReplaceRule ()); -}, "com.stevesoft.pat.Regex"); -Clazz.defineMethod (c$, "finish", -function () { -if (this.src == null) { -return null; -}var s_end = this.src.length (); -for (var ii = this.pos; ii < s_end; ii++) { -this.sb.appendC (this.src.charAt (ii)); -} -this.src = null; -this.$lastMatchedTo = this.pos; -this.pos = 0; -var retstr = this.sb.toStringLike (); -this.sb = null; -return retstr; -}); -Clazz.overrideMethod (c$, "clone", -function () { -var r = new com.stevesoft.pat.Replacer (); -r.first = this.first; -r.src = this.src; -r.sb = this.sb; -r.pos = this.pos; -r.$lastMatchedTo = this.$lastMatchedTo; -r.want_more_text = this.want_more_text; -r.want_more_text_enable = this.want_more_text_enable; -r.rh.me = this.rh.me; -r.rh.prev = this.rh.prev; -return r; -}); -Clazz.defineMethod (c$, "lastMatchedTo", -function () { -return this.$lastMatchedTo; -}); -Clazz.defineMethod (c$, "getRegex", -function () { -return this.rh.me; -}); -Clazz.defineMethod (c$, "setSource", -function (sl) { -this.src = sl; -}, "com.stevesoft.pat.StringLike"); -Clazz.defineMethod (c$, "setBuffer", -function (sbl) { -this.sb = sbl; -}, "com.stevesoft.pat.StringBufferLike"); -Clazz.defineMethod (c$, "setPos", -function (pos) { -this.pos = pos; -}, "~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, ["com.stevesoft.pat.RegHolder", "$.Replacer", "$.CodeVal"], ["com.stevesoft.pat.AmpersandRule", "$.ChangeRule", "$.MessageManager", "$.PopRule", "$.PushRule", "$.RuleHolder", "$.SpecialRule", "$.StringBufferLike", "$.WantMoreTextReplaceRule", "com.stevesoft.pat.wrap.StringWrap", "java.lang.NullPointerException"], function () { +c$ = Clazz.decorateAsClass (function () { +this.me = null; +this.prev = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RegHolder"); +c$ = Clazz.decorateAsClass (function () { +this.pos = 0; +this.code = '\0'; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "CodeVal"); +Clazz.makeConstructor (c$, +function (p, c) { +this.pos = p; +this.code = c; +}, "~N,~S"); +Clazz.overrideMethod (c$, "toString", +function () { +return "(" + this.pos + "," + this.code + ")"; +}); +c$ = Clazz.decorateAsClass (function () { +this.first = false; +this.rh = null; +this.sb = null; +this.src = null; +this.pos = 0; +this.want_more_text = false; +this.want_more_text_enable = false; +this.$lastMatchedTo = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Replacer"); +Clazz.prepareFields (c$, function () { +this.rh = new com.stevesoft.pat.RegHolder (); +}); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "replaceFirstRegion", +function (s, r, start, end) { +return this.replaceFirstRegion ( new com.stevesoft.pat.wrap.StringWrap (s), r, start, end); +}, "~S,com.stevesoft.pat.Regex,~N,~N"); +Clazz.defineMethod (c$, "replaceFirstRegion", +function (s, r, start, end) { +this.first = true; +this.rh.me = r; +this.rh.prev = null; +return this.dorep (s, start, end); +}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Regex,~N,~N"); +Clazz.defineMethod (c$, "replaceFirst", +function (s) { +return this.replaceFirstRegion (s, 0, s.length ()); +}, "com.stevesoft.pat.StringLike"); +Clazz.defineMethod (c$, "replaceFirstFrom", +function (s, start) { +return this.replaceFirstRegion (s, start, s.length ()); +}, "com.stevesoft.pat.StringLike,~N"); +Clazz.defineMethod (c$, "replaceFirstRegion", +function (s, start, end) { +this.first = true; +return this.dorep (s, start, end); +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "replaceAllRegion", +function (s, r, start, end) { +return this.replaceAllRegion ( new com.stevesoft.pat.wrap.StringWrap (s), r, start, end); +}, "~S,com.stevesoft.pat.Regex,~N,~N"); +Clazz.defineMethod (c$, "replaceAllRegion", +function (s, r, start, end) { +this.first = false; +this.rh.me = r; +this.rh.prev = null; +return this.dorep (s, start, end); +}, "com.stevesoft.pat.StringLike,com.stevesoft.pat.Regex,~N,~N"); +Clazz.defineMethod (c$, "replaceAll", +function (s) { +return this.replaceAllRegion (s, 0, s.length ()); +}, "com.stevesoft.pat.StringLike"); +Clazz.defineMethod (c$, "replaceAllFrom", +function (s, start) { +return this.replaceAllRegion (s, start, s.length ()); +}, "com.stevesoft.pat.StringLike,~N"); +Clazz.defineMethod (c$, "replaceAllRegion", +function (s, start, end) { +this.first = false; +return this.dorep (s, start, end); +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "replaceAll", +function (s) { +return this.replaceAllRegion ( new com.stevesoft.pat.wrap.StringWrap (s), 0, s.length).toString (); +}, "~S"); +Clazz.defineMethod (c$, "replaceAllFrom", +function (s, start) { +return this.replaceAllRegion ( new com.stevesoft.pat.wrap.StringWrap (s), start, s.length).toString (); +}, "~S,~N"); +Clazz.defineMethod (c$, "replaceAllRegion", +function (s, start, end) { +this.first = false; +return this.dorep ( new com.stevesoft.pat.wrap.StringWrap (s), start, end).toString (); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "isSpecial", +function (x) { +while (x != null) { +if (Clazz.instanceOf (x, com.stevesoft.pat.SpecialRule) || (Clazz.instanceOf (x, com.stevesoft.pat.RuleHolder) && Clazz.instanceOf ((x).held, com.stevesoft.pat.SpecialRule))) { +return true; +}x = x.next; +} +return false; +}, "com.stevesoft.pat.ReplaceRule"); +Clazz.defineMethod (c$, "apply1", +function (rr) { +rr.charsMatched_++; +this.apply (rr, null); +rr.charsMatched_--; +}, "com.stevesoft.pat.RegRes"); +Clazz.defineMethod (c$, "dorep", +function (s, start, end) { +var ret = s; +this.want_more_text = false; +this.$lastMatchedTo = 0; +if (this.rh.me == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.getString ("exception.replace_null_regex_pointer")); +}if (this.rh.me._searchLike (s, start, end)) { +var rmn = this.rh.me.matchedTo (); +if (this.rh.me.charsMatched () == 0 && !this.isSpecial (this.rh.me.getReplaceRule ())) { +this.apply1 (this.rh.me); +rmn++; +}this.apply (this.rh.me); +if (!this.first) { +for (var i = rmn; !this.want_more_text && this.rh.me._searchLike (s, i, end); i = rmn) { +rmn = this.rh.me.matchedTo (); +if (this.rh.me.charsMatched () == 0) { +if (!this.isSpecial (this.rh.me.getReplaceRule ())) { +this.apply1 (this.rh.me); +}rmn++; +}this.apply (this.rh.me); +} +}ret = this.finish (); +ret = ret == null ? s : ret; +}return ret; +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "apply", +function (r, rp) { +if (rp == null || (rp.next == null && Clazz.instanceOf (rp, com.stevesoft.pat.AmpersandRule))) { +return; +}if (r.didMatch ()) { +if (this.src == null) { +this.src = r.getStringLike (); +}if (this.sb == null) { +this.sb = new com.stevesoft.pat.StringBufferLike (this.src.newStringBufferLike ()); +}var rmf = r.matchedFrom (); +for (var ii = this.pos; ii < rmf; ii++) { +this.sb.appendC (this.src.charAt (ii)); +} +for (var x = rp; x != null; x = x.next) { +x.apply (this.sb, r); +if (Clazz.instanceOf (x, com.stevesoft.pat.SpecialRule)) { +if (Clazz.instanceOf (x, com.stevesoft.pat.WantMoreTextReplaceRule) && this.want_more_text_enable) { +this.want_more_text = true; +} else if (Clazz.instanceOf (x, com.stevesoft.pat.PushRule)) { +var rh2 = new com.stevesoft.pat.RegHolder (); +rh2.me = (x).NewRule; +rh2.prev = this.rh; +this.rh = rh2; +} else if (Clazz.instanceOf (x, com.stevesoft.pat.PopRule)) { +if (this.rh.prev != null) { +this.rh = this.rh.prev; +}} else if (Clazz.instanceOf (x, com.stevesoft.pat.ChangeRule)) { +this.rh.me = (x).NewRule; +}}} +if (!this.want_more_text) { +this.pos = r.matchedTo (); +}}}, "com.stevesoft.pat.RegRes,com.stevesoft.pat.ReplaceRule"); +Clazz.defineMethod (c$, "WantMoreText", +function () { +return this.want_more_text; +}); +Clazz.defineMethod (c$, "apply", +function (r) { +this.apply (r, r.getReplaceRule ()); +}, "com.stevesoft.pat.Regex"); +Clazz.defineMethod (c$, "finish", +function () { +if (this.src == null) { +return null; +}var s_end = this.src.length (); +for (var ii = this.pos; ii < s_end; ii++) { +this.sb.appendC (this.src.charAt (ii)); +} +this.src = null; +this.$lastMatchedTo = this.pos; +this.pos = 0; +var retstr = this.sb.toStringLike (); +this.sb = null; +return retstr; +}); +Clazz.overrideMethod (c$, "clone", +function () { +var r = new com.stevesoft.pat.Replacer (); +r.first = this.first; +r.src = this.src; +r.sb = this.sb; +r.pos = this.pos; +r.$lastMatchedTo = this.$lastMatchedTo; +r.want_more_text = this.want_more_text; +r.want_more_text_enable = this.want_more_text_enable; +r.rh.me = this.rh.me; +r.rh.prev = this.rh.prev; +return r; +}); +Clazz.defineMethod (c$, "lastMatchedTo", +function () { +return this.$lastMatchedTo; +}); +Clazz.defineMethod (c$, "getRegex", +function () { +return this.rh.me; +}); +Clazz.defineMethod (c$, "setSource", +function (sl) { +this.src = sl; +}, "com.stevesoft.pat.StringLike"); +Clazz.defineMethod (c$, "setBuffer", +function (sbl) { +this.sb = sbl; +}, "com.stevesoft.pat.StringBufferLike"); +Clazz.defineMethod (c$, "setPos", +function (pos) { +this.pos = pos; +}, "~N"); +}); diff --git a/bin/com/stevesoft/pat/RightRule.js b/bin/com/stevesoft/pat/RightRule.js index 60fa08d..ab453dd 100644 --- a/bin/com/stevesoft/pat/RightRule.js +++ b/bin/com/stevesoft/pat/RightRule.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.RightRule", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "RightRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.RightRule, []); -}); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -sb.append (res.right ()); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return "$'"; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.RightRule", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "RightRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.RightRule, []); +}); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +sb.append (res.right ()); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return "$'"; +}); +}); diff --git a/bin/com/stevesoft/pat/Rthings.js b/bin/com/stevesoft/pat/Rthings.js index c9c902e..66f9c83 100644 --- a/bin/com/stevesoft/pat/Rthings.js +++ b/bin/com/stevesoft/pat/Rthings.js @@ -1,35 +1,35 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Regex"], "com.stevesoft.pat.Rthings", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.val = 0; -this.ignoreCase = false; -this.dontMatchInQuotes = false; -this.optimizeMe = false; -this.noBackRefs = false; -this.parenLevel = 0; -this.gFlag = false; -this.mFlag = false; -this.sFlag = false; -this.p = null; -this.o = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Rthings"); -Clazz.prepareFields (c$, function () { -this.val = com.stevesoft.pat.Regex.BackRefOffset; -}); -Clazz.makeConstructor (c$, -function (r) { -this.ignoreCase = r.ignoreCase; -this.dontMatchInQuotes = r.dontMatchInQuotes; -}, "com.stevesoft.pat.Regex"); -Clazz.defineMethod (c$, "set", -function (r) { -r.gFlag = this.gFlag; -r.mFlag = this.mFlag; -r.sFlag = this.sFlag; -r.ignoreCase = this.ignoreCase; -r.dontMatchInQuotes = this.dontMatchInQuotes; -if (this.optimizeMe) { -r.optimize (); -}}, "com.stevesoft.pat.Regex"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Regex"], "com.stevesoft.pat.Rthings", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.val = 0; +this.ignoreCase = false; +this.dontMatchInQuotes = false; +this.optimizeMe = false; +this.noBackRefs = false; +this.parenLevel = 0; +this.gFlag = false; +this.mFlag = false; +this.sFlag = false; +this.p = null; +this.o = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Rthings"); +Clazz.prepareFields (c$, function () { +this.val = com.stevesoft.pat.Regex.BackRefOffset; +}); +Clazz.makeConstructor (c$, +function (r) { +this.ignoreCase = r.ignoreCase; +this.dontMatchInQuotes = r.dontMatchInQuotes; +}, "com.stevesoft.pat.Regex"); +Clazz.defineMethod (c$, "set", +function (r) { +r.gFlag = this.gFlag; +r.mFlag = this.mFlag; +r.sFlag = this.sFlag; +r.ignoreCase = this.ignoreCase; +r.dontMatchInQuotes = this.dontMatchInQuotes; +if (this.optimizeMe) { +r.optimize (); +}}, "com.stevesoft.pat.Regex"); +}); diff --git a/bin/com/stevesoft/pat/RuleHolder.js b/bin/com/stevesoft/pat/RuleHolder.js index a628201..6924899 100644 --- a/bin/com/stevesoft/pat/RuleHolder.js +++ b/bin/com/stevesoft/pat/RuleHolder.js @@ -1,32 +1,32 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.RuleHolder", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.held = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "RuleHolder", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.RuleHolder, []); -}); -Clazz.makeConstructor (c$, -function (h) { -Clazz.superConstructor (this, com.stevesoft.pat.RuleHolder, []); -this.held = h; -}, "com.stevesoft.pat.ReplaceRule"); -Clazz.overrideMethod (c$, "clone1", -function () { -return new com.stevesoft.pat.RuleHolder (this.held); -}); -Clazz.defineMethod (c$, "toString1", -function () { -return this.held.toString1 (); -}); -Clazz.defineMethod (c$, "apply", -function (sb, rr) { -this.held.apply (sb, rr); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.defineMethod (c$, "arg", -function (s) { -return new com.stevesoft.pat.RuleHolder (this.held.arg (s)); -}, "~S"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.RuleHolder", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.held = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "RuleHolder", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.RuleHolder, []); +}); +Clazz.makeConstructor (c$, +function (h) { +Clazz.superConstructor (this, com.stevesoft.pat.RuleHolder, []); +this.held = h; +}, "com.stevesoft.pat.ReplaceRule"); +Clazz.overrideMethod (c$, "clone1", +function () { +return new com.stevesoft.pat.RuleHolder (this.held); +}); +Clazz.defineMethod (c$, "toString1", +function () { +return this.held.toString1 (); +}); +Clazz.defineMethod (c$, "apply", +function (sb, rr) { +this.held.apply (sb, rr); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.defineMethod (c$, "arg", +function (s) { +return new com.stevesoft.pat.RuleHolder (this.held.arg (s)); +}, "~S"); +}); diff --git a/bin/com/stevesoft/pat/Skip.js b/bin/com/stevesoft/pat/Skip.js index bdf02e4..6dd2756 100644 --- a/bin/com/stevesoft/pat/Skip.js +++ b/bin/com/stevesoft/pat/Skip.js @@ -1,108 +1,108 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.Skip", ["com.stevesoft.pat.CaseMgr", "$.Or", "$.Skipped", "$.oneChar", "java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.src = null; -this.c = 0; -this.mask = 0; -this.$offset = 0; -this.ign = false; -this.m1 = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Skip"); -c$.mkmask = Clazz.defineMethod (c$, "mkmask", -function (c) { -var x = String.fromCharCode (c); -return ~((com.stevesoft.pat.CaseMgr.toUpperCaseC (x)).charCodeAt (0) | (com.stevesoft.pat.CaseMgr.toLowerCaseC (x)).charCodeAt (0) | (com.stevesoft.pat.CaseMgr.toTitleCaseC (x)).charCodeAt (0)); -}, "~N"); -c$.string = Clazz.defineMethod (c$, "string", -function (r) { -return r.skipper == null ? null : r.skipper.src; -}, "com.stevesoft.pat.Regex"); -c$.offset = Clazz.defineMethod (c$, "offset", -function (r) { -return r.skipper == null ? -1 : r.skipper.$offset; -}, "com.stevesoft.pat.Regex"); -Clazz.makeConstructor (c$, -function (s, ign, o) { -this.src = s; -this.c = s.charCodeAt (0); -if (ign) { -this.mask = com.stevesoft.pat.Skip.mkmask (this.c); -} else { -this.mask = 0; -}this.$offset = o; -this.ign = ign; -this.m1 = (s.length == 1); -}, "~S,~B,~N"); -Clazz.defineMethod (c$, "find", -function (s) { -return this.find (s, 0, s.length ()); -}, "com.stevesoft.pat.StringLike"); -c$.min = Clazz.defineMethod (c$, "min", -function (a, b) { -return a < b ? a : b; -}, "~N,~N"); -Clazz.defineMethod (c$, "find", -function (s, start, end) { -if (start > end) { -return -1; -}start += this.$offset; -var vend = com.stevesoft.pat.Skip.min (s.length () - 1, end + this.$offset); -if (this.mask != this.c) { -for (var i = start; i <= vend; i++) { -if (0 == (s.charCodeAt (i) & this.mask)) { -if (this.m1 || com.stevesoft.pat.CaseMgr.regionMatchesLike2 (s, this.ign, i, this.src, 0, this.src.length)) { -return i - this.$offset; -}}} -} else { -for (var i = start; i <= vend; i++) { -if (this.c == s.charCodeAt (i)) { -if (this.m1 || com.stevesoft.pat.CaseMgr.regionMatchesLike2 (s, this.ign, i, this.src, 0, this.src.length)) { -return i - this.$offset; -}}} -}return -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -c$.findSkipRegex = Clazz.defineMethod (c$, "findSkipRegex", -function (r) { -return com.stevesoft.pat.Skip.findSkip (r.thePattern, r.ignoreCase, !r.dontMatchInQuotes); -}, "com.stevesoft.pat.Regex"); -c$.findSkip = Clazz.defineMethod (c$, "findSkip", -function (p, ignoreCase, trnc) { -var sb = new StringBuffer (); -var subsk = null; -var offset = 0; -var skipc = -1; -var skipoff = 0; -for (; p != null; p = p.next) { -if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar)) { -skipc = ((p).c).charCodeAt (0); -skipoff = offset; -}if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar) && Clazz.instanceOf (p.next, com.stevesoft.pat.oneChar)) { -var psav = p; -sb.append ((p).c); -while (Clazz.instanceOf (p.next, com.stevesoft.pat.oneChar)) { -sb.append ((p.next).c); -p = p.next; -} -var st = sb.toString (); -var sk = null; -if (st.length > 2) { -sk = new com.stevesoft.pat.SkipBMH (st, ignoreCase, offset); -} else { -sk = new com.stevesoft.pat.Skip2 (st, ignoreCase, offset); -}if (trnc && st.length > 2) { -psav.next = new com.stevesoft.pat.Skipped (st.substring (1)); -psav.next.next = p.next; -psav.next.parent = p.parent; -}return sk; -} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or) && (p).v.size () == 1 && !(p).leftForm ().equals ("(?!") && null != (subsk = com.stevesoft.pat.Skip.findSkip ((p).v.elementAt (0), ignoreCase, trnc))) { -subsk.$offset += offset; -return subsk; -} else if (p.minChars ().equals (p.maxChars ())) { -offset += p.minChars ().intValue (); -} else { -return skipc < 0 ? null : new com.stevesoft.pat.Skip ("" + String.fromCharCode (skipc), ignoreCase, skipoff); -}} -return null; -}, "com.stevesoft.pat.Pattern,~B,~B"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.Skip", ["com.stevesoft.pat.CaseMgr", "$.Or", "$.Skipped", "$.oneChar", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.src = null; +this.c = 0; +this.mask = 0; +this.$offset = 0; +this.ign = false; +this.m1 = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Skip"); +c$.mkmask = Clazz.defineMethod (c$, "mkmask", +function (c) { +var x = String.fromCharCode (c); +return ~((com.stevesoft.pat.CaseMgr.toUpperCaseC (x)).charCodeAt (0) | (com.stevesoft.pat.CaseMgr.toLowerCaseC (x)).charCodeAt (0) | (com.stevesoft.pat.CaseMgr.toTitleCaseC (x)).charCodeAt (0)); +}, "~N"); +c$.string = Clazz.defineMethod (c$, "string", +function (r) { +return r.skipper == null ? null : r.skipper.src; +}, "com.stevesoft.pat.Regex"); +c$.offset = Clazz.defineMethod (c$, "offset", +function (r) { +return r.skipper == null ? -1 : r.skipper.$offset; +}, "com.stevesoft.pat.Regex"); +Clazz.makeConstructor (c$, +function (s, ign, o) { +this.src = s; +this.c = s.charCodeAt (0); +if (ign) { +this.mask = com.stevesoft.pat.Skip.mkmask (this.c); +} else { +this.mask = 0; +}this.$offset = o; +this.ign = ign; +this.m1 = (s.length == 1); +}, "~S,~B,~N"); +Clazz.defineMethod (c$, "find", +function (s) { +return this.find (s, 0, s.length ()); +}, "com.stevesoft.pat.StringLike"); +c$.min = Clazz.defineMethod (c$, "min", +function (a, b) { +return a < b ? a : b; +}, "~N,~N"); +Clazz.defineMethod (c$, "find", +function (s, start, end) { +if (start > end) { +return -1; +}start += this.$offset; +var vend = com.stevesoft.pat.Skip.min (s.length () - 1, end + this.$offset); +if (this.mask != this.c) { +for (var i = start; i <= vend; i++) { +if (0 == (s.charCodeAt (i) & this.mask)) { +if (this.m1 || com.stevesoft.pat.CaseMgr.regionMatchesLike2 (s, this.ign, i, this.src, 0, this.src.length)) { +return i - this.$offset; +}}} +} else { +for (var i = start; i <= vend; i++) { +if (this.c == s.charCodeAt (i)) { +if (this.m1 || com.stevesoft.pat.CaseMgr.regionMatchesLike2 (s, this.ign, i, this.src, 0, this.src.length)) { +return i - this.$offset; +}}} +}return -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +c$.findSkipRegex = Clazz.defineMethod (c$, "findSkipRegex", +function (r) { +return com.stevesoft.pat.Skip.findSkip (r.thePattern, r.ignoreCase, !r.dontMatchInQuotes); +}, "com.stevesoft.pat.Regex"); +c$.findSkip = Clazz.defineMethod (c$, "findSkip", +function (p, ignoreCase, trnc) { +var sb = new StringBuffer (); +var subsk = null; +var offset = 0; +var skipc = -1; +var skipoff = 0; +for (; p != null; p = p.next) { +if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar)) { +skipc = ((p).c).charCodeAt (0); +skipoff = offset; +}if (Clazz.instanceOf (p, com.stevesoft.pat.oneChar) && Clazz.instanceOf (p.next, com.stevesoft.pat.oneChar)) { +var psav = p; +sb.append ((p).c); +while (Clazz.instanceOf (p.next, com.stevesoft.pat.oneChar)) { +sb.append ((p.next).c); +p = p.next; +} +var st = sb.toString (); +var sk = null; +if (st.length > 2) { +sk = new com.stevesoft.pat.SkipBMH (st, ignoreCase, offset); +} else { +sk = new com.stevesoft.pat.Skip2 (st, ignoreCase, offset); +}if (trnc && st.length > 2) { +psav.next = new com.stevesoft.pat.Skipped (st.substring (1)); +psav.next.next = p.next; +psav.next.parent = p.parent; +}return sk; +} else if (Clazz.instanceOf (p, com.stevesoft.pat.Or) && (p).v.size () == 1 && !(p).leftForm ().equals ("(?!") && null != (subsk = com.stevesoft.pat.Skip.findSkip ((p).v.elementAt (0), ignoreCase, trnc))) { +subsk.$offset += offset; +return subsk; +} else if (p.minChars ().equals (p.maxChars ())) { +offset += p.minChars ().intValue (); +} else { +return skipc < 0 ? null : new com.stevesoft.pat.Skip ("" + String.fromCharCode (skipc), ignoreCase, skipoff); +}} +return null; +}, "com.stevesoft.pat.Pattern,~B,~B"); +}); diff --git a/bin/com/stevesoft/pat/Skip2.js b/bin/com/stevesoft/pat/Skip2.js index c06b56e..e69b45e 100644 --- a/bin/com/stevesoft/pat/Skip2.js +++ b/bin/com/stevesoft/pat/Skip2.js @@ -1,31 +1,31 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Skip"], "com.stevesoft.pat.Skip2", ["com.stevesoft.pat.CaseMgr"], function () { -c$ = Clazz.decorateAsClass (function () { -this.c1 = 0; -this.mask1 = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Skip2", com.stevesoft.pat.Skip); -Clazz.makeConstructor (c$, -function (s, ign, offset) { -Clazz.superConstructor (this, com.stevesoft.pat.Skip2, [s, ign, offset]); -this.c1 = s.charCodeAt (1); -this.m1 = 2 == s.length; -if (ign) { -this.mask1 = com.stevesoft.pat.Skip.mkmask (this.c1); -} else { -this.mask1 = 0; -}}, "~S,~B,~N"); -Clazz.defineMethod (c$, "find", -function (s, start, end) { -if (start > end) { -return -1; -}start += this.$offset; -var vend = com.stevesoft.pat.Skip.min (s.length () - 2, end + this.$offset); -for (var i = start; i <= vend; i++) { -if (0 == (s.charCodeAt (i) & this.mask) && 0 == (s.charCodeAt (i + 1) & this.mask1)) { -if (this.m1 || com.stevesoft.pat.CaseMgr.regionMatchesLike2 (s, this.ign, i, this.src, 0, this.src.length)) { -return i - this.$offset; -}}} -return -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Skip"], "com.stevesoft.pat.Skip2", ["com.stevesoft.pat.CaseMgr"], function () { +c$ = Clazz.decorateAsClass (function () { +this.c1 = 0; +this.mask1 = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Skip2", com.stevesoft.pat.Skip); +Clazz.makeConstructor (c$, +function (s, ign, offset) { +Clazz.superConstructor (this, com.stevesoft.pat.Skip2, [s, ign, offset]); +this.c1 = s.charCodeAt (1); +this.m1 = 2 == s.length; +if (ign) { +this.mask1 = com.stevesoft.pat.Skip.mkmask (this.c1); +} else { +this.mask1 = 0; +}}, "~S,~B,~N"); +Clazz.defineMethod (c$, "find", +function (s, start, end) { +if (start > end) { +return -1; +}start += this.$offset; +var vend = com.stevesoft.pat.Skip.min (s.length () - 2, end + this.$offset); +for (var i = start; i <= vend; i++) { +if (0 == (s.charCodeAt (i) & this.mask) && 0 == (s.charCodeAt (i + 1) & this.mask1)) { +if (this.m1 || com.stevesoft.pat.CaseMgr.regionMatchesLike2 (s, this.ign, i, this.src, 0, this.src.length)) { +return i - this.$offset; +}}} +return -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +}); diff --git a/bin/com/stevesoft/pat/SkipBMH.js b/bin/com/stevesoft/pat/SkipBMH.js index 9ea4116..ac81e43 100644 --- a/bin/com/stevesoft/pat/SkipBMH.js +++ b/bin/com/stevesoft/pat/SkipBMH.js @@ -1,154 +1,154 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Skip"], "com.stevesoft.pat.SkipBMH", ["com.stevesoft.pat.CaseMgr", "com.stevesoft.pat.wrap.StringWrap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.MAX_CHAR = 64; -this.skip = null; -this.sm1 = 0; -this.jump_ahead = 0; -this.uc = '\0'; -this.lc = '\0'; -this.tc = '\0'; -this.x = '\0'; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "SkipBMH", com.stevesoft.pat.Skip); -Clazz.prepareFields (c$, function () { -this.skip = Clazz.newCharArray (64, '\0'); -}); -Clazz.defineMethod (c$, "exact", -function (c) { -return (this.ign && this.anyc (c)) || c == this.x; -}, "~S"); -Clazz.defineMethod (c$, "anyc", -function (c) { -return c == this.uc || c == this.lc || c == this.tc; -}, "~S"); -Clazz.makeConstructor (c$, -function (pt, ign) { -this.construct (pt, ign, 0); -}, "~S,~B"); -Clazz.makeConstructor (c$, -function (pt) { -this.construct (pt, false, 0); -}, "~S"); -Clazz.makeConstructor (c$, -function (pt, ign, offset) { -Clazz.superConstructor (this, com.stevesoft.pat.SkipBMH, [pt, ign, offset]); -for (var k = 0; k < 64; k++) { -this.skip[k] = String.fromCharCode (this.src.length); -} -this.sm1 = this.src.length - 1; -this.x = this.src.charAt (this.sm1); -this.uc = com.stevesoft.pat.CaseMgr.toUpperCaseC (this.x); -this.lc = com.stevesoft.pat.CaseMgr.toLowerCaseC (this.x); -this.tc = com.stevesoft.pat.CaseMgr.toTitleCaseC (this.x); -for (var k = 0; k < this.src.length - 1; k++) { -var x_ = this.src.charAt (k); -if (ign) { -var uc_ = com.stevesoft.pat.CaseMgr.toUpperCaseC (x_); -var lc_ = com.stevesoft.pat.CaseMgr.toLowerCaseC (x_); -var tc_ = com.stevesoft.pat.CaseMgr.toTitleCaseC (x_); -this.skip[uc_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); -this.skip[lc_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); -this.skip[tc_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); -} else { -this.skip[x_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); -}} -this.jump_ahead = this.src.length - 1; -for (var k = 0; k < this.src.length - 1; k++) { -var y = this.src.charAt (this.sm1 - k - 1); -if (this.exact (y)) { -this.jump_ahead = k; -break; -}} -}, "~S,~B,~N"); -Clazz.defineMethod (c$, "searchRegion", -function (s, start, end) { -return this.find (s, start, end); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "searchFrom", -function (s, start) { -return this.find (s, start, s.length); -}, "~S,~N"); -Clazz.defineMethod (c$, "search", -function (s) { -return this.find (s, 0, s.length); -}, "~S"); -Clazz.defineMethod (c$, "find", -function (s, start, end) { -start += this.$offset + this.sm1; -var vend = com.stevesoft.pat.Skip.min (s.length - 1, end + this.sm1 + this.$offset); -var k; -var vend1 = vend - this.jump_ahead; -if (this.ign) { -for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.anyc (s.charAt (k))) { -if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -}} -for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.anyc (s.charAt (k))) { -if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -if (k > vend) { -return -1; -}}} -} else { -for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.x == s.charAt (k)) { -if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, false, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -}} -for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.x == s.charAt (k)) { -if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, false, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -if (k > vend) { -return -1; -}}} -}return -1; -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "find", -function (s, start, end) { -if (Clazz.instanceOf (s, com.stevesoft.pat.wrap.StringWrap)) { -return this.find (s.toString (), start, end); -}start += this.$offset + this.sm1; -var vend = com.stevesoft.pat.Skip.min (s.length () - 1, end + this.sm1 + this.$offset); -var k; -var vend1 = vend - this.jump_ahead; -if (this.ign) { -for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.anyc (s.charAt (k))) { -if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -}} -for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.anyc (s.charAt (k))) { -if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -if (k > vend) { -return -1; -}}} -} else { -for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.x == s.charAt (k)) { -if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, false, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -}} -for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { -if (this.x == s.charAt (k)) { -if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, false, 0, s, k - this.sm1, this.sm1)) { -return k - this.sm1 - this.$offset; -}k += this.jump_ahead; -if (k > vend) { -return -1; -}}} -}return -1; -}, "com.stevesoft.pat.StringLike,~N,~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Skip"], "com.stevesoft.pat.SkipBMH", ["com.stevesoft.pat.CaseMgr", "com.stevesoft.pat.wrap.StringWrap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.MAX_CHAR = 64; +this.skip = null; +this.sm1 = 0; +this.jump_ahead = 0; +this.uc = '\0'; +this.lc = '\0'; +this.tc = '\0'; +this.x = '\0'; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "SkipBMH", com.stevesoft.pat.Skip); +Clazz.prepareFields (c$, function () { +this.skip = Clazz.newCharArray (64, '\0'); +}); +Clazz.defineMethod (c$, "exact", +function (c) { +return (this.ign && this.anyc (c)) || c == this.x; +}, "~S"); +Clazz.defineMethod (c$, "anyc", +function (c) { +return c == this.uc || c == this.lc || c == this.tc; +}, "~S"); +Clazz.makeConstructor (c$, +function (pt, ign) { +this.construct (pt, ign, 0); +}, "~S,~B"); +Clazz.makeConstructor (c$, +function (pt) { +this.construct (pt, false, 0); +}, "~S"); +Clazz.makeConstructor (c$, +function (pt, ign, offset) { +Clazz.superConstructor (this, com.stevesoft.pat.SkipBMH, [pt, ign, offset]); +for (var k = 0; k < 64; k++) { +this.skip[k] = String.fromCharCode (this.src.length); +} +this.sm1 = this.src.length - 1; +this.x = this.src.charAt (this.sm1); +this.uc = com.stevesoft.pat.CaseMgr.toUpperCaseC (this.x); +this.lc = com.stevesoft.pat.CaseMgr.toLowerCaseC (this.x); +this.tc = com.stevesoft.pat.CaseMgr.toTitleCaseC (this.x); +for (var k = 0; k < this.src.length - 1; k++) { +var x_ = this.src.charAt (k); +if (ign) { +var uc_ = com.stevesoft.pat.CaseMgr.toUpperCaseC (x_); +var lc_ = com.stevesoft.pat.CaseMgr.toLowerCaseC (x_); +var tc_ = com.stevesoft.pat.CaseMgr.toTitleCaseC (x_); +this.skip[uc_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); +this.skip[lc_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); +this.skip[tc_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); +} else { +this.skip[x_.charCodeAt (0) & (63)] = String.fromCharCode (this.src.length - k - 1); +}} +this.jump_ahead = this.src.length - 1; +for (var k = 0; k < this.src.length - 1; k++) { +var y = this.src.charAt (this.sm1 - k - 1); +if (this.exact (y)) { +this.jump_ahead = k; +break; +}} +}, "~S,~B,~N"); +Clazz.defineMethod (c$, "searchRegion", +function (s, start, end) { +return this.find (s, start, end); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "searchFrom", +function (s, start) { +return this.find (s, start, s.length); +}, "~S,~N"); +Clazz.defineMethod (c$, "search", +function (s) { +return this.find (s, 0, s.length); +}, "~S"); +Clazz.defineMethod (c$, "find", +function (s, start, end) { +start += this.$offset + this.sm1; +var vend = com.stevesoft.pat.Skip.min (s.length - 1, end + this.sm1 + this.$offset); +var k; +var vend1 = vend - this.jump_ahead; +if (this.ign) { +for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.anyc (s.charAt (k))) { +if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +}} +for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.anyc (s.charAt (k))) { +if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +if (k > vend) { +return -1; +}}} +} else { +for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.x == s.charAt (k)) { +if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, false, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +}} +for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.x == s.charAt (k)) { +if (com.stevesoft.pat.CaseMgr.regionMatches2 (this.src, false, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +if (k > vend) { +return -1; +}}} +}return -1; +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "find", +function (s, start, end) { +if (Clazz.instanceOf (s, com.stevesoft.pat.wrap.StringWrap)) { +return this.find (s.toString (), start, end); +}start += this.$offset + this.sm1; +var vend = com.stevesoft.pat.Skip.min (s.length () - 1, end + this.sm1 + this.$offset); +var k; +var vend1 = vend - this.jump_ahead; +if (this.ign) { +for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.anyc (s.charAt (k))) { +if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +}} +for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.anyc (s.charAt (k))) { +if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, this.ign, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +if (k > vend) { +return -1; +}}} +} else { +for (k = start; k <= vend1; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.x == s.charAt (k)) { +if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, false, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +}} +for (; k <= vend; k += (this.skip[s.charCodeAt (k) & (63)]).charCodeAt (0)) { +if (this.x == s.charAt (k)) { +if (com.stevesoft.pat.CaseMgr.regionMatches (this.src, false, 0, s, k - this.sm1, this.sm1)) { +return k - this.sm1 - this.$offset; +}k += this.jump_ahead; +if (k > vend) { +return -1; +}}} +}return -1; +}, "com.stevesoft.pat.StringLike,~N,~N"); +}); diff --git a/bin/com/stevesoft/pat/Skipped.js b/bin/com/stevesoft/pat/Skipped.js index 07c5ca9..8f6f1d3 100644 --- a/bin/com/stevesoft/pat/Skipped.js +++ b/bin/com/stevesoft/pat/Skipped.js @@ -1,34 +1,34 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Skipped", ["com.stevesoft.pat.CaseMgr", "$.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.s = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Skipped", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (s) { -Clazz.superConstructor (this, com.stevesoft.pat.Skipped, []); -this.s = s; -}, "~S"); -Clazz.overrideMethod (c$, "toString", -function () { -return this.s + this.nextString (); -}); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (pt.no_check || com.stevesoft.pat.CaseMgr.regionMatches (this.s, pt.ignoreCase, 0, pt.src, pos, this.s.length)) { -return this.nextMatch (pos + this.s.length, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (this.s.length); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (this.s.length); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.Skipped (this.s); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Skipped", ["com.stevesoft.pat.CaseMgr", "$.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.s = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Skipped", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (s) { +Clazz.superConstructor (this, com.stevesoft.pat.Skipped, []); +this.s = s; +}, "~S"); +Clazz.overrideMethod (c$, "toString", +function () { +return this.s + this.nextString (); +}); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (pt.no_check || com.stevesoft.pat.CaseMgr.regionMatches (this.s, pt.ignoreCase, 0, pt.src, pos, this.s.length)) { +return this.nextMatch (pos + this.s.length, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (this.s.length); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (this.s.length); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Skipped (this.s); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/SpecialRule.js b/bin/com/stevesoft/pat/SpecialRule.js index 13dfbe5..aed49a6 100644 --- a/bin/com/stevesoft/pat/SpecialRule.js +++ b/bin/com/stevesoft/pat/SpecialRule.js @@ -1,11 +1,11 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.SpecialRule", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "SpecialRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.SpecialRule, []); -}); -Clazz.overrideMethod (c$, "apply", -function (sb, rr) { -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.SpecialRule", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "SpecialRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.SpecialRule, []); +}); +Clazz.overrideMethod (c$, "apply", +function (sb, rr) { +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +}); diff --git a/bin/com/stevesoft/pat/Start.js b/bin/com/stevesoft/pat/Start.js index 56168b1..1ef02d7 100644 --- a/bin/com/stevesoft/pat/Start.js +++ b/bin/com/stevesoft/pat/Start.js @@ -1,35 +1,35 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Start", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.retIsStart = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Start", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (b) { -Clazz.superConstructor (this, com.stevesoft.pat.Start, []); -this.retIsStart = b; -}, "~B"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (this.retIsStart && pt.mFlag && pos > 0 && pt.src.charAt (pos - 1) == '\n') { -return this.nextMatch (pos, pt); -}if (pos == 0) { -return this.nextMatch (pos, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -if (this.retIsStart) { -return "^" + this.nextString (); -} else { -return "\\A" + this.nextString (); -}}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.Start (this.retIsStart); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Start", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.retIsStart = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Start", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (b) { +Clazz.superConstructor (this, com.stevesoft.pat.Start, []); +this.retIsStart = b; +}, "~B"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (this.retIsStart && pt.mFlag && pos > 0 && pt.src.charAt (pos - 1) == '\n') { +return this.nextMatch (pos, pt); +}if (pos == 0) { +return this.nextMatch (pos, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +if (this.retIsStart) { +return "^" + this.nextString (); +} else { +return "\\A" + this.nextString (); +}}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Start (this.retIsStart); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/StrPos.class b/bin/com/stevesoft/pat/StrPos.class index 249075c1b328ee4bed533cb086d51dd180cd7c97..cc761f60e1dbd9abd08aacf527882e7ecc2c05c5 100644 GIT binary patch delta 27 jcmX>sd`Ni1dRE52lQ*z_;ox9kk^jvQ#lCqhn;0_ymNf}j delta 28 kcmX>kd{}tHdRE4NlQ*z_;pAjsmH*8U#lp0C4VxG<0G>PvS^xk5 diff --git a/bin/com/stevesoft/pat/StrPos.js b/bin/com/stevesoft/pat/StrPos.js index fb1baf4..366f46b 100644 --- a/bin/com/stevesoft/pat/StrPos.js +++ b/bin/com/stevesoft/pat/StrPos.js @@ -1,109 +1,109 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.StrPos", ["com.stevesoft.pat.patInf", "$.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.s = null; -this.$pos = 0; -this.esc = '\\'; -this.c = '\0'; -this.dontMatch = false; -this.$eos = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "StrPos"); -Clazz.defineMethod (c$, "pos", -function () { -return this.$pos; -}); -Clazz.defineMethod (c$, "thisChar", -function () { -return this.c; -}); -Clazz.defineMethod (c$, "eos", -function () { -return this.$eos; -}); -Clazz.makeConstructor (c$, -function (sp) { -this.dup (sp); -}, "com.stevesoft.pat.StrPos"); -Clazz.defineMethod (c$, "dup", -function (sp) { -this.s = sp.s; -this.$pos = sp.$pos; -this.c = sp.c; -this.dontMatch = sp.dontMatch; -this.$eos = sp.$eos; -}, "com.stevesoft.pat.StrPos"); -Clazz.makeConstructor (c$, -function (s, pos) { -this.s = s; -this.$pos = pos - 1; -this.inc (); -}, "~S,~N"); -Clazz.defineMethod (c$, "inc", -function () { -this.$pos++; -if (this.$pos >= this.s.length) { -this.$eos = true; -return this; -}this.$eos = false; -this.c = this.s.charAt (this.$pos); -if (this.c == this.esc && this.$pos + 1 < this.s.length) { -this.$pos++; -this.c = this.s.charAt (this.$pos); -if (this.c != this.esc) { -this.dontMatch = true; -} else { -this.dontMatch = false; -}} else { -this.dontMatch = false; -}return this; -}); -Clazz.defineMethod (c$, "match", -function (ch) { -if (this.dontMatch || this.$eos) { -return false; -}return this.c == ch; -}, "~S"); -Clazz.defineMethod (c$, "escMatch", -function (ch) { -if (!this.dontMatch || this.$eos) { -return false; -}return this.c == ch; -}, "~S"); -Clazz.defineMethod (c$, "escaped", -function () { -return this.dontMatch; -}); -Clazz.defineMethod (c$, "incMatch", -function (st) { -var sp = new com.stevesoft.pat.StrPos (this); -var i; -for (i = 0; i < st.length; i++) { -if (!sp.match (st.charAt (i))) { -return false; -}sp.inc (); -} -this.dup (sp); -return true; -}, "~S"); -Clazz.defineMethod (c$, "getPatInt", -function () { -if (this.incMatch ("inf")) { -return new com.stevesoft.pat.patInf (); -}var i; -var cnt = 0; -var sp = new com.stevesoft.pat.StrPos (this); -for (i = 0; !sp.$eos && sp.c >= '0' && sp.c <= '9'; i++) { -cnt = 10 * cnt + sp.c.charCodeAt (0) - 48; -sp.inc (); -} -if (i == 0) { -return null; -}this.dup (sp); -return new com.stevesoft.pat.patInt (cnt); -}); -Clazz.defineMethod (c$, "getString", -function () { -return this.s; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.StrPos", ["com.stevesoft.pat.patInf", "$.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.s = null; +this.$pos = 0; +this.esc = '\\'; +this.c = '\0'; +this.dontMatch = false; +this.$eos = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "StrPos"); +Clazz.defineMethod (c$, "pos", +function () { +return this.$pos; +}); +Clazz.defineMethod (c$, "thisChar", +function () { +return this.c; +}); +Clazz.defineMethod (c$, "eos", +function () { +return this.$eos; +}); +Clazz.makeConstructor (c$, +function (sp) { +this.dup (sp); +}, "com.stevesoft.pat.StrPos"); +Clazz.defineMethod (c$, "dup", +function (sp) { +this.s = sp.s; +this.$pos = sp.$pos; +this.c = sp.c; +this.dontMatch = sp.dontMatch; +this.$eos = sp.$eos; +}, "com.stevesoft.pat.StrPos"); +Clazz.makeConstructor (c$, +function (s, pos) { +this.s = s; +this.$pos = pos - 1; +this.inc (); +}, "~S,~N"); +Clazz.defineMethod (c$, "inc", +function () { +this.$pos++; +if (this.$pos >= this.s.length) { +this.$eos = true; +return this; +}this.$eos = false; +this.c = this.s.charAt (this.$pos); +if (this.c == this.esc && this.$pos + 1 < this.s.length) { +this.$pos++; +this.c = this.s.charAt (this.$pos); +if (this.c != this.esc) { +this.dontMatch = true; +} else { +this.dontMatch = false; +}} else { +this.dontMatch = false; +}return this; +}); +Clazz.defineMethod (c$, "match", +function (ch) { +if (this.dontMatch || this.$eos) { +return false; +}return this.c == ch; +}, "~S"); +Clazz.defineMethod (c$, "escMatch", +function (ch) { +if (!this.dontMatch || this.$eos) { +return false; +}return this.c == ch; +}, "~S"); +Clazz.defineMethod (c$, "escaped", +function () { +return this.dontMatch; +}); +Clazz.defineMethod (c$, "incMatch", +function (st) { +var sp = new com.stevesoft.pat.StrPos (this); +var i; +for (i = 0; i < st.length; i++) { +if (!sp.match (st.charAt (i))) { +return false; +}sp.inc (); +} +this.dup (sp); +return true; +}, "~S"); +Clazz.defineMethod (c$, "getPatInt", +function () { +if (this.incMatch ("inf")) { +return new com.stevesoft.pat.patInf (); +}var i; +var cnt = 0; +var sp = new com.stevesoft.pat.StrPos (this); +for (i = 0; !sp.$eos && sp.c >= '0' && sp.c <= '9'; i++) { +cnt = 10 * cnt + sp.c.charCodeAt (0) - 48; +sp.inc (); +} +if (i == 0) { +return null; +}this.dup (sp); +return new com.stevesoft.pat.patInt (cnt); +}); +Clazz.defineMethod (c$, "getString", +function () { +return this.s; +}); +}); diff --git a/bin/com/stevesoft/pat/StringBufferLike.class b/bin/com/stevesoft/pat/StringBufferLike.class index 6426a0683cb277fe19eb77106afe224d96567873..0bfeef2c69afb83b2b7567d846c0be99b15c4715 100644 GIT binary patch delta 31 mcmaFG`;vD0MUVd(FzRmMkeHa0Tk_O`d delta 32 ncmaFK`-*o%J`1D4<^mQaMjl=UZVO(1UVd(FZl=w1S$!A*j130m diff --git a/bin/com/stevesoft/pat/StringBufferLike.js b/bin/com/stevesoft/pat/StringBufferLike.js index 2455329..fd5b6c3 100644 --- a/bin/com/stevesoft/pat/StringBufferLike.js +++ b/bin/com/stevesoft/pat/StringBufferLike.js @@ -1,62 +1,62 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.BasicStringBufferLike"], "com.stevesoft.pat.StringBufferLike", ["com.stevesoft.pat.CaseMgr"], function () { -c$ = Clazz.decorateAsClass (function () { -this.sbl = null; -this.mode = 'E'; -this.altMode = ' '; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "StringBufferLike", null, com.stevesoft.pat.BasicStringBufferLike); -Clazz.makeConstructor (c$, -function (sbl) { -this.sbl = sbl; -}, "com.stevesoft.pat.BasicStringBufferLike"); -Clazz.defineMethod (c$, "toStringLike", -function () { -return this.sbl.toStringLike (); -}); -Clazz.defineMethod (c$, "toString", -function () { -return this.sbl.toString (); -}); -Clazz.defineMethod (c$, "appendC", -function (c) { -switch (this.mode) { -case 'u': -this.mode = this.altMode; -this.altMode = ' '; -case 'U': -this.sbl.appendC (com.stevesoft.pat.CaseMgr.toUpperCaseC (c)); -break; -case 'l': -this.mode = this.altMode; -this.altMode = ' '; -case 'L': -this.sbl.appendC (com.stevesoft.pat.CaseMgr.toLowerCaseC (c)); -break; -case 'Q': -if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) { -;} else { -this.sbl.appendC ('\\'); -}default: -this.sbl.appendC (c); -break; -} -}, "~S"); -Clazz.overrideMethod (c$, "append", -function (s) { -for (var i = 0; i < s.length; i++) { -this.appendC (s.charAt (i)); -} -}, "~S"); -Clazz.defineMethod (c$, "setMode", -function (c) { -if (c == 'u' || c == 'l') { -if (this.altMode == ' ') { -this.altMode = this.mode; -}}this.mode = c; -}, "~S"); -Clazz.defineMethod (c$, "unwrap", -function () { -return this.sbl.unwrap (); -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.BasicStringBufferLike"], "com.stevesoft.pat.StringBufferLike", ["com.stevesoft.pat.CaseMgr"], function () { +c$ = Clazz.decorateAsClass (function () { +this.sbl = null; +this.mode = 'E'; +this.altMode = ' '; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "StringBufferLike", null, com.stevesoft.pat.BasicStringBufferLike); +Clazz.makeConstructor (c$, +function (sbl) { +this.sbl = sbl; +}, "com.stevesoft.pat.BasicStringBufferLike"); +Clazz.defineMethod (c$, "toStringLike", +function () { +return this.sbl.toStringLike (); +}); +Clazz.defineMethod (c$, "toString", +function () { +return this.sbl.toString (); +}); +Clazz.defineMethod (c$, "appendC", +function (c) { +switch (this.mode) { +case 'u': +this.mode = this.altMode; +this.altMode = ' '; +case 'U': +this.sbl.appendC (com.stevesoft.pat.CaseMgr.toUpperCaseC (c)); +break; +case 'l': +this.mode = this.altMode; +this.altMode = ' '; +case 'L': +this.sbl.appendC (com.stevesoft.pat.CaseMgr.toLowerCaseC (c)); +break; +case 'Q': +if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) { +;} else { +this.sbl.appendC ('\\'); +}default: +this.sbl.appendC (c); +break; +} +}, "~S"); +Clazz.overrideMethod (c$, "append", +function (s) { +for (var i = 0; i < s.length; i++) { +this.appendC (s.charAt (i)); +} +}, "~S"); +Clazz.defineMethod (c$, "setMode", +function (c) { +if (c == 'u' || c == 'l') { +if (this.altMode == ' ') { +this.altMode = this.mode; +}}this.mode = c; +}, "~S"); +Clazz.defineMethod (c$, "unwrap", +function () { +return this.sbl.unwrap (); +}); +}); diff --git a/bin/com/stevesoft/pat/StringLike.js b/bin/com/stevesoft/pat/StringLike.js index c677532..12b2dc9 100644 --- a/bin/com/stevesoft/pat/StringLike.js +++ b/bin/com/stevesoft/pat/StringLike.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.declareInterface (com.stevesoft.pat, "StringLike"); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.declareInterface (com.stevesoft.pat, "StringLike"); diff --git a/bin/com/stevesoft/pat/StringRule.js b/bin/com/stevesoft/pat/StringRule.js index aea8a98..1c04a68 100644 --- a/bin/com/stevesoft/pat/StringRule.js +++ b/bin/com/stevesoft/pat/StringRule.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.StringRule", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.s = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "StringRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function (s) { -Clazz.superConstructor (this, com.stevesoft.pat.StringRule, []); -this.s = s; -}, "~S"); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -sb.append (this.s); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return this.s; -}); -Clazz.overrideMethod (c$, "clone1", -function () { -return new com.stevesoft.pat.StringRule (this.s); -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.StringRule", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.s = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "StringRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function (s) { +Clazz.superConstructor (this, com.stevesoft.pat.StringRule, []); +this.s = s; +}, "~S"); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +sb.append (this.s); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return this.s; +}); +Clazz.overrideMethod (c$, "clone1", +function () { +return new com.stevesoft.pat.StringRule (this.s); +}); +}); diff --git a/bin/com/stevesoft/pat/SubMark.js b/bin/com/stevesoft/pat/SubMark.js index 0ea6b3a..9e1b5b8 100644 --- a/bin/com/stevesoft/pat/SubMark.js +++ b/bin/com/stevesoft/pat/SubMark.js @@ -1,21 +1,21 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.SubMark", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.end_pos = 0; -this.start_pos = 0; -this.om = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "SubMark", com.stevesoft.pat.Pattern); -Clazz.overrideMethod (c$, "toString", -function () { -return ""; -}); -Clazz.overrideMethod (c$, "matchInternal", -function (i, pt) { -pt.marks[this.om.id + pt.nMarks] = i; -var ret = this.nextMatch (i, pt); -if (ret < 0) { -pt.marks[this.om.id + pt.nMarks] = -1; -}return ret; -}, "~N,com.stevesoft.pat.Pthings"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.SubMark", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.end_pos = 0; +this.start_pos = 0; +this.om = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "SubMark", com.stevesoft.pat.Pattern); +Clazz.overrideMethod (c$, "toString", +function () { +return ""; +}); +Clazz.overrideMethod (c$, "matchInternal", +function (i, pt) { +pt.marks[this.om.id + pt.nMarks] = i; +var ret = this.nextMatch (i, pt); +if (ret < 0) { +pt.marks[this.om.id + pt.nMarks] = -1; +}return ret; +}, "~N,com.stevesoft.pat.Pthings"); +}); diff --git a/bin/com/stevesoft/pat/TransPat.js b/bin/com/stevesoft/pat/TransPat.js index ec296f1..65f32a1 100644 --- a/bin/com/stevesoft/pat/TransPat.js +++ b/bin/com/stevesoft/pat/TransPat.js @@ -1,35 +1,35 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.TransPat", ["com.stevesoft.pat.Regex"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ra = null; -this.ra_len = 0; -this.pn = -1; -this.lastMatchedTo = -1; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "TransPat", com.stevesoft.pat.Pattern); -Clazz.prepareFields (c$, function () { -this.ra = new Array (10); -}); -Clazz.overrideMethod (c$, "toString", -function () { -return "(?#TransPat)"; -}); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.TransPat, []); -}); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -for (var i = 0; i < this.ra_len; i++) { -pt.ignoreCase = this.ra[i].ignoreCase; -pt.mFlag = this.ra[i].mFlag; -pt.dotDoesntMatchCR = com.stevesoft.pat.Regex.dotDoesntMatchCR; -var r = this.ra[i].thePattern.matchInternal (pos, pt); -if (r >= 0) { -this.pn = i; -return r; -}} -this.pn = -1; -return -1; -}, "~N,com.stevesoft.pat.Pthings"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.TransPat", ["com.stevesoft.pat.Regex"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ra = null; +this.ra_len = 0; +this.pn = -1; +this.lastMatchedTo = -1; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "TransPat", com.stevesoft.pat.Pattern); +Clazz.prepareFields (c$, function () { +this.ra = new Array (10); +}); +Clazz.overrideMethod (c$, "toString", +function () { +return "(?#TransPat)"; +}); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.TransPat, []); +}); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +for (var i = 0; i < this.ra_len; i++) { +pt.ignoreCase = this.ra[i].ignoreCase; +pt.mFlag = this.ra[i].mFlag; +pt.dotDoesntMatchCR = com.stevesoft.pat.Regex.dotDoesntMatchCR; +var r = this.ra[i].thePattern.matchInternal (pos, pt); +if (r >= 0) { +this.pn = i; +return r; +}} +this.pn = -1; +return -1; +}, "~N,com.stevesoft.pat.Pthings"); +}); diff --git a/bin/com/stevesoft/pat/Transformer.js b/bin/com/stevesoft/pat/Transformer.js index 3d169f9..25ef39f 100644 --- a/bin/com/stevesoft/pat/Transformer.js +++ b/bin/com/stevesoft/pat/Transformer.js @@ -1,130 +1,130 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.ReplaceRule", "$.Replacer"], ["com.stevesoft.pat.Transformer", "$.TransRepRule"], ["com.stevesoft.pat.MessageManager", "$.Regex", "$.TransPat", "com.stevesoft.pat.wrap.StringWrap", "java.lang.ArrayIndexOutOfBoundsException", "$.NullPointerException"], function () { -c$ = Clazz.decorateAsClass (function () { -this.t = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "TransRepRule", com.stevesoft.pat.ReplaceRule); -Clazz.makeConstructor (c$, -function (t) { -Clazz.superConstructor (this, com.stevesoft.pat.TransRepRule, []); -this.t = t; -}, "com.stevesoft.pat.Transformer"); -Clazz.overrideMethod (c$, "toString1", -function () { -return ""; -}); -Clazz.overrideMethod (c$, "clone1", -function () { -return new com.stevesoft.pat.TransRepRule (this.t); -}); -Clazz.overrideMethod (c$, "apply", -function (sb, rr) { -this.next = this.t.tp.ra[this.t.tp.pn].getReplaceRule (); -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -c$ = Clazz.decorateAsClass (function () { -this.tp = null; -this.rp = null; -this.auto_optimize = false; -this.repr = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Transformer"); -Clazz.prepareFields (c$, function () { -this.repr = new com.stevesoft.pat.Replacer (); -}); -Clazz.defineMethod (c$, "getReplacer", -function () { -return this.rp.getReplacer (); -}); -Clazz.makeConstructor (c$, -function (auto) { -this.rp = new com.stevesoft.pat.Regex (null, ""); -this.auto_optimize = auto; -this.tp = new com.stevesoft.pat.TransPat (); -this.rp.setReplaceRule ( new com.stevesoft.pat.TransRepRule (this)); -this.rp.thePattern = this.tp; -}, "~B"); -Clazz.defineMethod (c$, "add", -function (r) { -if (this.auto_optimize) { -r.optimize (); -}this.tp.ra[this.tp.ra_len++] = r; -if (this.tp.ra.length == this.tp.ra_len) { -var ra2 = new Array (this.tp.ra_len + 10); -for (var i = 0; i < this.tp.ra_len; i++) { -ra2[i] = this.tp.ra[i]; -} -this.tp.ra = ra2; -}this.rp.numSubs_ = r.numSubs_ > this.rp.numSubs_ ? r.numSubs_ : this.rp.numSubs_; -}, "com.stevesoft.pat.Regex"); -Clazz.defineMethod (c$, "patterns", -function () { -return this.tp.ra_len; -}); -Clazz.defineMethod (c$, "getRegexAt", -function (i) { -if (i >= this.tp.ra_len) { -throw new ArrayIndexOutOfBoundsException ("i=" + i + ">=" + this.patterns ()); -}if (i < 0) { -throw new ArrayIndexOutOfBoundsException ("i=" + i + "< 0"); -}return this.tp.ra[i]; -}, "~N"); -Clazz.defineMethod (c$, "setRegexAt", -function (rx, i) { -if (i >= this.tp.ra_len) { -throw new ArrayIndexOutOfBoundsException ("i=" + i + ">=" + this.patterns ()); -}if (i < 0) { -throw new ArrayIndexOutOfBoundsException ("i=" + i + "< 0"); -}this.tp.ra[i] = rx; -}, "com.stevesoft.pat.Regex,~N"); -Clazz.defineMethod (c$, "add", -function (rs) { -var r = com.stevesoft.pat.Regex.perlCode (rs); -if (r == null) { -throw new NullPointerException (com.stevesoft.pat.MessageManager.formatMessage ("exception.bad_pattern_to_regex_perl_code", Clazz.newArray (-1, [rs]))); -}this.add (r); -}, "~S"); -Clazz.defineMethod (c$, "add", -function (array) { -for (var i = 0; i < array.length; i++) { -this.add (array[i]); -} -}, "~A"); -Clazz.defineMethod (c$, "replaceAll", -function (s) { -return this.dorep (s, 0, s.length); -}, "~S"); -Clazz.defineMethod (c$, "replaceAll", -function (s) { -return this.dorep (s, 0, s.length ()); -}, "com.stevesoft.pat.StringLike"); -Clazz.defineMethod (c$, "replaceAllFrom", -function (s, start) { -return this.dorep (s, start, s.length); -}, "~S,~N"); -Clazz.defineMethod (c$, "replaceAllRegion", -function (s, start, end) { -return this.dorep (s, start, end); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "dorep", -function (s, start, end) { -var tfmd = this.repr.replaceAllRegion (s, this.rp, start, end); -this.tp.lastMatchedTo = this.repr.$lastMatchedTo; -return tfmd; -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "dorep", -function (s, start, end) { -return this.dorep ( new com.stevesoft.pat.wrap.StringWrap (s), start, end).toString (); -}, "~S,~N,~N"); -Clazz.defineMethod (c$, "replaceFirst", -function (s) { -return this.dorep (s, 0, s.length); -}, "~S"); -Clazz.defineMethod (c$, "replaceFirstFrom", -function (s, start) { -return this.dorep (s, start, s.length); -}, "~S,~N"); -Clazz.defineMethod (c$, "replaceFirstRegion", -function (s, start, end) { -return this.dorep (s, start, end); -}, "~S,~N,~N"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.ReplaceRule", "$.Replacer"], ["com.stevesoft.pat.Transformer", "$.TransRepRule"], ["com.stevesoft.pat.MessageManager", "$.Regex", "$.TransPat", "com.stevesoft.pat.wrap.StringWrap", "java.lang.ArrayIndexOutOfBoundsException", "$.NullPointerException"], function () { +c$ = Clazz.decorateAsClass (function () { +this.t = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "TransRepRule", com.stevesoft.pat.ReplaceRule); +Clazz.makeConstructor (c$, +function (t) { +Clazz.superConstructor (this, com.stevesoft.pat.TransRepRule, []); +this.t = t; +}, "com.stevesoft.pat.Transformer"); +Clazz.overrideMethod (c$, "toString1", +function () { +return ""; +}); +Clazz.overrideMethod (c$, "clone1", +function () { +return new com.stevesoft.pat.TransRepRule (this.t); +}); +Clazz.overrideMethod (c$, "apply", +function (sb, rr) { +this.next = this.t.tp.ra[this.t.tp.pn].getReplaceRule (); +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +c$ = Clazz.decorateAsClass (function () { +this.tp = null; +this.rp = null; +this.auto_optimize = false; +this.repr = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Transformer"); +Clazz.prepareFields (c$, function () { +this.repr = new com.stevesoft.pat.Replacer (); +}); +Clazz.defineMethod (c$, "getReplacer", +function () { +return this.rp.getReplacer (); +}); +Clazz.makeConstructor (c$, +function (auto) { +this.rp = new com.stevesoft.pat.Regex (null, ""); +this.auto_optimize = auto; +this.tp = new com.stevesoft.pat.TransPat (); +this.rp.setReplaceRule ( new com.stevesoft.pat.TransRepRule (this)); +this.rp.thePattern = this.tp; +}, "~B"); +Clazz.defineMethod (c$, "add", +function (r) { +if (this.auto_optimize) { +r.optimize (); +}this.tp.ra[this.tp.ra_len++] = r; +if (this.tp.ra.length == this.tp.ra_len) { +var ra2 = new Array (this.tp.ra_len + 10); +for (var i = 0; i < this.tp.ra_len; i++) { +ra2[i] = this.tp.ra[i]; +} +this.tp.ra = ra2; +}this.rp.numSubs_ = r.numSubs_ > this.rp.numSubs_ ? r.numSubs_ : this.rp.numSubs_; +}, "com.stevesoft.pat.Regex"); +Clazz.defineMethod (c$, "patterns", +function () { +return this.tp.ra_len; +}); +Clazz.defineMethod (c$, "getRegexAt", +function (i) { +if (i >= this.tp.ra_len) { +throw new ArrayIndexOutOfBoundsException ("i=" + i + ">=" + this.patterns ()); +}if (i < 0) { +throw new ArrayIndexOutOfBoundsException ("i=" + i + "< 0"); +}return this.tp.ra[i]; +}, "~N"); +Clazz.defineMethod (c$, "setRegexAt", +function (rx, i) { +if (i >= this.tp.ra_len) { +throw new ArrayIndexOutOfBoundsException ("i=" + i + ">=" + this.patterns ()); +}if (i < 0) { +throw new ArrayIndexOutOfBoundsException ("i=" + i + "< 0"); +}this.tp.ra[i] = rx; +}, "com.stevesoft.pat.Regex,~N"); +Clazz.defineMethod (c$, "add", +function (rs) { +var r = com.stevesoft.pat.Regex.perlCode (rs); +if (r == null) { +throw new NullPointerException (com.stevesoft.pat.MessageManager.formatMessage ("exception.bad_pattern_to_regex_perl_code", Clazz.newArray (-1, [rs]))); +}this.add (r); +}, "~S"); +Clazz.defineMethod (c$, "add", +function (array) { +for (var i = 0; i < array.length; i++) { +this.add (array[i]); +} +}, "~A"); +Clazz.defineMethod (c$, "replaceAll", +function (s) { +return this.dorep (s, 0, s.length); +}, "~S"); +Clazz.defineMethod (c$, "replaceAll", +function (s) { +return this.dorep (s, 0, s.length ()); +}, "com.stevesoft.pat.StringLike"); +Clazz.defineMethod (c$, "replaceAllFrom", +function (s, start) { +return this.dorep (s, start, s.length); +}, "~S,~N"); +Clazz.defineMethod (c$, "replaceAllRegion", +function (s, start, end) { +return this.dorep (s, start, end); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "dorep", +function (s, start, end) { +var tfmd = this.repr.replaceAllRegion (s, this.rp, start, end); +this.tp.lastMatchedTo = this.repr.$lastMatchedTo; +return tfmd; +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "dorep", +function (s, start, end) { +return this.dorep ( new com.stevesoft.pat.wrap.StringWrap (s), start, end).toString (); +}, "~S,~N,~N"); +Clazz.defineMethod (c$, "replaceFirst", +function (s) { +return this.dorep (s, 0, s.length); +}, "~S"); +Clazz.defineMethod (c$, "replaceFirstFrom", +function (s, start) { +return this.dorep (s, start, s.length); +}, "~S,~N"); +Clazz.defineMethod (c$, "replaceFirstRegion", +function (s, start, end) { +return this.dorep (s, start, end); +}, "~S,~N,~N"); +}); diff --git a/bin/com/stevesoft/pat/UniValidator.js b/bin/com/stevesoft/pat/UniValidator.js index e1731a4..18aa516 100644 --- a/bin/com/stevesoft/pat/UniValidator.js +++ b/bin/com/stevesoft/pat/UniValidator.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Validator"], "com.stevesoft.pat.UniValidator", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "UniValidator", com.stevesoft.pat.Validator); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Validator"], "com.stevesoft.pat.UniValidator", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "UniValidator", com.stevesoft.pat.Validator); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +}); diff --git a/bin/com/stevesoft/pat/Util.js b/bin/com/stevesoft/pat/Util.js index 6573d7b..3058320 100644 --- a/bin/com/stevesoft/pat/Util.js +++ b/bin/com/stevesoft/pat/Util.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -c$ = Clazz.declareType (com.stevesoft.pat, "Util"); +Clazz.declarePackage ("com.stevesoft.pat"); +c$ = Clazz.declareType (com.stevesoft.pat, "Util"); diff --git a/bin/com/stevesoft/pat/Validator.js b/bin/com/stevesoft/pat/Validator.js index c929431..e364969 100644 --- a/bin/com/stevesoft/pat/Validator.js +++ b/bin/com/stevesoft/pat/Validator.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (null, "com.stevesoft.pat.Validator", ["com.stevesoft.pat.patInf", "$.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.argsave = null; -this.pattern = "."; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Validator"); -Clazz.defineMethod (c$, "validate", -function (src, start, end) { -return end; -}, "com.stevesoft.pat.StringLike,~N,~N"); -Clazz.defineMethod (c$, "arg", -function (s) { -return null; -}, "~S"); -Clazz.defineMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.defineMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInf (); -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.Validator", ["com.stevesoft.pat.patInf", "$.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.argsave = null; +this.pattern = "."; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Validator"); +Clazz.defineMethod (c$, "validate", +function (src, start, end) { +return end; +}, "com.stevesoft.pat.StringLike,~N,~N"); +Clazz.defineMethod (c$, "arg", +function (s) { +return null; +}, "~S"); +Clazz.defineMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.defineMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInf (); +}); +}); diff --git a/bin/com/stevesoft/pat/WantMoreTextReplaceRule.js b/bin/com/stevesoft/pat/WantMoreTextReplaceRule.js index e305e86..b572563 100644 --- a/bin/com/stevesoft/pat/WantMoreTextReplaceRule.js +++ b/bin/com/stevesoft/pat/WantMoreTextReplaceRule.js @@ -1,15 +1,15 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.WantMoreTextReplaceRule", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "WantMoreTextReplaceRule", com.stevesoft.pat.SpecialRule); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.WantMoreTextReplaceRule, []); -}); -Clazz.overrideMethod (c$, "apply", -function (sb, res) { -}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); -Clazz.overrideMethod (c$, "toString1", -function () { -return "${WANT_MORE_TEXT}"; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.SpecialRule"], "com.stevesoft.pat.WantMoreTextReplaceRule", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "WantMoreTextReplaceRule", com.stevesoft.pat.SpecialRule); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.WantMoreTextReplaceRule, []); +}); +Clazz.overrideMethod (c$, "apply", +function (sb, res) { +}, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes"); +Clazz.overrideMethod (c$, "toString1", +function () { +return "${WANT_MORE_TEXT}"; +}); +}); diff --git a/bin/com/stevesoft/pat/lookAhead.js b/bin/com/stevesoft/pat/lookAhead.js index 05e888d..6b9fe88 100644 --- a/bin/com/stevesoft/pat/lookAhead.js +++ b/bin/com/stevesoft/pat/lookAhead.js @@ -1,62 +1,62 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.lookAhead", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.reverse = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "lookAhead", com.stevesoft.pat.Or); -Clazz.makeConstructor (c$, -function (b) { -Clazz.superConstructor (this, com.stevesoft.pat.lookAhead, []); -this.reverse = b; -}, "~B"); -Clazz.defineMethod (c$, "getNext", -function () { -return null; -}); -Clazz.overrideMethod (c$, "nextMatch", -function (pos, pt) { -var p = Clazz.superCall (this, com.stevesoft.pat.lookAhead, "getNext", []); -if (p != null) { -return p.matchInternal (pos, pt); -} else { -return pos; -}}, "~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -if (Clazz.superCall (this, com.stevesoft.pat.lookAhead, "matchInternal", [pos, pt]) >= 0) { -if (this.reverse) { -return -1; -} else { -return this.nextMatch (pos, pt); -}} else { -if (this.reverse) { -return this.nextMatch (pos, pt); -} else { -return -1; -}}}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "leftForm", -function () { -if (this.reverse) { -return "(?!"; -} else { -return "(?="; -}}); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var la = new com.stevesoft.pat.lookAhead (this.reverse); -h.put (this, la); -h.put (la, la); -for (var i = 0; i < this.v.size (); i++) { -la.v.addElement ((this.v.elementAt (i)).clone (h)); -} -return la; -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.lookAhead", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.reverse = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "lookAhead", com.stevesoft.pat.Or); +Clazz.makeConstructor (c$, +function (b) { +Clazz.superConstructor (this, com.stevesoft.pat.lookAhead, []); +this.reverse = b; +}, "~B"); +Clazz.defineMethod (c$, "getNext", +function () { +return null; +}); +Clazz.overrideMethod (c$, "nextMatch", +function (pos, pt) { +var p = Clazz.superCall (this, com.stevesoft.pat.lookAhead, "getNext", []); +if (p != null) { +return p.matchInternal (pos, pt); +} else { +return pos; +}}, "~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +if (Clazz.superCall (this, com.stevesoft.pat.lookAhead, "matchInternal", [pos, pt]) >= 0) { +if (this.reverse) { +return -1; +} else { +return this.nextMatch (pos, pt); +}} else { +if (this.reverse) { +return this.nextMatch (pos, pt); +} else { +return -1; +}}}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "leftForm", +function () { +if (this.reverse) { +return "(?!"; +} else { +return "(?="; +}}); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var la = new com.stevesoft.pat.lookAhead (this.reverse); +h.put (this, la); +h.put (la, la); +for (var i = 0; i < this.v.size (); i++) { +la.v.addElement ((this.v.elementAt (i)).clone (h)); +} +return la; +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/oneChar.js b/bin/com/stevesoft/pat/oneChar.js index 3dac704..1fbc400 100644 --- a/bin/com/stevesoft/pat/oneChar.js +++ b/bin/com/stevesoft/pat/oneChar.js @@ -1,55 +1,55 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.oneChar", ["com.stevesoft.pat.CaseMgr", "$.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.c = '\0'; -this.altc = '\0'; -this.altc2 = '\0'; -this.mask = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "oneChar", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (ci) { -Clazz.superConstructor (this, com.stevesoft.pat.oneChar, []); -this.c = ci; -var cu; -var cl; -var ct; -cu = com.stevesoft.pat.CaseMgr.toUpperCaseC (this.c); -cl = com.stevesoft.pat.CaseMgr.toLowerCaseC (this.c); -ct = com.stevesoft.pat.CaseMgr.toTitleCaseC (this.c); -if (this.c == cu) { -this.altc = cl; -this.altc2 = ct; -} else if (this.c == cl) { -this.altc = cu; -this.altc2 = ct; -} else { -this.altc = cl; -this.altc2 = cu; -}this.mask = this.c.charCodeAt (0) & this.altc.charCodeAt (0) & this.altc2.charCodeAt (0); -}, "~S"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -var p; -var ret = -1; -if (pos < pt.src.length () && !this.Masked (pos, pt) && ((p = pt.src.charAt (pos)) == this.c || (pt.ignoreCase && (p == this.altc || p == this.altc2)))) { -ret = this.nextMatch (pos + 1, pt); -}return ret; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -return com.stevesoft.pat.Pattern.protect ("" + this.c, "[]{}(),$,-\"^.", '\\') + this.nextString (); -}); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.oneChar (this.c); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.oneChar", ["com.stevesoft.pat.CaseMgr", "$.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.c = '\0'; +this.altc = '\0'; +this.altc2 = '\0'; +this.mask = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "oneChar", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (ci) { +Clazz.superConstructor (this, com.stevesoft.pat.oneChar, []); +this.c = ci; +var cu; +var cl; +var ct; +cu = com.stevesoft.pat.CaseMgr.toUpperCaseC (this.c); +cl = com.stevesoft.pat.CaseMgr.toLowerCaseC (this.c); +ct = com.stevesoft.pat.CaseMgr.toTitleCaseC (this.c); +if (this.c == cu) { +this.altc = cl; +this.altc2 = ct; +} else if (this.c == cl) { +this.altc = cu; +this.altc2 = ct; +} else { +this.altc = cl; +this.altc2 = cu; +}this.mask = this.c.charCodeAt (0) & this.altc.charCodeAt (0) & this.altc2.charCodeAt (0); +}, "~S"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +var p; +var ret = -1; +if (pos < pt.src.length () && !this.Masked (pos, pt) && ((p = pt.src.charAt (pos)) == this.c || (pt.ignoreCase && (p == this.altc || p == this.altc2)))) { +ret = this.nextMatch (pos + 1, pt); +}return ret; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +return com.stevesoft.pat.Pattern.protect ("" + this.c, "[]{}(),$,-\"^.", '\\') + this.nextString (); +}); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.oneChar (this.c); +}, "java.util.Hashtable"); +}); diff --git a/bin/com/stevesoft/pat/package.js b/bin/com/stevesoft/pat/package.js index c28d225..1c96a94 100644 --- a/bin/com/stevesoft/pat/package.js +++ b/bin/com/stevesoft/pat/package.js @@ -1,34 +1,34 @@ -var path = ClazzLoader.getClasspathFor ("com.stevesoft.pat.package"); -path = path.substring (0, path.lastIndexOf ("package.js")); -ClazzLoader.jarClasspath (path + "Transformer.js", [ -"com.stevesoft.pat.Transformer", -"$.TransRepRule"]); -ClazzLoader.jarClasspath (path + "Replacer.js", [ -"com.stevesoft.pat.RegHolder", -"$.Replacer", -"$.CodeVal"]); -ClazzLoader.jarClasspath (path + "Regex.js", [ -"com.stevesoft.pat.UnicodeW", -"$.UnicodeCurrency", -"$.UnicodeAlpha", -"$.UnicodeUpper", -"$.NUnicodeCurrency", -"$.NUnicodeW", -"$.NUnicodeAlpha", -"$.UnicodeMath", -"$.UnicodeWhite", -"$.UnicodeDigit", -"$.NUnicodeMath", -"$.Regex", -"$.NUnicodeDigit", -"$.NUnicodeWhite", -"$.NUnicodePunct", -"$.UnicodePunct", -"$.UnicodeLower"]); -ClazzLoader.jarClasspath (path + "RegOpt.js", [ -"com.stevesoft.pat.Branch", -"$.RegOpt", -"$.FastChar"]); -ClazzLoader.jarClasspath (path + "Range.js", [ -"com.stevesoft.pat.BadRangeArgs", -"$.Range"]); +var path = ClazzLoader.getClasspathFor ("com.stevesoft.pat.package"); +path = path.substring (0, path.lastIndexOf ("package.js")); +ClazzLoader.jarClasspath (path + "Range.js", [ +"com.stevesoft.pat.BadRangeArgs", +"$.Range"]); +ClazzLoader.jarClasspath (path + "RegOpt.js", [ +"com.stevesoft.pat.Branch", +"$.RegOpt", +"$.FastChar"]); +ClazzLoader.jarClasspath (path + "Regex.js", [ +"com.stevesoft.pat.UnicodeW", +"$.UnicodeCurrency", +"$.UnicodeAlpha", +"$.UnicodeUpper", +"$.NUnicodeCurrency", +"$.NUnicodeW", +"$.NUnicodeAlpha", +"$.UnicodeMath", +"$.UnicodeWhite", +"$.UnicodeDigit", +"$.NUnicodeMath", +"$.Regex", +"$.NUnicodeDigit", +"$.NUnicodeWhite", +"$.NUnicodePunct", +"$.UnicodePunct", +"$.UnicodeLower"]); +ClazzLoader.jarClasspath (path + "Replacer.js", [ +"com.stevesoft.pat.RegHolder", +"$.Replacer", +"$.CodeVal"]); +ClazzLoader.jarClasspath (path + "Transformer.js", [ +"com.stevesoft.pat.Transformer", +"$.TransRepRule"]); diff --git a/bin/com/stevesoft/pat/parsePerl.class b/bin/com/stevesoft/pat/parsePerl.class index 09045a1182d6d1bc04ba6d0382a5b4b03e7d332e..6c525dca92e9d2f09854ed4e1409d3ada999d408 100644 GIT binary patch delta 116 zcmaE$`9pJq9xr3}W_{j|tjseRv?ePH2QzX{t`Jr<_|L$@z|YPg#s~)N49Y+RWtK27 zvNOzMVc=k>WvF9dWMF4tU{u?@UYMUzQH+7}F9R<~=^qAuMs6M^F6mzktV}>f>lqjr Im>4zy05qW!cmMzZ delta 92 zcmeyN`9O1n9xr3jW_{j|tjrAzI+K-!gPAy(CYK8'; -}if (c == '[') { -return ']'; -}if (c == '(') { -return ')'; -}if (c == '{') { -return '}'; -}return c; -}, "~S"); -c$.codify = Clazz.defineMethod (c$, "codify", -function (s, keepbs) { -return com.stevesoft.pat.parsePerl.codifyRange (s, 0, s.length, keepbs); -}, "~S,~B"); -c$.codifyRange = Clazz.defineMethod (c$, "codifyRange", -function (s, i0, iN, keepbs) { -var sb = new StringBuffer (); -var ucmode = false; -var lcmode = false; -var litmode = false; -var uc1 = false; -var lc1 = false; -var modified = false; -for (var i = i0; i < iN; i++) { -var c = s.charAt (i); -var mf = true; -var app = true; -if (c == '\\') { -app = false; -i++; -if (i < s.length) { -var c2 = s.charAt (i); -switch (c2) { -case 'Q': -litmode = true; -break; -case 'U': -ucmode = true; -break; -case 'L': -lcmode = true; -break; -case 'u': -uc1 = true; -break; -case 'l': -lc1 = true; -break; -case 'E': -uc1 = lc1 = ucmode = lcmode = litmode = false; -break; -default: -if (keepbs) { -sb.append ('\\'); -}c = c2; -if (keepbs) { -mf = false; -}app = true; -break; -} -modified = new Boolean (modified | mf).valueOf (); -}}if (app) { -if (lc1) { -c = com.stevesoft.pat.parsePerl.lc (c); -lc1 = false; -} else if (uc1) { -c = com.stevesoft.pat.parsePerl.uc (c); -uc1 = false; -} else if (ucmode) { -c = com.stevesoft.pat.parsePerl.uc (c); -} else if (lcmode) { -c = com.stevesoft.pat.parsePerl.lc (c); -}if (litmode && com.stevesoft.pat.parsePerl.needbs (c)) { -sb.append ('\\'); -}sb.append (c); -}} -return modified ? sb.toString () : s; -}, "~S,~N,~N,~B"); -c$.uc = Clazz.defineMethod (c$, "uc", -function (c) { -return com.stevesoft.pat.CaseMgr.toUpperCaseC (c); -}, "~S"); -c$.lc = Clazz.defineMethod (c$, "lc", -function (c) { -return com.stevesoft.pat.CaseMgr.toLowerCaseC (c); -}, "~S"); -c$.needbs = Clazz.defineMethod (c$, "needbs", -function (c) { -if (c >= 'a' && c <= 'z') { -return false; -}if (c >= 'A' && c <= 'Z') { -return false; -}if (c >= '0' && c <= '9') { -return false; -}if (c == '_') { -return false; -}return true; -}, "~S"); -c$.parse = Clazz.defineMethod (c$, "parse", -function (s) { -var igncase = false; -var optim = false; -var gFlag = false; -var sFlag = false; -var mFlag = false; -var xFlag = false; -var s1 = new StringBuffer (); -var s2 = new StringBuffer (); -var i = 0; -var count = 0; -var mode; -var delim = '/'; -var cdelim = '/'; -if (s.length >= 3 && s.charAt (0) == 's') { -mode = 's'; -delim = s.charAt (1); -cdelim = com.stevesoft.pat.parsePerl.close (delim); -i = 2; -} else if (s.length >= 2 && s.charAt (0) == 'm') { -mode = 'm'; -delim = s.charAt (1); -cdelim = com.stevesoft.pat.parsePerl.close (delim); -i = 2; -} else if (s.length >= 1 && s.charAt (0) == '/') { -mode = 'm'; -i = 1; -} else { -try { -com.stevesoft.pat.RegSyntaxError.endItAll ("Regex.perlCode should be of the form s/// or m// or //"); -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -} else { -throw rs; -} -} -return null; -}for (; i < s.length; i++) { -if (s.charAt (i) == '\\') { -s1.append ('\\'); -i++; -} else if (s.charAt (i) == cdelim && count == 0) { -i++; -break; -} else if (s.charAt (i) == delim && cdelim != delim) { -count++; -} else if (s.charAt (i) == cdelim && cdelim != delim) { -count--; -}s1.append (s.charAt (i)); -} -if (mode == 's' && cdelim != delim) { -while (i < s.length && com.stevesoft.pat.Prop.isWhite (s.charAt (i))) { -i++; -} -if (i >= s.length) { -try { -com.stevesoft.pat.RegSyntaxError.endItAll ("" + mode + delim + " needs " + cdelim); -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -} else { -throw rs; -} -} -return null; -}cdelim = com.stevesoft.pat.parsePerl.close (delim = s.charAt (i)); -i++; -}count = 0; -if (mode == 's') { -for (; i < s.length; i++) { -if (s.charAt (i) == '\\') { -s2.append ('\\'); -i++; -} else if (s.charAt (i) == cdelim && count == 0) { -i++; -break; -} else if (s.charAt (i) == delim && cdelim != delim) { -count++; -} else if (s.charAt (i) == cdelim && cdelim != delim) { -count--; -}s2.append (s.charAt (i)); -} -}for (; i < s.length; i++) { -var c = s.charAt (i); -switch (c) { -case 'x': -xFlag = true; -break; -case 'i': -igncase = true; -break; -case 'o': -optim = true; -break; -case 's': -sFlag = true; -break; -case 'm': -mFlag = true; -break; -case 'g': -gFlag = true; -break; -default: -try { -com.stevesoft.pat.RegSyntaxError.endItAll ("Illegal flag to pattern: " + c); -} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -} else { -throw rs; -} -} -return null; -} -} -var r = new com.stevesoft.pat.Regex (null, ""); -try { -var pat = s1.toString (); -var reprul = s2.toString (); -if (xFlag) { -pat = com.stevesoft.pat.parsePerl.strip (pat); -reprul = com.stevesoft.pat.parsePerl.strip (reprul); -}r.compile (pat); -r.ignoreCase = new Boolean (r.ignoreCase | igncase).valueOf (); -r.gFlag = new Boolean (r.gFlag | gFlag).valueOf (); -r.sFlag = new Boolean (r.sFlag | sFlag).valueOf (); -r.mFlag = new Boolean (r.mFlag | mFlag).valueOf (); -if (optim) { -r.optimize (); -}if (delim == '\'') { -r.setReplaceRule ( new com.stevesoft.pat.StringRule (reprul)); -} else { -r.setReplaceRule (com.stevesoft.pat.ReplaceRule.perlCode (reprul)); -}} catch (rs) { -if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { -r = null; -} else { -throw rs; -} -} -return r; -}, "~S"); -c$.strip = Clazz.defineMethod (c$, "strip", -function (s) { -var sb = new StringBuffer (); -for (var i = 0; i < s.length; i++) { -var c = s.charAt (i); -if (com.stevesoft.pat.Prop.isWhite (c)) { -;} else if (c == '#') { -i++; -while (i < s.length) { -if (s.charAt (i) == '\n') { -break; -}i++; -} -} else if (c == '\\') { -sb.append (c); -sb.append (s.charAt (++i)); -} else { -sb.append (c); -}} -return sb.toString (); -}, "~S"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (null, "com.stevesoft.pat.parsePerl", ["com.stevesoft.pat.CaseMgr", "$.Prop", "$.RegSyntaxError", "$.Regex", "$.ReplaceRule", "$.StringRule", "java.lang.StringBuffer"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "parsePerl"); +c$.close = Clazz.defineMethod (c$, "close", +function (c) { +if (c == '<') { +return '>'; +}if (c == '[') { +return ']'; +}if (c == '(') { +return ')'; +}if (c == '{') { +return '}'; +}return c; +}, "~S"); +c$.codify = Clazz.defineMethod (c$, "codify", +function (s, keepbs) { +return com.stevesoft.pat.parsePerl.codifyRange (s, 0, s.length, keepbs); +}, "~S,~B"); +c$.codifyRange = Clazz.defineMethod (c$, "codifyRange", +function (s, i0, iN, keepbs) { +var sb = new StringBuffer (); +var ucmode = false; +var lcmode = false; +var litmode = false; +var uc1 = false; +var lc1 = false; +var modified = false; +for (var i = i0; i < iN; i++) { +var c = s.charAt (i); +var mf = true; +var app = true; +if (c == '\\') { +app = false; +i++; +if (i < s.length) { +var c2 = s.charAt (i); +switch (c2) { +case 'Q': +litmode = true; +break; +case 'U': +ucmode = true; +break; +case 'L': +lcmode = true; +break; +case 'u': +uc1 = true; +break; +case 'l': +lc1 = true; +break; +case 'E': +uc1 = lc1 = ucmode = lcmode = litmode = false; +break; +default: +if (keepbs) { +sb.append ('\\'); +}c = c2; +if (keepbs) { +mf = false; +}app = true; +break; +} +modified = new Boolean (modified | mf).valueOf (); +}}if (app) { +if (lc1) { +c = com.stevesoft.pat.parsePerl.lc (c); +lc1 = false; +} else if (uc1) { +c = com.stevesoft.pat.parsePerl.uc (c); +uc1 = false; +} else if (ucmode) { +c = com.stevesoft.pat.parsePerl.uc (c); +} else if (lcmode) { +c = com.stevesoft.pat.parsePerl.lc (c); +}if (litmode && com.stevesoft.pat.parsePerl.needbs (c)) { +sb.append ('\\'); +}sb.append (c); +}} +return modified ? sb.toString () : s; +}, "~S,~N,~N,~B"); +c$.uc = Clazz.defineMethod (c$, "uc", +function (c) { +return com.stevesoft.pat.CaseMgr.toUpperCaseC (c); +}, "~S"); +c$.lc = Clazz.defineMethod (c$, "lc", +function (c) { +return com.stevesoft.pat.CaseMgr.toLowerCaseC (c); +}, "~S"); +c$.needbs = Clazz.defineMethod (c$, "needbs", +function (c) { +if (c >= 'a' && c <= 'z') { +return false; +}if (c >= 'A' && c <= 'Z') { +return false; +}if (c >= '0' && c <= '9') { +return false; +}if (c == '_') { +return false; +}return true; +}, "~S"); +c$.parse = Clazz.defineMethod (c$, "parse", +function (s) { +var igncase = false; +var optim = false; +var gFlag = false; +var sFlag = false; +var mFlag = false; +var xFlag = false; +var s1 = new StringBuffer (); +var s2 = new StringBuffer (); +var i = 0; +var count = 0; +var mode; +var delim = '/'; +var cdelim = '/'; +if (s.length >= 3 && s.charAt (0) == 's') { +mode = 's'; +delim = s.charAt (1); +cdelim = com.stevesoft.pat.parsePerl.close (delim); +i = 2; +} else if (s.length >= 2 && s.charAt (0) == 'm') { +mode = 'm'; +delim = s.charAt (1); +cdelim = com.stevesoft.pat.parsePerl.close (delim); +i = 2; +} else if (s.length >= 1 && s.charAt (0) == '/') { +mode = 'm'; +i = 1; +} else { +try { +com.stevesoft.pat.RegSyntaxError.endItAll ("Regex.perlCode should be of the form s/// or m// or //"); +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +} else { +throw rs; +} +} +return null; +}for (; i < s.length; i++) { +if (s.charAt (i) == '\\') { +s1.append ('\\'); +i++; +} else if (s.charAt (i) == cdelim && count == 0) { +i++; +break; +} else if (s.charAt (i) == delim && cdelim != delim) { +count++; +} else if (s.charAt (i) == cdelim && cdelim != delim) { +count--; +}s1.append (s.charAt (i)); +} +if (mode == 's' && cdelim != delim) { +while (i < s.length && com.stevesoft.pat.Prop.isWhite (s.charAt (i))) { +i++; +} +if (i >= s.length) { +try { +com.stevesoft.pat.RegSyntaxError.endItAll ("" + mode + delim + " needs " + cdelim); +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +} else { +throw rs; +} +} +return null; +}cdelim = com.stevesoft.pat.parsePerl.close (delim = s.charAt (i)); +i++; +}count = 0; +if (mode == 's') { +for (; i < s.length; i++) { +if (s.charAt (i) == '\\') { +s2.append ('\\'); +i++; +} else if (s.charAt (i) == cdelim && count == 0) { +i++; +break; +} else if (s.charAt (i) == delim && cdelim != delim) { +count++; +} else if (s.charAt (i) == cdelim && cdelim != delim) { +count--; +}s2.append (s.charAt (i)); +} +}for (; i < s.length; i++) { +var c = s.charAt (i); +switch (c) { +case 'x': +xFlag = true; +break; +case 'i': +igncase = true; +break; +case 'o': +optim = true; +break; +case 's': +sFlag = true; +break; +case 'm': +mFlag = true; +break; +case 'g': +gFlag = true; +break; +default: +try { +com.stevesoft.pat.RegSyntaxError.endItAll ("Illegal flag to pattern: " + c); +} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +} else { +throw rs; +} +} +return null; +} +} +var r = new com.stevesoft.pat.Regex (null, ""); +try { +var pat = s1.toString (); +var reprul = s2.toString (); +if (xFlag) { +pat = com.stevesoft.pat.parsePerl.strip (pat); +reprul = com.stevesoft.pat.parsePerl.strip (reprul); +}r.compile (pat); +r.ignoreCase = new Boolean (r.ignoreCase | igncase).valueOf (); +r.gFlag = new Boolean (r.gFlag | gFlag).valueOf (); +r.sFlag = new Boolean (r.sFlag | sFlag).valueOf (); +r.mFlag = new Boolean (r.mFlag | mFlag).valueOf (); +if (optim) { +r.optimize (); +}if (delim == '\'') { +r.setReplaceRule ( new com.stevesoft.pat.StringRule (reprul)); +} else { +r.setReplaceRule (com.stevesoft.pat.ReplaceRule.perlCode (reprul)); +}} catch (rs) { +if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) { +r = null; +} else { +throw rs; +} +} +return r; +}, "~S"); +c$.strip = Clazz.defineMethod (c$, "strip", +function (s) { +var sb = new StringBuffer (); +for (var i = 0; i < s.length; i++) { +var c = s.charAt (i); +if (com.stevesoft.pat.Prop.isWhite (c)) { +;} else if (c == '#') { +i++; +while (i < s.length) { +if (s.charAt (i) == '\n') { +break; +}i++; +} +} else if (c == '\\') { +sb.append (c); +sb.append (s.charAt (++i)); +} else { +sb.append (c); +}} +return sb.toString (); +}, "~S"); +}); diff --git a/bin/com/stevesoft/pat/patInf.js b/bin/com/stevesoft/pat/patInf.js index daf7087..1e11499 100644 --- a/bin/com/stevesoft/pat/patInf.js +++ b/bin/com/stevesoft/pat/patInf.js @@ -1,9 +1,9 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.patInt"], "com.stevesoft.pat.patInf", null, function () { -c$ = Clazz.declareType (com.stevesoft.pat, "patInf", com.stevesoft.pat.patInt); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, com.stevesoft.pat.patInf, []); -this.inf = true; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.patInt"], "com.stevesoft.pat.patInf", null, function () { +c$ = Clazz.declareType (com.stevesoft.pat, "patInf", com.stevesoft.pat.patInt); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, com.stevesoft.pat.patInf, []); +this.inf = true; +}); +}); diff --git a/bin/com/stevesoft/pat/patInt.js b/bin/com/stevesoft/pat/patInt.js index 2d65e56..b7226f7 100644 --- a/bin/com/stevesoft/pat/patInt.js +++ b/bin/com/stevesoft/pat/patInt.js @@ -1,94 +1,94 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -c$ = Clazz.decorateAsClass (function () { -this.i = 0; -this.inf = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "patInt"); -Clazz.makeConstructor (c$, -function () { -this.i = 0; -this.inf = false; -}); -Clazz.makeConstructor (c$, -function (init) { -this.i = init; -this.inf = false; -}, "~N"); -Clazz.makeConstructor (c$, -function (p) { -this.i = p.i; -this.inf = p.inf; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "setInf", -function (b) { -this.inf = b; -if (b) { -this.i = 2147483647; -}}, "~B"); -Clazz.defineMethod (c$, "inc", -function () { -if (!this.inf) { -this.i++; -}}); -Clazz.defineMethod (c$, "dec", -function () { -if (!this.inf) { -this.i--; -}}); -Clazz.defineMethod (c$, "lessEq", -function (j) { -return !this.inf && (j.inf || this.i <= j.i); -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "equals", -function (j) { -return !j.inf && !this.inf && this.i == j.i; -}, "com.stevesoft.pat.patInt"); -Clazz.overrideMethod (c$, "toString", -function () { -if (this.inf) { -return ""; -} else { -return "" + this.i; -}}); -Clazz.defineMethod (c$, "pluseq", -function (p) { -if (this.inf || p.inf) { -this.setInf (true); -} else { -this.i += p.i; -}return this; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "mul", -function (p) { -if (this.inf || p.inf) { -return new com.stevesoft.pat.patInf (); -}return new com.stevesoft.pat.patInt (this.i * p.i); -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "mineq", -function (p) { -if (p.inf) { -return this; -}if (this.inf) { -this.i = p.i; -} else if (p.i < this.i) { -this.i = p.i; -}this.setInf (false); -return this; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "maxeq", -function (p) { -if (this.inf || p.inf) { -this.setInf (true); -return this; -}if (p.i > this.i) { -this.i = p.i; -}return this; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "finite", -function () { -return !this.inf; -}); -Clazz.defineMethod (c$, "intValue", -function () { -return this.inf ? 2147483647 : this.i; -}); +Clazz.declarePackage ("com.stevesoft.pat"); +c$ = Clazz.decorateAsClass (function () { +this.i = 0; +this.inf = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "patInt"); +Clazz.makeConstructor (c$, +function () { +this.i = 0; +this.inf = false; +}); +Clazz.makeConstructor (c$, +function (init) { +this.i = init; +this.inf = false; +}, "~N"); +Clazz.makeConstructor (c$, +function (p) { +this.i = p.i; +this.inf = p.inf; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "setInf", +function (b) { +this.inf = b; +if (b) { +this.i = 2147483647; +}}, "~B"); +Clazz.defineMethod (c$, "inc", +function () { +if (!this.inf) { +this.i++; +}}); +Clazz.defineMethod (c$, "dec", +function () { +if (!this.inf) { +this.i--; +}}); +Clazz.defineMethod (c$, "lessEq", +function (j) { +return !this.inf && (j.inf || this.i <= j.i); +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "equals", +function (j) { +return !j.inf && !this.inf && this.i == j.i; +}, "com.stevesoft.pat.patInt"); +Clazz.overrideMethod (c$, "toString", +function () { +if (this.inf) { +return ""; +} else { +return "" + this.i; +}}); +Clazz.defineMethod (c$, "pluseq", +function (p) { +if (this.inf || p.inf) { +this.setInf (true); +} else { +this.i += p.i; +}return this; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "mul", +function (p) { +if (this.inf || p.inf) { +return new com.stevesoft.pat.patInf (); +}return new com.stevesoft.pat.patInt (this.i * p.i); +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "mineq", +function (p) { +if (p.inf) { +return this; +}if (this.inf) { +this.i = p.i; +} else if (p.i < this.i) { +this.i = p.i; +}this.setInf (false); +return this; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "maxeq", +function (p) { +if (this.inf || p.inf) { +this.setInf (true); +return this; +}if (p.i > this.i) { +this.i = p.i; +}return this; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "finite", +function () { +return !this.inf; +}); +Clazz.defineMethod (c$, "intValue", +function () { +return this.inf ? 2147483647 : this.i; +}); diff --git a/bin/com/stevesoft/pat/wrap/CharArrayBufferWrap.js b/bin/com/stevesoft/pat/wrap/CharArrayBufferWrap.js index cfade25..ce61261 100644 --- a/bin/com/stevesoft/pat/wrap/CharArrayBufferWrap.js +++ b/bin/com/stevesoft/pat/wrap/CharArrayBufferWrap.js @@ -1,38 +1,38 @@ -Clazz.declarePackage ("com.stevesoft.pat.wrap"); -Clazz.load (["com.stevesoft.pat.BasicStringBufferLike", "java.lang.StringBuffer"], "com.stevesoft.pat.wrap.CharArrayBufferWrap", ["com.stevesoft.pat.wrap.CharArrayWrap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.sb = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat.wrap, "CharArrayBufferWrap", null, com.stevesoft.pat.BasicStringBufferLike); -Clazz.prepareFields (c$, function () { -this.sb = new StringBuffer (); -}); -Clazz.overrideMethod (c$, "appendC", -function (c) { -this.sb.append (c); -}, "~S"); -Clazz.overrideMethod (c$, "append", -function (s) { -this.sb.append (s); -}, "~S"); -Clazz.overrideMethod (c$, "toStringLike", -function () { -var ca = Clazz.newCharArray (this.sb.length (), '\0'); -for (var i = 0; i < ca.length; i++) { -ca[i] = this.sb.charAt (i); -} -return new com.stevesoft.pat.wrap.CharArrayWrap (ca); -}); -Clazz.defineMethod (c$, "length", -function () { -return this.sb.length (); -}); -Clazz.overrideMethod (c$, "toString", -function () { -return this.sb.toString (); -}); -Clazz.overrideMethod (c$, "unwrap", -function () { -return this.sb; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat.wrap"); +Clazz.load (["com.stevesoft.pat.BasicStringBufferLike", "java.lang.StringBuffer"], "com.stevesoft.pat.wrap.CharArrayBufferWrap", ["com.stevesoft.pat.wrap.CharArrayWrap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.sb = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat.wrap, "CharArrayBufferWrap", null, com.stevesoft.pat.BasicStringBufferLike); +Clazz.prepareFields (c$, function () { +this.sb = new StringBuffer (); +}); +Clazz.overrideMethod (c$, "appendC", +function (c) { +this.sb.append (c); +}, "~S"); +Clazz.overrideMethod (c$, "append", +function (s) { +this.sb.append (s); +}, "~S"); +Clazz.overrideMethod (c$, "toStringLike", +function () { +var ca = Clazz.newCharArray (this.sb.length (), '\0'); +for (var i = 0; i < ca.length; i++) { +ca[i] = this.sb.charAt (i); +} +return new com.stevesoft.pat.wrap.CharArrayWrap (ca); +}); +Clazz.defineMethod (c$, "length", +function () { +return this.sb.length (); +}); +Clazz.overrideMethod (c$, "toString", +function () { +return this.sb.toString (); +}); +Clazz.overrideMethod (c$, "unwrap", +function () { +return this.sb; +}); +}); diff --git a/bin/com/stevesoft/pat/wrap/CharArrayWrap.js b/bin/com/stevesoft/pat/wrap/CharArrayWrap.js index 374d1dd..679bede 100644 --- a/bin/com/stevesoft/pat/wrap/CharArrayWrap.js +++ b/bin/com/stevesoft/pat/wrap/CharArrayWrap.js @@ -1,51 +1,51 @@ -Clazz.declarePackage ("com.stevesoft.pat.wrap"); -Clazz.load (["com.stevesoft.pat.StringLike"], "com.stevesoft.pat.wrap.CharArrayWrap", ["com.stevesoft.pat.wrap.CharArrayBufferWrap", "java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ca = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat.wrap, "CharArrayWrap", null, com.stevesoft.pat.StringLike); -Clazz.defineMethod (c$, "getCharArray", -function () { -return this.ca; -}); -Clazz.makeConstructor (c$, -function (ca) { -this.ca = ca; -}, "~A"); -Clazz.overrideMethod (c$, "toString", -function () { -return String.instantialize (this.ca); -}); -Clazz.overrideMethod (c$, "charAt", -function (i) { -return this.ca[i]; -}, "~N"); -Clazz.overrideMethod (c$, "length", -function () { -return this.ca.length; -}); -Clazz.overrideMethod (c$, "substring", -function (i1, i2) { -var sb = new StringBuffer (); -for (var i = i1; i < i2; i++) { -sb.append (this.ca[i]); -} -return sb.toString (); -}, "~N,~N"); -Clazz.overrideMethod (c$, "unwrap", -function () { -return this.ca; -}); -Clazz.overrideMethod (c$, "newStringBufferLike", -function () { -return new com.stevesoft.pat.wrap.CharArrayBufferWrap (); -}); -Clazz.overrideMethod (c$, "indexOf", -function (c) { -for (var i = 0; i < this.ca.length; i++) { -if (this.ca[i] == c) { -return i; -}} -return -1; -}, "~S"); -}); +Clazz.declarePackage ("com.stevesoft.pat.wrap"); +Clazz.load (["com.stevesoft.pat.StringLike"], "com.stevesoft.pat.wrap.CharArrayWrap", ["com.stevesoft.pat.wrap.CharArrayBufferWrap", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ca = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat.wrap, "CharArrayWrap", null, com.stevesoft.pat.StringLike); +Clazz.defineMethod (c$, "getCharArray", +function () { +return this.ca; +}); +Clazz.makeConstructor (c$, +function (ca) { +this.ca = ca; +}, "~A"); +Clazz.overrideMethod (c$, "toString", +function () { +return String.instantialize (this.ca); +}); +Clazz.overrideMethod (c$, "charAt", +function (i) { +return this.ca[i]; +}, "~N"); +Clazz.overrideMethod (c$, "length", +function () { +return this.ca.length; +}); +Clazz.overrideMethod (c$, "substring", +function (i1, i2) { +var sb = new StringBuffer (); +for (var i = i1; i < i2; i++) { +sb.append (this.ca[i]); +} +return sb.toString (); +}, "~N,~N"); +Clazz.overrideMethod (c$, "unwrap", +function () { +return this.ca; +}); +Clazz.overrideMethod (c$, "newStringBufferLike", +function () { +return new com.stevesoft.pat.wrap.CharArrayBufferWrap (); +}); +Clazz.overrideMethod (c$, "indexOf", +function (c) { +for (var i = 0; i < this.ca.length; i++) { +if (this.ca[i] == c) { +return i; +}} +return -1; +}, "~S"); +}); diff --git a/bin/com/stevesoft/pat/wrap/RandomAccessFileWrap.js b/bin/com/stevesoft/pat/wrap/RandomAccessFileWrap.js index a2b42c5..3b115fe 100644 --- a/bin/com/stevesoft/pat/wrap/RandomAccessFileWrap.js +++ b/bin/com/stevesoft/pat/wrap/RandomAccessFileWrap.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("com.stevesoft.pat.wrap"); -c$ = Clazz.declareType (com.stevesoft.pat.wrap, "RandomAccessFileWrap"); +Clazz.declarePackage ("com.stevesoft.pat.wrap"); +c$ = Clazz.declareType (com.stevesoft.pat.wrap, "RandomAccessFileWrap"); diff --git a/bin/com/stevesoft/pat/wrap/StringBufferWrap.js b/bin/com/stevesoft/pat/wrap/StringBufferWrap.js index 811c548..ea57230 100644 --- a/bin/com/stevesoft/pat/wrap/StringBufferWrap.js +++ b/bin/com/stevesoft/pat/wrap/StringBufferWrap.js @@ -1,34 +1,34 @@ -Clazz.declarePackage ("com.stevesoft.pat.wrap"); -Clazz.load (["com.stevesoft.pat.BasicStringBufferLike", "java.lang.StringBuffer"], "com.stevesoft.pat.wrap.StringBufferWrap", ["com.stevesoft.pat.wrap.StringWrap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.sb = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat.wrap, "StringBufferWrap", null, com.stevesoft.pat.BasicStringBufferLike); -Clazz.prepareFields (c$, function () { -this.sb = new StringBuffer (); -}); -Clazz.overrideMethod (c$, "appendC", -function (c) { -this.sb.append (c); -}, "~S"); -Clazz.overrideMethod (c$, "append", -function (s) { -this.sb.append (s); -}, "~S"); -Clazz.defineMethod (c$, "length", -function () { -return this.sb.length (); -}); -Clazz.overrideMethod (c$, "toString", -function () { -return this.sb.toString (); -}); -Clazz.overrideMethod (c$, "toStringLike", -function () { -return new com.stevesoft.pat.wrap.StringWrap (this.sb.toString ()); -}); -Clazz.overrideMethod (c$, "unwrap", -function () { -return this.sb; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat.wrap"); +Clazz.load (["com.stevesoft.pat.BasicStringBufferLike", "java.lang.StringBuffer"], "com.stevesoft.pat.wrap.StringBufferWrap", ["com.stevesoft.pat.wrap.StringWrap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.sb = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat.wrap, "StringBufferWrap", null, com.stevesoft.pat.BasicStringBufferLike); +Clazz.prepareFields (c$, function () { +this.sb = new StringBuffer (); +}); +Clazz.overrideMethod (c$, "appendC", +function (c) { +this.sb.append (c); +}, "~S"); +Clazz.overrideMethod (c$, "append", +function (s) { +this.sb.append (s); +}, "~S"); +Clazz.defineMethod (c$, "length", +function () { +return this.sb.length (); +}); +Clazz.overrideMethod (c$, "toString", +function () { +return this.sb.toString (); +}); +Clazz.overrideMethod (c$, "toStringLike", +function () { +return new com.stevesoft.pat.wrap.StringWrap (this.sb.toString ()); +}); +Clazz.overrideMethod (c$, "unwrap", +function () { +return this.sb; +}); +}); diff --git a/bin/com/stevesoft/pat/wrap/StringWrap.js b/bin/com/stevesoft/pat/wrap/StringWrap.js index d8e9dfe..a468b0d 100644 --- a/bin/com/stevesoft/pat/wrap/StringWrap.js +++ b/bin/com/stevesoft/pat/wrap/StringWrap.js @@ -1,39 +1,39 @@ -Clazz.declarePackage ("com.stevesoft.pat.wrap"); -Clazz.load (["com.stevesoft.pat.StringLike"], "com.stevesoft.pat.wrap.StringWrap", ["com.stevesoft.pat.wrap.StringBufferWrap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.s = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat.wrap, "StringWrap", null, com.stevesoft.pat.StringLike); -Clazz.makeConstructor (c$, -function (s) { -this.s = s; -}, "~S"); -Clazz.overrideMethod (c$, "toString", -function () { -return this.s; -}); -Clazz.overrideMethod (c$, "charAt", -function (i) { -return this.s.charAt (i); -}, "~N"); -Clazz.overrideMethod (c$, "length", -function () { -return this.s.length; -}); -Clazz.overrideMethod (c$, "substring", -function (i1, i2) { -return this.s.substring (i1, i2); -}, "~N,~N"); -Clazz.overrideMethod (c$, "unwrap", -function () { -return this.s; -}); -Clazz.overrideMethod (c$, "newStringBufferLike", -function () { -return new com.stevesoft.pat.wrap.StringBufferWrap (); -}); -Clazz.overrideMethod (c$, "indexOf", -function (c) { -return this.s.indexOf (c); -}, "~S"); -}); +Clazz.declarePackage ("com.stevesoft.pat.wrap"); +Clazz.load (["com.stevesoft.pat.StringLike"], "com.stevesoft.pat.wrap.StringWrap", ["com.stevesoft.pat.wrap.StringBufferWrap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.s = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat.wrap, "StringWrap", null, com.stevesoft.pat.StringLike); +Clazz.makeConstructor (c$, +function (s) { +this.s = s; +}, "~S"); +Clazz.overrideMethod (c$, "toString", +function () { +return this.s; +}); +Clazz.overrideMethod (c$, "charAt", +function (i) { +return this.s.charAt (i); +}, "~N"); +Clazz.overrideMethod (c$, "length", +function () { +return this.s.length; +}); +Clazz.overrideMethod (c$, "substring", +function (i1, i2) { +return this.s.substring (i1, i2); +}, "~N,~N"); +Clazz.overrideMethod (c$, "unwrap", +function () { +return this.s; +}); +Clazz.overrideMethod (c$, "newStringBufferLike", +function () { +return new com.stevesoft.pat.wrap.StringBufferWrap (); +}); +Clazz.overrideMethod (c$, "indexOf", +function (c) { +return this.s.indexOf (c); +}, "~S"); +}); diff --git a/bin/com/stevesoft/pat/wrap/WriterWrap.js b/bin/com/stevesoft/pat/wrap/WriterWrap.js index 4c80649..9eff73c 100644 --- a/bin/com/stevesoft/pat/wrap/WriterWrap.js +++ b/bin/com/stevesoft/pat/wrap/WriterWrap.js @@ -1,41 +1,41 @@ -Clazz.declarePackage ("com.stevesoft.pat.wrap"); -Clazz.load (["com.stevesoft.pat.BasicStringBufferLike"], "com.stevesoft.pat.wrap.WriterWrap", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.w = null; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat.wrap, "WriterWrap", null, com.stevesoft.pat.BasicStringBufferLike); -Clazz.makeConstructor (c$, -function (w) { -this.w = w; -}, "java.io.Writer"); -Clazz.overrideMethod (c$, "appendC", -function (c) { -try { -this.w.write ((c).charCodeAt (0)); -} catch (ioe) { -if (Clazz.exceptionOf (ioe, java.io.IOException)) { -} else { -throw ioe; -} -} -}, "~S"); -Clazz.overrideMethod (c$, "append", -function (s) { -try { -this.w.write (s); -} catch (ioe) { -if (Clazz.exceptionOf (ioe, java.io.IOException)) { -} else { -throw ioe; -} -} -}, "~S"); -Clazz.overrideMethod (c$, "toStringLike", -function () { -return null; -}); -Clazz.overrideMethod (c$, "unwrap", -function () { -return this.w; -}); -}); +Clazz.declarePackage ("com.stevesoft.pat.wrap"); +Clazz.load (["com.stevesoft.pat.BasicStringBufferLike"], "com.stevesoft.pat.wrap.WriterWrap", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.w = null; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat.wrap, "WriterWrap", null, com.stevesoft.pat.BasicStringBufferLike); +Clazz.makeConstructor (c$, +function (w) { +this.w = w; +}, "java.io.Writer"); +Clazz.overrideMethod (c$, "appendC", +function (c) { +try { +this.w.write ((c).charCodeAt (0)); +} catch (ioe) { +if (Clazz.exceptionOf (ioe, java.io.IOException)) { +} else { +throw ioe; +} +} +}, "~S"); +Clazz.overrideMethod (c$, "append", +function (s) { +try { +this.w.write (s); +} catch (ioe) { +if (Clazz.exceptionOf (ioe, java.io.IOException)) { +} else { +throw ioe; +} +} +}, "~S"); +Clazz.overrideMethod (c$, "toStringLike", +function () { +return null; +}); +Clazz.overrideMethod (c$, "unwrap", +function () { +return this.w; +}); +}); diff --git a/bin/fr/orsay/lri/varna/models/rna/RNA.js b/bin/fr/orsay/lri/varna/models/rna/RNA.js index 18df75b..c762cf3 100644 --- a/bin/fr/orsay/lri/varna/models/rna/RNA.js +++ b/bin/fr/orsay/lri/varna/models/rna/RNA.js @@ -1,10 +1,10 @@ -Clazz.declarePackage ("fr.orsay.lri.varna.models.rna"); -c$ = Clazz.declareType (fr.orsay.lri.varna.models.rna, "RNA"); -Clazz.defineMethod (c$, "getSize", -function () { -return 0; -}); -Clazz.defineMethod (c$, "getStructDBN", -function (b) { -return null; -}, "~B"); +Clazz.declarePackage ("fr.orsay.lri.varna.models.rna"); +c$ = Clazz.declareType (fr.orsay.lri.varna.models.rna, "RNA"); +Clazz.defineMethod (c$, "getSize", +function () { +return 0; +}); +Clazz.defineMethod (c$, "getStructDBN", +function (b) { +return null; +}, "~B"); diff --git a/bin/jalview/analysis/AAFrequency.class b/bin/jalview/analysis/AAFrequency.class index 4b1e3065d6698b422d98bc84dad8d0011b4caaa9..89830d7601b4926465fa31b9d0df9c88ec8622f8 100644 GIT binary patch delta 104 zcmX?`bSi0sr37Q)W-E!A%*@vr#3o;p&gT#nS7T%P&%idhP)1@hpA6gN9GM4<9GiV* z&$2LEF(_@8RXWVb$Upg^vKo6JJ44xj238 width) { -width = seqs[i].getLength (); -}} -var reply = new Array (width); -if (end >= width) { -end = width; -}jalview.analysis.AAFrequency.calculate (seqs, start, end, reply, profile); -return reply; -}}, "java.util.List,~N,~N,~B"); -c$.calculate = Clazz.defineMethod (c$, "calculate", -function (sequences, start, end, result, profile) { -var residueHash; -var maxCount; -var nongap; -var i; -var j; -var v; -var jSize = sequences.length; -var maxResidue; -var c = '-'; -var percentage; -var values = Clazz.newIntArray (255, 0); -var seq; -for (i = start; i < end; i++) { -residueHash = new java.util.Hashtable (); -maxCount = 0; -maxResidue = ""; -nongap = 0; -values = Clazz.newIntArray (255, 0); -for (j = 0; j < jSize; j++) { -if (sequences[j] == null) { -System.err.println ("WARNING: Consensus skipping null sequence - possible race condition."); -continue; -}seq = sequences[j].getSequence (); -if (seq.length > i) { -c = seq[i]; -if (c == '.' || c == ' ') { -c = '-'; -}if (c == '-') { -values['-'.charCodeAt (0)]++; -continue; -} else if ('a' <= c && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) + -32); -}nongap++; -values[c.charCodeAt (0)]++; -} else { -values['-'.charCodeAt (0)]++; -}} -if (jSize == 1) { -maxResidue = String.valueOf (c); -maxCount = 1; -} else { -for (v = 65; v <= 90; v++) { -if (values[v] < 1 || values[v] < maxCount) { -continue; -}if (values[v] > maxCount) { -maxResidue = jalview.analysis.AAFrequency.CHARS[v - 65]; -} else if (values[v] == maxCount) { -maxResidue += jalview.analysis.AAFrequency.CHARS[v - 65]; -}maxCount = values[v]; -} -}if (maxResidue.length == 0) { -maxResidue = "-"; -}if (profile) { -residueHash.put ("P", Clazz.newArray (-1, [values, Clazz.newIntArray (-1, [jSize, nongap])])); -}residueHash.put ("C", new Integer (maxCount)); -residueHash.put ("R", maxResidue); -percentage = (maxCount * 100) / jSize; -residueHash.put ("G", new Float (percentage)); -if (nongap > 0) { -percentage = (maxCount * 100) / nongap; -}residueHash.put ("N", new Float (percentage)); -result[i] = residueHash; -} -}, "~A,~N,~N,~A,~B"); -c$.completeConsensus = Clazz.defineMethod (c$, "completeConsensus", -function (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, nseq) { -jalview.analysis.AAFrequency.completeConsensus (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, null, nseq); -}, "jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~B,~B,~N"); -c$.completeConsensus = Clazz.defineMethod (c$, "completeConsensus", -function (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, alphabet, nseq) { -if (consensus == null || consensus.annotations == null || consensus.annotations.length < width) { -return; -}var fmt = jalview.analysis.AAFrequency.getPercentageFormat (nseq); -for (var i = iStart; i < width; i++) { -var hci; -if (i >= hconsensus.length || ((hci = hconsensus[i]) == null)) { -consensus.annotations[i] = null; -continue; -}var fv = hci.get (ignoreGapsInConsensusCalculation ? "N" : "G"); -if (fv == null) { -consensus.annotations[i] = null; -continue; -}var value = fv.floatValue (); -var maxRes = hci.get ("R").toString (); -var mouseOver = new StringBuilder (64); -if (maxRes.length > 1) { -mouseOver.append ("[").append (maxRes).append ("] "); -maxRes = "+"; -} else { -mouseOver.append (hci.get ("R") + " "); -}var profile = hci.get ("P"); -if (profile != null && includeAllConsSymbols) { -var sequenceCount = profile[1][0]; -var nonGappedCount = profile[1][1]; -var normalisedBy = ignoreGapsInConsensusCalculation ? nonGappedCount : sequenceCount; -mouseOver.setLength (0); -if (alphabet != null) { -for (var c = 0; c < alphabet.length; c++) { -var tval = profile[0][alphabet[c].charCodeAt (0)] * 100 / normalisedBy; -mouseOver.append (((c == 0) ? "" : "; ")).append (alphabet[c]).append (" ").append (((fmt != null) ? fmt.formDouble (tval) : (Clazz.floatToInt (tval)))).append ("%"); -} -} else { -var ca = Clazz.newCharArray (profile[0].length, '\0'); -var vl = Clazz.newFloatArray (profile[0].length, 0); -for (var c = 0; c < ca.length; c++) { -ca[c] = String.fromCharCode (c); -vl[c] = profile[0][c]; -} -jalview.util.QuickSort.sortFloatChar (vl, ca); -for (var p = 0, c = ca.length - 1; profile[0][ca[c].charCodeAt (0)] > 0; c--) { -var residue = ca[c]; -if (residue != '-') { -var tval = profile[0][residue.charCodeAt (0)] * 100 / normalisedBy; -mouseOver.append ((((p == 0) ? "" : "; "))).append (residue).append (" ").append (((fmt != null) ? fmt.formDouble (tval) : (Clazz.floatToInt (tval)))).append ("%"); -p++; -}} -}} else { -mouseOver.append ((((fmt != null) ? fmt.formDouble (value) : (Clazz.floatToInt (value))))).append ("%"); -}consensus.annotations[i] = new jalview.datamodel.Annotation (maxRes, mouseOver.toString (), ' ', value); -} -}, "jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~B,~B,~A,~N"); -c$.getPercentageFormat = Clazz.defineMethod (c$, "getPercentageFormat", -function (nseq) { -var scale = 0; -while (nseq >= 10) { -scale++; -nseq /= 10; -} -return scale <= 1 ? null : new jalview.util.Format ("%3." + (scale - 1) + "f"); -}, "~N"); -c$.extractProfile = Clazz.defineMethod (c$, "extractProfile", -function (hconsensus, ignoreGaps) { -var rtnval = Clazz.newIntArray (64, 0); -var profile = hconsensus.get ("P"); -if (profile == null) { -return null; -}var ca = Clazz.newCharArray (profile[0].length, '\0'); -var vl = Clazz.newFloatArray (profile[0].length, 0); -for (var c = 0; c < ca.length; c++) { -ca[c] = String.fromCharCode (c); -vl[c] = profile[0][c]; -} -jalview.util.QuickSort.sortFloatChar (vl, ca); -var nextArrayPos = 2; -var totalPercentage = 0; -var distinctValuesCount = 0; -var divisor = profile[1][ignoreGaps ? 1 : 0]; -for (var c = ca.length - 1; profile[0][ca[c].charCodeAt (0)] > 0; c--) { -if (ca[c] != '-') { -rtnval[nextArrayPos++] = (ca[c]).charCodeAt (0); -var percentage = Clazz.floatToInt (profile[0][ca[c].charCodeAt (0)] * 100 / divisor); -rtnval[nextArrayPos++] = percentage; -totalPercentage += percentage; -distinctValuesCount++; -}} -rtnval[0] = distinctValuesCount; -rtnval[1] = totalPercentage; -var result = Clazz.newIntArray (rtnval.length + 1, 0); -result[0] = 0; -System.arraycopy (rtnval, 0, result, 1, rtnval.length); -return result; -}, "java.util.Hashtable,~B"); -c$.extractCdnaProfile = Clazz.defineMethod (c$, "extractCdnaProfile", -function (hashtable, ignoreGaps) { -var codonCounts = hashtable.get ("P"); -var sortedCounts = Clazz.newIntArray (codonCounts.length - 2, 0); -System.arraycopy (codonCounts, 2, sortedCounts, 0, codonCounts.length - 2); -var result = Clazz.newIntArray (3 + 2 * sortedCounts.length, 0); -result[0] = 2; -var codons = Clazz.newCharArray (sortedCounts.length, '\0'); -for (var i = 0; i < codons.length; i++) { -codons[i] = String.fromCharCode (i); -} -jalview.util.QuickSort.sortIntChar (sortedCounts, codons); -var totalPercentage = 0; -var distinctValuesCount = 0; -var j = 3; -var divisor = ignoreGaps ? codonCounts[1] : codonCounts[0]; -for (var i = codons.length - 1; i >= 0; i--) { -var codonCount = sortedCounts[i]; -if (codonCount == 0) { -break; -}distinctValuesCount++; -result[j++] = (codons[i]).charCodeAt (0); -var percentage = Clazz.doubleToInt (codonCount * 100 / divisor); -result[j++] = percentage; -totalPercentage += percentage; -} -result[2] = totalPercentage; -result[1] = distinctValuesCount; -return java.util.Arrays.copyOfRange (result, 0, j); -}, "java.util.Hashtable,~B"); -c$.calculateCdna = Clazz.defineMethod (c$, "calculateCdna", -function (alignment, mappings, hconsensus, col0, col1) { -var gapCharacter = alignment.getGapCharacter (); -for (var col = col0; col < col1; col++) { -var columnHash = new java.util.Hashtable (); -var codonCounts = Clazz.newIntArray (66, 0); -codonCounts[0] = alignment.getSequences ().size (); -var ungappedCount = 0; -for (var seq, $seq = alignment.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -if (seq.getCharAt (col) == gapCharacter) { -continue; -}var codon = jalview.util.MappingUtils.findCodonFor (seq, col, mappings); -var codonEncoded = jalview.analysis.CodingUtils.encodeCodon (codon); -if (codonEncoded >= 0) { -codonCounts[codonEncoded + 2]++; -ungappedCount++; -}} -codonCounts[1] = ungappedCount; -columnHash.put ("P", codonCounts); -hconsensus[col] = columnHash; -} -}, "jalview.datamodel.AlignmentI,java.util.Set,~A,~N,~N"); -c$.completeCdnaConsensus = Clazz.defineMethod (c$, "completeCdnaConsensus", -function (consensusAnnotation, consensusData, showProfileLogo, nseqs) { -if (consensusAnnotation == null || consensusAnnotation.annotations == null || consensusAnnotation.annotations.length < consensusData.length) { -return; -}consensusAnnotation.scaleColLabel = true; -for (var col = 0; col < consensusData.length; col++) { -var hci = consensusData[col]; -if (hci == null) { -continue; -}var codonCounts = hci.get ("P"); -var totalCount = 0; -var codons = Clazz.newCharArray (codonCounts.length - 2, '\0'); -for (var j = 2; j < codonCounts.length; j++) { -var codonCount = codonCounts[j]; -codons[j - 2] = String.fromCharCode (j - 2); -totalCount += codonCount; -} -var sortedCodonCounts = Clazz.newIntArray (codonCounts.length - 2, 0); -System.arraycopy (codonCounts, 2, sortedCodonCounts, 0, codonCounts.length - 2); -jalview.util.QuickSort.sortIntChar (sortedCodonCounts, codons); -var modalCodonEncoded = (codons[codons.length - 1]).charCodeAt (0); -var modalCodonCount = sortedCodonCounts[codons.length - 1]; -var modalCodon = String.valueOf (jalview.analysis.CodingUtils.decodeCodon (modalCodonEncoded)); -if (sortedCodonCounts.length > 1 && sortedCodonCounts[codons.length - 2] == modalCodonEncoded) { -modalCodon = "+"; -}var pid = sortedCodonCounts[sortedCodonCounts.length - 1] * 100 / totalCount; -var mouseOver = new StringBuilder (32); -var samePercent = new StringBuilder (); -var percent = null; -var lastPercent = null; -var fmt = jalview.analysis.AAFrequency.getPercentageFormat (nseqs); -for (var j = codons.length - 1; j >= 0; j--) { -var codonCount = sortedCodonCounts[j]; -if (codonCount == 0) { -if (samePercent.length () > 0) { -mouseOver.append (samePercent).append (": ").append (percent).append ("% "); -}break; -}var codonEncoded = (codons[j]).charCodeAt (0); -var pct = Clazz.doubleToInt (codonCount * 100 / totalCount); -var codon = String.valueOf (jalview.analysis.CodingUtils.decodeCodon (codonEncoded)); -percent = fmt == null ? Integer.toString (pct) : fmt.formLong (pct); -if (showProfileLogo || codonCount == modalCodonCount) { -if (percent.equals (lastPercent) && j > 0) { -samePercent.append (samePercent.length () == 0 ? "" : ", "); -samePercent.append (codon); -} else { -if (samePercent.length () > 0) { -mouseOver.append (samePercent).append (": ").append (lastPercent).append ("% "); -}samePercent.setLength (0); -samePercent.append (codon); -}lastPercent = percent; -}} -consensusAnnotation.annotations[col] = new jalview.datamodel.Annotation (modalCodon, mouseOver.toString (), ' ', pid); -} -}, "jalview.datamodel.AlignmentAnnotation,~A,~B,~N"); -Clazz.defineStatics (c$, -"TO_UPPER_CASE", -32, -"MAXCOUNT", "C", -"MAXRESIDUE", "R", -"PID_GAPS", "G", -"PID_NOGAPS", "N", -"PROFILE", "P", -"ENCODED_CHARS", "E"); -c$.CHARS = c$.prototype.CHARS = new Array (26); -{ -for (var c = 'A'; c <= 'Z'; c = String.fromCharCode (c.charCodeAt (0) + 1)) { -jalview.analysis.AAFrequency.CHARS[c.charCodeAt (0) - 65] = String.valueOf (c); -} -}}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.AAFrequency", ["jalview.analysis.CodingUtils", "jalview.datamodel.Annotation", "jalview.util.Format", "$.MappingUtils", "$.QuickSort", "java.lang.Float", "$.StringBuilder", "java.util.Arrays", "$.Hashtable"], function () { +c$ = Clazz.declareType (jalview.analysis, "AAFrequency"); +c$.calculate = Clazz.defineMethod (c$, "calculate", +function (list, start, end) { +return jalview.analysis.AAFrequency.calculate (list, start, end, false); +}, "java.util.List,~N,~N"); +c$.calculate = Clazz.defineMethod (c$, "calculate", +function (sequences, start, end, profile) { +var seqs = new Array (sequences.size ()); +var width = 0; +{ +for (var i = 0; i < sequences.size (); i++) { +seqs[i] = sequences.get (i); +if (seqs[i].getLength () > width) { +width = seqs[i].getLength (); +}} +var reply = new Array (width); +if (end >= width) { +end = width; +}jalview.analysis.AAFrequency.calculate (seqs, start, end, reply, profile); +return reply; +}}, "java.util.List,~N,~N,~B"); +c$.calculate = Clazz.defineMethod (c$, "calculate", +function (sequences, start, end, result, profile) { +var residueHash; +var maxCount; +var nongap; +var i; +var j; +var v; +var jSize = sequences.length; +var maxResidue; +var c = '-'; +var percentage; +var values = Clazz.newIntArray (255, 0); +var seq; +for (i = start; i < end; i++) { +residueHash = new java.util.Hashtable (); +maxCount = 0; +maxResidue = ""; +nongap = 0; +values = Clazz.newIntArray (255, 0); +for (j = 0; j < jSize; j++) { +if (sequences[j] == null) { +System.err.println ("WARNING: Consensus skipping null sequence - possible race condition."); +continue; +}seq = sequences[j].getSequence (); +if (seq.length > i) { +c = seq[i]; +if (c == '.' || c == ' ') { +c = '-'; +}if (c == '-') { +values['-'.charCodeAt (0)]++; +continue; +} else if ('a' <= c && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) + -32); +}nongap++; +values[c.charCodeAt (0)]++; +} else { +values['-'.charCodeAt (0)]++; +}} +if (jSize == 1) { +maxResidue = String.valueOf (c); +maxCount = 1; +} else { +for (v = 65; v <= 90; v++) { +if (values[v] < 1 || values[v] < maxCount) { +continue; +}if (values[v] > maxCount) { +maxResidue = jalview.analysis.AAFrequency.CHARS[v - 65]; +} else if (values[v] == maxCount) { +maxResidue += jalview.analysis.AAFrequency.CHARS[v - 65]; +}maxCount = values[v]; +} +}if (maxResidue.length == 0) { +maxResidue = "-"; +}if (profile) { +residueHash.put ("P", Clazz.newArray (-1, [values, Clazz.newIntArray (-1, [jSize, nongap])])); +}residueHash.put ("C", new Integer (maxCount)); +residueHash.put ("R", maxResidue); +percentage = (maxCount * 100) / jSize; +residueHash.put ("G", new Float (percentage)); +if (nongap > 0) { +percentage = (maxCount * 100) / nongap; +}residueHash.put ("N", new Float (percentage)); +result[i] = residueHash; +} +}, "~A,~N,~N,~A,~B"); +c$.completeConsensus = Clazz.defineMethod (c$, "completeConsensus", +function (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, nseq) { +jalview.analysis.AAFrequency.completeConsensus (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, null, nseq); +}, "jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~B,~B,~N"); +c$.completeConsensus = Clazz.defineMethod (c$, "completeConsensus", +function (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, alphabet, nseq) { +if (consensus == null || consensus.annotations == null || consensus.annotations.length < width) { +return; +}var fmt = jalview.analysis.AAFrequency.getPercentageFormat (nseq); +for (var i = iStart; i < width; i++) { +var hci; +if (i >= hconsensus.length || ((hci = hconsensus[i]) == null)) { +consensus.annotations[i] = null; +continue; +}var fv = hci.get (ignoreGapsInConsensusCalculation ? "N" : "G"); +if (fv == null) { +consensus.annotations[i] = null; +continue; +}var value = fv.floatValue (); +var maxRes = hci.get ("R").toString (); +var mouseOver = new StringBuilder (64); +if (maxRes.length > 1) { +mouseOver.append ("[").append (maxRes).append ("] "); +maxRes = "+"; +} else { +mouseOver.append (hci.get ("R") + " "); +}var profile = hci.get ("P"); +if (profile != null && includeAllConsSymbols) { +var sequenceCount = profile[1][0]; +var nonGappedCount = profile[1][1]; +var normalisedBy = ignoreGapsInConsensusCalculation ? nonGappedCount : sequenceCount; +mouseOver.setLength (0); +if (alphabet != null) { +for (var c = 0; c < alphabet.length; c++) { +var tval = profile[0][alphabet[c].charCodeAt (0)] * 100 / normalisedBy; +mouseOver.append (((c == 0) ? "" : "; ")).append (alphabet[c]).append (" ").append (((fmt != null) ? fmt.formDouble (tval) : (Clazz.floatToInt (tval)))).append ("%"); +} +} else { +var ca = Clazz.newCharArray (profile[0].length, '\0'); +var vl = Clazz.newFloatArray (profile[0].length, 0); +for (var c = 0; c < ca.length; c++) { +ca[c] = String.fromCharCode (c); +vl[c] = profile[0][c]; +} +jalview.util.QuickSort.sortFloatChar (vl, ca); +for (var p = 0, c = ca.length - 1; profile[0][ca[c].charCodeAt (0)] > 0; c--) { +var residue = ca[c]; +if (residue != '-') { +var tval = profile[0][residue.charCodeAt (0)] * 100 / normalisedBy; +mouseOver.append ((((p == 0) ? "" : "; "))).append (residue).append (" ").append (((fmt != null) ? fmt.formDouble (tval) : (Clazz.floatToInt (tval)))).append ("%"); +p++; +}} +}} else { +mouseOver.append ((((fmt != null) ? fmt.formDouble (value) : (Clazz.floatToInt (value))))).append ("%"); +}consensus.annotations[i] = new jalview.datamodel.Annotation (maxRes, mouseOver.toString (), ' ', value); +} +}, "jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~B,~B,~A,~N"); +c$.getPercentageFormat = Clazz.defineMethod (c$, "getPercentageFormat", +function (nseq) { +var scale = 0; +while (nseq >= 10) { +scale++; +nseq /= 10; +} +return scale <= 1 ? null : new jalview.util.Format ("%3." + (scale - 1) + "f"); +}, "~N"); +c$.extractProfile = Clazz.defineMethod (c$, "extractProfile", +function (hconsensus, ignoreGaps) { +var rtnval = Clazz.newIntArray (64, 0); +var profile = hconsensus.get ("P"); +if (profile == null) { +return null; +}var ca = Clazz.newCharArray (profile[0].length, '\0'); +var vl = Clazz.newFloatArray (profile[0].length, 0); +for (var c = 0; c < ca.length; c++) { +ca[c] = String.fromCharCode (c); +vl[c] = profile[0][c]; +} +jalview.util.QuickSort.sortFloatChar (vl, ca); +var nextArrayPos = 2; +var totalPercentage = 0; +var distinctValuesCount = 0; +var divisor = profile[1][ignoreGaps ? 1 : 0]; +for (var c = ca.length - 1; profile[0][ca[c].charCodeAt (0)] > 0; c--) { +if (ca[c] != '-') { +rtnval[nextArrayPos++] = (ca[c]).charCodeAt (0); +var percentage = Clazz.floatToInt (profile[0][ca[c].charCodeAt (0)] * 100 / divisor); +rtnval[nextArrayPos++] = percentage; +totalPercentage += percentage; +distinctValuesCount++; +}} +rtnval[0] = distinctValuesCount; +rtnval[1] = totalPercentage; +var result = Clazz.newIntArray (rtnval.length + 1, 0); +result[0] = 0; +System.arraycopy (rtnval, 0, result, 1, rtnval.length); +return result; +}, "java.util.Hashtable,~B"); +c$.extractCdnaProfile = Clazz.defineMethod (c$, "extractCdnaProfile", +function (hashtable, ignoreGaps) { +var codonCounts = hashtable.get ("P"); +var sortedCounts = Clazz.newIntArray (codonCounts.length - 2, 0); +System.arraycopy (codonCounts, 2, sortedCounts, 0, codonCounts.length - 2); +var result = Clazz.newIntArray (3 + 2 * sortedCounts.length, 0); +result[0] = 2; +var codons = Clazz.newCharArray (sortedCounts.length, '\0'); +for (var i = 0; i < codons.length; i++) { +codons[i] = String.fromCharCode (i); +} +jalview.util.QuickSort.sortIntChar (sortedCounts, codons); +var totalPercentage = 0; +var distinctValuesCount = 0; +var j = 3; +var divisor = ignoreGaps ? codonCounts[1] : codonCounts[0]; +for (var i = codons.length - 1; i >= 0; i--) { +var codonCount = sortedCounts[i]; +if (codonCount == 0) { +break; +}distinctValuesCount++; +result[j++] = (codons[i]).charCodeAt (0); +var percentage = Clazz.doubleToInt (codonCount * 100 / divisor); +result[j++] = percentage; +totalPercentage += percentage; +} +result[2] = totalPercentage; +result[1] = distinctValuesCount; +return java.util.Arrays.copyOfRange (result, 0, j); +}, "java.util.Hashtable,~B"); +c$.calculateCdna = Clazz.defineMethod (c$, "calculateCdna", +function (alignment, mappings, hconsensus, col0, col1) { +var gapCharacter = alignment.getGapCharacter (); +for (var col = col0; col < col1; col++) { +var columnHash = new java.util.Hashtable (); +var codonCounts = Clazz.newIntArray (66, 0); +codonCounts[0] = alignment.getSequences ().size (); +var ungappedCount = 0; +for (var seq, $seq = alignment.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +if (seq.getCharAt (col) == gapCharacter) { +continue; +}var codon = jalview.util.MappingUtils.findCodonFor (seq, col, mappings); +var codonEncoded = jalview.analysis.CodingUtils.encodeCodon (codon); +if (codonEncoded >= 0) { +codonCounts[codonEncoded + 2]++; +ungappedCount++; +}} +codonCounts[1] = ungappedCount; +columnHash.put ("P", codonCounts); +hconsensus[col] = columnHash; +} +}, "jalview.datamodel.AlignmentI,java.util.Set,~A,~N,~N"); +c$.completeCdnaConsensus = Clazz.defineMethod (c$, "completeCdnaConsensus", +function (consensusAnnotation, consensusData, showProfileLogo, nseqs) { +if (consensusAnnotation == null || consensusAnnotation.annotations == null || consensusAnnotation.annotations.length < consensusData.length) { +return; +}consensusAnnotation.scaleColLabel = true; +for (var col = 0; col < consensusData.length; col++) { +var hci = consensusData[col]; +if (hci == null) { +continue; +}var codonCounts = hci.get ("P"); +var totalCount = 0; +var codons = Clazz.newCharArray (codonCounts.length - 2, '\0'); +for (var j = 2; j < codonCounts.length; j++) { +var codonCount = codonCounts[j]; +codons[j - 2] = String.fromCharCode (j - 2); +totalCount += codonCount; +} +var sortedCodonCounts = Clazz.newIntArray (codonCounts.length - 2, 0); +System.arraycopy (codonCounts, 2, sortedCodonCounts, 0, codonCounts.length - 2); +jalview.util.QuickSort.sortIntChar (sortedCodonCounts, codons); +var modalCodonEncoded = (codons[codons.length - 1]).charCodeAt (0); +var modalCodonCount = sortedCodonCounts[codons.length - 1]; +var modalCodon = String.valueOf (jalview.analysis.CodingUtils.decodeCodon (modalCodonEncoded)); +if (sortedCodonCounts.length > 1 && sortedCodonCounts[codons.length - 2] == modalCodonEncoded) { +modalCodon = "+"; +}var pid = sortedCodonCounts[sortedCodonCounts.length - 1] * 100 / totalCount; +var mouseOver = new StringBuilder (32); +var samePercent = new StringBuilder (); +var percent = null; +var lastPercent = null; +var fmt = jalview.analysis.AAFrequency.getPercentageFormat (nseqs); +for (var j = codons.length - 1; j >= 0; j--) { +var codonCount = sortedCodonCounts[j]; +if (codonCount == 0) { +if (samePercent.length () > 0) { +mouseOver.append (samePercent).append (": ").append (percent).append ("% "); +}break; +}var codonEncoded = (codons[j]).charCodeAt (0); +var pct = Clazz.doubleToInt (codonCount * 100 / totalCount); +var codon = String.valueOf (jalview.analysis.CodingUtils.decodeCodon (codonEncoded)); +percent = fmt == null ? Integer.toString (pct) : fmt.formLong (pct); +if (showProfileLogo || codonCount == modalCodonCount) { +if (percent.equals (lastPercent) && j > 0) { +samePercent.append (samePercent.length () == 0 ? "" : ", "); +samePercent.append (codon); +} else { +if (samePercent.length () > 0) { +mouseOver.append (samePercent).append (": ").append (lastPercent).append ("% "); +}samePercent.setLength (0); +samePercent.append (codon); +}lastPercent = percent; +}} +consensusAnnotation.annotations[col] = new jalview.datamodel.Annotation (modalCodon, mouseOver.toString (), ' ', pid); +} +}, "jalview.datamodel.AlignmentAnnotation,~A,~B,~N"); +Clazz.defineStatics (c$, +"TO_UPPER_CASE", -32, +"MAXCOUNT", "C", +"MAXRESIDUE", "R", +"PID_GAPS", "G", +"PID_NOGAPS", "N", +"PROFILE", "P", +"ENCODED_CHARS", "E"); +c$.CHARS = c$.prototype.CHARS = new Array (26); +{ +for (var c = 'A'; c <= 'Z'; c = String.fromCharCode (c.charCodeAt (0) + 1)) { +jalview.analysis.AAFrequency.CHARS[c.charCodeAt (0) - 65] = String.valueOf (c); +} +}}); diff --git a/bin/jalview/analysis/AlignSeq.class b/bin/jalview/analysis/AlignSeq.class index 7d2744fb8a333745bd5c828770f90f72c57b3dc4..b5cdebf72a87914c2276d145ae52c65125ca2f9b 100644 GIT binary patch delta 7055 zcmbVQ34ByV(yyxS%$v--oWp|*NnnTsauNt6!T@q3L2d%sfC2#qh=e32!yzDp2r7z# zJkF?GBEj`Qt_k516+r}91w~O11o6TX6c-h;)sq8Vb^U%HOkV$AcXf3gUDeg^+Ee(+ zQ)qkR`p&%okWN2uwhalbhfy%qhEaI0j&V2#AtoU!(cB#A6jq#T&JT@^x?jf$c$XC) zLUejHcNzEPc>Y1nF|STvl9; zAY7>~J1oPMI+no(1j~4jw@2YvD?Wix&y`Teyued9-aEn7k!P)9#)&pqglm*|YZ0Q& z*&+4JGpPA&7>rNpxE`NI2+A+LHLsZ0O6Zn2%!=haYo-n6;WIk^6Q5H~u;Pmd4F-5h#&`<7dE-5ig5FB^rP035kFG?Fwl3(Z@>@D%+P13OvuJCfjs!PLN z<~`xl;|}O}5cjYtiY9xlc!)uK+koK?GdUhX=wPmjNHAA4cC;UA#iMFGgU9{&mX2>j z27(q~S5Roh<7%*VsTJR4z2jStbty^T)A4;gX)cTy@A+8A5}afM#PbS$!uC$c%F0U2 z((qFRXF%e~-u!|z7B|0ee0I@9PhtLaPl*jLz%jKWzRi89OU^5narg;N| zs`ncmzcq(P9vk2%P|{t|h!8>pjPs^?)4CNE6qVQrNirh}QtS8Z*)wsdjWi0@$chkA zM|*2YUh#zdF{L`$$Zp=_xXG$fh)$stW^QyGHk?Y7$*c=S>v#q-6pA$;tk=0|T&?i~ zs&pwS$-BExeyP_+O?X>VJT=#-nfX<{s2&Lj^?7Ue2`pKVS2#W`tI+Ei?1LME%+-c6HDXsp-Y{X7*He<`Eh^FJW@>9L zG+e3i?6FfD>ZsE#P{nSXkXPD|jj2&*-usIi)QhoEC+eyU)s5|( zFg$Cx^3_m{da$odSG3b+qwaL8BIsqN)o*0!PQ7)yZR_Cr$0&FlP0(mO$FAAGQFKO@ zPWftKwds3#^2bl`+G!%S)Tp4=I{{lMGudez73x$(#pWz$LJrGcpBgCRdUbdjHdtv2 zLReQ%sn<1lOi_u)#rxl7rD+J{a;v%1b(#U6GuyGA0*}{I8^LP5RP~splaFSb*PJfv zM4F@1eKgmMZ`d@X3C&W&59stD%{PZOOwXH0Nt_yJfliO8sL@J2-hO$LJgRS@PK(s; z3uS$}drHTY9n3!vKtHX$9elt;rQUr4LX&Z zo1z<7p3&)_^sIR#y0_(donD|#W=u>c%VyfD(H1i=#t_?RyLop^YgWHPryW$ebz961 z3jaull{lR<7@gJWV>)NfY@8nR34N;3g<2m4wrJlx?*tBB`pkTz@#EST8iZ=}-PQuv z&WPaIpg}NzoMNV>SNL{eRBi?OlD1(g|J|O>j}a~WINOg+{TROmI`T6oX&aahypJKH zJ$spE)Yu(3@4pEisHNS7^K%tr2R>YZF@|J*4t&IqF6LT+3z^COO5mL3N8h5_ISyP> z&7X(fL8xZ$z-6_axT3bRMx4h3BN*XFqn7wd?)sg`e=CvihDZl%MEavdJn~104p#n^ zM2 z&d^71#~Ib0+hAsAw65Zftvzu z#2M_=&204TU?!_UKluH)y&Qtv+GarMk;SqUcbe-myZEx;6!nHr={C4Veb7pMu|4&} zZ0e79(g5_*Kzx7(;iEJdS5h_}p&@vIhT<=jLqYTpilSW3$-^m`M$qjvibnH)FO8*# z884*?w1)EOI2F)IDx`~4EOfd{L{f=};1P$uwDH(iG8-rivbPx5%dHVhp$W zG*fu#9x;_>i#aq$%%gc?5fz9sdRT0v1>!h8B2IF9iWZ7<^qBa8OlhZu(xBzC84Z^$ zsZ92w$7K#ZAxCoSp*6CY*2>AW9!j}lDh50FIN)FvtmaonxEuEXmj$u__kslo>dDdg z5+ea|G8^|nEJ#=`&fv?8f?%UKimx!TPy(NRUPc;?giI`DWTg|ZzZ!`%wSDj)jTtfVnX%grc==}?f>=8Dte=3A zfR+&e^a9&v6X>)VB54~mAU`D14oIV&(1Y84v0_mCiwb`UG<5Q^=#wU<_S^V)`1U(>E}az6BqB2Mg#DETJD@ z75xZn=qfx-znF>blkp>SNc$#u#+=%I7M?Y)w7(h8nJqf>VLYQlOUBQ2=*9TQ4k`SM z>)4fhJRQ@00xUv;E;L9KR>%~=&`IdfU4%iQ2!|OW5;ll>u!;LBL=@~64dIZ8hRY%r zn~Fx5Dxxq$#GzX>#m=G`P7=+rOeErqA_-4&ds-yp*F1KGX|9VFH%y0B)usyv3tkOa z47tF&jHk?Iw-ov=$0lLoOznQSm)k2 zu(GE+fK}WAHqjaCi7wz0-QXtC15&tcEqVpkPvU?9Xp7&mv(&$~_&p;ok)SDF!pj_D zH@W!W{sDhv*Qw|T1!=`=5T)S-4Wq2Q$+^@uGdpD(xgf-FUhodEi%}3EM)RT`^WIJk zj4SMT-LfzYiHZ>C$o9y=GesS-+AWX zoi+P7owpW41)pvbO+^QaEv}D^wGg3aPkMo;a$)GKP(*2qU>uvigUxgi#RKU_Uv`s;;f< z_4qv)7I11X%=X>V1(&U6aW`i|RKHX|HRQjTRJHjikXs_vrVZpa7DYRwF1= zGi0Wv92y(emCzu?&}s%#4NEmLU+!Mtm!d{BSq@T++HG?OvwZ*6WfPh96hEc8LpTvT zLn^5?!aj<3>&{@qKG%*;-B0cMs{t;A%c{;YIWzeaa@(Jf`>M_c#B&BagZIj@Mo@pJ z&1q9e_TNRFa=G6oWd(I{>$|9Xu2Zj|p6(E52$uo}{gmYlQKpmuQ*MAnHs!y0TU_NW z@iVj$zwmbW6}pM*ki}LWDG|m=0r}Db#nK9;(hjqHG87ica43@zuwFW#T-JkUr2(5{ zeb^!!LWPWhmt`y*mW|;kGdeAs!uK*Bg=~fv*&L%~A|`N~E>kc=rebfIhB@5k$#fhi z+hDQG!0Ga4oG;tq66wY#W&6N>+XoKiOYqek*tmxJz$A9H6<1JS>c`t792Zf4Mtor7 zEE*8lZ*8!E1_t(<8^_TgMi%Idqi8TA4Z7hSl+9eMd@wH$oE*WB&1b+64pbYAgd!Ts z$PVAZiw}Di^#74t3<)_{c|%n()u;d~2Lf0j?6%+0WS=Ao#|3bvLR0h~Lf& z^m9_FneiKrbt8dE;d}|HTda0SB_pn8+5kiuQB~lJ1N|?ESQg5o(R{*=VY!ILs=%`x z;{8>RUx(BLoZC_hv|3?WdVRh-2!z)Ck4i37|KnhV|d^drUg$%G7 z!qJ>mNi#VI>E+li$*@<_Jp}t$`p^_-XeHfCkeeAs>#-q^aYhL9(>xx{bu**;1>`s_ zis~U^q$%bPjaD#(JJt29lFMrdyb*t=tE9)O-<-A@KFCMFl3aIqB`p)+wBG2iW=WY5 zA~Uia?npKwtL37yZS;h>FU#p$&FhpyT403nJ}PrNoDNJK%^W9(Q*(Z$ZTjOhk#q=z(AP`*>V`< z$l)+d-VRgb2$(KM!c1=Om7_RgjfUlN3_LE!!fGCWMvjLAasnLX_HCIDC*_?!_*hPa zFPPb7ISEk~VW_+dWBIbwT6(dgoQ${fC1Hr1ieu#6c#oWp3*`)4EN9{hISZeavvISW zgWKg?+$rbbtMYz4ARoZv@^<`K+3KBd0`ub%k5BKRzQs0 z!JihkLyCL}(&a1AR_=#R@&I&|hoGlC41?tn7$x6?G4d_0!QO@XSw`32fO42*e^fl#P%hel^5Z>{01(K;01n_FL4caIZ#je zIdFl$S$I6co_->~EeqcJ+J1i@}uMmX6t}0GQ9NfR3%9$bX?S-l0 gpF delta 6904 zcmbVQ2Ygi3(w~`gvUkf(-Q0vF0hSU7DIfu2SW0LDL8L+K%Zd*p z*ams;n&d4U?R9H78^JjtH-B=T_wJUHe0ljTdlVHH5Pu?{}2bj~#k!Wu@; zXIhCJAHjO+Vd}UD7n?tar8QfMAl)9f+ltE(gge#kfF-z6$5pTa!7|S4yQy%D6<3@6 z!(CBpSxIv{8~dbE{FE~G{?KT1Ubv&_(>iXzQiPDalAgH}S!ZIm=EJS{ERUFOhgtZX zj{nBz%~!%>TD{1$7P9Lb09M?D5Zm8dJlb36%N^%+XLWaXbSI>>NE>UnD?7L7xD^AY z7SSxF9ADP3BDmzqxh?aGTJ|r_EA$QW6?=0Fble6%@!S&?Ny8oH@QA66-q3MB?&38S zO=6!MWRQ>%^uU`ej)xICnA0K?&H9ls8E+|OTV|HyQ61lbwg_5KSAL-tk11yB5-YyX zt4e4+#;puHq2mYmp_v~!F8)&;i?P5Ch@UI;1$!+qD=VvcmWE%N7bEK@pM|4pGrrcr z2Pf@#7SHQ=0Xpzz7J8@n1{dAwEmYKRb^OlEh&p;>Igv8rCygXR*o0hOZtmT_mfec- zi;C?e$ij+9Q`7Y5(WCiLJK4ygk=^X#j1fA8n!}xqtu_kRDS{%+S@^cHvwahB?dB=H+ zIUp$sAto`ad7r;9+w*Wr(J2)>vFmcjj8We$b-F=Clq|`c>Q#g^omvyMF`F7q-RYE} z(TxaEL0v&xvV7j+TwhVKPVLBJ<{R$RX4FBaj!K7>cX?=T{v@x1(kWA?&QQr4Ha@qc zFZ)xYt_aa)WK49tow`tW<*b|7*NL}g-Kw@_s75^zTnl4ec02W;EXD6_>M`{#J*baP zw`{&4<|x_5(*%w35aP|wb>iA)>2#->*v9G5%bPcDyw5=el%`Q(%?1T+R<3iPpP^=~RbY%HflBcp5fXX$nGkS8s{WJ!o`MvDZDesMu|#sR-ousIk*^x);7= zwPU>bUZ1xn-PL?8)#HAhX3zuX2QIg@fM)76iyktmZj;c)biZQH*6C4t%xqmZ%~L=r zoXRv;r+F$lv=XncZ*GBC(H7{mPz7KZucy1WWOQ-fL|Jp`Zqzx048K7Z2{AX4=`l3V<&S*jVZ^O{C%CkLp8G7@R6KtSSQDckCtJ) zAp0BZe^5WO-bJWV@5E(QlkTa&6*a_abDjut zFfxEfjqn;K{jV17tAIg&H7RHjv;Jz)zW->E^N$vp4co*w{IA|fVK0~?+T7TAUG_{X z8df7@UFBQK<9}GmKRDEh^_7xiZ3Y|bS3q1+&K8`e-?0^^Rc+ieW~a8T9sgPlkyYO> znA6*4{&%BNmA;d0+u=GhCcRz9mnJA>YP7P%i5r8vh|?Yq;AZyuRxpzlGXQ}AmX$(? zN81P}hsn`$EN(aFq<8W6f+Lg#C#W}kOE<$6>Vqxl7VJrV@pkHmFazlYHpIhxkW z@$?jwaQ`zA9N^~^gVnHxKN;ap+yw}BITBw13lK!hA-J27fJU+>z6$j~!cuV*Ut<&k z&xqZ)hmnQi$cjEj8V!VWEMa7&{jjGBiK8_%ILFiUgy^f#MT1QK!`Ni^Rh);2zp+dr zU4hQ`vA`<)h`k#} zpmV2qilKmTSQvD)gcN9mr_Dp{F5hwjh(3U(bP`(ADdG(?YRjGaXS7Ko;}LL}l#qB)-6 z_eUZL&ol2QmbofYuelB@t6XPRb_{VShau>A2~U~foeG?{pCqXjT#4&17;y^(P4EZ&ku%86hxAYQGjEfM{V0O3_5W{)C z+rS}4LZry$ImZO&Xv3KX5L+7yvG_}HK}^HTj7V|uS93|`&7mbgViIWLZm@}|=7r2y zM~$olFPjman_(j}qx1Ck+pA+Xjl&4UY##9#go?RfhhA}V-Wwn2p00Wo41G!nbnL8_eOXk2M>2OY6=}D91!PkIG{?6*0y(z?`JylrpN@H#I=< z{J(zcOU$5PDTz`-;v9#7}a&w^;+|F`uSfx;gvfJ5iT)T}L=af;x zE!A)HLbr$fO#_sioodK(3L=@#XL!11$aG67G%&2oAvVR(s+p;Vr5cHJ>r5LOHa<9~ za(1k%EJ_Jb3ni|}QjlWQcDu*M2LFj<7wHZbY~=~%LhK5yptijbUZG|l-DNWzGacyC z1Ju5s;_%I6MdimV&szQk?KsFx?y70QP0 z3((E3P~|`wbl?VP&JO&U1LPMDj?2(S{K|oG1-gmfIXEg|B>Q))B*>E?Fi~nyBJFS= zJ9EAahZQmc*2^d;l}>n0M#GEJfK76U3(901?3VFxP}YaTtmq@z7`~HDP{;(d$fg)4 z6ETtBX)+nx$`tG^TVOW7b7dPe_m1vPZ1HFBI@@T5%b- z5dAp33bQttPlJMC=E1Qvn2`lK<0u-!NP}+NtPEu>Rz8H52G0T; z4Cbny%?WCUkx)d#7&+iuc!_er;9L~&1Py0oM@w&55gg*cI0&U%={7Evy=&2IKErOO z5lmaer`kvw#hhIBa||0=W%3=hCf{L(_cUZnB=a9!z1GE}oP2Ee4QY&a2^7-hhq1tMIJ*9&35j=V+l)C&n=K#kvEb%zd z6N;WNksi)tix8@$B1<8|6Wo+wx7UI=wX1!$5Hz8<22D4l-;@`Sk} zIOKUyFo*VVHxj(h(A`{0T{cci)x^wk(mi}havR~bRh4rmR8<3)-4zzB3Mvn$5xCgM zpsFF9j!6}CAJ-|p6x$^kjtb(_TUj5L;tH#v2MKc0!)ZO%Wge$=cz_;eZjOf)Jt836 zWl>Udh>@n0&*9P8u23eb8&w58&XcJx;vd5*xG@fXx$MiPxf&9ZgA?ghLVTAnBCDC@ zw5fv1*#%tW42PkwySmr1g9`jP!etqhBVF2{oDi3F5Q|+aP@g~s*Q$OHCHq618~}-O z5VVqm!6S#l067c>%N)p-!(q6*6(-BuVX7Pf)A>C^j^rYh3rpo4uu_hOHOzljj)lE) z931BN+j2ad;FkW3oZyGASlK0+k0=W%cqymr0EYuEch?Rr0~UGGU=FE^GH3z3y@6E|K| zQ1j;>uP#_MUrbhox2ir?LKBGk1LyA~HCV#6R6V)S)(lGk=l^?{Ulr(TCA{60?E3#{ z&aCTJ^>?P$SQmSpR||$$M*_#0jXt7N=Kj7T!cGhD*pduA zExuj_oi^L{^YWE$Wxsgm=L1UloUs^=SgU&8P)?tl2l_ShZv-hf@h<|KAwq6}7#VVI0NFIeL@?Cg99)mgZ zJy;-*!(#a%td<|aGx8MoR;RhOIs@C}XRt?}ib}q z9^e!O{vq)keXa6`(Kj4d>;*>WIp4UNFuK5qs|llvTtg&C454qCrkeCh`i|6fEdnmn zCG&9qdJTS1{^QnsHs5#^8U=!WWMqdTc#wWH?E~uhf8y^@c!smM3aQK7Y6z|5K8Ria zvqrzDMn|K|!6pR4D*0li|Cyl-2KWs^(B`h>3d7lY{YXyr;IASqm5@*g&1xk&)hefJ YA}XW)s)FZGLBV$}z9{_4QxaYIKQ%cCvj6}9 diff --git a/bin/jalview/analysis/AlignSeq.js b/bin/jalview/analysis/AlignSeq.js index 38f84c2..31dcb24 100644 --- a/bin/jalview/analysis/AlignSeq.js +++ b/bin/jalview/analysis/AlignSeq.js @@ -1,586 +1,586 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (["jalview.schemes.ResidueProperties", "java.lang.StringBuffer"], "jalview.analysis.AlignSeq", ["jalview.datamodel.Mapping", "$.Sequence", "jalview.util.Comparison", "$.Format", "$.MapList", "$.MessageManager", "java.awt.Color", "java.lang.Error", "$.StringBuilder", "java.util.ArrayList", "$.Arrays", "$.StringTokenizer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.score = null; -this.E = null; -this.F = null; -this.traceback = null; -this.seq1 = null; -this.seq2 = null; -this.s1 = null; -this.s2 = null; -this.s1str = null; -this.s2str = null; -this.maxi = 0; -this.maxj = 0; -this.aseq1 = null; -this.aseq2 = null; -this.astr1 = ""; -this.astr2 = ""; -this.seq1start = 0; -this.seq1end = 0; -this.seq2start = 0; -this.seq2end = 0; -this.count = 0; -this.maxscore = 0; -this.pid = 0; -this.prev = 0; -this.gapOpen = 120; -this.gapExtend = 20; -this.lookup = null; -this.intToStr = null; -this.defInt = 23; -this.output = null; -this.type = null; -this.charToInt = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "AlignSeq"); -Clazz.prepareFields (c$, function () { -this.lookup = jalview.schemes.ResidueProperties.getBLOSUM62 (); -this.intToStr = jalview.analysis.AlignSeq.pep; -this.output = new StringBuffer (); -}); -Clazz.makeConstructor (c$, -function (s1, s2, type) { -this.SeqInit (s1, s1.getSequenceAsString (), s2, s2.getSequenceAsString (), type); -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~S"); -Clazz.makeConstructor (c$, -function (s1, string1, s2, string2, type) { -this.SeqInit (s1, string1.toUpperCase (), s2, string2.toUpperCase (), type); -}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.SequenceI,~S,~S"); -Clazz.defineMethod (c$, "getMaxScore", -function () { -return this.maxscore; -}); -Clazz.defineMethod (c$, "getSeq2Start", -function () { -return this.seq2start; -}); -Clazz.defineMethod (c$, "getSeq2End", -function () { -return this.seq2end; -}); -Clazz.defineMethod (c$, "getSeq1Start", -function () { -return this.seq1start; -}); -Clazz.defineMethod (c$, "getSeq1End", -function () { -return this.seq1end; -}); -Clazz.defineMethod (c$, "getOutput", -function () { -return this.output.toString (); -}); -Clazz.defineMethod (c$, "getAStr1", -function () { -return this.astr1; -}); -Clazz.defineMethod (c$, "getAStr2", -function () { -return this.astr2; -}); -Clazz.defineMethod (c$, "getASeq1", -function () { -return this.aseq1; -}); -Clazz.defineMethod (c$, "getASeq2", -function () { -return this.aseq2; -}); -Clazz.defineMethod (c$, "getS1", -function () { -return this.s1; -}); -Clazz.defineMethod (c$, "getS2", -function () { -return this.s2; -}); -Clazz.defineMethod (c$, "getAlignedSeq1", -function () { -var alSeq1 = new jalview.datamodel.Sequence (this.s1.getName (), this.getAStr1 ()); -alSeq1.setStart (this.s1.getStart () + this.getSeq1Start () - 1); -alSeq1.setEnd (this.s1.getStart () + this.getSeq1End () - 1); -alSeq1.setDatasetSequence (this.s1.getDatasetSequence () == null ? this.s1 : this.s1.getDatasetSequence ()); -return alSeq1; -}); -Clazz.defineMethod (c$, "getAlignedSeq2", -function () { -var alSeq2 = new jalview.datamodel.Sequence (this.s2.getName (), this.getAStr2 ()); -alSeq2.setStart (this.s2.getStart () + this.getSeq2Start () - 1); -alSeq2.setEnd (this.s2.getStart () + this.getSeq2End () - 1); -alSeq2.setDatasetSequence (this.s2.getDatasetSequence () == null ? this.s2 : this.s2.getDatasetSequence ()); -return alSeq2; -}); -Clazz.defineMethod (c$, "SeqInit", -function (s1, string1, s2, string2, type) { -this.s1 = s1; -this.s2 = s2; -this.setDefaultParams (type); -this.SeqInit (string1, string2); -}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.SequenceI,~S,~S"); -Clazz.defineMethod (c$, "SeqInit", -function (s1, string1, s2, string2, scoreMatrix) { -this.s1 = s1; -this.s2 = s2; -this.setType (scoreMatrix.isDNA () ? "dna" : "pep"); -this.lookup = scoreMatrix.getMatrix (); -}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.SequenceI,~S,jalview.schemes.ScoreMatrix"); -Clazz.defineMethod (c$, "SeqInit", -($fz = function (string1, string2) { -this.s1str = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, string1); -this.s2str = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, string2); -if (this.s1str.length == 0 || this.s2str.length == 0) { -this.output.append ("ALL GAPS: " + (this.s1str.length == 0 ? this.s1.getName () : " ") + (this.s2str.length == 0 ? this.s2.getName () : "")); -return; -}this.seq1 = Clazz.newIntArray (this.s1str.length, 0); -this.seq2 = Clazz.newIntArray (this.s2str.length, 0); -this.score = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); -this.E = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); -this.F = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); -this.traceback = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); -this.seq1 = this.stringToInt (this.s1str, this.type); -this.seq2 = this.stringToInt (this.s2str, this.type); -}, $fz.isPrivate = true, $fz), "~S,~S"); -Clazz.defineMethod (c$, "setDefaultParams", -($fz = function (type) { -this.setType (type); -if (type.equals ("pep")) { -this.lookup = jalview.schemes.ResidueProperties.getDefaultPeptideMatrix (); -} else if (type.equals ("dna")) { -this.lookup = jalview.schemes.ResidueProperties.getDefaultDnaMatrix (); -}}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "setType", -($fz = function (type2) { -this.type = type2; -if (this.type.equals ("pep")) { -this.intToStr = jalview.analysis.AlignSeq.pep; -this.charToInt = jalview.schemes.ResidueProperties.aaIndex; -this.defInt = 23; -} else if (this.type.equals ("dna")) { -this.intToStr = jalview.analysis.AlignSeq.dna; -this.charToInt = jalview.schemes.ResidueProperties.nucleotideIndex; -this.defInt = 10; -} else { -this.output.append ("Wrong type = dna or pep only"); -throw new Error (jalview.util.MessageManager.formatMessage ("error.unknown_type_dna_or_pep", Clazz.newArray (-1, [type2]))); -}}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "traceAlignment", -function () { -var max = -9999; -for (var i = 0; i < this.seq1.length; i++) { -if (this.score[i][this.seq2.length - 1] > max) { -max = this.score[i][this.seq2.length - 1]; -this.maxi = i; -this.maxj = this.seq2.length - 1; -}} -for (var j = 0; j < this.seq2.length; j++) { -if (this.score[this.seq1.length - 1][j] > max) { -max = this.score[this.seq1.length - 1][j]; -this.maxi = this.seq1.length - 1; -this.maxj = j; -}} -var i = this.maxi; -var j = this.maxj; -var trace; -this.maxscore = Clazz.doubleToInt (this.score[i][j] / 10); -this.seq1end = this.maxi + 1; -this.seq2end = this.maxj + 1; -this.aseq1 = Clazz.newIntArray (this.seq1.length + this.seq2.length, 0); -this.aseq2 = Clazz.newIntArray (this.seq1.length + this.seq2.length, 0); -this.count = (this.seq1.length + this.seq2.length) - 1; -while ((i > 0) && (j > 0)) { -if ((this.aseq1[this.count] != this.defInt) && (i >= 0)) { -this.aseq1[this.count] = this.seq1[i]; -this.astr1 = this.s1str.charAt (i) + this.astr1; -}if ((this.aseq2[this.count] != this.defInt) && (j > 0)) { -this.aseq2[this.count] = this.seq2[j]; -this.astr2 = this.s2str.charAt (j) + this.astr2; -}trace = this.findTrace (i, j); -if (trace == 0) { -i--; -j--; -} else if (trace == 1) { -j--; -this.aseq1[this.count] = this.defInt; -this.astr1 = "-" + this.astr1.substring (1); -} else if (trace == -1) { -i--; -this.aseq2[this.count] = this.defInt; -this.astr2 = "-" + this.astr2.substring (1); -}this.count--; -} -this.seq1start = i + 1; -this.seq2start = j + 1; -if (this.aseq1[this.count] != this.defInt) { -this.aseq1[this.count] = this.seq1[i]; -this.astr1 = this.s1str.charAt (i) + this.astr1; -}if (this.aseq2[this.count] != this.defInt) { -this.aseq2[this.count] = this.seq2[j]; -this.astr2 = this.s2str.charAt (j) + this.astr2; -}}); -Clazz.defineMethod (c$, "printAlignment", -function (os) { -var s1id = this.s1.getName (); -var s2id = this.s2.getName (); -var maxid = this.s1.getName ().length; -if (this.s2.getName ().length > maxid) { -maxid = this.s2.getName ().length; -}if (maxid > 30) { -maxid = 30; -if (this.s1.getName ().length > maxid) { -s1id = this.s1.getName ().substring (0, 30); -}if (this.s2.getName ().length > maxid) { -s2id = this.s2.getName ().substring (0, 30); -}}var len = 72 - maxid - 1; -var nochunks = (Clazz.doubleToInt ((this.aseq1.length - this.count) / len)) + 1; -this.pid = 0; -this.output.append ("Score = ").append (this.score[this.maxi][this.maxj]).append (jalview.analysis.AlignSeq.NEWLINE); -this.output.append ("Length of alignment = ").append (String.valueOf (this.aseq1.length - this.count)).append (jalview.analysis.AlignSeq.NEWLINE); -this.output.append ("Sequence "); -this.output.append ( new jalview.util.Format ("%" + maxid + "s").form (this.s1.getName ())); -this.output.append (" : ").append (String.valueOf (this.s1.getStart ())).append (" - ").append (String.valueOf (this.s1.getEnd ())); -this.output.append (" (Sequence length = ").append (String.valueOf (this.s1str.length)).append (")").append (jalview.analysis.AlignSeq.NEWLINE); -this.output.append ("Sequence "); -this.output.append ( new jalview.util.Format ("%" + maxid + "s").form (this.s2.getName ())); -this.output.append (" : ").append (String.valueOf (this.s2.getStart ())).append (" - ").append (String.valueOf (this.s2.getEnd ())); -this.output.append (" (Sequence length = ").append (String.valueOf (this.s2str.length)).append (")").append (jalview.analysis.AlignSeq.NEWLINE).append (jalview.analysis.AlignSeq.NEWLINE); -for (var j = 0; j < nochunks; j++) { -this.output.append ( new jalview.util.Format ("%" + (maxid) + "s").form (s1id)).append (" "); -for (var i = 0; i < len; i++) { -if ((i + (j * len)) < this.astr1.length) { -this.output.append (this.astr1.charAt (i + (j * len))); -}} -this.output.append (jalview.analysis.AlignSeq.NEWLINE); -this.output.append ( new jalview.util.Format ("%" + (maxid) + "s").form (" ")).append (" "); -for (var i = 0; i < len; i++) { -if ((i + (j * len)) < this.astr1.length) { -if (this.astr1.charAt (i + (j * len)) == this.astr2.charAt (i + (j * len)) && !jalview.util.Comparison.isGap (this.astr1.charAt (i + (j * len)))) { -this.pid++; -this.output.append ("|"); -} else if (this.type.equals ("pep")) { -if (jalview.schemes.ResidueProperties.getPAM250 (this.astr1.charAt (i + (j * len)), this.astr2.charAt (i + (j * len))) > 0) { -this.output.append ("."); -} else { -this.output.append (" "); -}} else { -this.output.append (" "); -}}} -this.output = this.output.append (jalview.analysis.AlignSeq.NEWLINE); -this.output = this.output.append ( new jalview.util.Format ("%" + (maxid) + "s").form (s2id)).append (" "); -for (var i = 0; i < len; i++) { -if ((i + (j * len)) < this.astr2.length) { -this.output.append (this.astr2.charAt (i + (j * len))); -}} -this.output.append (jalview.analysis.AlignSeq.NEWLINE).append (jalview.analysis.AlignSeq.NEWLINE); -} -this.pid = this.pid / (this.aseq1.length - this.count) * 100; -this.output = this.output.append ( new jalview.util.Format ("Percentage ID = %2.2f\n\n").formDouble (this.pid)); -try { -os.print (this.output.toString ()); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -}, "java.io.PrintStream"); -Clazz.defineMethod (c$, "printScoreMatrix", -function (mat) { -var n = this.seq1.length; -var m = this.seq2.length; -for (var i = 0; i < n; i++) { -if (i == 0) { -jalview.util.Format.print (System.out, "%8s", this.s2str.substring (0, 1)); -for (var jj = 1; jj < m; jj++) { -jalview.util.Format.print (System.out, "%5s", this.s2str.substring (jj, jj + 1)); -} -System.out.println (); -}for (var j = 0; j < m; j++) { -if (j == 0) { -jalview.util.Format.print (System.out, "%3s", this.s1str.substring (i, i + 1)); -}jalview.util.Format.printLong (System.out, "%3d ", Clazz.doubleToInt (mat[i][j] / 10)); -} -System.out.println (); -} -}, "~A"); -Clazz.defineMethod (c$, "findTrace", -function (i, j) { -var t = 0; -var max = this.score[i - 1][j - 1] + (this.lookup[this.seq1[i]][this.seq2[j]] * 10); -if (this.F[i][j] > max) { -max = this.F[i][j]; -t = -1; -} else if (this.F[i][j] == max) { -if (this.prev == -1) { -max = this.F[i][j]; -t = -1; -}}if (this.E[i][j] >= max) { -max = this.E[i][j]; -t = 1; -} else if (this.E[i][j] == max) { -if (this.prev == 1) { -max = this.E[i][j]; -t = 1; -}}this.prev = t; -return t; -}, "~N,~N"); -Clazz.defineMethod (c$, "calcScoreMatrix", -function () { -var n = this.seq1.length; -var m = this.seq2.length; -this.score[0][0] = this.lookup[this.seq1[0]][this.seq2[0]] * 10; -this.E[0][0] = -this.gapExtend; -this.F[0][0] = 0; -for (var j = 1; j < m; j++) { -this.E[0][j] = this.max (this.score[0][j - 1] - this.gapOpen, this.E[0][j - 1] - this.gapExtend); -this.F[0][j] = -this.gapExtend; -this.score[0][j] = this.max (this.lookup[this.seq1[0]][this.seq2[j]] * 10, -this.gapOpen, -this.gapExtend); -this.traceback[0][j] = 1; -} -for (var i = 1; i < n; i++) { -this.E[i][0] = -this.gapOpen; -this.F[i][0] = this.max (this.score[i - 1][0] - this.gapOpen, this.F[i - 1][0] - this.gapExtend); -this.score[i][0] = this.max (this.lookup[this.seq1[i]][this.seq2[0]] * 10, this.E[i][0], this.F[i][0]); -this.traceback[i][0] = -1; -} -for (var i = 1; i < n; i++) { -for (var j = 1; j < m; j++) { -this.E[i][j] = this.max (this.score[i][j - 1] - this.gapOpen, this.E[i][j - 1] - this.gapExtend); -this.F[i][j] = this.max (this.score[i - 1][j] - this.gapOpen, this.F[i - 1][j] - this.gapExtend); -this.score[i][j] = this.max (this.score[i - 1][j - 1] + (this.lookup[this.seq1[i]][this.seq2[j]] * 10), this.E[i][j], this.F[i][j]); -this.traceback[i][j] = this.findTrace (i, j); -} -} -}); -c$.extractGaps = Clazz.defineMethod (c$, "extractGaps", -function (gapChars, seq) { -if (gapChars == null || seq == null) { -return null; -}var str = new java.util.StringTokenizer (seq, gapChars); -var newString = new StringBuilder (seq.length); -while (str.hasMoreTokens ()) { -newString.append (str.nextToken ()); -} -return newString.toString (); -}, "~S,~S"); -Clazz.defineMethod (c$, "max", -function (i1, i2, i3) { -var max = i1; -if (i2 > i1) { -max = i2; -}if (i3 > max) { -max = i3; -}return max; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "max", -function (i1, i2) { -var max = i1; -if (i2 > i1) { -max = i2; -}return max; -}, "~N,~N"); -Clazz.defineMethod (c$, "stringToInt", -function (s, type) { -var seq1 = Clazz.newIntArray (s.length, 0); -for (var i = 0; i < s.length; i++) { -var c = s.charAt (i); -if ('a' <= c && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) - (32)); -}try { -seq1[i] = this.charToInt[c.charCodeAt (0)]; -if (seq1[i] < 0 || seq1[i] > this.defInt) { -seq1[i] = this.defInt; -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -seq1[i] = this.defInt; -} else { -throw e; -} -} -} -return seq1; -}, "~S,~S"); -c$.displayMatrix = Clazz.defineMethod (c$, "displayMatrix", -function (g, mat, n, m, psize) { -var max = -1000; -var min = 1000; -for (var i = 0; i < n; i++) { -for (var j = 0; j < m; j++) { -if (mat[i][j] >= max) { -max = mat[i][j]; -}if (mat[i][j] <= min) { -min = mat[i][j]; -}} -} -System.out.println (max + " " + min); -for (var i = 0; i < n; i++) { -for (var j = 0; j < m; j++) { -var x = psize * i; -var y = psize * j; -var score = (mat[i][j] - min) / (max - min); -g.setColor ( new java.awt.Color (score, 0, 0)); -g.fillRect (x, y, psize, psize); -} -} -}, "java.awt.Graphics,~A,~N,~N,~N"); -c$.doGlobalNWAlignment = Clazz.defineMethod (c$, "doGlobalNWAlignment", -function (s1, s2, type) { -var as = new jalview.analysis.AlignSeq (s1, s2, type); -as.calcScoreMatrix (); -as.traceAlignment (); -return as; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~S"); -Clazz.defineMethod (c$, "getMappingFromS1", -function (allowmismatch) { -var as1 = new java.util.ArrayList (); -var as2 = new java.util.ArrayList (); -var pdbpos = this.s2.getStart () + this.getSeq2Start () - 2; -var alignpos = this.s1.getStart () + this.getSeq1Start () - 2; -var lp2 = pdbpos - 3; -var lp1 = alignpos - 3; -var lastmatch = false; -for (var i = 0; i < this.astr1.length; i++) { -var c1 = this.astr1.charAt (i); -var c2 = this.astr2.charAt (i); -if (c1 != '-') { -alignpos++; -}if (c2 != '-') { -pdbpos++; -}if (allowmismatch || c1 == c2) { -if (lp1 + 1 != alignpos || lp2 + 1 != pdbpos) { -as1.add (Integer.$valueOf (alignpos)); -as2.add (Integer.$valueOf (pdbpos)); -}lastmatch = true; -lp1 = alignpos; -lp2 = pdbpos; -} else { -if (lastmatch) { -as1.add (Integer.$valueOf (lp1)); -as2.add (Integer.$valueOf (lp2)); -}lastmatch = false; -}} -var mapseq1 = Clazz.newIntArray (as1.size () + (lastmatch ? 1 : 0), 0); -var mapseq2 = Clazz.newIntArray (as2.size () + (lastmatch ? 1 : 0), 0); -var i = 0; -for (var ip, $ip = as1.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { -mapseq1[i++] = (ip).intValue (); -} -;i = 0; -for (var ip, $ip = as2.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { -mapseq2[i++] = (ip).intValue (); -} -;if (lastmatch) { -mapseq1[mapseq1.length - 1] = alignpos; -mapseq2[mapseq2.length - 1] = pdbpos; -}var map = new jalview.util.MapList (mapseq1, mapseq2, 1, 1); -var mapping = new jalview.datamodel.Mapping (map); -mapping.setTo (this.s2); -return mapping; -}, "~B"); -c$.replaceMatchingSeqsWith = Clazz.defineMethod (c$, "replaceMatchingSeqsWith", -function (seqs, annotations, ochains, al, dnaOrProtein, removeOldAnnots) { -var orig = new java.util.ArrayList (); -var repl = new java.util.ArrayList (); -var aligs = new java.util.ArrayList (); -if (al != null && al.getHeight () > 0) { -var matches = new java.util.ArrayList (); -var aligns = new java.util.ArrayList (); -for (var sq, $sq = ochains.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -var bestm = null; -var bestaseq = null; -var bestscore = 0; -for (var msq, $msq = al.getSequences ().iterator (); $msq.hasNext () && ((msq = $msq.next ()) || true);) { -var aseq = jalview.analysis.AlignSeq.doGlobalNWAlignment (msq, sq, dnaOrProtein); -if (bestm == null || aseq.getMaxScore () > bestscore) { -bestscore = aseq.getMaxScore (); -bestaseq = aseq; -bestm = msq; -}} -System.out.println ("Best Score for " + (matches.size () + 1) + " :" + bestscore); -matches.add (bestm); -aligns.add (bestaseq); -al.deleteSequence (bestm); -} -for (var p = 0, pSize = seqs.size (); p < pSize; p++) { -var sq; -var sp = seqs.get (p); -var q; -if ((q = ochains.indexOf (sp)) > -1) { -seqs.set (p, sq = matches.get (q)); -orig.add (sp); -repl.add (sq); -sq.setName (sp.getName ()); -sq.setDescription (sp.getDescription ()); -var sp2sq; -sq.transferAnnotation (sp, sp2sq = aligns.get (q).getMappingFromS1 (false)); -aligs.add (aligns.get (q)); -var inspos = -1; -for (var ap = 0; ap < annotations.size (); ) { -if (annotations.get (ap).sequenceRef === sp) { -if (inspos == -1) { -inspos = ap; -}if (removeOldAnnots) { -annotations.remove (ap); -} else { -var alan = annotations.remove (ap); -alan.liftOver (sq, sp2sq); -alan.setSequenceRef (sq); -sq.addAlignmentAnnotation (alan); -}} else { -ap++; -}} -if (sq.getAnnotation () != null && sq.getAnnotation ().length > 0) { -annotations.addAll (inspos == -1 ? annotations.size () : inspos, java.util.Arrays.asList (sq.getAnnotation ())); -}}} -}return java.util.Arrays.asList ([orig, repl, aligs]); -}, "java.util.List,java.util.List,java.util.List,jalview.datamodel.AlignmentI,~S,~B"); -c$.computeRedundancyMatrix = Clazz.defineMethod (c$, "computeRedundancyMatrix", -function (originalSequences, omitHidden, start, end, ungapped) { -var height = originalSequences.length; -var redundancy = Clazz.newFloatArray (height, 0); -var lngth = Clazz.newIntArray (height, 0); -for (var i = 0; i < height; i++) { -redundancy[i] = 0; -lngth[i] = -1; -} -var pid; -var seqi; -var seqj; -for (var i = 0; i < height; i++) { -for (var j = 0; j < i; j++) { -if (i == j) { -continue; -}if (omitHidden == null) { -seqi = originalSequences[i].getSequenceAsString (start, end); -seqj = originalSequences[j].getSequenceAsString (start, end); -} else { -seqi = omitHidden[i]; -seqj = omitHidden[j]; -}if (lngth[i] == -1) { -var ug = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, seqi); -lngth[i] = ug.length; -if (ungapped) { -seqi = ug; -}}if (lngth[j] == -1) { -var ug = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, seqj); -lngth[j] = ug.length; -if (ungapped) { -seqj = ug; -}}pid = jalview.util.Comparison.PID (seqi, seqj); -if (lngth[j] < lngth[i]) { -redundancy[j] = Math.max (pid, redundancy[j]); -} else { -redundancy[i] = Math.max (pid, redundancy[i]); -}} -} -return redundancy; -}, "~A,~A,~N,~N,~B"); -Clazz.defineStatics (c$, -"PEP", "pep", -"DNA", "dna"); -c$.NEWLINE = c$.prototype.NEWLINE = System.lineSeparator (); -Clazz.defineStatics (c$, -"dna", Clazz.newArray (-1, ["A", "C", "G", "T", "-"]), -"pep", Clazz.newArray (-1, ["A", "R", "N", "D", "C", "Q", "E", "G", "H", "I", "L", "K", "M", "F", "P", "S", "T", "W", "Y", "V", "B", "Z", "X", "-"])); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (["jalview.schemes.ResidueProperties", "java.lang.StringBuffer"], "jalview.analysis.AlignSeq", ["jalview.datamodel.Mapping", "$.Sequence", "jalview.util.Comparison", "$.Format", "$.MapList", "$.MessageManager", "java.awt.Color", "java.lang.Error", "$.StringBuilder", "java.util.ArrayList", "$.Arrays", "$.StringTokenizer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.score = null; +this.E = null; +this.F = null; +this.traceback = null; +this.seq1 = null; +this.seq2 = null; +this.s1 = null; +this.s2 = null; +this.s1str = null; +this.s2str = null; +this.maxi = 0; +this.maxj = 0; +this.aseq1 = null; +this.aseq2 = null; +this.astr1 = ""; +this.astr2 = ""; +this.seq1start = 0; +this.seq1end = 0; +this.seq2start = 0; +this.seq2end = 0; +this.count = 0; +this.maxscore = 0; +this.pid = 0; +this.prev = 0; +this.gapOpen = 120; +this.gapExtend = 20; +this.lookup = null; +this.intToStr = null; +this.defInt = 23; +this.output = null; +this.type = null; +this.charToInt = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "AlignSeq"); +Clazz.prepareFields (c$, function () { +this.lookup = jalview.schemes.ResidueProperties.getBLOSUM62 (); +this.intToStr = jalview.analysis.AlignSeq.pep; +this.output = new StringBuffer (); +}); +Clazz.makeConstructor (c$, +function (s1, s2, type) { +this.SeqInit (s1, s1.getSequenceAsString (), s2, s2.getSequenceAsString (), type); +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~S"); +Clazz.makeConstructor (c$, +function (s1, string1, s2, string2, type) { +this.SeqInit (s1, string1.toUpperCase (), s2, string2.toUpperCase (), type); +}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.SequenceI,~S,~S"); +Clazz.defineMethod (c$, "getMaxScore", +function () { +return this.maxscore; +}); +Clazz.defineMethod (c$, "getSeq2Start", +function () { +return this.seq2start; +}); +Clazz.defineMethod (c$, "getSeq2End", +function () { +return this.seq2end; +}); +Clazz.defineMethod (c$, "getSeq1Start", +function () { +return this.seq1start; +}); +Clazz.defineMethod (c$, "getSeq1End", +function () { +return this.seq1end; +}); +Clazz.defineMethod (c$, "getOutput", +function () { +return this.output.toString (); +}); +Clazz.defineMethod (c$, "getAStr1", +function () { +return this.astr1; +}); +Clazz.defineMethod (c$, "getAStr2", +function () { +return this.astr2; +}); +Clazz.defineMethod (c$, "getASeq1", +function () { +return this.aseq1; +}); +Clazz.defineMethod (c$, "getASeq2", +function () { +return this.aseq2; +}); +Clazz.defineMethod (c$, "getS1", +function () { +return this.s1; +}); +Clazz.defineMethod (c$, "getS2", +function () { +return this.s2; +}); +Clazz.defineMethod (c$, "getAlignedSeq1", +function () { +var alSeq1 = new jalview.datamodel.Sequence (this.s1.getName (), this.getAStr1 ()); +alSeq1.setStart (this.s1.getStart () + this.getSeq1Start () - 1); +alSeq1.setEnd (this.s1.getStart () + this.getSeq1End () - 1); +alSeq1.setDatasetSequence (this.s1.getDatasetSequence () == null ? this.s1 : this.s1.getDatasetSequence ()); +return alSeq1; +}); +Clazz.defineMethod (c$, "getAlignedSeq2", +function () { +var alSeq2 = new jalview.datamodel.Sequence (this.s2.getName (), this.getAStr2 ()); +alSeq2.setStart (this.s2.getStart () + this.getSeq2Start () - 1); +alSeq2.setEnd (this.s2.getStart () + this.getSeq2End () - 1); +alSeq2.setDatasetSequence (this.s2.getDatasetSequence () == null ? this.s2 : this.s2.getDatasetSequence ()); +return alSeq2; +}); +Clazz.defineMethod (c$, "SeqInit", +function (s1, string1, s2, string2, type) { +this.s1 = s1; +this.s2 = s2; +this.setDefaultParams (type); +this.SeqInit (string1, string2); +}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.SequenceI,~S,~S"); +Clazz.defineMethod (c$, "SeqInit", +function (s1, string1, s2, string2, scoreMatrix) { +this.s1 = s1; +this.s2 = s2; +this.setType (scoreMatrix.isDNA () ? "dna" : "pep"); +this.lookup = scoreMatrix.getMatrix (); +}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.SequenceI,~S,jalview.schemes.ScoreMatrix"); +Clazz.defineMethod (c$, "SeqInit", +($fz = function (string1, string2) { +this.s1str = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, string1); +this.s2str = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, string2); +if (this.s1str.length == 0 || this.s2str.length == 0) { +this.output.append ("ALL GAPS: " + (this.s1str.length == 0 ? this.s1.getName () : " ") + (this.s2str.length == 0 ? this.s2.getName () : "")); +return; +}this.seq1 = Clazz.newIntArray (this.s1str.length, 0); +this.seq2 = Clazz.newIntArray (this.s2str.length, 0); +this.score = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); +this.E = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); +this.F = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); +this.traceback = Clazz.newIntArray (this.s1str.length, this.s2str.length, 0); +this.seq1 = this.stringToInt (this.s1str, this.type); +this.seq2 = this.stringToInt (this.s2str, this.type); +}, $fz.isPrivate = true, $fz), "~S,~S"); +Clazz.defineMethod (c$, "setDefaultParams", +($fz = function (type) { +this.setType (type); +if (type.equals ("pep")) { +this.lookup = jalview.schemes.ResidueProperties.getDefaultPeptideMatrix (); +} else if (type.equals ("dna")) { +this.lookup = jalview.schemes.ResidueProperties.getDefaultDnaMatrix (); +}}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "setType", +($fz = function (type2) { +this.type = type2; +if (this.type.equals ("pep")) { +this.intToStr = jalview.analysis.AlignSeq.pep; +this.charToInt = jalview.schemes.ResidueProperties.aaIndex; +this.defInt = 23; +} else if (this.type.equals ("dna")) { +this.intToStr = jalview.analysis.AlignSeq.dna; +this.charToInt = jalview.schemes.ResidueProperties.nucleotideIndex; +this.defInt = 10; +} else { +this.output.append ("Wrong type = dna or pep only"); +throw new Error (jalview.util.MessageManager.formatMessage ("error.unknown_type_dna_or_pep", Clazz.newArray (-1, [type2]))); +}}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "traceAlignment", +function () { +var max = -9999; +for (var i = 0; i < this.seq1.length; i++) { +if (this.score[i][this.seq2.length - 1] > max) { +max = this.score[i][this.seq2.length - 1]; +this.maxi = i; +this.maxj = this.seq2.length - 1; +}} +for (var j = 0; j < this.seq2.length; j++) { +if (this.score[this.seq1.length - 1][j] > max) { +max = this.score[this.seq1.length - 1][j]; +this.maxi = this.seq1.length - 1; +this.maxj = j; +}} +var i = this.maxi; +var j = this.maxj; +var trace; +this.maxscore = Clazz.doubleToInt (this.score[i][j] / 10); +this.seq1end = this.maxi + 1; +this.seq2end = this.maxj + 1; +this.aseq1 = Clazz.newIntArray (this.seq1.length + this.seq2.length, 0); +this.aseq2 = Clazz.newIntArray (this.seq1.length + this.seq2.length, 0); +this.count = (this.seq1.length + this.seq2.length) - 1; +while ((i > 0) && (j > 0)) { +if ((this.aseq1[this.count] != this.defInt) && (i >= 0)) { +this.aseq1[this.count] = this.seq1[i]; +this.astr1 = this.s1str.charAt (i) + this.astr1; +}if ((this.aseq2[this.count] != this.defInt) && (j > 0)) { +this.aseq2[this.count] = this.seq2[j]; +this.astr2 = this.s2str.charAt (j) + this.astr2; +}trace = this.findTrace (i, j); +if (trace == 0) { +i--; +j--; +} else if (trace == 1) { +j--; +this.aseq1[this.count] = this.defInt; +this.astr1 = "-" + this.astr1.substring (1); +} else if (trace == -1) { +i--; +this.aseq2[this.count] = this.defInt; +this.astr2 = "-" + this.astr2.substring (1); +}this.count--; +} +this.seq1start = i + 1; +this.seq2start = j + 1; +if (this.aseq1[this.count] != this.defInt) { +this.aseq1[this.count] = this.seq1[i]; +this.astr1 = this.s1str.charAt (i) + this.astr1; +}if (this.aseq2[this.count] != this.defInt) { +this.aseq2[this.count] = this.seq2[j]; +this.astr2 = this.s2str.charAt (j) + this.astr2; +}}); +Clazz.defineMethod (c$, "printAlignment", +function (os) { +var s1id = this.s1.getName (); +var s2id = this.s2.getName (); +var maxid = this.s1.getName ().length; +if (this.s2.getName ().length > maxid) { +maxid = this.s2.getName ().length; +}if (maxid > 30) { +maxid = 30; +if (this.s1.getName ().length > maxid) { +s1id = this.s1.getName ().substring (0, 30); +}if (this.s2.getName ().length > maxid) { +s2id = this.s2.getName ().substring (0, 30); +}}var len = 72 - maxid - 1; +var nochunks = (Clazz.doubleToInt ((this.aseq1.length - this.count) / len)) + 1; +this.pid = 0; +this.output.append ("Score = ").append ("" + this.score[this.maxi][this.maxj]).append (jalview.analysis.AlignSeq.NEWLINE); +this.output.append ("Length of alignment = ").append (String.valueOf (this.aseq1.length - this.count)).append (jalview.analysis.AlignSeq.NEWLINE); +this.output.append ("Sequence "); +this.output.append ( new jalview.util.Format ("%" + maxid + "s").form (this.s1.getName ())); +this.output.append (" : ").append (String.valueOf (this.s1.getStart ())).append (" - ").append (String.valueOf (this.s1.getEnd ())); +this.output.append (" (Sequence length = ").append (String.valueOf (this.s1str.length)).append (")").append (jalview.analysis.AlignSeq.NEWLINE); +this.output.append ("Sequence "); +this.output.append ( new jalview.util.Format ("%" + maxid + "s").form (this.s2.getName ())); +this.output.append (" : ").append (String.valueOf (this.s2.getStart ())).append (" - ").append (String.valueOf (this.s2.getEnd ())); +this.output.append (" (Sequence length = ").append (String.valueOf (this.s2str.length)).append (")").append (jalview.analysis.AlignSeq.NEWLINE).append (jalview.analysis.AlignSeq.NEWLINE); +for (var j = 0; j < nochunks; j++) { +this.output.append ( new jalview.util.Format ("%" + (maxid) + "s").form (s1id)).append (" "); +for (var i = 0; i < len; i++) { +if ((i + (j * len)) < this.astr1.length) { +this.output.append (this.astr1.charAt (i + (j * len))); +}} +this.output.append (jalview.analysis.AlignSeq.NEWLINE); +this.output.append ( new jalview.util.Format ("%" + (maxid) + "s").form (" ")).append (" "); +for (var i = 0; i < len; i++) { +if ((i + (j * len)) < this.astr1.length) { +if (this.astr1.charAt (i + (j * len)) == this.astr2.charAt (i + (j * len)) && !jalview.util.Comparison.isGap (this.astr1.charAt (i + (j * len)))) { +this.pid++; +this.output.append ("|"); +} else if (this.type.equals ("pep")) { +if (jalview.schemes.ResidueProperties.getPAM250 (this.astr1.charAt (i + (j * len)), this.astr2.charAt (i + (j * len))) > 0) { +this.output.append ("."); +} else { +this.output.append (" "); +}} else { +this.output.append (" "); +}}} +this.output = this.output.append (jalview.analysis.AlignSeq.NEWLINE); +this.output = this.output.append ( new jalview.util.Format ("%" + (maxid) + "s").form (s2id)).append (" "); +for (var i = 0; i < len; i++) { +if ((i + (j * len)) < this.astr2.length) { +this.output.append (this.astr2.charAt (i + (j * len))); +}} +this.output.append (jalview.analysis.AlignSeq.NEWLINE).append (jalview.analysis.AlignSeq.NEWLINE); +} +this.pid = this.pid / (this.aseq1.length - this.count) * 100; +this.output = this.output.append ( new jalview.util.Format ("Percentage ID = %2.2f\n\n").formDouble (this.pid)); +try { +os.print (this.output.toString ()); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +}, "java.io.PrintStream"); +Clazz.defineMethod (c$, "printScoreMatrix", +function (mat) { +var n = this.seq1.length; +var m = this.seq2.length; +for (var i = 0; i < n; i++) { +if (i == 0) { +jalview.util.Format.print (System.out, "%8s", this.s2str.substring (0, 1)); +for (var jj = 1; jj < m; jj++) { +jalview.util.Format.print (System.out, "%5s", this.s2str.substring (jj, jj + 1)); +} +System.out.println (); +}for (var j = 0; j < m; j++) { +if (j == 0) { +jalview.util.Format.print (System.out, "%3s", this.s1str.substring (i, i + 1)); +}jalview.util.Format.printLong (System.out, "%3d ", Clazz.doubleToInt (mat[i][j] / 10)); +} +System.out.println (); +} +}, "~A"); +Clazz.defineMethod (c$, "findTrace", +function (i, j) { +var t = 0; +var max = this.score[i - 1][j - 1] + (this.lookup[this.seq1[i]][this.seq2[j]] * 10); +if (this.F[i][j] > max) { +max = this.F[i][j]; +t = -1; +} else if (this.F[i][j] == max) { +if (this.prev == -1) { +max = this.F[i][j]; +t = -1; +}}if (this.E[i][j] >= max) { +max = this.E[i][j]; +t = 1; +} else if (this.E[i][j] == max) { +if (this.prev == 1) { +max = this.E[i][j]; +t = 1; +}}this.prev = t; +return t; +}, "~N,~N"); +Clazz.defineMethod (c$, "calcScoreMatrix", +function () { +var n = this.seq1.length; +var m = this.seq2.length; +this.score[0][0] = this.lookup[this.seq1[0]][this.seq2[0]] * 10; +this.E[0][0] = -this.gapExtend; +this.F[0][0] = 0; +for (var j = 1; j < m; j++) { +this.E[0][j] = this.max (this.score[0][j - 1] - this.gapOpen, this.E[0][j - 1] - this.gapExtend); +this.F[0][j] = -this.gapExtend; +this.score[0][j] = this.max (this.lookup[this.seq1[0]][this.seq2[j]] * 10, -this.gapOpen, -this.gapExtend); +this.traceback[0][j] = 1; +} +for (var i = 1; i < n; i++) { +this.E[i][0] = -this.gapOpen; +this.F[i][0] = this.max (this.score[i - 1][0] - this.gapOpen, this.F[i - 1][0] - this.gapExtend); +this.score[i][0] = this.max (this.lookup[this.seq1[i]][this.seq2[0]] * 10, this.E[i][0], this.F[i][0]); +this.traceback[i][0] = -1; +} +for (var i = 1; i < n; i++) { +for (var j = 1; j < m; j++) { +this.E[i][j] = this.max (this.score[i][j - 1] - this.gapOpen, this.E[i][j - 1] - this.gapExtend); +this.F[i][j] = this.max (this.score[i - 1][j] - this.gapOpen, this.F[i - 1][j] - this.gapExtend); +this.score[i][j] = this.max (this.score[i - 1][j - 1] + (this.lookup[this.seq1[i]][this.seq2[j]] * 10), this.E[i][j], this.F[i][j]); +this.traceback[i][j] = this.findTrace (i, j); +} +} +}); +c$.extractGaps = Clazz.defineMethod (c$, "extractGaps", +function (gapChars, seq) { +if (gapChars == null || seq == null) { +return null; +}var str = new java.util.StringTokenizer (seq, gapChars); +var newString = new StringBuilder (seq.length); +while (str.hasMoreTokens ()) { +newString.append (str.nextToken ()); +} +return newString.toString (); +}, "~S,~S"); +Clazz.defineMethod (c$, "max", +function (i1, i2, i3) { +var max = i1; +if (i2 > i1) { +max = i2; +}if (i3 > max) { +max = i3; +}return max; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "max", +function (i1, i2) { +var max = i1; +if (i2 > i1) { +max = i2; +}return max; +}, "~N,~N"); +Clazz.defineMethod (c$, "stringToInt", +function (s, type) { +var seq1 = Clazz.newIntArray (s.length, 0); +for (var i = 0; i < s.length; i++) { +var c = s.charAt (i); +if ('a' <= c && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) - (32)); +}try { +seq1[i] = this.charToInt[c.charCodeAt (0)]; +if (seq1[i] < 0 || seq1[i] > this.defInt) { +seq1[i] = this.defInt; +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +seq1[i] = this.defInt; +} else { +throw e; +} +} +} +return seq1; +}, "~S,~S"); +c$.displayMatrix = Clazz.defineMethod (c$, "displayMatrix", +function (g, mat, n, m, psize) { +var max = -1000; +var min = 1000; +for (var i = 0; i < n; i++) { +for (var j = 0; j < m; j++) { +if (mat[i][j] >= max) { +max = mat[i][j]; +}if (mat[i][j] <= min) { +min = mat[i][j]; +}} +} +System.out.println (max + " " + min); +for (var i = 0; i < n; i++) { +for (var j = 0; j < m; j++) { +var x = psize * i; +var y = psize * j; +var score = (mat[i][j] - min) / (max - min); +g.setColor ( new java.awt.Color (score, 0, 0)); +g.fillRect (x, y, psize, psize); +} +} +}, "java.awt.Graphics,~A,~N,~N,~N"); +c$.doGlobalNWAlignment = Clazz.defineMethod (c$, "doGlobalNWAlignment", +function (s1, s2, type) { +var as = new jalview.analysis.AlignSeq (s1, s2, type); +as.calcScoreMatrix (); +as.traceAlignment (); +return as; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~S"); +Clazz.defineMethod (c$, "getMappingFromS1", +function (allowmismatch) { +var as1 = new java.util.ArrayList (); +var as2 = new java.util.ArrayList (); +var pdbpos = this.s2.getStart () + this.getSeq2Start () - 2; +var alignpos = this.s1.getStart () + this.getSeq1Start () - 2; +var lp2 = pdbpos - 3; +var lp1 = alignpos - 3; +var lastmatch = false; +for (var i = 0; i < this.astr1.length; i++) { +var c1 = this.astr1.charAt (i); +var c2 = this.astr2.charAt (i); +if (c1 != '-') { +alignpos++; +}if (c2 != '-') { +pdbpos++; +}if (allowmismatch || c1 == c2) { +if (lp1 + 1 != alignpos || lp2 + 1 != pdbpos) { +as1.add (Integer.$valueOf (alignpos)); +as2.add (Integer.$valueOf (pdbpos)); +}lastmatch = true; +lp1 = alignpos; +lp2 = pdbpos; +} else { +if (lastmatch) { +as1.add (Integer.$valueOf (lp1)); +as2.add (Integer.$valueOf (lp2)); +}lastmatch = false; +}} +var mapseq1 = Clazz.newIntArray (as1.size () + (lastmatch ? 1 : 0), 0); +var mapseq2 = Clazz.newIntArray (as2.size () + (lastmatch ? 1 : 0), 0); +var i = 0; +for (var ip, $ip = as1.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { +mapseq1[i++] = (ip).intValue (); +} +;i = 0; +for (var ip, $ip = as2.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { +mapseq2[i++] = (ip).intValue (); +} +;if (lastmatch) { +mapseq1[mapseq1.length - 1] = alignpos; +mapseq2[mapseq2.length - 1] = pdbpos; +}var map = new jalview.util.MapList (mapseq1, mapseq2, 1, 1); +var mapping = new jalview.datamodel.Mapping (map); +mapping.setTo (this.s2); +return mapping; +}, "~B"); +c$.replaceMatchingSeqsWith = Clazz.defineMethod (c$, "replaceMatchingSeqsWith", +function (seqs, annotations, ochains, al, dnaOrProtein, removeOldAnnots) { +var orig = new java.util.ArrayList (); +var repl = new java.util.ArrayList (); +var aligs = new java.util.ArrayList (); +if (al != null && al.getHeight () > 0) { +var matches = new java.util.ArrayList (); +var aligns = new java.util.ArrayList (); +for (var sq, $sq = ochains.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +var bestm = null; +var bestaseq = null; +var bestscore = 0; +for (var msq, $msq = al.getSequences ().iterator (); $msq.hasNext () && ((msq = $msq.next ()) || true);) { +var aseq = jalview.analysis.AlignSeq.doGlobalNWAlignment (msq, sq, dnaOrProtein); +if (bestm == null || aseq.getMaxScore () > bestscore) { +bestscore = aseq.getMaxScore (); +bestaseq = aseq; +bestm = msq; +}} +System.out.println ("Best Score for " + (matches.size () + 1) + " :" + bestscore); +matches.add (bestm); +aligns.add (bestaseq); +al.deleteSequence (bestm); +} +for (var p = 0, pSize = seqs.size (); p < pSize; p++) { +var sq; +var sp = seqs.get (p); +var q; +if ((q = ochains.indexOf (sp)) > -1) { +seqs.set (p, sq = matches.get (q)); +orig.add (sp); +repl.add (sq); +sq.setName (sp.getName ()); +sq.setDescription (sp.getDescription ()); +var sp2sq; +sq.transferAnnotation (sp, sp2sq = aligns.get (q).getMappingFromS1 (false)); +aligs.add (aligns.get (q)); +var inspos = -1; +for (var ap = 0; ap < annotations.size (); ) { +if (annotations.get (ap).sequenceRef === sp) { +if (inspos == -1) { +inspos = ap; +}if (removeOldAnnots) { +annotations.remove (ap); +} else { +var alan = annotations.remove (ap); +alan.liftOver (sq, sp2sq); +alan.setSequenceRef (sq); +sq.addAlignmentAnnotation (alan); +}} else { +ap++; +}} +if (sq.getAnnotation () != null && sq.getAnnotation ().length > 0) { +annotations.addAll (inspos == -1 ? annotations.size () : inspos, java.util.Arrays.asList (sq.getAnnotation ())); +}}} +}return java.util.Arrays.asList ([orig, repl, aligs]); +}, "java.util.List,java.util.List,java.util.List,jalview.datamodel.AlignmentI,~S,~B"); +c$.computeRedundancyMatrix = Clazz.defineMethod (c$, "computeRedundancyMatrix", +function (originalSequences, omitHidden, start, end, ungapped) { +var height = originalSequences.length; +var redundancy = Clazz.newFloatArray (height, 0); +var lngth = Clazz.newIntArray (height, 0); +for (var i = 0; i < height; i++) { +redundancy[i] = 0; +lngth[i] = -1; +} +var pid; +var seqi; +var seqj; +for (var i = 0; i < height; i++) { +for (var j = 0; j < i; j++) { +if (i == j) { +continue; +}if (omitHidden == null) { +seqi = originalSequences[i].getSequenceAsString (start, end); +seqj = originalSequences[j].getSequenceAsString (start, end); +} else { +seqi = omitHidden[i]; +seqj = omitHidden[j]; +}if (lngth[i] == -1) { +var ug = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, seqi); +lngth[i] = ug.length; +if (ungapped) { +seqi = ug; +}}if (lngth[j] == -1) { +var ug = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, seqj); +lngth[j] = ug.length; +if (ungapped) { +seqj = ug; +}}pid = jalview.util.Comparison.PID (seqi, seqj); +if (lngth[j] < lngth[i]) { +redundancy[j] = Math.max (pid, redundancy[j]); +} else { +redundancy[i] = Math.max (pid, redundancy[i]); +}} +} +return redundancy; +}, "~A,~A,~N,~N,~B"); +Clazz.defineStatics (c$, +"PEP", "pep", +"DNA", "dna"); +c$.NEWLINE = c$.prototype.NEWLINE = System.lineSeparator (); +Clazz.defineStatics (c$, +"dna", Clazz.newArray (-1, ["A", "C", "G", "T", "-"]), +"pep", Clazz.newArray (-1, ["A", "R", "N", "D", "C", "Q", "E", "G", "H", "I", "L", "K", "M", "F", "P", "S", "T", "W", "Y", "V", "B", "Z", "X", "-"])); +}); diff --git a/bin/jalview/analysis/AlignmentAnnotationUtils.class b/bin/jalview/analysis/AlignmentAnnotationUtils.class index 4d24030f1a29a7795be1e6386182ba86eae7ea98..a01673fefa0a653a3f0acf9980e745db555b4545 100644 GIT binary patch delta 48 zcmeCsYSr2hz{}{eIgnSBl}(R9;6H=T=En?p1&AGCZ7;$WYpU1ExeZz E07jn;r2qf` delta 61 zcmZqG>d@K{z{}{qIgnSBmCcYr_& -1) { -if (!groupLabels.containsKey (calcId)) { -groupLabels.put (calcId, new java.util.HashMap ()); -}var groupLabelsForCalcId = groupLabels.get (calcId); -if (groupLabelsForCalcId.containsKey (new Integer (aa.graphGroup))) { -if (!groupLabelsForCalcId.get (new Integer (aa.graphGroup)).contains (displayLabel)) { -groupLabelsForCalcId.get (new Integer (aa.graphGroup)).add (displayLabel); -}} else { -groupLabelsForCalcId.put (new Integer (aa.graphGroup), labelAsList); -}} else { -var rememberAs = calcId + "!" + displayLabel; -if (aa.visible && !addedToShown.contains (rememberAs)) { -if (!shownTypes.containsKey (calcId)) { -shownTypes.put (calcId, new java.util.ArrayList ()); -}shownTypes.get (calcId).add (labelAsList); -addedToShown.add (rememberAs); -} else { -if (!aa.visible && !addedToHidden.contains (rememberAs)) { -if (!hiddenTypes.containsKey (calcId)) { -hiddenTypes.put (calcId, new java.util.ArrayList ()); -}hiddenTypes.get (calcId).add (labelAsList); -addedToHidden.add (rememberAs); -}}}}} -for (var calcId, $calcId = groupLabels.keySet ().iterator (); $calcId.hasNext () && ((calcId = $calcId.next ()) || true);) { -for (var group, $group = groupLabels.get (calcId).keySet ().iterator (); $group.hasNext () && ((group = $group.next ()) || true);) { -var groupLabel = groupLabels.get (calcId).get (new Integer (group)); -java.util.Collections.sort (groupLabel); -if (visibleGraphGroups.get (group)) { -if (!shownTypes.containsKey (calcId)) { -shownTypes.put (calcId, new java.util.ArrayList ()); -}if (!shownTypes.get (calcId).contains (groupLabel)) { -shownTypes.get (calcId).add (groupLabel); -}} else { -if (!hiddenTypes.containsKey (calcId)) { -hiddenTypes.put (calcId, new java.util.ArrayList ()); -}if (!hiddenTypes.get (calcId).contains (groupLabel)) { -hiddenTypes.get (calcId).add (groupLabel); -}}} -} -}, "java.util.Map,java.util.Map,java.util.List,java.util.List"); -c$.getVisibleLineGraphGroups = Clazz.defineMethod (c$, "getVisibleLineGraphGroups", -function (annotations) { -var result = new java.util.BitSet (); -for (var ann, $ann = annotations.iterator (); $ann.hasNext () && ((ann = $ann.next ()) || true);) { -if (ann.graph == 2 && ann.visible) { -var gg = ann.graphGroup; -if (gg > -1) { -result.set (gg); -}}} -return result; -}, "java.util.List"); -c$.asList = Clazz.defineMethod (c$, "asList", -function (anns) { -return (anns == null ? java.util.Collections.emptyList () : java.util.Arrays.asList (anns)); -}, "~A"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.AlignmentAnnotationUtils", ["java.util.ArrayList", "$.Arrays", "$.BitSet", "$.Collections", "$.HashMap"], function () { +c$ = Clazz.declareType (jalview.analysis, "AlignmentAnnotationUtils"); +c$.getShownHiddenTypes = Clazz.defineMethod (c$, "getShownHiddenTypes", +function (shownTypes, hiddenTypes, annotations, forSequences) { +var visibleGraphGroups = jalview.analysis.AlignmentAnnotationUtils.getVisibleLineGraphGroups (annotations); +var groupLabels = new java.util.HashMap (); +var addedToShown = new java.util.ArrayList (); +var addedToHidden = new java.util.ArrayList (); +for (var aa, $aa = annotations.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) { +if (aa.annotations == null) { +continue; +}if (forSequences != null && (aa.sequenceRef != null && forSequences.contains (aa.sequenceRef))) { +var calcId = aa.getCalcId (); +var labelAsList = new java.util.ArrayList (); +var displayLabel = aa.label; +labelAsList.add (displayLabel); +if (aa.graph == 2 && aa.graphGroup > -1) { +if (!groupLabels.containsKey (calcId)) { +groupLabels.put (calcId, new java.util.HashMap ()); +}var groupLabelsForCalcId = groupLabels.get (calcId); +if (groupLabelsForCalcId.containsKey (new Integer (aa.graphGroup))) { +if (!groupLabelsForCalcId.get (new Integer (aa.graphGroup)).contains (displayLabel)) { +groupLabelsForCalcId.get (new Integer (aa.graphGroup)).add (displayLabel); +}} else { +groupLabelsForCalcId.put (new Integer (aa.graphGroup), labelAsList); +}} else { +var rememberAs = calcId + "!" + displayLabel; +if (aa.visible && !addedToShown.contains (rememberAs)) { +if (!shownTypes.containsKey (calcId)) { +shownTypes.put (calcId, new java.util.ArrayList ()); +}shownTypes.get (calcId).add (labelAsList); +addedToShown.add (rememberAs); +} else { +if (!aa.visible && !addedToHidden.contains (rememberAs)) { +if (!hiddenTypes.containsKey (calcId)) { +hiddenTypes.put (calcId, new java.util.ArrayList ()); +}hiddenTypes.get (calcId).add (labelAsList); +addedToHidden.add (rememberAs); +}}}}} +for (var calcId, $calcId = groupLabels.keySet ().iterator (); $calcId.hasNext () && ((calcId = $calcId.next ()) || true);) { +for (var group, $group = groupLabels.get (calcId).keySet ().iterator (); $group.hasNext () && ((group = $group.next ()) || true);) { +var groupLabel = groupLabels.get (calcId).get (new Integer (group)); +java.util.Collections.sort (groupLabel); +if (visibleGraphGroups.get (group)) { +if (!shownTypes.containsKey (calcId)) { +shownTypes.put (calcId, new java.util.ArrayList ()); +}if (!shownTypes.get (calcId).contains (groupLabel)) { +shownTypes.get (calcId).add (groupLabel); +}} else { +if (!hiddenTypes.containsKey (calcId)) { +hiddenTypes.put (calcId, new java.util.ArrayList ()); +}if (!hiddenTypes.get (calcId).contains (groupLabel)) { +hiddenTypes.get (calcId).add (groupLabel); +}}} +} +}, "java.util.Map,java.util.Map,java.util.List,java.util.List"); +c$.getVisibleLineGraphGroups = Clazz.defineMethod (c$, "getVisibleLineGraphGroups", +function (annotations) { +var result = new java.util.BitSet (); +for (var ann, $ann = annotations.iterator (); $ann.hasNext () && ((ann = $ann.next ()) || true);) { +if (ann.graph == 2 && ann.visible) { +var gg = ann.graphGroup; +if (gg > -1) { +result.set (gg); +}}} +return result; +}, "java.util.List"); +c$.asList = Clazz.defineMethod (c$, "asList", +function (anns) { +return (anns == null ? java.util.Collections.emptyList () : java.util.Arrays.asList (anns)); +}, "~A"); +}); diff --git a/bin/jalview/analysis/AlignmentSorter.class b/bin/jalview/analysis/AlignmentSorter.class index ef50dedc17e0c3eddcf64717e48299a2f1faccfc..012f2ee369c45c76862ea827f3dcc2adf92b880d 100644 GIT binary patch delta 29 lcmbPHHoa`aOkGC9&9iiWF*2Jm@J^ntugEB}d6#}1Hvp;c3KIYT delta 30 mcmbPUHlu9AOkGB!&9iiWF*2Jo@J*hsugE0Gw0Wm~95(>6C<+w- diff --git a/bin/jalview/analysis/AlignmentSorter.js b/bin/jalview/analysis/AlignmentSorter.js index 4c0604a..bcf66d4 100644 --- a/bin/jalview/analysis/AlignmentSorter.js +++ b/bin/jalview/analysis/AlignmentSorter.js @@ -1,383 +1,383 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.AlignmentSorter", ["jalview.datamodel.SequenceI", "jalview.util.Comparison", "$.MessageManager", "$.QuickSort", "java.lang.Error", "$.Float", "$.StringBuffer", "java.util.ArrayList"], function () { -c$ = Clazz.declareType (jalview.analysis, "AlignmentSorter"); -c$.sortByPID = Clazz.defineMethod (c$, "sortByPID", -function (align, s, tosort) { -jalview.analysis.AlignmentSorter.sortByPID (align, s, tosort, 0, -1); -}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI,~A"); -c$.sortByPID = Clazz.defineMethod (c$, "sortByPID", -function (align, s, tosort, start, end) { -var nSeq = align.getHeight (); -var scores = Clazz.newFloatArray (nSeq, 0); -var seqs = new Array (nSeq); -for (var i = 0; i < nSeq; i++) { -scores[i] = jalview.util.Comparison.PID (align.getSequenceAt (i).getSequenceAsString (), s.getSequenceAsString ()); -seqs[i] = align.getSequenceAt (i); -} -jalview.util.QuickSort.sortFloatObject (scores, seqs); -jalview.analysis.AlignmentSorter.setReverseOrder (align, seqs); -}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI,~A,~N,~N"); -c$.setReverseOrder = Clazz.defineMethod (c$, "setReverseOrder", -($fz = function (align, seqs) { -var nSeq = seqs.length; -var len = 0; -if ((nSeq % 2) == 0) { -len = Clazz.doubleToInt (nSeq / 2); -} else { -len = Clazz.doubleToInt ((nSeq + 1) / 2); -}var asq; -{ -for (var i = 0; i < len; i++) { -asq.set (i, seqs[nSeq - i - 1]); -asq.set (nSeq - i - 1, seqs[i]); -} -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,~A"); -c$.setOrder = Clazz.defineMethod (c$, "setOrder", -($fz = function (align, tmp) { -jalview.analysis.AlignmentSorter.setOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (tmp, align.getSequences ())); -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List"); -c$.setOrder = Clazz.defineMethod (c$, "setOrder", -function (align, seqs) { -var algn; -{ -var tmp = new java.util.ArrayList (); -for (var i = 0; i < seqs.length; i++) { -if (algn.contains (seqs[i])) { -tmp.add (seqs[i]); -}} -algn.clear (); -for (var i = 0; i < tmp.size (); i++) { -algn.add (tmp.get (i)); -} -}}, "jalview.datamodel.AlignmentI,~A"); -c$.sortByID = Clazz.defineMethod (c$, "sortByID", -function (align) { -var nSeq = align.getHeight (); -var ids = new Array (nSeq); -var seqs = new Array (nSeq); -for (var i = 0; i < nSeq; i++) { -ids[i] = align.getSequenceAt (i).getName (); -seqs[i] = align.getSequenceAt (i); -} -jalview.util.QuickSort.sort (ids, seqs); -if (jalview.analysis.AlignmentSorter.sortIdAscending) { -jalview.analysis.AlignmentSorter.setReverseOrder (align, seqs); -} else { -jalview.analysis.AlignmentSorter.setOrder (align, seqs); -}jalview.analysis.AlignmentSorter.sortIdAscending = !jalview.analysis.AlignmentSorter.sortIdAscending; -}, "jalview.datamodel.AlignmentI"); -c$.sortByLength = Clazz.defineMethod (c$, "sortByLength", -function (align) { -var nSeq = align.getHeight (); -var length = Clazz.newFloatArray (nSeq, 0); -var seqs = new Array (nSeq); -for (var i = 0; i < nSeq; i++) { -seqs[i] = align.getSequenceAt (i); -length[i] = (seqs[i].getEnd () - seqs[i].getStart ()); -} -jalview.util.QuickSort.sortFloatObject (length, seqs); -if (jalview.analysis.AlignmentSorter.sortLengthAscending) { -jalview.analysis.AlignmentSorter.setReverseOrder (align, seqs); -} else { -jalview.analysis.AlignmentSorter.setOrder (align, seqs); -}jalview.analysis.AlignmentSorter.sortLengthAscending = !jalview.analysis.AlignmentSorter.sortLengthAscending; -}, "jalview.datamodel.AlignmentI"); -c$.sortByGroup = Clazz.defineMethod (c$, "sortByGroup", -function (align) { -var groups = new java.util.ArrayList (); -if (groups.hashCode () != jalview.analysis.AlignmentSorter.lastGroupHash) { -jalview.analysis.AlignmentSorter.sortGroupAscending = true; -jalview.analysis.AlignmentSorter.lastGroupHash = groups.hashCode (); -} else { -jalview.analysis.AlignmentSorter.sortGroupAscending = !jalview.analysis.AlignmentSorter.sortGroupAscending; -}for (var sg, $sg = align.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -for (var j = 0; j < groups.size (); j++) { -var sg2 = groups.get (j); -if (sg.getSize () > sg2.getSize ()) { -groups.add (j, sg); -break; -}} -if (!groups.contains (sg)) { -groups.add (sg); -}} -var seqs = new java.util.ArrayList (); -for (var i = 0; i < groups.size (); i++) { -var sg = groups.get (i); -var orderedseqs = sg.getSequencesInOrder (align); -for (var j = 0; j < orderedseqs.length; j++) { -seqs.add (orderedseqs[j]); -} -} -if (jalview.analysis.AlignmentSorter.sortGroupAscending) { -jalview.analysis.AlignmentSorter.setOrder (align, seqs); -} else { -jalview.analysis.AlignmentSorter.setReverseOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (seqs, align.getSequences ())); -}}, "jalview.datamodel.AlignmentI"); -c$.vectorSubsetToArray = Clazz.defineMethod (c$, "vectorSubsetToArray", -($fz = function (tmp, mask) { -var seqs = new java.util.ArrayList (); -var i; -var idx; -var tmask = Clazz.newBooleanArray (mask.size (), false); -for (i = 0; i < mask.size (); i++) { -tmask[i] = true; -} -for (i = 0; i < tmp.size (); i++) { -var sq = tmp.get (i); -idx = mask.indexOf (sq); -if (idx > -1 && tmask[idx]) { -tmask[idx] = false; -seqs.add (sq); -}} -for (i = 0; i < tmask.length; i++) { -if (tmask[i]) { -seqs.add (mask.get (i)); -}} -return seqs.toArray ( new Array (seqs.size ())); -}, $fz.isPrivate = true, $fz), "java.util.List,java.util.List"); -c$.sortBy = Clazz.defineMethod (c$, "sortBy", -function (align, order) { -var tmp = order.getOrder (); -if (jalview.analysis.AlignmentSorter.lastOrder === order) { -jalview.analysis.AlignmentSorter.sortOrderAscending = !jalview.analysis.AlignmentSorter.sortOrderAscending; -} else { -jalview.analysis.AlignmentSorter.sortOrderAscending = true; -}if (jalview.analysis.AlignmentSorter.sortOrderAscending) { -jalview.analysis.AlignmentSorter.setOrder (align, tmp); -} else { -jalview.analysis.AlignmentSorter.setReverseOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (tmp, align.getSequences ())); -}}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentOrder"); -c$.getOrderByTree = Clazz.defineMethod (c$, "getOrderByTree", -($fz = function (align, tree) { -var nSeq = align.getHeight (); -var tmp = new java.util.ArrayList (); -tmp = jalview.analysis.AlignmentSorter._sortByTree (tree.getTopNode (), tmp, align.getSequences ()); -if (tmp.size () != nSeq) { -if (tmp.size () != nSeq) { -jalview.analysis.AlignmentSorter.addStrays (align, tmp); -}if (tmp.size () != nSeq) { -System.err.println ("WARNING: tmp.size()=" + tmp.size () + " != nseq=" + nSeq + " in getOrderByTree - tree contains sequences not in alignment"); -}}return tmp; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,jalview.analysis.NJTree"); -c$.sortByTree = Clazz.defineMethod (c$, "sortByTree", -function (align, tree) { -var tmp = jalview.analysis.AlignmentSorter.getOrderByTree (align, tree); -if (jalview.analysis.AlignmentSorter.lastTree !== tree) { -jalview.analysis.AlignmentSorter.sortTreeAscending = true; -jalview.analysis.AlignmentSorter.lastTree = tree; -} else { -jalview.analysis.AlignmentSorter.sortTreeAscending = !jalview.analysis.AlignmentSorter.sortTreeAscending; -}if (jalview.analysis.AlignmentSorter.sortTreeAscending) { -jalview.analysis.AlignmentSorter.setOrder (align, tmp); -} else { -jalview.analysis.AlignmentSorter.setReverseOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (tmp, align.getSequences ())); -}}, "jalview.datamodel.AlignmentI,jalview.analysis.NJTree"); -c$.addStrays = Clazz.defineMethod (c$, "addStrays", -($fz = function (align, tmp) { -var nSeq = align.getHeight (); -for (var i = 0; i < nSeq; i++) { -if (!tmp.contains (align.getSequenceAt (i))) { -tmp.add (align.getSequenceAt (i)); -}} -if (nSeq != tmp.size ()) { -System.err.println ("ERROR: Size still not right even after addStrays"); -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List"); -c$._sortByTree = Clazz.defineMethod (c$, "_sortByTree", -($fz = function (node, tmp, seqset) { -if (node == null) { -return tmp; -}var left = node.left (); -var right = node.right (); -if ((left == null) && (right == null)) { -if (!node.isPlaceholder () && (node.element () != null)) { -if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { -if (!tmp.contains (node.element ())) { -tmp.add (node.element ()); -}}}return tmp; -} else { -jalview.analysis.AlignmentSorter._sortByTree (left, tmp, seqset); -jalview.analysis.AlignmentSorter._sortByTree (right, tmp, seqset); -}return tmp; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode,java.util.List,java.util.List"); -c$.recoverOrder = Clazz.defineMethod (c$, "recoverOrder", -function (alignment) { -var ids = Clazz.newFloatArray (alignment.length, 0); -for (var i = 0; i < alignment.length; i++) { -ids[i] = ( new Float (alignment[i].getName ().substring (8))).floatValue (); -} -jalview.util.QuickSort.sortFloatObject (ids, alignment); -}, "~A"); -c$.sortByAnnotationScore = Clazz.defineMethod (c$, "sortByAnnotationScore", -function (scoreLabel, alignment) { -var seqs = alignment.getSequencesArray (); -var hasScore = Clazz.newBooleanArray (seqs.length, false); -var hasScores = 0; -var scores = Clazz.newDoubleArray (seqs.length, 0); -var min = 0; -var max = 0; -for (var i = 0; i < seqs.length; i++) { -var scoreAnn = seqs[i].getAnnotation (scoreLabel); -if (scoreAnn != null) { -hasScores++; -hasScore[i] = true; -scores[i] = scoreAnn[0].getScore (); -if (hasScores == 1) { -max = min = scores[i]; -} else { -if (max < scores[i]) { -max = scores[i]; -}if (min > scores[i]) { -min = scores[i]; -}}} else { -hasScore[i] = false; -}} -if (hasScores == 0) { -return; -}if (hasScores < seqs.length) { -for (var i = 0; i < seqs.length; i++) { -if (!hasScore[i]) { -scores[i] = (max + i + 1.0); -}} -}jalview.util.QuickSort.sortDouble (scores, seqs); -if (jalview.analysis.AlignmentSorter.lastSortByScore !== scoreLabel) { -jalview.analysis.AlignmentSorter.lastSortByScore = scoreLabel; -jalview.analysis.AlignmentSorter.setOrder (alignment, seqs); -} else { -jalview.analysis.AlignmentSorter.setReverseOrder (alignment, seqs); -}}, "~S,jalview.datamodel.AlignmentI"); -c$.sortByFeature = Clazz.defineMethod (c$, "sortByFeature", -function (featureLabel, groupLabel, start, stop, alignment, method) { -jalview.analysis.AlignmentSorter.sortByFeature (featureLabel == null ? null : Clazz.newArray (-1, [featureLabel]), groupLabel == null ? null : Clazz.newArray (-1, [groupLabel]), start, stop, alignment, method); -}, "~S,~S,~N,~N,jalview.datamodel.AlignmentI,~S"); -c$.containsIgnoreCase = Clazz.defineMethod (c$, "containsIgnoreCase", -($fz = function (lab, labs) { -if (labs == null) { -return true; -}if (lab == null) { -return false; -}for (var q = 0; q < labs.length; q++) { -if (labs[q] != null && lab.equalsIgnoreCase (labs[q])) { -return true; -}} -return false; -}, $fz.isPrivate = true, $fz), "~S,~A"); -c$.sortByFeature = Clazz.defineMethod (c$, "sortByFeature", -function (featureLabels, groupLabels, start, stop, alignment, method) { -if (method !== jalview.analysis.AlignmentSorter.FEATURE_SCORE && method !== jalview.analysis.AlignmentSorter.FEATURE_LABEL && method !== jalview.analysis.AlignmentSorter.FEATURE_DENSITY) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_sortbyfeature")); -}var ignoreScore = method !== jalview.analysis.AlignmentSorter.FEATURE_SCORE; -var scoreLabel = new StringBuffer (); -scoreLabel.append (start + stop + method); -for (var i = 0; featureLabels != null && i < featureLabels.length; i++) { -scoreLabel.append (featureLabels[i] == null ? "null" : featureLabels[i]); -} -for (var i = 0; groupLabels != null && i < groupLabels.length; i++) { -scoreLabel.append (groupLabels[i] == null ? "null" : groupLabels[i]); -} -var seqs = alignment.getSequencesArray (); -var hasScore = Clazz.newBooleanArray (seqs.length, false); -var hasScores = 0; -var scores = Clazz.newDoubleArray (seqs.length, 0); -var seqScores = Clazz.newIntArray (seqs.length, 0); -var feats = new Array (seqs.length); -var min = 0; -var max = 0; -for (var i = 0; i < seqs.length; i++) { -var sf = seqs[i].getSequenceFeatures (); -if (sf == null) { -sf = new Array (0); -} else { -var tmp = new Array (sf.length); -for (var s = 0; s < tmp.length; s++) { -tmp[s] = sf[s]; -} -sf = tmp; -}var sstart = (start == -1) ? start : seqs[i].findPosition (start); -var sstop = (stop == -1) ? stop : seqs[i].findPosition (stop); -seqScores[i] = 0; -scores[i] = 0.0; -var n = sf.length; -for (var f = 0; f < sf.length; f++) { -if ((sf[f].end < sstart || sf[f].begin > sstop) || (featureLabels != null && !jalview.analysis.AlignmentSorter.containsIgnoreCase (sf[f].type, featureLabels)) || (groupLabels != null && (sf[f].getFeatureGroup () != null && !jalview.analysis.AlignmentSorter.containsIgnoreCase (sf[f].getFeatureGroup (), groupLabels)))) { -sf[f] = null; -n--; -} else { -if (!ignoreScore && !Float.isNaN (sf[f].getScore ())) { -if (seqScores[i] == 0) { -hasScores++; -}seqScores[i]++; -hasScore[i] = true; -scores[i] += sf[f].getScore (); -}}} -var fs; -feats[i] = fs = new Array (n); -if (n > 0) { -n = 0; -for (var f = 0; f < sf.length; f++) { -if (sf[f] != null) { -(feats[i])[n++] = sf[f]; -}} -if (method === jalview.analysis.AlignmentSorter.FEATURE_LABEL) { -var labs = new Array (fs.length); -for (var l = 0; l < labs.length; l++) { -labs[l] = (fs[l].getDescription () != null ? fs[l].getDescription () : fs[l].getType ()); -} -jalview.util.QuickSort.sort (labs, (feats[i])); -}}if (hasScore[i]) { -scores[i] /= seqScores[i]; -if (hasScores == 1) { -max = min = scores[i]; -} else { -if (max < scores[i]) { -max = scores[i]; -}if (min > scores[i]) { -min = scores[i]; -}}}} -if (method === jalview.analysis.AlignmentSorter.FEATURE_SCORE) { -if (hasScores == 0) { -return; -}if (hasScores < seqs.length) { -for (var i = 0; i < seqs.length; i++) { -if (!hasScore[i]) { -scores[i] = (max + 1 + i); -} else { -var nf = (feats[i] == null) ? 0 : (feats[i]).length; -}} -}jalview.util.QuickSort.sortDouble (scores, seqs); -} else if (method === jalview.analysis.AlignmentSorter.FEATURE_DENSITY) { -var fr = 0.9 / (1.0 * seqs.length); -for (var i = 0; i < seqs.length; i++) { -var nf; -scores[i] = (0.05 + fr * i) + (nf = ((feats[i] == null) ? 0.0 : 1.0 * (feats[i]).length)); -} -jalview.util.QuickSort.sortDouble (scores, seqs); -} else { -if (method === jalview.analysis.AlignmentSorter.FEATURE_LABEL) { -throw new Error (jalview.util.MessageManager.getString ("error.not_yet_implemented")); -}}if (jalview.analysis.AlignmentSorter.lastSortByFeatureScore == null || !scoreLabel.toString ().equals (jalview.analysis.AlignmentSorter.lastSortByFeatureScore)) { -jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending = true; -} else { -jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending = !jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending; -}if (jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending) { -jalview.analysis.AlignmentSorter.setOrder (alignment, seqs); -} else { -jalview.analysis.AlignmentSorter.setReverseOrder (alignment, seqs); -}jalview.analysis.AlignmentSorter.lastSortByFeatureScore = scoreLabel.toString (); -}, "~A,~A,~N,~N,jalview.datamodel.AlignmentI,~S"); -Clazz.defineStatics (c$, -"sortIdAscending", true, -"lastGroupHash", 0, -"sortGroupAscending", true, -"lastOrder", null, -"sortOrderAscending", true, -"lastTree", null, -"sortTreeAscending", true, -"lastSortByScore", null, -"sortByScoreAscending", true, -"lastSortByFeatureScore", null, -"sortByFeatureScoreAscending", true, -"sortLengthAscending", false, -"FEATURE_SCORE", "average_score", -"FEATURE_LABEL", "text", -"FEATURE_DENSITY", "density"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.AlignmentSorter", ["jalview.datamodel.SequenceI", "jalview.util.Comparison", "$.MessageManager", "$.QuickSort", "java.lang.Error", "$.Float", "$.StringBuffer", "java.util.ArrayList"], function () { +c$ = Clazz.declareType (jalview.analysis, "AlignmentSorter"); +c$.sortByPID = Clazz.defineMethod (c$, "sortByPID", +function (align, s, tosort) { +jalview.analysis.AlignmentSorter.sortByPID (align, s, tosort, 0, -1); +}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI,~A"); +c$.sortByPID = Clazz.defineMethod (c$, "sortByPID", +function (align, s, tosort, start, end) { +var nSeq = align.getHeight (); +var scores = Clazz.newFloatArray (nSeq, 0); +var seqs = new Array (nSeq); +for (var i = 0; i < nSeq; i++) { +scores[i] = jalview.util.Comparison.PID (align.getSequenceAt (i).getSequenceAsString (), s.getSequenceAsString ()); +seqs[i] = align.getSequenceAt (i); +} +jalview.util.QuickSort.sortFloatObject (scores, seqs); +jalview.analysis.AlignmentSorter.setReverseOrder (align, seqs); +}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI,~A,~N,~N"); +c$.setReverseOrder = Clazz.defineMethod (c$, "setReverseOrder", +($fz = function (align, seqs) { +var nSeq = seqs.length; +var len = 0; +if ((nSeq % 2) == 0) { +len = Clazz.doubleToInt (nSeq / 2); +} else { +len = Clazz.doubleToInt ((nSeq + 1) / 2); +}var asq; +{ +for (var i = 0; i < len; i++) { +asq.set (i, seqs[nSeq - i - 1]); +asq.set (nSeq - i - 1, seqs[i]); +} +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,~A"); +c$.setOrder = Clazz.defineMethod (c$, "setOrder", +($fz = function (align, tmp) { +jalview.analysis.AlignmentSorter.setOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (tmp, align.getSequences ())); +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List"); +c$.setOrder = Clazz.defineMethod (c$, "setOrder", +function (align, seqs) { +var algn; +{ +var tmp = new java.util.ArrayList (); +for (var i = 0; i < seqs.length; i++) { +if (algn.contains (seqs[i])) { +tmp.add (seqs[i]); +}} +algn.clear (); +for (var i = 0; i < tmp.size (); i++) { +algn.add (tmp.get (i)); +} +}}, "jalview.datamodel.AlignmentI,~A"); +c$.sortByID = Clazz.defineMethod (c$, "sortByID", +function (align) { +var nSeq = align.getHeight (); +var ids = new Array (nSeq); +var seqs = new Array (nSeq); +for (var i = 0; i < nSeq; i++) { +ids[i] = align.getSequenceAt (i).getName (); +seqs[i] = align.getSequenceAt (i); +} +jalview.util.QuickSort.sort (ids, seqs); +if (jalview.analysis.AlignmentSorter.sortIdAscending) { +jalview.analysis.AlignmentSorter.setReverseOrder (align, seqs); +} else { +jalview.analysis.AlignmentSorter.setOrder (align, seqs); +}jalview.analysis.AlignmentSorter.sortIdAscending = !jalview.analysis.AlignmentSorter.sortIdAscending; +}, "jalview.datamodel.AlignmentI"); +c$.sortByLength = Clazz.defineMethod (c$, "sortByLength", +function (align) { +var nSeq = align.getHeight (); +var length = Clazz.newFloatArray (nSeq, 0); +var seqs = new Array (nSeq); +for (var i = 0; i < nSeq; i++) { +seqs[i] = align.getSequenceAt (i); +length[i] = (seqs[i].getEnd () - seqs[i].getStart ()); +} +jalview.util.QuickSort.sortFloatObject (length, seqs); +if (jalview.analysis.AlignmentSorter.sortLengthAscending) { +jalview.analysis.AlignmentSorter.setReverseOrder (align, seqs); +} else { +jalview.analysis.AlignmentSorter.setOrder (align, seqs); +}jalview.analysis.AlignmentSorter.sortLengthAscending = !jalview.analysis.AlignmentSorter.sortLengthAscending; +}, "jalview.datamodel.AlignmentI"); +c$.sortByGroup = Clazz.defineMethod (c$, "sortByGroup", +function (align) { +var groups = new java.util.ArrayList (); +if (groups.hashCode () != jalview.analysis.AlignmentSorter.lastGroupHash) { +jalview.analysis.AlignmentSorter.sortGroupAscending = true; +jalview.analysis.AlignmentSorter.lastGroupHash = groups.hashCode (); +} else { +jalview.analysis.AlignmentSorter.sortGroupAscending = !jalview.analysis.AlignmentSorter.sortGroupAscending; +}for (var sg, $sg = align.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +for (var j = 0; j < groups.size (); j++) { +var sg2 = groups.get (j); +if (sg.getSize () > sg2.getSize ()) { +groups.add (j, sg); +break; +}} +if (!groups.contains (sg)) { +groups.add (sg); +}} +var seqs = new java.util.ArrayList (); +for (var i = 0; i < groups.size (); i++) { +var sg = groups.get (i); +var orderedseqs = sg.getSequencesInOrder (align); +for (var j = 0; j < orderedseqs.length; j++) { +seqs.add (orderedseqs[j]); +} +} +if (jalview.analysis.AlignmentSorter.sortGroupAscending) { +jalview.analysis.AlignmentSorter.setOrder (align, seqs); +} else { +jalview.analysis.AlignmentSorter.setReverseOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (seqs, align.getSequences ())); +}}, "jalview.datamodel.AlignmentI"); +c$.vectorSubsetToArray = Clazz.defineMethod (c$, "vectorSubsetToArray", +($fz = function (tmp, mask) { +var seqs = new java.util.ArrayList (); +var i; +var idx; +var tmask = Clazz.newBooleanArray (mask.size (), false); +for (i = 0; i < mask.size (); i++) { +tmask[i] = true; +} +for (i = 0; i < tmp.size (); i++) { +var sq = tmp.get (i); +idx = mask.indexOf (sq); +if (idx > -1 && tmask[idx]) { +tmask[idx] = false; +seqs.add (sq); +}} +for (i = 0; i < tmask.length; i++) { +if (tmask[i]) { +seqs.add (mask.get (i)); +}} +return seqs.toArray ( new Array (seqs.size ())); +}, $fz.isPrivate = true, $fz), "java.util.List,java.util.List"); +c$.sortBy = Clazz.defineMethod (c$, "sortBy", +function (align, order) { +var tmp = order.getOrder (); +if (jalview.analysis.AlignmentSorter.lastOrder === order) { +jalview.analysis.AlignmentSorter.sortOrderAscending = !jalview.analysis.AlignmentSorter.sortOrderAscending; +} else { +jalview.analysis.AlignmentSorter.sortOrderAscending = true; +}if (jalview.analysis.AlignmentSorter.sortOrderAscending) { +jalview.analysis.AlignmentSorter.setOrder (align, tmp); +} else { +jalview.analysis.AlignmentSorter.setReverseOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (tmp, align.getSequences ())); +}}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentOrder"); +c$.getOrderByTree = Clazz.defineMethod (c$, "getOrderByTree", +($fz = function (align, tree) { +var nSeq = align.getHeight (); +var tmp = new java.util.ArrayList (); +tmp = jalview.analysis.AlignmentSorter._sortByTree (tree.getTopNode (), tmp, align.getSequences ()); +if (tmp.size () != nSeq) { +if (tmp.size () != nSeq) { +jalview.analysis.AlignmentSorter.addStrays (align, tmp); +}if (tmp.size () != nSeq) { +System.err.println ("WARNING: tmp.size()=" + tmp.size () + " != nseq=" + nSeq + " in getOrderByTree - tree contains sequences not in alignment"); +}}return tmp; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,jalview.analysis.NJTree"); +c$.sortByTree = Clazz.defineMethod (c$, "sortByTree", +function (align, tree) { +var tmp = jalview.analysis.AlignmentSorter.getOrderByTree (align, tree); +if (jalview.analysis.AlignmentSorter.lastTree !== tree) { +jalview.analysis.AlignmentSorter.sortTreeAscending = true; +jalview.analysis.AlignmentSorter.lastTree = tree; +} else { +jalview.analysis.AlignmentSorter.sortTreeAscending = !jalview.analysis.AlignmentSorter.sortTreeAscending; +}if (jalview.analysis.AlignmentSorter.sortTreeAscending) { +jalview.analysis.AlignmentSorter.setOrder (align, tmp); +} else { +jalview.analysis.AlignmentSorter.setReverseOrder (align, jalview.analysis.AlignmentSorter.vectorSubsetToArray (tmp, align.getSequences ())); +}}, "jalview.datamodel.AlignmentI,jalview.analysis.NJTree"); +c$.addStrays = Clazz.defineMethod (c$, "addStrays", +($fz = function (align, tmp) { +var nSeq = align.getHeight (); +for (var i = 0; i < nSeq; i++) { +if (!tmp.contains (align.getSequenceAt (i))) { +tmp.add (align.getSequenceAt (i)); +}} +if (nSeq != tmp.size ()) { +System.err.println ("ERROR: Size still not right even after addStrays"); +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List"); +c$._sortByTree = Clazz.defineMethod (c$, "_sortByTree", +($fz = function (node, tmp, seqset) { +if (node == null) { +return tmp; +}var left = node.left (); +var right = node.right (); +if ((left == null) && (right == null)) { +if (!node.isPlaceholder () && (node.element () != null)) { +if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { +if (!tmp.contains (node.element ())) { +tmp.add (node.element ()); +}}}return tmp; +} else { +jalview.analysis.AlignmentSorter._sortByTree (left, tmp, seqset); +jalview.analysis.AlignmentSorter._sortByTree (right, tmp, seqset); +}return tmp; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode,java.util.List,java.util.List"); +c$.recoverOrder = Clazz.defineMethod (c$, "recoverOrder", +function (alignment) { +var ids = Clazz.newFloatArray (alignment.length, 0); +for (var i = 0; i < alignment.length; i++) { +ids[i] = ( new Float (alignment[i].getName ().substring (8))).floatValue (); +} +jalview.util.QuickSort.sortFloatObject (ids, alignment); +}, "~A"); +c$.sortByAnnotationScore = Clazz.defineMethod (c$, "sortByAnnotationScore", +function (scoreLabel, alignment) { +var seqs = alignment.getSequencesArray (); +var hasScore = Clazz.newBooleanArray (seqs.length, false); +var hasScores = 0; +var scores = Clazz.newDoubleArray (seqs.length, 0); +var min = 0; +var max = 0; +for (var i = 0; i < seqs.length; i++) { +var scoreAnn = seqs[i].getAnnotation (scoreLabel); +if (scoreAnn != null) { +hasScores++; +hasScore[i] = true; +scores[i] = scoreAnn[0].getScore (); +if (hasScores == 1) { +max = min = scores[i]; +} else { +if (max < scores[i]) { +max = scores[i]; +}if (min > scores[i]) { +min = scores[i]; +}}} else { +hasScore[i] = false; +}} +if (hasScores == 0) { +return; +}if (hasScores < seqs.length) { +for (var i = 0; i < seqs.length; i++) { +if (!hasScore[i]) { +scores[i] = (max + i + 1.0); +}} +}jalview.util.QuickSort.sortDouble (scores, seqs); +if (jalview.analysis.AlignmentSorter.lastSortByScore !== scoreLabel) { +jalview.analysis.AlignmentSorter.lastSortByScore = scoreLabel; +jalview.analysis.AlignmentSorter.setOrder (alignment, seqs); +} else { +jalview.analysis.AlignmentSorter.setReverseOrder (alignment, seqs); +}}, "~S,jalview.datamodel.AlignmentI"); +c$.sortByFeature = Clazz.defineMethod (c$, "sortByFeature", +function (featureLabel, groupLabel, start, stop, alignment, method) { +jalview.analysis.AlignmentSorter.sortByFeature (featureLabel == null ? null : Clazz.newArray (-1, [featureLabel]), groupLabel == null ? null : Clazz.newArray (-1, [groupLabel]), start, stop, alignment, method); +}, "~S,~S,~N,~N,jalview.datamodel.AlignmentI,~S"); +c$.containsIgnoreCase = Clazz.defineMethod (c$, "containsIgnoreCase", +($fz = function (lab, labs) { +if (labs == null) { +return true; +}if (lab == null) { +return false; +}for (var q = 0; q < labs.length; q++) { +if (labs[q] != null && lab.equalsIgnoreCase (labs[q])) { +return true; +}} +return false; +}, $fz.isPrivate = true, $fz), "~S,~A"); +c$.sortByFeature = Clazz.defineMethod (c$, "sortByFeature", +function (featureLabels, groupLabels, start, stop, alignment, method) { +if (method !== jalview.analysis.AlignmentSorter.FEATURE_SCORE && method !== jalview.analysis.AlignmentSorter.FEATURE_LABEL && method !== jalview.analysis.AlignmentSorter.FEATURE_DENSITY) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_sortbyfeature")); +}var ignoreScore = method !== jalview.analysis.AlignmentSorter.FEATURE_SCORE; +var scoreLabel = new StringBuffer (); +scoreLabel.append (start + stop + method); +for (var i = 0; featureLabels != null && i < featureLabels.length; i++) { +scoreLabel.append (featureLabels[i] == null ? "null" : featureLabels[i]); +} +for (var i = 0; groupLabels != null && i < groupLabels.length; i++) { +scoreLabel.append (groupLabels[i] == null ? "null" : groupLabels[i]); +} +var seqs = alignment.getSequencesArray (); +var hasScore = Clazz.newBooleanArray (seqs.length, false); +var hasScores = 0; +var scores = Clazz.newDoubleArray (seqs.length, 0); +var seqScores = Clazz.newIntArray (seqs.length, 0); +var feats = new Array (seqs.length); +var min = 0; +var max = 0; +for (var i = 0; i < seqs.length; i++) { +var sf = seqs[i].getSequenceFeatures (); +if (sf == null) { +sf = new Array (0); +} else { +var tmp = new Array (sf.length); +for (var s = 0; s < tmp.length; s++) { +tmp[s] = sf[s]; +} +sf = tmp; +}var sstart = (start == -1) ? start : seqs[i].findPosition (start); +var sstop = (stop == -1) ? stop : seqs[i].findPosition (stop); +seqScores[i] = 0; +scores[i] = 0.0; +var n = sf.length; +for (var f = 0; f < sf.length; f++) { +if ((sf[f].end < sstart || sf[f].begin > sstop) || (featureLabels != null && !jalview.analysis.AlignmentSorter.containsIgnoreCase (sf[f].type, featureLabels)) || (groupLabels != null && (sf[f].getFeatureGroup () != null && !jalview.analysis.AlignmentSorter.containsIgnoreCase (sf[f].getFeatureGroup (), groupLabels)))) { +sf[f] = null; +n--; +} else { +if (!ignoreScore && !Float.isNaN (sf[f].getScore ())) { +if (seqScores[i] == 0) { +hasScores++; +}seqScores[i]++; +hasScore[i] = true; +scores[i] += sf[f].getScore (); +}}} +var fs; +feats[i] = fs = new Array (n); +if (n > 0) { +n = 0; +for (var f = 0; f < sf.length; f++) { +if (sf[f] != null) { +(feats[i])[n++] = sf[f]; +}} +if (method === jalview.analysis.AlignmentSorter.FEATURE_LABEL) { +var labs = new Array (fs.length); +for (var l = 0; l < labs.length; l++) { +labs[l] = (fs[l].getDescription () != null ? fs[l].getDescription () : fs[l].getType ()); +} +jalview.util.QuickSort.sort (labs, (feats[i])); +}}if (hasScore[i]) { +scores[i] /= seqScores[i]; +if (hasScores == 1) { +max = min = scores[i]; +} else { +if (max < scores[i]) { +max = scores[i]; +}if (min > scores[i]) { +min = scores[i]; +}}}} +if (method === jalview.analysis.AlignmentSorter.FEATURE_SCORE) { +if (hasScores == 0) { +return; +}if (hasScores < seqs.length) { +for (var i = 0; i < seqs.length; i++) { +if (!hasScore[i]) { +scores[i] = (max + 1 + i); +} else { +var nf = (feats[i] == null) ? 0 : (feats[i]).length; +}} +}jalview.util.QuickSort.sortDouble (scores, seqs); +} else if (method === jalview.analysis.AlignmentSorter.FEATURE_DENSITY) { +var fr = 0.9 / (1.0 * seqs.length); +for (var i = 0; i < seqs.length; i++) { +var nf; +scores[i] = (0.05 + fr * i) + (nf = ((feats[i] == null) ? 0.0 : 1.0 * (feats[i]).length)); +} +jalview.util.QuickSort.sortDouble (scores, seqs); +} else { +if (method === jalview.analysis.AlignmentSorter.FEATURE_LABEL) { +throw new Error (jalview.util.MessageManager.getString ("error.not_yet_implemented")); +}}if (jalview.analysis.AlignmentSorter.lastSortByFeatureScore == null || !scoreLabel.toString ().equals (jalview.analysis.AlignmentSorter.lastSortByFeatureScore)) { +jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending = true; +} else { +jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending = !jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending; +}if (jalview.analysis.AlignmentSorter.sortByFeatureScoreAscending) { +jalview.analysis.AlignmentSorter.setOrder (alignment, seqs); +} else { +jalview.analysis.AlignmentSorter.setReverseOrder (alignment, seqs); +}jalview.analysis.AlignmentSorter.lastSortByFeatureScore = scoreLabel.toString (); +}, "~A,~A,~N,~N,jalview.datamodel.AlignmentI,~S"); +Clazz.defineStatics (c$, +"sortIdAscending", true, +"lastGroupHash", 0, +"sortGroupAscending", true, +"lastOrder", null, +"sortOrderAscending", true, +"lastTree", null, +"sortTreeAscending", true, +"lastSortByScore", null, +"sortByScoreAscending", true, +"lastSortByFeatureScore", null, +"sortByFeatureScoreAscending", true, +"sortLengthAscending", false, +"FEATURE_SCORE", "average_score", +"FEATURE_LABEL", "text", +"FEATURE_DENSITY", "density"); +}); diff --git a/bin/jalview/analysis/AlignmentUtils.class b/bin/jalview/analysis/AlignmentUtils.class index c52a1d75d81b0267fa96386d8a96cdbe9ead4820..85e58d3ac62a4311300a4b782b3bc6ea48c413fe 100644 GIT binary patch delta 106 zcmV-w0G0ph+5zX<0kE7v0m-wSKp6rCuK))B02h-^Lm89RLQVu7{{Tvp{z4tIMMDn^ z0X?%-PcH!s4FCxI022WV0uB)nvyo6c0s#WE%~H<-12O;%lb=<60V9(gRwf1i04V?$ MlOI+hvujrW7LUUrbN~PV delta 100 zcmV-q0Gt2k+5zg?0kE7v0m`$TKp6rCumA`D02h-@Lm89RLQVx50{;L?lm0>-vqVD= z3;{l~R8KDf4GsVa`~VXH3jz)i4Fa=|P&)zv1GCFg&jJH801cC!Reb> maxoffset && newSeq.getDatasetSequence ().getStart () < s.getStart ()) { -maxoffset = newSeqStart; -}sq.add (newSeq); -} -if (flankSize > -1) { -maxoffset = Math.min (maxoffset, flankSize); -}for (var s, $s = sq.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { -var ds = s; -while (ds.getDatasetSequence () != null) { -ds = ds.getDatasetSequence (); -} -var s_end = s.findPosition (s.getStart () + s.getLength ()); -var ustream_ds = s.getStart () - ds.getStart (); -var dstream_ds = ds.getEnd () - s_end; -var offset = maxoffset - ustream_ds; -if (flankSize >= 0) { -if (flankSize < ustream_ds) { -offset = maxoffset - flankSize; -ustream_ds = flankSize; -}if (flankSize <= dstream_ds) { -dstream_ds = flankSize - 1; -}}var upstream = String.instantialize (ds.getSequence (s.getStart () - 1 - ustream_ds, s.getStart () - 1)).toLowerCase ().toCharArray (); -var downstream = String.instantialize (ds.getSequence (s_end - 1, s_end + dstream_ds)).toLowerCase ().toCharArray (); -var coreseq = s.getSequence (); -var nseq = Clazz.newCharArray (offset + upstream.length + downstream.length + coreseq.length, '\0'); -var c = core.getGapCharacter (); -var p = 0; -for (; p < offset; p++) { -nseq[p] = c; -} -System.arraycopy (upstream, 0, nseq, p, upstream.length); -System.arraycopy (coreseq, 0, nseq, p + upstream.length, coreseq.length); -System.arraycopy (downstream, 0, nseq, p + coreseq.length + upstream.length, downstream.length); -s.setSequence ( String.instantialize (nseq)); -s.setStart (s.getStart () - ustream_ds); -s.setEnd (s_end + downstream.length); -} -var newAl = new jalview.datamodel.Alignment (sq.toArray ( new Array (0))); -for (var s, $s = sq.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { -if (s.getAnnotation () != null) { -for (var aa, $aa = 0, $$aa = s.getAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { -aa.adjustForAlignment (); -newAl.addAnnotation (aa); -} -}} -newAl.setDataset (core.getDataset ()); -return newAl; -}, "jalview.datamodel.AlignmentI,~N"); -c$.getSequenceIndex = Clazz.defineMethod (c$, "getSequenceIndex", -function (al, seq) { -var result = -1; -var pos = 0; -for (var alSeq, $alSeq = al.getSequences ().iterator (); $alSeq.hasNext () && ((alSeq = $alSeq.next ()) || true);) { -if (alSeq === seq) { -result = pos; -break; -}pos++; -} -return result; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI"); -c$.getSequencesByName = Clazz.defineMethod (c$, "getSequencesByName", -function (al) { -var theMap = new java.util.LinkedHashMap (); -for (var seq, $seq = al.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -var name = seq.getName (); -if (name != null) { -var seqs = theMap.get (name); -if (seqs == null) { -seqs = new java.util.ArrayList (); -theMap.put (name, seqs); -}seqs.add (seq); -}} -return theMap; -}, "jalview.datamodel.AlignmentI"); -c$.mapProteinToCdna = Clazz.defineMethod (c$, "mapProteinToCdna", -function (proteinAlignment, cdnaAlignment) { -if (proteinAlignment == null || cdnaAlignment == null) { -return false; -}var mappedDna = new java.util.HashSet (); -var mappedProtein = new java.util.HashSet (); -var mappingPerformed = jalview.analysis.AlignmentUtils.mapProteinToCdna (proteinAlignment, cdnaAlignment, mappedDna, mappedProtein, true); -mappingPerformed = new Boolean (mappingPerformed | jalview.analysis.AlignmentUtils.mapProteinToCdna (proteinAlignment, cdnaAlignment, mappedDna, mappedProtein, false)).valueOf (); -return mappingPerformed; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); -c$.mapProteinToCdna = Clazz.defineMethod (c$, "mapProteinToCdna", -function (proteinAlignment, cdnaAlignment, mappedDna, mappedProtein, xrefsOnly) { -var mappingPerformed = false; -var thisSeqs = proteinAlignment.getSequences (); -for (var aaSeq, $aaSeq = thisSeqs.iterator (); $aaSeq.hasNext () && ((aaSeq = $aaSeq.next ()) || true);) { -var proteinMapped = false; -var acf = new jalview.datamodel.AlignedCodonFrame (); -for (var cdnaSeq, $cdnaSeq = cdnaAlignment.getSequences ().iterator (); $cdnaSeq.hasNext () && ((cdnaSeq = $cdnaSeq.next ()) || true);) { -if (xrefsOnly && !jalview.analysis.AlignmentUtils.haveCrossRef (aaSeq, cdnaSeq)) { -continue; -}if (!xrefsOnly && (mappedProtein.contains (aaSeq) || mappedDna.contains (cdnaSeq))) { -continue; -}if (!jalview.analysis.AlignmentUtils.mappingExists (proteinAlignment.getCodonFrames (), aaSeq.getDatasetSequence (), cdnaSeq.getDatasetSequence ())) { -var map = jalview.analysis.AlignmentUtils.mapProteinToCdna (aaSeq, cdnaSeq); -if (map != null) { -acf.addMap (cdnaSeq, aaSeq, map); -mappingPerformed = true; -proteinMapped = true; -mappedDna.add (cdnaSeq); -mappedProtein.add (aaSeq); -}}} -if (proteinMapped) { -proteinAlignment.addCodonFrame (acf); -}} -return mappingPerformed; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI,java.util.Set,java.util.Set,~B"); -c$.mappingExists = Clazz.defineMethod (c$, "mappingExists", -function (set, aaSeq, cdnaSeq) { -if (set != null) { -for (var acf, $acf = set.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -if (cdnaSeq === acf.getDnaForAaSeq (aaSeq)) { -return true; -}} -}return false; -}, "java.util.Set,jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); -c$.mapProteinToCdna = Clazz.defineMethod (c$, "mapProteinToCdna", -function (proteinSeq, cdnaSeq) { -var proteinDataset = proteinSeq.getDatasetSequence (); -var aaSeqChars = proteinDataset != null ? proteinDataset.getSequence () : proteinSeq.getSequence (); -var cdnaDataset = cdnaSeq.getDatasetSequence (); -var cdnaSeqChars = cdnaDataset != null ? cdnaDataset.getSequence () : cdnaSeq.getSequence (); -if (aaSeqChars == null || cdnaSeqChars == null) { -return null; -}var mappedLength = 3 * aaSeqChars.length; -var cdnaLength = cdnaSeqChars.length; -var cdnaStart = 1; -var cdnaEnd = cdnaLength; -var proteinStart = 1; -var proteinEnd = aaSeqChars.length; -if (cdnaLength != mappedLength && cdnaLength > 2) { -var lastCodon = String.valueOf (cdnaSeqChars, cdnaLength - 3, 3).toUpperCase (); -for (var stop, $stop = jalview.schemes.ResidueProperties.STOP.iterator (); $stop.hasNext () && ((stop = $stop.next ()) || true);) { -if (lastCodon.equals (stop)) { -cdnaEnd -= 3; -cdnaLength -= 3; -break; -}} -}if (cdnaLength != mappedLength && cdnaLength > 2 && String.valueOf (cdnaSeqChars, 0, 3).toUpperCase ().equals (jalview.schemes.ResidueProperties.START)) { -cdnaStart += 3; -cdnaLength -= 3; -}if (cdnaLength != mappedLength) { -return null; -}if (!jalview.analysis.AlignmentUtils.translatesAs (cdnaSeqChars, cdnaStart - 1, aaSeqChars)) { -return null; -}var map = new jalview.util.MapList ( Clazz.newIntArray (-1, [cdnaStart, cdnaEnd]), Clazz.newIntArray (-1, [1, proteinEnd]), 3, 1); -return map; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); -c$.translatesAs = Clazz.defineMethod (c$, "translatesAs", -function (cdnaSeqChars, cdnaStart, aaSeqChars) { -var aaResidue = 0; -for (var i = cdnaStart; i < cdnaSeqChars.length - 2 && aaResidue < aaSeqChars.length; i += 3, aaResidue++) { -var codon = String.valueOf (cdnaSeqChars, i, 3); -var translated = jalview.schemes.ResidueProperties.codonTranslate (codon); -var aaRes = aaSeqChars[aaResidue]; -if ((translated == null || "STOP".equals (translated)) && aaRes == 'X') { -continue; -}if (translated == null || !(aaRes == translated.charAt (0))) { -return false; -}} -return (aaResidue == aaSeqChars.length); -}, "~A,~N,~A"); -c$.alignSequenceAs = Clazz.defineMethod (c$, "alignSequenceAs", -function (seq, al, gap, preserveMappedGaps, preserveUnmappedGaps) { -var mappings = al.getCodonFrame (seq); -if (mappings == null || mappings.isEmpty ()) { -return false; -}var alignFrom = null; -var mapping = null; -for (var mp, $mp = mappings.iterator (); $mp.hasNext () && ((mp = $mp.next ()) || true);) { -alignFrom = mp.findAlignedSequence (seq.getDatasetSequence (), al); -if (alignFrom != null) { -mapping = mp; -break; -}} -if (alignFrom == null) { -return false; -}jalview.analysis.AlignmentUtils.alignSequenceAs (seq, alignFrom, mapping, gap, al.getGapCharacter (), preserveMappedGaps, preserveUnmappedGaps); -return true; -}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI,~S,~B,~B"); -c$.alignSequenceAs = Clazz.defineMethod (c$, "alignSequenceAs", -function (alignTo, alignFrom, mapping, myGap, sourceGap, preserveMappedGaps, preserveUnmappedGaps) { -var thisSeq = alignTo.getSequence (); -var thatAligned = alignFrom.getSequence (); -var thisAligned = new StringBuilder (2 * thisSeq.length); -var thisSeqPos = 0; -var sourceDsPos = 0; -var basesWritten = 0; -var myGapChar = myGap.charAt (0); -var ratio = myGap.length; -var sourceGapMappedLength = 0; -var inExon = false; -for (var sourceChar, $sourceChar = 0, $$sourceChar = thatAligned; $sourceChar < $$sourceChar.length && ((sourceChar = $$sourceChar[$sourceChar]) || true); $sourceChar++) { -if (sourceChar == sourceGap) { -sourceGapMappedLength += ratio; -continue; -}sourceDsPos++; -var mappedPos = mapping.getMappedRegion (alignTo, alignFrom, sourceDsPos); -if (mappedPos == null) { -System.err.println ("Can't align: no codon mapping to residue " + sourceDsPos + "(" + sourceChar + ")"); -return; -}var mappedCodonStart = mappedPos[0]; -var mappedCodonEnd = mappedPos[mappedPos.length - 1]; -var trailingCopiedGap = new StringBuilder (); -var intronLength = 0; -while (basesWritten < mappedCodonEnd && thisSeqPos < thisSeq.length) { -var c = thisSeq[thisSeqPos++]; -if (c != myGapChar) { -basesWritten++; -if (basesWritten < mappedCodonStart) { -if (preserveUnmappedGaps && trailingCopiedGap.length () > 0) { -thisAligned.append (trailingCopiedGap.toString ()); -intronLength += trailingCopiedGap.length (); -trailingCopiedGap = new StringBuilder (); -}intronLength++; -inExon = false; -} else { -var startOfCodon = basesWritten == mappedCodonStart; -var gapsToAdd = jalview.analysis.AlignmentUtils.calculateGapsToInsert (preserveMappedGaps, preserveUnmappedGaps, sourceGapMappedLength, inExon, trailingCopiedGap.length (), intronLength, startOfCodon); -for (var i = 0; i < gapsToAdd; i++) { -thisAligned.append (myGapChar); -} -sourceGapMappedLength = 0; -inExon = true; -}thisAligned.append (c); -trailingCopiedGap = new StringBuilder (); -} else { -if (inExon && preserveMappedGaps) { -trailingCopiedGap.append (myGapChar); -} else if (!inExon && preserveUnmappedGaps) { -trailingCopiedGap.append (myGapChar); -}}} -} -while (thisSeqPos < thisSeq.length) { -var c = thisSeq[thisSeqPos++]; -if (c != myGapChar || preserveUnmappedGaps) { -thisAligned.append (c); -}} -alignTo.setSequence ( String.instantialize (thisAligned)); -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,jalview.datamodel.AlignedCodonFrame,~S,~S,~B,~B"); -c$.calculateGapsToInsert = Clazz.defineMethod (c$, "calculateGapsToInsert", -function (preserveMappedGaps, preserveUnmappedGaps, sourceGapMappedLength, inExon, trailingGapLength, intronLength, startOfCodon) { -var gapsToAdd = 0; -if (startOfCodon) { -if (inExon && !preserveMappedGaps) { -trailingGapLength = 0; -}if (!inExon && !(preserveMappedGaps && preserveUnmappedGaps)) { -trailingGapLength = 0; -}if (inExon) { -gapsToAdd = Math.max (sourceGapMappedLength, trailingGapLength); -} else { -if (intronLength + trailingGapLength <= sourceGapMappedLength) { -gapsToAdd = sourceGapMappedLength - intronLength; -} else { -gapsToAdd = Math.min (intronLength + trailingGapLength - sourceGapMappedLength, trailingGapLength); -}}} else { -if (!preserveMappedGaps) { -trailingGapLength = 0; -}gapsToAdd = Math.max (sourceGapMappedLength, trailingGapLength); -}return gapsToAdd; -}, "~B,~B,~N,~B,~N,~N,~B"); -c$.getAlignedTranslation = Clazz.defineMethod (c$, "getAlignedTranslation", -function (sequences, gapCharacter, mappings) { -var alignedSeqs = new java.util.ArrayList (); -for (var seq, $seq = sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -var mapped = jalview.analysis.AlignmentUtils.getAlignedTranslation (seq, gapCharacter, mappings); -alignedSeqs.addAll (mapped); -} -return alignedSeqs; -}, "java.util.List,~S,java.util.Set"); -c$.getAlignedTranslation = Clazz.defineMethod (c$, "getAlignedTranslation", -function (seq, gapCharacter, mappings) { -var result = new java.util.ArrayList (); -for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { -if (mapping.involvesSequence (seq)) { -var mapped = jalview.analysis.AlignmentUtils.getAlignedTranslation (seq, gapCharacter, mapping); -if (mapped != null) { -result.add (mapped); -}}} -return result; -}, "jalview.datamodel.SequenceI,~S,java.util.Set"); -c$.getAlignedTranslation = Clazz.defineMethod (c$, "getAlignedTranslation", -function (seq, gapCharacter, mapping) { -var gap = String.valueOf (gapCharacter); -var toDna = false; -var fromRatio = 1; -var mapTo = mapping.getDnaForAaSeq (seq); -if (mapTo != null) { -toDna = true; -gap = String.valueOf ( Clazz.newCharArray (-1, [gapCharacter, gapCharacter, gapCharacter])); -} else { -mapTo = mapping.getAaForDnaSeq (seq); -fromRatio = 3; -}var newseq = new StringBuilder (seq.getLength () * (toDna ? 3 : 1)); -var residueNo = 0; -var phrase = Clazz.newIntArray (fromRatio, 0); -var phraseOffset = 0; -var gapWidth = 0; -var first = true; -var alignedSeq = new jalview.datamodel.Sequence ("", ""); -for (var c, $c = 0, $$c = seq.getSequence (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { -if (c == gapCharacter) { -gapWidth++; -if (gapWidth >= fromRatio) { -newseq.append (gap); -gapWidth = 0; -}} else { -phrase[phraseOffset++] = residueNo + 1; -if (phraseOffset == fromRatio) { -var sr = new jalview.datamodel.SearchResults (); -for (var pos, $pos = 0, $$pos = phrase; $pos < $$pos.length && ((pos = $$pos[$pos]) || true); $pos++) { -mapping.markMappedRegion (seq, pos, sr); -} -newseq.append (sr.toString ()); -if (first) { -first = false; -var mappedTo = sr.getResultSequence (0); -alignedSeq.setName (mappedTo.getName ()); -alignedSeq.setDescription (mappedTo.getDescription ()); -alignedSeq.setDatasetSequence (mappedTo); -}phraseOffset = 0; -}residueNo++; -}} -alignedSeq.setSequence (newseq.toString ()); -return alignedSeq; -}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.AlignedCodonFrame"); -c$.alignProteinAsDna = Clazz.defineMethod (c$, "alignProteinAsDna", -function (protein, dna) { -var mappings = protein.getCodonFrames (); -var alignedCodons = new java.util.TreeMap ( new jalview.analysis.CodonComparator ()); -for (var dnaSeq, $dnaSeq = dna.getSequences ().iterator (); $dnaSeq.hasNext () && ((dnaSeq = $dnaSeq.next ()) || true);) { -for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { -var seqMap = mapping.getMappingForSequence (dnaSeq); -var prot = mapping.findAlignedSequence (dnaSeq.getDatasetSequence (), protein); -if (prot != null) { -jalview.analysis.AlignmentUtils.addCodonPositions (dnaSeq, prot, protein.getGapCharacter (), seqMap, alignedCodons); -}} -} -return jalview.analysis.AlignmentUtils.alignProteinAs (protein, alignedCodons); -}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); -c$.alignProteinAs = Clazz.defineMethod (c$, "alignProteinAs", -function (protein, alignedCodons) { -var alignedWidth = alignedCodons.size (); -var gaps = Clazz.newCharArray (alignedWidth, '\0'); -java.util.Arrays.fill (gaps, protein.getGapCharacter ()); -var allGaps = String.valueOf (gaps); -for (var seq, $seq = protein.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -seq.setSequence (allGaps); -} -var column = 0; -for (var codon, $codon = alignedCodons.keySet ().iterator (); $codon.hasNext () && ((codon = $codon.next ()) || true);) { -var columnResidues = alignedCodons.get (codon); -for (var entry, $entry = columnResidues.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { -entry.getKey ().getSequence ()[column] = entry.getValue ().charAt (0); -} -column++; -} -return 0; -}, "jalview.datamodel.AlignmentI,java.util.Map"); -c$.addCodonPositions = Clazz.defineMethod (c$, "addCodonPositions", -function (dna, protein, gapChar, seqMap, alignedCodons) { -var codons = seqMap.getCodonIterator (dna, gapChar); -while (codons.hasNext ()) { -var codon = codons.next (); -var seqProduct = alignedCodons.get (codon); -if (seqProduct == null) { -seqProduct = new java.util.HashMap (); -alignedCodons.put (codon, seqProduct); -}seqProduct.put (protein, codon.product); -} -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~S,jalview.datamodel.Mapping,java.util.Map"); -c$.isMappable = Clazz.defineMethod (c$, "isMappable", -function (al1, al2) { -if (al1.isNucleotide () == al2.isNucleotide ()) { -return false; -}var dna = al1.isNucleotide () ? al1 : al2; -var protein = dna === al1 ? al2 : al1; -var mappings = protein.getCodonFrames (); -for (var dnaSeq, $dnaSeq = dna.getSequences ().iterator (); $dnaSeq.hasNext () && ((dnaSeq = $dnaSeq.next ()) || true);) { -for (var proteinSeq, $proteinSeq = protein.getSequences ().iterator (); $proteinSeq.hasNext () && ((proteinSeq = $proteinSeq.next ()) || true);) { -if (jalview.analysis.AlignmentUtils.isMappable (dnaSeq, proteinSeq, mappings)) { -return true; -}} -} -return false; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); -c$.isMappable = Clazz.defineMethod (c$, "isMappable", -function (dnaSeq, proteinSeq, mappings) { -var dnaDs = dnaSeq.getDatasetSequence () == null ? dnaSeq : dnaSeq.getDatasetSequence (); -var proteinDs = proteinSeq.getDatasetSequence () == null ? proteinSeq : proteinSeq.getDatasetSequence (); -for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { -if (proteinDs === mapping.getAaForDnaSeq (dnaDs)) { -return true; -}} -return jalview.analysis.AlignmentUtils.mapProteinToCdna (proteinDs, dnaDs) != null; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,java.util.Set"); -c$.findAddableReferenceAnnotations = Clazz.defineMethod (c$, "findAddableReferenceAnnotations", -function (sequenceScope, labelForCalcId, candidates, al) { -if (sequenceScope == null) { -return; -}for (var seq, $seq = sequenceScope.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -var dataset = seq.getDatasetSequence (); -if (dataset == null) { -continue; -}var datasetAnnotations = dataset.getAnnotation (); -if (datasetAnnotations == null) { -continue; -}var result = new java.util.ArrayList (); -for (var dsann, $dsann = 0, $$dsann = datasetAnnotations; $dsann < $$dsann.length && ((dsann = $$dsann[$dsann]) || true); $dsann++) { -var matchedAlignmentAnnotations = al.findAnnotations (seq, dsann.getCalcId (), dsann.label); -if (!matchedAlignmentAnnotations.iterator ().hasNext ()) { -result.add (dsann); -if (labelForCalcId != null) { -labelForCalcId.put (dsann.getCalcId (), dsann.label); -}}} -if (!result.isEmpty ()) { -candidates.put (seq, result); -}} -}, "java.util.List,java.util.Map,java.util.Map,jalview.datamodel.AlignmentI"); -c$.addReferenceAnnotations = Clazz.defineMethod (c$, "addReferenceAnnotations", -function (annotations, alignment, selectionGroup) { -for (var seq, $seq = annotations.keySet ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -for (var ann, $ann = annotations.get (seq).iterator (); $ann.hasNext () && ((ann = $ann.next ()) || true);) { -var copyAnn = new jalview.datamodel.AlignmentAnnotation (ann); -var startRes = 0; -var endRes = ann.annotations.length; -if (selectionGroup != null) { -startRes = selectionGroup.getStartRes (); -endRes = selectionGroup.getEndRes (); -}copyAnn.restrict (startRes, endRes); -if (!seq.hasAnnotation (ann)) { -seq.addAlignmentAnnotation (copyAnn); -}copyAnn.adjustForAlignment (); -alignment.addAnnotation (copyAnn); -copyAnn.visible = true; -} -} -}, "java.util.Map,jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); -c$.showOrHideSequenceAnnotations = Clazz.defineMethod (c$, "showOrHideSequenceAnnotations", -function (al, types, forSequences, anyType, doShow) { -for (var aa, $aa = 0, $$aa = al.getAlignmentAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { -if (anyType || types.contains (aa.label)) { -if ((aa.sequenceRef != null) && (forSequences == null || forSequences.contains (aa.sequenceRef))) { -aa.visible = doShow; -}}} -}, "jalview.datamodel.AlignmentI,java.util.Collection,java.util.List,~B,~B"); -c$.haveCrossRef = Clazz.defineMethod (c$, "haveCrossRef", -function (seq1, seq2) { -return jalview.analysis.AlignmentUtils.hasCrossRef (seq1, seq2) || jalview.analysis.AlignmentUtils.hasCrossRef (seq2, seq1); -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); -c$.hasCrossRef = Clazz.defineMethod (c$, "hasCrossRef", -function (seq1, seq2) { -if (seq1 == null || seq2 == null) { -return false; -}var name = seq2.getName (); -var xrefs = seq1.getDBRef (); -if (xrefs != null) { -for (var xref, $xref = 0, $$xref = xrefs; $xref < $$xref.length && ((xref = $$xref[$xref]) || true); $xref++) { -var xrefName = xref.getSource () + "|" + xref.getAccessionId (); -if (xrefName.equalsIgnoreCase (name)) { -return true; -}} -}return false; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); -c$.makeExonAlignment = Clazz.defineMethod (c$, "makeExonAlignment", -function (dna, mappings) { -var newMappings = new java.util.LinkedHashSet (); -var exonSequences = new java.util.ArrayList (); -for (var dnaSeq, $dnaSeq = 0, $$dnaSeq = dna; $dnaSeq < $$dnaSeq.length && ((dnaSeq = $$dnaSeq[$dnaSeq]) || true); $dnaSeq++) { -var ds = dnaSeq.getDatasetSequence (); -var seqMappings = jalview.util.MappingUtils.findMappingsForSequence (ds, mappings); -for (var acf, $acf = seqMappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -var newMapping = new jalview.datamodel.AlignedCodonFrame (); -var mappedExons = jalview.analysis.AlignmentUtils.makeExonSequences (ds, acf, newMapping); -if (!mappedExons.isEmpty ()) { -exonSequences.addAll (mappedExons); -newMappings.add (newMapping); -}} -} -var al = new jalview.datamodel.Alignment (exonSequences.toArray ( new Array (exonSequences.size ()))); -al.setDataset (null); -mappings.clear (); -mappings.addAll (newMappings); -return al; -}, "~A,java.util.Set"); -c$.makeExonSequences = Clazz.defineMethod (c$, "makeExonSequences", -function (dnaSeq, mapping, newMapping) { -var exonSequences = new java.util.ArrayList (); -var seqMappings = mapping.getMappingsForSequence (dnaSeq); -var dna = dnaSeq.getSequence (); -for (var seqMapping, $seqMapping = seqMappings.iterator (); $seqMapping.hasNext () && ((seqMapping = $seqMapping.next ()) || true);) { -var newSequence = new StringBuilder (dnaSeq.getLength ()); -var dnaExonRanges = seqMapping.getMap ().getFromRanges (); -for (var range, $range = dnaExonRanges.iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { -for (var pos = range[0]; pos <= range[1]; pos++) { -newSequence.append (dna[pos - 1]); -} -} -var exon = new jalview.datamodel.Sequence (dnaSeq.getName (), newSequence.toString ()); -var cdsAccId = jalview.datamodel.FeatureProperties.getCodingFeature (jalview.datamodel.DBRefSource.EMBL); -var cdsRefs = jalview.util.DBRefUtils.selectRefs (seqMapping.getTo ().getDBRef (), jalview.datamodel.DBRefSource.CODINGDBS); -if (cdsRefs != null) { -for (var cdsRef, $cdsRef = 0, $$cdsRef = cdsRefs; $cdsRef < $$cdsRef.length && ((cdsRef = $$cdsRef[$cdsRef]) || true); $cdsRef++) { -exon.addDBRef ( new jalview.datamodel.DBRefEntry (cdsRef)); -cdsAccId = cdsRef.getAccessionId (); -} -}exon.setName (exon.getName () + "|" + cdsAccId); -exon.createDatasetSequence (); -var exonRange = new java.util.ArrayList (); -exonRange.add ( Clazz.newIntArray (-1, [1, newSequence.length ()])); -var map = new jalview.util.MapList (exonRange, seqMapping.getMap ().getToRanges (), 3, 1); -newMapping.addMap (exon.getDatasetSequence (), seqMapping.getTo (), map); -var cdsToDnaMap = new jalview.util.MapList (dnaExonRanges, exonRange, 1, 1); -newMapping.addMap (dnaSeq, exon.getDatasetSequence (), cdsToDnaMap); -exonSequences.add (exon); -} -return exonSequences; -}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignedCodonFrame,jalview.datamodel.AlignedCodonFrame"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.AlignmentUtils", ["jalview.analysis.CodonComparator", "jalview.datamodel.AlignedCodonFrame", "$.Alignment", "$.AlignmentAnnotation", "$.DBRefEntry", "$.DBRefSource", "$.FeatureProperties", "$.SearchResults", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.DBRefUtils", "$.MapList", "$.MappingUtils", "java.lang.StringBuilder", "java.util.ArrayList", "$.Arrays", "$.HashMap", "$.HashSet", "$.LinkedHashMap", "$.LinkedHashSet", "$.TreeMap"], function () { +c$ = Clazz.declareType (jalview.analysis, "AlignmentUtils"); +c$.expandContext = Clazz.defineMethod (c$, "expandContext", +function (core, flankSize) { +var sq = new java.util.ArrayList (); +var maxoffset = 0; +for (var s, $s = core.getSequences ().iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { +var newSeq = s.deriveSequence (); +var newSeqStart = newSeq.getStart () - 1; +if (newSeqStart > maxoffset && newSeq.getDatasetSequence ().getStart () < s.getStart ()) { +maxoffset = newSeqStart; +}sq.add (newSeq); +} +if (flankSize > -1) { +maxoffset = Math.min (maxoffset, flankSize); +}for (var s, $s = sq.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { +var ds = s; +while (ds.getDatasetSequence () != null) { +ds = ds.getDatasetSequence (); +} +var s_end = s.findPosition (s.getStart () + s.getLength ()); +var ustream_ds = s.getStart () - ds.getStart (); +var dstream_ds = ds.getEnd () - s_end; +var offset = maxoffset - ustream_ds; +if (flankSize >= 0) { +if (flankSize < ustream_ds) { +offset = maxoffset - flankSize; +ustream_ds = flankSize; +}if (flankSize <= dstream_ds) { +dstream_ds = flankSize - 1; +}}var upstream = String.instantialize (ds.getSequence (s.getStart () - 1 - ustream_ds, s.getStart () - 1)).toLowerCase ().toCharArray (); +var downstream = String.instantialize (ds.getSequence (s_end - 1, s_end + dstream_ds)).toLowerCase ().toCharArray (); +var coreseq = s.getSequence (); +var nseq = Clazz.newCharArray (offset + upstream.length + downstream.length + coreseq.length, '\0'); +var c = core.getGapCharacter (); +var p = 0; +for (; p < offset; p++) { +nseq[p] = c; +} +System.arraycopy (upstream, 0, nseq, p, upstream.length); +System.arraycopy (coreseq, 0, nseq, p + upstream.length, coreseq.length); +System.arraycopy (downstream, 0, nseq, p + coreseq.length + upstream.length, downstream.length); +s.setSequence ( String.instantialize (nseq)); +s.setStart (s.getStart () - ustream_ds); +s.setEnd (s_end + downstream.length); +} +var newAl = new jalview.datamodel.Alignment (sq.toArray ( new Array (0))); +for (var s, $s = sq.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { +if (s.getAnnotation () != null) { +for (var aa, $aa = 0, $$aa = s.getAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { +aa.adjustForAlignment (); +newAl.addAnnotation (aa); +} +}} +newAl.setDataset (core.getDataset ()); +return newAl; +}, "jalview.datamodel.AlignmentI,~N"); +c$.getSequenceIndex = Clazz.defineMethod (c$, "getSequenceIndex", +function (al, seq) { +var result = -1; +var pos = 0; +for (var alSeq, $alSeq = al.getSequences ().iterator (); $alSeq.hasNext () && ((alSeq = $alSeq.next ()) || true);) { +if (alSeq === seq) { +result = pos; +break; +}pos++; +} +return result; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI"); +c$.getSequencesByName = Clazz.defineMethod (c$, "getSequencesByName", +function (al) { +var theMap = new java.util.LinkedHashMap (); +for (var seq, $seq = al.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +var name = seq.getName (); +if (name != null) { +var seqs = theMap.get (name); +if (seqs == null) { +seqs = new java.util.ArrayList (); +theMap.put (name, seqs); +}seqs.add (seq); +}} +return theMap; +}, "jalview.datamodel.AlignmentI"); +c$.mapProteinToCdna = Clazz.defineMethod (c$, "mapProteinToCdna", +function (proteinAlignment, cdnaAlignment) { +if (proteinAlignment == null || cdnaAlignment == null) { +return false; +}var mappedDna = new java.util.HashSet (); +var mappedProtein = new java.util.HashSet (); +var mappingPerformed = jalview.analysis.AlignmentUtils.mapProteinToCdna (proteinAlignment, cdnaAlignment, mappedDna, mappedProtein, true); +mappingPerformed = new Boolean (mappingPerformed | jalview.analysis.AlignmentUtils.mapProteinToCdna (proteinAlignment, cdnaAlignment, mappedDna, mappedProtein, false)).valueOf (); +return mappingPerformed; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); +c$.mapProteinToCdna = Clazz.defineMethod (c$, "mapProteinToCdna", +function (proteinAlignment, cdnaAlignment, mappedDna, mappedProtein, xrefsOnly) { +var mappingPerformed = false; +var thisSeqs = proteinAlignment.getSequences (); +for (var aaSeq, $aaSeq = thisSeqs.iterator (); $aaSeq.hasNext () && ((aaSeq = $aaSeq.next ()) || true);) { +var proteinMapped = false; +var acf = new jalview.datamodel.AlignedCodonFrame (); +for (var cdnaSeq, $cdnaSeq = cdnaAlignment.getSequences ().iterator (); $cdnaSeq.hasNext () && ((cdnaSeq = $cdnaSeq.next ()) || true);) { +if (xrefsOnly && !jalview.analysis.AlignmentUtils.haveCrossRef (aaSeq, cdnaSeq)) { +continue; +}if (!xrefsOnly && (mappedProtein.contains (aaSeq) || mappedDna.contains (cdnaSeq))) { +continue; +}if (!jalview.analysis.AlignmentUtils.mappingExists (proteinAlignment.getCodonFrames (), aaSeq.getDatasetSequence (), cdnaSeq.getDatasetSequence ())) { +var map = jalview.analysis.AlignmentUtils.mapProteinToCdna (aaSeq, cdnaSeq); +if (map != null) { +acf.addMap (cdnaSeq, aaSeq, map); +mappingPerformed = true; +proteinMapped = true; +mappedDna.add (cdnaSeq); +mappedProtein.add (aaSeq); +}}} +if (proteinMapped) { +proteinAlignment.addCodonFrame (acf); +}} +return mappingPerformed; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI,java.util.Set,java.util.Set,~B"); +c$.mappingExists = Clazz.defineMethod (c$, "mappingExists", +function (set, aaSeq, cdnaSeq) { +if (set != null) { +for (var acf, $acf = set.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +if (cdnaSeq === acf.getDnaForAaSeq (aaSeq)) { +return true; +}} +}return false; +}, "java.util.Set,jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); +c$.mapProteinToCdna = Clazz.defineMethod (c$, "mapProteinToCdna", +function (proteinSeq, cdnaSeq) { +var proteinDataset = proteinSeq.getDatasetSequence (); +var aaSeqChars = proteinDataset != null ? proteinDataset.getSequence () : proteinSeq.getSequence (); +var cdnaDataset = cdnaSeq.getDatasetSequence (); +var cdnaSeqChars = cdnaDataset != null ? cdnaDataset.getSequence () : cdnaSeq.getSequence (); +if (aaSeqChars == null || cdnaSeqChars == null) { +return null; +}var mappedLength = 3 * aaSeqChars.length; +var cdnaLength = cdnaSeqChars.length; +var cdnaStart = 1; +var cdnaEnd = cdnaLength; +var proteinStart = 1; +var proteinEnd = aaSeqChars.length; +if (cdnaLength != mappedLength && cdnaLength > 2) { +var lastCodon = String.valueOf (cdnaSeqChars, cdnaLength - 3, 3).toUpperCase (); +for (var stop, $stop = jalview.schemes.ResidueProperties.STOP.iterator (); $stop.hasNext () && ((stop = $stop.next ()) || true);) { +if (lastCodon.equals (stop)) { +cdnaEnd -= 3; +cdnaLength -= 3; +break; +}} +}if (cdnaLength != mappedLength && cdnaLength > 2 && String.valueOf (cdnaSeqChars, 0, 3).toUpperCase ().equals (jalview.schemes.ResidueProperties.START)) { +cdnaStart += 3; +cdnaLength -= 3; +}if (cdnaLength != mappedLength) { +return null; +}if (!jalview.analysis.AlignmentUtils.translatesAs (cdnaSeqChars, cdnaStart - 1, aaSeqChars)) { +return null; +}var map = new jalview.util.MapList ( Clazz.newIntArray (-1, [cdnaStart, cdnaEnd]), Clazz.newIntArray (-1, [1, proteinEnd]), 3, 1); +return map; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); +c$.translatesAs = Clazz.defineMethod (c$, "translatesAs", +function (cdnaSeqChars, cdnaStart, aaSeqChars) { +var aaResidue = 0; +for (var i = cdnaStart; i < cdnaSeqChars.length - 2 && aaResidue < aaSeqChars.length; i += 3, aaResidue++) { +var codon = String.valueOf (cdnaSeqChars, i, 3); +var translated = jalview.schemes.ResidueProperties.codonTranslate (codon); +var aaRes = aaSeqChars[aaResidue]; +if ((translated == null || "STOP".equals (translated)) && aaRes == 'X') { +continue; +}if (translated == null || !(aaRes == translated.charAt (0))) { +return false; +}} +return (aaResidue == aaSeqChars.length); +}, "~A,~N,~A"); +c$.alignSequenceAs = Clazz.defineMethod (c$, "alignSequenceAs", +function (seq, al, gap, preserveMappedGaps, preserveUnmappedGaps) { +var mappings = al.getCodonFrame (seq); +if (mappings == null || mappings.isEmpty ()) { +return false; +}var alignFrom = null; +var mapping = null; +for (var mp, $mp = mappings.iterator (); $mp.hasNext () && ((mp = $mp.next ()) || true);) { +alignFrom = mp.findAlignedSequence (seq.getDatasetSequence (), al); +if (alignFrom != null) { +mapping = mp; +break; +}} +if (alignFrom == null) { +return false; +}jalview.analysis.AlignmentUtils.alignSequenceAs (seq, alignFrom, mapping, gap, al.getGapCharacter (), preserveMappedGaps, preserveUnmappedGaps); +return true; +}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI,~S,~B,~B"); +c$.alignSequenceAs = Clazz.defineMethod (c$, "alignSequenceAs", +function (alignTo, alignFrom, mapping, myGap, sourceGap, preserveMappedGaps, preserveUnmappedGaps) { +var thisSeq = alignTo.getSequence (); +var thatAligned = alignFrom.getSequence (); +var thisAligned = new StringBuilder (2 * thisSeq.length); +var thisSeqPos = 0; +var sourceDsPos = 0; +var basesWritten = 0; +var myGapChar = myGap.charAt (0); +var ratio = myGap.length; +var sourceGapMappedLength = 0; +var inExon = false; +for (var sourceChar, $sourceChar = 0, $$sourceChar = thatAligned; $sourceChar < $$sourceChar.length && ((sourceChar = $$sourceChar[$sourceChar]) || true); $sourceChar++) { +if (sourceChar == sourceGap) { +sourceGapMappedLength += ratio; +continue; +}sourceDsPos++; +var mappedPos = mapping.getMappedRegion (alignTo, alignFrom, sourceDsPos); +if (mappedPos == null) { +System.err.println ("Can't align: no codon mapping to residue " + sourceDsPos + "(" + sourceChar + ")"); +return; +}var mappedCodonStart = mappedPos[0]; +var mappedCodonEnd = mappedPos[mappedPos.length - 1]; +var trailingCopiedGap = new StringBuilder (); +var intronLength = 0; +while (basesWritten < mappedCodonEnd && thisSeqPos < thisSeq.length) { +var c = thisSeq[thisSeqPos++]; +if (c != myGapChar) { +basesWritten++; +if (basesWritten < mappedCodonStart) { +if (preserveUnmappedGaps && trailingCopiedGap.length () > 0) { +thisAligned.append (trailingCopiedGap.toString ()); +intronLength += trailingCopiedGap.length (); +trailingCopiedGap = new StringBuilder (); +}intronLength++; +inExon = false; +} else { +var startOfCodon = basesWritten == mappedCodonStart; +var gapsToAdd = jalview.analysis.AlignmentUtils.calculateGapsToInsert (preserveMappedGaps, preserveUnmappedGaps, sourceGapMappedLength, inExon, trailingCopiedGap.length (), intronLength, startOfCodon); +for (var i = 0; i < gapsToAdd; i++) { +thisAligned.append (myGapChar); +} +sourceGapMappedLength = 0; +inExon = true; +}thisAligned.append (c); +trailingCopiedGap = new StringBuilder (); +} else { +if (inExon && preserveMappedGaps) { +trailingCopiedGap.append (myGapChar); +} else if (!inExon && preserveUnmappedGaps) { +trailingCopiedGap.append (myGapChar); +}}} +} +while (thisSeqPos < thisSeq.length) { +var c = thisSeq[thisSeqPos++]; +if (c != myGapChar || preserveUnmappedGaps) { +thisAligned.append (c); +}} +alignTo.setSequence ( String.instantialize (thisAligned)); +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,jalview.datamodel.AlignedCodonFrame,~S,~S,~B,~B"); +c$.calculateGapsToInsert = Clazz.defineMethod (c$, "calculateGapsToInsert", +function (preserveMappedGaps, preserveUnmappedGaps, sourceGapMappedLength, inExon, trailingGapLength, intronLength, startOfCodon) { +var gapsToAdd = 0; +if (startOfCodon) { +if (inExon && !preserveMappedGaps) { +trailingGapLength = 0; +}if (!inExon && !(preserveMappedGaps && preserveUnmappedGaps)) { +trailingGapLength = 0; +}if (inExon) { +gapsToAdd = Math.max (sourceGapMappedLength, trailingGapLength); +} else { +if (intronLength + trailingGapLength <= sourceGapMappedLength) { +gapsToAdd = sourceGapMappedLength - intronLength; +} else { +gapsToAdd = Math.min (intronLength + trailingGapLength - sourceGapMappedLength, trailingGapLength); +}}} else { +if (!preserveMappedGaps) { +trailingGapLength = 0; +}gapsToAdd = Math.max (sourceGapMappedLength, trailingGapLength); +}return gapsToAdd; +}, "~B,~B,~N,~B,~N,~N,~B"); +c$.getAlignedTranslation = Clazz.defineMethod (c$, "getAlignedTranslation", +function (sequences, gapCharacter, mappings) { +var alignedSeqs = new java.util.ArrayList (); +for (var seq, $seq = sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +var mapped = jalview.analysis.AlignmentUtils.getAlignedTranslation (seq, gapCharacter, mappings); +alignedSeqs.addAll (mapped); +} +return alignedSeqs; +}, "java.util.List,~S,java.util.Set"); +c$.getAlignedTranslation = Clazz.defineMethod (c$, "getAlignedTranslation", +function (seq, gapCharacter, mappings) { +var result = new java.util.ArrayList (); +for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { +if (mapping.involvesSequence (seq)) { +var mapped = jalview.analysis.AlignmentUtils.getAlignedTranslation (seq, gapCharacter, mapping); +if (mapped != null) { +result.add (mapped); +}}} +return result; +}, "jalview.datamodel.SequenceI,~S,java.util.Set"); +c$.getAlignedTranslation = Clazz.defineMethod (c$, "getAlignedTranslation", +function (seq, gapCharacter, mapping) { +var gap = String.valueOf (gapCharacter); +var toDna = false; +var fromRatio = 1; +var mapTo = mapping.getDnaForAaSeq (seq); +if (mapTo != null) { +toDna = true; +gap = String.valueOf ( Clazz.newCharArray (-1, [gapCharacter, gapCharacter, gapCharacter])); +} else { +mapTo = mapping.getAaForDnaSeq (seq); +fromRatio = 3; +}var newseq = new StringBuilder (seq.getLength () * (toDna ? 3 : 1)); +var residueNo = 0; +var phrase = Clazz.newIntArray (fromRatio, 0); +var phraseOffset = 0; +var gapWidth = 0; +var first = true; +var alignedSeq = new jalview.datamodel.Sequence ("", ""); +for (var c, $c = 0, $$c = seq.getSequence (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { +if (c == gapCharacter) { +gapWidth++; +if (gapWidth >= fromRatio) { +newseq.append (gap); +gapWidth = 0; +}} else { +phrase[phraseOffset++] = residueNo + 1; +if (phraseOffset == fromRatio) { +var sr = new jalview.datamodel.SearchResults (); +for (var pos, $pos = 0, $$pos = phrase; $pos < $$pos.length && ((pos = $$pos[$pos]) || true); $pos++) { +mapping.markMappedRegion (seq, pos, sr); +} +newseq.append (sr.toString ()); +if (first) { +first = false; +var mappedTo = sr.getResultSequence (0); +alignedSeq.setName (mappedTo.getName ()); +alignedSeq.setDescription (mappedTo.getDescription ()); +alignedSeq.setDatasetSequence (mappedTo); +}phraseOffset = 0; +}residueNo++; +}} +alignedSeq.setSequence (newseq.toString ()); +return alignedSeq; +}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.AlignedCodonFrame"); +c$.alignProteinAsDna = Clazz.defineMethod (c$, "alignProteinAsDna", +function (protein, dna) { +var mappings = protein.getCodonFrames (); +var alignedCodons = new java.util.TreeMap ( new jalview.analysis.CodonComparator ()); +for (var dnaSeq, $dnaSeq = dna.getSequences ().iterator (); $dnaSeq.hasNext () && ((dnaSeq = $dnaSeq.next ()) || true);) { +for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { +var seqMap = mapping.getMappingForSequence (dnaSeq); +var prot = mapping.findAlignedSequence (dnaSeq.getDatasetSequence (), protein); +if (prot != null) { +jalview.analysis.AlignmentUtils.addCodonPositions (dnaSeq, prot, protein.getGapCharacter (), seqMap, alignedCodons); +}} +} +return jalview.analysis.AlignmentUtils.alignProteinAs (protein, alignedCodons); +}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); +c$.alignProteinAs = Clazz.defineMethod (c$, "alignProteinAs", +function (protein, alignedCodons) { +var alignedWidth = alignedCodons.size (); +var gaps = Clazz.newCharArray (alignedWidth, '\0'); +java.util.Arrays.fill (gaps, protein.getGapCharacter ()); +var allGaps = String.valueOf (gaps); +for (var seq, $seq = protein.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +seq.setSequence (allGaps); +} +var column = 0; +for (var codon, $codon = alignedCodons.keySet ().iterator (); $codon.hasNext () && ((codon = $codon.next ()) || true);) { +var columnResidues = alignedCodons.get (codon); +for (var entry, $entry = columnResidues.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { +entry.getKey ().getSequence ()[column] = entry.getValue ().charAt (0); +} +column++; +} +return 0; +}, "jalview.datamodel.AlignmentI,java.util.Map"); +c$.addCodonPositions = Clazz.defineMethod (c$, "addCodonPositions", +function (dna, protein, gapChar, seqMap, alignedCodons) { +var codons = seqMap.getCodonIterator (dna, gapChar); +while (codons.hasNext ()) { +var codon = codons.next (); +var seqProduct = alignedCodons.get (codon); +if (seqProduct == null) { +seqProduct = new java.util.HashMap (); +alignedCodons.put (codon, seqProduct); +}seqProduct.put (protein, codon.product); +} +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~S,jalview.datamodel.Mapping,java.util.Map"); +c$.isMappable = Clazz.defineMethod (c$, "isMappable", +function (al1, al2) { +if (al1.isNucleotide () == al2.isNucleotide ()) { +return false; +}var dna = al1.isNucleotide () ? al1 : al2; +var protein = dna === al1 ? al2 : al1; +var mappings = protein.getCodonFrames (); +for (var dnaSeq, $dnaSeq = dna.getSequences ().iterator (); $dnaSeq.hasNext () && ((dnaSeq = $dnaSeq.next ()) || true);) { +for (var proteinSeq, $proteinSeq = protein.getSequences ().iterator (); $proteinSeq.hasNext () && ((proteinSeq = $proteinSeq.next ()) || true);) { +if (jalview.analysis.AlignmentUtils.isMappable (dnaSeq, proteinSeq, mappings)) { +return true; +}} +} +return false; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); +c$.isMappable = Clazz.defineMethod (c$, "isMappable", +function (dnaSeq, proteinSeq, mappings) { +var dnaDs = dnaSeq.getDatasetSequence () == null ? dnaSeq : dnaSeq.getDatasetSequence (); +var proteinDs = proteinSeq.getDatasetSequence () == null ? proteinSeq : proteinSeq.getDatasetSequence (); +for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { +if (proteinDs === mapping.getAaForDnaSeq (dnaDs)) { +return true; +}} +return jalview.analysis.AlignmentUtils.mapProteinToCdna (proteinDs, dnaDs) != null; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,java.util.Set"); +c$.findAddableReferenceAnnotations = Clazz.defineMethod (c$, "findAddableReferenceAnnotations", +function (sequenceScope, labelForCalcId, candidates, al) { +if (sequenceScope == null) { +return; +}for (var seq, $seq = sequenceScope.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +var dataset = seq.getDatasetSequence (); +if (dataset == null) { +continue; +}var datasetAnnotations = dataset.getAnnotation (); +if (datasetAnnotations == null) { +continue; +}var result = new java.util.ArrayList (); +for (var dsann, $dsann = 0, $$dsann = datasetAnnotations; $dsann < $$dsann.length && ((dsann = $$dsann[$dsann]) || true); $dsann++) { +var matchedAlignmentAnnotations = al.findAnnotations (seq, dsann.getCalcId (), dsann.label); +if (!matchedAlignmentAnnotations.iterator ().hasNext ()) { +result.add (dsann); +if (labelForCalcId != null) { +labelForCalcId.put (dsann.getCalcId (), dsann.label); +}}} +if (!result.isEmpty ()) { +candidates.put (seq, result); +}} +}, "java.util.List,java.util.Map,java.util.Map,jalview.datamodel.AlignmentI"); +c$.addReferenceAnnotations = Clazz.defineMethod (c$, "addReferenceAnnotations", +function (annotations, alignment, selectionGroup) { +for (var seq, $seq = annotations.keySet ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +for (var ann, $ann = annotations.get (seq).iterator (); $ann.hasNext () && ((ann = $ann.next ()) || true);) { +var copyAnn = new jalview.datamodel.AlignmentAnnotation (ann); +var startRes = 0; +var endRes = ann.annotations.length; +if (selectionGroup != null) { +startRes = selectionGroup.getStartRes (); +endRes = selectionGroup.getEndRes (); +}copyAnn.restrict (startRes, endRes); +if (!seq.hasAnnotation (ann)) { +seq.addAlignmentAnnotation (copyAnn); +}copyAnn.adjustForAlignment (); +alignment.addAnnotation (copyAnn); +copyAnn.visible = true; +} +} +}, "java.util.Map,jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); +c$.showOrHideSequenceAnnotations = Clazz.defineMethod (c$, "showOrHideSequenceAnnotations", +function (al, types, forSequences, anyType, doShow) { +for (var aa, $aa = 0, $$aa = al.getAlignmentAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { +if (anyType || types.contains (aa.label)) { +if ((aa.sequenceRef != null) && (forSequences == null || forSequences.contains (aa.sequenceRef))) { +aa.visible = doShow; +}}} +}, "jalview.datamodel.AlignmentI,java.util.Collection,java.util.List,~B,~B"); +c$.haveCrossRef = Clazz.defineMethod (c$, "haveCrossRef", +function (seq1, seq2) { +return jalview.analysis.AlignmentUtils.hasCrossRef (seq1, seq2) || jalview.analysis.AlignmentUtils.hasCrossRef (seq2, seq1); +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); +c$.hasCrossRef = Clazz.defineMethod (c$, "hasCrossRef", +function (seq1, seq2) { +if (seq1 == null || seq2 == null) { +return false; +}var name = seq2.getName (); +var xrefs = seq1.getDBRef (); +if (xrefs != null) { +for (var xref, $xref = 0, $$xref = xrefs; $xref < $$xref.length && ((xref = $$xref[$xref]) || true); $xref++) { +var xrefName = xref.getSource () + "|" + xref.getAccessionId (); +if (xrefName.equalsIgnoreCase (name)) { +return true; +}} +}return false; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); +c$.makeExonAlignment = Clazz.defineMethod (c$, "makeExonAlignment", +function (dna, mappings) { +var newMappings = new java.util.LinkedHashSet (); +var exonSequences = new java.util.ArrayList (); +for (var dnaSeq, $dnaSeq = 0, $$dnaSeq = dna; $dnaSeq < $$dnaSeq.length && ((dnaSeq = $$dnaSeq[$dnaSeq]) || true); $dnaSeq++) { +var ds = dnaSeq.getDatasetSequence (); +var seqMappings = jalview.util.MappingUtils.findMappingsForSequence (ds, mappings); +for (var acf, $acf = seqMappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +var newMapping = new jalview.datamodel.AlignedCodonFrame (); +var mappedExons = jalview.analysis.AlignmentUtils.makeExonSequences (ds, acf, newMapping); +if (!mappedExons.isEmpty ()) { +exonSequences.addAll (mappedExons); +newMappings.add (newMapping); +}} +} +var al = new jalview.datamodel.Alignment (exonSequences.toArray ( new Array (exonSequences.size ()))); +al.setDataset (null); +mappings.clear (); +mappings.addAll (newMappings); +return al; +}, "~A,java.util.Set"); +c$.makeExonSequences = Clazz.defineMethod (c$, "makeExonSequences", +function (dnaSeq, mapping, newMapping) { +var exonSequences = new java.util.ArrayList (); +var seqMappings = mapping.getMappingsForSequence (dnaSeq); +var dna = dnaSeq.getSequence (); +for (var seqMapping, $seqMapping = seqMappings.iterator (); $seqMapping.hasNext () && ((seqMapping = $seqMapping.next ()) || true);) { +var newSequence = new StringBuilder (dnaSeq.getLength ()); +var dnaExonRanges = seqMapping.getMap ().getFromRanges (); +for (var range, $range = dnaExonRanges.iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { +for (var pos = range[0]; pos <= range[1]; pos++) { +newSequence.append (dna[pos - 1]); +} +} +var exon = new jalview.datamodel.Sequence (dnaSeq.getName (), newSequence.toString ()); +var cdsAccId = jalview.datamodel.FeatureProperties.getCodingFeature (jalview.datamodel.DBRefSource.EMBL); +var cdsRefs = jalview.util.DBRefUtils.selectRefs (seqMapping.getTo ().getDBRef (), jalview.datamodel.DBRefSource.CODINGDBS); +if (cdsRefs != null) { +for (var cdsRef, $cdsRef = 0, $$cdsRef = cdsRefs; $cdsRef < $$cdsRef.length && ((cdsRef = $$cdsRef[$cdsRef]) || true); $cdsRef++) { +exon.addDBRef ( new jalview.datamodel.DBRefEntry (cdsRef)); +cdsAccId = cdsRef.getAccessionId (); +} +}exon.setName (exon.getName () + "|" + cdsAccId); +exon.createDatasetSequence (); +var exonRange = new java.util.ArrayList (); +exonRange.add ( Clazz.newIntArray (-1, [1, newSequence.length ()])); +var map = new jalview.util.MapList (exonRange, seqMapping.getMap ().getToRanges (), 3, 1); +newMapping.addMap (exon.getDatasetSequence (), seqMapping.getTo (), map); +var cdsToDnaMap = new jalview.util.MapList (dnaExonRanges, exonRange, 1, 1); +newMapping.addMap (dnaSeq, exon.getDatasetSequence (), cdsToDnaMap); +exonSequences.add (exon); +} +return exonSequences; +}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignedCodonFrame,jalview.datamodel.AlignedCodonFrame"); +}); diff --git a/bin/jalview/analysis/AnnotationSorter.js b/bin/jalview/analysis/AnnotationSorter.js index 2757955..b7d78cd 100644 --- a/bin/jalview/analysis/AnnotationSorter.js +++ b/bin/jalview/analysis/AnnotationSorter.js @@ -1,171 +1,171 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (["java.lang.Enum", "java.util.HashMap"], "jalview.analysis.AnnotationSorter", ["jalview.analysis.AlignmentUtils", "java.lang.UnsupportedOperationException", "java.util.Arrays"], function () { -c$ = Clazz.decorateAsClass (function () { -this.alignment = null; -this.showAutocalcAbove = false; -this.sequenceIndices = null; -this.bySequenceAndLabel = null; -this.byLabelAndSequence = null; -this.noSort = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "AnnotationSorter"); -Clazz.prepareFields (c$, function () { -this.sequenceIndices = new java.util.HashMap (); -this.bySequenceAndLabel = ((Clazz.isClassDefined ("jalview.analysis.AnnotationSorter$1") ? 0 : jalview.analysis.AnnotationSorter.$AnnotationSorter$1$ ()), Clazz.innerTypeInstance (jalview.analysis.AnnotationSorter$1, this, null)); -this.byLabelAndSequence = ((Clazz.isClassDefined ("jalview.analysis.AnnotationSorter$2") ? 0 : jalview.analysis.AnnotationSorter.$AnnotationSorter$2$ ()), Clazz.innerTypeInstance (jalview.analysis.AnnotationSorter$2, this, null)); -this.noSort = ((Clazz.isClassDefined ("jalview.analysis.AnnotationSorter$3") ? 0 : jalview.analysis.AnnotationSorter.$AnnotationSorter$3$ ()), Clazz.innerTypeInstance (jalview.analysis.AnnotationSorter$3, this, null)); -}); -Clazz.makeConstructor (c$, -function (alignmentI, showAutocalculatedAbove) { -this.alignment = alignmentI; -this.showAutocalcAbove = showAutocalculatedAbove; -}, "jalview.datamodel.AlignmentI,~B"); -Clazz.defineMethod (c$, "sort", -function (alignmentAnnotations, order) { -if (alignmentAnnotations == null) { -return; -}this.saveSequenceIndices (alignmentAnnotations); -var comparator = this.getComparator (order); -if (alignmentAnnotations != null) { -{ -java.util.Arrays.sort (alignmentAnnotations, comparator); -}}}, "~A,jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); -Clazz.defineMethod (c$, "saveSequenceIndices", -($fz = function (alignmentAnnotations) { -this.sequenceIndices.clear (); -for (var ann, $ann = 0, $$ann = alignmentAnnotations; $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { -var seq = ann.sequenceRef; -if (seq != null) { -var index = jalview.analysis.AlignmentUtils.getSequenceIndex (this.alignment, seq); -this.sequenceIndices.put (seq, new Integer (index)); -}} -}, $fz.isPrivate = true, $fz), "~A"); -Clazz.defineMethod (c$, "getComparator", -($fz = function (order) { -if (order == null) { -return this.noSort; -}switch (order) { -case jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.NONE: -return this.noSort; -case jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.SEQUENCE_AND_LABEL: -return this.bySequenceAndLabel; -case jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.LABEL_AND_SEQUENCE: -return this.byLabelAndSequence; -default: -throw new UnsupportedOperationException (order.toString ()); -} -}, $fz.isPrivate = true, $fz), "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); -Clazz.defineMethod (c$, "compareLabels", -($fz = function (o1, o2) { -if (o1 == null || o2 == null) { -return 0; -}var label1 = o1.label; -var label2 = o2.label; -if (label1 == null && label2 == null) { -return 0; -}if (label1 == null) { -return -1; -}if (label2 == null) { -return 1; -}return label1.toUpperCase ().compareTo (label2.toUpperCase ()); -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "compareSequences", -($fz = function (o1, o2) { -var seq1 = o1.sequenceRef; -var seq2 = o2.sequenceRef; -if (seq1 == null && seq2 == null) { -return 0; -}if (seq1 == null) { -return this.showAutocalcAbove ? -1 : 1; -}if (seq2 == null) { -return this.showAutocalcAbove ? 1 : -1; -}var index1 = (this.sequenceIndices.get (seq1)).intValue (); -var index2 = (this.sequenceIndices.get (seq2)).intValue (); -if (index1 == index2) { -return 0; -}if (index1 == -1) { -return -1; -}if (index2 == -1) { -return 1; -}return Integer.compare (index1, index2); -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); -c$.$AnnotationSorter$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.analysis, "AnnotationSorter$1", null, java.util.Comparator); -Clazz.overrideMethod (c$, "compare", -function (o1, o2) { -if (o1 == null && o2 == null) { -return 0; -}if (o1 == null) { -return -1; -}if (o2 == null) { -return 1; -}if (o1.sequenceRef == null && o2.sequenceRef == null) { -return 0; -}var sequenceOrder = this.b$["jalview.analysis.AnnotationSorter"].compareSequences (o1, o2); -return sequenceOrder == 0 ? this.b$["jalview.analysis.AnnotationSorter"].compareLabels (o1, o2) : sequenceOrder; -}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationSorter$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.analysis, "AnnotationSorter$2", null, java.util.Comparator); -Clazz.overrideMethod (c$, "compare", -function (o1, o2) { -if (o1 == null && o2 == null) { -return 0; -}if (o1 == null) { -return -1; -}if (o2 == null) { -return 1; -}if (o1.sequenceRef == null && o2.sequenceRef == null) { -return 0; -}if (o1.sequenceRef == null) { -return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? -1 : 1; -}if (o2.sequenceRef == null) { -return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? 1 : -1; -}var labelOrder = this.b$["jalview.analysis.AnnotationSorter"].compareLabels (o1, o2); -return labelOrder == 0 ? this.b$["jalview.analysis.AnnotationSorter"].compareSequences (o1, o2) : labelOrder; -}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationSorter$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.analysis, "AnnotationSorter$3", null, java.util.Comparator); -Clazz.overrideMethod (c$, "compare", -function (o1, o2) { -if (o1 != null && o2 != null) { -if (o1.sequenceRef == null && o2.sequenceRef != null) { -return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? -1 : 1; -}if (o1.sequenceRef != null && o2.sequenceRef == null) { -return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? 1 : -1; -}}return 0; -}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); -c$ = Clazz.p0p (); -}; -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.description = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis.AnnotationSorter, "SequenceAnnotationOrder", Enum); -Clazz.makeConstructor (c$, -($fz = function (a) { -this.description = a; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.overrideMethod (c$, "toString", -function () { -return this.description; -}); -c$.forDescription = Clazz.defineMethod (c$, "forDescription", -function (a) { -for (var order, $order = 0, $$order = jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.values (); $order < $$order.length && ((order = $$order[$order]) || true); $order++) { -if (order.toString ().equals (a)) { -return order; -}} -return null; -}, "~S"); -Clazz.defineEnumConstant (c$, "SEQUENCE_AND_LABEL", 0, ["Sequence"]); -Clazz.defineEnumConstant (c$, "LABEL_AND_SEQUENCE", 1, ["Label"]); -Clazz.defineEnumConstant (c$, "NONE", 2, ["No sort"]); -c$ = Clazz.p0p (); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (["java.lang.Enum", "java.util.HashMap"], "jalview.analysis.AnnotationSorter", ["jalview.analysis.AlignmentUtils", "java.lang.UnsupportedOperationException", "java.util.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.alignment = null; +this.showAutocalcAbove = false; +this.sequenceIndices = null; +this.bySequenceAndLabel = null; +this.byLabelAndSequence = null; +this.noSort = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "AnnotationSorter"); +Clazz.prepareFields (c$, function () { +this.sequenceIndices = new java.util.HashMap (); +this.bySequenceAndLabel = ((Clazz.isClassDefined ("jalview.analysis.AnnotationSorter$1") ? 0 : jalview.analysis.AnnotationSorter.$AnnotationSorter$1$ ()), Clazz.innerTypeInstance (jalview.analysis.AnnotationSorter$1, this, null)); +this.byLabelAndSequence = ((Clazz.isClassDefined ("jalview.analysis.AnnotationSorter$2") ? 0 : jalview.analysis.AnnotationSorter.$AnnotationSorter$2$ ()), Clazz.innerTypeInstance (jalview.analysis.AnnotationSorter$2, this, null)); +this.noSort = ((Clazz.isClassDefined ("jalview.analysis.AnnotationSorter$3") ? 0 : jalview.analysis.AnnotationSorter.$AnnotationSorter$3$ ()), Clazz.innerTypeInstance (jalview.analysis.AnnotationSorter$3, this, null)); +}); +Clazz.makeConstructor (c$, +function (alignmentI, showAutocalculatedAbove) { +this.alignment = alignmentI; +this.showAutocalcAbove = showAutocalculatedAbove; +}, "jalview.datamodel.AlignmentI,~B"); +Clazz.defineMethod (c$, "sort", +function (alignmentAnnotations, order) { +if (alignmentAnnotations == null) { +return; +}this.saveSequenceIndices (alignmentAnnotations); +var comparator = this.getComparator (order); +if (alignmentAnnotations != null) { +{ +java.util.Arrays.sort (alignmentAnnotations, comparator); +}}}, "~A,jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); +Clazz.defineMethod (c$, "saveSequenceIndices", +($fz = function (alignmentAnnotations) { +this.sequenceIndices.clear (); +for (var ann, $ann = 0, $$ann = alignmentAnnotations; $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { +var seq = ann.sequenceRef; +if (seq != null) { +var index = jalview.analysis.AlignmentUtils.getSequenceIndex (this.alignment, seq); +this.sequenceIndices.put (seq, new Integer (index)); +}} +}, $fz.isPrivate = true, $fz), "~A"); +Clazz.defineMethod (c$, "getComparator", +($fz = function (order) { +if (order == null) { +return this.noSort; +}switch (order) { +case jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.NONE: +return this.noSort; +case jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.SEQUENCE_AND_LABEL: +return this.bySequenceAndLabel; +case jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.LABEL_AND_SEQUENCE: +return this.byLabelAndSequence; +default: +throw new UnsupportedOperationException (order.toString ()); +} +}, $fz.isPrivate = true, $fz), "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); +Clazz.defineMethod (c$, "compareLabels", +($fz = function (o1, o2) { +if (o1 == null || o2 == null) { +return 0; +}var label1 = o1.label; +var label2 = o2.label; +if (label1 == null && label2 == null) { +return 0; +}if (label1 == null) { +return -1; +}if (label2 == null) { +return 1; +}return label1.toUpperCase ().compareTo (label2.toUpperCase ()); +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "compareSequences", +($fz = function (o1, o2) { +var seq1 = o1.sequenceRef; +var seq2 = o2.sequenceRef; +if (seq1 == null && seq2 == null) { +return 0; +}if (seq1 == null) { +return this.showAutocalcAbove ? -1 : 1; +}if (seq2 == null) { +return this.showAutocalcAbove ? 1 : -1; +}var index1 = (this.sequenceIndices.get (seq1)).intValue (); +var index2 = (this.sequenceIndices.get (seq2)).intValue (); +if (index1 == index2) { +return 0; +}if (index1 == -1) { +return -1; +}if (index2 == -1) { +return 1; +}return Integer.compare (index1, index2); +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); +c$.$AnnotationSorter$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.analysis, "AnnotationSorter$1", null, java.util.Comparator); +Clazz.overrideMethod (c$, "compare", +function (o1, o2) { +if (o1 == null && o2 == null) { +return 0; +}if (o1 == null) { +return -1; +}if (o2 == null) { +return 1; +}if (o1.sequenceRef == null && o2.sequenceRef == null) { +return 0; +}var sequenceOrder = this.b$["jalview.analysis.AnnotationSorter"].compareSequences (o1, o2); +return sequenceOrder == 0 ? this.b$["jalview.analysis.AnnotationSorter"].compareLabels (o1, o2) : sequenceOrder; +}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationSorter$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.analysis, "AnnotationSorter$2", null, java.util.Comparator); +Clazz.overrideMethod (c$, "compare", +function (o1, o2) { +if (o1 == null && o2 == null) { +return 0; +}if (o1 == null) { +return -1; +}if (o2 == null) { +return 1; +}if (o1.sequenceRef == null && o2.sequenceRef == null) { +return 0; +}if (o1.sequenceRef == null) { +return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? -1 : 1; +}if (o2.sequenceRef == null) { +return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? 1 : -1; +}var labelOrder = this.b$["jalview.analysis.AnnotationSorter"].compareLabels (o1, o2); +return labelOrder == 0 ? this.b$["jalview.analysis.AnnotationSorter"].compareSequences (o1, o2) : labelOrder; +}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationSorter$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.analysis, "AnnotationSorter$3", null, java.util.Comparator); +Clazz.overrideMethod (c$, "compare", +function (o1, o2) { +if (o1 != null && o2 != null) { +if (o1.sequenceRef == null && o2.sequenceRef != null) { +return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? -1 : 1; +}if (o1.sequenceRef != null && o2.sequenceRef == null) { +return this.b$["jalview.analysis.AnnotationSorter"].showAutocalcAbove ? 1 : -1; +}}return 0; +}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation"); +c$ = Clazz.p0p (); +}; +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.description = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis.AnnotationSorter, "SequenceAnnotationOrder", Enum); +Clazz.makeConstructor (c$, +($fz = function (a) { +this.description = a; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.overrideMethod (c$, "toString", +function () { +return this.description; +}); +c$.forDescription = Clazz.defineMethod (c$, "forDescription", +function (a) { +for (var order, $order = 0, $$order = jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.values (); $order < $$order.length && ((order = $$order[$order]) || true); $order++) { +if (order.toString ().equals (a)) { +return order; +}} +return null; +}, "~S"); +Clazz.defineEnumConstant (c$, "SEQUENCE_AND_LABEL", 0, ["Sequence"]); +Clazz.defineEnumConstant (c$, "LABEL_AND_SEQUENCE", 1, ["Label"]); +Clazz.defineEnumConstant (c$, "NONE", 2, ["No sort"]); +c$ = Clazz.p0p (); +}); diff --git a/bin/jalview/analysis/CodingUtils.js b/bin/jalview/analysis/CodingUtils.js index 08fa0ce..69abb90 100644 --- a/bin/jalview/analysis/CodingUtils.js +++ b/bin/jalview/analysis/CodingUtils.js @@ -1,64 +1,64 @@ -Clazz.declarePackage ("jalview.analysis"); -c$ = Clazz.declareType (jalview.analysis, "CodingUtils"); -c$.encodeCodon = Clazz.defineMethod (c$, "encodeCodon", -function (codon) { -if (codon == null) { -return -1; -}return jalview.analysis.CodingUtils.encodeCodon (codon[2]) + (jalview.analysis.CodingUtils.encodeCodon (codon[1]) << 2) + (jalview.analysis.CodingUtils.encodeCodon (codon[0]) << (4)); -}, "~A"); -c$.encodeCodon = Clazz.defineMethod (c$, "encodeCodon", -function (c) { -var result = -2147483648; -switch (c) { -case 'A': -case 'a': -result = 0; -break; -case 'C': -case 'c': -result = 1; -break; -case 'G': -case 'g': -result = 2; -break; -case 'T': -case 't': -case 'U': -case 'u': -result = 3; -break; -} -return result; -}, "~S"); -c$.decodeCodon = Clazz.defineMethod (c$, "decodeCodon", -function (encoded) { -var result = Clazz.newCharArray (3, '\0'); -result[2] = jalview.analysis.CodingUtils.decodeNucleotide (encoded & 3); -encoded = encoded >>> 2; -result[1] = jalview.analysis.CodingUtils.decodeNucleotide (encoded & 3); -encoded = encoded >>> 2; -result[0] = jalview.analysis.CodingUtils.decodeNucleotide (encoded & 3); -return result; -}, "~N"); -c$.decodeNucleotide = Clazz.defineMethod (c$, "decodeNucleotide", -function (i) { -var result = '0'; -switch (i) { -case 0: -result = 'A'; -break; -case 1: -result = 'C'; -break; -case 2: -result = 'G'; -break; -case 3: -result = 'T'; -break; -} -return result; -}, "~N"); -Clazz.defineStatics (c$, -"CODON_ENCODING_BITSHIFT", 2); +Clazz.declarePackage ("jalview.analysis"); +c$ = Clazz.declareType (jalview.analysis, "CodingUtils"); +c$.encodeCodon = Clazz.defineMethod (c$, "encodeCodon", +function (codon) { +if (codon == null) { +return -1; +}return jalview.analysis.CodingUtils.encodeCodon (codon[2]) + (jalview.analysis.CodingUtils.encodeCodon (codon[1]) << 2) + (jalview.analysis.CodingUtils.encodeCodon (codon[0]) << (4)); +}, "~A"); +c$.encodeCodon = Clazz.defineMethod (c$, "encodeCodon", +function (c) { +var result = -2147483648; +switch (c) { +case 'A': +case 'a': +result = 0; +break; +case 'C': +case 'c': +result = 1; +break; +case 'G': +case 'g': +result = 2; +break; +case 'T': +case 't': +case 'U': +case 'u': +result = 3; +break; +} +return result; +}, "~S"); +c$.decodeCodon = Clazz.defineMethod (c$, "decodeCodon", +function (encoded) { +var result = Clazz.newCharArray (3, '\0'); +result[2] = jalview.analysis.CodingUtils.decodeNucleotide (encoded & 3); +encoded = encoded >>> 2; +result[1] = jalview.analysis.CodingUtils.decodeNucleotide (encoded & 3); +encoded = encoded >>> 2; +result[0] = jalview.analysis.CodingUtils.decodeNucleotide (encoded & 3); +return result; +}, "~N"); +c$.decodeNucleotide = Clazz.defineMethod (c$, "decodeNucleotide", +function (i) { +var result = '0'; +switch (i) { +case 0: +result = 'A'; +break; +case 1: +result = 'C'; +break; +case 2: +result = 'G'; +break; +case 3: +result = 'T'; +break; +} +return result; +}, "~N"); +Clazz.defineStatics (c$, +"CODON_ENCODING_BITSHIFT", 2); diff --git a/bin/jalview/analysis/CodonComparator.js b/bin/jalview/analysis/CodonComparator.js index 7c07b92..afa4c8d 100644 --- a/bin/jalview/analysis/CodonComparator.js +++ b/bin/jalview/analysis/CodonComparator.js @@ -1,21 +1,21 @@ -Clazz.declarePackage ("jalview.analysis"); -c$ = Clazz.declareType (jalview.analysis, "CodonComparator", null, java.util.Comparator); -Clazz.overrideMethod (c$, "compare", -function (ac1, ac2) { -if (ac1 == null || ac2 == null || ac1.equals (ac2)) { -return 0; -}if (ac1.pos1 < ac2.pos1 && ac1.pos3 <= ac2.pos3) { -return -1; -}if (ac2.pos1 < ac1.pos1 && ac2.pos3 <= ac1.pos3) { -return 1; -}if (ac1.pos3 > ac2.pos3 && ac1.pos1 >= ac2.pos1) { -return 1; -}if (ac2.pos3 > ac1.pos3 && ac2.pos1 >= ac1.pos1) { -return -1; -}if (ac1.pos1 == ac2.pos1 && ac1.pos3 == ac2.pos3) { -return Integer.compare (ac1.pos2, ac2.pos2); -}var compareMiddles = Integer.compare (ac1.pos2, ac2.pos2); -if (compareMiddles != 0) { -return compareMiddles; -}return Integer.compare (ac1.pos1, ac2.pos1); -}, "jalview.datamodel.AlignedCodon,jalview.datamodel.AlignedCodon"); +Clazz.declarePackage ("jalview.analysis"); +c$ = Clazz.declareType (jalview.analysis, "CodonComparator", null, java.util.Comparator); +Clazz.overrideMethod (c$, "compare", +function (ac1, ac2) { +if (ac1 == null || ac2 == null || ac1.equals (ac2)) { +return 0; +}if (ac1.pos1 < ac2.pos1 && ac1.pos3 <= ac2.pos3) { +return -1; +}if (ac2.pos1 < ac1.pos1 && ac2.pos3 <= ac1.pos3) { +return 1; +}if (ac1.pos3 > ac2.pos3 && ac1.pos1 >= ac2.pos1) { +return 1; +}if (ac2.pos3 > ac1.pos3 && ac2.pos1 >= ac1.pos1) { +return -1; +}if (ac1.pos1 == ac2.pos1 && ac1.pos3 == ac2.pos3) { +return Integer.compare (ac1.pos2, ac2.pos2); +}var compareMiddles = Integer.compare (ac1.pos2, ac2.pos2); +if (compareMiddles != 0) { +return compareMiddles; +}return Integer.compare (ac1.pos1, ac2.pos1); +}, "jalview.datamodel.AlignedCodon,jalview.datamodel.AlignedCodon"); diff --git a/bin/jalview/analysis/Conservation.class b/bin/jalview/analysis/Conservation.class index c48157aa04041e419b254bff3f1385a76cd644e4..91e2340ac0f41ac5d83d98a04598536375834807 100644 GIT binary patch delta 3248 zcmZ`*3viUx75=`vn|=P-Yp9u=4;4j0Z}H3nZ|an zX6(=$EHZX!zqO6mSi=d%ZOKK|5e+S9b%Lzdkb_)1a?Q?U4L-PSr(fP84g)T1;8cxQ zaGG%{Iji|fjXyxhHpLqsgo`tIwVjQG=eFn_(W>_7iq@)G(XKX)*KihLUA?NaOGs#X z*>o4Gc%A9m>;$9PWZa;!iF1sxo()`R9QCa9-lnmN)#ftVHQvq@Ms-Swb2Zo4DRzpD z^WNeljd$=)V{6Jd>yIU1!txtOQk>nUx%C?F;@yO+rM)BC)f{bKvy`xe%4RsZn%x@j zWhvok?ToH$n-yK_;(gp`=T8X#x86@{i*`nD?ONKYaT7i!?8{b9U)H*;%Q|%oVCR;L zOO4*yRW+@ny`$5`&AeYjdOo)iw$O|jGs>D>T+1EiS|2c0dZ*YP(r}DBjhOcwcN;ya zU!^@GV<>P*xS!Mb6b}*8LdFNFc}C0^&FI(g6hh|UpoYKVa}y28zV%o6KTv$B-H9COnQvj!FAS@Q4|`hf@%F91`Cw)bJ&p# z@J+*$JBgh}V{R>Lj19S8Rc2L=kn@J<(;YGTV@!@QeQqBLD>H4DvDW=?`kC1Wo1Z}$ zF!tr8XKxFSFlSzP023=?%o93UewPn%%pePmH}kf1Kg&&gPJ(ur`*@VS?B~<6LjxS* zIS%7S$)X3~F`Yp(=9)RhH(4wk#!(4Nq2S4aSdvONuA{|y7#0i!$j3i8FE6dRh z8yXp91st-xjm*KH1v%<5k2kPV%s3^F$KY*bNk(sDI>+LDxaBV$`$bSg9oK(@7K<0} z!egZ7*K@vcO@5xyo?pOH=GsLRk&qoW)Knz+BXWytg*y~N?@#F2zWI-f)3f6+Cj8i8YIdy zPffNo^uZkt4sqf}GML>v`ek^4b!Xs`;qpD$6&70N&3J{A)FA6TmdpB(XX>PwV#eDA z6Qp$&j*+&!ux7zI@#Zb~`8#CrZR7|o<{vPg?_w(7!wkNUt9c%Cgf5bP8$ZHwevB3T z1nc=J?&W8ANa!A3Krg?*VWG$QC4MO~XOzV_UbwqlPM*Z7tY1sagA#!^F0G0UX}qj) zm{aPL!b6;H+*PzduhaeG^z^ZtGm~^Z4wk2JhVfZZtF+C<)!kR!TIbprpdQd|y`!7T zGF-bKhb_a^D9dXYLDjqr*ATCbp=+a`x+3va z8JM^J$VMI0Hk7_a&{Yk)kY6?D7SKuQx9e-C>QK?4y)D&i` zSu9ZzR;%kdQ8lq%&1Iu1Vw1XsH>rhOs1~zBMY%;S;a=6k1FDS&g?~id&XZ~dUsoN* zS0&|3Z)CG9DUHWD7rBy+`8ixJ74MS@Zh=Fhp<*io7@Eh_ptmZ5<^5|oZ3*vDH11@IoO;Sxa^ zGT$056+%C7w%p2$lwN}Z0P z1o|a)Q_*r!&s1F%3QUZvewQnAiLNNujKYuf|I+@>v@e7L;?VCydD8wPR4i>ySyA^l zj+nlgpJ_%ub56=x)|My{%de1vG-36GV_X*F^7q)L1Was4-XE3EAp0(p*TsO#j zDiX3LNyt`Qlr^O+rc^}AK+@cV#%Njk{0)2H(Y@a4B|Q;eA94kT_d}jDtITeSbj#&f z^;1RzzJS&e@dx~Y5rZ|!nN~s?=X&t(SPcx(oSA7&O0XH8{uZ7BOIK%b%@)W z#Lt`KWtw`iOxMNDc@pMQ#GL7J!knLufNz)&e#eT{v|@Y`4tC!Mr`igSx*w@(o7CZU zWT_n}P!AxacA{K8jA~_Iym|z+YBwgUJ@}z|471ffsmc9_s$R6I1L#ywV!b+u9@U4P z>RGAFL)fbhqgNfpGwOL9Q~elF15%qYoK{14SqLlJ#r=(6_z^Cf8)aQ#* zpD!_2y}&&63JcY%oSNirGuXBZZgX^TfUdc78-iqH8XA?ALLU z!!*n^W)B|`WZo-1{HaumB$S|Cf^N6MDX*eOxm$|YBTth(av|D~$~D|8$S$Sb$;Sja zki~XBF35=jF5we`TnKTY+}@>fS(ZyV|4fjEYBuvmLCJDKG;zNm4{GIQ*DDw0%8Fq3 z0pa-Y4xWn}WkiN_aU8?^1a4@?k#(|tYuuC@<{?@H@^G#rpceF*pZLuQ7 wVuRn}jJp<27{Diq2bDaXhQ$HXHJzpdrfWKn2`|kO-xmw$m!s#n@D)$|2e7t(t^fc4 delta 3253 zcmaJ@3v`sl75={2&F*IR&t@O_vzzQDArHc4!;%m%Yywdthy{#dgCHQnR!BgQK#YJ= zTy0~(xALnzr3BGbQ2|2|Fkn$yR9atc^;oN|JsvsM({rrHqpi>M{=4#MPuo1^el!2Q zckZ3J-^@Hb|K9nYlixl29Do`=Ylk8VjOTp?2V&b@ZhT6=hA)^ygd$Uo`&>B%EiH@N z$2*uyFzR4XM5R;I@=djnG32VU*jZp)pq0789Hya|#YBZMTICrVv>cWiJG57AH5#iq z##otEmK>*{1+AGN>ogRg(2hd0GeLt7F59u=8znBliCZ~QVHmU@wyoGBC>=xLo58*=&q;-^%$$zk8);sm4*Pax%8j`PB>cI6DyZACDuB5D}QR|PYD0n&?hZPv?s3VSlq6$6CV-wrPohh+PbvE z+BgibbHnL86KguECbcbZYj?7Xx0^ZLK^?ZplqpjrEw15R=GfgtU20P{dCF|}YB<3A zj3b`cxY@YN`)$t8MFl11qCTN<5BCz2BE~Uak#WSA2tK3XQAEs-2Q_?xzniFEHnjIV z|NDx^dvkL)&@vtlV^^ToYgcyA)R%TRV4c`|Do|{(6+$0Eq2USV7{#F)i;bqjT9z4|h2IX#is_Di`eyf_G?r(xjI!=Rrk{EbY<>p% znP)s*lpEd>9b|Y;^dQE?`dKKlLH;ioU{N1SjQ5K+CJ%5e56XrN@O~cV13bd*vN=6G z#uxZJu8{h<2X1qI%))H5ns}ULGQt!Z&T=R?I0&61V8J$=z&pr=6_4RrMp%IiOy*oh zk%SG?IFprdNJgFX;ID!l^_atpI8xkXN?H5yCi11g?_?%p_%mGcn~PndsG*K4zDEls zig)2Lii_(x+qkN@h{{-3T*7=~XK}=88GV?8PS6**)Kq0rnI(H z5+_qhYH5Y}WxdzLG9=M{R0oHbsp>X%m7ZOtZ1f24@aw{H+imdPif5m#$$GF>aeh-RF zn`~3f_@HF0w87G0($l+Mcfooqr#vU}xB zRve$hhG~a*L48JafRl_n%I52F-Cv{Uj@poyq3bEIEQc2v-;}jVyJ&cI^5SdioSgyc z0o~R;bX!Hxxn&1zLFY6{Z~P#t<^-JsZ0bixrxdb3yk|%b+lIQlP_4fQmzp}dzaQ(4 zp{k!V>f9AUcdKqQS4L*_1V$~|uuQjYXsdId@#Yq9rpfI=cQ9}BP8k03{A5$JEb?e; zYPvj8Xf`+5lB$RoP%Xs~giGZkTZNFLh9Rg*P^?NZLPZc$Q8bF2u41@cRbi&8!CW;K z3so&zR2<7yJ?<8{Sv6p{j6bOw@r;^;J~bJG>LUC>O~Hac3V2UV#RqCSPN^n*t}dri z&Gf0M469izSBR-czE7>@ zQMHD@QELs?h)UN?ULh&v2%~2ijU)UQ&ldjK(T5IRDPJ6t?3bJ)$ca;OxX%@&u?_W{ zC&-Pt_>5O^K0FwdYPnjF7g0XK1;+Lf1(Ozvy^f`rz=WV&?88p}NKgRp;SydWD99^u z0~d*}JS>!&Sr6Y3V(`iFN6M90Z+tzXG`pU5+-$DA{MhAWi$%h<|1l=|Qhq|+A(TTu zV{RH+PTQHL$w**a%Jke(nM-WNc=Qnb$o)6#bEbVI5|DsCj1);bqatV&RAdRNtSC$M zL&+AlrYT_gC9;tt>2yW=xul=h)@S&+B5rfV?XI{(3)ouXa{jgj>@9JpE8u8}yIgV2 z&z12kSKRH2XICENsuRdH#dErKH?&IKdX#JWxN77HOdOdi%9?)O*vIuF)2gOOrgcZ2 z)-}~ErdnLeT*^2Fvn{pW9(?SI`-FJjv9%uEbBMQWgUeF0xUYl-^<{y^4>xZey=_YQK+9PxsjeKO5Ib+5Dyi)uW>0=_|Z8SA5= z#*G8Kvspr)mm;S3G%;^X`E#fJWs5&Ei?lyK9Rc4V-gAzZWXemYm%3NCb`R-ixp)#a z!o@q0sW!o_40zQ8!p8@ZuO32)+Kh1t&)fFxEjO(bp!|1Q6cFsa7-P;arHb-s^fS~ zoxoe_Md9m9_?voJczRNJ`fC=dmsq4;WvP0dW7QiRuYSu5)$e$j`n_=UO|DRH@h0i7 zQ@y-Ry_32zPNs|J%stvAH}0mSS>5tDF}Nvp!F2HfA&}Izj6EpGicGHOL)ef@K4lz@73fdPg4k01 zee%VgLi>$RVxie4Kt?$xCV={k{@p24IG!bH9w`SW=r|fjpGRLo%*-_+OfD Bha~_2 diff --git a/bin/jalview/analysis/Conservation.js b/bin/jalview/analysis/Conservation.js index 1a43b1a..aa95a73 100644 --- a/bin/jalview/analysis/Conservation.js +++ b/bin/jalview/analysis/Conservation.js @@ -1,371 +1,370 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.Conservation", ["jalview.datamodel.Annotation", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color", "java.lang.Character", "$.Double", "$.StringBuffer", "java.util.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.sequences = null; -this.start = 0; -this.end = 0; -this.seqNums = null; -this.maxLength = 0; -this.seqNumsChanged = false; -this.total = null; -this.canonicaliseAa = true; -this.quality = null; -this.qualityRange = null; -this.consString = ""; -this.consSequence = null; -this.propHash = null; -this.threshold = 0; -this.name = ""; -this.cons2 = null; -this.consSymbs = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "Conservation"); -Clazz.prepareFields (c$, function () { -this.qualityRange = new Array (2); -}); -Clazz.makeConstructor (c$, -function (name, propHash, threshold, sequences, start, end) { -this.name = name; -this.propHash = propHash; -this.threshold = threshold; -this.start = start; -this.end = end; -this.maxLength = end - start + 1; -var s; -var sSize = sequences.size (); -var sarray = new Array (sSize); -this.sequences = sarray; -try { -for (s = 0; s < sSize; s++) { -sarray[s] = sequences.get (s); -if (sarray[s].getLength () > this.maxLength) { -this.maxLength = sarray[s].getLength (); -}} -} catch (ex) { -if (Clazz.exceptionOf (ex, ArrayIndexOutOfBoundsException)) { -this.sequences = new Array (0); -this.maxLength = 0; -} else { -throw ex; -} -} -}, "~S,java.util.Hashtable,~N,java.util.List,~N,~N"); -Clazz.defineMethod (c$, "calcSeqNum", -($fz = function (i) { -var sq = null; -var sqnum = null; -var sSize = this.sequences.length; -if ((i > -1) && (i < sSize)) { -sq = this.sequences[i].getSequenceAsString (); -if (this.seqNums.size () <= i) { -this.seqNums.addElement ( Clazz.newIntArray (sq.length + 1, 0)); -}if (sq.hashCode () != (this.seqNums.elementAt (i))[0]) { -var j; -var len; -this.seqNumsChanged = true; -len = sq.length; -if (this.maxLength < len) { -this.maxLength = len; -}sqnum = Clazz.newIntArray (len + 1, 0); -sqnum[0] = sq.hashCode (); -for (j = 1; j <= len; j++) { -sqnum[j] = jalview.schemes.ResidueProperties.aaIndex[sq.charCodeAt (j - 1)]; -} -this.seqNums.setElementAt (sqnum, i); -} else { -System.out.println ("SEQUENCE HAS BEEN DELETED!!!"); -}} else { -System.err.println ("ERROR: calcSeqNum called with out of range sequence index for Alignment\n"); -}}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "calculate", -function () { -var resultHash; -var ht; -var thresh; -var j; -var jSize = this.sequences.length; -var values; -var type; -var res = null; -var c; -var enumeration2; -this.total = new Array (this.maxLength); -for (var i = this.start; i <= this.end; i++) { -values = Clazz.newIntArray (255, 0); -for (j = 0; j < jSize; j++) { -if (this.sequences[j].getLength () > i) { -c = this.sequences[j].getCharAt (i); -if (this.canonicaliseAa) { -c = String.fromCharCode (jalview.schemes.ResidueProperties.aaIndex[this.sequences[j].getCharAt (i).charCodeAt (0)]); -if (c.charCodeAt (0) > 20) { -c = '-'; -} else { -c = jalview.schemes.ResidueProperties.aa[c.charCodeAt (0)].charAt (0); -}} else { -if (c == '.' || c == ' ') { -c = '-'; -}if (!this.canonicaliseAa && 'a' <= c && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) - (32)); -}}values[c.charCodeAt (0)]++; -} else { -values['-'.charCodeAt (0)]++; -}} -thresh = Clazz.doubleToInt ((this.threshold * (jSize)) / 100); -resultHash = new java.util.Hashtable (); -for (var v = '-'; v < 'Z'; v = String.fromCharCode (v.charCodeAt (0) + 1)) { -if (values[v.charCodeAt (0)] > thresh) { -res = String.valueOf (v); -enumeration2 = this.propHash.keys (); -while (enumeration2.hasMoreElements ()) { -type = enumeration2.nextElement (); -ht = this.propHash.get (type); -if (!resultHash.containsKey (type)) { -if (ht.containsKey (res)) { -resultHash.put (type, ht.get (res)); -} else { -resultHash.put (type, ht.get ("-")); -}} else if ((resultHash.get (type)).equals (ht.get (res)) == false) { -resultHash.put (type, new Integer (-1)); -}} -}} -if (this.total.length > 0) { -this.total[i - this.start] = resultHash; -}} -}); -Clazz.defineMethod (c$, "countConsNGaps", -function (j) { -var count = 0; -var cons = 0; -var nres = 0; -var r = Clazz.newIntArray (2, 0); -var f = '$'; -var i; -var iSize = this.sequences.length; -var c; -for (i = 0; i < iSize; i++) { -if (j >= this.sequences[i].getLength ()) { -count++; -continue; -}c = this.sequences[i].getCharAt (j); -if (jalview.util.Comparison.isGap ((c))) { -count++; -} else { -nres++; -if (nres == 1) { -f = c; -cons++; -} else if (f == c) { -cons++; -}}} -r[0] = (nres == cons) ? 1 : 0; -r[1] = count; -return r; -}, "~N"); -Clazz.defineMethod (c$, "verdict", -function (consflag, percentageGaps) { -var consString = new StringBuffer (); -var type; -var result; -var gapcons; -var totGaps; -var count; -var pgaps; -var resultHash; -var enumeration; -for (var i = 0; i < this.start; i++) { -consString.append ('-'); -} -this.consSymbs = new Array (this.end - this.start + 1); -for (var i = this.start; i <= this.end; i++) { -gapcons = this.countConsNGaps (i); -totGaps = gapcons[1]; -pgaps = (totGaps * 100) / this.sequences.length; -this.consSymbs[i - this.start] = String.instantialize (); -if (percentageGaps > pgaps) { -resultHash = this.total[i - this.start]; -count = 0; -enumeration = resultHash.keys (); -while (enumeration.hasMoreElements ()) { -type = enumeration.nextElement (); -result = resultHash.get (type); -if (consflag) { -if (result.intValue () == 1) { -this.consSymbs[i - this.start] = type + " " + this.consSymbs[i - this.start]; -count++; -}} else { -if (result.intValue () != -1) { -{ -if (result.intValue () == 0) { -this.consSymbs[i - this.start] = this.consSymbs[i - this.start] + " !" + type; -} else { -this.consSymbs[i - this.start] = type + " " + this.consSymbs[i - this.start]; -}}count++; -}}} -if (count < 10) { -{ -consString.append(""+count); -}} else { -consString.append ((gapcons[0] == 1) ? "*" : "+"); -}} else { -consString.append ('-'); -}} -this.consSequence = new jalview.datamodel.Sequence (this.name, consString.toString (), this.start, this.end); -}, "~B,~N"); -Clazz.defineMethod (c$, "getConsSequence", -function () { -return this.consSequence; -}); -Clazz.defineMethod (c$, "findQuality", -function () { -this.findQuality (0, this.maxLength - 1); -}); -Clazz.defineMethod (c$, "percentIdentity2", -($fz = function () { -this.seqNums = new java.util.Vector (); -var i = 0; -var iSize = this.sequences.length; -for (i = 0; i < iSize; i++) { -this.calcSeqNum (i); -} -if ((this.cons2 == null) || this.seqNumsChanged) { -this.cons2 = Clazz.newIntArray (this.maxLength, 24, 0); -for (var j = 0; j < 24; j++) { -for (i = 0; i < this.maxLength; i++) { -this.cons2[i][j] = 0; -} -} -var sqnum; -var j = 0; -while (j < this.sequences.length) { -sqnum = this.seqNums.elementAt (j); -for (i = 1; i < sqnum.length; i++) { -this.cons2[i - 1][sqnum[i]]++; -} -for (i = sqnum.length - 1; i < this.maxLength; i++) { -this.cons2[i][23]++; -} -j++; -} -}}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "findQuality", -function (start, end) { -this.quality = new java.util.Vector (); -var max = -10000; -var BLOSUM62 = jalview.schemes.ResidueProperties.getBLOSUM62 (); -this.percentIdentity2 (); -var size = this.seqNums.size (); -var lengths = Clazz.newIntArray (size, 0); -var tot; -var bigtot; -var sr; -var tmp; -var x; -var xx; -var l; -var j; -var i; -var ii; -var i2; -var k; -var seqNum; -for (l = 0; l < size; l++) { -lengths[l] = (this.seqNums.elementAt (l)).length - 1; -} -for (j = start; j <= end; j++) { -bigtot = 0; -x = Clazz.newDoubleArray (24, 0); -for (ii = 0; ii < 24; ii++) { -x[ii] = 0; -for (i2 = 0; i2 < 24; i2++) { -x[ii] += ((this.cons2[j][i2] * BLOSUM62[ii][i2]) + 4); -} -x[ii] /= size; -} -for (k = 0; k < size; k++) { -tot = 0; -xx = Clazz.newDoubleArray (24, 0); -seqNum = (j < lengths[k]) ? (this.seqNums.elementAt (k))[j + 1] : 23; -for (i = 0; i < 23; i++) { -sr = 0; -sr = BLOSUM62[i][seqNum] + 4; -xx[i] = x[i] - sr; -tot += (xx[i] * xx[i]); -} -bigtot += Math.sqrt (tot); -} -if (max < bigtot) { -max = bigtot; -}this.quality.addElement ( new Double (bigtot)); -} -var newmax = -10000; -for (j = start; j <= end; j++) { -tmp = (this.quality.elementAt (j)).doubleValue (); -tmp = ((max - tmp) * (size - this.cons2[j][23])) / size; -this.quality.setElementAt ( new Double (tmp), j); -if (tmp > newmax) { -newmax = tmp; -}} -this.qualityRange[0] = new Double (0); -this.qualityRange[1] = new Double (newmax); -}, "~N,~N"); -Clazz.defineMethod (c$, "completeAnnotations", -function (conservation, quality2, istart, alWidth) { -var sequence = this.getConsSequence ().getSequence (); -var minR; -var minG; -var minB; -var maxR; -var maxG; -var maxB; -minR = 0.3; -minG = 0.0; -minB = 0; -maxR = 1.0 - minR; -maxG = 0.9 - minG; -maxB = 0 - minB; -var min = 0; -var max = 11; -var qmin = 0; -var qmax = 0; -var c; -if (conservation.annotations != null && conservation.annotations.length < alWidth) { -conservation.annotations = new Array (alWidth); -}if (quality2 != null) { -quality2.graphMax = this.qualityRange[1].floatValue (); -if (quality2.annotations != null && quality2.annotations.length < alWidth) { -quality2.annotations = new Array (alWidth); -}qmin = this.qualityRange[0].floatValue (); -qmax = this.qualityRange[1].floatValue (); -}for (var i = 0; i < alWidth; i++) { -var value = 0; -c = sequence[i]; -if (Character.isDigit (c)) { -value = c.charCodeAt (0) - 48; -} else if (c == '*') { -value = 11; -} else if (c == '+') { -value = 10; -}var vprop = value - min; -vprop /= max; -conservation.annotations[i] = new jalview.datamodel.Annotation (String.valueOf (c), this.consSymbs[i - this.start], ' ', value, new java.awt.Color (minR + (maxR * vprop), minG + (maxG * vprop), minB + (maxB * vprop))); -if (quality2 != null) { -value = (this.quality.elementAt (i)).floatValue (); -vprop = value - qmin; -vprop /= qmax; -quality2.annotations[i] = new jalview.datamodel.Annotation (" ", String.valueOf (value), ' ', value, new java.awt.Color (minR + (maxR * vprop), minG + (maxG * vprop), minB + (maxB * vprop))); -}} -}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation,~N,~N"); -c$.calculateConservation = Clazz.defineMethod (c$, "calculateConservation", -function (name, consHash, threshold, seqs, start, end, posOrNeg, consPercGaps, calcQuality) { -var cons = new jalview.analysis.Conservation (name, consHash, threshold, seqs, start, end); -return jalview.analysis.Conservation.calculateConservation (cons, posOrNeg, consPercGaps, calcQuality); -}, "~S,java.util.Hashtable,~N,java.util.List,~N,~N,~B,~N,~B"); -c$.calculateConservation = Clazz.defineMethod (c$, "calculateConservation", -function (cons, b, consPercGaps, calcQuality) { -cons.calculate (); -cons.verdict (b, consPercGaps); -if (calcQuality) { -cons.findQuality (); -}return cons; -}, "jalview.analysis.Conservation,~B,~N,~B"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.Conservation", ["jalview.datamodel.Annotation", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color", "java.lang.Character", "$.Double", "$.StringBuffer", "java.util.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.sequences = null; +this.start = 0; +this.end = 0; +this.seqNums = null; +this.maxLength = 0; +this.seqNumsChanged = false; +this.total = null; +this.canonicaliseAa = true; +this.quality = null; +this.qualityRange = null; +this.consString = ""; +this.consSequence = null; +this.propHash = null; +this.threshold = 0; +this.name = ""; +this.cons2 = null; +this.consSymbs = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "Conservation"); +Clazz.prepareFields (c$, function () { +this.qualityRange = new Array (2); +}); +Clazz.makeConstructor (c$, +function (name, propHash, threshold, sequences, start, end) { +this.name = name; +this.propHash = propHash; +this.threshold = threshold; +this.start = start; +this.end = end; +this.maxLength = end - start + 1; +var s; +var sSize = sequences.size (); +var sarray = new Array (sSize); +this.sequences = sarray; +try { +for (s = 0; s < sSize; s++) { +sarray[s] = sequences.get (s); +if (sarray[s].getLength () > this.maxLength) { +this.maxLength = sarray[s].getLength (); +}} +} catch (ex) { +if (Clazz.exceptionOf (ex, ArrayIndexOutOfBoundsException)) { +this.sequences = new Array (0); +this.maxLength = 0; +} else { +throw ex; +} +} +}, "~S,java.util.Hashtable,~N,java.util.List,~N,~N"); +Clazz.defineMethod (c$, "calcSeqNum", +($fz = function (i) { +var sq = null; +var sqnum = null; +var sSize = this.sequences.length; +if ((i > -1) && (i < sSize)) { +sq = this.sequences[i].getSequenceAsString (); +if (this.seqNums.size () <= i) { +this.seqNums.addElement ( Clazz.newIntArray (sq.length + 1, 0)); +}if (sq.hashCode () != (this.seqNums.elementAt (i))[0]) { +var j; +var len; +this.seqNumsChanged = true; +len = sq.length; +if (this.maxLength < len) { +this.maxLength = len; +}sqnum = Clazz.newIntArray (len + 1, 0); +sqnum[0] = sq.hashCode (); +for (j = 1; j <= len; j++) { +sqnum[j] = jalview.schemes.ResidueProperties.aaIndex[sq.charCodeAt (j - 1)]; +} +this.seqNums.setElementAt (sqnum, i); +} else { +System.out.println ("SEQUENCE HAS BEEN DELETED!!!"); +}} else { +System.err.println ("ERROR: calcSeqNum called with out of range sequence index for Alignment\n"); +}}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "calculate", +function () { +var resultHash; +var ht; +var thresh; +var j; +var jSize = this.sequences.length; +var values; +var type; +var res = null; +var c; +var enumeration2; +this.total = new Array (this.maxLength); +for (var i = this.start; i <= this.end; i++) { +values = Clazz.newIntArray (255, 0); +for (j = 0; j < jSize; j++) { +if (this.sequences[j].getLength () > i) { +c = this.sequences[j].getCharAt (i); +if (this.canonicaliseAa) { +c = String.fromCharCode (jalview.schemes.ResidueProperties.aaIndex[this.sequences[j].getCharAt (i).charCodeAt (0)]); +if (c.charCodeAt (0) > 20) { +c = '-'; +} else { +c = jalview.schemes.ResidueProperties.aa[c.charCodeAt (0)].charAt (0); +}} else { +if (c == '.' || c == ' ') { +c = '-'; +}if (!this.canonicaliseAa && 'a' <= c && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) - (32)); +}}values[c.charCodeAt (0)]++; +} else { +values['-'.charCodeAt (0)]++; +}} +thresh = Clazz.doubleToInt ((this.threshold * (jSize)) / 100); +resultHash = new java.util.Hashtable (); +for (var v = '-'; v < 'Z'; v = String.fromCharCode (v.charCodeAt (0) + 1)) { +if (values[v.charCodeAt (0)] > thresh) { +res = String.valueOf (v); +enumeration2 = this.propHash.keys (); +while (enumeration2.hasMoreElements ()) { +type = enumeration2.nextElement (); +ht = this.propHash.get (type); +if (!resultHash.containsKey (type)) { +if (ht.containsKey (res)) { +resultHash.put (type, ht.get (res)); +} else { +resultHash.put (type, ht.get ("-")); +}} else if ((resultHash.get (type)).equals (ht.get (res)) == false) { +resultHash.put (type, new Integer (-1)); +}} +}} +if (this.total.length > 0) { +this.total[i - this.start] = resultHash; +}} +}); +Clazz.defineMethod (c$, "countConsNGaps", +function (j) { +var count = 0; +var cons = 0; +var nres = 0; +var r = Clazz.newIntArray (2, 0); +var f = '$'; +var i; +var iSize = this.sequences.length; +var c; +for (i = 0; i < iSize; i++) { +if (j >= this.sequences[i].getLength ()) { +count++; +continue; +}c = this.sequences[i].getCharAt (j); +if (jalview.util.Comparison.isGap ((c))) { +count++; +} else { +nres++; +if (nres == 1) { +f = c; +cons++; +} else if (f == c) { +cons++; +}}} +r[0] = (nres == cons) ? 1 : 0; +r[1] = count; +return r; +}, "~N"); +Clazz.defineMethod (c$, "verdict", +function (consflag, percentageGaps) { +var consString = new StringBuffer (); +var type; +var result; +var gapcons; +var totGaps; +var count; +var pgaps; +var resultHash; +var enumeration; +for (var i = 0; i < this.start; i++) { +consString.append ('-'); +} +this.consSymbs = new Array (this.end - this.start + 1); +for (var i = this.start; i <= this.end; i++) { +gapcons = this.countConsNGaps (i); +totGaps = gapcons[1]; +pgaps = (totGaps * 100) / this.sequences.length; +this.consSymbs[i - this.start] = String.instantialize (); +if (percentageGaps > pgaps) { +resultHash = this.total[i - this.start]; +count = 0; +enumeration = resultHash.keys (); +while (enumeration.hasMoreElements ()) { +type = enumeration.nextElement (); +result = resultHash.get (type); +if (consflag) { +if (result.intValue () == 1) { +this.consSymbs[i - this.start] = type + " " + this.consSymbs[i - this.start]; +count++; +}} else { +if (result.intValue () != -1) { +{ +if (result.intValue () == 0) { +this.consSymbs[i - this.start] = this.consSymbs[i - this.start] + " !" + type; +} else { +this.consSymbs[i - this.start] = type + " " + this.consSymbs[i - this.start]; +}}count++; +}}} +if (count < 10) { +consString.append ("" + count); +} else { +consString.append ((gapcons[0] == 1) ? "*" : "+"); +}} else { +consString.append ('-'); +}} +this.consSequence = new jalview.datamodel.Sequence (this.name, consString.toString (), this.start, this.end); +}, "~B,~N"); +Clazz.defineMethod (c$, "getConsSequence", +function () { +return this.consSequence; +}); +Clazz.defineMethod (c$, "findQuality", +function () { +this.findQuality (0, this.maxLength - 1); +}); +Clazz.defineMethod (c$, "percentIdentity2", +($fz = function () { +this.seqNums = new java.util.Vector (); +var i = 0; +var iSize = this.sequences.length; +for (i = 0; i < iSize; i++) { +this.calcSeqNum (i); +} +if ((this.cons2 == null) || this.seqNumsChanged) { +this.cons2 = Clazz.newIntArray (this.maxLength, 24, 0); +for (var j = 0; j < 24; j++) { +for (i = 0; i < this.maxLength; i++) { +this.cons2[i][j] = 0; +} +} +var sqnum; +var j = 0; +while (j < this.sequences.length) { +sqnum = this.seqNums.elementAt (j); +for (i = 1; i < sqnum.length; i++) { +this.cons2[i - 1][sqnum[i]]++; +} +for (i = sqnum.length - 1; i < this.maxLength; i++) { +this.cons2[i][23]++; +} +j++; +} +}}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "findQuality", +function (start, end) { +this.quality = new java.util.Vector (); +var max = -10000; +var BLOSUM62 = jalview.schemes.ResidueProperties.getBLOSUM62 (); +this.percentIdentity2 (); +var size = this.seqNums.size (); +var lengths = Clazz.newIntArray (size, 0); +var tot; +var bigtot; +var sr; +var tmp; +var x; +var xx; +var l; +var j; +var i; +var ii; +var i2; +var k; +var seqNum; +for (l = 0; l < size; l++) { +lengths[l] = (this.seqNums.elementAt (l)).length - 1; +} +for (j = start; j <= end; j++) { +bigtot = 0; +x = Clazz.newDoubleArray (24, 0); +for (ii = 0; ii < 24; ii++) { +x[ii] = 0; +for (i2 = 0; i2 < 24; i2++) { +x[ii] += ((this.cons2[j][i2] * BLOSUM62[ii][i2]) + 4); +} +x[ii] /= size; +} +for (k = 0; k < size; k++) { +tot = 0; +xx = Clazz.newDoubleArray (24, 0); +seqNum = (j < lengths[k]) ? (this.seqNums.elementAt (k))[j + 1] : 23; +for (i = 0; i < 23; i++) { +sr = 0; +sr = BLOSUM62[i][seqNum] + 4; +xx[i] = x[i] - sr; +tot += (xx[i] * xx[i]); +} +bigtot += Math.sqrt (tot); +} +if (max < bigtot) { +max = bigtot; +}this.quality.addElement ( new Double (bigtot)); +} +var newmax = -10000; +for (j = start; j <= end; j++) { +tmp = (this.quality.elementAt (j)).doubleValue (); +tmp = ((max - tmp) * (size - this.cons2[j][23])) / size; +this.quality.setElementAt ( new Double (tmp), j); +if (tmp > newmax) { +newmax = tmp; +}} +this.qualityRange[0] = new Double (0); +this.qualityRange[1] = new Double (newmax); +}, "~N,~N"); +Clazz.defineMethod (c$, "completeAnnotations", +function (conservation, quality2, istart, alWidth) { +var sequence = this.getConsSequence ().getSequence (); +var minR; +var minG; +var minB; +var maxR; +var maxG; +var maxB; +minR = 0.3; +minG = 0.0; +minB = 0; +maxR = 1.0 - minR; +maxG = 0.9 - minG; +maxB = 0 - minB; +var min = 0; +var max = 11; +var qmin = 0; +var qmax = 0; +var c; +if (conservation.annotations != null && conservation.annotations.length < alWidth) { +conservation.annotations = new Array (alWidth); +}if (quality2 != null) { +quality2.graphMax = this.qualityRange[1].floatValue (); +if (quality2.annotations != null && quality2.annotations.length < alWidth) { +quality2.annotations = new Array (alWidth); +}qmin = this.qualityRange[0].floatValue (); +qmax = this.qualityRange[1].floatValue (); +}for (var i = 0; i < alWidth; i++) { +var value = 0; +c = sequence[i]; +if (Character.isDigit (c)) { +value = c.charCodeAt (0) - 48; +} else if (c == '*') { +value = 11; +} else if (c == '+') { +value = 10; +}var vprop = value - min; +vprop /= max; +conservation.annotations[i] = new jalview.datamodel.Annotation (String.valueOf (c), this.consSymbs[i - this.start], ' ', value, new java.awt.Color (minR + (maxR * vprop), minG + (maxG * vprop), minB + (maxB * vprop))); +if (quality2 != null) { +value = (this.quality.elementAt (i)).floatValue (); +vprop = value - qmin; +vprop /= qmax; +quality2.annotations[i] = new jalview.datamodel.Annotation (" ", String.valueOf (value), ' ', value, new java.awt.Color (minR + (maxR * vprop), minG + (maxG * vprop), minB + (maxB * vprop))); +}} +}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.AlignmentAnnotation,~N,~N"); +c$.calculateConservation = Clazz.defineMethod (c$, "calculateConservation", +function (name, consHash, threshold, seqs, start, end, posOrNeg, consPercGaps, calcQuality) { +var cons = new jalview.analysis.Conservation (name, consHash, threshold, seqs, start, end); +return jalview.analysis.Conservation.calculateConservation (cons, posOrNeg, consPercGaps, calcQuality); +}, "~S,java.util.Hashtable,~N,java.util.List,~N,~N,~B,~N,~B"); +c$.calculateConservation = Clazz.defineMethod (c$, "calculateConservation", +function (cons, b, consPercGaps, calcQuality) { +cons.calculate (); +cons.verdict (b, consPercGaps); +if (calcQuality) { +cons.findQuality (); +}return cons; +}, "jalview.analysis.Conservation,~B,~N,~B"); +}); diff --git a/bin/jalview/analysis/Dna.class b/bin/jalview/analysis/Dna.class index 3ae87d06896f77e340ca8ec74e76f1d0da887bf7..23cc7cbc505379d042311d55ed2ab76563aa2c7a 100644 GIT binary patch delta 100 zcmZoKX)W1Ms?PXibD4TJlVJq|-+u;i26lD^Ms|ikc7`?vMn-nVbOwh146;a~>_9*B`g4AR~7RB delta 102 zcmZoIX)oDOs?PXybD4TJlTjrD|9=K?26lD^Ms|ikc7`?vMn-nVbOwh13{ps<>_96F<}DMAIcK0E5gG@&Et; diff --git a/bin/jalview/analysis/Dna.js b/bin/jalview/analysis/Dna.js index 68086a9..57c052f 100644 --- a/bin/jalview/analysis/Dna.js +++ b/bin/jalview/analysis/Dna.js @@ -1,327 +1,327 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (["jalview.analysis.CodonComparator"], "jalview.analysis.Dna", ["jalview.datamodel.AlignedCodon", "$.AlignedCodonFrame", "$.Alignment", "$.AlignmentAnnotation", "$.Annotation", "$.DBRefSource", "$.FeatureProperties", "$.GraphLine", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "$.DBRefUtils", "$.MapList", "$.ShiftList", "java.lang.IllegalStateException", "$.StringBuilder", "java.util.ArrayList", "$.Arrays"], function () { -c$ = Clazz.decorateAsClass (function () { -this.selection = null; -this.seqstring = null; -this.contigs = null; -this.gapChar = '\0'; -this.annotations = null; -this.dnaWidth = 0; -this.dataset = null; -this.aaWidth = 0; -this.alignedCodons = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "Dna"); -Clazz.makeConstructor (c$, -function (viewport, visibleContigs) { -this.selection = java.util.Arrays.asList (viewport.getSequenceSelection ()); -this.seqstring = viewport.getViewAsString (true); -this.contigs = visibleContigs; -this.gapChar = viewport.getGapCharacter (); -this.annotations = viewport.getAlignment ().getAlignmentAnnotation (); -this.dnaWidth = viewport.getAlignment ().getWidth (); -this.dataset = viewport.getAlignment ().getDataset (); -}, "jalview.api.AlignViewportI,~A"); -c$.compareCodonPos = Clazz.defineMethod (c$, "compareCodonPos", -function (ac1, ac2) { -return jalview.analysis.Dna.comparator.compare (ac1, ac2); -}, "jalview.datamodel.AlignedCodon,jalview.datamodel.AlignedCodon"); -Clazz.defineMethod (c$, "translateCdna", -function () { -var acf = new jalview.datamodel.AlignedCodonFrame (); -this.alignedCodons = new Array (this.dnaWidth); -var s; -var sSize = this.selection.size (); -var pepseqs = new java.util.ArrayList (); -for (s = 0; s < sSize; s++) { -var newseq = this.translateCodingRegion (this.selection.get (s), this.seqstring[s], acf, pepseqs); -if (newseq != null) { -pepseqs.add (newseq); -var ds = newseq; -if (this.dataset != null) { -while (ds.getDatasetSequence () != null) { -ds = ds.getDatasetSequence (); -} -this.dataset.addSequence (ds); -}}} -var newseqs = pepseqs.toArray ( new Array (pepseqs.size ())); -var al = new jalview.datamodel.Alignment (newseqs); -al.padGaps (); -al.setDataset (this.dataset); -this.translateAlignedAnnotations (al, acf); -al.addCodonFrame (acf); -return al; -}); -c$.canTranslate = Clazz.defineMethod (c$, "canTranslate", -function (selection, viscontigs) { -for (var gd = 0; gd < selection.length; gd++) { -var dna = selection[gd]; -var dnarefs = jalview.util.DBRefUtils.selectRefs (dna.getDBRef (), jalview.datamodel.DBRefSource.DNACODINGDBS); -if (dnarefs != null) { -var mappedrefs = new java.util.ArrayList (); -var refs = dna.getDBRef (); -for (var d = 0; d < refs.length; d++) { -if (refs[d].getMap () != null && refs[d].getMap ().getMap () != null && refs[d].getMap ().getMap ().getFromRatio () == 3 && refs[d].getMap ().getMap ().getToRatio () == 1) { -mappedrefs.add (refs[d]); -}} -dnarefs = mappedrefs.toArray ( new Array (mappedrefs.size ())); -for (var d = 0; d < dnarefs.length; d++) { -var mp = dnarefs[d].getMap (); -if (mp != null) { -for (var vc = 0; vc < viscontigs.length; vc += 2) { -var mpr = mp.locateMappedRange (viscontigs[vc], viscontigs[vc + 1]); -if (mpr != null) { -return true; -}} -}} -}} -return false; -}, "~A,~A"); -Clazz.defineMethod (c$, "translateAlignedAnnotations", -function (al, acf) { -if (this.annotations != null) { -for (var annotation, $annotation = 0, $$annotation = this.annotations; $annotation < $$annotation.length && ((annotation = $$annotation[$annotation]) || true); $annotation++) { -if (annotation.autoCalculated || !annotation.visible || annotation.isRNA ()) { -continue; -}var aSize = this.aaWidth; -var anots = (annotation.annotations == null) ? null : new Array (aSize); -if (anots != null) { -for (var a = 0; a < aSize; a++) { -if (a < this.alignedCodons.length && this.alignedCodons[a] != null && this.alignedCodons[a].pos1 == (this.alignedCodons[a].pos3 - 2)) { -anots[a] = jalview.analysis.Dna.getCodonAnnotation (this.alignedCodons[a], annotation.annotations); -}} -}var aa = new jalview.datamodel.AlignmentAnnotation (annotation.label, annotation.description, anots); -aa.graph = annotation.graph; -aa.graphGroup = annotation.graphGroup; -aa.graphHeight = annotation.graphHeight; -if (annotation.getThreshold () != null) { -aa.setThreshold ( new jalview.datamodel.GraphLine (annotation.getThreshold ())); -}if (annotation.$hasScore) { -aa.setScore (annotation.getScore ()); -}var seqRef = annotation.sequenceRef; -if (seqRef != null) { -var aaSeq = acf.getAaForDnaSeq (seqRef); -if (aaSeq != null) { -aa.setSequenceRef (aaSeq); -aa.createSequenceMapping (aaSeq, aaSeq.getStart (), true); -aa.adjustForAlignment (); -aaSeq.addAlignmentAnnotation (aa); -}}al.addAnnotation (aa); -} -}}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignedCodonFrame"); -c$.getCodonAnnotation = Clazz.defineMethod (c$, "getCodonAnnotation", -($fz = function (is, annotations) { -var contrib = 0; -var annot = null; -for (var p = 1; p <= 3; p++) { -var dnaCol = is.getBaseColumn (p); -if (annotations[dnaCol] != null) { -if (annot == null) { -annot = new jalview.datamodel.Annotation (annotations[dnaCol]); -contrib = 1; -} else { -var cpy = new jalview.datamodel.Annotation (annotations[dnaCol]); -if (annot.colour == null) { -annot.colour = cpy.colour; -}if (annot.description == null || annot.description.length == 0) { -annot.description = cpy.description; -}if (annot.displayCharacter == null) { -annot.displayCharacter = cpy.displayCharacter; -}if (annot.secondaryStructure.charCodeAt (0) == 0) { -annot.secondaryStructure = cpy.secondaryStructure; -}annot.value += cpy.value; -contrib++; -}}} -if (contrib > 1) { -annot.value /= contrib; -}return annot; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignedCodon,~A"); -Clazz.defineMethod (c$, "translateCodingRegion", -function (selection, seqstring, acf, proteinSeqs) { -var skip = new java.util.ArrayList (); -var skipint = null; -var vismapping = new jalview.util.ShiftList (); -var vc; -var scontigs = Clazz.newIntArray (this.contigs.length, 0); -var npos = 0; -for (vc = 0; vc < this.contigs.length; vc += 2) { -if (vc == 0) { -vismapping.addShift (npos, this.contigs[vc]); -} else { -vismapping.addShift (npos, this.contigs[vc] - this.contigs[vc - 1] + 1); -}scontigs[vc] = this.contigs[vc]; -scontigs[vc + 1] = this.contigs[vc + 1]; -} -var protein = new StringBuilder (Clazz.doubleToInt (seqstring.length / 2)); -var seq = seqstring.$replace ('U', 'T').$replace ('u', 'T'); -var codon = Clazz.newCharArray (3, '\0'); -var cdp = Clazz.newIntArray (3, 0); -var rf = 0; -var lastnpos = 0; -var nend; -var aspos = 0; -var resSize = 0; -for (npos = 0, nend = seq.length; npos < nend; npos++) { -if (!jalview.util.Comparison.isGap (seq.charAt (npos))) { -cdp[rf] = npos; -codon[rf++] = seq.charAt (npos); -}if (rf == 3) { -var alignedCodon = new jalview.datamodel.AlignedCodon (cdp[0], cdp[1], cdp[2]); -var aa = jalview.schemes.ResidueProperties.codonTranslate ( String.instantialize (codon)); -rf = 0; -var gapString = String.valueOf (this.gapChar); -if (aa == null) { -aa = gapString; -if (skipint == null) { -skipint = Clazz.newIntArray (-1, [alignedCodon.pos1, alignedCodon.pos3]); -}skipint[1] = alignedCodon.pos3; -} else { -if (skipint != null) { -skipint[0] = vismapping.shift (skipint[0]); -skipint[1] = vismapping.shift (skipint[1]); -for (vc = 0; vc < scontigs.length; ) { -if (scontigs[vc + 1] < skipint[0]) { -vc += 2; -continue; -}if (scontigs[vc] > skipint[1]) { -break; -}var t; -if (scontigs[vc] <= skipint[0]) { -if (skipint[0] == scontigs[vc]) { -if (scontigs[vc + 1] > skipint[1]) { -scontigs[vc] = skipint[1]; -vc += 2; -} else { -if (scontigs[vc + 1] == skipint[1]) { -t = Clazz.newIntArray (scontigs.length - 2, 0); -if (vc > 0) { -System.arraycopy (scontigs, 0, t, 0, vc - 1); -}if (vc + 2 < t.length) { -System.arraycopy (scontigs, vc + 2, t, vc, t.length - vc + 2); -}scontigs = t; -} else { -scontigs[vc + 1] = skipint[0] - 1; -vc += 2; -}}} else { -if (scontigs[vc + 1] < skipint[1]) { -scontigs[vc + 1] = skipint[0] - 1; -vc += 2; -} else { -t = Clazz.newIntArray (scontigs.length + 2, 0); -System.arraycopy (scontigs, 0, t, 0, vc + 1); -t[vc + 1] = skipint[0]; -t[vc + 2] = skipint[1]; -System.arraycopy (scontigs, vc + 1, t, vc + 3, scontigs.length - (vc + 1)); -scontigs = t; -vc += 4; -}}}} -skip.add (skipint); -skipint = null; -}if (aa.equals ("STOP")) { -aa = "X"; -}resSize++; -}var findpos = true; -while (findpos) { -var compareCodonPos = jalview.analysis.Dna.compareCodonPos (alignedCodon, this.alignedCodons[aspos]); -switch (compareCodonPos) { -case -1: -this.insertAAGap (aspos, proteinSeqs); -findpos = false; -break; -case 1: -aa = gapString + aa; -aspos++; -break; -case 0: -findpos = false; -} -} -protein.append (aa); -lastnpos = npos; -if (this.alignedCodons[aspos] == null) { -this.alignedCodons[aspos] = alignedCodon; -} else if (!this.alignedCodons[aspos].equals (alignedCodon)) { -throw new IllegalStateException ("Tried to coalign " + this.alignedCodons[aspos].toString () + " with " + alignedCodon.toString ()); -}if (aspos >= this.aaWidth) { -this.aaWidth = aspos; -}aspos++; -}} -if (resSize > 0) { -var newseq = new jalview.datamodel.Sequence (selection.getName (), protein.toString ()); -if (rf != 0) { -var errMsg = "trimming contigs for incomplete terminal codon."; -System.err.println ("trimming contigs for incomplete terminal codon."); -vc = scontigs.length - 1; -lastnpos = vismapping.shift (lastnpos); -while (vc >= 0 && scontigs[vc] > lastnpos) { -if (vc > 0 && scontigs[vc - 1] > lastnpos) { -vc -= 2; -} else { -scontigs[vc] = lastnpos; -}} -if (vc > 0 && (vc + 1) < scontigs.length) { -var t = Clazz.newIntArray (vc + 1, 0); -System.arraycopy (scontigs, 0, t, 0, vc + 1); -scontigs = t; -}if (vc <= 0) { -scontigs = null; -}}if (scontigs != null) { -npos = 0; -for (vc = 0; vc < scontigs.length; vc += 2) { -scontigs[vc] = selection.findPosition (scontigs[vc]); -scontigs[vc + 1] = selection.findPosition (scontigs[vc + 1]); -if (scontigs[vc + 1] == selection.getEnd ()) { -break; -}} -if ((vc + 2) < scontigs.length) { -var t = Clazz.newIntArray (vc + 2, 0); -System.arraycopy (scontigs, 0, t, 0, vc + 2); -scontigs = t; -}var map = new jalview.util.MapList (scontigs, Clazz.newIntArray (-1, [1, resSize]), 3, 1); -jalview.analysis.Dna.transferCodedFeatures (selection, newseq, map, null, null); -var rseq = newseq.deriveSequence (); -acf.addMap (selection, rseq, map); -return rseq; -}}return null; -}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.AlignedCodonFrame,java.util.List"); -Clazz.defineMethod (c$, "insertAAGap", -function (pos, proteinSeqs) { -this.aaWidth++; -for (var seq, $seq = proteinSeqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -seq.insertCharAt (pos, this.gapChar); -} -this.checkCodonFrameWidth (); -if (pos < this.aaWidth) { -this.aaWidth++; -System.arraycopy (this.alignedCodons, pos, this.alignedCodons, pos + 1, this.alignedCodons.length - pos - 1); -this.alignedCodons[pos] = null; -}}, "~N,java.util.List"); -Clazz.defineMethod (c$, "checkCodonFrameWidth", -function () { -if (this.alignedCodons[this.alignedCodons.length - 1] != null) { -var c = new Array (this.alignedCodons.length + 10); -System.arraycopy (this.alignedCodons, 0, c, 0, this.alignedCodons.length); -this.alignedCodons = c; -}}); -c$.transferCodedFeatures = Clazz.defineMethod (c$, "transferCodedFeatures", -($fz = function (dna, pep, map, featureTypes, featureGroups) { -var sfs = dna.getSequenceFeatures (); -var fgstate; -var dnarefs = jalview.util.DBRefUtils.selectRefs (dna.getDBRef (), jalview.datamodel.DBRefSource.DNACODINGDBS); -if (dnarefs != null) { -for (var d = 0; d < dnarefs.length; d++) { -var mp = dnarefs[d].getMap (); -if (mp != null) { -}} -}if (sfs != null) { -for (var sf, $sf = 0, $$sf = sfs; $sf < $$sf.length && ((sf = $$sf[$sf]) || true); $sf++) { -fgstate = (featureGroups == null) ? null : featureGroups.get (sf.featureGroup); -if ((featureTypes == null || featureTypes.containsKey (sf.getType ())) && (fgstate == null || fgstate.booleanValue ())) { -if (jalview.datamodel.FeatureProperties.isCodingFeature (null, sf.getType ())) { -{ -}}}} -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,jalview.util.MapList,java.util.Map,java.util.Map"); -Clazz.defineStatics (c$, -"STOP_X", "X"); -c$.comparator = c$.prototype.comparator = new jalview.analysis.CodonComparator (); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (["jalview.analysis.CodonComparator"], "jalview.analysis.Dna", ["jalview.datamodel.AlignedCodon", "$.AlignedCodonFrame", "$.Alignment", "$.AlignmentAnnotation", "$.Annotation", "$.DBRefSource", "$.FeatureProperties", "$.GraphLine", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "$.DBRefUtils", "$.MapList", "$.ShiftList", "java.lang.IllegalStateException", "$.StringBuilder", "java.util.ArrayList", "$.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.selection = null; +this.seqstring = null; +this.contigs = null; +this.gapChar = '\0'; +this.annotations = null; +this.dnaWidth = 0; +this.dataset = null; +this.aaWidth = 0; +this.alignedCodons = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "Dna"); +Clazz.makeConstructor (c$, +function (viewport, visibleContigs) { +this.selection = java.util.Arrays.asList (viewport.getSequenceSelection ()); +this.seqstring = viewport.getViewAsString (true); +this.contigs = visibleContigs; +this.gapChar = viewport.getGapCharacter (); +this.annotations = viewport.getAlignment ().getAlignmentAnnotation (); +this.dnaWidth = viewport.getAlignment ().getWidth (); +this.dataset = viewport.getAlignment ().getDataset (); +}, "jalview.api.AlignViewportI,~A"); +c$.compareCodonPos = Clazz.defineMethod (c$, "compareCodonPos", +function (ac1, ac2) { +return jalview.analysis.Dna.comparator.compare (ac1, ac2); +}, "jalview.datamodel.AlignedCodon,jalview.datamodel.AlignedCodon"); +Clazz.defineMethod (c$, "translateCdna", +function () { +var acf = new jalview.datamodel.AlignedCodonFrame (); +this.alignedCodons = new Array (this.dnaWidth); +var s; +var sSize = this.selection.size (); +var pepseqs = new java.util.ArrayList (); +for (s = 0; s < sSize; s++) { +var newseq = this.translateCodingRegion (this.selection.get (s), this.seqstring[s], acf, pepseqs); +if (newseq != null) { +pepseqs.add (newseq); +var ds = newseq; +if (this.dataset != null) { +while (ds.getDatasetSequence () != null) { +ds = ds.getDatasetSequence (); +} +this.dataset.addSequence (ds); +}}} +var newseqs = pepseqs.toArray ( new Array (pepseqs.size ())); +var al = new jalview.datamodel.Alignment (newseqs); +al.padGaps (); +al.setDataset (this.dataset); +this.translateAlignedAnnotations (al, acf); +al.addCodonFrame (acf); +return al; +}); +c$.canTranslate = Clazz.defineMethod (c$, "canTranslate", +function (selection, viscontigs) { +for (var gd = 0; gd < selection.length; gd++) { +var dna = selection[gd]; +var dnarefs = jalview.util.DBRefUtils.selectRefs (dna.getDBRef (), jalview.datamodel.DBRefSource.DNACODINGDBS); +if (dnarefs != null) { +var mappedrefs = new java.util.ArrayList (); +var refs = dna.getDBRef (); +for (var d = 0; d < refs.length; d++) { +if (refs[d].getMap () != null && refs[d].getMap ().getMap () != null && refs[d].getMap ().getMap ().getFromRatio () == 3 && refs[d].getMap ().getMap ().getToRatio () == 1) { +mappedrefs.add (refs[d]); +}} +dnarefs = mappedrefs.toArray ( new Array (mappedrefs.size ())); +for (var d = 0; d < dnarefs.length; d++) { +var mp = dnarefs[d].getMap (); +if (mp != null) { +for (var vc = 0; vc < viscontigs.length; vc += 2) { +var mpr = mp.locateMappedRange (viscontigs[vc], viscontigs[vc + 1]); +if (mpr != null) { +return true; +}} +}} +}} +return false; +}, "~A,~A"); +Clazz.defineMethod (c$, "translateAlignedAnnotations", +function (al, acf) { +if (this.annotations != null) { +for (var annotation, $annotation = 0, $$annotation = this.annotations; $annotation < $$annotation.length && ((annotation = $$annotation[$annotation]) || true); $annotation++) { +if (annotation.autoCalculated || !annotation.visible || annotation.isRNA ()) { +continue; +}var aSize = this.aaWidth; +var anots = (annotation.annotations == null) ? null : new Array (aSize); +if (anots != null) { +for (var a = 0; a < aSize; a++) { +if (a < this.alignedCodons.length && this.alignedCodons[a] != null && this.alignedCodons[a].pos1 == (this.alignedCodons[a].pos3 - 2)) { +anots[a] = jalview.analysis.Dna.getCodonAnnotation (this.alignedCodons[a], annotation.annotations); +}} +}var aa = new jalview.datamodel.AlignmentAnnotation (annotation.label, annotation.description, anots); +aa.graph = annotation.graph; +aa.graphGroup = annotation.graphGroup; +aa.graphHeight = annotation.graphHeight; +if (annotation.getThreshold () != null) { +aa.setThreshold ( new jalview.datamodel.GraphLine (annotation.getThreshold ())); +}if (annotation.$hasScore) { +aa.setScore (annotation.getScore ()); +}var seqRef = annotation.sequenceRef; +if (seqRef != null) { +var aaSeq = acf.getAaForDnaSeq (seqRef); +if (aaSeq != null) { +aa.setSequenceRef (aaSeq); +aa.createSequenceMapping (aaSeq, aaSeq.getStart (), true); +aa.adjustForAlignment (); +aaSeq.addAlignmentAnnotation (aa); +}}al.addAnnotation (aa); +} +}}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignedCodonFrame"); +c$.getCodonAnnotation = Clazz.defineMethod (c$, "getCodonAnnotation", +($fz = function (is, annotations) { +var contrib = 0; +var annot = null; +for (var p = 1; p <= 3; p++) { +var dnaCol = is.getBaseColumn (p); +if (annotations[dnaCol] != null) { +if (annot == null) { +annot = new jalview.datamodel.Annotation (annotations[dnaCol]); +contrib = 1; +} else { +var cpy = new jalview.datamodel.Annotation (annotations[dnaCol]); +if (annot.colour == null) { +annot.colour = cpy.colour; +}if (annot.description == null || annot.description.length == 0) { +annot.description = cpy.description; +}if (annot.displayCharacter == null) { +annot.displayCharacter = cpy.displayCharacter; +}if (annot.secondaryStructure.charCodeAt (0) == 0) { +annot.secondaryStructure = cpy.secondaryStructure; +}annot.value += cpy.value; +contrib++; +}}} +if (contrib > 1) { +annot.value /= contrib; +}return annot; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignedCodon,~A"); +Clazz.defineMethod (c$, "translateCodingRegion", +function (selection, seqstring, acf, proteinSeqs) { +var skip = new java.util.ArrayList (); +var skipint = null; +var vismapping = new jalview.util.ShiftList (); +var vc; +var scontigs = Clazz.newIntArray (this.contigs.length, 0); +var npos = 0; +for (vc = 0; vc < this.contigs.length; vc += 2) { +if (vc == 0) { +vismapping.addShift (npos, this.contigs[vc]); +} else { +vismapping.addShift (npos, this.contigs[vc] - this.contigs[vc - 1] + 1); +}scontigs[vc] = this.contigs[vc]; +scontigs[vc + 1] = this.contigs[vc + 1]; +} +var protein = new StringBuilder (Clazz.doubleToInt (seqstring.length / 2)); +var seq = seqstring.$replace ('U', 'T').$replace ('u', 'T'); +var codon = Clazz.newCharArray (3, '\0'); +var cdp = Clazz.newIntArray (3, 0); +var rf = 0; +var lastnpos = 0; +var nend; +var aspos = 0; +var resSize = 0; +for (npos = 0, nend = seq.length; npos < nend; npos++) { +if (!jalview.util.Comparison.isGap (seq.charAt (npos))) { +cdp[rf] = npos; +codon[rf++] = seq.charAt (npos); +}if (rf == 3) { +var alignedCodon = new jalview.datamodel.AlignedCodon (cdp[0], cdp[1], cdp[2]); +var aa = jalview.schemes.ResidueProperties.codonTranslate ( String.instantialize (codon)); +rf = 0; +var gapString = String.valueOf (this.gapChar); +if (aa == null) { +aa = gapString; +if (skipint == null) { +skipint = Clazz.newIntArray (-1, [alignedCodon.pos1, alignedCodon.pos3]); +}skipint[1] = alignedCodon.pos3; +} else { +if (skipint != null) { +skipint[0] = vismapping.shift (skipint[0]); +skipint[1] = vismapping.shift (skipint[1]); +for (vc = 0; vc < scontigs.length; ) { +if (scontigs[vc + 1] < skipint[0]) { +vc += 2; +continue; +}if (scontigs[vc] > skipint[1]) { +break; +}var t; +if (scontigs[vc] <= skipint[0]) { +if (skipint[0] == scontigs[vc]) { +if (scontigs[vc + 1] > skipint[1]) { +scontigs[vc] = skipint[1]; +vc += 2; +} else { +if (scontigs[vc + 1] == skipint[1]) { +t = Clazz.newIntArray (scontigs.length - 2, 0); +if (vc > 0) { +System.arraycopy (scontigs, 0, t, 0, vc - 1); +}if (vc + 2 < t.length) { +System.arraycopy (scontigs, vc + 2, t, vc, t.length - vc + 2); +}scontigs = t; +} else { +scontigs[vc + 1] = skipint[0] - 1; +vc += 2; +}}} else { +if (scontigs[vc + 1] < skipint[1]) { +scontigs[vc + 1] = skipint[0] - 1; +vc += 2; +} else { +t = Clazz.newIntArray (scontigs.length + 2, 0); +System.arraycopy (scontigs, 0, t, 0, vc + 1); +t[vc + 1] = skipint[0]; +t[vc + 2] = skipint[1]; +System.arraycopy (scontigs, vc + 1, t, vc + 3, scontigs.length - (vc + 1)); +scontigs = t; +vc += 4; +}}}} +skip.add (skipint); +skipint = null; +}if (aa.equals ("STOP")) { +aa = "X"; +}resSize++; +}var findpos = true; +while (findpos) { +var compareCodonPos = jalview.analysis.Dna.compareCodonPos (alignedCodon, this.alignedCodons[aspos]); +switch (compareCodonPos) { +case -1: +this.insertAAGap (aspos, proteinSeqs); +findpos = false; +break; +case 1: +aa = gapString + aa; +aspos++; +break; +case 0: +findpos = false; +} +} +protein.append (aa); +lastnpos = npos; +if (this.alignedCodons[aspos] == null) { +this.alignedCodons[aspos] = alignedCodon; +} else if (!this.alignedCodons[aspos].equals (alignedCodon)) { +throw new IllegalStateException ("Tried to coalign " + this.alignedCodons[aspos].toString () + " with " + alignedCodon.toString ()); +}if (aspos >= this.aaWidth) { +this.aaWidth = aspos; +}aspos++; +}} +if (resSize > 0) { +var newseq = new jalview.datamodel.Sequence (selection.getName (), protein.toString ()); +if (rf != 0) { +var errMsg = "trimming contigs for incomplete terminal codon."; +System.err.println ("trimming contigs for incomplete terminal codon."); +vc = scontigs.length - 1; +lastnpos = vismapping.shift (lastnpos); +while (vc >= 0 && scontigs[vc] > lastnpos) { +if (vc > 0 && scontigs[vc - 1] > lastnpos) { +vc -= 2; +} else { +scontigs[vc] = lastnpos; +}} +if (vc > 0 && (vc + 1) < scontigs.length) { +var t = Clazz.newIntArray (vc + 1, 0); +System.arraycopy (scontigs, 0, t, 0, vc + 1); +scontigs = t; +}if (vc <= 0) { +scontigs = null; +}}if (scontigs != null) { +npos = 0; +for (vc = 0; vc < scontigs.length; vc += 2) { +scontigs[vc] = selection.findPosition (scontigs[vc]); +scontigs[vc + 1] = selection.findPosition (scontigs[vc + 1]); +if (scontigs[vc + 1] == selection.getEnd ()) { +break; +}} +if ((vc + 2) < scontigs.length) { +var t = Clazz.newIntArray (vc + 2, 0); +System.arraycopy (scontigs, 0, t, 0, vc + 2); +scontigs = t; +}var map = new jalview.util.MapList (scontigs, Clazz.newIntArray (-1, [1, resSize]), 3, 1); +jalview.analysis.Dna.transferCodedFeatures (selection, newseq, map, null, null); +var rseq = newseq.deriveSequence (); +acf.addMap (selection, rseq, map); +return rseq; +}}return null; +}, "jalview.datamodel.SequenceI,~S,jalview.datamodel.AlignedCodonFrame,java.util.List"); +Clazz.defineMethod (c$, "insertAAGap", +function (pos, proteinSeqs) { +this.aaWidth++; +for (var seq, $seq = proteinSeqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +seq.insertCharAt (pos, this.gapChar); +} +this.checkCodonFrameWidth (); +if (pos < this.aaWidth) { +this.aaWidth++; +System.arraycopy (this.alignedCodons, pos, this.alignedCodons, pos + 1, this.alignedCodons.length - pos - 1); +this.alignedCodons[pos] = null; +}}, "~N,java.util.List"); +Clazz.defineMethod (c$, "checkCodonFrameWidth", +function () { +if (this.alignedCodons[this.alignedCodons.length - 1] != null) { +var c = new Array (this.alignedCodons.length + 10); +System.arraycopy (this.alignedCodons, 0, c, 0, this.alignedCodons.length); +this.alignedCodons = c; +}}); +c$.transferCodedFeatures = Clazz.defineMethod (c$, "transferCodedFeatures", +($fz = function (dna, pep, map, featureTypes, featureGroups) { +var sfs = dna.getSequenceFeatures (); +var fgstate; +var dnarefs = jalview.util.DBRefUtils.selectRefs (dna.getDBRef (), jalview.datamodel.DBRefSource.DNACODINGDBS); +if (dnarefs != null) { +for (var d = 0; d < dnarefs.length; d++) { +var mp = dnarefs[d].getMap (); +if (mp != null) { +}} +}if (sfs != null) { +for (var sf, $sf = 0, $$sf = sfs; $sf < $$sf.length && ((sf = $$sf[$sf]) || true); $sf++) { +fgstate = (featureGroups == null) ? null : featureGroups.get (sf.featureGroup); +if ((featureTypes == null || featureTypes.containsKey (sf.getType ())) && (fgstate == null || fgstate.booleanValue ())) { +if (jalview.datamodel.FeatureProperties.isCodingFeature (null, sf.getType ())) { +{ +}}}} +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,jalview.util.MapList,java.util.Map,java.util.Map"); +Clazz.defineStatics (c$, +"STOP_X", "X"); +c$.comparator = c$.prototype.comparator = new jalview.analysis.CodonComparator (); +}); diff --git a/bin/jalview/analysis/Finder.class b/bin/jalview/analysis/Finder.class index ec046f261ebf39f2bc95135e13eb8b93761244f6..36486140ab477602f105acb810062d886399fbad 100644 GIT binary patch delta 29 lcmcbre?@;oJ}={w%>}%Atjt>(#3wHl(qm-bd{Kyn6#%2K31$EQ delta 30 mcmcbje^q}&J}=|b%>}%AtjyaOBqlEu(qm#_+I&HXg%tp+q6ugK diff --git a/bin/jalview/analysis/Finder.js b/bin/jalview/analysis/Finder.js index cf1d8f9..5d20c2c 100644 --- a/bin/jalview/analysis/Finder.js +++ b/bin/jalview/analysis/Finder.js @@ -1,182 +1,182 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.Finder", ["jalview.datamodel.SearchResults", "jalview.jsdev.RegExp", "jalview.util.Comparison", "java.lang.StringBuffer", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.searchResults = null; -this.alignment = null; -this.selection = null; -this.idMatch = null; -this.caseSensitive = false; -this.includeDescription = false; -this.findAll = false; -this.regex = null; -this.seqIndex = 0; -this.resIndex = -1; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "Finder"); -Clazz.makeConstructor (c$, -function (alignment, selection) { -this.alignment = alignment; -this.selection = selection; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); -Clazz.makeConstructor (c$, -function (alignment, selectionGroup, seqIndex, resIndex) { -this.construct (alignment, selectionGroup); -this.seqIndex = seqIndex; -this.resIndex = resIndex; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup,~N,~N"); -Clazz.defineMethod (c$, "find", -function (searchString) { -var hasResults = false; -if (!this.caseSensitive) { -searchString = searchString.toUpperCase (); -}this.regex = jalview.jsdev.RegExp.newRegex ([searchString]); -this.regex.setIgnoreCase (!this.caseSensitive); -this.searchResults = new jalview.datamodel.SearchResults (); -this.idMatch = new java.util.Vector (); -var seq; -var item = null; -var found = false; -var end = this.alignment.getHeight (); -if (this.selection != null) { -if ((this.selection.getSize () < 1) || ((this.selection.getEndRes () - this.selection.getStartRes ()) < 2)) { -this.selection = null; -}}while (!found && (this.seqIndex < end)) { -seq = this.alignment.getSequenceAt (this.seqIndex); -if ((this.selection != null && this.selection.getSize () > 0) && !this.selection.getSequences (null).contains (seq)) { -this.seqIndex++; -this.resIndex = -1; -continue; -}if (this.resIndex < 0) { -this.resIndex = 0; -try { -var res = Integer.parseInt (searchString); -if (seq.getEnd () >= res) { -this.searchResults.addResult (seq, res, res); -hasResults = true; -if (!this.findAll) { -found = true; -break; -}}} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -if (this.regex.search (seq.getName ())) { -this.idMatch.addElement (seq); -hasResults = true; -if (!this.findAll) { -found = true; -break; -}}if (this.isIncludeDescription () && seq.getDescription () != null && this.regex.search (seq.getDescription ())) { -this.idMatch.addElement (seq); -hasResults = true; -if (!this.findAll) { -found = true; -break; -}}}item = seq.getSequenceAsString (); -if ((this.selection != null) && (this.selection.getEndRes () < this.alignment.getWidth () - 1)) { -item = item.substring (0, this.selection.getEndRes () + 1); -}var noGapsSB = new StringBuffer (); -var insertCount = 0; -var spaces = new java.util.Vector (); -for (var j = 0; j < item.length; j++) { -if (!jalview.util.Comparison.isGap (item.charAt (j))) { -noGapsSB.append (item.charAt (j)); -spaces.addElement ( new Integer (insertCount)); -} else { -insertCount++; -}} -var noGaps = noGapsSB.toString (); -for (var r = this.resIndex; r < noGaps.length; r++) { -if (this.regex.searchFrom (noGaps, r)) { -this.resIndex = this.regex.matchedFrom (); -if ((this.selection != null && this.selection.getSize () > 0) && ((this.resIndex + Integer.parseInt (spaces.elementAt (this.resIndex).toString ())) < this.selection.getStartRes ())) { -continue; -}var sres = seq.findPosition (this.resIndex + Integer.parseInt (spaces.elementAt (this.resIndex).toString ())); -var eres = seq.findPosition (this.regex.matchedTo () - 1 + Integer.parseInt (spaces.elementAt (this.regex.matchedTo () - 1).toString ())); -this.searchResults.addResult (seq, sres, eres); -hasResults = true; -if (!this.findAll) { -found = true; -this.resIndex++; -break; -}r = this.resIndex; -} else { -break; -}} -if (!found) { -this.seqIndex++; -this.resIndex = -1; -}} -return hasResults; -}, "~S"); -Clazz.defineMethod (c$, "getAlignment", -function () { -return this.alignment; -}); -Clazz.defineMethod (c$, "setAlignment", -function (alignment) { -this.alignment = alignment; -}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "isCaseSensitive", -function () { -return this.caseSensitive; -}); -Clazz.defineMethod (c$, "setCaseSensitive", -function (caseSensitive) { -this.caseSensitive = caseSensitive; -}, "~B"); -Clazz.defineMethod (c$, "isFindAll", -function () { -return this.findAll; -}); -Clazz.defineMethod (c$, "setFindAll", -function (findAll) { -this.findAll = findAll; -}, "~B"); -Clazz.defineMethod (c$, "getSelection", -function () { -return this.selection; -}); -Clazz.defineMethod (c$, "setSelection", -function (selection) { -this.selection = selection; -}, "jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "getIdMatch", -function () { -return this.idMatch; -}); -Clazz.defineMethod (c$, "getRegex", -function () { -return this.regex; -}); -Clazz.defineMethod (c$, "getSearchResults", -function () { -return this.searchResults; -}); -Clazz.defineMethod (c$, "getResIndex", -function () { -return this.resIndex; -}); -Clazz.defineMethod (c$, "setResIndex", -function (resIndex) { -this.resIndex = resIndex; -}, "~N"); -Clazz.defineMethod (c$, "getSeqIndex", -function () { -return this.seqIndex; -}); -Clazz.defineMethod (c$, "setSeqIndex", -function (seqIndex) { -this.seqIndex = seqIndex; -}, "~N"); -Clazz.defineMethod (c$, "isIncludeDescription", -function () { -return this.includeDescription; -}); -Clazz.defineMethod (c$, "setIncludeDescription", -function (includeDescription) { -this.includeDescription = includeDescription; -}, "~B"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.Finder", ["jalview.datamodel.SearchResults", "jalview.jsdev.RegExp", "jalview.util.Comparison", "java.lang.StringBuffer", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.searchResults = null; +this.alignment = null; +this.selection = null; +this.idMatch = null; +this.caseSensitive = false; +this.includeDescription = false; +this.findAll = false; +this.regex = null; +this.seqIndex = 0; +this.resIndex = -1; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "Finder"); +Clazz.makeConstructor (c$, +function (alignment, selection) { +this.alignment = alignment; +this.selection = selection; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); +Clazz.makeConstructor (c$, +function (alignment, selectionGroup, seqIndex, resIndex) { +this.construct (alignment, selectionGroup); +this.seqIndex = seqIndex; +this.resIndex = resIndex; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup,~N,~N"); +Clazz.defineMethod (c$, "find", +function (searchString) { +var hasResults = false; +if (!this.caseSensitive) { +searchString = searchString.toUpperCase (); +}this.regex = jalview.jsdev.RegExp.newRegex ([searchString]); +this.regex.setIgnoreCase (!this.caseSensitive); +this.searchResults = new jalview.datamodel.SearchResults (); +this.idMatch = new java.util.Vector (); +var seq; +var item = null; +var found = false; +var end = this.alignment.getHeight (); +if (this.selection != null) { +if ((this.selection.getSize () < 1) || ((this.selection.getEndRes () - this.selection.getStartRes ()) < 2)) { +this.selection = null; +}}while (!found && (this.seqIndex < end)) { +seq = this.alignment.getSequenceAt (this.seqIndex); +if ((this.selection != null && this.selection.getSize () > 0) && !this.selection.getSequences (null).contains (seq)) { +this.seqIndex++; +this.resIndex = -1; +continue; +}if (this.resIndex < 0) { +this.resIndex = 0; +try { +var res = Integer.parseInt (searchString); +if (seq.getEnd () >= res) { +this.searchResults.addResult (seq, res, res); +hasResults = true; +if (!this.findAll) { +found = true; +break; +}}} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +if (this.regex.search (seq.getName ())) { +this.idMatch.addElement (seq); +hasResults = true; +if (!this.findAll) { +found = true; +break; +}}if (this.isIncludeDescription () && seq.getDescription () != null && this.regex.search (seq.getDescription ())) { +this.idMatch.addElement (seq); +hasResults = true; +if (!this.findAll) { +found = true; +break; +}}}item = seq.getSequenceAsString (); +if ((this.selection != null) && (this.selection.getEndRes () < this.alignment.getWidth () - 1)) { +item = item.substring (0, this.selection.getEndRes () + 1); +}var noGapsSB = new StringBuffer (); +var insertCount = 0; +var spaces = new java.util.Vector (); +for (var j = 0; j < item.length; j++) { +if (!jalview.util.Comparison.isGap (item.charAt (j))) { +noGapsSB.append (item.charAt (j)); +spaces.addElement ( new Integer (insertCount)); +} else { +insertCount++; +}} +var noGaps = noGapsSB.toString (); +for (var r = this.resIndex; r < noGaps.length; r++) { +if (this.regex.searchFrom (noGaps, r)) { +this.resIndex = this.regex.matchedFrom (); +if ((this.selection != null && this.selection.getSize () > 0) && ((this.resIndex + Integer.parseInt (spaces.elementAt (this.resIndex).toString ())) < this.selection.getStartRes ())) { +continue; +}var sres = seq.findPosition (this.resIndex + Integer.parseInt (spaces.elementAt (this.resIndex).toString ())); +var eres = seq.findPosition (this.regex.matchedTo () - 1 + Integer.parseInt (spaces.elementAt (this.regex.matchedTo () - 1).toString ())); +this.searchResults.addResult (seq, sres, eres); +hasResults = true; +if (!this.findAll) { +found = true; +this.resIndex++; +break; +}r = this.resIndex; +} else { +break; +}} +if (!found) { +this.seqIndex++; +this.resIndex = -1; +}} +return hasResults; +}, "~S"); +Clazz.defineMethod (c$, "getAlignment", +function () { +return this.alignment; +}); +Clazz.defineMethod (c$, "setAlignment", +function (alignment) { +this.alignment = alignment; +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "isCaseSensitive", +function () { +return this.caseSensitive; +}); +Clazz.defineMethod (c$, "setCaseSensitive", +function (caseSensitive) { +this.caseSensitive = caseSensitive; +}, "~B"); +Clazz.defineMethod (c$, "isFindAll", +function () { +return this.findAll; +}); +Clazz.defineMethod (c$, "setFindAll", +function (findAll) { +this.findAll = findAll; +}, "~B"); +Clazz.defineMethod (c$, "getSelection", +function () { +return this.selection; +}); +Clazz.defineMethod (c$, "setSelection", +function (selection) { +this.selection = selection; +}, "jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "getIdMatch", +function () { +return this.idMatch; +}); +Clazz.defineMethod (c$, "getRegex", +function () { +return this.regex; +}); +Clazz.defineMethod (c$, "getSearchResults", +function () { +return this.searchResults; +}); +Clazz.defineMethod (c$, "getResIndex", +function () { +return this.resIndex; +}); +Clazz.defineMethod (c$, "setResIndex", +function (resIndex) { +this.resIndex = resIndex; +}, "~N"); +Clazz.defineMethod (c$, "getSeqIndex", +function () { +return this.seqIndex; +}); +Clazz.defineMethod (c$, "setSeqIndex", +function (seqIndex) { +this.seqIndex = seqIndex; +}, "~N"); +Clazz.defineMethod (c$, "isIncludeDescription", +function () { +return this.includeDescription; +}); +Clazz.defineMethod (c$, "setIncludeDescription", +function (includeDescription) { +this.includeDescription = includeDescription; +}, "~B"); +}); diff --git a/bin/jalview/analysis/Grouping.js b/bin/jalview/analysis/Grouping.js index 60e2571..49d4004 100644 --- a/bin/jalview/analysis/Grouping.js +++ b/bin/jalview/analysis/Grouping.js @@ -1,88 +1,88 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.Grouping", ["jalview.datamodel.SequenceGroup", "java.lang.StringBuilder", "java.util.ArrayList", "$.HashMap"], function () { -c$ = Clazz.declareType (jalview.analysis, "Grouping"); -c$.makeGroupsFrom = Clazz.defineMethod (c$, "makeGroupsFrom", -function (sequences, selectedChars, list) { -var gps = new java.util.HashMap (); -var width = 0; -var i; -var pgroup = new java.util.HashMap (); -if (list != null) { -for (var sg, $sg = list.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -for (var sq, $sq = sg.getSequences (null).iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -pgroup.put (sq.toString (), sg); -} -} -}for (i = 0; i < sequences.length; i++) { -var schar = selectedChars[i]; -var pgp = pgroup.get ((sequences[i]).toString ()); -if (pgp != null) { -schar = pgp.getName () + ":" + schar; -}var svec = gps.get (schar); -if (svec == null) { -svec = new java.util.ArrayList (); -gps.put (schar, svec); -}if (width < sequences[i].getLength ()) { -width = sequences[i].getLength (); -}svec.add (sequences[i]); -} -var groups = new Array (gps.size ()); -i = 0; -for (var key, $key = gps.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { -var group = new jalview.datamodel.SequenceGroup (gps.get (key), "Subseq: " + key, null, true, true, false, 0, width - 1); -groups[i++] = group; -} -gps.clear (); -pgroup.clear (); -return groups; -}, "~A,~A,java.util.List"); -c$.makeGroupsFromCols = Clazz.defineMethod (c$, "makeGroupsFromCols", -function (sequences, cs, list) { -var gps = new java.util.HashMap (); -var pgroup = new java.util.HashMap (); -if (list != null) { -for (var sg, $sg = list.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -for (var sq, $sq = sg.getSequences (null).iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -pgroup.put (sq.toString (), sg); -} -} -}var spos = Clazz.newIntArray (cs.getSelected ().size (), 0); -var width = -1; -var i = 0; -for (var pos, $pos = cs.getSelected ().iterator (); $pos.hasNext () && ((pos = $pos.next ()) || true);) { -spos[i++] = pos.intValue (); -} -;for (i = 0; i < sequences.length; i++) { -var slen = sequences[i].getLength (); -if (width < slen) { -width = slen; -}var pgp = pgroup.get ((sequences[i]).toString ()); -var schar = new StringBuilder (); -if (pgp != null) { -schar.append (pgp.getName () + ":"); -}for (var p, $p = 0, $$p = spos; $p < $$p.length && ((p = $$p[$p]) || true); $p++) { -if (p >= slen) { -schar.append ("~"); -} else { -schar.append (sequences[i].getCharAt (p)); -}} -var svec = gps.get (schar.toString ()); -if (svec == null) { -svec = new java.util.ArrayList (); -gps.put (schar.toString (), svec); -}svec.add (sequences[i]); -} -var groups = new Array (gps.size ()); -i = 0; -for (var key, $key = gps.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { -var group = new jalview.datamodel.SequenceGroup (gps.get (key), "Subseq: " + key, null, true, true, false, 0, width - 1); -groups[i++] = group; -} -gps.clear (); -pgroup.clear (); -return groups; -}, "~A,jalview.datamodel.ColumnSelection,java.util.List"); -c$.divideByFeature = Clazz.defineMethod (c$, "divideByFeature", -function (featureLabels, groupLabels, start, stop, sequences, exgroups, method) { -}, "~A,~A,~N,~N,~A,java.util.Vector,~S"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.Grouping", ["jalview.datamodel.SequenceGroup", "java.lang.StringBuilder", "java.util.ArrayList", "$.HashMap"], function () { +c$ = Clazz.declareType (jalview.analysis, "Grouping"); +c$.makeGroupsFrom = Clazz.defineMethod (c$, "makeGroupsFrom", +function (sequences, selectedChars, list) { +var gps = new java.util.HashMap (); +var width = 0; +var i; +var pgroup = new java.util.HashMap (); +if (list != null) { +for (var sg, $sg = list.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +for (var sq, $sq = sg.getSequences (null).iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +pgroup.put (sq.toString (), sg); +} +} +}for (i = 0; i < sequences.length; i++) { +var schar = selectedChars[i]; +var pgp = pgroup.get ((sequences[i]).toString ()); +if (pgp != null) { +schar = pgp.getName () + ":" + schar; +}var svec = gps.get (schar); +if (svec == null) { +svec = new java.util.ArrayList (); +gps.put (schar, svec); +}if (width < sequences[i].getLength ()) { +width = sequences[i].getLength (); +}svec.add (sequences[i]); +} +var groups = new Array (gps.size ()); +i = 0; +for (var key, $key = gps.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { +var group = new jalview.datamodel.SequenceGroup (gps.get (key), "Subseq: " + key, null, true, true, false, 0, width - 1); +groups[i++] = group; +} +gps.clear (); +pgroup.clear (); +return groups; +}, "~A,~A,java.util.List"); +c$.makeGroupsFromCols = Clazz.defineMethod (c$, "makeGroupsFromCols", +function (sequences, cs, list) { +var gps = new java.util.HashMap (); +var pgroup = new java.util.HashMap (); +if (list != null) { +for (var sg, $sg = list.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +for (var sq, $sq = sg.getSequences (null).iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +pgroup.put (sq.toString (), sg); +} +} +}var spos = Clazz.newIntArray (cs.getSelected ().size (), 0); +var width = -1; +var i = 0; +for (var pos, $pos = cs.getSelected ().iterator (); $pos.hasNext () && ((pos = $pos.next ()) || true);) { +spos[i++] = pos.intValue (); +} +;for (i = 0; i < sequences.length; i++) { +var slen = sequences[i].getLength (); +if (width < slen) { +width = slen; +}var pgp = pgroup.get ((sequences[i]).toString ()); +var schar = new StringBuilder (); +if (pgp != null) { +schar.append (pgp.getName () + ":"); +}for (var p, $p = 0, $$p = spos; $p < $$p.length && ((p = $$p[$p]) || true); $p++) { +if (p >= slen) { +schar.append ("~"); +} else { +schar.append (sequences[i].getCharAt (p)); +}} +var svec = gps.get (schar.toString ()); +if (svec == null) { +svec = new java.util.ArrayList (); +gps.put (schar.toString (), svec); +}svec.add (sequences[i]); +} +var groups = new Array (gps.size ()); +i = 0; +for (var key, $key = gps.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { +var group = new jalview.datamodel.SequenceGroup (gps.get (key), "Subseq: " + key, null, true, true, false, 0, width - 1); +groups[i++] = group; +} +gps.clear (); +pgroup.clear (); +return groups; +}, "~A,jalview.datamodel.ColumnSelection,java.util.List"); +c$.divideByFeature = Clazz.defineMethod (c$, "divideByFeature", +function (featureLabels, groupLabels, start, stop, sequences, exgroups, method) { +}, "~A,~A,~N,~N,~A,java.util.Vector,~S"); +}); diff --git a/bin/jalview/analysis/NJTree.class b/bin/jalview/analysis/NJTree.class index d31a891843a3869626643b486c92df5e15b8ae5a..b64f07aea0f1bf3754815608ae0f2b63aa064760 100644 GIT binary patch delta 81 zcmV-X0IvV#f8l?ysT%>Wv#J|M0tROQ1^)n>lRh3ClM@~$0SvP{9>^5|wvz-jumuGG n0|h9vx-`@W0e-WOJZ%9F5C8`S`~Wov0DbxZ7Ag+24L;ZbXl5Am delta 85 zcmV-b0IL7tf8~F$sT%>Xv#J|M0tRRR2LAw?lRX|BlM@~$0to`MIv&Us0k@L_G_VE+ r00adk0<*X@)CU28vyD7$0TB`a2?hKBH3tBF`T!FGDhmR$2|m~Xu=p7C diff --git a/bin/jalview/analysis/NJTree.js b/bin/jalview/analysis/NJTree.js index 24a8fc5..8f3a367 100644 --- a/bin/jalview/analysis/NJTree.js +++ b/bin/jalview/analysis/NJTree.js @@ -1,577 +1,577 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (["java.util.Vector"], ["jalview.analysis.Cluster", "$.NJTree"], ["jalview.analysis.SequenceIdMatcher", "jalview.datamodel.AlignmentView", "$.CigarArray", "$.NodeTransformI", "$.SeqCigar", "$.Sequence", "$.SequenceI", "$.SequenceNode", "jalview.io.NewickFile", "jalview.schemes.ResidueProperties", "jalview.util.Format", "java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.$cluster = null; -this.sequence = null; -this.seqData = null; -this.done = null; -this.noseqs = 0; -this.noClus = 0; -this.distance = null; -this.mini = 0; -this.minj = 0; -this.ri = 0; -this.rj = 0; -this.groups = null; -this.maxdist = null; -this.top = null; -this.maxDistValue = 0; -this.maxheight = 0; -this.ycount = 0; -this.node = null; -this.type = null; -this.pwtype = null; -this.found = null; -this.leaves = null; -this.hasDistances = true; -this.hasBootstrap = false; -this.hasRootDistance = true; -this._lycount = 0; -this._lylimit = 0; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "NJTree"); -Clazz.prepareFields (c$, function () { -this.groups = new java.util.Vector (); -}); -Clazz.makeConstructor (c$, -function (seqs, odata, treefile) { -this.construct (seqs, treefile); -if (odata != null) { -this.seqData = odata; -}}, "~A,jalview.datamodel.AlignmentView,jalview.io.NewickFile"); -Clazz.makeConstructor (c$, -function (seqs, treefile) { -this.sequence = seqs; -this.top = treefile.getTree (); -this.hasDistances = treefile.HasDistances (); -this.hasBootstrap = treefile.HasBootstrap (); -this.hasRootDistance = treefile.HasRootDistance (); -this.maxheight = this.findHeight (this.top); -var algnIds = new jalview.analysis.SequenceIdMatcher (seqs); -var leaves = new java.util.Vector (); -this.findLeaves (this.top, leaves); -var i = 0; -var namesleft = seqs.length; -var j; -var nam; -var realnam; -var one2many = new java.util.Vector (); -var countOne2Many = 0; -while (i < leaves.size ()) { -j = leaves.elementAt (i++); -realnam = j.getName (); -nam = null; -if (namesleft > -1) { -nam = algnIds.findIdMatch (realnam); -}if (nam != null) { -j.setElement (nam); -if (one2many.contains (nam)) { -countOne2Many++; -} else { -one2many.addElement (nam); -namesleft--; -}} else { -j.setElement ( new jalview.datamodel.Sequence (realnam, "THISISAPLACEHLDER")); -j.setPlaceholder (true); -}} -}, "~A,jalview.io.NewickFile"); -Clazz.makeConstructor (c$, -function (sequence, seqData, type, pwtype, sm, start, end) { -this.sequence = sequence; -this.node = new java.util.Vector (); -this.type = type; -this.pwtype = pwtype; -if (seqData != null) { -this.seqData = seqData; -} else { -var seqs = new Array (sequence.length); -for (var i = 0; i < sequence.length; i++) { -seqs[i] = new jalview.datamodel.SeqCigar (sequence[i], start, end); -} -var sdata = new jalview.datamodel.CigarArray (seqs); -sdata.addOperation ('M', end - start + 1); -this.seqData = new jalview.datamodel.AlignmentView (sdata, start); -}if (!(type.equals ("NJ"))) { -type = "AV"; -}if (sm == null && !(pwtype.equals ("PID"))) { -if (jalview.schemes.ResidueProperties.getScoreMatrix (pwtype) == null) { -pwtype = "BLOSUM62"; -}}var i = 0; -this.done = Clazz.newIntArray (sequence.length, 0); -while ((i < sequence.length) && (sequence[i] != null)) { -this.done[i] = 0; -i++; -} -this.noseqs = i++; -this.distance = this.findDistances (sm); -this.makeLeaves (); -this.noClus = this.$cluster.size (); -this.cluster (); -}, "~A,jalview.datamodel.AlignmentView,~S,~S,jalview.api.analysis.ScoreModelI,~N,~N"); -Clazz.overrideMethod (c$, "toString", -function () { -var fout = new jalview.io.NewickFile (this.getTopNode ()); -return fout.print (this.isHasBootstrap (), this.isHasDistances (), this.isHasRootDistance ()); -}); -Clazz.defineMethod (c$, "UpdatePlaceHolders", -function (list) { -var leaves = new java.util.Vector (); -this.findLeaves (this.top, leaves); -var sz = leaves.size (); -var seqmatcher = null; -var i = 0; -while (i < sz) { -var leaf = leaves.elementAt (i++); -if (list.contains (leaf.element ())) { -leaf.setPlaceholder (false); -} else { -if (seqmatcher == null) { -var seqs = new Array (list.size ()); -for (var j = 0; j < seqs.length; j++) { -seqs[j] = list.get (j); -} -seqmatcher = new jalview.analysis.SequenceIdMatcher (seqs); -}var nam = seqmatcher.findIdMatch (leaf.getName ()); -if (nam != null) { -if (!leaf.isPlaceholder ()) { -}leaf.setPlaceholder (false); -leaf.setElement (nam); -} else { -if (!leaf.isPlaceholder ()) { -leaf.setElement ( new jalview.datamodel.Sequence (leaf.getName (), "THISISAPLACEHLDER")); -}leaf.setPlaceholder (true); -}}} -}, "java.util.List"); -Clazz.defineMethod (c$, "renameAssociatedNodes", -function () { -this.applyToNodes (((Clazz.isClassDefined ("jalview.analysis.NJTree$1") ? 0 : jalview.analysis.NJTree.$NJTree$1$ ()), Clazz.innerTypeInstance (jalview.analysis.NJTree$1, this, null))); -}); -Clazz.defineMethod (c$, "cluster", -function () { -while (this.noClus > 2) { -if (this.type.equals ("NJ")) { -this.findMinNJDistance (); -} else { -this.findMinDistance (); -}var c = this.joinClusters (this.mini, this.minj); -this.done[this.minj] = 1; -this.$cluster.setElementAt (null, this.minj); -this.$cluster.setElementAt (c, this.mini); -this.noClus--; -} -var onefound = false; -var one = -1; -var two = -1; -for (var i = 0; i < this.noseqs; i++) { -if (this.done[i] != 1) { -if (onefound == false) { -two = i; -onefound = true; -} else { -one = i; -}}} -this.joinClusters (one, two); -this.top = (this.node.elementAt (one)); -this.reCount (this.top); -this.findHeight (this.top); -this.findMaxDist (this.top); -}); -Clazz.defineMethod (c$, "joinClusters", -function (i, j) { -var dist = this.distance[i][j]; -var noi = (this.$cluster.elementAt (i)).value.length; -var noj = (this.$cluster.elementAt (j)).value.length; -var value = Clazz.newIntArray (noi + noj, 0); -for (var ii = 0; ii < noi; ii++) { -value[ii] = (this.$cluster.elementAt (i)).value[ii]; -} -for (var ii = noi; ii < (noi + noj); ii++) { -value[ii] = (this.$cluster.elementAt (j)).value[ii - noi]; -} -var c = new jalview.analysis.Cluster (value); -this.ri = this.findr (i, j); -this.rj = this.findr (j, i); -if (this.type.equals ("NJ")) { -this.findClusterNJDistance (i, j); -} else { -this.findClusterDistance (i, j); -}var sn = new jalview.datamodel.SequenceNode (); -sn.setLeft ((this.node.elementAt (i))); -sn.setRight ((this.node.elementAt (j))); -var tmpi = (this.node.elementAt (i)); -var tmpj = (this.node.elementAt (j)); -if (this.type.equals ("NJ")) { -this.findNewNJDistances (tmpi, tmpj, dist); -} else { -this.findNewDistances (tmpi, tmpj, dist); -}tmpi.setParent (sn); -tmpj.setParent (sn); -this.node.setElementAt (sn, i); -return c; -}, "~N,~N"); -Clazz.defineMethod (c$, "findNewNJDistances", -function (tmpi, tmpj, dist) { -tmpi.dist = ((dist + this.ri) - this.rj) / 2; -tmpj.dist = (dist - tmpi.dist); -if (tmpi.dist < 0) { -tmpi.dist = 0; -}if (tmpj.dist < 0) { -tmpj.dist = 0; -}}, "jalview.datamodel.SequenceNode,jalview.datamodel.SequenceNode,~N"); -Clazz.defineMethod (c$, "findNewDistances", -function (tmpi, tmpj, dist) { -var ih = 0; -var jh = 0; -var sni = tmpi; -var snj = tmpj; -while (sni != null) { -ih = ih + sni.dist; -sni = sni.left (); -} -while (snj != null) { -jh = jh + snj.dist; -snj = snj.left (); -} -tmpi.dist = ((dist / 2) - ih); -tmpj.dist = ((dist / 2) - jh); -}, "jalview.datamodel.SequenceNode,jalview.datamodel.SequenceNode,~N"); -Clazz.defineMethod (c$, "findClusterDistance", -function (i, j) { -var noi = (this.$cluster.elementAt (i)).value.length; -var noj = (this.$cluster.elementAt (j)).value.length; -var newdist = Clazz.newFloatArray (this.noseqs, 0); -for (var l = 0; l < this.noseqs; l++) { -if ((l != i) && (l != j)) { -newdist[l] = ((this.distance[i][l] * noi) + (this.distance[j][l] * noj)) / (noi + noj); -} else { -newdist[l] = 0; -}} -for (var ii = 0; ii < this.noseqs; ii++) { -this.distance[i][ii] = newdist[ii]; -this.distance[ii][i] = newdist[ii]; -} -}, "~N,~N"); -Clazz.defineMethod (c$, "findClusterNJDistance", -function (i, j) { -var newdist = Clazz.newFloatArray (this.noseqs, 0); -for (var l = 0; l < this.noseqs; l++) { -if ((l != i) && (l != j)) { -newdist[l] = ((this.distance[i][l] + this.distance[j][l]) - this.distance[i][j]) / 2; -} else { -newdist[l] = 0; -}} -for (var ii = 0; ii < this.noseqs; ii++) { -this.distance[i][ii] = newdist[ii]; -this.distance[ii][i] = newdist[ii]; -} -}, "~N,~N"); -Clazz.defineMethod (c$, "findr", -function (i, j) { -var tmp = 1; -for (var k = 0; k < this.noseqs; k++) { -if ((k != i) && (k != j) && (this.done[k] != 1)) { -tmp = tmp + this.distance[i][k]; -}} -if (this.noClus > 2) { -tmp = tmp / (this.noClus - 2); -}return tmp; -}, "~N,~N"); -Clazz.defineMethod (c$, "findMinNJDistance", -function () { -var min = 100000; -for (var i = 0; i < (this.noseqs - 1); i++) { -for (var j = i + 1; j < this.noseqs; j++) { -if ((this.done[i] != 1) && (this.done[j] != 1)) { -var tmp = this.distance[i][j] - (this.findr (i, j) + this.findr (j, i)); -if (tmp < min) { -this.mini = i; -this.minj = j; -min = tmp; -}}} -} -return min; -}); -Clazz.defineMethod (c$, "findMinDistance", -function () { -var min = 100000; -for (var i = 0; i < (this.noseqs - 1); i++) { -for (var j = i + 1; j < this.noseqs; j++) { -if ((this.done[i] != 1) && (this.done[j] != 1)) { -if (this.distance[i][j] < min) { -this.mini = i; -this.minj = j; -min = this.distance[i][j]; -}}} -} -return min; -}); -Clazz.defineMethod (c$, "findDistances", -function (_pwmatrix) { -var distance = Clazz.newFloatArray (this.noseqs, this.noseqs, 0); -if (_pwmatrix == null) { -_pwmatrix = jalview.schemes.ResidueProperties.getScoreModel (this.pwtype); -if (_pwmatrix == null) { -_pwmatrix = jalview.schemes.ResidueProperties.getScoreMatrix ("BLOSUM62"); -}}distance = _pwmatrix.findDistances (this.seqData); -return distance; -}, "jalview.api.analysis.ScoreModelI"); -Clazz.defineMethod (c$, "makeLeaves", -function () { -this.$cluster = new java.util.Vector (); -for (var i = 0; i < this.noseqs; i++) { -var sn = new jalview.datamodel.SequenceNode (); -sn.setElement (this.sequence[i]); -sn.setName (this.sequence[i].getName ()); -this.node.addElement (sn); -var value = Clazz.newIntArray (1, 0); -value[0] = i; -var c = new jalview.analysis.Cluster (value); -this.$cluster.addElement (c); -} -}); -Clazz.defineMethod (c$, "findLeaves", -function (node, leaves) { -if (node == null) { -return leaves; -}if ((node.left () == null) && (node.right () == null)) { -leaves.addElement (node); -return leaves; -} else { -this.findLeaves (node.left (), leaves); -this.findLeaves (node.right (), leaves); -}return leaves; -}, "jalview.datamodel.SequenceNode,java.util.Vector"); -Clazz.defineMethod (c$, "findLeaf", -function (node, count) { -this.found = this._findLeaf (node, count); -return this.found; -}, "jalview.datamodel.SequenceNode,~N"); -Clazz.defineMethod (c$, "_findLeaf", -function (node, count) { -if (node == null) { -return null; -}if (node.ycount == count) { -this.found = node.element (); -return this.found; -} else { -this._findLeaf (node.left (), count); -this._findLeaf (node.right (), count); -}return this.found; -}, "jalview.datamodel.SequenceNode,~N"); -Clazz.defineMethod (c$, "printNode", -function (node) { -if (node == null) { -return; -}if ((node.left () == null) && (node.right () == null)) { -System.out.println ("Leaf = " + (node.element ()).getName ()); -System.out.println ("Dist " + node.dist); -System.out.println ("Boot " + node.getBootstrap ()); -} else { -System.out.println ("Dist " + node.dist); -this.printNode (node.left ()); -this.printNode (node.right ()); -}}, "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "findMaxDist", -function (node) { -if (node == null) { -return; -}if ((node.left () == null) && (node.right () == null)) { -var dist = node.dist; -if (dist > this.maxDistValue) { -this.maxdist = node; -this.maxDistValue = dist; -}} else { -this.findMaxDist (node.left ()); -this.findMaxDist (node.right ()); -}}, "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "getGroups", -function () { -return this.groups; -}); -Clazz.defineMethod (c$, "getMaxHeight", -function () { -return this.maxheight; -}); -Clazz.defineMethod (c$, "groupNodes", -function (node, threshold) { -if (node == null) { -return; -}if ((node.height / this.maxheight) > threshold) { -this.groups.addElement (node); -} else { -this.groupNodes (node.left (), threshold); -this.groupNodes (node.right (), threshold); -}}, "jalview.datamodel.SequenceNode,~N"); -Clazz.defineMethod (c$, "findHeight", -function (node) { -if (node == null) { -return this.maxheight; -}if ((node.left () == null) && (node.right () == null)) { -node.height = (node.parent ()).height + node.dist; -if (node.height > this.maxheight) { -return node.height; -} else { -return this.maxheight; -}} else { -if (node.parent () != null) { -node.height = (node.parent ()).height + node.dist; -} else { -this.maxheight = 0; -node.height = 0.0; -}this.maxheight = this.findHeight ((node.left ())); -this.maxheight = this.findHeight ((node.right ())); -}return this.maxheight; -}, "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "reRoot", -function () { -if (this.maxdist != null) { -this.ycount = 0; -var tmpdist = this.maxdist.dist; -var sn = new jalview.datamodel.SequenceNode (); -sn.setParent (null); -var snr = this.maxdist.parent (); -this.changeDirection (snr, this.maxdist); -System.out.println ("Printing reversed tree"); -this.printN (snr); -snr.dist = tmpdist / 2; -this.maxdist.dist = tmpdist / 2; -snr.setParent (sn); -this.maxdist.setParent (sn); -sn.setRight (snr); -sn.setLeft (this.maxdist); -this.top = sn; -this.ycount = 0; -this.reCount (this.top); -this.findHeight (this.top); -}return this.top; -}); -Clazz.defineMethod (c$, "hasOriginalSequenceData", -function () { -return this.seqData != null; -}); -Clazz.defineMethod (c$, "printOriginalSequenceData", -function (gapChar) { -if (this.seqData == null) { -return null; -}var sb = new StringBuffer (); -var seqdatas = this.seqData.getSequenceStrings (gapChar); -for (var i = 0; i < seqdatas.length; i++) { -sb.append ( new jalview.util.Format ("%-15s").form (this.sequence[i].getName ())); -sb.append (" " + seqdatas[i] + "\n"); -} -return sb.toString (); -}, "~S"); -Clazz.defineMethod (c$, "printN", -function (node) { -if (node == null) { -return; -}if ((node.left () != null) && (node.right () != null)) { -this.printN (node.left ()); -this.printN (node.right ()); -} else { -System.out.println (" name = " + (node.element ()).getName ()); -}System.out.println (" dist = " + node.dist + " " + node.count + " " + node.height); -}, "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "reCount", -function (node) { -this.ycount = 0; -this._lycount = 0; -this._reCount (node); -}, "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "_reCount", -function (node) { -if (node == null) { -return; -}this._lycount++; -if ((node.left () != null) && (node.right () != null)) { -this._reCount (node.left ()); -this._reCount (node.right ()); -var l = node.left (); -var r = node.right (); -node.count = l.count + r.count; -node.ycount = (l.ycount + r.ycount) / 2; -} else { -node.count = 1; -node.ycount = this.ycount++; -}this._lycount--; -}, "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "swapNodes", -function (node) { -if (node == null) { -return; -}var tmp = node.left (); -node.setLeft (node.right ()); -node.setRight (tmp); -}, "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "changeDirection", -function (node, dir) { -if (node == null) { -return; -}if (node.parent () !== this.top) { -this.changeDirection (node.parent (), node); -var tmp = node.parent (); -if (dir === node.left ()) { -node.setParent (dir); -node.setLeft (tmp); -} else if (dir === node.right ()) { -node.setParent (dir); -node.setRight (tmp); -}} else { -if (dir === node.left ()) { -node.setParent (node.left ()); -if (this.top.left () === node) { -node.setRight (this.top.right ()); -} else { -node.setRight (this.top.left ()); -}} else { -node.setParent (node.right ()); -if (this.top.left () === node) { -node.setLeft (this.top.right ()); -} else { -node.setLeft (this.top.left ()); -}}}}, "jalview.datamodel.SequenceNode,jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "getMaxDist", -function () { -return this.maxdist; -}); -Clazz.defineMethod (c$, "getTopNode", -function () { -return this.top; -}); -Clazz.defineMethod (c$, "isHasDistances", -function () { -return this.hasDistances; -}); -Clazz.defineMethod (c$, "isHasBootstrap", -function () { -return this.hasBootstrap; -}); -Clazz.defineMethod (c$, "isHasRootDistance", -function () { -return this.hasRootDistance; -}); -Clazz.defineMethod (c$, "applyToNodes", -function (nodeTransformI) { -for (var nodes = this.node.elements (); nodes.hasMoreElements (); nodeTransformI.transform (nodes.nextElement ())) { -;} -}, "jalview.datamodel.NodeTransformI"); -c$.$NJTree$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.analysis, "NJTree$1", null, jalview.datamodel.NodeTransformI); -Clazz.defineMethod (c$, "transform", -function (node) { -var el = node.element (); -if (el != null && Clazz.instanceOf (el, jalview.datamodel.SequenceI)) { -node.setName ((el).getName ()); -}}, "jalview.datamodel.BinaryNode"); -c$ = Clazz.p0p (); -}; -c$ = Clazz.decorateAsClass (function () { -this.value = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "Cluster"); -Clazz.makeConstructor (c$, -function (value) { -this.value = value; -}, "~A"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (["java.util.Vector"], ["jalview.analysis.Cluster", "$.NJTree"], ["jalview.analysis.SequenceIdMatcher", "jalview.datamodel.AlignmentView", "$.CigarArray", "$.NodeTransformI", "$.SeqCigar", "$.Sequence", "$.SequenceI", "$.SequenceNode", "jalview.io.NewickFile", "jalview.schemes.ResidueProperties", "jalview.util.Format", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.$cluster = null; +this.sequence = null; +this.seqData = null; +this.done = null; +this.noseqs = 0; +this.noClus = 0; +this.distance = null; +this.mini = 0; +this.minj = 0; +this.ri = 0; +this.rj = 0; +this.groups = null; +this.maxdist = null; +this.top = null; +this.maxDistValue = 0; +this.maxheight = 0; +this.ycount = 0; +this.node = null; +this.type = null; +this.pwtype = null; +this.found = null; +this.leaves = null; +this.hasDistances = true; +this.hasBootstrap = false; +this.hasRootDistance = true; +this._lycount = 0; +this._lylimit = 0; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "NJTree"); +Clazz.prepareFields (c$, function () { +this.groups = new java.util.Vector (); +}); +Clazz.makeConstructor (c$, +function (seqs, odata, treefile) { +this.construct (seqs, treefile); +if (odata != null) { +this.seqData = odata; +}}, "~A,jalview.datamodel.AlignmentView,jalview.io.NewickFile"); +Clazz.makeConstructor (c$, +function (seqs, treefile) { +this.sequence = seqs; +this.top = treefile.getTree (); +this.hasDistances = treefile.HasDistances (); +this.hasBootstrap = treefile.HasBootstrap (); +this.hasRootDistance = treefile.HasRootDistance (); +this.maxheight = this.findHeight (this.top); +var algnIds = new jalview.analysis.SequenceIdMatcher (seqs); +var leaves = new java.util.Vector (); +this.findLeaves (this.top, leaves); +var i = 0; +var namesleft = seqs.length; +var j; +var nam; +var realnam; +var one2many = new java.util.Vector (); +var countOne2Many = 0; +while (i < leaves.size ()) { +j = leaves.elementAt (i++); +realnam = j.getName (); +nam = null; +if (namesleft > -1) { +nam = algnIds.findIdMatch (realnam); +}if (nam != null) { +j.setElement (nam); +if (one2many.contains (nam)) { +countOne2Many++; +} else { +one2many.addElement (nam); +namesleft--; +}} else { +j.setElement ( new jalview.datamodel.Sequence (realnam, "THISISAPLACEHLDER")); +j.setPlaceholder (true); +}} +}, "~A,jalview.io.NewickFile"); +Clazz.makeConstructor (c$, +function (sequence, seqData, type, pwtype, sm, start, end) { +this.sequence = sequence; +this.node = new java.util.Vector (); +this.type = type; +this.pwtype = pwtype; +if (seqData != null) { +this.seqData = seqData; +} else { +var seqs = new Array (sequence.length); +for (var i = 0; i < sequence.length; i++) { +seqs[i] = new jalview.datamodel.SeqCigar (sequence[i], start, end); +} +var sdata = new jalview.datamodel.CigarArray (seqs); +sdata.addOperation ('M', end - start + 1); +this.seqData = new jalview.datamodel.AlignmentView (sdata, start); +}if (!(type.equals ("NJ"))) { +type = "AV"; +}if (sm == null && !(pwtype.equals ("PID"))) { +if (jalview.schemes.ResidueProperties.getScoreMatrix (pwtype) == null) { +pwtype = "BLOSUM62"; +}}var i = 0; +this.done = Clazz.newIntArray (sequence.length, 0); +while ((i < sequence.length) && (sequence[i] != null)) { +this.done[i] = 0; +i++; +} +this.noseqs = i++; +this.distance = this.findDistances (sm); +this.makeLeaves (); +this.noClus = this.$cluster.size (); +this.cluster (); +}, "~A,jalview.datamodel.AlignmentView,~S,~S,jalview.api.analysis.ScoreModelI,~N,~N"); +Clazz.overrideMethod (c$, "toString", +function () { +var fout = new jalview.io.NewickFile (this.getTopNode ()); +return fout.print (this.isHasBootstrap (), this.isHasDistances (), this.isHasRootDistance ()); +}); +Clazz.defineMethod (c$, "UpdatePlaceHolders", +function (list) { +var leaves = new java.util.Vector (); +this.findLeaves (this.top, leaves); +var sz = leaves.size (); +var seqmatcher = null; +var i = 0; +while (i < sz) { +var leaf = leaves.elementAt (i++); +if (list.contains (leaf.element ())) { +leaf.setPlaceholder (false); +} else { +if (seqmatcher == null) { +var seqs = new Array (list.size ()); +for (var j = 0; j < seqs.length; j++) { +seqs[j] = list.get (j); +} +seqmatcher = new jalview.analysis.SequenceIdMatcher (seqs); +}var nam = seqmatcher.findIdMatch (leaf.getName ()); +if (nam != null) { +if (!leaf.isPlaceholder ()) { +}leaf.setPlaceholder (false); +leaf.setElement (nam); +} else { +if (!leaf.isPlaceholder ()) { +leaf.setElement ( new jalview.datamodel.Sequence (leaf.getName (), "THISISAPLACEHLDER")); +}leaf.setPlaceholder (true); +}}} +}, "java.util.List"); +Clazz.defineMethod (c$, "renameAssociatedNodes", +function () { +this.applyToNodes (((Clazz.isClassDefined ("jalview.analysis.NJTree$1") ? 0 : jalview.analysis.NJTree.$NJTree$1$ ()), Clazz.innerTypeInstance (jalview.analysis.NJTree$1, this, null))); +}); +Clazz.defineMethod (c$, "cluster", +function () { +while (this.noClus > 2) { +if (this.type.equals ("NJ")) { +this.findMinNJDistance (); +} else { +this.findMinDistance (); +}var c = this.joinClusters (this.mini, this.minj); +this.done[this.minj] = 1; +this.$cluster.setElementAt (null, this.minj); +this.$cluster.setElementAt (c, this.mini); +this.noClus--; +} +var onefound = false; +var one = -1; +var two = -1; +for (var i = 0; i < this.noseqs; i++) { +if (this.done[i] != 1) { +if (onefound == false) { +two = i; +onefound = true; +} else { +one = i; +}}} +this.joinClusters (one, two); +this.top = (this.node.elementAt (one)); +this.reCount (this.top); +this.findHeight (this.top); +this.findMaxDist (this.top); +}); +Clazz.defineMethod (c$, "joinClusters", +function (i, j) { +var dist = this.distance[i][j]; +var noi = (this.$cluster.elementAt (i)).value.length; +var noj = (this.$cluster.elementAt (j)).value.length; +var value = Clazz.newIntArray (noi + noj, 0); +for (var ii = 0; ii < noi; ii++) { +value[ii] = (this.$cluster.elementAt (i)).value[ii]; +} +for (var ii = noi; ii < (noi + noj); ii++) { +value[ii] = (this.$cluster.elementAt (j)).value[ii - noi]; +} +var c = new jalview.analysis.Cluster (value); +this.ri = this.findr (i, j); +this.rj = this.findr (j, i); +if (this.type.equals ("NJ")) { +this.findClusterNJDistance (i, j); +} else { +this.findClusterDistance (i, j); +}var sn = new jalview.datamodel.SequenceNode (); +sn.setLeft ((this.node.elementAt (i))); +sn.setRight ((this.node.elementAt (j))); +var tmpi = (this.node.elementAt (i)); +var tmpj = (this.node.elementAt (j)); +if (this.type.equals ("NJ")) { +this.findNewNJDistances (tmpi, tmpj, dist); +} else { +this.findNewDistances (tmpi, tmpj, dist); +}tmpi.setParent (sn); +tmpj.setParent (sn); +this.node.setElementAt (sn, i); +return c; +}, "~N,~N"); +Clazz.defineMethod (c$, "findNewNJDistances", +function (tmpi, tmpj, dist) { +tmpi.dist = ((dist + this.ri) - this.rj) / 2; +tmpj.dist = (dist - tmpi.dist); +if (tmpi.dist < 0) { +tmpi.dist = 0; +}if (tmpj.dist < 0) { +tmpj.dist = 0; +}}, "jalview.datamodel.SequenceNode,jalview.datamodel.SequenceNode,~N"); +Clazz.defineMethod (c$, "findNewDistances", +function (tmpi, tmpj, dist) { +var ih = 0; +var jh = 0; +var sni = tmpi; +var snj = tmpj; +while (sni != null) { +ih = ih + sni.dist; +sni = sni.left (); +} +while (snj != null) { +jh = jh + snj.dist; +snj = snj.left (); +} +tmpi.dist = ((dist / 2) - ih); +tmpj.dist = ((dist / 2) - jh); +}, "jalview.datamodel.SequenceNode,jalview.datamodel.SequenceNode,~N"); +Clazz.defineMethod (c$, "findClusterDistance", +function (i, j) { +var noi = (this.$cluster.elementAt (i)).value.length; +var noj = (this.$cluster.elementAt (j)).value.length; +var newdist = Clazz.newFloatArray (this.noseqs, 0); +for (var l = 0; l < this.noseqs; l++) { +if ((l != i) && (l != j)) { +newdist[l] = ((this.distance[i][l] * noi) + (this.distance[j][l] * noj)) / (noi + noj); +} else { +newdist[l] = 0; +}} +for (var ii = 0; ii < this.noseqs; ii++) { +this.distance[i][ii] = newdist[ii]; +this.distance[ii][i] = newdist[ii]; +} +}, "~N,~N"); +Clazz.defineMethod (c$, "findClusterNJDistance", +function (i, j) { +var newdist = Clazz.newFloatArray (this.noseqs, 0); +for (var l = 0; l < this.noseqs; l++) { +if ((l != i) && (l != j)) { +newdist[l] = ((this.distance[i][l] + this.distance[j][l]) - this.distance[i][j]) / 2; +} else { +newdist[l] = 0; +}} +for (var ii = 0; ii < this.noseqs; ii++) { +this.distance[i][ii] = newdist[ii]; +this.distance[ii][i] = newdist[ii]; +} +}, "~N,~N"); +Clazz.defineMethod (c$, "findr", +function (i, j) { +var tmp = 1; +for (var k = 0; k < this.noseqs; k++) { +if ((k != i) && (k != j) && (this.done[k] != 1)) { +tmp = tmp + this.distance[i][k]; +}} +if (this.noClus > 2) { +tmp = tmp / (this.noClus - 2); +}return tmp; +}, "~N,~N"); +Clazz.defineMethod (c$, "findMinNJDistance", +function () { +var min = 100000; +for (var i = 0; i < (this.noseqs - 1); i++) { +for (var j = i + 1; j < this.noseqs; j++) { +if ((this.done[i] != 1) && (this.done[j] != 1)) { +var tmp = this.distance[i][j] - (this.findr (i, j) + this.findr (j, i)); +if (tmp < min) { +this.mini = i; +this.minj = j; +min = tmp; +}}} +} +return min; +}); +Clazz.defineMethod (c$, "findMinDistance", +function () { +var min = 100000; +for (var i = 0; i < (this.noseqs - 1); i++) { +for (var j = i + 1; j < this.noseqs; j++) { +if ((this.done[i] != 1) && (this.done[j] != 1)) { +if (this.distance[i][j] < min) { +this.mini = i; +this.minj = j; +min = this.distance[i][j]; +}}} +} +return min; +}); +Clazz.defineMethod (c$, "findDistances", +function (_pwmatrix) { +var distance = Clazz.newFloatArray (this.noseqs, this.noseqs, 0); +if (_pwmatrix == null) { +_pwmatrix = jalview.schemes.ResidueProperties.getScoreModel (this.pwtype); +if (_pwmatrix == null) { +_pwmatrix = jalview.schemes.ResidueProperties.getScoreMatrix ("BLOSUM62"); +}}distance = _pwmatrix.findDistances (this.seqData); +return distance; +}, "jalview.api.analysis.ScoreModelI"); +Clazz.defineMethod (c$, "makeLeaves", +function () { +this.$cluster = new java.util.Vector (); +for (var i = 0; i < this.noseqs; i++) { +var sn = new jalview.datamodel.SequenceNode (); +sn.setElement (this.sequence[i]); +sn.setName (this.sequence[i].getName ()); +this.node.addElement (sn); +var value = Clazz.newIntArray (1, 0); +value[0] = i; +var c = new jalview.analysis.Cluster (value); +this.$cluster.addElement (c); +} +}); +Clazz.defineMethod (c$, "findLeaves", +function (node, leaves) { +if (node == null) { +return leaves; +}if ((node.left () == null) && (node.right () == null)) { +leaves.addElement (node); +return leaves; +} else { +this.findLeaves (node.left (), leaves); +this.findLeaves (node.right (), leaves); +}return leaves; +}, "jalview.datamodel.SequenceNode,java.util.Vector"); +Clazz.defineMethod (c$, "findLeaf", +function (node, count) { +this.found = this._findLeaf (node, count); +return this.found; +}, "jalview.datamodel.SequenceNode,~N"); +Clazz.defineMethod (c$, "_findLeaf", +function (node, count) { +if (node == null) { +return null; +}if (node.ycount == count) { +this.found = node.element (); +return this.found; +} else { +this._findLeaf (node.left (), count); +this._findLeaf (node.right (), count); +}return this.found; +}, "jalview.datamodel.SequenceNode,~N"); +Clazz.defineMethod (c$, "printNode", +function (node) { +if (node == null) { +return; +}if ((node.left () == null) && (node.right () == null)) { +System.out.println ("Leaf = " + (node.element ()).getName ()); +System.out.println ("Dist " + node.dist); +System.out.println ("Boot " + node.getBootstrap ()); +} else { +System.out.println ("Dist " + node.dist); +this.printNode (node.left ()); +this.printNode (node.right ()); +}}, "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "findMaxDist", +function (node) { +if (node == null) { +return; +}if ((node.left () == null) && (node.right () == null)) { +var dist = node.dist; +if (dist > this.maxDistValue) { +this.maxdist = node; +this.maxDistValue = dist; +}} else { +this.findMaxDist (node.left ()); +this.findMaxDist (node.right ()); +}}, "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "getGroups", +function () { +return this.groups; +}); +Clazz.defineMethod (c$, "getMaxHeight", +function () { +return this.maxheight; +}); +Clazz.defineMethod (c$, "groupNodes", +function (node, threshold) { +if (node == null) { +return; +}if ((node.height / this.maxheight) > threshold) { +this.groups.addElement (node); +} else { +this.groupNodes (node.left (), threshold); +this.groupNodes (node.right (), threshold); +}}, "jalview.datamodel.SequenceNode,~N"); +Clazz.defineMethod (c$, "findHeight", +function (node) { +if (node == null) { +return this.maxheight; +}if ((node.left () == null) && (node.right () == null)) { +node.height = (node.parent ()).height + node.dist; +if (node.height > this.maxheight) { +return node.height; +} else { +return this.maxheight; +}} else { +if (node.parent () != null) { +node.height = (node.parent ()).height + node.dist; +} else { +this.maxheight = 0; +node.height = 0.0; +}this.maxheight = this.findHeight ((node.left ())); +this.maxheight = this.findHeight ((node.right ())); +}return this.maxheight; +}, "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "reRoot", +function () { +if (this.maxdist != null) { +this.ycount = 0; +var tmpdist = this.maxdist.dist; +var sn = new jalview.datamodel.SequenceNode (); +sn.setParent (null); +var snr = this.maxdist.parent (); +this.changeDirection (snr, this.maxdist); +System.out.println ("Printing reversed tree"); +this.printN (snr); +snr.dist = tmpdist / 2; +this.maxdist.dist = tmpdist / 2; +snr.setParent (sn); +this.maxdist.setParent (sn); +sn.setRight (snr); +sn.setLeft (this.maxdist); +this.top = sn; +this.ycount = 0; +this.reCount (this.top); +this.findHeight (this.top); +}return this.top; +}); +Clazz.defineMethod (c$, "hasOriginalSequenceData", +function () { +return this.seqData != null; +}); +Clazz.defineMethod (c$, "printOriginalSequenceData", +function (gapChar) { +if (this.seqData == null) { +return null; +}var sb = new StringBuffer (); +var seqdatas = this.seqData.getSequenceStrings (gapChar); +for (var i = 0; i < seqdatas.length; i++) { +sb.append ( new jalview.util.Format ("%-15s").form (this.sequence[i].getName ())); +sb.append (" " + seqdatas[i] + "\n"); +} +return sb.toString (); +}, "~S"); +Clazz.defineMethod (c$, "printN", +function (node) { +if (node == null) { +return; +}if ((node.left () != null) && (node.right () != null)) { +this.printN (node.left ()); +this.printN (node.right ()); +} else { +System.out.println (" name = " + (node.element ()).getName ()); +}System.out.println (" dist = " + node.dist + " " + node.count + " " + node.height); +}, "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "reCount", +function (node) { +this.ycount = 0; +this._lycount = 0; +this._reCount (node); +}, "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "_reCount", +function (node) { +if (node == null) { +return; +}this._lycount++; +if ((node.left () != null) && (node.right () != null)) { +this._reCount (node.left ()); +this._reCount (node.right ()); +var l = node.left (); +var r = node.right (); +node.count = l.count + r.count; +node.ycount = (l.ycount + r.ycount) / 2; +} else { +node.count = 1; +node.ycount = this.ycount++; +}this._lycount--; +}, "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "swapNodes", +function (node) { +if (node == null) { +return; +}var tmp = node.left (); +node.setLeft (node.right ()); +node.setRight (tmp); +}, "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "changeDirection", +function (node, dir) { +if (node == null) { +return; +}if (node.parent () !== this.top) { +this.changeDirection (node.parent (), node); +var tmp = node.parent (); +if (dir === node.left ()) { +node.setParent (dir); +node.setLeft (tmp); +} else if (dir === node.right ()) { +node.setParent (dir); +node.setRight (tmp); +}} else { +if (dir === node.left ()) { +node.setParent (node.left ()); +if (this.top.left () === node) { +node.setRight (this.top.right ()); +} else { +node.setRight (this.top.left ()); +}} else { +node.setParent (node.right ()); +if (this.top.left () === node) { +node.setLeft (this.top.right ()); +} else { +node.setLeft (this.top.left ()); +}}}}, "jalview.datamodel.SequenceNode,jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "getMaxDist", +function () { +return this.maxdist; +}); +Clazz.defineMethod (c$, "getTopNode", +function () { +return this.top; +}); +Clazz.defineMethod (c$, "isHasDistances", +function () { +return this.hasDistances; +}); +Clazz.defineMethod (c$, "isHasBootstrap", +function () { +return this.hasBootstrap; +}); +Clazz.defineMethod (c$, "isHasRootDistance", +function () { +return this.hasRootDistance; +}); +Clazz.defineMethod (c$, "applyToNodes", +function (nodeTransformI) { +for (var nodes = this.node.elements (); nodes.hasMoreElements (); nodeTransformI.transform (nodes.nextElement ())) { +;} +}, "jalview.datamodel.NodeTransformI"); +c$.$NJTree$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.analysis, "NJTree$1", null, jalview.datamodel.NodeTransformI); +Clazz.defineMethod (c$, "transform", +function (node) { +var el = node.element (); +if (el != null && Clazz.instanceOf (el, jalview.datamodel.SequenceI)) { +node.setName ((el).getName ()); +}}, "jalview.datamodel.BinaryNode"); +c$ = Clazz.p0p (); +}; +c$ = Clazz.decorateAsClass (function () { +this.value = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "Cluster"); +Clazz.makeConstructor (c$, +function (value) { +this.value = value; +}, "~A"); +}); diff --git a/bin/jalview/analysis/PCA.js b/bin/jalview/analysis/PCA.js index c9e885c..5effde0 100644 --- a/bin/jalview/analysis/PCA.js +++ b/bin/jalview/analysis/PCA.js @@ -1,163 +1,163 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (["java.lang.StringBuffer"], "jalview.analysis.PCA", ["jalview.datamodel.BinarySequence", "jalview.math.Matrix", "jalview.schemes.ResidueProperties"], function () { -c$ = Clazz.decorateAsClass (function () { -this.m = null; -this.symm = null; -this.m2 = null; -this.eigenvalue = null; -this.eigenvector = null; -this.details = null; -this.jvCalcMode = true; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "PCA", null, Runnable); -Clazz.prepareFields (c$, function () { -this.details = new StringBuffer (); -}); -Clazz.makeConstructor (c$, -function (s) { -this.construct (s, false); -}, "~A"); -Clazz.makeConstructor (c$, -function (s, nucleotides) { -this.construct (s, nucleotides, null); -}, "~A,~B"); -Clazz.makeConstructor (c$, -function (s, nucleotides, s_m) { -var bs = new Array (s.length); -var ii = 0; -while ((ii < s.length) && (s[ii] != null)) { -bs[ii] = new jalview.datamodel.BinarySequence (s[ii], nucleotides); -bs[ii].encode (); -ii++; -} -var bs2 = new Array (s.length); -ii = 0; -var smtrx = null; -var sm = s_m; -if (sm != null) { -smtrx = jalview.schemes.ResidueProperties.getScoreMatrix (sm); -}if (smtrx == null) { -smtrx = jalview.schemes.ResidueProperties.getScoreMatrix (sm = (nucleotides ? "DNA" : "BLOSUM62")); -}this.details.append ("PCA calculation using " + sm + " sequence similarity matrix\n========\n\n"); -while ((ii < s.length) && (s[ii] != null)) { -bs2[ii] = new jalview.datamodel.BinarySequence (s[ii], nucleotides); -if (smtrx != null) { -try { -bs2[ii].matrixEncode (smtrx); -} catch (x) { -if (Clazz.exceptionOf (x, jalview.datamodel.BinarySequence.InvalidSequenceTypeException)) { -this.details.append ("Unexpected mismatch of sequence type and score matrix. Calculation will not be valid!\n\n"); -} else { -throw x; -} -} -}ii++; -} -var count = 0; -while ((count < bs.length) && (bs[count] != null)) { -count++; -} -var seqmat = Clazz.newDoubleArray (count, bs[0].getDBinary ().length, 0); -var seqmat2 = Clazz.newDoubleArray (count, bs2[0].getDBinary ().length, 0); -var i = 0; -while (i < count) { -seqmat[i] = bs[i].getDBinary (); -seqmat2[i] = bs2[i].getDBinary (); -i++; -} -this.m = new jalview.math.Matrix (seqmat, count, bs[0].getDBinary ().length); -this.m2 = new jalview.math.Matrix (seqmat2, count, bs2[0].getDBinary ().length); -}, "~A,~B,~S"); -Clazz.defineMethod (c$, "getM", -function () { -return this.m; -}); -Clazz.defineMethod (c$, "getEigenvalue", -function (i) { -return this.eigenvector.d[i]; -}, "~N"); -Clazz.defineMethod (c$, "getComponents", -function (l, n, mm, factor) { -var out = Clazz.newFloatArray (this.m.rows, 3, 0); -for (var i = 0; i < this.m.rows; i++) { -out[i][0] = this.component (i, l) * factor; -out[i][1] = this.component (i, n) * factor; -out[i][2] = this.component (i, mm) * factor; -} -return out; -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "component", -function (n) { -var out = Clazz.newDoubleArray (this.m.rows, 0); -for (var i = 0; i < this.m.rows; i++) { -out[i] = this.component (i, n); -} -return out; -}, "~N"); -Clazz.defineMethod (c$, "component", -function (row, n) { -var out = 0.0; -for (var i = 0; i < this.symm.cols; i++) { -out += (this.symm.value[row][i] * this.eigenvector.value[i][n]); -} -return out / this.eigenvector.d[n]; -}, "~N,~N"); -Clazz.defineMethod (c$, "getDetails", -function () { -return this.details.toString (); -}); -Clazz.overrideMethod (c$, "run", -function () { -var ps = ((Clazz.isClassDefined ("jalview.analysis.PCA$1") ? 0 : jalview.analysis.PCA.$PCA$1$ ()), Clazz.innerTypeInstance (jalview.analysis.PCA$1, this, null, System.out)); -try { -this.details.append ("PCA Calculation Mode is " + (this.jvCalcMode ? "Jalview variant" : "Original SeqSpace") + "\n"); -var mt = this.m.transpose (); -this.details.append (" --- OrigT * Orig ---- \n"); -if (!this.jvCalcMode) { -this.eigenvector = mt.preMultiply (this.m); -} else { -this.eigenvector = mt.preMultiply (this.m2); -}this.eigenvector.print (ps); -this.symm = this.eigenvector.copy (); -this.eigenvector.tred (); -this.details.append (" ---Tridiag transform matrix ---\n"); -this.details.append (" --- D vector ---\n"); -this.eigenvector.printD (ps); -ps.println (); -this.details.append ("--- E vector ---\n"); -this.eigenvector.printE (ps); -ps.println (); -this.eigenvector.tqli (); -} catch (q) { -if (Clazz.exceptionOf (q, Exception)) { -q.printStackTrace (); -this.details.append ("\n*** Unexpected exception when performing PCA ***\n" + q.getLocalizedMessage ()); -this.details.append ("*** Matrices below may not be fully diagonalised. ***\n"); -} else { -throw q; -} -} -this.details.append (" --- New diagonalization matrix ---\n"); -this.eigenvector.print (ps); -this.details.append (" --- Eigenvalues ---\n"); -this.eigenvector.printD (ps); -ps.println (); -}); -Clazz.defineMethod (c$, "setJvCalcMode", -function (calcMode) { -this.jvCalcMode = calcMode; -}, "~B"); -c$.$PCA$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.analysis, "PCA$1", java.io.PrintStream); -Clazz.defineMethod (c$, "print", -function (x) { -this.b$["jalview.analysis.PCA"].details.append (x); -}, "~S"); -Clazz.defineMethod (c$, "println", -function () { -this.b$["jalview.analysis.PCA"].details.append ("\n"); -}); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (["java.lang.StringBuffer"], "jalview.analysis.PCA", ["jalview.datamodel.BinarySequence", "jalview.math.Matrix", "jalview.schemes.ResidueProperties"], function () { +c$ = Clazz.decorateAsClass (function () { +this.m = null; +this.symm = null; +this.m2 = null; +this.eigenvalue = null; +this.eigenvector = null; +this.details = null; +this.jvCalcMode = true; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "PCA", null, Runnable); +Clazz.prepareFields (c$, function () { +this.details = new StringBuffer (); +}); +Clazz.makeConstructor (c$, +function (s) { +this.construct (s, false); +}, "~A"); +Clazz.makeConstructor (c$, +function (s, nucleotides) { +this.construct (s, nucleotides, null); +}, "~A,~B"); +Clazz.makeConstructor (c$, +function (s, nucleotides, s_m) { +var bs = new Array (s.length); +var ii = 0; +while ((ii < s.length) && (s[ii] != null)) { +bs[ii] = new jalview.datamodel.BinarySequence (s[ii], nucleotides); +bs[ii].encode (); +ii++; +} +var bs2 = new Array (s.length); +ii = 0; +var smtrx = null; +var sm = s_m; +if (sm != null) { +smtrx = jalview.schemes.ResidueProperties.getScoreMatrix (sm); +}if (smtrx == null) { +smtrx = jalview.schemes.ResidueProperties.getScoreMatrix (sm = (nucleotides ? "DNA" : "BLOSUM62")); +}this.details.append ("PCA calculation using " + sm + " sequence similarity matrix\n========\n\n"); +while ((ii < s.length) && (s[ii] != null)) { +bs2[ii] = new jalview.datamodel.BinarySequence (s[ii], nucleotides); +if (smtrx != null) { +try { +bs2[ii].matrixEncode (smtrx); +} catch (x) { +if (Clazz.exceptionOf (x, jalview.datamodel.BinarySequence.InvalidSequenceTypeException)) { +this.details.append ("Unexpected mismatch of sequence type and score matrix. Calculation will not be valid!\n\n"); +} else { +throw x; +} +} +}ii++; +} +var count = 0; +while ((count < bs.length) && (bs[count] != null)) { +count++; +} +var seqmat = Clazz.newDoubleArray (count, bs[0].getDBinary ().length, 0); +var seqmat2 = Clazz.newDoubleArray (count, bs2[0].getDBinary ().length, 0); +var i = 0; +while (i < count) { +seqmat[i] = bs[i].getDBinary (); +seqmat2[i] = bs2[i].getDBinary (); +i++; +} +this.m = new jalview.math.Matrix (seqmat, count, bs[0].getDBinary ().length); +this.m2 = new jalview.math.Matrix (seqmat2, count, bs2[0].getDBinary ().length); +}, "~A,~B,~S"); +Clazz.defineMethod (c$, "getM", +function () { +return this.m; +}); +Clazz.defineMethod (c$, "getEigenvalue", +function (i) { +return this.eigenvector.d[i]; +}, "~N"); +Clazz.defineMethod (c$, "getComponents", +function (l, n, mm, factor) { +var out = Clazz.newFloatArray (this.m.rows, 3, 0); +for (var i = 0; i < this.m.rows; i++) { +out[i][0] = this.component (i, l) * factor; +out[i][1] = this.component (i, n) * factor; +out[i][2] = this.component (i, mm) * factor; +} +return out; +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "component", +function (n) { +var out = Clazz.newDoubleArray (this.m.rows, 0); +for (var i = 0; i < this.m.rows; i++) { +out[i] = this.component (i, n); +} +return out; +}, "~N"); +Clazz.defineMethod (c$, "component", +function (row, n) { +var out = 0.0; +for (var i = 0; i < this.symm.cols; i++) { +out += (this.symm.value[row][i] * this.eigenvector.value[i][n]); +} +return out / this.eigenvector.d[n]; +}, "~N,~N"); +Clazz.defineMethod (c$, "getDetails", +function () { +return this.details.toString (); +}); +Clazz.overrideMethod (c$, "run", +function () { +var ps = ((Clazz.isClassDefined ("jalview.analysis.PCA$1") ? 0 : jalview.analysis.PCA.$PCA$1$ ()), Clazz.innerTypeInstance (jalview.analysis.PCA$1, this, null, System.out)); +try { +this.details.append ("PCA Calculation Mode is " + (this.jvCalcMode ? "Jalview variant" : "Original SeqSpace") + "\n"); +var mt = this.m.transpose (); +this.details.append (" --- OrigT * Orig ---- \n"); +if (!this.jvCalcMode) { +this.eigenvector = mt.preMultiply (this.m); +} else { +this.eigenvector = mt.preMultiply (this.m2); +}this.eigenvector.print (ps); +this.symm = this.eigenvector.copy (); +this.eigenvector.tred (); +this.details.append (" ---Tridiag transform matrix ---\n"); +this.details.append (" --- D vector ---\n"); +this.eigenvector.printD (ps); +ps.println (); +this.details.append ("--- E vector ---\n"); +this.eigenvector.printE (ps); +ps.println (); +this.eigenvector.tqli (); +} catch (q) { +if (Clazz.exceptionOf (q, Exception)) { +q.printStackTrace (); +this.details.append ("\n*** Unexpected exception when performing PCA ***\n" + q.getLocalizedMessage ()); +this.details.append ("*** Matrices below may not be fully diagonalised. ***\n"); +} else { +throw q; +} +} +this.details.append (" --- New diagonalization matrix ---\n"); +this.eigenvector.print (ps); +this.details.append (" --- Eigenvalues ---\n"); +this.eigenvector.printD (ps); +ps.println (); +}); +Clazz.defineMethod (c$, "setJvCalcMode", +function (calcMode) { +this.jvCalcMode = calcMode; +}, "~B"); +c$.$PCA$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.analysis, "PCA$1", java.io.PrintStream); +Clazz.defineMethod (c$, "print", +function (x) { +this.b$["jalview.analysis.PCA"].details.append (x); +}, "~S"); +Clazz.defineMethod (c$, "println", +function () { +this.b$["jalview.analysis.PCA"].details.append ("\n"); +}); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/analysis/ParseProperties.js b/bin/jalview/analysis/ParseProperties.js index d18979d..c117d07 100644 --- a/bin/jalview/analysis/ParseProperties.js +++ b/bin/jalview/analysis/ParseProperties.js @@ -1,75 +1,75 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.ParseProperties", ["jalview.datamodel.AlignmentAnnotation", "jalview.jsdev.RegExp", "java.lang.Double"], function () { -c$ = Clazz.decorateAsClass (function () { -this.al = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "ParseProperties"); -Clazz.makeConstructor (c$, -function (al) { -this.al = al; -}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "getScoresFromDescription", -function (ScoreName, ScoreDescriptions, regex, repeat) { -return this.getScoresFromDescription ( Clazz.newArray (-1, [ScoreName]), Clazz.newArray (-1, [ScoreDescriptions]), regex, repeat); -}, "~S,~S,~S,~B"); -Clazz.defineMethod (c$, "getScoresFromDescription", -function (ScoreNames, ScoreDescriptions, regex, repeat) { -return this.getScoresFromDescription (this.al.getSequencesArray (), ScoreNames, ScoreDescriptions, regex, repeat); -}, "~A,~A,~S,~B"); -Clazz.defineMethod (c$, "getScoresFromDescription", -function (seqs, ScoreNames, ScoreDescriptions, regex, repeat) { -var count = 0; -var pattern = jalview.jsdev.RegExp.newRegex ([regex]); -if (pattern.numSubs () > ScoreNames.length) { -var onamelen = ScoreNames.length; -var tnames = new Array (pattern.numSubs () + 1); -System.arraycopy (ScoreNames, 0, tnames, 0, ScoreNames.length); -var base = tnames[ScoreNames.length - 1]; -ScoreNames = tnames; -var descrbase = ScoreDescriptions[onamelen - 1]; -if (descrbase == null) { -descrbase = "Score parsed from (" + regex + ")"; -}tnames = new Array (pattern.numSubs () + 1); -System.arraycopy (ScoreDescriptions, 0, tnames, 0, ScoreDescriptions.length); -ScoreDescriptions = tnames; -for (var i = onamelen; i < ScoreNames.length; i++) { -ScoreNames[i] = base + "_" + i; -ScoreDescriptions[i] = descrbase + " (column " + i + ")"; -} -}for (var i = 0; i < seqs.length; i++) { -var descr = seqs[i].getDescription (); -if (descr == null) { -continue; -}var pos = 0; -var added = false; -var reps = 0; -while ((repeat || pos == 0) && pattern.searchFrom (descr, pos)) { -pos = pattern.matchedTo (); -for (var cols = 0; cols < pattern.numSubs (); cols++) { -var sstring = pattern.stringMatchedI (cols + 1); -var score = NaN; -try { -score = new Double (sstring).doubleValue (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -continue; -} else { -throw e; -} -} -var an = new jalview.datamodel.AlignmentAnnotation (ScoreNames[cols] + ((reps > 0) ? "_" + reps : ""), ScoreDescriptions[cols], null); -an.setScore (score); -System.out.println (seqs[i].getName () + " score: '" + ScoreNames[cols] + "' = " + score); -an.setSequenceRef (seqs[i]); -seqs[i].addAlignmentAnnotation (an); -this.al.addAnnotation (an); -added = true; -} -reps++; -} -if (added) { -count++; -}} -return count; -}, "~A,~A,~A,~S,~B"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.ParseProperties", ["jalview.datamodel.AlignmentAnnotation", "jalview.jsdev.RegExp", "java.lang.Double"], function () { +c$ = Clazz.decorateAsClass (function () { +this.al = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "ParseProperties"); +Clazz.makeConstructor (c$, +function (al) { +this.al = al; +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "getScoresFromDescription", +function (ScoreName, ScoreDescriptions, regex, repeat) { +return this.getScoresFromDescription ( Clazz.newArray (-1, [ScoreName]), Clazz.newArray (-1, [ScoreDescriptions]), regex, repeat); +}, "~S,~S,~S,~B"); +Clazz.defineMethod (c$, "getScoresFromDescription", +function (ScoreNames, ScoreDescriptions, regex, repeat) { +return this.getScoresFromDescription (this.al.getSequencesArray (), ScoreNames, ScoreDescriptions, regex, repeat); +}, "~A,~A,~S,~B"); +Clazz.defineMethod (c$, "getScoresFromDescription", +function (seqs, ScoreNames, ScoreDescriptions, regex, repeat) { +var count = 0; +var pattern = jalview.jsdev.RegExp.newRegex ([regex]); +if (pattern.numSubs () > ScoreNames.length) { +var onamelen = ScoreNames.length; +var tnames = new Array (pattern.numSubs () + 1); +System.arraycopy (ScoreNames, 0, tnames, 0, ScoreNames.length); +var base = tnames[ScoreNames.length - 1]; +ScoreNames = tnames; +var descrbase = ScoreDescriptions[onamelen - 1]; +if (descrbase == null) { +descrbase = "Score parsed from (" + regex + ")"; +}tnames = new Array (pattern.numSubs () + 1); +System.arraycopy (ScoreDescriptions, 0, tnames, 0, ScoreDescriptions.length); +ScoreDescriptions = tnames; +for (var i = onamelen; i < ScoreNames.length; i++) { +ScoreNames[i] = base + "_" + i; +ScoreDescriptions[i] = descrbase + " (column " + i + ")"; +} +}for (var i = 0; i < seqs.length; i++) { +var descr = seqs[i].getDescription (); +if (descr == null) { +continue; +}var pos = 0; +var added = false; +var reps = 0; +while ((repeat || pos == 0) && pattern.searchFrom (descr, pos)) { +pos = pattern.matchedTo (); +for (var cols = 0; cols < pattern.numSubs (); cols++) { +var sstring = pattern.stringMatchedI (cols + 1); +var score = NaN; +try { +score = new Double (sstring).doubleValue (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +continue; +} else { +throw e; +} +} +var an = new jalview.datamodel.AlignmentAnnotation (ScoreNames[cols] + ((reps > 0) ? "_" + reps : ""), ScoreDescriptions[cols], null); +an.setScore (score); +System.out.println (seqs[i].getName () + " score: '" + ScoreNames[cols] + "' = " + score); +an.setSequenceRef (seqs[i]); +seqs[i].addAlignmentAnnotation (an); +this.al.addAnnotation (an); +added = true; +} +reps++; +} +if (added) { +count++; +}} +return count; +}, "~A,~A,~A,~S,~B"); +}); diff --git a/bin/jalview/analysis/Rna.js b/bin/jalview/analysis/Rna.js index 0ed5a63..4b23f2d 100644 --- a/bin/jalview/analysis/Rna.js +++ b/bin/jalview/analysis/Rna.js @@ -1,106 +1,106 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (["java.util.Arrays", "$.HashSet", "$.Hashtable"], "jalview.analysis.Rna", ["jalview.analysis.SecStrConsensus", "$.WUSSParseException", "jalview.datamodel.SequenceFeature", "jalview.util.MessageManager", "java.lang.StringBuffer", "java.util.ArrayList", "$.Stack", "$.Vector"], function () { -c$ = Clazz.declareType (jalview.analysis, "Rna"); -c$.isOpeningParenthesis = Clazz.defineMethod (c$, "isOpeningParenthesis", -($fz = function (c) { -return jalview.analysis.Rna.openingParsSet.contains (new Character (c).charCodeAt (0)); -}, $fz.isPrivate = true, $fz), "~S"); -c$.isClosingParenthesis = Clazz.defineMethod (c$, "isClosingParenthesis", -($fz = function (c) { -return jalview.analysis.Rna.closingParsSet.contains (new Character (c).charCodeAt (0)); -}, $fz.isPrivate = true, $fz), "~S"); -c$.matchingOpeningParenthesis = Clazz.defineMethod (c$, "matchingOpeningParenthesis", -($fz = function (closingParenthesis) { -if (!jalview.analysis.Rna.isClosingParenthesis (closingParenthesis)) { -throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis", Clazz.newArray (-1, [ new StringBuffer (closingParenthesis.charCodeAt (0)).toString ()])), -1); -}return String.fromCharCode (jalview.analysis.Rna.closingToOpening.get (new Character (closingParenthesis).charCodeAt (0))); -}, $fz.isPrivate = true, $fz), "~S"); -c$.GetSimpleBPs = Clazz.defineMethod (c$, "GetSimpleBPs", -function (line) { -var stacks = new java.util.Hashtable (); -var pairs = new java.util.Vector (); -var i = 0; -while (i < line.length) { -var base = line.charAt (i); -if (jalview.analysis.Rna.isOpeningParenthesis (base)) { -if (!stacks.containsKey (new Character (base).charCodeAt (0))) { -stacks.put (new Character (base).charCodeAt (0), new java.util.Stack ()); -}stacks.get (new Character (base).charCodeAt (0)).push (new Integer (i)); -} else if (jalview.analysis.Rna.isClosingParenthesis (base)) { -var opening = jalview.analysis.Rna.matchingOpeningParenthesis (base); -if (!stacks.containsKey (new Character (opening).charCodeAt (0))) { -throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.mismatched_unseen_closing_char", Clazz.newArray (-1, [ new StringBuffer (base.charCodeAt (0)).toString ()])), i); -}var stack = stacks.get (new Character (opening).charCodeAt (0)); -if (stack.isEmpty ()) { -throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.mismatched_closing_char", Clazz.newArray (-1, [ new StringBuffer (base.charCodeAt (0)).toString ()])), i); -}var temp = (stack.pop ()).intValue (); -pairs.add ( new jalview.analysis.SecStrConsensus.SimpleBP (temp, i)); -}i++; -} -for (var opening, $opening = stacks.keySet ().iterator (); $opening.hasNext () && ((opening = $opening.next ()) || true);) { -var stack = stacks.get (new Character (opening).charCodeAt (0)); -if (!stack.empty ()) { -throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.mismatched_opening_char", Clazz.newArray (-1, [ new StringBuffer (opening.charCodeAt (0)).toString (), Integer.$valueOf ((stack.pop ()).intValue ()).toString ()])), i); -}} -return pairs; -}, "CharSequence"); -c$.GetBasePairs = Clazz.defineMethod (c$, "GetBasePairs", -function (line) { -var bps = jalview.analysis.Rna.GetSimpleBPs (line); -var outPairs = new Array (bps.size ()); -for (var p = 0; p < bps.size (); p++) { -var bp = bps.elementAt (p); -outPairs[p] = new jalview.datamodel.SequenceFeature ("RNA helix", "", "", bp.getBP5 (), bp.getBP3 (), ""); -} -return outPairs; -}, "CharSequence"); -c$.GetModeleBP = Clazz.defineMethod (c$, "GetModeleBP", -function (line) { -var bps = jalview.analysis.Rna.GetSimpleBPs (line); -return new java.util.ArrayList (bps); -}, "CharSequence"); -c$.HelixMap = Clazz.defineMethod (c$, "HelixMap", -function (pairs) { -var helix = 0; -var lastopen = 0; -var lastclose = 9999999; -var i = pairs.length; -var open; -var close; -var j; -var helices = new java.util.Hashtable (); -for (i = 0; i < pairs.length; i++) { -open = pairs[i].getBegin (); -close = pairs[i].getEnd (); -if (open > lastclose) { -helix++; -}j = pairs.length - 1; -while (j >= 0) { -var popen = pairs[j].getBegin (); -if ((popen < lastopen) && (popen > open)) { -if (helices.containsValue (new Integer (popen)) && (((helices.get (new Integer (popen)))).intValue () === helix)) { -continue; -} else { -helix++; -break; -}}j -= 1; -} -helices.put (new Integer (open), new Integer (helix)); -helices.put (new Integer (close), new Integer (helix)); -pairs[i].setFeatureGroup (Integer.toString (helix)); -lastopen = open; -lastclose = close; -} -}, "~A"); -c$.pairHash = c$.prototype.pairHash = new java.util.Hashtable (); -Clazz.defineStatics (c$, -"openingPars", Clazz.newArray (-1, [new Character ('('), new Character ('['), new Character ('{'), new Character ('<'), new Character ('A'), new Character ('B'), new Character ('C'), new Character ('D'), new Character ('E'), new Character ('F'), new Character ('G'), new Character ('H'), new Character ('I'), new Character ('J'), new Character ('K'), new Character ('L'), new Character ('M'), new Character ('N'), new Character ('O'), new Character ('P'), new Character ('Q'), new Character ('R'), new Character ('S'), new Character ('T'), new Character ('U'), new Character ('V'), new Character ('W'), new Character ('X'), new Character ('Y'), new Character ('Z')]), -"closingPars", Clazz.newArray (-1, [new Character (')'), new Character (']'), new Character ('}'), new Character ('>'), new Character ('a'), new Character ('b'), new Character ('c'), new Character ('d'), new Character ('e'), new Character ('f'), new Character ('g'), new Character ('h'), new Character ('i'), new Character ('j'), new Character ('k'), new Character ('l'), new Character ('m'), new Character ('n'), new Character ('o'), new Character ('p'), new Character ('q'), new Character ('r'), new Character ('s'), new Character ('t'), new Character ('u'), new Character ('v'), new Character ('w'), new Character ('x'), new Character ('y'), new Character ('z')])); -c$.openingParsSet = c$.prototype.openingParsSet = new java.util.HashSet (java.util.Arrays.asList (jalview.analysis.Rna.openingPars)); -c$.closingParsSet = c$.prototype.closingParsSet = new java.util.HashSet (java.util.Arrays.asList (jalview.analysis.Rna.closingPars)); -c$.closingToOpening = c$.prototype.closingToOpening = new java.util.Hashtable (); -{ -for (var i = 0; i < jalview.analysis.Rna.openingPars.length; i++) { -jalview.analysis.Rna.closingToOpening.put (jalview.analysis.Rna.closingPars[i], jalview.analysis.Rna.openingPars[i]); -} -}}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (["java.util.Arrays", "$.HashSet", "$.Hashtable"], "jalview.analysis.Rna", ["jalview.analysis.SecStrConsensus", "$.WUSSParseException", "jalview.datamodel.SequenceFeature", "jalview.util.MessageManager", "java.lang.StringBuffer", "java.util.ArrayList", "$.Stack", "$.Vector"], function () { +c$ = Clazz.declareType (jalview.analysis, "Rna"); +c$.isOpeningParenthesis = Clazz.defineMethod (c$, "isOpeningParenthesis", +($fz = function (c) { +return jalview.analysis.Rna.openingParsSet.contains (new Character (c).charCodeAt (0)); +}, $fz.isPrivate = true, $fz), "~S"); +c$.isClosingParenthesis = Clazz.defineMethod (c$, "isClosingParenthesis", +($fz = function (c) { +return jalview.analysis.Rna.closingParsSet.contains (new Character (c).charCodeAt (0)); +}, $fz.isPrivate = true, $fz), "~S"); +c$.matchingOpeningParenthesis = Clazz.defineMethod (c$, "matchingOpeningParenthesis", +($fz = function (closingParenthesis) { +if (!jalview.analysis.Rna.isClosingParenthesis (closingParenthesis)) { +throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis", Clazz.newArray (-1, [ new StringBuffer (closingParenthesis.charCodeAt (0)).toString ()])), -1); +}return String.fromCharCode (jalview.analysis.Rna.closingToOpening.get (new Character (closingParenthesis).charCodeAt (0))); +}, $fz.isPrivate = true, $fz), "~S"); +c$.GetSimpleBPs = Clazz.defineMethod (c$, "GetSimpleBPs", +function (line) { +var stacks = new java.util.Hashtable (); +var pairs = new java.util.Vector (); +var i = 0; +while (i < line.length) { +var base = line.charAt (i); +if (jalview.analysis.Rna.isOpeningParenthesis (base)) { +if (!stacks.containsKey (new Character (base).charCodeAt (0))) { +stacks.put (new Character (base).charCodeAt (0), new java.util.Stack ()); +}stacks.get (new Character (base).charCodeAt (0)).push (new Integer (i)); +} else if (jalview.analysis.Rna.isClosingParenthesis (base)) { +var opening = jalview.analysis.Rna.matchingOpeningParenthesis (base); +if (!stacks.containsKey (new Character (opening).charCodeAt (0))) { +throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.mismatched_unseen_closing_char", Clazz.newArray (-1, [ new StringBuffer (base.charCodeAt (0)).toString ()])), i); +}var stack = stacks.get (new Character (opening).charCodeAt (0)); +if (stack.isEmpty ()) { +throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.mismatched_closing_char", Clazz.newArray (-1, [ new StringBuffer (base.charCodeAt (0)).toString ()])), i); +}var temp = (stack.pop ()).intValue (); +pairs.add ( new jalview.analysis.SecStrConsensus.SimpleBP (temp, i)); +}i++; +} +for (var opening, $opening = stacks.keySet ().iterator (); $opening.hasNext () && ((opening = $opening.next ()) || true);) { +var stack = stacks.get (new Character (opening).charCodeAt (0)); +if (!stack.empty ()) { +throw new jalview.analysis.WUSSParseException (jalview.util.MessageManager.formatMessage ("exception.mismatched_opening_char", Clazz.newArray (-1, [ new StringBuffer (opening.charCodeAt (0)).toString (), Integer.$valueOf ((stack.pop ()).intValue ()).toString ()])), i); +}} +return pairs; +}, "CharSequence"); +c$.GetBasePairs = Clazz.defineMethod (c$, "GetBasePairs", +function (line) { +var bps = jalview.analysis.Rna.GetSimpleBPs (line); +var outPairs = new Array (bps.size ()); +for (var p = 0; p < bps.size (); p++) { +var bp = bps.elementAt (p); +outPairs[p] = new jalview.datamodel.SequenceFeature ("RNA helix", "", "", bp.getBP5 (), bp.getBP3 (), ""); +} +return outPairs; +}, "CharSequence"); +c$.GetModeleBP = Clazz.defineMethod (c$, "GetModeleBP", +function (line) { +var bps = jalview.analysis.Rna.GetSimpleBPs (line); +return new java.util.ArrayList (bps); +}, "CharSequence"); +c$.HelixMap = Clazz.defineMethod (c$, "HelixMap", +function (pairs) { +var helix = 0; +var lastopen = 0; +var lastclose = 9999999; +var i = pairs.length; +var open; +var close; +var j; +var helices = new java.util.Hashtable (); +for (i = 0; i < pairs.length; i++) { +open = pairs[i].getBegin (); +close = pairs[i].getEnd (); +if (open > lastclose) { +helix++; +}j = pairs.length - 1; +while (j >= 0) { +var popen = pairs[j].getBegin (); +if ((popen < lastopen) && (popen > open)) { +if (helices.containsValue (new Integer (popen)) && (((helices.get (new Integer (popen)))).intValue () === helix)) { +continue; +} else { +helix++; +break; +}}j -= 1; +} +helices.put (new Integer (open), new Integer (helix)); +helices.put (new Integer (close), new Integer (helix)); +pairs[i].setFeatureGroup (Integer.toString (helix)); +lastopen = open; +lastclose = close; +} +}, "~A"); +c$.pairHash = c$.prototype.pairHash = new java.util.Hashtable (); +Clazz.defineStatics (c$, +"openingPars", Clazz.newArray (-1, [new Character ('('), new Character ('['), new Character ('{'), new Character ('<'), new Character ('A'), new Character ('B'), new Character ('C'), new Character ('D'), new Character ('E'), new Character ('F'), new Character ('G'), new Character ('H'), new Character ('I'), new Character ('J'), new Character ('K'), new Character ('L'), new Character ('M'), new Character ('N'), new Character ('O'), new Character ('P'), new Character ('Q'), new Character ('R'), new Character ('S'), new Character ('T'), new Character ('U'), new Character ('V'), new Character ('W'), new Character ('X'), new Character ('Y'), new Character ('Z')]), +"closingPars", Clazz.newArray (-1, [new Character (')'), new Character (']'), new Character ('}'), new Character ('>'), new Character ('a'), new Character ('b'), new Character ('c'), new Character ('d'), new Character ('e'), new Character ('f'), new Character ('g'), new Character ('h'), new Character ('i'), new Character ('j'), new Character ('k'), new Character ('l'), new Character ('m'), new Character ('n'), new Character ('o'), new Character ('p'), new Character ('q'), new Character ('r'), new Character ('s'), new Character ('t'), new Character ('u'), new Character ('v'), new Character ('w'), new Character ('x'), new Character ('y'), new Character ('z')])); +c$.openingParsSet = c$.prototype.openingParsSet = new java.util.HashSet (java.util.Arrays.asList (jalview.analysis.Rna.openingPars)); +c$.closingParsSet = c$.prototype.closingParsSet = new java.util.HashSet (java.util.Arrays.asList (jalview.analysis.Rna.closingPars)); +c$.closingToOpening = c$.prototype.closingToOpening = new java.util.Hashtable (); +{ +for (var i = 0; i < jalview.analysis.Rna.openingPars.length; i++) { +jalview.analysis.Rna.closingToOpening.put (jalview.analysis.Rna.closingPars[i], jalview.analysis.Rna.openingPars[i]); +} +}}); diff --git a/bin/jalview/analysis/SecStrConsensus.class b/bin/jalview/analysis/SecStrConsensus.class index d4b9f081b1b0e5b22b5cf7ecb592f58913c91e35..c7ac833cf884e5c81c0c1334e88a33eecc926954 100644 GIT binary patch delta 50 zcmeyR`BQU4tPo@4<~SifCgvgrj>-8VYT`x=9PA7g>AY7+Vk9PA7g> i + 1) { -fact1 = tab[i + 1][k - 1]; -}var fact2 = 0; -if (k < j) { -fact2 = tab[k + 1][j]; -}tab[i][j] = Math.max (tab[i][j], jalview.analysis.SecStrConsensus.basePairScore (seq, i, k) + fact1 + fact2); -}} -}} -} -return tab; -}, $fz.isPrivate = true, $fz), "java.util.ArrayList"); -c$.backtrack = Clazz.defineMethod (c$, "backtrack", -($fz = function (tab, seq) { -return jalview.analysis.SecStrConsensus.backtrack (tab, seq, 0, seq.size () - 1); -}, $fz.isPrivate = true, $fz), "~A,java.util.ArrayList"); -c$.backtrack = Clazz.defineMethod (c$, "backtrack", -($fz = function (tab, seq, i, j) { -var result = new java.util.ArrayList (); -if (i < j) { -var indices = new java.util.ArrayList (); -indices.add (new Integer (-1)); -for (var k = i + 1; k <= j; k++) { -indices.add (new Integer (k)); -} -for (var k, $k = indices.iterator (); $k.hasNext () && ((k = $k.next ()) || true);) { -if (k == -1) { -if (tab[i][j] == tab[i + 1][j]) { -result = jalview.analysis.SecStrConsensus.backtrack (tab, seq, i + 1, j); -}} else { -if (jalview.analysis.SecStrConsensus.canBasePair (seq, i, k)) { -var fact1 = 0; -if (k > i + 1) { -fact1 = tab[i + 1][k - 1]; -}var fact2 = 0; -if (k < j) { -fact2 = tab[k + 1][j]; -}if (tab[i][j] == jalview.analysis.SecStrConsensus.basePairScore (seq, i, k) + fact1 + fact2) { -result = jalview.analysis.SecStrConsensus.backtrack (tab, seq, i + 1, k - 1); -result.addAll (jalview.analysis.SecStrConsensus.backtrack (tab, seq, k + 1, j)); -result.add ( new jalview.analysis.SecStrConsensus.SimpleBP (i, k)); -}}}} -} else if (i == j) { -} else { -}return result; -}, $fz.isPrivate = true, $fz), "~A,java.util.ArrayList,~N,~N"); -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.bp5 = 0; -this.bp3 = 0; -Clazz.instantialize (this, arguments); -}, jalview.analysis.SecStrConsensus, "SimpleBP"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (a, b) { -this.bp5 = a; -this.bp3 = b; -}, "~N,~N"); -Clazz.defineMethod (c$, "setBP5", -function (a) { -this.bp5 = a; -}, "~N"); -Clazz.defineMethod (c$, "setBP3", -function (a) { -this.bp3 = a; -}, "~N"); -Clazz.defineMethod (c$, "getBP5", -function () { -return this.bp5; -}); -Clazz.defineMethod (c$, "getBP3", -function () { -return this.bp3; -}); -Clazz.overrideMethod (c$, "toString", -function () { -return "(" + this.bp5 + "," + this.bp3 + ")"; -}); -c$ = Clazz.p0p (); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.SecStrConsensus", ["java.util.ArrayList", "$.Hashtable"], function () { +c$ = Clazz.declareType (jalview.analysis, "SecStrConsensus"); +c$.extractConsensus = Clazz.defineMethod (c$, "extractConsensus", +function (bps) { +var maxlength = 0; +for (var strs, $strs = bps.iterator (); $strs.hasNext () && ((strs = $strs.next ()) || true);) { +for (var bp, $bp = strs.iterator (); $bp.hasNext () && ((bp = $bp.next ()) || true);) { +maxlength = Math.max (1 + Math.max (bp.bp5, bp.bp3), maxlength); +} +} +var seq = new java.util.ArrayList (); +for (var i = 0; i < maxlength; i++) { +seq.add ( new java.util.Hashtable ()); +} +for (var strs, $strs = bps.iterator (); $strs.hasNext () && ((strs = $strs.next ()) || true);) { +for (var bp, $bp = strs.iterator (); $bp.hasNext () && ((bp = $bp.next ()) || true);) { +var i = bp.bp5; +var j = bp.bp3; +var h = seq.get (i); +if (!h.containsKey (new Integer (j))) { +h.put (new Integer (j), new Double (0.0)); +}h.put (new Integer (j), new Double ((h.get (new Integer (j))).doubleValue () + 1.)); +} +} +var mat = jalview.analysis.SecStrConsensus.fillMatrix (seq); +var res = jalview.analysis.SecStrConsensus.backtrack (mat, seq); +var finalres = Clazz.newIntArray (seq.size (), 0); +for (var i = 0; i < seq.size (); i++) { +finalres[i] = -1; +} +for (var bp, $bp = res.iterator (); $bp.hasNext () && ((bp = $bp.next ()) || true);) { +finalres[bp.bp5] = bp.bp3; +finalres[bp.bp3] = bp.bp5; +} +return finalres; +}, "java.util.ArrayList"); +c$.canBasePair = Clazz.defineMethod (c$, "canBasePair", +($fz = function (seq, i, k) { +return seq.get (i).containsKey (new Integer (k)); +}, $fz.isPrivate = true, $fz), "java.util.ArrayList,~N,~N"); +c$.basePairScore = Clazz.defineMethod (c$, "basePairScore", +($fz = function (seq, i, k) { +return seq.get (i).get (new Integer (k)); +}, $fz.isPrivate = true, $fz), "java.util.ArrayList,~N,~N"); +c$.fillMatrix = Clazz.defineMethod (c$, "fillMatrix", +($fz = function (seq) { +var n = seq.size (); +var tab = Clazz.newDoubleArray (n, n, 0); +for (var m = 1; m <= n; m++) { +for (var i = 0; i < n - m + 1; i++) { +var j = i + m - 1; +tab[i][j] = 0; +if (i < j) { +tab[i][j] = Math.max (tab[i][j], tab[i + 1][j]); +for (var k = i + 1; k <= j; k++) { +if (jalview.analysis.SecStrConsensus.canBasePair (seq, i, k)) { +var fact1 = 0; +if (k > i + 1) { +fact1 = tab[i + 1][k - 1]; +}var fact2 = 0; +if (k < j) { +fact2 = tab[k + 1][j]; +}tab[i][j] = Math.max (tab[i][j], jalview.analysis.SecStrConsensus.basePairScore (seq, i, k) + fact1 + fact2); +}} +}} +} +return tab; +}, $fz.isPrivate = true, $fz), "java.util.ArrayList"); +c$.backtrack = Clazz.defineMethod (c$, "backtrack", +($fz = function (tab, seq) { +return jalview.analysis.SecStrConsensus.backtrack (tab, seq, 0, seq.size () - 1); +}, $fz.isPrivate = true, $fz), "~A,java.util.ArrayList"); +c$.backtrack = Clazz.defineMethod (c$, "backtrack", +($fz = function (tab, seq, i, j) { +var result = new java.util.ArrayList (); +if (i < j) { +var indices = new java.util.ArrayList (); +indices.add (new Integer (-1)); +for (var k = i + 1; k <= j; k++) { +indices.add (new Integer (k)); +} +for (var k, $k = indices.iterator (); $k.hasNext () && ((k = $k.next ()) || true);) { +if (k == -1) { +if (tab[i][j] == tab[i + 1][j]) { +result = jalview.analysis.SecStrConsensus.backtrack (tab, seq, i + 1, j); +}} else { +if (jalview.analysis.SecStrConsensus.canBasePair (seq, i, k)) { +var fact1 = 0; +if (k > i + 1) { +fact1 = tab[i + 1][k - 1]; +}var fact2 = 0; +if (k < j) { +fact2 = tab[k + 1][j]; +}if (tab[i][j] == jalview.analysis.SecStrConsensus.basePairScore (seq, i, k) + fact1 + fact2) { +result = jalview.analysis.SecStrConsensus.backtrack (tab, seq, i + 1, k - 1); +result.addAll (jalview.analysis.SecStrConsensus.backtrack (tab, seq, k + 1, j)); +result.add ( new jalview.analysis.SecStrConsensus.SimpleBP (i, k)); +}}}} +} else if (i == j) { +} else { +}return result; +}, $fz.isPrivate = true, $fz), "~A,java.util.ArrayList,~N,~N"); +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.bp5 = 0; +this.bp3 = 0; +Clazz.instantialize (this, arguments); +}, jalview.analysis.SecStrConsensus, "SimpleBP"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (a, b) { +this.bp5 = a; +this.bp3 = b; +}, "~N,~N"); +Clazz.defineMethod (c$, "setBP5", +function (a) { +this.bp5 = a; +}, "~N"); +Clazz.defineMethod (c$, "setBP3", +function (a) { +this.bp3 = a; +}, "~N"); +Clazz.defineMethod (c$, "getBP5", +function () { +return this.bp5; +}); +Clazz.defineMethod (c$, "getBP3", +function () { +return this.bp3; +}); +Clazz.overrideMethod (c$, "toString", +function () { +return "(" + this.bp5 + "," + this.bp3 + ")"; +}); +c$ = Clazz.p0p (); +}); diff --git a/bin/jalview/analysis/SeqsetUtils.js b/bin/jalview/analysis/SeqsetUtils.js index a93fedd..f8914e1 100644 --- a/bin/jalview/analysis/SeqsetUtils.js +++ b/bin/jalview/analysis/SeqsetUtils.js @@ -1,124 +1,124 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.SeqsetUtils", ["jalview.analysis.AlignSeq", "$.SequenceIdMatcher", "jalview.datamodel.Sequence", "jalview.util.Comparison", "java.util.Hashtable", "$.Vector"], function () { -c$ = Clazz.declareType (jalview.analysis, "SeqsetUtils"); -c$.SeqCharacterHash = Clazz.defineMethod (c$, "SeqCharacterHash", -function (seq) { -var sqinfo = new java.util.Hashtable (); -sqinfo.put ("Name", seq.getName ()); -sqinfo.put ("Start", new Integer (seq.getStart ())); -sqinfo.put ("End", new Integer (seq.getEnd ())); -if (seq.getDescription () != null) { -sqinfo.put ("Description", seq.getDescription ()); -}var sfeat = new java.util.Vector (); -var sfarray = seq.getSequenceFeatures (); -if (sfarray != null && sfarray.length > 0) { -for (var i = 0; i < sfarray.length; i++) { -sfeat.addElement (sfarray[i]); -} -}sqinfo.put ("SeqFeatures", sfeat); -sqinfo.put ("PdbId", (seq.getPDBId () != null) ? seq.getPDBId () : new java.util.Vector ()); -sqinfo.put ("datasetSequence", (seq.getDatasetSequence () != null) ? seq.getDatasetSequence () : new jalview.datamodel.Sequence ("THISISAPLACEHOLDER", "")); -return sqinfo; -}, "jalview.datamodel.SequenceI"); -c$.SeqCharacterUnhash = Clazz.defineMethod (c$, "SeqCharacterUnhash", -function (sq, sqinfo) { -var namePresent = true; -if (sqinfo == null) { -return false; -}var oldname = sqinfo.get ("Name"); -var start = sqinfo.get ("Start"); -var end = sqinfo.get ("End"); -var sfeatures = sqinfo.get ("SeqFeatures"); -var pdbid = sqinfo.get ("PdbId"); -var description = sqinfo.get ("Description"); -var seqds = sqinfo.get ("datasetSequence"); -if (oldname == null) { -namePresent = false; -} else { -sq.setName (oldname); -}if (pdbid != null && pdbid.size () > 0) { -sq.setPDBId (pdbid); -}if ((start != null) && (end != null)) { -sq.setStart (start.intValue ()); -sq.setEnd (end.intValue ()); -}if ((sfeatures != null) && (sfeatures.size () > 0)) { -var sfarray = new Array (sfeatures.size ()); -for (var is = 0, isize = sfeatures.size (); is < isize; is++) { -sfarray[is] = sfeatures.elementAt (is); -} -sq.setSequenceFeatures (sfarray); -}if (description != null) { -sq.setDescription (description); -}if ((seqds != null) && !(seqds.getName ().equals ("THISISAPLACEHOLDER") && seqds.getLength () == 0)) { -sq.setDatasetSequence (seqds); -}return namePresent; -}, "jalview.datamodel.SequenceI,java.util.Hashtable"); -c$.unique_name = Clazz.defineMethod (c$, "unique_name", -function (i) { -return String.instantialize ("Sequence" + i); -}, "~N"); -c$.uniquify = Clazz.defineMethod (c$, "uniquify", -function (sequences, write_names) { -var map = new java.util.Hashtable (); -for (var i = 0; i < sequences.length; i++) { -var safename = jalview.analysis.SeqsetUtils.unique_name (i); -map.put (safename, jalview.analysis.SeqsetUtils.SeqCharacterHash (sequences[i])); -if (write_names) { -sequences[i].setName (safename); -}} -return map; -}, "~A,~B"); -c$.deuniquify = Clazz.defineMethod (c$, "deuniquify", -function (map, sequences) { -return jalview.analysis.SeqsetUtils.deuniquify (map, sequences, true); -}, "java.util.Hashtable,~A"); -c$.deuniquify = Clazz.defineMethod (c$, "deuniquify", -function (map, sequences, quiet) { -var matcher = new jalview.analysis.SequenceIdMatcher (sequences); -var msq = null; -var keys = map.keys (); -var unmatched = new java.util.Vector (); -for (var i = 0, j = sequences.length; i < j; i++) { -unmatched.addElement (sequences[i]); -} -while (keys.hasMoreElements ()) { -var key = keys.nextElement (); -if (Clazz.instanceOf (key, String)) { -if ((msq = matcher.findIdMatch (key)) != null) { -var sqinfo = map.get (key); -unmatched.removeElement (msq); -jalview.analysis.SeqsetUtils.SeqCharacterUnhash (msq, sqinfo); -} else { -if (!quiet) { -System.err.println ("Can't find '" + (key) + "' in uniquified alignment"); -}}}} -if (unmatched.size () > 0 && !quiet) { -System.err.println ("Did not find matches for :"); -for (var i = unmatched.elements (); i.hasMoreElements (); System.out.println ((i.nextElement ()).getName ())) { -;} -return false; -}return true; -}, "java.util.Hashtable,~A,~B"); -c$.getNonEmptySequenceSet = Clazz.defineMethod (c$, "getNonEmptySequenceSet", -function (sequences) { -var ungapped = Clazz.newBooleanArray (sequences.length, false); -var msflen = 0; -for (var i = 0, j = sequences.length; i < j; i++) { -var tempseq = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, sequences[i].getSequenceAsString ()); -if (tempseq.length == 0) { -ungapped[i] = false; -} else { -ungapped[i] = true; -msflen++; -}} -if (msflen == 0) { -return null; -}var mset = new Array (msflen); -for (var i = 0, j = sequences.length, k = 0; i < j; i++) { -if (ungapped[i]) { -mset[k++] = sequences[i]; -}} -ungapped = null; -return mset; -}, "~A"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.SeqsetUtils", ["jalview.analysis.AlignSeq", "$.SequenceIdMatcher", "jalview.datamodel.Sequence", "jalview.util.Comparison", "java.util.Hashtable", "$.Vector"], function () { +c$ = Clazz.declareType (jalview.analysis, "SeqsetUtils"); +c$.SeqCharacterHash = Clazz.defineMethod (c$, "SeqCharacterHash", +function (seq) { +var sqinfo = new java.util.Hashtable (); +sqinfo.put ("Name", seq.getName ()); +sqinfo.put ("Start", new Integer (seq.getStart ())); +sqinfo.put ("End", new Integer (seq.getEnd ())); +if (seq.getDescription () != null) { +sqinfo.put ("Description", seq.getDescription ()); +}var sfeat = new java.util.Vector (); +var sfarray = seq.getSequenceFeatures (); +if (sfarray != null && sfarray.length > 0) { +for (var i = 0; i < sfarray.length; i++) { +sfeat.addElement (sfarray[i]); +} +}sqinfo.put ("SeqFeatures", sfeat); +sqinfo.put ("PdbId", (seq.getPDBId () != null) ? seq.getPDBId () : new java.util.Vector ()); +sqinfo.put ("datasetSequence", (seq.getDatasetSequence () != null) ? seq.getDatasetSequence () : new jalview.datamodel.Sequence ("THISISAPLACEHOLDER", "")); +return sqinfo; +}, "jalview.datamodel.SequenceI"); +c$.SeqCharacterUnhash = Clazz.defineMethod (c$, "SeqCharacterUnhash", +function (sq, sqinfo) { +var namePresent = true; +if (sqinfo == null) { +return false; +}var oldname = sqinfo.get ("Name"); +var start = sqinfo.get ("Start"); +var end = sqinfo.get ("End"); +var sfeatures = sqinfo.get ("SeqFeatures"); +var pdbid = sqinfo.get ("PdbId"); +var description = sqinfo.get ("Description"); +var seqds = sqinfo.get ("datasetSequence"); +if (oldname == null) { +namePresent = false; +} else { +sq.setName (oldname); +}if (pdbid != null && pdbid.size () > 0) { +sq.setPDBId (pdbid); +}if ((start != null) && (end != null)) { +sq.setStart (start.intValue ()); +sq.setEnd (end.intValue ()); +}if ((sfeatures != null) && (sfeatures.size () > 0)) { +var sfarray = new Array (sfeatures.size ()); +for (var is = 0, isize = sfeatures.size (); is < isize; is++) { +sfarray[is] = sfeatures.elementAt (is); +} +sq.setSequenceFeatures (sfarray); +}if (description != null) { +sq.setDescription (description); +}if ((seqds != null) && !(seqds.getName ().equals ("THISISAPLACEHOLDER") && seqds.getLength () == 0)) { +sq.setDatasetSequence (seqds); +}return namePresent; +}, "jalview.datamodel.SequenceI,java.util.Hashtable"); +c$.unique_name = Clazz.defineMethod (c$, "unique_name", +function (i) { +return String.instantialize ("Sequence" + i); +}, "~N"); +c$.uniquify = Clazz.defineMethod (c$, "uniquify", +function (sequences, write_names) { +var map = new java.util.Hashtable (); +for (var i = 0; i < sequences.length; i++) { +var safename = jalview.analysis.SeqsetUtils.unique_name (i); +map.put (safename, jalview.analysis.SeqsetUtils.SeqCharacterHash (sequences[i])); +if (write_names) { +sequences[i].setName (safename); +}} +return map; +}, "~A,~B"); +c$.deuniquify = Clazz.defineMethod (c$, "deuniquify", +function (map, sequences) { +return jalview.analysis.SeqsetUtils.deuniquify (map, sequences, true); +}, "java.util.Hashtable,~A"); +c$.deuniquify = Clazz.defineMethod (c$, "deuniquify", +function (map, sequences, quiet) { +var matcher = new jalview.analysis.SequenceIdMatcher (sequences); +var msq = null; +var keys = map.keys (); +var unmatched = new java.util.Vector (); +for (var i = 0, j = sequences.length; i < j; i++) { +unmatched.addElement (sequences[i]); +} +while (keys.hasMoreElements ()) { +var key = keys.nextElement (); +if (Clazz.instanceOf (key, String)) { +if ((msq = matcher.findIdMatch (key)) != null) { +var sqinfo = map.get (key); +unmatched.removeElement (msq); +jalview.analysis.SeqsetUtils.SeqCharacterUnhash (msq, sqinfo); +} else { +if (!quiet) { +System.err.println ("Can't find '" + (key) + "' in uniquified alignment"); +}}}} +if (unmatched.size () > 0 && !quiet) { +System.err.println ("Did not find matches for :"); +for (var i = unmatched.elements (); i.hasMoreElements (); System.out.println ((i.nextElement ()).getName ())) { +;} +return false; +}return true; +}, "java.util.Hashtable,~A,~B"); +c$.getNonEmptySequenceSet = Clazz.defineMethod (c$, "getNonEmptySequenceSet", +function (sequences) { +var ungapped = Clazz.newBooleanArray (sequences.length, false); +var msflen = 0; +for (var i = 0, j = sequences.length; i < j; i++) { +var tempseq = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, sequences[i].getSequenceAsString ()); +if (tempseq.length == 0) { +ungapped[i] = false; +} else { +ungapped[i] = true; +msflen++; +}} +if (msflen == 0) { +return null; +}var mset = new Array (msflen); +for (var i = 0, j = sequences.length, k = 0; i < j; i++) { +if (ungapped[i]) { +mset[k++] = sequences[i]; +}} +ungapped = null; +return mset; +}, "~A"); +}); diff --git a/bin/jalview/analysis/SequenceIdMatcher$SeqIdName.class b/bin/jalview/analysis/SequenceIdMatcher$SeqIdName.class index 1735f8ad4a89d31400d56383c3a6acf8923078d8..58766c16826270ff1c0c8ce15079171e087e242c 100644 GIT binary patch delta 61 zcmcc3cbRWP9xLPP$@#4Jq11QVH;K|?xq`82q85vX=ycw7PRS*rG diff --git a/bin/jalview/analysis/SequenceIdMatcher.js b/bin/jalview/analysis/SequenceIdMatcher.js index 6e94b5f..adb0a5a 100644 --- a/bin/jalview/analysis/SequenceIdMatcher.js +++ b/bin/jalview/analysis/SequenceIdMatcher.js @@ -1,167 +1,167 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.SequenceIdMatcher", ["java.util.ArrayList", "$.Arrays", "$.HashMap", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.names = null; -if (!Clazz.isClassDefined ("jalview.analysis.SequenceIdMatcher.SeqIdName")) { -jalview.analysis.SequenceIdMatcher.$SequenceIdMatcher$SeqIdName$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.analysis, "SequenceIdMatcher"); -Clazz.makeConstructor (c$, -function (seqs) { -this.names = new java.util.HashMap (); -this.addAll (seqs); -}, "java.util.List"); -Clazz.defineMethod (c$, "addAll", -function (seqs) { -for (var seq, $seq = seqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -this.names.put (Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seq.getDisplayId (true)), seq); -var dbseq = seq; -while (dbseq.getDatasetSequence () != null) { -dbseq = dbseq.getDatasetSequence (); -} -if (dbseq.getDBRef () != null) { -var dbr = dbseq.getDBRef (); -var sid = null; -for (var r = 0; r < dbr.length; r++) { -sid = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, dbr[r].getAccessionId ()); -if (!this.names.containsKey (sid)) { -this.names.put (sid, seq); -}} -}} -}, "java.util.List"); -Clazz.makeConstructor (c$, -function (sequences) { -this.construct (java.util.Arrays.asList (sequences)); -}, "~A"); -Clazz.defineMethod (c$, "pickbestMatch", -($fz = function (candName, matches) { -var st = this.pickbestMatches (candName, matches); -return st == null || st.size () == 0 ? null : st.get (0); -}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName,java.util.List"); -Clazz.defineMethod (c$, "pickbestMatches", -($fz = function (candName, matches) { -var best = new java.util.ArrayList (); -if (candName == null || matches == null || matches.size () == 0) { -return null; -}var match = matches.remove (0); -best.add (match); -this.names.put (Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, match.getName ()), match); -var matchlen = match.getName ().length; -var namlen = candName.id.length; -while (matches.size () > 0) { -var cand = matches.remove (0); -this.names.put (Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, cand.getName ()), cand); -var q; -var w; -var candlen = cand.getName ().length; -if ((q = Math.abs (matchlen - namlen)) > (w = Math.abs (candlen - namlen)) && candlen > matchlen) { -best.clear (); -match = cand; -matchlen = candlen; -best.add (match); -}if (q == w && candlen == matchlen) { -best.add (cand); -}} -if (best.size () == 0) { -return null; -};return best; -}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName,java.util.List"); -Clazz.defineMethod (c$, "findIdMatch", -function (seq) { -var nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seq.getName ()); -return this.findIdMatch (nam); -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "findIdMatch", -function (seqnam) { -var nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seqnam); -return this.findIdMatch (nam); -}, "~S"); -Clazz.defineMethod (c$, "findAllIdMatches", -function (seqnam) { -var nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seqnam); -var m = this.findAllIdMatches (nam); -if (m != null) { -return m.toArray ( new Array (m.size ())); -}return null; -}, "~S"); -Clazz.defineMethod (c$, "findIdMatch", -function (seqs) { -var namedseqs = null; -var i = 0; -var nam; -if (seqs.length > 0) { -namedseqs = new Array (seqs.length); -do { -nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seqs[i].getName ()); -if (this.names.containsKey (nam)) { -namedseqs[i] = this.findIdMatch (nam); -} else { -namedseqs[i] = null; -}} while (++i < seqs.length); -}return namedseqs; -}, "~A"); -Clazz.defineMethod (c$, "findIdMatch", -($fz = function (nam) { -var matches = new java.util.Vector (); -while (this.names.containsKey (nam)) { -matches.addElement (this.names.remove (nam)); -} -return this.pickbestMatch (nam, matches); -}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName"); -Clazz.defineMethod (c$, "findAllIdMatches", -($fz = function (nam) { -var matches = new java.util.ArrayList (); -while (this.names.containsKey (nam)) { -matches.add (this.names.remove (nam)); -} -var r = this.pickbestMatches (nam, matches); -return r; -}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName"); -c$.$SequenceIdMatcher$SeqIdName$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.id = null; -this.WORD_SEP = "~. |#\\/<>!\"\u00a4$%^*)}[@\',?_"; -Clazz.instantialize (this, arguments); -}, jalview.analysis.SequenceIdMatcher, "SeqIdName"); -Clazz.makeConstructor (c$, -function (a) { -if (a != null) { -this.id = String.instantialize (a); -} else { -this.id = ""; -}}, "~S"); -Clazz.overrideMethod (c$, "hashCode", -function () { -return ((this.id.length >= 4) ? this.id.substring (0, 4).hashCode () : this.id.hashCode ()); -}); -Clazz.defineMethod (c$, "equals", -function (a) { -if (a == null) { -return false; -}if (Clazz.instanceOf (a, jalview.analysis.SequenceIdMatcher.SeqIdName)) { -return this.equals (a); -} else { -if (Clazz.instanceOf (a, String)) { -return this.equals (a); -}}return false; -}, "~O"); -Clazz.defineMethod (c$, "equals", -function (a) { -if (this.id.length > a.id.length) { -return this.id.startsWith (a.id) ? (this.WORD_SEP.indexOf (this.id.charAt (a.id.length)) > -1) : false; -} else { -return a.id.startsWith (this.id) ? (a.id.equals (this.id) ? true : (this.WORD_SEP.indexOf (a.id.charAt (this.id.length)) > -1)) : false; -}}, "jalview.analysis.SequenceIdMatcher.SeqIdName"); -Clazz.defineMethod (c$, "equals", -function (a) { -if (this.id.length > a.length) { -return this.id.startsWith (a) ? (this.WORD_SEP.indexOf (this.id.charAt (a.length)) > -1) : false; -} else { -return a.startsWith (this.id) ? (a.equals (this.id) ? true : (this.WORD_SEP.indexOf (a.charAt (this.id.length)) > -1)) : false; -}}, "~S"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.SequenceIdMatcher", ["java.util.ArrayList", "$.Arrays", "$.HashMap", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.names = null; +if (!Clazz.isClassDefined ("jalview.analysis.SequenceIdMatcher.SeqIdName")) { +jalview.analysis.SequenceIdMatcher.$SequenceIdMatcher$SeqIdName$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.analysis, "SequenceIdMatcher"); +Clazz.makeConstructor (c$, +function (seqs) { +this.names = new java.util.HashMap (); +this.addAll (seqs); +}, "java.util.List"); +Clazz.defineMethod (c$, "addAll", +function (seqs) { +for (var seq, $seq = seqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +this.names.put (Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seq.getDisplayId (true)), seq); +var dbseq = seq; +while (dbseq.getDatasetSequence () != null) { +dbseq = dbseq.getDatasetSequence (); +} +if (dbseq.getDBRef () != null) { +var dbr = dbseq.getDBRef (); +var sid = null; +for (var r = 0; r < dbr.length; r++) { +sid = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, dbr[r].getAccessionId ()); +if (!this.names.containsKey (sid)) { +this.names.put (sid, seq); +}} +}} +}, "java.util.List"); +Clazz.makeConstructor (c$, +function (sequences) { +this.construct (java.util.Arrays.asList (sequences)); +}, "~A"); +Clazz.defineMethod (c$, "pickbestMatch", +($fz = function (candName, matches) { +var st = this.pickbestMatches (candName, matches); +return st == null || st.size () == 0 ? null : st.get (0); +}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName,java.util.List"); +Clazz.defineMethod (c$, "pickbestMatches", +($fz = function (candName, matches) { +var best = new java.util.ArrayList (); +if (candName == null || matches == null || matches.size () == 0) { +return null; +}var match = matches.remove (0); +best.add (match); +this.names.put (Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, match.getName ()), match); +var matchlen = match.getName ().length; +var namlen = candName.id.length; +while (matches.size () > 0) { +var cand = matches.remove (0); +this.names.put (Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, cand.getName ()), cand); +var q; +var w; +var candlen = cand.getName ().length; +if ((q = Math.abs (matchlen - namlen)) > (w = Math.abs (candlen - namlen)) && candlen > matchlen) { +best.clear (); +match = cand; +matchlen = candlen; +best.add (match); +}if (q == w && candlen == matchlen) { +best.add (cand); +}} +if (best.size () == 0) { +return null; +};return best; +}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName,java.util.List"); +Clazz.defineMethod (c$, "findIdMatch", +function (seq) { +var nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seq.getName ()); +return this.findIdMatch (nam); +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "findIdMatch", +function (seqnam) { +var nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seqnam); +return this.findIdMatch (nam); +}, "~S"); +Clazz.defineMethod (c$, "findAllIdMatches", +function (seqnam) { +var nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seqnam); +var m = this.findAllIdMatches (nam); +if (m != null) { +return m.toArray ( new Array (m.size ())); +}return null; +}, "~S"); +Clazz.defineMethod (c$, "findIdMatch", +function (seqs) { +var namedseqs = null; +var i = 0; +var nam; +if (seqs.length > 0) { +namedseqs = new Array (seqs.length); +do { +nam = Clazz.innerTypeInstance (jalview.analysis.SequenceIdMatcher.SeqIdName, this, null, seqs[i].getName ()); +if (this.names.containsKey (nam)) { +namedseqs[i] = this.findIdMatch (nam); +} else { +namedseqs[i] = null; +}} while (++i < seqs.length); +}return namedseqs; +}, "~A"); +Clazz.defineMethod (c$, "findIdMatch", +($fz = function (nam) { +var matches = new java.util.Vector (); +while (this.names.containsKey (nam)) { +matches.addElement (this.names.remove (nam)); +} +return this.pickbestMatch (nam, matches); +}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName"); +Clazz.defineMethod (c$, "findAllIdMatches", +($fz = function (nam) { +var matches = new java.util.ArrayList (); +while (this.names.containsKey (nam)) { +matches.add (this.names.remove (nam)); +} +var r = this.pickbestMatches (nam, matches); +return r; +}, $fz.isPrivate = true, $fz), "jalview.analysis.SequenceIdMatcher.SeqIdName"); +c$.$SequenceIdMatcher$SeqIdName$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.id = null; +this.WORD_SEP = "~. |#\\/<>!\"\u00a4$%^*)}[@\',?_"; +Clazz.instantialize (this, arguments); +}, jalview.analysis.SequenceIdMatcher, "SeqIdName"); +Clazz.makeConstructor (c$, +function (a) { +if (a != null) { +this.id = String.instantialize (a); +} else { +this.id = ""; +}}, "~S"); +Clazz.overrideMethod (c$, "hashCode", +function () { +return ((this.id.length >= 4) ? this.id.substring (0, 4).hashCode () : this.id.hashCode ()); +}); +Clazz.defineMethod (c$, "equals", +function (a) { +if (a == null) { +return false; +}if (Clazz.instanceOf (a, jalview.analysis.SequenceIdMatcher.SeqIdName)) { +return this.equals (a); +} else { +if (Clazz.instanceOf (a, String)) { +return this.equals (a); +}}return false; +}, "~O"); +Clazz.defineMethod (c$, "equals", +function (a) { +if (this.id.length > a.id.length) { +return this.id.startsWith (a.id) ? (this.WORD_SEP.indexOf (this.id.charAt (a.id.length)) > -1) : false; +} else { +return a.id.startsWith (this.id) ? (a.id.equals (this.id) ? true : (this.WORD_SEP.indexOf (a.id.charAt (this.id.length)) > -1)) : false; +}}, "jalview.analysis.SequenceIdMatcher.SeqIdName"); +Clazz.defineMethod (c$, "equals", +function (a) { +if (this.id.length > a.length) { +return this.id.startsWith (a) ? (this.WORD_SEP.indexOf (this.id.charAt (a.length)) > -1) : false; +} else { +return a.startsWith (this.id) ? (a.equals (this.id) ? true : (this.WORD_SEP.indexOf (a.charAt (this.id.length)) > -1)) : false; +}}, "~S"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/analysis/StructureFrequency.class b/bin/jalview/analysis/StructureFrequency.class index 8b6d9eb233cdb612bc18a36af35a8b23f4601c71..f7f3fc419b6824a931488c2eea295505502258cd 100644 GIT binary patch delta 40 ycmV+@0N4M=M#e_4tq%d)v#t;M1Owp!8I!6MiUc7402Grk79o@F6%4ax72yq8zYmuH delta 41 zcmV+^0M`G;M#o05tq%d*v#t;M1Ows#8k4FNiUl14{{R$|Fcu+`?G+5OWfkEKW5N%Y diff --git a/bin/jalview/analysis/StructureFrequency.js b/bin/jalview/analysis/StructureFrequency.js index 6c90b65..83c8f02 100644 --- a/bin/jalview/analysis/StructureFrequency.js +++ b/bin/jalview/analysis/StructureFrequency.js @@ -1,260 +1,260 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (null, "jalview.analysis.StructureFrequency", ["jalview.datamodel.Annotation", "jalview.util.Format", "$.QuickSort", "java.lang.Float", "java.util.Hashtable", "javajs.util.AU"], function () { -c$ = Clazz.declareType (jalview.analysis, "StructureFrequency"); -c$.findPair = Clazz.defineMethod (c$, "findPair", -function (pairs, indice) { -for (var i = 0; i < pairs.length; i++) { -if (pairs[i].getBegin () == indice) { -return pairs[i].getEnd (); -}} -return -1; -}, "~A,~N"); -c$.calculate = Clazz.defineMethod (c$, "calculate", -function (sequences, start, end, result, profile, rnaStruc) { -var residueHash; -var maxResidue; -var struc = rnaStruc.getRNAStruc ().toCharArray (); -var rna = rnaStruc._rnasecstr; -var c; -var s; -var cEnd; -var count = 0; -var nonGap = 0; -var i; -var bpEnd = -1; -var j; -var jSize = sequences.length; -var values; -var pairs; -var percentage; -var wooble = true; -for (i = start; i < end; i++) { -residueHash = new java.util.Hashtable (); -maxResidue = "-"; -values = Clazz.newIntArray (255, 0); -pairs = Clazz.newIntArray (255, 255, 0); -bpEnd = -1; -if (i < struc.length) { -s = struc[i]; -} else { -s = '-'; -}if (s == '.' || s == ' ') { -s = '-'; -}if (s != '(' && s != '[') { -if (s == '-') { -values['-'.charCodeAt (0)]++; -}} else { -bpEnd = jalview.analysis.StructureFrequency.findPair (rna, i); -if (bpEnd > -1) { -for (j = 0; j < jSize; j++) { -if (sequences[j] == null) { -System.err.println ("WARNING: Consensus skipping null sequence - possible race condition."); -continue; -}c = sequences[j].getCharAt (i); -if (c == '.' || c == ' ') { -c = '-'; -}if (c == '-') { -values['-'.charCodeAt (0)]++; -continue; -}cEnd = sequences[j].getCharAt (bpEnd); -if (jalview.analysis.StructureFrequency.checkBpType (c, cEnd) == true) { -values['('.charCodeAt (0)]++; -maxResidue = "("; -wooble = true; -}if (jalview.analysis.StructureFrequency.checkBpType (c, cEnd) == false) { -wooble = false; -values['['.charCodeAt (0)]++; -maxResidue = "["; -}pairs[c.charCodeAt (0)][cEnd.charCodeAt (0)]++; -} -}}if (profile) { -residueHash.put ("P", Clazz.newArray (-1, [values, Clazz.newIntArray (-1, [jSize, (jSize - values['-'.charCodeAt (0)])])])); -residueHash.put ("B", pairs); -}if (wooble == true) { -count = values['('.charCodeAt (0)]; -}if (wooble == false) { -count = values['['.charCodeAt (0)]; -}residueHash.put ("C", new Integer (count)); -residueHash.put ("R", maxResidue); -percentage = (count * 100) / jSize; -residueHash.put ("G", new Float (percentage)); -if (result[i] == null) { -result[i] = residueHash; -}if (bpEnd > 0) { -values[')'.charCodeAt (0)] = values['('.charCodeAt (0)]; -values[']'.charCodeAt (0)] = values['['.charCodeAt (0)]; -values['('.charCodeAt (0)] = 0; -values['['.charCodeAt (0)] = 0; -residueHash = new java.util.Hashtable (); -if (wooble == true) { -maxResidue = ")"; -}if (wooble == false) { -maxResidue = "]"; -}if (profile) { -residueHash.put ("P", Clazz.newArray (-1, [values, Clazz.newIntArray (-1, [jSize, (jSize - values['-'.charCodeAt (0)])])])); -residueHash.put ("B", pairs); -}residueHash.put ("C", new Integer (count)); -residueHash.put ("R", maxResidue); -percentage = (count * 100) / jSize; -residueHash.put ("G", new Float (percentage)); -result[bpEnd] = residueHash; -}} -}, "~A,~N,~N,~A,~B,jalview.datamodel.AlignmentAnnotation"); -c$.checkBpType = Clazz.defineMethod (c$, "checkBpType", -function (up, down) { -if (up > 'Z') { -up = String.fromCharCode (up.charCodeAt (0) - 32); -}if (down > 'Z') { -down = String.fromCharCode (down.charCodeAt (0) - 32); -}switch (up) { -case 'A': -switch (down) { -case 'T': -return true; -case 'U': -return true; -} -break; -case 'C': -switch (down) { -case 'G': -return true; -} -break; -case 'T': -switch (down) { -case 'A': -return true; -case 'G': -return true; -} -break; -case 'G': -switch (down) { -case 'C': -return true; -case 'T': -return true; -case 'U': -return true; -} -break; -case 'U': -switch (down) { -case 'A': -return true; -case 'G': -return true; -} -break; -} -return false; -}, "~S,~S"); -c$.completeConsensus = Clazz.defineMethod (c$, "completeConsensus", -function (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, nseq) { -var tval; -var value; -if (consensus == null || consensus.annotations == null || consensus.annotations.length < width) { -return; -}var fmtstr = "%3.1f"; -var precision = 2; -while (nseq > 100) { -precision++; -nseq /= 10; -} -if (precision > 2) { -fmtstr = "%" + (2 + precision) + "." + precision + "f"; -}var fmt = new jalview.util.Format (fmtstr); -for (var i = iStart; i < width; i++) { -var hci; -if (i >= hconsensus.length || ((hci = hconsensus[i]) == null)) { -consensus.annotations[i] = null; -continue; -}value = 0; -var fv; -if (ignoreGapsInConsensusCalculation) { -fv = hci.get ("N"); -} else { -fv = hci.get ("G"); -}if (fv == null) { -consensus.annotations[i] = null; -continue; -}value = fv.floatValue (); -var maxRes = hci.get ("R").toString (); -var mouseOver = hci.get ("R") + " "; -if (maxRes.length > 1) { -mouseOver = "[" + maxRes + "] "; -maxRes = "+"; -}var profile = hci.get ("P"); -var pairs = hci.get ("B"); -if (pairs != null && includeAllConsSymbols) { -mouseOver = ""; -var ca = javajs.util.AU.newInt2 (625); -var vl = Clazz.newFloatArray (625, 0); -var x = 0; -for (var c = 65; c < 90; c++) { -for (var d = 65; d < 90; d++) { -ca[x] = Clazz.newIntArray (-1, [c, d]); -vl[x] = pairs[c][d]; -x++; -} -} -jalview.util.QuickSort.sortFloatObject (vl, ca); -var p = 0; -var divisor = profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]; -for (var c = 624; c > 0; c--) { -if (vl[c] > 0) { -tval = (vl[c] * 100 / divisor); -mouseOver += ((p == 0) ? "" : "; ") + String.fromCharCode (ca[c][0]) + String.fromCharCode (ca[c][1]) + " " + fmt.formDouble (tval) + "%"; -p++; -}} -} else { -mouseOver += (fmt.formDouble (value) + "%"); -}consensus.annotations[i] = new jalview.datamodel.Annotation (maxRes, mouseOver, ' ', value); -} -}, "jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~B,~B,~N"); -c$.extractProfile = Clazz.defineMethod (c$, "extractProfile", -function (hconsensus, ignoreGapsInConsensusCalculation) { -var rtnval = Clazz.newIntArray (74, 0); -var profile = hconsensus.get ("P"); -var pairs = hconsensus.get ("B"); -if (profile == null) { -return null; -}var ca = javajs.util.AU.newInt2 (625); -var vl = Clazz.newFloatArray (625, 0); -var x = 0; -for (var c = 65; c < 90; c++) { -for (var d = 65; d < 90; d++) { -ca[x] = Clazz.newIntArray (-1, [c, d]); -vl[x] = pairs[c][d]; -x++; -} -} -jalview.util.QuickSort.sortFloatObject (vl, ca); -var valuesCount = 0; -rtnval[1] = 0; -var offset = 2; -var divisor = profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]; -for (var c = 624; c > 0; c--) { -if (vl[c] > 0) { -rtnval[offset++] = ca[c][0]; -rtnval[offset++] = ca[c][1]; -rtnval[offset] = Clazz.floatToInt (vl[c] * 100 / divisor); -rtnval[1] += rtnval[offset++]; -valuesCount++; -}} -rtnval[0] = valuesCount; -var result = Clazz.newIntArray (rtnval.length + 1, 0); -result[0] = 1; -System.arraycopy (rtnval, 0, result, 1, rtnval.length); -return result; -}, "java.util.Hashtable,~B"); -Clazz.defineStatics (c$, -"STRUCTURE_PROFILE_LENGTH", 74, -"MAXCOUNT", "C", -"MAXRESIDUE", "R", -"PID_GAPS", "G", -"PID_NOGAPS", "N", -"PROFILE", "P", -"PAIRPROFILE", "B"); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (null, "jalview.analysis.StructureFrequency", ["jalview.datamodel.Annotation", "jalview.util.Format", "$.QuickSort", "java.lang.Float", "java.util.Hashtable", "javajs.util.AU"], function () { +c$ = Clazz.declareType (jalview.analysis, "StructureFrequency"); +c$.findPair = Clazz.defineMethod (c$, "findPair", +function (pairs, indice) { +for (var i = 0; i < pairs.length; i++) { +if (pairs[i].getBegin () == indice) { +return pairs[i].getEnd (); +}} +return -1; +}, "~A,~N"); +c$.calculate = Clazz.defineMethod (c$, "calculate", +function (sequences, start, end, result, profile, rnaStruc) { +var residueHash; +var maxResidue; +var struc = rnaStruc.getRNAStruc ().toCharArray (); +var rna = rnaStruc._rnasecstr; +var c; +var s; +var cEnd; +var count = 0; +var nonGap = 0; +var i; +var bpEnd = -1; +var j; +var jSize = sequences.length; +var values; +var pairs; +var percentage; +var wooble = true; +for (i = start; i < end; i++) { +residueHash = new java.util.Hashtable (); +maxResidue = "-"; +values = Clazz.newIntArray (255, 0); +pairs = Clazz.newIntArray (255, 255, 0); +bpEnd = -1; +if (i < struc.length) { +s = struc[i]; +} else { +s = '-'; +}if (s == '.' || s == ' ') { +s = '-'; +}if (s != '(' && s != '[') { +if (s == '-') { +values['-'.charCodeAt (0)]++; +}} else { +bpEnd = jalview.analysis.StructureFrequency.findPair (rna, i); +if (bpEnd > -1) { +for (j = 0; j < jSize; j++) { +if (sequences[j] == null) { +System.err.println ("WARNING: Consensus skipping null sequence - possible race condition."); +continue; +}c = sequences[j].getCharAt (i); +if (c == '.' || c == ' ') { +c = '-'; +}if (c == '-') { +values['-'.charCodeAt (0)]++; +continue; +}cEnd = sequences[j].getCharAt (bpEnd); +if (jalview.analysis.StructureFrequency.checkBpType (c, cEnd) == true) { +values['('.charCodeAt (0)]++; +maxResidue = "("; +wooble = true; +}if (jalview.analysis.StructureFrequency.checkBpType (c, cEnd) == false) { +wooble = false; +values['['.charCodeAt (0)]++; +maxResidue = "["; +}pairs[c.charCodeAt (0)][cEnd.charCodeAt (0)]++; +} +}}if (profile) { +residueHash.put ("P", Clazz.newArray (-1, [values, Clazz.newIntArray (-1, [jSize, (jSize - values['-'.charCodeAt (0)])])])); +residueHash.put ("B", pairs); +}if (wooble == true) { +count = values['('.charCodeAt (0)]; +}if (wooble == false) { +count = values['['.charCodeAt (0)]; +}residueHash.put ("C", new Integer (count)); +residueHash.put ("R", maxResidue); +percentage = (count * 100) / jSize; +residueHash.put ("G", new Float (percentage)); +if (result[i] == null) { +result[i] = residueHash; +}if (bpEnd > 0) { +values[')'.charCodeAt (0)] = values['('.charCodeAt (0)]; +values[']'.charCodeAt (0)] = values['['.charCodeAt (0)]; +values['('.charCodeAt (0)] = 0; +values['['.charCodeAt (0)] = 0; +residueHash = new java.util.Hashtable (); +if (wooble == true) { +maxResidue = ")"; +}if (wooble == false) { +maxResidue = "]"; +}if (profile) { +residueHash.put ("P", Clazz.newArray (-1, [values, Clazz.newIntArray (-1, [jSize, (jSize - values['-'.charCodeAt (0)])])])); +residueHash.put ("B", pairs); +}residueHash.put ("C", new Integer (count)); +residueHash.put ("R", maxResidue); +percentage = (count * 100) / jSize; +residueHash.put ("G", new Float (percentage)); +result[bpEnd] = residueHash; +}} +}, "~A,~N,~N,~A,~B,jalview.datamodel.AlignmentAnnotation"); +c$.checkBpType = Clazz.defineMethod (c$, "checkBpType", +function (up, down) { +if (up > 'Z') { +up = String.fromCharCode (up.charCodeAt (0) - 32); +}if (down > 'Z') { +down = String.fromCharCode (down.charCodeAt (0) - 32); +}switch (up) { +case 'A': +switch (down) { +case 'T': +return true; +case 'U': +return true; +} +break; +case 'C': +switch (down) { +case 'G': +return true; +} +break; +case 'T': +switch (down) { +case 'A': +return true; +case 'G': +return true; +} +break; +case 'G': +switch (down) { +case 'C': +return true; +case 'T': +return true; +case 'U': +return true; +} +break; +case 'U': +switch (down) { +case 'A': +return true; +case 'G': +return true; +} +break; +} +return false; +}, "~S,~S"); +c$.completeConsensus = Clazz.defineMethod (c$, "completeConsensus", +function (consensus, hconsensus, iStart, width, ignoreGapsInConsensusCalculation, includeAllConsSymbols, nseq) { +var tval; +var value; +if (consensus == null || consensus.annotations == null || consensus.annotations.length < width) { +return; +}var fmtstr = "%3.1f"; +var precision = 2; +while (nseq > 100) { +precision++; +nseq /= 10; +} +if (precision > 2) { +fmtstr = "%" + (2 + precision) + "." + precision + "f"; +}var fmt = new jalview.util.Format (fmtstr); +for (var i = iStart; i < width; i++) { +var hci; +if (i >= hconsensus.length || ((hci = hconsensus[i]) == null)) { +consensus.annotations[i] = null; +continue; +}value = 0; +var fv; +if (ignoreGapsInConsensusCalculation) { +fv = hci.get ("N"); +} else { +fv = hci.get ("G"); +}if (fv == null) { +consensus.annotations[i] = null; +continue; +}value = fv.floatValue (); +var maxRes = hci.get ("R").toString (); +var mouseOver = hci.get ("R") + " "; +if (maxRes.length > 1) { +mouseOver = "[" + maxRes + "] "; +maxRes = "+"; +}var profile = hci.get ("P"); +var pairs = hci.get ("B"); +if (pairs != null && includeAllConsSymbols) { +mouseOver = ""; +var ca = javajs.util.AU.newInt2 (625); +var vl = Clazz.newFloatArray (625, 0); +var x = 0; +for (var c = 65; c < 90; c++) { +for (var d = 65; d < 90; d++) { +ca[x] = Clazz.newIntArray (-1, [c, d]); +vl[x] = pairs[c][d]; +x++; +} +} +jalview.util.QuickSort.sortFloatObject (vl, ca); +var p = 0; +var divisor = profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]; +for (var c = 624; c > 0; c--) { +if (vl[c] > 0) { +tval = (vl[c] * 100 / divisor); +mouseOver += ((p == 0) ? "" : "; ") + String.fromCharCode (ca[c][0]) + String.fromCharCode (ca[c][1]) + " " + fmt.formDouble (tval) + "%"; +p++; +}} +} else { +mouseOver += (fmt.formDouble (value) + "%"); +}consensus.annotations[i] = new jalview.datamodel.Annotation (maxRes, mouseOver, ' ', value); +} +}, "jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~B,~B,~N"); +c$.extractProfile = Clazz.defineMethod (c$, "extractProfile", +function (hconsensus, ignoreGapsInConsensusCalculation) { +var rtnval = Clazz.newIntArray (74, 0); +var profile = hconsensus.get ("P"); +var pairs = hconsensus.get ("B"); +if (profile == null) { +return null; +}var ca = javajs.util.AU.newInt2 (625); +var vl = Clazz.newFloatArray (625, 0); +var x = 0; +for (var c = 65; c < 90; c++) { +for (var d = 65; d < 90; d++) { +ca[x] = Clazz.newIntArray (-1, [c, d]); +vl[x] = pairs[c][d]; +x++; +} +} +jalview.util.QuickSort.sortFloatObject (vl, ca); +var valuesCount = 0; +rtnval[1] = 0; +var offset = 2; +var divisor = profile[1][ignoreGapsInConsensusCalculation ? 1 : 0]; +for (var c = 624; c > 0; c--) { +if (vl[c] > 0) { +rtnval[offset++] = ca[c][0]; +rtnval[offset++] = ca[c][1]; +rtnval[offset] = Clazz.floatToInt (vl[c] * 100 / divisor); +rtnval[1] += rtnval[offset++]; +valuesCount++; +}} +rtnval[0] = valuesCount; +var result = Clazz.newIntArray (rtnval.length + 1, 0); +result[0] = 1; +System.arraycopy (rtnval, 0, result, 1, rtnval.length); +return result; +}, "java.util.Hashtable,~B"); +Clazz.defineStatics (c$, +"STRUCTURE_PROFILE_LENGTH", 74, +"MAXCOUNT", "C", +"MAXRESIDUE", "R", +"PID_GAPS", "G", +"PID_NOGAPS", "N", +"PROFILE", "P", +"PAIRPROFILE", "B"); +}); diff --git a/bin/jalview/analysis/WUSSParseException.js b/bin/jalview/analysis/WUSSParseException.js index 535f6ac..32861ff 100644 --- a/bin/jalview/analysis/WUSSParseException.js +++ b/bin/jalview/analysis/WUSSParseException.js @@ -1,20 +1,20 @@ -Clazz.declarePackage ("jalview.analysis"); -Clazz.load (["java.lang.Exception"], "jalview.analysis.WUSSParseException", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.problemPos = 0; -Clazz.instantialize (this, arguments); -}, jalview.analysis, "WUSSParseException", Exception); -Clazz.makeConstructor (c$, -function (problemPos) { -this.construct ("Invalid WUSS Notation", problemPos); -}, "~N"); -Clazz.makeConstructor (c$, -function (message, problemPos) { -Clazz.superConstructor (this, jalview.analysis.WUSSParseException, [message + " at or near position " + problemPos]); -this.problemPos = problemPos; -}, "~S,~N"); -Clazz.defineMethod (c$, "getProblemPos", -function () { -return this.problemPos; -}); -}); +Clazz.declarePackage ("jalview.analysis"); +Clazz.load (["java.lang.Exception"], "jalview.analysis.WUSSParseException", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.problemPos = 0; +Clazz.instantialize (this, arguments); +}, jalview.analysis, "WUSSParseException", Exception); +Clazz.makeConstructor (c$, +function (problemPos) { +this.construct ("Invalid WUSS Notation", problemPos); +}, "~N"); +Clazz.makeConstructor (c$, +function (message, problemPos) { +Clazz.superConstructor (this, jalview.analysis.WUSSParseException, [message + " at or near position " + problemPos]); +this.problemPos = problemPos; +}, "~S,~N"); +Clazz.defineMethod (c$, "getProblemPos", +function () { +return this.problemPos; +}); +}); diff --git a/bin/jalview/analysis/package.js b/bin/jalview/analysis/package.js index 45e0428..a23ac21 100644 --- a/bin/jalview/analysis/package.js +++ b/bin/jalview/analysis/package.js @@ -1,5 +1,5 @@ -var path = ClazzLoader.getClasspathFor ("jalview.analysis.package"); -path = path.substring (0, path.lastIndexOf ("package.js")); -ClazzLoader.jarClasspath (path + "NJTree.js", [ -"jalview.analysis.Cluster", -"$.NJTree"]); +var path = ClazzLoader.getClasspathFor ("jalview.analysis.package"); +path = path.substring (0, path.lastIndexOf ("package.js")); +ClazzLoader.jarClasspath (path + "NJTree.js", [ +"jalview.analysis.Cluster", +"$.NJTree"]); diff --git a/bin/jalview/analysis/scoremodels/FeatureScoreModel.js b/bin/jalview/analysis/scoremodels/FeatureScoreModel.js index 3e8e57d..7e483bd 100644 --- a/bin/jalview/analysis/scoremodels/FeatureScoreModel.js +++ b/bin/jalview/analysis/scoremodels/FeatureScoreModel.js @@ -1,86 +1,86 @@ -Clazz.declarePackage ("jalview.analysis.scoremodels"); -Clazz.load (["jalview.api.analysis.ScoreModelI", "$.ViewBasedAnalysisI"], "jalview.analysis.scoremodels.FeatureScoreModel", ["jalview.util.Comparison", "java.util.ArrayList", "$.Arrays", "$.Hashtable"], function () { -c$ = Clazz.decorateAsClass (function () { -this.fr = null; -Clazz.instantialize (this, arguments); -}, jalview.analysis.scoremodels, "FeatureScoreModel", null, [jalview.api.analysis.ScoreModelI, jalview.api.analysis.ViewBasedAnalysisI]); -Clazz.overrideMethod (c$, "configureFromAlignmentView", -function (view) { -this.fr = view.cloneFeatureRenderer (); -return true; -}, "jalview.api.AlignmentViewPanel"); -Clazz.overrideMethod (c$, "findDistances", -function (seqData) { -var nofeats = 0; -var dft = java.util.Arrays.asList (this.fr.getDisplayedFeatureTypes ()); -if (dft != null) { -nofeats = dft.size (); -}var sequenceString = seqData.getVisibleAlignment (jalview.util.Comparison.GapChars.charAt (0)).getSequencesArray (); -var noseqs = sequenceString.length; -var cpwidth = seqData.getWidth (); -var distance = Clazz.newFloatArray (noseqs, noseqs, 0); -if (nofeats == 0) { -for (var d, $d = 0, $$d = distance; $d < $$d.length && ((d = $$d[$d]) || true); $d++) { -for (var i = 0; i < d.length; d[i++] = 0) { -;} -} -return distance; -}var max = 0; -for (var cpos = 0; cpos < cpwidth; cpos++) { -var sfap = new java.util.ArrayList (); -for (var i = 0; i < noseqs; i++) { -var types = new java.util.Hashtable (); -var sfs = this.fr.findFeaturesAtRes (sequenceString[i], sequenceString[i].findPosition (cpos)); -for (var sf, $sf = sfs.iterator (); $sf.hasNext () && ((sf = $sf.next ()) || true);) { -types.put (sf.getType (), sf); -} -sfap.add (types); -} -for (var i = 0; i < (noseqs - 1); i++) { -if (cpos == 0) { -distance[i][i] = 0; -}for (var j = i + 1; j < noseqs; j++) { -var sfcommon = 0; -var fi = sfap.get (i); -var fk; -var fj = sfap.get (j); -if (fi.size () > fj.size ()) { -fk = fj; -} else { -fk = fi; -fi = fj; -}for (var k, $k = fi.keySet ().iterator (); $k.hasNext () && ((k = $k.next ()) || true);) { -var sfj = fk.get (k); -if (sfj != null) { -sfcommon++; -}} -distance[i][j] += (fi.size () + fk.size () - 2 * sfcommon); -distance[j][i] += distance[i][j]; -} -} -} -for (var i = 0; i < noseqs; i++) { -for (var j = i + 1; j < noseqs; j++) { -distance[i][j] /= cpwidth; -distance[j][i] = distance[i][j]; -} -} -return distance; -}, "jalview.datamodel.AlignmentView"); -Clazz.overrideMethod (c$, "getName", -function () { -return "Sequence Feature Similarity"; -}); -Clazz.overrideMethod (c$, "isDNA", -function () { -return true; -}); -Clazz.overrideMethod (c$, "isProtein", -function () { -return true; -}); -Clazz.overrideMethod (c$, "toString", -function () { -return "Score between sequences based on hamming distance between binary vectors marking features displayed at each column"; -}); -}); +Clazz.declarePackage ("jalview.analysis.scoremodels"); +Clazz.load (["jalview.api.analysis.ScoreModelI", "$.ViewBasedAnalysisI"], "jalview.analysis.scoremodels.FeatureScoreModel", ["jalview.util.Comparison", "java.util.ArrayList", "$.Arrays", "$.Hashtable"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fr = null; +Clazz.instantialize (this, arguments); +}, jalview.analysis.scoremodels, "FeatureScoreModel", null, [jalview.api.analysis.ScoreModelI, jalview.api.analysis.ViewBasedAnalysisI]); +Clazz.overrideMethod (c$, "configureFromAlignmentView", +function (view) { +this.fr = view.cloneFeatureRenderer (); +return true; +}, "jalview.api.AlignmentViewPanel"); +Clazz.overrideMethod (c$, "findDistances", +function (seqData) { +var nofeats = 0; +var dft = java.util.Arrays.asList (this.fr.getDisplayedFeatureTypes ()); +if (dft != null) { +nofeats = dft.size (); +}var sequenceString = seqData.getVisibleAlignment (jalview.util.Comparison.GapChars.charAt (0)).getSequencesArray (); +var noseqs = sequenceString.length; +var cpwidth = seqData.getWidth (); +var distance = Clazz.newFloatArray (noseqs, noseqs, 0); +if (nofeats == 0) { +for (var d, $d = 0, $$d = distance; $d < $$d.length && ((d = $$d[$d]) || true); $d++) { +for (var i = 0; i < d.length; d[i++] = 0) { +;} +} +return distance; +}var max = 0; +for (var cpos = 0; cpos < cpwidth; cpos++) { +var sfap = new java.util.ArrayList (); +for (var i = 0; i < noseqs; i++) { +var types = new java.util.Hashtable (); +var sfs = this.fr.findFeaturesAtRes (sequenceString[i], sequenceString[i].findPosition (cpos)); +for (var sf, $sf = sfs.iterator (); $sf.hasNext () && ((sf = $sf.next ()) || true);) { +types.put (sf.getType (), sf); +} +sfap.add (types); +} +for (var i = 0; i < (noseqs - 1); i++) { +if (cpos == 0) { +distance[i][i] = 0; +}for (var j = i + 1; j < noseqs; j++) { +var sfcommon = 0; +var fi = sfap.get (i); +var fk; +var fj = sfap.get (j); +if (fi.size () > fj.size ()) { +fk = fj; +} else { +fk = fi; +fi = fj; +}for (var k, $k = fi.keySet ().iterator (); $k.hasNext () && ((k = $k.next ()) || true);) { +var sfj = fk.get (k); +if (sfj != null) { +sfcommon++; +}} +distance[i][j] += (fi.size () + fk.size () - 2 * sfcommon); +distance[j][i] += distance[i][j]; +} +} +} +for (var i = 0; i < noseqs; i++) { +for (var j = i + 1; j < noseqs; j++) { +distance[i][j] /= cpwidth; +distance[j][i] = distance[i][j]; +} +} +return distance; +}, "jalview.datamodel.AlignmentView"); +Clazz.overrideMethod (c$, "getName", +function () { +return "Sequence Feature Similarity"; +}); +Clazz.overrideMethod (c$, "isDNA", +function () { +return true; +}); +Clazz.overrideMethod (c$, "isProtein", +function () { +return true; +}); +Clazz.overrideMethod (c$, "toString", +function () { +return "Score between sequences based on hamming distance between binary vectors marking features displayed at each column"; +}); +}); diff --git a/bin/jalview/analysis/scoremodels/PIDScoreModel.js b/bin/jalview/analysis/scoremodels/PIDScoreModel.js index 0266c33..09c86e5 100644 --- a/bin/jalview/analysis/scoremodels/PIDScoreModel.js +++ b/bin/jalview/analysis/scoremodels/PIDScoreModel.js @@ -1,32 +1,32 @@ -Clazz.declarePackage ("jalview.analysis.scoremodels"); -Clazz.load (["jalview.api.analysis.ScoreModelI"], "jalview.analysis.scoremodels.PIDScoreModel", ["jalview.util.Comparison"], function () { -c$ = Clazz.declareType (jalview.analysis.scoremodels, "PIDScoreModel", null, jalview.api.analysis.ScoreModelI); -Clazz.overrideMethod (c$, "findDistances", -function (seqData) { -var sequenceString = seqData.getSequenceStrings (jalview.util.Comparison.GapChars.charAt (0)); -var noseqs = sequenceString.length; -var distance = Clazz.newFloatArray (noseqs, noseqs, 0); -for (var i = 0; i < (noseqs - 1); i++) { -for (var j = i; j < noseqs; j++) { -if (j == i) { -distance[i][i] = 0; -} else { -distance[i][j] = 100 - jalview.util.Comparison.PID (sequenceString[i], sequenceString[j]); -distance[j][i] = distance[i][j]; -}} -} -return distance; -}, "jalview.datamodel.AlignmentView"); -Clazz.overrideMethod (c$, "getName", -function () { -return "PID"; -}); -Clazz.overrideMethod (c$, "isDNA", -function () { -return true; -}); -Clazz.overrideMethod (c$, "isProtein", -function () { -return true; -}); -}); +Clazz.declarePackage ("jalview.analysis.scoremodels"); +Clazz.load (["jalview.api.analysis.ScoreModelI"], "jalview.analysis.scoremodels.PIDScoreModel", ["jalview.util.Comparison"], function () { +c$ = Clazz.declareType (jalview.analysis.scoremodels, "PIDScoreModel", null, jalview.api.analysis.ScoreModelI); +Clazz.overrideMethod (c$, "findDistances", +function (seqData) { +var sequenceString = seqData.getSequenceStrings (jalview.util.Comparison.GapChars.charAt (0)); +var noseqs = sequenceString.length; +var distance = Clazz.newFloatArray (noseqs, noseqs, 0); +for (var i = 0; i < (noseqs - 1); i++) { +for (var j = i; j < noseqs; j++) { +if (j == i) { +distance[i][i] = 0; +} else { +distance[i][j] = 100 - jalview.util.Comparison.PID (sequenceString[i], sequenceString[j]); +distance[j][i] = distance[i][j]; +}} +} +return distance; +}, "jalview.datamodel.AlignmentView"); +Clazz.overrideMethod (c$, "getName", +function () { +return "PID"; +}); +Clazz.overrideMethod (c$, "isDNA", +function () { +return true; +}); +Clazz.overrideMethod (c$, "isProtein", +function () { +return true; +}); +}); diff --git a/bin/jalview/analysis/scoremodels/PairwiseSeqScoreModel.js b/bin/jalview/analysis/scoremodels/PairwiseSeqScoreModel.js index 6cfe67a..4c1456f 100644 --- a/bin/jalview/analysis/scoremodels/PairwiseSeqScoreModel.js +++ b/bin/jalview/analysis/scoremodels/PairwiseSeqScoreModel.js @@ -1,39 +1,39 @@ -Clazz.declarePackage ("jalview.analysis.scoremodels"); -Clazz.load (["jalview.api.analysis.ScoreModelI"], "jalview.analysis.scoremodels.PairwiseSeqScoreModel", ["jalview.util.Comparison"], function () { -c$ = Clazz.declareType (jalview.analysis.scoremodels, "PairwiseSeqScoreModel", null, jalview.api.analysis.ScoreModelI); -Clazz.overrideMethod (c$, "findDistances", -function (seqData) { -var sequenceString = seqData.getSequenceStrings (jalview.util.Comparison.GapChars.charAt (0)); -var noseqs = sequenceString.length; -var distance = Clazz.newFloatArray (noseqs, noseqs, 0); -var maxscore = 0; -var end = sequenceString[0].length; -for (var i = 0; i < (noseqs - 1); i++) { -for (var j = i; j < noseqs; j++) { -var score = 0; -for (var k = 0; k < end; k++) { -try { -score += this.getPairwiseScore (sequenceString[i].charAt (k), sequenceString[j].charAt (k)); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("err creating " + this.getName () + " tree"); -ex.printStackTrace (); -} else { -throw ex; -} -} -} -distance[i][j] = score; -if (score > maxscore) { -maxscore = score; -}} -} -for (var i = 0; i < (noseqs - 1); i++) { -for (var j = i; j < noseqs; j++) { -distance[i][j] = maxscore - distance[i][j]; -distance[j][i] = distance[i][j]; -} -} -return distance; -}, "jalview.datamodel.AlignmentView"); -}); +Clazz.declarePackage ("jalview.analysis.scoremodels"); +Clazz.load (["jalview.api.analysis.ScoreModelI"], "jalview.analysis.scoremodels.PairwiseSeqScoreModel", ["jalview.util.Comparison"], function () { +c$ = Clazz.declareType (jalview.analysis.scoremodels, "PairwiseSeqScoreModel", null, jalview.api.analysis.ScoreModelI); +Clazz.overrideMethod (c$, "findDistances", +function (seqData) { +var sequenceString = seqData.getSequenceStrings (jalview.util.Comparison.GapChars.charAt (0)); +var noseqs = sequenceString.length; +var distance = Clazz.newFloatArray (noseqs, noseqs, 0); +var maxscore = 0; +var end = sequenceString[0].length; +for (var i = 0; i < (noseqs - 1); i++) { +for (var j = i; j < noseqs; j++) { +var score = 0; +for (var k = 0; k < end; k++) { +try { +score += this.getPairwiseScore (sequenceString[i].charAt (k), sequenceString[j].charAt (k)); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("err creating " + this.getName () + " tree"); +ex.printStackTrace (); +} else { +throw ex; +} +} +} +distance[i][j] = score; +if (score > maxscore) { +maxscore = score; +}} +} +for (var i = 0; i < (noseqs - 1); i++) { +for (var j = i; j < noseqs; j++) { +distance[i][j] = maxscore - distance[i][j]; +distance[j][i] = distance[i][j]; +} +} +return distance; +}, "jalview.datamodel.AlignmentView"); +}); diff --git a/bin/jalview/analysis/scoremodels/SWScoreModel.js b/bin/jalview/analysis/scoremodels/SWScoreModel.js index 06ef966..e2e0eef 100644 --- a/bin/jalview/analysis/scoremodels/SWScoreModel.js +++ b/bin/jalview/analysis/scoremodels/SWScoreModel.js @@ -1,45 +1,45 @@ -Clazz.declarePackage ("jalview.analysis.scoremodels"); -Clazz.load (["jalview.api.analysis.ScoreModelI"], "jalview.analysis.scoremodels.SWScoreModel", ["jalview.analysis.AlignSeq", "jalview.util.Comparison"], function () { -c$ = Clazz.declareType (jalview.analysis.scoremodels, "SWScoreModel", null, jalview.api.analysis.ScoreModelI); -Clazz.overrideMethod (c$, "findDistances", -function (seqData) { -var sequenceString = seqData.getVisibleAlignment (jalview.util.Comparison.GapChars.charAt (0)).getSequencesArray (); -var noseqs = sequenceString.length; -var distance = Clazz.newFloatArray (noseqs, noseqs, 0); -var max = -1; -for (var i = 0; i < (noseqs - 1); i++) { -for (var j = i; j < noseqs; j++) { -var as = new jalview.analysis.AlignSeq (sequenceString[i], sequenceString[j], seqData.isNa () ? "dna" : "pep"); -as.calcScoreMatrix (); -as.traceAlignment (); -as.printAlignment (System.out); -distance[i][j] = as.maxscore; -if (max < distance[i][j]) { -max = distance[i][j]; -}} -} -for (var i = 0; i < (noseqs - 1); i++) { -for (var j = i; j < noseqs; j++) { -distance[i][j] = max - distance[i][j]; -distance[j][i] = distance[i][j]; -} -} -return distance; -}, "jalview.datamodel.AlignmentView"); -Clazz.overrideMethod (c$, "getName", -function () { -return "Smith Waterman Score"; -}); -Clazz.overrideMethod (c$, "isDNA", -function () { -return true; -}); -Clazz.overrideMethod (c$, "isProtein", -function () { -return true; -}); -Clazz.overrideMethod (c$, "toString", -function () { -return "Score between two sequences aligned with Smith Waterman with default Peptide/Nucleotide matrix"; -}); -}); +Clazz.declarePackage ("jalview.analysis.scoremodels"); +Clazz.load (["jalview.api.analysis.ScoreModelI"], "jalview.analysis.scoremodels.SWScoreModel", ["jalview.analysis.AlignSeq", "jalview.util.Comparison"], function () { +c$ = Clazz.declareType (jalview.analysis.scoremodels, "SWScoreModel", null, jalview.api.analysis.ScoreModelI); +Clazz.overrideMethod (c$, "findDistances", +function (seqData) { +var sequenceString = seqData.getVisibleAlignment (jalview.util.Comparison.GapChars.charAt (0)).getSequencesArray (); +var noseqs = sequenceString.length; +var distance = Clazz.newFloatArray (noseqs, noseqs, 0); +var max = -1; +for (var i = 0; i < (noseqs - 1); i++) { +for (var j = i; j < noseqs; j++) { +var as = new jalview.analysis.AlignSeq (sequenceString[i], sequenceString[j], seqData.isNa () ? "dna" : "pep"); +as.calcScoreMatrix (); +as.traceAlignment (); +as.printAlignment (System.out); +distance[i][j] = as.maxscore; +if (max < distance[i][j]) { +max = distance[i][j]; +}} +} +for (var i = 0; i < (noseqs - 1); i++) { +for (var j = i; j < noseqs; j++) { +distance[i][j] = max - distance[i][j]; +distance[j][i] = distance[i][j]; +} +} +return distance; +}, "jalview.datamodel.AlignmentView"); +Clazz.overrideMethod (c$, "getName", +function () { +return "Smith Waterman Score"; +}); +Clazz.overrideMethod (c$, "isDNA", +function () { +return true; +}); +Clazz.overrideMethod (c$, "isProtein", +function () { +return true; +}); +Clazz.overrideMethod (c$, "toString", +function () { +return "Score between two sequences aligned with Smith Waterman with default Peptide/Nucleotide matrix"; +}); +}); diff --git a/bin/jalview/api/AlignCalcManagerI.js b/bin/jalview/api/AlignCalcManagerI.js index 47dd8f5..231cd97 100644 --- a/bin/jalview/api/AlignCalcManagerI.js +++ b/bin/jalview/api/AlignCalcManagerI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "AlignCalcManagerI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "AlignCalcManagerI"); diff --git a/bin/jalview/api/AlignCalcWorkerI.js b/bin/jalview/api/AlignCalcWorkerI.js index cf7fe41..77fffcc 100644 --- a/bin/jalview/api/AlignCalcWorkerI.js +++ b/bin/jalview/api/AlignCalcWorkerI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "AlignCalcWorkerI", Runnable); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "AlignCalcWorkerI", Runnable); diff --git a/bin/jalview/api/AlignExportSettingI.js b/bin/jalview/api/AlignExportSettingI.js index d26a509..512e454 100644 --- a/bin/jalview/api/AlignExportSettingI.js +++ b/bin/jalview/api/AlignExportSettingI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "AlignExportSettingI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "AlignExportSettingI"); diff --git a/bin/jalview/api/AlignViewControllerGuiI.js b/bin/jalview/api/AlignViewControllerGuiI.js index b132c71..8dd9d75 100644 --- a/bin/jalview/api/AlignViewControllerGuiI.js +++ b/bin/jalview/api/AlignViewControllerGuiI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "AlignViewControllerGuiI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "AlignViewControllerGuiI"); diff --git a/bin/jalview/api/AlignViewControllerI.js b/bin/jalview/api/AlignViewControllerI.js index 9851769..4dbfb00 100644 --- a/bin/jalview/api/AlignViewControllerI.js +++ b/bin/jalview/api/AlignViewControllerI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "AlignViewControllerI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "AlignViewControllerI"); diff --git a/bin/jalview/api/AlignViewportI.js b/bin/jalview/api/AlignViewportI.js index b8de508..c65c3f7 100644 --- a/bin/jalview/api/AlignViewportI.js +++ b/bin/jalview/api/AlignViewportI.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.load (["jalview.api.ViewStyleI"], "jalview.api.AlignViewportI", null, function () { -Clazz.declareInterface (jalview.api, "AlignViewportI", jalview.api.ViewStyleI); -}); +Clazz.declarePackage ("jalview.api"); +Clazz.load (["jalview.api.ViewStyleI"], "jalview.api.AlignViewportI", null, function () { +Clazz.declareInterface (jalview.api, "AlignViewportI", jalview.api.ViewStyleI); +}); diff --git a/bin/jalview/api/AlignmentViewPanel.js b/bin/jalview/api/AlignmentViewPanel.js index 1a1598e..5e0dc22 100644 --- a/bin/jalview/api/AlignmentViewPanel.js +++ b/bin/jalview/api/AlignmentViewPanel.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.load (["jalview.api.OOMHandlerI"], "jalview.api.AlignmentViewPanel", null, function () { -Clazz.declareInterface (jalview.api, "AlignmentViewPanel", jalview.api.OOMHandlerI); -}); +Clazz.declarePackage ("jalview.api"); +Clazz.load (["jalview.api.OOMHandlerI"], "jalview.api.AlignmentViewPanel", null, function () { +Clazz.declareInterface (jalview.api, "AlignmentViewPanel", jalview.api.OOMHandlerI); +}); diff --git a/bin/jalview/api/ComplexAlignFile.js b/bin/jalview/api/ComplexAlignFile.js index 7e6e24d..c15e9ab 100644 --- a/bin/jalview/api/ComplexAlignFile.js +++ b/bin/jalview/api/ComplexAlignFile.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "ComplexAlignFile"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "ComplexAlignFile"); diff --git a/bin/jalview/api/FeatureRenderer.js b/bin/jalview/api/FeatureRenderer.js index cce7fb2..e845bcd 100644 --- a/bin/jalview/api/FeatureRenderer.js +++ b/bin/jalview/api/FeatureRenderer.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "FeatureRenderer"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "FeatureRenderer"); diff --git a/bin/jalview/api/FeatureSettingsControllerI.js b/bin/jalview/api/FeatureSettingsControllerI.js index d7e477c..6785f01 100644 --- a/bin/jalview/api/FeatureSettingsControllerI.js +++ b/bin/jalview/api/FeatureSettingsControllerI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "FeatureSettingsControllerI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "FeatureSettingsControllerI"); diff --git a/bin/jalview/api/FeatureSettingsModelI.js b/bin/jalview/api/FeatureSettingsModelI.js index a01cd0e..0fded11 100644 --- a/bin/jalview/api/FeatureSettingsModelI.js +++ b/bin/jalview/api/FeatureSettingsModelI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "FeatureSettingsModelI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "FeatureSettingsModelI"); diff --git a/bin/jalview/api/FeaturesDisplayedI.js b/bin/jalview/api/FeaturesDisplayedI.js index c796711..331bf21 100644 --- a/bin/jalview/api/FeaturesDisplayedI.js +++ b/bin/jalview/api/FeaturesDisplayedI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "FeaturesDisplayedI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "FeaturesDisplayedI"); diff --git a/bin/jalview/api/OOMHandlerI.js b/bin/jalview/api/OOMHandlerI.js index 48ab467..1f61be8 100644 --- a/bin/jalview/api/OOMHandlerI.js +++ b/bin/jalview/api/OOMHandlerI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "OOMHandlerI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "OOMHandlerI"); diff --git a/bin/jalview/api/RotatableCanvasI.js b/bin/jalview/api/RotatableCanvasI.js index ccaa5b8..e582e4c 100644 --- a/bin/jalview/api/RotatableCanvasI.js +++ b/bin/jalview/api/RotatableCanvasI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "RotatableCanvasI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "RotatableCanvasI"); diff --git a/bin/jalview/api/SequenceRenderer.js b/bin/jalview/api/SequenceRenderer.js index ce4be46..247757d 100644 --- a/bin/jalview/api/SequenceRenderer.js +++ b/bin/jalview/api/SequenceRenderer.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "SequenceRenderer"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "SequenceRenderer"); diff --git a/bin/jalview/api/SequenceStructureBinding.js b/bin/jalview/api/SequenceStructureBinding.js index f1a45f3..4eee259 100644 --- a/bin/jalview/api/SequenceStructureBinding.js +++ b/bin/jalview/api/SequenceStructureBinding.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "SequenceStructureBinding"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "SequenceStructureBinding"); diff --git a/bin/jalview/api/SplitContainerI.js b/bin/jalview/api/SplitContainerI.js index 03965d8..eb0b347 100644 --- a/bin/jalview/api/SplitContainerI.js +++ b/bin/jalview/api/SplitContainerI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "SplitContainerI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "SplitContainerI"); diff --git a/bin/jalview/api/StructureSelectionManagerProvider.js b/bin/jalview/api/StructureSelectionManagerProvider.js index a051fb2..e65f1a5 100644 --- a/bin/jalview/api/StructureSelectionManagerProvider.js +++ b/bin/jalview/api/StructureSelectionManagerProvider.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "StructureSelectionManagerProvider"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "StructureSelectionManagerProvider"); diff --git a/bin/jalview/api/ViewStyleI.js b/bin/jalview/api/ViewStyleI.js index 9838149..ea7a773 100644 --- a/bin/jalview/api/ViewStyleI.js +++ b/bin/jalview/api/ViewStyleI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api"); -Clazz.declareInterface (jalview.api, "ViewStyleI"); +Clazz.declarePackage ("jalview.api"); +Clazz.declareInterface (jalview.api, "ViewStyleI"); diff --git a/bin/jalview/api/analysis/ScoreModelI.js b/bin/jalview/api/analysis/ScoreModelI.js index 56b0281..4b5c4fb 100644 --- a/bin/jalview/api/analysis/ScoreModelI.js +++ b/bin/jalview/api/analysis/ScoreModelI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api.analysis"); -Clazz.declareInterface (jalview.api.analysis, "ScoreModelI"); +Clazz.declarePackage ("jalview.api.analysis"); +Clazz.declareInterface (jalview.api.analysis, "ScoreModelI"); diff --git a/bin/jalview/api/analysis/ViewBasedAnalysisI.js b/bin/jalview/api/analysis/ViewBasedAnalysisI.js index bc5e92d..cbb8c8d 100644 --- a/bin/jalview/api/analysis/ViewBasedAnalysisI.js +++ b/bin/jalview/api/analysis/ViewBasedAnalysisI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api.analysis"); -Clazz.declareInterface (jalview.api.analysis, "ViewBasedAnalysisI"); +Clazz.declarePackage ("jalview.api.analysis"); +Clazz.declareInterface (jalview.api.analysis, "ViewBasedAnalysisI"); diff --git a/bin/jalview/api/structures/JalviewStructureDisplayI.js b/bin/jalview/api/structures/JalviewStructureDisplayI.js index 2512221..643feb8 100644 --- a/bin/jalview/api/structures/JalviewStructureDisplayI.js +++ b/bin/jalview/api/structures/JalviewStructureDisplayI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.api.structures"); -Clazz.declareInterface (jalview.api.structures, "JalviewStructureDisplayI"); +Clazz.declarePackage ("jalview.api.structures"); +Clazz.declareInterface (jalview.api.structures, "JalviewStructureDisplayI"); diff --git a/bin/jalview/appletgui/APopupMenu.class b/bin/jalview/appletgui/APopupMenu.class index a328b2c71ec6957a4223d3a432d6003dc4cfa9ad..0400004a8a6859a85800382b5ca3296acb14043e 100644 GIT binary patch delta 146 zcmbQ#!qnZuv_Z*}F?F-DXDJu+dj_S+vxAKor6!*b&Sd18Y#E}wIX1+Ul~H>0eNfQGWBp z$cY@xy$rgORg)C>!kI)w{xGPqGb;XKSjjXwFiC{pm4TU^fsvglnVnICfq`jqagr8) hKC0N})k%+87%eyVr|UDab22dhW^iNLd?dqN5&#c-B4Pjl diff --git a/bin/jalview/appletgui/APopupMenu.js b/bin/jalview/appletgui/APopupMenu.js index eac223b..1e89852 100644 --- a/bin/jalview/appletgui/APopupMenu.js +++ b/bin/jalview/appletgui/APopupMenu.js @@ -1,797 +1,797 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.PopupMenu", "java.awt.event.ActionListener", "$.ItemListener", "awt2swing.CheckboxMenuItem", "$.Menu", "$.MenuItem", "jalview.util.MessageManager"], "jalview.appletgui.APopupMenu", ["awt2swing.Frame", "jalview.analysis.AAFrequency", "$.AlignmentAnnotationUtils", "$.AlignmentUtils", "$.Conservation", "jalview.appletgui.AppletJmol", "$.CutAndPasteTransfer", "$.EditNameDialog", "$.SliderPanel", "$.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.commands.ChangeCaseCommand", "$.EditCommand", "jalview.datamodel.SequenceFeature", "jalview.io.AppletFormatAdapter", "$.SequenceAnnotationReport", "jalview.schemes.Blosum62ColourScheme", "$.BuriedColourScheme", "$.ClustalxColourScheme", "$.HelixColourScheme", "$.HydrophobicColourScheme", "$.NucleotideColourScheme", "$.PIDColourScheme", "$.ResidueProperties", "$.StrandColourScheme", "$.TaylorColourScheme", "$.TurnColourScheme", "$.ZappoColourScheme", "jalview.util.DBRefUtils", "$.UrlLink", "java.lang.StringBuffer", "$.StringBuilder", "java.util.Arrays", "$.Collections", "$.LinkedHashMap", "$.TreeMap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.groupMenu = null; -this.editGroupName = null; -this.clustalColour = null; -this.zappoColour = null; -this.taylorColour = null; -this.hydrophobicityColour = null; -this.helixColour = null; -this.strandColour = null; -this.turnColour = null; -this.buriedColour = null; -this.abovePIDColour = null; -this.userDefinedColour = null; -this.PIDColour = null; -this.BLOSUM62Colour = null; -this.noColourmenuItem = null; -this.conservationMenuItem = null; -this.ap = null; -this.unGroupMenuItem = null; -this.createGroupMenuItem = null; -this.nucleotideMenuItem = null; -this.colourMenu = null; -this.showBoxes = null; -this.showText = null; -this.showColourText = null; -this.displayNonconserved = null; -this.seqShowAnnotationsMenu = null; -this.seqHideAnnotationsMenu = null; -this.seqAddReferenceAnnotations = null; -this.groupShowAnnotationsMenu = null; -this.groupHideAnnotationsMenu = null; -this.groupAddReferenceAnnotations = null; -this.editMenu = null; -this.copy = null; -this.cut = null; -this.toUpper = null; -this.toLower = null; -this.toggleCase = null; -this.outputmenu = null; -this.seqMenu = null; -this.pdb = null; -this.hideSeqs = null; -this.repGroup = null; -this.sequenceName = null; -this.sequenceFeature = null; -this.editSequence = null; -this.sequenceDetails = null; -this.selSeqDetails = null; -this.makeReferenceSeq = null; -this.seq = null; -this.revealAll = null; -this.revealSeq = null; -this.revealSeq_index = -1; -this.menu1 = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "APopupMenu", awt2swing.PopupMenu, [java.awt.event.ActionListener, java.awt.event.ItemListener]); -Clazz.prepareFields (c$, function () { -this.groupMenu = new awt2swing.Menu (); -this.editGroupName = new awt2swing.MenuItem (); -this.clustalColour = new awt2swing.MenuItem (); -this.zappoColour = new awt2swing.MenuItem (); -this.taylorColour = new awt2swing.MenuItem (); -this.hydrophobicityColour = new awt2swing.MenuItem (); -this.helixColour = new awt2swing.MenuItem (); -this.strandColour = new awt2swing.MenuItem (); -this.turnColour = new awt2swing.MenuItem (); -this.buriedColour = new awt2swing.MenuItem (); -this.abovePIDColour = new awt2swing.CheckboxMenuItem (); -this.userDefinedColour = new awt2swing.MenuItem (); -this.PIDColour = new awt2swing.MenuItem (); -this.BLOSUM62Colour = new awt2swing.MenuItem (); -this.noColourmenuItem = new awt2swing.MenuItem (); -this.conservationMenuItem = new awt2swing.CheckboxMenuItem (); -this.unGroupMenuItem = new awt2swing.MenuItem (); -this.createGroupMenuItem = new awt2swing.MenuItem (); -this.nucleotideMenuItem = new awt2swing.MenuItem (); -this.colourMenu = new awt2swing.Menu (); -this.showBoxes = new awt2swing.CheckboxMenuItem (); -this.showText = new awt2swing.CheckboxMenuItem (); -this.showColourText = new awt2swing.CheckboxMenuItem (); -this.displayNonconserved = new awt2swing.CheckboxMenuItem (); -this.seqShowAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.show_annotations")); -this.seqHideAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.hide_annotations")); -this.seqAddReferenceAnnotations = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.add_reference_annotations")); -this.groupShowAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.show_annotations")); -this.groupHideAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.hide_annotations")); -this.groupAddReferenceAnnotations = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.add_reference_annotations")); -this.editMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.edit")); -this.copy = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.copy")); -this.cut = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.cut")); -this.toUpper = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.to_upper_case")); -this.toLower = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.to_lower_case")); -this.toggleCase = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.toggle_case")); -this.outputmenu = new awt2swing.Menu (); -this.seqMenu = new awt2swing.Menu (); -this.pdb = new awt2swing.MenuItem (); -this.hideSeqs = new awt2swing.MenuItem (); -this.repGroup = new awt2swing.MenuItem (); -this.sequenceName = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.edit_name_description")); -this.sequenceFeature = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.create_sequence_feature")); -this.editSequence = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.edit_sequence")); -this.sequenceDetails = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sequence_details") + "..."); -this.selSeqDetails = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sequence_details") + "..."); -this.makeReferenceSeq = new awt2swing.MenuItem (); -this.revealAll = new awt2swing.MenuItem (); -this.revealSeq = new awt2swing.MenuItem (); -this.menu1 = new awt2swing.Menu (); -}); -Clazz.makeConstructor (c$, -function (apanel, seq, links) { -Clazz.superConstructor (this, jalview.appletgui.APopupMenu, []); -this.ap = apanel; -this.seq = seq; -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -for (var i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++) { -var item = new awt2swing.MenuItem (jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]); -item.addActionListener (this); -this.outputmenu.add (item); -} -this.buildAnnotationSubmenus (); -var sg = this.ap.av.getSelectionGroup (); -if (sg != null && sg.getSize () > 0) { -this.editGroupName.setLabel (jalview.util.MessageManager.formatMessage ("label.name_param", Clazz.newArray (-1, [sg.getName ()]))); -this.showText.setState (sg.getDisplayText ()); -this.showColourText.setState (sg.getColourText ()); -this.showBoxes.setState (sg.getDisplayBoxes ()); -this.displayNonconserved.setState (sg.getShowNonconserved ()); -if (!this.ap.av.getAlignment ().getGroups ().contains (sg)) { -this.menu1.setLabel (jalview.util.MessageManager.getString ("action.edit_new_group")); -this.groupMenu.remove (this.unGroupMenuItem); -} else { -this.menu1.setLabel (jalview.util.MessageManager.getString ("action.edit_group")); -this.groupMenu.remove (this.createGroupMenuItem); -}} else { -this.remove (this.hideSeqs); -this.remove (this.groupMenu); -}if (links != null && links.size () > 0) { -var linkMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.link")); -for (var i = 0; i < links.size (); i++) { -var link = links.elementAt (i); -var urlLink = new jalview.util.UrlLink (link); -if (!urlLink.isValid ()) { -System.err.println (urlLink.getInvalidMessage ()); -continue; -}var target = urlLink.getTarget (); -var label = urlLink.getLabel (); -if (seq != null && urlLink.isDynamic ()) { -var dbr = jalview.util.DBRefUtils.selectRefs (seq.getDBRef (), Clazz.newArray (-1, [target])); -var id = seq.getName (); -var descr = seq.getDescription (); -if (descr != null && descr.length < 1) { -descr = null; -}if (dbr != null) { -for (var r = 0; r < dbr.length; r++) { -if (id != null && dbr[r].getAccessionId ().equals (id)) { -id = null; -}var urls = urlLink.makeUrls (dbr[r].getAccessionId (), true); -if (urls != null) { -for (var u = 0; u < urls.length; u += 2) { -this.addshowLink (linkMenu, label + "|" + urls[u], urls[u + 1]); -} -}} -}if (id != null) { -var urls = urlLink.makeUrls (id, true); -if (urls != null) { -for (var u = 0; u < urls.length; u += 2) { -this.addshowLink (linkMenu, label, urls[u + 1]); -} -}}if (descr != null && urlLink.getRegexReplace () != null) { -var urls = urlLink.makeUrls (descr, true); -if (urls != null) { -for (var u = 0; u < urls.length; u += 2) { -this.addshowLink (linkMenu, label, urls[u + 1]); -} -}}} else { -this.addshowLink (linkMenu, target, urlLink.getUrl_prefix ()); -}} -if (linkMenu.getItemCount () > 0) { -if (seq != null) { -this.seqMenu.add (linkMenu); -} else { -this.add (linkMenu); -}}}if (seq != null) { -this.seqMenu.setLabel (seq.getName ()); -if (seq === this.ap.av.getAlignment ().getSeqrep ()) { -this.makeReferenceSeq.setLabel (jalview.util.MessageManager.getString ("action.unmark_as_reference")); -} else { -this.makeReferenceSeq.setLabel (jalview.util.MessageManager.getString ("action.set_as_reference")); -}this.repGroup.setLabel (jalview.util.MessageManager.formatMessage ("label.represent_group_with", Clazz.newArray (-1, [seq.getName ()]))); -} else { -this.remove (this.seqMenu); -}if (!this.ap.av.hasHiddenRows ()) { -this.remove (this.revealAll); -this.remove (this.revealSeq); -} else { -var index = this.ap.av.getAlignment ().findIndex (seq); -if (this.ap.av.adjustForHiddenSeqs (index) - this.ap.av.adjustForHiddenSeqs (index - 1) > 1) { -this.revealSeq_index = index; -} else { -this.remove (this.revealSeq); -}}}, "jalview.appletgui.AlignmentPanel,jalview.datamodel.SequenceI,java.util.Vector"); -Clazz.defineMethod (c$, "buildAnnotationSubmenus", -($fz = function () { -var selectedSequence = (this.seq == null ? java.util.Collections.emptyList () : java.util.Arrays.asList ([this.seq])); -this.buildAnnotationTypesMenus (this.seqShowAnnotationsMenu, this.seqHideAnnotationsMenu, selectedSequence); -this.configureReferenceAnnotationsMenu (this.seqAddReferenceAnnotations, selectedSequence); -var selectedGroup = (this.ap.av.getSelectionGroup () == null ? java.util.Collections.emptyList () : this.ap.av.getSelectionGroup ().getSequences ()); -this.buildAnnotationTypesMenus (this.groupShowAnnotationsMenu, this.groupHideAnnotationsMenu, selectedGroup); -this.configureReferenceAnnotationsMenu (this.groupAddReferenceAnnotations, selectedGroup); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "configureReferenceAnnotationsMenu", -($fz = function (menuItem, forSequences) { -menuItem.setEnabled (false); -var tipEntries = new java.util.TreeMap (); -var candidates = new java.util.LinkedHashMap (); -var al = this.ap.av.getAlignment (); -jalview.analysis.AlignmentUtils.findAddableReferenceAnnotations (forSequences, tipEntries, candidates, al); -if (!candidates.isEmpty ()) { -var tooltip = new StringBuilder (64); -tooltip.append (jalview.util.MessageManager.getString ("label.add_annotations_for")); -menuItem.setEnabled (true); -menuItem.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.APopupMenu$1") ? 0 : jalview.appletgui.APopupMenu.$APopupMenu$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.APopupMenu$1, this, Clazz.cloneFinals ("candidates", candidates)))); -}}, $fz.isPrivate = true, $fz), "awt2swing.MenuItem,java.util.List"); -Clazz.defineMethod (c$, "addReferenceAnnotations_actionPerformed", -function (candidates) { -var selectionGroup = this.ap.av.getSelectionGroup (); -var alignment = this.ap.getAlignment (); -jalview.analysis.AlignmentUtils.addReferenceAnnotations (candidates, alignment, selectionGroup); -this.refresh (); -}, "java.util.Map"); -Clazz.defineMethod (c$, "addshowLink", -($fz = function (linkMenu, target, url) { -this.addshowLink (linkMenu, target, target, url); -}, $fz.isPrivate = true, $fz), "awt2swing.Menu,~S,~S"); -Clazz.defineMethod (c$, "addshowLink", -($fz = function (linkMenu, target, label, url) { -var item = new awt2swing.MenuItem (label); -item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.APopupMenu$2") ? 0 : jalview.appletgui.APopupMenu.$APopupMenu$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.APopupMenu$2, this, Clazz.cloneFinals ("url", url, "target", target)))); -linkMenu.add (item); -}, $fz.isPrivate = true, $fz), "awt2swing.Menu,~S,~S,~S"); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -if (evt.getSource () === this.abovePIDColour) { -this.abovePIDColour_itemStateChanged (); -} else if (evt.getSource () === this.showColourText) { -this.showColourText_itemStateChanged (); -} else if (evt.getSource () === this.showText) { -this.showText_itemStateChanged (); -} else if (evt.getSource () === this.showBoxes) { -this.showBoxes_itemStateChanged (); -} else if (evt.getSource () === this.displayNonconserved) { -this.showNonconserved_itemStateChanged (); -}}, "java.awt.event.ItemEvent"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -var source = evt.getSource (); -if (source === this.clustalColour) { -this.clustalColour_actionPerformed (); -} else if (source === this.zappoColour) { -this.zappoColour_actionPerformed (); -} else if (source === this.taylorColour) { -this.taylorColour_actionPerformed (); -} else if (source === this.hydrophobicityColour) { -this.hydrophobicityColour_actionPerformed (); -} else if (source === this.helixColour) { -this.helixColour_actionPerformed (); -} else if (source === this.strandColour) { -this.strandColour_actionPerformed (); -} else if (source === this.turnColour) { -this.turnColour_actionPerformed (); -} else if (source === this.buriedColour) { -this.buriedColour_actionPerformed (); -} else if (source === this.nucleotideMenuItem) { -this.nucleotideMenuItem_actionPerformed (); -} else if (source === this.userDefinedColour) { -this.userDefinedColour_actionPerformed (); -} else if (source === this.PIDColour) { -this.PIDColour_actionPerformed (); -} else if (source === this.BLOSUM62Colour) { -this.BLOSUM62Colour_actionPerformed (); -} else if (source === this.noColourmenuItem) { -this.noColourmenuItem_actionPerformed (); -} else if (source === this.conservationMenuItem) { -this.conservationMenuItem_itemStateChanged (); -} else if (source === this.unGroupMenuItem) { -this.unGroupMenuItem_actionPerformed (); -} else if (source === this.createGroupMenuItem) { -this.createGroupMenuItem_actionPerformed (); -} else if (source === this.sequenceName) { -this.editName (); -} else if (source === this.makeReferenceSeq) { -this.makeReferenceSeq_actionPerformed (); -} else if (source === this.sequenceDetails) { -this.showSequenceDetails (); -} else if (source === this.selSeqDetails) { -this.showSequenceSelectionDetails (); -} else if (source === this.pdb) { -this.addPDB (); -} else if (source === this.hideSeqs) { -this.hideSequences (false); -} else if (source === this.repGroup) { -this.hideSequences (true); -} else if (source === this.revealSeq) { -this.ap.av.showSequence (this.revealSeq_index); -} else if (source === this.revealAll) { -this.ap.av.showAllHiddenSeqs (); -} else if (source === this.editGroupName) { -var dialog = new jalview.appletgui.EditNameDialog (this.getGroup ().getName (), this.getGroup ().getDescription (), " Group Name", "Group Description", this.ap.alignFrame, "Edit Group Name / Description", 500, 100, true); -if (dialog.accept) { -this.getGroup ().setName (dialog.getName ().$replace (' ', '_')); -this.getGroup ().setDescription (dialog.getDescription ()); -}} else if (source === this.copy) { -this.ap.alignFrame.copy_actionPerformed (); -} else if (source === this.cut) { -this.ap.alignFrame.cut_actionPerformed (); -} else if (source === this.editSequence) { -var sg = this.ap.av.getSelectionGroup (); -if (sg != null) { -if (this.seq == null) { -this.seq = sg.getSequenceAt (0); -}var dialog = new jalview.appletgui.EditNameDialog (this.seq.getSequenceAsString (sg.getStartRes (), sg.getEndRes () + 1), null, "Edit Sequence ", null, this.ap.alignFrame, "Edit Sequence", 500, 100, true); -if (dialog.accept) { -var editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("label.edit_sequences"), jalview.commands.EditCommand.Action.REPLACE, dialog.getName ().$replace (' ', this.ap.av.getGapCharacter ()), sg.getSequencesAsArray (this.ap.av.getHiddenRepSequences ()), sg.getStartRes (), sg.getEndRes () + 1, this.ap.av.getAlignment ()); -this.ap.alignFrame.addHistoryItem (editCommand); -this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); -}}} else if (source === this.toUpper || source === this.toLower || source === this.toggleCase) { -var sg = this.ap.av.getSelectionGroup (); -if (sg != null) { -var startEnd = this.ap.av.getVisibleRegionBoundaries (sg.getStartRes (), sg.getEndRes () + 1); -var description; -var caseChange; -if (source === this.toggleCase) { -description = "Toggle Case"; -caseChange = jalview.commands.ChangeCaseCommand.TOGGLE_CASE; -} else if (source === this.toUpper) { -description = "To Upper Case"; -caseChange = jalview.commands.ChangeCaseCommand.TO_UPPER; -} else { -description = "To Lower Case"; -caseChange = jalview.commands.ChangeCaseCommand.TO_LOWER; -}var caseCommand = new jalview.commands.ChangeCaseCommand (description, sg.getSequencesAsArray (this.ap.av.getHiddenRepSequences ()), startEnd, caseChange); -this.ap.alignFrame.addHistoryItem (caseCommand); -this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); -}} else if (source === this.sequenceFeature) { -var sg = this.ap.av.getSelectionGroup (); -if (sg == null) { -return; -}var rsize = 0; -var gSize = sg.getSize (); -var rseqs; -var seqs = new Array (gSize); -var tfeatures; -var features = new Array (gSize); -for (var i = 0; i < gSize; i++) { -var start = sg.getSequenceAt (i).findPosition (sg.getStartRes ()); -var end = sg.findEndRes (sg.getSequenceAt (i)); -if (start <= end) { -seqs[rsize] = sg.getSequenceAt (i); -features[rsize] = new jalview.datamodel.SequenceFeature (null, null, null, start, end, "Jalview"); -rsize++; -}} -rseqs = new Array (rsize); -tfeatures = new Array (rsize); -System.arraycopy (seqs, 0, rseqs, 0, rsize); -System.arraycopy (features, 0, tfeatures, 0, rsize); -features = tfeatures; -seqs = rseqs; -if (this.ap.seqPanel.seqCanvas.getFeatureRenderer ().amendFeatures (seqs, features, true, this.ap)) { -this.ap.alignFrame.sequenceFeatures.setState (true); -this.ap.av.setShowSequenceFeatures (true); -;this.ap.highlightSearchResults (null); -}} else { -this.outputText (evt); -}}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "outputText", -function (e) { -var cap = new jalview.appletgui.CutAndPasteTransfer (true, this.ap.alignFrame); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.selection_output_command", Clazz.newArray (-1, [e.getActionCommand ()])), 600, 500); -cap.setText ( new jalview.io.AppletFormatAdapter ().formatSequences (e.getActionCommand (), this.ap.av.getShowJVSuffix (), this.ap, true)); -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "showSequenceSelectionDetails", -function () { -this.createSequenceDetailsReport (this.ap.av.getSequenceSelection ()); -}); -Clazz.defineMethod (c$, "showSequenceDetails", -function () { -this.createSequenceDetailsReport ( Clazz.newArray (-1, [this.seq])); -}); -Clazz.defineMethod (c$, "createSequenceDetailsReport", -function (sequences) { -var cap = new jalview.appletgui.CutAndPasteTransfer (false, this.ap.alignFrame); -var contents = new StringBuffer (); -for (var seq, $seq = 0, $$seq = sequences; $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { -contents.append (jalview.util.MessageManager.formatMessage ("label.annotation_for_displayid", Clazz.newArray (-1, [seq.getDisplayId (true)]))); - new jalview.io.SequenceAnnotationReport (null).createSequenceAnnotationReport (contents, seq, true, true, false, (this.ap.seqPanel.seqCanvas.fr != null) ? this.ap.seqPanel.seqCanvas.fr.getMinMax () : null); -contents.append ("

"); -} -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, "Sequence Details for " + (sequences.length == 1 ? sequences[0].getDisplayId (true) : "Selection"), 600, 500); -cap.setText (jalview.util.MessageManager.formatMessage ("label.html_content", Clazz.newArray (-1, [contents.toString ()]))); -}, "~A"); -Clazz.defineMethod (c$, "editName", -function () { -var dialog = new jalview.appletgui.EditNameDialog (this.seq.getName (), this.seq.getDescription (), " Sequence Name", "Sequence Description", this.ap.alignFrame, "Edit Sequence Name / Description", 500, 100, true); -if (dialog.accept) { -this.seq.setName (dialog.getName ()); -this.seq.setDescription (dialog.getDescription ()); -this.ap.paintAlignment (false); -}}); -Clazz.defineMethod (c$, "addPDB", -function () { -if (this.seq.getPDBId () != null) { -var entry = this.seq.getPDBId ().firstElement (); -if (this.ap.av.applet.jmolAvailable) { - new jalview.appletgui.AppletJmol (entry, Clazz.newArray (-1, [this.seq]), null, this.ap, jalview.io.AppletFormatAdapter.URL); -}} else { -var cap = new jalview.appletgui.CutAndPasteTransfer (true, this.ap.alignFrame); -cap.setText (jalview.util.MessageManager.getString ("label.paste_pdb_file")); -cap.setPDBImport (this.seq); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.paste_pdb_file_for_sequence", Clazz.newArray (-1, [this.seq.getName ()])), 400, 300); -}}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.groupMenu.setLabel (jalview.util.MessageManager.getString ("label.selection")); -this.sequenceFeature.addActionListener (this); -this.editGroupName.addActionListener (this); -this.unGroupMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_group")); -this.unGroupMenuItem.addActionListener (this); -this.createGroupMenuItem.setLabel (jalview.util.MessageManager.getString ("action.create_group")); -this.createGroupMenuItem.addActionListener (this); -this.nucleotideMenuItem.setLabel (jalview.util.MessageManager.getString ("label.nucleotide")); -this.nucleotideMenuItem.addActionListener (this); -this.conservationMenuItem.addItemListener (this); -this.abovePIDColour.addItemListener (this); -this.colourMenu.setLabel (jalview.util.MessageManager.getString ("label.group_colour")); -this.showBoxes.setLabel (jalview.util.MessageManager.getString ("action.boxes")); -this.showBoxes.setState (true); -this.showBoxes.addItemListener (this); -this.sequenceName.addActionListener (this); -this.sequenceDetails.addActionListener (this); -this.selSeqDetails.addActionListener (this); -this.displayNonconserved.setLabel (jalview.util.MessageManager.getString ("label.show_non_conversed")); -this.displayNonconserved.setState (false); -this.displayNonconserved.addItemListener (this); -this.showText.setLabel (jalview.util.MessageManager.getString ("action.text")); -this.showText.addItemListener (this); -this.showColourText.setLabel (jalview.util.MessageManager.getString ("label.colour_text")); -this.showColourText.addItemListener (this); -this.outputmenu.setLabel (jalview.util.MessageManager.getString ("label.out_to_textbox")); -this.seqMenu.setLabel (jalview.util.MessageManager.getString ("label.sequence")); -this.pdb.setLabel (jalview.util.MessageManager.getString ("label.view_pdb_structure")); -this.hideSeqs.setLabel (jalview.util.MessageManager.getString ("action.hide_sequences")); -this.repGroup.setLabel (jalview.util.MessageManager.formatMessage ("label.represent_group_with", Clazz.newArray (-1, [""]))); -this.revealAll.setLabel (jalview.util.MessageManager.getString ("action.reveal_all")); -this.revealSeq.setLabel (jalview.util.MessageManager.getString ("action.reveal_sequences")); -this.menu1.setLabel (jalview.util.MessageManager.getString ("label.group") + ":"); -this.add (this.groupMenu); -this.add (this.seqMenu); -this.add (this.hideSeqs); -this.add (this.revealSeq); -this.add (this.revealAll); -this.groupMenu.add (this.groupShowAnnotationsMenu); -this.groupMenu.add (this.groupHideAnnotationsMenu); -this.groupMenu.add (this.groupAddReferenceAnnotations); -this.groupMenu.add (this.editMenu); -this.groupMenu.add (this.outputmenu); -this.groupMenu.add (this.sequenceFeature); -this.groupMenu.add (this.createGroupMenuItem); -this.groupMenu.add (this.unGroupMenuItem); -this.groupMenu.add (this.menu1); -this.colourMenu.add (this.noColourmenuItem); -this.colourMenu.add (this.clustalColour); -this.colourMenu.add (this.BLOSUM62Colour); -this.colourMenu.add (this.PIDColour); -this.colourMenu.add (this.zappoColour); -this.colourMenu.add (this.taylorColour); -this.colourMenu.add (this.hydrophobicityColour); -this.colourMenu.add (this.helixColour); -this.colourMenu.add (this.strandColour); -this.colourMenu.add (this.turnColour); -this.colourMenu.add (this.buriedColour); -this.colourMenu.add (this.nucleotideMenuItem); -this.colourMenu.add (this.userDefinedColour); -this.colourMenu.addSeparator (); -this.colourMenu.add (this.abovePIDColour); -this.colourMenu.add (this.conservationMenuItem); -this.noColourmenuItem.setLabel (jalview.util.MessageManager.getString ("label.none")); -this.noColourmenuItem.addActionListener (this); -this.clustalColour.setLabel (jalview.util.MessageManager.getString ("label.clustalx_colours")); -this.clustalColour.addActionListener (this); -this.zappoColour.setLabel (jalview.util.MessageManager.getString ("label.zappo")); -this.zappoColour.addActionListener (this); -this.taylorColour.setLabel (jalview.util.MessageManager.getString ("label.taylor")); -this.taylorColour.addActionListener (this); -this.hydrophobicityColour.setLabel (jalview.util.MessageManager.getString ("label.hydrophobicity")); -this.hydrophobicityColour.addActionListener (this); -this.helixColour.setLabel (jalview.util.MessageManager.getString ("label.helix_propensity")); -this.helixColour.addActionListener (this); -this.strandColour.setLabel (jalview.util.MessageManager.getString ("label.strand_propensity")); -this.strandColour.addActionListener (this); -this.turnColour.setLabel (jalview.util.MessageManager.getString ("label.turn_propensity")); -this.turnColour.addActionListener (this); -this.buriedColour.setLabel (jalview.util.MessageManager.getString ("label.buried_index")); -this.buriedColour.addActionListener (this); -this.abovePIDColour.setLabel (jalview.util.MessageManager.getString ("label.above_identity_percentage")); -this.userDefinedColour.setLabel (jalview.util.MessageManager.getString ("action.user_defined")); -this.userDefinedColour.addActionListener (this); -this.PIDColour.setLabel (jalview.util.MessageManager.getString ("action.percentage_identity")); -this.PIDColour.addActionListener (this); -this.BLOSUM62Colour.setLabel ("BLOSUM62"); -this.BLOSUM62Colour.addActionListener (this); -this.conservationMenuItem.setLabel (jalview.util.MessageManager.getString ("label.conservation")); -this.editMenu.add (this.copy); -this.copy.addActionListener (this); -this.editMenu.add (this.cut); -this.cut.addActionListener (this); -this.editMenu.add (this.editSequence); -this.editSequence.addActionListener (this); -this.editMenu.add (this.toUpper); -this.toUpper.addActionListener (this); -this.editMenu.add (this.toLower); -this.toLower.addActionListener (this); -this.editMenu.add (this.toggleCase); -this.seqMenu.add (this.seqShowAnnotationsMenu); -this.seqMenu.add (this.seqHideAnnotationsMenu); -this.seqMenu.add (this.seqAddReferenceAnnotations); -this.seqMenu.add (this.sequenceName); -this.seqMenu.add (this.makeReferenceSeq); -if (!this.ap.av.applet.useXtrnalSviewer) { -this.seqMenu.add (this.pdb); -}this.seqMenu.add (this.repGroup); -this.menu1.add (this.editGroupName); -this.menu1.add (this.colourMenu); -this.menu1.add (this.showBoxes); -this.menu1.add (this.showText); -this.menu1.add (this.showColourText); -this.menu1.add (this.displayNonconserved); -this.toggleCase.addActionListener (this); -this.pdb.addActionListener (this); -this.hideSeqs.addActionListener (this); -this.repGroup.addActionListener (this); -this.revealAll.addActionListener (this); -this.revealSeq.addActionListener (this); -this.makeReferenceSeq.addActionListener (this); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "refresh", -function () { -this.ap.paintAlignment (true); -}); -Clazz.defineMethod (c$, "clustalColour_actionPerformed", -function () { -var sg = this.getGroup (); -sg.cs = new jalview.schemes.ClustalxColourScheme (sg, this.ap.av.getHiddenRepSequences ()); -this.refresh (); -}); -Clazz.defineMethod (c$, "zappoColour_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.ZappoColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "taylorColour_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.TaylorColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "hydrophobicityColour_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.HydrophobicColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "helixColour_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.HelixColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "strandColour_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.StrandColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "turnColour_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.TurnColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "buriedColour_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.BuriedColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "nucleotideMenuItem_actionPerformed", -function () { -this.getGroup ().cs = new jalview.schemes.NucleotideColourScheme (); -this.refresh (); -}); -Clazz.defineMethod (c$, "abovePIDColour_itemStateChanged", -function () { -var sg = this.getGroup (); -if (sg.cs == null) { -return; -}if (this.abovePIDColour.getState ()) { -sg.cs.setConsensus (jalview.analysis.AAFrequency.calculate (sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth ())); -var threshold = jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, sg.cs, this.getGroup ().getName ()); -sg.cs.setThreshold (threshold, this.ap.av.isIgnoreGapsConsensus ()); -jalview.appletgui.SliderPanel.showPIDSlider (); -} else { -sg.cs.setThreshold (0, this.ap.av.isIgnoreGapsConsensus ()); -}this.refresh (); -}); -Clazz.defineMethod (c$, "userDefinedColour_actionPerformed", -function () { - new jalview.appletgui.UserDefinedColours (this.ap, this.getGroup ()); -}); -Clazz.defineMethod (c$, "PIDColour_actionPerformed", -function () { -var sg = this.getGroup (); -sg.cs = new jalview.schemes.PIDColourScheme (); -sg.cs.setConsensus (jalview.analysis.AAFrequency.calculate (sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth ())); -this.refresh (); -}); -Clazz.defineMethod (c$, "BLOSUM62Colour_actionPerformed", -function () { -var sg = this.getGroup (); -sg.cs = new jalview.schemes.Blosum62ColourScheme (); -sg.cs.setConsensus (jalview.analysis.AAFrequency.calculate (sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth ())); -this.refresh (); -}); -Clazz.defineMethod (c$, "noColourmenuItem_actionPerformed", -function () { -this.getGroup ().cs = null; -this.refresh (); -}); -Clazz.defineMethod (c$, "conservationMenuItem_itemStateChanged", -function () { -var sg = this.getGroup (); -if (sg.cs == null) { -return; -}if (this.conservationMenuItem.getState ()) { -sg.cs.setConservation (jalview.analysis.Conservation.calculateConservation ("Group", jalview.schemes.ResidueProperties.propHash, 3, sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth (), false, this.ap.av.getConsPercGaps (), false)); -jalview.appletgui.SliderPanel.setConservationSlider (this.ap, sg.cs, sg.getName ()); -jalview.appletgui.SliderPanel.showConservationSlider (); -} else { -sg.cs.setConservation (null); -}this.refresh (); -}); -Clazz.defineMethod (c$, "getGroup", -function () { -var sg = this.ap.av.getSelectionGroup (); -if (sg != null) { -this.ap.av.getAlignment ().addGroup (sg); -}return sg; -}); -Clazz.defineMethod (c$, "unGroupMenuItem_actionPerformed", -function () { -var sg = this.ap.av.getSelectionGroup (); -this.ap.av.getAlignment ().deleteGroup (sg); -this.ap.av.setSelectionGroup (null); -this.ap.paintAlignment (true); -}); -Clazz.defineMethod (c$, "createGroupMenuItem_actionPerformed", -function () { -this.getGroup (); -this.refresh (); -}); -Clazz.defineMethod (c$, "showColourText_itemStateChanged", -function () { -this.getGroup ().setColourText (this.showColourText.getState ()); -this.refresh (); -}); -Clazz.defineMethod (c$, "showText_itemStateChanged", -function () { -this.getGroup ().setDisplayText (this.showText.getState ()); -this.refresh (); -}); -Clazz.defineMethod (c$, "makeReferenceSeq_actionPerformed", -function () { -if (!this.ap.av.getAlignment ().hasSeqrep ()) { -this.ap.av.setDisplayReferenceSeq (true); -this.ap.av.setColourByReferenceSeq (true); -this.ap.av.getAlignment ().setSeqrep (this.seq); -} else { -if (this.ap.av.getAlignment ().getSeqrep () === this.seq) { -this.ap.av.getAlignment ().setSeqrep (null); -} else { -this.ap.av.getAlignment ().setSeqrep (this.seq); -}}this.refresh (); -}); -Clazz.defineMethod (c$, "showNonconserved_itemStateChanged", -function () { -this.getGroup ().setShowNonconserved (this.displayNonconserved.getState ()); -this.refresh (); -}); -Clazz.defineMethod (c$, "showBoxes_itemStateChanged", -function () { -this.getGroup ().setDisplayBoxes (this.showBoxes.getState ()); -this.refresh (); -}); -Clazz.defineMethod (c$, "hideSequences", -function (representGroup) { -var sg = this.ap.av.getSelectionGroup (); -if (sg == null || sg.getSize () < 1) { -this.ap.av.hideSequence ( Clazz.newArray (-1, [this.seq])); -return; -}this.ap.av.setSelectionGroup (null); -if (representGroup) { -this.ap.av.hideRepSequences (this.seq, sg); -return; -}var gsize = sg.getSize (); -var hseqs; -hseqs = new Array (gsize); -var index = 0; -for (var i = 0; i < gsize; i++) { -hseqs[index++] = sg.getSequenceAt (i); -} -this.ap.av.hideSequence (hseqs); -this.ap.av.sendSelection (); -}, "~B"); -Clazz.defineMethod (c$, "buildAnnotationTypesMenus", -function (showMenu, hideMenu, forSequences) { -showMenu.removeAll (); -hideMenu.removeAll (); -var all = java.util.Arrays.asList (["All"]); -this.addAnnotationTypeToShowHide (showMenu, forSequences, "", all, true, true); -this.addAnnotationTypeToShowHide (hideMenu, forSequences, "", all, true, false); -showMenu.addSeparator (); -hideMenu.addSeparator (); -var annotations = this.ap.getAlignment ().getAlignmentAnnotation (); -var shownTypes = new java.util.LinkedHashMap (); -var hiddenTypes = new java.util.LinkedHashMap (); -jalview.analysis.AlignmentAnnotationUtils.getShownHiddenTypes (shownTypes, hiddenTypes, jalview.analysis.AlignmentAnnotationUtils.asList (annotations), forSequences); -for (var calcId, $calcId = hiddenTypes.keySet ().iterator (); $calcId.hasNext () && ((calcId = $calcId.next ()) || true);) { -for (var type, $type = hiddenTypes.get (calcId).iterator (); $type.hasNext () && ((type = $type.next ()) || true);) { -this.addAnnotationTypeToShowHide (showMenu, forSequences, calcId, type, false, true); -} -} -showMenu.setEnabled (!hiddenTypes.isEmpty ()); -for (var calcId, $calcId = shownTypes.keySet ().iterator (); $calcId.hasNext () && ((calcId = $calcId.next ()) || true);) { -for (var type, $type = shownTypes.get (calcId).iterator (); $type.hasNext () && ((type = $type.next ()) || true);) { -this.addAnnotationTypeToShowHide (hideMenu, forSequences, calcId, type, false, false); -} -} -hideMenu.setEnabled (!shownTypes.isEmpty ()); -}, "awt2swing.Menu,awt2swing.Menu,java.util.List"); -Clazz.defineMethod (c$, "addAnnotationTypeToShowHide", -function (showOrHideMenu, forSequences, calcId, types, allTypes, actionIsShow) { -var label = types.toString (); -label = label.substring (1, label.length - 1); -var item = new awt2swing.MenuItem (label); -item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.APopupMenu$3") ? 0 : jalview.appletgui.APopupMenu.$APopupMenu$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.APopupMenu$3, this, Clazz.cloneFinals ("types", types, "forSequences", forSequences, "allTypes", allTypes, "actionIsShow", actionIsShow)))); -showOrHideMenu.add (item); -}, "awt2swing.Menu,java.util.List,~S,java.util.List,~B,~B"); -c$.$APopupMenu$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "APopupMenu$1", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.APopupMenu"].addReferenceAnnotations_actionPerformed (this.f$.candidates); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$APopupMenu$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "APopupMenu$2", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.APopupMenu"].ap.alignFrame.showURL (this.f$.url, this.f$.target); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$APopupMenu$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "APopupMenu$3", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -jalview.analysis.AlignmentUtils.showOrHideSequenceAnnotations (this.b$["jalview.appletgui.APopupMenu"].ap.getAlignment (), this.f$.types, this.f$.forSequences, this.f$.allTypes, this.f$.actionIsShow); -this.b$["jalview.appletgui.APopupMenu"].refresh (); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"ALL_ANNOTATIONS", "All"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.PopupMenu", "java.awt.event.ActionListener", "$.ItemListener", "awt2swing.CheckboxMenuItem", "$.Menu", "$.MenuItem", "jalview.util.MessageManager"], "jalview.appletgui.APopupMenu", ["awt2swing.Frame", "jalview.analysis.AAFrequency", "$.AlignmentAnnotationUtils", "$.AlignmentUtils", "$.Conservation", "jalview.appletgui.AppletJmol", "$.CutAndPasteTransfer", "$.EditNameDialog", "$.SliderPanel", "$.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.commands.ChangeCaseCommand", "$.EditCommand", "jalview.datamodel.SequenceFeature", "jalview.io.AppletFormatAdapter", "$.SequenceAnnotationReport", "jalview.schemes.Blosum62ColourScheme", "$.BuriedColourScheme", "$.ClustalxColourScheme", "$.HelixColourScheme", "$.HydrophobicColourScheme", "$.NucleotideColourScheme", "$.PIDColourScheme", "$.ResidueProperties", "$.StrandColourScheme", "$.TaylorColourScheme", "$.TurnColourScheme", "$.ZappoColourScheme", "jalview.util.DBRefUtils", "$.UrlLink", "java.lang.StringBuffer", "$.StringBuilder", "java.util.Arrays", "$.Collections", "$.LinkedHashMap", "$.TreeMap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.groupMenu = null; +this.editGroupName = null; +this.clustalColour = null; +this.zappoColour = null; +this.taylorColour = null; +this.hydrophobicityColour = null; +this.helixColour = null; +this.strandColour = null; +this.turnColour = null; +this.buriedColour = null; +this.abovePIDColour = null; +this.userDefinedColour = null; +this.PIDColour = null; +this.BLOSUM62Colour = null; +this.noColourmenuItem = null; +this.conservationMenuItem = null; +this.ap = null; +this.unGroupMenuItem = null; +this.createGroupMenuItem = null; +this.nucleotideMenuItem = null; +this.colourMenu = null; +this.showBoxes = null; +this.showText = null; +this.showColourText = null; +this.displayNonconserved = null; +this.seqShowAnnotationsMenu = null; +this.seqHideAnnotationsMenu = null; +this.seqAddReferenceAnnotations = null; +this.groupShowAnnotationsMenu = null; +this.groupHideAnnotationsMenu = null; +this.groupAddReferenceAnnotations = null; +this.editMenu = null; +this.copy = null; +this.cut = null; +this.toUpper = null; +this.toLower = null; +this.toggleCase = null; +this.outputmenu = null; +this.seqMenu = null; +this.pdb = null; +this.hideSeqs = null; +this.repGroup = null; +this.sequenceName = null; +this.sequenceFeature = null; +this.editSequence = null; +this.sequenceDetails = null; +this.selSeqDetails = null; +this.makeReferenceSeq = null; +this.seq = null; +this.revealAll = null; +this.revealSeq = null; +this.revealSeq_index = -1; +this.menu1 = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "APopupMenu", awt2swing.PopupMenu, [java.awt.event.ActionListener, java.awt.event.ItemListener]); +Clazz.prepareFields (c$, function () { +this.groupMenu = new awt2swing.Menu (); +this.editGroupName = new awt2swing.MenuItem (); +this.clustalColour = new awt2swing.MenuItem (); +this.zappoColour = new awt2swing.MenuItem (); +this.taylorColour = new awt2swing.MenuItem (); +this.hydrophobicityColour = new awt2swing.MenuItem (); +this.helixColour = new awt2swing.MenuItem (); +this.strandColour = new awt2swing.MenuItem (); +this.turnColour = new awt2swing.MenuItem (); +this.buriedColour = new awt2swing.MenuItem (); +this.abovePIDColour = new awt2swing.CheckboxMenuItem (); +this.userDefinedColour = new awt2swing.MenuItem (); +this.PIDColour = new awt2swing.MenuItem (); +this.BLOSUM62Colour = new awt2swing.MenuItem (); +this.noColourmenuItem = new awt2swing.MenuItem (); +this.conservationMenuItem = new awt2swing.CheckboxMenuItem (); +this.unGroupMenuItem = new awt2swing.MenuItem (); +this.createGroupMenuItem = new awt2swing.MenuItem (); +this.nucleotideMenuItem = new awt2swing.MenuItem (); +this.colourMenu = new awt2swing.Menu (); +this.showBoxes = new awt2swing.CheckboxMenuItem (); +this.showText = new awt2swing.CheckboxMenuItem (); +this.showColourText = new awt2swing.CheckboxMenuItem (); +this.displayNonconserved = new awt2swing.CheckboxMenuItem (); +this.seqShowAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.show_annotations")); +this.seqHideAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.hide_annotations")); +this.seqAddReferenceAnnotations = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.add_reference_annotations")); +this.groupShowAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.show_annotations")); +this.groupHideAnnotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.hide_annotations")); +this.groupAddReferenceAnnotations = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.add_reference_annotations")); +this.editMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.edit")); +this.copy = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.copy")); +this.cut = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.cut")); +this.toUpper = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.to_upper_case")); +this.toLower = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.to_lower_case")); +this.toggleCase = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.toggle_case")); +this.outputmenu = new awt2swing.Menu (); +this.seqMenu = new awt2swing.Menu (); +this.pdb = new awt2swing.MenuItem (); +this.hideSeqs = new awt2swing.MenuItem (); +this.repGroup = new awt2swing.MenuItem (); +this.sequenceName = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.edit_name_description")); +this.sequenceFeature = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.create_sequence_feature")); +this.editSequence = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.edit_sequence")); +this.sequenceDetails = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sequence_details") + "..."); +this.selSeqDetails = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sequence_details") + "..."); +this.makeReferenceSeq = new awt2swing.MenuItem (); +this.revealAll = new awt2swing.MenuItem (); +this.revealSeq = new awt2swing.MenuItem (); +this.menu1 = new awt2swing.Menu (); +}); +Clazz.makeConstructor (c$, +function (apanel, seq, links) { +Clazz.superConstructor (this, jalview.appletgui.APopupMenu, []); +this.ap = apanel; +this.seq = seq; +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +for (var i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++) { +var item = new awt2swing.MenuItem (jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]); +item.addActionListener (this); +this.outputmenu.add (item); +} +this.buildAnnotationSubmenus (); +var sg = this.ap.av.getSelectionGroup (); +if (sg != null && sg.getSize () > 0) { +this.editGroupName.setLabel (jalview.util.MessageManager.formatMessage ("label.name_param", Clazz.newArray (-1, [sg.getName ()]))); +this.showText.setState (sg.getDisplayText ()); +this.showColourText.setState (sg.getColourText ()); +this.showBoxes.setState (sg.getDisplayBoxes ()); +this.displayNonconserved.setState (sg.getShowNonconserved ()); +if (!this.ap.av.getAlignment ().getGroups ().contains (sg)) { +this.menu1.setLabel (jalview.util.MessageManager.getString ("action.edit_new_group")); +this.groupMenu.remove (this.unGroupMenuItem); +} else { +this.menu1.setLabel (jalview.util.MessageManager.getString ("action.edit_group")); +this.groupMenu.remove (this.createGroupMenuItem); +}} else { +this.remove (this.hideSeqs); +this.remove (this.groupMenu); +}if (links != null && links.size () > 0) { +var linkMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.link")); +for (var i = 0; i < links.size (); i++) { +var link = links.elementAt (i); +var urlLink = new jalview.util.UrlLink (link); +if (!urlLink.isValid ()) { +System.err.println (urlLink.getInvalidMessage ()); +continue; +}var target = urlLink.getTarget (); +var label = urlLink.getLabel (); +if (seq != null && urlLink.isDynamic ()) { +var dbr = jalview.util.DBRefUtils.selectRefs (seq.getDBRef (), Clazz.newArray (-1, [target])); +var id = seq.getName (); +var descr = seq.getDescription (); +if (descr != null && descr.length < 1) { +descr = null; +}if (dbr != null) { +for (var r = 0; r < dbr.length; r++) { +if (id != null && dbr[r].getAccessionId ().equals (id)) { +id = null; +}var urls = urlLink.makeUrls (dbr[r].getAccessionId (), true); +if (urls != null) { +for (var u = 0; u < urls.length; u += 2) { +this.addshowLink (linkMenu, label + "|" + urls[u], urls[u + 1]); +} +}} +}if (id != null) { +var urls = urlLink.makeUrls (id, true); +if (urls != null) { +for (var u = 0; u < urls.length; u += 2) { +this.addshowLink (linkMenu, label, urls[u + 1]); +} +}}if (descr != null && urlLink.getRegexReplace () != null) { +var urls = urlLink.makeUrls (descr, true); +if (urls != null) { +for (var u = 0; u < urls.length; u += 2) { +this.addshowLink (linkMenu, label, urls[u + 1]); +} +}}} else { +this.addshowLink (linkMenu, target, urlLink.getUrl_prefix ()); +}} +if (linkMenu.getItemCount () > 0) { +if (seq != null) { +this.seqMenu.add (linkMenu); +} else { +this.add (linkMenu); +}}}if (seq != null) { +this.seqMenu.setLabel (seq.getName ()); +if (seq === this.ap.av.getAlignment ().getSeqrep ()) { +this.makeReferenceSeq.setLabel (jalview.util.MessageManager.getString ("action.unmark_as_reference")); +} else { +this.makeReferenceSeq.setLabel (jalview.util.MessageManager.getString ("action.set_as_reference")); +}this.repGroup.setLabel (jalview.util.MessageManager.formatMessage ("label.represent_group_with", Clazz.newArray (-1, [seq.getName ()]))); +} else { +this.remove (this.seqMenu); +}if (!this.ap.av.hasHiddenRows ()) { +this.remove (this.revealAll); +this.remove (this.revealSeq); +} else { +var index = this.ap.av.getAlignment ().findIndex (seq); +if (this.ap.av.adjustForHiddenSeqs (index) - this.ap.av.adjustForHiddenSeqs (index - 1) > 1) { +this.revealSeq_index = index; +} else { +this.remove (this.revealSeq); +}}}, "jalview.appletgui.AlignmentPanel,jalview.datamodel.SequenceI,java.util.Vector"); +Clazz.defineMethod (c$, "buildAnnotationSubmenus", +($fz = function () { +var selectedSequence = (this.seq == null ? java.util.Collections.emptyList () : java.util.Arrays.asList ([this.seq])); +this.buildAnnotationTypesMenus (this.seqShowAnnotationsMenu, this.seqHideAnnotationsMenu, selectedSequence); +this.configureReferenceAnnotationsMenu (this.seqAddReferenceAnnotations, selectedSequence); +var selectedGroup = (this.ap.av.getSelectionGroup () == null ? java.util.Collections.emptyList () : this.ap.av.getSelectionGroup ().getSequences ()); +this.buildAnnotationTypesMenus (this.groupShowAnnotationsMenu, this.groupHideAnnotationsMenu, selectedGroup); +this.configureReferenceAnnotationsMenu (this.groupAddReferenceAnnotations, selectedGroup); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "configureReferenceAnnotationsMenu", +($fz = function (menuItem, forSequences) { +menuItem.setEnabled (false); +var tipEntries = new java.util.TreeMap (); +var candidates = new java.util.LinkedHashMap (); +var al = this.ap.av.getAlignment (); +jalview.analysis.AlignmentUtils.findAddableReferenceAnnotations (forSequences, tipEntries, candidates, al); +if (!candidates.isEmpty ()) { +var tooltip = new StringBuilder (64); +tooltip.append (jalview.util.MessageManager.getString ("label.add_annotations_for")); +menuItem.setEnabled (true); +menuItem.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.APopupMenu$1") ? 0 : jalview.appletgui.APopupMenu.$APopupMenu$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.APopupMenu$1, this, Clazz.cloneFinals ("candidates", candidates)))); +}}, $fz.isPrivate = true, $fz), "awt2swing.MenuItem,java.util.List"); +Clazz.defineMethod (c$, "addReferenceAnnotations_actionPerformed", +function (candidates) { +var selectionGroup = this.ap.av.getSelectionGroup (); +var alignment = this.ap.getAlignment (); +jalview.analysis.AlignmentUtils.addReferenceAnnotations (candidates, alignment, selectionGroup); +this.refresh (); +}, "java.util.Map"); +Clazz.defineMethod (c$, "addshowLink", +($fz = function (linkMenu, target, url) { +this.addshowLink (linkMenu, target, target, url); +}, $fz.isPrivate = true, $fz), "awt2swing.Menu,~S,~S"); +Clazz.defineMethod (c$, "addshowLink", +($fz = function (linkMenu, target, label, url) { +var item = new awt2swing.MenuItem (label); +item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.APopupMenu$2") ? 0 : jalview.appletgui.APopupMenu.$APopupMenu$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.APopupMenu$2, this, Clazz.cloneFinals ("url", url, "target", target)))); +linkMenu.add (item); +}, $fz.isPrivate = true, $fz), "awt2swing.Menu,~S,~S,~S"); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +if (evt.getSource () === this.abovePIDColour) { +this.abovePIDColour_itemStateChanged (); +} else if (evt.getSource () === this.showColourText) { +this.showColourText_itemStateChanged (); +} else if (evt.getSource () === this.showText) { +this.showText_itemStateChanged (); +} else if (evt.getSource () === this.showBoxes) { +this.showBoxes_itemStateChanged (); +} else if (evt.getSource () === this.displayNonconserved) { +this.showNonconserved_itemStateChanged (); +}}, "java.awt.event.ItemEvent"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +var source = evt.getSource (); +if (source === this.clustalColour) { +this.clustalColour_actionPerformed (); +} else if (source === this.zappoColour) { +this.zappoColour_actionPerformed (); +} else if (source === this.taylorColour) { +this.taylorColour_actionPerformed (); +} else if (source === this.hydrophobicityColour) { +this.hydrophobicityColour_actionPerformed (); +} else if (source === this.helixColour) { +this.helixColour_actionPerformed (); +} else if (source === this.strandColour) { +this.strandColour_actionPerformed (); +} else if (source === this.turnColour) { +this.turnColour_actionPerformed (); +} else if (source === this.buriedColour) { +this.buriedColour_actionPerformed (); +} else if (source === this.nucleotideMenuItem) { +this.nucleotideMenuItem_actionPerformed (); +} else if (source === this.userDefinedColour) { +this.userDefinedColour_actionPerformed (); +} else if (source === this.PIDColour) { +this.PIDColour_actionPerformed (); +} else if (source === this.BLOSUM62Colour) { +this.BLOSUM62Colour_actionPerformed (); +} else if (source === this.noColourmenuItem) { +this.noColourmenuItem_actionPerformed (); +} else if (source === this.conservationMenuItem) { +this.conservationMenuItem_itemStateChanged (); +} else if (source === this.unGroupMenuItem) { +this.unGroupMenuItem_actionPerformed (); +} else if (source === this.createGroupMenuItem) { +this.createGroupMenuItem_actionPerformed (); +} else if (source === this.sequenceName) { +this.editName (); +} else if (source === this.makeReferenceSeq) { +this.makeReferenceSeq_actionPerformed (); +} else if (source === this.sequenceDetails) { +this.showSequenceDetails (); +} else if (source === this.selSeqDetails) { +this.showSequenceSelectionDetails (); +} else if (source === this.pdb) { +this.addPDB (); +} else if (source === this.hideSeqs) { +this.hideSequences (false); +} else if (source === this.repGroup) { +this.hideSequences (true); +} else if (source === this.revealSeq) { +this.ap.av.showSequence (this.revealSeq_index); +} else if (source === this.revealAll) { +this.ap.av.showAllHiddenSeqs (); +} else if (source === this.editGroupName) { +var dialog = new jalview.appletgui.EditNameDialog (this.getGroup ().getName (), this.getGroup ().getDescription (), " Group Name", "Group Description", this.ap.alignFrame, "Edit Group Name / Description", 500, 100, true); +if (dialog.accept) { +this.getGroup ().setName (dialog.getName ().$replace (' ', '_')); +this.getGroup ().setDescription (dialog.getDescription ()); +}} else if (source === this.copy) { +this.ap.alignFrame.copy_actionPerformed (); +} else if (source === this.cut) { +this.ap.alignFrame.cut_actionPerformed (); +} else if (source === this.editSequence) { +var sg = this.ap.av.getSelectionGroup (); +if (sg != null) { +if (this.seq == null) { +this.seq = sg.getSequenceAt (0); +}var dialog = new jalview.appletgui.EditNameDialog (this.seq.getSequenceAsString (sg.getStartRes (), sg.getEndRes () + 1), null, "Edit Sequence ", null, this.ap.alignFrame, "Edit Sequence", 500, 100, true); +if (dialog.accept) { +var editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("label.edit_sequences"), jalview.commands.EditCommand.Action.REPLACE, dialog.getName ().$replace (' ', this.ap.av.getGapCharacter ()), sg.getSequencesAsArray (this.ap.av.getHiddenRepSequences ()), sg.getStartRes (), sg.getEndRes () + 1, this.ap.av.getAlignment ()); +this.ap.alignFrame.addHistoryItem (editCommand); +this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); +}}} else if (source === this.toUpper || source === this.toLower || source === this.toggleCase) { +var sg = this.ap.av.getSelectionGroup (); +if (sg != null) { +var startEnd = this.ap.av.getVisibleRegionBoundaries (sg.getStartRes (), sg.getEndRes () + 1); +var description; +var caseChange; +if (source === this.toggleCase) { +description = "Toggle Case"; +caseChange = jalview.commands.ChangeCaseCommand.TOGGLE_CASE; +} else if (source === this.toUpper) { +description = "To Upper Case"; +caseChange = jalview.commands.ChangeCaseCommand.TO_UPPER; +} else { +description = "To Lower Case"; +caseChange = jalview.commands.ChangeCaseCommand.TO_LOWER; +}var caseCommand = new jalview.commands.ChangeCaseCommand (description, sg.getSequencesAsArray (this.ap.av.getHiddenRepSequences ()), startEnd, caseChange); +this.ap.alignFrame.addHistoryItem (caseCommand); +this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); +}} else if (source === this.sequenceFeature) { +var sg = this.ap.av.getSelectionGroup (); +if (sg == null) { +return; +}var rsize = 0; +var gSize = sg.getSize (); +var rseqs; +var seqs = new Array (gSize); +var tfeatures; +var features = new Array (gSize); +for (var i = 0; i < gSize; i++) { +var start = sg.getSequenceAt (i).findPosition (sg.getStartRes ()); +var end = sg.findEndRes (sg.getSequenceAt (i)); +if (start <= end) { +seqs[rsize] = sg.getSequenceAt (i); +features[rsize] = new jalview.datamodel.SequenceFeature (null, null, null, start, end, "Jalview"); +rsize++; +}} +rseqs = new Array (rsize); +tfeatures = new Array (rsize); +System.arraycopy (seqs, 0, rseqs, 0, rsize); +System.arraycopy (features, 0, tfeatures, 0, rsize); +features = tfeatures; +seqs = rseqs; +if (this.ap.seqPanel.seqCanvas.getFeatureRenderer ().amendFeatures (seqs, features, true, this.ap)) { +this.ap.alignFrame.sequenceFeatures.setState (true); +this.ap.av.setShowSequenceFeatures (true); +;this.ap.highlightSearchResults (null); +}} else { +this.outputText (evt); +}}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "outputText", +function (e) { +var cap = new jalview.appletgui.CutAndPasteTransfer (true, this.ap.alignFrame); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.selection_output_command", Clazz.newArray (-1, [e.getActionCommand ()])), 600, 500); +cap.setText ( new jalview.io.AppletFormatAdapter ().formatSequences (e.getActionCommand (), this.ap.av.getShowJVSuffix (), this.ap, true)); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "showSequenceSelectionDetails", +function () { +this.createSequenceDetailsReport (this.ap.av.getSequenceSelection ()); +}); +Clazz.defineMethod (c$, "showSequenceDetails", +function () { +this.createSequenceDetailsReport ( Clazz.newArray (-1, [this.seq])); +}); +Clazz.defineMethod (c$, "createSequenceDetailsReport", +function (sequences) { +var cap = new jalview.appletgui.CutAndPasteTransfer (false, this.ap.alignFrame); +var contents = new StringBuffer (); +for (var seq, $seq = 0, $$seq = sequences; $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { +contents.append (jalview.util.MessageManager.formatMessage ("label.annotation_for_displayid", Clazz.newArray (-1, [seq.getDisplayId (true)]))); + new jalview.io.SequenceAnnotationReport (null).createSequenceAnnotationReport (contents, seq, true, true, false, (this.ap.seqPanel.seqCanvas.fr != null) ? this.ap.seqPanel.seqCanvas.fr.getMinMax () : null); +contents.append ("

"); +} +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, "Sequence Details for " + (sequences.length == 1 ? sequences[0].getDisplayId (true) : "Selection"), 600, 500); +cap.setText (jalview.util.MessageManager.formatMessage ("label.html_content", Clazz.newArray (-1, [contents.toString ()]))); +}, "~A"); +Clazz.defineMethod (c$, "editName", +function () { +var dialog = new jalview.appletgui.EditNameDialog (this.seq.getName (), this.seq.getDescription (), " Sequence Name", "Sequence Description", this.ap.alignFrame, "Edit Sequence Name / Description", 500, 100, true); +if (dialog.accept) { +this.seq.setName (dialog.getName ()); +this.seq.setDescription (dialog.getDescription ()); +this.ap.paintAlignment (false); +}}); +Clazz.defineMethod (c$, "addPDB", +function () { +if (this.seq.getPDBId () != null) { +var entry = this.seq.getPDBId ().firstElement (); +if (this.ap.av.applet.jmolAvailable) { + new jalview.appletgui.AppletJmol (entry, Clazz.newArray (-1, [this.seq]), null, this.ap, jalview.io.AppletFormatAdapter.URL); +}} else { +var cap = new jalview.appletgui.CutAndPasteTransfer (true, this.ap.alignFrame); +cap.setText (jalview.util.MessageManager.getString ("label.paste_pdb_file")); +cap.setPDBImport (this.seq); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.paste_pdb_file_for_sequence", Clazz.newArray (-1, [this.seq.getName ()])), 400, 300); +}}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.groupMenu.setLabel (jalview.util.MessageManager.getString ("label.selection")); +this.sequenceFeature.addActionListener (this); +this.editGroupName.addActionListener (this); +this.unGroupMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_group")); +this.unGroupMenuItem.addActionListener (this); +this.createGroupMenuItem.setLabel (jalview.util.MessageManager.getString ("action.create_group")); +this.createGroupMenuItem.addActionListener (this); +this.nucleotideMenuItem.setLabel (jalview.util.MessageManager.getString ("label.nucleotide")); +this.nucleotideMenuItem.addActionListener (this); +this.conservationMenuItem.addItemListener (this); +this.abovePIDColour.addItemListener (this); +this.colourMenu.setLabel (jalview.util.MessageManager.getString ("label.group_colour")); +this.showBoxes.setLabel (jalview.util.MessageManager.getString ("action.boxes")); +this.showBoxes.setState (true); +this.showBoxes.addItemListener (this); +this.sequenceName.addActionListener (this); +this.sequenceDetails.addActionListener (this); +this.selSeqDetails.addActionListener (this); +this.displayNonconserved.setLabel (jalview.util.MessageManager.getString ("label.show_non_conversed")); +this.displayNonconserved.setState (false); +this.displayNonconserved.addItemListener (this); +this.showText.setLabel (jalview.util.MessageManager.getString ("action.text")); +this.showText.addItemListener (this); +this.showColourText.setLabel (jalview.util.MessageManager.getString ("label.colour_text")); +this.showColourText.addItemListener (this); +this.outputmenu.setLabel (jalview.util.MessageManager.getString ("label.out_to_textbox")); +this.seqMenu.setLabel (jalview.util.MessageManager.getString ("label.sequence")); +this.pdb.setLabel (jalview.util.MessageManager.getString ("label.view_pdb_structure")); +this.hideSeqs.setLabel (jalview.util.MessageManager.getString ("action.hide_sequences")); +this.repGroup.setLabel (jalview.util.MessageManager.formatMessage ("label.represent_group_with", Clazz.newArray (-1, [""]))); +this.revealAll.setLabel (jalview.util.MessageManager.getString ("action.reveal_all")); +this.revealSeq.setLabel (jalview.util.MessageManager.getString ("action.reveal_sequences")); +this.menu1.setLabel (jalview.util.MessageManager.getString ("label.group") + ":"); +this.add (this.groupMenu); +this.add (this.seqMenu); +this.add (this.hideSeqs); +this.add (this.revealSeq); +this.add (this.revealAll); +this.groupMenu.add (this.groupShowAnnotationsMenu); +this.groupMenu.add (this.groupHideAnnotationsMenu); +this.groupMenu.add (this.groupAddReferenceAnnotations); +this.groupMenu.add (this.editMenu); +this.groupMenu.add (this.outputmenu); +this.groupMenu.add (this.sequenceFeature); +this.groupMenu.add (this.createGroupMenuItem); +this.groupMenu.add (this.unGroupMenuItem); +this.groupMenu.add (this.menu1); +this.colourMenu.add (this.noColourmenuItem); +this.colourMenu.add (this.clustalColour); +this.colourMenu.add (this.BLOSUM62Colour); +this.colourMenu.add (this.PIDColour); +this.colourMenu.add (this.zappoColour); +this.colourMenu.add (this.taylorColour); +this.colourMenu.add (this.hydrophobicityColour); +this.colourMenu.add (this.helixColour); +this.colourMenu.add (this.strandColour); +this.colourMenu.add (this.turnColour); +this.colourMenu.add (this.buriedColour); +this.colourMenu.add (this.nucleotideMenuItem); +this.colourMenu.add (this.userDefinedColour); +this.colourMenu.addSeparator (); +this.colourMenu.add (this.abovePIDColour); +this.colourMenu.add (this.conservationMenuItem); +this.noColourmenuItem.setLabel (jalview.util.MessageManager.getString ("label.none")); +this.noColourmenuItem.addActionListener (this); +this.clustalColour.setLabel (jalview.util.MessageManager.getString ("label.clustalx_colours")); +this.clustalColour.addActionListener (this); +this.zappoColour.setLabel (jalview.util.MessageManager.getString ("label.zappo")); +this.zappoColour.addActionListener (this); +this.taylorColour.setLabel (jalview.util.MessageManager.getString ("label.taylor")); +this.taylorColour.addActionListener (this); +this.hydrophobicityColour.setLabel (jalview.util.MessageManager.getString ("label.hydrophobicity")); +this.hydrophobicityColour.addActionListener (this); +this.helixColour.setLabel (jalview.util.MessageManager.getString ("label.helix_propensity")); +this.helixColour.addActionListener (this); +this.strandColour.setLabel (jalview.util.MessageManager.getString ("label.strand_propensity")); +this.strandColour.addActionListener (this); +this.turnColour.setLabel (jalview.util.MessageManager.getString ("label.turn_propensity")); +this.turnColour.addActionListener (this); +this.buriedColour.setLabel (jalview.util.MessageManager.getString ("label.buried_index")); +this.buriedColour.addActionListener (this); +this.abovePIDColour.setLabel (jalview.util.MessageManager.getString ("label.above_identity_percentage")); +this.userDefinedColour.setLabel (jalview.util.MessageManager.getString ("action.user_defined")); +this.userDefinedColour.addActionListener (this); +this.PIDColour.setLabel (jalview.util.MessageManager.getString ("action.percentage_identity")); +this.PIDColour.addActionListener (this); +this.BLOSUM62Colour.setLabel ("BLOSUM62"); +this.BLOSUM62Colour.addActionListener (this); +this.conservationMenuItem.setLabel (jalview.util.MessageManager.getString ("label.conservation")); +this.editMenu.add (this.copy); +this.copy.addActionListener (this); +this.editMenu.add (this.cut); +this.cut.addActionListener (this); +this.editMenu.add (this.editSequence); +this.editSequence.addActionListener (this); +this.editMenu.add (this.toUpper); +this.toUpper.addActionListener (this); +this.editMenu.add (this.toLower); +this.toLower.addActionListener (this); +this.editMenu.add (this.toggleCase); +this.seqMenu.add (this.seqShowAnnotationsMenu); +this.seqMenu.add (this.seqHideAnnotationsMenu); +this.seqMenu.add (this.seqAddReferenceAnnotations); +this.seqMenu.add (this.sequenceName); +this.seqMenu.add (this.makeReferenceSeq); +if (!this.ap.av.applet.useXtrnalSviewer) { +this.seqMenu.add (this.pdb); +}this.seqMenu.add (this.repGroup); +this.menu1.add (this.editGroupName); +this.menu1.add (this.colourMenu); +this.menu1.add (this.showBoxes); +this.menu1.add (this.showText); +this.menu1.add (this.showColourText); +this.menu1.add (this.displayNonconserved); +this.toggleCase.addActionListener (this); +this.pdb.addActionListener (this); +this.hideSeqs.addActionListener (this); +this.repGroup.addActionListener (this); +this.revealAll.addActionListener (this); +this.revealSeq.addActionListener (this); +this.makeReferenceSeq.addActionListener (this); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "refresh", +function () { +this.ap.paintAlignment (true); +}); +Clazz.defineMethod (c$, "clustalColour_actionPerformed", +function () { +var sg = this.getGroup (); +sg.cs = new jalview.schemes.ClustalxColourScheme (sg, this.ap.av.getHiddenRepSequences ()); +this.refresh (); +}); +Clazz.defineMethod (c$, "zappoColour_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.ZappoColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "taylorColour_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.TaylorColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "hydrophobicityColour_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.HydrophobicColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "helixColour_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.HelixColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "strandColour_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.StrandColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "turnColour_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.TurnColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "buriedColour_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.BuriedColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "nucleotideMenuItem_actionPerformed", +function () { +this.getGroup ().cs = new jalview.schemes.NucleotideColourScheme (); +this.refresh (); +}); +Clazz.defineMethod (c$, "abovePIDColour_itemStateChanged", +function () { +var sg = this.getGroup (); +if (sg.cs == null) { +return; +}if (this.abovePIDColour.getState ()) { +sg.cs.setConsensus (jalview.analysis.AAFrequency.calculate (sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth ())); +var threshold = jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, sg.cs, this.getGroup ().getName ()); +sg.cs.setThreshold (threshold, this.ap.av.isIgnoreGapsConsensus ()); +jalview.appletgui.SliderPanel.showPIDSlider (); +} else { +sg.cs.setThreshold (0, this.ap.av.isIgnoreGapsConsensus ()); +}this.refresh (); +}); +Clazz.defineMethod (c$, "userDefinedColour_actionPerformed", +function () { + new jalview.appletgui.UserDefinedColours (this.ap, this.getGroup ()); +}); +Clazz.defineMethod (c$, "PIDColour_actionPerformed", +function () { +var sg = this.getGroup (); +sg.cs = new jalview.schemes.PIDColourScheme (); +sg.cs.setConsensus (jalview.analysis.AAFrequency.calculate (sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth ())); +this.refresh (); +}); +Clazz.defineMethod (c$, "BLOSUM62Colour_actionPerformed", +function () { +var sg = this.getGroup (); +sg.cs = new jalview.schemes.Blosum62ColourScheme (); +sg.cs.setConsensus (jalview.analysis.AAFrequency.calculate (sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth ())); +this.refresh (); +}); +Clazz.defineMethod (c$, "noColourmenuItem_actionPerformed", +function () { +this.getGroup ().cs = null; +this.refresh (); +}); +Clazz.defineMethod (c$, "conservationMenuItem_itemStateChanged", +function () { +var sg = this.getGroup (); +if (sg.cs == null) { +return; +}if (this.conservationMenuItem.getState ()) { +sg.cs.setConservation (jalview.analysis.Conservation.calculateConservation ("Group", jalview.schemes.ResidueProperties.propHash, 3, sg.getSequences (this.ap.av.getHiddenRepSequences ()), 0, this.ap.av.getAlignment ().getWidth (), false, this.ap.av.getConsPercGaps (), false)); +jalview.appletgui.SliderPanel.setConservationSlider (this.ap, sg.cs, sg.getName ()); +jalview.appletgui.SliderPanel.showConservationSlider (); +} else { +sg.cs.setConservation (null); +}this.refresh (); +}); +Clazz.defineMethod (c$, "getGroup", +function () { +var sg = this.ap.av.getSelectionGroup (); +if (sg != null) { +this.ap.av.getAlignment ().addGroup (sg); +}return sg; +}); +Clazz.defineMethod (c$, "unGroupMenuItem_actionPerformed", +function () { +var sg = this.ap.av.getSelectionGroup (); +this.ap.av.getAlignment ().deleteGroup (sg); +this.ap.av.setSelectionGroup (null); +this.ap.paintAlignment (true); +}); +Clazz.defineMethod (c$, "createGroupMenuItem_actionPerformed", +function () { +this.getGroup (); +this.refresh (); +}); +Clazz.defineMethod (c$, "showColourText_itemStateChanged", +function () { +this.getGroup ().setColourText (this.showColourText.getState ()); +this.refresh (); +}); +Clazz.defineMethod (c$, "showText_itemStateChanged", +function () { +this.getGroup ().setDisplayText (this.showText.getState ()); +this.refresh (); +}); +Clazz.defineMethod (c$, "makeReferenceSeq_actionPerformed", +function () { +if (!this.ap.av.getAlignment ().hasSeqrep ()) { +this.ap.av.setDisplayReferenceSeq (true); +this.ap.av.setColourByReferenceSeq (true); +this.ap.av.getAlignment ().setSeqrep (this.seq); +} else { +if (this.ap.av.getAlignment ().getSeqrep () === this.seq) { +this.ap.av.getAlignment ().setSeqrep (null); +} else { +this.ap.av.getAlignment ().setSeqrep (this.seq); +}}this.refresh (); +}); +Clazz.defineMethod (c$, "showNonconserved_itemStateChanged", +function () { +this.getGroup ().setShowNonconserved (this.displayNonconserved.getState ()); +this.refresh (); +}); +Clazz.defineMethod (c$, "showBoxes_itemStateChanged", +function () { +this.getGroup ().setDisplayBoxes (this.showBoxes.getState ()); +this.refresh (); +}); +Clazz.defineMethod (c$, "hideSequences", +function (representGroup) { +var sg = this.ap.av.getSelectionGroup (); +if (sg == null || sg.getSize () < 1) { +this.ap.av.hideSequence ( Clazz.newArray (-1, [this.seq])); +return; +}this.ap.av.setSelectionGroup (null); +if (representGroup) { +this.ap.av.hideRepSequences (this.seq, sg); +return; +}var gsize = sg.getSize (); +var hseqs; +hseqs = new Array (gsize); +var index = 0; +for (var i = 0; i < gsize; i++) { +hseqs[index++] = sg.getSequenceAt (i); +} +this.ap.av.hideSequence (hseqs); +this.ap.av.sendSelection (); +}, "~B"); +Clazz.defineMethod (c$, "buildAnnotationTypesMenus", +function (showMenu, hideMenu, forSequences) { +showMenu.removeAll (); +hideMenu.removeAll (); +var all = java.util.Arrays.asList (["All"]); +this.addAnnotationTypeToShowHide (showMenu, forSequences, "", all, true, true); +this.addAnnotationTypeToShowHide (hideMenu, forSequences, "", all, true, false); +showMenu.addSeparator (); +hideMenu.addSeparator (); +var annotations = this.ap.getAlignment ().getAlignmentAnnotation (); +var shownTypes = new java.util.LinkedHashMap (); +var hiddenTypes = new java.util.LinkedHashMap (); +jalview.analysis.AlignmentAnnotationUtils.getShownHiddenTypes (shownTypes, hiddenTypes, jalview.analysis.AlignmentAnnotationUtils.asList (annotations), forSequences); +for (var calcId, $calcId = hiddenTypes.keySet ().iterator (); $calcId.hasNext () && ((calcId = $calcId.next ()) || true);) { +for (var type, $type = hiddenTypes.get (calcId).iterator (); $type.hasNext () && ((type = $type.next ()) || true);) { +this.addAnnotationTypeToShowHide (showMenu, forSequences, calcId, type, false, true); +} +} +showMenu.setEnabled (!hiddenTypes.isEmpty ()); +for (var calcId, $calcId = shownTypes.keySet ().iterator (); $calcId.hasNext () && ((calcId = $calcId.next ()) || true);) { +for (var type, $type = shownTypes.get (calcId).iterator (); $type.hasNext () && ((type = $type.next ()) || true);) { +this.addAnnotationTypeToShowHide (hideMenu, forSequences, calcId, type, false, false); +} +} +hideMenu.setEnabled (!shownTypes.isEmpty ()); +}, "awt2swing.Menu,awt2swing.Menu,java.util.List"); +Clazz.defineMethod (c$, "addAnnotationTypeToShowHide", +function (showOrHideMenu, forSequences, calcId, types, allTypes, actionIsShow) { +var label = types.toString (); +label = label.substring (1, label.length - 1); +var item = new awt2swing.MenuItem (label); +item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.APopupMenu$3") ? 0 : jalview.appletgui.APopupMenu.$APopupMenu$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.APopupMenu$3, this, Clazz.cloneFinals ("types", types, "forSequences", forSequences, "allTypes", allTypes, "actionIsShow", actionIsShow)))); +showOrHideMenu.add (item); +}, "awt2swing.Menu,java.util.List,~S,java.util.List,~B,~B"); +c$.$APopupMenu$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "APopupMenu$1", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.APopupMenu"].addReferenceAnnotations_actionPerformed (this.f$.candidates); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$APopupMenu$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "APopupMenu$2", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.APopupMenu"].ap.alignFrame.showURL (this.f$.url, this.f$.target); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$APopupMenu$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "APopupMenu$3", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +jalview.analysis.AlignmentUtils.showOrHideSequenceAnnotations (this.b$["jalview.appletgui.APopupMenu"].ap.getAlignment (), this.f$.types, this.f$.forSequences, this.f$.allTypes, this.f$.actionIsShow); +this.b$["jalview.appletgui.APopupMenu"].refresh (); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"ALL_ANNOTATIONS", "All"); +}); diff --git a/bin/jalview/appletgui/AlignFrame.class b/bin/jalview/appletgui/AlignFrame.class index c5a84722ff68ed5532fba2bdbd3973bc4bb066f0..f1ac80b81ee0a3a170d2bce4623677e7f13146fb 100644 GIT binary patch delta 265 zcmdn`g=Ov+mJK=!7}sppT@b*{9L*p&xnZ>$^M3~E$*WdtGjeUdzFL`?F?RFsbxYa( zwlmnt2#Wt^oOyQr|3 zn3%ZuliOVFN*49tI}nV&)PCMur&-42(B6 zH*P=1C??3j`Io^8Xva=TVSWu^HZ3j&M&`Sd7w%Nr+_3YA3ZwOA*Lz=>ncaXsv3X>{ q$hx`g(Lol*Et@T#XEHH+G4M`a^3sy~KLZEYrHl-Wn;*Um2><}1_d)Lf delta 247 zcmbRHg=Om(mJK=!7}ssqT@b*{9Lpd)xnZ>$i^P8hrpYT;YcsJkZN9o%nVGR-^Urll z*;OtvM9K(?|7PSB;ALi#0%ATUAR)m5LIQ%^U_AN4Hc=)fCLkroBfumKh9XQNOq1Vi z^RcjC;$q@*VEn_t&FH}Ri-A*Ag$am&VocmXD8dXyTueL+Ow7g1B@B!VGZ+{cZ*ET6 zevDB_h=J=bgB2q?^G-=&ehpzZb*9bMJ723X+H6+8_l23+ok3`_+#?I1<(tDF9b{o# dyIJyiCKIzW1K;G 0) { -this.viewport.hideSequence (hiddenSeqs); -}if (columnSelection != null) { -this.viewport.setColumnSelection (columnSelection); -}this.alignPanel = new jalview.appletgui.AlignmentPanel (this, this.viewport); -this.avc = new jalview.controller.AlignViewController (this, this.viewport, this.alignPanel); -this.viewport.updateConservation (this.alignPanel); -this.viewport.updateConsensus (this.alignPanel); -this.displayNonconservedMenuItem.setState (this.viewport.getShowUnconserved ()); -this.followMouseOverFlag.setState (this.viewport.isFollowHighlight ()); -this.showGroupConsensus.setState (this.viewport.isShowGroupConsensus ()); -this.showGroupConservation.setState (this.viewport.isShowGroupConservation ()); -this.showConsensusHistogram.setState (this.viewport.isShowConsensusHistogram ()); -this.showSequenceLogo.setState (this.viewport.isShowSequenceLogo ()); -this.normSequenceLogo.setState (this.viewport.isNormaliseSequenceLogo ()); -this.applyToAllGroups.setState (this.viewport.getColourAppliesToAllGroups ()); -this.annotationPanelMenuItem.setState (this.viewport.isShowAnnotation ()); -this.showAlignmentAnnotations.setState (this.viewport.isShowAnnotation ()); -this.showSequenceAnnotations.setState (this.viewport.isShowAnnotation ()); -this.seqLimits.setState (this.viewport.getShowJVSuffix ()); -if (applet != null) { -var param = applet.sortBy; -if (param != null) { -if (param.equalsIgnoreCase ("Id")) { -this.sortIDMenuItem_actionPerformed (); -} else if (param.equalsIgnoreCase ("Pairwise Identity")) { -this.sortPairwiseMenuItem_actionPerformed (); -} else if (param.equalsIgnoreCase ("Length")) { -this.sortLengthMenuItem_actionPerformed (); -}}param = applet.wrap; -if (param != null) { -if (param.equalsIgnoreCase ("true")) { -this.wrapMenuItem.setState (true); -this.wrapMenuItem_actionPerformed (); -}}param = applet.centrecolumnlabels; -if (param != null) { -this.centreColumnLabelFlag.setState (true); -this.centreColumnLabelFlag_stateChanged (); -}}if (this.viewport.getAlignment ().isNucleotide ()) { -this.viewport.updateStrucConsensus (this.alignPanel); -if (this.viewport.getAlignment ().hasRNAStructure ()) { -this.RNAHelixColour.setEnabled (true); -} else { -this.RNAHelixColour.setEnabled (false); -}} else { -this.RNAHelixColour.setEnabled (false); -this.purinePyrimidineColour.setEnabled (false); -}this.addKeyListener (this); -this.alignPanel.seqPanel.seqCanvas.addKeyListener (this); -this.alignPanel.idPanel.idCanvas.addKeyListener (this); -this.alignPanel.scalePanel.addKeyListener (this); -this.alignPanel.annotationPanel.addKeyListener (this); -this.alignPanel.annotationPanelHolder.addKeyListener (this); -this.alignPanel.annotationSpaceFillerHolder.addKeyListener (this); -this.alignPanel.alabels.addKeyListener (this); -if (addToDisplay) { -this.addToDisplay (embedded); -}}, "jalview.datamodel.AlignmentI,~A,jalview.datamodel.ColumnSelection,jalview.bin.JalviewLite,~S,~B,~B"); -Clazz.defineMethod (c$, "addToDisplay", -function (embedded) { -this.createAlignFrameWindow (embedded); -this.validate (); -this.alignPanel.adjustAnnotationHeight (); -this.alignPanel.paintAlignment (true); -}, "~B"); -Clazz.defineMethod (c$, "getAlignViewport", -function () { -return this.viewport; -}); -Clazz.defineMethod (c$, "getSeqcanvas", -function () { -return this.alignPanel.seqPanel.seqCanvas; -}); -Clazz.defineMethod (c$, "parseFeaturesFile", -function (file, type) { -return this.parseFeaturesFile (file, type, true); -}, "~S,~S"); -Clazz.defineMethod (c$, "parseFeaturesFile", -function (file, type, autoenabledisplay) { -var featureLinks = new java.util.Hashtable (); -var featuresFile = false; -try { -featuresFile = new jalview.io.FeaturesFile (file, type).parse (this.viewport.getAlignment (), this.alignPanel.seqPanel.seqCanvas.getFeatureRenderer ().getFeatureColours (), featureLinks, true, this.viewport.applet.getDefaultParameter ("relaxedidmatch", false)); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -if (featuresFile) { -if (featureLinks.size () > 0) { -this.alignPanel.seqPanel.seqCanvas.getFeatureRenderer ().featureLinks = featureLinks; -}if (autoenabledisplay) { -this.viewport.setShowSequenceFeatures (true); -this.sequenceFeatures.setState (true); -}if (this.alignPanel.seqPanel.seqCanvas.fr != null) { -this.alignPanel.seqPanel.seqCanvas.fr.findAllFeatures (true); -}if (this.viewport.featureSettings != null) { -this.viewport.featureSettings.refreshTable (); -}this.alignPanel.paintAlignment (true); -this.setStatus (jalview.util.MessageManager.getString ("label.successfully_added_features_alignment")); -}return featuresFile; -}, "~S,~S,~B"); -Clazz.overrideMethod (c$, "keyPressed", -function (evt) { -if (this.viewport.cursorMode && ((evt.getKeyCode () >= 48 && evt.getKeyCode () <= 57) || (evt.getKeyCode () >= 96 && evt.getKeyCode () <= 105)) && Character.isDigit (evt.getKeyChar ())) { -this.alignPanel.seqPanel.numberPressed (evt.getKeyChar ()); -}switch (evt.getKeyCode ()) { -case 27: -this.deselectAllSequenceMenuItem_actionPerformed (); -this.alignPanel.alabels.cancelDrag (); -break; -case 88: -if (evt.isControlDown () || evt.isMetaDown ()) { -this.cut_actionPerformed (); -}break; -case 67: -if (this.viewport.cursorMode && !evt.isControlDown ()) { -this.alignPanel.seqPanel.setCursorColumn (); -}if (evt.isControlDown () || evt.isMetaDown ()) { -this.copy_actionPerformed (); -}break; -case 86: -if (evt.isControlDown ()) { -this.paste (evt.isShiftDown ()); -}break; -case 65: -if (evt.isControlDown () || evt.isMetaDown ()) { -this.selectAllSequenceMenuItem_actionPerformed (); -}break; -case 40: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.moveCursor (0, 1); -} else { -this.moveSelectedSequences (false); -}break; -case 38: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.moveCursor (0, -1); -} else { -this.moveSelectedSequences (true); -}break; -case 37: -if (evt.isAltDown () || !this.viewport.cursorMode) { -this.slideSequences (false, this.alignPanel.seqPanel.getKeyboardNo1 ()); -} else { -this.alignPanel.seqPanel.moveCursor (-1, 0); -}break; -case 39: -if (evt.isAltDown () || !this.viewport.cursorMode) { -this.slideSequences (true, this.alignPanel.seqPanel.getKeyboardNo1 ()); -} else { -this.alignPanel.seqPanel.moveCursor (1, 0); -}break; -case 32: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.insertGapAtCursor (evt.isControlDown () || evt.isShiftDown () || evt.isAltDown ()); -}break; -case 127: -case 8: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.deleteGapAtCursor (evt.isControlDown () || evt.isShiftDown () || evt.isAltDown ()); -} else { -this.cut_actionPerformed (); -this.alignPanel.seqPanel.seqCanvas.repaint (); -}break; -case 83: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.setCursorRow (); -}break; -case 80: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.setCursorPosition (); -}break; -case 10: -case 44: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.setCursorRowAndColumn (); -}break; -case 81: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.setSelectionAreaAtCursor (true); -}break; -case 77: -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.setSelectionAreaAtCursor (false); -}break; -case 113: -this.viewport.cursorMode = !this.viewport.cursorMode; -this.setStatus (jalview.util.MessageManager.formatMessage ("label.keyboard_editing_mode", Clazz.newArray (-1, [(this.viewport.cursorMode ? "on" : "off")]))); -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.seqCanvas.cursorX = this.viewport.startRes; -this.alignPanel.seqPanel.seqCanvas.cursorY = this.viewport.startSeq; -}break; -case 70: -if (evt.isControlDown ()) { -this.findMenuItem_actionPerformed (); -}break; -case 72: -{ -var toggleSeqs = !evt.isControlDown (); -var toggleCols = !evt.isShiftDown (); -this.toggleHiddenRegions (toggleSeqs, toggleCols); -break; -}case 33: -if (this.viewport.getWrapAlignment ()) { -this.alignPanel.scrollUp (true); -} else { -this.alignPanel.setScrollValues (this.viewport.startRes, this.viewport.startSeq - this.viewport.endSeq + this.viewport.startSeq); -}break; -case 34: -if (this.viewport.getWrapAlignment ()) { -this.alignPanel.scrollUp (false); -} else { -this.alignPanel.setScrollValues (this.viewport.startRes, this.viewport.startSeq + this.viewport.endSeq - this.viewport.startSeq); -}break; -case 90: -if (evt.isControlDown ()) { -this.undoMenuItem_actionPerformed (); -}break; -case 89: -if (evt.isControlDown ()) { -this.redoMenuItem_actionPerformed (); -}break; -case 76: -if (evt.isControlDown ()) { -this.trimAlignment (true); -}break; -case 82: -if (evt.isControlDown ()) { -this.trimAlignment (false); -}break; -case 69: -if (evt.isControlDown ()) { -if (evt.isShiftDown ()) { -this.removeAllGapsMenuItem_actionPerformed (); -} else { -this.removeGappedColumnMenuItem_actionPerformed (); -}}break; -case 73: -if (evt.isControlDown ()) { -if (evt.isAltDown ()) { -this.invertColSel_actionPerformed (); -} else { -this.invertSequenceMenuItem_actionPerformed (); -}}break; -case 71: -if (evt.isControlDown ()) { -if (evt.isShiftDown ()) { -this.unGroup_actionPerformed (); -} else { -this.createGroup_actionPerformed (); -}}break; -case 85: -if (evt.isControlDown ()) { -this.deleteGroups_actionPerformed (); -}break; -case 84: -if (evt.isControlDown ()) { -this.newView (null); -}break; -} -this.alignPanel.paintAlignment (true); -}, "java.awt.event.KeyEvent"); -Clazz.defineMethod (c$, "toggleHiddenRegions", -($fz = function (toggleSeqs, toggleCols) { -var hide = false; -var sg = this.viewport.getSelectionGroup (); -if (!toggleSeqs && !toggleCols) { -if ((this.viewport.getColumnSelection () != null && this.viewport.getColumnSelection ().getSelected () != null && this.viewport.getColumnSelection ().getSelected ().size () > 0) || (sg != null && sg.getSize () > 0 && sg.getStartRes () <= sg.getEndRes ())) { -if (sg != null) { -this.invertSequenceMenuItem_actionPerformed (); -sg = this.viewport.getSelectionGroup (); -toggleSeqs = true; -}this.viewport.expandColSelection (sg, true); -this.invertColSel_actionPerformed (); -toggleCols = true; -}}if (toggleSeqs) { -if (sg != null && sg.getSize () != this.viewport.getAlignment ().getHeight ()) { -hide = true; -this.viewport.hideAllSelectedSeqs (); -} else if (!(toggleCols && this.viewport.getColumnSelection ().getSelected ().size () > 0)) { -this.viewport.showAllHiddenSeqs (); -}}if (toggleCols) { -if (this.viewport.getColumnSelection ().getSelected ().size () > 0) { -this.viewport.hideSelectedColumns (); -if (!toggleSeqs) { -this.viewport.setSelectionGroup (sg); -}} else if (!hide) { -this.viewport.showAllHiddenColumns (); -}}}, $fz.isPrivate = true, $fz), "~B,~B"); -Clazz.overrideMethod (c$, "keyReleased", -function (evt) { -}, "java.awt.event.KeyEvent"); -Clazz.overrideMethod (c$, "keyTyped", -function (evt) { -}, "java.awt.event.KeyEvent"); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -var source = evt.getSource (); -if (source === this.displayNonconservedMenuItem) { -this.displayNonconservedMenuItem_actionPerformed (); -} else if (source === this.colourTextMenuItem) { -this.colourTextMenuItem_actionPerformed (); -} else if (source === this.wrapMenuItem) { -this.wrapMenuItem_actionPerformed (); -} else if (source === this.scaleAbove) { -this.viewport.setScaleAboveWrapped (this.scaleAbove.getState ()); -} else if (source === this.scaleLeft) { -this.viewport.setScaleLeftWrapped (this.scaleLeft.getState ()); -} else if (source === this.scaleRight) { -this.viewport.setScaleRightWrapped (this.scaleRight.getState ()); -} else if (source === this.seqLimits) { -this.seqLimits_itemStateChanged (); -} else if (source === this.viewBoxesMenuItem) { -this.viewport.setShowBoxes (this.viewBoxesMenuItem.getState ()); -} else if (source === this.viewTextMenuItem) { -this.viewport.setShowText (this.viewTextMenuItem.getState ()); -} else if (source === this.renderGapsMenuItem) { -this.viewport.setRenderGaps (this.renderGapsMenuItem.getState ()); -} else if (source === this.annotationPanelMenuItem) { -this.viewport.setShowAnnotation (this.annotationPanelMenuItem.getState ()); -this.alignPanel.setAnnotationVisible (this.annotationPanelMenuItem.getState ()); -} else if (source === this.sequenceFeatures) { -this.viewport.setShowSequenceFeatures (this.sequenceFeatures.getState ()); -this.alignPanel.seqPanel.seqCanvas.repaint (); -} else if (source === this.showAlignmentAnnotations) { -this.setAnnotationsVisibility (); -} else if (source === this.showSequenceAnnotations) { -this.setAnnotationsVisibility (); -} else if (source === this.sortAnnBySequence) { -var newState = this.sortAnnBySequence.getState (); -this.sortAnnByLabel.setState (false); -this.setAnnotationSortOrder (newState ? jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.SEQUENCE_AND_LABEL : jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.NONE); -this.setViewportAnnotationOrder (); -} else if (source === this.sortAnnByLabel) { -var newState = this.sortAnnByLabel.getState (); -this.sortAnnBySequence.setState (false); -this.setAnnotationSortOrder (newState ? jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.LABEL_AND_SEQUENCE : jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.NONE); -this.setViewportAnnotationOrder (); -} else if (source === this.showAutoFirst) { -this.showAutoLast.setState (!this.showAutoFirst.getState ()); -this.setShowAutoCalculatedAbove (this.showAutoFirst.getState ()); -this.setViewportAnnotationOrder (); -} else if (source === this.showAutoLast) { -this.showAutoFirst.setState (!this.showAutoLast.getState ()); -this.setShowAutoCalculatedAbove (this.showAutoFirst.getState ()); -this.setViewportAnnotationOrder (); -} else if (source === this.conservationMenuItem) { -this.conservationMenuItem_actionPerformed (); -} else if (source === this.abovePIDThreshold) { -this.abovePIDThreshold_actionPerformed (); -} else if (source === this.applyToAllGroups) { -this.viewport.setColourAppliesToAllGroups (this.applyToAllGroups.getState ()); -} else if (source === this.autoCalculate) { -this.viewport.autoCalculateConsensus = this.autoCalculate.getState (); -} else if (source === this.$sortByTree) { -this.viewport.sortByTree = this.$sortByTree.getState (); -} else if (source === this.centreColumnLabelFlag) { -this.centreColumnLabelFlag_stateChanged (); -} else if (source === this.followMouseOverFlag) { -this.mouseOverFlag_stateChanged (); -} else if (source === this.showGroupConsensus) { -this.showGroupConsensus_actionPerformed (); -} else if (source === this.showGroupConservation) { -this.showGroupConservation_actionPerformed (); -} else if (source === this.showSequenceLogo) { -this.showSequenceLogo_actionPerformed (); -} else if (source === this.normSequenceLogo) { -this.normSequenceLogo_actionPerformed (); -} else if (source === this.showConsensusHistogram) { -this.showConsensusHistogram_actionPerformed (); -} else if (source === this.applyAutoAnnotationSettings) { -this.applyAutoAnnotationSettings_actionPerformed (); -}this.alignPanel.paintAlignment (true); -}, "java.awt.event.ItemEvent"); -Clazz.defineMethod (c$, "setAnnotationsVisibility", -($fz = function () { -var showForAlignment = this.showAlignmentAnnotations.getState (); -var showForSequences = this.showSequenceAnnotations.getState (); -for (var aa, $aa = 0, $$aa = this.alignPanel.getAlignment ().getAlignmentAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { -var visible = (aa.sequenceRef == null ? showForAlignment : showForSequences); -aa.visible = visible; -} -this.alignPanel.validateAnnotationDimensions (true); -this.validate (); -this.repaint (); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "setAnnotationSortOrder", -($fz = function (order) { -this.annotationSortOrder = order; -}, $fz.isPrivate = true, $fz), "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); -Clazz.defineMethod (c$, "setViewportAnnotationOrder", -($fz = function () { -this.alignPanel.av.setSortAnnotationsBy (this.annotationSortOrder); -this.alignPanel.av.setShowAutocalculatedAbove (this.showAutoCalculatedAbove); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "setShowAutoCalculatedAbove", -($fz = function (showAbove) { -this.showAutoCalculatedAbove = showAbove; -}, $fz.isPrivate = true, $fz), "~B"); -Clazz.defineMethod (c$, "mouseOverFlag_stateChanged", -($fz = function () { -this.viewport.setFollowHighlight (this.followMouseOverFlag.getState ()); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "centreColumnLabelFlag_stateChanged", -($fz = function () { -this.viewport.centreColumnLabels = this.centreColumnLabelFlag.getState (); -this.alignPanel.annotationPanel.repaint (); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -var source = evt.getSource (); -if (source === this.inputText) { -this.inputText_actionPerformed (); -} else if (source === this.$loadTree) { -this.loadTree_actionPerformed (); -} else if (source === this.loadApplication) { -this.launchFullApplication (); -} else if (source === this.$loadAnnotations) { -this.loadAnnotations (); -} else if (source === this.$outputAnnotations) { -this.outputAnnotations (true); -} else if (source === this.$outputFeatures) { -this.outputFeatures (true, "Jalview"); -} else if (source === this.closeMenuItem) { -this.closeMenuItem_actionPerformed (); -} else if (source === this.copy) { -this.copy_actionPerformed (); -} else if (source === this.undoMenuItem) { -this.undoMenuItem_actionPerformed (); -} else if (source === this.redoMenuItem) { -this.redoMenuItem_actionPerformed (); -} else if (source === this.inputText) { -this.inputText_actionPerformed (); -} else if (source === this.closeMenuItem) { -this.closeMenuItem_actionPerformed (); -} else if (source === this.undoMenuItem) { -this.undoMenuItem_actionPerformed (); -} else if (source === this.redoMenuItem) { -this.redoMenuItem_actionPerformed (); -} else if (source === this.copy) { -this.copy_actionPerformed (); -} else if (source === this.pasteNew) { -this.pasteNew_actionPerformed (); -} else if (source === this.pasteThis) { -this.pasteThis_actionPerformed (); -} else if (source === this.cut) { -this.cut_actionPerformed (); -} else if (source === this.$delete) { -this.delete_actionPerformed (); -} else if (source === this.grpsFromSelection) { -this.makeGrpsFromSelection_actionPerformed (); -} else if (source === this.deleteGroups) { -this.deleteGroups_actionPerformed (); -} else if (source === this.selectAllSequenceMenuItem) { -this.selectAllSequenceMenuItem_actionPerformed (); -} else if (source === this.deselectAllSequenceMenuItem) { -this.deselectAllSequenceMenuItem_actionPerformed (); -} else if (source === this.invertSequenceMenuItem) { -this.invertSequenceMenuItem_actionPerformed (); -} else if (source === this.invertColSel) { -this.viewport.invertColumnSelection (); -this.alignPanel.paintAlignment (true); -} else if (source === this.remove2LeftMenuItem) { -this.trimAlignment (true); -} else if (source === this.remove2RightMenuItem) { -this.trimAlignment (false); -} else if (source === this.removeGappedColumnMenuItem) { -this.removeGappedColumnMenuItem_actionPerformed (); -} else if (source === this.removeAllGapsMenuItem) { -this.removeAllGapsMenuItem_actionPerformed (); -} else if (source === this.findMenuItem) { -this.findMenuItem_actionPerformed (); -} else if (source === this.$font) { - new jalview.appletgui.FontChooser (this.alignPanel); -} else if (source === this.$newView) { -this.newView (null); -} else if (source === this.showColumns) { -this.viewport.showAllHiddenColumns (); -this.alignPanel.paintAlignment (true); -} else if (source === this.showSeqs) { -this.viewport.showAllHiddenSeqs (); -this.alignPanel.paintAlignment (true); -} else if (source === this.hideColumns) { -this.viewport.hideSelectedColumns (); -this.alignPanel.paintAlignment (true); -} else if (source === this.hideSequences && this.viewport.getSelectionGroup () != null) { -this.viewport.hideAllSelectedSeqs (); -this.alignPanel.paintAlignment (true); -} else if (source === this.hideAllButSelection) { -this.toggleHiddenRegions (false, false); -this.alignPanel.paintAlignment (true); -} else if (source === this.hideAllSelection) { -var sg = this.viewport.getSelectionGroup (); -this.viewport.expandColSelection (sg, false); -this.viewport.hideAllSelectedSeqs (); -this.viewport.hideSelectedColumns (); -this.alignPanel.paintAlignment (true); -} else if (source === this.showAllHidden) { -this.viewport.showAllHiddenColumns (); -this.viewport.showAllHiddenSeqs (); -this.alignPanel.paintAlignment (true); -} else if (source === this.showGroupConsensus) { -this.showGroupConsensus_actionPerformed (); -} else if (source === this.showGroupConservation) { -this.showGroupConservation_actionPerformed (); -} else if (source === this.showSequenceLogo) { -this.showSequenceLogo_actionPerformed (); -} else if (source === this.normSequenceLogo) { -this.normSequenceLogo_actionPerformed (); -} else if (source === this.showConsensusHistogram) { -this.showConsensusHistogram_actionPerformed (); -} else if (source === this.applyAutoAnnotationSettings) { -this.applyAutoAnnotationSettings_actionPerformed (); -} else if (source === this.featureSettings) { - new jalview.appletgui.FeatureSettings (this.alignPanel); -} else if (source === this.alProperties) { -var contents = new jalview.io.AlignmentProperties (this.viewport.getAlignment ()).formatAsString (); -var cap = new jalview.appletgui.CutAndPasteTransfer (false, this); -cap.setText (contents.toString ()); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.alignment_properties", Clazz.newArray (-1, [this.getTitle ()])), 400, 250); -} else if (source === this.overviewMenuItem) { -this.overviewMenuItem_actionPerformed (); -} else if (source === this.noColourmenuItem) { -this.changeColour (null); -} else if (source === this.clustalColour) { -this.abovePIDThreshold.setState (false); -this.changeColour ( new jalview.schemes.ClustalxColourScheme (this.viewport.getAlignment (), null)); -} else if (source === this.zappoColour) { -this.changeColour ( new jalview.schemes.ZappoColourScheme ()); -} else if (source === this.taylorColour) { -this.changeColour ( new jalview.schemes.TaylorColourScheme ()); -} else if (source === this.hydrophobicityColour) { -this.changeColour ( new jalview.schemes.HydrophobicColourScheme ()); -} else if (source === this.helixColour) { -this.changeColour ( new jalview.schemes.HelixColourScheme ()); -} else if (source === this.strandColour) { -this.changeColour ( new jalview.schemes.StrandColourScheme ()); -} else if (source === this.turnColour) { -this.changeColour ( new jalview.schemes.TurnColourScheme ()); -} else if (source === this.buriedColour) { -this.changeColour ( new jalview.schemes.BuriedColourScheme ()); -} else if (source === this.nucleotideColour) { -this.changeColour ( new jalview.schemes.NucleotideColourScheme ()); -} else if (source === this.purinePyrimidineColour) { -this.changeColour ( new jalview.schemes.PurinePyrimidineColourScheme ()); -} else if (source === this.RNAInteractionColour) { -this.changeColour ( new jalview.schemes.RNAInteractionColourScheme ()); -} else if (source === this.RNAHelixColour) { - new jalview.schemes.RNAHelicesColourChooser (this.viewport, this.alignPanel); -} else if (source === this.modifyPID) { -this.modifyPID_actionPerformed (); -} else if (source === this.modifyConservation) { -this.modifyConservation_actionPerformed (); -} else if (source === this.userDefinedColour) { - new jalview.appletgui.UserDefinedColours (this.alignPanel, null); -} else if (source === this.PIDColour) { -this.changeColour ( new jalview.schemes.PIDColourScheme ()); -} else if (source === this.BLOSUM62Colour) { -this.changeColour ( new jalview.schemes.Blosum62ColourScheme ()); -} else if (source === this.tcoffeeColour) { -this.changeColour ( new jalview.schemes.TCoffeeColourScheme (this.alignPanel.getAlignment ())); -} else if (source === this.annotationColour) { - new jalview.appletgui.AnnotationColourChooser (this.viewport, this.alignPanel); -} else if (source === this.annotationColumnSelection) { - new jalview.appletgui.AnnotationColumnChooser (this.viewport, this.alignPanel); -} else if (source === this.sortPairwiseMenuItem) { -this.sortPairwiseMenuItem_actionPerformed (); -} else if (source === this.sortIDMenuItem) { -this.sortIDMenuItem_actionPerformed (); -} else if (source === this.sortLengthMenuItem) { -this.sortLengthMenuItem_actionPerformed (); -} else if (source === this.sortGroupMenuItem) { -this.sortGroupMenuItem_actionPerformed (); -} else if (source === this.removeRedundancyMenuItem) { -this.removeRedundancyMenuItem_actionPerformed (); -} else if (source === this.pairwiseAlignmentMenuItem) { -this.pairwiseAlignmentMenuItem_actionPerformed (); -} else if (source === this.PCAMenuItem) { -this.PCAMenuItem_actionPerformed (); -} else if (source === this.averageDistanceTreeMenuItem) { -this.averageDistanceTreeMenuItem_actionPerformed (); -} else if (source === this.neighbourTreeMenuItem) { -this.neighbourTreeMenuItem_actionPerformed (); -} else if (source === this.njTreeBlosumMenuItem) { -this.njTreeBlosumMenuItem_actionPerformed (); -} else if (source === this.avDistanceTreeBlosumMenuItem) { -this.avTreeBlosumMenuItem_actionPerformed (); -} else if (source === this.documentation) { -this.documentation_actionPerformed (); -} else if (source === this.about) { -this.about_actionPerformed (); -}}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "inputText_actionPerformed", -function () { -var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.input_cut_paste"), 500, 500); -}); -Clazz.defineMethod (c$, "outputText_actionPerformed", -function (e) { -var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.alignment_output_command", Clazz.newArray (-1, [e.getActionCommand ()])), 600, 500); -var fr = this.alignPanel.cloneFeatureRenderer (); -cap.setText ( new jalview.io.AppletFormatAdapter (this.alignPanel).formatSequences (e.getActionCommand (), this.viewport.getAlignment (), this.viewport.getShowJVSuffix ())); -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "loadAnnotations", -function () { -var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); -cap.setText (jalview.util.MessageManager.getString ("label.paste_features_annotations_Tcoffee_here")); -cap.setAnnotationImport (); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("action.paste_annotations"), 400, 300); -}); -Clazz.defineMethod (c$, "outputAnnotations", -function (displayTextbox) { -var annotation = new jalview.io.AnnotationFile ().printAnnotationsForView (this.viewport); -if (displayTextbox) { -var cap = new jalview.appletgui.CutAndPasteTransfer (false, this); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.annotations"), 600, 500); -cap.setText (annotation); -}return annotation; -}, "~B"); -Clazz.defineMethod (c$, "getDisplayedFeatureCols", -($fz = function () { -if (this.alignPanel.getFeatureRenderer () != null && this.viewport.getFeaturesDisplayed () != null) { -return this.alignPanel.getFeatureRenderer ().getDisplayedFeatureCols (); -}return null; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "outputFeatures", -function (displayTextbox, format) { -var features; -if (format.equalsIgnoreCase ("Jalview")) { -features = new jalview.io.FeaturesFile ().printJalviewFormat (this.viewport.getAlignment ().getSequencesArray (), this.getDisplayedFeatureCols ()); -} else { -features = new jalview.io.FeaturesFile ().printGFFFormat (this.viewport.getAlignment ().getSequencesArray (), this.getDisplayedFeatureCols ()); -}if (displayTextbox) { -var frimport = false; -if (features == null || features.equals ("No Features Visible")) { -features = "# No features visible - paste some and import them here."; -frimport = true; -}var cap = new jalview.appletgui.CutAndPasteTransfer (frimport, this); -if (frimport) { -cap.setAnnotationImport (); -}var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.features"), 600, 500); -cap.setText (features); -} else { -if (features == null) { -features = ""; -}}return features; -}, "~B,~S"); -Clazz.defineMethod (c$, "launchFullApplication", -function () { -var url = new StringBuffer (this.jalviewServletURL); -var firstSep = url.lastIndexOf ("?") > url.lastIndexOf ("/") ? "&" : "?"; -url.append (firstSep); -var applet = this.viewport.applet; -var s = applet.startupFile; -url.append ("open=" + this.appendProtocol (s)); -if (this.viewport.applet.features != null) { -url.append ("&features="); -url.append (this.appendProtocol (applet.features)); -}if (applet.annotations != null) { -url.append ("&annotations="); -url.append (this.appendProtocol (applet.annotations)); -}if (applet.jnetFile != null) { -url.append ("&annotations="); -url.append (this.appendProtocol (applet.jnetFile)); -}if (applet.defaultColour != null) { -url.append ("&colour=" + this.removeWhiteSpace (applet.defaultColour)); -}if (applet.userDefinedColour != null) { -url.append ("&colour=" + this.removeWhiteSpace (applet.userDefinedColour)); -}if (applet.treeFile != null) { -url.append ("&tree=" + this.appendProtocol (applet.treeFile)); -}this.showURL (url.toString (), "FULL_APP"); -}); -Clazz.defineMethod (c$, "removeWhiteSpace", -function (colour) { -var sb = new StringBuffer (); -for (var i = 0; i < colour.length; i++) { -if (Character.isWhitespace (colour.charAt (i))) { -sb.append ("%20"); -} else { -sb.append (colour.charAt (i)); -}} -return sb.toString (); -}, "~S"); -Clazz.defineMethod (c$, "appendProtocol", -function (url) { -try { - new java.net.URL (url); -url = java.net.URLEncoder.encode (url); -} catch (ex) { -if (Clazz.exceptionOf (ex, java.net.MalformedURLException)) { -url = this.viewport.applet.getCodeBase () + url; -} else { -throw ex; -} -} -return url; -}, "~S"); -Clazz.defineMethod (c$, "closeMenuItem_actionPerformed", -function () { -jalview.appletgui.PaintRefresher.RemoveComponent (this.alignPanel); -if (this.alignPanel.seqPanel != null && this.alignPanel.seqPanel.seqCanvas != null) { -jalview.appletgui.PaintRefresher.RemoveComponent (this.alignPanel.seqPanel.seqCanvas); -}if (this.alignPanel.idPanel != null && this.alignPanel.idPanel.idCanvas != null) { -jalview.appletgui.PaintRefresher.RemoveComponent (this.alignPanel.idPanel.idCanvas); -}if (jalview.appletgui.PaintRefresher.components.size () == 0 && this.viewport.applet == null) { -System.exit (0); -} else { -}this.viewport = null; -this.alignPanel = null; -this.dispose (); -}); -Clazz.defineMethod (c$, "updateEditMenuBar", -function () { -if (this.viewport.getHistoryList ().size () > 0) { -this.undoMenuItem.setEnabled (true); -var command = this.viewport.getHistoryList ().peek (); -this.undoMenuItem.setLabel (jalview.util.MessageManager.formatMessage ("label.undo_command", Clazz.newArray (-1, [command.getDescription ()]))); -} else { -this.undoMenuItem.setEnabled (false); -this.undoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.undo")); -}if (this.viewport.getRedoList ().size () > 0) { -this.redoMenuItem.setEnabled (true); -var command = this.viewport.getRedoList ().peek (); -this.redoMenuItem.setLabel (jalview.util.MessageManager.formatMessage ("label.redo_command", Clazz.newArray (-1, [command.getDescription ()]))); -} else { -this.redoMenuItem.setEnabled (false); -this.redoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.redo")); -}}); -Clazz.overrideMethod (c$, "addHistoryItem", -function (command) { -if (command.getSize () > 0) { -this.viewport.addToHistoryList (command); -this.viewport.clearRedoList (); -this.updateEditMenuBar (); -this.viewport.updateHiddenColumns (); -}}, "jalview.commands.CommandI"); -Clazz.defineMethod (c$, "undoMenuItem_actionPerformed", -function () { -if (this.viewport.getHistoryList ().isEmpty ()) { -return; -}var command = this.viewport.getHistoryList ().pop (); -this.viewport.addToRedoList (command); -command.undoCommand (null); -var originalSource = this.getOriginatingSource (command); -if (originalSource !== this.viewport) { -System.err.println ("Warning: Viewport object mismatch whilst undoing"); -}originalSource.updateHiddenColumns (); -this.updateEditMenuBar (); -originalSource.firePropertyChange ("alignment", null, originalSource.getAlignment ().getSequences ()); -}); -Clazz.defineMethod (c$, "redoMenuItem_actionPerformed", -function () { -if (this.viewport.getRedoList ().isEmpty ()) { -return; -}var command = this.viewport.getRedoList ().pop (); -this.viewport.addToHistoryList (command); -command.doCommand (null); -var originalSource = this.getOriginatingSource (command); -if (originalSource !== this.viewport) { -System.err.println ("Warning: Viewport object mismatch whilst re-doing"); -}originalSource.updateHiddenColumns (); -this.updateEditMenuBar (); -originalSource.firePropertyChange ("alignment", null, originalSource.getAlignment ().getSequences ()); -}); -Clazz.defineMethod (c$, "getOriginatingSource", -function (command) { -var originalSource = null; -var al = null; -if (Clazz.instanceOf (command, jalview.commands.EditCommand)) { -var editCommand = command; -al = editCommand.getAlignment (); -var comps = jalview.appletgui.PaintRefresher.components.get (this.viewport.getSequenceSetId ()); -for (var i = 0; i < comps.size (); i++) { -if (Clazz.instanceOf (comps.elementAt (i), jalview.appletgui.AlignmentPanel)) { -if (al === (comps.elementAt (i)).av.getAlignment ()) { -originalSource = (comps.elementAt (i)).av; -break; -}}} -}if (originalSource == null) { -if (al != null) { -jalview.appletgui.PaintRefresher.validateSequences (al, this.viewport.getAlignment ()); -}originalSource = this.viewport; -}return originalSource; -}, "jalview.commands.CommandI"); -Clazz.defineMethod (c$, "moveSelectedSequences", -function (up) { -var sg = this.viewport.getSelectionGroup (); -if (sg == null) { -return; -}this.viewport.getAlignment ().moveSelectedSequencesByOne (sg, up ? null : this.viewport.getHiddenRepSequences (), up); -this.alignPanel.paintAlignment (true); -var complement = this.viewport.getCodingComplement (); -if (complement != null) { -var mappedSelection = jalview.util.MappingUtils.mapSequenceGroup (sg, this.viewport, complement); -complement.getAlignment ().moveSelectedSequencesByOne (mappedSelection, up ? null : complement.getHiddenRepSequences (), up); -}}, "~B"); -Clazz.defineMethod (c$, "slideSequences", -function (right, size) { -var sg = new java.util.Vector (); -if (this.viewport.cursorMode) { -sg.add (this.viewport.getAlignment ().getSequenceAt (this.alignPanel.seqPanel.seqCanvas.cursorY)); -} else if (this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () != this.viewport.getAlignment ().getHeight ()) { -sg = this.viewport.getSelectionGroup ().getSequences (this.viewport.getHiddenRepSequences ()); -}if (sg.size () < 1) { -return; -}var invertGroup = new java.util.Vector (); -for (var i = 0; i < this.viewport.getAlignment ().getHeight (); i++) { -if (!sg.contains (this.viewport.getAlignment ().getSequenceAt (i))) { -invertGroup.addElement (this.viewport.getAlignment ().getSequenceAt (i)); -}} -var seqs1 = sg.toArray ( new Array (sg.size ())); -var seqs2 = invertGroup.toArray ( new Array (invertGroup.size ())); -for (var i = 0; i < invertGroup.size (); i++) { -seqs2[i] = invertGroup.elementAt (i); -} -var ssc; -if (right) { -ssc = new jalview.commands.SlideSequencesCommand ("Slide Sequences", seqs2, seqs1, size, this.viewport.getGapCharacter ()); -} else { -ssc = new jalview.commands.SlideSequencesCommand ("Slide Sequences", seqs1, seqs2, size, this.viewport.getGapCharacter ()); -}var groupAdjustment = 0; -if (ssc.getGapsInsertedBegin () && right) { -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.moveCursor (size, 0); -} else { -groupAdjustment = size; -}} else if (!ssc.getGapsInsertedBegin () && !right) { -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.moveCursor (-size, 0); -} else { -groupAdjustment = -size; -}}if (groupAdjustment != 0) { -this.viewport.getSelectionGroup ().setStartRes (this.viewport.getSelectionGroup ().getStartRes () + groupAdjustment); -this.viewport.getSelectionGroup ().setEndRes (this.viewport.getSelectionGroup ().getEndRes () + groupAdjustment); -}var appendHistoryItem = false; -var historyList = this.viewport.getHistoryList (); -if (historyList != null && historyList.size () > 0 && Clazz.instanceOf (historyList.peek (), jalview.commands.SlideSequencesCommand)) { -appendHistoryItem = ssc.appendSlideCommand (historyList.peek ()); -}if (!appendHistoryItem) { -this.addHistoryItem (ssc); -}this.repaint (); -}, "~B,~N"); -Clazz.defineMethod (c$, "copy_actionPerformed", -function () { -if (this.viewport.getSelectionGroup () == null) { -return; -}var sg = this.viewport.getSelectionGroup (); -jalview.appletgui.AlignFrame.copiedSequences = new StringBuffer (); -var orderedSeqs = new java.util.HashMap (); -for (var i = 0; i < sg.getSize (); i++) { -var seq = sg.getSequenceAt (i); -var index = this.viewport.getAlignment ().findIndex (seq); -orderedSeqs.put (new Integer (index), seq); -} -var index = 0; -var startRes; -var endRes; -var ch; -if (this.viewport.hasHiddenColumns () && this.viewport.getSelectionGroup () != null) { -jalview.appletgui.AlignFrame.copiedHiddenColumns = new java.util.Vector (); -var hiddenOffset = this.viewport.getSelectionGroup ().getStartRes (); -for (var region, $region = this.viewport.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { -jalview.appletgui.AlignFrame.copiedHiddenColumns.addElement ( Clazz.newIntArray (-1, [region[0] - hiddenOffset, region[1] - hiddenOffset])); -} -} else { -jalview.appletgui.AlignFrame.copiedHiddenColumns = null; -}for (var i = 0; i < sg.getSize (); i++) { -var seq = null; -while (seq == null) { -if (orderedSeqs.containsKey (new Integer (index))) { -seq = orderedSeqs.get (new Integer (index)); -index++; -break; -} else { -index++; -}} -startRes = seq.findPosition (sg.getStartRes ()); -endRes = 0; -for (var j = 0; j < sg.getEndRes () + 1 && j < seq.getLength (); j++) { -ch = seq.getCharAt (j); -if (!jalview.util.Comparison.isGap ((ch))) { -endRes++; -}} -if (endRes > 0) { -endRes += seq.getStart () - 1; -}jalview.appletgui.AlignFrame.copiedSequences.append (seq.getName () + "\t" + startRes + "\t" + endRes + "\t" + seq.getSequenceAsString (sg.getStartRes (), sg.getEndRes () + 1) + "\n"); -} -}); -Clazz.defineMethod (c$, "pasteNew_actionPerformed", -function () { -this.paste (true); -}); -Clazz.defineMethod (c$, "pasteThis_actionPerformed", -function () { -this.paste (false); -}); -Clazz.defineMethod (c$, "paste", -function (newAlignment) { -try { -if (jalview.appletgui.AlignFrame.copiedSequences == null) { -return; -}var st = new java.util.StringTokenizer (jalview.appletgui.AlignFrame.copiedSequences.toString ()); -var seqs = new java.util.Vector (); -while (st.hasMoreElements ()) { -var name = st.nextToken (); -var start = Integer.parseInt (st.nextToken ()); -var end = Integer.parseInt (st.nextToken ()); -seqs.addElement ( new jalview.datamodel.Sequence (name, st.nextToken (), start, end)); -} -var newSeqs = new Array (seqs.size ()); -for (var i = 0; i < seqs.size (); i++) { -newSeqs[i] = seqs.elementAt (i); -} -if (newAlignment) { -var newtitle = jalview.util.MessageManager.getString ("label.copied_sequences"); -if (this.getTitle ().startsWith (jalview.util.MessageManager.getString ("label.copied_sequences"))) { -newtitle = this.getTitle (); -} else { -newtitle = newtitle.concat (jalview.util.MessageManager.formatMessage ("label.from_msname", Clazz.newArray (-1, [this.getTitle ()]))); -}var af = new jalview.appletgui.AlignFrame ( new jalview.datamodel.Alignment (newSeqs), this.viewport.applet, newtitle, false); -if (jalview.appletgui.AlignFrame.copiedHiddenColumns != null) { -for (var i = 0; i < jalview.appletgui.AlignFrame.copiedHiddenColumns.size (); i++) { -var region = jalview.appletgui.AlignFrame.copiedHiddenColumns.elementAt (i); -af.viewport.hideColumns (region[0], region[1]); -} -}jalview.bin.JalviewLite.addFrame (af, newtitle, this.frameWidth, this.frameHeight); -} else { -this.addSequences (newSeqs); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -}, "~B"); -Clazz.defineMethod (c$, "addSequences", -function (seqs) { -for (var i = 0; i < seqs.length; i++) { -this.viewport.getAlignment ().addSequence (seqs[i]); -} -this.addHistoryItem ( new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("label.add_sequences"), jalview.commands.EditCommand.Action.PASTE, seqs, 0, this.viewport.getAlignment ().getWidth (), this.viewport.getAlignment ())); -this.viewport.setEndSeq (this.viewport.getAlignment ().getHeight ()); -this.viewport.getAlignment ().getWidth (); -this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); -}, "~A"); -Clazz.defineMethod (c$, "cut_actionPerformed", -function () { -this.copy_actionPerformed (); -this.delete_actionPerformed (); -}); -Clazz.defineMethod (c$, "delete_actionPerformed", -function () { -var sg = this.viewport.getSelectionGroup (); -if (sg == null) { -return; -}var seqs = new java.util.Vector (); -var seq; -for (var i = 0; i < sg.getSize (); i++) { -seq = sg.getSequenceAt (i); -seqs.addElement (seq); -} -if (sg.getSize () == this.viewport.getAlignment ().getHeight ()) { -this.viewport.getColumnSelection ().removeElements (sg.getStartRes (), sg.getEndRes () + 1); -}var cut = new Array (seqs.size ()); -for (var i = 0; i < seqs.size (); i++) { -cut[i] = seqs.elementAt (i); -} -this.addHistoryItem ( new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("label.cut_sequences"), jalview.commands.EditCommand.Action.CUT, cut, sg.getStartRes (), sg.getEndRes () - sg.getStartRes () + 1, this.viewport.getAlignment ())); -this.viewport.setSelectionGroup (null); -this.viewport.getAlignment ().deleteGroup (sg); -this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); -if (this.viewport.getAlignment ().getHeight () < 1) { -this.setVisible (false); -}this.viewport.sendSelection (); -}); -Clazz.defineMethod (c$, "showGroupConsensus_actionPerformed", -function () { -this.viewport.setShowGroupConsensus (this.showGroupConsensus.getState ()); -this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); -}); -Clazz.defineMethod (c$, "showGroupConservation_actionPerformed", -function () { -this.viewport.setShowGroupConservation (this.showGroupConservation.getState ()); -this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); -}); -Clazz.defineMethod (c$, "showConsensusHistogram_actionPerformed", -function () { -this.viewport.setShowConsensusHistogram (this.showConsensusHistogram.getState ()); -this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); -}); -Clazz.defineMethod (c$, "showSequenceLogo_actionPerformed", -function () { -this.viewport.setShowSequenceLogo (this.showSequenceLogo.getState ()); -this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); -}); -Clazz.defineMethod (c$, "normSequenceLogo_actionPerformed", -function () { -this.showSequenceLogo.setState (true); -this.viewport.setShowSequenceLogo (true); -this.viewport.setNormaliseSequenceLogo (this.normSequenceLogo.getState ()); -this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); -}); -Clazz.defineMethod (c$, "applyAutoAnnotationSettings_actionPerformed", -function () { -this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); -}); -Clazz.defineMethod (c$, "makeGrpsFromSelection_actionPerformed", -function () { -if (this.avc.makeGroupsFromSelection ()) { -jalview.appletgui.PaintRefresher.Refresh (this, this.viewport.getSequenceSetId ()); -this.alignPanel.updateAnnotation (); -this.alignPanel.paintAlignment (true); -}}); -Clazz.defineMethod (c$, "createGroup_actionPerformed", -function () { -this.avc.createGroup (); -}); -Clazz.defineMethod (c$, "unGroup_actionPerformed", -function () { -if (this.avc.unGroup ()) { -this.alignPanel.alignmentChanged (); -}}); -Clazz.defineMethod (c$, "deleteGroups_actionPerformed", -function () { -if (this.avc.deleteGroups ()) { -this.alignPanel.alignmentChanged (); -}}); -Clazz.defineMethod (c$, "selectAllSequenceMenuItem_actionPerformed", -function () { -var sg = new jalview.datamodel.SequenceGroup (); -for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { -sg.addSequence (this.viewport.getAlignment ().getSequenceAt (i), false); -} -sg.setEndRes (this.viewport.getAlignment ().getWidth () - 1); -this.viewport.setSelectionGroup (sg); -this.alignPanel.paintAlignment (true); -jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); -this.viewport.sendSelection (); -}); -Clazz.defineMethod (c$, "deselectAllSequenceMenuItem_actionPerformed", -function () { -if (this.viewport.cursorMode) { -this.alignPanel.seqPanel.keyboardNo1 = null; -this.alignPanel.seqPanel.keyboardNo2 = null; -}this.viewport.setSelectionGroup (null); -this.viewport.getColumnSelection ().clear (); -this.viewport.setSelectionGroup (null); -this.alignPanel.idPanel.idCanvas.searchResults = null; -this.alignPanel.seqPanel.seqCanvas.highlightSearchResults (null); -this.alignPanel.paintAlignment (true); -jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); -this.viewport.sendSelection (); -}); -Clazz.defineMethod (c$, "invertSequenceMenuItem_actionPerformed", -function () { -var sg = this.viewport.getSelectionGroup (); -for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { -sg.addOrRemove (this.viewport.getAlignment ().getSequenceAt (i), false); -} -jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); -this.viewport.sendSelection (); -}); -Clazz.defineMethod (c$, "invertColSel_actionPerformed", -function () { -this.viewport.invertColumnSelection (); -this.alignPanel.paintAlignment (true); -jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); -this.viewport.sendSelection (); -}); -Clazz.defineMethod (c$, "trimAlignment", -function (trimLeft) { -var colSel = this.viewport.getColumnSelection (); -var column; -if (colSel.size () > 0) { -if (trimLeft) { -column = colSel.getMin (); -} else { -column = colSel.getMax (); -}var seqs; -if (this.viewport.getSelectionGroup () != null) { -seqs = this.viewport.getSelectionGroup ().getSequencesAsArray (this.viewport.getHiddenRepSequences ()); -} else { -seqs = this.viewport.getAlignment ().getSequencesArray (); -}var trimRegion; -if (trimLeft) { -trimRegion = new jalview.commands.TrimRegionCommand ("Remove Left", jalview.commands.TrimRegionCommand.TRIM_LEFT, seqs, column, this.viewport.getAlignment (), this.viewport.getColumnSelection (), this.viewport.getSelectionGroup ()); -this.viewport.setStartRes (0); -} else { -trimRegion = new jalview.commands.TrimRegionCommand ("Remove Right", jalview.commands.TrimRegionCommand.TRIM_RIGHT, seqs, column, this.viewport.getAlignment (), this.viewport.getColumnSelection (), this.viewport.getSelectionGroup ()); -}this.setStatus (jalview.util.MessageManager.formatMessage ("label.removed_columns", Clazz.newArray (-1, [Integer.$valueOf (trimRegion.getSize ()).toString ()]))); -this.addHistoryItem (trimRegion); -for (var sg, $sg = this.viewport.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if ((trimLeft && !sg.adjustForRemoveLeft (column)) || (!trimLeft && !sg.adjustForRemoveRight (column))) { -this.viewport.getAlignment ().deleteGroup (sg); -}} -this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); -}}, "~B"); -Clazz.defineMethod (c$, "removeGappedColumnMenuItem_actionPerformed", -function () { -var start = 0; -var end = this.viewport.getAlignment ().getWidth () - 1; -var seqs; -if (this.viewport.getSelectionGroup () != null) { -seqs = this.viewport.getSelectionGroup ().getSequencesAsArray (this.viewport.getHiddenRepSequences ()); -start = this.viewport.getSelectionGroup ().getStartRes (); -end = this.viewport.getSelectionGroup ().getEndRes (); -} else { -seqs = this.viewport.getAlignment ().getSequencesArray (); -}var removeGapCols = new jalview.commands.RemoveGapColCommand ("Remove Gapped Columns", seqs, start, end, this.viewport.getAlignment ()); -this.addHistoryItem (removeGapCols); -this.setStatus (jalview.util.MessageManager.formatMessage ("label.removed_empty_columns", Clazz.newArray (-1, [Integer.$valueOf (removeGapCols.getSize ()).toString ()]))); -var seq = this.viewport.getAlignment ().getSequenceAt (0); -var startRes = seq.findPosition (this.viewport.startRes); -this.viewport.setStartRes (seq.findIndex (startRes) - 1); -this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); -}); -Clazz.defineMethod (c$, "removeAllGapsMenuItem_actionPerformed", -function () { -var start = 0; -var end = this.viewport.getAlignment ().getWidth () - 1; -var seqs; -if (this.viewport.getSelectionGroup () != null) { -seqs = this.viewport.getSelectionGroup ().getSequencesAsArray (this.viewport.getHiddenRepSequences ()); -start = this.viewport.getSelectionGroup ().getStartRes (); -end = this.viewport.getSelectionGroup ().getEndRes (); -} else { -seqs = this.viewport.getAlignment ().getSequencesArray (); -}var seq = this.viewport.getAlignment ().getSequenceAt (0); -var startRes = seq.findPosition (this.viewport.startRes); -this.addHistoryItem ( new jalview.commands.RemoveGapsCommand ("Remove Gaps", seqs, start, end, this.viewport.getAlignment ())); -this.viewport.setStartRes (seq.findIndex (startRes) - 1); -this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); -}); -Clazz.defineMethod (c$, "findMenuItem_actionPerformed", -function () { - new jalview.appletgui.Finder (this.alignPanel); -}); -Clazz.defineMethod (c$, "newView", -function (viewtitle) { -var newal; -if (this.viewport.hasHiddenRows ()) { -newal = new jalview.datamodel.Alignment (this.viewport.getAlignment ().getHiddenSequences ().getFullAlignment ().getSequencesArray ()); -} else { -newal = new jalview.datamodel.Alignment (this.viewport.getAlignment ().getSequencesArray ()); -}if (this.viewport.getAlignment ().getAlignmentAnnotation () != null) { -for (var i = 0; i < this.viewport.getAlignment ().getAlignmentAnnotation ().length; i++) { -if (!this.viewport.getAlignment ().getAlignmentAnnotation ()[i].autoCalculated) { -newal.addAnnotation (this.viewport.getAlignment ().getAlignmentAnnotation ()[i]); -}} -}var newaf = new jalview.appletgui.AlignFrame (newal, this.viewport.applet, "", false); -newaf.viewport.setSequenceSetId (this.alignPanel.av.getSequenceSetId ()); -jalview.appletgui.PaintRefresher.Register (this.alignPanel, this.alignPanel.av.getSequenceSetId ()); -jalview.appletgui.PaintRefresher.Register (newaf.alignPanel, newaf.alignPanel.av.getSequenceSetId ()); -jalview.appletgui.PaintRefresher.Register (newaf.alignPanel.idPanel.idCanvas, newaf.alignPanel.av.getSequenceSetId ()); -jalview.appletgui.PaintRefresher.Register (newaf.alignPanel.seqPanel.seqCanvas, newaf.alignPanel.av.getSequenceSetId ()); -var comps = jalview.appletgui.PaintRefresher.components.get (this.viewport.getSequenceSetId ()); -var viewSize = -1; -for (var i = 0; i < comps.size (); i++) { -if (Clazz.instanceOf (comps.elementAt (i), jalview.appletgui.AlignmentPanel)) { -viewSize++; -}} -var title = String.instantialize (this.getTitle ()); -if (viewtitle != null) { -title = viewtitle + " ( " + title + ")"; -} else { -if (title.indexOf ("(View") > -1) { -title = title.substring (0, title.indexOf ("(View")); -}title += "(View " + viewSize + ")"; -}newaf.setTitle (title.toString ()); -newaf.viewport.setHistoryList (this.viewport.getHistoryList ()); -newaf.viewport.setRedoList (this.viewport.getRedoList ()); -return newaf; -}, "~S"); -Clazz.defineMethod (c$, "getFeatureGroups", -function () { -var fr = null; -if (this.alignPanel != null && (fr = this.alignPanel.getFeatureRenderer ()) != null) { -var gps = fr.getFeatureGroups (); -var _gps = gps.toArray ( new Array (gps.size ())); -return _gps; -}return null; -}); -Clazz.defineMethod (c$, "getFeatureGroupsOfState", -function (visible) { -var fr = null; -if (this.alignPanel != null && (fr = this.alignPanel.getFeatureRenderer ()) != null) { -var gps = fr.getGroups (visible); -var _gps = gps.toArray ( new Array (gps.size ())); -return _gps; -}return null; -}, "~B"); -Clazz.defineMethod (c$, "setFeatureGroupState", -function (groups, state) { -var fr = null; -this.sequenceFeatures.setState (true); -this.viewport.setShowSequenceFeatures (true); -if (this.alignPanel != null && (fr = this.alignPanel.getFeatureRenderer ()) != null) { -fr.setGroupVisibility (java.util.Arrays.asList (groups), state); -this.alignPanel.seqPanel.seqCanvas.repaint (); -if (this.alignPanel.overviewPanel != null) { -this.alignPanel.overviewPanel.updateOverviewImage (); -}}}, "~A,~B"); -Clazz.defineMethod (c$, "seqLimits_itemStateChanged", -function () { -this.viewport.setShowJVSuffix (this.seqLimits.getState ()); -this.alignPanel.fontChanged (); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "colourTextMenuItem_actionPerformed", -function () { -this.viewport.setColourText (this.colourTextMenuItem.getState ()); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "displayNonconservedMenuItem_actionPerformed", -function () { -this.viewport.setShowUnconserved (this.displayNonconservedMenuItem.getState ()); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "wrapMenuItem_actionPerformed", -function () { -this.viewport.setWrapAlignment (this.wrapMenuItem.getState ()); -this.alignPanel.setWrapAlignment (this.wrapMenuItem.getState ()); -this.scaleAbove.setEnabled (this.wrapMenuItem.getState ()); -this.scaleLeft.setEnabled (this.wrapMenuItem.getState ()); -this.scaleRight.setEnabled (this.wrapMenuItem.getState ()); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "overviewMenuItem_actionPerformed", -function () { -if (this.alignPanel.overviewPanel != null) { -return; -}var frame = new awt2swing.Frame (); -var overview = new jalview.appletgui.OverviewPanel (this.alignPanel); -frame.add (overview); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.overview_params", Clazz.newArray (-1, [this.getTitle ()])), overview.getPreferredSize ().width, overview.getPreferredSize ().height + 50); -frame.pack (); -var ap = this.alignPanel; -frame.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$1") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$1, this, Clazz.cloneFinals ("ap", ap)))); -this.alignPanel.setOverviewPanel (overview); -}); -Clazz.overrideMethod (c$, "changeColour", -function (cs) { -var threshold = 0; -if (cs != null) { -if (this.viewport.getAbovePIDThreshold ()) { -this.viewport.setThreshold (jalview.appletgui.SliderPanel.setPIDSliderSource (this.alignPanel, cs, "Background")); -}if (this.viewport.getConservationSelected ()) { -cs.setConservationApplied (true); -this.viewport.setIncrement (jalview.appletgui.SliderPanel.setConservationSlider (this.alignPanel, cs, "Background")); -} else { -cs.setConservationApplied (false); -}}this.viewport.setGlobalColourScheme (cs); -if (this.alignPanel.getOverviewPanel () != null) { -this.alignPanel.getOverviewPanel ().updateOverviewImage (); -}jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.viewport.applet).sequenceColoursChanged (this.alignPanel); -this.alignPanel.paintAlignment (true); -}, "jalview.schemes.ColourSchemeI"); -Clazz.defineMethod (c$, "modifyPID_actionPerformed", -function () { -if (this.viewport.getAbovePIDThreshold () && this.viewport.getGlobalColourScheme () != null) { -jalview.appletgui.SliderPanel.setPIDSliderSource (this.alignPanel, this.viewport.getGlobalColourScheme (), "Background"); -jalview.appletgui.SliderPanel.showPIDSlider (); -}}); -Clazz.defineMethod (c$, "modifyConservation_actionPerformed", -function () { -if (this.viewport.getConservationSelected () && this.viewport.getGlobalColourScheme () != null) { -jalview.appletgui.SliderPanel.setConservationSlider (this.alignPanel, this.viewport.getGlobalColourScheme (), "Background"); -jalview.appletgui.SliderPanel.showConservationSlider (); -}}); -Clazz.defineMethod (c$, "conservationMenuItem_actionPerformed", -function () { -this.viewport.setConservationSelected (this.conservationMenuItem.getState ()); -this.viewport.setAbovePIDThreshold (false); -this.abovePIDThreshold.setState (false); -this.changeColour (this.viewport.getGlobalColourScheme ()); -this.modifyConservation_actionPerformed (); -}); -Clazz.defineMethod (c$, "abovePIDThreshold_actionPerformed", -function () { -this.viewport.setAbovePIDThreshold (this.abovePIDThreshold.getState ()); -this.conservationMenuItem.setState (false); -this.viewport.setConservationSelected (false); -this.changeColour (this.viewport.getGlobalColourScheme ()); -this.modifyPID_actionPerformed (); -}); -Clazz.defineMethod (c$, "sortPairwiseMenuItem_actionPerformed", -function () { -var oldOrder = this.viewport.getAlignment ().getSequencesArray (); -jalview.analysis.AlignmentSorter.sortByPID (this.viewport.getAlignment (), this.viewport.getAlignment ().getSequenceAt (0), null); -this.addHistoryItem ( new jalview.commands.OrderCommand ("Pairwise Sort", oldOrder, this.viewport.getAlignment ())); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "sortIDMenuItem_actionPerformed", -function () { -var oldOrder = this.viewport.getAlignment ().getSequencesArray (); -jalview.analysis.AlignmentSorter.sortByID (this.viewport.getAlignment ()); -this.addHistoryItem ( new jalview.commands.OrderCommand ("ID Sort", oldOrder, this.viewport.getAlignment ())); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "sortLengthMenuItem_actionPerformed", -function () { -var oldOrder = this.viewport.getAlignment ().getSequencesArray (); -jalview.analysis.AlignmentSorter.sortByLength (this.viewport.getAlignment ()); -this.addHistoryItem ( new jalview.commands.OrderCommand ("Length Sort", oldOrder, this.viewport.getAlignment ())); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "sortGroupMenuItem_actionPerformed", -function () { -var oldOrder = this.viewport.getAlignment ().getSequencesArray (); -jalview.analysis.AlignmentSorter.sortByGroup (this.viewport.getAlignment ()); -this.addHistoryItem ( new jalview.commands.OrderCommand ("Group Sort", oldOrder, this.viewport.getAlignment ())); -this.alignPanel.paintAlignment (true); -}); -Clazz.defineMethod (c$, "removeRedundancyMenuItem_actionPerformed", -function () { - new jalview.appletgui.RedundancyPanel (this.alignPanel); -}); -Clazz.defineMethod (c$, "pairwiseAlignmentMenuItem_actionPerformed", -function () { -if (this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () > 1) { -var frame = new awt2swing.Frame (); -frame.add ( new jalview.appletgui.PairwiseAlignPanel (this.alignPanel)); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("action.pairwise_alignment"), 600, 500); -}}); -Clazz.defineMethod (c$, "PCAMenuItem_actionPerformed", -function () { -if (!this.viewport.getAlignment ().isAligned (false)) { -var current; -var Width = this.viewport.getAlignment ().getWidth (); -for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { -current = this.viewport.getAlignment ().getSequenceAt (i); -if (current.getLength () < Width) { -current.insertCharAt (Width - 1, this.viewport.getGapCharacter ()); -}} -this.alignPanel.paintAlignment (true); -}if ((this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () < 4 && this.viewport.getSelectionGroup ().getSize () > 0) || this.viewport.getAlignment ().getHeight () < 4) { -return; -}try { - new jalview.appletgui.PCAPanel (this.viewport); -} catch (ex) { -if (Clazz.exceptionOf (ex, OutOfMemoryError)) { -} else { -throw ex; -} -} -}); -Clazz.defineMethod (c$, "averageDistanceTreeMenuItem_actionPerformed", -function () { -this.NewTreePanel ("AV", "PID", "Average distance tree using PID"); -}); -Clazz.defineMethod (c$, "neighbourTreeMenuItem_actionPerformed", -function () { -this.NewTreePanel ("NJ", "PID", "Neighbour joining tree using PID"); -}); -Clazz.defineMethod (c$, "njTreeBlosumMenuItem_actionPerformed", -function () { -this.NewTreePanel ("NJ", "BL", "Neighbour joining tree using BLOSUM62"); -}); -Clazz.defineMethod (c$, "avTreeBlosumMenuItem_actionPerformed", -function () { -this.NewTreePanel ("AV", "BL", "Average distance tree using BLOSUM62"); -}); -Clazz.defineMethod (c$, "NewTreePanel", -function (type, pwType, title) { -if (!this.viewport.getAlignment ().isAligned (false)) { -var current; -var Width = this.viewport.getAlignment ().getWidth (); -for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { -current = this.viewport.getAlignment ().getSequenceAt (i); -if (current.getLength () < Width) { -current.insertCharAt (Width - 1, this.viewport.getGapCharacter ()); -}} -this.alignPanel.paintAlignment (true); -}if ((this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () > 1) || (this.viewport.getAlignment ().getHeight () > 1)) { -var tp = new jalview.appletgui.TreePanel (this.alignPanel, type, pwType); -this.addTreeMenuItem (tp, title); -jalview.bin.JalviewLite.addFrame (tp, title, 600, 500); -}}, "~S,~S,~S"); -Clazz.defineMethod (c$, "loadTree_actionPerformed", -function () { -var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); -cap.setText (jalview.util.MessageManager.getString ("label.paste_newick_tree_file")); -cap.setTreeImport (); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.paste_newick_file"), 400, 300); -}); -Clazz.defineMethod (c$, "loadTree", -function (tree, treeFile) { -var tp = new jalview.appletgui.TreePanel (this.alignPanel, treeFile, jalview.util.MessageManager.getString ("label.load_tree_from_file"), tree); -jalview.bin.JalviewLite.addFrame (tp, treeFile, 600, 500); -this.addTreeMenuItem (tp, treeFile); -}, "jalview.io.NewickFile,~S"); -Clazz.defineMethod (c$, "sortByTree", -function (treePanel, title) { -var oldOrder = this.viewport.getAlignment ().getSequencesArray (); -jalview.analysis.AlignmentSorter.sortByTree (this.viewport.getAlignment (), treePanel.getTree ()); -this.addHistoryItem ( new jalview.commands.OrderCommand (jalview.util.MessageManager.formatMessage ("label.order_by_params", Clazz.newArray (-1, [title])), oldOrder, this.viewport.getAlignment ())); -this.alignPanel.paintAlignment (true); -}, "jalview.appletgui.TreePanel,~S"); -Clazz.defineMethod (c$, "addTreeMenuItem", -function (treePanel, title) { -var item = new awt2swing.MenuItem (title); -this.sortByTreeMenu.add (item); -item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$2") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$2, this, Clazz.cloneFinals ("treePanel", treePanel, "title", title)))); -treePanel.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$3") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$3, this, Clazz.cloneFinals ("treePanel", treePanel, "title", title, "item", item)))); -}, "jalview.appletgui.TreePanel,~S"); -Clazz.defineMethod (c$, "sortBy", -function (alorder, undoname) { -var oldOrder = this.viewport.getAlignment ().getSequencesArray (); -if ((this.viewport.applet, jalview.bin.JalviewLite).debug) { -System.err.println ("Sorting " + alorder.getOrder ().size () + " in alignment '" + this.getTitle () + "'"); -}jalview.analysis.AlignmentSorter.sortBy (this.viewport.getAlignment (), alorder); -if (undoname != null) { -this.addHistoryItem ( new jalview.commands.OrderCommand (undoname, oldOrder, this.viewport.getAlignment ())); -}this.alignPanel.paintAlignment (true); -return true; -}, "jalview.datamodel.AlignmentOrder,~S"); -Clazz.defineMethod (c$, "documentation_actionPerformed", -function () { -this.alignPanel.av.applet.openJalviewHelpUrl (); -}); -Clazz.defineMethod (c$, "about_actionPerformed", -function () { -if (!Clazz.isClassDefined ("jalview.appletgui.AlignFrame$1AboutPanel")) { -jalview.appletgui.AlignFrame.$AlignFrame$1AboutPanel$ (); -} -var frame = new awt2swing.Frame (); -frame.add (Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$1AboutPanel, this, null, jalview.bin.JalviewLite.getVersion (), jalview.bin.JalviewLite.getBuildDate ())); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.jalview"), 580, 220); -}); -Clazz.defineMethod (c$, "showURL", -function (url, target) { -if (this.viewport.applet == null) { -System.out.println ("Not running as applet - no browser available."); -} else { -this.viewport.applet.showURL (url, target); -}}, "~S,~S"); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.setMenuBar (this.alignFrameMenuBar); -this.inputText.setLabel (jalview.util.MessageManager.getString ("label.input_from_textbox")); -this.inputText.addActionListener (this); -var outputTextboxMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.out_to_textbox")); -for (var i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++) { -var item = new awt2swing.MenuItem (jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]); -item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$4") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$4$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$4, this, null))); -outputTextboxMenu.add (item); -} -this.closeMenuItem.addActionListener (this); -this.loadApplication.addActionListener (this); -this.$loadTree.addActionListener (this); -this.$loadAnnotations.addActionListener (this); -this.$outputFeatures.addActionListener (this); -this.$outputAnnotations.addActionListener (this); -this.undoMenuItem.setEnabled (false); -this.undoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.undo")); -this.undoMenuItem.addActionListener (this); -this.redoMenuItem.setEnabled (false); -this.redoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.redo")); -this.redoMenuItem.addActionListener (this); -this.copy.setLabel (jalview.util.MessageManager.getString ("action.copy")); -this.copy.addActionListener (this); -this.cut.setLabel (jalview.util.MessageManager.getString ("action.cut")); -this.cut.addActionListener (this); -this.$delete.setLabel (jalview.util.MessageManager.getString ("action.delete")); -this.$delete.addActionListener (this); -this.pasteMenu.setLabel (jalview.util.MessageManager.getString ("action.paste")); -this.pasteNew.setLabel (jalview.util.MessageManager.getString ("label.to_new_alignment")); -this.pasteNew.addActionListener (this); -this.pasteThis.setLabel (jalview.util.MessageManager.getString ("label.to_this_alignment")); -this.pasteThis.addActionListener (this); -this.remove2LeftMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_left")); -this.remove2LeftMenuItem.addActionListener (this); -this.remove2RightMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_right")); -this.remove2RightMenuItem.addActionListener (this); -this.removeGappedColumnMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_empty_columns")); -this.removeGappedColumnMenuItem.addActionListener (this); -this.removeAllGapsMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_all_gaps")); -this.removeAllGapsMenuItem.addActionListener (this); -this.removeRedundancyMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_redundancy").concat ("...")); -this.removeRedundancyMenuItem.addActionListener (this); -this.findMenuItem.setLabel (jalview.util.MessageManager.getString ("action.find")); -this.findMenuItem.addActionListener (this); -this.selectAllSequenceMenuItem.addActionListener (this); -this.deselectAllSequenceMenuItem.addActionListener (this); -this.invertSequenceMenuItem.setLabel (jalview.util.MessageManager.getString ("action.invert_sequence_selection")); -this.invertSequenceMenuItem.addActionListener (this); -this.invertColSel.setLabel (jalview.util.MessageManager.getString ("action.invert_column_selection")); -this.invertColSel.addActionListener (this); -this.deleteGroups.setLabel (jalview.util.MessageManager.getString ("action.undefine_groups")); -this.deleteGroups.addActionListener (this); -this.grpsFromSelection.setLabel (jalview.util.MessageManager.getString ("action.make_groups_selection")); -this.grpsFromSelection.addActionListener (this); -this.createGroup.setLabel (jalview.util.MessageManager.getString ("action.create_group")); -this.unGroup.setLabel (jalview.util.MessageManager.getString ("action.remove_group")); -this.annotationColumnSelection.setLabel ("Select by Annotation"); -this.annotationColumnSelection.addActionListener (this); -this.$newView.setLabel (jalview.util.MessageManager.getString ("action.new_view")); -this.$newView.addActionListener (this); -var showMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.show")); -this.showColumns.setLabel (jalview.util.MessageManager.getString ("label.all_columns")); -this.showSeqs.setLabel (jalview.util.MessageManager.getString ("label.all_sequences")); -var hideMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.hide")); -this.hideColumns.setLabel (jalview.util.MessageManager.getString ("label.selected_columns")); -this.hideSequences.setLabel (jalview.util.MessageManager.getString ("label.selected_sequences")); -this.hideAllButSelection.setLabel (jalview.util.MessageManager.getString ("label.all_but_selected_region")); -this.hideAllSelection.setLabel (jalview.util.MessageManager.getString ("label.selected_region")); -this.showAllHidden.setLabel (jalview.util.MessageManager.getString ("label.all_sequences_columns")); -this.showColumns.addActionListener (this); -this.showSeqs.addActionListener (this); -this.hideColumns.addActionListener (this); -this.hideSequences.addActionListener (this); -this.hideAllButSelection.addActionListener (this); -this.hideAllSelection.addActionListener (this); -this.showAllHidden.addActionListener (this); -this.featureSettings.setLabel (jalview.util.MessageManager.getString ("label.feature_settings")); -this.featureSettings.addActionListener (this); -this.sequenceFeatures.setLabel (jalview.util.MessageManager.getString ("label.show_sequence_features")); -this.sequenceFeatures.addItemListener (this); -this.sequenceFeatures.setState (false); -this.followMouseOverFlag.setLabel (jalview.util.MessageManager.getString ("label.automatic_scrolling")); -this.followMouseOverFlag.addItemListener (this); -this.alProperties.addActionListener (this); -this.overviewMenuItem.setLabel (jalview.util.MessageManager.getString ("label.overview_window")); -this.overviewMenuItem.addActionListener (this); -this.annotationPanelMenuItem.setLabel (jalview.util.MessageManager.getString ("label.show_annotations")); -this.annotationPanelMenuItem.addItemListener (this); -this.showGroupConsensus.setLabel (jalview.util.MessageManager.getString ("label.group_consensus")); -this.showGroupConservation.setLabel (jalview.util.MessageManager.getString ("label.group_conservation")); -this.showConsensusHistogram.setLabel (jalview.util.MessageManager.getString ("label.show_consensus_histogram")); -this.showSequenceLogo.setLabel (jalview.util.MessageManager.getString ("label.show_consensus_logo")); -this.normSequenceLogo.setLabel (jalview.util.MessageManager.getString ("label.norm_consensus_logo")); -this.applyAutoAnnotationSettings.setLabel (jalview.util.MessageManager.getString ("label.apply_all_groups")); -this.applyAutoAnnotationSettings.setState (true); -var autoAnnMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.autocalculated_annotation")); -this.showGroupConsensus.addItemListener (this); -this.showGroupConservation.addItemListener (this); -this.showConsensusHistogram.addItemListener (this); -this.showSequenceLogo.addItemListener (this); -this.normSequenceLogo.addItemListener (this); -this.applyAutoAnnotationSettings.addItemListener (this); -this.showAlignmentAnnotations = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_all_al_annotations")); -this.showSequenceAnnotations = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_all_seq_annotations")); -this.sortAnnBySequence = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.sort_annotations_by_sequence")); -this.sortAnnByLabel = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.sort_annotations_by_label")); -this.showAutoFirst = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_first")); -this.showAutoLast = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_last")); -this.showAlignmentAnnotations.addItemListener (this); -this.showSequenceAnnotations.addItemListener (this); -this.sortAnnBySequence.addItemListener (this); -this.sortAnnByLabel.addItemListener (this); -this.showAutoFirst.addItemListener (this); -this.showAutoLast.addItemListener (this); -this.$font.setLabel (jalview.util.MessageManager.getString ("action.font")); -this.$font.addActionListener (this); -this.scaleAbove.setLabel (jalview.util.MessageManager.getString ("action.scale_above")); -this.scaleAbove.setState (true); -this.scaleAbove.setEnabled (false); -this.scaleAbove.addItemListener (this); -this.scaleLeft.setEnabled (false); -this.scaleLeft.setState (true); -this.scaleLeft.setLabel (jalview.util.MessageManager.getString ("action.scale_left")); -this.scaleLeft.addItemListener (this); -this.scaleRight.setEnabled (false); -this.scaleRight.setState (true); -this.scaleRight.setLabel (jalview.util.MessageManager.getString ("action.scale_right")); -this.scaleRight.addItemListener (this); -this.viewBoxesMenuItem.setLabel (jalview.util.MessageManager.getString ("action.boxes")); -this.viewBoxesMenuItem.setState (true); -this.viewBoxesMenuItem.addItemListener (this); -this.viewTextMenuItem.setLabel (jalview.util.MessageManager.getString ("action.text")); -this.viewTextMenuItem.setState (true); -this.viewTextMenuItem.addItemListener (this); -this.colourTextMenuItem.setLabel (jalview.util.MessageManager.getString ("label.colour_text")); -this.colourTextMenuItem.addItemListener (this); -this.displayNonconservedMenuItem.setLabel (jalview.util.MessageManager.getString ("label.show_non_conversed")); -this.displayNonconservedMenuItem.addItemListener (this); -this.wrapMenuItem.setLabel (jalview.util.MessageManager.getString ("action.wrap")); -this.wrapMenuItem.addItemListener (this); -this.renderGapsMenuItem.setLabel (jalview.util.MessageManager.getString ("action.show_gaps")); -this.renderGapsMenuItem.setState (true); -this.renderGapsMenuItem.addItemListener (this); -this.centreColumnLabelFlag.setLabel (jalview.util.MessageManager.getString ("label.centre_column_labels")); -this.centreColumnLabelFlag.addItemListener (this); -this.seqLimits.setState (true); -this.seqLimits.setLabel (jalview.util.MessageManager.getString ("label.show_sequence_limits")); -this.seqLimits.addItemListener (this); -this.applyToAllGroups.setLabel (jalview.util.MessageManager.getString ("label.apply_colour_to_all_groups")); -this.applyToAllGroups.setState (true); -this.applyToAllGroups.addItemListener (this); -this.clustalColour.setLabel (jalview.util.MessageManager.getString ("label.clustalx")); -this.clustalColour.addActionListener (this); -this.zappoColour.setLabel (jalview.util.MessageManager.getString ("label.zappo")); -this.zappoColour.addActionListener (this); -this.taylorColour.setLabel (jalview.util.MessageManager.getString ("label.taylor")); -this.taylorColour.addActionListener (this); -this.hydrophobicityColour.setLabel (jalview.util.MessageManager.getString ("label.hydrophobicity")); -this.hydrophobicityColour.addActionListener (this); -this.helixColour.setLabel (jalview.util.MessageManager.getString ("label.helix_propensity")); -this.helixColour.addActionListener (this); -this.strandColour.setLabel (jalview.util.MessageManager.getString ("label.strand_propensity")); -this.strandColour.addActionListener (this); -this.turnColour.setLabel (jalview.util.MessageManager.getString ("label.turn_propensity")); -this.turnColour.addActionListener (this); -this.buriedColour.setLabel (jalview.util.MessageManager.getString ("label.buried_index")); -this.buriedColour.addActionListener (this); -this.purinePyrimidineColour.setLabel (jalview.util.MessageManager.getString ("label.purine_pyrimidine")); -this.purinePyrimidineColour.addActionListener (this); -this.RNAInteractionColour.setLabel (jalview.util.MessageManager.getString ("label.rna_interaction")); -this.RNAInteractionColour.addActionListener (this); -this.RNAHelixColour.setLabel (jalview.util.MessageManager.getString ("action.by_rna_helixes")); -this.RNAHelixColour.addActionListener (this); -this.userDefinedColour.setLabel (jalview.util.MessageManager.getString ("action.user_defined")); -this.userDefinedColour.addActionListener (this); -this.PIDColour.setLabel (jalview.util.MessageManager.getString ("label.percentage_identity")); -this.PIDColour.addActionListener (this); -this.BLOSUM62Colour.setLabel (jalview.util.MessageManager.getString ("label.blosum62_score")); -this.BLOSUM62Colour.addActionListener (this); -this.tcoffeeColour.setLabel (jalview.util.MessageManager.getString ("label.tcoffee_scores")); -this.tcoffeeColour.setEnabled (false); -this.tcoffeeColour.addActionListener (this); -this.conservationMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_conservation")); -this.conservationMenuItem.addItemListener (this); -this.noColourmenuItem.setLabel (jalview.util.MessageManager.getString ("label.none")); -this.noColourmenuItem.addActionListener (this); -this.abovePIDThreshold.setLabel (jalview.util.MessageManager.getString ("label.above_identity_threshold")); -this.abovePIDThreshold.addItemListener (this); -this.nucleotideColour.setLabel (jalview.util.MessageManager.getString ("label.nucleotide")); -this.nucleotideColour.addActionListener (this); -this.modifyPID.setLabel (jalview.util.MessageManager.getString ("label.modify_identity_thereshold")); -this.modifyPID.addActionListener (this); -this.modifyConservation.setLabel (jalview.util.MessageManager.getString ("label.modify_conservation_thereshold")); -this.modifyConservation.addActionListener (this); -this.annotationColour.setLabel (jalview.util.MessageManager.getString ("action.by_annotation")); -this.annotationColour.addActionListener (this); -this.sortPairwiseMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_pairwise_id")); -this.sortPairwiseMenuItem.addActionListener (this); -this.sortIDMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_id")); -this.sortIDMenuItem.addActionListener (this); -this.sortLengthMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_length")); -this.sortLengthMenuItem.addActionListener (this); -this.sortGroupMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_group")); -this.sortGroupMenuItem.addActionListener (this); -this.pairwiseAlignmentMenuItem.setLabel (jalview.util.MessageManager.getString ("action.pairwise_alignment")); -this.pairwiseAlignmentMenuItem.addActionListener (this); -this.PCAMenuItem.setLabel (jalview.util.MessageManager.getString ("label.principal_component_analysis")); -this.PCAMenuItem.addActionListener (this); -this.autoCalculate = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.autocalculate_consensus"), true); -this.averageDistanceTreeMenuItem.setLabel (jalview.util.MessageManager.getString ("label.average_distance_identity")); -this.averageDistanceTreeMenuItem.addActionListener (this); -this.neighbourTreeMenuItem.setLabel (jalview.util.MessageManager.getString ("label.neighbour_joining_identity")); -this.neighbourTreeMenuItem.addActionListener (this); -this.avDistanceTreeBlosumMenuItem.setLabel (jalview.util.MessageManager.getString ("label.average_distance_bloslum62")); -this.avDistanceTreeBlosumMenuItem.addActionListener (this); -this.njTreeBlosumMenuItem.setLabel (jalview.util.MessageManager.getString ("label.neighbour_blosum62")); -this.njTreeBlosumMenuItem.addActionListener (this); -this.sortByTreeMenu.setLabel (jalview.util.MessageManager.getString ("action.by_tree_order")); -var sortMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.sort")); -var calculateTreeMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.calculate_tree")); -this.autoCalculate.addItemListener (this); -this.$sortByTree.addItemListener (this); -var helpMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.help")); -this.documentation.setLabel (jalview.util.MessageManager.getString ("label.documentation")); -this.documentation.addActionListener (this); -this.about.setLabel (jalview.util.MessageManager.getString ("label.about")); -this.about.addActionListener (this); -this.alignFrameMenuBar.add (this.fileMenu); -var editMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.edit")); -this.alignFrameMenuBar.add (editMenu); -var selectMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.select")); -this.alignFrameMenuBar.add (selectMenu); -var viewMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.view")); -this.alignFrameMenuBar.add (viewMenu); -var annotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.annotations")); -this.alignFrameMenuBar.add (annotationsMenu); -var formatMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.format")); -this.alignFrameMenuBar.add (formatMenu); -var colourMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.colour")); -this.alignFrameMenuBar.add (colourMenu); -var calculateMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.calculate")); -this.alignFrameMenuBar.add (calculateMenu); -this.alignFrameMenuBar.add (helpMenu); -this.fileMenu.add (this.inputText); -this.fileMenu.add (this.$loadTree); -this.fileMenu.add (this.$loadAnnotations); -this.fileMenu.addSeparator (); -this.fileMenu.add (outputTextboxMenu); -this.fileMenu.add (this.$outputFeatures); -this.fileMenu.add (this.$outputAnnotations); -if (this.jalviewServletURL != null) { -this.fileMenu.add (this.loadApplication); -}this.fileMenu.addSeparator (); -this.fileMenu.add (this.closeMenuItem); -editMenu.add (this.undoMenuItem); -editMenu.add (this.redoMenuItem); -editMenu.add (this.cut); -editMenu.add (this.copy); -this.pasteMenu.add (this.pasteNew); -this.pasteMenu.add (this.pasteThis); -editMenu.add (this.pasteMenu); -editMenu.add (this.$delete); -editMenu.addSeparator (); -editMenu.add (this.remove2LeftMenuItem); -editMenu.add (this.remove2RightMenuItem); -editMenu.add (this.removeGappedColumnMenuItem); -editMenu.add (this.removeAllGapsMenuItem); -editMenu.add (this.removeRedundancyMenuItem); -selectMenu.add (this.findMenuItem); -selectMenu.addSeparator (); -selectMenu.add (this.selectAllSequenceMenuItem); -selectMenu.add (this.deselectAllSequenceMenuItem); -selectMenu.add (this.invertSequenceMenuItem); -selectMenu.add (this.invertColSel); -selectMenu.add (this.createGroup); -selectMenu.add (this.unGroup); -selectMenu.add (this.grpsFromSelection); -selectMenu.add (this.deleteGroups); -selectMenu.add (this.annotationColumnSelection); -viewMenu.add (this.$newView); -viewMenu.addSeparator (); -showMenu.add (this.showColumns); -showMenu.add (this.showSeqs); -showMenu.add (this.showAllHidden); -viewMenu.add (showMenu); -hideMenu.add (this.hideColumns); -hideMenu.add (this.hideSequences); -hideMenu.add (this.hideAllSelection); -hideMenu.add (this.hideAllButSelection); -viewMenu.add (hideMenu); -viewMenu.addSeparator (); -viewMenu.add (this.followMouseOverFlag); -viewMenu.addSeparator (); -viewMenu.add (this.sequenceFeatures); -viewMenu.add (this.featureSettings); -viewMenu.addSeparator (); -viewMenu.add (this.alProperties); -viewMenu.addSeparator (); -viewMenu.add (this.overviewMenuItem); -annotationsMenu.add (this.annotationPanelMenuItem); -annotationsMenu.addSeparator (); -annotationsMenu.add (this.showAlignmentAnnotations); -annotationsMenu.add (this.showSequenceAnnotations); -annotationsMenu.add (this.sortAnnBySequence); -annotationsMenu.add (this.sortAnnByLabel); -annotationsMenu.addSeparator (); -autoAnnMenu.add (this.showAutoFirst); -autoAnnMenu.add (this.showAutoLast); -autoAnnMenu.addSeparator (); -autoAnnMenu.add (this.applyAutoAnnotationSettings); -autoAnnMenu.add (this.showConsensusHistogram); -autoAnnMenu.add (this.showSequenceLogo); -autoAnnMenu.add (this.normSequenceLogo); -autoAnnMenu.addSeparator (); -autoAnnMenu.add (this.showGroupConservation); -autoAnnMenu.add (this.showGroupConsensus); -annotationsMenu.add (autoAnnMenu); -formatMenu.add (this.$font); -formatMenu.add (this.seqLimits); -formatMenu.add (this.wrapMenuItem); -formatMenu.add (this.scaleAbove); -formatMenu.add (this.scaleLeft); -formatMenu.add (this.scaleRight); -formatMenu.add (this.viewBoxesMenuItem); -formatMenu.add (this.viewTextMenuItem); -formatMenu.add (this.colourTextMenuItem); -formatMenu.add (this.displayNonconservedMenuItem); -formatMenu.add (this.renderGapsMenuItem); -formatMenu.add (this.centreColumnLabelFlag); -colourMenu.add (this.applyToAllGroups); -colourMenu.addSeparator (); -colourMenu.add (this.noColourmenuItem); -colourMenu.add (this.clustalColour); -colourMenu.add (this.BLOSUM62Colour); -colourMenu.add (this.PIDColour); -colourMenu.add (this.zappoColour); -colourMenu.add (this.taylorColour); -colourMenu.add (this.hydrophobicityColour); -colourMenu.add (this.helixColour); -colourMenu.add (this.strandColour); -colourMenu.add (this.turnColour); -colourMenu.add (this.buriedColour); -colourMenu.add (this.nucleotideColour); -colourMenu.add (this.purinePyrimidineColour); -colourMenu.add (this.tcoffeeColour); -colourMenu.add (this.userDefinedColour); -colourMenu.addSeparator (); -colourMenu.add (this.conservationMenuItem); -colourMenu.add (this.modifyConservation); -colourMenu.add (this.abovePIDThreshold); -colourMenu.add (this.modifyPID); -colourMenu.add (this.annotationColour); -colourMenu.add (this.RNAHelixColour); -sortMenu.add (this.sortIDMenuItem); -sortMenu.add (this.sortLengthMenuItem); -sortMenu.add (this.sortByTreeMenu); -sortMenu.add (this.sortGroupMenuItem); -sortMenu.add (this.sortPairwiseMenuItem); -calculateMenu.add (sortMenu); -calculateTreeMenu.add (this.averageDistanceTreeMenuItem); -calculateTreeMenu.add (this.neighbourTreeMenuItem); -calculateTreeMenu.add (this.avDistanceTreeBlosumMenuItem); -calculateTreeMenu.add (this.njTreeBlosumMenuItem); -calculateMenu.add (calculateTreeMenu); -calculateMenu.addSeparator (); -calculateMenu.add (this.pairwiseAlignmentMenuItem); -calculateMenu.add (this.PCAMenuItem); -calculateMenu.add (this.autoCalculate); -calculateMenu.add (this.$sortByTree); -helpMenu.add (this.documentation); -helpMenu.add (this.about); -this.statusBar.setBackground (java.awt.Color.white); -this.statusBar.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.setStatus (jalview.util.MessageManager.getString ("label.status_bar")); -this.add (this.statusBar, "South"); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "setStatus", -function (string) { -this.statusBar.setText (string); -}, "~S"); -Clazz.defineMethod (c$, "createAlignFrameWindow", -function (reallyEmbedded) { -if (reallyEmbedded) { -this.embedAlignFrameInApplet (this.viewport.applet); -} else { -if (this.embedMenuIfNeeded (this.alignPanel)) { -this.alignPanel.setSize (this.getSize ().width, this.getSize ().height - this.statusBar.getHeight ()); -}this.add (this.statusBar, "South"); -this.add (this.alignPanel, "Center"); -jalview.bin.JalviewLite.addFrame (this, this.getTitle (), this.frameWidth, this.frameHeight); -}}, "~B"); -Clazz.defineMethod (c$, "embedAlignFrameInApplet", -function (theApplet) { -this.fileMenu.remove (this.closeMenuItem); -this.fileMenu.remove (3); -this.embeddedMenu = this.makeEmbeddedPopupMenu (this.alignFrameMenuBar, false, false); -theApplet.setLayout ( new java.awt.BorderLayout ()); -theApplet.add (this.embeddedMenu, "North"); -theApplet.add (this.statusBar, "South"); -this.alignPanel.setSize (theApplet.getSize ().width, theApplet.getSize ().height - this.embeddedMenu.getHeight () - this.statusBar.getHeight ()); -theApplet.add (this.alignPanel, "Center"); -var me = this; -theApplet.addFocusListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$5") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$5$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$5, this, Clazz.cloneFinals ("theApplet", theApplet, "me", me)))); -theApplet.validate (); -}, "jalview.bin.JalviewLite"); -Clazz.defineMethod (c$, "addStructureViewInstance", -function (jmolviewer, sequenceIds) { -return null; -}, "~O,~A"); -Clazz.defineMethod (c$, "addPdbFile", -function (sequenceId, pdbEntryString, pdbFile) { -var toaddpdb = this.viewport.getAlignment ().findName (sequenceId); -var needtoadd = false; -if (toaddpdb != null) { -var pdbe = toaddpdb.getPDBId (); -var pdbentry = null; -if (pdbe != null && pdbe.size () > 0) { -for (var pe = 0, peSize = pdbe.size (); pe < peSize; pe++) { -pdbentry = pdbe.elementAt (pe); -if (!pdbentry.getId ().equals (pdbEntryString) && !pdbentry.getFile ().equals (pdbFile)) { -pdbentry = null; -} else { -continue; -}} -}if (pdbentry == null) { -pdbentry = new jalview.datamodel.PDBEntry (); -pdbentry.setId (pdbEntryString); -pdbentry.setFile (pdbFile); -needtoadd = true; -}var protocol = jalview.io.AppletFormatAdapter.resolveProtocol (pdbFile, "PDB"); -if (protocol == null) { -return false; -}if (needtoadd) { -if (pdbentry.getProperty () == null) { -pdbentry.setProperty ( new java.util.Hashtable ()); -}pdbentry.getProperty ().put ("protocol", protocol); -toaddpdb.addPDBId (pdbentry); -this.alignPanel.getStructureSelectionManager ().registerPDBEntry (pdbentry); -}}return true; -}, "~S,~S,~S"); -Clazz.defineMethod (c$, "cleanSeqChainArrays", -($fz = function (seqs, chains) { -if (seqs != null) { -var sequences = new java.util.Vector (); -for (var i = 0; i < seqs.length; i++) { -if (seqs[i] != null) { -sequences.addElement ( Clazz.newArray (-1, [seqs[i], (chains != null) ? chains[i] : null])); -}} -seqs = new Array (sequences.size ()); -chains = new Array (sequences.size ()); -for (var i = 0, isize = sequences.size (); i < isize; i++) { -var oj = sequences.elementAt (i); -seqs[i] = oj[0]; -chains[i] = oj[1]; -} -}return Clazz.newArray (-1, [seqs, chains]); -}, $fz.isPrivate = true, $fz), "~A,~A"); -Clazz.defineMethod (c$, "newStructureView", -function (applet, pdb, seqs, chains, protocol) { -var sqch = this.cleanSeqChainArrays (seqs, chains); -seqs = sqch[0]; -chains = sqch[1]; -if (seqs == null || seqs.length == 0) { -System.err.println ("JalviewLite.AlignFrame:newStructureView: No sequence to bind structure to."); -}if (protocol == null || protocol.trim ().length == 0 || protocol.equals ("null")) { -protocol = pdb.getProperty ().get ("protocol"); -if (protocol == null) { -System.err.println ("Couldn't work out protocol to open structure: " + pdb.getId ()); -return; -}}if (applet.useXtrnalSviewer) { -if (jalview.structure.StructureSelectionManager.getStructureSelectionManager (applet).setMapping (seqs, chains, pdb.getFile (), protocol) == null) { -System.err.println ("Failed to map " + pdb.getFile () + " (" + protocol + ") to any sequences"); -}return; -}if (applet.isAlignPdbStructures () && applet.jmolAvailable) { -var ajm = null; -var tajm; -var jmols = applet.getAppletWindow (jalview.appletgui.AppletJmol); -for (var i = 0, iSize = jmols.size (); i < iSize; i++) { -tajm = jmols.elementAt (i); -if (tajm.ap.alignFrame === this) { -ajm = tajm; -break; -}} -if (ajm != null) { -System.err.println ("Incremental adding and aligning structure to existing Jmol view not yet implemented."); -ajm = null; -}} new jalview.appletgui.AppletJmol (pdb, seqs, chains, this.alignPanel, protocol); -jalview.bin.JalviewLite.lastFrameX += 40; -jalview.bin.JalviewLite.lastFrameY += 40; -}, "jalview.bin.JalviewLite,jalview.datamodel.PDBEntry,~A,~A,~S"); -Clazz.defineMethod (c$, "alignedStructureView", -function (applet, pdb, seqs, chains, protocols) { -System.err.println ("Aligned Structure View: Not yet implemented."); -}, "jalview.bin.JalviewLite,~A,~A,~A,~A"); -Clazz.defineMethod (c$, "select", -function (sel, csel) { -this.alignPanel.seqPanel.selection (sel, csel, null); -}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection"); -Clazz.defineMethod (c$, "scrollTo", -function (row, column) { -this.alignPanel.seqPanel.scrollTo (row, column); -}, "~N,~N"); -Clazz.defineMethod (c$, "scrollToRow", -function (row) { -this.alignPanel.seqPanel.scrollToRow (row); -}, "~N"); -Clazz.defineMethod (c$, "scrollToColumn", -function (column) { -this.alignPanel.seqPanel.scrollToColumn (column); -}, "~N"); -Clazz.defineMethod (c$, "getSequenceSetId", -function () { -return this.viewport.getSequenceSetId (); -}); -Clazz.defineMethod (c$, "loadScoreFile", -function (inFile) { -var file = jalview.jsdev.GenericFileAdapter.getFile ("TCoffeeScoreFile", [inFile, jalview.io.AppletFormatAdapter.checkProtocol (inFile)]); -if (!file.isValid ()) { -System.err.println ("Problems parsing T-Coffee scores: " + file.getWarningMessage ()); -System.err.println ("Origin was:\n" + inFile); -return false; -}var aln; -if ((aln = this.viewport.getAlignment ()) != null && (aln.getHeight () != file.getHeight () || aln.getWidth () != file.getWidth ())) { -System.err.println ("The scores matrix does not match the alignment dimensions"); -}if (file.annotateAlignment (this.alignPanel.getAlignment (), false)) { -this.alignPanel.fontChanged (); -this.tcoffeeColour.setEnabled (true); -this.changeColour ( new jalview.schemes.TCoffeeColourScheme (this.alignPanel.getAlignment ())); -return true; -} else { -System.err.println ("Problems resolving T-Coffee scores:"); -if (file.getWarningMessage () != null) { -System.err.println (file.getWarningMessage ()); -}}return false; -}, "~S"); -Clazz.defineMethod (c$, "getSplitFrame", -function () { -return this.splitFrame; -}); -Clazz.defineMethod (c$, "setSplitFrame", -function (sf) { -this.splitFrame = sf; -}, "jalview.appletgui.SplitFrame"); -Clazz.overrideMethod (c$, "setShowSeqFeatures", -function (b) { -this.viewport.setShowSequenceFeatures (b); -}, "~B"); -Clazz.overrideMethod (c$, "setMenusForViewport", -function () { -}); -Clazz.overrideMethod (c$, "refreshFeatureUI", -function (enableIfNecessary) { -if (enableIfNecessary) { -this.sequenceFeatures.setState (true); -this.alignPanel.av.setShowSequenceFeatures (true); -}}, "~B"); -Clazz.overrideMethod (c$, "getFeatureSettingsUI", -function () { -return this.alignPanel.av.featureSettings; -}); -c$.$AlignFrame$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$1", java.awt.event.WindowAdapter); -Clazz.overrideMethod (c$, "windowClosing", -function (e) { -if (this.f$.ap != null) { -this.f$.ap.setOverviewPanel (null); -}}, "java.awt.event.WindowEvent"); -c$ = Clazz.p0p (); -}; -c$.$AlignFrame$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$2", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -this.b$["jalview.appletgui.AlignFrame"].sortByTree (this.f$.treePanel, this.f$.title); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$AlignFrame$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$3", java.awt.event.WindowAdapter); -Clazz.defineMethod (c$, "windowOpened", -function (e) { -if (this.b$["jalview.appletgui.AlignFrame"].viewport.sortByTree) { -this.b$["jalview.appletgui.AlignFrame"].sortByTree (this.f$.treePanel, this.f$.title); -}Clazz.superCall (this, jalview.appletgui.AlignFrame$3, "windowOpened", [e]); -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowClosing", -function (e) { -this.b$["jalview.appletgui.AlignFrame"].sortByTreeMenu.remove (this.f$.item); -}, "java.awt.event.WindowEvent"); -c$ = Clazz.p0p (); -}; -c$.$AlignFrame$1AboutPanel$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.version = null; -this.builddate = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "AlignFrame$1AboutPanel", awt2swing.Canvas); -Clazz.makeConstructor (c$, -function (a, b) { -Clazz.superConstructor (this, jalview.appletgui.AlignFrame$1AboutPanel, []); -this.version = a; -this.builddate = b; -}, "~S,~S"); -Clazz.overrideMethod (c$, "paintComponent", -function (a) { -a.setColor (java.awt.Color.white); -a.fillRect (0, 0, this.getSize ().width, this.getSize ().height); -a.setFont ( new java.awt.Font ("Helvetica", 0, 12)); -var b = a.getFontMetrics (); -var c = b.getHeight (); -var d = 5; -var e = 7; -a.setColor (java.awt.Color.black); -a.setFont ( new java.awt.Font ("Helvetica", 1, 14)); -a.drawString (jalview.util.MessageManager.formatMessage ("label.jalviewLite_release", Clazz.newArray (-1, [this.version])), e, d += c); -a.setFont ( new java.awt.Font ("Helvetica", 1, 12)); -a.drawString (jalview.util.MessageManager.formatMessage ("label.jaview_build_date", Clazz.newArray (-1, [this.builddate])), e, d += c); -a.setFont ( new java.awt.Font ("Helvetica", 0, 12)); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_authors_1"), e, d += c * 1.5); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_authors_2"), e + 50, d += c + 8); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_dev_managers"), e, d += c); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_distribution_lists"), e, d += c); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_please_cite"), e, d += c + 8); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_cite_1_authors"), e, d += c); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_cite_1_title"), e, d += c); -a.drawString (jalview.util.MessageManager.getString ("label.jalview_cite_1_ref"), e, d += c); -}, "java.awt.Graphics"); -c$ = Clazz.p0p (); -}; -c$.$AlignFrame$4$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$4", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.AlignFrame"].outputText_actionPerformed (e); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$AlignFrame$5$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$5", null, java.awt.event.FocusListener); -Clazz.overrideMethod (c$, "focusLost", -function (e) { -if (this.f$.theApplet.currentAlignFrame === this.f$.me) { -this.f$.theApplet.currentAlignFrame = null; -}}, "java.awt.event.FocusEvent"); -Clazz.overrideMethod (c$, "focusGained", -function (e) { -this.f$.theApplet.currentAlignFrame = this.f$.me; -}, "java.awt.event.FocusEvent"); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"copiedSequences", null, -"copiedHiddenColumns", null); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Canvas", "jalview.api.AlignViewControllerGuiI", "jalview.appletgui.EmbmenuFrame", "java.awt.event.ActionListener", "$.ItemListener", "$.KeyListener", "awt2swing.CheckboxMenuItem", "$.Label", "$.Menu", "$.MenuBar", "$.MenuItem", "jalview.util.MessageManager", "java.awt.BorderLayout"], "jalview.appletgui.AlignFrame", ["awt2swing.Frame", "jalview.analysis.AlignmentSorter", "$.AnnotationSorter", "jalview.appletgui.AlignViewport", "$.AlignmentPanel", "$.AnnotationColourChooser", "$.AnnotationColumnChooser", "$.AppletJmol", "$.CutAndPasteTransfer", "$.FeatureSettings", "$.Finder", "$.FontChooser", "$.OverviewPanel", "$.PCAPanel", "$.PaintRefresher", "$.PairwiseAlignPanel", "$.RedundancyPanel", "$.SliderPanel", "$.TreePanel", "$.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.commands.EditCommand", "$.OrderCommand", "$.RemoveGapColCommand", "$.RemoveGapsCommand", "$.SlideSequencesCommand", "$.TrimRegionCommand", "jalview.controller.AlignViewController", "jalview.datamodel.Alignment", "$.PDBEntry", "$.Sequence", "$.SequenceGroup", "jalview.io.AlignmentProperties", "$.AnnotationFile", "$.AppletFormatAdapter", "$.FeaturesFile", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.Blosum62ColourScheme", "$.BuriedColourScheme", "$.ClustalxColourScheme", "$.HelixColourScheme", "$.HydrophobicColourScheme", "$.NucleotideColourScheme", "$.PIDColourScheme", "$.PurinePyrimidineColourScheme", "$.RNAHelicesColourChooser", "$.RNAInteractionColourScheme", "$.StrandColourScheme", "$.TCoffeeColourScheme", "$.TaylorColourScheme", "$.TurnColourScheme", "$.ZappoColourScheme", "jalview.structure.StructureSelectionManager", "jalview.util.Comparison", "$.MappingUtils", "java.awt.Color", "$.Font", "java.awt.event.FocusListener", "$.WindowAdapter", "java.lang.Character", "$.StringBuffer", "java.net.URL", "$.URLEncoder", "java.util.Arrays", "$.HashMap", "$.Hashtable", "$.StringTokenizer", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.avc = null; +this.alignPanel = null; +this.viewport = null; +this.frameWidth = 700; +this.frameHeight = 500; +this.jalviewServletURL = null; +this.showAutoCalculatedAbove = false; +this.annotationSortOrder = null; +this.alignFrameMenuBar = null; +this.fileMenu = null; +this.loadApplication = null; +this.$loadTree = null; +this.$loadAnnotations = null; +this.$outputFeatures = null; +this.$outputAnnotations = null; +this.closeMenuItem = null; +this.selectAllSequenceMenuItem = null; +this.deselectAllSequenceMenuItem = null; +this.invertSequenceMenuItem = null; +this.remove2LeftMenuItem = null; +this.remove2RightMenuItem = null; +this.removeGappedColumnMenuItem = null; +this.removeAllGapsMenuItem = null; +this.viewBoxesMenuItem = null; +this.viewTextMenuItem = null; +this.sortPairwiseMenuItem = null; +this.sortIDMenuItem = null; +this.sortLengthMenuItem = null; +this.sortGroupMenuItem = null; +this.removeRedundancyMenuItem = null; +this.pairwiseAlignmentMenuItem = null; +this.PCAMenuItem = null; +this.averageDistanceTreeMenuItem = null; +this.neighbourTreeMenuItem = null; +this.borderLayout1 = null; +this.statusBar = null; +this.clustalColour = null; +this.zappoColour = null; +this.taylorColour = null; +this.hydrophobicityColour = null; +this.helixColour = null; +this.strandColour = null; +this.turnColour = null; +this.buriedColour = null; +this.purinePyrimidineColour = null; +this.RNAInteractionColour = null; +this.RNAHelixColour = null; +this.userDefinedColour = null; +this.PIDColour = null; +this.BLOSUM62Colour = null; +this.tcoffeeColour = null; +this.njTreeBlosumMenuItem = null; +this.avDistanceTreeBlosumMenuItem = null; +this.annotationPanelMenuItem = null; +this.colourTextMenuItem = null; +this.displayNonconservedMenuItem = null; +this.alProperties = null; +this.overviewMenuItem = null; +this.undoMenuItem = null; +this.redoMenuItem = null; +this.conservationMenuItem = null; +this.noColourmenuItem = null; +this.wrapMenuItem = null; +this.renderGapsMenuItem = null; +this.findMenuItem = null; +this.abovePIDThreshold = null; +this.nucleotideColour = null; +this.deleteGroups = null; +this.grpsFromSelection = null; +this.createGroup = null; +this.unGroup = null; +this.$delete = null; +this.copy = null; +this.cut = null; +this.pasteMenu = null; +this.pasteNew = null; +this.pasteThis = null; +this.applyToAllGroups = null; +this.$font = null; +this.scaleAbove = null; +this.scaleLeft = null; +this.scaleRight = null; +this.modifyPID = null; +this.modifyConservation = null; +this.autoCalculate = null; +this.$sortByTree = null; +this.sortByTreeMenu = null; +this.inputText = null; +this.documentation = null; +this.about = null; +this.seqLimits = null; +this.centreColumnLabelFlag = null; +this.followMouseOverFlag = null; +this.showSequenceLogo = null; +this.applyAutoAnnotationSettings = null; +this.showConsensusHistogram = null; +this.showGroupConsensus = null; +this.showGroupConservation = null; +this.normSequenceLogo = null; +this.featureSettings = null; +this.sequenceFeatures = null; +this.annotationColour = null; +this.annotationColumnSelection = null; +this.invertColSel = null; +this.showColumns = null; +this.showSeqs = null; +this.hideColumns = null; +this.hideSequences = null; +this.hideAllButSelection = null; +this.hideAllSelection = null; +this.showAllHidden = null; +this.$newView = null; +this.showAlignmentAnnotations = null; +this.showSequenceAnnotations = null; +this.sortAnnBySequence = null; +this.sortAnnByLabel = null; +this.showAutoFirst = null; +this.showAutoLast = null; +this.splitFrame = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AlignFrame", jalview.appletgui.EmbmenuFrame, [java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.KeyListener, jalview.api.AlignViewControllerGuiI]); +Clazz.prepareFields (c$, function () { +this.alignFrameMenuBar = new awt2swing.MenuBar (); +this.fileMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.file")); +this.loadApplication = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.view_full_application")); +this.$loadTree = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.load_associated_tree")); +this.$loadAnnotations = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.load_features_annotations")); +this.$outputFeatures = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.export_features").concat ("...")); +this.$outputAnnotations = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.export_annotations").concat ("...")); +this.closeMenuItem = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.close")); +this.selectAllSequenceMenuItem = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.select_all")); +this.deselectAllSequenceMenuItem = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.deselect_all")); +this.invertSequenceMenuItem = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.invert_selection")); +this.remove2LeftMenuItem = new awt2swing.MenuItem (); +this.remove2RightMenuItem = new awt2swing.MenuItem (); +this.removeGappedColumnMenuItem = new awt2swing.MenuItem (); +this.removeAllGapsMenuItem = new awt2swing.MenuItem (); +this.viewBoxesMenuItem = new awt2swing.CheckboxMenuItem (); +this.viewTextMenuItem = new awt2swing.CheckboxMenuItem (); +this.sortPairwiseMenuItem = new awt2swing.MenuItem (); +this.sortIDMenuItem = new awt2swing.MenuItem (); +this.sortLengthMenuItem = new awt2swing.MenuItem (); +this.sortGroupMenuItem = new awt2swing.MenuItem (); +this.removeRedundancyMenuItem = new awt2swing.MenuItem (); +this.pairwiseAlignmentMenuItem = new awt2swing.MenuItem (); +this.PCAMenuItem = new awt2swing.MenuItem (); +this.averageDistanceTreeMenuItem = new awt2swing.MenuItem (); +this.neighbourTreeMenuItem = new awt2swing.MenuItem (); +this.borderLayout1 = new java.awt.BorderLayout (); +this.statusBar = new awt2swing.Label (); +this.clustalColour = new awt2swing.MenuItem (); +this.zappoColour = new awt2swing.MenuItem (); +this.taylorColour = new awt2swing.MenuItem (); +this.hydrophobicityColour = new awt2swing.MenuItem (); +this.helixColour = new awt2swing.MenuItem (); +this.strandColour = new awt2swing.MenuItem (); +this.turnColour = new awt2swing.MenuItem (); +this.buriedColour = new awt2swing.MenuItem (); +this.purinePyrimidineColour = new awt2swing.MenuItem (); +this.RNAInteractionColour = new awt2swing.MenuItem (); +this.RNAHelixColour = new awt2swing.MenuItem (); +this.userDefinedColour = new awt2swing.MenuItem (); +this.PIDColour = new awt2swing.MenuItem (); +this.BLOSUM62Colour = new awt2swing.MenuItem (); +this.tcoffeeColour = new awt2swing.MenuItem (); +this.njTreeBlosumMenuItem = new awt2swing.MenuItem (); +this.avDistanceTreeBlosumMenuItem = new awt2swing.MenuItem (); +this.annotationPanelMenuItem = new awt2swing.CheckboxMenuItem (); +this.colourTextMenuItem = new awt2swing.CheckboxMenuItem (); +this.displayNonconservedMenuItem = new awt2swing.CheckboxMenuItem (); +this.alProperties = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.alignment_props")); +this.overviewMenuItem = new awt2swing.MenuItem (); +this.undoMenuItem = new awt2swing.MenuItem (); +this.redoMenuItem = new awt2swing.MenuItem (); +this.conservationMenuItem = new awt2swing.CheckboxMenuItem (); +this.noColourmenuItem = new awt2swing.MenuItem (); +this.wrapMenuItem = new awt2swing.CheckboxMenuItem (); +this.renderGapsMenuItem = new awt2swing.CheckboxMenuItem (); +this.findMenuItem = new awt2swing.MenuItem (); +this.abovePIDThreshold = new awt2swing.CheckboxMenuItem (); +this.nucleotideColour = new awt2swing.MenuItem (); +this.deleteGroups = new awt2swing.MenuItem (); +this.grpsFromSelection = new awt2swing.MenuItem (); +this.createGroup = new awt2swing.MenuItem (); +this.unGroup = new awt2swing.MenuItem (); +this.$delete = new awt2swing.MenuItem (); +this.copy = new awt2swing.MenuItem (); +this.cut = new awt2swing.MenuItem (); +this.pasteMenu = new awt2swing.Menu (); +this.pasteNew = new awt2swing.MenuItem (); +this.pasteThis = new awt2swing.MenuItem (); +this.applyToAllGroups = new awt2swing.CheckboxMenuItem (); +this.$font = new awt2swing.MenuItem (); +this.scaleAbove = new awt2swing.CheckboxMenuItem (); +this.scaleLeft = new awt2swing.CheckboxMenuItem (); +this.scaleRight = new awt2swing.CheckboxMenuItem (); +this.modifyPID = new awt2swing.MenuItem (); +this.modifyConservation = new awt2swing.MenuItem (); +this.$sortByTree = new awt2swing.CheckboxMenuItem ("Sort Alignment With New Tree", true); +this.sortByTreeMenu = new awt2swing.Menu (); +this.inputText = new awt2swing.MenuItem (); +this.documentation = new awt2swing.MenuItem (); +this.about = new awt2swing.MenuItem (); +this.seqLimits = new awt2swing.CheckboxMenuItem (); +this.centreColumnLabelFlag = new awt2swing.CheckboxMenuItem (); +this.followMouseOverFlag = new awt2swing.CheckboxMenuItem (); +this.showSequenceLogo = new awt2swing.CheckboxMenuItem (); +this.applyAutoAnnotationSettings = new awt2swing.CheckboxMenuItem (); +this.showConsensusHistogram = new awt2swing.CheckboxMenuItem (); +this.showGroupConsensus = new awt2swing.CheckboxMenuItem (); +this.showGroupConservation = new awt2swing.CheckboxMenuItem (); +this.normSequenceLogo = new awt2swing.CheckboxMenuItem (); +this.featureSettings = new awt2swing.MenuItem (); +this.sequenceFeatures = new awt2swing.CheckboxMenuItem (); +this.annotationColour = new awt2swing.MenuItem (); +this.annotationColumnSelection = new awt2swing.MenuItem (); +this.invertColSel = new awt2swing.MenuItem (); +this.showColumns = new awt2swing.MenuItem (); +this.showSeqs = new awt2swing.MenuItem (); +this.hideColumns = new awt2swing.MenuItem (); +this.hideSequences = new awt2swing.MenuItem (); +this.hideAllButSelection = new awt2swing.MenuItem (); +this.hideAllSelection = new awt2swing.MenuItem (); +this.showAllHidden = new awt2swing.MenuItem (); +this.$newView = new awt2swing.MenuItem (); +}); +Clazz.makeConstructor (c$, +function (al, applet, title, embedded) { +this.construct (al, applet, title, embedded, true); +}, "jalview.datamodel.AlignmentI,jalview.bin.JalviewLite,~S,~B"); +Clazz.makeConstructor (c$, +function (al, applet, title, embedded, addToDisplay) { +this.construct (al, null, null, applet, title, embedded, addToDisplay); +}, "jalview.datamodel.AlignmentI,jalview.bin.JalviewLite,~S,~B,~B"); +Clazz.makeConstructor (c$, +function (al, hiddenSeqs, columnSelection, applet, title, embedded) { +this.construct (al, hiddenSeqs, columnSelection, applet, title, embedded, true); +}, "jalview.datamodel.AlignmentI,~A,jalview.datamodel.ColumnSelection,jalview.bin.JalviewLite,~S,~B"); +Clazz.makeConstructor (c$, +function (al, hiddenSeqs, columnSelection, applet, title, embedded, addToDisplay) { +Clazz.superConstructor (this, jalview.appletgui.AlignFrame, []); +if (applet != null) { +this.jalviewServletURL = applet.jalviewServletURL; +}try { +this.jbInit (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +if (applet != null) { +var param; +try { +param = applet.windowWidth; +if (param != null) { +var width = Integer.parseInt (param); +this.frameWidth = width; +}param = applet.windowHeight; +if (param != null) { +var height = Integer.parseInt (param); +this.frameHeight = height; +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +}this.viewport = new jalview.appletgui.AlignViewport (al, applet); +if (hiddenSeqs != null && hiddenSeqs.length > 0) { +this.viewport.hideSequence (hiddenSeqs); +}if (columnSelection != null) { +this.viewport.setColumnSelection (columnSelection); +}this.alignPanel = new jalview.appletgui.AlignmentPanel (this, this.viewport); +this.avc = new jalview.controller.AlignViewController (this, this.viewport, this.alignPanel); +this.viewport.updateConservation (this.alignPanel); +this.viewport.updateConsensus (this.alignPanel); +this.displayNonconservedMenuItem.setState (this.viewport.getShowUnconserved ()); +this.followMouseOverFlag.setState (this.viewport.isFollowHighlight ()); +this.showGroupConsensus.setState (this.viewport.isShowGroupConsensus ()); +this.showGroupConservation.setState (this.viewport.isShowGroupConservation ()); +this.showConsensusHistogram.setState (this.viewport.isShowConsensusHistogram ()); +this.showSequenceLogo.setState (this.viewport.isShowSequenceLogo ()); +this.normSequenceLogo.setState (this.viewport.isNormaliseSequenceLogo ()); +this.applyToAllGroups.setState (this.viewport.getColourAppliesToAllGroups ()); +this.annotationPanelMenuItem.setState (this.viewport.isShowAnnotation ()); +this.showAlignmentAnnotations.setState (this.viewport.isShowAnnotation ()); +this.showSequenceAnnotations.setState (this.viewport.isShowAnnotation ()); +this.seqLimits.setState (this.viewport.getShowJVSuffix ()); +if (applet != null) { +var param = applet.sortBy; +if (param != null) { +if (param.equalsIgnoreCase ("Id")) { +this.sortIDMenuItem_actionPerformed (); +} else if (param.equalsIgnoreCase ("Pairwise Identity")) { +this.sortPairwiseMenuItem_actionPerformed (); +} else if (param.equalsIgnoreCase ("Length")) { +this.sortLengthMenuItem_actionPerformed (); +}}param = applet.wrap; +if (param != null) { +if (param.equalsIgnoreCase ("true")) { +this.wrapMenuItem.setState (true); +this.wrapMenuItem_actionPerformed (); +}}param = applet.centrecolumnlabels; +if (param != null) { +this.centreColumnLabelFlag.setState (true); +this.centreColumnLabelFlag_stateChanged (); +}}if (this.viewport.getAlignment ().isNucleotide ()) { +this.viewport.updateStrucConsensus (this.alignPanel); +if (this.viewport.getAlignment ().hasRNAStructure ()) { +this.RNAHelixColour.setEnabled (true); +} else { +this.RNAHelixColour.setEnabled (false); +}} else { +this.RNAHelixColour.setEnabled (false); +this.purinePyrimidineColour.setEnabled (false); +}this.addKeyListener (this); +this.alignPanel.seqPanel.seqCanvas.addKeyListener (this); +this.alignPanel.idPanel.idCanvas.addKeyListener (this); +this.alignPanel.scalePanel.addKeyListener (this); +this.alignPanel.annotationPanel.addKeyListener (this); +this.alignPanel.annotationPanelHolder.addKeyListener (this); +this.alignPanel.annotationSpaceFillerHolder.addKeyListener (this); +this.alignPanel.alabels.addKeyListener (this); +if (addToDisplay) { +this.addToDisplay (embedded); +}}, "jalview.datamodel.AlignmentI,~A,jalview.datamodel.ColumnSelection,jalview.bin.JalviewLite,~S,~B,~B"); +Clazz.defineMethod (c$, "addToDisplay", +function (embedded) { +this.createAlignFrameWindow (embedded); +this.validate (); +this.alignPanel.adjustAnnotationHeight (); +this.alignPanel.paintAlignment (true); +}, "~B"); +Clazz.defineMethod (c$, "getAlignViewport", +function () { +return this.viewport; +}); +Clazz.defineMethod (c$, "getSeqcanvas", +function () { +return this.alignPanel.seqPanel.seqCanvas; +}); +Clazz.defineMethod (c$, "parseFeaturesFile", +function (file, type) { +return this.parseFeaturesFile (file, type, true); +}, "~S,~S"); +Clazz.defineMethod (c$, "parseFeaturesFile", +function (file, type, autoenabledisplay) { +var featureLinks = new java.util.Hashtable (); +var featuresFile = false; +try { +featuresFile = new jalview.io.FeaturesFile (file, type).parse (this.viewport.getAlignment (), this.alignPanel.seqPanel.seqCanvas.getFeatureRenderer ().getFeatureColours (), featureLinks, true, this.viewport.applet.getDefaultParameter ("relaxedidmatch", false)); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +if (featuresFile) { +if (featureLinks.size () > 0) { +this.alignPanel.seqPanel.seqCanvas.getFeatureRenderer ().featureLinks = featureLinks; +}if (autoenabledisplay) { +this.viewport.setShowSequenceFeatures (true); +this.sequenceFeatures.setState (true); +}if (this.alignPanel.seqPanel.seqCanvas.fr != null) { +this.alignPanel.seqPanel.seqCanvas.fr.findAllFeatures (true); +}if (this.viewport.featureSettings != null) { +this.viewport.featureSettings.refreshTable (); +}this.alignPanel.paintAlignment (true); +this.setStatus (jalview.util.MessageManager.getString ("label.successfully_added_features_alignment")); +}return featuresFile; +}, "~S,~S,~B"); +Clazz.overrideMethod (c$, "keyPressed", +function (evt) { +if (this.viewport.cursorMode && ((evt.getKeyCode () >= 48 && evt.getKeyCode () <= 57) || (evt.getKeyCode () >= 96 && evt.getKeyCode () <= 105)) && Character.isDigit (evt.getKeyChar ())) { +this.alignPanel.seqPanel.numberPressed (evt.getKeyChar ()); +}switch (evt.getKeyCode ()) { +case 27: +this.deselectAllSequenceMenuItem_actionPerformed (); +this.alignPanel.alabels.cancelDrag (); +break; +case 88: +if (evt.isControlDown () || evt.isMetaDown ()) { +this.cut_actionPerformed (); +}break; +case 67: +if (this.viewport.cursorMode && !evt.isControlDown ()) { +this.alignPanel.seqPanel.setCursorColumn (); +}if (evt.isControlDown () || evt.isMetaDown ()) { +this.copy_actionPerformed (); +}break; +case 86: +if (evt.isControlDown ()) { +this.paste (evt.isShiftDown ()); +}break; +case 65: +if (evt.isControlDown () || evt.isMetaDown ()) { +this.selectAllSequenceMenuItem_actionPerformed (); +}break; +case 40: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.moveCursor (0, 1); +} else { +this.moveSelectedSequences (false); +}break; +case 38: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.moveCursor (0, -1); +} else { +this.moveSelectedSequences (true); +}break; +case 37: +if (evt.isAltDown () || !this.viewport.cursorMode) { +this.slideSequences (false, this.alignPanel.seqPanel.getKeyboardNo1 ()); +} else { +this.alignPanel.seqPanel.moveCursor (-1, 0); +}break; +case 39: +if (evt.isAltDown () || !this.viewport.cursorMode) { +this.slideSequences (true, this.alignPanel.seqPanel.getKeyboardNo1 ()); +} else { +this.alignPanel.seqPanel.moveCursor (1, 0); +}break; +case 32: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.insertGapAtCursor (evt.isControlDown () || evt.isShiftDown () || evt.isAltDown ()); +}break; +case 127: +case 8: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.deleteGapAtCursor (evt.isControlDown () || evt.isShiftDown () || evt.isAltDown ()); +} else { +this.cut_actionPerformed (); +this.alignPanel.seqPanel.seqCanvas.repaint (); +}break; +case 83: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.setCursorRow (); +}break; +case 80: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.setCursorPosition (); +}break; +case 10: +case 44: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.setCursorRowAndColumn (); +}break; +case 81: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.setSelectionAreaAtCursor (true); +}break; +case 77: +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.setSelectionAreaAtCursor (false); +}break; +case 113: +this.viewport.cursorMode = !this.viewport.cursorMode; +this.setStatus (jalview.util.MessageManager.formatMessage ("label.keyboard_editing_mode", Clazz.newArray (-1, [(this.viewport.cursorMode ? "on" : "off")]))); +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.seqCanvas.cursorX = this.viewport.startRes; +this.alignPanel.seqPanel.seqCanvas.cursorY = this.viewport.startSeq; +}break; +case 70: +if (evt.isControlDown ()) { +this.findMenuItem_actionPerformed (); +}break; +case 72: +{ +var toggleSeqs = !evt.isControlDown (); +var toggleCols = !evt.isShiftDown (); +this.toggleHiddenRegions (toggleSeqs, toggleCols); +break; +}case 33: +if (this.viewport.getWrapAlignment ()) { +this.alignPanel.scrollUp (true); +} else { +this.alignPanel.setScrollValues (this.viewport.startRes, this.viewport.startSeq - this.viewport.endSeq + this.viewport.startSeq); +}break; +case 34: +if (this.viewport.getWrapAlignment ()) { +this.alignPanel.scrollUp (false); +} else { +this.alignPanel.setScrollValues (this.viewport.startRes, this.viewport.startSeq + this.viewport.endSeq - this.viewport.startSeq); +}break; +case 90: +if (evt.isControlDown ()) { +this.undoMenuItem_actionPerformed (); +}break; +case 89: +if (evt.isControlDown ()) { +this.redoMenuItem_actionPerformed (); +}break; +case 76: +if (evt.isControlDown ()) { +this.trimAlignment (true); +}break; +case 82: +if (evt.isControlDown ()) { +this.trimAlignment (false); +}break; +case 69: +if (evt.isControlDown ()) { +if (evt.isShiftDown ()) { +this.removeAllGapsMenuItem_actionPerformed (); +} else { +this.removeGappedColumnMenuItem_actionPerformed (); +}}break; +case 73: +if (evt.isControlDown ()) { +if (evt.isAltDown ()) { +this.invertColSel_actionPerformed (); +} else { +this.invertSequenceMenuItem_actionPerformed (); +}}break; +case 71: +if (evt.isControlDown ()) { +if (evt.isShiftDown ()) { +this.unGroup_actionPerformed (); +} else { +this.createGroup_actionPerformed (); +}}break; +case 85: +if (evt.isControlDown ()) { +this.deleteGroups_actionPerformed (); +}break; +case 84: +if (evt.isControlDown ()) { +this.newView (null); +}break; +} +this.alignPanel.paintAlignment (true); +}, "java.awt.event.KeyEvent"); +Clazz.defineMethod (c$, "toggleHiddenRegions", +($fz = function (toggleSeqs, toggleCols) { +var hide = false; +var sg = this.viewport.getSelectionGroup (); +if (!toggleSeqs && !toggleCols) { +if ((this.viewport.getColumnSelection () != null && this.viewport.getColumnSelection ().getSelected () != null && this.viewport.getColumnSelection ().getSelected ().size () > 0) || (sg != null && sg.getSize () > 0 && sg.getStartRes () <= sg.getEndRes ())) { +if (sg != null) { +this.invertSequenceMenuItem_actionPerformed (); +sg = this.viewport.getSelectionGroup (); +toggleSeqs = true; +}this.viewport.expandColSelection (sg, true); +this.invertColSel_actionPerformed (); +toggleCols = true; +}}if (toggleSeqs) { +if (sg != null && sg.getSize () != this.viewport.getAlignment ().getHeight ()) { +hide = true; +this.viewport.hideAllSelectedSeqs (); +} else if (!(toggleCols && this.viewport.getColumnSelection ().getSelected ().size () > 0)) { +this.viewport.showAllHiddenSeqs (); +}}if (toggleCols) { +if (this.viewport.getColumnSelection ().getSelected ().size () > 0) { +this.viewport.hideSelectedColumns (); +if (!toggleSeqs) { +this.viewport.setSelectionGroup (sg); +}} else if (!hide) { +this.viewport.showAllHiddenColumns (); +}}}, $fz.isPrivate = true, $fz), "~B,~B"); +Clazz.overrideMethod (c$, "keyReleased", +function (evt) { +}, "java.awt.event.KeyEvent"); +Clazz.overrideMethod (c$, "keyTyped", +function (evt) { +}, "java.awt.event.KeyEvent"); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +var source = evt.getSource (); +if (source === this.displayNonconservedMenuItem) { +this.displayNonconservedMenuItem_actionPerformed (); +} else if (source === this.colourTextMenuItem) { +this.colourTextMenuItem_actionPerformed (); +} else if (source === this.wrapMenuItem) { +this.wrapMenuItem_actionPerformed (); +} else if (source === this.scaleAbove) { +this.viewport.setScaleAboveWrapped (this.scaleAbove.getState ()); +} else if (source === this.scaleLeft) { +this.viewport.setScaleLeftWrapped (this.scaleLeft.getState ()); +} else if (source === this.scaleRight) { +this.viewport.setScaleRightWrapped (this.scaleRight.getState ()); +} else if (source === this.seqLimits) { +this.seqLimits_itemStateChanged (); +} else if (source === this.viewBoxesMenuItem) { +this.viewport.setShowBoxes (this.viewBoxesMenuItem.getState ()); +} else if (source === this.viewTextMenuItem) { +this.viewport.setShowText (this.viewTextMenuItem.getState ()); +} else if (source === this.renderGapsMenuItem) { +this.viewport.setRenderGaps (this.renderGapsMenuItem.getState ()); +} else if (source === this.annotationPanelMenuItem) { +this.viewport.setShowAnnotation (this.annotationPanelMenuItem.getState ()); +this.alignPanel.setAnnotationVisible (this.annotationPanelMenuItem.getState ()); +} else if (source === this.sequenceFeatures) { +this.viewport.setShowSequenceFeatures (this.sequenceFeatures.getState ()); +this.alignPanel.seqPanel.seqCanvas.repaint (); +} else if (source === this.showAlignmentAnnotations) { +this.setAnnotationsVisibility (); +} else if (source === this.showSequenceAnnotations) { +this.setAnnotationsVisibility (); +} else if (source === this.sortAnnBySequence) { +var newState = this.sortAnnBySequence.getState (); +this.sortAnnByLabel.setState (false); +this.setAnnotationSortOrder (newState ? jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.SEQUENCE_AND_LABEL : jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.NONE); +this.setViewportAnnotationOrder (); +} else if (source === this.sortAnnByLabel) { +var newState = this.sortAnnByLabel.getState (); +this.sortAnnBySequence.setState (false); +this.setAnnotationSortOrder (newState ? jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.LABEL_AND_SEQUENCE : jalview.analysis.AnnotationSorter.SequenceAnnotationOrder.NONE); +this.setViewportAnnotationOrder (); +} else if (source === this.showAutoFirst) { +this.showAutoLast.setState (!this.showAutoFirst.getState ()); +this.setShowAutoCalculatedAbove (this.showAutoFirst.getState ()); +this.setViewportAnnotationOrder (); +} else if (source === this.showAutoLast) { +this.showAutoFirst.setState (!this.showAutoLast.getState ()); +this.setShowAutoCalculatedAbove (this.showAutoFirst.getState ()); +this.setViewportAnnotationOrder (); +} else if (source === this.conservationMenuItem) { +this.conservationMenuItem_actionPerformed (); +} else if (source === this.abovePIDThreshold) { +this.abovePIDThreshold_actionPerformed (); +} else if (source === this.applyToAllGroups) { +this.viewport.setColourAppliesToAllGroups (this.applyToAllGroups.getState ()); +} else if (source === this.autoCalculate) { +this.viewport.autoCalculateConsensus = this.autoCalculate.getState (); +} else if (source === this.$sortByTree) { +this.viewport.sortByTree = this.$sortByTree.getState (); +} else if (source === this.centreColumnLabelFlag) { +this.centreColumnLabelFlag_stateChanged (); +} else if (source === this.followMouseOverFlag) { +this.mouseOverFlag_stateChanged (); +} else if (source === this.showGroupConsensus) { +this.showGroupConsensus_actionPerformed (); +} else if (source === this.showGroupConservation) { +this.showGroupConservation_actionPerformed (); +} else if (source === this.showSequenceLogo) { +this.showSequenceLogo_actionPerformed (); +} else if (source === this.normSequenceLogo) { +this.normSequenceLogo_actionPerformed (); +} else if (source === this.showConsensusHistogram) { +this.showConsensusHistogram_actionPerformed (); +} else if (source === this.applyAutoAnnotationSettings) { +this.applyAutoAnnotationSettings_actionPerformed (); +}this.alignPanel.paintAlignment (true); +}, "java.awt.event.ItemEvent"); +Clazz.defineMethod (c$, "setAnnotationsVisibility", +($fz = function () { +var showForAlignment = this.showAlignmentAnnotations.getState (); +var showForSequences = this.showSequenceAnnotations.getState (); +for (var aa, $aa = 0, $$aa = this.alignPanel.getAlignment ().getAlignmentAnnotation (); $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { +var visible = (aa.sequenceRef == null ? showForAlignment : showForSequences); +aa.visible = visible; +} +this.alignPanel.validateAnnotationDimensions (true); +this.validate (); +this.repaint (); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "setAnnotationSortOrder", +($fz = function (order) { +this.annotationSortOrder = order; +}, $fz.isPrivate = true, $fz), "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); +Clazz.defineMethod (c$, "setViewportAnnotationOrder", +($fz = function () { +this.alignPanel.av.setSortAnnotationsBy (this.annotationSortOrder); +this.alignPanel.av.setShowAutocalculatedAbove (this.showAutoCalculatedAbove); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "setShowAutoCalculatedAbove", +($fz = function (showAbove) { +this.showAutoCalculatedAbove = showAbove; +}, $fz.isPrivate = true, $fz), "~B"); +Clazz.defineMethod (c$, "mouseOverFlag_stateChanged", +($fz = function () { +this.viewport.setFollowHighlight (this.followMouseOverFlag.getState ()); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "centreColumnLabelFlag_stateChanged", +($fz = function () { +this.viewport.centreColumnLabels = this.centreColumnLabelFlag.getState (); +this.alignPanel.annotationPanel.repaint (); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +var source = evt.getSource (); +if (source === this.inputText) { +this.inputText_actionPerformed (); +} else if (source === this.$loadTree) { +this.loadTree_actionPerformed (); +} else if (source === this.loadApplication) { +this.launchFullApplication (); +} else if (source === this.$loadAnnotations) { +this.loadAnnotations (); +} else if (source === this.$outputAnnotations) { +this.outputAnnotations (true); +} else if (source === this.$outputFeatures) { +this.outputFeatures (true, "Jalview"); +} else if (source === this.closeMenuItem) { +this.closeMenuItem_actionPerformed (); +} else if (source === this.copy) { +this.copy_actionPerformed (); +} else if (source === this.undoMenuItem) { +this.undoMenuItem_actionPerformed (); +} else if (source === this.redoMenuItem) { +this.redoMenuItem_actionPerformed (); +} else if (source === this.inputText) { +this.inputText_actionPerformed (); +} else if (source === this.closeMenuItem) { +this.closeMenuItem_actionPerformed (); +} else if (source === this.undoMenuItem) { +this.undoMenuItem_actionPerformed (); +} else if (source === this.redoMenuItem) { +this.redoMenuItem_actionPerformed (); +} else if (source === this.copy) { +this.copy_actionPerformed (); +} else if (source === this.pasteNew) { +this.pasteNew_actionPerformed (); +} else if (source === this.pasteThis) { +this.pasteThis_actionPerformed (); +} else if (source === this.cut) { +this.cut_actionPerformed (); +} else if (source === this.$delete) { +this.delete_actionPerformed (); +} else if (source === this.grpsFromSelection) { +this.makeGrpsFromSelection_actionPerformed (); +} else if (source === this.deleteGroups) { +this.deleteGroups_actionPerformed (); +} else if (source === this.selectAllSequenceMenuItem) { +this.selectAllSequenceMenuItem_actionPerformed (); +} else if (source === this.deselectAllSequenceMenuItem) { +this.deselectAllSequenceMenuItem_actionPerformed (); +} else if (source === this.invertSequenceMenuItem) { +this.invertSequenceMenuItem_actionPerformed (); +} else if (source === this.invertColSel) { +this.viewport.invertColumnSelection (); +this.alignPanel.paintAlignment (true); +} else if (source === this.remove2LeftMenuItem) { +this.trimAlignment (true); +} else if (source === this.remove2RightMenuItem) { +this.trimAlignment (false); +} else if (source === this.removeGappedColumnMenuItem) { +this.removeGappedColumnMenuItem_actionPerformed (); +} else if (source === this.removeAllGapsMenuItem) { +this.removeAllGapsMenuItem_actionPerformed (); +} else if (source === this.findMenuItem) { +this.findMenuItem_actionPerformed (); +} else if (source === this.$font) { + new jalview.appletgui.FontChooser (this.alignPanel); +} else if (source === this.$newView) { +this.newView (null); +} else if (source === this.showColumns) { +this.viewport.showAllHiddenColumns (); +this.alignPanel.paintAlignment (true); +} else if (source === this.showSeqs) { +this.viewport.showAllHiddenSeqs (); +this.alignPanel.paintAlignment (true); +} else if (source === this.hideColumns) { +this.viewport.hideSelectedColumns (); +this.alignPanel.paintAlignment (true); +} else if (source === this.hideSequences && this.viewport.getSelectionGroup () != null) { +this.viewport.hideAllSelectedSeqs (); +this.alignPanel.paintAlignment (true); +} else if (source === this.hideAllButSelection) { +this.toggleHiddenRegions (false, false); +this.alignPanel.paintAlignment (true); +} else if (source === this.hideAllSelection) { +var sg = this.viewport.getSelectionGroup (); +this.viewport.expandColSelection (sg, false); +this.viewport.hideAllSelectedSeqs (); +this.viewport.hideSelectedColumns (); +this.alignPanel.paintAlignment (true); +} else if (source === this.showAllHidden) { +this.viewport.showAllHiddenColumns (); +this.viewport.showAllHiddenSeqs (); +this.alignPanel.paintAlignment (true); +} else if (source === this.showGroupConsensus) { +this.showGroupConsensus_actionPerformed (); +} else if (source === this.showGroupConservation) { +this.showGroupConservation_actionPerformed (); +} else if (source === this.showSequenceLogo) { +this.showSequenceLogo_actionPerformed (); +} else if (source === this.normSequenceLogo) { +this.normSequenceLogo_actionPerformed (); +} else if (source === this.showConsensusHistogram) { +this.showConsensusHistogram_actionPerformed (); +} else if (source === this.applyAutoAnnotationSettings) { +this.applyAutoAnnotationSettings_actionPerformed (); +} else if (source === this.featureSettings) { + new jalview.appletgui.FeatureSettings (this.alignPanel); +} else if (source === this.alProperties) { +var contents = new jalview.io.AlignmentProperties (this.viewport.getAlignment ()).formatAsString (); +var cap = new jalview.appletgui.CutAndPasteTransfer (false, this); +cap.setText (contents.toString ()); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.alignment_properties", Clazz.newArray (-1, [this.getTitle ()])), 400, 250); +} else if (source === this.overviewMenuItem) { +this.overviewMenuItem_actionPerformed (); +} else if (source === this.noColourmenuItem) { +this.changeColour (null); +} else if (source === this.clustalColour) { +this.abovePIDThreshold.setState (false); +this.changeColour ( new jalview.schemes.ClustalxColourScheme (this.viewport.getAlignment (), null)); +} else if (source === this.zappoColour) { +this.changeColour ( new jalview.schemes.ZappoColourScheme ()); +} else if (source === this.taylorColour) { +this.changeColour ( new jalview.schemes.TaylorColourScheme ()); +} else if (source === this.hydrophobicityColour) { +this.changeColour ( new jalview.schemes.HydrophobicColourScheme ()); +} else if (source === this.helixColour) { +this.changeColour ( new jalview.schemes.HelixColourScheme ()); +} else if (source === this.strandColour) { +this.changeColour ( new jalview.schemes.StrandColourScheme ()); +} else if (source === this.turnColour) { +this.changeColour ( new jalview.schemes.TurnColourScheme ()); +} else if (source === this.buriedColour) { +this.changeColour ( new jalview.schemes.BuriedColourScheme ()); +} else if (source === this.nucleotideColour) { +this.changeColour ( new jalview.schemes.NucleotideColourScheme ()); +} else if (source === this.purinePyrimidineColour) { +this.changeColour ( new jalview.schemes.PurinePyrimidineColourScheme ()); +} else if (source === this.RNAInteractionColour) { +this.changeColour ( new jalview.schemes.RNAInteractionColourScheme ()); +} else if (source === this.RNAHelixColour) { + new jalview.schemes.RNAHelicesColourChooser (this.viewport, this.alignPanel); +} else if (source === this.modifyPID) { +this.modifyPID_actionPerformed (); +} else if (source === this.modifyConservation) { +this.modifyConservation_actionPerformed (); +} else if (source === this.userDefinedColour) { + new jalview.appletgui.UserDefinedColours (this.alignPanel, null); +} else if (source === this.PIDColour) { +this.changeColour ( new jalview.schemes.PIDColourScheme ()); +} else if (source === this.BLOSUM62Colour) { +this.changeColour ( new jalview.schemes.Blosum62ColourScheme ()); +} else if (source === this.tcoffeeColour) { +this.changeColour ( new jalview.schemes.TCoffeeColourScheme (this.alignPanel.getAlignment ())); +} else if (source === this.annotationColour) { + new jalview.appletgui.AnnotationColourChooser (this.viewport, this.alignPanel); +} else if (source === this.annotationColumnSelection) { + new jalview.appletgui.AnnotationColumnChooser (this.viewport, this.alignPanel); +} else if (source === this.sortPairwiseMenuItem) { +this.sortPairwiseMenuItem_actionPerformed (); +} else if (source === this.sortIDMenuItem) { +this.sortIDMenuItem_actionPerformed (); +} else if (source === this.sortLengthMenuItem) { +this.sortLengthMenuItem_actionPerformed (); +} else if (source === this.sortGroupMenuItem) { +this.sortGroupMenuItem_actionPerformed (); +} else if (source === this.removeRedundancyMenuItem) { +this.removeRedundancyMenuItem_actionPerformed (); +} else if (source === this.pairwiseAlignmentMenuItem) { +this.pairwiseAlignmentMenuItem_actionPerformed (); +} else if (source === this.PCAMenuItem) { +this.PCAMenuItem_actionPerformed (); +} else if (source === this.averageDistanceTreeMenuItem) { +this.averageDistanceTreeMenuItem_actionPerformed (); +} else if (source === this.neighbourTreeMenuItem) { +this.neighbourTreeMenuItem_actionPerformed (); +} else if (source === this.njTreeBlosumMenuItem) { +this.njTreeBlosumMenuItem_actionPerformed (); +} else if (source === this.avDistanceTreeBlosumMenuItem) { +this.avTreeBlosumMenuItem_actionPerformed (); +} else if (source === this.documentation) { +this.documentation_actionPerformed (); +} else if (source === this.about) { +this.about_actionPerformed (); +}}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "inputText_actionPerformed", +function () { +var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.input_cut_paste"), 500, 500); +}); +Clazz.defineMethod (c$, "outputText_actionPerformed", +function (e) { +var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.alignment_output_command", Clazz.newArray (-1, [e.getActionCommand ()])), 600, 500); +var fr = this.alignPanel.cloneFeatureRenderer (); +cap.setText ( new jalview.io.AppletFormatAdapter (this.alignPanel).formatSequences (e.getActionCommand (), this.viewport.getAlignment (), this.viewport.getShowJVSuffix ())); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "loadAnnotations", +function () { +var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); +cap.setText (jalview.util.MessageManager.getString ("label.paste_features_annotations_Tcoffee_here")); +cap.setAnnotationImport (); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("action.paste_annotations"), 400, 300); +}); +Clazz.defineMethod (c$, "outputAnnotations", +function (displayTextbox) { +var annotation = new jalview.io.AnnotationFile ().printAnnotationsForView (this.viewport); +if (displayTextbox) { +var cap = new jalview.appletgui.CutAndPasteTransfer (false, this); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.annotations"), 600, 500); +cap.setText (annotation); +}return annotation; +}, "~B"); +Clazz.defineMethod (c$, "getDisplayedFeatureCols", +($fz = function () { +if (this.alignPanel.getFeatureRenderer () != null && this.viewport.getFeaturesDisplayed () != null) { +return this.alignPanel.getFeatureRenderer ().getDisplayedFeatureCols (); +}return null; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "outputFeatures", +function (displayTextbox, format) { +var features; +if (format.equalsIgnoreCase ("Jalview")) { +features = new jalview.io.FeaturesFile ().printJalviewFormat (this.viewport.getAlignment ().getSequencesArray (), this.getDisplayedFeatureCols ()); +} else { +features = new jalview.io.FeaturesFile ().printGFFFormat (this.viewport.getAlignment ().getSequencesArray (), this.getDisplayedFeatureCols ()); +}if (displayTextbox) { +var frimport = false; +if (features == null || features.equals ("No Features Visible")) { +features = "# No features visible - paste some and import them here."; +frimport = true; +}var cap = new jalview.appletgui.CutAndPasteTransfer (frimport, this); +if (frimport) { +cap.setAnnotationImport (); +}var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.features"), 600, 500); +cap.setText (features); +} else { +if (features == null) { +features = ""; +}}return features; +}, "~B,~S"); +Clazz.defineMethod (c$, "launchFullApplication", +function () { +var url = new StringBuffer (this.jalviewServletURL); +var firstSep = url.lastIndexOf ("?") > url.lastIndexOf ("/") ? "&" : "?"; +url.append (firstSep); +var applet = this.viewport.applet; +var s = applet.startupFile; +url.append ("open=" + this.appendProtocol (s)); +if (this.viewport.applet.features != null) { +url.append ("&features="); +url.append (this.appendProtocol (applet.features)); +}if (applet.annotations != null) { +url.append ("&annotations="); +url.append (this.appendProtocol (applet.annotations)); +}if (applet.jnetFile != null) { +url.append ("&annotations="); +url.append (this.appendProtocol (applet.jnetFile)); +}if (applet.defaultColour != null) { +url.append ("&colour=" + this.removeWhiteSpace (applet.defaultColour)); +}if (applet.userDefinedColour != null) { +url.append ("&colour=" + this.removeWhiteSpace (applet.userDefinedColour)); +}if (applet.treeFile != null) { +url.append ("&tree=" + this.appendProtocol (applet.treeFile)); +}this.showURL (url.toString (), "FULL_APP"); +}); +Clazz.defineMethod (c$, "removeWhiteSpace", +function (colour) { +var sb = new StringBuffer (); +for (var i = 0; i < colour.length; i++) { +if (Character.isWhitespace (colour.charAt (i))) { +sb.append ("%20"); +} else { +sb.append (colour.charAt (i)); +}} +return sb.toString (); +}, "~S"); +Clazz.defineMethod (c$, "appendProtocol", +function (url) { +try { + new java.net.URL (url); +url = java.net.URLEncoder.encode (url); +} catch (ex) { +if (Clazz.exceptionOf (ex, java.net.MalformedURLException)) { +url = this.viewport.applet.getCodeBase () + url; +} else { +throw ex; +} +} +return url; +}, "~S"); +Clazz.defineMethod (c$, "closeMenuItem_actionPerformed", +function () { +jalview.appletgui.PaintRefresher.RemoveComponent (this.alignPanel); +if (this.alignPanel.seqPanel != null && this.alignPanel.seqPanel.seqCanvas != null) { +jalview.appletgui.PaintRefresher.RemoveComponent (this.alignPanel.seqPanel.seqCanvas); +}if (this.alignPanel.idPanel != null && this.alignPanel.idPanel.idCanvas != null) { +jalview.appletgui.PaintRefresher.RemoveComponent (this.alignPanel.idPanel.idCanvas); +}if (jalview.appletgui.PaintRefresher.components.size () == 0 && this.viewport.applet == null) { +System.exit (0); +} else { +}this.viewport = null; +this.alignPanel = null; +this.dispose (); +}); +Clazz.defineMethod (c$, "updateEditMenuBar", +function () { +if (this.viewport.getHistoryList ().size () > 0) { +this.undoMenuItem.setEnabled (true); +var command = this.viewport.getHistoryList ().peek (); +this.undoMenuItem.setLabel (jalview.util.MessageManager.formatMessage ("label.undo_command", Clazz.newArray (-1, [command.getDescription ()]))); +} else { +this.undoMenuItem.setEnabled (false); +this.undoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.undo")); +}if (this.viewport.getRedoList ().size () > 0) { +this.redoMenuItem.setEnabled (true); +var command = this.viewport.getRedoList ().peek (); +this.redoMenuItem.setLabel (jalview.util.MessageManager.formatMessage ("label.redo_command", Clazz.newArray (-1, [command.getDescription ()]))); +} else { +this.redoMenuItem.setEnabled (false); +this.redoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.redo")); +}}); +Clazz.overrideMethod (c$, "addHistoryItem", +function (command) { +if (command.getSize () > 0) { +this.viewport.addToHistoryList (command); +this.viewport.clearRedoList (); +this.updateEditMenuBar (); +this.viewport.updateHiddenColumns (); +}}, "jalview.commands.CommandI"); +Clazz.defineMethod (c$, "undoMenuItem_actionPerformed", +function () { +if (this.viewport.getHistoryList ().isEmpty ()) { +return; +}var command = this.viewport.getHistoryList ().pop (); +this.viewport.addToRedoList (command); +command.undoCommand (null); +var originalSource = this.getOriginatingSource (command); +if (originalSource !== this.viewport) { +System.err.println ("Warning: Viewport object mismatch whilst undoing"); +}originalSource.updateHiddenColumns (); +this.updateEditMenuBar (); +originalSource.firePropertyChange ("alignment", null, originalSource.getAlignment ().getSequences ()); +}); +Clazz.defineMethod (c$, "redoMenuItem_actionPerformed", +function () { +if (this.viewport.getRedoList ().isEmpty ()) { +return; +}var command = this.viewport.getRedoList ().pop (); +this.viewport.addToHistoryList (command); +command.doCommand (null); +var originalSource = this.getOriginatingSource (command); +if (originalSource !== this.viewport) { +System.err.println ("Warning: Viewport object mismatch whilst re-doing"); +}originalSource.updateHiddenColumns (); +this.updateEditMenuBar (); +originalSource.firePropertyChange ("alignment", null, originalSource.getAlignment ().getSequences ()); +}); +Clazz.defineMethod (c$, "getOriginatingSource", +function (command) { +var originalSource = null; +var al = null; +if (Clazz.instanceOf (command, jalview.commands.EditCommand)) { +var editCommand = command; +al = editCommand.getAlignment (); +var comps = jalview.appletgui.PaintRefresher.components.get (this.viewport.getSequenceSetId ()); +for (var i = 0; i < comps.size (); i++) { +if (Clazz.instanceOf (comps.elementAt (i), jalview.appletgui.AlignmentPanel)) { +if (al === (comps.elementAt (i)).av.getAlignment ()) { +originalSource = (comps.elementAt (i)).av; +break; +}}} +}if (originalSource == null) { +if (al != null) { +jalview.appletgui.PaintRefresher.validateSequences (al, this.viewport.getAlignment ()); +}originalSource = this.viewport; +}return originalSource; +}, "jalview.commands.CommandI"); +Clazz.defineMethod (c$, "moveSelectedSequences", +function (up) { +var sg = this.viewport.getSelectionGroup (); +if (sg == null) { +return; +}this.viewport.getAlignment ().moveSelectedSequencesByOne (sg, up ? null : this.viewport.getHiddenRepSequences (), up); +this.alignPanel.paintAlignment (true); +var complement = this.viewport.getCodingComplement (); +if (complement != null) { +var mappedSelection = jalview.util.MappingUtils.mapSequenceGroup (sg, this.viewport, complement); +complement.getAlignment ().moveSelectedSequencesByOne (mappedSelection, up ? null : complement.getHiddenRepSequences (), up); +}}, "~B"); +Clazz.defineMethod (c$, "slideSequences", +function (right, size) { +var sg = new java.util.Vector (); +if (this.viewport.cursorMode) { +sg.add (this.viewport.getAlignment ().getSequenceAt (this.alignPanel.seqPanel.seqCanvas.cursorY)); +} else if (this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () != this.viewport.getAlignment ().getHeight ()) { +sg = this.viewport.getSelectionGroup ().getSequences (this.viewport.getHiddenRepSequences ()); +}if (sg.size () < 1) { +return; +}var invertGroup = new java.util.Vector (); +for (var i = 0; i < this.viewport.getAlignment ().getHeight (); i++) { +if (!sg.contains (this.viewport.getAlignment ().getSequenceAt (i))) { +invertGroup.addElement (this.viewport.getAlignment ().getSequenceAt (i)); +}} +var seqs1 = sg.toArray ( new Array (sg.size ())); +var seqs2 = invertGroup.toArray ( new Array (invertGroup.size ())); +for (var i = 0; i < invertGroup.size (); i++) { +seqs2[i] = invertGroup.elementAt (i); +} +var ssc; +if (right) { +ssc = new jalview.commands.SlideSequencesCommand ("Slide Sequences", seqs2, seqs1, size, this.viewport.getGapCharacter ()); +} else { +ssc = new jalview.commands.SlideSequencesCommand ("Slide Sequences", seqs1, seqs2, size, this.viewport.getGapCharacter ()); +}var groupAdjustment = 0; +if (ssc.getGapsInsertedBegin () && right) { +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.moveCursor (size, 0); +} else { +groupAdjustment = size; +}} else if (!ssc.getGapsInsertedBegin () && !right) { +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.moveCursor (-size, 0); +} else { +groupAdjustment = -size; +}}if (groupAdjustment != 0) { +this.viewport.getSelectionGroup ().setStartRes (this.viewport.getSelectionGroup ().getStartRes () + groupAdjustment); +this.viewport.getSelectionGroup ().setEndRes (this.viewport.getSelectionGroup ().getEndRes () + groupAdjustment); +}var appendHistoryItem = false; +var historyList = this.viewport.getHistoryList (); +if (historyList != null && historyList.size () > 0 && Clazz.instanceOf (historyList.peek (), jalview.commands.SlideSequencesCommand)) { +appendHistoryItem = ssc.appendSlideCommand (historyList.peek ()); +}if (!appendHistoryItem) { +this.addHistoryItem (ssc); +}this.repaint (); +}, "~B,~N"); +Clazz.defineMethod (c$, "copy_actionPerformed", +function () { +if (this.viewport.getSelectionGroup () == null) { +return; +}var sg = this.viewport.getSelectionGroup (); +jalview.appletgui.AlignFrame.copiedSequences = new StringBuffer (); +var orderedSeqs = new java.util.HashMap (); +for (var i = 0; i < sg.getSize (); i++) { +var seq = sg.getSequenceAt (i); +var index = this.viewport.getAlignment ().findIndex (seq); +orderedSeqs.put (new Integer (index), seq); +} +var index = 0; +var startRes; +var endRes; +var ch; +if (this.viewport.hasHiddenColumns () && this.viewport.getSelectionGroup () != null) { +jalview.appletgui.AlignFrame.copiedHiddenColumns = new java.util.Vector (); +var hiddenOffset = this.viewport.getSelectionGroup ().getStartRes (); +for (var region, $region = this.viewport.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { +jalview.appletgui.AlignFrame.copiedHiddenColumns.addElement ( Clazz.newIntArray (-1, [region[0] - hiddenOffset, region[1] - hiddenOffset])); +} +} else { +jalview.appletgui.AlignFrame.copiedHiddenColumns = null; +}for (var i = 0; i < sg.getSize (); i++) { +var seq = null; +while (seq == null) { +if (orderedSeqs.containsKey (new Integer (index))) { +seq = orderedSeqs.get (new Integer (index)); +index++; +break; +} else { +index++; +}} +startRes = seq.findPosition (sg.getStartRes ()); +endRes = 0; +for (var j = 0; j < sg.getEndRes () + 1 && j < seq.getLength (); j++) { +ch = seq.getCharAt (j); +if (!jalview.util.Comparison.isGap ((ch))) { +endRes++; +}} +if (endRes > 0) { +endRes += seq.getStart () - 1; +}jalview.appletgui.AlignFrame.copiedSequences.append (seq.getName () + "\t" + startRes + "\t" + endRes + "\t" + seq.getSequenceAsString (sg.getStartRes (), sg.getEndRes () + 1) + "\n"); +} +}); +Clazz.defineMethod (c$, "pasteNew_actionPerformed", +function () { +this.paste (true); +}); +Clazz.defineMethod (c$, "pasteThis_actionPerformed", +function () { +this.paste (false); +}); +Clazz.defineMethod (c$, "paste", +function (newAlignment) { +try { +if (jalview.appletgui.AlignFrame.copiedSequences == null) { +return; +}var st = new java.util.StringTokenizer (jalview.appletgui.AlignFrame.copiedSequences.toString ()); +var seqs = new java.util.Vector (); +while (st.hasMoreElements ()) { +var name = st.nextToken (); +var start = Integer.parseInt (st.nextToken ()); +var end = Integer.parseInt (st.nextToken ()); +seqs.addElement ( new jalview.datamodel.Sequence (name, st.nextToken (), start, end)); +} +var newSeqs = new Array (seqs.size ()); +for (var i = 0; i < seqs.size (); i++) { +newSeqs[i] = seqs.elementAt (i); +} +if (newAlignment) { +var newtitle = jalview.util.MessageManager.getString ("label.copied_sequences"); +if (this.getTitle ().startsWith (jalview.util.MessageManager.getString ("label.copied_sequences"))) { +newtitle = this.getTitle (); +} else { +newtitle = newtitle.concat (jalview.util.MessageManager.formatMessage ("label.from_msname", Clazz.newArray (-1, [this.getTitle ()]))); +}var af = new jalview.appletgui.AlignFrame ( new jalview.datamodel.Alignment (newSeqs), this.viewport.applet, newtitle, false); +if (jalview.appletgui.AlignFrame.copiedHiddenColumns != null) { +for (var i = 0; i < jalview.appletgui.AlignFrame.copiedHiddenColumns.size (); i++) { +var region = jalview.appletgui.AlignFrame.copiedHiddenColumns.elementAt (i); +af.viewport.hideColumns (region[0], region[1]); +} +}jalview.bin.JalviewLite.addFrame (af, newtitle, this.frameWidth, this.frameHeight); +} else { +this.addSequences (newSeqs); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +}, "~B"); +Clazz.defineMethod (c$, "addSequences", +function (seqs) { +for (var i = 0; i < seqs.length; i++) { +this.viewport.getAlignment ().addSequence (seqs[i]); +} +this.addHistoryItem ( new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("label.add_sequences"), jalview.commands.EditCommand.Action.PASTE, seqs, 0, this.viewport.getAlignment ().getWidth (), this.viewport.getAlignment ())); +this.viewport.setEndSeq (this.viewport.getAlignment ().getHeight ()); +this.viewport.getAlignment ().getWidth (); +this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); +}, "~A"); +Clazz.defineMethod (c$, "cut_actionPerformed", +function () { +this.copy_actionPerformed (); +this.delete_actionPerformed (); +}); +Clazz.defineMethod (c$, "delete_actionPerformed", +function () { +var sg = this.viewport.getSelectionGroup (); +if (sg == null) { +return; +}var seqs = new java.util.Vector (); +var seq; +for (var i = 0; i < sg.getSize (); i++) { +seq = sg.getSequenceAt (i); +seqs.addElement (seq); +} +if (sg.getSize () == this.viewport.getAlignment ().getHeight ()) { +this.viewport.getColumnSelection ().removeElements (sg.getStartRes (), sg.getEndRes () + 1); +}var cut = new Array (seqs.size ()); +for (var i = 0; i < seqs.size (); i++) { +cut[i] = seqs.elementAt (i); +} +this.addHistoryItem ( new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("label.cut_sequences"), jalview.commands.EditCommand.Action.CUT, cut, sg.getStartRes (), sg.getEndRes () - sg.getStartRes () + 1, this.viewport.getAlignment ())); +this.viewport.setSelectionGroup (null); +this.viewport.getAlignment ().deleteGroup (sg); +this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); +if (this.viewport.getAlignment ().getHeight () < 1) { +this.setVisible (false); +}this.viewport.sendSelection (); +}); +Clazz.defineMethod (c$, "showGroupConsensus_actionPerformed", +function () { +this.viewport.setShowGroupConsensus (this.showGroupConsensus.getState ()); +this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); +}); +Clazz.defineMethod (c$, "showGroupConservation_actionPerformed", +function () { +this.viewport.setShowGroupConservation (this.showGroupConservation.getState ()); +this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); +}); +Clazz.defineMethod (c$, "showConsensusHistogram_actionPerformed", +function () { +this.viewport.setShowConsensusHistogram (this.showConsensusHistogram.getState ()); +this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); +}); +Clazz.defineMethod (c$, "showSequenceLogo_actionPerformed", +function () { +this.viewport.setShowSequenceLogo (this.showSequenceLogo.getState ()); +this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); +}); +Clazz.defineMethod (c$, "normSequenceLogo_actionPerformed", +function () { +this.showSequenceLogo.setState (true); +this.viewport.setShowSequenceLogo (true); +this.viewport.setNormaliseSequenceLogo (this.normSequenceLogo.getState ()); +this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); +}); +Clazz.defineMethod (c$, "applyAutoAnnotationSettings_actionPerformed", +function () { +this.alignPanel.updateAnnotation (this.applyAutoAnnotationSettings.getState ()); +}); +Clazz.defineMethod (c$, "makeGrpsFromSelection_actionPerformed", +function () { +if (this.avc.makeGroupsFromSelection ()) { +jalview.appletgui.PaintRefresher.Refresh (this, this.viewport.getSequenceSetId ()); +this.alignPanel.updateAnnotation (); +this.alignPanel.paintAlignment (true); +}}); +Clazz.defineMethod (c$, "createGroup_actionPerformed", +function () { +this.avc.createGroup (); +}); +Clazz.defineMethod (c$, "unGroup_actionPerformed", +function () { +if (this.avc.unGroup ()) { +this.alignPanel.alignmentChanged (); +}}); +Clazz.defineMethod (c$, "deleteGroups_actionPerformed", +function () { +if (this.avc.deleteGroups ()) { +this.alignPanel.alignmentChanged (); +}}); +Clazz.defineMethod (c$, "selectAllSequenceMenuItem_actionPerformed", +function () { +var sg = new jalview.datamodel.SequenceGroup (); +for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { +sg.addSequence (this.viewport.getAlignment ().getSequenceAt (i), false); +} +sg.setEndRes (this.viewport.getAlignment ().getWidth () - 1); +this.viewport.setSelectionGroup (sg); +this.alignPanel.paintAlignment (true); +jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); +this.viewport.sendSelection (); +}); +Clazz.defineMethod (c$, "deselectAllSequenceMenuItem_actionPerformed", +function () { +if (this.viewport.cursorMode) { +this.alignPanel.seqPanel.keyboardNo1 = null; +this.alignPanel.seqPanel.keyboardNo2 = null; +}this.viewport.setSelectionGroup (null); +this.viewport.getColumnSelection ().clear (); +this.viewport.setSelectionGroup (null); +this.alignPanel.idPanel.idCanvas.searchResults = null; +this.alignPanel.seqPanel.seqCanvas.highlightSearchResults (null); +this.alignPanel.paintAlignment (true); +jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); +this.viewport.sendSelection (); +}); +Clazz.defineMethod (c$, "invertSequenceMenuItem_actionPerformed", +function () { +var sg = this.viewport.getSelectionGroup (); +for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { +sg.addOrRemove (this.viewport.getAlignment ().getSequenceAt (i), false); +} +jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); +this.viewport.sendSelection (); +}); +Clazz.defineMethod (c$, "invertColSel_actionPerformed", +function () { +this.viewport.invertColumnSelection (); +this.alignPanel.paintAlignment (true); +jalview.appletgui.PaintRefresher.Refresh (this.alignPanel, this.viewport.getSequenceSetId ()); +this.viewport.sendSelection (); +}); +Clazz.defineMethod (c$, "trimAlignment", +function (trimLeft) { +var colSel = this.viewport.getColumnSelection (); +var column; +if (colSel.size () > 0) { +if (trimLeft) { +column = colSel.getMin (); +} else { +column = colSel.getMax (); +}var seqs; +if (this.viewport.getSelectionGroup () != null) { +seqs = this.viewport.getSelectionGroup ().getSequencesAsArray (this.viewport.getHiddenRepSequences ()); +} else { +seqs = this.viewport.getAlignment ().getSequencesArray (); +}var trimRegion; +if (trimLeft) { +trimRegion = new jalview.commands.TrimRegionCommand ("Remove Left", jalview.commands.TrimRegionCommand.TRIM_LEFT, seqs, column, this.viewport.getAlignment (), this.viewport.getColumnSelection (), this.viewport.getSelectionGroup ()); +this.viewport.setStartRes (0); +} else { +trimRegion = new jalview.commands.TrimRegionCommand ("Remove Right", jalview.commands.TrimRegionCommand.TRIM_RIGHT, seqs, column, this.viewport.getAlignment (), this.viewport.getColumnSelection (), this.viewport.getSelectionGroup ()); +}this.setStatus (jalview.util.MessageManager.formatMessage ("label.removed_columns", Clazz.newArray (-1, [Integer.$valueOf (trimRegion.getSize ()).toString ()]))); +this.addHistoryItem (trimRegion); +for (var sg, $sg = this.viewport.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if ((trimLeft && !sg.adjustForRemoveLeft (column)) || (!trimLeft && !sg.adjustForRemoveRight (column))) { +this.viewport.getAlignment ().deleteGroup (sg); +}} +this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); +}}, "~B"); +Clazz.defineMethod (c$, "removeGappedColumnMenuItem_actionPerformed", +function () { +var start = 0; +var end = this.viewport.getAlignment ().getWidth () - 1; +var seqs; +if (this.viewport.getSelectionGroup () != null) { +seqs = this.viewport.getSelectionGroup ().getSequencesAsArray (this.viewport.getHiddenRepSequences ()); +start = this.viewport.getSelectionGroup ().getStartRes (); +end = this.viewport.getSelectionGroup ().getEndRes (); +} else { +seqs = this.viewport.getAlignment ().getSequencesArray (); +}var removeGapCols = new jalview.commands.RemoveGapColCommand ("Remove Gapped Columns", seqs, start, end, this.viewport.getAlignment ()); +this.addHistoryItem (removeGapCols); +this.setStatus (jalview.util.MessageManager.formatMessage ("label.removed_empty_columns", Clazz.newArray (-1, [Integer.$valueOf (removeGapCols.getSize ()).toString ()]))); +var seq = this.viewport.getAlignment ().getSequenceAt (0); +var startRes = seq.findPosition (this.viewport.startRes); +this.viewport.setStartRes (seq.findIndex (startRes) - 1); +this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); +}); +Clazz.defineMethod (c$, "removeAllGapsMenuItem_actionPerformed", +function () { +var start = 0; +var end = this.viewport.getAlignment ().getWidth () - 1; +var seqs; +if (this.viewport.getSelectionGroup () != null) { +seqs = this.viewport.getSelectionGroup ().getSequencesAsArray (this.viewport.getHiddenRepSequences ()); +start = this.viewport.getSelectionGroup ().getStartRes (); +end = this.viewport.getSelectionGroup ().getEndRes (); +} else { +seqs = this.viewport.getAlignment ().getSequencesArray (); +}var seq = this.viewport.getAlignment ().getSequenceAt (0); +var startRes = seq.findPosition (this.viewport.startRes); +this.addHistoryItem ( new jalview.commands.RemoveGapsCommand ("Remove Gaps", seqs, start, end, this.viewport.getAlignment ())); +this.viewport.setStartRes (seq.findIndex (startRes) - 1); +this.viewport.firePropertyChange ("alignment", null, this.viewport.getAlignment ().getSequences ()); +}); +Clazz.defineMethod (c$, "findMenuItem_actionPerformed", +function () { + new jalview.appletgui.Finder (this.alignPanel); +}); +Clazz.defineMethod (c$, "newView", +function (viewtitle) { +var newal; +if (this.viewport.hasHiddenRows ()) { +newal = new jalview.datamodel.Alignment (this.viewport.getAlignment ().getHiddenSequences ().getFullAlignment ().getSequencesArray ()); +} else { +newal = new jalview.datamodel.Alignment (this.viewport.getAlignment ().getSequencesArray ()); +}if (this.viewport.getAlignment ().getAlignmentAnnotation () != null) { +for (var i = 0; i < this.viewport.getAlignment ().getAlignmentAnnotation ().length; i++) { +if (!this.viewport.getAlignment ().getAlignmentAnnotation ()[i].autoCalculated) { +newal.addAnnotation (this.viewport.getAlignment ().getAlignmentAnnotation ()[i]); +}} +}var newaf = new jalview.appletgui.AlignFrame (newal, this.viewport.applet, "", false); +newaf.viewport.setSequenceSetId (this.alignPanel.av.getSequenceSetId ()); +jalview.appletgui.PaintRefresher.Register (this.alignPanel, this.alignPanel.av.getSequenceSetId ()); +jalview.appletgui.PaintRefresher.Register (newaf.alignPanel, newaf.alignPanel.av.getSequenceSetId ()); +jalview.appletgui.PaintRefresher.Register (newaf.alignPanel.idPanel.idCanvas, newaf.alignPanel.av.getSequenceSetId ()); +jalview.appletgui.PaintRefresher.Register (newaf.alignPanel.seqPanel.seqCanvas, newaf.alignPanel.av.getSequenceSetId ()); +var comps = jalview.appletgui.PaintRefresher.components.get (this.viewport.getSequenceSetId ()); +var viewSize = -1; +for (var i = 0; i < comps.size (); i++) { +if (Clazz.instanceOf (comps.elementAt (i), jalview.appletgui.AlignmentPanel)) { +viewSize++; +}} +var title = String.instantialize (this.getTitle ()); +if (viewtitle != null) { +title = viewtitle + " ( " + title + ")"; +} else { +if (title.indexOf ("(View") > -1) { +title = title.substring (0, title.indexOf ("(View")); +}title += "(View " + viewSize + ")"; +}newaf.setTitle (title.toString ()); +newaf.viewport.setHistoryList (this.viewport.getHistoryList ()); +newaf.viewport.setRedoList (this.viewport.getRedoList ()); +return newaf; +}, "~S"); +Clazz.defineMethod (c$, "getFeatureGroups", +function () { +var fr = null; +if (this.alignPanel != null && (fr = this.alignPanel.getFeatureRenderer ()) != null) { +var gps = fr.getFeatureGroups (); +var _gps = gps.toArray ( new Array (gps.size ())); +return _gps; +}return null; +}); +Clazz.defineMethod (c$, "getFeatureGroupsOfState", +function (visible) { +var fr = null; +if (this.alignPanel != null && (fr = this.alignPanel.getFeatureRenderer ()) != null) { +var gps = fr.getGroups (visible); +var _gps = gps.toArray ( new Array (gps.size ())); +return _gps; +}return null; +}, "~B"); +Clazz.defineMethod (c$, "setFeatureGroupState", +function (groups, state) { +var fr = null; +this.sequenceFeatures.setState (true); +this.viewport.setShowSequenceFeatures (true); +if (this.alignPanel != null && (fr = this.alignPanel.getFeatureRenderer ()) != null) { +fr.setGroupVisibility (java.util.Arrays.asList (groups), state); +this.alignPanel.seqPanel.seqCanvas.repaint (); +if (this.alignPanel.overviewPanel != null) { +this.alignPanel.overviewPanel.updateOverviewImage (); +}}}, "~A,~B"); +Clazz.defineMethod (c$, "seqLimits_itemStateChanged", +function () { +this.viewport.setShowJVSuffix (this.seqLimits.getState ()); +this.alignPanel.fontChanged (); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "colourTextMenuItem_actionPerformed", +function () { +this.viewport.setColourText (this.colourTextMenuItem.getState ()); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "displayNonconservedMenuItem_actionPerformed", +function () { +this.viewport.setShowUnconserved (this.displayNonconservedMenuItem.getState ()); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "wrapMenuItem_actionPerformed", +function () { +this.viewport.setWrapAlignment (this.wrapMenuItem.getState ()); +this.alignPanel.setWrapAlignment (this.wrapMenuItem.getState ()); +this.scaleAbove.setEnabled (this.wrapMenuItem.getState ()); +this.scaleLeft.setEnabled (this.wrapMenuItem.getState ()); +this.scaleRight.setEnabled (this.wrapMenuItem.getState ()); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "overviewMenuItem_actionPerformed", +function () { +if (this.alignPanel.overviewPanel != null) { +return; +}var frame = new awt2swing.Frame (); +var overview = new jalview.appletgui.OverviewPanel (this.alignPanel); +frame.add (overview); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.formatMessage ("label.overview_params", Clazz.newArray (-1, [this.getTitle ()])), overview.getPreferredSize ().width, overview.getPreferredSize ().height + 50); +frame.pack (); +var ap = this.alignPanel; +frame.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$1") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$1, this, Clazz.cloneFinals ("ap", ap)))); +this.alignPanel.setOverviewPanel (overview); +}); +Clazz.overrideMethod (c$, "changeColour", +function (cs) { +var threshold = 0; +if (cs != null) { +if (this.viewport.getAbovePIDThreshold ()) { +this.viewport.setThreshold (jalview.appletgui.SliderPanel.setPIDSliderSource (this.alignPanel, cs, "Background")); +}if (this.viewport.getConservationSelected ()) { +cs.setConservationApplied (true); +this.viewport.setIncrement (jalview.appletgui.SliderPanel.setConservationSlider (this.alignPanel, cs, "Background")); +} else { +cs.setConservationApplied (false); +}}this.viewport.setGlobalColourScheme (cs); +if (this.alignPanel.getOverviewPanel () != null) { +this.alignPanel.getOverviewPanel ().updateOverviewImage (); +}jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.viewport.applet).sequenceColoursChanged (this.alignPanel); +this.alignPanel.paintAlignment (true); +}, "jalview.schemes.ColourSchemeI"); +Clazz.defineMethod (c$, "modifyPID_actionPerformed", +function () { +if (this.viewport.getAbovePIDThreshold () && this.viewport.getGlobalColourScheme () != null) { +jalview.appletgui.SliderPanel.setPIDSliderSource (this.alignPanel, this.viewport.getGlobalColourScheme (), "Background"); +jalview.appletgui.SliderPanel.showPIDSlider (); +}}); +Clazz.defineMethod (c$, "modifyConservation_actionPerformed", +function () { +if (this.viewport.getConservationSelected () && this.viewport.getGlobalColourScheme () != null) { +jalview.appletgui.SliderPanel.setConservationSlider (this.alignPanel, this.viewport.getGlobalColourScheme (), "Background"); +jalview.appletgui.SliderPanel.showConservationSlider (); +}}); +Clazz.defineMethod (c$, "conservationMenuItem_actionPerformed", +function () { +this.viewport.setConservationSelected (this.conservationMenuItem.getState ()); +this.viewport.setAbovePIDThreshold (false); +this.abovePIDThreshold.setState (false); +this.changeColour (this.viewport.getGlobalColourScheme ()); +this.modifyConservation_actionPerformed (); +}); +Clazz.defineMethod (c$, "abovePIDThreshold_actionPerformed", +function () { +this.viewport.setAbovePIDThreshold (this.abovePIDThreshold.getState ()); +this.conservationMenuItem.setState (false); +this.viewport.setConservationSelected (false); +this.changeColour (this.viewport.getGlobalColourScheme ()); +this.modifyPID_actionPerformed (); +}); +Clazz.defineMethod (c$, "sortPairwiseMenuItem_actionPerformed", +function () { +var oldOrder = this.viewport.getAlignment ().getSequencesArray (); +jalview.analysis.AlignmentSorter.sortByPID (this.viewport.getAlignment (), this.viewport.getAlignment ().getSequenceAt (0), null); +this.addHistoryItem ( new jalview.commands.OrderCommand ("Pairwise Sort", oldOrder, this.viewport.getAlignment ())); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "sortIDMenuItem_actionPerformed", +function () { +var oldOrder = this.viewport.getAlignment ().getSequencesArray (); +jalview.analysis.AlignmentSorter.sortByID (this.viewport.getAlignment ()); +this.addHistoryItem ( new jalview.commands.OrderCommand ("ID Sort", oldOrder, this.viewport.getAlignment ())); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "sortLengthMenuItem_actionPerformed", +function () { +var oldOrder = this.viewport.getAlignment ().getSequencesArray (); +jalview.analysis.AlignmentSorter.sortByLength (this.viewport.getAlignment ()); +this.addHistoryItem ( new jalview.commands.OrderCommand ("Length Sort", oldOrder, this.viewport.getAlignment ())); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "sortGroupMenuItem_actionPerformed", +function () { +var oldOrder = this.viewport.getAlignment ().getSequencesArray (); +jalview.analysis.AlignmentSorter.sortByGroup (this.viewport.getAlignment ()); +this.addHistoryItem ( new jalview.commands.OrderCommand ("Group Sort", oldOrder, this.viewport.getAlignment ())); +this.alignPanel.paintAlignment (true); +}); +Clazz.defineMethod (c$, "removeRedundancyMenuItem_actionPerformed", +function () { + new jalview.appletgui.RedundancyPanel (this.alignPanel); +}); +Clazz.defineMethod (c$, "pairwiseAlignmentMenuItem_actionPerformed", +function () { +if (this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () > 1) { +var frame = new awt2swing.Frame (); +frame.add ( new jalview.appletgui.PairwiseAlignPanel (this.alignPanel)); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("action.pairwise_alignment"), 600, 500); +}}); +Clazz.defineMethod (c$, "PCAMenuItem_actionPerformed", +function () { +if (!this.viewport.getAlignment ().isAligned (false)) { +var current; +var Width = this.viewport.getAlignment ().getWidth (); +for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { +current = this.viewport.getAlignment ().getSequenceAt (i); +if (current.getLength () < Width) { +current.insertCharAt (Width - 1, this.viewport.getGapCharacter ()); +}} +this.alignPanel.paintAlignment (true); +}if ((this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () < 4 && this.viewport.getSelectionGroup ().getSize () > 0) || this.viewport.getAlignment ().getHeight () < 4) { +return; +}try { + new jalview.appletgui.PCAPanel (this.viewport); +} catch (ex) { +if (Clazz.exceptionOf (ex, OutOfMemoryError)) { +} else { +throw ex; +} +} +}); +Clazz.defineMethod (c$, "averageDistanceTreeMenuItem_actionPerformed", +function () { +this.NewTreePanel ("AV", "PID", "Average distance tree using PID"); +}); +Clazz.defineMethod (c$, "neighbourTreeMenuItem_actionPerformed", +function () { +this.NewTreePanel ("NJ", "PID", "Neighbour joining tree using PID"); +}); +Clazz.defineMethod (c$, "njTreeBlosumMenuItem_actionPerformed", +function () { +this.NewTreePanel ("NJ", "BL", "Neighbour joining tree using BLOSUM62"); +}); +Clazz.defineMethod (c$, "avTreeBlosumMenuItem_actionPerformed", +function () { +this.NewTreePanel ("AV", "BL", "Average distance tree using BLOSUM62"); +}); +Clazz.defineMethod (c$, "NewTreePanel", +function (type, pwType, title) { +if (!this.viewport.getAlignment ().isAligned (false)) { +var current; +var Width = this.viewport.getAlignment ().getWidth (); +for (var i = 0; i < this.viewport.getAlignment ().getSequences ().size (); i++) { +current = this.viewport.getAlignment ().getSequenceAt (i); +if (current.getLength () < Width) { +current.insertCharAt (Width - 1, this.viewport.getGapCharacter ()); +}} +this.alignPanel.paintAlignment (true); +}if ((this.viewport.getSelectionGroup () != null && this.viewport.getSelectionGroup ().getSize () > 1) || (this.viewport.getAlignment ().getHeight () > 1)) { +var tp = new jalview.appletgui.TreePanel (this.alignPanel, type, pwType); +this.addTreeMenuItem (tp, title); +jalview.bin.JalviewLite.addFrame (tp, title, 600, 500); +}}, "~S,~S,~S"); +Clazz.defineMethod (c$, "loadTree_actionPerformed", +function () { +var cap = new jalview.appletgui.CutAndPasteTransfer (true, this); +cap.setText (jalview.util.MessageManager.getString ("label.paste_newick_tree_file")); +cap.setTreeImport (); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.paste_newick_file"), 400, 300); +}); +Clazz.defineMethod (c$, "loadTree", +function (tree, treeFile) { +var tp = new jalview.appletgui.TreePanel (this.alignPanel, treeFile, jalview.util.MessageManager.getString ("label.load_tree_from_file"), tree); +jalview.bin.JalviewLite.addFrame (tp, treeFile, 600, 500); +this.addTreeMenuItem (tp, treeFile); +}, "jalview.io.NewickFile,~S"); +Clazz.defineMethod (c$, "sortByTree", +function (treePanel, title) { +var oldOrder = this.viewport.getAlignment ().getSequencesArray (); +jalview.analysis.AlignmentSorter.sortByTree (this.viewport.getAlignment (), treePanel.getTree ()); +this.addHistoryItem ( new jalview.commands.OrderCommand (jalview.util.MessageManager.formatMessage ("label.order_by_params", Clazz.newArray (-1, [title])), oldOrder, this.viewport.getAlignment ())); +this.alignPanel.paintAlignment (true); +}, "jalview.appletgui.TreePanel,~S"); +Clazz.defineMethod (c$, "addTreeMenuItem", +function (treePanel, title) { +var item = new awt2swing.MenuItem (title); +this.sortByTreeMenu.add (item); +item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$2") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$2, this, Clazz.cloneFinals ("treePanel", treePanel, "title", title)))); +treePanel.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$3") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$3, this, Clazz.cloneFinals ("treePanel", treePanel, "title", title, "item", item)))); +}, "jalview.appletgui.TreePanel,~S"); +Clazz.defineMethod (c$, "sortBy", +function (alorder, undoname) { +var oldOrder = this.viewport.getAlignment ().getSequencesArray (); +if ((this.viewport.applet, jalview.bin.JalviewLite).debug) { +System.err.println ("Sorting " + alorder.getOrder ().size () + " in alignment '" + this.getTitle () + "'"); +}jalview.analysis.AlignmentSorter.sortBy (this.viewport.getAlignment (), alorder); +if (undoname != null) { +this.addHistoryItem ( new jalview.commands.OrderCommand (undoname, oldOrder, this.viewport.getAlignment ())); +}this.alignPanel.paintAlignment (true); +return true; +}, "jalview.datamodel.AlignmentOrder,~S"); +Clazz.defineMethod (c$, "documentation_actionPerformed", +function () { +this.alignPanel.av.applet.openJalviewHelpUrl (); +}); +Clazz.defineMethod (c$, "about_actionPerformed", +function () { +if (!Clazz.isClassDefined ("jalview.appletgui.AlignFrame$1AboutPanel")) { +jalview.appletgui.AlignFrame.$AlignFrame$1AboutPanel$ (); +} +var frame = new awt2swing.Frame (); +frame.add (Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$1AboutPanel, this, null, jalview.bin.JalviewLite.getVersion (), jalview.bin.JalviewLite.getBuildDate ())); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.jalview"), 580, 220); +}); +Clazz.defineMethod (c$, "showURL", +function (url, target) { +if (this.viewport.applet == null) { +System.out.println ("Not running as applet - no browser available."); +} else { +this.viewport.applet.showURL (url, target); +}}, "~S,~S"); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setMenuBar (this.alignFrameMenuBar); +this.inputText.setLabel (jalview.util.MessageManager.getString ("label.input_from_textbox")); +this.inputText.addActionListener (this); +var outputTextboxMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.out_to_textbox")); +for (var i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++) { +var item = new awt2swing.MenuItem (jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]); +item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$4") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$4$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$4, this, null))); +outputTextboxMenu.add (item); +} +this.closeMenuItem.addActionListener (this); +this.loadApplication.addActionListener (this); +this.$loadTree.addActionListener (this); +this.$loadAnnotations.addActionListener (this); +this.$outputFeatures.addActionListener (this); +this.$outputAnnotations.addActionListener (this); +this.undoMenuItem.setEnabled (false); +this.undoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.undo")); +this.undoMenuItem.addActionListener (this); +this.redoMenuItem.setEnabled (false); +this.redoMenuItem.setLabel (jalview.util.MessageManager.getString ("action.redo")); +this.redoMenuItem.addActionListener (this); +this.copy.setLabel (jalview.util.MessageManager.getString ("action.copy")); +this.copy.addActionListener (this); +this.cut.setLabel (jalview.util.MessageManager.getString ("action.cut")); +this.cut.addActionListener (this); +this.$delete.setLabel (jalview.util.MessageManager.getString ("action.delete")); +this.$delete.addActionListener (this); +this.pasteMenu.setLabel (jalview.util.MessageManager.getString ("action.paste")); +this.pasteNew.setLabel (jalview.util.MessageManager.getString ("label.to_new_alignment")); +this.pasteNew.addActionListener (this); +this.pasteThis.setLabel (jalview.util.MessageManager.getString ("label.to_this_alignment")); +this.pasteThis.addActionListener (this); +this.remove2LeftMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_left")); +this.remove2LeftMenuItem.addActionListener (this); +this.remove2RightMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_right")); +this.remove2RightMenuItem.addActionListener (this); +this.removeGappedColumnMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_empty_columns")); +this.removeGappedColumnMenuItem.addActionListener (this); +this.removeAllGapsMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_all_gaps")); +this.removeAllGapsMenuItem.addActionListener (this); +this.removeRedundancyMenuItem.setLabel (jalview.util.MessageManager.getString ("action.remove_redundancy").concat ("...")); +this.removeRedundancyMenuItem.addActionListener (this); +this.findMenuItem.setLabel (jalview.util.MessageManager.getString ("action.find")); +this.findMenuItem.addActionListener (this); +this.selectAllSequenceMenuItem.addActionListener (this); +this.deselectAllSequenceMenuItem.addActionListener (this); +this.invertSequenceMenuItem.setLabel (jalview.util.MessageManager.getString ("action.invert_sequence_selection")); +this.invertSequenceMenuItem.addActionListener (this); +this.invertColSel.setLabel (jalview.util.MessageManager.getString ("action.invert_column_selection")); +this.invertColSel.addActionListener (this); +this.deleteGroups.setLabel (jalview.util.MessageManager.getString ("action.undefine_groups")); +this.deleteGroups.addActionListener (this); +this.grpsFromSelection.setLabel (jalview.util.MessageManager.getString ("action.make_groups_selection")); +this.grpsFromSelection.addActionListener (this); +this.createGroup.setLabel (jalview.util.MessageManager.getString ("action.create_group")); +this.unGroup.setLabel (jalview.util.MessageManager.getString ("action.remove_group")); +this.annotationColumnSelection.setLabel ("Select by Annotation"); +this.annotationColumnSelection.addActionListener (this); +this.$newView.setLabel (jalview.util.MessageManager.getString ("action.new_view")); +this.$newView.addActionListener (this); +var showMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.show")); +this.showColumns.setLabel (jalview.util.MessageManager.getString ("label.all_columns")); +this.showSeqs.setLabel (jalview.util.MessageManager.getString ("label.all_sequences")); +var hideMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.hide")); +this.hideColumns.setLabel (jalview.util.MessageManager.getString ("label.selected_columns")); +this.hideSequences.setLabel (jalview.util.MessageManager.getString ("label.selected_sequences")); +this.hideAllButSelection.setLabel (jalview.util.MessageManager.getString ("label.all_but_selected_region")); +this.hideAllSelection.setLabel (jalview.util.MessageManager.getString ("label.selected_region")); +this.showAllHidden.setLabel (jalview.util.MessageManager.getString ("label.all_sequences_columns")); +this.showColumns.addActionListener (this); +this.showSeqs.addActionListener (this); +this.hideColumns.addActionListener (this); +this.hideSequences.addActionListener (this); +this.hideAllButSelection.addActionListener (this); +this.hideAllSelection.addActionListener (this); +this.showAllHidden.addActionListener (this); +this.featureSettings.setLabel (jalview.util.MessageManager.getString ("label.feature_settings")); +this.featureSettings.addActionListener (this); +this.sequenceFeatures.setLabel (jalview.util.MessageManager.getString ("label.show_sequence_features")); +this.sequenceFeatures.addItemListener (this); +this.sequenceFeatures.setState (false); +this.followMouseOverFlag.setLabel (jalview.util.MessageManager.getString ("label.automatic_scrolling")); +this.followMouseOverFlag.addItemListener (this); +this.alProperties.addActionListener (this); +this.overviewMenuItem.setLabel (jalview.util.MessageManager.getString ("label.overview_window")); +this.overviewMenuItem.addActionListener (this); +this.annotationPanelMenuItem.setLabel (jalview.util.MessageManager.getString ("label.show_annotations")); +this.annotationPanelMenuItem.addItemListener (this); +this.showGroupConsensus.setLabel (jalview.util.MessageManager.getString ("label.group_consensus")); +this.showGroupConservation.setLabel (jalview.util.MessageManager.getString ("label.group_conservation")); +this.showConsensusHistogram.setLabel (jalview.util.MessageManager.getString ("label.show_consensus_histogram")); +this.showSequenceLogo.setLabel (jalview.util.MessageManager.getString ("label.show_consensus_logo")); +this.normSequenceLogo.setLabel (jalview.util.MessageManager.getString ("label.norm_consensus_logo")); +this.applyAutoAnnotationSettings.setLabel (jalview.util.MessageManager.getString ("label.apply_all_groups")); +this.applyAutoAnnotationSettings.setState (true); +var autoAnnMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("label.autocalculated_annotation")); +this.showGroupConsensus.addItemListener (this); +this.showGroupConservation.addItemListener (this); +this.showConsensusHistogram.addItemListener (this); +this.showSequenceLogo.addItemListener (this); +this.normSequenceLogo.addItemListener (this); +this.applyAutoAnnotationSettings.addItemListener (this); +this.showAlignmentAnnotations = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_all_al_annotations")); +this.showSequenceAnnotations = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_all_seq_annotations")); +this.sortAnnBySequence = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.sort_annotations_by_sequence")); +this.sortAnnByLabel = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.sort_annotations_by_label")); +this.showAutoFirst = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_first")); +this.showAutoLast = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_last")); +this.showAlignmentAnnotations.addItemListener (this); +this.showSequenceAnnotations.addItemListener (this); +this.sortAnnBySequence.addItemListener (this); +this.sortAnnByLabel.addItemListener (this); +this.showAutoFirst.addItemListener (this); +this.showAutoLast.addItemListener (this); +this.$font.setLabel (jalview.util.MessageManager.getString ("action.font")); +this.$font.addActionListener (this); +this.scaleAbove.setLabel (jalview.util.MessageManager.getString ("action.scale_above")); +this.scaleAbove.setState (true); +this.scaleAbove.setEnabled (false); +this.scaleAbove.addItemListener (this); +this.scaleLeft.setEnabled (false); +this.scaleLeft.setState (true); +this.scaleLeft.setLabel (jalview.util.MessageManager.getString ("action.scale_left")); +this.scaleLeft.addItemListener (this); +this.scaleRight.setEnabled (false); +this.scaleRight.setState (true); +this.scaleRight.setLabel (jalview.util.MessageManager.getString ("action.scale_right")); +this.scaleRight.addItemListener (this); +this.viewBoxesMenuItem.setLabel (jalview.util.MessageManager.getString ("action.boxes")); +this.viewBoxesMenuItem.setState (true); +this.viewBoxesMenuItem.addItemListener (this); +this.viewTextMenuItem.setLabel (jalview.util.MessageManager.getString ("action.text")); +this.viewTextMenuItem.setState (true); +this.viewTextMenuItem.addItemListener (this); +this.colourTextMenuItem.setLabel (jalview.util.MessageManager.getString ("label.colour_text")); +this.colourTextMenuItem.addItemListener (this); +this.displayNonconservedMenuItem.setLabel (jalview.util.MessageManager.getString ("label.show_non_conversed")); +this.displayNonconservedMenuItem.addItemListener (this); +this.wrapMenuItem.setLabel (jalview.util.MessageManager.getString ("action.wrap")); +this.wrapMenuItem.addItemListener (this); +this.renderGapsMenuItem.setLabel (jalview.util.MessageManager.getString ("action.show_gaps")); +this.renderGapsMenuItem.setState (true); +this.renderGapsMenuItem.addItemListener (this); +this.centreColumnLabelFlag.setLabel (jalview.util.MessageManager.getString ("label.centre_column_labels")); +this.centreColumnLabelFlag.addItemListener (this); +this.seqLimits.setState (true); +this.seqLimits.setLabel (jalview.util.MessageManager.getString ("label.show_sequence_limits")); +this.seqLimits.addItemListener (this); +this.applyToAllGroups.setLabel (jalview.util.MessageManager.getString ("label.apply_colour_to_all_groups")); +this.applyToAllGroups.setState (true); +this.applyToAllGroups.addItemListener (this); +this.clustalColour.setLabel (jalview.util.MessageManager.getString ("label.clustalx")); +this.clustalColour.addActionListener (this); +this.zappoColour.setLabel (jalview.util.MessageManager.getString ("label.zappo")); +this.zappoColour.addActionListener (this); +this.taylorColour.setLabel (jalview.util.MessageManager.getString ("label.taylor")); +this.taylorColour.addActionListener (this); +this.hydrophobicityColour.setLabel (jalview.util.MessageManager.getString ("label.hydrophobicity")); +this.hydrophobicityColour.addActionListener (this); +this.helixColour.setLabel (jalview.util.MessageManager.getString ("label.helix_propensity")); +this.helixColour.addActionListener (this); +this.strandColour.setLabel (jalview.util.MessageManager.getString ("label.strand_propensity")); +this.strandColour.addActionListener (this); +this.turnColour.setLabel (jalview.util.MessageManager.getString ("label.turn_propensity")); +this.turnColour.addActionListener (this); +this.buriedColour.setLabel (jalview.util.MessageManager.getString ("label.buried_index")); +this.buriedColour.addActionListener (this); +this.purinePyrimidineColour.setLabel (jalview.util.MessageManager.getString ("label.purine_pyrimidine")); +this.purinePyrimidineColour.addActionListener (this); +this.RNAInteractionColour.setLabel (jalview.util.MessageManager.getString ("label.rna_interaction")); +this.RNAInteractionColour.addActionListener (this); +this.RNAHelixColour.setLabel (jalview.util.MessageManager.getString ("action.by_rna_helixes")); +this.RNAHelixColour.addActionListener (this); +this.userDefinedColour.setLabel (jalview.util.MessageManager.getString ("action.user_defined")); +this.userDefinedColour.addActionListener (this); +this.PIDColour.setLabel (jalview.util.MessageManager.getString ("label.percentage_identity")); +this.PIDColour.addActionListener (this); +this.BLOSUM62Colour.setLabel (jalview.util.MessageManager.getString ("label.blosum62_score")); +this.BLOSUM62Colour.addActionListener (this); +this.tcoffeeColour.setLabel (jalview.util.MessageManager.getString ("label.tcoffee_scores")); +this.tcoffeeColour.setEnabled (false); +this.tcoffeeColour.addActionListener (this); +this.conservationMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_conservation")); +this.conservationMenuItem.addItemListener (this); +this.noColourmenuItem.setLabel (jalview.util.MessageManager.getString ("label.none")); +this.noColourmenuItem.addActionListener (this); +this.abovePIDThreshold.setLabel (jalview.util.MessageManager.getString ("label.above_identity_threshold")); +this.abovePIDThreshold.addItemListener (this); +this.nucleotideColour.setLabel (jalview.util.MessageManager.getString ("label.nucleotide")); +this.nucleotideColour.addActionListener (this); +this.modifyPID.setLabel (jalview.util.MessageManager.getString ("label.modify_identity_thereshold")); +this.modifyPID.addActionListener (this); +this.modifyConservation.setLabel (jalview.util.MessageManager.getString ("label.modify_conservation_thereshold")); +this.modifyConservation.addActionListener (this); +this.annotationColour.setLabel (jalview.util.MessageManager.getString ("action.by_annotation")); +this.annotationColour.addActionListener (this); +this.sortPairwiseMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_pairwise_id")); +this.sortPairwiseMenuItem.addActionListener (this); +this.sortIDMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_id")); +this.sortIDMenuItem.addActionListener (this); +this.sortLengthMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_length")); +this.sortLengthMenuItem.addActionListener (this); +this.sortGroupMenuItem.setLabel (jalview.util.MessageManager.getString ("action.by_group")); +this.sortGroupMenuItem.addActionListener (this); +this.pairwiseAlignmentMenuItem.setLabel (jalview.util.MessageManager.getString ("action.pairwise_alignment")); +this.pairwiseAlignmentMenuItem.addActionListener (this); +this.PCAMenuItem.setLabel (jalview.util.MessageManager.getString ("label.principal_component_analysis")); +this.PCAMenuItem.addActionListener (this); +this.autoCalculate = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.autocalculate_consensus"), true); +this.averageDistanceTreeMenuItem.setLabel (jalview.util.MessageManager.getString ("label.average_distance_identity")); +this.averageDistanceTreeMenuItem.addActionListener (this); +this.neighbourTreeMenuItem.setLabel (jalview.util.MessageManager.getString ("label.neighbour_joining_identity")); +this.neighbourTreeMenuItem.addActionListener (this); +this.avDistanceTreeBlosumMenuItem.setLabel (jalview.util.MessageManager.getString ("label.average_distance_bloslum62")); +this.avDistanceTreeBlosumMenuItem.addActionListener (this); +this.njTreeBlosumMenuItem.setLabel (jalview.util.MessageManager.getString ("label.neighbour_blosum62")); +this.njTreeBlosumMenuItem.addActionListener (this); +this.sortByTreeMenu.setLabel (jalview.util.MessageManager.getString ("action.by_tree_order")); +var sortMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.sort")); +var calculateTreeMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.calculate_tree")); +this.autoCalculate.addItemListener (this); +this.$sortByTree.addItemListener (this); +var helpMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.help")); +this.documentation.setLabel (jalview.util.MessageManager.getString ("label.documentation")); +this.documentation.addActionListener (this); +this.about.setLabel (jalview.util.MessageManager.getString ("label.about")); +this.about.addActionListener (this); +this.alignFrameMenuBar.add (this.fileMenu); +var editMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.edit")); +this.alignFrameMenuBar.add (editMenu); +var selectMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.select")); +this.alignFrameMenuBar.add (selectMenu); +var viewMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.view")); +this.alignFrameMenuBar.add (viewMenu); +var annotationsMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.annotations")); +this.alignFrameMenuBar.add (annotationsMenu); +var formatMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.format")); +this.alignFrameMenuBar.add (formatMenu); +var colourMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.colour")); +this.alignFrameMenuBar.add (colourMenu); +var calculateMenu = new awt2swing.Menu (jalview.util.MessageManager.getString ("action.calculate")); +this.alignFrameMenuBar.add (calculateMenu); +this.alignFrameMenuBar.add (helpMenu); +this.fileMenu.add (this.inputText); +this.fileMenu.add (this.$loadTree); +this.fileMenu.add (this.$loadAnnotations); +this.fileMenu.addSeparator (); +this.fileMenu.add (outputTextboxMenu); +this.fileMenu.add (this.$outputFeatures); +this.fileMenu.add (this.$outputAnnotations); +if (this.jalviewServletURL != null) { +this.fileMenu.add (this.loadApplication); +}this.fileMenu.addSeparator (); +this.fileMenu.add (this.closeMenuItem); +editMenu.add (this.undoMenuItem); +editMenu.add (this.redoMenuItem); +editMenu.add (this.cut); +editMenu.add (this.copy); +this.pasteMenu.add (this.pasteNew); +this.pasteMenu.add (this.pasteThis); +editMenu.add (this.pasteMenu); +editMenu.add (this.$delete); +editMenu.addSeparator (); +editMenu.add (this.remove2LeftMenuItem); +editMenu.add (this.remove2RightMenuItem); +editMenu.add (this.removeGappedColumnMenuItem); +editMenu.add (this.removeAllGapsMenuItem); +editMenu.add (this.removeRedundancyMenuItem); +selectMenu.add (this.findMenuItem); +selectMenu.addSeparator (); +selectMenu.add (this.selectAllSequenceMenuItem); +selectMenu.add (this.deselectAllSequenceMenuItem); +selectMenu.add (this.invertSequenceMenuItem); +selectMenu.add (this.invertColSel); +selectMenu.add (this.createGroup); +selectMenu.add (this.unGroup); +selectMenu.add (this.grpsFromSelection); +selectMenu.add (this.deleteGroups); +selectMenu.add (this.annotationColumnSelection); +viewMenu.add (this.$newView); +viewMenu.addSeparator (); +showMenu.add (this.showColumns); +showMenu.add (this.showSeqs); +showMenu.add (this.showAllHidden); +viewMenu.add (showMenu); +hideMenu.add (this.hideColumns); +hideMenu.add (this.hideSequences); +hideMenu.add (this.hideAllSelection); +hideMenu.add (this.hideAllButSelection); +viewMenu.add (hideMenu); +viewMenu.addSeparator (); +viewMenu.add (this.followMouseOverFlag); +viewMenu.addSeparator (); +viewMenu.add (this.sequenceFeatures); +viewMenu.add (this.featureSettings); +viewMenu.addSeparator (); +viewMenu.add (this.alProperties); +viewMenu.addSeparator (); +viewMenu.add (this.overviewMenuItem); +annotationsMenu.add (this.annotationPanelMenuItem); +annotationsMenu.addSeparator (); +annotationsMenu.add (this.showAlignmentAnnotations); +annotationsMenu.add (this.showSequenceAnnotations); +annotationsMenu.add (this.sortAnnBySequence); +annotationsMenu.add (this.sortAnnByLabel); +annotationsMenu.addSeparator (); +autoAnnMenu.add (this.showAutoFirst); +autoAnnMenu.add (this.showAutoLast); +autoAnnMenu.addSeparator (); +autoAnnMenu.add (this.applyAutoAnnotationSettings); +autoAnnMenu.add (this.showConsensusHistogram); +autoAnnMenu.add (this.showSequenceLogo); +autoAnnMenu.add (this.normSequenceLogo); +autoAnnMenu.addSeparator (); +autoAnnMenu.add (this.showGroupConservation); +autoAnnMenu.add (this.showGroupConsensus); +annotationsMenu.add (autoAnnMenu); +formatMenu.add (this.$font); +formatMenu.add (this.seqLimits); +formatMenu.add (this.wrapMenuItem); +formatMenu.add (this.scaleAbove); +formatMenu.add (this.scaleLeft); +formatMenu.add (this.scaleRight); +formatMenu.add (this.viewBoxesMenuItem); +formatMenu.add (this.viewTextMenuItem); +formatMenu.add (this.colourTextMenuItem); +formatMenu.add (this.displayNonconservedMenuItem); +formatMenu.add (this.renderGapsMenuItem); +formatMenu.add (this.centreColumnLabelFlag); +colourMenu.add (this.applyToAllGroups); +colourMenu.addSeparator (); +colourMenu.add (this.noColourmenuItem); +colourMenu.add (this.clustalColour); +colourMenu.add (this.BLOSUM62Colour); +colourMenu.add (this.PIDColour); +colourMenu.add (this.zappoColour); +colourMenu.add (this.taylorColour); +colourMenu.add (this.hydrophobicityColour); +colourMenu.add (this.helixColour); +colourMenu.add (this.strandColour); +colourMenu.add (this.turnColour); +colourMenu.add (this.buriedColour); +colourMenu.add (this.nucleotideColour); +colourMenu.add (this.purinePyrimidineColour); +colourMenu.add (this.tcoffeeColour); +colourMenu.add (this.userDefinedColour); +colourMenu.addSeparator (); +colourMenu.add (this.conservationMenuItem); +colourMenu.add (this.modifyConservation); +colourMenu.add (this.abovePIDThreshold); +colourMenu.add (this.modifyPID); +colourMenu.add (this.annotationColour); +colourMenu.add (this.RNAHelixColour); +sortMenu.add (this.sortIDMenuItem); +sortMenu.add (this.sortLengthMenuItem); +sortMenu.add (this.sortByTreeMenu); +sortMenu.add (this.sortGroupMenuItem); +sortMenu.add (this.sortPairwiseMenuItem); +calculateMenu.add (sortMenu); +calculateTreeMenu.add (this.averageDistanceTreeMenuItem); +calculateTreeMenu.add (this.neighbourTreeMenuItem); +calculateTreeMenu.add (this.avDistanceTreeBlosumMenuItem); +calculateTreeMenu.add (this.njTreeBlosumMenuItem); +calculateMenu.add (calculateTreeMenu); +calculateMenu.addSeparator (); +calculateMenu.add (this.pairwiseAlignmentMenuItem); +calculateMenu.add (this.PCAMenuItem); +calculateMenu.add (this.autoCalculate); +calculateMenu.add (this.$sortByTree); +helpMenu.add (this.documentation); +helpMenu.add (this.about); +this.statusBar.setBackground (java.awt.Color.white); +this.statusBar.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.setStatus (jalview.util.MessageManager.getString ("label.status_bar")); +this.add (this.statusBar, "South"); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "setStatus", +function (string) { +this.statusBar.setText (string); +}, "~S"); +Clazz.defineMethod (c$, "createAlignFrameWindow", +function (reallyEmbedded) { +if (reallyEmbedded) { +this.embedAlignFrameInApplet (this.viewport.applet); +} else { +if (this.embedMenuIfNeeded (this.alignPanel)) { +this.alignPanel.setSize (this.getSize ().width, this.getSize ().height - this.statusBar.getHeight ()); +}this.add (this.statusBar, "South"); +this.add (this.alignPanel, "Center"); +jalview.bin.JalviewLite.addFrame (this, this.getTitle (), this.frameWidth, this.frameHeight); +}}, "~B"); +Clazz.defineMethod (c$, "embedAlignFrameInApplet", +function (theApplet) { +this.fileMenu.remove (this.closeMenuItem); +this.fileMenu.remove (3); +this.embeddedMenu = this.makeEmbeddedPopupMenu (this.alignFrameMenuBar, false, false); +theApplet.setLayout ( new java.awt.BorderLayout ()); +theApplet.add (this.embeddedMenu, "North"); +theApplet.add (this.statusBar, "South"); +this.alignPanel.setSize (theApplet.getSize ().width, theApplet.getSize ().height - this.embeddedMenu.getHeight () - this.statusBar.getHeight ()); +theApplet.add (this.alignPanel, "Center"); +var me = this; +theApplet.addFocusListener (((Clazz.isClassDefined ("jalview.appletgui.AlignFrame$5") ? 0 : jalview.appletgui.AlignFrame.$AlignFrame$5$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignFrame$5, this, Clazz.cloneFinals ("theApplet", theApplet, "me", me)))); +theApplet.validate (); +}, "jalview.bin.JalviewLite"); +Clazz.defineMethod (c$, "addStructureViewInstance", +function (jmolviewer, sequenceIds) { +return null; +}, "~O,~A"); +Clazz.defineMethod (c$, "addPdbFile", +function (sequenceId, pdbEntryString, pdbFile) { +var toaddpdb = this.viewport.getAlignment ().findName (sequenceId); +var needtoadd = false; +if (toaddpdb != null) { +var pdbe = toaddpdb.getPDBId (); +var pdbentry = null; +if (pdbe != null && pdbe.size () > 0) { +for (var pe = 0, peSize = pdbe.size (); pe < peSize; pe++) { +pdbentry = pdbe.elementAt (pe); +if (!pdbentry.getId ().equals (pdbEntryString) && !pdbentry.getFile ().equals (pdbFile)) { +pdbentry = null; +} else { +continue; +}} +}if (pdbentry == null) { +pdbentry = new jalview.datamodel.PDBEntry (); +pdbentry.setId (pdbEntryString); +pdbentry.setFile (pdbFile); +needtoadd = true; +}var protocol = jalview.io.AppletFormatAdapter.resolveProtocol (pdbFile, "PDB"); +if (protocol == null) { +return false; +}if (needtoadd) { +if (pdbentry.getProperty () == null) { +pdbentry.setProperty ( new java.util.Hashtable ()); +}pdbentry.getProperty ().put ("protocol", protocol); +toaddpdb.addPDBId (pdbentry); +this.alignPanel.getStructureSelectionManager ().registerPDBEntry (pdbentry); +}}return true; +}, "~S,~S,~S"); +Clazz.defineMethod (c$, "cleanSeqChainArrays", +($fz = function (seqs, chains) { +if (seqs != null) { +var sequences = new java.util.Vector (); +for (var i = 0; i < seqs.length; i++) { +if (seqs[i] != null) { +sequences.addElement ( Clazz.newArray (-1, [seqs[i], (chains != null) ? chains[i] : null])); +}} +seqs = new Array (sequences.size ()); +chains = new Array (sequences.size ()); +for (var i = 0, isize = sequences.size (); i < isize; i++) { +var oj = sequences.elementAt (i); +seqs[i] = oj[0]; +chains[i] = oj[1]; +} +}return Clazz.newArray (-1, [seqs, chains]); +}, $fz.isPrivate = true, $fz), "~A,~A"); +Clazz.defineMethod (c$, "newStructureView", +function (applet, pdb, seqs, chains, protocol) { +var sqch = this.cleanSeqChainArrays (seqs, chains); +seqs = sqch[0]; +chains = sqch[1]; +if (seqs == null || seqs.length == 0) { +System.err.println ("JalviewLite.AlignFrame:newStructureView: No sequence to bind structure to."); +}if (protocol == null || protocol.trim ().length == 0 || protocol.equals ("null")) { +protocol = pdb.getProperty ().get ("protocol"); +if (protocol == null) { +System.err.println ("Couldn't work out protocol to open structure: " + pdb.getId ()); +return; +}}if (applet.useXtrnalSviewer) { +if (jalview.structure.StructureSelectionManager.getStructureSelectionManager (applet).setMapping (seqs, chains, pdb.getFile (), protocol) == null) { +System.err.println ("Failed to map " + pdb.getFile () + " (" + protocol + ") to any sequences"); +}return; +}if (applet.isAlignPdbStructures () && applet.jmolAvailable) { +var ajm = null; +var tajm; +var jmols = applet.getAppletWindow (jalview.appletgui.AppletJmol); +for (var i = 0, iSize = jmols.size (); i < iSize; i++) { +tajm = jmols.elementAt (i); +if (tajm.ap.alignFrame === this) { +ajm = tajm; +break; +}} +if (ajm != null) { +System.err.println ("Incremental adding and aligning structure to existing Jmol view not yet implemented."); +ajm = null; +}} new jalview.appletgui.AppletJmol (pdb, seqs, chains, this.alignPanel, protocol); +jalview.bin.JalviewLite.lastFrameX += 40; +jalview.bin.JalviewLite.lastFrameY += 40; +}, "jalview.bin.JalviewLite,jalview.datamodel.PDBEntry,~A,~A,~S"); +Clazz.defineMethod (c$, "alignedStructureView", +function (applet, pdb, seqs, chains, protocols) { +System.err.println ("Aligned Structure View: Not yet implemented."); +}, "jalview.bin.JalviewLite,~A,~A,~A,~A"); +Clazz.defineMethod (c$, "select", +function (sel, csel) { +this.alignPanel.seqPanel.selection (sel, csel, null); +}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection"); +Clazz.defineMethod (c$, "scrollTo", +function (row, column) { +this.alignPanel.seqPanel.scrollTo (row, column); +}, "~N,~N"); +Clazz.defineMethod (c$, "scrollToRow", +function (row) { +this.alignPanel.seqPanel.scrollToRow (row); +}, "~N"); +Clazz.defineMethod (c$, "scrollToColumn", +function (column) { +this.alignPanel.seqPanel.scrollToColumn (column); +}, "~N"); +Clazz.defineMethod (c$, "getSequenceSetId", +function () { +return this.viewport.getSequenceSetId (); +}); +Clazz.defineMethod (c$, "loadScoreFile", +function (inFile) { +var file = jalview.jsdev.GenericFileAdapter.getFile ("TCoffeeScoreFile", [inFile, jalview.io.AppletFormatAdapter.checkProtocol (inFile)]); +if (!file.isValid ()) { +System.err.println ("Problems parsing T-Coffee scores: " + file.getWarningMessage ()); +System.err.println ("Origin was:\n" + inFile); +return false; +}var aln; +if ((aln = this.viewport.getAlignment ()) != null && (aln.getHeight () != file.getHeight () || aln.getWidth () != file.getWidth ())) { +System.err.println ("The scores matrix does not match the alignment dimensions"); +}if (file.annotateAlignment (this.alignPanel.getAlignment (), false)) { +this.alignPanel.fontChanged (); +this.tcoffeeColour.setEnabled (true); +this.changeColour ( new jalview.schemes.TCoffeeColourScheme (this.alignPanel.getAlignment ())); +return true; +} else { +System.err.println ("Problems resolving T-Coffee scores:"); +if (file.getWarningMessage () != null) { +System.err.println (file.getWarningMessage ()); +}}return false; +}, "~S"); +Clazz.defineMethod (c$, "getSplitFrame", +function () { +return this.splitFrame; +}); +Clazz.defineMethod (c$, "setSplitFrame", +function (sf) { +this.splitFrame = sf; +}, "jalview.appletgui.SplitFrame"); +Clazz.overrideMethod (c$, "setShowSeqFeatures", +function (b) { +this.viewport.setShowSequenceFeatures (b); +}, "~B"); +Clazz.overrideMethod (c$, "setMenusForViewport", +function () { +}); +Clazz.overrideMethod (c$, "refreshFeatureUI", +function (enableIfNecessary) { +if (enableIfNecessary) { +this.sequenceFeatures.setState (true); +this.alignPanel.av.setShowSequenceFeatures (true); +}}, "~B"); +Clazz.overrideMethod (c$, "getFeatureSettingsUI", +function () { +return this.alignPanel.av.featureSettings; +}); +c$.$AlignFrame$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$1", java.awt.event.WindowAdapter); +Clazz.overrideMethod (c$, "windowClosing", +function (e) { +if (this.f$.ap != null) { +this.f$.ap.setOverviewPanel (null); +}}, "java.awt.event.WindowEvent"); +c$ = Clazz.p0p (); +}; +c$.$AlignFrame$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$2", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +this.b$["jalview.appletgui.AlignFrame"].sortByTree (this.f$.treePanel, this.f$.title); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$AlignFrame$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$3", java.awt.event.WindowAdapter); +Clazz.defineMethod (c$, "windowOpened", +function (e) { +if (this.b$["jalview.appletgui.AlignFrame"].viewport.sortByTree) { +this.b$["jalview.appletgui.AlignFrame"].sortByTree (this.f$.treePanel, this.f$.title); +}Clazz.superCall (this, jalview.appletgui.AlignFrame$3, "windowOpened", [e]); +}, "java.awt.event.WindowEvent"); +Clazz.overrideMethod (c$, "windowClosing", +function (e) { +this.b$["jalview.appletgui.AlignFrame"].sortByTreeMenu.remove (this.f$.item); +}, "java.awt.event.WindowEvent"); +c$ = Clazz.p0p (); +}; +c$.$AlignFrame$1AboutPanel$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.version = null; +this.builddate = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AlignFrame$1AboutPanel", awt2swing.Canvas); +Clazz.makeConstructor (c$, +function (a, b) { +Clazz.superConstructor (this, jalview.appletgui.AlignFrame$1AboutPanel, []); +this.version = a; +this.builddate = b; +}, "~S,~S"); +Clazz.overrideMethod (c$, "paintComponent", +function (a) { +a.setColor (java.awt.Color.white); +a.fillRect (0, 0, this.getSize ().width, this.getSize ().height); +a.setFont ( new java.awt.Font ("Helvetica", 0, 12)); +var b = a.getFontMetrics (); +var c = b.getHeight (); +var d = 5; +var e = 7; +a.setColor (java.awt.Color.black); +a.setFont ( new java.awt.Font ("Helvetica", 1, 14)); +a.drawString (jalview.util.MessageManager.formatMessage ("label.jalviewLite_release", Clazz.newArray (-1, [this.version])), e, d += c); +a.setFont ( new java.awt.Font ("Helvetica", 1, 12)); +a.drawString (jalview.util.MessageManager.formatMessage ("label.jaview_build_date", Clazz.newArray (-1, [this.builddate])), e, d += c); +a.setFont ( new java.awt.Font ("Helvetica", 0, 12)); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_authors_1"), e, d += c * 1.5); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_authors_2"), e + 50, d += c + 8); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_dev_managers"), e, d += c); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_distribution_lists"), e, d += c); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_please_cite"), e, d += c + 8); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_cite_1_authors"), e, d += c); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_cite_1_title"), e, d += c); +a.drawString (jalview.util.MessageManager.getString ("label.jalview_cite_1_ref"), e, d += c); +}, "java.awt.Graphics"); +c$ = Clazz.p0p (); +}; +c$.$AlignFrame$4$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$4", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.AlignFrame"].outputText_actionPerformed (e); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$AlignFrame$5$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignFrame$5", null, java.awt.event.FocusListener); +Clazz.overrideMethod (c$, "focusLost", +function (e) { +if (this.f$.theApplet.currentAlignFrame === this.f$.me) { +this.f$.theApplet.currentAlignFrame = null; +}}, "java.awt.event.FocusEvent"); +Clazz.overrideMethod (c$, "focusGained", +function (e) { +this.f$.theApplet.currentAlignFrame = this.f$.me; +}, "java.awt.event.FocusEvent"); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"copiedSequences", null, +"copiedHiddenColumns", null); +}); diff --git a/bin/jalview/appletgui/AlignViewport.js b/bin/jalview/appletgui/AlignViewport.js index 8ea8971..1d890fc 100644 --- a/bin/jalview/appletgui/AlignViewport.js +++ b/bin/jalview/appletgui/AlignViewport.js @@ -1,229 +1,229 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.structure.CommandListener", "$.SelectionSource", "$.VamsasSource", "jalview.viewmodel.AlignmentViewport", "java.awt.Font"], "jalview.appletgui.AlignViewport", ["awt2swing.Frame", "jalview.api.AlignViewportI", "jalview.bin.JalviewLite", "jalview.datamodel.ColumnSelection", "$.SearchResults", "$.Sequence", "$.SequenceGroup", "jalview.schemes.ColourSchemeProperty", "jalview.structure.StructureSelectionManager", "jalview.util.Platform", "jalview.workers.AlignCalcManager", "java.lang.Float", "$.StringBuilder"], function () { -c$ = Clazz.decorateAsClass (function () { -this.cursorMode = false; -this.font = null; -this.validCharWidth = true; -this.currentTree = null; -this.applet = null; -this.MAC = false; -this.annotationColumnSelectionState = null; -this.nullFrame = null; -this.featureSettings = null; -this.heightScale = 1; -this.widthScale = 1; -this.centreColumnLabels = false; -this.followSelection = true; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "AlignViewport", jalview.viewmodel.AlignmentViewport, [jalview.structure.SelectionSource, jalview.structure.VamsasSource, jalview.structure.CommandListener]); -Clazz.prepareFields (c$, function () { -this.font = new java.awt.Font ("SansSerif", 0, 10); -}); -Clazz.overrideMethod (c$, "finalize", -function () { -this.applet = null; -this.quality = null; -this.alignment = null; -this.colSel = null; -}); -Clazz.makeConstructor (c$, -function (al, applet) { -Clazz.superConstructor (this, jalview.appletgui.AlignViewport); -this.calculator = new jalview.workers.AlignCalcManager (); -this.applet = applet; -this.alignment = al; -this.setPadGaps (true); -this.startRes = 0; -this.endRes = al.getWidth () - 1; -this.startSeq = 0; -this.endSeq = al.getHeight () - 1; -if (applet != null) { -var param = applet.widthScale; -if (param != null) { -try { -this.widthScale = new Float (param).floatValue (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -if (this.widthScale <= 1.0) { -System.err.println ("Invalid alignment character width scaling factor (" + this.widthScale + "). Ignoring."); -this.widthScale = 1; -}if (jalview.bin.JalviewLite.debug) { -System.err.println ("Alignment character width scaling factor is now " + this.widthScale); -}}param = applet.heightScale; -if (param != null) { -try { -this.heightScale = new Float (param).floatValue (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -if (this.heightScale <= 1.0) { -System.err.println ("Invalid alignment character height scaling factor (" + this.heightScale + "). Ignoring."); -this.heightScale = 1; -}if (jalview.bin.JalviewLite.debug) { -System.err.println ("Alignment character height scaling factor is now " + this.heightScale); -}}}this.setFont (this.font); -this.MAC = jalview.util.Platform.isAMac (); -if (applet != null) { -this.setShowJVSuffix (applet.getDefaultParameter ("showFullId", this.getShowJVSuffix ())); -this.setShowAnnotation (applet.getDefaultParameter ("showAnnotation", this.isShowAnnotation ())); -this.showConservation = applet.getDefaultParameter ("showConservation", this.showConservation); -this.showQuality = applet.getDefaultParameter ("showQuality", this.showQuality); -this.showConsensus = applet.getDefaultParameter ("showConsensus", this.showConsensus); -this.setShowUnconserved (applet.getDefaultParameter ("showUnconserved", this.getShowUnconserved ())); -this.setScaleProteinAsCdna (applet.getDefaultParameter ("scaleProteinAsCdna", this.isScaleProteinAsCdna ())); -var param = applet.upperCase; -if (param != null) { -if (param.equalsIgnoreCase ("bold")) { -this.setUpperCasebold (true); -}}this.sortByTree = applet.getDefaultParameter ("sortByTree", this.sortByTree); -this.setFollowHighlight (applet.getDefaultParameter ("automaticScrolling", this.isFollowHighlight ())); -this.followSelection = this.isFollowHighlight (); -this.showSequenceLogo = applet.getDefaultParameter ("showSequenceLogo", this.showSequenceLogo); -this.normaliseSequenceLogo = applet.getDefaultParameter ("normaliseSequenceLogo", applet.getDefaultParameter ("normaliseLogo", this.normaliseSequenceLogo)); -this.showGroupConsensus = applet.getDefaultParameter ("showGroupConsensus", this.showGroupConsensus); -this.showGroupConservation = applet.getDefaultParameter ("showGroupConservation", this.showGroupConservation); -this.showConsensusHistogram = applet.getDefaultParameter ("showConsensusHistogram", this.showConsensusHistogram); -}if (applet != null) { -var colour = applet.defaultColour; -if (colour == null) { -colour = applet.userDefinedColour; -if (colour != null) { -colour = "User Defined"; -}}if (colour != null) { -this.globalColourScheme = jalview.schemes.ColourSchemeProperty.getColour (this.alignment, colour); -if (this.globalColourScheme != null) { -this.globalColourScheme.setConsensus (this.hconsensus); -}}if (applet.userDefinedColour != null) { -(this.globalColourScheme).parseAppletParameter (applet.userDefinedColour); -}}this.initAutoAnnotation (); -}, "jalview.datamodel.AlignmentI,jalview.bin.JalviewLite"); -Clazz.defineMethod (c$, "getConsensusSeq", -function () { -if (this.consensus == null) { -this.updateConsensus (null); -}if (this.consensus == null) { -return null; -}var seqs = new StringBuilder (this.consensus.annotations.length); -for (var i = 0; i < this.consensus.annotations.length; i++) { -if (this.consensus.annotations[i] != null) { -if (this.consensus.annotations[i].description.charAt (0) == '[') { -seqs.append (this.consensus.annotations[i].description.charAt (1)); -} else { -seqs.append (this.consensus.annotations[i].displayCharacter); -}}} -var sq = new jalview.datamodel.Sequence ("Consensus", seqs.toString ()); -sq.setDescription ("Percentage Identity Consensus " + ((this.ignoreGapsInConsensusCalculation) ? " without gaps" : "")); -return sq; -}); -Clazz.defineMethod (c$, "setFont", -function (f) { -this.font = f; -if (this.nullFrame == null) { -this.nullFrame = new awt2swing.Frame (); -this.nullFrame.addNotify (); -this.nullFrame.setFont (this.font); -}var fm = this.nullFrame.getGraphics ().getFontMetrics (this.font); -this.setCharHeight (Clazz.floatToInt (this.heightScale * fm.getHeight ())); -this.setCharWidth (Clazz.floatToInt (this.widthScale * fm.charWidth ('M'))); -if (this.isUpperCasebold ()) { -var f2 = new java.awt.Font (f.getName (), 1, f.getSize ()); -fm = this.nullFrame.getGraphics ().getFontMetrics (f2); -this.setCharWidth (Clazz.floatToInt (this.widthScale * (Clazz.doubleToInt (fm.stringWidth ("MMMMMMMMMMM") / 10)))); -}}, "java.awt.Font"); -Clazz.defineMethod (c$, "getFont", -function () { -return this.font; -}); -Clazz.defineMethod (c$, "resetSeqLimits", -function (height) { -this.setEndSeq (Clazz.doubleToInt (height / this.getCharHeight ())); -}, "~N"); -Clazz.defineMethod (c$, "setCurrentTree", -function (tree) { -this.currentTree = tree; -}, "jalview.analysis.NJTree"); -Clazz.defineMethod (c$, "getCurrentTree", -function () { -return this.currentTree; -}); -Clazz.defineMethod (c$, "getCentreColumnLabels", -function () { -return this.centreColumnLabels; -}); -Clazz.defineMethod (c$, "getFollowSelection", -function () { -return this.followSelection; -}); -Clazz.overrideMethod (c$, "sendSelection", -function () { -this.getStructureSelectionManager ().sendSelection ( new jalview.datamodel.SequenceGroup (this.getSelectionGroup ()), new jalview.datamodel.ColumnSelection (this.getColumnSelection ()), this); -}); -Clazz.overrideMethod (c$, "getStructureSelectionManager", -function () { -return jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.applet); -}); -Clazz.defineMethod (c$, "expandColSelection", -function (sg, wholewidth) { -var sgs; -var sge; -if (sg != null && (sgs = sg.getStartRes ()) >= 0 && sg.getStartRes () <= (sge = sg.getEndRes ()) && (this.colSel == null || this.colSel.getSelected () == null || this.colSel.getSelected ().size () == 0)) { -if (!wholewidth && this.alignment.getWidth () == (1 + sge - sgs)) { -return; -}if (this.colSel == null) { -this.colSel = new jalview.datamodel.ColumnSelection (); -}for (var cspos = sg.getStartRes (); cspos <= sg.getEndRes (); cspos++) { -this.colSel.addElement (cspos); -} -}}, "jalview.datamodel.SequenceGroup,~B"); -Clazz.overrideMethod (c$, "isNormaliseSequenceLogo", -function () { -return this.normaliseSequenceLogo; -}); -Clazz.defineMethod (c$, "setNormaliseSequenceLogo", -function (state) { -this.normaliseSequenceLogo = state; -}, "~B"); -Clazz.overrideMethod (c$, "isValidCharWidth", -function () { -return this.validCharWidth; -}); -Clazz.defineMethod (c$, "getAnnotationColumnSelectionState", -function () { -return this.annotationColumnSelectionState; -}); -Clazz.defineMethod (c$, "setAnnotationColumnSelectionState", -function (annotationColumnSelectionState) { -this.annotationColumnSelectionState = annotationColumnSelectionState; -}, "jalview.appletgui.AnnotationColumnChooser"); -Clazz.overrideMethod (c$, "mirrorCommand", -function (command, undo, ssm, source) { -if (Clazz.instanceOf (source, jalview.api.AlignViewportI) && (source).getCodingComplement () === this) { -} else { -return; -}var mappedCommand = ssm.mapCommand (command, undo, this.getAlignment (), this.getGapCharacter ()); -if (mappedCommand != null) { -mappedCommand.doCommand (null); -this.firePropertyChange ("alignment", null, this.getAlignment ().getSequences ()); -}}, "jalview.commands.CommandI,~B,jalview.structure.StructureSelectionManager,jalview.structure.VamsasSource"); -Clazz.overrideMethod (c$, "getVamsasSource", -function () { -return this; -}); -Clazz.defineMethod (c$, "scrollComplementaryAlignment", -function (complementPanel) { -if (complementPanel == null) { -return; -}var sr = new jalview.datamodel.SearchResults (); -var seqOffset = this.findComplementScrollTarget (sr); -if (!sr.isEmpty ()) { -complementPanel.setFollowingComplementScroll (true); -complementPanel.scrollToCentre (sr, seqOffset); -}}, "jalview.appletgui.AlignmentPanel"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.structure.CommandListener", "$.SelectionSource", "$.VamsasSource", "jalview.viewmodel.AlignmentViewport", "java.awt.Font"], "jalview.appletgui.AlignViewport", ["awt2swing.Frame", "jalview.api.AlignViewportI", "jalview.bin.JalviewLite", "jalview.datamodel.ColumnSelection", "$.SearchResults", "$.Sequence", "$.SequenceGroup", "jalview.schemes.ColourSchemeProperty", "jalview.structure.StructureSelectionManager", "jalview.util.Platform", "jalview.workers.AlignCalcManager", "java.lang.Float", "$.StringBuilder"], function () { +c$ = Clazz.decorateAsClass (function () { +this.cursorMode = false; +this.font = null; +this.validCharWidth = true; +this.currentTree = null; +this.applet = null; +this.MAC = false; +this.annotationColumnSelectionState = null; +this.nullFrame = null; +this.featureSettings = null; +this.heightScale = 1; +this.widthScale = 1; +this.centreColumnLabels = false; +this.followSelection = true; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AlignViewport", jalview.viewmodel.AlignmentViewport, [jalview.structure.SelectionSource, jalview.structure.VamsasSource, jalview.structure.CommandListener]); +Clazz.prepareFields (c$, function () { +this.font = new java.awt.Font ("SansSerif", 0, 10); +}); +Clazz.overrideMethod (c$, "finalize", +function () { +this.applet = null; +this.quality = null; +this.alignment = null; +this.colSel = null; +}); +Clazz.makeConstructor (c$, +function (al, applet) { +Clazz.superConstructor (this, jalview.appletgui.AlignViewport); +this.calculator = new jalview.workers.AlignCalcManager (); +this.applet = applet; +this.alignment = al; +this.setPadGaps (true); +this.startRes = 0; +this.endRes = al.getWidth () - 1; +this.startSeq = 0; +this.endSeq = al.getHeight () - 1; +if (applet != null) { +var param = applet.widthScale; +if (param != null) { +try { +this.widthScale = new Float (param).floatValue (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +if (this.widthScale <= 1.0) { +System.err.println ("Invalid alignment character width scaling factor (" + this.widthScale + "). Ignoring."); +this.widthScale = 1; +}if (jalview.bin.JalviewLite.debug) { +System.err.println ("Alignment character width scaling factor is now " + this.widthScale); +}}param = applet.heightScale; +if (param != null) { +try { +this.heightScale = new Float (param).floatValue (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +if (this.heightScale <= 1.0) { +System.err.println ("Invalid alignment character height scaling factor (" + this.heightScale + "). Ignoring."); +this.heightScale = 1; +}if (jalview.bin.JalviewLite.debug) { +System.err.println ("Alignment character height scaling factor is now " + this.heightScale); +}}}this.setFont (this.font); +this.MAC = jalview.util.Platform.isAMac (); +if (applet != null) { +this.setShowJVSuffix (applet.getDefaultParameter ("showFullId", this.getShowJVSuffix ())); +this.setShowAnnotation (applet.getDefaultParameter ("showAnnotation", this.isShowAnnotation ())); +this.showConservation = applet.getDefaultParameter ("showConservation", this.showConservation); +this.showQuality = applet.getDefaultParameter ("showQuality", this.showQuality); +this.showConsensus = applet.getDefaultParameter ("showConsensus", this.showConsensus); +this.setShowUnconserved (applet.getDefaultParameter ("showUnconserved", this.getShowUnconserved ())); +this.setScaleProteinAsCdna (applet.getDefaultParameter ("scaleProteinAsCdna", this.isScaleProteinAsCdna ())); +var param = applet.upperCase; +if (param != null) { +if (param.equalsIgnoreCase ("bold")) { +this.setUpperCasebold (true); +}}this.sortByTree = applet.getDefaultParameter ("sortByTree", this.sortByTree); +this.setFollowHighlight (applet.getDefaultParameter ("automaticScrolling", this.isFollowHighlight ())); +this.followSelection = this.isFollowHighlight (); +this.showSequenceLogo = applet.getDefaultParameter ("showSequenceLogo", this.showSequenceLogo); +this.normaliseSequenceLogo = applet.getDefaultParameter ("normaliseSequenceLogo", applet.getDefaultParameter ("normaliseLogo", this.normaliseSequenceLogo)); +this.showGroupConsensus = applet.getDefaultParameter ("showGroupConsensus", this.showGroupConsensus); +this.showGroupConservation = applet.getDefaultParameter ("showGroupConservation", this.showGroupConservation); +this.showConsensusHistogram = applet.getDefaultParameter ("showConsensusHistogram", this.showConsensusHistogram); +}if (applet != null) { +var colour = applet.defaultColour; +if (colour == null) { +colour = applet.userDefinedColour; +if (colour != null) { +colour = "User Defined"; +}}if (colour != null) { +this.globalColourScheme = jalview.schemes.ColourSchemeProperty.getColour (this.alignment, colour); +if (this.globalColourScheme != null) { +this.globalColourScheme.setConsensus (this.hconsensus); +}}if (applet.userDefinedColour != null) { +(this.globalColourScheme).parseAppletParameter (applet.userDefinedColour); +}}this.initAutoAnnotation (); +}, "jalview.datamodel.AlignmentI,jalview.bin.JalviewLite"); +Clazz.defineMethod (c$, "getConsensusSeq", +function () { +if (this.consensus == null) { +this.updateConsensus (null); +}if (this.consensus == null) { +return null; +}var seqs = new StringBuilder (this.consensus.annotations.length); +for (var i = 0; i < this.consensus.annotations.length; i++) { +if (this.consensus.annotations[i] != null) { +if (this.consensus.annotations[i].description.charAt (0) == '[') { +seqs.append (this.consensus.annotations[i].description.charAt (1)); +} else { +seqs.append (this.consensus.annotations[i].displayCharacter); +}}} +var sq = new jalview.datamodel.Sequence ("Consensus", seqs.toString ()); +sq.setDescription ("Percentage Identity Consensus " + ((this.ignoreGapsInConsensusCalculation) ? " without gaps" : "")); +return sq; +}); +Clazz.defineMethod (c$, "setFont", +function (f) { +this.font = f; +if (this.nullFrame == null) { +this.nullFrame = new awt2swing.Frame (); +this.nullFrame.addNotify (); +this.nullFrame.setFont (this.font); +}var fm = this.nullFrame.getGraphics ().getFontMetrics (this.font); +this.setCharHeight (Clazz.floatToInt (this.heightScale * fm.getHeight ())); +this.setCharWidth (Clazz.floatToInt (this.widthScale * fm.charWidth ('M'))); +if (this.isUpperCasebold ()) { +var f2 = new java.awt.Font (f.getName (), 1, f.getSize ()); +fm = this.nullFrame.getGraphics ().getFontMetrics (f2); +this.setCharWidth (Clazz.floatToInt (this.widthScale * (Clazz.doubleToInt (fm.stringWidth ("MMMMMMMMMMM") / 10)))); +}}, "java.awt.Font"); +Clazz.defineMethod (c$, "getFont", +function () { +return this.font; +}); +Clazz.defineMethod (c$, "resetSeqLimits", +function (height) { +this.setEndSeq (Clazz.doubleToInt (height / this.getCharHeight ())); +}, "~N"); +Clazz.defineMethod (c$, "setCurrentTree", +function (tree) { +this.currentTree = tree; +}, "jalview.analysis.NJTree"); +Clazz.defineMethod (c$, "getCurrentTree", +function () { +return this.currentTree; +}); +Clazz.defineMethod (c$, "getCentreColumnLabels", +function () { +return this.centreColumnLabels; +}); +Clazz.defineMethod (c$, "getFollowSelection", +function () { +return this.followSelection; +}); +Clazz.overrideMethod (c$, "sendSelection", +function () { +this.getStructureSelectionManager ().sendSelection ( new jalview.datamodel.SequenceGroup (this.getSelectionGroup ()), new jalview.datamodel.ColumnSelection (this.getColumnSelection ()), this); +}); +Clazz.overrideMethod (c$, "getStructureSelectionManager", +function () { +return jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.applet); +}); +Clazz.defineMethod (c$, "expandColSelection", +function (sg, wholewidth) { +var sgs; +var sge; +if (sg != null && (sgs = sg.getStartRes ()) >= 0 && sg.getStartRes () <= (sge = sg.getEndRes ()) && (this.colSel == null || this.colSel.getSelected () == null || this.colSel.getSelected ().size () == 0)) { +if (!wholewidth && this.alignment.getWidth () == (1 + sge - sgs)) { +return; +}if (this.colSel == null) { +this.colSel = new jalview.datamodel.ColumnSelection (); +}for (var cspos = sg.getStartRes (); cspos <= sg.getEndRes (); cspos++) { +this.colSel.addElement (cspos); +} +}}, "jalview.datamodel.SequenceGroup,~B"); +Clazz.overrideMethod (c$, "isNormaliseSequenceLogo", +function () { +return this.normaliseSequenceLogo; +}); +Clazz.defineMethod (c$, "setNormaliseSequenceLogo", +function (state) { +this.normaliseSequenceLogo = state; +}, "~B"); +Clazz.overrideMethod (c$, "isValidCharWidth", +function () { +return this.validCharWidth; +}); +Clazz.defineMethod (c$, "getAnnotationColumnSelectionState", +function () { +return this.annotationColumnSelectionState; +}); +Clazz.defineMethod (c$, "setAnnotationColumnSelectionState", +function (annotationColumnSelectionState) { +this.annotationColumnSelectionState = annotationColumnSelectionState; +}, "jalview.appletgui.AnnotationColumnChooser"); +Clazz.overrideMethod (c$, "mirrorCommand", +function (command, undo, ssm, source) { +if (Clazz.instanceOf (source, jalview.api.AlignViewportI) && (source).getCodingComplement () === this) { +} else { +return; +}var mappedCommand = ssm.mapCommand (command, undo, this.getAlignment (), this.getGapCharacter ()); +if (mappedCommand != null) { +mappedCommand.doCommand (null); +this.firePropertyChange ("alignment", null, this.getAlignment ().getSequences ()); +}}, "jalview.commands.CommandI,~B,jalview.structure.StructureSelectionManager,jalview.structure.VamsasSource"); +Clazz.overrideMethod (c$, "getVamsasSource", +function () { +return this; +}); +Clazz.defineMethod (c$, "scrollComplementaryAlignment", +function (complementPanel) { +if (complementPanel == null) { +return; +}var sr = new jalview.datamodel.SearchResults (); +var seqOffset = this.findComplementScrollTarget (sr); +if (!sr.isEmpty ()) { +complementPanel.setFollowingComplementScroll (true); +complementPanel.scrollToCentre (sr, seqOffset); +}}, "jalview.appletgui.AlignmentPanel"); +}); diff --git a/bin/jalview/appletgui/AlignmentPanel.class b/bin/jalview/appletgui/AlignmentPanel.class index 49b001d8f0394147933691667a0897a5f37cdcd4..873616b98337e323f953eef0387f01b71f2ac02e 100644 GIT binary patch delta 96 zcmdnFjB(L2#tk+WjDeeNEgms4=P__hR{tpl1q|N0%4UB?<3@m>cY(Wx#7z`PIF*t4J^fO=u0R1}|6951J delta 119 zcmZ3qjB)2O#tk+WjA@%~Egms4H#2ZfR+|Z>Fr-4yOh=KJlgDptr4}&4&F9v(2 J&7XV?SOG1a8w3CV diff --git a/bin/jalview/appletgui/AlignmentPanel.js b/bin/jalview/appletgui/AlignmentPanel.js index 8989731..1d6069d 100644 --- a/bin/jalview/appletgui/AlignmentPanel.js +++ b/bin/jalview/appletgui/AlignmentPanel.js @@ -1,610 +1,610 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "jalview.api.AlignmentViewPanel", "java.awt.event.AdjustmentListener", "awt2swing.Scrollbar"], "jalview.appletgui.AlignmentPanel", ["awt2swing.Frame", "jalview.analysis.AnnotationSorter", "jalview.appletgui.AnnotationLabels", "$.AnnotationPanel", "$.FeatureRenderer", "$.IdPanel", "$.IdwidthAdjuster", "$.PaintRefresher", "$.ScalePanel", "$.SeqPanel", "jalview.bin.JalviewLite", "jalview.structure.StructureSelectionManager", "java.awt.BorderLayout", "$.Color", "$.Dimension", "java.awt.event.ComponentAdapter", "java.beans.PropertyChangeListener"], function () { -c$ = Clazz.decorateAsClass (function () { -this.av = null; -this.overviewPanel = null; -this.seqPanel = null; -this.idPanel = null; -this.idwidthAdjuster = null; -this.alignFrame = null; -this.scalePanel = null; -this.annotationPanel = null; -this.alabels = null; -this.fastPaint = true; -this.hextent = 0; -this.vextent = 0; -this.sequenceHolderPanel = null; -this.vscroll = null; -this.hscroll = null; -this.seqPanelHolder = null; -this.scalePanelHolder = null; -this.idPanelHolder = null; -this.idSpaceFillerPanel1 = null; -this.annotationSpaceFillerHolder = null; -this.hscrollFillerPanel = null; -this.annotationPanelHolder = null; -this.apvscroll = null; -this.followingComplementScroll = false; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "AlignmentPanel", awt2swing.Panel, [java.awt.event.AdjustmentListener, jalview.api.AlignmentViewPanel]); -Clazz.prepareFields (c$, function () { -this.sequenceHolderPanel = new awt2swing.Panel (); -this.vscroll = new awt2swing.Scrollbar (); -this.hscroll = new awt2swing.Scrollbar (); -this.seqPanelHolder = new awt2swing.Panel (); -this.scalePanelHolder = new awt2swing.Panel (); -this.idPanelHolder = new awt2swing.Panel (); -this.idSpaceFillerPanel1 = new awt2swing.Panel (); -this.annotationSpaceFillerHolder = new awt2swing.Panel (); -this.hscrollFillerPanel = new awt2swing.Panel (); -this.annotationPanelHolder = new awt2swing.Panel (); -this.apvscroll = new awt2swing.Scrollbar (); -}); -Clazz.overrideMethod (c$, "finalize", -function () { -this.alignFrame = null; -this.av = null; -this.seqPanel = null; -this.seqPanelHolder = null; -this.sequenceHolderPanel = null; -this.scalePanel = null; -this.scalePanelHolder = null; -this.annotationPanel = null; -this.annotationPanelHolder = null; -this.annotationSpaceFillerHolder = null; -}); -Clazz.makeConstructor (c$, -function (af, av) { -Clazz.superConstructor (this, jalview.appletgui.AlignmentPanel, []); -this.setName ("alignmentPanel"); -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -this.alignFrame = af; -this.av = av; -this.seqPanel = new jalview.appletgui.SeqPanel (av, this); -this.idPanel = new jalview.appletgui.IdPanel (av, this); -this.scalePanel = new jalview.appletgui.ScalePanel (av, this); -this.idwidthAdjuster = new jalview.appletgui.IdwidthAdjuster (this); -this.annotationPanel = new jalview.appletgui.AnnotationPanel (this); -this.annotationPanelHolder.add (this.annotationPanel, "Center"); -this.sequenceHolderPanel.add (this.annotationPanelHolder, "South"); -this.alabels = new jalview.appletgui.AnnotationLabels (this); -this.setAnnotationVisible (av.isShowAnnotation ()); -this.idPanelHolder.add (this.idPanel, "Center"); -this.idSpaceFillerPanel1.add (this.idwidthAdjuster, "Center"); -this.annotationSpaceFillerHolder.add (this.alabels, "Center"); -this.scalePanelHolder.add (this.scalePanel, "Center"); -this.seqPanelHolder.add (this.seqPanel, "Center"); -this.fontChanged (); -this.setScrollValues (0, 0); -this.apvscroll.addAdjustmentListener (this); -this.hscroll.addAdjustmentListener (this); -this.vscroll.addAdjustmentListener (this); -this.addComponentListener (((Clazz.isClassDefined ("jalview.appletgui.AlignmentPanel$1") ? 0 : jalview.appletgui.AlignmentPanel.$AlignmentPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignmentPanel$1, this, Clazz.cloneFinals ("av", av)))); -var d = this.calculateIdWidth (); -this.idPanel.idCanvas.setSize (d); -this.hscrollFillerPanel.setSize (d.width, this.annotationPanel.getSize ().height); -this.idPanel.idCanvas.setSize (d.width, this.seqPanel.seqCanvas.getSize ().height); -this.annotationSpaceFillerHolder.setSize (d.width, this.annotationPanel.getSize ().height); -this.alabels.setSize (d.width, this.annotationPanel.getSize ().height); -var ap = this; -av.addPropertyChangeListener (((Clazz.isClassDefined ("jalview.appletgui.AlignmentPanel$2") ? 0 : jalview.appletgui.AlignmentPanel.$AlignmentPanel$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignmentPanel$2, this, Clazz.cloneFinals ("ap", ap, "av", av)))); -}, "jalview.appletgui.AlignFrame,jalview.appletgui.AlignViewport"); -Clazz.overrideMethod (c$, "getAlignViewport", -function () { -return this.av; -}); -Clazz.defineMethod (c$, "getSequenceRenderer", -function () { -return this.seqPanel.seqCanvas.sr; -}); -Clazz.overrideMethod (c$, "getFeatureRenderer", -function () { -return this.seqPanel.seqCanvas.fr; -}); -Clazz.overrideMethod (c$, "cloneFeatureRenderer", -function () { -var nfr = new jalview.appletgui.FeatureRenderer (this.av); -nfr.transferSettings (this.seqPanel.seqCanvas.fr); -return nfr; -}); -Clazz.defineMethod (c$, "alignmentChanged", -function () { -this.av.alignmentChanged (this); -if (this.overviewPanel != null) { -this.overviewPanel.updateOverviewImage (); -}this.alignFrame.updateEditMenuBar (); -this.repaint (); -}); -Clazz.defineMethod (c$, "fontChanged", -function () { -this.idPanel.idCanvas.image = null; -var fm = this.getFontMetrics (this.av.getFont ()); -this.scalePanel.setSize ( new java.awt.Dimension (10, this.av.getCharHeight () + fm.getDescent ())); -this.idwidthAdjuster.setSize ( new java.awt.Dimension (10, this.av.getCharHeight () + fm.getDescent ())); -this.av.updateSequenceIdColours (); -this.annotationPanel.image = null; -var ap = this.annotationPanel.adjustPanelHeight (false); -var d = this.calculateIdWidth (); -d.setSize (d.width + 4, this.seqPanel.seqCanvas.getSize ().height); -this.alabels.setSize (d.width + 4, ap); -this.idPanel.idCanvas.setSize (d); -this.hscrollFillerPanel.setSize (d); -this.validateAnnotationDimensions (false); -this.annotationPanel.repaint (); -this.validate (); -this.repaint (); -if (this.overviewPanel != null) { -this.overviewPanel.updateOverviewImage (); -}}); -Clazz.defineMethod (c$, "setIdWidth", -function (w, h) { -this.idPanel.idCanvas.setSize (w, h); -this.idPanelHolder.setSize (w, this.idPanelHolder.getSize ().height); -this.annotationSpaceFillerHolder.setSize (w, this.annotationSpaceFillerHolder.getSize ().height); -this.alabels.setSize (w, this.alabels.getSize ().height); -this.validate (); -}, "~N,~N"); -Clazz.defineMethod (c$, "calculateIdWidth", -function () { -if (this.av.nullFrame == null) { -this.av.nullFrame = new awt2swing.Frame (); -this.av.nullFrame.addNotify (); -this.av.nullFrame.setFont (this.av.font); -}var g = this.av.nullFrame.getGraphics (); -var fm = g.getFontMetrics (this.av.font); -var al = this.av.getAlignment (); -var i = 0; -var idWidth = 0; -var id; -while (i < al.getHeight () && al.getSequenceAt (i) != null) { -var s = al.getSequenceAt (i); -id = s.getDisplayId (this.av.getShowJVSuffix ()); -if (fm.stringWidth (id) > idWidth) { -idWidth = fm.stringWidth (id); -}i++; -} -i = 0; -if (al.getAlignmentAnnotation () != null) { -fm = g.getFontMetrics (this.av.nullFrame.getFont ()); -while (i < al.getAlignmentAnnotation ().length) { -var label = al.getAlignmentAnnotation ()[i].label; -if (fm.stringWidth (label) > idWidth) { -idWidth = fm.stringWidth (label); -}i++; -} -}return new java.awt.Dimension (idWidth, this.idPanel.idCanvas.getSize ().height); -}); -Clazz.defineMethod (c$, "highlightSearchResults", -function (results) { -this.scrollToPosition (results); -this.seqPanel.seqCanvas.highlightSearchResults (results); -}, "jalview.datamodel.SearchResults"); -Clazz.defineMethod (c$, "scrollToPosition", -function (results) { -return this.scrollToPosition (results, true); -}, "jalview.datamodel.SearchResults"); -Clazz.defineMethod (c$, "scrollToPosition", -function (results, redrawOverview) { -return this.scrollToPosition (results, redrawOverview, false); -}, "jalview.datamodel.SearchResults,~B"); -Clazz.defineMethod (c$, "scrollToPosition", -function (results, redrawOverview, centre) { -if (results != null && results.getSize () > 0) { -var alignment = this.av.getAlignment (); -var seqIndex = alignment.findIndex (results); -if (seqIndex == -1) { -return false; -}var seq = alignment.getSequenceAt (seqIndex); -var r = results.getResults (seq, 0, alignment.getWidth ()); -if (r == null) { -if (jalview.bin.JalviewLite.debug) { -System.out.println ("DEBUG: scroll didn't happen - results not within alignment : " + seq.getStart () + "," + seq.getEnd ()); -}return false; -}if (jalview.bin.JalviewLite.debug) { -}var start = r[0]; -var end = r[1]; -if (centre) { -var offset = Clazz.doubleToInt ((this.av.getEndRes () - this.av.getStartRes () + 1) / 2) - 1; -start = Math.max (start - offset, 0); -end = Math.min (end + offset, seq.getEnd () - 1); -}if (start < 0) { -return false; -}if (end == seq.getEnd ()) { -return false; -}return this.scrollTo (start, end, seqIndex, false, redrawOverview); -}return true; -}, "jalview.datamodel.SearchResults,~B,~B"); -Clazz.defineMethod (c$, "scrollTo", -function (ostart, end, seqIndex, scrollToNearest, redrawOverview) { -var startv; -var endv; -var starts; -var ends; -var width; -var start = -1; -if (this.av.hasHiddenColumns ()) { -start = this.av.getColumnSelection ().findColumnPosition (ostart); -end = this.av.getColumnSelection ().findColumnPosition (end); -if (start == end) { -if (!scrollToNearest && !this.av.getColumnSelection ().isVisible (ostart)) { -return false; -}}} else { -start = ostart; -}if (!this.av.getWrapAlignment ()) { -if ((startv = this.av.getStartRes ()) >= start) { -this.setScrollValues (start - 1, seqIndex); -} else if ((endv = this.av.getEndRes ()) <= end) { -this.setScrollValues (startv + 1 + end - endv, seqIndex); -} else if ((starts = this.av.getStartSeq ()) > seqIndex) { -this.setScrollValues (this.av.getStartRes (), seqIndex); -} else if ((ends = this.av.getEndSeq ()) <= seqIndex) { -this.setScrollValues (this.av.getStartRes (), starts + seqIndex - ends + 1); -}} else { -this.scrollToWrappedVisible (start); -}if (redrawOverview && this.overviewPanel != null) { -this.overviewPanel.setBoxPosition (); -}this.paintAlignment (redrawOverview); -return true; -}, "~N,~N,~N,~B,~B"); -Clazz.defineMethod (c$, "scrollToWrappedVisible", -function (res) { -var cwidth = this.seqPanel.seqCanvas.getWrappedCanvasWidth (this.seqPanel.seqCanvas.getSize ().width); -if (res <= this.av.getStartRes () || res >= (this.av.getStartRes () + cwidth)) { -this.vscroll.setValue (Clazz.doubleToInt (res / cwidth)); -this.av.startRes = this.vscroll.getValue () * cwidth; -}}, "~N"); -Clazz.defineMethod (c$, "getOverviewPanel", -function () { -return this.overviewPanel; -}); -Clazz.defineMethod (c$, "setOverviewPanel", -function (op) { -this.overviewPanel = op; -}, "jalview.appletgui.OverviewPanel"); -Clazz.defineMethod (c$, "setAnnotationVisible", -function (b) { -if (!this.av.getWrapAlignment ()) { -this.annotationSpaceFillerHolder.setVisible (b); -this.annotationPanelHolder.setVisible (b); -} else { -this.annotationSpaceFillerHolder.setVisible (false); -this.annotationPanelHolder.setVisible (false); -}this.validate (); -this.repaint (); -}, "~B"); -Clazz.overrideMethod (c$, "adjustAnnotationHeight", -function () { -if (this.alignFrame.getSize ().height == 0) { -System.out.println ("adjustAnnotationHeight frame size zero NEEDS FIXING"); -}this.fontChanged (); -this.validateAnnotationDimensions (true); -this.apvscroll.addNotify (); -this.hscroll.addNotify (); -this.validate (); -this.paintAlignment (true); -}); -Clazz.defineMethod (c$, "validateAnnotationDimensions", -function (adjustPanelHeight) { -var rowHeight = this.av.getCharHeight (); -var alignmentHeight = rowHeight * this.av.getAlignment ().getHeight (); -var annotationHeight = this.av.calcPanelHeight (); -var mheight = annotationHeight; -var d = this.sequenceHolderPanel.getSize (); -var availableHeight = d.height - this.scalePanelHolder.getHeight (); -if (adjustPanelHeight) { -if (annotationHeight + alignmentHeight > availableHeight) { -annotationHeight = Math.min (annotationHeight, availableHeight - 2 * rowHeight); -}} else { -annotationHeight = this.annotationPanelHolder.getSize ().height; -}if (availableHeight - annotationHeight < 5) { -annotationHeight = availableHeight; -}this.annotationPanel.setSize ( new java.awt.Dimension (d.width, annotationHeight)); -this.annotationPanelHolder.setSize ( new java.awt.Dimension (d.width, annotationHeight)); -this.seqPanel.seqCanvas.setSize (d.width, this.seqPanel.seqCanvas.getSize ().height); -var e = this.idPanel.getSize (); -this.alabels.setSize ( new java.awt.Dimension (e.width, annotationHeight)); -this.annotationSpaceFillerHolder.setSize ( new java.awt.Dimension (e.width, annotationHeight)); -var s = this.apvscroll.getValue (); -if (s > mheight - annotationHeight) { -s = 0; -}this.apvscroll.setValues (s, annotationHeight, 0, mheight); -this.annotationPanel.setScrollOffset (this.apvscroll.getValue (), false); -this.alabels.setScrollOffset (this.apvscroll.getValue (), false); -}, "~B"); -Clazz.defineMethod (c$, "setWrapAlignment", -function (wrap) { -this.av.startSeq = 0; -this.av.startRes = 0; -this.scalePanelHolder.setVisible (!wrap); -this.hscroll.setVisible (!wrap); -this.idwidthAdjuster.setVisible (!wrap); -if (wrap) { -this.annotationPanelHolder.setVisible (false); -this.annotationSpaceFillerHolder.setVisible (false); -} else if (this.av.isShowAnnotation ()) { -this.annotationPanelHolder.setVisible (true); -this.annotationSpaceFillerHolder.setVisible (true); -}this.idSpaceFillerPanel1.setVisible (!wrap); -this.fontChanged (); -this.validate (); -this.sequenceHolderPanel.validate (); -this.repaint (); -}, "~B"); -Clazz.defineMethod (c$, "scrollUp", -function (up) { -if (up) { -if (this.vscroll.getValue () < 1) { -return false; -}this.setScrollValues (this.hscroll.getValue (), this.vscroll.getValue () - 1); -} else { -if (this.vextent + this.vscroll.getValue () >= this.av.getAlignment ().getHeight ()) { -return false; -}this.setScrollValues (this.hscroll.getValue (), this.vscroll.getValue () + 1); -}this.repaint (); -return true; -}, "~B"); -Clazz.defineMethod (c$, "scrollRight", -function (right) { -if (!right) { -if (this.hscroll.getValue () < 1) { -return false; -}this.setScrollValues (this.hscroll.getValue () - 1, this.vscroll.getValue ()); -} else { -if (this.hextent + this.hscroll.getValue () >= this.av.getAlignment ().getWidth ()) { -return false; -}this.setScrollValues (this.hscroll.getValue () + 1, this.vscroll.getValue ()); -}this.repaint (); -return true; -}, "~B"); -Clazz.defineMethod (c$, "setScrollValues", -function (x, y) { -var width = this.av.getAlignment ().getWidth (); -var height = this.av.getAlignment ().getHeight (); -if (this.av.hasHiddenColumns ()) { -width = this.av.getColumnSelection ().findColumnPosition (width); -}if (x < 0) { -x = 0; -};this.hextent = Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().width / this.av.getCharWidth ()); -this.vextent = Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().height / this.av.getCharHeight ()); -if (this.hextent > width) { -this.hextent = width; -}if (this.vextent > height) { -this.vextent = height; -}if ((this.hextent + x) > width) { -System.err.println ("hextent was " + this.hextent + " and x was " + x); -x = width - this.hextent; -}if ((this.vextent + y) > height) { -y = height - this.vextent; -}if (y < 0) { -y = 0; -}if (x < 0) { -System.err.println ("x was " + x); -x = 0; -}this.av.setStartSeq (y); -var endSeq = y + this.vextent; -if (endSeq > this.av.getAlignment ().getHeight ()) { -endSeq = this.av.getAlignment ().getHeight (); -}this.av.setEndSeq (endSeq); -this.av.setStartRes (x); -this.av.setEndRes ((x + (Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().width / this.av.getCharWidth ()))) - 1); -this.hscroll.setValues (x, this.hextent, 0, width); -this.vscroll.setValues (y, this.vextent, 0, height); -if (this.overviewPanel != null) { -this.overviewPanel.setBoxPosition (); -}this.sendViewPosition (); -}, "~N,~N"); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -if (this.annotationPanel == null) return; -var oldX = this.av.getStartRes (); -var oldY = this.av.getStartSeq (); -if (evt == null || evt.getSource () === this.apvscroll) { -this.annotationPanel.setScrollOffset (this.apvscroll.getValue (), false); -this.alabels.setScrollOffset (this.apvscroll.getValue (), false); -}if (evt == null || evt.getSource () === this.hscroll) { -var x = this.hscroll.getValue (); -this.av.setStartRes (x); -this.av.setEndRes (x + Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().width / this.av.getCharWidth ()) - 1); -}if (evt == null || evt.getSource () === this.vscroll) { -var offy = this.vscroll.getValue (); -if (this.av.getWrapAlignment ()) { -var rowSize = this.seqPanel.seqCanvas.getWrappedCanvasWidth (this.seqPanel.seqCanvas.getSize ().width); -this.av.setStartRes (this.vscroll.getValue () * rowSize); -this.av.setEndRes ((this.vscroll.getValue () + 1) * rowSize); -} else { -this.av.setStartSeq (offy); -this.av.setEndSeq (offy + Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().height / this.av.getCharHeight ())); -}}if (this.overviewPanel != null) { -this.overviewPanel.setBoxPosition (); -}var scrollX = this.av.startRes - oldX; -var scrollY = this.av.startSeq - oldY; -if (this.av.getWrapAlignment () || !this.fastPaint || this.av.MAC) { -this.repaint (); -} else { -if (scrollX > this.av.endRes - this.av.startRes) { -scrollX = this.av.endRes - this.av.startRes; -} else if (scrollX < this.av.startRes - this.av.endRes) { -scrollX = this.av.startRes - this.av.endRes; -}this.idPanel.idCanvas.fastPaint (scrollY); -this.seqPanel.seqCanvas.fastPaint (scrollX, scrollY); -this.scalePanel.repaint (); -if (this.av.isShowAnnotation ()) { -this.annotationPanel.fastPaint (this.av.getStartRes () - oldX); -}}this.sendViewPosition (); -if (this.isFollowingComplementScroll ()) { -this.setFollowingComplementScroll (false); -} else { -var ap = this.getComplementPanel (); -this.av.scrollComplementaryAlignment (ap); -}}, "java.awt.event.AdjustmentEvent"); -Clazz.defineMethod (c$, "getComplementPanel", -($fz = function () { -var ap = null; -if (this.alignFrame != null) { -var sf = this.alignFrame.getSplitFrame (); -if (sf != null) { -var other = sf.getComplement (this.alignFrame); -if (other != null) { -ap = other.alignPanel; -}}}return ap; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "scrollToCentre", -function (sr, seqOffset) { -var mappedTo = sr.getResultSequence (0); -var seqs = this.av.getAlignment ().getSequences (); -var sequenceIndex = 0; -var matched = false; -for (var seq, $seq = seqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -if (mappedTo === seq.getDatasetSequence ()) { -matched = true; -break; -}sequenceIndex++; -} -if (!matched) { -return; -}sequenceIndex = Math.max (0, sequenceIndex - seqOffset); -sr.getResults ().get (0).setSequence (this.av.getAlignment ().getSequenceAt (sequenceIndex)); -this.setFollowingComplementScroll (true); -this.scrollToPosition (sr, true, true); -}, "jalview.datamodel.SearchResults,~N"); -Clazz.defineMethod (c$, "sendViewPosition", -($fz = function () { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet).sendViewPosition (this, this.av.startRes, this.av.endRes, this.av.startSeq, this.av.endSeq); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "paintAlignment", -function (updateOverview) { -var sorter = new jalview.analysis.AnnotationSorter (this.getAlignment (), this.av.isShowAutocalculatedAbove ()); -sorter.sort (this.getAlignment ().getAlignmentAnnotation (), this.av.getSortAnnotationsBy ()); -this.repaint (); -if (updateOverview) { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet).sequenceColoursChanged (this); -if (this.overviewPanel != null) { -this.overviewPanel.updateOverviewImage (); -}}}, "~B"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -System.out.println ("alignframe paintcomp"); -this.invalidate (); -var d = this.idPanel.idCanvas.getSize (); -var canvasHeight = this.seqPanel.seqCanvas.getSize ().height; -if (canvasHeight != d.height) { -this.idPanel.idCanvas.setSize (d.width, canvasHeight); -}if (this.av.getWrapAlignment ()) { -var maxwidth = this.av.getAlignment ().getWidth (); -if (this.av.hasHiddenColumns ()) { -maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; -}var canvasWidth = this.seqPanel.seqCanvas.getWrappedCanvasWidth (this.seqPanel.seqCanvas.getSize ().width); -if (canvasWidth > 0) { -var max = Clazz.doubleToInt (maxwidth / canvasWidth); -this.vscroll.setMaximum (1 + max); -this.vscroll.setUnitIncrement (1); -this.vscroll.setVisibleAmount (1); -}} else { -this.setScrollValues (this.av.getStartRes (), this.av.getStartSeq ()); -}}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.setLayout ( new java.awt.BorderLayout ()); -this.sequenceHolderPanel.setLayout ( new java.awt.BorderLayout ()); -this.seqPanelHolder.setLayout ( new java.awt.BorderLayout ()); -this.scalePanelHolder.setBackground (java.awt.Color.white); -this.scalePanelHolder.setLayout ( new java.awt.BorderLayout ()); -this.idPanelHolder.setLayout ( new java.awt.BorderLayout ()); -this.idSpaceFillerPanel1.setBackground (java.awt.Color.white); -this.idSpaceFillerPanel1.setLayout ( new java.awt.BorderLayout ()); -this.annotationSpaceFillerHolder.setBackground (java.awt.Color.white); -this.annotationSpaceFillerHolder.setLayout ( new java.awt.BorderLayout ()); -this.hscroll.setOrientation (0); -var hscrollHolder = new awt2swing.Panel (); -hscrollHolder.setLayout ( new java.awt.BorderLayout ()); -this.hscrollFillerPanel.setBackground (java.awt.Color.white); -this.apvscroll.setOrientation (1); -this.apvscroll.setVisible (true); -this.apvscroll.addAdjustmentListener (this); -this.annotationPanelHolder.setBackground (java.awt.Color.white); -this.annotationPanelHolder.setLayout ( new java.awt.BorderLayout ()); -this.annotationPanelHolder.add (this.apvscroll, "East"); -hscrollHolder.setBackground (java.awt.Color.white); -this.seqPanelHolder.setBackground (java.awt.Color.white); -this.idPanelHolder.setBackground (java.awt.Color.white); -this.sequenceHolderPanel.add (this.scalePanelHolder, "North"); -this.sequenceHolderPanel.add (this.seqPanelHolder, "Center"); -this.seqPanelHolder.add (this.vscroll, "East"); -this.add (this.idPanelHolder, "West"); -this.idPanelHolder.add (this.idSpaceFillerPanel1, "North"); -this.idPanelHolder.add (this.annotationSpaceFillerHolder, "South"); -this.add (hscrollHolder, "South"); -hscrollHolder.add (this.hscroll, "Center"); -hscrollHolder.add (this.hscrollFillerPanel, "West"); -this.add (this.sequenceHolderPanel, "Center"); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "updateAnnotation", -function () { -this.updateAnnotation (false); -}); -Clazz.defineMethod (c$, "updateAnnotation", -function (applyGlobalSettings) { -this.updateAnnotation (applyGlobalSettings, false); -}, "~B"); -Clazz.defineMethod (c$, "updateAnnotation", -function (applyGlobalSettings, preserveNewGroupSettings) { -this.av.updateGroupAnnotationSettings (applyGlobalSettings, preserveNewGroupSettings); -this.adjustAnnotationHeight (); -}, "~B,~B"); -Clazz.overrideMethod (c$, "getAlignment", -function () { -return this.av.getAlignment (); -}); -Clazz.overrideMethod (c$, "getViewName", -function () { -return this.getName (); -}); -Clazz.overrideMethod (c$, "getStructureSelectionManager", -function () { -return jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet); -}); -Clazz.overrideMethod (c$, "raiseOOMWarning", -function (string, error) { -System.err.println ("Out of memory whilst '" + string + "'"); -error.printStackTrace (); -}, "~S,OutOfMemoryError"); -Clazz.defineMethod (c$, "setFollowingComplementScroll", -function (b) { -this.followingComplementScroll = b; -}, "~B"); -Clazz.defineMethod (c$, "isFollowingComplementScroll", -function () { -return this.followingComplementScroll; -}); -c$.$AlignmentPanel$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignmentPanel$1", java.awt.event.ComponentAdapter); -Clazz.overrideMethod (c$, "componentResized", -function (evt) { -this.b$["jalview.appletgui.AlignmentPanel"].setScrollValues (this.f$.av.getStartRes (), this.f$.av.getStartSeq ()); -if (this.b$["jalview.appletgui.AlignmentPanel"].getSize ().height > 0 && this.b$["jalview.appletgui.AlignmentPanel"].annotationPanelHolder.getSize ().height > 0) { -this.b$["jalview.appletgui.AlignmentPanel"].validateAnnotationDimensions (false); -}this.b$["jalview.appletgui.AlignmentPanel"].repaint (); -}, "java.awt.event.ComponentEvent"); -c$ = Clazz.p0p (); -}; -c$.$AlignmentPanel$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignmentPanel$2", null, java.beans.PropertyChangeListener); -Clazz.overrideMethod (c$, "propertyChange", -function (evt) { -if (evt.getPropertyName ().equals ("alignment")) { -jalview.appletgui.PaintRefresher.Refresh (this.f$.ap, this.f$.av.getSequenceSetId (), true, true); -this.b$["jalview.appletgui.AlignmentPanel"].alignmentChanged (); -}}, "java.beans.PropertyChangeEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "jalview.api.AlignmentViewPanel", "java.awt.event.AdjustmentListener", "awt2swing.Scrollbar"], "jalview.appletgui.AlignmentPanel", ["awt2swing.Frame", "jalview.analysis.AnnotationSorter", "jalview.appletgui.AnnotationLabels", "$.AnnotationPanel", "$.FeatureRenderer", "$.IdPanel", "$.IdwidthAdjuster", "$.PaintRefresher", "$.ScalePanel", "$.SeqPanel", "jalview.bin.JalviewLite", "jalview.structure.StructureSelectionManager", "java.awt.BorderLayout", "$.Color", "$.Dimension", "java.awt.event.ComponentAdapter", "java.beans.PropertyChangeListener"], function () { +c$ = Clazz.decorateAsClass (function () { +this.av = null; +this.overviewPanel = null; +this.seqPanel = null; +this.idPanel = null; +this.idwidthAdjuster = null; +this.alignFrame = null; +this.scalePanel = null; +this.annotationPanel = null; +this.alabels = null; +this.fastPaint = true; +this.hextent = 0; +this.vextent = 0; +this.sequenceHolderPanel = null; +this.vscroll = null; +this.hscroll = null; +this.seqPanelHolder = null; +this.scalePanelHolder = null; +this.idPanelHolder = null; +this.idSpaceFillerPanel1 = null; +this.annotationSpaceFillerHolder = null; +this.hscrollFillerPanel = null; +this.annotationPanelHolder = null; +this.apvscroll = null; +this.followingComplementScroll = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AlignmentPanel", awt2swing.Panel, [java.awt.event.AdjustmentListener, jalview.api.AlignmentViewPanel]); +Clazz.prepareFields (c$, function () { +this.sequenceHolderPanel = new awt2swing.Panel (); +this.vscroll = new awt2swing.Scrollbar (); +this.hscroll = new awt2swing.Scrollbar (); +this.seqPanelHolder = new awt2swing.Panel (); +this.scalePanelHolder = new awt2swing.Panel (); +this.idPanelHolder = new awt2swing.Panel (); +this.idSpaceFillerPanel1 = new awt2swing.Panel (); +this.annotationSpaceFillerHolder = new awt2swing.Panel (); +this.hscrollFillerPanel = new awt2swing.Panel (); +this.annotationPanelHolder = new awt2swing.Panel (); +this.apvscroll = new awt2swing.Scrollbar (); +}); +Clazz.overrideMethod (c$, "finalize", +function () { +this.alignFrame = null; +this.av = null; +this.seqPanel = null; +this.seqPanelHolder = null; +this.sequenceHolderPanel = null; +this.scalePanel = null; +this.scalePanelHolder = null; +this.annotationPanel = null; +this.annotationPanelHolder = null; +this.annotationSpaceFillerHolder = null; +}); +Clazz.makeConstructor (c$, +function (af, av) { +Clazz.superConstructor (this, jalview.appletgui.AlignmentPanel, []); +this.setName ("alignmentPanel"); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.alignFrame = af; +this.av = av; +this.seqPanel = new jalview.appletgui.SeqPanel (av, this); +this.idPanel = new jalview.appletgui.IdPanel (av, this); +this.scalePanel = new jalview.appletgui.ScalePanel (av, this); +this.idwidthAdjuster = new jalview.appletgui.IdwidthAdjuster (this); +this.annotationPanel = new jalview.appletgui.AnnotationPanel (this); +this.annotationPanelHolder.add (this.annotationPanel, "Center"); +this.sequenceHolderPanel.add (this.annotationPanelHolder, "South"); +this.alabels = new jalview.appletgui.AnnotationLabels (this); +this.setAnnotationVisible (av.isShowAnnotation ()); +this.idPanelHolder.add (this.idPanel, "Center"); +this.idSpaceFillerPanel1.add (this.idwidthAdjuster, "Center"); +this.annotationSpaceFillerHolder.add (this.alabels, "Center"); +this.scalePanelHolder.add (this.scalePanel, "Center"); +this.seqPanelHolder.add (this.seqPanel, "Center"); +this.fontChanged (); +this.setScrollValues (0, 0); +this.apvscroll.addAdjustmentListener (this); +this.hscroll.addAdjustmentListener (this); +this.vscroll.addAdjustmentListener (this); +this.addComponentListener (((Clazz.isClassDefined ("jalview.appletgui.AlignmentPanel$1") ? 0 : jalview.appletgui.AlignmentPanel.$AlignmentPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignmentPanel$1, this, Clazz.cloneFinals ("av", av)))); +var d = this.calculateIdWidth (); +this.idPanel.idCanvas.setSize (d); +this.hscrollFillerPanel.setSize (d.width, this.annotationPanel.getSize ().height); +this.idPanel.idCanvas.setSize (d.width, this.seqPanel.seqCanvas.getSize ().height); +this.annotationSpaceFillerHolder.setSize (d.width, this.annotationPanel.getSize ().height); +this.alabels.setSize (d.width, this.annotationPanel.getSize ().height); +var ap = this; +av.addPropertyChangeListener (((Clazz.isClassDefined ("jalview.appletgui.AlignmentPanel$2") ? 0 : jalview.appletgui.AlignmentPanel.$AlignmentPanel$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.AlignmentPanel$2, this, Clazz.cloneFinals ("ap", ap, "av", av)))); +}, "jalview.appletgui.AlignFrame,jalview.appletgui.AlignViewport"); +Clazz.overrideMethod (c$, "getAlignViewport", +function () { +return this.av; +}); +Clazz.defineMethod (c$, "getSequenceRenderer", +function () { +return this.seqPanel.seqCanvas.sr; +}); +Clazz.overrideMethod (c$, "getFeatureRenderer", +function () { +return this.seqPanel.seqCanvas.fr; +}); +Clazz.overrideMethod (c$, "cloneFeatureRenderer", +function () { +var nfr = new jalview.appletgui.FeatureRenderer (this.av); +nfr.transferSettings (this.seqPanel.seqCanvas.fr); +return nfr; +}); +Clazz.defineMethod (c$, "alignmentChanged", +function () { +this.av.alignmentChanged (this); +if (this.overviewPanel != null) { +this.overviewPanel.updateOverviewImage (); +}this.alignFrame.updateEditMenuBar (); +this.repaint (); +}); +Clazz.defineMethod (c$, "fontChanged", +function () { +this.idPanel.idCanvas.image = null; +var fm = this.getFontMetrics (this.av.getFont ()); +this.scalePanel.setSize ( new java.awt.Dimension (10, this.av.getCharHeight () + fm.getDescent ())); +this.idwidthAdjuster.setSize ( new java.awt.Dimension (10, this.av.getCharHeight () + fm.getDescent ())); +this.av.updateSequenceIdColours (); +this.annotationPanel.image = null; +var ap = this.annotationPanel.adjustPanelHeight (false); +var d = this.calculateIdWidth (); +d.setSize (d.width + 4, this.seqPanel.seqCanvas.getSize ().height); +this.alabels.setSize (d.width + 4, ap); +this.idPanel.idCanvas.setSize (d); +this.hscrollFillerPanel.setSize (d); +this.validateAnnotationDimensions (false); +this.annotationPanel.repaint (); +this.validate (); +this.repaint (); +if (this.overviewPanel != null) { +this.overviewPanel.updateOverviewImage (); +}}); +Clazz.defineMethod (c$, "setIdWidth", +function (w, h) { +this.idPanel.idCanvas.setSize (w, h); +this.idPanelHolder.setSize (w, this.idPanelHolder.getSize ().height); +this.annotationSpaceFillerHolder.setSize (w, this.annotationSpaceFillerHolder.getSize ().height); +this.alabels.setSize (w, this.alabels.getSize ().height); +this.validate (); +}, "~N,~N"); +Clazz.defineMethod (c$, "calculateIdWidth", +function () { +if (this.av.nullFrame == null) { +this.av.nullFrame = new awt2swing.Frame (); +this.av.nullFrame.addNotify (); +this.av.nullFrame.setFont (this.av.font); +}var g = this.av.nullFrame.getGraphics (); +var fm = g.getFontMetrics (this.av.font); +var al = this.av.getAlignment (); +var i = 0; +var idWidth = 0; +var id; +while (i < al.getHeight () && al.getSequenceAt (i) != null) { +var s = al.getSequenceAt (i); +id = s.getDisplayId (this.av.getShowJVSuffix ()); +if (fm.stringWidth (id) > idWidth) { +idWidth = fm.stringWidth (id); +}i++; +} +i = 0; +if (al.getAlignmentAnnotation () != null) { +fm = g.getFontMetrics (this.av.nullFrame.getFont ()); +while (i < al.getAlignmentAnnotation ().length) { +var label = al.getAlignmentAnnotation ()[i].label; +if (fm.stringWidth (label) > idWidth) { +idWidth = fm.stringWidth (label); +}i++; +} +}return new java.awt.Dimension (idWidth, this.idPanel.idCanvas.getSize ().height); +}); +Clazz.defineMethod (c$, "highlightSearchResults", +function (results) { +this.scrollToPosition (results); +this.seqPanel.seqCanvas.highlightSearchResults (results); +}, "jalview.datamodel.SearchResults"); +Clazz.defineMethod (c$, "scrollToPosition", +function (results) { +return this.scrollToPosition (results, true); +}, "jalview.datamodel.SearchResults"); +Clazz.defineMethod (c$, "scrollToPosition", +function (results, redrawOverview) { +return this.scrollToPosition (results, redrawOverview, false); +}, "jalview.datamodel.SearchResults,~B"); +Clazz.defineMethod (c$, "scrollToPosition", +function (results, redrawOverview, centre) { +if (results != null && results.getSize () > 0) { +var alignment = this.av.getAlignment (); +var seqIndex = alignment.findIndex (results); +if (seqIndex == -1) { +return false; +}var seq = alignment.getSequenceAt (seqIndex); +var r = results.getResults (seq, 0, alignment.getWidth ()); +if (r == null) { +if (jalview.bin.JalviewLite.debug) { +System.out.println ("DEBUG: scroll didn't happen - results not within alignment : " + seq.getStart () + "," + seq.getEnd ()); +}return false; +}if (jalview.bin.JalviewLite.debug) { +}var start = r[0]; +var end = r[1]; +if (centre) { +var offset = Clazz.doubleToInt ((this.av.getEndRes () - this.av.getStartRes () + 1) / 2) - 1; +start = Math.max (start - offset, 0); +end = Math.min (end + offset, seq.getEnd () - 1); +}if (start < 0) { +return false; +}if (end == seq.getEnd ()) { +return false; +}return this.scrollTo (start, end, seqIndex, false, redrawOverview); +}return true; +}, "jalview.datamodel.SearchResults,~B,~B"); +Clazz.defineMethod (c$, "scrollTo", +function (ostart, end, seqIndex, scrollToNearest, redrawOverview) { +var startv; +var endv; +var starts; +var ends; +var width; +var start = -1; +if (this.av.hasHiddenColumns ()) { +start = this.av.getColumnSelection ().findColumnPosition (ostart); +end = this.av.getColumnSelection ().findColumnPosition (end); +if (start == end) { +if (!scrollToNearest && !this.av.getColumnSelection ().isVisible (ostart)) { +return false; +}}} else { +start = ostart; +}if (!this.av.getWrapAlignment ()) { +if ((startv = this.av.getStartRes ()) >= start) { +this.setScrollValues (start - 1, seqIndex); +} else if ((endv = this.av.getEndRes ()) <= end) { +this.setScrollValues (startv + 1 + end - endv, seqIndex); +} else if ((starts = this.av.getStartSeq ()) > seqIndex) { +this.setScrollValues (this.av.getStartRes (), seqIndex); +} else if ((ends = this.av.getEndSeq ()) <= seqIndex) { +this.setScrollValues (this.av.getStartRes (), starts + seqIndex - ends + 1); +}} else { +this.scrollToWrappedVisible (start); +}if (redrawOverview && this.overviewPanel != null) { +this.overviewPanel.setBoxPosition (); +}this.paintAlignment (redrawOverview); +return true; +}, "~N,~N,~N,~B,~B"); +Clazz.defineMethod (c$, "scrollToWrappedVisible", +function (res) { +var cwidth = this.seqPanel.seqCanvas.getWrappedCanvasWidth (this.seqPanel.seqCanvas.getSize ().width); +if (res <= this.av.getStartRes () || res >= (this.av.getStartRes () + cwidth)) { +this.vscroll.setValue (Clazz.doubleToInt (res / cwidth)); +this.av.startRes = this.vscroll.getValue () * cwidth; +}}, "~N"); +Clazz.defineMethod (c$, "getOverviewPanel", +function () { +return this.overviewPanel; +}); +Clazz.defineMethod (c$, "setOverviewPanel", +function (op) { +this.overviewPanel = op; +}, "jalview.appletgui.OverviewPanel"); +Clazz.defineMethod (c$, "setAnnotationVisible", +function (b) { +if (!this.av.getWrapAlignment ()) { +this.annotationSpaceFillerHolder.setVisible (b); +this.annotationPanelHolder.setVisible (b); +} else { +this.annotationSpaceFillerHolder.setVisible (false); +this.annotationPanelHolder.setVisible (false); +}this.validate (); +this.repaint (); +}, "~B"); +Clazz.overrideMethod (c$, "adjustAnnotationHeight", +function () { +if (this.alignFrame.getSize ().height == 0) { +System.out.println ("adjustAnnotationHeight frame size zero NEEDS FIXING"); +}this.fontChanged (); +this.validateAnnotationDimensions (true); +this.apvscroll.addNotify (); +this.hscroll.addNotify (); +this.validate (); +this.paintAlignment (true); +}); +Clazz.defineMethod (c$, "validateAnnotationDimensions", +function (adjustPanelHeight) { +var rowHeight = this.av.getCharHeight (); +var alignmentHeight = rowHeight * this.av.getAlignment ().getHeight (); +var annotationHeight = this.av.calcPanelHeight (); +var mheight = annotationHeight; +var d = this.sequenceHolderPanel.getSize (); +var availableHeight = d.height - this.scalePanelHolder.getHeight (); +if (adjustPanelHeight) { +if (annotationHeight + alignmentHeight > availableHeight) { +annotationHeight = Math.min (annotationHeight, availableHeight - 2 * rowHeight); +}} else { +annotationHeight = this.annotationPanelHolder.getSize ().height; +}if (availableHeight - annotationHeight < 5) { +annotationHeight = availableHeight; +}this.annotationPanel.setSize ( new java.awt.Dimension (d.width, annotationHeight)); +this.annotationPanelHolder.setSize ( new java.awt.Dimension (d.width, annotationHeight)); +this.seqPanel.seqCanvas.setSize (d.width, this.seqPanel.seqCanvas.getSize ().height); +var e = this.idPanel.getSize (); +this.alabels.setSize ( new java.awt.Dimension (e.width, annotationHeight)); +this.annotationSpaceFillerHolder.setSize ( new java.awt.Dimension (e.width, annotationHeight)); +var s = this.apvscroll.getValue (); +if (s > mheight - annotationHeight) { +s = 0; +}this.apvscroll.setValues (s, annotationHeight, 0, mheight); +this.annotationPanel.setScrollOffset (this.apvscroll.getValue (), false); +this.alabels.setScrollOffset (this.apvscroll.getValue (), false); +}, "~B"); +Clazz.defineMethod (c$, "setWrapAlignment", +function (wrap) { +this.av.startSeq = 0; +this.av.startRes = 0; +this.scalePanelHolder.setVisible (!wrap); +this.hscroll.setVisible (!wrap); +this.idwidthAdjuster.setVisible (!wrap); +if (wrap) { +this.annotationPanelHolder.setVisible (false); +this.annotationSpaceFillerHolder.setVisible (false); +} else if (this.av.isShowAnnotation ()) { +this.annotationPanelHolder.setVisible (true); +this.annotationSpaceFillerHolder.setVisible (true); +}this.idSpaceFillerPanel1.setVisible (!wrap); +this.fontChanged (); +this.validate (); +this.sequenceHolderPanel.validate (); +this.repaint (); +}, "~B"); +Clazz.defineMethod (c$, "scrollUp", +function (up) { +if (up) { +if (this.vscroll.getValue () < 1) { +return false; +}this.setScrollValues (this.hscroll.getValue (), this.vscroll.getValue () - 1); +} else { +if (this.vextent + this.vscroll.getValue () >= this.av.getAlignment ().getHeight ()) { +return false; +}this.setScrollValues (this.hscroll.getValue (), this.vscroll.getValue () + 1); +}this.repaint (); +return true; +}, "~B"); +Clazz.defineMethod (c$, "scrollRight", +function (right) { +if (!right) { +if (this.hscroll.getValue () < 1) { +return false; +}this.setScrollValues (this.hscroll.getValue () - 1, this.vscroll.getValue ()); +} else { +if (this.hextent + this.hscroll.getValue () >= this.av.getAlignment ().getWidth ()) { +return false; +}this.setScrollValues (this.hscroll.getValue () + 1, this.vscroll.getValue ()); +}this.repaint (); +return true; +}, "~B"); +Clazz.defineMethod (c$, "setScrollValues", +function (x, y) { +var width = this.av.getAlignment ().getWidth (); +var height = this.av.getAlignment ().getHeight (); +if (this.av.hasHiddenColumns ()) { +width = this.av.getColumnSelection ().findColumnPosition (width); +}if (x < 0) { +x = 0; +};this.hextent = Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().width / this.av.getCharWidth ()); +this.vextent = Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().height / this.av.getCharHeight ()); +if (this.hextent > width) { +this.hextent = width; +}if (this.vextent > height) { +this.vextent = height; +}if ((this.hextent + x) > width) { +System.err.println ("hextent was " + this.hextent + " and x was " + x); +x = width - this.hextent; +}if ((this.vextent + y) > height) { +y = height - this.vextent; +}if (y < 0) { +y = 0; +}if (x < 0) { +System.err.println ("x was " + x); +x = 0; +}this.av.setStartSeq (y); +var endSeq = y + this.vextent; +if (endSeq > this.av.getAlignment ().getHeight ()) { +endSeq = this.av.getAlignment ().getHeight (); +}this.av.setEndSeq (endSeq); +this.av.setStartRes (x); +this.av.setEndRes ((x + (Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().width / this.av.getCharWidth ()))) - 1); +this.hscroll.setValues (x, this.hextent, 0, width); +this.vscroll.setValues (y, this.vextent, 0, height); +if (this.overviewPanel != null) { +this.overviewPanel.setBoxPosition (); +}this.sendViewPosition (); +}, "~N,~N"); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +if (this.annotationPanel == null) return; +var oldX = this.av.getStartRes (); +var oldY = this.av.getStartSeq (); +if (evt == null || evt.getSource () === this.apvscroll) { +this.annotationPanel.setScrollOffset (this.apvscroll.getValue (), false); +this.alabels.setScrollOffset (this.apvscroll.getValue (), false); +}if (evt == null || evt.getSource () === this.hscroll) { +var x = this.hscroll.getValue (); +this.av.setStartRes (x); +this.av.setEndRes (x + Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().width / this.av.getCharWidth ()) - 1); +}if (evt == null || evt.getSource () === this.vscroll) { +var offy = this.vscroll.getValue (); +if (this.av.getWrapAlignment ()) { +var rowSize = this.seqPanel.seqCanvas.getWrappedCanvasWidth (this.seqPanel.seqCanvas.getSize ().width); +this.av.setStartRes (this.vscroll.getValue () * rowSize); +this.av.setEndRes ((this.vscroll.getValue () + 1) * rowSize); +} else { +this.av.setStartSeq (offy); +this.av.setEndSeq (offy + Clazz.doubleToInt (this.seqPanel.seqCanvas.getSize ().height / this.av.getCharHeight ())); +}}if (this.overviewPanel != null) { +this.overviewPanel.setBoxPosition (); +}var scrollX = this.av.startRes - oldX; +var scrollY = this.av.startSeq - oldY; +if (this.av.getWrapAlignment () || !this.fastPaint || this.av.MAC) { +this.repaint (); +} else { +if (scrollX > this.av.endRes - this.av.startRes) { +scrollX = this.av.endRes - this.av.startRes; +} else if (scrollX < this.av.startRes - this.av.endRes) { +scrollX = this.av.startRes - this.av.endRes; +}this.idPanel.idCanvas.fastPaint (scrollY); +this.seqPanel.seqCanvas.fastPaint (scrollX, scrollY); +this.scalePanel.repaint (); +if (this.av.isShowAnnotation ()) { +this.annotationPanel.fastPaint (this.av.getStartRes () - oldX); +}}this.sendViewPosition (); +if (this.isFollowingComplementScroll ()) { +this.setFollowingComplementScroll (false); +} else { +var ap = this.getComplementPanel (); +this.av.scrollComplementaryAlignment (ap); +}}, "java.awt.event.AdjustmentEvent"); +Clazz.defineMethod (c$, "getComplementPanel", +($fz = function () { +var ap = null; +if (this.alignFrame != null) { +var sf = this.alignFrame.getSplitFrame (); +if (sf != null) { +var other = sf.getComplement (this.alignFrame); +if (other != null) { +ap = other.alignPanel; +}}}return ap; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "scrollToCentre", +function (sr, seqOffset) { +var mappedTo = sr.getResultSequence (0); +var seqs = this.av.getAlignment ().getSequences (); +var sequenceIndex = 0; +var matched = false; +for (var seq, $seq = seqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +if (mappedTo === seq.getDatasetSequence ()) { +matched = true; +break; +}sequenceIndex++; +} +if (!matched) { +return; +}sequenceIndex = Math.max (0, sequenceIndex - seqOffset); +sr.getResults ().get (0).setSequence (this.av.getAlignment ().getSequenceAt (sequenceIndex)); +this.setFollowingComplementScroll (true); +this.scrollToPosition (sr, true, true); +}, "jalview.datamodel.SearchResults,~N"); +Clazz.defineMethod (c$, "sendViewPosition", +($fz = function () { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet).sendViewPosition (this, this.av.startRes, this.av.endRes, this.av.startSeq, this.av.endSeq); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "paintAlignment", +function (updateOverview) { +var sorter = new jalview.analysis.AnnotationSorter (this.getAlignment (), this.av.isShowAutocalculatedAbove ()); +sorter.sort (this.getAlignment ().getAlignmentAnnotation (), this.av.getSortAnnotationsBy ()); +this.repaint (); +if (updateOverview) { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet).sequenceColoursChanged (this); +if (this.overviewPanel != null) { +this.overviewPanel.updateOverviewImage (); +}}}, "~B"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +System.out.println ("alignframe paintcomp"); +this.invalidate (); +var d = this.idPanel.idCanvas.getSize (); +var canvasHeight = this.seqPanel.seqCanvas.getSize ().height; +if (canvasHeight != d.height) { +this.idPanel.idCanvas.setSize (d.width, canvasHeight); +}if (this.av.getWrapAlignment ()) { +var maxwidth = this.av.getAlignment ().getWidth (); +if (this.av.hasHiddenColumns ()) { +maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; +}var canvasWidth = this.seqPanel.seqCanvas.getWrappedCanvasWidth (this.seqPanel.seqCanvas.getSize ().width); +if (canvasWidth > 0) { +var max = Clazz.doubleToInt (maxwidth / canvasWidth); +this.vscroll.setMaximum (1 + max); +this.vscroll.setUnitIncrement (1); +this.vscroll.setVisibleAmount (1); +}} else { +this.setScrollValues (this.av.getStartRes (), this.av.getStartSeq ()); +}}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setLayout ( new java.awt.BorderLayout ()); +this.sequenceHolderPanel.setLayout ( new java.awt.BorderLayout ()); +this.seqPanelHolder.setLayout ( new java.awt.BorderLayout ()); +this.scalePanelHolder.setBackground (java.awt.Color.white); +this.scalePanelHolder.setLayout ( new java.awt.BorderLayout ()); +this.idPanelHolder.setLayout ( new java.awt.BorderLayout ()); +this.idSpaceFillerPanel1.setBackground (java.awt.Color.white); +this.idSpaceFillerPanel1.setLayout ( new java.awt.BorderLayout ()); +this.annotationSpaceFillerHolder.setBackground (java.awt.Color.white); +this.annotationSpaceFillerHolder.setLayout ( new java.awt.BorderLayout ()); +this.hscroll.setOrientation (0); +var hscrollHolder = new awt2swing.Panel (); +hscrollHolder.setLayout ( new java.awt.BorderLayout ()); +this.hscrollFillerPanel.setBackground (java.awt.Color.white); +this.apvscroll.setOrientation (1); +this.apvscroll.setVisible (true); +this.apvscroll.addAdjustmentListener (this); +this.annotationPanelHolder.setBackground (java.awt.Color.white); +this.annotationPanelHolder.setLayout ( new java.awt.BorderLayout ()); +this.annotationPanelHolder.add (this.apvscroll, "East"); +hscrollHolder.setBackground (java.awt.Color.white); +this.seqPanelHolder.setBackground (java.awt.Color.white); +this.idPanelHolder.setBackground (java.awt.Color.white); +this.sequenceHolderPanel.add (this.scalePanelHolder, "North"); +this.sequenceHolderPanel.add (this.seqPanelHolder, "Center"); +this.seqPanelHolder.add (this.vscroll, "East"); +this.add (this.idPanelHolder, "West"); +this.idPanelHolder.add (this.idSpaceFillerPanel1, "North"); +this.idPanelHolder.add (this.annotationSpaceFillerHolder, "South"); +this.add (hscrollHolder, "South"); +hscrollHolder.add (this.hscroll, "Center"); +hscrollHolder.add (this.hscrollFillerPanel, "West"); +this.add (this.sequenceHolderPanel, "Center"); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "updateAnnotation", +function () { +this.updateAnnotation (false); +}); +Clazz.defineMethod (c$, "updateAnnotation", +function (applyGlobalSettings) { +this.updateAnnotation (applyGlobalSettings, false); +}, "~B"); +Clazz.defineMethod (c$, "updateAnnotation", +function (applyGlobalSettings, preserveNewGroupSettings) { +this.av.updateGroupAnnotationSettings (applyGlobalSettings, preserveNewGroupSettings); +this.adjustAnnotationHeight (); +}, "~B,~B"); +Clazz.overrideMethod (c$, "getAlignment", +function () { +return this.av.getAlignment (); +}); +Clazz.overrideMethod (c$, "getViewName", +function () { +return this.getName (); +}); +Clazz.overrideMethod (c$, "getStructureSelectionManager", +function () { +return jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet); +}); +Clazz.overrideMethod (c$, "raiseOOMWarning", +function (string, error) { +System.err.println ("Out of memory whilst '" + string + "'"); +error.printStackTrace (); +}, "~S,OutOfMemoryError"); +Clazz.defineMethod (c$, "setFollowingComplementScroll", +function (b) { +this.followingComplementScroll = b; +}, "~B"); +Clazz.defineMethod (c$, "isFollowingComplementScroll", +function () { +return this.followingComplementScroll; +}); +c$.$AlignmentPanel$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignmentPanel$1", java.awt.event.ComponentAdapter); +Clazz.overrideMethod (c$, "componentResized", +function (evt) { +this.b$["jalview.appletgui.AlignmentPanel"].setScrollValues (this.f$.av.getStartRes (), this.f$.av.getStartSeq ()); +if (this.b$["jalview.appletgui.AlignmentPanel"].getSize ().height > 0 && this.b$["jalview.appletgui.AlignmentPanel"].annotationPanelHolder.getSize ().height > 0) { +this.b$["jalview.appletgui.AlignmentPanel"].validateAnnotationDimensions (false); +}this.b$["jalview.appletgui.AlignmentPanel"].repaint (); +}, "java.awt.event.ComponentEvent"); +c$ = Clazz.p0p (); +}; +c$.$AlignmentPanel$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AlignmentPanel$2", null, java.beans.PropertyChangeListener); +Clazz.overrideMethod (c$, "propertyChange", +function (evt) { +if (evt.getPropertyName ().equals ("alignment")) { +jalview.appletgui.PaintRefresher.Refresh (this.f$.ap, this.f$.av.getSequenceSetId (), true, true); +this.b$["jalview.appletgui.AlignmentPanel"].alignmentChanged (); +}}, "java.beans.PropertyChangeEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/AnnotationColourChooser.class b/bin/jalview/appletgui/AnnotationColourChooser.class index 15ef66280647bcb8de7a4bdcfa2a3c357a16ea73..e2ee2966f03c0394acdcc6d1d5e58247aad17ad2 100644 GIT binary patch delta 28 jcmeCl?9SX!qsf@FxmGidk%O0kqllgHC-defS}QmKk2?uz delta 29 kcmeCq?8)3vqsf@NxmGidk&};svxuGXCj-;w$66~m0hVD2YXATM diff --git a/bin/jalview/appletgui/AnnotationColourChooser.js b/bin/jalview/appletgui/AnnotationColourChooser.js index fce2267..668d9cd 100644 --- a/bin/jalview/appletgui/AnnotationColourChooser.js +++ b/bin/jalview/appletgui/AnnotationColourChooser.js @@ -1,348 +1,348 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.ItemListener", "$.MouseListener", "awt2swing.Button", "$.Checkbox", "$.Choice", "$.Scrollbar", "$.TextField", "java.awt.BorderLayout", "$.FlowLayout"], "jalview.appletgui.AnnotationColourChooser", ["awt2swing.Frame", "jalview.appletgui.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.datamodel.GraphLine", "jalview.schemes.AnnotationColourGradient", "$.ColourSchemeI", "jalview.util.MessageManager", "java.awt.Color", "$.Dimension", "$.Font", "java.lang.Error", "$.Float", "java.util.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.frame = null; -this.av = null; -this.ap = null; -this.oldcs = null; -this.oldgroupColours = null; -this.currentAnnotation = null; -this.adjusting = false; -this.annotations = null; -this.minColour = null; -this.maxColour = null; -this.ok = null; -this.cancel = null; -this.defColours = null; -this.jPanel1 = null; -this.jPanel2 = null; -this.threshold = null; -this.flowLayout1 = null; -this.jPanel3 = null; -this.slider = null; -this.thresholdValue = null; -this.currentColours = null; -this.borderLayout1 = null; -this.thresholdIsMin = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "AnnotationColourChooser", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ItemListener, java.awt.event.MouseListener]); -Clazz.prepareFields (c$, function () { -this.annotations = new awt2swing.Choice (); -this.minColour = new awt2swing.Button (); -this.maxColour = new awt2swing.Button (); -this.ok = new awt2swing.Button (); -this.cancel = new awt2swing.Button (); -this.defColours = new awt2swing.Button (); -this.jPanel1 = new awt2swing.Panel (); -this.jPanel2 = new awt2swing.Panel (); -this.threshold = new awt2swing.Choice (); -this.flowLayout1 = new java.awt.FlowLayout (); -this.jPanel3 = new awt2swing.Panel (); -this.slider = new awt2swing.Scrollbar (0); -this.thresholdValue = new awt2swing.TextField (20); -this.currentColours = new awt2swing.Checkbox (); -this.borderLayout1 = new java.awt.BorderLayout (); -this.thresholdIsMin = new awt2swing.Checkbox (); -}); -Clazz.makeConstructor (c$, -function (av, ap) { -Clazz.superConstructor (this, jalview.appletgui.AnnotationColourChooser, []); -try { -this.jbInit (); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -this.oldcs = av.getGlobalColourScheme (); -if (av.getAlignment ().getGroups () != null) { -this.oldgroupColours = new java.util.Hashtable (); -for (var sg, $sg = ap.av.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (sg.cs != null) { -this.oldgroupColours.put (sg, sg.cs); -} else { -this.oldgroupColours.put (sg, "null"); -}} -}this.av = av; -this.ap = ap; -this.slider.addAdjustmentListener (this); -this.slider.addMouseListener (this); -if (av.getAlignment ().getAlignmentAnnotation () == null) { -return; -}this.setDefaultMinMax (); -this.adjusting = true; -if (Clazz.instanceOf (this.oldcs, jalview.schemes.AnnotationColourGradient)) { -var acg = this.oldcs; -this.currentColours.setState (acg.isPredefinedColours () || acg.getBaseColour () != null); -if (!acg.isPredefinedColours () && acg.getBaseColour () == null) { -this.minColour.setBackground (acg.getMinColour ()); -this.maxColour.setBackground (acg.getMaxColour ()); -}}var list = new java.util.Vector (); -var index = 1; -for (var i = 0; i < av.getAlignment ().getAlignmentAnnotation ().length; i++) { -var label = av.getAlignment ().getAlignmentAnnotation ()[i].label; -if (!list.contains (label)) { -list.addElement (label); -} else { -list.addElement (label + "_" + (index++)); -}} -for (var i = 0; i < list.size (); i++) { -this.annotations.addItem (list.elementAt (i).toString ()); -} -this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold")); -this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold")); -this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold")); -if (Clazz.instanceOf (this.oldcs, jalview.schemes.AnnotationColourGradient)) { -var acg = this.oldcs; -this.annotations.select (acg.getAnnotation ()); -switch (acg.getAboveThreshold ()) { -case -1: -this.threshold.select (new Integer (0)); -break; -case 1: -this.threshold.select (new Integer (1)); -break; -case 0: -this.threshold.select (new Integer (1)); -break; -default: -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_dont_know_thereshold_annotationcolourgradient")); -} -this.thresholdIsMin.setState (acg.thresholdIsMinMax); -this.thresholdValue.setText ("" + acg.getAnnotationThreshold ()); -}this.adjusting = false; -this.changeColour (); -this.frame = new awt2swing.Frame (); -this.frame.add (this); -jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.colour_by_annotation"), 560, 175); -this.validate (); -}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); -Clazz.defineMethod (c$, "setDefaultMinMax", -($fz = function () { -this.minColour.setBackground (this.av.applet.getDefaultColourParameter ("ANNOTATIONCOLOUR_MIN", java.awt.Color.orange)); -this.maxColour.setBackground (this.av.applet.getDefaultColourParameter ("ANNOTATIONCOLOUR_MAX", java.awt.Color.red)); -}, $fz.isPrivate = true, $fz)); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.appletgui.AnnotationColourChooser, []); -try { -this.jbInit (); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.minColour.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.minColour.setLabel (jalview.util.MessageManager.getString ("label.min_colour")); -this.minColour.addActionListener (this); -this.maxColour.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.maxColour.setLabel (jalview.util.MessageManager.getString ("label.max_colour")); -this.maxColour.addActionListener (this); -this.thresholdIsMin.addItemListener (this); -this.ok.setLabel (jalview.util.MessageManager.getString ("action.ok")); -this.ok.addActionListener (this); -this.cancel.setLabel (jalview.util.MessageManager.getString ("action.cancel")); -this.cancel.addActionListener (this); -this.defColours.setLabel (jalview.util.MessageManager.getString ("action.set_defaults")); -this.defColours.addActionListener (this); -this.annotations.addItemListener (this); -this.thresholdValue.addActionListener (this); -this.slider.setBackground (java.awt.Color.white); -this.slider.setPreferredSize ( new java.awt.Dimension (193, 21)); -this.slider.setEnabled (false); -this.thresholdValue.setPreferredSize ( new java.awt.Dimension (79, 22)); -this.thresholdValue.setEnabled (false); -this.thresholdValue.setColumns (5); -this.currentColours.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.currentColours.setLabel (jalview.util.MessageManager.getString ("label.use_original_colours")); -this.currentColours.addItemListener (this); -this.thresholdIsMin.setBackground (java.awt.Color.white); -this.thresholdIsMin.setLabel (jalview.util.MessageManager.getString ("label.threshold_minmax")); -this.setLayout (this.borderLayout1); -this.jPanel1.setBackground (java.awt.Color.white); -this.jPanel2.setLayout ( new java.awt.FlowLayout ()); -this.jPanel2.setBackground (java.awt.Color.white); -this.threshold.addItemListener (this); -this.jPanel3.setLayout ( new java.awt.FlowLayout ()); -this.jPanel3.setBackground (java.awt.Color.white); -var jPanel4 = new awt2swing.Panel (); -jPanel4.setLayout ( new java.awt.BorderLayout ()); -jPanel4.setBackground (java.awt.Color.white); -this.jPanel1.add (this.ok); -this.jPanel1.add (this.cancel); -this.jPanel2.add (this.annotations); -this.jPanel2.add (this.currentColours); -this.jPanel2.add (this.minColour); -this.jPanel2.add (this.maxColour); -jPanel4.add (this.thresholdIsMin, "West"); -jPanel4.add (this.slider, "Center"); -jPanel4.add (this.thresholdValue, "East"); -var jPanel34 = new awt2swing.Panel (); -jPanel34.setLayout ( new java.awt.BorderLayout ()); -jPanel34.setBackground (java.awt.Color.white); -jPanel34.add (this.jPanel2, "North"); -jPanel34.add (this.threshold, "West"); -this.jPanel3.add (this.defColours); -jPanel34.add (this.jPanel3, "East"); -jPanel34.add (jPanel4, "South"); -this.add (jPanel34, "Center"); -this.add (this.jPanel1, "South"); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.thresholdValue) { -try { -var f = new Float (this.thresholdValue.getText ()).floatValue (); -this.slider.setValue (Clazz.floatToInt (f * 1000)); -this.adjustmentValueChanged (null); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -} else if (evt.getSource () === this.minColour) { -this.minColour_actionPerformed (null); -} else if (evt.getSource () === this.maxColour) { -this.maxColour_actionPerformed (null); -} else if (evt.getSource () === this.defColours) { -this.defColour_actionPerformed (); -} else if (evt.getSource () === this.ok) { -this.changeColour (); -this.frame.setVisible (false); -} else if (evt.getSource () === this.cancel) { -this.reset (); -this.ap.paintAlignment (true); -this.frame.setVisible (false); -} else { -this.changeColour (); -}}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -if (evt.getSource () === this.currentColours) { -if (this.currentColours.getState ()) { -this.reset (); -}this.maxColour.setEnabled (!this.currentColours.getState ()); -this.minColour.setEnabled (!this.currentColours.getState ()); -}this.changeColour (); -}, "java.awt.event.ItemEvent"); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -if (!this.adjusting) { -this.thresholdValue.setText ((this.slider.getValue () / 1000) + ""); -if (this.currentColours.getState () && !(Clazz.instanceOf (this.av.getGlobalColourScheme (), jalview.schemes.AnnotationColourGradient))) { -this.changeColour (); -}this.currentAnnotation.threshold.value = this.slider.getValue () / 1000; -this.ap.paintAlignment (false); -}}, "java.awt.event.AdjustmentEvent"); -Clazz.defineMethod (c$, "minColour_actionPerformed", -function (newCol) { -if (newCol != null) { -this.minColour.setBackground (newCol); -this.minColour.repaint (); -this.changeColour (); -} else { - new jalview.appletgui.UserDefinedColours (this, "Min Colour", this.minColour.getBackground ()); -}}, "java.awt.Color"); -Clazz.defineMethod (c$, "maxColour_actionPerformed", -function (newCol) { -if (newCol != null) { -this.maxColour.setBackground (newCol); -this.maxColour.repaint (); -this.changeColour (); -} else { - new jalview.appletgui.UserDefinedColours (this, "Max Colour", this.maxColour.getBackground ()); -}}, "java.awt.Color"); -Clazz.defineMethod (c$, "defColour_actionPerformed", -function () { -this.setDefaultMinMax (); -this.minColour.repaint (); -this.maxColour.repaint (); -this.changeColour (); -}); -Clazz.defineMethod (c$, "changeColour", -function () { -if (this.adjusting) { -return; -}this.currentAnnotation = this.av.getAlignment ().getAlignmentAnnotation ()[this.annotations.getSelectedIndex ()]; -var aboveThreshold = -1; -if (this.threshold.getSelectedIndex () == 1) { -aboveThreshold = 1; -} else if (this.threshold.getSelectedIndex () == 2) { -aboveThreshold = 0; -}this.slider.setEnabled (true); -this.thresholdValue.setEnabled (true); -this.thresholdIsMin.setEnabled (true); -if (aboveThreshold == -1) { -this.slider.setEnabled (false); -this.thresholdValue.setEnabled (false); -this.thresholdIsMin.setEnabled (false); -this.thresholdValue.setText (""); -} else if (aboveThreshold != -1 && this.currentAnnotation.threshold == null) { -this.currentAnnotation.setThreshold ( new jalview.datamodel.GraphLine ((this.currentAnnotation.graphMax - this.currentAnnotation.graphMin) / 2, "Threshold", java.awt.Color.black)); -}if (aboveThreshold != -1) { -this.adjusting = true; -this.slider.setMinimum (Clazz.floatToInt (this.currentAnnotation.graphMin * 1000)); -this.slider.setMaximum (Clazz.floatToInt (this.currentAnnotation.graphMax * 1000)); -this.slider.setValue (Clazz.floatToInt (this.currentAnnotation.threshold.value * 1000)); -this.thresholdValue.setText (this.currentAnnotation.threshold.value + ""); -this.slider.setEnabled (true); -this.thresholdValue.setEnabled (true); -this.adjusting = false; -}var acg = null; -if (this.currentColours.getState ()) { -acg = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, this.av.getGlobalColourScheme (), aboveThreshold); -} else { -acg = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, this.minColour.getBackground (), this.maxColour.getBackground (), aboveThreshold); -}if (this.currentAnnotation.graphMin == 0 && this.currentAnnotation.graphMax == 0) { -acg.setPredefinedColours (true); -}acg.thresholdIsMinMax = this.thresholdIsMin.getState (); -this.av.setGlobalColourScheme (acg); -if (this.av.getAlignment ().getGroups () != null) { -for (var sg, $sg = this.ap.av.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (sg.cs == null) { -continue; -}if (this.currentColours.getState ()) { -sg.cs = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, sg.cs, aboveThreshold); -} else { -sg.cs = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, this.minColour.getBackground (), this.maxColour.getBackground (), aboveThreshold); -}} -}this.ap.alignmentChanged (); -this.ap.paintAlignment (true); -}); -Clazz.defineMethod (c$, "reset", -function () { -this.av.setGlobalColourScheme (this.oldcs); -if (this.av.getAlignment ().getGroups () != null) { -for (var sg, $sg = this.ap.av.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -var cs = this.oldgroupColours.get (sg); -if (Clazz.instanceOf (cs, jalview.schemes.ColourSchemeI)) { -sg.cs = cs; -} else { -sg.cs = null; -}} -}this.ap.paintAlignment (true); -}); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -this.ap.paintAlignment (true); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.ItemListener", "$.MouseListener", "awt2swing.Button", "$.Checkbox", "$.Choice", "$.Scrollbar", "$.TextField", "java.awt.BorderLayout", "$.FlowLayout"], "jalview.appletgui.AnnotationColourChooser", ["awt2swing.Frame", "jalview.appletgui.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.datamodel.GraphLine", "jalview.schemes.AnnotationColourGradient", "$.ColourSchemeI", "jalview.util.MessageManager", "java.awt.Color", "$.Dimension", "$.Font", "java.lang.Error", "$.Float", "java.util.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.frame = null; +this.av = null; +this.ap = null; +this.oldcs = null; +this.oldgroupColours = null; +this.currentAnnotation = null; +this.adjusting = false; +this.annotations = null; +this.minColour = null; +this.maxColour = null; +this.ok = null; +this.cancel = null; +this.defColours = null; +this.jPanel1 = null; +this.jPanel2 = null; +this.threshold = null; +this.flowLayout1 = null; +this.jPanel3 = null; +this.slider = null; +this.thresholdValue = null; +this.currentColours = null; +this.borderLayout1 = null; +this.thresholdIsMin = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AnnotationColourChooser", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ItemListener, java.awt.event.MouseListener]); +Clazz.prepareFields (c$, function () { +this.annotations = new awt2swing.Choice (); +this.minColour = new awt2swing.Button (); +this.maxColour = new awt2swing.Button (); +this.ok = new awt2swing.Button (); +this.cancel = new awt2swing.Button (); +this.defColours = new awt2swing.Button (); +this.jPanel1 = new awt2swing.Panel (); +this.jPanel2 = new awt2swing.Panel (); +this.threshold = new awt2swing.Choice (); +this.flowLayout1 = new java.awt.FlowLayout (); +this.jPanel3 = new awt2swing.Panel (); +this.slider = new awt2swing.Scrollbar (0); +this.thresholdValue = new awt2swing.TextField (20); +this.currentColours = new awt2swing.Checkbox (); +this.borderLayout1 = new java.awt.BorderLayout (); +this.thresholdIsMin = new awt2swing.Checkbox (); +}); +Clazz.makeConstructor (c$, +function (av, ap) { +Clazz.superConstructor (this, jalview.appletgui.AnnotationColourChooser, []); +try { +this.jbInit (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +this.oldcs = av.getGlobalColourScheme (); +if (av.getAlignment ().getGroups () != null) { +this.oldgroupColours = new java.util.Hashtable (); +for (var sg, $sg = ap.av.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (sg.cs != null) { +this.oldgroupColours.put (sg, sg.cs); +} else { +this.oldgroupColours.put (sg, "null"); +}} +}this.av = av; +this.ap = ap; +this.slider.addAdjustmentListener (this); +this.slider.addMouseListener (this); +if (av.getAlignment ().getAlignmentAnnotation () == null) { +return; +}this.setDefaultMinMax (); +this.adjusting = true; +if (Clazz.instanceOf (this.oldcs, jalview.schemes.AnnotationColourGradient)) { +var acg = this.oldcs; +this.currentColours.setState (acg.isPredefinedColours () || acg.getBaseColour () != null); +if (!acg.isPredefinedColours () && acg.getBaseColour () == null) { +this.minColour.setBackground (acg.getMinColour ()); +this.maxColour.setBackground (acg.getMaxColour ()); +}}var list = new java.util.Vector (); +var index = 1; +for (var i = 0; i < av.getAlignment ().getAlignmentAnnotation ().length; i++) { +var label = av.getAlignment ().getAlignmentAnnotation ()[i].label; +if (!list.contains (label)) { +list.addElement (label); +} else { +list.addElement (label + "_" + (index++)); +}} +for (var i = 0; i < list.size (); i++) { +this.annotations.addItem (list.elementAt (i).toString ()); +} +this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold")); +this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold")); +this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold")); +if (Clazz.instanceOf (this.oldcs, jalview.schemes.AnnotationColourGradient)) { +var acg = this.oldcs; +this.annotations.select (acg.getAnnotation ()); +switch (acg.getAboveThreshold ()) { +case -1: +this.threshold.select (new Integer (0)); +break; +case 1: +this.threshold.select (new Integer (1)); +break; +case 0: +this.threshold.select (new Integer (1)); +break; +default: +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_dont_know_thereshold_annotationcolourgradient")); +} +this.thresholdIsMin.setState (acg.thresholdIsMinMax); +this.thresholdValue.setText ("" + acg.getAnnotationThreshold ()); +}this.adjusting = false; +this.changeColour (); +this.frame = new awt2swing.Frame (); +this.frame.add (this); +jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.colour_by_annotation"), 560, 175); +this.validate (); +}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); +Clazz.defineMethod (c$, "setDefaultMinMax", +($fz = function () { +this.minColour.setBackground (this.av.applet.getDefaultColourParameter ("ANNOTATIONCOLOUR_MIN", java.awt.Color.orange)); +this.maxColour.setBackground (this.av.applet.getDefaultColourParameter ("ANNOTATIONCOLOUR_MAX", java.awt.Color.red)); +}, $fz.isPrivate = true, $fz)); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.appletgui.AnnotationColourChooser, []); +try { +this.jbInit (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.minColour.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.minColour.setLabel (jalview.util.MessageManager.getString ("label.min_colour")); +this.minColour.addActionListener (this); +this.maxColour.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.maxColour.setLabel (jalview.util.MessageManager.getString ("label.max_colour")); +this.maxColour.addActionListener (this); +this.thresholdIsMin.addItemListener (this); +this.ok.setLabel (jalview.util.MessageManager.getString ("action.ok")); +this.ok.addActionListener (this); +this.cancel.setLabel (jalview.util.MessageManager.getString ("action.cancel")); +this.cancel.addActionListener (this); +this.defColours.setLabel (jalview.util.MessageManager.getString ("action.set_defaults")); +this.defColours.addActionListener (this); +this.annotations.addItemListener (this); +this.thresholdValue.addActionListener (this); +this.slider.setBackground (java.awt.Color.white); +this.slider.setPreferredSize ( new java.awt.Dimension (193, 21)); +this.slider.setEnabled (false); +this.thresholdValue.setPreferredSize ( new java.awt.Dimension (79, 22)); +this.thresholdValue.setEnabled (false); +this.thresholdValue.setColumns (5); +this.currentColours.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.currentColours.setLabel (jalview.util.MessageManager.getString ("label.use_original_colours")); +this.currentColours.addItemListener (this); +this.thresholdIsMin.setBackground (java.awt.Color.white); +this.thresholdIsMin.setLabel (jalview.util.MessageManager.getString ("label.threshold_minmax")); +this.setLayout (this.borderLayout1); +this.jPanel1.setBackground (java.awt.Color.white); +this.jPanel2.setLayout ( new java.awt.FlowLayout ()); +this.jPanel2.setBackground (java.awt.Color.white); +this.threshold.addItemListener (this); +this.jPanel3.setLayout ( new java.awt.FlowLayout ()); +this.jPanel3.setBackground (java.awt.Color.white); +var jPanel4 = new awt2swing.Panel (); +jPanel4.setLayout ( new java.awt.BorderLayout ()); +jPanel4.setBackground (java.awt.Color.white); +this.jPanel1.add (this.ok); +this.jPanel1.add (this.cancel); +this.jPanel2.add (this.annotations); +this.jPanel2.add (this.currentColours); +this.jPanel2.add (this.minColour); +this.jPanel2.add (this.maxColour); +jPanel4.add (this.thresholdIsMin, "West"); +jPanel4.add (this.slider, "Center"); +jPanel4.add (this.thresholdValue, "East"); +var jPanel34 = new awt2swing.Panel (); +jPanel34.setLayout ( new java.awt.BorderLayout ()); +jPanel34.setBackground (java.awt.Color.white); +jPanel34.add (this.jPanel2, "North"); +jPanel34.add (this.threshold, "West"); +this.jPanel3.add (this.defColours); +jPanel34.add (this.jPanel3, "East"); +jPanel34.add (jPanel4, "South"); +this.add (jPanel34, "Center"); +this.add (this.jPanel1, "South"); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.thresholdValue) { +try { +var f = new Float (this.thresholdValue.getText ()).floatValue (); +this.slider.setValue (Clazz.floatToInt (f * 1000)); +this.adjustmentValueChanged (null); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +} else if (evt.getSource () === this.minColour) { +this.minColour_actionPerformed (null); +} else if (evt.getSource () === this.maxColour) { +this.maxColour_actionPerformed (null); +} else if (evt.getSource () === this.defColours) { +this.defColour_actionPerformed (); +} else if (evt.getSource () === this.ok) { +this.changeColour (); +this.frame.setVisible (false); +} else if (evt.getSource () === this.cancel) { +this.reset (); +this.ap.paintAlignment (true); +this.frame.setVisible (false); +} else { +this.changeColour (); +}}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +if (evt.getSource () === this.currentColours) { +if (this.currentColours.getState ()) { +this.reset (); +}this.maxColour.setEnabled (!this.currentColours.getState ()); +this.minColour.setEnabled (!this.currentColours.getState ()); +}this.changeColour (); +}, "java.awt.event.ItemEvent"); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +if (!this.adjusting) { +this.thresholdValue.setText ((this.slider.getValue () / 1000) + ""); +if (this.currentColours.getState () && !(Clazz.instanceOf (this.av.getGlobalColourScheme (), jalview.schemes.AnnotationColourGradient))) { +this.changeColour (); +}this.currentAnnotation.threshold.value = this.slider.getValue () / 1000; +this.ap.paintAlignment (false); +}}, "java.awt.event.AdjustmentEvent"); +Clazz.defineMethod (c$, "minColour_actionPerformed", +function (newCol) { +if (newCol != null) { +this.minColour.setBackground (newCol); +this.minColour.repaint (); +this.changeColour (); +} else { + new jalview.appletgui.UserDefinedColours (this, "Min Colour", this.minColour.getBackground ()); +}}, "java.awt.Color"); +Clazz.defineMethod (c$, "maxColour_actionPerformed", +function (newCol) { +if (newCol != null) { +this.maxColour.setBackground (newCol); +this.maxColour.repaint (); +this.changeColour (); +} else { + new jalview.appletgui.UserDefinedColours (this, "Max Colour", this.maxColour.getBackground ()); +}}, "java.awt.Color"); +Clazz.defineMethod (c$, "defColour_actionPerformed", +function () { +this.setDefaultMinMax (); +this.minColour.repaint (); +this.maxColour.repaint (); +this.changeColour (); +}); +Clazz.defineMethod (c$, "changeColour", +function () { +if (this.adjusting) { +return; +}this.currentAnnotation = this.av.getAlignment ().getAlignmentAnnotation ()[this.annotations.getSelectedIndex ()]; +var aboveThreshold = -1; +if (this.threshold.getSelectedIndex () == 1) { +aboveThreshold = 1; +} else if (this.threshold.getSelectedIndex () == 2) { +aboveThreshold = 0; +}this.slider.setEnabled (true); +this.thresholdValue.setEnabled (true); +this.thresholdIsMin.setEnabled (true); +if (aboveThreshold == -1) { +this.slider.setEnabled (false); +this.thresholdValue.setEnabled (false); +this.thresholdIsMin.setEnabled (false); +this.thresholdValue.setText (""); +} else if (aboveThreshold != -1 && this.currentAnnotation.threshold == null) { +this.currentAnnotation.setThreshold ( new jalview.datamodel.GraphLine ((this.currentAnnotation.graphMax - this.currentAnnotation.graphMin) / 2, "Threshold", java.awt.Color.black)); +}if (aboveThreshold != -1) { +this.adjusting = true; +this.slider.setMinimum (Clazz.floatToInt (this.currentAnnotation.graphMin * 1000)); +this.slider.setMaximum (Clazz.floatToInt (this.currentAnnotation.graphMax * 1000)); +this.slider.setValue (Clazz.floatToInt (this.currentAnnotation.threshold.value * 1000)); +this.thresholdValue.setText (this.currentAnnotation.threshold.value + ""); +this.slider.setEnabled (true); +this.thresholdValue.setEnabled (true); +this.adjusting = false; +}var acg = null; +if (this.currentColours.getState ()) { +acg = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, this.av.getGlobalColourScheme (), aboveThreshold); +} else { +acg = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, this.minColour.getBackground (), this.maxColour.getBackground (), aboveThreshold); +}if (this.currentAnnotation.graphMin == 0 && this.currentAnnotation.graphMax == 0) { +acg.setPredefinedColours (true); +}acg.thresholdIsMinMax = this.thresholdIsMin.getState (); +this.av.setGlobalColourScheme (acg); +if (this.av.getAlignment ().getGroups () != null) { +for (var sg, $sg = this.ap.av.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (sg.cs == null) { +continue; +}if (this.currentColours.getState ()) { +sg.cs = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, sg.cs, aboveThreshold); +} else { +sg.cs = new jalview.schemes.AnnotationColourGradient (this.currentAnnotation, this.minColour.getBackground (), this.maxColour.getBackground (), aboveThreshold); +}} +}this.ap.alignmentChanged (); +this.ap.paintAlignment (true); +}); +Clazz.defineMethod (c$, "reset", +function () { +this.av.setGlobalColourScheme (this.oldcs); +if (this.av.getAlignment ().getGroups () != null) { +for (var sg, $sg = this.ap.av.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +var cs = this.oldgroupColours.get (sg); +if (Clazz.instanceOf (cs, jalview.schemes.ColourSchemeI)) { +sg.cs = cs; +} else { +sg.cs = null; +}} +}this.ap.paintAlignment (true); +}); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +this.ap.paintAlignment (true); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +}); diff --git a/bin/jalview/appletgui/AnnotationColumnChooser.class b/bin/jalview/appletgui/AnnotationColumnChooser.class index 4cce256f400b09411d0b0cceccc04f73375bc00f..27e6c60b031aff295897299c6d889231bdeca549 100644 GIT binary patch delta 68 zcmV-K0K5OZf&sdM0kG>e0rRu$HP-_g8vqOl{QzAD0u})?`~bNE`Tze0ra!%HP-_h8~_an{QzAD0u})?`~bNE`TzSsu ev)(n%0s&pKtvKZe19t!vla)Yl0T8nXL68MLh8Bwe delta 75 zcmV-R0JQ&M7UbCw> -1) { -var phb = new jalview.util.ParseHtmlBodyAndLinks (this.av.getAlignment ().getAlignmentAnnotation ()[row].getDescription (true), true, "\n"); -if (this.tooltip == null) { -this.tooltip = new jalview.appletgui.Tooltip (phb.getNonHtmlContent (), this); -} else { -this.tooltip.setTip (phb.getNonHtmlContent ()); -}} else if (this.tooltip != null) { -this.tooltip.setTip (""); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "cancelDrag", -function () { -this.dragEvent = null; -this.dragCancelled = true; -}); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -if (this.dragCancelled) { -return; -};this.dragEvent = evt; -if (this.resizePanel) { -var d = this.ap.annotationPanelHolder.getSize (); -var e = this.ap.annotationSpaceFillerHolder.getSize (); -var f = this.ap.seqPanelHolder.getSize (); -var dif = evt.getY () - this.oldY; -dif /= this.ap.av.getCharHeight (); -dif *= this.ap.av.getCharHeight (); -if ((d.height - dif) > 20 && (f.height + dif) > 20) { -this.ap.annotationPanel.setSize (d.width, d.height - dif); -this.setSize ( new java.awt.Dimension (e.width, d.height - dif)); -this.ap.annotationSpaceFillerHolder.setSize ( new java.awt.Dimension (e.width, d.height - dif)); -this.ap.annotationPanelHolder.setSize ( new java.awt.Dimension (d.width, d.height - dif)); -this.ap.apvscroll.setValues (this.ap.apvscroll.getValue (), d.height - dif, 0, this.av.calcPanelHeight ()); -f.height += dif; -this.ap.seqPanelHolder.setPreferredSize (f); -this.ap.setScrollValues (this.av.getStartRes (), this.av.getStartSeq ()); -this.ap.validate (); -this.ap.addNotify (); -}} else { -var diff; -if ((diff = 6 - evt.getY ()) > 0) { -this.ap.apvscroll.setValue (this.ap.apvscroll.getValue () - diff); -this.ap.adjustmentValueChanged (null); -} else if ((0 < (diff = 6 - this.ap.annotationSpaceFillerHolder.getSize ().height + evt.getY ()))) { -this.ap.apvscroll.setValue (this.ap.apvscroll.getValue () + diff); -this.ap.adjustmentValueChanged (null); -}this.repaint (); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -if (!this.resizePanel && !this.dragCancelled) { -var start = this.selectedRow; -var end = this.getSelectedRow (evt.getY () + this.scrollOffset); -if (start > -1 && start != end) { -var startAA = this.ap.av.getAlignment ().getAlignmentAnnotation ()[start]; -if (end == -1) { -end = this.ap.av.getAlignment ().getAlignmentAnnotation ().length - 1; -}var endAA = this.ap.av.getAlignment ().getAlignmentAnnotation ()[end]; -this.ap.av.getAlignment ().getAlignmentAnnotation ()[end] = startAA; -this.ap.av.getAlignment ().getAlignmentAnnotation ()[start] = endAA; -}}this.resizePanel = false; -this.dragEvent = null; -this.dragCancelled = false; -this.repaint (); -this.ap.annotationPanel.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -if (evt.getY () < 10 && evt.getX () < 14) { -this.resizePanel = true; -this.repaint (); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -this.dragCancelled = false; -if (this.dragEvent == null) { -this.resizePanel = false; -} else { -if (!this.resizePanel) { -this.dragEvent = null; -}}this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -this.oldY = evt.getY (); -if (this.resizePanel) { -return; -}this.dragCancelled = false; -this.selectedRow = this.getSelectedRow (evt.getY () + this.scrollOffset); -var aa = this.ap.av.getAlignment ().getAlignmentAnnotation (); -if ((evt.getModifiers () & 4) == 4) { -var popup = new awt2swing.PopupMenu (jalview.util.MessageManager.getString ("label.annotations")); -var item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.ADDNEW); -item.addActionListener (this); -popup.add (item); -if (this.selectedRow < 0) { -if (this.hasHiddenRows) { -item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.SHOWALL); -item.addActionListener (this); -popup.add (item); -}this.add (popup); -popup.show (this, evt.getX (), evt.getY ()); -return; -}item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.EDITNAME); -item.addActionListener (this); -popup.add (item); -item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.HIDE); -item.addActionListener (this); -popup.add (item); -if (this.selectedRow < aa.length) { -if (aa[this.selectedRow].sequenceRef != null) { -var label = aa[this.selectedRow].label; -var hideType = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.hide_all") + " " + label); -hideType.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$1") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$1, this, Clazz.cloneFinals ("label", label)))); -popup.add (hideType); -}}if (this.hasHiddenRows) { -item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.SHOWALL); -item.addActionListener (this); -popup.add (item); -}this.add (popup); -item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.OUTPUT_TEXT); -item.addActionListener (this); -popup.add (item); -if (this.selectedRow < aa.length) { -if (aa[this.selectedRow].autoCalculated) { -if (aa[this.selectedRow].label.indexOf ("Consensus") > -1) { -popup.addSeparator (); -var cbmi = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.ignore_gaps_consensus"), (aa[this.selectedRow].groupRef != null) ? aa[this.selectedRow].groupRef.getIgnoreGapsConsensus () : this.ap.av.isIgnoreGapsConsensus ()); -var aaa = aa[this.selectedRow]; -cbmi.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$2") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$2, this, Clazz.cloneFinals ("aaa", aaa, "cbmi", cbmi)))); -popup.add (cbmi); -if (aaa.groupRef != null) { -var chist = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_group_histogram"), aa[this.selectedRow].groupRef.isShowConsensusHistogram ()); -chist.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$3") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$3, this, Clazz.cloneFinals ("aaa", aaa, "chist", chist)))); -popup.add (chist); -var cprofl = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_group_logo"), aa[this.selectedRow].groupRef.isShowSequenceLogo ()); -cprofl.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$4") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$4$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$4, this, Clazz.cloneFinals ("aaa", aaa, "cprofl", cprofl)))); -popup.add (cprofl); -var cprofn = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.normalise_group_logo"), aa[this.selectedRow].groupRef.isNormaliseSequenceLogo ()); -cprofn.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$5") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$5$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$5, this, Clazz.cloneFinals ("aaa", aaa, "cprofn", cprofn)))); -popup.add (cprofn); -} else { -var chist = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_histogram"), this.av.isShowConsensusHistogram ()); -chist.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$6") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$6$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$6, this, Clazz.cloneFinals ("chist", chist)))); -popup.add (chist); -var cprof = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_logo"), this.av.isShowSequenceLogo ()); -cprof.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$7") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$7$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$7, this, Clazz.cloneFinals ("cprof", cprof)))); -popup.add (cprof); -var cprofn = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.normalise_logo"), this.av.isNormaliseSequenceLogo ()); -cprofn.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$8") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$8$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$8, this, Clazz.cloneFinals ("cprofn", cprofn)))); -popup.add (cprofn); -}item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.COPYCONS_SEQ); -item.addActionListener (this); -popup.add (item); -}}}popup.show (this, evt.getX (), evt.getY ()); -} else { -if (this.selectedRow > -1 && this.selectedRow < aa.length) { -if (aa[this.selectedRow].groupRef != null) { -if (evt.getClickCount () >= 2) { -this.ap.seqPanel.ap.idPanel.highlightSearchResults (null); -this.ap.av.setSelectionGroup (aa[this.selectedRow].groupRef); -this.ap.av.sendSelection (); -this.ap.paintAlignment (false); -jalview.appletgui.PaintRefresher.Refresh (this.ap, this.ap.av.getSequenceSetId ()); -} else { -this.ap.seqPanel.ap.idPanel.highlightSearchResults (aa[this.selectedRow].groupRef.getSequences (null)); -}return; -} else if (aa[this.selectedRow].sequenceRef != null) { -if (evt.getClickCount () == 1) { -this.ap.seqPanel.ap.idPanel.highlightSearchResults (java.util.Arrays.asList ( Clazz.newArray (-1, [aa[this.selectedRow].sequenceRef]))); -} else if (evt.getClickCount () >= 2) { -this.ap.seqPanel.ap.idPanel.highlightSearchResults (null); -var sg = this.ap.av.getSelectionGroup (); -if (sg != null) { -if (!(evt.isControlDown () || evt.isShiftDown ())) { -sg = new jalview.datamodel.SequenceGroup (sg); -sg.clear (); -sg.addSequence (aa[this.selectedRow].sequenceRef, false); -} else { -if (evt.isControlDown ()) { -sg.addOrRemove (aa[this.selectedRow].sequenceRef, true); -} else { -sg.addSequence (aa[this.selectedRow].sequenceRef, true); -}}} else { -sg = new jalview.datamodel.SequenceGroup (); -sg.setStartRes (0); -sg.setEndRes (this.ap.av.getAlignment ().getWidth () - 1); -sg.addSequence (aa[this.selectedRow].sequenceRef, false); -}this.ap.av.setSelectionGroup (sg); -this.ap.paintAlignment (false); -jalview.appletgui.PaintRefresher.Refresh (this.ap, this.ap.av.getSequenceSetId ()); -this.ap.av.sendSelection (); -}}}}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "copy_annotseqtoclipboard", -function (sq) { -if (sq == null || sq.getLength () < 1) { -return; -}jalview.appletgui.AlignFrame.copiedSequences = new StringBuffer (); -jalview.appletgui.AlignFrame.copiedSequences.append (sq.getName () + "\t" + sq.getStart () + "\t" + sq.getEnd () + "\t" + sq.getSequenceAsString () + "\n"); -if (this.av.hasHiddenColumns ()) { -jalview.appletgui.AlignFrame.copiedHiddenColumns = new java.util.Vector (); -for (var region, $region = this.av.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { -jalview.appletgui.AlignFrame.copiedHiddenColumns.addElement ( Clazz.newIntArray (-1, [region[0], region[1]])); -} -}}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -if (this.av.getWrapAlignment () || !this.av.isShowAnnotation ()) return; -var w = this.getSize ().width; -var h = this.getSize ().height; -if (this.image == null || w != this.image.getWidth (this) || h != this.image.getHeight (this)) { -this.image = this.createImage (w, this.ap.annotationPanel.getSize ().height); -}this.drawComponent (this.image.getGraphics (), w); -g.drawImage (this.image, 0, 0, this); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "drawComponent", -function (g, width) { -g.setFont (this.av.getFont ()); -var fm = g.getFontMetrics (this.av.getFont ()); -g.setColor (java.awt.Color.white); -g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); -g.translate (0, -this.scrollOffset); -g.setColor (java.awt.Color.black); -var aa = this.av.getAlignment ().getAlignmentAnnotation (); -var y = 0; -var fy = g.getFont ().getSize (); -var x = 0; -var offset; -if (aa != null) { -this.hasHiddenRows = false; -for (var i = 0; i < aa.length; i++) { -if (!aa[i].visible) { -this.hasHiddenRows = true; -continue; -}x = width - fm.stringWidth (aa[i].label) - 3; -y += aa[i].height; -offset = Clazz.doubleToInt (-(aa[i].height - fy) / 2); -g.drawString (aa[i].label, x, y + offset); -} -}g.translate (0, +this.scrollOffset); -if (this.resizePanel) { -g.setColor (java.awt.Color.red); -g.setPaintMode (); -g.drawLine (2, 8, 5, 2); -g.drawLine (5, 2, 8, 8); -} else if (!this.dragCancelled && this.dragEvent != null && aa != null) { -g.setColor (java.awt.Color.lightGray); -g.drawString (aa[this.selectedRow].label, this.dragEvent.getX (), this.dragEvent.getY ()); -}if (!this.av.getWrapAlignment () && ((aa == null) || (aa.length < 1))) { -g.setColor (java.awt.Color.black); -g.drawString (jalview.util.MessageManager.getString ("label.right_click"), 2, 8); -g.drawString (jalview.util.MessageManager.getString ("label.to_add_annotation"), 2, 18); -}}, "java.awt.Graphics,~N"); -c$.$AnnotationLabels$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$1", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -jalview.analysis.AlignmentUtils.showOrHideSequenceAnnotations (this.b$["jalview.appletgui.AnnotationLabels"].ap.av.getAlignment (), java.util.Collections.singleton (this.f$.label), null, false, false); -this.b$["jalview.appletgui.AnnotationLabels"].refresh (); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationLabels$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$2", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -if (this.f$.aaa.groupRef != null) { -this.f$.aaa.groupRef.setIgnoreGapsConsensus (this.f$.cbmi.getState ()); -} else { -this.b$["jalview.appletgui.AnnotationLabels"].ap.av.setIgnoreGapsConsensus (this.f$.cbmi.getState (), this.b$["jalview.appletgui.AnnotationLabels"].ap); -}this.b$["jalview.appletgui.AnnotationLabels"].ap.paintAlignment (true); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationLabels$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$3", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -this.f$.aaa.groupRef.setShowConsensusHistogram (this.f$.chist.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationLabels$4$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$4", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -this.f$.aaa.groupRef.setshowSequenceLogo (this.f$.cprofl.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationLabels$5$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$5", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -this.f$.aaa.groupRef.setshowSequenceLogo (true); -this.f$.aaa.groupRef.setNormaliseSequenceLogo (this.f$.cprofn.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationLabels$6$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$6", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -this.b$["jalview.appletgui.AnnotationLabels"].av.setShowConsensusHistogram (this.f$.chist.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.alignFrame.showConsensusHistogram.setState (this.f$.chist.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationLabels$7$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$7", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -this.b$["jalview.appletgui.AnnotationLabels"].av.setShowSequenceLogo (this.f$.cprof.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.alignFrame.showSequenceLogo.setState (this.f$.cprof.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$AnnotationLabels$8$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$8", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -this.b$["jalview.appletgui.AnnotationLabels"].av.setShowSequenceLogo (true); -this.b$["jalview.appletgui.AnnotationLabels"].ap.alignFrame.normSequenceLogo.setState (this.f$.cprofn.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].av.setNormaliseSequenceLogo (this.f$.cprofn.getState ()); -this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"ADDNEW", "Add New Row", -"EDITNAME", "Edit Label/Description", -"HIDE", "Hide This Row", -"SHOWALL", "Show All Hidden Rows", -"OUTPUT_TEXT", "Show Values In Textbox", -"COPYCONS_SEQ", "Copy Consensus Sequence"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.AnnotationLabels", ["awt2swing.Checkbox", "$.CheckboxMenuItem", "$.Frame", "$.MenuItem", "$.PopupMenu", "jalview.analysis.AlignmentUtils", "jalview.appletgui.AlignFrame", "$.CutAndPasteTransfer", "$.EditNameDialog", "$.PaintRefresher", "$.Tooltip", "jalview.bin.JalviewLite", "jalview.datamodel.AlignmentAnnotation", "$.SequenceGroup", "jalview.util.MessageManager", "$.ParseHtmlBodyAndLinks", "java.awt.Color", "$.Dimension", "$.FlowLayout", "java.awt.event.ItemListener", "java.lang.StringBuffer", "java.util.Arrays", "$.Collections", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.image = null; +this.active = false; +this.ap = null; +this.av = null; +this.resizing = false; +this.oldY = 0; +this.mouseX = 0; +this.scrollOffset = 0; +this.selectedRow = -1; +this.tooltip = null; +this.hasHiddenRows = false; +this.resizePanel = false; +this.dragEvent = null; +this.dragCancelled = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AnnotationLabels", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.AnnotationLabels, []); +this.ap = ap; +this.av = ap.av; +this.setLayout (null); +this.addMouseListener (this); +this.addMouseMotionListener (this); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.makeConstructor (c$, +function (av) { +Clazz.superConstructor (this, jalview.appletgui.AnnotationLabels, []); +this.av = av; +}, "jalview.appletgui.AlignViewport"); +Clazz.defineMethod (c$, "setScrollOffset", +function (y, repaint) { +this.scrollOffset = y; +if (repaint) { +this.repaint (); +}}, "~N,~B"); +Clazz.defineMethod (c$, "getSelectedRow", +function (y) { +var row = -2; +var aa = this.ap.av.getAlignment ().getAlignmentAnnotation (); +if (aa == null) { +return row; +}var height = 0; +for (var i = 0; i < aa.length; i++) { +row = -1; +if (!aa[i].visible) { +continue; +}height += aa[i].height; +if (y < height) { +row = i; +break; +}} +return row; +}, "~N"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +var aa = this.av.getAlignment ().getAlignmentAnnotation (); +if (evt.getActionCommand ().equals (jalview.appletgui.AnnotationLabels.ADDNEW)) { +var newAnnotation = new jalview.datamodel.AlignmentAnnotation ("", null, new Array (this.ap.av.getAlignment ().getWidth ())); +if (!this.editLabelDescription (newAnnotation)) { +return; +}this.ap.av.getAlignment ().addAnnotation (newAnnotation); +this.ap.av.getAlignment ().setAnnotationIndex (newAnnotation, 0); +} else if (evt.getActionCommand ().equals (jalview.appletgui.AnnotationLabels.EDITNAME)) { +this.editLabelDescription (aa[this.selectedRow]); +} else if (evt.getActionCommand ().equals (jalview.appletgui.AnnotationLabels.HIDE)) { +aa[this.selectedRow].visible = false; +} else if (evt.getActionCommand ().equals (jalview.appletgui.AnnotationLabels.SHOWALL)) { +for (var i = 0; i < aa.length; i++) { +aa[i].visible = (aa[i].annotations == null) ? false : true; +} +} else if (evt.getActionCommand ().equals (jalview.appletgui.AnnotationLabels.OUTPUT_TEXT)) { +var cap = new jalview.appletgui.CutAndPasteTransfer (false, this.ap.alignFrame); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, this.ap.alignFrame.getTitle () + " - " + aa[this.selectedRow].label, 500, 100); +cap.setText (aa[this.selectedRow].toString ()); +} else if (evt.getActionCommand ().equals (jalview.appletgui.AnnotationLabels.COPYCONS_SEQ)) { +var cons = this.av.getConsensusSeq (); +if (cons != null) { +this.copy_annotseqtoclipboard (cons); +}}this.refresh (); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "refresh", +function () { +this.ap.annotationPanel.adjustPanelHeight (); +this.setSize (this.getSize ().width, this.ap.annotationPanel.getSize ().height); +this.ap.validate (); +this.ap.paintAlignment (true); +}); +Clazz.defineMethod (c$, "editLabelDescription", +function (annotation) { +var padGaps = new awt2swing.Checkbox ("Fill Empty Gaps With \"" + this.ap.av.getGapCharacter () + "\"", annotation.padGaps); +var dialog = new jalview.appletgui.EditNameDialog (annotation.label, annotation.description, " Annotation Label", "Annotation Description", this.ap.alignFrame, "Edit Annotation Name / Description", 500, 180, false); +var empty = new awt2swing.Panel ( new java.awt.FlowLayout ()); +empty.add (padGaps); +dialog.add (empty); +dialog.pack (); +dialog.setVisible (true); +if (dialog.accept) { +annotation.label = dialog.getName (); +annotation.description = dialog.getDescription (); +annotation.setPadGaps (padGaps.getState (), this.av.getGapCharacter ()); +this.repaint (); +return true; +} else { +return false; +}}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +this.resizePanel = evt.getY () < 10 && evt.getX () < 14; +var row = this.getSelectedRow (evt.getY () + this.scrollOffset); +if (row > -1) { +var phb = new jalview.util.ParseHtmlBodyAndLinks (this.av.getAlignment ().getAlignmentAnnotation ()[row].getDescription (true), true, "\n"); +if (this.tooltip == null) { +this.tooltip = new jalview.appletgui.Tooltip (phb.getNonHtmlContent (), this); +} else { +this.tooltip.setTip (phb.getNonHtmlContent ()); +}} else if (this.tooltip != null) { +this.tooltip.setTip (""); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "cancelDrag", +function () { +this.dragEvent = null; +this.dragCancelled = true; +}); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +if (this.dragCancelled) { +return; +};this.dragEvent = evt; +if (this.resizePanel) { +var d = this.ap.annotationPanelHolder.getSize (); +var e = this.ap.annotationSpaceFillerHolder.getSize (); +var f = this.ap.seqPanelHolder.getSize (); +var dif = evt.getY () - this.oldY; +dif /= this.ap.av.getCharHeight (); +dif *= this.ap.av.getCharHeight (); +if ((d.height - dif) > 20 && (f.height + dif) > 20) { +this.ap.annotationPanel.setSize (d.width, d.height - dif); +this.setSize ( new java.awt.Dimension (e.width, d.height - dif)); +this.ap.annotationSpaceFillerHolder.setSize ( new java.awt.Dimension (e.width, d.height - dif)); +this.ap.annotationPanelHolder.setSize ( new java.awt.Dimension (d.width, d.height - dif)); +this.ap.apvscroll.setValues (this.ap.apvscroll.getValue (), d.height - dif, 0, this.av.calcPanelHeight ()); +f.height += dif; +this.ap.seqPanelHolder.setPreferredSize (f); +this.ap.setScrollValues (this.av.getStartRes (), this.av.getStartSeq ()); +this.ap.validate (); +this.ap.addNotify (); +}} else { +var diff; +if ((diff = 6 - evt.getY ()) > 0) { +this.ap.apvscroll.setValue (this.ap.apvscroll.getValue () - diff); +this.ap.adjustmentValueChanged (null); +} else if ((0 < (diff = 6 - this.ap.annotationSpaceFillerHolder.getSize ().height + evt.getY ()))) { +this.ap.apvscroll.setValue (this.ap.apvscroll.getValue () + diff); +this.ap.adjustmentValueChanged (null); +}this.repaint (); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +if (!this.resizePanel && !this.dragCancelled) { +var start = this.selectedRow; +var end = this.getSelectedRow (evt.getY () + this.scrollOffset); +if (start > -1 && start != end) { +var startAA = this.ap.av.getAlignment ().getAlignmentAnnotation ()[start]; +if (end == -1) { +end = this.ap.av.getAlignment ().getAlignmentAnnotation ().length - 1; +}var endAA = this.ap.av.getAlignment ().getAlignmentAnnotation ()[end]; +this.ap.av.getAlignment ().getAlignmentAnnotation ()[end] = startAA; +this.ap.av.getAlignment ().getAlignmentAnnotation ()[start] = endAA; +}}this.resizePanel = false; +this.dragEvent = null; +this.dragCancelled = false; +this.repaint (); +this.ap.annotationPanel.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +if (evt.getY () < 10 && evt.getX () < 14) { +this.resizePanel = true; +this.repaint (); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +this.dragCancelled = false; +if (this.dragEvent == null) { +this.resizePanel = false; +} else { +if (!this.resizePanel) { +this.dragEvent = null; +}}this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +this.oldY = evt.getY (); +if (this.resizePanel) { +return; +}this.dragCancelled = false; +this.selectedRow = this.getSelectedRow (evt.getY () + this.scrollOffset); +var aa = this.ap.av.getAlignment ().getAlignmentAnnotation (); +if ((evt.getModifiers () & 4) == 4) { +var popup = new awt2swing.PopupMenu (jalview.util.MessageManager.getString ("label.annotations")); +var item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.ADDNEW); +item.addActionListener (this); +popup.add (item); +if (this.selectedRow < 0) { +if (this.hasHiddenRows) { +item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.SHOWALL); +item.addActionListener (this); +popup.add (item); +}this.add (popup); +popup.show (this, evt.getX (), evt.getY ()); +return; +}item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.EDITNAME); +item.addActionListener (this); +popup.add (item); +item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.HIDE); +item.addActionListener (this); +popup.add (item); +if (this.selectedRow < aa.length) { +if (aa[this.selectedRow].sequenceRef != null) { +var label = aa[this.selectedRow].label; +var hideType = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.hide_all") + " " + label); +hideType.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$1") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$1, this, Clazz.cloneFinals ("label", label)))); +popup.add (hideType); +}}if (this.hasHiddenRows) { +item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.SHOWALL); +item.addActionListener (this); +popup.add (item); +}this.add (popup); +item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.OUTPUT_TEXT); +item.addActionListener (this); +popup.add (item); +if (this.selectedRow < aa.length) { +if (aa[this.selectedRow].autoCalculated) { +if (aa[this.selectedRow].label.indexOf ("Consensus") > -1) { +popup.addSeparator (); +var cbmi = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.ignore_gaps_consensus"), (aa[this.selectedRow].groupRef != null) ? aa[this.selectedRow].groupRef.getIgnoreGapsConsensus () : this.ap.av.isIgnoreGapsConsensus ()); +var aaa = aa[this.selectedRow]; +cbmi.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$2") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$2, this, Clazz.cloneFinals ("aaa", aaa, "cbmi", cbmi)))); +popup.add (cbmi); +if (aaa.groupRef != null) { +var chist = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_group_histogram"), aa[this.selectedRow].groupRef.isShowConsensusHistogram ()); +chist.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$3") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$3, this, Clazz.cloneFinals ("aaa", aaa, "chist", chist)))); +popup.add (chist); +var cprofl = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_group_logo"), aa[this.selectedRow].groupRef.isShowSequenceLogo ()); +cprofl.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$4") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$4$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$4, this, Clazz.cloneFinals ("aaa", aaa, "cprofl", cprofl)))); +popup.add (cprofl); +var cprofn = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.normalise_group_logo"), aa[this.selectedRow].groupRef.isNormaliseSequenceLogo ()); +cprofn.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$5") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$5$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$5, this, Clazz.cloneFinals ("aaa", aaa, "cprofn", cprofn)))); +popup.add (cprofn); +} else { +var chist = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_histogram"), this.av.isShowConsensusHistogram ()); +chist.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$6") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$6$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$6, this, Clazz.cloneFinals ("chist", chist)))); +popup.add (chist); +var cprof = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.show_logo"), this.av.isShowSequenceLogo ()); +cprof.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$7") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$7$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$7, this, Clazz.cloneFinals ("cprof", cprof)))); +popup.add (cprof); +var cprofn = new awt2swing.CheckboxMenuItem (jalview.util.MessageManager.getString ("label.normalise_logo"), this.av.isNormaliseSequenceLogo ()); +cprofn.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.AnnotationLabels$8") ? 0 : jalview.appletgui.AnnotationLabels.$AnnotationLabels$8$ ()), Clazz.innerTypeInstance (jalview.appletgui.AnnotationLabels$8, this, Clazz.cloneFinals ("cprofn", cprofn)))); +popup.add (cprofn); +}item = new awt2swing.MenuItem (jalview.appletgui.AnnotationLabels.COPYCONS_SEQ); +item.addActionListener (this); +popup.add (item); +}}}popup.show (this, evt.getX (), evt.getY ()); +} else { +if (this.selectedRow > -1 && this.selectedRow < aa.length) { +if (aa[this.selectedRow].groupRef != null) { +if (evt.getClickCount () >= 2) { +this.ap.seqPanel.ap.idPanel.highlightSearchResults (null); +this.ap.av.setSelectionGroup (aa[this.selectedRow].groupRef); +this.ap.av.sendSelection (); +this.ap.paintAlignment (false); +jalview.appletgui.PaintRefresher.Refresh (this.ap, this.ap.av.getSequenceSetId ()); +} else { +this.ap.seqPanel.ap.idPanel.highlightSearchResults (aa[this.selectedRow].groupRef.getSequences (null)); +}return; +} else if (aa[this.selectedRow].sequenceRef != null) { +if (evt.getClickCount () == 1) { +this.ap.seqPanel.ap.idPanel.highlightSearchResults (java.util.Arrays.asList ( Clazz.newArray (-1, [aa[this.selectedRow].sequenceRef]))); +} else if (evt.getClickCount () >= 2) { +this.ap.seqPanel.ap.idPanel.highlightSearchResults (null); +var sg = this.ap.av.getSelectionGroup (); +if (sg != null) { +if (!(evt.isControlDown () || evt.isShiftDown ())) { +sg = new jalview.datamodel.SequenceGroup (sg); +sg.clear (); +sg.addSequence (aa[this.selectedRow].sequenceRef, false); +} else { +if (evt.isControlDown ()) { +sg.addOrRemove (aa[this.selectedRow].sequenceRef, true); +} else { +sg.addSequence (aa[this.selectedRow].sequenceRef, true); +}}} else { +sg = new jalview.datamodel.SequenceGroup (); +sg.setStartRes (0); +sg.setEndRes (this.ap.av.getAlignment ().getWidth () - 1); +sg.addSequence (aa[this.selectedRow].sequenceRef, false); +}this.ap.av.setSelectionGroup (sg); +this.ap.paintAlignment (false); +jalview.appletgui.PaintRefresher.Refresh (this.ap, this.ap.av.getSequenceSetId ()); +this.ap.av.sendSelection (); +}}}}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "copy_annotseqtoclipboard", +function (sq) { +if (sq == null || sq.getLength () < 1) { +return; +}jalview.appletgui.AlignFrame.copiedSequences = new StringBuffer (); +jalview.appletgui.AlignFrame.copiedSequences.append (sq.getName () + "\t" + sq.getStart () + "\t" + sq.getEnd () + "\t" + sq.getSequenceAsString () + "\n"); +if (this.av.hasHiddenColumns ()) { +jalview.appletgui.AlignFrame.copiedHiddenColumns = new java.util.Vector (); +for (var region, $region = this.av.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { +jalview.appletgui.AlignFrame.copiedHiddenColumns.addElement ( Clazz.newIntArray (-1, [region[0], region[1]])); +} +}}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +if (this.av.getWrapAlignment () || !this.av.isShowAnnotation ()) return; +var w = this.getSize ().width; +var h = this.getSize ().height; +if (this.image == null || w != this.image.getWidth (this) || h != this.image.getHeight (this)) { +this.image = this.createImage (w, this.ap.annotationPanel.getSize ().height); +}this.drawComponent (this.image.getGraphics (), w); +g.drawImage (this.image, 0, 0, this); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "drawComponent", +function (g, width) { +g.setFont (this.av.getFont ()); +var fm = g.getFontMetrics (this.av.getFont ()); +g.setColor (java.awt.Color.white); +g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); +g.translate (0, -this.scrollOffset); +g.setColor (java.awt.Color.black); +var aa = this.av.getAlignment ().getAlignmentAnnotation (); +var y = 0; +var fy = g.getFont ().getSize (); +var x = 0; +var offset; +if (aa != null) { +this.hasHiddenRows = false; +for (var i = 0; i < aa.length; i++) { +if (!aa[i].visible) { +this.hasHiddenRows = true; +continue; +}x = width - fm.stringWidth (aa[i].label) - 3; +y += aa[i].height; +offset = Clazz.doubleToInt (-(aa[i].height - fy) / 2); +g.drawString (aa[i].label, x, y + offset); +} +}g.translate (0, +this.scrollOffset); +if (this.resizePanel) { +g.setColor (java.awt.Color.red); +g.setPaintMode (); +g.drawLine (2, 8, 5, 2); +g.drawLine (5, 2, 8, 8); +} else if (!this.dragCancelled && this.dragEvent != null && aa != null) { +g.setColor (java.awt.Color.lightGray); +g.drawString (aa[this.selectedRow].label, this.dragEvent.getX (), this.dragEvent.getY ()); +}if (!this.av.getWrapAlignment () && ((aa == null) || (aa.length < 1))) { +g.setColor (java.awt.Color.black); +g.drawString (jalview.util.MessageManager.getString ("label.right_click"), 2, 8); +g.drawString (jalview.util.MessageManager.getString ("label.to_add_annotation"), 2, 18); +}}, "java.awt.Graphics,~N"); +c$.$AnnotationLabels$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$1", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +jalview.analysis.AlignmentUtils.showOrHideSequenceAnnotations (this.b$["jalview.appletgui.AnnotationLabels"].ap.av.getAlignment (), java.util.Collections.singleton (this.f$.label), null, false, false); +this.b$["jalview.appletgui.AnnotationLabels"].refresh (); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationLabels$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$2", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +if (this.f$.aaa.groupRef != null) { +this.f$.aaa.groupRef.setIgnoreGapsConsensus (this.f$.cbmi.getState ()); +} else { +this.b$["jalview.appletgui.AnnotationLabels"].ap.av.setIgnoreGapsConsensus (this.f$.cbmi.getState (), this.b$["jalview.appletgui.AnnotationLabels"].ap); +}this.b$["jalview.appletgui.AnnotationLabels"].ap.paintAlignment (true); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationLabels$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$3", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +this.f$.aaa.groupRef.setShowConsensusHistogram (this.f$.chist.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationLabels$4$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$4", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +this.f$.aaa.groupRef.setshowSequenceLogo (this.f$.cprofl.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationLabels$5$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$5", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +this.f$.aaa.groupRef.setshowSequenceLogo (true); +this.f$.aaa.groupRef.setNormaliseSequenceLogo (this.f$.cprofn.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationLabels$6$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$6", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +this.b$["jalview.appletgui.AnnotationLabels"].av.setShowConsensusHistogram (this.f$.chist.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.alignFrame.showConsensusHistogram.setState (this.f$.chist.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationLabels$7$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$7", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +this.b$["jalview.appletgui.AnnotationLabels"].av.setShowSequenceLogo (this.f$.cprof.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.alignFrame.showSequenceLogo.setState (this.f$.cprof.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$AnnotationLabels$8$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "AnnotationLabels$8", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +this.b$["jalview.appletgui.AnnotationLabels"].av.setShowSequenceLogo (true); +this.b$["jalview.appletgui.AnnotationLabels"].ap.alignFrame.normSequenceLogo.setState (this.f$.cprofn.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].av.setNormaliseSequenceLogo (this.f$.cprofn.getState ()); +this.b$["jalview.appletgui.AnnotationLabels"].ap.repaint (); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"ADDNEW", "Add New Row", +"EDITNAME", "Edit Label/Description", +"HIDE", "Hide This Row", +"SHOWALL", "Show All Hidden Rows", +"OUTPUT_TEXT", "Show Values In Textbox", +"COPYCONS_SEQ", "Copy Consensus Sequence"); +}); diff --git a/bin/jalview/appletgui/AnnotationPanel.class b/bin/jalview/appletgui/AnnotationPanel.class index ec1d4ce4544ce48b7fdf624f331f19f2a9a28db2..8d48e905c927a7ab5f0c56c46847a025e0519e22 100644 GIT binary patch delta 37 tcmX?{b0}v6qdMc+%}nYmm;_ZAxc@K+u`_!7We{Lw6qb_OyhpR02LR;s3aJ19 delta 38 ucmX?XX5u`_!7We{Lw6qXWa+Pqt{od*Ez#R{tc diff --git a/bin/jalview/appletgui/AnnotationPanel.js b/bin/jalview/appletgui/AnnotationPanel.js index 33f7259..6234bd3 100644 --- a/bin/jalview/appletgui/AnnotationPanel.js +++ b/bin/jalview/appletgui/AnnotationPanel.js @@ -1,364 +1,364 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "jalview.renderer.AwtRenderPanelI", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.MouseListener", "$.MouseMotionListener", "java.awt.Color"], "jalview.appletgui.AnnotationPanel", ["awt2swing.MenuItem", "$.PopupMenu", "jalview.appletgui.EditNameDialog", "$.UserDefinedColours", "jalview.datamodel.Annotation", "jalview.renderer.AnnotationRenderer", "jalview.util.MessageManager", "$.Platform", "java.awt.Dimension", "java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.av = null; -this.ap = null; -this.activeRow = -1; -this.HELIX = "Helix"; -this.SHEET = "Sheet"; -this.STEM = "RNA Helix"; -this.LABEL = "Label"; -this.REMOVE = "Remove Annotation"; -this.COLOUR = "Colour"; -this.HELIX_COLOUR = null; -this.SHEET_COLOUR = null; -this.image = null; -this.gg = null; -this.fm = null; -this.imgWidth = 0; -this.$fastPaint = false; -this.graphStretch = -1; -this.graphStretchY = -1; -this.mouseDragging = false; -this.MAC = false; -this.renderer = null; -this.needValidating = false; -this.scrollOffset = 0; -this.$bounds = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "AnnotationPanel", awt2swing.Panel, [jalview.renderer.AwtRenderPanelI, java.awt.event.AdjustmentListener, java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); -Clazz.prepareFields (c$, function () { -this.HELIX_COLOUR = java.awt.Color.red.darker (); -this.SHEET_COLOUR = java.awt.Color.green.darker ().darker (); -this.$bounds = Clazz.newIntArray (2, 0); -}); -Clazz.makeConstructor (c$, -function (ap) { -Clazz.superConstructor (this, jalview.appletgui.AnnotationPanel, []); -this.MAC = jalview.util.Platform.isAMac (); -this.ap = ap; -this.av = ap.av; -this.setLayout (null); -var height = this.adjustPanelHeight (); -ap.apvscroll.setValues (0, this.getSize ().height, 0, height); -this.addMouseMotionListener (this); -this.addMouseListener (this); -this.renderer = new jalview.renderer.AnnotationRenderer (); -}, "jalview.appletgui.AlignmentPanel"); -Clazz.makeConstructor (c$, -function (av) { -Clazz.superConstructor (this, jalview.appletgui.AnnotationPanel, []); -this.av = av; -this.renderer = new jalview.renderer.AnnotationRenderer (); -}, "jalview.appletgui.AlignViewport"); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -}, "java.awt.event.AdjustmentEvent"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -var aa = this.av.getAlignment ().getAlignmentAnnotation (); -if (aa == null) { -return; -}var anot = aa[this.activeRow].annotations; -if (anot.length < this.av.getColumnSelection ().getMax ()) { -var temp = new Array (this.av.getColumnSelection ().getMax () + 2); -System.arraycopy (anot, 0, temp, 0, anot.length); -anot = temp; -aa[this.activeRow].annotations = anot; -}var label = ""; -if (this.av.getColumnSelection () != null && this.av.getColumnSelection ().size () > 0 && anot[this.av.getColumnSelection ().getMin ()] != null) { -label = anot[this.av.getColumnSelection ().getMin ()].displayCharacter; -}if (evt.getActionCommand ().equals ("Remove Annotation")) { -for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { -anot[this.av.getColumnSelection ().columnAt (i)] = null; -} -} else if (evt.getActionCommand ().equals ("Label")) { -label = this.enterLabel (label, "Enter Label"); -if (label == null) { -return; -}if ((label.length > 0) && !aa[this.activeRow].hasText) { -aa[this.activeRow].hasText = true; -}for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { -var index = this.av.getColumnSelection ().columnAt (i); -if (!this.av.getColumnSelection ().isVisible (index)) { -continue; -}if (anot[index] == null) { -anot[index] = new jalview.datamodel.Annotation (label, "", ' ', 0); -}anot[index].displayCharacter = label; -} -} else if (evt.getActionCommand ().equals ("Colour")) { -var udc = new jalview.appletgui.UserDefinedColours (this, java.awt.Color.black, this.ap.alignFrame); -var col = udc.getColor (); -for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { -var index = this.av.getColumnSelection ().columnAt (i); -if (!this.av.getColumnSelection ().isVisible (index)) { -continue; -}if (anot[index] == null) { -anot[index] = new jalview.datamodel.Annotation ("", "", ' ', 0); -}anot[index].colour = col; -} -} else { -var type = String.fromCharCode (0); -var symbol = "\u03B1"; -if (evt.getActionCommand ().equals ("Helix")) { -type = 'H'; -} else if (evt.getActionCommand ().equals ("Sheet")) { -type = 'E'; -symbol = "\u03B2"; -} else if (evt.getActionCommand ().equals ("RNA Helix")) { -type = 'S'; -symbol = "\u03C3"; -}if (!aa[this.activeRow].hasIcons) { -aa[this.activeRow].hasIcons = true; -}label = this.enterLabel (symbol, "Enter Label"); -if (label == null) { -return; -}if ((label.length > 0) && !aa[this.activeRow].hasText) { -aa[this.activeRow].hasText = true; -if (evt.getActionCommand ().equals ("RNA Helix")) { -aa[this.activeRow].showAllColLabels = true; -}}for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { -var index = this.av.getColumnSelection ().columnAt (i); -if (!this.av.getColumnSelection ().isVisible (index)) { -continue; -}if (anot[index] == null) { -anot[index] = new jalview.datamodel.Annotation (label, "", type, 0); -}anot[index].secondaryStructure = type != 'S' ? type : label.length == 0 ? ' ' : label.charAt (0); -anot[index].displayCharacter = label; -} -}this.av.getAlignment ().validateAnnotation (aa[this.activeRow]); -this.ap.alignmentChanged (); -this.adjustPanelHeight (); -this.repaint (); -return; -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "enterLabel", -function (text, label) { -var dialog = new jalview.appletgui.EditNameDialog (text, null, label, null, this.ap.alignFrame, "Enter Label", 400, 200, true); -if (dialog.accept) { -return dialog.getName (); -} else { -return null; -}}, "~S,~S"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -var aa = this.av.getAlignment ().getAlignmentAnnotation (); -if (aa == null) { -return; -}var height = -this.scrollOffset; -this.activeRow = -1; -for (var i = 0; i < aa.length; i++) { -if (aa[i].visible) { -height += aa[i].height; -}if (evt.getY () < height) { -if (aa[i].editable) { -this.activeRow = i; -} else if (aa[i].graph > 0) { -this.graphStretch = i; -this.graphStretchY = evt.getY (); -}break; -}} -if ((evt.getModifiers () & 4) == 4 && this.activeRow != -1) { -if (this.av.getColumnSelection () == null) { -return; -}var pop = new awt2swing.PopupMenu (jalview.util.MessageManager.getString ("label.structure_type")); -var item; -if (this.av.getAlignment ().isNucleotide () == true) { -item = new awt2swing.MenuItem ("RNA Helix"); -item.addActionListener (this); -pop.add (item); -} else { -item = new awt2swing.MenuItem ("Helix"); -item.addActionListener (this); -pop.add (item); -item = new awt2swing.MenuItem ("Sheet"); -item.addActionListener (this); -pop.add (item); -}item = new awt2swing.MenuItem ("Label"); -item.addActionListener (this); -pop.add (item); -item = new awt2swing.MenuItem ("Colour"); -item.addActionListener (this); -pop.add (item); -item = new awt2swing.MenuItem ("Remove Annotation"); -item.addActionListener (this); -pop.add (item); -this.ap.alignFrame.add (pop); -pop.show (this, evt.getX (), evt.getY ()); -return; -}this.ap.scalePanel.mousePressed (evt); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -this.graphStretch = -1; -this.graphStretchY = -1; -this.mouseDragging = false; -if (this.needValidating) { -this.ap.validate (); -this.needValidating = false; -}this.ap.scalePanel.mouseReleased (evt); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -if (this.graphStretch > -1) { -this.av.getAlignment ().getAlignmentAnnotation ()[this.graphStretch].graphHeight += this.graphStretchY - evt.getY (); -if (this.av.getAlignment ().getAlignmentAnnotation ()[this.graphStretch].graphHeight < 0) { -this.av.getAlignment ().getAlignmentAnnotation ()[this.graphStretch].graphHeight = 0; -}this.graphStretchY = evt.getY (); -this.av.calcPanelHeight (); -this.needValidating = true; -this.ap.paintAlignment (true); -} else { -this.ap.scalePanel.mouseDragged (evt); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -var aa = this.av.getAlignment ().getAlignmentAnnotation (); -if (aa == null) { -return; -}var row = -1; -var height = -this.scrollOffset; -for (var i = 0; i < aa.length; i++) { -if (aa[i].visible) { -height += aa[i].height; -}if (evt.getY () < height) { -row = i; -break; -}} -var res = Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ()) + this.av.getStartRes (); -if (this.av.hasHiddenColumns ()) { -res = this.av.getColumnSelection ().adjustForHiddenColumns (res); -}if (row > -1 && res < aa[row].annotations.length && aa[row].annotations[res] != null) { -var text = new StringBuffer ("Sequence position " + (res + 1)); -if (aa[row].annotations[res].description != null) { -text.append (" " + aa[row].annotations[res].description); -}this.ap.alignFrame.setStatus (text.toString ()); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -this.ap.scalePanel.mouseEntered (evt); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -this.ap.scalePanel.mouseExited (evt); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "adjustPanelHeight", -function () { -return this.adjustPanelHeight (true); -}); -Clazz.defineMethod (c$, "adjustPanelHeight", -function (repaint) { -var height = this.av.calcPanelHeight (); -this.setSize ( new java.awt.Dimension (this.getSize ().width, height)); -if (repaint) { -this.repaint (); -}return height; -}, "~B"); -Clazz.defineMethod (c$, "addEditableColumn", -function (i) { -if (this.activeRow == -1) { -var aa = this.av.getAlignment ().getAlignmentAnnotation (); -if (aa == null) { -return; -}for (var j = 0; j < aa.length; j++) { -if (aa[j].editable) { -this.activeRow = j; -break; -}} -}}, "~N"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -if (this.av.getWrapAlignment () || !this.av.isShowAnnotation ()) return; -var d = this.getSize (); -this.imgWidth = d.width; -if (this.imgWidth < 1 || d.height < 1) { -return; -}if (this.image == null || this.imgWidth != this.image.getWidth (this) || d.height != this.image.getHeight (this)) { -this.image = this.createImage (this.imgWidth, d.height); -this.gg = this.image.getGraphics (); -this.gg.setFont (this.av.getFont ()); -this.fm = this.gg.getFontMetrics (); -this.$fastPaint = false; -}if (this.$fastPaint) { -g.drawImage (this.image, 0, 0, this); -this.$fastPaint = false; -return; -}this.gg.setColor (java.awt.Color.white); -this.gg.fillRect (0, 0, this.getSize ().width, this.getSize ().height); -this.drawComponent (this.gg, this.av.startRes, this.av.endRes + 1); -g.drawImage (this.image, 0, 0, this); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "fastPaint", -function (horizontal) { -if (horizontal == 0 || this.av.getAlignment ().getAlignmentAnnotation () == null || this.av.getAlignment ().getAlignmentAnnotation ().length < 1) { -this.repaint (); -return; -}this.gg.copyArea (0, 0, this.imgWidth, this.getSize ().height, -horizontal * this.av.getCharWidth (), 0); -var sr = this.av.startRes; -var er = this.av.endRes + 1; -var transX = 0; -if (horizontal > 0) { -transX = (er - sr - horizontal) * this.av.getCharWidth (); -sr = er - horizontal; -} else if (horizontal < 0) { -er = sr - horizontal; -}this.gg.translate (transX, 0); -this.drawComponent (this.gg, sr, er); -this.gg.translate (-transX, 0); -this.$fastPaint = true; -this.repaint (); -}, "~N"); -Clazz.defineMethod (c$, "drawComponent", -function (g, startRes, endRes) { -var ofont = this.av.getFont (); -g.setFont (ofont); -g.setColor (java.awt.Color.white); -g.fillRect (0, 0, (endRes - startRes) * this.av.getCharWidth (), this.getSize ().height); -if (this.fm == null) { -this.fm = g.getFontMetrics (); -}if ((this.av.getAlignment ().getAlignmentAnnotation () == null) || (this.av.getAlignment ().getAlignmentAnnotation ().length < 1)) { -g.setColor (java.awt.Color.white); -g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); -g.setColor (java.awt.Color.black); -if (this.av.validCharWidth) { -g.drawString (jalview.util.MessageManager.getString ("label.alignment_has_no_annotations"), 20, 15); -}return; -}g.translate (0, -this.scrollOffset); -this.renderer.drawComponent (this, this.av, g, this.activeRow, startRes, endRes); -g.translate (0, +this.scrollOffset); -}, "java.awt.Graphics,~N,~N"); -Clazz.defineMethod (c$, "setScrollOffset", -function (value, repaint) { -this.scrollOffset = value; -if (repaint) { -this.repaint (); -}}, "~N,~B"); -Clazz.defineMethod (c$, "getFontMetrics", -function () { -return this.fm; -}); -Clazz.overrideMethod (c$, "getFadedImage", -function () { -return this.image; -}); -Clazz.overrideMethod (c$, "getFadedImageWidth", -function () { -return this.imgWidth; -}); -Clazz.overrideMethod (c$, "getVisibleVRange", -function () { -if (this.ap != null && this.ap.alabels != null) { -var sOffset = -this.ap.alabels.scrollOffset; -var visHeight = sOffset + this.ap.annotationPanelHolder.getHeight (); -this.$bounds[0] = sOffset; -this.$bounds[1] = visHeight; -return this.$bounds; -} else { -return null; -}}); -Clazz.defineStatics (c$, -"GRAPH_HEIGHT", 40); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "jalview.renderer.AwtRenderPanelI", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.MouseListener", "$.MouseMotionListener", "java.awt.Color"], "jalview.appletgui.AnnotationPanel", ["awt2swing.MenuItem", "$.PopupMenu", "jalview.appletgui.EditNameDialog", "$.UserDefinedColours", "jalview.datamodel.Annotation", "jalview.renderer.AnnotationRenderer", "jalview.util.MessageManager", "$.Platform", "java.awt.Dimension", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.av = null; +this.ap = null; +this.activeRow = -1; +this.HELIX = "Helix"; +this.SHEET = "Sheet"; +this.STEM = "RNA Helix"; +this.LABEL = "Label"; +this.REMOVE = "Remove Annotation"; +this.COLOUR = "Colour"; +this.HELIX_COLOUR = null; +this.SHEET_COLOUR = null; +this.image = null; +this.gg = null; +this.fm = null; +this.imgWidth = 0; +this.$fastPaint = false; +this.graphStretch = -1; +this.graphStretchY = -1; +this.mouseDragging = false; +this.MAC = false; +this.renderer = null; +this.needValidating = false; +this.scrollOffset = 0; +this.$bounds = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AnnotationPanel", awt2swing.Panel, [jalview.renderer.AwtRenderPanelI, java.awt.event.AdjustmentListener, java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); +Clazz.prepareFields (c$, function () { +this.HELIX_COLOUR = java.awt.Color.red.darker (); +this.SHEET_COLOUR = java.awt.Color.green.darker ().darker (); +this.$bounds = Clazz.newIntArray (2, 0); +}); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.AnnotationPanel, []); +this.MAC = jalview.util.Platform.isAMac (); +this.ap = ap; +this.av = ap.av; +this.setLayout (null); +var height = this.adjustPanelHeight (); +ap.apvscroll.setValues (0, this.getSize ().height, 0, height); +this.addMouseMotionListener (this); +this.addMouseListener (this); +this.renderer = new jalview.renderer.AnnotationRenderer (); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.makeConstructor (c$, +function (av) { +Clazz.superConstructor (this, jalview.appletgui.AnnotationPanel, []); +this.av = av; +this.renderer = new jalview.renderer.AnnotationRenderer (); +}, "jalview.appletgui.AlignViewport"); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +}, "java.awt.event.AdjustmentEvent"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +var aa = this.av.getAlignment ().getAlignmentAnnotation (); +if (aa == null) { +return; +}var anot = aa[this.activeRow].annotations; +if (anot.length < this.av.getColumnSelection ().getMax ()) { +var temp = new Array (this.av.getColumnSelection ().getMax () + 2); +System.arraycopy (anot, 0, temp, 0, anot.length); +anot = temp; +aa[this.activeRow].annotations = anot; +}var label = ""; +if (this.av.getColumnSelection () != null && this.av.getColumnSelection ().size () > 0 && anot[this.av.getColumnSelection ().getMin ()] != null) { +label = anot[this.av.getColumnSelection ().getMin ()].displayCharacter; +}if (evt.getActionCommand ().equals ("Remove Annotation")) { +for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { +anot[this.av.getColumnSelection ().columnAt (i)] = null; +} +} else if (evt.getActionCommand ().equals ("Label")) { +label = this.enterLabel (label, "Enter Label"); +if (label == null) { +return; +}if ((label.length > 0) && !aa[this.activeRow].hasText) { +aa[this.activeRow].hasText = true; +}for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { +var index = this.av.getColumnSelection ().columnAt (i); +if (!this.av.getColumnSelection ().isVisible (index)) { +continue; +}if (anot[index] == null) { +anot[index] = new jalview.datamodel.Annotation (label, "", ' ', 0); +}anot[index].displayCharacter = label; +} +} else if (evt.getActionCommand ().equals ("Colour")) { +var udc = new jalview.appletgui.UserDefinedColours (this, java.awt.Color.black, this.ap.alignFrame); +var col = udc.getColor (); +for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { +var index = this.av.getColumnSelection ().columnAt (i); +if (!this.av.getColumnSelection ().isVisible (index)) { +continue; +}if (anot[index] == null) { +anot[index] = new jalview.datamodel.Annotation ("", "", ' ', 0); +}anot[index].colour = col; +} +} else { +var type = String.fromCharCode (0); +var symbol = "\u03B1"; +if (evt.getActionCommand ().equals ("Helix")) { +type = 'H'; +} else if (evt.getActionCommand ().equals ("Sheet")) { +type = 'E'; +symbol = "\u03B2"; +} else if (evt.getActionCommand ().equals ("RNA Helix")) { +type = 'S'; +symbol = "\u03C3"; +}if (!aa[this.activeRow].hasIcons) { +aa[this.activeRow].hasIcons = true; +}label = this.enterLabel (symbol, "Enter Label"); +if (label == null) { +return; +}if ((label.length > 0) && !aa[this.activeRow].hasText) { +aa[this.activeRow].hasText = true; +if (evt.getActionCommand ().equals ("RNA Helix")) { +aa[this.activeRow].showAllColLabels = true; +}}for (var i = 0; i < this.av.getColumnSelection ().size (); i++) { +var index = this.av.getColumnSelection ().columnAt (i); +if (!this.av.getColumnSelection ().isVisible (index)) { +continue; +}if (anot[index] == null) { +anot[index] = new jalview.datamodel.Annotation (label, "", type, 0); +}anot[index].secondaryStructure = type != 'S' ? type : label.length == 0 ? ' ' : label.charAt (0); +anot[index].displayCharacter = label; +} +}this.av.getAlignment ().validateAnnotation (aa[this.activeRow]); +this.ap.alignmentChanged (); +this.adjustPanelHeight (); +this.repaint (); +return; +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "enterLabel", +function (text, label) { +var dialog = new jalview.appletgui.EditNameDialog (text, null, label, null, this.ap.alignFrame, "Enter Label", 400, 200, true); +if (dialog.accept) { +return dialog.getName (); +} else { +return null; +}}, "~S,~S"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +var aa = this.av.getAlignment ().getAlignmentAnnotation (); +if (aa == null) { +return; +}var height = -this.scrollOffset; +this.activeRow = -1; +for (var i = 0; i < aa.length; i++) { +if (aa[i].visible) { +height += aa[i].height; +}if (evt.getY () < height) { +if (aa[i].editable) { +this.activeRow = i; +} else if (aa[i].graph > 0) { +this.graphStretch = i; +this.graphStretchY = evt.getY (); +}break; +}} +if ((evt.getModifiers () & 4) == 4 && this.activeRow != -1) { +if (this.av.getColumnSelection () == null) { +return; +}var pop = new awt2swing.PopupMenu (jalview.util.MessageManager.getString ("label.structure_type")); +var item; +if (this.av.getAlignment ().isNucleotide () == true) { +item = new awt2swing.MenuItem ("RNA Helix"); +item.addActionListener (this); +pop.add (item); +} else { +item = new awt2swing.MenuItem ("Helix"); +item.addActionListener (this); +pop.add (item); +item = new awt2swing.MenuItem ("Sheet"); +item.addActionListener (this); +pop.add (item); +}item = new awt2swing.MenuItem ("Label"); +item.addActionListener (this); +pop.add (item); +item = new awt2swing.MenuItem ("Colour"); +item.addActionListener (this); +pop.add (item); +item = new awt2swing.MenuItem ("Remove Annotation"); +item.addActionListener (this); +pop.add (item); +this.ap.alignFrame.add (pop); +pop.show (this, evt.getX (), evt.getY ()); +return; +}this.ap.scalePanel.mousePressed (evt); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +this.graphStretch = -1; +this.graphStretchY = -1; +this.mouseDragging = false; +if (this.needValidating) { +this.ap.validate (); +this.needValidating = false; +}this.ap.scalePanel.mouseReleased (evt); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +if (this.graphStretch > -1) { +this.av.getAlignment ().getAlignmentAnnotation ()[this.graphStretch].graphHeight += this.graphStretchY - evt.getY (); +if (this.av.getAlignment ().getAlignmentAnnotation ()[this.graphStretch].graphHeight < 0) { +this.av.getAlignment ().getAlignmentAnnotation ()[this.graphStretch].graphHeight = 0; +}this.graphStretchY = evt.getY (); +this.av.calcPanelHeight (); +this.needValidating = true; +this.ap.paintAlignment (true); +} else { +this.ap.scalePanel.mouseDragged (evt); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +var aa = this.av.getAlignment ().getAlignmentAnnotation (); +if (aa == null) { +return; +}var row = -1; +var height = -this.scrollOffset; +for (var i = 0; i < aa.length; i++) { +if (aa[i].visible) { +height += aa[i].height; +}if (evt.getY () < height) { +row = i; +break; +}} +var res = Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ()) + this.av.getStartRes (); +if (this.av.hasHiddenColumns ()) { +res = this.av.getColumnSelection ().adjustForHiddenColumns (res); +}if (row > -1 && res < aa[row].annotations.length && aa[row].annotations[res] != null) { +var text = new StringBuffer ("Sequence position " + (res + 1)); +if (aa[row].annotations[res].description != null) { +text.append (" " + aa[row].annotations[res].description); +}this.ap.alignFrame.setStatus (text.toString ()); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +this.ap.scalePanel.mouseEntered (evt); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +this.ap.scalePanel.mouseExited (evt); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "adjustPanelHeight", +function () { +return this.adjustPanelHeight (true); +}); +Clazz.defineMethod (c$, "adjustPanelHeight", +function (repaint) { +var height = this.av.calcPanelHeight (); +this.setSize ( new java.awt.Dimension (this.getSize ().width, height)); +if (repaint) { +this.repaint (); +}return height; +}, "~B"); +Clazz.defineMethod (c$, "addEditableColumn", +function (i) { +if (this.activeRow == -1) { +var aa = this.av.getAlignment ().getAlignmentAnnotation (); +if (aa == null) { +return; +}for (var j = 0; j < aa.length; j++) { +if (aa[j].editable) { +this.activeRow = j; +break; +}} +}}, "~N"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +if (this.av.getWrapAlignment () || !this.av.isShowAnnotation ()) return; +var d = this.getSize (); +this.imgWidth = d.width; +if (this.imgWidth < 1 || d.height < 1) { +return; +}if (this.image == null || this.imgWidth != this.image.getWidth (this) || d.height != this.image.getHeight (this)) { +this.image = this.createImage (this.imgWidth, d.height); +this.gg = this.image.getGraphics (); +this.gg.setFont (this.av.getFont ()); +this.fm = this.gg.getFontMetrics (); +this.$fastPaint = false; +}if (this.$fastPaint) { +g.drawImage (this.image, 0, 0, this); +this.$fastPaint = false; +return; +}this.gg.setColor (java.awt.Color.white); +this.gg.fillRect (0, 0, this.getSize ().width, this.getSize ().height); +this.drawComponent (this.gg, this.av.startRes, this.av.endRes + 1); +g.drawImage (this.image, 0, 0, this); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "fastPaint", +function (horizontal) { +if (horizontal == 0 || this.av.getAlignment ().getAlignmentAnnotation () == null || this.av.getAlignment ().getAlignmentAnnotation ().length < 1) { +this.repaint (); +return; +}this.gg.copyArea (0, 0, this.imgWidth, this.getSize ().height, -horizontal * this.av.getCharWidth (), 0); +var sr = this.av.startRes; +var er = this.av.endRes + 1; +var transX = 0; +if (horizontal > 0) { +transX = (er - sr - horizontal) * this.av.getCharWidth (); +sr = er - horizontal; +} else if (horizontal < 0) { +er = sr - horizontal; +}this.gg.translate (transX, 0); +this.drawComponent (this.gg, sr, er); +this.gg.translate (-transX, 0); +this.$fastPaint = true; +this.repaint (); +}, "~N"); +Clazz.defineMethod (c$, "drawComponent", +function (g, startRes, endRes) { +var ofont = this.av.getFont (); +g.setFont (ofont); +g.setColor (java.awt.Color.white); +g.fillRect (0, 0, (endRes - startRes) * this.av.getCharWidth (), this.getSize ().height); +if (this.fm == null) { +this.fm = g.getFontMetrics (); +}if ((this.av.getAlignment ().getAlignmentAnnotation () == null) || (this.av.getAlignment ().getAlignmentAnnotation ().length < 1)) { +g.setColor (java.awt.Color.white); +g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); +g.setColor (java.awt.Color.black); +if (this.av.validCharWidth) { +g.drawString (jalview.util.MessageManager.getString ("label.alignment_has_no_annotations"), 20, 15); +}return; +}g.translate (0, -this.scrollOffset); +this.renderer.drawComponent (this, this.av, g, this.activeRow, startRes, endRes); +g.translate (0, +this.scrollOffset); +}, "java.awt.Graphics,~N,~N"); +Clazz.defineMethod (c$, "setScrollOffset", +function (value, repaint) { +this.scrollOffset = value; +if (repaint) { +this.repaint (); +}}, "~N,~B"); +Clazz.defineMethod (c$, "getFontMetrics", +function () { +return this.fm; +}); +Clazz.overrideMethod (c$, "getFadedImage", +function () { +return this.image; +}); +Clazz.overrideMethod (c$, "getFadedImageWidth", +function () { +return this.imgWidth; +}); +Clazz.overrideMethod (c$, "getVisibleVRange", +function () { +if (this.ap != null && this.ap.alabels != null) { +var sOffset = -this.ap.alabels.scrollOffset; +var visHeight = sOffset + this.ap.annotationPanelHolder.getHeight (); +this.$bounds[0] = sOffset; +this.$bounds[1] = visHeight; +return this.$bounds; +} else { +return null; +}}); +Clazz.defineStatics (c$, +"GRAPH_HEIGHT", 40); +}); diff --git a/bin/jalview/appletgui/AnnotationRowFilter.js b/bin/jalview/appletgui/AnnotationRowFilter.js index 8b9fe70..aafbcad 100644 --- a/bin/jalview/appletgui/AnnotationRowFilter.js +++ b/bin/jalview/appletgui/AnnotationRowFilter.js @@ -1,131 +1,131 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "$.Button", "$.Checkbox", "$.Scrollbar", "$.TextField"], "jalview.appletgui.AnnotationRowFilter", ["jalview.util.MessageManager", "java.lang.Float", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.av = null; -this.ap = null; -this.annmap = null; -this.enableSeqAss = false; -this.currentAnnotation = null; -this.adjusting = false; -this.currentColours = null; -this.minColour = null; -this.maxColour = null; -this.seqAssociated = null; -this.thresholdIsMin = null; -this.slider = null; -this.thresholdValue = null; -this.frame = null; -this.ok = null; -this.cancel = null; -this.sliderDragging = false; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "AnnotationRowFilter", awt2swing.Panel); -Clazz.prepareFields (c$, function () { -this.currentColours = new awt2swing.Checkbox (); -this.minColour = new awt2swing.Panel (); -this.maxColour = new awt2swing.Panel (); -this.seqAssociated = new awt2swing.Checkbox (); -this.thresholdIsMin = new awt2swing.Checkbox (); -this.slider = new awt2swing.Scrollbar (0); -this.thresholdValue = new awt2swing.TextField (20); -this.ok = new awt2swing.Button (); -this.cancel = new awt2swing.Button (); -}); -Clazz.makeConstructor (c$, -function (av, ap) { -Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []); -this.av = av; -this.ap = ap; -}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []); -}); -Clazz.defineMethod (c$, "getAnnotationItems", -function (isSeqAssociated) { -var list = new java.util.Vector (); -var index = 1; -var anmap = Clazz.newIntArray (this.av.getAlignment ().getAlignmentAnnotation ().length, 0); -for (var i = 0; i < this.av.getAlignment ().getAlignmentAnnotation ().length; i++) { -if (this.av.getAlignment ().getAlignmentAnnotation ()[i].sequenceRef == null) { -if (isSeqAssociated) { -continue; -}} else { -this.enableSeqAss = true; -}var label = this.av.getAlignment ().getAlignmentAnnotation ()[i].label; -if (!list.contains (label)) { -anmap[list.size ()] = i; -list.add (label); -} else { -if (!isSeqAssociated) { -anmap[list.size ()] = i; -list.add (label + "_" + (index++)); -}}} -this.annmap = Clazz.newIntArray (list.size (), 0); -System.arraycopy (anmap, 0, this.annmap, 0, this.annmap.length); -return list; -}, "~B"); -Clazz.defineMethod (c$, "getSelectedThresholdItem", -function (indexValue) { -var selectedThresholdItem = -1; -if (indexValue == 1) { -selectedThresholdItem = 1; -} else if (indexValue == 2) { -selectedThresholdItem = 0; -}return selectedThresholdItem; -}, "~N"); -Clazz.defineMethod (c$, "modelChanged", -function () { -this.seqAssociated.setEnabled (this.enableSeqAss); -}); -Clazz.defineMethod (c$, "ok_actionPerformed", -function (e) { -this.updateView (); -this.frame.setVisible (false); -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "cancel_actionPerformed", -function (e) { -this.reset (); -this.ap.paintAlignment (true); -this.frame.setVisible (false); -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "thresholdCheck_actionPerformed", -function (e) { -this.updateView (); -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "annotations_actionPerformed", -function (e) { -this.updateView (); -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "threshold_actionPerformed", -function (e) { -this.updateView (); -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "thresholdValue_actionPerformed", -function (e) { -try { -var f = Float.parseFloat (this.thresholdValue.getText ()); -this.slider.setValue (Clazz.floatToInt (f * 1000)); -this.updateView (); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "populateThresholdComboBox", -function (threshold) { -threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold")); -threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold")); -threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold")); -}, "awt2swing.Choice"); -Clazz.defineMethod (c$, "getCurrentAnnotation", -function () { -return this.currentAnnotation; -}); -Clazz.defineMethod (c$, "setCurrentAnnotation", -function (currentAnnotation) { -this.currentAnnotation = currentAnnotation; -}, "jalview.datamodel.AlignmentAnnotation"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "$.Button", "$.Checkbox", "$.Scrollbar", "$.TextField"], "jalview.appletgui.AnnotationRowFilter", ["jalview.util.MessageManager", "java.lang.Float", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.av = null; +this.ap = null; +this.annmap = null; +this.enableSeqAss = false; +this.currentAnnotation = null; +this.adjusting = false; +this.currentColours = null; +this.minColour = null; +this.maxColour = null; +this.seqAssociated = null; +this.thresholdIsMin = null; +this.slider = null; +this.thresholdValue = null; +this.frame = null; +this.ok = null; +this.cancel = null; +this.sliderDragging = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AnnotationRowFilter", awt2swing.Panel); +Clazz.prepareFields (c$, function () { +this.currentColours = new awt2swing.Checkbox (); +this.minColour = new awt2swing.Panel (); +this.maxColour = new awt2swing.Panel (); +this.seqAssociated = new awt2swing.Checkbox (); +this.thresholdIsMin = new awt2swing.Checkbox (); +this.slider = new awt2swing.Scrollbar (0); +this.thresholdValue = new awt2swing.TextField (20); +this.ok = new awt2swing.Button (); +this.cancel = new awt2swing.Button (); +}); +Clazz.makeConstructor (c$, +function (av, ap) { +Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []); +this.av = av; +this.ap = ap; +}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.appletgui.AnnotationRowFilter, []); +}); +Clazz.defineMethod (c$, "getAnnotationItems", +function (isSeqAssociated) { +var list = new java.util.Vector (); +var index = 1; +var anmap = Clazz.newIntArray (this.av.getAlignment ().getAlignmentAnnotation ().length, 0); +for (var i = 0; i < this.av.getAlignment ().getAlignmentAnnotation ().length; i++) { +if (this.av.getAlignment ().getAlignmentAnnotation ()[i].sequenceRef == null) { +if (isSeqAssociated) { +continue; +}} else { +this.enableSeqAss = true; +}var label = this.av.getAlignment ().getAlignmentAnnotation ()[i].label; +if (!list.contains (label)) { +anmap[list.size ()] = i; +list.add (label); +} else { +if (!isSeqAssociated) { +anmap[list.size ()] = i; +list.add (label + "_" + (index++)); +}}} +this.annmap = Clazz.newIntArray (list.size (), 0); +System.arraycopy (anmap, 0, this.annmap, 0, this.annmap.length); +return list; +}, "~B"); +Clazz.defineMethod (c$, "getSelectedThresholdItem", +function (indexValue) { +var selectedThresholdItem = -1; +if (indexValue == 1) { +selectedThresholdItem = 1; +} else if (indexValue == 2) { +selectedThresholdItem = 0; +}return selectedThresholdItem; +}, "~N"); +Clazz.defineMethod (c$, "modelChanged", +function () { +this.seqAssociated.setEnabled (this.enableSeqAss); +}); +Clazz.defineMethod (c$, "ok_actionPerformed", +function (e) { +this.updateView (); +this.frame.setVisible (false); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "cancel_actionPerformed", +function (e) { +this.reset (); +this.ap.paintAlignment (true); +this.frame.setVisible (false); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "thresholdCheck_actionPerformed", +function (e) { +this.updateView (); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "annotations_actionPerformed", +function (e) { +this.updateView (); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "threshold_actionPerformed", +function (e) { +this.updateView (); +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "thresholdValue_actionPerformed", +function (e) { +try { +var f = Float.parseFloat (this.thresholdValue.getText ()); +this.slider.setValue (Clazz.floatToInt (f * 1000)); +this.updateView (); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "populateThresholdComboBox", +function (threshold) { +threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold")); +threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold")); +threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold")); +}, "awt2swing.Choice"); +Clazz.defineMethod (c$, "getCurrentAnnotation", +function () { +return this.currentAnnotation; +}); +Clazz.defineMethod (c$, "setCurrentAnnotation", +function (currentAnnotation) { +this.currentAnnotation = currentAnnotation; +}, "jalview.datamodel.AlignmentAnnotation"); +}); diff --git a/bin/jalview/appletgui/AppletJmol.js b/bin/jalview/appletgui/AppletJmol.js index d2a97b8..b8f808a 100644 --- a/bin/jalview/appletgui/AppletJmol.js +++ b/bin/jalview/appletgui/AppletJmol.js @@ -1,48 +1,48 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.Dimension", "java.util.ArrayList"], "jalview.appletgui.AppletJmol", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.scriptWindow = null; -this.inputLine = null; -this.history = null; -this.renderPanel = null; -this.ap = null; -this._aps = null; -this.fileLoadingError = null; -this.loadedInline = false; -this.fr = null; -this.jmb = null; -if (!Clazz.isClassDefined ("jalview.appletgui.AppletJmol.RenderPanel")) { -jalview.appletgui.AppletJmol.$AppletJmol$RenderPanel$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "AppletJmol"); -Clazz.prepareFields (c$, function () { -this._aps = new java.util.ArrayList (); -}); -Clazz.makeConstructor (c$, -function (entry, sequenceIs, object, ap2, uRL) { -}, "jalview.datamodel.PDBEntry,~A,~O,jalview.appletgui.AlignmentPanel,~S"); -Clazz.defineMethod (c$, "setJalviewColourScheme", -function (ucs) { -}, "jalview.schemes.UserColourScheme"); -c$.$AppletJmol$RenderPanel$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.currentSize = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui.AppletJmol, "RenderPanel", awt2swing.Panel); -Clazz.prepareFields (c$, function () { -this.currentSize = new java.awt.Dimension (); -}); -Clazz.overrideMethod (c$, "update", -function (a) { -this.paint (a); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "PaintComponent", -function (a) { -this.currentSize = this.getSize (); -}, "java.awt.Graphics"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.Dimension", "java.util.ArrayList"], "jalview.appletgui.AppletJmol", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.scriptWindow = null; +this.inputLine = null; +this.history = null; +this.renderPanel = null; +this.ap = null; +this._aps = null; +this.fileLoadingError = null; +this.loadedInline = false; +this.fr = null; +this.jmb = null; +if (!Clazz.isClassDefined ("jalview.appletgui.AppletJmol.RenderPanel")) { +jalview.appletgui.AppletJmol.$AppletJmol$RenderPanel$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "AppletJmol"); +Clazz.prepareFields (c$, function () { +this._aps = new java.util.ArrayList (); +}); +Clazz.makeConstructor (c$, +function (entry, sequenceIs, object, ap2, uRL) { +}, "jalview.datamodel.PDBEntry,~A,~O,jalview.appletgui.AlignmentPanel,~S"); +Clazz.defineMethod (c$, "setJalviewColourScheme", +function (ucs) { +}, "jalview.schemes.UserColourScheme"); +c$.$AppletJmol$RenderPanel$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.currentSize = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui.AppletJmol, "RenderPanel", awt2swing.Panel); +Clazz.prepareFields (c$, function () { +this.currentSize = new java.awt.Dimension (); +}); +Clazz.overrideMethod (c$, "update", +function (a) { +this.paint (a); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "PaintComponent", +function (a) { +this.currentSize = this.getSize (); +}, "java.awt.Graphics"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/AppletJmolBinding.js b/bin/jalview/appletgui/AppletJmolBinding.js index cdb8890..7f93e13 100644 --- a/bin/jalview/appletgui/AppletJmolBinding.js +++ b/bin/jalview/appletgui/AppletJmolBinding.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.appletgui"); -c$ = Clazz.declareType (jalview.appletgui, "AppletJmolBinding"); +Clazz.declarePackage ("jalview.appletgui"); +c$ = Clazz.declareType (jalview.appletgui, "AppletJmolBinding"); diff --git a/bin/jalview/appletgui/CutAndPasteTransfer.class b/bin/jalview/appletgui/CutAndPasteTransfer.class index 31c248dc77589aa25460b1b1c9d1e1fbc091a048..9292d368f64112dcecaa6904cb8f6a5fcc73e40e 100644 GIT binary patch delta 30 mcmeB8?M~g$tHT((xlc!!iP@8ZWAYL`TP9AI%}@1KFarRga#tHT(-xlc!!iP@WhYw{93TNXAZMyJh>^;R$g0I;SB<^TWy diff --git a/bin/jalview/appletgui/CutAndPasteTransfer.js b/bin/jalview/appletgui/CutAndPasteTransfer.js index c1e339a..4030094 100644 --- a/bin/jalview/appletgui/CutAndPasteTransfer.js +++ b/bin/jalview/appletgui/CutAndPasteTransfer.js @@ -1,264 +1,264 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.MouseListener", "awt2swing.Button", "$.TextArea", "java.awt.BorderLayout"], "jalview.appletgui.CutAndPasteTransfer", ["awt2swing.Frame", "$.Label", "jalview.analysis.AlignmentUtils", "jalview.api.ComplexAlignFile", "jalview.appletgui.AlignFrame", "$.AppletJmol", "$.JVDialog", "$.SplitFrame", "jalview.datamodel.PDBEntry", "jalview.io.AnnotationFile", "$.AppletFormatAdapter", "$.IdentifyFile", "$.NewickFile", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.TCoffeeColourScheme", "jalview.util.MessageManager", "java.awt.Font"], function () { -c$ = Clazz.decorateAsClass (function () { -this.pdbImport = false; -this.treeImport = false; -this.annotationImport = false; -this.seq = null; -this.alignFrame = null; -this.source = null; -this.textarea = null; -this.accept = null; -this.addSequences = null; -this.$cancel = null; -this.buttonPanel = null; -this.borderLayout1 = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "CutAndPasteTransfer", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.MouseListener]); -Clazz.prepareFields (c$, function () { -this.textarea = new awt2swing.TextArea (); -this.accept = new awt2swing.Button ("New Window"); -this.addSequences = new awt2swing.Button ("Add to Current Alignment"); -this.$cancel = new awt2swing.Button ("Close"); -this.buttonPanel = new awt2swing.Panel (); -this.borderLayout1 = new java.awt.BorderLayout (); -}); -Clazz.makeConstructor (c$, -function (forImport, alignFrame) { -Clazz.superConstructor (this, jalview.appletgui.CutAndPasteTransfer, []); -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -this.alignFrame = alignFrame; -if (!forImport) { -this.buttonPanel.setVisible (false); -}}, "~B,jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "getText", -function () { -return this.textarea.getText (); -}); -Clazz.defineMethod (c$, "setText", -function (text) { -this.textarea.setText (text); -}, "~S"); -Clazz.defineMethod (c$, "setPDBImport", -function (seq) { -this.seq = seq; -this.accept.setLabel (jalview.util.MessageManager.getString ("action.accept")); -this.addSequences.setVisible (false); -this.pdbImport = true; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "setTreeImport", -function () { -this.treeImport = true; -this.accept.setLabel (jalview.util.MessageManager.getString ("action.accept")); -this.addSequences.setVisible (false); -}); -Clazz.defineMethod (c$, "setAnnotationImport", -function () { -this.annotationImport = true; -this.accept.setLabel (jalview.util.MessageManager.getString ("action.accept")); -this.addSequences.setVisible (false); -}); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.accept) { -this.ok (true); -} else if (evt.getSource () === this.addSequences) { -this.ok (false); -} else if (evt.getSource () === this.$cancel) { -this.cancel (); -}}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "ok", -function (newWindow) { -var text = this.getText (); -var length = text.length; -this.textarea.append ("\n"); -if (this.textarea.getText ().length == length) { -var warning = "\n\n#################################################\nWARNING!! THIS IS THE MAXIMUM SIZE OF TEXTAREA!!\n\nCAN\'T INPUT FULL ALIGNMENT\n\nYOU MUST DELETE THIS WARNING TO CONTINUE\n\nMAKE SURE LAST SEQUENCE PASTED IS COMPLETE\n#################################################\n"; -this.textarea.setText (text.substring (0, text.length - warning.length) + warning); -this.textarea.setCaretPosition (text.length); -}if (this.pdbImport) { -this.openPdbViewer (text); -} else if (this.treeImport) { -if (!this.loadTree ()) { -return; -}} else if (this.annotationImport) { -this.loadAnnotations (); -} else if (this.alignFrame != null) { -this.loadAlignment (text, newWindow, this.alignFrame.getAlignViewport ()); -}if (Clazz.instanceOf (this.getParent (), awt2swing.Frame)) { -(this.getParent ()).setVisible (false); -} else { -(this.getParent ()).setVisible (false); -}}, "~B"); -Clazz.defineMethod (c$, "loadTree", -function () { -try { -var fin = new jalview.io.NewickFile (this.textarea.getText (), "Paste"); -fin.parse (); -if (fin.getTree () != null) { -this.alignFrame.loadTree (fin, "Pasted tree file"); -return true; -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -this.textarea.setText (jalview.util.MessageManager.formatMessage ("label.could_not_parse_newick_file", Clazz.newArray (-1, [ex.getMessage ()]))); -return false; -} else { -throw ex; -} -} -return false; -}); -Clazz.defineMethod (c$, "loadAlignment", -function (text, newWindow, viewport) { -var al = null; -var format = new jalview.io.IdentifyFile ().Identify (text, jalview.io.AppletFormatAdapter.PASTE); -var afa = new jalview.io.AppletFormatAdapter (this.alignFrame.alignPanel); -try { -al = afa.readFile (text, jalview.io.AppletFormatAdapter.PASTE, format); -this.source = afa.getAlignFile (); -} catch (ex) { -if (Clazz.exceptionOf (ex, java.io.IOException)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -if (al != null) { -al.setDataset (null); -var allowSplitFrame = this.alignFrame.viewport.applet.getDefaultParameter ("enableSplitFrame", false); -if (allowSplitFrame && this.openSplitFrame (al, format)) { -return; -}if (newWindow) { -var af; -if (Clazz.instanceOf (this.source, jalview.api.ComplexAlignFile)) { -var colSel = (this.source).getColumnSelection (); -var hiddenSeqs = (this.source).getHiddenSequences (); -var showSeqFeatures = (this.source).isShowSeqFeatures (); -var cs = (this.source).getColourScheme (); -af = new jalview.appletgui.AlignFrame (al, hiddenSeqs, colSel, this.alignFrame.viewport.applet, "Cut & Paste input - " + format, false); -af.getAlignViewport ().setShowSequenceFeatures (showSeqFeatures); -af.changeColour (cs); -} else { -af = new jalview.appletgui.AlignFrame (al, this.alignFrame.viewport.applet, "Cut & Paste input - " + format, false); -}af.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_annotation_to_alignment")); -} else { -this.alignFrame.addSequences (al.getSequencesArray ()); -this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_alignment_file")); -}}}, "~S,~B,jalview.appletgui.AlignViewport"); -Clazz.defineMethod (c$, "openSplitFrame", -function (al, format) { -var thisAlignment = this.alignFrame.getAlignViewport ().getAlignment (); -if (thisAlignment.isNucleotide () == al.isNucleotide ()) { -return false; -}var protein = thisAlignment.isNucleotide () ? al : thisAlignment; -var dna = thisAlignment.isNucleotide () ? thisAlignment : al; -var mapped = jalview.analysis.AlignmentUtils.mapProteinToCdna (protein, dna); -if (!mapped) { -return false; -}var title = jalview.util.MessageManager.getString ("label.open_split_window"); -var dialog = new jalview.appletgui.JVDialog (this.getParent (), title, true, 100, 400); -dialog.ok.setLabel (jalview.util.MessageManager.getString ("action.yes")); -dialog.cancel.setLabel (jalview.util.MessageManager.getString ("action.no")); -var question = new awt2swing.Panel ( new java.awt.BorderLayout ()); -var text = jalview.util.MessageManager.getString ("label.open_split_window?"); -question.add ( new awt2swing.Label (text, 0), "Center"); -dialog.setMainPanel (question); -dialog.setVisible (true); -dialog.toFront (); -if (!dialog.accept) { -return false; -}var applet = this.alignFrame.viewport.applet; -var copyFrame = new jalview.appletgui.AlignFrame (this.alignFrame.viewport.getAlignment (), applet, this.alignFrame.getTitle (), false, false); -var newFrame = new jalview.appletgui.AlignFrame (al, this.alignFrame.viewport.applet, "Cut & Paste input - " + format, false, false); -var dnaFrame = al.isNucleotide () ? newFrame : copyFrame; -var proteinFrame = al.isNucleotide () ? copyFrame : newFrame; -var sf = new jalview.appletgui.SplitFrame (dnaFrame, proteinFrame); -sf.addToDisplay (false, applet); -return true; -}, "jalview.datamodel.AlignmentI,~S"); -Clazz.defineMethod (c$, "loadAnnotations", -function () { -var tcf = null; -try { -tcf = jalview.jsdev.GenericFileAdapter.getFile ("TCoffeeScoreFile", [this.textarea.getText (), jalview.io.AppletFormatAdapter.PASTE]); -if (tcf.isValid ()) { -if (tcf.annotateAlignment (this.alignFrame.viewport.getAlignment (), true)) { -this.alignFrame.tcoffeeColour.setEnabled (true); -this.alignFrame.alignPanel.fontChanged (); -this.alignFrame.changeColour ( new jalview.schemes.TCoffeeColourScheme (this.alignFrame.viewport.getAlignment ())); -this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_tcoffee_scores_to_alignment")); -} else { -this.alignFrame.setStatus (jalview.util.MessageManager.formatMessage ("label.failed_add_tcoffee_scores", Clazz.newArray (-1, [(tcf.getWarningMessage () != null ? tcf.getWarningMessage () : "")]))); -}} else { -tcf = null; -}} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -tcf = null; -} else { -throw x; -} -} -if (tcf == null) { -if ( new jalview.io.AnnotationFile ().annotateAlignmentView (this.alignFrame.viewport, this.textarea.getText (), jalview.io.AppletFormatAdapter.PASTE)) { -this.alignFrame.alignPanel.fontChanged (); -this.alignFrame.alignPanel.setScrollValues (0, 0); -this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_annotation_to_alignment")); -} else { -if (!this.alignFrame.parseFeaturesFile (this.textarea.getText (), jalview.io.AppletFormatAdapter.PASTE)) { -this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file")); -}}}}); -Clazz.defineMethod (c$, "openPdbViewer", -function (text) { -var pdb = new jalview.datamodel.PDBEntry (); -pdb.setFile (text); - new jalview.appletgui.AppletJmol (pdb, Clazz.newArray (-1, [this.seq]), null, this.alignFrame.alignPanel, jalview.io.AppletFormatAdapter.PASTE); -}, "~S"); -Clazz.defineMethod (c$, "cancel", -function () { -this.textarea.setText (""); -if (Clazz.instanceOf (this.getParent (), awt2swing.Frame)) { -(this.getParent ()).setVisible (false); -} else { -(this.getParent ()).setVisible (false); -}}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.textarea.setFont ( new java.awt.Font ("Monospaced", 0, 10)); -this.textarea.setText (jalview.util.MessageManager.getString ("label.paste_your_alignment_file")); -this.textarea.addMouseListener (this); -this.setLayout (this.borderLayout1); -this.accept.addActionListener (this); -this.addSequences.addActionListener (this); -this.$cancel.addActionListener (this); -this.add (this.buttonPanel, "South"); -this.buttonPanel.add (this.accept, null); -this.buttonPanel.add (this.addSequences); -this.buttonPanel.add (this.$cancel, null); -this.add (this.textarea, "Center"); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -if (this.textarea.getText ().startsWith (jalview.util.MessageManager.getString ("label.paste_your"))) { -this.textarea.setText (""); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.MouseListener", "awt2swing.Button", "$.TextArea", "java.awt.BorderLayout"], "jalview.appletgui.CutAndPasteTransfer", ["awt2swing.Frame", "$.Label", "jalview.analysis.AlignmentUtils", "jalview.api.ComplexAlignFile", "jalview.appletgui.AlignFrame", "$.AppletJmol", "$.JVDialog", "$.SplitFrame", "jalview.datamodel.PDBEntry", "jalview.io.AnnotationFile", "$.AppletFormatAdapter", "$.IdentifyFile", "$.NewickFile", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.TCoffeeColourScheme", "jalview.util.MessageManager", "java.awt.Font"], function () { +c$ = Clazz.decorateAsClass (function () { +this.pdbImport = false; +this.treeImport = false; +this.annotationImport = false; +this.seq = null; +this.alignFrame = null; +this.source = null; +this.textarea = null; +this.accept = null; +this.addSequences = null; +this.$cancel = null; +this.buttonPanel = null; +this.borderLayout1 = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "CutAndPasteTransfer", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.MouseListener]); +Clazz.prepareFields (c$, function () { +this.textarea = new awt2swing.TextArea (); +this.accept = new awt2swing.Button ("New Window"); +this.addSequences = new awt2swing.Button ("Add to Current Alignment"); +this.$cancel = new awt2swing.Button ("Close"); +this.buttonPanel = new awt2swing.Panel (); +this.borderLayout1 = new java.awt.BorderLayout (); +}); +Clazz.makeConstructor (c$, +function (forImport, alignFrame) { +Clazz.superConstructor (this, jalview.appletgui.CutAndPasteTransfer, []); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.alignFrame = alignFrame; +if (!forImport) { +this.buttonPanel.setVisible (false); +}}, "~B,jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "getText", +function () { +return this.textarea.getText (); +}); +Clazz.defineMethod (c$, "setText", +function (text) { +this.textarea.setText (text); +}, "~S"); +Clazz.defineMethod (c$, "setPDBImport", +function (seq) { +this.seq = seq; +this.accept.setLabel (jalview.util.MessageManager.getString ("action.accept")); +this.addSequences.setVisible (false); +this.pdbImport = true; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "setTreeImport", +function () { +this.treeImport = true; +this.accept.setLabel (jalview.util.MessageManager.getString ("action.accept")); +this.addSequences.setVisible (false); +}); +Clazz.defineMethod (c$, "setAnnotationImport", +function () { +this.annotationImport = true; +this.accept.setLabel (jalview.util.MessageManager.getString ("action.accept")); +this.addSequences.setVisible (false); +}); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.accept) { +this.ok (true); +} else if (evt.getSource () === this.addSequences) { +this.ok (false); +} else if (evt.getSource () === this.$cancel) { +this.cancel (); +}}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "ok", +function (newWindow) { +var text = this.getText (); +var length = text.length; +this.textarea.append ("\n"); +if (this.textarea.getText ().length == length) { +var warning = "\n\n#################################################\nWARNING!! THIS IS THE MAXIMUM SIZE OF TEXTAREA!!\n\nCAN\'T INPUT FULL ALIGNMENT\n\nYOU MUST DELETE THIS WARNING TO CONTINUE\n\nMAKE SURE LAST SEQUENCE PASTED IS COMPLETE\n#################################################\n"; +this.textarea.setText (text.substring (0, text.length - warning.length) + warning); +this.textarea.setCaretPosition (text.length); +}if (this.pdbImport) { +this.openPdbViewer (text); +} else if (this.treeImport) { +if (!this.loadTree ()) { +return; +}} else if (this.annotationImport) { +this.loadAnnotations (); +} else if (this.alignFrame != null) { +this.loadAlignment (text, newWindow, this.alignFrame.getAlignViewport ()); +}if (Clazz.instanceOf (this.getParent (), awt2swing.Frame)) { +(this.getParent ()).setVisible (false); +} else { +(this.getParent ()).setVisible (false); +}}, "~B"); +Clazz.defineMethod (c$, "loadTree", +function () { +try { +var fin = new jalview.io.NewickFile (this.textarea.getText (), "Paste"); +fin.parse (); +if (fin.getTree () != null) { +this.alignFrame.loadTree (fin, "Pasted tree file"); +return true; +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +this.textarea.setText (jalview.util.MessageManager.formatMessage ("label.could_not_parse_newick_file", Clazz.newArray (-1, [ex.getMessage ()]))); +return false; +} else { +throw ex; +} +} +return false; +}); +Clazz.defineMethod (c$, "loadAlignment", +function (text, newWindow, viewport) { +var al = null; +var format = new jalview.io.IdentifyFile ().Identify (text, jalview.io.AppletFormatAdapter.PASTE); +var afa = new jalview.io.AppletFormatAdapter (this.alignFrame.alignPanel); +try { +al = afa.readFile (text, jalview.io.AppletFormatAdapter.PASTE, format); +this.source = afa.getAlignFile (); +} catch (ex) { +if (Clazz.exceptionOf (ex, java.io.IOException)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +if (al != null) { +al.setDataset (null); +var allowSplitFrame = this.alignFrame.viewport.applet.getDefaultParameter ("enableSplitFrame", false); +if (allowSplitFrame && this.openSplitFrame (al, format)) { +return; +}if (newWindow) { +var af; +if (Clazz.instanceOf (this.source, jalview.api.ComplexAlignFile)) { +var colSel = (this.source).getColumnSelection (); +var hiddenSeqs = (this.source).getHiddenSequences (); +var showSeqFeatures = (this.source).isShowSeqFeatures (); +var cs = (this.source).getColourScheme (); +af = new jalview.appletgui.AlignFrame (al, hiddenSeqs, colSel, this.alignFrame.viewport.applet, "Cut & Paste input - " + format, false); +af.getAlignViewport ().setShowSequenceFeatures (showSeqFeatures); +af.changeColour (cs); +} else { +af = new jalview.appletgui.AlignFrame (al, this.alignFrame.viewport.applet, "Cut & Paste input - " + format, false); +}af.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_annotation_to_alignment")); +} else { +this.alignFrame.addSequences (al.getSequencesArray ()); +this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_alignment_file")); +}}}, "~S,~B,jalview.appletgui.AlignViewport"); +Clazz.defineMethod (c$, "openSplitFrame", +function (al, format) { +var thisAlignment = this.alignFrame.getAlignViewport ().getAlignment (); +if (thisAlignment.isNucleotide () == al.isNucleotide ()) { +return false; +}var protein = thisAlignment.isNucleotide () ? al : thisAlignment; +var dna = thisAlignment.isNucleotide () ? thisAlignment : al; +var mapped = jalview.analysis.AlignmentUtils.mapProteinToCdna (protein, dna); +if (!mapped) { +return false; +}var title = jalview.util.MessageManager.getString ("label.open_split_window"); +var dialog = new jalview.appletgui.JVDialog (this.getParent (), title, true, 100, 400); +dialog.ok.setLabel (jalview.util.MessageManager.getString ("action.yes")); +dialog.cancel.setLabel (jalview.util.MessageManager.getString ("action.no")); +var question = new awt2swing.Panel ( new java.awt.BorderLayout ()); +var text = jalview.util.MessageManager.getString ("label.open_split_window?"); +question.add ( new awt2swing.Label (text, 0), "Center"); +dialog.setMainPanel (question); +dialog.setVisible (true); +dialog.toFront (); +if (!dialog.accept) { +return false; +}var applet = this.alignFrame.viewport.applet; +var copyFrame = new jalview.appletgui.AlignFrame (this.alignFrame.viewport.getAlignment (), applet, this.alignFrame.getTitle (), false, false); +var newFrame = new jalview.appletgui.AlignFrame (al, this.alignFrame.viewport.applet, "Cut & Paste input - " + format, false, false); +var dnaFrame = al.isNucleotide () ? newFrame : copyFrame; +var proteinFrame = al.isNucleotide () ? copyFrame : newFrame; +var sf = new jalview.appletgui.SplitFrame (dnaFrame, proteinFrame); +sf.addToDisplay (false, applet); +return true; +}, "jalview.datamodel.AlignmentI,~S"); +Clazz.defineMethod (c$, "loadAnnotations", +function () { +var tcf = null; +try { +tcf = jalview.jsdev.GenericFileAdapter.getFile ("TCoffeeScoreFile", [this.textarea.getText (), jalview.io.AppletFormatAdapter.PASTE]); +if (tcf.isValid ()) { +if (tcf.annotateAlignment (this.alignFrame.viewport.getAlignment (), true)) { +this.alignFrame.tcoffeeColour.setEnabled (true); +this.alignFrame.alignPanel.fontChanged (); +this.alignFrame.changeColour ( new jalview.schemes.TCoffeeColourScheme (this.alignFrame.viewport.getAlignment ())); +this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_tcoffee_scores_to_alignment")); +} else { +this.alignFrame.setStatus (jalview.util.MessageManager.formatMessage ("label.failed_add_tcoffee_scores", Clazz.newArray (-1, [(tcf.getWarningMessage () != null ? tcf.getWarningMessage () : "")]))); +}} else { +tcf = null; +}} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +tcf = null; +} else { +throw x; +} +} +if (tcf == null) { +if ( new jalview.io.AnnotationFile ().annotateAlignmentView (this.alignFrame.viewport, this.textarea.getText (), jalview.io.AppletFormatAdapter.PASTE)) { +this.alignFrame.alignPanel.fontChanged (); +this.alignFrame.alignPanel.setScrollValues (0, 0); +this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.successfully_pasted_annotation_to_alignment")); +} else { +if (!this.alignFrame.parseFeaturesFile (this.textarea.getText (), jalview.io.AppletFormatAdapter.PASTE)) { +this.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file")); +}}}}); +Clazz.defineMethod (c$, "openPdbViewer", +function (text) { +var pdb = new jalview.datamodel.PDBEntry (); +pdb.setFile (text); + new jalview.appletgui.AppletJmol (pdb, Clazz.newArray (-1, [this.seq]), null, this.alignFrame.alignPanel, jalview.io.AppletFormatAdapter.PASTE); +}, "~S"); +Clazz.defineMethod (c$, "cancel", +function () { +this.textarea.setText (""); +if (Clazz.instanceOf (this.getParent (), awt2swing.Frame)) { +(this.getParent ()).setVisible (false); +} else { +(this.getParent ()).setVisible (false); +}}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.textarea.setFont ( new java.awt.Font ("Monospaced", 0, 10)); +this.textarea.setText (jalview.util.MessageManager.getString ("label.paste_your_alignment_file")); +this.textarea.addMouseListener (this); +this.setLayout (this.borderLayout1); +this.accept.addActionListener (this); +this.addSequences.addActionListener (this); +this.$cancel.addActionListener (this); +this.add (this.buttonPanel, "South"); +this.buttonPanel.add (this.accept, null); +this.buttonPanel.add (this.addSequences); +this.buttonPanel.add (this.$cancel, null); +this.add (this.textarea, "Center"); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +if (this.textarea.getText ().startsWith (jalview.util.MessageManager.getString ("label.paste_your"))) { +this.textarea.setText (""); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +}); diff --git a/bin/jalview/appletgui/EditNameDialog.js b/bin/jalview/appletgui/EditNameDialog.js index efedf02..68044ad 100644 --- a/bin/jalview/appletgui/EditNameDialog.js +++ b/bin/jalview/appletgui/EditNameDialog.js @@ -1,44 +1,44 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.appletgui.JVDialog"], "jalview.appletgui.EditNameDialog", ["awt2swing.Label", "$.Panel", "$.TextField", "java.awt.BorderLayout", "$.Font"], function () { -c$ = Clazz.decorateAsClass (function () { -this.id = null; -this.description = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "EditNameDialog", jalview.appletgui.JVDialog); -Clazz.overrideMethod (c$, "getName", -function () { -return this.id.getText (); -}); -Clazz.defineMethod (c$, "getDescription", -function () { -if (this.description.getText ().length < 1) { -return null; -} else { -return this.description.getText (); -}}); -Clazz.makeConstructor (c$, -function (name, desc, label1, label2, owner, title, width, height, display) { -Clazz.superConstructor (this, jalview.appletgui.EditNameDialog, [owner, title, true, width, height]); -var mono = new java.awt.Font ("Monospaced", 0, 12); -var panel = new awt2swing.Panel ( new java.awt.BorderLayout ()); -var panel2 = new awt2swing.Panel ( new java.awt.BorderLayout ()); -this.id = new awt2swing.TextField (name, 40); -this.id.setFont (mono); -var label = new awt2swing.Label (label1); -label.setFont (mono); -panel2.add (label, "West"); -panel2.add (this.id, "Center"); -panel.add (panel2, "North"); -if (label2 != null) { -panel2 = new awt2swing.Panel ( new java.awt.BorderLayout ()); -this.description = new awt2swing.TextField (desc, 40); -this.description.setFont (mono); -label = new awt2swing.Label (label2); -label.setFont (mono); -panel2.add (label, "West"); -panel2.add (this.description, "Center"); -panel.add (panel2, "Center"); -}this.setMainPanel (panel); -this.setVisible (display); -}, "~S,~S,~S,~S,awt2swing.Frame,~S,~N,~N,~B"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.appletgui.JVDialog"], "jalview.appletgui.EditNameDialog", ["awt2swing.Label", "$.Panel", "$.TextField", "java.awt.BorderLayout", "$.Font"], function () { +c$ = Clazz.decorateAsClass (function () { +this.id = null; +this.description = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "EditNameDialog", jalview.appletgui.JVDialog); +Clazz.overrideMethod (c$, "getName", +function () { +return this.id.getText (); +}); +Clazz.defineMethod (c$, "getDescription", +function () { +if (this.description.getText ().length < 1) { +return null; +} else { +return this.description.getText (); +}}); +Clazz.makeConstructor (c$, +function (name, desc, label1, label2, owner, title, width, height, display) { +Clazz.superConstructor (this, jalview.appletgui.EditNameDialog, [owner, title, true, width, height]); +var mono = new java.awt.Font ("Monospaced", 0, 12); +var panel = new awt2swing.Panel ( new java.awt.BorderLayout ()); +var panel2 = new awt2swing.Panel ( new java.awt.BorderLayout ()); +this.id = new awt2swing.TextField (name, 40); +this.id.setFont (mono); +var label = new awt2swing.Label (label1); +label.setFont (mono); +panel2.add (label, "West"); +panel2.add (this.id, "Center"); +panel.add (panel2, "North"); +if (label2 != null) { +panel2 = new awt2swing.Panel ( new java.awt.BorderLayout ()); +this.description = new awt2swing.TextField (desc, 40); +this.description.setFont (mono); +label = new awt2swing.Label (label2); +label.setFont (mono); +panel2.add (label, "West"); +panel2.add (this.description, "Center"); +panel.add (panel2, "Center"); +}this.setMainPanel (panel); +this.setVisible (display); +}, "~S,~S,~S,~S,awt2swing.Frame,~S,~N,~N,~B"); +}); diff --git a/bin/jalview/appletgui/EmbmenuFrame.js b/bin/jalview/appletgui/EmbmenuFrame.js index 13a7183..7a5362c 100644 --- a/bin/jalview/appletgui/EmbmenuFrame.js +++ b/bin/jalview/appletgui/EmbmenuFrame.js @@ -1,110 +1,110 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Frame", "java.awt.event.MouseListener", "java.awt.Font", "java.util.HashMap"], "jalview.appletgui.EmbmenuFrame", ["awt2swing.Label", "$.Panel", "$.PopupMenu", "jalview.util.Platform", "java.awt.Color", "$.FlowLayout"], function () { -c$ = Clazz.decorateAsClass (function () { -this.embeddedPopup = null; -this.embeddedMenu = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "EmbmenuFrame", awt2swing.Frame, java.awt.event.MouseListener); -Clazz.prepareFields (c$, function () { -this.embeddedPopup = new java.util.HashMap (); -}); -Clazz.defineMethod (c$, "embedMenuIfNeeded", -function (tobeAdjusted) { -var topMenuBar = this.getJMenuBar (); -if (topMenuBar == null) { -return false; -}if (jalview.util.Platform.isAMac ()) { -this.embeddedMenu = this.makeEmbeddedPopupMenu (topMenuBar, true, false); -this.unsetMenuBar (); -this.add (this.embeddedMenu, "North"); -tobeAdjusted.setSize (this.getSize ().width, this.getSize ().height - this.embeddedMenu.getHeight ()); -return true; -}return false; -}, "awt2swing.Panel"); -Clazz.defineMethod (c$, "makeEmbeddedPopupMenu", -function (menuBar, overrideFonts, append) { -if (!append) { -this.embeddedPopup.clear (); -if (this.embeddedMenu != null) { -this.embeddedMenu.removeAll (); -}}this.embeddedMenu = this.makeEmbeddedPopupMenu (menuBar, jalview.appletgui.EmbmenuFrame.DEFAULT_MENU_FONT, overrideFonts, new awt2swing.Panel (), this); -return this.embeddedMenu; -}, "awt2swing.MenuBar,~B,~B"); -Clazz.defineMethod (c$, "makeEmbeddedPopupMenu", -function (menuBar, font, overrideFonts, embeddedMenu, clickHandler) { -if (overrideFonts) { -var mbf = menuBar.getFont (); -if (mbf != null) { -font = mbf; -}}if (embeddedMenu == null) { -embeddedMenu = new awt2swing.Panel (); -}var flowLayout1 = new java.awt.FlowLayout (); -embeddedMenu.setBackground (java.awt.Color.lightGray); -embeddedMenu.setLayout (flowLayout1); -for (var mbi = 0, nMbi = menuBar.getMenuCount (); mbi < nMbi; mbi++) { -var mi = menuBar.getMenu (mbi); -var elab = new awt2swing.Label (mi.getLabel ()); -elab.setFont (font); -var popup = new awt2swing.PopupMenu (); -var m; -var mSize = mi.getItemCount (); -for (m = 0; m < mSize; m++) { -if (mi.getItem (m) == null) popup.addSeparator (); - else popup.add (mi.getItem (m)); -mSize--; -m--; -} -this.embeddedPopup.put (elab, popup); -embeddedMenu.add (elab); -elab.addMouseListener (clickHandler); -} -flowLayout1.setAlignment (0); -flowLayout1.setHgap (2); -flowLayout1.setVgap (0); -return embeddedMenu; -}, "awt2swing.MenuBar,java.awt.Font,~B,awt2swing.Panel,java.awt.event.MouseListener"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -var popup = null; -var source = evt.getSource (); -popup = this.getPopupMenu (source); -if (popup != null) { -this.embeddedMenu.add (popup); -popup.show (this.embeddedMenu, source.getBounds ().x, source.getBounds ().y + source.getBounds ().getSize ().height); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "getPopupMenu", -function (source) { -return this.embeddedPopup.get (source); -}, "awt2swing.Label"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "destroyMenus", -function () { -if (this.embeddedPopup != null) { -for (var lb, $lb = this.embeddedPopup.keySet ().iterator (); $lb.hasNext () && ((lb = $lb.next ()) || true);) { -lb.removeMouseListener (this); -} -this.embeddedPopup.clear (); -}if (this.embeddedMenu != null) { -this.embeddedMenu.removeAll (); -}}); -Clazz.defineMethod (c$, "finalize", -function () { -this.destroyMenus (); -this.embeddedPopup = null; -this.embeddedMenu = null; -Clazz.superCall (this, jalview.appletgui.EmbmenuFrame, "finalize", []); -}); -c$.FONT_ARIAL_PLAIN_11 = c$.prototype.FONT_ARIAL_PLAIN_11 = new java.awt.Font ("Arial", 0, 11); -c$.DEFAULT_MENU_FONT = c$.prototype.DEFAULT_MENU_FONT = jalview.appletgui.EmbmenuFrame.FONT_ARIAL_PLAIN_11; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Frame", "java.awt.event.MouseListener", "java.awt.Font", "java.util.HashMap"], "jalview.appletgui.EmbmenuFrame", ["awt2swing.Label", "$.Panel", "$.PopupMenu", "jalview.util.Platform", "java.awt.Color", "$.FlowLayout"], function () { +c$ = Clazz.decorateAsClass (function () { +this.embeddedPopup = null; +this.embeddedMenu = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "EmbmenuFrame", awt2swing.Frame, java.awt.event.MouseListener); +Clazz.prepareFields (c$, function () { +this.embeddedPopup = new java.util.HashMap (); +}); +Clazz.defineMethod (c$, "embedMenuIfNeeded", +function (tobeAdjusted) { +var topMenuBar = this.getJMenuBar (); +if (topMenuBar == null) { +return false; +}if (jalview.util.Platform.isAMac ()) { +this.embeddedMenu = this.makeEmbeddedPopupMenu (topMenuBar, true, false); +this.unsetMenuBar (); +this.add (this.embeddedMenu, "North"); +tobeAdjusted.setSize (this.getSize ().width, this.getSize ().height - this.embeddedMenu.getHeight ()); +return true; +}return false; +}, "awt2swing.Panel"); +Clazz.defineMethod (c$, "makeEmbeddedPopupMenu", +function (menuBar, overrideFonts, append) { +if (!append) { +this.embeddedPopup.clear (); +if (this.embeddedMenu != null) { +this.embeddedMenu.removeAll (); +}}this.embeddedMenu = this.makeEmbeddedPopupMenu (menuBar, jalview.appletgui.EmbmenuFrame.DEFAULT_MENU_FONT, overrideFonts, new awt2swing.Panel (), this); +return this.embeddedMenu; +}, "awt2swing.MenuBar,~B,~B"); +Clazz.defineMethod (c$, "makeEmbeddedPopupMenu", +function (menuBar, font, overrideFonts, embeddedMenu, clickHandler) { +if (overrideFonts) { +var mbf = menuBar.getFont (); +if (mbf != null) { +font = mbf; +}}if (embeddedMenu == null) { +embeddedMenu = new awt2swing.Panel (); +}var flowLayout1 = new java.awt.FlowLayout (); +embeddedMenu.setBackground (java.awt.Color.lightGray); +embeddedMenu.setLayout (flowLayout1); +for (var mbi = 0, nMbi = menuBar.getMenuCount (); mbi < nMbi; mbi++) { +var mi = menuBar.getMenu (mbi); +var elab = new awt2swing.Label (mi.getLabel ()); +elab.setFont (font); +var popup = new awt2swing.PopupMenu (); +var m; +var mSize = mi.getItemCount (); +for (m = 0; m < mSize; m++) { +if (mi.getItem (m) == null) popup.addSeparator (); + else popup.add (mi.getItem (m)); +mSize--; +m--; +} +this.embeddedPopup.put (elab, popup); +embeddedMenu.add (elab); +elab.addMouseListener (clickHandler); +} +flowLayout1.setAlignment (0); +flowLayout1.setHgap (2); +flowLayout1.setVgap (0); +return embeddedMenu; +}, "awt2swing.MenuBar,java.awt.Font,~B,awt2swing.Panel,java.awt.event.MouseListener"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +var popup = null; +var source = evt.getSource (); +popup = this.getPopupMenu (source); +if (popup != null) { +this.embeddedMenu.add (popup); +popup.show (this.embeddedMenu, source.getBounds ().x, source.getBounds ().y + source.getBounds ().getSize ().height); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "getPopupMenu", +function (source) { +return this.embeddedPopup.get (source); +}, "awt2swing.Label"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "destroyMenus", +function () { +if (this.embeddedPopup != null) { +for (var lb, $lb = this.embeddedPopup.keySet ().iterator (); $lb.hasNext () && ((lb = $lb.next ()) || true);) { +lb.removeMouseListener (this); +} +this.embeddedPopup.clear (); +}if (this.embeddedMenu != null) { +this.embeddedMenu.removeAll (); +}}); +Clazz.defineMethod (c$, "finalize", +function () { +this.destroyMenus (); +this.embeddedPopup = null; +this.embeddedMenu = null; +Clazz.superCall (this, jalview.appletgui.EmbmenuFrame, "finalize", []); +}); +c$.FONT_ARIAL_PLAIN_11 = c$.prototype.FONT_ARIAL_PLAIN_11 = new java.awt.Font ("Arial", 0, 11); +c$.DEFAULT_MENU_FONT = c$.prototype.DEFAULT_MENU_FONT = jalview.appletgui.EmbmenuFrame.FONT_ARIAL_PLAIN_11; +}); diff --git a/bin/jalview/appletgui/ExtJmol.js b/bin/jalview/appletgui/ExtJmol.js index 170d005..150efd5 100644 --- a/bin/jalview/appletgui/ExtJmol.js +++ b/bin/jalview/appletgui/ExtJmol.js @@ -1,17 +1,17 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.structures.models.AAStructureBindingModel"], "jalview.appletgui.ExtJmol", null, function () { -c$ = Clazz.declareType (jalview.appletgui, "ExtJmol", jalview.structures.models.AAStructureBindingModel); -Clazz.overrideMethod (c$, "getPdbFile", -function () { -return null; -}); -Clazz.overrideMethod (c$, "updateColours", -function (source) { -}, "~O"); -Clazz.overrideMethod (c$, "releaseReferences", -function (svl) { -}, "~O"); -Clazz.overrideMethod (c$, "highlightAtoms", -function (atoms) { -}, "java.util.List"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.structures.models.AAStructureBindingModel"], "jalview.appletgui.ExtJmol", null, function () { +c$ = Clazz.declareType (jalview.appletgui, "ExtJmol", jalview.structures.models.AAStructureBindingModel); +Clazz.overrideMethod (c$, "getPdbFile", +function () { +return null; +}); +Clazz.overrideMethod (c$, "updateColours", +function (source) { +}, "~O"); +Clazz.overrideMethod (c$, "releaseReferences", +function (svl) { +}, "~O"); +Clazz.overrideMethod (c$, "highlightAtoms", +function (atoms) { +}, "java.util.List"); +}); diff --git a/bin/jalview/appletgui/FeatureColourChooser.class b/bin/jalview/appletgui/FeatureColourChooser.class index 0c8e5546e0eb12c4dd5fd5489da9a2a904e9caf5..8aee64e3e234310caabbce9fce854fb0e5f85dfa 100644 GIT binary patch delta 27 jcmewt^*3sRy9(p$$sQ^XIJg*Ci`W^LGjBFj_2mEno$3iM delta 28 kcmewx^)G6Jy9(o*$sQ^XIJp_vir5*KGcav7Q1#^i0Hx^(F#rGn diff --git a/bin/jalview/appletgui/FeatureColourChooser.js b/bin/jalview/appletgui/FeatureColourChooser.js index cfa5380..929c04b 100644 --- a/bin/jalview/appletgui/FeatureColourChooser.js +++ b/bin/jalview/appletgui/FeatureColourChooser.js @@ -1,292 +1,292 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.ItemListener", "$.MouseListener", "awt2swing.Checkbox", "$.Choice", "$.Scrollbar", "$.TextField"], "jalview.appletgui.FeatureColourChooser", ["awt2swing.Label", "jalview.appletgui.JVDialog", "$.PaintRefresher", "$.UserDefinedColours", "jalview.datamodel.GraphLine", "jalview.schemes.GraduatedColor", "jalview.util.MessageManager", "java.awt.Color", "$.Dimension", "$.FlowLayout", "$.Font", "$.GridLayout", "java.awt.event.ActionEvent", "java.lang.Float"], function () { -c$ = Clazz.decorateAsClass (function () { -this.frame = null; -this.owner = null; -this.fr = null; -this.fs = null; -this.cs = null; -this.oldcs = null; -this.oldgroupColours = null; -this.adjusting = false; -this.min = 0; -this.max = 0; -this.type = null; -this.af = null; -this.minColour = null; -this.maxColour = null; -this.jPanel1 = null; -this.jPanel2 = null; -this.threshold = null; -this.jPanel3 = null; -this.jPanel4 = null; -this.slider = null; -this.thresholdValue = null; -this.thresholdIsMin = null; -this.colourFromLabel = null; -this.threshline = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "FeatureColourChooser", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ItemListener, java.awt.event.MouseListener]); -Clazz.prepareFields (c$, function () { -this.minColour = new awt2swing.Panel (); -this.maxColour = new awt2swing.Panel (); -this.jPanel1 = new awt2swing.Panel (); -this.jPanel2 = new awt2swing.Panel (); -this.threshold = new awt2swing.Choice (); -this.jPanel3 = new awt2swing.Panel (); -this.jPanel4 = new awt2swing.Panel (); -this.slider = new awt2swing.Scrollbar (0); -this.thresholdValue = new awt2swing.TextField (20); -this.thresholdIsMin = new awt2swing.Checkbox (); -this.colourFromLabel = new awt2swing.Checkbox (); -}); -Clazz.makeConstructor (c$, -function (af, type) { -Clazz.superConstructor (this, jalview.appletgui.FeatureColourChooser, []); -this.af = af; -this.init (af.getSeqcanvas ().getFeatureRenderer (), type); -}, "jalview.appletgui.AlignFrame,~S"); -Clazz.makeConstructor (c$, -function (fsettings, type) { -Clazz.superConstructor (this, jalview.appletgui.FeatureColourChooser, []); -this.fs = fsettings; -this.init (fsettings.fr, type); -}, "jalview.appletgui.FeatureSettings,~S"); -Clazz.defineMethod (c$, "init", -($fz = function (frenderer, type) { -this.type = type; -this.fr = frenderer; -var mm = (this.fr.getMinMax ().get (type))[0]; -this.min = mm[0]; -this.max = mm[1]; -this.oldcs = this.fr.getFeatureColours ().get (type); -if (Clazz.instanceOf (this.oldcs, jalview.schemes.GraduatedColor)) { -this.cs = new jalview.schemes.GraduatedColor (this.oldcs, this.min, this.max); -} else { -var bl = java.awt.Color.black; -if (Clazz.instanceOf (this.oldcs, java.awt.Color)) { -bl = this.oldcs; -}this.cs = new jalview.schemes.GraduatedColor (java.awt.Color.white, bl, mm[0], mm[1]); -}this.minColour.setBackground (this.cs.getMinColor ()); -this.maxColour.setBackground (this.cs.getMaxColor ()); -this.minColour.setForeground (this.cs.getMinColor ()); -this.maxColour.setForeground (this.cs.getMaxColor ()); -this.colourFromLabel.setState (this.cs.isColourByLabel ()); -this.adjusting = true; -try { -this.jbInit (); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -this.threshold.select (new Integer (this.cs.getThreshType () == -1 ? 0 : this.cs.getThreshType () == 1 ? 1 : 2)); -this.adjusting = false; -this.changeColour (); -this.colourFromLabel.addItemListener (this); -this.slider.addAdjustmentListener (this); -this.slider.addMouseListener (this); -this.owner = (this.af != null) ? this.af : this.fs.frame; -this.frame = new jalview.appletgui.JVDialog (this.owner, jalview.util.MessageManager.formatMessage ("label.graduated_color_for_params", Clazz.newArray (-1, [type])), true, 480, 248); -this.frame.setMainPanel (this); -this.validate (); -this.frame.setVisible (true); -if (this.frame.accept) { -this.changeColour (); -} else { -this.reset (); -jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); -this.frame.setVisible (false); -}}, $fz.isPrivate = true, $fz), "jalview.appletgui.FeatureRenderer,~S"); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.appletgui.FeatureColourChooser, []); -try { -this.jbInit (); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -var minLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.min")); -var maxLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.max")); -minLabel.setFont ( new java.awt.Font ("Verdana", 0, 11)); -maxLabel.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.minColour.setBounds (0, 0, 40, 27); -this.maxColour.setBounds (0, 0, 40, 27); -this.minColour.addMouseListener (this); -this.maxColour.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.maxColour.addMouseListener (this); -this.thresholdIsMin.addItemListener (this); -this.setLayout ( new java.awt.GridLayout (4, 1)); -this.jPanel1.setLayout ( new java.awt.FlowLayout ()); -this.jPanel2.setLayout ( new java.awt.FlowLayout ()); -this.jPanel3.setLayout ( new java.awt.GridLayout (1, 1)); -this.jPanel4.setLayout ( new java.awt.FlowLayout ()); -this.jPanel1.setBackground (java.awt.Color.white); -this.jPanel2.setBackground (java.awt.Color.white); -this.jPanel4.setBackground (java.awt.Color.white); -this.threshold.addItemListener (this); -this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold")); -this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold")); -this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold")); -this.thresholdValue.addActionListener (this); -this.slider.setBackground (java.awt.Color.white); -this.slider.setEnabled (false); -this.slider.setSize ( new java.awt.Dimension (93, 21)); -this.thresholdValue.setEnabled (false); -this.thresholdValue.setSize ( new java.awt.Dimension (79, 22)); -this.thresholdValue.setColumns (5); -this.jPanel3.setBackground (java.awt.Color.white); -this.colourFromLabel.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.colourFromLabel.setLabel (jalview.util.MessageManager.getString ("label.colour_by_label")); -this.colourFromLabel.setSize ( new java.awt.Dimension (139, 22)); -this.thresholdIsMin.setBackground (java.awt.Color.white); -this.thresholdIsMin.setLabel (jalview.util.MessageManager.getString ("label.threshold_minmax")); -this.thresholdIsMin.setSize ( new java.awt.Dimension (135, 23)); -this.jPanel1.add (minLabel); -this.jPanel1.add (this.minColour); -this.jPanel1.add (maxLabel); -this.jPanel1.add (this.maxColour); -this.jPanel1.add (this.colourFromLabel); -this.jPanel2.add (this.threshold); -this.jPanel3.add (this.slider); -this.jPanel4.add (this.thresholdValue); -this.jPanel4.add (this.thresholdIsMin); -this.add (this.jPanel1); -this.add (this.jPanel2); -this.add (this.jPanel3); -this.add (this.jPanel4); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.thresholdValue) { -try { -var f = new Float (this.thresholdValue.getText ()).floatValue (); -this.slider.setValue (Clazz.floatToInt (f * 1000)); -this.adjustmentValueChanged (null); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -} else if (evt.getSource () === this.minColour) { -this.minColour_actionPerformed (null); -} else if (evt.getSource () === this.maxColour) { -this.maxColour_actionPerformed (null); -} else { -this.changeColour (); -}}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -this.maxColour.setEnabled (!this.colourFromLabel.getState ()); -this.minColour.setEnabled (!this.colourFromLabel.getState ()); -this.changeColour (); -}, "java.awt.event.ItemEvent"); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -if (!this.adjusting) { -this.thresholdValue.setText ((this.slider.getValue () / 1000) + ""); -this.valueChanged (); -}}, "java.awt.event.AdjustmentEvent"); -Clazz.defineMethod (c$, "valueChanged", -function () { -this.threshline.value = this.slider.getValue () / 1000; -this.cs.setThresh (this.threshline.value); -this.changeColour (); -jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); -}); -Clazz.defineMethod (c$, "minColour_actionPerformed", -function (newCol) { -if (newCol == null) { -var udc = new jalview.appletgui.UserDefinedColours (this, this.minColour.getBackground (), this.owner, jalview.util.MessageManager.getString ("label.select_colour_minimum_value")); -} else { -this.minColour.setBackground (newCol); -this.minColour.setForeground (newCol); -this.minColour.repaint (); -this.changeColour (); -}}, "java.awt.Color"); -Clazz.defineMethod (c$, "maxColour_actionPerformed", -function (newCol) { -if (newCol == null) { -var udc = new jalview.appletgui.UserDefinedColours (this, this.maxColour.getBackground (), this.owner, jalview.util.MessageManager.getString ("label.select_colour_maximum_value")); -} else { -this.maxColour.setBackground (newCol); -this.maxColour.setForeground (newCol); -this.maxColour.repaint (); -this.changeColour (); -}}, "java.awt.Color"); -Clazz.defineMethod (c$, "changeColour", -function () { -if (this.adjusting) { -return; -}var aboveThreshold = -1; -if (this.threshold.getSelectedIndex () == 1) { -aboveThreshold = 1; -} else if (this.threshold.getSelectedIndex () == 2) { -aboveThreshold = 0; -}this.slider.setEnabled (true); -this.thresholdValue.setEnabled (true); -var acg = new jalview.schemes.GraduatedColor (this.minColour.getBackground (), this.maxColour.getBackground (), this.min, this.max); -acg.setColourByLabel (this.colourFromLabel.getState ()); -this.maxColour.setEnabled (!this.colourFromLabel.getState ()); -this.minColour.setEnabled (!this.colourFromLabel.getState ()); -if (aboveThreshold == -1) { -this.slider.setEnabled (false); -this.thresholdValue.setEnabled (false); -this.thresholdValue.setText (""); -} else if (aboveThreshold != -1 && this.threshline == null) { -this.threshline = new jalview.datamodel.GraphLine ((this.max - this.min) / 2, "Threshold", java.awt.Color.black); -}if (aboveThreshold != -1) { -this.adjusting = true; -acg.setThresh (this.threshline.value); -var range = this.max * 1000 - this.min * 1000; -this.slider.setMinimum (Clazz.floatToInt (this.min * 1000)); -this.slider.setMaximum (Clazz.floatToInt (this.max * 1000)); -this.slider.setValue (Clazz.floatToInt (this.threshline.value * 1000)); -this.thresholdValue.setText (this.threshline.value + ""); -this.slider.setEnabled (true); -this.thresholdValue.setEnabled (true); -this.adjusting = false; -}acg.setThreshType (aboveThreshold); -if (this.thresholdIsMin.getState () && aboveThreshold != -1) { -if (aboveThreshold == 1) { -acg = new jalview.schemes.GraduatedColor (acg, this.threshline.value, this.max); -} else { -acg = new jalview.schemes.GraduatedColor (acg, this.min, this.threshline.value); -}}this.fr.setColour (this.type, acg); -this.cs = acg; -jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); -}); -Clazz.defineMethod (c$, "reset", -function () { -this.fr.setColour (this.type, this.oldcs); -jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); -}); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -if (evt.getSource () === this.minColour || evt.getSource () === this.maxColour) { -this.actionPerformed ( new java.awt.event.ActionEvent (evt.getSource (), 1, "Clicked")); -} else { -jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.ItemListener", "$.MouseListener", "awt2swing.Checkbox", "$.Choice", "$.Scrollbar", "$.TextField"], "jalview.appletgui.FeatureColourChooser", ["awt2swing.Label", "jalview.appletgui.JVDialog", "$.PaintRefresher", "$.UserDefinedColours", "jalview.datamodel.GraphLine", "jalview.schemes.GraduatedColor", "jalview.util.MessageManager", "java.awt.Color", "$.Dimension", "$.FlowLayout", "$.Font", "$.GridLayout", "java.awt.event.ActionEvent", "java.lang.Float"], function () { +c$ = Clazz.decorateAsClass (function () { +this.frame = null; +this.owner = null; +this.fr = null; +this.fs = null; +this.cs = null; +this.oldcs = null; +this.oldgroupColours = null; +this.adjusting = false; +this.min = 0; +this.max = 0; +this.type = null; +this.af = null; +this.minColour = null; +this.maxColour = null; +this.jPanel1 = null; +this.jPanel2 = null; +this.threshold = null; +this.jPanel3 = null; +this.jPanel4 = null; +this.slider = null; +this.thresholdValue = null; +this.thresholdIsMin = null; +this.colourFromLabel = null; +this.threshline = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "FeatureColourChooser", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ItemListener, java.awt.event.MouseListener]); +Clazz.prepareFields (c$, function () { +this.minColour = new awt2swing.Panel (); +this.maxColour = new awt2swing.Panel (); +this.jPanel1 = new awt2swing.Panel (); +this.jPanel2 = new awt2swing.Panel (); +this.threshold = new awt2swing.Choice (); +this.jPanel3 = new awt2swing.Panel (); +this.jPanel4 = new awt2swing.Panel (); +this.slider = new awt2swing.Scrollbar (0); +this.thresholdValue = new awt2swing.TextField (20); +this.thresholdIsMin = new awt2swing.Checkbox (); +this.colourFromLabel = new awt2swing.Checkbox (); +}); +Clazz.makeConstructor (c$, +function (af, type) { +Clazz.superConstructor (this, jalview.appletgui.FeatureColourChooser, []); +this.af = af; +this.init (af.getSeqcanvas ().getFeatureRenderer (), type); +}, "jalview.appletgui.AlignFrame,~S"); +Clazz.makeConstructor (c$, +function (fsettings, type) { +Clazz.superConstructor (this, jalview.appletgui.FeatureColourChooser, []); +this.fs = fsettings; +this.init (fsettings.fr, type); +}, "jalview.appletgui.FeatureSettings,~S"); +Clazz.defineMethod (c$, "init", +($fz = function (frenderer, type) { +this.type = type; +this.fr = frenderer; +var mm = (this.fr.getMinMax ().get (type))[0]; +this.min = mm[0]; +this.max = mm[1]; +this.oldcs = this.fr.getFeatureColours ().get (type); +if (Clazz.instanceOf (this.oldcs, jalview.schemes.GraduatedColor)) { +this.cs = new jalview.schemes.GraduatedColor (this.oldcs, this.min, this.max); +} else { +var bl = java.awt.Color.black; +if (Clazz.instanceOf (this.oldcs, java.awt.Color)) { +bl = this.oldcs; +}this.cs = new jalview.schemes.GraduatedColor (java.awt.Color.white, bl, mm[0], mm[1]); +}this.minColour.setBackground (this.cs.getMinColor ()); +this.maxColour.setBackground (this.cs.getMaxColor ()); +this.minColour.setForeground (this.cs.getMinColor ()); +this.maxColour.setForeground (this.cs.getMaxColor ()); +this.colourFromLabel.setState (this.cs.isColourByLabel ()); +this.adjusting = true; +try { +this.jbInit (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +this.threshold.select (new Integer (this.cs.getThreshType () == -1 ? 0 : this.cs.getThreshType () == 1 ? 1 : 2)); +this.adjusting = false; +this.changeColour (); +this.colourFromLabel.addItemListener (this); +this.slider.addAdjustmentListener (this); +this.slider.addMouseListener (this); +this.owner = (this.af != null) ? this.af : this.fs.frame; +this.frame = new jalview.appletgui.JVDialog (this.owner, jalview.util.MessageManager.formatMessage ("label.graduated_color_for_params", Clazz.newArray (-1, [type])), true, 480, 248); +this.frame.setMainPanel (this); +this.validate (); +this.frame.setVisible (true); +if (this.frame.accept) { +this.changeColour (); +} else { +this.reset (); +jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); +this.frame.setVisible (false); +}}, $fz.isPrivate = true, $fz), "jalview.appletgui.FeatureRenderer,~S"); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.appletgui.FeatureColourChooser, []); +try { +this.jbInit (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +var minLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.min")); +var maxLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.max")); +minLabel.setFont ( new java.awt.Font ("Verdana", 0, 11)); +maxLabel.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.minColour.setBounds (0, 0, 40, 27); +this.maxColour.setBounds (0, 0, 40, 27); +this.minColour.addMouseListener (this); +this.maxColour.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.maxColour.addMouseListener (this); +this.thresholdIsMin.addItemListener (this); +this.setLayout ( new java.awt.GridLayout (4, 1)); +this.jPanel1.setLayout ( new java.awt.FlowLayout ()); +this.jPanel2.setLayout ( new java.awt.FlowLayout ()); +this.jPanel3.setLayout ( new java.awt.GridLayout (1, 1)); +this.jPanel4.setLayout ( new java.awt.FlowLayout ()); +this.jPanel1.setBackground (java.awt.Color.white); +this.jPanel2.setBackground (java.awt.Color.white); +this.jPanel4.setBackground (java.awt.Color.white); +this.threshold.addItemListener (this); +this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_no_thereshold")); +this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_above_thereshold")); +this.threshold.addItem (jalview.util.MessageManager.getString ("label.threshold_feature_below_thereshold")); +this.thresholdValue.addActionListener (this); +this.slider.setBackground (java.awt.Color.white); +this.slider.setEnabled (false); +this.slider.setSize ( new java.awt.Dimension (93, 21)); +this.thresholdValue.setEnabled (false); +this.thresholdValue.setSize ( new java.awt.Dimension (79, 22)); +this.thresholdValue.setColumns (5); +this.jPanel3.setBackground (java.awt.Color.white); +this.colourFromLabel.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.colourFromLabel.setLabel (jalview.util.MessageManager.getString ("label.colour_by_label")); +this.colourFromLabel.setSize ( new java.awt.Dimension (139, 22)); +this.thresholdIsMin.setBackground (java.awt.Color.white); +this.thresholdIsMin.setLabel (jalview.util.MessageManager.getString ("label.threshold_minmax")); +this.thresholdIsMin.setSize ( new java.awt.Dimension (135, 23)); +this.jPanel1.add (minLabel); +this.jPanel1.add (this.minColour); +this.jPanel1.add (maxLabel); +this.jPanel1.add (this.maxColour); +this.jPanel1.add (this.colourFromLabel); +this.jPanel2.add (this.threshold); +this.jPanel3.add (this.slider); +this.jPanel4.add (this.thresholdValue); +this.jPanel4.add (this.thresholdIsMin); +this.add (this.jPanel1); +this.add (this.jPanel2); +this.add (this.jPanel3); +this.add (this.jPanel4); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.thresholdValue) { +try { +var f = new Float (this.thresholdValue.getText ()).floatValue (); +this.slider.setValue (Clazz.floatToInt (f * 1000)); +this.adjustmentValueChanged (null); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +} else if (evt.getSource () === this.minColour) { +this.minColour_actionPerformed (null); +} else if (evt.getSource () === this.maxColour) { +this.maxColour_actionPerformed (null); +} else { +this.changeColour (); +}}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +this.maxColour.setEnabled (!this.colourFromLabel.getState ()); +this.minColour.setEnabled (!this.colourFromLabel.getState ()); +this.changeColour (); +}, "java.awt.event.ItemEvent"); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +if (!this.adjusting) { +this.thresholdValue.setText ((this.slider.getValue () / 1000) + ""); +this.valueChanged (); +}}, "java.awt.event.AdjustmentEvent"); +Clazz.defineMethod (c$, "valueChanged", +function () { +this.threshline.value = this.slider.getValue () / 1000; +this.cs.setThresh (this.threshline.value); +this.changeColour (); +jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); +}); +Clazz.defineMethod (c$, "minColour_actionPerformed", +function (newCol) { +if (newCol == null) { +var udc = new jalview.appletgui.UserDefinedColours (this, this.minColour.getBackground (), this.owner, jalview.util.MessageManager.getString ("label.select_colour_minimum_value")); +} else { +this.minColour.setBackground (newCol); +this.minColour.setForeground (newCol); +this.minColour.repaint (); +this.changeColour (); +}}, "java.awt.Color"); +Clazz.defineMethod (c$, "maxColour_actionPerformed", +function (newCol) { +if (newCol == null) { +var udc = new jalview.appletgui.UserDefinedColours (this, this.maxColour.getBackground (), this.owner, jalview.util.MessageManager.getString ("label.select_colour_maximum_value")); +} else { +this.maxColour.setBackground (newCol); +this.maxColour.setForeground (newCol); +this.maxColour.repaint (); +this.changeColour (); +}}, "java.awt.Color"); +Clazz.defineMethod (c$, "changeColour", +function () { +if (this.adjusting) { +return; +}var aboveThreshold = -1; +if (this.threshold.getSelectedIndex () == 1) { +aboveThreshold = 1; +} else if (this.threshold.getSelectedIndex () == 2) { +aboveThreshold = 0; +}this.slider.setEnabled (true); +this.thresholdValue.setEnabled (true); +var acg = new jalview.schemes.GraduatedColor (this.minColour.getBackground (), this.maxColour.getBackground (), this.min, this.max); +acg.setColourByLabel (this.colourFromLabel.getState ()); +this.maxColour.setEnabled (!this.colourFromLabel.getState ()); +this.minColour.setEnabled (!this.colourFromLabel.getState ()); +if (aboveThreshold == -1) { +this.slider.setEnabled (false); +this.thresholdValue.setEnabled (false); +this.thresholdValue.setText (""); +} else if (aboveThreshold != -1 && this.threshline == null) { +this.threshline = new jalview.datamodel.GraphLine ((this.max - this.min) / 2, "Threshold", java.awt.Color.black); +}if (aboveThreshold != -1) { +this.adjusting = true; +acg.setThresh (this.threshline.value); +var range = this.max * 1000 - this.min * 1000; +this.slider.setMinimum (Clazz.floatToInt (this.min * 1000)); +this.slider.setMaximum (Clazz.floatToInt (this.max * 1000)); +this.slider.setValue (Clazz.floatToInt (this.threshline.value * 1000)); +this.thresholdValue.setText (this.threshline.value + ""); +this.slider.setEnabled (true); +this.thresholdValue.setEnabled (true); +this.adjusting = false; +}acg.setThreshType (aboveThreshold); +if (this.thresholdIsMin.getState () && aboveThreshold != -1) { +if (aboveThreshold == 1) { +acg = new jalview.schemes.GraduatedColor (acg, this.threshline.value, this.max); +} else { +acg = new jalview.schemes.GraduatedColor (acg, this.min, this.threshline.value); +}}this.fr.setColour (this.type, acg); +this.cs = acg; +jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); +}); +Clazz.defineMethod (c$, "reset", +function () { +this.fr.setColour (this.type, this.oldcs); +jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); +}); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +if (evt.getSource () === this.minColour || evt.getSource () === this.maxColour) { +this.actionPerformed ( new java.awt.event.ActionEvent (evt.getSource (), 1, "Clicked")); +} else { +jalview.appletgui.PaintRefresher.Refresh (this, this.fr.getViewport ().getSequenceSetId ()); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +}); diff --git a/bin/jalview/appletgui/FeatureRenderer.class b/bin/jalview/appletgui/FeatureRenderer.class index 94cc9b34e9954183584c291b9abf79dda3ff5162..6582fe79533beaae65600f8ab8c36031dad6fc66 100644 GIT binary patch delta 28 kcmccNeBF7&9dX7Jo9~LB<6!>DATxQL!g5C8$>EBP0KmKp-v9sr delta 29 lcmccae8YLe9dX8!o9~LB<6!>9AUk=T!g3}7rpaN7jR4Cy3*i6& diff --git a/bin/jalview/appletgui/FeatureRenderer.js b/bin/jalview/appletgui/FeatureRenderer.js index 05b643c..3d688fd 100644 --- a/bin/jalview/appletgui/FeatureRenderer.js +++ b/bin/jalview/appletgui/FeatureRenderer.js @@ -1,272 +1,272 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "jalview.renderer.seqfeatures.FeatureRenderer"], "jalview.appletgui.FeatureRenderer", ["awt2swing.Button", "$.Choice", "$.Label", "$.ScrollPane", "$.TextArea", "$.TextField", "jalview.appletgui.FeatureColourChooser", "$.JVDialog", "$.UserDefinedColours", "jalview.datamodel.SearchResults", "jalview.io.FeaturesFile", "jalview.schemes.GraduatedColor", "$.UserColourScheme", "jalview.util.MessageManager", "java.awt.BorderLayout", "$.Color", "$.Font", "$.GridLayout", "java.awt.event.ActionListener", "$.ItemListener", "$.MouseAdapter", "java.lang.Error"], function () { -c$ = Clazz.decorateAsClass (function () { -this.featureLinks = null; -this.featureIndex = 0; -this.deleteFeature = false; -this.colourPanel = null; -if (!Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer.FeatureColourPanel")) { -jalview.appletgui.FeatureRenderer.$FeatureRenderer$FeatureColourPanel$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "FeatureRenderer", jalview.renderer.seqfeatures.FeatureRenderer); -Clazz.makeConstructor (c$, -function (av) { -Clazz.superConstructor (this, jalview.appletgui.FeatureRenderer); -this.av = av; -this.setTransparencyAvailable (!System.getProperty ("java.version").startsWith ("1.1")); -}, "jalview.viewmodel.AlignmentViewport"); -Clazz.defineMethod (c$, "amendFeatures", -function (sequences, features, newFeatures, ap) { -var bigPanel = new awt2swing.Panel ( new java.awt.BorderLayout ()); -var name = new awt2swing.TextField (16); -var source = new awt2swing.TextField (16); -var description = new awt2swing.TextArea (3, 35); -var start = new awt2swing.TextField (8); -var end = new awt2swing.TextField (8); -var overlaps; -var deleteButton = new awt2swing.Button ("Delete"); -this.deleteFeature = false; -this.colourPanel = Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer.FeatureColourPanel, this, null); -this.colourPanel.setSize (110, 15); -var fr = this; -var panel = new awt2swing.Panel ( new java.awt.GridLayout (3, 1)); -this.featureIndex = 0; -var tmp; -if (!newFeatures && features.length > 1) { -panel = new awt2swing.Panel ( new java.awt.GridLayout (4, 1)); -tmp = new awt2swing.Panel (); -tmp.add ( new awt2swing.Label ("Select Feature: ")); -overlaps = new awt2swing.Choice (); -for (var i = 0; i < features.length; i++) { -var item = features[i].getType () + "/" + features[i].getBegin () + "-" + features[i].getEnd (); -if (features[i].getFeatureGroup () != null) { -item += " (" + features[i].getFeatureGroup () + ")"; -}overlaps.addItem (item); -} -tmp.add (overlaps); -overlaps.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer$1") ? 0 : jalview.appletgui.FeatureRenderer.$FeatureRenderer$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer$1, this, Clazz.cloneFinals ("overlaps", overlaps, "name", name, "features", features, "description", description, "source", source, "start", start, "end", end, "sequences", sequences, "ap", ap)))); -panel.add (tmp); -}tmp = new awt2swing.Panel (); -panel.add (tmp); -tmp.add ( new awt2swing.Label ("Name: ", 4)); -tmp.add (name); -tmp = new awt2swing.Panel (); -panel.add (tmp); -tmp.add ( new awt2swing.Label ("Group: ", 4)); -tmp.add (source); -tmp = new awt2swing.Panel (); -panel.add (tmp); -tmp.add ( new awt2swing.Label ("Colour: ", 4)); -tmp.add (this.colourPanel); -bigPanel.add (panel, "North"); -panel = new awt2swing.Panel (); -panel.add ( new awt2swing.Label ("Description: ", 4)); -panel.add ( new awt2swing.ScrollPane ().add (description)); -if (!newFeatures) { -bigPanel.add (panel, "South"); -panel = new awt2swing.Panel (); -panel.add ( new awt2swing.Label (" Start:", 4)); -panel.add (start); -panel.add ( new awt2swing.Label (" End:", 4)); -panel.add (end); -bigPanel.add (panel, "Center"); -} else { -bigPanel.add (panel, "Center"); -}if (jalview.appletgui.FeatureRenderer.lastFeatureAdded == null) { -if (features[0].type != null) { -jalview.appletgui.FeatureRenderer.lastFeatureAdded = features[0].type; -} else { -jalview.appletgui.FeatureRenderer.lastFeatureAdded = "feature_1"; -}}if (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded == null) { -if (features[0].featureGroup != null) { -jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded = features[0].featureGroup; -} else { -jalview.appletgui.FeatureRenderer.lastFeatureAdded = "Jalview"; -}}var title = newFeatures ? jalview.util.MessageManager.getString ("label.create_new_sequence_features") : jalview.util.MessageManager.formatMessage ("label.amend_delete_features", Clazz.newArray (-1, [sequences[0].getName ()])); -var dialog = new jalview.appletgui.JVDialog (ap.alignFrame, title, true, 385, 240); -dialog.setMainPanel (bigPanel); -if (newFeatures) { -name.setText (jalview.appletgui.FeatureRenderer.lastFeatureAdded); -source.setText (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded); -} else { -dialog.ok.setLabel (jalview.util.MessageManager.getString ("label.amend")); -dialog.buttonPanel.add (deleteButton, 1); -deleteButton.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer$2") ? 0 : jalview.appletgui.FeatureRenderer.$FeatureRenderer$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer$2, this, Clazz.cloneFinals ("dialog", dialog)))); -name.setText (features[0].getType ()); -source.setText (features[0].getFeatureGroup ()); -}start.setText (features[0].getBegin () + ""); -end.setText (features[0].getEnd () + ""); -description.setText (features[0].getDescription ()); -var col = this.getColour (name.getText ()); -if (col == null) { -col = new jalview.schemes.UserColourScheme ().createColourFromName (name.getText ()); -}var fcol = this.getFeatureStyle (name.getText ()); -this.colourPanel.updateColor (fcol); -dialog.setResizable (true); -this.colourPanel.addMouseListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer$3") ? 0 : jalview.appletgui.FeatureRenderer.$FeatureRenderer$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer$3, this, Clazz.cloneFinals ("fr", fr, "ap", ap, "name", name, "dialog", dialog)))); -dialog.setVisible (true); -var ffile = new jalview.io.FeaturesFile (); -if (dialog.accept) { -this.lastSeq = null; -jalview.appletgui.FeatureRenderer.lastFeatureAdded = name.getText ().trim (); -jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded = source.getText ().trim (); -jalview.appletgui.FeatureRenderer.lastDescriptionAdded = description.getText ().$replace ('\n', ' '); -}if (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded != null && jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded.length < 1) { -jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded = null; -}if (!newFeatures) { -var sf = features[this.featureIndex]; -if (dialog.accept) { -sf.type = jalview.appletgui.FeatureRenderer.lastFeatureAdded; -sf.featureGroup = jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded; -sf.description = jalview.appletgui.FeatureRenderer.lastDescriptionAdded; -if (!this.colourPanel.isGcol) { -this.setColour (sf.type, this.colourPanel.getBackground ()); -}try { -sf.begin = Integer.parseInt (start.getText ()); -sf.end = Integer.parseInt (end.getText ()); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -ffile.parseDescriptionHTML (sf, false); -this.setVisible (jalview.appletgui.FeatureRenderer.lastFeatureAdded); -}if (this.deleteFeature) { -sequences[0].deleteFeature (sf); -}} else { -if (dialog.accept && name.getText ().length > 0) { -for (var i = 0; i < sequences.length; i++) { -features[i].type = jalview.appletgui.FeatureRenderer.lastFeatureAdded; -features[i].featureGroup = jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded; -features[i].description = jalview.appletgui.FeatureRenderer.lastDescriptionAdded; -sequences[i].addSequenceFeature (features[i]); -ffile.parseDescriptionHTML (features[i], false); -} -var newColour = this.colourPanel.getBackground (); -if (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded != null) { -this.setGroupVisibility (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded, true); -}this.setColour (jalview.appletgui.FeatureRenderer.lastFeatureAdded, newColour); -this.setVisible (jalview.appletgui.FeatureRenderer.lastFeatureAdded); -this.findAllFeatures (false); -} else { -return false; -}}if ((this.av).featureSettings != null) { -(this.av).featureSettings.refreshTable (); -}ap.paintAlignment (true); -return true; -}, "~A,~A,~B,jalview.appletgui.AlignmentPanel"); -c$.$FeatureRenderer$FeatureColourPanel$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.label = ""; -this.maxCol = null; -this.isColourByLabel = false; -this.isGcol = false; -Clazz.instantialize (this, arguments); -}, jalview.appletgui.FeatureRenderer, "FeatureColourPanel", awt2swing.Panel); -Clazz.defineMethod (c$, "updateColor", -function (a) { -var b; -var c = null; -var d = null; -var e = ""; -if (Clazz.instanceOf (a, java.awt.Color)) { -this.isGcol = false; -c = a; -d = null; -} else if (Clazz.instanceOf (a, jalview.schemes.GraduatedColor)) { -this.isGcol = true; -d = a; -c = null; -} else { -throw new Error (jalview.util.MessageManager.getString ("error.invalid_colour_for_mycheckbox")); -}if (c != null) { -this.setBackground (b = c); -} else { -if (d.getThreshType () != -1) { -e += " " + ((d.getThreshType () == 1) ? "(>)" : "(<)"); -}if (this.isColourByLabel = d.isColourByLabel ()) { -this.setBackground (b = java.awt.Color.white); -e += " (by Label)"; -} else { -this.setBackground (b = d.getMinColor ()); -this.maxCol = d.getMaxColor (); -}}this.label = e; -this.setBackground (b); -this.repaint (); -}, "~O"); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.appletgui.FeatureRenderer.FeatureColourPanel, [null]); -}); -Clazz.defineMethod (c$, "PaintComponent", -function (a) { -var b = this.getSize (); -if (this.isGcol) { -if (this.isColourByLabel) { -a.setColor (java.awt.Color.white); -a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); -a.setColor (java.awt.Color.black); -var c = new java.awt.Font ("Verdana", 0, 10); -a.setFont (c); -a.drawString (jalview.util.MessageManager.getString ("label.label"), 0, 0); -} else { -a.setColor (this.maxCol); -a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); -}}}, "java.awt.Graphics"); -c$ = Clazz.p0p (); -}; -c$.$FeatureRenderer$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureRenderer$1", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (e) { -var index = this.f$.overlaps.getSelectedIndex (); -if (index != -1) { -this.b$["jalview.appletgui.FeatureRenderer"].featureIndex = index; -this.f$.name.setText (this.f$.features[index].getType ()); -this.f$.description.setText (this.f$.features[index].getDescription ()); -this.f$.source.setText (this.f$.features[index].getFeatureGroup ()); -this.f$.start.setText (this.f$.features[index].getBegin () + ""); -this.f$.end.setText (this.f$.features[index].getEnd () + ""); -var highlight = new jalview.datamodel.SearchResults (); -highlight.addResult (this.f$.sequences[0], this.f$.features[index].getBegin (), this.f$.features[index].getEnd ()); -this.f$.ap.seqPanel.seqCanvas.highlightSearchResults (highlight); -}var col = this.b$["jalview.appletgui.FeatureRenderer"].getFeatureStyle (this.f$.name.getText ()); -if (col == null) { -col = new jalview.schemes.UserColourScheme ().createColourFromName (this.f$.name.getText ()); -}this.b$["jalview.appletgui.FeatureRenderer"].colourPanel.updateColor (col); -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$FeatureRenderer$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureRenderer$2", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -this.b$["jalview.appletgui.FeatureRenderer"].deleteFeature = true; -this.f$.dialog.setVisible (false); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$FeatureRenderer$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureRenderer$3", java.awt.event.MouseAdapter); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -if (!this.b$["jalview.appletgui.FeatureRenderer"].colourPanel.isGcol) { - new jalview.appletgui.UserDefinedColours (this.f$.fr, this.f$.ap.alignFrame); -} else { -var fcc = new jalview.appletgui.FeatureColourChooser (this.f$.ap.alignFrame, this.f$.name.getText ()); -this.f$.dialog.transferFocus (); -}}, "java.awt.event.MouseEvent"); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"lastFeatureAdded", null, -"lastFeatureGroupAdded", null, -"lastDescriptionAdded", null); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "jalview.renderer.seqfeatures.FeatureRenderer"], "jalview.appletgui.FeatureRenderer", ["awt2swing.Button", "$.Choice", "$.Label", "$.ScrollPane", "$.TextArea", "$.TextField", "jalview.appletgui.FeatureColourChooser", "$.JVDialog", "$.UserDefinedColours", "jalview.datamodel.SearchResults", "jalview.io.FeaturesFile", "jalview.schemes.GraduatedColor", "$.UserColourScheme", "jalview.util.MessageManager", "java.awt.BorderLayout", "$.Color", "$.Font", "$.GridLayout", "java.awt.event.ActionListener", "$.ItemListener", "$.MouseAdapter", "java.lang.Error"], function () { +c$ = Clazz.decorateAsClass (function () { +this.featureLinks = null; +this.featureIndex = 0; +this.deleteFeature = false; +this.colourPanel = null; +if (!Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer.FeatureColourPanel")) { +jalview.appletgui.FeatureRenderer.$FeatureRenderer$FeatureColourPanel$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "FeatureRenderer", jalview.renderer.seqfeatures.FeatureRenderer); +Clazz.makeConstructor (c$, +function (av) { +Clazz.superConstructor (this, jalview.appletgui.FeatureRenderer); +this.av = av; +this.setTransparencyAvailable (!System.getProperty ("java.version").startsWith ("1.1")); +}, "jalview.viewmodel.AlignmentViewport"); +Clazz.defineMethod (c$, "amendFeatures", +function (sequences, features, newFeatures, ap) { +var bigPanel = new awt2swing.Panel ( new java.awt.BorderLayout ()); +var name = new awt2swing.TextField (16); +var source = new awt2swing.TextField (16); +var description = new awt2swing.TextArea (3, 35); +var start = new awt2swing.TextField (8); +var end = new awt2swing.TextField (8); +var overlaps; +var deleteButton = new awt2swing.Button ("Delete"); +this.deleteFeature = false; +this.colourPanel = Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer.FeatureColourPanel, this, null); +this.colourPanel.setSize (110, 15); +var fr = this; +var panel = new awt2swing.Panel ( new java.awt.GridLayout (3, 1)); +this.featureIndex = 0; +var tmp; +if (!newFeatures && features.length > 1) { +panel = new awt2swing.Panel ( new java.awt.GridLayout (4, 1)); +tmp = new awt2swing.Panel (); +tmp.add ( new awt2swing.Label ("Select Feature: ")); +overlaps = new awt2swing.Choice (); +for (var i = 0; i < features.length; i++) { +var item = features[i].getType () + "/" + features[i].getBegin () + "-" + features[i].getEnd (); +if (features[i].getFeatureGroup () != null) { +item += " (" + features[i].getFeatureGroup () + ")"; +}overlaps.addItem (item); +} +tmp.add (overlaps); +overlaps.addItemListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer$1") ? 0 : jalview.appletgui.FeatureRenderer.$FeatureRenderer$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer$1, this, Clazz.cloneFinals ("overlaps", overlaps, "name", name, "features", features, "description", description, "source", source, "start", start, "end", end, "sequences", sequences, "ap", ap)))); +panel.add (tmp); +}tmp = new awt2swing.Panel (); +panel.add (tmp); +tmp.add ( new awt2swing.Label ("Name: ", 4)); +tmp.add (name); +tmp = new awt2swing.Panel (); +panel.add (tmp); +tmp.add ( new awt2swing.Label ("Group: ", 4)); +tmp.add (source); +tmp = new awt2swing.Panel (); +panel.add (tmp); +tmp.add ( new awt2swing.Label ("Colour: ", 4)); +tmp.add (this.colourPanel); +bigPanel.add (panel, "North"); +panel = new awt2swing.Panel (); +panel.add ( new awt2swing.Label ("Description: ", 4)); +panel.add ( new awt2swing.ScrollPane ().add (description)); +if (!newFeatures) { +bigPanel.add (panel, "South"); +panel = new awt2swing.Panel (); +panel.add ( new awt2swing.Label (" Start:", 4)); +panel.add (start); +panel.add ( new awt2swing.Label (" End:", 4)); +panel.add (end); +bigPanel.add (panel, "Center"); +} else { +bigPanel.add (panel, "Center"); +}if (jalview.appletgui.FeatureRenderer.lastFeatureAdded == null) { +if (features[0].type != null) { +jalview.appletgui.FeatureRenderer.lastFeatureAdded = features[0].type; +} else { +jalview.appletgui.FeatureRenderer.lastFeatureAdded = "feature_1"; +}}if (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded == null) { +if (features[0].featureGroup != null) { +jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded = features[0].featureGroup; +} else { +jalview.appletgui.FeatureRenderer.lastFeatureAdded = "Jalview"; +}}var title = newFeatures ? jalview.util.MessageManager.getString ("label.create_new_sequence_features") : jalview.util.MessageManager.formatMessage ("label.amend_delete_features", Clazz.newArray (-1, [sequences[0].getName ()])); +var dialog = new jalview.appletgui.JVDialog (ap.alignFrame, title, true, 385, 240); +dialog.setMainPanel (bigPanel); +if (newFeatures) { +name.setText (jalview.appletgui.FeatureRenderer.lastFeatureAdded); +source.setText (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded); +} else { +dialog.ok.setLabel (jalview.util.MessageManager.getString ("label.amend")); +dialog.buttonPanel.add (deleteButton, 1); +deleteButton.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer$2") ? 0 : jalview.appletgui.FeatureRenderer.$FeatureRenderer$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer$2, this, Clazz.cloneFinals ("dialog", dialog)))); +name.setText (features[0].getType ()); +source.setText (features[0].getFeatureGroup ()); +}start.setText (features[0].getBegin () + ""); +end.setText (features[0].getEnd () + ""); +description.setText (features[0].getDescription ()); +var col = this.getColour (name.getText ()); +if (col == null) { +col = new jalview.schemes.UserColourScheme ().createColourFromName (name.getText ()); +}var fcol = this.getFeatureStyle (name.getText ()); +this.colourPanel.updateColor (fcol); +dialog.setResizable (true); +this.colourPanel.addMouseListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureRenderer$3") ? 0 : jalview.appletgui.FeatureRenderer.$FeatureRenderer$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureRenderer$3, this, Clazz.cloneFinals ("fr", fr, "ap", ap, "name", name, "dialog", dialog)))); +dialog.setVisible (true); +var ffile = new jalview.io.FeaturesFile (); +if (dialog.accept) { +this.lastSeq = null; +jalview.appletgui.FeatureRenderer.lastFeatureAdded = name.getText ().trim (); +jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded = source.getText ().trim (); +jalview.appletgui.FeatureRenderer.lastDescriptionAdded = description.getText ().$replace ('\n', ' '); +}if (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded != null && jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded.length < 1) { +jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded = null; +}if (!newFeatures) { +var sf = features[this.featureIndex]; +if (dialog.accept) { +sf.type = jalview.appletgui.FeatureRenderer.lastFeatureAdded; +sf.featureGroup = jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded; +sf.description = jalview.appletgui.FeatureRenderer.lastDescriptionAdded; +if (!this.colourPanel.isGcol) { +this.setColour (sf.type, this.colourPanel.getBackground ()); +}try { +sf.begin = Integer.parseInt (start.getText ()); +sf.end = Integer.parseInt (end.getText ()); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +ffile.parseDescriptionHTML (sf, false); +this.setVisible (jalview.appletgui.FeatureRenderer.lastFeatureAdded); +}if (this.deleteFeature) { +sequences[0].deleteFeature (sf); +}} else { +if (dialog.accept && name.getText ().length > 0) { +for (var i = 0; i < sequences.length; i++) { +features[i].type = jalview.appletgui.FeatureRenderer.lastFeatureAdded; +features[i].featureGroup = jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded; +features[i].description = jalview.appletgui.FeatureRenderer.lastDescriptionAdded; +sequences[i].addSequenceFeature (features[i]); +ffile.parseDescriptionHTML (features[i], false); +} +var newColour = this.colourPanel.getBackground (); +if (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded != null) { +this.setGroupVisibility (jalview.appletgui.FeatureRenderer.lastFeatureGroupAdded, true); +}this.setColour (jalview.appletgui.FeatureRenderer.lastFeatureAdded, newColour); +this.setVisible (jalview.appletgui.FeatureRenderer.lastFeatureAdded); +this.findAllFeatures (false); +} else { +return false; +}}if ((this.av).featureSettings != null) { +(this.av).featureSettings.refreshTable (); +}ap.paintAlignment (true); +return true; +}, "~A,~A,~B,jalview.appletgui.AlignmentPanel"); +c$.$FeatureRenderer$FeatureColourPanel$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.label = ""; +this.maxCol = null; +this.isColourByLabel = false; +this.isGcol = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui.FeatureRenderer, "FeatureColourPanel", awt2swing.Panel); +Clazz.defineMethod (c$, "updateColor", +function (a) { +var b; +var c = null; +var d = null; +var e = ""; +if (Clazz.instanceOf (a, java.awt.Color)) { +this.isGcol = false; +c = a; +d = null; +} else if (Clazz.instanceOf (a, jalview.schemes.GraduatedColor)) { +this.isGcol = true; +d = a; +c = null; +} else { +throw new Error (jalview.util.MessageManager.getString ("error.invalid_colour_for_mycheckbox")); +}if (c != null) { +this.setBackground (b = c); +} else { +if (d.getThreshType () != -1) { +e += " " + ((d.getThreshType () == 1) ? "(>)" : "(<)"); +}if (this.isColourByLabel = d.isColourByLabel ()) { +this.setBackground (b = java.awt.Color.white); +e += " (by Label)"; +} else { +this.setBackground (b = d.getMinColor ()); +this.maxCol = d.getMaxColor (); +}}this.label = e; +this.setBackground (b); +this.repaint (); +}, "~O"); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.appletgui.FeatureRenderer.FeatureColourPanel, [null]); +}); +Clazz.defineMethod (c$, "PaintComponent", +function (a) { +var b = this.getSize (); +if (this.isGcol) { +if (this.isColourByLabel) { +a.setColor (java.awt.Color.white); +a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); +a.setColor (java.awt.Color.black); +var c = new java.awt.Font ("Verdana", 0, 10); +a.setFont (c); +a.drawString (jalview.util.MessageManager.getString ("label.label"), 0, 0); +} else { +a.setColor (this.maxCol); +a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); +}}}, "java.awt.Graphics"); +c$ = Clazz.p0p (); +}; +c$.$FeatureRenderer$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureRenderer$1", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (e) { +var index = this.f$.overlaps.getSelectedIndex (); +if (index != -1) { +this.b$["jalview.appletgui.FeatureRenderer"].featureIndex = index; +this.f$.name.setText (this.f$.features[index].getType ()); +this.f$.description.setText (this.f$.features[index].getDescription ()); +this.f$.source.setText (this.f$.features[index].getFeatureGroup ()); +this.f$.start.setText (this.f$.features[index].getBegin () + ""); +this.f$.end.setText (this.f$.features[index].getEnd () + ""); +var highlight = new jalview.datamodel.SearchResults (); +highlight.addResult (this.f$.sequences[0], this.f$.features[index].getBegin (), this.f$.features[index].getEnd ()); +this.f$.ap.seqPanel.seqCanvas.highlightSearchResults (highlight); +}var col = this.b$["jalview.appletgui.FeatureRenderer"].getFeatureStyle (this.f$.name.getText ()); +if (col == null) { +col = new jalview.schemes.UserColourScheme ().createColourFromName (this.f$.name.getText ()); +}this.b$["jalview.appletgui.FeatureRenderer"].colourPanel.updateColor (col); +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$FeatureRenderer$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureRenderer$2", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +this.b$["jalview.appletgui.FeatureRenderer"].deleteFeature = true; +this.f$.dialog.setVisible (false); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$FeatureRenderer$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureRenderer$3", java.awt.event.MouseAdapter); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +if (!this.b$["jalview.appletgui.FeatureRenderer"].colourPanel.isGcol) { + new jalview.appletgui.UserDefinedColours (this.f$.fr, this.f$.ap.alignFrame); +} else { +var fcc = new jalview.appletgui.FeatureColourChooser (this.f$.ap.alignFrame, this.f$.name.getText ()); +this.f$.dialog.transferFocus (); +}}, "java.awt.event.MouseEvent"); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"lastFeatureAdded", null, +"lastFeatureGroupAdded", null, +"lastDescriptionAdded", null); +}); diff --git a/bin/jalview/appletgui/FeatureSettings.js b/bin/jalview/appletgui/FeatureSettings.js index c10ac3f..cc92844 100644 --- a/bin/jalview/appletgui/FeatureSettings.js +++ b/bin/jalview/appletgui/FeatureSettings.js @@ -1,444 +1,444 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Checkbox", "$.Panel", "jalview.api.FeatureSettingsControllerI", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.ItemListener", "$.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.FeatureSettings", ["awt2swing.Button", "$.Frame", "$.Label", "$.MenuItem", "$.PopupMenu", "$.ScrollPane", "$.Scrollbar", "jalview.appletgui.FeatureColourChooser", "$.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.schemes.GraduatedColor", "jalview.util.MessageManager", "java.awt.BorderLayout", "$.Color", "$.Font", "$.GridLayout", "$.Toolkit", "java.awt.event.WindowAdapter", "java.lang.Boolean", "$.Error", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.fr = null; -this.ap = null; -this.av = null; -this.frame = null; -this.groupPanel = null; -this.featurePanel = null; -this.scrollPane = null; -this.linkImage = null; -this.transparency = null; -this.groupItemListener = null; -this.selectedCheck = null; -this.dragging = false; -if (!Clazz.isClassDefined ("jalview.appletgui.FeatureSettings.MyCheckbox")) { -jalview.appletgui.FeatureSettings.$FeatureSettings$MyCheckbox$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "FeatureSettings", awt2swing.Panel, [java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener, java.awt.event.AdjustmentListener, jalview.api.FeatureSettingsControllerI]); -Clazz.prepareFields (c$, function () { -this.featurePanel = new awt2swing.Panel (); -this.groupItemListener = ((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$1") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$1, this, null)); -}); -Clazz.makeConstructor (c$, -function (ap) { -Clazz.superConstructor (this, jalview.appletgui.FeatureSettings, []); -this.ap = ap; -this.av = ap.av; -ap.av.featureSettings = this; -this.fr = ap.seqPanel.seqCanvas.getFeatureRenderer (); -this.transparency = new awt2swing.Scrollbar (0, 100 - Clazz.floatToInt (this.fr.getTransparency () * 100), 1, 1, 100); -if (this.fr.isTransparencyAvailable ()) { -this.transparency.addAdjustmentListener (this); -} else { -this.transparency.setEnabled (false); -}var url = this.getClass ().getResource ("/images/link.gif"); -if (url != null) { -this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url); -}if (this.av.isShowSequenceFeatures () || !this.fr.hasRenderOrder ()) { -this.fr.findAllFeatures (true); -}this.discoverAllFeatureData (); -this.setLayout ( new java.awt.BorderLayout ()); -this.scrollPane = new awt2swing.ScrollPane (); -this.scrollPane.add (this.featurePanel); -if (this.fr.getAllFeatureColours () != null && this.fr.getAllFeatureColours ().size () > 0) { -this.add (this.scrollPane, "Center"); -}var invert = new awt2swing.Button ("Invert Selection"); -invert.addActionListener (this); -var lowerPanel = new awt2swing.Panel ( new java.awt.GridLayout (2, 1, 5, 10)); -lowerPanel.add (invert); -var tPanel = new awt2swing.Panel ( new java.awt.BorderLayout ()); -if (this.fr.isTransparencyAvailable ()) { -tPanel.add (this.transparency, "Center"); -tPanel.add ( new awt2swing.Label ("Transparency"), "East"); -} else { -tPanel.add ( new awt2swing.Label ("Transparency not available in this web browser"), "Center"); -}lowerPanel.add (tPanel, "South"); -this.add (lowerPanel, "South"); -if (this.groupPanel != null) { -this.groupPanel.setLayout ( new java.awt.GridLayout (Clazz.doubleToInt ((this.fr.getFeatureGroupsSize ()) / 4) + 1, 4)); -this.groupPanel.validate (); -this.add (this.groupPanel, "North"); -}this.frame = new awt2swing.Frame (); -this.frame.add (this); -var me = this; -this.frame.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$2") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$2, this, Clazz.cloneFinals ("me", me)))); -var height = this.featurePanel.getComponentCount () * 50 + 60; -height = Math.max (200, height); -height = Math.min (400, height); -var width = 300; -jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.feature_settings"), width, height); -}, "jalview.appletgui.AlignmentPanel"); -Clazz.defineMethod (c$, "PaintComponent", -function (g) { -g.setColor (java.awt.Color.black); -g.drawString (jalview.util.MessageManager.getString ("label.no_features_added_to_this_alignment"), 10, 20); -g.drawString (jalview.util.MessageManager.getString ("label.features_can_be_added_from_searches_1"), 10, 40); -g.drawString (jalview.util.MessageManager.getString ("label.features_can_be_added_from_searches_2"), 10, 60); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "popupSort", -function (check, minmax, x, y) { -var type = check.type; -var typeCol = this.fr.getFeatureStyle (type); -var men = new awt2swing.PopupMenu (jalview.util.MessageManager.formatMessage ("label.settings_for_type", Clazz.newArray (-1, [type]))); -var scr = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sort_by_score")); -men.add (scr); -var me = this; -scr.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$3") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$3, this, Clazz.cloneFinals ("me", me, "type", type)))); -var dens = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sort_by_density")); -dens.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$4") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$4$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$4, this, Clazz.cloneFinals ("me", me, "type", type)))); -men.add (dens); -if (minmax != null) { -var typeMinMax = minmax.get (type); -if (typeMinMax != null && (typeMinMax)[0] != null) { -var mxcol = new awt2swing.MenuItem ((Clazz.instanceOf (typeCol, java.awt.Color)) ? "Graduated Colour" : "Single Colour"); -men.add (mxcol); -mxcol.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$5") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$5$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$5, this, Clazz.cloneFinals ("typeCol", typeCol, "me", me, "type", type, "check", check)))); -}}this.featurePanel.add (men); -men.show (this.featurePanel, x, y); -}, "jalview.appletgui.FeatureSettings.MyCheckbox,java.util.Hashtable,~N,~N"); -Clazz.overrideMethod (c$, "discoverAllFeatureData", -function () { -if (this.fr.getAllFeatureColours () != null && this.fr.getAllFeatureColours ().size () > 0) { -this.rebuildGroups (); -}this.resetTable (false); -}); -Clazz.defineMethod (c$, "rebuildGroups", -function () { -var rdrw = false; -if (this.groupPanel == null) { -this.groupPanel = new awt2swing.Panel (); -} else { -rdrw = true; -this.groupPanel.removeAll (); -}for (var group, $group = this.fr.getFeatureGroups ().iterator (); $group.hasNext () && ((group = $group.next ()) || true);) { -var vis = this.fr.checkGroupVisibility (group, false); -var check = Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings.MyCheckbox, this, null, group, vis, (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (group))); -check.addMouseListener (this); -check.setFont ( new java.awt.Font ("Serif", 1, 12)); -check.addItemListener (this.groupItemListener); -check.setVisible (vis); -this.groupPanel.add (check); -} -if (rdrw) { -this.groupPanel.validate (); -}}); -Clazz.defineMethod (c$, "resetTable", -function (groupsChanged) { -var tmpfeatures; -var group = null; -var type; -var visibleChecks = new java.util.Vector (); -var alignment = this.av.getAlignment (); -for (var i = 0; i < alignment.getHeight (); i++) { -if (alignment.getSequenceAt (i).getSequenceFeatures () == null) { -continue; -}tmpfeatures = alignment.getSequenceAt (i).getSequenceFeatures (); -var index = 0; -while (index < tmpfeatures.length) { -group = tmpfeatures[index].featureGroup; -if (group == null || this.fr.checkGroupVisibility (group, true)) { -type = tmpfeatures[index].getType (); -if (!visibleChecks.contains (type)) { -visibleChecks.addElement (type); -}}index++; -} -} -var comps; -var cSize = this.featurePanel.getComponentCount (); -var check; -for (var i = 0; i < cSize; i++) { -comps = this.featurePanel.getComponents (); -check = comps[i]; -if (!visibleChecks.contains (check.type)) { -this.featurePanel.remove (i); -cSize--; -i--; -}} -if (this.fr.getRenderOrder () != null) { -var rol = this.fr.getRenderOrder (); -for (var ro = rol.size () - 1; ro > -1; ro--) { -var item = rol.get (ro); -if (!visibleChecks.contains (item)) { -continue; -}visibleChecks.removeElement (item); -this.addCheck (false, item); -} -}var en = visibleChecks.elements (); -while (en.hasMoreElements ()) { -this.addCheck (groupsChanged, en.nextElement ().toString ()); -} -this.featurePanel.setLayout ( new java.awt.GridLayout (this.featurePanel.getComponentCount (), 1, 10, 5)); -this.featurePanel.validate (); -if (this.scrollPane != null) { -this.scrollPane.validate (); -}this.itemStateChanged (null); -}, "~B"); -Clazz.defineMethod (c$, "addCheck", -function (groupsChanged, type) { -var addCheck; -var comps = this.featurePanel.getComponents (); -var check; -addCheck = true; -for (var i = 0; i < this.featurePanel.getComponentCount (); i++) { -check = comps[i]; -if (check.type.equals (type)) { -addCheck = false; -break; -}} -if (addCheck) { -var selected = false; -if (groupsChanged || this.av.getFeaturesDisplayed ().isVisible (type)) { -selected = true; -}check = Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings.MyCheckbox, this, null, type, selected, (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (type)), this.fr.getFeatureStyle (type)); -check.addMouseListener (this); -check.addMouseMotionListener (this); -check.addItemListener (this); -if (groupsChanged) { -this.featurePanel.add (check, 0); -} else { -this.featurePanel.add (check); -}}}, "~B,~S"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -for (var i = 0; i < this.featurePanel.getComponentCount (); i++) { -var check = this.featurePanel.getComponent (i); -check.setState (!check.getState ()); -} -this.selectionChanged (); -}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -this.selectionChanged (); -}, "java.awt.event.ItemEvent"); -Clazz.defineMethod (c$, "selectionChanged", -function () { -var comps = this.featurePanel.getComponents (); -var cSize = comps.length; -var tmp = Clazz.newArray (cSize, 3, null); -var tmpSize = 0; -for (var i = 0; i < cSize; i++) { -var check = comps[i]; -tmp[tmpSize][0] = check.type; -tmp[tmpSize][1] = this.fr.getFeatureStyle (check.type); -tmp[tmpSize][2] = new Boolean (check.getState ()); -tmpSize++; -} -var data = Clazz.newArray (tmpSize, 3, null); -System.arraycopy (tmp, 0, data, 0, tmpSize); -this.fr.setFeaturePriority (data); -this.ap.paintAlignment (true); -}); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -this.selectedCheck = evt.getSource (); -if (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (this.selectedCheck.type)) { -if (evt.getX () > this.selectedCheck.stringWidth + 20) { -evt.consume (); -}}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -if ((evt.getSource ()).getParent () !== this.featurePanel) { -return; -}this.dragging = true; -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -if ((evt.getSource ()).getParent () !== this.featurePanel) { -return; -}var comp = null; -var target = null; -var height = evt.getY () + evt.getComponent ().getLocation ().y; -if (height > this.featurePanel.getSize ().height) { -comp = this.featurePanel.getComponent (this.featurePanel.getComponentCount () - 1); -} else if (height < 0) { -comp = this.featurePanel.getComponent (0); -} else { -comp = this.featurePanel.getComponentAt (evt.getX (), evt.getY () + evt.getComponent ().getLocation ().y); -}if (comp != null && Clazz.instanceOf (comp, awt2swing.Checkbox)) { -target = comp; -}if (this.selectedCheck != null && target != null && this.selectedCheck !== target) { -var targetIndex = -1; -for (var i = 0; i < this.featurePanel.getComponentCount (); i++) { -if (target === this.featurePanel.getComponent (i)) { -targetIndex = i; -break; -}} -this.featurePanel.remove (this.selectedCheck); -this.featurePanel.add (this.selectedCheck, targetIndex); -this.featurePanel.validate (); -this.itemStateChanged (null); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "setUserColour", -function (feature, originalColour) { -if (Clazz.instanceOf (originalColour, java.awt.Color) || Clazz.instanceOf (originalColour, jalview.schemes.GraduatedColor)) { -this.fr.setColour (feature, originalColour); -} else { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_unsupported_feature_colour_object")); -}this.refreshTable (); -}, "~S,~O"); -Clazz.defineMethod (c$, "refreshTable", -function () { -this.featurePanel.removeAll (); -this.resetTable (false); -this.ap.paintAlignment (true); -}); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -var check = evt.getSource (); -if ((evt.getModifiers () & 4) != 0) { -this.popupSort (check, this.fr.getMinMax (), evt.getX (), evt.getY ()); -}if (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (check.type)) { -if (evt.getX () > check.stringWidth + 20) { -evt.consume (); -var link = this.fr.featureLinks.get (check.type).toString (); -this.ap.alignFrame.showURL (link.substring (link.indexOf ("|") + 1), link.substring (0, link.indexOf ("|"))); -}}if (check.getParent () !== this.featurePanel) { -return; -}if (evt.getClickCount () > 1) { -var fcol = this.fr.getFeatureStyle (check.type); -if (Clazz.instanceOf (fcol, java.awt.Color)) { - new jalview.appletgui.UserDefinedColours (this, check.type, fcol); -} else { - new jalview.appletgui.FeatureColourChooser (this, check.type); -check.updateColor (this.fr.getFeatureStyle (check.type)); -}}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -this.fr.setTransparency ((100 - this.transparency.getValue ()) / 100); -this.ap.seqPanel.seqCanvas.repaint (); -}, "java.awt.event.AdjustmentEvent"); -c$.$FeatureSettings$MyCheckbox$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.type = null; -this.stringWidth = 0; -this.hasLink = false; -this.gcol = null; -this.col = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui.FeatureSettings, "MyCheckbox", awt2swing.Checkbox); -Clazz.defineMethod (c$, "updateColor", -function (a) { -if (Clazz.instanceOf (a, java.awt.Color)) { -this.col = a; -this.gcol = null; -} else if (Clazz.instanceOf (a, jalview.schemes.GraduatedColor)) { -this.gcol = a; -this.col = null; -} else { -throw new Error (jalview.util.MessageManager.getString ("error.invalid_colour_for_mycheckbox")); -}if (this.col != null) { -this.setBackground (this.col); -} else { -var b = this.type; -if (this.gcol.getThreshType () != -1) { -b += " " + ((this.gcol.getThreshType () == 1) ? "(>)" : "(<)"); -}if (this.gcol.isColourByLabel ()) { -this.setBackground (java.awt.Color.white); -b += " (by Label)"; -} else { -this.setBackground (this.gcol.getMinColor ()); -}this.setLabel (b); -}this.repaint (); -}, "~O"); -Clazz.makeConstructor (c$, -function (a, b, c) { -Clazz.superConstructor (this, jalview.appletgui.FeatureSettings.MyCheckbox, [a, b]); -this.type = a; -var d = this.b$["jalview.appletgui.FeatureSettings"].av.nullFrame.getFontMetrics (this.b$["jalview.appletgui.FeatureSettings"].av.nullFrame.getFont ()); -this.stringWidth = d.stringWidth (a); -this.hasLink = c; -}, "~S,~B,~B"); -Clazz.makeConstructor (c$, -function (a, b, c, d) { -this.construct (a, b, c); -this.updateColor (d); -}, "~S,~B,~B,~O"); -Clazz.defineMethod (c$, "PaintComponent", -function (a) { -var b = this.getSize (); -if (this.gcol != null) { -if (this.gcol.isColourByLabel ()) { -a.setColor (java.awt.Color.white); -a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); -} else { -var c = this.gcol.getMaxColor (); -a.setColor (c); -a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); -}}if (this.hasLink) { -a.drawImage (this.b$["jalview.appletgui.FeatureSettings"].linkImage, this.stringWidth + 25, Clazz.doubleToInt ((this.getSize ().height - this.b$["jalview.appletgui.FeatureSettings"].linkImage.getHeight (this)) / 2), this); -}}, "java.awt.Graphics"); -c$ = Clazz.p0p (); -}; -c$.$FeatureSettings$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$1", null, java.awt.event.ItemListener); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -var source = evt.getSource (); -this.b$["jalview.appletgui.FeatureSettings"].fr.setGroupVisibility (source.getLabel (), source.getState ()); -this.b$["jalview.appletgui.FeatureSettings"].ap.seqPanel.seqCanvas.repaint (); -if (this.b$["jalview.appletgui.FeatureSettings"].ap.overviewPanel != null) { -this.b$["jalview.appletgui.FeatureSettings"].ap.overviewPanel.updateOverviewImage (); -}this.b$["jalview.appletgui.FeatureSettings"].resetTable (true); -return; -}, "java.awt.event.ItemEvent"); -c$ = Clazz.p0p (); -}; -c$.$FeatureSettings$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$2", java.awt.event.WindowAdapter); -Clazz.overrideMethod (c$, "windowClosing", -function (e) { -if (this.f$.me.av.featureSettings === this.f$.me) { -this.f$.me.av.featureSettings = null; -this.f$.me.ap = null; -this.f$.me.av = null; -}}, "java.awt.event.WindowEvent"); -c$ = Clazz.p0p (); -}; -c$.$FeatureSettings$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$3", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.f$.me.ap.alignFrame.avc.sortAlignmentByFeatureScore ( Clazz.newArray (-1, [this.f$.type])); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$FeatureSettings$4$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$4", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.f$.me.ap.alignFrame.avc.sortAlignmentByFeatureDensity ( Clazz.newArray (-1, [this.f$.type])); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$FeatureSettings$5$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$5", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -if (Clazz.instanceOf (this.f$.typeCol, java.awt.Color)) { - new jalview.appletgui.FeatureColourChooser (this.f$.me, this.f$.type); -this.f$.check.updateColor (this.b$["jalview.appletgui.FeatureSettings"].fr.getFeatureStyle (this.f$.type)); -} else { - new jalview.appletgui.UserDefinedColours (this.f$.me, this.f$.check.type, (this.f$.typeCol)); -}}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Checkbox", "$.Panel", "jalview.api.FeatureSettingsControllerI", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.ItemListener", "$.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.FeatureSettings", ["awt2swing.Button", "$.Frame", "$.Label", "$.MenuItem", "$.PopupMenu", "$.ScrollPane", "$.Scrollbar", "jalview.appletgui.FeatureColourChooser", "$.UserDefinedColours", "jalview.bin.JalviewLite", "jalview.schemes.GraduatedColor", "jalview.util.MessageManager", "java.awt.BorderLayout", "$.Color", "$.Font", "$.GridLayout", "$.Toolkit", "java.awt.event.WindowAdapter", "java.lang.Boolean", "$.Error", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fr = null; +this.ap = null; +this.av = null; +this.frame = null; +this.groupPanel = null; +this.featurePanel = null; +this.scrollPane = null; +this.linkImage = null; +this.transparency = null; +this.groupItemListener = null; +this.selectedCheck = null; +this.dragging = false; +if (!Clazz.isClassDefined ("jalview.appletgui.FeatureSettings.MyCheckbox")) { +jalview.appletgui.FeatureSettings.$FeatureSettings$MyCheckbox$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "FeatureSettings", awt2swing.Panel, [java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener, java.awt.event.AdjustmentListener, jalview.api.FeatureSettingsControllerI]); +Clazz.prepareFields (c$, function () { +this.featurePanel = new awt2swing.Panel (); +this.groupItemListener = ((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$1") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$1, this, null)); +}); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.FeatureSettings, []); +this.ap = ap; +this.av = ap.av; +ap.av.featureSettings = this; +this.fr = ap.seqPanel.seqCanvas.getFeatureRenderer (); +this.transparency = new awt2swing.Scrollbar (0, 100 - Clazz.floatToInt (this.fr.getTransparency () * 100), 1, 1, 100); +if (this.fr.isTransparencyAvailable ()) { +this.transparency.addAdjustmentListener (this); +} else { +this.transparency.setEnabled (false); +}var url = this.getClass ().getResource ("/images/link.gif"); +if (url != null) { +this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url); +}if (this.av.isShowSequenceFeatures () || !this.fr.hasRenderOrder ()) { +this.fr.findAllFeatures (true); +}this.discoverAllFeatureData (); +this.setLayout ( new java.awt.BorderLayout ()); +this.scrollPane = new awt2swing.ScrollPane (); +this.scrollPane.add (this.featurePanel); +if (this.fr.getAllFeatureColours () != null && this.fr.getAllFeatureColours ().size () > 0) { +this.add (this.scrollPane, "Center"); +}var invert = new awt2swing.Button ("Invert Selection"); +invert.addActionListener (this); +var lowerPanel = new awt2swing.Panel ( new java.awt.GridLayout (2, 1, 5, 10)); +lowerPanel.add (invert); +var tPanel = new awt2swing.Panel ( new java.awt.BorderLayout ()); +if (this.fr.isTransparencyAvailable ()) { +tPanel.add (this.transparency, "Center"); +tPanel.add ( new awt2swing.Label ("Transparency"), "East"); +} else { +tPanel.add ( new awt2swing.Label ("Transparency not available in this web browser"), "Center"); +}lowerPanel.add (tPanel, "South"); +this.add (lowerPanel, "South"); +if (this.groupPanel != null) { +this.groupPanel.setLayout ( new java.awt.GridLayout (Clazz.doubleToInt ((this.fr.getFeatureGroupsSize ()) / 4) + 1, 4)); +this.groupPanel.validate (); +this.add (this.groupPanel, "North"); +}this.frame = new awt2swing.Frame (); +this.frame.add (this); +var me = this; +this.frame.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$2") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$2, this, Clazz.cloneFinals ("me", me)))); +var height = this.featurePanel.getComponentCount () * 50 + 60; +height = Math.max (200, height); +height = Math.min (400, height); +var width = 300; +jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.feature_settings"), width, height); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.defineMethod (c$, "PaintComponent", +function (g) { +g.setColor (java.awt.Color.black); +g.drawString (jalview.util.MessageManager.getString ("label.no_features_added_to_this_alignment"), 10, 20); +g.drawString (jalview.util.MessageManager.getString ("label.features_can_be_added_from_searches_1"), 10, 40); +g.drawString (jalview.util.MessageManager.getString ("label.features_can_be_added_from_searches_2"), 10, 60); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "popupSort", +function (check, minmax, x, y) { +var type = check.type; +var typeCol = this.fr.getFeatureStyle (type); +var men = new awt2swing.PopupMenu (jalview.util.MessageManager.formatMessage ("label.settings_for_type", Clazz.newArray (-1, [type]))); +var scr = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sort_by_score")); +men.add (scr); +var me = this; +scr.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$3") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$3, this, Clazz.cloneFinals ("me", me, "type", type)))); +var dens = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.sort_by_density")); +dens.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$4") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$4$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$4, this, Clazz.cloneFinals ("me", me, "type", type)))); +men.add (dens); +if (minmax != null) { +var typeMinMax = minmax.get (type); +if (typeMinMax != null && (typeMinMax)[0] != null) { +var mxcol = new awt2swing.MenuItem ((Clazz.instanceOf (typeCol, java.awt.Color)) ? "Graduated Colour" : "Single Colour"); +men.add (mxcol); +mxcol.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FeatureSettings$5") ? 0 : jalview.appletgui.FeatureSettings.$FeatureSettings$5$ ()), Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings$5, this, Clazz.cloneFinals ("typeCol", typeCol, "me", me, "type", type, "check", check)))); +}}this.featurePanel.add (men); +men.show (this.featurePanel, x, y); +}, "jalview.appletgui.FeatureSettings.MyCheckbox,java.util.Hashtable,~N,~N"); +Clazz.overrideMethod (c$, "discoverAllFeatureData", +function () { +if (this.fr.getAllFeatureColours () != null && this.fr.getAllFeatureColours ().size () > 0) { +this.rebuildGroups (); +}this.resetTable (false); +}); +Clazz.defineMethod (c$, "rebuildGroups", +function () { +var rdrw = false; +if (this.groupPanel == null) { +this.groupPanel = new awt2swing.Panel (); +} else { +rdrw = true; +this.groupPanel.removeAll (); +}for (var group, $group = this.fr.getFeatureGroups ().iterator (); $group.hasNext () && ((group = $group.next ()) || true);) { +var vis = this.fr.checkGroupVisibility (group, false); +var check = Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings.MyCheckbox, this, null, group, vis, (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (group))); +check.addMouseListener (this); +check.setFont ( new java.awt.Font ("Serif", 1, 12)); +check.addItemListener (this.groupItemListener); +check.setVisible (vis); +this.groupPanel.add (check); +} +if (rdrw) { +this.groupPanel.validate (); +}}); +Clazz.defineMethod (c$, "resetTable", +function (groupsChanged) { +var tmpfeatures; +var group = null; +var type; +var visibleChecks = new java.util.Vector (); +var alignment = this.av.getAlignment (); +for (var i = 0; i < alignment.getHeight (); i++) { +if (alignment.getSequenceAt (i).getSequenceFeatures () == null) { +continue; +}tmpfeatures = alignment.getSequenceAt (i).getSequenceFeatures (); +var index = 0; +while (index < tmpfeatures.length) { +group = tmpfeatures[index].featureGroup; +if (group == null || this.fr.checkGroupVisibility (group, true)) { +type = tmpfeatures[index].getType (); +if (!visibleChecks.contains (type)) { +visibleChecks.addElement (type); +}}index++; +} +} +var comps; +var cSize = this.featurePanel.getComponentCount (); +var check; +for (var i = 0; i < cSize; i++) { +comps = this.featurePanel.getComponents (); +check = comps[i]; +if (!visibleChecks.contains (check.type)) { +this.featurePanel.remove (i); +cSize--; +i--; +}} +if (this.fr.getRenderOrder () != null) { +var rol = this.fr.getRenderOrder (); +for (var ro = rol.size () - 1; ro > -1; ro--) { +var item = rol.get (ro); +if (!visibleChecks.contains (item)) { +continue; +}visibleChecks.removeElement (item); +this.addCheck (false, item); +} +}var en = visibleChecks.elements (); +while (en.hasMoreElements ()) { +this.addCheck (groupsChanged, en.nextElement ().toString ()); +} +this.featurePanel.setLayout ( new java.awt.GridLayout (this.featurePanel.getComponentCount (), 1, 10, 5)); +this.featurePanel.validate (); +if (this.scrollPane != null) { +this.scrollPane.validate (); +}this.itemStateChanged (null); +}, "~B"); +Clazz.defineMethod (c$, "addCheck", +function (groupsChanged, type) { +var addCheck; +var comps = this.featurePanel.getComponents (); +var check; +addCheck = true; +for (var i = 0; i < this.featurePanel.getComponentCount (); i++) { +check = comps[i]; +if (check.type.equals (type)) { +addCheck = false; +break; +}} +if (addCheck) { +var selected = false; +if (groupsChanged || this.av.getFeaturesDisplayed ().isVisible (type)) { +selected = true; +}check = Clazz.innerTypeInstance (jalview.appletgui.FeatureSettings.MyCheckbox, this, null, type, selected, (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (type)), this.fr.getFeatureStyle (type)); +check.addMouseListener (this); +check.addMouseMotionListener (this); +check.addItemListener (this); +if (groupsChanged) { +this.featurePanel.add (check, 0); +} else { +this.featurePanel.add (check); +}}}, "~B,~S"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +for (var i = 0; i < this.featurePanel.getComponentCount (); i++) { +var check = this.featurePanel.getComponent (i); +check.setState (!check.getState ()); +} +this.selectionChanged (); +}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +this.selectionChanged (); +}, "java.awt.event.ItemEvent"); +Clazz.defineMethod (c$, "selectionChanged", +function () { +var comps = this.featurePanel.getComponents (); +var cSize = comps.length; +var tmp = Clazz.newArray (cSize, 3, null); +var tmpSize = 0; +for (var i = 0; i < cSize; i++) { +var check = comps[i]; +tmp[tmpSize][0] = check.type; +tmp[tmpSize][1] = this.fr.getFeatureStyle (check.type); +tmp[tmpSize][2] = new Boolean (check.getState ()); +tmpSize++; +} +var data = Clazz.newArray (tmpSize, 3, null); +System.arraycopy (tmp, 0, data, 0, tmpSize); +this.fr.setFeaturePriority (data); +this.ap.paintAlignment (true); +}); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +this.selectedCheck = evt.getSource (); +if (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (this.selectedCheck.type)) { +if (evt.getX () > this.selectedCheck.stringWidth + 20) { +evt.consume (); +}}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +if ((evt.getSource ()).getParent () !== this.featurePanel) { +return; +}this.dragging = true; +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +if ((evt.getSource ()).getParent () !== this.featurePanel) { +return; +}var comp = null; +var target = null; +var height = evt.getY () + evt.getComponent ().getLocation ().y; +if (height > this.featurePanel.getSize ().height) { +comp = this.featurePanel.getComponent (this.featurePanel.getComponentCount () - 1); +} else if (height < 0) { +comp = this.featurePanel.getComponent (0); +} else { +comp = this.featurePanel.getComponentAt (evt.getX (), evt.getY () + evt.getComponent ().getLocation ().y); +}if (comp != null && Clazz.instanceOf (comp, awt2swing.Checkbox)) { +target = comp; +}if (this.selectedCheck != null && target != null && this.selectedCheck !== target) { +var targetIndex = -1; +for (var i = 0; i < this.featurePanel.getComponentCount (); i++) { +if (target === this.featurePanel.getComponent (i)) { +targetIndex = i; +break; +}} +this.featurePanel.remove (this.selectedCheck); +this.featurePanel.add (this.selectedCheck, targetIndex); +this.featurePanel.validate (); +this.itemStateChanged (null); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "setUserColour", +function (feature, originalColour) { +if (Clazz.instanceOf (originalColour, java.awt.Color) || Clazz.instanceOf (originalColour, jalview.schemes.GraduatedColor)) { +this.fr.setColour (feature, originalColour); +} else { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_unsupported_feature_colour_object")); +}this.refreshTable (); +}, "~S,~O"); +Clazz.defineMethod (c$, "refreshTable", +function () { +this.featurePanel.removeAll (); +this.resetTable (false); +this.ap.paintAlignment (true); +}); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +var check = evt.getSource (); +if ((evt.getModifiers () & 4) != 0) { +this.popupSort (check, this.fr.getMinMax (), evt.getX (), evt.getY ()); +}if (this.fr.featureLinks != null && this.fr.featureLinks.containsKey (check.type)) { +if (evt.getX () > check.stringWidth + 20) { +evt.consume (); +var link = this.fr.featureLinks.get (check.type).toString (); +this.ap.alignFrame.showURL (link.substring (link.indexOf ("|") + 1), link.substring (0, link.indexOf ("|"))); +}}if (check.getParent () !== this.featurePanel) { +return; +}if (evt.getClickCount () > 1) { +var fcol = this.fr.getFeatureStyle (check.type); +if (Clazz.instanceOf (fcol, java.awt.Color)) { + new jalview.appletgui.UserDefinedColours (this, check.type, fcol); +} else { + new jalview.appletgui.FeatureColourChooser (this, check.type); +check.updateColor (this.fr.getFeatureStyle (check.type)); +}}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +this.fr.setTransparency ((100 - this.transparency.getValue ()) / 100); +this.ap.seqPanel.seqCanvas.repaint (); +}, "java.awt.event.AdjustmentEvent"); +c$.$FeatureSettings$MyCheckbox$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.type = null; +this.stringWidth = 0; +this.hasLink = false; +this.gcol = null; +this.col = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui.FeatureSettings, "MyCheckbox", awt2swing.Checkbox); +Clazz.defineMethod (c$, "updateColor", +function (a) { +if (Clazz.instanceOf (a, java.awt.Color)) { +this.col = a; +this.gcol = null; +} else if (Clazz.instanceOf (a, jalview.schemes.GraduatedColor)) { +this.gcol = a; +this.col = null; +} else { +throw new Error (jalview.util.MessageManager.getString ("error.invalid_colour_for_mycheckbox")); +}if (this.col != null) { +this.setBackground (this.col); +} else { +var b = this.type; +if (this.gcol.getThreshType () != -1) { +b += " " + ((this.gcol.getThreshType () == 1) ? "(>)" : "(<)"); +}if (this.gcol.isColourByLabel ()) { +this.setBackground (java.awt.Color.white); +b += " (by Label)"; +} else { +this.setBackground (this.gcol.getMinColor ()); +}this.setLabel (b); +}this.repaint (); +}, "~O"); +Clazz.makeConstructor (c$, +function (a, b, c) { +Clazz.superConstructor (this, jalview.appletgui.FeatureSettings.MyCheckbox, [a, b]); +this.type = a; +var d = this.b$["jalview.appletgui.FeatureSettings"].av.nullFrame.getFontMetrics (this.b$["jalview.appletgui.FeatureSettings"].av.nullFrame.getFont ()); +this.stringWidth = d.stringWidth (a); +this.hasLink = c; +}, "~S,~B,~B"); +Clazz.makeConstructor (c$, +function (a, b, c, d) { +this.construct (a, b, c); +this.updateColor (d); +}, "~S,~B,~B,~O"); +Clazz.defineMethod (c$, "PaintComponent", +function (a) { +var b = this.getSize (); +if (this.gcol != null) { +if (this.gcol.isColourByLabel ()) { +a.setColor (java.awt.Color.white); +a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); +} else { +var c = this.gcol.getMaxColor (); +a.setColor (c); +a.fillRect (Clazz.doubleToInt (b.width / 2), 0, Clazz.doubleToInt (b.width / 2), b.height); +}}if (this.hasLink) { +a.drawImage (this.b$["jalview.appletgui.FeatureSettings"].linkImage, this.stringWidth + 25, Clazz.doubleToInt ((this.getSize ().height - this.b$["jalview.appletgui.FeatureSettings"].linkImage.getHeight (this)) / 2), this); +}}, "java.awt.Graphics"); +c$ = Clazz.p0p (); +}; +c$.$FeatureSettings$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$1", null, java.awt.event.ItemListener); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +var source = evt.getSource (); +this.b$["jalview.appletgui.FeatureSettings"].fr.setGroupVisibility (source.getLabel (), source.getState ()); +this.b$["jalview.appletgui.FeatureSettings"].ap.seqPanel.seqCanvas.repaint (); +if (this.b$["jalview.appletgui.FeatureSettings"].ap.overviewPanel != null) { +this.b$["jalview.appletgui.FeatureSettings"].ap.overviewPanel.updateOverviewImage (); +}this.b$["jalview.appletgui.FeatureSettings"].resetTable (true); +return; +}, "java.awt.event.ItemEvent"); +c$ = Clazz.p0p (); +}; +c$.$FeatureSettings$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$2", java.awt.event.WindowAdapter); +Clazz.overrideMethod (c$, "windowClosing", +function (e) { +if (this.f$.me.av.featureSettings === this.f$.me) { +this.f$.me.av.featureSettings = null; +this.f$.me.ap = null; +this.f$.me.av = null; +}}, "java.awt.event.WindowEvent"); +c$ = Clazz.p0p (); +}; +c$.$FeatureSettings$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$3", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.f$.me.ap.alignFrame.avc.sortAlignmentByFeatureScore ( Clazz.newArray (-1, [this.f$.type])); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$FeatureSettings$4$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$4", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.f$.me.ap.alignFrame.avc.sortAlignmentByFeatureDensity ( Clazz.newArray (-1, [this.f$.type])); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$FeatureSettings$5$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FeatureSettings$5", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +if (Clazz.instanceOf (this.f$.typeCol, java.awt.Color)) { + new jalview.appletgui.FeatureColourChooser (this.f$.me, this.f$.type); +this.f$.check.updateColor (this.b$["jalview.appletgui.FeatureSettings"].fr.getFeatureStyle (this.f$.type)); +} else { + new jalview.appletgui.UserDefinedColours (this.f$.me, this.f$.check.type, (this.f$.typeCol)); +}}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/Finder.js b/bin/jalview/appletgui/Finder.js index d64e048..22e3c84 100644 --- a/bin/jalview/appletgui/Finder.js +++ b/bin/jalview/appletgui/Finder.js @@ -1,184 +1,184 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "awt2swing.Button", "$.Checkbox", "$.Label", "$.TextField", "java.awt.GridLayout"], "jalview.appletgui.Finder", ["awt2swing.Frame", "jalview.analysis.Finder", "jalview.bin.JalviewLite", "jalview.datamodel.SequenceFeature", "jalview.util.MessageManager", "java.awt.Font", "$.Rectangle", "java.awt.event.KeyAdapter", "$.WindowAdapter"], function () { -c$ = Clazz.decorateAsClass (function () { -this.av = null; -this.ap = null; -this.frame = null; -this.searchResults = null; -this.seqIndex = 0; -this.resIndex = -1; -this.jLabel1 = null; -this.textfield = null; -this.findAll = null; -this.findNext = null; -this.actionsPanel = null; -this.gridLayout1 = null; -this.createNewGroup = null; -this.caseSensitive = null; -this.searchDescription = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "Finder", awt2swing.Panel, java.awt.event.ActionListener); -Clazz.prepareFields (c$, function () { -this.jLabel1 = new awt2swing.Label (); -this.textfield = new awt2swing.TextField (); -this.findAll = new awt2swing.Button (); -this.findNext = new awt2swing.Button (); -this.actionsPanel = new awt2swing.Panel (); -this.gridLayout1 = new java.awt.GridLayout (); -this.createNewGroup = new awt2swing.Button (); -this.caseSensitive = new awt2swing.Checkbox (); -this.searchDescription = new awt2swing.Checkbox (); -}); -Clazz.makeConstructor (c$, -function (ap) { -Clazz.superConstructor (this, jalview.appletgui.Finder, []); -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -this.av = ap.av; -this.ap = ap; -this.frame = new awt2swing.Frame (); -this.frame.add (this); -jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("action.find"), 340, 120); -this.frame.repaint (); -this.frame.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.Finder$1") ? 0 : jalview.appletgui.Finder.$Finder$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.Finder$1, this, Clazz.cloneFinals ("ap", ap)))); -this.textfield.requestFocus (); -}, "jalview.appletgui.AlignmentPanel"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.textfield) { -this.doSearch (false); -} else if (evt.getSource () === this.findNext) { -this.doSearch (false); -} else if (evt.getSource () === this.findAll) { -this.resIndex = -1; -this.seqIndex = 0; -this.doSearch (true); -} else if (evt.getSource () === this.createNewGroup) { -this.createNewGroup_actionPerformed (); -}}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "createNewGroup_actionPerformed", -function () { -var seqs = new Array (this.searchResults.getSize ()); -var features = new Array (this.searchResults.getSize ()); -for (var i = 0; i < this.searchResults.getSize (); i++) { -seqs[i] = this.searchResults.getResultSequence (i); -features[i] = new jalview.datamodel.SequenceFeature (this.textfield.getText ().trim (), "Search Results", null, this.searchResults.getResultStart (i), this.searchResults.getResultEnd (i), "Search Results"); -} -if (this.ap.seqPanel.seqCanvas.getFeatureRenderer ().amendFeatures (seqs, features, true, this.ap)) { -this.ap.alignFrame.sequenceFeatures.setState (true); -this.av.setShowSequenceFeatures (true); -this.ap.highlightSearchResults (null); -}}); -Clazz.defineMethod (c$, "doSearch", -function (findAll) { -if (this.ap.av.applet.currentAlignFrame != null) { -this.ap = this.ap.av.applet.currentAlignFrame.alignPanel; -this.av = this.ap.av; -}this.createNewGroup.setEnabled (false); -var finder = new jalview.analysis.Finder (this.av.getAlignment (), this.av.getSelectionGroup (), this.seqIndex, this.resIndex); -finder.setCaseSensitive (this.caseSensitive.getState ()); -finder.setIncludeDescription (this.searchDescription.getState ()); -finder.setFindAll (findAll); -var searchString = this.textfield.getText (); -finder.find (searchString); -this.seqIndex = finder.getSeqIndex (); -this.resIndex = finder.getResIndex (); -this.searchResults = finder.getSearchResults (); -var idMatch = finder.getIdMatch (); -var haveResults = false; -if ((idMatch.size () > 0)) { -haveResults = true; -this.ap.idPanel.highlightSearchResults (idMatch); -} else { -this.ap.idPanel.highlightSearchResults (null); -}if (this.searchResults.getSize () > 0) { -haveResults = true; -this.createNewGroup.setEnabled (true); -} else { -this.searchResults = null; -}this.ap.highlightSearchResults (this.searchResults); -if (!haveResults) { -this.ap.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.finished_searching")); -this.resIndex = -1; -this.seqIndex = 0; -} else { -if (findAll) { -var message = (idMatch.size () > 0) ? "" + idMatch.size () + " IDs" : ""; -if (idMatch.size () > 0 && this.searchResults != null && this.searchResults.getSize () > 0) { -message += " and "; -}if (this.searchResults != null) { -message += this.searchResults.getSize () + " subsequence matches."; -}this.ap.alignFrame.setStatus (jalview.util.MessageManager.formatMessage ("label.search_results", Clazz.newArray (-1, [searchString, message]))); -} else { -this.ap.alignFrame.setStatus (jalview.util.MessageManager.formatMessage ("label.found_match_for", Clazz.newArray (-1, [searchString]))); -}}}, "~B"); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.jLabel1.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.jLabel1.setText (jalview.util.MessageManager.getString ("action.find")); -this.jLabel1.setBounds ( new java.awt.Rectangle (3, 30, 34, 15)); -this.setLayout (null); -this.textfield.setFont ( new java.awt.Font ("Verdana", 0, 10)); -this.textfield.setText (""); -this.textfield.setBounds ( new java.awt.Rectangle (40, 17, 133, 21)); -this.textfield.addKeyListener (((Clazz.isClassDefined ("jalview.appletgui.Finder$2") ? 0 : jalview.appletgui.Finder.$Finder$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.Finder$2, this, null))); -this.textfield.addActionListener (this); -this.findAll.setFont ( new java.awt.Font ("Verdana", 0, 10)); -this.findAll.setLabel (jalview.util.MessageManager.getString ("action.find_all")); -this.findAll.addActionListener (this); -this.findNext.setEnabled (false); -this.findNext.setFont ( new java.awt.Font ("Verdana", 0, 10)); -this.findNext.setLabel (jalview.util.MessageManager.getString ("action.find_next")); -this.findNext.addActionListener (this); -this.actionsPanel.setBounds ( new java.awt.Rectangle (195, 5, 141, 64)); -this.actionsPanel.setLayout (this.gridLayout1); -this.gridLayout1.setHgap (0); -this.gridLayout1.setRows (3); -this.gridLayout1.setVgap (2); -this.createNewGroup.setEnabled (false); -this.createNewGroup.setFont ( new java.awt.Font ("Verdana", 0, 10)); -this.createNewGroup.setLabel (jalview.util.MessageManager.getString ("label.new_feature")); -this.createNewGroup.addActionListener (this); -this.caseSensitive.setLabel (jalview.util.MessageManager.getString ("label.match_case")); -this.caseSensitive.setBounds ( new java.awt.Rectangle (30, 39, 126, 23)); -this.searchDescription.setLabel (jalview.util.MessageManager.getString ("label.include_description")); -this.searchDescription.setBounds ( new java.awt.Rectangle (30, 59, 170, 23)); -this.actionsPanel.add (this.findNext, null); -this.actionsPanel.add (this.findAll, null); -this.actionsPanel.add (this.createNewGroup, null); -this.add (this.caseSensitive); -this.add (this.textfield, null); -this.add (this.jLabel1, null); -this.add (this.actionsPanel, null); -this.add (this.searchDescription); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "textfield_keyTyped", -function (e) { -this.findNext.setEnabled (true); -}, "java.awt.event.KeyEvent"); -c$.$Finder$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "Finder$1", java.awt.event.WindowAdapter); -Clazz.overrideMethod (c$, "windowClosing", -function (evt) { -this.f$.ap.highlightSearchResults (null); -}, "java.awt.event.WindowEvent"); -c$ = Clazz.p0p (); -}; -c$.$Finder$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "Finder$2", java.awt.event.KeyAdapter); -Clazz.overrideMethod (c$, "keyTyped", -function (e) { -this.b$["jalview.appletgui.Finder"].textfield_keyTyped (e); -}, "java.awt.event.KeyEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "awt2swing.Button", "$.Checkbox", "$.Label", "$.TextField", "java.awt.GridLayout"], "jalview.appletgui.Finder", ["awt2swing.Frame", "jalview.analysis.Finder", "jalview.bin.JalviewLite", "jalview.datamodel.SequenceFeature", "jalview.util.MessageManager", "java.awt.Font", "$.Rectangle", "java.awt.event.KeyAdapter", "$.WindowAdapter"], function () { +c$ = Clazz.decorateAsClass (function () { +this.av = null; +this.ap = null; +this.frame = null; +this.searchResults = null; +this.seqIndex = 0; +this.resIndex = -1; +this.jLabel1 = null; +this.textfield = null; +this.findAll = null; +this.findNext = null; +this.actionsPanel = null; +this.gridLayout1 = null; +this.createNewGroup = null; +this.caseSensitive = null; +this.searchDescription = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "Finder", awt2swing.Panel, java.awt.event.ActionListener); +Clazz.prepareFields (c$, function () { +this.jLabel1 = new awt2swing.Label (); +this.textfield = new awt2swing.TextField (); +this.findAll = new awt2swing.Button (); +this.findNext = new awt2swing.Button (); +this.actionsPanel = new awt2swing.Panel (); +this.gridLayout1 = new java.awt.GridLayout (); +this.createNewGroup = new awt2swing.Button (); +this.caseSensitive = new awt2swing.Checkbox (); +this.searchDescription = new awt2swing.Checkbox (); +}); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.Finder, []); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.av = ap.av; +this.ap = ap; +this.frame = new awt2swing.Frame (); +this.frame.add (this); +jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("action.find"), 340, 120); +this.frame.repaint (); +this.frame.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.Finder$1") ? 0 : jalview.appletgui.Finder.$Finder$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.Finder$1, this, Clazz.cloneFinals ("ap", ap)))); +this.textfield.requestFocus (); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.textfield) { +this.doSearch (false); +} else if (evt.getSource () === this.findNext) { +this.doSearch (false); +} else if (evt.getSource () === this.findAll) { +this.resIndex = -1; +this.seqIndex = 0; +this.doSearch (true); +} else if (evt.getSource () === this.createNewGroup) { +this.createNewGroup_actionPerformed (); +}}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "createNewGroup_actionPerformed", +function () { +var seqs = new Array (this.searchResults.getSize ()); +var features = new Array (this.searchResults.getSize ()); +for (var i = 0; i < this.searchResults.getSize (); i++) { +seqs[i] = this.searchResults.getResultSequence (i); +features[i] = new jalview.datamodel.SequenceFeature (this.textfield.getText ().trim (), "Search Results", null, this.searchResults.getResultStart (i), this.searchResults.getResultEnd (i), "Search Results"); +} +if (this.ap.seqPanel.seqCanvas.getFeatureRenderer ().amendFeatures (seqs, features, true, this.ap)) { +this.ap.alignFrame.sequenceFeatures.setState (true); +this.av.setShowSequenceFeatures (true); +this.ap.highlightSearchResults (null); +}}); +Clazz.defineMethod (c$, "doSearch", +function (findAll) { +if (this.ap.av.applet.currentAlignFrame != null) { +this.ap = this.ap.av.applet.currentAlignFrame.alignPanel; +this.av = this.ap.av; +}this.createNewGroup.setEnabled (false); +var finder = new jalview.analysis.Finder (this.av.getAlignment (), this.av.getSelectionGroup (), this.seqIndex, this.resIndex); +finder.setCaseSensitive (this.caseSensitive.getState ()); +finder.setIncludeDescription (this.searchDescription.getState ()); +finder.setFindAll (findAll); +var searchString = this.textfield.getText (); +finder.find (searchString); +this.seqIndex = finder.getSeqIndex (); +this.resIndex = finder.getResIndex (); +this.searchResults = finder.getSearchResults (); +var idMatch = finder.getIdMatch (); +var haveResults = false; +if ((idMatch.size () > 0)) { +haveResults = true; +this.ap.idPanel.highlightSearchResults (idMatch); +} else { +this.ap.idPanel.highlightSearchResults (null); +}if (this.searchResults.getSize () > 0) { +haveResults = true; +this.createNewGroup.setEnabled (true); +} else { +this.searchResults = null; +}this.ap.highlightSearchResults (this.searchResults); +if (!haveResults) { +this.ap.alignFrame.setStatus (jalview.util.MessageManager.getString ("label.finished_searching")); +this.resIndex = -1; +this.seqIndex = 0; +} else { +if (findAll) { +var message = (idMatch.size () > 0) ? "" + idMatch.size () + " IDs" : ""; +if (idMatch.size () > 0 && this.searchResults != null && this.searchResults.getSize () > 0) { +message += " and "; +}if (this.searchResults != null) { +message += this.searchResults.getSize () + " subsequence matches."; +}this.ap.alignFrame.setStatus (jalview.util.MessageManager.formatMessage ("label.search_results", Clazz.newArray (-1, [searchString, message]))); +} else { +this.ap.alignFrame.setStatus (jalview.util.MessageManager.formatMessage ("label.found_match_for", Clazz.newArray (-1, [searchString]))); +}}}, "~B"); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.jLabel1.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.jLabel1.setText (jalview.util.MessageManager.getString ("action.find")); +this.jLabel1.setBounds ( new java.awt.Rectangle (3, 30, 34, 15)); +this.setLayout (null); +this.textfield.setFont ( new java.awt.Font ("Verdana", 0, 10)); +this.textfield.setText (""); +this.textfield.setBounds ( new java.awt.Rectangle (40, 17, 133, 21)); +this.textfield.addKeyListener (((Clazz.isClassDefined ("jalview.appletgui.Finder$2") ? 0 : jalview.appletgui.Finder.$Finder$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.Finder$2, this, null))); +this.textfield.addActionListener (this); +this.findAll.setFont ( new java.awt.Font ("Verdana", 0, 10)); +this.findAll.setLabel (jalview.util.MessageManager.getString ("action.find_all")); +this.findAll.addActionListener (this); +this.findNext.setEnabled (false); +this.findNext.setFont ( new java.awt.Font ("Verdana", 0, 10)); +this.findNext.setLabel (jalview.util.MessageManager.getString ("action.find_next")); +this.findNext.addActionListener (this); +this.actionsPanel.setBounds ( new java.awt.Rectangle (195, 5, 141, 64)); +this.actionsPanel.setLayout (this.gridLayout1); +this.gridLayout1.setHgap (0); +this.gridLayout1.setRows (3); +this.gridLayout1.setVgap (2); +this.createNewGroup.setEnabled (false); +this.createNewGroup.setFont ( new java.awt.Font ("Verdana", 0, 10)); +this.createNewGroup.setLabel (jalview.util.MessageManager.getString ("label.new_feature")); +this.createNewGroup.addActionListener (this); +this.caseSensitive.setLabel (jalview.util.MessageManager.getString ("label.match_case")); +this.caseSensitive.setBounds ( new java.awt.Rectangle (30, 39, 126, 23)); +this.searchDescription.setLabel (jalview.util.MessageManager.getString ("label.include_description")); +this.searchDescription.setBounds ( new java.awt.Rectangle (30, 59, 170, 23)); +this.actionsPanel.add (this.findNext, null); +this.actionsPanel.add (this.findAll, null); +this.actionsPanel.add (this.createNewGroup, null); +this.add (this.caseSensitive); +this.add (this.textfield, null); +this.add (this.jLabel1, null); +this.add (this.actionsPanel, null); +this.add (this.searchDescription); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "textfield_keyTyped", +function (e) { +this.findNext.setEnabled (true); +}, "java.awt.event.KeyEvent"); +c$.$Finder$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "Finder$1", java.awt.event.WindowAdapter); +Clazz.overrideMethod (c$, "windowClosing", +function (evt) { +this.f$.ap.highlightSearchResults (null); +}, "java.awt.event.WindowEvent"); +c$ = Clazz.p0p (); +}; +c$.$Finder$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "Finder$2", java.awt.event.KeyAdapter); +Clazz.overrideMethod (c$, "keyTyped", +function (e) { +this.b$["jalview.appletgui.Finder"].textfield_keyTyped (e); +}, "java.awt.event.KeyEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/FontChooser.js b/bin/jalview/appletgui/FontChooser.js index c8a21c0..a0154ca 100644 --- a/bin/jalview/appletgui/FontChooser.js +++ b/bin/jalview/appletgui/FontChooser.js @@ -1,259 +1,259 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.ItemListener", "awt2swing.Button", "$.Checkbox", "$.Choice", "java.awt.Font"], "jalview.appletgui.FontChooser", ["awt2swing.Frame", "$.Label", "jalview.appletgui.JVDialog", "jalview.bin.JalviewLite", "jalview.util.MessageManager", "java.awt.BorderLayout", "$.Color", "$.FlowLayout", "$.Toolkit", "java.awt.event.ActionListener"], function () { -c$ = Clazz.decorateAsClass (function () { -this.fontSize = null; -this.fontStyle = null; -this.fontName = null; -this.scaleAsCdna = null; -this.ok = null; -this.cancel = null; -this.ap = null; -this.tp = null; -this.oldFont = null; -this.oldCharWidth = 0; -this.oldScaleProtein = false; -this.lastSelected = null; -this.lastSelStyle = 0; -this.lastSelSize = 0; -this.$init = true; -this.frame = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "FontChooser", awt2swing.Panel, java.awt.event.ItemListener); -Clazz.prepareFields (c$, function () { -this.fontSize = new awt2swing.Choice (); -this.fontStyle = new awt2swing.Choice (); -this.fontName = new awt2swing.Choice (); -this.scaleAsCdna = new awt2swing.Checkbox (); -this.ok = new awt2swing.Button (); -this.cancel = new awt2swing.Button (); -}); -Clazz.makeConstructor (c$, -function (tp) { -Clazz.superConstructor (this, jalview.appletgui.FontChooser, []); -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -this.tp = tp; -this.oldFont = tp.getTreeFont (); -this.init (); -}, "jalview.appletgui.TreePanel"); -Clazz.makeConstructor (c$, -function (ap) { -Clazz.superConstructor (this, jalview.appletgui.FontChooser, []); -this.ap = ap; -this.oldFont = ap.av.getFont (); -this.oldCharWidth = ap.av.getViewStyle ().getCharWidth (); -this.oldScaleProtein = ap.av.getViewStyle ().isScaleProteinAsCdna (); -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -this.init (); -}, "jalview.appletgui.AlignmentPanel"); -Clazz.defineMethod (c$, "init", -function () { -var fonts = java.awt.Toolkit.getDefaultToolkit ().getFontList (); -for (var i = 0; i < fonts.length; i++) { -this.fontName.addItem (fonts[i]); -} -for (var i = 1; i < 31; i++) { -this.fontSize.addItem (i + ""); -} -this.fontStyle.addItem ("plain"); -this.fontStyle.addItem ("bold"); -this.fontStyle.addItem ("italic"); -this.fontName.select (this.oldFont.getName ()); -this.fontSize.select (this.oldFont.getSize () + ""); -this.fontStyle.select (new Integer (this.oldFont.getStyle ())); -this.frame = new awt2swing.Frame (); -this.frame.add (this); -jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("action.change_font"), 440, 115); -this.$init = false; -}); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -var source = evt.getSource (); -if (source === this.fontName) { -this.fontName_actionPerformed (); -} else if (source === this.fontSize) { -this.fontSize_actionPerformed (); -} else if (source === this.fontStyle) { -this.fontStyle_actionPerformed (); -} else if (source === this.scaleAsCdna) { -this.scaleAsCdna_actionPerformed (); -}}, "java.awt.event.ItemEvent"); -Clazz.defineMethod (c$, "ok_actionPerformed", -function () { -this.frame.setVisible (false); -if (this.ap != null) { -if (this.ap.getOverviewPanel () != null) { -this.ap.getOverviewPanel ().updateOverviewImage (); -}}}); -Clazz.defineMethod (c$, "cancel_actionPerformed", -function () { -if (this.ap != null) { -this.ap.av.setScaleProteinAsCdna (this.oldScaleProtein); -if (this.ap.av.getCodingComplement () != null) { -this.ap.av.getCodingComplement ().setScaleProteinAsCdna (this.oldScaleProtein); -this.ap.alignFrame.getSplitFrame ().repaint (); -}this.ap.av.setFont (this.oldFont); -var style = this.ap.av.getViewStyle (); -if (style.getCharWidth () != this.oldCharWidth) { -style.setCharWidth (this.oldCharWidth); -this.ap.av.setViewStyle (style); -}this.ap.paintAlignment (true); -} else if (this.tp != null) { -this.tp.setTreeFont (this.oldFont); -this.tp.treeCanvas.repaint (); -}this.fontName.select (this.oldFont.getName ()); -this.fontSize.select (this.oldFont.getSize () + ""); -this.fontStyle.select (new Integer (this.oldFont.getStyle ())); -this.frame.setVisible (false); -}); -Clazz.defineMethod (c$, "changeFont", -function () { -if (this.lastSelected == null) { -this.lastSelected = this.oldFont; -this.lastSelSize = this.oldFont.getSize (); -this.lastSelStyle = this.oldFont.getStyle (); -}var newFont = new java.awt.Font (this.fontName.getSelectedItem ().toString (), this.fontStyle.getSelectedIndex (), Integer.parseInt (this.fontSize.getSelectedItem ().toString ())); -var fm = this.getGraphics ().getFontMetrics (newFont); -var mw = fm.getStringBounds ("M", this.getGraphics ()).getWidth (); -var iw = fm.getStringBounds ("I", this.getGraphics ()).getWidth (); -if (mw < 1 || iw < 1) { -this.fontName.select (this.lastSelected.getName ()); -this.fontStyle.select (new Integer (this.lastSelStyle)); -this.fontSize.select ("" + this.lastSelSize); -var d = new jalview.appletgui.JVDialog (this.frame, jalview.util.MessageManager.getString ("label.invalid_font"), true, 350, 200); -var mp = new awt2swing.Panel (); -d.cancel.setVisible (false); -mp.setLayout ( new java.awt.FlowLayout ()); -mp.add ( new awt2swing.Label ("Font doesn't have letters defined\nso cannot be used\nwith alignment data.")); -d.setMainPanel (mp); -d.setVisible (true); -return; -}if (this.tp != null) { -this.tp.setTreeFont (newFont); -} else if (this.ap != null) { -this.ap.av.setFont (newFont); -this.ap.fontChanged (); -}this.lastSelected = newFont; -}); -Clazz.defineMethod (c$, "fontName_actionPerformed", -function () { -if (this.$init) { -return; -}this.changeFont (); -}); -Clazz.defineMethod (c$, "fontSize_actionPerformed", -function () { -if (this.$init) { -return; -}this.changeFont (); -}); -Clazz.defineMethod (c$, "fontStyle_actionPerformed", -function () { -if (this.$init) { -return; -}this.changeFont (); -}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.setLayout ( new java.awt.BorderLayout ()); -this.setBackground (java.awt.Color.white); -var fontLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.font")); -fontLabel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -fontLabel.setAlignment (4); -this.fontSize.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -this.fontSize.addItemListener (this); -this.fontStyle.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -this.fontStyle.addItemListener (this); -var sizeLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.size")); -sizeLabel.setAlignment (4); -sizeLabel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -var styleLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.style")); -styleLabel.setAlignment (4); -styleLabel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -this.fontName.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -this.fontName.addItemListener (this); -this.scaleAsCdna.setLabel (jalview.util.MessageManager.getString ("label.scale_as_cdna")); -this.scaleAsCdna.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -this.scaleAsCdna.addItemListener (this); -this.scaleAsCdna.setState (this.ap.av.isScaleProteinAsCdna ()); -this.ok.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -this.ok.setLabel (jalview.util.MessageManager.getString ("action.ok")); -this.ok.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FontChooser$1") ? 0 : jalview.appletgui.FontChooser.$FontChooser$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.FontChooser$1, this, null))); -this.cancel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); -this.cancel.setLabel (jalview.util.MessageManager.getString ("action.cancel")); -this.cancel.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FontChooser$2") ? 0 : jalview.appletgui.FontChooser.$FontChooser$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.FontChooser$2, this, null))); -var fontPanel = new awt2swing.Panel (); -fontPanel.setLayout ( new java.awt.BorderLayout ()); -var stylePanel = new awt2swing.Panel (); -stylePanel.setLayout ( new java.awt.BorderLayout ()); -var sizePanel = new awt2swing.Panel (); -sizePanel.setLayout ( new java.awt.BorderLayout ()); -var scalePanel = new awt2swing.Panel (); -scalePanel.setLayout ( new java.awt.BorderLayout ()); -var okCancelPanel = new awt2swing.Panel (); -var optionsPanel = new awt2swing.Panel (); -fontPanel.setBackground (java.awt.Color.white); -stylePanel.setBackground (java.awt.Color.white); -sizePanel.setBackground (java.awt.Color.white); -okCancelPanel.setBackground (java.awt.Color.white); -optionsPanel.setBackground (java.awt.Color.white); -fontPanel.add (fontLabel, "West"); -fontPanel.add (this.fontName, "Center"); -stylePanel.add (styleLabel, "West"); -stylePanel.add (this.fontStyle, "Center"); -sizePanel.add (sizeLabel, "West"); -sizePanel.add (this.fontSize, "Center"); -scalePanel.add (this.scaleAsCdna, "Center"); -okCancelPanel.add (this.ok, null); -okCancelPanel.add (this.cancel, null); -optionsPanel.add (fontPanel, null); -optionsPanel.add (sizePanel, null); -optionsPanel.add (stylePanel, null); -this.add (optionsPanel, "North"); -if (this.ap.alignFrame.getSplitFrame () != null) { -this.add (scalePanel, "Center"); -}this.add (okCancelPanel, "South"); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "scaleAsCdna_actionPerformed", -function () { -this.ap.av.setScaleProteinAsCdna (this.scaleAsCdna.getState ()); -this.ap.av.getCodingComplement ().setScaleProteinAsCdna (this.scaleAsCdna.getState ()); -this.ap.alignFrame.getSplitFrame ().adjustLayout (); -this.ap.paintAlignment (true); -this.ap.alignFrame.getSplitFrame ().repaint (); -}); -c$.$FontChooser$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FontChooser$1", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.FontChooser"].ok_actionPerformed (); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$FontChooser$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "FontChooser$2", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.FontChooser"].cancel_actionPerformed (); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.VERDANA_11PT = c$.prototype.VERDANA_11PT = new java.awt.Font ("Verdana", 0, 11); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ItemListener", "awt2swing.Button", "$.Checkbox", "$.Choice", "java.awt.Font"], "jalview.appletgui.FontChooser", ["awt2swing.Frame", "$.Label", "jalview.appletgui.JVDialog", "jalview.bin.JalviewLite", "jalview.util.MessageManager", "java.awt.BorderLayout", "$.Color", "$.FlowLayout", "$.Toolkit", "java.awt.event.ActionListener"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fontSize = null; +this.fontStyle = null; +this.fontName = null; +this.scaleAsCdna = null; +this.ok = null; +this.cancel = null; +this.ap = null; +this.tp = null; +this.oldFont = null; +this.oldCharWidth = 0; +this.oldScaleProtein = false; +this.lastSelected = null; +this.lastSelStyle = 0; +this.lastSelSize = 0; +this.$init = true; +this.frame = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "FontChooser", awt2swing.Panel, java.awt.event.ItemListener); +Clazz.prepareFields (c$, function () { +this.fontSize = new awt2swing.Choice (); +this.fontStyle = new awt2swing.Choice (); +this.fontName = new awt2swing.Choice (); +this.scaleAsCdna = new awt2swing.Checkbox (); +this.ok = new awt2swing.Button (); +this.cancel = new awt2swing.Button (); +}); +Clazz.makeConstructor (c$, +function (tp) { +Clazz.superConstructor (this, jalview.appletgui.FontChooser, []); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.tp = tp; +this.oldFont = tp.getTreeFont (); +this.init (); +}, "jalview.appletgui.TreePanel"); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.FontChooser, []); +this.ap = ap; +this.oldFont = ap.av.getFont (); +this.oldCharWidth = ap.av.getViewStyle ().getCharWidth (); +this.oldScaleProtein = ap.av.getViewStyle ().isScaleProteinAsCdna (); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.init (); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.defineMethod (c$, "init", +function () { +var fonts = java.awt.Toolkit.getDefaultToolkit ().getFontList (); +for (var i = 0; i < fonts.length; i++) { +this.fontName.addItem (fonts[i]); +} +for (var i = 1; i < 31; i++) { +this.fontSize.addItem (i + ""); +} +this.fontStyle.addItem ("plain"); +this.fontStyle.addItem ("bold"); +this.fontStyle.addItem ("italic"); +this.fontName.select (this.oldFont.getName ()); +this.fontSize.select (this.oldFont.getSize () + ""); +this.fontStyle.select (new Integer (this.oldFont.getStyle ())); +this.frame = new awt2swing.Frame (); +this.frame.add (this); +jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("action.change_font"), 440, 115); +this.$init = false; +}); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +var source = evt.getSource (); +if (source === this.fontName) { +this.fontName_actionPerformed (); +} else if (source === this.fontSize) { +this.fontSize_actionPerformed (); +} else if (source === this.fontStyle) { +this.fontStyle_actionPerformed (); +} else if (source === this.scaleAsCdna) { +this.scaleAsCdna_actionPerformed (); +}}, "java.awt.event.ItemEvent"); +Clazz.defineMethod (c$, "ok_actionPerformed", +function () { +this.frame.setVisible (false); +if (this.ap != null) { +if (this.ap.getOverviewPanel () != null) { +this.ap.getOverviewPanel ().updateOverviewImage (); +}}}); +Clazz.defineMethod (c$, "cancel_actionPerformed", +function () { +if (this.ap != null) { +this.ap.av.setScaleProteinAsCdna (this.oldScaleProtein); +if (this.ap.av.getCodingComplement () != null) { +this.ap.av.getCodingComplement ().setScaleProteinAsCdna (this.oldScaleProtein); +this.ap.alignFrame.getSplitFrame ().repaint (); +}this.ap.av.setFont (this.oldFont); +var style = this.ap.av.getViewStyle (); +if (style.getCharWidth () != this.oldCharWidth) { +style.setCharWidth (this.oldCharWidth); +this.ap.av.setViewStyle (style); +}this.ap.paintAlignment (true); +} else if (this.tp != null) { +this.tp.setTreeFont (this.oldFont); +this.tp.treeCanvas.repaint (); +}this.fontName.select (this.oldFont.getName ()); +this.fontSize.select (this.oldFont.getSize () + ""); +this.fontStyle.select (new Integer (this.oldFont.getStyle ())); +this.frame.setVisible (false); +}); +Clazz.defineMethod (c$, "changeFont", +function () { +if (this.lastSelected == null) { +this.lastSelected = this.oldFont; +this.lastSelSize = this.oldFont.getSize (); +this.lastSelStyle = this.oldFont.getStyle (); +}var newFont = new java.awt.Font (this.fontName.getSelectedItem ().toString (), this.fontStyle.getSelectedIndex (), Integer.parseInt (this.fontSize.getSelectedItem ().toString ())); +var fm = this.getGraphics ().getFontMetrics (newFont); +var mw = fm.getStringBounds ("M", this.getGraphics ()).getWidth (); +var iw = fm.getStringBounds ("I", this.getGraphics ()).getWidth (); +if (mw < 1 || iw < 1) { +this.fontName.select (this.lastSelected.getName ()); +this.fontStyle.select (new Integer (this.lastSelStyle)); +this.fontSize.select ("" + this.lastSelSize); +var d = new jalview.appletgui.JVDialog (this.frame, jalview.util.MessageManager.getString ("label.invalid_font"), true, 350, 200); +var mp = new awt2swing.Panel (); +d.cancel.setVisible (false); +mp.setLayout ( new java.awt.FlowLayout ()); +mp.add ( new awt2swing.Label ("Font doesn't have letters defined\nso cannot be used\nwith alignment data.")); +d.setMainPanel (mp); +d.setVisible (true); +return; +}if (this.tp != null) { +this.tp.setTreeFont (newFont); +} else if (this.ap != null) { +this.ap.av.setFont (newFont); +this.ap.fontChanged (); +}this.lastSelected = newFont; +}); +Clazz.defineMethod (c$, "fontName_actionPerformed", +function () { +if (this.$init) { +return; +}this.changeFont (); +}); +Clazz.defineMethod (c$, "fontSize_actionPerformed", +function () { +if (this.$init) { +return; +}this.changeFont (); +}); +Clazz.defineMethod (c$, "fontStyle_actionPerformed", +function () { +if (this.$init) { +return; +}this.changeFont (); +}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setLayout ( new java.awt.BorderLayout ()); +this.setBackground (java.awt.Color.white); +var fontLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.font")); +fontLabel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +fontLabel.setAlignment (4); +this.fontSize.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +this.fontSize.addItemListener (this); +this.fontStyle.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +this.fontStyle.addItemListener (this); +var sizeLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.size")); +sizeLabel.setAlignment (4); +sizeLabel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +var styleLabel = new awt2swing.Label (jalview.util.MessageManager.getString ("label.style")); +styleLabel.setAlignment (4); +styleLabel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +this.fontName.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +this.fontName.addItemListener (this); +this.scaleAsCdna.setLabel (jalview.util.MessageManager.getString ("label.scale_as_cdna")); +this.scaleAsCdna.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +this.scaleAsCdna.addItemListener (this); +this.scaleAsCdna.setState (this.ap.av.isScaleProteinAsCdna ()); +this.ok.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +this.ok.setLabel (jalview.util.MessageManager.getString ("action.ok")); +this.ok.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FontChooser$1") ? 0 : jalview.appletgui.FontChooser.$FontChooser$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.FontChooser$1, this, null))); +this.cancel.setFont (jalview.appletgui.FontChooser.VERDANA_11PT); +this.cancel.setLabel (jalview.util.MessageManager.getString ("action.cancel")); +this.cancel.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.FontChooser$2") ? 0 : jalview.appletgui.FontChooser.$FontChooser$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.FontChooser$2, this, null))); +var fontPanel = new awt2swing.Panel (); +fontPanel.setLayout ( new java.awt.BorderLayout ()); +var stylePanel = new awt2swing.Panel (); +stylePanel.setLayout ( new java.awt.BorderLayout ()); +var sizePanel = new awt2swing.Panel (); +sizePanel.setLayout ( new java.awt.BorderLayout ()); +var scalePanel = new awt2swing.Panel (); +scalePanel.setLayout ( new java.awt.BorderLayout ()); +var okCancelPanel = new awt2swing.Panel (); +var optionsPanel = new awt2swing.Panel (); +fontPanel.setBackground (java.awt.Color.white); +stylePanel.setBackground (java.awt.Color.white); +sizePanel.setBackground (java.awt.Color.white); +okCancelPanel.setBackground (java.awt.Color.white); +optionsPanel.setBackground (java.awt.Color.white); +fontPanel.add (fontLabel, "West"); +fontPanel.add (this.fontName, "Center"); +stylePanel.add (styleLabel, "West"); +stylePanel.add (this.fontStyle, "Center"); +sizePanel.add (sizeLabel, "West"); +sizePanel.add (this.fontSize, "Center"); +scalePanel.add (this.scaleAsCdna, "Center"); +okCancelPanel.add (this.ok, null); +okCancelPanel.add (this.cancel, null); +optionsPanel.add (fontPanel, null); +optionsPanel.add (sizePanel, null); +optionsPanel.add (stylePanel, null); +this.add (optionsPanel, "North"); +if (this.ap.alignFrame.getSplitFrame () != null) { +this.add (scalePanel, "Center"); +}this.add (okCancelPanel, "South"); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "scaleAsCdna_actionPerformed", +function () { +this.ap.av.setScaleProteinAsCdna (this.scaleAsCdna.getState ()); +this.ap.av.getCodingComplement ().setScaleProteinAsCdna (this.scaleAsCdna.getState ()); +this.ap.alignFrame.getSplitFrame ().adjustLayout (); +this.ap.paintAlignment (true); +this.ap.alignFrame.getSplitFrame ().repaint (); +}); +c$.$FontChooser$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FontChooser$1", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.FontChooser"].ok_actionPerformed (); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$FontChooser$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "FontChooser$2", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.FontChooser"].cancel_actionPerformed (); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.VERDANA_11PT = c$.prototype.VERDANA_11PT = new java.awt.Font ("Verdana", 0, 11); +}); diff --git a/bin/jalview/appletgui/IdCanvas.class b/bin/jalview/appletgui/IdCanvas.class index c079bc6f51062c42fd86384fc19a9d3473fc7891..2c2cb6ff1ba654f1339a51514e9cab5513f6af44 100644 GIT binary patch delta 69 zcmV-L0J{J2Kkq-V_7VYZv-c8W0SgNN1PuNFPXPe|60>C#z5xl}00#gQ0008blOGiv bvq%=+1Owav7n3O)S^*W4@Ea7fnHyLH`W6&% delta 87 zcmaEF|IvQKHzCIS&EJKR7Fi`VQJKx| pV)s~>?=nbC){u@86Jp?CX8 0) { -ss = es - vertical; -if (ss < this.av.startSeq) { -ss = this.av.startSeq; -} else { -transY = this.imgHeight - vertical * this.av.getCharHeight (); -}} else if (vertical < 0) { -es = ss - vertical; -if (es > this.av.endSeq) { -es = this.av.endSeq; -}}this.gg.translate (0, transY); -this.drawIds (ss, es); -this.gg.translate (0, -transY); -this.$fastPaint = true; -this.repaint (); -}, "~N"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -if (this.getSize ().height < 0 || this.getSize ().width < 0) { -return; -}if (this.$fastPaint) { -this.$fastPaint = false; -g.drawImage (this.image, 0, 0, this); -return; -}this.imgHeight = this.getSize ().height; -this.imgHeight -= this.imgHeight % this.av.getCharHeight (); -if (this.imgHeight < 1) { -return; -}if (this.image == null || this.imgHeight != this.image.getHeight (this)) { -this.image = this.createImage (this.getSize ().width, this.imgHeight); -this.gg = this.image.getGraphics (); -this.gg.setFont (this.av.getFont ()); -}this.gg.setColor (java.awt.Color.white); -var italic = new java.awt.Font (this.av.getFont ().getName (), 2, this.av.getFont ().getSize ()); -this.gg.setFont (italic); -this.gg.fillRect (0, 0, this.getSize ().width, this.getSize ().height); -this.drawIds (this.av.startSeq, this.av.endSeq); -g.drawImage (this.image, 0, 0, this); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "drawIds", -function (starty, endy) { -var italic = new java.awt.Font (this.av.getFont ().getName (), 2, this.av.getFont ().getSize ()); -this.avcharHeight = this.av.getCharHeight (); -this.gg.setFont (italic); -var currentColor = java.awt.Color.white; -var currentTextColor = java.awt.Color.black; -var doHiddenCheck = this.av.isDisplayReferenceSeq () || this.av.hasHiddenRows (); -var hiddenRows = this.av.hasHiddenRows () && this.av.getShowHiddenMarkers (); -if (this.av.getWrapAlignment ()) { -var maxwidth = this.av.getAlignment ().getWidth (); -var alheight = this.av.getAlignment ().getHeight (); -if (this.av.hasHiddenColumns ()) { -maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; -}var annotationHeight = 0; -var labels = null; -if (this.av.isShowAnnotation ()) { -var ap = new jalview.appletgui.AnnotationPanel (this.av); -annotationHeight = ap.adjustPanelHeight (); -labels = new jalview.appletgui.AnnotationLabels (this.av); -}var hgap = this.avcharHeight; -if (this.av.getScaleAboveWrapped ()) { -hgap += this.avcharHeight; -}var cHeight = alheight * this.avcharHeight + hgap + annotationHeight; -var rowSize = this.av.getEndRes () - this.av.getStartRes (); -for (var ypos = hgap, row = this.av.startRes; (ypos <= this.getSize ().height) && (row < maxwidth); ypos += cHeight, row += rowSize) { -for (var i = starty; i < alheight; i++) { -var s = this.av.getAlignment ().getSequenceAt (i); -this.gg.setFont (italic); -if (doHiddenCheck) { -this.setHiddenFont (s); -}this.drawIdString (this.gg, hiddenRows, s, i, 0, ypos); -} -if (labels != null) { -this.gg.translate (0, ypos + (alheight * this.avcharHeight)); -labels.drawComponent (this.gg, this.getSize ().width); -this.gg.translate (0, -ypos - (alheight * this.avcharHeight)); -}} -} else { -var seq; -for (var i = starty; i < endy; i++) { -seq = this.av.getAlignment ().getSequenceAt (i); -if (seq == null) { -continue; -}this.gg.setFont (italic); -if (doHiddenCheck) { -this.setHiddenFont (seq); -}if ((this.searchResults != null) && this.searchResults.contains (seq)) { -currentColor = java.awt.Color.black; -currentTextColor = java.awt.Color.white; -} else if ((this.av.getSelectionGroup () != null) && this.av.getSelectionGroup ().getSequences (null).contains (seq)) { -currentColor = java.awt.Color.lightGray; -currentTextColor = java.awt.Color.black; -} else { -currentColor = this.av.getSequenceColour (seq); -currentTextColor = java.awt.Color.black; -}this.gg.setColor (currentColor); -this.gg.fillRect (0, (i - starty) * this.avcharHeight, this.getSize ().width, this.avcharHeight); -this.gg.setColor (currentTextColor); -this.gg.drawString (seq.getDisplayId (this.av.getShowJVSuffix ()), 0, (((i - starty) * this.avcharHeight) + this.avcharHeight) - (Clazz.doubleToInt (this.avcharHeight / 5))); -if (hiddenRows) { -this.drawMarker (i, starty, 0); -}} -}}, "~N,~N"); -Clazz.defineMethod (c$, "setHighlighted", -function (list) { -this.searchResults = list; -this.repaint (); -}, "java.util.List"); -Clazz.defineMethod (c$, "drawMarker", -function (i, starty, yoffset) { -var hseqs = this.av.getAlignment ().getHiddenSequences ().hiddenSequences; -var hSize = hseqs.length; -var hiddenIndex = i; -var lastIndex = i - 1; -var nextIndex = i + 1; -for (var j = 0; j < hSize; j++) { -if (hseqs[j] != null) { -if (j - 1 < hiddenIndex) { -hiddenIndex++; -}if (j - 1 < lastIndex) { -lastIndex++; -}if (j - 1 < nextIndex) { -nextIndex++; -}}} -var below = (hiddenIndex > lastIndex + 1); -var above = (nextIndex > hiddenIndex + 1); -this.gg.setColor (java.awt.Color.blue); -if (below) { -this.gg.fillPolygon ( Clazz.newIntArray (-1, [this.getSize ().width - this.avcharHeight, this.getSize ().width - this.avcharHeight, this.getSize ().width]), Clazz.newIntArray (-1, [(i - starty) * this.avcharHeight + yoffset, (i - starty) * this.avcharHeight + yoffset + Clazz.doubleToInt (this.avcharHeight / 4), (i - starty) * this.avcharHeight + yoffset]), 3); -}if (above) { -this.gg.fillPolygon ( Clazz.newIntArray (-1, [this.getSize ().width - this.avcharHeight, this.getSize ().width - this.avcharHeight, this.getSize ().width]), Clazz.newIntArray (-1, [(i - starty + 1) * this.avcharHeight + yoffset, (i - starty + 1) * this.avcharHeight + yoffset - Clazz.doubleToInt (this.avcharHeight / 4), (i - starty + 1) * this.avcharHeight + yoffset]), 3); -}}, "~N,~N,~N"); -Clazz.defineMethod (c$, "setHiddenFont", -function (seq) { -var bold = new java.awt.Font (this.av.getFont ().getName (), 1, this.av.getFont ().getSize ()); -if (this.av.isHiddenRepSequence (seq)) { -this.gg.setFont (bold); -return true; -}return false; -}, "jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel"], "jalview.appletgui.IdCanvas", ["jalview.appletgui.AnnotationLabels", "$.AnnotationPanel", "$.PaintRefresher", "java.awt.Color", "$.Font"], function () { +c$ = Clazz.decorateAsClass (function () { +this.av = null; +this.showScores = true; +this.maxIdLength = -1; +this.maxIdStr = null; +this.image = null; +this.gg = null; +this.imgHeight = 0; +this.$fastPaint = false; +this.searchResults = null; +this.avcharHeight = 0; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "IdCanvas", awt2swing.Panel); +Clazz.makeConstructor (c$, +function (av) { +Clazz.superConstructor (this, jalview.appletgui.IdCanvas, []); +this.setLayout (null); +this.av = av; +jalview.appletgui.PaintRefresher.Register (this, av.getSequenceSetId ()); +}, "jalview.appletgui.AlignViewport"); +Clazz.defineMethod (c$, "drawIdString", +function (gg, hiddenRows, s, i, starty, ypos) { +var charHeight = this.av.getCharHeight (); +if (this.searchResults != null && this.searchResults.contains (s)) { +gg.setColor (java.awt.Color.black); +gg.fillRect (0, ((i - starty) * charHeight) + ypos, this.getSize ().width, charHeight); +gg.setColor (java.awt.Color.white); +} else if (this.av.getSelectionGroup () != null && this.av.getSelectionGroup ().getSequences (null).contains (s)) { +gg.setColor (java.awt.Color.lightGray); +gg.fillRect (0, ((i - starty) * charHeight) + ypos, this.getSize ().width, charHeight); +gg.setColor (java.awt.Color.white); +} else { +gg.setColor (this.av.getSequenceColour (s)); +gg.fillRect (0, ((i - starty) * charHeight) + ypos, this.getSize ().width, charHeight); +gg.setColor (java.awt.Color.black); +}gg.drawString (s.getDisplayId (this.av.getShowJVSuffix ()), 0, ((i - starty) * charHeight) + ypos + charHeight - (Clazz.doubleToInt (charHeight / 5))); +if (hiddenRows) { +this.drawMarker (i, starty, ypos); +}}, "java.awt.Graphics,~B,jalview.datamodel.SequenceI,~N,~N,~N"); +Clazz.defineMethod (c$, "fastPaint", +function (vertical) { +if (this.gg == null) { +this.repaint (); +return; +}this.gg.copyArea (0, 0, this.getSize ().width, this.imgHeight, 0, -vertical * this.av.getCharHeight ()); +var ss = this.av.startSeq; +var es = this.av.endSeq; +var transY = 0; +if (vertical > 0) { +ss = es - vertical; +if (ss < this.av.startSeq) { +ss = this.av.startSeq; +} else { +transY = this.imgHeight - vertical * this.av.getCharHeight (); +}} else if (vertical < 0) { +es = ss - vertical; +if (es > this.av.endSeq) { +es = this.av.endSeq; +}}this.gg.translate (0, transY); +this.drawIds (ss, es); +this.gg.translate (0, -transY); +this.$fastPaint = true; +this.repaint (); +}, "~N"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +if (this.getSize ().height < 0 || this.getSize ().width < 0) { +return; +}if (this.$fastPaint) { +this.$fastPaint = false; +g.drawImage (this.image, 0, 0, this); +return; +}this.imgHeight = this.getSize ().height; +this.imgHeight -= this.imgHeight % this.av.getCharHeight (); +if (this.imgHeight < 1) { +return; +}if (this.image == null || this.imgHeight != this.image.getHeight (this)) { +this.image = this.createImage (this.getSize ().width, this.imgHeight); +this.gg = this.image.getGraphics (); +this.gg.setFont (this.av.getFont ()); +}this.gg.setColor (java.awt.Color.white); +var italic = new java.awt.Font (this.av.getFont ().getName (), 2, this.av.getFont ().getSize ()); +this.gg.setFont (italic); +this.gg.fillRect (0, 0, this.getSize ().width, this.getSize ().height); +this.drawIds (this.av.startSeq, this.av.endSeq); +g.drawImage (this.image, 0, 0, this); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "drawIds", +function (starty, endy) { +var italic = new java.awt.Font (this.av.getFont ().getName (), 2, this.av.getFont ().getSize ()); +this.avcharHeight = this.av.getCharHeight (); +this.gg.setFont (italic); +var currentColor = java.awt.Color.white; +var currentTextColor = java.awt.Color.black; +var doHiddenCheck = this.av.isDisplayReferenceSeq () || this.av.hasHiddenRows (); +var hiddenRows = this.av.hasHiddenRows () && this.av.getShowHiddenMarkers (); +if (this.av.getWrapAlignment ()) { +var maxwidth = this.av.getAlignment ().getWidth (); +var alheight = this.av.getAlignment ().getHeight (); +if (this.av.hasHiddenColumns ()) { +maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; +}var annotationHeight = 0; +var labels = null; +if (this.av.isShowAnnotation ()) { +var ap = new jalview.appletgui.AnnotationPanel (this.av); +annotationHeight = ap.adjustPanelHeight (); +labels = new jalview.appletgui.AnnotationLabels (this.av); +}var hgap = this.avcharHeight; +if (this.av.getScaleAboveWrapped ()) { +hgap += this.avcharHeight; +}var cHeight = alheight * this.avcharHeight + hgap + annotationHeight; +var rowSize = this.av.getEndRes () - this.av.getStartRes (); +for (var ypos = hgap, row = this.av.startRes; (ypos <= this.getSize ().height) && (row < maxwidth); ypos += cHeight, row += rowSize) { +for (var i = starty; i < alheight; i++) { +var s = this.av.getAlignment ().getSequenceAt (i); +this.gg.setFont (italic); +if (doHiddenCheck) { +this.setHiddenFont (s); +}this.drawIdString (this.gg, hiddenRows, s, i, 0, ypos); +} +if (labels != null) { +this.gg.translate (0, ypos + (alheight * this.avcharHeight)); +labels.drawComponent (this.gg, this.getSize ().width); +this.gg.translate (0, -ypos - (alheight * this.avcharHeight)); +}} +} else { +var seq; +for (var i = starty; i < endy; i++) { +seq = this.av.getAlignment ().getSequenceAt (i); +if (seq == null) { +continue; +}this.gg.setFont (italic); +if (doHiddenCheck) { +this.setHiddenFont (seq); +}if ((this.searchResults != null) && this.searchResults.contains (seq)) { +currentColor = java.awt.Color.black; +currentTextColor = java.awt.Color.white; +} else if ((this.av.getSelectionGroup () != null) && this.av.getSelectionGroup ().getSequences (null).contains (seq)) { +currentColor = java.awt.Color.lightGray; +currentTextColor = java.awt.Color.black; +} else { +currentColor = this.av.getSequenceColour (seq); +currentTextColor = java.awt.Color.black; +}this.gg.setColor (currentColor); +this.gg.fillRect (0, (i - starty) * this.avcharHeight, this.getSize ().width, this.avcharHeight); +this.gg.setColor (currentTextColor); +this.gg.drawString (seq.getDisplayId (this.av.getShowJVSuffix ()), 0, (((i - starty) * this.avcharHeight) + this.avcharHeight) - (Clazz.doubleToInt (this.avcharHeight / 5))); +if (hiddenRows) { +this.drawMarker (i, starty, 0); +}} +}}, "~N,~N"); +Clazz.defineMethod (c$, "setHighlighted", +function (list) { +this.searchResults = list; +this.repaint (); +}, "java.util.List"); +Clazz.defineMethod (c$, "drawMarker", +function (i, starty, yoffset) { +var hseqs = this.av.getAlignment ().getHiddenSequences ().hiddenSequences; +var hSize = hseqs.length; +var hiddenIndex = i; +var lastIndex = i - 1; +var nextIndex = i + 1; +for (var j = 0; j < hSize; j++) { +if (hseqs[j] != null) { +if (j - 1 < hiddenIndex) { +hiddenIndex++; +}if (j - 1 < lastIndex) { +lastIndex++; +}if (j - 1 < nextIndex) { +nextIndex++; +}}} +var below = (hiddenIndex > lastIndex + 1); +var above = (nextIndex > hiddenIndex + 1); +this.gg.setColor (java.awt.Color.blue); +if (below) { +this.gg.fillPolygon ( Clazz.newIntArray (-1, [this.getSize ().width - this.avcharHeight, this.getSize ().width - this.avcharHeight, this.getSize ().width]), Clazz.newIntArray (-1, [(i - starty) * this.avcharHeight + yoffset, (i - starty) * this.avcharHeight + yoffset + Clazz.doubleToInt (this.avcharHeight / 4), (i - starty) * this.avcharHeight + yoffset]), 3); +}if (above) { +this.gg.fillPolygon ( Clazz.newIntArray (-1, [this.getSize ().width - this.avcharHeight, this.getSize ().width - this.avcharHeight, this.getSize ().width]), Clazz.newIntArray (-1, [(i - starty + 1) * this.avcharHeight + yoffset, (i - starty + 1) * this.avcharHeight + yoffset - Clazz.doubleToInt (this.avcharHeight / 4), (i - starty + 1) * this.avcharHeight + yoffset]), 3); +}}, "~N,~N,~N"); +Clazz.defineMethod (c$, "setHiddenFont", +function (seq) { +var bold = new java.awt.Font (this.av.getFont ().getName (), 1, this.av.getFont ().getSize ()); +if (this.av.isHiddenRepSequence (seq)) { +this.gg.setFont (bold); +return true; +}return false; +}, "jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/appletgui/IdPanel.js b/bin/jalview/appletgui/IdPanel.js index 1419a24..4f70687 100644 --- a/bin/jalview/appletgui/IdPanel.js +++ b/bin/jalview/appletgui/IdPanel.js @@ -1,285 +1,285 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.lang.Thread", "java.util.Vector"], "jalview.appletgui.IdPanel", ["jalview.appletgui.APopupMenu", "$.IdCanvas", "$.PaintRefresher", "$.Tooltip", "jalview.datamodel.SequenceGroup", "jalview.util.UrlLink", "java.awt.BorderLayout", "java.lang.Float", "$.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.idCanvas = null; -this.av = null; -this.alignPanel = null; -this.scrollThread = null; -this.lastid = -1; -this.mouseDragging = false; -this.links = null; -this.tooltip = null; -if (!Clazz.isClassDefined ("jalview.appletgui.IdPanel.ScrollThread")) { -jalview.appletgui.IdPanel.$IdPanel$ScrollThread$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "IdPanel", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); -Clazz.prepareFields (c$, function () { -this.links = new java.util.Vector (); -}); -Clazz.makeConstructor (c$, -function (av, parent) { -Clazz.superConstructor (this, jalview.appletgui.IdPanel, []); -this.setName ("idPanel"); -this.av = av; -this.alignPanel = parent; -this.idCanvas = new jalview.appletgui.IdCanvas (av); -this.setLayout ( new java.awt.BorderLayout ()); -this.add (this.idCanvas, "Center"); -this.idCanvas.addMouseListener (this); -this.idCanvas.addMouseMotionListener (this); -if (av.applet != null) { -av.applet.getLinkParams (this.links); -}{ -var srsPos = this.links.indexOf ("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry"); -if (srsPos > -1) { -this.links.setElementAt ("EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$", srsPos); -}}if (this.links.size () < 1) { -this.links = new java.util.Vector (); -this.links.addElement ("EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"); -}}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); -Clazz.overrideMethod (c$, "mouseMoved", -function (e) { -var seq = this.alignPanel.seqPanel.findSeq (e); -var sequence = this.av.getAlignment ().getSequenceAt (seq); -var tooltiptext = new StringBuffer (); -if (sequence != null) { -if (sequence.getDescription () != null) { -tooltiptext.append (sequence.getDescription ()); -tooltiptext.append ("\n"); -}var sf = sequence.getSequenceFeatures (); -for (var sl = 0; sf != null && sl < sf.length; sl++) { -if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0) { -var nl = false; -if (sf[sl].getFeatureGroup () != null) { -tooltiptext.append (sf[sl].getFeatureGroup ()); -nl = true; -};if (sf[sl].getType () != null) { -tooltiptext.append (" "); -tooltiptext.append (sf[sl].getType ()); -nl = true; -};if (sf[sl].getDescription () != null) { -tooltiptext.append (" "); -tooltiptext.append (sf[sl].getDescription ()); -nl = true; -};if (!Float.isNaN (sf[sl].getScore ()) && sf[sl].getScore () != 0) { -tooltiptext.append (" Score = "); -tooltiptext.append (sf[sl].getScore ()); -nl = true; -};if (sf[sl].getStatus () != null && sf[sl].getStatus ().length > 0) { -tooltiptext.append (" ("); -tooltiptext.append (sf[sl].getStatus ()); -tooltiptext.append (")"); -nl = true; -};if (nl) { -tooltiptext.append ("\n"); -}}} -}if (tooltiptext.length () == 0) { -if (this.tooltip != null) { -this.tooltip.setVisible (false); -}this.tooltip = null; -tooltiptext = null; -return; -}if (this.tooltip == null) { -this.tooltip = new jalview.appletgui.Tooltip (sequence.getDisplayId (true) + "\n" + tooltiptext.toString (), this.idCanvas); -} else { -this.tooltip.setTip (sequence.getDisplayId (true) + "\n" + tooltiptext.toString ()); -}tooltiptext = null; -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (e) { -this.mouseDragging = true; -var seq = Math.max (0, this.alignPanel.seqPanel.findSeq (e)); -if (seq < this.lastid) { -this.selectSeqs (this.lastid - 1, seq); -} else if (seq > this.lastid) { -this.selectSeqs (this.lastid + 1, seq); -}this.lastid = seq; -this.alignPanel.paintAlignment (false); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (e) { -if (e.getClickCount () < 2) { -return; -}var seq = this.alignPanel.seqPanel.findSeq (e); -var sq = this.av.getAlignment ().getSequenceAt (seq); -if (sq == null) { -return; -}var id = sq.getName (); -var target = null; -var url = null; -var i = 0; -while (url == null && i < this.links.size ()) { -url = this.links.elementAt (i++).toString (); -var urlLink = null; -try { -urlLink = new jalview.util.UrlLink (url); -target = urlLink.getTarget (); -} catch (foo) { -if (Clazz.exceptionOf (foo, Exception)) { -System.err.println ("Exception for URLLink '" + url + "'"); -foo.printStackTrace (); -url = null; -continue; -} else { -throw foo; -} -} -;if (!urlLink.isValid ()) { -System.err.println (urlLink.getInvalidMessage ()); -url = null; -continue; -}var urls = urlLink.makeUrls (id, true); -if (urls == null || urls[0] == null || urls[0].length < 1) { -url = null; -continue; -}url = urls[1]; -} -try { -this.alignPanel.alignFrame.showURL (url, target); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (e) { -if (this.scrollThread != null) { -this.scrollThread.running = false; -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (e) { -if (this.av.getWrapAlignment ()) { -return; -}if (this.mouseDragging && e.getY () < 0 && this.av.getStartSeq () > 0) { -this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.IdPanel.ScrollThread, this, null, true); -}if (this.mouseDragging && e.getY () >= this.getSize ().height && this.av.getAlignment ().getHeight () > this.av.getEndSeq ()) { -this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.IdPanel.ScrollThread, this, null, false); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mousePressed", -function (e) { -if (e.getClickCount () > 1) { -return; -}var y = e.getY (); -if (this.av.getWrapAlignment ()) { -y -= 2 * this.av.getCharHeight (); -}var seq = this.alignPanel.seqPanel.findSeq (e); -if ((e.getModifiers () & 4) == 4) { -var sq = this.av.getAlignment ().getSequenceAt (seq); -var nlinks = new java.util.Vector (); -for (var l = 0, lSize = this.links.size (); l < lSize; l++) { -nlinks.addElement (this.links.elementAt (l)); -} -var sf = sq == null ? null : sq.getSequenceFeatures (); -for (var sl = 0; sf != null && sl < sf.length; sl++) { -if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0) { -if (sf[sl].links != null && sf[sl].links.size () > 0) { -for (var l = 0, lSize = sf[sl].links.size (); l < lSize; l++) { -nlinks.addElement (sf[sl].links.elementAt (l)); -} -}}} -var popup = new jalview.appletgui.APopupMenu (this.alignPanel, sq, nlinks); -this.add (popup); -popup.show (this, e.getX (), e.getY ()); -return; -}if ((this.av.getSelectionGroup () == null) || ((!e.isControlDown () && !e.isShiftDown ()) && this.av.getSelectionGroup () != null)) { -this.av.setSelectionGroup ( new jalview.datamodel.SequenceGroup ()); -this.av.getSelectionGroup ().setStartRes (0); -this.av.getSelectionGroup ().setEndRes (this.av.getAlignment ().getWidth () - 1); -}if (e.isShiftDown () && this.lastid != -1) { -this.selectSeqs (this.lastid, seq); -} else { -this.selectSeq (seq); -}this.alignPanel.paintAlignment (false); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "selectSeq", -function (seq) { -this.lastid = seq; -var pickedSeq = this.av.getAlignment ().getSequenceAt (seq); -this.av.getSelectionGroup ().addOrRemove (pickedSeq, true); -}, "~N"); -Clazz.defineMethod (c$, "selectSeqs", -function (start, end) { -this.lastid = start; -if (end >= this.av.getAlignment ().getHeight ()) { -end = this.av.getAlignment ().getHeight () - 1; -}if (end < start) { -var tmp = start; -start = end; -end = tmp; -this.lastid = end; -}if (this.av.getSelectionGroup () == null) { -this.av.setSelectionGroup ( new jalview.datamodel.SequenceGroup ()); -}for (var i = start; i <= end; i++) { -this.av.getSelectionGroup ().addSequence (this.av.getAlignment ().getSequenceAt (i), i == end); -} -}, "~N,~N"); -Clazz.overrideMethod (c$, "mouseReleased", -function (e) { -if (this.scrollThread != null) { -this.scrollThread.running = false; -}if (this.av.getSelectionGroup () != null) { -this.av.getSelectionGroup ().recalcConservation (); -}this.mouseDragging = false; -jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); -this.av.sendSelection (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "highlightSearchResults", -function (list) { -this.idCanvas.setHighlighted (list); -if (list == null) { -return; -}var index = this.av.getAlignment ().findIndex (list.get (0)); -if (this.av.getStartSeq () > index || this.av.getEndSeq () < index) { -this.alignPanel.setScrollValues (this.av.getStartRes (), index); -}}, "java.util.List"); -c$.$IdPanel$ScrollThread$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.running = false; -this.up = true; -Clazz.instantialize (this, arguments); -}, jalview.appletgui.IdPanel, "ScrollThread", Thread); -Clazz.makeConstructor (c$, -function (a) { -Clazz.superConstructor (this, jalview.appletgui.IdPanel.ScrollThread, []); -this.up = a; -this.start (); -}, "~B"); -Clazz.defineMethod (c$, "stopScrolling", -function () { -this.running = false; -}); -Clazz.overrideMethod (c$, "run", -function () { -this.running = true; -while (this.running) { -if (this.b$["jalview.appletgui.IdPanel"].alignPanel.scrollUp (this.up)) { -var a = this.b$["jalview.appletgui.IdPanel"].av.getStartSeq (); -if (!this.up) { -a = this.b$["jalview.appletgui.IdPanel"].av.getEndSeq (); -}if (a < this.b$["jalview.appletgui.IdPanel"].lastid) { -this.b$["jalview.appletgui.IdPanel"].selectSeqs (this.b$["jalview.appletgui.IdPanel"].lastid - 1, a); -} else if (a > this.b$["jalview.appletgui.IdPanel"].lastid && a < this.b$["jalview.appletgui.IdPanel"].av.getAlignment ().getHeight ()) { -this.b$["jalview.appletgui.IdPanel"].selectSeqs (this.b$["jalview.appletgui.IdPanel"].lastid + 1, a); -}this.b$["jalview.appletgui.IdPanel"].lastid = a; -} else { -this.running = false; -}this.b$["jalview.appletgui.IdPanel"].alignPanel.paintAlignment (true); -try { -Thread.sleep (100); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -} -}); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.lang.Thread", "java.util.Vector"], "jalview.appletgui.IdPanel", ["jalview.appletgui.APopupMenu", "$.IdCanvas", "$.PaintRefresher", "$.Tooltip", "jalview.datamodel.SequenceGroup", "jalview.util.UrlLink", "java.awt.BorderLayout", "java.lang.Float", "$.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.idCanvas = null; +this.av = null; +this.alignPanel = null; +this.scrollThread = null; +this.lastid = -1; +this.mouseDragging = false; +this.links = null; +this.tooltip = null; +if (!Clazz.isClassDefined ("jalview.appletgui.IdPanel.ScrollThread")) { +jalview.appletgui.IdPanel.$IdPanel$ScrollThread$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "IdPanel", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); +Clazz.prepareFields (c$, function () { +this.links = new java.util.Vector (); +}); +Clazz.makeConstructor (c$, +function (av, parent) { +Clazz.superConstructor (this, jalview.appletgui.IdPanel, []); +this.setName ("idPanel"); +this.av = av; +this.alignPanel = parent; +this.idCanvas = new jalview.appletgui.IdCanvas (av); +this.setLayout ( new java.awt.BorderLayout ()); +this.add (this.idCanvas, "Center"); +this.idCanvas.addMouseListener (this); +this.idCanvas.addMouseMotionListener (this); +if (av.applet != null) { +av.applet.getLinkParams (this.links); +}{ +var srsPos = this.links.indexOf ("SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry"); +if (srsPos > -1) { +this.links.setElementAt ("EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$", srsPos); +}}if (this.links.size () < 1) { +this.links = new java.util.Vector (); +this.links.addElement ("EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"); +}}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); +Clazz.overrideMethod (c$, "mouseMoved", +function (e) { +var seq = this.alignPanel.seqPanel.findSeq (e); +var sequence = this.av.getAlignment ().getSequenceAt (seq); +var tooltiptext = new StringBuffer (); +if (sequence != null) { +if (sequence.getDescription () != null) { +tooltiptext.append (sequence.getDescription ()); +tooltiptext.append ("\n"); +}var sf = sequence.getSequenceFeatures (); +for (var sl = 0; sf != null && sl < sf.length; sl++) { +if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0) { +var nl = false; +if (sf[sl].getFeatureGroup () != null) { +tooltiptext.append (sf[sl].getFeatureGroup ()); +nl = true; +};if (sf[sl].getType () != null) { +tooltiptext.append (" "); +tooltiptext.append (sf[sl].getType ()); +nl = true; +};if (sf[sl].getDescription () != null) { +tooltiptext.append (" "); +tooltiptext.append (sf[sl].getDescription ()); +nl = true; +};if (!Float.isNaN (sf[sl].getScore ()) && sf[sl].getScore () != 0) { +tooltiptext.append (" Score = "); +tooltiptext.append (sf[sl].getScore ()); +nl = true; +};if (sf[sl].getStatus () != null && sf[sl].getStatus ().length > 0) { +tooltiptext.append (" ("); +tooltiptext.append (sf[sl].getStatus ()); +tooltiptext.append (")"); +nl = true; +};if (nl) { +tooltiptext.append ("\n"); +}}} +}if (tooltiptext.length () == 0) { +if (this.tooltip != null) { +this.tooltip.setVisible (false); +}this.tooltip = null; +tooltiptext = null; +return; +}if (this.tooltip == null) { +this.tooltip = new jalview.appletgui.Tooltip (sequence.getDisplayId (true) + "\n" + tooltiptext.toString (), this.idCanvas); +} else { +this.tooltip.setTip (sequence.getDisplayId (true) + "\n" + tooltiptext.toString ()); +}tooltiptext = null; +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (e) { +this.mouseDragging = true; +var seq = Math.max (0, this.alignPanel.seqPanel.findSeq (e)); +if (seq < this.lastid) { +this.selectSeqs (this.lastid - 1, seq); +} else if (seq > this.lastid) { +this.selectSeqs (this.lastid + 1, seq); +}this.lastid = seq; +this.alignPanel.paintAlignment (false); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (e) { +if (e.getClickCount () < 2) { +return; +}var seq = this.alignPanel.seqPanel.findSeq (e); +var sq = this.av.getAlignment ().getSequenceAt (seq); +if (sq == null) { +return; +}var id = sq.getName (); +var target = null; +var url = null; +var i = 0; +while (url == null && i < this.links.size ()) { +url = this.links.elementAt (i++).toString (); +var urlLink = null; +try { +urlLink = new jalview.util.UrlLink (url); +target = urlLink.getTarget (); +} catch (foo) { +if (Clazz.exceptionOf (foo, Exception)) { +System.err.println ("Exception for URLLink '" + url + "'"); +foo.printStackTrace (); +url = null; +continue; +} else { +throw foo; +} +} +;if (!urlLink.isValid ()) { +System.err.println (urlLink.getInvalidMessage ()); +url = null; +continue; +}var urls = urlLink.makeUrls (id, true); +if (urls == null || urls[0] == null || urls[0].length < 1) { +url = null; +continue; +}url = urls[1]; +} +try { +this.alignPanel.alignFrame.showURL (url, target); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (e) { +if (this.scrollThread != null) { +this.scrollThread.running = false; +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (e) { +if (this.av.getWrapAlignment ()) { +return; +}if (this.mouseDragging && e.getY () < 0 && this.av.getStartSeq () > 0) { +this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.IdPanel.ScrollThread, this, null, true); +}if (this.mouseDragging && e.getY () >= this.getSize ().height && this.av.getAlignment ().getHeight () > this.av.getEndSeq ()) { +this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.IdPanel.ScrollThread, this, null, false); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mousePressed", +function (e) { +if (e.getClickCount () > 1) { +return; +}var y = e.getY (); +if (this.av.getWrapAlignment ()) { +y -= 2 * this.av.getCharHeight (); +}var seq = this.alignPanel.seqPanel.findSeq (e); +if ((e.getModifiers () & 4) == 4) { +var sq = this.av.getAlignment ().getSequenceAt (seq); +var nlinks = new java.util.Vector (); +for (var l = 0, lSize = this.links.size (); l < lSize; l++) { +nlinks.addElement (this.links.elementAt (l)); +} +var sf = sq == null ? null : sq.getSequenceFeatures (); +for (var sl = 0; sf != null && sl < sf.length; sl++) { +if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0) { +if (sf[sl].links != null && sf[sl].links.size () > 0) { +for (var l = 0, lSize = sf[sl].links.size (); l < lSize; l++) { +nlinks.addElement (sf[sl].links.elementAt (l)); +} +}}} +var popup = new jalview.appletgui.APopupMenu (this.alignPanel, sq, nlinks); +this.add (popup); +popup.show (this, e.getX (), e.getY ()); +return; +}if ((this.av.getSelectionGroup () == null) || ((!e.isControlDown () && !e.isShiftDown ()) && this.av.getSelectionGroup () != null)) { +this.av.setSelectionGroup ( new jalview.datamodel.SequenceGroup ()); +this.av.getSelectionGroup ().setStartRes (0); +this.av.getSelectionGroup ().setEndRes (this.av.getAlignment ().getWidth () - 1); +}if (e.isShiftDown () && this.lastid != -1) { +this.selectSeqs (this.lastid, seq); +} else { +this.selectSeq (seq); +}this.alignPanel.paintAlignment (false); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "selectSeq", +function (seq) { +this.lastid = seq; +var pickedSeq = this.av.getAlignment ().getSequenceAt (seq); +this.av.getSelectionGroup ().addOrRemove (pickedSeq, true); +}, "~N"); +Clazz.defineMethod (c$, "selectSeqs", +function (start, end) { +this.lastid = start; +if (end >= this.av.getAlignment ().getHeight ()) { +end = this.av.getAlignment ().getHeight () - 1; +}if (end < start) { +var tmp = start; +start = end; +end = tmp; +this.lastid = end; +}if (this.av.getSelectionGroup () == null) { +this.av.setSelectionGroup ( new jalview.datamodel.SequenceGroup ()); +}for (var i = start; i <= end; i++) { +this.av.getSelectionGroup ().addSequence (this.av.getAlignment ().getSequenceAt (i), i == end); +} +}, "~N,~N"); +Clazz.overrideMethod (c$, "mouseReleased", +function (e) { +if (this.scrollThread != null) { +this.scrollThread.running = false; +}if (this.av.getSelectionGroup () != null) { +this.av.getSelectionGroup ().recalcConservation (); +}this.mouseDragging = false; +jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); +this.av.sendSelection (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "highlightSearchResults", +function (list) { +this.idCanvas.setHighlighted (list); +if (list == null) { +return; +}var index = this.av.getAlignment ().findIndex (list.get (0)); +if (this.av.getStartSeq () > index || this.av.getEndSeq () < index) { +this.alignPanel.setScrollValues (this.av.getStartRes (), index); +}}, "java.util.List"); +c$.$IdPanel$ScrollThread$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.running = false; +this.up = true; +Clazz.instantialize (this, arguments); +}, jalview.appletgui.IdPanel, "ScrollThread", Thread); +Clazz.makeConstructor (c$, +function (a) { +Clazz.superConstructor (this, jalview.appletgui.IdPanel.ScrollThread, []); +this.up = a; +this.start (); +}, "~B"); +Clazz.defineMethod (c$, "stopScrolling", +function () { +this.running = false; +}); +Clazz.overrideMethod (c$, "run", +function () { +this.running = true; +while (this.running) { +if (this.b$["jalview.appletgui.IdPanel"].alignPanel.scrollUp (this.up)) { +var a = this.b$["jalview.appletgui.IdPanel"].av.getStartSeq (); +if (!this.up) { +a = this.b$["jalview.appletgui.IdPanel"].av.getEndSeq (); +}if (a < this.b$["jalview.appletgui.IdPanel"].lastid) { +this.b$["jalview.appletgui.IdPanel"].selectSeqs (this.b$["jalview.appletgui.IdPanel"].lastid - 1, a); +} else if (a > this.b$["jalview.appletgui.IdPanel"].lastid && a < this.b$["jalview.appletgui.IdPanel"].av.getAlignment ().getHeight ()) { +this.b$["jalview.appletgui.IdPanel"].selectSeqs (this.b$["jalview.appletgui.IdPanel"].lastid + 1, a); +}this.b$["jalview.appletgui.IdPanel"].lastid = a; +} else { +this.running = false; +}this.b$["jalview.appletgui.IdPanel"].alignPanel.paintAlignment (true); +try { +Thread.sleep (100); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +} +}); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/IdwidthAdjuster.js b/bin/jalview/appletgui/IdwidthAdjuster.js index 80a0c59..e7b92f7 100644 --- a/bin/jalview/appletgui/IdwidthAdjuster.js +++ b/bin/jalview/appletgui/IdwidthAdjuster.js @@ -1,66 +1,66 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.IdwidthAdjuster", ["java.awt.Color", "$.Toolkit"], function () { -c$ = Clazz.decorateAsClass (function () { -this.active = false; -this.oldX = 0; -this.image = null; -this.ap = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "IdwidthAdjuster", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); -Clazz.makeConstructor (c$, -function (ap) { -Clazz.superConstructor (this, jalview.appletgui.IdwidthAdjuster, []); -this.setName ("IdwidthAdjuster"); -this.setLayout (null); -this.ap = ap; -var url = this.getClass ().getResource ("/images/idwidth.gif"); -if (url != null) { -this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (url); -}this.addMouseListener (this); -this.addMouseMotionListener (this); -}, "jalview.appletgui.AlignmentPanel"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -this.oldX = evt.getX (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -this.active = false; -this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -this.active = true; -this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -this.active = false; -this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -this.active = true; -var d = this.ap.idPanel.idCanvas.getSize (); -var dif = evt.getX () - this.oldX; -var newWidth = d.width + dif; -if (newWidth > 20 || dif > 0) { -this.ap.setIdWidth (newWidth, d.height); -this.setSize (newWidth, this.getSize ().height); -this.oldX = evt.getX (); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "PaintComponent", -function (g) { -g.setColor (java.awt.Color.white); -g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); -if (this.active) { -if (this.image != null) { -g.drawImage (this.image, this.getSize ().width - 20, 2, this); -}}}, "java.awt.Graphics"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.IdwidthAdjuster", ["java.awt.Color", "$.Toolkit"], function () { +c$ = Clazz.decorateAsClass (function () { +this.active = false; +this.oldX = 0; +this.image = null; +this.ap = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "IdwidthAdjuster", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.IdwidthAdjuster, []); +this.setName ("IdwidthAdjuster"); +this.setLayout (null); +this.ap = ap; +var url = this.getClass ().getResource ("/images/idwidth.gif"); +if (url != null) { +this.image = java.awt.Toolkit.getDefaultToolkit ().getImage (url); +}this.addMouseListener (this); +this.addMouseMotionListener (this); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +this.oldX = evt.getX (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +this.active = false; +this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +this.active = true; +this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +this.active = false; +this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +this.active = true; +var d = this.ap.idPanel.idCanvas.getSize (); +var dif = evt.getX () - this.oldX; +var newWidth = d.width + dif; +if (newWidth > 20 || dif > 0) { +this.ap.setIdWidth (newWidth, d.height); +this.setSize (newWidth, this.getSize ().height); +this.oldX = evt.getX (); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "PaintComponent", +function (g) { +g.setColor (java.awt.Color.white); +g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); +if (this.active) { +if (this.image != null) { +g.drawImage (this.image, this.getSize ().width - 20, 2, this); +}}}, "java.awt.Graphics"); +}); diff --git a/bin/jalview/appletgui/JVDialog.js b/bin/jalview/appletgui/JVDialog.js index 6f85ed1..ed9ee14 100644 --- a/bin/jalview/appletgui/JVDialog.js +++ b/bin/jalview/appletgui/JVDialog.js @@ -1,40 +1,40 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["java.awt.Dialog", "java.awt.event.ActionListener", "awt2swing.Button"], "jalview.appletgui.JVDialog", ["awt2swing.Panel", "java.awt.FlowLayout"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ap = null; -this.buttonPanel = null; -this.ok = null; -this.cancel = null; -this.accept = false; -this.owner = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "JVDialog", java.awt.Dialog, java.awt.event.ActionListener); -Clazz.prepareFields (c$, function () { -this.ok = new awt2swing.Button ("Accept"); -this.cancel = new awt2swing.Button ("Cancel"); -}); -Clazz.makeConstructor (c$, -function (owner, title, modal, width, height) { -Clazz.superConstructor (this, jalview.appletgui.JVDialog, [owner, title, modal]); -this.owner = owner; -height += owner.getInsets ().top + this.getInsets ().bottom; -this.setBounds (owner.getBounds ().x + Clazz.doubleToInt ((owner.getSize ().width - width) / 2), owner.getBounds ().y + Clazz.doubleToInt ((owner.getSize ().height - height) / 2), width, height); -}, "awt2swing.Frame,~S,~B,~N,~N"); -Clazz.defineMethod (c$, "setMainPanel", -function (panel) { -this.add (panel, "North"); -this.buttonPanel = new awt2swing.Panel ( new java.awt.FlowLayout ()); -this.buttonPanel.add (this.ok); -this.buttonPanel.add (this.cancel); -this.ok.addActionListener (this); -this.cancel.addActionListener (this); -this.add (this.buttonPanel, "South"); -this.pack (); -}, "awt2swing.Panel"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.ok) { -this.accept = true; -}this.setVisible (false); -}, "java.awt.event.ActionEvent"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["java.awt.Dialog", "java.awt.event.ActionListener", "awt2swing.Button"], "jalview.appletgui.JVDialog", ["awt2swing.Panel", "java.awt.FlowLayout"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ap = null; +this.buttonPanel = null; +this.ok = null; +this.cancel = null; +this.accept = false; +this.owner = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "JVDialog", java.awt.Dialog, java.awt.event.ActionListener); +Clazz.prepareFields (c$, function () { +this.ok = new awt2swing.Button ("Accept"); +this.cancel = new awt2swing.Button ("Cancel"); +}); +Clazz.makeConstructor (c$, +function (owner, title, modal, width, height) { +Clazz.superConstructor (this, jalview.appletgui.JVDialog, [owner, title, modal]); +this.owner = owner; +height += owner.getInsets ().top + this.getInsets ().bottom; +this.setBounds (owner.getBounds ().x + Clazz.doubleToInt ((owner.getSize ().width - width) / 2), owner.getBounds ().y + Clazz.doubleToInt ((owner.getSize ().height - height) / 2), width, height); +}, "awt2swing.Frame,~S,~B,~N,~N"); +Clazz.defineMethod (c$, "setMainPanel", +function (panel) { +this.add (panel, "North"); +this.buttonPanel = new awt2swing.Panel ( new java.awt.FlowLayout ()); +this.buttonPanel.add (this.ok); +this.buttonPanel.add (this.cancel); +this.ok.addActionListener (this); +this.cancel.addActionListener (this); +this.add (this.buttonPanel, "South"); +this.pack (); +}, "awt2swing.Panel"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.ok) { +this.accept = true; +}this.setVisible (false); +}, "java.awt.event.ActionEvent"); +}); diff --git a/bin/jalview/appletgui/OverviewPanel.class b/bin/jalview/appletgui/OverviewPanel.class index 58462cbc301532856b8df79eee989663d056be7e..e63efea68145a055c9caabf1ca5197284c92485b 100644 GIT binary patch delta 89 zcmbQ>*Xy?-OO(-UbGE25laLSt^M8iD49x5djO+~dObiS*n-_{Rvoc=Yyi}&2mB*Dq r{4awoBctAbhO?6mmBl9KEAvcFQqq`wT}cwm-k{{qXuFwFnV$s!8q^o~ delta 96 zcmeD6o8Y%0OO(-kbGE25ldv!Y%YTNw49x5djO+~dObiT`Oq&;oGqW;Y-@HVopOwd* uLGmwyEhD4ee}=P@H!4X^&R6D~oT#M1!t|ek2`;cs$)CxJY4blNeii`0J{na3 diff --git a/bin/jalview/appletgui/OverviewPanel.js b/bin/jalview/appletgui/OverviewPanel.js index cadd6b7..41baadd 100644 --- a/bin/jalview/appletgui/OverviewPanel.js +++ b/bin/jalview/appletgui/OverviewPanel.js @@ -1,262 +1,262 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.OverviewPanel", ["awt2swing.Frame", "jalview.appletgui.FeatureRenderer", "$.SequenceRenderer", "java.awt.Color", "$.Dimension", "java.awt.event.ComponentAdapter", "java.lang.Thread"], function () { -c$ = Clazz.decorateAsClass (function () { -this.miniMe = null; -this.offscreen = null; -this.av = null; -this.ap = null; -this.scalew = 1; -this.scaleh = 1; -this.$width = 0; -this.sequencesHeight = 0; -this.graphHeight = 20; -this.boxX = -1; -this.boxY = -1; -this.boxWidth = -1; -this.boxHeight = -1; -this.resizing = false; -this.sr = null; -this.fr = null; -this.nullFrame = null; -this.resizeAgain = false; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "OverviewPanel", awt2swing.Panel, [Runnable, java.awt.event.MouseMotionListener, java.awt.event.MouseListener]); -Clazz.makeConstructor (c$, -function (ap) { -Clazz.superConstructor (this, jalview.appletgui.OverviewPanel, []); -this.av = ap.av; -this.ap = ap; -this.setLayout (null); -this.nullFrame = new awt2swing.Frame (); -this.nullFrame.addNotify (); -this.sr = new jalview.appletgui.SequenceRenderer (this.av); -this.sr.graphics = this.nullFrame.getGraphics (); -this.sr.renderGaps = false; -this.sr.forOverview = true; -this.fr = new jalview.appletgui.FeatureRenderer (this.av); -var initialScale = this.av.getAlignment ().getWidth () / this.av.getAlignment ().getHeight (); -if (this.av.getSequenceConsensusHash () == null) { -this.graphHeight = 0; -}if (this.av.getAlignment ().getWidth () > this.av.getAlignment ().getHeight ()) { -this.$width = 400; -this.sequencesHeight = Clazz.floatToInt (400 / initialScale); -if (this.sequencesHeight < 40) { -this.sequencesHeight = 40; -}} else { -this.$width = Clazz.floatToInt (400 * initialScale); -this.sequencesHeight = 300; -if (this.$width < 120) { -this.$width = 120; -}}this.setSize ( new java.awt.Dimension (this.$width, this.sequencesHeight + this.graphHeight)); -this.addComponentListener (((Clazz.isClassDefined ("jalview.appletgui.OverviewPanel$1") ? 0 : jalview.appletgui.OverviewPanel.$OverviewPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.OverviewPanel$1, this, null))); -this.addMouseMotionListener (this); -this.addMouseListener (this); -this.updateOverviewImage (); -}, "jalview.appletgui.AlignmentPanel"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -this.boxX = evt.getX (); -this.boxY = evt.getY (); -this.checkValid (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -this.boxX = evt.getX (); -this.boxY = evt.getY (); -this.checkValid (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -this.boxX = evt.getX (); -this.boxY = evt.getY (); -this.checkValid (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "checkValid", -function () { -if (this.boxY < 0) { -this.boxY = 0; -}if (this.boxY > (this.sequencesHeight - this.boxHeight)) { -this.boxY = this.sequencesHeight - this.boxHeight + 1; -}if (this.boxX < 0) { -this.boxX = 0; -}if (this.boxX > (this.$width - this.boxWidth)) { -if (this.av.hasHiddenColumns ()) { -this.boxWidth = Clazz.floatToInt ((this.av.endRes - this.av.startRes + 1) * this.av.getCharWidth () * this.scalew); -}this.boxX = this.$width - this.boxWidth; -}var col = Clazz.floatToInt (this.boxX / this.scalew / this.av.getCharWidth ()); -var row = Clazz.floatToInt (this.boxY / this.scaleh / this.av.getCharHeight ()); -if (this.av.hasHiddenColumns ()) { -if (!this.av.getColumnSelection ().isVisible (col)) { -return; -}col = this.av.getColumnSelection ().findColumnPosition (col); -}if (this.av.hasHiddenRows ()) { -row = this.av.getAlignment ().getHiddenSequences ().findIndexWithoutHiddenSeqs (row); -}this.ap.setScrollValues (col, row); -this.ap.paintAlignment (false); -}); -Clazz.defineMethod (c$, "updateOverviewImage", -function () { -if (this.resizing) { -this.resizeAgain = true; -return; -}if (this.av.isShowSequenceFeatures ()) { -this.fr.transferSettings (this.ap.seqPanel.seqCanvas.fr); -}this.resizing = true; -if ((this.getSize ().width > 0) && (this.getSize ().height > 0)) { -this.$width = this.getSize ().width; -this.sequencesHeight = this.getSize ().height - this.graphHeight; -}this.setSize ( new java.awt.Dimension (this.$width, this.sequencesHeight + this.graphHeight)); -var thread = new Thread (this); -thread.start (); -this.repaint (); -}); -Clazz.overrideMethod (c$, "run", -function () { -this.miniMe = null; -var alwidth = this.av.getAlignment ().getWidth (); -var alheight = this.av.getAlignment ().getHeight (); -if (this.av.isShowSequenceFeatures ()) { -this.fr.transferSettings (this.ap.seqPanel.seqCanvas.getFeatureRenderer ()); -}if (this.getSize ().width > 0 && this.getSize ().height > 0) { -this.$width = this.getSize ().width; -this.sequencesHeight = this.getSize ().height - this.graphHeight; -}this.setSize ( new java.awt.Dimension (this.$width, this.sequencesHeight + this.graphHeight)); -var fullsizeWidth = alwidth * this.av.getCharWidth (); -var fullsizeHeight = alheight * this.av.getCharHeight (); -this.scalew = this.$width / fullsizeWidth; -this.scaleh = this.sequencesHeight / fullsizeHeight; -this.miniMe = this.nullFrame.createImage (this.$width, this.sequencesHeight + this.graphHeight); -this.offscreen = this.nullFrame.createImage (this.$width, this.sequencesHeight + this.graphHeight); -var mg = this.miniMe.getGraphics (); -var sampleCol = alwidth / this.$width; -var sampleRow = alheight / this.sequencesHeight; -var lastcol = 0; -var lastrow = 0; -var xstart = 0; -var ystart = 0; -var color = java.awt.Color.yellow; -var row; -var col; -var sameRow = 0; -var sameCol = 0; -var seq; -var hasHiddenRows = this.av.hasHiddenRows (); -var hasHiddenCols = this.av.hasHiddenColumns (); -var hiddenRow = false; -var alignment = this.av.getAlignment (); -for (row = 0; row <= this.sequencesHeight; row++) { -if (Clazz.floatToInt (row * sampleRow) == lastrow) { -sameRow++; -continue; -}hiddenRow = false; -if (hasHiddenRows) { -seq = alignment.getHiddenSequences ().getHiddenSequence (lastrow); -if (seq == null) { -var index = alignment.getHiddenSequences ().findIndexWithoutHiddenSeqs (lastrow); -seq = alignment.getSequenceAt (index); -} else { -hiddenRow = true; -}} else { -seq = alignment.getSequenceAt (lastrow); -}for (col = 0; col < this.$width; col++) { -if (Clazz.floatToInt (col * sampleCol) == lastcol && Clazz.floatToInt (row * sampleRow) == lastrow) { -sameCol++; -continue; -}lastcol = Clazz.floatToInt (col * sampleCol); -if (seq.getLength () > lastcol) { -color = this.sr.getResidueBoxColour (seq, lastcol); -if (this.av.isShowSequenceFeatures ()) { -color = this.fr.findFeatureColour (color, seq, lastcol); -}} else { -color = java.awt.Color.white; -}if (hiddenRow || (hasHiddenCols && !this.av.getColumnSelection ().isVisible (lastcol))) { -color = color.darker ().darker (); -}mg.setColor (color); -if (sameCol == 1 && sameRow == 1) { -mg.drawLine (xstart, ystart, xstart, ystart); -} else { -mg.fillRect (xstart, ystart, sameCol, sameRow); -}xstart = col; -sameCol = 1; -} -lastrow = Clazz.floatToInt (row * sampleRow); -ystart = row; -sameRow = 1; -} -if (this.av.getAlignmentConservationAnnotation () != null) { -for (col = 0; col < this.$width; col++) { -lastcol = Clazz.floatToInt (col * sampleCol); -{ -mg.translate (col, this.sequencesHeight); -this.ap.annotationPanel.renderer.drawGraph (mg, this.av.getAlignmentConservationAnnotation (), this.av.getAlignmentConservationAnnotation ().annotations, Clazz.floatToInt (sampleCol) + 1, this.graphHeight, Clazz.floatToInt (col * sampleCol), Clazz.floatToInt (col * sampleCol) + 1); -mg.translate (-col, -this.sequencesHeight); -}} -}System.gc (); -this.resizing = false; -this.setBoxPosition (); -if (this.resizeAgain) { -this.resizeAgain = false; -this.updateOverviewImage (); -}}); -Clazz.defineMethod (c$, "setBoxPosition", -function () { -var fullsizeWidth = this.av.getAlignment ().getWidth () * this.av.getCharWidth (); -var fullsizeHeight = (this.av.getAlignment ().getHeight () + this.av.getAlignment ().getHiddenSequences ().getSize ()) * this.av.getCharHeight (); -var startRes = this.av.getStartRes (); -var endRes = this.av.getEndRes (); -if (this.av.hasHiddenColumns ()) { -startRes = this.av.getColumnSelection ().adjustForHiddenColumns (startRes); -endRes = this.av.getColumnSelection ().adjustForHiddenColumns (endRes); -}var startSeq = this.av.startSeq; -var endSeq = this.av.endSeq; -if (this.av.hasHiddenRows ()) { -startSeq = this.av.getAlignment ().getHiddenSequences ().adjustForHiddenSeqs (startSeq); -endSeq = this.av.getAlignment ().getHiddenSequences ().adjustForHiddenSeqs (endSeq); -}this.scalew = this.$width / fullsizeWidth; -this.scaleh = this.sequencesHeight / fullsizeHeight; -this.boxX = Clazz.floatToInt (startRes * this.av.getCharWidth () * this.scalew); -this.boxY = Clazz.floatToInt (startSeq * this.av.getCharHeight () * this.scaleh); -if (this.av.hasHiddenColumns ()) { -this.boxWidth = Clazz.floatToInt ((endRes - startRes + 1) * this.av.getCharWidth () * this.scalew); -} else { -this.boxWidth = Clazz.floatToInt ((endRes - startRes + 1) * this.av.getCharWidth () * this.scalew); -}this.boxHeight = Clazz.floatToInt ((endSeq - startSeq) * this.av.getCharHeight () * this.scaleh); -this.repaint (); -}); -Clazz.overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -var og = this.offscreen.getGraphics (); -if (this.miniMe != null) { -og.drawImage (this.miniMe, 0, 0, this); -og.setColor (java.awt.Color.red); -og.drawRect (this.boxX, this.boxY, this.boxWidth, this.boxHeight); -og.drawRect (this.boxX + 1, this.boxY + 1, this.boxWidth - 2, this.boxHeight - 2); -g.drawImage (this.offscreen, 0, 0, this); -}}, "java.awt.Graphics"); -c$.$OverviewPanel$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "OverviewPanel$1", java.awt.event.ComponentAdapter); -Clazz.overrideMethod (c$, "componentResized", -function (evt) { -if (this.b$["jalview.appletgui.OverviewPanel"].getSize ().width != this.b$["jalview.appletgui.OverviewPanel"].$width || this.b$["jalview.appletgui.OverviewPanel"].getSize ().height != this.b$["jalview.appletgui.OverviewPanel"].sequencesHeight + this.b$["jalview.appletgui.OverviewPanel"].graphHeight) { -this.b$["jalview.appletgui.OverviewPanel"].updateOverviewImage (); -}}, "java.awt.event.ComponentEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.OverviewPanel", ["awt2swing.Frame", "jalview.appletgui.FeatureRenderer", "$.SequenceRenderer", "java.awt.Color", "$.Dimension", "java.awt.event.ComponentAdapter", "java.lang.Thread"], function () { +c$ = Clazz.decorateAsClass (function () { +this.miniMe = null; +this.offscreen = null; +this.av = null; +this.ap = null; +this.scalew = 1; +this.scaleh = 1; +this.$width = 0; +this.sequencesHeight = 0; +this.graphHeight = 20; +this.boxX = -1; +this.boxY = -1; +this.boxWidth = -1; +this.boxHeight = -1; +this.resizing = false; +this.sr = null; +this.fr = null; +this.nullFrame = null; +this.resizeAgain = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "OverviewPanel", awt2swing.Panel, [Runnable, java.awt.event.MouseMotionListener, java.awt.event.MouseListener]); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.OverviewPanel, []); +this.av = ap.av; +this.ap = ap; +this.setLayout (null); +this.nullFrame = new awt2swing.Frame (); +this.nullFrame.addNotify (); +this.sr = new jalview.appletgui.SequenceRenderer (this.av); +this.sr.graphics = this.nullFrame.getGraphics (); +this.sr.renderGaps = false; +this.sr.forOverview = true; +this.fr = new jalview.appletgui.FeatureRenderer (this.av); +var initialScale = this.av.getAlignment ().getWidth () / this.av.getAlignment ().getHeight (); +if (this.av.getSequenceConsensusHash () == null) { +this.graphHeight = 0; +}if (this.av.getAlignment ().getWidth () > this.av.getAlignment ().getHeight ()) { +this.$width = 400; +this.sequencesHeight = Clazz.floatToInt (400 / initialScale); +if (this.sequencesHeight < 40) { +this.sequencesHeight = 40; +}} else { +this.$width = Clazz.floatToInt (400 * initialScale); +this.sequencesHeight = 300; +if (this.$width < 120) { +this.$width = 120; +}}this.setSize ( new java.awt.Dimension (this.$width, this.sequencesHeight + this.graphHeight)); +this.addComponentListener (((Clazz.isClassDefined ("jalview.appletgui.OverviewPanel$1") ? 0 : jalview.appletgui.OverviewPanel.$OverviewPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.OverviewPanel$1, this, null))); +this.addMouseMotionListener (this); +this.addMouseListener (this); +this.updateOverviewImage (); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +this.boxX = evt.getX (); +this.boxY = evt.getY (); +this.checkValid (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +this.boxX = evt.getX (); +this.boxY = evt.getY (); +this.checkValid (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +this.boxX = evt.getX (); +this.boxY = evt.getY (); +this.checkValid (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "checkValid", +function () { +if (this.boxY < 0) { +this.boxY = 0; +}if (this.boxY > (this.sequencesHeight - this.boxHeight)) { +this.boxY = this.sequencesHeight - this.boxHeight + 1; +}if (this.boxX < 0) { +this.boxX = 0; +}if (this.boxX > (this.$width - this.boxWidth)) { +if (this.av.hasHiddenColumns ()) { +this.boxWidth = Clazz.floatToInt ((this.av.endRes - this.av.startRes + 1) * this.av.getCharWidth () * this.scalew); +}this.boxX = this.$width - this.boxWidth; +}var col = Clazz.floatToInt (this.boxX / this.scalew / this.av.getCharWidth ()); +var row = Clazz.floatToInt (this.boxY / this.scaleh / this.av.getCharHeight ()); +if (this.av.hasHiddenColumns ()) { +if (!this.av.getColumnSelection ().isVisible (col)) { +return; +}col = this.av.getColumnSelection ().findColumnPosition (col); +}if (this.av.hasHiddenRows ()) { +row = this.av.getAlignment ().getHiddenSequences ().findIndexWithoutHiddenSeqs (row); +}this.ap.setScrollValues (col, row); +this.ap.paintAlignment (false); +}); +Clazz.defineMethod (c$, "updateOverviewImage", +function () { +if (this.resizing) { +this.resizeAgain = true; +return; +}if (this.av.isShowSequenceFeatures ()) { +this.fr.transferSettings (this.ap.seqPanel.seqCanvas.fr); +}this.resizing = true; +if ((this.getSize ().width > 0) && (this.getSize ().height > 0)) { +this.$width = this.getSize ().width; +this.sequencesHeight = this.getSize ().height - this.graphHeight; +}this.setSize ( new java.awt.Dimension (this.$width, this.sequencesHeight + this.graphHeight)); +var thread = new Thread (this); +thread.start (); +this.repaint (); +}); +Clazz.overrideMethod (c$, "run", +function () { +this.miniMe = null; +var alwidth = this.av.getAlignment ().getWidth (); +var alheight = this.av.getAlignment ().getHeight (); +if (this.av.isShowSequenceFeatures ()) { +this.fr.transferSettings (this.ap.seqPanel.seqCanvas.getFeatureRenderer ()); +}if (this.getSize ().width > 0 && this.getSize ().height > 0) { +this.$width = this.getSize ().width; +this.sequencesHeight = this.getSize ().height - this.graphHeight; +}this.setSize ( new java.awt.Dimension (this.$width, this.sequencesHeight + this.graphHeight)); +var fullsizeWidth = alwidth * this.av.getCharWidth (); +var fullsizeHeight = alheight * this.av.getCharHeight (); +this.scalew = this.$width / fullsizeWidth; +this.scaleh = this.sequencesHeight / fullsizeHeight; +this.miniMe = this.nullFrame.createImage (this.$width, this.sequencesHeight + this.graphHeight); +this.offscreen = this.nullFrame.createImage (this.$width, this.sequencesHeight + this.graphHeight); +var mg = this.miniMe.getGraphics (); +var sampleCol = alwidth / this.$width; +var sampleRow = alheight / this.sequencesHeight; +var lastcol = 0; +var lastrow = 0; +var xstart = 0; +var ystart = 0; +var color = java.awt.Color.yellow; +var row; +var col; +var sameRow = 0; +var sameCol = 0; +var seq; +var hasHiddenRows = this.av.hasHiddenRows (); +var hasHiddenCols = this.av.hasHiddenColumns (); +var hiddenRow = false; +var alignment = this.av.getAlignment (); +for (row = 0; row <= this.sequencesHeight; row++) { +if (Clazz.floatToInt (row * sampleRow) == lastrow) { +sameRow++; +continue; +}hiddenRow = false; +if (hasHiddenRows) { +seq = alignment.getHiddenSequences ().getHiddenSequence (lastrow); +if (seq == null) { +var index = alignment.getHiddenSequences ().findIndexWithoutHiddenSeqs (lastrow); +seq = alignment.getSequenceAt (index); +} else { +hiddenRow = true; +}} else { +seq = alignment.getSequenceAt (lastrow); +}for (col = 0; col < this.$width; col++) { +if (Clazz.floatToInt (col * sampleCol) == lastcol && Clazz.floatToInt (row * sampleRow) == lastrow) { +sameCol++; +continue; +}lastcol = Clazz.floatToInt (col * sampleCol); +if (seq.getLength () > lastcol) { +color = this.sr.getResidueBoxColour (seq, lastcol); +if (this.av.isShowSequenceFeatures ()) { +color = this.fr.findFeatureColour (color, seq, lastcol); +}} else { +color = java.awt.Color.white; +}if (hiddenRow || (hasHiddenCols && !this.av.getColumnSelection ().isVisible (lastcol))) { +color = color.darker ().darker (); +}mg.setColor (color); +if (sameCol == 1 && sameRow == 1) { +mg.drawLine (xstart, ystart, xstart, ystart); +} else { +mg.fillRect (xstart, ystart, sameCol, sameRow); +}xstart = col; +sameCol = 1; +} +lastrow = Clazz.floatToInt (row * sampleRow); +ystart = row; +sameRow = 1; +} +if (this.av.getAlignmentConservationAnnotation () != null) { +for (col = 0; col < this.$width; col++) { +lastcol = Clazz.floatToInt (col * sampleCol); +{ +mg.translate (col, this.sequencesHeight); +this.ap.annotationPanel.renderer.drawGraph (mg, this.av.getAlignmentConservationAnnotation (), this.av.getAlignmentConservationAnnotation ().annotations, Clazz.floatToInt (sampleCol) + 1, this.graphHeight, Clazz.floatToInt (col * sampleCol), Clazz.floatToInt (col * sampleCol) + 1); +mg.translate (-col, -this.sequencesHeight); +}} +}System.gc (); +this.resizing = false; +this.setBoxPosition (); +if (this.resizeAgain) { +this.resizeAgain = false; +this.updateOverviewImage (); +}}); +Clazz.defineMethod (c$, "setBoxPosition", +function () { +var fullsizeWidth = this.av.getAlignment ().getWidth () * this.av.getCharWidth (); +var fullsizeHeight = (this.av.getAlignment ().getHeight () + this.av.getAlignment ().getHiddenSequences ().getSize ()) * this.av.getCharHeight (); +var startRes = this.av.getStartRes (); +var endRes = this.av.getEndRes (); +if (this.av.hasHiddenColumns ()) { +startRes = this.av.getColumnSelection ().adjustForHiddenColumns (startRes); +endRes = this.av.getColumnSelection ().adjustForHiddenColumns (endRes); +}var startSeq = this.av.startSeq; +var endSeq = this.av.endSeq; +if (this.av.hasHiddenRows ()) { +startSeq = this.av.getAlignment ().getHiddenSequences ().adjustForHiddenSeqs (startSeq); +endSeq = this.av.getAlignment ().getHiddenSequences ().adjustForHiddenSeqs (endSeq); +}this.scalew = this.$width / fullsizeWidth; +this.scaleh = this.sequencesHeight / fullsizeHeight; +this.boxX = Clazz.floatToInt (startRes * this.av.getCharWidth () * this.scalew); +this.boxY = Clazz.floatToInt (startSeq * this.av.getCharHeight () * this.scaleh); +if (this.av.hasHiddenColumns ()) { +this.boxWidth = Clazz.floatToInt ((endRes - startRes + 1) * this.av.getCharWidth () * this.scalew); +} else { +this.boxWidth = Clazz.floatToInt ((endRes - startRes + 1) * this.av.getCharWidth () * this.scalew); +}this.boxHeight = Clazz.floatToInt ((endSeq - startSeq) * this.av.getCharHeight () * this.scaleh); +this.repaint (); +}); +Clazz.overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +var og = this.offscreen.getGraphics (); +if (this.miniMe != null) { +og.drawImage (this.miniMe, 0, 0, this); +og.setColor (java.awt.Color.red); +og.drawRect (this.boxX, this.boxY, this.boxWidth, this.boxHeight); +og.drawRect (this.boxX + 1, this.boxY + 1, this.boxWidth - 2, this.boxHeight - 2); +g.drawImage (this.offscreen, 0, 0, this); +}}, "java.awt.Graphics"); +c$.$OverviewPanel$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "OverviewPanel$1", java.awt.event.ComponentAdapter); +Clazz.overrideMethod (c$, "componentResized", +function (evt) { +if (this.b$["jalview.appletgui.OverviewPanel"].getSize ().width != this.b$["jalview.appletgui.OverviewPanel"].$width || this.b$["jalview.appletgui.OverviewPanel"].getSize ().height != this.b$["jalview.appletgui.OverviewPanel"].sequencesHeight + this.b$["jalview.appletgui.OverviewPanel"].graphHeight) { +this.b$["jalview.appletgui.OverviewPanel"].updateOverviewImage (); +}}, "java.awt.event.ComponentEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/PCAPanel.class b/bin/jalview/appletgui/PCAPanel.class index 92d23e527ae8ea54793305dc72df08ca8a6a384b..fbccea51faad9e29b6292a88ea0aed3f33d72f13 100644 GIT binary patch delta 37 tcmeAU>I&MhO_9-f^L9loMqUmEHX%VlAuV+V7RH*%h01E1MU}s?0szFv36TH* delta 38 ucmeAQ>JHklO_9-L^L9loMm|mkb|FDQA$2Bo1{TJe$py-4n?;nru>t_fzX_56 diff --git a/bin/jalview/appletgui/PCAPanel.js b/bin/jalview/appletgui/PCAPanel.js index 7813b4d..77168bf 100644 --- a/bin/jalview/appletgui/PCAPanel.js +++ b/bin/jalview/appletgui/PCAPanel.js @@ -1,253 +1,253 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.appletgui.EmbmenuFrame", "java.awt.event.ActionListener", "$.ItemListener", "awt2swing.Button", "$.CheckboxMenuItem", "$.Choice", "$.Label", "$.Menu", "$.MenuBar", "$.MenuItem", "$.Panel", "java.awt.BorderLayout", "$.FlowLayout"], "jalview.appletgui.PCAPanel", ["awt2swing.Frame", "jalview.appletgui.AlignFrame", "$.CutAndPasteTransfer", "$.RotatableCanvas", "jalview.bin.JalviewLite", "jalview.datamodel.Alignment", "jalview.util.MessageManager", "jalview.viewmodel.PCAModel", "java.awt.Color", "$.Font", "java.lang.Thread"], function () { -c$ = Clazz.decorateAsClass (function () { -this.rc = null; -this.av = null; -this.pcaModel = null; -this.top = 0; -this.jPanel2 = null; -this.jLabel1 = null; -this.jLabel2 = null; -this.jLabel3 = null; -this.xCombobox = null; -this.yCombobox = null; -this.zCombobox = null; -this.resetButton = null; -this.flowLayout1 = null; -this.borderLayout1 = null; -this.menuBar1 = null; -this.menu1 = null; -this.menu2 = null; -this.calcSettings = null; -this.labels = null; -this.protSetting = null; -this.nuclSetting = null; -this.values = null; -this.inputData = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "PCAPanel", jalview.appletgui.EmbmenuFrame, [Runnable, java.awt.event.ActionListener, java.awt.event.ItemListener]); -Clazz.prepareFields (c$, function () { -this.jPanel2 = new awt2swing.Panel (); -this.jLabel1 = new awt2swing.Label (); -this.jLabel2 = new awt2swing.Label (); -this.jLabel3 = new awt2swing.Label (); -this.xCombobox = new awt2swing.Choice (); -this.yCombobox = new awt2swing.Choice (); -this.zCombobox = new awt2swing.Choice (); -this.resetButton = new awt2swing.Button (); -this.flowLayout1 = new java.awt.FlowLayout (); -this.borderLayout1 = new java.awt.BorderLayout (); -this.menuBar1 = new awt2swing.MenuBar (); -this.menu1 = new awt2swing.Menu (); -this.menu2 = new awt2swing.Menu (); -this.calcSettings = new awt2swing.Menu (); -this.labels = new awt2swing.CheckboxMenuItem (); -this.protSetting = new awt2swing.CheckboxMenuItem (); -this.nuclSetting = new awt2swing.CheckboxMenuItem (); -this.values = new awt2swing.MenuItem (); -this.inputData = new awt2swing.MenuItem (); -}); -Clazz.makeConstructor (c$, -function (av) { -Clazz.superConstructor (this, jalview.appletgui.PCAPanel, []); -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -for (var i = 1; i < 8; i++) { -this.xCombobox.addItem ("dim " + i); -this.yCombobox.addItem ("dim " + i); -this.zCombobox.addItem ("dim " + i); -} -this.av = av; -var selected = av.getSelectionGroup () != null && av.getSelectionGroup ().getSize () > 0; -var seqstrings = av.getAlignmentView (selected); -var nucleotide = av.getAlignment ().isNucleotide (); -var seqs; -if (!selected) { -seqs = av.getAlignment ().getSequencesArray (); -} else { -seqs = av.getSelectionGroup ().getSequencesInOrder (av.getAlignment ()); -}var sq = seqstrings.getSequences (); -var length = sq[0].getWidth (); -for (var i = 0; i < seqs.length; i++) { -if (sq[i].getWidth () != length) { -System.out.println ("Sequences must be equal length for PCA analysis"); -return; -}} -this.pcaModel = new jalview.viewmodel.PCAModel (seqstrings, seqs, nucleotide); -this.rc = new jalview.appletgui.RotatableCanvas (av); -this.embedMenuIfNeeded (this.rc); -this.add (this.rc, "Center"); -jalview.bin.JalviewLite.addFrame (this, jalview.util.MessageManager.getString ("label.principal_component_analysis"), 475, 400); -var worker = new Thread (this); -worker.start (); -}, "jalview.appletgui.AlignViewport"); -Clazz.overrideMethod (c$, "run", -function () { -this.calcSettings.setEnabled (false); -this.rc.setEnabled (false); -try { -this.nuclSetting.setState (this.pcaModel.isNucleotide ()); -this.protSetting.setState (!this.pcaModel.isNucleotide ()); -this.pcaModel.run (); -this.xCombobox.select (new Integer (0)); -this.yCombobox.select (new Integer (1)); -this.zCombobox.select (new Integer (2)); -this.pcaModel.updateRc (this.rc); -this.top = this.pcaModel.getTop (); -} catch (x) { -if (Clazz.exceptionOf (x, OutOfMemoryError)) { -System.err.println ("Out of memory when calculating PCA."); -return; -} else { -throw x; -} -} -this.calcSettings.setEnabled (true); -this.rc.setEnabled (true); -this.rc.repaint (); -this.repaint (); -}); -Clazz.defineMethod (c$, "doDimensionChange", -function () { -if (this.top == 0) { -return; -}var dim1 = this.top - this.xCombobox.getSelectedIndex (); -var dim2 = this.top - this.yCombobox.getSelectedIndex (); -var dim3 = this.top - this.zCombobox.getSelectedIndex (); -this.pcaModel.updateRcView (dim1, dim2, dim3); -this.rc.img = null; -this.rc.rotmat.setIdentity (); -this.rc.initAxes (); -this.rc.paint (this.rc.getGraphics ()); -}); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.inputData) { -this.showOriginalData (); -}if (evt.getSource () === this.resetButton) { -this.xCombobox.select (new Integer (0)); -this.yCombobox.select (new Integer (1)); -this.zCombobox.select (new Integer (2)); -this.doDimensionChange (); -}if (evt.getSource () === this.values) { -this.values_actionPerformed (); -}}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "itemStateChanged", -function (evt) { -if (evt.getSource () === this.xCombobox) { -this.xCombobox_actionPerformed (); -} else if (evt.getSource () === this.yCombobox) { -this.yCombobox_actionPerformed (); -} else if (evt.getSource () === this.zCombobox) { -this.zCombobox_actionPerformed (); -} else if (evt.getSource () === this.labels) { -this.labels_itemStateChanged (evt); -} else if (evt.getSource () === this.nuclSetting) { -if (!this.pcaModel.isNucleotide ()) { -this.pcaModel.setNucleotide (true); - new Thread (this).start (); -}} else if (evt.getSource () === this.protSetting) { -if (this.pcaModel.isNucleotide ()) { -this.pcaModel.setNucleotide (false); - new Thread (this).start (); -}}}, "java.awt.event.ItemEvent"); -Clazz.defineMethod (c$, "xCombobox_actionPerformed", -function () { -this.doDimensionChange (); -}); -Clazz.defineMethod (c$, "yCombobox_actionPerformed", -function () { -this.doDimensionChange (); -}); -Clazz.defineMethod (c$, "zCombobox_actionPerformed", -function () { -this.doDimensionChange (); -}); -Clazz.defineMethod (c$, "values_actionPerformed", -function () { -var cap = new jalview.appletgui.CutAndPasteTransfer (false, null); -var frame = new awt2swing.Frame (); -frame.add (cap); -jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.pca_details"), 500, 500); -cap.setText (this.pcaModel.getDetails ()); -}); -Clazz.defineMethod (c$, "showOriginalData", -function () { -var gc = '-'; -try { -gc = this.av.getGapCharacter (); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -;var alAndColsel = this.pcaModel.getSeqtrings ().getAlignmentAndColumnSelection (gc); -if (alAndColsel != null && alAndColsel[0] != null) { -var al = new jalview.datamodel.Alignment (alAndColsel[0]); -var af = new jalview.appletgui.AlignFrame (al, this.av.applet, "Original Data for PCA", false); -af.viewport.setHiddenColumns (alAndColsel[1]); -}}); -Clazz.defineMethod (c$, "labels_itemStateChanged", -function (itemEvent) { -this.rc.showLabels (this.labels.getState ()); -}, "java.awt.event.ItemEvent"); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.setLayout (this.borderLayout1); -this.jPanel2.setLayout (this.flowLayout1); -this.jLabel1.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.jLabel1.setText ("x="); -this.jLabel2.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.jLabel2.setText ("y="); -this.jLabel3.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.jLabel3.setText ("z="); -this.jPanel2.setBackground (java.awt.Color.white); -this.zCombobox.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.zCombobox.addItemListener (this); -this.yCombobox.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.yCombobox.addItemListener (this); -this.xCombobox.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.xCombobox.addItemListener (this); -this.resetButton.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.resetButton.setLabel (jalview.util.MessageManager.getString ("action.reset")); -this.resetButton.addActionListener (this); -this.setMenuBar (this.menuBar1); -this.menu1.setLabel (jalview.util.MessageManager.getString ("action.file")); -this.menu2.setLabel (jalview.util.MessageManager.getString ("action.view")); -this.calcSettings.setLabel (jalview.util.MessageManager.getString ("action.change_params")); -this.labels.setLabel (jalview.util.MessageManager.getString ("label.labels")); -this.labels.addItemListener (this); -this.values.setLabel (jalview.util.MessageManager.getString ("label.output_values")); -this.values.addActionListener (this); -this.inputData.setLabel (jalview.util.MessageManager.getString ("label.input_data")); -this.nuclSetting.setLabel (jalview.util.MessageManager.getString ("label.nucleotide_matrix")); -this.nuclSetting.addItemListener (this); -this.protSetting.setLabel (jalview.util.MessageManager.getString ("label.protein_matrix")); -this.protSetting.addItemListener (this); -this.add (this.jPanel2, "South"); -this.jPanel2.add (this.jLabel1, null); -this.jPanel2.add (this.xCombobox, null); -this.jPanel2.add (this.jLabel2, null); -this.jPanel2.add (this.yCombobox, null); -this.jPanel2.add (this.jLabel3, null); -this.jPanel2.add (this.zCombobox, null); -this.jPanel2.add (this.resetButton, null); -this.menuBar1.add (this.menu1); -this.menuBar1.add (this.menu2); -this.menuBar1.add (this.calcSettings); -this.menu2.add (this.labels); -this.menu1.add (this.values); -this.menu1.add (this.inputData); -this.calcSettings.add (this.nuclSetting); -this.calcSettings.add (this.protSetting); -this.inputData.addActionListener (this); -}, $fz.isPrivate = true, $fz)); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.appletgui.EmbmenuFrame", "java.awt.event.ActionListener", "$.ItemListener", "awt2swing.Button", "$.CheckboxMenuItem", "$.Choice", "$.Label", "$.Menu", "$.MenuBar", "$.MenuItem", "$.Panel", "java.awt.BorderLayout", "$.FlowLayout"], "jalview.appletgui.PCAPanel", ["awt2swing.Frame", "jalview.appletgui.AlignFrame", "$.CutAndPasteTransfer", "$.RotatableCanvas", "jalview.bin.JalviewLite", "jalview.datamodel.Alignment", "jalview.util.MessageManager", "jalview.viewmodel.PCAModel", "java.awt.Color", "$.Font", "java.lang.Thread"], function () { +c$ = Clazz.decorateAsClass (function () { +this.rc = null; +this.av = null; +this.pcaModel = null; +this.top = 0; +this.jPanel2 = null; +this.jLabel1 = null; +this.jLabel2 = null; +this.jLabel3 = null; +this.xCombobox = null; +this.yCombobox = null; +this.zCombobox = null; +this.resetButton = null; +this.flowLayout1 = null; +this.borderLayout1 = null; +this.menuBar1 = null; +this.menu1 = null; +this.menu2 = null; +this.calcSettings = null; +this.labels = null; +this.protSetting = null; +this.nuclSetting = null; +this.values = null; +this.inputData = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "PCAPanel", jalview.appletgui.EmbmenuFrame, [Runnable, java.awt.event.ActionListener, java.awt.event.ItemListener]); +Clazz.prepareFields (c$, function () { +this.jPanel2 = new awt2swing.Panel (); +this.jLabel1 = new awt2swing.Label (); +this.jLabel2 = new awt2swing.Label (); +this.jLabel3 = new awt2swing.Label (); +this.xCombobox = new awt2swing.Choice (); +this.yCombobox = new awt2swing.Choice (); +this.zCombobox = new awt2swing.Choice (); +this.resetButton = new awt2swing.Button (); +this.flowLayout1 = new java.awt.FlowLayout (); +this.borderLayout1 = new java.awt.BorderLayout (); +this.menuBar1 = new awt2swing.MenuBar (); +this.menu1 = new awt2swing.Menu (); +this.menu2 = new awt2swing.Menu (); +this.calcSettings = new awt2swing.Menu (); +this.labels = new awt2swing.CheckboxMenuItem (); +this.protSetting = new awt2swing.CheckboxMenuItem (); +this.nuclSetting = new awt2swing.CheckboxMenuItem (); +this.values = new awt2swing.MenuItem (); +this.inputData = new awt2swing.MenuItem (); +}); +Clazz.makeConstructor (c$, +function (av) { +Clazz.superConstructor (this, jalview.appletgui.PCAPanel, []); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +for (var i = 1; i < 8; i++) { +this.xCombobox.addItem ("dim " + i); +this.yCombobox.addItem ("dim " + i); +this.zCombobox.addItem ("dim " + i); +} +this.av = av; +var selected = av.getSelectionGroup () != null && av.getSelectionGroup ().getSize () > 0; +var seqstrings = av.getAlignmentView (selected); +var nucleotide = av.getAlignment ().isNucleotide (); +var seqs; +if (!selected) { +seqs = av.getAlignment ().getSequencesArray (); +} else { +seqs = av.getSelectionGroup ().getSequencesInOrder (av.getAlignment ()); +}var sq = seqstrings.getSequences (); +var length = sq[0].getWidth (); +for (var i = 0; i < seqs.length; i++) { +if (sq[i].getWidth () != length) { +System.out.println ("Sequences must be equal length for PCA analysis"); +return; +}} +this.pcaModel = new jalview.viewmodel.PCAModel (seqstrings, seqs, nucleotide); +this.rc = new jalview.appletgui.RotatableCanvas (av); +this.embedMenuIfNeeded (this.rc); +this.add (this.rc, "Center"); +jalview.bin.JalviewLite.addFrame (this, jalview.util.MessageManager.getString ("label.principal_component_analysis"), 475, 400); +var worker = new Thread (this); +worker.start (); +}, "jalview.appletgui.AlignViewport"); +Clazz.overrideMethod (c$, "run", +function () { +this.calcSettings.setEnabled (false); +this.rc.setEnabled (false); +try { +this.nuclSetting.setState (this.pcaModel.isNucleotide ()); +this.protSetting.setState (!this.pcaModel.isNucleotide ()); +this.pcaModel.run (); +this.xCombobox.select (new Integer (0)); +this.yCombobox.select (new Integer (1)); +this.zCombobox.select (new Integer (2)); +this.pcaModel.updateRc (this.rc); +this.top = this.pcaModel.getTop (); +} catch (x) { +if (Clazz.exceptionOf (x, OutOfMemoryError)) { +System.err.println ("Out of memory when calculating PCA."); +return; +} else { +throw x; +} +} +this.calcSettings.setEnabled (true); +this.rc.setEnabled (true); +this.rc.repaint (); +this.repaint (); +}); +Clazz.defineMethod (c$, "doDimensionChange", +function () { +if (this.top == 0) { +return; +}var dim1 = this.top - this.xCombobox.getSelectedIndex (); +var dim2 = this.top - this.yCombobox.getSelectedIndex (); +var dim3 = this.top - this.zCombobox.getSelectedIndex (); +this.pcaModel.updateRcView (dim1, dim2, dim3); +this.rc.img = null; +this.rc.rotmat.setIdentity (); +this.rc.initAxes (); +this.rc.paint (this.rc.getGraphics ()); +}); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.inputData) { +this.showOriginalData (); +}if (evt.getSource () === this.resetButton) { +this.xCombobox.select (new Integer (0)); +this.yCombobox.select (new Integer (1)); +this.zCombobox.select (new Integer (2)); +this.doDimensionChange (); +}if (evt.getSource () === this.values) { +this.values_actionPerformed (); +}}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +if (evt.getSource () === this.xCombobox) { +this.xCombobox_actionPerformed (); +} else if (evt.getSource () === this.yCombobox) { +this.yCombobox_actionPerformed (); +} else if (evt.getSource () === this.zCombobox) { +this.zCombobox_actionPerformed (); +} else if (evt.getSource () === this.labels) { +this.labels_itemStateChanged (evt); +} else if (evt.getSource () === this.nuclSetting) { +if (!this.pcaModel.isNucleotide ()) { +this.pcaModel.setNucleotide (true); + new Thread (this).start (); +}} else if (evt.getSource () === this.protSetting) { +if (this.pcaModel.isNucleotide ()) { +this.pcaModel.setNucleotide (false); + new Thread (this).start (); +}}}, "java.awt.event.ItemEvent"); +Clazz.defineMethod (c$, "xCombobox_actionPerformed", +function () { +this.doDimensionChange (); +}); +Clazz.defineMethod (c$, "yCombobox_actionPerformed", +function () { +this.doDimensionChange (); +}); +Clazz.defineMethod (c$, "zCombobox_actionPerformed", +function () { +this.doDimensionChange (); +}); +Clazz.defineMethod (c$, "values_actionPerformed", +function () { +var cap = new jalview.appletgui.CutAndPasteTransfer (false, null); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, jalview.util.MessageManager.getString ("label.pca_details"), 500, 500); +cap.setText (this.pcaModel.getDetails ()); +}); +Clazz.defineMethod (c$, "showOriginalData", +function () { +var gc = '-'; +try { +gc = this.av.getGapCharacter (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +;var alAndColsel = this.pcaModel.getSeqtrings ().getAlignmentAndColumnSelection (gc); +if (alAndColsel != null && alAndColsel[0] != null) { +var al = new jalview.datamodel.Alignment (alAndColsel[0]); +var af = new jalview.appletgui.AlignFrame (al, this.av.applet, "Original Data for PCA", false); +af.viewport.setHiddenColumns (alAndColsel[1]); +}}); +Clazz.defineMethod (c$, "labels_itemStateChanged", +function (itemEvent) { +this.rc.showLabels (this.labels.getState ()); +}, "java.awt.event.ItemEvent"); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setLayout (this.borderLayout1); +this.jPanel2.setLayout (this.flowLayout1); +this.jLabel1.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.jLabel1.setText ("x="); +this.jLabel2.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.jLabel2.setText ("y="); +this.jLabel3.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.jLabel3.setText ("z="); +this.jPanel2.setBackground (java.awt.Color.white); +this.zCombobox.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.zCombobox.addItemListener (this); +this.yCombobox.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.yCombobox.addItemListener (this); +this.xCombobox.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.xCombobox.addItemListener (this); +this.resetButton.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.resetButton.setLabel (jalview.util.MessageManager.getString ("action.reset")); +this.resetButton.addActionListener (this); +this.setMenuBar (this.menuBar1); +this.menu1.setLabel (jalview.util.MessageManager.getString ("action.file")); +this.menu2.setLabel (jalview.util.MessageManager.getString ("action.view")); +this.calcSettings.setLabel (jalview.util.MessageManager.getString ("action.change_params")); +this.labels.setLabel (jalview.util.MessageManager.getString ("label.labels")); +this.labels.addItemListener (this); +this.values.setLabel (jalview.util.MessageManager.getString ("label.output_values")); +this.values.addActionListener (this); +this.inputData.setLabel (jalview.util.MessageManager.getString ("label.input_data")); +this.nuclSetting.setLabel (jalview.util.MessageManager.getString ("label.nucleotide_matrix")); +this.nuclSetting.addItemListener (this); +this.protSetting.setLabel (jalview.util.MessageManager.getString ("label.protein_matrix")); +this.protSetting.addItemListener (this); +this.add (this.jPanel2, "South"); +this.jPanel2.add (this.jLabel1, null); +this.jPanel2.add (this.xCombobox, null); +this.jPanel2.add (this.jLabel2, null); +this.jPanel2.add (this.yCombobox, null); +this.jPanel2.add (this.jLabel3, null); +this.jPanel2.add (this.zCombobox, null); +this.jPanel2.add (this.resetButton, null); +this.menuBar1.add (this.menu1); +this.menuBar1.add (this.menu2); +this.menuBar1.add (this.calcSettings); +this.menu2.add (this.labels); +this.menu1.add (this.values); +this.menu1.add (this.inputData); +this.calcSettings.add (this.nuclSetting); +this.calcSettings.add (this.protSetting); +this.inputData.addActionListener (this); +}, $fz.isPrivate = true, $fz)); +}); diff --git a/bin/jalview/appletgui/PaintRefresher.class b/bin/jalview/appletgui/PaintRefresher.class index 0086f7e114f52cfa44cf1598d6c78a1145d40f12..8d0e0cc084b6dda4da55adb7d38c69071253e3b5 100644 GIT binary patch delta 24 gcmbQFI#G3l1Q+A+$&y?LSy>sF1ynXa;M&9v09!E!761SM delta 25 hcmbQJI!Sed1Q+9p$&y?L+1MCZ1QeMz-{;!I4gg>i2N(bV diff --git a/bin/jalview/appletgui/PaintRefresher.js b/bin/jalview/appletgui/PaintRefresher.js index 09c8d0a..7bd9686 100644 --- a/bin/jalview/appletgui/PaintRefresher.js +++ b/bin/jalview/appletgui/PaintRefresher.js @@ -1,126 +1,126 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (null, "jalview.appletgui.PaintRefresher", ["jalview.appletgui.AlignmentPanel", "java.util.Hashtable", "$.Vector"], function () { -c$ = Clazz.declareType (jalview.appletgui, "PaintRefresher"); -c$.Register = Clazz.defineMethod (c$, "Register", -function (comp, seqSetId) { -if (jalview.appletgui.PaintRefresher.components == null) { -jalview.appletgui.PaintRefresher.components = new java.util.Hashtable (); -}if (jalview.appletgui.PaintRefresher.components.containsKey (seqSetId)) { -var comps = jalview.appletgui.PaintRefresher.components.get (seqSetId); -if (!comps.contains (comp)) { -comps.addElement (comp); -}} else { -var vcoms = new java.util.Vector (); -vcoms.addElement (comp); -jalview.appletgui.PaintRefresher.components.put (seqSetId, vcoms); -}}, "java.awt.Component,~S"); -c$.RemoveComponent = Clazz.defineMethod (c$, "RemoveComponent", -function (comp) { -if (jalview.appletgui.PaintRefresher.components == null) { -return; -}var en = jalview.appletgui.PaintRefresher.components.keys (); -while (en.hasMoreElements ()) { -var id = en.nextElement ().toString (); -var comps = jalview.appletgui.PaintRefresher.components.get (id); -comps.removeElement (comp); -if (comps.size () == 0) { -jalview.appletgui.PaintRefresher.components.remove (id); -}} -}, "java.awt.Component"); -c$.Refresh = Clazz.defineMethod (c$, "Refresh", -function (source, id) { -jalview.appletgui.PaintRefresher.Refresh (source, id, false, false); -}, "java.awt.Component,~S"); -c$.Refresh = Clazz.defineMethod (c$, "Refresh", -function (source, id, alignmentChanged, validateSequences) { -if (jalview.appletgui.PaintRefresher.components == null) { -return; -}var comp; -var comps = jalview.appletgui.PaintRefresher.components.get (id); -if (comps == null) { -return; -}var e = comps.elements (); -while (e.hasMoreElements ()) { -comp = e.nextElement (); -if (comp === source) { -continue; -}if (!comp.isValid ()) { -comps.removeElement (comp); -} else if (validateSequences && Clazz.instanceOf (comp, jalview.appletgui.AlignmentPanel) && Clazz.instanceOf (source, jalview.appletgui.AlignmentPanel)) { -jalview.appletgui.PaintRefresher.validateSequences ((source).av.getAlignment (), (comp).av.getAlignment ()); -}if (Clazz.instanceOf (comp, jalview.appletgui.AlignmentPanel) && alignmentChanged) { -(comp).alignmentChanged (); -}comp.repaint (); -} -}, "java.awt.Component,~S,~B,~B"); -c$.validateSequences = Clazz.defineMethod (c$, "validateSequences", -function (source, comp) { -var a1; -if (source.getHiddenSequences ().getSize () > 0) { -a1 = source.getHiddenSequences ().getFullAlignment ().getSequencesArray (); -} else { -a1 = source.getSequencesArray (); -}var a2; -if (comp.getHiddenSequences ().getSize () > 0) { -a2 = comp.getHiddenSequences ().getFullAlignment ().getSequencesArray (); -} else { -a2 = comp.getSequencesArray (); -}var i; -var iSize = a1.length; -var j; -var jSize = a2.length; -if (iSize == jSize) { -return; -}var exists = false; -for (i = 0; i < iSize; i++) { -exists = false; -for (j = 0; j < jSize; j++) { -if (a2[j] === a1[i]) { -exists = true; -break; -}} -if (!exists) { -if (i < comp.getHeight ()) { -var alsq; -{ -alsq.add (i, a1[i]); -}} else { -comp.addSequence (a1[i]); -}if (comp.getHiddenSequences ().getSize () > 0) { -a2 = comp.getHiddenSequences ().getFullAlignment ().getSequencesArray (); -} else { -a2 = comp.getSequencesArray (); -}jSize = a2.length; -}} -iSize = a1.length; -jSize = a2.length; -for (j = 0; j < jSize; j++) { -exists = false; -for (i = 0; i < iSize; i++) { -if (a2[j] === a1[i]) { -exists = true; -break; -}} -if (!exists) { -comp.deleteSequence (a2[j]); -}} -}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); -c$.getAssociatedPanels = Clazz.defineMethod (c$, "getAssociatedPanels", -function (id) { -var comps = jalview.appletgui.PaintRefresher.components.get (id); -var tmp = new java.util.Vector (); -var i; -var iSize = comps.size (); -for (i = 0; i < iSize; i++) { -if (Clazz.instanceOf (comps.elementAt (i), jalview.appletgui.AlignmentPanel)) { -tmp.addElement (comps.elementAt (i)); -}} -var result = new Array (tmp.size ()); -for (var ix = 0; ix < result.length; ix++) { -result[ix] = tmp.elementAt (ix); -} -return result; -}, "~S"); -Clazz.defineStatics (c$, -"components", null); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (null, "jalview.appletgui.PaintRefresher", ["jalview.appletgui.AlignmentPanel", "java.util.Hashtable", "$.Vector"], function () { +c$ = Clazz.declareType (jalview.appletgui, "PaintRefresher"); +c$.Register = Clazz.defineMethod (c$, "Register", +function (comp, seqSetId) { +if (jalview.appletgui.PaintRefresher.components == null) { +jalview.appletgui.PaintRefresher.components = new java.util.Hashtable (); +}if (jalview.appletgui.PaintRefresher.components.containsKey (seqSetId)) { +var comps = jalview.appletgui.PaintRefresher.components.get (seqSetId); +if (!comps.contains (comp)) { +comps.addElement (comp); +}} else { +var vcoms = new java.util.Vector (); +vcoms.addElement (comp); +jalview.appletgui.PaintRefresher.components.put (seqSetId, vcoms); +}}, "java.awt.Component,~S"); +c$.RemoveComponent = Clazz.defineMethod (c$, "RemoveComponent", +function (comp) { +if (jalview.appletgui.PaintRefresher.components == null) { +return; +}var en = jalview.appletgui.PaintRefresher.components.keys (); +while (en.hasMoreElements ()) { +var id = en.nextElement ().toString (); +var comps = jalview.appletgui.PaintRefresher.components.get (id); +comps.removeElement (comp); +if (comps.size () == 0) { +jalview.appletgui.PaintRefresher.components.remove (id); +}} +}, "java.awt.Component"); +c$.Refresh = Clazz.defineMethod (c$, "Refresh", +function (source, id) { +jalview.appletgui.PaintRefresher.Refresh (source, id, false, false); +}, "java.awt.Component,~S"); +c$.Refresh = Clazz.defineMethod (c$, "Refresh", +function (source, id, alignmentChanged, validateSequences) { +if (jalview.appletgui.PaintRefresher.components == null) { +return; +}var comp; +var comps = jalview.appletgui.PaintRefresher.components.get (id); +if (comps == null) { +return; +}var e = comps.elements (); +while (e.hasMoreElements ()) { +comp = e.nextElement (); +if (comp === source) { +continue; +}if (!comp.isValid ()) { +comps.removeElement (comp); +} else if (validateSequences && Clazz.instanceOf (comp, jalview.appletgui.AlignmentPanel) && Clazz.instanceOf (source, jalview.appletgui.AlignmentPanel)) { +jalview.appletgui.PaintRefresher.validateSequences ((source).av.getAlignment (), (comp).av.getAlignment ()); +}if (Clazz.instanceOf (comp, jalview.appletgui.AlignmentPanel) && alignmentChanged) { +(comp).alignmentChanged (); +}comp.repaint (); +} +}, "java.awt.Component,~S,~B,~B"); +c$.validateSequences = Clazz.defineMethod (c$, "validateSequences", +function (source, comp) { +var a1; +if (source.getHiddenSequences ().getSize () > 0) { +a1 = source.getHiddenSequences ().getFullAlignment ().getSequencesArray (); +} else { +a1 = source.getSequencesArray (); +}var a2; +if (comp.getHiddenSequences ().getSize () > 0) { +a2 = comp.getHiddenSequences ().getFullAlignment ().getSequencesArray (); +} else { +a2 = comp.getSequencesArray (); +}var i; +var iSize = a1.length; +var j; +var jSize = a2.length; +if (iSize == jSize) { +return; +}var exists = false; +for (i = 0; i < iSize; i++) { +exists = false; +for (j = 0; j < jSize; j++) { +if (a2[j] === a1[i]) { +exists = true; +break; +}} +if (!exists) { +if (i < comp.getHeight ()) { +var alsq; +{ +alsq.add (i, a1[i]); +}} else { +comp.addSequence (a1[i]); +}if (comp.getHiddenSequences ().getSize () > 0) { +a2 = comp.getHiddenSequences ().getFullAlignment ().getSequencesArray (); +} else { +a2 = comp.getSequencesArray (); +}jSize = a2.length; +}} +iSize = a1.length; +jSize = a2.length; +for (j = 0; j < jSize; j++) { +exists = false; +for (i = 0; i < iSize; i++) { +if (a2[j] === a1[i]) { +exists = true; +break; +}} +if (!exists) { +comp.deleteSequence (a2[j]); +}} +}, "jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentI"); +c$.getAssociatedPanels = Clazz.defineMethod (c$, "getAssociatedPanels", +function (id) { +var comps = jalview.appletgui.PaintRefresher.components.get (id); +var tmp = new java.util.Vector (); +var i; +var iSize = comps.size (); +for (i = 0; i < iSize; i++) { +if (Clazz.instanceOf (comps.elementAt (i), jalview.appletgui.AlignmentPanel)) { +tmp.addElement (comps.elementAt (i)); +}} +var result = new Array (tmp.size ()); +for (var ix = 0; ix < result.length; ix++) { +result[ix] = tmp.elementAt (ix); +} +return result; +}, "~S"); +Clazz.defineStatics (c$, +"components", null); +}); diff --git a/bin/jalview/appletgui/PairwiseAlignPanel.class b/bin/jalview/appletgui/PairwiseAlignPanel.class index 22c33f930660e49a58c5a7e2a0e56758cd5146c6..202bf5c11334ea6e94ef93a415dbcd14e340eec7 100644 GIT binary patch delta 32 ocmX@DdrEhMy8vU#W)Fcg%*@jngeQxOq_7yXGvsY<5b 2) { -System.out.println ("Pairwise alignment scaled similarity score matrix\n"); -for (var i = 0; i < count; i++) { -jalview.util.Format.print (System.out, "%s \n", ("" + i) + " " + seqs[i].getName ()); -} -System.out.println ("\n"); -for (var i = 0; i < count; i++) { -for (var j = 0; j < i; j++) { -jalview.util.Format.printDouble (System.out, "%7.3f", scores[i][j] / totscore); -} -} -System.out.println ("\n"); -}}, "jalview.appletgui.AlignmentPanel"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.viewInEditorButton) { -this.viewInEditorButton_actionPerformed (); -}}, "java.awt.event.ActionEvent"); -Clazz.defineMethod (c$, "viewInEditorButton_actionPerformed", -function () { -var seq = new Array (this.sequences.size ()); -for (var i = 0; i < this.sequences.size (); i++) { -seq[i] = this.sequences.elementAt (i); -} - new jalview.appletgui.AlignFrame ( new jalview.datamodel.Alignment (seq), this.ap.av.applet, "Pairwise Aligned Sequences", false); -}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.setLayout (this.borderLayout1); -this.textarea.setFont ( new java.awt.Font ("Monospaced", 0, 12)); -this.textarea.setText (""); -this.viewInEditorButton.setFont ( new java.awt.Font ("Verdana", 0, 12)); -this.viewInEditorButton.setLabel (jalview.util.MessageManager.getString ("label.view_alignment_editor")); -this.viewInEditorButton.addActionListener (this); -this.add (this.scrollPane, "Center"); -this.scrollPane.add (this.textarea); -this.add (this.jPanel1, "South"); -this.jPanel1.add (this.viewInEditorButton, null); -}, $fz.isPrivate = true, $fz)); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "awt2swing.Button", "$.ScrollPane", "$.TextArea", "java.awt.BorderLayout", "java.util.Vector"], "jalview.appletgui.PairwiseAlignPanel", ["jalview.analysis.AlignSeq", "jalview.appletgui.AlignFrame", "jalview.datamodel.Alignment", "jalview.util.Format", "$.MessageManager", "java.awt.Font"], function () { +c$ = Clazz.decorateAsClass (function () { +this.sequences = null; +this.ap = null; +this.scrollPane = null; +this.textarea = null; +this.viewInEditorButton = null; +this.jPanel1 = null; +this.borderLayout1 = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "PairwiseAlignPanel", awt2swing.Panel, java.awt.event.ActionListener); +Clazz.prepareFields (c$, function () { +this.sequences = new java.util.Vector (); +this.scrollPane = new awt2swing.ScrollPane (); +this.textarea = new awt2swing.TextArea (); +this.viewInEditorButton = new awt2swing.Button (); +this.jPanel1 = new awt2swing.Panel (); +this.borderLayout1 = new java.awt.BorderLayout (); +}); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.PairwiseAlignPanel, []); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.ap = ap; +this.sequences = new java.util.Vector (); +var seqs; +var seqStrings = ap.av.getViewAsString (true); +if (ap.av.getSelectionGroup () == null) { +seqs = ap.av.getAlignment ().getSequencesArray (); +} else { +seqs = ap.av.getSelectionGroup ().getSequencesInOrder (ap.av.getAlignment ()); +}var scores = Clazz.newFloatArray (seqs.length, seqs.length, 0); +var totscore = 0; +var count = ap.av.getSelectionGroup ().getSize (); +var type = (ap.av.getAlignment ().isNucleotide ()) ? "dna" : "pep"; +var seq; +for (var i = 1; i < count; i++) { +for (var j = 0; j < i; j++) { +var as = new jalview.analysis.AlignSeq (seqs[i], seqStrings[i], seqs[j], seqStrings[j], type); +if (as.s1str.length == 0 || as.s2str.length == 0) { +continue; +}as.calcScoreMatrix (); +as.traceAlignment (); +as.printAlignment (System.out); +scores[i][j] = as.getMaxScore () / as.getASeq1 ().length; +totscore = totscore + scores[i][j]; +this.textarea.append (as.getOutput ()); +this.sequences.add (as.getAlignedSeq1 ()); +this.sequences.add (as.getAlignedSeq1 ()); +} +} +if (count > 2) { +System.out.println ("Pairwise alignment scaled similarity score matrix\n"); +for (var i = 0; i < count; i++) { +jalview.util.Format.print (System.out, "%s \n", ("" + i) + " " + seqs[i].getName ()); +} +System.out.println ("\n"); +for (var i = 0; i < count; i++) { +for (var j = 0; j < i; j++) { +jalview.util.Format.printDouble (System.out, "%7.3f", scores[i][j] / totscore); +} +} +System.out.println ("\n"); +}}, "jalview.appletgui.AlignmentPanel"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.viewInEditorButton) { +this.viewInEditorButton_actionPerformed (); +}}, "java.awt.event.ActionEvent"); +Clazz.defineMethod (c$, "viewInEditorButton_actionPerformed", +function () { +var seq = new Array (this.sequences.size ()); +for (var i = 0; i < this.sequences.size (); i++) { +seq[i] = this.sequences.elementAt (i); +} + new jalview.appletgui.AlignFrame ( new jalview.datamodel.Alignment (seq), this.ap.av.applet, "Pairwise Aligned Sequences", false); +}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setLayout (this.borderLayout1); +this.textarea.setFont ( new java.awt.Font ("Monospaced", 0, 12)); +this.textarea.setText (""); +this.viewInEditorButton.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.viewInEditorButton.setLabel (jalview.util.MessageManager.getString ("label.view_alignment_editor")); +this.viewInEditorButton.addActionListener (this); +this.add (this.scrollPane, "Center"); +this.scrollPane.add (this.textarea); +this.add (this.jPanel1, "South"); +this.jPanel1.add (this.viewInEditorButton, null); +}, $fz.isPrivate = true, $fz)); +}); diff --git a/bin/jalview/appletgui/RedundancyPanel.js b/bin/jalview/appletgui/RedundancyPanel.js index f6b850d..647ac1b 100644 --- a/bin/jalview/appletgui/RedundancyPanel.js +++ b/bin/jalview/appletgui/RedundancyPanel.js @@ -1,165 +1,165 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.appletgui.SliderPanel", "java.awt.event.WindowListener", "java.util.Stack"], "jalview.appletgui.RedundancyPanel", ["awt2swing.Frame", "jalview.analysis.AlignSeq", "jalview.appletgui.PaintRefresher", "jalview.bin.JalviewLite", "jalview.commands.EditCommand", "jalview.util.MessageManager", "java.awt.event.AdjustmentListener", "java.lang.Thread", "java.util.ArrayList", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.historyList = null; -this.redundancy = null; -this.originalSequences = null; -this.frame = null; -this.redundantSeqs = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "RedundancyPanel", jalview.appletgui.SliderPanel, [Runnable, java.awt.event.WindowListener]); -Clazz.prepareFields (c$, function () { -this.historyList = new java.util.Stack (); -}); -Clazz.makeConstructor (c$, -function (ap) { -Clazz.superConstructor (this, jalview.appletgui.RedundancyPanel, [ap, 0, false, null]); -this.redundantSeqs = new java.util.Vector (); -this.ap = ap; -this.undoButton.setVisible (true); -this.applyButton.setVisible (true); -this.allGroupsCheck.setVisible (false); -this.label.setText (jalview.util.MessageManager.getString ("label.enter_redundancy_threshold")); -this.valueField.setText ("100"); -this.slider.setVisibleAmount (1); -this.slider.setMinimum (0); -this.slider.setMaximum (100 + this.slider.getVisibleAmount ()); -this.slider.setValue (100); -this.slider.addAdjustmentListener (((Clazz.isClassDefined ("jalview.appletgui.RedundancyPanel$1") ? 0 : jalview.appletgui.RedundancyPanel.$RedundancyPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.RedundancyPanel$1, this, null))); -this.frame = new awt2swing.Frame (); -this.frame.add (this); -jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.redundancy_threshold_selection"), 400, 100); -this.frame.addWindowListener (this); -var worker = new Thread (this); -worker.start (); -}, "jalview.appletgui.AlignmentPanel"); -Clazz.overrideMethod (c$, "run", -function () { -this.label.setText (jalview.util.MessageManager.getString ("label.calculating")); -this.slider.setVisible (false); -this.applyButton.setEnabled (false); -this.valueField.setVisible (false); -this.validate (); -var omitHidden = null; -var sg = this.ap.av.getSelectionGroup (); -var height; -var start; -var end; -if ((sg != null) && (sg.getSize () >= 1)) { -this.originalSequences = sg.getSequencesInOrder (this.ap.av.getAlignment ()); -start = sg.getStartRes (); -end = sg.getEndRes (); -} else { -this.originalSequences = this.ap.av.getAlignment ().getSequencesArray (); -start = 0; -end = this.ap.av.getAlignment ().getWidth (); -}height = this.originalSequences.length; -this.redundancy = jalview.analysis.AlignSeq.computeRedundancyMatrix (this.originalSequences, omitHidden, start, end, false); -this.label.setText (jalview.util.MessageManager.getString ("label.enter_redundancy_threshold")); -this.slider.setVisible (true); -this.applyButton.setEnabled (true); -this.valueField.setVisible (true); -this.validate (); -this.sliderValueChanged (); -}); -Clazz.defineMethod (c$, "sliderValueChanged", -function () { -if (this.redundancy == null) { -return; -}var value = this.slider.getValue (); -var redundantSequences = new java.util.ArrayList (); -for (var i = 0; i < this.redundancy.length; i++) { -if (value <= this.redundancy[i]) { -redundantSequences.add (this.originalSequences[i]); -}} -this.ap.idPanel.idCanvas.setHighlighted (redundantSequences); -jalview.appletgui.PaintRefresher.Refresh (this, this.ap.av.getSequenceSetId (), true, true); -}); -Clazz.overrideMethod (c$, "applyButton_actionPerformed", -function () { -var del = new java.util.Vector (); -this.undoButton.setEnabled (true); -var value = this.slider.getValue (); -var sg = this.ap.av.getSelectionGroup (); -for (var i = 0; i < this.redundancy.length; i++) { -if (value <= this.redundancy[i]) { -del.addElement (this.originalSequences[i]); -}} -if (del.size () > 0) { -var deleted = new Array (del.size ()); -var width = 0; -for (var i = 0; i < del.size (); i++) { -deleted[i] = del.elementAt (i); -if (deleted[i].getLength () > width) { -width = deleted[i].getLength (); -}} -var cut = new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("action.remove_redundancy"), jalview.commands.EditCommand.Action.CUT, deleted, 0, width, this.ap.av.getAlignment ()); -var alignment = this.ap.av.getAlignment (); -for (var i = 0; i < del.size (); i++) { -alignment.deleteSequence (deleted[i]); -if (sg != null) { -sg.deleteSequence (deleted[i], false); -}} -this.historyList.push (cut); -this.ap.alignFrame.addHistoryItem (cut); -jalview.appletgui.PaintRefresher.Refresh (this, this.ap.av.getSequenceSetId (), true, true); -this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); -}}); -Clazz.overrideMethod (c$, "undoButton_actionPerformed", -function () { -var command = this.historyList.pop (); -command.undoCommand (null); -if (this.ap.av.getHistoryList ().contains (command)) { -this.ap.av.getHistoryList ().remove (command); -this.ap.alignFrame.updateEditMenuBar (); -this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); -}this.ap.paintAlignment (true); -if (this.historyList.size () == 0) { -this.undoButton.setEnabled (false); -}}); -Clazz.defineMethod (c$, "valueField_actionPerformed", -function (e) { -try { -var i = Integer.parseInt (this.valueField.getText ()); -this.slider.setValue (i); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -this.valueField.setText (this.slider.getValue () + ""); -} else { -throw ex; -} -} -}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "windowOpened", -function (evt) { -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowClosing", -function (evt) { -this.ap.idPanel.idCanvas.setHighlighted (null); -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowClosed", -function (evt) { -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowActivated", -function (evt) { -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowDeactivated", -function (evt) { -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowIconified", -function (evt) { -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowDeiconified", -function (evt) { -}, "java.awt.event.WindowEvent"); -c$.$RedundancyPanel$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "RedundancyPanel$1", null, java.awt.event.AdjustmentListener); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -this.b$["jalview.appletgui.RedundancyPanel"].valueField.setText (this.b$["jalview.appletgui.RedundancyPanel"].slider.getValue () + ""); -this.b$["jalview.appletgui.RedundancyPanel"].sliderValueChanged (); -}, "java.awt.event.AdjustmentEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.appletgui.SliderPanel", "java.awt.event.WindowListener", "java.util.Stack"], "jalview.appletgui.RedundancyPanel", ["awt2swing.Frame", "jalview.analysis.AlignSeq", "jalview.appletgui.PaintRefresher", "jalview.bin.JalviewLite", "jalview.commands.EditCommand", "jalview.util.MessageManager", "java.awt.event.AdjustmentListener", "java.lang.Thread", "java.util.ArrayList", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.historyList = null; +this.redundancy = null; +this.originalSequences = null; +this.frame = null; +this.redundantSeqs = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "RedundancyPanel", jalview.appletgui.SliderPanel, [Runnable, java.awt.event.WindowListener]); +Clazz.prepareFields (c$, function () { +this.historyList = new java.util.Stack (); +}); +Clazz.makeConstructor (c$, +function (ap) { +Clazz.superConstructor (this, jalview.appletgui.RedundancyPanel, [ap, 0, false, null]); +this.redundantSeqs = new java.util.Vector (); +this.ap = ap; +this.undoButton.setVisible (true); +this.applyButton.setVisible (true); +this.allGroupsCheck.setVisible (false); +this.label.setText (jalview.util.MessageManager.getString ("label.enter_redundancy_threshold")); +this.valueField.setText ("100"); +this.slider.setVisibleAmount (1); +this.slider.setMinimum (0); +this.slider.setMaximum (100 + this.slider.getVisibleAmount ()); +this.slider.setValue (100); +this.slider.addAdjustmentListener (((Clazz.isClassDefined ("jalview.appletgui.RedundancyPanel$1") ? 0 : jalview.appletgui.RedundancyPanel.$RedundancyPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.RedundancyPanel$1, this, null))); +this.frame = new awt2swing.Frame (); +this.frame.add (this); +jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.redundancy_threshold_selection"), 400, 100); +this.frame.addWindowListener (this); +var worker = new Thread (this); +worker.start (); +}, "jalview.appletgui.AlignmentPanel"); +Clazz.overrideMethod (c$, "run", +function () { +this.label.setText (jalview.util.MessageManager.getString ("label.calculating")); +this.slider.setVisible (false); +this.applyButton.setEnabled (false); +this.valueField.setVisible (false); +this.validate (); +var omitHidden = null; +var sg = this.ap.av.getSelectionGroup (); +var height; +var start; +var end; +if ((sg != null) && (sg.getSize () >= 1)) { +this.originalSequences = sg.getSequencesInOrder (this.ap.av.getAlignment ()); +start = sg.getStartRes (); +end = sg.getEndRes (); +} else { +this.originalSequences = this.ap.av.getAlignment ().getSequencesArray (); +start = 0; +end = this.ap.av.getAlignment ().getWidth (); +}height = this.originalSequences.length; +this.redundancy = jalview.analysis.AlignSeq.computeRedundancyMatrix (this.originalSequences, omitHidden, start, end, false); +this.label.setText (jalview.util.MessageManager.getString ("label.enter_redundancy_threshold")); +this.slider.setVisible (true); +this.applyButton.setEnabled (true); +this.valueField.setVisible (true); +this.validate (); +this.sliderValueChanged (); +}); +Clazz.defineMethod (c$, "sliderValueChanged", +function () { +if (this.redundancy == null) { +return; +}var value = this.slider.getValue (); +var redundantSequences = new java.util.ArrayList (); +for (var i = 0; i < this.redundancy.length; i++) { +if (value <= this.redundancy[i]) { +redundantSequences.add (this.originalSequences[i]); +}} +this.ap.idPanel.idCanvas.setHighlighted (redundantSequences); +jalview.appletgui.PaintRefresher.Refresh (this, this.ap.av.getSequenceSetId (), true, true); +}); +Clazz.overrideMethod (c$, "applyButton_actionPerformed", +function () { +var del = new java.util.Vector (); +this.undoButton.setEnabled (true); +var value = this.slider.getValue (); +var sg = this.ap.av.getSelectionGroup (); +for (var i = 0; i < this.redundancy.length; i++) { +if (value <= this.redundancy[i]) { +del.addElement (this.originalSequences[i]); +}} +if (del.size () > 0) { +var deleted = new Array (del.size ()); +var width = 0; +for (var i = 0; i < del.size (); i++) { +deleted[i] = del.elementAt (i); +if (deleted[i].getLength () > width) { +width = deleted[i].getLength (); +}} +var cut = new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("action.remove_redundancy"), jalview.commands.EditCommand.Action.CUT, deleted, 0, width, this.ap.av.getAlignment ()); +var alignment = this.ap.av.getAlignment (); +for (var i = 0; i < del.size (); i++) { +alignment.deleteSequence (deleted[i]); +if (sg != null) { +sg.deleteSequence (deleted[i], false); +}} +this.historyList.push (cut); +this.ap.alignFrame.addHistoryItem (cut); +jalview.appletgui.PaintRefresher.Refresh (this, this.ap.av.getSequenceSetId (), true, true); +this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); +}}); +Clazz.overrideMethod (c$, "undoButton_actionPerformed", +function () { +var command = this.historyList.pop (); +command.undoCommand (null); +if (this.ap.av.getHistoryList ().contains (command)) { +this.ap.av.getHistoryList ().remove (command); +this.ap.alignFrame.updateEditMenuBar (); +this.ap.av.firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); +}this.ap.paintAlignment (true); +if (this.historyList.size () == 0) { +this.undoButton.setEnabled (false); +}}); +Clazz.defineMethod (c$, "valueField_actionPerformed", +function (e) { +try { +var i = Integer.parseInt (this.valueField.getText ()); +this.slider.setValue (i); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +this.valueField.setText (this.slider.getValue () + ""); +} else { +throw ex; +} +} +}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "windowOpened", +function (evt) { +}, "java.awt.event.WindowEvent"); +Clazz.overrideMethod (c$, "windowClosing", +function (evt) { +this.ap.idPanel.idCanvas.setHighlighted (null); +}, "java.awt.event.WindowEvent"); +Clazz.overrideMethod (c$, "windowClosed", +function (evt) { +}, "java.awt.event.WindowEvent"); +Clazz.overrideMethod (c$, "windowActivated", +function (evt) { +}, "java.awt.event.WindowEvent"); +Clazz.overrideMethod (c$, "windowDeactivated", +function (evt) { +}, "java.awt.event.WindowEvent"); +Clazz.overrideMethod (c$, "windowIconified", +function (evt) { +}, "java.awt.event.WindowEvent"); +Clazz.overrideMethod (c$, "windowDeiconified", +function (evt) { +}, "java.awt.event.WindowEvent"); +c$.$RedundancyPanel$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "RedundancyPanel$1", null, java.awt.event.AdjustmentListener); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +this.b$["jalview.appletgui.RedundancyPanel"].valueField.setText (this.b$["jalview.appletgui.RedundancyPanel"].slider.getValue () + ""); +this.b$["jalview.appletgui.RedundancyPanel"].sliderValueChanged (); +}, "java.awt.event.AdjustmentEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/RotatableCanvas.js b/bin/jalview/appletgui/RotatableCanvas.js index 0bb0b4a..5e61dea 100644 --- a/bin/jalview/appletgui/RotatableCanvas.js +++ b/bin/jalview/appletgui/RotatableCanvas.js @@ -1,371 +1,371 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "jalview.api.RotatableCanvasI", "java.awt.event.KeyListener", "$.MouseListener", "$.MouseMotionListener", "jalview.math.RotatableMatrix"], "jalview.appletgui.RotatableCanvas", ["jalview.appletgui.PaintRefresher", "jalview.datamodel.SequenceGroup", "jalview.util.Format", "$.MessageManager", "java.awt.Color", "$.Dimension", "$.Font"], function () { -c$ = Clazz.decorateAsClass (function () { -this.idmat = null; -this.objmat = null; -this.rotmat = null; -this.tooltip = null; -this.toolx = 0; -this.tooly = 0; -this.$drawAxes = true; -this.omx = 0; -this.mx = 0; -this.omy = 0; -this.my = 0; -this.img = null; -this.ig = null; -this.prefsize = null; -this.centre = null; -this.$width = null; -this.max = null; -this.min = null; -this.maxwidth = 0; -this.scale = 0; -this.npoint = 0; -this.points = null; -this.orig = null; -this.axes = null; -this.startx = 0; -this.starty = 0; -this.lastx = 0; -this.lasty = 0; -this.rectx1 = 0; -this.recty1 = 0; -this.rectx2 = 0; -this.recty2 = 0; -this.scalefactor = 1; -this.av = null; -this.$showLabels = false; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "RotatableCanvas", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener, jalview.api.RotatableCanvasI]); -Clazz.prepareFields (c$, function () { -this.idmat = new jalview.math.RotatableMatrix (3, 3); -this.objmat = new jalview.math.RotatableMatrix (3, 3); -this.rotmat = new jalview.math.RotatableMatrix (3, 3); -this.centre = Clazz.newFloatArray (3, 0); -this.$width = Clazz.newFloatArray (3, 0); -this.max = Clazz.newFloatArray (3, 0); -this.min = Clazz.newFloatArray (3, 0); -}); -Clazz.makeConstructor (c$, -function (av) { -Clazz.superConstructor (this, jalview.appletgui.RotatableCanvas, []); -this.av = av; -}, "jalview.viewmodel.AlignmentViewport"); -Clazz.defineMethod (c$, "showLabels", -function (b) { -this.$showLabels = b; -this.repaint (); -}, "~B"); -Clazz.overrideMethod (c$, "setPoints", -function (points, npoint) { -this.points = points; -this.npoint = npoint; -jalview.appletgui.PaintRefresher.Register (this, this.av.getSequenceSetId ()); -this.prefsize = this.getPreferredSize (); -this.orig = Clazz.newFloatArray (npoint, 3, 0); -for (var i = 0; i < npoint; i++) { -var sp = points.elementAt (i); -for (var j = 0; j < 3; j++) { -this.orig[i][j] = sp.coord[j]; -} -} -for (var i = 0; i < 3; i++) { -for (var j = 0; j < 3; j++) { -if (i != j) { -this.idmat.addElement (i, j, 0); -this.objmat.addElement (i, j, 0); -this.rotmat.addElement (i, j, 0); -} else { -this.idmat.addElement (i, j, 0); -this.objmat.addElement (i, j, 0); -this.rotmat.addElement (i, j, 0); -}} -} -this.axes = Clazz.newFloatArray (3, 3, 0); -this.initAxes (); -this.findCentre (); -this.findWidth (); -this.scale = this.findScale (); -this.addMouseListener (this); -this.addKeyListener (this); -this.addMouseMotionListener (this); -}, "java.util.Vector,~N"); -Clazz.defineMethod (c$, "initAxes", -function () { -for (var i = 0; i < 3; i++) { -for (var j = 0; j < 3; j++) { -if (i != j) { -this.axes[i][j] = 0; -} else { -this.axes[i][j] = 1; -}} -} -}); -Clazz.defineMethod (c$, "findWidth", -function () { -this.max = Clazz.newFloatArray (3, 0); -this.min = Clazz.newFloatArray (3, 0); -this.max[0] = -1.0E30; -this.max[1] = -1.0E30; -this.max[2] = -1.0E30; -this.min[0] = 1e30; -this.min[1] = 1e30; -this.min[2] = 1e30; -for (var i = 0; i < 3; i++) { -for (var j = 0; j < this.npoint; j++) { -var sp = this.points.elementAt (j); -if (sp.coord[i] >= this.max[i]) { -this.max[i] = sp.coord[i]; -}if (sp.coord[i] <= this.min[i]) { -this.min[i] = sp.coord[i]; -}} -} -this.$width[0] = Math.abs (this.max[0] - this.min[0]); -this.$width[1] = Math.abs (this.max[1] - this.min[1]); -this.$width[2] = Math.abs (this.max[2] - this.min[2]); -this.maxwidth = this.$width[0]; -if (this.$width[1] > this.$width[0]) { -this.maxwidth = this.$width[1]; -}if (this.$width[2] > this.$width[1]) { -this.maxwidth = this.$width[2]; -}}); -Clazz.defineMethod (c$, "findScale", -function () { -var dim; -var width; -var height; -if (this.getSize ().width != 0) { -width = this.getSize ().width; -height = this.getSize ().height; -} else { -width = this.prefsize.width; -height = this.prefsize.height; -}if (width < height) { -dim = width; -} else { -dim = height; -}return dim * this.scalefactor / (2 * this.maxwidth); -}); -Clazz.defineMethod (c$, "findCentre", -function () { -this.findWidth (); -this.centre[0] = (this.max[0] + this.min[0]) / 2; -this.centre[1] = (this.max[1] + this.min[1]) / 2; -this.centre[2] = (this.max[2] + this.min[2]) / 2; -}); -Clazz.overrideMethod (c$, "getPreferredSize", -function () { -if (this.prefsize != null) { -return this.prefsize; -} else { -return new java.awt.Dimension (400, 400); -}}); -Clazz.overrideMethod (c$, "getMinimumSize", -function () { -return this.getPreferredSize (); -}); -Clazz.overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "PaintComponent", -function (g) { -if (this.points == null) { -g.setFont ( new java.awt.Font ("Verdana", 0, 18)); -g.drawString (jalview.util.MessageManager.getString ("label.calculating_pca") + "....", 20, Clazz.doubleToInt (this.getSize ().height / 2)); -} else { -if ((this.img == null) || (this.prefsize.width != this.getSize ().width) || (this.prefsize.height != this.getSize ().height)) { -this.prefsize.width = this.getSize ().width; -this.prefsize.height = this.getSize ().height; -this.scale = this.findScale (); -this.img = this.createImage (this.getSize ().width, this.getSize ().height); -this.ig = this.img.getGraphics (); -}this.drawBackground (this.ig, java.awt.Color.black); -this.drawScene (this.ig); -if (this.$drawAxes == true) { -this.drawAxes (this.ig); -}if (this.tooltip != null) { -this.ig.setColor (java.awt.Color.red); -this.ig.drawString (this.tooltip, this.toolx, this.tooly); -}g.drawImage (this.img, 0, 0, this); -}}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "drawAxes", -function (g) { -g.setColor (java.awt.Color.yellow); -for (var i = 0; i < 3; i++) { -g.drawLine (Clazz.doubleToInt (this.getSize ().width / 2), Clazz.doubleToInt (this.getSize ().height / 2), Clazz.floatToInt (this.axes[i][0] * this.scale * this.max[0] + Clazz.doubleToInt (this.getSize ().width / 2)), Clazz.floatToInt (this.axes[i][1] * this.scale * this.max[1] + Clazz.doubleToInt (this.getSize ().height / 2))); -} -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "drawBackground", -function (g, col) { -g.setColor (col); -g.fillRect (0, 0, this.prefsize.width, this.prefsize.height); -}, "java.awt.Graphics,java.awt.Color"); -Clazz.defineMethod (c$, "drawScene", -function (g) { -var halfwidth = Clazz.doubleToInt (this.getSize ().width / 2); -var halfheight = Clazz.doubleToInt (this.getSize ().height / 2); -for (var i = 0; i < this.npoint; i++) { -var sp = this.points.elementAt (i); -var x = Clazz.floatToInt ((sp.coord[0] - this.centre[0]) * this.scale) + halfwidth; -var y = Clazz.floatToInt ((sp.coord[1] - this.centre[1]) * this.scale) + halfheight; -var z = sp.coord[1] - this.centre[2]; -if (this.av.getSequenceColour (sp.sequence) === java.awt.Color.black) { -g.setColor (java.awt.Color.white); -} else { -g.setColor (this.av.getSequenceColour (sp.sequence)); -}if (this.av.getSelectionGroup () != null) { -if (this.av.getSelectionGroup ().getSequences (null).contains ((this.points.elementAt (i)).sequence)) { -g.setColor (java.awt.Color.gray); -}}if (z < 0) { -g.setColor (g.getColor ().darker ()); -}g.fillRect (x - 3, y - 3, 6, 6); -if (this.$showLabels) { -g.setColor (java.awt.Color.red); -g.drawString ((this.points.elementAt (i)).sequence.getName (), x - 3, y - 4); -}} -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "minimumsize", -function () { -return this.prefsize; -}); -Clazz.defineMethod (c$, "preferredsize", -function () { -return this.prefsize; -}); -Clazz.overrideMethod (c$, "keyTyped", -function (evt) { -}, "java.awt.event.KeyEvent"); -Clazz.overrideMethod (c$, "keyReleased", -function (evt) { -}, "java.awt.event.KeyEvent"); -Clazz.overrideMethod (c$, "keyPressed", -function (evt) { -if (evt.getKeyCode () == 38) { -this.scalefactor = (this.scalefactor * 1.1); -this.scale = this.findScale (); -} else if (evt.getKeyCode () == 40) { -this.scalefactor = (this.scalefactor * 0.9); -this.scale = this.findScale (); -} else if (evt.getKeyChar () == 's') { -System.err.println ("DEBUG: Rectangle selection"); -if (this.rectx2 != -1 && this.recty2 != -1) { -this.rectSelect (this.rectx1, this.recty1, this.rectx2, this.recty2); -}}this.repaint (); -}, "java.awt.event.KeyEvent"); -Clazz.defineMethod (c$, "printPoints", -function () { -for (var i = 0; i < this.npoint; i++) { -var sp = this.points.elementAt (i); -jalview.util.Format.printLong (System.out, "%5d ", i); -for (var j = 0; j < 3; j++) { -jalview.util.Format.printDouble (System.out, "%13.3f ", sp.coord[j]); -} -System.out.println (); -} -}); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -var x = evt.getX (); -var y = evt.getY (); -this.mx = x; -this.my = y; -this.omx = this.mx; -this.omy = this.my; -this.startx = x; -this.starty = y; -this.rectx1 = x; -this.recty1 = y; -this.rectx2 = -1; -this.recty2 = -1; -var found = this.findPoint (x, y); -if (found != null) { -if (this.av.getSelectionGroup () != null) { -this.av.getSelectionGroup ().addOrRemove (found, true); -this.av.getSelectionGroup ().setEndRes (this.av.getAlignment ().getWidth () - 1); -} else { -this.av.setSelectionGroup ( new jalview.datamodel.SequenceGroup ()); -this.av.getSelectionGroup ().addOrRemove (found, true); -this.av.getSelectionGroup ().setEndRes (this.av.getAlignment ().getWidth () - 1); -}jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); -this.av.sendSelection (); -}this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -var found = this.findPoint (evt.getX (), evt.getY ()); -if (found == null) { -this.tooltip = null; -} else { -this.tooltip = found.getName (); -this.toolx = evt.getX (); -this.tooly = evt.getY (); -}this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -this.mx = evt.getX (); -this.my = evt.getY (); -this.rotmat.setIdentity (); -this.rotmat.rotate (this.my - this.omy, 'x'); -this.rotmat.rotate (this.mx - this.omx, 'y'); -for (var i = 0; i < this.npoint; i++) { -var sp = this.points.elementAt (i); -sp.coord[0] -= this.centre[0]; -sp.coord[1] -= this.centre[1]; -sp.coord[2] -= this.centre[2]; -sp.coord = this.rotmat.vectorMultiply (sp.coord); -sp.coord[0] += this.centre[0]; -sp.coord[1] += this.centre[1]; -sp.coord[2] += this.centre[2]; -} -for (var i = 0; i < 3; i++) { -this.axes[i] = this.rotmat.vectorMultiply (this.axes[i]); -} -this.omx = this.mx; -this.omy = this.my; -this.paint (this.getGraphics ()); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "rectSelect", -function (x1, y1, x2, y2) { -for (var i = 0; i < this.npoint; i++) { -var sp = this.points.elementAt (i); -var tmp1 = Clazz.doubleToInt ((sp.coord[0] - this.centre[0]) * this.scale + this.getSize ().width / 2.0); -var tmp2 = Clazz.doubleToInt ((sp.coord[1] - this.centre[1]) * this.scale + this.getSize ().height / 2.0); -if (tmp1 > x1 && tmp1 < x2 && tmp2 > y1 && tmp2 < y2) { -if (this.av != null) { -if (!this.av.getSelectionGroup ().getSequences (null).contains (sp.sequence)) { -this.av.getSelectionGroup ().addSequence (sp.sequence, true); -}}}} -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "findPoint", -function (x, y) { -var halfwidth = Clazz.doubleToInt (this.getSize ().width / 2); -var halfheight = Clazz.doubleToInt (this.getSize ().height / 2); -var found = -1; -for (var i = 0; i < this.npoint; i++) { -var sp = this.points.elementAt (i); -var px = Clazz.floatToInt ((sp.coord[0] - this.centre[0]) * this.scale) + halfwidth; -var py = Clazz.floatToInt ((sp.coord[1] - this.centre[1]) * this.scale) + halfheight; -if (Math.abs (px - x) < 3 && Math.abs (py - y) < 3) { -found = i; -}} -if (found != -1) { -return (this.points.elementAt (found)).sequence; -} else { -return null; -}}, "~N,~N"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "jalview.api.RotatableCanvasI", "java.awt.event.KeyListener", "$.MouseListener", "$.MouseMotionListener", "jalview.math.RotatableMatrix"], "jalview.appletgui.RotatableCanvas", ["jalview.appletgui.PaintRefresher", "jalview.datamodel.SequenceGroup", "jalview.util.Format", "$.MessageManager", "java.awt.Color", "$.Dimension", "$.Font"], function () { +c$ = Clazz.decorateAsClass (function () { +this.idmat = null; +this.objmat = null; +this.rotmat = null; +this.tooltip = null; +this.toolx = 0; +this.tooly = 0; +this.$drawAxes = true; +this.omx = 0; +this.mx = 0; +this.omy = 0; +this.my = 0; +this.img = null; +this.ig = null; +this.prefsize = null; +this.centre = null; +this.$width = null; +this.max = null; +this.min = null; +this.maxwidth = 0; +this.scale = 0; +this.npoint = 0; +this.points = null; +this.orig = null; +this.axes = null; +this.startx = 0; +this.starty = 0; +this.lastx = 0; +this.lasty = 0; +this.rectx1 = 0; +this.recty1 = 0; +this.rectx2 = 0; +this.recty2 = 0; +this.scalefactor = 1; +this.av = null; +this.$showLabels = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "RotatableCanvas", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener, jalview.api.RotatableCanvasI]); +Clazz.prepareFields (c$, function () { +this.idmat = new jalview.math.RotatableMatrix (3, 3); +this.objmat = new jalview.math.RotatableMatrix (3, 3); +this.rotmat = new jalview.math.RotatableMatrix (3, 3); +this.centre = Clazz.newFloatArray (3, 0); +this.$width = Clazz.newFloatArray (3, 0); +this.max = Clazz.newFloatArray (3, 0); +this.min = Clazz.newFloatArray (3, 0); +}); +Clazz.makeConstructor (c$, +function (av) { +Clazz.superConstructor (this, jalview.appletgui.RotatableCanvas, []); +this.av = av; +}, "jalview.viewmodel.AlignmentViewport"); +Clazz.defineMethod (c$, "showLabels", +function (b) { +this.$showLabels = b; +this.repaint (); +}, "~B"); +Clazz.overrideMethod (c$, "setPoints", +function (points, npoint) { +this.points = points; +this.npoint = npoint; +jalview.appletgui.PaintRefresher.Register (this, this.av.getSequenceSetId ()); +this.prefsize = this.getPreferredSize (); +this.orig = Clazz.newFloatArray (npoint, 3, 0); +for (var i = 0; i < npoint; i++) { +var sp = points.elementAt (i); +for (var j = 0; j < 3; j++) { +this.orig[i][j] = sp.coord[j]; +} +} +for (var i = 0; i < 3; i++) { +for (var j = 0; j < 3; j++) { +if (i != j) { +this.idmat.addElement (i, j, 0); +this.objmat.addElement (i, j, 0); +this.rotmat.addElement (i, j, 0); +} else { +this.idmat.addElement (i, j, 0); +this.objmat.addElement (i, j, 0); +this.rotmat.addElement (i, j, 0); +}} +} +this.axes = Clazz.newFloatArray (3, 3, 0); +this.initAxes (); +this.findCentre (); +this.findWidth (); +this.scale = this.findScale (); +this.addMouseListener (this); +this.addKeyListener (this); +this.addMouseMotionListener (this); +}, "java.util.Vector,~N"); +Clazz.defineMethod (c$, "initAxes", +function () { +for (var i = 0; i < 3; i++) { +for (var j = 0; j < 3; j++) { +if (i != j) { +this.axes[i][j] = 0; +} else { +this.axes[i][j] = 1; +}} +} +}); +Clazz.defineMethod (c$, "findWidth", +function () { +this.max = Clazz.newFloatArray (3, 0); +this.min = Clazz.newFloatArray (3, 0); +this.max[0] = -1.0E30; +this.max[1] = -1.0E30; +this.max[2] = -1.0E30; +this.min[0] = 1e30; +this.min[1] = 1e30; +this.min[2] = 1e30; +for (var i = 0; i < 3; i++) { +for (var j = 0; j < this.npoint; j++) { +var sp = this.points.elementAt (j); +if (sp.coord[i] >= this.max[i]) { +this.max[i] = sp.coord[i]; +}if (sp.coord[i] <= this.min[i]) { +this.min[i] = sp.coord[i]; +}} +} +this.$width[0] = Math.abs (this.max[0] - this.min[0]); +this.$width[1] = Math.abs (this.max[1] - this.min[1]); +this.$width[2] = Math.abs (this.max[2] - this.min[2]); +this.maxwidth = this.$width[0]; +if (this.$width[1] > this.$width[0]) { +this.maxwidth = this.$width[1]; +}if (this.$width[2] > this.$width[1]) { +this.maxwidth = this.$width[2]; +}}); +Clazz.defineMethod (c$, "findScale", +function () { +var dim; +var width; +var height; +if (this.getSize ().width != 0) { +width = this.getSize ().width; +height = this.getSize ().height; +} else { +width = this.prefsize.width; +height = this.prefsize.height; +}if (width < height) { +dim = width; +} else { +dim = height; +}return dim * this.scalefactor / (2 * this.maxwidth); +}); +Clazz.defineMethod (c$, "findCentre", +function () { +this.findWidth (); +this.centre[0] = (this.max[0] + this.min[0]) / 2; +this.centre[1] = (this.max[1] + this.min[1]) / 2; +this.centre[2] = (this.max[2] + this.min[2]) / 2; +}); +Clazz.overrideMethod (c$, "getPreferredSize", +function () { +if (this.prefsize != null) { +return this.prefsize; +} else { +return new java.awt.Dimension (400, 400); +}}); +Clazz.overrideMethod (c$, "getMinimumSize", +function () { +return this.getPreferredSize (); +}); +Clazz.overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "PaintComponent", +function (g) { +if (this.points == null) { +g.setFont ( new java.awt.Font ("Verdana", 0, 18)); +g.drawString (jalview.util.MessageManager.getString ("label.calculating_pca") + "....", 20, Clazz.doubleToInt (this.getSize ().height / 2)); +} else { +if ((this.img == null) || (this.prefsize.width != this.getSize ().width) || (this.prefsize.height != this.getSize ().height)) { +this.prefsize.width = this.getSize ().width; +this.prefsize.height = this.getSize ().height; +this.scale = this.findScale (); +this.img = this.createImage (this.getSize ().width, this.getSize ().height); +this.ig = this.img.getGraphics (); +}this.drawBackground (this.ig, java.awt.Color.black); +this.drawScene (this.ig); +if (this.$drawAxes == true) { +this.drawAxes (this.ig); +}if (this.tooltip != null) { +this.ig.setColor (java.awt.Color.red); +this.ig.drawString (this.tooltip, this.toolx, this.tooly); +}g.drawImage (this.img, 0, 0, this); +}}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "drawAxes", +function (g) { +g.setColor (java.awt.Color.yellow); +for (var i = 0; i < 3; i++) { +g.drawLine (Clazz.doubleToInt (this.getSize ().width / 2), Clazz.doubleToInt (this.getSize ().height / 2), Clazz.floatToInt (this.axes[i][0] * this.scale * this.max[0] + Clazz.doubleToInt (this.getSize ().width / 2)), Clazz.floatToInt (this.axes[i][1] * this.scale * this.max[1] + Clazz.doubleToInt (this.getSize ().height / 2))); +} +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "drawBackground", +function (g, col) { +g.setColor (col); +g.fillRect (0, 0, this.prefsize.width, this.prefsize.height); +}, "java.awt.Graphics,java.awt.Color"); +Clazz.defineMethod (c$, "drawScene", +function (g) { +var halfwidth = Clazz.doubleToInt (this.getSize ().width / 2); +var halfheight = Clazz.doubleToInt (this.getSize ().height / 2); +for (var i = 0; i < this.npoint; i++) { +var sp = this.points.elementAt (i); +var x = Clazz.floatToInt ((sp.coord[0] - this.centre[0]) * this.scale) + halfwidth; +var y = Clazz.floatToInt ((sp.coord[1] - this.centre[1]) * this.scale) + halfheight; +var z = sp.coord[1] - this.centre[2]; +if (this.av.getSequenceColour (sp.sequence) === java.awt.Color.black) { +g.setColor (java.awt.Color.white); +} else { +g.setColor (this.av.getSequenceColour (sp.sequence)); +}if (this.av.getSelectionGroup () != null) { +if (this.av.getSelectionGroup ().getSequences (null).contains ((this.points.elementAt (i)).sequence)) { +g.setColor (java.awt.Color.gray); +}}if (z < 0) { +g.setColor (g.getColor ().darker ()); +}g.fillRect (x - 3, y - 3, 6, 6); +if (this.$showLabels) { +g.setColor (java.awt.Color.red); +g.drawString ((this.points.elementAt (i)).sequence.getName (), x - 3, y - 4); +}} +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "minimumsize", +function () { +return this.prefsize; +}); +Clazz.defineMethod (c$, "preferredsize", +function () { +return this.prefsize; +}); +Clazz.overrideMethod (c$, "keyTyped", +function (evt) { +}, "java.awt.event.KeyEvent"); +Clazz.overrideMethod (c$, "keyReleased", +function (evt) { +}, "java.awt.event.KeyEvent"); +Clazz.overrideMethod (c$, "keyPressed", +function (evt) { +if (evt.getKeyCode () == 38) { +this.scalefactor = (this.scalefactor * 1.1); +this.scale = this.findScale (); +} else if (evt.getKeyCode () == 40) { +this.scalefactor = (this.scalefactor * 0.9); +this.scale = this.findScale (); +} else if (evt.getKeyChar () == 's') { +System.err.println ("DEBUG: Rectangle selection"); +if (this.rectx2 != -1 && this.recty2 != -1) { +this.rectSelect (this.rectx1, this.recty1, this.rectx2, this.recty2); +}}this.repaint (); +}, "java.awt.event.KeyEvent"); +Clazz.defineMethod (c$, "printPoints", +function () { +for (var i = 0; i < this.npoint; i++) { +var sp = this.points.elementAt (i); +jalview.util.Format.printLong (System.out, "%5d ", i); +for (var j = 0; j < 3; j++) { +jalview.util.Format.printDouble (System.out, "%13.3f ", sp.coord[j]); +} +System.out.println (); +} +}); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +var x = evt.getX (); +var y = evt.getY (); +this.mx = x; +this.my = y; +this.omx = this.mx; +this.omy = this.my; +this.startx = x; +this.starty = y; +this.rectx1 = x; +this.recty1 = y; +this.rectx2 = -1; +this.recty2 = -1; +var found = this.findPoint (x, y); +if (found != null) { +if (this.av.getSelectionGroup () != null) { +this.av.getSelectionGroup ().addOrRemove (found, true); +this.av.getSelectionGroup ().setEndRes (this.av.getAlignment ().getWidth () - 1); +} else { +this.av.setSelectionGroup ( new jalview.datamodel.SequenceGroup ()); +this.av.getSelectionGroup ().addOrRemove (found, true); +this.av.getSelectionGroup ().setEndRes (this.av.getAlignment ().getWidth () - 1); +}jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); +this.av.sendSelection (); +}this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +var found = this.findPoint (evt.getX (), evt.getY ()); +if (found == null) { +this.tooltip = null; +} else { +this.tooltip = found.getName (); +this.toolx = evt.getX (); +this.tooly = evt.getY (); +}this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +this.mx = evt.getX (); +this.my = evt.getY (); +this.rotmat.setIdentity (); +this.rotmat.rotate (this.my - this.omy, 'x'); +this.rotmat.rotate (this.mx - this.omx, 'y'); +for (var i = 0; i < this.npoint; i++) { +var sp = this.points.elementAt (i); +sp.coord[0] -= this.centre[0]; +sp.coord[1] -= this.centre[1]; +sp.coord[2] -= this.centre[2]; +sp.coord = this.rotmat.vectorMultiply (sp.coord); +sp.coord[0] += this.centre[0]; +sp.coord[1] += this.centre[1]; +sp.coord[2] += this.centre[2]; +} +for (var i = 0; i < 3; i++) { +this.axes[i] = this.rotmat.vectorMultiply (this.axes[i]); +} +this.omx = this.mx; +this.omy = this.my; +this.paint (this.getGraphics ()); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "rectSelect", +function (x1, y1, x2, y2) { +for (var i = 0; i < this.npoint; i++) { +var sp = this.points.elementAt (i); +var tmp1 = Clazz.doubleToInt ((sp.coord[0] - this.centre[0]) * this.scale + this.getSize ().width / 2.0); +var tmp2 = Clazz.doubleToInt ((sp.coord[1] - this.centre[1]) * this.scale + this.getSize ().height / 2.0); +if (tmp1 > x1 && tmp1 < x2 && tmp2 > y1 && tmp2 < y2) { +if (this.av != null) { +if (!this.av.getSelectionGroup ().getSequences (null).contains (sp.sequence)) { +this.av.getSelectionGroup ().addSequence (sp.sequence, true); +}}}} +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "findPoint", +function (x, y) { +var halfwidth = Clazz.doubleToInt (this.getSize ().width / 2); +var halfheight = Clazz.doubleToInt (this.getSize ().height / 2); +var found = -1; +for (var i = 0; i < this.npoint; i++) { +var sp = this.points.elementAt (i); +var px = Clazz.floatToInt ((sp.coord[0] - this.centre[0]) * this.scale) + halfwidth; +var py = Clazz.floatToInt ((sp.coord[1] - this.centre[1]) * this.scale) + halfheight; +if (Math.abs (px - x) < 3 && Math.abs (py - y) < 3) { +found = i; +}} +if (found != -1) { +return (this.points.elementAt (found)).sequence; +} else { +return null; +}}, "~N,~N"); +}); diff --git a/bin/jalview/appletgui/ScalePanel.class b/bin/jalview/appletgui/ScalePanel.class index 66ccdcbc301ce1614b7fc4761be9ab4c49f7bfa7..332e353f97240d915fd50282bd0cb744c0e578a1 100644 GIT binary patch delta 77 zcmbQ>*5|e%L71^?bE0q%vy?dl_a6p5#y<>g#Mvz9ZU=sn0vtbib0~ this.av.getAlignment ().getWidth ()) { -res = this.av.getAlignment ().getWidth () - 1; -}if (this.av.hasHiddenColumns ()) { -res = this.av.getColumnSelection ().adjustForHiddenColumns (res); -}if (!this.stretchingGroup) { -this.ap.paintAlignment (false); -return; -}var sg = this.av.getSelectionGroup (); -if (res > sg.getStartRes ()) { -sg.setEndRes (res); -} else if (res < sg.getStartRes ()) { -sg.setStartRes (res); -}this.stretchingGroup = false; -this.ap.paintAlignment (false); -this.av.sendSelection (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -this.mouseDragging = true; -var res = (Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ())) + this.av.getStartRes (); -if (res < 0) { -res = 0; -}if (this.av.hasHiddenColumns ()) { -res = this.av.getColumnSelection ().adjustForHiddenColumns (res); -}if (res > this.av.getAlignment ().getWidth ()) { -res = this.av.getAlignment ().getWidth () - 1; -}if (res < this.min) { -this.min = res; -}if (res > this.max) { -this.max = res; -}var sg = this.av.getSelectionGroup (); -if (sg != null) { -this.stretchingGroup = true; -if (!this.av.getColumnSelection ().contains (res)) { -this.av.getColumnSelection ().addElement (res); -}if (res > sg.getStartRes ()) { -sg.setEndRes (res); -}if (res < sg.getStartRes ()) { -sg.setStartRes (res); -}var col; -for (var i = this.min; i <= this.max; i++) { -col = this.av.getColumnSelection ().adjustForHiddenColumns (i); -if ((col < sg.getStartRes ()) || (col > sg.getEndRes ())) { -this.av.getColumnSelection ().removeElement (col); -} else { -this.av.getColumnSelection ().addElement (col); -}} -this.ap.paintAlignment (false); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -if (this.mouseDragging) { -this.ap.seqPanel.scrollCanvas (null); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -if (this.mouseDragging) { -this.ap.seqPanel.scrollCanvas (evt); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -if (!this.av.hasHiddenColumns ()) { -return; -}var res = (Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ())) + this.av.getStartRes (); -res = this.av.getColumnSelection ().adjustForHiddenColumns (res); -this.reveal = null; -for (var region, $region = this.av.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { -if (res + 1 == region[0] || res - 1 == region[1]) { -this.reveal = region; -break; -}} -this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -if (this.av.getWrapAlignment ()) return; -this.drawScale (g, this.av.getStartRes (), this.av.getEndRes (), this.getSize ().width, this.getSize ().height); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "drawScale", -function (gg, startx, endx, width, height) { -gg.setFont (this.av.getFont ()); -gg.setColor (java.awt.Color.white); -gg.fillRect (0, 0, width, height); -gg.setColor (java.awt.Color.black); -var cs = this.av.getColumnSelection (); -gg.setColor ( new java.awt.Color (220, 0, 0)); -var avcharWidth = this.av.getCharWidth (); -var avcharHeight = this.av.getCharHeight (); -for (var i = 0; i < cs.size (); i++) { -var sel = cs.columnAt (i); -if (this.av.hasHiddenColumns ()) { -sel = this.av.getColumnSelection ().findColumnPosition (sel); -}if ((sel >= startx) && (sel <= endx)) { -gg.fillRect ((sel - startx) * avcharWidth, 0, avcharWidth, this.getSize ().height); -}} -gg.setColor (java.awt.Color.black); -var scalestartx = (Clazz.doubleToInt (startx / 10)) * 10; -var fm = gg.getFontMetrics (this.av.getFont ()); -var y = avcharHeight - fm.getDescent (); -if ((scalestartx % 10) == 0) { -scalestartx += 5; -}var string; -var maxX = 0; -for (var i = scalestartx; i < endx; i += 5) { -if ((i % 10) == 0) { -string = String.valueOf (this.av.getColumnSelection ().adjustForHiddenColumns (i)); -if ((i - startx - 1) * avcharWidth > maxX) { -gg.drawString (string, (i - startx - 1) * avcharWidth, y); -maxX = (i - startx + 1) * avcharWidth + fm.stringWidth (string); -}gg.drawLine (((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + 2, ((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + (fm.getDescent () * 2)); -} else { -gg.drawLine (((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + fm.getDescent (), ((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + (fm.getDescent () * 2)); -}} -if (this.av.hasHiddenColumns ()) { -gg.setColor (java.awt.Color.blue); -var res; -if (this.av.getShowHiddenMarkers ()) { -for (var i = 0; i < this.av.getColumnSelection ().getHiddenColumns ().size (); i++) { -res = this.av.getColumnSelection ().findHiddenRegionPosition (i) - startx; -if (res < 0 || res > endx - scalestartx) { -continue; -}gg.fillPolygon ( Clazz.newIntArray (-1, [res * avcharWidth - Clazz.doubleToInt (avcharHeight / 4), res * avcharWidth + Clazz.doubleToInt (avcharHeight / 4), res * avcharWidth]), Clazz.newIntArray (-1, [y - Clazz.doubleToInt (avcharHeight / 2), y - Clazz.doubleToInt (avcharHeight / 2), y + 8]), 3); -} -}if (this.reveal != null && this.reveal[0] > startx && this.reveal[0] < endx) { -gg.drawString (jalview.util.MessageManager.getString ("label.reveal_columns"), this.reveal[0] * avcharWidth, 0); -}}}, "java.awt.Graphics,~N,~N,~N,~N"); -c$.$ScalePanel$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "ScalePanel$1", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.ScalePanel"].av.showColumn (this.b$["jalview.appletgui.ScalePanel"].reveal[0]); -this.b$["jalview.appletgui.ScalePanel"].reveal = null; -this.b$["jalview.appletgui.ScalePanel"].ap.paintAlignment (true); -if (this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel != null) { -this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel.updateOverviewImage (); -}}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$ScalePanel$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "ScalePanel$2", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.ScalePanel"].av.showAllHiddenColumns (); -this.b$["jalview.appletgui.ScalePanel"].reveal = null; -this.b$["jalview.appletgui.ScalePanel"].ap.paintAlignment (true); -if (this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel != null) { -this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel.updateOverviewImage (); -}}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$ScalePanel$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "ScalePanel$3", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -this.b$["jalview.appletgui.ScalePanel"].av.hideColumns (this.f$.res, this.f$.res); -if (this.b$["jalview.appletgui.ScalePanel"].av.getSelectionGroup () != null && this.b$["jalview.appletgui.ScalePanel"].av.getSelectionGroup ().getSize () == this.b$["jalview.appletgui.ScalePanel"].av.getAlignment ().getHeight ()) { -this.b$["jalview.appletgui.ScalePanel"].av.setSelectionGroup (null); -}this.b$["jalview.appletgui.ScalePanel"].ap.paintAlignment (true); -if (this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel != null) { -this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel.updateOverviewImage (); -}}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener"], "jalview.appletgui.ScalePanel", ["awt2swing.MenuItem", "$.PopupMenu", "jalview.datamodel.SequenceGroup", "jalview.util.MessageManager", "java.awt.Color", "java.awt.event.ActionListener"], function () { +c$ = Clazz.decorateAsClass (function () { +this.offy = 4; +this.$width = 0; +this.av = null; +this.ap = null; +this.stretchingGroup = false; +this.min = 0; +this.max = 0; +this.mouseDragging = false; +this.reveal = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "ScalePanel", awt2swing.Panel, [java.awt.event.MouseMotionListener, java.awt.event.MouseListener]); +Clazz.makeConstructor (c$, +function (av, ap) { +Clazz.superConstructor (this, jalview.appletgui.ScalePanel, []); +this.setName ("scalePanel"); +this.setLayout (null); +this.av = av; +this.ap = ap; +this.addMouseListener (this); +this.addMouseMotionListener (this); +}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +var x = (Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ())) + this.av.getStartRes (); +var res; +if (this.av.hasHiddenColumns ()) { +res = this.av.getColumnSelection ().adjustForHiddenColumns (x); +} else { +res = x; +}this.min = res; +this.max = res; +if ((evt.getModifiers () & 4) == 4) { +var pop = new awt2swing.PopupMenu (); +if (this.reveal != null) { +var item = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.reveal")); +item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.ScalePanel$1") ? 0 : jalview.appletgui.ScalePanel.$ScalePanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.ScalePanel$1, this, null))); +pop.add (item); +if (this.av.getColumnSelection ().hasManyHiddenColumns ()) { +item = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("action.reveal_all")); +item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.ScalePanel$2") ? 0 : jalview.appletgui.ScalePanel.$ScalePanel$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.ScalePanel$2, this, null))); +pop.add (item); +}this.add (pop); +pop.show (this, evt.getX (), evt.getY ()); +} else if (this.av.getColumnSelection ().contains (res)) { +var item = new awt2swing.MenuItem (jalview.util.MessageManager.getString ("label.hide_columns")); +item.addActionListener (((Clazz.isClassDefined ("jalview.appletgui.ScalePanel$3") ? 0 : jalview.appletgui.ScalePanel.$ScalePanel$3$ ()), Clazz.innerTypeInstance (jalview.appletgui.ScalePanel$3, this, Clazz.cloneFinals ("res", res)))); +pop.add (item); +this.add (pop); +pop.show (this, evt.getX (), evt.getY ()); +}} else { +if (!evt.isControlDown () && !evt.isShiftDown ()) { +this.av.getColumnSelection ().clear (); +}this.av.getColumnSelection ().addElement (res); +var sg = new jalview.datamodel.SequenceGroup (); +for (var i = 0; i < this.av.getAlignment ().getSequences ().size (); i++) { +sg.addSequence (this.av.getAlignment ().getSequenceAt (i), false); +} +sg.setStartRes (res); +sg.setEndRes (res); +this.av.setSelectionGroup (sg); +if (evt.isShiftDown ()) { +var min = Math.min (this.av.getColumnSelection ().getMin (), res); +var max = Math.max (this.av.getColumnSelection ().getMax (), res); +for (var i = min; i < max; i++) { +this.av.getColumnSelection ().addElement (i); +} +sg.setStartRes (min); +sg.setEndRes (max); +}}this.ap.paintAlignment (true); +this.av.sendSelection (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +this.mouseDragging = false; +var res = (Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ())) + this.av.getStartRes (); +if (res > this.av.getAlignment ().getWidth ()) { +res = this.av.getAlignment ().getWidth () - 1; +}if (this.av.hasHiddenColumns ()) { +res = this.av.getColumnSelection ().adjustForHiddenColumns (res); +}if (!this.stretchingGroup) { +this.ap.paintAlignment (false); +return; +}var sg = this.av.getSelectionGroup (); +if (res > sg.getStartRes ()) { +sg.setEndRes (res); +} else if (res < sg.getStartRes ()) { +sg.setStartRes (res); +}this.stretchingGroup = false; +this.ap.paintAlignment (false); +this.av.sendSelection (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +this.mouseDragging = true; +var res = (Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ())) + this.av.getStartRes (); +if (res < 0) { +res = 0; +}if (this.av.hasHiddenColumns ()) { +res = this.av.getColumnSelection ().adjustForHiddenColumns (res); +}if (res > this.av.getAlignment ().getWidth ()) { +res = this.av.getAlignment ().getWidth () - 1; +}if (res < this.min) { +this.min = res; +}if (res > this.max) { +this.max = res; +}var sg = this.av.getSelectionGroup (); +if (sg != null) { +this.stretchingGroup = true; +if (!this.av.getColumnSelection ().contains (res)) { +this.av.getColumnSelection ().addElement (res); +}if (res > sg.getStartRes ()) { +sg.setEndRes (res); +}if (res < sg.getStartRes ()) { +sg.setStartRes (res); +}var col; +for (var i = this.min; i <= this.max; i++) { +col = this.av.getColumnSelection ().adjustForHiddenColumns (i); +if ((col < sg.getStartRes ()) || (col > sg.getEndRes ())) { +this.av.getColumnSelection ().removeElement (col); +} else { +this.av.getColumnSelection ().addElement (col); +}} +this.ap.paintAlignment (false); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +if (this.mouseDragging) { +this.ap.seqPanel.scrollCanvas (null); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +if (this.mouseDragging) { +this.ap.seqPanel.scrollCanvas (evt); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +if (!this.av.hasHiddenColumns ()) { +return; +}var res = (Clazz.doubleToInt (evt.getX () / this.av.getCharWidth ())) + this.av.getStartRes (); +res = this.av.getColumnSelection ().adjustForHiddenColumns (res); +this.reveal = null; +for (var region, $region = this.av.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { +if (res + 1 == region[0] || res - 1 == region[1]) { +this.reveal = region; +break; +}} +this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +if (this.av.getWrapAlignment ()) return; +this.drawScale (g, this.av.getStartRes (), this.av.getEndRes (), this.getSize ().width, this.getSize ().height); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "drawScale", +function (gg, startx, endx, width, height) { +gg.setFont (this.av.getFont ()); +gg.setColor (java.awt.Color.white); +gg.fillRect (0, 0, width, height); +gg.setColor (java.awt.Color.black); +var cs = this.av.getColumnSelection (); +gg.setColor ( new java.awt.Color (220, 0, 0)); +var avcharWidth = this.av.getCharWidth (); +var avcharHeight = this.av.getCharHeight (); +for (var i = 0; i < cs.size (); i++) { +var sel = cs.columnAt (i); +if (this.av.hasHiddenColumns ()) { +sel = this.av.getColumnSelection ().findColumnPosition (sel); +}if ((sel >= startx) && (sel <= endx)) { +gg.fillRect ((sel - startx) * avcharWidth, 0, avcharWidth, this.getSize ().height); +}} +gg.setColor (java.awt.Color.black); +var scalestartx = (Clazz.doubleToInt (startx / 10)) * 10; +var fm = gg.getFontMetrics (this.av.getFont ()); +var y = avcharHeight - fm.getDescent (); +if ((scalestartx % 10) == 0) { +scalestartx += 5; +}var string; +var maxX = 0; +for (var i = scalestartx; i < endx; i += 5) { +if ((i % 10) == 0) { +string = String.valueOf (this.av.getColumnSelection ().adjustForHiddenColumns (i)); +if ((i - startx - 1) * avcharWidth > maxX) { +gg.drawString (string, (i - startx - 1) * avcharWidth, y); +maxX = (i - startx + 1) * avcharWidth + fm.stringWidth (string); +}gg.drawLine (((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + 2, ((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + (fm.getDescent () * 2)); +} else { +gg.drawLine (((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + fm.getDescent (), ((i - startx - 1) * avcharWidth) + (Clazz.doubleToInt (avcharWidth / 2)), y + (fm.getDescent () * 2)); +}} +if (this.av.hasHiddenColumns ()) { +gg.setColor (java.awt.Color.blue); +var res; +if (this.av.getShowHiddenMarkers ()) { +for (var i = 0; i < this.av.getColumnSelection ().getHiddenColumns ().size (); i++) { +res = this.av.getColumnSelection ().findHiddenRegionPosition (i) - startx; +if (res < 0 || res > endx - scalestartx) { +continue; +}gg.fillPolygon ( Clazz.newIntArray (-1, [res * avcharWidth - Clazz.doubleToInt (avcharHeight / 4), res * avcharWidth + Clazz.doubleToInt (avcharHeight / 4), res * avcharWidth]), Clazz.newIntArray (-1, [y - Clazz.doubleToInt (avcharHeight / 2), y - Clazz.doubleToInt (avcharHeight / 2), y + 8]), 3); +} +}if (this.reveal != null && this.reveal[0] > startx && this.reveal[0] < endx) { +gg.drawString (jalview.util.MessageManager.getString ("label.reveal_columns"), this.reveal[0] * avcharWidth, 0); +}}}, "java.awt.Graphics,~N,~N,~N,~N"); +c$.$ScalePanel$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "ScalePanel$1", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.ScalePanel"].av.showColumn (this.b$["jalview.appletgui.ScalePanel"].reveal[0]); +this.b$["jalview.appletgui.ScalePanel"].reveal = null; +this.b$["jalview.appletgui.ScalePanel"].ap.paintAlignment (true); +if (this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel != null) { +this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel.updateOverviewImage (); +}}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$ScalePanel$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "ScalePanel$2", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.ScalePanel"].av.showAllHiddenColumns (); +this.b$["jalview.appletgui.ScalePanel"].reveal = null; +this.b$["jalview.appletgui.ScalePanel"].ap.paintAlignment (true); +if (this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel != null) { +this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel.updateOverviewImage (); +}}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$ScalePanel$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "ScalePanel$3", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +this.b$["jalview.appletgui.ScalePanel"].av.hideColumns (this.f$.res, this.f$.res); +if (this.b$["jalview.appletgui.ScalePanel"].av.getSelectionGroup () != null && this.b$["jalview.appletgui.ScalePanel"].av.getSelectionGroup ().getSize () == this.b$["jalview.appletgui.ScalePanel"].av.getAlignment ().getHeight ()) { +this.b$["jalview.appletgui.ScalePanel"].av.setSelectionGroup (null); +}this.b$["jalview.appletgui.ScalePanel"].ap.paintAlignment (true); +if (this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel != null) { +this.b$["jalview.appletgui.ScalePanel"].ap.overviewPanel.updateOverviewImage (); +}}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/SeqCanvas.class b/bin/jalview/appletgui/SeqCanvas.class index a5ce5f0d9c90908b872baf320a7eb6b5f4e6017b..c3feb048d8e8a1bfe47824aee5b7a027494a7db7 100644 GIT binary patch delta 162 zcmZ2fIJa=aDS5`M&8Ox4n53l{IQSS8{xftiaI!Nn!TA1UM(@ot)lyhQ zo-qjhWzc13Sj5h-U+fQq1mk~({KZP! wV&I>wr!BU5k@h4uMxM>4M$=iDOBfU;pEtMWaRw?0=HQoQmf>KUEMn0K0MDHyz5oCK diff --git a/bin/jalview/appletgui/SeqCanvas.js b/bin/jalview/appletgui/SeqCanvas.js index ac84c24..af5372b 100644 --- a/bin/jalview/appletgui/SeqCanvas.js +++ b/bin/jalview/appletgui/SeqCanvas.js @@ -1,411 +1,411 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel"], "jalview.appletgui.SeqCanvas", ["jalview.appletgui.AnnotationPanel", "$.FeatureRenderer", "$.PaintRefresher", "$.SequenceRenderer", "jalview.util.Comparison", "java.awt.Color"], function () { -c$ = Clazz.decorateAsClass (function () { -this.fr = null; -this.sr = null; -this.img = null; -this.gg = null; -this.imgWidth = 0; -this.imgHeight = 0; -this.av = null; -this.searchResults = null; -this.$fastPaint = false; -this.cursorX = 0; -this.cursorY = 0; -this.avcharHeight = 0; -this.avcharWidth = 0; -this.lastsr = 0; -this.LABEL_WEST = 0; -this.LABEL_EAST = 0; -this.annotations = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "SeqCanvas", awt2swing.Panel); -Clazz.makeConstructor (c$, -function (av) { -Clazz.superConstructor (this, jalview.appletgui.SeqCanvas, []); -this.av = av; -this.fr = new jalview.appletgui.FeatureRenderer (av); -this.sr = new jalview.appletgui.SequenceRenderer (av); -jalview.appletgui.PaintRefresher.Register (this, av.getSequenceSetId ()); -this.updateViewport (); -}, "jalview.appletgui.AlignViewport"); -Clazz.defineMethod (c$, "updateViewport", -($fz = function () { -this.avcharHeight = this.av.getCharHeight (); -this.avcharWidth = this.av.getCharWidth (); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getViewport", -function () { -return this.av; -}); -Clazz.defineMethod (c$, "getFeatureRenderer", -function () { -return this.fr; -}); -Clazz.defineMethod (c$, "getSequenceRenderer", -function () { -return this.sr; -}); -Clazz.defineMethod (c$, "drawNorthScale", -($fz = function (g, startx, endx, ypos) { -var scalestartx = startx - startx % 10 + 10; -g.setColor (java.awt.Color.black); -for (var i = scalestartx; i < endx; i += 10) { -var value = i; -if (this.av.hasHiddenColumns ()) { -value = this.av.getColumnSelection ().adjustForHiddenColumns (value); -}g.drawString (String.valueOf (value), (i - startx - 1) * this.avcharWidth, ypos - (Clazz.doubleToInt (this.avcharHeight / 2))); -g.drawLine (((i - startx - 1) * this.avcharWidth) + (Clazz.doubleToInt (this.avcharWidth / 2)), (ypos + 2) - (Clazz.doubleToInt (this.avcharHeight / 2)), ((i - startx - 1) * this.avcharWidth) + (Clazz.doubleToInt (this.avcharWidth / 2)), ypos - 2); -} -}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); -Clazz.defineMethod (c$, "drawWestScale", -($fz = function (g, startx, endx, ypos) { -var fm = this.getFontMetrics (this.av.getFont ()); -ypos += this.avcharHeight; -if (this.av.hasHiddenColumns ()) { -startx = this.av.getColumnSelection ().adjustForHiddenColumns (startx); -endx = this.av.getColumnSelection ().adjustForHiddenColumns (endx); -}var maxwidth = this.av.getAlignment ().getWidth (); -if (this.av.hasHiddenColumns ()) { -maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; -}for (var i = 0; i < this.av.getAlignment ().getHeight (); i++) { -var seq = this.av.getAlignment ().getSequenceAt (i); -var index = startx; -var value = -1; -while (index < endx) { -if (jalview.util.Comparison.isGap (seq.getCharAt (index))) { -index++; -continue; -}value = this.av.getAlignment ().getSequenceAt (i).findPosition (index); -break; -} -if (value != -1) { -var x = this.LABEL_WEST - fm.stringWidth (String.valueOf (value)) - Clazz.doubleToInt (this.avcharWidth / 2); -g.drawString (value + "", x, (ypos + (i * this.avcharHeight)) - (Clazz.doubleToInt (this.avcharHeight / 5))); -}} -}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); -Clazz.defineMethod (c$, "drawEastScale", -($fz = function (g, startx, endx, ypos) { -ypos += this.avcharHeight; -if (this.av.hasHiddenColumns ()) { -endx = this.av.getColumnSelection ().adjustForHiddenColumns (endx); -}var seq; -for (var i = 0; i < this.av.getAlignment ().getHeight (); i++) { -seq = this.av.getAlignment ().getSequenceAt (i); -var index = endx; -var value = -1; -while (index > startx) { -if (jalview.util.Comparison.isGap (seq.getCharAt (index))) { -index--; -continue; -}value = seq.findPosition (index); -break; -} -if (value != -1) { -g.drawString (String.valueOf (value), 0, (ypos + (i * this.avcharHeight)) - (Clazz.doubleToInt (this.avcharHeight / 5))); -}} -}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); -Clazz.defineMethod (c$, "fastPaint", -function (horizontal, vertical) { -if (this.$fastPaint || this.gg == null) { -return; -}this.updateViewport (); -if (this.lastsr + horizontal != this.av.startRes) { -horizontal = this.av.startRes - this.lastsr; -}this.lastsr = this.av.startRes; -this.$fastPaint = true; -this.gg.copyArea (horizontal * this.avcharWidth, vertical * this.avcharHeight, this.imgWidth - horizontal * this.avcharWidth, this.imgHeight - vertical * this.avcharHeight, -horizontal * this.avcharWidth, -vertical * this.avcharHeight); -var sr = this.av.startRes; -var er = this.av.endRes; -var ss = this.av.startSeq; -var es = this.av.endSeq; -var transX = 0; -var transY = 0; -if (horizontal > 0) { -transX = (er - sr - horizontal) * this.avcharWidth; -sr = er - horizontal; -} else if (horizontal < 0) { -er = sr - horizontal; -} else if (vertical > 0) { -ss = es - vertical; -if (ss < this.av.startSeq) { -ss = this.av.startSeq; -} else { -transY = this.imgHeight - vertical * this.avcharHeight; -}} else if (vertical < 0) { -es = ss - vertical; -if (es > this.av.endSeq) { -es = this.av.endSeq; -}}this.gg.translate (transX, transY); -this.drawPanel (this.gg, sr, er, ss, es, 0); -this.gg.translate (-transX, -transY); -this.repaint (); -}, "~N,~N"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -if (this.img != null && (this.$fastPaint || (this.getSize ().width != g.getClipBounds ().width) || (this.getSize ().height != g.getClipBounds ().height))) { -g.drawImage (this.img, 0, 0, this); -this.$fastPaint = false; -return; -}if (this.$fastPaint) { -g.drawImage (this.img, 0, 0, this); -this.$fastPaint = false; -return; -}this.updateViewport (); -this.imgWidth = this.getSize ().width; -this.imgHeight = this.getSize ().height; -this.imgWidth -= this.imgWidth % this.avcharWidth; -this.imgHeight -= this.imgHeight % this.avcharHeight; -if (this.imgWidth < 1 || this.imgHeight < 1) { -return; -}if (this.img == null || this.imgWidth != this.img.getWidth (this) || this.imgHeight != this.img.getHeight (this)) { -this.img = this.createImage (this.imgWidth, this.imgHeight); -this.gg = this.img.getGraphics (); -this.gg.setFont (this.av.getFont ()); -}this.gg.setColor (java.awt.Color.white); -this.gg.fillRect (0, 0, this.imgWidth, this.imgHeight); -if (this.av.getWrapAlignment ()) { -this.drawWrappedPanel (this.gg, this.imgWidth, this.imgHeight, this.av.startRes); -} else { -this.drawPanel (this.gg, this.av.startRes, this.av.endRes, this.av.startSeq, this.av.endSeq, 0); -}g.drawImage (this.img, 0, 0, this); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "getWrappedCanvasWidth", -function (cwidth) { -cwidth -= cwidth % this.av.getCharWidth (); -var fm = this.getFontMetrics (this.av.getFont ()); -this.LABEL_EAST = 0; -this.LABEL_WEST = 0; -if (this.av.getScaleRightWrapped ()) { -this.LABEL_EAST = fm.stringWidth (this.getMask ()); -}if (this.av.getScaleLeftWrapped ()) { -this.LABEL_WEST = fm.stringWidth (this.getMask ()); -}return Clazz.doubleToInt ((cwidth - this.LABEL_EAST - this.LABEL_WEST) / this.av.getCharWidth ()); -}, "~N"); -Clazz.defineMethod (c$, "getMask", -function () { -var mask = "0"; -var maxWidth = 0; -var tmp; -var alignment = this.av.getAlignment (); -for (var i = 0; i < alignment.getHeight (); i++) { -tmp = alignment.getSequenceAt (i).getEnd (); -if (tmp > maxWidth) { -maxWidth = tmp; -}} -for (var i = maxWidth; i > 0; i /= 10) { -mask += "0"; -} -return mask; -}); -Clazz.defineMethod (c$, "drawWrappedPanel", -($fz = function (g, canvasWidth, canvasHeight, startRes) { -var al = this.av.getAlignment (); -var fm = this.getFontMetrics (this.av.getFont ()); -if (this.av.getScaleRightWrapped ()) { -this.LABEL_EAST = fm.stringWidth (this.getMask ()); -}if (this.av.getScaleLeftWrapped ()) { -this.LABEL_WEST = fm.stringWidth (this.getMask ()); -}var hgap = this.avcharHeight; -if (this.av.getScaleAboveWrapped ()) { -hgap += this.avcharHeight; -}var cWidth = Clazz.doubleToInt ((canvasWidth - this.LABEL_EAST - this.LABEL_WEST) / this.avcharWidth); -var cHeight = this.av.getAlignment ().getHeight () * this.avcharHeight; -this.av.setWrappedWidth (cWidth); -this.av.endRes = this.av.startRes + cWidth; -var endx; -var ypos = hgap; -var maxwidth = this.av.getAlignment ().getWidth () - 1; -if (this.av.hasHiddenColumns ()) { -maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; -}while ((ypos <= canvasHeight) && (startRes < maxwidth)) { -endx = startRes + cWidth - 1; -if (endx > maxwidth) { -endx = maxwidth; -}g.setColor (java.awt.Color.black); -if (this.av.getScaleLeftWrapped ()) { -this.drawWestScale (g, startRes, endx, ypos); -}if (this.av.getScaleRightWrapped ()) { -g.translate (canvasWidth - this.LABEL_EAST, 0); -this.drawEastScale (g, startRes, endx, ypos); -g.translate (-(canvasWidth - this.LABEL_EAST), 0); -}g.translate (this.LABEL_WEST, 0); -if (this.av.getScaleAboveWrapped ()) { -this.drawNorthScale (g, startRes, endx, ypos); -}if (this.av.hasHiddenColumns () && this.av.getShowHiddenMarkers ()) { -g.setColor (java.awt.Color.blue); -var res; -for (var i = 0; i < this.av.getColumnSelection ().getHiddenColumns ().size (); i++) { -res = this.av.getColumnSelection ().findHiddenRegionPosition (i) - startRes; -if (res < 0 || res > endx - startRes) { -continue; -}this.gg.fillPolygon ( Clazz.newIntArray (-1, [res * this.avcharWidth - Clazz.doubleToInt (this.avcharHeight / 4), res * this.avcharWidth + Clazz.doubleToInt (this.avcharHeight / 4), res * this.avcharWidth]), Clazz.newIntArray (-1, [ypos - (Clazz.doubleToInt (this.avcharHeight / 2)), ypos - (Clazz.doubleToInt (this.avcharHeight / 2)), ypos - (Clazz.doubleToInt (this.avcharHeight / 2)) + 8]), 3); -} -}if (g.getClip () == null) { -g.setClip (0, 0, cWidth * this.avcharWidth, canvasHeight); -}this.drawPanel (g, startRes, endx, 0, al.getHeight (), ypos); -g.setClip (null); -if (this.av.isShowAnnotation ()) { -g.translate (0, cHeight + ypos + 4); -if (this.annotations == null) { -this.annotations = new jalview.appletgui.AnnotationPanel (this.av); -}this.annotations.drawComponent (g, startRes, endx + 1); -g.translate (0, -cHeight - ypos - 4); -}g.translate (-this.LABEL_WEST, 0); -ypos += cHeight + this.getAnnotationHeight () + hgap; -startRes += cWidth; -} -}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); -Clazz.defineMethod (c$, "getAnnotationHeight", -function () { -if (!this.av.isShowAnnotation ()) { -return 0; -}if (this.annotations == null) { -this.annotations = new jalview.appletgui.AnnotationPanel (this.av); -}return this.annotations.adjustPanelHeight (); -}); -Clazz.defineMethod (c$, "drawPanel", -($fz = function (g1, startRes, endRes, startSeq, endSeq, offset) { -if (!this.av.hasHiddenColumns ()) { -this.draw (g1, startRes, endRes, startSeq, endSeq, offset); -} else { -var screenY = 0; -var blockStart = startRes; -var blockEnd = endRes; -if (this.av.hasHiddenColumns ()) { -for (var region, $region = this.av.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { -var hideStart = region[0]; -var hideEnd = region[1]; -if (hideStart <= blockStart) { -blockStart += (hideEnd - hideStart) + 1; -continue; -}blockEnd = hideStart - 1; -g1.translate (screenY * this.avcharWidth, 0); -this.draw (g1, blockStart, blockEnd, startSeq, endSeq, offset); -if (this.av.getShowHiddenMarkers ()) { -g1.setColor (java.awt.Color.blue); -g1.drawLine ((blockEnd - blockStart + 1) * this.avcharWidth - 1, 0 + offset, (blockEnd - blockStart + 1) * this.avcharWidth - 1, (endSeq - startSeq) * this.avcharHeight + offset); -}g1.translate (-screenY * this.avcharWidth, 0); -screenY += blockEnd - blockStart + 1; -blockStart = hideEnd + 1; -} -}if (screenY <= (endRes - startRes)) { -blockEnd = blockStart + (endRes - startRes) - screenY; -g1.translate (screenY * this.avcharWidth, 0); -this.draw (g1, blockStart, blockEnd, startSeq, endSeq, offset); -g1.translate (-screenY * this.avcharWidth, 0); -}}}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "draw", -function (g, startRes, endRes, startSeq, endSeq, offset) { -g.setFont (this.av.getFont ()); -this.sr.prepare (g, this.av.isRenderGaps ()); -this.updateViewport (); -var nextSeq; -for (var i = startSeq; i < endSeq; i++) { -nextSeq = this.av.getAlignment ().getSequenceAt (i); -if (nextSeq == null) { -continue; -}this.sr.drawSequence (nextSeq, this.av.getAlignment ().findAllGroups (nextSeq), startRes, endRes, offset + ((i - startSeq) * this.avcharHeight)); -if (this.av.isShowSequenceFeatures ()) { -this.fr.drawSequence (g, nextSeq, startRes, endRes, offset + ((i - startSeq) * this.avcharHeight)); -}if (this.searchResults != null) { -var visibleResults = this.searchResults.getResults (nextSeq, startRes, endRes); -if (visibleResults != null) { -for (var r = 0; r < visibleResults.length; r += 2) { -this.sr.drawHighlightedText (nextSeq, visibleResults[r], visibleResults[r + 1], (visibleResults[r] - startRes) * this.avcharWidth, offset + ((i - startSeq) * this.avcharHeight)); -} -}}if (this.av.cursorMode && this.cursorY == i && this.cursorX >= startRes && this.cursorX <= endRes) { -this.sr.drawCursor (nextSeq, this.cursorX, (this.cursorX - startRes) * this.avcharWidth, offset + ((i - startSeq) * this.avcharHeight)); -}} -if (this.av.getSelectionGroup () != null || this.av.getAlignment ().getGroups ().size () > 0) { -this.drawGroupsBoundaries (g, startRes, endRes, startSeq, endSeq, offset); -}}, "java.awt.Graphics,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "drawGroupsBoundaries", -($fz = function (g, startRes, endRes, startSeq, endSeq, offset) { -var group = this.av.getSelectionGroup (); -var sx = -1; -var sy = -1; -var ex = -1; -var groupIndex = -1; -if ((group == null) && (this.av.getAlignment ().getGroups ().size () > 0)) { -group = this.av.getAlignment ().getGroups ().get (0); -groupIndex = 0; -}if (group != null) { -do { -var oldY = -1; -var i = 0; -var inGroup = false; -var top = -1; -var bottom = -1; -var alHeight = this.av.getAlignment ().getHeight () - 1; -for (i = startSeq; i < endSeq; i++) { -sx = (group.getStartRes () - startRes) * this.avcharWidth; -sy = offset + ((i - startSeq) * this.avcharHeight); -ex = (((group.getEndRes () + 1) - group.getStartRes ()) * this.avcharWidth) - 1; -if (sx + ex < 0 || sx > this.imgWidth) { -continue; -}if ((sx <= (endRes - startRes) * this.avcharWidth) && group.getSequences (null).contains (this.av.getAlignment ().getSequenceAt (i))) { -if ((bottom == -1) && (i >= alHeight || !group.getSequences (null).contains (this.av.getAlignment ().getSequenceAt (i + 1)))) { -bottom = sy + this.avcharHeight; -}if (!inGroup) { -if (((top == -1) && (i == 0)) || !group.getSequences (null).contains (this.av.getAlignment ().getSequenceAt (i - 1))) { -top = sy; -}oldY = sy; -inGroup = true; -if (group === this.av.getSelectionGroup ()) { -g.setColor (java.awt.Color.red); -} else { -g.setColor (group.getOutlineColour ()); -}}} else { -if (inGroup) { -if (sx >= 0 && sx < this.imgWidth) { -g.drawLine (sx, oldY, sx, sy); -}if (sx + ex < this.imgWidth) { -g.drawLine (sx + ex, oldY, sx + ex, sy); -}if (sx < 0) { -ex += sx; -sx = 0; -}if (sx + ex > this.imgWidth) { -ex = this.imgWidth; -} else if (sx + ex >= (endRes - startRes + 1) * this.avcharWidth) { -ex = (endRes - startRes + 1) * this.avcharWidth; -}if (top != -1) { -g.drawLine (sx, top, sx + ex, top); -top = -1; -}if (bottom != -1) { -g.drawLine (sx, bottom, sx + ex, bottom); -bottom = -1; -}inGroup = false; -}}} -if (inGroup) { -sy = offset + ((i - startSeq) * this.avcharHeight); -if (sx >= 0 && sx < this.imgWidth) { -g.drawLine (sx, oldY, sx, sy); -}if (sx + ex < this.imgWidth) { -g.drawLine (sx + ex, oldY, sx + ex, sy); -}if (sx < 0) { -ex += sx; -sx = 0; -}if (sx + ex > this.imgWidth) { -ex = this.imgWidth; -} else if (sx + ex >= (endRes - startRes + 1) * this.avcharWidth) { -ex = (endRes - startRes + 1) * this.avcharWidth; -}if (top != -1) { -g.drawLine (sx, top, sx + ex, top); -top = -1; -}if (bottom != -1) { -g.drawLine (sx, bottom - 1, sx + ex, bottom - 1); -bottom = -1; -}inGroup = false; -}groupIndex++; -if (groupIndex >= this.av.getAlignment ().getGroups ().size ()) { -break; -}group = this.av.getAlignment ().getGroups ().get (groupIndex); -} while (groupIndex < this.av.getAlignment ().getGroups ().size ()); -}}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "highlightSearchResults", -function (results) { -this.searchResults = results; -this.repaint (); -}, "jalview.datamodel.SearchResults"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel"], "jalview.appletgui.SeqCanvas", ["jalview.appletgui.AnnotationPanel", "$.FeatureRenderer", "$.PaintRefresher", "$.SequenceRenderer", "jalview.util.Comparison", "java.awt.Color"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fr = null; +this.sr = null; +this.img = null; +this.gg = null; +this.imgWidth = 0; +this.imgHeight = 0; +this.av = null; +this.searchResults = null; +this.$fastPaint = false; +this.cursorX = 0; +this.cursorY = 0; +this.avcharHeight = 0; +this.avcharWidth = 0; +this.lastsr = 0; +this.LABEL_WEST = 0; +this.LABEL_EAST = 0; +this.annotations = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "SeqCanvas", awt2swing.Panel); +Clazz.makeConstructor (c$, +function (av) { +Clazz.superConstructor (this, jalview.appletgui.SeqCanvas, []); +this.av = av; +this.fr = new jalview.appletgui.FeatureRenderer (av); +this.sr = new jalview.appletgui.SequenceRenderer (av); +jalview.appletgui.PaintRefresher.Register (this, av.getSequenceSetId ()); +this.updateViewport (); +}, "jalview.appletgui.AlignViewport"); +Clazz.defineMethod (c$, "updateViewport", +($fz = function () { +this.avcharHeight = this.av.getCharHeight (); +this.avcharWidth = this.av.getCharWidth (); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getViewport", +function () { +return this.av; +}); +Clazz.defineMethod (c$, "getFeatureRenderer", +function () { +return this.fr; +}); +Clazz.defineMethod (c$, "getSequenceRenderer", +function () { +return this.sr; +}); +Clazz.defineMethod (c$, "drawNorthScale", +($fz = function (g, startx, endx, ypos) { +var scalestartx = startx - startx % 10 + 10; +g.setColor (java.awt.Color.black); +for (var i = scalestartx; i < endx; i += 10) { +var value = i; +if (this.av.hasHiddenColumns ()) { +value = this.av.getColumnSelection ().adjustForHiddenColumns (value); +}g.drawString (String.valueOf (value), (i - startx - 1) * this.avcharWidth, ypos - (Clazz.doubleToInt (this.avcharHeight / 2))); +g.drawLine (((i - startx - 1) * this.avcharWidth) + (Clazz.doubleToInt (this.avcharWidth / 2)), (ypos + 2) - (Clazz.doubleToInt (this.avcharHeight / 2)), ((i - startx - 1) * this.avcharWidth) + (Clazz.doubleToInt (this.avcharWidth / 2)), ypos - 2); +} +}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); +Clazz.defineMethod (c$, "drawWestScale", +($fz = function (g, startx, endx, ypos) { +var fm = this.getFontMetrics (this.av.getFont ()); +ypos += this.avcharHeight; +if (this.av.hasHiddenColumns ()) { +startx = this.av.getColumnSelection ().adjustForHiddenColumns (startx); +endx = this.av.getColumnSelection ().adjustForHiddenColumns (endx); +}var maxwidth = this.av.getAlignment ().getWidth (); +if (this.av.hasHiddenColumns ()) { +maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; +}for (var i = 0; i < this.av.getAlignment ().getHeight (); i++) { +var seq = this.av.getAlignment ().getSequenceAt (i); +var index = startx; +var value = -1; +while (index < endx) { +if (jalview.util.Comparison.isGap (seq.getCharAt (index))) { +index++; +continue; +}value = this.av.getAlignment ().getSequenceAt (i).findPosition (index); +break; +} +if (value != -1) { +var x = this.LABEL_WEST - fm.stringWidth (String.valueOf (value)) - Clazz.doubleToInt (this.avcharWidth / 2); +g.drawString (value + "", x, (ypos + (i * this.avcharHeight)) - (Clazz.doubleToInt (this.avcharHeight / 5))); +}} +}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); +Clazz.defineMethod (c$, "drawEastScale", +($fz = function (g, startx, endx, ypos) { +ypos += this.avcharHeight; +if (this.av.hasHiddenColumns ()) { +endx = this.av.getColumnSelection ().adjustForHiddenColumns (endx); +}var seq; +for (var i = 0; i < this.av.getAlignment ().getHeight (); i++) { +seq = this.av.getAlignment ().getSequenceAt (i); +var index = endx; +var value = -1; +while (index > startx) { +if (jalview.util.Comparison.isGap (seq.getCharAt (index))) { +index--; +continue; +}value = seq.findPosition (index); +break; +} +if (value != -1) { +g.drawString (String.valueOf (value), 0, (ypos + (i * this.avcharHeight)) - (Clazz.doubleToInt (this.avcharHeight / 5))); +}} +}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); +Clazz.defineMethod (c$, "fastPaint", +function (horizontal, vertical) { +if (this.$fastPaint || this.gg == null) { +return; +}this.updateViewport (); +if (this.lastsr + horizontal != this.av.startRes) { +horizontal = this.av.startRes - this.lastsr; +}this.lastsr = this.av.startRes; +this.$fastPaint = true; +this.gg.copyArea (horizontal * this.avcharWidth, vertical * this.avcharHeight, this.imgWidth - horizontal * this.avcharWidth, this.imgHeight - vertical * this.avcharHeight, -horizontal * this.avcharWidth, -vertical * this.avcharHeight); +var sr = this.av.startRes; +var er = this.av.endRes; +var ss = this.av.startSeq; +var es = this.av.endSeq; +var transX = 0; +var transY = 0; +if (horizontal > 0) { +transX = (er - sr - horizontal) * this.avcharWidth; +sr = er - horizontal; +} else if (horizontal < 0) { +er = sr - horizontal; +} else if (vertical > 0) { +ss = es - vertical; +if (ss < this.av.startSeq) { +ss = this.av.startSeq; +} else { +transY = this.imgHeight - vertical * this.avcharHeight; +}} else if (vertical < 0) { +es = ss - vertical; +if (es > this.av.endSeq) { +es = this.av.endSeq; +}}this.gg.translate (transX, transY); +this.drawPanel (this.gg, sr, er, ss, es, 0); +this.gg.translate (-transX, -transY); +this.repaint (); +}, "~N,~N"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +if (this.img != null && (this.$fastPaint || (this.getSize ().width != g.getClipBounds ().width) || (this.getSize ().height != g.getClipBounds ().height))) { +g.drawImage (this.img, 0, 0, this); +this.$fastPaint = false; +return; +}if (this.$fastPaint) { +g.drawImage (this.img, 0, 0, this); +this.$fastPaint = false; +return; +}this.updateViewport (); +this.imgWidth = this.getSize ().width; +this.imgHeight = this.getSize ().height; +this.imgWidth -= this.imgWidth % this.avcharWidth; +this.imgHeight -= this.imgHeight % this.avcharHeight; +if (this.imgWidth < 1 || this.imgHeight < 1) { +return; +}if (this.img == null || this.imgWidth != this.img.getWidth (this) || this.imgHeight != this.img.getHeight (this)) { +this.img = this.createImage (this.imgWidth, this.imgHeight); +this.gg = this.img.getGraphics (); +this.gg.setFont (this.av.getFont ()); +}this.gg.setColor (java.awt.Color.white); +this.gg.fillRect (0, 0, this.imgWidth, this.imgHeight); +if (this.av.getWrapAlignment ()) { +this.drawWrappedPanel (this.gg, this.imgWidth, this.imgHeight, this.av.startRes); +} else { +this.drawPanel (this.gg, this.av.startRes, this.av.endRes, this.av.startSeq, this.av.endSeq, 0); +}g.drawImage (this.img, 0, 0, this); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "getWrappedCanvasWidth", +function (cwidth) { +cwidth -= cwidth % this.av.getCharWidth (); +var fm = this.getFontMetrics (this.av.getFont ()); +this.LABEL_EAST = 0; +this.LABEL_WEST = 0; +if (this.av.getScaleRightWrapped ()) { +this.LABEL_EAST = fm.stringWidth (this.getMask ()); +}if (this.av.getScaleLeftWrapped ()) { +this.LABEL_WEST = fm.stringWidth (this.getMask ()); +}return Clazz.doubleToInt ((cwidth - this.LABEL_EAST - this.LABEL_WEST) / this.av.getCharWidth ()); +}, "~N"); +Clazz.defineMethod (c$, "getMask", +function () { +var mask = "0"; +var maxWidth = 0; +var tmp; +var alignment = this.av.getAlignment (); +for (var i = 0; i < alignment.getHeight (); i++) { +tmp = alignment.getSequenceAt (i).getEnd (); +if (tmp > maxWidth) { +maxWidth = tmp; +}} +for (var i = maxWidth; i > 0; i /= 10) { +mask += "0"; +} +return mask; +}); +Clazz.defineMethod (c$, "drawWrappedPanel", +($fz = function (g, canvasWidth, canvasHeight, startRes) { +var al = this.av.getAlignment (); +var fm = this.getFontMetrics (this.av.getFont ()); +if (this.av.getScaleRightWrapped ()) { +this.LABEL_EAST = fm.stringWidth (this.getMask ()); +}if (this.av.getScaleLeftWrapped ()) { +this.LABEL_WEST = fm.stringWidth (this.getMask ()); +}var hgap = this.avcharHeight; +if (this.av.getScaleAboveWrapped ()) { +hgap += this.avcharHeight; +}var cWidth = Clazz.doubleToInt ((canvasWidth - this.LABEL_EAST - this.LABEL_WEST) / this.avcharWidth); +var cHeight = this.av.getAlignment ().getHeight () * this.avcharHeight; +this.av.setWrappedWidth (cWidth); +this.av.endRes = this.av.startRes + cWidth; +var endx; +var ypos = hgap; +var maxwidth = this.av.getAlignment ().getWidth () - 1; +if (this.av.hasHiddenColumns ()) { +maxwidth = this.av.getColumnSelection ().findColumnPosition (maxwidth) - 1; +}while ((ypos <= canvasHeight) && (startRes < maxwidth)) { +endx = startRes + cWidth - 1; +if (endx > maxwidth) { +endx = maxwidth; +}g.setColor (java.awt.Color.black); +if (this.av.getScaleLeftWrapped ()) { +this.drawWestScale (g, startRes, endx, ypos); +}if (this.av.getScaleRightWrapped ()) { +g.translate (canvasWidth - this.LABEL_EAST, 0); +this.drawEastScale (g, startRes, endx, ypos); +g.translate (-(canvasWidth - this.LABEL_EAST), 0); +}g.translate (this.LABEL_WEST, 0); +if (this.av.getScaleAboveWrapped ()) { +this.drawNorthScale (g, startRes, endx, ypos); +}if (this.av.hasHiddenColumns () && this.av.getShowHiddenMarkers ()) { +g.setColor (java.awt.Color.blue); +var res; +for (var i = 0; i < this.av.getColumnSelection ().getHiddenColumns ().size (); i++) { +res = this.av.getColumnSelection ().findHiddenRegionPosition (i) - startRes; +if (res < 0 || res > endx - startRes) { +continue; +}this.gg.fillPolygon ( Clazz.newIntArray (-1, [res * this.avcharWidth - Clazz.doubleToInt (this.avcharHeight / 4), res * this.avcharWidth + Clazz.doubleToInt (this.avcharHeight / 4), res * this.avcharWidth]), Clazz.newIntArray (-1, [ypos - (Clazz.doubleToInt (this.avcharHeight / 2)), ypos - (Clazz.doubleToInt (this.avcharHeight / 2)), ypos - (Clazz.doubleToInt (this.avcharHeight / 2)) + 8]), 3); +} +}if (g.getClip () == null) { +g.setClip (0, 0, cWidth * this.avcharWidth, canvasHeight); +}this.drawPanel (g, startRes, endx, 0, al.getHeight (), ypos); +g.setClip (null); +if (this.av.isShowAnnotation ()) { +g.translate (0, cHeight + ypos + 4); +if (this.annotations == null) { +this.annotations = new jalview.appletgui.AnnotationPanel (this.av); +}this.annotations.drawComponent (g, startRes, endx + 1); +g.translate (0, -cHeight - ypos - 4); +}g.translate (-this.LABEL_WEST, 0); +ypos += cHeight + this.getAnnotationHeight () + hgap; +startRes += cWidth; +} +}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N"); +Clazz.defineMethod (c$, "getAnnotationHeight", +function () { +if (!this.av.isShowAnnotation ()) { +return 0; +}if (this.annotations == null) { +this.annotations = new jalview.appletgui.AnnotationPanel (this.av); +}return this.annotations.adjustPanelHeight (); +}); +Clazz.defineMethod (c$, "drawPanel", +($fz = function (g1, startRes, endRes, startSeq, endSeq, offset) { +if (!this.av.hasHiddenColumns ()) { +this.draw (g1, startRes, endRes, startSeq, endSeq, offset); +} else { +var screenY = 0; +var blockStart = startRes; +var blockEnd = endRes; +if (this.av.hasHiddenColumns ()) { +for (var region, $region = this.av.getColumnSelection ().getHiddenColumns ().iterator (); $region.hasNext () && ((region = $region.next ()) || true);) { +var hideStart = region[0]; +var hideEnd = region[1]; +if (hideStart <= blockStart) { +blockStart += (hideEnd - hideStart) + 1; +continue; +}blockEnd = hideStart - 1; +g1.translate (screenY * this.avcharWidth, 0); +this.draw (g1, blockStart, blockEnd, startSeq, endSeq, offset); +if (this.av.getShowHiddenMarkers ()) { +g1.setColor (java.awt.Color.blue); +g1.drawLine ((blockEnd - blockStart + 1) * this.avcharWidth - 1, 0 + offset, (blockEnd - blockStart + 1) * this.avcharWidth - 1, (endSeq - startSeq) * this.avcharHeight + offset); +}g1.translate (-screenY * this.avcharWidth, 0); +screenY += blockEnd - blockStart + 1; +blockStart = hideEnd + 1; +} +}if (screenY <= (endRes - startRes)) { +blockEnd = blockStart + (endRes - startRes) - screenY; +g1.translate (screenY * this.avcharWidth, 0); +this.draw (g1, blockStart, blockEnd, startSeq, endSeq, offset); +g1.translate (-screenY * this.avcharWidth, 0); +}}}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "draw", +function (g, startRes, endRes, startSeq, endSeq, offset) { +g.setFont (this.av.getFont ()); +this.sr.prepare (g, this.av.isRenderGaps ()); +this.updateViewport (); +var nextSeq; +for (var i = startSeq; i < endSeq; i++) { +nextSeq = this.av.getAlignment ().getSequenceAt (i); +if (nextSeq == null) { +continue; +}this.sr.drawSequence (nextSeq, this.av.getAlignment ().findAllGroups (nextSeq), startRes, endRes, offset + ((i - startSeq) * this.avcharHeight)); +if (this.av.isShowSequenceFeatures ()) { +this.fr.drawSequence (g, nextSeq, startRes, endRes, offset + ((i - startSeq) * this.avcharHeight)); +}if (this.searchResults != null) { +var visibleResults = this.searchResults.getResults (nextSeq, startRes, endRes); +if (visibleResults != null) { +for (var r = 0; r < visibleResults.length; r += 2) { +this.sr.drawHighlightedText (nextSeq, visibleResults[r], visibleResults[r + 1], (visibleResults[r] - startRes) * this.avcharWidth, offset + ((i - startSeq) * this.avcharHeight)); +} +}}if (this.av.cursorMode && this.cursorY == i && this.cursorX >= startRes && this.cursorX <= endRes) { +this.sr.drawCursor (nextSeq, this.cursorX, (this.cursorX - startRes) * this.avcharWidth, offset + ((i - startSeq) * this.avcharHeight)); +}} +if (this.av.getSelectionGroup () != null || this.av.getAlignment ().getGroups ().size () > 0) { +this.drawGroupsBoundaries (g, startRes, endRes, startSeq, endSeq, offset); +}}, "java.awt.Graphics,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "drawGroupsBoundaries", +($fz = function (g, startRes, endRes, startSeq, endSeq, offset) { +var group = this.av.getSelectionGroup (); +var sx = -1; +var sy = -1; +var ex = -1; +var groupIndex = -1; +if ((group == null) && (this.av.getAlignment ().getGroups ().size () > 0)) { +group = this.av.getAlignment ().getGroups ().get (0); +groupIndex = 0; +}if (group != null) { +do { +var oldY = -1; +var i = 0; +var inGroup = false; +var top = -1; +var bottom = -1; +var alHeight = this.av.getAlignment ().getHeight () - 1; +for (i = startSeq; i < endSeq; i++) { +sx = (group.getStartRes () - startRes) * this.avcharWidth; +sy = offset + ((i - startSeq) * this.avcharHeight); +ex = (((group.getEndRes () + 1) - group.getStartRes ()) * this.avcharWidth) - 1; +if (sx + ex < 0 || sx > this.imgWidth) { +continue; +}if ((sx <= (endRes - startRes) * this.avcharWidth) && group.getSequences (null).contains (this.av.getAlignment ().getSequenceAt (i))) { +if ((bottom == -1) && (i >= alHeight || !group.getSequences (null).contains (this.av.getAlignment ().getSequenceAt (i + 1)))) { +bottom = sy + this.avcharHeight; +}if (!inGroup) { +if (((top == -1) && (i == 0)) || !group.getSequences (null).contains (this.av.getAlignment ().getSequenceAt (i - 1))) { +top = sy; +}oldY = sy; +inGroup = true; +if (group === this.av.getSelectionGroup ()) { +g.setColor (java.awt.Color.red); +} else { +g.setColor (group.getOutlineColour ()); +}}} else { +if (inGroup) { +if (sx >= 0 && sx < this.imgWidth) { +g.drawLine (sx, oldY, sx, sy); +}if (sx + ex < this.imgWidth) { +g.drawLine (sx + ex, oldY, sx + ex, sy); +}if (sx < 0) { +ex += sx; +sx = 0; +}if (sx + ex > this.imgWidth) { +ex = this.imgWidth; +} else if (sx + ex >= (endRes - startRes + 1) * this.avcharWidth) { +ex = (endRes - startRes + 1) * this.avcharWidth; +}if (top != -1) { +g.drawLine (sx, top, sx + ex, top); +top = -1; +}if (bottom != -1) { +g.drawLine (sx, bottom, sx + ex, bottom); +bottom = -1; +}inGroup = false; +}}} +if (inGroup) { +sy = offset + ((i - startSeq) * this.avcharHeight); +if (sx >= 0 && sx < this.imgWidth) { +g.drawLine (sx, oldY, sx, sy); +}if (sx + ex < this.imgWidth) { +g.drawLine (sx + ex, oldY, sx + ex, sy); +}if (sx < 0) { +ex += sx; +sx = 0; +}if (sx + ex > this.imgWidth) { +ex = this.imgWidth; +} else if (sx + ex >= (endRes - startRes + 1) * this.avcharWidth) { +ex = (endRes - startRes + 1) * this.avcharWidth; +}if (top != -1) { +g.drawLine (sx, top, sx + ex, top); +top = -1; +}if (bottom != -1) { +g.drawLine (sx, bottom - 1, sx + ex, bottom - 1); +bottom = -1; +}inGroup = false; +}groupIndex++; +if (groupIndex >= this.av.getAlignment ().getGroups ().size ()) { +break; +}group = this.av.getAlignment ().getGroups ().get (groupIndex); +} while (groupIndex < this.av.getAlignment ().getGroups ().size ()); +}}, $fz.isPrivate = true, $fz), "java.awt.Graphics,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "highlightSearchResults", +function (results) { +this.searchResults = results; +this.repaint (); +}, "jalview.datamodel.SearchResults"); +}); diff --git a/bin/jalview/appletgui/SeqPanel.class b/bin/jalview/appletgui/SeqPanel.class index 90a222210441e3c3fb09cb26bb91d92ae2268843..f3e19d0caafc4fb6e7b8e19c54ad5781b1737012 100644 GIT binary patch delta 339 zcmXAiKTASk6o=36UiH0||F~W?Q7@E5BnDAqCfHC8rBYN91TBRWh!}!fLv0NXLQ^f# z2MEp{^ad2#Id=@Flhi&f0_f5vH}h`_+WfThV4KQO zutzh1mn@14YRVNtpGs0V(lo9LN$l}+VGV8{IrRlXp_36pjZAq$-<0UsFG{{IupVXo4E9od{(foYOnqdovGO|skyk%?AUTUk7;b0)nagRc1Vj0@G17^k9eP?Z% PqQ}9~99t}Fr6%nMv4mUy diff --git a/bin/jalview/appletgui/SeqPanel.js b/bin/jalview/appletgui/SeqPanel.js index 7f97353..d500d0e 100644 --- a/bin/jalview/appletgui/SeqPanel.js +++ b/bin/jalview/appletgui/SeqPanel.js @@ -1,962 +1,962 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "jalview.structure.SelectionListener", "$.SequenceListener", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.lang.Thread"], "jalview.appletgui.SeqPanel", ["jalview.api.AlignViewportI", "jalview.appletgui.APopupMenu", "$.AlignViewport", "$.PaintRefresher", "$.SeqCanvas", "$.SliderPanel", "$.Tooltip", "jalview.commands.EditCommand", "jalview.datamodel.ColumnSelection", "$.SearchResults", "$.SequenceGroup", "jalview.schemes.ResidueProperties", "jalview.structure.StructureSelectionManager", "jalview.util.Comparison", "$.MappingUtils", "$.MessageManager", "java.awt.BorderLayout", "$.Font", "java.lang.StringBuffer", "$.StringBuilder", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.seqCanvas = null; -this.ap = null; -this.lastres = 0; -this.startseq = 0; -this.av = null; -this.seqEditOccurred = false; -this.scrollThread = null; -this.mouseDragging = false; -this.editingSeqs = false; -this.groupEditing = false; -this.oldSeq = -1; -this.changeEndSeq = false; -this.changeStartSeq = false; -this.changeEndRes = false; -this.changeStartRes = false; -this.stretchGroup = null; -this.keyboardNo1 = null; -this.keyboardNo2 = null; -this.mouseWheelPressed = false; -this.lastMousePress = null; -this.editCommand = null; -this.ssm = null; -this.startWrapBlock = -1; -this.wrappedBlock = -1; -this.lastMessage = null; -this.tooltip = null; -if (!Clazz.isClassDefined ("jalview.appletgui.SeqPanel.ScrollThread")) { -jalview.appletgui.SeqPanel.$SeqPanel$ScrollThread$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "SeqPanel", awt2swing.Panel, [java.awt.event.MouseMotionListener, java.awt.event.MouseListener, jalview.structure.SequenceListener, jalview.structure.SelectionListener]); -Clazz.makeConstructor (c$, -function (avp, p) { -Clazz.superConstructor (this, jalview.appletgui.SeqPanel, []); -this.av = avp; -this.setName ("seqPanel"); -this.seqCanvas = new jalview.appletgui.SeqCanvas (avp); -this.setLayout ( new java.awt.BorderLayout ()); -this.add (this.seqCanvas); -this.ap = p; -this.seqCanvas.addMouseMotionListener (this); -this.seqCanvas.addMouseListener (this); -this.ssm = jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet); -this.ssm.addStructureViewerListener (this); -this.ssm.addSelectionListener (this); -this.seqCanvas.repaint (); -}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); -Clazz.defineMethod (c$, "endEditing", -function () { -if (this.editCommand != null && this.editCommand.getSize () > 0) { -this.ap.alignFrame.addHistoryItem (this.editCommand); -this.av.firePropertyChange ("alignment", null, this.av.getAlignment ().getSequences ()); -}this.startseq = -1; -this.lastres = -1; -this.editingSeqs = false; -this.groupEditing = false; -this.keyboardNo1 = null; -this.keyboardNo2 = null; -this.editCommand = null; -}); -Clazz.defineMethod (c$, "setCursorRow", -function () { -this.seqCanvas.cursorY = this.getKeyboardNo1 () - 1; -this.scrollToVisible (); -}); -Clazz.defineMethod (c$, "setCursorColumn", -function () { -this.seqCanvas.cursorX = this.getKeyboardNo1 () - 1; -this.scrollToVisible (); -}); -Clazz.defineMethod (c$, "setCursorRowAndColumn", -function () { -if (this.keyboardNo2 == null) { -this.keyboardNo2 = new StringBuffer (); -} else { -this.seqCanvas.cursorX = this.getKeyboardNo1 () - 1; -this.seqCanvas.cursorY = this.getKeyboardNo2 () - 1; -this.scrollToVisible (); -}}); -Clazz.defineMethod (c$, "setCursorPosition", -function () { -var sequence = this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY); -this.seqCanvas.cursorX = sequence.findIndex (this.getKeyboardNo1 ()) - 1; -this.scrollToVisible (); -}); -Clazz.defineMethod (c$, "moveCursor", -function (dx, dy) { -this.seqCanvas.cursorX += dx; -this.seqCanvas.cursorY += dy; -if (this.av.hasHiddenColumns () && !this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX)) { -var original = this.seqCanvas.cursorX - dx; -var maxWidth = this.av.getAlignment ().getWidth (); -while (!this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX) && this.seqCanvas.cursorX < maxWidth && this.seqCanvas.cursorX > 0) { -this.seqCanvas.cursorX += dx; -} -if (this.seqCanvas.cursorX >= maxWidth || !this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX)) { -this.seqCanvas.cursorX = original; -}}this.scrollToVisible (); -}, "~N,~N"); -Clazz.defineMethod (c$, "scrollToVisible", -function () { -if (this.seqCanvas.cursorX < 0) { -this.seqCanvas.cursorX = 0; -} else if (this.seqCanvas.cursorX > this.av.getAlignment ().getWidth () - 1) { -this.seqCanvas.cursorX = this.av.getAlignment ().getWidth () - 1; -}if (this.seqCanvas.cursorY < 0) { -this.seqCanvas.cursorY = 0; -} else if (this.seqCanvas.cursorY > this.av.getAlignment ().getHeight () - 1) { -this.seqCanvas.cursorY = this.av.getAlignment ().getHeight () - 1; -}this.endEditing (); -if (this.av.getWrapAlignment ()) { -this.ap.scrollToWrappedVisible (this.seqCanvas.cursorX); -} else { -while (this.seqCanvas.cursorY < this.av.startSeq) { -this.ap.scrollUp (true); -} -while (this.seqCanvas.cursorY + 1 > this.av.endSeq) { -this.ap.scrollUp (false); -} -while (this.seqCanvas.cursorX < this.av.getColumnSelection ().adjustForHiddenColumns (this.av.startRes)) { -if (!this.ap.scrollRight (false)) { -break; -}} -while (this.seqCanvas.cursorX > this.av.getColumnSelection ().adjustForHiddenColumns (this.av.endRes)) { -if (!this.ap.scrollRight (true)) { -break; -}} -}this.setStatusMessage (this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY), this.seqCanvas.cursorX, this.seqCanvas.cursorY); -this.seqCanvas.repaint (); -}); -Clazz.defineMethod (c$, "setSelectionAreaAtCursor", -function (topLeft) { -var sequence = this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY); -if (this.av.getSelectionGroup () != null) { -var sg = this.av.getSelectionGroup (); -var min = this.av.getAlignment ().getHeight (); -var max = 0; -for (var i = 0; i < sg.getSize (); i++) { -var index = this.av.getAlignment ().findIndex (sg.getSequenceAt (i)); -if (index > max) { -max = index; -}if (index < min) { -min = index; -}} -max++; -if (topLeft) { -sg.setStartRes (this.seqCanvas.cursorX); -if (sg.getEndRes () < this.seqCanvas.cursorX) { -sg.setEndRes (this.seqCanvas.cursorX); -}min = this.seqCanvas.cursorY; -} else { -sg.setEndRes (this.seqCanvas.cursorX); -if (sg.getStartRes () > this.seqCanvas.cursorX) { -sg.setStartRes (this.seqCanvas.cursorX); -}max = this.seqCanvas.cursorY + 1; -}if (min > max) { -this.av.setSelectionGroup (null); -} else { -sg.clear (); -for (var i = min; i < max; i++) { -sg.addSequence (this.av.getAlignment ().getSequenceAt (i), false); -} -}}if (this.av.getSelectionGroup () == null) { -var sg = new jalview.datamodel.SequenceGroup (); -sg.setStartRes (this.seqCanvas.cursorX); -sg.setEndRes (this.seqCanvas.cursorX); -sg.addSequence (sequence, false); -this.av.setSelectionGroup (sg); -}this.ap.paintAlignment (false); -this.av.sendSelection (); -}, "~B"); -Clazz.defineMethod (c$, "insertGapAtCursor", -function (group) { -this.groupEditing = group; -this.startseq = this.seqCanvas.cursorY; -this.lastres = this.seqCanvas.cursorX; -this.editSequence (true, this.seqCanvas.cursorX + this.getKeyboardNo1 ()); -this.endEditing (); -}, "~B"); -Clazz.defineMethod (c$, "deleteGapAtCursor", -function (group) { -this.groupEditing = group; -this.startseq = this.seqCanvas.cursorY; -this.lastres = this.seqCanvas.cursorX + this.getKeyboardNo1 (); -this.editSequence (false, this.seqCanvas.cursorX); -this.endEditing (); -}, "~B"); -Clazz.defineMethod (c$, "numberPressed", -function (value) { -if (this.keyboardNo1 == null) { -this.keyboardNo1 = new StringBuffer (); -}if (this.keyboardNo2 != null) { -this.keyboardNo2.append (value); -} else { -this.keyboardNo1.append (value); -}}, "~S"); -Clazz.defineMethod (c$, "getKeyboardNo1", -function () { -try { -if (this.keyboardNo1 != null) { -var value = Integer.parseInt (this.keyboardNo1.toString ()); -this.keyboardNo1 = null; -return value; -}} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -} else { -throw x; -} -} -this.keyboardNo1 = null; -return 1; -}); -Clazz.defineMethod (c$, "getKeyboardNo2", -function () { -try { -if (this.keyboardNo2 != null) { -var value = Integer.parseInt (this.keyboardNo2.toString ()); -this.keyboardNo2 = null; -return value; -}} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -} else { -throw x; -} -} -this.keyboardNo2 = null; -return 1; -}); -Clazz.defineMethod (c$, "setStatusMessage", -function (sequence, res, seq) { -var text = new StringBuilder (32); -var seqno = seq == -1 ? "" : " " + (seq + 1); -text.append ("Sequence" + seqno + " ID: " + sequence.getName ()); -var residue = null; -var displayChar = String.valueOf (sequence.getCharAt (res)); -if (this.av.getAlignment ().isNucleotide ()) { -residue = jalview.schemes.ResidueProperties.nucleotideName.get (displayChar); -if (residue != null) { -text.append (" Nucleotide: ").append (residue); -}} else { -residue = "X".equalsIgnoreCase (displayChar) ? "X" : jalview.schemes.ResidueProperties.aa2Triplet.get (displayChar); -if (residue != null) { -text.append (" Residue: ").append (residue); -}}var pos = -1; -if (residue != null) { -pos = sequence.findPosition (res); -text.append (" (").append (Integer.toString (pos)).append (")"); -}this.ap.alignFrame.setStatus (text.toString ()); -}, "jalview.datamodel.SequenceI,~N,~N"); -Clazz.defineMethod (c$, "setStatusMessage", -($fz = function (results) { -var matches = results.getResults (); -if (!matches.isEmpty ()) { -var m = matches.get (0); -var seq = m.getSequence (); -var sequenceIndex = this.av.getAlignment ().findIndex (seq); -var start = m.getStart () - 1; -this.setStatusMessage (seq, start, sequenceIndex); -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SearchResults"); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -this.lastMousePress = evt.getPoint (); -if ((evt.getModifiers () & 8) == 8 && !this.av.MAC) { -this.mouseWheelPressed = true; -return; -}if (evt.isShiftDown () || evt.isControlDown () || evt.isAltDown ()) { -if (evt.isControlDown () || evt.isAltDown ()) { -this.groupEditing = true; -}this.editingSeqs = true; -} else { -this.doMousePressedDefineMode (evt); -return; -}var seq = this.findSeq (evt); -var res = this.findRes (evt); -if (seq < 0 || res < 0) { -return; -}if ((seq < this.av.getAlignment ().getHeight ()) && (res < this.av.getAlignment ().getSequenceAt (seq).getLength ())) { -this.startseq = seq; -this.lastres = res; -} else { -this.startseq = -1; -this.lastres = -1; -}return; -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -var sequence = this.av.getAlignment ().getSequenceAt (this.findSeq (evt)); -if (evt.getClickCount () > 1) { -if (this.av.getSelectionGroup () != null && this.av.getSelectionGroup ().getSize () == 1 && this.av.getSelectionGroup ().getEndRes () - this.av.getSelectionGroup ().getStartRes () < 2) { -this.av.setSelectionGroup (null); -}var features = this.findFeaturesAtRes (sequence, sequence.findPosition (this.findRes (evt))); -if (features != null && features.length > 0) { -var highlight = new jalview.datamodel.SearchResults (); -highlight.addResult (sequence, features[0].getBegin (), features[0].getEnd ()); -this.seqCanvas.highlightSearchResults (highlight); -}if (features != null && features.length > 0) { -this.seqCanvas.getFeatureRenderer ().amendFeatures ( Clazz.newArray (-1, [sequence]), features, false, this.ap); -this.seqCanvas.highlightSearchResults (null); -}}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -this.mouseDragging = false; -this.mouseWheelPressed = false; -this.ap.paintAlignment (true); -if (!this.editingSeqs) { -this.doMouseReleasedDefineMode (evt); -return; -}this.endEditing (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "findRes", -function (evt) { -var res = 0; -var x = evt.getX (); -if (this.av.getWrapAlignment ()) { -var hgap = this.av.getCharHeight (); -if (this.av.getScaleAboveWrapped ()) { -hgap += this.av.getCharHeight (); -}var cHeight = this.av.getAlignment ().getHeight () * this.av.getCharHeight () + hgap + this.seqCanvas.getAnnotationHeight (); -var y = evt.getY (); -y -= hgap; -x -= this.seqCanvas.LABEL_WEST; -var cwidth = this.seqCanvas.getWrappedCanvasWidth (this.getSize ().width); -if (cwidth < 1) { -return 0; -}this.wrappedBlock = Clazz.doubleToInt (y / cHeight); -this.wrappedBlock += Clazz.doubleToInt (this.av.getStartRes () / cwidth); -res = this.wrappedBlock * cwidth + Clazz.doubleToInt (x / this.av.getCharWidth ()); -} else { -res = (Clazz.doubleToInt (x / this.av.getCharWidth ())) + this.av.getStartRes (); -}if (this.av.hasHiddenColumns ()) { -res = this.av.getColumnSelection ().adjustForHiddenColumns (res); -}return res; -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "findSeq", -function (evt) { -var sqnum = this.findAlRow (evt); -return (sqnum < 0) ? 0 : sqnum; -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "findAlRow", -($fz = function (evt) { -var seq = 0; -var y = evt.getY (); -if (this.av.getWrapAlignment ()) { -var hgap = this.av.getCharHeight (); -if (this.av.getScaleAboveWrapped ()) { -hgap += this.av.getCharHeight (); -}var cHeight = this.av.getAlignment ().getHeight () * this.av.getCharHeight () + hgap + this.seqCanvas.getAnnotationHeight (); -y -= hgap; -seq = Math.min (Clazz.doubleToInt ((y % cHeight) / this.av.getCharHeight ()), this.av.getAlignment ().getHeight () - 1); -if (seq < 0) { -seq = -1; -}} else { -seq = Math.min ((Clazz.doubleToInt (y / this.av.getCharHeight ())) + this.av.getStartSeq (), this.av.getAlignment ().getHeight () - 1); -if (seq < 0) { -seq = -1; -}}return seq; -}, $fz.isPrivate = true, $fz), "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "doMousePressed", -function (evt) { -var seq = this.findSeq (evt); -var res = this.findRes (evt); -if (seq < this.av.getAlignment ().getHeight () && res < this.av.getAlignment ().getSequenceAt (seq).getLength ()) { -this.startseq = seq; -this.lastres = res; -} else { -this.startseq = -1; -this.lastres = -1; -}return; -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseOverSequence", -function (sequence, index, pos) { -var tmp = sequence.hashCode () + index + ""; -if (this.lastMessage == null || !this.lastMessage.equals (tmp)) { -this.ssm.mouseOverSequence (sequence, index, pos, this.av); -}this.lastMessage = tmp; -}, "jalview.datamodel.SequenceI,~N,~N"); -Clazz.overrideMethod (c$, "highlightSequence", -function (results) { -if (this.av.isFollowHighlight ()) { -if (this.ap.scrollToPosition (results, true)) { -this.ap.alignFrame.repaint (); -}}this.setStatusMessage (results); -this.seqCanvas.highlightSearchResults (results); -}, "jalview.datamodel.SearchResults"); -Clazz.overrideMethod (c$, "getVamsasSource", -function () { -return this.ap == null ? null : this.ap.av; -}); -Clazz.overrideMethod (c$, "updateColours", -function (seq, index) { -System.out.println ("update the seqPanel colours"); -}, "jalview.datamodel.SequenceI,~N"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -var res = this.findRes (evt); -var seq = this.findSeq (evt); -if (seq >= this.av.getAlignment ().getHeight () || seq < 0 || res < 0) { -if (this.tooltip != null) { -this.tooltip.setTip (""); -}return; -}var sequence = this.av.getAlignment ().getSequenceAt (seq); -if (res > sequence.getLength ()) { -if (this.tooltip != null) { -this.tooltip.setTip (""); -}return; -}var respos = sequence.findPosition (res); -if (this.ssm != null) { -this.mouseOverSequence (sequence, res, respos); -}var text = new StringBuilder (); -text.append ("Sequence ").append (Integer.toString (seq + 1)).append (" ID: ").append (sequence.getName ()); -var obj = null; -var ch = String.valueOf (sequence.getCharAt (res)); -if (this.av.getAlignment ().isNucleotide ()) { -obj = jalview.schemes.ResidueProperties.nucleotideName.get (ch); -if (obj != null) { -text.append (" Nucleotide: ").append (obj); -}} else { -obj = "X".equalsIgnoreCase (ch) ? "X" : jalview.schemes.ResidueProperties.aa2Triplet.get (ch); -if (obj != null) { -text.append (" Residue: ").append (obj); -}}if (obj != null) { -text.append (" (").append (Integer.toString (respos)).append (")"); -}this.ap.alignFrame.setStatus (text.toString ()); -var tooltipText = new StringBuilder (); -var groups = this.av.getAlignment ().findAllGroups (sequence); -if (groups != null) { -for (var g = 0; g < groups.length; g++) { -if (groups[g].getStartRes () <= res && groups[g].getEndRes () >= res) { -if (!groups[g].getName ().startsWith ("JTreeGroup") && !groups[g].getName ().startsWith ("JGroup")) { -tooltipText.append (groups[g].getName ()).append (" "); -}if (groups[g].getDescription () != null) { -tooltipText.append (groups[g].getDescription ()); -}tooltipText.append ("\n"); -}} -}var allFeatures = this.findFeaturesAtRes (sequence, sequence.findPosition (res)); -var index = 0; -while (index < allFeatures.length) { -var sf = allFeatures[index]; -tooltipText.append (sf.getType () + " " + sf.begin + ":" + sf.end); -if (sf.getDescription () != null) { -tooltipText.append (" " + sf.getDescription ()); -}if (sf.getValue ("status") != null) { -var status = sf.getValue ("status").toString (); -if (status.length > 0) { -tooltipText.append (" (" + sf.getValue ("status") + ")"); -}}tooltipText.append ("\n"); -index++; -} -if (this.tooltip == null) { -this.tooltip = new jalview.appletgui.Tooltip (tooltipText.toString (), this.seqCanvas); -} else { -this.tooltip.setTip (tooltipText.toString ()); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "findFeaturesAtRes", -function (sequence, res) { -var tmp = new java.util.Vector (); -var features = sequence.getSequenceFeatures (); -if (features != null) { -for (var i = 0; i < features.length; i++) { -if (this.av.getFeaturesDisplayed () == null || !this.av.getFeaturesDisplayed ().isVisible (features[i].getType ())) { -continue; -}if (features[i].featureGroup != null && !this.seqCanvas.fr.checkGroupVisibility (features[i].featureGroup, false)) { -continue; -}if ((features[i].getBegin () <= res) && (features[i].getEnd () >= res)) { -tmp.addElement (features[i]); -}} -}features = new Array (tmp.size ()); -tmp.copyInto (features); -return features; -}, "jalview.datamodel.SequenceI,~N"); -Clazz.overrideMethod (c$, "mouseDragged", -function (evt) { -if (this.mouseWheelPressed) { -var oldWidth = this.av.getCharWidth (); -if (Math.abs (evt.getY () - this.lastMousePress.y) > Math.abs (evt.getX () - this.lastMousePress.x)) { -var fontSize = this.av.font.getSize (); -if (evt.getY () < this.lastMousePress.y && this.av.getCharHeight () > 1) { -fontSize--; -} else if (evt.getY () > this.lastMousePress.y) { -fontSize++; -}if (fontSize < 1) { -fontSize = 1; -}this.av.setFont ( new java.awt.Font (this.av.font.getName (), this.av.font.getStyle (), fontSize)); -this.av.setCharWidth (oldWidth); -} else { -if (evt.getX () < this.lastMousePress.x && this.av.getCharWidth () > 1) { -this.av.setCharWidth (this.av.getCharWidth () - 1); -} else if (evt.getX () > this.lastMousePress.x) { -this.av.setCharWidth (this.av.getCharWidth () + 1); -}if (this.av.getCharWidth () < 1) { -this.av.setCharWidth (1); -}}this.ap.fontChanged (); -var fm = this.getFontMetrics (this.av.getFont ()); -this.av.validCharWidth = fm.charWidth ('M') <= this.av.getCharWidth (); -this.lastMousePress = evt.getPoint (); -this.ap.paintAlignment (false); -this.ap.annotationPanel.image = null; -return; -}if (!this.editingSeqs) { -this.doMouseDraggedDefineMode (evt); -return; -}var res = this.findRes (evt); -if (res < 0) { -res = 0; -}if ((this.lastres == -1) || (this.lastres == res)) { -return; -}if ((res < this.av.getAlignment ().getWidth ()) && (res < this.lastres)) { -this.editSequence (false, res); -} else { -this.editSequence (true, res); -}this.mouseDragging = true; -if (this.scrollThread != null) { -this.scrollThread.setEvent (evt); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "editSequence", -function (insertGap, startres) { -var fixedLeft = -1; -var fixedRight = -1; -var fixedColumns = false; -var sg = this.av.getSelectionGroup (); -var seq = this.av.getAlignment ().getSequenceAt (this.startseq); -if (!this.groupEditing && this.av.hasHiddenRows ()) { -if (this.av.isHiddenRepSequence (seq)) { -sg = this.av.getRepresentedSequences (seq); -this.groupEditing = true; -}}var message = new StringBuffer (); -if (this.groupEditing) { -message.append (jalview.util.MessageManager.getString ("action.edit_group")).append (":"); -if (this.editCommand == null) { -this.editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("action.edit_group")); -}} else { -message.append (jalview.util.MessageManager.getString ("label.edit_sequence")).append (" " + seq.getName ()); -var label = seq.getName (); -if (label.length > 10) { -label = label.substring (0, 10); -}if (this.editCommand == null) { -this.editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.formatMessage ("label.edit_params", Clazz.newArray (-1, [label]))); -}}if (insertGap) { -message.append (" insert "); -} else { -message.append (" delete "); -}message.append (Math.abs (startres - this.lastres) + " gaps."); -this.ap.alignFrame.setStatus (message.toString ()); -if (this.groupEditing || (sg != null && sg.getSequences (this.av.getHiddenRepSequences ()).contains (seq))) { -fixedColumns = true; -if (sg == null) { -if (!this.av.isHiddenRepSequence (seq)) { -this.endEditing (); -return; -}sg = this.av.getRepresentedSequences (seq); -}fixedLeft = sg.getStartRes (); -fixedRight = sg.getEndRes (); -if ((startres < fixedLeft && this.lastres >= fixedLeft) || (startres >= fixedLeft && this.lastres < fixedLeft) || (startres > fixedRight && this.lastres <= fixedRight) || (startres <= fixedRight && this.lastres > fixedRight)) { -this.endEditing (); -return; -}if (fixedLeft > startres) { -fixedRight = fixedLeft - 1; -fixedLeft = 0; -} else if (fixedRight < startres) { -fixedLeft = fixedRight; -fixedRight = -1; -}}if (this.av.hasHiddenColumns ()) { -fixedColumns = true; -var y1 = this.av.getColumnSelection ().getHiddenBoundaryLeft (startres); -var y2 = this.av.getColumnSelection ().getHiddenBoundaryRight (startres); -if ((insertGap && startres > y1 && this.lastres < y1) || (!insertGap && startres < y2 && this.lastres > y2)) { -this.endEditing (); -return; -}if (fixedLeft < y1 && (fixedRight > y2 || fixedRight == -1)) { -if (startres >= y2) { -fixedLeft = y2; -} else { -fixedRight = y2 - 1; -}}}if (this.groupEditing) { -var groupSeqs = sg.getSequences (this.av.getHiddenRepSequences ()).toArray ( new Array (0)); -if (insertGap) { -if (sg.getStartRes () == 0 && sg.getEndRes () == fixedRight && sg.getEndRes () == this.av.getAlignment ().getWidth () - 1) { -sg.setEndRes (this.av.getAlignment ().getWidth () + startres - this.lastres); -fixedRight = sg.getEndRes (); -}var blank = false; -for (fixedRight = fixedRight; fixedRight > this.lastres; fixedRight--) { -blank = true; -for (var gs, $gs = 0, $$gs = groupSeqs; $gs < $$gs.length && ((gs = $$gs[$gs]) || true); $gs++) { -for (var j = 0; j < startres - this.lastres; j++) { -if (!jalview.util.Comparison.isGap (gs.getCharAt (fixedRight - j))) { -blank = false; -break; -}} -} -if (blank) { -break; -}} -if (!blank) { -if (sg.getSize () == this.av.getAlignment ().getHeight ()) { -if ((this.av.hasHiddenColumns () && startres < this.av.getColumnSelection ().getHiddenBoundaryRight (startres))) { -this.endEditing (); -return; -}var alWidth = this.av.getAlignment ().getWidth (); -if (this.av.hasHiddenRows ()) { -var hwidth = this.av.getAlignment ().getHiddenSequences ().getWidth (); -if (hwidth > alWidth) { -alWidth = hwidth; -}}sg.setEndRes (sg.getEndRes () + startres - this.lastres); -fixedRight = alWidth + startres - this.lastres; -} else { -this.endEditing (); -return; -}}} else if (!insertGap) { -for (var gs, $gs = 0, $$gs = groupSeqs; $gs < $$gs.length && ((gs = $$gs[$gs]) || true); $gs++) { -for (var j = startres; j < this.lastres; j++) { -if (gs.getLength () <= j) { -continue; -}if (!jalview.util.Comparison.isGap (gs.getCharAt (j))) { -this.endEditing (); -return; -}} -} -}if (insertGap) { -if (fixedColumns && fixedRight != -1) { -for (var j = this.lastres; j < startres; j++) { -this.insertChar (j, groupSeqs, fixedRight); -} -} else { -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, groupSeqs, startres, startres - this.lastres, this.av.getAlignment (), true); -}} else { -if (fixedColumns && fixedRight != -1) { -for (var j = this.lastres; j > startres; j--) { -this.deleteChar (startres, groupSeqs, fixedRight); -} -} else { -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, groupSeqs, startres, this.lastres - startres, this.av.getAlignment (), true); -}}} else { -if (insertGap) { -if (fixedColumns && fixedRight != -1) { -for (var j = this.lastres; j < startres; j++) { -this.insertChar (j, Clazz.newArray (-1, [seq]), fixedRight); -} -} else { -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, Clazz.newArray (-1, [seq]), this.lastres, startres - this.lastres, this.av.getAlignment (), true); -}} else { -if (fixedColumns && fixedRight != -1) { -for (var j = this.lastres; j > startres; j--) { -if (!jalview.util.Comparison.isGap (seq.getCharAt (startres))) { -this.endEditing (); -break; -}this.deleteChar (startres, Clazz.newArray (-1, [seq]), fixedRight); -} -} else { -var max = 0; -for (var m = startres; m < this.lastres; m++) { -if (!jalview.util.Comparison.isGap (seq.getCharAt (m))) { -break; -}max++; -} -if (max > 0) { -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, Clazz.newArray (-1, [seq]), startres, max, this.av.getAlignment (), true); -}}}}this.lastres = startres; -this.seqCanvas.repaint (); -}, "~B,~N"); -Clazz.defineMethod (c$, "insertChar", -function (j, seq, fixedColumn) { -var blankColumn = fixedColumn; -for (var s = 0; s < seq.length; s++) { -for (blankColumn = fixedColumn; blankColumn > j; blankColumn--) { -if (jalview.util.Comparison.isGap (seq[s].getCharAt (blankColumn))) { -break; -}} -if (blankColumn <= j) { -blankColumn = fixedColumn; -this.endEditing (); -return; -}} -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seq, blankColumn, 1, this.av.getAlignment (), true); -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, seq, j, 1, this.av.getAlignment (), true); -}, "~N,~A,~N"); -Clazz.defineMethod (c$, "deleteChar", -function (j, seq, fixedColumn) { -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seq, j, 1, this.av.getAlignment (), true); -this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, seq, fixedColumn, 1, this.av.getAlignment (), true); -}, "~N,~A,~N"); -Clazz.defineMethod (c$, "doMousePressedDefineMode", -function (evt) { -if (this.scrollThread != null) { -this.scrollThread.running = false; -this.scrollThread = null; -}var res = this.findRes (evt); -var seq = this.findSeq (evt); -this.oldSeq = seq; -this.startWrapBlock = this.wrappedBlock; -if (seq == -1) { -return; -}var sequence = this.av.getAlignment ().getSequenceAt (seq); -if (sequence == null || res > sequence.getLength ()) { -return; -}this.stretchGroup = this.av.getSelectionGroup (); -if (this.stretchGroup == null) { -this.stretchGroup = this.av.getAlignment ().findGroup (sequence); -if (this.stretchGroup != null && res > this.stretchGroup.getStartRes () && res < this.stretchGroup.getEndRes ()) { -this.av.setSelectionGroup (this.stretchGroup); -} else { -this.stretchGroup = null; -}} else if (!this.stretchGroup.getSequences (null).contains (sequence) || this.stretchGroup.getStartRes () > res || this.stretchGroup.getEndRes () < res) { -this.stretchGroup = null; -var allGroups = this.av.getAlignment ().findAllGroups (sequence); -if (allGroups != null) { -for (var i = 0; i < allGroups.length; i++) { -if (allGroups[i].getStartRes () <= res && allGroups[i].getEndRes () >= res) { -this.stretchGroup = allGroups[i]; -break; -}} -}this.av.setSelectionGroup (this.stretchGroup); -}if ((evt.getModifiers () & 4) == 4) { -var allFeatures = this.findFeaturesAtRes (sequence, sequence.findPosition (res)); -var links = null; -if (allFeatures != null) { -for (var i = 0; i < allFeatures.length; i++) { -if (allFeatures[i].links != null) { -if (links == null) { -links = new java.util.Vector (); -}for (var j = 0; j < allFeatures[i].links.size (); j++) { -links.addElement (allFeatures[i].links.elementAt (j)); -} -}} -}var popup = new jalview.appletgui.APopupMenu (this.ap, null, links); -this.add (popup); -popup.show (this, evt.getX (), evt.getY ()); -return; -}if (this.av.cursorMode) { -this.seqCanvas.cursorX = this.findRes (evt); -this.seqCanvas.cursorY = this.findSeq (evt); -this.seqCanvas.repaint (); -return; -}if (this.stretchGroup == null) { -var sg = new jalview.datamodel.SequenceGroup (); -sg.setStartRes (res); -sg.setEndRes (res); -sg.addSequence (sequence, false); -this.av.setSelectionGroup (sg); -this.stretchGroup = sg; -if (this.av.getConservationSelected ()) { -jalview.appletgui.SliderPanel.setConservationSlider (this.ap, this.av.getGlobalColourScheme (), "Background"); -}if (this.av.getAbovePIDThreshold ()) { -jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, this.av.getGlobalColourScheme (), "Background"); -}}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "doMouseReleasedDefineMode", -function (evt) { -if (this.stretchGroup == null) { -return; -}this.stretchGroup.recalcConservation (); -if (this.stretchGroup.cs != null) { -this.stretchGroup.cs.alignmentChanged (this.stretchGroup, this.av.getHiddenRepSequences ()); -if (this.stretchGroup.cs.conservationApplied ()) { -jalview.appletgui.SliderPanel.setConservationSlider (this.ap, this.stretchGroup.cs, this.stretchGroup.getName ()); -} else { -jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, this.stretchGroup.cs, this.stretchGroup.getName ()); -}}this.changeEndRes = false; -this.changeStartRes = false; -this.stretchGroup = null; -jalview.appletgui.PaintRefresher.Refresh (this.ap, this.av.getSequenceSetId ()); -this.ap.paintAlignment (true); -this.av.sendSelection (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "doMouseDraggedDefineMode", -function (evt) { -var res = this.findRes (evt); -var y = this.findSeq (evt); -if (this.wrappedBlock != this.startWrapBlock) { -return; -}if (this.stretchGroup == null) { -return; -}this.mouseDragging = true; -if (y > this.av.getAlignment ().getHeight ()) { -y = this.av.getAlignment ().getHeight () - 1; -}if (res >= this.av.getAlignment ().getWidth ()) { -res = this.av.getAlignment ().getWidth () - 1; -}if (this.stretchGroup.getEndRes () == res) { -this.changeEndRes = true; -} else if (this.stretchGroup.getStartRes () == res) { -this.changeStartRes = true; -}if (res < 0) { -res = 0; -}if (this.changeEndRes) { -if (res > (this.stretchGroup.getStartRes () - 1)) { -this.stretchGroup.setEndRes (res); -}} else if (this.changeStartRes) { -if (res < (this.stretchGroup.getEndRes () + 1)) { -this.stretchGroup.setStartRes (res); -}}var dragDirection = 0; -if (y > this.oldSeq) { -dragDirection = 1; -} else if (y < this.oldSeq) { -dragDirection = -1; -}while ((y != this.oldSeq) && (this.oldSeq > -1) && (y < this.av.getAlignment ().getHeight ())) { -var seq = this.av.getAlignment ().getSequenceAt (this.oldSeq); -this.oldSeq += dragDirection; -if (this.oldSeq < 0) { -break; -}var nextSeq = this.av.getAlignment ().getSequenceAt (this.oldSeq); -if (this.stretchGroup.getSequences (null).contains (nextSeq)) { -this.stretchGroup.deleteSequence (seq, false); -} else { -if (seq != null) { -this.stretchGroup.addSequence (seq, false); -}this.stretchGroup.addSequence (nextSeq, false); -}} -if (this.oldSeq < 0) { -this.oldSeq = -1; -}if (res > this.av.endRes || res < this.av.startRes || y < this.av.startSeq || y > this.av.endSeq) { -this.mouseExited (evt); -}if (this.scrollThread != null) { -this.scrollThread.setEvent (evt); -}this.seqCanvas.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (e) { -if (this.oldSeq < 0) { -this.oldSeq = 0; -}if (this.scrollThread != null) { -this.scrollThread.running = false; -this.scrollThread = null; -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (e) { -if (this.av.getWrapAlignment ()) { -return; -}if (this.mouseDragging && this.scrollThread == null) { -this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.SeqPanel.ScrollThread, this, null); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "scrollCanvas", -function (evt) { -if (evt == null) { -if (this.scrollThread != null) { -this.scrollThread.running = false; -this.scrollThread = null; -}this.mouseDragging = false; -} else { -if (this.scrollThread == null) { -this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.SeqPanel.ScrollThread, this, null); -}this.mouseDragging = true; -this.scrollThread.setEvent (evt); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "selection", -function (seqsel, colsel, source) { -if (this.av != null && (this.av === source || !this.av.followSelection || (Clazz.instanceOf (source, jalview.appletgui.AlignViewport) && (source).getSequenceSetId ().equals (this.av.getSequenceSetId ())))) { -return; -}if (this.selectionFromTranslation (seqsel, colsel, source)) { -return; -}var repaint = false; -var copycolsel = true; -if (this.av.getSelectionGroup () == null || !this.av.isSelectionGroupChanged (true)) { -var sgroup = null; -if (seqsel != null && seqsel.getSize () > 0) { -if (this.av.getAlignment () == null) { -System.out.println ("Selection message: alignviewport av SeqSetId=" + this.av.getSequenceSetId () + " ViewId=" + this.av.getViewId () + " 's alignment is NULL! returning immediatly."); -return; -}sgroup = seqsel.intersect (this.av.getAlignment (), (this.av.hasHiddenRows ()) ? this.av.getHiddenRepSequences () : null); -if ((sgroup == null || sgroup.getSize () == 0) && (colsel == null || colsel.size () == 0)) { -copycolsel = false; -}}if (sgroup != null && sgroup.getSize () > 0) { -this.av.setSelectionGroup (sgroup); -} else { -this.av.setSelectionGroup (null); -}repaint = this.av.isSelectionGroupChanged (true); -}if (copycolsel && (this.av.getColumnSelection () == null || !this.av.isColSelChanged (true))) { -if (colsel == null || colsel.size () == 0) { -if (this.av.getColumnSelection () != null) { -this.av.getColumnSelection ().clear (); -}} else { -if (this.av.getColumnSelection () == null) { -this.av.setColumnSelection ( new jalview.datamodel.ColumnSelection (colsel)); -} else { -this.av.getColumnSelection ().setElementsFrom (colsel); -}}repaint = new Boolean (repaint | this.av.isColSelChanged (true)).valueOf (); -}if (copycolsel && this.av.hasHiddenColumns () && (this.av.getColumnSelection () == null || this.av.getColumnSelection ().getHiddenColumns () == null)) { -System.err.println ("Bad things"); -}if (repaint) { -this.ap.scalePanelHolder.repaint (); -this.ap.repaint (); -}}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); -Clazz.defineMethod (c$, "scrollTo", -function (row, column) { -row = row < 0 ? this.ap.av.startSeq : row; -column = column < 0 ? this.ap.av.startRes : column; -this.ap.scrollTo (column, column, row, true, true); -}, "~N,~N"); -Clazz.defineMethod (c$, "scrollToRow", -function (row) { -row = row < 0 ? this.ap.av.startSeq : row; -this.ap.scrollTo (this.ap.av.startRes, this.ap.av.startRes, row, true, true); -}, "~N"); -Clazz.defineMethod (c$, "scrollToColumn", -function (column) { -column = column < 0 ? this.ap.av.startRes : column; -this.ap.scrollTo (column, column, this.ap.av.startSeq, true, true); -}, "~N"); -Clazz.defineMethod (c$, "selectionFromTranslation", -function (seqsel, colsel, source) { -if (!(Clazz.instanceOf (source, jalview.api.AlignViewportI))) { -return false; -}var sourceAv = source; -if (sourceAv.getCodingComplement () !== this.av && this.av.getCodingComplement () !== sourceAv) { -return false; -}var sg = jalview.util.MappingUtils.mapSequenceGroup (seqsel, sourceAv, this.av); -this.av.setSelectionGroup (sg); -this.av.isSelectionGroupChanged (true); -var cs = jalview.util.MappingUtils.mapColumnSelection (colsel, sourceAv, this.av); -this.av.setColumnSelection (cs); -this.av.isColSelChanged (true); -this.ap.scalePanelHolder.repaint (); -this.ap.repaint (); -return true; -}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); -c$.$SeqPanel$ScrollThread$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.evt = null; -this.running = false; -Clazz.instantialize (this, arguments); -}, jalview.appletgui.SeqPanel, "ScrollThread", Thread); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.appletgui.SeqPanel.ScrollThread, []); -this.start (); -}); -Clazz.defineMethod (c$, "setEvent", -function (a) { -this.evt = a; -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "stopScrolling", -function () { -this.running = false; -}); -Clazz.overrideMethod (c$, "run", -function () { -this.running = true; -while (this.running) { -if (this.evt != null) { -if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getY () < 0 && this.b$["jalview.appletgui.SeqPanel"].av.getStartSeq () > 0) { -this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollUp (true); -}if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getY () >= this.b$["jalview.appletgui.SeqPanel"].getSize ().height && this.b$["jalview.appletgui.SeqPanel"].av.getAlignment ().getHeight () > this.b$["jalview.appletgui.SeqPanel"].av.getEndSeq ()) { -this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollUp (false); -}if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getX () < 0) { -this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollRight (false); -} else if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getX () >= this.b$["jalview.appletgui.SeqPanel"].getSize ().width) { -this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollRight (true); -}}try { -Thread.sleep (75); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -} -}); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "jalview.structure.SelectionListener", "$.SequenceListener", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.lang.Thread"], "jalview.appletgui.SeqPanel", ["jalview.api.AlignViewportI", "jalview.appletgui.APopupMenu", "$.AlignViewport", "$.PaintRefresher", "$.SeqCanvas", "$.SliderPanel", "$.Tooltip", "jalview.commands.EditCommand", "jalview.datamodel.ColumnSelection", "$.SearchResults", "$.SequenceGroup", "jalview.schemes.ResidueProperties", "jalview.structure.StructureSelectionManager", "jalview.util.Comparison", "$.MappingUtils", "$.MessageManager", "java.awt.BorderLayout", "$.Font", "java.lang.StringBuffer", "$.StringBuilder", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.seqCanvas = null; +this.ap = null; +this.lastres = 0; +this.startseq = 0; +this.av = null; +this.seqEditOccurred = false; +this.scrollThread = null; +this.mouseDragging = false; +this.editingSeqs = false; +this.groupEditing = false; +this.oldSeq = -1; +this.changeEndSeq = false; +this.changeStartSeq = false; +this.changeEndRes = false; +this.changeStartRes = false; +this.stretchGroup = null; +this.keyboardNo1 = null; +this.keyboardNo2 = null; +this.mouseWheelPressed = false; +this.lastMousePress = null; +this.editCommand = null; +this.ssm = null; +this.startWrapBlock = -1; +this.wrappedBlock = -1; +this.lastMessage = null; +this.tooltip = null; +if (!Clazz.isClassDefined ("jalview.appletgui.SeqPanel.ScrollThread")) { +jalview.appletgui.SeqPanel.$SeqPanel$ScrollThread$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "SeqPanel", awt2swing.Panel, [java.awt.event.MouseMotionListener, java.awt.event.MouseListener, jalview.structure.SequenceListener, jalview.structure.SelectionListener]); +Clazz.makeConstructor (c$, +function (avp, p) { +Clazz.superConstructor (this, jalview.appletgui.SeqPanel, []); +this.av = avp; +this.setName ("seqPanel"); +this.seqCanvas = new jalview.appletgui.SeqCanvas (avp); +this.setLayout ( new java.awt.BorderLayout ()); +this.add (this.seqCanvas); +this.ap = p; +this.seqCanvas.addMouseMotionListener (this); +this.seqCanvas.addMouseListener (this); +this.ssm = jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet); +this.ssm.addStructureViewerListener (this); +this.ssm.addSelectionListener (this); +this.seqCanvas.repaint (); +}, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel"); +Clazz.defineMethod (c$, "endEditing", +function () { +if (this.editCommand != null && this.editCommand.getSize () > 0) { +this.ap.alignFrame.addHistoryItem (this.editCommand); +this.av.firePropertyChange ("alignment", null, this.av.getAlignment ().getSequences ()); +}this.startseq = -1; +this.lastres = -1; +this.editingSeqs = false; +this.groupEditing = false; +this.keyboardNo1 = null; +this.keyboardNo2 = null; +this.editCommand = null; +}); +Clazz.defineMethod (c$, "setCursorRow", +function () { +this.seqCanvas.cursorY = this.getKeyboardNo1 () - 1; +this.scrollToVisible (); +}); +Clazz.defineMethod (c$, "setCursorColumn", +function () { +this.seqCanvas.cursorX = this.getKeyboardNo1 () - 1; +this.scrollToVisible (); +}); +Clazz.defineMethod (c$, "setCursorRowAndColumn", +function () { +if (this.keyboardNo2 == null) { +this.keyboardNo2 = new StringBuffer (); +} else { +this.seqCanvas.cursorX = this.getKeyboardNo1 () - 1; +this.seqCanvas.cursorY = this.getKeyboardNo2 () - 1; +this.scrollToVisible (); +}}); +Clazz.defineMethod (c$, "setCursorPosition", +function () { +var sequence = this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY); +this.seqCanvas.cursorX = sequence.findIndex (this.getKeyboardNo1 ()) - 1; +this.scrollToVisible (); +}); +Clazz.defineMethod (c$, "moveCursor", +function (dx, dy) { +this.seqCanvas.cursorX += dx; +this.seqCanvas.cursorY += dy; +if (this.av.hasHiddenColumns () && !this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX)) { +var original = this.seqCanvas.cursorX - dx; +var maxWidth = this.av.getAlignment ().getWidth (); +while (!this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX) && this.seqCanvas.cursorX < maxWidth && this.seqCanvas.cursorX > 0) { +this.seqCanvas.cursorX += dx; +} +if (this.seqCanvas.cursorX >= maxWidth || !this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX)) { +this.seqCanvas.cursorX = original; +}}this.scrollToVisible (); +}, "~N,~N"); +Clazz.defineMethod (c$, "scrollToVisible", +function () { +if (this.seqCanvas.cursorX < 0) { +this.seqCanvas.cursorX = 0; +} else if (this.seqCanvas.cursorX > this.av.getAlignment ().getWidth () - 1) { +this.seqCanvas.cursorX = this.av.getAlignment ().getWidth () - 1; +}if (this.seqCanvas.cursorY < 0) { +this.seqCanvas.cursorY = 0; +} else if (this.seqCanvas.cursorY > this.av.getAlignment ().getHeight () - 1) { +this.seqCanvas.cursorY = this.av.getAlignment ().getHeight () - 1; +}this.endEditing (); +if (this.av.getWrapAlignment ()) { +this.ap.scrollToWrappedVisible (this.seqCanvas.cursorX); +} else { +while (this.seqCanvas.cursorY < this.av.startSeq) { +this.ap.scrollUp (true); +} +while (this.seqCanvas.cursorY + 1 > this.av.endSeq) { +this.ap.scrollUp (false); +} +while (this.seqCanvas.cursorX < this.av.getColumnSelection ().adjustForHiddenColumns (this.av.startRes)) { +if (!this.ap.scrollRight (false)) { +break; +}} +while (this.seqCanvas.cursorX > this.av.getColumnSelection ().adjustForHiddenColumns (this.av.endRes)) { +if (!this.ap.scrollRight (true)) { +break; +}} +}this.setStatusMessage (this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY), this.seqCanvas.cursorX, this.seqCanvas.cursorY); +this.seqCanvas.repaint (); +}); +Clazz.defineMethod (c$, "setSelectionAreaAtCursor", +function (topLeft) { +var sequence = this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY); +if (this.av.getSelectionGroup () != null) { +var sg = this.av.getSelectionGroup (); +var min = this.av.getAlignment ().getHeight (); +var max = 0; +for (var i = 0; i < sg.getSize (); i++) { +var index = this.av.getAlignment ().findIndex (sg.getSequenceAt (i)); +if (index > max) { +max = index; +}if (index < min) { +min = index; +}} +max++; +if (topLeft) { +sg.setStartRes (this.seqCanvas.cursorX); +if (sg.getEndRes () < this.seqCanvas.cursorX) { +sg.setEndRes (this.seqCanvas.cursorX); +}min = this.seqCanvas.cursorY; +} else { +sg.setEndRes (this.seqCanvas.cursorX); +if (sg.getStartRes () > this.seqCanvas.cursorX) { +sg.setStartRes (this.seqCanvas.cursorX); +}max = this.seqCanvas.cursorY + 1; +}if (min > max) { +this.av.setSelectionGroup (null); +} else { +sg.clear (); +for (var i = min; i < max; i++) { +sg.addSequence (this.av.getAlignment ().getSequenceAt (i), false); +} +}}if (this.av.getSelectionGroup () == null) { +var sg = new jalview.datamodel.SequenceGroup (); +sg.setStartRes (this.seqCanvas.cursorX); +sg.setEndRes (this.seqCanvas.cursorX); +sg.addSequence (sequence, false); +this.av.setSelectionGroup (sg); +}this.ap.paintAlignment (false); +this.av.sendSelection (); +}, "~B"); +Clazz.defineMethod (c$, "insertGapAtCursor", +function (group) { +this.groupEditing = group; +this.startseq = this.seqCanvas.cursorY; +this.lastres = this.seqCanvas.cursorX; +this.editSequence (true, this.seqCanvas.cursorX + this.getKeyboardNo1 ()); +this.endEditing (); +}, "~B"); +Clazz.defineMethod (c$, "deleteGapAtCursor", +function (group) { +this.groupEditing = group; +this.startseq = this.seqCanvas.cursorY; +this.lastres = this.seqCanvas.cursorX + this.getKeyboardNo1 (); +this.editSequence (false, this.seqCanvas.cursorX); +this.endEditing (); +}, "~B"); +Clazz.defineMethod (c$, "numberPressed", +function (value) { +if (this.keyboardNo1 == null) { +this.keyboardNo1 = new StringBuffer (); +}if (this.keyboardNo2 != null) { +this.keyboardNo2.append (value); +} else { +this.keyboardNo1.append (value); +}}, "~S"); +Clazz.defineMethod (c$, "getKeyboardNo1", +function () { +try { +if (this.keyboardNo1 != null) { +var value = Integer.parseInt (this.keyboardNo1.toString ()); +this.keyboardNo1 = null; +return value; +}} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +} else { +throw x; +} +} +this.keyboardNo1 = null; +return 1; +}); +Clazz.defineMethod (c$, "getKeyboardNo2", +function () { +try { +if (this.keyboardNo2 != null) { +var value = Integer.parseInt (this.keyboardNo2.toString ()); +this.keyboardNo2 = null; +return value; +}} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +} else { +throw x; +} +} +this.keyboardNo2 = null; +return 1; +}); +Clazz.defineMethod (c$, "setStatusMessage", +function (sequence, res, seq) { +var text = new StringBuilder (32); +var seqno = seq == -1 ? "" : " " + (seq + 1); +text.append ("Sequence" + seqno + " ID: " + sequence.getName ()); +var residue = null; +var displayChar = String.valueOf (sequence.getCharAt (res)); +if (this.av.getAlignment ().isNucleotide ()) { +residue = jalview.schemes.ResidueProperties.nucleotideName.get (displayChar); +if (residue != null) { +text.append (" Nucleotide: ").append (residue); +}} else { +residue = "X".equalsIgnoreCase (displayChar) ? "X" : jalview.schemes.ResidueProperties.aa2Triplet.get (displayChar); +if (residue != null) { +text.append (" Residue: ").append (residue); +}}var pos = -1; +if (residue != null) { +pos = sequence.findPosition (res); +text.append (" (").append (Integer.toString (pos)).append (")"); +}this.ap.alignFrame.setStatus (text.toString ()); +}, "jalview.datamodel.SequenceI,~N,~N"); +Clazz.defineMethod (c$, "setStatusMessage", +($fz = function (results) { +var matches = results.getResults (); +if (!matches.isEmpty ()) { +var m = matches.get (0); +var seq = m.getSequence (); +var sequenceIndex = this.av.getAlignment ().findIndex (seq); +var start = m.getStart () - 1; +this.setStatusMessage (seq, start, sequenceIndex); +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SearchResults"); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +this.lastMousePress = evt.getPoint (); +if ((evt.getModifiers () & 8) == 8 && !this.av.MAC) { +this.mouseWheelPressed = true; +return; +}if (evt.isShiftDown () || evt.isControlDown () || evt.isAltDown ()) { +if (evt.isControlDown () || evt.isAltDown ()) { +this.groupEditing = true; +}this.editingSeqs = true; +} else { +this.doMousePressedDefineMode (evt); +return; +}var seq = this.findSeq (evt); +var res = this.findRes (evt); +if (seq < 0 || res < 0) { +return; +}if ((seq < this.av.getAlignment ().getHeight ()) && (res < this.av.getAlignment ().getSequenceAt (seq).getLength ())) { +this.startseq = seq; +this.lastres = res; +} else { +this.startseq = -1; +this.lastres = -1; +}return; +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +var sequence = this.av.getAlignment ().getSequenceAt (this.findSeq (evt)); +if (evt.getClickCount () > 1) { +if (this.av.getSelectionGroup () != null && this.av.getSelectionGroup ().getSize () == 1 && this.av.getSelectionGroup ().getEndRes () - this.av.getSelectionGroup ().getStartRes () < 2) { +this.av.setSelectionGroup (null); +}var features = this.findFeaturesAtRes (sequence, sequence.findPosition (this.findRes (evt))); +if (features != null && features.length > 0) { +var highlight = new jalview.datamodel.SearchResults (); +highlight.addResult (sequence, features[0].getBegin (), features[0].getEnd ()); +this.seqCanvas.highlightSearchResults (highlight); +}if (features != null && features.length > 0) { +this.seqCanvas.getFeatureRenderer ().amendFeatures ( Clazz.newArray (-1, [sequence]), features, false, this.ap); +this.seqCanvas.highlightSearchResults (null); +}}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +this.mouseDragging = false; +this.mouseWheelPressed = false; +this.ap.paintAlignment (true); +if (!this.editingSeqs) { +this.doMouseReleasedDefineMode (evt); +return; +}this.endEditing (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "findRes", +function (evt) { +var res = 0; +var x = evt.getX (); +if (this.av.getWrapAlignment ()) { +var hgap = this.av.getCharHeight (); +if (this.av.getScaleAboveWrapped ()) { +hgap += this.av.getCharHeight (); +}var cHeight = this.av.getAlignment ().getHeight () * this.av.getCharHeight () + hgap + this.seqCanvas.getAnnotationHeight (); +var y = evt.getY (); +y -= hgap; +x -= this.seqCanvas.LABEL_WEST; +var cwidth = this.seqCanvas.getWrappedCanvasWidth (this.getSize ().width); +if (cwidth < 1) { +return 0; +}this.wrappedBlock = Clazz.doubleToInt (y / cHeight); +this.wrappedBlock += Clazz.doubleToInt (this.av.getStartRes () / cwidth); +res = this.wrappedBlock * cwidth + Clazz.doubleToInt (x / this.av.getCharWidth ()); +} else { +res = (Clazz.doubleToInt (x / this.av.getCharWidth ())) + this.av.getStartRes (); +}if (this.av.hasHiddenColumns ()) { +res = this.av.getColumnSelection ().adjustForHiddenColumns (res); +}return res; +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "findSeq", +function (evt) { +var sqnum = this.findAlRow (evt); +return (sqnum < 0) ? 0 : sqnum; +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "findAlRow", +($fz = function (evt) { +var seq = 0; +var y = evt.getY (); +if (this.av.getWrapAlignment ()) { +var hgap = this.av.getCharHeight (); +if (this.av.getScaleAboveWrapped ()) { +hgap += this.av.getCharHeight (); +}var cHeight = this.av.getAlignment ().getHeight () * this.av.getCharHeight () + hgap + this.seqCanvas.getAnnotationHeight (); +y -= hgap; +seq = Math.min (Clazz.doubleToInt ((y % cHeight) / this.av.getCharHeight ()), this.av.getAlignment ().getHeight () - 1); +if (seq < 0) { +seq = -1; +}} else { +seq = Math.min ((Clazz.doubleToInt (y / this.av.getCharHeight ())) + this.av.getStartSeq (), this.av.getAlignment ().getHeight () - 1); +if (seq < 0) { +seq = -1; +}}return seq; +}, $fz.isPrivate = true, $fz), "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "doMousePressed", +function (evt) { +var seq = this.findSeq (evt); +var res = this.findRes (evt); +if (seq < this.av.getAlignment ().getHeight () && res < this.av.getAlignment ().getSequenceAt (seq).getLength ()) { +this.startseq = seq; +this.lastres = res; +} else { +this.startseq = -1; +this.lastres = -1; +}return; +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseOverSequence", +function (sequence, index, pos) { +var tmp = sequence.hashCode () + index + ""; +if (this.lastMessage == null || !this.lastMessage.equals (tmp)) { +this.ssm.mouseOverSequence (sequence, index, pos, this.av); +}this.lastMessage = tmp; +}, "jalview.datamodel.SequenceI,~N,~N"); +Clazz.overrideMethod (c$, "highlightSequence", +function (results) { +if (this.av.isFollowHighlight ()) { +if (this.ap.scrollToPosition (results, true)) { +this.ap.alignFrame.repaint (); +}}this.setStatusMessage (results); +this.seqCanvas.highlightSearchResults (results); +}, "jalview.datamodel.SearchResults"); +Clazz.overrideMethod (c$, "getVamsasSource", +function () { +return this.ap == null ? null : this.ap.av; +}); +Clazz.overrideMethod (c$, "updateColours", +function (seq, index) { +System.out.println ("update the seqPanel colours"); +}, "jalview.datamodel.SequenceI,~N"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +var res = this.findRes (evt); +var seq = this.findSeq (evt); +if (seq >= this.av.getAlignment ().getHeight () || seq < 0 || res < 0) { +if (this.tooltip != null) { +this.tooltip.setTip (""); +}return; +}var sequence = this.av.getAlignment ().getSequenceAt (seq); +if (res > sequence.getLength ()) { +if (this.tooltip != null) { +this.tooltip.setTip (""); +}return; +}var respos = sequence.findPosition (res); +if (this.ssm != null) { +this.mouseOverSequence (sequence, res, respos); +}var text = new StringBuilder (); +text.append ("Sequence ").append (Integer.toString (seq + 1)).append (" ID: ").append (sequence.getName ()); +var obj = null; +var ch = String.valueOf (sequence.getCharAt (res)); +if (this.av.getAlignment ().isNucleotide ()) { +obj = jalview.schemes.ResidueProperties.nucleotideName.get (ch); +if (obj != null) { +text.append (" Nucleotide: ").append (obj); +}} else { +obj = "X".equalsIgnoreCase (ch) ? "X" : jalview.schemes.ResidueProperties.aa2Triplet.get (ch); +if (obj != null) { +text.append (" Residue: ").append (obj); +}}if (obj != null) { +text.append (" (").append (Integer.toString (respos)).append (")"); +}this.ap.alignFrame.setStatus (text.toString ()); +var tooltipText = new StringBuilder (); +var groups = this.av.getAlignment ().findAllGroups (sequence); +if (groups != null) { +for (var g = 0; g < groups.length; g++) { +if (groups[g].getStartRes () <= res && groups[g].getEndRes () >= res) { +if (!groups[g].getName ().startsWith ("JTreeGroup") && !groups[g].getName ().startsWith ("JGroup")) { +tooltipText.append (groups[g].getName ()).append (" "); +}if (groups[g].getDescription () != null) { +tooltipText.append (groups[g].getDescription ()); +}tooltipText.append ("\n"); +}} +}var allFeatures = this.findFeaturesAtRes (sequence, sequence.findPosition (res)); +var index = 0; +while (index < allFeatures.length) { +var sf = allFeatures[index]; +tooltipText.append (sf.getType () + " " + sf.begin + ":" + sf.end); +if (sf.getDescription () != null) { +tooltipText.append (" " + sf.getDescription ()); +}if (sf.getValue ("status") != null) { +var status = sf.getValue ("status").toString (); +if (status.length > 0) { +tooltipText.append (" (" + sf.getValue ("status") + ")"); +}}tooltipText.append ("\n"); +index++; +} +if (this.tooltip == null) { +this.tooltip = new jalview.appletgui.Tooltip (tooltipText.toString (), this.seqCanvas); +} else { +this.tooltip.setTip (tooltipText.toString ()); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "findFeaturesAtRes", +function (sequence, res) { +var tmp = new java.util.Vector (); +var features = sequence.getSequenceFeatures (); +if (features != null) { +for (var i = 0; i < features.length; i++) { +if (this.av.getFeaturesDisplayed () == null || !this.av.getFeaturesDisplayed ().isVisible (features[i].getType ())) { +continue; +}if (features[i].featureGroup != null && !this.seqCanvas.fr.checkGroupVisibility (features[i].featureGroup, false)) { +continue; +}if ((features[i].getBegin () <= res) && (features[i].getEnd () >= res)) { +tmp.addElement (features[i]); +}} +}features = new Array (tmp.size ()); +tmp.copyInto (features); +return features; +}, "jalview.datamodel.SequenceI,~N"); +Clazz.overrideMethod (c$, "mouseDragged", +function (evt) { +if (this.mouseWheelPressed) { +var oldWidth = this.av.getCharWidth (); +if (Math.abs (evt.getY () - this.lastMousePress.y) > Math.abs (evt.getX () - this.lastMousePress.x)) { +var fontSize = this.av.font.getSize (); +if (evt.getY () < this.lastMousePress.y && this.av.getCharHeight () > 1) { +fontSize--; +} else if (evt.getY () > this.lastMousePress.y) { +fontSize++; +}if (fontSize < 1) { +fontSize = 1; +}this.av.setFont ( new java.awt.Font (this.av.font.getName (), this.av.font.getStyle (), fontSize)); +this.av.setCharWidth (oldWidth); +} else { +if (evt.getX () < this.lastMousePress.x && this.av.getCharWidth () > 1) { +this.av.setCharWidth (this.av.getCharWidth () - 1); +} else if (evt.getX () > this.lastMousePress.x) { +this.av.setCharWidth (this.av.getCharWidth () + 1); +}if (this.av.getCharWidth () < 1) { +this.av.setCharWidth (1); +}}this.ap.fontChanged (); +var fm = this.getFontMetrics (this.av.getFont ()); +this.av.validCharWidth = fm.charWidth ('M') <= this.av.getCharWidth (); +this.lastMousePress = evt.getPoint (); +this.ap.paintAlignment (false); +this.ap.annotationPanel.image = null; +return; +}if (!this.editingSeqs) { +this.doMouseDraggedDefineMode (evt); +return; +}var res = this.findRes (evt); +if (res < 0) { +res = 0; +}if ((this.lastres == -1) || (this.lastres == res)) { +return; +}if ((res < this.av.getAlignment ().getWidth ()) && (res < this.lastres)) { +this.editSequence (false, res); +} else { +this.editSequence (true, res); +}this.mouseDragging = true; +if (this.scrollThread != null) { +this.scrollThread.setEvent (evt); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "editSequence", +function (insertGap, startres) { +var fixedLeft = -1; +var fixedRight = -1; +var fixedColumns = false; +var sg = this.av.getSelectionGroup (); +var seq = this.av.getAlignment ().getSequenceAt (this.startseq); +if (!this.groupEditing && this.av.hasHiddenRows ()) { +if (this.av.isHiddenRepSequence (seq)) { +sg = this.av.getRepresentedSequences (seq); +this.groupEditing = true; +}}var message = new StringBuffer (); +if (this.groupEditing) { +message.append (jalview.util.MessageManager.getString ("action.edit_group")).append (":"); +if (this.editCommand == null) { +this.editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("action.edit_group")); +}} else { +message.append (jalview.util.MessageManager.getString ("label.edit_sequence")).append (" " + seq.getName ()); +var label = seq.getName (); +if (label.length > 10) { +label = label.substring (0, 10); +}if (this.editCommand == null) { +this.editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.formatMessage ("label.edit_params", Clazz.newArray (-1, [label]))); +}}if (insertGap) { +message.append (" insert "); +} else { +message.append (" delete "); +}message.append (Math.abs (startres - this.lastres) + " gaps."); +this.ap.alignFrame.setStatus (message.toString ()); +if (this.groupEditing || (sg != null && sg.getSequences (this.av.getHiddenRepSequences ()).contains (seq))) { +fixedColumns = true; +if (sg == null) { +if (!this.av.isHiddenRepSequence (seq)) { +this.endEditing (); +return; +}sg = this.av.getRepresentedSequences (seq); +}fixedLeft = sg.getStartRes (); +fixedRight = sg.getEndRes (); +if ((startres < fixedLeft && this.lastres >= fixedLeft) || (startres >= fixedLeft && this.lastres < fixedLeft) || (startres > fixedRight && this.lastres <= fixedRight) || (startres <= fixedRight && this.lastres > fixedRight)) { +this.endEditing (); +return; +}if (fixedLeft > startres) { +fixedRight = fixedLeft - 1; +fixedLeft = 0; +} else if (fixedRight < startres) { +fixedLeft = fixedRight; +fixedRight = -1; +}}if (this.av.hasHiddenColumns ()) { +fixedColumns = true; +var y1 = this.av.getColumnSelection ().getHiddenBoundaryLeft (startres); +var y2 = this.av.getColumnSelection ().getHiddenBoundaryRight (startres); +if ((insertGap && startres > y1 && this.lastres < y1) || (!insertGap && startres < y2 && this.lastres > y2)) { +this.endEditing (); +return; +}if (fixedLeft < y1 && (fixedRight > y2 || fixedRight == -1)) { +if (startres >= y2) { +fixedLeft = y2; +} else { +fixedRight = y2 - 1; +}}}if (this.groupEditing) { +var groupSeqs = sg.getSequences (this.av.getHiddenRepSequences ()).toArray ( new Array (0)); +if (insertGap) { +if (sg.getStartRes () == 0 && sg.getEndRes () == fixedRight && sg.getEndRes () == this.av.getAlignment ().getWidth () - 1) { +sg.setEndRes (this.av.getAlignment ().getWidth () + startres - this.lastres); +fixedRight = sg.getEndRes (); +}var blank = false; +for (fixedRight = fixedRight; fixedRight > this.lastres; fixedRight--) { +blank = true; +for (var gs, $gs = 0, $$gs = groupSeqs; $gs < $$gs.length && ((gs = $$gs[$gs]) || true); $gs++) { +for (var j = 0; j < startres - this.lastres; j++) { +if (!jalview.util.Comparison.isGap (gs.getCharAt (fixedRight - j))) { +blank = false; +break; +}} +} +if (blank) { +break; +}} +if (!blank) { +if (sg.getSize () == this.av.getAlignment ().getHeight ()) { +if ((this.av.hasHiddenColumns () && startres < this.av.getColumnSelection ().getHiddenBoundaryRight (startres))) { +this.endEditing (); +return; +}var alWidth = this.av.getAlignment ().getWidth (); +if (this.av.hasHiddenRows ()) { +var hwidth = this.av.getAlignment ().getHiddenSequences ().getWidth (); +if (hwidth > alWidth) { +alWidth = hwidth; +}}sg.setEndRes (sg.getEndRes () + startres - this.lastres); +fixedRight = alWidth + startres - this.lastres; +} else { +this.endEditing (); +return; +}}} else if (!insertGap) { +for (var gs, $gs = 0, $$gs = groupSeqs; $gs < $$gs.length && ((gs = $$gs[$gs]) || true); $gs++) { +for (var j = startres; j < this.lastres; j++) { +if (gs.getLength () <= j) { +continue; +}if (!jalview.util.Comparison.isGap (gs.getCharAt (j))) { +this.endEditing (); +return; +}} +} +}if (insertGap) { +if (fixedColumns && fixedRight != -1) { +for (var j = this.lastres; j < startres; j++) { +this.insertChar (j, groupSeqs, fixedRight); +} +} else { +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, groupSeqs, startres, startres - this.lastres, this.av.getAlignment (), true); +}} else { +if (fixedColumns && fixedRight != -1) { +for (var j = this.lastres; j > startres; j--) { +this.deleteChar (startres, groupSeqs, fixedRight); +} +} else { +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, groupSeqs, startres, this.lastres - startres, this.av.getAlignment (), true); +}}} else { +if (insertGap) { +if (fixedColumns && fixedRight != -1) { +for (var j = this.lastres; j < startres; j++) { +this.insertChar (j, Clazz.newArray (-1, [seq]), fixedRight); +} +} else { +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, Clazz.newArray (-1, [seq]), this.lastres, startres - this.lastres, this.av.getAlignment (), true); +}} else { +if (fixedColumns && fixedRight != -1) { +for (var j = this.lastres; j > startres; j--) { +if (!jalview.util.Comparison.isGap (seq.getCharAt (startres))) { +this.endEditing (); +break; +}this.deleteChar (startres, Clazz.newArray (-1, [seq]), fixedRight); +} +} else { +var max = 0; +for (var m = startres; m < this.lastres; m++) { +if (!jalview.util.Comparison.isGap (seq.getCharAt (m))) { +break; +}max++; +} +if (max > 0) { +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, Clazz.newArray (-1, [seq]), startres, max, this.av.getAlignment (), true); +}}}}this.lastres = startres; +this.seqCanvas.repaint (); +}, "~B,~N"); +Clazz.defineMethod (c$, "insertChar", +function (j, seq, fixedColumn) { +var blankColumn = fixedColumn; +for (var s = 0; s < seq.length; s++) { +for (blankColumn = fixedColumn; blankColumn > j; blankColumn--) { +if (jalview.util.Comparison.isGap (seq[s].getCharAt (blankColumn))) { +break; +}} +if (blankColumn <= j) { +blankColumn = fixedColumn; +this.endEditing (); +return; +}} +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seq, blankColumn, 1, this.av.getAlignment (), true); +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, seq, j, 1, this.av.getAlignment (), true); +}, "~N,~A,~N"); +Clazz.defineMethod (c$, "deleteChar", +function (j, seq, fixedColumn) { +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seq, j, 1, this.av.getAlignment (), true); +this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, seq, fixedColumn, 1, this.av.getAlignment (), true); +}, "~N,~A,~N"); +Clazz.defineMethod (c$, "doMousePressedDefineMode", +function (evt) { +if (this.scrollThread != null) { +this.scrollThread.running = false; +this.scrollThread = null; +}var res = this.findRes (evt); +var seq = this.findSeq (evt); +this.oldSeq = seq; +this.startWrapBlock = this.wrappedBlock; +if (seq == -1) { +return; +}var sequence = this.av.getAlignment ().getSequenceAt (seq); +if (sequence == null || res > sequence.getLength ()) { +return; +}this.stretchGroup = this.av.getSelectionGroup (); +if (this.stretchGroup == null) { +this.stretchGroup = this.av.getAlignment ().findGroup (sequence); +if (this.stretchGroup != null && res > this.stretchGroup.getStartRes () && res < this.stretchGroup.getEndRes ()) { +this.av.setSelectionGroup (this.stretchGroup); +} else { +this.stretchGroup = null; +}} else if (!this.stretchGroup.getSequences (null).contains (sequence) || this.stretchGroup.getStartRes () > res || this.stretchGroup.getEndRes () < res) { +this.stretchGroup = null; +var allGroups = this.av.getAlignment ().findAllGroups (sequence); +if (allGroups != null) { +for (var i = 0; i < allGroups.length; i++) { +if (allGroups[i].getStartRes () <= res && allGroups[i].getEndRes () >= res) { +this.stretchGroup = allGroups[i]; +break; +}} +}this.av.setSelectionGroup (this.stretchGroup); +}if ((evt.getModifiers () & 4) == 4) { +var allFeatures = this.findFeaturesAtRes (sequence, sequence.findPosition (res)); +var links = null; +if (allFeatures != null) { +for (var i = 0; i < allFeatures.length; i++) { +if (allFeatures[i].links != null) { +if (links == null) { +links = new java.util.Vector (); +}for (var j = 0; j < allFeatures[i].links.size (); j++) { +links.addElement (allFeatures[i].links.elementAt (j)); +} +}} +}var popup = new jalview.appletgui.APopupMenu (this.ap, null, links); +this.add (popup); +popup.show (this, evt.getX (), evt.getY ()); +return; +}if (this.av.cursorMode) { +this.seqCanvas.cursorX = this.findRes (evt); +this.seqCanvas.cursorY = this.findSeq (evt); +this.seqCanvas.repaint (); +return; +}if (this.stretchGroup == null) { +var sg = new jalview.datamodel.SequenceGroup (); +sg.setStartRes (res); +sg.setEndRes (res); +sg.addSequence (sequence, false); +this.av.setSelectionGroup (sg); +this.stretchGroup = sg; +if (this.av.getConservationSelected ()) { +jalview.appletgui.SliderPanel.setConservationSlider (this.ap, this.av.getGlobalColourScheme (), "Background"); +}if (this.av.getAbovePIDThreshold ()) { +jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, this.av.getGlobalColourScheme (), "Background"); +}}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "doMouseReleasedDefineMode", +function (evt) { +if (this.stretchGroup == null) { +return; +}this.stretchGroup.recalcConservation (); +if (this.stretchGroup.cs != null) { +this.stretchGroup.cs.alignmentChanged (this.stretchGroup, this.av.getHiddenRepSequences ()); +if (this.stretchGroup.cs.conservationApplied ()) { +jalview.appletgui.SliderPanel.setConservationSlider (this.ap, this.stretchGroup.cs, this.stretchGroup.getName ()); +} else { +jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, this.stretchGroup.cs, this.stretchGroup.getName ()); +}}this.changeEndRes = false; +this.changeStartRes = false; +this.stretchGroup = null; +jalview.appletgui.PaintRefresher.Refresh (this.ap, this.av.getSequenceSetId ()); +this.ap.paintAlignment (true); +this.av.sendSelection (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "doMouseDraggedDefineMode", +function (evt) { +var res = this.findRes (evt); +var y = this.findSeq (evt); +if (this.wrappedBlock != this.startWrapBlock) { +return; +}if (this.stretchGroup == null) { +return; +}this.mouseDragging = true; +if (y > this.av.getAlignment ().getHeight ()) { +y = this.av.getAlignment ().getHeight () - 1; +}if (res >= this.av.getAlignment ().getWidth ()) { +res = this.av.getAlignment ().getWidth () - 1; +}if (this.stretchGroup.getEndRes () == res) { +this.changeEndRes = true; +} else if (this.stretchGroup.getStartRes () == res) { +this.changeStartRes = true; +}if (res < 0) { +res = 0; +}if (this.changeEndRes) { +if (res > (this.stretchGroup.getStartRes () - 1)) { +this.stretchGroup.setEndRes (res); +}} else if (this.changeStartRes) { +if (res < (this.stretchGroup.getEndRes () + 1)) { +this.stretchGroup.setStartRes (res); +}}var dragDirection = 0; +if (y > this.oldSeq) { +dragDirection = 1; +} else if (y < this.oldSeq) { +dragDirection = -1; +}while ((y != this.oldSeq) && (this.oldSeq > -1) && (y < this.av.getAlignment ().getHeight ())) { +var seq = this.av.getAlignment ().getSequenceAt (this.oldSeq); +this.oldSeq += dragDirection; +if (this.oldSeq < 0) { +break; +}var nextSeq = this.av.getAlignment ().getSequenceAt (this.oldSeq); +if (this.stretchGroup.getSequences (null).contains (nextSeq)) { +this.stretchGroup.deleteSequence (seq, false); +} else { +if (seq != null) { +this.stretchGroup.addSequence (seq, false); +}this.stretchGroup.addSequence (nextSeq, false); +}} +if (this.oldSeq < 0) { +this.oldSeq = -1; +}if (res > this.av.endRes || res < this.av.startRes || y < this.av.startSeq || y > this.av.endSeq) { +this.mouseExited (evt); +}if (this.scrollThread != null) { +this.scrollThread.setEvent (evt); +}this.seqCanvas.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (e) { +if (this.oldSeq < 0) { +this.oldSeq = 0; +}if (this.scrollThread != null) { +this.scrollThread.running = false; +this.scrollThread = null; +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (e) { +if (this.av.getWrapAlignment ()) { +return; +}if (this.mouseDragging && this.scrollThread == null) { +this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.SeqPanel.ScrollThread, this, null); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "scrollCanvas", +function (evt) { +if (evt == null) { +if (this.scrollThread != null) { +this.scrollThread.running = false; +this.scrollThread = null; +}this.mouseDragging = false; +} else { +if (this.scrollThread == null) { +this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.SeqPanel.ScrollThread, this, null); +}this.mouseDragging = true; +this.scrollThread.setEvent (evt); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "selection", +function (seqsel, colsel, source) { +if (this.av != null && (this.av === source || !this.av.followSelection || (Clazz.instanceOf (source, jalview.appletgui.AlignViewport) && (source).getSequenceSetId ().equals (this.av.getSequenceSetId ())))) { +return; +}if (this.selectionFromTranslation (seqsel, colsel, source)) { +return; +}var repaint = false; +var copycolsel = true; +if (this.av.getSelectionGroup () == null || !this.av.isSelectionGroupChanged (true)) { +var sgroup = null; +if (seqsel != null && seqsel.getSize () > 0) { +if (this.av.getAlignment () == null) { +System.out.println ("Selection message: alignviewport av SeqSetId=" + this.av.getSequenceSetId () + " ViewId=" + this.av.getViewId () + " 's alignment is NULL! returning immediatly."); +return; +}sgroup = seqsel.intersect (this.av.getAlignment (), (this.av.hasHiddenRows ()) ? this.av.getHiddenRepSequences () : null); +if ((sgroup == null || sgroup.getSize () == 0) && (colsel == null || colsel.size () == 0)) { +copycolsel = false; +}}if (sgroup != null && sgroup.getSize () > 0) { +this.av.setSelectionGroup (sgroup); +} else { +this.av.setSelectionGroup (null); +}repaint = this.av.isSelectionGroupChanged (true); +}if (copycolsel && (this.av.getColumnSelection () == null || !this.av.isColSelChanged (true))) { +if (colsel == null || colsel.size () == 0) { +if (this.av.getColumnSelection () != null) { +this.av.getColumnSelection ().clear (); +}} else { +if (this.av.getColumnSelection () == null) { +this.av.setColumnSelection ( new jalview.datamodel.ColumnSelection (colsel)); +} else { +this.av.getColumnSelection ().setElementsFrom (colsel); +}}repaint = new Boolean (repaint | this.av.isColSelChanged (true)).valueOf (); +}if (copycolsel && this.av.hasHiddenColumns () && (this.av.getColumnSelection () == null || this.av.getColumnSelection ().getHiddenColumns () == null)) { +System.err.println ("Bad things"); +}if (repaint) { +this.ap.scalePanelHolder.repaint (); +this.ap.repaint (); +}}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); +Clazz.defineMethod (c$, "scrollTo", +function (row, column) { +row = row < 0 ? this.ap.av.startSeq : row; +column = column < 0 ? this.ap.av.startRes : column; +this.ap.scrollTo (column, column, row, true, true); +}, "~N,~N"); +Clazz.defineMethod (c$, "scrollToRow", +function (row) { +row = row < 0 ? this.ap.av.startSeq : row; +this.ap.scrollTo (this.ap.av.startRes, this.ap.av.startRes, row, true, true); +}, "~N"); +Clazz.defineMethod (c$, "scrollToColumn", +function (column) { +column = column < 0 ? this.ap.av.startRes : column; +this.ap.scrollTo (column, column, this.ap.av.startSeq, true, true); +}, "~N"); +Clazz.defineMethod (c$, "selectionFromTranslation", +function (seqsel, colsel, source) { +if (!(Clazz.instanceOf (source, jalview.api.AlignViewportI))) { +return false; +}var sourceAv = source; +if (sourceAv.getCodingComplement () !== this.av && this.av.getCodingComplement () !== sourceAv) { +return false; +}var sg = jalview.util.MappingUtils.mapSequenceGroup (seqsel, sourceAv, this.av); +this.av.setSelectionGroup (sg); +this.av.isSelectionGroupChanged (true); +var cs = jalview.util.MappingUtils.mapColumnSelection (colsel, sourceAv, this.av); +this.av.setColumnSelection (cs); +this.av.isColSelChanged (true); +this.ap.scalePanelHolder.repaint (); +this.ap.repaint (); +return true; +}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); +c$.$SeqPanel$ScrollThread$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.evt = null; +this.running = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui.SeqPanel, "ScrollThread", Thread); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.appletgui.SeqPanel.ScrollThread, []); +this.start (); +}); +Clazz.defineMethod (c$, "setEvent", +function (a) { +this.evt = a; +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "stopScrolling", +function () { +this.running = false; +}); +Clazz.overrideMethod (c$, "run", +function () { +this.running = true; +while (this.running) { +if (this.evt != null) { +if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getY () < 0 && this.b$["jalview.appletgui.SeqPanel"].av.getStartSeq () > 0) { +this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollUp (true); +}if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getY () >= this.b$["jalview.appletgui.SeqPanel"].getSize ().height && this.b$["jalview.appletgui.SeqPanel"].av.getAlignment ().getHeight () > this.b$["jalview.appletgui.SeqPanel"].av.getEndSeq ()) { +this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollUp (false); +}if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getX () < 0) { +this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollRight (false); +} else if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getX () >= this.b$["jalview.appletgui.SeqPanel"].getSize ().width) { +this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollRight (true); +}}try { +Thread.sleep (75); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +} +}); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/SequenceRenderer.class b/bin/jalview/appletgui/SequenceRenderer.class index a758da72ac228ab7114e229bb0f310dc6a39cce9..d15b02fae27268e7969a5ed0a591d968581814c4 100644 GIT binary patch delta 99 zcmca(b<=9YJ$}Z`lkfAdV_{)nGTuB%pq+_Pe6y7BS4IOx2KN69`V2hm42>wJ?%&gBKFnN)LGNaVy;}TO@0Jqf@5dZ)H delta 82 zcmcaC@K;7=B?gYkf})b5dQ9Sq(rio& mj0`gwCIU$b1_tH{o9#s7nVAh31Sc<$P-YTm+I&P}DhmLdwG)T{ diff --git a/bin/jalview/appletgui/SequenceRenderer.js b/bin/jalview/appletgui/SequenceRenderer.js index 449c271..43ee455 100644 --- a/bin/jalview/appletgui/SequenceRenderer.js +++ b/bin/jalview/appletgui/SequenceRenderer.js @@ -1,196 +1,196 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.api.SequenceRenderer"], "jalview.appletgui.SequenceRenderer", ["jalview.util.Comparison", "java.awt.Color", "$.Font"], function () { -c$ = Clazz.decorateAsClass (function () { -this.av = null; -this.fm = null; -this.renderGaps = true; -this.currentSequenceGroup = null; -this.allGroups = null; -this.resBoxColour = null; -this.graphics = null; -this.forOverview = false; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "SequenceRenderer", null, jalview.api.SequenceRenderer); -Clazz.makeConstructor (c$, -function (av) { -this.av = av; -}, "jalview.appletgui.AlignViewport"); -Clazz.defineMethod (c$, "prepare", -function (g, renderGaps) { -this.graphics = g; -this.fm = g.getFontMetrics (); -this.renderGaps = renderGaps; -}, "java.awt.Graphics,~B"); -Clazz.overrideMethod (c$, "getResidueBoxColour", -function (seq, i) { -this.allGroups = this.av.getAlignment ().findAllGroups (seq); -if (this.inCurrentSequenceGroup (i)) { -if (this.currentSequenceGroup.getDisplayBoxes ()) { -this.getBoxColour (this.currentSequenceGroup.cs, seq, i); -}} else if (this.av.getShowBoxes ()) { -this.getBoxColour (this.av.getGlobalColourScheme (), seq, i); -}return this.resBoxColour; -}, "jalview.datamodel.SequenceI,~N"); -Clazz.overrideMethod (c$, "getResidueColour", -function (seq, position, fr) { -var col = this.getResidueBoxColour (seq, position); -if (fr != null) { -col = fr.findFeatureColour (col, seq, position); -}return col; -}, "jalview.datamodel.SequenceI,~N,jalview.api.FeatureRenderer"); -Clazz.defineMethod (c$, "getBoxColour", -function (cs, seq, i) { -if (cs != null) { -this.resBoxColour = cs.findColour (seq.getCharAt (i), i, seq); -} else if (this.forOverview && !jalview.util.Comparison.isGap (seq.getCharAt (i))) { -this.resBoxColour = java.awt.Color.lightGray; -} else { -this.resBoxColour = java.awt.Color.white; -}}, "jalview.schemes.ColourSchemeI,jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "findSequenceColour", -function (seq, i) { -this.allGroups = this.av.getAlignment ().findAllGroups (seq); -this.drawBoxes (seq, i, i, 0); -return this.resBoxColour; -}, "jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "drawSequence", -function (seq, sg, start, end, y1) { -if (seq == null) { -return; -}this.allGroups = sg; -this.drawBoxes (seq, start, end, y1); -if (this.av.validCharWidth) { -this.drawText (seq, start, end, y1); -}}, "jalview.datamodel.SequenceI,~A,~N,~N,~N"); -Clazz.defineMethod (c$, "drawBoxes", -function (seq, start, end, y1) { -var i = start; -var length = seq.getLength (); -var curStart = -1; -var curWidth = this.av.getCharWidth (); -var avCharWidth = this.av.getCharWidth (); -var avCharHeight = this.av.getCharHeight (); -var tempColour = null; -while (i <= end) { -this.resBoxColour = java.awt.Color.white; -if (i < length) { -if (this.inCurrentSequenceGroup (i)) { -if (this.currentSequenceGroup.getDisplayBoxes ()) { -this.getBoxColour (this.currentSequenceGroup.cs, seq, i); -}} else if (this.av.getShowBoxes ()) { -this.getBoxColour (this.av.getGlobalColourScheme (), seq, i); -}}if (this.resBoxColour !== tempColour) { -if (tempColour != null) { -this.graphics.fillRect (avCharWidth * (curStart - start), y1, curWidth, avCharHeight); -}this.graphics.setColor (this.resBoxColour); -curStart = i; -curWidth = avCharWidth; -tempColour = this.resBoxColour; -} else { -curWidth += avCharWidth; -}i++; -} -this.graphics.fillRect (avCharWidth * (curStart - start), y1, curWidth, avCharHeight); -}, "jalview.datamodel.SequenceI,~N,~N,~N"); -Clazz.defineMethod (c$, "drawText", -function (seq, start, end, y1) { -var avCharWidth = this.av.getCharWidth (); -var avCharHeight = this.av.getCharHeight (); -var boldFont = null; -var bold = false; -if (this.av.isUpperCasebold ()) { -boldFont = new java.awt.Font (this.av.getFont ().getName (), 1, avCharHeight); -this.graphics.setFont (this.av.getFont ()); -}y1 += avCharHeight - Clazz.doubleToInt (avCharHeight / 5); -var charOffset = 0; -if (end + 1 >= seq.getLength ()) { -end = seq.getLength () - 1; -}var s = ' '; -var srep = this.av.isDisplayReferenceSeq (); -for (var i = start; i <= end; i++) { -this.graphics.setColor (java.awt.Color.black); -s = seq.getCharAt (i); -if (!this.renderGaps && jalview.util.Comparison.isGap (s)) { -continue; -}if (this.inCurrentSequenceGroup (i)) { -if (!this.currentSequenceGroup.getDisplayText ()) { -continue; -}if (this.currentSequenceGroup.getColourText ()) { -this.getBoxColour (this.currentSequenceGroup.cs, seq, i); -this.graphics.setColor (this.resBoxColour.darker ()); -}if (this.currentSequenceGroup.getShowNonconserved ()) { -s = this.getDisplayChar (srep, i, s, '.'); -}} else { -if (!this.av.getShowText ()) { -continue; -}if (this.av.getColourText ()) { -this.getBoxColour (this.av.getGlobalColourScheme (), seq, i); -if (this.av.getShowBoxes ()) { -this.graphics.setColor (this.resBoxColour.darker ()); -} else { -this.graphics.setColor (this.resBoxColour); -}}if (this.av.getShowUnconserved ()) { -s = this.getDisplayChar (srep, i, s, '.'); -}}if (this.av.isUpperCasebold ()) { -this.fm = this.graphics.getFontMetrics (); -if ('A' <= s && s <= 'Z') { -if (!bold) { -this.graphics.setFont (boldFont); -}bold = true; -} else if (bold) { -this.graphics.setFont (this.av.font); -bold = false; -}}charOffset = Clazz.doubleToInt ((avCharWidth - this.fm.charWidth (s)) / 2); -this.graphics.drawString (String.valueOf (s), charOffset + avCharWidth * (i - start), y1); -} -}, "jalview.datamodel.SequenceI,~N,~N,~N"); -Clazz.defineMethod (c$, "getDisplayChar", -($fz = function (usesrep, position, s, c) { -var conschar = (usesrep) ? this.av.getAlignment ().getSeqrep ().getCharAt (position) : this.av.getAlignmentConsensusAnnotation ().annotations[position].displayCharacter.charAt (0); -if (conschar != '-' && s == conschar) { -s = c; -}return s; -}, $fz.isPrivate = true, $fz), "~B,~N,~S,~S"); -Clazz.defineMethod (c$, "inCurrentSequenceGroup", -function (res) { -if (this.allGroups == null) { -return false; -}for (var i = 0; i < this.allGroups.length; i++) { -if (this.allGroups[i].getStartRes () <= res && this.allGroups[i].getEndRes () >= res) { -this.currentSequenceGroup = this.allGroups[i]; -return true; -}} -return false; -}, "~N"); -Clazz.defineMethod (c$, "drawHighlightedText", -function (seq, start, end, x1, y1) { -var avCharWidth = this.av.getCharWidth (); -var avCharHeight = this.av.getCharHeight (); -var pady = Clazz.doubleToInt (avCharHeight / 5); -var charOffset = 0; -this.graphics.setColor (java.awt.Color.black); -this.graphics.fillRect (x1, y1, avCharWidth * (end - start + 1), avCharHeight); -this.graphics.setColor (java.awt.Color.white); -var s = '~'; -if (this.av.validCharWidth) { -for (var i = start; i <= end; i++) { -if (i < seq.getLength ()) { -s = seq.getCharAt (i); -}charOffset = Clazz.doubleToInt ((avCharWidth - this.fm.charWidth (s)) / 2); -this.graphics.drawString (String.valueOf (s), charOffset + x1 + avCharWidth * (i - start), y1 + avCharHeight - pady); -} -}}, "jalview.datamodel.SequenceI,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "drawCursor", -function (seq, res, x1, y1) { -var pady = Clazz.doubleToInt (this.av.getCharHeight () / 5); -var charOffset = 0; -this.graphics.setColor (java.awt.Color.black); -this.graphics.fillRect (x1, y1, this.av.getCharWidth (), this.av.getCharHeight ()); -this.graphics.setColor (java.awt.Color.white); -this.graphics.setColor (java.awt.Color.white); -var s = seq.getCharAt (res); -if (this.av.validCharWidth) { -charOffset = Clazz.doubleToInt ((this.av.getCharWidth () - this.fm.charWidth (s)) / 2); -this.graphics.drawString (String.valueOf (s), charOffset + x1, (y1 + this.av.getCharHeight ()) - pady); -}}, "jalview.datamodel.SequenceI,~N,~N,~N"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.api.SequenceRenderer"], "jalview.appletgui.SequenceRenderer", ["jalview.util.Comparison", "java.awt.Color", "$.Font"], function () { +c$ = Clazz.decorateAsClass (function () { +this.av = null; +this.fm = null; +this.renderGaps = true; +this.currentSequenceGroup = null; +this.allGroups = null; +this.resBoxColour = null; +this.graphics = null; +this.forOverview = false; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "SequenceRenderer", null, jalview.api.SequenceRenderer); +Clazz.makeConstructor (c$, +function (av) { +this.av = av; +}, "jalview.appletgui.AlignViewport"); +Clazz.defineMethod (c$, "prepare", +function (g, renderGaps) { +this.graphics = g; +this.fm = g.getFontMetrics (); +this.renderGaps = renderGaps; +}, "java.awt.Graphics,~B"); +Clazz.overrideMethod (c$, "getResidueBoxColour", +function (seq, i) { +this.allGroups = this.av.getAlignment ().findAllGroups (seq); +if (this.inCurrentSequenceGroup (i)) { +if (this.currentSequenceGroup.getDisplayBoxes ()) { +this.getBoxColour (this.currentSequenceGroup.cs, seq, i); +}} else if (this.av.getShowBoxes ()) { +this.getBoxColour (this.av.getGlobalColourScheme (), seq, i); +}return this.resBoxColour; +}, "jalview.datamodel.SequenceI,~N"); +Clazz.overrideMethod (c$, "getResidueColour", +function (seq, position, fr) { +var col = this.getResidueBoxColour (seq, position); +if (fr != null) { +col = fr.findFeatureColour (col, seq, position); +}return col; +}, "jalview.datamodel.SequenceI,~N,jalview.api.FeatureRenderer"); +Clazz.defineMethod (c$, "getBoxColour", +function (cs, seq, i) { +if (cs != null) { +this.resBoxColour = cs.findColour (seq.getCharAt (i), i, seq); +} else if (this.forOverview && !jalview.util.Comparison.isGap (seq.getCharAt (i))) { +this.resBoxColour = java.awt.Color.lightGray; +} else { +this.resBoxColour = java.awt.Color.white; +}}, "jalview.schemes.ColourSchemeI,jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "findSequenceColour", +function (seq, i) { +this.allGroups = this.av.getAlignment ().findAllGroups (seq); +this.drawBoxes (seq, i, i, 0); +return this.resBoxColour; +}, "jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "drawSequence", +function (seq, sg, start, end, y1) { +if (seq == null) { +return; +}this.allGroups = sg; +this.drawBoxes (seq, start, end, y1); +if (this.av.validCharWidth) { +this.drawText (seq, start, end, y1); +}}, "jalview.datamodel.SequenceI,~A,~N,~N,~N"); +Clazz.defineMethod (c$, "drawBoxes", +function (seq, start, end, y1) { +var i = start; +var length = seq.getLength (); +var curStart = -1; +var curWidth = this.av.getCharWidth (); +var avCharWidth = this.av.getCharWidth (); +var avCharHeight = this.av.getCharHeight (); +var tempColour = null; +while (i <= end) { +this.resBoxColour = java.awt.Color.white; +if (i < length) { +if (this.inCurrentSequenceGroup (i)) { +if (this.currentSequenceGroup.getDisplayBoxes ()) { +this.getBoxColour (this.currentSequenceGroup.cs, seq, i); +}} else if (this.av.getShowBoxes ()) { +this.getBoxColour (this.av.getGlobalColourScheme (), seq, i); +}}if (this.resBoxColour !== tempColour) { +if (tempColour != null) { +this.graphics.fillRect (avCharWidth * (curStart - start), y1, curWidth, avCharHeight); +}this.graphics.setColor (this.resBoxColour); +curStart = i; +curWidth = avCharWidth; +tempColour = this.resBoxColour; +} else { +curWidth += avCharWidth; +}i++; +} +this.graphics.fillRect (avCharWidth * (curStart - start), y1, curWidth, avCharHeight); +}, "jalview.datamodel.SequenceI,~N,~N,~N"); +Clazz.defineMethod (c$, "drawText", +function (seq, start, end, y1) { +var avCharWidth = this.av.getCharWidth (); +var avCharHeight = this.av.getCharHeight (); +var boldFont = null; +var bold = false; +if (this.av.isUpperCasebold ()) { +boldFont = new java.awt.Font (this.av.getFont ().getName (), 1, avCharHeight); +this.graphics.setFont (this.av.getFont ()); +}y1 += avCharHeight - Clazz.doubleToInt (avCharHeight / 5); +var charOffset = 0; +if (end + 1 >= seq.getLength ()) { +end = seq.getLength () - 1; +}var s = ' '; +var srep = this.av.isDisplayReferenceSeq (); +for (var i = start; i <= end; i++) { +this.graphics.setColor (java.awt.Color.black); +s = seq.getCharAt (i); +if (!this.renderGaps && jalview.util.Comparison.isGap (s)) { +continue; +}if (this.inCurrentSequenceGroup (i)) { +if (!this.currentSequenceGroup.getDisplayText ()) { +continue; +}if (this.currentSequenceGroup.getColourText ()) { +this.getBoxColour (this.currentSequenceGroup.cs, seq, i); +this.graphics.setColor (this.resBoxColour.darker ()); +}if (this.currentSequenceGroup.getShowNonconserved ()) { +s = this.getDisplayChar (srep, i, s, '.'); +}} else { +if (!this.av.getShowText ()) { +continue; +}if (this.av.getColourText ()) { +this.getBoxColour (this.av.getGlobalColourScheme (), seq, i); +if (this.av.getShowBoxes ()) { +this.graphics.setColor (this.resBoxColour.darker ()); +} else { +this.graphics.setColor (this.resBoxColour); +}}if (this.av.getShowUnconserved ()) { +s = this.getDisplayChar (srep, i, s, '.'); +}}if (this.av.isUpperCasebold ()) { +this.fm = this.graphics.getFontMetrics (); +if ('A' <= s && s <= 'Z') { +if (!bold) { +this.graphics.setFont (boldFont); +}bold = true; +} else if (bold) { +this.graphics.setFont (this.av.font); +bold = false; +}}charOffset = Clazz.doubleToInt ((avCharWidth - this.fm.charWidth (s)) / 2); +this.graphics.drawString (String.valueOf (s), charOffset + avCharWidth * (i - start), y1); +} +}, "jalview.datamodel.SequenceI,~N,~N,~N"); +Clazz.defineMethod (c$, "getDisplayChar", +($fz = function (usesrep, position, s, c) { +var conschar = (usesrep) ? this.av.getAlignment ().getSeqrep ().getCharAt (position) : this.av.getAlignmentConsensusAnnotation ().annotations[position].displayCharacter.charAt (0); +if (conschar != '-' && s == conschar) { +s = c; +}return s; +}, $fz.isPrivate = true, $fz), "~B,~N,~S,~S"); +Clazz.defineMethod (c$, "inCurrentSequenceGroup", +function (res) { +if (this.allGroups == null) { +return false; +}for (var i = 0; i < this.allGroups.length; i++) { +if (this.allGroups[i].getStartRes () <= res && this.allGroups[i].getEndRes () >= res) { +this.currentSequenceGroup = this.allGroups[i]; +return true; +}} +return false; +}, "~N"); +Clazz.defineMethod (c$, "drawHighlightedText", +function (seq, start, end, x1, y1) { +var avCharWidth = this.av.getCharWidth (); +var avCharHeight = this.av.getCharHeight (); +var pady = Clazz.doubleToInt (avCharHeight / 5); +var charOffset = 0; +this.graphics.setColor (java.awt.Color.black); +this.graphics.fillRect (x1, y1, avCharWidth * (end - start + 1), avCharHeight); +this.graphics.setColor (java.awt.Color.white); +var s = '~'; +if (this.av.validCharWidth) { +for (var i = start; i <= end; i++) { +if (i < seq.getLength ()) { +s = seq.getCharAt (i); +}charOffset = Clazz.doubleToInt ((avCharWidth - this.fm.charWidth (s)) / 2); +this.graphics.drawString (String.valueOf (s), charOffset + x1 + avCharWidth * (i - start), y1 + avCharHeight - pady); +} +}}, "jalview.datamodel.SequenceI,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "drawCursor", +function (seq, res, x1, y1) { +var pady = Clazz.doubleToInt (this.av.getCharHeight () / 5); +var charOffset = 0; +this.graphics.setColor (java.awt.Color.black); +this.graphics.fillRect (x1, y1, this.av.getCharWidth (), this.av.getCharHeight ()); +this.graphics.setColor (java.awt.Color.white); +this.graphics.setColor (java.awt.Color.white); +var s = seq.getCharAt (res); +if (this.av.validCharWidth) { +charOffset = Clazz.doubleToInt ((this.av.getCharWidth () - this.fm.charWidth (s)) / 2); +this.graphics.drawString (String.valueOf (s), charOffset + x1, (y1 + this.av.getCharHeight ()) - pady); +}}, "jalview.datamodel.SequenceI,~N,~N,~N"); +}); diff --git a/bin/jalview/appletgui/SliderPanel.class b/bin/jalview/appletgui/SliderPanel.class index ae2daacb7e53248cdbacaa191d30e4005b3a4a26..58ba84cd04598e41c300aa96ba211e12727db78e 100644 GIT binary patch delta 37 tcmZql`0u{qh%}?u=A+UUjDms;>>Pg?G}syR*cs&o1bAdN3&?(C0|42a35Ngx delta 39 vcmezG-srL6h%}?m=A+UUjKabUoE(1{RM{Ey*cs)S1O#{_nKtvueq;jx>PZQU diff --git a/bin/jalview/appletgui/SliderPanel.js b/bin/jalview/appletgui/SliderPanel.js index dc38cc2..8ba7a20 100644 --- a/bin/jalview/appletgui/SliderPanel.js +++ b/bin/jalview/appletgui/SliderPanel.js @@ -1,270 +1,270 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.MouseListener", "awt2swing.Button", "$.Checkbox", "$.Label", "$.Scrollbar", "$.TextField", "java.awt.BorderLayout", "$.FlowLayout"], "jalview.appletgui.SliderPanel", ["awt2swing.Frame", "jalview.bin.JalviewLite", "jalview.util.MessageManager", "java.awt.Color", "$.Font", "java.awt.event.WindowAdapter"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ap = null; -this.forConservation = true; -this.cs = null; -this.slider = null; -this.valueField = null; -this.label = null; -this.jPanel1 = null; -this.jPanel2 = null; -this.applyButton = null; -this.undoButton = null; -this.flowLayout1 = null; -this.allGroupsCheck = null; -this.borderLayout1 = null; -this.borderLayout2 = null; -this.flowLayout2 = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "SliderPanel", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.MouseListener]); -Clazz.prepareFields (c$, function () { -this.slider = new awt2swing.Scrollbar (); -this.valueField = new awt2swing.TextField (); -this.label = new awt2swing.Label (); -this.jPanel1 = new awt2swing.Panel (); -this.jPanel2 = new awt2swing.Panel (); -this.applyButton = new awt2swing.Button (); -this.undoButton = new awt2swing.Button (); -this.flowLayout1 = new java.awt.FlowLayout (); -this.allGroupsCheck = new awt2swing.Checkbox (); -this.borderLayout1 = new java.awt.BorderLayout (); -this.borderLayout2 = new java.awt.BorderLayout (); -this.flowLayout2 = new java.awt.FlowLayout (); -}); -c$.setConservationSlider = Clazz.defineMethod (c$, "setConservationSlider", -function (ap, cs, source) { -var sp = null; -if (jalview.appletgui.SliderPanel.conservationSlider == null) { -sp = new jalview.appletgui.SliderPanel (ap, cs.getConservationInc (), true, cs); -jalview.appletgui.SliderPanel.conservationSlider = new awt2swing.Frame (); -jalview.appletgui.SliderPanel.conservationSlider.add (sp); -} else { -sp = jalview.appletgui.SliderPanel.conservationSlider.getComponent (0); -sp.cs = cs; -}jalview.appletgui.SliderPanel.conservationSlider.setTitle (jalview.util.MessageManager.formatMessage ("label.conservation_colour_increment", Clazz.newArray (-1, [source]))); -if (ap.av.getAlignment ().getGroups () != null) { -sp.setAllGroupsCheckEnabled (true); -} else { -sp.setAllGroupsCheckEnabled (false); -}return sp.getValue (); -}, "jalview.appletgui.AlignmentPanel,jalview.schemes.ColourSchemeI,~S"); -c$.showConservationSlider = Clazz.defineMethod (c$, "showConservationSlider", -function () { -try { -jalview.appletgui.SliderPanel.PIDSlider.setVisible (false); -jalview.appletgui.SliderPanel.PIDSlider = null; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -if (!jalview.appletgui.SliderPanel.conservationSlider.isVisible ()) { -jalview.bin.JalviewLite.addFrame (jalview.appletgui.SliderPanel.conservationSlider, jalview.appletgui.SliderPanel.conservationSlider.getTitle (), 420, 100); -jalview.appletgui.SliderPanel.conservationSlider.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.SliderPanel$1") ? 0 : jalview.appletgui.SliderPanel.$SliderPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.SliderPanel$1, this, null))); -}}); -c$.setPIDSliderSource = Clazz.defineMethod (c$, "setPIDSliderSource", -function (ap, cs, source) { -var pid = null; -if (jalview.appletgui.SliderPanel.PIDSlider == null) { -pid = new jalview.appletgui.SliderPanel (ap, 50, false, cs); -jalview.appletgui.SliderPanel.PIDSlider = new awt2swing.Frame (); -jalview.appletgui.SliderPanel.PIDSlider.add (pid); -} else { -pid = jalview.appletgui.SliderPanel.PIDSlider.getComponent (0); -pid.cs = cs; -}jalview.appletgui.SliderPanel.PIDSlider.setTitle (jalview.util.MessageManager.formatMessage ("label.percentage_identity_thereshold", Clazz.newArray (-1, [source]))); -if (ap.av.getAlignment ().getGroups () != null) { -pid.setAllGroupsCheckEnabled (true); -} else { -pid.setAllGroupsCheckEnabled (false); -}return pid.getValue (); -}, "jalview.appletgui.AlignmentPanel,jalview.schemes.ColourSchemeI,~S"); -c$.showPIDSlider = Clazz.defineMethod (c$, "showPIDSlider", -function () { -try { -jalview.appletgui.SliderPanel.conservationSlider.setVisible (false); -jalview.appletgui.SliderPanel.conservationSlider = null; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -if (!jalview.appletgui.SliderPanel.PIDSlider.isVisible ()) { -jalview.bin.JalviewLite.addFrame (jalview.appletgui.SliderPanel.PIDSlider, jalview.appletgui.SliderPanel.PIDSlider.getTitle (), 420, 100); -jalview.appletgui.SliderPanel.PIDSlider.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.SliderPanel$2") ? 0 : jalview.appletgui.SliderPanel.$SliderPanel$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.SliderPanel$2, this, null))); -}}); -Clazz.makeConstructor (c$, -function (ap, value, forConserve, cs) { -Clazz.superConstructor (this, jalview.appletgui.SliderPanel, []); -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -this.ap = ap; -this.cs = cs; -this.forConservation = forConserve; -this.undoButton.setVisible (false); -this.applyButton.setVisible (false); -if (this.forConservation) { -this.label.setText (jalview.util.MessageManager.getString ("label.modify_conservation_visibility")); -this.slider.setMinimum (0); -this.slider.setMaximum (50 + this.slider.getVisibleAmount ()); -this.slider.setUnitIncrement (1); -} else { -this.label.setText (jalview.util.MessageManager.getString ("label.colour_residues_above_occurence")); -this.slider.setMinimum (0); -this.slider.setMaximum (100 + this.slider.getVisibleAmount ()); -this.slider.setBlockIncrement (1); -}this.slider.addAdjustmentListener (this); -this.slider.addMouseListener (this); -this.slider.setValue (value); -this.valueField.setText (value + ""); -}, "jalview.appletgui.AlignmentPanel,~N,~B,jalview.schemes.ColourSchemeI"); -Clazz.defineMethod (c$, "valueChanged", -function (i) { -if (this.cs == null) { -return; -}var toChange = this.cs; -var allGroups = null; -if (this.allGroupsCheck.getState ()) { -allGroups = this.ap.av.getAlignment ().getGroups ().listIterator (); -}while (toChange != null) { -if (this.forConservation) { -toChange.setConservationInc (i); -} else { -toChange.setThreshold (i, this.ap.av.isIgnoreGapsConsensus ()); -}if (allGroups != null && allGroups.hasNext ()) { -while ((toChange = allGroups.next ().cs) == null && allGroups.hasNext ()) { -;} -} else { -toChange = null; -}} -this.ap.seqPanel.seqCanvas.repaint (); -}, "~N"); -Clazz.defineMethod (c$, "setAllGroupsCheckEnabled", -function (b) { -this.allGroupsCheck.setEnabled (b); -}, "~B"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -if (evt.getSource () === this.applyButton) { -this.applyButton_actionPerformed (); -} else if (evt.getSource () === this.undoButton) { -this.undoButton_actionPerformed (); -} else if (evt.getSource () === this.valueField) { -this.valueField_actionPerformed (); -}}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -this.valueField.setText (this.slider.getValue () + ""); -this.valueChanged (this.slider.getValue ()); -}, "java.awt.event.AdjustmentEvent"); -Clazz.defineMethod (c$, "valueField_actionPerformed", -function () { -try { -var i = Integer.parseInt (this.valueField.getText ()); -this.slider.setValue (i); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -this.valueField.setText (this.slider.getValue () + ""); -} else { -throw ex; -} -} -}); -Clazz.defineMethod (c$, "setValue", -function (value) { -this.slider.setValue (value); -}, "~N"); -Clazz.defineMethod (c$, "getValue", -function () { -return Integer.parseInt (this.valueField.getText ()); -}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.setLayout (this.borderLayout2); -this.slider.setBackground (java.awt.Color.white); -this.slider.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.slider.setOrientation (0); -this.valueField.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.valueField.setText (" "); -this.valueField.addActionListener (this); -this.valueField.setColumns (3); -this.label.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.label.setText (jalview.util.MessageManager.getString ("label.set_this_label_text")); -this.jPanel1.setLayout (this.borderLayout1); -this.jPanel2.setLayout (this.flowLayout1); -this.applyButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.applyButton.setLabel (jalview.util.MessageManager.getString ("action.apply")); -this.applyButton.addActionListener (this); -this.undoButton.setEnabled (false); -this.undoButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.undoButton.setLabel (jalview.util.MessageManager.getString ("action.undo")); -this.undoButton.addActionListener (this); -this.allGroupsCheck.setEnabled (false); -this.allGroupsCheck.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.allGroupsCheck.setLabel (jalview.util.MessageManager.getString ("action.apply_threshold_all_groups")); -this.allGroupsCheck.setName (jalview.util.MessageManager.getString ("action.apply_all_groups")); -this.setBackground (java.awt.Color.white); -this.setForeground (java.awt.Color.black); -this.jPanel2.add (this.label, null); -this.jPanel2.add (this.applyButton, null); -this.jPanel2.add (this.undoButton, null); -this.jPanel2.add (this.allGroupsCheck); -this.jPanel1.add (this.valueField, "East"); -this.jPanel1.add (this.slider, "Center"); -this.add (this.jPanel1, "South"); -this.add (this.jPanel2, "Center"); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "applyButton_actionPerformed", -function () { -}); -Clazz.defineMethod (c$, "undoButton_actionPerformed", -function () { -}); -Clazz.overrideMethod (c$, "mousePressed", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseReleased", -function (evt) { -this.ap.paintAlignment (true); -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (evt) { -}, "java.awt.event.MouseEvent"); -c$.$SliderPanel$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "SliderPanel$1", java.awt.event.WindowAdapter); -Clazz.overrideMethod (c$, "windowClosing", -function (e) { -jalview.appletgui.SliderPanel.conservationSlider = null; -}, "java.awt.event.WindowEvent"); -c$ = Clazz.p0p (); -}; -c$.$SliderPanel$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "SliderPanel$2", java.awt.event.WindowAdapter); -Clazz.overrideMethod (c$, "windowClosing", -function (e) { -jalview.appletgui.SliderPanel.PIDSlider = null; -}, "java.awt.event.WindowEvent"); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"conservationSlider", null, -"PIDSlider", null); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.MouseListener", "awt2swing.Button", "$.Checkbox", "$.Label", "$.Scrollbar", "$.TextField", "java.awt.BorderLayout", "$.FlowLayout"], "jalview.appletgui.SliderPanel", ["awt2swing.Frame", "jalview.bin.JalviewLite", "jalview.util.MessageManager", "java.awt.Color", "$.Font", "java.awt.event.WindowAdapter"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ap = null; +this.forConservation = true; +this.cs = null; +this.slider = null; +this.valueField = null; +this.label = null; +this.jPanel1 = null; +this.jPanel2 = null; +this.applyButton = null; +this.undoButton = null; +this.flowLayout1 = null; +this.allGroupsCheck = null; +this.borderLayout1 = null; +this.borderLayout2 = null; +this.flowLayout2 = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "SliderPanel", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.MouseListener]); +Clazz.prepareFields (c$, function () { +this.slider = new awt2swing.Scrollbar (); +this.valueField = new awt2swing.TextField (); +this.label = new awt2swing.Label (); +this.jPanel1 = new awt2swing.Panel (); +this.jPanel2 = new awt2swing.Panel (); +this.applyButton = new awt2swing.Button (); +this.undoButton = new awt2swing.Button (); +this.flowLayout1 = new java.awt.FlowLayout (); +this.allGroupsCheck = new awt2swing.Checkbox (); +this.borderLayout1 = new java.awt.BorderLayout (); +this.borderLayout2 = new java.awt.BorderLayout (); +this.flowLayout2 = new java.awt.FlowLayout (); +}); +c$.setConservationSlider = Clazz.defineMethod (c$, "setConservationSlider", +function (ap, cs, source) { +var sp = null; +if (jalview.appletgui.SliderPanel.conservationSlider == null) { +sp = new jalview.appletgui.SliderPanel (ap, cs.getConservationInc (), true, cs); +jalview.appletgui.SliderPanel.conservationSlider = new awt2swing.Frame (); +jalview.appletgui.SliderPanel.conservationSlider.add (sp); +} else { +sp = jalview.appletgui.SliderPanel.conservationSlider.getComponent (0); +sp.cs = cs; +}jalview.appletgui.SliderPanel.conservationSlider.setTitle (jalview.util.MessageManager.formatMessage ("label.conservation_colour_increment", Clazz.newArray (-1, [source]))); +if (ap.av.getAlignment ().getGroups () != null) { +sp.setAllGroupsCheckEnabled (true); +} else { +sp.setAllGroupsCheckEnabled (false); +}return sp.getValue (); +}, "jalview.appletgui.AlignmentPanel,jalview.schemes.ColourSchemeI,~S"); +c$.showConservationSlider = Clazz.defineMethod (c$, "showConservationSlider", +function () { +try { +jalview.appletgui.SliderPanel.PIDSlider.setVisible (false); +jalview.appletgui.SliderPanel.PIDSlider = null; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +if (!jalview.appletgui.SliderPanel.conservationSlider.isVisible ()) { +jalview.bin.JalviewLite.addFrame (jalview.appletgui.SliderPanel.conservationSlider, jalview.appletgui.SliderPanel.conservationSlider.getTitle (), 420, 100); +jalview.appletgui.SliderPanel.conservationSlider.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.SliderPanel$1") ? 0 : jalview.appletgui.SliderPanel.$SliderPanel$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.SliderPanel$1, this, null))); +}}); +c$.setPIDSliderSource = Clazz.defineMethod (c$, "setPIDSliderSource", +function (ap, cs, source) { +var pid = null; +if (jalview.appletgui.SliderPanel.PIDSlider == null) { +pid = new jalview.appletgui.SliderPanel (ap, 50, false, cs); +jalview.appletgui.SliderPanel.PIDSlider = new awt2swing.Frame (); +jalview.appletgui.SliderPanel.PIDSlider.add (pid); +} else { +pid = jalview.appletgui.SliderPanel.PIDSlider.getComponent (0); +pid.cs = cs; +}jalview.appletgui.SliderPanel.PIDSlider.setTitle (jalview.util.MessageManager.formatMessage ("label.percentage_identity_thereshold", Clazz.newArray (-1, [source]))); +if (ap.av.getAlignment ().getGroups () != null) { +pid.setAllGroupsCheckEnabled (true); +} else { +pid.setAllGroupsCheckEnabled (false); +}return pid.getValue (); +}, "jalview.appletgui.AlignmentPanel,jalview.schemes.ColourSchemeI,~S"); +c$.showPIDSlider = Clazz.defineMethod (c$, "showPIDSlider", +function () { +try { +jalview.appletgui.SliderPanel.conservationSlider.setVisible (false); +jalview.appletgui.SliderPanel.conservationSlider = null; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +if (!jalview.appletgui.SliderPanel.PIDSlider.isVisible ()) { +jalview.bin.JalviewLite.addFrame (jalview.appletgui.SliderPanel.PIDSlider, jalview.appletgui.SliderPanel.PIDSlider.getTitle (), 420, 100); +jalview.appletgui.SliderPanel.PIDSlider.addWindowListener (((Clazz.isClassDefined ("jalview.appletgui.SliderPanel$2") ? 0 : jalview.appletgui.SliderPanel.$SliderPanel$2$ ()), Clazz.innerTypeInstance (jalview.appletgui.SliderPanel$2, this, null))); +}}); +Clazz.makeConstructor (c$, +function (ap, value, forConserve, cs) { +Clazz.superConstructor (this, jalview.appletgui.SliderPanel, []); +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.ap = ap; +this.cs = cs; +this.forConservation = forConserve; +this.undoButton.setVisible (false); +this.applyButton.setVisible (false); +if (this.forConservation) { +this.label.setText (jalview.util.MessageManager.getString ("label.modify_conservation_visibility")); +this.slider.setMinimum (0); +this.slider.setMaximum (50 + this.slider.getVisibleAmount ()); +this.slider.setUnitIncrement (1); +} else { +this.label.setText (jalview.util.MessageManager.getString ("label.colour_residues_above_occurence")); +this.slider.setMinimum (0); +this.slider.setMaximum (100 + this.slider.getVisibleAmount ()); +this.slider.setBlockIncrement (1); +}this.slider.addAdjustmentListener (this); +this.slider.addMouseListener (this); +this.slider.setValue (value); +this.valueField.setText (value + ""); +}, "jalview.appletgui.AlignmentPanel,~N,~B,jalview.schemes.ColourSchemeI"); +Clazz.defineMethod (c$, "valueChanged", +function (i) { +if (this.cs == null) { +return; +}var toChange = this.cs; +var allGroups = null; +if (this.allGroupsCheck.getState ()) { +allGroups = this.ap.av.getAlignment ().getGroups ().listIterator (); +}while (toChange != null) { +if (this.forConservation) { +toChange.setConservationInc (i); +} else { +toChange.setThreshold (i, this.ap.av.isIgnoreGapsConsensus ()); +}if (allGroups != null && allGroups.hasNext ()) { +while ((toChange = allGroups.next ().cs) == null && allGroups.hasNext ()) { +;} +} else { +toChange = null; +}} +this.ap.seqPanel.seqCanvas.repaint (); +}, "~N"); +Clazz.defineMethod (c$, "setAllGroupsCheckEnabled", +function (b) { +this.allGroupsCheck.setEnabled (b); +}, "~B"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.applyButton) { +this.applyButton_actionPerformed (); +} else if (evt.getSource () === this.undoButton) { +this.undoButton_actionPerformed (); +} else if (evt.getSource () === this.valueField) { +this.valueField_actionPerformed (); +}}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +this.valueField.setText (this.slider.getValue () + ""); +this.valueChanged (this.slider.getValue ()); +}, "java.awt.event.AdjustmentEvent"); +Clazz.defineMethod (c$, "valueField_actionPerformed", +function () { +try { +var i = Integer.parseInt (this.valueField.getText ()); +this.slider.setValue (i); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +this.valueField.setText (this.slider.getValue () + ""); +} else { +throw ex; +} +} +}); +Clazz.defineMethod (c$, "setValue", +function (value) { +this.slider.setValue (value); +}, "~N"); +Clazz.defineMethod (c$, "getValue", +function () { +return Integer.parseInt (this.valueField.getText ()); +}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setLayout (this.borderLayout2); +this.slider.setBackground (java.awt.Color.white); +this.slider.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.slider.setOrientation (0); +this.valueField.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.valueField.setText (" "); +this.valueField.addActionListener (this); +this.valueField.setColumns (3); +this.label.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.label.setText (jalview.util.MessageManager.getString ("label.set_this_label_text")); +this.jPanel1.setLayout (this.borderLayout1); +this.jPanel2.setLayout (this.flowLayout1); +this.applyButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.applyButton.setLabel (jalview.util.MessageManager.getString ("action.apply")); +this.applyButton.addActionListener (this); +this.undoButton.setEnabled (false); +this.undoButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.undoButton.setLabel (jalview.util.MessageManager.getString ("action.undo")); +this.undoButton.addActionListener (this); +this.allGroupsCheck.setEnabled (false); +this.allGroupsCheck.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.allGroupsCheck.setLabel (jalview.util.MessageManager.getString ("action.apply_threshold_all_groups")); +this.allGroupsCheck.setName (jalview.util.MessageManager.getString ("action.apply_all_groups")); +this.setBackground (java.awt.Color.white); +this.setForeground (java.awt.Color.black); +this.jPanel2.add (this.label, null); +this.jPanel2.add (this.applyButton, null); +this.jPanel2.add (this.undoButton, null); +this.jPanel2.add (this.allGroupsCheck); +this.jPanel1.add (this.valueField, "East"); +this.jPanel1.add (this.slider, "Center"); +this.add (this.jPanel1, "South"); +this.add (this.jPanel2, "Center"); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "applyButton_actionPerformed", +function () { +}); +Clazz.defineMethod (c$, "undoButton_actionPerformed", +function () { +}); +Clazz.overrideMethod (c$, "mousePressed", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseReleased", +function (evt) { +this.ap.paintAlignment (true); +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (evt) { +}, "java.awt.event.MouseEvent"); +c$.$SliderPanel$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "SliderPanel$1", java.awt.event.WindowAdapter); +Clazz.overrideMethod (c$, "windowClosing", +function (e) { +jalview.appletgui.SliderPanel.conservationSlider = null; +}, "java.awt.event.WindowEvent"); +c$ = Clazz.p0p (); +}; +c$.$SliderPanel$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "SliderPanel$2", java.awt.event.WindowAdapter); +Clazz.overrideMethod (c$, "windowClosing", +function (e) { +jalview.appletgui.SliderPanel.PIDSlider = null; +}, "java.awt.event.WindowEvent"); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"conservationSlider", null, +"PIDSlider", null); +}); diff --git a/bin/jalview/appletgui/SplitFrame.js b/bin/jalview/appletgui/SplitFrame.js index 7818eaf..eb3570a 100644 --- a/bin/jalview/appletgui/SplitFrame.js +++ b/bin/jalview/appletgui/SplitFrame.js @@ -1,108 +1,108 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["jalview.appletgui.EmbmenuFrame"], "jalview.appletgui.SplitFrame", ["awt2swing.Panel", "jalview.analysis.AlignmentUtils", "jalview.bin.JalviewLite", "jalview.structure.StructureSelectionManager", "java.awt.BorderLayout", "$.Dimension", "$.GridLayout"], function () { -c$ = Clazz.decorateAsClass (function () { -this.topFrame = null; -this.bottomFrame = null; -this.outermost = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "SplitFrame", jalview.appletgui.EmbmenuFrame); -Clazz.makeConstructor (c$, -function (af1, af2) { -Clazz.superConstructor (this, jalview.appletgui.SplitFrame, []); -this.topFrame = af1; -this.bottomFrame = af2; -this.init (); -}, "jalview.appletgui.AlignFrame,jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "init", -function () { -var $private = Clazz.checkPrivateMethod (arguments); -if ($private != null) { -return $private.apply (this, arguments); -} -this.constructSplit (); -var topViewport = this.topFrame.viewport; -var bottomViewport = this.bottomFrame.viewport; -var topAlignment = topViewport.getAlignment (); -var bottomAlignment = bottomViewport.getAlignment (); -var cdna = topAlignment.isNucleotide () ? topViewport : (bottomAlignment.isNucleotide () ? bottomViewport : null); -var protein = !topAlignment.isNucleotide () ? topViewport : (!bottomAlignment.isNucleotide () ? bottomViewport : null); -var mapped = jalview.analysis.AlignmentUtils.mapProteinToCdna (protein.getAlignment (), cdna.getAlignment ()); -if (mapped) { -var ssm = jalview.structure.StructureSelectionManager.getStructureSelectionManager (topViewport.applet); -ssm.addMappings (protein.getAlignment ().getCodonFrames ()); -topViewport.setCodingComplement (bottomViewport); -ssm.addCommandListener (cdna); -ssm.addCommandListener (protein); -}protein.initComplementConsensus (); -var ap = topAlignment.isNucleotide () ? this.bottomFrame.alignPanel : this.topFrame.alignPanel; -protein.updateConsensus (ap); -this.adjustLayout (); -}); -Clazz.defineMethod (c$, "constructSplit", -function () { -this.unsetMenuBar (); -this.outermost = new awt2swing.Panel ( new java.awt.GridLayout (2, 1)); -var topPanel = new awt2swing.Panel (); -var bottomPanel = new awt2swing.Panel (); -this.outermost.add (topPanel); -this.outermost.add (bottomPanel); -this.addAlignFrameComponents (this.topFrame, topPanel); -this.addAlignFrameComponents (this.bottomFrame, bottomPanel); -}); -Clazz.defineMethod (c$, "adjustLayout", -function () { -var cdna = this.topFrame.getAlignViewport ().getAlignment ().isNucleotide () ? this.topFrame.viewport : this.bottomFrame.viewport; -var protein = cdna === this.topFrame.viewport ? this.bottomFrame.viewport : this.topFrame.viewport; -var w1 = this.topFrame.alignPanel.idPanel.idCanvas.getWidth (); -var w2 = this.bottomFrame.alignPanel.idPanel.idCanvas.getWidth (); -var w3 = Math.max (w1, w2); -if (w1 != w3) { -var d = this.topFrame.alignPanel.idPanel.idCanvas.getSize (); -this.topFrame.alignPanel.idPanel.idCanvas.setSize ( new java.awt.Dimension (w3, d.height)); -}if (w2 != w3) { -var d = this.bottomFrame.alignPanel.idPanel.idCanvas.getSize (); -this.bottomFrame.alignPanel.idPanel.idCanvas.setSize ( new java.awt.Dimension (w3, d.height)); -}if (protein != null && cdna != null) { -var vs = protein.getViewStyle (); -var scale = vs.isScaleProteinAsCdna () ? 3 : 1; -vs.setCharWidth (scale * cdna.getViewStyle ().getCharWidth ()); -protein.setViewStyle (vs); -}}); -Clazz.defineMethod (c$, "addAlignFrameComponents", -($fz = function (af, panel) { -panel.setLayout ( new java.awt.BorderLayout ()); -var menuPanel = af.makeEmbeddedPopupMenu (af.getJMenuBar (), true, false); -panel.add (menuPanel, "North"); -panel.add (af.statusBar, "South"); -panel.add (af.alignPanel, "Center"); -af.setSplitFrame (this); -}, $fz.isPrivate = true, $fz), "jalview.appletgui.AlignFrame,awt2swing.Panel"); -Clazz.defineMethod (c$, "addToDisplay", -function (embedded, applet) { -this.createSplitFrameWindow (embedded, applet); -this.validate (); -this.topFrame.alignPanel.adjustAnnotationHeight (); -this.topFrame.alignPanel.paintAlignment (true); -this.bottomFrame.alignPanel.adjustAnnotationHeight (); -this.bottomFrame.alignPanel.paintAlignment (true); -}, "~B,jalview.bin.JalviewLite"); -Clazz.defineMethod (c$, "createSplitFrameWindow", -function (embed, applet) { -if (embed) { -applet.add (this.outermost); -applet.validate (); -} else { -this.add (this.outermost); -var width = Math.max (this.topFrame.frameWidth, this.bottomFrame.frameWidth); -var height = this.topFrame.frameHeight + this.bottomFrame.frameHeight; -jalview.bin.JalviewLite.addFrame (this, this.getTitle (), width, height); -}}, "~B,jalview.bin.JalviewLite"); -Clazz.defineMethod (c$, "getComplement", -function (af) { -if (this.topFrame === af) { -return this.bottomFrame; -} else if (this.bottomFrame === af) { -return this.topFrame; -}return null; -}, "jalview.appletgui.AlignFrame"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.appletgui.EmbmenuFrame"], "jalview.appletgui.SplitFrame", ["awt2swing.Panel", "jalview.analysis.AlignmentUtils", "jalview.bin.JalviewLite", "jalview.structure.StructureSelectionManager", "java.awt.BorderLayout", "$.Dimension", "$.GridLayout"], function () { +c$ = Clazz.decorateAsClass (function () { +this.topFrame = null; +this.bottomFrame = null; +this.outermost = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "SplitFrame", jalview.appletgui.EmbmenuFrame); +Clazz.makeConstructor (c$, +function (af1, af2) { +Clazz.superConstructor (this, jalview.appletgui.SplitFrame, []); +this.topFrame = af1; +this.bottomFrame = af2; +this.init (); +}, "jalview.appletgui.AlignFrame,jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "init", +function () { +var $private = Clazz.checkPrivateMethod (arguments); +if ($private != null) { +return $private.apply (this, arguments); +} +this.constructSplit (); +var topViewport = this.topFrame.viewport; +var bottomViewport = this.bottomFrame.viewport; +var topAlignment = topViewport.getAlignment (); +var bottomAlignment = bottomViewport.getAlignment (); +var cdna = topAlignment.isNucleotide () ? topViewport : (bottomAlignment.isNucleotide () ? bottomViewport : null); +var protein = !topAlignment.isNucleotide () ? topViewport : (!bottomAlignment.isNucleotide () ? bottomViewport : null); +var mapped = jalview.analysis.AlignmentUtils.mapProteinToCdna (protein.getAlignment (), cdna.getAlignment ()); +if (mapped) { +var ssm = jalview.structure.StructureSelectionManager.getStructureSelectionManager (topViewport.applet); +ssm.addMappings (protein.getAlignment ().getCodonFrames ()); +topViewport.setCodingComplement (bottomViewport); +ssm.addCommandListener (cdna); +ssm.addCommandListener (protein); +}protein.initComplementConsensus (); +var ap = topAlignment.isNucleotide () ? this.bottomFrame.alignPanel : this.topFrame.alignPanel; +protein.updateConsensus (ap); +this.adjustLayout (); +}); +Clazz.defineMethod (c$, "constructSplit", +function () { +this.unsetMenuBar (); +this.outermost = new awt2swing.Panel ( new java.awt.GridLayout (2, 1)); +var topPanel = new awt2swing.Panel (); +var bottomPanel = new awt2swing.Panel (); +this.outermost.add (topPanel); +this.outermost.add (bottomPanel); +this.addAlignFrameComponents (this.topFrame, topPanel); +this.addAlignFrameComponents (this.bottomFrame, bottomPanel); +}); +Clazz.defineMethod (c$, "adjustLayout", +function () { +var cdna = this.topFrame.getAlignViewport ().getAlignment ().isNucleotide () ? this.topFrame.viewport : this.bottomFrame.viewport; +var protein = cdna === this.topFrame.viewport ? this.bottomFrame.viewport : this.topFrame.viewport; +var w1 = this.topFrame.alignPanel.idPanel.idCanvas.getWidth (); +var w2 = this.bottomFrame.alignPanel.idPanel.idCanvas.getWidth (); +var w3 = Math.max (w1, w2); +if (w1 != w3) { +var d = this.topFrame.alignPanel.idPanel.idCanvas.getSize (); +this.topFrame.alignPanel.idPanel.idCanvas.setSize ( new java.awt.Dimension (w3, d.height)); +}if (w2 != w3) { +var d = this.bottomFrame.alignPanel.idPanel.idCanvas.getSize (); +this.bottomFrame.alignPanel.idPanel.idCanvas.setSize ( new java.awt.Dimension (w3, d.height)); +}if (protein != null && cdna != null) { +var vs = protein.getViewStyle (); +var scale = vs.isScaleProteinAsCdna () ? 3 : 1; +vs.setCharWidth (scale * cdna.getViewStyle ().getCharWidth ()); +protein.setViewStyle (vs); +}}); +Clazz.defineMethod (c$, "addAlignFrameComponents", +($fz = function (af, panel) { +panel.setLayout ( new java.awt.BorderLayout ()); +var menuPanel = af.makeEmbeddedPopupMenu (af.getJMenuBar (), true, false); +panel.add (menuPanel, "North"); +panel.add (af.statusBar, "South"); +panel.add (af.alignPanel, "Center"); +af.setSplitFrame (this); +}, $fz.isPrivate = true, $fz), "jalview.appletgui.AlignFrame,awt2swing.Panel"); +Clazz.defineMethod (c$, "addToDisplay", +function (embedded, applet) { +this.createSplitFrameWindow (embedded, applet); +this.validate (); +this.topFrame.alignPanel.adjustAnnotationHeight (); +this.topFrame.alignPanel.paintAlignment (true); +this.bottomFrame.alignPanel.adjustAnnotationHeight (); +this.bottomFrame.alignPanel.paintAlignment (true); +}, "~B,jalview.bin.JalviewLite"); +Clazz.defineMethod (c$, "createSplitFrameWindow", +function (embed, applet) { +if (embed) { +applet.add (this.outermost); +applet.validate (); +} else { +this.add (this.outermost); +var width = Math.max (this.topFrame.frameWidth, this.bottomFrame.frameWidth); +var height = this.topFrame.frameHeight + this.bottomFrame.frameHeight; +jalview.bin.JalviewLite.addFrame (this, this.getTitle (), width, height); +}}, "~B,jalview.bin.JalviewLite"); +Clazz.defineMethod (c$, "getComplement", +function (af) { +if (this.topFrame === af) { +return this.bottomFrame; +} else if (this.bottomFrame === af) { +return this.topFrame; +}return null; +}, "jalview.appletgui.AlignFrame"); +}); diff --git a/bin/jalview/appletgui/TitledPanel.js b/bin/jalview/appletgui/TitledPanel.js index 351c3ff..026a455 100644 --- a/bin/jalview/appletgui/TitledPanel.js +++ b/bin/jalview/appletgui/TitledPanel.js @@ -1,43 +1,43 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.Insets"], "jalview.appletgui.TitledPanel", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.title = null; -this.$insets = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "TitledPanel", awt2swing.Panel); -Clazz.prepareFields (c$, function () { -this.$insets = new java.awt.Insets (10, 10, 10, 10); -}); -Clazz.makeConstructor (c$, -function () { -this.construct (""); -}); -Clazz.makeConstructor (c$, -function (title) { -Clazz.superConstructor (this, jalview.appletgui.TitledPanel, []); -this.setTitle (title); -}, "~S"); -Clazz.defineMethod (c$, "getInsets", -function () { -return this.$insets; -}); -Clazz.defineMethod (c$, "paintComponent", -function (g) { -Clazz.superCall (this, jalview.appletgui.TitledPanel, "paintComponent", [g]); -g.setColor (this.getForeground ()); -g.drawRect (5, 5, this.getWidth () - 10, this.getHeight () - 10); -var width = g.getFontMetrics ().stringWidth (this.getTitle ()); -g.setColor (this.getBackground ()); -g.fillRect (10, 0, width, 10); -g.setColor (this.getForeground ()); -g.drawString (this.getTitle (), 10, 10); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "getTitle", -function () { -return this.title; -}); -Clazz.defineMethod (c$, "setTitle", -function (title) { -this.title = title; -}, "~S"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.Insets"], "jalview.appletgui.TitledPanel", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.title = null; +this.$insets = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "TitledPanel", awt2swing.Panel); +Clazz.prepareFields (c$, function () { +this.$insets = new java.awt.Insets (10, 10, 10, 10); +}); +Clazz.makeConstructor (c$, +function () { +this.construct (""); +}); +Clazz.makeConstructor (c$, +function (title) { +Clazz.superConstructor (this, jalview.appletgui.TitledPanel, []); +this.setTitle (title); +}, "~S"); +Clazz.defineMethod (c$, "getInsets", +function () { +return this.$insets; +}); +Clazz.defineMethod (c$, "paintComponent", +function (g) { +Clazz.superCall (this, jalview.appletgui.TitledPanel, "paintComponent", [g]); +g.setColor (this.getForeground ()); +g.drawRect (5, 5, this.getWidth () - 10, this.getHeight () - 10); +var width = g.getFontMetrics ().stringWidth (this.getTitle ()); +g.setColor (this.getBackground ()); +g.fillRect (10, 0, width, 10); +g.setColor (this.getForeground ()); +g.drawString (this.getTitle (), 10, 10); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "getTitle", +function () { +return this.title; +}); +Clazz.defineMethod (c$, "setTitle", +function (title) { +this.title = title; +}, "~S"); +}); diff --git a/bin/jalview/appletgui/Tooltip.js b/bin/jalview/appletgui/Tooltip.js index cb48e62..425b8d7 100644 --- a/bin/jalview/appletgui/Tooltip.js +++ b/bin/jalview/appletgui/Tooltip.js @@ -1,67 +1,67 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (null, "jalview.appletgui.Tooltip", ["awt2swing.Frame", "java.applet.Applet", "java.awt.Toolkit"], function () { -c$ = Clazz.decorateAsClass (function () { -this.tip = null; -this.lastTip = ""; -this.setPosition = false; -this.owner = null; -this.mainContainer = null; -this.mainLayout = null; -this.shown = false; -this.VERTICAL_OFFSET = 20; -this.HORIZONTAL_ENLARGE = 10; -this.fontHeight = 0; -this.linkImage = null; -this.fm = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "Tooltip"); -Clazz.defineMethod (c$, "setVisible", -function (b) { -}, "~B"); -Clazz.makeConstructor (c$, -function (tip, owner) { -this.owner = owner; -this.setTip (tip); -var url = this.getClass ().getResource ("/images/link.gif"); -if (url != null) { -this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url); -}}, "~S,java.awt.Component"); -Clazz.defineMethod (c$, "setTip", -function (tip) { -System.err.println ("Tooltip: " + tip); -}, "~S"); -Clazz.defineMethod (c$, "setTipLocation", -function (evt) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "removeToolTip", -($fz = function () { -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "mouseEntered", -function (me) { -this.setTipLocation (me); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseExited", -function (me) { -this.removeToolTip (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mousePressed", -function (me) { -this.removeToolTip (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseReleased", -function (me) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseClicked", -function (me) { -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseMoved", -function (me) { -if (!this.shown) { -this.setTipLocation (me); -} else if (this.setPosition) { -this.setTipLocation (me); -}}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "mouseDragged", -function (me) { -}, "java.awt.event.MouseEvent"); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (null, "jalview.appletgui.Tooltip", ["awt2swing.Frame", "java.applet.Applet", "java.awt.Toolkit"], function () { +c$ = Clazz.decorateAsClass (function () { +this.tip = null; +this.lastTip = ""; +this.setPosition = false; +this.owner = null; +this.mainContainer = null; +this.mainLayout = null; +this.shown = false; +this.VERTICAL_OFFSET = 20; +this.HORIZONTAL_ENLARGE = 10; +this.fontHeight = 0; +this.linkImage = null; +this.fm = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "Tooltip"); +Clazz.defineMethod (c$, "setVisible", +function (b) { +}, "~B"); +Clazz.makeConstructor (c$, +function (tip, owner) { +this.owner = owner; +this.setTip (tip); +var url = this.getClass ().getResource ("/images/link.gif"); +if (url != null) { +this.linkImage = java.awt.Toolkit.getDefaultToolkit ().getImage (url); +}}, "~S,java.awt.Component"); +Clazz.defineMethod (c$, "setTip", +function (tip) { +System.err.println ("Tooltip: " + tip); +}, "~S"); +Clazz.defineMethod (c$, "setTipLocation", +function (evt) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "removeToolTip", +($fz = function () { +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "mouseEntered", +function (me) { +this.setTipLocation (me); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseExited", +function (me) { +this.removeToolTip (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mousePressed", +function (me) { +this.removeToolTip (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseReleased", +function (me) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseClicked", +function (me) { +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseMoved", +function (me) { +if (!this.shown) { +this.setTipLocation (me); +} else if (this.setPosition) { +this.setTipLocation (me); +}}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "mouseDragged", +function (me) { +}, "java.awt.event.MouseEvent"); +}); diff --git a/bin/jalview/appletgui/TreeCanvas.class b/bin/jalview/appletgui/TreeCanvas.class index ee9c1c158b4e224c816b31a31e01603cd948d8c1..b5cddc10b3f025c9a16732cc861f28434385ed77 100644 GIT binary patch delta 74 zcmcawd#QHAeigCV(bjetiKsDG#MBf e85q|xFfwQ}FfbgRtZlHDl@%zZxA~pHb6xOM!`>X*0KWH8bPX&Fy+UjN%*&EUdp7QkgUv h7#SHD*D^3NXfrS{9GR?Xu$PSuD5uS|`L)4wUI5LQ6{Y|H diff --git a/bin/jalview/appletgui/TreeCanvas.js b/bin/jalview/appletgui/TreeCanvas.js index da76a3e..69da9f2 100644 --- a/bin/jalview/appletgui/TreeCanvas.js +++ b/bin/jalview/appletgui/TreeCanvas.js @@ -1,375 +1,375 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.util.Hashtable"], "jalview.appletgui.TreeCanvas", ["jalview.analysis.Conservation", "jalview.appletgui.PaintRefresher", "jalview.datamodel.SequenceGroup", "$.SequenceI", "$.SequenceNode", "jalview.schemes.ColourSchemeProperty", "$.ResidueProperties", "$.UserColourScheme", "jalview.util.Format", "$.MappingUtils", "java.awt.Color", "$.Dimension", "$.Point", "$.Rectangle", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.tree = null; -this.scrollPane = null; -this.av = null; -this.$font = null; -this.fitToWindow = true; -this.showDistances = false; -this.showBootstrap = false; -this.markPlaceholders = false; -this.offx = 20; -this.offy = 0; -this.threshold = 0; -this.longestName = null; -this.labelLength = -1; -this.nameHash = null; -this.nodeHash = null; -this.highlightNode = null; -this.ap = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "TreeCanvas", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); -Clazz.prepareFields (c$, function () { -this.nameHash = new java.util.Hashtable (); -this.nodeHash = new java.util.Hashtable (); -}); -Clazz.makeConstructor (c$, -function (ap, scroller) { -Clazz.superConstructor (this, jalview.appletgui.TreeCanvas, []); -this.ap = ap; -this.av = ap.av; -this.$font = this.av.getFont (); -this.scrollPane = scroller; -this.addMouseListener (this); -this.addMouseMotionListener (this); -this.setLayout (null); -jalview.appletgui.PaintRefresher.Register (this, this.av.getSequenceSetId ()); -}, "jalview.appletgui.AlignmentPanel,awt2swing.ScrollPane"); -Clazz.defineMethod (c$, "treeSelectionChanged", -function (sequence) { -var selected = this.av.getSelectionGroup (); -if (selected == null) { -selected = new jalview.datamodel.SequenceGroup (); -this.av.setSelectionGroup (selected); -}selected.setEndRes (this.av.getAlignment ().getWidth () - 1); -selected.addOrRemove (sequence, true); -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "setTree", -function (tree) { -this.tree = tree; -tree.findHeight (tree.getTopNode ()); -var leaves = tree.findLeaves (tree.getTopNode (), new java.util.Vector ()); -var has_placeholders = false; -this.longestName = ""; -for (var i = 0; i < leaves.size (); i++) { -var lf = leaves.elementAt (i); -if (lf.isPlaceholder ()) { -has_placeholders = true; -}if (this.longestName.length < (lf.element ()).getName ().length) { -this.longestName = " * " + (lf.element ()).getName (); -}} -this.setMarkPlaceholders (has_placeholders); -}, "jalview.analysis.NJTree"); -Clazz.defineMethod (c$, "drawNode", -function (g, node, chunk, scale, width, offx, offy) { -if (node == null) { -return; -}if (node.left () == null && node.right () == null) { -var height = node.height; -var dist = node.dist; -var xstart = Clazz.floatToInt ((height - dist) * scale) + offx; -var xend = Clazz.floatToInt (height * scale) + offx; -var ypos = Clazz.floatToInt (node.ycount * chunk) + offy; -if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { -var seq = node.element (); -if (this.av.getSequenceColour (seq) === java.awt.Color.white) { -g.setColor (java.awt.Color.black); -} else { -g.setColor (this.av.getSequenceColour (seq).darker ()); -}} else { -g.setColor (java.awt.Color.black); -}g.drawLine (xstart, ypos, xend, ypos); -var nodeLabel = ""; -if (this.showDistances && node.dist > 0) { -nodeLabel = new jalview.util.Format ("%-.2f").formDouble (node.dist); -}if (this.showBootstrap) { -var btstrap = node.getBootstrap (); -if (btstrap > -1) { -if (this.showDistances) { -nodeLabel = nodeLabel + " : "; -}nodeLabel = nodeLabel + String.valueOf (node.getBootstrap ()); -}}if (!nodeLabel.equals ("")) { -g.drawString (nodeLabel, xstart + 2, ypos - 2); -}var name = (this.markPlaceholders && node.isPlaceholder ()) ? (" * " + node.getName ()) : node.getName (); -var fm = g.getFontMetrics (this.$font); -var charWidth = fm.stringWidth (name) + 3; -var charHeight = fm.getHeight (); -var rect = new java.awt.Rectangle (xend + 10, ypos - charHeight, charWidth, charHeight); -this.nameHash.put (node.element (), rect); -var selected = this.av.getSelectionGroup (); -if (selected != null && selected.getSequences (null).contains (node.element ())) { -g.setColor (java.awt.Color.gray); -g.fillRect (xend + 10, ypos - charHeight + 3, charWidth, charHeight); -g.setColor (java.awt.Color.white); -}g.drawString (name, xend + 10, ypos); -g.setColor (java.awt.Color.black); -} else { -this.drawNode (g, node.left (), chunk, scale, width, offx, offy); -this.drawNode (g, node.right (), chunk, scale, width, offx, offy); -var height = node.height; -var dist = node.dist; -var xstart = Clazz.floatToInt ((height - dist) * scale) + offx; -var xend = Clazz.floatToInt (height * scale) + offx; -var ypos = Clazz.floatToInt (node.ycount * chunk) + offy; -g.setColor (node.color.darker ()); -g.drawLine (xstart, ypos, xend, ypos); -if (node === this.highlightNode) { -g.fillRect (xend - 3, ypos - 3, 6, 6); -} else { -g.fillRect (xend - 2, ypos - 2, 4, 4); -}var ystart = Clazz.floatToInt ((node.left ()).ycount * chunk) + offy; -var yend = Clazz.floatToInt ((node.right ()).ycount * chunk) + offy; -var pos = new java.awt.Rectangle (xend - 2, ypos - 2, 5, 5); -this.nodeHash.put (node, pos); -g.drawLine (Clazz.floatToInt (height * scale) + offx, ystart, Clazz.floatToInt (height * scale) + offx, yend); -var nodeLabel = ""; -if (this.showDistances && (node.dist > 0)) { -nodeLabel = new jalview.util.Format ("%-.2f").formDouble (node.dist); -}if (this.showBootstrap) { -var btstrap = node.getBootstrap (); -if (btstrap > -1) { -if (this.showDistances) { -nodeLabel = nodeLabel + " : "; -}nodeLabel = nodeLabel + String.valueOf (node.getBootstrap ()); -}}if (!nodeLabel.equals ("")) { -g.drawString (nodeLabel, xstart + 2, ypos - 2); -}}}, "java.awt.Graphics,jalview.datamodel.SequenceNode,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "findElement", -function (x, y) { -var keys = this.nameHash.keys (); -while (keys.hasMoreElements ()) { -var ob = keys.nextElement (); -var rect = this.nameHash.get (ob); -if (x >= rect.x && x <= (rect.x + rect.width) && y >= rect.y && y <= (rect.y + rect.height)) { -return ob; -}} -keys = this.nodeHash.keys (); -while (keys.hasMoreElements ()) { -var ob = keys.nextElement (); -var rect = this.nodeHash.get (ob); -if (x >= rect.x && x <= (rect.x + rect.width) && y >= rect.y && y <= (rect.y + rect.height)) { -return ob; -}} -return null; -}, "~N,~N"); -Clazz.defineMethod (c$, "pickNodes", -function (pickBox) { -var width = this.getSize ().width; -var height = this.getSize ().height; -var top = this.tree.getTopNode (); -var wscale = (width * .8 - this.offx * 2) / this.tree.getMaxHeight (); -if (top.count == 0) { -top.count = (top.left ()).count + (top.right ()).count; -}var chunk = (height - this.offy) / top.count; -this.pickNode (pickBox, top, chunk, wscale, width, this.offx, this.offy); -}, "java.awt.Rectangle"); -Clazz.defineMethod (c$, "pickNode", -function (pickBox, node, chunk, scale, width, offx, offy) { -if (node == null) { -return; -}if (node.left () == null && node.right () == null) { -var height = node.height; -var xend = Clazz.floatToInt (height * scale) + offx; -var ypos = Clazz.floatToInt (node.ycount * chunk) + offy; -if (pickBox.contains ( new java.awt.Point (xend, ypos))) { -if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { -var seq = node.element (); -var sg = this.av.getSelectionGroup (); -if (sg != null) { -sg.addOrRemove (seq, true); -}}}} else { -this.pickNode (pickBox, node.left (), chunk, scale, width, offx, offy); -this.pickNode (pickBox, node.right (), chunk, scale, width, offx, offy); -}}, "java.awt.Rectangle,jalview.datamodel.SequenceNode,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "setColor", -function (node, c) { -if (node == null) { -return; -}if (node.left () == null && node.right () == null) { -node.color = c; -if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { -this.av.setSequenceColour (node.element (), c); -}} else { -node.color = c; -this.setColor (node.left (), c); -this.setColor (node.right (), c); -}}, "jalview.datamodel.SequenceNode,java.awt.Color"); -Clazz.overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz.overrideMethod (c$, "paintComponent", -function (g) { -if (this.tree == null) { -return; -}if (this.nameHash.size () == 0) { -this.repaint (); -}var width = this.scrollPane.getSize ().width; -var height = this.scrollPane.getSize ().height; -if (!this.fitToWindow) { -height = g.getFontMetrics (this.$font).getHeight () * this.nameHash.size (); -}if (this.getSize ().width > width) { -this.setSize ( new java.awt.Dimension (width, height)); -this.scrollPane.validate (); -return; -}this.setSize ( new java.awt.Dimension (width, height)); -g.setFont (this.$font); -this.draw (g, width, height); -this.validate (); -}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "draw", -function (g, width, height) { -this.offy = this.$font.getSize () + 10; -g.setColor (java.awt.Color.white); -g.fillRect (0, 0, width, height); -this.labelLength = g.getFontMetrics (this.$font).stringWidth (this.longestName) + 20; -var wscale = (width - this.labelLength - this.offx * 2) / this.tree.getMaxHeight (); -var top = this.tree.getTopNode (); -if (top.count == 0) { -top.count = (top.left ()).count + (top.right ()).count; -}var chunk = (height - this.offy) / top.count; -this.drawNode (g, this.tree.getTopNode (), chunk, wscale, width, this.offx, this.offy); -if (this.threshold != 0) { -if (this.av.getCurrentTree () === this.tree) { -g.setColor (java.awt.Color.red); -} else { -g.setColor (java.awt.Color.gray); -}var x = Clazz.floatToInt (this.threshold * (this.getSize ().width - this.labelLength - 2 * this.offx) + this.offx); -g.drawLine (x, 0, x, this.getSize ().height); -}}, "java.awt.Graphics,~N,~N"); -Clazz.overrideMethod (c$, "mouseReleased", -function (e) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseEntered", -function (e) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseExited", -function (e) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseClicked", -function (evt) { -if (this.highlightNode != null) { -if (evt.getClickCount () > 1) { -this.tree.swapNodes (this.highlightNode); -this.tree.reCount (this.tree.getTopNode ()); -this.tree.findHeight (this.tree.getTopNode ()); -} else { -var leaves = new java.util.Vector (); -this.tree.findLeaves (this.highlightNode, leaves); -for (var i = 0; i < leaves.size (); i++) { -var seq = (leaves.elementAt (i)).element (); -this.treeSelectionChanged (seq); -} -}jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); -this.repaint (); -this.av.sendSelection (); -}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseDragged", -function (ect) { -}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mouseMoved", -function (evt) { -this.av.setCurrentTree (this.tree); -var ob = this.findElement (evt.getX (), evt.getY ()); -if (Clazz.instanceOf (ob, jalview.datamodel.SequenceNode)) { -this.highlightNode = ob; -this.repaint (); -} else { -if (this.highlightNode != null) { -this.highlightNode = null; -this.repaint (); -}}}, "java.awt.event.MouseEvent"); -Clazz.overrideMethod (c$, "mousePressed", -function (e) { -this.av.setCurrentTree (this.tree); -var x = e.getX (); -var y = e.getY (); -var ob = this.findElement (x, y); -if (Clazz.instanceOf (ob, jalview.datamodel.SequenceI)) { -this.treeSelectionChanged (ob); -jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); -this.repaint (); -this.av.sendSelection (); -return; -} else if (!(Clazz.instanceOf (ob, jalview.datamodel.SequenceNode))) { -if (this.tree.getMaxHeight () != 0) { -this.threshold = (x - this.offx) / (this.getSize ().width - this.labelLength - 2 * this.offx); -this.tree.getGroups ().removeAllElements (); -this.tree.groupNodes (this.tree.getTopNode (), this.threshold); -this.setColor (this.tree.getTopNode (), java.awt.Color.black); -this.av.setSelectionGroup (null); -this.av.getAlignment ().deleteAllGroups (); -this.av.clearSequenceColours (); -var codingComplement = this.av.getCodingComplement (); -if (codingComplement != null) { -codingComplement.setSelectionGroup (null); -codingComplement.getAlignment ().deleteAllGroups (); -codingComplement.clearSequenceColours (); -}this.colourGroups (); -}}jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); -this.repaint (); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "colourGroups", -function () { -for (var i = 0; i < this.tree.getGroups ().size (); i++) { -var col = new java.awt.Color (Clazz.doubleToInt (Math.random () * 255), Clazz.doubleToInt (Math.random () * 255), Clazz.doubleToInt (Math.random () * 255)); -this.setColor (this.tree.getGroups ().elementAt (i), col.brighter ()); -var l = this.tree.findLeaves (this.tree.getGroups ().elementAt (i), new java.util.Vector ()); -var sequences = new java.util.Vector (); -for (var j = 0; j < l.size (); j++) { -var s1 = (l.elementAt (j)).element (); -if (!sequences.contains (s1)) { -sequences.addElement (s1); -}} -var cs = null; -var sg = new jalview.datamodel.SequenceGroup (sequences, "", cs, true, true, false, 0, this.av.getAlignment ().getWidth () - 1); -if (this.av.getGlobalColourScheme () != null) { -if (Clazz.instanceOf (this.av.getGlobalColourScheme (), jalview.schemes.UserColourScheme)) { -cs = new jalview.schemes.UserColourScheme ((this.av.getGlobalColourScheme ()).getColours ()); -} else { -cs = jalview.schemes.ColourSchemeProperty.getColour (sg, jalview.schemes.ColourSchemeProperty.getColourName (this.av.getGlobalColourScheme ())); -}if (cs != null) { -cs.setThreshold (this.av.getGlobalColourScheme ().getThreshold (), this.av.isIgnoreGapsConsensus ()); -}}sg.cs = cs; -sg.setName ("JTreeGroup:" + sg.hashCode ()); -sg.setIdColour (col); -if (this.av.getGlobalColourScheme () != null && this.av.getGlobalColourScheme ().conservationApplied ()) { -var c = new jalview.analysis.Conservation ("Group", jalview.schemes.ResidueProperties.propHash, 3, sg.getSequences (null), sg.getStartRes (), sg.getEndRes ()); -c.calculate (); -c.verdict (false, this.av.getConsPercGaps ()); -cs.setConservation (c); -sg.cs = cs; -}this.av.getAlignment ().addGroup (sg); -this.av.getAlignment ().addGroup (sg); -var codingComplement = this.av.getCodingComplement (); -if (codingComplement != null) { -var mappedGroup = jalview.util.MappingUtils.mapSequenceGroup (sg, this.av, codingComplement); -if (mappedGroup.getSequences ().size () > 0) { -codingComplement.getAlignment ().addGroup (mappedGroup); -for (var seq, $seq = mappedGroup.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -codingComplement.setSequenceColour (seq, col); -} -}}} -this.ap.updateAnnotation (); -if (this.av.getCodingComplement () != null) { -(this.av.getCodingComplement ()).firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); -}}); -Clazz.defineMethod (c$, "setShowDistances", -function (state) { -this.showDistances = state; -this.repaint (); -}, "~B"); -Clazz.defineMethod (c$, "setShowBootstrap", -function (state) { -this.showBootstrap = state; -this.repaint (); -}, "~B"); -Clazz.defineMethod (c$, "setMarkPlaceholders", -function (state) { -this.markPlaceholders = state; -this.repaint (); -}, "~B"); -Clazz.defineStatics (c$, -"PLACEHOLDER", " * "); -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.util.Hashtable"], "jalview.appletgui.TreeCanvas", ["jalview.analysis.Conservation", "jalview.appletgui.PaintRefresher", "jalview.datamodel.SequenceGroup", "$.SequenceI", "$.SequenceNode", "jalview.schemes.ColourSchemeProperty", "$.ResidueProperties", "$.UserColourScheme", "jalview.util.Format", "$.MappingUtils", "java.awt.Color", "$.Dimension", "$.Point", "$.Rectangle", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.tree = null; +this.scrollPane = null; +this.av = null; +this.$font = null; +this.fitToWindow = true; +this.showDistances = false; +this.showBootstrap = false; +this.markPlaceholders = false; +this.offx = 20; +this.offy = 0; +this.threshold = 0; +this.longestName = null; +this.labelLength = -1; +this.nameHash = null; +this.nodeHash = null; +this.highlightNode = null; +this.ap = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "TreeCanvas", awt2swing.Panel, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener]); +Clazz.prepareFields (c$, function () { +this.nameHash = new java.util.Hashtable (); +this.nodeHash = new java.util.Hashtable (); +}); +Clazz.makeConstructor (c$, +function (ap, scroller) { +Clazz.superConstructor (this, jalview.appletgui.TreeCanvas, []); +this.ap = ap; +this.av = ap.av; +this.$font = this.av.getFont (); +this.scrollPane = scroller; +this.addMouseListener (this); +this.addMouseMotionListener (this); +this.setLayout (null); +jalview.appletgui.PaintRefresher.Register (this, this.av.getSequenceSetId ()); +}, "jalview.appletgui.AlignmentPanel,awt2swing.ScrollPane"); +Clazz.defineMethod (c$, "treeSelectionChanged", +function (sequence) { +var selected = this.av.getSelectionGroup (); +if (selected == null) { +selected = new jalview.datamodel.SequenceGroup (); +this.av.setSelectionGroup (selected); +}selected.setEndRes (this.av.getAlignment ().getWidth () - 1); +selected.addOrRemove (sequence, true); +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "setTree", +function (tree) { +this.tree = tree; +tree.findHeight (tree.getTopNode ()); +var leaves = tree.findLeaves (tree.getTopNode (), new java.util.Vector ()); +var has_placeholders = false; +this.longestName = ""; +for (var i = 0; i < leaves.size (); i++) { +var lf = leaves.elementAt (i); +if (lf.isPlaceholder ()) { +has_placeholders = true; +}if (this.longestName.length < (lf.element ()).getName ().length) { +this.longestName = " * " + (lf.element ()).getName (); +}} +this.setMarkPlaceholders (has_placeholders); +}, "jalview.analysis.NJTree"); +Clazz.defineMethod (c$, "drawNode", +function (g, node, chunk, scale, width, offx, offy) { +if (node == null) { +return; +}if (node.left () == null && node.right () == null) { +var height = node.height; +var dist = node.dist; +var xstart = Clazz.floatToInt ((height - dist) * scale) + offx; +var xend = Clazz.floatToInt (height * scale) + offx; +var ypos = Clazz.floatToInt (node.ycount * chunk) + offy; +if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { +var seq = node.element (); +if (this.av.getSequenceColour (seq) === java.awt.Color.white) { +g.setColor (java.awt.Color.black); +} else { +g.setColor (this.av.getSequenceColour (seq).darker ()); +}} else { +g.setColor (java.awt.Color.black); +}g.drawLine (xstart, ypos, xend, ypos); +var nodeLabel = ""; +if (this.showDistances && node.dist > 0) { +nodeLabel = new jalview.util.Format ("%-.2f").formDouble (node.dist); +}if (this.showBootstrap) { +var btstrap = node.getBootstrap (); +if (btstrap > -1) { +if (this.showDistances) { +nodeLabel = nodeLabel + " : "; +}nodeLabel = nodeLabel + String.valueOf (node.getBootstrap ()); +}}if (!nodeLabel.equals ("")) { +g.drawString (nodeLabel, xstart + 2, ypos - 2); +}var name = (this.markPlaceholders && node.isPlaceholder ()) ? (" * " + node.getName ()) : node.getName (); +var fm = g.getFontMetrics (this.$font); +var charWidth = fm.stringWidth (name) + 3; +var charHeight = fm.getHeight (); +var rect = new java.awt.Rectangle (xend + 10, ypos - charHeight, charWidth, charHeight); +this.nameHash.put (node.element (), rect); +var selected = this.av.getSelectionGroup (); +if (selected != null && selected.getSequences (null).contains (node.element ())) { +g.setColor (java.awt.Color.gray); +g.fillRect (xend + 10, ypos - charHeight + 3, charWidth, charHeight); +g.setColor (java.awt.Color.white); +}g.drawString (name, xend + 10, ypos); +g.setColor (java.awt.Color.black); +} else { +this.drawNode (g, node.left (), chunk, scale, width, offx, offy); +this.drawNode (g, node.right (), chunk, scale, width, offx, offy); +var height = node.height; +var dist = node.dist; +var xstart = Clazz.floatToInt ((height - dist) * scale) + offx; +var xend = Clazz.floatToInt (height * scale) + offx; +var ypos = Clazz.floatToInt (node.ycount * chunk) + offy; +g.setColor (node.color.darker ()); +g.drawLine (xstart, ypos, xend, ypos); +if (node === this.highlightNode) { +g.fillRect (xend - 3, ypos - 3, 6, 6); +} else { +g.fillRect (xend - 2, ypos - 2, 4, 4); +}var ystart = Clazz.floatToInt ((node.left ()).ycount * chunk) + offy; +var yend = Clazz.floatToInt ((node.right ()).ycount * chunk) + offy; +var pos = new java.awt.Rectangle (xend - 2, ypos - 2, 5, 5); +this.nodeHash.put (node, pos); +g.drawLine (Clazz.floatToInt (height * scale) + offx, ystart, Clazz.floatToInt (height * scale) + offx, yend); +var nodeLabel = ""; +if (this.showDistances && (node.dist > 0)) { +nodeLabel = new jalview.util.Format ("%-.2f").formDouble (node.dist); +}if (this.showBootstrap) { +var btstrap = node.getBootstrap (); +if (btstrap > -1) { +if (this.showDistances) { +nodeLabel = nodeLabel + " : "; +}nodeLabel = nodeLabel + String.valueOf (node.getBootstrap ()); +}}if (!nodeLabel.equals ("")) { +g.drawString (nodeLabel, xstart + 2, ypos - 2); +}}}, "java.awt.Graphics,jalview.datamodel.SequenceNode,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "findElement", +function (x, y) { +var keys = this.nameHash.keys (); +while (keys.hasMoreElements ()) { +var ob = keys.nextElement (); +var rect = this.nameHash.get (ob); +if (x >= rect.x && x <= (rect.x + rect.width) && y >= rect.y && y <= (rect.y + rect.height)) { +return ob; +}} +keys = this.nodeHash.keys (); +while (keys.hasMoreElements ()) { +var ob = keys.nextElement (); +var rect = this.nodeHash.get (ob); +if (x >= rect.x && x <= (rect.x + rect.width) && y >= rect.y && y <= (rect.y + rect.height)) { +return ob; +}} +return null; +}, "~N,~N"); +Clazz.defineMethod (c$, "pickNodes", +function (pickBox) { +var width = this.getSize ().width; +var height = this.getSize ().height; +var top = this.tree.getTopNode (); +var wscale = (width * .8 - this.offx * 2) / this.tree.getMaxHeight (); +if (top.count == 0) { +top.count = (top.left ()).count + (top.right ()).count; +}var chunk = (height - this.offy) / top.count; +this.pickNode (pickBox, top, chunk, wscale, width, this.offx, this.offy); +}, "java.awt.Rectangle"); +Clazz.defineMethod (c$, "pickNode", +function (pickBox, node, chunk, scale, width, offx, offy) { +if (node == null) { +return; +}if (node.left () == null && node.right () == null) { +var height = node.height; +var xend = Clazz.floatToInt (height * scale) + offx; +var ypos = Clazz.floatToInt (node.ycount * chunk) + offy; +if (pickBox.contains ( new java.awt.Point (xend, ypos))) { +if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { +var seq = node.element (); +var sg = this.av.getSelectionGroup (); +if (sg != null) { +sg.addOrRemove (seq, true); +}}}} else { +this.pickNode (pickBox, node.left (), chunk, scale, width, offx, offy); +this.pickNode (pickBox, node.right (), chunk, scale, width, offx, offy); +}}, "java.awt.Rectangle,jalview.datamodel.SequenceNode,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "setColor", +function (node, c) { +if (node == null) { +return; +}if (node.left () == null && node.right () == null) { +node.color = c; +if (Clazz.instanceOf (node.element (), jalview.datamodel.SequenceI)) { +this.av.setSequenceColour (node.element (), c); +}} else { +node.color = c; +this.setColor (node.left (), c); +this.setColor (node.right (), c); +}}, "jalview.datamodel.SequenceNode,java.awt.Color"); +Clazz.overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz.overrideMethod (c$, "paintComponent", +function (g) { +if (this.tree == null) { +return; +}if (this.nameHash.size () == 0) { +this.repaint (); +}var width = this.scrollPane.getSize ().width; +var height = this.scrollPane.getSize ().height; +if (!this.fitToWindow) { +height = g.getFontMetrics (this.$font).getHeight () * this.nameHash.size (); +}if (this.getSize ().width > width) { +this.setSize ( new java.awt.Dimension (width, height)); +this.scrollPane.validate (); +return; +}this.setSize ( new java.awt.Dimension (width, height)); +g.setFont (this.$font); +this.draw (g, width, height); +this.validate (); +}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "draw", +function (g, width, height) { +this.offy = this.$font.getSize () + 10; +g.setColor (java.awt.Color.white); +g.fillRect (0, 0, width, height); +this.labelLength = g.getFontMetrics (this.$font).stringWidth (this.longestName) + 20; +var wscale = (width - this.labelLength - this.offx * 2) / this.tree.getMaxHeight (); +var top = this.tree.getTopNode (); +if (top.count == 0) { +top.count = (top.left ()).count + (top.right ()).count; +}var chunk = (height - this.offy) / top.count; +this.drawNode (g, this.tree.getTopNode (), chunk, wscale, width, this.offx, this.offy); +if (this.threshold != 0) { +if (this.av.getCurrentTree () === this.tree) { +g.setColor (java.awt.Color.red); +} else { +g.setColor (java.awt.Color.gray); +}var x = Clazz.floatToInt (this.threshold * (this.getSize ().width - this.labelLength - 2 * this.offx) + this.offx); +g.drawLine (x, 0, x, this.getSize ().height); +}}, "java.awt.Graphics,~N,~N"); +Clazz.overrideMethod (c$, "mouseReleased", +function (e) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseEntered", +function (e) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseExited", +function (e) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseClicked", +function (evt) { +if (this.highlightNode != null) { +if (evt.getClickCount () > 1) { +this.tree.swapNodes (this.highlightNode); +this.tree.reCount (this.tree.getTopNode ()); +this.tree.findHeight (this.tree.getTopNode ()); +} else { +var leaves = new java.util.Vector (); +this.tree.findLeaves (this.highlightNode, leaves); +for (var i = 0; i < leaves.size (); i++) { +var seq = (leaves.elementAt (i)).element (); +this.treeSelectionChanged (seq); +} +}jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); +this.repaint (); +this.av.sendSelection (); +}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseDragged", +function (ect) { +}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mouseMoved", +function (evt) { +this.av.setCurrentTree (this.tree); +var ob = this.findElement (evt.getX (), evt.getY ()); +if (Clazz.instanceOf (ob, jalview.datamodel.SequenceNode)) { +this.highlightNode = ob; +this.repaint (); +} else { +if (this.highlightNode != null) { +this.highlightNode = null; +this.repaint (); +}}}, "java.awt.event.MouseEvent"); +Clazz.overrideMethod (c$, "mousePressed", +function (e) { +this.av.setCurrentTree (this.tree); +var x = e.getX (); +var y = e.getY (); +var ob = this.findElement (x, y); +if (Clazz.instanceOf (ob, jalview.datamodel.SequenceI)) { +this.treeSelectionChanged (ob); +jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); +this.repaint (); +this.av.sendSelection (); +return; +} else if (!(Clazz.instanceOf (ob, jalview.datamodel.SequenceNode))) { +if (this.tree.getMaxHeight () != 0) { +this.threshold = (x - this.offx) / (this.getSize ().width - this.labelLength - 2 * this.offx); +this.tree.getGroups ().removeAllElements (); +this.tree.groupNodes (this.tree.getTopNode (), this.threshold); +this.setColor (this.tree.getTopNode (), java.awt.Color.black); +this.av.setSelectionGroup (null); +this.av.getAlignment ().deleteAllGroups (); +this.av.clearSequenceColours (); +var codingComplement = this.av.getCodingComplement (); +if (codingComplement != null) { +codingComplement.setSelectionGroup (null); +codingComplement.getAlignment ().deleteAllGroups (); +codingComplement.clearSequenceColours (); +}this.colourGroups (); +}}jalview.appletgui.PaintRefresher.Refresh (this, this.av.getSequenceSetId ()); +this.repaint (); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "colourGroups", +function () { +for (var i = 0; i < this.tree.getGroups ().size (); i++) { +var col = new java.awt.Color (Clazz.doubleToInt (Math.random () * 255), Clazz.doubleToInt (Math.random () * 255), Clazz.doubleToInt (Math.random () * 255)); +this.setColor (this.tree.getGroups ().elementAt (i), col.brighter ()); +var l = this.tree.findLeaves (this.tree.getGroups ().elementAt (i), new java.util.Vector ()); +var sequences = new java.util.Vector (); +for (var j = 0; j < l.size (); j++) { +var s1 = (l.elementAt (j)).element (); +if (!sequences.contains (s1)) { +sequences.addElement (s1); +}} +var cs = null; +var sg = new jalview.datamodel.SequenceGroup (sequences, "", cs, true, true, false, 0, this.av.getAlignment ().getWidth () - 1); +if (this.av.getGlobalColourScheme () != null) { +if (Clazz.instanceOf (this.av.getGlobalColourScheme (), jalview.schemes.UserColourScheme)) { +cs = new jalview.schemes.UserColourScheme ((this.av.getGlobalColourScheme ()).getColours ()); +} else { +cs = jalview.schemes.ColourSchemeProperty.getColour (sg, jalview.schemes.ColourSchemeProperty.getColourName (this.av.getGlobalColourScheme ())); +}if (cs != null) { +cs.setThreshold (this.av.getGlobalColourScheme ().getThreshold (), this.av.isIgnoreGapsConsensus ()); +}}sg.cs = cs; +sg.setName ("JTreeGroup:" + sg.hashCode ()); +sg.setIdColour (col); +if (this.av.getGlobalColourScheme () != null && this.av.getGlobalColourScheme ().conservationApplied ()) { +var c = new jalview.analysis.Conservation ("Group", jalview.schemes.ResidueProperties.propHash, 3, sg.getSequences (null), sg.getStartRes (), sg.getEndRes ()); +c.calculate (); +c.verdict (false, this.av.getConsPercGaps ()); +cs.setConservation (c); +sg.cs = cs; +}this.av.getAlignment ().addGroup (sg); +this.av.getAlignment ().addGroup (sg); +var codingComplement = this.av.getCodingComplement (); +if (codingComplement != null) { +var mappedGroup = jalview.util.MappingUtils.mapSequenceGroup (sg, this.av, codingComplement); +if (mappedGroup.getSequences ().size () > 0) { +codingComplement.getAlignment ().addGroup (mappedGroup); +for (var seq, $seq = mappedGroup.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +codingComplement.setSequenceColour (seq, col); +} +}}} +this.ap.updateAnnotation (); +if (this.av.getCodingComplement () != null) { +(this.av.getCodingComplement ()).firePropertyChange ("alignment", null, this.ap.av.getAlignment ().getSequences ()); +}}); +Clazz.defineMethod (c$, "setShowDistances", +function (state) { +this.showDistances = state; +this.repaint (); +}, "~B"); +Clazz.defineMethod (c$, "setShowBootstrap", +function (state) { +this.showBootstrap = state; +this.repaint (); +}, "~B"); +Clazz.defineMethod (c$, "setMarkPlaceholders", +function (state) { +this.markPlaceholders = state; +this.repaint (); +}, "~B"); +Clazz.defineStatics (c$, +"PLACEHOLDER", " * "); +}); diff --git a/bin/jalview/appletgui/TreePanel$TreeLoader.class b/bin/jalview/appletgui/TreePanel$TreeLoader.class index 9a214e5abd0f6ab7e5a1cf664fcc31076d29ca8a..cd993a2c5a8cedecee051d4ccc3d51f22e31bae4 100644 GIT binary patch delta 24 fcmZ3gwnS}1Egxgg<~lxI7S=chek1kC8-+>$WHJY1 delta 25 gcmZ3Ywp49HEgxg=<~lxI7Pfc>0V5Tr$s2@90BP(8WdHyG diff --git a/bin/jalview/appletgui/TreePanel.class b/bin/jalview/appletgui/TreePanel.class index a2409c826bda6eb6f2137e4a3a747e6ef097e82e..b8a678db3ffa1b22d131c1011bb78e9c7f3bf081 100644 GIT binary patch delta 41 xcmbQ?Jl%Q2Qz=H7&CjIR7)3=HSpG9eFfg$*FfuYQvNM!2{9^Ff%p^076#(qW3AX?M delta 42 ycmbR4Ji~dzQz=H-&CjIR7{$aGSpPFfFfg$*FfuYQvNM!2{9 1; -var e = this.b$["jalview.appletgui.TreePanel"].av.getAlignmentView (d); -if (!d) { -a = 0; -b = this.b$["jalview.appletgui.TreePanel"].av.getAlignment ().getWidth (); -c = this.b$["jalview.appletgui.TreePanel"].av.getAlignment ().getSequencesArray (); -} else { -a = this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup ().getStartRes (); -b = this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup ().getEndRes () + 1; -c = this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup ().getSequencesInOrder (this.b$["jalview.appletgui.TreePanel"].av.getAlignment ()); -}var f = jalview.schemes.ResidueProperties.getScoreModel (this.b$["jalview.appletgui.TreePanel"].pwtype); -if (Clazz.instanceOf (f, jalview.api.analysis.ViewBasedAnalysisI)) { -try { -f = f.getClass ().newInstance (); -(f).configureFromAlignmentView (this.b$["jalview.appletgui.TreePanel"].treeCanvas.ap); -} catch (q) { -if (Clazz.exceptionOf (q, Exception)) { -System.err.println ("Couldn't create a scoremodel instance for " + f.getName ()); -q.printStackTrace (); -} else { -throw q; -} -} -this.b$["jalview.appletgui.TreePanel"].tree = new jalview.analysis.NJTree (c, e, this.b$["jalview.appletgui.TreePanel"].$type, this.b$["jalview.appletgui.TreePanel"].pwtype, f, a, b); -} else { -this.b$["jalview.appletgui.TreePanel"].tree = new jalview.analysis.NJTree (c, e, this.b$["jalview.appletgui.TreePanel"].$type, this.b$["jalview.appletgui.TreePanel"].pwtype, null, a, b); -}}this.b$["jalview.appletgui.TreePanel"].tree.reCount (this.b$["jalview.appletgui.TreePanel"].tree.getTopNode ()); -this.b$["jalview.appletgui.TreePanel"].tree.findHeight (this.b$["jalview.appletgui.TreePanel"].tree.getTopNode ()); -this.b$["jalview.appletgui.TreePanel"].treeCanvas.setTree (this.b$["jalview.appletgui.TreePanel"].tree); -if (this.newtree != null) { -var a = this.newtree.HasDistances () && this.b$["jalview.appletgui.TreePanel"].av.applet.getDefaultParameter ("showTreeDistances", this.newtree.HasDistances ()); -var b = this.newtree.HasBootstrap () && this.b$["jalview.appletgui.TreePanel"].av.applet.getDefaultParameter ("showTreeBootstraps", this.newtree.HasBootstrap ()); -this.b$["jalview.appletgui.TreePanel"].distanceMenu.setState (a); -this.b$["jalview.appletgui.TreePanel"].bootstrapMenu.setState (b); -this.b$["jalview.appletgui.TreePanel"].treeCanvas.setShowBootstrap (b); -this.b$["jalview.appletgui.TreePanel"].treeCanvas.setShowDistances (a); -this.b$["jalview.appletgui.TreePanel"].treeCanvas.setMarkPlaceholders (this.b$["jalview.appletgui.TreePanel"].av.applet.getDefaultParameter ("showUnlinkedTreeNodes", false)); -}this.b$["jalview.appletgui.TreePanel"].treeCanvas.repaint (); -this.b$["jalview.appletgui.TreePanel"].av.setCurrentTree (this.b$["jalview.appletgui.TreePanel"].tree); -}); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["jalview.appletgui.EmbmenuFrame", "java.awt.event.ActionListener", "$.ItemListener", "java.lang.Thread", "awt2swing.CheckboxMenuItem", "$.Menu", "$.MenuBar", "$.MenuItem", "$.ScrollPane", "java.awt.BorderLayout"], "jalview.appletgui.TreePanel", ["awt2swing.Frame", "jalview.analysis.NJTree", "jalview.api.analysis.ViewBasedAnalysisI", "jalview.appletgui.AlignFrame", "$.CutAndPasteTransfer", "$.FontChooser", "$.TreeCanvas", "jalview.bin.JalviewLite", "jalview.datamodel.Alignment", "jalview.io.NewickFile", "jalview.schemes.ResidueProperties", "jalview.util.MessageManager", "java.awt.Color", "$.Font"], function () { +c$ = Clazz.decorateAsClass (function () { +this.seq = null; +this.$type = null; +this.pwtype = null; +this.start = 0; +this.end = 0; +this.treeCanvas = null; +this.tree = null; +this.ap = null; +this.av = null; +if (!Clazz.isClassDefined ("jalview.appletgui.TreePanel.TreeLoader")) { +jalview.appletgui.TreePanel.$TreePanel$TreeLoader$ (); +} +this.borderLayout1 = null; +this.scrollPane = null; +this.jMenuBar1 = null; +this.jMenu2 = null; +this.fontSize = null; +this.bootstrapMenu = null; +this.distanceMenu = null; +this.placeholdersMenu = null; +this.fitToWindow = null; +this.fileMenu = null; +this.newickOutput = null; +this.inputData = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "TreePanel", jalview.appletgui.EmbmenuFrame, [java.awt.event.ActionListener, java.awt.event.ItemListener]); +Clazz.prepareFields (c$, function () { +this.borderLayout1 = new java.awt.BorderLayout (); +this.scrollPane = new awt2swing.ScrollPane (); +this.jMenuBar1 = new awt2swing.MenuBar (); +this.jMenu2 = new awt2swing.Menu (); +this.fontSize = new awt2swing.MenuItem (); +this.bootstrapMenu = new awt2swing.CheckboxMenuItem (); +this.distanceMenu = new awt2swing.CheckboxMenuItem (); +this.placeholdersMenu = new awt2swing.CheckboxMenuItem (); +this.fitToWindow = new awt2swing.CheckboxMenuItem (); +this.fileMenu = new awt2swing.Menu (); +this.newickOutput = new awt2swing.MenuItem (); +this.inputData = new awt2swing.MenuItem (); +}); +Clazz.defineMethod (c$, "getTree", +function () { +return this.tree; +}); +Clazz.defineMethod (c$, "finalize", +function () { +this.ap = null; +this.av = null; +Clazz.superCall (this, jalview.appletgui.TreePanel, "finalize", []); +}); +Clazz.makeConstructor (c$, +function (ap, type, pwtype) { +Clazz.superConstructor (this, jalview.appletgui.TreePanel, []); +try { +this.jbInit (); +this.setMenuBar (this.jMenuBar1); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +this.initTreePanel (ap, type, pwtype, null); +}, "jalview.appletgui.AlignmentPanel,~S,~S"); +Clazz.makeConstructor (c$, +function (ap, type, pwtype, newtree) { +Clazz.superConstructor (this, jalview.appletgui.TreePanel, []); +try { +this.jbInit (); +this.setMenuBar (this.jMenuBar1); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.initTreePanel (ap, type, pwtype, newtree); +}, "jalview.appletgui.AlignmentPanel,~S,~S,jalview.io.NewickFile"); +Clazz.defineMethod (c$, "initTreePanel", +function (ap, type, pwtype, newTree) { +this.ap = ap; +this.av = ap.av; +this.$type = type; +this.pwtype = pwtype; +this.treeCanvas = new jalview.appletgui.TreeCanvas (ap, this.scrollPane); +var tl = Clazz.innerTypeInstance (jalview.appletgui.TreePanel.TreeLoader, this, null, newTree); +tl.start (); +this.embedMenuIfNeeded (this.treeCanvas); +this.scrollPane.add (this.treeCanvas, "Center"); +}, "jalview.appletgui.AlignmentPanel,~S,~S,jalview.io.NewickFile"); +Clazz.defineMethod (c$, "showOriginalData", +function () { +if (this.tree.seqData != null) { +var gc = '-'; +try { +gc = this.av.getGapCharacter (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +;var alAndColsel = this.tree.seqData.getAlignmentAndColumnSelection (gc); +if (alAndColsel != null && alAndColsel[0] != null) { +var al = new jalview.datamodel.Alignment (alAndColsel[0]); +var af = new jalview.appletgui.AlignFrame (al, this.av.applet, "Original Data for Tree", false); +af.viewport.setHiddenColumns (alAndColsel[1]); +}} else { +System.out.println ("Original Tree Data not available"); +}}); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +if (evt.getSource () === this.newickOutput) { +this.newickOutput_actionPerformed (); +} else if (evt.getSource () === this.fontSize) { +this.fontSize_actionPerformed (); +} else if (evt.getSource () === this.inputData) { +this.showOriginalData (); +}}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "itemStateChanged", +function (evt) { +if (evt.getSource () === this.fitToWindow) { +this.treeCanvas.fitToWindow = this.fitToWindow.getState (); +} else if (evt.getSource () === this.distanceMenu) { +this.treeCanvas.setShowDistances (this.distanceMenu.getState ()); +} else if (evt.getSource () === this.bootstrapMenu) { +this.treeCanvas.setShowBootstrap (this.bootstrapMenu.getState ()); +} else if (evt.getSource () === this.placeholdersMenu) { +this.treeCanvas.setMarkPlaceholders (this.placeholdersMenu.getState ()); +}this.treeCanvas.repaint (); +}, "java.awt.event.ItemEvent"); +Clazz.defineMethod (c$, "newickOutput_actionPerformed", +function () { +var fout = new jalview.io.NewickFile (this.tree.getTopNode ()); +var output = fout.print (false, true); +var cap = new jalview.appletgui.CutAndPasteTransfer (false, null); +cap.setText (output); +var frame = new awt2swing.Frame (); +frame.add (cap); +jalview.bin.JalviewLite.addFrame (frame, this.$type + " " + this.pwtype, 500, 100); +}); +Clazz.defineMethod (c$, "getTreeFont", +function () { +return this.treeCanvas.$font; +}); +Clazz.defineMethod (c$, "setTreeFont", +function (font) { +this.treeCanvas.$font = font; +this.treeCanvas.repaint (); +}, "java.awt.Font"); +Clazz.defineMethod (c$, "fontSize_actionPerformed", +function () { +if (this.treeCanvas == null) { +return; +} new jalview.appletgui.FontChooser (this); +}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setLayout (this.borderLayout1); +this.setBackground (java.awt.Color.white); +this.setFont ( new java.awt.Font ("Verdana", 0, 12)); +this.jMenu2.setLabel (jalview.util.MessageManager.getString ("action.view")); +this.fontSize.setLabel (jalview.util.MessageManager.getString ("action.font")); +this.fontSize.addActionListener (this); +this.bootstrapMenu.setLabel (jalview.util.MessageManager.getString ("label.show_bootstrap_values")); +this.bootstrapMenu.addItemListener (this); +this.distanceMenu.setLabel (jalview.util.MessageManager.getString ("label.show_distances")); +this.distanceMenu.addItemListener (this); +this.placeholdersMenu.setLabel (jalview.util.MessageManager.getString ("label.mark_unassociated_leaves")); +this.placeholdersMenu.addItemListener (this); +this.fitToWindow.setState (true); +this.fitToWindow.setLabel (jalview.util.MessageManager.getString ("label.fit_to_window")); +this.fitToWindow.addItemListener (this); +this.fileMenu.setLabel (jalview.util.MessageManager.getString ("action.file")); +this.newickOutput.setLabel (jalview.util.MessageManager.getString ("label.newick_format")); +this.newickOutput.addActionListener (this); +this.inputData.setLabel (jalview.util.MessageManager.getString ("label.input_data")); +this.add (this.scrollPane, "Center"); +this.jMenuBar1.add (this.fileMenu); +this.jMenuBar1.add (this.jMenu2); +this.jMenu2.add (this.fitToWindow); +this.jMenu2.add (this.fontSize); +this.jMenu2.add (this.distanceMenu); +this.jMenu2.add (this.bootstrapMenu); +this.jMenu2.add (this.placeholdersMenu); +this.fileMenu.add (this.newickOutput); +this.fileMenu.add (this.inputData); +this.inputData.addActionListener (this); +}, $fz.isPrivate = true, $fz)); +c$.$TreePanel$TreeLoader$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.newtree = null; +this.odata = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui.TreePanel, "TreeLoader", Thread); +Clazz.makeConstructor (c$, +function (a) { +Clazz.superConstructor (this, jalview.appletgui.TreePanel.TreeLoader, []); +this.newtree = a; +}, "jalview.io.NewickFile"); +Clazz.overrideMethod (c$, "run", +function () { +if (this.newtree != null) { +if (this.odata == null) { +this.b$["jalview.appletgui.TreePanel"].tree = new jalview.analysis.NJTree (this.b$["jalview.appletgui.TreePanel"].av.getAlignment ().getSequencesArray (), this.newtree); +} else { +this.b$["jalview.appletgui.TreePanel"].tree = new jalview.analysis.NJTree (this.b$["jalview.appletgui.TreePanel"].av.getAlignment ().getSequencesArray (), this.odata, this.newtree); +}} else { +var a; +var b; +var c; +var d = this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup () != null && this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup ().getSize () > 1; +var e = this.b$["jalview.appletgui.TreePanel"].av.getAlignmentView (d); +if (!d) { +a = 0; +b = this.b$["jalview.appletgui.TreePanel"].av.getAlignment ().getWidth (); +c = this.b$["jalview.appletgui.TreePanel"].av.getAlignment ().getSequencesArray (); +} else { +a = this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup ().getStartRes (); +b = this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup ().getEndRes () + 1; +c = this.b$["jalview.appletgui.TreePanel"].av.getSelectionGroup ().getSequencesInOrder (this.b$["jalview.appletgui.TreePanel"].av.getAlignment ()); +}var f = jalview.schemes.ResidueProperties.getScoreModel (this.b$["jalview.appletgui.TreePanel"].pwtype); +if (Clazz.instanceOf (f, jalview.api.analysis.ViewBasedAnalysisI)) { +try { +f = f.getClass ().newInstance (); +(f).configureFromAlignmentView (this.b$["jalview.appletgui.TreePanel"].treeCanvas.ap); +} catch (q) { +if (Clazz.exceptionOf (q, Exception)) { +System.err.println ("Couldn't create a scoremodel instance for " + f.getName ()); +q.printStackTrace (); +} else { +throw q; +} +} +this.b$["jalview.appletgui.TreePanel"].tree = new jalview.analysis.NJTree (c, e, this.b$["jalview.appletgui.TreePanel"].$type, this.b$["jalview.appletgui.TreePanel"].pwtype, f, a, b); +} else { +this.b$["jalview.appletgui.TreePanel"].tree = new jalview.analysis.NJTree (c, e, this.b$["jalview.appletgui.TreePanel"].$type, this.b$["jalview.appletgui.TreePanel"].pwtype, null, a, b); +}}this.b$["jalview.appletgui.TreePanel"].tree.reCount (this.b$["jalview.appletgui.TreePanel"].tree.getTopNode ()); +this.b$["jalview.appletgui.TreePanel"].tree.findHeight (this.b$["jalview.appletgui.TreePanel"].tree.getTopNode ()); +this.b$["jalview.appletgui.TreePanel"].treeCanvas.setTree (this.b$["jalview.appletgui.TreePanel"].tree); +if (this.newtree != null) { +var a = this.newtree.HasDistances () && this.b$["jalview.appletgui.TreePanel"].av.applet.getDefaultParameter ("showTreeDistances", this.newtree.HasDistances ()); +var b = this.newtree.HasBootstrap () && this.b$["jalview.appletgui.TreePanel"].av.applet.getDefaultParameter ("showTreeBootstraps", this.newtree.HasBootstrap ()); +this.b$["jalview.appletgui.TreePanel"].distanceMenu.setState (a); +this.b$["jalview.appletgui.TreePanel"].bootstrapMenu.setState (b); +this.b$["jalview.appletgui.TreePanel"].treeCanvas.setShowBootstrap (b); +this.b$["jalview.appletgui.TreePanel"].treeCanvas.setShowDistances (a); +this.b$["jalview.appletgui.TreePanel"].treeCanvas.setMarkPlaceholders (this.b$["jalview.appletgui.TreePanel"].av.applet.getDefaultParameter ("showUnlinkedTreeNodes", false)); +}this.b$["jalview.appletgui.TreePanel"].treeCanvas.repaint (); +this.b$["jalview.appletgui.TreePanel"].av.setCurrentTree (this.b$["jalview.appletgui.TreePanel"].tree); +}); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/appletgui/UserDefinedColours.class b/bin/jalview/appletgui/UserDefinedColours.class index c53d7e0e2533370b79bf6587502e0e59209a3117..593d23d327f13bcd94953cab4d567298de1e4421 100644 GIT binary patch delta 46 xcmeBeXY6ig+z@HOn7KL1!kLLpm4Q!9U10JOD_zFw&6lh~AtGABoAqqt*#J9(3_}0_ delta 48 zcmeBfXY6ff+z@HOn6){|!kLL(je%cHotJ6yVk=$7n#~ujLLow00!*8AY~$GgOq2{o diff --git a/bin/jalview/appletgui/UserDefinedColours.js b/bin/jalview/appletgui/UserDefinedColours.js index 2cc0d9b..a1b23f6 100644 --- a/bin/jalview/appletgui/UserDefinedColours.js +++ b/bin/jalview/appletgui/UserDefinedColours.js @@ -1,481 +1,481 @@ -Clazz.declarePackage ("jalview.appletgui"); -Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.FocusListener", "awt2swing.Button", "$.Label", "$.Scrollbar", "$.TextField", "java.awt.GridLayout", "java.util.Vector"], "jalview.appletgui.UserDefinedColours", ["awt2swing.Frame", "jalview.appletgui.AnnotationColourChooser", "$.FeatureColourChooser", "$.FeatureRenderer", "$.FeatureSettings", "jalview.bin.JalviewLite", "jalview.schemes.ResidueProperties", "$.UserColourScheme", "jalview.util.MessageManager", "java.awt.Color", "$.Dialog", "$.Font", "$.Rectangle", "java.awt.event.MouseAdapter", "java.lang.Error"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ap = null; -this.seqGroup = null; -this.selectedButton = null; -this.oldColours = null; -this.oldColourScheme = null; -this.frame = null; -this.jmol = null; -this.dialog = null; -this.caller = null; -this.originalLabel = null; -this.originalColour = null; -this.R = 0; -this.G = 0; -this.B = 0; -this.buttonPanel = null; -this.gridLayout = null; -this.okcancelPanel = null; -this.okButton = null; -this.applyButton = null; -this.cancelButton = null; -this.rScroller = null; -this.label1 = null; -this.rText = null; -this.label4 = null; -this.gScroller = null; -this.gText = null; -this.label5 = null; -this.bScroller = null; -this.bText = null; -this.target = null; -Clazz.instantialize (this, arguments); -}, jalview.appletgui, "UserDefinedColours", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.FocusListener]); -Clazz.prepareFields (c$, function () { -this.oldColours = new java.util.Vector (); -this.buttonPanel = new awt2swing.Panel (); -this.gridLayout = new java.awt.GridLayout (); -this.okcancelPanel = new awt2swing.Panel (); -this.okButton = new awt2swing.Button (); -this.applyButton = new awt2swing.Button (); -this.cancelButton = new awt2swing.Button (); -this.rScroller = new awt2swing.Scrollbar (); -this.label1 = new awt2swing.Label (); -this.rText = new awt2swing.TextField (); -this.label4 = new awt2swing.Label (); -this.gScroller = new awt2swing.Scrollbar (); -this.gText = new awt2swing.TextField (); -this.label5 = new awt2swing.Label (); -this.bScroller = new awt2swing.Scrollbar (); -this.bText = new awt2swing.TextField (); -this.target = new awt2swing.Panel (); -}); -Clazz.defineMethod (c$, "loadDefaultColours", -function () { -return null; -}); -Clazz.makeConstructor (c$, -function (ap, sg) { -Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); -this.ap = ap; -this.seqGroup = sg; -if (this.seqGroup != null) { -this.oldColourScheme = this.seqGroup.cs; -} else { -this.oldColourScheme = ap.av.getGlobalColourScheme (); -}this.init (); -}, "jalview.appletgui.AlignmentPanel,jalview.datamodel.SequenceGroup"); -Clazz.makeConstructor (c$, -function (jmol) { -Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); -this.jmol = jmol; -this.init (); -}, "jalview.appletgui.AppletJmol"); -Clazz.makeConstructor (c$, -function (fr, alignframe) { -Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); -this.caller = fr; -this.originalColour = fr.colourPanel.getBackground (); -this.originalLabel = "Feature Colour"; -this.setForDialog ("Select Feature Colour", alignframe); -this.setTargetColour (fr.colourPanel.getBackground ()); -this.dialog.setVisible (true); -}, "jalview.appletgui.FeatureRenderer,awt2swing.Frame"); -Clazz.makeConstructor (c$, -function (caller, col1, alignframe) { -this.construct (caller, col1, alignframe, "Select Colour"); -}, "java.awt.Component,java.awt.Color,awt2swing.Frame"); -Clazz.makeConstructor (c$, -function (caller, col1, alignframe, title) { -Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); -this.caller = caller; -this.originalColour = col1; -this.originalLabel = title; -this.setForDialog (title, alignframe); -this.setTargetColour (col1); -this.dialog.setVisible (true); -}, "java.awt.Component,java.awt.Color,awt2swing.Frame,~S"); -Clazz.makeConstructor (c$, -function (caller, label, colour) { -this.construct (caller, label, colour, colour); -}, "~O,~S,java.awt.Color"); -Clazz.makeConstructor (c$, -function (me, type, graduatedColor) { -this.construct (me, type, graduatedColor, graduatedColor.getMaxColor ()); -}, "jalview.appletgui.FeatureSettings,~S,jalview.schemes.GraduatedColor"); -Clazz.makeConstructor (c$, -($fz = function (caller, label, ocolour, colour) { -Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); -this.caller = caller; -this.originalColour = ocolour; -this.originalLabel = label; -this.init (); -this.remove (this.buttonPanel); -this.setTargetColour (colour); -this.okcancelPanel.setBounds ( new java.awt.Rectangle (0, 113, 400, 35)); -this.frame.setTitle (jalview.util.MessageManager.getString ("label.user_defined_colours") + " - " + label); -this.frame.setSize (420, 200); -}, $fz.isPrivate = true, $fz), "~O,~S,~O,java.awt.Color"); -Clazz.defineMethod (c$, "setForDialog", -function (title, alignframe) { -this.init (); -this.frame.setVisible (false); -this.remove (this.buttonPanel); -if (Clazz.instanceOf (alignframe, awt2swing.Frame)) { -this.dialog = new java.awt.Dialog (alignframe, title, true); -} else { -throw new Error (jalview.util.MessageManager.getString ("label.error_unsupported_owwner_user_colour_scheme")); -}this.dialog.add (this); -this.setSize (400, 123); -this.okcancelPanel.setBounds ( new java.awt.Rectangle (0, 123, 400, 35)); -var height = 160 + alignframe.getInsets ().top + this.getInsets ().bottom; -var width = 400; -this.dialog.setBounds (alignframe.getBounds ().x + Clazz.doubleToInt ((alignframe.getSize ().width - width) / 2), alignframe.getBounds ().y + Clazz.doubleToInt ((alignframe.getSize ().height - height) / 2), width, height); -}, "~S,java.awt.Container"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -var source = evt.getSource (); -if (source === this.okButton) { -this.okButton_actionPerformed (); -} else if (source === this.applyButton) { -this.applyButton_actionPerformed (); -} else if (source === this.cancelButton) { -this.cancelButton_actionPerformed (); -} else if (source === this.rText) { -this.rText_actionPerformed (); -} else if (source === this.gText) { -this.gText_actionPerformed (); -} else if (source === this.bText) { -this.bText_actionPerformed (); -}}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "adjustmentValueChanged", -function (evt) { -if (evt.getSource () === this.rScroller) { -this.rScroller_adjustmentValueChanged (); -} else if (evt.getSource () === this.gScroller) { -this.gScroller_adjustmentValueChanged (); -} else if (evt.getSource () === this.bScroller) { -this.bScroller_adjustmentValueChanged (); -}}, "java.awt.event.AdjustmentEvent"); -Clazz.defineMethod (c$, "init", -function () { -try { -this.jbInit (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} -this.frame = new awt2swing.Frame (); -this.frame.add (this); -jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.user_defined_colours"), 420, 345); -if (this.seqGroup != null) { -this.frame.setTitle (this.frame.getTitle () + " (" + this.seqGroup.getName () + ")"); -}for (var i = 0; i < 20; i++) { -this.makeButton (jalview.schemes.ResidueProperties.aa2Triplet.get (jalview.schemes.ResidueProperties.aa[i]) + "", jalview.schemes.ResidueProperties.aa[i]); -} -this.makeButton ("B", "B"); -this.makeButton ("Z", "Z"); -this.makeButton ("X", "X"); -this.makeButton ("Gap", "'.','-',' '"); -this.validate (); -}); -Clazz.defineMethod (c$, "rText_actionPerformed", -function () { -try { -var i = Integer.parseInt (this.rText.getText ()); -this.rScroller.setValue (i); -this.rScroller_adjustmentValueChanged (); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -}); -Clazz.defineMethod (c$, "gText_actionPerformed", -function () { -try { -var i = Integer.parseInt (this.gText.getText ()); -this.gScroller.setValue (i); -this.gScroller_adjustmentValueChanged (); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -}); -Clazz.defineMethod (c$, "bText_actionPerformed", -function () { -try { -var i = Integer.parseInt (this.bText.getText ()); -this.bScroller.setValue (i); -this.bScroller_adjustmentValueChanged (); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -}); -Clazz.defineMethod (c$, "rScroller_adjustmentValueChanged", -function () { -this.R = this.rScroller.getValue (); -this.rText.setText (this.R + ""); -this.colourChanged (); -}); -Clazz.defineMethod (c$, "gScroller_adjustmentValueChanged", -function () { -this.G = this.gScroller.getValue (); -this.gText.setText (this.G + ""); -this.colourChanged (); -}); -Clazz.defineMethod (c$, "bScroller_adjustmentValueChanged", -function () { -this.B = this.bScroller.getValue (); -this.bText.setText (this.B + ""); -this.colourChanged (); -}); -Clazz.defineMethod (c$, "colourChanged", -function () { -var col = new java.awt.Color (this.R, this.G, this.B); -this.target.setBackground (col); -this.target.repaint (); -if (this.selectedButton != null) { -this.selectedButton.setBackground (col); -this.selectedButton.repaint (); -}}); -Clazz.defineMethod (c$, "setTargetColour", -function (col) { -this.R = col.getRed (); -this.G = col.getGreen (); -this.B = col.getBlue (); -this.rScroller.setValue (this.R); -this.gScroller.setValue (this.G); -this.bScroller.setValue (this.B); -this.rText.setText (this.R + ""); -this.gText.setText (this.G + ""); -this.bText.setText (this.B + ""); -this.colourChanged (); -}, "java.awt.Color"); -Clazz.defineMethod (c$, "colourButtonPressed", -function (e) { -this.selectedButton = e.getSource (); -this.setTargetColour (this.selectedButton.getBackground ()); -}, "java.awt.event.MouseEvent"); -Clazz.defineMethod (c$, "makeButton", -function (label, aa) { -var button = new awt2swing.Button (); -var col = java.awt.Color.white; -if (this.oldColourScheme != null) { -try { -col = this.oldColourScheme.findColour (aa.charAt (0), -1, null); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -}button.setBackground (col); -this.oldColours.addElement (col); -button.setLabel (label); -button.setForeground (col.darker ().darker ().darker ()); -button.setFont ( new java.awt.Font ("Verdana", 1, 10)); -button.addMouseListener (((Clazz.isClassDefined ("jalview.appletgui.UserDefinedColours$1") ? 0 : jalview.appletgui.UserDefinedColours.$UserDefinedColours$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.UserDefinedColours$1, this, null))); -this.buttonPanel.add (button, null); -}, "~S,~S"); -Clazz.defineMethod (c$, "okButton_actionPerformed", -function () { -this.applyButton_actionPerformed (); -if (this.dialog != null) { -this.dialog.setVisible (false); -}this.frame.setVisible (false); -}); -Clazz.defineMethod (c$, "getColor", -function () { -return new java.awt.Color (this.R, this.G, this.B); -}); -Clazz.defineMethod (c$, "applyButton_actionPerformed", -function () { -if (this.caller != null) { -if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureSettings)) { -(this.caller).setUserColour (this.originalLabel, this.getColor ()); -} else if (Clazz.instanceOf (this.caller, jalview.appletgui.AnnotationColourChooser)) { -if (this.originalLabel.equals ("Min Colour")) { -(this.caller).minColour_actionPerformed (this.getColor ()); -} else { -(this.caller).maxColour_actionPerformed (this.getColor ()); -}} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureRenderer)) { -(this.caller).colourPanel.updateColor (this.getColor ()); -} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureColourChooser)) { -if (this.originalLabel.indexOf ("inimum") > -1) { -(this.caller).minColour_actionPerformed (this.getColor ()); -} else { -(this.caller).maxColour_actionPerformed (this.getColor ()); -}}return; -}var newColours = new Array (24); -for (var i = 0; i < 24; i++) { -var button = this.buttonPanel.getComponent (i); -newColours[i] = button.getBackground (); -} -var ucs = new jalview.schemes.UserColourScheme (newColours); -if (this.ap != null) { -ucs.setThreshold (0, this.ap.av.isIgnoreGapsConsensus ()); -}if (this.ap != null) { -if (this.seqGroup != null) { -this.seqGroup.cs = ucs; -} else { -this.ap.av.setGlobalColourScheme (ucs); -}this.ap.seqPanel.seqCanvas.img = null; -this.ap.paintAlignment (true); -} else if (this.jmol != null) { -this.jmol.setJalviewColourScheme (ucs); -}}); -Clazz.defineMethod (c$, "cancelButton_actionPerformed", -function () { -if (this.caller != null) { -if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureSettings)) { -(this.caller).setUserColour (this.originalLabel, this.originalColour); -} else if (Clazz.instanceOf (this.caller, jalview.appletgui.AnnotationColourChooser)) { -if (this.originalLabel.equals ("Min Colour")) { -(this.caller).minColour_actionPerformed (this.originalColour); -} else { -(this.caller).maxColour_actionPerformed (this.originalColour); -}} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureRenderer)) { -(this.caller).colourPanel.updateColor (this.originalColour); -} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureColourChooser)) { -if (this.originalLabel.indexOf ("inimum") > -1) { -(this.caller).minColour_actionPerformed (this.originalColour); -} else { -(this.caller).maxColour_actionPerformed (this.originalColour); -}}if (this.dialog != null) { -this.dialog.setVisible (false); -}this.frame.setVisible (false); -return; -}var newColours = new Array (24); -for (var i = 0; i < 24; i++) { -newColours[i] = this.oldColours.elementAt (i); -this.buttonPanel.getComponent (i).setBackground (newColours[i]); -} -var ucs = new jalview.schemes.UserColourScheme (newColours); -if (this.ap != null) { -if (this.seqGroup != null) { -this.seqGroup.cs = ucs; -} else { -this.ap.av.setGlobalColourScheme (ucs); -}this.ap.paintAlignment (true); -} else if (this.jmol != null) { -this.jmol.setJalviewColourScheme (ucs); -}this.frame.setVisible (false); -}); -Clazz.defineMethod (c$, "jbInit", -($fz = function () { -this.setLayout (null); -this.buttonPanel.setLayout (this.gridLayout); -this.gridLayout.setColumns (6); -this.gridLayout.setRows (4); -this.okButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.okButton.setLabel (jalview.util.MessageManager.getString ("action.ok")); -this.okButton.addActionListener (this); -this.applyButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.applyButton.setLabel (jalview.util.MessageManager.getString ("action.apply")); -this.applyButton.addActionListener (this); -this.cancelButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); -this.cancelButton.setLabel (jalview.util.MessageManager.getString ("action.cancel")); -this.cancelButton.addActionListener (this); -this.setBackground ( new java.awt.Color (212, 208, 223)); -this.okcancelPanel.setBounds ( new java.awt.Rectangle (0, 265, 400, 35)); -this.buttonPanel.setBounds ( new java.awt.Rectangle (0, 123, 400, 142)); -this.rScroller.setMaximum (256); -this.rScroller.setMinimum (0); -this.rScroller.setOrientation (0); -this.rScroller.setUnitIncrement (1); -this.rScroller.setVisibleAmount (1); -this.rScroller.setBounds ( new java.awt.Rectangle (36, 27, 119, 19)); -this.rScroller.addAdjustmentListener (this); -this.label1.setAlignment (4); -this.label1.setText ("R"); -this.label1.setBounds ( new java.awt.Rectangle (19, 30, 16, 15)); -this.rText.setFont ( new java.awt.Font ("Dialog", 0, 10)); -this.rText.setText ("0 "); -this.rText.setBounds ( new java.awt.Rectangle (156, 27, 53, 19)); -this.rText.addActionListener (this); -this.rText.addFocusListener (this); -this.label4.setAlignment (4); -this.label4.setText ("G"); -this.label4.setBounds ( new java.awt.Rectangle (15, 56, 20, 15)); -this.gScroller.setMaximum (256); -this.gScroller.setMinimum (0); -this.gScroller.setOrientation (0); -this.gScroller.setUnitIncrement (1); -this.gScroller.setVisibleAmount (1); -this.gScroller.setBounds ( new java.awt.Rectangle (35, 52, 120, 20)); -this.gScroller.addAdjustmentListener (this); -this.gText.setFont ( new java.awt.Font ("Dialog", 0, 10)); -this.gText.setText ("0 "); -this.gText.setBounds ( new java.awt.Rectangle (156, 52, 53, 20)); -this.gText.addActionListener (this); -this.gText.addFocusListener (this); -this.label5.setAlignment (4); -this.label5.setText ("B"); -this.label5.setBounds ( new java.awt.Rectangle (14, 82, 20, 15)); -this.bScroller.setMaximum (256); -this.bScroller.setMinimum (0); -this.bScroller.setOrientation (0); -this.bScroller.setUnitIncrement (1); -this.bScroller.setVisibleAmount (1); -this.bScroller.setBounds ( new java.awt.Rectangle (35, 78, 120, 20)); -this.bScroller.addAdjustmentListener (this); -this.bText.setFont ( new java.awt.Font ("Dialog", 0, 10)); -this.bText.setText ("0 "); -this.bText.setBounds ( new java.awt.Rectangle (157, 78, 52, 20)); -this.bText.addActionListener (this); -this.bText.addFocusListener (this); -this.target.setBackground (java.awt.Color.black); -this.target.setBounds ( new java.awt.Rectangle (229, 26, 134, 79)); -this.add (this.okcancelPanel, null); -this.okcancelPanel.add (this.okButton, null); -this.okcancelPanel.add (this.applyButton, null); -this.okcancelPanel.add (this.cancelButton, null); -this.add (this.rText); -this.add (this.gText); -this.add (this.bText); -this.add (this.buttonPanel, null); -this.add (this.target, null); -this.add (this.gScroller); -this.add (this.rScroller); -this.add (this.bScroller); -this.add (this.label5); -this.add (this.label4); -this.add (this.label1); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "focusGained", -function (e) { -}, "java.awt.event.FocusEvent"); -Clazz.overrideMethod (c$, "focusLost", -function (e) { -var c = e.getComponent (); -if (c === this.rText) { -this.rText_actionPerformed (); -} else { -if (c === this.gText) { -this.gText_actionPerformed (); -} else { -if (c === this.bText) { -this.bText_actionPerformed (); -}}}}, "java.awt.event.FocusEvent"); -c$.$UserDefinedColours$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.appletgui, "UserDefinedColours$1", java.awt.event.MouseAdapter); -Clazz.overrideMethod (c$, "mousePressed", -function (e) { -this.b$["jalview.appletgui.UserDefinedColours"].colourButtonPressed (e); -}, "java.awt.event.MouseEvent"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.appletgui"); +Clazz.load (["awt2swing.Panel", "java.awt.event.ActionListener", "$.AdjustmentListener", "$.FocusListener", "awt2swing.Button", "$.Label", "$.Scrollbar", "$.TextField", "java.awt.GridLayout", "java.util.Vector"], "jalview.appletgui.UserDefinedColours", ["awt2swing.Frame", "jalview.appletgui.AnnotationColourChooser", "$.FeatureColourChooser", "$.FeatureRenderer", "$.FeatureSettings", "jalview.bin.JalviewLite", "jalview.schemes.ResidueProperties", "$.UserColourScheme", "jalview.util.MessageManager", "java.awt.Color", "$.Dialog", "$.Font", "$.Rectangle", "java.awt.event.MouseAdapter", "java.lang.Error"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ap = null; +this.seqGroup = null; +this.selectedButton = null; +this.oldColours = null; +this.oldColourScheme = null; +this.frame = null; +this.jmol = null; +this.dialog = null; +this.caller = null; +this.originalLabel = null; +this.originalColour = null; +this.R = 0; +this.G = 0; +this.B = 0; +this.buttonPanel = null; +this.gridLayout = null; +this.okcancelPanel = null; +this.okButton = null; +this.applyButton = null; +this.cancelButton = null; +this.rScroller = null; +this.label1 = null; +this.rText = null; +this.label4 = null; +this.gScroller = null; +this.gText = null; +this.label5 = null; +this.bScroller = null; +this.bText = null; +this.target = null; +Clazz.instantialize (this, arguments); +}, jalview.appletgui, "UserDefinedColours", awt2swing.Panel, [java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.FocusListener]); +Clazz.prepareFields (c$, function () { +this.oldColours = new java.util.Vector (); +this.buttonPanel = new awt2swing.Panel (); +this.gridLayout = new java.awt.GridLayout (); +this.okcancelPanel = new awt2swing.Panel (); +this.okButton = new awt2swing.Button (); +this.applyButton = new awt2swing.Button (); +this.cancelButton = new awt2swing.Button (); +this.rScroller = new awt2swing.Scrollbar (); +this.label1 = new awt2swing.Label (); +this.rText = new awt2swing.TextField (); +this.label4 = new awt2swing.Label (); +this.gScroller = new awt2swing.Scrollbar (); +this.gText = new awt2swing.TextField (); +this.label5 = new awt2swing.Label (); +this.bScroller = new awt2swing.Scrollbar (); +this.bText = new awt2swing.TextField (); +this.target = new awt2swing.Panel (); +}); +Clazz.defineMethod (c$, "loadDefaultColours", +function () { +return null; +}); +Clazz.makeConstructor (c$, +function (ap, sg) { +Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); +this.ap = ap; +this.seqGroup = sg; +if (this.seqGroup != null) { +this.oldColourScheme = this.seqGroup.cs; +} else { +this.oldColourScheme = ap.av.getGlobalColourScheme (); +}this.init (); +}, "jalview.appletgui.AlignmentPanel,jalview.datamodel.SequenceGroup"); +Clazz.makeConstructor (c$, +function (jmol) { +Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); +this.jmol = jmol; +this.init (); +}, "jalview.appletgui.AppletJmol"); +Clazz.makeConstructor (c$, +function (fr, alignframe) { +Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); +this.caller = fr; +this.originalColour = fr.colourPanel.getBackground (); +this.originalLabel = "Feature Colour"; +this.setForDialog ("Select Feature Colour", alignframe); +this.setTargetColour (fr.colourPanel.getBackground ()); +this.dialog.setVisible (true); +}, "jalview.appletgui.FeatureRenderer,awt2swing.Frame"); +Clazz.makeConstructor (c$, +function (caller, col1, alignframe) { +this.construct (caller, col1, alignframe, "Select Colour"); +}, "java.awt.Component,java.awt.Color,awt2swing.Frame"); +Clazz.makeConstructor (c$, +function (caller, col1, alignframe, title) { +Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); +this.caller = caller; +this.originalColour = col1; +this.originalLabel = title; +this.setForDialog (title, alignframe); +this.setTargetColour (col1); +this.dialog.setVisible (true); +}, "java.awt.Component,java.awt.Color,awt2swing.Frame,~S"); +Clazz.makeConstructor (c$, +function (caller, label, colour) { +this.construct (caller, label, colour, colour); +}, "~O,~S,java.awt.Color"); +Clazz.makeConstructor (c$, +function (me, type, graduatedColor) { +this.construct (me, type, graduatedColor, graduatedColor.getMaxColor ()); +}, "jalview.appletgui.FeatureSettings,~S,jalview.schemes.GraduatedColor"); +Clazz.makeConstructor (c$, +($fz = function (caller, label, ocolour, colour) { +Clazz.superConstructor (this, jalview.appletgui.UserDefinedColours, []); +this.caller = caller; +this.originalColour = ocolour; +this.originalLabel = label; +this.init (); +this.remove (this.buttonPanel); +this.setTargetColour (colour); +this.okcancelPanel.setBounds ( new java.awt.Rectangle (0, 113, 400, 35)); +this.frame.setTitle (jalview.util.MessageManager.getString ("label.user_defined_colours") + " - " + label); +this.frame.setSize (420, 200); +}, $fz.isPrivate = true, $fz), "~O,~S,~O,java.awt.Color"); +Clazz.defineMethod (c$, "setForDialog", +function (title, alignframe) { +this.init (); +this.frame.setVisible (false); +this.remove (this.buttonPanel); +if (Clazz.instanceOf (alignframe, awt2swing.Frame)) { +this.dialog = new java.awt.Dialog (alignframe, title, true); +} else { +throw new Error (jalview.util.MessageManager.getString ("label.error_unsupported_owwner_user_colour_scheme")); +}this.dialog.add (this); +this.setSize (400, 123); +this.okcancelPanel.setBounds ( new java.awt.Rectangle (0, 123, 400, 35)); +var height = 160 + alignframe.getInsets ().top + this.getInsets ().bottom; +var width = 400; +this.dialog.setBounds (alignframe.getBounds ().x + Clazz.doubleToInt ((alignframe.getSize ().width - width) / 2), alignframe.getBounds ().y + Clazz.doubleToInt ((alignframe.getSize ().height - height) / 2), width, height); +}, "~S,java.awt.Container"); +Clazz.overrideMethod (c$, "actionPerformed", +function (evt) { +var source = evt.getSource (); +if (source === this.okButton) { +this.okButton_actionPerformed (); +} else if (source === this.applyButton) { +this.applyButton_actionPerformed (); +} else if (source === this.cancelButton) { +this.cancelButton_actionPerformed (); +} else if (source === this.rText) { +this.rText_actionPerformed (); +} else if (source === this.gText) { +this.gText_actionPerformed (); +} else if (source === this.bText) { +this.bText_actionPerformed (); +}}, "java.awt.event.ActionEvent"); +Clazz.overrideMethod (c$, "adjustmentValueChanged", +function (evt) { +if (evt.getSource () === this.rScroller) { +this.rScroller_adjustmentValueChanged (); +} else if (evt.getSource () === this.gScroller) { +this.gScroller_adjustmentValueChanged (); +} else if (evt.getSource () === this.bScroller) { +this.bScroller_adjustmentValueChanged (); +}}, "java.awt.event.AdjustmentEvent"); +Clazz.defineMethod (c$, "init", +function () { +try { +this.jbInit (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} +this.frame = new awt2swing.Frame (); +this.frame.add (this); +jalview.bin.JalviewLite.addFrame (this.frame, jalview.util.MessageManager.getString ("label.user_defined_colours"), 420, 345); +if (this.seqGroup != null) { +this.frame.setTitle (this.frame.getTitle () + " (" + this.seqGroup.getName () + ")"); +}for (var i = 0; i < 20; i++) { +this.makeButton (jalview.schemes.ResidueProperties.aa2Triplet.get (jalview.schemes.ResidueProperties.aa[i]) + "", jalview.schemes.ResidueProperties.aa[i]); +} +this.makeButton ("B", "B"); +this.makeButton ("Z", "Z"); +this.makeButton ("X", "X"); +this.makeButton ("Gap", "'.','-',' '"); +this.validate (); +}); +Clazz.defineMethod (c$, "rText_actionPerformed", +function () { +try { +var i = Integer.parseInt (this.rText.getText ()); +this.rScroller.setValue (i); +this.rScroller_adjustmentValueChanged (); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +}); +Clazz.defineMethod (c$, "gText_actionPerformed", +function () { +try { +var i = Integer.parseInt (this.gText.getText ()); +this.gScroller.setValue (i); +this.gScroller_adjustmentValueChanged (); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +}); +Clazz.defineMethod (c$, "bText_actionPerformed", +function () { +try { +var i = Integer.parseInt (this.bText.getText ()); +this.bScroller.setValue (i); +this.bScroller_adjustmentValueChanged (); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +}); +Clazz.defineMethod (c$, "rScroller_adjustmentValueChanged", +function () { +this.R = this.rScroller.getValue (); +this.rText.setText (this.R + ""); +this.colourChanged (); +}); +Clazz.defineMethod (c$, "gScroller_adjustmentValueChanged", +function () { +this.G = this.gScroller.getValue (); +this.gText.setText (this.G + ""); +this.colourChanged (); +}); +Clazz.defineMethod (c$, "bScroller_adjustmentValueChanged", +function () { +this.B = this.bScroller.getValue (); +this.bText.setText (this.B + ""); +this.colourChanged (); +}); +Clazz.defineMethod (c$, "colourChanged", +function () { +var col = new java.awt.Color (this.R, this.G, this.B); +this.target.setBackground (col); +this.target.repaint (); +if (this.selectedButton != null) { +this.selectedButton.setBackground (col); +this.selectedButton.repaint (); +}}); +Clazz.defineMethod (c$, "setTargetColour", +function (col) { +this.R = col.getRed (); +this.G = col.getGreen (); +this.B = col.getBlue (); +this.rScroller.setValue (this.R); +this.gScroller.setValue (this.G); +this.bScroller.setValue (this.B); +this.rText.setText (this.R + ""); +this.gText.setText (this.G + ""); +this.bText.setText (this.B + ""); +this.colourChanged (); +}, "java.awt.Color"); +Clazz.defineMethod (c$, "colourButtonPressed", +function (e) { +this.selectedButton = e.getSource (); +this.setTargetColour (this.selectedButton.getBackground ()); +}, "java.awt.event.MouseEvent"); +Clazz.defineMethod (c$, "makeButton", +function (label, aa) { +var button = new awt2swing.Button (); +var col = java.awt.Color.white; +if (this.oldColourScheme != null) { +try { +col = this.oldColourScheme.findColour (aa.charAt (0), -1, null); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +}button.setBackground (col); +this.oldColours.addElement (col); +button.setLabel (label); +button.setForeground (col.darker ().darker ().darker ()); +button.setFont ( new java.awt.Font ("Verdana", 1, 10)); +button.addMouseListener (((Clazz.isClassDefined ("jalview.appletgui.UserDefinedColours$1") ? 0 : jalview.appletgui.UserDefinedColours.$UserDefinedColours$1$ ()), Clazz.innerTypeInstance (jalview.appletgui.UserDefinedColours$1, this, null))); +this.buttonPanel.add (button, null); +}, "~S,~S"); +Clazz.defineMethod (c$, "okButton_actionPerformed", +function () { +this.applyButton_actionPerformed (); +if (this.dialog != null) { +this.dialog.setVisible (false); +}this.frame.setVisible (false); +}); +Clazz.defineMethod (c$, "getColor", +function () { +return new java.awt.Color (this.R, this.G, this.B); +}); +Clazz.defineMethod (c$, "applyButton_actionPerformed", +function () { +if (this.caller != null) { +if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureSettings)) { +(this.caller).setUserColour (this.originalLabel, this.getColor ()); +} else if (Clazz.instanceOf (this.caller, jalview.appletgui.AnnotationColourChooser)) { +if (this.originalLabel.equals ("Min Colour")) { +(this.caller).minColour_actionPerformed (this.getColor ()); +} else { +(this.caller).maxColour_actionPerformed (this.getColor ()); +}} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureRenderer)) { +(this.caller).colourPanel.updateColor (this.getColor ()); +} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureColourChooser)) { +if (this.originalLabel.indexOf ("inimum") > -1) { +(this.caller).minColour_actionPerformed (this.getColor ()); +} else { +(this.caller).maxColour_actionPerformed (this.getColor ()); +}}return; +}var newColours = new Array (24); +for (var i = 0; i < 24; i++) { +var button = this.buttonPanel.getComponent (i); +newColours[i] = button.getBackground (); +} +var ucs = new jalview.schemes.UserColourScheme (newColours); +if (this.ap != null) { +ucs.setThreshold (0, this.ap.av.isIgnoreGapsConsensus ()); +}if (this.ap != null) { +if (this.seqGroup != null) { +this.seqGroup.cs = ucs; +} else { +this.ap.av.setGlobalColourScheme (ucs); +}this.ap.seqPanel.seqCanvas.img = null; +this.ap.paintAlignment (true); +} else if (this.jmol != null) { +this.jmol.setJalviewColourScheme (ucs); +}}); +Clazz.defineMethod (c$, "cancelButton_actionPerformed", +function () { +if (this.caller != null) { +if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureSettings)) { +(this.caller).setUserColour (this.originalLabel, this.originalColour); +} else if (Clazz.instanceOf (this.caller, jalview.appletgui.AnnotationColourChooser)) { +if (this.originalLabel.equals ("Min Colour")) { +(this.caller).minColour_actionPerformed (this.originalColour); +} else { +(this.caller).maxColour_actionPerformed (this.originalColour); +}} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureRenderer)) { +(this.caller).colourPanel.updateColor (this.originalColour); +} else if (Clazz.instanceOf (this.caller, jalview.appletgui.FeatureColourChooser)) { +if (this.originalLabel.indexOf ("inimum") > -1) { +(this.caller).minColour_actionPerformed (this.originalColour); +} else { +(this.caller).maxColour_actionPerformed (this.originalColour); +}}if (this.dialog != null) { +this.dialog.setVisible (false); +}this.frame.setVisible (false); +return; +}var newColours = new Array (24); +for (var i = 0; i < 24; i++) { +newColours[i] = this.oldColours.elementAt (i); +this.buttonPanel.getComponent (i).setBackground (newColours[i]); +} +var ucs = new jalview.schemes.UserColourScheme (newColours); +if (this.ap != null) { +if (this.seqGroup != null) { +this.seqGroup.cs = ucs; +} else { +this.ap.av.setGlobalColourScheme (ucs); +}this.ap.paintAlignment (true); +} else if (this.jmol != null) { +this.jmol.setJalviewColourScheme (ucs); +}this.frame.setVisible (false); +}); +Clazz.defineMethod (c$, "jbInit", +($fz = function () { +this.setLayout (null); +this.buttonPanel.setLayout (this.gridLayout); +this.gridLayout.setColumns (6); +this.gridLayout.setRows (4); +this.okButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.okButton.setLabel (jalview.util.MessageManager.getString ("action.ok")); +this.okButton.addActionListener (this); +this.applyButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.applyButton.setLabel (jalview.util.MessageManager.getString ("action.apply")); +this.applyButton.addActionListener (this); +this.cancelButton.setFont ( new java.awt.Font ("Verdana", 0, 11)); +this.cancelButton.setLabel (jalview.util.MessageManager.getString ("action.cancel")); +this.cancelButton.addActionListener (this); +this.setBackground ( new java.awt.Color (212, 208, 223)); +this.okcancelPanel.setBounds ( new java.awt.Rectangle (0, 265, 400, 35)); +this.buttonPanel.setBounds ( new java.awt.Rectangle (0, 123, 400, 142)); +this.rScroller.setMaximum (256); +this.rScroller.setMinimum (0); +this.rScroller.setOrientation (0); +this.rScroller.setUnitIncrement (1); +this.rScroller.setVisibleAmount (1); +this.rScroller.setBounds ( new java.awt.Rectangle (36, 27, 119, 19)); +this.rScroller.addAdjustmentListener (this); +this.label1.setAlignment (4); +this.label1.setText ("R"); +this.label1.setBounds ( new java.awt.Rectangle (19, 30, 16, 15)); +this.rText.setFont ( new java.awt.Font ("Dialog", 0, 10)); +this.rText.setText ("0 "); +this.rText.setBounds ( new java.awt.Rectangle (156, 27, 53, 19)); +this.rText.addActionListener (this); +this.rText.addFocusListener (this); +this.label4.setAlignment (4); +this.label4.setText ("G"); +this.label4.setBounds ( new java.awt.Rectangle (15, 56, 20, 15)); +this.gScroller.setMaximum (256); +this.gScroller.setMinimum (0); +this.gScroller.setOrientation (0); +this.gScroller.setUnitIncrement (1); +this.gScroller.setVisibleAmount (1); +this.gScroller.setBounds ( new java.awt.Rectangle (35, 52, 120, 20)); +this.gScroller.addAdjustmentListener (this); +this.gText.setFont ( new java.awt.Font ("Dialog", 0, 10)); +this.gText.setText ("0 "); +this.gText.setBounds ( new java.awt.Rectangle (156, 52, 53, 20)); +this.gText.addActionListener (this); +this.gText.addFocusListener (this); +this.label5.setAlignment (4); +this.label5.setText ("B"); +this.label5.setBounds ( new java.awt.Rectangle (14, 82, 20, 15)); +this.bScroller.setMaximum (256); +this.bScroller.setMinimum (0); +this.bScroller.setOrientation (0); +this.bScroller.setUnitIncrement (1); +this.bScroller.setVisibleAmount (1); +this.bScroller.setBounds ( new java.awt.Rectangle (35, 78, 120, 20)); +this.bScroller.addAdjustmentListener (this); +this.bText.setFont ( new java.awt.Font ("Dialog", 0, 10)); +this.bText.setText ("0 "); +this.bText.setBounds ( new java.awt.Rectangle (157, 78, 52, 20)); +this.bText.addActionListener (this); +this.bText.addFocusListener (this); +this.target.setBackground (java.awt.Color.black); +this.target.setBounds ( new java.awt.Rectangle (229, 26, 134, 79)); +this.add (this.okcancelPanel, null); +this.okcancelPanel.add (this.okButton, null); +this.okcancelPanel.add (this.applyButton, null); +this.okcancelPanel.add (this.cancelButton, null); +this.add (this.rText); +this.add (this.gText); +this.add (this.bText); +this.add (this.buttonPanel, null); +this.add (this.target, null); +this.add (this.gScroller); +this.add (this.rScroller); +this.add (this.bScroller); +this.add (this.label5); +this.add (this.label4); +this.add (this.label1); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "focusGained", +function (e) { +}, "java.awt.event.FocusEvent"); +Clazz.overrideMethod (c$, "focusLost", +function (e) { +var c = e.getComponent (); +if (c === this.rText) { +this.rText_actionPerformed (); +} else { +if (c === this.gText) { +this.gText_actionPerformed (); +} else { +if (c === this.bText) { +this.bText_actionPerformed (); +}}}}, "java.awt.event.FocusEvent"); +c$.$UserDefinedColours$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.appletgui, "UserDefinedColours$1", java.awt.event.MouseAdapter); +Clazz.overrideMethod (c$, "mousePressed", +function (e) { +this.b$["jalview.appletgui.UserDefinedColours"].colourButtonPressed (e); +}, "java.awt.event.MouseEvent"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/bin/Cache.js b/bin/jalview/bin/Cache.js index b2a7cae..3013f58 100644 --- a/bin/jalview/bin/Cache.js +++ b/bin/jalview/bin/Cache.js @@ -1,29 +1,29 @@ -Clazz.declarePackage ("jalview.bin"); -c$ = Clazz.decorateAsClass (function () { -if (!Clazz.isClassDefined ("jalview.bin.Cache.Log")) { -jalview.bin.Cache.$Cache$Log$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.bin, "Cache"); -c$.getDefault = Clazz.defineMethod (c$, "getDefault", -function (string, string2) { -return null; -}, "~S,~S"); -c$.$Cache$Log$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -Clazz.instantialize (this, arguments); -}, jalview.bin.Cache, "Log"); -Clazz.defineMethod (c$, "error", -function (a) { -}, "~S"); -Clazz.defineMethod (c$, "isDebugEnabled", -function () { -return false; -}); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"CASTORLOGLEVEL", null, -"log", null); +Clazz.declarePackage ("jalview.bin"); +c$ = Clazz.decorateAsClass (function () { +if (!Clazz.isClassDefined ("jalview.bin.Cache.Log")) { +jalview.bin.Cache.$Cache$Log$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.bin, "Cache"); +c$.getDefault = Clazz.defineMethod (c$, "getDefault", +function (string, string2) { +return null; +}, "~S,~S"); +c$.$Cache$Log$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +Clazz.instantialize (this, arguments); +}, jalview.bin.Cache, "Log"); +Clazz.defineMethod (c$, "error", +function (a) { +}, "~S"); +Clazz.defineMethod (c$, "isDebugEnabled", +function () { +return false; +}); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"CASTORLOGLEVEL", null, +"log", null); diff --git a/bin/jalview/bin/JalviewLite$4.class b/bin/jalview/bin/JalviewLite$4.class index 09353ffdf84fc88e703e3246ace3a756cb725b31..884af19eb9a936cacbe2e117efc2e06803f378f6 100644 GIT binary patch delta 24 gcmdnRzmtE%G&aV6lc%$NVdG?A`pytPc@nz@0C!#pyZ`_I delta 25 hcmdnVzl(pvG&aWnlc%$NVdr9C{>>2MGd*$M$`RR#3` diff --git a/bin/jalview/bin/JalviewLite$LoadingThread.class b/bin/jalview/bin/JalviewLite$LoadingThread.class index 6ffac37375320fca723ab6fd9057595c2ef345e7..4dc6751b21f72934fb454ff3f78ba733c567db79 100644 GIT binary patch delta 122 zcmV-=0EPeEc;tAnH7fxKvoO+M3W0VQkI4tX8-^I delta 138 zcmaD-akpZFsWv0$W;5+xR_1C3$;rnIN|>0KHd`BRWMNd?{MJ;2QJRN=$TI$62xMo9{>8xNv^mhCjfpXP^9?I0 nM#TUI?*9z349x5djO+~B>`cpmG$S{oBhWN&5W{J*kWCN(W>X$p diff --git a/bin/jalview/bin/JalviewLite.class b/bin/jalview/bin/JalviewLite.class index ae19296f78a267d582476954c2bed9b6abe49b54..7d7000785d2b23642896449277f1e882e9a9d94b 100644 GIT binary patch delta 193 zcmX@QiD}O!rVWfyjHfm;MYXXrJ2R+G?oRAsasJ6*Hd!{wnbBf%QqnC!#&?@-OD-}p z%P??G7AzBH)ZDCArq0HgyVgko;P}hH&dA8)%g*A%z#k0MCCdp^s1H||znQZs2xJr6zm%&7)c4@9~QjLhkiCzfe!4k`P}%9yv=tHz2& zz?ebQK-`I)sX+KQLx7|m)8r`)ih|-y{0vMi<_sYWj0~X+42*`Gk2Xj%s)#ah{$*fi zWaRN>XYpa+7XWFKF=DomU6 kn|BE@F4(L!ErpTUnt^lj#OeBMI!rRMf=-){Os`-B0FdN5SpWb4 diff --git a/bin/jalview/bin/JalviewLite.js b/bin/jalview/bin/JalviewLite.js index 23d66b7..1049dcb 100644 --- a/bin/jalview/bin/JalviewLite.js +++ b/bin/jalview/bin/JalviewLite.js @@ -1,1617 +1,1617 @@ -Clazz.declarePackage ("jalview.bin"); -Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.javascript.JalviewLiteJsApi", "java.lang.Thread", "javax.swing.JApplet", "jalview.util.MessageManager", "java.util.Hashtable", "$.Vector", "javax.swing.JButton"], "jalview.bin.JalviewLite", ["jalview.analysis.SequenceIdMatcher", "jalview.appletgui.AlignFrame", "$.EmbmenuFrame", "$.FeatureSettings", "$.SplitFrame", "jalview.datamodel.Alignment", "$.AlignmentOrder", "$.ColumnSelection", "$.PDBEntry", "$.SequenceGroup", "jalview.io.AnnotationFile", "$.AppletFormatAdapter", "$.FileParse", "$.IdentifyFile", "$.JnetAnnotationMaker", "$.NewickFile", "jalview.javascript.JSFunctionExec", "$.JsSelectionSender", "$.MouseOverListener", "$.MouseOverStructureListener", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.ColourSchemeProperty", "$.UserColourScheme", "jalview.structure.SelectionListener", "$.StructureSelectionManager", "java.awt.Color", "$.EventQueue", "$.Font", "java.awt.event.ActionListener", "$.WindowAdapter", "java.io.BufferedReader", "$.InputStreamReader", "java.lang.Error", "$.StringBuffer", "java.net.URL", "java.util.StringTokenizer", "netscape.javascript.JSObject"], function () { -c$ = Clazz.decorateAsClass (function () { -this.embedded = false; -this.enableSplitFrame = false; -this.showButton = true; -this.checkForJmol = true; -this.jalviewServletURL = null; -this.startupFile = "No file"; -this.helpUrl = null; -this.externalstructureviewer = null; -this.sep = null; -this.rgb = null; -this.labelColour = null; -this.initjscallback = null; -this.pdbFile = null; -this.sequence = null; -this.jnetFile = null; -this.annotations = null; -this.hideFeatureGroups = null; -this.showFeatureGroups = null; -this.features = null; -this.showFeatureSettings = null; -this.scoreFile = null; -this.treeFile = null; -this.windowWidth = null; -this.windowHeight = null; -this.defaultColour = null; -this.sortBy = null; -this.wrap = null; -this.centrecolumnlabels = null; -this.userDefinedColour = null; -this.widthScale = null; -this.heightScale = null; -this.upperCase = null; -this.file2 = null; -this.javascriptListeners = null; -this.jsFunctionExec = null; -this.fileFound = true; -this.launcher = null; -this.currentAlignFrame = null; -this.initialAlignFrame = null; -this.checkedForJmol = false; -this.jmolAvailable = false; -this.alignPdbStructures = false; -this.useXtrnalSviewer = false; -this.haveShownLoadMessage = false; -if (!Clazz.isClassDefined ("jalview.bin.JalviewLite.LoadJmolThread")) { -jalview.bin.JalviewLite.$JalviewLite$LoadJmolThread$ (); -} -if (!Clazz.isClassDefined ("jalview.bin.JalviewLite.LoadingThread")) { -jalview.bin.JalviewLite.$JalviewLite$LoadingThread$ (); -} -this.separator = "\u00ac"; -this.jsfallbackEnabled = false; -this.jshashes = null; -this.jsmessages = null; -this.jsExecQueue = null; -Clazz.instantialize (this, arguments); -}, jalview.bin, "JalviewLite", javax.swing.JApplet, [jalview.api.StructureSelectionManagerProvider, jalview.javascript.JalviewLiteJsApi]); -Clazz.prepareFields (c$, function () { -this.javascriptListeners = new java.util.Vector (); -this.launcher = new javax.swing.JButton (jalview.util.MessageManager.getString ("label.start_jalview")); -this.jshashes = new java.util.Hashtable (); -this.jsmessages = new java.util.Hashtable (); -this.jsExecQueue = new java.util.Vector (); -}); -Clazz.defineMethod (c$, "setParams", -($fz = function () { -jalview.bin.JalviewLite.debug = "true".equalsIgnoreCase (this.getParameter ("debug")); -this.enableSplitFrame = "true".equalsIgnoreCase (this.getParameter ("enableSplitFrame")); -this.embedded = "true".equalsIgnoreCase (this.getParameter ("embedded")); -this.showButton = !"false".equalsIgnoreCase (this.getParameter ("showbutton")); -this.jalviewServletURL = this.getParameter ("APPLICATION_URL"); -this.startupFile = this.getParameter ("file"); -this.helpUrl = this.getParameter ("jalviewhelpurl"); -this.externalstructureviewer = this.getParameter ("externalstructureviewer"); -this.checkForJmol = !"true".equals (this.getParameter ("nojmol")); -this.sep = this.getParameter ("separator"); -this.rgb = this.getParameter ("RGB"); -this.labelColour = this.getParameter ("label"); -this.initjscallback = this.getParameter ("oninit"); -this.pdbFile = this.getParameter ("PDBFILE"); -this.sequence = this.getParameter ("PDBSEQ"); -this.jnetFile = this.getParameter ("jnetfile"); -this.annotations = this.getParameter ("annotations"); -this.hideFeatureGroups = this.getParameter ("hidefeaturegroups"); -this.showFeatureGroups = this.getParameter ("showfeaturegroups"); -this.features = this.getParameter ("features"); -this.showFeatureSettings = this.getParameter ("showFeatureSettings"); -this.scoreFile = this.getParameter ("scoreFile"); -this.treeFile = this.getParameter ("tree"); -if (this.treeFile == null) this.treeFile = this.getParameter ("treeFile"); -this.windowWidth = this.getParameter ("windowWidth"); -this.windowHeight = this.getParameter ("windowHeight"); -this.defaultColour = this.getParameter ("defaultColour"); -this.sortBy = this.getParameter ("sortBy"); -this.wrap = this.getParameter ("wrap"); -this.centrecolumnlabels = this.getParameter ("centrecolumnlabels"); -this.userDefinedColour = this.getParameter ("userDefinedColour"); -this.widthScale = this.getParameter ("widthScale"); -this.heightScale = this.getParameter ("heightScale"); -this.upperCase = this.getParameter ("upperCase"); -this.file2 = this.getParameter ("file2"); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getDefaultParameter", -function (name, def) { -var stn; -if ((stn = this.getParameter (name)) == null) { -return def; -}if (stn.toLowerCase ().equals ("true")) { -return true; -}return false; -}, "~S,~B"); -Clazz.defineMethod (c$, "getLinkParams", -function (links) { -var label; -var url; -for (var i = 1; i < 10; i++) { -label = this.getParameter ("linkLabel_" + i); -url = this.getParameter ("linkURL_" + i); -if (label != null && url != null) { -links.addElement (label + "|" + url); -}} -}, "java.util.Vector"); -Clazz.defineMethod (c$, "getStructureSelectionManager", -function () { -return jalview.structure.StructureSelectionManager.getStructureSelectionManager (this); -}); -Clazz.defineMethod (c$, "getSelectedSequences", -function () { -return this.getSelectedSequencesFrom (this.getDefaultTargetFrame ()); -}); -Clazz.defineMethod (c$, "getSelectedSequences", -function (sep) { -return this.getSelectedSequencesFrom (this.getDefaultTargetFrame (), sep); -}, "~S"); -Clazz.defineMethod (c$, "getSelectedSequencesFrom", -function (alf) { -return this.getSelectedSequencesFrom (alf, this.separator); -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "getSelectedSequencesFrom", -function (alf, sep) { -var result = new StringBuffer (""); -if (sep == null || sep.length == 0) { -sep = this.separator; -}if (alf.viewport.getSelectionGroup () != null) { -var seqs = alf.viewport.getSelectionGroup ().getSequencesInOrder (alf.viewport.getAlignment ()); -for (var i = 0; i < seqs.length; i++) { -result.append (seqs[i].getName ()); -result.append (sep); -} -}return result.toString (); -}, "jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "highlight", -function (sequenceId, position, alignedPosition) { -this.highlightIn (this.getDefaultTargetFrame (), sequenceId, position, alignedPosition); -}, "~S,~S,~S"); -Clazz.overrideMethod (c$, "highlightIn", -function (alf, sequenceId, position, alignedPosition) { -var matcher = new jalview.analysis.SequenceIdMatcher (alf.viewport.getAlignment ().getSequencesArray ()); -var sq = matcher.findIdMatch (sequenceId); -if (sq != null) { -var apos = -1; -try { -apos = new Integer (position).intValue (); -apos--; -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -return; -} else { -throw ex; -} -} -var me = this; -var pos = apos; -if (alignedPosition != null && (alignedPosition.trim ().length == 0 || alignedPosition.toLowerCase ().indexOf ("false") > -1)) { -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$1") ? 0 : jalview.bin.JalviewLite.$JalviewLite$1$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$1, this, Clazz.cloneFinals ("me", me, "sq", sq, "pos", pos)))); -} else { -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$2") ? 0 : jalview.bin.JalviewLite.$JalviewLite$2$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$2, this, Clazz.cloneFinals ("me", me, "sq", sq, "pos", pos)))); -}}}, "jalview.appletgui.AlignFrame,~S,~S,~S"); -Clazz.defineMethod (c$, "select", -function (sequenceIds, columns) { -this.selectIn (this.getDefaultTargetFrame (), sequenceIds, columns, this.separator); -}, "~S,~S"); -Clazz.defineMethod (c$, "select", -function (sequenceIds, columns, sep) { -this.selectIn (this.getDefaultTargetFrame (), sequenceIds, columns, sep); -}, "~S,~S,~S"); -Clazz.defineMethod (c$, "selectIn", -function (alf, sequenceIds, columns) { -this.selectIn (alf, sequenceIds, columns, this.separator); -}, "jalview.appletgui.AlignFrame,~S,~S"); -Clazz.defineMethod (c$, "selectIn", -function (alf, sequenceIds, columns, sep) { -if (sep == null || sep.length == 0) { -sep = this.separator; -} else { -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Selecting region using separator string '" + this.separator + "'"); -}}var ids = this.separatorListToArray (sequenceIds, sep); -var cols = this.separatorListToArray (columns, sep); -var sel = new jalview.datamodel.SequenceGroup (); -var csel = new jalview.datamodel.ColumnSelection (); -var al = alf.viewport.getAlignment (); -var matcher = new jalview.analysis.SequenceIdMatcher (alf.viewport.getAlignment ().getSequencesArray ()); -var start = 0; -var end = al.getWidth (); -var alw = al.getWidth (); -var seqsfound = true; -if (ids != null && ids.length > 0) { -seqsfound = false; -for (var i = 0; i < ids.length; i++) { -if (ids[i].trim ().length == 0) { -continue; -}var sq = matcher.findIdMatch (ids[i]); -if (sq != null) { -seqsfound = true; -sel.addSequence (sq, false); -}} -}var inseqpos = false; -if (cols != null && cols.length > 0) { -var seset = false; -for (var i = 0; i < cols.length; i++) { -var cl = cols[i].trim (); -if (cl.length == 0) { -continue; -}var p; -if ((p = cl.indexOf ("-")) > -1) { -var from = -1; -var to = -1; -try { -from = new Integer (cl.substring (0, p)).intValue (); -from--; -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -System.err.println ("ERROR: Couldn't parse first integer in range element column selection string '" + cl + "' - format is 'from-to'"); -return; -} else { -throw ex; -} -} -try { -to = new Integer (cl.substring (p + 1)).intValue (); -to--; -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -System.err.println ("ERROR: Couldn't parse second integer in range element column selection string '" + cl + "' - format is 'from-to'"); -return; -} else { -throw ex; -} -} -if (from >= 0 && to >= 0) { -if (from < to) { -var t = to; -to = from; -to = t; -}if (!seset) { -start = from; -end = to; -seset = true; -} else { -if (start > from) { -start = from; -}if (end < to) { -end = to; -}}for (var r = from; r <= to; r++) { -if (r >= 0 && r < alw) { -csel.addElement (r); -}} -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Range '" + cl + "' deparsed as [" + from + "," + to + "]"); -}} else { -System.err.println ("ERROR: Invalid Range '" + cl + "' deparsed as [" + from + "," + to + "]"); -}} else { -var r = -1; -try { -r = new Integer (cl).intValue (); -r--; -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -if (cl.toLowerCase ().equals ("sequence")) { -inseqpos = true; -} else { -System.err.println ("ERROR: Couldn't parse integer from point selection element of column selection string '" + cl + "'"); -return; -}} else { -throw ex; -} -} -if (r >= 0 && r <= alw) { -if (!seset) { -start = r; -end = r; -seset = true; -} else { -if (start > r) { -start = r; -}if (end < r) { -end = r; -}}csel.addElement (r); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Point selection '" + cl + "' deparsed as [" + r + "]"); -}} else { -System.err.println ("ERROR: Invalid Point selection '" + cl + "' deparsed as [" + r + "]"); -}}} -}if (seqsfound) { -if (inseqpos && sel.getSize () > 0) { -var rs = sel.getSequenceAt (0); -start = rs.findIndex (start); -end = rs.findIndex (end); -if (csel != null) { -var cs = csel.getSelected (); -csel.clear (); -for (var selectedCol, $selectedCol = cs.iterator (); $selectedCol.hasNext () && ((selectedCol = $selectedCol.next ()) || true);) { -csel.addElement (rs.findIndex ((selectedCol).intValue ())); -} -}}sel.setStartRes (start); -sel.setEndRes (end); -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$3") ? 0 : jalview.bin.JalviewLite.$JalviewLite$3$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$3, this, Clazz.cloneFinals ("alf", alf, "sel", sel, "csel", csel)))); -}}, "jalview.appletgui.AlignFrame,~S,~S,~S"); -Clazz.overrideMethod (c$, "getSelectedSequencesAsAlignment", -function (format, suffix) { -return this.getSelectedSequencesAsAlignmentFrom (this.getDefaultTargetFrame (), format, suffix); -}, "~S,~S"); -Clazz.overrideMethod (c$, "getSelectedSequencesAsAlignmentFrom", -function (alf, format, suffix) { -try { -var seqlimits = suffix.equalsIgnoreCase ("true"); -if (alf.viewport.getSelectionGroup () != null) { -var reply = new jalview.io.AppletFormatAdapter ().formatSequences (format, new jalview.datamodel.Alignment (alf.viewport.getSelectionAsNewSequence ()), seqlimits); -return reply; -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -return "Error retrieving alignment in " + format + " format. "; -} else { -throw ex; -} -} -return ""; -}, "jalview.appletgui.AlignFrame,~S,~S"); -Clazz.overrideMethod (c$, "getAlignmentOrder", -function () { -return this.getAlignmentOrderFrom (this.getDefaultTargetFrame ()); -}); -Clazz.defineMethod (c$, "getAlignmentOrderFrom", -function (alf) { -return this.getAlignmentOrderFrom (alf, this.separator); -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "getAlignmentOrderFrom", -function (alf, sep) { -var alorder = alf.getAlignViewport ().getAlignment (); -var order = new Array (alorder.getHeight ()); -for (var i = 0; i < order.length; i++) { -order[i] = alorder.getSequenceAt (i).getName (); -} -return this.arrayToSeparatorList (order); -}, "jalview.appletgui.AlignFrame,~S"); -Clazz.defineMethod (c$, "orderBy", -function (order, undoName) { -return this.orderBy (order, undoName, this.separator); -}, "~S,~S"); -Clazz.defineMethod (c$, "orderBy", -function (order, undoName, sep) { -return this.orderAlignmentBy (this.getDefaultTargetFrame (), order, undoName, sep); -}, "~S,~S,~S"); -Clazz.overrideMethod (c$, "orderAlignmentBy", -function (alf, order, undoName, sep) { -var ids = this.separatorListToArray (order, sep); -var sqs = null; -if (ids != null && ids.length > 0) { -var matcher = new jalview.analysis.SequenceIdMatcher (alf.viewport.getAlignment ().getSequencesArray ()); -var s = 0; -sqs = new Array (ids.length); -for (var i = 0; i < ids.length; i++) { -if (ids[i].trim ().length == 0) { -continue; -}var sq = matcher.findIdMatch (ids[i]); -if (sq != null) { -sqs[s++] = sq; -}} -if (s > 0) { -var sqq = new Array (s); -System.arraycopy (sqs, 0, sqq, 0, s); -sqs = sqq; -} else { -sqs = null; -}}if (sqs == null) { -return ""; -};var aorder = new jalview.datamodel.AlignmentOrder (sqs); -if (undoName != null && undoName.trim ().length == 0) { -undoName = null; -}var _undoName = undoName; -return alf.sortBy (aorder, _undoName) ? "true" : ""; -}, "jalview.appletgui.AlignFrame,~S,~S,~S"); -Clazz.defineMethod (c$, "getAlignment", -function (format) { -return this.getAlignmentFrom (this.getDefaultTargetFrame (), format, "true"); -}, "~S"); -Clazz.defineMethod (c$, "getAlignmentFrom", -function (alf, format) { -return this.getAlignmentFrom (alf, format, "true"); -}, "jalview.appletgui.AlignFrame,~S"); -Clazz.defineMethod (c$, "getAlignment", -function (format, suffix) { -return this.getAlignmentFrom (this.getDefaultTargetFrame (), format, suffix); -}, "~S,~S"); -Clazz.defineMethod (c$, "getAlignmentFrom", -function (alf, format, suffix) { -try { -var seqlimits = suffix.equalsIgnoreCase ("true"); -var reply = new jalview.io.AppletFormatAdapter ().formatSequences (format, alf.viewport.getAlignment (), seqlimits); -return reply; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -return "Error retrieving alignment in " + format + " format. "; -} else { -throw ex; -} -} -}, "jalview.appletgui.AlignFrame,~S,~S"); -Clazz.overrideMethod (c$, "loadAnnotation", -function (annotation) { -this.loadAnnotationFrom (this.getDefaultTargetFrame (), annotation); -}, "~S"); -Clazz.overrideMethod (c$, "loadAnnotationFrom", -function (alf, annotation) { -if ( new jalview.io.AnnotationFile ().annotateAlignmentView (alf.getAlignViewport (), annotation, jalview.io.AppletFormatAdapter.PASTE)) { -alf.alignPanel.fontChanged (); -alf.alignPanel.setScrollValues (0, 0); -} else { -alf.parseFeaturesFile (annotation, jalview.io.AppletFormatAdapter.PASTE); -}}, "jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "loadFeatures", -function (features, autoenabledisplay) { -this.loadFeaturesFrom (this.getDefaultTargetFrame (), features, autoenabledisplay); -}, "~S,~B"); -Clazz.overrideMethod (c$, "loadFeaturesFrom", -function (alf, features, autoenabledisplay) { -return alf.parseFeaturesFile (features, jalview.io.AppletFormatAdapter.PASTE, autoenabledisplay); -}, "jalview.appletgui.AlignFrame,~S,~B"); -Clazz.overrideMethod (c$, "getFeatures", -function (format) { -return this.getFeaturesFrom (this.getDefaultTargetFrame (), format); -}, "~S"); -Clazz.overrideMethod (c$, "getFeaturesFrom", -function (alf, format) { -return alf.outputFeatures (false, format); -}, "jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "getAnnotation", -function () { -return this.getAnnotationFrom (this.getDefaultTargetFrame ()); -}); -Clazz.overrideMethod (c$, "getAnnotationFrom", -function (alf) { -return alf.outputAnnotations (false); -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "newView", -function () { -return this.newViewFrom (this.getDefaultTargetFrame ()); -}); -Clazz.defineMethod (c$, "newView", -function (name) { -return this.newViewFrom (this.getDefaultTargetFrame (), name); -}, "~S"); -Clazz.defineMethod (c$, "newViewFrom", -function (alf) { -return alf.newView (null); -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "newViewFrom", -function (alf, name) { -return alf.newView (name); -}, "jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "loadAlignment", -function (text, title) { -var al = null; -var format = new jalview.io.IdentifyFile ().Identify (text, jalview.io.AppletFormatAdapter.PASTE); -try { -al = new jalview.io.AppletFormatAdapter ().readFile (text, jalview.io.AppletFormatAdapter.PASTE, format); -if (al.getHeight () > 0) { -return new jalview.appletgui.AlignFrame (al, this, title, false); -}} catch (ex) { -if (Clazz.exceptionOf (ex, java.io.IOException)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -return null; -}, "~S,~S"); -Clazz.defineMethod (c$, "setMouseoverListener", -function (listener) { -this.setMouseoverListener (this.currentAlignFrame, listener); -}, "~S"); -Clazz.defineMethod (c$, "setMouseoverListener", -function (af, listener) { -if (listener != null) { -listener = listener.trim (); -if (listener.length == 0) { -System.err.println ("jalview Javascript error: Ignoring empty function for mouseover listener."); -return; -}}var mol = new jalview.javascript.MouseOverListener (this, af, listener); -this.javascriptListeners.addElement (mol); -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).addStructureViewerListener (mol); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Added a mouseover listener for " + ((af == null) ? "All frames" : "Just views for " + af.getAlignViewport ().getSequenceSetId ())); -System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); -}}, "jalview.appletgui.AlignFrame,~S"); -Clazz.defineMethod (c$, "setSelectionListener", -function (listener) { -this.setSelectionListener (null, listener); -}, "~S"); -Clazz.defineMethod (c$, "setSelectionListener", -function (af, listener) { -if (listener != null) { -listener = listener.trim (); -if (listener.length == 0) { -System.err.println ("jalview Javascript error: Ignoring empty function for selection listener."); -return; -}}var mol = new jalview.javascript.JsSelectionSender (this, af, listener); -this.javascriptListeners.addElement (mol); -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).addSelectionListener (mol); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Added a selection listener for " + ((af == null) ? "All frames" : "Just views for " + af.getAlignViewport ().getSequenceSetId ())); -System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); -}}, "jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "setStructureListener", -function (listener, modelSet) { -if (listener != null) { -listener = listener.trim (); -if (listener.length == 0) { -System.err.println ("jalview Javascript error: Ignoring empty function for selection listener."); -return; -}}var mol = new jalview.javascript.MouseOverStructureListener (this, listener, this.separatorListToArray (modelSet)); -this.javascriptListeners.addElement (mol); -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).addStructureViewerListener (mol); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Added a javascript structure viewer listener '" + listener + "'"); -System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); -}}, "~S,~S"); -Clazz.overrideMethod (c$, "removeJavascriptListener", -function (af, listener) { -if (listener != null) { -listener = listener.trim (); -if (listener.length == 0) { -listener = null; -}}var rprt = false; -for (var ms = 0, msSize = this.javascriptListeners.size (); ms < msSize; ) { -var lstn = this.javascriptListeners.elementAt (ms); -var lstner = lstn; -if ((af == null || lstner.getAlignFrame () === af) && (listener == null || lstner.getListenerFunction ().equals (listener))) { -this.javascriptListeners.removeElement (lstner); -msSize--; -if (Clazz.instanceOf (lstner, jalview.structure.SelectionListener)) { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeSelectionListener (lstner); -} else { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeStructureViewerListener (lstner, null); -}rprt = jalview.bin.JalviewLite.debug; -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Removed listener '" + listener + "'"); -}} else { -ms++; -}} -if (rprt) { -System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); -}}, "jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "stop", -function () { -System.err.println ("Applet " + this.getName () + " stop()."); -this.tidyUp (); -}); -Clazz.overrideMethod (c$, "destroy", -function () { -System.err.println ("Applet " + this.getName () + " destroy()."); -this.tidyUp (); -}); -Clazz.defineMethod (c$, "tidyUp", -($fz = function () { -this.removeAll (); -if (this.currentAlignFrame != null && this.currentAlignFrame.viewport != null && this.currentAlignFrame.viewport.applet != null) { -var av = this.currentAlignFrame.viewport; -this.currentAlignFrame.closeMenuItem_actionPerformed (); -av.applet = null; -this.currentAlignFrame = null; -}if (this.javascriptListeners != null) { -while (this.javascriptListeners.size () > 0) { -var mol = this.javascriptListeners.elementAt (0); -this.javascriptListeners.removeElement (mol); -if (Clazz.instanceOf (mol, jalview.structure.SelectionListener)) { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeSelectionListener (mol); -} else { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeStructureViewerListener (mol, null); -}mol.jvlite = null; -} -}if (this.jsFunctionExec != null) { -this.jsFunctionExec.stopQueue (); -this.jsFunctionExec.jvlite = null; -}this.initialAlignFrame = null; -this.jsFunctionExec = null; -this.javascriptListeners = null; -jalview.structure.StructureSelectionManager.release (this); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "mouseOverStructure", -function (pdbResNum, chain, pdbfile) { -var me = this; -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$4") ? 0 : jalview.bin.JalviewLite.$JalviewLite$4$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$4, this, Clazz.cloneFinals ("me", me, "pdbResNum", pdbResNum, "chain", chain, "pdbfile", pdbfile)))); -}, "~S,~S,~S"); -Clazz.overrideMethod (c$, "scrollViewToIn", -function (alf, topRow, leftHandColumn) { -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$5") ? 0 : jalview.bin.JalviewLite.$JalviewLite$5$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$5, this, Clazz.cloneFinals ("alf", alf, "topRow", topRow, "leftHandColumn", leftHandColumn)))); -}, "jalview.appletgui.AlignFrame,~S,~S"); -Clazz.overrideMethod (c$, "scrollViewToRowIn", -function (alf, topRow) { -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$6") ? 0 : jalview.bin.JalviewLite.$JalviewLite$6$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$6, this, Clazz.cloneFinals ("alf", alf, "topRow", topRow)))); -}, "jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "scrollViewToColumnIn", -function (alf, leftHandColumn) { -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$7") ? 0 : jalview.bin.JalviewLite.$JalviewLite$7$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$7, this, Clazz.cloneFinals ("alf", alf, "leftHandColumn", leftHandColumn)))); -}, "jalview.appletgui.AlignFrame,~S"); -c$.initBuildDetails = Clazz.defineMethod (c$, "initBuildDetails", -($fz = function () { -if (jalview.bin.JalviewLite.builddate == null) { -jalview.bin.JalviewLite.builddate = "unknown"; -jalview.bin.JalviewLite.version = "test"; -jalview.bin.JalviewLite.installation = "Webstart"; -var url = jalview.bin.JalviewLite.getResource ("/.build_properties"); -if (url != null) { -try { -var reader = new java.io.BufferedReader ( new java.io.InputStreamReader (url.openStream ())); -var line; -while ((line = reader.readLine ()) != null) { -if (line.indexOf ("VERSION") > -1) { -jalview.bin.JalviewLite.version = line.substring (line.indexOf ("=") + 1); -}if (line.indexOf ("BUILD_DATE") > -1) { -jalview.bin.JalviewLite.builddate = line.substring (line.indexOf ("=") + 1); -}if (line.indexOf ("INSTALLATION") > -1) { -jalview.bin.JalviewLite.installation = line.substring (line.indexOf ("=") + 1); -}} -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -}}}, $fz.isPrivate = true, $fz)); -c$.getBuildDate = Clazz.defineMethod (c$, "getBuildDate", -function () { -jalview.bin.JalviewLite.initBuildDetails (); -return jalview.bin.JalviewLite.builddate; -}); -c$.getInstallation = Clazz.defineMethod (c$, "getInstallation", -function () { -jalview.bin.JalviewLite.initBuildDetails (); -return jalview.bin.JalviewLite.installation; -}); -c$.getVersion = Clazz.defineMethod (c$, "getVersion", -function () { -jalview.bin.JalviewLite.initBuildDetails (); -return jalview.bin.JalviewLite.version; -}); -Clazz.overrideMethod (c$, "init", -function () { -this.setParams (); -try { -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Applet context is '" + this.getAppletContext ().getClass ().toString () + "'"); -}var scriptObject = netscape.javascript.JSObject.getWindow (this); -if (jalview.bin.JalviewLite.debug && scriptObject != null) { -System.err.println ("Applet has Javascript callback support."); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Warning: No JalviewLite javascript callbacks available."); -if (jalview.bin.JalviewLite.debug) { -ex.printStackTrace (); -}} else { -throw ex; -} -} -if (jalview.bin.JalviewLite.debug) { -System.err.println ("JalviewLite Version " + jalview.bin.JalviewLite.getVersion ()); -System.err.println ("Build Date : " + jalview.bin.JalviewLite.getBuildDate ()); -System.err.println ("Installation : " + jalview.bin.JalviewLite.getInstallation ()); -}if (this.externalstructureviewer != null) { -this.useXtrnalSviewer = this.externalstructureviewer.trim ().toLowerCase ().equals ("true"); -}if (this.sep != null) { -if (this.sep.length > 0) { -this.separator = this.sep; -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Separator set to '" + this.separator + "'"); -}} else { -throw new Error (jalview.util.MessageManager.getString ("error.invalid_separator_parameter")); -}}var r = 255; -var g = 255; -var b = 255; -if (this.rgb != null) { -try { -r = Integer.parseInt (this.rgb.substring (0, 2), 16); -g = Integer.parseInt (this.rgb.substring (2, 4), 16); -b = Integer.parseInt (this.rgb.substring (4, 6), 16); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -r = 255; -g = 255; -b = 255; -} else { -throw ex; -} -} -}this.rgb = this.labelColour; -if (this.rgb != null) { -this.launcher.setLabel (this.rgb); -}this.setBackground ( new java.awt.Color (r, g, b)); -if (this.startupFile == null) { -var data = new StringBuffer ("PASTE"); -var i = 1; -while ((this.startupFile = this.getParameter ("sequence" + i)) != null) { -data.append (this.startupFile.toString () + "\n"); -i++; -} -if (data.length () > 5) { -this.startupFile = data.toString (); -}}if (!this.enableSplitFrame) { -this.file2 = null; -}if (this.embedded) { -var loader = Clazz.innerTypeInstance (jalview.bin.JalviewLite.LoadingThread, this, null, this.startupFile, this.file2, this); -{ -loader.run(); -}} else if (this.startupFile != null) { -if (!this.showButton) { -var loader = Clazz.innerTypeInstance (jalview.bin.JalviewLite.LoadingThread, this, null, this.startupFile, this.file2, this); -loader.start (); -} else { -this.add (this.launcher); -this.launcher.addActionListener (((Clazz.isClassDefined ("jalview.bin.JalviewLite$8") ? 0 : jalview.bin.JalviewLite.$JalviewLite$8$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$8, this, null))); -}} else { -this.startupFile = "NO FILE"; -this.fileFound = false; -this.callInitCallback (); -}}); -Clazz.defineMethod (c$, "initLiveConnect", -($fz = function () { -var notFailed = false; -var tries = 0; -while (!notFailed && tries < 10) { -if (tries > 0) { -System.err.println ("LiveConnect request thread going to sleep."); -}try { -Thread.sleep (700 * (1 + tries)); -} catch (q) { -if (Clazz.exceptionOf (q, InterruptedException)) { -} else { -throw q; -} -} -;if (tries++ > 0) { -System.err.println ("LiveConnect request thread woken up."); -}try { -var scriptObject = netscape.javascript.JSObject.getWindow (this); -if (scriptObject.eval ("navigator") != null) { -notFailed = true; -}} catch (jsex) { -if (Clazz.exceptionOf (jsex, Exception)) { -System.err.println ("Attempt " + tries + " to access LiveConnect javascript failed."); -} else { -throw jsex; -} -} -} -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "callInitCallback", -($fz = function () { -if (this.initjscallback == null) { -return; -}this.initjscallback = this.initjscallback.trim (); -if (this.initjscallback.length > 0) { -var scriptObject = null; -try { -scriptObject = netscape.javascript.JSObject.getWindow (this); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -;this.initLiveConnect (); -if (scriptObject != null) { -try { - new jalview.javascript.JSFunctionExec (this).executeJavascriptFunction (true, this.initjscallback, null, "Calling oninit callback '" + this.initjscallback + "'."); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Exception when executing _oninit callback '" + this.initjscallback + "'."); -e.printStackTrace (); -} else { -throw e; -} -} -} else { -System.err.println ("Not executing _oninit callback '" + this.initjscallback + "' - no scripting allowed."); -}}}, $fz.isPrivate = true, $fz)); -c$.addFrame = Clazz.defineMethod (c$, "addFrame", -function (frame, title, width, height) { -frame.setLocation (jalview.bin.JalviewLite.lastFrameX, jalview.bin.JalviewLite.lastFrameY); -jalview.bin.JalviewLite.lastFrameX += 40; -jalview.bin.JalviewLite.lastFrameY += 40; -frame.setSize (width, height); -frame.setTitle (title); -frame.addWindowListener (((Clazz.isClassDefined ("jalview.bin.JalviewLite$9") ? 0 : jalview.bin.JalviewLite.$JalviewLite$9$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$9, this, Clazz.cloneFinals ("frame", frame)))); -frame.setVisible (true); -}, "javax.swing.JFrame,~S,~N,~N"); -Clazz.defineMethod (c$, "paintComponent", -function (g) { -if (!this.fileFound) { -g.setColor ( new java.awt.Color (200, 200, 200)); -g.setColor (java.awt.Color.cyan); -g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); -g.setColor (java.awt.Color.red); -g.drawString (jalview.util.MessageManager.getString ("label.jalview_cannot_open_file"), 5, 15); -g.drawString ("\"" + this.startupFile + "\"", 5, 30); -} else if (this.embedded && !this.haveShownLoadMessage) { -g.setColor (java.awt.Color.black); -g.setFont ( new java.awt.Font ("Arial", 1, 24)); -g.drawString (jalview.util.MessageManager.getString ("label.jalview_applet"), 50, Clazz.doubleToInt (this.getSize ().height / 2) - 30); -g.drawString (jalview.util.MessageManager.getString ("label.loading_data") + "...", 50, Clazz.doubleToInt (this.getSize ().height / 2)); -this.haveShownLoadMessage = true; -}}, "java.awt.Graphics"); -Clazz.defineMethod (c$, "getAppletWindow", -function (class1) { -var wnds = new java.util.Vector (); -var cmp = this.getComponents (); -if (cmp != null) { -for (var i = 0; i < cmp.length; i++) { -if (class1.isAssignableFrom (cmp[i].getClass ())) { -wnds.addElement (cmp); -}} -}return wnds; -}, "Class"); -Clazz.defineMethod (c$, "getDefaultTargetFrame", -function () { -if (this.currentAlignFrame != null) { -return this.currentAlignFrame; -}if (this.initialAlignFrame != null) { -return this.initialAlignFrame; -}System.err.println ("Implementation error: Jalview Applet API cannot work out which AlignFrame to use."); -return null; -}); -Clazz.defineMethod (c$, "separatorListToArray", -function (list) { -return this.separatorListToArray (list, this.separator); -}, "~S"); -Clazz.defineMethod (c$, "separatorListToArray", -function (list, separator) { -var seplen = separator.length; -if (list == null || list.equals ("") || list.equals (separator)) { -return null; -}var jv = new java.util.Vector (); -var cp = 0; -var pos; -while ((pos = list.indexOf (separator, cp)) > cp) { -jv.addElement (list.substring (cp, pos)); -cp = pos + seplen; -} -if (cp < list.length) { -var c = list.substring (cp); -if (!c.equals (separator)) { -jv.addElement (c); -}}if (jv.size () > 0) { -var v = new Array (jv.size ()); -for (var i = 0; i < v.length; i++) { -v[i] = jv.elementAt (i); -} -jv.removeAllElements (); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Array from '" + separator + "' separated List:\n" + v.length); -for (var i = 0; i < v.length; i++) { -System.err.println ("item " + i + " '" + v[i] + "'"); -} -}return v; -}if (jalview.bin.JalviewLite.debug) { -System.err.println ("Empty Array from '" + separator + "' separated List"); -}return null; -}, "~S,~S"); -Clazz.defineMethod (c$, "arrayToSeparatorList", -function (list) { -return this.arrayToSeparatorList (list, this.separator); -}, "~A"); -Clazz.defineMethod (c$, "arrayToSeparatorList", -function (list, separator) { -var v = new StringBuffer (); -if (list != null && list.length > 0) { -for (var i = 0, iSize = list.length; i < iSize; i++) { -if (list[i] != null) { -if (i > 0) { -v.append (separator); -}v.append (list[i]); -}} -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Returning '" + separator + "' separated List:\n"); -System.err.println (v); -}return v.toString (); -}if (jalview.bin.JalviewLite.debug) { -System.err.println ("Returning empty '" + separator + "' separated List\n"); -}return "" + separator; -}, "~A,~S"); -Clazz.overrideMethod (c$, "getFeatureGroups", -function () { -var lst = this.arrayToSeparatorList (this.getDefaultTargetFrame ().getFeatureGroups ()); -return lst; -}); -Clazz.overrideMethod (c$, "getFeatureGroupsOn", -function (alf) { -var lst = this.arrayToSeparatorList (alf.getFeatureGroups ()); -return lst; -}, "jalview.appletgui.AlignFrame"); -Clazz.overrideMethod (c$, "getFeatureGroupsOfState", -function (visible) { -return this.arrayToSeparatorList (this.getDefaultTargetFrame ().getFeatureGroupsOfState (visible)); -}, "~B"); -Clazz.overrideMethod (c$, "getFeatureGroupsOfStateOn", -function (alf, visible) { -return this.arrayToSeparatorList (alf.getFeatureGroupsOfState (visible)); -}, "jalview.appletgui.AlignFrame,~B"); -Clazz.overrideMethod (c$, "setFeatureGroupStateOn", -function (alf, groups, state) { -var st = state; -java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$10") ? 0 : jalview.bin.JalviewLite.$JalviewLite$10$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$10, this, Clazz.cloneFinals ("alf", alf, "groups", groups, "st", st)))); -}, "jalview.appletgui.AlignFrame,~S,~B"); -Clazz.overrideMethod (c$, "setFeatureGroupState", -function (groups, state) { -this.setFeatureGroupStateOn (this.getDefaultTargetFrame (), groups, state); -}, "~S,~B"); -Clazz.overrideMethod (c$, "getSeparator", -function () { -return this.separator; -}); -Clazz.overrideMethod (c$, "setSeparator", -function (separator) { -if (separator == null || separator.length < 1) { -separator = "\u00ac"; -}this.separator = separator; -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Default Separator now: '" + separator + "'"); -}}, "~S"); -Clazz.overrideMethod (c$, "addPdbFile", -function (alFrame, sequenceId, pdbEntryString, pdbFile) { -return alFrame.addPdbFile (sequenceId, pdbEntryString, pdbFile); -}, "jalview.appletgui.AlignFrame,~S,~S,~S"); -Clazz.defineMethod (c$, "setAlignPdbStructures", -function (alignPdbStructures) { -this.alignPdbStructures = alignPdbStructures; -}, "~B"); -Clazz.defineMethod (c$, "isAlignPdbStructures", -function () { -return this.alignPdbStructures; -}); -Clazz.overrideMethod (c$, "start", -function () { -}); -Clazz.defineMethod (c$, "setJsMessageSet", -function (messageclass, viewId, colcommands) { -var msgset = this.jsmessages.get (messageclass); -if (msgset == null) { -msgset = new java.util.Hashtable (); -this.jsmessages.put (messageclass, msgset); -}msgset.put (viewId, colcommands); -var l = Clazz.newLongArray (colcommands.length, 0); -for (var i = 0; i < colcommands.length; i++) { -l[i] = colcommands[i].hashCode (); -} -this.jshashes.put (messageclass + "|" + viewId, l); -}, "~S,~S,~A"); -Clazz.overrideMethod (c$, "getJsMessage", -function (messageclass, viewId) { -var msgset = this.jsmessages.get (messageclass); -if (msgset != null) { -var msgs = msgset.get (viewId); -if (msgs != null) { -for (var i = 0; i < msgs.length; i++) { -if (msgs[i] != null) { -var m = msgs[i]; -msgs[i] = null; -return m; -}} -}}return ""; -}, "~S,~S"); -Clazz.defineMethod (c$, "isJsMessageSetChanged", -function (string, string2, colcommands) { -var l = this.jshashes.get (string + "|" + string2); -if (l == null && colcommands != null) { -return true; -}for (var i = 0; i < colcommands.length; i++) { -if (l[i] != colcommands[i].hashCode ()) { -return true; -}} -return false; -}, "~S,~S,~A"); -Clazz.defineMethod (c$, "getJsExecQueue", -function () { -return this.jsExecQueue; -}); -Clazz.defineMethod (c$, "setExecutor", -function (jsFunctionExec2) { -this.jsFunctionExec = jsFunctionExec2; -}, "jalview.javascript.JSFunctionExec"); -Clazz.defineMethod (c$, "getDefaultColourParameter", -function (colparam, defcolour) { -var colprop = this.getParameter (colparam); -if (colprop == null || colprop.trim ().length == 0) { -return defcolour; -}var col = jalview.schemes.ColourSchemeProperty.getAWTColorFromName (colprop); -if (col == null) { -try { -col = new jalview.schemes.UserColourScheme (colprop).findColour ('A'); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Couldn't parse '" + colprop + "' as a colour for " + colparam); -col = null; -} else { -throw ex; -} -} -}return (col == null) ? defcolour : col; -}, "~S,java.awt.Color"); -Clazz.defineMethod (c$, "openJalviewHelpUrl", -function () { -if (this.helpUrl == null || this.helpUrl.trim ().length < 5) { -this.helpUrl = "http://www.jalview.org/help.html"; -}this.showURL (this.helpUrl, "HELP"); -}); -Clazz.defineMethod (c$, "resolveUrlForLocalOrAbsolute", -($fz = function (url, localref) { -var codebase = localref.toString (); -var pt = codebase.indexOf ("?"); -if (pt < 0) pt = codebase.length; -codebase = codebase.substring (0, pt); -codebase = codebase.substring (0, codebase.lastIndexOf ("/") + 1); -if (url.indexOf ("/") == 0 && !localref.getProtocol ().equals ("file")) { -pt = codebase.indexOf ("/", 8); -return codebase.substring (0, pt) + url; -}return codebase + url; -}, $fz.isPrivate = true, $fz), "~S,java.net.URL"); -Clazz.defineMethod (c$, "showURL", -function (url, target) { -try { -if (url.indexOf (":") == -1) { -var prepend; -url = this.resolveUrlForLocalOrAbsolute (url, prepend = this.getDefaultParameter ("resolvetocodebase", false) ? this.getDocumentBase () : this.getCodeBase ()); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Show url (prepended " + prepend + " - toggle resolvetocodebase if code/docbase resolution is wrong): " + url); -}} else { -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Show url: " + url); -}}if (url.indexOf ("javascript:") == 0) { -this.getAppletContext ().showDocument ( new java.net.URL (url)); -} else { -this.getAppletContext ().showDocument ( new java.net.URL (url), target); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -}, "~S,~S"); -c$.$JalviewLite$LoadJmolThread$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.running = false; -Clazz.instantialize (this, arguments); -}, jalview.bin.JalviewLite, "LoadJmolThread", Thread); -Clazz.overrideMethod (c$, "run", -function () { -if (this.running || this.b$["jalview.bin.JalviewLite"].checkedForJmol) { -return; -}this.running = true; -if (this.b$["jalview.bin.JalviewLite"].checkForJmol) { -try { -if (!System.getProperty ("java.version").startsWith ("1.1")) { -Class.forName ("org.jmol.adapter.smarter.SmarterJmolAdapter"); -this.b$["jalview.bin.JalviewLite"].jmolAvailable = true; -}if (!this.b$["jalview.bin.JalviewLite"].jmolAvailable) { -System.out.println ("Jmol not available - Using MCview for structures"); -}} catch (ex) { -if (Clazz.exceptionOf (ex, ClassNotFoundException)) { -} else { -throw ex; -} -} -} else { -this.b$["jalview.bin.JalviewLite"].jmolAvailable = false; -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Skipping Jmol check. Will use MCView (probably)"); -}}this.b$["jalview.bin.JalviewLite"].checkedForJmol = true; -this.running = false; -}); -Clazz.defineMethod (c$, "notFinished", -function () { -return this.running || !this.b$["jalview.bin.JalviewLite"].checkedForJmol; -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$LoadingThread$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.protocol = null; -this._file = null; -this._file2 = null; -this.applet = null; -Clazz.instantialize (this, arguments); -}, jalview.bin.JalviewLite, "LoadingThread", Thread); -Clazz.defineMethod (c$, "dbgMsg", -($fz = function (a) { -if (jalview.bin.JalviewLite.debug) { -System.err.println (a); -}}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "setProtocolState", -function (a) { -if (a.startsWith ("PASTE")) { -a = a.substring (5); -this.protocol = jalview.io.AppletFormatAdapter.PASTE; -} else if (this.inArchive (a)) { -this.protocol = jalview.io.AppletFormatAdapter.CLASSLOADER; -} else { -a = this.addProtocol (a); -this.protocol = jalview.io.AppletFormatAdapter.URL; -}this.dbgMsg ("Protocol identified as '" + this.protocol + "'"); -return a; -}, "~S"); -Clazz.makeConstructor (c$, -function (a, b, c) { -Clazz.superConstructor (this, jalview.bin.JalviewLite.LoadingThread, []); -this._file = a; -this._file2 = b; -this.applet = c; -}, "~S,~S,jalview.bin.JalviewLite"); -Clazz.overrideMethod (c$, "run", -function () { -{ -System.out.println("BYPASSING JMOL LOADING FOR NOW. THIS WILL BE DONE ANOTHER WAY") -}this.startLoading (); -}); -Clazz.defineMethod (c$, "startLoading", -($fz = function () { -this.dbgMsg ("Loading thread started with:\n>>file\n" + this._file + ">>endfile"); -this.dbgMsg ("Loading started."); -var a = this.readAlignment (this._file); -var b = this.readAlignment (this._file2); -if (a != null) { -this.addToDisplay (a, b); -this.loadTree (a); -this.loadScoreFile (a); -this.loadFeatures (a); -this.loadAnnotations (a); -this.loadJnetFile (a); -this.loadPdbFiles (a); -} else { -this.b$["jalview.bin.JalviewLite"].fileFound = false; -this.applet.remove (this.b$["jalview.bin.JalviewLite"].launcher); -this.applet.repaint (); -}this.b$["jalview.bin.JalviewLite"].callInitCallback (); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "addToDisplay", -function (a, b) { -if (b == null) { -a.addToDisplay (this.b$["jalview.bin.JalviewLite"].embedded); -} else { -var c = new jalview.appletgui.SplitFrame (a, b); -c.addToDisplay (this.b$["jalview.bin.JalviewLite"].embedded, this.b$["jalview.bin.JalviewLite"]); -}}, "jalview.appletgui.AlignFrame,jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "readAlignment", -function (a) { -if (a == null) { -return null; -}var b = this.setProtocolState (a); -var c = new jalview.io.IdentifyFile ().Identify (b, this.protocol); -this.dbgMsg ("File identified as '" + c + "'"); -var d = null; -try { -d = new jalview.io.AppletFormatAdapter ().readFile (b, this.protocol, c); -if ((d != null) && (d.getHeight () > 0)) { -this.dbgMsg ("Successfully loaded file."); -d.setDataset (null); -var e = new jalview.appletgui.AlignFrame (d, this.applet, b, this.b$["jalview.bin.JalviewLite"].embedded, false); -e.setTitle (b); -if (this.b$["jalview.bin.JalviewLite"].initialAlignFrame == null) { -this.b$["jalview.bin.JalviewLite"].initialAlignFrame = e; -}this.b$["jalview.bin.JalviewLite"].currentAlignFrame = e; -if (this.protocol === jalview.io.AppletFormatAdapter.PASTE) { -e.setTitle (jalview.util.MessageManager.formatMessage ("label.sequences_from", Clazz.newArray (-1, [this.applet.getDocumentBase ().toString ()]))); -}e.setStatus (jalview.util.MessageManager.formatMessage ("label.successfully_loaded_file", Clazz.newArray (-1, [b]))); -return e; -}} catch (ex) { -if (Clazz.exceptionOf (ex, java.io.IOException)) { -this.dbgMsg ("File load exception."); -ex.printStackTrace (); -if (jalview.bin.JalviewLite.debug) { -try { -var e = new jalview.io.FileParse (b, this.protocol); -var f = null; -this.dbgMsg (">>>Dumping contents of '" + b + "' " + "(" + this.protocol + ")"); -while ((f = e.nextLine ()) != null) { -this.dbgMsg (f); -} -this.dbgMsg (">>>Dump finished."); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Exception when trying to dump the content of the file parameter."); -e.printStackTrace (); -} else { -throw e; -} -} -}} else { -throw ex; -} -} -return null; -}, "~S"); -Clazz.defineMethod (c$, "loadPdbFiles", -function (a) { -var b = false; -this.applet.setAlignPdbStructures (this.b$["jalview.bin.JalviewLite"].getDefaultParameter ("alignpdbfiles", false)); -var c = 0; -var d = new java.util.Vector (); -var e = (this.applet.getDefaultParameter ("relaxedidmatch", false)) ? new jalview.analysis.SequenceIdMatcher (a.getAlignViewport ().getAlignment ().getSequencesArray ()) : null; -var f; -do { -if (c > 0) { -f = this.applet.getParameter ("PDBFILE" + c); -} else { -f = this.b$["jalview.bin.JalviewLite"].pdbFile; -}if (f != null) { -var g = new jalview.datamodel.PDBEntry (); -var h; -var i = null; -var j = null; -var k = new java.util.StringTokenizer (f, " "); -if (k.countTokens () < 2) { -if (this.b$["jalview.bin.JalviewLite"].sequence != null) { -i = Clazz.newArray (-1, [e == null ? a.getAlignViewport ().getAlignment ().findName (this.b$["jalview.bin.JalviewLite"].sequence) : e.findIdMatch (this.b$["jalview.bin.JalviewLite"].sequence)]); -}} else { -f = k.nextToken (); -var l = new java.util.Vector (); -var m = new java.util.Vector (); -while (k.hasMoreTokens ()) { -h = k.nextToken (); -var n = new java.util.StringTokenizer (h, "="); -if (n.countTokens () > 1) { -m.addElement (n.nextToken ()); -h = n.nextToken (); -}l.addElement (e == null ? a.getAlignViewport ().getAlignment ().findName (h) : e.findIdMatch (h)); -} -i = new Array (l.size ()); -l.copyInto (i); -if (m.size () == l.size ()) { -j = new Array (m.size ()); -m.copyInto (j); -}}f = this.setProtocolState (f); -if (this.protocol === jalview.io.AppletFormatAdapter.CLASSLOADER && !this.b$["jalview.bin.JalviewLite"].useXtrnalSviewer) { -this.protocol = jalview.io.AppletFormatAdapter.URL; -f = this.addProtocol (f); -}g.setFile (f); -if (i != null) { -for (var l = 0; l < i.length; l++) { -if (i[l] != null) { -(i[l]).addPDBId (g); -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.applet).registerPDBEntry (g); -} else { -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Warning: Possible input parsing error: Null sequence for attachment of PDB (sequence " + l + ")"); -}}} -if (!this.b$["jalview.bin.JalviewLite"].alignPdbStructures) { -a.newStructureView (this.applet, g, i, j, this.protocol); -} else { -d.addElement ( Clazz.newArray (-1, [g, i, j, String.instantialize (this.protocol)])); -}}}c++; -} while (f != null || c < 10); -if (d.size () > 0) { -var g = new Array (d.size ()); -var h = new Array (d.size ()); -var i = new Array (d.size ()); -var j = new Array (d.size ()); -for (var k = 0, l = d.size (); k < l; k++) { -var m = d.elementAt (k); -h[k] = m[0]; -g[k] = m[1]; -i[k] = m[2]; -j[k] = m[3]; -} -a.alignedStructureView (this.applet, h, g, i, j); -b = true; -}return b; -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "loadJnetFile", -function (a) { -var b = false; -var c = this.b$["jalview.bin.JalviewLite"].jnetFile; -if (c != null) { -try { -c = this.setProtocolState (c); -var d = jalview.jsdev.GenericFileAdapter.getFile ("JPredFile", [c, this.protocol]); -jalview.io.JnetAnnotationMaker.add_annotation (d, a.viewport.getAlignment (), 0, false); -var e = a.viewport.getAlignment ().getSequenceAt (0); -a.viewport.getAlignment ().setSeqrep (e); -var f = new jalview.datamodel.ColumnSelection (); -f.hideInsertionsFor (e); -a.viewport.setColumnSelection (f); -a.alignPanel.fontChanged (); -a.alignPanel.setScrollValues (0, 0); -b = true; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -}return b; -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "loadAnnotations", -function (a) { -var b = false; -var c = this.b$["jalview.bin.JalviewLite"].annotations; -if (c != null) { -c = this.setProtocolState (c); -if ( new jalview.io.AnnotationFile ().annotateAlignmentView (a.viewport, c, this.protocol)) { -a.alignPanel.fontChanged (); -a.alignPanel.setScrollValues (0, 0); -b = true; -} else { -System.err.println ("Annotations were not added from annotation file '" + c + "'"); -}}return b; -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "loadFeatures", -function (a) { -var b = false; -var c = this.b$["jalview.bin.JalviewLite"].hideFeatureGroups; -if (c != null) { -a.setFeatureGroupState (this.b$["jalview.bin.JalviewLite"].separatorListToArray (c), false); -}c = this.b$["jalview.bin.JalviewLite"].showFeatureGroups; -if (c != null) { -a.setFeatureGroupState (this.b$["jalview.bin.JalviewLite"].separatorListToArray (c), true); -}c = this.b$["jalview.bin.JalviewLite"].features; -if (c != null) { -c = this.setProtocolState (c); -b = a.parseFeaturesFile (c, this.protocol); -}c = this.b$["jalview.bin.JalviewLite"].showFeatureSettings; -if (c != null && c.equalsIgnoreCase ("true")) { -a.viewport.setShowSequenceFeatures (true); - new jalview.appletgui.FeatureSettings (a.alignPanel); -}return b; -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "loadScoreFile", -function (a) { -var b = false; -if (this.b$["jalview.bin.JalviewLite"].scoreFile != null && !"".equals (this.b$["jalview.bin.JalviewLite"].scoreFile)) { -try { -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Attempting to load T-COFFEE score file from the scoreFile parameter"); -}b = a.loadScoreFile (this.b$["jalview.bin.JalviewLite"].scoreFile); -if (!b) { -System.err.println ("Failed to parse T-COFFEE parameter as a valid score file ('" + this.b$["jalview.bin.JalviewLite"].scoreFile + "')"); -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.printf ("Cannot read score file: '%s'. Cause: %s \n", [this.b$["jalview.bin.JalviewLite"].scoreFile, e.getMessage ()]); -} else { -throw e; -} -} -}return b; -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "loadTree", -function (a) { -var b = false; -if (this.b$["jalview.bin.JalviewLite"].treeFile == null) { -this.b$["jalview.bin.JalviewLite"].treeFile = this.applet.getParameter ("treeFile"); -}if (this.b$["jalview.bin.JalviewLite"].treeFile != null) { -try { -this.b$["jalview.bin.JalviewLite"].treeFile = this.setProtocolState (this.b$["jalview.bin.JalviewLite"].treeFile); -var c = new jalview.io.NewickFile (this.b$["jalview.bin.JalviewLite"].treeFile, this.protocol); -c.parse (); -if (c.getTree () != null) { -a.loadTree (c, this.b$["jalview.bin.JalviewLite"].treeFile); -b = true; -this.dbgMsg ("Successfully imported tree."); -} else { -this.dbgMsg ("Tree parameter did not resolve to a valid tree."); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -}return b; -}, "jalview.appletgui.AlignFrame"); -Clazz.defineMethod (c$, "inArchive", -function (a) { -try { -var b = (this.getClass ().getResourceAsStream ("/" + a) != null); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Resource '" + a + "' was " + (b ? "" : "not") + " located by classloader."); -}return b; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.out.println ("Exception checking resources: " + a + " " + ex); -return false; -} else { -throw ex; -} -} -}, "~S"); -Clazz.defineMethod (c$, "addProtocol", -function (a) { -if (a.indexOf ("://") == -1) { -var b = this.applet.resolveUrlForLocalOrAbsolute (a, this.b$["jalview.bin.JalviewLite"].getDocumentBase ()); -if (this.urlExists (b)) { -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Prepended document base for resource: '" + a + "'"); -}return b; -}b = this.applet.resolveUrlForLocalOrAbsolute (a, this.b$["jalview.bin.JalviewLite"].getCodeBase ()); -if (this.urlExists (b)) { -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Prepended codebase for resource: '" + a + "'"); -}return b; -}}return a; -}, "~S"); -Clazz.defineMethod (c$, "urlExists", -($fz = function (a) { -var b = null; -try { -b = new java.net.URL (a).openStream (); -if (b != null) { -return true; -}} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -} else { -throw x; -} -} finally { -if (b != null) { -try { -b.close (); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -}} -return false; -}, $fz.isPrivate = true, $fz), "~S"); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$1", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.f$.me).mouseOverVamsasSequence (this.f$.sq, this.f$.sq.findIndex (this.f$.pos), null); -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$2", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.f$.me).mouseOverVamsasSequence (this.f$.sq, this.f$.pos, null); -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$3", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -this.f$.alf.select (this.f$.sel, this.f$.csel); -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$4$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$4", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -try { -jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.f$.me).mouseOverStructure ( new Integer (this.f$.pdbResNum).intValue (), this.f$.chain, this.f$.pdbfile); -if (jalview.bin.JalviewLite.debug) { -System.err.println ("mouseOver for '" + this.f$.pdbResNum + "' in chain '" + this.f$.chain + "' in structure '" + this.f$.pdbfile + "'"); -}} catch (e) { -if (Clazz.exceptionOf (e, NumberFormatException)) { -System.err.println ("Ignoring invalid residue number string '" + this.f$.pdbResNum + "'"); -} else { -throw e; -} -} -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$5$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$5", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -try { -this.f$.alf.scrollTo ( new Integer (this.f$.topRow).intValue (), new Integer (this.f$.leftHandColumn).intValue ()); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Couldn't parse integer arguments (topRow='" + this.f$.topRow + "' and leftHandColumn='" + this.f$.leftHandColumn + "')"); -ex.printStackTrace (); -} else { -throw ex; -} -} -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$6$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$6", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -try { -this.f$.alf.scrollToRow ( new Integer (this.f$.topRow).intValue ()); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Couldn't parse integer arguments (topRow='" + this.f$.topRow + "')"); -ex.printStackTrace (); -} else { -throw ex; -} -} -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$7$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$7", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -try { -this.f$.alf.scrollToColumn ( new Integer (this.f$.leftHandColumn).intValue ()); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Couldn't parse integer arguments (leftHandColumn='" + this.f$.leftHandColumn + "')"); -ex.printStackTrace (); -} else { -throw ex; -} -} -}); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$8$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$8", null, java.awt.event.ActionListener); -Clazz.overrideMethod (c$, "actionPerformed", -function (e) { -var loader = Clazz.innerTypeInstance (jalview.bin.JalviewLite.LoadingThread, this, null, this.b$["jalview.bin.JalviewLite"].startupFile, this.b$["jalview.bin.JalviewLite"].file2, this.b$["jalview.bin.JalviewLite"]); -loader.start (); -}, "java.awt.event.ActionEvent"); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$9$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$9", java.awt.event.WindowAdapter); -Clazz.overrideMethod (c$, "windowClosing", -function (e) { -if (Clazz.instanceOf (this.f$.frame, jalview.appletgui.AlignFrame)) { -var vp = (this.f$.frame).viewport; -(this.f$.frame).closeMenuItem_actionPerformed (); -if (vp.applet.currentAlignFrame === this.f$.frame) { -vp.applet.currentAlignFrame = null; -}vp.applet = null; -vp = null; -}jalview.bin.JalviewLite.lastFrameX -= 40; -jalview.bin.JalviewLite.lastFrameY -= 40; -if (Clazz.instanceOf (this.f$.frame, jalview.appletgui.EmbmenuFrame)) { -(this.f$.frame).destroyMenus (); -}this.f$.frame.setMenuBar (null); -this.f$.frame.dispose (); -}, "java.awt.event.WindowEvent"); -Clazz.defineMethod (c$, "windowActivated", -function (e) { -if (Clazz.instanceOf (this.f$.frame, jalview.appletgui.AlignFrame)) { -(this.f$.frame).viewport.applet.currentAlignFrame = this.f$.frame; -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Activated window " + this.f$.frame); -}}Clazz.superCall (this, jalview.bin.JalviewLite$9, "windowActivated", [e]); -}, "java.awt.event.WindowEvent"); -c$ = Clazz.p0p (); -}; -c$.$JalviewLite$10$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$10", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -this.f$.alf.setFeatureGroupState (this.b$["jalview.bin.JalviewLite"].separatorListToArray (this.f$.groups), this.f$.st); -}); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"TRUE", "true", -"FALSE", "false", -"debug", false, -"lastFrameX", 200, -"lastFrameY", 200, -"builddate", null, -"version", null, -"installation", null); -}); +Clazz.declarePackage ("jalview.bin"); +Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.javascript.JalviewLiteJsApi", "java.lang.Thread", "javax.swing.JApplet", "jalview.util.MessageManager", "java.util.Hashtable", "$.Vector", "javax.swing.JButton"], "jalview.bin.JalviewLite", ["jalview.analysis.SequenceIdMatcher", "jalview.appletgui.AlignFrame", "$.EmbmenuFrame", "$.FeatureSettings", "$.SplitFrame", "jalview.datamodel.Alignment", "$.AlignmentOrder", "$.ColumnSelection", "$.PDBEntry", "$.SequenceGroup", "jalview.io.AnnotationFile", "$.AppletFormatAdapter", "$.FileParse", "$.IdentifyFile", "$.JnetAnnotationMaker", "$.NewickFile", "jalview.javascript.JSFunctionExec", "$.JsSelectionSender", "$.MouseOverListener", "$.MouseOverStructureListener", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.ColourSchemeProperty", "$.UserColourScheme", "jalview.structure.SelectionListener", "$.StructureSelectionManager", "java.awt.Color", "$.EventQueue", "$.Font", "java.awt.event.ActionListener", "$.WindowAdapter", "java.io.BufferedReader", "$.InputStreamReader", "java.lang.Error", "$.StringBuffer", "java.net.URL", "java.util.StringTokenizer", "netscape.javascript.JSObject"], function () { +c$ = Clazz.decorateAsClass (function () { +this.embedded = false; +this.enableSplitFrame = false; +this.showButton = true; +this.checkForJmol = true; +this.jalviewServletURL = null; +this.startupFile = "No file"; +this.helpUrl = null; +this.externalstructureviewer = null; +this.sep = null; +this.rgb = null; +this.labelColour = null; +this.initjscallback = null; +this.pdbFile = null; +this.sequence = null; +this.jnetFile = null; +this.annotations = null; +this.hideFeatureGroups = null; +this.showFeatureGroups = null; +this.features = null; +this.showFeatureSettings = null; +this.scoreFile = null; +this.treeFile = null; +this.windowWidth = null; +this.windowHeight = null; +this.defaultColour = null; +this.sortBy = null; +this.wrap = null; +this.centrecolumnlabels = null; +this.userDefinedColour = null; +this.widthScale = null; +this.heightScale = null; +this.upperCase = null; +this.file2 = null; +this.javascriptListeners = null; +this.jsFunctionExec = null; +this.fileFound = true; +this.launcher = null; +this.currentAlignFrame = null; +this.initialAlignFrame = null; +this.checkedForJmol = false; +this.jmolAvailable = false; +this.alignPdbStructures = false; +this.useXtrnalSviewer = false; +this.haveShownLoadMessage = false; +if (!Clazz.isClassDefined ("jalview.bin.JalviewLite.LoadJmolThread")) { +jalview.bin.JalviewLite.$JalviewLite$LoadJmolThread$ (); +} +if (!Clazz.isClassDefined ("jalview.bin.JalviewLite.LoadingThread")) { +jalview.bin.JalviewLite.$JalviewLite$LoadingThread$ (); +} +this.separator = "\u00ac"; +this.jsfallbackEnabled = false; +this.jshashes = null; +this.jsmessages = null; +this.jsExecQueue = null; +Clazz.instantialize (this, arguments); +}, jalview.bin, "JalviewLite", javax.swing.JApplet, [jalview.api.StructureSelectionManagerProvider, jalview.javascript.JalviewLiteJsApi]); +Clazz.prepareFields (c$, function () { +this.javascriptListeners = new java.util.Vector (); +this.launcher = new javax.swing.JButton (jalview.util.MessageManager.getString ("label.start_jalview")); +this.jshashes = new java.util.Hashtable (); +this.jsmessages = new java.util.Hashtable (); +this.jsExecQueue = new java.util.Vector (); +}); +Clazz.defineMethod (c$, "setParams", +($fz = function () { +jalview.bin.JalviewLite.debug = "true".equalsIgnoreCase (this.getParameter ("debug")); +this.enableSplitFrame = "true".equalsIgnoreCase (this.getParameter ("enableSplitFrame")); +this.embedded = "true".equalsIgnoreCase (this.getParameter ("embedded")); +this.showButton = !"false".equalsIgnoreCase (this.getParameter ("showbutton")); +this.jalviewServletURL = this.getParameter ("APPLICATION_URL"); +this.startupFile = this.getParameter ("file"); +this.helpUrl = this.getParameter ("jalviewhelpurl"); +this.externalstructureviewer = this.getParameter ("externalstructureviewer"); +this.checkForJmol = !"true".equals (this.getParameter ("nojmol")); +this.sep = this.getParameter ("separator"); +this.rgb = this.getParameter ("RGB"); +this.labelColour = this.getParameter ("label"); +this.initjscallback = this.getParameter ("oninit"); +this.pdbFile = this.getParameter ("PDBFILE"); +this.sequence = this.getParameter ("PDBSEQ"); +this.jnetFile = this.getParameter ("jnetfile"); +this.annotations = this.getParameter ("annotations"); +this.hideFeatureGroups = this.getParameter ("hidefeaturegroups"); +this.showFeatureGroups = this.getParameter ("showfeaturegroups"); +this.features = this.getParameter ("features"); +this.showFeatureSettings = this.getParameter ("showFeatureSettings"); +this.scoreFile = this.getParameter ("scoreFile"); +this.treeFile = this.getParameter ("tree"); +if (this.treeFile == null) this.treeFile = this.getParameter ("treeFile"); +this.windowWidth = this.getParameter ("windowWidth"); +this.windowHeight = this.getParameter ("windowHeight"); +this.defaultColour = this.getParameter ("defaultColour"); +this.sortBy = this.getParameter ("sortBy"); +this.wrap = this.getParameter ("wrap"); +this.centrecolumnlabels = this.getParameter ("centrecolumnlabels"); +this.userDefinedColour = this.getParameter ("userDefinedColour"); +this.widthScale = this.getParameter ("widthScale"); +this.heightScale = this.getParameter ("heightScale"); +this.upperCase = this.getParameter ("upperCase"); +this.file2 = this.getParameter ("file2"); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getDefaultParameter", +function (name, def) { +var stn; +if ((stn = this.getParameter (name)) == null) { +return def; +}if (stn.toLowerCase ().equals ("true")) { +return true; +}return false; +}, "~S,~B"); +Clazz.defineMethod (c$, "getLinkParams", +function (links) { +var label; +var url; +for (var i = 1; i < 10; i++) { +label = this.getParameter ("linkLabel_" + i); +url = this.getParameter ("linkURL_" + i); +if (label != null && url != null) { +links.addElement (label + "|" + url); +}} +}, "java.util.Vector"); +Clazz.defineMethod (c$, "getStructureSelectionManager", +function () { +return jalview.structure.StructureSelectionManager.getStructureSelectionManager (this); +}); +Clazz.defineMethod (c$, "getSelectedSequences", +function () { +return this.getSelectedSequencesFrom (this.getDefaultTargetFrame ()); +}); +Clazz.defineMethod (c$, "getSelectedSequences", +function (sep) { +return this.getSelectedSequencesFrom (this.getDefaultTargetFrame (), sep); +}, "~S"); +Clazz.defineMethod (c$, "getSelectedSequencesFrom", +function (alf) { +return this.getSelectedSequencesFrom (alf, this.separator); +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "getSelectedSequencesFrom", +function (alf, sep) { +var result = new StringBuffer (""); +if (sep == null || sep.length == 0) { +sep = this.separator; +}if (alf.viewport.getSelectionGroup () != null) { +var seqs = alf.viewport.getSelectionGroup ().getSequencesInOrder (alf.viewport.getAlignment ()); +for (var i = 0; i < seqs.length; i++) { +result.append (seqs[i].getName ()); +result.append (sep); +} +}return result.toString (); +}, "jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "highlight", +function (sequenceId, position, alignedPosition) { +this.highlightIn (this.getDefaultTargetFrame (), sequenceId, position, alignedPosition); +}, "~S,~S,~S"); +Clazz.overrideMethod (c$, "highlightIn", +function (alf, sequenceId, position, alignedPosition) { +var matcher = new jalview.analysis.SequenceIdMatcher (alf.viewport.getAlignment ().getSequencesArray ()); +var sq = matcher.findIdMatch (sequenceId); +if (sq != null) { +var apos = -1; +try { +apos = new Integer (position).intValue (); +apos--; +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +return; +} else { +throw ex; +} +} +var me = this; +var pos = apos; +if (alignedPosition != null && (alignedPosition.trim ().length == 0 || alignedPosition.toLowerCase ().indexOf ("false") > -1)) { +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$1") ? 0 : jalview.bin.JalviewLite.$JalviewLite$1$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$1, this, Clazz.cloneFinals ("me", me, "sq", sq, "pos", pos)))); +} else { +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$2") ? 0 : jalview.bin.JalviewLite.$JalviewLite$2$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$2, this, Clazz.cloneFinals ("me", me, "sq", sq, "pos", pos)))); +}}}, "jalview.appletgui.AlignFrame,~S,~S,~S"); +Clazz.defineMethod (c$, "select", +function (sequenceIds, columns) { +this.selectIn (this.getDefaultTargetFrame (), sequenceIds, columns, this.separator); +}, "~S,~S"); +Clazz.defineMethod (c$, "select", +function (sequenceIds, columns, sep) { +this.selectIn (this.getDefaultTargetFrame (), sequenceIds, columns, sep); +}, "~S,~S,~S"); +Clazz.defineMethod (c$, "selectIn", +function (alf, sequenceIds, columns) { +this.selectIn (alf, sequenceIds, columns, this.separator); +}, "jalview.appletgui.AlignFrame,~S,~S"); +Clazz.defineMethod (c$, "selectIn", +function (alf, sequenceIds, columns, sep) { +if (sep == null || sep.length == 0) { +sep = this.separator; +} else { +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Selecting region using separator string '" + this.separator + "'"); +}}var ids = this.separatorListToArray (sequenceIds, sep); +var cols = this.separatorListToArray (columns, sep); +var sel = new jalview.datamodel.SequenceGroup (); +var csel = new jalview.datamodel.ColumnSelection (); +var al = alf.viewport.getAlignment (); +var matcher = new jalview.analysis.SequenceIdMatcher (alf.viewport.getAlignment ().getSequencesArray ()); +var start = 0; +var end = al.getWidth (); +var alw = al.getWidth (); +var seqsfound = true; +if (ids != null && ids.length > 0) { +seqsfound = false; +for (var i = 0; i < ids.length; i++) { +if (ids[i].trim ().length == 0) { +continue; +}var sq = matcher.findIdMatch (ids[i]); +if (sq != null) { +seqsfound = true; +sel.addSequence (sq, false); +}} +}var inseqpos = false; +if (cols != null && cols.length > 0) { +var seset = false; +for (var i = 0; i < cols.length; i++) { +var cl = cols[i].trim (); +if (cl.length == 0) { +continue; +}var p; +if ((p = cl.indexOf ("-")) > -1) { +var from = -1; +var to = -1; +try { +from = new Integer (cl.substring (0, p)).intValue (); +from--; +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +System.err.println ("ERROR: Couldn't parse first integer in range element column selection string '" + cl + "' - format is 'from-to'"); +return; +} else { +throw ex; +} +} +try { +to = new Integer (cl.substring (p + 1)).intValue (); +to--; +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +System.err.println ("ERROR: Couldn't parse second integer in range element column selection string '" + cl + "' - format is 'from-to'"); +return; +} else { +throw ex; +} +} +if (from >= 0 && to >= 0) { +if (from < to) { +var t = to; +to = from; +to = t; +}if (!seset) { +start = from; +end = to; +seset = true; +} else { +if (start > from) { +start = from; +}if (end < to) { +end = to; +}}for (var r = from; r <= to; r++) { +if (r >= 0 && r < alw) { +csel.addElement (r); +}} +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Range '" + cl + "' deparsed as [" + from + "," + to + "]"); +}} else { +System.err.println ("ERROR: Invalid Range '" + cl + "' deparsed as [" + from + "," + to + "]"); +}} else { +var r = -1; +try { +r = new Integer (cl).intValue (); +r--; +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +if (cl.toLowerCase ().equals ("sequence")) { +inseqpos = true; +} else { +System.err.println ("ERROR: Couldn't parse integer from point selection element of column selection string '" + cl + "'"); +return; +}} else { +throw ex; +} +} +if (r >= 0 && r <= alw) { +if (!seset) { +start = r; +end = r; +seset = true; +} else { +if (start > r) { +start = r; +}if (end < r) { +end = r; +}}csel.addElement (r); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Point selection '" + cl + "' deparsed as [" + r + "]"); +}} else { +System.err.println ("ERROR: Invalid Point selection '" + cl + "' deparsed as [" + r + "]"); +}}} +}if (seqsfound) { +if (inseqpos && sel.getSize () > 0) { +var rs = sel.getSequenceAt (0); +start = rs.findIndex (start); +end = rs.findIndex (end); +if (csel != null) { +var cs = csel.getSelected (); +csel.clear (); +for (var selectedCol, $selectedCol = cs.iterator (); $selectedCol.hasNext () && ((selectedCol = $selectedCol.next ()) || true);) { +csel.addElement (rs.findIndex ((selectedCol).intValue ())); +} +}}sel.setStartRes (start); +sel.setEndRes (end); +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$3") ? 0 : jalview.bin.JalviewLite.$JalviewLite$3$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$3, this, Clazz.cloneFinals ("alf", alf, "sel", sel, "csel", csel)))); +}}, "jalview.appletgui.AlignFrame,~S,~S,~S"); +Clazz.overrideMethod (c$, "getSelectedSequencesAsAlignment", +function (format, suffix) { +return this.getSelectedSequencesAsAlignmentFrom (this.getDefaultTargetFrame (), format, suffix); +}, "~S,~S"); +Clazz.overrideMethod (c$, "getSelectedSequencesAsAlignmentFrom", +function (alf, format, suffix) { +try { +var seqlimits = suffix.equalsIgnoreCase ("true"); +if (alf.viewport.getSelectionGroup () != null) { +var reply = new jalview.io.AppletFormatAdapter ().formatSequences (format, new jalview.datamodel.Alignment (alf.viewport.getSelectionAsNewSequence ()), seqlimits); +return reply; +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +return "Error retrieving alignment in " + format + " format. "; +} else { +throw ex; +} +} +return ""; +}, "jalview.appletgui.AlignFrame,~S,~S"); +Clazz.overrideMethod (c$, "getAlignmentOrder", +function () { +return this.getAlignmentOrderFrom (this.getDefaultTargetFrame ()); +}); +Clazz.defineMethod (c$, "getAlignmentOrderFrom", +function (alf) { +return this.getAlignmentOrderFrom (alf, this.separator); +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "getAlignmentOrderFrom", +function (alf, sep) { +var alorder = alf.getAlignViewport ().getAlignment (); +var order = new Array (alorder.getHeight ()); +for (var i = 0; i < order.length; i++) { +order[i] = alorder.getSequenceAt (i).getName (); +} +return this.arrayToSeparatorList (order); +}, "jalview.appletgui.AlignFrame,~S"); +Clazz.defineMethod (c$, "orderBy", +function (order, undoName) { +return this.orderBy (order, undoName, this.separator); +}, "~S,~S"); +Clazz.defineMethod (c$, "orderBy", +function (order, undoName, sep) { +return this.orderAlignmentBy (this.getDefaultTargetFrame (), order, undoName, sep); +}, "~S,~S,~S"); +Clazz.overrideMethod (c$, "orderAlignmentBy", +function (alf, order, undoName, sep) { +var ids = this.separatorListToArray (order, sep); +var sqs = null; +if (ids != null && ids.length > 0) { +var matcher = new jalview.analysis.SequenceIdMatcher (alf.viewport.getAlignment ().getSequencesArray ()); +var s = 0; +sqs = new Array (ids.length); +for (var i = 0; i < ids.length; i++) { +if (ids[i].trim ().length == 0) { +continue; +}var sq = matcher.findIdMatch (ids[i]); +if (sq != null) { +sqs[s++] = sq; +}} +if (s > 0) { +var sqq = new Array (s); +System.arraycopy (sqs, 0, sqq, 0, s); +sqs = sqq; +} else { +sqs = null; +}}if (sqs == null) { +return ""; +};var aorder = new jalview.datamodel.AlignmentOrder (sqs); +if (undoName != null && undoName.trim ().length == 0) { +undoName = null; +}var _undoName = undoName; +return alf.sortBy (aorder, _undoName) ? "true" : ""; +}, "jalview.appletgui.AlignFrame,~S,~S,~S"); +Clazz.defineMethod (c$, "getAlignment", +function (format) { +return this.getAlignmentFrom (this.getDefaultTargetFrame (), format, "true"); +}, "~S"); +Clazz.defineMethod (c$, "getAlignmentFrom", +function (alf, format) { +return this.getAlignmentFrom (alf, format, "true"); +}, "jalview.appletgui.AlignFrame,~S"); +Clazz.defineMethod (c$, "getAlignment", +function (format, suffix) { +return this.getAlignmentFrom (this.getDefaultTargetFrame (), format, suffix); +}, "~S,~S"); +Clazz.defineMethod (c$, "getAlignmentFrom", +function (alf, format, suffix) { +try { +var seqlimits = suffix.equalsIgnoreCase ("true"); +var reply = new jalview.io.AppletFormatAdapter ().formatSequences (format, alf.viewport.getAlignment (), seqlimits); +return reply; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +return "Error retrieving alignment in " + format + " format. "; +} else { +throw ex; +} +} +}, "jalview.appletgui.AlignFrame,~S,~S"); +Clazz.overrideMethod (c$, "loadAnnotation", +function (annotation) { +this.loadAnnotationFrom (this.getDefaultTargetFrame (), annotation); +}, "~S"); +Clazz.overrideMethod (c$, "loadAnnotationFrom", +function (alf, annotation) { +if ( new jalview.io.AnnotationFile ().annotateAlignmentView (alf.getAlignViewport (), annotation, jalview.io.AppletFormatAdapter.PASTE)) { +alf.alignPanel.fontChanged (); +alf.alignPanel.setScrollValues (0, 0); +} else { +alf.parseFeaturesFile (annotation, jalview.io.AppletFormatAdapter.PASTE); +}}, "jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "loadFeatures", +function (features, autoenabledisplay) { +this.loadFeaturesFrom (this.getDefaultTargetFrame (), features, autoenabledisplay); +}, "~S,~B"); +Clazz.overrideMethod (c$, "loadFeaturesFrom", +function (alf, features, autoenabledisplay) { +return alf.parseFeaturesFile (features, jalview.io.AppletFormatAdapter.PASTE, autoenabledisplay); +}, "jalview.appletgui.AlignFrame,~S,~B"); +Clazz.overrideMethod (c$, "getFeatures", +function (format) { +return this.getFeaturesFrom (this.getDefaultTargetFrame (), format); +}, "~S"); +Clazz.overrideMethod (c$, "getFeaturesFrom", +function (alf, format) { +return alf.outputFeatures (false, format); +}, "jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "getAnnotation", +function () { +return this.getAnnotationFrom (this.getDefaultTargetFrame ()); +}); +Clazz.overrideMethod (c$, "getAnnotationFrom", +function (alf) { +return alf.outputAnnotations (false); +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "newView", +function () { +return this.newViewFrom (this.getDefaultTargetFrame ()); +}); +Clazz.defineMethod (c$, "newView", +function (name) { +return this.newViewFrom (this.getDefaultTargetFrame (), name); +}, "~S"); +Clazz.defineMethod (c$, "newViewFrom", +function (alf) { +return alf.newView (null); +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "newViewFrom", +function (alf, name) { +return alf.newView (name); +}, "jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "loadAlignment", +function (text, title) { +var al = null; +var format = new jalview.io.IdentifyFile ().Identify (text, jalview.io.AppletFormatAdapter.PASTE); +try { +al = new jalview.io.AppletFormatAdapter ().readFile (text, jalview.io.AppletFormatAdapter.PASTE, format); +if (al.getHeight () > 0) { +return new jalview.appletgui.AlignFrame (al, this, title, false); +}} catch (ex) { +if (Clazz.exceptionOf (ex, java.io.IOException)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +return null; +}, "~S,~S"); +Clazz.defineMethod (c$, "setMouseoverListener", +function (listener) { +this.setMouseoverListener (this.currentAlignFrame, listener); +}, "~S"); +Clazz.defineMethod (c$, "setMouseoverListener", +function (af, listener) { +if (listener != null) { +listener = listener.trim (); +if (listener.length == 0) { +System.err.println ("jalview Javascript error: Ignoring empty function for mouseover listener."); +return; +}}var mol = new jalview.javascript.MouseOverListener (this, af, listener); +this.javascriptListeners.addElement (mol); +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).addStructureViewerListener (mol); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Added a mouseover listener for " + ((af == null) ? "All frames" : "Just views for " + af.getAlignViewport ().getSequenceSetId ())); +System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); +}}, "jalview.appletgui.AlignFrame,~S"); +Clazz.defineMethod (c$, "setSelectionListener", +function (listener) { +this.setSelectionListener (null, listener); +}, "~S"); +Clazz.defineMethod (c$, "setSelectionListener", +function (af, listener) { +if (listener != null) { +listener = listener.trim (); +if (listener.length == 0) { +System.err.println ("jalview Javascript error: Ignoring empty function for selection listener."); +return; +}}var mol = new jalview.javascript.JsSelectionSender (this, af, listener); +this.javascriptListeners.addElement (mol); +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).addSelectionListener (mol); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Added a selection listener for " + ((af == null) ? "All frames" : "Just views for " + af.getAlignViewport ().getSequenceSetId ())); +System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); +}}, "jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "setStructureListener", +function (listener, modelSet) { +if (listener != null) { +listener = listener.trim (); +if (listener.length == 0) { +System.err.println ("jalview Javascript error: Ignoring empty function for selection listener."); +return; +}}var mol = new jalview.javascript.MouseOverStructureListener (this, listener, this.separatorListToArray (modelSet)); +this.javascriptListeners.addElement (mol); +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).addStructureViewerListener (mol); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Added a javascript structure viewer listener '" + listener + "'"); +System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); +}}, "~S,~S"); +Clazz.overrideMethod (c$, "removeJavascriptListener", +function (af, listener) { +if (listener != null) { +listener = listener.trim (); +if (listener.length == 0) { +listener = null; +}}var rprt = false; +for (var ms = 0, msSize = this.javascriptListeners.size (); ms < msSize; ) { +var lstn = this.javascriptListeners.elementAt (ms); +var lstner = lstn; +if ((af == null || lstner.getAlignFrame () === af) && (listener == null || lstner.getListenerFunction ().equals (listener))) { +this.javascriptListeners.removeElement (lstner); +msSize--; +if (Clazz.instanceOf (lstner, jalview.structure.SelectionListener)) { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeSelectionListener (lstner); +} else { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeStructureViewerListener (lstner, null); +}rprt = jalview.bin.JalviewLite.debug; +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Removed listener '" + listener + "'"); +}} else { +ms++; +}} +if (rprt) { +System.err.println ("There are now " + this.javascriptListeners.size () + " listeners in total."); +}}, "jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "stop", +function () { +System.err.println ("Applet " + this.getName () + " stop()."); +this.tidyUp (); +}); +Clazz.overrideMethod (c$, "destroy", +function () { +System.err.println ("Applet " + this.getName () + " destroy()."); +this.tidyUp (); +}); +Clazz.defineMethod (c$, "tidyUp", +($fz = function () { +this.removeAll (); +if (this.currentAlignFrame != null && this.currentAlignFrame.viewport != null && this.currentAlignFrame.viewport.applet != null) { +var av = this.currentAlignFrame.viewport; +this.currentAlignFrame.closeMenuItem_actionPerformed (); +av.applet = null; +this.currentAlignFrame = null; +}if (this.javascriptListeners != null) { +while (this.javascriptListeners.size () > 0) { +var mol = this.javascriptListeners.elementAt (0); +this.javascriptListeners.removeElement (mol); +if (Clazz.instanceOf (mol, jalview.structure.SelectionListener)) { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeSelectionListener (mol); +} else { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this).removeStructureViewerListener (mol, null); +}mol.jvlite = null; +} +}if (this.jsFunctionExec != null) { +this.jsFunctionExec.stopQueue (); +this.jsFunctionExec.jvlite = null; +}this.initialAlignFrame = null; +this.jsFunctionExec = null; +this.javascriptListeners = null; +jalview.structure.StructureSelectionManager.release (this); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "mouseOverStructure", +function (pdbResNum, chain, pdbfile) { +var me = this; +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$4") ? 0 : jalview.bin.JalviewLite.$JalviewLite$4$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$4, this, Clazz.cloneFinals ("me", me, "pdbResNum", pdbResNum, "chain", chain, "pdbfile", pdbfile)))); +}, "~S,~S,~S"); +Clazz.overrideMethod (c$, "scrollViewToIn", +function (alf, topRow, leftHandColumn) { +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$5") ? 0 : jalview.bin.JalviewLite.$JalviewLite$5$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$5, this, Clazz.cloneFinals ("alf", alf, "topRow", topRow, "leftHandColumn", leftHandColumn)))); +}, "jalview.appletgui.AlignFrame,~S,~S"); +Clazz.overrideMethod (c$, "scrollViewToRowIn", +function (alf, topRow) { +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$6") ? 0 : jalview.bin.JalviewLite.$JalviewLite$6$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$6, this, Clazz.cloneFinals ("alf", alf, "topRow", topRow)))); +}, "jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "scrollViewToColumnIn", +function (alf, leftHandColumn) { +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$7") ? 0 : jalview.bin.JalviewLite.$JalviewLite$7$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$7, this, Clazz.cloneFinals ("alf", alf, "leftHandColumn", leftHandColumn)))); +}, "jalview.appletgui.AlignFrame,~S"); +c$.initBuildDetails = Clazz.defineMethod (c$, "initBuildDetails", +($fz = function () { +if (jalview.bin.JalviewLite.builddate == null) { +jalview.bin.JalviewLite.builddate = "unknown"; +jalview.bin.JalviewLite.version = "test"; +jalview.bin.JalviewLite.installation = "Webstart"; +var url = jalview.bin.JalviewLite.getResource ("/.build_properties"); +if (url != null) { +try { +var reader = new java.io.BufferedReader ( new java.io.InputStreamReader (url.openStream ())); +var line; +while ((line = reader.readLine ()) != null) { +if (line.indexOf ("VERSION") > -1) { +jalview.bin.JalviewLite.version = line.substring (line.indexOf ("=") + 1); +}if (line.indexOf ("BUILD_DATE") > -1) { +jalview.bin.JalviewLite.builddate = line.substring (line.indexOf ("=") + 1); +}if (line.indexOf ("INSTALLATION") > -1) { +jalview.bin.JalviewLite.installation = line.substring (line.indexOf ("=") + 1); +}} +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +}}}, $fz.isPrivate = true, $fz)); +c$.getBuildDate = Clazz.defineMethod (c$, "getBuildDate", +function () { +jalview.bin.JalviewLite.initBuildDetails (); +return jalview.bin.JalviewLite.builddate; +}); +c$.getInstallation = Clazz.defineMethod (c$, "getInstallation", +function () { +jalview.bin.JalviewLite.initBuildDetails (); +return jalview.bin.JalviewLite.installation; +}); +c$.getVersion = Clazz.defineMethod (c$, "getVersion", +function () { +jalview.bin.JalviewLite.initBuildDetails (); +return jalview.bin.JalviewLite.version; +}); +Clazz.overrideMethod (c$, "init", +function () { +this.setParams (); +try { +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Applet context is '" + this.getAppletContext ().getClass ().toString () + "'"); +}var scriptObject = netscape.javascript.JSObject.getWindow (this); +if (jalview.bin.JalviewLite.debug && scriptObject != null) { +System.err.println ("Applet has Javascript callback support."); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Warning: No JalviewLite javascript callbacks available."); +if (jalview.bin.JalviewLite.debug) { +ex.printStackTrace (); +}} else { +throw ex; +} +} +if (jalview.bin.JalviewLite.debug) { +System.err.println ("JalviewLite Version " + jalview.bin.JalviewLite.getVersion ()); +System.err.println ("Build Date : " + jalview.bin.JalviewLite.getBuildDate ()); +System.err.println ("Installation : " + jalview.bin.JalviewLite.getInstallation ()); +}if (this.externalstructureviewer != null) { +this.useXtrnalSviewer = this.externalstructureviewer.trim ().toLowerCase ().equals ("true"); +}if (this.sep != null) { +if (this.sep.length > 0) { +this.separator = this.sep; +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Separator set to '" + this.separator + "'"); +}} else { +throw new Error (jalview.util.MessageManager.getString ("error.invalid_separator_parameter")); +}}var r = 255; +var g = 255; +var b = 255; +if (this.rgb != null) { +try { +r = Integer.parseInt (this.rgb.substring (0, 2), 16); +g = Integer.parseInt (this.rgb.substring (2, 4), 16); +b = Integer.parseInt (this.rgb.substring (4, 6), 16); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +r = 255; +g = 255; +b = 255; +} else { +throw ex; +} +} +}this.rgb = this.labelColour; +if (this.rgb != null) { +this.launcher.setLabel (this.rgb); +}this.setBackground ( new java.awt.Color (r, g, b)); +if (this.startupFile == null) { +var data = new StringBuffer ("PASTE"); +var i = 1; +while ((this.startupFile = this.getParameter ("sequence" + i)) != null) { +data.append (this.startupFile.toString () + "\n"); +i++; +} +if (data.length () > 5) { +this.startupFile = data.toString (); +}}if (!this.enableSplitFrame) { +this.file2 = null; +}if (this.embedded) { +var loader = Clazz.innerTypeInstance (jalview.bin.JalviewLite.LoadingThread, this, null, this.startupFile, this.file2, this); +{ +loader.run(); +}} else if (this.startupFile != null) { +if (!this.showButton) { +var loader = Clazz.innerTypeInstance (jalview.bin.JalviewLite.LoadingThread, this, null, this.startupFile, this.file2, this); +loader.start (); +} else { +this.add (this.launcher); +this.launcher.addActionListener (((Clazz.isClassDefined ("jalview.bin.JalviewLite$8") ? 0 : jalview.bin.JalviewLite.$JalviewLite$8$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$8, this, null))); +}} else { +this.startupFile = "NO FILE"; +this.fileFound = false; +this.callInitCallback (); +}}); +Clazz.defineMethod (c$, "initLiveConnect", +($fz = function () { +var notFailed = false; +var tries = 0; +while (!notFailed && tries < 10) { +if (tries > 0) { +System.err.println ("LiveConnect request thread going to sleep."); +}try { +Thread.sleep (700 * (1 + tries)); +} catch (q) { +if (Clazz.exceptionOf (q, InterruptedException)) { +} else { +throw q; +} +} +;if (tries++ > 0) { +System.err.println ("LiveConnect request thread woken up."); +}try { +var scriptObject = netscape.javascript.JSObject.getWindow (this); +if (scriptObject.eval ("navigator") != null) { +notFailed = true; +}} catch (jsex) { +if (Clazz.exceptionOf (jsex, Exception)) { +System.err.println ("Attempt " + tries + " to access LiveConnect javascript failed."); +} else { +throw jsex; +} +} +} +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "callInitCallback", +($fz = function () { +if (this.initjscallback == null) { +return; +}this.initjscallback = this.initjscallback.trim (); +if (this.initjscallback.length > 0) { +var scriptObject = null; +try { +scriptObject = netscape.javascript.JSObject.getWindow (this); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +;this.initLiveConnect (); +if (scriptObject != null) { +try { + new jalview.javascript.JSFunctionExec (this).executeJavascriptFunction (true, this.initjscallback, null, "Calling oninit callback '" + this.initjscallback + "'."); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Exception when executing _oninit callback '" + this.initjscallback + "'."); +e.printStackTrace (); +} else { +throw e; +} +} +} else { +System.err.println ("Not executing _oninit callback '" + this.initjscallback + "' - no scripting allowed."); +}}}, $fz.isPrivate = true, $fz)); +c$.addFrame = Clazz.defineMethod (c$, "addFrame", +function (frame, title, width, height) { +frame.setLocation (jalview.bin.JalviewLite.lastFrameX, jalview.bin.JalviewLite.lastFrameY); +jalview.bin.JalviewLite.lastFrameX += 40; +jalview.bin.JalviewLite.lastFrameY += 40; +frame.setSize (width, height); +frame.setTitle (title); +frame.addWindowListener (((Clazz.isClassDefined ("jalview.bin.JalviewLite$9") ? 0 : jalview.bin.JalviewLite.$JalviewLite$9$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$9, this, Clazz.cloneFinals ("frame", frame)))); +frame.setVisible (true); +}, "javax.swing.JFrame,~S,~N,~N"); +Clazz.defineMethod (c$, "paintComponent", +function (g) { +if (!this.fileFound) { +g.setColor ( new java.awt.Color (200, 200, 200)); +g.setColor (java.awt.Color.cyan); +g.fillRect (0, 0, this.getSize ().width, this.getSize ().height); +g.setColor (java.awt.Color.red); +g.drawString (jalview.util.MessageManager.getString ("label.jalview_cannot_open_file"), 5, 15); +g.drawString ("\"" + this.startupFile + "\"", 5, 30); +} else if (this.embedded && !this.haveShownLoadMessage) { +g.setColor (java.awt.Color.black); +g.setFont ( new java.awt.Font ("Arial", 1, 24)); +g.drawString (jalview.util.MessageManager.getString ("label.jalview_applet"), 50, Clazz.doubleToInt (this.getSize ().height / 2) - 30); +g.drawString (jalview.util.MessageManager.getString ("label.loading_data") + "...", 50, Clazz.doubleToInt (this.getSize ().height / 2)); +this.haveShownLoadMessage = true; +}}, "java.awt.Graphics"); +Clazz.defineMethod (c$, "getAppletWindow", +function (class1) { +var wnds = new java.util.Vector (); +var cmp = this.getComponents (); +if (cmp != null) { +for (var i = 0; i < cmp.length; i++) { +if (class1.isAssignableFrom (cmp[i].getClass ())) { +wnds.addElement (cmp); +}} +}return wnds; +}, "Class"); +Clazz.defineMethod (c$, "getDefaultTargetFrame", +function () { +if (this.currentAlignFrame != null) { +return this.currentAlignFrame; +}if (this.initialAlignFrame != null) { +return this.initialAlignFrame; +}System.err.println ("Implementation error: Jalview Applet API cannot work out which AlignFrame to use."); +return null; +}); +Clazz.defineMethod (c$, "separatorListToArray", +function (list) { +return this.separatorListToArray (list, this.separator); +}, "~S"); +Clazz.defineMethod (c$, "separatorListToArray", +function (list, separator) { +var seplen = separator.length; +if (list == null || list.equals ("") || list.equals (separator)) { +return null; +}var jv = new java.util.Vector (); +var cp = 0; +var pos; +while ((pos = list.indexOf (separator, cp)) > cp) { +jv.addElement (list.substring (cp, pos)); +cp = pos + seplen; +} +if (cp < list.length) { +var c = list.substring (cp); +if (!c.equals (separator)) { +jv.addElement (c); +}}if (jv.size () > 0) { +var v = new Array (jv.size ()); +for (var i = 0; i < v.length; i++) { +v[i] = jv.elementAt (i); +} +jv.removeAllElements (); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Array from '" + separator + "' separated List:\n" + v.length); +for (var i = 0; i < v.length; i++) { +System.err.println ("item " + i + " '" + v[i] + "'"); +} +}return v; +}if (jalview.bin.JalviewLite.debug) { +System.err.println ("Empty Array from '" + separator + "' separated List"); +}return null; +}, "~S,~S"); +Clazz.defineMethod (c$, "arrayToSeparatorList", +function (list) { +return this.arrayToSeparatorList (list, this.separator); +}, "~A"); +Clazz.defineMethod (c$, "arrayToSeparatorList", +function (list, separator) { +var v = new StringBuffer (); +if (list != null && list.length > 0) { +for (var i = 0, iSize = list.length; i < iSize; i++) { +if (list[i] != null) { +if (i > 0) { +v.append (separator); +}v.append (list[i]); +}} +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Returning '" + separator + "' separated List:\n"); +System.err.println (v); +}return v.toString (); +}if (jalview.bin.JalviewLite.debug) { +System.err.println ("Returning empty '" + separator + "' separated List\n"); +}return "" + separator; +}, "~A,~S"); +Clazz.overrideMethod (c$, "getFeatureGroups", +function () { +var lst = this.arrayToSeparatorList (this.getDefaultTargetFrame ().getFeatureGroups ()); +return lst; +}); +Clazz.overrideMethod (c$, "getFeatureGroupsOn", +function (alf) { +var lst = this.arrayToSeparatorList (alf.getFeatureGroups ()); +return lst; +}, "jalview.appletgui.AlignFrame"); +Clazz.overrideMethod (c$, "getFeatureGroupsOfState", +function (visible) { +return this.arrayToSeparatorList (this.getDefaultTargetFrame ().getFeatureGroupsOfState (visible)); +}, "~B"); +Clazz.overrideMethod (c$, "getFeatureGroupsOfStateOn", +function (alf, visible) { +return this.arrayToSeparatorList (alf.getFeatureGroupsOfState (visible)); +}, "jalview.appletgui.AlignFrame,~B"); +Clazz.overrideMethod (c$, "setFeatureGroupStateOn", +function (alf, groups, state) { +var st = state; +java.awt.EventQueue.invokeLater (((Clazz.isClassDefined ("jalview.bin.JalviewLite$10") ? 0 : jalview.bin.JalviewLite.$JalviewLite$10$ ()), Clazz.innerTypeInstance (jalview.bin.JalviewLite$10, this, Clazz.cloneFinals ("alf", alf, "groups", groups, "st", st)))); +}, "jalview.appletgui.AlignFrame,~S,~B"); +Clazz.overrideMethod (c$, "setFeatureGroupState", +function (groups, state) { +this.setFeatureGroupStateOn (this.getDefaultTargetFrame (), groups, state); +}, "~S,~B"); +Clazz.overrideMethod (c$, "getSeparator", +function () { +return this.separator; +}); +Clazz.overrideMethod (c$, "setSeparator", +function (separator) { +if (separator == null || separator.length < 1) { +separator = "\u00ac"; +}this.separator = separator; +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Default Separator now: '" + separator + "'"); +}}, "~S"); +Clazz.overrideMethod (c$, "addPdbFile", +function (alFrame, sequenceId, pdbEntryString, pdbFile) { +return alFrame.addPdbFile (sequenceId, pdbEntryString, pdbFile); +}, "jalview.appletgui.AlignFrame,~S,~S,~S"); +Clazz.defineMethod (c$, "setAlignPdbStructures", +function (alignPdbStructures) { +this.alignPdbStructures = alignPdbStructures; +}, "~B"); +Clazz.defineMethod (c$, "isAlignPdbStructures", +function () { +return this.alignPdbStructures; +}); +Clazz.overrideMethod (c$, "start", +function () { +}); +Clazz.defineMethod (c$, "setJsMessageSet", +function (messageclass, viewId, colcommands) { +var msgset = this.jsmessages.get (messageclass); +if (msgset == null) { +msgset = new java.util.Hashtable (); +this.jsmessages.put (messageclass, msgset); +}msgset.put (viewId, colcommands); +var l = Clazz.newLongArray (colcommands.length, 0); +for (var i = 0; i < colcommands.length; i++) { +l[i] = colcommands[i].hashCode (); +} +this.jshashes.put (messageclass + "|" + viewId, l); +}, "~S,~S,~A"); +Clazz.overrideMethod (c$, "getJsMessage", +function (messageclass, viewId) { +var msgset = this.jsmessages.get (messageclass); +if (msgset != null) { +var msgs = msgset.get (viewId); +if (msgs != null) { +for (var i = 0; i < msgs.length; i++) { +if (msgs[i] != null) { +var m = msgs[i]; +msgs[i] = null; +return m; +}} +}}return ""; +}, "~S,~S"); +Clazz.defineMethod (c$, "isJsMessageSetChanged", +function (string, string2, colcommands) { +var l = this.jshashes.get (string + "|" + string2); +if (l == null && colcommands != null) { +return true; +}for (var i = 0; i < colcommands.length; i++) { +if (l[i] != colcommands[i].hashCode ()) { +return true; +}} +return false; +}, "~S,~S,~A"); +Clazz.defineMethod (c$, "getJsExecQueue", +function () { +return this.jsExecQueue; +}); +Clazz.defineMethod (c$, "setExecutor", +function (jsFunctionExec2) { +this.jsFunctionExec = jsFunctionExec2; +}, "jalview.javascript.JSFunctionExec"); +Clazz.defineMethod (c$, "getDefaultColourParameter", +function (colparam, defcolour) { +var colprop = this.getParameter (colparam); +if (colprop == null || colprop.trim ().length == 0) { +return defcolour; +}var col = jalview.schemes.ColourSchemeProperty.getAWTColorFromName (colprop); +if (col == null) { +try { +col = new jalview.schemes.UserColourScheme (colprop).findColour ('A'); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Couldn't parse '" + colprop + "' as a colour for " + colparam); +col = null; +} else { +throw ex; +} +} +}return (col == null) ? defcolour : col; +}, "~S,java.awt.Color"); +Clazz.defineMethod (c$, "openJalviewHelpUrl", +function () { +if (this.helpUrl == null || this.helpUrl.trim ().length < 5) { +this.helpUrl = "http://www.jalview.org/help.html"; +}this.showURL (this.helpUrl, "HELP"); +}); +Clazz.defineMethod (c$, "resolveUrlForLocalOrAbsolute", +($fz = function (url, localref) { +var codebase = localref.toString (); +var pt = codebase.indexOf ("?"); +if (pt < 0) pt = codebase.length; +codebase = codebase.substring (0, pt); +codebase = codebase.substring (0, codebase.lastIndexOf ("/") + 1); +if (url.indexOf ("/") == 0 && !localref.getProtocol ().equals ("file")) { +pt = codebase.indexOf ("/", 8); +return codebase.substring (0, pt) + url; +}return codebase + url; +}, $fz.isPrivate = true, $fz), "~S,java.net.URL"); +Clazz.defineMethod (c$, "showURL", +function (url, target) { +try { +if (url.indexOf (":") == -1) { +var prepend; +url = this.resolveUrlForLocalOrAbsolute (url, prepend = this.getDefaultParameter ("resolvetocodebase", false) ? this.getDocumentBase () : this.getCodeBase ()); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Show url (prepended " + prepend + " - toggle resolvetocodebase if code/docbase resolution is wrong): " + url); +}} else { +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Show url: " + url); +}}if (url.indexOf ("javascript:") == 0) { +this.getAppletContext ().showDocument ( new java.net.URL (url)); +} else { +this.getAppletContext ().showDocument ( new java.net.URL (url), target); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +}, "~S,~S"); +c$.$JalviewLite$LoadJmolThread$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.running = false; +Clazz.instantialize (this, arguments); +}, jalview.bin.JalviewLite, "LoadJmolThread", Thread); +Clazz.overrideMethod (c$, "run", +function () { +if (this.running || this.b$["jalview.bin.JalviewLite"].checkedForJmol) { +return; +}this.running = true; +if (this.b$["jalview.bin.JalviewLite"].checkForJmol) { +try { +if (!System.getProperty ("java.version").startsWith ("1.1")) { +Class.forName ("org.jmol.adapter.smarter.SmarterJmolAdapter"); +this.b$["jalview.bin.JalviewLite"].jmolAvailable = true; +}if (!this.b$["jalview.bin.JalviewLite"].jmolAvailable) { +System.out.println ("Jmol not available - Using MCview for structures"); +}} catch (ex) { +if (Clazz.exceptionOf (ex, ClassNotFoundException)) { +} else { +throw ex; +} +} +} else { +this.b$["jalview.bin.JalviewLite"].jmolAvailable = false; +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Skipping Jmol check. Will use MCView (probably)"); +}}this.b$["jalview.bin.JalviewLite"].checkedForJmol = true; +this.running = false; +}); +Clazz.defineMethod (c$, "notFinished", +function () { +return this.running || !this.b$["jalview.bin.JalviewLite"].checkedForJmol; +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$LoadingThread$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.protocol = null; +this._file = null; +this._file2 = null; +this.applet = null; +Clazz.instantialize (this, arguments); +}, jalview.bin.JalviewLite, "LoadingThread", Thread); +Clazz.defineMethod (c$, "dbgMsg", +($fz = function (a) { +if (jalview.bin.JalviewLite.debug) { +System.err.println (a); +}}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "setProtocolState", +function (a) { +if (a.startsWith ("PASTE")) { +a = a.substring (5); +this.protocol = jalview.io.AppletFormatAdapter.PASTE; +} else if (this.inArchive (a)) { +this.protocol = jalview.io.AppletFormatAdapter.CLASSLOADER; +} else { +a = this.addProtocol (a); +this.protocol = jalview.io.AppletFormatAdapter.URL; +}this.dbgMsg ("Protocol identified as '" + this.protocol + "'"); +return a; +}, "~S"); +Clazz.makeConstructor (c$, +function (a, b, c) { +Clazz.superConstructor (this, jalview.bin.JalviewLite.LoadingThread, []); +this._file = a; +this._file2 = b; +this.applet = c; +}, "~S,~S,jalview.bin.JalviewLite"); +Clazz.overrideMethod (c$, "run", +function () { +{ +System.out.println("BYPASSING JMOL LOADING FOR NOW. THIS WILL BE DONE ANOTHER WAY") +}this.startLoading (); +}); +Clazz.defineMethod (c$, "startLoading", +($fz = function () { +this.dbgMsg ("Loading thread started with:\n>>file\n" + this._file + ">>endfile"); +this.dbgMsg ("Loading started."); +var a = this.readAlignment (this._file); +var b = this.readAlignment (this._file2); +if (a != null) { +this.addToDisplay (a, b); +this.loadTree (a); +this.loadScoreFile (a); +this.loadFeatures (a); +this.loadAnnotations (a); +this.loadJnetFile (a); +this.loadPdbFiles (a); +} else { +this.b$["jalview.bin.JalviewLite"].fileFound = false; +this.applet.remove (this.b$["jalview.bin.JalviewLite"].launcher); +this.applet.repaint (); +}this.b$["jalview.bin.JalviewLite"].callInitCallback (); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "addToDisplay", +function (a, b) { +if (b == null) { +a.addToDisplay (this.b$["jalview.bin.JalviewLite"].embedded); +} else { +var c = new jalview.appletgui.SplitFrame (a, b); +c.addToDisplay (this.b$["jalview.bin.JalviewLite"].embedded, this.b$["jalview.bin.JalviewLite"]); +}}, "jalview.appletgui.AlignFrame,jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "readAlignment", +function (a) { +if (a == null) { +return null; +}var b = this.setProtocolState (a); +var c = new jalview.io.IdentifyFile ().Identify (b, this.protocol); +this.dbgMsg ("File identified as '" + c + "'"); +var d = null; +try { +d = new jalview.io.AppletFormatAdapter ().readFile (b, this.protocol, c); +if ((d != null) && (d.getHeight () > 0)) { +this.dbgMsg ("Successfully loaded file."); +d.setDataset (null); +var e = new jalview.appletgui.AlignFrame (d, this.applet, b, this.b$["jalview.bin.JalviewLite"].embedded, false); +e.setTitle (b); +if (this.b$["jalview.bin.JalviewLite"].initialAlignFrame == null) { +this.b$["jalview.bin.JalviewLite"].initialAlignFrame = e; +}this.b$["jalview.bin.JalviewLite"].currentAlignFrame = e; +if (this.protocol === jalview.io.AppletFormatAdapter.PASTE) { +e.setTitle (jalview.util.MessageManager.formatMessage ("label.sequences_from", Clazz.newArray (-1, [this.applet.getDocumentBase ().toString ()]))); +}e.setStatus (jalview.util.MessageManager.formatMessage ("label.successfully_loaded_file", Clazz.newArray (-1, [b]))); +return e; +}} catch (ex) { +if (Clazz.exceptionOf (ex, java.io.IOException)) { +this.dbgMsg ("File load exception."); +ex.printStackTrace (); +if (jalview.bin.JalviewLite.debug) { +try { +var e = new jalview.io.FileParse (b, this.protocol); +var f = null; +this.dbgMsg (">>>Dumping contents of '" + b + "' " + "(" + this.protocol + ")"); +while ((f = e.nextLine ()) != null) { +this.dbgMsg (f); +} +this.dbgMsg (">>>Dump finished."); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Exception when trying to dump the content of the file parameter."); +e.printStackTrace (); +} else { +throw e; +} +} +}} else { +throw ex; +} +} +return null; +}, "~S"); +Clazz.defineMethod (c$, "loadPdbFiles", +function (a) { +var b = false; +this.applet.setAlignPdbStructures (this.b$["jalview.bin.JalviewLite"].getDefaultParameter ("alignpdbfiles", false)); +var c = 0; +var d = new java.util.Vector (); +var e = (this.applet.getDefaultParameter ("relaxedidmatch", false)) ? new jalview.analysis.SequenceIdMatcher (a.getAlignViewport ().getAlignment ().getSequencesArray ()) : null; +var f; +do { +if (c > 0) { +f = this.applet.getParameter ("PDBFILE" + c); +} else { +f = this.b$["jalview.bin.JalviewLite"].pdbFile; +}if (f != null) { +var g = new jalview.datamodel.PDBEntry (); +var h; +var i = null; +var j = null; +var k = new java.util.StringTokenizer (f, " "); +if (k.countTokens () < 2) { +if (this.b$["jalview.bin.JalviewLite"].sequence != null) { +i = Clazz.newArray (-1, [e == null ? a.getAlignViewport ().getAlignment ().findName (this.b$["jalview.bin.JalviewLite"].sequence) : e.findIdMatch (this.b$["jalview.bin.JalviewLite"].sequence)]); +}} else { +f = k.nextToken (); +var l = new java.util.Vector (); +var m = new java.util.Vector (); +while (k.hasMoreTokens ()) { +h = k.nextToken (); +var n = new java.util.StringTokenizer (h, "="); +if (n.countTokens () > 1) { +m.addElement (n.nextToken ()); +h = n.nextToken (); +}l.addElement (e == null ? a.getAlignViewport ().getAlignment ().findName (h) : e.findIdMatch (h)); +} +i = new Array (l.size ()); +l.copyInto (i); +if (m.size () == l.size ()) { +j = new Array (m.size ()); +m.copyInto (j); +}}f = this.setProtocolState (f); +if (this.protocol === jalview.io.AppletFormatAdapter.CLASSLOADER && !this.b$["jalview.bin.JalviewLite"].useXtrnalSviewer) { +this.protocol = jalview.io.AppletFormatAdapter.URL; +f = this.addProtocol (f); +}g.setFile (f); +if (i != null) { +for (var l = 0; l < i.length; l++) { +if (i[l] != null) { +(i[l]).addPDBId (g); +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.applet).registerPDBEntry (g); +} else { +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Warning: Possible input parsing error: Null sequence for attachment of PDB (sequence " + l + ")"); +}}} +if (!this.b$["jalview.bin.JalviewLite"].alignPdbStructures) { +a.newStructureView (this.applet, g, i, j, this.protocol); +} else { +d.addElement ( Clazz.newArray (-1, [g, i, j, String.instantialize (this.protocol)])); +}}}c++; +} while (f != null || c < 10); +if (d.size () > 0) { +var g = new Array (d.size ()); +var h = new Array (d.size ()); +var i = new Array (d.size ()); +var j = new Array (d.size ()); +for (var k = 0, l = d.size (); k < l; k++) { +var m = d.elementAt (k); +h[k] = m[0]; +g[k] = m[1]; +i[k] = m[2]; +j[k] = m[3]; +} +a.alignedStructureView (this.applet, h, g, i, j); +b = true; +}return b; +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "loadJnetFile", +function (a) { +var b = false; +var c = this.b$["jalview.bin.JalviewLite"].jnetFile; +if (c != null) { +try { +c = this.setProtocolState (c); +var d = jalview.jsdev.GenericFileAdapter.getFile ("JPredFile", [c, this.protocol]); +jalview.io.JnetAnnotationMaker.add_annotation (d, a.viewport.getAlignment (), 0, false); +var e = a.viewport.getAlignment ().getSequenceAt (0); +a.viewport.getAlignment ().setSeqrep (e); +var f = new jalview.datamodel.ColumnSelection (); +f.hideInsertionsFor (e); +a.viewport.setColumnSelection (f); +a.alignPanel.fontChanged (); +a.alignPanel.setScrollValues (0, 0); +b = true; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +}return b; +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "loadAnnotations", +function (a) { +var b = false; +var c = this.b$["jalview.bin.JalviewLite"].annotations; +if (c != null) { +c = this.setProtocolState (c); +if ( new jalview.io.AnnotationFile ().annotateAlignmentView (a.viewport, c, this.protocol)) { +a.alignPanel.fontChanged (); +a.alignPanel.setScrollValues (0, 0); +b = true; +} else { +System.err.println ("Annotations were not added from annotation file '" + c + "'"); +}}return b; +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "loadFeatures", +function (a) { +var b = false; +var c = this.b$["jalview.bin.JalviewLite"].hideFeatureGroups; +if (c != null) { +a.setFeatureGroupState (this.b$["jalview.bin.JalviewLite"].separatorListToArray (c), false); +}c = this.b$["jalview.bin.JalviewLite"].showFeatureGroups; +if (c != null) { +a.setFeatureGroupState (this.b$["jalview.bin.JalviewLite"].separatorListToArray (c), true); +}c = this.b$["jalview.bin.JalviewLite"].features; +if (c != null) { +c = this.setProtocolState (c); +b = a.parseFeaturesFile (c, this.protocol); +}c = this.b$["jalview.bin.JalviewLite"].showFeatureSettings; +if (c != null && c.equalsIgnoreCase ("true")) { +a.viewport.setShowSequenceFeatures (true); + new jalview.appletgui.FeatureSettings (a.alignPanel); +}return b; +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "loadScoreFile", +function (a) { +var b = false; +if (this.b$["jalview.bin.JalviewLite"].scoreFile != null && !"".equals (this.b$["jalview.bin.JalviewLite"].scoreFile)) { +try { +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Attempting to load T-COFFEE score file from the scoreFile parameter"); +}b = a.loadScoreFile (this.b$["jalview.bin.JalviewLite"].scoreFile); +if (!b) { +System.err.println ("Failed to parse T-COFFEE parameter as a valid score file ('" + this.b$["jalview.bin.JalviewLite"].scoreFile + "')"); +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.printf ("Cannot read score file: '%s'. Cause: %s \n", [this.b$["jalview.bin.JalviewLite"].scoreFile, e.getMessage ()]); +} else { +throw e; +} +} +}return b; +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "loadTree", +function (a) { +var b = false; +if (this.b$["jalview.bin.JalviewLite"].treeFile == null) { +this.b$["jalview.bin.JalviewLite"].treeFile = this.applet.getParameter ("treeFile"); +}if (this.b$["jalview.bin.JalviewLite"].treeFile != null) { +try { +this.b$["jalview.bin.JalviewLite"].treeFile = this.setProtocolState (this.b$["jalview.bin.JalviewLite"].treeFile); +var c = new jalview.io.NewickFile (this.b$["jalview.bin.JalviewLite"].treeFile, this.protocol); +c.parse (); +if (c.getTree () != null) { +a.loadTree (c, this.b$["jalview.bin.JalviewLite"].treeFile); +b = true; +this.dbgMsg ("Successfully imported tree."); +} else { +this.dbgMsg ("Tree parameter did not resolve to a valid tree."); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +}return b; +}, "jalview.appletgui.AlignFrame"); +Clazz.defineMethod (c$, "inArchive", +function (a) { +try { +var b = (this.getClass ().getResourceAsStream ("/" + a) != null); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Resource '" + a + "' was " + (b ? "" : "not") + " located by classloader."); +}return b; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.out.println ("Exception checking resources: " + a + " " + ex); +return false; +} else { +throw ex; +} +} +}, "~S"); +Clazz.defineMethod (c$, "addProtocol", +function (a) { +if (a.indexOf ("://") == -1) { +var b = this.applet.resolveUrlForLocalOrAbsolute (a, this.b$["jalview.bin.JalviewLite"].getDocumentBase ()); +if (this.urlExists (b)) { +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Prepended document base for resource: '" + a + "'"); +}return b; +}b = this.applet.resolveUrlForLocalOrAbsolute (a, this.b$["jalview.bin.JalviewLite"].getCodeBase ()); +if (this.urlExists (b)) { +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Prepended codebase for resource: '" + a + "'"); +}return b; +}}return a; +}, "~S"); +Clazz.defineMethod (c$, "urlExists", +($fz = function (a) { +var b = null; +try { +b = new java.net.URL (a).openStream (); +if (b != null) { +return true; +}} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +} else { +throw x; +} +} finally { +if (b != null) { +try { +b.close (); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +}} +return false; +}, $fz.isPrivate = true, $fz), "~S"); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$1", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.f$.me).mouseOverVamsasSequence (this.f$.sq, this.f$.sq.findIndex (this.f$.pos), null); +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$2", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.f$.me).mouseOverVamsasSequence (this.f$.sq, this.f$.pos, null); +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$3", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +this.f$.alf.select (this.f$.sel, this.f$.csel); +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$4$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$4", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +try { +jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.f$.me).mouseOverStructure ( new Integer (this.f$.pdbResNum).intValue (), this.f$.chain, this.f$.pdbfile); +if (jalview.bin.JalviewLite.debug) { +System.err.println ("mouseOver for '" + this.f$.pdbResNum + "' in chain '" + this.f$.chain + "' in structure '" + this.f$.pdbfile + "'"); +}} catch (e) { +if (Clazz.exceptionOf (e, NumberFormatException)) { +System.err.println ("Ignoring invalid residue number string '" + this.f$.pdbResNum + "'"); +} else { +throw e; +} +} +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$5$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$5", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +try { +this.f$.alf.scrollTo ( new Integer (this.f$.topRow).intValue (), new Integer (this.f$.leftHandColumn).intValue ()); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Couldn't parse integer arguments (topRow='" + this.f$.topRow + "' and leftHandColumn='" + this.f$.leftHandColumn + "')"); +ex.printStackTrace (); +} else { +throw ex; +} +} +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$6$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$6", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +try { +this.f$.alf.scrollToRow ( new Integer (this.f$.topRow).intValue ()); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Couldn't parse integer arguments (topRow='" + this.f$.topRow + "')"); +ex.printStackTrace (); +} else { +throw ex; +} +} +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$7$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$7", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +try { +this.f$.alf.scrollToColumn ( new Integer (this.f$.leftHandColumn).intValue ()); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Couldn't parse integer arguments (leftHandColumn='" + this.f$.leftHandColumn + "')"); +ex.printStackTrace (); +} else { +throw ex; +} +} +}); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$8$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$8", null, java.awt.event.ActionListener); +Clazz.overrideMethod (c$, "actionPerformed", +function (e) { +var loader = Clazz.innerTypeInstance (jalview.bin.JalviewLite.LoadingThread, this, null, this.b$["jalview.bin.JalviewLite"].startupFile, this.b$["jalview.bin.JalviewLite"].file2, this.b$["jalview.bin.JalviewLite"]); +loader.start (); +}, "java.awt.event.ActionEvent"); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$9$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$9", java.awt.event.WindowAdapter); +Clazz.overrideMethod (c$, "windowClosing", +function (e) { +if (Clazz.instanceOf (this.f$.frame, jalview.appletgui.AlignFrame)) { +var vp = (this.f$.frame).viewport; +(this.f$.frame).closeMenuItem_actionPerformed (); +if (vp.applet.currentAlignFrame === this.f$.frame) { +vp.applet.currentAlignFrame = null; +}vp.applet = null; +vp = null; +}jalview.bin.JalviewLite.lastFrameX -= 40; +jalview.bin.JalviewLite.lastFrameY -= 40; +if (Clazz.instanceOf (this.f$.frame, jalview.appletgui.EmbmenuFrame)) { +(this.f$.frame).destroyMenus (); +}this.f$.frame.setMenuBar (null); +this.f$.frame.dispose (); +}, "java.awt.event.WindowEvent"); +Clazz.defineMethod (c$, "windowActivated", +function (e) { +if (Clazz.instanceOf (this.f$.frame, jalview.appletgui.AlignFrame)) { +(this.f$.frame).viewport.applet.currentAlignFrame = this.f$.frame; +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Activated window " + this.f$.frame); +}}Clazz.superCall (this, jalview.bin.JalviewLite$9, "windowActivated", [e]); +}, "java.awt.event.WindowEvent"); +c$ = Clazz.p0p (); +}; +c$.$JalviewLite$10$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.bin, "JalviewLite$10", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +this.f$.alf.setFeatureGroupState (this.b$["jalview.bin.JalviewLite"].separatorListToArray (this.f$.groups), this.f$.st); +}); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"TRUE", "true", +"FALSE", "false", +"debug", false, +"lastFrameX", 200, +"lastFrameY", 200, +"builddate", null, +"version", null, +"installation", null); +}); diff --git a/bin/jalview/commands/ChangeCaseCommand.js b/bin/jalview/commands/ChangeCaseCommand.js index fb085d6..0ebfc96 100644 --- a/bin/jalview/commands/ChangeCaseCommand.js +++ b/bin/jalview/commands/ChangeCaseCommand.js @@ -1,74 +1,74 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.load (["jalview.commands.CommandI"], "jalview.commands.ChangeCaseCommand", ["java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.description = null; -this.caseChange = -1; -this.seqs = null; -this.regions = null; -Clazz.instantialize (this, arguments); -}, jalview.commands, "ChangeCaseCommand", null, jalview.commands.CommandI); -Clazz.makeConstructor (c$, -function (description, seqs, regions, caseChange) { -this.description = description; -this.seqs = seqs; -this.regions = regions; -this.caseChange = caseChange; -this.doCommand (null); -}, "~S,~A,java.util.List,~N"); -Clazz.overrideMethod (c$, "getDescription", -function () { -return this.description; -}); -Clazz.overrideMethod (c$, "getSize", -function () { -return 1; -}); -Clazz.overrideMethod (c$, "doCommand", -function (views) { -this.changeCase (true); -}, "~A"); -Clazz.overrideMethod (c$, "undoCommand", -function (views) { -this.changeCase (false); -}, "~A"); -Clazz.defineMethod (c$, "changeCase", -function (doCommand) { -var sequence; -var start; -var end; -var nextChar; -for (var r, $r = this.regions.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { -start = r[0]; -for (var s = 0; s < this.seqs.length; s++) { -sequence = this.seqs[s].getSequenceAsString (); -var newSeq = new StringBuffer (); -if (r[1] > sequence.length) { -end = sequence.length; -} else { -end = r[1]; -}if (start > 0) { -newSeq.append (sequence.substring (0, start)); -}if ((this.caseChange == jalview.commands.ChangeCaseCommand.TO_UPPER && doCommand) || (this.caseChange == jalview.commands.ChangeCaseCommand.TO_LOWER && !doCommand)) { -newSeq.append (sequence.substring (start, end).toUpperCase ()); -} else if ((this.caseChange == jalview.commands.ChangeCaseCommand.TO_LOWER && doCommand) || (this.caseChange == jalview.commands.ChangeCaseCommand.TO_UPPER && !doCommand)) { -newSeq.append (sequence.substring (start, end).toLowerCase ()); -} else { -for (var c = start; c < end; c++) { -nextChar = sequence.charAt (c); -if ('a' <= nextChar && nextChar <= 'z') { -nextChar = String.fromCharCode (nextChar.charCodeAt (0) - (32)); -} else if ('A' <= nextChar && nextChar <= 'Z') { -nextChar = String.fromCharCode (nextChar.charCodeAt (0) + (32)); -}newSeq.append (nextChar); -} -}if (end < sequence.length) { -newSeq.append (sequence.substring (end)); -}this.seqs[s].setSequence (newSeq.toString ()); -} -} -}, "~B"); -Clazz.defineStatics (c$, -"TO_LOWER", 0, -"TO_UPPER", 1, -"TOGGLE_CASE", 2); -}); +Clazz.declarePackage ("jalview.commands"); +Clazz.load (["jalview.commands.CommandI"], "jalview.commands.ChangeCaseCommand", ["java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.description = null; +this.caseChange = -1; +this.seqs = null; +this.regions = null; +Clazz.instantialize (this, arguments); +}, jalview.commands, "ChangeCaseCommand", null, jalview.commands.CommandI); +Clazz.makeConstructor (c$, +function (description, seqs, regions, caseChange) { +this.description = description; +this.seqs = seqs; +this.regions = regions; +this.caseChange = caseChange; +this.doCommand (null); +}, "~S,~A,java.util.List,~N"); +Clazz.overrideMethod (c$, "getDescription", +function () { +return this.description; +}); +Clazz.overrideMethod (c$, "getSize", +function () { +return 1; +}); +Clazz.overrideMethod (c$, "doCommand", +function (views) { +this.changeCase (true); +}, "~A"); +Clazz.overrideMethod (c$, "undoCommand", +function (views) { +this.changeCase (false); +}, "~A"); +Clazz.defineMethod (c$, "changeCase", +function (doCommand) { +var sequence; +var start; +var end; +var nextChar; +for (var r, $r = this.regions.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { +start = r[0]; +for (var s = 0; s < this.seqs.length; s++) { +sequence = this.seqs[s].getSequenceAsString (); +var newSeq = new StringBuffer (); +if (r[1] > sequence.length) { +end = sequence.length; +} else { +end = r[1]; +}if (start > 0) { +newSeq.append (sequence.substring (0, start)); +}if ((this.caseChange == jalview.commands.ChangeCaseCommand.TO_UPPER && doCommand) || (this.caseChange == jalview.commands.ChangeCaseCommand.TO_LOWER && !doCommand)) { +newSeq.append (sequence.substring (start, end).toUpperCase ()); +} else if ((this.caseChange == jalview.commands.ChangeCaseCommand.TO_LOWER && doCommand) || (this.caseChange == jalview.commands.ChangeCaseCommand.TO_UPPER && !doCommand)) { +newSeq.append (sequence.substring (start, end).toLowerCase ()); +} else { +for (var c = start; c < end; c++) { +nextChar = sequence.charAt (c); +if ('a' <= nextChar && nextChar <= 'z') { +nextChar = String.fromCharCode (nextChar.charCodeAt (0) - (32)); +} else if ('A' <= nextChar && nextChar <= 'Z') { +nextChar = String.fromCharCode (nextChar.charCodeAt (0) + (32)); +}newSeq.append (nextChar); +} +}if (end < sequence.length) { +newSeq.append (sequence.substring (end)); +}this.seqs[s].setSequence (newSeq.toString ()); +} +} +}, "~B"); +Clazz.defineStatics (c$, +"TO_LOWER", 0, +"TO_UPPER", 1, +"TOGGLE_CASE", 2); +}); diff --git a/bin/jalview/commands/CommandI.js b/bin/jalview/commands/CommandI.js index 792918f..598c931 100644 --- a/bin/jalview/commands/CommandI.js +++ b/bin/jalview/commands/CommandI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.declareInterface (jalview.commands, "CommandI"); +Clazz.declarePackage ("jalview.commands"); +Clazz.declareInterface (jalview.commands, "CommandI"); diff --git a/bin/jalview/commands/EditCommand.class b/bin/jalview/commands/EditCommand.class index 21a616107a7a24691e05ebf7d2ef1d0a7056933e..8e6645ea80f69a154d1cc7a11c0a2ca688e96452 100644 GIT binary patch delta 140 zcmeykfbq!!#tr+enYcf1K4`t1i`kpOYI3$)w1_f0!lJUQDfT2g_X@fgz|23AG|rk@P#K+MJTi$UN& z1JmSNZkkM7Op{sM4J<^N{xj$?aIrIJF*33<<^i<;sb7qYj0_CQzZlqosu?(uB^f|6 ivK&m4)7=#XIhpwWFsL*BVQ>WM`Nw0XMwSq=d0$s-v6 diff --git a/bin/jalview/commands/EditCommand.js b/bin/jalview/commands/EditCommand.js index b556231..0839473 100644 --- a/bin/jalview/commands/EditCommand.js +++ b/bin/jalview/commands/EditCommand.js @@ -1,661 +1,661 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.load (["jalview.commands.CommandI", "java.lang.Enum", "java.util.ArrayList"], "jalview.commands.EditCommand", ["jalview.analysis.AlignSeq", "jalview.datamodel.AlignmentAnnotation", "$.Annotation", "$.Sequence", "$.SequenceFeature", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "$.ReverseListIterator", "$.StringUtils", "java.lang.StringBuffer", "java.util.HashMap", "$.Hashtable"], function () { -c$ = Clazz.decorateAsClass (function () { -this.edits = null; -this.description = null; -if (!Clazz.isClassDefined ("jalview.commands.EditCommand.Edit")) { -jalview.commands.EditCommand.$EditCommand$Edit$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.commands, "EditCommand", null, jalview.commands.CommandI); -Clazz.prepareFields (c$, function () { -this.edits = new java.util.ArrayList (); -}); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (description) { -this.description = description; -}, "~S"); -Clazz.makeConstructor (c$, -function (description, command, seqs, position, number, al) { -this.description = description; -if (command === jalview.commands.EditCommand.Action.CUT || command === jalview.commands.EditCommand.Action.PASTE) { -this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, command, seqs, position, number, al)); -}this.performEdit (0, null); -}, "~S,jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI"); -Clazz.makeConstructor (c$, -function (description, command, replace, seqs, position, number, al) { -this.description = description; -if (command === jalview.commands.EditCommand.Action.REPLACE) { -this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, command, seqs, position, number, al, replace)); -}this.performEdit (0, null); -}, "~S,jalview.commands.EditCommand.Action,~S,~A,~N,~N,jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "setEdit", -function (e) { -this.edits.clear (); -this.edits.add (e); -}, "jalview.commands.EditCommand.Edit"); -Clazz.defineMethod (c$, "addEdit", -function (e) { -if (!jalview.commands.EditCommand.expandEdit (this.edits, e)) { -this.edits.add (e); -}}, "jalview.commands.EditCommand.Edit"); -c$.expandEdit = Clazz.defineMethod (c$, "expandEdit", -function (edits, e) { -if (edits == null || edits.isEmpty ()) { -return false; -}var lastEdit = edits.get (edits.size () - 1); -var action = e.command; -if (lastEdit.command !== action) { -return false; -}if (lastEdit.seqs.length != e.seqs.length) { -return false; -}for (var i = 0; i < e.seqs.length; i++) { -if (lastEdit.seqs[i].getDatasetSequence () !== e.seqs[i].getDatasetSequence ()) { -return false; -}} -var contiguous = (action === jalview.commands.EditCommand.Action.INSERT_GAP && e.position == lastEdit.position + lastEdit.number) || (action === jalview.commands.EditCommand.Action.DELETE_GAP && e.position + e.number == lastEdit.position); -if (contiguous) { -lastEdit.number += e.number; -lastEdit.seqs = e.seqs; -if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { -lastEdit.position--; -}return true; -}return false; -}, "java.util.List,jalview.commands.EditCommand.Edit"); -Clazz.defineMethod (c$, "clearEdits", -function () { -this.edits.clear (); -}); -Clazz.defineMethod (c$, "getEdit", -function (i) { -if (i >= 0 && i < this.edits.size ()) { -return this.edits.get (i); -}return null; -}, "~N"); -Clazz.overrideMethod (c$, "getDescription", -function () { -return this.description; -}); -Clazz.overrideMethod (c$, "getSize", -function () { -return this.edits.size (); -}); -Clazz.defineMethod (c$, "getAlignment", -function () { -return (this.edits.isEmpty () ? null : this.edits.get (0).al); -}); -Clazz.defineMethod (c$, "appendEdit", -function (command, seqs, position, number, al, performEdit) { -this.appendEdit (command, seqs, position, number, al, performEdit, null); -}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI,~B"); -Clazz.defineMethod (c$, "appendEdit", -function (command, seqs, position, number, al, performEdit, views) { -var edit = Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, command, seqs, position, number, al.getGapCharacter ()); -if (al.getHeight () == seqs.length) { -edit.al = al; -edit.fullAlignmentHeight = true; -}this.addEdit (edit); -if (performEdit) { -jalview.commands.EditCommand.performEdit (edit, views); -}}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI,~B,~A"); -Clazz.defineMethod (c$, "appendEdit", -function (edit, al, performEdit, views) { -if (al.getHeight () == edit.seqs.length) { -edit.al = al; -edit.fullAlignmentHeight = true; -}this.addEdit (edit); -if (performEdit) { -jalview.commands.EditCommand.performEdit (edit, views); -}}, "jalview.commands.EditCommand.Edit,jalview.datamodel.AlignmentI,~B,~A"); -Clazz.defineMethod (c$, "performEdit", -function (commandIndex, views) { -var iterator = this.edits.listIterator (commandIndex); -while (iterator.hasNext ()) { -var edit = iterator.next (); -jalview.commands.EditCommand.performEdit (edit, views); -} -}, "~N,~A"); -c$.performEdit = Clazz.defineMethod (c$, "performEdit", -function (edit, views) { -switch (edit.command) { -case jalview.commands.EditCommand.Action.INSERT_GAP: -jalview.commands.EditCommand.insertGap (edit); -break; -case jalview.commands.EditCommand.Action.DELETE_GAP: -jalview.commands.EditCommand.deleteGap (edit); -break; -case jalview.commands.EditCommand.Action.CUT: -jalview.commands.EditCommand.cut (edit, views); -break; -case jalview.commands.EditCommand.Action.PASTE: -jalview.commands.EditCommand.paste (edit, views); -break; -case jalview.commands.EditCommand.Action.REPLACE: -jalview.commands.EditCommand.replace (edit); -break; -case jalview.commands.EditCommand.Action.INSERT_NUC: -break; -default: -break; -} -}, "jalview.commands.EditCommand.Edit,~A"); -Clazz.overrideMethod (c$, "doCommand", -function (views) { -this.performEdit (0, views); -}, "~A"); -Clazz.overrideMethod (c$, "undoCommand", -function (views) { -var iterator = this.edits.listIterator (this.edits.size ()); -while (iterator.hasPrevious ()) { -var e = iterator.previous (); -switch (e.command) { -case jalview.commands.EditCommand.Action.INSERT_GAP: -jalview.commands.EditCommand.deleteGap (e); -break; -case jalview.commands.EditCommand.Action.DELETE_GAP: -jalview.commands.EditCommand.insertGap (e); -break; -case jalview.commands.EditCommand.Action.CUT: -jalview.commands.EditCommand.paste (e, views); -break; -case jalview.commands.EditCommand.Action.PASTE: -jalview.commands.EditCommand.cut (e, views); -break; -case jalview.commands.EditCommand.Action.REPLACE: -jalview.commands.EditCommand.replace (e); -break; -case jalview.commands.EditCommand.Action.INSERT_NUC: -break; -default: -break; -} -} -}, "~A"); -c$.insertGap = Clazz.defineMethod (c$, "insertGap", -($fz = function (command) { -for (var s = 0; s < command.seqs.length; s++) { -command.seqs[s].insertCharAt (command.position, command.number, command.gapChar); -} -jalview.commands.EditCommand.adjustAnnotations (command, true, false, null); -}, $fz.isPrivate = true, $fz), "jalview.commands.EditCommand.Edit"); -c$.deleteGap = Clazz.defineMethod (c$, "deleteGap", -($fz = function (command) { -for (var s = 0; s < command.seqs.length; s++) { -command.seqs[s].deleteChars (command.position, command.position + command.number); -} -jalview.commands.EditCommand.adjustAnnotations (command, false, false, null); -}, $fz.isPrivate = true, $fz), "jalview.commands.EditCommand.Edit"); -c$.cut = Clazz.defineMethod (c$, "cut", -function (command, views) { -var seqDeleted = false; -command.string = Clazz.newCharArray (command.seqs.length, '\0'); -for (var i = 0; i < command.seqs.length; i++) { -var sequence = command.seqs[i]; -if (sequence.getLength () > command.position) { -command.string[i] = sequence.getSequence (command.position, command.position + command.number); -var oldds = sequence.getDatasetSequence (); -if (command.oldds != null && command.oldds[i] != null) { -sequence.setDatasetSequence (null); -}sequence.deleteChars (command.position, command.position + command.number); -if (command.oldds != null && command.oldds[i] != null) { -sequence.setDatasetSequence (command.oldds[i]); -command.oldds[i] = oldds; -} else { -if (oldds !== sequence.getDatasetSequence () || sequence.getSequenceFeatures () != null) { -if (command.oldds == null) { -command.oldds = new Array (command.seqs.length); -}command.oldds[i] = oldds; -jalview.commands.EditCommand.adjustFeatures (command, i, sequence.findPosition (command.position), sequence.findPosition (command.position + command.number), false); -}}}if (sequence.getLength () < 1) { -command.al.deleteSequence (sequence); -seqDeleted = true; -}} -jalview.commands.EditCommand.adjustAnnotations (command, false, seqDeleted, views); -}, "jalview.commands.EditCommand.Edit,~A"); -c$.paste = Clazz.defineMethod (c$, "paste", -function (command, views) { -var tmp; -var newDSNeeded; -var newDSWasNeeded; -var newstart; -var newend; -var seqWasDeleted = false; -var start = 0; -var end = 0; -for (var i = 0; i < command.seqs.length; i++) { -newDSNeeded = false; -newDSWasNeeded = command.oldds != null && command.oldds[i] != null; -if (command.seqs[i].getLength () < 1) { -if (command.alIndex[i] < command.al.getHeight ()) { -var sequences; -{ -if (!(command.alIndex[i] < 0)) { -sequences.add (command.alIndex[i], command.seqs[i]); -}}} else { -command.al.addSequence (command.seqs[i]); -}seqWasDeleted = true; -}newstart = command.seqs[i].getStart (); -newend = command.seqs[i].getEnd (); -tmp = new StringBuffer (); -tmp.append (command.seqs[i].getSequence ()); -if (command.string != null && command.string[i] != null) { -if (command.position >= tmp.length ()) { -var length = command.position - tmp.length (); -while (length > 0) { -tmp.append (command.gapChar); -length--; -} -}tmp.insert (command.position, command.string[i]); -for (var s = 0; s < command.string[i].length; s++) { -if (jalview.schemes.ResidueProperties.aaIndex[command.string[i][s].charCodeAt (0)] != 23) { -if (!newDSNeeded) { -newDSNeeded = true; -start = command.seqs[i].findPosition (command.position); -end = command.seqs[i].findPosition (command.position + command.number); -}if (command.seqs[i].getStart () == start) { -newstart--; -} else { -newend++; -}}} -command.string[i] = null; -}command.seqs[i].setSequence (tmp.toString ()); -command.seqs[i].setStart (newstart); -command.seqs[i].setEnd (newend); -if (newDSNeeded) { -if (command.seqs[i].getDatasetSequence () != null) { -var ds; -if (newDSWasNeeded) { -ds = command.oldds[i]; -} else { -ds = new jalview.datamodel.Sequence (command.seqs[i].getName (), jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, command.seqs[i].getSequenceAsString ()), command.seqs[i].getStart (), command.seqs[i].getEnd ()); -ds.setDescription (command.seqs[i].getDescription ()); -}if (command.oldds == null) { -command.oldds = new Array (command.seqs.length); -}command.oldds[i] = command.seqs[i].getDatasetSequence (); -command.seqs[i].setDatasetSequence (ds); -}jalview.commands.EditCommand.adjustFeatures (command, i, start, end, true); -}} -jalview.commands.EditCommand.adjustAnnotations (command, true, seqWasDeleted, views); -command.string = null; -}, "jalview.commands.EditCommand.Edit,~A"); -c$.replace = Clazz.defineMethod (c$, "replace", -function (command) { -var tmp; -var oldstring; -var start = command.position; -var end = command.number; -command.number = start + command.string[0].length; -for (var i = 0; i < command.seqs.length; i++) { -var newDSWasNeeded = command.oldds != null && command.oldds[i] != null; -oldstring = command.seqs[i].getSequenceAsString (); -tmp = new StringBuffer (oldstring.substring (0, start)); -tmp.append (command.string[i]); -var nogaprep = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (command.string[i])); -var ipos = command.seqs[i].findPosition (start) - command.seqs[i].getStart (); -tmp.append (oldstring.substring (end)); -command.seqs[i].setSequence (tmp.toString ()); -command.string[i] = oldstring.substring (start, end).toCharArray (); -var nogapold = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (command.string[i])); -if (!nogaprep.toLowerCase ().equals (nogapold.toLowerCase ())) { -if (newDSWasNeeded) { -var oldds = command.seqs[i].getDatasetSequence (); -command.seqs[i].setDatasetSequence (command.oldds[i]); -command.oldds[i] = oldds; -} else { -if (command.oldds == null) { -command.oldds = new Array (command.seqs.length); -}command.oldds[i] = command.seqs[i].getDatasetSequence (); -var newds = new jalview.datamodel.Sequence (command.seqs[i].getDatasetSequence ()); -var fullseq; -var osp = newds.getSequenceAsString (); -fullseq = osp.substring (0, ipos) + nogaprep + osp.substring (ipos + nogaprep.length); -newds.setSequence (fullseq.toUpperCase ()); -command.seqs[i].setDatasetSequence (newds); -}}tmp = null; -oldstring = null; -} -}, "jalview.commands.EditCommand.Edit"); -c$.adjustAnnotations = Clazz.defineMethod (c$, "adjustAnnotations", -function (command, insert, modifyVisibility, views) { -var annotations = null; -if (modifyVisibility && !insert) { -command.deletedAnnotationRows = new java.util.Hashtable (); -}if (command.fullAlignmentHeight) { -annotations = command.al.getAlignmentAnnotation (); -} else { -var aSize = 0; -var tmp; -for (var s = 0; s < command.seqs.length; s++) { -if (modifyVisibility) { -if (!insert) { -tmp = command.seqs[s].getAnnotation (); -if (tmp != null) { -var alen = tmp.length; -for (var aa = 0; aa < tmp.length; aa++) { -if (!command.al.deleteAnnotation (tmp[aa])) { -tmp[aa] = null; -alen--; -}} -command.seqs[s].setAlignmentAnnotation (null); -if (alen != tmp.length) { -var saved = new Array (alen); -for (var aa = 0, aapos = 0; aa < tmp.length; aa++) { -if (tmp[aa] != null) { -saved[aapos++] = tmp[aa]; -tmp[aa] = null; -}} -tmp = saved; -command.deletedAnnotationRows.put (command.seqs[s], saved); -for (var alview = 0; views != null && alview < views.length; alview++) { -if (views[alview] !== command.al) { -var toremove = views[alview].getAlignmentAnnotation (); -if (toremove == null || toremove.length == 0) { -continue; -}for (var aa = 0; aa < toremove.length; aa++) { -if (toremove[aa].sequenceRef === command.seqs[s]) { -views[alview].deleteAnnotation (toremove[aa]); -}} -}} -} else { -command.deletedAnnotationRows.put (command.seqs[s], tmp); -}}} else { -if (command.deletedAnnotationRows != null && command.deletedAnnotationRows.containsKey (command.seqs[s])) { -var revealed = command.deletedAnnotationRows.get (command.seqs[s]); -command.seqs[s].setAlignmentAnnotation (revealed); -if (revealed != null) { -for (var aa = 0; aa < revealed.length; aa++) { -command.al.addAnnotation (revealed[aa]); -} -for (var aa = 0; aa < revealed.length; aa++) { -command.al.setAnnotationIndex (revealed[aa], aa); -} -for (var vnum = 0; views != null && vnum < views.length; vnum++) { -if (views[vnum] !== command.al) { -var avwidth = views[vnum].getWidth () + 1; -for (var a = 0; a < revealed.length; a++) { -var newann = new jalview.datamodel.AlignmentAnnotation (revealed[a]); -command.seqs[s].addAlignmentAnnotation (newann); -newann.padAnnotation (avwidth); -views[vnum].addAnnotation (newann); -views[vnum].setAnnotationIndex (newann, a); -} -}} -}}}continue; -}if (command.seqs[s].getAnnotation () == null) { -continue; -}if (aSize == 0) { -annotations = command.seqs[s].getAnnotation (); -} else { -tmp = new Array (aSize + command.seqs[s].getAnnotation ().length); -System.arraycopy (annotations, 0, tmp, 0, aSize); -System.arraycopy (command.seqs[s].getAnnotation (), 0, tmp, aSize, command.seqs[s].getAnnotation ().length); -annotations = tmp; -}aSize = annotations.length; -} -}if (annotations == null) { -return; -}if (!insert) { -command.deletedAnnotations = new java.util.Hashtable (); -}var aSize; -var temp; -for (var a = 0; a < annotations.length; a++) { -if (annotations[a].autoCalculated || annotations[a].annotations == null) { -continue; -}var tSize = 0; -aSize = annotations[a].annotations.length; -if (insert) { -temp = new Array (aSize + command.number); -if (annotations[a].padGaps) { -for (var aa = 0; aa < temp.length; aa++) { -temp[aa] = new jalview.datamodel.Annotation (command.gapChar + "", null, ' ', 0); -} -}} else { -if (command.position < aSize) { -if (command.position + command.number >= aSize) { -tSize = aSize; -} else { -tSize = aSize - command.number; -}} else { -tSize = aSize; -}if (tSize < 0) { -tSize = aSize; -}temp = new Array (tSize); -}if (insert) { -if (command.position < annotations[a].annotations.length) { -System.arraycopy (annotations[a].annotations, 0, temp, 0, command.position); -if (command.deletedAnnotations != null && command.deletedAnnotations.containsKey (annotations[a].annotationId)) { -var restore = command.deletedAnnotations.get (annotations[a].annotationId); -System.arraycopy (restore, 0, temp, command.position, command.number); -}System.arraycopy (annotations[a].annotations, command.position, temp, command.position + command.number, aSize - command.position); -} else { -if (command.deletedAnnotations != null && command.deletedAnnotations.containsKey (annotations[a].annotationId)) { -var restore = command.deletedAnnotations.get (annotations[a].annotationId); -temp = new Array (annotations[a].annotations.length + restore.length); -System.arraycopy (annotations[a].annotations, 0, temp, 0, annotations[a].annotations.length); -System.arraycopy (restore, 0, temp, annotations[a].annotations.length, restore.length); -} else { -temp = annotations[a].annotations; -}}} else { -if (tSize != aSize || command.position < 2) { -var copylen = Math.min (command.position, annotations[a].annotations.length); -if (copylen > 0) { -System.arraycopy (annotations[a].annotations, 0, temp, 0, copylen); -}var deleted = new Array (command.number); -if (copylen >= command.position) { -copylen = Math.min (command.number, annotations[a].annotations.length - command.position); -if (copylen > 0) { -System.arraycopy (annotations[a].annotations, command.position, deleted, 0, copylen); -}}command.deletedAnnotations.put (annotations[a].annotationId, deleted); -if (annotations[a].annotations.length > command.position + command.number) { -System.arraycopy (annotations[a].annotations, command.position + command.number, temp, command.position, annotations[a].annotations.length - command.position - command.number); -}} else { -var dSize = aSize - command.position; -if (dSize > 0) { -var deleted = new Array (command.number); -System.arraycopy (annotations[a].annotations, command.position, deleted, 0, dSize); -command.deletedAnnotations.put (annotations[a].annotationId, deleted); -tSize = Math.min (annotations[a].annotations.length, command.position); -temp = new Array (tSize); -System.arraycopy (annotations[a].annotations, 0, temp, 0, tSize); -} else { -temp = annotations[a].annotations; -}}}annotations[a].annotations = temp; -} -}, "jalview.commands.EditCommand.Edit,~B,~B,~A"); -c$.adjustFeatures = Clazz.defineMethod (c$, "adjustFeatures", -function (command, index, i, j, insert) { -var seq = command.seqs[index]; -var sequence = seq.getDatasetSequence (); -if (sequence == null) { -sequence = seq; -}if (insert) { -if (command.editedFeatures != null && command.editedFeatures.containsKey (seq)) { -sequence.setSequenceFeatures (command.editedFeatures.get (seq)); -}return; -}var sf = sequence.getSequenceFeatures (); -if (sf == null) { -return; -}var oldsf = new Array (sf.length); -var cSize = j - i; -for (var s = 0; s < sf.length; s++) { -var copy = new jalview.datamodel.SequenceFeature (sf[s]); -oldsf[s] = copy; -if (sf[s].getEnd () < i) { -continue; -}if (sf[s].getBegin () > j) { -sf[s].setBegin (copy.getBegin () - cSize); -sf[s].setEnd (copy.getEnd () - cSize); -continue; -}if (sf[s].getBegin () >= i) { -sf[s].setBegin (i); -}if (sf[s].getEnd () < j) { -sf[s].setEnd (j - 1); -}sf[s].setEnd (sf[s].getEnd () - (cSize)); -if (sf[s].getBegin () > sf[s].getEnd ()) { -sequence.deleteFeature (sf[s]); -}} -if (command.editedFeatures == null) { -command.editedFeatures = new java.util.Hashtable (); -}command.editedFeatures.put (seq, oldsf); -}, "jalview.commands.EditCommand.Edit,~N,~N,~N,~B"); -Clazz.defineMethod (c$, "getEdits", -function () { -return this.edits; -}); -Clazz.defineMethod (c$, "priorState", -function (forUndo) { -var result = new java.util.HashMap (); -if (this.getEdits () == null) { -return result; -}if (forUndo) { -for (var e, $e = this.getEdits ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { -for (var seq, $seq = 0, $$seq = e.getSequences (); $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { -var ds = seq.getDatasetSequence (); -var preEdit = result.get (ds); -if (preEdit == null) { -preEdit = new jalview.datamodel.Sequence ("", seq.getSequenceAsString ()); -preEdit.setDatasetSequence (ds); -result.put (ds, preEdit); -}} -} -return result; -}var edits = new jalview.util.ReverseListIterator (this.getEdits ()); -while (edits.hasNext ()) { -var oldEdit = edits.next (); -var action = oldEdit.getAction (); -var position = oldEdit.getPosition (); -var number = oldEdit.getNumber (); -var gap = oldEdit.getGapCharacter (); -for (var seq, $seq = 0, $$seq = oldEdit.getSequences (); $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { -var ds = seq.getDatasetSequence (); -var preEdit = result.get (ds); -if (preEdit == null) { -preEdit = new jalview.datamodel.Sequence ("", seq.getSequenceAsString ()); -preEdit.setDatasetSequence (ds); -result.put (ds, preEdit); -}if (ds != null) { -if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { -preEdit.setSequence ( String.instantialize (jalview.util.StringUtils.insertCharAt (preEdit.getSequence (), position, number, gap))); -} else if (action === jalview.commands.EditCommand.Action.INSERT_GAP) { -preEdit.setSequence ( String.instantialize (jalview.util.StringUtils.deleteChars (preEdit.getSequence (), position, position + number))); -} else { -System.err.println ("Can't undo edit action " + action); -}}} -} -return result; -}, "~B"); -Clazz.defineMethod (c$, "getEditIterator", -function (forwards) { -if (forwards) { -return this.getEdits ().iterator (); -} else { -return new jalview.util.ReverseListIterator (this.getEdits ()); -}}, "~B"); -c$.$EditCommand$Edit$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.oldds = null; -this.fullAlignmentHeight = false; -this.deletedAnnotationRows = null; -this.deletedAnnotations = null; -this.editedFeatures = null; -this.al = null; -this.command = null; -this.string = null; -this.seqs = null; -this.alIndex = null; -this.position = 0; -this.number = 0; -this.gapChar = '\0'; -Clazz.instantialize (this, arguments); -}, jalview.commands.EditCommand, "Edit"); -Clazz.makeConstructor (c$, -function (a, b, c, d, e) { -this.command = a; -this.seqs = b; -this.position = c; -this.number = d; -this.gapChar = e; -}, "jalview.commands.EditCommand.Action,~A,~N,~N,~S"); -Clazz.makeConstructor (c$, -function (a, b, c, d, e) { -this.gapChar = e.getGapCharacter (); -this.command = a; -this.seqs = b; -this.position = c; -this.number = d; -this.al = e; -this.alIndex = Clazz.newIntArray (b.length, 0); -for (var f = 0; f < b.length; f++) { -this.alIndex[f] = e.findIndex (b[f]); -} -this.fullAlignmentHeight = (e.getHeight () == b.length); -}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI"); -Clazz.makeConstructor (c$, -function (a, b, c, d, e, f) { -this.command = a; -this.seqs = b; -this.position = c; -this.number = d; -this.al = e; -this.gapChar = e.getGapCharacter (); -this.string = Clazz.newCharArray (b.length, '\0'); -for (var g = 0; g < b.length; g++) { -this.string[g] = f.toCharArray (); -} -this.fullAlignmentHeight = (e.getHeight () == b.length); -}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI,~S"); -Clazz.defineMethod (c$, "getSequences", -function () { -return this.seqs; -}); -Clazz.defineMethod (c$, "getPosition", -function () { -return this.position; -}); -Clazz.defineMethod (c$, "getAction", -function () { -return this.command; -}); -Clazz.defineMethod (c$, "getNumber", -function () { -return this.number; -}); -Clazz.defineMethod (c$, "getGapCharacter", -function () { -return this.gapChar; -}); -c$ = Clazz.p0p (); -}; -Clazz.pu$h (); -c$ = Clazz.declareType (jalview.commands.EditCommand, "Action", Enum); -Clazz.defineMethod (c$, "getUndoAction", -function () { -switch (this) { -case jalview.commands.EditCommand.Action.INSERT_GAP: -return jalview.commands.EditCommand.Action.DELETE_GAP; -case jalview.commands.EditCommand.Action.CUT: -return jalview.commands.EditCommand.Action.PASTE; -case jalview.commands.EditCommand.Action.DELETE_GAP: -return jalview.commands.EditCommand.Action.INSERT_GAP; -case jalview.commands.EditCommand.Action.INSERT_NUC: -return null; -case jalview.commands.EditCommand.Action.PASTE: -return jalview.commands.EditCommand.Action.CUT; -case jalview.commands.EditCommand.Action.REPLACE: -return jalview.commands.EditCommand.Action.REPLACE; -} -return null; -}); -Clazz.defineEnumConstant (c$, "INSERT_GAP", 0, []); -Clazz.defineEnumConstant (c$, "DELETE_GAP", 1, []); -Clazz.defineEnumConstant (c$, "CUT", 2, []); -Clazz.defineEnumConstant (c$, "PASTE", 3, []); -Clazz.defineEnumConstant (c$, "REPLACE", 4, []); -Clazz.defineEnumConstant (c$, "INSERT_NUC", 5, []); -c$ = Clazz.p0p (); -}); +Clazz.declarePackage ("jalview.commands"); +Clazz.load (["jalview.commands.CommandI", "java.lang.Enum", "java.util.ArrayList"], "jalview.commands.EditCommand", ["jalview.analysis.AlignSeq", "jalview.datamodel.AlignmentAnnotation", "$.Annotation", "$.Sequence", "$.SequenceFeature", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "$.ReverseListIterator", "$.StringUtils", "java.lang.StringBuffer", "java.util.HashMap", "$.Hashtable"], function () { +c$ = Clazz.decorateAsClass (function () { +this.edits = null; +this.description = null; +if (!Clazz.isClassDefined ("jalview.commands.EditCommand.Edit")) { +jalview.commands.EditCommand.$EditCommand$Edit$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.commands, "EditCommand", null, jalview.commands.CommandI); +Clazz.prepareFields (c$, function () { +this.edits = new java.util.ArrayList (); +}); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (description) { +this.description = description; +}, "~S"); +Clazz.makeConstructor (c$, +function (description, command, seqs, position, number, al) { +this.description = description; +if (command === jalview.commands.EditCommand.Action.CUT || command === jalview.commands.EditCommand.Action.PASTE) { +this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, command, seqs, position, number, al)); +}this.performEdit (0, null); +}, "~S,jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI"); +Clazz.makeConstructor (c$, +function (description, command, replace, seqs, position, number, al) { +this.description = description; +if (command === jalview.commands.EditCommand.Action.REPLACE) { +this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, command, seqs, position, number, al, replace)); +}this.performEdit (0, null); +}, "~S,jalview.commands.EditCommand.Action,~S,~A,~N,~N,jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "setEdit", +function (e) { +this.edits.clear (); +this.edits.add (e); +}, "jalview.commands.EditCommand.Edit"); +Clazz.defineMethod (c$, "addEdit", +function (e) { +if (!jalview.commands.EditCommand.expandEdit (this.edits, e)) { +this.edits.add (e); +}}, "jalview.commands.EditCommand.Edit"); +c$.expandEdit = Clazz.defineMethod (c$, "expandEdit", +function (edits, e) { +if (edits == null || edits.isEmpty ()) { +return false; +}var lastEdit = edits.get (edits.size () - 1); +var action = e.command; +if (lastEdit.command !== action) { +return false; +}if (lastEdit.seqs.length != e.seqs.length) { +return false; +}for (var i = 0; i < e.seqs.length; i++) { +if (lastEdit.seqs[i].getDatasetSequence () !== e.seqs[i].getDatasetSequence ()) { +return false; +}} +var contiguous = (action === jalview.commands.EditCommand.Action.INSERT_GAP && e.position == lastEdit.position + lastEdit.number) || (action === jalview.commands.EditCommand.Action.DELETE_GAP && e.position + e.number == lastEdit.position); +if (contiguous) { +lastEdit.number += e.number; +lastEdit.seqs = e.seqs; +if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { +lastEdit.position--; +}return true; +}return false; +}, "java.util.List,jalview.commands.EditCommand.Edit"); +Clazz.defineMethod (c$, "clearEdits", +function () { +this.edits.clear (); +}); +Clazz.defineMethod (c$, "getEdit", +function (i) { +if (i >= 0 && i < this.edits.size ()) { +return this.edits.get (i); +}return null; +}, "~N"); +Clazz.overrideMethod (c$, "getDescription", +function () { +return this.description; +}); +Clazz.overrideMethod (c$, "getSize", +function () { +return this.edits.size (); +}); +Clazz.defineMethod (c$, "getAlignment", +function () { +return (this.edits.isEmpty () ? null : this.edits.get (0).al); +}); +Clazz.defineMethod (c$, "appendEdit", +function (command, seqs, position, number, al, performEdit) { +this.appendEdit (command, seqs, position, number, al, performEdit, null); +}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI,~B"); +Clazz.defineMethod (c$, "appendEdit", +function (command, seqs, position, number, al, performEdit, views) { +var edit = Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, command, seqs, position, number, al.getGapCharacter ()); +if (al.getHeight () == seqs.length) { +edit.al = al; +edit.fullAlignmentHeight = true; +}this.addEdit (edit); +if (performEdit) { +jalview.commands.EditCommand.performEdit (edit, views); +}}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI,~B,~A"); +Clazz.defineMethod (c$, "appendEdit", +function (edit, al, performEdit, views) { +if (al.getHeight () == edit.seqs.length) { +edit.al = al; +edit.fullAlignmentHeight = true; +}this.addEdit (edit); +if (performEdit) { +jalview.commands.EditCommand.performEdit (edit, views); +}}, "jalview.commands.EditCommand.Edit,jalview.datamodel.AlignmentI,~B,~A"); +Clazz.defineMethod (c$, "performEdit", +function (commandIndex, views) { +var iterator = this.edits.listIterator (commandIndex); +while (iterator.hasNext ()) { +var edit = iterator.next (); +jalview.commands.EditCommand.performEdit (edit, views); +} +}, "~N,~A"); +c$.performEdit = Clazz.defineMethod (c$, "performEdit", +function (edit, views) { +switch (edit.command) { +case jalview.commands.EditCommand.Action.INSERT_GAP: +jalview.commands.EditCommand.insertGap (edit); +break; +case jalview.commands.EditCommand.Action.DELETE_GAP: +jalview.commands.EditCommand.deleteGap (edit); +break; +case jalview.commands.EditCommand.Action.CUT: +jalview.commands.EditCommand.cut (edit, views); +break; +case jalview.commands.EditCommand.Action.PASTE: +jalview.commands.EditCommand.paste (edit, views); +break; +case jalview.commands.EditCommand.Action.REPLACE: +jalview.commands.EditCommand.replace (edit); +break; +case jalview.commands.EditCommand.Action.INSERT_NUC: +break; +default: +break; +} +}, "jalview.commands.EditCommand.Edit,~A"); +Clazz.overrideMethod (c$, "doCommand", +function (views) { +this.performEdit (0, views); +}, "~A"); +Clazz.overrideMethod (c$, "undoCommand", +function (views) { +var iterator = this.edits.listIterator (this.edits.size ()); +while (iterator.hasPrevious ()) { +var e = iterator.previous (); +switch (e.command) { +case jalview.commands.EditCommand.Action.INSERT_GAP: +jalview.commands.EditCommand.deleteGap (e); +break; +case jalview.commands.EditCommand.Action.DELETE_GAP: +jalview.commands.EditCommand.insertGap (e); +break; +case jalview.commands.EditCommand.Action.CUT: +jalview.commands.EditCommand.paste (e, views); +break; +case jalview.commands.EditCommand.Action.PASTE: +jalview.commands.EditCommand.cut (e, views); +break; +case jalview.commands.EditCommand.Action.REPLACE: +jalview.commands.EditCommand.replace (e); +break; +case jalview.commands.EditCommand.Action.INSERT_NUC: +break; +default: +break; +} +} +}, "~A"); +c$.insertGap = Clazz.defineMethod (c$, "insertGap", +($fz = function (command) { +for (var s = 0; s < command.seqs.length; s++) { +command.seqs[s].insertCharAt (command.position, command.number, command.gapChar); +} +jalview.commands.EditCommand.adjustAnnotations (command, true, false, null); +}, $fz.isPrivate = true, $fz), "jalview.commands.EditCommand.Edit"); +c$.deleteGap = Clazz.defineMethod (c$, "deleteGap", +($fz = function (command) { +for (var s = 0; s < command.seqs.length; s++) { +command.seqs[s].deleteChars (command.position, command.position + command.number); +} +jalview.commands.EditCommand.adjustAnnotations (command, false, false, null); +}, $fz.isPrivate = true, $fz), "jalview.commands.EditCommand.Edit"); +c$.cut = Clazz.defineMethod (c$, "cut", +function (command, views) { +var seqDeleted = false; +command.string = Clazz.newCharArray (command.seqs.length, '\0'); +for (var i = 0; i < command.seqs.length; i++) { +var sequence = command.seqs[i]; +if (sequence.getLength () > command.position) { +command.string[i] = sequence.getSequence (command.position, command.position + command.number); +var oldds = sequence.getDatasetSequence (); +if (command.oldds != null && command.oldds[i] != null) { +sequence.setDatasetSequence (null); +}sequence.deleteChars (command.position, command.position + command.number); +if (command.oldds != null && command.oldds[i] != null) { +sequence.setDatasetSequence (command.oldds[i]); +command.oldds[i] = oldds; +} else { +if (oldds !== sequence.getDatasetSequence () || sequence.getSequenceFeatures () != null) { +if (command.oldds == null) { +command.oldds = new Array (command.seqs.length); +}command.oldds[i] = oldds; +jalview.commands.EditCommand.adjustFeatures (command, i, sequence.findPosition (command.position), sequence.findPosition (command.position + command.number), false); +}}}if (sequence.getLength () < 1) { +command.al.deleteSequence (sequence); +seqDeleted = true; +}} +jalview.commands.EditCommand.adjustAnnotations (command, false, seqDeleted, views); +}, "jalview.commands.EditCommand.Edit,~A"); +c$.paste = Clazz.defineMethod (c$, "paste", +function (command, views) { +var tmp; +var newDSNeeded; +var newDSWasNeeded; +var newstart; +var newend; +var seqWasDeleted = false; +var start = 0; +var end = 0; +for (var i = 0; i < command.seqs.length; i++) { +newDSNeeded = false; +newDSWasNeeded = command.oldds != null && command.oldds[i] != null; +if (command.seqs[i].getLength () < 1) { +if (command.alIndex[i] < command.al.getHeight ()) { +var sequences; +{ +if (!(command.alIndex[i] < 0)) { +sequences.add (command.alIndex[i], command.seqs[i]); +}}} else { +command.al.addSequence (command.seqs[i]); +}seqWasDeleted = true; +}newstart = command.seqs[i].getStart (); +newend = command.seqs[i].getEnd (); +tmp = new StringBuffer (); +tmp.append (command.seqs[i].getSequence ()); +if (command.string != null && command.string[i] != null) { +if (command.position >= tmp.length ()) { +var length = command.position - tmp.length (); +while (length > 0) { +tmp.append (command.gapChar); +length--; +} +}tmp.insert (command.position, command.string[i]); +for (var s = 0; s < command.string[i].length; s++) { +if (jalview.schemes.ResidueProperties.aaIndex[command.string[i][s].charCodeAt (0)] != 23) { +if (!newDSNeeded) { +newDSNeeded = true; +start = command.seqs[i].findPosition (command.position); +end = command.seqs[i].findPosition (command.position + command.number); +}if (command.seqs[i].getStart () == start) { +newstart--; +} else { +newend++; +}}} +command.string[i] = null; +}command.seqs[i].setSequence (tmp.toString ()); +command.seqs[i].setStart (newstart); +command.seqs[i].setEnd (newend); +if (newDSNeeded) { +if (command.seqs[i].getDatasetSequence () != null) { +var ds; +if (newDSWasNeeded) { +ds = command.oldds[i]; +} else { +ds = new jalview.datamodel.Sequence (command.seqs[i].getName (), jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, command.seqs[i].getSequenceAsString ()), command.seqs[i].getStart (), command.seqs[i].getEnd ()); +ds.setDescription (command.seqs[i].getDescription ()); +}if (command.oldds == null) { +command.oldds = new Array (command.seqs.length); +}command.oldds[i] = command.seqs[i].getDatasetSequence (); +command.seqs[i].setDatasetSequence (ds); +}jalview.commands.EditCommand.adjustFeatures (command, i, start, end, true); +}} +jalview.commands.EditCommand.adjustAnnotations (command, true, seqWasDeleted, views); +command.string = null; +}, "jalview.commands.EditCommand.Edit,~A"); +c$.replace = Clazz.defineMethod (c$, "replace", +function (command) { +var tmp; +var oldstring; +var start = command.position; +var end = command.number; +command.number = start + command.string[0].length; +for (var i = 0; i < command.seqs.length; i++) { +var newDSWasNeeded = command.oldds != null && command.oldds[i] != null; +oldstring = command.seqs[i].getSequenceAsString (); +tmp = new StringBuffer (oldstring.substring (0, start)); +tmp.append (command.string[i]); +var nogaprep = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (command.string[i])); +var ipos = command.seqs[i].findPosition (start) - command.seqs[i].getStart (); +tmp.append (oldstring.substring (end)); +command.seqs[i].setSequence (tmp.toString ()); +command.string[i] = oldstring.substring (start, end).toCharArray (); +var nogapold = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (command.string[i])); +if (!nogaprep.toLowerCase ().equals (nogapold.toLowerCase ())) { +if (newDSWasNeeded) { +var oldds = command.seqs[i].getDatasetSequence (); +command.seqs[i].setDatasetSequence (command.oldds[i]); +command.oldds[i] = oldds; +} else { +if (command.oldds == null) { +command.oldds = new Array (command.seqs.length); +}command.oldds[i] = command.seqs[i].getDatasetSequence (); +var newds = new jalview.datamodel.Sequence (command.seqs[i].getDatasetSequence ()); +var fullseq; +var osp = newds.getSequenceAsString (); +fullseq = osp.substring (0, ipos) + nogaprep + osp.substring (ipos + nogaprep.length); +newds.setSequence (fullseq.toUpperCase ()); +command.seqs[i].setDatasetSequence (newds); +}}tmp = null; +oldstring = null; +} +}, "jalview.commands.EditCommand.Edit"); +c$.adjustAnnotations = Clazz.defineMethod (c$, "adjustAnnotations", +function (command, insert, modifyVisibility, views) { +var annotations = null; +if (modifyVisibility && !insert) { +command.deletedAnnotationRows = new java.util.Hashtable (); +}if (command.fullAlignmentHeight) { +annotations = command.al.getAlignmentAnnotation (); +} else { +var aSize = 0; +var tmp; +for (var s = 0; s < command.seqs.length; s++) { +if (modifyVisibility) { +if (!insert) { +tmp = command.seqs[s].getAnnotation (); +if (tmp != null) { +var alen = tmp.length; +for (var aa = 0; aa < tmp.length; aa++) { +if (!command.al.deleteAnnotation (tmp[aa])) { +tmp[aa] = null; +alen--; +}} +command.seqs[s].setAlignmentAnnotation (null); +if (alen != tmp.length) { +var saved = new Array (alen); +for (var aa = 0, aapos = 0; aa < tmp.length; aa++) { +if (tmp[aa] != null) { +saved[aapos++] = tmp[aa]; +tmp[aa] = null; +}} +tmp = saved; +command.deletedAnnotationRows.put (command.seqs[s], saved); +for (var alview = 0; views != null && alview < views.length; alview++) { +if (views[alview] !== command.al) { +var toremove = views[alview].getAlignmentAnnotation (); +if (toremove == null || toremove.length == 0) { +continue; +}for (var aa = 0; aa < toremove.length; aa++) { +if (toremove[aa].sequenceRef === command.seqs[s]) { +views[alview].deleteAnnotation (toremove[aa]); +}} +}} +} else { +command.deletedAnnotationRows.put (command.seqs[s], tmp); +}}} else { +if (command.deletedAnnotationRows != null && command.deletedAnnotationRows.containsKey (command.seqs[s])) { +var revealed = command.deletedAnnotationRows.get (command.seqs[s]); +command.seqs[s].setAlignmentAnnotation (revealed); +if (revealed != null) { +for (var aa = 0; aa < revealed.length; aa++) { +command.al.addAnnotation (revealed[aa]); +} +for (var aa = 0; aa < revealed.length; aa++) { +command.al.setAnnotationIndex (revealed[aa], aa); +} +for (var vnum = 0; views != null && vnum < views.length; vnum++) { +if (views[vnum] !== command.al) { +var avwidth = views[vnum].getWidth () + 1; +for (var a = 0; a < revealed.length; a++) { +var newann = new jalview.datamodel.AlignmentAnnotation (revealed[a]); +command.seqs[s].addAlignmentAnnotation (newann); +newann.padAnnotation (avwidth); +views[vnum].addAnnotation (newann); +views[vnum].setAnnotationIndex (newann, a); +} +}} +}}}continue; +}if (command.seqs[s].getAnnotation () == null) { +continue; +}if (aSize == 0) { +annotations = command.seqs[s].getAnnotation (); +} else { +tmp = new Array (aSize + command.seqs[s].getAnnotation ().length); +System.arraycopy (annotations, 0, tmp, 0, aSize); +System.arraycopy (command.seqs[s].getAnnotation (), 0, tmp, aSize, command.seqs[s].getAnnotation ().length); +annotations = tmp; +}aSize = annotations.length; +} +}if (annotations == null) { +return; +}if (!insert) { +command.deletedAnnotations = new java.util.Hashtable (); +}var aSize; +var temp; +for (var a = 0; a < annotations.length; a++) { +if (annotations[a].autoCalculated || annotations[a].annotations == null) { +continue; +}var tSize = 0; +aSize = annotations[a].annotations.length; +if (insert) { +temp = new Array (aSize + command.number); +if (annotations[a].padGaps) { +for (var aa = 0; aa < temp.length; aa++) { +temp[aa] = new jalview.datamodel.Annotation (command.gapChar + "", null, ' ', 0); +} +}} else { +if (command.position < aSize) { +if (command.position + command.number >= aSize) { +tSize = aSize; +} else { +tSize = aSize - command.number; +}} else { +tSize = aSize; +}if (tSize < 0) { +tSize = aSize; +}temp = new Array (tSize); +}if (insert) { +if (command.position < annotations[a].annotations.length) { +System.arraycopy (annotations[a].annotations, 0, temp, 0, command.position); +if (command.deletedAnnotations != null && command.deletedAnnotations.containsKey (annotations[a].annotationId)) { +var restore = command.deletedAnnotations.get (annotations[a].annotationId); +System.arraycopy (restore, 0, temp, command.position, command.number); +}System.arraycopy (annotations[a].annotations, command.position, temp, command.position + command.number, aSize - command.position); +} else { +if (command.deletedAnnotations != null && command.deletedAnnotations.containsKey (annotations[a].annotationId)) { +var restore = command.deletedAnnotations.get (annotations[a].annotationId); +temp = new Array (annotations[a].annotations.length + restore.length); +System.arraycopy (annotations[a].annotations, 0, temp, 0, annotations[a].annotations.length); +System.arraycopy (restore, 0, temp, annotations[a].annotations.length, restore.length); +} else { +temp = annotations[a].annotations; +}}} else { +if (tSize != aSize || command.position < 2) { +var copylen = Math.min (command.position, annotations[a].annotations.length); +if (copylen > 0) { +System.arraycopy (annotations[a].annotations, 0, temp, 0, copylen); +}var deleted = new Array (command.number); +if (copylen >= command.position) { +copylen = Math.min (command.number, annotations[a].annotations.length - command.position); +if (copylen > 0) { +System.arraycopy (annotations[a].annotations, command.position, deleted, 0, copylen); +}}command.deletedAnnotations.put (annotations[a].annotationId, deleted); +if (annotations[a].annotations.length > command.position + command.number) { +System.arraycopy (annotations[a].annotations, command.position + command.number, temp, command.position, annotations[a].annotations.length - command.position - command.number); +}} else { +var dSize = aSize - command.position; +if (dSize > 0) { +var deleted = new Array (command.number); +System.arraycopy (annotations[a].annotations, command.position, deleted, 0, dSize); +command.deletedAnnotations.put (annotations[a].annotationId, deleted); +tSize = Math.min (annotations[a].annotations.length, command.position); +temp = new Array (tSize); +System.arraycopy (annotations[a].annotations, 0, temp, 0, tSize); +} else { +temp = annotations[a].annotations; +}}}annotations[a].annotations = temp; +} +}, "jalview.commands.EditCommand.Edit,~B,~B,~A"); +c$.adjustFeatures = Clazz.defineMethod (c$, "adjustFeatures", +function (command, index, i, j, insert) { +var seq = command.seqs[index]; +var sequence = seq.getDatasetSequence (); +if (sequence == null) { +sequence = seq; +}if (insert) { +if (command.editedFeatures != null && command.editedFeatures.containsKey (seq)) { +sequence.setSequenceFeatures (command.editedFeatures.get (seq)); +}return; +}var sf = sequence.getSequenceFeatures (); +if (sf == null) { +return; +}var oldsf = new Array (sf.length); +var cSize = j - i; +for (var s = 0; s < sf.length; s++) { +var copy = new jalview.datamodel.SequenceFeature (sf[s]); +oldsf[s] = copy; +if (sf[s].getEnd () < i) { +continue; +}if (sf[s].getBegin () > j) { +sf[s].setBegin (copy.getBegin () - cSize); +sf[s].setEnd (copy.getEnd () - cSize); +continue; +}if (sf[s].getBegin () >= i) { +sf[s].setBegin (i); +}if (sf[s].getEnd () < j) { +sf[s].setEnd (j - 1); +}sf[s].setEnd (sf[s].getEnd () - (cSize)); +if (sf[s].getBegin () > sf[s].getEnd ()) { +sequence.deleteFeature (sf[s]); +}} +if (command.editedFeatures == null) { +command.editedFeatures = new java.util.Hashtable (); +}command.editedFeatures.put (seq, oldsf); +}, "jalview.commands.EditCommand.Edit,~N,~N,~N,~B"); +Clazz.defineMethod (c$, "getEdits", +function () { +return this.edits; +}); +Clazz.defineMethod (c$, "priorState", +function (forUndo) { +var result = new java.util.HashMap (); +if (this.getEdits () == null) { +return result; +}if (forUndo) { +for (var e, $e = this.getEdits ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { +for (var seq, $seq = 0, $$seq = e.getSequences (); $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { +var ds = seq.getDatasetSequence (); +var preEdit = result.get (ds); +if (preEdit == null) { +preEdit = new jalview.datamodel.Sequence ("", seq.getSequenceAsString ()); +preEdit.setDatasetSequence (ds); +result.put (ds, preEdit); +}} +} +return result; +}var edits = new jalview.util.ReverseListIterator (this.getEdits ()); +while (edits.hasNext ()) { +var oldEdit = edits.next (); +var action = oldEdit.getAction (); +var position = oldEdit.getPosition (); +var number = oldEdit.getNumber (); +var gap = oldEdit.getGapCharacter (); +for (var seq, $seq = 0, $$seq = oldEdit.getSequences (); $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { +var ds = seq.getDatasetSequence (); +var preEdit = result.get (ds); +if (preEdit == null) { +preEdit = new jalview.datamodel.Sequence ("", seq.getSequenceAsString ()); +preEdit.setDatasetSequence (ds); +result.put (ds, preEdit); +}if (ds != null) { +if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { +preEdit.setSequence ( String.instantialize (jalview.util.StringUtils.insertCharAt (preEdit.getSequence (), position, number, gap))); +} else if (action === jalview.commands.EditCommand.Action.INSERT_GAP) { +preEdit.setSequence ( String.instantialize (jalview.util.StringUtils.deleteChars (preEdit.getSequence (), position, position + number))); +} else { +System.err.println ("Can't undo edit action " + action); +}}} +} +return result; +}, "~B"); +Clazz.defineMethod (c$, "getEditIterator", +function (forwards) { +if (forwards) { +return this.getEdits ().iterator (); +} else { +return new jalview.util.ReverseListIterator (this.getEdits ()); +}}, "~B"); +c$.$EditCommand$Edit$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.oldds = null; +this.fullAlignmentHeight = false; +this.deletedAnnotationRows = null; +this.deletedAnnotations = null; +this.editedFeatures = null; +this.al = null; +this.command = null; +this.string = null; +this.seqs = null; +this.alIndex = null; +this.position = 0; +this.number = 0; +this.gapChar = '\0'; +Clazz.instantialize (this, arguments); +}, jalview.commands.EditCommand, "Edit"); +Clazz.makeConstructor (c$, +function (a, b, c, d, e) { +this.command = a; +this.seqs = b; +this.position = c; +this.number = d; +this.gapChar = e; +}, "jalview.commands.EditCommand.Action,~A,~N,~N,~S"); +Clazz.makeConstructor (c$, +function (a, b, c, d, e) { +this.gapChar = e.getGapCharacter (); +this.command = a; +this.seqs = b; +this.position = c; +this.number = d; +this.al = e; +this.alIndex = Clazz.newIntArray (b.length, 0); +for (var f = 0; f < b.length; f++) { +this.alIndex[f] = e.findIndex (b[f]); +} +this.fullAlignmentHeight = (e.getHeight () == b.length); +}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI"); +Clazz.makeConstructor (c$, +function (a, b, c, d, e, f) { +this.command = a; +this.seqs = b; +this.position = c; +this.number = d; +this.al = e; +this.gapChar = e.getGapCharacter (); +this.string = Clazz.newCharArray (b.length, '\0'); +for (var g = 0; g < b.length; g++) { +this.string[g] = f.toCharArray (); +} +this.fullAlignmentHeight = (e.getHeight () == b.length); +}, "jalview.commands.EditCommand.Action,~A,~N,~N,jalview.datamodel.AlignmentI,~S"); +Clazz.defineMethod (c$, "getSequences", +function () { +return this.seqs; +}); +Clazz.defineMethod (c$, "getPosition", +function () { +return this.position; +}); +Clazz.defineMethod (c$, "getAction", +function () { +return this.command; +}); +Clazz.defineMethod (c$, "getNumber", +function () { +return this.number; +}); +Clazz.defineMethod (c$, "getGapCharacter", +function () { +return this.gapChar; +}); +c$ = Clazz.p0p (); +}; +Clazz.pu$h (); +c$ = Clazz.declareType (jalview.commands.EditCommand, "Action", Enum); +Clazz.defineMethod (c$, "getUndoAction", +function () { +switch (this) { +case jalview.commands.EditCommand.Action.INSERT_GAP: +return jalview.commands.EditCommand.Action.DELETE_GAP; +case jalview.commands.EditCommand.Action.CUT: +return jalview.commands.EditCommand.Action.PASTE; +case jalview.commands.EditCommand.Action.DELETE_GAP: +return jalview.commands.EditCommand.Action.INSERT_GAP; +case jalview.commands.EditCommand.Action.INSERT_NUC: +return null; +case jalview.commands.EditCommand.Action.PASTE: +return jalview.commands.EditCommand.Action.CUT; +case jalview.commands.EditCommand.Action.REPLACE: +return jalview.commands.EditCommand.Action.REPLACE; +} +return null; +}); +Clazz.defineEnumConstant (c$, "INSERT_GAP", 0, []); +Clazz.defineEnumConstant (c$, "DELETE_GAP", 1, []); +Clazz.defineEnumConstant (c$, "CUT", 2, []); +Clazz.defineEnumConstant (c$, "PASTE", 3, []); +Clazz.defineEnumConstant (c$, "REPLACE", 4, []); +Clazz.defineEnumConstant (c$, "INSERT_NUC", 5, []); +c$ = Clazz.p0p (); +}); diff --git a/bin/jalview/commands/OrderCommand.js b/bin/jalview/commands/OrderCommand.js index c85c70b..8939653 100644 --- a/bin/jalview/commands/OrderCommand.js +++ b/bin/jalview/commands/OrderCommand.js @@ -1,38 +1,38 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.load (["jalview.commands.CommandI"], "jalview.commands.OrderCommand", ["jalview.analysis.AlignmentSorter"], function () { -c$ = Clazz.decorateAsClass (function () { -this.description = null; -this.seqs = null; -this.seqs2 = null; -this.al = null; -Clazz.instantialize (this, arguments); -}, jalview.commands, "OrderCommand", null, jalview.commands.CommandI); -Clazz.makeConstructor (c$, -function (description, seqs, al) { -this.description = description; -this.seqs = seqs; -this.seqs2 = al.getSequencesArray (); -this.al = al; -this.doCommand (null); -}, "~S,~A,jalview.datamodel.AlignmentI"); -Clazz.overrideMethod (c$, "getDescription", -function () { -return this.description; -}); -Clazz.overrideMethod (c$, "getSize", -function () { -return 1; -}); -Clazz.overrideMethod (c$, "doCommand", -function (views) { -jalview.analysis.AlignmentSorter.setOrder (this.al, this.seqs2); -}, "~A"); -Clazz.overrideMethod (c$, "undoCommand", -function (views) { -jalview.analysis.AlignmentSorter.setOrder (this.al, this.seqs); -}, "~A"); -Clazz.defineMethod (c$, "getSequenceOrder", -function (undo) { -return undo ? this.seqs : this.seqs2; -}, "~B"); -}); +Clazz.declarePackage ("jalview.commands"); +Clazz.load (["jalview.commands.CommandI"], "jalview.commands.OrderCommand", ["jalview.analysis.AlignmentSorter"], function () { +c$ = Clazz.decorateAsClass (function () { +this.description = null; +this.seqs = null; +this.seqs2 = null; +this.al = null; +Clazz.instantialize (this, arguments); +}, jalview.commands, "OrderCommand", null, jalview.commands.CommandI); +Clazz.makeConstructor (c$, +function (description, seqs, al) { +this.description = description; +this.seqs = seqs; +this.seqs2 = al.getSequencesArray (); +this.al = al; +this.doCommand (null); +}, "~S,~A,jalview.datamodel.AlignmentI"); +Clazz.overrideMethod (c$, "getDescription", +function () { +return this.description; +}); +Clazz.overrideMethod (c$, "getSize", +function () { +return 1; +}); +Clazz.overrideMethod (c$, "doCommand", +function (views) { +jalview.analysis.AlignmentSorter.setOrder (this.al, this.seqs2); +}, "~A"); +Clazz.overrideMethod (c$, "undoCommand", +function (views) { +jalview.analysis.AlignmentSorter.setOrder (this.al, this.seqs); +}, "~A"); +Clazz.defineMethod (c$, "getSequenceOrder", +function (undo) { +return undo ? this.seqs : this.seqs2; +}, "~B"); +}); diff --git a/bin/jalview/commands/RemoveGapColCommand.js b/bin/jalview/commands/RemoveGapColCommand.js index a41e76e..511279b 100644 --- a/bin/jalview/commands/RemoveGapColCommand.js +++ b/bin/jalview/commands/RemoveGapColCommand.js @@ -1,45 +1,45 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.RemoveGapColCommand", ["jalview.util.Comparison"], function () { -c$ = Clazz.decorateAsClass (function () { -this.columnsDeleted = 0; -Clazz.instantialize (this, arguments); -}, jalview.commands, "RemoveGapColCommand", jalview.commands.EditCommand); -Clazz.makeConstructor (c$, -function (description, seqs, start, end, al) { -Clazz.superConstructor (this, jalview.commands.RemoveGapColCommand, []); -this.description = description; -var j; -var jSize = seqs.length; -var startCol = -1; -var endCol = -1; -this.columnsDeleted = 0; -this.clearEdits (); -var $delete = true; -for (var i = start; i <= end; i++) { -$delete = true; -for (j = 0; j < jSize; j++) { -if (seqs[j].getLength () > i) { -if (!jalview.util.Comparison.isGap (seqs[j].getCharAt (i))) { -if ($delete) { -endCol = i; -}$delete = false; -break; -}}} -if ($delete && startCol == -1) { -startCol = i; -}if (!$delete && startCol > -1) { -this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seqs, startCol - this.columnsDeleted, endCol - startCol, al, false, null); -this.columnsDeleted += (endCol - startCol); -startCol = -1; -endCol = -1; -}} -if ($delete && startCol > -1) { -this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seqs, startCol - this.columnsDeleted, end - startCol + 1, al, false, null); -this.columnsDeleted += (end - startCol + 1); -}this.performEdit (0, null); -}, "~S,~A,~N,~N,jalview.datamodel.AlignmentI"); -Clazz.overrideMethod (c$, "getSize", -function () { -return this.columnsDeleted; -}); -}); +Clazz.declarePackage ("jalview.commands"); +Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.RemoveGapColCommand", ["jalview.util.Comparison"], function () { +c$ = Clazz.decorateAsClass (function () { +this.columnsDeleted = 0; +Clazz.instantialize (this, arguments); +}, jalview.commands, "RemoveGapColCommand", jalview.commands.EditCommand); +Clazz.makeConstructor (c$, +function (description, seqs, start, end, al) { +Clazz.superConstructor (this, jalview.commands.RemoveGapColCommand, []); +this.description = description; +var j; +var jSize = seqs.length; +var startCol = -1; +var endCol = -1; +this.columnsDeleted = 0; +this.clearEdits (); +var $delete = true; +for (var i = start; i <= end; i++) { +$delete = true; +for (j = 0; j < jSize; j++) { +if (seqs[j].getLength () > i) { +if (!jalview.util.Comparison.isGap (seqs[j].getCharAt (i))) { +if ($delete) { +endCol = i; +}$delete = false; +break; +}}} +if ($delete && startCol == -1) { +startCol = i; +}if (!$delete && startCol > -1) { +this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seqs, startCol - this.columnsDeleted, endCol - startCol, al, false, null); +this.columnsDeleted += (endCol - startCol); +startCol = -1; +endCol = -1; +}} +if ($delete && startCol > -1) { +this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seqs, startCol - this.columnsDeleted, end - startCol + 1, al, false, null); +this.columnsDeleted += (end - startCol + 1); +}this.performEdit (0, null); +}, "~S,~A,~N,~N,jalview.datamodel.AlignmentI"); +Clazz.overrideMethod (c$, "getSize", +function () { +return this.columnsDeleted; +}); +}); diff --git a/bin/jalview/commands/RemoveGapsCommand.js b/bin/jalview/commands/RemoveGapsCommand.js index 7097db3..3cc233d 100644 --- a/bin/jalview/commands/RemoveGapsCommand.js +++ b/bin/jalview/commands/RemoveGapsCommand.js @@ -1,56 +1,56 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.RemoveGapsCommand", ["jalview.util.Comparison"], function () { -c$ = Clazz.declareType (jalview.commands, "RemoveGapsCommand", jalview.commands.EditCommand); -Clazz.makeConstructor (c$, -function (description, seqs, al) { -Clazz.superConstructor (this, jalview.commands.RemoveGapsCommand, []); -this.description = description; -var width = 0; -for (var i = 0; i < seqs.length; i++) { -if (seqs[i].getLength () > width) { -width = seqs[i].getLength (); -}} -this.findGaps (seqs, 0, width, al); -}, "~S,~A,jalview.datamodel.AlignmentI"); -Clazz.makeConstructor (c$, -function (description, seqs, start, end, al) { -Clazz.superConstructor (this, jalview.commands.RemoveGapsCommand, []); -this.description = description; -this.findGaps (seqs, start, end, al); -}, "~S,~A,~N,~N,jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "findGaps", -function (seqs, start, end, al) { -var startCol = -1; -var endCol = -1; -var deletedCols = 0; -var j; -var jSize; -this.clearEdits (); -var $delete = true; -var sequence; -for (var s = 0; s < seqs.length; s++) { -deletedCols = 0; -startCol = -1; -endCol = -1; -sequence = seqs[s].getSequence (start, end + 1); -jSize = sequence.length; -for (j = 0; j < jSize; j++) { -$delete = true; -if (!jalview.util.Comparison.isGap (sequence[j])) { -if ($delete) { -endCol = j; -}$delete = false; -}if ($delete && startCol == -1) { -startCol = j; -}if (!$delete && startCol > -1) { -this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, Clazz.newArray (-1, [seqs[s]]), start + startCol - deletedCols, endCol - startCol, al, false, null); -deletedCols += (endCol - startCol); -startCol = -1; -endCol = -1; -}} -if ($delete && startCol > -1) { -this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, Clazz.newArray (-1, [seqs[s]]), start + startCol - deletedCols, jSize - startCol, al, false, null); -}} -this.performEdit (0, null); -}, "~A,~N,~N,jalview.datamodel.AlignmentI"); -}); +Clazz.declarePackage ("jalview.commands"); +Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.RemoveGapsCommand", ["jalview.util.Comparison"], function () { +c$ = Clazz.declareType (jalview.commands, "RemoveGapsCommand", jalview.commands.EditCommand); +Clazz.makeConstructor (c$, +function (description, seqs, al) { +Clazz.superConstructor (this, jalview.commands.RemoveGapsCommand, []); +this.description = description; +var width = 0; +for (var i = 0; i < seqs.length; i++) { +if (seqs[i].getLength () > width) { +width = seqs[i].getLength (); +}} +this.findGaps (seqs, 0, width, al); +}, "~S,~A,jalview.datamodel.AlignmentI"); +Clazz.makeConstructor (c$, +function (description, seqs, start, end, al) { +Clazz.superConstructor (this, jalview.commands.RemoveGapsCommand, []); +this.description = description; +this.findGaps (seqs, start, end, al); +}, "~S,~A,~N,~N,jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "findGaps", +function (seqs, start, end, al) { +var startCol = -1; +var endCol = -1; +var deletedCols = 0; +var j; +var jSize; +this.clearEdits (); +var $delete = true; +var sequence; +for (var s = 0; s < seqs.length; s++) { +deletedCols = 0; +startCol = -1; +endCol = -1; +sequence = seqs[s].getSequence (start, end + 1); +jSize = sequence.length; +for (j = 0; j < jSize; j++) { +$delete = true; +if (!jalview.util.Comparison.isGap (sequence[j])) { +if ($delete) { +endCol = j; +}$delete = false; +}if ($delete && startCol == -1) { +startCol = j; +}if (!$delete && startCol > -1) { +this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, Clazz.newArray (-1, [seqs[s]]), start + startCol - deletedCols, endCol - startCol, al, false, null); +deletedCols += (endCol - startCol); +startCol = -1; +endCol = -1; +}} +if ($delete && startCol > -1) { +this.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, Clazz.newArray (-1, [seqs[s]]), start + startCol - deletedCols, jSize - startCol, al, false, null); +}} +this.performEdit (0, null); +}, "~A,~N,~N,jalview.datamodel.AlignmentI"); +}); diff --git a/bin/jalview/commands/SlideSequencesCommand.js b/bin/jalview/commands/SlideSequencesCommand.js index 125c732..5a79b67 100644 --- a/bin/jalview/commands/SlideSequencesCommand.js +++ b/bin/jalview/commands/SlideSequencesCommand.js @@ -1,48 +1,48 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.SlideSequencesCommand", ["jalview.util.Comparison"], function () { -c$ = Clazz.decorateAsClass (function () { -this.gapsInsertedBegin = false; -Clazz.instantialize (this, arguments); -}, jalview.commands, "SlideSequencesCommand", jalview.commands.EditCommand); -Clazz.makeConstructor (c$, -function (description, seqsLeft, seqsRight, slideSize, gapChar) { -Clazz.superConstructor (this, jalview.commands.SlideSequencesCommand, []); -this.description = description; -var lSize = seqsLeft.length; -this.gapsInsertedBegin = false; -var i; -var j; -for (i = 0; i < lSize; i++) { -for (j = 0; j < slideSize; j++) { -if (!jalview.util.Comparison.isGap (seqsLeft[i].getCharAt (j))) { -this.gapsInsertedBegin = true; -break; -}} -} -var e = null; -if (!this.gapsInsertedBegin) { -e = Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.DELETE_GAP, seqsLeft, 0, slideSize, gapChar); -this.setEdit (e); -} else { -e = Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.INSERT_GAP, seqsRight, 0, slideSize, gapChar); -this.setEdit (e); -}jalview.commands.EditCommand.performEdit (e, null); -}, "~S,~A,~A,~N,~S"); -Clazz.defineMethod (c$, "getGapsInsertedBegin", -function () { -return this.gapsInsertedBegin; -}); -Clazz.defineMethod (c$, "appendSlideCommand", -function (command) { -var same = false; -if (command.getEdit (0).seqs.length == this.getEdit (0).seqs.length) { -same = true; -for (var i = 0; i < command.getEdit (0).seqs.length; i++) { -if (this.getEdit (0).seqs[i] !== command.getEdit (0).seqs[i]) { -same = false; -}} -}if (same) { -command.addEdit (this.getEdit (0)); -}return same; -}, "jalview.commands.SlideSequencesCommand"); -}); +Clazz.declarePackage ("jalview.commands"); +Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.SlideSequencesCommand", ["jalview.util.Comparison"], function () { +c$ = Clazz.decorateAsClass (function () { +this.gapsInsertedBegin = false; +Clazz.instantialize (this, arguments); +}, jalview.commands, "SlideSequencesCommand", jalview.commands.EditCommand); +Clazz.makeConstructor (c$, +function (description, seqsLeft, seqsRight, slideSize, gapChar) { +Clazz.superConstructor (this, jalview.commands.SlideSequencesCommand, []); +this.description = description; +var lSize = seqsLeft.length; +this.gapsInsertedBegin = false; +var i; +var j; +for (i = 0; i < lSize; i++) { +for (j = 0; j < slideSize; j++) { +if (!jalview.util.Comparison.isGap (seqsLeft[i].getCharAt (j))) { +this.gapsInsertedBegin = true; +break; +}} +} +var e = null; +if (!this.gapsInsertedBegin) { +e = Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.DELETE_GAP, seqsLeft, 0, slideSize, gapChar); +this.setEdit (e); +} else { +e = Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.INSERT_GAP, seqsRight, 0, slideSize, gapChar); +this.setEdit (e); +}jalview.commands.EditCommand.performEdit (e, null); +}, "~S,~A,~A,~N,~S"); +Clazz.defineMethod (c$, "getGapsInsertedBegin", +function () { +return this.gapsInsertedBegin; +}); +Clazz.defineMethod (c$, "appendSlideCommand", +function (command) { +var same = false; +if (command.getEdit (0).seqs.length == this.getEdit (0).seqs.length) { +same = true; +for (var i = 0; i < command.getEdit (0).seqs.length; i++) { +if (this.getEdit (0).seqs[i] !== command.getEdit (0).seqs[i]) { +same = false; +}} +}if (same) { +command.addEdit (this.getEdit (0)); +}return same; +}, "jalview.commands.SlideSequencesCommand"); +}); diff --git a/bin/jalview/commands/TrimRegionCommand.class b/bin/jalview/commands/TrimRegionCommand.class index aace60c7cb52f246e5b5eff7d9a2aa27eec68956..5e4d0bb0105d897f55a15269347cacae63cda249 100644 GIT binary patch delta 29 lcmX>rcSdeQCpY8F&0XBdjLfDCY?D9m7&4k~R_4`W0sxs(2&Di3 delta 30 mcmX>jcUEpgCpY7)&0XBdjLc>X?2|w67&4hKZC2vdVgdl669}gO diff --git a/bin/jalview/commands/TrimRegionCommand.js b/bin/jalview/commands/TrimRegionCommand.js index ff06747..2732ca0 100644 --- a/bin/jalview/commands/TrimRegionCommand.js +++ b/bin/jalview/commands/TrimRegionCommand.js @@ -1,91 +1,91 @@ -Clazz.declarePackage ("jalview.commands"); -Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.TrimRegionCommand", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.colSel = null; -this.start = null; -this.shiftList = null; -this.selectionGroup = null; -this.deletedHiddenColumns = null; -this.columnsDeleted = 0; -Clazz.instantialize (this, arguments); -}, jalview.commands, "TrimRegionCommand", jalview.commands.EditCommand); -Clazz.makeConstructor (c$, -function (description, command, seqs, column, al, colSel, selectedRegion) { -Clazz.superConstructor (this, jalview.commands.TrimRegionCommand, []); -this.description = description; -this.selectionGroup = selectedRegion; -this.colSel = colSel; -if (command.equalsIgnoreCase (jalview.commands.TrimRegionCommand.TRIM_LEFT)) { -if (column == 0) { -return; -}this.columnsDeleted = column; -this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.CUT, seqs, 0, column, al)); -} else if (command.equalsIgnoreCase (jalview.commands.TrimRegionCommand.TRIM_RIGHT)) { -var width = al.getWidth () - column - 1; -if (width < 2) { -return; -}this.columnsDeleted = width - 1; -this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.CUT, seqs, column + 1, width, al)); -}var i; -var isize = this.getEdit (0).seqs.length; -this.start = Clazz.newIntArray (isize, 0); -for (i = 0; i < isize; i++) { -this.start[i] = this.getEdit (0).seqs[i].getStart (); -} -this.performEdit (0, null); -}, "~S,~S,~A,~N,jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "cut", -function (command) { -var column; -var j; -var jSize = command.seqs.length; -for (j = 0; j < jSize; j++) { -if (command.position == 0) { -column = command.seqs[j].findPosition (command.number); -command.seqs[j].setStart (column); -} else { -column = command.seqs[j].findPosition (command.position) - 1; -command.seqs[j].setEnd (column); -}} -Clazz.superCall (this, jalview.commands.TrimRegionCommand, "cut", [command, null]); -if (command.position == 0) { -this.deletedHiddenColumns = this.colSel.compensateForEdit (0, command.number); -if (this.selectionGroup != null) { -this.selectionGroup.adjustForRemoveLeft (command.number); -}} else { -this.deletedHiddenColumns = this.colSel.compensateForEdit (command.position, command.number); -if (this.selectionGroup != null) { -this.selectionGroup.adjustForRemoveRight (command.position); -}}}, "jalview.commands.EditCommand.Edit"); -Clazz.defineMethod (c$, "paste", -function (command) { -Clazz.superCall (this, jalview.commands.TrimRegionCommand, "paste", [command, null]); -var column; -var j; -var jSize = command.seqs.length; -for (j = 0; j < jSize; j++) { -if (command.position == 0) { -command.seqs[j].setStart (this.start[j]); -} else { -column = command.seqs[j].findPosition (command.number + command.position) - 1; -command.seqs[j].setEnd (column); -}} -if (command.position == 0) { -this.colSel.compensateForEdit (0, -command.number); -if (this.selectionGroup != null) { -this.selectionGroup.adjustForRemoveLeft (-command.number); -}}if (this.deletedHiddenColumns != null) { -var region; -for (var i = 0; i < this.deletedHiddenColumns.size (); i++) { -region = this.deletedHiddenColumns.get (i); -this.colSel.hideColumns (region[0], region[1]); -} -}}, "jalview.commands.EditCommand.Edit"); -Clazz.overrideMethod (c$, "getSize", -function () { -return this.columnsDeleted; -}); -Clazz.defineStatics (c$, -"TRIM_LEFT", "TrimLeft", -"TRIM_RIGHT", "TrimRight"); -}); +Clazz.declarePackage ("jalview.commands"); +Clazz.load (["jalview.commands.EditCommand"], "jalview.commands.TrimRegionCommand", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.colSel = null; +this.start = null; +this.shiftList = null; +this.selectionGroup = null; +this.deletedHiddenColumns = null; +this.columnsDeleted = 0; +Clazz.instantialize (this, arguments); +}, jalview.commands, "TrimRegionCommand", jalview.commands.EditCommand); +Clazz.makeConstructor (c$, +function (description, command, seqs, column, al, colSel, selectedRegion) { +Clazz.superConstructor (this, jalview.commands.TrimRegionCommand, []); +this.description = description; +this.selectionGroup = selectedRegion; +this.colSel = colSel; +if (command.equalsIgnoreCase (jalview.commands.TrimRegionCommand.TRIM_LEFT)) { +if (column == 0) { +return; +}this.columnsDeleted = column; +this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.CUT, seqs, 0, column, al)); +} else if (command.equalsIgnoreCase (jalview.commands.TrimRegionCommand.TRIM_RIGHT)) { +var width = al.getWidth () - column - 1; +if (width < 2) { +return; +}this.columnsDeleted = width - 1; +this.setEdit (Clazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, jalview.commands.EditCommand.Action.CUT, seqs, column + 1, width, al)); +}var i; +var isize = this.getEdit (0).seqs.length; +this.start = Clazz.newIntArray (isize, 0); +for (i = 0; i < isize; i++) { +this.start[i] = this.getEdit (0).seqs[i].getStart (); +} +this.performEdit (0, null); +}, "~S,~S,~A,~N,jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "cut", +function (command) { +var column; +var j; +var jSize = command.seqs.length; +for (j = 0; j < jSize; j++) { +if (command.position == 0) { +column = command.seqs[j].findPosition (command.number); +command.seqs[j].setStart (column); +} else { +column = command.seqs[j].findPosition (command.position) - 1; +command.seqs[j].setEnd (column); +}} +Clazz.superCall (this, jalview.commands.TrimRegionCommand, "cut", [command, null]); +if (command.position == 0) { +this.deletedHiddenColumns = this.colSel.compensateForEdit (0, command.number); +if (this.selectionGroup != null) { +this.selectionGroup.adjustForRemoveLeft (command.number); +}} else { +this.deletedHiddenColumns = this.colSel.compensateForEdit (command.position, command.number); +if (this.selectionGroup != null) { +this.selectionGroup.adjustForRemoveRight (command.position); +}}}, "jalview.commands.EditCommand.Edit"); +Clazz.defineMethod (c$, "paste", +function (command) { +Clazz.superCall (this, jalview.commands.TrimRegionCommand, "paste", [command, null]); +var column; +var j; +var jSize = command.seqs.length; +for (j = 0; j < jSize; j++) { +if (command.position == 0) { +command.seqs[j].setStart (this.start[j]); +} else { +column = command.seqs[j].findPosition (command.number + command.position) - 1; +command.seqs[j].setEnd (column); +}} +if (command.position == 0) { +this.colSel.compensateForEdit (0, -command.number); +if (this.selectionGroup != null) { +this.selectionGroup.adjustForRemoveLeft (-command.number); +}}if (this.deletedHiddenColumns != null) { +var region; +for (var i = 0; i < this.deletedHiddenColumns.size (); i++) { +region = this.deletedHiddenColumns.get (i); +this.colSel.hideColumns (region[0], region[1]); +} +}}, "jalview.commands.EditCommand.Edit"); +Clazz.overrideMethod (c$, "getSize", +function () { +return this.columnsDeleted; +}); +Clazz.defineStatics (c$, +"TRIM_LEFT", "TrimLeft", +"TRIM_RIGHT", "TrimRight"); +}); diff --git a/bin/jalview/controller/AlignViewController.class b/bin/jalview/controller/AlignViewController.class index c9c4b7826351b488e44602a65133a25e14ac0098..7507fecf9d9ce9e981d86c37e0ebe1bf522ae966 100644 GIT binary patch delta 67 zcmbOj))Tg2gB)Yv=8bYDtjsbDN|RqG>o5l~2u^lTQDS76Y^`Fz?7<)oSK(pi W;^LjWKxG~)kKj)Rfz7U}XIKG&$r1nn delta 77 zcmeAPn;5oXgB)Yn=8bYDtjvlG>XTn6>oEH>2u`+FQDS9a`p>{Sd7+9n>wgAU263R6 h;^aOR9#$qUE-t3Yb5-WCb2173WZ-4m?4Wvv6#!P&6m 0) { -this.viewport.getAlignment ().deleteAllGroups (); -this.viewport.clearSequenceColours (); -this.viewport.setSelectionGroup (null); -return true; -}return false; -}); -Clazz.overrideMethod (c$, "markColumnsContainingFeatures", -function (invert, extendCurrent, toggle, featureType) { -var bs = new java.util.BitSet (); -var alw; -var alStart; -var sqcol = (this.viewport.getSelectionGroup () == null ? this.viewport.getAlignment () : this.viewport.getSelectionGroup ()); -alStart = sqcol.getStartRes (); -alw = sqcol.getEndRes () + 1; -var seqs = sqcol.getSequences (); -var nseq = 0; -for (var sq, $sq = seqs.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -var tfeat = 0; -if (sq != null) { -var sf = sq.getSequenceFeatures (); -if (sf != null) { -var ist = sq.findIndex (sq.getStart ()); -var iend = sq.findIndex (sq.getEnd ()); -if (iend < alStart || ist > alw) { -continue; -}for (var sfpos, $sfpos = 0, $$sfpos = sf; $sfpos < $$sfpos.length && ((sfpos = $$sfpos[$sfpos]) || true); $sfpos++) { -if (sfpos != null && (featureType.equals (sfpos.getType ()))) { -tfeat++; -var i = sq.findIndex (sfpos.getBegin ()); -var j = sq.findIndex (sfpos.getEnd ()); -if (j < alStart || i > alw) { -continue; -}if (i < alStart) { -i = alStart; -}if (i < ist) { -i = ist; -}if (j > alw) { -j = alw; -}for (; i <= j; i++) { -bs.set (i - 1); -} -}} -}if (tfeat > 0) { -nseq++; -}}} -var cs = this.viewport.getColumnSelection (); -if (bs.cardinality () > 0 || invert) { -if (cs == null) { -cs = new jalview.datamodel.ColumnSelection (); -} else { -if (!extendCurrent) { -cs.clear (); -}}if (invert) { -for (var i = bs.nextClearBit (alStart), ibs = bs.nextSetBit (alStart); i >= alStart && i < (alw); ) { -if (ibs < 0 || i < ibs) { -if (toggle && cs.contains (i)) { -cs.removeElement (i++); -} else { -cs.addElement (i++); -}} else { -i = bs.nextClearBit (ibs); -ibs = bs.nextSetBit (i); -}} -} else { -for (var i = bs.nextSetBit (alStart); i >= alStart; i = bs.nextSetBit (i + 1)) { -if (toggle && cs.contains (i)) { -cs.removeElement (i); -} else { -cs.addElement (i); -}} -}this.viewport.setColumnSelection (cs); -this.alignPanel.paintAlignment (true); -this.avcg.setStatus (jalview.util.MessageManager.formatMessage ("label.view_controller_toggled_marked", Clazz.newArray (-1, [(toggle ? jalview.util.MessageManager.getString ("label.toggled") : jalview.util.MessageManager.getString ("label.marked")), (invert ? (Integer.$valueOf ((alw - alStart) - bs.cardinality ()).toString ()) : (Integer.$valueOf (bs.cardinality ()).toString ())), featureType, Integer.$valueOf (nseq).toString ()]))); -return true; -} else { -this.avcg.setStatus (jalview.util.MessageManager.formatMessage ("label.no_feature_of_type_found", Clazz.newArray (-1, [featureType]))); -if (!extendCurrent && cs != null) { -cs.clear (); -this.alignPanel.paintAlignment (true); -}return false; -}}, "~B,~B,~B,~S"); -Clazz.overrideMethod (c$, "sortAlignmentByFeatureDensity", -function (typ) { -this.sortBy (typ, "Sort by Density", jalview.analysis.AlignmentSorter.FEATURE_DENSITY); -}, "~A"); -Clazz.defineMethod (c$, "sortBy", -function (typ, methodText, method) { -var fr = this.alignPanel.getFeatureRenderer (); -if (typ == null) { -typ = fr == null ? null : fr.getDisplayedFeatureTypes (); -}var gps = null; -gps = fr == null ? null : fr.getDisplayedFeatureGroups (); -if (typ != null) { -var types = new java.util.ArrayList (); -for (var i = 0; i < typ.length; i++) { -if (typ[i] != null) { -types.add (typ[i]); -}typ = new Array (types.size ()); -types.toArray (typ); -} -}if (gps != null) { -var grps = new java.util.ArrayList (); -for (var i = 0; i < gps.length; i++) { -if (gps[i] != null) { -grps.add (gps[i]); -}} -gps = new Array (grps.size ()); -grps.toArray (gps); -}var al = this.viewport.getAlignment (); -var start; -var stop; -var sg = this.viewport.getSelectionGroup (); -if (sg != null) { -start = sg.getStartRes (); -stop = sg.getEndRes (); -} else { -start = 0; -stop = al.getWidth (); -}var oldOrder = al.getSequencesArray (); -jalview.analysis.AlignmentSorter.sortByFeature (typ, gps, start, stop, al, method); -this.avcg.addHistoryItem ( new jalview.commands.OrderCommand (methodText, oldOrder, this.viewport.getAlignment ())); -this.alignPanel.paintAlignment (true); -}, "~A,~S,~S"); -Clazz.overrideMethod (c$, "sortAlignmentByFeatureScore", -function (typ) { -this.sortBy (typ, "Sort by Feature Score", jalview.analysis.AlignmentSorter.FEATURE_SCORE); -}, "~A"); -Clazz.overrideMethod (c$, "parseFeaturesFile", -function (file, protocol, relaxedIdMatching) { -var featuresFile = false; -try { -featuresFile = new jalview.io.FeaturesFile (file, protocol).parse (this.viewport.getAlignment ().getDataset (), this.alignPanel.getFeatureRenderer ().getFeatureColours (), false, relaxedIdMatching); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -if (featuresFile) { -this.avcg.refreshFeatureUI (true); -if (this.alignPanel.getFeatureRenderer () != null) { -this.alignPanel.getFeatureRenderer ().findAllFeatures (true); -}if (this.avcg.getFeatureSettingsUI () != null) { -this.avcg.getFeatureSettingsUI ().discoverAllFeatureData (); -}this.alignPanel.paintAlignment (true); -}return featuresFile; -}, "~S,~S,~B"); -}); +Clazz.declarePackage ("jalview.controller"); +Clazz.load (["jalview.api.AlignViewControllerI"], "jalview.controller.AlignViewController", ["jalview.analysis.AlignmentSorter", "$.Grouping", "jalview.commands.OrderCommand", "jalview.datamodel.ColumnSelection", "jalview.io.FeaturesFile", "jalview.util.MessageManager", "java.awt.Color", "java.util.ArrayList", "$.BitSet"], function () { +c$ = Clazz.decorateAsClass (function () { +this.viewport = null; +this.alignPanel = null; +this.avcg = null; +Clazz.instantialize (this, arguments); +}, jalview.controller, "AlignViewController", null, jalview.api.AlignViewControllerI); +Clazz.overrideMethod (c$, "finalize", +function () { +this.viewport = null; +this.alignPanel = null; +this.avcg = null; +}); +Clazz.makeConstructor (c$, +function (alignFrame, viewport, alignPanel) { +this.avcg = alignFrame; +this.viewport = viewport; +this.alignPanel = alignPanel; +}, "jalview.api.AlignViewControllerGuiI,jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); +Clazz.overrideMethod (c$, "setViewportAndAlignmentPanel", +function (viewport, alignPanel) { +this.alignPanel = alignPanel; +this.viewport = viewport; +}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); +Clazz.overrideMethod (c$, "makeGroupsFromSelection", +function () { +var sg = this.viewport.getSelectionGroup (); +var cs = this.viewport.getColumnSelection (); +var gps = null; +if (sg != null && (cs == null || cs.getSelected () == null || cs.size () == 0)) { +gps = jalview.analysis.Grouping.makeGroupsFrom (this.viewport.getSequenceSelection (), this.viewport.getAlignmentView (true).getSequenceStrings (this.viewport.getGapCharacter ()), this.viewport.getAlignment ().getGroups ()); +} else { +if (cs != null) { +gps = jalview.analysis.Grouping.makeGroupsFromCols ((sg == null) ? this.viewport.getAlignment ().getSequencesArray () : sg.getSequences ().toArray ( new Array (0)), cs, this.viewport.getAlignment ().getGroups ()); +}}if (gps != null) { +this.viewport.getAlignment ().deleteAllGroups (); +this.viewport.clearSequenceColours (); +this.viewport.setSelectionGroup (null); +for (var g = 0; g < gps.length; g++) { +gps[g].setshowSequenceLogo (this.viewport.isShowSequenceLogo ()); +this.viewport.getAlignment ().addGroup (gps[g]); +var col = new java.awt.Color (Clazz.doubleToInt (Math.random () * 255), Clazz.doubleToInt (Math.random () * 255), Clazz.doubleToInt (Math.random () * 255)); +col = col.brighter (); +for (var sq, $sq = gps[g].getSequences (null).iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +this.viewport.setSequenceColour (sq, col); +} +} +return true; +}return false; +}); +Clazz.overrideMethod (c$, "createGroup", +function () { +var sg = this.viewport.getSelectionGroup (); +if (sg != null) { +this.viewport.getAlignment ().addGroup (sg); +return true; +}return false; +}); +Clazz.overrideMethod (c$, "unGroup", +function () { +var sg = this.viewport.getSelectionGroup (); +if (sg != null) { +this.viewport.getAlignment ().deleteGroup (sg); +return true; +}return false; +}); +Clazz.overrideMethod (c$, "deleteGroups", +function () { +if (this.viewport.getAlignment ().getGroups () != null && this.viewport.getAlignment ().getGroups ().size () > 0) { +this.viewport.getAlignment ().deleteAllGroups (); +this.viewport.clearSequenceColours (); +this.viewport.setSelectionGroup (null); +return true; +}return false; +}); +Clazz.overrideMethod (c$, "markColumnsContainingFeatures", +function (invert, extendCurrent, toggle, featureType) { +var bs = new java.util.BitSet (); +var alw; +var alStart; +var sqcol = (this.viewport.getSelectionGroup () == null ? this.viewport.getAlignment () : this.viewport.getSelectionGroup ()); +alStart = sqcol.getStartRes (); +alw = sqcol.getEndRes () + 1; +var seqs = sqcol.getSequences (); +var nseq = 0; +for (var sq, $sq = seqs.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +var tfeat = 0; +if (sq != null) { +var sf = sq.getSequenceFeatures (); +if (sf != null) { +var ist = sq.findIndex (sq.getStart ()); +var iend = sq.findIndex (sq.getEnd ()); +if (iend < alStart || ist > alw) { +continue; +}for (var sfpos, $sfpos = 0, $$sfpos = sf; $sfpos < $$sfpos.length && ((sfpos = $$sfpos[$sfpos]) || true); $sfpos++) { +if (sfpos != null && (featureType.equals (sfpos.getType ()))) { +tfeat++; +var i = sq.findIndex (sfpos.getBegin ()); +var j = sq.findIndex (sfpos.getEnd ()); +if (j < alStart || i > alw) { +continue; +}if (i < alStart) { +i = alStart; +}if (i < ist) { +i = ist; +}if (j > alw) { +j = alw; +}for (; i <= j; i++) { +bs.set (i - 1); +} +}} +}if (tfeat > 0) { +nseq++; +}}} +var cs = this.viewport.getColumnSelection (); +if (bs.cardinality () > 0 || invert) { +if (cs == null) { +cs = new jalview.datamodel.ColumnSelection (); +} else { +if (!extendCurrent) { +cs.clear (); +}}if (invert) { +for (var i = bs.nextClearBit (alStart), ibs = bs.nextSetBit (alStart); i >= alStart && i < (alw); ) { +if (ibs < 0 || i < ibs) { +if (toggle && cs.contains (i)) { +cs.removeElement (i++); +} else { +cs.addElement (i++); +}} else { +i = bs.nextClearBit (ibs); +ibs = bs.nextSetBit (i); +}} +} else { +for (var i = bs.nextSetBit (alStart); i >= alStart; i = bs.nextSetBit (i + 1)) { +if (toggle && cs.contains (i)) { +cs.removeElement (i); +} else { +cs.addElement (i); +}} +}this.viewport.setColumnSelection (cs); +this.alignPanel.paintAlignment (true); +this.avcg.setStatus (jalview.util.MessageManager.formatMessage ("label.view_controller_toggled_marked", Clazz.newArray (-1, [(toggle ? jalview.util.MessageManager.getString ("label.toggled") : jalview.util.MessageManager.getString ("label.marked")), (invert ? (Integer.$valueOf ((alw - alStart) - bs.cardinality ()).toString ()) : (Integer.$valueOf (bs.cardinality ()).toString ())), featureType, Integer.$valueOf (nseq).toString ()]))); +return true; +} else { +this.avcg.setStatus (jalview.util.MessageManager.formatMessage ("label.no_feature_of_type_found", Clazz.newArray (-1, [featureType]))); +if (!extendCurrent && cs != null) { +cs.clear (); +this.alignPanel.paintAlignment (true); +}return false; +}}, "~B,~B,~B,~S"); +Clazz.overrideMethod (c$, "sortAlignmentByFeatureDensity", +function (typ) { +this.sortBy (typ, "Sort by Density", jalview.analysis.AlignmentSorter.FEATURE_DENSITY); +}, "~A"); +Clazz.defineMethod (c$, "sortBy", +function (typ, methodText, method) { +var fr = this.alignPanel.getFeatureRenderer (); +if (typ == null) { +typ = fr == null ? null : fr.getDisplayedFeatureTypes (); +}var gps = null; +gps = fr == null ? null : fr.getDisplayedFeatureGroups (); +if (typ != null) { +var types = new java.util.ArrayList (); +for (var i = 0; i < typ.length; i++) { +if (typ[i] != null) { +types.add (typ[i]); +}typ = new Array (types.size ()); +types.toArray (typ); +} +}if (gps != null) { +var grps = new java.util.ArrayList (); +for (var i = 0; i < gps.length; i++) { +if (gps[i] != null) { +grps.add (gps[i]); +}} +gps = new Array (grps.size ()); +grps.toArray (gps); +}var al = this.viewport.getAlignment (); +var start; +var stop; +var sg = this.viewport.getSelectionGroup (); +if (sg != null) { +start = sg.getStartRes (); +stop = sg.getEndRes (); +} else { +start = 0; +stop = al.getWidth (); +}var oldOrder = al.getSequencesArray (); +jalview.analysis.AlignmentSorter.sortByFeature (typ, gps, start, stop, al, method); +this.avcg.addHistoryItem ( new jalview.commands.OrderCommand (methodText, oldOrder, this.viewport.getAlignment ())); +this.alignPanel.paintAlignment (true); +}, "~A,~S,~S"); +Clazz.overrideMethod (c$, "sortAlignmentByFeatureScore", +function (typ) { +this.sortBy (typ, "Sort by Feature Score", jalview.analysis.AlignmentSorter.FEATURE_SCORE); +}, "~A"); +Clazz.overrideMethod (c$, "parseFeaturesFile", +function (file, protocol, relaxedIdMatching) { +var featuresFile = false; +try { +featuresFile = new jalview.io.FeaturesFile (file, protocol).parse (this.viewport.getAlignment ().getDataset (), this.alignPanel.getFeatureRenderer ().getFeatureColours (), false, relaxedIdMatching); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +if (featuresFile) { +this.avcg.refreshFeatureUI (true); +if (this.alignPanel.getFeatureRenderer () != null) { +this.alignPanel.getFeatureRenderer ().findAllFeatures (true); +}if (this.avcg.getFeatureSettingsUI () != null) { +this.avcg.getFeatureSettingsUI ().discoverAllFeatureData (); +}this.alignPanel.paintAlignment (true); +}return featuresFile; +}, "~S,~S,~B"); +}); diff --git a/bin/jalview/controller/FeatureSettingsController.js b/bin/jalview/controller/FeatureSettingsController.js index 1a3acab..8a9666e 100644 --- a/bin/jalview/controller/FeatureSettingsController.js +++ b/bin/jalview/controller/FeatureSettingsController.js @@ -1,7 +1,7 @@ -Clazz.declarePackage ("jalview.controller"); -c$ = Clazz.decorateAsClass (function () { -this.settingUI = null; -this.fr = null; -this.fsettings = null; -Clazz.instantialize (this, arguments); -}, jalview.controller, "FeatureSettingsController"); +Clazz.declarePackage ("jalview.controller"); +c$ = Clazz.decorateAsClass (function () { +this.settingUI = null; +this.fr = null; +this.fsettings = null; +Clazz.instantialize (this, arguments); +}, jalview.controller, "FeatureSettingsController"); diff --git a/bin/jalview/controller/FeatureSettingsControllerGuiI.js b/bin/jalview/controller/FeatureSettingsControllerGuiI.js index ec98397..c092514 100644 --- a/bin/jalview/controller/FeatureSettingsControllerGuiI.js +++ b/bin/jalview/controller/FeatureSettingsControllerGuiI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.controller"); -Clazz.declareInterface (jalview.controller, "FeatureSettingsControllerGuiI"); +Clazz.declarePackage ("jalview.controller"); +Clazz.declareInterface (jalview.controller, "FeatureSettingsControllerGuiI"); diff --git a/bin/jalview/datamodel/ASequence.js b/bin/jalview/datamodel/ASequence.js index 1c80545..76a4493 100644 --- a/bin/jalview/datamodel/ASequence.js +++ b/bin/jalview/datamodel/ASequence.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.ASequenceI"], "jalview.datamodel.ASequence", null, function () { -c$ = Clazz.declareType (jalview.datamodel, "ASequence", null, jalview.datamodel.ASequenceI); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.ASequenceI"], "jalview.datamodel.ASequence", null, function () { +c$ = Clazz.declareType (jalview.datamodel, "ASequence", null, jalview.datamodel.ASequenceI); +}); diff --git a/bin/jalview/datamodel/ASequenceI.js b/bin/jalview/datamodel/ASequenceI.js index 91b3544..3d17914 100644 --- a/bin/jalview/datamodel/ASequenceI.js +++ b/bin/jalview/datamodel/ASequenceI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.declareInterface (jalview.datamodel, "ASequenceI"); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.declareInterface (jalview.datamodel, "ASequenceI"); diff --git a/bin/jalview/datamodel/AlignedCodon.js b/bin/jalview/datamodel/AlignedCodon.js index d02ac8a..3b95647 100644 --- a/bin/jalview/datamodel/AlignedCodon.js +++ b/bin/jalview/datamodel/AlignedCodon.js @@ -1,42 +1,42 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.AlignedCodon", ["java.lang.IllegalArgumentException", "$.StringBuilder"], function () { -c$ = Clazz.decorateAsClass (function () { -this.pos1 = 0; -this.pos2 = 0; -this.pos3 = 0; -this.product = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "AlignedCodon"); -Clazz.makeConstructor (c$, -function (i, j, k) { -this.construct (i, j, k, null); -}, "~N,~N,~N"); -Clazz.makeConstructor (c$, -function (i, j, k, prod) { -this.pos1 = i; -this.pos2 = j; -this.pos3 = k; -this.product = prod; -}, "~N,~N,~N,~S"); -Clazz.defineMethod (c$, "getBaseColumn", -function (base) { -if (base < 1 || base > 3) { -throw new IllegalArgumentException (Integer.toString (base)); -}return base == 1 ? this.pos1 : (base == 2 ? this.pos2 : this.pos3); -}, "~N"); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (o == null) { -return true; -}if (!(Clazz.instanceOf (o, jalview.datamodel.AlignedCodon))) { -return false; -}var ac = o; -return (this.pos1 == ac.pos1 && this.pos2 == ac.pos2 && this.pos3 == ac.pos3); -}, "~O"); -Clazz.overrideMethod (c$, "toString", -function () { -var sb = new StringBuilder (); -sb.append ("[").append (this.pos1).append (", ").append (this.pos2).append (", ").append (this.pos3).append ("]"); -return sb.toString (); -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.AlignedCodon", ["java.lang.IllegalArgumentException", "$.StringBuilder"], function () { +c$ = Clazz.decorateAsClass (function () { +this.pos1 = 0; +this.pos2 = 0; +this.pos3 = 0; +this.product = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "AlignedCodon"); +Clazz.makeConstructor (c$, +function (i, j, k) { +this.construct (i, j, k, null); +}, "~N,~N,~N"); +Clazz.makeConstructor (c$, +function (i, j, k, prod) { +this.pos1 = i; +this.pos2 = j; +this.pos3 = k; +this.product = prod; +}, "~N,~N,~N,~S"); +Clazz.defineMethod (c$, "getBaseColumn", +function (base) { +if (base < 1 || base > 3) { +throw new IllegalArgumentException (Integer.toString (base)); +}return base == 1 ? this.pos1 : (base == 2 ? this.pos2 : this.pos3); +}, "~N"); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (o == null) { +return true; +}if (!(Clazz.instanceOf (o, jalview.datamodel.AlignedCodon))) { +return false; +}var ac = o; +return (this.pos1 == ac.pos1 && this.pos2 == ac.pos2 && this.pos3 == ac.pos3); +}, "~O"); +Clazz.overrideMethod (c$, "toString", +function () { +var sb = new StringBuilder (); +sb.append ("[").append (this.pos1).append (", ").append (this.pos2).append (", ").append (this.pos3).append ("]"); +return sb.toString (); +}); +}); diff --git a/bin/jalview/datamodel/AlignedCodonFrame.class b/bin/jalview/datamodel/AlignedCodonFrame.class index dcb271c5b283832d763af6c4541bcb6e5e6c0d15..071822f6290786b40a278136d64f0c79ad11d513 100644 GIT binary patch delta 31 ncmdmMzRP^Wd?7}S%?pH9GcwmOa8LFVF=GDDz_qze#GD-fuyP5> delta 34 qcmdmGzSn%id?7~d%?pH9GcwmR@J#j-F=G40!2X|sX>+rPIXeK+hziL7 diff --git a/bin/jalview/datamodel/AlignedCodonFrame.js b/bin/jalview/datamodel/AlignedCodonFrame.js index 8d854b4..043b032 100644 --- a/bin/jalview/datamodel/AlignedCodonFrame.js +++ b/bin/jalview/datamodel/AlignedCodonFrame.js @@ -1,198 +1,198 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.AlignedCodonFrame", ["jalview.datamodel.Mapping", "jalview.util.MappingUtils", "java.util.ArrayList"], function () { -c$ = Clazz.decorateAsClass (function () { -this.dnaSeqs = null; -this.dnaToProt = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "AlignedCodonFrame"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "addMap", -function (dnaseq, aaseq, map) { -var nlen = 1; -if (this.dnaSeqs != null) { -nlen = this.dnaSeqs.length + 1; -}var ndna = new Array (nlen); -var ndtp = new Array (nlen); -if (this.dnaSeqs != null) { -System.arraycopy (this.dnaSeqs, 0, ndna, 0, this.dnaSeqs.length); -System.arraycopy (this.dnaToProt, 0, ndtp, 0, this.dnaSeqs.length); -}this.dnaSeqs = ndna; -this.dnaToProt = ndtp; -nlen--; -this.dnaSeqs[nlen] = (dnaseq.getDatasetSequence () == null) ? dnaseq : dnaseq.getDatasetSequence (); -var mp = new jalview.datamodel.Mapping (map); -mp.to = (aaseq.getDatasetSequence () == null) ? aaseq : aaseq.getDatasetSequence (); -this.dnaToProt[nlen] = mp; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,jalview.util.MapList"); -Clazz.defineMethod (c$, "getdnaSeqs", -function () { -return this.dnaSeqs; -}); -Clazz.defineMethod (c$, "getAaSeqs", -function () { -if (this.dnaToProt == null) { -return null; -}var sqs = new Array (this.dnaToProt.length); -for (var sz = 0; sz < this.dnaToProt.length; sz++) { -sqs[sz] = this.dnaToProt[sz].to; -} -return sqs; -}); -Clazz.defineMethod (c$, "getdnaToProt", -function () { -if (this.dnaToProt == null) { -return null; -}var sqs = new Array (this.dnaToProt.length); -for (var sz = 0; sz < this.dnaToProt.length; sz++) { -sqs[sz] = this.dnaToProt[sz].map; -} -return sqs; -}); -Clazz.defineMethod (c$, "getProtMappings", -function () { -return this.dnaToProt; -}); -Clazz.defineMethod (c$, "getMappingForSequence", -function (seq) { -if (this.dnaSeqs == null) { -return null; -}var seqDs = seq.getDatasetSequence (); -seqDs = seqDs != null ? seqDs : seq; -for (var ds = 0; ds < this.dnaSeqs.length; ds++) { -if (this.dnaSeqs[ds] === seqDs || this.dnaToProt[ds].to === seqDs) { -return this.dnaToProt[ds]; -}} -return null; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getAaForDnaSeq", -function (dnaSeqRef) { -if (this.dnaSeqs == null) { -return null; -}var dnads = dnaSeqRef.getDatasetSequence (); -for (var ds = 0; ds < this.dnaSeqs.length; ds++) { -if (this.dnaSeqs[ds] === dnaSeqRef || this.dnaSeqs[ds] === dnads) { -return this.dnaToProt[ds].to; -}} -return null; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getDnaForAaSeq", -function (aaSeqRef) { -if (this.dnaToProt == null) { -return null; -}var aads = aaSeqRef.getDatasetSequence (); -for (var as = 0; as < this.dnaToProt.length; as++) { -if (this.dnaToProt[as].to === aaSeqRef || this.dnaToProt[as].to === aads) { -return this.dnaSeqs[as]; -}} -return null; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "involvesSequence", -function (seq) { -return this.getAaForDnaSeq (seq) != null || this.getDnaForAaSeq (seq) != null; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "markMappedRegion", -function (seq, index, results) { -if (this.dnaToProt == null) { -return; -}var codon; -var ds = seq.getDatasetSequence (); -for (var mi = 0; mi < this.dnaToProt.length; mi++) { -if (this.dnaSeqs[mi] === seq || this.dnaSeqs[mi] === ds) { -codon = this.dnaToProt[mi].map.locateInTo (index, index); -if (codon != null) { -for (var i = 0; i < codon.length; i += 2) { -results.addResult (this.dnaToProt[mi].to, codon[i], codon[i + 1]); -} -}} else if (this.dnaToProt[mi].to === seq || this.dnaToProt[mi].to === ds) { -{ -codon = this.dnaToProt[mi].map.locateInFrom (index, index); -if (codon != null) { -for (var i = 0; i < codon.length; i += 2) { -results.addResult (this.dnaSeqs[mi], codon[i], codon[i + 1]); -} -}}}} -}, "jalview.datamodel.SequenceI,~N,jalview.datamodel.SearchResults"); -Clazz.defineMethod (c$, "getDnaPosition", -function (seq, aaPos) { -var ml = null; -for (var i = 0; i < this.dnaToProt.length; i++) { -if (this.dnaSeqs[i] === seq) { -ml = this.getdnaToProt ()[i]; -break; -}} -return ml == null ? null : ml.locateInFrom (aaPos, aaPos); -}, "jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "findAlignedSequence", -function (seq, al) { -if (this.dnaToProt != null) { -for (var i = 0; i < this.dnaToProt.length; i++) { -if (this.dnaSeqs[i] === seq) { -for (var sourceAligned, $sourceAligned = al.getSequences ().iterator (); $sourceAligned.hasNext () && ((sourceAligned = $sourceAligned.next ()) || true);) { -if (this.dnaToProt[i].to === sourceAligned.getDatasetSequence ()) { -return sourceAligned; -}} -}} -}if (this.dnaToProt != null) { -for (var i = 0; i < this.dnaToProt.length; i++) { -if (this.dnaToProt[i].to === seq) { -for (var sourceAligned, $sourceAligned = al.getSequences ().iterator (); $sourceAligned.hasNext () && ((sourceAligned = $sourceAligned.next ()) || true);) { -if (this.dnaSeqs[i] === sourceAligned.getDatasetSequence ()) { -return sourceAligned; -}} -}} -}return null; -}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "getMappedRegion", -function (mappedFrom, mappedTo, pos) { -var targetDs = mappedFrom.getDatasetSequence () == null ? mappedFrom : mappedFrom.getDatasetSequence (); -var sourceDs = mappedTo.getDatasetSequence () == null ? mappedTo : mappedTo.getDatasetSequence (); -if (targetDs == null || sourceDs == null || this.dnaToProt == null) { -return null; -}for (var mi = 0; mi < this.dnaToProt.length; mi++) { -if (this.dnaSeqs[mi] === targetDs && this.dnaToProt[mi].to === sourceDs) { -var codon = this.dnaToProt[mi].map.locateInFrom (pos, pos); -if (codon != null) { -return codon; -}}} -return null; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "getMappedCodon", -function (protein, aaPos) { -if (this.dnaToProt == null) { -return null; -}var ml = null; -var dnaSeq = null; -for (var i = 0; i < this.dnaToProt.length; i++) { -if (this.dnaToProt[i].to === protein) { -ml = this.getdnaToProt ()[i]; -dnaSeq = this.dnaSeqs[i].getSequence (); -break; -}} -if (ml == null) { -return null; -}var codonPos = ml.locateInFrom (aaPos, aaPos); -if (codonPos == null) { -return null; -}codonPos = jalview.util.MappingUtils.flattenRanges (codonPos); -return Clazz.newCharArray (-1, [dnaSeq[codonPos[0] - 1], dnaSeq[codonPos[1] - 1], dnaSeq[codonPos[2] - 1]]); -}, "jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "getMappingsForSequence", -function (seq) { -var result = new java.util.ArrayList (); -if (this.dnaSeqs == null) { -return result; -}var related = new java.util.ArrayList (); -var seqDs = seq.getDatasetSequence (); -seqDs = seqDs != null ? seqDs : seq; -for (var ds = 0; ds < this.dnaSeqs.length; ds++) { -var mapping = this.dnaToProt[ds]; -if (this.dnaSeqs[ds] === seqDs || mapping.to === seqDs) { -if (!related.contains (mapping.to)) { -result.add (mapping); -related.add (mapping.to); -}}} -return result; -}, "jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.AlignedCodonFrame", ["jalview.datamodel.Mapping", "jalview.util.MappingUtils", "java.util.ArrayList"], function () { +c$ = Clazz.decorateAsClass (function () { +this.dnaSeqs = null; +this.dnaToProt = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "AlignedCodonFrame"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "addMap", +function (dnaseq, aaseq, map) { +var nlen = 1; +if (this.dnaSeqs != null) { +nlen = this.dnaSeqs.length + 1; +}var ndna = new Array (nlen); +var ndtp = new Array (nlen); +if (this.dnaSeqs != null) { +System.arraycopy (this.dnaSeqs, 0, ndna, 0, this.dnaSeqs.length); +System.arraycopy (this.dnaToProt, 0, ndtp, 0, this.dnaSeqs.length); +}this.dnaSeqs = ndna; +this.dnaToProt = ndtp; +nlen--; +this.dnaSeqs[nlen] = (dnaseq.getDatasetSequence () == null) ? dnaseq : dnaseq.getDatasetSequence (); +var mp = new jalview.datamodel.Mapping (map); +mp.to = (aaseq.getDatasetSequence () == null) ? aaseq : aaseq.getDatasetSequence (); +this.dnaToProt[nlen] = mp; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,jalview.util.MapList"); +Clazz.defineMethod (c$, "getdnaSeqs", +function () { +return this.dnaSeqs; +}); +Clazz.defineMethod (c$, "getAaSeqs", +function () { +if (this.dnaToProt == null) { +return null; +}var sqs = new Array (this.dnaToProt.length); +for (var sz = 0; sz < this.dnaToProt.length; sz++) { +sqs[sz] = this.dnaToProt[sz].to; +} +return sqs; +}); +Clazz.defineMethod (c$, "getdnaToProt", +function () { +if (this.dnaToProt == null) { +return null; +}var sqs = new Array (this.dnaToProt.length); +for (var sz = 0; sz < this.dnaToProt.length; sz++) { +sqs[sz] = this.dnaToProt[sz].map; +} +return sqs; +}); +Clazz.defineMethod (c$, "getProtMappings", +function () { +return this.dnaToProt; +}); +Clazz.defineMethod (c$, "getMappingForSequence", +function (seq) { +if (this.dnaSeqs == null) { +return null; +}var seqDs = seq.getDatasetSequence (); +seqDs = seqDs != null ? seqDs : seq; +for (var ds = 0; ds < this.dnaSeqs.length; ds++) { +if (this.dnaSeqs[ds] === seqDs || this.dnaToProt[ds].to === seqDs) { +return this.dnaToProt[ds]; +}} +return null; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getAaForDnaSeq", +function (dnaSeqRef) { +if (this.dnaSeqs == null) { +return null; +}var dnads = dnaSeqRef.getDatasetSequence (); +for (var ds = 0; ds < this.dnaSeqs.length; ds++) { +if (this.dnaSeqs[ds] === dnaSeqRef || this.dnaSeqs[ds] === dnads) { +return this.dnaToProt[ds].to; +}} +return null; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getDnaForAaSeq", +function (aaSeqRef) { +if (this.dnaToProt == null) { +return null; +}var aads = aaSeqRef.getDatasetSequence (); +for (var as = 0; as < this.dnaToProt.length; as++) { +if (this.dnaToProt[as].to === aaSeqRef || this.dnaToProt[as].to === aads) { +return this.dnaSeqs[as]; +}} +return null; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "involvesSequence", +function (seq) { +return this.getAaForDnaSeq (seq) != null || this.getDnaForAaSeq (seq) != null; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "markMappedRegion", +function (seq, index, results) { +if (this.dnaToProt == null) { +return; +}var codon; +var ds = seq.getDatasetSequence (); +for (var mi = 0; mi < this.dnaToProt.length; mi++) { +if (this.dnaSeqs[mi] === seq || this.dnaSeqs[mi] === ds) { +codon = this.dnaToProt[mi].map.locateInTo (index, index); +if (codon != null) { +for (var i = 0; i < codon.length; i += 2) { +results.addResult (this.dnaToProt[mi].to, codon[i], codon[i + 1]); +} +}} else if (this.dnaToProt[mi].to === seq || this.dnaToProt[mi].to === ds) { +{ +codon = this.dnaToProt[mi].map.locateInFrom (index, index); +if (codon != null) { +for (var i = 0; i < codon.length; i += 2) { +results.addResult (this.dnaSeqs[mi], codon[i], codon[i + 1]); +} +}}}} +}, "jalview.datamodel.SequenceI,~N,jalview.datamodel.SearchResults"); +Clazz.defineMethod (c$, "getDnaPosition", +function (seq, aaPos) { +var ml = null; +for (var i = 0; i < this.dnaToProt.length; i++) { +if (this.dnaSeqs[i] === seq) { +ml = this.getdnaToProt ()[i]; +break; +}} +return ml == null ? null : ml.locateInFrom (aaPos, aaPos); +}, "jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "findAlignedSequence", +function (seq, al) { +if (this.dnaToProt != null) { +for (var i = 0; i < this.dnaToProt.length; i++) { +if (this.dnaSeqs[i] === seq) { +for (var sourceAligned, $sourceAligned = al.getSequences ().iterator (); $sourceAligned.hasNext () && ((sourceAligned = $sourceAligned.next ()) || true);) { +if (this.dnaToProt[i].to === sourceAligned.getDatasetSequence ()) { +return sourceAligned; +}} +}} +}if (this.dnaToProt != null) { +for (var i = 0; i < this.dnaToProt.length; i++) { +if (this.dnaToProt[i].to === seq) { +for (var sourceAligned, $sourceAligned = al.getSequences ().iterator (); $sourceAligned.hasNext () && ((sourceAligned = $sourceAligned.next ()) || true);) { +if (this.dnaSeqs[i] === sourceAligned.getDatasetSequence ()) { +return sourceAligned; +}} +}} +}return null; +}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "getMappedRegion", +function (mappedFrom, mappedTo, pos) { +var targetDs = mappedFrom.getDatasetSequence () == null ? mappedFrom : mappedFrom.getDatasetSequence (); +var sourceDs = mappedTo.getDatasetSequence () == null ? mappedTo : mappedTo.getDatasetSequence (); +if (targetDs == null || sourceDs == null || this.dnaToProt == null) { +return null; +}for (var mi = 0; mi < this.dnaToProt.length; mi++) { +if (this.dnaSeqs[mi] === targetDs && this.dnaToProt[mi].to === sourceDs) { +var codon = this.dnaToProt[mi].map.locateInFrom (pos, pos); +if (codon != null) { +return codon; +}}} +return null; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "getMappedCodon", +function (protein, aaPos) { +if (this.dnaToProt == null) { +return null; +}var ml = null; +var dnaSeq = null; +for (var i = 0; i < this.dnaToProt.length; i++) { +if (this.dnaToProt[i].to === protein) { +ml = this.getdnaToProt ()[i]; +dnaSeq = this.dnaSeqs[i].getSequence (); +break; +}} +if (ml == null) { +return null; +}var codonPos = ml.locateInFrom (aaPos, aaPos); +if (codonPos == null) { +return null; +}codonPos = jalview.util.MappingUtils.flattenRanges (codonPos); +return Clazz.newCharArray (-1, [dnaSeq[codonPos[0] - 1], dnaSeq[codonPos[1] - 1], dnaSeq[codonPos[2] - 1]]); +}, "jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "getMappingsForSequence", +function (seq) { +var result = new java.util.ArrayList (); +if (this.dnaSeqs == null) { +return result; +}var related = new java.util.ArrayList (); +var seqDs = seq.getDatasetSequence (); +seqDs = seqDs != null ? seqDs : seq; +for (var ds = 0; ds < this.dnaSeqs.length; ds++) { +var mapping = this.dnaToProt[ds]; +if (this.dnaSeqs[ds] === seqDs || mapping.to === seqDs) { +if (!related.contains (mapping.to)) { +result.add (mapping); +related.add (mapping.to); +}}} +return result; +}, "jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/datamodel/Alignment.class b/bin/jalview/datamodel/Alignment.class index 5ed53fa1ea9ea7524508837ff00735c46ebbccf2..c65b99e11df284fdb248bf79181ec2ab689f48c2 100644 GIT binary patch delta 75 zcmV-R0JQ(s+X2(t0kC^O0d2E-30DyX0co=vTx$da{Qx18iD2{r46}b>R}8!i7#aWo delta 78 zcmV-U0I~nm+X2?w0kC^O0dBK=KuG}uBmfAL$Uz+f2LiL^K`Rjf4zm(dg#!bK01uOz kR%`+z0<#BK5d{Hivl(1#1Oxs6B9n(;^a2S2vwUG!4C=`k7XSbN diff --git a/bin/jalview/datamodel/Alignment.js b/bin/jalview/datamodel/Alignment.js index f70f6ce..a4d45ee 100644 --- a/bin/jalview/datamodel/Alignment.js +++ b/bin/jalview/datamodel/Alignment.js @@ -1,815 +1,815 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.AlignmentI", "$.HiddenSequences", "java.util.ArrayList", "$.Collections", "$.LinkedHashSet"], "jalview.datamodel.Alignment", ["jalview.analysis.AlignmentUtils", "jalview.datamodel.AlignmentAnnotation", "$.CigarArray", "$.SeqCigar", "$.Sequence", "jalview.util.Comparison", "$.MessageManager", "java.lang.Error", "java.util.HashSet", "$.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.dataset = null; -this.sequences = null; -this.groups = null; -this.gapCharacter = '-'; -this.type = 1; -this.$hasRNAStructure = false; -this.annotations = null; -this.hiddenSequences = null; -this.alignmentProperties = null; -this.codonFrameList = null; -this.alignmentRefs = 0; -this.seqrep = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "Alignment", null, jalview.datamodel.AlignmentI); -Clazz.prepareFields (c$, function () { -this.groups = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); -this.hiddenSequences = new jalview.datamodel.HiddenSequences (this); -this.codonFrameList = new java.util.LinkedHashSet (); -}); -Clazz.defineMethod (c$, "initAlignment", -($fz = function (seqs) { -var i = 0; -if (jalview.util.Comparison.isNucleotide (seqs)) { -this.type = 1; -} else { -this.type = 0; -}this.sequences = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); -for (i = 0; i < seqs.length; i++) { -this.sequences.add (seqs[i]); -} -}, $fz.isPrivate = true, $fz), "~A"); -Clazz.makeConstructor (c$, -function (al) { -var seqs = al.getSequencesArray (); -for (var i = 0; i < seqs.length; i++) { -seqs[i] = new jalview.datamodel.Sequence (seqs[i]); -} -this.codonFrameList = (al).codonFrameList; -this.initAlignment (seqs); -}, "jalview.datamodel.AlignmentI"); -Clazz.makeConstructor (c$, -function (seqs) { -this.initAlignment (seqs); -}, "~A"); -c$.createAlignment = Clazz.defineMethod (c$, "createAlignment", -function (compactAlignment) { -throw new Error (jalview.util.MessageManager.getString ("error.alignment_cigararray_not_implemented")); -}, "jalview.datamodel.CigarArray"); -Clazz.defineMethod (c$, "getSequences", -function () { -return this.sequences; -}); -Clazz.defineMethod (c$, "getSequences", -function (hiddenReps) { -return this.sequences; -}, "java.util.Map"); -Clazz.defineMethod (c$, "getSequencesArray", -function () { -if (this.sequences == null) { -return null; -}{ -return this.sequences.toArray ( new Array (this.sequences.size ())); -}}); -Clazz.overrideMethod (c$, "getSequencesByName", -function () { -return jalview.analysis.AlignmentUtils.getSequencesByName (this); -}); -Clazz.overrideMethod (c$, "getSequenceAt", -function (i) { -{ -if (i > -1 && i < this.sequences.size ()) { -return this.sequences.get (i); -}}return null; -}, "~N"); -Clazz.overrideMethod (c$, "addSequence", -function (snew) { -if (this.dataset != null) { -if (snew.getDatasetSequence () != null) { -this.getDataset ().addSequence (snew.getDatasetSequence ()); -} else { -var adding = snew.deriveSequence (); -this.getDataset ().addSequence (adding.getDatasetSequence ()); -snew = adding; -}}if (this.sequences == null) { -this.initAlignment ( Clazz.newArray (-1, [snew])); -} else { -{ -this.sequences.add (snew); -}}if (this.hiddenSequences != null) { -this.hiddenSequences.adjustHeightSequenceAdded (); -}}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "setSequenceAt", -function (i, snew) { -{ -this.deleteSequence (i); -this.sequences.set (i, snew); -}}, "~N,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getGroups", -function () { -return this.groups; -}); -Clazz.overrideMethod (c$, "finalize", -function () { -if (this.getDataset () != null) { -this.getDataset ().removeAlignmentRef (); -}this.dataset = null; -this.sequences = null; -this.groups = null; -this.annotations = null; -this.hiddenSequences = null; -}); -Clazz.defineMethod (c$, "removeAlignmentRef", -($fz = function () { -if (--this.alignmentRefs == 0) { -this.finalize (); -}}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "deleteSequence", -function (s) { -this.deleteSequence (this.findIndex (s)); -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "deleteSequence", -function (i) { -if (i > -1 && i < this.getHeight ()) { -{ -this.sequences.remove (i); -this.hiddenSequences.adjustHeightSequenceDeleted (i); -}}}, "~N"); -Clazz.overrideMethod (c$, "findGroup", -function (s) { -{ -for (var i = 0; i < this.groups.size (); i++) { -var sg = this.groups.get (i); -if (sg.getSequences (null).contains (s)) { -return sg; -}} -}return null; -}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "findAllGroups", -function (s) { -var temp = new java.util.ArrayList (); -{ -var gSize = this.groups.size (); -for (var i = 0; i < gSize; i++) { -var sg = this.groups.get (i); -if (sg == null || sg.getSequences () == null) { -this.deleteGroup (sg); -gSize--; -continue; -}if (sg.getSequences ().contains (s)) { -temp.add (sg); -}} -}var ret = new Array (temp.size ()); -return temp.toArray (ret); -}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "addGroup", -function (sg) { -{ -if (!this.groups.contains (sg)) { -if (this.hiddenSequences.getSize () > 0) { -var i; -var iSize = sg.getSize (); -for (i = 0; i < iSize; i++) { -if (!this.sequences.contains (sg.getSequenceAt (i))) { -sg.deleteSequence (sg.getSequenceAt (i), false); -iSize--; -i--; -}} -if (sg.getSize () < 1) { -return; -}}sg.setContext (this); -this.groups.add (sg); -}}}, "jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "removeAnnotationForGroup", -($fz = function (gp) { -if (this.annotations == null || this.annotations.length == 0) { -return; -}var t; -var todelete = new Array (this.annotations.length); -var tokeep = new Array (this.annotations.length); -var i; -var p; -var k; -if (gp == null) { -for (i = 0, p = 0, k = 0; i < this.annotations.length; i++) { -if (this.annotations[i].groupRef != null) { -todelete[p++] = this.annotations[i]; -} else { -tokeep[k++] = this.annotations[i]; -}} -} else { -for (i = 0, p = 0, k = 0; i < this.annotations.length; i++) { -if (this.annotations[i].groupRef === gp) { -todelete[p++] = this.annotations[i]; -} else { -tokeep[k++] = this.annotations[i]; -}} -}if (p > 0) { -for (i = 0; i < p; i++) { -this.unhookAnnotation (todelete[i]); -todelete[i] = null; -} -t = new Array (k); -for (i = 0; i < k; i++) { -t[i] = tokeep[i]; -} -this.annotations = t; -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceGroup"); -Clazz.overrideMethod (c$, "deleteAllGroups", -function () { -{ -if (this.annotations != null) { -this.removeAnnotationForGroup (null); -}for (var sg, $sg = this.groups.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -sg.setContext (null); -} -this.groups.clear (); -}}); -Clazz.overrideMethod (c$, "deleteGroup", -function (g) { -{ -if (this.groups.contains (g)) { -this.removeAnnotationForGroup (g); -this.groups.remove (g); -g.setContext (null); -}}}, "jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "findName", -function (name) { -return this.findName (name, false); -}, "~S"); -Clazz.defineMethod (c$, "findName", -function (token, b) { -return this.findName (null, token, b); -}, "~S,~B"); -Clazz.defineMethod (c$, "findName", -function (startAfter, token, b) { -var i = 0; -var sq = null; -var sqname = null; -if (startAfter != null) { -var matched = false; -while (i < this.sequences.size ()) { -if (this.getSequenceAt (i++) === startAfter) { -matched = true; -break; -}} -if (!matched) { -i = 0; -}}while (i < this.sequences.size ()) { -sq = this.getSequenceAt (i); -sqname = sq.getName (); -if (sqname.equals (token) || (b && (sqname.equalsIgnoreCase (token)))) { -return this.getSequenceAt (i); -}i++; -} -return null; -}, "jalview.datamodel.SequenceI,~S,~B"); -Clazz.overrideMethod (c$, "findSequenceMatch", -function (name) { -var matches = new java.util.Vector (); -var i = 0; -while (i < this.sequences.size ()) { -if (this.getSequenceAt (i).getName ().equals (name)) { -matches.addElement (this.getSequenceAt (i)); -}i++; -} -var result = new Array (matches.size ()); -for (i = 0; i < result.length; i++) { -result[i] = matches.elementAt (i); -} -return result; -}, "~S"); -Clazz.defineMethod (c$, "findIndex", -function (s) { -var i = 0; -while (i < this.sequences.size ()) { -if (s === this.getSequenceAt (i)) { -return i; -}i++; -} -return -1; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "findIndex", -function (results) { -var i = 0; -while (i < this.sequences.size ()) { -if (results.involvesSequence (this.getSequenceAt (i))) { -return i; -}i++; -} -return -1; -}, "jalview.datamodel.SearchResults"); -Clazz.overrideMethod (c$, "getHeight", -function () { -return this.sequences.size (); -}); -Clazz.overrideMethod (c$, "getWidth", -function () { -var maxLength = -1; -for (var i = 0; i < this.sequences.size (); i++) { -if (this.getSequenceAt (i).getLength () > maxLength) { -maxLength = this.getSequenceAt (i).getLength (); -}} -return maxLength; -}); -Clazz.overrideMethod (c$, "setGapCharacter", -function (gc) { -this.gapCharacter = gc; -{ -for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -seq.setSequence (seq.getSequenceAsString ().$replace ('.', gc).$replace ('-', gc).$replace (' ', gc)); -} -}}, "~S"); -Clazz.defineMethod (c$, "getGapCharacter", -function () { -return this.gapCharacter; -}); -Clazz.defineMethod (c$, "isAligned", -function () { -return this.isAligned (false); -}); -Clazz.defineMethod (c$, "isAligned", -function (includeHidden) { -var width = this.getWidth (); -if (this.hiddenSequences == null || this.hiddenSequences.getSize () == 0) { -includeHidden = true; -}for (var i = 0; i < this.sequences.size (); i++) { -if (includeHidden || !this.hiddenSequences.isHidden (this.getSequenceAt (i))) { -if (this.getSequenceAt (i).getLength () != width) { -return false; -}}} -return true; -}, "~B"); -Clazz.overrideMethod (c$, "deleteAllAnnotations", -function (includingAutoCalculated) { -var result = false; -for (var alan, $alan = 0, $$alan = this.getAlignmentAnnotation (); $alan < $$alan.length && ((alan = $$alan[$alan]) || true); $alan++) { -if (!alan.autoCalculated || includingAutoCalculated) { -this.deleteAnnotation (alan); -result = true; -}} -return result; -}, "~B"); -Clazz.defineMethod (c$, "deleteAnnotation", -function (aa) { -return this.deleteAnnotation (aa, true); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "deleteAnnotation", -function (aa, unhook) { -var aSize = 1; -if (this.annotations != null) { -aSize = this.annotations.length; -}if (aSize < 1) { -return false; -}var temp = new Array (aSize - 1); -var swap = false; -var tIndex = 0; -for (var i = 0; i < aSize; i++) { -if (this.annotations[i] === aa) { -swap = true; -continue; -}if (tIndex < temp.length) { -temp[tIndex++] = this.annotations[i]; -}} -if (swap) { -this.annotations = temp; -if (unhook) { -this.unhookAnnotation (aa); -}}return swap; -}, "jalview.datamodel.AlignmentAnnotation,~B"); -Clazz.defineMethod (c$, "unhookAnnotation", -($fz = function (aa) { -if (aa.sequenceRef != null) { -aa.sequenceRef.removeAlignmentAnnotation (aa); -}if (aa.groupRef != null) { -aa.groupRef = null; -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "addAnnotation", -function (aa) { -this.addAnnotation (aa, -1); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "addAnnotation", -function (aa, pos) { -if (aa.getRNAStruc () != null) { -this.$hasRNAStructure = true; -}var aSize = 1; -if (this.annotations != null) { -aSize = this.annotations.length + 1; -}var temp = new Array (aSize); -var i = 0; -if (pos == -1 || pos >= aSize) { -temp[aSize - 1] = aa; -} else { -temp[pos] = aa; -}if (aSize > 1) { -var p = 0; -for (i = 0; i < (aSize - 1); i++, p++) { -if (p == pos) { -p++; -}if (p < temp.length) { -temp[p] = this.annotations[i]; -}} -}this.annotations = temp; -}, "jalview.datamodel.AlignmentAnnotation,~N"); -Clazz.overrideMethod (c$, "setAnnotationIndex", -function (aa, index) { -if (aa == null || this.annotations == null || this.annotations.length - 1 < index) { -return; -}var aSize = this.annotations.length; -var temp = new Array (aSize); -temp[index] = aa; -for (var i = 0; i < aSize; i++) { -if (i == index) { -continue; -}if (i < index) { -temp[i] = this.annotations[i]; -} else { -temp[i] = this.annotations[i - 1]; -}} -this.annotations = temp; -}, "jalview.datamodel.AlignmentAnnotation,~N"); -Clazz.defineMethod (c$, "getAlignmentAnnotation", -function () { -return this.annotations; -}); -Clazz.overrideMethod (c$, "setNucleotide", -function (b) { -if (b) { -this.type = 1; -} else { -this.type = 0; -}}, "~B"); -Clazz.defineMethod (c$, "isNucleotide", -function () { -if (this.type == 1) { -return true; -} else { -return false; -}}); -Clazz.overrideMethod (c$, "hasRNAStructure", -function () { -return this.$hasRNAStructure; -}); -Clazz.overrideMethod (c$, "setDataset", -function (data) { -if (this.dataset == null && data == null) { -var seqs = new Array (this.getHeight ()); -var currentSeq; -for (var i = 0; i < this.getHeight (); i++) { -currentSeq = this.getSequenceAt (i); -if (currentSeq.getDatasetSequence () != null) { -seqs[i] = currentSeq.getDatasetSequence (); -} else { -seqs[i] = currentSeq.createDatasetSequence (); -}} -this.dataset = new jalview.datamodel.Alignment (seqs); -} else if (this.dataset == null && data != null) { -this.dataset = data; -for (var i = 0; i < this.getHeight (); i++) { -var currentSeq = this.getSequenceAt (i); -var dsq = currentSeq.getDatasetSequence (); -if (dsq == null) { -dsq = currentSeq.createDatasetSequence (); -this.dataset.addSequence (dsq); -} else { -while (dsq.getDatasetSequence () != null) { -dsq = dsq.getDatasetSequence (); -} -if (this.dataset.findIndex (dsq) == -1) { -this.dataset.addSequence (dsq); -}}} -}this.dataset.addAlignmentRef (); -}, "jalview.datamodel.Alignment"); -Clazz.defineMethod (c$, "addAlignmentRef", -($fz = function () { -this.alignmentRefs++; -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "getDataset", -function () { -return this.dataset; -}); -Clazz.overrideMethod (c$, "padGaps", -function () { -var modified = false; -var maxLength = -1; -var current; -for (var i = 0; i < this.sequences.size (); i++) { -current = this.getSequenceAt (i); -for (var j = current.getLength (); j > maxLength; j--) { -if (j > maxLength && !jalview.util.Comparison.isGap (current.getCharAt (j))) { -maxLength = j; -break; -}} -} -maxLength++; -var cLength; -for (var i = 0; i < this.sequences.size (); i++) { -current = this.getSequenceAt (i); -cLength = current.getLength (); -if (cLength < maxLength) { -current.insertCharAt (cLength, maxLength - cLength, this.gapCharacter); -modified = true; -} else if (current.getLength () > maxLength) { -current.deleteChars (maxLength, current.getLength ()); -}} -return modified; -}); -Clazz.overrideMethod (c$, "justify", -function (right) { -var modified = false; -var maxLength = -1; -var ends = Clazz.newIntArray (this.sequences.size () * 2, 0); -var current; -for (var i = 0; i < this.sequences.size (); i++) { -current = this.getSequenceAt (i); -ends[i * 2] = current.findIndex (current.getStart ()); -ends[i * 2 + 1] = current.findIndex (current.getStart () + current.getLength ()); -var hitres = false; -for (var j = 0, rs = 0, ssiz = current.getLength (); j < ssiz; j++) { -if (!jalview.util.Comparison.isGap (current.getCharAt (j))) { -if (!hitres) { -ends[i * 2] = j; -hitres = true; -} else { -ends[i * 2 + 1] = j; -if (j - ends[i * 2] > maxLength) { -maxLength = j - ends[i * 2]; -}}}} -} -maxLength++; -var cLength; -var extent; -var diff; -for (var i = 0; i < this.sequences.size (); i++) { -current = this.getSequenceAt (i); -cLength = 1 + ends[i * 2 + 1] - ends[i * 2]; -diff = maxLength - cLength; -extent = current.getLength (); -if (right) { -if (extent > ends[i * 2 + 1]) { -current.deleteChars (ends[i * 2 + 1] + 1, extent); -modified = true; -}if (ends[i * 2] > diff) { -current.deleteChars (0, ends[i * 2] - diff); -modified = true; -} else { -if (ends[i * 2] < diff) { -current.insertCharAt (0, diff - ends[i * 2], this.gapCharacter); -modified = true; -}}} else { -if (ends[i * 2] > 0) { -current.deleteChars (0, ends[i * 2]); -modified = true; -ends[i * 2 + 1] -= ends[i * 2]; -extent -= ends[i * 2]; -}if (extent > maxLength) { -current.deleteChars (maxLength + 1, extent); -modified = true; -} else { -if (extent < maxLength) { -current.insertCharAt (extent, maxLength - extent, this.gapCharacter); -modified = true; -}}}} -return modified; -}, "~B"); -Clazz.defineMethod (c$, "getHiddenSequences", -function () { -return this.hiddenSequences; -}); -Clazz.overrideMethod (c$, "getCompactAlignment", -function () { -{ -var alseqs = new Array (this.sequences.size ()); -var i = 0; -for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -alseqs[i++] = new jalview.datamodel.SeqCigar (seq); -} -var cal = new jalview.datamodel.CigarArray (alseqs); -cal.addOperation ('M', this.getWidth ()); -return cal; -}}); -Clazz.overrideMethod (c$, "setProperty", -function (key, value) { -if (this.alignmentProperties == null) { -this.alignmentProperties = new java.util.Hashtable (); -}this.alignmentProperties.put (key, value); -}, "~O,~O"); -Clazz.defineMethod (c$, "getProperty", -function (key) { -if (this.alignmentProperties != null) { -return this.alignmentProperties.get (key); -} else { -return null; -}}, "~O"); -Clazz.defineMethod (c$, "getProperties", -function () { -return this.alignmentProperties; -}); -Clazz.overrideMethod (c$, "addCodonFrame", -function (codons) { -if (codons != null) { -this.codonFrameList.add (codons); -}}, "jalview.datamodel.AlignedCodonFrame"); -Clazz.overrideMethod (c$, "getCodonFrame", -function (seq) { -if (seq == null) { -return null; -}var cframes = new java.util.ArrayList (); -for (var acf, $acf = this.codonFrameList.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -if (acf.involvesSequence (seq)) { -cframes.add (acf); -}} -return cframes; -}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "setCodonFrames", -function (acfs) { -this.codonFrameList = acfs; -}, "java.util.Set"); -Clazz.defineMethod (c$, "getCodonFrames", -function () { -return this.codonFrameList; -}); -Clazz.overrideMethod (c$, "removeCodonFrame", -function (codons) { -if (codons == null || this.codonFrameList == null) { -return false; -}return this.codonFrameList.remove (codons); -}, "jalview.datamodel.AlignedCodonFrame"); -Clazz.overrideMethod (c$, "append", -function (toappend) { -if (toappend === this) { -System.err.println ("Self append may cause a deadlock."); -}var samegap = toappend.getGapCharacter () == this.getGapCharacter (); -var oldc = toappend.getGapCharacter (); -var hashidden = toappend.getHiddenSequences () != null && toappend.getHiddenSequences ().hiddenSequences != null; -var sqs = (hashidden) ? toappend.getHiddenSequences ().getFullAlignment ().getSequences () : toappend.getSequences (); -if (sqs != null) { -{ -for (var addedsq, $addedsq = sqs.iterator (); $addedsq.hasNext () && ((addedsq = $addedsq.next ()) || true);) { -if (!samegap) { -var oldseq = addedsq.getSequence (); -for (var c = 0; c < oldseq.length; c++) { -if (oldseq[c] == oldc) { -oldseq[c] = this.gapCharacter; -}} -}this.addSequence (addedsq); -} -}}var alan = toappend.getAlignmentAnnotation (); -for (var a = 0; alan != null && a < alan.length; a++) { -this.addAnnotation (alan[a]); -} -this.codonFrameList.addAll (toappend.getCodonFrames ()); -var sg = toappend.getGroups (); -if (sg != null) { -for (var _sg, $_sg = sg.iterator (); $_sg.hasNext () && ((_sg = $_sg.next ()) || true);) { -this.addGroup (_sg); -} -}if (toappend.getHiddenSequences () != null) { -var hs = toappend.getHiddenSequences (); -if (this.hiddenSequences == null) { -this.hiddenSequences = new jalview.datamodel.HiddenSequences (this); -}if (hs.hiddenSequences != null) { -for (var s = 0; s < hs.hiddenSequences.length; s++) { -if (hs.hiddenSequences[s] != null) { -this.hiddenSequences.hideSequence (hs.hiddenSequences[s]); -}} -}}if (toappend.getProperties () != null) { -var key = toappend.getProperties ().keys (); -while (key.hasMoreElements ()) { -var k = key.nextElement (); -var ourval = this.getProperty (k); -var toapprop = toappend.getProperty (k); -if (ourval != null) { -if (ourval.getClass ().equals (toapprop.getClass ()) && !ourval.equals (toapprop)) { -if (Clazz.instanceOf (ourval, String)) { -this.setProperty (k, (ourval) + "; " + (toapprop)); -} else { -if (Clazz.instanceOf (ourval, java.util.Vector)) { -var theirv = (toapprop).elements (); -while (theirv.hasMoreElements ()) { -(ourval).addElement (theirv); -} -}}}} else { -this.setProperty (k, toapprop); -}} -}}, "jalview.datamodel.AlignmentI"); -Clazz.overrideMethod (c$, "findOrCreateAnnotation", -function (name, calcId, autoCalc, seqRef, groupRef) { -if (this.annotations != null) { -for (var annot, $annot = 0, $$annot = this.getAlignmentAnnotation (); $annot < $$annot.length && ((annot = $$annot[$annot]) || true); $annot++) { -if (annot.autoCalculated == autoCalc && (name.equals (annot.label)) && (calcId == null || annot.getCalcId ().equals (calcId)) && annot.sequenceRef === seqRef && annot.groupRef === groupRef) { -return annot; -}} -}var annot = new jalview.datamodel.AlignmentAnnotation (name, name, new Array (1), 0, 0, 1); -annot.hasText = false; -annot.setCalcId ( String.instantialize (calcId)); -annot.autoCalculated = autoCalc; -if (seqRef != null) { -annot.setSequenceRef (seqRef); -}annot.groupRef = groupRef; -this.addAnnotation (annot); -return annot; -}, "~S,~S,~B,jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); -Clazz.overrideMethod (c$, "findAnnotation", -function (calcId) { -var aa = new java.util.ArrayList (); -for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) { -if (a.getCalcId () === calcId || (a.getCalcId () != null && calcId != null && a.getCalcId ().equals (calcId))) { -aa.add (a); -}} -return aa; -}, "~S"); -Clazz.overrideMethod (c$, "findAnnotations", -function (seq, calcId, label) { -var aa = new java.util.ArrayList (); -for (var ann, $ann = 0, $$ann = this.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { -if (ann.getCalcId () != null && ann.getCalcId ().equals (calcId) && ann.sequenceRef != null && ann.sequenceRef === seq && ann.label != null && ann.label.equals (label)) { -aa.add (ann); -}} -return aa; -}, "jalview.datamodel.SequenceI,~S,~S"); -Clazz.overrideMethod (c$, "moveSelectedSequencesByOne", -function (sg, map, up) { -{ -if (up) { -for (var i = 1, iSize = this.sequences.size (); i < iSize; i++) { -var seq = this.sequences.get (i); -if (!sg.getSequences (map).contains (seq)) { -continue; -}var temp = this.sequences.get (i - 1); -if (sg.getSequences (null).contains (temp)) { -continue; -}this.sequences.set (i, temp); -this.sequences.set (i - 1, seq); -} -} else { -for (var i = this.sequences.size () - 2; i > -1; i--) { -var seq = this.sequences.get (i); -if (!sg.getSequences (map).contains (seq)) { -continue; -}var temp = this.sequences.get (i + 1); -if (sg.getSequences (map).contains (temp)) { -continue; -}this.sequences.set (i, temp); -this.sequences.set (i + 1, seq); -} -}}}, "jalview.datamodel.SequenceGroup,java.util.Map,~B"); -Clazz.overrideMethod (c$, "validateAnnotation", -function (alignmentAnnotation) { -alignmentAnnotation.validateRangeAndDisplay (); -if (this.isNucleotide () && alignmentAnnotation.isValidStruc ()) { -this.$hasRNAStructure = true; -}}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.overrideMethod (c$, "getSeqrep", -function () { -return this.seqrep; -}); -Clazz.overrideMethod (c$, "setSeqrep", -function (seqrep) { -this.seqrep = seqrep; -}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "hasSeqrep", -function () { -return this.seqrep != null; -}); -Clazz.overrideMethod (c$, "getEndRes", -function () { -return this.getWidth () - 1; -}); -Clazz.overrideMethod (c$, "getStartRes", -function () { -return 0; -}); -Clazz.overrideMethod (c$, "getContext", -function () { -return this.dataset; -}); -Clazz.defineMethod (c$, "alignAs", -function (al) { -return this.alignAs (al, false, true); -}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "alignAs", -function (al, preserveMappedGaps, preserveUnmappedGaps) { -var count = 0; -var thisIsNucleotide = this.isNucleotide (); -var thatIsProtein = !al.isNucleotide (); -if (!thatIsProtein && !thisIsNucleotide) { -return jalview.analysis.AlignmentUtils.alignProteinAsDna (this, al); -}var thisGapChar = this.getGapCharacter (); -var gap = thisIsNucleotide && thatIsProtein ? String.valueOf ( Clazz.newCharArray (-1, [thisGapChar, thisGapChar, thisGapChar])) : String.valueOf (thisGapChar); -for (var alignTo, $alignTo = this.getSequences ().iterator (); $alignTo.hasNext () && ((alignTo = $alignTo.next ()) || true);) { -count += jalview.analysis.AlignmentUtils.alignSequenceAs (alignTo, al, gap, preserveMappedGaps, preserveUnmappedGaps) ? 1 : 0; -} -return count; -}, "jalview.datamodel.AlignmentI,~B,~B"); -Clazz.overrideMethod (c$, "getSequenceNames", -function () { -var names = new java.util.HashSet (); -for (var seq, $seq = this.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -names.add (seq.getName ()); -} -return names; -}); -Clazz.overrideMethod (c$, "toString", -function () { -var seq = this.getSequencesArray (); -{ -return "" + JSON.stringify(seq); -}}); -Clazz.defineStatics (c$, -"PROTEIN", 0, -"NUCLEOTIDE", 1); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.AlignmentI", "$.HiddenSequences", "java.util.ArrayList", "$.Collections", "$.LinkedHashSet"], "jalview.datamodel.Alignment", ["jalview.analysis.AlignmentUtils", "jalview.datamodel.AlignmentAnnotation", "$.CigarArray", "$.SeqCigar", "$.Sequence", "jalview.util.Comparison", "$.MessageManager", "java.lang.Error", "java.util.HashSet", "$.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.dataset = null; +this.sequences = null; +this.groups = null; +this.gapCharacter = '-'; +this.type = 1; +this.$hasRNAStructure = false; +this.annotations = null; +this.hiddenSequences = null; +this.alignmentProperties = null; +this.codonFrameList = null; +this.alignmentRefs = 0; +this.seqrep = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "Alignment", null, jalview.datamodel.AlignmentI); +Clazz.prepareFields (c$, function () { +this.groups = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); +this.hiddenSequences = new jalview.datamodel.HiddenSequences (this); +this.codonFrameList = new java.util.LinkedHashSet (); +}); +Clazz.defineMethod (c$, "initAlignment", +($fz = function (seqs) { +var i = 0; +if (jalview.util.Comparison.isNucleotide (seqs)) { +this.type = 1; +} else { +this.type = 0; +}this.sequences = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); +for (i = 0; i < seqs.length; i++) { +this.sequences.add (seqs[i]); +} +}, $fz.isPrivate = true, $fz), "~A"); +Clazz.makeConstructor (c$, +function (al) { +var seqs = al.getSequencesArray (); +for (var i = 0; i < seqs.length; i++) { +seqs[i] = new jalview.datamodel.Sequence (seqs[i]); +} +this.codonFrameList = (al).codonFrameList; +this.initAlignment (seqs); +}, "jalview.datamodel.AlignmentI"); +Clazz.makeConstructor (c$, +function (seqs) { +this.initAlignment (seqs); +}, "~A"); +c$.createAlignment = Clazz.defineMethod (c$, "createAlignment", +function (compactAlignment) { +throw new Error (jalview.util.MessageManager.getString ("error.alignment_cigararray_not_implemented")); +}, "jalview.datamodel.CigarArray"); +Clazz.defineMethod (c$, "getSequences", +function () { +return this.sequences; +}); +Clazz.defineMethod (c$, "getSequences", +function (hiddenReps) { +return this.sequences; +}, "java.util.Map"); +Clazz.defineMethod (c$, "getSequencesArray", +function () { +if (this.sequences == null) { +return null; +}{ +return this.sequences.toArray ( new Array (this.sequences.size ())); +}}); +Clazz.overrideMethod (c$, "getSequencesByName", +function () { +return jalview.analysis.AlignmentUtils.getSequencesByName (this); +}); +Clazz.overrideMethod (c$, "getSequenceAt", +function (i) { +{ +if (i > -1 && i < this.sequences.size ()) { +return this.sequences.get (i); +}}return null; +}, "~N"); +Clazz.overrideMethod (c$, "addSequence", +function (snew) { +if (this.dataset != null) { +if (snew.getDatasetSequence () != null) { +this.getDataset ().addSequence (snew.getDatasetSequence ()); +} else { +var adding = snew.deriveSequence (); +this.getDataset ().addSequence (adding.getDatasetSequence ()); +snew = adding; +}}if (this.sequences == null) { +this.initAlignment ( Clazz.newArray (-1, [snew])); +} else { +{ +this.sequences.add (snew); +}}if (this.hiddenSequences != null) { +this.hiddenSequences.adjustHeightSequenceAdded (); +}}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "setSequenceAt", +function (i, snew) { +{ +this.deleteSequence (i); +this.sequences.set (i, snew); +}}, "~N,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getGroups", +function () { +return this.groups; +}); +Clazz.overrideMethod (c$, "finalize", +function () { +if (this.getDataset () != null) { +this.getDataset ().removeAlignmentRef (); +}this.dataset = null; +this.sequences = null; +this.groups = null; +this.annotations = null; +this.hiddenSequences = null; +}); +Clazz.defineMethod (c$, "removeAlignmentRef", +($fz = function () { +if (--this.alignmentRefs == 0) { +this.finalize (); +}}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "deleteSequence", +function (s) { +this.deleteSequence (this.findIndex (s)); +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "deleteSequence", +function (i) { +if (i > -1 && i < this.getHeight ()) { +{ +this.sequences.remove (i); +this.hiddenSequences.adjustHeightSequenceDeleted (i); +}}}, "~N"); +Clazz.overrideMethod (c$, "findGroup", +function (s) { +{ +for (var i = 0; i < this.groups.size (); i++) { +var sg = this.groups.get (i); +if (sg.getSequences (null).contains (s)) { +return sg; +}} +}return null; +}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "findAllGroups", +function (s) { +var temp = new java.util.ArrayList (); +{ +var gSize = this.groups.size (); +for (var i = 0; i < gSize; i++) { +var sg = this.groups.get (i); +if (sg == null || sg.getSequences () == null) { +this.deleteGroup (sg); +gSize--; +continue; +}if (sg.getSequences ().contains (s)) { +temp.add (sg); +}} +}var ret = new Array (temp.size ()); +return temp.toArray (ret); +}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "addGroup", +function (sg) { +{ +if (!this.groups.contains (sg)) { +if (this.hiddenSequences.getSize () > 0) { +var i; +var iSize = sg.getSize (); +for (i = 0; i < iSize; i++) { +if (!this.sequences.contains (sg.getSequenceAt (i))) { +sg.deleteSequence (sg.getSequenceAt (i), false); +iSize--; +i--; +}} +if (sg.getSize () < 1) { +return; +}}sg.setContext (this); +this.groups.add (sg); +}}}, "jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "removeAnnotationForGroup", +($fz = function (gp) { +if (this.annotations == null || this.annotations.length == 0) { +return; +}var t; +var todelete = new Array (this.annotations.length); +var tokeep = new Array (this.annotations.length); +var i; +var p; +var k; +if (gp == null) { +for (i = 0, p = 0, k = 0; i < this.annotations.length; i++) { +if (this.annotations[i].groupRef != null) { +todelete[p++] = this.annotations[i]; +} else { +tokeep[k++] = this.annotations[i]; +}} +} else { +for (i = 0, p = 0, k = 0; i < this.annotations.length; i++) { +if (this.annotations[i].groupRef === gp) { +todelete[p++] = this.annotations[i]; +} else { +tokeep[k++] = this.annotations[i]; +}} +}if (p > 0) { +for (i = 0; i < p; i++) { +this.unhookAnnotation (todelete[i]); +todelete[i] = null; +} +t = new Array (k); +for (i = 0; i < k; i++) { +t[i] = tokeep[i]; +} +this.annotations = t; +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceGroup"); +Clazz.overrideMethod (c$, "deleteAllGroups", +function () { +{ +if (this.annotations != null) { +this.removeAnnotationForGroup (null); +}for (var sg, $sg = this.groups.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +sg.setContext (null); +} +this.groups.clear (); +}}); +Clazz.overrideMethod (c$, "deleteGroup", +function (g) { +{ +if (this.groups.contains (g)) { +this.removeAnnotationForGroup (g); +this.groups.remove (g); +g.setContext (null); +}}}, "jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "findName", +function (name) { +return this.findName (name, false); +}, "~S"); +Clazz.defineMethod (c$, "findName", +function (token, b) { +return this.findName (null, token, b); +}, "~S,~B"); +Clazz.defineMethod (c$, "findName", +function (startAfter, token, b) { +var i = 0; +var sq = null; +var sqname = null; +if (startAfter != null) { +var matched = false; +while (i < this.sequences.size ()) { +if (this.getSequenceAt (i++) === startAfter) { +matched = true; +break; +}} +if (!matched) { +i = 0; +}}while (i < this.sequences.size ()) { +sq = this.getSequenceAt (i); +sqname = sq.getName (); +if (sqname.equals (token) || (b && (sqname.equalsIgnoreCase (token)))) { +return this.getSequenceAt (i); +}i++; +} +return null; +}, "jalview.datamodel.SequenceI,~S,~B"); +Clazz.overrideMethod (c$, "findSequenceMatch", +function (name) { +var matches = new java.util.Vector (); +var i = 0; +while (i < this.sequences.size ()) { +if (this.getSequenceAt (i).getName ().equals (name)) { +matches.addElement (this.getSequenceAt (i)); +}i++; +} +var result = new Array (matches.size ()); +for (i = 0; i < result.length; i++) { +result[i] = matches.elementAt (i); +} +return result; +}, "~S"); +Clazz.defineMethod (c$, "findIndex", +function (s) { +var i = 0; +while (i < this.sequences.size ()) { +if (s === this.getSequenceAt (i)) { +return i; +}i++; +} +return -1; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "findIndex", +function (results) { +var i = 0; +while (i < this.sequences.size ()) { +if (results.involvesSequence (this.getSequenceAt (i))) { +return i; +}i++; +} +return -1; +}, "jalview.datamodel.SearchResults"); +Clazz.overrideMethod (c$, "getHeight", +function () { +return this.sequences.size (); +}); +Clazz.overrideMethod (c$, "getWidth", +function () { +var maxLength = -1; +for (var i = 0; i < this.sequences.size (); i++) { +if (this.getSequenceAt (i).getLength () > maxLength) { +maxLength = this.getSequenceAt (i).getLength (); +}} +return maxLength; +}); +Clazz.overrideMethod (c$, "setGapCharacter", +function (gc) { +this.gapCharacter = gc; +{ +for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +seq.setSequence (seq.getSequenceAsString ().$replace ('.', gc).$replace ('-', gc).$replace (' ', gc)); +} +}}, "~S"); +Clazz.defineMethod (c$, "getGapCharacter", +function () { +return this.gapCharacter; +}); +Clazz.defineMethod (c$, "isAligned", +function () { +return this.isAligned (false); +}); +Clazz.defineMethod (c$, "isAligned", +function (includeHidden) { +var width = this.getWidth (); +if (this.hiddenSequences == null || this.hiddenSequences.getSize () == 0) { +includeHidden = true; +}for (var i = 0; i < this.sequences.size (); i++) { +if (includeHidden || !this.hiddenSequences.isHidden (this.getSequenceAt (i))) { +if (this.getSequenceAt (i).getLength () != width) { +return false; +}}} +return true; +}, "~B"); +Clazz.overrideMethod (c$, "deleteAllAnnotations", +function (includingAutoCalculated) { +var result = false; +for (var alan, $alan = 0, $$alan = this.getAlignmentAnnotation (); $alan < $$alan.length && ((alan = $$alan[$alan]) || true); $alan++) { +if (!alan.autoCalculated || includingAutoCalculated) { +this.deleteAnnotation (alan); +result = true; +}} +return result; +}, "~B"); +Clazz.defineMethod (c$, "deleteAnnotation", +function (aa) { +return this.deleteAnnotation (aa, true); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "deleteAnnotation", +function (aa, unhook) { +var aSize = 1; +if (this.annotations != null) { +aSize = this.annotations.length; +}if (aSize < 1) { +return false; +}var temp = new Array (aSize - 1); +var swap = false; +var tIndex = 0; +for (var i = 0; i < aSize; i++) { +if (this.annotations[i] === aa) { +swap = true; +continue; +}if (tIndex < temp.length) { +temp[tIndex++] = this.annotations[i]; +}} +if (swap) { +this.annotations = temp; +if (unhook) { +this.unhookAnnotation (aa); +}}return swap; +}, "jalview.datamodel.AlignmentAnnotation,~B"); +Clazz.defineMethod (c$, "unhookAnnotation", +($fz = function (aa) { +if (aa.sequenceRef != null) { +aa.sequenceRef.removeAlignmentAnnotation (aa); +}if (aa.groupRef != null) { +aa.groupRef = null; +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "addAnnotation", +function (aa) { +this.addAnnotation (aa, -1); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "addAnnotation", +function (aa, pos) { +if (aa.getRNAStruc () != null) { +this.$hasRNAStructure = true; +}var aSize = 1; +if (this.annotations != null) { +aSize = this.annotations.length + 1; +}var temp = new Array (aSize); +var i = 0; +if (pos == -1 || pos >= aSize) { +temp[aSize - 1] = aa; +} else { +temp[pos] = aa; +}if (aSize > 1) { +var p = 0; +for (i = 0; i < (aSize - 1); i++, p++) { +if (p == pos) { +p++; +}if (p < temp.length) { +temp[p] = this.annotations[i]; +}} +}this.annotations = temp; +}, "jalview.datamodel.AlignmentAnnotation,~N"); +Clazz.overrideMethod (c$, "setAnnotationIndex", +function (aa, index) { +if (aa == null || this.annotations == null || this.annotations.length - 1 < index) { +return; +}var aSize = this.annotations.length; +var temp = new Array (aSize); +temp[index] = aa; +for (var i = 0; i < aSize; i++) { +if (i == index) { +continue; +}if (i < index) { +temp[i] = this.annotations[i]; +} else { +temp[i] = this.annotations[i - 1]; +}} +this.annotations = temp; +}, "jalview.datamodel.AlignmentAnnotation,~N"); +Clazz.defineMethod (c$, "getAlignmentAnnotation", +function () { +return this.annotations; +}); +Clazz.overrideMethod (c$, "setNucleotide", +function (b) { +if (b) { +this.type = 1; +} else { +this.type = 0; +}}, "~B"); +Clazz.defineMethod (c$, "isNucleotide", +function () { +if (this.type == 1) { +return true; +} else { +return false; +}}); +Clazz.overrideMethod (c$, "hasRNAStructure", +function () { +return this.$hasRNAStructure; +}); +Clazz.overrideMethod (c$, "setDataset", +function (data) { +if (this.dataset == null && data == null) { +var seqs = new Array (this.getHeight ()); +var currentSeq; +for (var i = 0; i < this.getHeight (); i++) { +currentSeq = this.getSequenceAt (i); +if (currentSeq.getDatasetSequence () != null) { +seqs[i] = currentSeq.getDatasetSequence (); +} else { +seqs[i] = currentSeq.createDatasetSequence (); +}} +this.dataset = new jalview.datamodel.Alignment (seqs); +} else if (this.dataset == null && data != null) { +this.dataset = data; +for (var i = 0; i < this.getHeight (); i++) { +var currentSeq = this.getSequenceAt (i); +var dsq = currentSeq.getDatasetSequence (); +if (dsq == null) { +dsq = currentSeq.createDatasetSequence (); +this.dataset.addSequence (dsq); +} else { +while (dsq.getDatasetSequence () != null) { +dsq = dsq.getDatasetSequence (); +} +if (this.dataset.findIndex (dsq) == -1) { +this.dataset.addSequence (dsq); +}}} +}this.dataset.addAlignmentRef (); +}, "jalview.datamodel.Alignment"); +Clazz.defineMethod (c$, "addAlignmentRef", +($fz = function () { +this.alignmentRefs++; +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "getDataset", +function () { +return this.dataset; +}); +Clazz.overrideMethod (c$, "padGaps", +function () { +var modified = false; +var maxLength = -1; +var current; +for (var i = 0; i < this.sequences.size (); i++) { +current = this.getSequenceAt (i); +for (var j = current.getLength (); j > maxLength; j--) { +if (j > maxLength && !jalview.util.Comparison.isGap (current.getCharAt (j))) { +maxLength = j; +break; +}} +} +maxLength++; +var cLength; +for (var i = 0; i < this.sequences.size (); i++) { +current = this.getSequenceAt (i); +cLength = current.getLength (); +if (cLength < maxLength) { +current.insertCharAt (cLength, maxLength - cLength, this.gapCharacter); +modified = true; +} else if (current.getLength () > maxLength) { +current.deleteChars (maxLength, current.getLength ()); +}} +return modified; +}); +Clazz.overrideMethod (c$, "justify", +function (right) { +var modified = false; +var maxLength = -1; +var ends = Clazz.newIntArray (this.sequences.size () * 2, 0); +var current; +for (var i = 0; i < this.sequences.size (); i++) { +current = this.getSequenceAt (i); +ends[i * 2] = current.findIndex (current.getStart ()); +ends[i * 2 + 1] = current.findIndex (current.getStart () + current.getLength ()); +var hitres = false; +for (var j = 0, rs = 0, ssiz = current.getLength (); j < ssiz; j++) { +if (!jalview.util.Comparison.isGap (current.getCharAt (j))) { +if (!hitres) { +ends[i * 2] = j; +hitres = true; +} else { +ends[i * 2 + 1] = j; +if (j - ends[i * 2] > maxLength) { +maxLength = j - ends[i * 2]; +}}}} +} +maxLength++; +var cLength; +var extent; +var diff; +for (var i = 0; i < this.sequences.size (); i++) { +current = this.getSequenceAt (i); +cLength = 1 + ends[i * 2 + 1] - ends[i * 2]; +diff = maxLength - cLength; +extent = current.getLength (); +if (right) { +if (extent > ends[i * 2 + 1]) { +current.deleteChars (ends[i * 2 + 1] + 1, extent); +modified = true; +}if (ends[i * 2] > diff) { +current.deleteChars (0, ends[i * 2] - diff); +modified = true; +} else { +if (ends[i * 2] < diff) { +current.insertCharAt (0, diff - ends[i * 2], this.gapCharacter); +modified = true; +}}} else { +if (ends[i * 2] > 0) { +current.deleteChars (0, ends[i * 2]); +modified = true; +ends[i * 2 + 1] -= ends[i * 2]; +extent -= ends[i * 2]; +}if (extent > maxLength) { +current.deleteChars (maxLength + 1, extent); +modified = true; +} else { +if (extent < maxLength) { +current.insertCharAt (extent, maxLength - extent, this.gapCharacter); +modified = true; +}}}} +return modified; +}, "~B"); +Clazz.defineMethod (c$, "getHiddenSequences", +function () { +return this.hiddenSequences; +}); +Clazz.overrideMethod (c$, "getCompactAlignment", +function () { +{ +var alseqs = new Array (this.sequences.size ()); +var i = 0; +for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +alseqs[i++] = new jalview.datamodel.SeqCigar (seq); +} +var cal = new jalview.datamodel.CigarArray (alseqs); +cal.addOperation ('M', this.getWidth ()); +return cal; +}}); +Clazz.overrideMethod (c$, "setProperty", +function (key, value) { +if (this.alignmentProperties == null) { +this.alignmentProperties = new java.util.Hashtable (); +}this.alignmentProperties.put (key, value); +}, "~O,~O"); +Clazz.defineMethod (c$, "getProperty", +function (key) { +if (this.alignmentProperties != null) { +return this.alignmentProperties.get (key); +} else { +return null; +}}, "~O"); +Clazz.defineMethod (c$, "getProperties", +function () { +return this.alignmentProperties; +}); +Clazz.overrideMethod (c$, "addCodonFrame", +function (codons) { +if (codons != null) { +this.codonFrameList.add (codons); +}}, "jalview.datamodel.AlignedCodonFrame"); +Clazz.overrideMethod (c$, "getCodonFrame", +function (seq) { +if (seq == null) { +return null; +}var cframes = new java.util.ArrayList (); +for (var acf, $acf = this.codonFrameList.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +if (acf.involvesSequence (seq)) { +cframes.add (acf); +}} +return cframes; +}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "setCodonFrames", +function (acfs) { +this.codonFrameList = acfs; +}, "java.util.Set"); +Clazz.defineMethod (c$, "getCodonFrames", +function () { +return this.codonFrameList; +}); +Clazz.overrideMethod (c$, "removeCodonFrame", +function (codons) { +if (codons == null || this.codonFrameList == null) { +return false; +}return this.codonFrameList.remove (codons); +}, "jalview.datamodel.AlignedCodonFrame"); +Clazz.overrideMethod (c$, "append", +function (toappend) { +if (toappend === this) { +System.err.println ("Self append may cause a deadlock."); +}var samegap = toappend.getGapCharacter () == this.getGapCharacter (); +var oldc = toappend.getGapCharacter (); +var hashidden = toappend.getHiddenSequences () != null && toappend.getHiddenSequences ().hiddenSequences != null; +var sqs = (hashidden) ? toappend.getHiddenSequences ().getFullAlignment ().getSequences () : toappend.getSequences (); +if (sqs != null) { +{ +for (var addedsq, $addedsq = sqs.iterator (); $addedsq.hasNext () && ((addedsq = $addedsq.next ()) || true);) { +if (!samegap) { +var oldseq = addedsq.getSequence (); +for (var c = 0; c < oldseq.length; c++) { +if (oldseq[c] == oldc) { +oldseq[c] = this.gapCharacter; +}} +}this.addSequence (addedsq); +} +}}var alan = toappend.getAlignmentAnnotation (); +for (var a = 0; alan != null && a < alan.length; a++) { +this.addAnnotation (alan[a]); +} +this.codonFrameList.addAll (toappend.getCodonFrames ()); +var sg = toappend.getGroups (); +if (sg != null) { +for (var _sg, $_sg = sg.iterator (); $_sg.hasNext () && ((_sg = $_sg.next ()) || true);) { +this.addGroup (_sg); +} +}if (toappend.getHiddenSequences () != null) { +var hs = toappend.getHiddenSequences (); +if (this.hiddenSequences == null) { +this.hiddenSequences = new jalview.datamodel.HiddenSequences (this); +}if (hs.hiddenSequences != null) { +for (var s = 0; s < hs.hiddenSequences.length; s++) { +if (hs.hiddenSequences[s] != null) { +this.hiddenSequences.hideSequence (hs.hiddenSequences[s]); +}} +}}if (toappend.getProperties () != null) { +var key = toappend.getProperties ().keys (); +while (key.hasMoreElements ()) { +var k = key.nextElement (); +var ourval = this.getProperty (k); +var toapprop = toappend.getProperty (k); +if (ourval != null) { +if (ourval.getClass ().equals (toapprop.getClass ()) && !ourval.equals (toapprop)) { +if (Clazz.instanceOf (ourval, String)) { +this.setProperty (k, (ourval) + "; " + (toapprop)); +} else { +if (Clazz.instanceOf (ourval, java.util.Vector)) { +var theirv = (toapprop).elements (); +while (theirv.hasMoreElements ()) { +(ourval).addElement (theirv); +} +}}}} else { +this.setProperty (k, toapprop); +}} +}}, "jalview.datamodel.AlignmentI"); +Clazz.overrideMethod (c$, "findOrCreateAnnotation", +function (name, calcId, autoCalc, seqRef, groupRef) { +if (this.annotations != null) { +for (var annot, $annot = 0, $$annot = this.getAlignmentAnnotation (); $annot < $$annot.length && ((annot = $$annot[$annot]) || true); $annot++) { +if (annot.autoCalculated == autoCalc && (name.equals (annot.label)) && (calcId == null || annot.getCalcId ().equals (calcId)) && annot.sequenceRef === seqRef && annot.groupRef === groupRef) { +return annot; +}} +}var annot = new jalview.datamodel.AlignmentAnnotation (name, name, new Array (1), 0, 0, 1); +annot.hasText = false; +annot.setCalcId ( String.instantialize (calcId)); +annot.autoCalculated = autoCalc; +if (seqRef != null) { +annot.setSequenceRef (seqRef); +}annot.groupRef = groupRef; +this.addAnnotation (annot); +return annot; +}, "~S,~S,~B,jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); +Clazz.overrideMethod (c$, "findAnnotation", +function (calcId) { +var aa = new java.util.ArrayList (); +for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) { +if (a.getCalcId () === calcId || (a.getCalcId () != null && calcId != null && a.getCalcId ().equals (calcId))) { +aa.add (a); +}} +return aa; +}, "~S"); +Clazz.overrideMethod (c$, "findAnnotations", +function (seq, calcId, label) { +var aa = new java.util.ArrayList (); +for (var ann, $ann = 0, $$ann = this.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { +if (ann.getCalcId () != null && ann.getCalcId ().equals (calcId) && ann.sequenceRef != null && ann.sequenceRef === seq && ann.label != null && ann.label.equals (label)) { +aa.add (ann); +}} +return aa; +}, "jalview.datamodel.SequenceI,~S,~S"); +Clazz.overrideMethod (c$, "moveSelectedSequencesByOne", +function (sg, map, up) { +{ +if (up) { +for (var i = 1, iSize = this.sequences.size (); i < iSize; i++) { +var seq = this.sequences.get (i); +if (!sg.getSequences (map).contains (seq)) { +continue; +}var temp = this.sequences.get (i - 1); +if (sg.getSequences (null).contains (temp)) { +continue; +}this.sequences.set (i, temp); +this.sequences.set (i - 1, seq); +} +} else { +for (var i = this.sequences.size () - 2; i > -1; i--) { +var seq = this.sequences.get (i); +if (!sg.getSequences (map).contains (seq)) { +continue; +}var temp = this.sequences.get (i + 1); +if (sg.getSequences (map).contains (temp)) { +continue; +}this.sequences.set (i, temp); +this.sequences.set (i + 1, seq); +} +}}}, "jalview.datamodel.SequenceGroup,java.util.Map,~B"); +Clazz.overrideMethod (c$, "validateAnnotation", +function (alignmentAnnotation) { +alignmentAnnotation.validateRangeAndDisplay (); +if (this.isNucleotide () && alignmentAnnotation.isValidStruc ()) { +this.$hasRNAStructure = true; +}}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.overrideMethod (c$, "getSeqrep", +function () { +return this.seqrep; +}); +Clazz.overrideMethod (c$, "setSeqrep", +function (seqrep) { +this.seqrep = seqrep; +}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "hasSeqrep", +function () { +return this.seqrep != null; +}); +Clazz.overrideMethod (c$, "getEndRes", +function () { +return this.getWidth () - 1; +}); +Clazz.overrideMethod (c$, "getStartRes", +function () { +return 0; +}); +Clazz.overrideMethod (c$, "getContext", +function () { +return this.dataset; +}); +Clazz.defineMethod (c$, "alignAs", +function (al) { +return this.alignAs (al, false, true); +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "alignAs", +function (al, preserveMappedGaps, preserveUnmappedGaps) { +var count = 0; +var thisIsNucleotide = this.isNucleotide (); +var thatIsProtein = !al.isNucleotide (); +if (!thatIsProtein && !thisIsNucleotide) { +return jalview.analysis.AlignmentUtils.alignProteinAsDna (this, al); +}var thisGapChar = this.getGapCharacter (); +var gap = thisIsNucleotide && thatIsProtein ? String.valueOf ( Clazz.newCharArray (-1, [thisGapChar, thisGapChar, thisGapChar])) : String.valueOf (thisGapChar); +for (var alignTo, $alignTo = this.getSequences ().iterator (); $alignTo.hasNext () && ((alignTo = $alignTo.next ()) || true);) { +count += jalview.analysis.AlignmentUtils.alignSequenceAs (alignTo, al, gap, preserveMappedGaps, preserveUnmappedGaps) ? 1 : 0; +} +return count; +}, "jalview.datamodel.AlignmentI,~B,~B"); +Clazz.overrideMethod (c$, "getSequenceNames", +function () { +var names = new java.util.HashSet (); +for (var seq, $seq = this.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +names.add (seq.getName ()); +} +return names; +}); +Clazz.overrideMethod (c$, "toString", +function () { +var seq = this.getSequencesArray (); +{ +return "" + JSON.stringify(seq); +}}); +Clazz.defineStatics (c$, +"PROTEIN", 0, +"NUCLEOTIDE", 1); +}); diff --git a/bin/jalview/datamodel/AlignmentAnnotation.class b/bin/jalview/datamodel/AlignmentAnnotation.class index 840fdf1fd89061ed2917d106deca03141f04fb7f..88e30dbda799a85e7011292bcb43cd2825a413cc 100644 GIT binary patch delta 117 zcmeC1#yD{roXe zXJBP#U}R)xc*n@dz`!HR^PBOYungyKMlq(%eOi%1j4hjA*yJ#Zi!*RbI{*#gWdxBK njJ!V?SeUq&HfP!yvNEb}p6$Gwkt36VOH9Urk!f>`>sD3(5qKjz diff --git a/bin/jalview/datamodel/AlignmentAnnotation.js b/bin/jalview/datamodel/AlignmentAnnotation.js index 0be7f1c..e321a8d 100644 --- a/bin/jalview/datamodel/AlignmentAnnotation.js +++ b/bin/jalview/datamodel/AlignmentAnnotation.js @@ -1,623 +1,623 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.util.HashMap"], "jalview.datamodel.AlignmentAnnotation", ["jalview.analysis.Rna", "jalview.datamodel.Annotation", "$.GraphLine", "jalview.schemes.ResidueProperties", "java.lang.Double", "$.Error", "$.Long", "$.StringBuffer", "$.StringBuilder", "java.util.Collections"], function () { -c$ = Clazz.decorateAsClass (function () { -this.autoCalculated = false; -this.annotationId = null; -this.sequenceRef = null; -this.label = null; -this.description = null; -this.annotations = null; -this.bps = null; -this._rnasecstr = null; -this.invalidrnastruc = -2; -this.sequenceMapping = null; -this.graphMin = 0; -this.graphMax = 0; -this.score = NaN; -this.$hasScore = false; -this.threshold = null; -this.editable = false; -this.hasIcons = false; -this.hasText = false; -this.visible = true; -this.graphGroup = -1; -this.height = 0; -this.graph = 0; -this.graphHeight = 40; -this.padGaps = false; -this.belowAlignment = true; -this.groupRef = null; -this.showAllColLabels = false; -this.scaleColLabel = false; -this.centreColLabels = false; -this.isrna = false; -if (!Clazz.isClassDefined ("jalview.datamodel.AlignmentAnnotation.AnnotCharSequence")) { -jalview.datamodel.AlignmentAnnotation.$AlignmentAnnotation$AnnotCharSequence$ (); -} -this._lastrnaannot = -1; -this.calcId = ""; -this.properties = null; -this._linecolour = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "AlignmentAnnotation"); -Clazz.prepareFields (c$, function () { -this.properties = new java.util.HashMap (); -}); -Clazz.defineMethod (c$, "_updateRnaSecStr", -($fz = function (RNAannot) { -try { -this._rnasecstr = jalview.analysis.Rna.GetBasePairs (RNAannot); -this.bps = jalview.analysis.Rna.GetModeleBP (RNAannot); -this.invalidrnastruc = -1; -} catch (px) { -if (Clazz.exceptionOf (px, jalview.analysis.WUSSParseException)) { -this.invalidrnastruc = px.getProblemPos (); -} else { -throw px; -} -} -if (this.invalidrnastruc > -1) { -return; -}jalview.analysis.Rna.HelixMap (this._rnasecstr); -if (this._rnasecstr != null && this._rnasecstr.length > 0) { -this.isrna = true; -this.showAllColLabels = true; -this.scaleColLabel = true; -this._markRnaHelices (); -}}, $fz.isPrivate = true, $fz), "CharSequence"); -Clazz.defineMethod (c$, "_markRnaHelices", -($fz = function () { -var mxval = 0; -for (var x = 0; x < this._rnasecstr.length; x++) { -var val = 0; -try { -val = (Integer.$valueOf (this._rnasecstr[x].getFeatureGroup ())).intValue (); -if (mxval < val) { -mxval = val; -}} catch (q) { -if (Clazz.exceptionOf (q, NumberFormatException)) { -} else { -throw q; -} -} -;this.annotations[this._rnasecstr[x].getBegin ()].value = val; -this.annotations[this._rnasecstr[x].getEnd ()].value = val; -} -this.setScore (mxval); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "finalize", -function () { -this.sequenceRef = null; -this.groupRef = null; -Clazz.superCall (this, jalview.datamodel.AlignmentAnnotation, "finalize", []); -}); -c$.getGraphValueFromString = Clazz.defineMethod (c$, "getGraphValueFromString", -function (string) { -if (string.equalsIgnoreCase ("BAR_GRAPH")) { -return 1; -} else if (string.equalsIgnoreCase ("LINE_GRAPH")) { -return 2; -} else { -return 0; -}}, "~S"); -Clazz.defineMethod (c$, "ConcenStru", -function (RNAannot) { -this.bps = jalview.analysis.Rna.GetModeleBP (RNAannot); -}, "CharSequence"); -Clazz.makeConstructor (c$, -function (label, description, annotations) { -this.setAnnotationId (); -this.editable = true; -this.label = label; -this.description = description; -this.annotations = annotations; -this.validateRangeAndDisplay (); -}, "~S,~S,~A"); -Clazz.defineMethod (c$, "areLabelsSecondaryStructure", -function () { -var nonSSLabel = false; -this.isrna = false; -var rnastring = new StringBuffer (); -var firstChar = String.fromCharCode (0); -for (var i = 0; i < this.annotations.length; i++) { -if (this.annotations[i] == null) { -continue; -}if (this.annotations[i].secondaryStructure == 'H' || this.annotations[i].secondaryStructure == 'E') { -this.hasIcons = new Boolean (this.hasIcons | true).valueOf (); -} else { -if (this.annotations[i].secondaryStructure == '(' || this.annotations[i].secondaryStructure == '[' || this.annotations[i].secondaryStructure == '<' || this.annotations[i].secondaryStructure == '{' || this.annotations[i].secondaryStructure == 'A' || this.annotations[i].secondaryStructure == 'B' || this.annotations[i].secondaryStructure == 'C' || this.annotations[i].secondaryStructure == 'D' || this.annotations[i].secondaryStructure == 'E' || this.annotations[i].secondaryStructure == 'F' || this.annotations[i].secondaryStructure == 'G' || this.annotations[i].secondaryStructure == 'H' || this.annotations[i].secondaryStructure == 'I' || this.annotations[i].secondaryStructure == 'J' || this.annotations[i].secondaryStructure == 'K' || this.annotations[i].secondaryStructure == 'L' || this.annotations[i].secondaryStructure == 'M' || this.annotations[i].secondaryStructure == 'N' || this.annotations[i].secondaryStructure == 'O' || this.annotations[i].secondaryStructure == 'P' || this.annotations[i].secondaryStructure == 'Q' || this.annotations[i].secondaryStructure == 'R' || this.annotations[i].secondaryStructure == 'S' || this.annotations[i].secondaryStructure == 'T' || this.annotations[i].secondaryStructure == 'U' || this.annotations[i].secondaryStructure == 'V' || this.annotations[i].secondaryStructure == 'W' || this.annotations[i].secondaryStructure == 'X' || this.annotations[i].secondaryStructure == 'Y' || this.annotations[i].secondaryStructure == 'Z') { -this.hasIcons = new Boolean (this.hasIcons | true).valueOf (); -this.isrna = new Boolean (this.isrna | true).valueOf (); -}}if (this.annotations[i].displayCharacter == null || this.annotations[i].displayCharacter.length == 0) { -rnastring.append ('.'); -continue; -}if (this.annotations[i].displayCharacter.length == 1) { -firstChar = this.annotations[i].displayCharacter.charAt (0); -if (this.annotations[i].secondaryStructure != ' ' && !this.hasIcons && firstChar != ' ' && firstChar != '$' && firstChar.charCodeAt (0) != 0xCE && firstChar != '(' && firstChar != '[' && firstChar != '>' && firstChar != '{' && firstChar != 'A' && firstChar != 'B' && firstChar != 'C' && firstChar != 'D' && firstChar != 'E' && firstChar != 'F' && firstChar != 'G' && firstChar != 'H' && firstChar != 'I' && firstChar != 'J' && firstChar != 'K' && firstChar != 'L' && firstChar != 'M' && firstChar != 'N' && firstChar != 'O' && firstChar != 'P' && firstChar != 'Q' && firstChar != 'R' && firstChar != 'S' && firstChar != 'T' && firstChar != 'U' && firstChar != 'V' && firstChar != 'W' && firstChar != 'X' && firstChar != 'Y' && firstChar != 'Z' && firstChar != '-' && firstChar.charCodeAt (0) < jalview.schemes.ResidueProperties.aaIndex.length) { -if (jalview.schemes.ResidueProperties.aaIndex[firstChar.charCodeAt (0)] < 23) { -nonSSLabel = true; -}}} else { -rnastring.append (this.annotations[i].displayCharacter.charAt (1)); -}if (this.annotations[i].displayCharacter.length > 0) { -this.hasText = true; -}} -if (nonSSLabel) { -this.hasIcons = false; -for (var j = 0; j < this.annotations.length; j++) { -if (this.annotations[j] != null && this.annotations[j].secondaryStructure != ' ') { -this.annotations[j].displayCharacter = String.valueOf (this.annotations[j].secondaryStructure); -this.annotations[j].secondaryStructure = ' '; -}} -} else { -if (this.isrna) { -this._updateRnaSecStr (Clazz.innerTypeInstance (jalview.datamodel.AlignmentAnnotation.AnnotCharSequence, this, null)); -}}}); -Clazz.defineMethod (c$, "getRNAStruc", -function () { -if (this.isrna) { -var rnastruc = Clazz.innerTypeInstance (jalview.datamodel.AlignmentAnnotation.AnnotCharSequence, this, null).toString (); -if (this._lastrnaannot != rnastruc.hashCode ()) { -this._lastrnaannot = rnastruc.hashCode (); -this._updateRnaSecStr (rnastruc); -}return rnastruc; -}return null; -}); -Clazz.makeConstructor (c$, -function (label, description, annotations, min, max, graphType) { -this.setAnnotationId (); -this.editable = graphType == 0; -this.label = label; -this.description = description; -this.annotations = annotations; -this.graph = graphType; -this.graphMin = min; -this.graphMax = max; -this.validateRangeAndDisplay (); -}, "~S,~S,~A,~N,~N,~N"); -Clazz.defineMethod (c$, "validateRangeAndDisplay", -function () { -if (this.annotations == null) { -this.visible = false; -return; -}var graphType = this.graph; -var min = this.graphMin; -var max = this.graphMax; -var drawValues = true; -this._linecolour = null; -if (min == max) { -min = 999999999; -for (var i = 0; i < this.annotations.length; i++) { -if (this.annotations[i] == null) { -continue; -}if (drawValues && this.annotations[i].displayCharacter != null && this.annotations[i].displayCharacter.length > 1) { -drawValues = false; -}if (this.annotations[i].value > max) { -max = this.annotations[i].value; -}if (this.annotations[i].value < min) { -min = this.annotations[i].value; -}if (this._linecolour == null && this.annotations[i].colour != null) { -this._linecolour = this.annotations[i].colour; -}} -if (min > 0) { -min = 0; -} else { -if (max < 0) { -max = 0; -}}}this.graphMin = min; -this.graphMax = max; -this.areLabelsSecondaryStructure (); -if (!drawValues && graphType != 0) { -for (var i = 0; i < this.annotations.length; i++) { -if (this.annotations[i] != null) { -this.annotations[i].displayCharacter = ""; -}} -}}); -Clazz.makeConstructor (c$, -function (annotation) { -this.setAnnotationId (); -this.label = String.instantialize (annotation.label); -if (annotation.description != null) { -this.description = String.instantialize (annotation.description); -}this.graphMin = annotation.graphMin; -this.graphMax = annotation.graphMax; -this.graph = annotation.graph; -this.graphHeight = annotation.graphHeight; -this.graphGroup = annotation.graphGroup; -this.groupRef = annotation.groupRef; -this.editable = annotation.editable; -this.autoCalculated = annotation.autoCalculated; -this.hasIcons = annotation.hasIcons; -this.hasText = annotation.hasText; -this.height = annotation.height; -this.label = annotation.label; -this.padGaps = annotation.padGaps; -this.visible = annotation.visible; -this.centreColLabels = annotation.centreColLabels; -this.scaleColLabel = annotation.scaleColLabel; -this.showAllColLabels = annotation.showAllColLabels; -this.calcId = annotation.calcId; -if (annotation.properties != null) { -this.properties = new java.util.HashMap (); -for (var val, $val = annotation.properties.entrySet ().iterator (); $val.hasNext () && ((val = $val.next ()) || true);) { -this.properties.put (val.getKey (), val.getValue ()); -} -}if (this.$hasScore = annotation.$hasScore) { -this.score = annotation.score; -}if (annotation.threshold != null) { -this.threshold = new jalview.datamodel.GraphLine (annotation.threshold); -}var ann = annotation.annotations; -if (annotation.annotations != null) { -this.annotations = new Array (ann.length); -for (var i = 0; i < ann.length; i++) { -if (ann[i] != null) { -this.annotations[i] = new jalview.datamodel.Annotation (ann[i]); -if (this._linecolour != null) { -this._linecolour = this.annotations[i].colour; -}}} -}if (annotation.sequenceRef != null) { -this.sequenceRef = annotation.sequenceRef; -if (annotation.sequenceMapping != null) { -var p = null; -this.sequenceMapping = new java.util.HashMap (); -var pos = annotation.sequenceMapping.keySet ().iterator (); -while (pos.hasNext ()) { -p = pos.next (); -var a = annotation.sequenceMapping.get (p); -if (a == null) { -continue; -}if (ann != null) { -for (var i = 0; i < ann.length; i++) { -if (ann[i] === a) { -this.sequenceMapping.put (p, this.annotations[i]); -}} -}} -} else { -this.sequenceMapping = null; -}}{ -}this.validateRangeAndDisplay (); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "restrict", -function (startRes, endRes) { -if (this.annotations == null) { -return; -}if (startRes < 0) { -startRes = 0; -}if (startRes >= this.annotations.length) { -startRes = this.annotations.length - 1; -}if (endRes >= this.annotations.length) { -endRes = this.annotations.length - 1; -}if (this.annotations == null) { -return; -}var temp = new Array (endRes - startRes + 1); -if (startRes < this.annotations.length) { -System.arraycopy (this.annotations, startRes, temp, 0, endRes - startRes + 1); -}if (this.sequenceRef != null) { -var spos = this.sequenceRef.findPosition (startRes); -var epos = this.sequenceRef.findPosition (endRes); -if (this.sequenceMapping != null) { -var newmapping = new java.util.HashMap (); -var e = this.sequenceMapping.keySet ().iterator (); -while (e.hasNext ()) { -var pos = e.next (); -if (pos.intValue () >= spos && pos.intValue () <= epos) { -newmapping.put (pos, this.sequenceMapping.get (pos)); -}} -this.sequenceMapping.clear (); -this.sequenceMapping = newmapping; -}}this.annotations = temp; -}, "~N,~N"); -Clazz.defineMethod (c$, "padAnnotation", -function (length) { -if (this.annotations == null) { -return true; -}if (this.annotations.length < length) { -var na = new Array (length); -System.arraycopy (this.annotations, 0, na, 0, this.annotations.length); -this.annotations = na; -return true; -}return this.annotations.length > length; -}, "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -var buffer = new StringBuilder (256); -for (var i = 0; i < this.annotations.length; i++) { -if (this.annotations[i] != null) { -if (this.graph != 0) { -buffer.append (this.annotations[i].value); -} else if (this.hasIcons) { -buffer.append (this.annotations[i].secondaryStructure); -} else { -buffer.append (this.annotations[i].displayCharacter); -}}buffer.append (", "); -} -if (this.label.indexOf ("Consensus") == 0) { -buffer.append ("\n"); -for (var i = 0; i < this.annotations.length; i++) { -if (this.annotations[i] != null) { -buffer.append (this.annotations[i].description); -}buffer.append (", "); -} -}return buffer.toString (); -}); -Clazz.defineMethod (c$, "setThreshold", -function (line) { -this.threshold = line; -}, "jalview.datamodel.GraphLine"); -Clazz.defineMethod (c$, "getThreshold", -function () { -return this.threshold; -}); -Clazz.defineMethod (c$, "createSequenceMapping", -function (seqRef, startRes, alreadyMapped) { -if (seqRef == null) { -return; -}this.sequenceRef = seqRef; -if (this.annotations == null) { -return; -}this.sequenceMapping = new java.util.HashMap (); -var seqPos; -for (var i = 0; i < this.annotations.length; i++) { -if (this.annotations[i] != null) { -if (alreadyMapped) { -seqPos = seqRef.findPosition (i); -} else { -seqPos = i + startRes; -}this.sequenceMapping.put ( new Integer (seqPos), this.annotations[i]); -}} -}, "jalview.datamodel.SequenceI,~N,~B"); -Clazz.defineMethod (c$, "adjustForAlignment", -function () { -if (this.sequenceRef == null) { -return; -}if (this.annotations == null) { -return; -}var a = 0; -var aSize = this.sequenceRef.getLength (); -if (aSize == 0) { -return; -}var position; -var temp = new Array (aSize); -var index; -for (a = this.sequenceRef.getStart (); a <= this.sequenceRef.getEnd (); a++) { -index = new Integer (a); -if (this.sequenceMapping.containsKey (index)) { -position = this.sequenceRef.findIndex (a) - 1; -temp[position] = this.sequenceMapping.get (index); -}} -this.annotations = temp; -}); -Clazz.defineMethod (c$, "compactAnnotationArray", -function () { -var i = 0; -var iSize = this.annotations.length; -while (i < iSize) { -if (this.annotations[i] == null) { -if (i + 1 < iSize) { -System.arraycopy (this.annotations, i + 1, this.annotations, i, iSize - i - 1); -}iSize--; -} else { -i++; -}} -var ann = this.annotations; -this.annotations = new Array (i); -System.arraycopy (ann, 0, this.annotations, 0, i); -ann = null; -return iSize; -}); -Clazz.defineMethod (c$, "setSequenceRef", -function (sequenceI) { -if (sequenceI != null) { -if (this.sequenceRef != null) { -var rIsDs = this.sequenceRef.getDatasetSequence () == null; -var tIsDs = sequenceI.getDatasetSequence () == null; -if (this.sequenceRef !== sequenceI && (rIsDs && !tIsDs && this.sequenceRef !== sequenceI.getDatasetSequence ()) && (!rIsDs && tIsDs && this.sequenceRef.getDatasetSequence () !== sequenceI) && (!rIsDs && !tIsDs && this.sequenceRef.getDatasetSequence () !== sequenceI.getDatasetSequence ()) && !this.sequenceRef.equals (sequenceI)) { -this.sequenceRef = null; -if (this.sequenceMapping != null) { -this.sequenceMapping = null; -}this.createSequenceMapping (sequenceI, 1, true); -this.adjustForAlignment (); -} else { -this.sequenceRef = sequenceI; -}} else { -this.createSequenceMapping (sequenceI, 1, true); -this.adjustForAlignment (); -}} else { -this.sequenceMapping = null; -this.sequenceRef = null; -}}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getScore", -function () { -return this.score; -}); -Clazz.defineMethod (c$, "setScore", -function (score) { -this.$hasScore = true; -this.score = score; -}, "~N"); -Clazz.defineMethod (c$, "hasScore", -function () { -return this.$hasScore || !Double.isNaN (this.score); -}); -Clazz.makeConstructor (c$, -function (label, description, score) { -this.construct (label, description, null); -this.setScore (score); -}, "~S,~S,~N"); -Clazz.makeConstructor (c$, -function (alignmentAnnotation, colSel) { -this.construct (alignmentAnnotation); -if (this.annotations == null) { -return; -}colSel.makeVisibleAnnotation (this); -}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.ColumnSelection"); -Clazz.defineMethod (c$, "setPadGaps", -function (padgaps, gapchar) { -this.padGaps = padgaps; -if (padgaps) { -this.hasText = true; -for (var i = 0; i < this.annotations.length; i++) { -if (this.annotations[i] == null) { -this.annotations[i] = new jalview.datamodel.Annotation (String.valueOf (gapchar), null, ' ', 0, null); -} else if (this.annotations[i].displayCharacter == null || this.annotations[i].displayCharacter.equals (" ")) { -this.annotations[i].displayCharacter = String.valueOf (gapchar); -}} -}}, "~B,~S"); -Clazz.defineMethod (c$, "getDescription", -function (seqname) { -if (seqname && this.sequenceRef != null) { -var i = this.description.toLowerCase ().indexOf (""); -if (i > -1) { -return "" + this.sequenceRef.getName () + " : " + this.description.substring (i + 6); -}return this.sequenceRef.getName () + " : " + this.description; -}return this.description; -}, "~B"); -Clazz.defineMethod (c$, "isValidStruc", -function () { -return this.invalidrnastruc == -1; -}); -Clazz.defineMethod (c$, "getInvalidStrucPos", -function () { -return this.invalidrnastruc; -}); -Clazz.defineMethod (c$, "getCalcId", -function () { -return this.calcId; -}); -Clazz.defineMethod (c$, "setCalcId", -function (calcId) { -this.calcId = calcId; -}, "~S"); -Clazz.defineMethod (c$, "isRNA", -function () { -return this.isrna; -}); -Clazz.defineMethod (c$, "liftOver", -function (sq, sp2sq) { -if (sp2sq.getMappedWidth () != sp2sq.getWidth ()) { -throw new Error ("liftOver currently not implemented for transfer of annotation between different types of seqeunce"); -}var mapIsTo = (sp2sq != null) ? (sp2sq.getTo () === sq || sp2sq.getTo () === sq.getDatasetSequence ()) : false; -var mapForsq = new java.util.HashMap (); -if (this.sequenceMapping != null) { -if (sp2sq != null) { -for (var ie, $ie = this.sequenceMapping.entrySet ().iterator (); $ie.hasNext () && ((ie = $ie.next ()) || true);) { -var mpos = Integer.$valueOf (mapIsTo ? sp2sq.getMappedPosition ((ie.getKey ()).intValue ()) : sp2sq.getPosition ((ie.getKey ()).intValue ())); -if ((mpos).intValue () >= sq.getStart () && (mpos).intValue () <= sq.getEnd ()) { -mapForsq.put (mpos, ie.getValue ()); -}} -this.sequenceMapping = mapForsq; -this.sequenceRef = sq; -this.adjustForAlignment (); -} else { -}}}, "jalview.datamodel.SequenceI,jalview.datamodel.Mapping"); -Clazz.defineMethod (c$, "remap", -function (newref, mapping, from, to, idxoffset) { -if (mapping != null) { -var old = this.sequenceMapping; -var remap = new java.util.HashMap (); -var index = -1; -for (var mp, $mp = 0, $$mp = mapping; $mp < $$mp.length && ((mp = $$mp[$mp]) || true); $mp++) { -if (index++ < 0) { -continue; -}var ann = null; -if (from == -1) { -ann = this.sequenceMapping.get (Integer.$valueOf (idxoffset + index)); -} else { -if (mp != null && mp.length > from) { -ann = this.sequenceMapping.get (Integer.$valueOf (mp[from])); -}}if (ann != null) { -if (to == -1) { -remap.put (Integer.$valueOf (idxoffset + index), ann); -} else { -if (to > -1 && to < mp.length) { -remap.put (Integer.$valueOf (mp[to]), ann); -}}}} -this.sequenceMapping = remap; -old.clear (); -if (newref != null) { -this.sequenceRef = newref; -}this.adjustForAlignment (); -}}, "jalview.datamodel.SequenceI,~A,~N,~N,~N"); -Clazz.defineMethod (c$, "getProperty", -function (property) { -if (this.properties == null) { -return null; -}return this.properties.get (property); -}, "~S"); -Clazz.defineMethod (c$, "setProperty", -function (property, value) { -if (this.properties == null) { -this.properties = new java.util.HashMap (); -}this.properties.put (property, value); -}, "~S,~S"); -Clazz.defineMethod (c$, "hasProperties", -function () { -return this.properties != null && this.properties.size () > 0; -}); -Clazz.defineMethod (c$, "getProperties", -function () { -if (this.properties == null) { -return java.util.Collections.emptyList (); -}return this.properties.keySet (); -}); -Clazz.defineMethod (c$, "getAnnotationForPosition", -function (position) { -return this.sequenceMapping == null ? null : this.sequenceMapping.get (new Integer (position)); -}, "~N"); -Clazz.defineMethod (c$, "setAnnotationId", -function () { -this.annotationId = "ann" + Long.toString (jalview.datamodel.AlignmentAnnotation.nextId ()); -}); -c$.nextId = Clazz.defineMethod (c$, "nextId", -function () { -return jalview.datamodel.AlignmentAnnotation.counter++; -}); -c$.$AlignmentAnnotation$AnnotCharSequence$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.offset = 0; -this.max = 0; -Clazz.instantialize (this, arguments); -}, jalview.datamodel.AlignmentAnnotation, "AnnotCharSequence", null, CharSequence); -Clazz.makeConstructor (c$, -function () { -this.construct (0, this.b$["jalview.datamodel.AlignmentAnnotation"].annotations.length); -}); -Clazz.makeConstructor (c$, -function (a, b) { -this.offset = a; -this.max = b; -}, "~N,~N"); -Clazz.overrideMethod (c$, "subSequence", -function (a, b) { -return Clazz.innerTypeInstance (jalview.datamodel.AlignmentAnnotation.AnnotCharSequence, this, null, this.offset + a, this.offset + b); -}, "~N,~N"); -Clazz.overrideMethod (c$, "length", -function () { -return this.max - this.offset; -}); -Clazz.overrideMethod (c$, "charAt", -function (a) { -return ((a + this.offset < 0) || (a + this.offset) >= this.max || this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset] == null || (this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].secondaryStructure <= ' ') ? ' ' : this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].displayCharacter == null || this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].displayCharacter.length == 0 ? this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].secondaryStructure : this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].displayCharacter.charAt (0)); -}, "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -var a = Clazz.newCharArray (this.max - this.offset, '\0'); -var b = this.b$["jalview.datamodel.AlignmentAnnotation"].annotations.length; -for (var c = this.offset; c < b; c++) { -a[c] = (this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c] == null || ((this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].secondaryStructure).charCodeAt (0) <= 32)) ? ' ' : (this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].displayCharacter == null || this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].displayCharacter.length == 0 ? this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].secondaryStructure : this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].displayCharacter.charAt (0)); -} -return String.instantialize (a); -}); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"ANNOTATION_ID_PREFIX", "ann", -"SEQUENCE_PROFILE", 0, -"STRUCTURE_PROFILE", 1, -"CDNA_PROFILE", 2, -"counter", 0, -"NO_GRAPH", 0, -"BAR_GRAPH", 1, -"LINE_GRAPH", 2); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.util.HashMap"], "jalview.datamodel.AlignmentAnnotation", ["jalview.analysis.Rna", "jalview.datamodel.Annotation", "$.GraphLine", "jalview.schemes.ResidueProperties", "java.lang.Double", "$.Error", "$.Long", "$.StringBuffer", "$.StringBuilder", "java.util.Collections"], function () { +c$ = Clazz.decorateAsClass (function () { +this.autoCalculated = false; +this.annotationId = null; +this.sequenceRef = null; +this.label = null; +this.description = null; +this.annotations = null; +this.bps = null; +this._rnasecstr = null; +this.invalidrnastruc = -2; +this.sequenceMapping = null; +this.graphMin = 0; +this.graphMax = 0; +this.score = NaN; +this.$hasScore = false; +this.threshold = null; +this.editable = false; +this.hasIcons = false; +this.hasText = false; +this.visible = true; +this.graphGroup = -1; +this.height = 0; +this.graph = 0; +this.graphHeight = 40; +this.padGaps = false; +this.belowAlignment = true; +this.groupRef = null; +this.showAllColLabels = false; +this.scaleColLabel = false; +this.centreColLabels = false; +this.isrna = false; +if (!Clazz.isClassDefined ("jalview.datamodel.AlignmentAnnotation.AnnotCharSequence")) { +jalview.datamodel.AlignmentAnnotation.$AlignmentAnnotation$AnnotCharSequence$ (); +} +this._lastrnaannot = -1; +this.calcId = ""; +this.properties = null; +this._linecolour = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "AlignmentAnnotation"); +Clazz.prepareFields (c$, function () { +this.properties = new java.util.HashMap (); +}); +Clazz.defineMethod (c$, "_updateRnaSecStr", +($fz = function (RNAannot) { +try { +this._rnasecstr = jalview.analysis.Rna.GetBasePairs (RNAannot); +this.bps = jalview.analysis.Rna.GetModeleBP (RNAannot); +this.invalidrnastruc = -1; +} catch (px) { +if (Clazz.exceptionOf (px, jalview.analysis.WUSSParseException)) { +this.invalidrnastruc = px.getProblemPos (); +} else { +throw px; +} +} +if (this.invalidrnastruc > -1) { +return; +}jalview.analysis.Rna.HelixMap (this._rnasecstr); +if (this._rnasecstr != null && this._rnasecstr.length > 0) { +this.isrna = true; +this.showAllColLabels = true; +this.scaleColLabel = true; +this._markRnaHelices (); +}}, $fz.isPrivate = true, $fz), "CharSequence"); +Clazz.defineMethod (c$, "_markRnaHelices", +($fz = function () { +var mxval = 0; +for (var x = 0; x < this._rnasecstr.length; x++) { +var val = 0; +try { +val = (Integer.$valueOf (this._rnasecstr[x].getFeatureGroup ())).intValue (); +if (mxval < val) { +mxval = val; +}} catch (q) { +if (Clazz.exceptionOf (q, NumberFormatException)) { +} else { +throw q; +} +} +;this.annotations[this._rnasecstr[x].getBegin ()].value = val; +this.annotations[this._rnasecstr[x].getEnd ()].value = val; +} +this.setScore (mxval); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "finalize", +function () { +this.sequenceRef = null; +this.groupRef = null; +Clazz.superCall (this, jalview.datamodel.AlignmentAnnotation, "finalize", []); +}); +c$.getGraphValueFromString = Clazz.defineMethod (c$, "getGraphValueFromString", +function (string) { +if (string.equalsIgnoreCase ("BAR_GRAPH")) { +return 1; +} else if (string.equalsIgnoreCase ("LINE_GRAPH")) { +return 2; +} else { +return 0; +}}, "~S"); +Clazz.defineMethod (c$, "ConcenStru", +function (RNAannot) { +this.bps = jalview.analysis.Rna.GetModeleBP (RNAannot); +}, "CharSequence"); +Clazz.makeConstructor (c$, +function (label, description, annotations) { +this.setAnnotationId (); +this.editable = true; +this.label = label; +this.description = description; +this.annotations = annotations; +this.validateRangeAndDisplay (); +}, "~S,~S,~A"); +Clazz.defineMethod (c$, "areLabelsSecondaryStructure", +function () { +var nonSSLabel = false; +this.isrna = false; +var rnastring = new StringBuffer (); +var firstChar = String.fromCharCode (0); +for (var i = 0; i < this.annotations.length; i++) { +if (this.annotations[i] == null) { +continue; +}if (this.annotations[i].secondaryStructure == 'H' || this.annotations[i].secondaryStructure == 'E') { +this.hasIcons = new Boolean (this.hasIcons | true).valueOf (); +} else { +if (this.annotations[i].secondaryStructure == '(' || this.annotations[i].secondaryStructure == '[' || this.annotations[i].secondaryStructure == '<' || this.annotations[i].secondaryStructure == '{' || this.annotations[i].secondaryStructure == 'A' || this.annotations[i].secondaryStructure == 'B' || this.annotations[i].secondaryStructure == 'C' || this.annotations[i].secondaryStructure == 'D' || this.annotations[i].secondaryStructure == 'E' || this.annotations[i].secondaryStructure == 'F' || this.annotations[i].secondaryStructure == 'G' || this.annotations[i].secondaryStructure == 'H' || this.annotations[i].secondaryStructure == 'I' || this.annotations[i].secondaryStructure == 'J' || this.annotations[i].secondaryStructure == 'K' || this.annotations[i].secondaryStructure == 'L' || this.annotations[i].secondaryStructure == 'M' || this.annotations[i].secondaryStructure == 'N' || this.annotations[i].secondaryStructure == 'O' || this.annotations[i].secondaryStructure == 'P' || this.annotations[i].secondaryStructure == 'Q' || this.annotations[i].secondaryStructure == 'R' || this.annotations[i].secondaryStructure == 'S' || this.annotations[i].secondaryStructure == 'T' || this.annotations[i].secondaryStructure == 'U' || this.annotations[i].secondaryStructure == 'V' || this.annotations[i].secondaryStructure == 'W' || this.annotations[i].secondaryStructure == 'X' || this.annotations[i].secondaryStructure == 'Y' || this.annotations[i].secondaryStructure == 'Z') { +this.hasIcons = new Boolean (this.hasIcons | true).valueOf (); +this.isrna = new Boolean (this.isrna | true).valueOf (); +}}if (this.annotations[i].displayCharacter == null || this.annotations[i].displayCharacter.length == 0) { +rnastring.append ('.'); +continue; +}if (this.annotations[i].displayCharacter.length == 1) { +firstChar = this.annotations[i].displayCharacter.charAt (0); +if (this.annotations[i].secondaryStructure != ' ' && !this.hasIcons && firstChar != ' ' && firstChar != '$' && firstChar.charCodeAt (0) != 0xCE && firstChar != '(' && firstChar != '[' && firstChar != '>' && firstChar != '{' && firstChar != 'A' && firstChar != 'B' && firstChar != 'C' && firstChar != 'D' && firstChar != 'E' && firstChar != 'F' && firstChar != 'G' && firstChar != 'H' && firstChar != 'I' && firstChar != 'J' && firstChar != 'K' && firstChar != 'L' && firstChar != 'M' && firstChar != 'N' && firstChar != 'O' && firstChar != 'P' && firstChar != 'Q' && firstChar != 'R' && firstChar != 'S' && firstChar != 'T' && firstChar != 'U' && firstChar != 'V' && firstChar != 'W' && firstChar != 'X' && firstChar != 'Y' && firstChar != 'Z' && firstChar != '-' && firstChar.charCodeAt (0) < jalview.schemes.ResidueProperties.aaIndex.length) { +if (jalview.schemes.ResidueProperties.aaIndex[firstChar.charCodeAt (0)] < 23) { +nonSSLabel = true; +}}} else { +rnastring.append (this.annotations[i].displayCharacter.charAt (1)); +}if (this.annotations[i].displayCharacter.length > 0) { +this.hasText = true; +}} +if (nonSSLabel) { +this.hasIcons = false; +for (var j = 0; j < this.annotations.length; j++) { +if (this.annotations[j] != null && this.annotations[j].secondaryStructure != ' ') { +this.annotations[j].displayCharacter = String.valueOf (this.annotations[j].secondaryStructure); +this.annotations[j].secondaryStructure = ' '; +}} +} else { +if (this.isrna) { +this._updateRnaSecStr (Clazz.innerTypeInstance (jalview.datamodel.AlignmentAnnotation.AnnotCharSequence, this, null)); +}}}); +Clazz.defineMethod (c$, "getRNAStruc", +function () { +if (this.isrna) { +var rnastruc = Clazz.innerTypeInstance (jalview.datamodel.AlignmentAnnotation.AnnotCharSequence, this, null).toString (); +if (this._lastrnaannot != rnastruc.hashCode ()) { +this._lastrnaannot = rnastruc.hashCode (); +this._updateRnaSecStr (rnastruc); +}return rnastruc; +}return null; +}); +Clazz.makeConstructor (c$, +function (label, description, annotations, min, max, graphType) { +this.setAnnotationId (); +this.editable = graphType == 0; +this.label = label; +this.description = description; +this.annotations = annotations; +this.graph = graphType; +this.graphMin = min; +this.graphMax = max; +this.validateRangeAndDisplay (); +}, "~S,~S,~A,~N,~N,~N"); +Clazz.defineMethod (c$, "validateRangeAndDisplay", +function () { +if (this.annotations == null) { +this.visible = false; +return; +}var graphType = this.graph; +var min = this.graphMin; +var max = this.graphMax; +var drawValues = true; +this._linecolour = null; +if (min == max) { +min = 999999999; +for (var i = 0; i < this.annotations.length; i++) { +if (this.annotations[i] == null) { +continue; +}if (drawValues && this.annotations[i].displayCharacter != null && this.annotations[i].displayCharacter.length > 1) { +drawValues = false; +}if (this.annotations[i].value > max) { +max = this.annotations[i].value; +}if (this.annotations[i].value < min) { +min = this.annotations[i].value; +}if (this._linecolour == null && this.annotations[i].colour != null) { +this._linecolour = this.annotations[i].colour; +}} +if (min > 0) { +min = 0; +} else { +if (max < 0) { +max = 0; +}}}this.graphMin = min; +this.graphMax = max; +this.areLabelsSecondaryStructure (); +if (!drawValues && graphType != 0) { +for (var i = 0; i < this.annotations.length; i++) { +if (this.annotations[i] != null) { +this.annotations[i].displayCharacter = ""; +}} +}}); +Clazz.makeConstructor (c$, +function (annotation) { +this.setAnnotationId (); +this.label = String.instantialize (annotation.label); +if (annotation.description != null) { +this.description = String.instantialize (annotation.description); +}this.graphMin = annotation.graphMin; +this.graphMax = annotation.graphMax; +this.graph = annotation.graph; +this.graphHeight = annotation.graphHeight; +this.graphGroup = annotation.graphGroup; +this.groupRef = annotation.groupRef; +this.editable = annotation.editable; +this.autoCalculated = annotation.autoCalculated; +this.hasIcons = annotation.hasIcons; +this.hasText = annotation.hasText; +this.height = annotation.height; +this.label = annotation.label; +this.padGaps = annotation.padGaps; +this.visible = annotation.visible; +this.centreColLabels = annotation.centreColLabels; +this.scaleColLabel = annotation.scaleColLabel; +this.showAllColLabels = annotation.showAllColLabels; +this.calcId = annotation.calcId; +if (annotation.properties != null) { +this.properties = new java.util.HashMap (); +for (var val, $val = annotation.properties.entrySet ().iterator (); $val.hasNext () && ((val = $val.next ()) || true);) { +this.properties.put (val.getKey (), val.getValue ()); +} +}if (this.$hasScore = annotation.$hasScore) { +this.score = annotation.score; +}if (annotation.threshold != null) { +this.threshold = new jalview.datamodel.GraphLine (annotation.threshold); +}var ann = annotation.annotations; +if (annotation.annotations != null) { +this.annotations = new Array (ann.length); +for (var i = 0; i < ann.length; i++) { +if (ann[i] != null) { +this.annotations[i] = new jalview.datamodel.Annotation (ann[i]); +if (this._linecolour != null) { +this._linecolour = this.annotations[i].colour; +}}} +}if (annotation.sequenceRef != null) { +this.sequenceRef = annotation.sequenceRef; +if (annotation.sequenceMapping != null) { +var p = null; +this.sequenceMapping = new java.util.HashMap (); +var pos = annotation.sequenceMapping.keySet ().iterator (); +while (pos.hasNext ()) { +p = pos.next (); +var a = annotation.sequenceMapping.get (p); +if (a == null) { +continue; +}if (ann != null) { +for (var i = 0; i < ann.length; i++) { +if (ann[i] === a) { +this.sequenceMapping.put (p, this.annotations[i]); +}} +}} +} else { +this.sequenceMapping = null; +}}{ +}this.validateRangeAndDisplay (); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "restrict", +function (startRes, endRes) { +if (this.annotations == null) { +return; +}if (startRes < 0) { +startRes = 0; +}if (startRes >= this.annotations.length) { +startRes = this.annotations.length - 1; +}if (endRes >= this.annotations.length) { +endRes = this.annotations.length - 1; +}if (this.annotations == null) { +return; +}var temp = new Array (endRes - startRes + 1); +if (startRes < this.annotations.length) { +System.arraycopy (this.annotations, startRes, temp, 0, endRes - startRes + 1); +}if (this.sequenceRef != null) { +var spos = this.sequenceRef.findPosition (startRes); +var epos = this.sequenceRef.findPosition (endRes); +if (this.sequenceMapping != null) { +var newmapping = new java.util.HashMap (); +var e = this.sequenceMapping.keySet ().iterator (); +while (e.hasNext ()) { +var pos = e.next (); +if (pos.intValue () >= spos && pos.intValue () <= epos) { +newmapping.put (pos, this.sequenceMapping.get (pos)); +}} +this.sequenceMapping.clear (); +this.sequenceMapping = newmapping; +}}this.annotations = temp; +}, "~N,~N"); +Clazz.defineMethod (c$, "padAnnotation", +function (length) { +if (this.annotations == null) { +return true; +}if (this.annotations.length < length) { +var na = new Array (length); +System.arraycopy (this.annotations, 0, na, 0, this.annotations.length); +this.annotations = na; +return true; +}return this.annotations.length > length; +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +var buffer = new StringBuilder (256); +for (var i = 0; i < this.annotations.length; i++) { +if (this.annotations[i] != null) { +if (this.graph != 0) { +buffer.append (this.annotations[i].value); +} else if (this.hasIcons) { +buffer.append (this.annotations[i].secondaryStructure); +} else { +buffer.append (this.annotations[i].displayCharacter); +}}buffer.append (", "); +} +if (this.label.indexOf ("Consensus") == 0) { +buffer.append ("\n"); +for (var i = 0; i < this.annotations.length; i++) { +if (this.annotations[i] != null) { +buffer.append (this.annotations[i].description); +}buffer.append (", "); +} +}return buffer.toString (); +}); +Clazz.defineMethod (c$, "setThreshold", +function (line) { +this.threshold = line; +}, "jalview.datamodel.GraphLine"); +Clazz.defineMethod (c$, "getThreshold", +function () { +return this.threshold; +}); +Clazz.defineMethod (c$, "createSequenceMapping", +function (seqRef, startRes, alreadyMapped) { +if (seqRef == null) { +return; +}this.sequenceRef = seqRef; +if (this.annotations == null) { +return; +}this.sequenceMapping = new java.util.HashMap (); +var seqPos; +for (var i = 0; i < this.annotations.length; i++) { +if (this.annotations[i] != null) { +if (alreadyMapped) { +seqPos = seqRef.findPosition (i); +} else { +seqPos = i + startRes; +}this.sequenceMapping.put ( new Integer (seqPos), this.annotations[i]); +}} +}, "jalview.datamodel.SequenceI,~N,~B"); +Clazz.defineMethod (c$, "adjustForAlignment", +function () { +if (this.sequenceRef == null) { +return; +}if (this.annotations == null) { +return; +}var a = 0; +var aSize = this.sequenceRef.getLength (); +if (aSize == 0) { +return; +}var position; +var temp = new Array (aSize); +var index; +for (a = this.sequenceRef.getStart (); a <= this.sequenceRef.getEnd (); a++) { +index = new Integer (a); +if (this.sequenceMapping.containsKey (index)) { +position = this.sequenceRef.findIndex (a) - 1; +temp[position] = this.sequenceMapping.get (index); +}} +this.annotations = temp; +}); +Clazz.defineMethod (c$, "compactAnnotationArray", +function () { +var i = 0; +var iSize = this.annotations.length; +while (i < iSize) { +if (this.annotations[i] == null) { +if (i + 1 < iSize) { +System.arraycopy (this.annotations, i + 1, this.annotations, i, iSize - i - 1); +}iSize--; +} else { +i++; +}} +var ann = this.annotations; +this.annotations = new Array (i); +System.arraycopy (ann, 0, this.annotations, 0, i); +ann = null; +return iSize; +}); +Clazz.defineMethod (c$, "setSequenceRef", +function (sequenceI) { +if (sequenceI != null) { +if (this.sequenceRef != null) { +var rIsDs = this.sequenceRef.getDatasetSequence () == null; +var tIsDs = sequenceI.getDatasetSequence () == null; +if (this.sequenceRef !== sequenceI && (rIsDs && !tIsDs && this.sequenceRef !== sequenceI.getDatasetSequence ()) && (!rIsDs && tIsDs && this.sequenceRef.getDatasetSequence () !== sequenceI) && (!rIsDs && !tIsDs && this.sequenceRef.getDatasetSequence () !== sequenceI.getDatasetSequence ()) && !this.sequenceRef.equals (sequenceI)) { +this.sequenceRef = null; +if (this.sequenceMapping != null) { +this.sequenceMapping = null; +}this.createSequenceMapping (sequenceI, 1, true); +this.adjustForAlignment (); +} else { +this.sequenceRef = sequenceI; +}} else { +this.createSequenceMapping (sequenceI, 1, true); +this.adjustForAlignment (); +}} else { +this.sequenceMapping = null; +this.sequenceRef = null; +}}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getScore", +function () { +return this.score; +}); +Clazz.defineMethod (c$, "setScore", +function (score) { +this.$hasScore = true; +this.score = score; +}, "~N"); +Clazz.defineMethod (c$, "hasScore", +function () { +return this.$hasScore || !Double.isNaN (this.score); +}); +Clazz.makeConstructor (c$, +function (label, description, score) { +this.construct (label, description, null); +this.setScore (score); +}, "~S,~S,~N"); +Clazz.makeConstructor (c$, +function (alignmentAnnotation, colSel) { +this.construct (alignmentAnnotation); +if (this.annotations == null) { +return; +}colSel.makeVisibleAnnotation (this); +}, "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.ColumnSelection"); +Clazz.defineMethod (c$, "setPadGaps", +function (padgaps, gapchar) { +this.padGaps = padgaps; +if (padgaps) { +this.hasText = true; +for (var i = 0; i < this.annotations.length; i++) { +if (this.annotations[i] == null) { +this.annotations[i] = new jalview.datamodel.Annotation (String.valueOf (gapchar), null, ' ', 0, null); +} else if (this.annotations[i].displayCharacter == null || this.annotations[i].displayCharacter.equals (" ")) { +this.annotations[i].displayCharacter = String.valueOf (gapchar); +}} +}}, "~B,~S"); +Clazz.defineMethod (c$, "getDescription", +function (seqname) { +if (seqname && this.sequenceRef != null) { +var i = this.description.toLowerCase ().indexOf (""); +if (i > -1) { +return "" + this.sequenceRef.getName () + " : " + this.description.substring (i + 6); +}return this.sequenceRef.getName () + " : " + this.description; +}return this.description; +}, "~B"); +Clazz.defineMethod (c$, "isValidStruc", +function () { +return this.invalidrnastruc == -1; +}); +Clazz.defineMethod (c$, "getInvalidStrucPos", +function () { +return this.invalidrnastruc; +}); +Clazz.defineMethod (c$, "getCalcId", +function () { +return this.calcId; +}); +Clazz.defineMethod (c$, "setCalcId", +function (calcId) { +this.calcId = calcId; +}, "~S"); +Clazz.defineMethod (c$, "isRNA", +function () { +return this.isrna; +}); +Clazz.defineMethod (c$, "liftOver", +function (sq, sp2sq) { +if (sp2sq.getMappedWidth () != sp2sq.getWidth ()) { +throw new Error ("liftOver currently not implemented for transfer of annotation between different types of seqeunce"); +}var mapIsTo = (sp2sq != null) ? (sp2sq.getTo () === sq || sp2sq.getTo () === sq.getDatasetSequence ()) : false; +var mapForsq = new java.util.HashMap (); +if (this.sequenceMapping != null) { +if (sp2sq != null) { +for (var ie, $ie = this.sequenceMapping.entrySet ().iterator (); $ie.hasNext () && ((ie = $ie.next ()) || true);) { +var mpos = Integer.$valueOf (mapIsTo ? sp2sq.getMappedPosition ((ie.getKey ()).intValue ()) : sp2sq.getPosition ((ie.getKey ()).intValue ())); +if ((mpos).intValue () >= sq.getStart () && (mpos).intValue () <= sq.getEnd ()) { +mapForsq.put (mpos, ie.getValue ()); +}} +this.sequenceMapping = mapForsq; +this.sequenceRef = sq; +this.adjustForAlignment (); +} else { +}}}, "jalview.datamodel.SequenceI,jalview.datamodel.Mapping"); +Clazz.defineMethod (c$, "remap", +function (newref, mapping, from, to, idxoffset) { +if (mapping != null) { +var old = this.sequenceMapping; +var remap = new java.util.HashMap (); +var index = -1; +for (var mp, $mp = 0, $$mp = mapping; $mp < $$mp.length && ((mp = $$mp[$mp]) || true); $mp++) { +if (index++ < 0) { +continue; +}var ann = null; +if (from == -1) { +ann = this.sequenceMapping.get (Integer.$valueOf (idxoffset + index)); +} else { +if (mp != null && mp.length > from) { +ann = this.sequenceMapping.get (Integer.$valueOf (mp[from])); +}}if (ann != null) { +if (to == -1) { +remap.put (Integer.$valueOf (idxoffset + index), ann); +} else { +if (to > -1 && to < mp.length) { +remap.put (Integer.$valueOf (mp[to]), ann); +}}}} +this.sequenceMapping = remap; +old.clear (); +if (newref != null) { +this.sequenceRef = newref; +}this.adjustForAlignment (); +}}, "jalview.datamodel.SequenceI,~A,~N,~N,~N"); +Clazz.defineMethod (c$, "getProperty", +function (property) { +if (this.properties == null) { +return null; +}return this.properties.get (property); +}, "~S"); +Clazz.defineMethod (c$, "setProperty", +function (property, value) { +if (this.properties == null) { +this.properties = new java.util.HashMap (); +}this.properties.put (property, value); +}, "~S,~S"); +Clazz.defineMethod (c$, "hasProperties", +function () { +return this.properties != null && this.properties.size () > 0; +}); +Clazz.defineMethod (c$, "getProperties", +function () { +if (this.properties == null) { +return java.util.Collections.emptyList (); +}return this.properties.keySet (); +}); +Clazz.defineMethod (c$, "getAnnotationForPosition", +function (position) { +return this.sequenceMapping == null ? null : this.sequenceMapping.get (new Integer (position)); +}, "~N"); +Clazz.defineMethod (c$, "setAnnotationId", +function () { +this.annotationId = "ann" + Long.toString (jalview.datamodel.AlignmentAnnotation.nextId ()); +}); +c$.nextId = Clazz.defineMethod (c$, "nextId", +function () { +return jalview.datamodel.AlignmentAnnotation.counter++; +}); +c$.$AlignmentAnnotation$AnnotCharSequence$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.offset = 0; +this.max = 0; +Clazz.instantialize (this, arguments); +}, jalview.datamodel.AlignmentAnnotation, "AnnotCharSequence", null, CharSequence); +Clazz.makeConstructor (c$, +function () { +this.construct (0, this.b$["jalview.datamodel.AlignmentAnnotation"].annotations.length); +}); +Clazz.makeConstructor (c$, +function (a, b) { +this.offset = a; +this.max = b; +}, "~N,~N"); +Clazz.overrideMethod (c$, "subSequence", +function (a, b) { +return Clazz.innerTypeInstance (jalview.datamodel.AlignmentAnnotation.AnnotCharSequence, this, null, this.offset + a, this.offset + b); +}, "~N,~N"); +Clazz.overrideMethod (c$, "length", +function () { +return this.max - this.offset; +}); +Clazz.overrideMethod (c$, "charAt", +function (a) { +return ((a + this.offset < 0) || (a + this.offset) >= this.max || this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset] == null || (this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].secondaryStructure <= ' ') ? ' ' : this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].displayCharacter == null || this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].displayCharacter.length == 0 ? this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].secondaryStructure : this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[a + this.offset].displayCharacter.charAt (0)); +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +var a = Clazz.newCharArray (this.max - this.offset, '\0'); +var b = this.b$["jalview.datamodel.AlignmentAnnotation"].annotations.length; +for (var c = this.offset; c < b; c++) { +a[c] = (this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c] == null || ((this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].secondaryStructure).charCodeAt (0) <= 32)) ? ' ' : (this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].displayCharacter == null || this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].displayCharacter.length == 0 ? this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].secondaryStructure : this.b$["jalview.datamodel.AlignmentAnnotation"].annotations[c].displayCharacter.charAt (0)); +} +return String.instantialize (a); +}); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"ANNOTATION_ID_PREFIX", "ann", +"SEQUENCE_PROFILE", 0, +"STRUCTURE_PROFILE", 1, +"CDNA_PROFILE", 2, +"counter", 0, +"NO_GRAPH", 0, +"BAR_GRAPH", 1, +"LINE_GRAPH", 2); +}); diff --git a/bin/jalview/datamodel/AlignmentI.js b/bin/jalview/datamodel/AlignmentI.js index d1f3174..80e1794 100644 --- a/bin/jalview/datamodel/AlignmentI.js +++ b/bin/jalview/datamodel/AlignmentI.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.AnnotatedCollectionI"], "jalview.datamodel.AlignmentI", null, function () { -Clazz.declareInterface (jalview.datamodel, "AlignmentI", jalview.datamodel.AnnotatedCollectionI); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.AnnotatedCollectionI"], "jalview.datamodel.AlignmentI", null, function () { +Clazz.declareInterface (jalview.datamodel, "AlignmentI", jalview.datamodel.AnnotatedCollectionI); +}); diff --git a/bin/jalview/datamodel/AlignmentOrder.js b/bin/jalview/datamodel/AlignmentOrder.js index 281aa17..0fb0cbb 100644 --- a/bin/jalview/datamodel/AlignmentOrder.js +++ b/bin/jalview/datamodel/AlignmentOrder.js @@ -1,118 +1,118 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.AlignmentOrder", ["java.lang.Error", "java.util.ArrayList", "$.Arrays"], function () { -c$ = Clazz.decorateAsClass (function () { -this.Type = 0; -this.Name = null; -this.Order = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "AlignmentOrder"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (anOrder) { -this.Order = anOrder; -}, "java.util.List"); -Clazz.makeConstructor (c$, -function (orderFrom) { -this.Order = new java.util.ArrayList (); -for (var seq, $seq = orderFrom.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -this.Order.add (seq); -} -}, "jalview.datamodel.AlignmentI"); -Clazz.makeConstructor (c$, -function (orderFrom) { -this.Order = new java.util.ArrayList (java.util.Arrays.asList (orderFrom)); -}, "~A"); -Clazz.defineMethod (c$, "setType", -function (Type) { -this.Type = Type; -}, "~N"); -Clazz.defineMethod (c$, "getType", -function () { -return this.Type; -}); -Clazz.defineMethod (c$, "setName", -function (Name) { -this.Name = Name; -}, "~S"); -Clazz.defineMethod (c$, "getName", -function () { -return this.Name; -}); -Clazz.defineMethod (c$, "setOrder", -function (Order) { -this.Order = Order; -}, "java.util.List"); -Clazz.defineMethod (c$, "getOrder", -function () { -return this.Order; -}); -Clazz.defineMethod (c$, "updateSequence", -function (oldref, newref) { -var found = this.Order.indexOf (oldref); -if (found > -1) { -this.Order.set (found, newref); -}return found > -1; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "equals", -function (o) { -if (o == null || !(Clazz.instanceOf (o, jalview.datamodel.AlignmentOrder))) { -return false; -}return this.equals (o, true); -}, "~O"); -Clazz.defineMethod (c$, "equals", -function (o, identity) { -if (o !== this) { -if (o == null) { -return false; -}if (this.Order != null && o.Order != null && this.Order.size () == o.Order.size ()) { -if (!identity) { -throw new Error ("Weak sequenceI equivalence not yet implemented."); -} else { -for (var i = 0, j = o.Order.size (); i < j; i++) { -if (this.Order.get (i) !== o.Order.get (i)) { -return false; -}} -}} else { -return false; -}}return true; -}, "jalview.datamodel.AlignmentOrder,~B"); -Clazz.defineMethod (c$, "isConsistent", -function (o) { -return this.isConsistent (o, true); -}, "jalview.datamodel.AlignmentOrder"); -Clazz.defineMethod (c$, "isConsistent", -function (o, identity) { -if (o !== this) { -if (o == null) { -return false; -}if (this.Order != null && o.Order != null) { -var c; -var s; -if (o.Order.size () > this.Order.size ()) { -c = o.Order; -s = this.Order; -} else { -c = this.Order; -s = o.Order; -}if (!identity) { -throw new Error ("Weak sequenceI equivalence not yet implemented."); -} else { -var last = -1; -for (var i = 0, j = s.size (); i < j; i++) { -var pos = c.indexOf (s.get (i)); -if (pos > last) { -last = pos; -} else { -return false; -}} -}} else { -return false; -}}return true; -}, "jalview.datamodel.AlignmentOrder,~B"); -Clazz.defineStatics (c$, -"FILE", 0, -"MSA", 1, -"USER", 2); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.AlignmentOrder", ["java.lang.Error", "java.util.ArrayList", "$.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.Type = 0; +this.Name = null; +this.Order = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "AlignmentOrder"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (anOrder) { +this.Order = anOrder; +}, "java.util.List"); +Clazz.makeConstructor (c$, +function (orderFrom) { +this.Order = new java.util.ArrayList (); +for (var seq, $seq = orderFrom.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +this.Order.add (seq); +} +}, "jalview.datamodel.AlignmentI"); +Clazz.makeConstructor (c$, +function (orderFrom) { +this.Order = new java.util.ArrayList (java.util.Arrays.asList (orderFrom)); +}, "~A"); +Clazz.defineMethod (c$, "setType", +function (Type) { +this.Type = Type; +}, "~N"); +Clazz.defineMethod (c$, "getType", +function () { +return this.Type; +}); +Clazz.defineMethod (c$, "setName", +function (Name) { +this.Name = Name; +}, "~S"); +Clazz.defineMethod (c$, "getName", +function () { +return this.Name; +}); +Clazz.defineMethod (c$, "setOrder", +function (Order) { +this.Order = Order; +}, "java.util.List"); +Clazz.defineMethod (c$, "getOrder", +function () { +return this.Order; +}); +Clazz.defineMethod (c$, "updateSequence", +function (oldref, newref) { +var found = this.Order.indexOf (oldref); +if (found > -1) { +this.Order.set (found, newref); +}return found > -1; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "equals", +function (o) { +if (o == null || !(Clazz.instanceOf (o, jalview.datamodel.AlignmentOrder))) { +return false; +}return this.equals (o, true); +}, "~O"); +Clazz.defineMethod (c$, "equals", +function (o, identity) { +if (o !== this) { +if (o == null) { +return false; +}if (this.Order != null && o.Order != null && this.Order.size () == o.Order.size ()) { +if (!identity) { +throw new Error ("Weak sequenceI equivalence not yet implemented."); +} else { +for (var i = 0, j = o.Order.size (); i < j; i++) { +if (this.Order.get (i) !== o.Order.get (i)) { +return false; +}} +}} else { +return false; +}}return true; +}, "jalview.datamodel.AlignmentOrder,~B"); +Clazz.defineMethod (c$, "isConsistent", +function (o) { +return this.isConsistent (o, true); +}, "jalview.datamodel.AlignmentOrder"); +Clazz.defineMethod (c$, "isConsistent", +function (o, identity) { +if (o !== this) { +if (o == null) { +return false; +}if (this.Order != null && o.Order != null) { +var c; +var s; +if (o.Order.size () > this.Order.size ()) { +c = o.Order; +s = this.Order; +} else { +c = this.Order; +s = o.Order; +}if (!identity) { +throw new Error ("Weak sequenceI equivalence not yet implemented."); +} else { +var last = -1; +for (var i = 0, j = s.size (); i < j; i++) { +var pos = c.indexOf (s.get (i)); +if (pos > last) { +last = pos; +} else { +return false; +}} +}} else { +return false; +}}return true; +}, "jalview.datamodel.AlignmentOrder,~B"); +Clazz.defineStatics (c$, +"FILE", 0, +"MSA", 1, +"USER", 2); +}); diff --git a/bin/jalview/datamodel/AlignmentView.class b/bin/jalview/datamodel/AlignmentView.class index 122d311e9828f76a9d3bb6b05dfdb0d156ac69fe..08408b7ad6afccecd66ac8dc5832289fbfea18cf 100644 GIT binary patch delta 53 zcmV-50LuT!oB_C;0kHHm0cErGH1YxiasUyN>NimV6SGS=@CpG@vphpE0Rtca2a|6^ L7XcKrh(y2%Dkl;# delta 69 zcmV-L0J{IUoB_z30kHHm0d%wVH1YxifdCSd>Nimk5C8-R009990Z;(|0RI32vphKP b3IS5HEkiH?10etilVC&_0uchUctpSn2+R|S diff --git a/bin/jalview/datamodel/AlignmentView.js b/bin/jalview/datamodel/AlignmentView.js index e88c405..e559e79 100644 --- a/bin/jalview/datamodel/AlignmentView.js +++ b/bin/jalview/datamodel/AlignmentView.js @@ -1,625 +1,625 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.AlignmentView", ["jalview.datamodel.Alignment", "$.CigarArray", "$.ColumnSelection", "$.SeqCigar", "$.SequenceGroup", "jalview.util.MessageManager", "$.ShiftList", "java.lang.Error", "java.util.ArrayList", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.sequences = null; -this.contigs = null; -this.width = 0; -this.firstCol = 0; -this.scGroups = null; -this.$isNa = false; -if (!Clazz.isClassDefined ("jalview.datamodel.AlignmentView.ScGroup")) { -jalview.datamodel.AlignmentView.$AlignmentView$ScGroup$ (); -} -this.selected = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "AlignmentView"); -Clazz.defineMethod (c$, "isNa", -function () { -return this.$isNa; -}); -Clazz.makeConstructor (c$, -function (alignment, columnSelection, selection, hasHiddenColumns, selectedRegionOnly, recordGroups) { -this.construct ( new jalview.datamodel.CigarArray (alignment, (hasHiddenColumns ? columnSelection : null), (selectedRegionOnly ? selection : null)), (selectedRegionOnly && selection != null) ? selection.getStartRes () : 0); -this.$isNa = alignment.isNucleotide (); -var selseqs; -if (selection != null && selection.getSize () > 0) { -var sel = selection.getSequences (null); -this.selected = new java.util.Vector (); -selseqs = selection.getSequencesInOrder (alignment, selectedRegionOnly); -} else { -selseqs = alignment.getSequencesArray (); -}var seqsets = new java.util.ArrayList (); -var grps = new java.util.ArrayList (); -var gg = alignment.getGroups (); -grps.addAll (gg); -var sgrps = null; -var addedgps = null; -if (grps != null) { -if (selection != null && selectedRegionOnly) { -var ssel = selection.getStartRes (); -var esel = selection.getEndRes (); -var isg = new java.util.ArrayList (); -for (var sg, $sg = grps.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (!(sg.getStartRes () > esel || sg.getEndRes () < ssel)) { -if (sg.getStartRes () < ssel) { -sg.setStartRes (ssel); -}if (sg.getEndRes () > esel) { -sg.setEndRes (esel); -}sg.setStartRes (sg.getStartRes () - ssel + 1); -sg.setEndRes (sg.getEndRes () - ssel + 1); -isg.add (sg); -}} -grps = isg; -}sgrps = new Array (grps.size ()); -addedgps = Clazz.newBooleanArray (grps.size (), false); -for (var g = 0; g < sgrps.length; g++) { -var sg = grps.get (g); -sgrps[g] = Clazz.innerTypeInstance (jalview.datamodel.AlignmentView.ScGroup, this, null); -sgrps[g].sg = new jalview.datamodel.SequenceGroup (sg); -addedgps[g] = false; -seqsets.add (sg.getSequences ()); -} -}var csi = 0; -for (var i = 0; i < selseqs.length; i++) { -if (selseqs[i] != null) { -if (selection != null && selection.getSize () > 0 && !selectedRegionOnly) { -this.sequences[csi].setGroupMembership (this.selected); -this.selected.addElement (this.sequences[csi]); -}if (seqsets != null) { -for (var sg = 0; sg < sgrps.length; sg++) { -if ((seqsets.get (sg)).contains (selseqs[i])) { -this.sequences[csi].setGroupMembership (sgrps[sg]); -sgrps[sg].sg.deleteSequence (selseqs[i], false); -sgrps[sg].seqs.addElement (this.sequences[csi]); -if (!addedgps[sg]) { -if (this.scGroups == null) { -this.scGroups = new java.util.ArrayList (); -}addedgps[sg] = true; -this.scGroups.add (sgrps[sg]); -}}} -}csi++; -}} -for (var sg = 0; sg < sgrps.length; sg++) { -var sqs = sgrps[sg].sg.getSequencesAsArray (null); -for (var si = 0; si < sqs.length; si++) { -sgrps[sg].sg.deleteSequence (sqs[si], false); -} -sgrps[sg] = null; -} -}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup,~B,~B,~B"); -Clazz.makeConstructor (c$, -function (seqcigararray) { -if (!seqcigararray.isSeqCigarArray ()) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_can_only_make_alignmnet_from_cigararray")); -}this.contigs = seqcigararray.getDeletedRegions (); -this.sequences = seqcigararray.getSeqCigarArray (); -this.width = seqcigararray.getWidth (); -}, "jalview.datamodel.CigarArray"); -Clazz.makeConstructor (c$, -function (sdata, firstcol) { -this.construct (sdata); -this.firstCol = firstcol; -}, "jalview.datamodel.CigarArray,~N"); -Clazz.defineMethod (c$, "setSequences", -function (sequences) { -this.sequences = sequences; -}, "~A"); -Clazz.defineMethod (c$, "setContigs", -function (contigs) { -this.contigs = contigs; -}, "~A"); -Clazz.defineMethod (c$, "getSequences", -function () { -return this.sequences; -}); -Clazz.defineMethod (c$, "getContigs", -function () { -return this.contigs; -}); -Clazz.defineMethod (c$, "getAlignmentAndColumnSelection", -function (gapCharacter) { -var colsel = new jalview.datamodel.ColumnSelection (); -return Clazz.newArray (-1, [jalview.datamodel.SeqCigar.createAlignmentSequences (this.sequences, gapCharacter, colsel, this.contigs), colsel]); -}, "~S"); -Clazz.defineMethod (c$, "getVisibleAlignment", -function (c) { -var aln = this.getVisibleSeqs (c); -var vcal = new jalview.datamodel.Alignment (aln); -this.addPrunedGroupsInOrder (vcal, -1, -1, true); -return vcal; -}, "~S"); -Clazz.defineMethod (c$, "addPrunedGroupsInOrder", -($fz = function (vcal, gstart, gend, viscontigs) { -var r = false; -if (gstart > -1 && gstart <= gend) { -r = true; -}var aln = vcal.getSequencesArray (); -{ -{ -var nvg = (this.scGroups != null) ? this.scGroups.size () : 0; -if (nvg > 0) { -var nsg = new Array (nvg); -for (var g = 0; g < nvg; g++) { -var sg = this.scGroups.get (g).sg; -if (r) { -if (sg.getStartRes () > gend || sg.getEndRes () < gstart) { -nsg[g] = null; -continue; -}}nsg[g] = new jalview.datamodel.SequenceGroup (sg); -if (r && !viscontigs) { -if (nsg[g].getStartRes () < gstart) { -nsg[g].setStartRes (0); -} else { -nsg[g].setStartRes (nsg[g].getStartRes () - gstart); -nsg[g].setEndRes (nsg[g].getEndRes () - gstart); -}if (nsg[g].getEndRes () > (gend - gstart)) { -nsg[g].setEndRes (gend - gstart); -}}} -if (viscontigs) { -if (this.contigs != null) { -var p = 0; -var prune = new jalview.util.ShiftList (); -if (r) { -prune.addShift (gstart, -gstart); -}for (var h = 0; h < this.contigs.length; h += 3) { -{ -prune.addShift (p + this.contigs[h + 1], this.contigs[h + 2] - this.contigs[h + 1]); -}p = this.contigs[h + 1] + this.contigs[h + 2]; -} -for (var g = 0; g < nsg.length; g++) { -if (nsg[g] != null) { -var s = nsg[g].getStartRes (); -var t = nsg[g].getEndRes (); -var w = 1 + t - s; -if (r) { -if (s < gstart) { -s = gstart; -}if (t > gend) { -t = gend; -}}s = prune.shift (s); -t = prune.shift (t); -nsg[g].setStartRes (s); -nsg[g].setEndRes (t); -}} -}}for (var nsq = 0; nsq < aln.length; nsq++) { -for (var g = 0; g < nvg; g++) { -if (nsg[g] != null && this.sequences[nsq].isMemberOf (this.scGroups.get (g))) { -nsg[g].addSequence (aln[nsq], false); -}} -} -for (var g = 0; g < nvg; g++) { -if (nsg[g] != null && nsg[g].getSize () > 0) { -vcal.addGroup (nsg[g]); -}nsg[g] = null; -} -}}}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,~N,~N,~B"); -Clazz.defineMethod (c$, "getVisibleSeqs", -($fz = function (c) { -var aln = new Array (this.sequences.length); -for (var i = 0, j = this.sequences.length; i < j; i++) { -aln[i] = this.sequences[i].getSeq ('-'); -} -var seqs = this.getSequenceStrings ('-'); -for (var i = 0, j = aln.length; i < j; i++) { -aln[i].setSequence (seqs[i]); -} -return aln; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "getVisibleContigAlignments", -function (c) { -var nvc = 0; -var vcontigs = this.getVisibleContigs (); -var contigviews = this.getVisibleContigs (c); -var vcals = new Array (contigviews.length); -for (nvc = 0; nvc < contigviews.length; nvc++) { -vcals[nvc] = new jalview.datamodel.Alignment (contigviews[nvc]); -if (this.scGroups != null && this.scGroups.size () > 0) { -this.addPrunedGroupsInOrder (vcals[nvc], vcontigs[nvc * 2], vcontigs[nvc * 2 + 1], true); -}} -return vcals; -}, "~S"); -Clazz.defineMethod (c$, "getSequenceStrings", -function (c) { -var seqs = new Array (this.sequences.length); -for (var n = 0; n < this.sequences.length; n++) { -var fullseq = this.sequences[n].getSequenceString (c); -if (this.contigs != null) { -seqs[n] = ""; -var p = 0; -for (var h = 0; h < this.contigs.length; h += 3) { -seqs[n] += fullseq.substring (p, this.contigs[h + 1]); -p = this.contigs[h + 1] + this.contigs[h + 2]; -} -seqs[n] += fullseq.substring (p); -} else { -seqs[n] = fullseq; -}} -return seqs; -}, "~S"); -Clazz.defineMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz.defineMethod (c$, "setWidth", -function (width) { -this.width = width; -}, "~N"); -Clazz.defineMethod (c$, "getVisibleContigs", -function (gapCharacter) { -var smsa; -var njobs = 1; -if (this.sequences == null || this.width <= 0) { -return null; -}if (this.contigs != null && this.contigs.length > 0) { -var start = 0; -njobs = 0; -var fwidth = this.width; -for (var contig = 0; contig < this.contigs.length; contig += 3) { -if ((this.contigs[contig + 1] - start) > 0) { -njobs++; -}fwidth += this.contigs[contig + 2]; -start = this.contigs[contig + 1] + this.contigs[contig + 2]; -} -if (start < fwidth) { -njobs++; -}smsa = new Array (njobs); -start = 0; -var j = 0; -for (var contig = 0; contig < this.contigs.length; contig += 3) { -if (this.contigs[contig + 1] - start > 0) { -var mseq = new Array (this.sequences.length); -for (var s = 0; s < mseq.length; s++) { -mseq[s] = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, this.contigs[contig + 1]); -} -smsa[j] = mseq; -j++; -}start = this.contigs[contig + 1] + this.contigs[contig + 2]; -} -if (start < fwidth) { -var mseq = new Array (this.sequences.length); -for (var s = 0; s < mseq.length; s++) { -mseq[s] = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, fwidth + 1); -} -smsa[j] = mseq; -j++; -}} else { -smsa = new Array (1); -smsa[0] = new Array (this.sequences.length); -for (var s = 0; s < this.sequences.length; s++) { -smsa[0][s] = this.sequences[s].getSeq (gapCharacter); -} -}return smsa; -}, "~S"); -Clazz.defineMethod (c$, "getUpdatedView", -function (nvismsa, orders, gapCharacter) { -if (this.sequences == null || this.width <= 0) { -throw new Error (jalview.util.MessageManager.getString ("error.empty_view_cannot_be_updated")); -}if (nvismsa == null) { -throw new Error ("nvismsa==null. use getAlignmentAndColumnSelection() instead."); -}if (this.contigs != null && this.contigs.length > 0) { -var alignment = new Array (this.sequences.length); -var columnselection = new jalview.datamodel.ColumnSelection (); -if (this.contigs != null && this.contigs.length > 0) { -var start = 0; -var nwidth = 0; -var owidth = this.width; -var j = 0; -for (var contig = 0; contig < this.contigs.length; contig += 3) { -owidth += this.contigs[contig + 2]; -if (this.contigs[contig + 1] - start > 0) { -var swidth = 0; -if (nvismsa[j] != null) { -var mseq = nvismsa[j]; -var order = (orders == null) ? null : orders[j]; -j++; -if (mseq.length != this.sequences.length) { -throw new Error (jalview.util.MessageManager.formatMessage ("error.mismatch_between_number_of_sequences_in_block", Clazz.newArray (-1, [Integer.$valueOf (j).toString (), Integer.$valueOf (mseq.length).toString (), Integer.$valueOf (this.sequences.length).toString ()]))); -}swidth = mseq[0].getLength (); -for (var s = 0; s < mseq.length; s++) { -if (alignment[s] == null) { -alignment[s] = mseq[s]; -} else { -alignment[s].setSequence (alignment[s].getSequenceAsString () + mseq[s].getSequenceAsString ()); -if (mseq[s].getStart () <= mseq[s].getEnd ()) { -alignment[s].setEnd (mseq[s].getEnd ()); -}if (order != null) { -order.updateSequence (mseq[s], alignment[s]); -}}} -} else { -if (true) { -for (var s = 0; s < this.sequences.length; s++) { -var oseq = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, this.contigs[contig + 1]); -if (swidth < oseq.getLength ()) { -swidth = oseq.getLength (); -}if (alignment[s] == null) { -alignment[s] = oseq; -} else { -alignment[s].setSequence (alignment[s].getSequenceAsString () + oseq.getSequenceAsString ()); -if (oseq.getEnd () >= oseq.getStart ()) { -alignment[s].setEnd (oseq.getEnd ()); -}}} -}j++; -}nwidth += swidth; -}start = this.contigs[contig + 1] + this.contigs[contig + 2]; -for (var s = 0; s < this.sequences.length; s++) { -var hseq = this.sequences[s].getSeq (gapCharacter).getSubSequence (this.contigs[contig + 1], start); -if (alignment[s] == null) { -alignment[s] = hseq; -} else { -alignment[s].setSequence (alignment[s].getSequenceAsString () + hseq.getSequenceAsString ()); -if (hseq.getEnd () >= hseq.getStart ()) { -alignment[s].setEnd (hseq.getEnd ()); -}}} -columnselection.hideColumns (nwidth, nwidth + this.contigs[contig + 2] - 1); -nwidth += this.contigs[contig + 2]; -} -if (j < nvismsa.length) { -var swidth = 0; -if (nvismsa[j] != null) { -var mseq = nvismsa[j]; -var order = (orders != null) ? orders[j] : null; -swidth = mseq[0].getLength (); -for (var s = 0; s < mseq.length; s++) { -if (alignment[s] == null) { -alignment[s] = mseq[s]; -} else { -alignment[s].setSequence (alignment[s].getSequenceAsString () + mseq[s].getSequenceAsString ()); -if (mseq[s].getEnd () >= mseq[s].getStart ()) { -alignment[s].setEnd (mseq[s].getEnd ()); -}if (order != null) { -order.updateSequence (mseq[s], alignment[s]); -}}} -} else { -if (start < owidth) { -if (true) { -for (var s = 0; s < this.sequences.length; s++) { -var oseq = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, owidth + 1); -if (swidth < oseq.getLength ()) { -swidth = oseq.getLength (); -}if (alignment[s] == null) { -alignment[s] = oseq; -} else { -alignment[s].setSequence (alignment[s].getSequenceAsString () + oseq.getSequenceAsString ()); -if (oseq.getEnd () >= oseq.getStart ()) { -alignment[s].setEnd (oseq.getEnd ()); -}}} -nwidth += swidth; -} else { -throw new Error (jalview.util.MessageManager.getString ("error.padding_not_yet_implemented")); -}}}}}return Clazz.newArray (-1, [alignment, columnselection]); -} else { -if (nvismsa.length != 1) { -throw new Error (jalview.util.MessageManager.formatMessage ("error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view", Clazz.newArray (-1, [Integer.$valueOf (nvismsa.length).toString ()]))); -}if (nvismsa[0] != null) { -return Clazz.newArray (-1, [nvismsa[0], new jalview.datamodel.ColumnSelection ()]); -} else { -return this.getAlignmentAndColumnSelection (gapCharacter); -}}}, "~A,~A,~S"); -Clazz.defineMethod (c$, "getVisibleContigs", -function () { -if (this.contigs != null && this.contigs.length > 0) { -var start = 0; -var nvis = 0; -var fwidth = this.width; -for (var contig = 0; contig < this.contigs.length; contig += 3) { -if ((this.contigs[contig + 1] - start) > 0) { -nvis++; -}fwidth += this.contigs[contig + 2]; -start = this.contigs[contig + 1] + this.contigs[contig + 2]; -} -if (start < fwidth) { -nvis++; -}var viscontigs = Clazz.newIntArray (nvis * 2, 0); -nvis = 0; -start = 0; -for (var contig = 0; contig < this.contigs.length; contig += 3) { -if ((this.contigs[contig + 1] - start) > 0) { -viscontigs[nvis] = start; -viscontigs[nvis + 1] = this.contigs[contig + 1] - 1; -nvis += 2; -}start = this.contigs[contig + 1] + this.contigs[contig + 2]; -} -if (start < fwidth) { -viscontigs[nvis] = start; -viscontigs[nvis + 1] = fwidth; -nvis += 2; -}return viscontigs; -} else { -return Clazz.newIntArray (-1, [0, this.width]); -}}); -Clazz.defineMethod (c$, "getAlignmentOrigin", -function () { -return this.firstCol; -}); -Clazz.defineMethod (c$, "getVisibleContigMapFor", -function (gapMap) { -var delMap = null; -var viscontigs = this.getVisibleContigs (); -var spos = 0; -var i = 0; -if (viscontigs != null) { -delMap = Clazz.newIntArray (gapMap.length, 0); -for (var contig = 0; contig < viscontigs.length; contig += 2) { -while (spos < gapMap.length && gapMap[spos] < viscontigs[contig]) { -spos++; -} -while (spos < gapMap.length && gapMap[spos] <= viscontigs[contig + 1]) { -delMap[i++] = spos++; -} -} -var tmap = Clazz.newIntArray (i, 0); -System.arraycopy (delMap, 0, tmap, 0, i); -delMap = tmap; -}return delMap; -}, "~A"); -Clazz.defineMethod (c$, "getEditedSequences", -function (gc, $delete) { -var msf = this.getSequences (); -var aln = new Array (msf.length); -for (var i = 0, j = msf.length; i < j; i++) { -aln[i] = msf[i].getSeq (gc); -} -if ($delete) { -var sqs = this.getSequenceStrings (gc); -for (var i = 0; i < sqs.length; i++) { -aln[i].setSequence (sqs[i]); -sqs[i] = null; -} -}return aln; -}, "~S,~B"); -c$.summariseAlignmentView = Clazz.defineMethod (c$, "summariseAlignmentView", -function (view, os) { -os.print ("View has " + view.sequences.length + " of which "); -if (view.selected == null) { -os.print ("None"); -} else { -os.print (" " + view.selected.size ()); -}os.println (" are selected."); -os.print ("View is " + view.getWidth () + " columns wide"); -var viswid = 0; -var contigs = view.getContigs (); -if (contigs != null) { -viswid = view.width; -for (var i = 0; i < contigs.length; i += 3) { -viswid += contigs[i + 2]; -} -os.println ("with " + viswid + " visible columns spread over " + Clazz.doubleToInt (contigs.length / 3) + " regions."); -} else { -viswid = view.width; -os.println ("."); -}if (view.scGroups != null) { -os.println ("There are " + view.scGroups.size () + " groups defined on the view."); -for (var g = 0; g < view.scGroups.size (); g++) { -var sgr = view.scGroups.get (g); -os.println ("Group " + g + ": Name = " + sgr.sg.getName () + " Contains " + sgr.seqs.size () + " Seqs."); -os.println ("This group runs from " + sgr.sg.getStartRes () + " to " + sgr.sg.getEndRes ()); -for (var s = 0; s < sgr.seqs.size (); s++) { -if (!(sgr.seqs.elementAt (s)).isMemberOf (sgr)) { -os.println ("** WARNING: sequence " + (sgr.seqs.elementAt (s)).toString () + " is not marked as member of group."); -}} -} -var visal = view.getVisibleAlignment ('-'); -if (visal != null) { -os.println ("Vis. alignment is " + visal.getWidth () + " wide and has " + visal.getHeight () + " seqs."); -if (visal.getGroups () != null && visal.getGroups ().size () > 0) { -var i = 1; -for (var sg, $sg = visal.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -os.println ("Group " + (i++) + " begins at column " + sg.getStartRes () + " and ends at " + sg.getEndRes ()); -} -}}}}, "jalview.datamodel.AlignmentView,java.io.PrintStream"); -c$.testSelectionViews = Clazz.defineMethod (c$, "testSelectionViews", -function (alignment, csel, selection) { -System.out.println ("Testing standard view creation:\n"); -var view = null; -try { -System.out.println ("View with no hidden columns, no limit to selection, no groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, false, false); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection but no groups marked."); -} else { -throw e; -} -} -try { -System.out.println ("View with no hidden columns, no limit to selection, and all groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, false, true); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection marked but no groups marked."); -} else { -throw e; -} -} -try { -System.out.println ("View with no hidden columns, limited to selection and no groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, true, false); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection restricted but no groups marked."); -} else { -throw e; -} -} -try { -System.out.println ("View with no hidden columns, limited to selection, and all groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, true, true); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection restricted and groups marked."); -} else { -throw e; -} -} -try { -System.out.println ("View *with* hidden columns, no limit to selection, no groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, false, false); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection but no groups marked."); -} else { -throw e; -} -} -try { -System.out.println ("View *with* hidden columns, no limit to selection, and all groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, false, true); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection marked but no groups marked."); -} else { -throw e; -} -} -try { -System.out.println ("View *with* hidden columns, limited to selection and no groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, true, false); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection restricted but no groups marked."); -} else { -throw e; -} -} -try { -System.out.println ("View *with* hidden columns, limited to selection, and all groups to be collected:"); -view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, true, true); -jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to generate alignment with selection restricted and groups marked."); -} else { -throw e; -} -} -}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup"); -c$.$AlignmentView$ScGroup$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.seqs = null; -this.sg = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel.AlignmentView, "ScGroup"); -Clazz.makeConstructor (c$, -function () { -this.seqs = new java.util.Vector (); -}); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.AlignmentView", ["jalview.datamodel.Alignment", "$.CigarArray", "$.ColumnSelection", "$.SeqCigar", "$.SequenceGroup", "jalview.util.MessageManager", "$.ShiftList", "java.lang.Error", "java.util.ArrayList", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.sequences = null; +this.contigs = null; +this.width = 0; +this.firstCol = 0; +this.scGroups = null; +this.$isNa = false; +if (!Clazz.isClassDefined ("jalview.datamodel.AlignmentView.ScGroup")) { +jalview.datamodel.AlignmentView.$AlignmentView$ScGroup$ (); +} +this.selected = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "AlignmentView"); +Clazz.defineMethod (c$, "isNa", +function () { +return this.$isNa; +}); +Clazz.makeConstructor (c$, +function (alignment, columnSelection, selection, hasHiddenColumns, selectedRegionOnly, recordGroups) { +this.construct ( new jalview.datamodel.CigarArray (alignment, (hasHiddenColumns ? columnSelection : null), (selectedRegionOnly ? selection : null)), (selectedRegionOnly && selection != null) ? selection.getStartRes () : 0); +this.$isNa = alignment.isNucleotide (); +var selseqs; +if (selection != null && selection.getSize () > 0) { +var sel = selection.getSequences (null); +this.selected = new java.util.Vector (); +selseqs = selection.getSequencesInOrder (alignment, selectedRegionOnly); +} else { +selseqs = alignment.getSequencesArray (); +}var seqsets = new java.util.ArrayList (); +var grps = new java.util.ArrayList (); +var gg = alignment.getGroups (); +grps.addAll (gg); +var sgrps = null; +var addedgps = null; +if (grps != null) { +if (selection != null && selectedRegionOnly) { +var ssel = selection.getStartRes (); +var esel = selection.getEndRes (); +var isg = new java.util.ArrayList (); +for (var sg, $sg = grps.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (!(sg.getStartRes () > esel || sg.getEndRes () < ssel)) { +if (sg.getStartRes () < ssel) { +sg.setStartRes (ssel); +}if (sg.getEndRes () > esel) { +sg.setEndRes (esel); +}sg.setStartRes (sg.getStartRes () - ssel + 1); +sg.setEndRes (sg.getEndRes () - ssel + 1); +isg.add (sg); +}} +grps = isg; +}sgrps = new Array (grps.size ()); +addedgps = Clazz.newBooleanArray (grps.size (), false); +for (var g = 0; g < sgrps.length; g++) { +var sg = grps.get (g); +sgrps[g] = Clazz.innerTypeInstance (jalview.datamodel.AlignmentView.ScGroup, this, null); +sgrps[g].sg = new jalview.datamodel.SequenceGroup (sg); +addedgps[g] = false; +seqsets.add (sg.getSequences ()); +} +}var csi = 0; +for (var i = 0; i < selseqs.length; i++) { +if (selseqs[i] != null) { +if (selection != null && selection.getSize () > 0 && !selectedRegionOnly) { +this.sequences[csi].setGroupMembership (this.selected); +this.selected.addElement (this.sequences[csi]); +}if (seqsets != null) { +for (var sg = 0; sg < sgrps.length; sg++) { +if ((seqsets.get (sg)).contains (selseqs[i])) { +this.sequences[csi].setGroupMembership (sgrps[sg]); +sgrps[sg].sg.deleteSequence (selseqs[i], false); +sgrps[sg].seqs.addElement (this.sequences[csi]); +if (!addedgps[sg]) { +if (this.scGroups == null) { +this.scGroups = new java.util.ArrayList (); +}addedgps[sg] = true; +this.scGroups.add (sgrps[sg]); +}}} +}csi++; +}} +for (var sg = 0; sg < sgrps.length; sg++) { +var sqs = sgrps[sg].sg.getSequencesAsArray (null); +for (var si = 0; si < sqs.length; si++) { +sgrps[sg].sg.deleteSequence (sqs[si], false); +} +sgrps[sg] = null; +} +}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup,~B,~B,~B"); +Clazz.makeConstructor (c$, +function (seqcigararray) { +if (!seqcigararray.isSeqCigarArray ()) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_can_only_make_alignmnet_from_cigararray")); +}this.contigs = seqcigararray.getDeletedRegions (); +this.sequences = seqcigararray.getSeqCigarArray (); +this.width = seqcigararray.getWidth (); +}, "jalview.datamodel.CigarArray"); +Clazz.makeConstructor (c$, +function (sdata, firstcol) { +this.construct (sdata); +this.firstCol = firstcol; +}, "jalview.datamodel.CigarArray,~N"); +Clazz.defineMethod (c$, "setSequences", +function (sequences) { +this.sequences = sequences; +}, "~A"); +Clazz.defineMethod (c$, "setContigs", +function (contigs) { +this.contigs = contigs; +}, "~A"); +Clazz.defineMethod (c$, "getSequences", +function () { +return this.sequences; +}); +Clazz.defineMethod (c$, "getContigs", +function () { +return this.contigs; +}); +Clazz.defineMethod (c$, "getAlignmentAndColumnSelection", +function (gapCharacter) { +var colsel = new jalview.datamodel.ColumnSelection (); +return Clazz.newArray (-1, [jalview.datamodel.SeqCigar.createAlignmentSequences (this.sequences, gapCharacter, colsel, this.contigs), colsel]); +}, "~S"); +Clazz.defineMethod (c$, "getVisibleAlignment", +function (c) { +var aln = this.getVisibleSeqs (c); +var vcal = new jalview.datamodel.Alignment (aln); +this.addPrunedGroupsInOrder (vcal, -1, -1, true); +return vcal; +}, "~S"); +Clazz.defineMethod (c$, "addPrunedGroupsInOrder", +($fz = function (vcal, gstart, gend, viscontigs) { +var r = false; +if (gstart > -1 && gstart <= gend) { +r = true; +}var aln = vcal.getSequencesArray (); +{ +{ +var nvg = (this.scGroups != null) ? this.scGroups.size () : 0; +if (nvg > 0) { +var nsg = new Array (nvg); +for (var g = 0; g < nvg; g++) { +var sg = this.scGroups.get (g).sg; +if (r) { +if (sg.getStartRes () > gend || sg.getEndRes () < gstart) { +nsg[g] = null; +continue; +}}nsg[g] = new jalview.datamodel.SequenceGroup (sg); +if (r && !viscontigs) { +if (nsg[g].getStartRes () < gstart) { +nsg[g].setStartRes (0); +} else { +nsg[g].setStartRes (nsg[g].getStartRes () - gstart); +nsg[g].setEndRes (nsg[g].getEndRes () - gstart); +}if (nsg[g].getEndRes () > (gend - gstart)) { +nsg[g].setEndRes (gend - gstart); +}}} +if (viscontigs) { +if (this.contigs != null) { +var p = 0; +var prune = new jalview.util.ShiftList (); +if (r) { +prune.addShift (gstart, -gstart); +}for (var h = 0; h < this.contigs.length; h += 3) { +{ +prune.addShift (p + this.contigs[h + 1], this.contigs[h + 2] - this.contigs[h + 1]); +}p = this.contigs[h + 1] + this.contigs[h + 2]; +} +for (var g = 0; g < nsg.length; g++) { +if (nsg[g] != null) { +var s = nsg[g].getStartRes (); +var t = nsg[g].getEndRes (); +var w = 1 + t - s; +if (r) { +if (s < gstart) { +s = gstart; +}if (t > gend) { +t = gend; +}}s = prune.shift (s); +t = prune.shift (t); +nsg[g].setStartRes (s); +nsg[g].setEndRes (t); +}} +}}for (var nsq = 0; nsq < aln.length; nsq++) { +for (var g = 0; g < nvg; g++) { +if (nsg[g] != null && this.sequences[nsq].isMemberOf (this.scGroups.get (g))) { +nsg[g].addSequence (aln[nsq], false); +}} +} +for (var g = 0; g < nvg; g++) { +if (nsg[g] != null && nsg[g].getSize () > 0) { +vcal.addGroup (nsg[g]); +}nsg[g] = null; +} +}}}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,~N,~N,~B"); +Clazz.defineMethod (c$, "getVisibleSeqs", +($fz = function (c) { +var aln = new Array (this.sequences.length); +for (var i = 0, j = this.sequences.length; i < j; i++) { +aln[i] = this.sequences[i].getSeq ('-'); +} +var seqs = this.getSequenceStrings ('-'); +for (var i = 0, j = aln.length; i < j; i++) { +aln[i].setSequence (seqs[i]); +} +return aln; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "getVisibleContigAlignments", +function (c) { +var nvc = 0; +var vcontigs = this.getVisibleContigs (); +var contigviews = this.getVisibleContigs (c); +var vcals = new Array (contigviews.length); +for (nvc = 0; nvc < contigviews.length; nvc++) { +vcals[nvc] = new jalview.datamodel.Alignment (contigviews[nvc]); +if (this.scGroups != null && this.scGroups.size () > 0) { +this.addPrunedGroupsInOrder (vcals[nvc], vcontigs[nvc * 2], vcontigs[nvc * 2 + 1], true); +}} +return vcals; +}, "~S"); +Clazz.defineMethod (c$, "getSequenceStrings", +function (c) { +var seqs = new Array (this.sequences.length); +for (var n = 0; n < this.sequences.length; n++) { +var fullseq = this.sequences[n].getSequenceString (c); +if (this.contigs != null) { +seqs[n] = ""; +var p = 0; +for (var h = 0; h < this.contigs.length; h += 3) { +seqs[n] += fullseq.substring (p, this.contigs[h + 1]); +p = this.contigs[h + 1] + this.contigs[h + 2]; +} +seqs[n] += fullseq.substring (p); +} else { +seqs[n] = fullseq; +}} +return seqs; +}, "~S"); +Clazz.defineMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz.defineMethod (c$, "setWidth", +function (width) { +this.width = width; +}, "~N"); +Clazz.defineMethod (c$, "getVisibleContigs", +function (gapCharacter) { +var smsa; +var njobs = 1; +if (this.sequences == null || this.width <= 0) { +return null; +}if (this.contigs != null && this.contigs.length > 0) { +var start = 0; +njobs = 0; +var fwidth = this.width; +for (var contig = 0; contig < this.contigs.length; contig += 3) { +if ((this.contigs[contig + 1] - start) > 0) { +njobs++; +}fwidth += this.contigs[contig + 2]; +start = this.contigs[contig + 1] + this.contigs[contig + 2]; +} +if (start < fwidth) { +njobs++; +}smsa = new Array (njobs); +start = 0; +var j = 0; +for (var contig = 0; contig < this.contigs.length; contig += 3) { +if (this.contigs[contig + 1] - start > 0) { +var mseq = new Array (this.sequences.length); +for (var s = 0; s < mseq.length; s++) { +mseq[s] = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, this.contigs[contig + 1]); +} +smsa[j] = mseq; +j++; +}start = this.contigs[contig + 1] + this.contigs[contig + 2]; +} +if (start < fwidth) { +var mseq = new Array (this.sequences.length); +for (var s = 0; s < mseq.length; s++) { +mseq[s] = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, fwidth + 1); +} +smsa[j] = mseq; +j++; +}} else { +smsa = new Array (1); +smsa[0] = new Array (this.sequences.length); +for (var s = 0; s < this.sequences.length; s++) { +smsa[0][s] = this.sequences[s].getSeq (gapCharacter); +} +}return smsa; +}, "~S"); +Clazz.defineMethod (c$, "getUpdatedView", +function (nvismsa, orders, gapCharacter) { +if (this.sequences == null || this.width <= 0) { +throw new Error (jalview.util.MessageManager.getString ("error.empty_view_cannot_be_updated")); +}if (nvismsa == null) { +throw new Error ("nvismsa==null. use getAlignmentAndColumnSelection() instead."); +}if (this.contigs != null && this.contigs.length > 0) { +var alignment = new Array (this.sequences.length); +var columnselection = new jalview.datamodel.ColumnSelection (); +if (this.contigs != null && this.contigs.length > 0) { +var start = 0; +var nwidth = 0; +var owidth = this.width; +var j = 0; +for (var contig = 0; contig < this.contigs.length; contig += 3) { +owidth += this.contigs[contig + 2]; +if (this.contigs[contig + 1] - start > 0) { +var swidth = 0; +if (nvismsa[j] != null) { +var mseq = nvismsa[j]; +var order = (orders == null) ? null : orders[j]; +j++; +if (mseq.length != this.sequences.length) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.mismatch_between_number_of_sequences_in_block", Clazz.newArray (-1, [Integer.$valueOf (j).toString (), Integer.$valueOf (mseq.length).toString (), Integer.$valueOf (this.sequences.length).toString ()]))); +}swidth = mseq[0].getLength (); +for (var s = 0; s < mseq.length; s++) { +if (alignment[s] == null) { +alignment[s] = mseq[s]; +} else { +alignment[s].setSequence (alignment[s].getSequenceAsString () + mseq[s].getSequenceAsString ()); +if (mseq[s].getStart () <= mseq[s].getEnd ()) { +alignment[s].setEnd (mseq[s].getEnd ()); +}if (order != null) { +order.updateSequence (mseq[s], alignment[s]); +}}} +} else { +if (true) { +for (var s = 0; s < this.sequences.length; s++) { +var oseq = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, this.contigs[contig + 1]); +if (swidth < oseq.getLength ()) { +swidth = oseq.getLength (); +}if (alignment[s] == null) { +alignment[s] = oseq; +} else { +alignment[s].setSequence (alignment[s].getSequenceAsString () + oseq.getSequenceAsString ()); +if (oseq.getEnd () >= oseq.getStart ()) { +alignment[s].setEnd (oseq.getEnd ()); +}}} +}j++; +}nwidth += swidth; +}start = this.contigs[contig + 1] + this.contigs[contig + 2]; +for (var s = 0; s < this.sequences.length; s++) { +var hseq = this.sequences[s].getSeq (gapCharacter).getSubSequence (this.contigs[contig + 1], start); +if (alignment[s] == null) { +alignment[s] = hseq; +} else { +alignment[s].setSequence (alignment[s].getSequenceAsString () + hseq.getSequenceAsString ()); +if (hseq.getEnd () >= hseq.getStart ()) { +alignment[s].setEnd (hseq.getEnd ()); +}}} +columnselection.hideColumns (nwidth, nwidth + this.contigs[contig + 2] - 1); +nwidth += this.contigs[contig + 2]; +} +if (j < nvismsa.length) { +var swidth = 0; +if (nvismsa[j] != null) { +var mseq = nvismsa[j]; +var order = (orders != null) ? orders[j] : null; +swidth = mseq[0].getLength (); +for (var s = 0; s < mseq.length; s++) { +if (alignment[s] == null) { +alignment[s] = mseq[s]; +} else { +alignment[s].setSequence (alignment[s].getSequenceAsString () + mseq[s].getSequenceAsString ()); +if (mseq[s].getEnd () >= mseq[s].getStart ()) { +alignment[s].setEnd (mseq[s].getEnd ()); +}if (order != null) { +order.updateSequence (mseq[s], alignment[s]); +}}} +} else { +if (start < owidth) { +if (true) { +for (var s = 0; s < this.sequences.length; s++) { +var oseq = this.sequences[s].getSeq (gapCharacter).getSubSequence (start, owidth + 1); +if (swidth < oseq.getLength ()) { +swidth = oseq.getLength (); +}if (alignment[s] == null) { +alignment[s] = oseq; +} else { +alignment[s].setSequence (alignment[s].getSequenceAsString () + oseq.getSequenceAsString ()); +if (oseq.getEnd () >= oseq.getStart ()) { +alignment[s].setEnd (oseq.getEnd ()); +}}} +nwidth += swidth; +} else { +throw new Error (jalview.util.MessageManager.getString ("error.padding_not_yet_implemented")); +}}}}}return Clazz.newArray (-1, [alignment, columnselection]); +} else { +if (nvismsa.length != 1) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view", Clazz.newArray (-1, [Integer.$valueOf (nvismsa.length).toString ()]))); +}if (nvismsa[0] != null) { +return Clazz.newArray (-1, [nvismsa[0], new jalview.datamodel.ColumnSelection ()]); +} else { +return this.getAlignmentAndColumnSelection (gapCharacter); +}}}, "~A,~A,~S"); +Clazz.defineMethod (c$, "getVisibleContigs", +function () { +if (this.contigs != null && this.contigs.length > 0) { +var start = 0; +var nvis = 0; +var fwidth = this.width; +for (var contig = 0; contig < this.contigs.length; contig += 3) { +if ((this.contigs[contig + 1] - start) > 0) { +nvis++; +}fwidth += this.contigs[contig + 2]; +start = this.contigs[contig + 1] + this.contigs[contig + 2]; +} +if (start < fwidth) { +nvis++; +}var viscontigs = Clazz.newIntArray (nvis * 2, 0); +nvis = 0; +start = 0; +for (var contig = 0; contig < this.contigs.length; contig += 3) { +if ((this.contigs[contig + 1] - start) > 0) { +viscontigs[nvis] = start; +viscontigs[nvis + 1] = this.contigs[contig + 1] - 1; +nvis += 2; +}start = this.contigs[contig + 1] + this.contigs[contig + 2]; +} +if (start < fwidth) { +viscontigs[nvis] = start; +viscontigs[nvis + 1] = fwidth; +nvis += 2; +}return viscontigs; +} else { +return Clazz.newIntArray (-1, [0, this.width]); +}}); +Clazz.defineMethod (c$, "getAlignmentOrigin", +function () { +return this.firstCol; +}); +Clazz.defineMethod (c$, "getVisibleContigMapFor", +function (gapMap) { +var delMap = null; +var viscontigs = this.getVisibleContigs (); +var spos = 0; +var i = 0; +if (viscontigs != null) { +delMap = Clazz.newIntArray (gapMap.length, 0); +for (var contig = 0; contig < viscontigs.length; contig += 2) { +while (spos < gapMap.length && gapMap[spos] < viscontigs[contig]) { +spos++; +} +while (spos < gapMap.length && gapMap[spos] <= viscontigs[contig + 1]) { +delMap[i++] = spos++; +} +} +var tmap = Clazz.newIntArray (i, 0); +System.arraycopy (delMap, 0, tmap, 0, i); +delMap = tmap; +}return delMap; +}, "~A"); +Clazz.defineMethod (c$, "getEditedSequences", +function (gc, $delete) { +var msf = this.getSequences (); +var aln = new Array (msf.length); +for (var i = 0, j = msf.length; i < j; i++) { +aln[i] = msf[i].getSeq (gc); +} +if ($delete) { +var sqs = this.getSequenceStrings (gc); +for (var i = 0; i < sqs.length; i++) { +aln[i].setSequence (sqs[i]); +sqs[i] = null; +} +}return aln; +}, "~S,~B"); +c$.summariseAlignmentView = Clazz.defineMethod (c$, "summariseAlignmentView", +function (view, os) { +os.print ("View has " + view.sequences.length + " of which "); +if (view.selected == null) { +os.print ("None"); +} else { +os.print (" " + view.selected.size ()); +}os.println (" are selected."); +os.print ("View is " + view.getWidth () + " columns wide"); +var viswid = 0; +var contigs = view.getContigs (); +if (contigs != null) { +viswid = view.width; +for (var i = 0; i < contigs.length; i += 3) { +viswid += contigs[i + 2]; +} +os.println ("with " + viswid + " visible columns spread over " + Clazz.doubleToInt (contigs.length / 3) + " regions."); +} else { +viswid = view.width; +os.println ("."); +}if (view.scGroups != null) { +os.println ("There are " + view.scGroups.size () + " groups defined on the view."); +for (var g = 0; g < view.scGroups.size (); g++) { +var sgr = view.scGroups.get (g); +os.println ("Group " + g + ": Name = " + sgr.sg.getName () + " Contains " + sgr.seqs.size () + " Seqs."); +os.println ("This group runs from " + sgr.sg.getStartRes () + " to " + sgr.sg.getEndRes ()); +for (var s = 0; s < sgr.seqs.size (); s++) { +if (!(sgr.seqs.elementAt (s)).isMemberOf (sgr)) { +os.println ("** WARNING: sequence " + (sgr.seqs.elementAt (s)).toString () + " is not marked as member of group."); +}} +} +var visal = view.getVisibleAlignment ('-'); +if (visal != null) { +os.println ("Vis. alignment is " + visal.getWidth () + " wide and has " + visal.getHeight () + " seqs."); +if (visal.getGroups () != null && visal.getGroups ().size () > 0) { +var i = 1; +for (var sg, $sg = visal.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +os.println ("Group " + (i++) + " begins at column " + sg.getStartRes () + " and ends at " + sg.getEndRes ()); +} +}}}}, "jalview.datamodel.AlignmentView,java.io.PrintStream"); +c$.testSelectionViews = Clazz.defineMethod (c$, "testSelectionViews", +function (alignment, csel, selection) { +System.out.println ("Testing standard view creation:\n"); +var view = null; +try { +System.out.println ("View with no hidden columns, no limit to selection, no groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, false, false); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection but no groups marked."); +} else { +throw e; +} +} +try { +System.out.println ("View with no hidden columns, no limit to selection, and all groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, false, true); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection marked but no groups marked."); +} else { +throw e; +} +} +try { +System.out.println ("View with no hidden columns, limited to selection and no groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, true, false); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection restricted but no groups marked."); +} else { +throw e; +} +} +try { +System.out.println ("View with no hidden columns, limited to selection, and all groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, false, true, true); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection restricted and groups marked."); +} else { +throw e; +} +} +try { +System.out.println ("View *with* hidden columns, no limit to selection, no groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, false, false); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection but no groups marked."); +} else { +throw e; +} +} +try { +System.out.println ("View *with* hidden columns, no limit to selection, and all groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, false, true); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection marked but no groups marked."); +} else { +throw e; +} +} +try { +System.out.println ("View *with* hidden columns, limited to selection and no groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, true, false); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection restricted but no groups marked."); +} else { +throw e; +} +} +try { +System.out.println ("View *with* hidden columns, limited to selection, and all groups to be collected:"); +view = new jalview.datamodel.AlignmentView (alignment, csel, selection, true, true, true); +jalview.datamodel.AlignmentView.summariseAlignmentView (view, System.out); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to generate alignment with selection restricted and groups marked."); +} else { +throw e; +} +} +}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup"); +c$.$AlignmentView$ScGroup$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.seqs = null; +this.sg = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel.AlignmentView, "ScGroup"); +Clazz.makeConstructor (c$, +function () { +this.seqs = new java.util.Vector (); +}); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/datamodel/AnnotatedCollectionI.js b/bin/jalview/datamodel/AnnotatedCollectionI.js index 0dda32c..fd7a804 100644 --- a/bin/jalview/datamodel/AnnotatedCollectionI.js +++ b/bin/jalview/datamodel/AnnotatedCollectionI.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.SequenceCollectionI"], "jalview.datamodel.AnnotatedCollectionI", null, function () { -Clazz.declareInterface (jalview.datamodel, "AnnotatedCollectionI", jalview.datamodel.SequenceCollectionI); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.SequenceCollectionI"], "jalview.datamodel.AnnotatedCollectionI", null, function () { +Clazz.declareInterface (jalview.datamodel, "AnnotatedCollectionI", jalview.datamodel.SequenceCollectionI); +}); diff --git a/bin/jalview/datamodel/Annotation.class b/bin/jalview/datamodel/Annotation.class index ad9b0f6c0e2cad278dee7c2149ab438c3ad36617..043f3308f0825b28329db8a4dfc0805ed14f2c8f 100644 GIT binary patch delta 229 zcmX>o{91U!G!|}WhFl&7dxktl2ARnVS;QvCGjnX-$D+#2`GIh3{r?j@-`RsY5)ugI$!_* delta 188 zcmaDYd{B79G!||PhFl&7dxktl2I 0) { -sb.append ("\""); -sb.append (this.description); -sb.append ("\""); -}{ -sb.append (","); -}if (!Float.isNaN (this.value)) { -sb.append (this.value); -}if (this.colour != null) { -if (sb.length () > 0) { -sb.append (","); -}sb.append ("["); -sb.append (this.colour.getRed ()); -sb.append (","); -sb.append (this.colour.getGreen ()); -sb.append (","); -sb.append (this.colour.getBlue ()); -sb.append ("]"); -}return sb.toString (); -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.Annotation", ["java.lang.Float", "$.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.displayCharacter = ""; +this.description = ""; +this.secondaryStructure = ' '; +this.value = 0; +this.colour = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "Annotation"); +Clazz.makeConstructor (c$, +function (displayChar, desc, ss, val) { +this.displayCharacter = displayChar; +this.description = desc; +this.secondaryStructure = ss; +this.value = val; +}, "~S,~S,~S,~N"); +Clazz.makeConstructor (c$, +function (displayChar, desc, ss, val, colour) { +this.construct (displayChar, desc, ss, val); +this.colour = colour; +}, "~S,~S,~S,~N,java.awt.Color"); +Clazz.makeConstructor (c$, +function (that) { +if (that == null || this === that) { +return; +}if (that.displayCharacter != null) this.displayCharacter = String.instantialize (that.displayCharacter); +if (that.description != null) this.description = String.instantialize (that.description); +this.secondaryStructure = that.secondaryStructure; +this.value = that.value; +this.colour = that.colour; +}, "jalview.datamodel.Annotation"); +Clazz.makeConstructor (c$, +function (val) { +this.construct (null, null, ' ', val, null); +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +var sb = new StringBuffer (); +if (this.displayCharacter != null) { +sb.append ("\'"); +sb.append (this.displayCharacter); +sb.append ("\'"); +}{ +sb.append (","); +}if (this.secondaryStructure.charCodeAt (0) != 0 && !("" + this.displayCharacter).equals ("" + this.secondaryStructure)) { +sb.append ("\'"); +sb.append (this.secondaryStructure); +sb.append ("\'"); +}{ +sb.append (","); +}if (this.description != null && this.description.length > 0) { +sb.append ("\""); +sb.append (this.description); +sb.append ("\""); +}{ +sb.append (","); +}if (!Float.isNaN (this.value)) { +sb.append (this.value); +}if (this.colour != null) { +if (sb.length () > 0) { +sb.append (","); +}sb.append ("["); +sb.append ("" + this.colour.getRed ()); +sb.append (","); +sb.append ("" + this.colour.getGreen ()); +sb.append (","); +sb.append ("" + this.colour.getBlue ()); +sb.append ("]"); +}return sb.toString (); +}); +}); diff --git a/bin/jalview/datamodel/BinaryNode.js b/bin/jalview/datamodel/BinaryNode.js index 64fb764..7575508 100644 --- a/bin/jalview/datamodel/BinaryNode.js +++ b/bin/jalview/datamodel/BinaryNode.js @@ -1,112 +1,112 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.decorateAsClass (function () { -this.$element = null; -this.name = null; -this.$left = null; -this.$right = null; -this.$parent = null; -this.bootstrap = 0; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "BinaryNode"); -Clazz.makeConstructor (c$, -function () { -this.$left = this.$right = this.$parent = null; -this.bootstrap = 0; -}); -Clazz.makeConstructor (c$, -function (element, parent, name) { -this.$element = element; -this.$parent = parent; -this.name = name; -this.$left = this.$right = null; -}, "~O,jalview.datamodel.BinaryNode,~S"); -Clazz.defineMethod (c$, "element", -function () { -return this.$element; -}); -Clazz.defineMethod (c$, "setElement", -function (v) { -return this.$element = v; -}, "~O"); -Clazz.defineMethod (c$, "left", -function () { -return this.$left; -}); -Clazz.defineMethod (c$, "setLeft", -function (n) { -return this.$left = n; -}, "jalview.datamodel.BinaryNode"); -Clazz.defineMethod (c$, "right", -function () { -return this.$right; -}); -Clazz.defineMethod (c$, "setRight", -function (n) { -return this.$right = n; -}, "jalview.datamodel.BinaryNode"); -Clazz.defineMethod (c$, "parent", -function () { -return this.$parent; -}); -Clazz.defineMethod (c$, "setParent", -function (n) { -return this.$parent = n; -}, "jalview.datamodel.BinaryNode"); -Clazz.defineMethod (c$, "isLeaf", -function () { -return (this.$left == null) && (this.$right == null); -}); -Clazz.defineMethod (c$, "SetChildren", -function (leftchild, rightchild) { -if (leftchild != null) { -this.setLeft (leftchild); -leftchild.detach (); -leftchild.setParent (this); -}if (rightchild != null) { -this.setRight (rightchild); -rightchild.detach (); -rightchild.setParent (this); -}}, "jalview.datamodel.BinaryNode,jalview.datamodel.BinaryNode"); -Clazz.defineMethod (c$, "detach", -function () { -if (this.$parent != null) { -if (this.$parent.$left === this) { -this.$parent.$left = null; -} else { -if (this.$parent.$right === this) { -this.$parent.$right = null; -}}}this.$parent = null; -return this; -}); -Clazz.defineMethod (c$, "ascendLeft", -function () { -var c = this; -do { -c = c.parent (); -} while ((c != null) && (c.left () != null) && !c.left ().isLeaf ()); -return c; -}); -Clazz.defineMethod (c$, "ascendRight", -function () { -var c = this; -do { -c = c.parent (); -} while ((c != null) && (c.right () != null) && !c.right ().isLeaf ()); -return c; -}); -Clazz.defineMethod (c$, "setName", -function (name) { -this.name = name; -}, "~S"); -Clazz.defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz.defineMethod (c$, "setBootstrap", -function (boot) { -this.bootstrap = boot; -}, "~N"); -Clazz.defineMethod (c$, "getBootstrap", -function () { -return this.bootstrap; -}); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.decorateAsClass (function () { +this.$element = null; +this.name = null; +this.$left = null; +this.$right = null; +this.$parent = null; +this.bootstrap = 0; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "BinaryNode"); +Clazz.makeConstructor (c$, +function () { +this.$left = this.$right = this.$parent = null; +this.bootstrap = 0; +}); +Clazz.makeConstructor (c$, +function (element, parent, name) { +this.$element = element; +this.$parent = parent; +this.name = name; +this.$left = this.$right = null; +}, "~O,jalview.datamodel.BinaryNode,~S"); +Clazz.defineMethod (c$, "element", +function () { +return this.$element; +}); +Clazz.defineMethod (c$, "setElement", +function (v) { +return this.$element = v; +}, "~O"); +Clazz.defineMethod (c$, "left", +function () { +return this.$left; +}); +Clazz.defineMethod (c$, "setLeft", +function (n) { +return this.$left = n; +}, "jalview.datamodel.BinaryNode"); +Clazz.defineMethod (c$, "right", +function () { +return this.$right; +}); +Clazz.defineMethod (c$, "setRight", +function (n) { +return this.$right = n; +}, "jalview.datamodel.BinaryNode"); +Clazz.defineMethod (c$, "parent", +function () { +return this.$parent; +}); +Clazz.defineMethod (c$, "setParent", +function (n) { +return this.$parent = n; +}, "jalview.datamodel.BinaryNode"); +Clazz.defineMethod (c$, "isLeaf", +function () { +return (this.$left == null) && (this.$right == null); +}); +Clazz.defineMethod (c$, "SetChildren", +function (leftchild, rightchild) { +if (leftchild != null) { +this.setLeft (leftchild); +leftchild.detach (); +leftchild.setParent (this); +}if (rightchild != null) { +this.setRight (rightchild); +rightchild.detach (); +rightchild.setParent (this); +}}, "jalview.datamodel.BinaryNode,jalview.datamodel.BinaryNode"); +Clazz.defineMethod (c$, "detach", +function () { +if (this.$parent != null) { +if (this.$parent.$left === this) { +this.$parent.$left = null; +} else { +if (this.$parent.$right === this) { +this.$parent.$right = null; +}}}this.$parent = null; +return this; +}); +Clazz.defineMethod (c$, "ascendLeft", +function () { +var c = this; +do { +c = c.parent (); +} while ((c != null) && (c.left () != null) && !c.left ().isLeaf ()); +return c; +}); +Clazz.defineMethod (c$, "ascendRight", +function () { +var c = this; +do { +c = c.parent (); +} while ((c != null) && (c.right () != null) && !c.right ().isLeaf ()); +return c; +}); +Clazz.defineMethod (c$, "setName", +function (name) { +this.name = name; +}, "~S"); +Clazz.defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz.defineMethod (c$, "setBootstrap", +function (boot) { +this.bootstrap = boot; +}, "~N"); +Clazz.defineMethod (c$, "getBootstrap", +function () { +return this.bootstrap; +}); diff --git a/bin/jalview/datamodel/BinarySequence.js b/bin/jalview/datamodel/BinarySequence.js index 2285387..90b6b95 100644 --- a/bin/jalview/datamodel/BinarySequence.js +++ b/bin/jalview/datamodel/BinarySequence.js @@ -1,99 +1,99 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.Sequence", "java.lang.Exception"], "jalview.datamodel.BinarySequence", ["jalview.schemes.ResidueProperties"], function () { -c$ = Clazz.decorateAsClass (function () { -if (!Clazz.isClassDefined ("jalview.datamodel.BinarySequence.InvalidSequenceTypeException")) { -jalview.datamodel.BinarySequence.$BinarySequence$InvalidSequenceTypeException$ (); -} -this.binary = null; -this.dbinary = null; -this.isNa = false; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "BinarySequence", jalview.datamodel.Sequence); -Clazz.makeConstructor (c$, -function (s, isNa) { -Clazz.superConstructor (this, jalview.datamodel.BinarySequence, ["", s, 0, s.length]); -this.isNa = isNa; -}, "~S,~B"); -Clazz.defineMethod (c$, "initMatrixGetNoRes", -($fz = function () { -var nores = (this.isNa) ? 10 : 23; -this.dbinary = Clazz.newDoubleArray (this.getSequence ().length * nores, 0); -for (var i = 0; i < this.dbinary.length; i++) { -this.dbinary[i] = 0.0; -} -return nores; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getSymbolmatrix", -($fz = function () { -return (this.isNa) ? jalview.schemes.ResidueProperties.nucleotideIndex : jalview.schemes.ResidueProperties.aaIndex; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "encode", -function () { -var nores = this.initMatrixGetNoRes (); -var sindex = this.getSymbolmatrix (); -for (var i = 0; i < this.getSequence ().length; i++) { -var aanum = nores - 1; -try { -aanum = sindex[this.getCharAt (i).charCodeAt (0)]; -} catch (e) { -if (Clazz.exceptionOf (e, NullPointerException)) { -aanum = nores - 1; -} else { -throw e; -} -} -if (aanum >= nores) { -aanum = nores - 1; -}this.dbinary[(i * nores) + aanum] = 1.0; -} -}); -Clazz.defineMethod (c$, "matrixEncode", -function (matrix) { -if (this.isNa != matrix.isDNA ()) { -throw Clazz.innerTypeInstance (jalview.datamodel.BinarySequence.InvalidSequenceTypeException, this, null, "matrix " + matrix.getClass ().getCanonicalName () + " is not a valid matrix for " + (this.isNa ? "nucleotide" : "protein") + "sequences"); -}this.matrixEncode (matrix.isDNA () ? jalview.schemes.ResidueProperties.nucleotideIndex : jalview.schemes.ResidueProperties.aaIndex, matrix.getMatrix ()); -}, "jalview.schemes.ScoreMatrix"); -Clazz.defineMethod (c$, "matrixEncode", -($fz = function (aaIndex, matrix) { -var nores = this.initMatrixGetNoRes (); -for (var i = 0, iSize = this.getSequence ().length; i < iSize; i++) { -var aanum = nores - 1; -try { -aanum = aaIndex[this.getCharAt (i).charCodeAt (0)]; -} catch (e) { -if (Clazz.exceptionOf (e, NullPointerException)) { -aanum = nores - 1; -} else { -throw e; -} -} -if (aanum >= nores) { -aanum = nores - 1; -}for (var j = 0; j < nores; j++) { -this.dbinary[(i * nores) + j] = matrix[aanum][j]; -} -} -}, $fz.isPrivate = true, $fz), "~A,~A"); -Clazz.defineMethod (c$, "toBinaryString", -function () { -var out = ""; -for (var i = 0; i < this.binary.length; i++) { -out += ( new Integer (this.binary[i])).toString (); -if (i < (this.binary.length - 1)) { -out += " "; -}} -return out; -}); -Clazz.defineMethod (c$, "getDBinary", -function () { -return this.dbinary; -}); -c$.$BinarySequence$InvalidSequenceTypeException$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -Clazz.instantialize (this, arguments); -}, jalview.datamodel.BinarySequence, "InvalidSequenceTypeException", Exception); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.Sequence", "java.lang.Exception"], "jalview.datamodel.BinarySequence", ["jalview.schemes.ResidueProperties"], function () { +c$ = Clazz.decorateAsClass (function () { +if (!Clazz.isClassDefined ("jalview.datamodel.BinarySequence.InvalidSequenceTypeException")) { +jalview.datamodel.BinarySequence.$BinarySequence$InvalidSequenceTypeException$ (); +} +this.binary = null; +this.dbinary = null; +this.isNa = false; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "BinarySequence", jalview.datamodel.Sequence); +Clazz.makeConstructor (c$, +function (s, isNa) { +Clazz.superConstructor (this, jalview.datamodel.BinarySequence, ["", s, 0, s.length]); +this.isNa = isNa; +}, "~S,~B"); +Clazz.defineMethod (c$, "initMatrixGetNoRes", +($fz = function () { +var nores = (this.isNa) ? 10 : 23; +this.dbinary = Clazz.newDoubleArray (this.getSequence ().length * nores, 0); +for (var i = 0; i < this.dbinary.length; i++) { +this.dbinary[i] = 0.0; +} +return nores; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getSymbolmatrix", +($fz = function () { +return (this.isNa) ? jalview.schemes.ResidueProperties.nucleotideIndex : jalview.schemes.ResidueProperties.aaIndex; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "encode", +function () { +var nores = this.initMatrixGetNoRes (); +var sindex = this.getSymbolmatrix (); +for (var i = 0; i < this.getSequence ().length; i++) { +var aanum = nores - 1; +try { +aanum = sindex[this.getCharAt (i).charCodeAt (0)]; +} catch (e) { +if (Clazz.exceptionOf (e, NullPointerException)) { +aanum = nores - 1; +} else { +throw e; +} +} +if (aanum >= nores) { +aanum = nores - 1; +}this.dbinary[(i * nores) + aanum] = 1.0; +} +}); +Clazz.defineMethod (c$, "matrixEncode", +function (matrix) { +if (this.isNa != matrix.isDNA ()) { +throw Clazz.innerTypeInstance (jalview.datamodel.BinarySequence.InvalidSequenceTypeException, this, null, "matrix " + matrix.getClass ().getCanonicalName () + " is not a valid matrix for " + (this.isNa ? "nucleotide" : "protein") + "sequences"); +}this.matrixEncode (matrix.isDNA () ? jalview.schemes.ResidueProperties.nucleotideIndex : jalview.schemes.ResidueProperties.aaIndex, matrix.getMatrix ()); +}, "jalview.schemes.ScoreMatrix"); +Clazz.defineMethod (c$, "matrixEncode", +($fz = function (aaIndex, matrix) { +var nores = this.initMatrixGetNoRes (); +for (var i = 0, iSize = this.getSequence ().length; i < iSize; i++) { +var aanum = nores - 1; +try { +aanum = aaIndex[this.getCharAt (i).charCodeAt (0)]; +} catch (e) { +if (Clazz.exceptionOf (e, NullPointerException)) { +aanum = nores - 1; +} else { +throw e; +} +} +if (aanum >= nores) { +aanum = nores - 1; +}for (var j = 0; j < nores; j++) { +this.dbinary[(i * nores) + j] = matrix[aanum][j]; +} +} +}, $fz.isPrivate = true, $fz), "~A,~A"); +Clazz.defineMethod (c$, "toBinaryString", +function () { +var out = ""; +for (var i = 0; i < this.binary.length; i++) { +out += ( new Integer (this.binary[i])).toString (); +if (i < (this.binary.length - 1)) { +out += " "; +}} +return out; +}); +Clazz.defineMethod (c$, "getDBinary", +function () { +return this.dbinary; +}); +c$.$BinarySequence$InvalidSequenceTypeException$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +Clazz.instantialize (this, arguments); +}, jalview.datamodel.BinarySequence, "InvalidSequenceTypeException", Exception); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/datamodel/CigarArray.class b/bin/jalview/datamodel/CigarArray.class index c31f49e0ff94cc06294168b9fca19d8be6fe8c31..10b48a9697e4714110db1112daea4bffd2eda569 100644 GIT binary patch delta 42 zcmV+_0M-AsG_*9ZXb}OBvuP3U0S2G|5B~rmlfe@ilXnwq0~P=Wlc5t6v-uM|21IEN A0RR91 delta 44 zcmV+{0Mq}pG_^FaXb}OCvuP3U0S2J}5dQ!nlfe@ilXnwq0}}uTlc5t60Rpr56Fdf7 Cs15@F diff --git a/bin/jalview/datamodel/CigarArray.js b/bin/jalview/datamodel/CigarArray.js index b18df9f..7f45aff 100644 --- a/bin/jalview/datamodel/CigarArray.js +++ b/bin/jalview/datamodel/CigarArray.js @@ -1,188 +1,188 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.CigarBase"], "jalview.datamodel.CigarArray", ["jalview.datamodel.CigarCigar", "$.SeqCigar", "java.lang.StringBuffer", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.refCigars = null; -this.seqcigararray = false; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "CigarArray", jalview.datamodel.CigarBase); -Clazz.defineMethod (c$, "isSeqCigarArray", -function () { -return this.seqcigararray; -}); -Clazz.makeConstructor (c$, -function (cigars) { -Clazz.superConstructor (this, jalview.datamodel.CigarArray); -this.seqcigararray = true; -if (cigars != null && cigars.length > 0) { -this.refCigars = new Array (cigars.length); -for (var c = 0; c < cigars.length; c++) { -this.refCigars[c] = cigars[c]; -if (!((Clazz.instanceOf (cigars[c], jalview.datamodel.SeqCigar)) || Clazz.instanceOf (cigars[c], jalview.datamodel.CigarCigar))) { -this.seqcigararray = false; -}} -}}, "~A"); -Clazz.makeConstructor (c$, -function (alignment, columnSelection, selectionGroup) { -this.construct (jalview.datamodel.CigarArray.constructSeqCigarArray (alignment, selectionGroup)); -this.constructFromAlignment (alignment, columnSelection != null ? columnSelection.getHiddenColumns () : null, selectionGroup); -}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup"); -c$._calcStartEndBounds = Clazz.defineMethod (c$, "_calcStartEndBounds", -($fz = function (alignment, selectionGroup) { -var startend = Clazz.newIntArray (-1, [0, 0, 0]); -if (selectionGroup != null) { -startend[0] = selectionGroup.getSize (); -startend[1] = selectionGroup.getStartRes (); -startend[2] = selectionGroup.getEndRes (); -} else { -startend[0] = alignment.getHeight (); -startend[2] = alignment.getWidth () - 1; -}return startend; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); -c$.constructSeqCigarArray = Clazz.defineMethod (c$, "constructSeqCigarArray", -function (alignment, selectionGroup) { -var seqs = null; -var i; -var iSize; -var _startend = jalview.datamodel.CigarArray._calcStartEndBounds (alignment, selectionGroup); -var start = _startend[1]; -var end = _startend[2]; -if (selectionGroup != null) { -iSize = selectionGroup.getSize (); -seqs = selectionGroup.getSequencesInOrder (alignment); -start = selectionGroup.getStartRes (); -end = selectionGroup.getEndRes (); -} else { -iSize = alignment.getHeight (); -seqs = alignment.getSequencesArray (); -end = alignment.getWidth () - 1; -}var selseqs = new Array (iSize); -for (i = 0; i < iSize; i++) { -selseqs[i] = new jalview.datamodel.SeqCigar (seqs[i], start, end); -} -return selseqs; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "constructFromAlignment", -($fz = function (alignment, list, selectionGroup) { -var _startend = jalview.datamodel.CigarArray._calcStartEndBounds (alignment, selectionGroup); -var start = _startend[1]; -var end = _startend[2]; -if (list != null) { -var region; -var hideStart; -var hideEnd; -var last = start; -for (var j = 0; new Boolean (last < end & j < list.size ()).valueOf (); j++) { -region = list.get (j); -hideStart = region[0]; -hideEnd = region[1]; -if (hideStart < last) { -if (hideEnd > last) { -hideStart = last; -} else { -continue; -}}if (hideStart > end) { -break; -}if (hideEnd > end) { -hideEnd = end; -}if (hideStart > hideEnd) { -break; -}if (last < hideStart) { -this.addOperation ('M', hideStart - last); -}this.addOperation ('D', 1 + hideEnd - hideStart); -last = hideEnd + 1; -} -if (last < end) { -this.addOperation ('M', end - last + 1); -}} else { -this.addOperation ('M', end - start + 1); -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List,jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "getArrayofSequenceAndDeletions", -function (GapChar) { -if (this.refCigars == null || this.refCigars.length == 0 || this.length == 0) { -return null; -}var sqanddels = new Array (this.refCigars.length); -for (var c = 0; c < this.refCigars.length; c++) { -var refString = this.refCigars[c].getSequenceString (GapChar); -if (refString != null) { -sqanddels[c] = this.getSequenceAndDeletions (refString, GapChar); -} else { -sqanddels[c] = null; -}} -return sqanddels; -}, "~S"); -Clazz.defineMethod (c$, "getSequenceString", -function (GapChar) { -if (this.length == 0 || this.refCigars == null) { -return ""; -}var seqStrings = new StringBuffer (); -var sqanddels = this.getArrayofSequenceAndDeletions (GapChar); -for (var c = 0; c < this.refCigars.length; c++) { -if (sqanddels[c] != null) { -seqStrings.append (sqanddels[c][0]); -sqanddels[c][0] = null; -}seqStrings.append ('\n'); -} -return seqStrings.toString (); -}, "~S"); -Clazz.defineMethod (c$, "getSequenceStrings", -function (GapChar) { -if (this.length == 0 || this.refCigars == null || this.refCigars.length == 0) { -return null; -}var sqanddels = this.getArrayofSequenceAndDeletions (GapChar); -var seqs = new Array (sqanddels.length); -for (var c = 0; c < this.refCigars.length; c++) { -seqs[c] = sqanddels[c][0]; -} -return seqs; -}, "~S"); -Clazz.defineMethod (c$, "applyDeletions", -function () { -var delpos = null; -if (this.length == 0) { -return null; -}var cursor = 0; -var vcursor = 0; -var offset = 0; -var i = 0; -while (i < this.length) { -if (this.operation[i] != 'D') { -if (this.operation[i] == 'M') { -cursor += this.range[i]; -}vcursor += this.range[i++]; -} else { -if (delpos == null) { -delpos = new java.util.Vector (); -}var delstart = cursor; -var delend = cursor + this.range[i] - 1; -delpos.addElement ( Clazz.newIntArray (-1, [vcursor + offset, this.range[i]])); -offset += this.range[i] - 1; -System.arraycopy (this.operation, i + 1, this.operation, i, this.length - i); -System.arraycopy (this.range, i + 1, this.range, i, this.length - i); -this.length--; -for (var s = 0; s < this.refCigars.length; s++) { -var d = this.refCigars[s].deleteRange (delstart, delend); -} -}} -if (delpos != null) { -var pos = Clazz.newIntArray (delpos.size () * 2, 0); -for (var k = 0, l = delpos.size (); k < l; k++) { -var dr = (delpos.elementAt (k)); -pos[k * 2] = dr[0]; -pos[k * 2 + 1] = dr[1]; -delpos.setElementAt (null, k); -} -delpos = null; -return pos; -}return null; -}); -Clazz.defineMethod (c$, "getSeqCigarArray", -function () { -if (!this.isSeqCigarArray ()) { -return null; -}var sa = new Array (this.refCigars.length); -for (var i = 0; i < this.refCigars.length; i++) { -sa[i] = this.refCigars[i]; -} -return sa; -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.CigarBase"], "jalview.datamodel.CigarArray", ["jalview.datamodel.CigarCigar", "$.SeqCigar", "java.lang.StringBuffer", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.refCigars = null; +this.seqcigararray = false; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "CigarArray", jalview.datamodel.CigarBase); +Clazz.defineMethod (c$, "isSeqCigarArray", +function () { +return this.seqcigararray; +}); +Clazz.makeConstructor (c$, +function (cigars) { +Clazz.superConstructor (this, jalview.datamodel.CigarArray); +this.seqcigararray = true; +if (cigars != null && cigars.length > 0) { +this.refCigars = new Array (cigars.length); +for (var c = 0; c < cigars.length; c++) { +this.refCigars[c] = cigars[c]; +if (!((Clazz.instanceOf (cigars[c], jalview.datamodel.SeqCigar)) || Clazz.instanceOf (cigars[c], jalview.datamodel.CigarCigar))) { +this.seqcigararray = false; +}} +}}, "~A"); +Clazz.makeConstructor (c$, +function (alignment, columnSelection, selectionGroup) { +this.construct (jalview.datamodel.CigarArray.constructSeqCigarArray (alignment, selectionGroup)); +this.constructFromAlignment (alignment, columnSelection != null ? columnSelection.getHiddenColumns () : null, selectionGroup); +}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,jalview.datamodel.SequenceGroup"); +c$._calcStartEndBounds = Clazz.defineMethod (c$, "_calcStartEndBounds", +($fz = function (alignment, selectionGroup) { +var startend = Clazz.newIntArray (-1, [0, 0, 0]); +if (selectionGroup != null) { +startend[0] = selectionGroup.getSize (); +startend[1] = selectionGroup.getStartRes (); +startend[2] = selectionGroup.getEndRes (); +} else { +startend[0] = alignment.getHeight (); +startend[2] = alignment.getWidth () - 1; +}return startend; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); +c$.constructSeqCigarArray = Clazz.defineMethod (c$, "constructSeqCigarArray", +function (alignment, selectionGroup) { +var seqs = null; +var i; +var iSize; +var _startend = jalview.datamodel.CigarArray._calcStartEndBounds (alignment, selectionGroup); +var start = _startend[1]; +var end = _startend[2]; +if (selectionGroup != null) { +iSize = selectionGroup.getSize (); +seqs = selectionGroup.getSequencesInOrder (alignment); +start = selectionGroup.getStartRes (); +end = selectionGroup.getEndRes (); +} else { +iSize = alignment.getHeight (); +seqs = alignment.getSequencesArray (); +end = alignment.getWidth () - 1; +}var selseqs = new Array (iSize); +for (i = 0; i < iSize; i++) { +selseqs[i] = new jalview.datamodel.SeqCigar (seqs[i], start, end); +} +return selseqs; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "constructFromAlignment", +($fz = function (alignment, list, selectionGroup) { +var _startend = jalview.datamodel.CigarArray._calcStartEndBounds (alignment, selectionGroup); +var start = _startend[1]; +var end = _startend[2]; +if (list != null) { +var region; +var hideStart; +var hideEnd; +var last = start; +for (var j = 0; new Boolean (last < end & j < list.size ()).valueOf (); j++) { +region = list.get (j); +hideStart = region[0]; +hideEnd = region[1]; +if (hideStart < last) { +if (hideEnd > last) { +hideStart = last; +} else { +continue; +}}if (hideStart > end) { +break; +}if (hideEnd > end) { +hideEnd = end; +}if (hideStart > hideEnd) { +break; +}if (last < hideStart) { +this.addOperation ('M', hideStart - last); +}this.addOperation ('D', 1 + hideEnd - hideStart); +last = hideEnd + 1; +} +if (last < end) { +this.addOperation ('M', end - last + 1); +}} else { +this.addOperation ('M', end - start + 1); +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List,jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "getArrayofSequenceAndDeletions", +function (GapChar) { +if (this.refCigars == null || this.refCigars.length == 0 || this.length == 0) { +return null; +}var sqanddels = new Array (this.refCigars.length); +for (var c = 0; c < this.refCigars.length; c++) { +var refString = this.refCigars[c].getSequenceString (GapChar); +if (refString != null) { +sqanddels[c] = this.getSequenceAndDeletions (refString, GapChar); +} else { +sqanddels[c] = null; +}} +return sqanddels; +}, "~S"); +Clazz.defineMethod (c$, "getSequenceString", +function (GapChar) { +if (this.length == 0 || this.refCigars == null) { +return ""; +}var seqStrings = new StringBuffer (); +var sqanddels = this.getArrayofSequenceAndDeletions (GapChar); +for (var c = 0; c < this.refCigars.length; c++) { +if (sqanddels[c] != null) { +seqStrings.append (sqanddels[c][0]); +sqanddels[c][0] = null; +}seqStrings.append ('\n'); +} +return seqStrings.toString (); +}, "~S"); +Clazz.defineMethod (c$, "getSequenceStrings", +function (GapChar) { +if (this.length == 0 || this.refCigars == null || this.refCigars.length == 0) { +return null; +}var sqanddels = this.getArrayofSequenceAndDeletions (GapChar); +var seqs = new Array (sqanddels.length); +for (var c = 0; c < this.refCigars.length; c++) { +seqs[c] = sqanddels[c][0]; +} +return seqs; +}, "~S"); +Clazz.defineMethod (c$, "applyDeletions", +function () { +var delpos = null; +if (this.length == 0) { +return null; +}var cursor = 0; +var vcursor = 0; +var offset = 0; +var i = 0; +while (i < this.length) { +if (this.operation[i] != 'D') { +if (this.operation[i] == 'M') { +cursor += this.range[i]; +}vcursor += this.range[i++]; +} else { +if (delpos == null) { +delpos = new java.util.Vector (); +}var delstart = cursor; +var delend = cursor + this.range[i] - 1; +delpos.addElement ( Clazz.newIntArray (-1, [vcursor + offset, this.range[i]])); +offset += this.range[i] - 1; +System.arraycopy (this.operation, i + 1, this.operation, i, this.length - i); +System.arraycopy (this.range, i + 1, this.range, i, this.length - i); +this.length--; +for (var s = 0; s < this.refCigars.length; s++) { +var d = this.refCigars[s].deleteRange (delstart, delend); +} +}} +if (delpos != null) { +var pos = Clazz.newIntArray (delpos.size () * 2, 0); +for (var k = 0, l = delpos.size (); k < l; k++) { +var dr = (delpos.elementAt (k)); +pos[k * 2] = dr[0]; +pos[k * 2 + 1] = dr[1]; +delpos.setElementAt (null, k); +} +delpos = null; +return pos; +}return null; +}); +Clazz.defineMethod (c$, "getSeqCigarArray", +function () { +if (!this.isSeqCigarArray ()) { +return null; +}var sa = new Array (this.refCigars.length); +for (var i = 0; i < this.refCigars.length; i++) { +sa[i] = this.refCigars[i]; +} +return sa; +}); +}); diff --git a/bin/jalview/datamodel/CigarBase.class b/bin/jalview/datamodel/CigarBase.class index d6583684f0ee21b41a054f760db8b730d934db05..7417a4dce3c56ea2cde6181993333590f8121bc5 100644 GIT binary patch delta 36 scmX?ObJAwRF;T|i&BsL@n3;_j1SfMzs&jCN@hJUb5D?jHBPqZN0NTL`kpKVy delta 39 vcmX?UbH--FF;T{{&BsL@n3+u(L?&}ds&lh42{Z91{bCRhWZG;gDZmN<@=OVr diff --git a/bin/jalview/datamodel/CigarBase.js b/bin/jalview/datamodel/CigarBase.js index bd75085..5b88b3f 100644 --- a/bin/jalview/datamodel/CigarBase.js +++ b/bin/jalview/datamodel/CigarBase.js @@ -1,310 +1,310 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.CigarBase", ["jalview.util.MessageManager", "java.lang.Error", "$.Exception", "$.StringBuffer", "java.util.Vector", "javajs.util.AU"], function () { -c$ = Clazz.decorateAsClass (function () { -this.length = 0; -this._inc_length = 10; -this.operation = null; -this.range = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "CigarBase"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "getSequenceAndDeletions", -function (reference, GapChar) { -var rlength = 0; -var deletions = javajs.util.AU.newInt2 (this.length); -var trunc_deletions = null; -var sq = new StringBuffer (); -var cursor = 0; -var alcursor = 0; -var start = 0; -var startpos = 0; -var end = 0; -var endpos = 0; -var delcount = -1; -var consecutive_del = false; -if (this.length == 0) { -return null; -}if (reference != null) { -rlength = reference.length; -}var modstart = true; -for (var i = 0; i < this.length; i++) { -switch (this.operation[i]) { -case 'D': -if (!consecutive_del) { -deletions[++delcount] = Clazz.newIntArray (-1, [cursor, 0, alcursor]); -}cursor += this.range[i]; -deletions[delcount][1] = cursor - 1; -consecutive_del = true; -break; -case 'I': -consecutive_del = false; -for (var r = 0; r < this.range[i]; r++) { -sq.append (GapChar); -alcursor++; -} -break; -case 'M': -consecutive_del = false; -if (modstart) { -start = cursor; -startpos = alcursor; -modstart = false; -}if (reference != null) { -var sbend = cursor + this.range[i]; -if (sbend > rlength) { -sq.append (reference.substring (cursor, rlength)); -while (sbend-- >= rlength) { -sq.append (GapChar); -} -} else { -sq.append (reference.substring (cursor, sbend)); -}}alcursor += this.range[i]; -cursor += this.range[i]; -end = cursor - 1; -endpos = alcursor; -break; -default: -throw new Error (jalview.util.MessageManager.formatMessage ("error.unknown_seq_cigar_operation", Clazz.newArray (-1, [ new StringBuffer (this.operation[i].charCodeAt (0)).toString ()]))); -} -} -if (++delcount > 0) { -trunc_deletions = Clazz.newIntArray (delcount, 0); -System.arraycopy (deletions, 0, trunc_deletions, 0, delcount); -}deletions = null; -return Clazz.newArray (-1, [((reference != null) ? sq.toString () : null), Clazz.newIntArray (-1, [start, startpos, end, endpos]), trunc_deletions]); -}, "~S,~S"); -Clazz.defineMethod (c$, "compact_operations", -function () { -var i = 1; -if (this.operation == null) { -return; -}var last = this.operation[0]; -while (i < this.length) { -if (last == this.operation[i]) { -this.range[i - 1] += this.range[i]; -var r = this.length - i; -if (r > 0) { -System.arraycopy (this.range, i + 1, this.range, i, r); -System.arraycopy (this.operation, i + 1, this.operation, i, r); -}this.length--; -} else { -last = this.operation[i++]; -}} -}); -c$.parseCigarString = Clazz.defineMethod (c$, "parseCigarString", -function (cigarString) { -var ops = 0; -for (var i = 0, l = cigarString.length; i < l; i++) { -var c = cigarString.charAt (i); -if (c == 'M' || c.charCodeAt (0) == (45) || c == 'I' || c.charCodeAt (0) == (41) || c == 'D' || c.charCodeAt (0) == (36)) { -ops++; -}} -var operation = Clazz.newCharArray (ops, '\0'); -var range = Clazz.newIntArray (ops, 0); -var op = 0; -var i = 0; -var l = cigarString.length; -while (i < l) { -var c; -var j = i; -do { -c = cigarString.charAt (j++); -} while (c >= '0' && c <= '9' && j < l); -if (j >= l && c >= '0' && c <= '9') { -throw new Exception (jalview.util.MessageManager.getString ("exception.unterminated_cigar_string")); -}try { -var rangeint = cigarString.substring (i, j - 1); -range[op] = Integer.parseInt (rangeint); -i = j; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_bug_parse_cigar_string")); -} else { -throw e; -} -} -if (c >= 'a' && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) - 32); -}if ((c == 'M' || c == 'I' || c == 'D')) { -operation[op++] = c; -} else { -throw new Exception (jalview.util.MessageManager.formatMessage ("exception.unexpected_operation_cigar_string_pos", Clazz.newArray (-1, [ new StringBuffer (c.charCodeAt (0)).toString (), Integer.$valueOf (i).toString (), cigarString]))); -}} -return Clazz.newArray (-1, [operation, range]); -}, "~S"); -Clazz.defineMethod (c$, "addOperation", -function (op, range) { -if (op >= 'a' && op <= 'z') { -op = String.fromCharCode (op.charCodeAt (0) - 32); -}if (op != 'M' && op != 'D' && op != 'I') { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_invalid_operation_string")); -}if (range == 0) { -return; -}if (range < 0) { -throw new Error (jalview.util.MessageManager.getString ("error.invalid_range_string")); -}var lngth = 0; -if (this.operation == null) { -this.operation = Clazz.newCharArray (this._inc_length, '\0'); -this.range = Clazz.newIntArray (this._inc_length, 0); -}if (this.length + 1 == this.operation.length) { -var ops = this.operation; -this.operation = Clazz.newCharArray (this.length + 1 + this._inc_length, '\0'); -System.arraycopy (ops, 0, this.operation, 0, this.length); -ops = null; -var rng = this.range; -this.range = Clazz.newIntArray (this.length + 1 + this._inc_length, 0); -System.arraycopy (rng, 0, this.range, 0, this.length); -rng = null; -}if ((this.length > 0) && (this.operation[this.length - 1] == op)) { -this.length--; -} else { -this.range[this.length] = 0; -}this.operation[this.length] = op; -this.range[this.length++] += range; -}, "~S,~N"); -Clazz.defineMethod (c$, "deleteRange", -function (start, end) { -var deleted = 0; -if (this.length == 0) { -return deleted; -}if (start < 0 || start > end) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_delete_range_out_of_bounds")); -}var cursor = 0; -var rlength = 1 + end - start; -var oldlen = this.length; -var o = 0; -var editing = false; -var oldops = this.operation; -var oldrange = this.range; -this.length = 0; -this.operation = null; -this.range = null; -this.compact_operations (); -while (o < oldlen && cursor <= end && rlength > 0) { -if (oldops[o] == 'D') { -this.addDeleted (oldrange[o++]); -continue; -}var remain = oldrange[o]; -if (!editing) { -if ((cursor + remain) <= start) { -this.addOperation (oldops[o], oldrange[o]); -cursor += oldrange[o++]; -continue; -}editing = true; -if (start - cursor > 0) { -this.addOperation (oldops[o], start - cursor); -remain -= start - cursor; -}}if (o < oldlen && editing && rlength > 0 && remain > 0) { -switch (oldops[o]) { -case 'M': -if (rlength > remain) { -this.addDeleted (remain); -deleted += remain; -} else { -deleted += rlength; -this.addDeleted (rlength); -if (remain - rlength > 0) { -this.addOperation ('M', remain - rlength); -}rlength = 0; -remain = 0; -}break; -case 'I': -if (remain - rlength > 0) { -this.addInsertion (remain - rlength); -rlength = 0; -}break; -case 'D': -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error")); -default: -throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_unknown_operation", Clazz.newArray (-1, [ new StringBuffer (oldops[o].charCodeAt (0)).toString ()]))); -} -rlength -= remain; -remain = oldrange[++o]; -}} -while (o < oldlen) { -this.addOperation (oldops[o], oldrange[o++]); -} -return deleted; -}, "~N,~N"); -Clazz.defineMethod (c$, "hasDeletedRegions", -function () { -for (var i = 0; i < this.length; i++) { -if (this.operation[i] == 'D') { -return true; -}} -return false; -}); -Clazz.defineMethod (c$, "getDeletedRegions", -function () { -if (this.length == 0) { -return null; -}var dr = new java.util.Vector (); -var cursor = 0; -var vcursor = 0; -for (var i = 0; i < this.length; i++) { -switch (this.operation[i]) { -case 'M': -cursor += this.range[i]; -case 'I': -vcursor += this.range[i]; -break; -case 'D': -dr.addElement ( Clazz.newIntArray (-1, [vcursor, cursor, this.range[i]])); -cursor += this.range[i]; -} -} -if (dr.size () == 0) { -return null; -}var delregions = Clazz.newIntArray (dr.size () * 3, 0); -for (var i = 0, l = dr.size (); i < l; i++) { -var reg = dr.elementAt (i); -delregions[i * 3] = reg[0]; -delregions[i * 3 + 1] = reg[1]; -delregions[i * 3 + 2] = reg[2]; -} -return delregions; -}); -Clazz.defineMethod (c$, "getFullWidth", -function () { -var w = 0; -if (this.range != null) { -for (var i = 0; i < this.length; i++) { -w += this.range[i]; -} -}return w; -}); -Clazz.defineMethod (c$, "getWidth", -function () { -var w = 0; -if (this.range != null) { -for (var i = 0; i < this.length; i++) { -if (this.operation[i] == 'M' || this.operation[i] == 'I') { -w += this.range[i]; -}} -}return w; -}); -Clazz.defineMethod (c$, "addInsertion", -function (range) { -this.addOperation ('I', range); -}, "~N"); -Clazz.defineMethod (c$, "addDeleted", -function (range) { -this.addOperation ('D', range); -}, "~N"); -Clazz.defineMethod (c$, "getCigarstring", -function () { -var cigarString = new StringBuffer (); -for (var i = 0; i < this.length; i++) { -cigarString.append ("" + this.range[i]); -cigarString.append (this.operation[i]); -} -return cigarString.toString (); -}); -Clazz.defineStatics (c$, -"D", 'D', -"I", 'I', -"M", 'M', -"_case_shift", String.fromCharCode (32)); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.CigarBase", ["jalview.util.MessageManager", "java.lang.Error", "$.Exception", "$.StringBuffer", "java.util.Vector", "javajs.util.AU"], function () { +c$ = Clazz.decorateAsClass (function () { +this.length = 0; +this._inc_length = 10; +this.operation = null; +this.range = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "CigarBase"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "getSequenceAndDeletions", +function (reference, GapChar) { +var rlength = 0; +var deletions = javajs.util.AU.newInt2 (this.length); +var trunc_deletions = null; +var sq = new StringBuffer (); +var cursor = 0; +var alcursor = 0; +var start = 0; +var startpos = 0; +var end = 0; +var endpos = 0; +var delcount = -1; +var consecutive_del = false; +if (this.length == 0) { +return null; +}if (reference != null) { +rlength = reference.length; +}var modstart = true; +for (var i = 0; i < this.length; i++) { +switch (this.operation[i]) { +case 'D': +if (!consecutive_del) { +deletions[++delcount] = Clazz.newIntArray (-1, [cursor, 0, alcursor]); +}cursor += this.range[i]; +deletions[delcount][1] = cursor - 1; +consecutive_del = true; +break; +case 'I': +consecutive_del = false; +for (var r = 0; r < this.range[i]; r++) { +sq.append (GapChar); +alcursor++; +} +break; +case 'M': +consecutive_del = false; +if (modstart) { +start = cursor; +startpos = alcursor; +modstart = false; +}if (reference != null) { +var sbend = cursor + this.range[i]; +if (sbend > rlength) { +sq.append (reference.substring (cursor, rlength)); +while (sbend-- >= rlength) { +sq.append (GapChar); +} +} else { +sq.append (reference.substring (cursor, sbend)); +}}alcursor += this.range[i]; +cursor += this.range[i]; +end = cursor - 1; +endpos = alcursor; +break; +default: +throw new Error (jalview.util.MessageManager.formatMessage ("error.unknown_seq_cigar_operation", Clazz.newArray (-1, [ new StringBuffer (this.operation[i].charCodeAt (0)).toString ()]))); +} +} +if (++delcount > 0) { +trunc_deletions = Clazz.newIntArray (delcount, 0); +System.arraycopy (deletions, 0, trunc_deletions, 0, delcount); +}deletions = null; +return Clazz.newArray (-1, [((reference != null) ? sq.toString () : null), Clazz.newIntArray (-1, [start, startpos, end, endpos]), trunc_deletions]); +}, "~S,~S"); +Clazz.defineMethod (c$, "compact_operations", +function () { +var i = 1; +if (this.operation == null) { +return; +}var last = this.operation[0]; +while (i < this.length) { +if (last == this.operation[i]) { +this.range[i - 1] += this.range[i]; +var r = this.length - i; +if (r > 0) { +System.arraycopy (this.range, i + 1, this.range, i, r); +System.arraycopy (this.operation, i + 1, this.operation, i, r); +}this.length--; +} else { +last = this.operation[i++]; +}} +}); +c$.parseCigarString = Clazz.defineMethod (c$, "parseCigarString", +function (cigarString) { +var ops = 0; +for (var i = 0, l = cigarString.length; i < l; i++) { +var c = cigarString.charAt (i); +if (c == 'M' || c.charCodeAt (0) == (45) || c == 'I' || c.charCodeAt (0) == (41) || c == 'D' || c.charCodeAt (0) == (36)) { +ops++; +}} +var operation = Clazz.newCharArray (ops, '\0'); +var range = Clazz.newIntArray (ops, 0); +var op = 0; +var i = 0; +var l = cigarString.length; +while (i < l) { +var c; +var j = i; +do { +c = cigarString.charAt (j++); +} while (c >= '0' && c <= '9' && j < l); +if (j >= l && c >= '0' && c <= '9') { +throw new Exception (jalview.util.MessageManager.getString ("exception.unterminated_cigar_string")); +}try { +var rangeint = cigarString.substring (i, j - 1); +range[op] = Integer.parseInt (rangeint); +i = j; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_bug_parse_cigar_string")); +} else { +throw e; +} +} +if (c >= 'a' && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) - 32); +}if ((c == 'M' || c == 'I' || c == 'D')) { +operation[op++] = c; +} else { +throw new Exception (jalview.util.MessageManager.formatMessage ("exception.unexpected_operation_cigar_string_pos", Clazz.newArray (-1, [ new StringBuffer (c.charCodeAt (0)).toString (), Integer.$valueOf (i).toString (), cigarString]))); +}} +return Clazz.newArray (-1, [operation, range]); +}, "~S"); +Clazz.defineMethod (c$, "addOperation", +function (op, range) { +if (op >= 'a' && op <= 'z') { +op = String.fromCharCode (op.charCodeAt (0) - 32); +}if (op != 'M' && op != 'D' && op != 'I') { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_invalid_operation_string")); +}if (range == 0) { +return; +}if (range < 0) { +throw new Error (jalview.util.MessageManager.getString ("error.invalid_range_string")); +}var lngth = 0; +if (this.operation == null) { +this.operation = Clazz.newCharArray (this._inc_length, '\0'); +this.range = Clazz.newIntArray (this._inc_length, 0); +}if (this.length + 1 == this.operation.length) { +var ops = this.operation; +this.operation = Clazz.newCharArray (this.length + 1 + this._inc_length, '\0'); +System.arraycopy (ops, 0, this.operation, 0, this.length); +ops = null; +var rng = this.range; +this.range = Clazz.newIntArray (this.length + 1 + this._inc_length, 0); +System.arraycopy (rng, 0, this.range, 0, this.length); +rng = null; +}if ((this.length > 0) && (this.operation[this.length - 1] == op)) { +this.length--; +} else { +this.range[this.length] = 0; +}this.operation[this.length] = op; +this.range[this.length++] += range; +}, "~S,~N"); +Clazz.defineMethod (c$, "deleteRange", +function (start, end) { +var deleted = 0; +if (this.length == 0) { +return deleted; +}if (start < 0 || start > end) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_delete_range_out_of_bounds")); +}var cursor = 0; +var rlength = 1 + end - start; +var oldlen = this.length; +var o = 0; +var editing = false; +var oldops = this.operation; +var oldrange = this.range; +this.length = 0; +this.operation = null; +this.range = null; +this.compact_operations (); +while (o < oldlen && cursor <= end && rlength > 0) { +if (oldops[o] == 'D') { +this.addDeleted (oldrange[o++]); +continue; +}var remain = oldrange[o]; +if (!editing) { +if ((cursor + remain) <= start) { +this.addOperation (oldops[o], oldrange[o]); +cursor += oldrange[o++]; +continue; +}editing = true; +if (start - cursor > 0) { +this.addOperation (oldops[o], start - cursor); +remain -= start - cursor; +}}if (o < oldlen && editing && rlength > 0 && remain > 0) { +switch (oldops[o]) { +case 'M': +if (rlength > remain) { +this.addDeleted (remain); +deleted += remain; +} else { +deleted += rlength; +this.addDeleted (rlength); +if (remain - rlength > 0) { +this.addOperation ('M', remain - rlength); +}rlength = 0; +remain = 0; +}break; +case 'I': +if (remain - rlength > 0) { +this.addInsertion (remain - rlength); +rlength = 0; +}break; +case 'D': +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error")); +default: +throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_unknown_operation", Clazz.newArray (-1, [ new StringBuffer (oldops[o].charCodeAt (0)).toString ()]))); +} +rlength -= remain; +remain = oldrange[++o]; +}} +while (o < oldlen) { +this.addOperation (oldops[o], oldrange[o++]); +} +return deleted; +}, "~N,~N"); +Clazz.defineMethod (c$, "hasDeletedRegions", +function () { +for (var i = 0; i < this.length; i++) { +if (this.operation[i] == 'D') { +return true; +}} +return false; +}); +Clazz.defineMethod (c$, "getDeletedRegions", +function () { +if (this.length == 0) { +return null; +}var dr = new java.util.Vector (); +var cursor = 0; +var vcursor = 0; +for (var i = 0; i < this.length; i++) { +switch (this.operation[i]) { +case 'M': +cursor += this.range[i]; +case 'I': +vcursor += this.range[i]; +break; +case 'D': +dr.addElement ( Clazz.newIntArray (-1, [vcursor, cursor, this.range[i]])); +cursor += this.range[i]; +} +} +if (dr.size () == 0) { +return null; +}var delregions = Clazz.newIntArray (dr.size () * 3, 0); +for (var i = 0, l = dr.size (); i < l; i++) { +var reg = dr.elementAt (i); +delregions[i * 3] = reg[0]; +delregions[i * 3 + 1] = reg[1]; +delregions[i * 3 + 2] = reg[2]; +} +return delregions; +}); +Clazz.defineMethod (c$, "getFullWidth", +function () { +var w = 0; +if (this.range != null) { +for (var i = 0; i < this.length; i++) { +w += this.range[i]; +} +}return w; +}); +Clazz.defineMethod (c$, "getWidth", +function () { +var w = 0; +if (this.range != null) { +for (var i = 0; i < this.length; i++) { +if (this.operation[i] == 'M' || this.operation[i] == 'I') { +w += this.range[i]; +}} +}return w; +}); +Clazz.defineMethod (c$, "addInsertion", +function (range) { +this.addOperation ('I', range); +}, "~N"); +Clazz.defineMethod (c$, "addDeleted", +function (range) { +this.addOperation ('D', range); +}, "~N"); +Clazz.defineMethod (c$, "getCigarstring", +function () { +var cigarString = new StringBuffer (); +for (var i = 0; i < this.length; i++) { +cigarString.append ("" + this.range[i]); +cigarString.append (this.operation[i]); +} +return cigarString.toString (); +}); +Clazz.defineStatics (c$, +"D", 'D', +"I", 'I', +"M", 'M', +"_case_shift", String.fromCharCode (32)); +}); diff --git a/bin/jalview/datamodel/CigarCigar.js b/bin/jalview/datamodel/CigarCigar.js index 12f3e39..9448de4 100644 --- a/bin/jalview/datamodel/CigarCigar.js +++ b/bin/jalview/datamodel/CigarCigar.js @@ -1,22 +1,22 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.CigarSimple"], "jalview.datamodel.CigarCigar", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.refCigar = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "CigarCigar", jalview.datamodel.CigarSimple); -Clazz.makeConstructor (c$, -function (cigar) { -Clazz.superConstructor (this, jalview.datamodel.CigarCigar); -this.refCigar = cigar; -}, "jalview.datamodel.SeqCigar"); -Clazz.overrideMethod (c$, "getSequenceString", -function (GapChar) { -if (this.length == 0) { -return ""; -}var refString = this.refCigar.getSequenceString (GapChar); -if (refString != null) { -return (this.length == 0) ? "" : this.getSequenceAndDeletions (refString, GapChar)[0]; -} else { -return null; -}}, "~S"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.CigarSimple"], "jalview.datamodel.CigarCigar", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.refCigar = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "CigarCigar", jalview.datamodel.CigarSimple); +Clazz.makeConstructor (c$, +function (cigar) { +Clazz.superConstructor (this, jalview.datamodel.CigarCigar); +this.refCigar = cigar; +}, "jalview.datamodel.SeqCigar"); +Clazz.overrideMethod (c$, "getSequenceString", +function (GapChar) { +if (this.length == 0) { +return ""; +}var refString = this.refCigar.getSequenceString (GapChar); +if (refString != null) { +return (this.length == 0) ? "" : this.getSequenceAndDeletions (refString, GapChar)[0]; +} else { +return null; +}}, "~S"); +}); diff --git a/bin/jalview/datamodel/CigarSimple.js b/bin/jalview/datamodel/CigarSimple.js index 776f62a..1f9da1c 100644 --- a/bin/jalview/datamodel/CigarSimple.js +++ b/bin/jalview/datamodel/CigarSimple.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.CigarBase"], "jalview.datamodel.CigarSimple", null, function () { -c$ = Clazz.declareType (jalview.datamodel, "CigarSimple", jalview.datamodel.CigarBase); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.CigarBase"], "jalview.datamodel.CigarSimple", null, function () { +c$ = Clazz.declareType (jalview.datamodel, "CigarSimple", jalview.datamodel.CigarBase); +}); diff --git a/bin/jalview/datamodel/ColumnSelection.class b/bin/jalview/datamodel/ColumnSelection.class index c770c9670bb85cffc2b1fd3acb2b1438f78354df..e80a2622eb6f7acded9bcb68422cc3aaa61e76e5 100644 GIT binary patch delta 120 zcmZpi%h)}aaf5{_WAJ86)lW>!2@GPB^)!@}S^qG|FiNuWIWYcV;A2FP+Kj>ujLfo< z{~4Gj8)`^w?$-!VX6)Vkz&nOX-GG7X4+9ragEFI(h=|C423rPpb_PavMgw-n1B{I9 Q3=h~D;ushwhx+LN02jm?v;Y7A delta 102 zcmeC4%h))Vaf5{_WB6uE)lW>!DGXAR^)!@}nV9}C$S_JWG4VMt{$b!_M35ScOu`O~ x%u-C7^EGmm8S6LS@s44VRAS)%!@vbps>~=QA|mpa!HS*X0XsvS)8u$R9RLuT7@`0G diff --git a/bin/jalview/datamodel/ColumnSelection.js b/bin/jalview/datamodel/ColumnSelection.js index 6cab54c..b9e3e99 100644 --- a/bin/jalview/datamodel/ColumnSelection.js +++ b/bin/jalview/datamodel/ColumnSelection.js @@ -1,682 +1,682 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.util.Vector"], "jalview.datamodel.ColumnSelection", ["jalview.util.ShiftList", "jalview.viewmodel.annotationfilter.AnnotationFilterParameter", "java.lang.StringBuffer", "java.util.ArrayList", "$.Collections"], function () { -c$ = Clazz.decorateAsClass (function () { -this.selected = null; -this.hiddenColumns = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "ColumnSelection"); -Clazz.prepareFields (c$, function () { -this.selected = new java.util.Vector (); -}); -Clazz.defineMethod (c$, "addElement", -function (col) { -var column = new Integer (col); -if (!this.selected.contains (column)) { -this.selected.addElement (column); -}}, "~N"); -Clazz.defineMethod (c$, "clear", -function () { -this.selected.removeAllElements (); -}); -Clazz.defineMethod (c$, "removeElement", -function (col) { -var colInt = new Integer (col); -if (this.selected.contains (colInt)) { -this.selected.removeElement (colInt); -}}, "~N"); -Clazz.defineMethod (c$, "removeElements", -function (start, end) { -var colInt; -for (var i = start; i < end; i++) { -colInt = new Integer (i); -if (this.selected.contains (colInt)) { -this.selected.removeElement (colInt); -}} -}, "~N,~N"); -Clazz.defineMethod (c$, "getSelected", -function () { -return this.selected; -}); -Clazz.defineMethod (c$, "contains", -function (col) { -return this.selected.contains ( new Integer (col)); -}, "~N"); -Clazz.defineMethod (c$, "columnAt", -function (i) { -return this.selected.elementAt (i).intValue (); -}, "~N"); -Clazz.defineMethod (c$, "size", -function () { -return this.selected.size (); -}); -Clazz.defineMethod (c$, "getMax", -function () { -var max = -1; -for (var i = 0; i < this.selected.size (); i++) { -if (this.columnAt (i) > max) { -max = this.columnAt (i); -}} -return max; -}); -Clazz.defineMethod (c$, "getMin", -function () { -var min = 1000000000; -for (var i = 0; i < this.selected.size (); i++) { -if (this.columnAt (i) < min) { -min = this.columnAt (i); -}} -return min; -}); -Clazz.defineMethod (c$, "compensateForEdit", -function (start, change) { -var deletedHiddenColumns = null; -for (var i = 0; i < this.size (); i++) { -var temp = this.columnAt (i); -if (temp >= start) { -this.selected.setElementAt ( new Integer (temp - change), i); -}} -if (this.hiddenColumns != null) { -deletedHiddenColumns = new java.util.ArrayList (); -var hSize = this.hiddenColumns.size (); -for (var i = 0; i < hSize; i++) { -var region = this.hiddenColumns.elementAt (i); -if (region[0] > start && start + change > region[1]) { -deletedHiddenColumns.add (region); -this.hiddenColumns.removeElementAt (i); -i--; -hSize--; -continue; -}if (region[0] > start) { -region[0] -= change; -region[1] -= change; -}if (region[0] < 0) { -region[0] = 0; -}} -this.revealHiddenColumns (0); -}return deletedHiddenColumns; -}, "~N,~N"); -Clazz.defineMethod (c$, "compensateForDelEdits", -($fz = function (start, change) { -for (var i = 0; i < this.size (); i++) { -var temp = this.columnAt (i); -if (temp >= start) { -this.selected.setElementAt ( new Integer (temp - change), i); -}} -if (this.hiddenColumns != null) { -for (var i = 0; i < this.hiddenColumns.size (); i++) { -var region = this.hiddenColumns.elementAt (i); -if (region[0] >= start) { -region[0] -= change; -}if (region[1] >= start) { -region[1] -= change; -}if (region[1] < region[0]) { -this.hiddenColumns.removeElementAt (i--); -}if (region[0] < 0) { -region[0] = 0; -}if (region[1] < 0) { -region[1] = 0; -}} -}}, $fz.isPrivate = true, $fz), "~N,~N"); -Clazz.defineMethod (c$, "compensateForEdits", -function (shiftrecord) { -if (shiftrecord != null) { -var shifts = shiftrecord.getShifts (); -if (shifts != null && shifts.size () > 0) { -var shifted = 0; -for (var i = 0, j = shifts.size (); i < j; i++) { -var sh = shifts.get (i); -this.compensateForDelEdits (shifted + sh[0], sh[1]); -shifted -= sh[1]; -} -}return shiftrecord.getInverse (); -}return null; -}, "jalview.util.ShiftList"); -Clazz.defineMethod (c$, "pruneIntervalVector", -($fz = function (shifts, intervals) { -var pruned = false; -var i = 0; -var j = intervals.size () - 1; -var s = 0; -var t = shifts.size () - 1; -var hr = intervals.elementAt (i); -var sr = shifts.get (s); -while (i <= j && s <= t) { -var trailinghn = hr[1] >= sr[0]; -if (!trailinghn) { -if (i < j) { -hr = intervals.elementAt (++i); -} else { -i++; -}continue; -}var endshift = sr[0] + sr[1]; -if (endshift < hr[0] || endshift < sr[0]) { -if (s < t) { -sr = shifts.get (++s); -} else { -s++; -}continue; -}var leadinghn = hr[0] >= sr[0]; -var leadinghc = hr[0] < endshift; -var trailinghc = hr[1] < endshift; -if (leadinghn) { -if (trailinghc) { -intervals.removeElementAt (i); -pruned = true; -j--; -if (i <= j) { -hr = intervals.elementAt (i); -}continue; -}if (leadinghc) { -hr[0] = endshift; -leadinghn = !leadinghn; -pruned = true; -}}if (!leadinghn) { -if (trailinghc) { -if (trailinghn) { -hr[1] = sr[0] - 1; -pruned = true; -}} else { -if (s < t) { -sr = shifts.get (++s); -} else { -s++; -}continue; -}}} -return pruned; -}, $fz.isPrivate = true, $fz), "java.util.List,java.util.Vector"); -Clazz.defineMethod (c$, "pruneColumnList", -($fz = function (shifts, list) { -var s = 0; -var t = shifts.size (); -var sr = shifts.get (s++); -var pruned = false; -var i = 0; -var j = list.size (); -while (i < j && s <= t) { -var c = list.elementAt (i++).intValue (); -if (sr[0] <= c) { -if (sr[1] + sr[0] >= c) { -list.removeElementAt (--i); -j--; -} else { -if (s < t) { -sr = shifts.get (s); -}s++; -}}} -return pruned; -}, $fz.isPrivate = true, $fz), "java.util.List,java.util.Vector"); -Clazz.defineMethod (c$, "pruneDeletions", -function (deletions) { -if (deletions != null) { -var shifts = deletions.getShifts (); -if (shifts != null && shifts.size () > 0) { -if (this.hiddenColumns != null) { -this.pruneIntervalVector (shifts, this.hiddenColumns); -if (this.hiddenColumns != null && this.hiddenColumns.size () == 0) { -this.hiddenColumns = null; -}}if (this.selected != null && this.selected.size () > 0) { -this.pruneColumnList (shifts, this.selected); -if (this.selected != null && this.selected.size () == 0) { -this.selected = null; -}}this.compensateForEdits (deletions); -}}}, "jalview.util.ShiftList"); -Clazz.defineMethod (c$, "getHiddenColumns", -function () { -return this.hiddenColumns == null ? java.util.Collections.emptyList () : this.hiddenColumns; -}); -Clazz.defineMethod (c$, "adjustForHiddenColumns", -function (column) { -var result = column; -if (this.hiddenColumns != null) { -for (var i = 0; i < this.hiddenColumns.size (); i++) { -var region = this.hiddenColumns.elementAt (i); -if (result >= region[0]) { -result += region[1] - region[0] + 1; -}} -}return result; -}, "~N"); -Clazz.defineMethod (c$, "findColumnPosition", -function (hiddenColumn) { -var result = hiddenColumn; -if (this.hiddenColumns != null) { -var index = 0; -var region; -do { -region = this.hiddenColumns.elementAt (index++); -if (hiddenColumn > region[1]) { -result -= region[1] + 1 - region[0]; -}} while ((hiddenColumn > region[1]) && (index < this.hiddenColumns.size ())); -if (hiddenColumn > region[0] && hiddenColumn < region[1]) { -return region[0] + hiddenColumn - result; -}}return result; -}, "~N"); -Clazz.defineMethod (c$, "findHiddenRegionPosition", -function (hiddenRegion) { -var result = 0; -if (this.hiddenColumns != null) { -var index = 0; -var gaps = 0; -do { -var region = this.hiddenColumns.elementAt (index); -if (hiddenRegion == 0) { -return region[0]; -}gaps += region[1] + 1 - region[0]; -result = region[1] + 1; -index++; -} while (index < hiddenRegion + 1); -result -= gaps; -}return result; -}, "~N"); -Clazz.defineMethod (c$, "getHiddenBoundaryRight", -function (alPos) { -if (this.hiddenColumns != null) { -var index = 0; -do { -var region = this.hiddenColumns.elementAt (index); -if (alPos < region[0]) { -return region[0]; -}index++; -} while (index < this.hiddenColumns.size ()); -}return alPos; -}, "~N"); -Clazz.defineMethod (c$, "getHiddenBoundaryLeft", -function (alPos) { -if (this.hiddenColumns != null) { -var index = this.hiddenColumns.size () - 1; -do { -var region = this.hiddenColumns.elementAt (index); -if (alPos > region[1]) { -return region[1]; -}index--; -} while (index > -1); -}return alPos; -}, "~N"); -Clazz.defineMethod (c$, "hideSelectedColumns", -function () { -while (this.size () > 0) { -var column = this.getSelected ().firstElement ().intValue (); -this.hideColumns (column); -} -}); -Clazz.defineMethod (c$, "hideColumns", -function (start, end) { -if (this.hiddenColumns == null) { -this.hiddenColumns = new java.util.Vector (); -}var added = false; -var overlap = false; -for (var i = 0; i < this.hiddenColumns.size (); i++) { -var region = this.hiddenColumns.elementAt (i); -if (start <= region[1] && end >= region[0]) { -this.hiddenColumns.removeElementAt (i); -overlap = true; -break; -} else if (end < region[0] && start < region[0]) { -this.hiddenColumns.insertElementAt ( Clazz.newIntArray (-1, [start, end]), i); -added = true; -break; -}} -if (overlap) { -this.hideColumns (start, end); -} else if (!added) { -this.hiddenColumns.addElement ( Clazz.newIntArray (-1, [start, end])); -}}, "~N,~N"); -Clazz.defineMethod (c$, "hideColumns", -function (col) { -var min = col; -var max = col + 1; -while (this.contains (min)) { -this.removeElement (min); -min--; -} -while (this.contains (max)) { -this.removeElement (max); -max++; -} -min++; -max--; -if (min > max) { -min = max; -}this.hideColumns (min, max); -}, "~N"); -Clazz.defineMethod (c$, "revealAllHiddenColumns", -function () { -if (this.hiddenColumns != null) { -for (var i = 0; i < this.hiddenColumns.size (); i++) { -var region = this.hiddenColumns.elementAt (i); -for (var j = region[0]; j < region[1] + 1; j++) { -this.addElement (j); -} -} -}this.hiddenColumns = null; -}); -Clazz.defineMethod (c$, "revealHiddenColumns", -function (res) { -for (var i = 0; i < this.hiddenColumns.size (); i++) { -var region = this.hiddenColumns.elementAt (i); -if (res == region[0]) { -for (var j = region[0]; j < region[1] + 1; j++) { -this.addElement (j); -} -this.hiddenColumns.removeElement (region); -break; -}} -if (this.hiddenColumns.size () == 0) { -this.hiddenColumns = null; -}}, "~N"); -Clazz.defineMethod (c$, "isVisible", -function (column) { -if (this.hiddenColumns != null) { -for (var i = 0; i < this.hiddenColumns.size (); i++) { -var region = this.hiddenColumns.elementAt (i); -if (column >= region[0] && column <= region[1]) { -return false; -}} -}return true; -}, "~N"); -Clazz.makeConstructor (c$, -function (copy) { -if (copy != null) { -if (copy.selected != null) { -this.selected = new java.util.Vector (); -for (var i = 0, j = copy.selected.size (); i < j; i++) { -this.selected.addElement (copy.selected.elementAt (i)); -} -}if (copy.hiddenColumns != null) { -this.hiddenColumns = new java.util.Vector (copy.hiddenColumns.size ()); -for (var i = 0, j = copy.hiddenColumns.size (); i < j; i++) { -var rh; -var cp; -rh = copy.hiddenColumns.elementAt (i); -if (rh != null) { -cp = Clazz.newIntArray (rh.length, 0); -System.arraycopy (rh, 0, cp, 0, rh.length); -this.hiddenColumns.addElement (cp); -}} -}}}, "jalview.datamodel.ColumnSelection"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "getVisibleSequenceStrings", -function (start, end, seqs) { -var i; -var iSize = seqs.length; -var selection = new Array (iSize); -if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { -for (i = 0; i < iSize; i++) { -var visibleSeq = new StringBuffer (); -var regions = this.getHiddenColumns (); -var blockStart = start; -var blockEnd = end; -var region; -var hideStart; -var hideEnd; -for (var j = 0; j < regions.size (); j++) { -region = regions.get (j); -hideStart = region[0]; -hideEnd = region[1]; -if (hideStart < start) { -continue; -}blockStart = Math.min (blockStart, hideEnd + 1); -blockEnd = Math.min (blockEnd, hideStart); -if (blockStart > blockEnd) { -break; -}visibleSeq.append (seqs[i].getSequence (blockStart, blockEnd)); -blockStart = hideEnd + 1; -blockEnd = end; -} -if (end > blockStart) { -visibleSeq.append (seqs[i].getSequence (blockStart, end)); -}selection[i] = visibleSeq.toString (); -} -} else { -for (i = 0; i < iSize; i++) { -selection[i] = seqs[i].getSequenceAsString (start, end); -} -}return selection; -}, "~N,~N,~A"); -Clazz.defineMethod (c$, "getVisibleContigs", -function (start, end) { -if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { -var visiblecontigs = new java.util.ArrayList (); -var regions = this.getHiddenColumns (); -var vstart = start; -var region; -var hideStart; -var hideEnd; -for (var j = 0; vstart < end && j < regions.size (); j++) { -region = regions.get (j); -hideStart = region[0]; -hideEnd = region[1]; -if (hideEnd < vstart) { -continue; -}if (hideStart > vstart) { -visiblecontigs.add ( Clazz.newIntArray (-1, [vstart, hideStart - 1])); -}vstart = hideEnd + 1; -} -if (vstart < end) { -visiblecontigs.add ( Clazz.newIntArray (-1, [vstart, end - 1])); -}var vcontigs = Clazz.newIntArray (visiblecontigs.size () * 2, 0); -for (var i = 0, j = visiblecontigs.size (); i < j; i++) { -var vc = visiblecontigs.get (i); -visiblecontigs.set (i, null); -vcontigs[i * 2] = vc[0]; -vcontigs[i * 2 + 1] = vc[1]; -} -visiblecontigs.clear (); -return vcontigs; -} else { -return Clazz.newIntArray (-1, [start, end - 1]); -}}, "~N,~N"); -Clazz.defineMethod (c$, "makeVisibleAnnotation", -function (alignmentAnnotation) { -this.makeVisibleAnnotation (-1, -1, alignmentAnnotation); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "makeVisibleAnnotation", -function (start, end, alignmentAnnotation) { -if (alignmentAnnotation.annotations == null) { -return; -}if (start == end && end == -1) { -start = 0; -end = alignmentAnnotation.annotations.length; -}if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { -var annels = new java.util.Vector (); -var els = null; -var regions = this.getHiddenColumns (); -var blockStart = start; -var blockEnd = end; -var region; -var hideStart; -var hideEnd; -var w = 0; -for (var j = 0; j < regions.size (); j++) { -region = regions.get (j); -hideStart = region[0]; -hideEnd = region[1]; -if (hideStart < start) { -continue; -}blockStart = Math.min (blockStart, hideEnd + 1); -blockEnd = Math.min (blockEnd, hideStart); -if (blockStart > blockEnd) { -break; -}annels.addElement (els = new Array (blockEnd - blockStart)); -System.arraycopy (alignmentAnnotation.annotations, blockStart, els, 0, els.length); -w += els.length; -blockStart = hideEnd + 1; -blockEnd = end; -} -if (end > blockStart) { -annels.addElement (els = new Array (end - blockStart + 1)); -if ((els.length + blockStart) <= alignmentAnnotation.annotations.length) { -System.arraycopy (alignmentAnnotation.annotations, blockStart, els, 0, els.length); -} else { -System.arraycopy (alignmentAnnotation.annotations, blockStart, els, 0, (alignmentAnnotation.annotations.length - blockStart)); -}w += els.length; -}if (w == 0) { -return; -}alignmentAnnotation.annotations = new Array (w); -w = 0; -for (var chnk, $chnk = annels.iterator (); $chnk.hasNext () && ((chnk = $chnk.next ()) || true);) { -System.arraycopy (chnk, 0, alignmentAnnotation.annotations, w, chnk.length); -w += chnk.length; -} -} else { -alignmentAnnotation.restrict (start, end); -}}, "~N,~N,jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "invertColumnSelection", -function (first, width) { -var hasHidden = this.hiddenColumns != null && this.hiddenColumns.size () > 0; -for (var i = first; i < width; i++) { -if (this.contains (i)) { -this.removeElement (i); -} else { -if (!hasHidden || this.isVisible (i)) { -this.addElement (i); -}}} -}, "~N,~N"); -Clazz.defineMethod (c$, "addElementsFrom", -function (colsel) { -if (colsel != null && colsel.size () > 0) { -for (var col, $col = colsel.getSelected ().iterator (); $col.hasNext () && ((col = $col.next ()) || true);) { -if (this.hiddenColumns != null && this.isVisible (col.intValue ())) { -if (!this.selected.contains (col)) { -this.selected.addElement (col); -}}} -}}, "jalview.datamodel.ColumnSelection"); -Clazz.defineMethod (c$, "setElementsFrom", -function (colsel) { -this.selected = new java.util.Vector (); -if (colsel.selected != null && colsel.selected.size () > 0) { -if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { -this.addElementsFrom (colsel); -} else { -for (var col, $col = colsel.getSelected ().iterator (); $col.hasNext () && ((col = $col.next ()) || true);) { -this.addElement ((col).intValue ()); -} -}}}, "jalview.datamodel.ColumnSelection"); -c$.propagateInsertions = Clazz.defineMethod (c$, "propagateInsertions", -function (profileseq, al, input) { -var profsqpos = 0; -var gc = al.getGapCharacter (); -var alandcolsel = input.getAlignmentAndColumnSelection (gc); -var nview = alandcolsel[1]; -var origseq = (alandcolsel[0])[profsqpos]; -nview.propagateInsertions (profileseq, al, origseq); -return nview; -}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentView"); -Clazz.defineMethod (c$, "propagateInsertions", -function (profileseq, al, origseq) { -var gc = al.getGapCharacter (); -this.pruneDeletions (jalview.util.ShiftList.parseMap (origseq.gapMap ())); -var viscontigs = this.getVisibleContigs (0, profileseq.getLength ()); -var spos = 0; -var offset = 0; -for (var v = 0; v < viscontigs.length; v += 2) { -if (viscontigs[v] > spos) { -var sb = new StringBuffer (); -for (var s = 0, ns = viscontigs[v] - spos; s < ns; s++) { -sb.append (gc); -} -for (var s = 0, ns = al.getHeight (); s < ns; s++) { -var sqobj = al.getSequenceAt (s); -if (sqobj !== profileseq) { -var sq = al.getSequenceAt (s).getSequenceAsString (); -if (sq.length <= spos + offset) { -var diff = spos + offset - sq.length - 1; -if (diff > 0) { -sq = sq + sb; -while ((diff = spos + offset - sq.length - 1) > 0) { -if (diff >= sb.length ()) { -sq += sb.toString (); -} else { -var buf = Clazz.newCharArray (diff, '\0'); -sb.getChars (0, diff, buf, 0); -sq += buf.toString (); -}} -}sq += sb.toString (); -} else { -al.getSequenceAt (s).setSequence (sq.substring (0, spos + offset) + sb.toString () + sq.substring (spos + offset)); -}}} -}spos = viscontigs[v + 1] + 1; -} -if ((offset + spos) < profileseq.getLength ()) { -var sb = new StringBuffer (); -for (var s = 0, ns = profileseq.getLength () - spos - offset; s < ns; s++) { -sb.append (gc); -} -for (var s = 0, ns = al.getHeight (); s < ns; s++) { -var sqobj = al.getSequenceAt (s); -if (sqobj === profileseq) { -continue; -}var sq = sqobj.getSequenceAsString (); -var diff = origseq.getLength () - sq.length; -while (diff > 0) { -if (diff >= sb.length ()) { -sq += sb.toString (); -} else { -var buf = Clazz.newCharArray (diff, '\0'); -sb.getChars (0, diff, buf, 0); -sq += buf.toString (); -}diff = origseq.getLength () - sq.length; -} -} -}}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "hasSelectedColumns", -function () { -return (this.selected != null && this.selected.size () > 0); -}); -Clazz.defineMethod (c$, "hasHiddenColumns", -function () { -return this.hiddenColumns != null && this.hiddenColumns.size () > 0; -}); -Clazz.defineMethod (c$, "hasManyHiddenColumns", -function () { -return this.hiddenColumns != null && this.hiddenColumns.size () > 1; -}); -Clazz.defineMethod (c$, "hideInsertionsFor", -function (sr) { -var inserts = sr.getInsertions (); -for (var r, $r = inserts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { -this.hideColumns (r[0], r[1]); -} -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "filterAnnotations", -function (annotations, filterParams) { -this.revealAllHiddenColumns (); -this.clear (); -var count = 0; -do { -if (annotations[count] != null) { -var itemMatched = false; -if (filterParams.getThresholdType () === jalview.viewmodel.annotationfilter.AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD && annotations[count].value >= filterParams.getThresholdValue ()) { -itemMatched = true; -}if (filterParams.getThresholdType () === jalview.viewmodel.annotationfilter.AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD && annotations[count].value <= filterParams.getThresholdValue ()) { -itemMatched = true; -}if (filterParams.isFilterAlphaHelix () && annotations[count].secondaryStructure == 'H') { -itemMatched = true; -}if (filterParams.isFilterBetaSheet () && annotations[count].secondaryStructure == 'E') { -itemMatched = true; -}if (filterParams.isFilterTurn () && annotations[count].secondaryStructure == 'S') { -itemMatched = true; -}var regexSearchString = filterParams.getRegexString (); -if (regexSearchString != null && !filterParams.getRegexSearchFields ().isEmpty ()) { -var fields = filterParams.getRegexSearchFields (); -try { -if (fields.contains (jalview.viewmodel.annotationfilter.AnnotationFilterParameter.SearchableAnnotationField.DISPLAY_STRING) && annotations[count].displayCharacter.matches (regexSearchString)) { -itemMatched = true; -}} catch (pse) { -if (Clazz.exceptionOf (pse, java.util.regex.PatternSyntaxException)) { -if (annotations[count].displayCharacter.equals (regexSearchString)) { -itemMatched = true; -}} else { -throw pse; -} -} -if (fields.contains (jalview.viewmodel.annotationfilter.AnnotationFilterParameter.SearchableAnnotationField.DESCRIPTION) && annotations[count].description != null && annotations[count].description.matches (regexSearchString)) { -itemMatched = true; -}}if (itemMatched) { -this.addElement (count); -}}count++; -} while (count < annotations.length); -return false; -}, "~A,jalview.viewmodel.annotationfilter.AnnotationFilterParameter"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.util.Vector"], "jalview.datamodel.ColumnSelection", ["jalview.util.ShiftList", "jalview.viewmodel.annotationfilter.AnnotationFilterParameter", "java.lang.StringBuffer", "java.util.ArrayList", "$.Collections"], function () { +c$ = Clazz.decorateAsClass (function () { +this.selected = null; +this.hiddenColumns = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "ColumnSelection"); +Clazz.prepareFields (c$, function () { +this.selected = new java.util.Vector (); +}); +Clazz.defineMethod (c$, "addElement", +function (col) { +var column = new Integer (col); +if (!this.selected.contains (column)) { +this.selected.addElement (column); +}}, "~N"); +Clazz.defineMethod (c$, "clear", +function () { +this.selected.removeAllElements (); +}); +Clazz.defineMethod (c$, "removeElement", +function (col) { +var colInt = new Integer (col); +if (this.selected.contains (colInt)) { +this.selected.removeElement (colInt); +}}, "~N"); +Clazz.defineMethod (c$, "removeElements", +function (start, end) { +var colInt; +for (var i = start; i < end; i++) { +colInt = new Integer (i); +if (this.selected.contains (colInt)) { +this.selected.removeElement (colInt); +}} +}, "~N,~N"); +Clazz.defineMethod (c$, "getSelected", +function () { +return this.selected; +}); +Clazz.defineMethod (c$, "contains", +function (col) { +return this.selected.contains ( new Integer (col)); +}, "~N"); +Clazz.defineMethod (c$, "columnAt", +function (i) { +return this.selected.elementAt (i).intValue (); +}, "~N"); +Clazz.defineMethod (c$, "size", +function () { +return this.selected.size (); +}); +Clazz.defineMethod (c$, "getMax", +function () { +var max = -1; +for (var i = 0; i < this.selected.size (); i++) { +if (this.columnAt (i) > max) { +max = this.columnAt (i); +}} +return max; +}); +Clazz.defineMethod (c$, "getMin", +function () { +var min = 1000000000; +for (var i = 0; i < this.selected.size (); i++) { +if (this.columnAt (i) < min) { +min = this.columnAt (i); +}} +return min; +}); +Clazz.defineMethod (c$, "compensateForEdit", +function (start, change) { +var deletedHiddenColumns = null; +for (var i = 0; i < this.size (); i++) { +var temp = this.columnAt (i); +if (temp >= start) { +this.selected.setElementAt ( new Integer (temp - change), i); +}} +if (this.hiddenColumns != null) { +deletedHiddenColumns = new java.util.ArrayList (); +var hSize = this.hiddenColumns.size (); +for (var i = 0; i < hSize; i++) { +var region = this.hiddenColumns.elementAt (i); +if (region[0] > start && start + change > region[1]) { +deletedHiddenColumns.add (region); +this.hiddenColumns.removeElementAt (i); +i--; +hSize--; +continue; +}if (region[0] > start) { +region[0] -= change; +region[1] -= change; +}if (region[0] < 0) { +region[0] = 0; +}} +this.revealHiddenColumns (0); +}return deletedHiddenColumns; +}, "~N,~N"); +Clazz.defineMethod (c$, "compensateForDelEdits", +($fz = function (start, change) { +for (var i = 0; i < this.size (); i++) { +var temp = this.columnAt (i); +if (temp >= start) { +this.selected.setElementAt ( new Integer (temp - change), i); +}} +if (this.hiddenColumns != null) { +for (var i = 0; i < this.hiddenColumns.size (); i++) { +var region = this.hiddenColumns.elementAt (i); +if (region[0] >= start) { +region[0] -= change; +}if (region[1] >= start) { +region[1] -= change; +}if (region[1] < region[0]) { +this.hiddenColumns.removeElementAt (i--); +}if (region[0] < 0) { +region[0] = 0; +}if (region[1] < 0) { +region[1] = 0; +}} +}}, $fz.isPrivate = true, $fz), "~N,~N"); +Clazz.defineMethod (c$, "compensateForEdits", +function (shiftrecord) { +if (shiftrecord != null) { +var shifts = shiftrecord.getShifts (); +if (shifts != null && shifts.size () > 0) { +var shifted = 0; +for (var i = 0, j = shifts.size (); i < j; i++) { +var sh = shifts.get (i); +this.compensateForDelEdits (shifted + sh[0], sh[1]); +shifted -= sh[1]; +} +}return shiftrecord.getInverse (); +}return null; +}, "jalview.util.ShiftList"); +Clazz.defineMethod (c$, "pruneIntervalVector", +($fz = function (shifts, intervals) { +var pruned = false; +var i = 0; +var j = intervals.size () - 1; +var s = 0; +var t = shifts.size () - 1; +var hr = intervals.elementAt (i); +var sr = shifts.get (s); +while (i <= j && s <= t) { +var trailinghn = hr[1] >= sr[0]; +if (!trailinghn) { +if (i < j) { +hr = intervals.elementAt (++i); +} else { +i++; +}continue; +}var endshift = sr[0] + sr[1]; +if (endshift < hr[0] || endshift < sr[0]) { +if (s < t) { +sr = shifts.get (++s); +} else { +s++; +}continue; +}var leadinghn = hr[0] >= sr[0]; +var leadinghc = hr[0] < endshift; +var trailinghc = hr[1] < endshift; +if (leadinghn) { +if (trailinghc) { +intervals.removeElementAt (i); +pruned = true; +j--; +if (i <= j) { +hr = intervals.elementAt (i); +}continue; +}if (leadinghc) { +hr[0] = endshift; +leadinghn = !leadinghn; +pruned = true; +}}if (!leadinghn) { +if (trailinghc) { +if (trailinghn) { +hr[1] = sr[0] - 1; +pruned = true; +}} else { +if (s < t) { +sr = shifts.get (++s); +} else { +s++; +}continue; +}}} +return pruned; +}, $fz.isPrivate = true, $fz), "java.util.List,java.util.Vector"); +Clazz.defineMethod (c$, "pruneColumnList", +($fz = function (shifts, list) { +var s = 0; +var t = shifts.size (); +var sr = shifts.get (s++); +var pruned = false; +var i = 0; +var j = list.size (); +while (i < j && s <= t) { +var c = list.elementAt (i++).intValue (); +if (sr[0] <= c) { +if (sr[1] + sr[0] >= c) { +list.removeElementAt (--i); +j--; +} else { +if (s < t) { +sr = shifts.get (s); +}s++; +}}} +return pruned; +}, $fz.isPrivate = true, $fz), "java.util.List,java.util.Vector"); +Clazz.defineMethod (c$, "pruneDeletions", +function (deletions) { +if (deletions != null) { +var shifts = deletions.getShifts (); +if (shifts != null && shifts.size () > 0) { +if (this.hiddenColumns != null) { +this.pruneIntervalVector (shifts, this.hiddenColumns); +if (this.hiddenColumns != null && this.hiddenColumns.size () == 0) { +this.hiddenColumns = null; +}}if (this.selected != null && this.selected.size () > 0) { +this.pruneColumnList (shifts, this.selected); +if (this.selected != null && this.selected.size () == 0) { +this.selected = null; +}}this.compensateForEdits (deletions); +}}}, "jalview.util.ShiftList"); +Clazz.defineMethod (c$, "getHiddenColumns", +function () { +return this.hiddenColumns == null ? java.util.Collections.emptyList () : this.hiddenColumns; +}); +Clazz.defineMethod (c$, "adjustForHiddenColumns", +function (column) { +var result = column; +if (this.hiddenColumns != null) { +for (var i = 0; i < this.hiddenColumns.size (); i++) { +var region = this.hiddenColumns.elementAt (i); +if (result >= region[0]) { +result += region[1] - region[0] + 1; +}} +}return result; +}, "~N"); +Clazz.defineMethod (c$, "findColumnPosition", +function (hiddenColumn) { +var result = hiddenColumn; +if (this.hiddenColumns != null) { +var index = 0; +var region; +do { +region = this.hiddenColumns.elementAt (index++); +if (hiddenColumn > region[1]) { +result -= region[1] + 1 - region[0]; +}} while ((hiddenColumn > region[1]) && (index < this.hiddenColumns.size ())); +if (hiddenColumn > region[0] && hiddenColumn < region[1]) { +return region[0] + hiddenColumn - result; +}}return result; +}, "~N"); +Clazz.defineMethod (c$, "findHiddenRegionPosition", +function (hiddenRegion) { +var result = 0; +if (this.hiddenColumns != null) { +var index = 0; +var gaps = 0; +do { +var region = this.hiddenColumns.elementAt (index); +if (hiddenRegion == 0) { +return region[0]; +}gaps += region[1] + 1 - region[0]; +result = region[1] + 1; +index++; +} while (index < hiddenRegion + 1); +result -= gaps; +}return result; +}, "~N"); +Clazz.defineMethod (c$, "getHiddenBoundaryRight", +function (alPos) { +if (this.hiddenColumns != null) { +var index = 0; +do { +var region = this.hiddenColumns.elementAt (index); +if (alPos < region[0]) { +return region[0]; +}index++; +} while (index < this.hiddenColumns.size ()); +}return alPos; +}, "~N"); +Clazz.defineMethod (c$, "getHiddenBoundaryLeft", +function (alPos) { +if (this.hiddenColumns != null) { +var index = this.hiddenColumns.size () - 1; +do { +var region = this.hiddenColumns.elementAt (index); +if (alPos > region[1]) { +return region[1]; +}index--; +} while (index > -1); +}return alPos; +}, "~N"); +Clazz.defineMethod (c$, "hideSelectedColumns", +function () { +while (this.size () > 0) { +var column = this.getSelected ().firstElement ().intValue (); +this.hideColumns (column); +} +}); +Clazz.defineMethod (c$, "hideColumns", +function (start, end) { +if (this.hiddenColumns == null) { +this.hiddenColumns = new java.util.Vector (); +}var added = false; +var overlap = false; +for (var i = 0; i < this.hiddenColumns.size (); i++) { +var region = this.hiddenColumns.elementAt (i); +if (start <= region[1] && end >= region[0]) { +this.hiddenColumns.removeElementAt (i); +overlap = true; +break; +} else if (end < region[0] && start < region[0]) { +this.hiddenColumns.insertElementAt ( Clazz.newIntArray (-1, [start, end]), i); +added = true; +break; +}} +if (overlap) { +this.hideColumns (start, end); +} else if (!added) { +this.hiddenColumns.addElement ( Clazz.newIntArray (-1, [start, end])); +}}, "~N,~N"); +Clazz.defineMethod (c$, "hideColumns", +function (col) { +var min = col; +var max = col + 1; +while (this.contains (min)) { +this.removeElement (min); +min--; +} +while (this.contains (max)) { +this.removeElement (max); +max++; +} +min++; +max--; +if (min > max) { +min = max; +}this.hideColumns (min, max); +}, "~N"); +Clazz.defineMethod (c$, "revealAllHiddenColumns", +function () { +if (this.hiddenColumns != null) { +for (var i = 0; i < this.hiddenColumns.size (); i++) { +var region = this.hiddenColumns.elementAt (i); +for (var j = region[0]; j < region[1] + 1; j++) { +this.addElement (j); +} +} +}this.hiddenColumns = null; +}); +Clazz.defineMethod (c$, "revealHiddenColumns", +function (res) { +for (var i = 0; i < this.hiddenColumns.size (); i++) { +var region = this.hiddenColumns.elementAt (i); +if (res == region[0]) { +for (var j = region[0]; j < region[1] + 1; j++) { +this.addElement (j); +} +this.hiddenColumns.removeElement (region); +break; +}} +if (this.hiddenColumns.size () == 0) { +this.hiddenColumns = null; +}}, "~N"); +Clazz.defineMethod (c$, "isVisible", +function (column) { +if (this.hiddenColumns != null) { +for (var i = 0; i < this.hiddenColumns.size (); i++) { +var region = this.hiddenColumns.elementAt (i); +if (column >= region[0] && column <= region[1]) { +return false; +}} +}return true; +}, "~N"); +Clazz.makeConstructor (c$, +function (copy) { +if (copy != null) { +if (copy.selected != null) { +this.selected = new java.util.Vector (); +for (var i = 0, j = copy.selected.size (); i < j; i++) { +this.selected.addElement (copy.selected.elementAt (i)); +} +}if (copy.hiddenColumns != null) { +this.hiddenColumns = new java.util.Vector (copy.hiddenColumns.size ()); +for (var i = 0, j = copy.hiddenColumns.size (); i < j; i++) { +var rh; +var cp; +rh = copy.hiddenColumns.elementAt (i); +if (rh != null) { +cp = Clazz.newIntArray (rh.length, 0); +System.arraycopy (rh, 0, cp, 0, rh.length); +this.hiddenColumns.addElement (cp); +}} +}}}, "jalview.datamodel.ColumnSelection"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "getVisibleSequenceStrings", +function (start, end, seqs) { +var i; +var iSize = seqs.length; +var selection = new Array (iSize); +if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { +for (i = 0; i < iSize; i++) { +var visibleSeq = new StringBuffer (); +var regions = this.getHiddenColumns (); +var blockStart = start; +var blockEnd = end; +var region; +var hideStart; +var hideEnd; +for (var j = 0; j < regions.size (); j++) { +region = regions.get (j); +hideStart = region[0]; +hideEnd = region[1]; +if (hideStart < start) { +continue; +}blockStart = Math.min (blockStart, hideEnd + 1); +blockEnd = Math.min (blockEnd, hideStart); +if (blockStart > blockEnd) { +break; +}visibleSeq.append (seqs[i].getSequence (blockStart, blockEnd)); +blockStart = hideEnd + 1; +blockEnd = end; +} +if (end > blockStart) { +visibleSeq.append (seqs[i].getSequence (blockStart, end)); +}selection[i] = visibleSeq.toString (); +} +} else { +for (i = 0; i < iSize; i++) { +selection[i] = seqs[i].getSequenceAsString (start, end); +} +}return selection; +}, "~N,~N,~A"); +Clazz.defineMethod (c$, "getVisibleContigs", +function (start, end) { +if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { +var visiblecontigs = new java.util.ArrayList (); +var regions = this.getHiddenColumns (); +var vstart = start; +var region; +var hideStart; +var hideEnd; +for (var j = 0; vstart < end && j < regions.size (); j++) { +region = regions.get (j); +hideStart = region[0]; +hideEnd = region[1]; +if (hideEnd < vstart) { +continue; +}if (hideStart > vstart) { +visiblecontigs.add ( Clazz.newIntArray (-1, [vstart, hideStart - 1])); +}vstart = hideEnd + 1; +} +if (vstart < end) { +visiblecontigs.add ( Clazz.newIntArray (-1, [vstart, end - 1])); +}var vcontigs = Clazz.newIntArray (visiblecontigs.size () * 2, 0); +for (var i = 0, j = visiblecontigs.size (); i < j; i++) { +var vc = visiblecontigs.get (i); +visiblecontigs.set (i, null); +vcontigs[i * 2] = vc[0]; +vcontigs[i * 2 + 1] = vc[1]; +} +visiblecontigs.clear (); +return vcontigs; +} else { +return Clazz.newIntArray (-1, [start, end - 1]); +}}, "~N,~N"); +Clazz.defineMethod (c$, "makeVisibleAnnotation", +function (alignmentAnnotation) { +this.makeVisibleAnnotation (-1, -1, alignmentAnnotation); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "makeVisibleAnnotation", +function (start, end, alignmentAnnotation) { +if (alignmentAnnotation.annotations == null) { +return; +}if (start == end && end == -1) { +start = 0; +end = alignmentAnnotation.annotations.length; +}if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { +var annels = new java.util.Vector (); +var els = null; +var regions = this.getHiddenColumns (); +var blockStart = start; +var blockEnd = end; +var region; +var hideStart; +var hideEnd; +var w = 0; +for (var j = 0; j < regions.size (); j++) { +region = regions.get (j); +hideStart = region[0]; +hideEnd = region[1]; +if (hideStart < start) { +continue; +}blockStart = Math.min (blockStart, hideEnd + 1); +blockEnd = Math.min (blockEnd, hideStart); +if (blockStart > blockEnd) { +break; +}annels.addElement (els = new Array (blockEnd - blockStart)); +System.arraycopy (alignmentAnnotation.annotations, blockStart, els, 0, els.length); +w += els.length; +blockStart = hideEnd + 1; +blockEnd = end; +} +if (end > blockStart) { +annels.addElement (els = new Array (end - blockStart + 1)); +if ((els.length + blockStart) <= alignmentAnnotation.annotations.length) { +System.arraycopy (alignmentAnnotation.annotations, blockStart, els, 0, els.length); +} else { +System.arraycopy (alignmentAnnotation.annotations, blockStart, els, 0, (alignmentAnnotation.annotations.length - blockStart)); +}w += els.length; +}if (w == 0) { +return; +}alignmentAnnotation.annotations = new Array (w); +w = 0; +for (var chnk, $chnk = annels.iterator (); $chnk.hasNext () && ((chnk = $chnk.next ()) || true);) { +System.arraycopy (chnk, 0, alignmentAnnotation.annotations, w, chnk.length); +w += chnk.length; +} +} else { +alignmentAnnotation.restrict (start, end); +}}, "~N,~N,jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "invertColumnSelection", +function (first, width) { +var hasHidden = this.hiddenColumns != null && this.hiddenColumns.size () > 0; +for (var i = first; i < width; i++) { +if (this.contains (i)) { +this.removeElement (i); +} else { +if (!hasHidden || this.isVisible (i)) { +this.addElement (i); +}}} +}, "~N,~N"); +Clazz.defineMethod (c$, "addElementsFrom", +function (colsel) { +if (colsel != null && colsel.size () > 0) { +for (var col, $col = colsel.getSelected ().iterator (); $col.hasNext () && ((col = $col.next ()) || true);) { +if (this.hiddenColumns != null && this.isVisible (col.intValue ())) { +if (!this.selected.contains (col)) { +this.selected.addElement (col); +}}} +}}, "jalview.datamodel.ColumnSelection"); +Clazz.defineMethod (c$, "setElementsFrom", +function (colsel) { +this.selected = new java.util.Vector (); +if (colsel.selected != null && colsel.selected.size () > 0) { +if (this.hiddenColumns != null && this.hiddenColumns.size () > 0) { +this.addElementsFrom (colsel); +} else { +for (var col, $col = colsel.getSelected ().iterator (); $col.hasNext () && ((col = $col.next ()) || true);) { +this.addElement ((col).intValue ()); +} +}}}, "jalview.datamodel.ColumnSelection"); +c$.propagateInsertions = Clazz.defineMethod (c$, "propagateInsertions", +function (profileseq, al, input) { +var profsqpos = 0; +var gc = al.getGapCharacter (); +var alandcolsel = input.getAlignmentAndColumnSelection (gc); +var nview = alandcolsel[1]; +var origseq = (alandcolsel[0])[profsqpos]; +nview.propagateInsertions (profileseq, al, origseq); +return nview; +}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI,jalview.datamodel.AlignmentView"); +Clazz.defineMethod (c$, "propagateInsertions", +function (profileseq, al, origseq) { +var gc = al.getGapCharacter (); +this.pruneDeletions (jalview.util.ShiftList.parseMap (origseq.gapMap ())); +var viscontigs = this.getVisibleContigs (0, profileseq.getLength ()); +var spos = 0; +var offset = 0; +for (var v = 0; v < viscontigs.length; v += 2) { +if (viscontigs[v] > spos) { +var sb = new StringBuffer (); +for (var s = 0, ns = viscontigs[v] - spos; s < ns; s++) { +sb.append (gc); +} +for (var s = 0, ns = al.getHeight (); s < ns; s++) { +var sqobj = al.getSequenceAt (s); +if (sqobj !== profileseq) { +var sq = al.getSequenceAt (s).getSequenceAsString (); +if (sq.length <= spos + offset) { +var diff = spos + offset - sq.length - 1; +if (diff > 0) { +sq = sq + sb; +while ((diff = spos + offset - sq.length - 1) > 0) { +if (diff >= sb.length ()) { +sq += sb.toString (); +} else { +var buf = Clazz.newCharArray (diff, '\0'); +sb.getChars (0, diff, buf, 0); +sq += buf.toString (); +}} +}sq += sb.toString (); +} else { +al.getSequenceAt (s).setSequence (sq.substring (0, spos + offset) + sb.toString () + sq.substring (spos + offset)); +}}} +}spos = viscontigs[v + 1] + 1; +} +if ((offset + spos) < profileseq.getLength ()) { +var sb = new StringBuffer (); +for (var s = 0, ns = profileseq.getLength () - spos - offset; s < ns; s++) { +sb.append (gc); +} +for (var s = 0, ns = al.getHeight (); s < ns; s++) { +var sqobj = al.getSequenceAt (s); +if (sqobj === profileseq) { +continue; +}var sq = sqobj.getSequenceAsString (); +var diff = origseq.getLength () - sq.length; +while (diff > 0) { +if (diff >= sb.length ()) { +sq += sb.toString (); +} else { +var buf = Clazz.newCharArray (diff, '\0'); +sb.getChars (0, diff, buf, 0); +sq += buf.toString (); +}diff = origseq.getLength () - sq.length; +} +} +}}, "jalview.datamodel.SequenceI,jalview.datamodel.AlignmentI,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "hasSelectedColumns", +function () { +return (this.selected != null && this.selected.size () > 0); +}); +Clazz.defineMethod (c$, "hasHiddenColumns", +function () { +return this.hiddenColumns != null && this.hiddenColumns.size () > 0; +}); +Clazz.defineMethod (c$, "hasManyHiddenColumns", +function () { +return this.hiddenColumns != null && this.hiddenColumns.size () > 1; +}); +Clazz.defineMethod (c$, "hideInsertionsFor", +function (sr) { +var inserts = sr.getInsertions (); +for (var r, $r = inserts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { +this.hideColumns (r[0], r[1]); +} +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "filterAnnotations", +function (annotations, filterParams) { +this.revealAllHiddenColumns (); +this.clear (); +var count = 0; +do { +if (annotations[count] != null) { +var itemMatched = false; +if (filterParams.getThresholdType () === jalview.viewmodel.annotationfilter.AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD && annotations[count].value >= filterParams.getThresholdValue ()) { +itemMatched = true; +}if (filterParams.getThresholdType () === jalview.viewmodel.annotationfilter.AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD && annotations[count].value <= filterParams.getThresholdValue ()) { +itemMatched = true; +}if (filterParams.isFilterAlphaHelix () && annotations[count].secondaryStructure == 'H') { +itemMatched = true; +}if (filterParams.isFilterBetaSheet () && annotations[count].secondaryStructure == 'E') { +itemMatched = true; +}if (filterParams.isFilterTurn () && annotations[count].secondaryStructure == 'S') { +itemMatched = true; +}var regexSearchString = filterParams.getRegexString (); +if (regexSearchString != null && !filterParams.getRegexSearchFields ().isEmpty ()) { +var fields = filterParams.getRegexSearchFields (); +try { +if (fields.contains (jalview.viewmodel.annotationfilter.AnnotationFilterParameter.SearchableAnnotationField.DISPLAY_STRING) && annotations[count].displayCharacter.matches (regexSearchString)) { +itemMatched = true; +}} catch (pse) { +if (Clazz.exceptionOf (pse, java.util.regex.PatternSyntaxException)) { +if (annotations[count].displayCharacter.equals (regexSearchString)) { +itemMatched = true; +}} else { +throw pse; +} +} +if (fields.contains (jalview.viewmodel.annotationfilter.AnnotationFilterParameter.SearchableAnnotationField.DESCRIPTION) && annotations[count].description != null && annotations[count].description.matches (regexSearchString)) { +itemMatched = true; +}}if (itemMatched) { +this.addElement (count); +}}count++; +} while (count < annotations.length); +return false; +}, "~A,jalview.viewmodel.annotationfilter.AnnotationFilterParameter"); +}); diff --git a/bin/jalview/datamodel/DBRefEntry.js b/bin/jalview/datamodel/DBRefEntry.js index da2e0cb..148cf99 100644 --- a/bin/jalview/datamodel/DBRefEntry.js +++ b/bin/jalview/datamodel/DBRefEntry.js @@ -1,93 +1,93 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.DBRefEntry", ["jalview.datamodel.Mapping"], function () { -c$ = Clazz.decorateAsClass (function () { -this.source = ""; -this.version = ""; -this.accessionId = ""; -this.map = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "DBRefEntry"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (source, version, accessionId) { -this.construct (source, version, accessionId, null); -}, "~S,~S,~S"); -Clazz.makeConstructor (c$, -function (source, version, accessionId, map) { -this.source = source.toUpperCase (); -this.version = version; -this.accessionId = accessionId; -this.map = map; -}, "~S,~S,~S,jalview.datamodel.Mapping"); -Clazz.makeConstructor (c$, -function (entry) { -this.construct ((entry.source == null ? "" : String.instantialize (entry.source)), (entry.version == null ? "" : String.instantialize (entry.version)), (entry.accessionId == null ? "" : String.instantialize (entry.accessionId)), (entry.map == null ? null : new jalview.datamodel.Mapping (entry.map))); -}, "jalview.datamodel.DBRefEntry"); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (o == null || !(Clazz.instanceOf (o, jalview.datamodel.DBRefEntry))) { -return false; -}var entry = o; -if (entry === this) { -return true; -}if (this.equalRef (entry) && ((this.map == null && entry.map == null) || (this.map != null && entry.map != null && this.map.equals (entry.map)))) { -return true; -}return false; -}, "~O"); -Clazz.defineMethod (c$, "equalRef", -function (entry) { -if (entry == null) { -return false; -}if (entry === this) { -return true; -}if ((this.source != null && entry.source != null && this.source.equalsIgnoreCase (entry.source)) && (this.accessionId != null && entry.accessionId != null && this.accessionId.equalsIgnoreCase (entry.accessionId)) && (this.version != null && entry.version != null && this.version.equalsIgnoreCase (entry.version))) { -return true; -}return false; -}, "jalview.datamodel.DBRefEntry"); -Clazz.defineMethod (c$, "getSource", -function () { -return this.source; -}); -Clazz.defineMethod (c$, "getVersion", -function () { -return this.version; -}); -Clazz.defineMethod (c$, "getAccessionId", -function () { -return this.accessionId; -}); -Clazz.defineMethod (c$, "setAccessionId", -function (accessionId) { -this.accessionId = accessionId; -}, "~S"); -Clazz.defineMethod (c$, "setSource", -function (source) { -this.source = source; -}, "~S"); -Clazz.defineMethod (c$, "setVersion", -function (version) { -this.version = version; -}, "~S"); -Clazz.defineMethod (c$, "getMap", -function () { -return this.map; -}); -Clazz.defineMethod (c$, "setMap", -function (map) { -this.map = map; -}, "jalview.datamodel.Mapping"); -Clazz.defineMethod (c$, "hasMap", -function () { -return this.map != null; -}); -Clazz.defineMethod (c$, "getSrcAccString", -function () { -return ((this.source != null) ? this.source : "") + ":" + ((this.accessionId != null) ? this.accessionId : ""); -}); -Clazz.overrideMethod (c$, "toString", -function () { -return this.getSrcAccString (); -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.DBRefEntry", ["jalview.datamodel.Mapping"], function () { +c$ = Clazz.decorateAsClass (function () { +this.source = ""; +this.version = ""; +this.accessionId = ""; +this.map = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "DBRefEntry"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (source, version, accessionId) { +this.construct (source, version, accessionId, null); +}, "~S,~S,~S"); +Clazz.makeConstructor (c$, +function (source, version, accessionId, map) { +this.source = source.toUpperCase (); +this.version = version; +this.accessionId = accessionId; +this.map = map; +}, "~S,~S,~S,jalview.datamodel.Mapping"); +Clazz.makeConstructor (c$, +function (entry) { +this.construct ((entry.source == null ? "" : String.instantialize (entry.source)), (entry.version == null ? "" : String.instantialize (entry.version)), (entry.accessionId == null ? "" : String.instantialize (entry.accessionId)), (entry.map == null ? null : new jalview.datamodel.Mapping (entry.map))); +}, "jalview.datamodel.DBRefEntry"); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (o == null || !(Clazz.instanceOf (o, jalview.datamodel.DBRefEntry))) { +return false; +}var entry = o; +if (entry === this) { +return true; +}if (this.equalRef (entry) && ((this.map == null && entry.map == null) || (this.map != null && entry.map != null && this.map.equals (entry.map)))) { +return true; +}return false; +}, "~O"); +Clazz.defineMethod (c$, "equalRef", +function (entry) { +if (entry == null) { +return false; +}if (entry === this) { +return true; +}if ((this.source != null && entry.source != null && this.source.equalsIgnoreCase (entry.source)) && (this.accessionId != null && entry.accessionId != null && this.accessionId.equalsIgnoreCase (entry.accessionId)) && (this.version != null && entry.version != null && this.version.equalsIgnoreCase (entry.version))) { +return true; +}return false; +}, "jalview.datamodel.DBRefEntry"); +Clazz.defineMethod (c$, "getSource", +function () { +return this.source; +}); +Clazz.defineMethod (c$, "getVersion", +function () { +return this.version; +}); +Clazz.defineMethod (c$, "getAccessionId", +function () { +return this.accessionId; +}); +Clazz.defineMethod (c$, "setAccessionId", +function (accessionId) { +this.accessionId = accessionId; +}, "~S"); +Clazz.defineMethod (c$, "setSource", +function (source) { +this.source = source; +}, "~S"); +Clazz.defineMethod (c$, "setVersion", +function (version) { +this.version = version; +}, "~S"); +Clazz.defineMethod (c$, "getMap", +function () { +return this.map; +}); +Clazz.defineMethod (c$, "setMap", +function (map) { +this.map = map; +}, "jalview.datamodel.Mapping"); +Clazz.defineMethod (c$, "hasMap", +function () { +return this.map != null; +}); +Clazz.defineMethod (c$, "getSrcAccString", +function () { +return ((this.source != null) ? this.source : "") + ":" + ((this.accessionId != null) ? this.accessionId : ""); +}); +Clazz.overrideMethod (c$, "toString", +function () { +return this.getSrcAccString (); +}); +}); diff --git a/bin/jalview/datamodel/DBRefSource.js b/bin/jalview/datamodel/DBRefSource.js index 587f6f3..00d7337 100644 --- a/bin/jalview/datamodel/DBRefSource.js +++ b/bin/jalview/datamodel/DBRefSource.js @@ -1,29 +1,29 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.declareType (jalview.datamodel, "DBRefSource"); -Clazz.defineStatics (c$, -"UNIPROT", "UNIPROT"); -c$.UP_NAME = c$.prototype.UP_NAME = "UNIPROT_NAME".toUpperCase (); -c$.UNIPROTKB = c$.prototype.UNIPROTKB = "UniProtKB/TrEMBL".toUpperCase (); -c$.EMBLCDSProduct = c$.prototype.EMBLCDSProduct = "EMBLCDSProtein".toUpperCase (); -Clazz.defineStatics (c$, -"PDB", "PDB", -"EMBL", "EMBL", -"EMBLCDS", "EMBLCDS", -"PFAM", "PFAM", -"RFAM", "RFAM"); -c$.GENEDB = c$.prototype.GENEDB = "GeneDB".toUpperCase (); -c$.DNACODINGDBS = c$.prototype.DNACODINGDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.EMBL, jalview.datamodel.DBRefSource.EMBLCDS, jalview.datamodel.DBRefSource.GENEDB]); -c$.CODINGDBS = c$.prototype.CODINGDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.EMBLCDS, jalview.datamodel.DBRefSource.GENEDB]); -c$.PROTEINDBS = c$.prototype.PROTEINDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.UNIPROT, jalview.datamodel.DBRefSource.PDB, jalview.datamodel.DBRefSource.UNIPROTKB, jalview.datamodel.DBRefSource.EMBLCDSProduct]); -c$.PROTEINSEQ = c$.prototype.PROTEINSEQ = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.UNIPROT, jalview.datamodel.DBRefSource.UNIPROTKB, jalview.datamodel.DBRefSource.EMBLCDSProduct]); -c$.PROTEINSTR = c$.prototype.PROTEINSTR = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.PDB]); -c$.DOMAINDBS = c$.prototype.DOMAINDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.PFAM, jalview.datamodel.DBRefSource.RFAM]); -Clazz.defineStatics (c$, -"SEQDB", "SQ", -"DNASEQDB", "NASQ", -"PROTSEQDB", "PROTSQ", -"CODINGSEQDB", "CODING", -"DNACODINGSEQDB", "XONCODING", -"DOMAINDB", "DOMAIN", -"MULTIACC", "MULTIACC", -"ALIGNMENTDB", "ALIGNMENTS"); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.declareType (jalview.datamodel, "DBRefSource"); +Clazz.defineStatics (c$, +"UNIPROT", "UNIPROT"); +c$.UP_NAME = c$.prototype.UP_NAME = "UNIPROT_NAME".toUpperCase (); +c$.UNIPROTKB = c$.prototype.UNIPROTKB = "UniProtKB/TrEMBL".toUpperCase (); +c$.EMBLCDSProduct = c$.prototype.EMBLCDSProduct = "EMBLCDSProtein".toUpperCase (); +Clazz.defineStatics (c$, +"PDB", "PDB", +"EMBL", "EMBL", +"EMBLCDS", "EMBLCDS", +"PFAM", "PFAM", +"RFAM", "RFAM"); +c$.GENEDB = c$.prototype.GENEDB = "GeneDB".toUpperCase (); +c$.DNACODINGDBS = c$.prototype.DNACODINGDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.EMBL, jalview.datamodel.DBRefSource.EMBLCDS, jalview.datamodel.DBRefSource.GENEDB]); +c$.CODINGDBS = c$.prototype.CODINGDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.EMBLCDS, jalview.datamodel.DBRefSource.GENEDB]); +c$.PROTEINDBS = c$.prototype.PROTEINDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.UNIPROT, jalview.datamodel.DBRefSource.PDB, jalview.datamodel.DBRefSource.UNIPROTKB, jalview.datamodel.DBRefSource.EMBLCDSProduct]); +c$.PROTEINSEQ = c$.prototype.PROTEINSEQ = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.UNIPROT, jalview.datamodel.DBRefSource.UNIPROTKB, jalview.datamodel.DBRefSource.EMBLCDSProduct]); +c$.PROTEINSTR = c$.prototype.PROTEINSTR = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.PDB]); +c$.DOMAINDBS = c$.prototype.DOMAINDBS = Clazz.newArray (-1, [jalview.datamodel.DBRefSource.PFAM, jalview.datamodel.DBRefSource.RFAM]); +Clazz.defineStatics (c$, +"SEQDB", "SQ", +"DNASEQDB", "NASQ", +"PROTSEQDB", "PROTSQ", +"CODINGSEQDB", "CODING", +"DNACODINGSEQDB", "XONCODING", +"DOMAINDB", "DOMAIN", +"MULTIACC", "MULTIACC", +"ALIGNMENTDB", "ALIGNMENTS"); diff --git a/bin/jalview/datamodel/FeatureProperties.js b/bin/jalview/datamodel/FeatureProperties.js index 6df3e2b..350148d 100644 --- a/bin/jalview/datamodel/FeatureProperties.js +++ b/bin/jalview/datamodel/FeatureProperties.js @@ -1,20 +1,20 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.FeatureProperties", ["jalview.datamodel.DBRefSource"], function () { -c$ = Clazz.declareType (jalview.datamodel, "FeatureProperties"); -c$.isCodingFeature = Clazz.defineMethod (c$, "isCodingFeature", -function (dbrefsource, type) { -if (type.equalsIgnoreCase ("CDS")) { -return (dbrefsource == null || dbrefsource.equalsIgnoreCase (jalview.datamodel.DBRefSource.EMBL) || dbrefsource.equalsIgnoreCase (jalview.datamodel.DBRefSource.EMBLCDS)); -}return false; -}, "~S,~S"); -c$.getCodingFeature = Clazz.defineMethod (c$, "getCodingFeature", -function (dbrefsource) { -if (jalview.datamodel.DBRefSource.EMBL.equalsIgnoreCase (dbrefsource) || jalview.datamodel.DBRefSource.EMBLCDS.equalsIgnoreCase (dbrefsource)) { -return "CDS"; -}return null; -}, "~S"); -Clazz.defineStatics (c$, -"EMBL_CODING_FEATURE", "CDS", -"EXONPOS", "exon number", -"EXONPRODUCT", "product"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.FeatureProperties", ["jalview.datamodel.DBRefSource"], function () { +c$ = Clazz.declareType (jalview.datamodel, "FeatureProperties"); +c$.isCodingFeature = Clazz.defineMethod (c$, "isCodingFeature", +function (dbrefsource, type) { +if (type.equalsIgnoreCase ("CDS")) { +return (dbrefsource == null || dbrefsource.equalsIgnoreCase (jalview.datamodel.DBRefSource.EMBL) || dbrefsource.equalsIgnoreCase (jalview.datamodel.DBRefSource.EMBLCDS)); +}return false; +}, "~S,~S"); +c$.getCodingFeature = Clazz.defineMethod (c$, "getCodingFeature", +function (dbrefsource) { +if (jalview.datamodel.DBRefSource.EMBL.equalsIgnoreCase (dbrefsource) || jalview.datamodel.DBRefSource.EMBLCDS.equalsIgnoreCase (dbrefsource)) { +return "CDS"; +}return null; +}, "~S"); +Clazz.defineStatics (c$, +"EMBL_CODING_FEATURE", "CDS", +"EXONPOS", "exon number", +"EXONPRODUCT", "product"); +}); diff --git a/bin/jalview/datamodel/GraphLine.js b/bin/jalview/datamodel/GraphLine.js index 564e7f4..83ffc69 100644 --- a/bin/jalview/datamodel/GraphLine.js +++ b/bin/jalview/datamodel/GraphLine.js @@ -1,36 +1,36 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.awt.Color"], "jalview.datamodel.GraphLine", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.value = 0; -this.label = ""; -this.colour = null; -this.displayed = true; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "GraphLine"); -Clazz.prepareFields (c$, function () { -this.colour = java.awt.Color.black; -}); -Clazz.makeConstructor (c$, -function (value, label, col) { -this.value = value; -if (label != null) { -this.label = label; -}if (col != null) { -this.colour = col; -}}, "~N,~S,java.awt.Color"); -Clazz.makeConstructor (c$, -function (from) { -if (from != null) { -this.value = from.value; -this.label = String.instantialize (from.label); -this.colour = from.colour; -this.displayed = from.displayed; -}}, "jalview.datamodel.GraphLine"); -Clazz.overrideMethod (c$, "equals", -function (obj) { -if (obj != null && Clazz.instanceOf (obj, jalview.datamodel.GraphLine)) { -var other = obj; -return this.displayed == other.displayed && this.value == other.value && (this.colour != null ? (other.colour != null && other.colour.equals (this.colour)) : other.colour == null) && (this.label != null ? (other.label != null && other.label.equals (this.label)) : other.label == null); -}return false; -}, "~O"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.awt.Color"], "jalview.datamodel.GraphLine", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.value = 0; +this.label = ""; +this.colour = null; +this.displayed = true; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "GraphLine"); +Clazz.prepareFields (c$, function () { +this.colour = java.awt.Color.black; +}); +Clazz.makeConstructor (c$, +function (value, label, col) { +this.value = value; +if (label != null) { +this.label = label; +}if (col != null) { +this.colour = col; +}}, "~N,~S,java.awt.Color"); +Clazz.makeConstructor (c$, +function (from) { +if (from != null) { +this.value = from.value; +this.label = String.instantialize (from.label); +this.colour = from.colour; +this.displayed = from.displayed; +}}, "jalview.datamodel.GraphLine"); +Clazz.overrideMethod (c$, "equals", +function (obj) { +if (obj != null && Clazz.instanceOf (obj, jalview.datamodel.GraphLine)) { +var other = obj; +return this.displayed == other.displayed && this.value == other.value && (this.colour != null ? (other.colour != null && other.colour.equals (this.colour)) : other.colour == null) && (this.label != null ? (other.label != null && other.label.equals (this.label)) : other.label == null); +}return false; +}, "~O"); +}); diff --git a/bin/jalview/datamodel/HiddenSequences.class b/bin/jalview/datamodel/HiddenSequences.class index a6524e4aeebfd05e8e66a6ed26285f81260c14a2..5553ae26124c2c73ffb985c59e889b4cd4db000f 100644 GIT binary patch delta 27 jcmZoOY&G0qA delta 28 kcmZoQY%| width) { -width = this.hiddenSequences[i].getLength (); -}} -return width; -}); -Clazz.defineMethod (c$, "adjustHeightSequenceDeleted", -function (seqIndex) { -if (this.hiddenSequences == null) { -return; -}var alHeight = this.alignment.getHeight (); -var tmp = new Array (alHeight + this.getSize ()); -var deletionIndex = this.adjustForHiddenSeqs (seqIndex); -for (var i = 0; i < this.hiddenSequences.length; i++) { -if (this.hiddenSequences[i] == null) { -continue; -}if (i > deletionIndex) { -tmp[i - 1] = this.hiddenSequences[i]; -} else { -tmp[i] = this.hiddenSequences[i]; -}} -this.hiddenSequences = tmp; -}, "~N"); -Clazz.defineMethod (c$, "adjustHeightSequenceAdded", -function () { -if (this.hiddenSequences == null) { -return; -}var alHeight = this.alignment.getHeight (); -var tmp = new Array (alHeight + this.getSize ()); -System.arraycopy (this.hiddenSequences, 0, tmp, 0, this.hiddenSequences.length); -this.hiddenSequences = tmp; -}); -Clazz.defineMethod (c$, "hideSequence", -function (sequence) { -if (this.hiddenSequences == null) { -this.hiddenSequences = new Array (this.alignment.getHeight ()); -}var alignmentIndex = this.alignment.findIndex (sequence); -alignmentIndex = this.adjustForHiddenSeqs (alignmentIndex); -if (this.hiddenSequences[alignmentIndex] != null) { -System.out.println ("ERROR!!!!!!!!!!!"); -}this.hiddenSequences[alignmentIndex] = sequence; -this.alignment.deleteSequence (sequence); -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "showAll", -function (hiddenRepSequences) { -var revealedSeqs = new java.util.ArrayList (); -for (var i = 0; i < this.hiddenSequences.length; i++) { -if (this.hiddenSequences[i] != null) { -var tmp = this.showSequence (i, hiddenRepSequences); -for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -revealedSeqs.add (seq); -} -}} -return revealedSeqs; -}, "java.util.Map"); -Clazz.defineMethod (c$, "showSequence", -function (alignmentIndex, hiddenRepSequences) { -var revealedSeqs = new java.util.ArrayList (); -var repSequence = this.alignment.getSequenceAt (alignmentIndex); -if (repSequence != null && hiddenRepSequences != null && hiddenRepSequences.containsKey (repSequence)) { -hiddenRepSequences.remove (repSequence); -revealedSeqs.add (repSequence); -}var start = this.adjustForHiddenSeqs (alignmentIndex - 1); -var end = this.adjustForHiddenSeqs (alignmentIndex); -if (end >= this.hiddenSequences.length) { -end = this.hiddenSequences.length - 1; -}var asequences; -{ -for (var index = end; index > start; index--) { -var seq = this.hiddenSequences[index]; -this.hiddenSequences[index] = null; -if (seq != null) { -if (seq.getLength () > 0) { -revealedSeqs.add (seq); -asequences.add (alignmentIndex, seq); -} else { -System.out.println (seq.getName () + " has been deleted whilst hidden"); -}}} -}return revealedSeqs; -}, "~N,java.util.Map"); -Clazz.defineMethod (c$, "getHiddenSequence", -function (alignmentIndex) { -return this.hiddenSequences[alignmentIndex]; -}, "~N"); -Clazz.defineMethod (c$, "findIndexWithoutHiddenSeqs", -function (alignmentIndex) { -var index = 0; -var hiddenSeqs = 0; -if (this.hiddenSequences.length <= alignmentIndex) { -alignmentIndex = this.hiddenSequences.length - 1; -}while (index <= alignmentIndex) { -if (this.hiddenSequences[index] != null) { -hiddenSeqs++; -}index++; -} -;return (alignmentIndex - hiddenSeqs); -}, "~N"); -Clazz.defineMethod (c$, "adjustForHiddenSeqs", -function (alignmentIndex) { -var index = 0; -var hSize = this.hiddenSequences.length; -while (index <= alignmentIndex && index < hSize) { -if (this.hiddenSequences[index] != null) { -alignmentIndex++; -}index++; -} -;return alignmentIndex; -}, "~N"); -Clazz.defineMethod (c$, "getFullAlignment", -function () { -var isize = this.hiddenSequences.length; -var seq = new Array (isize); -var index = 0; -for (var i = 0; i < this.hiddenSequences.length; i++) { -if (this.hiddenSequences[i] != null) { -seq[i] = this.hiddenSequences[i]; -} else { -seq[i] = this.alignment.getSequenceAt (index); -index++; -}} -var fAlignmt = new jalview.datamodel.Alignment (seq); -fAlignmt.annotations = this.alignment.getAlignmentAnnotation (); -fAlignmt.alignmentProperties = this.alignment.getProperties (); -fAlignmt.groups = this.alignment.getGroups (); -fAlignmt.$hasRNAStructure = this.alignment.hasRNAStructure (); -return fAlignmt; -}); -Clazz.defineMethod (c$, "isHidden", -function (seq) { -if (this.hiddenSequences != null) { -for (var i = 0; i < this.hiddenSequences.length; i++) { -if (this.hiddenSequences[i] != null && this.hiddenSequences[i] === seq) { -return true; -}} -}return false; -}, "jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.HiddenSequences", ["jalview.datamodel.Alignment", "java.util.ArrayList"], function () { +c$ = Clazz.decorateAsClass (function () { +this.hiddenSequences = null; +this.alignment = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "HiddenSequences"); +Clazz.makeConstructor (c$, +function (al) { +this.alignment = al; +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "getSize", +function () { +if (this.hiddenSequences == null) { +return 0; +}var count = 0; +for (var i = 0; i < this.hiddenSequences.length; i++) { +if (this.hiddenSequences[i] != null) { +count++; +}} +return count; +}); +Clazz.defineMethod (c$, "getWidth", +function () { +var width = 0; +for (var i = 0; i < this.hiddenSequences.length; i++) { +if (this.hiddenSequences[i] != null && this.hiddenSequences[i].getLength () > width) { +width = this.hiddenSequences[i].getLength (); +}} +return width; +}); +Clazz.defineMethod (c$, "adjustHeightSequenceDeleted", +function (seqIndex) { +if (this.hiddenSequences == null) { +return; +}var alHeight = this.alignment.getHeight (); +var tmp = new Array (alHeight + this.getSize ()); +var deletionIndex = this.adjustForHiddenSeqs (seqIndex); +for (var i = 0; i < this.hiddenSequences.length; i++) { +if (this.hiddenSequences[i] == null) { +continue; +}if (i > deletionIndex) { +tmp[i - 1] = this.hiddenSequences[i]; +} else { +tmp[i] = this.hiddenSequences[i]; +}} +this.hiddenSequences = tmp; +}, "~N"); +Clazz.defineMethod (c$, "adjustHeightSequenceAdded", +function () { +if (this.hiddenSequences == null) { +return; +}var alHeight = this.alignment.getHeight (); +var tmp = new Array (alHeight + this.getSize ()); +System.arraycopy (this.hiddenSequences, 0, tmp, 0, this.hiddenSequences.length); +this.hiddenSequences = tmp; +}); +Clazz.defineMethod (c$, "hideSequence", +function (sequence) { +if (this.hiddenSequences == null) { +this.hiddenSequences = new Array (this.alignment.getHeight ()); +}var alignmentIndex = this.alignment.findIndex (sequence); +alignmentIndex = this.adjustForHiddenSeqs (alignmentIndex); +if (this.hiddenSequences[alignmentIndex] != null) { +System.out.println ("ERROR!!!!!!!!!!!"); +}this.hiddenSequences[alignmentIndex] = sequence; +this.alignment.deleteSequence (sequence); +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "showAll", +function (hiddenRepSequences) { +var revealedSeqs = new java.util.ArrayList (); +for (var i = 0; i < this.hiddenSequences.length; i++) { +if (this.hiddenSequences[i] != null) { +var tmp = this.showSequence (i, hiddenRepSequences); +for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +revealedSeqs.add (seq); +} +}} +return revealedSeqs; +}, "java.util.Map"); +Clazz.defineMethod (c$, "showSequence", +function (alignmentIndex, hiddenRepSequences) { +var revealedSeqs = new java.util.ArrayList (); +var repSequence = this.alignment.getSequenceAt (alignmentIndex); +if (repSequence != null && hiddenRepSequences != null && hiddenRepSequences.containsKey (repSequence)) { +hiddenRepSequences.remove (repSequence); +revealedSeqs.add (repSequence); +}var start = this.adjustForHiddenSeqs (alignmentIndex - 1); +var end = this.adjustForHiddenSeqs (alignmentIndex); +if (end >= this.hiddenSequences.length) { +end = this.hiddenSequences.length - 1; +}var asequences; +{ +for (var index = end; index > start; index--) { +var seq = this.hiddenSequences[index]; +this.hiddenSequences[index] = null; +if (seq != null) { +if (seq.getLength () > 0) { +revealedSeqs.add (seq); +asequences.add (alignmentIndex, seq); +} else { +System.out.println (seq.getName () + " has been deleted whilst hidden"); +}}} +}return revealedSeqs; +}, "~N,java.util.Map"); +Clazz.defineMethod (c$, "getHiddenSequence", +function (alignmentIndex) { +return this.hiddenSequences[alignmentIndex]; +}, "~N"); +Clazz.defineMethod (c$, "findIndexWithoutHiddenSeqs", +function (alignmentIndex) { +var index = 0; +var hiddenSeqs = 0; +if (this.hiddenSequences.length <= alignmentIndex) { +alignmentIndex = this.hiddenSequences.length - 1; +}while (index <= alignmentIndex) { +if (this.hiddenSequences[index] != null) { +hiddenSeqs++; +}index++; +} +;return (alignmentIndex - hiddenSeqs); +}, "~N"); +Clazz.defineMethod (c$, "adjustForHiddenSeqs", +function (alignmentIndex) { +var index = 0; +var hSize = this.hiddenSequences.length; +while (index <= alignmentIndex && index < hSize) { +if (this.hiddenSequences[index] != null) { +alignmentIndex++; +}index++; +} +;return alignmentIndex; +}, "~N"); +Clazz.defineMethod (c$, "getFullAlignment", +function () { +var isize = this.hiddenSequences.length; +var seq = new Array (isize); +var index = 0; +for (var i = 0; i < this.hiddenSequences.length; i++) { +if (this.hiddenSequences[i] != null) { +seq[i] = this.hiddenSequences[i]; +} else { +seq[i] = this.alignment.getSequenceAt (index); +index++; +}} +var fAlignmt = new jalview.datamodel.Alignment (seq); +fAlignmt.annotations = this.alignment.getAlignmentAnnotation (); +fAlignmt.alignmentProperties = this.alignment.getProperties (); +fAlignmt.groups = this.alignment.getGroups (); +fAlignmt.$hasRNAStructure = this.alignment.hasRNAStructure (); +return fAlignmt; +}); +Clazz.defineMethod (c$, "isHidden", +function (seq) { +if (this.hiddenSequences != null) { +for (var i = 0; i < this.hiddenSequences.length; i++) { +if (this.hiddenSequences[i] != null && this.hiddenSequences[i] === seq) { +return true; +}} +}return false; +}, "jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/datamodel/IncompleteCodonException.js b/bin/jalview/datamodel/IncompleteCodonException.js index 372d9dd..924024c 100644 --- a/bin/jalview/datamodel/IncompleteCodonException.js +++ b/bin/jalview/datamodel/IncompleteCodonException.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.lang.RuntimeException"], "jalview.datamodel.IncompleteCodonException", null, function () { -c$ = Clazz.declareType (jalview.datamodel, "IncompleteCodonException", RuntimeException); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.lang.RuntimeException"], "jalview.datamodel.IncompleteCodonException", null, function () { +c$ = Clazz.declareType (jalview.datamodel, "IncompleteCodonException", RuntimeException); +}); diff --git a/bin/jalview/datamodel/Mapping.js b/bin/jalview/datamodel/Mapping.js index fe06fda..a25222e 100644 --- a/bin/jalview/datamodel/Mapping.js +++ b/bin/jalview/datamodel/Mapping.js @@ -1,304 +1,304 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.util.Iterator"], "jalview.datamodel.Mapping", ["jalview.datamodel.AlignedCodon", "$.IncompleteCodonException", "$.SequenceFeature", "jalview.util.MapList", "java.util.NoSuchElementException", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -if (!Clazz.isClassDefined ("jalview.datamodel.Mapping.AlignedCodonIterator")) { -jalview.datamodel.Mapping.$Mapping$AlignedCodonIterator$ (); -} -this.map = null; -this.to = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "Mapping"); -Clazz.makeConstructor (c$, -function (map) { -this.map = map; -}, "jalview.util.MapList"); -Clazz.makeConstructor (c$, -function (to, map) { -this.construct (map); -this.to = to; -}, "jalview.datamodel.SequenceI,jalview.util.MapList"); -Clazz.makeConstructor (c$, -function (to, exon, is, i, j) { -this.construct (to, new jalview.util.MapList (exon, is, i, j)); -}, "jalview.datamodel.SequenceI,~A,~A,~N,~N"); -Clazz.makeConstructor (c$, -function (map2) { -if (map2 !== this && map2 != null) { -if (map2.map != null) { -this.map = new jalview.util.MapList (map2.map); -}this.to = map2.to; -}}, "jalview.datamodel.Mapping"); -Clazz.defineMethod (c$, "getMap", -function () { -return this.map; -}); -Clazz.defineMethod (c$, "setMap", -function (map) { -this.map = map; -}, "jalview.util.MapList"); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (o == null || !(Clazz.instanceOf (o, jalview.datamodel.Mapping))) { -return false; -}var other = o; -if (other === this) { -return true; -}if (other.to !== this.to) { -return false; -}if ((this.map != null && other.map == null) || (this.map == null && other.map != null)) { -return false; -}if ((this.map == null && other.map == null) || this.map.equals (other.map)) { -return true; -}return false; -}, "~O"); -Clazz.defineMethod (c$, "getPosition", -function (mpos) { -if (this.map != null) { -var mp = this.map.shiftTo (mpos); -if (mp != null) { -return mp[0]; -}}return mpos; -}, "~N"); -Clazz.defineMethod (c$, "getWord", -function (mpos) { -if (this.map != null) { -return this.map.getToWord (mpos); -}return null; -}, "~N"); -Clazz.defineMethod (c$, "getWidth", -function () { -if (this.map != null) { -return this.map.getFromRatio (); -}return 1; -}); -Clazz.defineMethod (c$, "getMappedWidth", -function () { -if (this.map != null) { -return this.map.getToRatio (); -}return 1; -}); -Clazz.defineMethod (c$, "getMappedPosition", -function (pos) { -if (this.map != null) { -var mp = this.map.shiftFrom (pos); -if (mp != null) { -return mp[0]; -}}return pos; -}, "~N"); -Clazz.defineMethod (c$, "getMappedWord", -function (pos) { -if (this.map != null) { -var mp = this.map.shiftFrom (pos); -if (mp != null) { -return Clazz.newIntArray (-1, [mp[0], mp[0] + mp[2] * (this.map.getToRatio () - 1)]); -}}return null; -}, "~N"); -Clazz.defineMethod (c$, "locateFeature", -function (f) { -if (true) { -if (this.map != null) { -var frange = this.map.locateInFrom (f.getBegin (), f.getEnd ()); -if (frange == null) { -return null; -}var vf = new Array (Clazz.doubleToInt (frange.length / 2)); -for (var i = 0, v = 0; i < frange.length; i += 2, v++) { -vf[v] = new jalview.datamodel.SequenceFeature (f); -vf[v].setBegin (frange[i]); -vf[v].setEnd (frange[i + 1]); -if (frange.length > 2) { -vf[v].setDescription (f.getDescription () + "\nPart " + (v + 1)); -}} -return vf; -}}if (false) { -var word = this.getWord (f.getBegin ()); -if (word[0] < word[1]) { -f.setBegin (word[0]); -} else { -f.setBegin (word[1]); -}word = this.getWord (f.getEnd ()); -if (word[0] > word[1]) { -f.setEnd (word[0]); -} else { -f.setEnd (word[1]); -}}return Clazz.newArray (-1, [f]); -}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "locateRange", -function (from, to) { -if (this.map != null) { -if (from <= to) { -from = (this.map.getToLowest () < from) ? from : this.map.getToLowest (); -to = (this.map.getToHighest () > to) ? to : this.map.getToHighest (); -if (from > to) { -return null; -}} else { -from = (this.map.getToHighest () > from) ? from : this.map.getToHighest (); -to = (this.map.getToLowest () < to) ? to : this.map.getToLowest (); -if (from < to) { -return null; -}}return this.map.locateInFrom (from, to); -}return Clazz.newIntArray (-1, [from, to]); -}, "~N,~N"); -Clazz.defineMethod (c$, "locateMappedRange", -function (from, to) { -if (this.map != null) { -if (from <= to) { -from = (this.map.getFromLowest () < from) ? from : this.map.getFromLowest (); -to = (this.map.getFromHighest () > to) ? to : this.map.getFromHighest (); -if (from > to) { -return null; -}} else { -from = (this.map.getFromHighest () > from) ? from : this.map.getFromHighest (); -to = (this.map.getFromLowest () < to) ? to : this.map.getFromLowest (); -if (from < to) { -return null; -}}return this.map.locateInTo (from, to); -}return Clazz.newIntArray (-1, [from, to]); -}, "~N,~N"); -Clazz.defineMethod (c$, "intersectVisContigs", -function (viscontigs) { -var copy = new jalview.datamodel.Mapping (this); -if (this.map != null) { -var vpos = 0; -var apos = 0; -var toRange = new java.util.Vector (); -var fromRange = new java.util.Vector (); -for (var vc = 0; vc < viscontigs.length; vc += 2) { -var mpr = this.locateMappedRange (1 + viscontigs[vc], viscontigs[vc + 1] - 1); -if (mpr != null) { -for (var m = 0; m < mpr.length; m += 2) { -toRange.addElement ( Clazz.newIntArray (-1, [mpr[m], mpr[m + 1]])); -var xpos = this.locateRange (mpr[m], mpr[m + 1]); -for (var x = 0; x < xpos.length; x += 2) { -fromRange.addElement ( Clazz.newIntArray (-1, [xpos[x], xpos[x + 1]])); -} -} -}} -var from = Clazz.newIntArray (fromRange.size () * 2, 0); -var to = Clazz.newIntArray (toRange.size () * 2, 0); -var r; -for (var f = 0, fSize = fromRange.size (); f < fSize; f++) { -r = fromRange.elementAt (f); -from[f * 2] = r[0]; -from[f * 2 + 1] = r[1]; -} -for (var f = 0, fSize = toRange.size (); f < fSize; f++) { -r = toRange.elementAt (f); -to[f * 2] = r[0]; -to[f * 2 + 1] = r[1]; -} -copy.setMap ( new jalview.util.MapList (from, to, this.map.getFromRatio (), this.map.getToRatio ())); -}return copy; -}, "~A"); -Clazz.defineMethod (c$, "getTo", -function () { -return this.to; -}); -Clazz.defineMethod (c$, "setTo", -function (tto) { -this.to = tto; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "finalize", -function () { -this.map = null; -this.to = null; -Clazz.superCall (this, jalview.datamodel.Mapping, "finalize", []); -}); -Clazz.defineMethod (c$, "getCodonIterator", -function (seq, gapChar) { -return Clazz.innerTypeInstance (jalview.datamodel.Mapping.AlignedCodonIterator, this, null, seq.getSequence (), gapChar); -}, "jalview.datamodel.SequenceI,~S"); -c$.$Mapping$AlignedCodonIterator$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.gap = '\0'; -this.alignedSeq = null; -this.alignedColumn = 0; -this.alignedBases = 0; -this.fromRanges = null; -this.toRanges = null; -this.currentFromRange = null; -this.currentToRange = null; -this.fromPosition = 0; -this.toPosition = 0; -Clazz.instantialize (this, arguments); -}, jalview.datamodel.Mapping, "AlignedCodonIterator", null, java.util.Iterator); -Clazz.makeConstructor (c$, -function (a, b) { -this.alignedSeq = a; -this.gap = b; -this.fromRanges = this.b$["jalview.datamodel.Mapping"].map.getFromRanges ().iterator (); -this.toRanges = this.b$["jalview.datamodel.Mapping"].map.getToRanges ().iterator (); -if (this.fromRanges.hasNext ()) { -this.currentFromRange = this.fromRanges.next (); -this.fromPosition = this.currentFromRange[0]; -}if (this.toRanges.hasNext ()) { -this.currentToRange = this.toRanges.next (); -this.toPosition = this.currentToRange[0]; -}}, "~A,~S"); -Clazz.defineMethod (c$, "hasNext", -function () { -if (this.fromRanges.hasNext ()) { -return true; -}if (this.currentFromRange == null || this.fromPosition >= this.currentFromRange[1]) { -return false; -}return true; -}); -Clazz.overrideMethod (c$, "next", -function () { -if (!this.hasNext ()) { -throw new java.util.NoSuchElementException (); -}var a = this.getNextCodon (); -var b = this.getAlignedCodon (a); -var c = this.getPeptide (); -return new jalview.datamodel.AlignedCodon (b[0], b[1], b[2], c); -}); -Clazz.defineMethod (c$, "getPeptide", -($fz = function () { -if (this.toPosition <= this.currentToRange[1]) { -var a = this.b$["jalview.datamodel.Mapping"].to.getSequence ()[this.toPosition - 1]; -this.toPosition++; -return String.valueOf (a); -}if (!this.toRanges.hasNext ()) { -throw new java.util.NoSuchElementException ("Ran out of peptide at position " + this.toPosition); -}this.currentToRange = this.toRanges.next (); -this.toPosition = this.currentToRange[0]; -return this.getPeptide (); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getNextCodon", -($fz = function () { -var a = Clazz.newIntArray (3, 0); -var b = 0; -while (b < 3) { -if (this.fromPosition <= this.currentFromRange[1]) { -a[b++] = this.fromPosition++; -} else { -if (!this.fromRanges.hasNext ()) { -throw new jalview.datamodel.IncompleteCodonException (); -}this.currentFromRange = this.fromRanges.next (); -this.fromPosition = this.currentFromRange[0]; -}} -return a; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getAlignedCodon", -($fz = function (a) { -var b = Clazz.newIntArray (a.length, 0); -for (var c = 0; c < a.length; c++) { -b[c] = this.getAlignedColumn (a[c]); -} -return b; -}, $fz.isPrivate = true, $fz), "~A"); -Clazz.defineMethod (c$, "getAlignedColumn", -($fz = function (a) { -while (this.alignedBases < a && this.alignedColumn < this.alignedSeq.length) { -if (this.alignedSeq[this.alignedColumn++] != this.gap) { -this.alignedBases++; -}} -return this.alignedColumn - 1; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.overrideMethod (c$, "remove", -function () { -}); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.util.Iterator"], "jalview.datamodel.Mapping", ["jalview.datamodel.AlignedCodon", "$.IncompleteCodonException", "$.SequenceFeature", "jalview.util.MapList", "java.util.NoSuchElementException", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +if (!Clazz.isClassDefined ("jalview.datamodel.Mapping.AlignedCodonIterator")) { +jalview.datamodel.Mapping.$Mapping$AlignedCodonIterator$ (); +} +this.map = null; +this.to = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "Mapping"); +Clazz.makeConstructor (c$, +function (map) { +this.map = map; +}, "jalview.util.MapList"); +Clazz.makeConstructor (c$, +function (to, map) { +this.construct (map); +this.to = to; +}, "jalview.datamodel.SequenceI,jalview.util.MapList"); +Clazz.makeConstructor (c$, +function (to, exon, is, i, j) { +this.construct (to, new jalview.util.MapList (exon, is, i, j)); +}, "jalview.datamodel.SequenceI,~A,~A,~N,~N"); +Clazz.makeConstructor (c$, +function (map2) { +if (map2 !== this && map2 != null) { +if (map2.map != null) { +this.map = new jalview.util.MapList (map2.map); +}this.to = map2.to; +}}, "jalview.datamodel.Mapping"); +Clazz.defineMethod (c$, "getMap", +function () { +return this.map; +}); +Clazz.defineMethod (c$, "setMap", +function (map) { +this.map = map; +}, "jalview.util.MapList"); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (o == null || !(Clazz.instanceOf (o, jalview.datamodel.Mapping))) { +return false; +}var other = o; +if (other === this) { +return true; +}if (other.to !== this.to) { +return false; +}if ((this.map != null && other.map == null) || (this.map == null && other.map != null)) { +return false; +}if ((this.map == null && other.map == null) || this.map.equals (other.map)) { +return true; +}return false; +}, "~O"); +Clazz.defineMethod (c$, "getPosition", +function (mpos) { +if (this.map != null) { +var mp = this.map.shiftTo (mpos); +if (mp != null) { +return mp[0]; +}}return mpos; +}, "~N"); +Clazz.defineMethod (c$, "getWord", +function (mpos) { +if (this.map != null) { +return this.map.getToWord (mpos); +}return null; +}, "~N"); +Clazz.defineMethod (c$, "getWidth", +function () { +if (this.map != null) { +return this.map.getFromRatio (); +}return 1; +}); +Clazz.defineMethod (c$, "getMappedWidth", +function () { +if (this.map != null) { +return this.map.getToRatio (); +}return 1; +}); +Clazz.defineMethod (c$, "getMappedPosition", +function (pos) { +if (this.map != null) { +var mp = this.map.shiftFrom (pos); +if (mp != null) { +return mp[0]; +}}return pos; +}, "~N"); +Clazz.defineMethod (c$, "getMappedWord", +function (pos) { +if (this.map != null) { +var mp = this.map.shiftFrom (pos); +if (mp != null) { +return Clazz.newIntArray (-1, [mp[0], mp[0] + mp[2] * (this.map.getToRatio () - 1)]); +}}return null; +}, "~N"); +Clazz.defineMethod (c$, "locateFeature", +function (f) { +if (true) { +if (this.map != null) { +var frange = this.map.locateInFrom (f.getBegin (), f.getEnd ()); +if (frange == null) { +return null; +}var vf = new Array (Clazz.doubleToInt (frange.length / 2)); +for (var i = 0, v = 0; i < frange.length; i += 2, v++) { +vf[v] = new jalview.datamodel.SequenceFeature (f); +vf[v].setBegin (frange[i]); +vf[v].setEnd (frange[i + 1]); +if (frange.length > 2) { +vf[v].setDescription (f.getDescription () + "\nPart " + (v + 1)); +}} +return vf; +}}if (false) { +var word = this.getWord (f.getBegin ()); +if (word[0] < word[1]) { +f.setBegin (word[0]); +} else { +f.setBegin (word[1]); +}word = this.getWord (f.getEnd ()); +if (word[0] > word[1]) { +f.setEnd (word[0]); +} else { +f.setEnd (word[1]); +}}return Clazz.newArray (-1, [f]); +}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "locateRange", +function (from, to) { +if (this.map != null) { +if (from <= to) { +from = (this.map.getToLowest () < from) ? from : this.map.getToLowest (); +to = (this.map.getToHighest () > to) ? to : this.map.getToHighest (); +if (from > to) { +return null; +}} else { +from = (this.map.getToHighest () > from) ? from : this.map.getToHighest (); +to = (this.map.getToLowest () < to) ? to : this.map.getToLowest (); +if (from < to) { +return null; +}}return this.map.locateInFrom (from, to); +}return Clazz.newIntArray (-1, [from, to]); +}, "~N,~N"); +Clazz.defineMethod (c$, "locateMappedRange", +function (from, to) { +if (this.map != null) { +if (from <= to) { +from = (this.map.getFromLowest () < from) ? from : this.map.getFromLowest (); +to = (this.map.getFromHighest () > to) ? to : this.map.getFromHighest (); +if (from > to) { +return null; +}} else { +from = (this.map.getFromHighest () > from) ? from : this.map.getFromHighest (); +to = (this.map.getFromLowest () < to) ? to : this.map.getFromLowest (); +if (from < to) { +return null; +}}return this.map.locateInTo (from, to); +}return Clazz.newIntArray (-1, [from, to]); +}, "~N,~N"); +Clazz.defineMethod (c$, "intersectVisContigs", +function (viscontigs) { +var copy = new jalview.datamodel.Mapping (this); +if (this.map != null) { +var vpos = 0; +var apos = 0; +var toRange = new java.util.Vector (); +var fromRange = new java.util.Vector (); +for (var vc = 0; vc < viscontigs.length; vc += 2) { +var mpr = this.locateMappedRange (1 + viscontigs[vc], viscontigs[vc + 1] - 1); +if (mpr != null) { +for (var m = 0; m < mpr.length; m += 2) { +toRange.addElement ( Clazz.newIntArray (-1, [mpr[m], mpr[m + 1]])); +var xpos = this.locateRange (mpr[m], mpr[m + 1]); +for (var x = 0; x < xpos.length; x += 2) { +fromRange.addElement ( Clazz.newIntArray (-1, [xpos[x], xpos[x + 1]])); +} +} +}} +var from = Clazz.newIntArray (fromRange.size () * 2, 0); +var to = Clazz.newIntArray (toRange.size () * 2, 0); +var r; +for (var f = 0, fSize = fromRange.size (); f < fSize; f++) { +r = fromRange.elementAt (f); +from[f * 2] = r[0]; +from[f * 2 + 1] = r[1]; +} +for (var f = 0, fSize = toRange.size (); f < fSize; f++) { +r = toRange.elementAt (f); +to[f * 2] = r[0]; +to[f * 2 + 1] = r[1]; +} +copy.setMap ( new jalview.util.MapList (from, to, this.map.getFromRatio (), this.map.getToRatio ())); +}return copy; +}, "~A"); +Clazz.defineMethod (c$, "getTo", +function () { +return this.to; +}); +Clazz.defineMethod (c$, "setTo", +function (tto) { +this.to = tto; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "finalize", +function () { +this.map = null; +this.to = null; +Clazz.superCall (this, jalview.datamodel.Mapping, "finalize", []); +}); +Clazz.defineMethod (c$, "getCodonIterator", +function (seq, gapChar) { +return Clazz.innerTypeInstance (jalview.datamodel.Mapping.AlignedCodonIterator, this, null, seq.getSequence (), gapChar); +}, "jalview.datamodel.SequenceI,~S"); +c$.$Mapping$AlignedCodonIterator$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.gap = '\0'; +this.alignedSeq = null; +this.alignedColumn = 0; +this.alignedBases = 0; +this.fromRanges = null; +this.toRanges = null; +this.currentFromRange = null; +this.currentToRange = null; +this.fromPosition = 0; +this.toPosition = 0; +Clazz.instantialize (this, arguments); +}, jalview.datamodel.Mapping, "AlignedCodonIterator", null, java.util.Iterator); +Clazz.makeConstructor (c$, +function (a, b) { +this.alignedSeq = a; +this.gap = b; +this.fromRanges = this.b$["jalview.datamodel.Mapping"].map.getFromRanges ().iterator (); +this.toRanges = this.b$["jalview.datamodel.Mapping"].map.getToRanges ().iterator (); +if (this.fromRanges.hasNext ()) { +this.currentFromRange = this.fromRanges.next (); +this.fromPosition = this.currentFromRange[0]; +}if (this.toRanges.hasNext ()) { +this.currentToRange = this.toRanges.next (); +this.toPosition = this.currentToRange[0]; +}}, "~A,~S"); +Clazz.defineMethod (c$, "hasNext", +function () { +if (this.fromRanges.hasNext ()) { +return true; +}if (this.currentFromRange == null || this.fromPosition >= this.currentFromRange[1]) { +return false; +}return true; +}); +Clazz.overrideMethod (c$, "next", +function () { +if (!this.hasNext ()) { +throw new java.util.NoSuchElementException (); +}var a = this.getNextCodon (); +var b = this.getAlignedCodon (a); +var c = this.getPeptide (); +return new jalview.datamodel.AlignedCodon (b[0], b[1], b[2], c); +}); +Clazz.defineMethod (c$, "getPeptide", +($fz = function () { +if (this.toPosition <= this.currentToRange[1]) { +var a = this.b$["jalview.datamodel.Mapping"].to.getSequence ()[this.toPosition - 1]; +this.toPosition++; +return String.valueOf (a); +}if (!this.toRanges.hasNext ()) { +throw new java.util.NoSuchElementException ("Ran out of peptide at position " + this.toPosition); +}this.currentToRange = this.toRanges.next (); +this.toPosition = this.currentToRange[0]; +return this.getPeptide (); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getNextCodon", +($fz = function () { +var a = Clazz.newIntArray (3, 0); +var b = 0; +while (b < 3) { +if (this.fromPosition <= this.currentFromRange[1]) { +a[b++] = this.fromPosition++; +} else { +if (!this.fromRanges.hasNext ()) { +throw new jalview.datamodel.IncompleteCodonException (); +}this.currentFromRange = this.fromRanges.next (); +this.fromPosition = this.currentFromRange[0]; +}} +return a; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getAlignedCodon", +($fz = function (a) { +var b = Clazz.newIntArray (a.length, 0); +for (var c = 0; c < a.length; c++) { +b[c] = this.getAlignedColumn (a[c]); +} +return b; +}, $fz.isPrivate = true, $fz), "~A"); +Clazz.defineMethod (c$, "getAlignedColumn", +($fz = function (a) { +while (this.alignedBases < a && this.alignedColumn < this.alignedSeq.length) { +if (this.alignedSeq[this.alignedColumn++] != this.gap) { +this.alignedBases++; +}} +return this.alignedColumn - 1; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.overrideMethod (c$, "remove", +function () { +}); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/datamodel/NodeTransformI.js b/bin/jalview/datamodel/NodeTransformI.js index 83ace63..0f7a757 100644 --- a/bin/jalview/datamodel/NodeTransformI.js +++ b/bin/jalview/datamodel/NodeTransformI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.declareInterface (jalview.datamodel, "NodeTransformI"); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.declareInterface (jalview.datamodel, "NodeTransformI"); diff --git a/bin/jalview/datamodel/PDBEntry.js b/bin/jalview/datamodel/PDBEntry.js index e52f785..e153399 100644 --- a/bin/jalview/datamodel/PDBEntry.js +++ b/bin/jalview/datamodel/PDBEntry.js @@ -1,88 +1,88 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.lang.Enum"], "jalview.datamodel.PDBEntry", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.file = null; -this.type = null; -this.id = null; -this.chainCode = null; -this.properties = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "PDBEntry"); -Clazz.overrideMethod (c$, "equals", -function (obj) { -if (obj == null || !(Clazz.instanceOf (obj, jalview.datamodel.PDBEntry))) { -return false; -}if (obj === this) { -return true; -}var o = obj; -return (this.type === o.type || (this.type != null && o.type != null && o.type.equals (this.type))) && (this.id === o.id || (this.id != null && o.id != null && o.id.equalsIgnoreCase (this.id))) && (this.chainCode === o.chainCode || (this.chainCode != null && o.chainCode != null && o.chainCode.equalsIgnoreCase (this.chainCode))) && (this.properties === o.properties || (this.properties != null && o.properties != null && this.properties.equals (o.properties))); -}, "~O"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (pdbId, chain, type, filePath) { -this.id = pdbId; -this.chainCode = chain; -this.type = type == null ? null : type.toString (); -this.file = filePath; -}, "~S,~S,jalview.datamodel.PDBEntry.Type,~S"); -Clazz.makeConstructor (c$, -function (entry) { -this.file = entry.file; -this.type = entry.type; -this.id = entry.id; -this.chainCode = entry.chainCode; -if (entry.properties != null) { -this.properties = entry.properties.clone (); -}}, "jalview.datamodel.PDBEntry"); -Clazz.defineMethod (c$, "setFile", -function (file) { -this.file = file; -}, "~S"); -Clazz.defineMethod (c$, "getFile", -function () { -return this.file; -}); -Clazz.defineMethod (c$, "setType", -function (t) { -this.type = t; -}, "~S"); -Clazz.defineMethod (c$, "setType", -function (type) { -this.type = type == null ? null : type.toString (); -}, "jalview.datamodel.PDBEntry.Type"); -Clazz.defineMethod (c$, "getType", -function () { -return this.type; -}); -Clazz.defineMethod (c$, "setId", -function (id) { -this.id = id; -}, "~S"); -Clazz.defineMethod (c$, "getId", -function () { -return this.id; -}); -Clazz.defineMethod (c$, "setProperty", -function (property) { -this.properties = property; -}, "java.util.Hashtable"); -Clazz.defineMethod (c$, "getProperty", -function () { -return this.properties; -}); -Clazz.defineMethod (c$, "getChainCode", -function () { -return this.chainCode; -}); -Clazz.defineMethod (c$, "setChainCode", -function (chainCode) { -this.chainCode = chainCode; -}, "~S"); -Clazz.pu$h (); -c$ = Clazz.declareType (jalview.datamodel.PDBEntry, "Type", Enum); -Clazz.defineEnumConstant (c$, "PDB", 0, []); -Clazz.defineEnumConstant (c$, "FILE", 1, []); -c$ = Clazz.p0p (); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.lang.Enum"], "jalview.datamodel.PDBEntry", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.file = null; +this.type = null; +this.id = null; +this.chainCode = null; +this.properties = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "PDBEntry"); +Clazz.overrideMethod (c$, "equals", +function (obj) { +if (obj == null || !(Clazz.instanceOf (obj, jalview.datamodel.PDBEntry))) { +return false; +}if (obj === this) { +return true; +}var o = obj; +return (this.type === o.type || (this.type != null && o.type != null && o.type.equals (this.type))) && (this.id === o.id || (this.id != null && o.id != null && o.id.equalsIgnoreCase (this.id))) && (this.chainCode === o.chainCode || (this.chainCode != null && o.chainCode != null && o.chainCode.equalsIgnoreCase (this.chainCode))) && (this.properties === o.properties || (this.properties != null && o.properties != null && this.properties.equals (o.properties))); +}, "~O"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (pdbId, chain, type, filePath) { +this.id = pdbId; +this.chainCode = chain; +this.type = type == null ? null : type.toString (); +this.file = filePath; +}, "~S,~S,jalview.datamodel.PDBEntry.Type,~S"); +Clazz.makeConstructor (c$, +function (entry) { +this.file = entry.file; +this.type = entry.type; +this.id = entry.id; +this.chainCode = entry.chainCode; +if (entry.properties != null) { +this.properties = entry.properties.clone (); +}}, "jalview.datamodel.PDBEntry"); +Clazz.defineMethod (c$, "setFile", +function (file) { +this.file = file; +}, "~S"); +Clazz.defineMethod (c$, "getFile", +function () { +return this.file; +}); +Clazz.defineMethod (c$, "setType", +function (t) { +this.type = t; +}, "~S"); +Clazz.defineMethod (c$, "setType", +function (type) { +this.type = type == null ? null : type.toString (); +}, "jalview.datamodel.PDBEntry.Type"); +Clazz.defineMethod (c$, "getType", +function () { +return this.type; +}); +Clazz.defineMethod (c$, "setId", +function (id) { +this.id = id; +}, "~S"); +Clazz.defineMethod (c$, "getId", +function () { +return this.id; +}); +Clazz.defineMethod (c$, "setProperty", +function (property) { +this.properties = property; +}, "java.util.Hashtable"); +Clazz.defineMethod (c$, "getProperty", +function () { +return this.properties; +}); +Clazz.defineMethod (c$, "getChainCode", +function () { +return this.chainCode; +}); +Clazz.defineMethod (c$, "setChainCode", +function (chainCode) { +this.chainCode = chainCode; +}, "~S"); +Clazz.pu$h (); +c$ = Clazz.declareType (jalview.datamodel.PDBEntry, "Type", Enum); +Clazz.defineEnumConstant (c$, "PDB", 0, []); +Clazz.defineEnumConstant (c$, "FILE", 1, []); +c$ = Clazz.p0p (); +}); diff --git a/bin/jalview/datamodel/Provenance.js b/bin/jalview/datamodel/Provenance.js index 04f873e..c0180ea 100644 --- a/bin/jalview/datamodel/Provenance.js +++ b/bin/jalview/datamodel/Provenance.js @@ -1,25 +1,25 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.util.Vector"], "jalview.datamodel.Provenance", ["jalview.datamodel.ProvenanceEntry"], function () { -c$ = Clazz.decorateAsClass (function () { -this.entries = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "Provenance"); -Clazz.prepareFields (c$, function () { -this.entries = new java.util.Vector (); -}); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "getEntries", -function () { -var ret = new Array (this.entries.size ()); -for (var i = 0; i < this.entries.size (); i++) { -ret[i] = this.entries.elementAt (i); -} -return ret; -}); -Clazz.defineMethod (c$, "addEntry", -function (user, action, date, id) { -this.entries.addElement ( new jalview.datamodel.ProvenanceEntry (user, action, date, id)); -}, "~S,~S,java.util.Date,~S"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.util.Vector"], "jalview.datamodel.Provenance", ["jalview.datamodel.ProvenanceEntry"], function () { +c$ = Clazz.decorateAsClass (function () { +this.entries = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "Provenance"); +Clazz.prepareFields (c$, function () { +this.entries = new java.util.Vector (); +}); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "getEntries", +function () { +var ret = new Array (this.entries.size ()); +for (var i = 0; i < this.entries.size (); i++) { +ret[i] = this.entries.elementAt (i); +} +return ret; +}); +Clazz.defineMethod (c$, "addEntry", +function (user, action, date, id) { +this.entries.addElement ( new jalview.datamodel.ProvenanceEntry (user, action, date, id)); +}, "~S,~S,java.util.Date,~S"); +}); diff --git a/bin/jalview/datamodel/ProvenanceEntry.js b/bin/jalview/datamodel/ProvenanceEntry.js index 5077d90..1283717 100644 --- a/bin/jalview/datamodel/ProvenanceEntry.js +++ b/bin/jalview/datamodel/ProvenanceEntry.js @@ -1,31 +1,31 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.decorateAsClass (function () { -this.user = null; -this.action = null; -this.id = null; -this.date = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "ProvenanceEntry"); -Clazz.makeConstructor (c$, -function (u, a, d, i) { -this.user = u; -this.action = a; -this.date = d; -this.id = i; -}, "~S,~S,java.util.Date,~S"); -Clazz.defineMethod (c$, "getUser", -function () { -return this.user; -}); -Clazz.defineMethod (c$, "getAction", -function () { -return this.action; -}); -Clazz.defineMethod (c$, "getDate", -function () { -return this.date; -}); -Clazz.defineMethod (c$, "getID", -function () { -return this.id; -}); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.decorateAsClass (function () { +this.user = null; +this.action = null; +this.id = null; +this.date = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "ProvenanceEntry"); +Clazz.makeConstructor (c$, +function (u, a, d, i) { +this.user = u; +this.action = a; +this.date = d; +this.id = i; +}, "~S,~S,java.util.Date,~S"); +Clazz.defineMethod (c$, "getUser", +function () { +return this.user; +}); +Clazz.defineMethod (c$, "getAction", +function () { +return this.action; +}); +Clazz.defineMethod (c$, "getDate", +function () { +return this.date; +}); +Clazz.defineMethod (c$, "getID", +function () { +return this.id; +}); diff --git a/bin/jalview/datamodel/RnaViewerModel.js b/bin/jalview/datamodel/RnaViewerModel.js index 2e64a80..612cdda 100644 --- a/bin/jalview/datamodel/RnaViewerModel.js +++ b/bin/jalview/datamodel/RnaViewerModel.js @@ -1,21 +1,21 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.decorateAsClass (function () { -this.viewId = null; -this.title = null; -this.x = 0; -this.y = 0; -this.width = 0; -this.height = 0; -this.dividerLocation = 0; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "RnaViewerModel"); -Clazz.makeConstructor (c$, -function (viewId, title, xpos, ypos, width, height, dividerLocation) { -this.viewId = viewId; -this.title = title; -this.x = xpos; -this.y = ypos; -this.width = width; -this.height = height; -this.dividerLocation = dividerLocation; -}, "~S,~S,~N,~N,~N,~N,~N"); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.decorateAsClass (function () { +this.viewId = null; +this.title = null; +this.x = 0; +this.y = 0; +this.width = 0; +this.height = 0; +this.dividerLocation = 0; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "RnaViewerModel"); +Clazz.makeConstructor (c$, +function (viewId, title, xpos, ypos, width, height, dividerLocation) { +this.viewId = viewId; +this.title = title; +this.x = xpos; +this.y = ypos; +this.width = width; +this.height = height; +this.dividerLocation = dividerLocation; +}, "~S,~S,~N,~N,~N,~N,~N"); diff --git a/bin/jalview/datamodel/SearchResults.js b/bin/jalview/datamodel/SearchResults.js index 74170de..e82bfa5 100644 --- a/bin/jalview/datamodel/SearchResults.js +++ b/bin/jalview/datamodel/SearchResults.js @@ -1,137 +1,137 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.util.ArrayList"], "jalview.datamodel.SearchResults", ["java.lang.StringBuilder", "java.util.Arrays"], function () { -c$ = Clazz.decorateAsClass (function () { -this.matches = null; -if (!Clazz.isClassDefined ("jalview.datamodel.SearchResults.Match")) { -jalview.datamodel.SearchResults.$SearchResults$Match$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "SearchResults"); -Clazz.prepareFields (c$, function () { -this.matches = new java.util.ArrayList (); -}); -Clazz.defineMethod (c$, "addResult", -function (seq, start, end) { -this.matches.add (Clazz.innerTypeInstance (jalview.datamodel.SearchResults.Match, this, null, seq, start, end)); -}, "jalview.datamodel.SequenceI,~N,~N"); -Clazz.defineMethod (c$, "involvesSequence", -function (sequence) { -var ds = sequence.getDatasetSequence (); -for (var m, $m = this.matches.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { -if (m.sequence != null && (m.sequence === sequence || m.sequence === ds)) { -return true; -}} -return false; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getResults", -function (sequence, start, end) { -if (this.matches.isEmpty ()) { -return null; -}var result = null; -var tmp = null; -var resultLength; -var matchStart = 0; -var matchEnd = 0; -var mfound; -for (var m, $m = this.matches.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { -mfound = false; -if (m.sequence === sequence) { -mfound = true; -matchStart = sequence.findIndex (m.start) - 1; -matchEnd = sequence.findIndex (m.end) - 1; -} else if (m.sequence === sequence.getDatasetSequence ()) { -mfound = true; -matchStart = sequence.findIndex (m.start) - 1; -matchEnd = sequence.findIndex (m.end) - 1; -}if (mfound) { -if (matchStart <= end && matchEnd >= start) { -if (matchStart < start) { -matchStart = start; -}if (matchEnd > end) { -matchEnd = end; -}if (result == null) { -result = Clazz.newIntArray (-1, [matchStart, matchEnd]); -} else { -resultLength = result.length; -tmp = Clazz.newIntArray (resultLength + 2, 0); -System.arraycopy (result, 0, tmp, 0, resultLength); -result = tmp; -result[resultLength] = matchStart; -result[resultLength + 1] = matchEnd; -}} else { -}}} -return result; -}, "jalview.datamodel.SequenceI,~N,~N"); -Clazz.defineMethod (c$, "getSize", -function () { -return this.matches.size (); -}); -Clazz.defineMethod (c$, "getResultSequence", -function (index) { -return this.matches.get (index).sequence; -}, "~N"); -Clazz.defineMethod (c$, "getResultStart", -function (i) { -return this.matches.get (i).start; -}, "~N"); -Clazz.defineMethod (c$, "getResultEnd", -function (i) { -return this.matches.get (i).end; -}, "~N"); -Clazz.defineMethod (c$, "isEmpty", -function () { -return this.matches.isEmpty (); -}); -Clazz.defineMethod (c$, "getResults", -function () { -return this.matches; -}); -Clazz.overrideMethod (c$, "toString", -function () { -var result = new StringBuilder (256); -for (var m, $m = this.matches.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { -result.append (m.toString ()); -} -return result.toString (); -}); -c$.$SearchResults$Match$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.sequence = null; -this.start = 0; -this.end = 0; -Clazz.instantialize (this, arguments); -}, jalview.datamodel.SearchResults, "Match"); -Clazz.makeConstructor (c$, -function (a, b, c) { -this.sequence = a; -this.start = b; -this.end = c; -}, "jalview.datamodel.SequenceI,~N,~N"); -Clazz.defineMethod (c$, "getSequence", -function () { -return this.sequence; -}); -Clazz.defineMethod (c$, "getStart", -function () { -return this.start; -}); -Clazz.defineMethod (c$, "getEnd", -function () { -return this.end; -}); -Clazz.overrideMethod (c$, "toString", -function () { -var a = this.sequence.getSequence (); -var b = Math.max (this.start - 1, 0); -var c = Math.min (this.end, a.length + 1); -return String.valueOf (java.util.Arrays.copyOfRange (a, b, c)); -}); -Clazz.defineMethod (c$, "setSequence", -function (a) { -this.sequence = a; -}, "jalview.datamodel.SequenceI"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.util.ArrayList"], "jalview.datamodel.SearchResults", ["java.lang.StringBuilder", "java.util.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.matches = null; +if (!Clazz.isClassDefined ("jalview.datamodel.SearchResults.Match")) { +jalview.datamodel.SearchResults.$SearchResults$Match$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SearchResults"); +Clazz.prepareFields (c$, function () { +this.matches = new java.util.ArrayList (); +}); +Clazz.defineMethod (c$, "addResult", +function (seq, start, end) { +this.matches.add (Clazz.innerTypeInstance (jalview.datamodel.SearchResults.Match, this, null, seq, start, end)); +}, "jalview.datamodel.SequenceI,~N,~N"); +Clazz.defineMethod (c$, "involvesSequence", +function (sequence) { +var ds = sequence.getDatasetSequence (); +for (var m, $m = this.matches.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { +if (m.sequence != null && (m.sequence === sequence || m.sequence === ds)) { +return true; +}} +return false; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getResults", +function (sequence, start, end) { +if (this.matches.isEmpty ()) { +return null; +}var result = null; +var tmp = null; +var resultLength; +var matchStart = 0; +var matchEnd = 0; +var mfound; +for (var m, $m = this.matches.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { +mfound = false; +if (m.sequence === sequence) { +mfound = true; +matchStart = sequence.findIndex (m.start) - 1; +matchEnd = sequence.findIndex (m.end) - 1; +} else if (m.sequence === sequence.getDatasetSequence ()) { +mfound = true; +matchStart = sequence.findIndex (m.start) - 1; +matchEnd = sequence.findIndex (m.end) - 1; +}if (mfound) { +if (matchStart <= end && matchEnd >= start) { +if (matchStart < start) { +matchStart = start; +}if (matchEnd > end) { +matchEnd = end; +}if (result == null) { +result = Clazz.newIntArray (-1, [matchStart, matchEnd]); +} else { +resultLength = result.length; +tmp = Clazz.newIntArray (resultLength + 2, 0); +System.arraycopy (result, 0, tmp, 0, resultLength); +result = tmp; +result[resultLength] = matchStart; +result[resultLength + 1] = matchEnd; +}} else { +}}} +return result; +}, "jalview.datamodel.SequenceI,~N,~N"); +Clazz.defineMethod (c$, "getSize", +function () { +return this.matches.size (); +}); +Clazz.defineMethod (c$, "getResultSequence", +function (index) { +return this.matches.get (index).sequence; +}, "~N"); +Clazz.defineMethod (c$, "getResultStart", +function (i) { +return this.matches.get (i).start; +}, "~N"); +Clazz.defineMethod (c$, "getResultEnd", +function (i) { +return this.matches.get (i).end; +}, "~N"); +Clazz.defineMethod (c$, "isEmpty", +function () { +return this.matches.isEmpty (); +}); +Clazz.defineMethod (c$, "getResults", +function () { +return this.matches; +}); +Clazz.overrideMethod (c$, "toString", +function () { +var result = new StringBuilder (256); +for (var m, $m = this.matches.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { +result.append (m.toString ()); +} +return result.toString (); +}); +c$.$SearchResults$Match$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.sequence = null; +this.start = 0; +this.end = 0; +Clazz.instantialize (this, arguments); +}, jalview.datamodel.SearchResults, "Match"); +Clazz.makeConstructor (c$, +function (a, b, c) { +this.sequence = a; +this.start = b; +this.end = c; +}, "jalview.datamodel.SequenceI,~N,~N"); +Clazz.defineMethod (c$, "getSequence", +function () { +return this.sequence; +}); +Clazz.defineMethod (c$, "getStart", +function () { +return this.start; +}); +Clazz.defineMethod (c$, "getEnd", +function () { +return this.end; +}); +Clazz.overrideMethod (c$, "toString", +function () { +var a = this.sequence.getSequence (); +var b = Math.max (this.start - 1, 0); +var c = Math.min (this.end, a.length + 1); +return String.valueOf (java.util.Arrays.copyOfRange (a, b, c)); +}); +Clazz.defineMethod (c$, "setSequence", +function (a) { +this.sequence = a; +}, "jalview.datamodel.SequenceI"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/datamodel/SecondaryStructureAnnotation.js b/bin/jalview/datamodel/SecondaryStructureAnnotation.js index 6a35ad3..2d1eb58 100644 --- a/bin/jalview/datamodel/SecondaryStructureAnnotation.js +++ b/bin/jalview/datamodel/SecondaryStructureAnnotation.js @@ -1,23 +1,23 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.AlignmentAnnotation"], "jalview.datamodel.SecondaryStructureAnnotation", ["jalview.datamodel.Annotation"], function () { -c$ = Clazz.declareType (jalview.datamodel, "SecondaryStructureAnnotation", jalview.datamodel.AlignmentAnnotation); -Clazz.makeConstructor (c$, -function (rna) { -Clazz.superConstructor (this, jalview.datamodel.SecondaryStructureAnnotation, ["Secondary Structure", "Un truc trop cool", jalview.datamodel.SecondaryStructureAnnotation.getAnnotation (rna)]); -jalview.datamodel.SecondaryStructureAnnotation._rna = rna; -}, "fr.orsay.lri.varna.models.rna.RNA"); -Clazz.defineMethod (c$, "getRNA", -function () { -return jalview.datamodel.SecondaryStructureAnnotation._rna; -}); -c$.getAnnotation = Clazz.defineMethod (c$, "getAnnotation", -function (rna) { -var ann = new Array (rna.getSize ()); -for (var i = 0; i < ann.length; i++) { -ann[i] = new jalview.datamodel.Annotation (jalview.datamodel.SecondaryStructureAnnotation._rna.getStructDBN (true), "", ' ', 0); -;} -return ann; -}, "fr.orsay.lri.varna.models.rna.RNA"); -Clazz.defineStatics (c$, -"_rna", null); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.AlignmentAnnotation"], "jalview.datamodel.SecondaryStructureAnnotation", ["jalview.datamodel.Annotation"], function () { +c$ = Clazz.declareType (jalview.datamodel, "SecondaryStructureAnnotation", jalview.datamodel.AlignmentAnnotation); +Clazz.makeConstructor (c$, +function (rna) { +Clazz.superConstructor (this, jalview.datamodel.SecondaryStructureAnnotation, ["Secondary Structure", "Un truc trop cool", jalview.datamodel.SecondaryStructureAnnotation.getAnnotation (rna)]); +jalview.datamodel.SecondaryStructureAnnotation._rna = rna; +}, "fr.orsay.lri.varna.models.rna.RNA"); +Clazz.defineMethod (c$, "getRNA", +function () { +return jalview.datamodel.SecondaryStructureAnnotation._rna; +}); +c$.getAnnotation = Clazz.defineMethod (c$, "getAnnotation", +function (rna) { +var ann = new Array (rna.getSize ()); +for (var i = 0; i < ann.length; i++) { +ann[i] = new jalview.datamodel.Annotation (jalview.datamodel.SecondaryStructureAnnotation._rna.getStructDBN (true), "", ' ', 0); +;} +return ann; +}, "fr.orsay.lri.varna.models.rna.RNA"); +Clazz.defineStatics (c$, +"_rna", null); +}); diff --git a/bin/jalview/datamodel/SeqCigar.class b/bin/jalview/datamodel/SeqCigar.class index 5f54f078404e89243ed9f3d90cc7c461a31f51c6..8bb4e15df3af4395cdaa2bf4673c6e8aef3e4d58 100644 GIT binary patch delta 53 zcmezB|Ji?ok__YD&B`*@7!}nRxc@WAFmSRnJZ5K5WrP3*1`!9wKMb0ToMN1tW#n#h F0sxc<3_$<@ delta 55 zcmezD|J8qkk__Yj&B`*@7?m{`c>gm seq_string.length) { -_e = seq_string.length; -}this.start = seq.findPosition (_s) - seq.getStart (); -this.end = seq.findPosition (_e) - seq.getStart (); -var l_ungapped = this.end - this.start; -var ds = seq.getDatasetSequence (); -if (ds == null) { -var ungapped = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (seq_string)); -l_ungapped = ungapped.length; -if (l_ungapped == seq.getLength ()) { -ds = seq; -} else { -ds = new jalview.datamodel.Sequence (seq.getName (), ungapped, seq.getStart (), seq.getStart () + ungapped.length - 1); -}}if (ds.getStart () < seq.getStart ()) { -var offset = seq.getStart () - ds.getStart (); -if (initialDeletion) { -this.addDeleted (_s + offset); -this.start = 0; -this.end += offset; -} else { -this.start += offset; -this.end += offset; -}}if (l_ungapped != (_e - _s)) { -hasgaps = true; -}this.refseq = ds; -this.seqProps = jalview.analysis.SeqsetUtils.SeqCharacterHash (seq); -if (this.end > ds.getLength ()) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_seqcigar_possible")); -}return hasgaps; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,~B,~N,~N"); -Clazz.makeConstructor (c$, -function (seq, operation, range) { -Clazz.superConstructor (this, jalview.datamodel.SeqCigar); -if (seq == null) { -throw new Error (jalview.util.MessageManager.getString ("error.implmentation_bug_seq_null")); -}if (operation.length != range.length) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_bug_cigar_operation_list_range_list")); -}if (operation != null) { -this.operation = Clazz.newCharArray (operation.length + this._inc_length, '\0'); -this.range = Clazz.newIntArray (operation.length + this._inc_length, 0); -if (this._setSeq (seq, false, 0, 0)) { -throw new Error (jalview.util.MessageManager.getString ("error.not_yet_implemented_cigar_object_from_cigar_string")); -}for (var i = this.length, j = 0; j < operation.length; i++, j++) { -var op = operation[j]; -if (op != 'M' && op != 'I' && op != 'D') { -throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_bug_cigar_operation", Clazz.newArray (-1, [Integer.$valueOf (j).toString (), Integer.$valueOf (op.charCodeAt (0)).toString (), Integer.$valueOf ('M'.charCodeAt (0)).toString (), Integer.$valueOf ('I'.charCodeAt (0)).toString (), Integer.$valueOf ('D'.charCodeAt (0)).toString ()]))); -}this.operation[i] = op; -this.range[i] = range[j]; -} -this.length += operation.length; -} else { -this.operation = null; -this.range = null; -this.length = 0; -if (this._setSeq (seq, false, 0, 0)) { -throw new Error (jalview.util.MessageManager.getString ("error.not_yet_implemented_cigar_object_from_cigar_string")); -}}}, "jalview.datamodel.SequenceI,~A,~A"); -Clazz.defineMethod (c$, "addMatch", -function (range) { -this.addOperation ('M', range); -}, "~N"); -c$.addSequenceOps = Clazz.defineMethod (c$, "addSequenceOps", -function (cigar, seq, startpos, endpos, initialDeletions) { -var op = '\u0000'; -var range = 0; -var p = 0; -var res = seq.getLength (); -if (!initialDeletions) { -p = startpos; -}while (p <= endpos) { -var isGap = (p < res) ? jalview.util.Comparison.isGap (seq.getCharAt (p)) : true; -if ((startpos <= p) && (p <= endpos)) { -if (isGap) { -if (range > 0 && op != 'I') { -cigar.addOperation (op, range); -range = 0; -}op = 'I'; -range++; -} else { -if (range > 0 && op != 'M') { -cigar.addOperation (op, range); -range = 0; -}op = 'M'; -range++; -}} else { -if (!isGap) { -if (range > 0 && op != 'D') { -cigar.addOperation (op, range); -range = 0; -}op = 'D'; -range++; -} else { -}}p++; -} -if (range > 0) { -cigar.addOperation (op, range); -}}, "jalview.datamodel.CigarBase,jalview.datamodel.SequenceI,~N,~N,~B"); -Clazz.makeConstructor (c$, -function (seq) { -Clazz.superConstructor (this, jalview.datamodel.SeqCigar); -if (seq == null) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_for_new_cigar")); -}this._setSeq (seq, false, 0, 0); -jalview.datamodel.SeqCigar.addSequenceOps (this, seq, 0, seq.getLength () - 1, false); -}, "jalview.datamodel.SequenceI"); -Clazz.makeConstructor (c$, -function (seq, start, end) { -Clazz.superConstructor (this, jalview.datamodel.SeqCigar); -if (seq == null) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_for_new_cigar")); -}this._setSeq (seq, false, start, end + 1); -jalview.datamodel.SeqCigar.addSequenceOps (this, seq, start, end, false); -}, "jalview.datamodel.SequenceI,~N,~N"); -c$.parseCigar = Clazz.defineMethod (c$, "parseCigar", -function (seq, cigarString) { -var opsandrange = jalview.datamodel.CigarBase.parseCigarString (cigarString); -return new jalview.datamodel.SeqCigar (seq, opsandrange[0], opsandrange[1]); -}, "jalview.datamodel.SequenceI,~S"); -c$.createAlignmentSequences = Clazz.defineMethod (c$, "createAlignmentSequences", -function (alseqs, gapCharacter, colsel, segments) { -var seqs = new Array (alseqs.length); -var g_seqs = new Array (alseqs.length); -var alseqs_string = new Array (alseqs.length); -var gs_regions = new Array (alseqs.length); -for (var i = 0; i < alseqs.length; i++) { -alseqs_string[i] = alseqs[i].getRefSeq ().getSequenceAsString (alseqs[i].start, alseqs[i].end); -gs_regions[i] = alseqs[i].getSequenceAndDeletions (alseqs_string[i], gapCharacter); -if (gs_regions[i] == null) { -throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_cigar_seq_no_operations", Clazz.newArray (-1, [Integer.$valueOf (i).toString ()]))); -}g_seqs[i] = new StringBuffer ((gs_regions[i])[0]); -} -var shifts = new jalview.util.ShiftList (); -for (var i = 0; i < alseqs.length; i++) { -var gs_region = ((gs_regions[i])[2]); -if (gs_region != null) { -for (var hr = 0; hr < gs_region.length; hr++) { -var region = gs_region[hr]; -var insert = Clazz.newCharArray (region[1] - region[0] + 1, '\0'); -for (var s = 0; s < insert.length; s++) { -insert[s] = gapCharacter; -} -var inspos = shifts.shift (region[2]); -for (var s = 0; s < alseqs.length; s++) { -if (s != i) { -if (g_seqs[s].length () <= inspos) { -for (var l = inspos - g_seqs[s].length (); l > 0; l--) { -g_seqs[s].append (gapCharacter); -} -}g_seqs[s].insert (inspos, insert); -} else { -g_seqs[s].insert (inspos, alseqs_string[i].substring (region[0], region[1] + 1)); -}} -shifts.addShift (region[2], insert.length); -if (segments == null) { -colsel.hideColumns (inspos, inspos + insert.length - 1); -}} -}} -for (var i = 0; i < alseqs.length; i++) { -var bounds = ((gs_regions[i])[1]); -var ref = alseqs[i].getRefSeq (); -seqs[i] = new jalview.datamodel.Sequence (ref.getName (), g_seqs[i].toString (), ref.getStart () + alseqs[i].start + bounds[0], ref.getStart () + alseqs[i].start + (bounds[2] == 0 ? -1 : bounds[2])); -seqs[i].setDatasetSequence (ref); -seqs[i].setDescription (ref.getDescription ()); -} -if (segments != null) { -for (var i = 0; i < segments.length; i += 3) { -colsel.hideColumns (segments[i + 1], segments[i + 1] + segments[i + 2] - 1); -} -}return seqs; -}, "~A,~S,jalview.datamodel.ColumnSelection,~A"); -Clazz.defineMethod (c$, "setGroupMembership", -function (group) { -if (this.selGroups == null) { -this.selGroups = new java.util.Hashtable (); -}this.selGroups.put (group, Clazz.newIntArray (0, 0)); -}, "~O"); -Clazz.defineMethod (c$, "removeGroupMembership", -function (group) { -if (this.selGroups != null && this.selGroups.containsKey (group)) { -this.selGroups.remove (group); -return true; -}return false; -}, "~O"); -Clazz.defineMethod (c$, "clearMemberships", -function () { -if (this.selGroups != null) { -this.selGroups.clear (); -}this.selGroups = null; -}); -Clazz.defineMethod (c$, "getAllMemberships", -function () { -if (this.selGroups == null) { -return null; -}var mmbs = new Array (this.selGroups.size ()); -var en = this.selGroups.keys (); -for (var i = 0; en.hasMoreElements (); i++) { -mmbs[i] = en.nextElement (); -} -return mmbs; -}); -Clazz.defineMethod (c$, "isMemberOf", -function (sgr) { -return (this.selGroups != null) && this.selGroups.get (sgr) != null; -}, "~O"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.CigarSimple"], "jalview.datamodel.SeqCigar", ["jalview.analysis.AlignSeq", "$.SeqsetUtils", "jalview.datamodel.Sequence", "jalview.util.Comparison", "$.MessageManager", "$.ShiftList", "java.lang.Error", "$.StringBuffer", "java.util.Hashtable"], function () { +c$ = Clazz.decorateAsClass (function () { +this.start = 0; +this.end = 0; +this.refseq = null; +this.seqProps = null; +this.selGroups = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SeqCigar", jalview.datamodel.CigarSimple); +Clazz.defineMethod (c$, "getRefSeq", +function () { +return this.refseq; +}); +Clazz.defineMethod (c$, "getStart", +function () { +return this.start; +}); +Clazz.defineMethod (c$, "getEnd", +function () { +return this.end; +}); +Clazz.overrideMethod (c$, "getSequenceString", +function (GapChar) { +return (this.length == 0) ? "" : this.getSequenceAndDeletions (this.refseq.getSequenceAsString (this.start, this.end), GapChar)[0]; +}, "~S"); +Clazz.defineMethod (c$, "getSeq", +function (GapChar) { +var seq; +if (this.refseq == null || this.length == 0) { +return null; +}var edit_result = this.getSequenceAndDeletions (this.refseq.getSequenceAsString (this.start, this.end), GapChar); +if (edit_result == null) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_unexpected_null_from_get_sequence_and_deletions")); +}var bounds = edit_result[1]; +seq = new jalview.datamodel.Sequence (this.refseq.getName (), edit_result[0], this.refseq.getStart () + this.start + bounds[0], this.refseq.getStart () + this.start + ((bounds[2] == 0) ? -1 : bounds[2])); +seq.setDescription (this.refseq.getDescription ()); +var sstart = seq.getStart (); +var send = seq.getEnd (); +if (this.seqProps != null) { +jalview.analysis.SeqsetUtils.SeqCharacterUnhash (seq, this.seqProps); +}seq.setDatasetSequence (this.refseq); +seq.setStart (sstart); +seq.setEnd (send); +return seq; +}, "~S"); +Clazz.defineMethod (c$, "_setSeq", +($fz = function (seq, initialDeletion, _s, _e) { +var hasgaps = false; +if (seq == null) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_set_seq_null")); +}if (_s < 0) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_s", Clazz.newArray (-1, [Integer.$valueOf (_s).toString ()]))); +}var seq_string = seq.getSequenceAsString (); +if (_e == 0 || _e < _s || _e > seq_string.length) { +_e = seq_string.length; +}this.start = seq.findPosition (_s) - seq.getStart (); +this.end = seq.findPosition (_e) - seq.getStart (); +var l_ungapped = this.end - this.start; +var ds = seq.getDatasetSequence (); +if (ds == null) { +var ungapped = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (seq_string)); +l_ungapped = ungapped.length; +if (l_ungapped == seq.getLength ()) { +ds = seq; +} else { +ds = new jalview.datamodel.Sequence (seq.getName (), ungapped, seq.getStart (), seq.getStart () + ungapped.length - 1); +}}if (ds.getStart () < seq.getStart ()) { +var offset = seq.getStart () - ds.getStart (); +if (initialDeletion) { +this.addDeleted (_s + offset); +this.start = 0; +this.end += offset; +} else { +this.start += offset; +this.end += offset; +}}if (l_ungapped != (_e - _s)) { +hasgaps = true; +}this.refseq = ds; +this.seqProps = jalview.analysis.SeqsetUtils.SeqCharacterHash (seq); +if (this.end > ds.getLength ()) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_seqcigar_possible")); +}return hasgaps; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,~B,~N,~N"); +Clazz.makeConstructor (c$, +function (seq, operation, range) { +Clazz.superConstructor (this, jalview.datamodel.SeqCigar); +if (seq == null) { +throw new Error (jalview.util.MessageManager.getString ("error.implmentation_bug_seq_null")); +}if (operation.length != range.length) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_bug_cigar_operation_list_range_list")); +}if (operation != null) { +this.operation = Clazz.newCharArray (operation.length + this._inc_length, '\0'); +this.range = Clazz.newIntArray (operation.length + this._inc_length, 0); +if (this._setSeq (seq, false, 0, 0)) { +throw new Error (jalview.util.MessageManager.getString ("error.not_yet_implemented_cigar_object_from_cigar_string")); +}for (var i = this.length, j = 0; j < operation.length; i++, j++) { +var op = operation[j]; +if (op != 'M' && op != 'I' && op != 'D') { +throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_bug_cigar_operation", Clazz.newArray (-1, [Integer.$valueOf (j).toString (), Integer.$valueOf (op.charCodeAt (0)).toString (), Integer.$valueOf ('M'.charCodeAt (0)).toString (), Integer.$valueOf ('I'.charCodeAt (0)).toString (), Integer.$valueOf ('D'.charCodeAt (0)).toString ()]))); +}this.operation[i] = op; +this.range[i] = range[j]; +} +this.length += operation.length; +} else { +this.operation = null; +this.range = null; +this.length = 0; +if (this._setSeq (seq, false, 0, 0)) { +throw new Error (jalview.util.MessageManager.getString ("error.not_yet_implemented_cigar_object_from_cigar_string")); +}}}, "jalview.datamodel.SequenceI,~A,~A"); +Clazz.defineMethod (c$, "addMatch", +function (range) { +this.addOperation ('M', range); +}, "~N"); +c$.addSequenceOps = Clazz.defineMethod (c$, "addSequenceOps", +function (cigar, seq, startpos, endpos, initialDeletions) { +var op = '\u0000'; +var range = 0; +var p = 0; +var res = seq.getLength (); +if (!initialDeletions) { +p = startpos; +}while (p <= endpos) { +var isGap = (p < res) ? jalview.util.Comparison.isGap (seq.getCharAt (p)) : true; +if ((startpos <= p) && (p <= endpos)) { +if (isGap) { +if (range > 0 && op != 'I') { +cigar.addOperation (op, range); +range = 0; +}op = 'I'; +range++; +} else { +if (range > 0 && op != 'M') { +cigar.addOperation (op, range); +range = 0; +}op = 'M'; +range++; +}} else { +if (!isGap) { +if (range > 0 && op != 'D') { +cigar.addOperation (op, range); +range = 0; +}op = 'D'; +range++; +} else { +}}p++; +} +if (range > 0) { +cigar.addOperation (op, range); +}}, "jalview.datamodel.CigarBase,jalview.datamodel.SequenceI,~N,~N,~B"); +Clazz.makeConstructor (c$, +function (seq) { +Clazz.superConstructor (this, jalview.datamodel.SeqCigar); +if (seq == null) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_for_new_cigar")); +}this._setSeq (seq, false, 0, 0); +jalview.datamodel.SeqCigar.addSequenceOps (this, seq, 0, seq.getLength () - 1, false); +}, "jalview.datamodel.SequenceI"); +Clazz.makeConstructor (c$, +function (seq, start, end) { +Clazz.superConstructor (this, jalview.datamodel.SeqCigar); +if (seq == null) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_for_new_cigar")); +}this._setSeq (seq, false, start, end + 1); +jalview.datamodel.SeqCigar.addSequenceOps (this, seq, start, end, false); +}, "jalview.datamodel.SequenceI,~N,~N"); +c$.parseCigar = Clazz.defineMethod (c$, "parseCigar", +function (seq, cigarString) { +var opsandrange = jalview.datamodel.CigarBase.parseCigarString (cigarString); +return new jalview.datamodel.SeqCigar (seq, opsandrange[0], opsandrange[1]); +}, "jalview.datamodel.SequenceI,~S"); +c$.createAlignmentSequences = Clazz.defineMethod (c$, "createAlignmentSequences", +function (alseqs, gapCharacter, colsel, segments) { +var seqs = new Array (alseqs.length); +var g_seqs = new Array (alseqs.length); +var alseqs_string = new Array (alseqs.length); +var gs_regions = new Array (alseqs.length); +for (var i = 0; i < alseqs.length; i++) { +alseqs_string[i] = alseqs[i].getRefSeq ().getSequenceAsString (alseqs[i].start, alseqs[i].end); +gs_regions[i] = alseqs[i].getSequenceAndDeletions (alseqs_string[i], gapCharacter); +if (gs_regions[i] == null) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_cigar_seq_no_operations", Clazz.newArray (-1, [Integer.$valueOf (i).toString ()]))); +}g_seqs[i] = new StringBuffer ((gs_regions[i])[0]); +} +var shifts = new jalview.util.ShiftList (); +for (var i = 0; i < alseqs.length; i++) { +var gs_region = ((gs_regions[i])[2]); +if (gs_region != null) { +for (var hr = 0; hr < gs_region.length; hr++) { +var region = gs_region[hr]; +var insert = Clazz.newCharArray (region[1] - region[0] + 1, '\0'); +for (var s = 0; s < insert.length; s++) { +insert[s] = gapCharacter; +} +var inspos = shifts.shift (region[2]); +for (var s = 0; s < alseqs.length; s++) { +if (s != i) { +if (g_seqs[s].length () <= inspos) { +for (var l = inspos - g_seqs[s].length (); l > 0; l--) { +g_seqs[s].append (gapCharacter); +} +}g_seqs[s].insert (inspos, insert); +} else { +g_seqs[s].insert (inspos, alseqs_string[i].substring (region[0], region[1] + 1)); +}} +shifts.addShift (region[2], insert.length); +if (segments == null) { +colsel.hideColumns (inspos, inspos + insert.length - 1); +}} +}} +for (var i = 0; i < alseqs.length; i++) { +var bounds = ((gs_regions[i])[1]); +var ref = alseqs[i].getRefSeq (); +seqs[i] = new jalview.datamodel.Sequence (ref.getName (), g_seqs[i].toString (), ref.getStart () + alseqs[i].start + bounds[0], ref.getStart () + alseqs[i].start + (bounds[2] == 0 ? -1 : bounds[2])); +seqs[i].setDatasetSequence (ref); +seqs[i].setDescription (ref.getDescription ()); +} +if (segments != null) { +for (var i = 0; i < segments.length; i += 3) { +colsel.hideColumns (segments[i + 1], segments[i + 1] + segments[i + 2] - 1); +} +}return seqs; +}, "~A,~S,jalview.datamodel.ColumnSelection,~A"); +Clazz.defineMethod (c$, "setGroupMembership", +function (group) { +if (this.selGroups == null) { +this.selGroups = new java.util.Hashtable (); +}this.selGroups.put (group, Clazz.newIntArray (0, 0)); +}, "~O"); +Clazz.defineMethod (c$, "removeGroupMembership", +function (group) { +if (this.selGroups != null && this.selGroups.containsKey (group)) { +this.selGroups.remove (group); +return true; +}return false; +}, "~O"); +Clazz.defineMethod (c$, "clearMemberships", +function () { +if (this.selGroups != null) { +this.selGroups.clear (); +}this.selGroups = null; +}); +Clazz.defineMethod (c$, "getAllMemberships", +function () { +if (this.selGroups == null) { +return null; +}var mmbs = new Array (this.selGroups.size ()); +var en = this.selGroups.keys (); +for (var i = 0; en.hasMoreElements (); i++) { +mmbs[i] = en.nextElement (); +} +return mmbs; +}); +Clazz.defineMethod (c$, "isMemberOf", +function (sgr) { +return (this.selGroups != null) && this.selGroups.get (sgr) != null; +}, "~O"); +}); diff --git a/bin/jalview/datamodel/Sequence.class b/bin/jalview/datamodel/Sequence.class index 87bb9e379925b9147fc7678a239259659936b600..f406e42514a27dec0e1194ca8c7257d8b40d7033 100644 GIT binary patch delta 43 xcmZ26g>m^5#tmI2jDDNDP0ScY#Ti)tGsrNou`@8TGtOWH0tN=r&DTu>MF0nx3KswX delta 44 ycmZ2Jg>l6c#tmI2jQ*RuP0Sd@BpBHKGsrNou`@8TGtOWH0tN;lrp?z(14RH2?g|+I diff --git a/bin/jalview/datamodel/Sequence.js b/bin/jalview/datamodel/Sequence.js index 6a15091..06c8329 100644 --- a/bin/jalview/datamodel/Sequence.js +++ b/bin/jalview/datamodel/Sequence.js @@ -1,658 +1,658 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.ASequence", "$.SequenceI", "jalview.jsdev.RegExp"], "jalview.datamodel.Sequence", ["jalview.analysis.AlignSeq", "jalview.datamodel.AlignmentAnnotation", "$.DBRefEntry", "$.DBRefSource", "$.PDBEntry", "$.SequenceFeature", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "$.StringUtils", "java.lang.StringBuffer", "java.util.ArrayList", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.datasetSequence = null; -this.name = null; -this.sequence = null; -this.description = null; -this.start = 0; -this.end = 0; -this.pdbIds = null; -this.vamsasId = null; -this.dbrefs = null; -this.rna = null; -this.annotation = null; -this.index = -1; -this.sequenceFeatures = null; -this.limitrx = null; -this.endrx = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "Sequence", jalview.datamodel.ASequence, jalview.datamodel.SequenceI); -Clazz.prepareFields (c$, function () { -this.limitrx = jalview.jsdev.RegExp.newRegex (["[/][0-9]{1,}[-][0-9]{1,}$"]); -this.endrx = jalview.jsdev.RegExp.newRegex (["[0-9]{1,}$"]); -}); -Clazz.makeConstructor (c$, -function (name, sequence, start, end) { -Clazz.superConstructor (this, jalview.datamodel.Sequence, []); -this.initSeqAndName (name, sequence.toCharArray (), start, end); -}, "~S,~S,~N,~N"); -Clazz.makeConstructor (c$, -function (name, sequence, start, end) { -Clazz.superConstructor (this, jalview.datamodel.Sequence, []); -this.initSeqAndName (name, sequence, start, end); -}, "~S,~A,~N,~N"); -Clazz.defineMethod (c$, "initSeqAndName", -function (name2, sequence2, start2, end2) { -this.name = name2; -this.sequence = sequence2; -this.start = start2; -this.end = end2; -this.parseId (); -this.checkValidRange (); -}, "~S,~A,~N,~N"); -Clazz.defineMethod (c$, "parseId", -function () { -if (this.name == null) { -System.err.println ("POSSIBLE IMPLEMENTATION ERROR: null sequence name passed to constructor."); -this.name = ""; -}if (this.limitrx.search (this.name)) { -this.name = this.limitrx.left (); -this.endrx.search (this.limitrx.stringMatched ()); -this.setStart (Integer.parseInt (this.limitrx.stringMatched ().substring (1, this.endrx.matchedFrom () - 1))); -this.setEnd (Integer.parseInt (this.endrx.stringMatched ())); -}}); -Clazz.defineMethod (c$, "checkValidRange", -function () { -{ -var endRes = 0; -for (var j = 0; j < this.sequence.length; j++) { -if (!jalview.util.Comparison.isGap (this.sequence[j])) { -endRes++; -}} -if (endRes > 0) { -endRes += this.start - 1; -}if (this.end < endRes) { -this.end = endRes; -}}}); -Clazz.makeConstructor (c$, -function (name, sequence) { -this.construct (name, sequence, 1, -1); -}, "~S,~S"); -Clazz.makeConstructor (c$, -function (seq) { -this.construct (seq, seq.getAnnotation ()); -}, "jalview.datamodel.SequenceI"); -Clazz.makeConstructor (c$, -function (seq, alAnnotation) { -Clazz.superConstructor (this, jalview.datamodel.Sequence, []); -this.initSeqFrom (seq, alAnnotation); -}, "jalview.datamodel.SequenceI,~A"); -Clazz.defineMethod (c$, "initSeqFrom", -function (seq, alAnnotation) { -this.initSeqAndName (seq.getName (), seq.getSequence (), seq.getStart (), seq.getEnd ()); -this.description = seq.getDescription (); -if (seq.getSequenceFeatures () != null) { -var sf = seq.getSequenceFeatures (); -for (var i = 0; i < sf.length; i++) { -this.addSequenceFeature ( new jalview.datamodel.SequenceFeature (sf[i])); -} -}this.setDatasetSequence (seq.getDatasetSequence ()); -if (this.datasetSequence == null && seq.getDBRef () != null) { -var dbr = seq.getDBRef (); -for (var i = 0; i < dbr.length; i++) { -this.addDBRef ( new jalview.datamodel.DBRefEntry (dbr[i])); -} -}if (seq.getAnnotation () != null) { -var sqann = seq.getAnnotation (); -for (var i = 0; i < sqann.length; i++) { -if (sqann[i] == null) { -continue; -}var found = (alAnnotation == null); -if (!found) { -for (var apos = 0; !found && apos < alAnnotation.length; apos++) { -found = (alAnnotation[apos] === sqann[i]); -} -}if (found) { -var newann = new jalview.datamodel.AlignmentAnnotation (sqann[i]); -this.addAlignmentAnnotation (newann); -}} -}if (seq.getPDBId () != null) { -var ids = seq.getPDBId (); -var e = ids.elements (); -while (e.hasMoreElements ()) { -this.addPDBId ( new jalview.datamodel.PDBEntry (e.nextElement ())); -} -}}, "jalview.datamodel.SequenceI,~A"); -Clazz.defineMethod (c$, "setSequenceFeatures", -function (features) { -this.sequenceFeatures = features; -}, "~A"); -Clazz.overrideMethod (c$, "addSequenceFeature", -function (sf) { -if (this.sequenceFeatures == null) { -this.sequenceFeatures = new Array (0); -}for (var i = 0; i < this.sequenceFeatures.length; i++) { -if (this.sequenceFeatures[i].equals (sf)) { -return; -}} -var temp = new Array (this.sequenceFeatures.length + 1); -System.arraycopy (this.sequenceFeatures, 0, temp, 0, this.sequenceFeatures.length); -temp[this.sequenceFeatures.length] = sf; -this.sequenceFeatures = temp; -}, "jalview.datamodel.SequenceFeature"); -Clazz.overrideMethod (c$, "deleteFeature", -function (sf) { -if (this.sequenceFeatures == null) { -return; -}var index = 0; -for (index = 0; index < this.sequenceFeatures.length; index++) { -if (this.sequenceFeatures[index].equals (sf)) { -break; -}} -if (index == this.sequenceFeatures.length) { -return; -}var sfLength = this.sequenceFeatures.length; -if (sfLength < 2) { -this.sequenceFeatures = null; -} else { -var temp = new Array (sfLength - 1); -System.arraycopy (this.sequenceFeatures, 0, temp, 0, index); -if (index < sfLength) { -System.arraycopy (this.sequenceFeatures, index + 1, temp, index, this.sequenceFeatures.length - index - 1); -}this.sequenceFeatures = temp; -}}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "getSequenceFeatures", -function () { -var features = this.sequenceFeatures; -var seq = this; -var count = 0; -while (features == null && seq.getDatasetSequence () != null && count++ < 10) { -seq = seq.getDatasetSequence (); -features = (seq).sequenceFeatures; -} -return features; -}); -Clazz.overrideMethod (c$, "addPDBId", -function (entry) { -if (this.pdbIds == null) { -this.pdbIds = new java.util.Vector (); -}if (this.pdbIds.contains (entry)) { -jalview.datamodel.Sequence.updatePDBEntry (this.pdbIds.get (this.pdbIds.indexOf (entry)), entry); -} else { -this.pdbIds.addElement (entry); -}}, "jalview.datamodel.PDBEntry"); -c$.updatePDBEntry = Clazz.defineMethod (c$, "updatePDBEntry", -($fz = function (oldEntry, newEntry) { -if (newEntry.getFile () != null) { -oldEntry.setFile (newEntry.getFile ()); -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.PDBEntry,jalview.datamodel.PDBEntry"); -Clazz.defineMethod (c$, "setPDBId", -function (id) { -this.pdbIds = id; -}, "java.util.Vector"); -Clazz.defineMethod (c$, "getPDBId", -function () { -return this.pdbIds; -}); -Clazz.overrideMethod (c$, "getDisplayId", -function (jvsuffix) { -var result = new StringBuffer (this.name); -if (jvsuffix) { -result.append ("/" + this.start + "-" + this.end); -}return result.toString (); -}, "~B"); -Clazz.overrideMethod (c$, "setName", -function (name) { -this.name = name; -this.parseId (); -}, "~S"); -Clazz.defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz.overrideMethod (c$, "setStart", -function (start) { -this.start = start; -}, "~N"); -Clazz.defineMethod (c$, "getStart", -function () { -return this.start; -}); -Clazz.overrideMethod (c$, "setEnd", -function (end) { -this.end = end; -}, "~N"); -Clazz.defineMethod (c$, "getEnd", -function () { -return this.end; -}); -Clazz.overrideMethod (c$, "getLength", -function () { -return this.sequence.length; -}); -Clazz.defineMethod (c$, "setSequence", -function (seq) { -this.sequence = seq.toCharArray (); -this.checkValidRange (); -}, "~S"); -Clazz.defineMethod (c$, "getSequenceAsString", -function () { -return String.instantialize (this.sequence); -}); -Clazz.defineMethod (c$, "getSequenceAsString", -function (start, end) { -return String.instantialize (this.getSequence (start, end)); -}, "~N,~N"); -Clazz.defineMethod (c$, "getSequence", -function () { -return this.sequence; -}); -Clazz.defineMethod (c$, "getSequence", -function (start, end) { -if (start < 0) { -start = 0; -}if (start >= this.sequence.length) { -return Clazz.newCharArray (0, '\0'); -}if (end >= this.sequence.length) { -end = this.sequence.length; -}var reply = Clazz.newCharArray (end - start, '\0'); -System.arraycopy (this.sequence, start, reply, 0, end - start); -return reply; -}, "~N,~N"); -Clazz.overrideMethod (c$, "getSubSequence", -function (start, end) { -if (start < 0) { -start = 0; -}var seq = this.getSequence (start, end); -if (seq.length == 0) { -return null; -}var nstart = this.findPosition (start); -var nend = this.findPosition (end) - 1; -var nseq = new jalview.datamodel.Sequence (this.getName (), seq, nstart, nend); -nseq.setDescription (this.description); -if (this.datasetSequence != null) { -nseq.setDatasetSequence (this.datasetSequence); -} else { -nseq.setDatasetSequence (this); -}return nseq; -}, "~N,~N"); -Clazz.overrideMethod (c$, "getCharAt", -function (i) { -if (i < this.sequence.length) { -return this.sequence[i]; -} else { -return ' '; -}}, "~N"); -Clazz.defineMethod (c$, "setDescription", -function (desc) { -this.description = desc; -}, "~S"); -Clazz.defineMethod (c$, "getDescription", -function () { -return this.description; -}); -Clazz.overrideMethod (c$, "findIndex", -function (pos) { -var j = this.start; -var i = 0; -while ((i < this.sequence.length) && (j <= this.end) && (j <= pos)) { -if (!jalview.util.Comparison.isGap (this.sequence[i])) { -j++; -}i++; -} -if ((j == this.end) && (j < pos)) { -return this.end + 1; -} else { -return i; -}}, "~N"); -Clazz.overrideMethod (c$, "findPosition", -function (i) { -var j = 0; -var pos = this.start; -var seqlen = this.sequence.length; -while ((j < i) && (j < seqlen)) { -if (!jalview.util.Comparison.isGap (this.sequence[j])) { -pos++; -}j++; -} -return pos; -}, "~N"); -Clazz.overrideMethod (c$, "gapMap", -function () { -var seq = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (this.sequence)); -var map = Clazz.newIntArray (seq.length, 0); -var j = 0; -var p = 0; -while (j < this.sequence.length) { -if (!jalview.util.Comparison.isGap (this.sequence[j])) { -map[p++] = j; -}j++; -} -return map; -}); -Clazz.overrideMethod (c$, "findPositionMap", -function () { -var map = Clazz.newIntArray (this.sequence.length, 0); -var j = 0; -var pos = this.start; -var seqlen = this.sequence.length; -while ((j < seqlen)) { -map[j] = pos; -if (!jalview.util.Comparison.isGap (this.sequence[j])) { -pos++; -}j++; -} -return map; -}); -Clazz.overrideMethod (c$, "getInsertions", -function () { -var map = new java.util.ArrayList (); -var lastj = -1; -var j = 0; -var pos = this.start; -var seqlen = this.sequence.length; -while ((j < seqlen)) { -if (jalview.util.Comparison.isGap (this.sequence[j])) { -if (lastj == -1) { -lastj = j; -}} else { -if (lastj != -1) { -map.add ( Clazz.newIntArray (-1, [lastj, j - 1])); -lastj = -1; -}}j++; -} -if (lastj != -1) { -map.add ( Clazz.newIntArray (-1, [lastj, j - 1])); -lastj = -1; -}return map; -}); -Clazz.overrideMethod (c$, "deleteChars", -function (i, j) { -var newstart = this.start; -var newend = this.end; -if (i >= this.sequence.length || i < 0) { -return; -}var tmp = jalview.util.StringUtils.deleteChars (this.sequence, i, j); -var createNewDs = false; -var eindex = -1; -var sindex = -1; -var ecalc = false; -var scalc = false; -for (var s = i; s < j; s++) { -if (jalview.schemes.ResidueProperties.aaIndex[this.sequence[s].charCodeAt (0)] != 23) { -if (createNewDs) { -newend--; -} else { -if (!scalc) { -sindex = this.findIndex (this.start) - 1; -scalc = true; -}if (sindex == s) { -newstart = this.findPosition (j); -break; -} else { -if (!ecalc) { -eindex = this.findIndex (this.end) - 1; -ecalc = true; -}if (eindex < j) { -newend = this.findPosition (i - 1); -break; -} else { -createNewDs = true; -newend--; -}}}}} -if (createNewDs && this.datasetSequence != null) { -var ds = new jalview.datamodel.Sequence (this.datasetSequence); -ds.deleteChars (i, j); -this.datasetSequence = ds; -}this.start = newstart; -this.end = newend; -this.sequence = tmp; -}, "~N,~N"); -Clazz.defineMethod (c$, "insertCharAt", -function (i, length, c) { -var tmp = Clazz.newCharArray (this.sequence.length + length, '\0'); -if (i >= this.sequence.length) { -System.arraycopy (this.sequence, 0, tmp, 0, this.sequence.length); -i = this.sequence.length; -} else { -System.arraycopy (this.sequence, 0, tmp, 0, i); -}var index = i; -while (length > 0) { -tmp[index++] = c; -length--; -} -if (i < this.sequence.length) { -System.arraycopy (this.sequence, i, tmp, index, this.sequence.length - i); -}this.sequence = tmp; -}, "~N,~N,~S"); -Clazz.defineMethod (c$, "insertCharAt", -function (i, c) { -this.insertCharAt (i, 1, c); -}, "~N,~S"); -Clazz.overrideMethod (c$, "getVamsasId", -function () { -return this.vamsasId; -}); -Clazz.overrideMethod (c$, "setVamsasId", -function (id) { -this.vamsasId = id; -}, "~S"); -Clazz.defineMethod (c$, "setDBRef", -function (dbref) { -this.dbrefs = dbref; -}, "~A"); -Clazz.defineMethod (c$, "getDBRef", -function () { -if (this.dbrefs == null && this.datasetSequence != null && this !== this.datasetSequence) { -return this.datasetSequence.getDBRef (); -}return this.dbrefs; -}); -Clazz.overrideMethod (c$, "addDBRef", -function (entry) { -if (this.dbrefs == null) { -this.dbrefs = new Array (0); -}var i; -var iSize = this.dbrefs.length; -for (i = 0; i < iSize; i++) { -if (this.dbrefs[i].equalRef (entry)) { -if (entry.getMap () != null) { -if (this.dbrefs[i].getMap () == null) { -this.dbrefs[i] = entry; -}}return; -}} -var temp = new Array (iSize + 1); -System.arraycopy (this.dbrefs, 0, temp, 0, iSize); -temp[temp.length - 1] = entry; -this.dbrefs = temp; -}, "jalview.datamodel.DBRefEntry"); -Clazz.defineMethod (c$, "setDatasetSequence", -function (seq) { -this.datasetSequence = seq; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getDatasetSequence", -function () { -return this.datasetSequence; -}); -Clazz.defineMethod (c$, "getAnnotation", -function () { -return this.annotation == null ? null : this.annotation.toArray ( new Array (this.annotation.size ())); -}); -Clazz.overrideMethod (c$, "hasAnnotation", -function (ann) { -return this.annotation == null ? false : this.annotation.contains (ann); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "addAlignmentAnnotation", -function (annotation) { -if (this.annotation == null) { -this.annotation = new java.util.Vector (); -}if (!this.annotation.contains (annotation)) { -this.annotation.addElement (annotation); -}annotation.setSequenceRef (this); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.overrideMethod (c$, "removeAlignmentAnnotation", -function (annotation) { -if (this.annotation != null) { -this.annotation.removeElement (annotation); -if (this.annotation.size () == 0) { -this.annotation = null; -}}}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "isValidDatasetSequence", -($fz = function () { -if (this.datasetSequence != null) { -return false; -}for (var i = 0; i < this.sequence.length; i++) { -if (jalview.util.Comparison.isGap (this.sequence[i])) { -return false; -}} -return true; -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "deriveSequence", -function () { -var seq = new jalview.datamodel.Sequence (this); -if (this.datasetSequence != null) { -seq.setDatasetSequence (this.datasetSequence); -} else { -if (this.isValidDatasetSequence ()) { -seq.setDatasetSequence (this); -} else { -var ds = seq; -ds.setSequence (jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (this.sequence))); -this.setDatasetSequence (ds); -ds.setSequenceFeatures (this.getSequenceFeatures ()); -seq = this; -}}return seq; -}); -Clazz.overrideMethod (c$, "createDatasetSequence", -function () { -if (this.datasetSequence == null) { -this.datasetSequence = new jalview.datamodel.Sequence (this.getName (), jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, this.getSequenceAsString ()), this.getStart (), this.getEnd ()); -this.datasetSequence.setSequenceFeatures (this.getSequenceFeatures ()); -this.datasetSequence.setDescription (this.getDescription ()); -this.setSequenceFeatures (null); -this.datasetSequence.setDBRef (this.getDBRef ()); -this.setDBRef (null); -this.datasetSequence.setPDBId (this.getPDBId ()); -this.setPDBId (null); -this.datasetSequence.updatePDBIds (); -if (this.annotation != null) { -for (var aa, $aa = this.annotation.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) { -var _aa = new jalview.datamodel.AlignmentAnnotation (aa); -_aa.sequenceRef = this.datasetSequence; -_aa.adjustForAlignment (); -this.datasetSequence.addAlignmentAnnotation (_aa); -} -}}return this.datasetSequence; -}); -Clazz.overrideMethod (c$, "setAlignmentAnnotation", -function (annotations) { -if (this.annotation != null) { -this.annotation.removeAllElements (); -}if (annotations != null) { -for (var i = 0; i < annotations.length; i++) { -if (annotations[i] != null) { -this.addAlignmentAnnotation (annotations[i]); -}} -}}, "~A"); -Clazz.defineMethod (c$, "getAnnotation", -function (label) { -if (this.annotation == null || this.annotation.size () == 0) { -return null; -}var subset = new java.util.Vector (); -var e = this.annotation.elements (); -while (e.hasMoreElements ()) { -var ann = e.nextElement (); -if (ann.label != null && ann.label.equals (label)) { -subset.addElement (ann); -}} -if (subset.size () == 0) { -return null; -}var anns = new Array (subset.size ()); -var i = 0; -e = subset.elements (); -while (e.hasMoreElements ()) { -anns[i++] = e.nextElement (); -} -subset.removeAllElements (); -return anns; -}, "~S"); -Clazz.defineMethod (c$, "updatePDBIds", -function () { -if (this.datasetSequence != null) { -return this.datasetSequence.updatePDBIds (); -}if (this.dbrefs == null || this.dbrefs.length == 0) { -return false; -}var newpdb = new java.util.Vector (); -for (var i = 0; i < this.dbrefs.length; i++) { -if (jalview.datamodel.DBRefSource.PDB.equals (this.dbrefs[i].getSource ())) { -var pdbe = new jalview.datamodel.PDBEntry (); -pdbe.setId (this.dbrefs[i].getAccessionId ()); -if (this.pdbIds == null || this.pdbIds.size () == 0) { -newpdb.addElement (pdbe); -} else { -var en = this.pdbIds.elements (); -var matched = false; -while (!matched && en.hasMoreElements ()) { -var anentry = en.nextElement (); -if (anentry.getId ().equals (pdbe.getId ())) { -matched = true; -}} -if (!matched) { -newpdb.addElement (pdbe); -}}}} -if (newpdb.size () > 0) { -var en = newpdb.elements (); -while (en.hasMoreElements ()) { -this.addPDBId (en.nextElement ()); -} -return true; -}return false; -}); -Clazz.defineMethod (c$, "transferAnnotation", -function (entry, mp) { -if (this.datasetSequence != null) { -this.datasetSequence.transferAnnotation (entry, mp); -return; -}if (entry.getDatasetSequence () != null) { -this.transferAnnotation (entry.getDatasetSequence (), mp); -return; -}if (entry.getSequenceFeatures () != null) { -var sfs = entry.getSequenceFeatures (); -for (var si = 0; si < sfs.length; si++) { -var sf = (mp != null) ? mp.locateFeature (sfs[si]) : Clazz.newArray (-1, [ new jalview.datamodel.SequenceFeature (sfs[si])]); -if (sf != null && sf.length > 0) { -for (var sfi = 0; sfi < sf.length; sfi++) { -this.addSequenceFeature (sf[sfi]); -} -}} -}if (entry.getPDBId () != null) { -var e = entry.getPDBId ().elements (); -while (e.hasMoreElements ()) { -var pdb = e.nextElement (); -this.addPDBId (pdb); -} -}var entryRefs = entry.getDBRef (); -if (entryRefs != null) { -for (var r = 0; r < entryRefs.length; r++) { -var newref = new jalview.datamodel.DBRefEntry (entryRefs[r]); -if (newref.getMap () != null && mp != null) { -}this.addDBRef (newref); -} -}}, "jalview.datamodel.SequenceI,jalview.datamodel.Mapping"); -Clazz.overrideMethod (c$, "getIndex", -function () { -return this.index; -}); -Clazz.overrideMethod (c$, "setIndex", -function (value) { -this.index = value; -}, "~N"); -Clazz.overrideMethod (c$, "setRNA", -function (r) { -this.rna = r; -}, "jalview.jsdev.api.VarnaRNA"); -Clazz.overrideMethod (c$, "getRNA", -function () { -return this.rna; -}); -Clazz.overrideMethod (c$, "getAlignmentAnnotations", -function (calcId, label) { -var result = new java.util.ArrayList (); -if (this.annotation != null) { -for (var ann, $ann = this.annotation.iterator (); $ann.hasNext () && ((ann = $ann.next ()) || true);) { -if (ann.calcId != null && ann.calcId.equals (calcId) && ann.label != null && ann.label.equals (label)) { -result.add (ann); -}} -}return result; -}, "~S,~S"); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.ASequence", "$.SequenceI", "jalview.jsdev.RegExp"], "jalview.datamodel.Sequence", ["jalview.analysis.AlignSeq", "jalview.datamodel.AlignmentAnnotation", "$.DBRefEntry", "$.DBRefSource", "$.PDBEntry", "$.SequenceFeature", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "$.StringUtils", "java.lang.StringBuffer", "java.util.ArrayList", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.datasetSequence = null; +this.name = null; +this.sequence = null; +this.description = null; +this.start = 0; +this.end = 0; +this.pdbIds = null; +this.vamsasId = null; +this.dbrefs = null; +this.rna = null; +this.annotation = null; +this.index = -1; +this.sequenceFeatures = null; +this.limitrx = null; +this.endrx = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "Sequence", jalview.datamodel.ASequence, jalview.datamodel.SequenceI); +Clazz.prepareFields (c$, function () { +this.limitrx = jalview.jsdev.RegExp.newRegex (["[/][0-9]{1,}[-][0-9]{1,}$"]); +this.endrx = jalview.jsdev.RegExp.newRegex (["[0-9]{1,}$"]); +}); +Clazz.makeConstructor (c$, +function (name, sequence, start, end) { +Clazz.superConstructor (this, jalview.datamodel.Sequence, []); +this.initSeqAndName (name, sequence.toCharArray (), start, end); +}, "~S,~S,~N,~N"); +Clazz.makeConstructor (c$, +function (name, sequence, start, end) { +Clazz.superConstructor (this, jalview.datamodel.Sequence, []); +this.initSeqAndName (name, sequence, start, end); +}, "~S,~A,~N,~N"); +Clazz.defineMethod (c$, "initSeqAndName", +function (name2, sequence2, start2, end2) { +this.name = name2; +this.sequence = sequence2; +this.start = start2; +this.end = end2; +this.parseId (); +this.checkValidRange (); +}, "~S,~A,~N,~N"); +Clazz.defineMethod (c$, "parseId", +function () { +if (this.name == null) { +System.err.println ("POSSIBLE IMPLEMENTATION ERROR: null sequence name passed to constructor."); +this.name = ""; +}if (this.limitrx.search (this.name)) { +this.name = this.limitrx.left (); +this.endrx.search (this.limitrx.stringMatched ()); +this.setStart (Integer.parseInt (this.limitrx.stringMatched ().substring (1, this.endrx.matchedFrom () - 1))); +this.setEnd (Integer.parseInt (this.endrx.stringMatched ())); +}}); +Clazz.defineMethod (c$, "checkValidRange", +function () { +{ +var endRes = 0; +for (var j = 0; j < this.sequence.length; j++) { +if (!jalview.util.Comparison.isGap (this.sequence[j])) { +endRes++; +}} +if (endRes > 0) { +endRes += this.start - 1; +}if (this.end < endRes) { +this.end = endRes; +}}}); +Clazz.makeConstructor (c$, +function (name, sequence) { +this.construct (name, sequence, 1, -1); +}, "~S,~S"); +Clazz.makeConstructor (c$, +function (seq) { +this.construct (seq, seq.getAnnotation ()); +}, "jalview.datamodel.SequenceI"); +Clazz.makeConstructor (c$, +function (seq, alAnnotation) { +Clazz.superConstructor (this, jalview.datamodel.Sequence, []); +this.initSeqFrom (seq, alAnnotation); +}, "jalview.datamodel.SequenceI,~A"); +Clazz.defineMethod (c$, "initSeqFrom", +function (seq, alAnnotation) { +this.initSeqAndName (seq.getName (), seq.getSequence (), seq.getStart (), seq.getEnd ()); +this.description = seq.getDescription (); +if (seq.getSequenceFeatures () != null) { +var sf = seq.getSequenceFeatures (); +for (var i = 0; i < sf.length; i++) { +this.addSequenceFeature ( new jalview.datamodel.SequenceFeature (sf[i])); +} +}this.setDatasetSequence (seq.getDatasetSequence ()); +if (this.datasetSequence == null && seq.getDBRef () != null) { +var dbr = seq.getDBRef (); +for (var i = 0; i < dbr.length; i++) { +this.addDBRef ( new jalview.datamodel.DBRefEntry (dbr[i])); +} +}if (seq.getAnnotation () != null) { +var sqann = seq.getAnnotation (); +for (var i = 0; i < sqann.length; i++) { +if (sqann[i] == null) { +continue; +}var found = (alAnnotation == null); +if (!found) { +for (var apos = 0; !found && apos < alAnnotation.length; apos++) { +found = (alAnnotation[apos] === sqann[i]); +} +}if (found) { +var newann = new jalview.datamodel.AlignmentAnnotation (sqann[i]); +this.addAlignmentAnnotation (newann); +}} +}if (seq.getPDBId () != null) { +var ids = seq.getPDBId (); +var e = ids.elements (); +while (e.hasMoreElements ()) { +this.addPDBId ( new jalview.datamodel.PDBEntry (e.nextElement ())); +} +}}, "jalview.datamodel.SequenceI,~A"); +Clazz.defineMethod (c$, "setSequenceFeatures", +function (features) { +this.sequenceFeatures = features; +}, "~A"); +Clazz.overrideMethod (c$, "addSequenceFeature", +function (sf) { +if (this.sequenceFeatures == null) { +this.sequenceFeatures = new Array (0); +}for (var i = 0; i < this.sequenceFeatures.length; i++) { +if (this.sequenceFeatures[i].equals (sf)) { +return; +}} +var temp = new Array (this.sequenceFeatures.length + 1); +System.arraycopy (this.sequenceFeatures, 0, temp, 0, this.sequenceFeatures.length); +temp[this.sequenceFeatures.length] = sf; +this.sequenceFeatures = temp; +}, "jalview.datamodel.SequenceFeature"); +Clazz.overrideMethod (c$, "deleteFeature", +function (sf) { +if (this.sequenceFeatures == null) { +return; +}var index = 0; +for (index = 0; index < this.sequenceFeatures.length; index++) { +if (this.sequenceFeatures[index].equals (sf)) { +break; +}} +if (index == this.sequenceFeatures.length) { +return; +}var sfLength = this.sequenceFeatures.length; +if (sfLength < 2) { +this.sequenceFeatures = null; +} else { +var temp = new Array (sfLength - 1); +System.arraycopy (this.sequenceFeatures, 0, temp, 0, index); +if (index < sfLength) { +System.arraycopy (this.sequenceFeatures, index + 1, temp, index, this.sequenceFeatures.length - index - 1); +}this.sequenceFeatures = temp; +}}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "getSequenceFeatures", +function () { +var features = this.sequenceFeatures; +var seq = this; +var count = 0; +while (features == null && seq.getDatasetSequence () != null && count++ < 10) { +seq = seq.getDatasetSequence (); +features = (seq).sequenceFeatures; +} +return features; +}); +Clazz.overrideMethod (c$, "addPDBId", +function (entry) { +if (this.pdbIds == null) { +this.pdbIds = new java.util.Vector (); +}if (this.pdbIds.contains (entry)) { +jalview.datamodel.Sequence.updatePDBEntry (this.pdbIds.get (this.pdbIds.indexOf (entry)), entry); +} else { +this.pdbIds.addElement (entry); +}}, "jalview.datamodel.PDBEntry"); +c$.updatePDBEntry = Clazz.defineMethod (c$, "updatePDBEntry", +($fz = function (oldEntry, newEntry) { +if (newEntry.getFile () != null) { +oldEntry.setFile (newEntry.getFile ()); +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.PDBEntry,jalview.datamodel.PDBEntry"); +Clazz.defineMethod (c$, "setPDBId", +function (id) { +this.pdbIds = id; +}, "java.util.Vector"); +Clazz.defineMethod (c$, "getPDBId", +function () { +return this.pdbIds; +}); +Clazz.overrideMethod (c$, "getDisplayId", +function (jvsuffix) { +var result = new StringBuffer (this.name); +if (jvsuffix) { +result.append ("/" + this.start + "-" + this.end); +}return result.toString (); +}, "~B"); +Clazz.overrideMethod (c$, "setName", +function (name) { +this.name = name; +this.parseId (); +}, "~S"); +Clazz.defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz.overrideMethod (c$, "setStart", +function (start) { +this.start = start; +}, "~N"); +Clazz.defineMethod (c$, "getStart", +function () { +return this.start; +}); +Clazz.overrideMethod (c$, "setEnd", +function (end) { +this.end = end; +}, "~N"); +Clazz.defineMethod (c$, "getEnd", +function () { +return this.end; +}); +Clazz.overrideMethod (c$, "getLength", +function () { +return this.sequence.length; +}); +Clazz.defineMethod (c$, "setSequence", +function (seq) { +this.sequence = seq.toCharArray (); +this.checkValidRange (); +}, "~S"); +Clazz.defineMethod (c$, "getSequenceAsString", +function () { +return String.instantialize (this.sequence); +}); +Clazz.defineMethod (c$, "getSequenceAsString", +function (start, end) { +return String.instantialize (this.getSequence (start, end)); +}, "~N,~N"); +Clazz.defineMethod (c$, "getSequence", +function () { +return this.sequence; +}); +Clazz.defineMethod (c$, "getSequence", +function (start, end) { +if (start < 0) { +start = 0; +}if (start >= this.sequence.length) { +return Clazz.newCharArray (0, '\0'); +}if (end >= this.sequence.length) { +end = this.sequence.length; +}var reply = Clazz.newCharArray (end - start, '\0'); +System.arraycopy (this.sequence, start, reply, 0, end - start); +return reply; +}, "~N,~N"); +Clazz.overrideMethod (c$, "getSubSequence", +function (start, end) { +if (start < 0) { +start = 0; +}var seq = this.getSequence (start, end); +if (seq.length == 0) { +return null; +}var nstart = this.findPosition (start); +var nend = this.findPosition (end) - 1; +var nseq = new jalview.datamodel.Sequence (this.getName (), seq, nstart, nend); +nseq.setDescription (this.description); +if (this.datasetSequence != null) { +nseq.setDatasetSequence (this.datasetSequence); +} else { +nseq.setDatasetSequence (this); +}return nseq; +}, "~N,~N"); +Clazz.overrideMethod (c$, "getCharAt", +function (i) { +if (i < this.sequence.length) { +return this.sequence[i]; +} else { +return ' '; +}}, "~N"); +Clazz.defineMethod (c$, "setDescription", +function (desc) { +this.description = desc; +}, "~S"); +Clazz.defineMethod (c$, "getDescription", +function () { +return this.description; +}); +Clazz.overrideMethod (c$, "findIndex", +function (pos) { +var j = this.start; +var i = 0; +while ((i < this.sequence.length) && (j <= this.end) && (j <= pos)) { +if (!jalview.util.Comparison.isGap (this.sequence[i])) { +j++; +}i++; +} +if ((j == this.end) && (j < pos)) { +return this.end + 1; +} else { +return i; +}}, "~N"); +Clazz.overrideMethod (c$, "findPosition", +function (i) { +var j = 0; +var pos = this.start; +var seqlen = this.sequence.length; +while ((j < i) && (j < seqlen)) { +if (!jalview.util.Comparison.isGap (this.sequence[j])) { +pos++; +}j++; +} +return pos; +}, "~N"); +Clazz.overrideMethod (c$, "gapMap", +function () { +var seq = jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (this.sequence)); +var map = Clazz.newIntArray (seq.length, 0); +var j = 0; +var p = 0; +while (j < this.sequence.length) { +if (!jalview.util.Comparison.isGap (this.sequence[j])) { +map[p++] = j; +}j++; +} +return map; +}); +Clazz.overrideMethod (c$, "findPositionMap", +function () { +var map = Clazz.newIntArray (this.sequence.length, 0); +var j = 0; +var pos = this.start; +var seqlen = this.sequence.length; +while ((j < seqlen)) { +map[j] = pos; +if (!jalview.util.Comparison.isGap (this.sequence[j])) { +pos++; +}j++; +} +return map; +}); +Clazz.overrideMethod (c$, "getInsertions", +function () { +var map = new java.util.ArrayList (); +var lastj = -1; +var j = 0; +var pos = this.start; +var seqlen = this.sequence.length; +while ((j < seqlen)) { +if (jalview.util.Comparison.isGap (this.sequence[j])) { +if (lastj == -1) { +lastj = j; +}} else { +if (lastj != -1) { +map.add ( Clazz.newIntArray (-1, [lastj, j - 1])); +lastj = -1; +}}j++; +} +if (lastj != -1) { +map.add ( Clazz.newIntArray (-1, [lastj, j - 1])); +lastj = -1; +}return map; +}); +Clazz.overrideMethod (c$, "deleteChars", +function (i, j) { +var newstart = this.start; +var newend = this.end; +if (i >= this.sequence.length || i < 0) { +return; +}var tmp = jalview.util.StringUtils.deleteChars (this.sequence, i, j); +var createNewDs = false; +var eindex = -1; +var sindex = -1; +var ecalc = false; +var scalc = false; +for (var s = i; s < j; s++) { +if (jalview.schemes.ResidueProperties.aaIndex[this.sequence[s].charCodeAt (0)] != 23) { +if (createNewDs) { +newend--; +} else { +if (!scalc) { +sindex = this.findIndex (this.start) - 1; +scalc = true; +}if (sindex == s) { +newstart = this.findPosition (j); +break; +} else { +if (!ecalc) { +eindex = this.findIndex (this.end) - 1; +ecalc = true; +}if (eindex < j) { +newend = this.findPosition (i - 1); +break; +} else { +createNewDs = true; +newend--; +}}}}} +if (createNewDs && this.datasetSequence != null) { +var ds = new jalview.datamodel.Sequence (this.datasetSequence); +ds.deleteChars (i, j); +this.datasetSequence = ds; +}this.start = newstart; +this.end = newend; +this.sequence = tmp; +}, "~N,~N"); +Clazz.defineMethod (c$, "insertCharAt", +function (i, length, c) { +var tmp = Clazz.newCharArray (this.sequence.length + length, '\0'); +if (i >= this.sequence.length) { +System.arraycopy (this.sequence, 0, tmp, 0, this.sequence.length); +i = this.sequence.length; +} else { +System.arraycopy (this.sequence, 0, tmp, 0, i); +}var index = i; +while (length > 0) { +tmp[index++] = c; +length--; +} +if (i < this.sequence.length) { +System.arraycopy (this.sequence, i, tmp, index, this.sequence.length - i); +}this.sequence = tmp; +}, "~N,~N,~S"); +Clazz.defineMethod (c$, "insertCharAt", +function (i, c) { +this.insertCharAt (i, 1, c); +}, "~N,~S"); +Clazz.overrideMethod (c$, "getVamsasId", +function () { +return this.vamsasId; +}); +Clazz.overrideMethod (c$, "setVamsasId", +function (id) { +this.vamsasId = id; +}, "~S"); +Clazz.defineMethod (c$, "setDBRef", +function (dbref) { +this.dbrefs = dbref; +}, "~A"); +Clazz.defineMethod (c$, "getDBRef", +function () { +if (this.dbrefs == null && this.datasetSequence != null && this !== this.datasetSequence) { +return this.datasetSequence.getDBRef (); +}return this.dbrefs; +}); +Clazz.overrideMethod (c$, "addDBRef", +function (entry) { +if (this.dbrefs == null) { +this.dbrefs = new Array (0); +}var i; +var iSize = this.dbrefs.length; +for (i = 0; i < iSize; i++) { +if (this.dbrefs[i].equalRef (entry)) { +if (entry.getMap () != null) { +if (this.dbrefs[i].getMap () == null) { +this.dbrefs[i] = entry; +}}return; +}} +var temp = new Array (iSize + 1); +System.arraycopy (this.dbrefs, 0, temp, 0, iSize); +temp[temp.length - 1] = entry; +this.dbrefs = temp; +}, "jalview.datamodel.DBRefEntry"); +Clazz.defineMethod (c$, "setDatasetSequence", +function (seq) { +this.datasetSequence = seq; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getDatasetSequence", +function () { +return this.datasetSequence; +}); +Clazz.defineMethod (c$, "getAnnotation", +function () { +return this.annotation == null ? null : this.annotation.toArray ( new Array (this.annotation.size ())); +}); +Clazz.overrideMethod (c$, "hasAnnotation", +function (ann) { +return this.annotation == null ? false : this.annotation.contains (ann); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "addAlignmentAnnotation", +function (annotation) { +if (this.annotation == null) { +this.annotation = new java.util.Vector (); +}if (!this.annotation.contains (annotation)) { +this.annotation.addElement (annotation); +}annotation.setSequenceRef (this); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.overrideMethod (c$, "removeAlignmentAnnotation", +function (annotation) { +if (this.annotation != null) { +this.annotation.removeElement (annotation); +if (this.annotation.size () == 0) { +this.annotation = null; +}}}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "isValidDatasetSequence", +($fz = function () { +if (this.datasetSequence != null) { +return false; +}for (var i = 0; i < this.sequence.length; i++) { +if (jalview.util.Comparison.isGap (this.sequence[i])) { +return false; +}} +return true; +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "deriveSequence", +function () { +var seq = new jalview.datamodel.Sequence (this); +if (this.datasetSequence != null) { +seq.setDatasetSequence (this.datasetSequence); +} else { +if (this.isValidDatasetSequence ()) { +seq.setDatasetSequence (this); +} else { +var ds = seq; +ds.setSequence (jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, String.instantialize (this.sequence))); +this.setDatasetSequence (ds); +ds.setSequenceFeatures (this.getSequenceFeatures ()); +seq = this; +}}return seq; +}); +Clazz.overrideMethod (c$, "createDatasetSequence", +function () { +if (this.datasetSequence == null) { +this.datasetSequence = new jalview.datamodel.Sequence (this.getName (), jalview.analysis.AlignSeq.extractGaps (jalview.util.Comparison.GapChars, this.getSequenceAsString ()), this.getStart (), this.getEnd ()); +this.datasetSequence.setSequenceFeatures (this.getSequenceFeatures ()); +this.datasetSequence.setDescription (this.getDescription ()); +this.setSequenceFeatures (null); +this.datasetSequence.setDBRef (this.getDBRef ()); +this.setDBRef (null); +this.datasetSequence.setPDBId (this.getPDBId ()); +this.setPDBId (null); +this.datasetSequence.updatePDBIds (); +if (this.annotation != null) { +for (var aa, $aa = this.annotation.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) { +var _aa = new jalview.datamodel.AlignmentAnnotation (aa); +_aa.sequenceRef = this.datasetSequence; +_aa.adjustForAlignment (); +this.datasetSequence.addAlignmentAnnotation (_aa); +} +}}return this.datasetSequence; +}); +Clazz.overrideMethod (c$, "setAlignmentAnnotation", +function (annotations) { +if (this.annotation != null) { +this.annotation.removeAllElements (); +}if (annotations != null) { +for (var i = 0; i < annotations.length; i++) { +if (annotations[i] != null) { +this.addAlignmentAnnotation (annotations[i]); +}} +}}, "~A"); +Clazz.defineMethod (c$, "getAnnotation", +function (label) { +if (this.annotation == null || this.annotation.size () == 0) { +return null; +}var subset = new java.util.Vector (); +var e = this.annotation.elements (); +while (e.hasMoreElements ()) { +var ann = e.nextElement (); +if (ann.label != null && ann.label.equals (label)) { +subset.addElement (ann); +}} +if (subset.size () == 0) { +return null; +}var anns = new Array (subset.size ()); +var i = 0; +e = subset.elements (); +while (e.hasMoreElements ()) { +anns[i++] = e.nextElement (); +} +subset.removeAllElements (); +return anns; +}, "~S"); +Clazz.defineMethod (c$, "updatePDBIds", +function () { +if (this.datasetSequence != null) { +return this.datasetSequence.updatePDBIds (); +}if (this.dbrefs == null || this.dbrefs.length == 0) { +return false; +}var newpdb = new java.util.Vector (); +for (var i = 0; i < this.dbrefs.length; i++) { +if (jalview.datamodel.DBRefSource.PDB.equals (this.dbrefs[i].getSource ())) { +var pdbe = new jalview.datamodel.PDBEntry (); +pdbe.setId (this.dbrefs[i].getAccessionId ()); +if (this.pdbIds == null || this.pdbIds.size () == 0) { +newpdb.addElement (pdbe); +} else { +var en = this.pdbIds.elements (); +var matched = false; +while (!matched && en.hasMoreElements ()) { +var anentry = en.nextElement (); +if (anentry.getId ().equals (pdbe.getId ())) { +matched = true; +}} +if (!matched) { +newpdb.addElement (pdbe); +}}}} +if (newpdb.size () > 0) { +var en = newpdb.elements (); +while (en.hasMoreElements ()) { +this.addPDBId (en.nextElement ()); +} +return true; +}return false; +}); +Clazz.defineMethod (c$, "transferAnnotation", +function (entry, mp) { +if (this.datasetSequence != null) { +this.datasetSequence.transferAnnotation (entry, mp); +return; +}if (entry.getDatasetSequence () != null) { +this.transferAnnotation (entry.getDatasetSequence (), mp); +return; +}if (entry.getSequenceFeatures () != null) { +var sfs = entry.getSequenceFeatures (); +for (var si = 0; si < sfs.length; si++) { +var sf = (mp != null) ? mp.locateFeature (sfs[si]) : Clazz.newArray (-1, [ new jalview.datamodel.SequenceFeature (sfs[si])]); +if (sf != null && sf.length > 0) { +for (var sfi = 0; sfi < sf.length; sfi++) { +this.addSequenceFeature (sf[sfi]); +} +}} +}if (entry.getPDBId () != null) { +var e = entry.getPDBId ().elements (); +while (e.hasMoreElements ()) { +var pdb = e.nextElement (); +this.addPDBId (pdb); +} +}var entryRefs = entry.getDBRef (); +if (entryRefs != null) { +for (var r = 0; r < entryRefs.length; r++) { +var newref = new jalview.datamodel.DBRefEntry (entryRefs[r]); +if (newref.getMap () != null && mp != null) { +}this.addDBRef (newref); +} +}}, "jalview.datamodel.SequenceI,jalview.datamodel.Mapping"); +Clazz.overrideMethod (c$, "getIndex", +function () { +return this.index; +}); +Clazz.overrideMethod (c$, "setIndex", +function (value) { +this.index = value; +}, "~N"); +Clazz.overrideMethod (c$, "setRNA", +function (r) { +this.rna = r; +}, "jalview.jsdev.api.VarnaRNA"); +Clazz.overrideMethod (c$, "getRNA", +function () { +return this.rna; +}); +Clazz.overrideMethod (c$, "getAlignmentAnnotations", +function (calcId, label) { +var result = new java.util.ArrayList (); +if (this.annotation != null) { +for (var ann, $ann = this.annotation.iterator (); $ann.hasNext () && ((ann = $ann.next ()) || true);) { +if (ann.calcId != null && ann.calcId.equals (calcId) && ann.label != null && ann.label.equals (label)) { +result.add (ann); +}} +}return result; +}, "~S,~S"); +}); diff --git a/bin/jalview/datamodel/SequenceCollectionI.js b/bin/jalview/datamodel/SequenceCollectionI.js index b0849db..6f0107b 100644 --- a/bin/jalview/datamodel/SequenceCollectionI.js +++ b/bin/jalview/datamodel/SequenceCollectionI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.declareInterface (jalview.datamodel, "SequenceCollectionI"); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.declareInterface (jalview.datamodel, "SequenceCollectionI"); diff --git a/bin/jalview/datamodel/SequenceDummy.js b/bin/jalview/datamodel/SequenceDummy.js index 38b0a3c..d5a179c 100644 --- a/bin/jalview/datamodel/SequenceDummy.js +++ b/bin/jalview/datamodel/SequenceDummy.js @@ -1,20 +1,20 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.Sequence", "$.SequenceI"], "jalview.datamodel.SequenceDummy", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.dummy = true; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "SequenceDummy", jalview.datamodel.Sequence, jalview.datamodel.SequenceI); -Clazz.makeConstructor (c$, -function (sequenceId) { -Clazz.superConstructor (this, jalview.datamodel.SequenceDummy, [sequenceId, "THISAPLACEHOLDER"]); -}, "~S"); -Clazz.defineMethod (c$, "become", -function (mseq) { -this.initSeqFrom (mseq, null); -this.dummy = false; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "isDummy", -function () { -return this.dummy; -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.Sequence", "$.SequenceI"], "jalview.datamodel.SequenceDummy", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.dummy = true; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SequenceDummy", jalview.datamodel.Sequence, jalview.datamodel.SequenceI); +Clazz.makeConstructor (c$, +function (sequenceId) { +Clazz.superConstructor (this, jalview.datamodel.SequenceDummy, [sequenceId, "THISAPLACEHOLDER"]); +}, "~S"); +Clazz.defineMethod (c$, "become", +function (mseq) { +this.initSeqFrom (mseq, null); +this.dummy = false; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "isDummy", +function () { +return this.dummy; +}); +}); diff --git a/bin/jalview/datamodel/SequenceFeature.js b/bin/jalview/datamodel/SequenceFeature.js index f8ce548..d2f14a8 100644 --- a/bin/jalview/datamodel/SequenceFeature.js +++ b/bin/jalview/datamodel/SequenceFeature.js @@ -1,170 +1,170 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.SequenceFeature", ["java.util.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.begin = 0; -this.end = 0; -this.score = 0; -this.type = null; -this.description = null; -this.otherDetails = null; -this.links = null; -this.featureGroup = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "SequenceFeature"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (cpy) { -if (cpy != null) { -this.begin = cpy.begin; -this.end = cpy.end; -this.score = cpy.score; -if (cpy.type != null) { -this.type = String.instantialize (cpy.type); -}if (cpy.description != null) { -this.description = String.instantialize (cpy.description); -}if (cpy.featureGroup != null) { -this.featureGroup = String.instantialize (cpy.featureGroup); -}if (cpy.otherDetails != null) { -try { -this.otherDetails = cpy.otherDetails.clone (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -}if (cpy.links != null && cpy.links.size () > 0) { -this.links = new java.util.Vector (); -for (var i = 0, iSize = cpy.links.size (); i < iSize; i++) { -this.links.addElement (cpy.links.elementAt (i)); -} -}}}, "jalview.datamodel.SequenceFeature"); -Clazz.makeConstructor (c$, -function (type, desc, status, begin, end, featureGroup) { -this.type = type; -this.description = desc; -this.setValue ("status", status); -this.begin = begin; -this.end = end; -this.featureGroup = featureGroup; -}, "~S,~S,~S,~N,~N,~S"); -Clazz.makeConstructor (c$, -function (type, desc, begin, end, score, featureGroup) { -this.type = type; -this.description = desc; -this.begin = begin; -this.end = end; -this.score = score; -this.featureGroup = featureGroup; -}, "~S,~S,~N,~N,~N,~S"); -Clazz.defineMethod (c$, "equals", -function (sf) { -if (this.begin != sf.begin || this.end != sf.end || this.score != sf.score) { -return false; -}if (!(this.type + this.description + this.featureGroup).equals (sf.type + sf.description + sf.featureGroup)) { -return false; -}return true; -}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "getBegin", -function () { -return this.begin; -}); -Clazz.defineMethod (c$, "setBegin", -function (start) { -this.begin = start; -}, "~N"); -Clazz.defineMethod (c$, "getEnd", -function () { -return this.end; -}); -Clazz.defineMethod (c$, "setEnd", -function (end) { -this.end = end; -}, "~N"); -Clazz.defineMethod (c$, "getType", -function () { -return this.type; -}); -Clazz.defineMethod (c$, "setType", -function (type) { -this.type = type; -}, "~S"); -Clazz.defineMethod (c$, "getDescription", -function () { -return this.description; -}); -Clazz.defineMethod (c$, "setDescription", -function (desc) { -this.description = desc; -}, "~S"); -Clazz.defineMethod (c$, "getFeatureGroup", -function () { -return this.featureGroup; -}); -Clazz.defineMethod (c$, "setFeatureGroup", -function (featureGroup) { -this.featureGroup = featureGroup; -}, "~S"); -Clazz.defineMethod (c$, "addLink", -function (labelLink) { -if (this.links == null) { -this.links = new java.util.Vector (); -}this.links.insertElementAt (labelLink, 0); -}, "~S"); -Clazz.defineMethod (c$, "getScore", -function () { -return this.score; -}); -Clazz.defineMethod (c$, "setScore", -function (value) { -this.score = value; -}, "~N"); -Clazz.defineMethod (c$, "getValue", -function (key) { -if (this.otherDetails == null) { -return null; -} else { -return this.otherDetails.get (key); -}}, "~S"); -Clazz.defineMethod (c$, "setValue", -function (key, value) { -if (value != null) { -if (this.otherDetails == null) { -this.otherDetails = new java.util.Hashtable (); -}this.otherDetails.put (key, value); -}}, "~S,~O"); -Clazz.defineMethod (c$, "setStatus", -function (status) { -this.setValue ("status", status); -}, "~S"); -Clazz.defineMethod (c$, "getStatus", -function () { -if (this.otherDetails != null) { -var stat = this.otherDetails.get ("status"); -if (stat != null) { -return String.instantialize (stat); -}}return null; -}); -Clazz.defineMethod (c$, "setPosition", -function (pos) { -this.begin = pos; -this.end = pos; -}, "~N"); -Clazz.defineMethod (c$, "getPosition", -function () { -return this.begin; -}); -Clazz.defineMethod (c$, "getStrand", -function () { -var str; -if (this.otherDetails == null || (str = this.otherDetails.get ("STRAND").toString ()) == null) { -return 0; -}if (str.equals ("-")) { -return -1; -}if (str.equals ("+")) { -return 1; -}return 0; -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.SequenceFeature", ["java.util.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.begin = 0; +this.end = 0; +this.score = 0; +this.type = null; +this.description = null; +this.otherDetails = null; +this.links = null; +this.featureGroup = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SequenceFeature"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (cpy) { +if (cpy != null) { +this.begin = cpy.begin; +this.end = cpy.end; +this.score = cpy.score; +if (cpy.type != null) { +this.type = String.instantialize (cpy.type); +}if (cpy.description != null) { +this.description = String.instantialize (cpy.description); +}if (cpy.featureGroup != null) { +this.featureGroup = String.instantialize (cpy.featureGroup); +}if (cpy.otherDetails != null) { +try { +this.otherDetails = cpy.otherDetails.clone (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +}if (cpy.links != null && cpy.links.size () > 0) { +this.links = new java.util.Vector (); +for (var i = 0, iSize = cpy.links.size (); i < iSize; i++) { +this.links.addElement (cpy.links.elementAt (i)); +} +}}}, "jalview.datamodel.SequenceFeature"); +Clazz.makeConstructor (c$, +function (type, desc, status, begin, end, featureGroup) { +this.type = type; +this.description = desc; +this.setValue ("status", status); +this.begin = begin; +this.end = end; +this.featureGroup = featureGroup; +}, "~S,~S,~S,~N,~N,~S"); +Clazz.makeConstructor (c$, +function (type, desc, begin, end, score, featureGroup) { +this.type = type; +this.description = desc; +this.begin = begin; +this.end = end; +this.score = score; +this.featureGroup = featureGroup; +}, "~S,~S,~N,~N,~N,~S"); +Clazz.defineMethod (c$, "equals", +function (sf) { +if (this.begin != sf.begin || this.end != sf.end || this.score != sf.score) { +return false; +}if (!(this.type + this.description + this.featureGroup).equals (sf.type + sf.description + sf.featureGroup)) { +return false; +}return true; +}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "getBegin", +function () { +return this.begin; +}); +Clazz.defineMethod (c$, "setBegin", +function (start) { +this.begin = start; +}, "~N"); +Clazz.defineMethod (c$, "getEnd", +function () { +return this.end; +}); +Clazz.defineMethod (c$, "setEnd", +function (end) { +this.end = end; +}, "~N"); +Clazz.defineMethod (c$, "getType", +function () { +return this.type; +}); +Clazz.defineMethod (c$, "setType", +function (type) { +this.type = type; +}, "~S"); +Clazz.defineMethod (c$, "getDescription", +function () { +return this.description; +}); +Clazz.defineMethod (c$, "setDescription", +function (desc) { +this.description = desc; +}, "~S"); +Clazz.defineMethod (c$, "getFeatureGroup", +function () { +return this.featureGroup; +}); +Clazz.defineMethod (c$, "setFeatureGroup", +function (featureGroup) { +this.featureGroup = featureGroup; +}, "~S"); +Clazz.defineMethod (c$, "addLink", +function (labelLink) { +if (this.links == null) { +this.links = new java.util.Vector (); +}this.links.insertElementAt (labelLink, 0); +}, "~S"); +Clazz.defineMethod (c$, "getScore", +function () { +return this.score; +}); +Clazz.defineMethod (c$, "setScore", +function (value) { +this.score = value; +}, "~N"); +Clazz.defineMethod (c$, "getValue", +function (key) { +if (this.otherDetails == null) { +return null; +} else { +return this.otherDetails.get (key); +}}, "~S"); +Clazz.defineMethod (c$, "setValue", +function (key, value) { +if (value != null) { +if (this.otherDetails == null) { +this.otherDetails = new java.util.Hashtable (); +}this.otherDetails.put (key, value); +}}, "~S,~O"); +Clazz.defineMethod (c$, "setStatus", +function (status) { +this.setValue ("status", status); +}, "~S"); +Clazz.defineMethod (c$, "getStatus", +function () { +if (this.otherDetails != null) { +var stat = this.otherDetails.get ("status"); +if (stat != null) { +return String.instantialize (stat); +}}return null; +}); +Clazz.defineMethod (c$, "setPosition", +function (pos) { +this.begin = pos; +this.end = pos; +}, "~N"); +Clazz.defineMethod (c$, "getPosition", +function () { +return this.begin; +}); +Clazz.defineMethod (c$, "getStrand", +function () { +var str; +if (this.otherDetails == null || (str = this.otherDetails.get ("STRAND").toString ()) == null) { +return 0; +}if (str.equals ("-")) { +return -1; +}if (str.equals ("+")) { +return 1; +}return 0; +}); +}); diff --git a/bin/jalview/datamodel/SequenceGroup.class b/bin/jalview/datamodel/SequenceGroup.class index f773fbca897d7e7630387a3859477bd45ad4b6a1..d962521a442198b9231e39355af8f30dd594a530 100644 GIT binary patch delta 119 zcmZ3#jBx`H6&W(lnp|u+g_V_oSx99wuTd&9f8%|+kV_*?dWZKMQl*-KbeshuOZboKf2JXoQ=9*%^7+9Uy z8JCGOFfsNs#xXE5m@+Uh8gDK&S7(&sW?<#{&5+~D$mGfhlrLl~g39Y`-eRG^$OV!2 M1 0) { -eres += seq.getStart () - 1; -}return eres; -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getSequences", -function () { -return this.sequences; -}); -Clazz.defineMethod (c$, "getSequences", -function (hiddenReps) { -if (hiddenReps == null) { -return this.sequences; -} else { -var allSequences = new java.util.ArrayList (); -for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -allSequences.add (seq); -if (hiddenReps.containsKey (seq)) { -var hsg = hiddenReps.get (seq); -for (var seq2, $seq2 = hsg.getSequences ().iterator (); $seq2.hasNext () && ((seq2 = $seq2.next ()) || true);) { -if (seq2 !== seq && !allSequences.contains (seq2)) { -allSequences.add (seq2); -}} -}} -return allSequences; -}}, "java.util.Map"); -Clazz.defineMethod (c$, "getSequencesAsArray", -function (map) { -var tmp = this.getSequences (map); -if (tmp == null) { -return null; -}return tmp.toArray ( new Array (tmp.size ())); -}, "java.util.Map"); -Clazz.defineMethod (c$, "adjustForRemoveLeft", -function (col) { -if (this.startRes >= col) { -this.startRes = this.startRes - col; -}if (this.endRes >= col) { -this.endRes = this.endRes - col; -if (this.startRes > this.endRes) { -this.startRes = 0; -}} else { -return false; -}return true; -}, "~N"); -Clazz.defineMethod (c$, "adjustForRemoveRight", -function (col) { -if (this.startRes > col) { -return false; -}if (this.endRes >= col) { -this.endRes = col; -}return true; -}, "~N"); -Clazz.defineMethod (c$, "getName", -function () { -return this.groupName; -}); -Clazz.defineMethod (c$, "getDescription", -function () { -return this.description; -}); -Clazz.defineMethod (c$, "setName", -function (name) { -this.groupName = name; -}, "~S"); -Clazz.defineMethod (c$, "setDescription", -function (desc) { -this.description = desc; -}, "~S"); -Clazz.defineMethod (c$, "getConservation", -function () { -return this.conserve; -}); -Clazz.defineMethod (c$, "setConservation", -function (c) { -this.conserve = c; -}, "jalview.analysis.Conservation"); -Clazz.defineMethod (c$, "addSequence", -function (s, recalc) { -{ -if (s != null && !this.sequences.contains (s)) { -this.sequences.add (s); -}if (recalc) { -this.recalcConservation (); -}}}, "jalview.datamodel.SequenceI,~B"); -Clazz.defineMethod (c$, "getConsPercGaps", -function () { -return this.consPercGaps; -}); -Clazz.defineMethod (c$, "setConsPercGaps", -function (consPercGaps) { -this.consPercGaps = consPercGaps; -}, "~N"); -Clazz.defineMethod (c$, "recalcConservation", -function () { -if (this.cs == null && this.consensus == null && this.conservation == null) { -return; -}try { -var cnsns = jalview.analysis.AAFrequency.calculate (this.sequences, this.startRes, this.endRes + 1, this.showSequenceLogo); -if (this.consensus != null) { -this._updateConsensusRow (cnsns, this.sequences.size ()); -}if (this.cs != null) { -this.cs.setConsensus (cnsns); -}if ((this.conservation != null) || (this.cs != null && this.cs.conservationApplied ())) { -var c = new jalview.analysis.Conservation (this.groupName, jalview.schemes.ResidueProperties.propHash, 3, this.sequences, this.startRes, this.endRes + 1); -c.calculate (); -c.verdict (false, this.consPercGaps); -if (this.conservation != null) { -this._updateConservationRow (c); -}if (this.cs != null) { -if (this.cs.conservationApplied ()) { -this.cs.setConservation (c); -}}}if (this.cs != null) { -this.cs.alignmentChanged (this.context != null ? this.context : this, null); -}} catch (err) { -if (Clazz.exceptionOf (err, OutOfMemoryError)) { -System.out.println ("Out of memory loading groups: " + err); -} else { -throw err; -} -} -}); -Clazz.defineMethod (c$, "_updateConservationRow", -($fz = function (c) { -if (this.conservation == null) { -this.getConservation (); -}this.conservation.label = "Conservation for " + this.getName (); -this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps"; -var aWidth = (this.conservation.annotations != null) ? (this.endRes < this.conservation.annotations.length ? this.conservation.annotations.length : this.endRes + 1) : this.endRes + 1; -this.conservation.annotations = null; -this.conservation.annotations = new Array (aWidth); -c.completeAnnotations (this.conservation, null, this.startRes, this.endRes + 1); -}, $fz.isPrivate = true, $fz), "jalview.analysis.Conservation"); -Clazz.defineMethod (c$, "_updateConsensusRow", -($fz = function (cnsns, nseq) { -if (this.consensus == null) { -this.getConsensus (); -}this.consensus.label = "Consensus for " + this.getName (); -this.consensus.description = "Percent Identity"; -this.consensusData = cnsns; -var aWidth = (this.consensus.annotations != null) ? (this.endRes < this.consensus.annotations.length ? this.consensus.annotations.length : this.endRes + 1) : this.endRes + 1; -this.consensus.annotations = null; -this.consensus.annotations = new Array (aWidth); -jalview.analysis.AAFrequency.completeConsensus (this.consensus, cnsns, this.startRes, this.endRes + 1, this.ignoreGapsInConsensus, this.showSequenceLogo, nseq); -}, $fz.isPrivate = true, $fz), "~A,~N"); -Clazz.defineMethod (c$, "addOrRemove", -function (s, recalc) { -{ -if (this.sequences.contains (s)) { -this.deleteSequence (s, recalc); -} else { -this.addSequence (s, recalc); -}}}, "jalview.datamodel.SequenceI,~B"); -Clazz.defineMethod (c$, "deleteSequence", -function (s, recalc) { -{ -this.sequences.remove (s); -if (recalc) { -this.recalcConservation (); -}}}, "jalview.datamodel.SequenceI,~B"); -Clazz.overrideMethod (c$, "getStartRes", -function () { -return this.startRes; -}); -Clazz.overrideMethod (c$, "getEndRes", -function () { -return this.endRes; -}); -Clazz.defineMethod (c$, "setStartRes", -function (i) { -this.startRes = i; -}, "~N"); -Clazz.defineMethod (c$, "setEndRes", -function (i) { -this.endRes = i; -}, "~N"); -Clazz.defineMethod (c$, "getSize", -function () { -return this.sequences.size (); -}); -Clazz.defineMethod (c$, "getSequenceAt", -function (i) { -return this.sequences.get (i); -}, "~N"); -Clazz.defineMethod (c$, "setColourText", -function (state) { -this.colourText = state; -}, "~B"); -Clazz.defineMethod (c$, "getColourText", -function () { -return this.colourText; -}); -Clazz.defineMethod (c$, "setDisplayText", -function (state) { -this.displayText = state; -}, "~B"); -Clazz.defineMethod (c$, "getDisplayText", -function () { -return this.displayText; -}); -Clazz.defineMethod (c$, "setDisplayBoxes", -function (state) { -this.displayBoxes = state; -}, "~B"); -Clazz.defineMethod (c$, "getDisplayBoxes", -function () { -return this.displayBoxes; -}); -Clazz.overrideMethod (c$, "getWidth", -function () { -{ -var first = true; -for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -if (first || seq.getLength () > this.width) { -this.width = seq.getLength (); -first = false; -}} -return this.width; -}}); -Clazz.defineMethod (c$, "setOutlineColour", -function (c) { -this.outlineColour = c; -}, "java.awt.Color"); -Clazz.defineMethod (c$, "getOutlineColour", -function () { -return this.outlineColour; -}); -Clazz.defineMethod (c$, "getSequencesInOrder", -function (al) { -return this.getSequencesInOrder (al, true); -}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "getSequencesInOrder", -function (al, trim) { -{ -var sSize = this.sequences.size (); -var alHeight = al.getHeight (); -var seqs = new Array ((trim) ? sSize : alHeight); -var index = 0; -for (var i = 0; i < alHeight && index < sSize; i++) { -if (this.sequences.contains (al.getSequenceAt (i))) { -seqs[(trim) ? index : i] = al.getSequenceAt (i); -index++; -}} -if (index == 0) { -return null; -}if (!trim) { -return seqs; -}if (index < seqs.length) { -var dummy = seqs; -seqs = new Array (index); -while (--index >= 0) { -seqs[index] = dummy[index]; -dummy[index] = null; -} -}return seqs; -}}, "jalview.datamodel.AlignmentI,~B"); -Clazz.defineMethod (c$, "getIdColour", -function () { -return this.idColour; -}); -Clazz.defineMethod (c$, "setIdColour", -function (idColour) { -this.idColour = idColour; -}, "java.awt.Color"); -Clazz.overrideMethod (c$, "getSeqrep", -function () { -return this.seqrep; -}); -Clazz.overrideMethod (c$, "setSeqrep", -function (seqrep) { -this.seqrep = seqrep; -}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "hasSeqrep", -function () { -return this.seqrep != null; -}); -Clazz.defineMethod (c$, "setHidereps", -function (visibility) { -this.hidereps = visibility; -}, "~B"); -Clazz.defineMethod (c$, "isHidereps", -function () { -return this.hidereps; -}); -Clazz.defineMethod (c$, "setHideCols", -function (visibility) { -this.hidecols = visibility; -}, "~B"); -Clazz.defineMethod (c$, "isHideCols", -function () { -return this.hidecols; -}); -Clazz.defineMethod (c$, "intersect", -function (alignment, map) { -var sgroup = new jalview.datamodel.SequenceGroup (this); -var insect = this.getSequencesInOrder (alignment); -sgroup.sequences = new java.util.ArrayList (); -for (var s = 0; insect != null && s < insect.length; s++) { -if (map == null || map.containsKey (insect[s])) { -sgroup.sequences.add (insect[s]); -}} -return sgroup; -}, "jalview.datamodel.AlignmentI,java.util.Map"); -Clazz.defineMethod (c$, "getShowNonconserved", -function () { -return this.showNonconserved; -}); -Clazz.defineMethod (c$, "setShowNonconserved", -function (displayNonconserved) { -this.showNonconserved = displayNonconserved; -}, "~B"); -Clazz.defineMethod (c$, "setConsensus", -function (aan) { -if (this.consensus == null) { -this.consensus = aan; -}}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "getConsensus", -function () { -var aWidth = this.getWidth (); -if (aWidth < 0) { -return null; -}if (this.consensus == null) { -this.consensus = new jalview.datamodel.AlignmentAnnotation ("", "", new Array (1), 0, 100, 1); -this.consensus.hasText = true; -this.consensus.autoCalculated = true; -this.consensus.groupRef = this; -this.consensus.label = "Consensus for " + this.getName (); -this.consensus.description = "Percent Identity"; -}return this.consensus; -}); -Clazz.defineMethod (c$, "setConservationRow", -function (aan) { -if (this.conservation == null) { -this.conservation = aan; -}}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "getConservationRow", -function () { -if (this.conservation == null) { -this.conservation = new jalview.datamodel.AlignmentAnnotation ("", "", new Array (1), 0, 11, 1); -}this.conservation.hasText = true; -this.conservation.autoCalculated = true; -this.conservation.groupRef = this; -this.conservation.label = "Conservation for " + this.getName (); -this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps"; -return this.conservation; -}); -Clazz.defineMethod (c$, "hasAnnotationRows", -function () { -return this.consensus != null || this.conservation != null; -}); -Clazz.defineMethod (c$, "getConsensusSeq", -function () { -this.getConsensus (); -var seqs = new StringBuffer (); -for (var i = 0; i < this.consensus.annotations.length; i++) { -if (this.consensus.annotations[i] != null) { -if (this.consensus.annotations[i].description.charAt (0) == '[') { -seqs.append (this.consensus.annotations[i].description.charAt (1)); -} else { -seqs.append (this.consensus.annotations[i].displayCharacter); -}}} -var sq = new jalview.datamodel.Sequence ("Group" + this.getName () + " Consensus", seqs.toString ()); -sq.setDescription ("Percentage Identity Consensus " + ((this.ignoreGapsInConsensus) ? " without gaps" : "")); -return sq; -}); -Clazz.defineMethod (c$, "setIgnoreGapsConsensus", -function (state) { -if (this.ignoreGapsInConsensus != state && this.consensus != null) { -this.ignoreGapsInConsensus = state; -this.recalcConservation (); -}this.ignoreGapsInConsensus = state; -}, "~B"); -Clazz.defineMethod (c$, "getIgnoreGapsConsensus", -function () { -return this.ignoreGapsInConsensus; -}); -Clazz.defineMethod (c$, "setshowSequenceLogo", -function (showSequenceLogo) { -if (this.showSequenceLogo != showSequenceLogo && this.consensus != null) { -this.showSequenceLogo = showSequenceLogo; -this.recalcConservation (); -}this.showSequenceLogo = showSequenceLogo; -}, "~B"); -Clazz.defineMethod (c$, "setShowConsensusHistogram", -function (showConsHist) { -if (this.showConsensusHistogram != showConsHist && this.consensus != null) { -this.showConsensusHistogram = showConsHist; -this.recalcConservation (); -}this.showConsensusHistogram = showConsHist; -}, "~B"); -Clazz.defineMethod (c$, "isShowConsensusHistogram", -function () { -return this.showConsensusHistogram; -}); -Clazz.defineMethod (c$, "setNormaliseSequenceLogo", -function (norm) { -this.normaliseSequenceLogo = norm; -}, "~B"); -Clazz.defineMethod (c$, "isNormaliseSequenceLogo", -function () { -return this.normaliseSequenceLogo; -}); -Clazz.overrideMethod (c$, "getAlignmentAnnotation", -function () { -var annot = new java.util.ArrayList (); -{ -for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -var aa = seq.getAnnotation (); -if (aa != null) { -for (var al, $al = 0, $$al = aa; $al < $$al.length && ((al = $$al[$al]) || true); $al++) { -if (al.groupRef === this) { -annot.add (al); -}} -}} -if (this.consensus != null) { -annot.add (this.consensus); -}if (this.conservation != null) { -annot.add (this.conservation); -}}return annot.toArray ( new Array (0)); -}); -Clazz.overrideMethod (c$, "findAnnotation", -function (calcId) { -var aa = new java.util.ArrayList (); -for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) { -if (a.getCalcId () === calcId) { -aa.add (a); -}} -return aa; -}, "~S"); -Clazz.overrideMethod (c$, "findAnnotations", -function (seq, calcId, label) { -var aa = new java.util.ArrayList (); -for (var ann, $ann = 0, $$ann = this.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { -if (ann.getCalcId () != null && ann.getCalcId ().equals (calcId) && ann.sequenceRef != null && ann.sequenceRef === seq && ann.label != null && ann.label.equals (label)) { -aa.add (ann); -}} -return aa; -}, "jalview.datamodel.SequenceI,~S,~S"); -Clazz.defineMethod (c$, "hasAnnotation", -function (calcId) { -if (calcId != null && !"".equals (calcId)) { -for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) { -if (a.getCalcId () === calcId) { -return true; -}} -}return false; -}, "~S"); -Clazz.defineMethod (c$, "clear", -function () { -{ -this.sequences.clear (); -}}); -Clazz.defineMethod (c$, "setContext", -function (context) { -this.context = context; -}, "jalview.datamodel.AnnotatedCollectionI"); -Clazz.overrideMethod (c$, "getContext", -function () { -return this.context; -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.AnnotatedCollectionI", "java.awt.Color", "java.util.ArrayList"], "jalview.datamodel.SequenceGroup", ["jalview.analysis.AAFrequency", "$.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.groupName = null; +this.description = null; +this.conserve = null; +this.aaFrequency = null; +this.displayBoxes = true; +this.displayText = true; +this.colourText = false; +this.showNonconserved = false; +this.sequences = null; +this.seqrep = null; +this.width = -1; +this.cs = null; +this.startRes = 0; +this.endRes = 0; +this.outlineColour = null; +this.idColour = null; +this.thresholdTextColour = 0; +this.textColour = null; +this.textColour2 = null; +this.ignoreGapsInConsensus = true; +this.showSequenceLogo = false; +this.normaliseSequenceLogo = false; +this.consPercGaps = 25; +this.consensusData = null; +this.hidereps = false; +this.hidecols = false; +this.consensus = null; +this.conservation = null; +this.showConsensusHistogram = false; +this.context = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SequenceGroup", null, jalview.datamodel.AnnotatedCollectionI); +Clazz.prepareFields (c$, function () { +this.sequences = new java.util.ArrayList (); +this.outlineColour = java.awt.Color.black; +this.textColour = java.awt.Color.black; +this.textColour2 = java.awt.Color.white; +}); +Clazz.defineMethod (c$, "isShowSequenceLogo", +function () { +return this.showSequenceLogo; +}); +Clazz.makeConstructor (c$, +function () { +this.groupName = "JGroup:" + this.hashCode (); +}); +Clazz.makeConstructor (c$, +function (sequences, groupName, scheme, displayBoxes, displayText, colourText, start, end) { +this.sequences = sequences; +this.groupName = groupName; +this.displayBoxes = displayBoxes; +this.displayText = displayText; +this.colourText = colourText; +this.cs = scheme; +this.startRes = start; +this.endRes = end; +this.recalcConservation (); +}, "java.util.List,~S,jalview.schemes.ColourSchemeI,~B,~B,~B,~N,~N"); +Clazz.makeConstructor (c$, +function (seqsel) { +if (seqsel != null) { +this.sequences = new java.util.ArrayList (); +this.sequences.addAll (seqsel.sequences); +if (seqsel.groupName != null) { +this.groupName = String.instantialize (seqsel.groupName); +}this.displayBoxes = seqsel.displayBoxes; +this.displayText = seqsel.displayText; +this.colourText = seqsel.colourText; +this.startRes = seqsel.startRes; +this.endRes = seqsel.endRes; +this.cs = seqsel.cs; +if (seqsel.description != null) { +this.description = String.instantialize (seqsel.description); +}this.hidecols = seqsel.hidecols; +this.hidereps = seqsel.hidereps; +this.idColour = seqsel.idColour; +this.outlineColour = seqsel.outlineColour; +this.seqrep = seqsel.seqrep; +this.textColour = seqsel.textColour; +this.textColour2 = seqsel.textColour2; +this.thresholdTextColour = seqsel.thresholdTextColour; +this.width = seqsel.width; +this.ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus; +if (seqsel.conserve != null) { +this.recalcConservation (); +}}}, "jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "getSelectionAsNewSequences", +function (align) { +var iSize = this.sequences.size (); +var seqs = new Array (iSize); +var inorder = this.getSequencesInOrder (align); +for (var i = 0, ipos = 0; i < inorder.length; i++) { +var seq = inorder[i]; +seqs[ipos] = seq.getSubSequence (this.startRes, this.endRes + 1); +if (seqs[ipos] != null) { +seqs[ipos].setDescription (seq.getDescription ()); +seqs[ipos].setDBRef (seq.getDBRef ()); +seqs[ipos].setSequenceFeatures (seq.getSequenceFeatures ()); +if (seq.getDatasetSequence () != null) { +seqs[ipos].setDatasetSequence (seq.getDatasetSequence ()); +}if (seq.getAnnotation () != null) { +var alann = align.getAlignmentAnnotation (); +for (var a = 0; a < seq.getAnnotation ().length; a++) { +var tocopy = seq.getAnnotation ()[a]; +if (alann != null) { +var found = false; +for (var pos = 0; pos < alann.length; pos++) { +if (alann[pos] === tocopy) { +found = true; +break; +}} +if (!found) { +continue; +}}var newannot = new jalview.datamodel.AlignmentAnnotation (seq.getAnnotation ()[a]); +newannot.restrict (this.startRes, this.endRes); +newannot.setSequenceRef (seqs[ipos]); +newannot.adjustForAlignment (); +seqs[ipos].addAlignmentAnnotation (newannot); +} +}ipos++; +} else { +iSize--; +}} +if (iSize != inorder.length) { +var nseqs = new Array (iSize); +System.arraycopy (seqs, 0, nseqs, 0, iSize); +seqs = nseqs; +}return seqs; +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "findEndRes", +function (seq) { +var eres = 0; +var ch; +for (var j = 0; j < this.endRes + 1 && j < seq.getLength (); j++) { +ch = seq.getCharAt (j); +if (!jalview.util.Comparison.isGap ((ch))) { +eres++; +}} +if (eres > 0) { +eres += seq.getStart () - 1; +}return eres; +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getSequences", +function () { +return this.sequences; +}); +Clazz.defineMethod (c$, "getSequences", +function (hiddenReps) { +if (hiddenReps == null) { +return this.sequences; +} else { +var allSequences = new java.util.ArrayList (); +for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +allSequences.add (seq); +if (hiddenReps.containsKey (seq)) { +var hsg = hiddenReps.get (seq); +for (var seq2, $seq2 = hsg.getSequences ().iterator (); $seq2.hasNext () && ((seq2 = $seq2.next ()) || true);) { +if (seq2 !== seq && !allSequences.contains (seq2)) { +allSequences.add (seq2); +}} +}} +return allSequences; +}}, "java.util.Map"); +Clazz.defineMethod (c$, "getSequencesAsArray", +function (map) { +var tmp = this.getSequences (map); +if (tmp == null) { +return null; +}return tmp.toArray ( new Array (tmp.size ())); +}, "java.util.Map"); +Clazz.defineMethod (c$, "adjustForRemoveLeft", +function (col) { +if (this.startRes >= col) { +this.startRes = this.startRes - col; +}if (this.endRes >= col) { +this.endRes = this.endRes - col; +if (this.startRes > this.endRes) { +this.startRes = 0; +}} else { +return false; +}return true; +}, "~N"); +Clazz.defineMethod (c$, "adjustForRemoveRight", +function (col) { +if (this.startRes > col) { +return false; +}if (this.endRes >= col) { +this.endRes = col; +}return true; +}, "~N"); +Clazz.defineMethod (c$, "getName", +function () { +return this.groupName; +}); +Clazz.defineMethod (c$, "getDescription", +function () { +return this.description; +}); +Clazz.defineMethod (c$, "setName", +function (name) { +this.groupName = name; +}, "~S"); +Clazz.defineMethod (c$, "setDescription", +function (desc) { +this.description = desc; +}, "~S"); +Clazz.defineMethod (c$, "getConservation", +function () { +return this.conserve; +}); +Clazz.defineMethod (c$, "setConservation", +function (c) { +this.conserve = c; +}, "jalview.analysis.Conservation"); +Clazz.defineMethod (c$, "addSequence", +function (s, recalc) { +{ +if (s != null && !this.sequences.contains (s)) { +this.sequences.add (s); +}if (recalc) { +this.recalcConservation (); +}}}, "jalview.datamodel.SequenceI,~B"); +Clazz.defineMethod (c$, "getConsPercGaps", +function () { +return this.consPercGaps; +}); +Clazz.defineMethod (c$, "setConsPercGaps", +function (consPercGaps) { +this.consPercGaps = consPercGaps; +}, "~N"); +Clazz.defineMethod (c$, "recalcConservation", +function () { +if (this.cs == null && this.consensus == null && this.conservation == null) { +return; +}try { +var cnsns = jalview.analysis.AAFrequency.calculate (this.sequences, this.startRes, this.endRes + 1, this.showSequenceLogo); +if (this.consensus != null) { +this._updateConsensusRow (cnsns, this.sequences.size ()); +}if (this.cs != null) { +this.cs.setConsensus (cnsns); +}if ((this.conservation != null) || (this.cs != null && this.cs.conservationApplied ())) { +var c = new jalview.analysis.Conservation (this.groupName, jalview.schemes.ResidueProperties.propHash, 3, this.sequences, this.startRes, this.endRes + 1); +c.calculate (); +c.verdict (false, this.consPercGaps); +if (this.conservation != null) { +this._updateConservationRow (c); +}if (this.cs != null) { +if (this.cs.conservationApplied ()) { +this.cs.setConservation (c); +}}}if (this.cs != null) { +this.cs.alignmentChanged (this.context != null ? this.context : this, null); +}} catch (err) { +if (Clazz.exceptionOf (err, OutOfMemoryError)) { +System.out.println ("Out of memory loading groups: " + err); +} else { +throw err; +} +} +}); +Clazz.defineMethod (c$, "_updateConservationRow", +($fz = function (c) { +if (this.conservation == null) { +this.getConservation (); +}this.conservation.label = "Conservation for " + this.getName (); +this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps"; +var aWidth = (this.conservation.annotations != null) ? (this.endRes < this.conservation.annotations.length ? this.conservation.annotations.length : this.endRes + 1) : this.endRes + 1; +this.conservation.annotations = null; +this.conservation.annotations = new Array (aWidth); +c.completeAnnotations (this.conservation, null, this.startRes, this.endRes + 1); +}, $fz.isPrivate = true, $fz), "jalview.analysis.Conservation"); +Clazz.defineMethod (c$, "_updateConsensusRow", +($fz = function (cnsns, nseq) { +if (this.consensus == null) { +this.getConsensus (); +}this.consensus.label = "Consensus for " + this.getName (); +this.consensus.description = "Percent Identity"; +this.consensusData = cnsns; +var aWidth = (this.consensus.annotations != null) ? (this.endRes < this.consensus.annotations.length ? this.consensus.annotations.length : this.endRes + 1) : this.endRes + 1; +this.consensus.annotations = null; +this.consensus.annotations = new Array (aWidth); +jalview.analysis.AAFrequency.completeConsensus (this.consensus, cnsns, this.startRes, this.endRes + 1, this.ignoreGapsInConsensus, this.showSequenceLogo, nseq); +}, $fz.isPrivate = true, $fz), "~A,~N"); +Clazz.defineMethod (c$, "addOrRemove", +function (s, recalc) { +{ +if (this.sequences.contains (s)) { +this.deleteSequence (s, recalc); +} else { +this.addSequence (s, recalc); +}}}, "jalview.datamodel.SequenceI,~B"); +Clazz.defineMethod (c$, "deleteSequence", +function (s, recalc) { +{ +this.sequences.remove (s); +if (recalc) { +this.recalcConservation (); +}}}, "jalview.datamodel.SequenceI,~B"); +Clazz.overrideMethod (c$, "getStartRes", +function () { +return this.startRes; +}); +Clazz.overrideMethod (c$, "getEndRes", +function () { +return this.endRes; +}); +Clazz.defineMethod (c$, "setStartRes", +function (i) { +this.startRes = i; +}, "~N"); +Clazz.defineMethod (c$, "setEndRes", +function (i) { +this.endRes = i; +}, "~N"); +Clazz.defineMethod (c$, "getSize", +function () { +return this.sequences.size (); +}); +Clazz.defineMethod (c$, "getSequenceAt", +function (i) { +return this.sequences.get (i); +}, "~N"); +Clazz.defineMethod (c$, "setColourText", +function (state) { +this.colourText = state; +}, "~B"); +Clazz.defineMethod (c$, "getColourText", +function () { +return this.colourText; +}); +Clazz.defineMethod (c$, "setDisplayText", +function (state) { +this.displayText = state; +}, "~B"); +Clazz.defineMethod (c$, "getDisplayText", +function () { +return this.displayText; +}); +Clazz.defineMethod (c$, "setDisplayBoxes", +function (state) { +this.displayBoxes = state; +}, "~B"); +Clazz.defineMethod (c$, "getDisplayBoxes", +function () { +return this.displayBoxes; +}); +Clazz.overrideMethod (c$, "getWidth", +function () { +{ +var first = true; +for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +if (first || seq.getLength () > this.width) { +this.width = seq.getLength (); +first = false; +}} +return this.width; +}}); +Clazz.defineMethod (c$, "setOutlineColour", +function (c) { +this.outlineColour = c; +}, "java.awt.Color"); +Clazz.defineMethod (c$, "getOutlineColour", +function () { +return this.outlineColour; +}); +Clazz.defineMethod (c$, "getSequencesInOrder", +function (al) { +return this.getSequencesInOrder (al, true); +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "getSequencesInOrder", +function (al, trim) { +{ +var sSize = this.sequences.size (); +var alHeight = al.getHeight (); +var seqs = new Array ((trim) ? sSize : alHeight); +var index = 0; +for (var i = 0; i < alHeight && index < sSize; i++) { +if (this.sequences.contains (al.getSequenceAt (i))) { +seqs[(trim) ? index : i] = al.getSequenceAt (i); +index++; +}} +if (index == 0) { +return null; +}if (!trim) { +return seqs; +}if (index < seqs.length) { +var dummy = seqs; +seqs = new Array (index); +while (--index >= 0) { +seqs[index] = dummy[index]; +dummy[index] = null; +} +}return seqs; +}}, "jalview.datamodel.AlignmentI,~B"); +Clazz.defineMethod (c$, "getIdColour", +function () { +return this.idColour; +}); +Clazz.defineMethod (c$, "setIdColour", +function (idColour) { +this.idColour = idColour; +}, "java.awt.Color"); +Clazz.overrideMethod (c$, "getSeqrep", +function () { +return this.seqrep; +}); +Clazz.overrideMethod (c$, "setSeqrep", +function (seqrep) { +this.seqrep = seqrep; +}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "hasSeqrep", +function () { +return this.seqrep != null; +}); +Clazz.defineMethod (c$, "setHidereps", +function (visibility) { +this.hidereps = visibility; +}, "~B"); +Clazz.defineMethod (c$, "isHidereps", +function () { +return this.hidereps; +}); +Clazz.defineMethod (c$, "setHideCols", +function (visibility) { +this.hidecols = visibility; +}, "~B"); +Clazz.defineMethod (c$, "isHideCols", +function () { +return this.hidecols; +}); +Clazz.defineMethod (c$, "intersect", +function (alignment, map) { +var sgroup = new jalview.datamodel.SequenceGroup (this); +var insect = this.getSequencesInOrder (alignment); +sgroup.sequences = new java.util.ArrayList (); +for (var s = 0; insect != null && s < insect.length; s++) { +if (map == null || map.containsKey (insect[s])) { +sgroup.sequences.add (insect[s]); +}} +return sgroup; +}, "jalview.datamodel.AlignmentI,java.util.Map"); +Clazz.defineMethod (c$, "getShowNonconserved", +function () { +return this.showNonconserved; +}); +Clazz.defineMethod (c$, "setShowNonconserved", +function (displayNonconserved) { +this.showNonconserved = displayNonconserved; +}, "~B"); +Clazz.defineMethod (c$, "setConsensus", +function (aan) { +if (this.consensus == null) { +this.consensus = aan; +}}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "getConsensus", +function () { +var aWidth = this.getWidth (); +if (aWidth < 0) { +return null; +}if (this.consensus == null) { +this.consensus = new jalview.datamodel.AlignmentAnnotation ("", "", new Array (1), 0, 100, 1); +this.consensus.hasText = true; +this.consensus.autoCalculated = true; +this.consensus.groupRef = this; +this.consensus.label = "Consensus for " + this.getName (); +this.consensus.description = "Percent Identity"; +}return this.consensus; +}); +Clazz.defineMethod (c$, "setConservationRow", +function (aan) { +if (this.conservation == null) { +this.conservation = aan; +}}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "getConservationRow", +function () { +if (this.conservation == null) { +this.conservation = new jalview.datamodel.AlignmentAnnotation ("", "", new Array (1), 0, 11, 1); +}this.conservation.hasText = true; +this.conservation.autoCalculated = true; +this.conservation.groupRef = this; +this.conservation.label = "Conservation for " + this.getName (); +this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps"; +return this.conservation; +}); +Clazz.defineMethod (c$, "hasAnnotationRows", +function () { +return this.consensus != null || this.conservation != null; +}); +Clazz.defineMethod (c$, "getConsensusSeq", +function () { +this.getConsensus (); +var seqs = new StringBuffer (); +for (var i = 0; i < this.consensus.annotations.length; i++) { +if (this.consensus.annotations[i] != null) { +if (this.consensus.annotations[i].description.charAt (0) == '[') { +seqs.append (this.consensus.annotations[i].description.charAt (1)); +} else { +seqs.append (this.consensus.annotations[i].displayCharacter); +}}} +var sq = new jalview.datamodel.Sequence ("Group" + this.getName () + " Consensus", seqs.toString ()); +sq.setDescription ("Percentage Identity Consensus " + ((this.ignoreGapsInConsensus) ? " without gaps" : "")); +return sq; +}); +Clazz.defineMethod (c$, "setIgnoreGapsConsensus", +function (state) { +if (this.ignoreGapsInConsensus != state && this.consensus != null) { +this.ignoreGapsInConsensus = state; +this.recalcConservation (); +}this.ignoreGapsInConsensus = state; +}, "~B"); +Clazz.defineMethod (c$, "getIgnoreGapsConsensus", +function () { +return this.ignoreGapsInConsensus; +}); +Clazz.defineMethod (c$, "setshowSequenceLogo", +function (showSequenceLogo) { +if (this.showSequenceLogo != showSequenceLogo && this.consensus != null) { +this.showSequenceLogo = showSequenceLogo; +this.recalcConservation (); +}this.showSequenceLogo = showSequenceLogo; +}, "~B"); +Clazz.defineMethod (c$, "setShowConsensusHistogram", +function (showConsHist) { +if (this.showConsensusHistogram != showConsHist && this.consensus != null) { +this.showConsensusHistogram = showConsHist; +this.recalcConservation (); +}this.showConsensusHistogram = showConsHist; +}, "~B"); +Clazz.defineMethod (c$, "isShowConsensusHistogram", +function () { +return this.showConsensusHistogram; +}); +Clazz.defineMethod (c$, "setNormaliseSequenceLogo", +function (norm) { +this.normaliseSequenceLogo = norm; +}, "~B"); +Clazz.defineMethod (c$, "isNormaliseSequenceLogo", +function () { +return this.normaliseSequenceLogo; +}); +Clazz.overrideMethod (c$, "getAlignmentAnnotation", +function () { +var annot = new java.util.ArrayList (); +{ +for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +var aa = seq.getAnnotation (); +if (aa != null) { +for (var al, $al = 0, $$al = aa; $al < $$al.length && ((al = $$al[$al]) || true); $al++) { +if (al.groupRef === this) { +annot.add (al); +}} +}} +if (this.consensus != null) { +annot.add (this.consensus); +}if (this.conservation != null) { +annot.add (this.conservation); +}}return annot.toArray ( new Array (0)); +}); +Clazz.overrideMethod (c$, "findAnnotation", +function (calcId) { +var aa = new java.util.ArrayList (); +for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) { +if (a.getCalcId () === calcId) { +aa.add (a); +}} +return aa; +}, "~S"); +Clazz.overrideMethod (c$, "findAnnotations", +function (seq, calcId, label) { +var aa = new java.util.ArrayList (); +for (var ann, $ann = 0, $$ann = this.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { +if (ann.getCalcId () != null && ann.getCalcId ().equals (calcId) && ann.sequenceRef != null && ann.sequenceRef === seq && ann.label != null && ann.label.equals (label)) { +aa.add (ann); +}} +return aa; +}, "jalview.datamodel.SequenceI,~S,~S"); +Clazz.defineMethod (c$, "hasAnnotation", +function (calcId) { +if (calcId != null && !"".equals (calcId)) { +for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) { +if (a.getCalcId () === calcId) { +return true; +}} +}return false; +}, "~S"); +Clazz.defineMethod (c$, "clear", +function () { +{ +this.sequences.clear (); +}}); +Clazz.defineMethod (c$, "setContext", +function (context) { +this.context = context; +}, "jalview.datamodel.AnnotatedCollectionI"); +Clazz.overrideMethod (c$, "getContext", +function () { +return this.context; +}); +}); diff --git a/bin/jalview/datamodel/SequenceI.js b/bin/jalview/datamodel/SequenceI.js index 242d5a5..dcf0724 100644 --- a/bin/jalview/datamodel/SequenceI.js +++ b/bin/jalview/datamodel/SequenceI.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.ASequenceI"], "jalview.datamodel.SequenceI", null, function () { -Clazz.declareInterface (jalview.datamodel, "SequenceI", jalview.datamodel.ASequenceI); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.ASequenceI"], "jalview.datamodel.SequenceI", null, function () { +Clazz.declareInterface (jalview.datamodel, "SequenceI", jalview.datamodel.ASequenceI); +}); diff --git a/bin/jalview/datamodel/SequenceNode.js b/bin/jalview/datamodel/SequenceNode.js index 54cb491..2069471 100644 --- a/bin/jalview/datamodel/SequenceNode.js +++ b/bin/jalview/datamodel/SequenceNode.js @@ -1,64 +1,64 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["jalview.datamodel.BinaryNode", "java.awt.Color"], "jalview.datamodel.SequenceNode", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.dist = 0; -this.count = 0; -this.height = 0; -this.ycount = 0; -this.color = null; -this.dummy = false; -this.placeholder = false; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "SequenceNode", jalview.datamodel.BinaryNode); -Clazz.prepareFields (c$, function () { -this.color = java.awt.Color.black; -}); -Clazz.makeConstructor (c$, -function (val, parent, dist, name) { -Clazz.superConstructor (this, jalview.datamodel.SequenceNode, [val, parent, name]); -this.dist = dist; -}, "~O,jalview.datamodel.SequenceNode,~N,~S"); -Clazz.makeConstructor (c$, -function (val, parent, name, dist, bootstrap, dummy) { -Clazz.superConstructor (this, jalview.datamodel.SequenceNode, [val, parent, name]); -this.dist = dist; -this.bootstrap = bootstrap; -this.dummy = dummy; -}, "~O,jalview.datamodel.SequenceNode,~S,~N,~N,~B"); -Clazz.defineMethod (c$, "isDummy", -function () { -return this.dummy; -}); -Clazz.defineMethod (c$, "isPlaceholder", -function () { -return this.placeholder; -}); -Clazz.defineMethod (c$, "setDummy", -function (newstate) { -var oldstate = this.dummy; -this.dummy = newstate; -return oldstate; -}, "~B"); -Clazz.defineMethod (c$, "setPlaceholder", -function (Placeholder) { -this.placeholder = Placeholder; -}, "~B"); -Clazz.defineMethod (c$, "AscendTree", -function () { -var c = this; -do { -c = c.parent (); -} while ((c != null) && c.dummy); -return c; -}); -Clazz.defineMethod (c$, "isSequenceLabel", -function () { -if (this.name != null && this.name.length > 0) { -for (var c = 0, s = this.name.length; c < s; c++) { -var q = this.name.charAt (c); -if ('0' <= q && q <= '9') continue; -return true; -} -}return false; -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["jalview.datamodel.BinaryNode", "java.awt.Color"], "jalview.datamodel.SequenceNode", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.dist = 0; +this.count = 0; +this.height = 0; +this.ycount = 0; +this.color = null; +this.dummy = false; +this.placeholder = false; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SequenceNode", jalview.datamodel.BinaryNode); +Clazz.prepareFields (c$, function () { +this.color = java.awt.Color.black; +}); +Clazz.makeConstructor (c$, +function (val, parent, dist, name) { +Clazz.superConstructor (this, jalview.datamodel.SequenceNode, [val, parent, name]); +this.dist = dist; +}, "~O,jalview.datamodel.SequenceNode,~N,~S"); +Clazz.makeConstructor (c$, +function (val, parent, name, dist, bootstrap, dummy) { +Clazz.superConstructor (this, jalview.datamodel.SequenceNode, [val, parent, name]); +this.dist = dist; +this.bootstrap = bootstrap; +this.dummy = dummy; +}, "~O,jalview.datamodel.SequenceNode,~S,~N,~N,~B"); +Clazz.defineMethod (c$, "isDummy", +function () { +return this.dummy; +}); +Clazz.defineMethod (c$, "isPlaceholder", +function () { +return this.placeholder; +}); +Clazz.defineMethod (c$, "setDummy", +function (newstate) { +var oldstate = this.dummy; +this.dummy = newstate; +return oldstate; +}, "~B"); +Clazz.defineMethod (c$, "setPlaceholder", +function (Placeholder) { +this.placeholder = Placeholder; +}, "~B"); +Clazz.defineMethod (c$, "AscendTree", +function () { +var c = this; +do { +c = c.parent (); +} while ((c != null) && c.dummy); +return c; +}); +Clazz.defineMethod (c$, "isSequenceLabel", +function () { +if (this.name != null && this.name.length > 0) { +for (var c = 0, s = this.name.length; c < s; c++) { +var q = this.name.charAt (c); +if ('0' <= q && q <= '9') continue; +return true; +} +}return false; +}); +}); diff --git a/bin/jalview/datamodel/SequencePoint.js b/bin/jalview/datamodel/SequencePoint.js index 0616692..549eae1 100644 --- a/bin/jalview/datamodel/SequencePoint.js +++ b/bin/jalview/datamodel/SequencePoint.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.decorateAsClass (function () { -this.isPlaceholder = false; -this.sequence = null; -this.coord = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "SequencePoint"); -Clazz.makeConstructor (c$, -function (sequence, coord) { -this.sequence = sequence; -this.coord = coord; -}, "jalview.datamodel.SequenceI,~A"); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.decorateAsClass (function () { +this.isPlaceholder = false; +this.sequence = null; +this.coord = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SequencePoint"); +Clazz.makeConstructor (c$, +function (sequence, coord) { +this.sequence = sequence; +this.coord = coord; +}, "jalview.datamodel.SequenceI,~A"); diff --git a/bin/jalview/datamodel/StructureViewerModel.js b/bin/jalview/datamodel/StructureViewerModel.js index e21d3fc..cc11e43 100644 --- a/bin/jalview/datamodel/StructureViewerModel.js +++ b/bin/jalview/datamodel/StructureViewerModel.js @@ -1,156 +1,156 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (["java.util.HashMap"], "jalview.datamodel.StructureViewerModel", ["java.util.ArrayList"], function () { -c$ = Clazz.decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.width = 0; -this.height = 0; -this.alignWithPanel = false; -this.colourWithAlignPanel = false; -this.colourByViewer = false; -this.stateData = ""; -this.viewId = null; -this.type = null; -this.fileData = null; -if (!Clazz.isClassDefined ("jalview.datamodel.StructureViewerModel.StructureData")) { -jalview.datamodel.StructureViewerModel.$StructureViewerModel$StructureData$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "StructureViewerModel"); -Clazz.prepareFields (c$, function () { -this.fileData = new java.util.HashMap (); -}); -Clazz.makeConstructor (c$, -function (x, y, width, height, alignWithPanel, colourWithAlignPanel, colourByViewer, viewId, type) { -this.x = x; -this.y = y; -this.width = width; -this.height = height; -this.alignWithPanel = alignWithPanel; -this.colourWithAlignPanel = colourWithAlignPanel; -this.colourByViewer = colourByViewer; -this.viewId = viewId; -this.type = type; -}, "~N,~N,~N,~N,~B,~B,~B,~S,~S"); -Clazz.defineMethod (c$, "getX", -function () { -return this.x; -}); -Clazz.defineMethod (c$, "setX", -function (x) { -this.x = x; -}, "~N"); -Clazz.defineMethod (c$, "getY", -function () { -return this.y; -}); -Clazz.defineMethod (c$, "setY", -function (y) { -this.y = y; -}, "~N"); -Clazz.defineMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz.defineMethod (c$, "setWidth", -function (width) { -this.width = width; -}, "~N"); -Clazz.defineMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz.defineMethod (c$, "setHeight", -function (height) { -this.height = height; -}, "~N"); -Clazz.defineMethod (c$, "isAlignWithPanel", -function () { -return this.alignWithPanel; -}); -Clazz.defineMethod (c$, "setAlignWithPanel", -function (alignWithPanel) { -this.alignWithPanel = alignWithPanel; -}, "~B"); -Clazz.defineMethod (c$, "isColourWithAlignPanel", -function () { -return this.colourWithAlignPanel; -}); -Clazz.defineMethod (c$, "setColourWithAlignPanel", -function (colourWithAlignPanel) { -this.colourWithAlignPanel = colourWithAlignPanel; -}, "~B"); -Clazz.defineMethod (c$, "isColourByViewer", -function () { -return this.colourByViewer; -}); -Clazz.defineMethod (c$, "setColourByViewer", -function (colourByViewer) { -this.colourByViewer = colourByViewer; -}, "~B"); -Clazz.defineMethod (c$, "getStateData", -function () { -return this.stateData; -}); -Clazz.defineMethod (c$, "setStateData", -function (stateData) { -this.stateData = stateData; -}, "~S"); -Clazz.defineMethod (c$, "getFileData", -function () { -return this.fileData; -}); -Clazz.defineMethod (c$, "setFileData", -function (fileData) { -this.fileData = fileData; -}, "java.util.Map"); -Clazz.defineMethod (c$, "getViewId", -function () { -return this.viewId; -}); -Clazz.defineMethod (c$, "getType", -function () { -return this.type; -}); -c$.$StructureViewerModel$StructureData$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.filePath = null; -this.pdbId = null; -this.seqList = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel.StructureViewerModel, "StructureData"); -Clazz.makeConstructor (c$, -function (a, b) { -this.filePath = a; -this.pdbId = b; -this.seqList = new java.util.ArrayList (); -}, "~S,~S"); -Clazz.defineMethod (c$, "getFilePath", -function () { -return this.filePath; -}); -Clazz.defineMethod (c$, "setFilePath", -function (a) { -this.filePath = a; -}, "~S"); -Clazz.defineMethod (c$, "getPdbId", -function () { -return this.pdbId; -}); -Clazz.defineMethod (c$, "setPdbId", -function (a) { -this.pdbId = a; -}, "~S"); -Clazz.defineMethod (c$, "getSeqList", -function () { -return this.seqList; -}); -Clazz.defineMethod (c$, "setSeqList", -function (a) { -this.seqList = a; -}, "java.util.List"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (["java.util.HashMap"], "jalview.datamodel.StructureViewerModel", ["java.util.ArrayList"], function () { +c$ = Clazz.decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.width = 0; +this.height = 0; +this.alignWithPanel = false; +this.colourWithAlignPanel = false; +this.colourByViewer = false; +this.stateData = ""; +this.viewId = null; +this.type = null; +this.fileData = null; +if (!Clazz.isClassDefined ("jalview.datamodel.StructureViewerModel.StructureData")) { +jalview.datamodel.StructureViewerModel.$StructureViewerModel$StructureData$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "StructureViewerModel"); +Clazz.prepareFields (c$, function () { +this.fileData = new java.util.HashMap (); +}); +Clazz.makeConstructor (c$, +function (x, y, width, height, alignWithPanel, colourWithAlignPanel, colourByViewer, viewId, type) { +this.x = x; +this.y = y; +this.width = width; +this.height = height; +this.alignWithPanel = alignWithPanel; +this.colourWithAlignPanel = colourWithAlignPanel; +this.colourByViewer = colourByViewer; +this.viewId = viewId; +this.type = type; +}, "~N,~N,~N,~N,~B,~B,~B,~S,~S"); +Clazz.defineMethod (c$, "getX", +function () { +return this.x; +}); +Clazz.defineMethod (c$, "setX", +function (x) { +this.x = x; +}, "~N"); +Clazz.defineMethod (c$, "getY", +function () { +return this.y; +}); +Clazz.defineMethod (c$, "setY", +function (y) { +this.y = y; +}, "~N"); +Clazz.defineMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz.defineMethod (c$, "setWidth", +function (width) { +this.width = width; +}, "~N"); +Clazz.defineMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz.defineMethod (c$, "setHeight", +function (height) { +this.height = height; +}, "~N"); +Clazz.defineMethod (c$, "isAlignWithPanel", +function () { +return this.alignWithPanel; +}); +Clazz.defineMethod (c$, "setAlignWithPanel", +function (alignWithPanel) { +this.alignWithPanel = alignWithPanel; +}, "~B"); +Clazz.defineMethod (c$, "isColourWithAlignPanel", +function () { +return this.colourWithAlignPanel; +}); +Clazz.defineMethod (c$, "setColourWithAlignPanel", +function (colourWithAlignPanel) { +this.colourWithAlignPanel = colourWithAlignPanel; +}, "~B"); +Clazz.defineMethod (c$, "isColourByViewer", +function () { +return this.colourByViewer; +}); +Clazz.defineMethod (c$, "setColourByViewer", +function (colourByViewer) { +this.colourByViewer = colourByViewer; +}, "~B"); +Clazz.defineMethod (c$, "getStateData", +function () { +return this.stateData; +}); +Clazz.defineMethod (c$, "setStateData", +function (stateData) { +this.stateData = stateData; +}, "~S"); +Clazz.defineMethod (c$, "getFileData", +function () { +return this.fileData; +}); +Clazz.defineMethod (c$, "setFileData", +function (fileData) { +this.fileData = fileData; +}, "java.util.Map"); +Clazz.defineMethod (c$, "getViewId", +function () { +return this.viewId; +}); +Clazz.defineMethod (c$, "getType", +function () { +return this.type; +}); +c$.$StructureViewerModel$StructureData$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.filePath = null; +this.pdbId = null; +this.seqList = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel.StructureViewerModel, "StructureData"); +Clazz.makeConstructor (c$, +function (a, b) { +this.filePath = a; +this.pdbId = b; +this.seqList = new java.util.ArrayList (); +}, "~S,~S"); +Clazz.defineMethod (c$, "getFilePath", +function () { +return this.filePath; +}); +Clazz.defineMethod (c$, "setFilePath", +function (a) { +this.filePath = a; +}, "~S"); +Clazz.defineMethod (c$, "getPdbId", +function () { +return this.pdbId; +}); +Clazz.defineMethod (c$, "setPdbId", +function (a) { +this.pdbId = a; +}, "~S"); +Clazz.defineMethod (c$, "getSeqList", +function () { +return this.seqList; +}); +Clazz.defineMethod (c$, "setSeqList", +function (a) { +this.seqList = a; +}, "java.util.List"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/datamodel/UniprotEntry.js b/bin/jalview/datamodel/UniprotEntry.js index 24b3ce2..5b80f48 100644 --- a/bin/jalview/datamodel/UniprotEntry.js +++ b/bin/jalview/datamodel/UniprotEntry.js @@ -1,58 +1,58 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.decorateAsClass (function () { -this.sequence = null; -this.name = null; -this.accession = null; -this.feature = null; -this.dbrefs = null; -this.protName = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "UniprotEntry"); -Clazz.defineMethod (c$, "setAccession", -function (items) { -this.accession = items; -}, "java.util.Vector"); -Clazz.defineMethod (c$, "setFeature", -function (items) { -this.feature = items; -}, "java.util.Vector"); -Clazz.defineMethod (c$, "getFeature", -function () { -return this.feature; -}); -Clazz.defineMethod (c$, "getAccession", -function () { -return this.accession; -}); -Clazz.defineMethod (c$, "setProtein", -function (names) { -this.protName = names; -}, "jalview.datamodel.UniprotProteinName"); -Clazz.defineMethod (c$, "getProtein", -function () { -return this.protName; -}); -Clazz.defineMethod (c$, "setName", -function (na) { -this.name = na; -}, "java.util.Vector"); -Clazz.defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz.defineMethod (c$, "getUniprotSequence", -function () { -return this.sequence; -}); -Clazz.defineMethod (c$, "setUniprotSequence", -function (seq) { -this.sequence = seq; -}, "jalview.datamodel.UniprotSequence"); -Clazz.defineMethod (c$, "getDbReference", -function () { -return this.dbrefs; -}); -Clazz.defineMethod (c$, "setDbReference", -function (dbref) { -this.dbrefs = dbref; -}, "java.util.Vector"); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.decorateAsClass (function () { +this.sequence = null; +this.name = null; +this.accession = null; +this.feature = null; +this.dbrefs = null; +this.protName = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "UniprotEntry"); +Clazz.defineMethod (c$, "setAccession", +function (items) { +this.accession = items; +}, "java.util.Vector"); +Clazz.defineMethod (c$, "setFeature", +function (items) { +this.feature = items; +}, "java.util.Vector"); +Clazz.defineMethod (c$, "getFeature", +function () { +return this.feature; +}); +Clazz.defineMethod (c$, "getAccession", +function () { +return this.accession; +}); +Clazz.defineMethod (c$, "setProtein", +function (names) { +this.protName = names; +}, "jalview.datamodel.UniprotProteinName"); +Clazz.defineMethod (c$, "getProtein", +function () { +return this.protName; +}); +Clazz.defineMethod (c$, "setName", +function (na) { +this.name = na; +}, "java.util.Vector"); +Clazz.defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz.defineMethod (c$, "getUniprotSequence", +function () { +return this.sequence; +}); +Clazz.defineMethod (c$, "setUniprotSequence", +function (seq) { +this.sequence = seq; +}, "jalview.datamodel.UniprotSequence"); +Clazz.defineMethod (c$, "getDbReference", +function () { +return this.dbrefs; +}); +Clazz.defineMethod (c$, "setDbReference", +function (dbref) { +this.dbrefs = dbref; +}, "java.util.Vector"); diff --git a/bin/jalview/datamodel/UniprotFile.js b/bin/jalview/datamodel/UniprotFile.js index f779f79..e0f80f8 100644 --- a/bin/jalview/datamodel/UniprotFile.js +++ b/bin/jalview/datamodel/UniprotFile.js @@ -1,13 +1,13 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.decorateAsClass (function () { -this._items = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "UniprotFile"); -Clazz.defineMethod (c$, "setUniprotEntries", -function (items) { -this._items = items; -}, "java.util.Vector"); -Clazz.defineMethod (c$, "getUniprotEntries", -function () { -return this._items; -}); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.decorateAsClass (function () { +this._items = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "UniprotFile"); +Clazz.defineMethod (c$, "setUniprotEntries", +function (items) { +this._items = items; +}, "java.util.Vector"); +Clazz.defineMethod (c$, "getUniprotEntries", +function () { +return this._items; +}); diff --git a/bin/jalview/datamodel/UniprotProteinName.js b/bin/jalview/datamodel/UniprotProteinName.js index fd4ce5b..931e26c 100644 --- a/bin/jalview/datamodel/UniprotProteinName.js +++ b/bin/jalview/datamodel/UniprotProteinName.js @@ -1,13 +1,13 @@ -Clazz.declarePackage ("jalview.datamodel"); -c$ = Clazz.decorateAsClass (function () { -this.names = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "UniprotProteinName"); -Clazz.defineMethod (c$, "setName", -function (names) { -this.names = names; -}, "java.util.Vector"); -Clazz.defineMethod (c$, "getName", -function () { -return this.names; -}); +Clazz.declarePackage ("jalview.datamodel"); +c$ = Clazz.decorateAsClass (function () { +this.names = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "UniprotProteinName"); +Clazz.defineMethod (c$, "setName", +function (names) { +this.names = names; +}, "java.util.Vector"); +Clazz.defineMethod (c$, "getName", +function () { +return this.names; +}); diff --git a/bin/jalview/datamodel/UniprotSequence.js b/bin/jalview/datamodel/UniprotSequence.js index 039f1db..d6ae549 100644 --- a/bin/jalview/datamodel/UniprotSequence.js +++ b/bin/jalview/datamodel/UniprotSequence.js @@ -1,21 +1,21 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.UniprotSequence", ["java.lang.StringBuilder"], function () { -c$ = Clazz.decorateAsClass (function () { -this._content = ""; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "UniprotSequence"); -Clazz.defineMethod (c$, "setContent", -function (seq) { -if (seq != null) { -var sb = new StringBuilder (seq.length); -for (var i = 0; i < seq.length; i++) { -if (seq.charAt (i) != ' ') { -sb.append (seq.charAt (i)); -}} -this._content = sb.toString (); -}}, "~S"); -Clazz.defineMethod (c$, "getContent", -function () { -return this._content; -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.UniprotSequence", ["java.lang.StringBuilder"], function () { +c$ = Clazz.decorateAsClass (function () { +this._content = ""; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "UniprotSequence"); +Clazz.defineMethod (c$, "setContent", +function (seq) { +if (seq != null) { +var sb = new StringBuilder (seq.length); +for (var i = 0; i < seq.length; i++) { +if (seq.charAt (i) != ' ') { +sb.append (seq.charAt (i)); +}} +this._content = sb.toString (); +}}, "~S"); +Clazz.defineMethod (c$, "getContent", +function () { +return this._content; +}); +}); diff --git a/bin/jalview/ext/jmol/JmolCommands.class b/bin/jalview/ext/jmol/JmolCommands.class index 5debe8db5e968bb61304a3d53794be9890ac6665..36f4b3f4c1991dc1021435eecf267f58a50cb60d 100644 GIT binary patch delta 53 zcmaE<@mynrEidEA&33$2Ec|^8B7Yh9*%<^F|1)SY@J#+7BsSSVh>MAVVe%@$Bqk-s J&HO@9OaP|G4ZHvV delta 51 zcmaE^@ls=hEidEg&33$2Ec_D~#Qrkyvoi=V{%25U;F%mKq`=I;z%+TKU=p)DBhzMH Hp(rK*dCd$< diff --git a/bin/jalview/ext/jmol/JmolCommands.js b/bin/jalview/ext/jmol/JmolCommands.js index 495572c..b08a4e3 100644 --- a/bin/jalview/ext/jmol/JmolCommands.js +++ b/bin/jalview/ext/jmol/JmolCommands.js @@ -1,69 +1,69 @@ -Clazz.declarePackage ("jalview.ext.jmol"); -Clazz.load (null, "jalview.ext.jmol.JmolCommands", ["jalview.structure.StructureMappingcommandSet", "jalview.util.Comparison", "java.lang.StringBuffer", "java.util.ArrayList"], function () { -c$ = Clazz.declareType (jalview.ext.jmol, "JmolCommands"); -c$.getColourBySequenceCommand = Clazz.defineMethod (c$, "getColourBySequenceCommand", -function (ssm, files, sequence, sr, fr, alignment) { -var cset = new java.util.ArrayList (); -for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { -var mapping = ssm.getMapping (files[pdbfnum]); -var command = new StringBuffer (); -var smc; -var str = new java.util.ArrayList (); -if (mapping == null || mapping.length < 1) { -continue; -}var lastPos = -1; -for (var s = 0; s < sequence[pdbfnum].length; s++) { -for (var sp, m = 0; m < mapping.length; m++) { -if (mapping[m].getSequence () === sequence[pdbfnum][s] && (sp = alignment.findIndex (sequence[pdbfnum][s])) > -1) { -var asp = alignment.getSequenceAt (sp); -for (var r = 0; r < asp.getLength (); r++) { -if (jalview.util.Comparison.isGap (asp.getCharAt (r))) { -continue; -}var pos = mapping[m].getPDBResNum (asp.findPosition (r)); -if (pos < 1 || pos == lastPos) { -continue; -}lastPos = pos; -var col = sr.getResidueBoxColour (sequence[pdbfnum][s], r); -if (fr != null) { -col = fr.findFeatureColour (col, sequence[pdbfnum][s], r); -}var newSelcom = (mapping[m].getChain () !== " " ? ":" + mapping[m].getChain () : "") + "/" + (pdbfnum + 1) + ".1" + ";color[" + col.getRed () + "," + col.getGreen () + "," + col.getBlue () + "]"; -if (command.length () > newSelcom.length && command.substring (command.length () - newSelcom.length).equals (newSelcom)) { -command = jalview.ext.jmol.JmolCommands.condenseCommand (command, pos); -continue; -}command.append (";"); -if (command.length () > 51200) { -str.add (command.toString ()); -command.setLength (0); -}command.append ("select " + pos); -command.append (newSelcom); -} -break; -}} -} -{ -str.add (command.toString ()); -command.setLength (0); -}cset.add ( new jalview.structure.StructureMappingcommandSet (jalview.ext.jmol.JmolCommands, files[pdbfnum], str.toArray ( new Array (str.size ())))); -} -return cset.toArray ( new Array (cset.size ())); -}, "jalview.structure.StructureSelectionManager,~A,~A,jalview.api.SequenceRenderer,jalview.api.FeatureRenderer,jalview.datamodel.AlignmentI"); -c$.condenseCommand = Clazz.defineMethod (c$, "condenseCommand", -function (command, pos) { -var p = command.length (); -var q = p; -do { -p -= 6; -if (p < 1) { -p = 0; -};} while ((q = command.indexOf ("select", p)) == -1 && p > 0); -var sb = new StringBuffer (command.substring (0, q + 7)); -command = command.$delete (0, q + 7); -var start; -if (command.indexOf ("-") > -1) { -start = command.substring (0, command.indexOf ("-")); -} else { -start = command.substring (0, command.indexOf (":")); -}sb.append (start + "-" + pos + command.substring (command.indexOf (":"))); -return sb; -}, "StringBuffer,~N"); -}); +Clazz.declarePackage ("jalview.ext.jmol"); +Clazz.load (null, "jalview.ext.jmol.JmolCommands", ["jalview.structure.StructureMappingcommandSet", "jalview.util.Comparison", "java.lang.StringBuffer", "java.util.ArrayList"], function () { +c$ = Clazz.declareType (jalview.ext.jmol, "JmolCommands"); +c$.getColourBySequenceCommand = Clazz.defineMethod (c$, "getColourBySequenceCommand", +function (ssm, files, sequence, sr, fr, alignment) { +var cset = new java.util.ArrayList (); +for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { +var mapping = ssm.getMapping (files[pdbfnum]); +var command = new StringBuffer (); +var smc; +var str = new java.util.ArrayList (); +if (mapping == null || mapping.length < 1) { +continue; +}var lastPos = -1; +for (var s = 0; s < sequence[pdbfnum].length; s++) { +for (var sp, m = 0; m < mapping.length; m++) { +if (mapping[m].getSequence () === sequence[pdbfnum][s] && (sp = alignment.findIndex (sequence[pdbfnum][s])) > -1) { +var asp = alignment.getSequenceAt (sp); +for (var r = 0; r < asp.getLength (); r++) { +if (jalview.util.Comparison.isGap (asp.getCharAt (r))) { +continue; +}var pos = mapping[m].getPDBResNum (asp.findPosition (r)); +if (pos < 1 || pos == lastPos) { +continue; +}lastPos = pos; +var col = sr.getResidueBoxColour (sequence[pdbfnum][s], r); +if (fr != null) { +col = fr.findFeatureColour (col, sequence[pdbfnum][s], r); +}var newSelcom = (mapping[m].getChain () !== " " ? ":" + mapping[m].getChain () : "") + "/" + (pdbfnum + 1) + ".1" + ";color[" + col.getRed () + "," + col.getGreen () + "," + col.getBlue () + "]"; +if (command.length () > newSelcom.length && command.substring (command.length () - newSelcom.length).equals (newSelcom)) { +command = jalview.ext.jmol.JmolCommands.condenseCommand (command, pos); +continue; +}command.append (";"); +if (command.length () > 51200) { +str.add (command.toString ()); +command.setLength (0); +}command.append ("select " + pos); +command.append (newSelcom); +} +break; +}} +} +{ +str.add (command.toString ()); +command.setLength (0); +}cset.add ( new jalview.structure.StructureMappingcommandSet (jalview.ext.jmol.JmolCommands, files[pdbfnum], str.toArray ( new Array (str.size ())))); +} +return cset.toArray ( new Array (cset.size ())); +}, "jalview.structure.StructureSelectionManager,~A,~A,jalview.api.SequenceRenderer,jalview.api.FeatureRenderer,jalview.datamodel.AlignmentI"); +c$.condenseCommand = Clazz.defineMethod (c$, "condenseCommand", +function (command, pos) { +var p = command.length (); +var q = p; +do { +p -= 6; +if (p < 1) { +p = 0; +};} while ((q = command.indexOf ("select", p)) == -1 && p > 0); +var sb = new StringBuffer (command.substring (0, q + 7)); +command = command.$delete (0, q + 7); +var start; +if (command.indexOf ("-") > -1) { +start = command.substring (0, command.indexOf ("-")); +} else { +start = command.substring (0, command.indexOf (":")); +}sb.append (start + "-" + pos + command.substring (command.indexOf (":"))); +return sb; +}, "StringBuffer,~N"); +}); diff --git a/bin/jalview/ext/varna/JalviewVarnaBinding.js b/bin/jalview/ext/varna/JalviewVarnaBinding.js index f8bdf18..61bd3e7 100644 --- a/bin/jalview/ext/varna/JalviewVarnaBinding.js +++ b/bin/jalview/ext/varna/JalviewVarnaBinding.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.ext.varna"); -Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.structure.StructureListener", "jalview.structures.models.SequenceStructureBindingModel", "java.awt.event.ComponentListener"], "jalview.ext.varna.JalviewVarnaBinding", null, function () { -c$ = Clazz.declareType (jalview.ext.varna, "JalviewVarnaBinding", jalview.structures.models.SequenceStructureBindingModel, [jalview.structure.StructureListener, java.awt.event.ComponentListener, jalview.api.StructureSelectionManagerProvider]); -}); +Clazz.declarePackage ("jalview.ext.varna"); +Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.structure.StructureListener", "jalview.structures.models.SequenceStructureBindingModel", "java.awt.event.ComponentListener"], "jalview.ext.varna.JalviewVarnaBinding", null, function () { +c$ = Clazz.declareType (jalview.ext.varna, "JalviewVarnaBinding", jalview.structures.models.SequenceStructureBindingModel, [jalview.structure.StructureListener, java.awt.event.ComponentListener, jalview.api.StructureSelectionManagerProvider]); +}); diff --git a/bin/jalview/ext/varna/RnaModel.js b/bin/jalview/ext/varna/RnaModel.js index 9916e8e..f125256 100644 --- a/bin/jalview/ext/varna/RnaModel.js +++ b/bin/jalview/ext/varna/RnaModel.js @@ -1,17 +1,17 @@ -Clazz.declarePackage ("jalview.ext.varna"); -c$ = Clazz.decorateAsClass (function () { -this.title = null; -this.ann = null; -this.seq = null; -this.gapped = false; -this.rna = null; -Clazz.instantialize (this, arguments); -}, jalview.ext.varna, "RnaModel"); -Clazz.makeConstructor (c$, -function (t, aa, s, r, g) { -this.title = t; -this.ann = aa; -this.seq = s; -this.rna = r; -this.gapped = g; -}, "~S,jalview.datamodel.AlignmentAnnotation,jalview.datamodel.SequenceI,fr.orsay.lri.varna.models.rna.RNA,~B"); +Clazz.declarePackage ("jalview.ext.varna"); +c$ = Clazz.decorateAsClass (function () { +this.title = null; +this.ann = null; +this.seq = null; +this.gapped = false; +this.rna = null; +Clazz.instantialize (this, arguments); +}, jalview.ext.varna, "RnaModel"); +Clazz.makeConstructor (c$, +function (t, aa, s, r, g) { +this.title = t; +this.ann = aa; +this.seq = s; +this.rna = r; +this.gapped = g; +}, "~S,jalview.datamodel.AlignmentAnnotation,jalview.datamodel.SequenceI,fr.orsay.lri.varna.models.rna.RNA,~B"); diff --git a/bin/jalview/ext/varna/VarnaCommands.class b/bin/jalview/ext/varna/VarnaCommands.class index 7a0d88ffafdbe8ab137ff09f63003b25e2f799e2..27a2330ebde8b4427e67fa7ff0e1773236622921 100644 GIT binary patch delta 46 zcmdn0x>$L diff --git a/bin/jalview/ext/varna/VarnaCommands.js b/bin/jalview/ext/varna/VarnaCommands.js index b609d09..6562f80 100644 --- a/bin/jalview/ext/varna/VarnaCommands.js +++ b/bin/jalview/ext/varna/VarnaCommands.js @@ -1,66 +1,66 @@ -Clazz.declarePackage ("jalview.ext.varna"); -Clazz.load (null, "jalview.ext.varna.VarnaCommands", ["jalview.util.Comparison", "java.lang.StringBuffer", "java.util.ArrayList"], function () { -c$ = Clazz.declareType (jalview.ext.varna, "VarnaCommands"); -c$.getColourBySequenceCommand = Clazz.defineMethod (c$, "getColourBySequenceCommand", -function (ssm, files, sequence, sr, fr, alignment) { -var str = new java.util.ArrayList (); -var command = new StringBuffer (); -for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { -var mapping = ssm.getMapping (files[pdbfnum]); -if (mapping == null || mapping.length < 1) { -continue; -}var lastPos = -1; -for (var s = 0; s < sequence[pdbfnum].length; s++) { -for (var sp, m = 0; m < mapping.length; m++) { -if (mapping[m].getSequence () === sequence[pdbfnum][s] && (sp = alignment.findIndex (sequence[pdbfnum][s])) > -1) { -var asp = alignment.getSequenceAt (sp); -for (var r = 0; r < asp.getLength (); r++) { -if (jalview.util.Comparison.isGap (asp.getCharAt (r))) { -continue; -}var pos = mapping[m].getPDBResNum (asp.findPosition (r)); -if (pos < 1 || pos == lastPos) { -continue; -}lastPos = pos; -var col = sr.getResidueBoxColour (sequence[pdbfnum][s], r); -if (fr != null) { -col = fr.findFeatureColour (col, sequence[pdbfnum][s], r); -}var newSelcom = (mapping[m].getChain () !== " " ? ":" + mapping[m].getChain () : "") + "/" + (pdbfnum + 1) + ".1" + ";color[" + col.getRed () + "," + col.getGreen () + "," + col.getBlue () + "]"; -if (command.length () > newSelcom.length && command.substring (command.length () - newSelcom.length).equals (newSelcom)) { -command = jalview.ext.varna.VarnaCommands.condenseCommand (command, pos); -continue; -}command.append (";"); -if (command.length () > 51200) { -str.add (command.toString ()); -command.setLength (0); -}command.append ("select " + pos); -command.append (newSelcom); -} -break; -}} -} -} -{ -str.add (command.toString ()); -command.setLength (0); -}return str.toArray ( new Array (str.size ())); -}, "jalview.structure.StructureSelectionManager,~A,~A,jalview.api.SequenceRenderer,jalview.api.FeatureRenderer,jalview.datamodel.AlignmentI"); -c$.condenseCommand = Clazz.defineMethod (c$, "condenseCommand", -function (command, pos) { -var p = command.length (); -var q = p; -do { -p -= 6; -if (p < 1) { -p = 0; -};} while ((q = command.indexOf ("select", p)) == -1 && p > 0); -var sb = new StringBuffer (command.substring (0, q + 7)); -command = command.$delete (0, q + 7); -var start; -if (command.indexOf ("-") > -1) { -start = command.substring (0, command.indexOf ("-")); -} else { -start = command.substring (0, command.indexOf (":")); -}sb.append (start + "-" + pos + command.substring (command.indexOf (":"))); -return sb; -}, "StringBuffer,~N"); -}); +Clazz.declarePackage ("jalview.ext.varna"); +Clazz.load (null, "jalview.ext.varna.VarnaCommands", ["jalview.util.Comparison", "java.lang.StringBuffer", "java.util.ArrayList"], function () { +c$ = Clazz.declareType (jalview.ext.varna, "VarnaCommands"); +c$.getColourBySequenceCommand = Clazz.defineMethod (c$, "getColourBySequenceCommand", +function (ssm, files, sequence, sr, fr, alignment) { +var str = new java.util.ArrayList (); +var command = new StringBuffer (); +for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { +var mapping = ssm.getMapping (files[pdbfnum]); +if (mapping == null || mapping.length < 1) { +continue; +}var lastPos = -1; +for (var s = 0; s < sequence[pdbfnum].length; s++) { +for (var sp, m = 0; m < mapping.length; m++) { +if (mapping[m].getSequence () === sequence[pdbfnum][s] && (sp = alignment.findIndex (sequence[pdbfnum][s])) > -1) { +var asp = alignment.getSequenceAt (sp); +for (var r = 0; r < asp.getLength (); r++) { +if (jalview.util.Comparison.isGap (asp.getCharAt (r))) { +continue; +}var pos = mapping[m].getPDBResNum (asp.findPosition (r)); +if (pos < 1 || pos == lastPos) { +continue; +}lastPos = pos; +var col = sr.getResidueBoxColour (sequence[pdbfnum][s], r); +if (fr != null) { +col = fr.findFeatureColour (col, sequence[pdbfnum][s], r); +}var newSelcom = (mapping[m].getChain () !== " " ? ":" + mapping[m].getChain () : "") + "/" + (pdbfnum + 1) + ".1" + ";color[" + col.getRed () + "," + col.getGreen () + "," + col.getBlue () + "]"; +if (command.length () > newSelcom.length && command.substring (command.length () - newSelcom.length).equals (newSelcom)) { +command = jalview.ext.varna.VarnaCommands.condenseCommand (command, pos); +continue; +}command.append (";"); +if (command.length () > 51200) { +str.add (command.toString ()); +command.setLength (0); +}command.append ("select " + pos); +command.append (newSelcom); +} +break; +}} +} +} +{ +str.add (command.toString ()); +command.setLength (0); +}return str.toArray ( new Array (str.size ())); +}, "jalview.structure.StructureSelectionManager,~A,~A,jalview.api.SequenceRenderer,jalview.api.FeatureRenderer,jalview.datamodel.AlignmentI"); +c$.condenseCommand = Clazz.defineMethod (c$, "condenseCommand", +function (command, pos) { +var p = command.length (); +var q = p; +do { +p -= 6; +if (p < 1) { +p = 0; +};} while ((q = command.indexOf ("select", p)) == -1 && p > 0); +var sb = new StringBuffer (command.substring (0, q + 7)); +command = command.$delete (0, q + 7); +var start; +if (command.indexOf ("-") > -1) { +start = command.substring (0, command.indexOf ("-")); +} else { +start = command.substring (0, command.indexOf (":")); +}sb.append (start + "-" + pos + command.substring (command.indexOf (":"))); +return sb; +}, "StringBuffer,~N"); +}); diff --git a/bin/jalview/io/AlignFile.js b/bin/jalview/io/AlignFile.js index f3247de..142c507 100644 --- a/bin/jalview/io/AlignFile.js +++ b/bin/jalview/io/AlignFile.js @@ -1,158 +1,158 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["jalview.io.FileParse"], "jalview.io.AlignFile", ["jalview.datamodel.Sequence", "jalview.util.MessageManager", "java.io.IOException", "java.lang.Error", "java.util.ArrayList", "$.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.noSeqs = 0; -this.maxLength = 0; -this.seqs = null; -this.annotations = null; -this.seqGroups = null; -this.properties = null; -this.start = 0; -this.end = 0; -this.jvSuffix = true; -this.parseCalled = false; -this.newickStrings = null; -Clazz.instantialize (this, arguments); -}, jalview.io, "AlignFile", jalview.io.FileParse); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.io.AlignFile, []); -this.initData (); -}); -Clazz.makeConstructor (c$, -function (inFile, type) { -this.construct (true, inFile, type); -}, "~S,~S"); -Clazz.makeConstructor (c$, -function (parseImmediately, inFile, type) { -Clazz.superConstructor (this, jalview.io.AlignFile, [inFile, type]); -this.initData (); -if (parseImmediately) { -this.doParse (); -}}, "~B,~S,~S"); -Clazz.makeConstructor (c$, -function (source) { -this.construct (true, source); -}, "jalview.io.FileParse"); -Clazz.makeConstructor (c$, -function (parseImmediately, source) { -Clazz.superConstructor (this, jalview.io.AlignFile, [source]); -this.initData (); -if (parseImmediately) { -this.doParse (); -}}, "~B,jalview.io.FileParse"); -Clazz.defineMethod (c$, "doParse", -function () { -if (this.parseCalled) { -throw new java.io.IOException ("Implementation error: Parser called twice for same data.\nNeed to call initData() again before parsing can be reattempted."); -}this.parseCalled = true; -this.parse (); -for (var i = 0, c = this.seqs.size (); i < c; i++) { -this.seqs.get (i).setIndex (i); -} -}); -Clazz.defineMethod (c$, "getSeqs", -function () { -return this.seqs; -}); -Clazz.defineMethod (c$, "getSeqGroups", -function () { -return this.seqGroups; -}); -Clazz.defineMethod (c$, "getSeqsAsArray", -function () { -var s = new Array (this.seqs.size ()); -for (var i = 0; i < this.seqs.size (); i++) { -s[i] = this.seqs.elementAt (i); -} -return s; -}); -Clazz.defineMethod (c$, "addAnnotations", -function (al) { -this.addProperties (al); -for (var i = 0; i < this.annotations.size (); i++) { -var an = this.annotations.elementAt (i); -an.validateRangeAndDisplay (); -al.addAnnotation (an); -} -}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "addSeqGroups", -function (al) { -this.seqGroups = al.getGroups (); -}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "addProperties", -function (al) { -if (this.properties != null && this.properties.size () > 0) { -var keys = this.properties.keys (); -var vals = this.properties.elements (); -while (keys.hasMoreElements ()) { -al.setProperty (keys.nextElement (), vals.nextElement ()); -} -}}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "setAlignmentProperty", -function (key, value) { -if (key == null) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_cannot_have_null_alignment")); -}if (value == null) { -return; -}if (this.properties == null) { -this.properties = new java.util.Hashtable (); -}this.properties.put (key, value); -}, "~O,~O"); -Clazz.defineMethod (c$, "getAlignmentProperty", -function (key) { -if (this.properties != null && key != null) { -return this.properties.get (key); -}return null; -}, "~O"); -Clazz.defineMethod (c$, "initData", -function () { -this.seqs = new java.util.Vector (); -this.annotations = new java.util.Vector (); -this.seqGroups = new java.util.ArrayList (); -this.parseCalled = false; -}); -Clazz.defineMethod (c$, "setSeqs", -function (s) { -this.seqs = new java.util.Vector (); -for (var i = 0; i < s.length; i++) { -this.seqs.addElement (s[i]); -} -}, "~A"); -Clazz.defineMethod (c$, "addJVSuffix", -function (b) { -this.jvSuffix = b; -}, "~B"); -Clazz.defineMethod (c$, "parseId", -function (id) { -var seq = null; -id = id.trim (); -var space = id.indexOf (" "); -if (space > -1) { -seq = new jalview.datamodel.Sequence (id.substring (0, space), ""); -seq.setDescription (id.substring (space + 1)); -} else { -seq = new jalview.datamodel.Sequence (id, ""); -}return seq; -}, "~S"); -Clazz.defineMethod (c$, "printId", -function (seq) { -return seq.getDisplayId (this.jvSuffix); -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "addNewickTree", -function (treeName, newickString) { -if (this.newickStrings == null) { -this.newickStrings = new java.util.Vector (); -}this.newickStrings.addElement ( Clazz.newArray (-1, [treeName, newickString])); -}, "~S,~S"); -Clazz.defineMethod (c$, "getTreeCount", -function () { -return this.newickStrings == null ? 0 : this.newickStrings.size (); -}); -Clazz.defineMethod (c$, "addGroups", -function (al) { -for (var sg, $sg = this.getSeqGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -al.addGroup (sg); -} -}, "jalview.datamodel.AlignmentI"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.FileParse"], "jalview.io.AlignFile", ["jalview.datamodel.Sequence", "jalview.util.MessageManager", "java.io.IOException", "java.lang.Error", "java.util.ArrayList", "$.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.noSeqs = 0; +this.maxLength = 0; +this.seqs = null; +this.annotations = null; +this.seqGroups = null; +this.properties = null; +this.start = 0; +this.end = 0; +this.jvSuffix = true; +this.parseCalled = false; +this.newickStrings = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "AlignFile", jalview.io.FileParse); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.io.AlignFile, []); +this.initData (); +}); +Clazz.makeConstructor (c$, +function (inFile, type) { +this.construct (true, inFile, type); +}, "~S,~S"); +Clazz.makeConstructor (c$, +function (parseImmediately, inFile, type) { +Clazz.superConstructor (this, jalview.io.AlignFile, [inFile, type]); +this.initData (); +if (parseImmediately) { +this.doParse (); +}}, "~B,~S,~S"); +Clazz.makeConstructor (c$, +function (source) { +this.construct (true, source); +}, "jalview.io.FileParse"); +Clazz.makeConstructor (c$, +function (parseImmediately, source) { +Clazz.superConstructor (this, jalview.io.AlignFile, [source]); +this.initData (); +if (parseImmediately) { +this.doParse (); +}}, "~B,jalview.io.FileParse"); +Clazz.defineMethod (c$, "doParse", +function () { +if (this.parseCalled) { +throw new java.io.IOException ("Implementation error: Parser called twice for same data.\nNeed to call initData() again before parsing can be reattempted."); +}this.parseCalled = true; +this.parse (); +for (var i = 0, c = this.seqs.size (); i < c; i++) { +this.seqs.get (i).setIndex (i); +} +}); +Clazz.defineMethod (c$, "getSeqs", +function () { +return this.seqs; +}); +Clazz.defineMethod (c$, "getSeqGroups", +function () { +return this.seqGroups; +}); +Clazz.defineMethod (c$, "getSeqsAsArray", +function () { +var s = new Array (this.seqs.size ()); +for (var i = 0; i < this.seqs.size (); i++) { +s[i] = this.seqs.elementAt (i); +} +return s; +}); +Clazz.defineMethod (c$, "addAnnotations", +function (al) { +this.addProperties (al); +for (var i = 0; i < this.annotations.size (); i++) { +var an = this.annotations.elementAt (i); +an.validateRangeAndDisplay (); +al.addAnnotation (an); +} +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "addSeqGroups", +function (al) { +this.seqGroups = al.getGroups (); +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "addProperties", +function (al) { +if (this.properties != null && this.properties.size () > 0) { +var keys = this.properties.keys (); +var vals = this.properties.elements (); +while (keys.hasMoreElements ()) { +al.setProperty (keys.nextElement (), vals.nextElement ()); +} +}}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "setAlignmentProperty", +function (key, value) { +if (key == null) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_cannot_have_null_alignment")); +}if (value == null) { +return; +}if (this.properties == null) { +this.properties = new java.util.Hashtable (); +}this.properties.put (key, value); +}, "~O,~O"); +Clazz.defineMethod (c$, "getAlignmentProperty", +function (key) { +if (this.properties != null && key != null) { +return this.properties.get (key); +}return null; +}, "~O"); +Clazz.defineMethod (c$, "initData", +function () { +this.seqs = new java.util.Vector (); +this.annotations = new java.util.Vector (); +this.seqGroups = new java.util.ArrayList (); +this.parseCalled = false; +}); +Clazz.defineMethod (c$, "setSeqs", +function (s) { +this.seqs = new java.util.Vector (); +for (var i = 0; i < s.length; i++) { +this.seqs.addElement (s[i]); +} +}, "~A"); +Clazz.defineMethod (c$, "addJVSuffix", +function (b) { +this.jvSuffix = b; +}, "~B"); +Clazz.defineMethod (c$, "parseId", +function (id) { +var seq = null; +id = id.trim (); +var space = id.indexOf (" "); +if (space > -1) { +seq = new jalview.datamodel.Sequence (id.substring (0, space), ""); +seq.setDescription (id.substring (space + 1)); +} else { +seq = new jalview.datamodel.Sequence (id, ""); +}return seq; +}, "~S"); +Clazz.defineMethod (c$, "printId", +function (seq) { +return seq.getDisplayId (this.jvSuffix); +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "addNewickTree", +function (treeName, newickString) { +if (this.newickStrings == null) { +this.newickStrings = new java.util.Vector (); +}this.newickStrings.addElement ( Clazz.newArray (-1, [treeName, newickString])); +}, "~S,~S"); +Clazz.defineMethod (c$, "getTreeCount", +function () { +return this.newickStrings == null ? 0 : this.newickStrings.size (); +}); +Clazz.defineMethod (c$, "addGroups", +function (al) { +for (var sg, $sg = this.getSeqGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +al.addGroup (sg); +} +}, "jalview.datamodel.AlignmentI"); +}); diff --git a/bin/jalview/io/AlignmentProperties.js b/bin/jalview/io/AlignmentProperties.js index 0092589..6030bea 100644 --- a/bin/jalview/io/AlignmentProperties.js +++ b/bin/jalview/io/AlignmentProperties.js @@ -1,78 +1,78 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (null, "jalview.io.AlignmentProperties", ["java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.alignment = null; -Clazz.instantialize (this, arguments); -}, jalview.io, "AlignmentProperties"); -Clazz.makeConstructor (c$, -function (alignment) { -this.alignment = alignment; -}, "jalview.datamodel.AlignmentI"); -Clazz.defineMethod (c$, "writeProperties", -function (sb, html) { -var nl = html ? "
" : System.getProperty ("line.separator"); -var avg = 0; -var min = 2147483647; -var max = 0; -for (var i = 0; i < this.alignment.getHeight (); i++) { -var size = 1 + this.alignment.getSequenceAt (i).getEnd () - this.alignment.getSequenceAt (i).getStart (); -avg += size; -if (size > max) { -max = size; -}if (size < min) { -min = size; -}} -avg = avg / this.alignment.getHeight (); -sb.append (nl); -sb.append ("Sequences: " + this.alignment.getHeight ()); -sb.append (nl); -sb.append ("Minimum Sequence Length: " + min); -sb.append (nl); -sb.append ("Maximum Sequence Length: " + max); -sb.append (nl); -sb.append ("Average Length: " + Clazz.floatToInt (avg)); -if ((this.alignment).alignmentProperties != null) { -sb.append (nl); -sb.append (nl); -if (html) { -sb.append (""); -}var props = (this.alignment).alignmentProperties; -var en = props.keys (); -while (en.hasMoreElements ()) { -var key = en.nextElement ().toString (); -var vals = props.get (key).toString (); -if (html) { -var val = new StringBuffer (); -var pos = 0; -var npos; -do { -npos = vals.indexOf ("\n", pos); -if (npos == -1) { -val.append (vals.substring (pos)); -} else { -val.append (vals.substring (pos, npos)); -val.append ("
"); -}pos = npos + 1; -} while (npos != -1); -sb.append (""); -} else { -sb.append (nl + key + "\t" + vals); -}} -if (html) { -sb.append ("
" + key + "" + val + "
"); -}}}, "StringBuffer,~B"); -Clazz.defineMethod (c$, "formatAsString", -function () { -return this.formatReport (false); -}); -Clazz.defineMethod (c$, "formatReport", -function (html) { -var sb = new StringBuffer (); -this.writeProperties (sb, html); -return sb; -}, "~B"); -Clazz.defineMethod (c$, "formatAsHtml", -function () { -return this.formatReport (true); -}); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (null, "jalview.io.AlignmentProperties", ["java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.alignment = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "AlignmentProperties"); +Clazz.makeConstructor (c$, +function (alignment) { +this.alignment = alignment; +}, "jalview.datamodel.AlignmentI"); +Clazz.defineMethod (c$, "writeProperties", +function (sb, html) { +var nl = html ? "
" : System.getProperty ("line.separator"); +var avg = 0; +var min = 2147483647; +var max = 0; +for (var i = 0; i < this.alignment.getHeight (); i++) { +var size = 1 + this.alignment.getSequenceAt (i).getEnd () - this.alignment.getSequenceAt (i).getStart (); +avg += size; +if (size > max) { +max = size; +}if (size < min) { +min = size; +}} +avg = avg / this.alignment.getHeight (); +sb.append (nl); +sb.append ("Sequences: " + this.alignment.getHeight ()); +sb.append (nl); +sb.append ("Minimum Sequence Length: " + min); +sb.append (nl); +sb.append ("Maximum Sequence Length: " + max); +sb.append (nl); +sb.append ("Average Length: " + Clazz.floatToInt (avg)); +if ((this.alignment).alignmentProperties != null) { +sb.append (nl); +sb.append (nl); +if (html) { +sb.append (""); +}var props = (this.alignment).alignmentProperties; +var en = props.keys (); +while (en.hasMoreElements ()) { +var key = en.nextElement ().toString (); +var vals = props.get (key).toString (); +if (html) { +var val = new StringBuffer (); +var pos = 0; +var npos; +do { +npos = vals.indexOf ("\n", pos); +if (npos == -1) { +val.append (vals.substring (pos)); +} else { +val.append (vals.substring (pos, npos)); +val.append ("
"); +}pos = npos + 1; +} while (npos != -1); +sb.append (""); +} else { +sb.append (nl + key + "\t" + vals); +}} +if (html) { +sb.append ("
" + key + "" + val + "
"); +}}}, "StringBuffer,~B"); +Clazz.defineMethod (c$, "formatAsString", +function () { +return this.formatReport (false); +}); +Clazz.defineMethod (c$, "formatReport", +function (html) { +var sb = new StringBuffer (); +this.writeProperties (sb, html); +return sb; +}, "~B"); +Clazz.defineMethod (c$, "formatAsHtml", +function () { +return this.formatReport (true); +}); +}); diff --git a/bin/jalview/io/AnnotationFile.class b/bin/jalview/io/AnnotationFile.class index 4aea77ae865b6b714b9287cb808d4631545e91f6..fd5b7293d5a862b706a73e4abde4c304ee90c61a 100644 GIT binary patch literal 36157 zcmchA34B$>_5YdW-uvFmO$bR|lE)eZ1rh>+81V(f00Dw5N>~go5RwN3LlTp)DehFQ z)_o1Qp<>(>g#eU1Vi#O8WDDvx z6+=v4zHDKnaaQHRTC>3Vs><3qm5nw09xb#-8?XUV)W@Y>l;NX1L1{d{p-qv7%Erp( z`o;hqKm#1=-vNW=tDBl5%Un8;4ic2IIMRG{V|_!Uv3a$ig9hz`uj0Y`7V&fkxnz;e zPx&tSDZo!dTuSlEhPvcZs*es9gi1jpTuLK5fTxiz9ZDI%15cm#X-Q3!pq}wP*oOeH z1L;kX=IP#cdmAh$*wsvdURhU*_E=P>_F03vScgN{mh8^d<57r1M+(Z>x2~qPI@0K) zaiF^?B~#~=mCl`CGJX1tStYZ|W=s#zSen4QaX3FsbZHVz2BlRtG(_q^F@;@CdLQ(T zTW-cE_7MmyrGMUd&{uP$I-KXwRP3;s((>k-+F=t=9H6794-Ynj2Rpjc7#_29v4ycQ zxaUll%4sxcxw+oMZh*$n1m3kdE;-}_J{!PQ%?ZB5hE)zaF1}?6wkfHtSzNa)lH9h~ zTc4Tm)S9N|f9ZImyO?H-yC*f)FK;M5;%85Z z>Gyb-=F$m*p8TZ~>Uy*;W;wpTcKNcp@<=V@9fTqG>nx_?_%2J-?!!O>=0LDch%D+F z$tjg_af@yJ*^2__)?zn78=dzTQnJAlC^Zp43?|hl_8V+BwS!Pw-4GLOha`1ig84Zc zC}_{mp7}2TpVTF>1Qd4Oj{hG!=BFjJ)S((d{bCdN$sKp;B-SWC)~t1v%b<3afvb$n znov5?@1uHXu>iCC$t*n@A;Ev9gfcpmr_$`wa#|rMbwy264LI4b6t+F8lnvX@0Rh)H z7IX7eF0H0hKq5ub@r|Ia{W3az2j9Xd@=uh_D?5Ibcqok3?}jY}$8zPpJHuP+(y!=Tw1&EfweD;5MCXl-35>Gh6grYIFYIfTDi!sN0ErQ>Hz zE%!6rD_y#ZuJ&|ZhYr|-n9fTG-xRu*);ZMDL60z(xwM|H1F6(BM~vkF2JO(hELsi( z+(0)ubR)ngG*PV9r44j5L_?i1zB=mMs4jBoR%q$t%6xPih;IlhAfvzTU<$kw+dHUi zUrilTS3bHMoeFsl_quc+Bgz4yreip!;yw;NASg32uQ;~`XcO0N0iF`I<7%+&=(w5s z_-PwGM^N#0f2barQh ziyJE&mKX*>`!XK)NtbrfQ=m~03ebk7&*L7?xb!Rqp!}PnX6VewBGx^>cjq6Bqu)rN5eOLE$XW1ed+RTk=}U!WelUde*7gOMAvdMB|7-4ypXDf;E+~ixAzN7C2St}}Qm&1Y*69crD{_W6@@G%S%n3+wi zt*-?4x1#}BHBHkir!yf=WRiGSNLMIcWJ-0Usj9K2f$b2WQdq9AnWQa4(mnwj(La60 zeB%N6eFCH#7*{eg{_X+-J4Vq0aEeHCMK_TSp$y8OwWKl9w4}Zk7IN3(cM>xWyG6x5 zkpb9oPs`7f$#O-ICu!AIE{xRrL=KkX_lppH>xdp*%IP>f2o2E-f=Bd5J1iQ65%V*> z9gBL4fF`o|Po69Ki36}j&|LM)8?nb;m&%pR!yu@kl>E= z(PE$&n}D+KOo|~dM7}Eu#1Ie;93oF%%yGm}2!zDE%j%jVi$R5= zP#g?TgeB}IF~SvxFlD8HSeh$q>Y9#1L>uw0OK4(I;)-!%yr;pL z0ZXD-86Oa(Vv-{!8W%2U7sl5wgKJ#VRA1+c$)e1V{G>`)33|}@!4TnN#8FHRQ<)sb zCy(5L9H6wsbZ$3;^;MT-Ui}Ny24V_ffYb3LLpOU%${jDwb2z#ET2=G5YLE!U#2q0@+iw)v4U&T zAqQ5L)Yiu8Sgeaxu2{{L-KyYOHpcrk`NXMM*~}SpkDfW>=+c?9%1X;2d|)EFeltLG z{i2%YF}$f~@N}Vl3gMQ~f-F%Gz4UlBO{}v6g{(!*42BGc6Ev~p#Y=kT^lxBKDRb@tbIbmuJp5qg( zz)i{2vPsjYl}?|4&?^*E7?UyaW_+JTF*x}l%yp}$|Di5c(Nzw zSV_pe44w^BN1qMV;2AQ66!sj1l0=@vwUJ6_#lyu1?E7_)lhI1pHtXpE2qbKE^jP1Z)L?knHiT2V*)ZLa~zosGjxBwVo3s5=E{(_VoyMEfJ4wByv6$)b6>q% zoFaS5-j3{r6wH46!d0M;eX=h`ZK$b^dkbT@e?M0qz_L1%eZWZL3Zp$r8X9VABGo=Q z0Epv?j(rYtP!25>q)sasiHl}`>vm-^++oJaB2H-@*Nz?DN}A?y=$nUP!zC@~!t zx2}NSVVG;wF&tOFD$-Jj6SePOw> zP9l`+(Q}8S0peMPJUdGwEVx5%fg_21c&tWOHc3b@_RHhTVS&c{+Zjr{0R$Qexx$qz z6tHP=_wV>3B^ zfQg~1v8fgSO8+x7CD>V!0mG<)%flIqF^#Hd_(AxBK~#ImWS z0eO+U#E}*fmN*-Lzo;j7@uXg1%CVX>rN%^c&N4CULvio#*W-Fl(%6|S%4y^ z53bIP$#rA$nL-Hm+rjd~0`g9IwGF??qpLf#CrWT@@*5@|=7@gL#uX zZDUj|VxDDn2#R=3iye8tITL}#9cyCCy-z;CD}4|r9HKxwwgZ7OM{aRto7{@|An4H) zNn**ydSrr*|IbACpZLIA5XSDb(O^TlUG8w?Ll``<=+aeH5femo<->dkpqud_jlnt# z(Nl!W50H<#^0y{l0xj&5zeCOhrUx=h%kmmQL>wN8id&d$dCXYhJfDOz={6NdF-)60 zR^EuHj+Kb7Pm;ShOfh9&`y-xIkWYge!+8UJ@>$T{z`Q|=Y8nA*)WLaGh$%G<&Ko*( zD15YswS3xu zspoI5d_%qotAeY{5F9rYv~<68lbB0!Tq-6ce!>L)NnSAciTdfh;n& z8Bqxj->2Xb9X_{Y=Jc}Zlfrq)Mqr*Hw7g}@Ate?@@{Y(m7$tcL)U(R;sa))}aaY+V zb`(+(Nx4TaCmv8C>f=+r!G3Z0rVAsqudDJHp*|qg^RyM4U1)u|M2ZBh(>SC%^%n#w^b3YO@o#Mp#fCiurcPWb@#MxoVVxZV@+RXR;<@MH7amxkw%9suIRTcXlAk*w^BaLKCbmWV_UOS508z z%7F+o$tM#Rn+PrJ%~qeWlL+ZKH3ToSY>%I0~@c8sfLvb=?pxxCJkR80_1YL=^JvjEdLW4VlX zY_6-0RTZqoJ6adfXh0`R$E5W;?_+{ziZNfYjgf^DR=pHlwz8i!=`M9$JV{$Tabg)P zKR})Dss%>RA>+`2?6;|fJRkzF`CU-%f1s5<_1znOz$0PE_NgP23 zbOkQK2xW|JfT?lSQdT}0mDNijP(U&9ArY!lwXRymlgm!#$;4ck3+r9gz)e^NbgXG~ zRg;2y!H!O%ri|63pn|UE7au#(ycigSpi(PbwNjy90K-H>;++&zEVw?0XLSlo=2HdD z=xUe*8oDAwlyxSQL~B8G@|kK#C}8Op86l=R_5(mml}IN<0qX`+}9$EP0mqBcp+C66Cd7DXwQ9( z8_E!+`^^xM)g&i9hD-r{-6~Z7IF{#M1hUV4Kr-*>S)~K(m zT|J{Nme&Fdk3*`#WITsDZWBYp)cX39mUA8#rxy@D28MjiOT1%#FkX>Kf@lF|DxrJP zH&P3~(!pO2Xamap7|!QcHZBG_-RQ0v)dGn%KbGC`s`HbU8sECnEaGF-5al|~lT1l! z++~_3s@Bl#r=*ETb4L_A^foK;M_l!&`Yq7KO5DR1=4=frV+jZi_&ZlUrr>J&o0czZ zGB*t%m$^1+g3&>_`IFon-e)Jl5p7{eW(DUGtwvmI0JiiZ&tPDUuV5|Ida&f(5}r@NxhF^%9QVsh8Btu6jlN873bj zsn;N3l_URr~i?{ysy*%y=JCvvdOj^R7NA-&bh78=`7a|Q(a6^)&b$KXuy*t8U5lT=6TA*;H| zkf~bE3ETtX6!BB&0d?W*U8D}#fo5cuu{8}QCZw8|ffaNm?8cu+0mqrKm{B}|QT&yw zzE~cpiPyLkX!<+nF~OktH;41odbV=AkO805|%GBaj3Xku#&?P38P}D zPlrHP!^2C#j>W7P1hu-tT&%jR7`7qo9NpK|d2EWaoijO7vv^4}1Tp6iU#AT;oRXM_>3C9-+=vr_oNbOxBVBzcd+_c;FVSom)29#PT}_<0@o6}Kfy8+m zC>tCah%&J`hZAYUIUG!_vbNDD;H$3JV_khD(-V^a9Wtb%A2OSIysIbZQV)YM-aD=< z~H*vKy0!I zO4n2`k0c@mu0EC^K{++iz)F-cI?vU|>Ep2sP+g29AvO)kLJu3O4_;2}K8bnf7-exl zAFWS>aMAOl=aFMtJF1&J*<#wq6?Sp5Eoq<_Z3{@1u3pGiwI6n!7nRf{Ps2?{Rm9bc zG$_}B9aUY!*8#0T^PndfjWw=bs&Qbg8|Wb!K^+{jE>Q@1<dNtR98IrQK-0xIZ zui<`~EdDwrYkm53a8Od}m^+;5>a)0m;fSQnu|9{HE1o&#roVFax!g3>AS;$r_UZFM z60uybPhXID8{yNx0UkQ%XMK`!ufAfKm%92gMiz_fvRI~8Ux8(^S;Z}`a`n|bD!1T3 zkIB;NYcUG9zzq2yhhFFE^~tTU9j5$xSKnY9=Eew9M#nwY?9V|y%;)5+g7pdU2Kr8% zi0FFfeR`vy$#W|k>sYY!*~=ug%UTvQMW_#v10&_*+5x(tzN&@;=1J|tIH{>yU41)? zCCj8ZjKr#B34NEV@7DKtYmc%a_Pv8BjoP?Lx;gGxg9;41@#S+8hCYaG^v}Njlq{g5 zY>6lYpJ&{oA3z{oKgc$1(%8{PI2psHl`(&s>oFuB?vz#dlVfI-G#&VAUIP5!grMyr zFWSXSket;!T>UU>iu9T$ruGC}#@?f@{;l2#dWC382r#a8y8a( zQ%ty|@%pluj7wGlV4`x9+4CH%%)|`2U?}@4;Qq2YWKT^_kZ-{`j1b(xb2M^INe4V3 zMnNLxJSX)dPzmlt`$+TET09Y7zcjzNU~7JHz1IBVa;^ErrCR(3_!_bK#SLQo_Cl}j zlmU2|cq_m!|0g9Q>p==;u5evb`DdYRZv+L(b$)Tu45g z4x+Fb(DlGm5gmqM5b8ypH|L3%oY5%m7|^4dYGb#`8#M##SR)7VF!K#YQfL8H z8Vsh;LaIXFYC!OIhwCD!6MXG8KJ+3UIzwXeArS0~A$u2%3)!1#@h%#GWzRMUss(~f zA!Dcxe}IWLYM49ZDe`l9)3lI&iURz&GOR<^E;=-1ZKqQOwSc%{P|ji~D2DRdPUi{g z1T3U?(RCr+M!#vHE4fp~WjqF#ToHCukuT(Ir)va-1Ff_m6xdGJ3))Gyg#AI^I`Zox zUn`}WZX3BO&B-?`?~h)Ok*s#VQ#@LXSgnM1XMye zg(+t%-5+*i52>+-v>mhwRS$-{#U9dk&}Njhg}bYw%vRf15X>AA_Jw?#Y3n)~5c0Lr zBkQOazweZ{TJMLto5wbKVjbD7)+-{MfnoDQ0WN-eD?K;YJcI-Jp%i|4VJrR76ul5O z?|&}J;^Nnfg8cKhqHI-^ql$7{X*<8a8O$BAi|z`VN`Bc)@9d(2SQXyd=z|-mM^Zt? zCvEiEI&yR?X?12%FlgX=eZOp>oJ7+v)AMeOx62AM{lN#U{*`}p}}BF`@zBNmUf=J(Ca9R_bO93yjiL! zyH(_w3VlPhP{F;uws>J|8IZid zWN1+~;f7;(QUBz2W4ma_v?Y6n0=p;}3Iubviz6j2dQ4~m@k(#=nB>Gq8Nn6JICZP4;0GSMWIke9Dq2kO&kwdqKcfPvT$;PT{JbR>H#r- zBNcaESf*Hragv%DdM?cr)g6cDewkts6L^Aq(_-Aa;m22v#A~6v*Z`nm)(arFC2gWM zNl2rC$0u0OxKM_fRygRiK)1M=qTaBO%l$n5M488kZYU$hYi=9{nw`9kGP!y4I$}vF zR<_Uyp|nhKih-1tfP}I&iL#U1#OZUn-C2pU=2+P|iL#YmS$xFQHu0+)qC}17b4|-s z)h5ncn<;{s1&?m{?i=f&b#_%4)DLibZxSnTc zW&l_>vR>U2D~ZjI$23auS3E$bft~4r%`y@gQ`qR_m zAbM5|qvymZ`n@Qj=fxEIgD9sL#PRe;v5;OCOX$y{fnF7>=rwT;y)G`MzlzJ~O>rf? zC9c7hzguu^`A&MD6{2_qcaUGEkHlZ-Gx0wCQ|!V2zosu_27QS$^Z$}l=qnkaZ{=eA z|4jN$UQD0J%jhH7LLbXp@%$kDD0fghpP!S@2q}LrEcvo<-tN8t^7@|HD!?jS~^ zm*-o(#RBVKvCx_=s;mmJ$U0Fhv1&z)b(&aeoi9$ZTEsHzQBh|-CQi0q7fsgR#0u*l zVwLr+SZ({osdh-LvHObC?Lu*yeXuygJ{)CZ#F=)9ILDqU4zp*7B6}`==i_&wIM-e( z&bQAK7ur{di|mc!68m0psSW0|9}}0`&xXX0A>ThZbuvCeVDdM8I* z=j4g&odR)#Gg92>j1@OIW#VS%7;&p}qS)wE(;uBWaffq?xXU?D-0fTS15M+ zhKt91Vez={2=S!vDDkv!hIrODOFZv8R=nV=7BBi5#7n+Y#ctnO;*Y+y;$`2Z;uYU| z@n_#g@v85B@tW^Zls_%rV!uNyr2*_C#QY9CMg0yuMg0yud431liHGPE_Ehk+Lp%)5 zSB!Ep#Z!1n6(vqUJdLL`F~t%1a6=V!6Xn>C zXYiCRj>qmiE1sk7;!5j9@q2Lq0#WnrZsK`*oHE4|)=lCMm_e3!4%G7ko`Pbxb-8#E zPub#S>k|Gv0p*BS=`Z3X^vG4e!KZ|Fi$7AX9w~=EC@l;u1? zOT;VU&lGeXr@7))v5sMss5pOwktwWm}y2zn54lTheVj1}Q2DMZ6e%d&6 zi)rO=heP|HL1mKD<#0UAWURicslbzW=zItKL1SY7!$k4F&Fs^*Lsb7nM+dTa|6R){ z)b*JA>+0Z6wfPUxH~2hQJM_l?1Vsw5=>G&t#s3ME#s4Qzr2L-x<%Y6+3g5?{4~ZK+VfMJmV|jVroZ}u=KnxTdbERKe;V9RQa}>004AF;;0KzK z^8;11!yfp>1SNl}>whBRBPge9O59IJ4^1AM{yClrKJ|BJnvDi+|Asm_$d5 zZ|FGjEiD$`QIq(dR*4@?z%0*OOiXb><*?e|5aMZoxSOPa(1h64McQ`=mX2@pL=o|2 z6cHhX|{IwI?*!+igAor##5xI(7*3~n6? zvA^&V;hL4=<)3;1B60E8eVnUUc3G=NM6-}?49k47&$23tWD-e zop1xdbImu&QE`YYliWW-q z=6gK11@=yimsD~I9PS?60RK;-vZ@&1ezHOyEa%B$dAyt` zPmnX^iTFETE|Cjlv#gY7$c6F(StYNQ)pCQ3$h+ktxlJyXkE6x&a;bb3_enpHwekzx z!QCqxlp{}8*|Jgflg(<7T%it;E7e%JN==ccsAJ?Bb-X-Hog`0JE99B#G?dA_`}PH@fDEAZkWis4Oc zk&B>~lt`gMc=eCN52(iem^_YYAAyW!m31towAMpeIW$2)S?%iQufg0EqG$bOnwuw5=i2ugFd2f2@n zDz?gou+B#@P6>oG#HL(cWCg7j>WQ?CT+NX-Z4x>u1t2xKMpDp9D7Ad7mgIUUwCj*v zM6gWW1Zvwr{qTDbu6Gv5Tc}uWr1A20gSjKTS;R0$6XlumEX)xzlV_uj^NbVaIe1d= zppKAhjsJNN<;h>cTeA$tQc3NlZ1_QYX#j90aMAhP=rWJNGU2Y0KOdjw;-&CRlTwTF z9y1Fs`{s|&!f(7=o`pX?3x9ML41SddUi=;49klvPgsqT%K%R%dZVROrs%`Q&Vd#=3 zF1$QisH24^a^Y2`FlUFnwql1|S5dfCUbj_V&wa*n^-ZRFWPY2xg;iXpY&DwKiwes- z!Zs)Mf?n_YDnj;Fxyf|rJY5xXjUlM7&3ALNHo5Hq`G^N(Cr4#%Qa z;CO?_&;W7-ht?fNf)If6_-1_;->lCJc`(U*X10yZ-OtRnY0UFu z`5Z>E=wzh3pO=3CNnJ~`~$~Qbo21JF%RhFZO`6X1XdunkoZ4_OhT| zROdZBTGTz*{RUd#y@fN8$ZDl2q0C^`h|Th~78)J$=bJaLh@OuAzVH;{2d$JAdxd?r zRsNOpP8vBU&JwN75=il7KDwcOGl0J(s3=o}Ig8jzhv!#dzXO$gSYQY3sR#wO%6D;Q zAQZ@y@3qPIIb%s#p+H6nUJ!Z2?9nR~6!MRXaNw!-$AdZR^tpKbMBV)#K(*)-V{mTK zmqc@45dCm zxu$+VNZVdwEDMP-Q0(CH3M=H4w<$T7+o}%$OMxK(E8W0SjwyeEVFXQie#mkR3>0v7 z4UqUG0wCGRkgn%hRhb_1F&&lCLR0b!^3BZV;n2l)l_n8T9?V@4u`&lSOyxF}QIsA` z*Eg$q*naR^rV4@sTh&qFTokmb@rm;Xt*VG8oMVPL5+vk}r1A_TygI;~z8PUNgw_?3 z$S4papHjq6J5;D*tLn+S-YP$3IK7e=-iH@1U*Yn8$>se``J-HZP;&VoQ+^xD5ztRU zV1X&WnA;CE^$W$@ySQ0g`{t|-kzWQr>47R-Ev-VFyu*v(X>qjIBDeAsIcV4_^abbk|NBW>eG zs{^rWj{?%o>ozs9O_hzxjS=%Ay;V&MXX&C4_c~hN6itB_^=PGOrbnA952pruv`_|5 z%j?}rM}~VcwvlavCg~mwA?v!fn*f+r%pn-;hL`+MYA~%$%_#?=Fz|UT6bND|8`|&O zLE9>Dh`vF9`L}BX-KqLp?0c8-{w=BRoC9CkF6hQj6=`)Ni=I8EQK) z1Je#*fs-TRIB5y@%r98mLj-$-dLji0h&=%q5PMol5b+X&cxim{j|T0#p*H)-upA?| z>k@sGp02L+d=m9F{Rorc1G3~Em<%66DgT3d$d9Nuz5#HM{FH{tFKC4Pk`9$$!*uut zp^)!r3W9z!KkO4E7DqRa7om9pu2ly5+ryOm3uRXS}|ne>p# zqDNFVJ*9H!Pb!z*R6Xb&)tf$1ed%+RM_;1;M>Rl5b&#-eMcb!_hzwPTeArOryoQNG zkuw{kMu;PELwdR@60_A|Vu1>adfa4gRHMamHCCLd#)-4lcySGW*Q*KQ230CHAjfvM zDiaT?DWXjsCAO<+;tAy3cBx~;+xY!Ea&LQ7x%f!U5nrog#lO`&nW2u8A$5Z6qblVf zwNMUK)pEFs$dPK1467w_tXe9^sajd8>g5#GAZMsXIa4*u6VxiXK&_Tb)Ty#wt$}BA zx;#~#0gvWvcra__HSlQGsSD&r^&5G&x=7xqE|w3d%j6^K3i*V(Qa+`wlFzDZ<;(DR z{;Jl?H`R6W9e6&UsGH=!)CT#Dx>P-{uEOtn^#^r> z+O2L?FRNDEd%9D-4#OJ+EdSCrr?NJ}%zyDMpsc+S1 zu=2jpsp>1;OMRpJs&Dl$^}QaU_Uh5<-=IDT`crzk);Of@$0_<0y+EhxDxHq=>fLpX z&eE%OP_IFs3w2L@1#X7ijNew>N8hLW>diV&Kcf5Lh-;pH62DLD0s1*TQ190H`c*wd zzoAFy5A`AXBRx`osSnlP>LN?%!z{lZWx4urD^rK9Abzv)n}gq6l=s%f)&Y8qHC!KQ z9jeD!qxE=ehMr)})RU}vda`wbF0&TvDb^DF*5JKPA7wS^Y1Y~L80%Lm-?~K4vaZ#$ ztsC`R>tVb-loPQ&(H>=!o^PUSxfP-yij2L`0X`N}ptR)3tU; zFS8HQ_4Z)hU>E5|dz@~v%kW&TkGD_ItL>$FuHCHH*ca&2?JM<}_SO0<`+9x0eXBml z-lW&sJ5cs0>Yvt^+Ry3B?6>t5_PhE@dyl@#{!CwOf32@^l)lzU)mJ#_`ZA}7zMf5Z zWd91;aE_VqPVblr@AQtD@OWZ#T~V6TOIT8}3`Jwiq5I@AW}dppm2LKOOW{vUun- zs!ifg>IQh{X=;afR^5oFZZyK)qi(`eIvr~NU2VWqcN%5Cqi)6wGH~*8wz>spH8XMK zbEdi#wOO>;UZghSDN{_>hpF3eNG?k~CLTv_^=%5$R=Y~w4jg3DL-qo72cYE0v2dN( z70Fe#bcDJSGtNc6eFyTh-y{Fnmul5rXcyAM=yqd3*%A4AqA+OF>B9@g`8uG)kcL{GaLO;8We3hHeSrhN4v`u4Gh&_J~r zbM9*&LV0Qnp7QJqXe3Uzz+AAOqZw)|%6iyu(=gz09rlsq7aWH7c4&KihqjaD%|ty! zx$Iim%`~YU2ULS5rh#1LMewp5xf}n3zmC)q=LP``|3Q)tnN4`!?KJqmX|D|sK--3h zNjuQ;UyNlX_r-kDplO_TYxrF+|_QG zZNtv-{}{d*!BIOH4{*S<_EH~lq}Yq}&T)>qQe;>e-%%Q4$7KC}8C31l7vg{3pzZL> z{|8uBGAzt{$X?FF0R=O$g6}AASUU&p{@eZkk$N#LiF?|q4~r(y<4@zS6ZLo<;~D%T zeqsMuWUw9QZ4B#7qJhkjxbJKdmkMf83RVU)Vp2oalO3v_!G<%ZMZj&i2p~ z1sBE7FN5f9KBDjVW)Z{$f_36dXeW-;UcmnOkc^E8HBHBpV4(U*>W6D5Ly^xY!86~T^1}P2afFl_ z^NSHuYI5dKSa@PHQn9&0eMv%Wk7X6(NdPt~uu?*nek}iz!nc*YwdgVEhW!&y^g_r5 zyQcB|s<1{vAU&_hP8r3wTvQQab%6ptZw(Sl!9z7axWN>8D;*nj@ptA9^%4Sif8@Yt zK@grv&;^mTsXv7S!IT>)lgp~x)T`-3ZbCpPrQIM-1yh(3&Aowwplhhl!^u=8^MZ_x zCJ2>^K$k+0k)BzbE<&kMl1~ezWo$HIj=mf%$_n~gs9Vs#4tIEq{28Bw5x?%%N>^(H z$#5AbFO(LxcF^965Q0g6;Yb%^sJNc9BHX=|(s4i-T!0W4x9Z)3v*&4<>aPI4j{5WC z8|E>WAKx;MsTiCup|nuHP#OYCuNK)M3r`3?>@>xFaJj&0#Z?q+Wg1T{HJEPQY6j3) z0&@`VBkiIhZZO>A!kcIi!XlW+t%x{T;qD=LTA}V?>`6L+gHbUYLh^bCy<5QrK|9CU zs@_4v?xDaIaa^eT{n*nt=u7$1VtQojdMUZ!;Y3T5d(gFj!T-uf@#(ZAAQ z{WttOsc+B``YoEI-=SmmyWq?BX_?+b7wL~^o&JQb*Pqf&`ZKyk|C4UhU(o&fOL|Cu zMbGGO>G%3OdQtyCf7E;F6&$C0%~JFRBt!*Eh|tkp+MxAMeH>i{v^>MtVJfucr#hLf>{Vy!hyTx5+9msy91tE`ct z#X3}6XN?lKS;gWGYpi(4DiOc4#v3+y7M=_HX5NiIJgL8fw!tQNVxLIjeC9*yefSaz zXEC>`4~*PM7n{`{JXtuxbHDnKzQ%KoxQFoX8$sgs5O=D7pofooi&pg!p8S-Dvnc(< z0Wi`B*GoI2l(3p~b2fhAN9I{NnhYIZEazq;$Tg zzU}bJy8l!gSk5fO_~7M!+8FRSR5Ksuu6Bp^?$!=0?WetgiGO(&trRj$MoE?9g>zdq zEDQ>_sxQMDNu*Yq;YC%0_6Uf^AtpS2c%q2jWL|Yzp|z}_gS%iLe*A`XdP$r57wCGe zBZ5xILi*?JwYCV_(HQN9_PY`~$mDIU$rP}rP`Wjh`dia!xHW?gvyP#$Ryj?_a|P;_ zSjQS#@se;gFyCxX8CHeA$7vtkp%Bu00dgc)%_ zd_;uq6C+}vD9ntGFdy}-jJsON;Gssntvk)(To~t)ey7DRc($&ZTFp^XWzF*Yrn}zk@a(S{KpB)}{2Bbs2qSU12Eb6r6p)PQ)qb>o^5{t-d$X z2DOI&IgR@@PL2kQ&G0o8^=?QT8&TW6_>1%7^aaCwcc)aA8z6`i7X)V1SEY5Qs3Vf3GaWtnD@Z61O{343CBboFzF< z6{T=)$O)z}pK}TyG!@2Gn{HkiJzaPk<+H*|j~2YZ#E5hQdh8IPiX30aj|8szu}$Nj z(h$LvkOQXQ6tbTpy(zK#(^=S9*JAgPII`AJcbK^Stm|lmbv+#lgLSlZ6O~yTXr^@w zC}1O>=y0gA}KYS|gt3P(K_oU@hXqt)8_;s`%m5o)y&{xLW0Xs;|z}{x+QgToxMF0k)b>Yb9Ty z!tc*$3nOZLA^83+Se)pJ*O6f>mUz;*j5VHzD$Ue<=+ZmAVL&JMF~e9P1e$Y=snfTW zG71a0)TE^`lOCYKdF$FgX{Bu@O=%fFC=3mA6HBnKIJe9TVMA%45r~oWjRVXaHk3$RB?S1Oq|;tu!j=XCe;*EbQ3?U?$dJ z;MVqkn7WXI&Pmmn92FxI=T6^`7{(t#MDu78`9xJY@UCV|I#o#!eM4BErj#&&B4D z^-D3X6fecNQoI!9N}qT}nsaHe-X76|z>%6((J(z2v1ki&mvi`n>B zGOsq)mIL1G<4IOAoQib;YJH-ZhU+1awti7c19c&u0^(@=ONYkFGyJ)VGJm9Ek0bR# z(-Db0crUKgAnfYr0Hpl?uxw{FAFEDz-Qjk zht!b0O&{E*4}pPz!XhKK6NP>*9M!2Xs{A4NaU{6J2>wHG*V+hv5G&+4?w&>$BJcL`%ww`J`b4%vNOrDvnb7mWoze9j-5*b?GW-7J!rh$ zi>BFq=vW*6y?p>Jvj@;h`ye{Q9!P7E5xBrEpccE3Zn1~bJ@zo1@Rij3KQ&qk@rq9={K=J>*0I&7$FAgwp|pe*d^1)v?)+&+2?84cVDg9q?iU2Ob> zGIU7#ttpPFQyIX1Yhm;=)~#`+Ts(9YrHc9tVj*Tz>Q2kMF0^xAY{i+5kLx8gf$Kl z6nai4JWzDt1}4+~Ds;FU64E%J4PmLp7TK*;+J^AZQ-NUOgvV}i^wlFgCuC>pF;Q~T zI2)jkXcbR#Ax>z4Zs7G6Kz{0R3{>3B6%$QGwi(Y8t=sivh3jhlH3-e_LYSYcF^c`2N+PCVIR(gZ0PTRNYj8=M_ ztIpoHYHcgs&Q<4`s(mK2MUHEw^SHsUf2zSG*z4TjLen7K%vNP=kuzFpI+tH$%KIcO zvm)$EFWIgy#%%=n(mo2@Js#XWgJ#+@slqO&`SvVu z`5ane&!tuNvGi+u9$jf4PwVXy=mz^ly2D<8d}SrLd?C2Jns(cZ=w*8`y=B+XXZBM1 z+Q#?V>{{XCj%;_kPGsBlqOX0jD6pHvP`gkyXw%FP9ni6*6dFDf8@WrOpzR^S$BJ&rrzEDKD~oVY*ACMYb; z^$>F=C((PK8lw$Oo!qA`*2^C~(7ncsw=z6xhaHn_=$cWGjFeFRED1Z;#f711k=y$R zIySEd{*#xNb6_Tpo$GyiU^!7}!7j#!sKmcm;E77ymhnRDmw5gwbf)zbHL&-oZ*9}J zwNkZ_oLt%~YT9Oe0?QUM(wMZ|1gg+(rD0JI*dDsXm^(V44rE~M;F`A8|s>jts%N3MqPACjJoKOD0TIL7s}@f z6k_WAjPI$T^UgzDe?Dxgu~Dt&Mb}T^oO6imxK;z^#aq0O2P73@2fboG_TP?hN-R?1 z5t;FDpyxQZ)S-qunR0xjtn&!)2Kk?s@U{`hSIw<3It=?@Hmpz;CiIamjJ|l<$if`} zeE&(`smL=!UQD3752MG%l?VGzK>5o+^(%Cs{bwA{*iA+DYX*hh@&Ci(C_F5VLhsmw z1iA(q7E~~5LWTu39SD`o284I~Un9|j&p^?gxFECF(PYfg)P!fBd1qLr2u^d8Zs z@8^&jthtOj-0;$yitHgM2348MHXILcn9J#!TPYj*nX^8;PK2Zz=C)Fo*|hIkr(C(K97!6-g# zdw}YUt)vhQnWwh^O&Ukr=jt}t;uhi}lQf^>h#h&iexy{~(8i@o*g|^{2`Lg;-@=zi zN=9#wQUr2YfJ<~FZiQ(4n^7<_z@WGuvYpSbbATiI%BL!$kNOewh^r-Df#~q%vmTfg z2l`U5OFbO?;|>l!=jJG2q1~*~`(oUY@l_rv&y;7uI%DY?B6%z*xE+s@DOsN6{eoA7 z{+)g-I_WvlN%!EZESRQetziL}m?(%%$GZw*K3eDC0|Sm9_egw6Q|J+&LXRkAO8q#G ate-$`313+QVwPasU6|aJ`YHX4?f-u|r+07w literal 36134 zcmchA2Yggj_W!x%y*D#?fska9OlUz+AfX6I&n0`|46u5QuQRnfKJs%rt<{J-bEX$g^a-QVYLnR)M)bMHO(^mFgz zxqmIaAg3mBT6I-TL{R#)L~UtfeO1lUB0;(_vKp;&4yc>3a>N1OKD^a z>N*WW%viZ%aio4u`QmD`z}kxP>Urh$Rs0?;v_~7T0aDb-qdY-fcz#0~B6a2U z<&CxV0Xl^GIn=iu220m8G)7jqbSNDrC}nA+aaMh8U8KHojiAE@9DuK)fd>}xbO*R( zkg z-bWKacT>ktn^#gif8qEUGiJ^iKc{5oi~xP{k)flM^=Q%VDJ8Y)3vazaq=p+;e=veB-gU#f@W_1|DW0p>~ zFg6DFob6I6jRq|@)_T|t&={J;yEe}yhkU?i9k{A7!I#*u@&PBrw=BUn4$g--+N+{UcYP9Y96Hu8#Yw0Y9&J@%mw(L&CPKirr(>YkK3#y;P#3Y*y^WsexUn&TQBssb7t+NJT?CbN z;5_2ZT>2GDREPBt@E)K`=rV^cP1>`>>BKeujIsOV`k~p3ZC60ecYBc?sd0LhEURLrv}U2y>ZB*V7Fkm8!;wu^hml?Ru9) z%YlHKXrn_n1AIag#cEyJM7KaR)EMKdz0Qs5B8P5+mOi1xM|Xhu1~Kv7$;5XTFgl>* zKqVcu*L-w0nh)mD?{(?7j3Ngpnt_2BL@$RP5R{RaQJhZ$bU)W_28I%~6RNP`==c!z z@>45qb7-reLl4~0xO`3MK9?S*?HD{t@0iqr06;wI(qlX+A5&gMZGD8{?r`aM^aQAV zX?=O!GQ%2ZU&7-)<EBqm!72n)P6(M0G%CK!dmBfmtLS31$8^E z9y=7HvxTS?G=_Qh$0_!pmENeocj;w%1(RRO3ef=VbC7PH+T>}y=F%VNbr6%8mMQn< zH1A+@^7{YB0g`DUN<56BKf3fL?*L=Eq@uQ_feZiS(x1(?pl}Xog3JEOTe6*>-f`(< z`kSEMCv-AsVrwCx-lO*&`g`X>Cax!4`hdl1T4hy3U3K}IiOXPYSAahPw3|M5=%W~^ z8Gpqysa*O8eF96cI#RQ=ahVZH;DFCS4SC#ak4s-i2WTGqcIn zwdLUZe^VQpRyE8hpTUGUnMvY3AzUGOktvmthKl;CI<`Q7N}*k0F-cp7q=H!_z$qft6M4=c-WY=VMfGh0%7HT}g1is|U6C&eKsa!PJb5wC5rZKR68l+F(->I_Dinjn zQ1~FC0HRL}bH#9`tP~JSV|i6g!?BSyTz&-Pj~Lm(c;KMPsE9V=T^G>7;%HZl7ZW_) z%?vm`ij|20F-c5zM6q$+l6GNY?Fu->RSmT@t~f@(D+9?NQx5w;512R*B7BUP%H(h? zlf%U1k=v02{3S7++ksblbWS#&^X8{R#4J}FCuU>Kk$TWe)DVWTHjBL}fQ^)|09nrg z?U$ZXRab|=MIM+iZ*U&sA9+A>RV9C}j0_2gdE$6S%#Uff_Ap#gM!YS?Nvj5zz9)JI z#EG=W5%5zye=$y9esQ8$=!!*5%GToQ@`_V@Vlmj}1fKvCij#Z-`zqElo|n0zN-RgS z2G(aNoy4oJ=GDWD>@i?cXIP55t^$@Nf*{jo&Yf*I^;B2XvwTi%KqMmqewoG`%cFoX zR&q@mT1Z6hA}?z3kK#5Yf9M4_?SOt zGuU6c;zDLeKiF}ak?Bn27rWwDEar7X)#)($?iZK1;!<%LbQMp34NML&Y&)|GMMWv% z3fN=<=3Q#SLP3Qiu8wWEkt5T~>-rTloD^}DxYiZdv8iQ4ih`vb(S)|F-a0U@Bd!O1 z{kVN#bg@s|h&e`MR(=M5vnw_-cpt#eV;Y3E7q__LRsriR#Za2*300L5<>iEtIdGm& z+yUH-pH_0rjOoQQ<}fPmbj4lbH^9v)ku~TQYKMm6nw2Zq?qoMNMcgBP>xg^7F$r`e zHE_j!JhK$GF^j7s9Btqr*leG85HxBweKT+RmJZ&`kIJX0q~~#4U9pv|xUMiGri19C z@G)Om!5`%aF7@inhKR*II9{mP-AeXqe$+ohW4WvX99B`gVnsP-4>94dtzkMhDn`}U z0#N^h4VYxTV7CydG}{8^t1vJyX}{6btV6j$?P=_sqqwUnHmw(;8%nw)N=hS&#UsUs?De&ilhI1pHXG<-2q zG0U-QEV;gMcBFw-)7Q-QFpYb3?nip6i2;1;itiWzJO0HrAU`OSy&%)U!x%oTV*}#{ zSNvPRGIp0#)l|-^ZKz`5#MVN|z!Ef)!j)1gte+Y)xH5&K2wl)Oq3u*bNoSz%&iU zI9*v^YTinUd@?;Q9L5A>rp$6=5O(Ondd2bsuFRG>-ikd5#jy=RBY2MwHs*nfw?RiU?(tAzsjhO@pX08Rgp@c>Wk+au5s@beWl43n(!q7B{be z-yxW5)H9q=yE@WffE@11VMej=UV3h$sr1PayqR7JJFcenNLLneYqRr-I-fieRN@Kt zc-ycmi?}V*p*L%;@=4g*#-y5yAe%u?q|(41=gOlE*3iBb7SD{@L<1(I39g*T#$lil zU_5|632WLPeII7X?HE^1;Z`Y$R>NUh%BikAmdmZvmLX2zlhYF&hntQwT{(;W$Bf39 z>&MfLjWZjPDGD*MZ#=6xuAIwoeN~mQwy=i%u{X1_GFL9(l?AFeauz}GufZoz#QQS5 zje(OKVeXbEyK-StGk`<0av+XT5+Ze036e8Sj*mN79!*{~Fv4caXjjh;v1 zks=PZ3!0eViSoLtp{AB=>T2s7O{_j#2b_VfRHO)xk_T) z>6{Bq*d(056|^jYj6~Qo2|y>{J5KUI{2W-qUfd;ejVn**?M;V0;^j^vOfpz<121x| zE6$mbv4#j)WUw`00Jh4 zs``d%04V;?*!c;>;+Maa7di4m*r&10VzU#{Fw*D+AjVgg*C9yd%8NNP3D-OtC z%S#=32{t*_X?a6sWYy4PA~livstVq|c(=>s<(|fzjV+GA0_-fC88aR*wr5sHpk29n z5l`?+S6;<~tGTnM@%uHdyw=2TW{oeMQ|!p~v25%C-5t3BMw>CtQ0Fm?2RI;`Xi`94 zCvQZ|L*4|*!uSNn&@MXkzRa^2W`rVxU?87x0EAn%fQI}(meQY6i^aOFJ`PD=*Bz@UKrUJ)7J;CcCi21X~9 z6cUW3<1o*X8bn3BrbUjt&m4#FR*+N^Tkdb=1H94)akwF|(xi4EQ0BWYYoBD!)r=l{DJC(>A~ za}Yj7y!;UPs4E{c0TXCppWK0T2}}F#qyZ3!g)RkWzuyTPGOif zd91t9DVO4OI>BfOWLCX(HH%aj0QZXU%V^(r!`Y(BlqK-PR_;0R!m(4Zi z&G}W8jmtP#KFKHH!HB+imLIxuxBLheEsXTYYK}>^i=0QbD=c;hh<~{96LZdiiHZGT zF8s`upEEgH71gy35l4OzV?MJ7UjI3@r$lOCrPl}K9{D9R-&gR;JK<=LCED@$Jnr)^ zSAN4I``LXm(0uYcXaX-l#_QPY%6)P_Og1k8P_ncJ(T9oU4bYyQE(oel$bY-CO%Y5c zXcWks1olCV|0h}nlYd1?S1FDltMbZ9pRzy`?c#2jh;m%zQwaU1p~>vp)1v-@N&k;N zD8a-?p)+K&9Fu!gimP1K=c&-=9Fj5UYXEVmF0SgT;PUv`L-SmbVV!JBXVy!C6cH^~ z>8{FPBJvqg2^Zg|;1V4*fBftjB{Pl*=Or6~d4|yPR;+}SSRBb4n|C-$@)D?LmFZL2 z*lXjjvQzA+5Kxl{EO_bgfXbm>KGg&47l&`UFhYB|sy8Fl2ZVaAwu12+NH~bxsIRN~ zaidf;N}$}Q4ue3PP&{oW4kjf6a6%1m)j)3E4VKS@NHqsrqla}ESb?hsacu^G#VaO7 zkTQUItRMqZlCtNF{li@~Oby360S@RiW^rC;o1MTl;)3c3%(q<^J z8}Bf>K*T0Z@YD2Ad#3ZLFp$7`@`WWcN;yD0b4Do(6yZ~Fj7lb!b22XvMp;Fqp&_qB z!@Sd~8ka!@LEGe&$B>lAQN3`U;Y`*-X zgfn>tF4%Oyz{$)v$WruBGjO7(6L3k;q7rg}$857)bsWoEIGHPJJV}Mf%5GKasyQsc zG>%uU;2oRis`=`8*5d80i)b{UgTZRj`W^Q%!81jeuV`gtoxqbm5gYWACf%v7i)U$z zCQmMbE)HnAy7auan?f!N}b}WYMxwHGEXMv!dzJ6s#8e!Yh86FpLgNdoe_-?Psr~a6=%$0;T7dIYx0)zQ3lwA zIPA*@dGl6yd()7&q_#d<$w#7K`l)kaP4vey#l^hVb*?&JU4Q{_@Xj1%gpU?%A5n}h zmRn!ws*89FyVXZl)UHAppgNW_V6$xl^UAMXb&0wZHVTl(W{05DJHtyH{RdTw2gT1p zDh;YU*FatFsw>o$AdP5%J+a@Qmoxsu+)BJ%>r`VOWPG!zjtmyt+1TV9b+t)W#l(kq z3fgmDhXzh^(SHHjy;Bxcv+>JExNApgxksBe5<%9QdwUf{-BxKBC88V8Z|t zfrRY~$;a{@W@01Tf~YgOlG4UC9N(~vO#rFsMZKdumJwME;~nCl9eTTgNb2jMD8|PO zYj_CdM^Ovin_)%(5Hxi zz}Bd(sa`X)CYIO&439%9u@yXr8g3Iq!?fDkQ&!etQaHYV@G&stYh31?@PqM+R1!oB zFjEfQi@uR+_>~SmIiL+F3u8E6SYE#r=yapIW>gC#*1}kN$E(gyT55djM*m2nWNK35 zPV+QTwT5N~r@6634*iXl_#>`*R6PcCu@d*Ng*jUTN>~Cy1MYCu?-X23f5Xbf4d#*o zbkRtmWR%vnlX2tAH0>^^*F% z7n6&|jrkrzuzi*$3f57tBt>#!@&CCnNU$I{2wn~#pkBs_arLtLgR5RwZ@}b(B=s63 ztdhjZl;o8~7n_K7^JL$2)mwZL!)A|pJaV!7;GwC%K&DRdDY%fL*r)!6uhIa$r`}_I z`}fY{AqQe|;$#lC*)eV-GzKhf#JJ5*KGPb79#DrAi3b2AMhu!!iIp8=m7BPw^F^a!-)xXp? z;4*emJRAex@$)4KMEVr`!Lbu-S5{Zn^l!|IvPM$4qhUxMBK48H@_PJ_qqCKHjkQU} z>6%C*9E2E)0S?cc!_~9-gdh%UK^X=_j{1S||8I_TPCgLbUP)q7#z@iRYM~{71C8;Z zJm{=5Jz)%7)^R3E3Snj>6r%2+II%(7u6E2(6@X%g&8OjUhvu5l1|ep1R6QH20H4tTDa}Xy|kApavT6uN7Pe{h^SXYl@dP4TUU4|5gDrKgg;OdEbl83<<@14*Y za-w?EaB1@^KF#D7Mvjf=b_vvGy`r73s zxzTi2&tP))vJ#1GCeo6Qo|Tj&Ew3rBUei#;S=~e{pPmi)W^4U=j-Kb}xk)F@W0OTt zx~g(zBoQfa^?ZT^<XRT`^vTf!$uS!)s+&C7V%orA9TVRF_+^Wgd8AxeYd{HTYHoZ5mIj#NRE1zNxC`iSc3`-yosgr5{5o_bM#NX z`IIc6qil&N1RrSJtsg)jT|dY+ZPM7$MmX`prj;>&8f!76z@x0dN4A+!(sbafc?s~t z6N0vryl5vgL2_0ItY2Hpzr&HtpNXFf#1^z4Ty=K;J*%EhP6mGWKcZb}GmxJ4Z8xB}DRuKn{{ zsb_wA@2%8l3tq$)8pt07`Ti|5I6r;p78-^YBN9LlF|!_pb&R7_c{QaY!<#Mtik!(i zxQl!g9Y$d@pzDFBLK=l(5b8ypH|NQionJ3~ zNZ2e*P!Wxe!W@ckUXGQ&nfl+4ha?QpjHC%!Q81D(DMvf6^Dsq|^S9HOvh6gkEPZ?{ zO=M6lRGeOdkL`49Su0I%p&8NA=vNCJ*GhA?(A)&(5~#{G8#WhvF%Qe1i|Nj%qv?1m zrn00NO^%~zKI$auc=ij-_C`P?8t*Cj1%n0)AzJ7JUYts7FD*5o^1Wtp9Hrns%tC{a z6k0^(27@WIm@3e>5)i!I;kpRw1mAd#550tk?)EVz9|FO)gzTL(A!Ki+r8}t~mOa-X zs2T_|g^ZyZd;k+IR5yRnF7k7E!}O5eMFD<1Ev!SLceaJ)45an6+8x)Torayp)cfYBdC^epqVCz0^10uoOjTzVSmuK zf&9AA*G#FV+wI(qpF(~$q=lNzbNX)*rP`D-2#D_uZ7rr3mQ^>uV5c)o7dirhKb*q! z(MtD)-Pl8F?4iqcx*t^!hP%cd(zeq>DA^M3rV2BfZC^n!V|dsX@@=M;4b(5>YoSLr zP!E28T;67V80uyoTjuo9W%1R1mAeTMK=76Xhlqq<`8% zpKl-ss!pqO3WGrd-|PEj6J;lwewmhcbG%(%~smmM2-RoeNJIkFwsfSPRfZl zA}pVwvoYLQ`_Oetfn@eyigk`llLk^*t}V)FsoVQ znF_rzRs&3PO=h!Mo>10C!j?q41-KHMA>5r*6-vzzX{I2RVWfMH86p@fL$l2yyG7*A z=cet8dv@Ns*H&?eSA%&%p73a9%V~9N%f*20Vo;eWZWTkqIiaqhoEC9-6OG^}W;d^7 z#17iMRTP3}%-F@zIU3dz;rY#USST%&V?9c$OoalaWjd5n+JXx1?X|@VW6OZ#1tvp_ zGB7tByOa7Rw;S6@JEkq!JrvkU!B8NWvrUYXxMMl73B)VC&0~@ipQH~3J7zY~5ezWo zk0BsRM@%_crY1_Ho9W9IQ8GXMcJ#_>qDsb!*OqB%Lqc|h{NALJ8nlRM(M2><{|Cj) z41wj(jV~nHAtlkwj1p|3lM_I|6|<7w3|Wp#Du{B$ppHHES%h6CrwMLdQhBv zI~8?YScWLaf|8mUdM?fo746r_{W3&^_cy`4U1Hq3>4!Is#A~9w*Z`nmmi{2Or7hx= z=t8&>|9gCb1x*O0n`woEP7^eUn<0!)4!PXV<4=@%jOd0y&mOP2aTsV;w}CRadBX-` zNhww}(Mh2$8Dfp0#V!d*C_5ujR@WlVoX_pfNt89j%Fauat@6s^Bc`^9bvH$c8qepO zmZ_>mT(Ax^%_w+m)A!#dFO#1`ZmeO~7ID!{^k66u&IqN1Geda)^)_)ibX-<5ofgXS zbey;<90aciw~1>&24chxu|Ay5x*}T*-$54|ZQ(t7`XXBo-yt>_jp03pQ+U`6aRblJ z%mA=%V(qy*R)SJ*8!)C(is$nH83uNS2R73{%=CbTxcn!`>rje#~7ck_Dg5Bs=nbYuCEiN~90hIkun+ zo;T5bbOWxHZ>9%fmu#j-XbU|~TXA#yVS1gm(>o~n1oi*I{o^(qc2@M1uxXd@(=)=Q z=R}a67rp2O(H}Ru52u&JQS^H;fnF0+=yfrJ{wU_ro8n}8OH|RHL?iu0oJQ}6({X?K zOx#Sqh~5{M(}&^)T*$nYJ{H>%Bm5oh5ij6~&P(|JFZ3nuHhd+0^tC*k{w0s4@8op+ zzl6S*jr5s3jXsfQ)2BED`WX&R{vbC|o5c3v(4oYULQ8HJj@&8uI9x!!AX4P(B2~UA zy2!taZt@e6A-@)xvP}dPF59Xsk*#_os61GNRH4Yl36AbKz|cb-Cwi*|qK~Q+hp2kd zSFII?s=Gvgb&tqb_lp9gS@Mxe8HBvXFttYvSKo>wbhaqeJ;hOoZiW$G9IcNK#OxI_LnffwuoZc*E>sB#W?||R^XK}oKM=a3qi<9-2 zVxgtPA}dQQwu(fBHBKzCCW&R%Y*A%Zh~-v|IK?_!tgvnqHP)TtRBMN5u$~mFte3@V z>us^d+9S@e+QeGh5@*>N;!HbBoNf0OXV`tkId*^X3wyX2Wsekv_85E@<9mv@z@8;8 zv{#5<*=xil_OHZc_SNEY`(|;4eW$q6en?zpKPs-VUliBcuZ#8e+oH+-SZuJr6xZ87 zh#MSR+~{-@H#xcDX6I0`(HSakaYl*ToJrz#XDYqs%n^4vi^Sc|3UQCK68GcQi2Ix~ z#r@9N;sIy9c*wayY<4!``!3Pqw2D?|huG%4Bp!DDD7HKAiAS8T#iKqF_xl3kabJem z;ma0J`0~V)zJB6q-!SovZ=`t67Zxx2#){wjrizz+^TaE@a`CEfsd&w|T)ggECEoCz zEB@&Fm3Y&4t$53K8_Itx{>I*gSWf-e6Nq^ic#3)#c#3)#c=Egpv=iItboNK^^f2hx zGEa|)N8wR4(Gu|({1FHIRUsY+FZsY1f1Q!^5ie8}<5p;Tprvbwiy_^gI!9%H{zY`F<@YF>d?g;uFe4ei2DEm9{ z44%@&1bdHoRy;@D#Oa`g=S3fcn~LqO;IAhrL;S|tC|<-2GQ|T{6ZmaA1;tkDO7VL< zWr^+9W&A4yl#Mm~S-gxMIjSDN74(XDm2z}0ZibjLXAOSK;x)`P!#R_h#UC)!OlLhU z6R(RmDCpcp^Ti(pENI_STxWVyyhV<06%7%uV3j`OogLxfEb5&ZoQXdHD`q|7&$0DD z7NkYt{uT3l8zOH66%FyH6t>YIN^uC6_up}7y+ijqbcsW29a@H0L@e+l8xUMs2WjKb zt)`W~4Y7;=3@U@1PKV=RreO7*O$GkCLl-&%KUXp)_8%sS{~lt`wGF|IAL-~IsCBTe zvJK&bQ0IdltgnN+)8-$dZ}9_QZBQKl6BH?M+4}ziO4TeR4us`)I{} zTHuI5d+CsUbj*ITL{=N(8$XUQhj#zit|eh!jp?iQ(ZYSSEVm6D`{Uq#lmwE11u)t4 ze*0)<_C6|WgF)~!DXI<8kss;$pQv~&Wp_@A2kGdc$>Y;~)X+wKDgD0&0uI8@yLH+P z5_vxjb;LbK?S)8{{2MP|ISwf9!<)kQnF!>B3w9#<*TI0x5Pyr=Us3xlxrN>;-n$>& zdOO&7{*-!)&nRDfPKDwN zDiUAQB=HT+65rAZu#1+8@2NrTrPbmG6Bo<#78BE4_<1ST8yqP-Q+$Lc$x;(?R~KsE z2rM1H!4pNqS5ZW)0wP9XMYRVm=Hr7Q;+_~53J=n8P&Df0nYL(XEN*>|x~Dw`q#`XX z@=1p>Vfpoze#(~tD#ZQKBV`(mm+3TJX3+66la|OJ)yphul%XUHtcqh`mC>P$fmOg~ zAc_Ht)RDg7Bn0mNW8o$S2~>k3taqWx5qMV5i|GYkv`sgwmXMBmA{%DFe*bKP35=S+ zLWcMpejN(2zi<=bn-$~b3%#gCd=-EFCh0Xpe4lV7#q?&n8twN@_XsAA-vqaDu z+#>a+wzqgt{BL&COi?-qnIby*chaF=LpRY-nrMkB_FUY-n`M`s^b4NF)j`9I5h9|W+qSF?ml3ESTGAs*>lZI(eQtL#|Wj$qUpa z@VL6x6?#&mvvrn14U^7>YJ1NRxn)i;~!Bl271EgZ$qkarkm>*e3%onf2PbwRK9 zZ_7e*_Q zry`O4f_xDqwVvk6moTbr$S8-L{gmU#>oR*4O?Twh{WJ%kd$Cr*S8yRbUj{slx2JoX396x4VRj}>+c zcDsodd2itilgpYK$_Qo--z?v3qR}CLzIpSCXjk<6rCo>_G*g$@D@?Lh`De~GA)+>f zGehe#1=4yMk8Nt(4B+nwD$EdJ&K%-+OMV&lJ5bKY0JhWavQVH^zK7EQp+JWGdyD*l zvy_w>3Z#$6i$wHBbFWlT$j4>jz^=9@gV`JO1$g~b-SZznHR+RMaBkJ5A*AF!WaxUz zcDV=R!k}rD|3oZ2vqgR#PDSQTe%m6yZ=#(10#jx_TI3J95S=nYsSi?)sqYukwwDac zL^2E%JFv9O3OS`MO3dfBYByjh$S%N2Gq99x%74!=f~Gt_WH|-~3OJ(%NPNZsknChg zH}b3&n;r`>9TjMzsrd!@W@Za;oMM|wl?Wmas_6DJFrRUuC}%M5cgNXQ#Wgm^D*4~DASxx zNZ`3$<+Aywl>s{^rWj{?%n z>sD3VqNW^~6C>t`ZdKF5nYu8$qgmT*RPV90^6FllHo`lDO|*CUjrwy2W~ z#zO{VR;yYR&JAUSLcuiEqAEgJEox~fghZ8EE^)vB-z&^_RFnm~RqD!Zst!cy?8E{+ z8r`7~P-;<)q1-T!4cED(AQa*!y-lswR2B~HYP+(TM*Oz`vAZ#ev~O)p&>|VmDJLNA z`B2EDoOaM|K2MShKE(+Y&&%!6OxJ{Z#JpS}zdPh7vlw*tTHc+0aoReIX$v*Q8S0!Q z3Y(`3aiGF5Ar=_!i7dRsP>_-Dxs#3z^=wh+LCK16FICvvycOm(BZu2F*t#%ZyEkJ--J_FVj}6LI z!y&=$fG{rz_k?mS&J~7o?ctuD;8Oy4G3mq&E$Ua?-wd@4n1N{ru)xXKI8N4w zyXP0I%N4=gP+|qazD(6 zALt~6f0rpq%ax+lO4BcuMOWha8fDXsDBpxO_u$U?W|f93ni=%4%A`kC7VT2m^aotp zen;ivB1=#DO!cNOR33eW`X5w3A#w5AR{e3qc#ud(POLX>P3NnjVx&4;jKTfjqt!?; z19`H!YLr-n`^mMcNYty*Vx<}<&QTM@d1|7#4&T?SN#Z6|EH)vRc8@9%52>l51=oDH zsp;Y=HB0P7e(ha+f1qZIk5sAnM9mZ5;4bdJ)dHEWPLLsWlI*3*qdZBimW$LHxeT65ty&Au<}7)JIvXC%dGKJ? z$?MdGa)Y{9-mZQv?}1lypSn~&2+!tGb(MTdT`hO1Yvglky?kA5kbhCv%Xicb@;!Bv z{7h|>U#m^>TXl=vtA3*_7=f<(t;$mOtB`s?^-vF~{ty{MRjV4o!dY!s#khzyMLnjD zRXfx?^#rcKKB-PsPpi|_E_JqgR{cUfuP#t8sLR!h>Kc4sj~h}qsaMr)xXsk8-oPk- z0^~odt?I9U_BJ5AgWi8r&#Cv&>V5T=`cQqKK2jg!-+!u4)OTtRth_IEs`{7ip}y6< z)pvTR+N+1F{d%gj7{*<1fwVtK@`UIV#7wJ@8q0{sd-3=$sGxZuB)N9e_SGezS zmF}T$!FRLnrSH?d^=6%?AJu*Ik;}BeT4o> zkJR7kLQCjTmR}!fx%wz8Lx-&(zO(S1jqewJ}OU8d()>-AjgW)eEc# z^oiDs`ef@*dXe>xuC(6M5$jXE#QGNBKj@_hf-bj}KE>{;tL>0pVIQVz?SZ<^F4Xn* z1l?el;JH+vXrH9l*vs{NyHT&TFV<(-SL<`^YxTMIjru(MHvJ3x0lm)NjGe*kzRF3{S2(#i_RX2br)V%6&M_0-=@~QO zot`lh9#3qpE9&BO1$|r#sgdp2>N-4Glh=6jBkeyv%ghMQ~{%WsQoz( zj8z~4`Y08u>roq^y>_1WguwHQ{A<&cf_r^C_{Xu4Rh+92S2y4(RXrg7pl*bB-bHN} z a6)Rl(YAE}%1ltv@%57b6Hb)zHg_tYlLART8a=c-$93Nr(TIcKX|QJYDd?Ir3q zJY|R(dX&0d-9eeils}1l>fb0xt#*ZK##6}pWkBTIo8eM43l#V zSr5=QbszVzUZe}u{fI$yx4Y6L^#HA+p7ub>R}Z3ZFMAO6R}W#%z3mZ{r#9m$&%T(B zP+O40%(b7VnW_b4x%RsRE=O5+6TjfdySGDI<2$sKEN>V> zR%mj7ZbE4eS`(*>Hw zX~TBs9BjU57@IMsi-Gak??3i3U3iu8K5d}W|9YUn5zu}|{DgjHmOPvz_e3XIkUea8 z_X%)qHDYW9IWimnbhmo>t=x&g-G1td&%V}Pvf606mzU#|a%Wox;PL->3^R(O9%f{~ z3(wq7y~NRCKhioUIO-~qZl!-uT^L0s+xPRJYTRDIf8MxlaL)e+SXMGD%zMy&&c6W# zv$2BjVTlaogy4U@IX_SjrYLbw8}(uV1*-gU1a_byuVXxSKlW$#kHrVuaQ?l|&zgY; z!BJQ}eyW`)*arFdzbz&Ua{Ff>gJnSmqx8SWBPbq0(l$E$=XH0)dIkX5VuqG`jBH8y zpMXKwB!B_QOkw}i+Oqz~T`BmP{iDcj-c8l8HjDxaT@#Eth*Fhmi#6Q%Pw;)ocgEo?$>PfDFN9_bHK(lVbv37iIqLdhr z!H6DhXuFVeG+qdGDr^ZtSSLl_N?r8rl&$ZeJdM-d`Yt+L|At2DduWXQEgh{Npy~QS zD$}^Dp|{X-y_IV8!*sfSgw8|Xi}a49FzLlH8;dSBmK8V|Pv3x-CH}_W*=i?j6NO~K zDQXwWG&m(qJp(;&LH3V~KIPG3^(@M~FzF<+_e15&J^!X5kir6|O{91JfDa$-HgvEX z_%<5coJ&Y5XGx;I13OFpT{>@9aJmwCZ_KNhLpTLE?Y~t$2UpuXLG*`ofKHfSTlLn&W6U@N=u)KY_K)@^10jU_NA;oi|s zD&z*kJZ{`b0}v#^L~cX;$qIK1!S4!n3u8~x02~a9;Siw5O~v=hxFBd}JFV(nH0%}% zY!M4W-R{SpzD-}zH;7qyJo+JSw~>AUNO_&o^c$3^{|G*PlX~hugIE7T1NC3=r%>Of zvHEXxjDC-f*MA3pen>0yM|6q)gf{5U=tliHZPa_{R{c-9Lw`y4>#yix{V#e}e@8Fq z@9AZ|k6zRJ=?xsHe9KbwHYDtOmY=?`0`!%YLf=^Uvp`l?+GnK;ZDk6dl`UK=M;u~> z#3-w$7-#juxyn2-+d4$dwfc&Pb*QM)dvG>(uvlje6_;4U#TC{FagB9^XtG9%8>}P6 z9XMNi7tYo`Y>gMcvnCogc@BOIdurazK0K-SLEB&xJh6u)aYFN9^#ME!h0~a=>O&(x z(!^%98&4L_@Z7IH!r5sX=P2(b{2?Pq-dyn;^)Y(*sHbRF|G<-<^6;l9@;v&P zF8F+A3Ju3!(cm+d`0Y=c4B!4!Bt$nL3d5dMDqMwa##`%xi(viLXMoa`Hi~}gbM#2V zAK~z+Js7o{c$fm}3-wPtabEQ{>gGEd!m0woi&Zcr7e4qK=l9H6GDji7vzL0e!AI-% zV{KqYvk>E>mj`KMz~fZSLfF099g-`%wgF8C>0p53ud5RO6r?9hL@By(s;i2n!QfW) zWmqGp)J!wIAZySb4%s-!M9Ys#6w%wvtWGo3mlbqy9Sqcu?~qO#-=e+(VXt#=o;GA5 z8}#lvTLkTB$aYiP-3eu6(zw4je{4&svC=!-nV0$%1p_blM5?;NQ&h5RAhNAY#ny8#VyKe1*ot#ZLMw zMo)El&V64};5@>`22-CB$gLM3*62@STetJWzr)vBiX zRt+t(>S(ETDlNAfsm@wOE3MVE);gWeMxRTqv*`-!T)NIWk8ZTq(Vf=$^oVruRz?`2;%O;CytQQXM{i32MP$%8beh+9IQN1-GVTOpElqx`LdAl(VbM_ zl^IGqjJp1tT|J0}{cI7pjtJO$VW#Y*6a<`8#7KU^pV}n;5x6LWzKhX#)-7PdufvuI zM|p{}zWd6!FsdDWgG{b4z(ueLM3^lAuPnsO?KS-pS3FY;mxcqJHaS5Rrf{;z38pZo zb50*r6~=v=u3j1K8hi)kv(8J47QDpdi2MV3Y!^9Y*}jk;8C|u%MYXNNG5VB{1Gax4 zWbY#VKw|%Aa6a2wkNrm`$=X2OVD0v?ZlK}TjWiOr>u75ul~|i-wsk9L;C4F60&iG% z(wWv>beVNG-G;LJtovv)f=yejhs=Ji15X1p@%{8J34l4N#q1*QXN%cI-p>}Zi+lp{ zezS`fcIsYZmqC!z?OGwg=1?D;IbcQN!_}U3My~kb-<}&)AGk_x_7(c~$w-6?+2sU9RM`PcAU`Kg36v2Kdw%*+`vEL3%=25-~-Bt3u) z&ZGvMMv0wgc@=tytXA?_TcQ89QKt0>0;o90Vm(erT05x7dXkQ|o~Fq#I?JqQsM2~C zQt<_9uwJ6o*2{E;^$MMDy-Jtk`&#P{biMUDHCu1ez1CZ_)xzZx>#y`2zF)E4p+8vf z(Yx0B^uF~WePZo~f%h@(w>}Ym>tm5^eI|0P&qY7$3o*?4QWRNViDK(tVw&}>D7C)F zrKoR3wY6W=;v&tt*8AcjTjR2lEpE3R@v!X^PuMBqSvys{jF2z;K9`z<*00345?5OI z>JGS4yb|R~pLjNUP%TqDs{4Z@HLa$hdH{mc7TpUo>n4<0^e)}02f`e~-@l=2jlt!B zGkbZmRScsdosU|dD57Dy0P@x^imAUIgr|U*g}-WO3_Zi2r&I6;D)Kl|AC|(A$;0>K zQVjyJevU@UJwNc-`rV@IUP^7ljXpQQ$$YEC*aXbg?0X^xiC;C~SXIn6Ku!Bru(9@1 zH*oinkWl=C*B*PzT#vo!Ipz>#_@cgAGi{FXs{&i&UZVT}ehDA=ioF_F3x}=1X&@}f z=+uzCRS#{^!(k+#aAb!b0}$}fvufGUc5FhzFF>+^>i>b_l7AT$*V2py_rm zI^Kq}Zy!P{?0$5beHfi>_osD85?pK-P?J5FZncNdz4lO~Fb2{Sfb*<FzFq*0gvmjaTdDJ zBf8Ky3un_rT?AbapkLxrK!S!&CSMyAMIb>L1izf)>};w-10+{ONrqKDsxvcxK-3pG zhe5__Y}Yad0(63(==SKu>IvP%haA^>#|T)J8j680nS8JSLbPAVjvp+594-rMoGrjv zY4$wfhN1&EFv<5fp~dB(kj8Oth)XTD$S%#&HiU<`0b4hy|_hJc-{Tm^il+9#7G8wiUAx7 zX*POr@4KDn#29sg4bAyXbgETW+)oqJJEO7>x|Js!IN?K-F z*q1hbo4y2B6ZECch)kf>6{eLN(z-=o#fR)rcC9J%o3iylt-ju{@(|^L?`&e-IL~!>^nr+XfGP{%(+H=6= z^JtkppH|z)(?#|Iy4pUGuD4I3o9vV6E_)GDnC0N|#o+QvdevS+uiH!MZ*~>!v6s^~ z_9^&P%4*@-%SAW4Mr7HwqPKmjD6kvE5W5lAFjt9b_Gx0Ky;>}=PZvw=GsJRxtypQF zCC;|cxB_N8L4eVO>d zzFhk3D`mQUl?>Wf%RKu!ImBKsN8q#8n;qm1D})n-I?R8y$z^Eigi}<36dUt^{I) zUV@_M0X0TxndC(*y1Ld2t)e2<%O5@Com2y9m)XwLg+;poV$6YhGmBrdT-qaQ+@^mD+ZHm?7`5C4su03*Xw(a~hqI9lzne|IJMg0v@P241pgp(znOC2fTw|t$jcF><1{-eu&cS&6I@`($L>XiEpF6_I5hTeuPHb zkJAMEci^HYC}KZFr{Mi`v^&>+mM*ZLr%UY@4RuZNmK&okx-3RrbXktv5gh^!A^#x>Zy#}_m0dHUQP>ExV}sS;ghJATqc5I1vT!c| zzxJf>QsmhoFDLNbi}7Q>O3MBNaQ-@Q{RSOs{}D$vUZq0&ErUbvO2DW%4oAgt=pChy zz*m36g9^wA86MPhD0DJg5Z;vljkFJbG)>=&go(NFD8>W3Op0elf68gP8rw|E3VK4r z+{bY>m~-hhxb>y)FSG}t7-VHG;BZvDZayb(Zlf$HXwCugIuV$zo8L@1rU>~S(-=hA z-)oKl50XYVw%xN%iJtf|khb->3VD7aIWZa53fb=i2_Jy)c2m&)h;r;tKyaTzbbp4E zCZB`ozMyILKWV1@HJxDpiz@AJX}SF!Rofp^E&8oSfP#&BkLb>fBkW8B)%aJze6&(O zgij7~)fi(*AtbT@+{4CK4$VjQh%-HX5v%629kFBZ)(@15o7%Wr31etC!Xbqs^EPO5YuA6uTqTTPD -1 && graphGroupSeen.get (row.graphGroup))) { -continue; -}color = null; -oneColour = true; -this.writeSequence_Ref (refSeq, row.sequenceRef); -refSeq = row.sequenceRef; -this.writeGroup_Ref (refGroup, row.groupRef); -refGroup = row.groupRef; -var hasGlyphs = row.hasIcons; -var hasLabels = row.hasText; -var hasValues = row.$hasScore; -var hasText = false; -for (var j = 0; row.annotations != null && j < row.annotations.length && (!hasGlyphs || !hasLabels || !hasValues); j++) { -if (row.annotations[j] != null) { -hasLabels = new Boolean (hasLabels | (row.annotations[j].displayCharacter != null && row.annotations[j].displayCharacter.length > 0 && !row.annotations[j].displayCharacter.equals (" "))).valueOf (); -hasGlyphs = new Boolean (hasGlyphs | ((row.annotations[j].secondaryStructure).charCodeAt (0) != 0 && row.annotations[j].secondaryStructure != ' ')).valueOf (); -hasValues = new Boolean (hasValues | (!Float.isNaN (row.annotations[j].value))).valueOf (); -hasText = new Boolean (hasText | (row.annotations[j].description != null && row.annotations[j].description.length > 0)).valueOf (); -}} -if (row.graph == 0) { -this.text.append ("NO_GRAPH\t"); -hasValues = false; -} else { -if (row.graph == 1) { -this.text.append ("BAR_GRAPH\t"); -hasGlyphs = false; -} else if (row.graph == 2) { -hasGlyphs = false; -this.text.append ("LINE_GRAPH\t"); -}if (row.getThreshold () != null) { -graphLine.append ("GRAPHLINE\t"); -graphLine.append (row.label); -graphLine.append ("\t"); -graphLine.append (row.getThreshold ().value); -graphLine.append ("\t"); -graphLine.append (row.getThreshold ().label); -graphLine.append ("\t"); -graphLine.append (jalview.util.Format.getHexString (row.getThreshold ().colour)); -graphLine.append (this.newline); -}if (row.graphGroup > -1) { -graphGroupSeen.set (row.graphGroup); -var key = new Integer (row.graphGroup); -if (graphGroup.containsKey (key)) { -graphGroup.put (key, graphGroup.get (key) + "\t" + row.label); -} else { -graphGroup_refs.put (key, Clazz.newArray (-1, [refSeq, refGroup])); -graphGroup.put (key, row.label); -}}}this.text.append (row.label + "\t"); -if (row.description != null) { -this.text.append (row.description + "\t"); -}for (var j = 0; row.annotations != null && j < row.annotations.length; j++) { -if (refSeq != null && jalview.util.Comparison.isGap (refSeq.getCharAt (j))) { -continue; -}if (row.annotations[j] != null) { -comma = ""; -if (hasGlyphs) { -this.text.append (comma); -if (row.annotations[j].secondaryStructure != ' ') { -this.text.append (row.annotations[j].secondaryStructure); -}comma = ","; -}if (hasValues) { -if (!Float.isNaN (row.annotations[j].value)) { -this.text.append (comma + row.annotations[j].value); -} else { -System.err.println ("Skipping NaN - not valid value."); -this.text.append (comma + 0); -}comma = ","; -}if (hasLabels) { -if (row.annotations[j].displayCharacter != null && row.annotations[j].displayCharacter.length > 0 && !row.annotations[j].displayCharacter.equals (" ")) { -this.text.append (comma + row.annotations[j].displayCharacter); -comma = ","; -}}if (hasText) { -if (row.annotations[j].description != null && row.annotations[j].description.length > 0 && !row.annotations[j].description.equals (row.annotations[j].displayCharacter)) { -this.text.append (comma + row.annotations[j].description); -comma = ","; -}}if (color != null && !color.equals (row.annotations[j].colour)) { -oneColour = false; -}color = row.annotations[j].colour; -if (row.annotations[j].colour != null && row.annotations[j].colour !== java.awt.Color.black) { -this.text.append (comma + "[" + jalview.util.Format.getHexString (row.annotations[j].colour) + "]"); -comma = ","; -}}this.text.append ("|"); -} -if (row.hasScore ()) { -this.text.append ("\t" + row.score); -}this.text.append (this.newline); -if (color != null && color !== java.awt.Color.black && oneColour) { -colours.append ("COLOUR\t"); -colours.append (row.label); -colours.append ("\t"); -colours.append (jalview.util.Format.getHexString (color)); -colours.append (this.newline); -}if (row.scaleColLabel || row.showAllColLabels || row.centreColLabels) { -rowprops.append ("ROWPROPERTIES\t"); -rowprops.append (row.label); -rowprops.append ("\tscaletofit="); -rowprops.append (row.scaleColLabel); -rowprops.append ("\tshowalllabs="); -rowprops.append (row.showAllColLabels); -rowprops.append ("\tcentrelabs="); -rowprops.append (row.centreColLabels); -rowprops.append (this.newline); -}if (graphLine.length () > 0) { -this.text.append (graphLine.toString ()); -graphLine.setLength (0); -}} -this.text.append (this.newline); -this.text.append (colours.toString ()); -if (graphGroup.size () > 0) { -var oldRefSeq = refSeq; -var oldRefGroup = refGroup; -for (var combine_statement, $combine_statement = graphGroup.entrySet ().iterator (); $combine_statement.hasNext () && ((combine_statement = $combine_statement.next ()) || true);) { -var seqRefAndGroup = graphGroup_refs.get (combine_statement.getKey ()); -this.writeSequence_Ref (refSeq, seqRefAndGroup[0]); -refSeq = seqRefAndGroup[0]; -this.writeGroup_Ref (refGroup, seqRefAndGroup[1]); -refGroup = seqRefAndGroup[1]; -this.text.append ("COMBINE\t"); -this.text.append (combine_statement.getValue ()); -this.text.append (this.newline); -} -this.writeSequence_Ref (refSeq, oldRefSeq); -refSeq = oldRefSeq; -this.writeGroup_Ref (refGroup, oldRefGroup); -refGroup = oldRefGroup; -}this.text.append (rowprops.toString ()); -}if (list != null) { -this.printGroups (list); -}if (properties != null) { -this.text.append (this.newline); -this.text.append (this.newline); -this.text.append ("ALIGNMENT"); -var en = properties.keys (); -while (en.hasMoreElements ()) { -var key = en.nextElement ().toString (); -this.text.append ("\t"); -this.text.append (key); -this.text.append ("="); -this.text.append (properties.get (key)); -} -}return this.text.toString (); -}, "~A,java.util.List,java.util.Hashtable,jalview.datamodel.ColumnSelection,jalview.datamodel.AlignmentI,jalview.io.AnnotationFile.ViewDef"); -Clazz.defineMethod (c$, "writeGroup_Ref", -($fz = function (refGroup, next_refGroup) { -if (next_refGroup == null) { -if (refGroup != null) { -this.text.append (this.newline); -this.text.append ("GROUP_REF\t"); -this.text.append ("ALIGNMENT"); -this.text.append (this.newline); -}return true; -} else { -if (refGroup == null || refGroup !== next_refGroup) { -this.text.append (this.newline); -this.text.append ("GROUP_REF\t"); -this.text.append (next_refGroup.getName ()); -this.text.append (this.newline); -return true; -}}return false; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceGroup,jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "writeSequence_Ref", -($fz = function (refSeq, next_refSeq) { -if (next_refSeq == null) { -if (refSeq != null) { -this.text.append (this.newline); -this.text.append ("SEQUENCE_REF\t"); -this.text.append ("ALIGNMENT"); -this.text.append (this.newline); -return true; -}} else { -if (refSeq == null || refSeq !== next_refSeq) { -this.text.append (this.newline); -this.text.append ("SEQUENCE_REF\t"); -this.text.append (next_refSeq.getName ()); -this.text.append (this.newline); -return true; -}}return false; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "printGroups", -function (list) { -var seqrep = null; -for (var sg, $sg = list.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (!sg.hasSeqrep ()) { -this.text.append ("SEQUENCE_GROUP\t" + sg.getName () + "\t" + (sg.getStartRes () + 1) + "\t" + (sg.getEndRes () + 1) + "\t" + "-1\t"); -seqrep = null; -} else { -seqrep = sg.getSeqrep (); -this.text.append ("SEQUENCE_REF\t"); -this.text.append (seqrep.getName ()); -this.text.append (this.newline); -this.text.append ("SEQUENCE_GROUP\t"); -this.text.append (sg.getName ()); -this.text.append ("\t"); -this.text.append ((seqrep.findPosition (sg.getStartRes ()))); -this.text.append ("\t"); -this.text.append ((seqrep.findPosition (sg.getEndRes ()))); -this.text.append ("\t"); -this.text.append ("-1\t"); -}for (var s = 0; s < sg.getSize (); s++) { -this.text.append (sg.getSequenceAt (s).getName ()); -this.text.append ("\t"); -} -this.text.append (this.newline); -this.text.append ("PROPERTIES\t"); -this.text.append (sg.getName ()); -this.text.append ("\t"); -if (sg.getDescription () != null) { -this.text.append ("description="); -this.text.append (sg.getDescription ()); -this.text.append ("\t"); -}if (sg.cs != null) { -this.text.append ("colour="); -this.text.append (jalview.schemes.ColourSchemeProperty.getColourName (sg.cs)); -this.text.append ("\t"); -if (sg.cs.getThreshold () != 0) { -this.text.append ("pidThreshold="); -this.text.append (sg.cs.getThreshold ()); -}if (sg.cs.conservationApplied ()) { -this.text.append ("consThreshold="); -this.text.append (sg.cs.getConservationInc ()); -this.text.append ("\t"); -}}this.text.append ("outlineColour="); -this.text.append (jalview.util.Format.getHexString (sg.getOutlineColour ())); -this.text.append ("\t"); -this.text.append ("displayBoxes="); -this.text.append (sg.getDisplayBoxes ()); -this.text.append ("\t"); -this.text.append ("displayText="); -this.text.append (sg.getDisplayText ()); -this.text.append ("\t"); -this.text.append ("colourText="); -this.text.append (sg.getColourText ()); -this.text.append ("\t"); -this.text.append ("showUnconserved="); -this.text.append (sg.getShowNonconserved ()); -this.text.append ("\t"); -if (sg.textColour !== java.awt.Color.black) { -this.text.append ("textCol1="); -this.text.append (jalview.util.Format.getHexString (sg.textColour)); -this.text.append ("\t"); -}if (sg.textColour2 !== java.awt.Color.white) { -this.text.append ("textCol2="); -this.text.append (jalview.util.Format.getHexString (sg.textColour2)); -this.text.append ("\t"); -}if (sg.thresholdTextColour != 0) { -this.text.append ("textColThreshold="); -this.text.append (sg.thresholdTextColour); -this.text.append ("\t"); -}if (sg.idColour != null) { -this.text.append ("idColour="); -this.text.append (jalview.util.Format.getHexString (sg.idColour)); -this.text.append ("\t"); -}if (sg.isHidereps ()) { -this.text.append ("hide=true\t"); -}if (sg.isHideCols ()) { -this.text.append ("hidecols=true\t"); -}if (seqrep != null) { -this.text.append (this.newline); -this.text.append ("SEQUENCE_REF"); -}this.text.append (this.newline); -this.text.append (this.newline); -} -}, "java.util.List"); -Clazz.defineMethod (c$, "annotateAlignmentView", -function (viewport, file, protocol) { -var colSel = viewport.getColumnSelection (); -if (colSel == null) { -colSel = new jalview.datamodel.ColumnSelection (); -}var rslt = this.readAnnotationFile (viewport.getAlignment (), colSel, file, protocol); -if (rslt && (colSel.hasSelectedColumns () || colSel.hasHiddenColumns ())) { -viewport.setColumnSelection (colSel); -}return rslt; -}, "jalview.api.AlignViewportI,~S,~S"); -Clazz.defineMethod (c$, "readAnnotationFile", -function (al, file, protocol) { -return this.readAnnotationFile (al, null, file, protocol); -}, "jalview.datamodel.AlignmentI,~S,~S"); -Clazz.defineMethod (c$, "readAnnotationFile", -function (al, colSel, file, protocol) { -var $in = null; -try { -if (protocol.equals (jalview.io.AppletFormatAdapter.FILE)) { -$in = jalview.jsdev.GenericFileAdapter.getReader (file, false); -} else if (protocol.equals (jalview.io.AppletFormatAdapter.URL)) { -$in = jalview.jsdev.GenericFileAdapter.getReader (file, true); -} else if (protocol.equals (jalview.io.AppletFormatAdapter.PASTE)) { -$in = new java.io.BufferedReader ( new java.io.StringReader (file)); -} else if (protocol.equals (jalview.io.AppletFormatAdapter.CLASSLOADER)) { -var is = this.getClass ().getResourceAsStream ("/" + file); -if (is != null) { -$in = new java.io.BufferedReader ( new java.io.InputStreamReader (is)); -}}if ($in != null) { -return this.parseAnnotationFrom (al, colSel, $in); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -System.out.println ("Problem reading annotation file: " + ex); -if (this.nlinesread > 0) { -System.out.println ("Last read line " + this.nlinesread + ": '" + this.lastread + "' (first 80 chars) ..."); -}return false; -} else { -throw ex; -} -} -return false; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,~S,~S"); -Clazz.defineMethod (c$, "parseAnnotationFrom", -function (al, colSel, $in) { -this.nlinesread = 0; -var combineAnnotation_calls = new java.util.ArrayList (); -var deferredAnnotation_calls = new java.util.ArrayList (); -var modified = false; -var groupRef = null; -var groupRefRows = new java.util.Hashtable (); -var autoAnnots = new java.util.Hashtable (); -{ -var line; -var label; -var description; -var token; -var graphStyle; -var index; -var refSeqIndex = 1; -var existingAnnotations = 0; -var overrideAutoAnnot = false; -if (al.getAlignmentAnnotation () != null) { -existingAnnotations = al.getAlignmentAnnotation ().length; -if (existingAnnotations > 0) { -var aa = al.getAlignmentAnnotation (); -for (var aai = 0; aai < aa.length; aai++) { -if (aa[aai].autoCalculated) { -autoAnnots.put (this.autoAnnotsKey (aa[aai], aa[aai].sequenceRef, (aa[aai].groupRef == null ? null : aa[aai].groupRef.getName ())), new Integer (1)); -}} -}}var alWidth = al.getWidth (); -var st; -var annotations; -var annotation = null; -var jvAnnotationFile = false; -while ((line = $in.readLine ()) != null) { -this.nlinesread++; -this.lastread = String.instantialize (line); -if (line.indexOf ("#") == 0) { -continue; -}if (line.indexOf ("JALVIEW_ANNOTATION") > -1) { -jvAnnotationFile = true; -break; -}} -if (!jvAnnotationFile) { -$in.close (); -return false; -}while ((line = $in.readLine ()) != null) { -this.nlinesread++; -this.lastread = String.instantialize (line); -if (line.indexOf ("#") == 0 || line.indexOf ("JALVIEW_ANNOTATION") > -1 || line.length == 0) { -continue; -}st = new java.util.StringTokenizer (line, "\t"); -token = st.nextToken (); -if (token.equalsIgnoreCase ("COLOUR")) { -this.colourAnnotations (al, st.nextToken (), st.nextToken ()); -modified = true; -continue; -} else if (token.equalsIgnoreCase (jalview.io.AnnotationFile.COMBINE)) { -combineAnnotation_calls.add ( Clazz.newArray (-1, [st, this.refSeq, groupRef])); -modified = true; -continue; -} else if (token.equalsIgnoreCase ("ROWPROPERTIES")) { -this.addRowProperties (al, st); -modified = true; -continue; -} else if (token.equalsIgnoreCase (jalview.io.AnnotationFile.GRAPHLINE)) { -deferredAnnotation_calls.add ( Clazz.newArray (-1, [jalview.io.AnnotationFile.GRAPHLINE, st, this.refSeq, groupRef])); -modified = true; -continue; -} else if (token.equalsIgnoreCase ("SEQUENCE_REF")) { -if (st.hasMoreTokens ()) { -this.refSeq = al.findName (this.refSeqId = st.nextToken ()); -if (this.refSeq == null) { -this.refSeqId = null; -}try { -refSeqIndex = Integer.parseInt (st.nextToken ()); -if (refSeqIndex < 1) { -refSeqIndex = 1; -System.out.println ("WARNING: SEQUENCE_REF index must be > 0 in AnnotationFile"); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -refSeqIndex = 1; -} else { -throw ex; -} -} -} else { -this.refSeq = null; -this.refSeqId = null; -}continue; -} else if (token.equalsIgnoreCase ("GROUP_REF")) { -groupRef = null; -if (st.hasMoreTokens ()) { -groupRef = st.nextToken (); -if (groupRef.length < 1) { -groupRef = null; -} else { -if (groupRefRows.get (groupRef) == null) { -groupRefRows.put (groupRef, new java.util.Vector ()); -}}}continue; -} else if (token.equalsIgnoreCase ("SEQUENCE_GROUP")) { -this.addGroup (al, st); -modified = true; -continue; -} else if (token.equalsIgnoreCase ("PROPERTIES")) { -this.addProperties (al, st); -modified = true; -continue; -} else if (token.equalsIgnoreCase ("BELOW_ALIGNMENT")) { -this.setBelowAlignment (al, st); -modified = true; -continue; -} else if (token.equalsIgnoreCase ("ALIGNMENT")) { -this.addAlignmentDetails (al, st); -modified = true; -continue; -} else if (token.equalsIgnoreCase ("VIEW_SETREF")) { -if (this.refSeq != null) { -al.setSeqrep (this.refSeq); -}modified = true; -continue; -} else if (token.equalsIgnoreCase ("VIEW_HIDECOLS")) { -if (st.hasMoreTokens ()) { -if (colSel == null) { -colSel = new jalview.datamodel.ColumnSelection (); -}this.parseHideCols (colSel, st.nextToken ()); -}modified = true; -continue; -} else if (token.equalsIgnoreCase ("HIDE_INSERTIONS")) { -var sr = this.refSeq == null ? al.getSeqrep () : this.refSeq; -if (sr == null) { -sr = al.getSequenceAt (0); -}if (sr != null) { -if (colSel == null) { -System.err.println ("Cannot process HIDE_INSERTIONS without an alignment view: Ignoring line: " + line); -} else { -colSel.hideInsertionsFor (sr); -}}modified = true; -continue; -}graphStyle = jalview.datamodel.AlignmentAnnotation.getGraphValueFromString (token); -label = st.nextToken (); -index = 0; -annotations = new Array (alWidth); -description = null; -var score = NaN; -if (st.hasMoreTokens ()) { -line = st.nextToken (); -if (line.indexOf ("|") == -1) { -description = line; -if (st.hasMoreTokens ()) { -line = st.nextToken (); -}}if (st.hasMoreTokens ()) { -score = Float.$valueOf (st.nextToken ()).floatValue (); -}st = new java.util.StringTokenizer (line, "|", true); -var emptyColumn = true; -var onlyOneElement = (st.countTokens () == 1); -while (st.hasMoreElements () && index < alWidth) { -token = st.nextToken ().trim (); -if (onlyOneElement) { -try { -score = Float.$valueOf (token).floatValue (); -break; -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -}if (token.equals ("|")) { -if (emptyColumn) { -index++; -}emptyColumn = true; -} else { -annotations[index++] = this.parseAnnotation (token, graphStyle); -emptyColumn = false; -}} -}annotation = new jalview.datamodel.AlignmentAnnotation (label, description, (index == 0) ? null : annotations, 0, 0, graphStyle); -annotation.score = score; -if (!overrideAutoAnnot && autoAnnots.containsKey (this.autoAnnotsKey (annotation, this.refSeq, groupRef))) { -continue; -}if (this.refSeq != null) { -annotation.belowAlignment = false; -var referedSeq = this.refSeq; -do { -var ann = new jalview.datamodel.AlignmentAnnotation (annotation); -annotation.createSequenceMapping (referedSeq, refSeqIndex, false); -annotation.adjustForAlignment (); -referedSeq.addAlignmentAnnotation (annotation); -al.addAnnotation (annotation); -al.setAnnotationIndex (annotation, al.getAlignmentAnnotation ().length - existingAnnotations - 1); -if (groupRef != null) { -(groupRefRows.get (groupRef)).addElement (annotation); -}annotation = ann; -} while (this.refSeqId != null && (referedSeq = al.findName (referedSeq, this.refSeqId, true)) != null); -} else { -al.addAnnotation (annotation); -al.setAnnotationIndex (annotation, al.getAlignmentAnnotation ().length - existingAnnotations - 1); -if (groupRef != null) { -(groupRefRows.get (groupRef)).addElement (annotation); -}}modified = true; -} -var groupRefLookup = new java.util.Hashtable (); -var en = groupRefRows.keys (); -while (en.hasMoreElements ()) { -groupRef = en.nextElement (); -var matched = false; -for (var theGroup, $theGroup = al.getGroups ().iterator (); $theGroup.hasNext () && ((theGroup = $theGroup.next ()) || true);) { -if (theGroup.getName ().equals (groupRef)) { -if (matched) { -System.err.println ("Ignoring 1:many group reference mappings for group name '" + groupRef + "'"); -} else { -matched = true; -var rowset = groupRefRows.get (groupRef); -groupRefLookup.put (groupRef, theGroup); -if (rowset != null && rowset.size () > 0) { -var alan = null; -for (var elm = 0, elmSize = rowset.size (); elm < elmSize; elm++) { -alan = rowset.elementAt (elm); -alan.groupRef = theGroup; -} -}}}} -(groupRefRows.get (groupRef)).removeAllElements (); -} -for (var _deferred_args, $_deferred_args = deferredAnnotation_calls.iterator (); $_deferred_args.hasNext () && ((_deferred_args = $_deferred_args.next ()) || true);) { -if (_deferred_args[0] === jalview.io.AnnotationFile.GRAPHLINE) { -this.addLine (al, _deferred_args[1], _deferred_args[2], (_deferred_args[3] == null) ? null : groupRefLookup.get (_deferred_args[3])); -}} -var combinecount = 0; -for (var _combine_args, $_combine_args = combineAnnotation_calls.iterator (); $_combine_args.hasNext () && ((_combine_args = $_combine_args.next ()) || true);) { -this.combineAnnotations (al, ++combinecount, _combine_args[0], _combine_args[1], (_combine_args[2] == null) ? null : groupRefLookup.get (_combine_args[2])); -} -}return modified; -}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,java.io.BufferedReader"); -Clazz.defineMethod (c$, "parseHideCols", -($fz = function (colSel, nextToken) { -var inval = new java.util.StringTokenizer (nextToken, ","); -while (inval.hasMoreTokens ()) { -var range = inval.nextToken ().trim (); -var from; -var to = range.indexOf ("-"); -if (to == -1) { -from = to = Integer.parseInt (range); -if (from >= 0) { -colSel.hideColumns (from, to); -}} else { -from = Integer.parseInt (range.substring (0, to)); -if (to < range.length - 1) { -to = Integer.parseInt (range.substring (to + 1)); -} else { -to = from; -}if (from > 0 && to >= from) { -colSel.hideColumns (from, to); -}}} -}, $fz.isPrivate = true, $fz), "jalview.datamodel.ColumnSelection,~S"); -Clazz.defineMethod (c$, "autoAnnotsKey", -($fz = function (annotation, refSeq, groupRef) { -return annotation.graph + "\t" + annotation.label + "\t" + annotation.description + "\t" + (refSeq != null ? refSeq.getDisplayId (true) : ""); -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.SequenceI,~S"); -Clazz.defineMethod (c$, "parseAnnotation", -function (string, graphStyle) { -var hasSymbols = (graphStyle == 0); -var desc = null; -var displayChar = null; -var ss = ' '; -var value = 0; -var parsedValue = false; -var dcset = false; -var colour = null; -var i = string.indexOf ("["); -var j = string.indexOf ("]"); -if (i > -1 && j > -1) { -var ucs = new jalview.schemes.UserColourScheme (); -colour = ucs.getColourFromString (string.substring (i + 1, j)); -if (i > 0 && string.charAt (i - 1) == ',') { -i--; -}string = string.substring (0, i) + string.substring (j + 1); -}var st = new java.util.StringTokenizer (string, ",", true); -var token; -var seenContent = false; -var pass = 0; -while (st.hasMoreTokens ()) { -pass++; -token = st.nextToken ().trim (); -if (token.equals (",")) { -if (!seenContent && parsedValue && !dcset) { -dcset = true; -displayChar = " "; -}seenContent = false; -continue; -} else { -seenContent = true; -}if (!parsedValue) { -try { -displayChar = token; -value = new Float (token).floatValue (); -parsedValue = true; -continue; -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -} else { -if (token.length == 1) { -displayChar = token; -}}if (hasSymbols && (token.equals ("H") || token.equals ("E") || token.equals ("S") || token.equals (" "))) { -ss = token.charAt (0); -if (displayChar.equals (token.substring (0, 1))) { -displayChar = ""; -}} else if (desc == null || (parsedValue && pass > 2)) { -desc = token; -}} -if (displayChar != null && desc != null && desc.length == 1) { -if (displayChar.length > 1) { -var tmp = displayChar; -displayChar = desc; -desc = tmp; -} else { -if (displayChar.equals (desc)) { -desc = null; -}}}var anot = new jalview.datamodel.Annotation (displayChar, desc, ss, value); -anot.colour = colour; -return anot; -}, "~S,~N"); -Clazz.defineMethod (c$, "colourAnnotations", -function (al, label, colour) { -var ucs = new jalview.schemes.UserColourScheme (colour); -var annotations; -for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { -if (al.getAlignmentAnnotation ()[i].label.equalsIgnoreCase (label)) { -annotations = al.getAlignmentAnnotation ()[i].annotations; -for (var j = 0; j < annotations.length; j++) { -if (annotations[j] != null) { -annotations[j].colour = ucs.findColour ('A'); -}} -}} -}, "jalview.datamodel.AlignmentI,~S,~S"); -Clazz.defineMethod (c$, "combineAnnotations", -function (al, combineCount, st, seqRef, groupRef) { -var group = st.nextToken (); -var graphGroup = 0; -if (al.getAlignmentAnnotation () != null) { -for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { -var aa = al.getAlignmentAnnotation ()[i]; -if (aa.graphGroup > graphGroup) { -graphGroup = aa.graphGroup + 1; -}if (aa.sequenceRef === seqRef && aa.groupRef === groupRef && aa.label.equalsIgnoreCase (group)) { -if (aa.graphGroup > -1) { -graphGroup = aa.graphGroup; -} else { -if (graphGroup <= combineCount) { -graphGroup = combineCount + 1; -}aa.graphGroup = graphGroup; -}break; -}} -while (st.hasMoreTokens ()) { -group = st.nextToken (); -for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { -var aa = al.getAlignmentAnnotation ()[i]; -if (aa.sequenceRef === seqRef && aa.groupRef === groupRef && aa.label.equalsIgnoreCase (group)) { -aa.graphGroup = graphGroup; -break; -}} -} -} else { -System.err.println ("Couldn't combine annotations. None are added to alignment yet!"); -}}, "jalview.datamodel.AlignmentI,~N,java.util.StringTokenizer,jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "addLine", -function (al, st, seqRef, groupRef) { -var group = st.nextToken (); -var annotation = null; -var alannot = al.getAlignmentAnnotation (); -var value = new Float (st.nextToken ()).floatValue (); -var label = st.hasMoreTokens () ? st.nextToken () : null; -var colour = null; -if (st.hasMoreTokens ()) { -var ucs = new jalview.schemes.UserColourScheme (st.nextToken ()); -colour = ucs.findColour ('A'); -}if (alannot != null) { -for (var i = 0; i < alannot.length; i++) { -if (alannot[i].label.equalsIgnoreCase (group) && (seqRef == null || alannot[i].sequenceRef === seqRef) && (groupRef == null || alannot[i].groupRef === groupRef)) { -alannot[i].setThreshold ( new jalview.datamodel.GraphLine (value, label, colour)); -}} -}if (annotation == null) { -return; -}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer,jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "addGroup", -function (al, st) { -var sg = new jalview.datamodel.SequenceGroup (); -sg.setName (st.nextToken ()); -var rng = ""; -try { -rng = st.nextToken (); -if (rng.length > 0 && !rng.startsWith ("*")) { -sg.setStartRes (Integer.parseInt (rng) - 1); -} else { -sg.setStartRes (0); -}rng = st.nextToken (); -if (rng.length > 0 && !rng.startsWith ("*")) { -sg.setEndRes (Integer.parseInt (rng) - 1); -} else { -sg.setEndRes (al.getWidth () - 1); -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Couldn't parse Group Start or End Field as '*' or a valid column or sequence index: '" + rng + "' - assuming alignment width for group."); -sg.setStartRes (0); -sg.setEndRes (al.getWidth () - 1); -} else { -throw e; -} -} -var index = st.nextToken (); -if (index.equals ("-1")) { -while (st.hasMoreElements ()) { -sg.addSequence (al.findName (st.nextToken ()), false); -} -} else { -var st2 = new java.util.StringTokenizer (index, ","); -while (st2.hasMoreTokens ()) { -var tmp = st2.nextToken (); -if (tmp.equals ("*")) { -for (var i = 0; i < al.getHeight (); i++) { -sg.addSequence (al.getSequenceAt (i), false); -} -} else if (tmp.indexOf ("-") >= 0) { -var st3 = new java.util.StringTokenizer (tmp, "-"); -var start = (Integer.parseInt (st3.nextToken ())); -var end = (Integer.parseInt (st3.nextToken ())); -if (end > start) { -for (var i = start; i <= end; i++) { -sg.addSequence (al.getSequenceAt (i - 1), false); -} -}} else { -sg.addSequence (al.getSequenceAt (Integer.parseInt (tmp) - 1), false); -}} -}if (this.refSeq != null) { -sg.setStartRes (this.refSeq.findIndex (sg.getStartRes () + 1) - 1); -sg.setEndRes (this.refSeq.findIndex (sg.getEndRes () + 1) - 1); -sg.setSeqrep (this.refSeq); -}if (sg.getSize () > 0) { -al.addGroup (sg); -}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); -Clazz.defineMethod (c$, "addRowProperties", -function (al, st) { -var label = st.nextToken (); -var keyValue; -var key; -var value; -var scaletofit = false; -var centerlab = false; -var showalllabs = false; -while (st.hasMoreTokens ()) { -keyValue = st.nextToken (); -key = keyValue.substring (0, keyValue.indexOf ("=")); -value = keyValue.substring (keyValue.indexOf ("=") + 1); -if (key.equalsIgnoreCase ("scaletofit")) { -scaletofit = Boolean.$valueOf (value).booleanValue (); -}if (key.equalsIgnoreCase ("showalllabs")) { -showalllabs = Boolean.$valueOf (value).booleanValue (); -}if (key.equalsIgnoreCase ("centrelabs")) { -centerlab = Boolean.$valueOf (value).booleanValue (); -}var alr = al.getAlignmentAnnotation (); -if (alr != null) { -for (var i = 0; i < alr.length; i++) { -if (alr[i].label.equalsIgnoreCase (label)) { -alr[i].centreColLabels = centerlab; -alr[i].scaleColLabel = scaletofit; -alr[i].showAllColLabels = showalllabs; -}} -}} -}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); -Clazz.defineMethod (c$, "addProperties", -function (al, st) { -if (al.getGroups () == null) { -return; -}var name = st.nextToken (); -var sg = null; -for (var _sg, $_sg = al.getGroups ().iterator (); $_sg.hasNext () && ((_sg = $_sg.next ()) || true);) { -if ((sg = _sg).getName ().equals (name)) { -break; -} else { -sg = null; -}} -if (sg != null) { -var keyValue; -var key; -var value; -var def = sg.cs; -sg.cs = null; -while (st.hasMoreTokens ()) { -keyValue = st.nextToken (); -key = keyValue.substring (0, keyValue.indexOf ("=")); -value = keyValue.substring (keyValue.indexOf ("=") + 1); -if (key.equalsIgnoreCase ("description")) { -sg.setDescription (value); -} else if (key.equalsIgnoreCase ("colour")) { -sg.cs = jalview.schemes.ColourSchemeProperty.getColour (al, value); -} else if (key.equalsIgnoreCase ("pidThreshold")) { -sg.cs.setThreshold (Integer.parseInt (value), true); -} else if (key.equalsIgnoreCase ("consThreshold")) { -sg.cs.setConservationInc (Integer.parseInt (value)); -var c = new jalview.analysis.Conservation ("Group", jalview.schemes.ResidueProperties.propHash, 3, sg.getSequences (null), sg.getStartRes (), sg.getEndRes () + 1); -c.calculate (); -c.verdict (false, 25); -sg.cs.setConservation (c); -} else if (key.equalsIgnoreCase ("outlineColour")) { -sg.setOutlineColour ( new jalview.schemes.UserColourScheme (value).findColour ('A')); -} else if (key.equalsIgnoreCase ("displayBoxes")) { -sg.setDisplayBoxes (Boolean.$valueOf (value).booleanValue ()); -} else if (key.equalsIgnoreCase ("showUnconserved")) { -sg.setShowNonconserved (Boolean.$valueOf (value).booleanValue ()); -} else if (key.equalsIgnoreCase ("displayText")) { -sg.setDisplayText (Boolean.$valueOf (value).booleanValue ()); -} else if (key.equalsIgnoreCase ("colourText")) { -sg.setColourText (Boolean.$valueOf (value).booleanValue ()); -} else if (key.equalsIgnoreCase ("textCol1")) { -sg.textColour = new jalview.schemes.UserColourScheme (value).findColour ('A'); -} else if (key.equalsIgnoreCase ("textCol2")) { -sg.textColour2 = new jalview.schemes.UserColourScheme (value).findColour ('A'); -} else if (key.equalsIgnoreCase ("textColThreshold")) { -sg.thresholdTextColour = Integer.parseInt (value); -} else if (key.equalsIgnoreCase ("idColour")) { -sg.setIdColour ((def = new jalview.schemes.UserColourScheme (value)).findColour ('A')); -} else if (key.equalsIgnoreCase ("hide")) { -sg.setHidereps (true); -} else if (key.equalsIgnoreCase ("hidecols")) { -sg.setHideCols (true); -}sg.recalcConservation (); -} -if (sg.cs == null) { -sg.cs = def; -}}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); -Clazz.defineMethod (c$, "setBelowAlignment", -function (al, st) { -var token; -var aa; -var ala = al.getAlignmentAnnotation (); -if (ala == null) { -System.err.print ("Warning - no annotation to set below for sequence associated annotation:"); -}while (st.hasMoreTokens ()) { -token = st.nextToken (); -if (ala == null) { -System.err.print (" " + token); -} else { -for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { -aa = al.getAlignmentAnnotation ()[i]; -if (aa.sequenceRef === this.refSeq && aa.label.equals (token)) { -aa.belowAlignment = true; -}} -}} -if (ala == null) { -System.err.print ("\n"); -}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); -Clazz.defineMethod (c$, "addAlignmentDetails", -function (al, st) { -var keyValue; -var key; -var value; -while (st.hasMoreTokens ()) { -keyValue = st.nextToken (); -key = keyValue.substring (0, keyValue.indexOf ("=")); -value = keyValue.substring (keyValue.indexOf ("=") + 1); -al.setProperty (key, value); -} -}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); -Clazz.defineMethod (c$, "printCSVAnnotations", -function (annotations) { -var sp = new StringBuffer (); -for (var i = 0; i < annotations.length; i++) { -var atos = annotations[i].toString (); -var p = 0; -do { -var cp = atos.indexOf ("\n", p); -sp.append (annotations[i].label); -sp.append (","); -if (cp > p) { -sp.append (atos.substring (p, cp + 1)); -} else { -sp.append (atos.substring (p)); -sp.append (this.newline); -}p = cp + 1; -} while (p > 0); -} -return sp.toString (); -}, "~A"); -Clazz.defineMethod (c$, "printAnnotationsForView", -function (viewport) { -return this.printAnnotations (viewport.isShowAnnotation () ? viewport.getAlignment ().getAlignmentAnnotation () : null, viewport.getAlignment ().getGroups (), viewport.getAlignment ().getProperties (), viewport.getColumnSelection (), viewport.getAlignment (), null); -}, "jalview.api.AlignViewportI"); -Clazz.defineMethod (c$, "printAnnotationsForAlignment", -function (al) { -return this.printAnnotations (al.getAlignmentAnnotation (), al.getGroups (), al.getProperties (), null, al, null); -}, "jalview.datamodel.AlignmentI"); -c$.$AnnotationFile$ViewDef$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.viewname = null; -this.hidseqs = null; -this.hiddencols = null; -this.visibleGroups = null; -this.hiddenRepSeqs = null; -Clazz.instantialize (this, arguments); -}, jalview.io.AnnotationFile, "ViewDef"); -Clazz.makeConstructor (c$, -function (a, b, c, d) { -this.viewname = a; -this.hidseqs = b; -this.hiddencols = c; -this.hiddenRepSeqs = d; -}, "~S,jalview.datamodel.HiddenSequences,jalview.datamodel.ColumnSelection,java.util.Hashtable"); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"GRAPHLINE", "GRAPHLINE", -"COMBINE", "COMBINE"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (null, "jalview.io.AnnotationFile", ["jalview.analysis.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.Annotation", "$.ColumnSelection", "$.GraphLine", "$.SequenceGroup", "jalview.io.AppletFormatAdapter", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.ColourSchemeProperty", "$.ResidueProperties", "$.UserColourScheme", "jalview.util.Comparison", "$.Format", "java.awt.Color", "java.io.BufferedReader", "$.InputStreamReader", "$.StringReader", "java.lang.Boolean", "$.Float", "$.StringBuffer", "java.util.ArrayList", "$.BitSet", "$.Date", "$.Hashtable", "$.StringTokenizer", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.newline = null; +this.text = null; +if (!Clazz.isClassDefined ("jalview.io.AnnotationFile.ViewDef")) { +jalview.io.AnnotationFile.$AnnotationFile$ViewDef$ (); +} +this.refSeq = null; +this.refSeqId = null; +this.nlinesread = 0; +this.lastread = ""; +Clazz.instantialize (this, arguments); +}, jalview.io, "AnnotationFile"); +Clazz.prepareFields (c$, function () { +this.newline = System.getProperty ("line.separator"); +}); +Clazz.makeConstructor (c$, +function () { +this.init (); +}); +Clazz.defineMethod (c$, "setNewlineString", +function (nl) { +this.newline = nl; +this.init (); +}, "~S"); +Clazz.defineMethod (c$, "getNewlineString", +function () { +return this.newline; +}); +Clazz.defineMethod (c$, "init", +($fz = function () { +this.text = new StringBuffer ("JALVIEW_ANNOTATION" + this.newline + "# Created: " + new java.util.Date () + this.newline + this.newline); +this.refSeq = null; +this.refSeqId = null; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "printAnnotations", +function (annotations, list, properties) { +return this.printAnnotations (annotations, list, properties, null, null, null); +}, "~A,java.util.List,java.util.Hashtable"); +Clazz.defineMethod (c$, "printAnnotations", +function (annotations, list, properties, cs, al, view) { +if (view != null) { +if (view.viewname != null) { +this.text.append ("VIEW_DEF\t" + view.viewname + "\n"); +}if (list == null) { +list = view.visibleGroups; +}if (cs == null) { +cs = view.hiddencols; +}if (al == null) { +}}if (al != null && al.hasSeqrep ()) { +this.text.append ("VIEW_SETREF\t" + al.getSeqrep ().getName () + "\n"); +}if (cs != null && cs.hasHiddenColumns ()) { +this.text.append ("VIEW_HIDECOLS\t"); +var hc = cs.getHiddenColumns (); +var comma = false; +for (var r, $r = hc.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { +if (!comma) { +comma = true; +} else { +this.text.append (","); +}this.text.append ("" + r[0]); +this.text.append ("-"); +this.text.append ("" + r[1]); +} +this.text.append ("\n"); +}if (annotations != null) { +var oneColour = true; +var row; +var comma; +var refSeq = null; +var refGroup = null; +var colours = new StringBuffer (); +var graphLine = new StringBuffer (); +var rowprops = new StringBuffer (); +var graphGroup = new java.util.Hashtable (); +var graphGroup_refs = new java.util.Hashtable (); +var graphGroupSeen = new java.util.BitSet (); +var color; +for (var i = 0; i < annotations.length; i++) { +row = annotations[i]; +if (!row.visible && !row.hasScore () && !(row.graphGroup > -1 && graphGroupSeen.get (row.graphGroup))) { +continue; +}color = null; +oneColour = true; +this.writeSequence_Ref (refSeq, row.sequenceRef); +refSeq = row.sequenceRef; +this.writeGroup_Ref (refGroup, row.groupRef); +refGroup = row.groupRef; +var hasGlyphs = row.hasIcons; +var hasLabels = row.hasText; +var hasValues = row.$hasScore; +var hasText = false; +for (var j = 0; row.annotations != null && j < row.annotations.length && (!hasGlyphs || !hasLabels || !hasValues); j++) { +if (row.annotations[j] != null) { +hasLabels = new Boolean (hasLabels | (row.annotations[j].displayCharacter != null && row.annotations[j].displayCharacter.length > 0 && !row.annotations[j].displayCharacter.equals (" "))).valueOf (); +hasGlyphs = new Boolean (hasGlyphs | ((row.annotations[j].secondaryStructure).charCodeAt (0) != 0 && row.annotations[j].secondaryStructure != ' ')).valueOf (); +hasValues = new Boolean (hasValues | (!Float.isNaN (row.annotations[j].value))).valueOf (); +hasText = new Boolean (hasText | (row.annotations[j].description != null && row.annotations[j].description.length > 0)).valueOf (); +}} +if (row.graph == 0) { +this.text.append ("NO_GRAPH\t"); +hasValues = false; +} else { +if (row.graph == 1) { +this.text.append ("BAR_GRAPH\t"); +hasGlyphs = false; +} else if (row.graph == 2) { +hasGlyphs = false; +this.text.append ("LINE_GRAPH\t"); +}if (row.getThreshold () != null) { +graphLine.append ("GRAPHLINE\t"); +graphLine.append (row.label); +graphLine.append ("\t"); +graphLine.append (row.getThreshold ().value); +graphLine.append ("\t"); +graphLine.append (row.getThreshold ().label); +graphLine.append ("\t"); +graphLine.append (jalview.util.Format.getHexString (row.getThreshold ().colour)); +graphLine.append (this.newline); +}if (row.graphGroup > -1) { +graphGroupSeen.set (row.graphGroup); +var key = new Integer (row.graphGroup); +if (graphGroup.containsKey (key)) { +graphGroup.put (key, graphGroup.get (key) + "\t" + row.label); +} else { +graphGroup_refs.put (key, Clazz.newArray (-1, [refSeq, refGroup])); +graphGroup.put (key, row.label); +}}}this.text.append (row.label + "\t"); +if (row.description != null) { +this.text.append (row.description + "\t"); +}for (var j = 0; row.annotations != null && j < row.annotations.length; j++) { +if (refSeq != null && jalview.util.Comparison.isGap (refSeq.getCharAt (j))) { +continue; +}if (row.annotations[j] != null) { +comma = ""; +if (hasGlyphs) { +this.text.append (comma); +if (row.annotations[j].secondaryStructure != ' ') { +this.text.append (row.annotations[j].secondaryStructure); +}comma = ","; +}if (hasValues) { +if (!Float.isNaN (row.annotations[j].value)) { +this.text.append (comma + row.annotations[j].value); +} else { +System.err.println ("Skipping NaN - not valid value."); +this.text.append (comma + 0); +}comma = ","; +}if (hasLabels) { +if (row.annotations[j].displayCharacter != null && row.annotations[j].displayCharacter.length > 0 && !row.annotations[j].displayCharacter.equals (" ")) { +this.text.append (comma + row.annotations[j].displayCharacter); +comma = ","; +}}if (hasText) { +if (row.annotations[j].description != null && row.annotations[j].description.length > 0 && !row.annotations[j].description.equals (row.annotations[j].displayCharacter)) { +this.text.append (comma + row.annotations[j].description); +comma = ","; +}}if (color != null && !color.equals (row.annotations[j].colour)) { +oneColour = false; +}color = row.annotations[j].colour; +if (row.annotations[j].colour != null && row.annotations[j].colour !== java.awt.Color.black) { +this.text.append (comma + "[" + jalview.util.Format.getHexString (row.annotations[j].colour) + "]"); +comma = ","; +}}this.text.append ("|"); +} +if (row.hasScore ()) { +this.text.append ("\t" + row.score); +}this.text.append (this.newline); +if (color != null && color !== java.awt.Color.black && oneColour) { +colours.append ("COLOUR\t"); +colours.append (row.label); +colours.append ("\t"); +colours.append (jalview.util.Format.getHexString (color)); +colours.append (this.newline); +}if (row.scaleColLabel || row.showAllColLabels || row.centreColLabels) { +rowprops.append ("ROWPROPERTIES\t"); +rowprops.append (row.label); +rowprops.append ("\tscaletofit="); +rowprops.append (row.scaleColLabel); +rowprops.append ("\tshowalllabs="); +rowprops.append (row.showAllColLabels); +rowprops.append ("\tcentrelabs="); +rowprops.append (row.centreColLabels); +rowprops.append (this.newline); +}if (graphLine.length () > 0) { +this.text.append (graphLine.toString ()); +graphLine.setLength (0); +}} +this.text.append (this.newline); +this.text.append (colours.toString ()); +if (graphGroup.size () > 0) { +var oldRefSeq = refSeq; +var oldRefGroup = refGroup; +for (var combine_statement, $combine_statement = graphGroup.entrySet ().iterator (); $combine_statement.hasNext () && ((combine_statement = $combine_statement.next ()) || true);) { +var seqRefAndGroup = graphGroup_refs.get (combine_statement.getKey ()); +this.writeSequence_Ref (refSeq, seqRefAndGroup[0]); +refSeq = seqRefAndGroup[0]; +this.writeGroup_Ref (refGroup, seqRefAndGroup[1]); +refGroup = seqRefAndGroup[1]; +this.text.append ("COMBINE\t"); +this.text.append (combine_statement.getValue ()); +this.text.append (this.newline); +} +this.writeSequence_Ref (refSeq, oldRefSeq); +refSeq = oldRefSeq; +this.writeGroup_Ref (refGroup, oldRefGroup); +refGroup = oldRefGroup; +}this.text.append (rowprops.toString ()); +}if (list != null) { +this.printGroups (list); +}if (properties != null) { +this.text.append (this.newline); +this.text.append (this.newline); +this.text.append ("ALIGNMENT"); +var en = properties.keys (); +while (en.hasMoreElements ()) { +var key = en.nextElement ().toString (); +this.text.append ("\t"); +this.text.append (key); +this.text.append ("="); +this.text.append (properties.get (key)); +} +}return this.text.toString (); +}, "~A,java.util.List,java.util.Hashtable,jalview.datamodel.ColumnSelection,jalview.datamodel.AlignmentI,jalview.io.AnnotationFile.ViewDef"); +Clazz.defineMethod (c$, "writeGroup_Ref", +($fz = function (refGroup, next_refGroup) { +if (next_refGroup == null) { +if (refGroup != null) { +this.text.append (this.newline); +this.text.append ("GROUP_REF\t"); +this.text.append ("ALIGNMENT"); +this.text.append (this.newline); +}return true; +} else { +if (refGroup == null || refGroup !== next_refGroup) { +this.text.append (this.newline); +this.text.append ("GROUP_REF\t"); +this.text.append (next_refGroup.getName ()); +this.text.append (this.newline); +return true; +}}return false; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceGroup,jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "writeSequence_Ref", +($fz = function (refSeq, next_refSeq) { +if (next_refSeq == null) { +if (refSeq != null) { +this.text.append (this.newline); +this.text.append ("SEQUENCE_REF\t"); +this.text.append ("ALIGNMENT"); +this.text.append (this.newline); +return true; +}} else { +if (refSeq == null || refSeq !== next_refSeq) { +this.text.append (this.newline); +this.text.append ("SEQUENCE_REF\t"); +this.text.append (next_refSeq.getName ()); +this.text.append (this.newline); +return true; +}}return false; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "printGroups", +function (list) { +var seqrep = null; +for (var sg, $sg = list.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (!sg.hasSeqrep ()) { +this.text.append ("SEQUENCE_GROUP\t" + sg.getName () + "\t" + (sg.getStartRes () + 1) + "\t" + (sg.getEndRes () + 1) + "\t" + "-1\t"); +seqrep = null; +} else { +seqrep = sg.getSeqrep (); +this.text.append ("SEQUENCE_REF\t"); +this.text.append (seqrep.getName ()); +this.text.append (this.newline); +this.text.append ("SEQUENCE_GROUP\t"); +this.text.append (sg.getName ()); +this.text.append ("\t"); +this.text.append ("" + (seqrep.findPosition (sg.getStartRes ()))); +this.text.append ("\t"); +this.text.append ((seqrep.findPosition (sg.getEndRes ()))); +this.text.append ("\t"); +this.text.append ("-1\t"); +}for (var s = 0; s < sg.getSize (); s++) { +this.text.append (sg.getSequenceAt (s).getName ()); +this.text.append ("\t"); +} +this.text.append (this.newline); +this.text.append ("PROPERTIES\t"); +this.text.append (sg.getName ()); +this.text.append ("\t"); +if (sg.getDescription () != null) { +this.text.append ("description="); +this.text.append (sg.getDescription ()); +this.text.append ("\t"); +}if (sg.cs != null) { +this.text.append ("colour="); +this.text.append (jalview.schemes.ColourSchemeProperty.getColourName (sg.cs)); +this.text.append ("\t"); +if (sg.cs.getThreshold () != 0) { +this.text.append ("pidThreshold="); +this.text.append (sg.cs.getThreshold ()); +}if (sg.cs.conservationApplied ()) { +this.text.append ("consThreshold="); +this.text.append (sg.cs.getConservationInc ()); +this.text.append ("\t"); +}}this.text.append ("outlineColour="); +this.text.append (jalview.util.Format.getHexString (sg.getOutlineColour ())); +this.text.append ("\t"); +this.text.append ("displayBoxes="); +this.text.append (sg.getDisplayBoxes ()); +this.text.append ("\t"); +this.text.append ("displayText="); +this.text.append (sg.getDisplayText ()); +this.text.append ("\t"); +this.text.append ("colourText="); +this.text.append (sg.getColourText ()); +this.text.append ("\t"); +this.text.append ("showUnconserved="); +this.text.append (sg.getShowNonconserved ()); +this.text.append ("\t"); +if (sg.textColour !== java.awt.Color.black) { +this.text.append ("textCol1="); +this.text.append (jalview.util.Format.getHexString (sg.textColour)); +this.text.append ("\t"); +}if (sg.textColour2 !== java.awt.Color.white) { +this.text.append ("textCol2="); +this.text.append (jalview.util.Format.getHexString (sg.textColour2)); +this.text.append ("\t"); +}if (sg.thresholdTextColour != 0) { +this.text.append ("textColThreshold="); +this.text.append (sg.thresholdTextColour); +this.text.append ("\t"); +}if (sg.idColour != null) { +this.text.append ("idColour="); +this.text.append (jalview.util.Format.getHexString (sg.idColour)); +this.text.append ("\t"); +}if (sg.isHidereps ()) { +this.text.append ("hide=true\t"); +}if (sg.isHideCols ()) { +this.text.append ("hidecols=true\t"); +}if (seqrep != null) { +this.text.append (this.newline); +this.text.append ("SEQUENCE_REF"); +}this.text.append (this.newline); +this.text.append (this.newline); +} +}, "java.util.List"); +Clazz.defineMethod (c$, "annotateAlignmentView", +function (viewport, file, protocol) { +var colSel = viewport.getColumnSelection (); +if (colSel == null) { +colSel = new jalview.datamodel.ColumnSelection (); +}var rslt = this.readAnnotationFile (viewport.getAlignment (), colSel, file, protocol); +if (rslt && (colSel.hasSelectedColumns () || colSel.hasHiddenColumns ())) { +viewport.setColumnSelection (colSel); +}return rslt; +}, "jalview.api.AlignViewportI,~S,~S"); +Clazz.defineMethod (c$, "readAnnotationFile", +function (al, file, protocol) { +return this.readAnnotationFile (al, null, file, protocol); +}, "jalview.datamodel.AlignmentI,~S,~S"); +Clazz.defineMethod (c$, "readAnnotationFile", +function (al, colSel, file, protocol) { +var $in = null; +try { +if (protocol.equals (jalview.io.AppletFormatAdapter.FILE)) { +$in = jalview.jsdev.GenericFileAdapter.getReader (file, false); +} else if (protocol.equals (jalview.io.AppletFormatAdapter.URL)) { +$in = jalview.jsdev.GenericFileAdapter.getReader (file, true); +} else if (protocol.equals (jalview.io.AppletFormatAdapter.PASTE)) { +$in = new java.io.BufferedReader ( new java.io.StringReader (file)); +} else if (protocol.equals (jalview.io.AppletFormatAdapter.CLASSLOADER)) { +var is = this.getClass ().getResourceAsStream ("/" + file); +if (is != null) { +$in = new java.io.BufferedReader ( new java.io.InputStreamReader (is)); +}}if ($in != null) { +return this.parseAnnotationFrom (al, colSel, $in); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +System.out.println ("Problem reading annotation file: " + ex); +if (this.nlinesread > 0) { +System.out.println ("Last read line " + this.nlinesread + ": '" + this.lastread + "' (first 80 chars) ..."); +}return false; +} else { +throw ex; +} +} +return false; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,~S,~S"); +Clazz.defineMethod (c$, "parseAnnotationFrom", +function (al, colSel, $in) { +this.nlinesread = 0; +var combineAnnotation_calls = new java.util.ArrayList (); +var deferredAnnotation_calls = new java.util.ArrayList (); +var modified = false; +var groupRef = null; +var groupRefRows = new java.util.Hashtable (); +var autoAnnots = new java.util.Hashtable (); +{ +var line; +var label; +var description; +var token; +var graphStyle; +var index; +var refSeqIndex = 1; +var existingAnnotations = 0; +var overrideAutoAnnot = false; +if (al.getAlignmentAnnotation () != null) { +existingAnnotations = al.getAlignmentAnnotation ().length; +if (existingAnnotations > 0) { +var aa = al.getAlignmentAnnotation (); +for (var aai = 0; aai < aa.length; aai++) { +if (aa[aai].autoCalculated) { +autoAnnots.put (this.autoAnnotsKey (aa[aai], aa[aai].sequenceRef, (aa[aai].groupRef == null ? null : aa[aai].groupRef.getName ())), new Integer (1)); +}} +}}var alWidth = al.getWidth (); +var st; +var annotations; +var annotation = null; +var jvAnnotationFile = false; +while ((line = $in.readLine ()) != null) { +this.nlinesread++; +this.lastread = String.instantialize (line); +if (line.indexOf ("#") == 0) { +continue; +}if (line.indexOf ("JALVIEW_ANNOTATION") > -1) { +jvAnnotationFile = true; +break; +}} +if (!jvAnnotationFile) { +$in.close (); +return false; +}while ((line = $in.readLine ()) != null) { +this.nlinesread++; +this.lastread = String.instantialize (line); +if (line.indexOf ("#") == 0 || line.indexOf ("JALVIEW_ANNOTATION") > -1 || line.length == 0) { +continue; +}st = new java.util.StringTokenizer (line, "\t"); +token = st.nextToken (); +if (token.equalsIgnoreCase ("COLOUR")) { +this.colourAnnotations (al, st.nextToken (), st.nextToken ()); +modified = true; +continue; +} else if (token.equalsIgnoreCase (jalview.io.AnnotationFile.COMBINE)) { +combineAnnotation_calls.add ( Clazz.newArray (-1, [st, this.refSeq, groupRef])); +modified = true; +continue; +} else if (token.equalsIgnoreCase ("ROWPROPERTIES")) { +this.addRowProperties (al, st); +modified = true; +continue; +} else if (token.equalsIgnoreCase (jalview.io.AnnotationFile.GRAPHLINE)) { +deferredAnnotation_calls.add ( Clazz.newArray (-1, [jalview.io.AnnotationFile.GRAPHLINE, st, this.refSeq, groupRef])); +modified = true; +continue; +} else if (token.equalsIgnoreCase ("SEQUENCE_REF")) { +if (st.hasMoreTokens ()) { +this.refSeq = al.findName (this.refSeqId = st.nextToken ()); +if (this.refSeq == null) { +this.refSeqId = null; +}try { +refSeqIndex = Integer.parseInt (st.nextToken ()); +if (refSeqIndex < 1) { +refSeqIndex = 1; +System.out.println ("WARNING: SEQUENCE_REF index must be > 0 in AnnotationFile"); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +refSeqIndex = 1; +} else { +throw ex; +} +} +} else { +this.refSeq = null; +this.refSeqId = null; +}continue; +} else if (token.equalsIgnoreCase ("GROUP_REF")) { +groupRef = null; +if (st.hasMoreTokens ()) { +groupRef = st.nextToken (); +if (groupRef.length < 1) { +groupRef = null; +} else { +if (groupRefRows.get (groupRef) == null) { +groupRefRows.put (groupRef, new java.util.Vector ()); +}}}continue; +} else if (token.equalsIgnoreCase ("SEQUENCE_GROUP")) { +this.addGroup (al, st); +modified = true; +continue; +} else if (token.equalsIgnoreCase ("PROPERTIES")) { +this.addProperties (al, st); +modified = true; +continue; +} else if (token.equalsIgnoreCase ("BELOW_ALIGNMENT")) { +this.setBelowAlignment (al, st); +modified = true; +continue; +} else if (token.equalsIgnoreCase ("ALIGNMENT")) { +this.addAlignmentDetails (al, st); +modified = true; +continue; +} else if (token.equalsIgnoreCase ("VIEW_SETREF")) { +if (this.refSeq != null) { +al.setSeqrep (this.refSeq); +}modified = true; +continue; +} else if (token.equalsIgnoreCase ("VIEW_HIDECOLS")) { +if (st.hasMoreTokens ()) { +if (colSel == null) { +colSel = new jalview.datamodel.ColumnSelection (); +}this.parseHideCols (colSel, st.nextToken ()); +}modified = true; +continue; +} else if (token.equalsIgnoreCase ("HIDE_INSERTIONS")) { +var sr = this.refSeq == null ? al.getSeqrep () : this.refSeq; +if (sr == null) { +sr = al.getSequenceAt (0); +}if (sr != null) { +if (colSel == null) { +System.err.println ("Cannot process HIDE_INSERTIONS without an alignment view: Ignoring line: " + line); +} else { +colSel.hideInsertionsFor (sr); +}}modified = true; +continue; +}graphStyle = jalview.datamodel.AlignmentAnnotation.getGraphValueFromString (token); +label = st.nextToken (); +index = 0; +annotations = new Array (alWidth); +description = null; +var score = NaN; +if (st.hasMoreTokens ()) { +line = st.nextToken (); +if (line.indexOf ("|") == -1) { +description = line; +if (st.hasMoreTokens ()) { +line = st.nextToken (); +}}if (st.hasMoreTokens ()) { +score = Float.$valueOf (st.nextToken ()).floatValue (); +}st = new java.util.StringTokenizer (line, "|", true); +var emptyColumn = true; +var onlyOneElement = (st.countTokens () == 1); +while (st.hasMoreElements () && index < alWidth) { +token = st.nextToken ().trim (); +if (onlyOneElement) { +try { +score = Float.$valueOf (token).floatValue (); +break; +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +}if (token.equals ("|")) { +if (emptyColumn) { +index++; +}emptyColumn = true; +} else { +annotations[index++] = this.parseAnnotation (token, graphStyle); +emptyColumn = false; +}} +}annotation = new jalview.datamodel.AlignmentAnnotation (label, description, (index == 0) ? null : annotations, 0, 0, graphStyle); +annotation.score = score; +if (!overrideAutoAnnot && autoAnnots.containsKey (this.autoAnnotsKey (annotation, this.refSeq, groupRef))) { +continue; +}if (this.refSeq != null) { +annotation.belowAlignment = false; +var referedSeq = this.refSeq; +do { +var ann = new jalview.datamodel.AlignmentAnnotation (annotation); +annotation.createSequenceMapping (referedSeq, refSeqIndex, false); +annotation.adjustForAlignment (); +referedSeq.addAlignmentAnnotation (annotation); +al.addAnnotation (annotation); +al.setAnnotationIndex (annotation, al.getAlignmentAnnotation ().length - existingAnnotations - 1); +if (groupRef != null) { +(groupRefRows.get (groupRef)).addElement (annotation); +}annotation = ann; +} while (this.refSeqId != null && (referedSeq = al.findName (referedSeq, this.refSeqId, true)) != null); +} else { +al.addAnnotation (annotation); +al.setAnnotationIndex (annotation, al.getAlignmentAnnotation ().length - existingAnnotations - 1); +if (groupRef != null) { +(groupRefRows.get (groupRef)).addElement (annotation); +}}modified = true; +} +var groupRefLookup = new java.util.Hashtable (); +var en = groupRefRows.keys (); +while (en.hasMoreElements ()) { +groupRef = en.nextElement (); +var matched = false; +for (var theGroup, $theGroup = al.getGroups ().iterator (); $theGroup.hasNext () && ((theGroup = $theGroup.next ()) || true);) { +if (theGroup.getName ().equals (groupRef)) { +if (matched) { +System.err.println ("Ignoring 1:many group reference mappings for group name '" + groupRef + "'"); +} else { +matched = true; +var rowset = groupRefRows.get (groupRef); +groupRefLookup.put (groupRef, theGroup); +if (rowset != null && rowset.size () > 0) { +var alan = null; +for (var elm = 0, elmSize = rowset.size (); elm < elmSize; elm++) { +alan = rowset.elementAt (elm); +alan.groupRef = theGroup; +} +}}}} +(groupRefRows.get (groupRef)).removeAllElements (); +} +for (var _deferred_args, $_deferred_args = deferredAnnotation_calls.iterator (); $_deferred_args.hasNext () && ((_deferred_args = $_deferred_args.next ()) || true);) { +if (_deferred_args[0] === jalview.io.AnnotationFile.GRAPHLINE) { +this.addLine (al, _deferred_args[1], _deferred_args[2], (_deferred_args[3] == null) ? null : groupRefLookup.get (_deferred_args[3])); +}} +var combinecount = 0; +for (var _combine_args, $_combine_args = combineAnnotation_calls.iterator (); $_combine_args.hasNext () && ((_combine_args = $_combine_args.next ()) || true);) { +this.combineAnnotations (al, ++combinecount, _combine_args[0], _combine_args[1], (_combine_args[2] == null) ? null : groupRefLookup.get (_combine_args[2])); +} +}return modified; +}, "jalview.datamodel.AlignmentI,jalview.datamodel.ColumnSelection,java.io.BufferedReader"); +Clazz.defineMethod (c$, "parseHideCols", +($fz = function (colSel, nextToken) { +var inval = new java.util.StringTokenizer (nextToken, ","); +while (inval.hasMoreTokens ()) { +var range = inval.nextToken ().trim (); +var from; +var to = range.indexOf ("-"); +if (to == -1) { +from = to = Integer.parseInt (range); +if (from >= 0) { +colSel.hideColumns (from, to); +}} else { +from = Integer.parseInt (range.substring (0, to)); +if (to < range.length - 1) { +to = Integer.parseInt (range.substring (to + 1)); +} else { +to = from; +}if (from > 0 && to >= from) { +colSel.hideColumns (from, to); +}}} +}, $fz.isPrivate = true, $fz), "jalview.datamodel.ColumnSelection,~S"); +Clazz.defineMethod (c$, "autoAnnotsKey", +($fz = function (annotation, refSeq, groupRef) { +return annotation.graph + "\t" + annotation.label + "\t" + annotation.description + "\t" + (refSeq != null ? refSeq.getDisplayId (true) : ""); +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,jalview.datamodel.SequenceI,~S"); +Clazz.defineMethod (c$, "parseAnnotation", +function (string, graphStyle) { +var hasSymbols = (graphStyle == 0); +var desc = null; +var displayChar = null; +var ss = ' '; +var value = 0; +var parsedValue = false; +var dcset = false; +var colour = null; +var i = string.indexOf ("["); +var j = string.indexOf ("]"); +if (i > -1 && j > -1) { +var ucs = new jalview.schemes.UserColourScheme (); +colour = ucs.getColourFromString (string.substring (i + 1, j)); +if (i > 0 && string.charAt (i - 1) == ',') { +i--; +}string = string.substring (0, i) + string.substring (j + 1); +}var st = new java.util.StringTokenizer (string, ",", true); +var token; +var seenContent = false; +var pass = 0; +while (st.hasMoreTokens ()) { +pass++; +token = st.nextToken ().trim (); +if (token.equals (",")) { +if (!seenContent && parsedValue && !dcset) { +dcset = true; +displayChar = " "; +}seenContent = false; +continue; +} else { +seenContent = true; +}if (!parsedValue) { +try { +displayChar = token; +value = new Float (token).floatValue (); +parsedValue = true; +continue; +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +} else { +if (token.length == 1) { +displayChar = token; +}}if (hasSymbols && (token.equals ("H") || token.equals ("E") || token.equals ("S") || token.equals (" "))) { +ss = token.charAt (0); +if (displayChar.equals (token.substring (0, 1))) { +displayChar = ""; +}} else if (desc == null || (parsedValue && pass > 2)) { +desc = token; +}} +if (displayChar != null && desc != null && desc.length == 1) { +if (displayChar.length > 1) { +var tmp = displayChar; +displayChar = desc; +desc = tmp; +} else { +if (displayChar.equals (desc)) { +desc = null; +}}}var anot = new jalview.datamodel.Annotation (displayChar, desc, ss, value); +anot.colour = colour; +return anot; +}, "~S,~N"); +Clazz.defineMethod (c$, "colourAnnotations", +function (al, label, colour) { +var ucs = new jalview.schemes.UserColourScheme (colour); +var annotations; +for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { +if (al.getAlignmentAnnotation ()[i].label.equalsIgnoreCase (label)) { +annotations = al.getAlignmentAnnotation ()[i].annotations; +for (var j = 0; j < annotations.length; j++) { +if (annotations[j] != null) { +annotations[j].colour = ucs.findColour ('A'); +}} +}} +}, "jalview.datamodel.AlignmentI,~S,~S"); +Clazz.defineMethod (c$, "combineAnnotations", +function (al, combineCount, st, seqRef, groupRef) { +var group = st.nextToken (); +var graphGroup = 0; +if (al.getAlignmentAnnotation () != null) { +for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { +var aa = al.getAlignmentAnnotation ()[i]; +if (aa.graphGroup > graphGroup) { +graphGroup = aa.graphGroup + 1; +}if (aa.sequenceRef === seqRef && aa.groupRef === groupRef && aa.label.equalsIgnoreCase (group)) { +if (aa.graphGroup > -1) { +graphGroup = aa.graphGroup; +} else { +if (graphGroup <= combineCount) { +graphGroup = combineCount + 1; +}aa.graphGroup = graphGroup; +}break; +}} +while (st.hasMoreTokens ()) { +group = st.nextToken (); +for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { +var aa = al.getAlignmentAnnotation ()[i]; +if (aa.sequenceRef === seqRef && aa.groupRef === groupRef && aa.label.equalsIgnoreCase (group)) { +aa.graphGroup = graphGroup; +break; +}} +} +} else { +System.err.println ("Couldn't combine annotations. None are added to alignment yet!"); +}}, "jalview.datamodel.AlignmentI,~N,java.util.StringTokenizer,jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "addLine", +function (al, st, seqRef, groupRef) { +var group = st.nextToken (); +var annotation = null; +var alannot = al.getAlignmentAnnotation (); +var value = new Float (st.nextToken ()).floatValue (); +var label = st.hasMoreTokens () ? st.nextToken () : null; +var colour = null; +if (st.hasMoreTokens ()) { +var ucs = new jalview.schemes.UserColourScheme (st.nextToken ()); +colour = ucs.findColour ('A'); +}if (alannot != null) { +for (var i = 0; i < alannot.length; i++) { +if (alannot[i].label.equalsIgnoreCase (group) && (seqRef == null || alannot[i].sequenceRef === seqRef) && (groupRef == null || alannot[i].groupRef === groupRef)) { +alannot[i].setThreshold ( new jalview.datamodel.GraphLine (value, label, colour)); +}} +}if (annotation == null) { +return; +}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer,jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "addGroup", +function (al, st) { +var sg = new jalview.datamodel.SequenceGroup (); +sg.setName (st.nextToken ()); +var rng = ""; +try { +rng = st.nextToken (); +if (rng.length > 0 && !rng.startsWith ("*")) { +sg.setStartRes (Integer.parseInt (rng) - 1); +} else { +sg.setStartRes (0); +}rng = st.nextToken (); +if (rng.length > 0 && !rng.startsWith ("*")) { +sg.setEndRes (Integer.parseInt (rng) - 1); +} else { +sg.setEndRes (al.getWidth () - 1); +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Couldn't parse Group Start or End Field as '*' or a valid column or sequence index: '" + rng + "' - assuming alignment width for group."); +sg.setStartRes (0); +sg.setEndRes (al.getWidth () - 1); +} else { +throw e; +} +} +var index = st.nextToken (); +if (index.equals ("-1")) { +while (st.hasMoreElements ()) { +sg.addSequence (al.findName (st.nextToken ()), false); +} +} else { +var st2 = new java.util.StringTokenizer (index, ","); +while (st2.hasMoreTokens ()) { +var tmp = st2.nextToken (); +if (tmp.equals ("*")) { +for (var i = 0; i < al.getHeight (); i++) { +sg.addSequence (al.getSequenceAt (i), false); +} +} else if (tmp.indexOf ("-") >= 0) { +var st3 = new java.util.StringTokenizer (tmp, "-"); +var start = (Integer.parseInt (st3.nextToken ())); +var end = (Integer.parseInt (st3.nextToken ())); +if (end > start) { +for (var i = start; i <= end; i++) { +sg.addSequence (al.getSequenceAt (i - 1), false); +} +}} else { +sg.addSequence (al.getSequenceAt (Integer.parseInt (tmp) - 1), false); +}} +}if (this.refSeq != null) { +sg.setStartRes (this.refSeq.findIndex (sg.getStartRes () + 1) - 1); +sg.setEndRes (this.refSeq.findIndex (sg.getEndRes () + 1) - 1); +sg.setSeqrep (this.refSeq); +}if (sg.getSize () > 0) { +al.addGroup (sg); +}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); +Clazz.defineMethod (c$, "addRowProperties", +function (al, st) { +var label = st.nextToken (); +var keyValue; +var key; +var value; +var scaletofit = false; +var centerlab = false; +var showalllabs = false; +while (st.hasMoreTokens ()) { +keyValue = st.nextToken (); +key = keyValue.substring (0, keyValue.indexOf ("=")); +value = keyValue.substring (keyValue.indexOf ("=") + 1); +if (key.equalsIgnoreCase ("scaletofit")) { +scaletofit = Boolean.$valueOf (value).booleanValue (); +}if (key.equalsIgnoreCase ("showalllabs")) { +showalllabs = Boolean.$valueOf (value).booleanValue (); +}if (key.equalsIgnoreCase ("centrelabs")) { +centerlab = Boolean.$valueOf (value).booleanValue (); +}var alr = al.getAlignmentAnnotation (); +if (alr != null) { +for (var i = 0; i < alr.length; i++) { +if (alr[i].label.equalsIgnoreCase (label)) { +alr[i].centreColLabels = centerlab; +alr[i].scaleColLabel = scaletofit; +alr[i].showAllColLabels = showalllabs; +}} +}} +}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); +Clazz.defineMethod (c$, "addProperties", +function (al, st) { +if (al.getGroups () == null) { +return; +}var name = st.nextToken (); +var sg = null; +for (var _sg, $_sg = al.getGroups ().iterator (); $_sg.hasNext () && ((_sg = $_sg.next ()) || true);) { +if ((sg = _sg).getName ().equals (name)) { +break; +} else { +sg = null; +}} +if (sg != null) { +var keyValue; +var key; +var value; +var def = sg.cs; +sg.cs = null; +while (st.hasMoreTokens ()) { +keyValue = st.nextToken (); +key = keyValue.substring (0, keyValue.indexOf ("=")); +value = keyValue.substring (keyValue.indexOf ("=") + 1); +if (key.equalsIgnoreCase ("description")) { +sg.setDescription (value); +} else if (key.equalsIgnoreCase ("colour")) { +sg.cs = jalview.schemes.ColourSchemeProperty.getColour (al, value); +} else if (key.equalsIgnoreCase ("pidThreshold")) { +sg.cs.setThreshold (Integer.parseInt (value), true); +} else if (key.equalsIgnoreCase ("consThreshold")) { +sg.cs.setConservationInc (Integer.parseInt (value)); +var c = new jalview.analysis.Conservation ("Group", jalview.schemes.ResidueProperties.propHash, 3, sg.getSequences (null), sg.getStartRes (), sg.getEndRes () + 1); +c.calculate (); +c.verdict (false, 25); +sg.cs.setConservation (c); +} else if (key.equalsIgnoreCase ("outlineColour")) { +sg.setOutlineColour ( new jalview.schemes.UserColourScheme (value).findColour ('A')); +} else if (key.equalsIgnoreCase ("displayBoxes")) { +sg.setDisplayBoxes (Boolean.$valueOf (value).booleanValue ()); +} else if (key.equalsIgnoreCase ("showUnconserved")) { +sg.setShowNonconserved (Boolean.$valueOf (value).booleanValue ()); +} else if (key.equalsIgnoreCase ("displayText")) { +sg.setDisplayText (Boolean.$valueOf (value).booleanValue ()); +} else if (key.equalsIgnoreCase ("colourText")) { +sg.setColourText (Boolean.$valueOf (value).booleanValue ()); +} else if (key.equalsIgnoreCase ("textCol1")) { +sg.textColour = new jalview.schemes.UserColourScheme (value).findColour ('A'); +} else if (key.equalsIgnoreCase ("textCol2")) { +sg.textColour2 = new jalview.schemes.UserColourScheme (value).findColour ('A'); +} else if (key.equalsIgnoreCase ("textColThreshold")) { +sg.thresholdTextColour = Integer.parseInt (value); +} else if (key.equalsIgnoreCase ("idColour")) { +sg.setIdColour ((def = new jalview.schemes.UserColourScheme (value)).findColour ('A')); +} else if (key.equalsIgnoreCase ("hide")) { +sg.setHidereps (true); +} else if (key.equalsIgnoreCase ("hidecols")) { +sg.setHideCols (true); +}sg.recalcConservation (); +} +if (sg.cs == null) { +sg.cs = def; +}}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); +Clazz.defineMethod (c$, "setBelowAlignment", +function (al, st) { +var token; +var aa; +var ala = al.getAlignmentAnnotation (); +if (ala == null) { +System.err.print ("Warning - no annotation to set below for sequence associated annotation:"); +}while (st.hasMoreTokens ()) { +token = st.nextToken (); +if (ala == null) { +System.err.print (" " + token); +} else { +for (var i = 0; i < al.getAlignmentAnnotation ().length; i++) { +aa = al.getAlignmentAnnotation ()[i]; +if (aa.sequenceRef === this.refSeq && aa.label.equals (token)) { +aa.belowAlignment = true; +}} +}} +if (ala == null) { +System.err.print ("\n"); +}}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); +Clazz.defineMethod (c$, "addAlignmentDetails", +function (al, st) { +var keyValue; +var key; +var value; +while (st.hasMoreTokens ()) { +keyValue = st.nextToken (); +key = keyValue.substring (0, keyValue.indexOf ("=")); +value = keyValue.substring (keyValue.indexOf ("=") + 1); +al.setProperty (key, value); +} +}, "jalview.datamodel.AlignmentI,java.util.StringTokenizer"); +Clazz.defineMethod (c$, "printCSVAnnotations", +function (annotations) { +var sp = new StringBuffer (); +for (var i = 0; i < annotations.length; i++) { +var atos = annotations[i].toString (); +var p = 0; +do { +var cp = atos.indexOf ("\n", p); +sp.append (annotations[i].label); +sp.append (","); +if (cp > p) { +sp.append (atos.substring (p, cp + 1)); +} else { +sp.append (atos.substring (p)); +sp.append (this.newline); +}p = cp + 1; +} while (p > 0); +} +return sp.toString (); +}, "~A"); +Clazz.defineMethod (c$, "printAnnotationsForView", +function (viewport) { +return this.printAnnotations (viewport.isShowAnnotation () ? viewport.getAlignment ().getAlignmentAnnotation () : null, viewport.getAlignment ().getGroups (), viewport.getAlignment ().getProperties (), viewport.getColumnSelection (), viewport.getAlignment (), null); +}, "jalview.api.AlignViewportI"); +Clazz.defineMethod (c$, "printAnnotationsForAlignment", +function (al) { +return this.printAnnotations (al.getAlignmentAnnotation (), al.getGroups (), al.getProperties (), null, al, null); +}, "jalview.datamodel.AlignmentI"); +c$.$AnnotationFile$ViewDef$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.viewname = null; +this.hidseqs = null; +this.hiddencols = null; +this.visibleGroups = null; +this.hiddenRepSeqs = null; +Clazz.instantialize (this, arguments); +}, jalview.io.AnnotationFile, "ViewDef"); +Clazz.makeConstructor (c$, +function (a, b, c, d) { +this.viewname = a; +this.hidseqs = b; +this.hiddencols = c; +this.hiddenRepSeqs = d; +}, "~S,jalview.datamodel.HiddenSequences,jalview.datamodel.ColumnSelection,java.util.Hashtable"); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"GRAPHLINE", "GRAPHLINE", +"COMBINE", "COMBINE"); +}); diff --git a/bin/jalview/io/AppletFormatAdapter.class b/bin/jalview/io/AppletFormatAdapter.class index 6c39b9dfb0314f4cde281aaf1e1a98bc5826e8ca..2c63ec8da39f6c246f5ff35eb8778afc6cdd5e59 100644 GIT binary patch delta 139 zcmaD>_r7j}zZs+U<^Zz~Oy*V$9Df*C8UHg}X5e6Fc+AMo_??}Bk)4T!g@v7Q3XsL9 zBFgcf!HaEglXdLeb^kMPGqA8T7y=O^5Q7ye3o`#< bP-bWJl<)_d^oKzfNd97A5{#cb)$Sqyc^)7b delta 130 zcmaD~_pEM%zZs+M<^Zz~OqMnbTz?o?8UHg}X5e6Fc+AMo_??}Bk)4T!g@v7Q3XsL9 zBE-b;pTUcP87d7H(`A}mZW+b+dh;dAP!{H?4Dyq;?A(=pGH^HnH7E-*|6x#OXY`cd W0dfB@$O6e<3`~MDPLt=^T?7DqG#`ur diff --git a/bin/jalview/io/AppletFormatAdapter.js b/bin/jalview/io/AppletFormatAdapter.js index 681a44d..f4dab9f 100644 --- a/bin/jalview/io/AppletFormatAdapter.js +++ b/bin/jalview/io/AppletFormatAdapter.js @@ -1,389 +1,389 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (null, "jalview.io.AppletFormatAdapter", ["MCview.PDBfile", "jalview.datamodel.Alignment", "jalview.io.FileParse", "$.IdentifyFile", "jalview.jsdev.GenericFileAdapter", "jalview.util.MessageManager", "java.io.IOException", "java.lang.Exception", "$.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.viewpanel = null; -this.annotFromStructure = false; -this.localSecondaryStruct = false; -this.serviceSecondaryStruct = false; -this.alignFile = null; -this.inFile = null; -this.newline = null; -this.exportSettings = null; -Clazz.instantialize (this, arguments); -}, jalview.io, "AppletFormatAdapter"); -Clazz.prepareFields (c$, function () { -this.newline = System.getProperty ("line.separator"); -}); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (viewpanel) { -this.viewpanel = viewpanel; -}, "jalview.api.AlignmentViewPanel"); -Clazz.makeConstructor (c$, -function (alignPanel, settings) { -this.viewpanel = alignPanel; -this.exportSettings = settings; -}, "jalview.api.AlignmentViewPanel,jalview.api.AlignExportSettingI"); -c$.prettyPrint = Clazz.defineMethod (c$, "prettyPrint", -function (els) { -var list = new StringBuffer (); -for (var i = 0, iSize = els.length - 1; i < iSize; i++) { -list.append (els[i]); -list.append (", "); -} -list.append (" and " + els[els.length - 1] + "."); -return list.toString (); -}, "~A"); -Clazz.defineMethod (c$, "setNewlineString", -function (nl) { -this.newline = nl; -}, "~S"); -Clazz.defineMethod (c$, "getNewlineString", -function () { -return this.newline; -}); -c$.isValidFormat = Clazz.defineMethod (c$, "isValidFormat", -function (format) { -return jalview.io.AppletFormatAdapter.isValidFormat (format, false); -}, "~S"); -c$.isValidFormat = Clazz.defineMethod (c$, "isValidFormat", -function (format, forwriting) { -var valid = false; -var format_list = (forwriting) ? jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS : jalview.io.AppletFormatAdapter.READABLE_FORMATS; -for (var element, $element = 0, $$element = format_list; $element < $$element.length && ((element = $$element[$element]) || true); $element++) { -if (element.equalsIgnoreCase (format)) { -return true; -}} -return valid; -}, "~S,~B"); -Clazz.defineMethod (c$, "readFile", -function (inFile, type, format) { -this.inFile = inFile; -try { -if (format.equals ("FASTA")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [inFile, type]); -} else if (format.equals ("MSF")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("MSFfile", [inFile, type]); -} else if (format.equals ("PileUp")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PileUpfile", [inFile, type]); -} else if (format.equals ("CLUSTAL")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("ClustalFile", [inFile, type]); -} else if (format.equals ("BLC")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("BLCFile", [inFile, type]); -} else if (format.equals ("PIR")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PIRFile", [inFile, type]); -} else if (format.equals ("PFAM")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PfamFile", [inFile, type]); -} else if (format.equals ("JnetFile")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JPredFile", [inFile, type]); -(this.alignFile).removeNonSequences (); -} else if (format.equals ("PDB")) { -this.alignFile = new MCview.PDBfile (this.annotFromStructure, this.localSecondaryStruct, this.serviceSecondaryStruct, inFile, type); -} else if (format.equals ("STH")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("StockholmFile", [inFile, type]); -} else if (format.equals ("SimpleBLAST")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("SimpleBlastFile", [inFile, type]); -} else if (format.equals ("PHYLIP")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PhylipFile", [inFile, type]); -} else if (format.equals ("JSON")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JSONFile", [inFile, type]); -} else if (format.equals ("HTML")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("HtmlFile", [inFile, type]); -} else if (format.equals ("RNAML")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("RnamlFile", [inFile, type]); -} else if (format.equals ("GFF v2 or v3")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("Gff3File", [inFile, type]); -}return this.buildAlignmentFrom (this.alignFile); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to read alignment using the '" + format + "' reader.\n" + e); -if (e.getMessage () != null && e.getMessage ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { -throw new java.io.IOException (e.getMessage ()); -}if (type.equalsIgnoreCase ("Paste")) { -try { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [">UNKNOWN\n" + inFile, "Paste"]); -return this.buildAlignmentFrom (this.alignFile); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -if (ex.toString ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { -throw new java.io.IOException (e.getMessage ()); -}ex.printStackTrace (); -} else { -throw ex; -} -} -}throw new java.io.IOException (jalview.io.AppletFormatAdapter.SUPPORTED_FORMATS); -} else { -throw e; -} -} -}, "~S,~S,~S"); -Clazz.defineMethod (c$, "readFromFile", -function (source, format) { -this.inFile = source.getInFile (); -var type = source.type; -try { -if (format.equals ("FASTA")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [source]); -} else if (format.equals ("MSF")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("MSFfile", [source]); -} else if (format.equals ("PileUp")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PileUpfile", [source]); -} else if (format.equals ("CLUSTAL")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("ClustalFile", [source]); -} else if (format.equals ("BLC")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("BLCFile", [source]); -} else if (format.equals ("PIR")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PIRFile", [source]); -} else if (format.equals ("PFAM")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PfamFile", [source]); -} else if (format.equals ("JnetFile")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JPredFile", [source]); -(this.alignFile).removeNonSequences (); -} else if (format.equals ("PDB")) { -this.alignFile = new MCview.PDBfile (this.annotFromStructure, this.localSecondaryStruct, this.serviceSecondaryStruct, source); -} else if (format.equals ("STH")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("StockholmFile", [source]); -} else if (format.equals ("RNAML")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("RnamlFile", [source]); -} else if (format.equals ("SimpleBLAST")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("SimpleBlastFile", [source]); -} else if (format.equals ("PHYLIP")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PhylipFile", [source]); -} else if (format.equals ("GFF v2 or v3")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("Gff3File", [this.inFile, type]); -} else if (format.equals ("JSON")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JSONFile", [source]); -} else if (format.equals ("HTML")) { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("HtmlFile", [source]); -}return this.buildAlignmentFrom (this.alignFile); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -e.printStackTrace (); -System.err.println ("Failed to read alignment using the '" + format + "' reader.\n" + e); -if (e.getMessage () != null && e.getMessage ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { -throw new java.io.IOException (e.getMessage ()); -}if (type.equalsIgnoreCase ("Paste")) { -try { -this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [">UNKNOWN\n" + this.inFile, "Paste"]); -return this.buildAlignmentFrom (this.alignFile); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -if (ex.toString ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { -throw new java.io.IOException (e.getMessage ()); -}ex.printStackTrace (); -} else { -throw ex; -} -} -}throw new java.io.IOException (jalview.io.AppletFormatAdapter.SUPPORTED_FORMATS); -} else { -throw e; -} -} -}, "jalview.io.FileParse,~S"); -Clazz.defineMethod (c$, "buildAlignmentFrom", -($fz = function (alignFile2) { -var al = new jalview.datamodel.Alignment (this.alignFile.getSeqsAsArray ()); -this.alignFile.addAnnotations (al); -this.alignFile.addGroups (al); -return al; -}, $fz.isPrivate = true, $fz), "jalview.io.AlignFile"); -Clazz.defineMethod (c$, "formatSequences", -function (format, jvsuffix, ap, selectedOnly) { -var selvew = ap.getAlignViewport ().getAlignmentView (selectedOnly, false); -var aselview = selvew.getVisibleAlignment (ap.getAlignViewport ().getGapCharacter ()); -var ala = (ap.getAlignViewport ().getVisibleAlignmentAnnotation (selectedOnly)); -if (ala != null) { -for (var aa, $aa = ala.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) { -aselview.addAnnotation (aa); -} -}this.viewpanel = ap; -return this.formatSequences (format, aselview, jvsuffix); -}, "~S,~B,jalview.api.AlignmentViewPanel,~B"); -Clazz.defineMethod (c$, "formatSequences", -function (format, alignment, jvsuffix) { -try { -var afile = null; -if (format.equalsIgnoreCase ("FASTA")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", []); -} else if (format.equalsIgnoreCase ("MSF")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("MSFfile", []); -} else if (format.equalsIgnoreCase ("PileUp")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("PileUpfile", []); -} else if (format.equalsIgnoreCase ("CLUSTAL")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("ClustalFile", []); -} else if (format.equalsIgnoreCase ("BLC")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("BLCFile", []); -} else if (format.equalsIgnoreCase ("PIR")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("PIRFile", []); -} else if (format.equalsIgnoreCase ("PFAM")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("PfamFile", []); -} else if (format.equalsIgnoreCase ("STH")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("StockholmFile", [alignment]); -} else if (format.equalsIgnoreCase ("AMSA")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("AMSAFile", [alignment]); -} else if (format.equalsIgnoreCase ("PHYLIP")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("PhylipFile", []); -} else if (format.equalsIgnoreCase ("JSON")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("JSONFile", []); -} else if (format.equalsIgnoreCase ("RNAML")) { -afile = jalview.jsdev.GenericFileAdapter.getFile ("RnamlFile", []); -} else { -throw new Exception (jalview.util.MessageManager.getString ("error.implementation_error_unknown_file_format_string")); -}afile.setNewlineString (this.newline); -afile.addJVSuffix (jvsuffix); -afile.setExportSettings (this.exportSettings); -afile.configureForView (this.viewpanel); -if (this.viewpanel == null || this.viewpanel.getAlignment () == null || this.viewpanel.getAlignment () !== alignment) { -afile.setSeqs (alignment.getSequencesArray ()); -} else { -afile.setSeqs (this.viewpanel.getAlignment ().getSequencesArray ()); -}var afileresp = afile.print (); -if (afile.hasWarningMessage ()) { -System.err.println ("Warning raised when writing as " + format + " : " + afile.getWarningMessage ()); -}return afileresp; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Failed to write alignment as a '" + format + "' file\n"); -e.printStackTrace (); -} else { -throw e; -} -} -return null; -}, "~S,jalview.datamodel.AlignmentI,~B"); -c$.checkProtocol = Clazz.defineMethod (c$, "checkProtocol", -function (file) { -var protocol = jalview.io.AppletFormatAdapter.FILE; -var ft = file.toLowerCase ().trim (); -if (ft.indexOf ("http:") == 0 || ft.indexOf ("https:") == 0 || ft.indexOf ("file:") == 0) { -protocol = jalview.io.AppletFormatAdapter.URL; -}return protocol; -}, "~S"); -c$.resolveProtocol = Clazz.defineMethod (c$, "resolveProtocol", -function (file, format) { -return jalview.io.AppletFormatAdapter.resolveProtocol (file, format, false); -}, "~S,~S"); -c$.resolveProtocol = Clazz.defineMethod (c$, "resolveProtocol", -function (file, format, debug) { -var protocol = null; -if (debug) { -System.out.println ("resolving datasource started with:\n>>file\n" + file + ">>endfile"); -}try { -var rtn = false; -var is = System.getSecurityManager ().getClass ().getResourceAsStream ("/" + file); -if (is != null) { -rtn = true; -is.close (); -}if (debug) { -System.err.println ("Resource '" + file + "' was " + (rtn ? "" : "not") + " located by classloader."); -};if (rtn) { -protocol = jalview.io.AppletFormatAdapter.CLASSLOADER; -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Exception checking resources: " + file + " " + ex); -} else { -throw ex; -} -} -if (file.indexOf ("://") > -1) { -protocol = jalview.io.AppletFormatAdapter.URL; -} else { -protocol = jalview.io.AppletFormatAdapter.FILE; -}var fp = null; -try { -if (debug) { -System.out.println ("Trying to get contents of resource as " + protocol + ":"); -}fp = new jalview.io.FileParse (file, protocol); -if (!fp.isValid ()) { -fp = null; -} else { -if (debug) { -System.out.println ("Successful."); -}}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -if (debug) { -System.err.println ("Exception when accessing content: " + e); -}fp = null; -} else { -throw e; -} -} -if (fp == null) { -if (debug) { -System.out.println ("Accessing as paste."); -}protocol = jalview.io.AppletFormatAdapter.PASTE; -fp = null; -try { -fp = new jalview.io.FileParse (file, protocol); -if (!fp.isValid ()) { -fp = null; -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Failed to access content as paste!"); -e.printStackTrace (); -fp = null; -} else { -throw e; -} -} -}if (fp == null) { -return null; -}if (format == null || format.length == 0) { -return protocol; -} else { -try { -var idformat = new jalview.io.IdentifyFile ().Identify (file, protocol); -if (idformat == null) { -if (debug) { -System.out.println ("Format not identified. Inaccessible file."); -}return null; -}if (debug) { -System.out.println ("Format identified as " + idformat + "and expected as " + format); -}if (idformat.equals (format)) { -if (debug) { -System.out.println ("Protocol identified as " + protocol); -}return protocol; -} else { -if (debug) { -System.out.println ("File deemed not accessible via " + protocol); -}fp.close (); -return null; -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -if (debug) { -System.err.println ("File deemed not accessible via " + protocol); -e.printStackTrace (); -};} else { -throw e; -} -} -}return null; -}, "~S,~S,~B"); -Clazz.defineMethod (c$, "getAlignFile", -function () { -return this.alignFile; -}); -Clazz.defineMethod (c$, "setAlignFile", -function (alignFile) { -this.alignFile = alignFile; -}, "jalview.io.AlignFile"); -Clazz.defineStatics (c$, -"FILE", "File", -"URL", "URL", -"PASTE", "Paste", -"CLASSLOADER", "ClassLoader"); -c$.READABLE_FORMATS = c$.prototype.READABLE_FORMATS = Clazz.newArray (-1, ["BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH", "PDB", "JnetFile", "RNAML", "PHYLIP", "JSON", "GFF v2 or v3", "HTML"]); -c$.READABLE_EXTENSIONS = c$.prototype.READABLE_EXTENSIONS = Clazz.newArray (-1, ["fa, fasta, mfa, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "sto,stk", "xml,rnaml", "phy", "json", ".gff2,gff3", "jar,jvp", "html"]); -c$.READABLE_FNAMES = c$.prototype.READABLE_FNAMES = Clazz.newArray (-1, ["Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Stockholm", "RNAML", "PHYLIP", "JSON", "GFF v2 or v3", "Jalview", "HTML"]); -c$.WRITEABLE_FORMATS = c$.prototype.WRITEABLE_FORMATS = Clazz.newArray (-1, ["BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "AMSA", "STH", "PHYLIP", "JSON"]); -c$.WRITABLE_EXTENSIONS = c$.prototype.WRITABLE_EXTENSIONS = Clazz.newArray (-1, ["fa, fasta, mfa, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "sto,stk", "phy", "json", "jvp"]); -c$.WRITABLE_FNAMES = c$.prototype.WRITABLE_FNAMES = Clazz.newArray (-1, ["Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "STH", "PHYLIP", "JSON", "Jalview"]); -Clazz.defineStatics (c$, -"INVALID_CHARACTERS", "Contains invalid characters"); -c$.SUPPORTED_FORMATS = c$.prototype.SUPPORTED_FORMATS = "Formats currently supported are\n" + jalview.io.AppletFormatAdapter.prettyPrint (jalview.io.AppletFormatAdapter.READABLE_FORMATS); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (null, "jalview.io.AppletFormatAdapter", ["MCview.PDBfile", "jalview.datamodel.Alignment", "jalview.io.FileParse", "$.IdentifyFile", "jalview.jsdev.GenericFileAdapter", "jalview.util.MessageManager", "java.io.IOException", "java.lang.Exception", "$.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.viewpanel = null; +this.annotFromStructure = false; +this.localSecondaryStruct = false; +this.serviceSecondaryStruct = false; +this.alignFile = null; +this.inFile = null; +this.newline = null; +this.exportSettings = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "AppletFormatAdapter"); +Clazz.prepareFields (c$, function () { +this.newline = System.getProperty ("line.separator"); +}); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (viewpanel) { +this.viewpanel = viewpanel; +}, "jalview.api.AlignmentViewPanel"); +Clazz.makeConstructor (c$, +function (alignPanel, settings) { +this.viewpanel = alignPanel; +this.exportSettings = settings; +}, "jalview.api.AlignmentViewPanel,jalview.api.AlignExportSettingI"); +c$.prettyPrint = Clazz.defineMethod (c$, "prettyPrint", +function (els) { +var list = new StringBuffer (); +for (var i = 0, iSize = els.length - 1; i < iSize; i++) { +list.append (els[i]); +list.append (", "); +} +list.append (" and " + els[els.length - 1] + "."); +return list.toString (); +}, "~A"); +Clazz.defineMethod (c$, "setNewlineString", +function (nl) { +this.newline = nl; +}, "~S"); +Clazz.defineMethod (c$, "getNewlineString", +function () { +return this.newline; +}); +c$.isValidFormat = Clazz.defineMethod (c$, "isValidFormat", +function (format) { +return jalview.io.AppletFormatAdapter.isValidFormat (format, false); +}, "~S"); +c$.isValidFormat = Clazz.defineMethod (c$, "isValidFormat", +function (format, forwriting) { +var valid = false; +var format_list = (forwriting) ? jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS : jalview.io.AppletFormatAdapter.READABLE_FORMATS; +for (var element, $element = 0, $$element = format_list; $element < $$element.length && ((element = $$element[$element]) || true); $element++) { +if (element.equalsIgnoreCase (format)) { +return true; +}} +return valid; +}, "~S,~B"); +Clazz.defineMethod (c$, "readFile", +function (inFile, type, format) { +this.inFile = inFile; +try { +if (format.equals ("FASTA")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [inFile, type]); +} else if (format.equals ("MSF")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("MSFfile", [inFile, type]); +} else if (format.equals ("PileUp")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PileUpfile", [inFile, type]); +} else if (format.equals ("CLUSTAL")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("ClustalFile", [inFile, type]); +} else if (format.equals ("BLC")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("BLCFile", [inFile, type]); +} else if (format.equals ("PIR")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PIRFile", [inFile, type]); +} else if (format.equals ("PFAM")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PfamFile", [inFile, type]); +} else if (format.equals ("JnetFile")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JPredFile", [inFile, type]); +(this.alignFile).removeNonSequences (); +} else if (format.equals ("PDB")) { +this.alignFile = new MCview.PDBfile (this.annotFromStructure, this.localSecondaryStruct, this.serviceSecondaryStruct, inFile, type); +} else if (format.equals ("STH")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("StockholmFile", [inFile, type]); +} else if (format.equals ("SimpleBLAST")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("SimpleBlastFile", [inFile, type]); +} else if (format.equals ("PHYLIP")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PhylipFile", [inFile, type]); +} else if (format.equals ("JSON")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JSONFile", [inFile, type]); +} else if (format.equals ("HTML")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("HtmlFile", [inFile, type]); +} else if (format.equals ("RNAML")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("RnamlFile", [inFile, type]); +} else if (format.equals ("GFF v2 or v3")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("Gff3File", [inFile, type]); +}return this.buildAlignmentFrom (this.alignFile); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to read alignment using the '" + format + "' reader.\n" + e); +if (e.getMessage () != null && e.getMessage ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { +throw new java.io.IOException (e.getMessage ()); +}if (type.equalsIgnoreCase ("Paste")) { +try { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [">UNKNOWN\n" + inFile, "Paste"]); +return this.buildAlignmentFrom (this.alignFile); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +if (ex.toString ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { +throw new java.io.IOException (e.getMessage ()); +}ex.printStackTrace (); +} else { +throw ex; +} +} +}throw new java.io.IOException (jalview.io.AppletFormatAdapter.SUPPORTED_FORMATS); +} else { +throw e; +} +} +}, "~S,~S,~S"); +Clazz.defineMethod (c$, "readFromFile", +function (source, format) { +this.inFile = source.getInFile (); +var type = source.type; +try { +if (format.equals ("FASTA")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [source]); +} else if (format.equals ("MSF")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("MSFfile", [source]); +} else if (format.equals ("PileUp")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PileUpfile", [source]); +} else if (format.equals ("CLUSTAL")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("ClustalFile", [source]); +} else if (format.equals ("BLC")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("BLCFile", [source]); +} else if (format.equals ("PIR")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PIRFile", [source]); +} else if (format.equals ("PFAM")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PfamFile", [source]); +} else if (format.equals ("JnetFile")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JPredFile", [source]); +(this.alignFile).removeNonSequences (); +} else if (format.equals ("PDB")) { +this.alignFile = new MCview.PDBfile (this.annotFromStructure, this.localSecondaryStruct, this.serviceSecondaryStruct, source); +} else if (format.equals ("STH")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("StockholmFile", [source]); +} else if (format.equals ("RNAML")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("RnamlFile", [source]); +} else if (format.equals ("SimpleBLAST")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("SimpleBlastFile", [source]); +} else if (format.equals ("PHYLIP")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("PhylipFile", [source]); +} else if (format.equals ("GFF v2 or v3")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("Gff3File", [this.inFile, type]); +} else if (format.equals ("JSON")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("JSONFile", [source]); +} else if (format.equals ("HTML")) { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("HtmlFile", [source]); +}return this.buildAlignmentFrom (this.alignFile); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +e.printStackTrace (); +System.err.println ("Failed to read alignment using the '" + format + "' reader.\n" + e); +if (e.getMessage () != null && e.getMessage ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { +throw new java.io.IOException (e.getMessage ()); +}if (type.equalsIgnoreCase ("Paste")) { +try { +this.alignFile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", [">UNKNOWN\n" + this.inFile, "Paste"]); +return this.buildAlignmentFrom (this.alignFile); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +if (ex.toString ().startsWith (jalview.io.AppletFormatAdapter.INVALID_CHARACTERS)) { +throw new java.io.IOException (e.getMessage ()); +}ex.printStackTrace (); +} else { +throw ex; +} +} +}throw new java.io.IOException (jalview.io.AppletFormatAdapter.SUPPORTED_FORMATS); +} else { +throw e; +} +} +}, "jalview.io.FileParse,~S"); +Clazz.defineMethod (c$, "buildAlignmentFrom", +($fz = function (alignFile2) { +var al = new jalview.datamodel.Alignment (this.alignFile.getSeqsAsArray ()); +this.alignFile.addAnnotations (al); +this.alignFile.addGroups (al); +return al; +}, $fz.isPrivate = true, $fz), "jalview.io.AlignFile"); +Clazz.defineMethod (c$, "formatSequences", +function (format, jvsuffix, ap, selectedOnly) { +var selvew = ap.getAlignViewport ().getAlignmentView (selectedOnly, false); +var aselview = selvew.getVisibleAlignment (ap.getAlignViewport ().getGapCharacter ()); +var ala = (ap.getAlignViewport ().getVisibleAlignmentAnnotation (selectedOnly)); +if (ala != null) { +for (var aa, $aa = ala.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) { +aselview.addAnnotation (aa); +} +}this.viewpanel = ap; +return this.formatSequences (format, aselview, jvsuffix); +}, "~S,~B,jalview.api.AlignmentViewPanel,~B"); +Clazz.defineMethod (c$, "formatSequences", +function (format, alignment, jvsuffix) { +try { +var afile = null; +if (format.equalsIgnoreCase ("FASTA")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", []); +} else if (format.equalsIgnoreCase ("MSF")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("MSFfile", []); +} else if (format.equalsIgnoreCase ("PileUp")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("PileUpfile", []); +} else if (format.equalsIgnoreCase ("CLUSTAL")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("ClustalFile", []); +} else if (format.equalsIgnoreCase ("BLC")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("BLCFile", []); +} else if (format.equalsIgnoreCase ("PIR")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("PIRFile", []); +} else if (format.equalsIgnoreCase ("PFAM")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("PfamFile", []); +} else if (format.equalsIgnoreCase ("STH")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("StockholmFile", [alignment]); +} else if (format.equalsIgnoreCase ("AMSA")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("AMSAFile", [alignment]); +} else if (format.equalsIgnoreCase ("PHYLIP")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("PhylipFile", []); +} else if (format.equalsIgnoreCase ("JSON")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("JSONFile", []); +} else if (format.equalsIgnoreCase ("RNAML")) { +afile = jalview.jsdev.GenericFileAdapter.getFile ("RnamlFile", []); +} else { +throw new Exception (jalview.util.MessageManager.getString ("error.implementation_error_unknown_file_format_string")); +}afile.setNewlineString (this.newline); +afile.addJVSuffix (jvsuffix); +afile.setExportSettings (this.exportSettings); +afile.configureForView (this.viewpanel); +if (this.viewpanel == null || this.viewpanel.getAlignment () == null || this.viewpanel.getAlignment () !== alignment) { +afile.setSeqs (alignment.getSequencesArray ()); +} else { +afile.setSeqs (this.viewpanel.getAlignment ().getSequencesArray ()); +}var afileresp = afile.print (); +if (afile.hasWarningMessage ()) { +System.err.println ("Warning raised when writing as " + format + " : " + afile.getWarningMessage ()); +}return afileresp; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Failed to write alignment as a '" + format + "' file\n"); +e.printStackTrace (); +} else { +throw e; +} +} +return null; +}, "~S,jalview.datamodel.AlignmentI,~B"); +c$.checkProtocol = Clazz.defineMethod (c$, "checkProtocol", +function (file) { +var protocol = jalview.io.AppletFormatAdapter.FILE; +var ft = file.toLowerCase ().trim (); +if (ft.indexOf ("http:") == 0 || ft.indexOf ("https:") == 0 || ft.indexOf ("file:") == 0) { +protocol = jalview.io.AppletFormatAdapter.URL; +}return protocol; +}, "~S"); +c$.resolveProtocol = Clazz.defineMethod (c$, "resolveProtocol", +function (file, format) { +return jalview.io.AppletFormatAdapter.resolveProtocol (file, format, false); +}, "~S,~S"); +c$.resolveProtocol = Clazz.defineMethod (c$, "resolveProtocol", +function (file, format, debug) { +var protocol = null; +if (debug) { +System.out.println ("resolving datasource started with:\n>>file\n" + file + ">>endfile"); +}try { +var rtn = false; +var is = System.getSecurityManager ().getClass ().getResourceAsStream ("/" + file); +if (is != null) { +rtn = true; +is.close (); +}if (debug) { +System.err.println ("Resource '" + file + "' was " + (rtn ? "" : "not") + " located by classloader."); +};if (rtn) { +protocol = jalview.io.AppletFormatAdapter.CLASSLOADER; +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Exception checking resources: " + file + " " + ex); +} else { +throw ex; +} +} +if (file.indexOf ("://") > -1) { +protocol = jalview.io.AppletFormatAdapter.URL; +} else { +protocol = jalview.io.AppletFormatAdapter.FILE; +}var fp = null; +try { +if (debug) { +System.out.println ("Trying to get contents of resource as " + protocol + ":"); +}fp = new jalview.io.FileParse (file, protocol); +if (!fp.isValid ()) { +fp = null; +} else { +if (debug) { +System.out.println ("Successful."); +}}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +if (debug) { +System.err.println ("Exception when accessing content: " + e); +}fp = null; +} else { +throw e; +} +} +if (fp == null) { +if (debug) { +System.out.println ("Accessing as paste."); +}protocol = jalview.io.AppletFormatAdapter.PASTE; +fp = null; +try { +fp = new jalview.io.FileParse (file, protocol); +if (!fp.isValid ()) { +fp = null; +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Failed to access content as paste!"); +e.printStackTrace (); +fp = null; +} else { +throw e; +} +} +}if (fp == null) { +return null; +}if (format == null || format.length == 0) { +return protocol; +} else { +try { +var idformat = new jalview.io.IdentifyFile ().Identify (file, protocol); +if (idformat == null) { +if (debug) { +System.out.println ("Format not identified. Inaccessible file."); +}return null; +}if (debug) { +System.out.println ("Format identified as " + idformat + "and expected as " + format); +}if (idformat.equals (format)) { +if (debug) { +System.out.println ("Protocol identified as " + protocol); +}return protocol; +} else { +if (debug) { +System.out.println ("File deemed not accessible via " + protocol); +}fp.close (); +return null; +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +if (debug) { +System.err.println ("File deemed not accessible via " + protocol); +e.printStackTrace (); +};} else { +throw e; +} +} +}return null; +}, "~S,~S,~B"); +Clazz.defineMethod (c$, "getAlignFile", +function () { +return this.alignFile; +}); +Clazz.defineMethod (c$, "setAlignFile", +function (alignFile) { +this.alignFile = alignFile; +}, "jalview.io.AlignFile"); +Clazz.defineStatics (c$, +"FILE", "File", +"URL", "URL", +"PASTE", "Paste", +"CLASSLOADER", "ClassLoader"); +c$.READABLE_FORMATS = c$.prototype.READABLE_FORMATS = Clazz.newArray (-1, ["BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "STH", "PDB", "JnetFile", "RNAML", "PHYLIP", "JSON", "GFF v2 or v3", "HTML"]); +c$.READABLE_EXTENSIONS = c$.prototype.READABLE_EXTENSIONS = Clazz.newArray (-1, ["fa, fasta, mfa, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "sto,stk", "xml,rnaml", "phy", "json", ".gff2,gff3", "jar,jvp", "html"]); +c$.READABLE_FNAMES = c$.prototype.READABLE_FNAMES = Clazz.newArray (-1, ["Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Stockholm", "RNAML", "PHYLIP", "JSON", "GFF v2 or v3", "Jalview", "HTML"]); +c$.WRITEABLE_FORMATS = c$.prototype.WRITEABLE_FORMATS = Clazz.newArray (-1, ["BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "AMSA", "STH", "PHYLIP", "JSON"]); +c$.WRITABLE_EXTENSIONS = c$.prototype.WRITABLE_EXTENSIONS = Clazz.newArray (-1, ["fa, fasta, mfa, fastq", "aln", "pfam", "msf", "pir", "blc", "amsa", "sto,stk", "phy", "json", "jvp"]); +c$.WRITABLE_FNAMES = c$.prototype.WRITABLE_FNAMES = Clazz.newArray (-1, ["Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "STH", "PHYLIP", "JSON", "Jalview"]); +Clazz.defineStatics (c$, +"INVALID_CHARACTERS", "Contains invalid characters"); +c$.SUPPORTED_FORMATS = c$.prototype.SUPPORTED_FORMATS = "Formats currently supported are\n" + jalview.io.AppletFormatAdapter.prettyPrint (jalview.io.AppletFormatAdapter.READABLE_FORMATS); +}); diff --git a/bin/jalview/io/FastaFile.class b/bin/jalview/io/FastaFile.class index 811143287a3c1db4f367a22f556e7727aeb96b87..d7fe1ef0c958f38e8f93d49b9fe3005b96aec639 100644 GIT binary patch delta 53 zcmeyQ@ 0) { -if (line.charAt (0) == '>') { -if (line.startsWith (">#_")) { -if (annotation) { -this.annotations.addElement (this.makeAnnotation (seq, sb)); -}} else { -annotation = false; -}if (!firstLine) { -seq.setSequence (sb.toString ()); -if (!annotation) { -this.seqs.addElement (seq); -}}seq = this.parseId (line.substring (1)); -firstLine = false; -sb = new StringBuffer (); -if (line.startsWith (">#_")) { -annotation = true; -}} else { -sb.append (annotation ? uline : line); -}}} -if (annotation) { -this.annotations.addElement (this.makeAnnotation (seq, sb)); -} else if (!firstLine) { -seq.setSequence (sb.toString ()); -this.seqs.addElement (seq); -}}); -Clazz.defineMethod (c$, "makeAnnotation", -($fz = function (seq, sb) { -var anots = new Array (sb.length ()); -var cb; -for (var i = 0; i < anots.length; i++) { -var cn = sb.charAt (i); -if (cn != ' ') { -anots[i] = new jalview.datamodel.Annotation ("" + cn, null, ' ', NaN); -}} -var aa = new jalview.datamodel.AlignmentAnnotation (seq.getName ().substring (2), seq.getDescription (), anots); -return aa; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,StringBuffer"); -Clazz.defineMethod (c$, "addAnnotations", -function (al) { -this.addProperties (al); -for (var i = 0; i < this.annotations.size (); i++) { -var aa = this.annotations.elementAt (i); -aa.setPadGaps (true, al.getGapCharacter ()); -al.addAnnotation (aa); -} -}, "jalview.datamodel.Alignment"); -Clazz.defineMethod (c$, "print", -function (s) { -this.out = new StringBuffer (); -var i = 0; -while ((i < s.length) && (s[i] != null)) { -this.out.append (">" + this.printId (s[i])); -if (s[i].getDescription () != null) { -this.out.append (" " + s[i].getDescription ()); -}this.out.append (this.newline); -var nochunks = (Clazz.doubleToInt (s[i].getLength () / this.len)) + 1; -for (var j = 0; j < nochunks; j++) { -var start = j * this.len; -var end = start + this.len; -if (end < s[i].getLength ()) { -this.out.append (s[i].getSequenceAsString (start, end) + this.newline); -} else if (start < s[i].getLength ()) { -this.out.append (s[i].getSequenceAsString (start, s[i].getLength ()) + this.newline); -}} -i++; -} -return this.out.toString (); -}, "~A"); -Clazz.defineMethod (c$, "print", -function () { -return this.print (this.getSeqsAsArray ()); -}); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile"], "jalview.io.FastaFile", ["jalview.datamodel.AlignmentAnnotation", "$.Annotation", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.len = 72; +this.out = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "FastaFile", jalview.io.AlignFile); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.io.FastaFile, []); +}); +Clazz.overrideMethod (c$, "parse", +function () { +var sb = new StringBuffer (); +var firstLine = true; +var line; +var uline; +var seq = null; +var annotation = false; +while ((uline = this.nextLine ()) != null) { +line = uline.trim (); +if (line.length > 0) { +if (line.charAt (0) == '>') { +if (line.startsWith (">#_")) { +if (annotation) { +this.annotations.addElement (this.makeAnnotation (seq, sb)); +}} else { +annotation = false; +}if (!firstLine) { +seq.setSequence (sb.toString ()); +if (!annotation) { +this.seqs.addElement (seq); +}}seq = this.parseId (line.substring (1)); +firstLine = false; +sb = new StringBuffer (); +if (line.startsWith (">#_")) { +annotation = true; +}} else { +sb.append (annotation ? uline : line); +}}} +if (annotation) { +this.annotations.addElement (this.makeAnnotation (seq, sb)); +} else if (!firstLine) { +seq.setSequence (sb.toString ()); +this.seqs.addElement (seq); +}}); +Clazz.defineMethod (c$, "makeAnnotation", +($fz = function (seq, sb) { +var anots = new Array (sb.length ()); +var cb; +for (var i = 0; i < anots.length; i++) { +var cn = sb.charAt (i); +if (cn != ' ') { +anots[i] = new jalview.datamodel.Annotation ("" + cn, null, ' ', NaN); +}} +var aa = new jalview.datamodel.AlignmentAnnotation (seq.getName ().substring (2), seq.getDescription (), anots); +return aa; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceI,StringBuffer"); +Clazz.defineMethod (c$, "addAnnotations", +function (al) { +this.addProperties (al); +for (var i = 0; i < this.annotations.size (); i++) { +var aa = this.annotations.elementAt (i); +aa.setPadGaps (true, al.getGapCharacter ()); +al.addAnnotation (aa); +} +}, "jalview.datamodel.Alignment"); +Clazz.defineMethod (c$, "print", +function (s) { +this.out = new StringBuffer (); +var i = 0; +while ((i < s.length) && (s[i] != null)) { +this.out.append (">" + this.printId (s[i])); +if (s[i].getDescription () != null) { +this.out.append (" " + s[i].getDescription ()); +}this.out.append (this.newline); +var nochunks = (Clazz.doubleToInt (s[i].getLength () / this.len)) + 1; +for (var j = 0; j < nochunks; j++) { +var start = j * this.len; +var end = start + this.len; +if (end < s[i].getLength ()) { +this.out.append (s[i].getSequenceAsString (start, end) + this.newline); +} else if (start < s[i].getLength ()) { +this.out.append (s[i].getSequenceAsString (start, s[i].getLength ()) + this.newline); +}} +i++; +} +return this.out.toString (); +}, "~A"); +Clazz.defineMethod (c$, "print", +function () { +return this.print (this.getSeqsAsArray ()); +}); +}); diff --git a/bin/jalview/io/FeaturesFile.class b/bin/jalview/io/FeaturesFile.class index 1efc2f659d1b372de647233071508edd94ade489..2d37a41dbfb012b32a6f9ab5b08f3a177e4c2a63 100644 GIT binary patch delta 2140 zcmai!4Qy0Z7RUeR-8u8-&AdWC7|N>!+b%61l|ox=1)B|KU2tf%qLNZns&=W{FWL@J zKI(39DORc=_PQ#>=#ourj3%N}D}vS!pd=>vktG{(cgYfQ$r>OU7EUHj-HVx8SewC7o)HVVY5jeKirykeWmzJjX*+@gWA35qtTkTLg^+ToQnY(QD zG^P^*4>vT_b*>JtZERa(DjnHZdWMb69g*D&KA-3@4`8`o6DsrMM=?`(gz|Ls&NK$1 z28W8xSJO!P*PGQL>xM6k%#DRXyW|~JN?7Q1yd%bHRhBYf)ac`l1vE!rY`pF!Bh?9v zAlLB*Q%VNaPe%-lyG~#TC-=ZRKolNbTF|{zRyJ$asDT zpAAt>jl=2B#_iQ93zI2&quz(7 z!x`#fJ-cN(S&{0Ncd7dXH+oKSlV^;Z*~2ZI&aIroZ9J3Pxs1cSh-YynPv_;lfmiY- zuIJ5?*~RPm5#GpK`B9$4J-m&#b1(1UK7;`BBFnu&EW=$QTk(v482<#tynn$Dxop;| z5nib7nA;?-2Nw6yMmhnei`Zrqs%ChN(?(O=gU!9FMeAS}%nI zhQemmDV}ZgDT|Iv>45P^qdOM0jk88wESe%3>ropdZ-OTiwb(Ct6FoB!QX9ofrIT_S zA7OqJKY`B#nQD`X0wR+_?scd!=*Qb8&?fy{TY-$jZF6Ki+g4D1MVe{M6y3-EQDD~O zoKZMAV{l|<6uB2*MKK9>ytuAv&%Q0W)>NCN<2;fd;4Gp*_6*|!%&6RdBLDJc;(0EP z)_73A(OyvZ-^HYFvR+>L)V%yL6w3>1mD01#i+IW!?~!utfnz<~<-i5p=##HdmtN43 zOONP#JF1p+89&Iz0-_f~{Te~Jo#Ubjd8We$DOCG5RW4*zW)0A*g+VKhhm21(`tjhJ-BY_Ze-pdJotsnig&2XKn%tTT@qfg>@rnu`2T?Crd$T^3N{nf zUE1`A;ezz;WNZMo%i3@BXgHU;^|#?kdhXiExo*PjLF2D3+C6>>`W^4^-b-CQ76mP# z^wK@LVQqc)DSi)s=V9{j`(*P6l*J!X9v`B4e1vY{5eo59s^X7nIUl2X{*>17XS9L; zKwJ0=+R0ziOZ*plg<99g@B^@4zQoIC|bT|p6xCtofU>r)(?al;> zn`tiUMBgStR39TpIH5OVY*?5@PsG^p)1RcR?F!v(VT{6XdB7(~jbbAF*T_S%T=``q zV0K?cipW@EaS2D|5P_=~y5X3@v!j^uBf*$nW%WgT|Im{1|>GI~JXyNUSt~Cqwn>qw8<>Z?7GJXJ5^J^@O%N=h9QUqVs3BZr>+g ziBveqR{fZY8JI1$5c5$k_9ondTgCny)woOS-M9~RVjn;wTEw0*l1_I|qy)l~cAd!O^(&h2^5zI26p zzbD6;KVCTrpg=tJqT}-TX!3|92HqD{gw!z}wIt46V5cc!nL$VCm;)EZazi{IRuH6j z&75U(2$nIWISU&a~dEzfQfTM3lM^Ms0RV!IkBD2#pFKpf&77%84G#4fR0 zO)Z?5)L{sP(FEtp>guYsEBtG`4fVR%7uZ>NQEJJlfwi}N6l1r|L{$*uk)%q>lGLN~ zQuItMh%u4zGi7Nqh|Lu`nc?qs_BGFXlVa8G@-#Jk)`$eoN{AUi zmX590;0Qt+>UEf`oHbRjkL@T`UtSaPj8>&{6V;*FI+^}E)VA{6h(`t%&n_WLELQ}& z=9F3KSm4UNc|x=!UZq#wM2RY+GFi=AU^CYisIGh~%3cY{X92lBP+0wmmb4_-WfZ(D z3JH^~Zfl=bCMHC6YqzURZx$sek2iG^U3EMAkm0tvq6&_RJNoFmLFjh&;6f*?-E`LN zJdL({k$hM#kz3?SIZW2bHm=wz z*U0Vg0Axjqc~Y2$tH~6WAagVq|FBwIAplw{~hDYb!!gL%Xa^ z4@IMxbgg1N=S5qRumHWB7h}nWM{HmeOBeVw-ob4_jDk%E>7rRj7LiUK^Eku+)Q|Pi z)U1N_S)s2>6*VM>P@<}7h-K8=kec3)#C~Wa2jFJ%Uq?ni>_H5J5$>p7Y)Bh7)K?b| z^EBg$e}KD~oNg^!>xXU%=C6Wb%JA8^yUUj~?cb$5%U{(awD{qfHw_@4Z>5eqjn!|U z$v)UJDzb)+z9c=zY2&wMqw4f!&?D-EuYATv?N^@G$sEwcqj2$#UxhHobof>BEI3YO zlckto@1{MuE_+x`eYAN9PqvB)j&Aa*xvR6%r@CyNNF9Cj$=C6de1l)nQ)H8GQlfmDvSlCLB2QC+JVQnDJ@Uv8 zXrcU&7R$3#EkB_~`6;!@FKCy1jyh!*JuAO4H3VPymGG(3|o4Th5UalO#Vh< zX@eRv`-i3v^4=ylaW~t0a38AJE`=AX*w$ekzZHAc r?Q8R9>_xfGuCk%ee+^j-`*}&4cv2i-8_zo%$-+5UoTANV+X?y;IL6T> diff --git a/bin/jalview/io/FeaturesFile.js b/bin/jalview/io/FeaturesFile.js index 7bdc9f9..458787b 100644 --- a/bin/jalview/io/FeaturesFile.js +++ b/bin/jalview/io/FeaturesFile.js @@ -1,772 +1,772 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["jalview.io.AlignFile", "java.lang.Enum", "$.Exception"], "jalview.io.FeaturesFile", ["jalview.analysis.SequenceIdMatcher", "jalview.datamodel.AlignedCodonFrame", "$.SequenceDummy", "$.SequenceFeature", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.GraduatedColor", "$.UserColourScheme", "jalview.util.Format", "$.MapList", "$.ParseHtmlBodyAndLinks", "java.awt.Color", "java.lang.Float", "$.StringBuffer", "java.util.ArrayList", "$.Arrays", "$.HashMap", "$.Hashtable", "$.StringTokenizer", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.doGffSource = true; -this.gffversion = 0; -if (!Clazz.isClassDefined ("jalview.io.FeaturesFile.InvalidGFF3FieldException")) { -jalview.io.FeaturesFile.$FeaturesFile$InvalidGFF3FieldException$ (); -} -this.lastmatchedAl = null; -this.matcher = null; -Clazz.instantialize (this, arguments); -}, jalview.io, "FeaturesFile", jalview.io.AlignFile); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.io.FeaturesFile, []); -}); -Clazz.defineMethod (c$, "parse", -function (align, colours, removeHTML) { -return this.parse (align, colours, null, removeHTML, false); -}, "jalview.datamodel.AlignmentI,java.util.Hashtable,~B"); -Clazz.defineMethod (c$, "parse", -function (align, colours, removeHTML, relaxedIdMatching) { -return this.parse (align, colours, null, removeHTML, relaxedIdMatching); -}, "jalview.datamodel.AlignmentI,java.util.Map,~B,~B"); -Clazz.defineMethod (c$, "parse", -function (align, colours, featureLink, removeHTML) { -return this.parse (align, colours, featureLink, removeHTML, false); -}, "jalview.datamodel.AlignmentI,java.util.Map,java.util.Map,~B"); -Clazz.defineMethod (c$, "parse", -function (align, colours, featureLink, removeHTML, relaxedIdmatching) { -var line = null; -try { -var seq = null; -var newseqs = new java.util.ArrayList (); -var type; -var desc; -var token = null; -var index; -var start; -var end; -var score; -var st; -var sf; -var featureGroup = null; -var groupLink = null; -var typeLink = new java.util.Hashtable (); -var GFFFile = true; -var gffProps = new java.util.HashMap (); -while ((line = this.nextLine ()) != null) { -if (line.startsWith ("#")) { -if (line.startsWith ("##")) { -this.processGffPragma (line, gffProps, align, newseqs); -line = ""; -}continue; -}st = new java.util.StringTokenizer (line, "\t"); -if (st.countTokens () == 1) { -if (line.trim ().equalsIgnoreCase ("GFF")) { -GFFFile = true; -continue; -}}if (st.countTokens () > 1 && st.countTokens () < 4) { -GFFFile = false; -type = st.nextToken (); -if (type.equalsIgnoreCase ("startgroup")) { -featureGroup = st.nextToken (); -if (st.hasMoreElements ()) { -groupLink = st.nextToken (); -featureLink.put (featureGroup, groupLink); -}} else if (type.equalsIgnoreCase ("endgroup")) { -st.nextToken (); -featureGroup = null; -groupLink = null; -} else { -var colour = null; -var colscheme = st.nextToken (); -if (colscheme.indexOf ("|") > -1 || colscheme.trim ().equalsIgnoreCase ("label")) { -var gcol = new java.util.StringTokenizer (colscheme, "|", true); -var threshtype = -1; -var min = 1.4E-45; -var max = 3.4028235E38; -var threshval = NaN; -var labelCol = false; -var mincol = gcol.nextToken (); -if (mincol === "|") { -System.err.println ("Expected either 'label' or a colour specification in the line: " + line); -continue; -}var maxcol = null; -if (mincol.toLowerCase ().indexOf ("label") == 0) { -labelCol = true; -mincol = (gcol.hasMoreTokens () ? gcol.nextToken () : null); -mincol = (gcol.hasMoreTokens () ? gcol.nextToken () : null); -}var abso = null; -var minval; -var maxval; -if (mincol != null) { -if (mincol.equals ("|")) { -mincol = ""; -} else { -gcol.nextToken (); -}maxcol = gcol.nextToken (); -if (maxcol.equals ("|")) { -maxcol = ""; -} else { -gcol.nextToken (); -}abso = gcol.nextToken (); -gcol.nextToken (); -if (abso.toLowerCase ().indexOf ("abso") != 0) { -minval = abso; -abso = null; -} else { -minval = gcol.nextToken (); -gcol.nextToken (); -}maxval = gcol.nextToken (); -if (gcol.hasMoreTokens ()) { -gcol.nextToken (); -}try { -if (minval.length > 0) { -min = new Float (minval).floatValue (); -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Couldn't parse the minimum value for graduated colour for type (" + colscheme + ") - did you misspell 'auto' for the optional automatic colour switch ?"); -e.printStackTrace (); -} else { -throw e; -} -} -try { -if (maxval.length > 0) { -max = new Float (maxval).floatValue (); -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Couldn't parse the maximum value for graduated colour for type (" + colscheme + ")"); -e.printStackTrace (); -} else { -throw e; -} -} -} else { -mincol = "FFFFFF"; -maxcol = "000000"; -}try { -colour = new jalview.schemes.GraduatedColor ( new jalview.schemes.UserColourScheme (mincol).findColour ('A'), new jalview.schemes.UserColourScheme (maxcol).findColour ('A'), min, max); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Couldn't parse the graduated colour scheme (" + colscheme + ")"); -e.printStackTrace (); -} else { -throw e; -} -} -if (colour != null) { -(colour).setColourByLabel (labelCol); -(colour).setAutoScaled (abso == null); -var ttype = null; -var tval = null; -if (gcol.hasMoreTokens ()) { -ttype = gcol.nextToken (); -if (ttype.toLowerCase ().startsWith ("below")) { -(colour).setThreshType (0); -} else if (ttype.toLowerCase ().startsWith ("above")) { -(colour).setThreshType (1); -} else { -(colour).setThreshType (-1); -if (!ttype.toLowerCase ().startsWith ("no")) { -System.err.println ("Ignoring unrecognised threshold type : " + ttype); -}}}if ((colour).getThreshType () != -1) { -try { -gcol.nextToken (); -tval = gcol.nextToken (); -(colour).setThresh ( new Float (tval).floatValue ()); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Couldn't parse threshold value as a float: (" + tval + ")"); -e.printStackTrace (); -} else { -throw e; -} -} -}if (gcol.hasMoreTokens ()) { -System.err.println ("Ignoring additional tokens in parameters in graduated colour specification\n"); -while (gcol.hasMoreTokens ()) { -System.err.println ("|" + gcol.nextToken ()); -} -System.err.println ("\n"); -}}} else { -var ucs = new jalview.schemes.UserColourScheme (colscheme); -colour = ucs.findColour ('A'); -}if (colour != null) { -colours.put (type, colour); -}if (st.hasMoreElements ()) { -var link = st.nextToken (); -typeLink.put (type, link); -if (featureLink == null) { -featureLink = new java.util.Hashtable (); -}featureLink.put (type, link); -}}continue; -}var seqId = ""; -while (st.hasMoreElements ()) { -if (GFFFile) { -seqId = token = st.nextToken (); -seq = this.findName (align, seqId, relaxedIdmatching, newseqs); -if (seq != null) { -desc = st.nextToken (); -var group = null; -if (this.doGffSource && desc.indexOf (' ') == -1) { -group = String.instantialize (desc); -}type = st.nextToken (); -try { -var stt = st.nextToken (); -if (stt.length == 0 || stt.equals ("-")) { -start = 0; -} else { -start = Integer.parseInt (stt); -}} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -start = 0; -} else { -throw ex; -} -} -try { -var stt = st.nextToken (); -if (stt.length == 0 || stt.equals ("-")) { -end = 0; -} else { -end = Integer.parseInt (stt); -}} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -end = 0; -} else { -throw ex; -} -} -if (end == 0) { -start = 0; -}try { -score = new Float (st.nextToken ()).floatValue (); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -score = 0; -} else { -throw ex; -} -} -sf = new jalview.datamodel.SequenceFeature (type, desc, start, end, score, group); -try { -sf.setValue ("STRAND", st.nextToken ()); -sf.setValue ("FRAME", st.nextToken ()); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -if (st.hasMoreTokens ()) { -var attributes = new StringBuffer (); -var sep = false; -while (st.hasMoreTokens ()) { -attributes.append ((sep ? "\t" : "") + st.nextElement ()); -sep = true; -} -sf.setValue ("ATTRIBUTES", attributes.toString ()); -}if (this.processOrAddSeqFeature (align, newseqs, seq, sf, GFFFile, relaxedIdmatching)) { -while ((seq = align.findName (seq, seqId, true)) != null) { -seq.addSequenceFeature ( new jalview.datamodel.SequenceFeature (sf)); -} -}break; -}}if (GFFFile && seq == null) { -desc = token; -} else { -desc = st.nextToken (); -}if (!st.hasMoreTokens ()) { -System.err.println ("DEBUG: Run out of tokens when trying to identify the destination for the feature.. giving up."); -return false; -}token = st.nextToken (); -if (!token.equals ("ID_NOT_SPECIFIED")) { -seq = this.findName (align, seqId = token, relaxedIdmatching, null); -st.nextToken (); -} else { -seqId = null; -try { -index = Integer.parseInt (st.nextToken ()); -seq = align.getSequenceAt (index); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -seq = null; -} else { -throw ex; -} -} -}if (seq == null) { -System.out.println ("Sequence not found: " + line); -break; -}start = Integer.parseInt (st.nextToken ()); -end = Integer.parseInt (st.nextToken ()); -type = st.nextToken (); -if (!colours.containsKey (type)) { -var ucs = new jalview.schemes.UserColourScheme (type); -colours.put (type, ucs.findColour ('A')); -}sf = new jalview.datamodel.SequenceFeature (type, desc, "", start, end, featureGroup); -if (st.hasMoreTokens ()) { -try { -score = new Float (st.nextToken ()).floatValue (); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -score = 0; -} else { -throw ex; -} -} -sf.setScore (score); -}if (groupLink != null && removeHTML) { -sf.addLink (groupLink); -sf.description += "%LINK%"; -}if (typeLink.containsKey (type) && removeHTML) { -sf.addLink (typeLink.get (type).toString ()); -sf.description += "%LINK%"; -}this.parseDescriptionHTML (sf, removeHTML); -seq.addSequenceFeature (sf); -while (seqId != null && (seq = align.findName (seq, seqId, false)) != null) { -seq.addSequenceFeature ( new jalview.datamodel.SequenceFeature (sf)); -} -GFFFile = false; -} -} -this.resetMatcher (); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -this.warningMessage = ((this.warningMessage == null) ? "" : this.warningMessage) + "Parsing error at\n" + line; -System.out.println ("Error parsing feature file: " + ex + "\n" + line); -ex.printStackTrace (System.err); -this.resetMatcher (); -return false; -} else { -throw ex; -} -} -return true; -}, "jalview.datamodel.AlignmentI,java.util.Map,java.util.Map,~B,~B"); -Clazz.defineMethod (c$, "processGffPragma", -($fz = function (line, gffProps, align, newseqs) { -var spacepos = line.indexOf (' '); -var pragma = spacepos == -1 ? line.substring (2).trim () : line.substring (2, spacepos); -var gffpragma = jalview.io.FeaturesFile.GFFPRAGMA.get (pragma.toLowerCase ()); -if (gffpragma == null) { -return; -}switch (gffpragma) { -case jalview.io.FeaturesFile.GffPragmas.gff_version: -try { -this.gffversion = Integer.parseInt (line.substring (spacepos + 1)); -} finally { -} -break; -case jalview.io.FeaturesFile.GffPragmas.feature_ontology: -break; -case jalview.io.FeaturesFile.GffPragmas.attribute_ontology: -break; -case jalview.io.FeaturesFile.GffPragmas.source_ontology: -break; -case jalview.io.FeaturesFile.GffPragmas.species_build: -break; -case jalview.io.FeaturesFile.GffPragmas.hash: -break; -case jalview.io.FeaturesFile.GffPragmas.fasta: -this.process_as_fasta (align, newseqs); -break; -default: -System.err.println ("Ignoring unknown pragma:\n" + line); -} -}, $fz.isPrivate = true, $fz), "~S,java.util.Map,jalview.datamodel.AlignmentI,java.util.ArrayList"); -Clazz.defineMethod (c$, "process_as_fasta", -($fz = function (align, newseqs) { -try { -this.mark (); -} catch (q) { -if (Clazz.exceptionOf (q, java.io.IOException)) { -} else { -throw q; -} -} -var parser = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", []); -var includedseqs = parser.getSeqs (); -var smatcher = new jalview.analysis.SequenceIdMatcher (newseqs); -for (var p = 0, pSize = includedseqs.size (); p < pSize; p++) { -var dummyseq = smatcher.findIdMatch (includedseqs.get (p)); -if (dummyseq != null) { -var mseq = includedseqs.get (p); -if (Clazz.instanceOf (dummyseq, jalview.datamodel.SequenceDummy)) { -(dummyseq).become (mseq); -includedseqs.set (p, dummyseq); -}}} -for (var seq, $seq = includedseqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -align.addSequence (seq); -} -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List"); -Clazz.defineMethod (c$, "processOrAddSeqFeature", -function (align, newseqs, seq, sf, gFFFile, relaxedIdMatching) { -var attr = sf.getValue ("ATTRIBUTES"); -var add = true; -if (gFFFile && attr != null) { -var nattr = 8; -for (var attset, $attset = 0, $$attset = attr.$plit ("\t"); $attset < $$attset.length && ((attset = $$attset[$attset]) || true); $attset++) { -if (attset == null || attset.trim ().length == 0) { -continue; -}nattr++; -var set = new java.util.HashMap (); -for (var pair, $pair = 0, $$pair = attset.trim ().$plit (";"); $pair < $$pair.length && ((pair = $$pair[$pair]) || true); $pair++) { -pair = pair.trim (); -if (pair.length == 0) { -continue; -}var eqpos = pair.indexOf ('='); -var sppos = pair.indexOf (' '); -var key = null; -var value = null; -if (sppos > -1 && (eqpos == -1 || sppos < eqpos)) { -key = pair.substring (0, sppos); -value = pair.substring (sppos + 1); -} else { -if (eqpos > -1 && (sppos == -1 || eqpos < sppos)) { -key = pair.substring (0, eqpos); -value = pair.substring (eqpos + 1); -} else { -key = pair; -}}if (key != null) { -var vals = set.get (key); -if (vals == null) { -vals = new java.util.ArrayList (); -set.put (key, vals); -}if (value != null) { -vals.add (value.trim ()); -}}} -try { -add = new Boolean (add & this.processGffKey (set, nattr, seq, sf, align, newseqs, relaxedIdMatching)).valueOf (); -} catch (ivfe) { -if (Clazz.exceptionOf (ivfe, jalview.io.FeaturesFile.InvalidGFF3FieldException)) { -System.err.println (ivfe); -} else { -throw ivfe; -} -} -} -}if (add) { -seq.addSequenceFeature (sf); -}return add; -}, "jalview.datamodel.AlignmentI,java.util.List,jalview.datamodel.SequenceI,jalview.datamodel.SequenceFeature,~B,~B"); -Clazz.defineMethod (c$, "processGffKey", -function (set, nattr, seq, sf, align, newseqs, relaxedIdMatching) { -var attr; -if (sf.getType ().equals ("similarity")) { -var strand = sf.getStrand (); -var querySeq = this.findNames (align, newseqs, relaxedIdMatching, set.get (attr = "Query")); -if (querySeq == null || querySeq.size () != 1) { -throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Expecting exactly one sequence in Query field (got " + set.get (attr) + ")"); -}if (set.containsKey (attr = "Align")) { -var alco = new jalview.datamodel.AlignedCodonFrame (); -var codonmapping = this.constructCodonMappingFromAlign (set, attr, strand); -alco.addMap (seq, querySeq.get (0), codonmapping); -align.addCodonFrame (alco); -return false; -}}return true; -}, "java.util.Map,~N,jalview.datamodel.SequenceI,jalview.datamodel.SequenceFeature,jalview.datamodel.AlignmentI,java.util.List,~B"); -Clazz.defineMethod (c$, "constructCodonMappingFromAlign", -($fz = function (set, attr, strand) { -if (strand == 0) { -throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Invalid strand for a codon mapping (cannot be 0)"); -}var fromrange = new java.util.ArrayList (); -var torange = new java.util.ArrayList (); -var lastppos = 0; -var lastpframe = 0; -for (var range, $range = set.get (attr).iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { -var ints = new java.util.ArrayList (); -var st = new java.util.StringTokenizer (range, " "); -while (st.hasMoreTokens ()) { -var num = st.nextToken (); -try { -ints.add ( new Integer (num)); -} catch (nfe) { -if (Clazz.exceptionOf (nfe, NumberFormatException)) { -throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Invalid number in field " + num); -} else { -throw nfe; -} -} -} -if (ints.size () != 3) { -throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Invalid number of fields for this attribute (" + ints.size () + ")"); -}fromrange.add ( new Integer (ints.get (0).intValue ())); -fromrange.add ( new Integer (ints.get (0).intValue () + strand * ints.get (2).intValue ())); -if (ints.get (1).equals (new Integer (lastppos)) && lastpframe > 0) { -lastppos += (ints.get (2)).intValue () / 3; -lastpframe = (ints.get (2)).intValue () % 3; -torange.set (torange.size () - 1, new Integer (lastppos)); -} else { -torange.add (ints.get (1)); -lastppos = (ints.get (1)).intValue () + (ints.get (2)).intValue () / 3; -lastpframe = (ints.get (2)).intValue () % 3; -torange.add ( new Integer (lastppos)); -}} -if (fromrange.size () % 2 == 1) { -throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Couldn't parse the DNA alignment range correctly"); -}if (torange.size () % 2 == 1) { -throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Couldn't parse the protein alignment range correctly"); -}var frommap = Clazz.newIntArray (fromrange.size (), 0); -var tomap = Clazz.newIntArray (torange.size (), 0); -var p = 0; -for (var ip, $ip = fromrange.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { -frommap[p++] = ip.intValue (); -} -p = 0; -for (var ip, $ip = torange.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { -tomap[p++] = ip.intValue (); -} -return new jalview.util.MapList (frommap, tomap, 3, 1); -}, $fz.isPrivate = true, $fz), "java.util.Map,~S,~N"); -Clazz.defineMethod (c$, "findNames", -($fz = function (align, newseqs, relaxedIdMatching, list) { -var found = new java.util.ArrayList (); -for (var seqId, $seqId = list.iterator (); $seqId.hasNext () && ((seqId = $seqId.next ()) || true);) { -var seq = this.findName (align, seqId, relaxedIdMatching, newseqs); -if (seq != null) { -found.add (seq); -}} -return found; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List,~B,java.util.List"); -Clazz.defineMethod (c$, "resetMatcher", -($fz = function () { -this.lastmatchedAl = null; -this.matcher = null; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "findName", -($fz = function (align, seqId, relaxedIdMatching, newseqs) { -var match = null; -if (relaxedIdMatching) { -if (this.lastmatchedAl !== align) { -this.matcher = new jalview.analysis.SequenceIdMatcher ((this.lastmatchedAl = align).getSequencesArray ()); -if (newseqs != null) { -this.matcher.addAll (newseqs); -}}match = this.matcher.findIdMatch (seqId); -} else { -match = align.findName (seqId, true); -if (match == null && newseqs != null) { -for (var m, $m = newseqs.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { -if (seqId.equals (m.getName ())) { -return m; -}} -}}if (match == null && newseqs != null) { -match = new jalview.datamodel.SequenceDummy (seqId); -if (relaxedIdMatching) { -this.matcher.addAll (java.util.Arrays.asList ( Clazz.newArray (-1, [match]))); -}newseqs.add (match); -}return match; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,~S,~B,java.util.List"); -Clazz.defineMethod (c$, "parseDescriptionHTML", -function (sf, removeHTML) { -if (sf.getDescription () == null) { -return; -}var parsed = new jalview.util.ParseHtmlBodyAndLinks (sf.getDescription (), removeHTML, this.newline); -sf.description = (removeHTML) ? parsed.getNonHtmlContent () : sf.description; -for (var link, $link = parsed.getLinks ().iterator (); $link.hasNext () && ((link = $link.next ()) || true);) { -sf.addLink (link); -} -}, "jalview.datamodel.SequenceFeature,~B"); -Clazz.defineMethod (c$, "printJalviewFormat", -function (seqs, visible) { -return this.printJalviewFormat (seqs, visible, true, true); -}, "~A,java.util.Map"); -Clazz.defineMethod (c$, "printJalviewFormat", -function (seqs, visible, visOnly, nonpos) { -var out = new StringBuffer (); -var next; -var featuresGen = false; -if (visOnly && !nonpos && (visible == null || visible.size () < 1)) { -return "No Features Visible"; -}if (visible != null && visOnly) { -var en = visible.keySet ().iterator (); -var type; -var color; -while (en.hasNext ()) { -type = en.next ().toString (); -if (Clazz.instanceOf (visible.get (type), jalview.schemes.GraduatedColor)) { -var gc = visible.get (type); -color = (gc.isColourByLabel () ? "label|" : "") + jalview.util.Format.getHexString (gc.getMinColor ()) + "|" + jalview.util.Format.getHexString (gc.getMaxColor ()) + (gc.isAutoScale () ? "|" : "|abso|") + gc.getMin () + "|" + gc.getMax () + "|"; -if (gc.getThreshType () != -1) { -if (gc.getThreshType () == 0) { -color += "below"; -} else { -if (gc.getThreshType () != 1) { -System.err.println ("WARNING: Unsupported threshold type (" + gc.getThreshType () + ") : Assuming 'above'"); -}color += "above"; -}color += "|" + gc.getThresh (); -} else { -color += "none"; -}} else if (Clazz.instanceOf (visible.get (type), java.awt.Color)) { -color = jalview.util.Format.getHexString (visible.get (type)); -} else { -color = jalview.util.Format.getHexString ( new java.awt.Color (Integer.parseInt (visible.get (type).toString ()))); -}out.append (type); -out.append ("\t"); -out.append (color); -out.append (this.newline); -} -}var groups = new java.util.Vector (); -var groupIndex = 0; -var isnonpos = false; -for (var i = 0; i < seqs.length; i++) { -next = seqs[i].getSequenceFeatures (); -if (next != null) { -for (var j = 0; j < next.length; j++) { -isnonpos = next[j].begin == 0 && next[j].end == 0; -if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey (next[j].type))) { -continue; -}if (next[j].featureGroup != null && !groups.contains (next[j].featureGroup)) { -groups.addElement (next[j].featureGroup); -}} -}} -var group = null; -do { -if (groups.size () > 0 && groupIndex < groups.size ()) { -group = groups.elementAt (groupIndex).toString (); -out.append (this.newline); -out.append ("STARTGROUP\t"); -out.append (group); -out.append (this.newline); -} else { -group = null; -}for (var i = 0; i < seqs.length; i++) { -next = seqs[i].getSequenceFeatures (); -if (next != null) { -for (var j = 0; j < next.length; j++) { -isnonpos = next[j].begin == 0 && next[j].end == 0; -if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey (next[j].type))) { -continue; -}if (group != null && (next[j].featureGroup == null || !next[j].featureGroup.equals (group))) { -continue; -}if (group == null && next[j].featureGroup != null) { -continue; -}featuresGen = true; -if (next[j].description == null || next[j].description.equals ("")) { -out.append (next[j].type + "\t"); -} else { -if (next[j].links != null && next[j].getDescription ().indexOf ("") == -1) { -out.append (""); -}out.append (next[j].description + " "); -if (next[j].links != null) { -for (var l = 0; l < next[j].links.size (); l++) { -var label = next[j].links.elementAt (l).toString (); -var href = label.substring (label.indexOf ("|") + 1); -label = label.substring (0, label.indexOf ("|")); -if (next[j].description.indexOf (href) == -1) { -out.append ("" + label + ""); -}} -if (next[j].getDescription ().indexOf ("") == -1) { -out.append (""); -}}out.append ("\t"); -}out.append (seqs[i].getName ()); -out.append ("\t-1\t"); -out.append (next[j].begin); -out.append ("\t"); -out.append (next[j].end); -out.append ("\t"); -out.append (next[j].type); -if (!Float.isNaN (next[j].score)) { -out.append ("\t"); -out.append (next[j].score); -}out.append (this.newline); -} -}} -if (group != null) { -out.append ("ENDGROUP\t"); -out.append (group); -out.append (this.newline); -groupIndex++; -} else { -break; -}} while (groupIndex < groups.size () + 1); -if (!featuresGen) { -return "No Features Visible"; -}return out.toString (); -}, "~A,java.util.Map,~B,~B"); -Clazz.defineMethod (c$, "printGFFFormat", -function (seqs, visible) { -return this.printGFFFormat (seqs, visible, true, true); -}, "~A,java.util.Map"); -Clazz.defineMethod (c$, "printGFFFormat", -function (seqs, visible, visOnly, nonpos) { -var out = new StringBuffer (); -var next; -var source; -var isnonpos; -for (var i = 0; i < seqs.length; i++) { -if (seqs[i].getSequenceFeatures () != null) { -next = seqs[i].getSequenceFeatures (); -for (var j = 0; j < next.length; j++) { -isnonpos = next[j].begin == 0 && next[j].end == 0; -if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey (next[j].type))) { -continue; -}source = next[j].featureGroup; -if (source == null) { -source = next[j].getDescription (); -}out.append (seqs[i].getName ()); -out.append ("\t"); -out.append (source); -out.append ("\t"); -out.append (next[j].type); -out.append ("\t"); -out.append (next[j].begin); -out.append ("\t"); -out.append (next[j].end); -out.append ("\t"); -out.append (next[j].score); -out.append ("\t"); -if (next[j].getValue ("STRAND") != null) { -out.append (next[j].getValue ("STRAND")); -out.append ("\t"); -} else { -out.append (".\t"); -}if (next[j].getValue ("FRAME") != null) { -out.append (next[j].getValue ("FRAME")); -} else { -out.append ("."); -}if (next[j].getValue ("ATTRIBUTES") != null) { -out.append (next[j].getValue ("ATTRIBUTES")); -}out.append (this.newline); -} -}} -return out.toString (); -}, "~A,java.util.Map,~B,~B"); -Clazz.defineMethod (c$, "parse", -function () { -}); -Clazz.overrideMethod (c$, "print", -function () { -return "USE printGFFFormat() or printJalviewFormat()"; -}); -c$.$FeaturesFile$InvalidGFF3FieldException$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.field = null; -this.value = null; -Clazz.instantialize (this, arguments); -}, jalview.io.FeaturesFile, "InvalidGFF3FieldException", Exception); -Clazz.makeConstructor (c$, -function (a, b, c) { -Clazz.superConstructor (this, jalview.io.FeaturesFile.InvalidGFF3FieldException, [c + " (Field was " + a + " and value was " + b.get (a).toString ()]); -this.field = a; -this.value = b.get (a).toString (); -}, "~S,java.util.Map,~S"); -c$ = Clazz.p0p (); -}; -Clazz.pu$h (); -c$ = Clazz.declareType (jalview.io.FeaturesFile, "GffPragmas", Enum); -Clazz.defineEnumConstant (c$, "gff_version", 0, []); -Clazz.defineEnumConstant (c$, "sequence_region", 1, []); -Clazz.defineEnumConstant (c$, "feature_ontology", 2, []); -Clazz.defineEnumConstant (c$, "attribute_ontology", 3, []); -Clazz.defineEnumConstant (c$, "source_ontology", 4, []); -Clazz.defineEnumConstant (c$, "species_build", 5, []); -Clazz.defineEnumConstant (c$, "fasta", 6, []); -Clazz.defineEnumConstant (c$, "hash", 7, []); -c$ = Clazz.p0p (); -Clazz.defineStatics (c$, -"GFFPRAGMA", null); -{ -jalview.io.FeaturesFile.GFFPRAGMA = new java.util.HashMap (); -jalview.io.FeaturesFile.GFFPRAGMA.put ("sequence-region", jalview.io.FeaturesFile.GffPragmas.sequence_region); -jalview.io.FeaturesFile.GFFPRAGMA.put ("feature-ontology", jalview.io.FeaturesFile.GffPragmas.feature_ontology); -jalview.io.FeaturesFile.GFFPRAGMA.put ("#", jalview.io.FeaturesFile.GffPragmas.hash); -jalview.io.FeaturesFile.GFFPRAGMA.put ("fasta", jalview.io.FeaturesFile.GffPragmas.fasta); -jalview.io.FeaturesFile.GFFPRAGMA.put ("species-build", jalview.io.FeaturesFile.GffPragmas.species_build); -jalview.io.FeaturesFile.GFFPRAGMA.put ("source-ontology", jalview.io.FeaturesFile.GffPragmas.source_ontology); -jalview.io.FeaturesFile.GFFPRAGMA.put ("attribute-ontology", jalview.io.FeaturesFile.GffPragmas.attribute_ontology); -}}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile", "java.lang.Enum", "$.Exception"], "jalview.io.FeaturesFile", ["jalview.analysis.SequenceIdMatcher", "jalview.datamodel.AlignedCodonFrame", "$.SequenceDummy", "$.SequenceFeature", "jalview.jsdev.GenericFileAdapter", "jalview.schemes.GraduatedColor", "$.UserColourScheme", "jalview.util.Format", "$.MapList", "$.ParseHtmlBodyAndLinks", "java.awt.Color", "java.lang.Float", "$.StringBuffer", "java.util.ArrayList", "$.Arrays", "$.HashMap", "$.Hashtable", "$.StringTokenizer", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.doGffSource = true; +this.gffversion = 0; +if (!Clazz.isClassDefined ("jalview.io.FeaturesFile.InvalidGFF3FieldException")) { +jalview.io.FeaturesFile.$FeaturesFile$InvalidGFF3FieldException$ (); +} +this.lastmatchedAl = null; +this.matcher = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "FeaturesFile", jalview.io.AlignFile); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.io.FeaturesFile, []); +}); +Clazz.defineMethod (c$, "parse", +function (align, colours, removeHTML) { +return this.parse (align, colours, null, removeHTML, false); +}, "jalview.datamodel.AlignmentI,java.util.Hashtable,~B"); +Clazz.defineMethod (c$, "parse", +function (align, colours, removeHTML, relaxedIdMatching) { +return this.parse (align, colours, null, removeHTML, relaxedIdMatching); +}, "jalview.datamodel.AlignmentI,java.util.Map,~B,~B"); +Clazz.defineMethod (c$, "parse", +function (align, colours, featureLink, removeHTML) { +return this.parse (align, colours, featureLink, removeHTML, false); +}, "jalview.datamodel.AlignmentI,java.util.Map,java.util.Map,~B"); +Clazz.defineMethod (c$, "parse", +function (align, colours, featureLink, removeHTML, relaxedIdmatching) { +var line = null; +try { +var seq = null; +var newseqs = new java.util.ArrayList (); +var type; +var desc; +var token = null; +var index; +var start; +var end; +var score; +var st; +var sf; +var featureGroup = null; +var groupLink = null; +var typeLink = new java.util.Hashtable (); +var GFFFile = true; +var gffProps = new java.util.HashMap (); +while ((line = this.nextLine ()) != null) { +if (line.startsWith ("#")) { +if (line.startsWith ("##")) { +this.processGffPragma (line, gffProps, align, newseqs); +line = ""; +}continue; +}st = new java.util.StringTokenizer (line, "\t"); +if (st.countTokens () == 1) { +if (line.trim ().equalsIgnoreCase ("GFF")) { +GFFFile = true; +continue; +}}if (st.countTokens () > 1 && st.countTokens () < 4) { +GFFFile = false; +type = st.nextToken (); +if (type.equalsIgnoreCase ("startgroup")) { +featureGroup = st.nextToken (); +if (st.hasMoreElements ()) { +groupLink = st.nextToken (); +featureLink.put (featureGroup, groupLink); +}} else if (type.equalsIgnoreCase ("endgroup")) { +st.nextToken (); +featureGroup = null; +groupLink = null; +} else { +var colour = null; +var colscheme = st.nextToken (); +if (colscheme.indexOf ("|") > -1 || colscheme.trim ().equalsIgnoreCase ("label")) { +var gcol = new java.util.StringTokenizer (colscheme, "|", true); +var threshtype = -1; +var min = 1.4E-45; +var max = 3.4028235E38; +var threshval = NaN; +var labelCol = false; +var mincol = gcol.nextToken (); +if (mincol === "|") { +System.err.println ("Expected either 'label' or a colour specification in the line: " + line); +continue; +}var maxcol = null; +if (mincol.toLowerCase ().indexOf ("label") == 0) { +labelCol = true; +mincol = (gcol.hasMoreTokens () ? gcol.nextToken () : null); +mincol = (gcol.hasMoreTokens () ? gcol.nextToken () : null); +}var abso = null; +var minval; +var maxval; +if (mincol != null) { +if (mincol.equals ("|")) { +mincol = ""; +} else { +gcol.nextToken (); +}maxcol = gcol.nextToken (); +if (maxcol.equals ("|")) { +maxcol = ""; +} else { +gcol.nextToken (); +}abso = gcol.nextToken (); +gcol.nextToken (); +if (abso.toLowerCase ().indexOf ("abso") != 0) { +minval = abso; +abso = null; +} else { +minval = gcol.nextToken (); +gcol.nextToken (); +}maxval = gcol.nextToken (); +if (gcol.hasMoreTokens ()) { +gcol.nextToken (); +}try { +if (minval.length > 0) { +min = new Float (minval).floatValue (); +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Couldn't parse the minimum value for graduated colour for type (" + colscheme + ") - did you misspell 'auto' for the optional automatic colour switch ?"); +e.printStackTrace (); +} else { +throw e; +} +} +try { +if (maxval.length > 0) { +max = new Float (maxval).floatValue (); +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Couldn't parse the maximum value for graduated colour for type (" + colscheme + ")"); +e.printStackTrace (); +} else { +throw e; +} +} +} else { +mincol = "FFFFFF"; +maxcol = "000000"; +}try { +colour = new jalview.schemes.GraduatedColor ( new jalview.schemes.UserColourScheme (mincol).findColour ('A'), new jalview.schemes.UserColourScheme (maxcol).findColour ('A'), min, max); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Couldn't parse the graduated colour scheme (" + colscheme + ")"); +e.printStackTrace (); +} else { +throw e; +} +} +if (colour != null) { +(colour).setColourByLabel (labelCol); +(colour).setAutoScaled (abso == null); +var ttype = null; +var tval = null; +if (gcol.hasMoreTokens ()) { +ttype = gcol.nextToken (); +if (ttype.toLowerCase ().startsWith ("below")) { +(colour).setThreshType (0); +} else if (ttype.toLowerCase ().startsWith ("above")) { +(colour).setThreshType (1); +} else { +(colour).setThreshType (-1); +if (!ttype.toLowerCase ().startsWith ("no")) { +System.err.println ("Ignoring unrecognised threshold type : " + ttype); +}}}if ((colour).getThreshType () != -1) { +try { +gcol.nextToken (); +tval = gcol.nextToken (); +(colour).setThresh ( new Float (tval).floatValue ()); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Couldn't parse threshold value as a float: (" + tval + ")"); +e.printStackTrace (); +} else { +throw e; +} +} +}if (gcol.hasMoreTokens ()) { +System.err.println ("Ignoring additional tokens in parameters in graduated colour specification\n"); +while (gcol.hasMoreTokens ()) { +System.err.println ("|" + gcol.nextToken ()); +} +System.err.println ("\n"); +}}} else { +var ucs = new jalview.schemes.UserColourScheme (colscheme); +colour = ucs.findColour ('A'); +}if (colour != null) { +colours.put (type, colour); +}if (st.hasMoreElements ()) { +var link = st.nextToken (); +typeLink.put (type, link); +if (featureLink == null) { +featureLink = new java.util.Hashtable (); +}featureLink.put (type, link); +}}continue; +}var seqId = ""; +while (st.hasMoreElements ()) { +if (GFFFile) { +seqId = token = st.nextToken (); +seq = this.findName (align, seqId, relaxedIdmatching, newseqs); +if (seq != null) { +desc = st.nextToken (); +var group = null; +if (this.doGffSource && desc.indexOf (' ') == -1) { +group = String.instantialize (desc); +}type = st.nextToken (); +try { +var stt = st.nextToken (); +if (stt.length == 0 || stt.equals ("-")) { +start = 0; +} else { +start = Integer.parseInt (stt); +}} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +start = 0; +} else { +throw ex; +} +} +try { +var stt = st.nextToken (); +if (stt.length == 0 || stt.equals ("-")) { +end = 0; +} else { +end = Integer.parseInt (stt); +}} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +end = 0; +} else { +throw ex; +} +} +if (end == 0) { +start = 0; +}try { +score = new Float (st.nextToken ()).floatValue (); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +score = 0; +} else { +throw ex; +} +} +sf = new jalview.datamodel.SequenceFeature (type, desc, start, end, score, group); +try { +sf.setValue ("STRAND", st.nextToken ()); +sf.setValue ("FRAME", st.nextToken ()); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +if (st.hasMoreTokens ()) { +var attributes = new StringBuffer (); +var sep = false; +while (st.hasMoreTokens ()) { +attributes.append ((sep ? "\t" : "") + st.nextElement ()); +sep = true; +} +sf.setValue ("ATTRIBUTES", attributes.toString ()); +}if (this.processOrAddSeqFeature (align, newseqs, seq, sf, GFFFile, relaxedIdmatching)) { +while ((seq = align.findName (seq, seqId, true)) != null) { +seq.addSequenceFeature ( new jalview.datamodel.SequenceFeature (sf)); +} +}break; +}}if (GFFFile && seq == null) { +desc = token; +} else { +desc = st.nextToken (); +}if (!st.hasMoreTokens ()) { +System.err.println ("DEBUG: Run out of tokens when trying to identify the destination for the feature.. giving up."); +return false; +}token = st.nextToken (); +if (!token.equals ("ID_NOT_SPECIFIED")) { +seq = this.findName (align, seqId = token, relaxedIdmatching, null); +st.nextToken (); +} else { +seqId = null; +try { +index = Integer.parseInt (st.nextToken ()); +seq = align.getSequenceAt (index); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +seq = null; +} else { +throw ex; +} +} +}if (seq == null) { +System.out.println ("Sequence not found: " + line); +break; +}start = Integer.parseInt (st.nextToken ()); +end = Integer.parseInt (st.nextToken ()); +type = st.nextToken (); +if (!colours.containsKey (type)) { +var ucs = new jalview.schemes.UserColourScheme (type); +colours.put (type, ucs.findColour ('A')); +}sf = new jalview.datamodel.SequenceFeature (type, desc, "", start, end, featureGroup); +if (st.hasMoreTokens ()) { +try { +score = new Float (st.nextToken ()).floatValue (); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +score = 0; +} else { +throw ex; +} +} +sf.setScore (score); +}if (groupLink != null && removeHTML) { +sf.addLink (groupLink); +sf.description += "%LINK%"; +}if (typeLink.containsKey (type) && removeHTML) { +sf.addLink (typeLink.get (type).toString ()); +sf.description += "%LINK%"; +}this.parseDescriptionHTML (sf, removeHTML); +seq.addSequenceFeature (sf); +while (seqId != null && (seq = align.findName (seq, seqId, false)) != null) { +seq.addSequenceFeature ( new jalview.datamodel.SequenceFeature (sf)); +} +GFFFile = false; +} +} +this.resetMatcher (); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +this.warningMessage = ((this.warningMessage == null) ? "" : this.warningMessage) + "Parsing error at\n" + line; +System.out.println ("Error parsing feature file: " + ex + "\n" + line); +ex.printStackTrace (System.err); +this.resetMatcher (); +return false; +} else { +throw ex; +} +} +return true; +}, "jalview.datamodel.AlignmentI,java.util.Map,java.util.Map,~B,~B"); +Clazz.defineMethod (c$, "processGffPragma", +($fz = function (line, gffProps, align, newseqs) { +var spacepos = line.indexOf (' '); +var pragma = spacepos == -1 ? line.substring (2).trim () : line.substring (2, spacepos); +var gffpragma = jalview.io.FeaturesFile.GFFPRAGMA.get (pragma.toLowerCase ()); +if (gffpragma == null) { +return; +}switch (gffpragma) { +case jalview.io.FeaturesFile.GffPragmas.gff_version: +try { +this.gffversion = Integer.parseInt (line.substring (spacepos + 1)); +} finally { +} +break; +case jalview.io.FeaturesFile.GffPragmas.feature_ontology: +break; +case jalview.io.FeaturesFile.GffPragmas.attribute_ontology: +break; +case jalview.io.FeaturesFile.GffPragmas.source_ontology: +break; +case jalview.io.FeaturesFile.GffPragmas.species_build: +break; +case jalview.io.FeaturesFile.GffPragmas.hash: +break; +case jalview.io.FeaturesFile.GffPragmas.fasta: +this.process_as_fasta (align, newseqs); +break; +default: +System.err.println ("Ignoring unknown pragma:\n" + line); +} +}, $fz.isPrivate = true, $fz), "~S,java.util.Map,jalview.datamodel.AlignmentI,java.util.ArrayList"); +Clazz.defineMethod (c$, "process_as_fasta", +($fz = function (align, newseqs) { +try { +this.mark (); +} catch (q) { +if (Clazz.exceptionOf (q, java.io.IOException)) { +} else { +throw q; +} +} +var parser = jalview.jsdev.GenericFileAdapter.getFile ("FastaFile", []); +var includedseqs = parser.getSeqs (); +var smatcher = new jalview.analysis.SequenceIdMatcher (newseqs); +for (var p = 0, pSize = includedseqs.size (); p < pSize; p++) { +var dummyseq = smatcher.findIdMatch (includedseqs.get (p)); +if (dummyseq != null) { +var mseq = includedseqs.get (p); +if (Clazz.instanceOf (dummyseq, jalview.datamodel.SequenceDummy)) { +(dummyseq).become (mseq); +includedseqs.set (p, dummyseq); +}}} +for (var seq, $seq = includedseqs.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +align.addSequence (seq); +} +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List"); +Clazz.defineMethod (c$, "processOrAddSeqFeature", +function (align, newseqs, seq, sf, gFFFile, relaxedIdMatching) { +var attr = sf.getValue ("ATTRIBUTES"); +var add = true; +if (gFFFile && attr != null) { +var nattr = 8; +for (var attset, $attset = 0, $$attset = attr.$plit ("\t"); $attset < $$attset.length && ((attset = $$attset[$attset]) || true); $attset++) { +if (attset == null || attset.trim ().length == 0) { +continue; +}nattr++; +var set = new java.util.HashMap (); +for (var pair, $pair = 0, $$pair = attset.trim ().$plit (";"); $pair < $$pair.length && ((pair = $$pair[$pair]) || true); $pair++) { +pair = pair.trim (); +if (pair.length == 0) { +continue; +}var eqpos = pair.indexOf ('='); +var sppos = pair.indexOf (' '); +var key = null; +var value = null; +if (sppos > -1 && (eqpos == -1 || sppos < eqpos)) { +key = pair.substring (0, sppos); +value = pair.substring (sppos + 1); +} else { +if (eqpos > -1 && (sppos == -1 || eqpos < sppos)) { +key = pair.substring (0, eqpos); +value = pair.substring (eqpos + 1); +} else { +key = pair; +}}if (key != null) { +var vals = set.get (key); +if (vals == null) { +vals = new java.util.ArrayList (); +set.put (key, vals); +}if (value != null) { +vals.add (value.trim ()); +}}} +try { +add = new Boolean (add & this.processGffKey (set, nattr, seq, sf, align, newseqs, relaxedIdMatching)).valueOf (); +} catch (ivfe) { +if (Clazz.exceptionOf (ivfe, jalview.io.FeaturesFile.InvalidGFF3FieldException)) { +System.err.println (ivfe); +} else { +throw ivfe; +} +} +} +}if (add) { +seq.addSequenceFeature (sf); +}return add; +}, "jalview.datamodel.AlignmentI,java.util.List,jalview.datamodel.SequenceI,jalview.datamodel.SequenceFeature,~B,~B"); +Clazz.defineMethod (c$, "processGffKey", +function (set, nattr, seq, sf, align, newseqs, relaxedIdMatching) { +var attr; +if (sf.getType ().equals ("similarity")) { +var strand = sf.getStrand (); +var querySeq = this.findNames (align, newseqs, relaxedIdMatching, set.get (attr = "Query")); +if (querySeq == null || querySeq.size () != 1) { +throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Expecting exactly one sequence in Query field (got " + set.get (attr) + ")"); +}if (set.containsKey (attr = "Align")) { +var alco = new jalview.datamodel.AlignedCodonFrame (); +var codonmapping = this.constructCodonMappingFromAlign (set, attr, strand); +alco.addMap (seq, querySeq.get (0), codonmapping); +align.addCodonFrame (alco); +return false; +}}return true; +}, "java.util.Map,~N,jalview.datamodel.SequenceI,jalview.datamodel.SequenceFeature,jalview.datamodel.AlignmentI,java.util.List,~B"); +Clazz.defineMethod (c$, "constructCodonMappingFromAlign", +($fz = function (set, attr, strand) { +if (strand == 0) { +throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Invalid strand for a codon mapping (cannot be 0)"); +}var fromrange = new java.util.ArrayList (); +var torange = new java.util.ArrayList (); +var lastppos = 0; +var lastpframe = 0; +for (var range, $range = set.get (attr).iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { +var ints = new java.util.ArrayList (); +var st = new java.util.StringTokenizer (range, " "); +while (st.hasMoreTokens ()) { +var num = st.nextToken (); +try { +ints.add ( new Integer (num)); +} catch (nfe) { +if (Clazz.exceptionOf (nfe, NumberFormatException)) { +throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Invalid number in field " + num); +} else { +throw nfe; +} +} +} +if (ints.size () != 3) { +throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Invalid number of fields for this attribute (" + ints.size () + ")"); +}fromrange.add ( new Integer (ints.get (0).intValue ())); +fromrange.add ( new Integer (ints.get (0).intValue () + strand * ints.get (2).intValue ())); +if (ints.get (1).equals (new Integer (lastppos)) && lastpframe > 0) { +lastppos += (ints.get (2)).intValue () / 3; +lastpframe = (ints.get (2)).intValue () % 3; +torange.set (torange.size () - 1, new Integer (lastppos)); +} else { +torange.add (ints.get (1)); +lastppos = (ints.get (1)).intValue () + (ints.get (2)).intValue () / 3; +lastpframe = (ints.get (2)).intValue () % 3; +torange.add ( new Integer (lastppos)); +}} +if (fromrange.size () % 2 == 1) { +throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Couldn't parse the DNA alignment range correctly"); +}if (torange.size () % 2 == 1) { +throw Clazz.innerTypeInstance (jalview.io.FeaturesFile.InvalidGFF3FieldException, this, null, attr, set, "Couldn't parse the protein alignment range correctly"); +}var frommap = Clazz.newIntArray (fromrange.size (), 0); +var tomap = Clazz.newIntArray (torange.size (), 0); +var p = 0; +for (var ip, $ip = fromrange.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { +frommap[p++] = ip.intValue (); +} +p = 0; +for (var ip, $ip = torange.iterator (); $ip.hasNext () && ((ip = $ip.next ()) || true);) { +tomap[p++] = ip.intValue (); +} +return new jalview.util.MapList (frommap, tomap, 3, 1); +}, $fz.isPrivate = true, $fz), "java.util.Map,~S,~N"); +Clazz.defineMethod (c$, "findNames", +($fz = function (align, newseqs, relaxedIdMatching, list) { +var found = new java.util.ArrayList (); +for (var seqId, $seqId = list.iterator (); $seqId.hasNext () && ((seqId = $seqId.next ()) || true);) { +var seq = this.findName (align, seqId, relaxedIdMatching, newseqs); +if (seq != null) { +found.add (seq); +}} +return found; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,java.util.List,~B,java.util.List"); +Clazz.defineMethod (c$, "resetMatcher", +($fz = function () { +this.lastmatchedAl = null; +this.matcher = null; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "findName", +($fz = function (align, seqId, relaxedIdMatching, newseqs) { +var match = null; +if (relaxedIdMatching) { +if (this.lastmatchedAl !== align) { +this.matcher = new jalview.analysis.SequenceIdMatcher ((this.lastmatchedAl = align).getSequencesArray ()); +if (newseqs != null) { +this.matcher.addAll (newseqs); +}}match = this.matcher.findIdMatch (seqId); +} else { +match = align.findName (seqId, true); +if (match == null && newseqs != null) { +for (var m, $m = newseqs.iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { +if (seqId.equals (m.getName ())) { +return m; +}} +}}if (match == null && newseqs != null) { +match = new jalview.datamodel.SequenceDummy (seqId); +if (relaxedIdMatching) { +this.matcher.addAll (java.util.Arrays.asList ( Clazz.newArray (-1, [match]))); +}newseqs.add (match); +}return match; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentI,~S,~B,java.util.List"); +Clazz.defineMethod (c$, "parseDescriptionHTML", +function (sf, removeHTML) { +if (sf.getDescription () == null) { +return; +}var parsed = new jalview.util.ParseHtmlBodyAndLinks (sf.getDescription (), removeHTML, this.newline); +sf.description = (removeHTML) ? parsed.getNonHtmlContent () : sf.description; +for (var link, $link = parsed.getLinks ().iterator (); $link.hasNext () && ((link = $link.next ()) || true);) { +sf.addLink (link); +} +}, "jalview.datamodel.SequenceFeature,~B"); +Clazz.defineMethod (c$, "printJalviewFormat", +function (seqs, visible) { +return this.printJalviewFormat (seqs, visible, true, true); +}, "~A,java.util.Map"); +Clazz.defineMethod (c$, "printJalviewFormat", +function (seqs, visible, visOnly, nonpos) { +var out = new StringBuffer (); +var next; +var featuresGen = false; +if (visOnly && !nonpos && (visible == null || visible.size () < 1)) { +return "No Features Visible"; +}if (visible != null && visOnly) { +var en = visible.keySet ().iterator (); +var type; +var color; +while (en.hasNext ()) { +type = en.next ().toString (); +if (Clazz.instanceOf (visible.get (type), jalview.schemes.GraduatedColor)) { +var gc = visible.get (type); +color = (gc.isColourByLabel () ? "label|" : "") + jalview.util.Format.getHexString (gc.getMinColor ()) + "|" + jalview.util.Format.getHexString (gc.getMaxColor ()) + (gc.isAutoScale () ? "|" : "|abso|") + gc.getMin () + "|" + gc.getMax () + "|"; +if (gc.getThreshType () != -1) { +if (gc.getThreshType () == 0) { +color += "below"; +} else { +if (gc.getThreshType () != 1) { +System.err.println ("WARNING: Unsupported threshold type (" + gc.getThreshType () + ") : Assuming 'above'"); +}color += "above"; +}color += "|" + gc.getThresh (); +} else { +color += "none"; +}} else if (Clazz.instanceOf (visible.get (type), java.awt.Color)) { +color = jalview.util.Format.getHexString (visible.get (type)); +} else { +color = jalview.util.Format.getHexString ( new java.awt.Color (Integer.parseInt (visible.get (type).toString ()))); +}out.append (type); +out.append ("\t"); +out.append (color); +out.append (this.newline); +} +}var groups = new java.util.Vector (); +var groupIndex = 0; +var isnonpos = false; +for (var i = 0; i < seqs.length; i++) { +next = seqs[i].getSequenceFeatures (); +if (next != null) { +for (var j = 0; j < next.length; j++) { +isnonpos = next[j].begin == 0 && next[j].end == 0; +if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey (next[j].type))) { +continue; +}if (next[j].featureGroup != null && !groups.contains (next[j].featureGroup)) { +groups.addElement (next[j].featureGroup); +}} +}} +var group = null; +do { +if (groups.size () > 0 && groupIndex < groups.size ()) { +group = groups.elementAt (groupIndex).toString (); +out.append (this.newline); +out.append ("STARTGROUP\t"); +out.append (group); +out.append (this.newline); +} else { +group = null; +}for (var i = 0; i < seqs.length; i++) { +next = seqs[i].getSequenceFeatures (); +if (next != null) { +for (var j = 0; j < next.length; j++) { +isnonpos = next[j].begin == 0 && next[j].end == 0; +if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey (next[j].type))) { +continue; +}if (group != null && (next[j].featureGroup == null || !next[j].featureGroup.equals (group))) { +continue; +}if (group == null && next[j].featureGroup != null) { +continue; +}featuresGen = true; +if (next[j].description == null || next[j].description.equals ("")) { +out.append (next[j].type + "\t"); +} else { +if (next[j].links != null && next[j].getDescription ().indexOf ("") == -1) { +out.append (""); +}out.append (next[j].description + " "); +if (next[j].links != null) { +for (var l = 0; l < next[j].links.size (); l++) { +var label = next[j].links.elementAt (l).toString (); +var href = label.substring (label.indexOf ("|") + 1); +label = label.substring (0, label.indexOf ("|")); +if (next[j].description.indexOf (href) == -1) { +out.append ("" + label + ""); +}} +if (next[j].getDescription ().indexOf ("") == -1) { +out.append (""); +}}out.append ("\t"); +}out.append (seqs[i].getName ()); +out.append ("\t-1\t"); +out.append ("" + next[j].begin); +out.append ("\t"); +out.append ("" + next[j].end); +out.append ("\t"); +out.append (next[j].type); +if (!Float.isNaN (next[j].score)) { +out.append ("\t"); +out.append (next[j].score); +}out.append (this.newline); +} +}} +if (group != null) { +out.append ("ENDGROUP\t"); +out.append (group); +out.append (this.newline); +groupIndex++; +} else { +break; +}} while (groupIndex < groups.size () + 1); +if (!featuresGen) { +return "No Features Visible"; +}return out.toString (); +}, "~A,java.util.Map,~B,~B"); +Clazz.defineMethod (c$, "printGFFFormat", +function (seqs, visible) { +return this.printGFFFormat (seqs, visible, true, true); +}, "~A,java.util.Map"); +Clazz.defineMethod (c$, "printGFFFormat", +function (seqs, visible, visOnly, nonpos) { +var out = new StringBuffer (); +var next; +var source; +var isnonpos; +for (var i = 0; i < seqs.length; i++) { +if (seqs[i].getSequenceFeatures () != null) { +next = seqs[i].getSequenceFeatures (); +for (var j = 0; j < next.length; j++) { +isnonpos = next[j].begin == 0 && next[j].end == 0; +if ((!nonpos && isnonpos) || (!isnonpos && visOnly && !visible.containsKey (next[j].type))) { +continue; +}source = next[j].featureGroup; +if (source == null) { +source = next[j].getDescription (); +}out.append (seqs[i].getName ()); +out.append ("\t"); +out.append (source); +out.append ("\t"); +out.append (next[j].type); +out.append ("\t"); +out.append ("" + next[j].begin); +out.append ("\t"); +out.append ("" + next[j].end); +out.append ("\t"); +out.append (next[j].score); +out.append ("\t"); +if (next[j].getValue ("STRAND") != null) { +out.append (next[j].getValue ("STRAND")); +out.append ("\t"); +} else { +out.append (".\t"); +}if (next[j].getValue ("FRAME") != null) { +out.append (next[j].getValue ("FRAME")); +} else { +out.append ("."); +}if (next[j].getValue ("ATTRIBUTES") != null) { +out.append (next[j].getValue ("ATTRIBUTES")); +}out.append (this.newline); +} +}} +return out.toString (); +}, "~A,java.util.Map,~B,~B"); +Clazz.defineMethod (c$, "parse", +function () { +}); +Clazz.overrideMethod (c$, "print", +function () { +return "USE printGFFFormat() or printJalviewFormat()"; +}); +c$.$FeaturesFile$InvalidGFF3FieldException$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.field = null; +this.value = null; +Clazz.instantialize (this, arguments); +}, jalview.io.FeaturesFile, "InvalidGFF3FieldException", Exception); +Clazz.makeConstructor (c$, +function (a, b, c) { +Clazz.superConstructor (this, jalview.io.FeaturesFile.InvalidGFF3FieldException, [c + " (Field was " + a + " and value was " + b.get (a).toString ()]); +this.field = a; +this.value = b.get (a).toString (); +}, "~S,java.util.Map,~S"); +c$ = Clazz.p0p (); +}; +Clazz.pu$h (); +c$ = Clazz.declareType (jalview.io.FeaturesFile, "GffPragmas", Enum); +Clazz.defineEnumConstant (c$, "gff_version", 0, []); +Clazz.defineEnumConstant (c$, "sequence_region", 1, []); +Clazz.defineEnumConstant (c$, "feature_ontology", 2, []); +Clazz.defineEnumConstant (c$, "attribute_ontology", 3, []); +Clazz.defineEnumConstant (c$, "source_ontology", 4, []); +Clazz.defineEnumConstant (c$, "species_build", 5, []); +Clazz.defineEnumConstant (c$, "fasta", 6, []); +Clazz.defineEnumConstant (c$, "hash", 7, []); +c$ = Clazz.p0p (); +Clazz.defineStatics (c$, +"GFFPRAGMA", null); +{ +jalview.io.FeaturesFile.GFFPRAGMA = new java.util.HashMap (); +jalview.io.FeaturesFile.GFFPRAGMA.put ("sequence-region", jalview.io.FeaturesFile.GffPragmas.sequence_region); +jalview.io.FeaturesFile.GFFPRAGMA.put ("feature-ontology", jalview.io.FeaturesFile.GffPragmas.feature_ontology); +jalview.io.FeaturesFile.GFFPRAGMA.put ("#", jalview.io.FeaturesFile.GffPragmas.hash); +jalview.io.FeaturesFile.GFFPRAGMA.put ("fasta", jalview.io.FeaturesFile.GffPragmas.fasta); +jalview.io.FeaturesFile.GFFPRAGMA.put ("species-build", jalview.io.FeaturesFile.GffPragmas.species_build); +jalview.io.FeaturesFile.GFFPRAGMA.put ("source-ontology", jalview.io.FeaturesFile.GffPragmas.source_ontology); +jalview.io.FeaturesFile.GFFPRAGMA.put ("attribute-ontology", jalview.io.FeaturesFile.GffPragmas.attribute_ontology); +}}); diff --git a/bin/jalview/io/FileParse.class b/bin/jalview/io/FileParse.class index 86fbc3c36c3ca36f9c55c2dc4dd464c9eb20c5f2..e2448f1f4bda6987aad2b19a92f6f4b273a82e08 100644 GIT binary patch delta 63 zcmaFn{@8tkp(JDdW+O=!7O5%*f&UD18CcjE7}*&rA&7zD7lUHr*)Yp(JC|W+O=!7U^0B;r|SC8CcjE7}*&rA&7zD7lWdl)8qhIWj-Ay-9HS$ S?2LMHzZh7UHrLChumJ!<)({Z@ diff --git a/bin/jalview/io/FileParse.js b/bin/jalview/io/FileParse.js index 51d1e87..a16b90a 100644 --- a/bin/jalview/io/FileParse.js +++ b/bin/jalview/io/FileParse.js @@ -1,250 +1,250 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (null, "jalview.io.FileParse", ["jalview.io.AppletFormatAdapter", "jalview.util.MessageManager", "java.io.BufferedReader", "$.IOException", "$.InputStreamReader", "$.StringReader", "java.lang.Error", "java.net.URL", "java.util.zip.GZIPInputStream"], function () { -c$ = Clazz.decorateAsClass (function () { -this.dataName = "unknown source"; -this.inFile = null; -this.viewport = null; -this.exportSettings = null; -this.index = 1; -this.suffixSeparator = '#'; -this.newline = null; -this.suffix = null; -this.type = null; -this.dataIn = null; -this.errormessage = "UNITIALISED SOURCE"; -this.error = true; -this.warningMessage = null; -this.READAHEAD_LIMIT = 2048; -Clazz.instantialize (this, arguments); -}, jalview.io, "FileParse"); -Clazz.prepareFields (c$, function () { -this.newline = System.getProperty ("line.separator"); -}); -Clazz.defineMethod (c$, "setNewlineString", -function (nl) { -this.newline = nl; -}, "~S"); -Clazz.defineMethod (c$, "getNewlineString", -function () { -return this.newline; -}); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (from) { -if (from == null) { -throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_null_fileparse")); -}if (from === this) { -return; -}this.index = ++from.index; -this.inFile = from.inFile; -this.suffixSeparator = from.suffixSeparator; -this.suffix = from.suffix; -this.errormessage = from.errormessage; -this.error = false; -this.type = from.type; -this.dataIn = from.dataIn; -if (this.dataIn != null) { -this.mark (); -}this.dataName = from.dataName; -}, "jalview.io.FileParse"); -Clazz.defineMethod (c$, "tryAsGzipSource", -($fz = function (inputStream) { -var inData = new java.io.BufferedReader ( new java.io.InputStreamReader ( new java.util.zip.GZIPInputStream (inputStream))); -inData.mark (2048); -inData.read (); -inData.reset (); -return inData; -}, $fz.isPrivate = true, $fz), "java.io.InputStream"); -Clazz.defineMethod (c$, "checkURLSource", -($fz = function (fileStr) { -this.errormessage = "URL NOT FOUND"; -var url = new java.net.URL (fileStr); -var e = null; -if (fileStr.toLowerCase ().endsWith (".gz")) { -try { -var inputStream = url.openStream (); -this.dataIn = this.tryAsGzipSource (inputStream); -this.dataName = fileStr; -return false; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -e = ex; -} else { -throw ex; -} -} -}try { -this.dataIn = new java.io.BufferedReader ( new java.io.InputStreamReader (url.openStream ())); -} catch (q) { -if (Clazz.exceptionOf (q, java.io.IOException)) { -if (e != null) { -throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.failed_to_resolve_gzip_stream"), e); -}throw q; -} else { -throw q; -} -} -this.dataName = fileStr; -return false; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "extractSuffix", -($fz = function (fileStr) { -var sfpos = fileStr.lastIndexOf (this.suffixSeparator); -if (sfpos > -1 && sfpos < fileStr.length - 1) { -this.suffix = fileStr.substring (sfpos + 1); -return fileStr.substring (0, sfpos); -}return null; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.makeConstructor (c$, -function (fileStr, type) { -this.type = type; -this.error = false; -if (type.equals (jalview.io.AppletFormatAdapter.FILE)) { -{ -}} else if (type.equals (jalview.io.AppletFormatAdapter.URL)) { -try { -try { -this.checkURLSource (fileStr); -if (this.suffixSeparator == '#') { -this.extractSuffix (fileStr); -}} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -var suffixLess = this.extractSuffix (fileStr); -if (suffixLess == null) { -throw (e); -} else { -try { -this.checkURLSource (suffixLess); -} catch (e2) { -if (Clazz.exceptionOf (e2, java.io.IOException)) { -this.errormessage = "BAD URL WITH OR WITHOUT SUFFIX"; -throw (e); -} else { -throw e2; -} -} -}} else { -throw e; -} -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -this.errormessage = "CANNOT ACCESS DATA AT URL '" + fileStr + "' (" + e.getMessage () + ")"; -this.error = true; -} else { -throw e; -} -} -} else if (type.equals (jalview.io.AppletFormatAdapter.PASTE)) { -this.errormessage = "PASTE INACCESSIBLE!"; -this.dataIn = new java.io.BufferedReader ( new java.io.StringReader (fileStr)); -this.dataName = "Paste"; -} else if (type.equals (jalview.io.AppletFormatAdapter.CLASSLOADER)) { -this.errormessage = "RESOURCE CANNOT BE LOCATED"; -var is = this.getClass ().getResourceAsStream ("/" + fileStr); -if (is == null) { -var suffixLess = this.extractSuffix (fileStr); -if (suffixLess != null) { -is = this.getClass ().getResourceAsStream ("/" + suffixLess); -}}if (is != null) { -this.dataIn = new java.io.BufferedReader ( new java.io.InputStreamReader (is)); -this.dataName = fileStr; -} else { -this.error = true; -}} else { -this.errormessage = "PROBABLE IMPLEMENTATION ERROR : Datasource Type given as '" + (type != null ? type : "null") + "'"; -this.error = true; -}if (this.dataIn == null || this.error) { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.failed_to_read_data_from_source", Clazz.newArray (-1, [this.errormessage]))); -}this.error = false; -this.dataIn.mark (2048); -}, "~S,~S"); -Clazz.defineMethod (c$, "mark", -function () { -if (this.dataIn != null) { -this.dataIn.mark (2048); -} else { -throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.no_init_source_stream")); -}}); -Clazz.defineMethod (c$, "nextLine", -function () { -if (!this.error) { -return this.dataIn.readLine (); -}throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.invalid_source_stream", Clazz.newArray (-1, [this.errormessage]))); -}); -Clazz.defineMethod (c$, "isExporting", -function () { -return !this.error && this.dataIn == null; -}); -Clazz.defineMethod (c$, "isValid", -function () { -return !this.error; -}); -Clazz.defineMethod (c$, "close", -function () { -this.errormessage = "EXCEPTION ON CLOSE"; -this.error = true; -this.dataIn.close (); -this.dataIn = null; -this.errormessage = "SOURCE IS CLOSED"; -}); -Clazz.defineMethod (c$, "reset", -function () { -if (this.dataIn != null && !this.error) { -this.dataIn.reset (); -} else { -throw new java.io.IOException (jalview.util.MessageManager.getString ("error.implementation_error_reset_called_for_invalid_source")); -}}); -Clazz.defineMethod (c$, "hasWarningMessage", -function () { -return (this.warningMessage != null && this.warningMessage.length > 0); -}); -Clazz.defineMethod (c$, "getWarningMessage", -function () { -return this.warningMessage; -}); -Clazz.defineMethod (c$, "getInFile", -function () { -if (this.inFile != null) { -return this.inFile.getAbsolutePath () + " (" + this.index + ")"; -} else { -return "From Paste + (" + this.index + ")"; -}}); -Clazz.defineMethod (c$, "getDataName", -function () { -return this.dataName; -}); -Clazz.defineMethod (c$, "setDataName", -function (dataname) { -this.dataName = dataname; -}, "~S"); -Clazz.defineMethod (c$, "getReader", -function () { -if (this.dataIn != null) { -return this.dataIn; -}return null; -}); -Clazz.defineMethod (c$, "getViewport", -function () { -return this.viewport; -}); -Clazz.defineMethod (c$, "setViewport", -function (viewport) { -this.viewport = viewport; -}, "jalview.api.AlignViewportI"); -Clazz.defineMethod (c$, "getExportSettings", -function () { -return this.exportSettings; -}); -Clazz.defineMethod (c$, "setExportSettings", -function (exportSettings) { -this.exportSettings = exportSettings; -}, "jalview.api.AlignExportSettingI"); -Clazz.defineMethod (c$, "configureForView", -function (avpanel) { -if (avpanel != null) { -this.setViewport (avpanel.getAlignViewport ()); -}}, "jalview.api.AlignmentViewPanel"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (null, "jalview.io.FileParse", ["jalview.io.AppletFormatAdapter", "jalview.util.MessageManager", "java.io.BufferedReader", "$.IOException", "$.InputStreamReader", "$.StringReader", "java.lang.Error", "java.net.URL", "java.util.zip.GZIPInputStream"], function () { +c$ = Clazz.decorateAsClass (function () { +this.dataName = "unknown source"; +this.inFile = null; +this.viewport = null; +this.exportSettings = null; +this.index = 1; +this.suffixSeparator = '#'; +this.newline = null; +this.suffix = null; +this.type = null; +this.dataIn = null; +this.errormessage = "UNITIALISED SOURCE"; +this.error = true; +this.warningMessage = null; +this.READAHEAD_LIMIT = 2048; +Clazz.instantialize (this, arguments); +}, jalview.io, "FileParse"); +Clazz.prepareFields (c$, function () { +this.newline = System.getProperty ("line.separator"); +}); +Clazz.defineMethod (c$, "setNewlineString", +function (nl) { +this.newline = nl; +}, "~S"); +Clazz.defineMethod (c$, "getNewlineString", +function () { +return this.newline; +}); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (from) { +if (from == null) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_null_fileparse")); +}if (from === this) { +return; +}this.index = ++from.index; +this.inFile = from.inFile; +this.suffixSeparator = from.suffixSeparator; +this.suffix = from.suffix; +this.errormessage = from.errormessage; +this.error = false; +this.type = from.type; +this.dataIn = from.dataIn; +if (this.dataIn != null) { +this.mark (); +}this.dataName = from.dataName; +}, "jalview.io.FileParse"); +Clazz.defineMethod (c$, "tryAsGzipSource", +($fz = function (inputStream) { +var inData = new java.io.BufferedReader ( new java.io.InputStreamReader ( new java.util.zip.GZIPInputStream (inputStream))); +inData.mark (2048); +inData.read (); +inData.reset (); +return inData; +}, $fz.isPrivate = true, $fz), "java.io.InputStream"); +Clazz.defineMethod (c$, "checkURLSource", +($fz = function (fileStr) { +this.errormessage = "URL NOT FOUND"; +var url = new java.net.URL (fileStr); +var e = null; +if (fileStr.toLowerCase ().endsWith (".gz")) { +try { +var inputStream = url.openStream (); +this.dataIn = this.tryAsGzipSource (inputStream); +this.dataName = fileStr; +return false; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +e = ex; +} else { +throw ex; +} +} +}try { +this.dataIn = new java.io.BufferedReader ( new java.io.InputStreamReader (url.openStream ())); +} catch (q) { +if (Clazz.exceptionOf (q, java.io.IOException)) { +if (e != null) { +throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.failed_to_resolve_gzip_stream"), e); +}throw q; +} else { +throw q; +} +} +this.dataName = fileStr; +return false; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "extractSuffix", +($fz = function (fileStr) { +var sfpos = fileStr.lastIndexOf (this.suffixSeparator); +if (sfpos > -1 && sfpos < fileStr.length - 1) { +this.suffix = fileStr.substring (sfpos + 1); +return fileStr.substring (0, sfpos); +}return null; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.makeConstructor (c$, +function (fileStr, type) { +this.type = type; +this.error = false; +if (type.equals (jalview.io.AppletFormatAdapter.FILE)) { +{ +}} else if (type.equals (jalview.io.AppletFormatAdapter.URL)) { +try { +try { +this.checkURLSource (fileStr); +if (this.suffixSeparator == '#') { +this.extractSuffix (fileStr); +}} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +var suffixLess = this.extractSuffix (fileStr); +if (suffixLess == null) { +throw (e); +} else { +try { +this.checkURLSource (suffixLess); +} catch (e2) { +if (Clazz.exceptionOf (e2, java.io.IOException)) { +this.errormessage = "BAD URL WITH OR WITHOUT SUFFIX"; +throw (e); +} else { +throw e2; +} +} +}} else { +throw e; +} +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +this.errormessage = "CANNOT ACCESS DATA AT URL '" + fileStr + "' (" + e.getMessage () + ")"; +this.error = true; +} else { +throw e; +} +} +} else if (type.equals (jalview.io.AppletFormatAdapter.PASTE)) { +this.errormessage = "PASTE INACCESSIBLE!"; +this.dataIn = new java.io.BufferedReader ( new java.io.StringReader (fileStr)); +this.dataName = "Paste"; +} else if (type.equals (jalview.io.AppletFormatAdapter.CLASSLOADER)) { +this.errormessage = "RESOURCE CANNOT BE LOCATED"; +var is = this.getClass ().getResourceAsStream ("/" + fileStr); +if (is == null) { +var suffixLess = this.extractSuffix (fileStr); +if (suffixLess != null) { +is = this.getClass ().getResourceAsStream ("/" + suffixLess); +}}if (is != null) { +this.dataIn = new java.io.BufferedReader ( new java.io.InputStreamReader (is)); +this.dataName = fileStr; +} else { +this.error = true; +}} else { +this.errormessage = "PROBABLE IMPLEMENTATION ERROR : Datasource Type given as '" + (type != null ? type : "null") + "'"; +this.error = true; +}if (this.dataIn == null || this.error) { +throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.failed_to_read_data_from_source", Clazz.newArray (-1, [this.errormessage]))); +}this.error = false; +this.dataIn.mark (2048); +}, "~S,~S"); +Clazz.defineMethod (c$, "mark", +function () { +if (this.dataIn != null) { +this.dataIn.mark (2048); +} else { +throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.no_init_source_stream")); +}}); +Clazz.defineMethod (c$, "nextLine", +function () { +if (!this.error) { +return this.dataIn.readLine (); +}throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.invalid_source_stream", Clazz.newArray (-1, [this.errormessage]))); +}); +Clazz.defineMethod (c$, "isExporting", +function () { +return !this.error && this.dataIn == null; +}); +Clazz.defineMethod (c$, "isValid", +function () { +return !this.error; +}); +Clazz.defineMethod (c$, "close", +function () { +this.errormessage = "EXCEPTION ON CLOSE"; +this.error = true; +this.dataIn.close (); +this.dataIn = null; +this.errormessage = "SOURCE IS CLOSED"; +}); +Clazz.defineMethod (c$, "reset", +function () { +if (this.dataIn != null && !this.error) { +this.dataIn.reset (); +} else { +throw new java.io.IOException (jalview.util.MessageManager.getString ("error.implementation_error_reset_called_for_invalid_source")); +}}); +Clazz.defineMethod (c$, "hasWarningMessage", +function () { +return (this.warningMessage != null && this.warningMessage.length > 0); +}); +Clazz.defineMethod (c$, "getWarningMessage", +function () { +return this.warningMessage; +}); +Clazz.defineMethod (c$, "getInFile", +function () { +if (this.inFile != null) { +return this.inFile.getAbsolutePath () + " (" + this.index + ")"; +} else { +return "From Paste + (" + this.index + ")"; +}}); +Clazz.defineMethod (c$, "getDataName", +function () { +return this.dataName; +}); +Clazz.defineMethod (c$, "setDataName", +function (dataname) { +this.dataName = dataname; +}, "~S"); +Clazz.defineMethod (c$, "getReader", +function () { +if (this.dataIn != null) { +return this.dataIn; +}return null; +}); +Clazz.defineMethod (c$, "getViewport", +function () { +return this.viewport; +}); +Clazz.defineMethod (c$, "setViewport", +function (viewport) { +this.viewport = viewport; +}, "jalview.api.AlignViewportI"); +Clazz.defineMethod (c$, "getExportSettings", +function () { +return this.exportSettings; +}); +Clazz.defineMethod (c$, "setExportSettings", +function (exportSettings) { +this.exportSettings = exportSettings; +}, "jalview.api.AlignExportSettingI"); +Clazz.defineMethod (c$, "configureForView", +function (avpanel) { +if (avpanel != null) { +this.setViewport (avpanel.getAlignViewport ()); +}}, "jalview.api.AlignmentViewPanel"); +}); diff --git a/bin/jalview/io/IdentifyFile.class b/bin/jalview/io/IdentifyFile.class index 7acd3517d35403c487df7c0e2af309ef570224ca..2b3d5d4d0a4b0d40d51e723037c4a8419de29097 100644 GIT binary patch delta 62 zcmV-E0KxzECfp{lwhIBiv$qTG1qROmF#iA-lfV&D7y1AN`2Y(101O8JMo0$$*Z~p= U3itp8lPwZ41OEU9vtkky0nif@hX4Qo delta 92 zcmcbk_DyZWHg3ino40enW0ii%VDg_qgn@&dfsvg-9EjZ*7#SHE82&RbO*Rk`nY>@n qPMYZ#1Jh3iu0ISsKxq$lh8v7RoLpcrrpY2ghAhlL#hX2ZL>K{`I~MN% diff --git a/bin/jalview/io/IdentifyFile.js b/bin/jalview/io/IdentifyFile.js index 4d88cdd..cf35241 100644 --- a/bin/jalview/io/IdentifyFile.js +++ b/bin/jalview/io/IdentifyFile.js @@ -1,157 +1,157 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (null, "jalview.io.IdentifyFile", ["jalview.io.FileParse"], function () { -c$ = Clazz.declareType (jalview.io, "IdentifyFile"); -Clazz.defineMethod (c$, "Identify", -function (file, protocol) { -var emessage = "UNIDENTIFIED FILE PARSING ERROR"; -var parser = null; -try { -parser = new jalview.io.FileParse (file, protocol); -if (parser.isValid ()) { -return this.Identify (parser); -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Error whilst identifying"); -e.printStackTrace (System.err); -emessage = e.getMessage (); -} else { -throw e; -} -} -if (parser != null) { -return parser.errormessage; -}return emessage; -}, "~S,~S"); -Clazz.defineMethod (c$, "Identify", -function (source) { -return this.Identify (source, true); -}, "jalview.io.FileParse"); -Clazz.defineMethod (c$, "Identify", -function (source, closeSource) { -var reply = "PFAM"; -var data; -var length = 0; -var lineswereskipped = false; -var isBinary = false; -try { -if (!closeSource) { -source.mark (); -}while ((data = source.nextLine ()) != null) { -length += data.trim ().length; -if (!lineswereskipped) { -for (var i = 0; !isBinary && i < data.length; i++) { -var c = data.charAt (i); -isBinary = (c.charCodeAt (0) < 32 && c != '\t' && c != '\n' && c != '\r' && c.charCodeAt (0) != 5 && c.charCodeAt (0) != 27); -} -}if (isBinary) { -if (source.inFile != null) { -var fileStr = source.inFile.getName (); -if (fileStr.lastIndexOf (".jar") > -1 || fileStr.lastIndexOf (".zip") > -1) { -reply = "Jalview"; -}}if (!lineswereskipped && data.startsWith ("PK")) { -reply = "Jalview"; -break; -}}data = data.toUpperCase (); -if (data.startsWith ("##GFF-VERSION")) { -reply = "GFF v2 or v3"; -break; -}if (data.indexOf ("# STOCKHOLM") > -1) { -reply = "STH"; -break; -}if (data.matches ("])*>")) { -reply = "HTML"; -break; -}if (data.matches ("])*>")) { -reply = "RNAML"; -break; -}if (data.indexOf ("{\"") > -1) { -reply = "JSON"; -break; -}if ((data.length < 1) || (data.indexOf ("#") == 0)) { -lineswereskipped = true; -continue; -}if (data.indexOf ("PILEUP") > -1) { -reply = "PileUp"; -break; -}if ((data.indexOf ("//") == 0) || ((data.indexOf ("!!") > -1) && (data.indexOf ("!!") < data.indexOf ("_MULTIPLE_ALIGNMENT ")))) { -reply = "MSF"; -break; -} else if (data.indexOf ("CLUSTAL") > -1) { -reply = "CLUSTAL"; -break; -} else if (data.indexOf (">") > -1) { -var checkPIR = false; -var starterm = false; -if ((data.indexOf (">P1;") > -1) || (data.indexOf (">DL;") > -1)) { -checkPIR = true; -reply = "PIR"; -}data = source.nextLine (); -if (data.indexOf (">") > -1) { -reply = "BLC"; -} else { -var data1 = source.nextLine (); -var data2 = source.nextLine (); -var c1; -if (checkPIR) { -starterm = (data1 != null && data1.indexOf ("*") > -1) || (data2 != null && data2.indexOf ("*") > -1); -}if (data2 != null && (c1 = data.indexOf ("*")) > -1) { -if (c1 == 0 && c1 == data2.indexOf ("*")) { -reply = "BLC"; -} else { -reply = "FASTA"; -}} else { -reply = "FASTA"; -if (!checkPIR) { -break; -}}}if (checkPIR) { -var dta = null; -if (!starterm) { -do { -try { -dta = source.nextLine (); -} catch (ex) { -if (Clazz.exceptionOf (ex, java.io.IOException)) { -} else { -throw ex; -} -} -;if (dta != null && dta.indexOf ("*") > -1) { -starterm = true; -}} while (dta != null && !starterm); -}if (starterm) { -reply = "PIR"; -break; -} else { -reply = "FASTA"; -}}break; -} else if (data.indexOf ("HEADER") == 0 || data.indexOf ("ATOM") == 0) { -reply = "PDB"; -break; -} else if (data.matches ("\\s*\\d+\\s+\\d+\\s*")) { -reply = "PHYLIP"; -break; -} else if (!lineswereskipped && data.charAt (0) != '*' && data.charAt (0) != ' ' && data.indexOf (":") < data.indexOf (",")) { -reply = "JnetFile"; -break; -}lineswereskipped = true; -} -if (closeSource) { -source.close (); -} else { -source.reset (); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("File Identification failed!\n" + ex); -return source.errormessage; -} else { -throw ex; -} -} -if (length == 0) { -System.err.println ("File Identification failed! - Empty file was read."); -return "EMPTY DATA FILE"; -}return reply; -}, "jalview.io.FileParse,~B"); -Clazz.defineStatics (c$, -"GFF3File", "GFF v2 or v3"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (null, "jalview.io.IdentifyFile", ["jalview.io.FileParse"], function () { +c$ = Clazz.declareType (jalview.io, "IdentifyFile"); +Clazz.defineMethod (c$, "Identify", +function (file, protocol) { +var emessage = "UNIDENTIFIED FILE PARSING ERROR"; +var parser = null; +try { +parser = new jalview.io.FileParse (file, protocol); +if (parser.isValid ()) { +return this.Identify (parser); +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Error whilst identifying"); +e.printStackTrace (System.err); +emessage = e.getMessage (); +} else { +throw e; +} +} +if (parser != null) { +return parser.errormessage; +}return emessage; +}, "~S,~S"); +Clazz.defineMethod (c$, "Identify", +function (source) { +return this.Identify (source, true); +}, "jalview.io.FileParse"); +Clazz.defineMethod (c$, "Identify", +function (source, closeSource) { +var reply = "PFAM"; +var data; +var length = 0; +var lineswereskipped = false; +var isBinary = false; +try { +if (!closeSource) { +source.mark (); +}while ((data = source.nextLine ()) != null) { +length += data.trim ().length; +if (!lineswereskipped) { +for (var i = 0; !isBinary && i < data.length; i++) { +var c = data.charAt (i); +isBinary = (c.charCodeAt (0) < 32 && c != '\t' && c != '\n' && c != '\r' && c.charCodeAt (0) != 5 && c.charCodeAt (0) != 27); +} +}if (isBinary) { +if (source.inFile != null) { +var fileStr = source.inFile.getName (); +if (fileStr.lastIndexOf (".jar") > -1 || fileStr.lastIndexOf (".zip") > -1) { +reply = "Jalview"; +}}if (!lineswereskipped && data.startsWith ("PK")) { +reply = "Jalview"; +break; +}}data = data.toUpperCase (); +if (data.startsWith ("##GFF-VERSION")) { +reply = "GFF v2 or v3"; +break; +}if (data.indexOf ("# STOCKHOLM") > -1) { +reply = "STH"; +break; +}if (data.matches ("])*>")) { +reply = "HTML"; +break; +}if (data.matches ("])*>")) { +reply = "RNAML"; +break; +}if (data.indexOf ("{\"") > -1) { +reply = "JSON"; +break; +}if ((data.length < 1) || (data.indexOf ("#") == 0)) { +lineswereskipped = true; +continue; +}if (data.indexOf ("PILEUP") > -1) { +reply = "PileUp"; +break; +}if ((data.indexOf ("//") == 0) || ((data.indexOf ("!!") > -1) && (data.indexOf ("!!") < data.indexOf ("_MULTIPLE_ALIGNMENT ")))) { +reply = "MSF"; +break; +} else if (data.indexOf ("CLUSTAL") > -1) { +reply = "CLUSTAL"; +break; +} else if (data.indexOf (">") > -1) { +var checkPIR = false; +var starterm = false; +if ((data.indexOf (">P1;") > -1) || (data.indexOf (">DL;") > -1)) { +checkPIR = true; +reply = "PIR"; +}data = source.nextLine (); +if (data.indexOf (">") > -1) { +reply = "BLC"; +} else { +var data1 = source.nextLine (); +var data2 = source.nextLine (); +var c1; +if (checkPIR) { +starterm = (data1 != null && data1.indexOf ("*") > -1) || (data2 != null && data2.indexOf ("*") > -1); +}if (data2 != null && (c1 = data.indexOf ("*")) > -1) { +if (c1 == 0 && c1 == data2.indexOf ("*")) { +reply = "BLC"; +} else { +reply = "FASTA"; +}} else { +reply = "FASTA"; +if (!checkPIR) { +break; +}}}if (checkPIR) { +var dta = null; +if (!starterm) { +do { +try { +dta = source.nextLine (); +} catch (ex) { +if (Clazz.exceptionOf (ex, java.io.IOException)) { +} else { +throw ex; +} +} +;if (dta != null && dta.indexOf ("*") > -1) { +starterm = true; +}} while (dta != null && !starterm); +}if (starterm) { +reply = "PIR"; +break; +} else { +reply = "FASTA"; +}}break; +} else if (data.indexOf ("HEADER") == 0 || data.indexOf ("ATOM") == 0) { +reply = "PDB"; +break; +} else if (data.matches ("\\s*\\d+\\s+\\d+\\s*")) { +reply = "PHYLIP"; +break; +} else if (!lineswereskipped && data.charAt (0) != '*' && data.charAt (0) != ' ' && data.indexOf (":") < data.indexOf (",")) { +reply = "JnetFile"; +break; +}lineswereskipped = true; +} +if (closeSource) { +source.close (); +} else { +source.reset (); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("File Identification failed!\n" + ex); +return source.errormessage; +} else { +throw ex; +} +} +if (length == 0) { +System.err.println ("File Identification failed! - Empty file was read."); +return "EMPTY DATA FILE"; +}return reply; +}, "jalview.io.FileParse,~B"); +Clazz.defineStatics (c$, +"GFF3File", "GFF v2 or v3"); +}); diff --git a/bin/jalview/io/JPredFile.class b/bin/jalview/io/JPredFile.class index d668d00af30f50cbcdcfa1d840cf0f403ac7ffa1..a3812ce8c6ffb38883d1f33964aecebe068d7878 100644 GIT binary patch delta 68 zcmV-K0K5P7H}yBLkP!i+vylB$G=RP5~2>niwDf0<*dp -1) { -seq_entries.addElement (newseq); -var i = 1; -var name = id.substring (id.indexOf (";") + 1); -while (ids.lastIndexOf (name) > -1) { -name = id.substring (id.indexOf (";") + 1) + "_" + ++i; -} -if (this.QuerySeqPosition == -1) this.QuerySeqPosition = ids.size (); -ids.addElement (name); -this.noSeqs++; -} else { -if (id.equals ("JNETPRED")) { -id = "Predicted Secondary Structure"; -}seq_entries.addElement (newseq.toString ()); -ids.addElement (id); -Symscores.put (id, new Integer (ids.size () - 1)); -}}} -this.maxLength = seq_entries.elementAt (0).toString ().length; -for (var i = 0; i < ids.size (); i++) { -var newSeq = new jalview.datamodel.Sequence (ids.elementAt (i).toString (), seq_entries.elementAt (i).toString (), 1, seq_entries.elementAt (i).toString ().length); -if (this.maxLength != seq_entries.elementAt (i).toString ().length) { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.jpredconcide_entry_has_unexpected_number_of_columns", Clazz.newArray (-1, [ids.elementAt (i).toString ()]))); -}if ((newSeq.getName ().startsWith ("QUERY") || newSeq.getName ().startsWith ("align;")) && (this.QuerySeqPosition == -1)) { -this.QuerySeqPosition = this.seqs.size (); -}this.seqs.addElement (newSeq); -} -if (this.seqs.size () > 0 && this.QuerySeqPosition > -1) { -var tal = new jalview.datamodel.Alignment (this.getSeqsAsArray ()); -try { -jalview.io.JnetAnnotationMaker.add_annotation (this, tal, this.QuerySeqPosition, true); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -tal = null; -var ex = new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.couldnt_parse_concise_annotation_for_prediction", Clazz.newArray (-1, [e.getMessage ()]))); -e.printStackTrace (); -throw ex; -} else { -throw e; -} -} -this.annotations = new java.util.Vector (); -var aan = tal.getAlignmentAnnotation (); -for (var aai = 0; aan != null && aai < aan.length; aai++) { -this.annotations.addElement (aan[aai]); -} -}}); -Clazz.overrideMethod (c$, "print", -function () { -return "Not Supported"; -}); -c$.main = Clazz.defineMethod (c$, "main", -function (args) { -try { -var blc = new jalview.io.JPredFile (args[0], "File"); -for (var i = 0; i < blc.seqs.size (); i++) { -System.out.println ((blc.seqs.elementAt (i)).getName () + "\n" + (blc.seqs.elementAt (i)).getSequenceAsString () + "\n"); -} -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -System.err.println ("Exception " + e); -} else { -throw e; -} -} -}, "~A"); -Clazz.defineMethod (c$, "removeNonSequences", -function () { -if (this.annotSeqs != null) { -return; -}this.annotSeqs = new java.util.Vector (); -var newseqs = new java.util.Vector (); -var i = 0; -var j = this.seqs.size (); -for (; i < this.QuerySeqPosition; i++) { -this.annotSeqs.addElement (this.seqs.elementAt (i)); -} -{ -var sq = this.seqs.elementAt (j - 1); -if (sq.getName ().toUpperCase ().startsWith ("JPRED")) { -this.annotSeqs.addElement (sq); -this.seqs.removeElementAt (--j); -}}for (; i < j; i++) { -newseqs.addElement (this.seqs.elementAt (i)); -} -this.seqs.removeAllElements (); -this.seqs = newseqs; -}); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile"], "jalview.io.JPredFile", ["jalview.datamodel.Alignment", "$.Sequence", "jalview.io.JnetAnnotationMaker", "jalview.util.MessageManager", "java.io.IOException", "java.lang.Float", "$.StringBuffer", "java.util.Hashtable", "$.StringTokenizer", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ids = null; +this.conf = null; +this.Scores = null; +this.Symscores = null; +this.QuerySeqPosition = 0; +this.annotSeqs = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "JPredFile", jalview.io.AlignFile); +Clazz.defineMethod (c$, "setQuerySeqPosition", +function (QuerySeqPosition) { +this.QuerySeqPosition = QuerySeqPosition; +}, "~N"); +Clazz.defineMethod (c$, "getQuerySeqPosition", +function () { +return this.QuerySeqPosition; +}); +Clazz.defineMethod (c$, "getScores", +function () { +return this.Scores; +}); +Clazz.defineMethod (c$, "getSymscores", +function () { +return this.Symscores; +}); +Clazz.defineMethod (c$, "initData", +function () { +Clazz.superCall (this, jalview.io.JPredFile, "initData", []); +this.Scores = new java.util.Hashtable (); +this.ids = null; +this.conf = null; +}); +Clazz.overrideMethod (c$, "parse", +function () { +var line; +this.QuerySeqPosition = -1; +this.noSeqs = 0; +var seq_entries = new java.util.Vector (); +var ids = new java.util.Vector (); +var Symscores = new java.util.Hashtable (); +while ((line = this.nextLine ()) != null) { +var str = new java.util.StringTokenizer (line, ":"); +var id = ""; +if (!str.hasMoreTokens ()) { +continue; +}id = str.nextToken (); +var seqsym = str.nextToken (); +var symbols = new java.util.StringTokenizer (seqsym, ","); +var numSymbols = symbols.countTokens (); +if (numSymbols == 0) { +continue; +}if (seqsym.length != (2 * numSymbols)) { +if (this.Scores.containsKey (id)) { +var i = 1; +while (this.Scores.containsKey (id + "_" + i)) { +i++; +} +id = id + "_" + i; +}var scores = new java.util.Vector (); +var i = 0; +var ascore = "dead"; +try { +while (symbols.hasMoreTokens ()) { +ascore = symbols.nextToken (); +var score = new Float (ascore); +scores.addElement (score); +} +this.Scores.put (id, scores); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +i = scores.size (); +for (var j = 0; j < i; j++) { +scores.setElementAt ((scores.elementAt (j)).toString (), j); +} +scores.addElement (ascore); +while (symbols.hasMoreTokens ()) { +ascore = symbols.nextToken (); +scores.addElement (ascore); +} +this.Scores.put (id, scores); +} else { +throw e; +} +} +} else if (id.equals ("jnetconf")) { +id = "Prediction Confidence"; +this.conf = new java.util.Vector (numSymbols); +for (var i = 0; i < numSymbols; i++) { +this.conf.setElementAt (symbols.nextToken (), i); +} +} else { +var newseq = new StringBuffer (); +for (var i = 0; i < numSymbols; i++) { +newseq.append (symbols.nextToken ()); +} +if (id.indexOf (";") > -1) { +seq_entries.addElement (newseq); +var i = 1; +var name = id.substring (id.indexOf (";") + 1); +while (ids.lastIndexOf (name) > -1) { +name = id.substring (id.indexOf (";") + 1) + "_" + ++i; +} +if (this.QuerySeqPosition == -1) this.QuerySeqPosition = ids.size (); +ids.addElement (name); +this.noSeqs++; +} else { +if (id.equals ("JNETPRED")) { +id = "Predicted Secondary Structure"; +}seq_entries.addElement (newseq.toString ()); +ids.addElement (id); +Symscores.put (id, new Integer (ids.size () - 1)); +}}} +this.maxLength = seq_entries.elementAt (0).toString ().length; +for (var i = 0; i < ids.size (); i++) { +var newSeq = new jalview.datamodel.Sequence (ids.elementAt (i).toString (), seq_entries.elementAt (i).toString (), 1, seq_entries.elementAt (i).toString ().length); +if (this.maxLength != seq_entries.elementAt (i).toString ().length) { +throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.jpredconcide_entry_has_unexpected_number_of_columns", Clazz.newArray (-1, [ids.elementAt (i).toString ()]))); +}if ((newSeq.getName ().startsWith ("QUERY") || newSeq.getName ().startsWith ("align;")) && (this.QuerySeqPosition == -1)) { +this.QuerySeqPosition = this.seqs.size (); +}this.seqs.addElement (newSeq); +} +if (this.seqs.size () > 0 && this.QuerySeqPosition > -1) { +var tal = new jalview.datamodel.Alignment (this.getSeqsAsArray ()); +try { +jalview.io.JnetAnnotationMaker.add_annotation (this, tal, this.QuerySeqPosition, true); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +tal = null; +var ex = new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.couldnt_parse_concise_annotation_for_prediction", Clazz.newArray (-1, [e.getMessage ()]))); +e.printStackTrace (); +throw ex; +} else { +throw e; +} +} +this.annotations = new java.util.Vector (); +var aan = tal.getAlignmentAnnotation (); +for (var aai = 0; aan != null && aai < aan.length; aai++) { +this.annotations.addElement (aan[aai]); +} +}}); +Clazz.overrideMethod (c$, "print", +function () { +return "Not Supported"; +}); +c$.main = Clazz.defineMethod (c$, "main", +function (args) { +try { +var blc = new jalview.io.JPredFile (args[0], "File"); +for (var i = 0; i < blc.seqs.size (); i++) { +System.out.println ((blc.seqs.elementAt (i)).getName () + "\n" + (blc.seqs.elementAt (i)).getSequenceAsString () + "\n"); +} +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +System.err.println ("Exception " + e); +} else { +throw e; +} +} +}, "~A"); +Clazz.defineMethod (c$, "removeNonSequences", +function () { +if (this.annotSeqs != null) { +return; +}this.annotSeqs = new java.util.Vector (); +var newseqs = new java.util.Vector (); +var i = 0; +var j = this.seqs.size (); +for (; i < this.QuerySeqPosition; i++) { +this.annotSeqs.addElement (this.seqs.elementAt (i)); +} +{ +var sq = this.seqs.elementAt (j - 1); +if (sq.getName ().toUpperCase ().startsWith ("JPRED")) { +this.annotSeqs.addElement (sq); +this.seqs.removeElementAt (--j); +}}for (; i < j; i++) { +newseqs.addElement (this.seqs.elementAt (i)); +} +this.seqs.removeAllElements (); +this.seqs = newseqs; +}); +}); diff --git a/bin/jalview/io/JnetAnnotationMaker.class b/bin/jalview/io/JnetAnnotationMaker.class index 9724528e988b40d99b52304ee050a840d7b64e8d..38b17016d9fee19a66ea38cdb34eb452dc80ab48 100644 GIT binary patch delta 34 pcmbQCJ56_kATMLpW+C3I?959T^d`R&xyr~n`JkvUkh~^(2mr)Z3yS~% delta 50 zcmbQHJ41JaATMLhW+C3I?99s;3?{!4xhl@a^oK!&@i#;KF9yy(46Hy_(k})!rpZ@C G4*>w9dl2ma diff --git a/bin/jalview/io/JnetAnnotationMaker.js b/bin/jalview/io/JnetAnnotationMaker.js index f39d55b..e2f51a5 100644 --- a/bin/jalview/io/JnetAnnotationMaker.js +++ b/bin/jalview/io/JnetAnnotationMaker.js @@ -1,90 +1,90 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (null, "jalview.io.JnetAnnotationMaker", ["jalview.datamodel.AlignmentAnnotation", "$.Annotation", "jalview.util.MessageManager", "java.lang.Exception", "$.Float"], function () { -c$ = Clazz.declareType (jalview.io, "JnetAnnotationMaker"); -c$.add_annotation = Clazz.defineMethod (c$, "add_annotation", -function (prediction, al, firstSeq, noMsa) { -jalview.io.JnetAnnotationMaker.add_annotation (prediction, al, firstSeq, noMsa, Clazz.castNullAs ("Array")); -}, "jalview.io.AlignFile,jalview.datamodel.AlignmentI,~N,~B"); -c$.add_annotation = Clazz.defineMethod (c$, "add_annotation", -function (prediction, al, firstSeq, noMsa, delMap) { -var i = 0; -var preds = prediction.getSeqsAsArray (); -var seqRef = al.getSequenceAt (firstSeq); -var width = preds[0].getSequence ().length; -var gapmap = al.getSequenceAt (firstSeq).gapMap (); -if ((delMap != null && delMap.length > width) || (delMap == null && gapmap.length != width)) { -throw ( new Exception (jalview.util.MessageManager.formatMessage ("exception.number_of_residues_in_query_sequence_differ_from_prediction", Clazz.newArray (-1, [(delMap == null ? "" : jalview.util.MessageManager.getString ("label.mapped")), al.getSequenceAt (firstSeq).getName (), al.getSequenceAt (firstSeq).getSequenceAsString (), Integer.$valueOf (width).toString ()])))); -}var annot; -var annotations = null; -var existingAnnotations = 0; -if (al.getAlignmentAnnotation () != null) { -existingAnnotations = al.getAlignmentAnnotation ().length; -}var sol = new Array (al.getWidth ()); -var firstsol = true; -while (i < preds.length) { -var id = preds[i].getName ().toUpperCase (); -if (id.startsWith ("LUPAS") || id.startsWith ("JNET") || id.startsWith ("JPRED")) { -if (id.startsWith ("JNETSOL")) { -var amnt = (id.endsWith ("25") ? 3 : id.endsWith ("5") ? 6 : 9); -for (var spos = 0; spos < width; spos++) { -var sposw = (delMap == null) ? gapmap[spos] : gapmap[delMap[spos]]; -if (firstsol) { -sol[sposw] = new jalview.datamodel.Annotation (0); -}if (preds[i].getCharAt (spos) == 'B' && (sol[sposw].value == 0 || sol[sposw].value < amnt)) { -sol[sposw].value = amnt; -}} -firstsol = false; -} else { -annotations = new Array (al.getWidth ()); -if (id.equals ("JNETPRED") || id.equals ("JNETPSSM") || id.equals ("JNETFREQ") || id.equals ("JNETHMM") || id.equals ("JNETALIGN") || id.equals ("JPRED")) { -if (delMap == null) { -for (var j = 0; j < width; j++) { -annotations[gapmap[j]] = new jalview.datamodel.Annotation ("", "", preds[i].getCharAt (j), 0); -} -} else { -for (var j = 0; j < width; j++) { -annotations[gapmap[delMap[j]]] = new jalview.datamodel.Annotation ("", "", preds[i].getCharAt (j), 0); -} -}} else if (id.equals ("JNETCONF")) { -if (delMap == null) { -for (var j = 0; j < width; j++) { -var value = new Float (preds[i].getCharAt (j) + "").floatValue (); -annotations[gapmap[j]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", preds[i].getCharAt (j), value); -} -} else { -for (var j = 0; j < width; j++) { -var value = new Float (preds[i].getCharAt (j) + "").floatValue (); -annotations[gapmap[delMap[j]]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", preds[i].getCharAt (j), value); -} -}} else { -if (delMap == null) { -for (var j = 0; j < width; j++) { -annotations[gapmap[j]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", ' ', 0); -} -} else { -for (var j = 0; j < width; j++) { -annotations[gapmap[delMap[j]]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", ' ', 0); -} -}}if (id.equals ("JNETCONF")) { -annot = new jalview.datamodel.AlignmentAnnotation (preds[i].getName (), "JNet Output", annotations, 0, 10, 1); -} else { -annot = new jalview.datamodel.AlignmentAnnotation (preds[i].getName (), "JNet Output", annotations); -}if (seqRef != null) { -annot.createSequenceMapping (seqRef, 1, true); -seqRef.addAlignmentAnnotation (annot); -}al.addAnnotation (annot); -al.setAnnotationIndex (annot, al.getAlignmentAnnotation ().length - existingAnnotations - 1); -}if (noMsa) { -al.deleteSequence (preds[i]); -}}i++; -} -if (!firstsol) { -annot = new jalview.datamodel.AlignmentAnnotation ("Jnet Burial", "Prediction of Solvent Accessibility
levels are
  • 0 - Exposed
  • 3 - 25% or more S.A. accessible
  • 6 - 5% or more S.A. accessible
  • 9 - Buried (<5% exposed)
", sol, 0, 9, 1); -annot.validateRangeAndDisplay (); -if (seqRef != null) { -annot.createSequenceMapping (seqRef, 1, true); -seqRef.addAlignmentAnnotation (annot); -}al.addAnnotation (annot); -al.setAnnotationIndex (annot, al.getAlignmentAnnotation ().length - existingAnnotations - 1); -}}, "jalview.io.AlignFile,jalview.datamodel.AlignmentI,~N,~B,~A"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (null, "jalview.io.JnetAnnotationMaker", ["jalview.datamodel.AlignmentAnnotation", "$.Annotation", "jalview.util.MessageManager", "java.lang.Exception", "$.Float"], function () { +c$ = Clazz.declareType (jalview.io, "JnetAnnotationMaker"); +c$.add_annotation = Clazz.defineMethod (c$, "add_annotation", +function (prediction, al, firstSeq, noMsa) { +jalview.io.JnetAnnotationMaker.add_annotation (prediction, al, firstSeq, noMsa, Clazz.castNullAs ("Array")); +}, "jalview.io.AlignFile,jalview.datamodel.AlignmentI,~N,~B"); +c$.add_annotation = Clazz.defineMethod (c$, "add_annotation", +function (prediction, al, firstSeq, noMsa, delMap) { +var i = 0; +var preds = prediction.getSeqsAsArray (); +var seqRef = al.getSequenceAt (firstSeq); +var width = preds[0].getSequence ().length; +var gapmap = al.getSequenceAt (firstSeq).gapMap (); +if ((delMap != null && delMap.length > width) || (delMap == null && gapmap.length != width)) { +throw ( new Exception (jalview.util.MessageManager.formatMessage ("exception.number_of_residues_in_query_sequence_differ_from_prediction", Clazz.newArray (-1, [(delMap == null ? "" : jalview.util.MessageManager.getString ("label.mapped")), al.getSequenceAt (firstSeq).getName (), al.getSequenceAt (firstSeq).getSequenceAsString (), Integer.$valueOf (width).toString ()])))); +}var annot; +var annotations = null; +var existingAnnotations = 0; +if (al.getAlignmentAnnotation () != null) { +existingAnnotations = al.getAlignmentAnnotation ().length; +}var sol = new Array (al.getWidth ()); +var firstsol = true; +while (i < preds.length) { +var id = preds[i].getName ().toUpperCase (); +if (id.startsWith ("LUPAS") || id.startsWith ("JNET") || id.startsWith ("JPRED")) { +if (id.startsWith ("JNETSOL")) { +var amnt = (id.endsWith ("25") ? 3 : id.endsWith ("5") ? 6 : 9); +for (var spos = 0; spos < width; spos++) { +var sposw = (delMap == null) ? gapmap[spos] : gapmap[delMap[spos]]; +if (firstsol) { +sol[sposw] = new jalview.datamodel.Annotation (0); +}if (preds[i].getCharAt (spos) == 'B' && (sol[sposw].value == 0 || sol[sposw].value < amnt)) { +sol[sposw].value = amnt; +}} +firstsol = false; +} else { +annotations = new Array (al.getWidth ()); +if (id.equals ("JNETPRED") || id.equals ("JNETPSSM") || id.equals ("JNETFREQ") || id.equals ("JNETHMM") || id.equals ("JNETALIGN") || id.equals ("JPRED")) { +if (delMap == null) { +for (var j = 0; j < width; j++) { +annotations[gapmap[j]] = new jalview.datamodel.Annotation ("", "", preds[i].getCharAt (j), 0); +} +} else { +for (var j = 0; j < width; j++) { +annotations[gapmap[delMap[j]]] = new jalview.datamodel.Annotation ("", "", preds[i].getCharAt (j), 0); +} +}} else if (id.equals ("JNETCONF")) { +if (delMap == null) { +for (var j = 0; j < width; j++) { +var value = new Float (preds[i].getCharAt (j) + "").floatValue (); +annotations[gapmap[j]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", preds[i].getCharAt (j), value); +} +} else { +for (var j = 0; j < width; j++) { +var value = new Float (preds[i].getCharAt (j) + "").floatValue (); +annotations[gapmap[delMap[j]]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", preds[i].getCharAt (j), value); +} +}} else { +if (delMap == null) { +for (var j = 0; j < width; j++) { +annotations[gapmap[j]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", ' ', 0); +} +} else { +for (var j = 0; j < width; j++) { +annotations[gapmap[delMap[j]]] = new jalview.datamodel.Annotation (preds[i].getCharAt (j) + "", "", ' ', 0); +} +}}if (id.equals ("JNETCONF")) { +annot = new jalview.datamodel.AlignmentAnnotation (preds[i].getName (), "JNet Output", annotations, 0, 10, 1); +} else { +annot = new jalview.datamodel.AlignmentAnnotation (preds[i].getName (), "JNet Output", annotations); +}if (seqRef != null) { +annot.createSequenceMapping (seqRef, 1, true); +seqRef.addAlignmentAnnotation (annot); +}al.addAnnotation (annot); +al.setAnnotationIndex (annot, al.getAlignmentAnnotation ().length - existingAnnotations - 1); +}if (noMsa) { +al.deleteSequence (preds[i]); +}}i++; +} +if (!firstsol) { +annot = new jalview.datamodel.AlignmentAnnotation ("Jnet Burial", "Prediction of Solvent Accessibility
levels are
  • 0 - Exposed
  • 3 - 25% or more S.A. accessible
  • 6 - 5% or more S.A. accessible
  • 9 - Buried (<5% exposed)
", sol, 0, 9, 1); +annot.validateRangeAndDisplay (); +if (seqRef != null) { +annot.createSequenceMapping (seqRef, 1, true); +seqRef.addAlignmentAnnotation (annot); +}al.addAnnotation (annot); +al.setAnnotationIndex (annot, al.getAlignmentAnnotation ().length - existingAnnotations - 1); +}}, "jalview.io.AlignFile,jalview.datamodel.AlignmentI,~N,~B,~A"); +}); diff --git a/bin/jalview/io/MSFfile.class b/bin/jalview/io/MSFfile.class index 264fda64c0c060daf8a7a4d30d54ff02941c1899..5173c4c7abe725604e840b6e46a7dcac1c2033e5 100644 GIT binary patch delta 102 zcmV-s0Ga>lI^{aBq7MONv!f670t0RU5R;n{C$qUjP6A delta 107 zcmV-x0F?jbI_f&Gq7MOOv!f670t0UV5tEw|C 0; ii--) { -if (sb.charAt (ii) == '.') { -sb.setCharAt (ii, '~'); -} else { -break; -}} -s[i].setSequence (sb.toString ()); -if (s[i].getSequence ().length > max) { -max = s[i].getSequence ().length; -}i++; -} -var maxLenpad = new jalview.util.Format ("%" + ( String.instantialize ("" + max)).length + "d"); -var maxChkpad = new jalview.util.Format ("%" + ( String.instantialize ("1" + max)).length + "d"); -i = 0; -var bigChecksum = 0; -var checksums = Clazz.newIntArray (s.length, 0); -while (i < s.length) { -checksums[i] = this.checkSum (s[i].getSequenceAsString ()); -bigChecksum += checksums[i]; -i++; -} -var maxNB = 0; -out.append (" MSF: " + s[0].getSequence ().length + " Type: " + (is_NA ? "N" : "P") + " Check: " + (bigChecksum % 10000) + " .."); -out.append (this.newline); -out.append (this.newline); -out.append (this.newline); -var nameBlock = new Array (s.length); -var idBlock = new Array (s.length); -i = 0; -while ((i < s.length) && (s[i] != null)) { -nameBlock[i] = String.instantialize (" Name: " + this.printId (s[i]) + " "); -idBlock[i] = String.instantialize ("Len: " + maxLenpad.formLong (s[i].getSequence ().length) + " Check: " + maxChkpad.formLong (checksums[i]) + " Weight: 1.00" + this.newline); -if (s[i].getName ().length > maxid) { -maxid = s[i].getName ().length; -}if (nameBlock[i].length > maxNB) { -maxNB = nameBlock[i].length; -}i++; -} -if (maxid < 10) { -maxid = 10; -}if (maxNB < 15) { -maxNB = 15; -}var nbFormat = new jalview.util.Format ("%-" + maxNB + "s"); -for (i = 0; (i < s.length) && (s[i] != null); i++) { -out.append (nbFormat.form (nameBlock[i]) + idBlock[i]); -} -maxid++; -out.append (this.newline); -out.append (this.newline); -out.append ("//"); -out.append (this.newline); -out.append (this.newline); -var len = 50; -var nochunks = (Clazz.doubleToInt (max / len)) + 1; -if ((max % len) == 0) { -nochunks--; -}for (i = 0; i < nochunks; i++) { -var j = 0; -while ((j < s.length) && (s[j] != null)) { -var name = this.printId (s[j]); -out.append ( new jalview.util.Format ("%-" + maxid + "s").form (name + " ")); -for (var k = 0; k < 5; k++) { -var start = (i * 50) + (k * 10); -var end = start + 10; -if ((end < s[j].getSequence ().length) && (start < s[j].getSequence ().length)) { -out.append (s[j].getSequence (start, end)); -if (k < 4) { -out.append (" "); -} else { -out.append (this.newline); -}} else { -if (start < s[j].getSequence ().length) { -out.append (s[j].getSequenceAsString ().substring (start)); -out.append (this.newline); -} else { -if (k == 0) { -out.append (this.newline); -}}}} -j++; -} -out.append (this.newline); -} -return out.toString (); -}, "~A"); -Clazz.defineMethod (c$, "print", -function () { -return this.print (this.getSeqsAsArray ()); -}); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile"], "jalview.io.MSFfile", ["jalview.datamodel.Sequence", "jalview.util.Comparison", "$.Format", "java.lang.StringBuffer", "java.util.Hashtable", "$.StringTokenizer", "$.Vector"], function () { +c$ = Clazz.declareType (jalview.io, "MSFfile", jalview.io.AlignFile); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.io.MSFfile, []); +}); +Clazz.overrideMethod (c$, "parse", +function () { +var i = 0; +var seqFlag = false; +var key = String.instantialize (); +var headers = new java.util.Vector (); +var seqhash = new java.util.Hashtable (); +var line; +try { +while ((line = this.nextLine ()) != null) { +var str = new java.util.StringTokenizer (line); +while (str.hasMoreTokens ()) { +var inStr = str.nextToken (); +if (inStr.indexOf ("Name:") != -1) { +key = str.nextToken (); +headers.addElement (key); +}if (inStr.indexOf ("//") != -1) { +seqFlag = true; +}if ((inStr.indexOf ("//") == -1) && (seqFlag == true)) { +key = inStr; +var tempseq; +if (seqhash.containsKey (key)) { +tempseq = seqhash.get (key); +} else { +tempseq = new StringBuffer (); +seqhash.put (key, tempseq); +}while (str.hasMoreTokens ()) { +tempseq.append (str.nextToken ()); +} +}} +} +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +System.err.println ("Exception parsing MSFFile " + e); +e.printStackTrace (); +} else { +throw e; +} +} +this.noSeqs = headers.size (); +for (i = 0; i < headers.size (); i++) { +if (seqhash.get (headers.elementAt (i)) != null) { +var head = headers.elementAt (i).toString (); +var seq = seqhash.get (head).toString (); +if (this.maxLength < head.length) { +this.maxLength = head.length; +}seq = seq.$replace ('~', '-'); +var newSeq = this.parseId (head); +newSeq.setSequence (seq); +this.seqs.addElement (newSeq); +} else { +System.err.println ("MSFFile Parser: Can't find sequence for " + headers.elementAt (i)); +}} +}); +Clazz.defineMethod (c$, "checkSum", +function (seq) { +var check = 0; +var sequence = seq.toUpperCase (); +for (var i = 0; i < sequence.length; i++) { +try { +var value = sequence.charCodeAt (i); +if (value != -1) { +check += (i % 57 + 1) * value; +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Exception during MSF Checksum calculation"); +e.printStackTrace (); +} else { +throw e; +} +} +} +return check % 10000; +}, "~S"); +Clazz.defineMethod (c$, "print", +function (seqs) { +var is_NA = jalview.util.Comparison.isNucleotide (seqs); +var s = new Array (seqs.length); +var out = new StringBuffer ("!!" + (is_NA ? "NA" : "AA") + "_MULTIPLE_ALIGNMENT 1.0"); +out.append (this.newline); +out.append (this.newline); +var max = 0; +var maxid = 0; +var i = 0; +while ((i < seqs.length) && (seqs[i] != null)) { +s[i] = new jalview.datamodel.Sequence (seqs[i].getName (), seqs[i].getSequenceAsString ().$replace ('-', '.'), seqs[i].getStart (), seqs[i].getEnd ()); +var sb = new StringBuffer (); +sb.append (s[i].getSequence ()); +for (var ii = 0; ii < sb.length (); ii++) { +if (sb.charAt (ii) == '.') { +sb.setCharAt (ii, '~'); +} else { +break; +}} +for (var ii = sb.length () - 1; ii > 0; ii--) { +if (sb.charAt (ii) == '.') { +sb.setCharAt (ii, '~'); +} else { +break; +}} +s[i].setSequence (sb.toString ()); +if (s[i].getSequence ().length > max) { +max = s[i].getSequence ().length; +}i++; +} +var maxLenpad = new jalview.util.Format ("%" + ( String.instantialize ("" + max)).length + "d"); +var maxChkpad = new jalview.util.Format ("%" + ( String.instantialize ("1" + max)).length + "d"); +i = 0; +var bigChecksum = 0; +var checksums = Clazz.newIntArray (s.length, 0); +while (i < s.length) { +checksums[i] = this.checkSum (s[i].getSequenceAsString ()); +bigChecksum += checksums[i]; +i++; +} +var maxNB = 0; +out.append (" MSF: " + s[0].getSequence ().length + " Type: " + (is_NA ? "N" : "P") + " Check: " + (bigChecksum % 10000) + " .."); +out.append (this.newline); +out.append (this.newline); +out.append (this.newline); +var nameBlock = new Array (s.length); +var idBlock = new Array (s.length); +i = 0; +while ((i < s.length) && (s[i] != null)) { +nameBlock[i] = String.instantialize (" Name: " + this.printId (s[i]) + " "); +idBlock[i] = String.instantialize ("Len: " + maxLenpad.formLong (s[i].getSequence ().length) + " Check: " + maxChkpad.formLong (checksums[i]) + " Weight: 1.00" + this.newline); +if (s[i].getName ().length > maxid) { +maxid = s[i].getName ().length; +}if (nameBlock[i].length > maxNB) { +maxNB = nameBlock[i].length; +}i++; +} +if (maxid < 10) { +maxid = 10; +}if (maxNB < 15) { +maxNB = 15; +}var nbFormat = new jalview.util.Format ("%-" + maxNB + "s"); +for (i = 0; (i < s.length) && (s[i] != null); i++) { +out.append (nbFormat.form (nameBlock[i]) + idBlock[i]); +} +maxid++; +out.append (this.newline); +out.append (this.newline); +out.append ("//"); +out.append (this.newline); +out.append (this.newline); +var len = 50; +var nochunks = (Clazz.doubleToInt (max / len)) + 1; +if ((max % len) == 0) { +nochunks--; +}for (i = 0; i < nochunks; i++) { +var j = 0; +while ((j < s.length) && (s[j] != null)) { +var name = this.printId (s[j]); +out.append ( new jalview.util.Format ("%-" + maxid + "s").form (name + " ")); +for (var k = 0; k < 5; k++) { +var start = (i * 50) + (k * 10); +var end = start + 10; +if ((end < s[j].getSequence ().length) && (start < s[j].getSequence ().length)) { +out.append (s[j].getSequence (start, end)); +if (k < 4) { +out.append (" "); +} else { +out.append (this.newline); +}} else { +if (start < s[j].getSequence ().length) { +out.append (s[j].getSequenceAsString ().substring (start)); +out.append (this.newline); +} else { +if (k == 0) { +out.append (this.newline); +}}}} +j++; +} +out.append (this.newline); +} +return out.toString (); +}, "~A"); +Clazz.defineMethod (c$, "print", +function () { +return this.print (this.getSeqsAsArray ()); +}); +}); diff --git a/bin/jalview/io/ModellerDescription.class b/bin/jalview/io/ModellerDescription.class index 9465d75fd1fc5e041617c8ca20d7fcc1169ad26a..16bff0d8a586fb8aba5d71eeea0b02a50ff3a83d 100644 GIT binary patch delta 62 zcmeBi>~h>NNsv)z^JKvlOw7#;0+a1TR2bzqr-*nnGsbS-Ag;$OqQ}7XpOKY;iJgIw So#7D!g9@h#&*slkGg$!?#}8Tn delta 64 zcmeBj>~Y*MNsv)@^JKvlOw26|f|Kn;RG4I#HYbaCGc(3*UN5f4EUM4I{hyJQfr*`g Uk)7cY1A_{u3MbR%k5V&P0VzihTmS$7 diff --git a/bin/jalview/io/ModellerDescription.js b/bin/jalview/io/ModellerDescription.js index 1232c05..c08736d 100644 --- a/bin/jalview/io/ModellerDescription.js +++ b/bin/jalview/io/ModellerDescription.js @@ -1,236 +1,236 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["java.util.Hashtable"], "jalview.io.ModellerDescription", ["jalview.datamodel.DBRefSource", "jalview.jsdev.RegExp", "java.util.StringTokenizer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.seqTypes = null; -this.Fields = null; -this.TYPE = 0; -this.LOCALID = 1; -this.START = 2; -this.START_CHAIN = 3; -this.END = 4; -this.END_CHAIN = 5; -this.DESCRIPTION1 = 6; -this.DESCRIPTION2 = 7; -this.RESOLUTION = 8; -this.TAIL = 9; -this.Types = null; -this.Padding = null; -this.fields = null; -if (!Clazz.isClassDefined ("jalview.io.ModellerDescription.resCode")) { -jalview.io.ModellerDescription.$ModellerDescription$resCode$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.io, "ModellerDescription"); -Clazz.prepareFields (c$, function () { -this.seqTypes = Clazz.newArray (-1, ["sequence", "structure", "structureX", "structureN"]); -this.Fields = Clazz.newArray (-1, ["objectType", "objectId", "startField", "startCode", "endField", "endCode", "description1", "description2", "resolutionField", "tailField"]); -this.Types = Clazz.newIntArray (-1, [0, 0, 1, 0, 1, 0, 0, 0, 0, 0]); -this.Padding = Clazz.newCharArray (-1, [' ', ' ', ' ', '.', ' ', '.', '.', '.', '.', '.']); -this.fields = new java.util.Hashtable (); -}); -Clazz.makeConstructor (c$, -function () { -this.fields.put (this.Fields[9], ""); -}); -Clazz.defineMethod (c$, "validResidueCode", -($fz = function (field) { -var val = null; -var r = jalview.jsdev.RegExp.newRegex (["\\s*((([-0-9]+).?)|FIRST|LAST|@)"]); -if (!r.search (field)) { -return null; -}var value = r.stringMatchedI (3); -if (value == null) { -value = r.stringMatchedI (1); -}try { -val = Integer.$valueOf (value); -return Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, field, val); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -return Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, field, null); -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "parseDescription", -($fz = function (desc) { -var fields = new java.util.Hashtable (); -var st = new java.util.StringTokenizer (desc, ":", true); -var field; -var type = -1; -if (st.countTokens () > 0) { -var i = 0; -field = st.nextToken (":"); -do { -if (this.seqTypes[i].equalsIgnoreCase (field)) { -break; -}} while (++i < this.seqTypes.length); -if (i < this.seqTypes.length) { -st.nextToken (); -type = i; -i = 1; -while (i < 9 && st.hasMoreTokens ()) { -if ((field = st.nextToken (":")) != null) { -if (!field.equals (":")) { -if (this.Types[i] == 1) { -var val = this.validResidueCode (field); -if (val != null) { -fields.put ( String.instantialize (this.Fields[i] + "num"), val); -} else { -type = -1; -};}fields.put (this.Fields[i++], field); -if (st.hasMoreTokens ()) { -st.nextToken (); -}} else { -i++; -}}} -if (i == 9) { -while (st.hasMoreTokens ()) { -var tl = st.nextToken (":"); -field += tl.equals (":") ? tl : (":" + tl); -} -fields.put (this.Fields[9], field); -}}}if (type == -1) { -fields = new java.util.Hashtable (); -fields.put (this.Fields[9], String.instantialize (desc)); -} else { -fields.put (this.Fields[0], this.seqTypes[type]); -}return fields; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.makeConstructor (c$, -function (desc) { -if (desc == null) { -desc = ""; -}this.fields = this.parseDescription (desc); -}, "~S"); -Clazz.defineMethod (c$, "setStartCode", -function (v) { -var r; -this.fields.put (this.Fields[2] + "num", r = Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, v)); -this.fields.put (this.Fields[2], r.field); -}, "~N"); -Clazz.defineMethod (c$, "setEndCode", -function (v) { -var r; -this.fields.put (this.Fields[4] + "num", r = Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, v)); -this.fields.put (this.Fields[4], r.field); -}, "~N"); -Clazz.makeConstructor (c$, -function (seq) { -if (seq.getDescription () != null) { -this.fields = this.parseDescription (seq.getDescription ()); -}if (this.isModellerFieldset ()) { -if (this.getStartCode () == null || (this.getStartNum () != seq.getStart () && this.getStartCode ().val != null)) { -this.setStartCode (seq.getStart ()); -}if (this.getEndCode () == null || (this.getEndNum () != seq.getEnd () && this.getStartCode () != null && this.getStartCode ().val != null)) { -this.setEndCode (seq.getEnd ()); -}} else { -this.setStartCode (seq.getStart ()); -this.setEndCode (seq.getEnd ()); -this.fields.put (this.Fields[1], seq.getName ()); -var t = 0; -if (seq.getDatasetSequence () != null && seq.getDatasetSequence ().getDBRef () != null) { -var dbr = seq.getDatasetSequence ().getDBRef (); -var i; -var j; -for (i = 0, j = dbr.length; i < j; i++) { -if (dbr[i] != null) { -if (dbr[i].getSource ().equals (jalview.datamodel.DBRefSource.PDB)) { -this.fields.put (this.Fields[1], dbr[i].getAccessionId ()); -t = 2; -break; -}}} -}this.fields.put (this.Fields[0], this.seqTypes[t]); -}}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "isModellerFieldset", -function () { -return (this.fields.containsKey (this.Fields[0])); -}); -Clazz.defineMethod (c$, "getDescriptionLine", -function () { -var desc = ""; -var lastfield = this.Fields.length - 1; -if (this.isModellerFieldset ()) { -var value; -for (; lastfield > 6; lastfield--) { -if (this.fields.containsKey (this.Fields[lastfield])) { -break; -}} -for (var i = 0; i < lastfield; i++) { -value = this.fields.get (this.Fields[i]); -if (value != null && value.length > 0) { -desc += (this.fields.get (this.Fields[i])) + ":"; -} else { -desc += this.Padding[i] + ":"; -}} -}if (this.fields.containsKey (this.Fields[lastfield])) { -desc += this.fields.get (this.Fields[lastfield]); -} else { -desc += "."; -}return desc; -}); -Clazz.defineMethod (c$, "getStartNum", -function () { -var start = 0; -var val = this.getStartCode (); -if (val != null && val.val != null) { -return val.val.intValue (); -}return start; -}); -Clazz.defineMethod (c$, "getStartCode", -function () { -if (this.isModellerFieldset () && this.fields.containsKey (this.Fields[2] + "num")) { -return this.fields.get (this.Fields[2] + "num"); -}return null; -}); -Clazz.defineMethod (c$, "getEndCode", -function () { -if (this.isModellerFieldset () && this.fields.containsKey (this.Fields[4] + "num")) { -return this.fields.get (this.Fields[4] + "num"); -}return null; -}); -Clazz.defineMethod (c$, "getEndNum", -function () { -var end = 0; -var val = this.getEndCode (); -if (val != null && val.val != null) { -return val.val.intValue (); -}return end; -}); -Clazz.defineMethod (c$, "updateSequenceI", -function (newSeq) { -if (this.isModellerFieldset ()) { -var rc = this.getStartCode (); -if (rc != null && rc.val != null) { -newSeq.setStart (this.getStartNum ()); -} else { -newSeq.setStart (1); -}rc = this.getEndCode (); -if (rc != null && rc.val != null) { -newSeq.setEnd (this.getEndNum ()); -} else { -newSeq.setEnd (newSeq.getStart () + newSeq.getLength ()); -}return true; -}return false; -}, "jalview.datamodel.SequenceI"); -c$.$ModellerDescription$resCode$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.val = null; -this.field = null; -Clazz.instantialize (this, arguments); -}, jalview.io.ModellerDescription, "resCode"); -Clazz.makeConstructor (c$, -function (a, b) { -this.val = b; -this.field = a; -}, "~S,Integer"); -Clazz.makeConstructor (c$, -function (a) { -this.val = new Integer (a); -this.field = this.val.toString (); -}, "~N"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["java.util.Hashtable"], "jalview.io.ModellerDescription", ["jalview.datamodel.DBRefSource", "jalview.jsdev.RegExp", "java.util.StringTokenizer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.seqTypes = null; +this.Fields = null; +this.TYPE = 0; +this.LOCALID = 1; +this.START = 2; +this.START_CHAIN = 3; +this.END = 4; +this.END_CHAIN = 5; +this.DESCRIPTION1 = 6; +this.DESCRIPTION2 = 7; +this.RESOLUTION = 8; +this.TAIL = 9; +this.Types = null; +this.Padding = null; +this.fields = null; +if (!Clazz.isClassDefined ("jalview.io.ModellerDescription.resCode")) { +jalview.io.ModellerDescription.$ModellerDescription$resCode$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.io, "ModellerDescription"); +Clazz.prepareFields (c$, function () { +this.seqTypes = Clazz.newArray (-1, ["sequence", "structure", "structureX", "structureN"]); +this.Fields = Clazz.newArray (-1, ["objectType", "objectId", "startField", "startCode", "endField", "endCode", "description1", "description2", "resolutionField", "tailField"]); +this.Types = Clazz.newIntArray (-1, [0, 0, 1, 0, 1, 0, 0, 0, 0, 0]); +this.Padding = Clazz.newCharArray (-1, [' ', ' ', ' ', '.', ' ', '.', '.', '.', '.', '.']); +this.fields = new java.util.Hashtable (); +}); +Clazz.makeConstructor (c$, +function () { +this.fields.put (this.Fields[9], ""); +}); +Clazz.defineMethod (c$, "validResidueCode", +($fz = function (field) { +var val = null; +var r = jalview.jsdev.RegExp.newRegex (["\\s*((([-0-9]+).?)|FIRST|LAST|@)"]); +if (!r.search (field)) { +return null; +}var value = r.stringMatchedI (3); +if (value == null) { +value = r.stringMatchedI (1); +}try { +val = Integer.$valueOf (value); +return Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, field, val); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +return Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, field, null); +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "parseDescription", +($fz = function (desc) { +var fields = new java.util.Hashtable (); +var st = new java.util.StringTokenizer (desc, ":", true); +var field; +var type = -1; +if (st.countTokens () > 0) { +var i = 0; +field = st.nextToken (":"); +do { +if (this.seqTypes[i].equalsIgnoreCase (field)) { +break; +}} while (++i < this.seqTypes.length); +if (i < this.seqTypes.length) { +st.nextToken (); +type = i; +i = 1; +while (i < 9 && st.hasMoreTokens ()) { +if ((field = st.nextToken (":")) != null) { +if (!field.equals (":")) { +if (this.Types[i] == 1) { +var val = this.validResidueCode (field); +if (val != null) { +fields.put ( String.instantialize (this.Fields[i] + "num"), val); +} else { +type = -1; +};}fields.put (this.Fields[i++], field); +if (st.hasMoreTokens ()) { +st.nextToken (); +}} else { +i++; +}}} +if (i == 9) { +while (st.hasMoreTokens ()) { +var tl = st.nextToken (":"); +field += tl.equals (":") ? tl : (":" + tl); +} +fields.put (this.Fields[9], field); +}}}if (type == -1) { +fields = new java.util.Hashtable (); +fields.put (this.Fields[9], String.instantialize (desc)); +} else { +fields.put (this.Fields[0], this.seqTypes[type]); +}return fields; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.makeConstructor (c$, +function (desc) { +if (desc == null) { +desc = ""; +}this.fields = this.parseDescription (desc); +}, "~S"); +Clazz.defineMethod (c$, "setStartCode", +function (v) { +var r; +this.fields.put (this.Fields[2] + "num", r = Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, v)); +this.fields.put (this.Fields[2], r.field); +}, "~N"); +Clazz.defineMethod (c$, "setEndCode", +function (v) { +var r; +this.fields.put (this.Fields[4] + "num", r = Clazz.innerTypeInstance (jalview.io.ModellerDescription.resCode, this, null, v)); +this.fields.put (this.Fields[4], r.field); +}, "~N"); +Clazz.makeConstructor (c$, +function (seq) { +if (seq.getDescription () != null) { +this.fields = this.parseDescription (seq.getDescription ()); +}if (this.isModellerFieldset ()) { +if (this.getStartCode () == null || (this.getStartNum () != seq.getStart () && this.getStartCode ().val != null)) { +this.setStartCode (seq.getStart ()); +}if (this.getEndCode () == null || (this.getEndNum () != seq.getEnd () && this.getStartCode () != null && this.getStartCode ().val != null)) { +this.setEndCode (seq.getEnd ()); +}} else { +this.setStartCode (seq.getStart ()); +this.setEndCode (seq.getEnd ()); +this.fields.put (this.Fields[1], seq.getName ()); +var t = 0; +if (seq.getDatasetSequence () != null && seq.getDatasetSequence ().getDBRef () != null) { +var dbr = seq.getDatasetSequence ().getDBRef (); +var i; +var j; +for (i = 0, j = dbr.length; i < j; i++) { +if (dbr[i] != null) { +if (dbr[i].getSource ().equals (jalview.datamodel.DBRefSource.PDB)) { +this.fields.put (this.Fields[1], dbr[i].getAccessionId ()); +t = 2; +break; +}}} +}this.fields.put (this.Fields[0], this.seqTypes[t]); +}}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "isModellerFieldset", +function () { +return (this.fields.containsKey (this.Fields[0])); +}); +Clazz.defineMethod (c$, "getDescriptionLine", +function () { +var desc = ""; +var lastfield = this.Fields.length - 1; +if (this.isModellerFieldset ()) { +var value; +for (; lastfield > 6; lastfield--) { +if (this.fields.containsKey (this.Fields[lastfield])) { +break; +}} +for (var i = 0; i < lastfield; i++) { +value = this.fields.get (this.Fields[i]); +if (value != null && value.length > 0) { +desc += (this.fields.get (this.Fields[i])) + ":"; +} else { +desc += this.Padding[i] + ":"; +}} +}if (this.fields.containsKey (this.Fields[lastfield])) { +desc += this.fields.get (this.Fields[lastfield]); +} else { +desc += "."; +}return desc; +}); +Clazz.defineMethod (c$, "getStartNum", +function () { +var start = 0; +var val = this.getStartCode (); +if (val != null && val.val != null) { +return val.val.intValue (); +}return start; +}); +Clazz.defineMethod (c$, "getStartCode", +function () { +if (this.isModellerFieldset () && this.fields.containsKey (this.Fields[2] + "num")) { +return this.fields.get (this.Fields[2] + "num"); +}return null; +}); +Clazz.defineMethod (c$, "getEndCode", +function () { +if (this.isModellerFieldset () && this.fields.containsKey (this.Fields[4] + "num")) { +return this.fields.get (this.Fields[4] + "num"); +}return null; +}); +Clazz.defineMethod (c$, "getEndNum", +function () { +var end = 0; +var val = this.getEndCode (); +if (val != null && val.val != null) { +return val.val.intValue (); +}return end; +}); +Clazz.defineMethod (c$, "updateSequenceI", +function (newSeq) { +if (this.isModellerFieldset ()) { +var rc = this.getStartCode (); +if (rc != null && rc.val != null) { +newSeq.setStart (this.getStartNum ()); +} else { +newSeq.setStart (1); +}rc = this.getEndCode (); +if (rc != null && rc.val != null) { +newSeq.setEnd (this.getEndNum ()); +} else { +newSeq.setEnd (newSeq.getStart () + newSeq.getLength ()); +}return true; +}return false; +}, "jalview.datamodel.SequenceI"); +c$.$ModellerDescription$resCode$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.val = null; +this.field = null; +Clazz.instantialize (this, arguments); +}, jalview.io.ModellerDescription, "resCode"); +Clazz.makeConstructor (c$, +function (a, b) { +this.val = b; +this.field = a; +}, "~S,Integer"); +Clazz.makeConstructor (c$, +function (a) { +this.val = new Integer (a); +this.field = this.val.toString (); +}, "~N"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/io/NewickFile.class b/bin/jalview/io/NewickFile.class index 59a23628650ae793dc61eddb27f5a728e03a489a..2b1359c289c71ed28ea67fae6ed9177a865e539d 100644 GIT binary patch delta 138 zcmZpvye z6Y>8Hx|0)iO*e&&efnRsfA? BGdKVM diff --git a/bin/jalview/io/NewickFile.js b/bin/jalview/io/NewickFile.js index 886a07b..2975319 100644 --- a/bin/jalview/io/NewickFile.js +++ b/bin/jalview/io/NewickFile.js @@ -1,408 +1,408 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["jalview.io.FileParse", "jalview.jsdev.RegExp"], "jalview.io.NewickFile", ["jalview.datamodel.SequenceNode", "jalview.util.MessageManager", "java.io.BufferedReader", "$.IOException", "java.lang.Float", "$.StringBuffer", "java.util.StringTokenizer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.root = null; -this.$HasBootstrap = false; -this.$HasDistances = false; -this.RootHasDistance = false; -this.ReplaceUnderscores = false; -this.printRootInfo = true; -this.NodeSafeName = null; -this.QuoteChar = '\''; -Clazz.instantialize (this, arguments); -}, jalview.io, "NewickFile", jalview.io.FileParse); -Clazz.prepareFields (c$, function () { -this.NodeSafeName = Clazz.newArray (-1, [jalview.jsdev.RegExp.perlCode ("m/[\\[,:'()]/"), jalview.jsdev.RegExp.perlCode ("s/'/''/"), jalview.jsdev.RegExp.perlCode ("s/\\/w/_/")]); -}); -Clazz.makeConstructor (c$, -function (inStr) { -Clazz.superConstructor (this, jalview.io.NewickFile, [inStr, "Paste"]); -}, "~S"); -Clazz.makeConstructor (c$, -function (newtree) { -Clazz.superConstructor (this, jalview.io.NewickFile, []); -this.root = newtree; -}, "jalview.datamodel.SequenceNode"); -Clazz.makeConstructor (c$, -function (newtree, bootstrap) { -Clazz.superConstructor (this, jalview.io.NewickFile, []); -this.$HasBootstrap = bootstrap; -this.root = newtree; -}, "jalview.datamodel.SequenceNode,~B"); -Clazz.makeConstructor (c$, -function (newtree, bootstrap, distances) { -Clazz.superConstructor (this, jalview.io.NewickFile, []); -this.root = newtree; -this.$HasBootstrap = bootstrap; -this.$HasDistances = distances; -}, "jalview.datamodel.SequenceNode,~B,~B"); -Clazz.makeConstructor (c$, -function (newtree, bootstrap, distances, rootdistance) { -Clazz.superConstructor (this, jalview.io.NewickFile, []); -this.root = newtree; -this.$HasBootstrap = bootstrap; -this.$HasDistances = distances; -this.RootHasDistance = rootdistance; -}, "jalview.datamodel.SequenceNode,~B,~B,~B"); -Clazz.defineMethod (c$, "ErrorStringrange", -($fz = function (Error, Er, r, p, s) { -return ((Error == null) ? "" : Error) + Er + " at position " + p + " ( " + s.substring (((p - r) < 0) ? 0 : (p - r), ((p + r) > s.length) ? s.length : (p + r)) + " )\n"; -}, $fz.isPrivate = true, $fz), "~S,~S,~N,~N,~S"); -Clazz.defineMethod (c$, "HasBootstrap", -function () { -return this.$HasBootstrap; -}); -Clazz.defineMethod (c$, "HasDistances", -function () { -return this.$HasDistances; -}); -Clazz.defineMethod (c$, "HasRootDistance", -function () { -return this.RootHasDistance; -}); -Clazz.defineMethod (c$, "parse", -function () { -var nf; -{ -var file = new StringBuffer (); -while ((nf = this.nextLine ()) != null) { -file.append (nf); -} -nf = file.toString (); -}this.root = new jalview.datamodel.SequenceNode (); -var realroot = null; -var c = this.root; -var d = -1; -var cp = 0; -var Error = null; -var nodename = null; -var commentString2 = null; -var DefDistance = 0.001; -var DefBootstrap = -1; -var distance = DefDistance; -var bootstrap = DefBootstrap; -var ascending = false; -var majorsyms = jalview.jsdev.RegExp.newRegex (["[(\\['),;]"]); -var nextcp = 0; -var ncp = cp; -var parsednodename = false; -while (majorsyms.searchFrom (nf, cp) && (Error == null)) { -var fcp = majorsyms.matchedFrom (); -var schar; -switch (schar = nf.charAt (fcp)) { -case '(': -if (ascending) { -Error = this.ErrorStringrange (Error, "Unexpected '('", 7, fcp, nf); -continue; -};d++; -if (c.right () == null) { -c.setRight ( new jalview.datamodel.SequenceNode (null, c, null, DefDistance, DefBootstrap, false)); -c = c.right (); -} else { -if (c.left () != null) { -var tmpn = new jalview.datamodel.SequenceNode (null, c, null, 0, 0, true); -tmpn.SetChildren (c.left (), c.right ()); -c.setRight (tmpn); -}c.setLeft ( new jalview.datamodel.SequenceNode (null, c, null, DefDistance, DefBootstrap, false)); -c = c.left (); -}if (realroot == null) { -realroot = c; -}nodename = null; -distance = DefDistance; -bootstrap = DefBootstrap; -cp = fcp + 1; -break; -case '\'': -var qnodename = jalview.jsdev.RegExp.newRegex (["'([^']|'')+'"]); -if (qnodename.searchFrom (nf, fcp)) { -var nl = qnodename.stringMatched ().length; -nodename = String.instantialize (qnodename.stringMatched ().substring (1, nl - 1)); -var xpandquotes = jalview.jsdev.RegExp.perlCode ("s/''/'/"); -var widernodename = xpandquotes.replaceAll (nodename); -nodename = widernodename; -nextcp = fcp + nl + 1; -parsednodename = true; -} else { -Error = this.ErrorStringrange (Error, "Unterminated quotes for nodename", 7, fcp, nf); -}break; -default: -if (schar == ';') { -if (d != -1) { -Error = this.ErrorStringrange (Error, "Wayward semicolon (depth=" + d + ")", 7, fcp, nf); -}}if (schar == '[') { -var comment = jalview.jsdev.RegExp.newRegex (["]"]); -if (comment.searchFrom (nf, fcp)) { -nextcp = comment.matchedFrom () + 1; -this.warningMessage = "Tree file contained comments which may confuse input algorithm."; -break; -} else { -Error = this.ErrorStringrange (Error, "Unterminated comment", 3, fcp, nf); -};}var fstring = nf.substring (ncp, fcp); -while (fstring.indexOf (']') > -1) { -var cstart = fstring.indexOf ('['); -var cend = fstring.indexOf (']'); -commentString2 = fstring.substring (cstart + 1, cend); -fstring = fstring.substring (0, cstart) + fstring.substring (cend + 1); -} -var uqnodename = jalview.jsdev.RegExp.newRegex (["\\b([^' :;\\](),]+)"]); -var nbootstrap = jalview.jsdev.RegExp.newRegex (["\\s*([0-9+]+)\\s*:"]); -var ndist = jalview.jsdev.RegExp.newRegex ([":([-0-9Ee.+]+)"]); -if (!parsednodename && uqnodename.search (fstring) && ((uqnodename.matchedFromI (1) == 0) || (fstring.charAt (uqnodename.matchedFromI (1) - 1) != ':'))) { -if (nodename == null) { -if (this.ReplaceUnderscores) { -nodename = uqnodename.stringMatchedI (1).$replace ('_', ' '); -} else { -nodename = uqnodename.stringMatchedI (1); -}} else { -Error = this.ErrorStringrange (Error, "File has broken algorithm - overwritten nodename", 10, fcp, nf); -}}if (nbootstrap.search (fstring)) { -if (nbootstrap.stringMatchedI (1).equals (uqnodename.stringMatchedI (1))) { -nodename = null; -}if (nodename == null || nodename.length == 0 || nbootstrap.matchedFromI (1) > (uqnodename.matchedFromI (1) + uqnodename.stringMatched ().length)) { -try { -bootstrap = ( new Integer (nbootstrap.stringMatchedI (1))).intValue (); -this.$HasBootstrap = true; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -Error = this.ErrorStringrange (Error, "Can't parse bootstrap value", 4, ncp + nbootstrap.matchedFrom (), nf); -} else { -throw e; -} -} -}}var nodehasdistance = false; -if (ndist.search (fstring)) { -try { -distance = ( new Float (ndist.stringMatchedI (1))).floatValue (); -this.$HasDistances = true; -nodehasdistance = true; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -Error = this.ErrorStringrange (Error, "Can't parse node distance value", 7, ncp + ndist.matchedFrom (), nf); -} else { -throw e; -} -} -}if (ascending) { -c.setName (nodename); -c.dist = (this.$HasDistances) ? distance : DefDistance; -c.setBootstrap ((this.$HasBootstrap) ? bootstrap : DefBootstrap); -if (c === realroot) { -this.RootHasDistance = nodehasdistance; -}this.parseNHXNodeProps (c, commentString2); -commentString2 = null; -} else { -var newnode = new jalview.datamodel.SequenceNode (null, c, nodename, (this.$HasDistances) ? distance : DefDistance, (this.$HasBootstrap) ? bootstrap : DefBootstrap, false); -this.parseNHXNodeProps (c, commentString2); -commentString2 = null; -if (c.right () == null) { -c.setRight (newnode); -} else { -if (c.left () == null) { -c.setLeft (newnode); -} else { -var newdummy = new jalview.datamodel.SequenceNode (null, c, null, (this.$HasDistances ? 0 : DefDistance), 0, true); -newdummy.SetChildren (c.left (), newnode); -c.setLeft (newdummy); -}}}if (ascending) { -c = c.AscendTree (); -if ((d > -1) && (c == null)) { -Error = this.ErrorStringrange (Error, "File broke algorithm: Lost place in tree (is there an extra ')' ?)", 7, fcp, nf); -}}if (nf.charAt (fcp) == ')') { -d--; -ascending = true; -} else { -if (nf.charAt (fcp) == ',') { -if (ascending) { -ascending = false; -} else { -if ((c.left () != null) && (!c.left ().isLeaf ())) { -c = c.left (); -}}}}nodename = null; -distance = DefDistance; -bootstrap = DefBootstrap; -commentString2 = null; -parsednodename = false; -} -if (nextcp == 0) { -ncp = cp = fcp + 1; -} else { -cp = nextcp; -nextcp = 0; -}} -if (Error != null) { -throw ( new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.newfile", Clazz.newArray (-1, [Error.toString ()])))); -}if (this.root == null) { -throw ( new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.newfile", Clazz.newArray (-1, [jalview.util.MessageManager.getString ("label.no_tree_read_in")])))); -}this.root = this.root.right ().detach (); -if (!this.RootHasDistance) { -this.root.dist = (this.$HasDistances) ? 0 : DefDistance; -}}); -Clazz.defineMethod (c$, "parseNHXNodeProps", -($fz = function (c, commentString) { -if (commentString != null && commentString.startsWith ("&&NHX")) { -var st = new java.util.StringTokenizer (commentString.substring (5), ":"); -while (st.hasMoreTokens ()) { -var tok = st.nextToken (); -var colpos = tok.indexOf ("="); -if (colpos > -1) { -var code = tok.substring (0, colpos); -var value = tok.substring (colpos + 1); -try { -if (code.toLowerCase ().equals ("b")) { -var v = -1; -var iv = new Float (value); -v = iv.intValue (); -c.setBootstrap (v); -this.$HasBootstrap = true; -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.err.println ("Couldn't parse code '" + code + "' = '" + value + "'"); -e.printStackTrace (System.err); -} else { -throw e; -} -} -}} -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode,~S"); -Clazz.defineMethod (c$, "getTree", -function () { -return this.root; -}); -Clazz.defineMethod (c$, "print", -function () { -{ -var tf = new StringBuffer (); -this.print (tf, this.root); -return (tf.append (";").toString ()); -}}); -Clazz.defineMethod (c$, "print", -function (withbootstraps) { -{ -var boots = this.$HasBootstrap; -this.$HasBootstrap = withbootstraps; -var rv = this.print (); -this.$HasBootstrap = boots; -return rv; -}}, "~B"); -Clazz.defineMethod (c$, "print", -function (withbootstraps, withdists) { -{ -var dists = this.$HasDistances; -this.$HasDistances = withdists; -var rv = this.print (withbootstraps); -this.$HasDistances = dists; -return rv; -}}, "~B,~B"); -Clazz.defineMethod (c$, "print", -function (withbootstraps, withdists, printRootInfo) { -{ -var rootinfo = printRootInfo; -this.printRootInfo = printRootInfo; -var rv = this.print (withbootstraps, withdists); -this.printRootInfo = rootinfo; -return rv; -}}, "~B,~B,~B"); -Clazz.defineMethod (c$, "getQuoteChar", -function () { -return this.QuoteChar; -}); -Clazz.defineMethod (c$, "setQuoteChar", -function (c) { -var old = this.QuoteChar; -this.QuoteChar = c; -return old; -}, "~S"); -Clazz.defineMethod (c$, "nodeName", -($fz = function (name) { -if (this.NodeSafeName[0].search (name)) { -return this.QuoteChar + this.NodeSafeName[1].replaceAll (name) + this.QuoteChar; -} else { -return this.NodeSafeName[2].replaceAll (name); -}}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "printNodeField", -($fz = function (c) { -return ((c.getName () == null) ? "" : this.nodeName (c.getName ())) + ((this.$HasBootstrap) ? ((c.getBootstrap () > -1) ? ((c.getName () != null ? " " : "") + c.getBootstrap ()) : "") : "") + ((this.$HasDistances) ? (":" + c.dist) : ""); -}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "printRootField", -($fz = function (root) { -return (this.printRootInfo) ? (((root.getName () == null) ? "" : this.nodeName (root.getName ())) + ((this.$HasBootstrap) ? ((root.getBootstrap () > -1) ? ((root.getName () != null ? " " : "") + +root.getBootstrap ()) : "") : "") + ((this.RootHasDistance) ? (":" + root.dist) : "")) : ""; -}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "print", -function (tf, root) { -if (root != null) { -if (root.isLeaf () && this.printRootInfo) { -tf.append (this.printRootField (root)); -} else { -if (root.isDummy ()) { -this._print (tf, root.right ()); -this._print (tf, root.left ()); -} else { -tf.append ("("); -this._print (tf, root.right ()); -if (root.left () != null) { -tf.append (","); -}this._print (tf, root.left ()); -tf.append (")" + this.printRootField (root)); -}}}}, "StringBuffer,jalview.datamodel.SequenceNode"); -Clazz.defineMethod (c$, "_print", -function (tf, c) { -if (c != null) { -if (c.isLeaf ()) { -tf.append (this.printNodeField (c)); -} else { -if (c.isDummy ()) { -this._print (tf, c.left ()); -if (c.left () != null) { -tf.append (","); -}this._print (tf, c.right ()); -} else { -tf.append ("("); -this._print (tf, c.right ()); -if (c.left () != null) { -tf.append (","); -}this._print (tf, c.left ()); -tf.append (")" + this.printNodeField (c)); -}}}}, "StringBuffer,jalview.datamodel.SequenceNode"); -c$.main = Clazz.defineMethod (c$, "main", -function (args) { -try { -if (args == null || args.length != 1) { -System.err.println ("Takes one argument - file name of a newick tree file."); -System.exit (0); -}var fn = new java.io.File (args[0]); -var newickfile = new StringBuffer (); -var treefile = new java.io.BufferedReader ( new java.io.FileReader (fn)); -var l; -while ((l = treefile.readLine ()) != null) { -newickfile.append (l); -} -treefile.close (); -System.out.println ("Read file :\n"); -var trf = new jalview.io.NewickFile (args[0], "File"); -trf.parse (); -System.out.println ("Original file :\n"); -var nonl = jalview.jsdev.RegExp.newRegex (["\n+", ""]); -System.out.println (nonl.replaceAll (newickfile.toString ()) + "\n"); -System.out.println ("Parsed file.\n"); -System.out.println ("Default output type for original input.\n"); -System.out.println (trf.print ()); -System.out.println ("Without bootstraps.\n"); -System.out.println (trf.print (false)); -System.out.println ("Without distances.\n"); -System.out.println (trf.print (true, false)); -System.out.println ("Without bootstraps but with distanecs.\n"); -System.out.println (trf.print (false, true)); -System.out.println ("Without bootstraps or distanecs.\n"); -System.out.println (trf.print (false, false)); -System.out.println ("With bootstraps and with distances.\n"); -System.out.println (trf.print (true, true)); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -System.err.println ("Exception\n" + e); -e.printStackTrace (); -} else { -throw e; -} -} -}, "~A"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.FileParse", "jalview.jsdev.RegExp"], "jalview.io.NewickFile", ["jalview.datamodel.SequenceNode", "jalview.util.MessageManager", "java.io.BufferedReader", "$.IOException", "java.lang.Float", "$.StringBuffer", "java.util.StringTokenizer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.root = null; +this.$HasBootstrap = false; +this.$HasDistances = false; +this.RootHasDistance = false; +this.ReplaceUnderscores = false; +this.printRootInfo = true; +this.NodeSafeName = null; +this.QuoteChar = '\''; +Clazz.instantialize (this, arguments); +}, jalview.io, "NewickFile", jalview.io.FileParse); +Clazz.prepareFields (c$, function () { +this.NodeSafeName = Clazz.newArray (-1, [jalview.jsdev.RegExp.perlCode ("m/[\\[,:'()]/"), jalview.jsdev.RegExp.perlCode ("s/'/''/"), jalview.jsdev.RegExp.perlCode ("s/\\/w/_/")]); +}); +Clazz.makeConstructor (c$, +function (inStr) { +Clazz.superConstructor (this, jalview.io.NewickFile, [inStr, "Paste"]); +}, "~S"); +Clazz.makeConstructor (c$, +function (newtree) { +Clazz.superConstructor (this, jalview.io.NewickFile, []); +this.root = newtree; +}, "jalview.datamodel.SequenceNode"); +Clazz.makeConstructor (c$, +function (newtree, bootstrap) { +Clazz.superConstructor (this, jalview.io.NewickFile, []); +this.$HasBootstrap = bootstrap; +this.root = newtree; +}, "jalview.datamodel.SequenceNode,~B"); +Clazz.makeConstructor (c$, +function (newtree, bootstrap, distances) { +Clazz.superConstructor (this, jalview.io.NewickFile, []); +this.root = newtree; +this.$HasBootstrap = bootstrap; +this.$HasDistances = distances; +}, "jalview.datamodel.SequenceNode,~B,~B"); +Clazz.makeConstructor (c$, +function (newtree, bootstrap, distances, rootdistance) { +Clazz.superConstructor (this, jalview.io.NewickFile, []); +this.root = newtree; +this.$HasBootstrap = bootstrap; +this.$HasDistances = distances; +this.RootHasDistance = rootdistance; +}, "jalview.datamodel.SequenceNode,~B,~B,~B"); +Clazz.defineMethod (c$, "ErrorStringrange", +($fz = function (Error, Er, r, p, s) { +return ((Error == null) ? "" : Error) + Er + " at position " + p + " ( " + s.substring (((p - r) < 0) ? 0 : (p - r), ((p + r) > s.length) ? s.length : (p + r)) + " )\n"; +}, $fz.isPrivate = true, $fz), "~S,~S,~N,~N,~S"); +Clazz.defineMethod (c$, "HasBootstrap", +function () { +return this.$HasBootstrap; +}); +Clazz.defineMethod (c$, "HasDistances", +function () { +return this.$HasDistances; +}); +Clazz.defineMethod (c$, "HasRootDistance", +function () { +return this.RootHasDistance; +}); +Clazz.defineMethod (c$, "parse", +function () { +var nf; +{ +var file = new StringBuffer (); +while ((nf = this.nextLine ()) != null) { +file.append (nf); +} +nf = file.toString (); +}this.root = new jalview.datamodel.SequenceNode (); +var realroot = null; +var c = this.root; +var d = -1; +var cp = 0; +var Error = null; +var nodename = null; +var commentString2 = null; +var DefDistance = 0.001; +var DefBootstrap = -1; +var distance = DefDistance; +var bootstrap = DefBootstrap; +var ascending = false; +var majorsyms = jalview.jsdev.RegExp.newRegex (["[(\\['),;]"]); +var nextcp = 0; +var ncp = cp; +var parsednodename = false; +while (majorsyms.searchFrom (nf, cp) && (Error == null)) { +var fcp = majorsyms.matchedFrom (); +var schar; +switch (schar = nf.charAt (fcp)) { +case '(': +if (ascending) { +Error = this.ErrorStringrange (Error, "Unexpected '('", 7, fcp, nf); +continue; +};d++; +if (c.right () == null) { +c.setRight ( new jalview.datamodel.SequenceNode (null, c, null, DefDistance, DefBootstrap, false)); +c = c.right (); +} else { +if (c.left () != null) { +var tmpn = new jalview.datamodel.SequenceNode (null, c, null, 0, 0, true); +tmpn.SetChildren (c.left (), c.right ()); +c.setRight (tmpn); +}c.setLeft ( new jalview.datamodel.SequenceNode (null, c, null, DefDistance, DefBootstrap, false)); +c = c.left (); +}if (realroot == null) { +realroot = c; +}nodename = null; +distance = DefDistance; +bootstrap = DefBootstrap; +cp = fcp + 1; +break; +case '\'': +var qnodename = jalview.jsdev.RegExp.newRegex (["'([^']|'')+'"]); +if (qnodename.searchFrom (nf, fcp)) { +var nl = qnodename.stringMatched ().length; +nodename = String.instantialize (qnodename.stringMatched ().substring (1, nl - 1)); +var xpandquotes = jalview.jsdev.RegExp.perlCode ("s/''/'/"); +var widernodename = xpandquotes.replaceAll (nodename); +nodename = widernodename; +nextcp = fcp + nl + 1; +parsednodename = true; +} else { +Error = this.ErrorStringrange (Error, "Unterminated quotes for nodename", 7, fcp, nf); +}break; +default: +if (schar == ';') { +if (d != -1) { +Error = this.ErrorStringrange (Error, "Wayward semicolon (depth=" + d + ")", 7, fcp, nf); +}}if (schar == '[') { +var comment = jalview.jsdev.RegExp.newRegex (["]"]); +if (comment.searchFrom (nf, fcp)) { +nextcp = comment.matchedFrom () + 1; +this.warningMessage = "Tree file contained comments which may confuse input algorithm."; +break; +} else { +Error = this.ErrorStringrange (Error, "Unterminated comment", 3, fcp, nf); +};}var fstring = nf.substring (ncp, fcp); +while (fstring.indexOf (']') > -1) { +var cstart = fstring.indexOf ('['); +var cend = fstring.indexOf (']'); +commentString2 = fstring.substring (cstart + 1, cend); +fstring = fstring.substring (0, cstart) + fstring.substring (cend + 1); +} +var uqnodename = jalview.jsdev.RegExp.newRegex (["\\b([^' :;\\](),]+)"]); +var nbootstrap = jalview.jsdev.RegExp.newRegex (["\\s*([0-9+]+)\\s*:"]); +var ndist = jalview.jsdev.RegExp.newRegex ([":([-0-9Ee.+]+)"]); +if (!parsednodename && uqnodename.search (fstring) && ((uqnodename.matchedFromI (1) == 0) || (fstring.charAt (uqnodename.matchedFromI (1) - 1) != ':'))) { +if (nodename == null) { +if (this.ReplaceUnderscores) { +nodename = uqnodename.stringMatchedI (1).$replace ('_', ' '); +} else { +nodename = uqnodename.stringMatchedI (1); +}} else { +Error = this.ErrorStringrange (Error, "File has broken algorithm - overwritten nodename", 10, fcp, nf); +}}if (nbootstrap.search (fstring)) { +if (nbootstrap.stringMatchedI (1).equals (uqnodename.stringMatchedI (1))) { +nodename = null; +}if (nodename == null || nodename.length == 0 || nbootstrap.matchedFromI (1) > (uqnodename.matchedFromI (1) + uqnodename.stringMatched ().length)) { +try { +bootstrap = ( new Integer (nbootstrap.stringMatchedI (1))).intValue (); +this.$HasBootstrap = true; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +Error = this.ErrorStringrange (Error, "Can't parse bootstrap value", 4, ncp + nbootstrap.matchedFrom (), nf); +} else { +throw e; +} +} +}}var nodehasdistance = false; +if (ndist.search (fstring)) { +try { +distance = ( new Float (ndist.stringMatchedI (1))).floatValue (); +this.$HasDistances = true; +nodehasdistance = true; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +Error = this.ErrorStringrange (Error, "Can't parse node distance value", 7, ncp + ndist.matchedFrom (), nf); +} else { +throw e; +} +} +}if (ascending) { +c.setName (nodename); +c.dist = (this.$HasDistances) ? distance : DefDistance; +c.setBootstrap ((this.$HasBootstrap) ? bootstrap : DefBootstrap); +if (c === realroot) { +this.RootHasDistance = nodehasdistance; +}this.parseNHXNodeProps (c, commentString2); +commentString2 = null; +} else { +var newnode = new jalview.datamodel.SequenceNode (null, c, nodename, (this.$HasDistances) ? distance : DefDistance, (this.$HasBootstrap) ? bootstrap : DefBootstrap, false); +this.parseNHXNodeProps (c, commentString2); +commentString2 = null; +if (c.right () == null) { +c.setRight (newnode); +} else { +if (c.left () == null) { +c.setLeft (newnode); +} else { +var newdummy = new jalview.datamodel.SequenceNode (null, c, null, (this.$HasDistances ? 0 : DefDistance), 0, true); +newdummy.SetChildren (c.left (), newnode); +c.setLeft (newdummy); +}}}if (ascending) { +c = c.AscendTree (); +if ((d > -1) && (c == null)) { +Error = this.ErrorStringrange (Error, "File broke algorithm: Lost place in tree (is there an extra ')' ?)", 7, fcp, nf); +}}if (nf.charAt (fcp) == ')') { +d--; +ascending = true; +} else { +if (nf.charAt (fcp) == ',') { +if (ascending) { +ascending = false; +} else { +if ((c.left () != null) && (!c.left ().isLeaf ())) { +c = c.left (); +}}}}nodename = null; +distance = DefDistance; +bootstrap = DefBootstrap; +commentString2 = null; +parsednodename = false; +} +if (nextcp == 0) { +ncp = cp = fcp + 1; +} else { +cp = nextcp; +nextcp = 0; +}} +if (Error != null) { +throw ( new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.newfile", Clazz.newArray (-1, [Error.toString ()])))); +}if (this.root == null) { +throw ( new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.newfile", Clazz.newArray (-1, [jalview.util.MessageManager.getString ("label.no_tree_read_in")])))); +}this.root = this.root.right ().detach (); +if (!this.RootHasDistance) { +this.root.dist = (this.$HasDistances) ? 0 : DefDistance; +}}); +Clazz.defineMethod (c$, "parseNHXNodeProps", +($fz = function (c, commentString) { +if (commentString != null && commentString.startsWith ("&&NHX")) { +var st = new java.util.StringTokenizer (commentString.substring (5), ":"); +while (st.hasMoreTokens ()) { +var tok = st.nextToken (); +var colpos = tok.indexOf ("="); +if (colpos > -1) { +var code = tok.substring (0, colpos); +var value = tok.substring (colpos + 1); +try { +if (code.toLowerCase ().equals ("b")) { +var v = -1; +var iv = new Float (value); +v = iv.intValue (); +c.setBootstrap (v); +this.$HasBootstrap = true; +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.err.println ("Couldn't parse code '" + code + "' = '" + value + "'"); +e.printStackTrace (System.err); +} else { +throw e; +} +} +}} +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode,~S"); +Clazz.defineMethod (c$, "getTree", +function () { +return this.root; +}); +Clazz.defineMethod (c$, "print", +function () { +{ +var tf = new StringBuffer (); +this.print (tf, this.root); +return (tf.append (";").toString ()); +}}); +Clazz.defineMethod (c$, "print", +function (withbootstraps) { +{ +var boots = this.$HasBootstrap; +this.$HasBootstrap = withbootstraps; +var rv = this.print (); +this.$HasBootstrap = boots; +return rv; +}}, "~B"); +Clazz.defineMethod (c$, "print", +function (withbootstraps, withdists) { +{ +var dists = this.$HasDistances; +this.$HasDistances = withdists; +var rv = this.print (withbootstraps); +this.$HasDistances = dists; +return rv; +}}, "~B,~B"); +Clazz.defineMethod (c$, "print", +function (withbootstraps, withdists, printRootInfo) { +{ +var rootinfo = printRootInfo; +this.printRootInfo = printRootInfo; +var rv = this.print (withbootstraps, withdists); +this.printRootInfo = rootinfo; +return rv; +}}, "~B,~B,~B"); +Clazz.defineMethod (c$, "getQuoteChar", +function () { +return this.QuoteChar; +}); +Clazz.defineMethod (c$, "setQuoteChar", +function (c) { +var old = this.QuoteChar; +this.QuoteChar = c; +return old; +}, "~S"); +Clazz.defineMethod (c$, "nodeName", +($fz = function (name) { +if (this.NodeSafeName[0].search (name)) { +return this.QuoteChar + this.NodeSafeName[1].replaceAll (name) + this.QuoteChar; +} else { +return this.NodeSafeName[2].replaceAll (name); +}}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "printNodeField", +($fz = function (c) { +return ((c.getName () == null) ? "" : this.nodeName (c.getName ())) + ((this.$HasBootstrap) ? ((c.getBootstrap () > -1) ? ((c.getName () != null ? " " : "") + c.getBootstrap ()) : "") : "") + ((this.$HasDistances) ? (":" + c.dist) : ""); +}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "printRootField", +($fz = function (root) { +return (this.printRootInfo) ? (((root.getName () == null) ? "" : this.nodeName (root.getName ())) + ((this.$HasBootstrap) ? ((root.getBootstrap () > -1) ? ((root.getName () != null ? " " : "") + +root.getBootstrap ()) : "") : "") + ((this.RootHasDistance) ? (":" + root.dist) : "")) : ""; +}, $fz.isPrivate = true, $fz), "jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "print", +function (tf, root) { +if (root != null) { +if (root.isLeaf () && this.printRootInfo) { +tf.append (this.printRootField (root)); +} else { +if (root.isDummy ()) { +this._print (tf, root.right ()); +this._print (tf, root.left ()); +} else { +tf.append ("("); +this._print (tf, root.right ()); +if (root.left () != null) { +tf.append (","); +}this._print (tf, root.left ()); +tf.append (")" + this.printRootField (root)); +}}}}, "StringBuffer,jalview.datamodel.SequenceNode"); +Clazz.defineMethod (c$, "_print", +function (tf, c) { +if (c != null) { +if (c.isLeaf ()) { +tf.append (this.printNodeField (c)); +} else { +if (c.isDummy ()) { +this._print (tf, c.left ()); +if (c.left () != null) { +tf.append (","); +}this._print (tf, c.right ()); +} else { +tf.append ("("); +this._print (tf, c.right ()); +if (c.left () != null) { +tf.append (","); +}this._print (tf, c.left ()); +tf.append (")" + this.printNodeField (c)); +}}}}, "StringBuffer,jalview.datamodel.SequenceNode"); +c$.main = Clazz.defineMethod (c$, "main", +function (args) { +try { +if (args == null || args.length != 1) { +System.err.println ("Takes one argument - file name of a newick tree file."); +System.exit (0); +}var fn = new java.io.File (args[0]); +var newickfile = new StringBuffer (); +var treefile = new java.io.BufferedReader ( new java.io.FileReader (fn)); +var l; +while ((l = treefile.readLine ()) != null) { +newickfile.append (l); +} +treefile.close (); +System.out.println ("Read file :\n"); +var trf = new jalview.io.NewickFile (args[0], "File"); +trf.parse (); +System.out.println ("Original file :\n"); +var nonl = jalview.jsdev.RegExp.newRegex (["\n+", ""]); +System.out.println (nonl.replaceAll (newickfile.toString ()) + "\n"); +System.out.println ("Parsed file.\n"); +System.out.println ("Default output type for original input.\n"); +System.out.println (trf.print ()); +System.out.println ("Without bootstraps.\n"); +System.out.println (trf.print (false)); +System.out.println ("Without distances.\n"); +System.out.println (trf.print (true, false)); +System.out.println ("Without bootstraps but with distanecs.\n"); +System.out.println (trf.print (false, true)); +System.out.println ("Without bootstraps or distanecs.\n"); +System.out.println (trf.print (false, false)); +System.out.println ("With bootstraps and with distances.\n"); +System.out.println (trf.print (true, true)); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +System.err.println ("Exception\n" + e); +e.printStackTrace (); +} else { +throw e; +} +} +}, "~A"); +}); diff --git a/bin/jalview/io/PIRFile.class b/bin/jalview/io/PIRFile.class index 939524f81deb921fa878a9fae7a49fe2b600b27a..6d172073c6b7e587bb125a5b403b4b753b464bf4 100644 GIT binary patch delta 59 zcmV-B0L1^+A=DwTl?nl{vz7{X0TVa?2>$>D00RdA0RRU8DgXcp6q6wgbOAN9mJGWC R19<=rlT;8(0UMK{5H-+E4n_a~ delta 61 zcmV-D0K)&&A=V+Vl?nl|vz7{X0Tej^3I6~E00RdA0RRU8DgXcp5dxDS40HiDvy}|H T0|R;h50g_6O9B`Ilb;YZ diff --git a/bin/jalview/io/PIRFile.js b/bin/jalview/io/PIRFile.js index fe50c34..f14a6ea 100644 --- a/bin/jalview/io/PIRFile.js +++ b/bin/jalview/io/PIRFile.js @@ -1,101 +1,101 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["jalview.io.AlignFile", "java.util.Vector"], "jalview.io.PIRFile", ["jalview.io.ModellerDescription", "jalview.util.Comparison", "java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.words = null; -Clazz.instantialize (this, arguments); -}, jalview.io, "PIRFile", jalview.io.AlignFile); -Clazz.prepareFields (c$, function () { -this.words = new java.util.Vector (); -}); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.io.PIRFile, []); -}); -Clazz.overrideMethod (c$, "parse", -function () { -var sequence; -var line = null; -var md; -while ((line = this.nextLine ()) != null) { -if (line.length == 0) { -continue; -}if (line.indexOf ("C;") == 0 || line.indexOf ("#") == 0) { -continue; -}var newSeq = this.parseId (line.substring (line.indexOf (";") + 1)); -sequence = new StringBuffer (); -newSeq.setDescription (this.nextLine ()); -var starFound = false; -while (!starFound) { -line = this.nextLine (); -sequence.append (line); -if (line == null) { -break; -}if (line.indexOf ("*") > -1) { -starFound = true; -}} -if (sequence.length () > 0) { -sequence.setLength (sequence.length () - 1); -newSeq.setSequence (sequence.toString ()); -this.seqs.addElement (newSeq); -md = new jalview.io.ModellerDescription (newSeq.getDescription ()); -md.updateSequenceI (newSeq); -}} -}); -Clazz.defineMethod (c$, "print", -function () { -return this.print (this.getSeqsAsArray ()); -}); -Clazz.defineMethod (c$, "print", -function (s) { -var is_NA = jalview.util.Comparison.isNucleotide (s); -var len = 72; -var out = new StringBuffer (); -var i = 0; -var md; -while ((i < s.length) && (s[i] != null)) { -var seq = s[i].getSequenceAsString (); -seq = seq + "*"; -if (is_NA) { -out.append (">N1;" + s[i].getName ()); -out.append (this.newline); -if (s[i].getDescription () == null) { -out.append (s[i].getName () + " " + (s[i].getEnd () - s[i].getStart () + 1)); -out.append (is_NA ? " bases" : " residues"); -out.append (this.newline); -} else { -out.append (s[i].getDescription ()); -out.append (this.newline); -}} else { -if (jalview.io.PIRFile.useModellerOutput) { -out.append (">P1;" + s[i].getName ()); -out.append (this.newline); -md = new jalview.io.ModellerDescription (s[i]); -out.append (md.getDescriptionLine ()); -out.append (this.newline); -} else { -out.append (">P1;" + this.printId (s[i])); -out.append (this.newline); -if (s[i].getDescription () != null) { -out.append (s[i].getDescription ()); -out.append (this.newline); -} else { -out.append (s[i].getName () + " " + (s[i].getEnd () - s[i].getStart () + 1) + " residues"); -out.append (this.newline); -}}}var nochunks = (Clazz.doubleToInt (seq.length / len)) + 1; -for (var j = 0; j < nochunks; j++) { -var start = j * len; -var end = start + len; -if (end < seq.length) { -out.append (seq.substring (start, end)); -out.append (this.newline); -} else if (start < seq.length) { -out.append (seq.substring (start)); -out.append (this.newline); -}} -i++; -} -return out.toString (); -}, "~A"); -Clazz.defineStatics (c$, -"useModellerOutput", false); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile", "java.util.Vector"], "jalview.io.PIRFile", ["jalview.io.ModellerDescription", "jalview.util.Comparison", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.words = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "PIRFile", jalview.io.AlignFile); +Clazz.prepareFields (c$, function () { +this.words = new java.util.Vector (); +}); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.io.PIRFile, []); +}); +Clazz.overrideMethod (c$, "parse", +function () { +var sequence; +var line = null; +var md; +while ((line = this.nextLine ()) != null) { +if (line.length == 0) { +continue; +}if (line.indexOf ("C;") == 0 || line.indexOf ("#") == 0) { +continue; +}var newSeq = this.parseId (line.substring (line.indexOf (";") + 1)); +sequence = new StringBuffer (); +newSeq.setDescription (this.nextLine ()); +var starFound = false; +while (!starFound) { +line = this.nextLine (); +sequence.append (line); +if (line == null) { +break; +}if (line.indexOf ("*") > -1) { +starFound = true; +}} +if (sequence.length () > 0) { +sequence.setLength (sequence.length () - 1); +newSeq.setSequence (sequence.toString ()); +this.seqs.addElement (newSeq); +md = new jalview.io.ModellerDescription (newSeq.getDescription ()); +md.updateSequenceI (newSeq); +}} +}); +Clazz.defineMethod (c$, "print", +function () { +return this.print (this.getSeqsAsArray ()); +}); +Clazz.defineMethod (c$, "print", +function (s) { +var is_NA = jalview.util.Comparison.isNucleotide (s); +var len = 72; +var out = new StringBuffer (); +var i = 0; +var md; +while ((i < s.length) && (s[i] != null)) { +var seq = s[i].getSequenceAsString (); +seq = seq + "*"; +if (is_NA) { +out.append (">N1;" + s[i].getName ()); +out.append (this.newline); +if (s[i].getDescription () == null) { +out.append (s[i].getName () + " " + (s[i].getEnd () - s[i].getStart () + 1)); +out.append (is_NA ? " bases" : " residues"); +out.append (this.newline); +} else { +out.append (s[i].getDescription ()); +out.append (this.newline); +}} else { +if (jalview.io.PIRFile.useModellerOutput) { +out.append (">P1;" + s[i].getName ()); +out.append (this.newline); +md = new jalview.io.ModellerDescription (s[i]); +out.append (md.getDescriptionLine ()); +out.append (this.newline); +} else { +out.append (">P1;" + this.printId (s[i])); +out.append (this.newline); +if (s[i].getDescription () != null) { +out.append (s[i].getDescription ()); +out.append (this.newline); +} else { +out.append (s[i].getName () + " " + (s[i].getEnd () - s[i].getStart () + 1) + " residues"); +out.append (this.newline); +}}}var nochunks = (Clazz.doubleToInt (seq.length / len)) + 1; +for (var j = 0; j < nochunks; j++) { +var start = j * len; +var end = start + len; +if (end < seq.length) { +out.append (seq.substring (start, end)); +out.append (this.newline); +} else if (start < seq.length) { +out.append (seq.substring (start)); +out.append (this.newline); +}} +i++; +} +return out.toString (); +}, "~A"); +Clazz.defineStatics (c$, +"useModellerOutput", false); +}); diff --git a/bin/jalview/io/PfamFile.js b/bin/jalview/io/PfamFile.js index c094356..47e9cc1 100644 --- a/bin/jalview/io/PfamFile.js +++ b/bin/jalview/io/PfamFile.js @@ -1,76 +1,76 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["jalview.io.AlignFile"], "jalview.io.PfamFile", ["jalview.util.Format", "$.MessageManager", "java.io.IOException", "java.lang.StringBuffer", "java.util.Hashtable", "$.StringTokenizer", "$.Vector"], function () { -c$ = Clazz.declareType (jalview.io, "PfamFile", jalview.io.AlignFile); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.io.PfamFile, []); -}); -Clazz.overrideMethod (c$, "parse", -function () { -var i = 0; -var line; -var seqhash = new java.util.Hashtable (); -var headers = new java.util.Vector (); -while ((line = this.nextLine ()) != null) { -if (line.indexOf (" ") != 0) { -if (line.indexOf ("#") != 0) { -var str = new java.util.StringTokenizer (line, " "); -var id = ""; -if (str.hasMoreTokens ()) { -id = str.nextToken (); -var tempseq; -if (seqhash.containsKey (id)) { -tempseq = seqhash.get (id); -} else { -tempseq = new StringBuffer (); -seqhash.put (id, tempseq); -}if (!(headers.contains (id))) { -headers.addElement (id); -}if (str.hasMoreTokens ()) { -tempseq.append (str.nextToken ()); -}}}}} -this.noSeqs = headers.size (); -if (this.noSeqs < 1) { -throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.pfam_no_sequences_found")); -}for (i = 0; i < headers.size (); i++) { -if (seqhash.get (headers.elementAt (i)) != null) { -if (this.maxLength < seqhash.get (headers.elementAt (i)).toString ().length) { -this.maxLength = seqhash.get (headers.elementAt (i)).toString ().length; -}var newSeq = this.parseId (headers.elementAt (i).toString ()); -newSeq.setSequence (seqhash.get (headers.elementAt (i).toString ()).toString ()); -this.seqs.addElement (newSeq); -} else { -System.err.println ("PFAM File reader: Can't find sequence for " + headers.elementAt (i)); -}} -}); -Clazz.defineMethod (c$, "print", -function (s) { -var out = new StringBuffer (""); -var max = 0; -var maxid = 0; -var i = 0; -while ((i < s.length) && (s[i] != null)) { -var tmp = this.printId (s[i]); -if (s[i].getSequence ().length > max) { -max = s[i].getSequence ().length; -}if (tmp.length > maxid) { -maxid = tmp.length; -}i++; -} -if (maxid < 15) { -maxid = 15; -}var j = 0; -while ((j < s.length) && (s[j] != null)) { -out.append ( new jalview.util.Format ("%-" + maxid + "s").form (this.printId (s[j]) + " ")); -out.append (s[j].getSequenceAsString ()); -out.append (this.newline); -j++; -} -out.append (this.newline); -return out.toString (); -}, "~A"); -Clazz.defineMethod (c$, "print", -function () { -return this.print (this.getSeqsAsArray ()); -}); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile"], "jalview.io.PfamFile", ["jalview.util.Format", "$.MessageManager", "java.io.IOException", "java.lang.StringBuffer", "java.util.Hashtable", "$.StringTokenizer", "$.Vector"], function () { +c$ = Clazz.declareType (jalview.io, "PfamFile", jalview.io.AlignFile); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.io.PfamFile, []); +}); +Clazz.overrideMethod (c$, "parse", +function () { +var i = 0; +var line; +var seqhash = new java.util.Hashtable (); +var headers = new java.util.Vector (); +while ((line = this.nextLine ()) != null) { +if (line.indexOf (" ") != 0) { +if (line.indexOf ("#") != 0) { +var str = new java.util.StringTokenizer (line, " "); +var id = ""; +if (str.hasMoreTokens ()) { +id = str.nextToken (); +var tempseq; +if (seqhash.containsKey (id)) { +tempseq = seqhash.get (id); +} else { +tempseq = new StringBuffer (); +seqhash.put (id, tempseq); +}if (!(headers.contains (id))) { +headers.addElement (id); +}if (str.hasMoreTokens ()) { +tempseq.append (str.nextToken ()); +}}}}} +this.noSeqs = headers.size (); +if (this.noSeqs < 1) { +throw new java.io.IOException (jalview.util.MessageManager.getString ("exception.pfam_no_sequences_found")); +}for (i = 0; i < headers.size (); i++) { +if (seqhash.get (headers.elementAt (i)) != null) { +if (this.maxLength < seqhash.get (headers.elementAt (i)).toString ().length) { +this.maxLength = seqhash.get (headers.elementAt (i)).toString ().length; +}var newSeq = this.parseId (headers.elementAt (i).toString ()); +newSeq.setSequence (seqhash.get (headers.elementAt (i).toString ()).toString ()); +this.seqs.addElement (newSeq); +} else { +System.err.println ("PFAM File reader: Can't find sequence for " + headers.elementAt (i)); +}} +}); +Clazz.defineMethod (c$, "print", +function (s) { +var out = new StringBuffer (""); +var max = 0; +var maxid = 0; +var i = 0; +while ((i < s.length) && (s[i] != null)) { +var tmp = this.printId (s[i]); +if (s[i].getSequence ().length > max) { +max = s[i].getSequence ().length; +}if (tmp.length > maxid) { +maxid = tmp.length; +}i++; +} +if (maxid < 15) { +maxid = 15; +}var j = 0; +while ((j < s.length) && (s[j] != null)) { +out.append ( new jalview.util.Format ("%-" + maxid + "s").form (this.printId (s[j]) + " ")); +out.append (s[j].getSequenceAsString ()); +out.append (this.newline); +j++; +} +out.append (this.newline); +return out.toString (); +}, "~A"); +Clazz.defineMethod (c$, "print", +function () { +return this.print (this.getSeqsAsArray ()); +}); +}); diff --git a/bin/jalview/io/PhylipFile.js b/bin/jalview/io/PhylipFile.js index 74e851f..0cd22ea 100644 --- a/bin/jalview/io/PhylipFile.js +++ b/bin/jalview/io/PhylipFile.js @@ -1,103 +1,103 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["jalview.io.AlignFile"], "jalview.io.PhylipFile", ["java.io.IOException", "java.lang.StringBuffer"], function () { -c$ = Clazz.declareType (jalview.io, "PhylipFile", jalview.io.AlignFile); -Clazz.overrideMethod (c$, "parse", -function () { -try { -var line = this.nextLine (); -var lineElements = line.trim ().$plit ("\\s+"); -if (lineElements.length < 2) { -throw new java.io.IOException ("First line must contain the number of specifies and number of characters"); -}var numberSpecies = Integer.parseInt (lineElements[0]); -var numberCharacters = Integer.parseInt (lineElements[1]); -if (numberSpecies <= 0) { -return; -}var sequenceElements = new Array (numberSpecies); -var sequences = new Array (numberSpecies); -for (var i = 0; i < numberSpecies; i++) { -line = this.nextLine (); -var potentialName = line.substring (0, 10); -var tabIndex = potentialName.indexOf ('\t'); -if (tabIndex == -1) { -sequenceElements[i] = this.parseId (this.validateName (potentialName)); -sequences[i] = new StringBuffer (this.removeWhitespace (line.substring (10))); -} else { -sequenceElements[i] = this.parseId (this.validateName (potentialName.substring (0, tabIndex))); -sequences[i] = new StringBuffer (this.removeWhitespace (line.substring (tabIndex))); -}} -if ((sequences[0]).length () != numberCharacters) { -var i = 0; -for (line = this.nextLine (); line != null; line = this.nextLine ()) { -if (line.length > 0) { -sequences[i++].append (this.removeWhitespace (line)); -}if (i == sequences.length) { -i = 0; -}} -}for (var i = 0; i < numberSpecies; i++) { -if (sequences[i].length () != numberCharacters) { -throw new java.io.IOException (sequenceElements[i].getName () + " sequence is incorrect length - should be " + numberCharacters + " but is " + sequences[i].length ()); -}sequenceElements[i].setSequence (sequences[i].toString ()); -this.seqs.add (sequenceElements[i]); -} -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -System.err.println ("Exception parsing PHYLIP file " + e); -e.printStackTrace (System.err); -throw e; -} else { -throw e; -} -} -}); -Clazz.defineMethod (c$, "removeWhitespace", -($fz = function (txt) { -return txt.replaceAll ("\\s*", ""); -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "validateName", -($fz = function (name) { -var invalidCharacters = Clazz.newCharArray (-1, ['(', ')', '[', ']', ':', ';', ',']); -for (var c, $c = 0, $$c = invalidCharacters; $c < $$c.length && ((c = $$c[$c]) || true); $c++) { -if (name.indexOf (c) > -1) { -throw new java.io.IOException ("Species name contains illegal character " + c); -}} -return name; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.overrideMethod (c$, "print", -function () { -var sb = new StringBuffer (Integer.toString (this.seqs.size ())); -sb.append (" "); -sb.append ((this.seqs.size () > 0) ? Integer.toString (this.seqs.get (0).getSequence ().length) : "0").append (this.newline); -var sequential = false; -var numInterleavedColumns = 60; -var sequenceLength = 0; -for (var s, $s = this.seqs.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { -var name = s.getName (); -if (name.length > 10) { -name = name.substring (0, 10); -} else { -name = String.format ("%1$-10s", [s.getName ()]); -}sb.append (name); -if (sequential) { -sb.append (s.getSequence ()); -} else { -sequenceLength = s.getSequence ().length; -sb.append (s.getSequence (0, Math.min (numInterleavedColumns, sequenceLength))); -}sb.append (this.newline); -} -if (!sequential && sequenceLength > numInterleavedColumns) { -var numMatrics = Clazz.doubleToInt (sequenceLength / numInterleavedColumns); -if ((sequenceLength % numInterleavedColumns) > 0) { -numMatrics++; -}for (var i = 1; i < numMatrics; i++) { -sb.append (this.newline); -var start = i * numInterleavedColumns; -for (var s, $s = this.seqs.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { -sb.append (s.getSequence (start, Math.min (start + numInterleavedColumns, sequenceLength))).append (this.newline); -} -} -}return sb.toString (); -}); -Clazz.defineStatics (c$, -"FILE_EXT", "phy", -"FILE_DESC", "PHYLIP"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile"], "jalview.io.PhylipFile", ["java.io.IOException", "java.lang.StringBuffer"], function () { +c$ = Clazz.declareType (jalview.io, "PhylipFile", jalview.io.AlignFile); +Clazz.overrideMethod (c$, "parse", +function () { +try { +var line = this.nextLine (); +var lineElements = line.trim ().$plit ("\\s+"); +if (lineElements.length < 2) { +throw new java.io.IOException ("First line must contain the number of specifies and number of characters"); +}var numberSpecies = Integer.parseInt (lineElements[0]); +var numberCharacters = Integer.parseInt (lineElements[1]); +if (numberSpecies <= 0) { +return; +}var sequenceElements = new Array (numberSpecies); +var sequences = new Array (numberSpecies); +for (var i = 0; i < numberSpecies; i++) { +line = this.nextLine (); +var potentialName = line.substring (0, 10); +var tabIndex = potentialName.indexOf ('\t'); +if (tabIndex == -1) { +sequenceElements[i] = this.parseId (this.validateName (potentialName)); +sequences[i] = new StringBuffer (this.removeWhitespace (line.substring (10))); +} else { +sequenceElements[i] = this.parseId (this.validateName (potentialName.substring (0, tabIndex))); +sequences[i] = new StringBuffer (this.removeWhitespace (line.substring (tabIndex))); +}} +if ((sequences[0]).length () != numberCharacters) { +var i = 0; +for (line = this.nextLine (); line != null; line = this.nextLine ()) { +if (line.length > 0) { +sequences[i++].append (this.removeWhitespace (line)); +}if (i == sequences.length) { +i = 0; +}} +}for (var i = 0; i < numberSpecies; i++) { +if (sequences[i].length () != numberCharacters) { +throw new java.io.IOException (sequenceElements[i].getName () + " sequence is incorrect length - should be " + numberCharacters + " but is " + sequences[i].length ()); +}sequenceElements[i].setSequence (sequences[i].toString ()); +this.seqs.add (sequenceElements[i]); +} +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +System.err.println ("Exception parsing PHYLIP file " + e); +e.printStackTrace (System.err); +throw e; +} else { +throw e; +} +} +}); +Clazz.defineMethod (c$, "removeWhitespace", +($fz = function (txt) { +return txt.replaceAll ("\\s*", ""); +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "validateName", +($fz = function (name) { +var invalidCharacters = Clazz.newCharArray (-1, ['(', ')', '[', ']', ':', ';', ',']); +for (var c, $c = 0, $$c = invalidCharacters; $c < $$c.length && ((c = $$c[$c]) || true); $c++) { +if (name.indexOf (c) > -1) { +throw new java.io.IOException ("Species name contains illegal character " + c); +}} +return name; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.overrideMethod (c$, "print", +function () { +var sb = new StringBuffer (Integer.toString (this.seqs.size ())); +sb.append (" "); +sb.append ((this.seqs.size () > 0) ? Integer.toString (this.seqs.get (0).getSequence ().length) : "0").append (this.newline); +var sequential = false; +var numInterleavedColumns = 60; +var sequenceLength = 0; +for (var s, $s = this.seqs.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { +var name = s.getName (); +if (name.length > 10) { +name = name.substring (0, 10); +} else { +name = String.format ("%1$-10s", [s.getName ()]); +}sb.append (name); +if (sequential) { +sb.append (s.getSequence ()); +} else { +sequenceLength = s.getSequence ().length; +sb.append (s.getSequence (0, Math.min (numInterleavedColumns, sequenceLength))); +}sb.append (this.newline); +} +if (!sequential && sequenceLength > numInterleavedColumns) { +var numMatrics = Clazz.doubleToInt (sequenceLength / numInterleavedColumns); +if ((sequenceLength % numInterleavedColumns) > 0) { +numMatrics++; +}for (var i = 1; i < numMatrics; i++) { +sb.append (this.newline); +var start = i * numInterleavedColumns; +for (var s, $s = this.seqs.iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { +sb.append (s.getSequence (start, Math.min (start + numInterleavedColumns, sequenceLength))).append (this.newline); +} +} +}return sb.toString (); +}); +Clazz.defineStatics (c$, +"FILE_EXT", "phy", +"FILE_DESC", "PHYLIP"); +}); diff --git a/bin/jalview/io/PileUpfile.class b/bin/jalview/io/PileUpfile.class index 690574c331275bb97081f3e8814d484a9a32028e..d75d06bee0b1b54a29c9989ee44edc5856bb5bb0 100644 GIT binary patch delta 28 kcmZpdYLnWa#=&@XvpPoy3$qV{$mC5twv619Kk|qH0C?F52LJ#7 delta 29 lcmZpZYM0ue#=&@PvpPoy3$rhS=;Td2woDvMlRxl?0RVqv2nhfH diff --git a/bin/jalview/io/PileUpfile.js b/bin/jalview/io/PileUpfile.js index b8bb68c..a6effa1 100644 --- a/bin/jalview/io/PileUpfile.js +++ b/bin/jalview/io/PileUpfile.js @@ -1,82 +1,82 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (["jalview.io.MSFfile"], "jalview.io.PileUpfile", ["jalview.util.Format", "java.lang.StringBuffer"], function () { -c$ = Clazz.declareType (jalview.io, "PileUpfile", jalview.io.MSFfile); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.io.PileUpfile, []); -}); -Clazz.defineMethod (c$, "print", -function () { -return this.print (this.getSeqsAsArray ()); -}); -Clazz.defineMethod (c$, "print", -function (s) { -var out = new StringBuffer ("PileUp"); -out.append (this.newline); -out.append (this.newline); -var max = 0; -var maxid = 0; -var i = 0; -var bigChecksum = 0; -var checksums = Clazz.newIntArray (s.length, 0); -while (i < s.length) { -checksums[i] = this.checkSum (s[i].getSequenceAsString ()); -bigChecksum += checksums[i]; -i++; -} -out.append (" MSF: " + s[0].getSequence ().length + " Type: P Check: " + bigChecksum % 10000 + " .."); -out.append (this.newline); -out.append (this.newline); -out.append (this.newline); -i = 0; -while ((i < s.length) && (s[i] != null)) { -var seq = s[i].getSequenceAsString (); -out.append (" Name: " + this.printId (s[i]) + " oo Len: " + seq.length + " Check: " + checksums[i] + " Weight: 1.00"); -out.append (this.newline); -if (seq.length > max) { -max = seq.length; -}if (s[i].getName ().length > maxid) { -maxid = s[i].getName ().length; -}i++; -} -if (maxid < 10) { -maxid = 10; -}maxid++; -out.append (this.newline); -out.append (this.newline); -out.append ("//"); -out.append (this.newline); -out.append (this.newline); -var len = 50; -var nochunks = (Clazz.doubleToInt (max / len)) + 1; -if ((max % len) == 0) { -nochunks--; -}for (i = 0; i < nochunks; i++) { -var j = 0; -while ((j < s.length) && (s[j] != null)) { -var name = this.printId (s[j]); -out.append ( new jalview.util.Format ("%-" + maxid + "s").form (name + " ")); -for (var k = 0; k < 5; k++) { -var start = (i * 50) + (k * 10); -var end = start + 10; -if ((end < s[j].getSequence ().length) && (start < s[j].getSequence ().length)) { -out.append (s[j].getSequence (start, end)); -if (k < 4) { -out.append (" "); -} else { -out.append (this.newline); -}} else { -if (start < s[j].getSequence ().length) { -out.append (s[j].getSequenceAsString ().substring (start)); -out.append (this.newline); -} else { -if (k == 0) { -out.append (this.newline); -}}}} -j++; -} -out.append (this.newline); -} -return out.toString (); -}, "~A"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.MSFfile"], "jalview.io.PileUpfile", ["jalview.util.Format", "java.lang.StringBuffer"], function () { +c$ = Clazz.declareType (jalview.io, "PileUpfile", jalview.io.MSFfile); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.io.PileUpfile, []); +}); +Clazz.defineMethod (c$, "print", +function () { +return this.print (this.getSeqsAsArray ()); +}); +Clazz.defineMethod (c$, "print", +function (s) { +var out = new StringBuffer ("PileUp"); +out.append (this.newline); +out.append (this.newline); +var max = 0; +var maxid = 0; +var i = 0; +var bigChecksum = 0; +var checksums = Clazz.newIntArray (s.length, 0); +while (i < s.length) { +checksums[i] = this.checkSum (s[i].getSequenceAsString ()); +bigChecksum += checksums[i]; +i++; +} +out.append (" MSF: " + s[0].getSequence ().length + " Type: P Check: " + bigChecksum % 10000 + " .."); +out.append (this.newline); +out.append (this.newline); +out.append (this.newline); +i = 0; +while ((i < s.length) && (s[i] != null)) { +var seq = s[i].getSequenceAsString (); +out.append (" Name: " + this.printId (s[i]) + " oo Len: " + seq.length + " Check: " + checksums[i] + " Weight: 1.00"); +out.append (this.newline); +if (seq.length > max) { +max = seq.length; +}if (s[i].getName ().length > maxid) { +maxid = s[i].getName ().length; +}i++; +} +if (maxid < 10) { +maxid = 10; +}maxid++; +out.append (this.newline); +out.append (this.newline); +out.append ("//"); +out.append (this.newline); +out.append (this.newline); +var len = 50; +var nochunks = (Clazz.doubleToInt (max / len)) + 1; +if ((max % len) == 0) { +nochunks--; +}for (i = 0; i < nochunks; i++) { +var j = 0; +while ((j < s.length) && (s[j] != null)) { +var name = this.printId (s[j]); +out.append ( new jalview.util.Format ("%-" + maxid + "s").form (name + " ")); +for (var k = 0; k < 5; k++) { +var start = (i * 50) + (k * 10); +var end = start + 10; +if ((end < s[j].getSequence ().length) && (start < s[j].getSequence ().length)) { +out.append (s[j].getSequence (start, end)); +if (k < 4) { +out.append (" "); +} else { +out.append (this.newline); +}} else { +if (start < s[j].getSequence ().length) { +out.append (s[j].getSequenceAsString ().substring (start)); +out.append (this.newline); +} else { +if (k == 0) { +out.append (this.newline); +}}}} +j++; +} +out.append (this.newline); +} +return out.toString (); +}, "~A"); +}); diff --git a/bin/jalview/io/SequenceAnnotationReport.class b/bin/jalview/io/SequenceAnnotationReport.class index c84960cc48b45c0b6ab2f5f91a0f23509aa9140c..53c67b0c2ba11ae84098b2f7e8202891ce848084 100644 GIT binary patch delta 4223 zcmZu!33yc175>kAnRzpB-ej3DgqMVn1c+IP(SRX@B%)v-5&|Va44^OxLm0^BWWuTp z3W#elJgX%tZfHcTvJM~!xJ8Om(5kgAZK+1K+S20nkM^{BZMcQ;ppmKe%L$K=wI}eX&coZ85wt8=% zs;=4Z<)|{V%2Yg#Clx$Fh?(zM=*esFG}Y&oH8guT)TgkK!SJPB!U=g!!F)9GBs1^?h(2#5ps=hErX2~i!IKEeH?j~ zxTF0V4&b2Swht(Nm4Qz!_BGb0w)*Qz(rtL1(Mo4LyO5#aO+xI2Q&02O1)BXT2*1~G z7;hOZ_L;#W3`23PKd&^k*poWX@0}}*93`mfsR56l<0?rPr+Y`kyOCS2XkOHF%kL5F z#d)66;=EdasU08SLj`~8@oC~(wWKxRZPf5*e8jTnNg){L9SI7$;ZR66k~KXjVTwu;Sv68{f?fDp zr+FHDa|F+>kt%|YV;IVt77F$RZ)>Zk-YcYs((Uch^+eYjr(zbV)f!Eq8wis!jjOHwjDpw! z#@5)flAG95v9DC6*;K2LhtGbY8Yg%H^E9fXIjqy@SW98Rz4(X_ArEr;rki+CGEnJLAqi1A>V;doi(Q z7aDZy4m5@^HG~^O7+-CEil3IpkZkI>=I=t4$+=i7gw`(nDA)^iYY10{FuVhw3$nGy zqFX{(Qe@Zdu3JJ_UZA>FX(N(!i(8Gg&JN-BB1=%W_kIYyJA|IY?O?qG-6FdkA>7G! z>=8<++;c(2c|pZA9XaTI;-Kt$dL))kOw%o{wY*Py3eilq3vwf}b<0fGT9*;RZ^T($ z?XLAEnd7=oK#(JBjIZv59*+O#W<`(>@5W;tn50L&357Zlt4Bppc={kV8zNr#~9m2}vW~7s=!LSZuZRc>PpYL-@OH--9m*9o<*!N|-u( z+g6ZtRGul%!e_?vgsR{%%*Cgehaa&3=g~kGG?I;12d~j+=7!Kh$+(#Y!%sN~aPhX$ zXe^=%ET+j=N;9#H=JH@}#&T-I3JPK+t;TA471aZu{UE3y@@$_~6HyYRZK^P0?S2HucIGhK!*xf1*3 z$=D~)MDUR8!C|=(Z^>=EF2>vPt=KKE!C1K+?;)1oIZujTc^%^5;x9oZB8kVHppwxa zl1Zgt0MA^(`wCwpigEh{|K>JeL6Y2n|KJ;@AD|!bExzNKlZ^NAJ#*|q2KH_Iz-Cm2 z^l6-A%E35Xh5zDt*cpLLY!`|g=L>vER@gXNAO44*pz_g^aSErQB9%|3MGlpMG(O51 zfQ}-i8!@mc;4yR^{~x6A!vhMBF&> zb%|NMsvLfNg@Vlmr%`fwH@j9ZQ8gwdrj+!URZu956Z=0a{EkNSCCU-+VKoKkO+{mK zqTcsX3%#O`5|bBPD!O3Y{>{d+tVL0KNvavLi=xcdOO_7AZo~WB#)zx)Q`#aZN0C)5(M3v57o8Sl z+mxNOY{>>-h=I z&C81$oMF$e=8hR1 zqI_dh@<7TmjwGkB{A*KwU;m79Q|@GW^(swrYr13q6Wx!BbC^+G)rBMMSv7q+bVnE0 zR)N;z)8W=G^4V)M>{Hk@_Vw>yo-6trqfi*`Uqv=PkS#=c9moh%`PI2f4=y!Px>8kR z0$5ljPL(UajPoHHc@Sr}r>CS+@M;<*NRd5r1Nab`rY?w>OXgu@mXre=0qE;@pHT-a&APN=RxHDFA zDQb8LKAOlpCyoa(oF=hiG?hfe4!SNP)~F#ObVVCA;9GjOQ|(LQ{={sYx`=_#}1MjGAz#gp;Q8op7gQY6f>e z?vzZ;WGYHfX3w;kyKe~Bmvn+}hU<&Q=fsow7?KNYL(CfJLarc;1!<{+cJ8KG%rCNc zLgQ&i{KuFW;wJHC_qT%TW4xF)IOq!}zH7cYNyAkVNj4=%SHv5`Z4+zQ;wpaeIdqj1 zeHZ&`V5<&y)OySl>0M{0_f%b^Hb2)oFg8NAbf7pVgfW2vXHPST)}u{f*&b?E;l%Rx=KZjP>cy2P2r$ z_#RA|ieSoA1XHG#FuE3jpoy-PM@2dvs8b!-EYi+oORJw)l$d1|gif-lH zSJ8lpw49|pN;%0=c(yxmY#DAenHrC>d|JU`C(ocPx{U{5bnhGrbJCb2GPDGaZj{0v u?z#%UrbUl`Mil8;Soqr}(u}G&4M&?9$bZD#&L5Q`ACoyRRlJShA@PIWD+Ms*pvYU z6|+`YMYLrP?f#@g&Kdi>sXHAgxE%JaJ;vzA>eBb`da)#b)}9~uoCPG z`}i74alMWk#1?z7Wp-<;H!#lA=2a0QSj#8RnpRaQbk^y(5jPPOpMRm(c+#3_-Js)U z++w_G%}d$H{PN-}s>j!vx<40^Ul97|Pccqf`;XXUicM20?j%T~vsBzgpmG(zCC)US2iiw@&z<;tQhg54*!aA$Qyn(# z5C>Es&_1l=MI2#wntcAHZ3Ji45>LCQcv;ZbR6NJq5Nr{ak1^_5<-X>|thPWyMUILt zh9`$ndjq8;fgJwgtVMd+*}| zkx+pE!4>h^*HSzq;M4uVnqa`|X=cwqG=^(=){pTQ1t*R9TC(e}P#MkEfX^Rn;*|Xq ze^YSExLr%m{5y2^+mzGV+JYJ}QVPWo5|?^kYj zP(68)g<^Gz6Uf*Yt63&uLLosXr{Idzs`4!GHVI~;PA*}|=4%_j((h^ZHP|VM+zKTd zcj{Sk3Z)vm^`X{u%2X)BIIXA2S(I(q9Nx?%%GK!-VNhX%(>={z-idaN22z1S`Nr*z zY$`OKakx|q4bo{aU1}V6lr9;3znn9K7 zG)f#1$4AWcHhNdg^tLuJuEO=vI+Y8VgJlfRwXK{fz7@hsrA}k$^4*S?HtkdjS!P%WZWlF&m zfeiC~w8ThA7?m-QnsjOw9tfOkT9yU)zFDP3r&hYoSe!7>Ufs}kVtcV5V4THPnn+ESkE}=~6l>Ns0{R(NEVNEP0%@~t7fIcz2 ziJ2isk=wclO<}aunuPcXY(rYn0aVvHm+VE2$q8e281urI%35J8>%zYUdxiKI8pg;D zoHF@kG47Z!R+rh_Hs_i!)|O~4O?n8a?iiOAZ=D~;de*S@(l&R<=Dbzt*G$>oOg)eiiC}+wViNB;{UN(5#)XQ@IVJt~WA9evMh@F&Zi`Bva~|xAMqvFy7tR*$fupNO z{V1yo2CF$=>eKB+=xtL!jF-!7ojB;W?MDIOFiOkRLUOBNyjoZ0I8>s`CH79VyB#k3 zure*;!W+T`%{oljJi$M1O*Uy^KSICd)-23=i!c3NXoA;?ERidM+=oSM;I5>8v)}1+ zXuX|Wc9;G@_r^|Smub832Q#()ERJGlA~*JtTMOe8;p%6Ej_xsTB|@Fsv=by9k*npI z_|#aOR1-RiML2=Q_zX+&4>aMwXvSGyFQA!QT??sbhZYb#}iUJudA>_x)Hmijo2eSf@h`2 zuunRI=cNyDNIHcVq%Uz;`W7!r-{XjM0Y~K+9Fuik<9K!BCAoy@QRtG#;*dN6&&$;a zy&})TtMYujCNJi7DUQpn*e9>TBzZj#uXuhLZ5O}t1|-1AUxG?OD#)bLkPgYDGLXqL zSxCRcSKtAF5AZejju@oM*Ww$-*2+)`F{BUU-%QyV zhY|P>o`#JP$j7rnk>h-tFUJa%qxIo?oPox!r}1T-gN7{jOpiL1foyi=JU}Oq*^M}; z3P`~O{=Y=wcL)@odFbXJRk`dUiGpHN7B@hOb6ig6FoXtlqlzcq57ms%+yw(4Wh+9N zap+g2;Hi=`sJOJ7eb6q}9hH(1>d{qDD$El*azQvS4zU+0M@>f56dpsSBBL=uL3KCB z`v0iQ5p_1w%~vLN%>F^_5vPCbi0wySU*w1g{nKu7Ll-$~6s3yDdcd?H<{~lQ2Z{F* z|Js0e%NShB3)$JvDdUP$b93V^GpuJ=@dp#)~i06{#zDZocAJGm$Im)bJi7!)% zy6B7```t_57VW2o{`|Z=h|)UQZLQfyX=N%ib9h48cpbnica$!~iDt0ZvYp@D%uu`V zl-a7bxoutO?^d~Ag(*+;PHsW0VsppzFfCy!GK$hNQi?^x(p?VAe9^zS375rkpNg?XK^bv zbta@`HNvUE@wxGB!iG5otbH6xxvW9bS}TheA4#}z1X4Q{0I-2P-F zNNZ^#Qx>F3?KFudbHR_4>S+q=Sy3s~(3QL@xQ5=NsZ<3Oi|7PRW1bCudWEJlrQsHI zawFx+$1ZNQGq|>OJO>~BjCl^63}GbAWW`vjh>GoeWJIh}Q&j4pmwKhI_e#I(kxEx# zuxUj#n??WLFlu_kn8jgm+rUO7UceBA%TN4Sxu zI*$}lx@S?(ZCH`cKsgV7t@d)xBfICTn}IQV(@)uDxX)rL_kcN+UK^<*EaMGUcF<8+ zG$`F=v54%s$~cxaJTy1blHs7M`L4JnGc}J}Ew^N*u3^d|D6=`om`3X(Hl@>iV|?E< zwWuFmD_$#di8{!vo-PcI5L|cWjGZE8tkN@Mr`Ebu@wIm!d9rwqcpd0Ga;Z@iV3c^d z`x`;^H}1(EkhnCGuFfT*nzTsW87Hz`E@7fXH7C1UG}h%j*@FycUlbXpqR226 zMTV)>j8Tlh!NkbQ-8P4=XS5aEhyGE@PM6aSoRccXl16J7X&dI_a|&^0Yy4=arnM}! z<0x)L2CZZ2#A?hlnL5wFVRR#l9Xz}W=q8?*vAts}!pUZi$iE8MyHN>Sq@gPOV&|0O n!Nnzbj@v9Hsb&(*<|G?u=2wzJ>-l54$hI`T-3@F+qMQE*Q&PLy diff --git a/bin/jalview/io/SequenceAnnotationReport.js b/bin/jalview/io/SequenceAnnotationReport.js index 4ab2aa6..889211b 100644 --- a/bin/jalview/io/SequenceAnnotationReport.js +++ b/bin/jalview/io/SequenceAnnotationReport.js @@ -1,181 +1,181 @@ -Clazz.declarePackage ("jalview.io"); -Clazz.load (null, "jalview.io.SequenceAnnotationReport", ["jalview.util.DBRefUtils", "$.UrlLink", "java.lang.Float", "java.util.ArrayList"], function () { -c$ = Clazz.decorateAsClass (function () { -this.linkImageURL = null; -Clazz.instantialize (this, arguments); -}, jalview.io, "SequenceAnnotationReport"); -Clazz.makeConstructor (c$, -function (linkImageURL) { -this.linkImageURL = linkImageURL; -}, "~S"); -Clazz.defineMethod (c$, "appendFeatures", -function (tooltipText2, rpos, features) { -this.appendFeatures (tooltipText2, rpos, features, null); -}, "StringBuffer,~N,java.util.List"); -Clazz.defineMethod (c$, "appendFeatures", -function (tooltipText2, rpos, features, minmax) { -var tmpString; -if (features != null) { -for (var feature, $feature = features.iterator (); $feature.hasNext () && ((feature = $feature.next ()) || true);) { -if (feature.getType ().equals ("disulfide bond")) { -if (feature.getBegin () == rpos || feature.getEnd () == rpos) { -if (tooltipText2.length () > 6) { -tooltipText2.append ("
"); -}tooltipText2.append ("disulfide bond " + feature.getBegin () + ":" + feature.getEnd ()); -}} else { -if (tooltipText2.length () > 6) { -tooltipText2.append ("
"); -}var linkOnly = feature.getValue ("linkonly") != null; -if (!linkOnly) { -tooltipText2.append (feature.getType () + " "); -if (rpos != 0) { -tooltipText2.append (feature.begin); -}if (feature.begin != feature.end) { -tooltipText2.append (" " + feature.end); -}if (feature.getDescription () != null && !feature.description.equals (feature.getType ())) { -tmpString = feature.getDescription (); -var tmp2up = tmpString.toUpperCase (); -var startTag = tmp2up.indexOf (""); -if (startTag > -1) { -tmpString = tmpString.substring (startTag + 6); -tmp2up = tmp2up.substring (startTag + 6); -}var endTag = tmp2up.indexOf (""); -if (endTag > -1) { -tmpString = tmpString.substring (0, endTag); -tmp2up = tmp2up.substring (0, endTag); -}endTag = tmp2up.indexOf (""); -if (endTag > -1) { -tmpString = tmpString.substring (0, endTag); -}if (startTag > -1) { -tooltipText2.append ("; " + tmpString); -} else { -if (tmpString.indexOf ("<") > -1 || tmpString.indexOf (">") > -1) { -tmpString = tmpString.replaceAll ("<", "<"); -tmpString = tmpString.replaceAll (">", ">"); -tooltipText2.append ("; "); -tooltipText2.append (tmpString); -} else { -tooltipText2.append ("; " + tmpString); -}}}if (!Float.isNaN (feature.getScore ())) { -var rng = (minmax == null) ? null : (minmax.get (feature.getType ())); -if (rng != null && rng[0] != null && rng[0][0] != rng[0][1]) { -tooltipText2.append (" Score=" + feature.getScore ()); -}}if (feature.getValue ("status") != null) { -var status = feature.getValue ("status").toString (); -if (status.length > 0) { -tooltipText2.append ("; (" + feature.getValue ("status") + ")"); -}}}}if (feature.links != null) { -if (this.linkImageURL != null) { -tooltipText2.append (" "); -} else { -for (var urlstring, $urlstring = feature.links.iterator (); $urlstring.hasNext () && ((urlstring = $urlstring.next ()) || true);) { -try { -for (var urllink, $urllink = 0, $$urllink = this.createLinksFrom (null, urlstring); $urllink < $$urllink.length && ((urllink = $$urllink[$urllink]) || true); $urllink++) { -tooltipText2.append ("
" + (urllink[0].toLowerCase ().equals (urllink[1].toLowerCase ()) ? urllink[0] : (urllink[0] + ":" + urllink[1])) + "
"); -} -} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -System.err.println ("problem when creating links from " + urlstring); -x.printStackTrace (); -} else { -throw x; -} -} -} -}}} -}}, "StringBuffer,~N,java.util.List,java.util.Hashtable"); -Clazz.defineMethod (c$, "createLinksFrom", -function (seq, link) { -var urlSets = new java.util.ArrayList (); -var uniques = new java.util.ArrayList (); -var urlLink = new jalview.util.UrlLink (link); -if (!urlLink.isValid ()) { -System.err.println (urlLink.getInvalidMessage ()); -return null; -}var target = urlLink.getTarget (); -var label = urlLink.getLabel (); -if (seq != null && urlLink.isDynamic ()) { -var dbr = jalview.util.DBRefUtils.selectRefs (seq.getDBRef (), Clazz.newArray (-1, [target])); -var id = seq.getName (); -var descr = seq.getDescription (); -if (descr != null && descr.length < 1) { -descr = null; -}if (dbr != null) { -for (var r = 0; r < dbr.length; r++) { -if (id != null && dbr[r].getAccessionId ().equals (id)) { -id = null; -}var urls = urlLink.makeUrls (dbr[r].getAccessionId (), true); -if (urls != null) { -for (var u = 0; u < urls.length; u += 2) { -var unq = urls[u] + "|" + urls[u + 1]; -if (!uniques.contains (unq)) { -urlSets.add ( Clazz.newArray (-1, [target, label, urls[u], urls[u + 1]])); -uniques.add (unq); -}} -}} -}if (id != null) { -var urls = urlLink.makeUrls (id, true); -if (urls != null) { -for (var u = 0; u < urls.length; u += 2) { -var unq = urls[u] + "|" + urls[u + 1]; -if (!uniques.contains (unq)) { -urlSets.add ( Clazz.newArray (-1, [target, label, urls[u], urls[u + 1]])); -uniques.add (unq); -}} -}}if (descr != null && urlLink.getRegexReplace () != null) { -var urls = urlLink.makeUrls (descr, true); -if (urls != null) { -for (var u = 0; u < urls.length; u += 2) { -var unq = urls[u] + "|" + urls[u + 1]; -if (!uniques.contains (unq)) { -urlSets.add ( Clazz.newArray (-1, [target, label, urls[u], urls[u + 1]])); -uniques.add (unq); -}} -}}} else { -var unq = label + "|" + urlLink.getUrl_prefix (); -if (!uniques.contains (unq)) { -uniques.add (unq); -urlSets.add ( Clazz.newArray (-1, [target, label, null, urlLink.getUrl_prefix ()])); -}}return urlSets.toArray ( Clazz.newArray (-1, [])); -}, "jalview.datamodel.SequenceI,~S"); -Clazz.defineMethod (c$, "createSequenceAnnotationReport", -function (tip, sequence, showDbRefs, showNpFeats, minmax) { -this.createSequenceAnnotationReport (tip, sequence, showDbRefs, showNpFeats, true, minmax); -}, "StringBuffer,jalview.datamodel.SequenceI,~B,~B,java.util.Hashtable"); -Clazz.defineMethod (c$, "createSequenceAnnotationReport", -function (tip, sequence, showDbRefs, showNpFeats, tableWrap, minmax) { -var tmp; -tip.append (""); -var maxWidth = 0; -if (sequence.getDescription () != null) { -tmp = sequence.getDescription (); -tip.append ("
" + tmp); -maxWidth = Math.max (maxWidth, tmp.length); -}var ds = sequence; -while (ds.getDatasetSequence () != null) { -ds = ds.getDatasetSequence (); -} -var dbrefs = ds.getDBRef (); -if (showDbRefs && dbrefs != null) { -for (var i = 0; i < dbrefs.length; i++) { -tip.append ("
"); -tmp = dbrefs[i].getSource () + " " + dbrefs[i].getAccessionId (); -tip.append (tmp); -maxWidth = Math.max (maxWidth, tmp.length); -} -}var features = sequence.getSequenceFeatures (); -if (showNpFeats && features != null) { -for (var i = 0; i < features.length; i++) { -if (features[i].begin == 0 && features[i].end == 0) { -var sz = -tip.length (); -var tfeat = new java.util.ArrayList (); -tfeat.add (features[i]); -this.appendFeatures (tip, 0, tfeat, minmax); -sz += tip.length (); -maxWidth = Math.max (maxWidth, sz); -}} -}if (tableWrap && maxWidth > 60) { -tip.insert (0, "
"); -tip.append ("
"); -}}, "StringBuffer,jalview.datamodel.SequenceI,~B,~B,~B,java.util.Hashtable"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (null, "jalview.io.SequenceAnnotationReport", ["jalview.util.DBRefUtils", "$.UrlLink", "java.lang.Float", "java.util.ArrayList"], function () { +c$ = Clazz.decorateAsClass (function () { +this.linkImageURL = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "SequenceAnnotationReport"); +Clazz.makeConstructor (c$, +function (linkImageURL) { +this.linkImageURL = linkImageURL; +}, "~S"); +Clazz.defineMethod (c$, "appendFeatures", +function (tooltipText2, rpos, features) { +this.appendFeatures (tooltipText2, rpos, features, null); +}, "StringBuffer,~N,java.util.List"); +Clazz.defineMethod (c$, "appendFeatures", +function (tooltipText2, rpos, features, minmax) { +var tmpString; +if (features != null) { +for (var feature, $feature = features.iterator (); $feature.hasNext () && ((feature = $feature.next ()) || true);) { +if (feature.getType ().equals ("disulfide bond")) { +if (feature.getBegin () == rpos || feature.getEnd () == rpos) { +if (tooltipText2.length () > 6) { +tooltipText2.append ("
"); +}tooltipText2.append ("disulfide bond " + feature.getBegin () + ":" + feature.getEnd ()); +}} else { +if (tooltipText2.length () > 6) { +tooltipText2.append ("
"); +}var linkOnly = feature.getValue ("linkonly") != null; +if (!linkOnly) { +tooltipText2.append (feature.getType () + " "); +if (rpos != 0) { +tooltipText2.append ("" + feature.begin); +}if (feature.begin != feature.end) { +tooltipText2.append (" " + feature.end); +}if (feature.getDescription () != null && !feature.description.equals (feature.getType ())) { +tmpString = feature.getDescription (); +var tmp2up = tmpString.toUpperCase (); +var startTag = tmp2up.indexOf (""); +if (startTag > -1) { +tmpString = tmpString.substring (startTag + 6); +tmp2up = tmp2up.substring (startTag + 6); +}var endTag = tmp2up.indexOf (""); +if (endTag > -1) { +tmpString = tmpString.substring (0, endTag); +tmp2up = tmp2up.substring (0, endTag); +}endTag = tmp2up.indexOf (""); +if (endTag > -1) { +tmpString = tmpString.substring (0, endTag); +}if (startTag > -1) { +tooltipText2.append ("; " + tmpString); +} else { +if (tmpString.indexOf ("<") > -1 || tmpString.indexOf (">") > -1) { +tmpString = tmpString.replaceAll ("<", "<"); +tmpString = tmpString.replaceAll (">", ">"); +tooltipText2.append ("; "); +tooltipText2.append (tmpString); +} else { +tooltipText2.append ("; " + tmpString); +}}}if (!Float.isNaN (feature.getScore ())) { +var rng = (minmax == null) ? null : (minmax.get (feature.getType ())); +if (rng != null && rng[0] != null && rng[0][0] != rng[0][1]) { +tooltipText2.append (" Score=" + feature.getScore ()); +}}if (feature.getValue ("status") != null) { +var status = feature.getValue ("status").toString (); +if (status.length > 0) { +tooltipText2.append ("; (" + feature.getValue ("status") + ")"); +}}}}if (feature.links != null) { +if (this.linkImageURL != null) { +tooltipText2.append (" "); +} else { +for (var urlstring, $urlstring = feature.links.iterator (); $urlstring.hasNext () && ((urlstring = $urlstring.next ()) || true);) { +try { +for (var urllink, $urllink = 0, $$urllink = this.createLinksFrom (null, urlstring); $urllink < $$urllink.length && ((urllink = $$urllink[$urllink]) || true); $urllink++) { +tooltipText2.append ("
" + (urllink[0].toLowerCase ().equals (urllink[1].toLowerCase ()) ? urllink[0] : (urllink[0] + ":" + urllink[1])) + "
"); +} +} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +System.err.println ("problem when creating links from " + urlstring); +x.printStackTrace (); +} else { +throw x; +} +} +} +}}} +}}, "StringBuffer,~N,java.util.List,java.util.Hashtable"); +Clazz.defineMethod (c$, "createLinksFrom", +function (seq, link) { +var urlSets = new java.util.ArrayList (); +var uniques = new java.util.ArrayList (); +var urlLink = new jalview.util.UrlLink (link); +if (!urlLink.isValid ()) { +System.err.println (urlLink.getInvalidMessage ()); +return null; +}var target = urlLink.getTarget (); +var label = urlLink.getLabel (); +if (seq != null && urlLink.isDynamic ()) { +var dbr = jalview.util.DBRefUtils.selectRefs (seq.getDBRef (), Clazz.newArray (-1, [target])); +var id = seq.getName (); +var descr = seq.getDescription (); +if (descr != null && descr.length < 1) { +descr = null; +}if (dbr != null) { +for (var r = 0; r < dbr.length; r++) { +if (id != null && dbr[r].getAccessionId ().equals (id)) { +id = null; +}var urls = urlLink.makeUrls (dbr[r].getAccessionId (), true); +if (urls != null) { +for (var u = 0; u < urls.length; u += 2) { +var unq = urls[u] + "|" + urls[u + 1]; +if (!uniques.contains (unq)) { +urlSets.add ( Clazz.newArray (-1, [target, label, urls[u], urls[u + 1]])); +uniques.add (unq); +}} +}} +}if (id != null) { +var urls = urlLink.makeUrls (id, true); +if (urls != null) { +for (var u = 0; u < urls.length; u += 2) { +var unq = urls[u] + "|" + urls[u + 1]; +if (!uniques.contains (unq)) { +urlSets.add ( Clazz.newArray (-1, [target, label, urls[u], urls[u + 1]])); +uniques.add (unq); +}} +}}if (descr != null && urlLink.getRegexReplace () != null) { +var urls = urlLink.makeUrls (descr, true); +if (urls != null) { +for (var u = 0; u < urls.length; u += 2) { +var unq = urls[u] + "|" + urls[u + 1]; +if (!uniques.contains (unq)) { +urlSets.add ( Clazz.newArray (-1, [target, label, urls[u], urls[u + 1]])); +uniques.add (unq); +}} +}}} else { +var unq = label + "|" + urlLink.getUrl_prefix (); +if (!uniques.contains (unq)) { +uniques.add (unq); +urlSets.add ( Clazz.newArray (-1, [target, label, null, urlLink.getUrl_prefix ()])); +}}return urlSets.toArray ( Clazz.newArray (-1, [])); +}, "jalview.datamodel.SequenceI,~S"); +Clazz.defineMethod (c$, "createSequenceAnnotationReport", +function (tip, sequence, showDbRefs, showNpFeats, minmax) { +this.createSequenceAnnotationReport (tip, sequence, showDbRefs, showNpFeats, true, minmax); +}, "StringBuffer,jalview.datamodel.SequenceI,~B,~B,java.util.Hashtable"); +Clazz.defineMethod (c$, "createSequenceAnnotationReport", +function (tip, sequence, showDbRefs, showNpFeats, tableWrap, minmax) { +var tmp; +tip.append (""); +var maxWidth = 0; +if (sequence.getDescription () != null) { +tmp = sequence.getDescription (); +tip.append ("
" + tmp); +maxWidth = Math.max (maxWidth, tmp.length); +}var ds = sequence; +while (ds.getDatasetSequence () != null) { +ds = ds.getDatasetSequence (); +} +var dbrefs = ds.getDBRef (); +if (showDbRefs && dbrefs != null) { +for (var i = 0; i < dbrefs.length; i++) { +tip.append ("
"); +tmp = dbrefs[i].getSource () + " " + dbrefs[i].getAccessionId (); +tip.append (tmp); +maxWidth = Math.max (maxWidth, tmp.length); +} +}var features = sequence.getSequenceFeatures (); +if (showNpFeats && features != null) { +for (var i = 0; i < features.length; i++) { +if (features[i].begin == 0 && features[i].end == 0) { +var sz = -tip.length (); +var tfeat = new java.util.ArrayList (); +tfeat.add (features[i]); +this.appendFeatures (tip, 0, tfeat, minmax); +sz += tip.length (); +maxWidth = Math.max (maxWidth, sz); +}} +}if (tableWrap && maxWidth > 60) { +tip.insert (0, "
"); +tip.append ("
"); +}}, "StringBuffer,jalview.datamodel.SequenceI,~B,~B,~B,java.util.Hashtable"); +}); diff --git a/bin/jalview/io/TCoffeeScoreFile.class b/bin/jalview/io/TCoffeeScoreFile.class index 71e39b162db7e091f4e1be57c0825dc1cd9c376c..6e9db73130ec6bfe2ab0fa7364c32e6802a275e7 100644 GIT binary patch delta 71 zcmdlNe=L4Oh%#f{=1^rPCT42}fyuK}HF*Cs@G>y5GyG&{*v!DV`Iu@w6Qkf}H;t<- bKo#PX<#d;@1~C3-kejTpr?UBt?j=S5`|K4S delta 56 zcmV-80LTBvU%p?kR3ia(vsEKP0s}Gt5tEuFC 0 ? this.scores.size () - 1 : 0; -}); -Clazz.defineMethod (c$, "getWidth", -function () { -return this.fWidth != null ? this.fWidth : 0; -}); -Clazz.defineMethod (c$, "getScoresFor", -function (id) { -return this.scores != null && this.scores.containsKey (id) ? this.scores.get (id).toString () : ""; -}, "~S"); -Clazz.defineMethod (c$, "getScoresList", -function () { -if (this.scores == null) { -return null; -}var result = new java.util.ArrayList (this.scores.size ()); -for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) { -result.add (it.getValue ().toString ()); -} -return result; -}); -Clazz.defineMethod (c$, "getScoresArray", -function () { -if (this.scores == null) { -return null; -}var result = Clazz.newByteArray (this.scores.size (), 0); -var rowCount = 0; -for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) { -var line = it.getValue ().toString (); -var seqValues = Clazz.newByteArray (line.length, 0); -for (var j = 0, c = line.length; j < c; j++) { -var val = (line.charCodeAt (j) - 48); -seqValues[j] = (val >= 0 && val <= 9) ? val : -1; -} -result[rowCount++] = seqValues; -} -return result; -}); -Clazz.overrideMethod (c$, "parse", -function () { -this.header = jalview.io.TCoffeeScoreFile.readHeader (this); -if (this.header == null) { -this.error = true; -return; -}this.scores = new java.util.LinkedHashMap (); -for (var entry, $entry = this.header.scores.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { -this.scores.put (entry.getKey (), new StringBuilder ()); -} -var block; -while ((block = jalview.io.TCoffeeScoreFile.readBlock (this, this.header.scores.size ())) != null) { -for (var entry, $entry = block.items.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { -var scoreStringBuilder = this.scores.get (entry.getKey ()); -if (scoreStringBuilder == null) { -this.error = true; -this.errormessage = String.format ("Invalid T-Coffee score file: Sequence ID '%s' is not declared in header section", [entry.getKey ()]); -return; -}scoreStringBuilder.append (entry.getValue ()); -} -} -for (var str, $str = this.scores.values ().iterator (); $str.hasNext () && ((str = $str.next ()) || true);) { -if (this.fWidth == null) { -this.fWidth = new Integer (str.length ()); -} else if ((this.fWidth).intValue () !== str.length ()) { -this.error = true; -this.errormessage = "Invalid T-Coffee score file: All the score sequences must have the same length"; -return; -}} -return; -}); -c$.parseInt = Clazz.defineMethod (c$, "parseInt", -function (str) { -try { -return Integer.parseInt (str); -} catch (e) { -if (Clazz.exceptionOf (e, NumberFormatException)) { -return 0; -} else { -throw e; -} -} -}, "~S"); -c$.readHeader = Clazz.defineMethod (c$, "readHeader", -function (reader) { -var result = null; -try { -result = new jalview.io.TCoffeeScoreFile.Header (); -result.head = reader.nextLine (); -var line; -while ((line = reader.nextLine ()) != null) { -if (line.startsWith ("SCORE=")) { -result.score = jalview.io.TCoffeeScoreFile.parseInt (line.substring (6).trim ()); -break; -}} -if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) { -jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); -return null; -}if ((line = reader.nextLine ()) == null || !"BAD AVG GOOD".equals (line.trim ())) { -jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); -return null; -}if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) { -jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); -return null; -}while ((line = reader.nextLine ()) != null) { -if ("".equals (line)) { -break; -}var p = line.indexOf (":"); -if (p == -1) { -continue; -}var id = line.substring (0, p).trim (); -var val = jalview.io.TCoffeeScoreFile.parseInt (line.substring (p + 1).trim ()); -if ("".equals (id)) { -continue; -}result.scores.put (id, new Integer (val)); -} -if (result == null) { -jalview.io.TCoffeeScoreFile.error (reader, "T-COFFEE score file had no per-sequence scores"); -}} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -jalview.io.TCoffeeScoreFile.error (reader, "Unexpected problem parsing T-Coffee score ascii file"); -throw e; -} else { -throw e; -} -} -return result; -}, "jalview.io.FileParse"); -c$.error = Clazz.defineMethod (c$, "error", -($fz = function (reader, errm) { -reader.error = true; -if (reader.errormessage == null) { -reader.errormessage = errm; -} else { -reader.errormessage += "\n" + errm; -}}, $fz.isPrivate = true, $fz), "jalview.io.FileParse,~S"); -c$.readBlock = Clazz.defineMethod (c$, "readBlock", -function (reader, size) { -var result = new jalview.io.TCoffeeScoreFile.Block (size); -var line; -while ((line = reader.nextLine ()) != null && "".equals (line.trim ())) { -} -if (line == null) { -return null; -}do { -if ("".equals (line.trim ())) { -break; -}var p = line.indexOf (" "); -if (p == -1) { -if (reader.warningMessage == null) { -reader.warningMessage = ""; -}reader.warningMessage += "Possible parsing error - expected to find a space in line: '" + line + "'\n"; -continue; -}var id = line.substring (0, p).trim (); -var val = line.substring (p + 1).trim (); -var m = jalview.io.TCoffeeScoreFile.SCORES_WITH_RESIDUE_NUMS.matcher (val); -if (m.matches ()) { -val = m.group (1); -}result.items.put (id, val); -} while ((line = reader.nextLine ()) != null); -return result; -}, "jalview.io.FileParse,~N"); -Clazz.defineMethod (c$, "annotateAlignment", -function (al, matchids) { -if (al.getHeight () != this.getHeight () || al.getWidth () != this.getWidth ()) { -var info = String.format ("align w: %s, h: %s; score: w: %s; h: %s ", [new Integer (al.getWidth ()), new Integer (al.getHeight ()), new Integer (this.getWidth ()), new Integer (this.getHeight ())]); -this.warningMessage = "Alignment shape does not match T-Coffee score file shape -- " + info; -return false; -}var added = false; -var i = 0; -var sidmatcher = new jalview.analysis.SequenceIdMatcher (al.getSequencesArray ()); -var scoreMatrix = this.getScoresArray (); -for (var id, $id = this.scores.entrySet ().iterator (); $id.hasNext () && ((id = $id.next ()) || true);) { -var srow = scoreMatrix[i]; -var s; -if (matchids) { -s = sidmatcher.findIdMatch (id.getKey ()); -} else { -s = al.getSequenceAt (i); -}i++; -if (s == null && i != this.scores.size () && !id.getKey ().equals ("cons")) { -System.err.println ("No " + (matchids ? "match " : " sequences left ") + " for TCoffee score set : " + id.getKey ()); -continue; -}var jSize = al.getWidth () < srow.length ? al.getWidth () : srow.length; -var annotations = new Array (al.getWidth ()); -for (var j = 0; j < jSize; j++) { -var val = srow[j]; -if (s != null && jalview.util.Comparison.isGap (s.getCharAt (j))) { -annotations[j] = null; -if (val > 0) { -System.err.println ("Warning: non-zero value for positional T-COFFEE score for gap at " + j + " in sequence " + s.getName ()); -}} else { -annotations[j] = new jalview.datamodel.Annotation (s == null ? "" + val : null, s == null ? "" + val : null, '\0', val * 1, val >= 0 && val < jalview.io.TCoffeeScoreFile.colors.length ? jalview.io.TCoffeeScoreFile.colors[val] : java.awt.Color.white); -}} -var aa = al.findOrCreateAnnotation ("TCoffeeScore", "TCoffeeScore", false, s, null); -if (s != null) { -aa.label = "T-COFFEE"; -aa.description = "" + id.getKey (); -aa.annotations = annotations; -aa.visible = false; -aa.belowAlignment = false; -aa.setScore (this.header.getScoreFor (id.getKey ())); -aa.createSequenceMapping (s, s.getStart (), true); -s.addAlignmentAnnotation (aa); -aa.adjustForAlignment (); -} else { -aa.graph = 0; -aa.label = "T-COFFEE"; -aa.description = "TCoffee column reliability score"; -aa.annotations = annotations; -aa.belowAlignment = true; -aa.visible = true; -aa.setScore (this.header.getScoreAvg ()); -}aa.showAllColLabels = true; -aa.validateRangeAndDisplay (); -added = true; -} -return added; -}, "jalview.datamodel.AlignmentI,~B"); -Clazz.overrideMethod (c$, "print", -function () { -return "Not valid."; -}); -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.head = null; -this.score = 0; -this.scores = null; -Clazz.instantialize (this, arguments); -}, jalview.io.TCoffeeScoreFile, "Header"); -Clazz.prepareFields (c$, function () { -this.scores = new java.util.LinkedHashMap (); -}); -Clazz.defineMethod (c$, "getScoreAvg", -function () { -return this.score; -}); -Clazz.defineMethod (c$, "getScoreFor", -function (a) { -return this.scores.containsKey (a) ? this.scores.get (a) : -1; -}, "~S"); -c$ = Clazz.p0p (); -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.size = 0; -this.items = null; -Clazz.instantialize (this, arguments); -}, jalview.io.TCoffeeScoreFile, "Block"); -Clazz.makeConstructor (c$, -function (a) { -this.size = a; -this.items = new java.util.HashMap (a); -}, "~N"); -Clazz.defineMethod (c$, "getScoresFor", -function (a) { -return this.items.get (a); -}, "~S"); -Clazz.defineMethod (c$, "getConsensus", -function () { -return this.items.get ("cons"); -}); -c$ = Clazz.p0p (); -c$.SCORES_WITH_RESIDUE_NUMS = c$.prototype.SCORES_WITH_RESIDUE_NUMS = java.util.regex.Pattern.compile ("^\\d+\\s([^\\s]+)\\s+\\d+$"); -c$.colors = c$.prototype.colors = Clazz.newArray (-1, [ new java.awt.Color (102, 102, 255), new java.awt.Color (0, 255, 0), new java.awt.Color (102, 255, 0), new java.awt.Color (204, 255, 0), new java.awt.Color (255, 255, 0), new java.awt.Color (255, 204, 0), new java.awt.Color (255, 153, 0), new java.awt.Color (255, 102, 0), new java.awt.Color (255, 51, 0), new java.awt.Color (255, 34, 0)]); -Clazz.defineStatics (c$, -"TCOFFEE_SCORE", "TCoffeeScore"); -}); +Clazz.declarePackage ("jalview.io"); +Clazz.load (["jalview.io.AlignFile", "java.awt.Color", "java.util.LinkedHashMap", "java.util.regex.Pattern"], "jalview.io.TCoffeeScoreFile", ["jalview.analysis.SequenceIdMatcher", "jalview.datamodel.Annotation", "jalview.util.Comparison", "java.lang.StringBuilder", "java.util.ArrayList", "$.HashMap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.header = null; +this.scores = null; +this.fWidth = null; +Clazz.instantialize (this, arguments); +}, jalview.io, "TCoffeeScoreFile", jalview.io.AlignFile); +Clazz.defineMethod (c$, "getHeight", +function () { +return this.scores != null && this.scores.size () > 0 ? this.scores.size () - 1 : 0; +}); +Clazz.defineMethod (c$, "getWidth", +function () { +return this.fWidth != null ? this.fWidth : 0; +}); +Clazz.defineMethod (c$, "getScoresFor", +function (id) { +return this.scores != null && this.scores.containsKey (id) ? this.scores.get (id).toString () : ""; +}, "~S"); +Clazz.defineMethod (c$, "getScoresList", +function () { +if (this.scores == null) { +return null; +}var result = new java.util.ArrayList (this.scores.size ()); +for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) { +result.add (it.getValue ().toString ()); +} +return result; +}); +Clazz.defineMethod (c$, "getScoresArray", +function () { +if (this.scores == null) { +return null; +}var result = Clazz.newByteArray (this.scores.size (), 0); +var rowCount = 0; +for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) { +var line = it.getValue ().toString (); +var seqValues = Clazz.newByteArray (line.length, 0); +for (var j = 0, c = line.length; j < c; j++) { +var val = (line.charCodeAt (j) - 48); +seqValues[j] = (val >= 0 && val <= 9) ? val : -1; +} +result[rowCount++] = seqValues; +} +return result; +}); +Clazz.overrideMethod (c$, "parse", +function () { +this.header = jalview.io.TCoffeeScoreFile.readHeader (this); +if (this.header == null) { +this.error = true; +return; +}this.scores = new java.util.LinkedHashMap (); +for (var entry, $entry = this.header.scores.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { +this.scores.put (entry.getKey (), new StringBuilder ()); +} +var block; +while ((block = jalview.io.TCoffeeScoreFile.readBlock (this, this.header.scores.size ())) != null) { +for (var entry, $entry = block.items.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { +var scoreStringBuilder = this.scores.get (entry.getKey ()); +if (scoreStringBuilder == null) { +this.error = true; +this.errormessage = String.format ("Invalid T-Coffee score file: Sequence ID '%s' is not declared in header section", [entry.getKey ()]); +return; +}scoreStringBuilder.append (entry.getValue ()); +} +} +for (var str, $str = this.scores.values ().iterator (); $str.hasNext () && ((str = $str.next ()) || true);) { +if (this.fWidth == null) { +this.fWidth = new Integer (str.length ()); +} else if ((this.fWidth).intValue () !== str.length ()) { +this.error = true; +this.errormessage = "Invalid T-Coffee score file: All the score sequences must have the same length"; +return; +}} +return; +}); +c$.parseInt = Clazz.defineMethod (c$, "parseInt", +function (str) { +try { +return Integer.parseInt (str); +} catch (e) { +if (Clazz.exceptionOf (e, NumberFormatException)) { +return 0; +} else { +throw e; +} +} +}, "~S"); +c$.readHeader = Clazz.defineMethod (c$, "readHeader", +function (reader) { +var result = null; +try { +result = new jalview.io.TCoffeeScoreFile.Header (); +result.head = reader.nextLine (); +var line; +while ((line = reader.nextLine ()) != null) { +if (line.startsWith ("SCORE=")) { +result.score = jalview.io.TCoffeeScoreFile.parseInt (line.substring (6).trim ()); +break; +}} +if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) { +jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); +return null; +}if ((line = reader.nextLine ()) == null || !"BAD AVG GOOD".equals (line.trim ())) { +jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); +return null; +}if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) { +jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)"); +return null; +}while ((line = reader.nextLine ()) != null) { +if ("".equals (line)) { +break; +}var p = line.indexOf (":"); +if (p == -1) { +continue; +}var id = line.substring (0, p).trim (); +var val = jalview.io.TCoffeeScoreFile.parseInt (line.substring (p + 1).trim ()); +if ("".equals (id)) { +continue; +}result.scores.put (id, new Integer (val)); +} +if (result == null) { +jalview.io.TCoffeeScoreFile.error (reader, "T-COFFEE score file had no per-sequence scores"); +}} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +jalview.io.TCoffeeScoreFile.error (reader, "Unexpected problem parsing T-Coffee score ascii file"); +throw e; +} else { +throw e; +} +} +return result; +}, "jalview.io.FileParse"); +c$.error = Clazz.defineMethod (c$, "error", +($fz = function (reader, errm) { +reader.error = true; +if (reader.errormessage == null) { +reader.errormessage = errm; +} else { +reader.errormessage += "\n" + errm; +}}, $fz.isPrivate = true, $fz), "jalview.io.FileParse,~S"); +c$.readBlock = Clazz.defineMethod (c$, "readBlock", +function (reader, size) { +var result = new jalview.io.TCoffeeScoreFile.Block (size); +var line; +while ((line = reader.nextLine ()) != null && "".equals (line.trim ())) { +} +if (line == null) { +return null; +}do { +if ("".equals (line.trim ())) { +break; +}var p = line.indexOf (" "); +if (p == -1) { +if (reader.warningMessage == null) { +reader.warningMessage = ""; +}reader.warningMessage += "Possible parsing error - expected to find a space in line: '" + line + "'\n"; +continue; +}var id = line.substring (0, p).trim (); +var val = line.substring (p + 1).trim (); +var m = jalview.io.TCoffeeScoreFile.SCORES_WITH_RESIDUE_NUMS.matcher (val); +if (m.matches ()) { +val = m.group (1); +}result.items.put (id, val); +} while ((line = reader.nextLine ()) != null); +return result; +}, "jalview.io.FileParse,~N"); +Clazz.defineMethod (c$, "annotateAlignment", +function (al, matchids) { +if (al.getHeight () != this.getHeight () || al.getWidth () != this.getWidth ()) { +var info = String.format ("align w: %s, h: %s; score: w: %s; h: %s ", [new Integer (al.getWidth ()), new Integer (al.getHeight ()), new Integer (this.getWidth ()), new Integer (this.getHeight ())]); +this.warningMessage = "Alignment shape does not match T-Coffee score file shape -- " + info; +return false; +}var added = false; +var i = 0; +var sidmatcher = new jalview.analysis.SequenceIdMatcher (al.getSequencesArray ()); +var scoreMatrix = this.getScoresArray (); +for (var id, $id = this.scores.entrySet ().iterator (); $id.hasNext () && ((id = $id.next ()) || true);) { +var srow = scoreMatrix[i]; +var s; +if (matchids) { +s = sidmatcher.findIdMatch (id.getKey ()); +} else { +s = al.getSequenceAt (i); +}i++; +if (s == null && i != this.scores.size () && !id.getKey ().equals ("cons")) { +System.err.println ("No " + (matchids ? "match " : " sequences left ") + " for TCoffee score set : " + id.getKey ()); +continue; +}var jSize = al.getWidth () < srow.length ? al.getWidth () : srow.length; +var annotations = new Array (al.getWidth ()); +for (var j = 0; j < jSize; j++) { +var val = srow[j]; +if (s != null && jalview.util.Comparison.isGap (s.getCharAt (j))) { +annotations[j] = null; +if (val > 0) { +System.err.println ("Warning: non-zero value for positional T-COFFEE score for gap at " + j + " in sequence " + s.getName ()); +}} else { +annotations[j] = new jalview.datamodel.Annotation (s == null ? "" + val : null, s == null ? "" + val : null, '\0', val * 1, val >= 0 && val < jalview.io.TCoffeeScoreFile.colors.length ? jalview.io.TCoffeeScoreFile.colors[val] : java.awt.Color.white); +}} +var aa = al.findOrCreateAnnotation ("TCoffeeScore", "TCoffeeScore", false, s, null); +if (s != null) { +aa.label = "T-COFFEE"; +aa.description = "" + id.getKey (); +aa.annotations = annotations; +aa.visible = false; +aa.belowAlignment = false; +aa.setScore (this.header.getScoreFor (id.getKey ())); +aa.createSequenceMapping (s, s.getStart (), true); +s.addAlignmentAnnotation (aa); +aa.adjustForAlignment (); +} else { +aa.graph = 0; +aa.label = "T-COFFEE"; +aa.description = "TCoffee column reliability score"; +aa.annotations = annotations; +aa.belowAlignment = true; +aa.visible = true; +aa.setScore (this.header.getScoreAvg ()); +}aa.showAllColLabels = true; +aa.validateRangeAndDisplay (); +added = true; +} +return added; +}, "jalview.datamodel.AlignmentI,~B"); +Clazz.overrideMethod (c$, "print", +function () { +return "Not valid."; +}); +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.head = null; +this.score = 0; +this.scores = null; +Clazz.instantialize (this, arguments); +}, jalview.io.TCoffeeScoreFile, "Header"); +Clazz.prepareFields (c$, function () { +this.scores = new java.util.LinkedHashMap (); +}); +Clazz.defineMethod (c$, "getScoreAvg", +function () { +return this.score; +}); +Clazz.defineMethod (c$, "getScoreFor", +function (a) { +return this.scores.containsKey (a) ? this.scores.get (a) : -1; +}, "~S"); +c$ = Clazz.p0p (); +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.size = 0; +this.items = null; +Clazz.instantialize (this, arguments); +}, jalview.io.TCoffeeScoreFile, "Block"); +Clazz.makeConstructor (c$, +function (a) { +this.size = a; +this.items = new java.util.HashMap (a); +}, "~N"); +Clazz.defineMethod (c$, "getScoresFor", +function (a) { +return this.items.get (a); +}, "~S"); +Clazz.defineMethod (c$, "getConsensus", +function () { +return this.items.get ("cons"); +}); +c$ = Clazz.p0p (); +c$.SCORES_WITH_RESIDUE_NUMS = c$.prototype.SCORES_WITH_RESIDUE_NUMS = java.util.regex.Pattern.compile ("^\\d+\\s([^\\s]+)\\s+\\d+$"); +c$.colors = c$.prototype.colors = Clazz.newArray (-1, [ new java.awt.Color (102, 102, 255), new java.awt.Color (0, 255, 0), new java.awt.Color (102, 255, 0), new java.awt.Color (204, 255, 0), new java.awt.Color (255, 255, 0), new java.awt.Color (255, 204, 0), new java.awt.Color (255, 153, 0), new java.awt.Color (255, 102, 0), new java.awt.Color (255, 51, 0), new java.awt.Color (255, 34, 0)]); +Clazz.defineStatics (c$, +"TCOFFEE_SCORE", "TCoffeeScore"); +}); diff --git a/bin/jalview/javascript/JSFunctionExec$1.class b/bin/jalview/javascript/JSFunctionExec$1.class index 5466a9b6fe4b4bc74c3002c71e42cf86d0099ae5..1f3947911299b1f0c0a035edaba7de6457bf2fbc 100644 GIT binary patch delta 50 zcmdlhaadx58z$ delta 44 ycmX>su~%Y)8z 0) { -var r = this.jsExecQueue.elementAt (0); -this.jsExecQueue.removeElementAt (0); -try { -r.run (); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, Exception)) { -var ex = e$$; -{ -ex.printStackTrace (); -} -} else if (Clazz.exceptionOf (e$$, Error)) { -var ex = e$$; -{ -ex.printStackTrace (); -} -} else { -throw e$$; -} -} -} else { -try { -{ -this.jsExecQueue.wait (1000); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -;}} -}); -Clazz.defineMethod (c$, "executeJavascriptFunction", -function (_listener, objects) { -this.executeJavascriptFunction (false, _listener, objects); -}, "~S,~A"); -Clazz.defineMethod (c$, "executeJavascriptFunction", -function (async, _listener, $arguments) { -this.executeJavascriptFunction (async, _listener, $arguments, null); -}, "~B,~S,~A"); -Clazz.defineMethod (c$, "executeJavascriptFunction", -function (async, _listener, $arguments, dbgMsg) { -var objects = new Array ($arguments != null ? $arguments.length : 0); -if ($arguments != null) { -System.arraycopy ($arguments, 0, objects, 0, $arguments.length); -}var jsex = new Array (1); -var exec = ((Clazz.isClassDefined ("jalview.javascript.JSFunctionExec$1") ? 0 : jalview.javascript.JSFunctionExec.$JSFunctionExec$1$ ()), Clazz.innerTypeInstance (jalview.javascript.JSFunctionExec$1, this, Clazz.cloneFinals ("dbgMsg", dbgMsg, "_listener", _listener, "objects", objects, "jsex", jsex, "async", async))); -if (async) { -if (this.executor == null) { -this.executor = new Thread ( new jalview.javascript.JSFunctionExec (this.jvlite)); -this.executor.start (); -}{ -this.jsExecQueue.addElement (exec); -this.jsExecQueue.notify (); -}} else { -exec.run (); -if (jsex[0] != null) { -throw (jsex[0]); -}}}, "~B,~S,~A,~S"); -c$.$JSFunctionExec$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.javascript, "JSFunctionExec$1", null, Runnable); -Clazz.defineMethod (c$, "run", -function () { -try { -var scriptObject = null; -try { -scriptObject = netscape.javascript.JSObject.getWindow (this.b$["jalview.javascript.JSFunctionExec"].jvlite); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -;if (scriptObject != null) { -if (jalview.bin.JalviewLite.debug && this.f$.dbgMsg != null) { -System.err.println (this.f$.dbgMsg); -}scriptObject.call (this.f$._listener, this.f$.objects); -}} catch (jex) { -if (Clazz.exceptionOf (jex, Exception)) { -if (!(Clazz.instanceOf (jex, java.net.MalformedURLException))) { -if (jalview.bin.JalviewLite.debug) { -System.err.println (jex); -}if (Clazz.instanceOf (jex, netscape.javascript.JSException) && this.b$["jalview.javascript.JSFunctionExec"].jvlite.jsfallbackEnabled) { -this.f$.jsex[0] = jex; -if (jalview.bin.JalviewLite.debug) { -System.err.println ("Falling back to javascript: url call"); -}var sb = new StringBuffer ("javascript:" + this.f$._listener + "("); -for (var i = 0; this.f$.objects != null && i < this.f$.objects.length; i++) { -if (i > 0) { -sb.append (","); -}sb.append ("\""); -if (this.f$.objects[i] != null && !(this.f$.objects[i].getClass ().getName ().indexOf ("jalview") == 0)) { -sb.append (this.f$.objects[i].toString ()); -}sb.append ("\""); -} -sb.append (")"); -if (jalview.bin.JalviewLite.debug) { -System.err.println (sb.toString ()); -}var url = null; -try { -url = new java.net.URL (sb.toString ()); -this.b$["jalview.javascript.JSFunctionExec"].jvlite.getAppletContext ().showDocument (url); -jex = null; -} catch (uex) { -if (Clazz.exceptionOf (uex, Exception)) { -jex = uex; -} else { -throw uex; -} -} -}if (jex != null) { -if (this.f$.async) { -jex.printStackTrace (); -} else { -this.f$.jsex[0] = jex; -}};}} else { -throw jex; -} -} -}); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.javascript"); +Clazz.load (null, "jalview.javascript.JSFunctionExec", ["jalview.bin.JalviewLite", "java.lang.StringBuffer", "$.Thread", "java.net.MalformedURLException", "$.URL", "netscape.javascript.JSException", "$.JSObject"], function () { +c$ = Clazz.decorateAsClass (function () { +this.jvlite = null; +this.jsExecQueue = null; +this.executor = null; +Clazz.instantialize (this, arguments); +}, jalview.javascript, "JSFunctionExec", null, Runnable); +Clazz.makeConstructor (c$, +function (applet) { +this.jvlite = applet; +this.jsExecQueue = this.jvlite.getJsExecQueue (); +this.jvlite.setExecutor (this); +}, "jalview.bin.JalviewLite"); +Clazz.overrideMethod (c$, "finalize", +function () { +this.jvlite = null; +this.executor = null; +if (this.jsExecQueue != null) { +this.jsExecQueue.clear (); +}this.jsExecQueue = null; +}); +Clazz.defineMethod (c$, "stopQueue", +function () { +if (this.jsExecQueue != null) { +var q = null; +{ +q = this.jsExecQueue; +this.jsExecQueue = null; +}if (q != null) { +for (var jx, $jx = q.iterator (); $jx.hasNext () && ((jx = $jx.next ()) || true);) { +jx.jvlite = null; +} +q.removeAllElements (); +{ +q.notifyAll (); +}}}this.jvlite = null; +this.executor = null; +}); +Clazz.defineMethod (c$, "run", +function () { +while (this.jsExecQueue != null) { +if (this.jsExecQueue.size () > 0) { +var r = this.jsExecQueue.elementAt (0); +this.jsExecQueue.removeElementAt (0); +try { +r.run (); +} catch (e$$) { +if (Clazz.exceptionOf (e$$, Exception)) { +var ex = e$$; +{ +ex.printStackTrace (); +} +} else if (Clazz.exceptionOf (e$$, Error)) { +var ex = e$$; +{ +ex.printStackTrace (); +} +} else { +throw e$$; +} +} +} else { +try { +{ +this.jsExecQueue.wait (1000); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +;}} +}); +Clazz.defineMethod (c$, "executeJavascriptFunction", +function (_listener, objects) { +this.executeJavascriptFunction (false, _listener, objects); +}, "~S,~A"); +Clazz.defineMethod (c$, "executeJavascriptFunction", +function (async, _listener, $arguments) { +this.executeJavascriptFunction (async, _listener, $arguments, null); +}, "~B,~S,~A"); +Clazz.defineMethod (c$, "executeJavascriptFunction", +function (async, _listener, $arguments, dbgMsg) { +var objects = new Array ($arguments != null ? $arguments.length : 0); +if ($arguments != null) { +System.arraycopy ($arguments, 0, objects, 0, $arguments.length); +}var jsex = new Array (1); +var exec = ((Clazz.isClassDefined ("jalview.javascript.JSFunctionExec$1") ? 0 : jalview.javascript.JSFunctionExec.$JSFunctionExec$1$ ()), Clazz.innerTypeInstance (jalview.javascript.JSFunctionExec$1, this, Clazz.cloneFinals ("dbgMsg", dbgMsg, "_listener", _listener, "objects", objects, "jsex", jsex, "async", async))); +if (async) { +if (this.executor == null) { +this.executor = new Thread ( new jalview.javascript.JSFunctionExec (this.jvlite)); +this.executor.start (); +}{ +this.jsExecQueue.addElement (exec); +this.jsExecQueue.notify (); +}} else { +exec.run (); +if (jsex[0] != null) { +throw (jsex[0]); +}}}, "~B,~S,~A,~S"); +c$.$JSFunctionExec$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.javascript, "JSFunctionExec$1", null, Runnable); +Clazz.defineMethod (c$, "run", +function () { +try { +var scriptObject = null; +try { +scriptObject = netscape.javascript.JSObject.getWindow (this.b$["jalview.javascript.JSFunctionExec"].jvlite); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +;if (scriptObject != null) { +if (jalview.bin.JalviewLite.debug && this.f$.dbgMsg != null) { +System.err.println (this.f$.dbgMsg); +}scriptObject.call (this.f$._listener, this.f$.objects); +}} catch (jex) { +if (Clazz.exceptionOf (jex, Exception)) { +if (!(Clazz.instanceOf (jex, java.net.MalformedURLException))) { +if (jalview.bin.JalviewLite.debug) { +System.err.println (jex); +}if (Clazz.instanceOf (jex, netscape.javascript.JSException) && this.b$["jalview.javascript.JSFunctionExec"].jvlite.jsfallbackEnabled) { +this.f$.jsex[0] = jex; +if (jalview.bin.JalviewLite.debug) { +System.err.println ("Falling back to javascript: url call"); +}var sb = new StringBuffer ("javascript:" + this.f$._listener + "("); +for (var i = 0; this.f$.objects != null && i < this.f$.objects.length; i++) { +if (i > 0) { +sb.append (","); +}sb.append ("\""); +if (this.f$.objects[i] != null && !(this.f$.objects[i].getClass ().getName ().indexOf ("jalview") == 0)) { +sb.append (this.f$.objects[i].toString ()); +}sb.append ("\""); +} +sb.append (")"); +if (jalview.bin.JalviewLite.debug) { +System.err.println (sb.toString ()); +}var url = null; +try { +url = new java.net.URL (sb.toString ()); +this.b$["jalview.javascript.JSFunctionExec"].jvlite.getAppletContext ().showDocument (url); +jex = null; +} catch (uex) { +if (Clazz.exceptionOf (uex, Exception)) { +jex = uex; +} else { +throw uex; +} +} +}if (jex != null) { +if (this.f$.async) { +jex.printStackTrace (); +} else { +this.f$.jsex[0] = jex; +}};}} else { +throw jex; +} +} +}); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/javascript/JalviewLiteJsApi.js b/bin/jalview/javascript/JalviewLiteJsApi.js index ed4943e..bdd7529 100644 --- a/bin/jalview/javascript/JalviewLiteJsApi.js +++ b/bin/jalview/javascript/JalviewLiteJsApi.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.javascript"); -Clazz.declareInterface (jalview.javascript, "JalviewLiteJsApi"); +Clazz.declarePackage ("jalview.javascript"); +Clazz.declareInterface (jalview.javascript, "JalviewLiteJsApi"); diff --git a/bin/jalview/javascript/JsCallBack.js b/bin/jalview/javascript/JsCallBack.js index 1577e6b..85ac52a 100644 --- a/bin/jalview/javascript/JsCallBack.js +++ b/bin/jalview/javascript/JsCallBack.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.javascript"); -Clazz.declareInterface (jalview.javascript, "JsCallBack"); +Clazz.declarePackage ("jalview.javascript"); +Clazz.declareInterface (jalview.javascript, "JsCallBack"); diff --git a/bin/jalview/javascript/JsSelectionSender.js b/bin/jalview/javascript/JsSelectionSender.js index ad763f0..36703c5 100644 --- a/bin/jalview/javascript/JsSelectionSender.js +++ b/bin/jalview/javascript/JsSelectionSender.js @@ -1,70 +1,70 @@ -Clazz.declarePackage ("jalview.javascript"); -Clazz.load (["jalview.javascript.JSFunctionExec", "$.JsCallBack", "jalview.structure.SelectionListener"], "jalview.javascript.JsSelectionSender", ["jalview.appletgui.AlignViewport", "netscape.javascript.JSException"], function () { -c$ = Clazz.decorateAsClass (function () { -this._af = null; -this._listener = null; -Clazz.instantialize (this, arguments); -}, jalview.javascript, "JsSelectionSender", jalview.javascript.JSFunctionExec, [jalview.structure.SelectionListener, jalview.javascript.JsCallBack]); -Clazz.makeConstructor (c$, -function (jvlite, af, listener) { -Clazz.superConstructor (this, jalview.javascript.JsSelectionSender, [jvlite]); -this._af = af; -this._listener = listener; -}, "jalview.bin.JalviewLite,jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "selection", -function (seqsel, colsel, source) { -try { -var setid = ""; -var viewid = ""; -var src = this._af; -if (source != null) { -if (Clazz.instanceOf (source, jalview.appletgui.AlignViewport) && (source).applet.currentAlignFrame.viewport === source) { -src = (source).applet.currentAlignFrame; -}}var seqs = Clazz.newArray (-1, []); -var cols = Clazz.newArray (-1, []); -var strt = 0; -var end = (src == null) ? -1 : src.alignPanel.av.getAlignment ().getWidth (); -if (seqsel != null && seqsel.getSize () > 0) { -seqs = new Array (seqsel.getSize ()); -for (var i = 0; i < seqs.length; i++) { -seqs[i] = seqsel.getSequenceAt (i).getName (); -} -if (strt < seqsel.getStartRes ()) { -strt = seqsel.getStartRes (); -}if (end == -1 || end > seqsel.getEndRes ()) { -end = seqsel.getEndRes (); -}}if (colsel != null && colsel.size () > 0) { -if (end == -1) { -end = colsel.getMax () + 1; -}cols = new Array (colsel.getSelected ().size ()); -var d = 0; -var r = -1; -for (var i = 0; i < cols.length; i++) { -cols[i] = "" + (1 + colsel.getSelected ().elementAt (i).intValue ()); -} -} else { -if (seqsel != null && seqsel.getSize () > 0) { -cols = new Array (2); -cols[0] = "" + (1 + strt) + "-" + (1 + end); -};}System.err.println ("Relaying selection to jsfunction:" + this._listener); -this.executeJavascriptFunction (this._listener, Clazz.newArray (-1, [src, setid, this.jvlite.arrayToSeparatorList (seqs), this.jvlite.arrayToSeparatorList (cols)])); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Jalview Javascript exec error: Couldn't send selection message using function '" + this._listener + "'"); -ex.printStackTrace (); -if (Clazz.instanceOf (ex, netscape.javascript.JSException)) { -System.err.println ("Javascript Exception: " + (ex).getCause ().toString ()); -}} else { -throw ex; -} -} -}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); -Clazz.overrideMethod (c$, "getAlignFrame", -function () { -return this._af; -}); -Clazz.overrideMethod (c$, "getListenerFunction", -function () { -return this._listener; -}); -}); +Clazz.declarePackage ("jalview.javascript"); +Clazz.load (["jalview.javascript.JSFunctionExec", "$.JsCallBack", "jalview.structure.SelectionListener"], "jalview.javascript.JsSelectionSender", ["jalview.appletgui.AlignViewport", "netscape.javascript.JSException"], function () { +c$ = Clazz.decorateAsClass (function () { +this._af = null; +this._listener = null; +Clazz.instantialize (this, arguments); +}, jalview.javascript, "JsSelectionSender", jalview.javascript.JSFunctionExec, [jalview.structure.SelectionListener, jalview.javascript.JsCallBack]); +Clazz.makeConstructor (c$, +function (jvlite, af, listener) { +Clazz.superConstructor (this, jalview.javascript.JsSelectionSender, [jvlite]); +this._af = af; +this._listener = listener; +}, "jalview.bin.JalviewLite,jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "selection", +function (seqsel, colsel, source) { +try { +var setid = ""; +var viewid = ""; +var src = this._af; +if (source != null) { +if (Clazz.instanceOf (source, jalview.appletgui.AlignViewport) && (source).applet.currentAlignFrame.viewport === source) { +src = (source).applet.currentAlignFrame; +}}var seqs = Clazz.newArray (-1, []); +var cols = Clazz.newArray (-1, []); +var strt = 0; +var end = (src == null) ? -1 : src.alignPanel.av.getAlignment ().getWidth (); +if (seqsel != null && seqsel.getSize () > 0) { +seqs = new Array (seqsel.getSize ()); +for (var i = 0; i < seqs.length; i++) { +seqs[i] = seqsel.getSequenceAt (i).getName (); +} +if (strt < seqsel.getStartRes ()) { +strt = seqsel.getStartRes (); +}if (end == -1 || end > seqsel.getEndRes ()) { +end = seqsel.getEndRes (); +}}if (colsel != null && colsel.size () > 0) { +if (end == -1) { +end = colsel.getMax () + 1; +}cols = new Array (colsel.getSelected ().size ()); +var d = 0; +var r = -1; +for (var i = 0; i < cols.length; i++) { +cols[i] = "" + (1 + colsel.getSelected ().elementAt (i).intValue ()); +} +} else { +if (seqsel != null && seqsel.getSize () > 0) { +cols = new Array (2); +cols[0] = "" + (1 + strt) + "-" + (1 + end); +};}System.err.println ("Relaying selection to jsfunction:" + this._listener); +this.executeJavascriptFunction (this._listener, Clazz.newArray (-1, [src, setid, this.jvlite.arrayToSeparatorList (seqs), this.jvlite.arrayToSeparatorList (cols)])); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Jalview Javascript exec error: Couldn't send selection message using function '" + this._listener + "'"); +ex.printStackTrace (); +if (Clazz.instanceOf (ex, netscape.javascript.JSException)) { +System.err.println ("Javascript Exception: " + (ex).getCause ().toString ()); +}} else { +throw ex; +} +} +}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); +Clazz.overrideMethod (c$, "getAlignFrame", +function () { +return this._af; +}); +Clazz.overrideMethod (c$, "getListenerFunction", +function () { +return this._listener; +}); +}); diff --git a/bin/jalview/javascript/MouseOverListener.js b/bin/jalview/javascript/MouseOverListener.js index 39cb7bc..de59a3e 100644 --- a/bin/jalview/javascript/MouseOverListener.js +++ b/bin/jalview/javascript/MouseOverListener.js @@ -1,46 +1,46 @@ -Clazz.declarePackage ("jalview.javascript"); -Clazz.load (["jalview.javascript.JSFunctionExec", "$.JsCallBack", "jalview.structure.VamsasListener"], "jalview.javascript.MouseOverListener", ["jalview.appletgui.AlignViewport", "netscape.javascript.JSException"], function () { -c$ = Clazz.decorateAsClass (function () { -this._af = null; -this._listener = null; -this.last = null; -this.i = -1; -Clazz.instantialize (this, arguments); -}, jalview.javascript, "MouseOverListener", jalview.javascript.JSFunctionExec, [jalview.structure.VamsasListener, jalview.javascript.JsCallBack]); -Clazz.overrideMethod (c$, "mouseOverSequence", -function (seq, index, source) { -if (seq !== this.last || this.i != index) { -this.last = seq; -this.i = index; -var src = null; -try { -if (source != null) { -if (Clazz.instanceOf (source, jalview.appletgui.AlignViewport) && (source).applet.currentAlignFrame.viewport === source) { -src = (source).applet.currentAlignFrame; -}}this.executeJavascriptFunction (this._listener, Clazz.newArray (-1, [src, seq.getDisplayId (false), "" + (1 + this.i), "" + seq.findPosition (this.i)])); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("JalviewLite javascript error: Couldn't send mouseOver with handler '" + this._listener + "'"); -if (Clazz.instanceOf (ex, netscape.javascript.JSException)) { -System.err.println ("Javascript Exception: " + (ex).getMessage ()); -}ex.printStackTrace (); -} else { -throw ex; -} -} -}}, "jalview.datamodel.SequenceI,~N,jalview.structure.VamsasSource"); -Clazz.makeConstructor (c$, -function (applet, af, listener) { -Clazz.superConstructor (this, jalview.javascript.MouseOverListener, [applet]); -this._af = af; -this._listener = listener; -}, "jalview.bin.JalviewLite,jalview.appletgui.AlignFrame,~S"); -Clazz.overrideMethod (c$, "getAlignFrame", -function () { -return this._af; -}); -Clazz.overrideMethod (c$, "getListenerFunction", -function () { -return this._listener; -}); -}); +Clazz.declarePackage ("jalview.javascript"); +Clazz.load (["jalview.javascript.JSFunctionExec", "$.JsCallBack", "jalview.structure.VamsasListener"], "jalview.javascript.MouseOverListener", ["jalview.appletgui.AlignViewport", "netscape.javascript.JSException"], function () { +c$ = Clazz.decorateAsClass (function () { +this._af = null; +this._listener = null; +this.last = null; +this.i = -1; +Clazz.instantialize (this, arguments); +}, jalview.javascript, "MouseOverListener", jalview.javascript.JSFunctionExec, [jalview.structure.VamsasListener, jalview.javascript.JsCallBack]); +Clazz.overrideMethod (c$, "mouseOverSequence", +function (seq, index, source) { +if (seq !== this.last || this.i != index) { +this.last = seq; +this.i = index; +var src = null; +try { +if (source != null) { +if (Clazz.instanceOf (source, jalview.appletgui.AlignViewport) && (source).applet.currentAlignFrame.viewport === source) { +src = (source).applet.currentAlignFrame; +}}this.executeJavascriptFunction (this._listener, Clazz.newArray (-1, [src, seq.getDisplayId (false), "" + (1 + this.i), "" + seq.findPosition (this.i)])); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("JalviewLite javascript error: Couldn't send mouseOver with handler '" + this._listener + "'"); +if (Clazz.instanceOf (ex, netscape.javascript.JSException)) { +System.err.println ("Javascript Exception: " + (ex).getMessage ()); +}ex.printStackTrace (); +} else { +throw ex; +} +} +}}, "jalview.datamodel.SequenceI,~N,jalview.structure.VamsasSource"); +Clazz.makeConstructor (c$, +function (applet, af, listener) { +Clazz.superConstructor (this, jalview.javascript.MouseOverListener, [applet]); +this._af = af; +this._listener = listener; +}, "jalview.bin.JalviewLite,jalview.appletgui.AlignFrame,~S"); +Clazz.overrideMethod (c$, "getAlignFrame", +function () { +return this._af; +}); +Clazz.overrideMethod (c$, "getListenerFunction", +function () { +return this._listener; +}); +}); diff --git a/bin/jalview/javascript/MouseOverStructureListener.js b/bin/jalview/javascript/MouseOverStructureListener.js index 12d1e2f..c897252 100644 --- a/bin/jalview/javascript/MouseOverStructureListener.js +++ b/bin/jalview/javascript/MouseOverStructureListener.js @@ -1,143 +1,143 @@ -Clazz.declarePackage ("jalview.javascript"); -Clazz.load (["jalview.javascript.JSFunctionExec", "$.JsCallBack", "jalview.structure.StructureListener"], "jalview.javascript.MouseOverStructureListener", ["jalview.api.AlignmentViewPanel", "jalview.appletgui.FeatureRenderer", "jalview.ext.jmol.JmolCommands", "jalview.structure.StructureSelectionManager", "java.net.URL", "java.util.ArrayList"], function () { -c$ = Clazz.decorateAsClass (function () { -this._listenerfn = null; -this.modelSet = null; -Clazz.instantialize (this, arguments); -}, jalview.javascript, "MouseOverStructureListener", jalview.javascript.JSFunctionExec, [jalview.javascript.JsCallBack, jalview.structure.StructureListener]); -Clazz.makeConstructor (c$, -function (jalviewLite, listener, modelList) { -Clazz.superConstructor (this, jalview.javascript.MouseOverStructureListener, [jalviewLite]); -this._listenerfn = listener; -this.modelSet = modelList; -if (this.modelSet != null) { -for (var i = 0; i < this.modelSet.length; i++) { -try { -if ( new java.net.URL (this.modelSet[i]).openConnection () != null) { -continue; -}} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -} else { -throw x; -} -} -;try { -var db = this.jvlite.getDocumentBase ().toString (); -db = db.substring (0, db.lastIndexOf ("/")); -if ( new java.net.URL (db + "/" + this.modelSet[i]).openConnection () != null) { -this.modelSet[i] = db + "/" + this.modelSet[i]; -continue; -}} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -} else { -throw x; -} -} -;try { -if ( new java.net.URL (this.jvlite.getCodeBase () + this.modelSet[i]).openConnection () != null) { -this.modelSet[i] = this.jvlite.getCodeBase () + this.modelSet[i]; -continue; -}} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -} else { -throw x; -} -} -;} -}}, "jalview.bin.JalviewLite,~S,~A"); -Clazz.overrideMethod (c$, "getPdbFile", -function () { -return this.modelSet; -}); -Clazz.defineMethod (c$, "mouseOverStructure", -function (atomIndex, strInfo) { -}, "~N,~S"); -Clazz.overrideMethod (c$, "highlightAtoms", -function (atoms) { -for (var atom, $atom = atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { -try { -this.executeJavascriptFunction (this._listenerfn, Clazz.newArray (-1, ["mouseover", "" + atom.getPdbFile (), "" + atom.getChain (), "" + (atom.getPdbResNum ()), "" + atom.getAtomIndex ()])); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Couldn't execute callback with " + this._listenerfn + " for atomSpec: " + atom); -ex.printStackTrace (); -} else { -throw ex; -} -} -} -}, "java.util.List"); -Clazz.overrideMethod (c$, "updateColours", -function (srce) { -var source = srce; -var ssm = jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.jvlite); -if (Clazz.instanceOf (source, jalview.api.AlignmentViewPanel)) { -var sequence = new Array (this.modelSet.length); -for (var m = 0; m < this.modelSet.length; m++) { -var sm = ssm.getMapping (this.modelSet[m]); -if (sm != null && sm.length > 0) { -sequence[m] = new Array (sm.length); -for (var i = 0; i < sm.length; i++) { -sequence[m][i] = sm[i].getSequence (); -} -} else { -sequence[m] = new Array (0); -}} -var sr = (source).getSequenceRenderer (); -var fr = (source).av.isShowSequenceFeatures () ? new jalview.appletgui.FeatureRenderer ((source).av) : null; -if (fr != null) { -(fr).transferSettings ((source).getFeatureRenderer ()); -};var ccomands = new java.util.ArrayList (); -var pdbfn = new java.util.ArrayList (); -var colcommands = jalview.ext.jmol.JmolCommands.getColourBySequenceCommand (ssm, this.modelSet, sequence, sr, fr, (source).getAlignment ()); -if (colcommands == null) { -return; -}var sz = 0; -for (var ccset, $ccset = 0, $$ccset = colcommands; $ccset < $$ccset.length && ((ccset = $$ccset[$ccset]) || true); $ccset++) { -sz += ccset.commands.length; -ccomands.add (ccset.commands); -pdbfn.add (ccset.mapping); -} -var mclass; -var mhandle; -var ccomandset = new Array (sz); -sz = 0; -for (var ccset, $ccset = ccomands.iterator (); $ccset.hasNext () && ((ccset = $ccset.next ()) || true);) { -System.arraycopy (ccset, 0, ccomandset, sz, ccset.length); -sz += ccset.length; -} -if (this.jvlite.isJsMessageSetChanged (mclass = "colourstruct", mhandle = (source).av.getViewId (), ccomandset)) { -this.jvlite.setJsMessageSet (mclass, mhandle, ccomandset); -var st = Clazz.newArray (-1, ["colourstruct", "" + (source).av.getViewId (), "" + ccomandset.length, this.jvlite.arrayToSeparatorList (pdbfn.toArray ( new Array (pdbfn.size ())))]); -try { -this.executeJavascriptFunction (true, this._listenerfn, st); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.err.println ("Couldn't execute callback with " + this._listenerfn + " using args { " + st[0] + ", " + st[1] + ", " + st[2] + "," + st[3] + "}"); -ex.printStackTrace (); -} else { -throw ex; -} -} -}}}, "~O"); -Clazz.overrideMethod (c$, "getAlignFrame", -function () { -return null; -}); -Clazz.overrideMethod (c$, "getListenerFunction", -function () { -return this._listenerfn; -}); -Clazz.defineMethod (c$, "finalise", -function () { -this.jvlite = null; -Clazz.superCall (this, jalview.javascript.MouseOverStructureListener, "finalize", []); -}); -Clazz.overrideMethod (c$, "releaseReferences", -function (svl) { -}, "~O"); -Clazz.overrideMethod (c$, "isListeningFor", -function (seq) { -return true; -}, "jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.javascript"); +Clazz.load (["jalview.javascript.JSFunctionExec", "$.JsCallBack", "jalview.structure.StructureListener"], "jalview.javascript.MouseOverStructureListener", ["jalview.api.AlignmentViewPanel", "jalview.appletgui.FeatureRenderer", "jalview.ext.jmol.JmolCommands", "jalview.structure.StructureSelectionManager", "java.net.URL", "java.util.ArrayList"], function () { +c$ = Clazz.decorateAsClass (function () { +this._listenerfn = null; +this.modelSet = null; +Clazz.instantialize (this, arguments); +}, jalview.javascript, "MouseOverStructureListener", jalview.javascript.JSFunctionExec, [jalview.javascript.JsCallBack, jalview.structure.StructureListener]); +Clazz.makeConstructor (c$, +function (jalviewLite, listener, modelList) { +Clazz.superConstructor (this, jalview.javascript.MouseOverStructureListener, [jalviewLite]); +this._listenerfn = listener; +this.modelSet = modelList; +if (this.modelSet != null) { +for (var i = 0; i < this.modelSet.length; i++) { +try { +if ( new java.net.URL (this.modelSet[i]).openConnection () != null) { +continue; +}} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +} else { +throw x; +} +} +;try { +var db = this.jvlite.getDocumentBase ().toString (); +db = db.substring (0, db.lastIndexOf ("/")); +if ( new java.net.URL (db + "/" + this.modelSet[i]).openConnection () != null) { +this.modelSet[i] = db + "/" + this.modelSet[i]; +continue; +}} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +} else { +throw x; +} +} +;try { +if ( new java.net.URL (this.jvlite.getCodeBase () + this.modelSet[i]).openConnection () != null) { +this.modelSet[i] = this.jvlite.getCodeBase () + this.modelSet[i]; +continue; +}} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +} else { +throw x; +} +} +;} +}}, "jalview.bin.JalviewLite,~S,~A"); +Clazz.overrideMethod (c$, "getPdbFile", +function () { +return this.modelSet; +}); +Clazz.defineMethod (c$, "mouseOverStructure", +function (atomIndex, strInfo) { +}, "~N,~S"); +Clazz.overrideMethod (c$, "highlightAtoms", +function (atoms) { +for (var atom, $atom = atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { +try { +this.executeJavascriptFunction (this._listenerfn, Clazz.newArray (-1, ["mouseover", "" + atom.getPdbFile (), "" + atom.getChain (), "" + (atom.getPdbResNum ()), "" + atom.getAtomIndex ()])); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Couldn't execute callback with " + this._listenerfn + " for atomSpec: " + atom); +ex.printStackTrace (); +} else { +throw ex; +} +} +} +}, "java.util.List"); +Clazz.overrideMethod (c$, "updateColours", +function (srce) { +var source = srce; +var ssm = jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.jvlite); +if (Clazz.instanceOf (source, jalview.api.AlignmentViewPanel)) { +var sequence = new Array (this.modelSet.length); +for (var m = 0; m < this.modelSet.length; m++) { +var sm = ssm.getMapping (this.modelSet[m]); +if (sm != null && sm.length > 0) { +sequence[m] = new Array (sm.length); +for (var i = 0; i < sm.length; i++) { +sequence[m][i] = sm[i].getSequence (); +} +} else { +sequence[m] = new Array (0); +}} +var sr = (source).getSequenceRenderer (); +var fr = (source).av.isShowSequenceFeatures () ? new jalview.appletgui.FeatureRenderer ((source).av) : null; +if (fr != null) { +(fr).transferSettings ((source).getFeatureRenderer ()); +};var ccomands = new java.util.ArrayList (); +var pdbfn = new java.util.ArrayList (); +var colcommands = jalview.ext.jmol.JmolCommands.getColourBySequenceCommand (ssm, this.modelSet, sequence, sr, fr, (source).getAlignment ()); +if (colcommands == null) { +return; +}var sz = 0; +for (var ccset, $ccset = 0, $$ccset = colcommands; $ccset < $$ccset.length && ((ccset = $$ccset[$ccset]) || true); $ccset++) { +sz += ccset.commands.length; +ccomands.add (ccset.commands); +pdbfn.add (ccset.mapping); +} +var mclass; +var mhandle; +var ccomandset = new Array (sz); +sz = 0; +for (var ccset, $ccset = ccomands.iterator (); $ccset.hasNext () && ((ccset = $ccset.next ()) || true);) { +System.arraycopy (ccset, 0, ccomandset, sz, ccset.length); +sz += ccset.length; +} +if (this.jvlite.isJsMessageSetChanged (mclass = "colourstruct", mhandle = (source).av.getViewId (), ccomandset)) { +this.jvlite.setJsMessageSet (mclass, mhandle, ccomandset); +var st = Clazz.newArray (-1, ["colourstruct", "" + (source).av.getViewId (), "" + ccomandset.length, this.jvlite.arrayToSeparatorList (pdbfn.toArray ( new Array (pdbfn.size ())))]); +try { +this.executeJavascriptFunction (true, this._listenerfn, st); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.err.println ("Couldn't execute callback with " + this._listenerfn + " using args { " + st[0] + ", " + st[1] + ", " + st[2] + "," + st[3] + "}"); +ex.printStackTrace (); +} else { +throw ex; +} +} +}}}, "~O"); +Clazz.overrideMethod (c$, "getAlignFrame", +function () { +return null; +}); +Clazz.overrideMethod (c$, "getListenerFunction", +function () { +return this._listenerfn; +}); +Clazz.defineMethod (c$, "finalise", +function () { +this.jvlite = null; +Clazz.superCall (this, jalview.javascript.MouseOverStructureListener, "finalize", []); +}); +Clazz.overrideMethod (c$, "releaseReferences", +function (svl) { +}, "~O"); +Clazz.overrideMethod (c$, "isListeningFor", +function (seq) { +return true; +}, "jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/jsdev/Constants.js b/bin/jalview/jsdev/Constants.js index 9963449..64acea4 100644 --- a/bin/jalview/jsdev/Constants.js +++ b/bin/jalview/jsdev/Constants.js @@ -1,13 +1,13 @@ -Clazz.declarePackage ("jalview.jsdev"); -c$ = Clazz.declareType (jalview.jsdev, "Constants"); -Clazz.defineStatics (c$, -"TCOFFEE_SCORE", "TCoffeeScore", -"Phylip_FILE", 1, -"Phylip_FILE_EXT", "phy", -"Phylip_FILE_DESC", "PHYLIP", -"JSON_FILE", 2, -"JSON_FILE_EXT", "json", -"JSON_FILE_DESC", "JSON", -"Html_FILE", 3, -"Html_FILE_EXT", "html", -"Html_FILE_DESC", "HTML"); +Clazz.declarePackage ("jalview.jsdev"); +c$ = Clazz.declareType (jalview.jsdev, "Constants"); +Clazz.defineStatics (c$, +"TCOFFEE_SCORE", "TCoffeeScore", +"Phylip_FILE", 1, +"Phylip_FILE_EXT", "phy", +"Phylip_FILE_DESC", "PHYLIP", +"JSON_FILE", 2, +"JSON_FILE_EXT", "json", +"JSON_FILE_DESC", "JSON", +"Html_FILE", 3, +"Html_FILE_EXT", "html", +"Html_FILE_DESC", "HTML"); diff --git a/bin/jalview/jsdev/GenericFileAdapter.js b/bin/jalview/jsdev/GenericFileAdapter.js index 60cf065..9144c4b 100644 --- a/bin/jalview/jsdev/GenericFileAdapter.js +++ b/bin/jalview/jsdev/GenericFileAdapter.js @@ -1,85 +1,85 @@ -Clazz.declarePackage ("jalview.jsdev"); -Clazz.load (["jalview.io.AlignFile"], "jalview.jsdev.GenericFileAdapter", ["jalview.datamodel.AlignmentI", "jalview.io.FileParse", "java.io.BufferedReader", "$.InputStreamReader", "java.net.URL"], function () { -c$ = Clazz.declareType (jalview.jsdev, "GenericFileAdapter", jalview.io.AlignFile); -c$.getFile = Clazz.defineMethod (c$, "getFile", -function (fileType, params) { -var cl = null; -try { -cl = Class.forName ("jalview.io." + fileType); -} catch (e) { -if (Clazz.exceptionOf (e, ClassNotFoundException)) { -System.err.println ("did not find file jalview.io." + fileType); -return null; -} else { -throw e; -} -} -var m; -var ex = null; -try { -switch (params.length) { -case 0: -return cl.newInstance (); -case 1: -m = (Clazz.instanceOf (params[0], jalview.io.FileParse) ? cl.getConstructor ([jalview.io.FileParse]) : cl.getConstructor ([jalview.datamodel.AlignmentI])); -break; -case 2: -m = cl.getConstructor ([String, String]); -break; -default: -return null; -} -return m.newInstance (params); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, InstantiationException)) { -var e = e$$; -{ -ex = e; -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var e = e$$; -{ -ex = e; -} -} else if (Clazz.exceptionOf (e$$, NoSuchMethodException)) { -var e = e$$; -{ -ex = e; -} -} else if (Clazz.exceptionOf (e$$, SecurityException)) { -var e = e$$; -{ -ex = e; -} -} else if (Clazz.exceptionOf (e$$, IllegalArgumentException)) { -var e = e$$; -{ -ex = e; -} -} else if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { -var e = e$$; -{ -ex = e; -} -} else { -throw e$$; -} -} -if (ex != null) { -System.err.println ("Error in GenericFileAdapter: " + ex); -{ -alert(ex) -}}return null; -}, "~S,~A"); -c$.isJS = Clazz.defineMethod (c$, "isJS", -function () { -{ -return true; -}}); -c$.getReader = Clazz.defineMethod (c$, "getReader", -function (fileName, forceURL) { -if (!forceURL && !jalview.jsdev.GenericFileAdapter.isJS ()) return new java.io.BufferedReader ( new java.io.FileReader (fileName)); -if (fileName.indexOf ("//") < 0) fileName = "file://" + fileName; -return new java.io.BufferedReader ( new java.io.InputStreamReader ( new java.net.URL (fileName).openStream ())); -}, "~S,~B"); -}); +Clazz.declarePackage ("jalview.jsdev"); +Clazz.load (["jalview.io.AlignFile"], "jalview.jsdev.GenericFileAdapter", ["jalview.datamodel.AlignmentI", "jalview.io.FileParse", "java.io.BufferedReader", "$.InputStreamReader", "java.net.URL"], function () { +c$ = Clazz.declareType (jalview.jsdev, "GenericFileAdapter", jalview.io.AlignFile); +c$.getFile = Clazz.defineMethod (c$, "getFile", +function (fileType, params) { +var cl = null; +try { +cl = Class.forName ("jalview.io." + fileType); +} catch (e) { +if (Clazz.exceptionOf (e, ClassNotFoundException)) { +System.err.println ("did not find file jalview.io." + fileType); +return null; +} else { +throw e; +} +} +var m; +var ex = null; +try { +switch (params.length) { +case 0: +return cl.newInstance (); +case 1: +m = (Clazz.instanceOf (params[0], jalview.io.FileParse) ? cl.getConstructor ([jalview.io.FileParse]) : cl.getConstructor ([jalview.datamodel.AlignmentI])); +break; +case 2: +m = cl.getConstructor ([String, String]); +break; +default: +return null; +} +return m.newInstance (params); +} catch (e$$) { +if (Clazz.exceptionOf (e$$, InstantiationException)) { +var e = e$$; +{ +ex = e; +} +} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { +var e = e$$; +{ +ex = e; +} +} else if (Clazz.exceptionOf (e$$, NoSuchMethodException)) { +var e = e$$; +{ +ex = e; +} +} else if (Clazz.exceptionOf (e$$, SecurityException)) { +var e = e$$; +{ +ex = e; +} +} else if (Clazz.exceptionOf (e$$, IllegalArgumentException)) { +var e = e$$; +{ +ex = e; +} +} else if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { +var e = e$$; +{ +ex = e; +} +} else { +throw e$$; +} +} +if (ex != null) { +System.err.println ("Error in GenericFileAdapter: " + ex); +{ +alert(ex) +}}return null; +}, "~S,~A"); +c$.isJS = Clazz.defineMethod (c$, "isJS", +function () { +{ +return true; +}}); +c$.getReader = Clazz.defineMethod (c$, "getReader", +function (fileName, forceURL) { +if (!forceURL && !jalview.jsdev.GenericFileAdapter.isJS ()) return new java.io.BufferedReader ( new java.io.FileReader (fileName)); +if (fileName.indexOf ("//") < 0) fileName = "file://" + fileName; +return new java.io.BufferedReader ( new java.io.InputStreamReader ( new java.net.URL (fileName).openStream ())); +}, "~S,~B"); +}); diff --git a/bin/jalview/jsdev/JSRegex.js b/bin/jalview/jsdev/JSRegex.js index 4dcc13e..08e9c64 100644 --- a/bin/jalview/jsdev/JSRegex.js +++ b/bin/jalview/jsdev/JSRegex.js @@ -1,55 +1,55 @@ -Clazz.declarePackage ("jalview.jsdev"); -Clazz.load (["jalview.jsdev.api.RegExpInterface"], "jalview.jsdev.JSRegex", null, function () { -c$ = Clazz.declareType (jalview.jsdev, "JSRegex", null, jalview.jsdev.api.RegExpInterface); -Clazz.overrideMethod (c$, "charsMatched", -function () { -return 0; -}); -Clazz.overrideMethod (c$, "left", -function () { -return null; -}); -Clazz.overrideMethod (c$, "matchedFrom", -function () { -return 0; -}); -Clazz.overrideMethod (c$, "matchedFromI", -function (pos) { -return 0; -}, "~N"); -Clazz.overrideMethod (c$, "matchedTo", -function () { -return 0; -}); -Clazz.overrideMethod (c$, "matchedToI", -function (pos) { -return 0; -}, "~N"); -Clazz.overrideMethod (c$, "numSubs", -function () { -return 0; -}); -Clazz.overrideMethod (c$, "replaceAll", -function (string) { -return null; -}, "~S"); -Clazz.overrideMethod (c$, "search", -function (str) { -return false; -}, "~S"); -Clazz.overrideMethod (c$, "searchFrom", -function (string, rematchat) { -return false; -}, "~S,~N"); -Clazz.overrideMethod (c$, "setIgnoreCase", -function (b) { -}, "~B"); -Clazz.overrideMethod (c$, "stringMatched", -function () { -return null; -}); -Clazz.overrideMethod (c$, "stringMatchedI", -function (i) { -return null; -}, "~N"); -}); +Clazz.declarePackage ("jalview.jsdev"); +Clazz.load (["jalview.jsdev.api.RegExpInterface"], "jalview.jsdev.JSRegex", null, function () { +c$ = Clazz.declareType (jalview.jsdev, "JSRegex", null, jalview.jsdev.api.RegExpInterface); +Clazz.overrideMethod (c$, "charsMatched", +function () { +return 0; +}); +Clazz.overrideMethod (c$, "left", +function () { +return null; +}); +Clazz.overrideMethod (c$, "matchedFrom", +function () { +return 0; +}); +Clazz.overrideMethod (c$, "matchedFromI", +function (pos) { +return 0; +}, "~N"); +Clazz.overrideMethod (c$, "matchedTo", +function () { +return 0; +}); +Clazz.overrideMethod (c$, "matchedToI", +function (pos) { +return 0; +}, "~N"); +Clazz.overrideMethod (c$, "numSubs", +function () { +return 0; +}); +Clazz.overrideMethod (c$, "replaceAll", +function (string) { +return null; +}, "~S"); +Clazz.overrideMethod (c$, "search", +function (str) { +return false; +}, "~S"); +Clazz.overrideMethod (c$, "searchFrom", +function (string, rematchat) { +return false; +}, "~S,~N"); +Clazz.overrideMethod (c$, "setIgnoreCase", +function (b) { +}, "~B"); +Clazz.overrideMethod (c$, "stringMatched", +function () { +return null; +}); +Clazz.overrideMethod (c$, "stringMatchedI", +function (i) { +return null; +}, "~N"); +}); diff --git a/bin/jalview/jsdev/JavaScriptRegExp.js b/bin/jalview/jsdev/JavaScriptRegExp.js index 735a4b6..5d67e59 100644 --- a/bin/jalview/jsdev/JavaScriptRegExp.js +++ b/bin/jalview/jsdev/JavaScriptRegExp.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.jsdev"); -Clazz.declareInterface (jalview.jsdev, "JavaScriptRegExp"); +Clazz.declarePackage ("jalview.jsdev"); +Clazz.declareInterface (jalview.jsdev, "JavaScriptRegExp"); diff --git a/bin/jalview/jsdev/RegExp.js b/bin/jalview/jsdev/RegExp.js index ffb883f..8b2e026 100644 --- a/bin/jalview/jsdev/RegExp.js +++ b/bin/jalview/jsdev/RegExp.js @@ -1,15 +1,15 @@ -Clazz.declarePackage ("jalview.jsdev"); -Clazz.load (null, "jalview.jsdev.RegExp", ["com.stevesoft.pat.Regex"], function () { -c$ = Clazz.decorateAsClass (function () { -this.rg = null; -Clazz.instantialize (this, arguments); -}, jalview.jsdev, "RegExp"); -c$.newRegex = Clazz.defineMethod (c$, "newRegex", -function (params) { -return new com.stevesoft.pat.Regex (params.length < 1 ? null : params[0], params.length < 2 ? "" : params[1]); -}, "~A"); -c$.perlCode = Clazz.defineMethod (c$, "perlCode", -function (s) { -return com.stevesoft.pat.Regex.perlCode (s); -}, "~S"); -}); +Clazz.declarePackage ("jalview.jsdev"); +Clazz.load (null, "jalview.jsdev.RegExp", ["com.stevesoft.pat.Regex"], function () { +c$ = Clazz.decorateAsClass (function () { +this.rg = null; +Clazz.instantialize (this, arguments); +}, jalview.jsdev, "RegExp"); +c$.newRegex = Clazz.defineMethod (c$, "newRegex", +function (params) { +return new com.stevesoft.pat.Regex (params.length < 1 ? null : params[0], params.length < 2 ? "" : params[1]); +}, "~A"); +c$.perlCode = Clazz.defineMethod (c$, "perlCode", +function (s) { +return com.stevesoft.pat.Regex.perlCode (s); +}, "~S"); +}); diff --git a/bin/jalview/jsdev/api/RegExpInterface.js b/bin/jalview/jsdev/api/RegExpInterface.js index 5dfe0cd..48bb568 100644 --- a/bin/jalview/jsdev/api/RegExpInterface.js +++ b/bin/jalview/jsdev/api/RegExpInterface.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.jsdev.api"); -Clazz.declareInterface (jalview.jsdev.api, "RegExpInterface"); +Clazz.declarePackage ("jalview.jsdev.api"); +Clazz.declareInterface (jalview.jsdev.api, "RegExpInterface"); diff --git a/bin/jalview/jsdev/api/VarnaRNA.js b/bin/jalview/jsdev/api/VarnaRNA.js index c2ec8a3..1fa65f5 100644 --- a/bin/jalview/jsdev/api/VarnaRNA.js +++ b/bin/jalview/jsdev/api/VarnaRNA.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.jsdev.api"); -Clazz.declareInterface (jalview.jsdev.api, "VarnaRNA"); +Clazz.declarePackage ("jalview.jsdev.api"); +Clazz.declareInterface (jalview.jsdev.api, "VarnaRNA"); diff --git a/bin/jalview/math/AlignmentDimension.js b/bin/jalview/math/AlignmentDimension.js index 178fe61..2a23983 100644 --- a/bin/jalview/math/AlignmentDimension.js +++ b/bin/jalview/math/AlignmentDimension.js @@ -1,27 +1,27 @@ -Clazz.declarePackage ("jalview.math"); -c$ = Clazz.decorateAsClass (function () { -this.width = 0; -this.height = 0; -Clazz.instantialize (this, arguments); -}, jalview.math, "AlignmentDimension"); -Clazz.makeConstructor (c$, -function (width, height) { -this.width = width; -this.height = height; -}, "~N,~N"); -Clazz.defineMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz.defineMethod (c$, "setWidth", -function (width) { -this.width = width; -}, "~N"); -Clazz.defineMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz.defineMethod (c$, "setHeight", -function (height) { -this.height = height; -}, "~N"); +Clazz.declarePackage ("jalview.math"); +c$ = Clazz.decorateAsClass (function () { +this.width = 0; +this.height = 0; +Clazz.instantialize (this, arguments); +}, jalview.math, "AlignmentDimension"); +Clazz.makeConstructor (c$, +function (width, height) { +this.width = width; +this.height = height; +}, "~N,~N"); +Clazz.defineMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz.defineMethod (c$, "setWidth", +function (width) { +this.width = width; +}, "~N"); +Clazz.defineMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz.defineMethod (c$, "setHeight", +function (height) { +this.height = height; +}, "~N"); diff --git a/bin/jalview/math/Matrix.class b/bin/jalview/math/Matrix.class index ff18c2869d552485e412f62eab6cc5c7309916b1..3bb0722b6a7b3666772cc00abe27bc5b73731d5c 100644 GIT binary patch delta 51 zcmdn&)9bS#iH9+Mb23jLD>E;H!sP9OEsPwS{e>2@GCtV+S^N?USoDMpNHjtAG6w*v CyAW0Y delta 89 zcmeD6+3d3+iHEUhb23jLE3*QF;^gguEh4N8TtK)}Gr%)kId{~4Gz+XyXYW&FJP Tf%qjBu)?h}I22mRUgiJ*jd>EE diff --git a/bin/jalview/math/Matrix.js b/bin/jalview/math/Matrix.js index e260277..22cb59d 100644 --- a/bin/jalview/math/Matrix.js +++ b/bin/jalview/math/Matrix.js @@ -1,423 +1,423 @@ -Clazz.declarePackage ("jalview.math"); -Clazz.load (null, "jalview.math.Matrix", ["jalview.util.Format", "$.MessageManager", "java.lang.Exception"], function () { -c$ = Clazz.decorateAsClass (function () { -this.value = null; -this.rows = 0; -this.cols = 0; -this.d = null; -this.e = null; -this.maxIter = 45; -Clazz.instantialize (this, arguments); -}, jalview.math, "Matrix"); -Clazz.makeConstructor (c$, -function (value, rows, cols) { -this.rows = rows; -this.cols = cols; -this.value = value; -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "transpose", -function () { -var out = Clazz.newDoubleArray (this.cols, this.rows, 0); -for (var i = 0; i < this.cols; i++) { -for (var j = 0; j < this.rows; j++) { -out[i][j] = this.value[j][i]; -} -} -return new jalview.math.Matrix (out, this.cols, this.rows); -}); -Clazz.defineMethod (c$, "print", -function (ps) { -for (var i = 0; i < this.rows; i++) { -for (var j = 0; j < this.cols; j++) { -jalview.util.Format.printDouble (ps, "%8.2f", this.value[i][j]); -} -ps.println (); -} -}, "java.io.PrintStream"); -Clazz.defineMethod (c$, "preMultiply", -function ($in) { -var tmp = Clazz.newDoubleArray ($in.rows, this.cols, 0); -for (var i = 0; i < $in.rows; i++) { -for (var j = 0; j < this.cols; j++) { -tmp[i][j] = 0.0; -for (var k = 0; k < $in.cols; k++) { -tmp[i][j] += ($in.value[i][k] * this.value[k][j]); -} -} -} -return new jalview.math.Matrix (tmp, $in.rows, this.cols); -}, "jalview.math.Matrix"); -Clazz.defineMethod (c$, "vectorPostMultiply", -function ($in) { -var out = Clazz.newDoubleArray ($in.length, 0); -for (var i = 0; i < $in.length; i++) { -out[i] = 0.0; -for (var k = 0; k < $in.length; k++) { -out[i] += (this.value[i][k] * $in[k]); -} -} -return out; -}, "~A"); -Clazz.defineMethod (c$, "postMultiply", -function ($in) { -var out = Clazz.newDoubleArray (this.rows, $in.cols, 0); -for (var i = 0; i < this.rows; i++) { -for (var j = 0; j < $in.cols; j++) { -out[i][j] = 0.0; -for (var k = 0; k < this.rows; k++) { -out[i][j] = out[i][j] + (this.value[i][k] * $in.value[k][j]); -} -} -} -return new jalview.math.Matrix (out, this.cols, $in.rows); -}, "jalview.math.Matrix"); -Clazz.defineMethod (c$, "copy", -function () { -var newmat = Clazz.newDoubleArray (this.rows, this.cols, 0); -for (var i = 0; i < this.rows; i++) { -for (var j = 0; j < this.cols; j++) { -newmat[i][j] = this.value[i][j]; -} -} -return new jalview.math.Matrix (newmat, this.rows, this.cols); -}); -Clazz.defineMethod (c$, "tred", -function () { -var n = this.rows; -var l; -var k; -var j; -var i; -var scale; -var hh; -var h; -var g; -var f; -this.d = Clazz.newDoubleArray (this.rows, 0); -this.e = Clazz.newDoubleArray (this.rows, 0); -for (i = n; i >= 2; i--) { -l = i - 1; -h = 0.0; -scale = 0.0; -if (l > 1) { -for (k = 1; k <= l; k++) { -scale += Math.abs (this.value[i - 1][k - 1]); -} -if (scale == 0.0) { -this.e[i - 1] = this.value[i - 1][l - 1]; -} else { -for (k = 1; k <= l; k++) { -this.value[i - 1][k - 1] /= scale; -h += (this.value[i - 1][k - 1] * this.value[i - 1][k - 1]); -} -f = this.value[i - 1][l - 1]; -if (f > 0) { -g = -1.0 * Math.sqrt (h); -} else { -g = Math.sqrt (h); -}this.e[i - 1] = scale * g; -h -= (f * g); -this.value[i - 1][l - 1] = f - g; -f = 0.0; -for (j = 1; j <= l; j++) { -this.value[j - 1][i - 1] = this.value[i - 1][j - 1] / h; -g = 0.0; -for (k = 1; k <= j; k++) { -g += (this.value[j - 1][k - 1] * this.value[i - 1][k - 1]); -} -for (k = j + 1; k <= l; k++) { -g += (this.value[k - 1][j - 1] * this.value[i - 1][k - 1]); -} -this.e[j - 1] = g / h; -f += (this.e[j - 1] * this.value[i - 1][j - 1]); -} -hh = f / (h + h); -for (j = 1; j <= l; j++) { -f = this.value[i - 1][j - 1]; -g = this.e[j - 1] - (hh * f); -this.e[j - 1] = g; -for (k = 1; k <= j; k++) { -this.value[j - 1][k - 1] -= ((f * this.e[k - 1]) + (g * this.value[i - 1][k - 1])); -} -} -}} else { -this.e[i - 1] = this.value[i - 1][l - 1]; -}this.d[i - 1] = h; -} -this.d[0] = 0.0; -this.e[0] = 0.0; -for (i = 1; i <= n; i++) { -l = i - 1; -if (this.d[i - 1] != 0.0) { -for (j = 1; j <= l; j++) { -g = 0.0; -for (k = 1; k <= l; k++) { -g += (this.value[i - 1][k - 1] * this.value[k - 1][j - 1]); -} -for (k = 1; k <= l; k++) { -this.value[k - 1][j - 1] -= (g * this.value[k - 1][i - 1]); -} -} -}this.d[i - 1] = this.value[i - 1][i - 1]; -this.value[i - 1][i - 1] = 1.0; -for (j = 1; j <= l; j++) { -this.value[j - 1][i - 1] = 0.0; -this.value[i - 1][j - 1] = 0.0; -} -} -}); -Clazz.defineMethod (c$, "tqli", -function () { -var n = this.rows; -var m; -var l; -var iter; -var i; -var k; -var s; -var r; -var p; -;var g; -var f; -var dd; -var c; -var b; -for (i = 2; i <= n; i++) { -this.e[i - 2] = this.e[i - 1]; -} -this.e[n - 1] = 0.0; -for (l = 1; l <= n; l++) { -iter = 0; -do { -for (m = l; m <= (n - 1); m++) { -dd = Math.abs (this.d[m - 1]) + Math.abs (this.d[m]); -if ((Math.abs (this.e[m - 1]) + dd) == dd) { -break; -}} -if (m != l) { -iter++; -if (iter == this.maxIter) { -throw new Exception (jalview.util.MessageManager.formatMessage ("exception.matrix_too_many_iteration", Clazz.newArray (-1, ["tqli", Integer.$valueOf (this.maxIter).toString ()]))); -} else { -}g = (this.d[l] - this.d[l - 1]) / (2.0 * this.e[l - 1]); -r = Math.sqrt ((g * g) + 1.0); -g = this.d[m - 1] - this.d[l - 1] + (this.e[l - 1] / (g + this.sign (r, g))); -c = 1.0; -s = c; -p = 0.0; -for (i = m - 1; i >= l; i--) { -f = s * this.e[i - 1]; -b = c * this.e[i - 1]; -if (Math.abs (f) >= Math.abs (g)) { -c = g / f; -r = Math.sqrt ((c * c) + 1.0); -this.e[i] = f * r; -s = 1.0 / r; -c *= s; -} else { -s = f / g; -r = Math.sqrt ((s * s) + 1.0); -this.e[i] = g * r; -c = 1.0 / r; -s *= c; -}g = this.d[i] - p; -r = ((this.d[i - 1] - g) * s) + (2.0 * c * b); -p = s * r; -this.d[i] = g + p; -g = (c * r) - b; -for (k = 1; k <= n; k++) { -f = this.value[k - 1][i]; -this.value[k - 1][i] = (s * this.value[k - 1][i - 1]) + (c * f); -this.value[k - 1][i - 1] = (c * this.value[k - 1][i - 1]) - (s * f); -} -} -this.d[l - 1] = this.d[l - 1] - p; -this.e[l - 1] = g; -this.e[m - 1] = 0.0; -}} while (m != l); -} -}); -Clazz.defineMethod (c$, "tred2", -function () { -var n = this.rows; -var l; -var k; -var j; -var i; -var scale; -var hh; -var h; -var g; -var f; -this.d = Clazz.newDoubleArray (this.rows, 0); -this.e = Clazz.newDoubleArray (this.rows, 0); -for (i = n - 1; i >= 1; i--) { -l = i - 1; -h = 0.0; -scale = 0.0; -if (l > 0) { -for (k = 0; k < l; k++) { -scale += Math.abs (this.value[i][k]); -} -if (scale == 0.0) { -this.e[i] = this.value[i][l]; -} else { -for (k = 0; k < l; k++) { -this.value[i][k] /= scale; -h += (this.value[i][k] * this.value[i][k]); -} -f = this.value[i][l]; -if (f > 0) { -g = -1.0 * Math.sqrt (h); -} else { -g = Math.sqrt (h); -}this.e[i] = scale * g; -h -= (f * g); -this.value[i][l] = f - g; -f = 0.0; -for (j = 0; j < l; j++) { -this.value[j][i] = this.value[i][j] / h; -g = 0.0; -for (k = 0; k < j; k++) { -g += (this.value[j][k] * this.value[i][k]); -} -for (k = j; k < l; k++) { -g += (this.value[k][j] * this.value[i][k]); -} -this.e[j] = g / h; -f += (this.e[j] * this.value[i][j]); -} -hh = f / (h + h); -for (j = 0; j < l; j++) { -f = this.value[i][j]; -g = this.e[j] - (hh * f); -this.e[j] = g; -for (k = 0; k < j; k++) { -this.value[j][k] -= ((f * this.e[k]) + (g * this.value[i][k])); -} -} -}} else { -this.e[i] = this.value[i][l]; -}this.d[i] = h; -} -this.d[0] = 0.0; -this.e[0] = 0.0; -for (i = 0; i < n; i++) { -l = i - 1; -if (this.d[i] != 0.0) { -for (j = 0; j < l; j++) { -g = 0.0; -for (k = 0; k < l; k++) { -g += (this.value[i][k] * this.value[k][j]); -} -for (k = 0; k < l; k++) { -this.value[k][j] -= (g * this.value[k][i]); -} -} -}this.d[i] = this.value[i][i]; -this.value[i][i] = 1.0; -for (j = 0; j < l; j++) { -this.value[j][i] = 0.0; -this.value[i][j] = 0.0; -} -} -}); -Clazz.defineMethod (c$, "tqli2", -function () { -var n = this.rows; -var m; -var l; -var iter; -var i; -var k; -var s; -var r; -var p; -;var g; -var f; -var dd; -var c; -var b; -for (i = 2; i <= n; i++) { -this.e[i - 2] = this.e[i - 1]; -} -this.e[n - 1] = 0.0; -for (l = 1; l <= n; l++) { -iter = 0; -do { -for (m = l; m <= (n - 1); m++) { -dd = Math.abs (this.d[m - 1]) + Math.abs (this.d[m]); -if ((Math.abs (this.e[m - 1]) + dd) == dd) { -break; -}} -if (m != l) { -iter++; -if (iter == this.maxIter) { -throw new Exception (jalview.util.MessageManager.formatMessage ("exception.matrix_too_many_iteration", Clazz.newArray (-1, ["tqli2", Integer.$valueOf (this.maxIter).toString ()]))); -} else { -}g = (this.d[l] - this.d[l - 1]) / (2.0 * this.e[l - 1]); -r = Math.sqrt ((g * g) + 1.0); -g = this.d[m - 1] - this.d[l - 1] + (this.e[l - 1] / (g + this.sign (r, g))); -c = 1.0; -s = c; -p = 0.0; -for (i = m - 1; i >= l; i--) { -f = s * this.e[i - 1]; -b = c * this.e[i - 1]; -if (Math.abs (f) >= Math.abs (g)) { -c = g / f; -r = Math.sqrt ((c * c) + 1.0); -this.e[i] = f * r; -s = 1.0 / r; -c *= s; -} else { -s = f / g; -r = Math.sqrt ((s * s) + 1.0); -this.e[i] = g * r; -c = 1.0 / r; -s *= c; -}g = this.d[i] - p; -r = ((this.d[i - 1] - g) * s) + (2.0 * c * b); -p = s * r; -this.d[i] = g + p; -g = (c * r) - b; -for (k = 1; k <= n; k++) { -f = this.value[k - 1][i]; -this.value[k - 1][i] = (s * this.value[k - 1][i - 1]) + (c * f); -this.value[k - 1][i - 1] = (c * this.value[k - 1][i - 1]) - (s * f); -} -} -this.d[l - 1] = this.d[l - 1] - p; -this.e[l - 1] = g; -this.e[m - 1] = 0.0; -}} while (m != l); -} -}); -Clazz.defineMethod (c$, "sign", -function (a, b) { -if (b < 0) { -return -Math.abs (a); -} else { -return Math.abs (a); -}}, "~N,~N"); -Clazz.defineMethod (c$, "getColumn", -function (n) { -var out = Clazz.newDoubleArray (this.rows, 0); -for (var i = 0; i < this.rows; i++) { -out[i] = this.value[i][n]; -} -return out; -}, "~N"); -Clazz.defineMethod (c$, "printD", -function (ps) { -for (var j = 0; j < this.rows; j++) { -jalview.util.Format.printDouble (ps, "%15.4e", this.d[j]); -} -}, "java.io.PrintStream"); -Clazz.defineMethod (c$, "printE", -function (ps) { -for (var j = 0; j < this.rows; j++) { -jalview.util.Format.printDouble (ps, "%15.4e", this.e[j]); -} -}, "java.io.PrintStream"); -}); +Clazz.declarePackage ("jalview.math"); +Clazz.load (null, "jalview.math.Matrix", ["jalview.util.Format", "$.MessageManager", "java.lang.Exception"], function () { +c$ = Clazz.decorateAsClass (function () { +this.value = null; +this.rows = 0; +this.cols = 0; +this.d = null; +this.e = null; +this.maxIter = 45; +Clazz.instantialize (this, arguments); +}, jalview.math, "Matrix"); +Clazz.makeConstructor (c$, +function (value, rows, cols) { +this.rows = rows; +this.cols = cols; +this.value = value; +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "transpose", +function () { +var out = Clazz.newDoubleArray (this.cols, this.rows, 0); +for (var i = 0; i < this.cols; i++) { +for (var j = 0; j < this.rows; j++) { +out[i][j] = this.value[j][i]; +} +} +return new jalview.math.Matrix (out, this.cols, this.rows); +}); +Clazz.defineMethod (c$, "print", +function (ps) { +for (var i = 0; i < this.rows; i++) { +for (var j = 0; j < this.cols; j++) { +jalview.util.Format.printDouble (ps, "%8.2f", this.value[i][j]); +} +ps.println (); +} +}, "java.io.PrintStream"); +Clazz.defineMethod (c$, "preMultiply", +function ($in) { +var tmp = Clazz.newDoubleArray ($in.rows, this.cols, 0); +for (var i = 0; i < $in.rows; i++) { +for (var j = 0; j < this.cols; j++) { +tmp[i][j] = 0.0; +for (var k = 0; k < $in.cols; k++) { +tmp[i][j] += ($in.value[i][k] * this.value[k][j]); +} +} +} +return new jalview.math.Matrix (tmp, $in.rows, this.cols); +}, "jalview.math.Matrix"); +Clazz.defineMethod (c$, "vectorPostMultiply", +function ($in) { +var out = Clazz.newDoubleArray ($in.length, 0); +for (var i = 0; i < $in.length; i++) { +out[i] = 0.0; +for (var k = 0; k < $in.length; k++) { +out[i] += (this.value[i][k] * $in[k]); +} +} +return out; +}, "~A"); +Clazz.defineMethod (c$, "postMultiply", +function ($in) { +var out = Clazz.newDoubleArray (this.rows, $in.cols, 0); +for (var i = 0; i < this.rows; i++) { +for (var j = 0; j < $in.cols; j++) { +out[i][j] = 0.0; +for (var k = 0; k < this.rows; k++) { +out[i][j] = out[i][j] + (this.value[i][k] * $in.value[k][j]); +} +} +} +return new jalview.math.Matrix (out, this.cols, $in.rows); +}, "jalview.math.Matrix"); +Clazz.defineMethod (c$, "copy", +function () { +var newmat = Clazz.newDoubleArray (this.rows, this.cols, 0); +for (var i = 0; i < this.rows; i++) { +for (var j = 0; j < this.cols; j++) { +newmat[i][j] = this.value[i][j]; +} +} +return new jalview.math.Matrix (newmat, this.rows, this.cols); +}); +Clazz.defineMethod (c$, "tred", +function () { +var n = this.rows; +var l; +var k; +var j; +var i; +var scale; +var hh; +var h; +var g; +var f; +this.d = Clazz.newDoubleArray (this.rows, 0); +this.e = Clazz.newDoubleArray (this.rows, 0); +for (i = n; i >= 2; i--) { +l = i - 1; +h = 0.0; +scale = 0.0; +if (l > 1) { +for (k = 1; k <= l; k++) { +scale += Math.abs (this.value[i - 1][k - 1]); +} +if (scale == 0.0) { +this.e[i - 1] = this.value[i - 1][l - 1]; +} else { +for (k = 1; k <= l; k++) { +this.value[i - 1][k - 1] /= scale; +h += (this.value[i - 1][k - 1] * this.value[i - 1][k - 1]); +} +f = this.value[i - 1][l - 1]; +if (f > 0) { +g = -1.0 * Math.sqrt (h); +} else { +g = Math.sqrt (h); +}this.e[i - 1] = scale * g; +h -= (f * g); +this.value[i - 1][l - 1] = f - g; +f = 0.0; +for (j = 1; j <= l; j++) { +this.value[j - 1][i - 1] = this.value[i - 1][j - 1] / h; +g = 0.0; +for (k = 1; k <= j; k++) { +g += (this.value[j - 1][k - 1] * this.value[i - 1][k - 1]); +} +for (k = j + 1; k <= l; k++) { +g += (this.value[k - 1][j - 1] * this.value[i - 1][k - 1]); +} +this.e[j - 1] = g / h; +f += (this.e[j - 1] * this.value[i - 1][j - 1]); +} +hh = f / (h + h); +for (j = 1; j <= l; j++) { +f = this.value[i - 1][j - 1]; +g = this.e[j - 1] - (hh * f); +this.e[j - 1] = g; +for (k = 1; k <= j; k++) { +this.value[j - 1][k - 1] -= ((f * this.e[k - 1]) + (g * this.value[i - 1][k - 1])); +} +} +}} else { +this.e[i - 1] = this.value[i - 1][l - 1]; +}this.d[i - 1] = h; +} +this.d[0] = 0.0; +this.e[0] = 0.0; +for (i = 1; i <= n; i++) { +l = i - 1; +if (this.d[i - 1] != 0.0) { +for (j = 1; j <= l; j++) { +g = 0.0; +for (k = 1; k <= l; k++) { +g += (this.value[i - 1][k - 1] * this.value[k - 1][j - 1]); +} +for (k = 1; k <= l; k++) { +this.value[k - 1][j - 1] -= (g * this.value[k - 1][i - 1]); +} +} +}this.d[i - 1] = this.value[i - 1][i - 1]; +this.value[i - 1][i - 1] = 1.0; +for (j = 1; j <= l; j++) { +this.value[j - 1][i - 1] = 0.0; +this.value[i - 1][j - 1] = 0.0; +} +} +}); +Clazz.defineMethod (c$, "tqli", +function () { +var n = this.rows; +var m; +var l; +var iter; +var i; +var k; +var s; +var r; +var p; +;var g; +var f; +var dd; +var c; +var b; +for (i = 2; i <= n; i++) { +this.e[i - 2] = this.e[i - 1]; +} +this.e[n - 1] = 0.0; +for (l = 1; l <= n; l++) { +iter = 0; +do { +for (m = l; m <= (n - 1); m++) { +dd = Math.abs (this.d[m - 1]) + Math.abs (this.d[m]); +if ((Math.abs (this.e[m - 1]) + dd) == dd) { +break; +}} +if (m != l) { +iter++; +if (iter == this.maxIter) { +throw new Exception (jalview.util.MessageManager.formatMessage ("exception.matrix_too_many_iteration", Clazz.newArray (-1, ["tqli", Integer.$valueOf (this.maxIter).toString ()]))); +} else { +}g = (this.d[l] - this.d[l - 1]) / (2.0 * this.e[l - 1]); +r = Math.sqrt ((g * g) + 1.0); +g = this.d[m - 1] - this.d[l - 1] + (this.e[l - 1] / (g + this.sign (r, g))); +c = 1.0; +s = c; +p = 0.0; +for (i = m - 1; i >= l; i--) { +f = s * this.e[i - 1]; +b = c * this.e[i - 1]; +if (Math.abs (f) >= Math.abs (g)) { +c = g / f; +r = Math.sqrt ((c * c) + 1.0); +this.e[i] = f * r; +s = 1.0 / r; +c *= s; +} else { +s = f / g; +r = Math.sqrt ((s * s) + 1.0); +this.e[i] = g * r; +c = 1.0 / r; +s *= c; +}g = this.d[i] - p; +r = ((this.d[i - 1] - g) * s) + (2.0 * c * b); +p = s * r; +this.d[i] = g + p; +g = (c * r) - b; +for (k = 1; k <= n; k++) { +f = this.value[k - 1][i]; +this.value[k - 1][i] = (s * this.value[k - 1][i - 1]) + (c * f); +this.value[k - 1][i - 1] = (c * this.value[k - 1][i - 1]) - (s * f); +} +} +this.d[l - 1] = this.d[l - 1] - p; +this.e[l - 1] = g; +this.e[m - 1] = 0.0; +}} while (m != l); +} +}); +Clazz.defineMethod (c$, "tred2", +function () { +var n = this.rows; +var l; +var k; +var j; +var i; +var scale; +var hh; +var h; +var g; +var f; +this.d = Clazz.newDoubleArray (this.rows, 0); +this.e = Clazz.newDoubleArray (this.rows, 0); +for (i = n - 1; i >= 1; i--) { +l = i - 1; +h = 0.0; +scale = 0.0; +if (l > 0) { +for (k = 0; k < l; k++) { +scale += Math.abs (this.value[i][k]); +} +if (scale == 0.0) { +this.e[i] = this.value[i][l]; +} else { +for (k = 0; k < l; k++) { +this.value[i][k] /= scale; +h += (this.value[i][k] * this.value[i][k]); +} +f = this.value[i][l]; +if (f > 0) { +g = -1.0 * Math.sqrt (h); +} else { +g = Math.sqrt (h); +}this.e[i] = scale * g; +h -= (f * g); +this.value[i][l] = f - g; +f = 0.0; +for (j = 0; j < l; j++) { +this.value[j][i] = this.value[i][j] / h; +g = 0.0; +for (k = 0; k < j; k++) { +g += (this.value[j][k] * this.value[i][k]); +} +for (k = j; k < l; k++) { +g += (this.value[k][j] * this.value[i][k]); +} +this.e[j] = g / h; +f += (this.e[j] * this.value[i][j]); +} +hh = f / (h + h); +for (j = 0; j < l; j++) { +f = this.value[i][j]; +g = this.e[j] - (hh * f); +this.e[j] = g; +for (k = 0; k < j; k++) { +this.value[j][k] -= ((f * this.e[k]) + (g * this.value[i][k])); +} +} +}} else { +this.e[i] = this.value[i][l]; +}this.d[i] = h; +} +this.d[0] = 0.0; +this.e[0] = 0.0; +for (i = 0; i < n; i++) { +l = i - 1; +if (this.d[i] != 0.0) { +for (j = 0; j < l; j++) { +g = 0.0; +for (k = 0; k < l; k++) { +g += (this.value[i][k] * this.value[k][j]); +} +for (k = 0; k < l; k++) { +this.value[k][j] -= (g * this.value[k][i]); +} +} +}this.d[i] = this.value[i][i]; +this.value[i][i] = 1.0; +for (j = 0; j < l; j++) { +this.value[j][i] = 0.0; +this.value[i][j] = 0.0; +} +} +}); +Clazz.defineMethod (c$, "tqli2", +function () { +var n = this.rows; +var m; +var l; +var iter; +var i; +var k; +var s; +var r; +var p; +;var g; +var f; +var dd; +var c; +var b; +for (i = 2; i <= n; i++) { +this.e[i - 2] = this.e[i - 1]; +} +this.e[n - 1] = 0.0; +for (l = 1; l <= n; l++) { +iter = 0; +do { +for (m = l; m <= (n - 1); m++) { +dd = Math.abs (this.d[m - 1]) + Math.abs (this.d[m]); +if ((Math.abs (this.e[m - 1]) + dd) == dd) { +break; +}} +if (m != l) { +iter++; +if (iter == this.maxIter) { +throw new Exception (jalview.util.MessageManager.formatMessage ("exception.matrix_too_many_iteration", Clazz.newArray (-1, ["tqli2", Integer.$valueOf (this.maxIter).toString ()]))); +} else { +}g = (this.d[l] - this.d[l - 1]) / (2.0 * this.e[l - 1]); +r = Math.sqrt ((g * g) + 1.0); +g = this.d[m - 1] - this.d[l - 1] + (this.e[l - 1] / (g + this.sign (r, g))); +c = 1.0; +s = c; +p = 0.0; +for (i = m - 1; i >= l; i--) { +f = s * this.e[i - 1]; +b = c * this.e[i - 1]; +if (Math.abs (f) >= Math.abs (g)) { +c = g / f; +r = Math.sqrt ((c * c) + 1.0); +this.e[i] = f * r; +s = 1.0 / r; +c *= s; +} else { +s = f / g; +r = Math.sqrt ((s * s) + 1.0); +this.e[i] = g * r; +c = 1.0 / r; +s *= c; +}g = this.d[i] - p; +r = ((this.d[i - 1] - g) * s) + (2.0 * c * b); +p = s * r; +this.d[i] = g + p; +g = (c * r) - b; +for (k = 1; k <= n; k++) { +f = this.value[k - 1][i]; +this.value[k - 1][i] = (s * this.value[k - 1][i - 1]) + (c * f); +this.value[k - 1][i - 1] = (c * this.value[k - 1][i - 1]) - (s * f); +} +} +this.d[l - 1] = this.d[l - 1] - p; +this.e[l - 1] = g; +this.e[m - 1] = 0.0; +}} while (m != l); +} +}); +Clazz.defineMethod (c$, "sign", +function (a, b) { +if (b < 0) { +return -Math.abs (a); +} else { +return Math.abs (a); +}}, "~N,~N"); +Clazz.defineMethod (c$, "getColumn", +function (n) { +var out = Clazz.newDoubleArray (this.rows, 0); +for (var i = 0; i < this.rows; i++) { +out[i] = this.value[i][n]; +} +return out; +}, "~N"); +Clazz.defineMethod (c$, "printD", +function (ps) { +for (var j = 0; j < this.rows; j++) { +jalview.util.Format.printDouble (ps, "%15.4e", this.d[j]); +} +}, "java.io.PrintStream"); +Clazz.defineMethod (c$, "printE", +function (ps) { +for (var j = 0; j < this.rows; j++) { +jalview.util.Format.printDouble (ps, "%15.4e", this.e[j]); +} +}, "java.io.PrintStream"); +}); diff --git a/bin/jalview/math/RotatableMatrix.js b/bin/jalview/math/RotatableMatrix.js index 12195ca..bec7c23 100644 --- a/bin/jalview/math/RotatableMatrix.js +++ b/bin/jalview/math/RotatableMatrix.js @@ -1,114 +1,114 @@ -Clazz.declarePackage ("jalview.math"); -c$ = Clazz.decorateAsClass (function () { -this.matrix = null; -this.temp = null; -this.rot = null; -Clazz.instantialize (this, arguments); -}, jalview.math, "RotatableMatrix"); -Clazz.makeConstructor (c$, -function (rows, cols) { -this.matrix = Clazz.newFloatArray (rows, cols, 0); -this.temp = Clazz.newFloatArray (3, 0); -this.rot = Clazz.newFloatArray (3, 3, 0); -}, "~N,~N"); -Clazz.defineMethod (c$, "addElement", -function (i, j, value) { -this.matrix[i][j] = value; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "print", -function () { -System.out.println (this.matrix[0][0] + " " + this.matrix[0][1] + " " + this.matrix[0][2]); -System.out.println (this.matrix[1][0] + " " + this.matrix[1][1] + " " + this.matrix[1][2]); -System.out.println (this.matrix[2][0] + " " + this.matrix[2][1] + " " + this.matrix[2][2]); -}); -Clazz.defineMethod (c$, "rotate", -function (degrees, axis) { -var costheta = Math.cos ((degrees * 3.141592653589793) / 180.0); -var sintheta = Math.sin ((degrees * 3.141592653589793) / 180.0); -if (axis == 'z') { -this.rot[0][0] = costheta; -this.rot[0][1] = -sintheta; -this.rot[0][2] = 0.0; -this.rot[1][0] = sintheta; -this.rot[1][1] = costheta; -this.rot[1][2] = 0.0; -this.rot[2][0] = 0.0; -this.rot[2][1] = 0.0; -this.rot[2][2] = 1.0; -this.preMultiply (this.rot); -}if (axis == 'x') { -this.rot[0][0] = 1.0; -this.rot[0][1] = 0.0; -this.rot[0][2] = 0.0; -this.rot[1][0] = 0.0; -this.rot[1][1] = costheta; -this.rot[1][2] = sintheta; -this.rot[2][0] = 0.0; -this.rot[2][1] = -sintheta; -this.rot[2][2] = costheta; -this.preMultiply (this.rot); -}if (axis == 'y') { -this.rot[0][0] = costheta; -this.rot[0][1] = 0.0; -this.rot[0][2] = -sintheta; -this.rot[1][0] = 0.0; -this.rot[1][1] = 1.0; -this.rot[1][2] = 0.0; -this.rot[2][0] = sintheta; -this.rot[2][1] = 0.0; -this.rot[2][2] = costheta; -this.preMultiply (this.rot); -}}, "~N,~S"); -Clazz.defineMethod (c$, "vectorMultiply", -function (vect) { -this.temp[0] = vect[0]; -this.temp[1] = vect[1]; -this.temp[2] = vect[2]; -for (var i = 0; i < 3; i++) { -this.temp[i] = (this.matrix[i][0] * vect[0]) + (this.matrix[i][1] * vect[1]) + (this.matrix[i][2] * vect[2]); -} -vect[0] = this.temp[0]; -vect[1] = this.temp[1]; -vect[2] = this.temp[2]; -return vect; -}, "~A"); -Clazz.defineMethod (c$, "preMultiply", -function (mat) { -var tmp = Clazz.newFloatArray (3, 3, 0); -for (var i = 0; i < 3; i++) { -for (var j = 0; j < 3; j++) { -tmp[i][j] = (mat[i][0] * this.matrix[0][j]) + (mat[i][1] * this.matrix[1][j]) + (mat[i][2] * this.matrix[2][j]); -} -} -for (var i = 0; i < 3; i++) { -for (var j = 0; j < 3; j++) { -this.matrix[i][j] = tmp[i][j]; -} -} -}, "~A"); -Clazz.defineMethod (c$, "postMultiply", -function (mat) { -var tmp = Clazz.newFloatArray (3, 3, 0); -for (var i = 0; i < 3; i++) { -for (var j = 0; j < 3; j++) { -tmp[i][j] = (this.matrix[i][0] * mat[0][j]) + (this.matrix[i][1] * mat[1][j]) + (this.matrix[i][2] * mat[2][j]); -} -} -for (var i = 0; i < 3; i++) { -for (var j = 0; j < 3; j++) { -this.matrix[i][j] = tmp[i][j]; -} -} -}, "~A"); -Clazz.defineMethod (c$, "setIdentity", -function () { -this.matrix[0][0] = 1.0; -this.matrix[1][1] = 1.0; -this.matrix[2][2] = 1.0; -this.matrix[0][1] = 0.0; -this.matrix[0][2] = 0.0; -this.matrix[1][0] = 0.0; -this.matrix[1][2] = 0.0; -this.matrix[2][0] = 0.0; -this.matrix[2][1] = 0.0; -}); +Clazz.declarePackage ("jalview.math"); +c$ = Clazz.decorateAsClass (function () { +this.matrix = null; +this.temp = null; +this.rot = null; +Clazz.instantialize (this, arguments); +}, jalview.math, "RotatableMatrix"); +Clazz.makeConstructor (c$, +function (rows, cols) { +this.matrix = Clazz.newFloatArray (rows, cols, 0); +this.temp = Clazz.newFloatArray (3, 0); +this.rot = Clazz.newFloatArray (3, 3, 0); +}, "~N,~N"); +Clazz.defineMethod (c$, "addElement", +function (i, j, value) { +this.matrix[i][j] = value; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "print", +function () { +System.out.println (this.matrix[0][0] + " " + this.matrix[0][1] + " " + this.matrix[0][2]); +System.out.println (this.matrix[1][0] + " " + this.matrix[1][1] + " " + this.matrix[1][2]); +System.out.println (this.matrix[2][0] + " " + this.matrix[2][1] + " " + this.matrix[2][2]); +}); +Clazz.defineMethod (c$, "rotate", +function (degrees, axis) { +var costheta = Math.cos ((degrees * 3.141592653589793) / 180.0); +var sintheta = Math.sin ((degrees * 3.141592653589793) / 180.0); +if (axis == 'z') { +this.rot[0][0] = costheta; +this.rot[0][1] = -sintheta; +this.rot[0][2] = 0.0; +this.rot[1][0] = sintheta; +this.rot[1][1] = costheta; +this.rot[1][2] = 0.0; +this.rot[2][0] = 0.0; +this.rot[2][1] = 0.0; +this.rot[2][2] = 1.0; +this.preMultiply (this.rot); +}if (axis == 'x') { +this.rot[0][0] = 1.0; +this.rot[0][1] = 0.0; +this.rot[0][2] = 0.0; +this.rot[1][0] = 0.0; +this.rot[1][1] = costheta; +this.rot[1][2] = sintheta; +this.rot[2][0] = 0.0; +this.rot[2][1] = -sintheta; +this.rot[2][2] = costheta; +this.preMultiply (this.rot); +}if (axis == 'y') { +this.rot[0][0] = costheta; +this.rot[0][1] = 0.0; +this.rot[0][2] = -sintheta; +this.rot[1][0] = 0.0; +this.rot[1][1] = 1.0; +this.rot[1][2] = 0.0; +this.rot[2][0] = sintheta; +this.rot[2][1] = 0.0; +this.rot[2][2] = costheta; +this.preMultiply (this.rot); +}}, "~N,~S"); +Clazz.defineMethod (c$, "vectorMultiply", +function (vect) { +this.temp[0] = vect[0]; +this.temp[1] = vect[1]; +this.temp[2] = vect[2]; +for (var i = 0; i < 3; i++) { +this.temp[i] = (this.matrix[i][0] * vect[0]) + (this.matrix[i][1] * vect[1]) + (this.matrix[i][2] * vect[2]); +} +vect[0] = this.temp[0]; +vect[1] = this.temp[1]; +vect[2] = this.temp[2]; +return vect; +}, "~A"); +Clazz.defineMethod (c$, "preMultiply", +function (mat) { +var tmp = Clazz.newFloatArray (3, 3, 0); +for (var i = 0; i < 3; i++) { +for (var j = 0; j < 3; j++) { +tmp[i][j] = (mat[i][0] * this.matrix[0][j]) + (mat[i][1] * this.matrix[1][j]) + (mat[i][2] * this.matrix[2][j]); +} +} +for (var i = 0; i < 3; i++) { +for (var j = 0; j < 3; j++) { +this.matrix[i][j] = tmp[i][j]; +} +} +}, "~A"); +Clazz.defineMethod (c$, "postMultiply", +function (mat) { +var tmp = Clazz.newFloatArray (3, 3, 0); +for (var i = 0; i < 3; i++) { +for (var j = 0; j < 3; j++) { +tmp[i][j] = (this.matrix[i][0] * mat[0][j]) + (this.matrix[i][1] * mat[1][j]) + (this.matrix[i][2] * mat[2][j]); +} +} +for (var i = 0; i < 3; i++) { +for (var j = 0; j < 3; j++) { +this.matrix[i][j] = tmp[i][j]; +} +} +}, "~A"); +Clazz.defineMethod (c$, "setIdentity", +function () { +this.matrix[0][0] = 1.0; +this.matrix[1][1] = 1.0; +this.matrix[2][2] = 1.0; +this.matrix[0][1] = 0.0; +this.matrix[0][2] = 0.0; +this.matrix[1][0] = 0.0; +this.matrix[1][2] = 0.0; +this.matrix[2][0] = 0.0; +this.matrix[2][1] = 0.0; +}); diff --git a/bin/jalview/renderer/AnnotationRenderer.class b/bin/jalview/renderer/AnnotationRenderer.class index 2cab4d650c10f737dd3fba3f3a5b73e8c1d09f3e..446ba32ac4a933c3fa96dcd8e0ceea5e53661e76 100644 GIT binary patch delta 135 zcmX@UlkwnA#tmI+j88XrtF2*TwqW3%Y^7-^%=MeWnVo@=VL8JJAgRZ|z|6e4Uh^;$ zvprCOtBwU+!7hf~5CsfhCr{LQ#l^+I{D;Ato#6@B;x=7o#@U 0 && jalview.schemes.ResidueProperties.isCloseParenRNA (dc)) { -if (diffupstream) { -g.fillPolygon ( Clazz.newIntArray (-1, [lastSSX + 5, lastSSX + 5, lastSSX]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); -x1 += 5; -}if (diffdownstream) { -x2 -= 1; -}} else { -if (diffdownstream) { -g.fillPolygon ( Clazz.newIntArray (-1, [x2 - 5, x2 - 5, x2]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); -x2 -= 5; -}if (diffupstream) { -x1 += 1; -}}g.fillRect (x1, y + 4 + iconOffset, x2 - x1, 7); -}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); -Clazz.defineMethod (c$, "drawNotCanonicalAnnot", -function (g, nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { -g.setColor (nonCanColor); -var sCol = (Clazz.doubleToInt (lastSSX / this.charWidth)) + startRes; -var x1 = lastSSX; -var x2 = (x * this.charWidth); -var closeparen = jalview.jsdev.RegExp.newRegex (["}|]|<|[a-z]"]); -var dc = (column == 0 || row_annotations[column - 1] == null) ? "" : row_annotations[column - 1].displayCharacter; -var diffupstream = sCol == 0 || row_annotations[sCol - 1] == null || !dc.equals (row_annotations[sCol - 1].displayCharacter); -var diffdownstream = !validRes || !validEnd || row_annotations[column] == null || !dc.equals (row_annotations[column].displayCharacter); -if (column > 0 && closeparen.search (dc)) { -if (diffupstream) { -g.fillPolygon ( Clazz.newIntArray (-1, [lastSSX + 5, lastSSX + 5, lastSSX]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); -x1 += 5; -}if (diffdownstream) { -x2 -= 1; -}} else { -if (diffdownstream) { -g.fillPolygon ( Clazz.newIntArray (-1, [x2 - 5, x2 - 5, x2]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); -x2 -= 5; -}if (diffupstream) { -x1 += 1; -}}g.fillRect (x1, y + 4 + iconOffset, x2 - x1, 7); -}, "java.awt.Graphics,java.awt.Color,~A,~N,~N,~N,~N,~N,~N,~B,~B"); -Clazz.defineMethod (c$, "updateFromAwtRenderPanel", -function (annotPanel, av) { -this.fm = annotPanel.getFontMetrics (); -this.annotationPanel = annotPanel; -this.fadedImage = annotPanel.getFadedImage (); -this.imgWidth = annotPanel.getFadedImageWidth (); -var bounds = annotPanel.getVisibleVRange (); -if (bounds != null) { -this.sOffset = bounds[0]; -this.visHeight = bounds[1]; -if (this.visHeight == 0) { -this.useClip = false; -} else { -this.useClip = this.canClip; -}} else { -this.useClip = false; -}this.updateFromAlignViewport (av); -}, "jalview.renderer.AwtRenderPanelI,jalview.api.AlignViewportI"); -Clazz.defineMethod (c$, "updateFromAlignViewport", -function (av) { -this.charWidth = av.getCharWidth (); -this.endRes = av.getEndRes (); -this.charHeight = av.getCharHeight (); -this.hasHiddenColumns = av.hasHiddenColumns (); -this.validCharWidth = av.isValidCharWidth (); -this.av_renderHistogram = av.isShowConsensusHistogram (); -this.av_renderProfile = av.isShowSequenceLogo (); -this.av_normaliseProfile = av.isNormaliseSequenceLogo (); -this.profcolour = av.getGlobalColourScheme (); -if (this.profcolour == null) { -this.profcolour = av.getAlignment ().isNucleotide () ? new jalview.schemes.NucleotideColourScheme () : new jalview.schemes.ZappoColourScheme (); -}this.columnSelection = av.getColumnSelection (); -this.hconsensus = av.getSequenceConsensusHash (); -this.complementConsensus = av.getComplementConsensusHash (); -this.hStrucConsensus = av.getRnaStructureConsensusHash (); -this.av_ignoreGapsConsensus = av.isIgnoreGapsConsensus (); -}, "jalview.api.AlignViewportI"); -Clazz.defineMethod (c$, "getProfileFor", -function (aa, column) { -if (aa.autoCalculated && (aa.label.startsWith ("Consensus") || aa.label.startsWith ("cDNA Consensus"))) { -var forComplement = aa.label.startsWith ("cDNA Consensus"); -if (aa.groupRef != null && aa.groupRef.consensusData != null && aa.groupRef.isShowSequenceLogo ()) { -return jalview.analysis.AAFrequency.extractProfile (aa.groupRef.consensusData[column], aa.groupRef.getIgnoreGapsConsensus ()); -}if (aa.groupRef == null && aa.sequenceRef == null) { -if (forComplement) { -return jalview.analysis.AAFrequency.extractCdnaProfile (this.complementConsensus[column], this.av_ignoreGapsConsensus); -} else { -return jalview.analysis.AAFrequency.extractProfile (this.hconsensus[column], this.av_ignoreGapsConsensus); -}}} else { -if (aa.autoCalculated && aa.label.startsWith ("StrucConsensus")) { -if (aa.groupRef == null && aa.sequenceRef == null && this.hStrucConsensus != null && this.hStrucConsensus.length > column) { -return jalview.analysis.StructureFrequency.extractProfile (this.hStrucConsensus[column], this.av_ignoreGapsConsensus); -}}}return null; -}, "jalview.datamodel.AlignmentAnnotation,~N"); -Clazz.defineMethod (c$, "drawComponent", -function (annotPanel, av, g, activeRow, startRes, endRes) { -var stime = System.currentTimeMillis (); -var usedFaded = false; -this.updateFromAwtRenderPanel (annotPanel, av); -this.fm = g.getFontMetrics (); -var aa = av.getAlignment ().getAlignmentAnnotation (); -var temp = 0; -if (aa == null) { -return false; -}var x = 0; -var y = 0; -var column = 0; -var lastSS; -var lastSSX; -var iconOffset = 0; -var validRes = false; -var validEnd = false; -var labelAllCols = false; -var centreColLabels; -var centreColLabelsDef = av.isCentreColumnLabels (); -var scaleColLabel = false; -var consensusAnnot = av.getAlignmentConsensusAnnotation (); -var structConsensusAnnot = av.getAlignmentStrucConsensusAnnotation (); -var complementConsensusAnnot = av.getComplementConsensusAnnotation (); -var renderHistogram = true; -var renderProfile = true; -var normaliseProfile = false; -var isRNA = this.rna; -var graphGroupDrawn = new java.util.BitSet (); -var charOffset = 0; -var fmWidth; -var fmScaling = 1; -var ofont = g.getFont (); -var yfrom = 0; -var f_i = 0; -var yto = 0; -var f_to = 0; -var clipst = false; -var clipend = false; -for (var i = 0; i < aa.length; i++) { -var row = aa[i]; -isRNA = row.isRNA (); -{ -if (row.groupRef != null && row === row.groupRef.getConsensus ()) { -renderHistogram = row.groupRef.isShowConsensusHistogram (); -renderProfile = row.groupRef.isShowSequenceLogo (); -normaliseProfile = row.groupRef.isNormaliseSequenceLogo (); -} else if (row === consensusAnnot || row === structConsensusAnnot || row === complementConsensusAnnot) { -renderHistogram = this.av_renderHistogram; -renderProfile = this.av_renderProfile; -normaliseProfile = this.av_normaliseProfile; -} else { -renderHistogram = true; -}}var row_annotations = row.annotations; -if (!row.visible) { -continue; -}centreColLabels = row.centreColLabels || centreColLabelsDef; -labelAllCols = row.showAllColLabels; -scaleColLabel = row.scaleColLabel; -lastSS = ' '; -lastSSX = 0; -if (!this.useClip || ((y - this.charHeight) < this.visHeight && (y + row.height + this.charHeight * 2) >= this.sOffset)) { -if (!clipst) { -clipst = true; -yfrom = y; -f_i = i; -}yto = y; -f_to = i; -if (row.graph > 0) { -if (row.graphGroup > -1 && graphGroupDrawn.get (row.graphGroup)) { -continue; -}y += row.height; -if (row.hasText) { -iconOffset = this.charHeight - this.fm.getDescent (); -y -= this.charHeight; -}} else if (row.hasText) { -iconOffset = this.charHeight - this.fm.getDescent (); -} else { -iconOffset = 0; -}if (row.autoCalculated && av.isCalculationInProgress (row)) { -y += this.charHeight; -usedFaded = true; -g.drawImage (this.fadedImage, 0, y - row.height, this.imgWidth, y, 0, y - row.height, this.imgWidth, y, this.annotationPanel); -g.setColor (java.awt.Color.black); -continue; -}x = (startRes == 0) ? 0 : -1; -while (x < endRes - startRes) { -if (this.hasHiddenColumns) { -column = this.columnSelection.adjustForHiddenColumns (startRes + x); -if (column > row_annotations.length - 1) { -break; -}} else { -column = startRes + x; -}if ((row_annotations == null) || (row_annotations.length <= column) || (row_annotations[column] == null)) { -validRes = false; -} else { -validRes = true; -}var displayChar = validRes ? row_annotations[column].displayCharacter : null; -if (x > -1) { -if (activeRow == i) { -g.setColor (java.awt.Color.red); -if (this.columnSelection != null) { -for (var n = 0; n < this.columnSelection.size (); n++) { -var v = this.columnSelection.columnAt (n); -if (v == column) { -g.fillRect (x * this.charWidth, y, this.charWidth, this.charHeight); -}} -}}if (row.getInvalidStrucPos () > x) { -g.setColor (java.awt.Color.orange); -g.fillRect (x * this.charWidth, y, this.charWidth, this.charHeight); -} else if (row.getInvalidStrucPos () == x) { -g.setColor (java.awt.Color.orange.darker ()); -g.fillRect (x * this.charWidth, y, this.charWidth, this.charHeight); -}if (this.validCharWidth && validRes && displayChar != null && (displayChar.length > 0)) { -fmWidth = this.fm.charsWidth (displayChar.toCharArray (), 0, displayChar.length); -if (scaleColLabel) { -if (fmWidth > this.charWidth) { -fmScaling = this.charWidth; -fmScaling /= fmWidth; -g.setFont (ofont.deriveFont (java.awt.geom.AffineTransform.getScaleInstance (fmScaling, 1.0))); -fmWidth = this.charWidth; -}}charOffset = Clazz.floatToInt ((this.charWidth - fmWidth) / 2); -if (row_annotations[column].colour == null) { -g.setColor (java.awt.Color.black); -} else { -g.setColor (row_annotations[column].colour); -}if (column == 0 || row.graph > 0) { -g.drawString (displayChar, (x * this.charWidth) + charOffset, y + iconOffset); -} else if (row_annotations[column - 1] == null || (labelAllCols || !displayChar.equals (row_annotations[column - 1].displayCharacter) || (displayChar.length < 2 && row_annotations[column].secondaryStructure == ' '))) { -g.drawString (displayChar, x * this.charWidth + charOffset, y + iconOffset); -}g.setFont (ofont); -}}if (row.hasIcons) { -var ss = validRes ? row_annotations[column].secondaryStructure : '-'; -if (ss == '(') { -if (displayChar.indexOf (')') > -1) { -ss = ')'; -}}if (ss == '[') { -if ((displayChar.indexOf (']') > -1)) { -ss = ']'; -}}if (ss == '{') { -if (displayChar.indexOf ('}') > -1) { -ss = '}'; -}}if (ss == '<') { -if (displayChar.indexOf ('<') > -1) { -ss = '>'; -}}if (ss.charCodeAt (0) >= 65) { -if (displayChar.indexOf (ss.charCodeAt (0) + 32) > -1) { -ss = String.fromCharCode (ss.charCodeAt (0) + 32); -}}if (!validRes || (ss != lastSS)) { -if (x > -1) { -var nb_annot = x - temp; -switch (lastSS) { -case '(': -case ')': -this.drawStemAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -temp = x; -break; -case 'H': -if (!isRNA) { -this.drawHelixAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -break; -}case 'E': -if (!isRNA) { -this.drawSheetAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -break; -}case '{': -case '}': -case '[': -case ']': -case '>': -case '<': -case 'A': -case 'a': -case 'B': -case 'b': -case 'C': -case 'c': -case 'D': -case 'd': -case 'e': -case 'F': -case 'f': -case 'G': -case 'g': -case 'h': -case 'I': -case 'i': -case 'J': -case 'j': -case 'K': -case 'k': -case 'L': -case 'l': -case 'M': -case 'm': -case 'N': -case 'n': -case 'O': -case 'o': -case 'P': -case 'p': -case 'Q': -case 'q': -case 'R': -case 'r': -case 'S': -case 's': -case 'T': -case 't': -case 'U': -case 'u': -case 'V': -case 'v': -case 'W': -case 'w': -case 'X': -case 'x': -case 'Y': -case 'y': -case 'Z': -case 'z': -var nonCanColor = this.getNotCanonicalColor (lastSS); -this.drawNotCanonicalAnnot (g, nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -temp = x; -break; -default: -g.setColor (java.awt.Color.gray); -g.fillRect (lastSSX, y + 6 + iconOffset, (x * this.charWidth) - lastSSX, 2); -temp = x; -break; -} -}if (validRes) { -lastSS = ss; -} else { -lastSS = ' '; -}if (x > -1) { -lastSSX = (x * this.charWidth); -}}}column++; -x++; -} -if (column >= row_annotations.length) { -column = row_annotations.length - 1; -validEnd = false; -} else { -validEnd = true; -}if ((row_annotations == null) || (row_annotations.length <= column) || (row_annotations[column] == null)) { -validRes = false; -} else { -validRes = true; -}if (row.hasIcons) { -switch (lastSS) { -case 'H': -if (!isRNA) { -this.drawHelixAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -break; -}case 'E': -if (!isRNA) { -this.drawSheetAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -break; -}case '(': -case ')': -this.drawStemAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -break; -case '{': -case '}': -case '[': -case ']': -case '>': -case '<': -case 'A': -case 'a': -case 'B': -case 'b': -case 'C': -case 'c': -case 'D': -case 'd': -case 'e': -case 'F': -case 'f': -case 'G': -case 'g': -case 'h': -case 'I': -case 'i': -case 'J': -case 'j': -case 'K': -case 'k': -case 'L': -case 'l': -case 'M': -case 'm': -case 'N': -case 'n': -case 'O': -case 'o': -case 'P': -case 'p': -case 'Q': -case 'q': -case 'R': -case 'r': -case 'T': -case 't': -case 'U': -case 'u': -case 'V': -case 'v': -case 'W': -case 'w': -case 'X': -case 'x': -case 'Y': -case 'y': -case 'Z': -case 'z': -var nonCanColor = this.getNotCanonicalColor (lastSS); -this.drawNotCanonicalAnnot (g, nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -break; -default: -this.drawGlyphLine (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); -break; -} -}if (row.graph > 0 && row.graphHeight > 0) { -if (row.graph == 2) { -if (row.graphGroup > -1 && !graphGroupDrawn.get (row.graphGroup)) { -var groupmax = -999999; -var groupmin = 9999999; -for (var gg = 0; gg < aa.length; gg++) { -if (aa[gg].graphGroup != row.graphGroup) { -continue; -}if (aa[gg] !== row) { -aa[gg].visible = false; -}if (aa[gg].graphMax > groupmax) { -groupmax = aa[gg].graphMax; -}if (aa[gg].graphMin < groupmin) { -groupmin = aa[gg].graphMin; -}} -for (var gg = 0; gg < aa.length; gg++) { -if (aa[gg].graphGroup == row.graphGroup) { -this.drawLineGraph (g, aa[gg], aa[gg].annotations, startRes, endRes, y, groupmin, groupmax, row.graphHeight); -}} -graphGroupDrawn.set (row.graphGroup); -} else { -this.drawLineGraph (g, row, row_annotations, startRes, endRes, y, row.graphMin, row.graphMax, row.graphHeight); -}} else if (row.graph == 1) { -this.drawBarGraph (g, row, row_annotations, startRes, endRes, row.graphMin, row.graphMax, y, renderHistogram, renderProfile, normaliseProfile); -}}} else { -if (clipst && !clipend) { -clipend = true; -}}if (row.graph > 0 && row.hasText) { -y += this.charHeight; -}if (row.graph == 0) { -y += aa[i].height; -}} -if (this.debugRedraw) { -if (this.canClip) { -if (clipst) { -System.err.println ("Start clip at : " + yfrom + " (index " + f_i + ")"); -}if (clipend) { -System.err.println ("End clip at : " + yto + " (index " + f_to + ")"); -}};System.err.println ("Annotation Rendering time:" + (System.currentTimeMillis () - stime)); -};return !usedFaded; -}, "jalview.renderer.AwtRenderPanelI,jalview.api.AlignViewportI,java.awt.Graphics,~N,~N,~N"); -Clazz.defineMethod (c$, "drawGlyphLine", -function (g, row, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { -g.setColor (jalview.renderer.AnnotationRenderer.GLYPHLINE_COLOR); -g.fillRect (lastSSX, y + 6 + iconOffset, (x * this.charWidth) - lastSSX, 2); -}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); -Clazz.defineMethod (c$, "drawSheetAnnot", -function (g, row, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { -g.setColor (jalview.renderer.AnnotationRenderer.SHEET_COLOUR); -if (!validEnd || !validRes || row == null || row[column] == null || row[column].secondaryStructure != 'E') { -g.fillRect (lastSSX, y + 4 + iconOffset, (x * this.charWidth) - lastSSX - 4, 7); -g.fillPolygon ( Clazz.newIntArray (-1, [(x * this.charWidth) - 4, (x * this.charWidth) - 4, (x * this.charWidth)]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 7 + iconOffset]), 3); -} else { -g.fillRect (lastSSX, y + 4 + iconOffset, (x + 1) * this.charWidth - lastSSX, 7); -}}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); -Clazz.defineMethod (c$, "drawHelixAnnot", -function (g, row, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { -g.setColor (jalview.renderer.AnnotationRenderer.HELIX_COLOUR); -var sCol = (Clazz.doubleToInt (lastSSX / this.charWidth)) + startRes; -var x1 = lastSSX; -var x2 = (x * this.charWidth); -if (this.MAC) { -var ofs = Clazz.doubleToInt (this.charWidth / 2); -g.fillRoundRect (lastSSX, y + 4 + iconOffset, x2 - x1, 8, 8, 8); -if (sCol == 0 || row[sCol - 1] == null || row[sCol - 1].secondaryStructure != 'H') { -} else { -g.fillRoundRect (lastSSX, y + 4 + iconOffset, x2 - x1 - ofs + 1, 8, 0, 0); -}if (!validRes || row[column] == null || row[column].secondaryStructure != 'H') { -} else { -g.fillRoundRect (lastSSX + ofs, y + 4 + iconOffset, x2 - x1 - ofs + 1, 8, 0, 0); -}return; -}if (sCol == 0 || row[sCol - 1] == null || row[sCol - 1].secondaryStructure != 'H') { -g.fillArc (lastSSX, y + 4 + iconOffset, this.charWidth, 8, 90, 180); -x1 += Clazz.doubleToInt (this.charWidth / 2); -}if (!validRes || row[column] == null || row[column].secondaryStructure != 'H') { -g.fillArc ((x * this.charWidth) - this.charWidth, y + 4 + iconOffset, this.charWidth, 8, 270, 180); -x2 -= Clazz.doubleToInt (this.charWidth / 2); -}g.fillRect (x1, y + 4 + iconOffset, x2 - x1, 8); -}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); -Clazz.defineMethod (c$, "drawLineGraph", -function (g, _aa, aa_annotations, sRes, eRes, y, min, max, graphHeight) { -if (sRes > aa_annotations.length) { -return; -}var x = 0; -if (eRes < this.endRes) { -eRes++; -}eRes = Math.min (eRes, aa_annotations.length); -if (sRes == 0) { -x++; -}var y1 = y; -var y2 = y; -var range = max - min; -if (min < 0) { -y2 = y - Clazz.floatToInt ((0 - min / range) * graphHeight); -}g.setColor (java.awt.Color.gray); -g.drawLine (x - this.charWidth, y2, (eRes - sRes + 1) * this.charWidth, y2); -eRes = Math.min (eRes, aa_annotations.length); -var column; -var aaMax = aa_annotations.length - 1; -while (x < eRes - sRes) { -column = sRes + x; -if (this.hasHiddenColumns) { -column = this.columnSelection.adjustForHiddenColumns (column); -}if (column > aaMax) { -break; -}if (aa_annotations[column] == null || aa_annotations[column - 1] == null) { -x++; -continue; -}if (aa_annotations[column].colour == null) { -g.setColor (java.awt.Color.black); -} else { -g.setColor (aa_annotations[column].colour); -}y1 = y - Clazz.floatToInt (((aa_annotations[column - 1].value - min) / range) * graphHeight); -y2 = y - Clazz.floatToInt (((aa_annotations[column].value - min) / range) * graphHeight); -g.drawLine (x * this.charWidth - Clazz.doubleToInt (this.charWidth / 2), y1, x * this.charWidth + Clazz.doubleToInt (this.charWidth / 2), y2); -x++; -} -if (_aa.threshold != null) { -g.setColor (_aa.threshold.colour); -var g2 = g; -g2.setStroke ( new java.awt.BasicStroke (1, 2, 1, 3, Clazz.newFloatArray (-1, [5, 3]), 0)); -y2 = Clazz.floatToInt (y - ((_aa.threshold.value - min) / range) * graphHeight); -g.drawLine (0, y2, (eRes - sRes) * this.charWidth, y2); -g2.setStroke ( new java.awt.BasicStroke ()); -}}, "java.awt.Graphics,jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "drawBarGraph", -function (g, _aa, aa_annotations, sRes, eRes, min, max, y, renderHistogram, renderProfile, normaliseProfile) { -if (sRes > aa_annotations.length) { -return; -}var ofont = g.getFont (); -eRes = Math.min (eRes, aa_annotations.length); -var x = 0; -var y1 = y; -var y2 = y; -var range = max - min; -if (min < 0) { -y2 = y - Clazz.floatToInt ((0 - min / (range)) * _aa.graphHeight); -}g.setColor (java.awt.Color.gray); -g.drawLine (x, y2, (eRes - sRes) * this.charWidth, y2); -var column; -var aaMax = aa_annotations.length - 1; -while (x < eRes - sRes) { -column = sRes + x; -if (this.hasHiddenColumns) { -column = this.columnSelection.adjustForHiddenColumns (column); -}if (column > aaMax) { -break; -}if (aa_annotations[column] == null) { -x++; -continue; -}if (aa_annotations[column].colour == null) { -g.setColor (java.awt.Color.black); -} else { -g.setColor (aa_annotations[column].colour); -}y1 = y - Clazz.floatToInt (((aa_annotations[column].value - min) / (range)) * _aa.graphHeight); -if (renderHistogram) { -if (y1 - y2 > 0) { -g.fillRect (x * this.charWidth, y2, this.charWidth, y1 - y2); -} else { -g.fillRect (x * this.charWidth, y1, this.charWidth, y2 - y1); -}}if (renderProfile) { -var profl = this.getProfileFor (_aa, column); -if (profl != null && profl[2] != 0) { -var isStructureProfile = profl[0] == 1; -var isCdnaProfile = profl[0] == 2; -var ht = normaliseProfile ? y - _aa.graphHeight : y1; -var htn = normaliseProfile ? _aa.graphHeight : (y2 - y1); -var hght; -var wdth; -var ht2 = 0; -var dc; -dc = Clazz.newCharArray (isStructureProfile ? 2 : (isCdnaProfile ? 3 : 1), '\0'); -var lm = g.getFontMetrics (ofont).getLineMetrics ("Q", g); -var scale = 1 / (normaliseProfile ? profl[2] : 100); -var ofontHeight = 1 / lm.getAscent (); -var scl = 0.0; -var c = 3; -var valuesProcessed = 0; -while (valuesProcessed < profl[1]) { -if (isStructureProfile) { -dc[0] = String.fromCharCode (profl[c++]); -dc[1] = String.fromCharCode (profl[c++]); -} else if (isCdnaProfile) { -dc = jalview.analysis.CodingUtils.decodeCodon (profl[c++]); -} else { -dc[0] = String.fromCharCode (profl[c++]); -}wdth = this.charWidth; -wdth /= this.fm.charsWidth (dc, 0, dc.length); -ht += scl; -scl = htn * scale * profl[c++]; -lm = ofont.getLineMetrics (dc, 0, 1, g.getFontMetrics ().getFontRenderContext ()); -g.setFont (ofont.deriveFont (java.awt.geom.AffineTransform.getScaleInstance (wdth, scl / lm.getAscent ()))); -lm = g.getFontMetrics ().getLineMetrics (dc, 0, 1, g); -var colour = null; -if (isCdnaProfile) { -var codonTranslation = jalview.schemes.ResidueProperties.codonTranslate ( String.instantialize (dc)); -colour = this.profcolour.findColour (codonTranslation.charAt (0), column, null); -} else { -colour = this.profcolour.findColour (dc[0], column, null); -}g.setColor (colour === java.awt.Color.white ? java.awt.Color.lightGray : colour); -hght = (ht + (scl - lm.getDescent () - lm.getBaselineOffsets ()[lm.getBaselineIndex ()])); -g.drawChars (dc, 0, dc.length, x * this.charWidth, Clazz.doubleToInt (hght)); -valuesProcessed++; -} -g.setFont (ofont); -}}x++; -} -if (_aa.threshold != null) { -g.setColor (_aa.threshold.colour); -var g2 = g; -g2.setStroke ( new java.awt.BasicStroke (1, 2, 1, 3, Clazz.newFloatArray (-1, [5, 3]), 0)); -y2 = Clazz.floatToInt (y - ((_aa.threshold.value - min) / range) * _aa.graphHeight); -g.drawLine (0, y2, (eRes - sRes) * this.charWidth, y2); -g2.setStroke ( new java.awt.BasicStroke ()); -}}, "java.awt.Graphics,jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~N,~N,~N,~B,~B,~B"); -Clazz.defineMethod (c$, "drawGraph", -function (g, _aa, aa_annotations, width, y, sRes, eRes) { -eRes = Math.min (eRes, aa_annotations.length); -g.setColor (java.awt.Color.white); -g.fillRect (0, 0, width, y); -g.setColor ( new java.awt.Color (0, 0, 180)); -var x = 0; -var height; -for (var j = sRes; j < eRes; j++) { -if (aa_annotations[j] != null) { -if (aa_annotations[j].colour == null) { -g.setColor (java.awt.Color.black); -} else { -g.setColor (aa_annotations[j].colour); -}height = Clazz.floatToInt ((aa_annotations[j].value / _aa.graphMax) * y); -if (height > y) { -height = y; -}g.fillRect (x, y - height, this.charWidth, height); -}x += this.charWidth; -} -}, "java.awt.Graphics,jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "getNotCanonicalColor", -function (lastss) { -switch (lastss) { -case '{': -case '}': -return new java.awt.Color (255, 125, 5); -case '[': -case ']': -return new java.awt.Color (245, 115, 10); -case '>': -case '<': -return new java.awt.Color (235, 135, 15); -case 'A': -case 'a': -return new java.awt.Color (225, 105, 20); -case 'B': -case 'b': -return new java.awt.Color (215, 145, 30); -case 'C': -case 'c': -return new java.awt.Color (205, 95, 35); -case 'D': -case 'd': -return new java.awt.Color (195, 155, 45); -case 'E': -case 'e': -return new java.awt.Color (185, 85, 55); -case 'F': -case 'f': -return new java.awt.Color (175, 165, 65); -case 'G': -case 'g': -return new java.awt.Color (170, 75, 75); -case 'H': -case 'h': -return new java.awt.Color (160, 175, 85); -case 'I': -case 'i': -return new java.awt.Color (150, 65, 95); -case 'J': -case 'j': -return new java.awt.Color (140, 185, 105); -case 'K': -case 'k': -return new java.awt.Color (130, 55, 110); -case 'L': -case 'l': -return new java.awt.Color (120, 195, 120); -case 'M': -case 'm': -return new java.awt.Color (110, 45, 130); -case 'N': -case 'n': -return new java.awt.Color (100, 205, 140); -case 'O': -case 'o': -return new java.awt.Color (90, 35, 150); -case 'P': -case 'p': -return new java.awt.Color (85, 215, 160); -case 'Q': -case 'q': -return new java.awt.Color (75, 25, 170); -case 'R': -case 'r': -return new java.awt.Color (65, 225, 180); -case 'S': -case 's': -return new java.awt.Color (55, 15, 185); -case 'T': -case 't': -return new java.awt.Color (45, 235, 195); -case 'U': -case 'u': -return new java.awt.Color (35, 5, 205); -case 'V': -case 'v': -return new java.awt.Color (25, 245, 215); -case 'W': -case 'w': -return new java.awt.Color (15, 0, 225); -case 'X': -case 'x': -return new java.awt.Color (10, 255, 235); -case 'Y': -case 'y': -return new java.awt.Color (5, 150, 245); -case 'Z': -case 'z': -return new java.awt.Color (0, 80, 255); -default: -System.out.println ("This is not a interaction : " + lastss); -return null; -} -}, "~S"); -c$.GLYPHLINE_COLOR = c$.prototype.GLYPHLINE_COLOR = java.awt.Color.gray; -c$.SHEET_COLOUR = c$.prototype.SHEET_COLOUR = java.awt.Color.green; -c$.HELIX_COLOUR = c$.prototype.HELIX_COLOUR = java.awt.Color.red; -c$.STEM_COLOUR = c$.prototype.STEM_COLOUR = java.awt.Color.blue; -}); +Clazz.declarePackage ("jalview.renderer"); +Clazz.load (["jalview.util.Platform", "java.awt.Color"], "jalview.renderer.AnnotationRenderer", ["jalview.analysis.AAFrequency", "$.CodingUtils", "$.StructureFrequency", "jalview.jsdev.RegExp", "jalview.schemes.NucleotideColourScheme", "$.ResidueProperties", "$.ZappoColourScheme", "java.awt.BasicStroke", "java.awt.geom.AffineTransform", "java.util.BitSet"], function () { +c$ = Clazz.decorateAsClass (function () { +this.debugRedraw = false; +this.charWidth = 0; +this.endRes = 0; +this.charHeight = 0; +this.validCharWidth = false; +this.hasHiddenColumns = false; +this.fm = null; +this.MAC = false; +this.av_renderHistogram = true; +this.av_renderProfile = true; +this.av_normaliseProfile = false; +this.profcolour = null; +this.columnSelection = null; +this.hconsensus = null; +this.complementConsensus = null; +this.hStrucConsensus = null; +this.av_ignoreGapsConsensus = false; +this.fadedImage = null; +this.annotationPanel = null; +this.imgWidth = 0; +this.sOffset = 0; +this.visHeight = 0; +this.useClip = true; +this.canClip = false; +this.rna = false; +this.sdNOTCANONICAL_COLOUR = null; +Clazz.instantialize (this, arguments); +}, jalview.renderer, "AnnotationRenderer"); +Clazz.prepareFields (c$, function () { +this.MAC = jalview.util.Platform.isAMac (); +}); +Clazz.makeConstructor (c$, +function () { +this.construct (false); +}); +Clazz.makeConstructor (c$, +function (debugRedraw) { +this.debugRedraw = debugRedraw; +}, "~B"); +Clazz.defineMethod (c$, "drawStemAnnot", +function (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { +g.setColor (jalview.renderer.AnnotationRenderer.STEM_COLOUR); +var sCol = (Clazz.doubleToInt (lastSSX / this.charWidth)) + startRes; +var x1 = lastSSX; +var x2 = (x * this.charWidth); +var closeparen = jalview.jsdev.RegExp.newRegex (["(\\))"]); +var dc = (column == 0 || row_annotations[column - 1] == null) ? ' ' : row_annotations[column - 1].secondaryStructure; +var diffupstream = sCol == 0 || row_annotations[sCol - 1] == null || dc != row_annotations[sCol - 1].secondaryStructure; +var diffdownstream = !validRes || !validEnd || row_annotations[column] == null || dc != row_annotations[column].secondaryStructure; +if (column > 0 && jalview.schemes.ResidueProperties.isCloseParenRNA (dc)) { +if (diffupstream) { +g.fillPolygon ( Clazz.newIntArray (-1, [lastSSX + 5, lastSSX + 5, lastSSX]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); +x1 += 5; +}if (diffdownstream) { +x2 -= 1; +}} else { +if (diffdownstream) { +g.fillPolygon ( Clazz.newIntArray (-1, [x2 - 5, x2 - 5, x2]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); +x2 -= 5; +}if (diffupstream) { +x1 += 1; +}}g.fillRect (x1, y + 4 + iconOffset, x2 - x1, 7); +}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); +Clazz.defineMethod (c$, "drawNotCanonicalAnnot", +function (g, nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { +g.setColor (nonCanColor); +var sCol = (Clazz.doubleToInt (lastSSX / this.charWidth)) + startRes; +var x1 = lastSSX; +var x2 = (x * this.charWidth); +var closeparen = jalview.jsdev.RegExp.newRegex (["}|]|<|[a-z]"]); +var dc = (column == 0 || row_annotations[column - 1] == null) ? "" : row_annotations[column - 1].displayCharacter; +var diffupstream = sCol == 0 || row_annotations[sCol - 1] == null || !dc.equals (row_annotations[sCol - 1].displayCharacter); +var diffdownstream = !validRes || !validEnd || row_annotations[column] == null || !dc.equals (row_annotations[column].displayCharacter); +if (column > 0 && closeparen.search (dc)) { +if (diffupstream) { +g.fillPolygon ( Clazz.newIntArray (-1, [lastSSX + 5, lastSSX + 5, lastSSX]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); +x1 += 5; +}if (diffdownstream) { +x2 -= 1; +}} else { +if (diffdownstream) { +g.fillPolygon ( Clazz.newIntArray (-1, [x2 - 5, x2 - 5, x2]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset]), 3); +x2 -= 5; +}if (diffupstream) { +x1 += 1; +}}g.fillRect (x1, y + 4 + iconOffset, x2 - x1, 7); +}, "java.awt.Graphics,java.awt.Color,~A,~N,~N,~N,~N,~N,~N,~B,~B"); +Clazz.defineMethod (c$, "updateFromAwtRenderPanel", +function (annotPanel, av) { +this.fm = annotPanel.getFontMetrics (); +this.annotationPanel = annotPanel; +this.fadedImage = annotPanel.getFadedImage (); +this.imgWidth = annotPanel.getFadedImageWidth (); +var bounds = annotPanel.getVisibleVRange (); +if (bounds != null) { +this.sOffset = bounds[0]; +this.visHeight = bounds[1]; +if (this.visHeight == 0) { +this.useClip = false; +} else { +this.useClip = this.canClip; +}} else { +this.useClip = false; +}this.updateFromAlignViewport (av); +}, "jalview.renderer.AwtRenderPanelI,jalview.api.AlignViewportI"); +Clazz.defineMethod (c$, "updateFromAlignViewport", +function (av) { +this.charWidth = av.getCharWidth (); +this.endRes = av.getEndRes (); +this.charHeight = av.getCharHeight (); +this.hasHiddenColumns = av.hasHiddenColumns (); +this.validCharWidth = av.isValidCharWidth (); +this.av_renderHistogram = av.isShowConsensusHistogram (); +this.av_renderProfile = av.isShowSequenceLogo (); +this.av_normaliseProfile = av.isNormaliseSequenceLogo (); +this.profcolour = av.getGlobalColourScheme (); +if (this.profcolour == null) { +this.profcolour = av.getAlignment ().isNucleotide () ? new jalview.schemes.NucleotideColourScheme () : new jalview.schemes.ZappoColourScheme (); +}this.columnSelection = av.getColumnSelection (); +this.hconsensus = av.getSequenceConsensusHash (); +this.complementConsensus = av.getComplementConsensusHash (); +this.hStrucConsensus = av.getRnaStructureConsensusHash (); +this.av_ignoreGapsConsensus = av.isIgnoreGapsConsensus (); +}, "jalview.api.AlignViewportI"); +Clazz.defineMethod (c$, "getProfileFor", +function (aa, column) { +if (aa.autoCalculated && (aa.label.startsWith ("Consensus") || aa.label.startsWith ("cDNA Consensus"))) { +var forComplement = aa.label.startsWith ("cDNA Consensus"); +if (aa.groupRef != null && aa.groupRef.consensusData != null && aa.groupRef.isShowSequenceLogo ()) { +return jalview.analysis.AAFrequency.extractProfile (aa.groupRef.consensusData[column], aa.groupRef.getIgnoreGapsConsensus ()); +}if (aa.groupRef == null && aa.sequenceRef == null) { +if (forComplement) { +return jalview.analysis.AAFrequency.extractCdnaProfile (this.complementConsensus[column], this.av_ignoreGapsConsensus); +} else { +return jalview.analysis.AAFrequency.extractProfile (this.hconsensus[column], this.av_ignoreGapsConsensus); +}}} else { +if (aa.autoCalculated && aa.label.startsWith ("StrucConsensus")) { +if (aa.groupRef == null && aa.sequenceRef == null && this.hStrucConsensus != null && this.hStrucConsensus.length > column) { +return jalview.analysis.StructureFrequency.extractProfile (this.hStrucConsensus[column], this.av_ignoreGapsConsensus); +}}}return null; +}, "jalview.datamodel.AlignmentAnnotation,~N"); +Clazz.defineMethod (c$, "drawComponent", +function (annotPanel, av, g, activeRow, startRes, endRes) { +var stime = System.currentTimeMillis (); +var usedFaded = false; +this.updateFromAwtRenderPanel (annotPanel, av); +this.fm = g.getFontMetrics (); +var aa = av.getAlignment ().getAlignmentAnnotation (); +var temp = 0; +if (aa == null) { +return false; +}var x = 0; +var y = 0; +var column = 0; +var lastSS; +var lastSSX; +var iconOffset = 0; +var validRes = false; +var validEnd = false; +var labelAllCols = false; +var centreColLabels; +var centreColLabelsDef = av.isCentreColumnLabels (); +var scaleColLabel = false; +var consensusAnnot = av.getAlignmentConsensusAnnotation (); +var structConsensusAnnot = av.getAlignmentStrucConsensusAnnotation (); +var complementConsensusAnnot = av.getComplementConsensusAnnotation (); +var renderHistogram = true; +var renderProfile = true; +var normaliseProfile = false; +var isRNA = this.rna; +var graphGroupDrawn = new java.util.BitSet (); +var charOffset = 0; +var fmWidth; +var fmScaling = 1; +var ofont = g.getFont (); +var yfrom = 0; +var f_i = 0; +var yto = 0; +var f_to = 0; +var clipst = false; +var clipend = false; +for (var i = 0; i < aa.length; i++) { +var row = aa[i]; +isRNA = row.isRNA (); +{ +if (row.groupRef != null && row === row.groupRef.getConsensus ()) { +renderHistogram = row.groupRef.isShowConsensusHistogram (); +renderProfile = row.groupRef.isShowSequenceLogo (); +normaliseProfile = row.groupRef.isNormaliseSequenceLogo (); +} else if (row === consensusAnnot || row === structConsensusAnnot || row === complementConsensusAnnot) { +renderHistogram = this.av_renderHistogram; +renderProfile = this.av_renderProfile; +normaliseProfile = this.av_normaliseProfile; +} else { +renderHistogram = true; +}}var row_annotations = row.annotations; +if (!row.visible) { +continue; +}centreColLabels = row.centreColLabels || centreColLabelsDef; +labelAllCols = row.showAllColLabels; +scaleColLabel = row.scaleColLabel; +lastSS = ' '; +lastSSX = 0; +if (!this.useClip || ((y - this.charHeight) < this.visHeight && (y + row.height + this.charHeight * 2) >= this.sOffset)) { +if (!clipst) { +clipst = true; +yfrom = y; +f_i = i; +}yto = y; +f_to = i; +if (row.graph > 0) { +if (row.graphGroup > -1 && graphGroupDrawn.get (row.graphGroup)) { +continue; +}y += row.height; +if (row.hasText) { +iconOffset = this.charHeight - this.fm.getDescent (); +y -= this.charHeight; +}} else if (row.hasText) { +iconOffset = this.charHeight - this.fm.getDescent (); +} else { +iconOffset = 0; +}if (row.autoCalculated && av.isCalculationInProgress (row)) { +y += this.charHeight; +usedFaded = true; +g.drawImage (this.fadedImage, 0, y - row.height, this.imgWidth, y, 0, y - row.height, this.imgWidth, y, this.annotationPanel); +g.setColor (java.awt.Color.black); +continue; +}x = (startRes == 0) ? 0 : -1; +while (x < endRes - startRes) { +if (this.hasHiddenColumns) { +column = this.columnSelection.adjustForHiddenColumns (startRes + x); +if (column > row_annotations.length - 1) { +break; +}} else { +column = startRes + x; +}if ((row_annotations == null) || (row_annotations.length <= column) || (row_annotations[column] == null)) { +validRes = false; +} else { +validRes = true; +}var displayChar = validRes ? row_annotations[column].displayCharacter : null; +if (x > -1) { +if (activeRow == i) { +g.setColor (java.awt.Color.red); +if (this.columnSelection != null) { +for (var n = 0; n < this.columnSelection.size (); n++) { +var v = this.columnSelection.columnAt (n); +if (v == column) { +g.fillRect (x * this.charWidth, y, this.charWidth, this.charHeight); +}} +}}if (row.getInvalidStrucPos () > x) { +g.setColor (java.awt.Color.orange); +g.fillRect (x * this.charWidth, y, this.charWidth, this.charHeight); +} else if (row.getInvalidStrucPos () == x) { +g.setColor (java.awt.Color.orange.darker ()); +g.fillRect (x * this.charWidth, y, this.charWidth, this.charHeight); +}if (this.validCharWidth && validRes && displayChar != null && (displayChar.length > 0)) { +fmWidth = this.fm.charsWidth (displayChar.toCharArray (), 0, displayChar.length); +if (scaleColLabel) { +if (fmWidth > this.charWidth) { +fmScaling = this.charWidth; +fmScaling /= fmWidth; +g.setFont (ofont.deriveFont (java.awt.geom.AffineTransform.getScaleInstance (fmScaling, 1.0))); +fmWidth = this.charWidth; +}}charOffset = Clazz.floatToInt ((this.charWidth - fmWidth) / 2); +if (row_annotations[column].colour == null) { +g.setColor (java.awt.Color.black); +} else { +g.setColor (row_annotations[column].colour); +}if (column == 0 || row.graph > 0) { +g.drawString (displayChar, (x * this.charWidth) + charOffset, y + iconOffset); +} else if (row_annotations[column - 1] == null || (labelAllCols || !displayChar.equals (row_annotations[column - 1].displayCharacter) || (displayChar.length < 2 && row_annotations[column].secondaryStructure == ' '))) { +g.drawString (displayChar, x * this.charWidth + charOffset, y + iconOffset); +}g.setFont (ofont); +}}if (row.hasIcons) { +var ss = validRes ? row_annotations[column].secondaryStructure : '-'; +if (ss == '(') { +if (displayChar.indexOf (')') > -1) { +ss = ')'; +}}if (ss == '[') { +if ((displayChar.indexOf (']') > -1)) { +ss = ']'; +}}if (ss == '{') { +if (displayChar.indexOf ('}') > -1) { +ss = '}'; +}}if (ss == '<') { +if (displayChar.indexOf ('<') > -1) { +ss = '>'; +}}if (ss.charCodeAt (0) >= 65) { +if (displayChar.indexOf (ss.charCodeAt (0) + 32) > -1) { +ss = String.fromCharCode (ss.charCodeAt (0) + 32); +}}if (!validRes || (ss != lastSS)) { +if (x > -1) { +var nb_annot = x - temp; +switch (lastSS) { +case '(': +case ')': +this.drawStemAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +temp = x; +break; +case 'H': +if (!isRNA) { +this.drawHelixAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +break; +}case 'E': +if (!isRNA) { +this.drawSheetAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +break; +}case '{': +case '}': +case '[': +case ']': +case '>': +case '<': +case 'A': +case 'a': +case 'B': +case 'b': +case 'C': +case 'c': +case 'D': +case 'd': +case 'e': +case 'F': +case 'f': +case 'G': +case 'g': +case 'h': +case 'I': +case 'i': +case 'J': +case 'j': +case 'K': +case 'k': +case 'L': +case 'l': +case 'M': +case 'm': +case 'N': +case 'n': +case 'O': +case 'o': +case 'P': +case 'p': +case 'Q': +case 'q': +case 'R': +case 'r': +case 'S': +case 's': +case 'T': +case 't': +case 'U': +case 'u': +case 'V': +case 'v': +case 'W': +case 'w': +case 'X': +case 'x': +case 'Y': +case 'y': +case 'Z': +case 'z': +var nonCanColor = this.getNotCanonicalColor (lastSS); +this.drawNotCanonicalAnnot (g, nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +temp = x; +break; +default: +g.setColor (java.awt.Color.gray); +g.fillRect (lastSSX, y + 6 + iconOffset, (x * this.charWidth) - lastSSX, 2); +temp = x; +break; +} +}if (validRes) { +lastSS = ss; +} else { +lastSS = ' '; +}if (x > -1) { +lastSSX = (x * this.charWidth); +}}}column++; +x++; +} +if (column >= row_annotations.length) { +column = row_annotations.length - 1; +validEnd = false; +} else { +validEnd = true; +}if ((row_annotations == null) || (row_annotations.length <= column) || (row_annotations[column] == null)) { +validRes = false; +} else { +validRes = true; +}if (row.hasIcons) { +switch (lastSS) { +case 'H': +if (!isRNA) { +this.drawHelixAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +break; +}case 'E': +if (!isRNA) { +this.drawSheetAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +break; +}case '(': +case ')': +this.drawStemAnnot (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +break; +case '{': +case '}': +case '[': +case ']': +case '>': +case '<': +case 'A': +case 'a': +case 'B': +case 'b': +case 'C': +case 'c': +case 'D': +case 'd': +case 'e': +case 'F': +case 'f': +case 'G': +case 'g': +case 'h': +case 'I': +case 'i': +case 'J': +case 'j': +case 'K': +case 'k': +case 'L': +case 'l': +case 'M': +case 'm': +case 'N': +case 'n': +case 'O': +case 'o': +case 'P': +case 'p': +case 'Q': +case 'q': +case 'R': +case 'r': +case 'T': +case 't': +case 'U': +case 'u': +case 'V': +case 'v': +case 'W': +case 'w': +case 'X': +case 'x': +case 'Y': +case 'y': +case 'Z': +case 'z': +var nonCanColor = this.getNotCanonicalColor (lastSS); +this.drawNotCanonicalAnnot (g, nonCanColor, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +break; +default: +this.drawGlyphLine (g, row_annotations, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd); +break; +} +}if (row.graph > 0 && row.graphHeight > 0) { +if (row.graph == 2) { +if (row.graphGroup > -1 && !graphGroupDrawn.get (row.graphGroup)) { +var groupmax = -999999; +var groupmin = 9999999; +for (var gg = 0; gg < aa.length; gg++) { +if (aa[gg].graphGroup != row.graphGroup) { +continue; +}if (aa[gg] !== row) { +aa[gg].visible = false; +}if (aa[gg].graphMax > groupmax) { +groupmax = aa[gg].graphMax; +}if (aa[gg].graphMin < groupmin) { +groupmin = aa[gg].graphMin; +}} +for (var gg = 0; gg < aa.length; gg++) { +if (aa[gg].graphGroup == row.graphGroup) { +this.drawLineGraph (g, aa[gg], aa[gg].annotations, startRes, endRes, y, groupmin, groupmax, row.graphHeight); +}} +graphGroupDrawn.set (row.graphGroup); +} else { +this.drawLineGraph (g, row, row_annotations, startRes, endRes, y, row.graphMin, row.graphMax, row.graphHeight); +}} else if (row.graph == 1) { +this.drawBarGraph (g, row, row_annotations, startRes, endRes, row.graphMin, row.graphMax, y, renderHistogram, renderProfile, normaliseProfile); +}}} else { +if (clipst && !clipend) { +clipend = true; +}}if (row.graph > 0 && row.hasText) { +y += this.charHeight; +}if (row.graph == 0) { +y += aa[i].height; +}} +if (this.debugRedraw) { +if (this.canClip) { +if (clipst) { +System.err.println ("Start clip at : " + yfrom + " (index " + f_i + ")"); +}if (clipend) { +System.err.println ("End clip at : " + yto + " (index " + f_to + ")"); +}};System.err.println ("Annotation Rendering time:" + (System.currentTimeMillis () - stime)); +};return !usedFaded; +}, "jalview.renderer.AwtRenderPanelI,jalview.api.AlignViewportI,java.awt.Graphics,~N,~N,~N"); +Clazz.defineMethod (c$, "drawGlyphLine", +function (g, row, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { +g.setColor (jalview.renderer.AnnotationRenderer.GLYPHLINE_COLOR); +g.fillRect (lastSSX, y + 6 + iconOffset, (x * this.charWidth) - lastSSX, 2); +}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); +Clazz.defineMethod (c$, "drawSheetAnnot", +function (g, row, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { +g.setColor (jalview.renderer.AnnotationRenderer.SHEET_COLOUR); +if (!validEnd || !validRes || row == null || row[column] == null || row[column].secondaryStructure != 'E') { +g.fillRect (lastSSX, y + 4 + iconOffset, (x * this.charWidth) - lastSSX - 4, 7); +g.fillPolygon ( Clazz.newIntArray (-1, [(x * this.charWidth) - 4, (x * this.charWidth) - 4, (x * this.charWidth)]), Clazz.newIntArray (-1, [y + iconOffset, y + 14 + iconOffset, y + 7 + iconOffset]), 3); +} else { +g.fillRect (lastSSX, y + 4 + iconOffset, (x + 1) * this.charWidth - lastSSX, 7); +}}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); +Clazz.defineMethod (c$, "drawHelixAnnot", +function (g, row, lastSSX, x, y, iconOffset, startRes, column, validRes, validEnd) { +g.setColor (jalview.renderer.AnnotationRenderer.HELIX_COLOUR); +var sCol = (Clazz.doubleToInt (lastSSX / this.charWidth)) + startRes; +var x1 = lastSSX; +var x2 = (x * this.charWidth); +if (this.MAC) { +var ofs = Clazz.doubleToInt (this.charWidth / 2); +g.fillRoundRect (lastSSX, y + 4 + iconOffset, x2 - x1, 8, 8, 8); +if (sCol == 0 || row[sCol - 1] == null || row[sCol - 1].secondaryStructure != 'H') { +} else { +g.fillRoundRect (lastSSX, y + 4 + iconOffset, x2 - x1 - ofs + 1, 8, 0, 0); +}if (!validRes || row[column] == null || row[column].secondaryStructure != 'H') { +} else { +g.fillRoundRect (lastSSX + ofs, y + 4 + iconOffset, x2 - x1 - ofs + 1, 8, 0, 0); +}return; +}if (sCol == 0 || row[sCol - 1] == null || row[sCol - 1].secondaryStructure != 'H') { +g.fillArc (lastSSX, y + 4 + iconOffset, this.charWidth, 8, 90, 180); +x1 += Clazz.doubleToInt (this.charWidth / 2); +}if (!validRes || row[column] == null || row[column].secondaryStructure != 'H') { +g.fillArc ((x * this.charWidth) - this.charWidth, y + 4 + iconOffset, this.charWidth, 8, 270, 180); +x2 -= Clazz.doubleToInt (this.charWidth / 2); +}g.fillRect (x1, y + 4 + iconOffset, x2 - x1, 8); +}, "java.awt.Graphics,~A,~N,~N,~N,~N,~N,~N,~B,~B"); +Clazz.defineMethod (c$, "drawLineGraph", +function (g, _aa, aa_annotations, sRes, eRes, y, min, max, graphHeight) { +if (sRes > aa_annotations.length) { +return; +}var x = 0; +if (eRes < this.endRes) { +eRes++; +}eRes = Math.min (eRes, aa_annotations.length); +if (sRes == 0) { +x++; +}var y1 = y; +var y2 = y; +var range = max - min; +if (min < 0) { +y2 = y - Clazz.floatToInt ((0 - min / range) * graphHeight); +}g.setColor (java.awt.Color.gray); +g.drawLine (x - this.charWidth, y2, (eRes - sRes + 1) * this.charWidth, y2); +eRes = Math.min (eRes, aa_annotations.length); +var column; +var aaMax = aa_annotations.length - 1; +while (x < eRes - sRes) { +column = sRes + x; +if (this.hasHiddenColumns) { +column = this.columnSelection.adjustForHiddenColumns (column); +}if (column > aaMax) { +break; +}if (aa_annotations[column] == null || aa_annotations[column - 1] == null) { +x++; +continue; +}if (aa_annotations[column].colour == null) { +g.setColor (java.awt.Color.black); +} else { +g.setColor (aa_annotations[column].colour); +}y1 = y - Clazz.floatToInt (((aa_annotations[column - 1].value - min) / range) * graphHeight); +y2 = y - Clazz.floatToInt (((aa_annotations[column].value - min) / range) * graphHeight); +g.drawLine (x * this.charWidth - Clazz.doubleToInt (this.charWidth / 2), y1, x * this.charWidth + Clazz.doubleToInt (this.charWidth / 2), y2); +x++; +} +if (_aa.threshold != null) { +g.setColor (_aa.threshold.colour); +var g2 = g; +g2.setStroke ( new java.awt.BasicStroke (1, 2, 1, 3, Clazz.newFloatArray (-1, [5, 3]), 0)); +y2 = Clazz.floatToInt (y - ((_aa.threshold.value - min) / range) * graphHeight); +g.drawLine (0, y2, (eRes - sRes) * this.charWidth, y2); +g2.setStroke ( new java.awt.BasicStroke ()); +}}, "java.awt.Graphics,jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "drawBarGraph", +function (g, _aa, aa_annotations, sRes, eRes, min, max, y, renderHistogram, renderProfile, normaliseProfile) { +if (sRes > aa_annotations.length) { +return; +}var ofont = g.getFont (); +eRes = Math.min (eRes, aa_annotations.length); +var x = 0; +var y1 = y; +var y2 = y; +var range = max - min; +if (min < 0) { +y2 = y - Clazz.floatToInt ((0 - min / (range)) * _aa.graphHeight); +}g.setColor (java.awt.Color.gray); +g.drawLine (x, y2, (eRes - sRes) * this.charWidth, y2); +var column; +var aaMax = aa_annotations.length - 1; +while (x < eRes - sRes) { +column = sRes + x; +if (this.hasHiddenColumns) { +column = this.columnSelection.adjustForHiddenColumns (column); +}if (column > aaMax) { +break; +}if (aa_annotations[column] == null) { +x++; +continue; +}if (aa_annotations[column].colour == null) { +g.setColor (java.awt.Color.black); +} else { +g.setColor (aa_annotations[column].colour); +}y1 = y - Clazz.floatToInt (((aa_annotations[column].value - min) / (range)) * _aa.graphHeight); +if (renderHistogram) { +if (y1 - y2 > 0) { +g.fillRect (x * this.charWidth, y2, this.charWidth, y1 - y2); +} else { +g.fillRect (x * this.charWidth, y1, this.charWidth, y2 - y1); +}}if (renderProfile) { +var profl = this.getProfileFor (_aa, column); +if (profl != null && profl[2] != 0) { +var isStructureProfile = profl[0] == 1; +var isCdnaProfile = profl[0] == 2; +var ht = normaliseProfile ? y - _aa.graphHeight : y1; +var htn = normaliseProfile ? _aa.graphHeight : (y2 - y1); +var hght; +var wdth; +var ht2 = 0; +var dc; +dc = Clazz.newCharArray (isStructureProfile ? 2 : (isCdnaProfile ? 3 : 1), '\0'); +var lm = g.getFontMetrics (ofont).getLineMetrics ("Q", g); +var scale = 1 / (normaliseProfile ? profl[2] : 100); +var ofontHeight = 1 / lm.getAscent (); +var scl = 0.0; +var c = 3; +var valuesProcessed = 0; +while (valuesProcessed < profl[1]) { +if (isStructureProfile) { +dc[0] = String.fromCharCode (profl[c++]); +dc[1] = String.fromCharCode (profl[c++]); +} else if (isCdnaProfile) { +dc = jalview.analysis.CodingUtils.decodeCodon (profl[c++]); +} else { +dc[0] = String.fromCharCode (profl[c++]); +}wdth = this.charWidth; +wdth /= this.fm.charsWidth (dc, 0, dc.length); +ht += scl; +scl = htn * scale * profl[c++]; +lm = ofont.getLineMetrics (dc, 0, 1, g.getFontMetrics ().getFontRenderContext ()); +g.setFont (ofont.deriveFont (java.awt.geom.AffineTransform.getScaleInstance (wdth, scl / lm.getAscent ()))); +lm = g.getFontMetrics ().getLineMetrics (dc, 0, 1, g); +var colour = null; +if (isCdnaProfile) { +var codonTranslation = jalview.schemes.ResidueProperties.codonTranslate ( String.instantialize (dc)); +colour = this.profcolour.findColour (codonTranslation.charAt (0), column, null); +} else { +colour = this.profcolour.findColour (dc[0], column, null); +}g.setColor (colour === java.awt.Color.white ? java.awt.Color.lightGray : colour); +hght = (ht + (scl - lm.getDescent () - lm.getBaselineOffsets ()[lm.getBaselineIndex ()])); +g.drawChars (dc, 0, dc.length, x * this.charWidth, Clazz.doubleToInt (hght)); +valuesProcessed++; +} +g.setFont (ofont); +}}x++; +} +if (_aa.threshold != null) { +g.setColor (_aa.threshold.colour); +var g2 = g; +g2.setStroke ( new java.awt.BasicStroke (1, 2, 1, 3, Clazz.newFloatArray (-1, [5, 3]), 0)); +y2 = Clazz.floatToInt (y - ((_aa.threshold.value - min) / range) * _aa.graphHeight); +g.drawLine (0, y2, (eRes - sRes) * this.charWidth, y2); +g2.setStroke ( new java.awt.BasicStroke ()); +}}, "java.awt.Graphics,jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~N,~N,~N,~B,~B,~B"); +Clazz.defineMethod (c$, "drawGraph", +function (g, _aa, aa_annotations, width, y, sRes, eRes) { +eRes = Math.min (eRes, aa_annotations.length); +g.setColor (java.awt.Color.white); +g.fillRect (0, 0, width, y); +g.setColor ( new java.awt.Color (0, 0, 180)); +var x = 0; +var height; +for (var j = sRes; j < eRes; j++) { +if (aa_annotations[j] != null) { +if (aa_annotations[j].colour == null) { +g.setColor (java.awt.Color.black); +} else { +g.setColor (aa_annotations[j].colour); +}height = Clazz.floatToInt ((aa_annotations[j].value / _aa.graphMax) * y); +if (height > y) { +height = y; +}g.fillRect (x, y - height, this.charWidth, height); +}x += this.charWidth; +} +}, "java.awt.Graphics,jalview.datamodel.AlignmentAnnotation,~A,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "getNotCanonicalColor", +function (lastss) { +switch (lastss) { +case '{': +case '}': +return new java.awt.Color (255, 125, 5); +case '[': +case ']': +return new java.awt.Color (245, 115, 10); +case '>': +case '<': +return new java.awt.Color (235, 135, 15); +case 'A': +case 'a': +return new java.awt.Color (225, 105, 20); +case 'B': +case 'b': +return new java.awt.Color (215, 145, 30); +case 'C': +case 'c': +return new java.awt.Color (205, 95, 35); +case 'D': +case 'd': +return new java.awt.Color (195, 155, 45); +case 'E': +case 'e': +return new java.awt.Color (185, 85, 55); +case 'F': +case 'f': +return new java.awt.Color (175, 165, 65); +case 'G': +case 'g': +return new java.awt.Color (170, 75, 75); +case 'H': +case 'h': +return new java.awt.Color (160, 175, 85); +case 'I': +case 'i': +return new java.awt.Color (150, 65, 95); +case 'J': +case 'j': +return new java.awt.Color (140, 185, 105); +case 'K': +case 'k': +return new java.awt.Color (130, 55, 110); +case 'L': +case 'l': +return new java.awt.Color (120, 195, 120); +case 'M': +case 'm': +return new java.awt.Color (110, 45, 130); +case 'N': +case 'n': +return new java.awt.Color (100, 205, 140); +case 'O': +case 'o': +return new java.awt.Color (90, 35, 150); +case 'P': +case 'p': +return new java.awt.Color (85, 215, 160); +case 'Q': +case 'q': +return new java.awt.Color (75, 25, 170); +case 'R': +case 'r': +return new java.awt.Color (65, 225, 180); +case 'S': +case 's': +return new java.awt.Color (55, 15, 185); +case 'T': +case 't': +return new java.awt.Color (45, 235, 195); +case 'U': +case 'u': +return new java.awt.Color (35, 5, 205); +case 'V': +case 'v': +return new java.awt.Color (25, 245, 215); +case 'W': +case 'w': +return new java.awt.Color (15, 0, 225); +case 'X': +case 'x': +return new java.awt.Color (10, 255, 235); +case 'Y': +case 'y': +return new java.awt.Color (5, 150, 245); +case 'Z': +case 'z': +return new java.awt.Color (0, 80, 255); +default: +System.out.println ("This is not a interaction : " + lastss); +return null; +} +}, "~S"); +c$.GLYPHLINE_COLOR = c$.prototype.GLYPHLINE_COLOR = java.awt.Color.gray; +c$.SHEET_COLOUR = c$.prototype.SHEET_COLOUR = java.awt.Color.green; +c$.HELIX_COLOUR = c$.prototype.HELIX_COLOUR = java.awt.Color.red; +c$.STEM_COLOUR = c$.prototype.STEM_COLOUR = java.awt.Color.blue; +}); diff --git a/bin/jalview/renderer/AwtRenderPanelI.js b/bin/jalview/renderer/AwtRenderPanelI.js index e3aa6c9..42dbcc3 100644 --- a/bin/jalview/renderer/AwtRenderPanelI.js +++ b/bin/jalview/renderer/AwtRenderPanelI.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.renderer"); -Clazz.load (["java.awt.image.ImageObserver"], "jalview.renderer.AwtRenderPanelI", null, function () { -Clazz.declareInterface (jalview.renderer, "AwtRenderPanelI", java.awt.image.ImageObserver); -}); +Clazz.declarePackage ("jalview.renderer"); +Clazz.load (["java.awt.image.ImageObserver"], "jalview.renderer.AwtRenderPanelI", null, function () { +Clazz.declareInterface (jalview.renderer, "AwtRenderPanelI", java.awt.image.ImageObserver); +}); diff --git a/bin/jalview/renderer/seqfeatures/FeatureRenderer.class b/bin/jalview/renderer/seqfeatures/FeatureRenderer.class index 04d500bdac2f46622d3f26510975d07017ea7a41..9f05aad77eb4202738a62c12df24b906be8554aa 100644 GIT binary patch delta 168 zcmca%b|_!ywKmWnjhmi-CiIfuW0`n}Lx*o`HdB5dc^!CE)-7 delta 175 zcmca;b;D}I90A62o97DbWt10S;FRL}!ywKmrORZ+`HO*rfq|imp__q`L7stuY4hd^ zq3KMb(hR&(T>lun7#SI*n8ewo{xCQ(GEG(ztzo>rdA{gTMg>6zE}lOOTI>urndEpG z#bnK7859{#GMs`K!}4Wwvv@WOa|eUOS7F>>= start))) { -if (fstart < start) { -fstart = start; -}if (fend >= end) { -fend = end; -}var pady = (y1 + this.av_charHeight) - Clazz.doubleToInt (this.av_charHeight / 5); -for (this.i = fstart; this.i <= fend; this.i++) { -this.s = seq.getCharAt (this.i); -if (jalview.util.Comparison.isGap (this.s)) { -continue; -}g.setColor (featureColour); -g.fillRect ((this.i - start) * this.av_charWidth, y1, this.av_charWidth, this.av_charHeight); -if (this.offscreenRender || !this.av_validCharWidth) { -continue; -}g.setColor (java.awt.Color.white); -this.charOffset = Clazz.doubleToInt ((this.av_charWidth - this.fm.charWidth (this.s)) / 2); -g.drawString (String.valueOf (this.s), this.charOffset + (this.av_charWidth * (this.i - start)), pady); -} -}}, "java.awt.Graphics,jalview.datamodel.SequenceI,~N,~N,java.awt.Color,~N,~N,~N"); -Clazz.defineMethod (c$, "renderScoreFeature", -function (g, seq, fstart, fend, featureColour, start, end, y1, bs) { -this.updateAvConfig (); -if (((fstart <= end) && (fend >= start))) { -if (fstart < start) { -fstart = start; -}if (fend >= end) { -fend = end; -}var pady = (y1 + this.av_charHeight) - Clazz.doubleToInt (this.av_charHeight / 5); -var ystrt = 0; -var yend = this.av_charHeight; -if (bs[0] != 0) { -if (bs[1] < 128) { -yend = Clazz.doubleToInt (this.av_charHeight * (128 - bs[1]) / 512); -ystrt = this.av_charHeight - Clazz.doubleToInt (yend / 2); -} else { -ystrt = Clazz.doubleToInt (this.av_charHeight / 2); -yend = Clazz.doubleToInt (this.av_charHeight * (bs[1] - 128) / 512); -}} else { -yend = Clazz.doubleToInt (this.av_charHeight * bs[1] / 255); -ystrt = this.av_charHeight - yend; -}for (this.i = fstart; this.i <= fend; this.i++) { -this.s = seq.getCharAt (this.i); -if (jalview.util.Comparison.isGap (this.s)) { -continue; -}g.setColor (featureColour); -var x = (this.i - start) * this.av_charWidth; -g.drawRect (x, y1, this.av_charWidth, this.av_charHeight); -g.fillRect (x, y1 + ystrt, this.av_charWidth, yend); -if (this.offscreenRender || !this.av_validCharWidth) { -continue; -}g.setColor (java.awt.Color.black); -this.charOffset = Clazz.doubleToInt ((this.av_charWidth - this.fm.charWidth (this.s)) / 2); -g.drawString (String.valueOf (this.s), this.charOffset + (this.av_charWidth * (this.i - start)), pady); -} -}}, "java.awt.Graphics,jalview.datamodel.SequenceI,~N,~N,java.awt.Color,~N,~N,~N,~A"); -Clazz.defineMethod (c$, "findFeatureColour", -function (initialCol, seq, res) { -return new java.awt.Color (this.findFeatureColour (initialCol.getRGB (), seq, res)); -}, "java.awt.Color,jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "findFeatureColour", -function (initialCol, seq, column) { -if (!this.av.isShowSequenceFeatures ()) { -return initialCol; -}var sequenceFeatures = seq.getSequenceFeatures (); -if (seq !== this.lastSeq) { -this.lastSeq = seq; -this.lastSequenceFeatures = sequenceFeatures; -if (this.lastSequenceFeatures != null) { -this.sfSize = this.lastSequenceFeatures.length; -}} else { -if (this.lastSequenceFeatures !== sequenceFeatures) { -this.lastSequenceFeatures = sequenceFeatures; -if (this.lastSequenceFeatures != null) { -this.sfSize = this.lastSequenceFeatures.length; -}}}if (this.lastSequenceFeatures == null || this.sfSize == 0) { -return initialCol; -}if (jalview.util.Comparison.isGap (this.lastSeq.getCharAt (column))) { -return java.awt.Color.white.getRGB (); -}if (this.transparency != 1.0 && this.offscreenImage == null) { -this.offscreenImage = new java.awt.image.BufferedImage (1, 1, 2); -}this.currentColour = null; -this.offscreenRender = true; -if (this.offscreenImage != null) { -this.offscreenImage.setRGB (0, 0, initialCol); -this.drawSequence (this.offscreenImage.getGraphics (), this.lastSeq, column, column, 0); -return this.offscreenImage.getRGB (0, 0); -} else { -this.drawSequence (null, this.lastSeq, this.lastSeq.findPosition (column), -1, -1); -if (this.currentColour == null) { -return initialCol; -} else { -return (this.currentColour).intValue (); -}}}, "~N,jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "drawSequence", -function (g, seq, start, end, y1) { -var sequenceFeatures = seq.getSequenceFeatures (); -if (sequenceFeatures == null || sequenceFeatures.length == 0) { -return; -}if (g != null) { -this.fm = g.getFontMetrics (); -}this.updateFeatures (); -if (this.lastSeq == null || seq !== this.lastSeq || sequenceFeatures !== this.lastSequenceFeatures) { -this.lastSeq = seq; -this.lastSequenceFeatures = sequenceFeatures; -}if (this.transparency != 1 && g != null) { -var g2 = g; -g2.setComposite (java.awt.AlphaComposite.getInstance (3, this.transparency)); -}if (!this.offscreenRender) { -this.spos = this.lastSeq.findPosition (start); -this.epos = this.lastSeq.findPosition (end); -}this.sfSize = this.lastSequenceFeatures.length; -var type; -for (var renderIndex = 0; renderIndex < this.renderOrder.length; renderIndex++) { -type = this.renderOrder[renderIndex]; -if (type == null || !this.showFeatureOfType (type)) { -continue; -}for (this.sfindex = 0; this.sfindex < this.sfSize; this.sfindex++) { -var sequenceFeature = this.lastSequenceFeatures[this.sfindex]; -if (!sequenceFeature.type.equals (type)) { -continue; -}if (this.featureGroups != null && sequenceFeature.featureGroup != null && sequenceFeature.featureGroup.length != 0 && this.featureGroups.containsKey (sequenceFeature.featureGroup) && !this.featureGroups.get (sequenceFeature.featureGroup).booleanValue ()) { -continue; -}if (!this.offscreenRender && (sequenceFeature.getBegin () > this.epos || sequenceFeature.getEnd () < this.spos)) { -continue; -}if (this.offscreenRender && this.offscreenImage == null) { -if (sequenceFeature.begin <= start && sequenceFeature.end >= start) { -this.currentColour = new Integer (this.getColour (sequenceFeature).getRGB ()); -}} else if (sequenceFeature.type.equals ("disulfide bond")) { -this.renderFeature (g, seq, seq.findIndex (sequenceFeature.begin) - 1, seq.findIndex (sequenceFeature.begin) - 1, this.getColour (sequenceFeature), start, end, y1); -this.renderFeature (g, seq, seq.findIndex (sequenceFeature.end) - 1, seq.findIndex (sequenceFeature.end) - 1, this.getColour (sequenceFeature), start, end, y1); -} else if (this.showFeature (sequenceFeature)) { -if (this.av_isShowSeqFeatureHeight && !Float.isNaN (sequenceFeature.score)) { -this.renderScoreFeature (g, seq, seq.findIndex (sequenceFeature.begin) - 1, seq.findIndex (sequenceFeature.end) - 1, this.getColour (sequenceFeature), start, end, y1, this.normaliseScore (sequenceFeature)); -} else { -this.renderFeature (g, seq, seq.findIndex (sequenceFeature.begin) - 1, seq.findIndex (sequenceFeature.end) - 1, this.getColour (sequenceFeature), start, end, y1); -}}} -} -if (this.transparency != 1.0 && g != null && this.transparencyAvailable) { -var g2 = g; -g2.setComposite (java.awt.AlphaComposite.getInstance (3, 1.0)); -}}, "java.awt.Graphics,jalview.datamodel.SequenceI,~N,~N,~N"); -Clazz.defineMethod (c$, "setTransparencyAvailable", -function (isTransparencyAvailable) { -this.transparencyAvailable = isTransparencyAvailable; -}, "~B"); -Clazz.overrideMethod (c$, "isTransparencyAvailable", -function () { -return this.transparencyAvailable; -}); -Clazz.overrideMethod (c$, "featuresAdded", -function () { -this.lastSeq = null; -this.findAllFeatures (); -}); -}); +Clazz.declarePackage ("jalview.renderer.seqfeatures"); +Clazz.load (["jalview.viewmodel.seqfeatures.FeatureRendererModel"], "jalview.renderer.seqfeatures.FeatureRenderer", ["jalview.util.Comparison", "java.awt.AlphaComposite", "$.Color", "java.awt.image.BufferedImage", "java.lang.Float"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fm = null; +this.charOffset = 0; +this.offscreenRender = false; +this.lastSeq = null; +this.s = '\0'; +this.i = 0; +this.av_charHeight = 0; +this.av_charWidth = 0; +this.av_validCharWidth = false; +this.av_isShowSeqFeatureHeight = false; +this.offscreenImage = null; +this.lastSequenceFeatures = null; +this.sfSize = 0; +this.sfindex = 0; +this.spos = 0; +this.epos = 0; +this.transparencyAvailable = true; +Clazz.instantialize (this, arguments); +}, jalview.renderer.seqfeatures, "FeatureRenderer", jalview.viewmodel.seqfeatures.FeatureRendererModel); +Clazz.defineMethod (c$, "updateAvConfig", +function () { +this.av_charHeight = this.av.getCharHeight (); +this.av_charWidth = this.av.getCharWidth (); +this.av_validCharWidth = this.av.isValidCharWidth (); +this.av_isShowSeqFeatureHeight = this.av.isShowSequenceFeaturesHeight (); +}); +Clazz.defineMethod (c$, "renderFeature", +function (g, seq, fstart, fend, featureColour, start, end, y1) { +this.updateAvConfig (); +if (((fstart <= end) && (fend >= start))) { +if (fstart < start) { +fstart = start; +}if (fend >= end) { +fend = end; +}var pady = (y1 + this.av_charHeight) - Clazz.doubleToInt (this.av_charHeight / 5); +for (this.i = fstart; this.i <= fend; this.i++) { +this.s = seq.getCharAt (this.i); +if (jalview.util.Comparison.isGap (this.s)) { +continue; +}g.setColor (featureColour); +g.fillRect ((this.i - start) * this.av_charWidth, y1, this.av_charWidth, this.av_charHeight); +if (this.offscreenRender || !this.av_validCharWidth) { +continue; +}g.setColor (java.awt.Color.white); +this.charOffset = Clazz.doubleToInt ((this.av_charWidth - this.fm.charWidth (this.s)) / 2); +g.drawString (String.valueOf (this.s), this.charOffset + (this.av_charWidth * (this.i - start)), pady); +} +}}, "java.awt.Graphics,jalview.datamodel.SequenceI,~N,~N,java.awt.Color,~N,~N,~N"); +Clazz.defineMethod (c$, "renderScoreFeature", +function (g, seq, fstart, fend, featureColour, start, end, y1, bs) { +this.updateAvConfig (); +if (((fstart <= end) && (fend >= start))) { +if (fstart < start) { +fstart = start; +}if (fend >= end) { +fend = end; +}var pady = (y1 + this.av_charHeight) - Clazz.doubleToInt (this.av_charHeight / 5); +var ystrt = 0; +var yend = this.av_charHeight; +if (bs[0] != 0) { +if (bs[1] < 128) { +yend = Clazz.doubleToInt (this.av_charHeight * (128 - bs[1]) / 512); +ystrt = this.av_charHeight - Clazz.doubleToInt (yend / 2); +} else { +ystrt = Clazz.doubleToInt (this.av_charHeight / 2); +yend = Clazz.doubleToInt (this.av_charHeight * (bs[1] - 128) / 512); +}} else { +yend = Clazz.doubleToInt (this.av_charHeight * bs[1] / 255); +ystrt = this.av_charHeight - yend; +}for (this.i = fstart; this.i <= fend; this.i++) { +this.s = seq.getCharAt (this.i); +if (jalview.util.Comparison.isGap (this.s)) { +continue; +}g.setColor (featureColour); +var x = (this.i - start) * this.av_charWidth; +g.drawRect (x, y1, this.av_charWidth, this.av_charHeight); +g.fillRect (x, y1 + ystrt, this.av_charWidth, yend); +if (this.offscreenRender || !this.av_validCharWidth) { +continue; +}g.setColor (java.awt.Color.black); +this.charOffset = Clazz.doubleToInt ((this.av_charWidth - this.fm.charWidth (this.s)) / 2); +g.drawString (String.valueOf (this.s), this.charOffset + (this.av_charWidth * (this.i - start)), pady); +} +}}, "java.awt.Graphics,jalview.datamodel.SequenceI,~N,~N,java.awt.Color,~N,~N,~N,~A"); +Clazz.defineMethod (c$, "findFeatureColour", +function (initialCol, seq, res) { +return new java.awt.Color (this.findFeatureColour (initialCol.getRGB (), seq, res)); +}, "java.awt.Color,jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "findFeatureColour", +function (initialCol, seq, column) { +if (!this.av.isShowSequenceFeatures ()) { +return initialCol; +}var sequenceFeatures = seq.getSequenceFeatures (); +if (seq !== this.lastSeq) { +this.lastSeq = seq; +this.lastSequenceFeatures = sequenceFeatures; +if (this.lastSequenceFeatures != null) { +this.sfSize = this.lastSequenceFeatures.length; +}} else { +if (this.lastSequenceFeatures !== sequenceFeatures) { +this.lastSequenceFeatures = sequenceFeatures; +if (this.lastSequenceFeatures != null) { +this.sfSize = this.lastSequenceFeatures.length; +}}}if (this.lastSequenceFeatures == null || this.sfSize == 0) { +return initialCol; +}if (jalview.util.Comparison.isGap (this.lastSeq.getCharAt (column))) { +return java.awt.Color.white.getRGB (); +}if (this.transparency != 1.0 && this.offscreenImage == null) { +this.offscreenImage = new java.awt.image.BufferedImage (1, 1, 2); +}this.currentColour = null; +this.offscreenRender = true; +if (this.offscreenImage != null) { +this.offscreenImage.setRGB (0, 0, initialCol); +this.drawSequence (this.offscreenImage.getGraphics (), this.lastSeq, column, column, 0); +return this.offscreenImage.getRGB (0, 0); +} else { +this.drawSequence (null, this.lastSeq, this.lastSeq.findPosition (column), -1, -1); +if (this.currentColour == null) { +return initialCol; +} else { +return (this.currentColour).intValue (); +}}}, "~N,jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "drawSequence", +function (g, seq, start, end, y1) { +var sequenceFeatures = seq.getSequenceFeatures (); +if (sequenceFeatures == null || sequenceFeatures.length == 0) { +return; +}if (g != null) { +this.fm = g.getFontMetrics (); +}this.updateFeatures (); +if (this.lastSeq == null || seq !== this.lastSeq || sequenceFeatures !== this.lastSequenceFeatures) { +this.lastSeq = seq; +this.lastSequenceFeatures = sequenceFeatures; +}if (this.transparency != 1 && g != null) { +var g2 = g; +g2.setComposite (java.awt.AlphaComposite.getInstance (3, this.transparency)); +}if (!this.offscreenRender) { +this.spos = this.lastSeq.findPosition (start); +this.epos = this.lastSeq.findPosition (end); +}this.sfSize = this.lastSequenceFeatures.length; +var type; +for (var renderIndex = 0; renderIndex < this.renderOrder.length; renderIndex++) { +type = this.renderOrder[renderIndex]; +if (type == null || !this.showFeatureOfType (type)) { +continue; +}for (this.sfindex = 0; this.sfindex < this.sfSize; this.sfindex++) { +var sequenceFeature = this.lastSequenceFeatures[this.sfindex]; +if (!sequenceFeature.type.equals (type)) { +continue; +}if (this.featureGroups != null && sequenceFeature.featureGroup != null && sequenceFeature.featureGroup.length != 0 && this.featureGroups.containsKey (sequenceFeature.featureGroup) && !this.featureGroups.get (sequenceFeature.featureGroup).booleanValue ()) { +continue; +}if (!this.offscreenRender && (sequenceFeature.getBegin () > this.epos || sequenceFeature.getEnd () < this.spos)) { +continue; +}if (this.offscreenRender && this.offscreenImage == null) { +if (sequenceFeature.begin <= start && sequenceFeature.end >= start) { +this.currentColour = new Integer (this.getColour (sequenceFeature).getRGB ()); +}} else if (sequenceFeature.type.equals ("disulfide bond")) { +this.renderFeature (g, seq, seq.findIndex (sequenceFeature.begin) - 1, seq.findIndex (sequenceFeature.begin) - 1, this.getColour (sequenceFeature), start, end, y1); +this.renderFeature (g, seq, seq.findIndex (sequenceFeature.end) - 1, seq.findIndex (sequenceFeature.end) - 1, this.getColour (sequenceFeature), start, end, y1); +} else if (this.showFeature (sequenceFeature)) { +if (this.av_isShowSeqFeatureHeight && !Float.isNaN (sequenceFeature.score)) { +this.renderScoreFeature (g, seq, seq.findIndex (sequenceFeature.begin) - 1, seq.findIndex (sequenceFeature.end) - 1, this.getColour (sequenceFeature), start, end, y1, this.normaliseScore (sequenceFeature)); +} else { +this.renderFeature (g, seq, seq.findIndex (sequenceFeature.begin) - 1, seq.findIndex (sequenceFeature.end) - 1, this.getColour (sequenceFeature), start, end, y1); +}}} +} +if (this.transparency != 1.0 && g != null && this.transparencyAvailable) { +var g2 = g; +g2.setComposite (java.awt.AlphaComposite.getInstance (3, 1.0)); +}}, "java.awt.Graphics,jalview.datamodel.SequenceI,~N,~N,~N"); +Clazz.defineMethod (c$, "setTransparencyAvailable", +function (isTransparencyAvailable) { +this.transparencyAvailable = isTransparencyAvailable; +}, "~B"); +Clazz.overrideMethod (c$, "isTransparencyAvailable", +function () { +return this.transparencyAvailable; +}); +Clazz.overrideMethod (c$, "featuresAdded", +function () { +this.lastSeq = null; +this.findAllFeatures (); +}); +}); diff --git a/bin/jalview/schemes/AnnotationColourGradient.class b/bin/jalview/schemes/AnnotationColourGradient.class index 65eb8136326e0787b5c323266bd7d72f9f662c9d..04210dfb9e57618e0b9231e95fcbafb5db8a6902 100644 GIT binary patch delta 32 ocmbQ@Fv($qo)qKT&H7UNnV5AMgeHHKQD$LbmJ{48CHspB0IWv|ZvX%Q delta 34 qcmbQ_FvVemo)qKz&H7UNnV9t%L?(ZfQD$RgVwU4$+AJaaiwOX`nF(_M diff --git a/bin/jalview/schemes/AnnotationColourGradient.js b/bin/jalview/schemes/AnnotationColourGradient.js index 40ed8eb..0f29e11 100644 --- a/bin/jalview/schemes/AnnotationColourGradient.js +++ b/bin/jalview/schemes/AnnotationColourGradient.js @@ -1,200 +1,200 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.FollowerColourScheme"], "jalview.schemes.AnnotationColourGradient", ["jalview.datamodel.AlignmentI", "$.GraphLine", "jalview.renderer.AnnotationRenderer", "jalview.schemes.ColourSchemeProperty", "jalview.util.Comparison", "java.awt.Color", "java.util.IdentityHashMap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.annotation = null; -this.aboveAnnotationThreshold = -1; -this.thresholdIsMinMax = false; -this.annotationThreshold = null; -this.r1 = 0; -this.g1 = 0; -this.b1 = 0; -this.rr = 0; -this.gg = 0; -this.bb = 0; -this.predefinedColours = false; -this.seqAssociated = false; -this.noGradient = false; -this.seqannot = null; -this.aamin = 0; -this.aamax = 0; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "AnnotationColourGradient", jalview.schemes.FollowerColourScheme); -Clazz.overrideMethod (c$, "applyTo", -function (sg, hiddenRepSequences) { -var acg = new jalview.schemes.AnnotationColourGradient (this.annotation, this.colourScheme, this.aboveAnnotationThreshold); -acg.thresholdIsMinMax = this.thresholdIsMinMax; -acg.annotationThreshold = (this.annotationThreshold == null) ? null : new jalview.datamodel.GraphLine (this.annotationThreshold); -acg.r1 = this.r1; -acg.g1 = this.g1; -acg.b1 = this.b1; -acg.rr = this.rr; -acg.gg = this.gg; -acg.bb = this.bb; -acg.predefinedColours = this.predefinedColours; -acg.seqAssociated = this.seqAssociated; -acg.noGradient = this.noGradient; -return acg; -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.makeConstructor (c$, -function (annotation, originalColour, aboveThreshold) { -Clazz.superConstructor (this, jalview.schemes.AnnotationColourGradient, []); -if (Clazz.instanceOf (originalColour, jalview.schemes.AnnotationColourGradient)) { -this.colourScheme = (originalColour).colourScheme; -} else { -this.colourScheme = originalColour; -}this.annotation = annotation; -this.aboveAnnotationThreshold = aboveThreshold; -if (aboveThreshold != -1 && annotation.threshold != null) { -this.annotationThreshold = annotation.threshold; -}this.r1 = 254; -this.g1 = 254; -this.b1 = 254; -this.rr = 0; -this.gg = 0; -this.bb = 0; -this.noGradient = true; -}, "jalview.datamodel.AlignmentAnnotation,jalview.schemes.ColourSchemeI,~N"); -Clazz.makeConstructor (c$, -function (annotation, minColour, maxColour, aboveThreshold) { -Clazz.superConstructor (this, jalview.schemes.AnnotationColourGradient, []); -this.annotation = annotation; -this.aboveAnnotationThreshold = aboveThreshold; -if (aboveThreshold != -1 && annotation.threshold != null) { -this.annotationThreshold = annotation.threshold; -}this.r1 = minColour.getRed (); -this.g1 = minColour.getGreen (); -this.b1 = minColour.getBlue (); -this.rr = maxColour.getRed () - this.r1; -this.gg = maxColour.getGreen () - this.g1; -this.bb = maxColour.getBlue () - this.b1; -this.noGradient = false; -this.aamax = annotation.graphMax; -this.aamin = annotation.graphMin; -if (annotation.isRNA ()) { -jalview.schemes.ColourSchemeProperty.initRnaHelicesShading (1 + Clazz.floatToInt (this.aamax)); -}}, "jalview.datamodel.AlignmentAnnotation,java.awt.Color,java.awt.Color,~N"); -Clazz.defineMethod (c$, "alignmentChanged", -function (alignment, hiddenReps) { -Clazz.superCall (this, jalview.schemes.AnnotationColourGradient, "alignmentChanged", [alignment, hiddenReps]); -if (this.seqAssociated && this.annotation.getCalcId () != null) { -if (this.seqannot != null) { -this.seqannot.clear (); -} else { -this.seqannot = new java.util.IdentityHashMap (); -}var alcontext = Clazz.instanceOf (alignment, jalview.datamodel.AlignmentI) ? alignment : alignment.getContext (); -var f = true; -var rna = false; -for (var alan, $alan = alcontext.findAnnotation (this.annotation.getCalcId ()).iterator (); $alan.hasNext () && ((alan = $alan.next ()) || true);) { -if (alan.sequenceRef != null && (alan.label != null && this.annotation != null && alan.label.equals (this.annotation.label))) { -if (!rna && alan.isRNA ()) { -rna = true; -}this.seqannot.put (alan.sequenceRef, alan); -if (f || alan.graphMax > this.aamax) { -this.aamax = alan.graphMax; -}if (f || alan.graphMin < this.aamin) { -this.aamin = alan.graphMin; -}f = false; -}} -if (rna) { -jalview.schemes.ColourSchemeProperty.initRnaHelicesShading (1 + Clazz.floatToInt (this.aamax)); -}}}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.defineMethod (c$, "getAnnotation", -function () { -return this.annotation.label; -}); -Clazz.defineMethod (c$, "getAboveThreshold", -function () { -return this.aboveAnnotationThreshold; -}); -Clazz.defineMethod (c$, "getAnnotationThreshold", -function () { -if (this.annotationThreshold == null) { -return 0; -} else { -return this.annotationThreshold.value; -}}); -Clazz.defineMethod (c$, "getMinColour", -function () { -return new java.awt.Color (Clazz.floatToInt (this.r1), Clazz.floatToInt (this.g1), Clazz.floatToInt (this.b1)); -}); -Clazz.defineMethod (c$, "getMaxColour", -function () { -return new java.awt.Color (Clazz.floatToInt (this.r1 + this.rr), Clazz.floatToInt (this.g1 + this.gg), Clazz.floatToInt (this.b1 + this.bb)); -}); -Clazz.defineMethod (c$, "findColour", -function (c) { -return java.awt.Color.red; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -var currentColour = java.awt.Color.white; -var annotation = (this.seqAssociated && this.seqannot != null ? this.seqannot.get (seq) : this.annotation); -if (annotation == null) { -return currentColour; -}if ((this.threshold == 0) || this.aboveThreshold (c, j)) { -if (annotation.annotations != null && j < annotation.annotations.length && annotation.annotations[j] != null && !jalview.util.Comparison.isGap (c)) { -var aj = annotation.annotations[j]; -if (this.aboveAnnotationThreshold == -1 || (this.annotationThreshold != null && (this.aboveAnnotationThreshold == 1 ? aj.value >= this.annotationThreshold.value : aj.value <= this.annotationThreshold.value))) { -if (this.predefinedColours && aj.colour != null && !aj.colour.equals (java.awt.Color.black)) { -currentColour = aj.colour; -} else if (annotation.hasIcons && annotation.graph == 0) { -if (aj.secondaryStructure > ' ' && aj.secondaryStructure != '.' && aj.secondaryStructure != '-') { -if (this.colourScheme != null) { -currentColour = this.colourScheme.findColour (c, j, seq); -} else { -if (annotation.isRNA ()) { -currentColour = jalview.schemes.ColourSchemeProperty.rnaHelices[Clazz.floatToInt (aj.value)]; -} else { -currentColour = annotation.annotations[j].secondaryStructure == 'H' ? jalview.renderer.AnnotationRenderer.HELIX_COLOUR : annotation.annotations[j].secondaryStructure == 'E' ? jalview.renderer.AnnotationRenderer.SHEET_COLOUR : jalview.renderer.AnnotationRenderer.STEM_COLOUR; -}}} else { -return java.awt.Color.white; -}} else if (this.noGradient) { -if (this.colourScheme != null) { -currentColour = this.colourScheme.findColour (c, j, seq); -} else { -if (aj.colour != null) { -currentColour = aj.colour; -}}} else { -currentColour = this.shadeCalculation (annotation, j); -}}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}}}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "shadeCalculation", -($fz = function (annotation, j) { -var range = 1; -if (this.thresholdIsMinMax && annotation.threshold != null && this.aboveAnnotationThreshold == 1 && annotation.annotations[j].value >= annotation.threshold.value) { -range = (annotation.annotations[j].value - annotation.threshold.value) / (annotation.graphMax - annotation.threshold.value); -} else if (this.thresholdIsMinMax && annotation.threshold != null && this.aboveAnnotationThreshold == 0 && annotation.annotations[j].value >= annotation.graphMin) { -range = (annotation.annotations[j].value - annotation.graphMin) / (annotation.threshold.value - annotation.graphMin); -} else { -if (annotation.graphMax != annotation.graphMin) { -range = (annotation.annotations[j].value - annotation.graphMin) / (annotation.graphMax - annotation.graphMin); -} else { -range = 0; -}}var dr = Clazz.floatToInt (this.rr * range + this.r1); -var dg = Clazz.floatToInt (this.gg * range + this.g1); -var db = Clazz.floatToInt (this.bb * range + this.b1); -return new java.awt.Color (dr, dg, db); -}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,~N"); -Clazz.defineMethod (c$, "isPredefinedColours", -function () { -return this.predefinedColours; -}); -Clazz.defineMethod (c$, "setPredefinedColours", -function (predefinedColours) { -this.predefinedColours = predefinedColours; -}, "~B"); -Clazz.defineMethod (c$, "isSeqAssociated", -function () { -return this.seqAssociated; -}); -Clazz.defineMethod (c$, "setSeqAssociated", -function (sassoc) { -this.seqAssociated = sassoc; -}, "~B"); -Clazz.defineStatics (c$, -"NO_THRESHOLD", -1, -"BELOW_THRESHOLD", 0, -"ABOVE_THRESHOLD", 1); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.FollowerColourScheme"], "jalview.schemes.AnnotationColourGradient", ["jalview.datamodel.AlignmentI", "$.GraphLine", "jalview.renderer.AnnotationRenderer", "jalview.schemes.ColourSchemeProperty", "jalview.util.Comparison", "java.awt.Color", "java.util.IdentityHashMap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.annotation = null; +this.aboveAnnotationThreshold = -1; +this.thresholdIsMinMax = false; +this.annotationThreshold = null; +this.r1 = 0; +this.g1 = 0; +this.b1 = 0; +this.rr = 0; +this.gg = 0; +this.bb = 0; +this.predefinedColours = false; +this.seqAssociated = false; +this.noGradient = false; +this.seqannot = null; +this.aamin = 0; +this.aamax = 0; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "AnnotationColourGradient", jalview.schemes.FollowerColourScheme); +Clazz.overrideMethod (c$, "applyTo", +function (sg, hiddenRepSequences) { +var acg = new jalview.schemes.AnnotationColourGradient (this.annotation, this.colourScheme, this.aboveAnnotationThreshold); +acg.thresholdIsMinMax = this.thresholdIsMinMax; +acg.annotationThreshold = (this.annotationThreshold == null) ? null : new jalview.datamodel.GraphLine (this.annotationThreshold); +acg.r1 = this.r1; +acg.g1 = this.g1; +acg.b1 = this.b1; +acg.rr = this.rr; +acg.gg = this.gg; +acg.bb = this.bb; +acg.predefinedColours = this.predefinedColours; +acg.seqAssociated = this.seqAssociated; +acg.noGradient = this.noGradient; +return acg; +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.makeConstructor (c$, +function (annotation, originalColour, aboveThreshold) { +Clazz.superConstructor (this, jalview.schemes.AnnotationColourGradient, []); +if (Clazz.instanceOf (originalColour, jalview.schemes.AnnotationColourGradient)) { +this.colourScheme = (originalColour).colourScheme; +} else { +this.colourScheme = originalColour; +}this.annotation = annotation; +this.aboveAnnotationThreshold = aboveThreshold; +if (aboveThreshold != -1 && annotation.threshold != null) { +this.annotationThreshold = annotation.threshold; +}this.r1 = 254; +this.g1 = 254; +this.b1 = 254; +this.rr = 0; +this.gg = 0; +this.bb = 0; +this.noGradient = true; +}, "jalview.datamodel.AlignmentAnnotation,jalview.schemes.ColourSchemeI,~N"); +Clazz.makeConstructor (c$, +function (annotation, minColour, maxColour, aboveThreshold) { +Clazz.superConstructor (this, jalview.schemes.AnnotationColourGradient, []); +this.annotation = annotation; +this.aboveAnnotationThreshold = aboveThreshold; +if (aboveThreshold != -1 && annotation.threshold != null) { +this.annotationThreshold = annotation.threshold; +}this.r1 = minColour.getRed (); +this.g1 = minColour.getGreen (); +this.b1 = minColour.getBlue (); +this.rr = maxColour.getRed () - this.r1; +this.gg = maxColour.getGreen () - this.g1; +this.bb = maxColour.getBlue () - this.b1; +this.noGradient = false; +this.aamax = annotation.graphMax; +this.aamin = annotation.graphMin; +if (annotation.isRNA ()) { +jalview.schemes.ColourSchemeProperty.initRnaHelicesShading (1 + Clazz.floatToInt (this.aamax)); +}}, "jalview.datamodel.AlignmentAnnotation,java.awt.Color,java.awt.Color,~N"); +Clazz.defineMethod (c$, "alignmentChanged", +function (alignment, hiddenReps) { +Clazz.superCall (this, jalview.schemes.AnnotationColourGradient, "alignmentChanged", [alignment, hiddenReps]); +if (this.seqAssociated && this.annotation.getCalcId () != null) { +if (this.seqannot != null) { +this.seqannot.clear (); +} else { +this.seqannot = new java.util.IdentityHashMap (); +}var alcontext = Clazz.instanceOf (alignment, jalview.datamodel.AlignmentI) ? alignment : alignment.getContext (); +var f = true; +var rna = false; +for (var alan, $alan = alcontext.findAnnotation (this.annotation.getCalcId ()).iterator (); $alan.hasNext () && ((alan = $alan.next ()) || true);) { +if (alan.sequenceRef != null && (alan.label != null && this.annotation != null && alan.label.equals (this.annotation.label))) { +if (!rna && alan.isRNA ()) { +rna = true; +}this.seqannot.put (alan.sequenceRef, alan); +if (f || alan.graphMax > this.aamax) { +this.aamax = alan.graphMax; +}if (f || alan.graphMin < this.aamin) { +this.aamin = alan.graphMin; +}f = false; +}} +if (rna) { +jalview.schemes.ColourSchemeProperty.initRnaHelicesShading (1 + Clazz.floatToInt (this.aamax)); +}}}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.defineMethod (c$, "getAnnotation", +function () { +return this.annotation.label; +}); +Clazz.defineMethod (c$, "getAboveThreshold", +function () { +return this.aboveAnnotationThreshold; +}); +Clazz.defineMethod (c$, "getAnnotationThreshold", +function () { +if (this.annotationThreshold == null) { +return 0; +} else { +return this.annotationThreshold.value; +}}); +Clazz.defineMethod (c$, "getMinColour", +function () { +return new java.awt.Color (Clazz.floatToInt (this.r1), Clazz.floatToInt (this.g1), Clazz.floatToInt (this.b1)); +}); +Clazz.defineMethod (c$, "getMaxColour", +function () { +return new java.awt.Color (Clazz.floatToInt (this.r1 + this.rr), Clazz.floatToInt (this.g1 + this.gg), Clazz.floatToInt (this.b1 + this.bb)); +}); +Clazz.defineMethod (c$, "findColour", +function (c) { +return java.awt.Color.red; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +var currentColour = java.awt.Color.white; +var annotation = (this.seqAssociated && this.seqannot != null ? this.seqannot.get (seq) : this.annotation); +if (annotation == null) { +return currentColour; +}if ((this.threshold == 0) || this.aboveThreshold (c, j)) { +if (annotation.annotations != null && j < annotation.annotations.length && annotation.annotations[j] != null && !jalview.util.Comparison.isGap (c)) { +var aj = annotation.annotations[j]; +if (this.aboveAnnotationThreshold == -1 || (this.annotationThreshold != null && (this.aboveAnnotationThreshold == 1 ? aj.value >= this.annotationThreshold.value : aj.value <= this.annotationThreshold.value))) { +if (this.predefinedColours && aj.colour != null && !aj.colour.equals (java.awt.Color.black)) { +currentColour = aj.colour; +} else if (annotation.hasIcons && annotation.graph == 0) { +if (aj.secondaryStructure > ' ' && aj.secondaryStructure != '.' && aj.secondaryStructure != '-') { +if (this.colourScheme != null) { +currentColour = this.colourScheme.findColour (c, j, seq); +} else { +if (annotation.isRNA ()) { +currentColour = jalview.schemes.ColourSchemeProperty.rnaHelices[Clazz.floatToInt (aj.value)]; +} else { +currentColour = annotation.annotations[j].secondaryStructure == 'H' ? jalview.renderer.AnnotationRenderer.HELIX_COLOUR : annotation.annotations[j].secondaryStructure == 'E' ? jalview.renderer.AnnotationRenderer.SHEET_COLOUR : jalview.renderer.AnnotationRenderer.STEM_COLOUR; +}}} else { +return java.awt.Color.white; +}} else if (this.noGradient) { +if (this.colourScheme != null) { +currentColour = this.colourScheme.findColour (c, j, seq); +} else { +if (aj.colour != null) { +currentColour = aj.colour; +}}} else { +currentColour = this.shadeCalculation (annotation, j); +}}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}}}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "shadeCalculation", +($fz = function (annotation, j) { +var range = 1; +if (this.thresholdIsMinMax && annotation.threshold != null && this.aboveAnnotationThreshold == 1 && annotation.annotations[j].value >= annotation.threshold.value) { +range = (annotation.annotations[j].value - annotation.threshold.value) / (annotation.graphMax - annotation.threshold.value); +} else if (this.thresholdIsMinMax && annotation.threshold != null && this.aboveAnnotationThreshold == 0 && annotation.annotations[j].value >= annotation.graphMin) { +range = (annotation.annotations[j].value - annotation.graphMin) / (annotation.threshold.value - annotation.graphMin); +} else { +if (annotation.graphMax != annotation.graphMin) { +range = (annotation.annotations[j].value - annotation.graphMin) / (annotation.graphMax - annotation.graphMin); +} else { +range = 0; +}}var dr = Clazz.floatToInt (this.rr * range + this.r1); +var dg = Clazz.floatToInt (this.gg * range + this.g1); +var db = Clazz.floatToInt (this.bb * range + this.b1); +return new java.awt.Color (dr, dg, db); +}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation,~N"); +Clazz.defineMethod (c$, "isPredefinedColours", +function () { +return this.predefinedColours; +}); +Clazz.defineMethod (c$, "setPredefinedColours", +function (predefinedColours) { +this.predefinedColours = predefinedColours; +}, "~B"); +Clazz.defineMethod (c$, "isSeqAssociated", +function () { +return this.seqAssociated; +}); +Clazz.defineMethod (c$, "setSeqAssociated", +function (sassoc) { +this.seqAssociated = sassoc; +}, "~B"); +Clazz.defineStatics (c$, +"NO_THRESHOLD", -1, +"BELOW_THRESHOLD", 0, +"ABOVE_THRESHOLD", 1); +}); diff --git a/bin/jalview/schemes/Blosum62ColourScheme.class b/bin/jalview/schemes/Blosum62ColourScheme.class index f86459836c9f7470507a4279e3e1ea24d6f1fc5f..17dd25922f561f5e7c552c5853fef32c7cb0279f 100644 GIT binary patch delta 30 mcmdldv|DJyVm3yB%}dxWF*4gSa89n|Fk=46AT)U+M=t=I{0XiA delta 33 pcmdljv`=WmVm3zM%}dxWF)}+aa80h{Fk<_~!2gSZY4SRbUI4oA3a= this.consensus.length || this.consensus[j] == null || (this.threshold != 0 && !this.aboveThreshold (res, j))) { -return java.awt.Color.white; -}var currentColour; -if (!jalview.util.Comparison.isGap (res)) { -var max = this.consensus[j].get ("R"); -if (max.indexOf (res) > -1) { -currentColour = new java.awt.Color (154, 154, 255); -} else { -var c = 0; -var max_aa = 0; -var n = max.length; -do { -c += jalview.schemes.ResidueProperties.getBLOSUM62 (max.charAt (max_aa), res); -} while (++max_aa < n); -if (c > 0) { -currentColour = new java.awt.Color (204, 204, 255); -} else { -currentColour = java.awt.Color.white; -}}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}} else { -return java.awt.Color.white; -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "applyTo", -function (sg, hiddenRepSequences) { -var newcs = Clazz.superCall (this, jalview.schemes.Blosum62ColourScheme, "applyTo", [sg, hiddenRepSequences]); -return newcs; -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.Blosum62ColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "Blosum62ColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.defineMethod (c$, "findColour", +function (res, j, seq) { +if ('a' <= res && res <= 'z') { +res = String.fromCharCode (res.charCodeAt (0) - (32)); +}if (this.consensus == null || j >= this.consensus.length || this.consensus[j] == null || (this.threshold != 0 && !this.aboveThreshold (res, j))) { +return java.awt.Color.white; +}var currentColour; +if (!jalview.util.Comparison.isGap (res)) { +var max = this.consensus[j].get ("R"); +if (max.indexOf (res) > -1) { +currentColour = new java.awt.Color (154, 154, 255); +} else { +var c = 0; +var max_aa = 0; +var n = max.length; +do { +c += jalview.schemes.ResidueProperties.getBLOSUM62 (max.charAt (max_aa), res); +} while (++max_aa < n); +if (c > 0) { +currentColour = new java.awt.Color (204, 204, 255); +} else { +currentColour = java.awt.Color.white; +}}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}} else { +return java.awt.Color.white; +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "applyTo", +function (sg, hiddenRepSequences) { +var newcs = Clazz.superCall (this, jalview.schemes.Blosum62ColourScheme, "applyTo", [sg, hiddenRepSequences]); +return newcs; +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +}); diff --git a/bin/jalview/schemes/BuriedColourScheme.js b/bin/jalview/schemes/BuriedColourScheme.js index fa820e3..0ca91cd 100644 --- a/bin/jalview/schemes/BuriedColourScheme.js +++ b/bin/jalview/schemes/BuriedColourScheme.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.BuriedColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "BuriedColourScheme", jalview.schemes.ScoreColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.BuriedColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.buried, 0.05, 4.6]); -}); -Clazz.overrideMethod (c$, "makeColour", -function (c) { -return new java.awt.Color (0, (1.0 - c), c); -}, "~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.BuriedColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "BuriedColourScheme", jalview.schemes.ScoreColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.BuriedColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.buried, 0.05, 4.6]); +}); +Clazz.overrideMethod (c$, "makeColour", +function (c) { +return new java.awt.Color (0, (1.0 - c), c); +}, "~N"); +}); diff --git a/bin/jalview/schemes/ClustalxColourScheme.js b/bin/jalview/schemes/ClustalxColourScheme.js index 3897463..0556777 100644 --- a/bin/jalview/schemes/ClustalxColourScheme.js +++ b/bin/jalview/schemes/ClustalxColourScheme.js @@ -1,237 +1,237 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.HashMap"], ["jalview.schemes.ConsensusColour", "$.ClustalxColourScheme"], ["jalview.schemes.Consensus", "$.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.decorateAsClass (function () { -this.cons2 = null; -this.colours = null; -this.residueColour = null; -this.size = 0; -this.conses = null; -this.includeGaps = true; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "ClustalxColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.prepareFields (c$, function () { -this.conses = new Array (32); -}); -Clazz.makeConstructor (c$, -function (alignment, hiddenReps) { -Clazz.superConstructor (this, jalview.schemes.ClustalxColourScheme, []); -this.alignmentChanged (alignment, hiddenReps); -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.overrideMethod (c$, "alignmentChanged", -function (alignment, hiddenReps) { -var maxWidth = alignment.getWidth (); -var seqs = alignment.getSequences (hiddenReps); -this.cons2 = Clazz.newIntArray (maxWidth, 24, 0); -this.includeGaps = this.isIncludeGaps (); -var start = 0; -for (var j = 0; j < 24; j++) { -for (var i = 0; i < maxWidth; i++) { -this.cons2[i][j] = 0; -} -} -var res; -var i; -var j = 0; -var seq; -for (var sq, $sq = seqs.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { -seq = sq.getSequence (); -var end_j = seq.length - 1; -for (i = start; i <= end_j; i++) { -if ((seq.length - 1) < i) { -res = 23; -} else { -res = jalview.schemes.ResidueProperties.aaIndex[seq[i].charCodeAt (0)]; -}this.cons2[i][res]++; -} -j++; -} -this.size = seqs.size (); -this.makeColours (); -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.defineMethod (c$, "makeColours", -function () { -this.conses[0] = new jalview.schemes.Consensus ("WLVIMAFCYHP", 60); -this.conses[1] = new jalview.schemes.Consensus ("WLVIMAFCYHP", 80); -this.conses[2] = new jalview.schemes.Consensus ("ED", 50); -this.conses[3] = new jalview.schemes.Consensus ("KR", 60); -this.conses[4] = new jalview.schemes.Consensus ("G", 50); -this.conses[5] = new jalview.schemes.Consensus ("N", 50); -this.conses[6] = new jalview.schemes.Consensus ("QE", 50); -this.conses[7] = new jalview.schemes.Consensus ("P", 50); -this.conses[8] = new jalview.schemes.Consensus ("TS", 50); -this.conses[26] = new jalview.schemes.Consensus ("A", 85); -this.conses[27] = new jalview.schemes.Consensus ("C", 85); -this.conses[10] = new jalview.schemes.Consensus ("E", 85); -this.conses[11] = new jalview.schemes.Consensus ("F", 85); -this.conses[12] = new jalview.schemes.Consensus ("G", 85); -this.conses[13] = new jalview.schemes.Consensus ("H", 85); -this.conses[14] = new jalview.schemes.Consensus ("I", 85); -this.conses[15] = new jalview.schemes.Consensus ("L", 85); -this.conses[16] = new jalview.schemes.Consensus ("M", 85); -this.conses[17] = new jalview.schemes.Consensus ("N", 85); -this.conses[18] = new jalview.schemes.Consensus ("P", 85); -this.conses[19] = new jalview.schemes.Consensus ("Q", 85); -this.conses[20] = new jalview.schemes.Consensus ("R", 85); -this.conses[21] = new jalview.schemes.Consensus ("S", 85); -this.conses[22] = new jalview.schemes.Consensus ("T", 85); -this.conses[23] = new jalview.schemes.Consensus ("V", 85); -this.conses[24] = new jalview.schemes.Consensus ("W", 85); -this.conses[25] = new jalview.schemes.Consensus ("Y", 85); -this.conses[28] = new jalview.schemes.Consensus ("K", 85); -this.conses[29] = new jalview.schemes.Consensus ("D", 85); -this.conses[30] = new jalview.schemes.Consensus ("G", 0); -this.conses[31] = new jalview.schemes.Consensus ("P", 0); -this.colours = new Array (11); -var tmp8 = new Array (1); -tmp8[0] = this.conses[30]; -this.colours[7] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.ORANGE), tmp8); -var tmp9 = new Array (1); -tmp9[0] = this.conses[31]; -this.colours[8] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.YELLOW), tmp9); -var tmp10 = new Array (1); -tmp10[0] = this.conses[27]; -this.colours[9] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.PINK), tmp8); -var tmp1 = new Array (14); -tmp1[0] = this.conses[0]; -tmp1[1] = this.conses[1]; -tmp1[2] = this.conses[26]; -tmp1[3] = this.conses[27]; -tmp1[4] = this.conses[11]; -tmp1[5] = this.conses[13]; -tmp1[6] = this.conses[14]; -tmp1[7] = this.conses[15]; -tmp1[8] = this.conses[16]; -tmp1[9] = this.conses[23]; -tmp1[10] = this.conses[24]; -tmp1[11] = this.conses[25]; -tmp1[12] = this.conses[18]; -tmp1[13] = this.conses[19]; -this.colours[0] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.BLUE), tmp1); -this.colours[10] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.CYAN), tmp1); -var tmp2 = new Array (5); -tmp2[0] = this.conses[8]; -tmp2[1] = this.conses[21]; -tmp2[2] = this.conses[22]; -tmp2[3] = this.conses[0]; -tmp2[4] = this.conses[1]; -this.colours[1] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.GREEN), tmp2); -var tmp3 = new Array (3); -tmp3[0] = this.conses[17]; -tmp3[1] = this.conses[29]; -tmp3[2] = this.conses[5]; -this.colours[2] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.GREEN), tmp3); -var tmp4 = new Array (6); -tmp4[0] = this.conses[6]; -tmp4[1] = this.conses[19]; -tmp4[2] = this.conses[22]; -tmp4[3] = this.conses[3]; -tmp4[4] = this.conses[28]; -tmp4[5] = this.conses[20]; -this.colours[3] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.GREEN), tmp4); -var tmp5 = new Array (4); -tmp5[0] = this.conses[3]; -tmp5[1] = this.conses[28]; -tmp5[2] = this.conses[20]; -tmp5[3] = this.conses[19]; -this.colours[4] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.RED), tmp5); -var tmp6 = new Array (6); -tmp6[0] = this.conses[3]; -tmp6[1] = this.conses[29]; -tmp6[2] = this.conses[10]; -tmp6[3] = this.conses[6]; -tmp6[4] = this.conses[19]; -tmp6[5] = this.conses[2]; -this.colours[5] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.MAGENTA), tmp6); -var tmp7 = new Array (5); -tmp7[0] = this.conses[3]; -tmp7[1] = this.conses[29]; -tmp7[2] = this.conses[10]; -tmp7[3] = this.conses[17]; -tmp7[4] = this.conses[2]; -this.colours[6] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.MAGENTA), tmp7); -this.residueColour = new Array (20); -this.residueColour[0] = this.colours[0]; -this.residueColour[1] = this.colours[4]; -this.residueColour[2] = this.colours[2]; -this.residueColour[3] = this.colours[6]; -this.residueColour[4] = this.colours[0]; -this.residueColour[5] = this.colours[3]; -this.residueColour[6] = this.colours[5]; -this.residueColour[7] = this.colours[7]; -this.residueColour[8] = this.colours[10]; -this.residueColour[9] = this.colours[0]; -this.residueColour[10] = this.colours[0]; -this.residueColour[11] = this.colours[4]; -this.residueColour[12] = this.colours[0]; -this.residueColour[13] = this.colours[0]; -this.residueColour[14] = this.colours[8]; -this.residueColour[15] = this.colours[1]; -this.residueColour[16] = this.colours[1]; -this.residueColour[17] = this.colours[0]; -this.residueColour[18] = this.colours[10]; -this.residueColour[19] = this.colours[0]; -}); -Clazz.defineMethod (c$, "findColour", -function (c) { -return java.awt.Color.pink; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -var currentColour; -if (this.cons2.length <= j || (this.includeGaps && this.threshold != 0 && !this.aboveThreshold (c, j))) { -return java.awt.Color.white; -}var i = jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]; -currentColour = java.awt.Color.white; -if (i > 19) { -return currentColour; -}for (var k = 0; k < this.residueColour[i].conses.length; k++) { -if (this.residueColour[i].conses[k].isConserved (this.cons2, j, this.size, this.includeGaps)) { -currentColour = this.residueColour[i].c; -}} -if (i == 4) { -if (this.conses[27].isConserved (this.cons2, j, this.size, this.includeGaps)) { -currentColour = jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.PINK); -}}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "isIncludeGaps", -function () { -return this.includeGaps; -}); -Clazz.defineMethod (c$, "setIncludeGaps", -function (includeGaps) { -this.includeGaps = includeGaps; -}, "~B"); -Clazz.overrideMethod (c$, "applyTo", -function (sg, hiddenRepSequences) { -var css = new jalview.schemes.ClustalxColourScheme (sg, hiddenRepSequences); -css.includeGaps = this.includeGaps; -return css; -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.defineStatics (c$, -"EIGHTY_FIVE", 85, -"FIFTY", 50, -"EIGHTY", 80, -"SIXTY", 60); -c$.colhash = c$.prototype.colhash = new java.util.HashMap (); -{ -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.RED, new java.awt.Color (0.9, 0.2, 0.1)); -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.BLUE, new java.awt.Color (0.5, 0.7, 0.9)); -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.GREEN, new java.awt.Color (0.1, 0.8, 0.1)); -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.ORANGE, new java.awt.Color (0.9, 0.6, 0.3)); -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.CYAN, new java.awt.Color (0.1, 0.7, 0.7)); -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.PINK, new java.awt.Color (0.9, 0.5, 0.5)); -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.MAGENTA, new java.awt.Color (0.8, 0.3, 0.8)); -jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.YELLOW, new java.awt.Color (0.8, 0.8, 0.0)); -}c$ = Clazz.decorateAsClass (function () { -this.conses = null; -this.c = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "ConsensusColour"); -Clazz.makeConstructor (c$, -function (c, conses) { -this.conses = conses; -this.c = c; -}, "java.awt.Color,~A"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.HashMap"], ["jalview.schemes.ConsensusColour", "$.ClustalxColourScheme"], ["jalview.schemes.Consensus", "$.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.decorateAsClass (function () { +this.cons2 = null; +this.colours = null; +this.residueColour = null; +this.size = 0; +this.conses = null; +this.includeGaps = true; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "ClustalxColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.prepareFields (c$, function () { +this.conses = new Array (32); +}); +Clazz.makeConstructor (c$, +function (alignment, hiddenReps) { +Clazz.superConstructor (this, jalview.schemes.ClustalxColourScheme, []); +this.alignmentChanged (alignment, hiddenReps); +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.overrideMethod (c$, "alignmentChanged", +function (alignment, hiddenReps) { +var maxWidth = alignment.getWidth (); +var seqs = alignment.getSequences (hiddenReps); +this.cons2 = Clazz.newIntArray (maxWidth, 24, 0); +this.includeGaps = this.isIncludeGaps (); +var start = 0; +for (var j = 0; j < 24; j++) { +for (var i = 0; i < maxWidth; i++) { +this.cons2[i][j] = 0; +} +} +var res; +var i; +var j = 0; +var seq; +for (var sq, $sq = seqs.iterator (); $sq.hasNext () && ((sq = $sq.next ()) || true);) { +seq = sq.getSequence (); +var end_j = seq.length - 1; +for (i = start; i <= end_j; i++) { +if ((seq.length - 1) < i) { +res = 23; +} else { +res = jalview.schemes.ResidueProperties.aaIndex[seq[i].charCodeAt (0)]; +}this.cons2[i][res]++; +} +j++; +} +this.size = seqs.size (); +this.makeColours (); +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.defineMethod (c$, "makeColours", +function () { +this.conses[0] = new jalview.schemes.Consensus ("WLVIMAFCYHP", 60); +this.conses[1] = new jalview.schemes.Consensus ("WLVIMAFCYHP", 80); +this.conses[2] = new jalview.schemes.Consensus ("ED", 50); +this.conses[3] = new jalview.schemes.Consensus ("KR", 60); +this.conses[4] = new jalview.schemes.Consensus ("G", 50); +this.conses[5] = new jalview.schemes.Consensus ("N", 50); +this.conses[6] = new jalview.schemes.Consensus ("QE", 50); +this.conses[7] = new jalview.schemes.Consensus ("P", 50); +this.conses[8] = new jalview.schemes.Consensus ("TS", 50); +this.conses[26] = new jalview.schemes.Consensus ("A", 85); +this.conses[27] = new jalview.schemes.Consensus ("C", 85); +this.conses[10] = new jalview.schemes.Consensus ("E", 85); +this.conses[11] = new jalview.schemes.Consensus ("F", 85); +this.conses[12] = new jalview.schemes.Consensus ("G", 85); +this.conses[13] = new jalview.schemes.Consensus ("H", 85); +this.conses[14] = new jalview.schemes.Consensus ("I", 85); +this.conses[15] = new jalview.schemes.Consensus ("L", 85); +this.conses[16] = new jalview.schemes.Consensus ("M", 85); +this.conses[17] = new jalview.schemes.Consensus ("N", 85); +this.conses[18] = new jalview.schemes.Consensus ("P", 85); +this.conses[19] = new jalview.schemes.Consensus ("Q", 85); +this.conses[20] = new jalview.schemes.Consensus ("R", 85); +this.conses[21] = new jalview.schemes.Consensus ("S", 85); +this.conses[22] = new jalview.schemes.Consensus ("T", 85); +this.conses[23] = new jalview.schemes.Consensus ("V", 85); +this.conses[24] = new jalview.schemes.Consensus ("W", 85); +this.conses[25] = new jalview.schemes.Consensus ("Y", 85); +this.conses[28] = new jalview.schemes.Consensus ("K", 85); +this.conses[29] = new jalview.schemes.Consensus ("D", 85); +this.conses[30] = new jalview.schemes.Consensus ("G", 0); +this.conses[31] = new jalview.schemes.Consensus ("P", 0); +this.colours = new Array (11); +var tmp8 = new Array (1); +tmp8[0] = this.conses[30]; +this.colours[7] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.ORANGE), tmp8); +var tmp9 = new Array (1); +tmp9[0] = this.conses[31]; +this.colours[8] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.YELLOW), tmp9); +var tmp10 = new Array (1); +tmp10[0] = this.conses[27]; +this.colours[9] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.PINK), tmp8); +var tmp1 = new Array (14); +tmp1[0] = this.conses[0]; +tmp1[1] = this.conses[1]; +tmp1[2] = this.conses[26]; +tmp1[3] = this.conses[27]; +tmp1[4] = this.conses[11]; +tmp1[5] = this.conses[13]; +tmp1[6] = this.conses[14]; +tmp1[7] = this.conses[15]; +tmp1[8] = this.conses[16]; +tmp1[9] = this.conses[23]; +tmp1[10] = this.conses[24]; +tmp1[11] = this.conses[25]; +tmp1[12] = this.conses[18]; +tmp1[13] = this.conses[19]; +this.colours[0] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.BLUE), tmp1); +this.colours[10] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.CYAN), tmp1); +var tmp2 = new Array (5); +tmp2[0] = this.conses[8]; +tmp2[1] = this.conses[21]; +tmp2[2] = this.conses[22]; +tmp2[3] = this.conses[0]; +tmp2[4] = this.conses[1]; +this.colours[1] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.GREEN), tmp2); +var tmp3 = new Array (3); +tmp3[0] = this.conses[17]; +tmp3[1] = this.conses[29]; +tmp3[2] = this.conses[5]; +this.colours[2] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.GREEN), tmp3); +var tmp4 = new Array (6); +tmp4[0] = this.conses[6]; +tmp4[1] = this.conses[19]; +tmp4[2] = this.conses[22]; +tmp4[3] = this.conses[3]; +tmp4[4] = this.conses[28]; +tmp4[5] = this.conses[20]; +this.colours[3] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.GREEN), tmp4); +var tmp5 = new Array (4); +tmp5[0] = this.conses[3]; +tmp5[1] = this.conses[28]; +tmp5[2] = this.conses[20]; +tmp5[3] = this.conses[19]; +this.colours[4] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.RED), tmp5); +var tmp6 = new Array (6); +tmp6[0] = this.conses[3]; +tmp6[1] = this.conses[29]; +tmp6[2] = this.conses[10]; +tmp6[3] = this.conses[6]; +tmp6[4] = this.conses[19]; +tmp6[5] = this.conses[2]; +this.colours[5] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.MAGENTA), tmp6); +var tmp7 = new Array (5); +tmp7[0] = this.conses[3]; +tmp7[1] = this.conses[29]; +tmp7[2] = this.conses[10]; +tmp7[3] = this.conses[17]; +tmp7[4] = this.conses[2]; +this.colours[6] = new jalview.schemes.ConsensusColour (jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.MAGENTA), tmp7); +this.residueColour = new Array (20); +this.residueColour[0] = this.colours[0]; +this.residueColour[1] = this.colours[4]; +this.residueColour[2] = this.colours[2]; +this.residueColour[3] = this.colours[6]; +this.residueColour[4] = this.colours[0]; +this.residueColour[5] = this.colours[3]; +this.residueColour[6] = this.colours[5]; +this.residueColour[7] = this.colours[7]; +this.residueColour[8] = this.colours[10]; +this.residueColour[9] = this.colours[0]; +this.residueColour[10] = this.colours[0]; +this.residueColour[11] = this.colours[4]; +this.residueColour[12] = this.colours[0]; +this.residueColour[13] = this.colours[0]; +this.residueColour[14] = this.colours[8]; +this.residueColour[15] = this.colours[1]; +this.residueColour[16] = this.colours[1]; +this.residueColour[17] = this.colours[0]; +this.residueColour[18] = this.colours[10]; +this.residueColour[19] = this.colours[0]; +}); +Clazz.defineMethod (c$, "findColour", +function (c) { +return java.awt.Color.pink; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +var currentColour; +if (this.cons2.length <= j || (this.includeGaps && this.threshold != 0 && !this.aboveThreshold (c, j))) { +return java.awt.Color.white; +}var i = jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]; +currentColour = java.awt.Color.white; +if (i > 19) { +return currentColour; +}for (var k = 0; k < this.residueColour[i].conses.length; k++) { +if (this.residueColour[i].conses[k].isConserved (this.cons2, j, this.size, this.includeGaps)) { +currentColour = this.residueColour[i].c; +}} +if (i == 4) { +if (this.conses[27].isConserved (this.cons2, j, this.size, this.includeGaps)) { +currentColour = jalview.schemes.ClustalxColourScheme.colhash.get (java.awt.Color.PINK); +}}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "isIncludeGaps", +function () { +return this.includeGaps; +}); +Clazz.defineMethod (c$, "setIncludeGaps", +function (includeGaps) { +this.includeGaps = includeGaps; +}, "~B"); +Clazz.overrideMethod (c$, "applyTo", +function (sg, hiddenRepSequences) { +var css = new jalview.schemes.ClustalxColourScheme (sg, hiddenRepSequences); +css.includeGaps = this.includeGaps; +return css; +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.defineStatics (c$, +"EIGHTY_FIVE", 85, +"FIFTY", 50, +"EIGHTY", 80, +"SIXTY", 60); +c$.colhash = c$.prototype.colhash = new java.util.HashMap (); +{ +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.RED, new java.awt.Color (0.9, 0.2, 0.1)); +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.BLUE, new java.awt.Color (0.5, 0.7, 0.9)); +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.GREEN, new java.awt.Color (0.1, 0.8, 0.1)); +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.ORANGE, new java.awt.Color (0.9, 0.6, 0.3)); +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.CYAN, new java.awt.Color (0.1, 0.7, 0.7)); +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.PINK, new java.awt.Color (0.9, 0.5, 0.5)); +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.MAGENTA, new java.awt.Color (0.8, 0.3, 0.8)); +jalview.schemes.ClustalxColourScheme.colhash.put (java.awt.Color.YELLOW, new java.awt.Color (0.8, 0.8, 0.0)); +}c$ = Clazz.decorateAsClass (function () { +this.conses = null; +this.c = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "ConsensusColour"); +Clazz.makeConstructor (c$, +function (c, conses) { +this.conses = conses; +this.c = c; +}, "java.awt.Color,~A"); +}); diff --git a/bin/jalview/schemes/ColourSchemeI.js b/bin/jalview/schemes/ColourSchemeI.js index 9777117..b82090d 100644 --- a/bin/jalview/schemes/ColourSchemeI.js +++ b/bin/jalview/schemes/ColourSchemeI.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.declareInterface (jalview.schemes, "ColourSchemeI"); +Clazz.declarePackage ("jalview.schemes"); +Clazz.declareInterface (jalview.schemes, "ColourSchemeI"); diff --git a/bin/jalview/schemes/ColourSchemeProperty.js b/bin/jalview/schemes/ColourSchemeProperty.js index 352a373..eb55454 100644 --- a/bin/jalview/schemes/ColourSchemeProperty.js +++ b/bin/jalview/schemes/ColourSchemeProperty.js @@ -1,292 +1,292 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (null, "jalview.schemes.ColourSchemeProperty", ["jalview.schemes.Blosum62ColourScheme", "$.BuriedColourScheme", "$.ClustalxColourScheme", "$.HelixColourScheme", "$.HydrophobicColourScheme", "$.NucleotideColourScheme", "$.PIDColourScheme", "$.PurinePyrimidineColourScheme", "$.RNAHelicesColour", "$.StrandColourScheme", "$.TCoffeeColourScheme", "$.TaylorColourScheme", "$.TurnColourScheme", "$.UserColourScheme", "$.ZappoColourScheme", "jalview.util.ColorUtils", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "ColourSchemeProperty"); -c$.getColourIndexFromName = Clazz.defineMethod (c$, "getColourIndexFromName", -function (name) { -var ret = -1; -if (name.equalsIgnoreCase ("Clustal")) { -ret = 2; -} else if (name.equalsIgnoreCase ("Blosum62")) { -ret = 3; -} else if (name.equalsIgnoreCase ("% Identity")) { -ret = 4; -} else if (name.equalsIgnoreCase ("Zappo")) { -ret = 5; -} else if (name.equalsIgnoreCase ("Taylor")) { -ret = 6; -} else if (name.equalsIgnoreCase ("Hydrophobic")) { -ret = 7; -} else if (name.equalsIgnoreCase ("Helix Propensity")) { -ret = 8; -} else if (name.equalsIgnoreCase ("Strand Propensity")) { -ret = 9; -} else if (name.equalsIgnoreCase ("Turn Propensity")) { -ret = 10; -} else if (name.equalsIgnoreCase ("Buried Index")) { -ret = 11; -} else if (name.equalsIgnoreCase ("Nucleotide")) { -ret = 12; -} else if (name.equalsIgnoreCase ("T-Coffee Scores")) { -ret = 15; -} else if (name.equalsIgnoreCase ("User Defined")) { -ret = 0; -} else if (name.equalsIgnoreCase ("None")) { -ret = 1; -} else if (name.equalsIgnoreCase ("Purine/Pyrimidine")) { -ret = 13; -} else if (name.equalsIgnoreCase ("RNA Interaction type")) { -ret = 17; -} else if (name.equalsIgnoreCase ("RNA Helices")) { -ret = 16; -}return ret; -}, "~S"); -c$.getColourName = Clazz.defineMethod (c$, "getColourName", -function (cs) { -var index = 1; -if (Clazz.instanceOf (cs, jalview.schemes.ClustalxColourScheme)) { -index = 2; -} else if (Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) { -index = 3; -} else if (Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme)) { -index = 4; -} else if (Clazz.instanceOf (cs, jalview.schemes.ZappoColourScheme)) { -index = 5; -} else if (Clazz.instanceOf (cs, jalview.schemes.TaylorColourScheme)) { -index = 6; -} else if (Clazz.instanceOf (cs, jalview.schemes.HydrophobicColourScheme)) { -index = 7; -} else if (Clazz.instanceOf (cs, jalview.schemes.HelixColourScheme)) { -index = 8; -} else if (Clazz.instanceOf (cs, jalview.schemes.StrandColourScheme)) { -index = 9; -} else if (Clazz.instanceOf (cs, jalview.schemes.TurnColourScheme)) { -index = 10; -} else if (Clazz.instanceOf (cs, jalview.schemes.BuriedColourScheme)) { -index = 11; -} else if (Clazz.instanceOf (cs, jalview.schemes.NucleotideColourScheme)) { -index = 12; -} else if (Clazz.instanceOf (cs, jalview.schemes.PurinePyrimidineColourScheme)) { -index = 13; -} else if (Clazz.instanceOf (cs, jalview.schemes.TCoffeeColourScheme)) { -index = 15; -} else if (Clazz.instanceOf (cs, jalview.schemes.RNAHelicesColour)) { -index = 16; -} else if (Clazz.instanceOf (cs, jalview.schemes.UserColourScheme)) { -if (((cs).getName () != null) && ((cs).getName ().length > 0)) { -return (cs).getName (); -}index = 0; -}return jalview.schemes.ColourSchemeProperty.getColourName (index); -}, "jalview.schemes.ColourSchemeI"); -c$.getColourName = Clazz.defineMethod (c$, "getColourName", -function (index) { -var ret = null; -switch (index) { -case 2: -ret = "Clustal"; -break; -case 3: -ret = "Blosum62"; -break; -case 4: -ret = "% Identity"; -break; -case 5: -ret = "Zappo"; -break; -case 6: -ret = "Taylor"; -break; -case 7: -ret = "Hydrophobic"; -break; -case 8: -ret = "Helix Propensity"; -break; -case 9: -ret = "Strand Propensity"; -break; -case 10: -ret = "Turn Propensity"; -break; -case 11: -ret = "Buried Index"; -break; -case 12: -ret = "Nucleotide"; -break; -case 13: -ret = "Purine/Pyrimidine"; -break; -case 15: -ret = "T-Coffee Scores"; -break; -case 17: -ret = "RNA Interaction type"; -break; -case 16: -ret = "RNA Helices"; -break; -case 0: -ret = "User Defined"; -break; -default: -ret = "None"; -break; -} -return ret; -}, "~N"); -c$.getColour = Clazz.defineMethod (c$, "getColour", -function (alignment, name) { -var colindex = jalview.schemes.ColourSchemeProperty.getColourIndexFromName (name); -if (colindex == -1) { -if (name.indexOf ('=') == -1) { -try { -return new jalview.schemes.UserColourScheme (name); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -} else { -try { -var ucs = new jalview.schemes.UserColourScheme ("white"); -ucs.parseAppletParameter (name); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -}}return jalview.schemes.ColourSchemeProperty.getColour (alignment, jalview.schemes.ColourSchemeProperty.getColourIndexFromName (name)); -}, "jalview.datamodel.AnnotatedCollectionI,~S"); -c$.getColour = Clazz.defineMethod (c$, "getColour", -function (coll, index) { -var cs = null; -switch (index) { -case 2: -cs = new jalview.schemes.ClustalxColourScheme (coll, null); -break; -case 3: -cs = new jalview.schemes.Blosum62ColourScheme (); -break; -case 4: -cs = new jalview.schemes.PIDColourScheme (); -break; -case 5: -cs = new jalview.schemes.ZappoColourScheme (); -break; -case 6: -cs = new jalview.schemes.TaylorColourScheme (); -break; -case 7: -cs = new jalview.schemes.HydrophobicColourScheme (); -break; -case 8: -cs = new jalview.schemes.HelixColourScheme (); -break; -case 9: -cs = new jalview.schemes.StrandColourScheme (); -break; -case 10: -cs = new jalview.schemes.TurnColourScheme (); -break; -case 11: -cs = new jalview.schemes.BuriedColourScheme (); -break; -case 12: -cs = new jalview.schemes.NucleotideColourScheme (); -break; -case 13: -cs = new jalview.schemes.PurinePyrimidineColourScheme (); -break; -case 15: -cs = new jalview.schemes.TCoffeeColourScheme (coll); -break; -case 16: -cs = new jalview.schemes.RNAHelicesColour (coll); -break; -case 0: -var col = new Array (24); -for (var i = 0; i < 24; i++) { -col[i] = java.awt.Color.white; -} -cs = new jalview.schemes.UserColourScheme (col); -break; -default: -break; -} -return cs; -}, "jalview.datamodel.AnnotatedCollectionI,~N"); -c$.getAWTColorFromName = Clazz.defineMethod (c$, "getAWTColorFromName", -function (name) { -var col = null; -name = name.toLowerCase (); -if (name.equals ("black")) { -col = java.awt.Color.black; -} else if (name.equals ("blue")) { -col = java.awt.Color.blue; -} else if (name.equals ("cyan")) { -col = java.awt.Color.cyan; -} else if (name.equals ("darkGray")) { -col = java.awt.Color.darkGray; -} else if (name.equals ("gray")) { -col = java.awt.Color.gray; -} else if (name.equals ("green")) { -col = java.awt.Color.green; -} else if (name.equals ("lightGray")) { -col = java.awt.Color.lightGray; -} else if (name.equals ("magenta")) { -col = java.awt.Color.magenta; -} else if (name.equals ("orange")) { -col = java.awt.Color.orange; -} else if (name.equals ("pink")) { -col = java.awt.Color.pink; -} else if (name.equals ("red")) { -col = java.awt.Color.red; -} else if (name.equals ("white")) { -col = java.awt.Color.white; -} else if (name.equals ("yellow")) { -col = java.awt.Color.yellow; -}return col; -}, "~S"); -c$.initRnaHelicesShading = Clazz.defineMethod (c$, "initRnaHelicesShading", -function (n) { -var j = 0; -if (jalview.schemes.ColourSchemeProperty.rnaHelices == null) { -jalview.schemes.ColourSchemeProperty.rnaHelices = new Array (n + 1); -} else if (jalview.schemes.ColourSchemeProperty.rnaHelices != null && jalview.schemes.ColourSchemeProperty.rnaHelices.length <= n) { -var t = new Array (n + 1); -System.arraycopy (jalview.schemes.ColourSchemeProperty.rnaHelices, 0, t, 0, jalview.schemes.ColourSchemeProperty.rnaHelices.length); -j = jalview.schemes.ColourSchemeProperty.rnaHelices.length; -jalview.schemes.ColourSchemeProperty.rnaHelices = t; -} else { -return; -}for (; j <= n; j++) { -jalview.schemes.ColourSchemeProperty.rnaHelices[j] = jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white); -} -}, "~N"); -Clazz.defineStatics (c$, -"UNDEFINED", -1, -"USER_DEFINED", 0, -"NONE", 1, -"CLUSTAL", 2, -"BLOSUM", 3, -"PID", 4, -"ZAPPO", 5, -"TAYLOR", 6, -"HYDROPHOBIC", 7, -"HELIX", 8, -"STRAND", 9, -"TURN", 10, -"BURIED", 11, -"NUCLEOTIDE", 12, -"PURINEPYRIMIDINE", 13, -"COVARIATION", 14, -"TCOFFEE", 15, -"RNAHELIX", 16, -"RNAINTERACTION", 17, -"FIRST_COLOUR", 1, -"LAST_COLOUR", 17, -"rnaHelices", null); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (null, "jalview.schemes.ColourSchemeProperty", ["jalview.schemes.Blosum62ColourScheme", "$.BuriedColourScheme", "$.ClustalxColourScheme", "$.HelixColourScheme", "$.HydrophobicColourScheme", "$.NucleotideColourScheme", "$.PIDColourScheme", "$.PurinePyrimidineColourScheme", "$.RNAHelicesColour", "$.StrandColourScheme", "$.TCoffeeColourScheme", "$.TaylorColourScheme", "$.TurnColourScheme", "$.UserColourScheme", "$.ZappoColourScheme", "jalview.util.ColorUtils", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "ColourSchemeProperty"); +c$.getColourIndexFromName = Clazz.defineMethod (c$, "getColourIndexFromName", +function (name) { +var ret = -1; +if (name.equalsIgnoreCase ("Clustal")) { +ret = 2; +} else if (name.equalsIgnoreCase ("Blosum62")) { +ret = 3; +} else if (name.equalsIgnoreCase ("% Identity")) { +ret = 4; +} else if (name.equalsIgnoreCase ("Zappo")) { +ret = 5; +} else if (name.equalsIgnoreCase ("Taylor")) { +ret = 6; +} else if (name.equalsIgnoreCase ("Hydrophobic")) { +ret = 7; +} else if (name.equalsIgnoreCase ("Helix Propensity")) { +ret = 8; +} else if (name.equalsIgnoreCase ("Strand Propensity")) { +ret = 9; +} else if (name.equalsIgnoreCase ("Turn Propensity")) { +ret = 10; +} else if (name.equalsIgnoreCase ("Buried Index")) { +ret = 11; +} else if (name.equalsIgnoreCase ("Nucleotide")) { +ret = 12; +} else if (name.equalsIgnoreCase ("T-Coffee Scores")) { +ret = 15; +} else if (name.equalsIgnoreCase ("User Defined")) { +ret = 0; +} else if (name.equalsIgnoreCase ("None")) { +ret = 1; +} else if (name.equalsIgnoreCase ("Purine/Pyrimidine")) { +ret = 13; +} else if (name.equalsIgnoreCase ("RNA Interaction type")) { +ret = 17; +} else if (name.equalsIgnoreCase ("RNA Helices")) { +ret = 16; +}return ret; +}, "~S"); +c$.getColourName = Clazz.defineMethod (c$, "getColourName", +function (cs) { +var index = 1; +if (Clazz.instanceOf (cs, jalview.schemes.ClustalxColourScheme)) { +index = 2; +} else if (Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) { +index = 3; +} else if (Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme)) { +index = 4; +} else if (Clazz.instanceOf (cs, jalview.schemes.ZappoColourScheme)) { +index = 5; +} else if (Clazz.instanceOf (cs, jalview.schemes.TaylorColourScheme)) { +index = 6; +} else if (Clazz.instanceOf (cs, jalview.schemes.HydrophobicColourScheme)) { +index = 7; +} else if (Clazz.instanceOf (cs, jalview.schemes.HelixColourScheme)) { +index = 8; +} else if (Clazz.instanceOf (cs, jalview.schemes.StrandColourScheme)) { +index = 9; +} else if (Clazz.instanceOf (cs, jalview.schemes.TurnColourScheme)) { +index = 10; +} else if (Clazz.instanceOf (cs, jalview.schemes.BuriedColourScheme)) { +index = 11; +} else if (Clazz.instanceOf (cs, jalview.schemes.NucleotideColourScheme)) { +index = 12; +} else if (Clazz.instanceOf (cs, jalview.schemes.PurinePyrimidineColourScheme)) { +index = 13; +} else if (Clazz.instanceOf (cs, jalview.schemes.TCoffeeColourScheme)) { +index = 15; +} else if (Clazz.instanceOf (cs, jalview.schemes.RNAHelicesColour)) { +index = 16; +} else if (Clazz.instanceOf (cs, jalview.schemes.UserColourScheme)) { +if (((cs).getName () != null) && ((cs).getName ().length > 0)) { +return (cs).getName (); +}index = 0; +}return jalview.schemes.ColourSchemeProperty.getColourName (index); +}, "jalview.schemes.ColourSchemeI"); +c$.getColourName = Clazz.defineMethod (c$, "getColourName", +function (index) { +var ret = null; +switch (index) { +case 2: +ret = "Clustal"; +break; +case 3: +ret = "Blosum62"; +break; +case 4: +ret = "% Identity"; +break; +case 5: +ret = "Zappo"; +break; +case 6: +ret = "Taylor"; +break; +case 7: +ret = "Hydrophobic"; +break; +case 8: +ret = "Helix Propensity"; +break; +case 9: +ret = "Strand Propensity"; +break; +case 10: +ret = "Turn Propensity"; +break; +case 11: +ret = "Buried Index"; +break; +case 12: +ret = "Nucleotide"; +break; +case 13: +ret = "Purine/Pyrimidine"; +break; +case 15: +ret = "T-Coffee Scores"; +break; +case 17: +ret = "RNA Interaction type"; +break; +case 16: +ret = "RNA Helices"; +break; +case 0: +ret = "User Defined"; +break; +default: +ret = "None"; +break; +} +return ret; +}, "~N"); +c$.getColour = Clazz.defineMethod (c$, "getColour", +function (alignment, name) { +var colindex = jalview.schemes.ColourSchemeProperty.getColourIndexFromName (name); +if (colindex == -1) { +if (name.indexOf ('=') == -1) { +try { +return new jalview.schemes.UserColourScheme (name); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +} else { +try { +var ucs = new jalview.schemes.UserColourScheme ("white"); +ucs.parseAppletParameter (name); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +}}return jalview.schemes.ColourSchemeProperty.getColour (alignment, jalview.schemes.ColourSchemeProperty.getColourIndexFromName (name)); +}, "jalview.datamodel.AnnotatedCollectionI,~S"); +c$.getColour = Clazz.defineMethod (c$, "getColour", +function (coll, index) { +var cs = null; +switch (index) { +case 2: +cs = new jalview.schemes.ClustalxColourScheme (coll, null); +break; +case 3: +cs = new jalview.schemes.Blosum62ColourScheme (); +break; +case 4: +cs = new jalview.schemes.PIDColourScheme (); +break; +case 5: +cs = new jalview.schemes.ZappoColourScheme (); +break; +case 6: +cs = new jalview.schemes.TaylorColourScheme (); +break; +case 7: +cs = new jalview.schemes.HydrophobicColourScheme (); +break; +case 8: +cs = new jalview.schemes.HelixColourScheme (); +break; +case 9: +cs = new jalview.schemes.StrandColourScheme (); +break; +case 10: +cs = new jalview.schemes.TurnColourScheme (); +break; +case 11: +cs = new jalview.schemes.BuriedColourScheme (); +break; +case 12: +cs = new jalview.schemes.NucleotideColourScheme (); +break; +case 13: +cs = new jalview.schemes.PurinePyrimidineColourScheme (); +break; +case 15: +cs = new jalview.schemes.TCoffeeColourScheme (coll); +break; +case 16: +cs = new jalview.schemes.RNAHelicesColour (coll); +break; +case 0: +var col = new Array (24); +for (var i = 0; i < 24; i++) { +col[i] = java.awt.Color.white; +} +cs = new jalview.schemes.UserColourScheme (col); +break; +default: +break; +} +return cs; +}, "jalview.datamodel.AnnotatedCollectionI,~N"); +c$.getAWTColorFromName = Clazz.defineMethod (c$, "getAWTColorFromName", +function (name) { +var col = null; +name = name.toLowerCase (); +if (name.equals ("black")) { +col = java.awt.Color.black; +} else if (name.equals ("blue")) { +col = java.awt.Color.blue; +} else if (name.equals ("cyan")) { +col = java.awt.Color.cyan; +} else if (name.equals ("darkGray")) { +col = java.awt.Color.darkGray; +} else if (name.equals ("gray")) { +col = java.awt.Color.gray; +} else if (name.equals ("green")) { +col = java.awt.Color.green; +} else if (name.equals ("lightGray")) { +col = java.awt.Color.lightGray; +} else if (name.equals ("magenta")) { +col = java.awt.Color.magenta; +} else if (name.equals ("orange")) { +col = java.awt.Color.orange; +} else if (name.equals ("pink")) { +col = java.awt.Color.pink; +} else if (name.equals ("red")) { +col = java.awt.Color.red; +} else if (name.equals ("white")) { +col = java.awt.Color.white; +} else if (name.equals ("yellow")) { +col = java.awt.Color.yellow; +}return col; +}, "~S"); +c$.initRnaHelicesShading = Clazz.defineMethod (c$, "initRnaHelicesShading", +function (n) { +var j = 0; +if (jalview.schemes.ColourSchemeProperty.rnaHelices == null) { +jalview.schemes.ColourSchemeProperty.rnaHelices = new Array (n + 1); +} else if (jalview.schemes.ColourSchemeProperty.rnaHelices != null && jalview.schemes.ColourSchemeProperty.rnaHelices.length <= n) { +var t = new Array (n + 1); +System.arraycopy (jalview.schemes.ColourSchemeProperty.rnaHelices, 0, t, 0, jalview.schemes.ColourSchemeProperty.rnaHelices.length); +j = jalview.schemes.ColourSchemeProperty.rnaHelices.length; +jalview.schemes.ColourSchemeProperty.rnaHelices = t; +} else { +return; +}for (; j <= n; j++) { +jalview.schemes.ColourSchemeProperty.rnaHelices[j] = jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white); +} +}, "~N"); +Clazz.defineStatics (c$, +"UNDEFINED", -1, +"USER_DEFINED", 0, +"NONE", 1, +"CLUSTAL", 2, +"BLOSUM", 3, +"PID", 4, +"ZAPPO", 5, +"TAYLOR", 6, +"HYDROPHOBIC", 7, +"HELIX", 8, +"STRAND", 9, +"TURN", 10, +"BURIED", 11, +"NUCLEOTIDE", 12, +"PURINEPYRIMIDINE", 13, +"COVARIATION", 14, +"TCOFFEE", 15, +"RNAHELIX", 16, +"RNAINTERACTION", 17, +"FIRST_COLOUR", 1, +"LAST_COLOUR", 17, +"rnaHelices", null); +}); diff --git a/bin/jalview/schemes/Consensus.js b/bin/jalview/schemes/Consensus.js index 39d8ac9..45c3c6a 100644 --- a/bin/jalview/schemes/Consensus.js +++ b/bin/jalview/schemes/Consensus.js @@ -1,45 +1,45 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (null, "jalview.schemes.Consensus", ["jalview.schemes.ResidueProperties"], function () { -c$ = Clazz.decorateAsClass (function () { -this.mask = null; -this.threshold = 0; -this.maskstr = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "Consensus"); -Clazz.makeConstructor (c$, -function (mask, threshold) { -this.maskstr = mask; -this.setMask (mask); -this.threshold = threshold; -}, "~S,~N"); -Clazz.defineMethod (c$, "setMask", -function (s) { -this.mask = this.setNums (s); -}, "~S"); -Clazz.defineMethod (c$, "isConserved", -function (cons2, col, size) { -return this.isConserved (cons2, col, size, true); -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "isConserved", -function (cons2, col, size, includeGaps) { -var tot = 0; -if (!includeGaps) { -size -= cons2[col][cons2[col].length - 1]; -}for (var i = 0; i < this.mask.length; i++) { -tot += cons2[col][this.mask[i]]; -} -if (tot > ((this.threshold * size) / 100)) { -return true; -}return false; -}, "~A,~N,~N,~B"); -Clazz.defineMethod (c$, "setNums", -function (s) { -var out = Clazz.newIntArray (s.length, 0); -var i = 0; -while (i < s.length) { -out[i] = jalview.schemes.ResidueProperties.aaIndex[s.charCodeAt (i)]; -i++; -} -return out; -}, "~S"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (null, "jalview.schemes.Consensus", ["jalview.schemes.ResidueProperties"], function () { +c$ = Clazz.decorateAsClass (function () { +this.mask = null; +this.threshold = 0; +this.maskstr = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "Consensus"); +Clazz.makeConstructor (c$, +function (mask, threshold) { +this.maskstr = mask; +this.setMask (mask); +this.threshold = threshold; +}, "~S,~N"); +Clazz.defineMethod (c$, "setMask", +function (s) { +this.mask = this.setNums (s); +}, "~S"); +Clazz.defineMethod (c$, "isConserved", +function (cons2, col, size) { +return this.isConserved (cons2, col, size, true); +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "isConserved", +function (cons2, col, size, includeGaps) { +var tot = 0; +if (!includeGaps) { +size -= cons2[col][cons2[col].length - 1]; +}for (var i = 0; i < this.mask.length; i++) { +tot += cons2[col][this.mask[i]]; +} +if (tot > ((this.threshold * size) / 100)) { +return true; +}return false; +}, "~A,~N,~N,~B"); +Clazz.defineMethod (c$, "setNums", +function (s) { +var out = Clazz.newIntArray (s.length, 0); +var i = 0; +while (i < s.length) { +out[i] = jalview.schemes.ResidueProperties.aaIndex[s.charCodeAt (i)]; +i++; +} +return out; +}, "~S"); +}); diff --git a/bin/jalview/schemes/CovariationColourScheme.js b/bin/jalview/schemes/CovariationColourScheme.js index 3d75e42..68c8f15 100644 --- a/bin/jalview/schemes/CovariationColourScheme.js +++ b/bin/jalview/schemes/CovariationColourScheme.js @@ -1,41 +1,41 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.Hashtable"], "jalview.schemes.CovariationColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.ColorUtils", "java.awt.Color"], function () { -c$ = Clazz.decorateAsClass (function () { -this.helixcolorhash = null; -this.positionsToHelix = null; -this.numHelix = 0; -this.annotation = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "CovariationColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.prepareFields (c$, function () { -this.helixcolorhash = new java.util.Hashtable (); -this.positionsToHelix = new java.util.Hashtable (); -}); -Clazz.makeConstructor (c$, -function (annotation) { -Clazz.superConstructor (this, jalview.schemes.CovariationColourScheme, []); -this.annotation = annotation; -for (var x = 0; x < this.annotation._rnasecstr.length; x++) { -this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getBegin ()), this.annotation._rnasecstr[x].getFeatureGroup ()); -this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getEnd ()), this.annotation._rnasecstr[x].getFeatureGroup ()); -if (Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()) > this.numHelix) { -this.numHelix = Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()); -}} -for (var j = 0; j <= this.numHelix; j++) { -this.helixcolorhash.put (Integer.toString (j), jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white)); -} -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "findColour", -function (c) { -return jalview.schemes.ResidueProperties.purinepyrimidine[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j) { -var currentColour = java.awt.Color.white; -var currentHelix = null; -currentHelix = this.positionsToHelix.get (new Integer (j)); -if (currentHelix != null) { -currentColour = this.helixcolorhash.get (currentHelix); -}return currentColour; -}, "~S,~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.Hashtable"], "jalview.schemes.CovariationColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.ColorUtils", "java.awt.Color"], function () { +c$ = Clazz.decorateAsClass (function () { +this.helixcolorhash = null; +this.positionsToHelix = null; +this.numHelix = 0; +this.annotation = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "CovariationColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.prepareFields (c$, function () { +this.helixcolorhash = new java.util.Hashtable (); +this.positionsToHelix = new java.util.Hashtable (); +}); +Clazz.makeConstructor (c$, +function (annotation) { +Clazz.superConstructor (this, jalview.schemes.CovariationColourScheme, []); +this.annotation = annotation; +for (var x = 0; x < this.annotation._rnasecstr.length; x++) { +this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getBegin ()), this.annotation._rnasecstr[x].getFeatureGroup ()); +this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getEnd ()), this.annotation._rnasecstr[x].getFeatureGroup ()); +if (Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()) > this.numHelix) { +this.numHelix = Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()); +}} +for (var j = 0; j <= this.numHelix; j++) { +this.helixcolorhash.put (Integer.toString (j), jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white)); +} +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "findColour", +function (c) { +return jalview.schemes.ResidueProperties.purinepyrimidine[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j) { +var currentColour = java.awt.Color.white; +var currentHelix = null; +currentHelix = this.positionsToHelix.get (new Integer (j)); +if (currentHelix != null) { +currentColour = this.helixcolorhash.get (currentHelix); +}return currentColour; +}, "~S,~N"); +}); diff --git a/bin/jalview/schemes/FollowerColourScheme.js b/bin/jalview/schemes/FollowerColourScheme.js index e73b3d9..e71f907 100644 --- a/bin/jalview/schemes/FollowerColourScheme.js +++ b/bin/jalview/schemes/FollowerColourScheme.js @@ -1,26 +1,26 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.FollowerColourScheme", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.colourScheme = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "FollowerColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.defineMethod (c$, "getBaseColour", -function () { -return this.colourScheme; -}); -Clazz.overrideMethod (c$, "setConsensus", -function (consensus) { -if (this.colourScheme != null) { -this.colourScheme.setConsensus (consensus); -}}, "~A"); -Clazz.overrideMethod (c$, "setConservation", -function (cons) { -if (this.colourScheme != null) { -this.colourScheme.setConservation (cons); -}}, "jalview.analysis.Conservation"); -Clazz.overrideMethod (c$, "setConservationInc", -function (i) { -if (this.colourScheme != null) { -this.colourScheme.setConservationInc (i); -}}, "~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.FollowerColourScheme", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.colourScheme = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "FollowerColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.defineMethod (c$, "getBaseColour", +function () { +return this.colourScheme; +}); +Clazz.overrideMethod (c$, "setConsensus", +function (consensus) { +if (this.colourScheme != null) { +this.colourScheme.setConsensus (consensus); +}}, "~A"); +Clazz.overrideMethod (c$, "setConservation", +function (cons) { +if (this.colourScheme != null) { +this.colourScheme.setConservation (cons); +}}, "jalview.analysis.Conservation"); +Clazz.overrideMethod (c$, "setConservationInc", +function (i) { +if (this.colourScheme != null) { +this.colourScheme.setConservationInc (i); +}}, "~N"); +}); diff --git a/bin/jalview/schemes/GraduatedColor.js b/bin/jalview/schemes/GraduatedColor.js index 5daa0fb..e9998a1 100644 --- a/bin/jalview/schemes/GraduatedColor.js +++ b/bin/jalview/schemes/GraduatedColor.js @@ -1,160 +1,160 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (null, "jalview.schemes.GraduatedColor", ["jalview.schemes.UserColourScheme", "java.awt.Color", "java.lang.Float"], function () { -c$ = Clazz.decorateAsClass (function () { -this.thresholdState = -1; -this.lr = 0; -this.lg = 0; -this.lb = 0; -this.dr = 0; -this.dg = 0; -this.db = 0; -this.base = 0; -this.range = 0; -this.thrsh = 0; -this.tolow = false; -this.autoScale = true; -this.ucs = null; -this.colourByLabel = false; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "GraduatedColor"); -Clazz.makeConstructor (c$, -function (low, high, min, max) { -this.thrsh = NaN; -this.tolow = min >= max; -this.lr = low.getRed () / 255; -this.lg = low.getGreen () / 255; -this.lb = low.getBlue () / 255; -this.dr = (high.getRed () / 255) - this.lr; -this.dg = (high.getGreen () / 255) - this.lg; -this.db = (high.getBlue () / 255) - this.lb; -if (this.tolow) { -this.base = max; -this.range = min - max; -} else { -this.base = min; -this.range = max - min; -}}, "java.awt.Color,java.awt.Color,~N,~N"); -Clazz.makeConstructor (c$, -function (oldcs) { -this.lr = oldcs.lr; -this.lg = oldcs.lg; -this.lb = oldcs.lb; -this.dr = oldcs.dr; -this.dg = oldcs.dg; -this.db = oldcs.db; -this.base = oldcs.base; -this.range = oldcs.range; -this.tolow = oldcs.tolow; -this.thresholdState = oldcs.thresholdState; -this.thrsh = oldcs.thrsh; -this.autoScale = oldcs.autoScale; -this.colourByLabel = oldcs.colourByLabel; -}, "jalview.schemes.GraduatedColor"); -Clazz.makeConstructor (c$, -function (oldcs, min, max) { -this.construct (oldcs); -this.updateBounds (min, max); -}, "jalview.schemes.GraduatedColor,~N,~N"); -Clazz.defineMethod (c$, "getMinColor", -function () { -return new java.awt.Color (this.lr, this.lg, this.lb); -}); -Clazz.defineMethod (c$, "getMaxColor", -function () { -return new java.awt.Color (this.lr + this.dr, this.lg + this.dg, this.lb + this.db); -}); -Clazz.defineMethod (c$, "getTolow", -function () { -return this.tolow; -}); -Clazz.defineMethod (c$, "setTolow", -function (tolower) { -this.tolow = tolower; -}, "~B"); -Clazz.defineMethod (c$, "isColored", -function (feature) { -var val = feature.getScore (); -if (Float.isNaN (val)) { -return true; -}if (this.thresholdState == -1) { -return true; -}if (Float.isNaN (this.thrsh)) { -return true; -}var rtn = this.thresholdState == 1; -if (val <= this.thrsh) { -return !rtn; -} else { -return rtn; -}}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "isColourByLabel", -function () { -return this.colourByLabel; -}); -Clazz.defineMethod (c$, "setColourByLabel", -function (colourByLabel) { -this.colourByLabel = colourByLabel; -}, "~B"); -Clazz.defineMethod (c$, "findColor", -function (feature) { -if (this.colourByLabel) { -if (this.ucs == null) { -this.ucs = new jalview.schemes.UserColourScheme (); -}return this.ucs.createColourFromName (feature.getDescription ()); -}if (this.range == 0.0) { -return this.getMaxColor (); -}var scr = feature.getScore (); -if (Float.isNaN (scr)) { -return this.getMinColor (); -}var scl = (scr - this.base) / this.range; -if (this.tolow) { -scl = -scl; -}if (scl < 0) { -scl = 0; -}if (scl > 1) { -scl = 1; -}return new java.awt.Color (this.lr + scl * this.dr, this.lg + scl * this.dg, this.lb + scl * this.db); -}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "setThresh", -function (value) { -this.thrsh = value; -}, "~N"); -Clazz.defineMethod (c$, "getThresh", -function () { -return this.thrsh; -}); -Clazz.defineMethod (c$, "setThreshType", -function (aboveThreshold) { -this.thresholdState = aboveThreshold; -}, "~N"); -Clazz.defineMethod (c$, "getThreshType", -function () { -return this.thresholdState; -}); -Clazz.defineMethod (c$, "getMax", -function () { -return (this.tolow) ? this.base : (this.base + this.range); -}); -Clazz.defineMethod (c$, "getMin", -function () { -return (this.tolow) ? (this.base + this.range) : this.base; -}); -Clazz.defineMethod (c$, "isAutoScale", -function () { -return this.autoScale; -}); -Clazz.defineMethod (c$, "setAutoScaled", -function (autoscale) { -this.autoScale = autoscale; -}, "~B"); -Clazz.defineMethod (c$, "updateBounds", -function (min, max) { -if (max < min) { -this.base = max; -this.range = min - max; -this.tolow = true; -} else { -this.base = min; -this.range = max - min; -this.tolow = false; -}}, "~N,~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (null, "jalview.schemes.GraduatedColor", ["jalview.schemes.UserColourScheme", "java.awt.Color", "java.lang.Float"], function () { +c$ = Clazz.decorateAsClass (function () { +this.thresholdState = -1; +this.lr = 0; +this.lg = 0; +this.lb = 0; +this.dr = 0; +this.dg = 0; +this.db = 0; +this.base = 0; +this.range = 0; +this.thrsh = 0; +this.tolow = false; +this.autoScale = true; +this.ucs = null; +this.colourByLabel = false; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "GraduatedColor"); +Clazz.makeConstructor (c$, +function (low, high, min, max) { +this.thrsh = NaN; +this.tolow = min >= max; +this.lr = low.getRed () / 255; +this.lg = low.getGreen () / 255; +this.lb = low.getBlue () / 255; +this.dr = (high.getRed () / 255) - this.lr; +this.dg = (high.getGreen () / 255) - this.lg; +this.db = (high.getBlue () / 255) - this.lb; +if (this.tolow) { +this.base = max; +this.range = min - max; +} else { +this.base = min; +this.range = max - min; +}}, "java.awt.Color,java.awt.Color,~N,~N"); +Clazz.makeConstructor (c$, +function (oldcs) { +this.lr = oldcs.lr; +this.lg = oldcs.lg; +this.lb = oldcs.lb; +this.dr = oldcs.dr; +this.dg = oldcs.dg; +this.db = oldcs.db; +this.base = oldcs.base; +this.range = oldcs.range; +this.tolow = oldcs.tolow; +this.thresholdState = oldcs.thresholdState; +this.thrsh = oldcs.thrsh; +this.autoScale = oldcs.autoScale; +this.colourByLabel = oldcs.colourByLabel; +}, "jalview.schemes.GraduatedColor"); +Clazz.makeConstructor (c$, +function (oldcs, min, max) { +this.construct (oldcs); +this.updateBounds (min, max); +}, "jalview.schemes.GraduatedColor,~N,~N"); +Clazz.defineMethod (c$, "getMinColor", +function () { +return new java.awt.Color (this.lr, this.lg, this.lb); +}); +Clazz.defineMethod (c$, "getMaxColor", +function () { +return new java.awt.Color (this.lr + this.dr, this.lg + this.dg, this.lb + this.db); +}); +Clazz.defineMethod (c$, "getTolow", +function () { +return this.tolow; +}); +Clazz.defineMethod (c$, "setTolow", +function (tolower) { +this.tolow = tolower; +}, "~B"); +Clazz.defineMethod (c$, "isColored", +function (feature) { +var val = feature.getScore (); +if (Float.isNaN (val)) { +return true; +}if (this.thresholdState == -1) { +return true; +}if (Float.isNaN (this.thrsh)) { +return true; +}var rtn = this.thresholdState == 1; +if (val <= this.thrsh) { +return !rtn; +} else { +return rtn; +}}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "isColourByLabel", +function () { +return this.colourByLabel; +}); +Clazz.defineMethod (c$, "setColourByLabel", +function (colourByLabel) { +this.colourByLabel = colourByLabel; +}, "~B"); +Clazz.defineMethod (c$, "findColor", +function (feature) { +if (this.colourByLabel) { +if (this.ucs == null) { +this.ucs = new jalview.schemes.UserColourScheme (); +}return this.ucs.createColourFromName (feature.getDescription ()); +}if (this.range == 0.0) { +return this.getMaxColor (); +}var scr = feature.getScore (); +if (Float.isNaN (scr)) { +return this.getMinColor (); +}var scl = (scr - this.base) / this.range; +if (this.tolow) { +scl = -scl; +}if (scl < 0) { +scl = 0; +}if (scl > 1) { +scl = 1; +}return new java.awt.Color (this.lr + scl * this.dr, this.lg + scl * this.dg, this.lb + scl * this.db); +}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "setThresh", +function (value) { +this.thrsh = value; +}, "~N"); +Clazz.defineMethod (c$, "getThresh", +function () { +return this.thrsh; +}); +Clazz.defineMethod (c$, "setThreshType", +function (aboveThreshold) { +this.thresholdState = aboveThreshold; +}, "~N"); +Clazz.defineMethod (c$, "getThreshType", +function () { +return this.thresholdState; +}); +Clazz.defineMethod (c$, "getMax", +function () { +return (this.tolow) ? this.base : (this.base + this.range); +}); +Clazz.defineMethod (c$, "getMin", +function () { +return (this.tolow) ? (this.base + this.range) : this.base; +}); +Clazz.defineMethod (c$, "isAutoScale", +function () { +return this.autoScale; +}); +Clazz.defineMethod (c$, "setAutoScaled", +function (autoscale) { +this.autoScale = autoscale; +}, "~B"); +Clazz.defineMethod (c$, "updateBounds", +function (min, max) { +if (max < min) { +this.base = max; +this.range = min - max; +this.tolow = true; +} else { +this.base = min; +this.range = max - min; +this.tolow = false; +}}, "~N,~N"); +}); diff --git a/bin/jalview/schemes/HelixColourScheme.js b/bin/jalview/schemes/HelixColourScheme.js index 4768a33..64e88e9 100644 --- a/bin/jalview/schemes/HelixColourScheme.js +++ b/bin/jalview/schemes/HelixColourScheme.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.HelixColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "HelixColourScheme", jalview.schemes.ScoreColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.HelixColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.helix, 0.57, 1.51]); -}); -Clazz.overrideMethod (c$, "makeColour", -function (c) { -return new java.awt.Color (c, 1.0 - c, c); -}, "~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.HelixColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "HelixColourScheme", jalview.schemes.ScoreColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.HelixColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.helix, 0.57, 1.51]); +}); +Clazz.overrideMethod (c$, "makeColour", +function (c) { +return new java.awt.Color (c, 1.0 - c, c); +}, "~N"); +}); diff --git a/bin/jalview/schemes/HydrophobicColourScheme.js b/bin/jalview/schemes/HydrophobicColourScheme.js index 02e1bbd..224f202 100644 --- a/bin/jalview/schemes/HydrophobicColourScheme.js +++ b/bin/jalview/schemes/HydrophobicColourScheme.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.HydrophobicColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "HydrophobicColourScheme", jalview.schemes.ScoreColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.HydrophobicColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.hyd, -3.9, 4.5]); -}); -Clazz.overrideMethod (c$, "makeColour", -function (c) { -return new java.awt.Color (c, 0.0, 1.0 - c); -}, "~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.HydrophobicColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "HydrophobicColourScheme", jalview.schemes.ScoreColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.HydrophobicColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.hyd, -3.9, 4.5]); +}); +Clazz.overrideMethod (c$, "makeColour", +function (c) { +return new java.awt.Color (c, 0.0, 1.0 - c); +}, "~N"); +}); diff --git a/bin/jalview/schemes/NucleotideColourScheme.js b/bin/jalview/schemes/NucleotideColourScheme.js index 1345bc6..abdfb5e 100644 --- a/bin/jalview/schemes/NucleotideColourScheme.js +++ b/bin/jalview/schemes/NucleotideColourScheme.js @@ -1,31 +1,31 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.NucleotideColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "NucleotideColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.NucleotideColourScheme, [jalview.schemes.ResidueProperties.nucleotideIndex, jalview.schemes.ResidueProperties.nucleotide, 0]); -}); -Clazz.defineMethod (c$, "findColour", -function (c) { -return this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -var currentColour; -if ((this.threshold == 0) || this.aboveThreshold (c, j)) { -try { -currentColour = this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -return java.awt.Color.white; -} else { -throw ex; -} -} -} else { -return java.awt.Color.white; -}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.NucleotideColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "NucleotideColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.NucleotideColourScheme, [jalview.schemes.ResidueProperties.nucleotideIndex, jalview.schemes.ResidueProperties.nucleotide, 0]); +}); +Clazz.defineMethod (c$, "findColour", +function (c) { +return this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +var currentColour; +if ((this.threshold == 0) || this.aboveThreshold (c, j)) { +try { +currentColour = this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +return java.awt.Color.white; +} else { +throw ex; +} +} +} else { +return java.awt.Color.white; +}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/schemes/PIDColourScheme.js b/bin/jalview/schemes/PIDColourScheme.js index 093328c..bdf6f24 100644 --- a/bin/jalview/schemes/PIDColourScheme.js +++ b/bin/jalview/schemes/PIDColourScheme.js @@ -1,39 +1,39 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.PIDColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { -c$ = Clazz.decorateAsClass (function () { -this.pidColours = null; -this.thresholds = null; -this.group = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "PIDColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.PIDColourScheme, []); -this.pidColours = jalview.schemes.ResidueProperties.pidColours; -this.thresholds = jalview.schemes.ResidueProperties.pidThresholds; -}); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -if ('a' <= c && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) - (32)); -}if (this.consensus == null || j >= this.consensus.length || this.consensus[j] == null) { -return java.awt.Color.white; -}if ((this.threshold != 0) && !this.aboveThreshold (c, j)) { -return java.awt.Color.white; -}var currentColour = java.awt.Color.white; -var sc = 0; -if (this.consensus.length <= j) { -return java.awt.Color.white; -}if ((Integer.parseInt (this.consensus[j].get ("C").toString ()) != -1) && this.consensus[j].contains (String.valueOf (c))) { -sc = (this.consensus[j].get (this.ignoreGaps)).floatValue (); -if (!jalview.util.Comparison.isGap (c)) { -for (var i = 0; i < this.thresholds.length; i++) { -if (sc > this.thresholds[i]) { -currentColour = this.pidColours[i]; -break; -}} -}}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.PIDColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { +c$ = Clazz.decorateAsClass (function () { +this.pidColours = null; +this.thresholds = null; +this.group = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "PIDColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.PIDColourScheme, []); +this.pidColours = jalview.schemes.ResidueProperties.pidColours; +this.thresholds = jalview.schemes.ResidueProperties.pidThresholds; +}); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +if ('a' <= c && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) - (32)); +}if (this.consensus == null || j >= this.consensus.length || this.consensus[j] == null) { +return java.awt.Color.white; +}if ((this.threshold != 0) && !this.aboveThreshold (c, j)) { +return java.awt.Color.white; +}var currentColour = java.awt.Color.white; +var sc = 0; +if (this.consensus.length <= j) { +return java.awt.Color.white; +}if ((Integer.parseInt (this.consensus[j].get ("C").toString ()) != -1) && this.consensus[j].contains (String.valueOf (c))) { +sc = (this.consensus[j].get (this.ignoreGaps)).floatValue (); +if (!jalview.util.Comparison.isGap (c)) { +for (var i = 0; i < this.thresholds.length; i++) { +if (sc > this.thresholds[i]) { +currentColour = this.pidColours[i]; +break; +}} +}}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/schemes/PurinePyrimidineColourScheme.js b/bin/jalview/schemes/PurinePyrimidineColourScheme.js index be4e523..514d31b 100644 --- a/bin/jalview/schemes/PurinePyrimidineColourScheme.js +++ b/bin/jalview/schemes/PurinePyrimidineColourScheme.js @@ -1,31 +1,31 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.PurinePyrimidineColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "PurinePyrimidineColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.PurinePyrimidineColourScheme, [jalview.schemes.ResidueProperties.purinepyrimidineIndex, jalview.schemes.ResidueProperties.purinepyrimidine, 0]); -}); -Clazz.defineMethod (c$, "findColour", -function (c) { -return this.colors[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j) { -var currentColour; -if ((this.threshold == 0) || this.aboveThreshold (c, j)) { -try { -currentColour = this.colors[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -return java.awt.Color.white; -} else { -throw ex; -} -} -} else { -return java.awt.Color.white; -}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.PurinePyrimidineColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "PurinePyrimidineColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.PurinePyrimidineColourScheme, [jalview.schemes.ResidueProperties.purinepyrimidineIndex, jalview.schemes.ResidueProperties.purinepyrimidine, 0]); +}); +Clazz.defineMethod (c$, "findColour", +function (c) { +return this.colors[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j) { +var currentColour; +if ((this.threshold == 0) || this.aboveThreshold (c, j)) { +try { +currentColour = this.colors[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +return java.awt.Color.white; +} else { +throw ex; +} +} +} else { +return java.awt.Color.white; +}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N"); +}); diff --git a/bin/jalview/schemes/RNAHelicesColour.js b/bin/jalview/schemes/RNAHelicesColour.js index 5023c90..c7d3af2 100644 --- a/bin/jalview/schemes/RNAHelicesColour.js +++ b/bin/jalview/schemes/RNAHelicesColour.js @@ -1,68 +1,68 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.Hashtable"], "jalview.schemes.RNAHelicesColour", ["jalview.schemes.ResidueProperties", "jalview.util.ColorUtils", "java.awt.Color"], function () { -c$ = Clazz.decorateAsClass (function () { -this.helixcolorhash = null; -this.positionsToHelix = null; -this.numHelix = 0; -this.annotation = null; -this.lastrefresh = -1; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "RNAHelicesColour", jalview.schemes.ResidueColourScheme); -Clazz.prepareFields (c$, function () { -this.helixcolorhash = new java.util.Hashtable (); -this.positionsToHelix = new java.util.Hashtable (); -}); -Clazz.makeConstructor (c$, -function (annotation) { -Clazz.superConstructor (this, jalview.schemes.RNAHelicesColour, [jalview.schemes.ResidueProperties.nucleotideIndex]); -this.annotation = annotation; -this.refresh (); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.makeConstructor (c$, -function (alignment) { -Clazz.superConstructor (this, jalview.schemes.RNAHelicesColour, [jalview.schemes.ResidueProperties.nucleotideIndex]); -this.alignmentChanged (alignment, null); -}, "jalview.datamodel.AnnotatedCollectionI"); -Clazz.overrideMethod (c$, "alignmentChanged", -function (alignment, hiddenReps) { -var annotations = alignment.getAlignmentAnnotation (); -for (var i = 0; i < annotations.length; i++) { -if (annotations[i].getRNAStruc () != null) { -this.annotation = annotations[i]; -break; -}} -this.refresh (); -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.defineMethod (c$, "refresh", -function () { -if (this.annotation != null && ((this.annotation._rnasecstr == null || this.lastrefresh != this.annotation._rnasecstr.hashCode ()) && this.annotation.isValidStruc ())) { -this.annotation.getRNAStruc (); -this.lastrefresh = this.annotation._rnasecstr.hashCode (); -this.numHelix = 0; -this.positionsToHelix = new java.util.Hashtable (); -for (var x = 0; x < this.annotation._rnasecstr.length; x++) { -this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getBegin ()), this.annotation._rnasecstr[x].getFeatureGroup ()); -this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getEnd ()), this.annotation._rnasecstr[x].getFeatureGroup ()); -if (Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()) > this.numHelix) { -this.numHelix = Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()); -}} -for (var j = 0; j <= this.numHelix; j++) { -if (!this.helixcolorhash.containsKey (Integer.toString (j))) { -this.helixcolorhash.put (Integer.toString (j), jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white)); -}} -}}); -Clazz.defineMethod (c$, "findColour", -function (c) { -return jalview.schemes.ResidueProperties.purinepyrimidine[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -this.refresh (); -var currentColour = java.awt.Color.white; -var currentHelix = null; -currentHelix = this.positionsToHelix.get (new Integer (j)); -if (currentHelix != null) { -currentColour = this.helixcolorhash.get (currentHelix); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme", "java.util.Hashtable"], "jalview.schemes.RNAHelicesColour", ["jalview.schemes.ResidueProperties", "jalview.util.ColorUtils", "java.awt.Color"], function () { +c$ = Clazz.decorateAsClass (function () { +this.helixcolorhash = null; +this.positionsToHelix = null; +this.numHelix = 0; +this.annotation = null; +this.lastrefresh = -1; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "RNAHelicesColour", jalview.schemes.ResidueColourScheme); +Clazz.prepareFields (c$, function () { +this.helixcolorhash = new java.util.Hashtable (); +this.positionsToHelix = new java.util.Hashtable (); +}); +Clazz.makeConstructor (c$, +function (annotation) { +Clazz.superConstructor (this, jalview.schemes.RNAHelicesColour, [jalview.schemes.ResidueProperties.nucleotideIndex]); +this.annotation = annotation; +this.refresh (); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.makeConstructor (c$, +function (alignment) { +Clazz.superConstructor (this, jalview.schemes.RNAHelicesColour, [jalview.schemes.ResidueProperties.nucleotideIndex]); +this.alignmentChanged (alignment, null); +}, "jalview.datamodel.AnnotatedCollectionI"); +Clazz.overrideMethod (c$, "alignmentChanged", +function (alignment, hiddenReps) { +var annotations = alignment.getAlignmentAnnotation (); +for (var i = 0; i < annotations.length; i++) { +if (annotations[i].getRNAStruc () != null) { +this.annotation = annotations[i]; +break; +}} +this.refresh (); +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.defineMethod (c$, "refresh", +function () { +if (this.annotation != null && ((this.annotation._rnasecstr == null || this.lastrefresh != this.annotation._rnasecstr.hashCode ()) && this.annotation.isValidStruc ())) { +this.annotation.getRNAStruc (); +this.lastrefresh = this.annotation._rnasecstr.hashCode (); +this.numHelix = 0; +this.positionsToHelix = new java.util.Hashtable (); +for (var x = 0; x < this.annotation._rnasecstr.length; x++) { +this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getBegin ()), this.annotation._rnasecstr[x].getFeatureGroup ()); +this.positionsToHelix.put (new Integer (this.annotation._rnasecstr[x].getEnd ()), this.annotation._rnasecstr[x].getFeatureGroup ()); +if (Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()) > this.numHelix) { +this.numHelix = Integer.parseInt (this.annotation._rnasecstr[x].getFeatureGroup ()); +}} +for (var j = 0; j <= this.numHelix; j++) { +if (!this.helixcolorhash.containsKey (Integer.toString (j))) { +this.helixcolorhash.put (Integer.toString (j), jalview.util.ColorUtils.generateRandomColor (java.awt.Color.white)); +}} +}}); +Clazz.defineMethod (c$, "findColour", +function (c) { +return jalview.schemes.ResidueProperties.purinepyrimidine[jalview.schemes.ResidueProperties.purinepyrimidineIndex[c.charCodeAt (0)]]; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +this.refresh (); +var currentColour = java.awt.Color.white; +var currentHelix = null; +currentHelix = this.positionsToHelix.get (new Integer (j)); +if (currentHelix != null) { +currentColour = this.helixcolorhash.get (currentHelix); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/schemes/RNAHelicesColourChooser.js b/bin/jalview/schemes/RNAHelicesColourChooser.js index 27a0f25..0d9cf26 100644 --- a/bin/jalview/schemes/RNAHelicesColourChooser.js +++ b/bin/jalview/schemes/RNAHelicesColourChooser.js @@ -1,63 +1,63 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (null, "jalview.schemes.RNAHelicesColourChooser", ["jalview.schemes.RNAHelicesColour", "java.util.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.av = null; -this.ap = null; -this.oldcs = null; -this.oldgroupColours = null; -this.currentAnnotation = null; -this.adjusting = false; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "RNAHelicesColourChooser"); -Clazz.makeConstructor (c$, -function (av, ap) { -this.oldcs = av.getGlobalColourScheme (); -if (av.getAlignment ().getGroups () != null) { -this.oldgroupColours = new java.util.Hashtable (); -for (var sg, $sg = ap.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (sg.cs != null) { -this.oldgroupColours.put (sg, sg.cs); -}} -}this.av = av; -this.ap = ap; -if (Clazz.instanceOf (this.oldcs, jalview.schemes.RNAHelicesColour)) { -var rhc = this.oldcs; -}this.adjusting = true; -var list = new java.util.Vector (); -var index = 1; -for (var i = 0; i < av.getAlignment ().getAlignmentAnnotation ().length; i++) { -var label = av.getAlignment ().getAlignmentAnnotation ()[i].label; -if (!list.contains (label)) list.addElement (label); - else list.addElement (label + "_" + (index++)); -} -this.adjusting = false; -this.changeColour (); -}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); -Clazz.defineMethod (c$, "changeColour", -function () { -if (this.adjusting) { -return; -}var rhc = null; -rhc = new jalview.schemes.RNAHelicesColour (this.av.getAlignment ()); -this.av.setGlobalColourScheme (rhc); -if (this.av.getAlignment ().getGroups () != null) { -for (var sg, $sg = this.ap.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (sg.cs == null) { -continue; -}sg.cs = new jalview.schemes.RNAHelicesColour (sg); -} -}this.ap.paintAlignment (false); -}); -Clazz.defineMethod (c$, "reset", -function () { -this.av.setGlobalColourScheme (this.oldcs); -if (this.av.getAlignment ().getGroups () != null) { -for (var sg, $sg = this.ap.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -sg.cs = this.oldgroupColours.get (sg); -} -}}); -Clazz.defineMethod (c$, "annotations_actionPerformed", -function (e) { -this.changeColour (); -}, "java.awt.event.ActionEvent"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (null, "jalview.schemes.RNAHelicesColourChooser", ["jalview.schemes.RNAHelicesColour", "java.util.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.av = null; +this.ap = null; +this.oldcs = null; +this.oldgroupColours = null; +this.currentAnnotation = null; +this.adjusting = false; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "RNAHelicesColourChooser"); +Clazz.makeConstructor (c$, +function (av, ap) { +this.oldcs = av.getGlobalColourScheme (); +if (av.getAlignment ().getGroups () != null) { +this.oldgroupColours = new java.util.Hashtable (); +for (var sg, $sg = ap.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (sg.cs != null) { +this.oldgroupColours.put (sg, sg.cs); +}} +}this.av = av; +this.ap = ap; +if (Clazz.instanceOf (this.oldcs, jalview.schemes.RNAHelicesColour)) { +var rhc = this.oldcs; +}this.adjusting = true; +var list = new java.util.Vector (); +var index = 1; +for (var i = 0; i < av.getAlignment ().getAlignmentAnnotation ().length; i++) { +var label = av.getAlignment ().getAlignmentAnnotation ()[i].label; +if (!list.contains (label)) list.addElement (label); + else list.addElement (label + "_" + (index++)); +} +this.adjusting = false; +this.changeColour (); +}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); +Clazz.defineMethod (c$, "changeColour", +function () { +if (this.adjusting) { +return; +}var rhc = null; +rhc = new jalview.schemes.RNAHelicesColour (this.av.getAlignment ()); +this.av.setGlobalColourScheme (rhc); +if (this.av.getAlignment ().getGroups () != null) { +for (var sg, $sg = this.ap.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (sg.cs == null) { +continue; +}sg.cs = new jalview.schemes.RNAHelicesColour (sg); +} +}this.ap.paintAlignment (false); +}); +Clazz.defineMethod (c$, "reset", +function () { +this.av.setGlobalColourScheme (this.oldcs); +if (this.av.getAlignment ().getGroups () != null) { +for (var sg, $sg = this.ap.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +sg.cs = this.oldgroupColours.get (sg); +} +}}); +Clazz.defineMethod (c$, "annotations_actionPerformed", +function (e) { +this.changeColour (); +}, "java.awt.event.ActionEvent"); +}); diff --git a/bin/jalview/schemes/RNAInteractionColourScheme.js b/bin/jalview/schemes/RNAInteractionColourScheme.js index 9c2e946..6935253 100644 --- a/bin/jalview/schemes/RNAInteractionColourScheme.js +++ b/bin/jalview/schemes/RNAInteractionColourScheme.js @@ -1,27 +1,27 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.RNAInteractionColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "RNAInteractionColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.defineMethod (c$, "findColour", -function (c) { -return this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -var currentColour; -if ((this.threshold == 0) || this.aboveThreshold (c, j)) { -try { -currentColour = this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -return java.awt.Color.white; -} else { -throw ex; -} -} -} else { -return java.awt.Color.white; -}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.RNAInteractionColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "RNAInteractionColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.defineMethod (c$, "findColour", +function (c) { +return this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +var currentColour; +if ((this.threshold == 0) || this.aboveThreshold (c, j)) { +try { +currentColour = this.colors[jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]]; +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +return java.awt.Color.white; +} else { +throw ex; +} +} +} else { +return java.awt.Color.white; +}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +}); diff --git a/bin/jalview/schemes/ResidueColourScheme.js b/bin/jalview/schemes/ResidueColourScheme.js index aaf6ef5..9b2382f 100644 --- a/bin/jalview/schemes/ResidueColourScheme.js +++ b/bin/jalview/schemes/ResidueColourScheme.js @@ -1,146 +1,146 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ColourSchemeI"], "jalview.schemes.ResidueColourScheme", ["jalview.util.Comparison", "$.MessageManager", "java.awt.Color", "java.lang.Error"], function () { -c$ = Clazz.decorateAsClass (function () { -this.symbolIndex = null; -this.conservationColouring = false; -this.colors = null; -this.threshold = 0; -this.ignoreGaps = "G"; -this.consensus = null; -this.conservation = null; -this.conservationLength = 0; -this.inc = 30; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "ResidueColourScheme", null, jalview.schemes.ColourSchemeI); -Clazz.makeConstructor (c$, -function (aaOrnaIndex, colours, threshold) { -this.symbolIndex = aaOrnaIndex; -this.colors = colours; -this.threshold = threshold; -}, "~A,~A,~N"); -Clazz.makeConstructor (c$, -function (aaOrNaIndex) { -this.symbolIndex = aaOrNaIndex; -}, "~A"); -Clazz.makeConstructor (c$, -function () { -this.symbolIndex = null; -}); -Clazz.defineMethod (c$, "findColour", -function (c) { -return this.colors == null ? java.awt.Color.white : this.colors[this.symbolIndex[c.charCodeAt (0)]]; -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -var currentColour; -if (this.colors != null && this.symbolIndex != null && (this.threshold == 0) || this.aboveThreshold (c, j)) { -currentColour = this.colors[this.symbolIndex[c.charCodeAt (0)]]; -} else { -currentColour = java.awt.Color.white; -}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "getThreshold", -function () { -return this.threshold; -}); -Clazz.overrideMethod (c$, "setThreshold", -function (ct, ignoreGaps) { -this.threshold = ct; -if (ignoreGaps) { -this.ignoreGaps = "N"; -} else { -this.ignoreGaps = "G"; -}}, "~N,~B"); -Clazz.defineMethod (c$, "aboveThreshold", -function (c, j) { -if ('a' <= c && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) - (32)); -}if (this.consensus == null || this.consensus.length < j || this.consensus[j] == null) { -return false; -}if (((this.consensus[j].get ("C")).intValue () != -1) && this.consensus[j].contains (String.valueOf (c))) { -if ((this.consensus[j].get (this.ignoreGaps)).floatValue () >= this.threshold) { -return true; -}}return false; -}, "~S,~N"); -Clazz.overrideMethod (c$, "conservationApplied", -function () { -return this.conservationColouring; -}); -Clazz.overrideMethod (c$, "setConservationApplied", -function (conservationApplied) { -this.conservationColouring = conservationApplied; -}, "~B"); -Clazz.overrideMethod (c$, "setConservationInc", -function (i) { -this.inc = i; -}, "~N"); -Clazz.overrideMethod (c$, "getConservationInc", -function () { -return this.inc; -}); -Clazz.overrideMethod (c$, "setConsensus", -function (consensus) { -if (consensus == null) { -return; -}this.consensus = consensus; -}, "~A"); -Clazz.overrideMethod (c$, "setConservation", -function (cons) { -if (cons == null) { -this.conservationColouring = false; -this.conservation = null; -} else { -this.conservationColouring = true; -var i; -var iSize = cons.getConsSequence ().getLength (); -this.conservation = Clazz.newCharArray (iSize, '\0'); -for (i = 0; i < iSize; i++) { -this.conservation[i] = cons.getConsSequence ().getCharAt (i); -} -this.conservationLength = this.conservation.length; -}}, "jalview.analysis.Conservation"); -Clazz.defineMethod (c$, "applyConservation", -function (currentColour, i) { -if ((this.conservationLength > i) && (this.conservation[i] != '*') && (this.conservation[i] != '+')) { -if (jalview.util.Comparison.isGap (this.conservation[i])) { -currentColour = java.awt.Color.white; -} else { -var t = 11 - ((this.conservation[i]).charCodeAt (0) - 48); -if (t == 0) { -return java.awt.Color.white; -}var red = currentColour.getRed (); -var green = currentColour.getGreen (); -var blue = currentColour.getBlue (); -var dr = 255 - red; -var dg = 255 - green; -var db = 255 - blue; -dr *= t / 10; -dg *= t / 10; -db *= t / 10; -red += (this.inc / 20) * dr; -green += (this.inc / 20) * dg; -blue += (this.inc / 20) * db; -if (red > 255 || green > 255 || blue > 255) { -currentColour = java.awt.Color.white; -} else { -currentColour = new java.awt.Color (red, green, blue); -}}}return currentColour; -}, "java.awt.Color,~N"); -Clazz.overrideMethod (c$, "alignmentChanged", -function (alignment, hiddenReps) { -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.overrideMethod (c$, "applyTo", -function (sg, hiddenRepSequences) { -try { -return this.getClass ().newInstance (); -} catch (q) { -if (Clazz.exceptionOf (q, Exception)) { -throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_cannot_duplicate_colour_scheme", Clazz.newArray (-1, [this.getClass ().getName ()])), q); -} else { -throw q; -} -} -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ColourSchemeI"], "jalview.schemes.ResidueColourScheme", ["jalview.util.Comparison", "$.MessageManager", "java.awt.Color", "java.lang.Error"], function () { +c$ = Clazz.decorateAsClass (function () { +this.symbolIndex = null; +this.conservationColouring = false; +this.colors = null; +this.threshold = 0; +this.ignoreGaps = "G"; +this.consensus = null; +this.conservation = null; +this.conservationLength = 0; +this.inc = 30; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "ResidueColourScheme", null, jalview.schemes.ColourSchemeI); +Clazz.makeConstructor (c$, +function (aaOrnaIndex, colours, threshold) { +this.symbolIndex = aaOrnaIndex; +this.colors = colours; +this.threshold = threshold; +}, "~A,~A,~N"); +Clazz.makeConstructor (c$, +function (aaOrNaIndex) { +this.symbolIndex = aaOrNaIndex; +}, "~A"); +Clazz.makeConstructor (c$, +function () { +this.symbolIndex = null; +}); +Clazz.defineMethod (c$, "findColour", +function (c) { +return this.colors == null ? java.awt.Color.white : this.colors[this.symbolIndex[c.charCodeAt (0)]]; +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +var currentColour; +if (this.colors != null && this.symbolIndex != null && (this.threshold == 0) || this.aboveThreshold (c, j)) { +currentColour = this.colors[this.symbolIndex[c.charCodeAt (0)]]; +} else { +currentColour = java.awt.Color.white; +}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "getThreshold", +function () { +return this.threshold; +}); +Clazz.overrideMethod (c$, "setThreshold", +function (ct, ignoreGaps) { +this.threshold = ct; +if (ignoreGaps) { +this.ignoreGaps = "N"; +} else { +this.ignoreGaps = "G"; +}}, "~N,~B"); +Clazz.defineMethod (c$, "aboveThreshold", +function (c, j) { +if ('a' <= c && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) - (32)); +}if (this.consensus == null || this.consensus.length < j || this.consensus[j] == null) { +return false; +}if (((this.consensus[j].get ("C")).intValue () != -1) && this.consensus[j].contains (String.valueOf (c))) { +if ((this.consensus[j].get (this.ignoreGaps)).floatValue () >= this.threshold) { +return true; +}}return false; +}, "~S,~N"); +Clazz.overrideMethod (c$, "conservationApplied", +function () { +return this.conservationColouring; +}); +Clazz.overrideMethod (c$, "setConservationApplied", +function (conservationApplied) { +this.conservationColouring = conservationApplied; +}, "~B"); +Clazz.overrideMethod (c$, "setConservationInc", +function (i) { +this.inc = i; +}, "~N"); +Clazz.overrideMethod (c$, "getConservationInc", +function () { +return this.inc; +}); +Clazz.overrideMethod (c$, "setConsensus", +function (consensus) { +if (consensus == null) { +return; +}this.consensus = consensus; +}, "~A"); +Clazz.overrideMethod (c$, "setConservation", +function (cons) { +if (cons == null) { +this.conservationColouring = false; +this.conservation = null; +} else { +this.conservationColouring = true; +var i; +var iSize = cons.getConsSequence ().getLength (); +this.conservation = Clazz.newCharArray (iSize, '\0'); +for (i = 0; i < iSize; i++) { +this.conservation[i] = cons.getConsSequence ().getCharAt (i); +} +this.conservationLength = this.conservation.length; +}}, "jalview.analysis.Conservation"); +Clazz.defineMethod (c$, "applyConservation", +function (currentColour, i) { +if ((this.conservationLength > i) && (this.conservation[i] != '*') && (this.conservation[i] != '+')) { +if (jalview.util.Comparison.isGap (this.conservation[i])) { +currentColour = java.awt.Color.white; +} else { +var t = 11 - ((this.conservation[i]).charCodeAt (0) - 48); +if (t == 0) { +return java.awt.Color.white; +}var red = currentColour.getRed (); +var green = currentColour.getGreen (); +var blue = currentColour.getBlue (); +var dr = 255 - red; +var dg = 255 - green; +var db = 255 - blue; +dr *= t / 10; +dg *= t / 10; +db *= t / 10; +red += (this.inc / 20) * dr; +green += (this.inc / 20) * dg; +blue += (this.inc / 20) * db; +if (red > 255 || green > 255 || blue > 255) { +currentColour = java.awt.Color.white; +} else { +currentColour = new java.awt.Color (red, green, blue); +}}}return currentColour; +}, "java.awt.Color,~N"); +Clazz.overrideMethod (c$, "alignmentChanged", +function (alignment, hiddenReps) { +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.overrideMethod (c$, "applyTo", +function (sg, hiddenRepSequences) { +try { +return this.getClass ().newInstance (); +} catch (q) { +if (Clazz.exceptionOf (q, Exception)) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_cannot_duplicate_colour_scheme", Clazz.newArray (-1, [this.getClass ().getName ()])), q); +} else { +throw q; +} +} +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +}); diff --git a/bin/jalview/schemes/ResidueProperties.class b/bin/jalview/schemes/ResidueProperties.class index c98cf3574b37094d2b6bff11a8763279bc767a1a..539dcc8fb3fa7b6413c7bbdbd831fb26e85adfcf 100644 GIT binary patch delta 36 scmZ3wgK6;&rVSTnGRkefICC~5a}xvC 0) { -System.err.println ("Ignoring multiple calls to buildAmbiguityCodonSet"); -return; -}for (var acode, $acode = jalview.schemes.ResidueProperties.ambiguityCodes.entrySet ().iterator (); $acode.hasNext () && ((acode = $acode.next ()) || true);) { -for (var r, $r = 0, $$r = acode.getValue (); $r < $$r.length && ((r = $$r[$r]) || true); $r++) { -var codesfor = jalview.schemes.ResidueProperties._ambiguityCodes.get (r); -if (codesfor == null) { -jalview.schemes.ResidueProperties._ambiguityCodes.put (r, codesfor = new java.util.ArrayList ()); -}if (!codesfor.contains (acode.getKey ())) { -codesfor.add (acode.getKey ()); -} else { -System.err.println ("Inconsistency in the IUBMB ambiguity code nomenclature table: collision for " + acode.getKey () + " in residue " + r); -}} -} -var unambcodons = jalview.schemes.ResidueProperties.codonHash2.keySet ().toArray ( new Array (jalview.schemes.ResidueProperties.codonHash2.size ())); -for (var codon, $codon = 0, $$codon = unambcodons; $codon < $$codon.length && ((codon = $$codon[$codon]) || true); $codon++) { -var residue = jalview.schemes.ResidueProperties.codonHash2.get (codon); -var acodon = new Array (codon.length); -for (var i = 0, iSize = codon.length; i < iSize; i++) { -var _ac = "" + codon.charAt (i); -var acodes = jalview.schemes.ResidueProperties._ambiguityCodes.get (_ac); -if (acodes != null) { -acodon[i] = acodes.toArray ( new Array (acodes.size ())); -} else { -acodon[i] = Clazz.newArray (-1, []); -}} -var tpos = Clazz.newIntArray (codon.length, 0); -var cpos = Clazz.newIntArray (codon.length, 0); -for (var i = 0; i < tpos.length; i++) { -tpos[i] = -1; -} -tpos[acodon.length - 1] = 0; -var ipos; -var j; -while (tpos[0] < acodon[0].length) { -var allres = Clazz.newCharArray (tpos.length, '\0'); -var _acodon = ""; -var _anuc; -for (ipos = 0; ipos < tpos.length; ipos++) { -if (acodon[ipos].length == 0 || tpos[ipos] < 0) { -_acodon += codon.charAt (ipos); -allres[ipos] = Clazz.newCharArray (-1, [codon.charAt (ipos)]); -} else { -_acodon += acodon[ipos][tpos[ipos]]; -var altbase = jalview.schemes.ResidueProperties.ambiguityCodes.get (acodon[ipos][tpos[ipos]]); -allres[ipos] = Clazz.newCharArray (altbase.length, '\0'); -j = 0; -for (var ab, $ab = 0, $$ab = altbase; $ab < $$ab.length && ((ab = $$ab[$ab]) || true); $ab++) { -allres[ipos][j++] = ab.charAt (0); -} -}} -for (ipos = 0; ipos < cpos.length; ipos++) { -cpos[ipos] = 0; -} -var valid = true; -do { -var _codon = ""; -for (j = 0; j < cpos.length; j++) { -_codon += allres[j][cpos[j]]; -} -var tr = jalview.schemes.ResidueProperties.codonHash2.get (_codon); -if (valid = (tr != null && tr.equals (residue))) { -ipos = acodon.length - 1; -while (++cpos[ipos] >= allres[ipos].length && ipos > 0) { -cpos[ipos] = 0; -ipos--; -} -}} while (valid && cpos[0] < allres[0].length); -if (valid) { -jalview.schemes.ResidueProperties.codonHash2.put (_acodon, residue); -} else { -}ipos = acodon.length - 1; -while (++tpos[ipos] >= acodon[ipos].length && ipos > 0) { -tpos[ipos] = -1; -ipos--; -} -} -} -}); -c$.getHydmax = Clazz.defineMethod (c$, "getHydmax", -function () { -return 4.5; -}); -c$.getHydmin = Clazz.defineMethod (c$, "getHydmin", -function () { -return -3.9; -}); -c$.getHyd = Clazz.defineMethod (c$, "getHyd", -function () { -return jalview.schemes.ResidueProperties.hyd; -}); -c$.getAA3Hash = Clazz.defineMethod (c$, "getAA3Hash", -function () { -return jalview.schemes.ResidueProperties.aa3Hash; -}); -c$.getDNA = Clazz.defineMethod (c$, "getDNA", -function () { -return jalview.schemes.ResidueProperties.DNA; -}); -c$.getBLOSUM62 = Clazz.defineMethod (c$, "getBLOSUM62", -function () { -return jalview.schemes.ResidueProperties.BLOSUM62; -}); -c$.getPAM250 = Clazz.defineMethod (c$, "getPAM250", -function (A1, A2) { -return jalview.schemes.ResidueProperties.getPAM250 (A1.charAt (0), A2.charAt (0)); -}, "~S,~S"); -c$.getBLOSUM62 = Clazz.defineMethod (c$, "getBLOSUM62", -function (c1, c2) { -var pog = 0; -try { -var a = jalview.schemes.ResidueProperties.aaIndex[c1.charCodeAt (0)]; -var b = jalview.schemes.ResidueProperties.aaIndex[c2.charCodeAt (0)]; -pog = jalview.schemes.ResidueProperties.BLOSUM62[a][b]; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -return pog; -}, "~S,~S"); -c$.getCodons = Clazz.defineMethod (c$, "getCodons", -function (res) { -if (jalview.schemes.ResidueProperties.codonHash.containsKey (res)) { -return jalview.schemes.ResidueProperties.codonHash.get (res); -}return null; -}, "~S"); -c$.codonTranslate = Clazz.defineMethod (c$, "codonTranslate", -function (lccodon) { -if (false) { -return jalview.schemes.ResidueProperties._codonTranslate (lccodon); -}var cdn = jalview.schemes.ResidueProperties.codonHash2.get (lccodon.toUpperCase ()); -if (cdn != null && cdn.equals ("*")) { -return "STOP"; -}return cdn; -}, "~S"); -c$._codonTranslate = Clazz.defineMethod (c$, "_codonTranslate", -function (lccodon) { -var codon = lccodon.toUpperCase (); -if (codon.indexOf ('X') > -1 || codon.indexOf ('N') > -1) { -return "X"; -}for (var key, $key = jalview.schemes.ResidueProperties.codonHash.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { -if (jalview.schemes.ResidueProperties.codonHash.get (key).contains (codon)) { -return key; -}} -return null; -}, "~S"); -c$.getDefaultPeptideMatrix = Clazz.defineMethod (c$, "getDefaultPeptideMatrix", -function () { -return jalview.schemes.ResidueProperties.getBLOSUM62 (); -}); -c$.getDefaultDnaMatrix = Clazz.defineMethod (c$, "getDefaultDnaMatrix", -function () { -return jalview.schemes.ResidueProperties.getDNA (); -}); -c$.getScoreMatrix = Clazz.defineMethod (c$, "getScoreMatrix", -function (pwtype) { -var val = jalview.schemes.ResidueProperties.scoreMatrices.get (pwtype); -if (val != null && Clazz.instanceOf (val, jalview.schemes.ScoreMatrix)) { -return val; -}return null; -}, "~S"); -c$.getScoreModel = Clazz.defineMethod (c$, "getScoreModel", -function (pwtype) { -return jalview.schemes.ResidueProperties.scoreMatrices.get (pwtype); -}, "~S"); -c$.getPAM250 = Clazz.defineMethod (c$, "getPAM250", -function (c, d) { -var a = jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]; -var b = jalview.schemes.ResidueProperties.aaIndex[d.charCodeAt (0)]; -var pog = jalview.schemes.ResidueProperties.PAM250[a][b]; -return pog; -}, "~S,~S"); -c$.getDssp3state = Clazz.defineMethod (c$, "getDssp3state", -function (ssstring) { -if (ssstring == null) { -return null; -}var ss = new StringBuffer (); -for (var i = 0; i < ssstring.length; i++) { -var ssc = ssstring.substring (i, i + 1); -if (jalview.schemes.ResidueProperties.toDssp3State.containsKey (ssc)) { -ss.append (jalview.schemes.ResidueProperties.toDssp3State.get (ssc)); -} else { -ss.append (" "); -}} -return ss.toString (); -}, "~S"); -c$.getRNASecStrucState = Clazz.defineMethod (c$, "getRNASecStrucState", -function (ssstring) { -if (ssstring == null) { -return null; -}var ss = new StringBuffer (); -for (var i = 0; i < ssstring.length; i++) { -var ssc = ssstring.substring (i, i + 1); -if (jalview.schemes.ResidueProperties.toRNAssState.containsKey (ssc)) { -ss.append (ssc); -} else { -ss.append (" "); -}} -return ss.toString (); -}, "~S"); -c$.isCloseParenRNA = Clazz.defineMethod (c$, "isCloseParenRNA", -function (dc) { -return jalview.schemes.ResidueProperties.RNAcloseParen[dc.charCodeAt (0)]; -}, "~S"); -c$.getResidues = Clazz.defineMethod (c$, "getResidues", -function (nucleotide, includeAmbiguous) { -var result = new java.util.ArrayList (); -if (nucleotide) { -for (var nuc, $nuc = jalview.schemes.ResidueProperties.nucleotideName.keySet ().iterator (); $nuc.hasNext () && ((nuc = $nuc.next ()) || true);) { -var val = jalview.schemes.ResidueProperties.nucleotideIndex[nuc.charCodeAt (0)]; -if ((!includeAmbiguous && val > 4) || (val >= 10)) { -continue; -}nuc = nuc.toUpperCase (); -if (!result.contains (nuc)) { -result.add (nuc); -}} -} else { -for (var res, $res = jalview.schemes.ResidueProperties.aa3Hash.keySet ().iterator (); $res.hasNext () && ((res = $res.next ()) || true);) { -var index = jalview.schemes.ResidueProperties.aa3Hash.get (res).intValue (); -if ((!includeAmbiguous && index >= 20) || index >= 23) { -continue; -}res = res.toUpperCase (); -if (!result.contains (res)) { -result.add (res); -}} -}return result; -}, "~B,~B"); -c$.scoreMatrices = c$.prototype.scoreMatrices = new java.util.Hashtable (); -Clazz.defineStatics (c$, -"aaIndex", null, -"nucleotideIndex", null, -"purinepyrimidineIndex", null); -c$.aa3Hash = c$.prototype.aa3Hash = new java.util.HashMap (); -c$.aa2Triplet = c$.prototype.aa2Triplet = new java.util.HashMap (); -c$.nucleotideName = c$.prototype.nucleotideName = new java.util.HashMap (); -{ -jalview.schemes.ResidueProperties.aaIndex = Clazz.newIntArray (255, 0); -for (var i = 0; i < 255; i++) { -jalview.schemes.ResidueProperties.aaIndex[i] = 23; -} -jalview.schemes.ResidueProperties.aaIndex['A'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.aaIndex['R'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.aaIndex['N'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.aaIndex['D'.charCodeAt (0)] = 3; -jalview.schemes.ResidueProperties.aaIndex['C'.charCodeAt (0)] = 4; -jalview.schemes.ResidueProperties.aaIndex['Q'.charCodeAt (0)] = 5; -jalview.schemes.ResidueProperties.aaIndex['E'.charCodeAt (0)] = 6; -jalview.schemes.ResidueProperties.aaIndex['G'.charCodeAt (0)] = 7; -jalview.schemes.ResidueProperties.aaIndex['H'.charCodeAt (0)] = 8; -jalview.schemes.ResidueProperties.aaIndex['I'.charCodeAt (0)] = 9; -jalview.schemes.ResidueProperties.aaIndex['L'.charCodeAt (0)] = 10; -jalview.schemes.ResidueProperties.aaIndex['K'.charCodeAt (0)] = 11; -jalview.schemes.ResidueProperties.aaIndex['M'.charCodeAt (0)] = 12; -jalview.schemes.ResidueProperties.aaIndex['F'.charCodeAt (0)] = 13; -jalview.schemes.ResidueProperties.aaIndex['P'.charCodeAt (0)] = 14; -jalview.schemes.ResidueProperties.aaIndex['S'.charCodeAt (0)] = 15; -jalview.schemes.ResidueProperties.aaIndex['T'.charCodeAt (0)] = 16; -jalview.schemes.ResidueProperties.aaIndex['W'.charCodeAt (0)] = 17; -jalview.schemes.ResidueProperties.aaIndex['Y'.charCodeAt (0)] = 18; -jalview.schemes.ResidueProperties.aaIndex['V'.charCodeAt (0)] = 19; -jalview.schemes.ResidueProperties.aaIndex['B'.charCodeAt (0)] = 20; -jalview.schemes.ResidueProperties.aaIndex['Z'.charCodeAt (0)] = 21; -jalview.schemes.ResidueProperties.aaIndex['X'.charCodeAt (0)] = 22; -jalview.schemes.ResidueProperties.aaIndex['U'.charCodeAt (0)] = 22; -jalview.schemes.ResidueProperties.aaIndex['a'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.aaIndex['r'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.aaIndex['n'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.aaIndex['d'.charCodeAt (0)] = 3; -jalview.schemes.ResidueProperties.aaIndex['c'.charCodeAt (0)] = 4; -jalview.schemes.ResidueProperties.aaIndex['q'.charCodeAt (0)] = 5; -jalview.schemes.ResidueProperties.aaIndex['e'.charCodeAt (0)] = 6; -jalview.schemes.ResidueProperties.aaIndex['g'.charCodeAt (0)] = 7; -jalview.schemes.ResidueProperties.aaIndex['h'.charCodeAt (0)] = 8; -jalview.schemes.ResidueProperties.aaIndex['i'.charCodeAt (0)] = 9; -jalview.schemes.ResidueProperties.aaIndex['l'.charCodeAt (0)] = 10; -jalview.schemes.ResidueProperties.aaIndex['k'.charCodeAt (0)] = 11; -jalview.schemes.ResidueProperties.aaIndex['m'.charCodeAt (0)] = 12; -jalview.schemes.ResidueProperties.aaIndex['f'.charCodeAt (0)] = 13; -jalview.schemes.ResidueProperties.aaIndex['p'.charCodeAt (0)] = 14; -jalview.schemes.ResidueProperties.aaIndex['s'.charCodeAt (0)] = 15; -jalview.schemes.ResidueProperties.aaIndex['t'.charCodeAt (0)] = 16; -jalview.schemes.ResidueProperties.aaIndex['w'.charCodeAt (0)] = 17; -jalview.schemes.ResidueProperties.aaIndex['y'.charCodeAt (0)] = 18; -jalview.schemes.ResidueProperties.aaIndex['v'.charCodeAt (0)] = 19; -jalview.schemes.ResidueProperties.aaIndex['b'.charCodeAt (0)] = 20; -jalview.schemes.ResidueProperties.aaIndex['z'.charCodeAt (0)] = 21; -jalview.schemes.ResidueProperties.aaIndex['x'.charCodeAt (0)] = 22; -jalview.schemes.ResidueProperties.aaIndex['u'.charCodeAt (0)] = 22; -}Clazz.defineStatics (c$, -"maxProteinIndex", 23, -"maxNucleotideIndex", 10); -{ -jalview.schemes.ResidueProperties.nucleotideIndex = Clazz.newIntArray (255, 0); -for (var i = 0; i < 255; i++) { -jalview.schemes.ResidueProperties.nucleotideIndex[i] = 10; -} -jalview.schemes.ResidueProperties.nucleotideIndex['A'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.nucleotideIndex['a'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.nucleotideIndex['C'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.nucleotideIndex['c'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.nucleotideIndex['G'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.nucleotideIndex['g'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.nucleotideIndex['T'.charCodeAt (0)] = 3; -jalview.schemes.ResidueProperties.nucleotideIndex['t'.charCodeAt (0)] = 3; -jalview.schemes.ResidueProperties.nucleotideIndex['U'.charCodeAt (0)] = 4; -jalview.schemes.ResidueProperties.nucleotideIndex['u'.charCodeAt (0)] = 4; -jalview.schemes.ResidueProperties.nucleotideIndex['I'.charCodeAt (0)] = 5; -jalview.schemes.ResidueProperties.nucleotideIndex['i'.charCodeAt (0)] = 5; -jalview.schemes.ResidueProperties.nucleotideIndex['X'.charCodeAt (0)] = 6; -jalview.schemes.ResidueProperties.nucleotideIndex['x'.charCodeAt (0)] = 6; -jalview.schemes.ResidueProperties.nucleotideIndex['R'.charCodeAt (0)] = 7; -jalview.schemes.ResidueProperties.nucleotideIndex['r'.charCodeAt (0)] = 7; -jalview.schemes.ResidueProperties.nucleotideIndex['Y'.charCodeAt (0)] = 8; -jalview.schemes.ResidueProperties.nucleotideIndex['y'.charCodeAt (0)] = 8; -jalview.schemes.ResidueProperties.nucleotideIndex['N'.charCodeAt (0)] = 9; -jalview.schemes.ResidueProperties.nucleotideIndex['n'.charCodeAt (0)] = 9; -jalview.schemes.ResidueProperties.nucleotideName.put ("A", "Adenine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("a", "Adenine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("G", "Guanine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("g", "Guanine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("C", "Cytosine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("c", "Cytosine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("T", "Thymine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("t", "Thymine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("U", "Uracil"); -jalview.schemes.ResidueProperties.nucleotideName.put ("u", "Uracil"); -jalview.schemes.ResidueProperties.nucleotideName.put ("I", "Inosine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("i", "Inosine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("X", "Xanthine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("x", "Xanthine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("R", "Unknown Purine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("r", "Unknown Purine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("Y", "Unknown Pyrimidine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("y", "Unknown Pyrimidine"); -jalview.schemes.ResidueProperties.nucleotideName.put ("N", "Unknown"); -jalview.schemes.ResidueProperties.nucleotideName.put ("n", "Unknown"); -jalview.schemes.ResidueProperties.nucleotideName.put ("W", "Weak nucleotide (A or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("w", "Weak nucleotide (A or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("S", "Strong nucleotide (G or C)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("s", "Strong nucleotide (G or C)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("M", "Amino (A or C)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("m", "Amino (A or C)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("K", "Keto (G or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("k", "Keto (G or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("B", "Not A (G or C or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("b", "Not A (G or C or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("H", "Not G (A or C or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("h", "Not G (A or C or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("D", "Not C (A or G or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("d", "Not C (A or G or T)"); -jalview.schemes.ResidueProperties.nucleotideName.put ("V", "Not T (A or G or C"); -jalview.schemes.ResidueProperties.nucleotideName.put ("v", "Not T (A or G or C"); -}{ -jalview.schemes.ResidueProperties.purinepyrimidineIndex = Clazz.newIntArray (255, 0); -for (var i = 0; i < 255; i++) { -jalview.schemes.ResidueProperties.purinepyrimidineIndex[i] = 3; -} -jalview.schemes.ResidueProperties.purinepyrimidineIndex['A'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['a'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['C'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['c'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['G'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['g'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['T'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['t'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['U'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['u'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['I'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['i'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['X'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['x'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['R'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['r'.charCodeAt (0)] = 0; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['Y'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['y'.charCodeAt (0)] = 1; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['N'.charCodeAt (0)] = 2; -jalview.schemes.ResidueProperties.purinepyrimidineIndex['n'.charCodeAt (0)] = 2; -}{ -jalview.schemes.ResidueProperties.aa3Hash.put ("ALA", new Integer (0)); -jalview.schemes.ResidueProperties.aa3Hash.put ("ARG", new Integer (1)); -jalview.schemes.ResidueProperties.aa3Hash.put ("ASN", new Integer (2)); -jalview.schemes.ResidueProperties.aa3Hash.put ("ASP", new Integer (3)); -jalview.schemes.ResidueProperties.aa3Hash.put ("CYS", new Integer (4)); -jalview.schemes.ResidueProperties.aa3Hash.put ("GLN", new Integer (5)); -jalview.schemes.ResidueProperties.aa3Hash.put ("GLU", new Integer (6)); -jalview.schemes.ResidueProperties.aa3Hash.put ("GLY", new Integer (7)); -jalview.schemes.ResidueProperties.aa3Hash.put ("HIS", new Integer (8)); -jalview.schemes.ResidueProperties.aa3Hash.put ("ILE", new Integer (9)); -jalview.schemes.ResidueProperties.aa3Hash.put ("LEU", new Integer (10)); -jalview.schemes.ResidueProperties.aa3Hash.put ("LYS", new Integer (11)); -jalview.schemes.ResidueProperties.aa3Hash.put ("MET", new Integer (12)); -jalview.schemes.ResidueProperties.aa3Hash.put ("PHE", new Integer (13)); -jalview.schemes.ResidueProperties.aa3Hash.put ("PRO", new Integer (14)); -jalview.schemes.ResidueProperties.aa3Hash.put ("SER", new Integer (15)); -jalview.schemes.ResidueProperties.aa3Hash.put ("THR", new Integer (16)); -jalview.schemes.ResidueProperties.aa3Hash.put ("TRP", new Integer (17)); -jalview.schemes.ResidueProperties.aa3Hash.put ("TYR", new Integer (18)); -jalview.schemes.ResidueProperties.aa3Hash.put ("VAL", new Integer (19)); -jalview.schemes.ResidueProperties.aa3Hash.put ("ASX", new Integer (20)); -jalview.schemes.ResidueProperties.aa3Hash.put ("GLX", new Integer (21)); -jalview.schemes.ResidueProperties.aa3Hash.put ("XAA", new Integer (22)); -jalview.schemes.ResidueProperties.aa3Hash.put ("-", new Integer (23)); -jalview.schemes.ResidueProperties.aa3Hash.put ("*", new Integer (23)); -jalview.schemes.ResidueProperties.aa3Hash.put (".", new Integer (23)); -jalview.schemes.ResidueProperties.aa3Hash.put (" ", new Integer (23)); -jalview.schemes.ResidueProperties.aa3Hash.put ("Gap", new Integer (23)); -}{ -jalview.schemes.ResidueProperties.aa2Triplet.put ("A", "ALA"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("a", "ALA"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("R", "ARG"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("r", "ARG"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("N", "ASN"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("n", "ASN"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("D", "ASP"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("d", "ASP"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("C", "CYS"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("c", "CYS"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("Q", "GLN"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("q", "GLN"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("E", "GLU"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("e", "GLU"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("G", "GLY"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("g", "GLY"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("H", "HIS"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("h", "HIS"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("I", "ILE"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("i", "ILE"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("L", "LEU"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("l", "LEU"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("K", "LYS"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("k", "LYS"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("M", "MET"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("m", "MET"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("F", "PHE"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("f", "PHE"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("P", "PRO"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("p", "PRO"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("S", "SER"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("s", "SER"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("T", "THR"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("t", "THR"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("W", "TRP"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("w", "TRP"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("Y", "TYR"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("y", "TYR"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("V", "VAL"); -jalview.schemes.ResidueProperties.aa2Triplet.put ("v", "VAL"); -}Clazz.defineStatics (c$, -"aa", Clazz.newArray (-1, ["A", "R", "N", "D", "C", "Q", "E", "G", "H", "I", "L", "K", "M", "F", "P", "S", "T", "W", "Y", "V", "B", "Z", "X", "_", "*", ".", " "])); -c$.midBlue = c$.prototype.midBlue = new java.awt.Color (100, 100, 255); -c$.scaleColours = c$.prototype.scaleColours = new java.util.Vector (); -{ -jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (114, 0, 147)); -jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (156, 0, 98)); -jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (190, 0, 0)); -jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.red); -jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (255, 125, 0)); -jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.orange); -jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (255, 194, 85)); -jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.yellow); -jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (255, 255, 181)); -jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.white); -}c$.taylor = c$.prototype.taylor = Clazz.newArray (-1, [ new java.awt.Color (204, 255, 0), new java.awt.Color (0, 0, 255), new java.awt.Color (204, 0, 255), new java.awt.Color (255, 0, 0), new java.awt.Color (255, 255, 0), new java.awt.Color (255, 0, 204), new java.awt.Color (255, 0, 102), new java.awt.Color (255, 153, 0), new java.awt.Color (0, 102, 255), new java.awt.Color (102, 255, 0), new java.awt.Color (51, 255, 0), new java.awt.Color (102, 0, 255), new java.awt.Color (0, 255, 0), new java.awt.Color (0, 255, 102), new java.awt.Color (255, 204, 0), new java.awt.Color (255, 51, 0), new java.awt.Color (255, 102, 0), new java.awt.Color (0, 204, 255), new java.awt.Color (0, 255, 204), new java.awt.Color (153, 255, 0), java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white]); -c$.nucleotide = c$.prototype.nucleotide = Clazz.newArray (-1, [ new java.awt.Color (100, 247, 63), new java.awt.Color (255, 179, 64), new java.awt.Color (235, 65, 60), new java.awt.Color (60, 136, 238), new java.awt.Color (60, 136, 238), java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white]); -c$.purinepyrimidine = c$.prototype.purinepyrimidine = Clazz.newArray (-1, [ new java.awt.Color (255, 131, 250), new java.awt.Color (64, 224, 208), java.awt.Color.white, java.awt.Color.white]); -c$.zappo = c$.prototype.zappo = Clazz.newArray (-1, [java.awt.Color.pink, jalview.schemes.ResidueProperties.midBlue, java.awt.Color.green, java.awt.Color.red, java.awt.Color.yellow, java.awt.Color.green, java.awt.Color.red, java.awt.Color.magenta, jalview.schemes.ResidueProperties.midBlue, java.awt.Color.pink, java.awt.Color.pink, jalview.schemes.ResidueProperties.midBlue, java.awt.Color.pink, java.awt.Color.orange, java.awt.Color.magenta, java.awt.Color.green, java.awt.Color.green, java.awt.Color.orange, java.awt.Color.orange, java.awt.Color.pink, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white]); -Clazz.defineStatics (c$, -"hyd2", Clazz.newDoubleArray (-1, [0.62, 0.29, -0.9, -0.74, 1.19, 0.48, -0.4, 1.38, -1.5, 1.06, 0.64, -0.78, 0.12, -0.85, -2.53, -0.18, -0.05, 1.08, 0.81, 0.0, 0.26, 0.0, 0.0]), -"helix", Clazz.newDoubleArray (-1, [1.42, 0.98, 0.67, 1.01, 0.70, 1.11, 1.51, 0.57, 1.00, 1.08, 1.21, 1.16, 1.45, 1.13, 0.57, 0.77, 0.83, 1.08, 0.69, 1.06, 0.84, 1.31, 1.00, 0.0]), -"helixmin", 0.57, -"helixmax", 1.51, -"strand", Clazz.newDoubleArray (-1, [0.83, 0.93, 0.89, 0.54, 1.19, 1.10, 0.37, 0.75, 0.87, 1.60, 1.30, 0.74, 1.05, 1.38, 0.55, 0.75, 1.19, 1.37, 1.47, 1.70, 0.72, 0.74, 1.0, 0.0]), -"strandmin", 0.37, -"strandmax", 1.7, -"turn", Clazz.newDoubleArray (-1, [0.66, 0.95, 1.56, 1.46, 1.19, 0.98, 0.74, 1.56, 0.95, 0.47, 0.59, 1.01, 0.60, 0.60, 1.52, 1.43, 0.96, 0.96, 1.14, 0.50, 1.51, 0.86, 1.00, 0, 0]), -"turnmin", 0.47, -"turnmax", 1.56, -"buried", Clazz.newDoubleArray (-1, [1.7, 0.1, 0.4, 0.4, 4.6, 0.3, 0.3, 1.8, 0.8, 3.1, 2.4, 0.05, 1.9, 2.2, 0.6, 0.8, 0.7, 1.6, 0.5, 2.9, 0.4, 0.3, 1.358, 0.00]), -"buriedmin", 0.05, -"buriedmax", 4.6, -"hyd", Clazz.newDoubleArray (-1, [1.8, -4.5, -3.5, -3.5, 2.5, -3.5, -3.5, -0.4, -3.2, 4.5, 3.8, -3.9, 1.9, 2.8, -1.6, -0.8, -0.7, -0.9, -1.3, 4.2, -3.5, -3.5, -0.49, 0.0]), -"hydmax", 4.5, -"hydmin", -3.9, -"BLOSUM62", Clazz.newArray (-1, [ Clazz.newIntArray (-1, [4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3, -2, 0, -2, -1, 0, -4]), Clazz.newIntArray (-1, [-1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1, -3, -2, -3, -1, 0, -1, -4]), Clazz.newIntArray (-1, [-2, 0, 6, 1, -3, 0, 0, 0, 1, -3, -3, 0, -2, -3, -2, 1, 0, -4, -2, -3, 3, 0, -1, -4]), Clazz.newIntArray (-1, [-2, -2, 1, 6, -3, 0, 2, -1, -1, -3, -4, -1, -3, -3, -1, 0, -1, -4, -3, -3, 4, 1, -1, -4]), Clazz.newIntArray (-1, [0, 3, -3, -3, 9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1, -1, -2, -2, -1, -3, -3, -2, -4]), Clazz.newIntArray (-1, [-1, 1, 0, 0, -3, 5, 2, -2, 0, -3, -2, 1, 0, -3, -1, 0, -1, -2, -1, -2, 0, 3, -1, -4]), Clazz.newIntArray (-1, [-1, 0, 0, 2, -4, 2, 5, -2, 0, -3, -3, 1, -2, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4]), Clazz.newIntArray (-1, [0, -2, 0, -1, -3, -2, -2, 6, -2, -4, -4, -2, -3, -3, -2, 0, -2, -2, -3, -3, -1, -2, -1, -4]), Clazz.newIntArray (-1, [-2, 0, 1, -1, -3, 0, 0, -2, 8, -3, -3, -1, -2, -1, -2, -1, -2, -2, 2, -3, 0, 0, -1, -4]), Clazz.newIntArray (-1, [-1, -3, -3, -3, -1, -3, -3, -4, -3, 4, 2, -3, 1, 0, -3, -2, -1, -3, -1, 3, -3, -3, -1, -4]), Clazz.newIntArray (-1, [-1, -2, -3, -4, -1, -2, -3, -4, -3, 2, 4, -2, 2, 0, -3, -2, -1, -2, -1, 1, -4, -3, -1, -4]), Clazz.newIntArray (-1, [-1, 2, 0, -1, -3, 1, 1, -2, -1, -3, -2, 5, -1, -3, -1, 0, -1, -3, -2, -2, 0, 1, -1, -4]), Clazz.newIntArray (-1, [-1, -1, -2, -3, -1, 0, -2, -3, -2, 1, 2, -1, 5, 0, -2, -1, -1, -1, -1, 1, -3, -1, -1, -4]), Clazz.newIntArray (-1, [-2, -3, -3, -3, -2, -3, -3, -3, -1, 0, 0, -3, 0, 6, -4, -2, -2, 1, 3, -1, -3, -3, -1, -4]), Clazz.newIntArray (-1, [-1, -2, -2, -1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4, 7, -1, -1, -4, -3, -2, -2, -1, -2, -4]), Clazz.newIntArray (-1, [1, -1, 1, 0, -1, 0, 0, 0, -1, -2, -2, 0, -1, -2, -1, 4, 1, -3, -2, -2, 0, 0, 0, -4]), Clazz.newIntArray (-1, [0, -1, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1, 1, 5, -2, -2, 0, -1, -1, 0, -4]), Clazz.newIntArray (-1, [-3, -3, -4, -4, -2, -2, -3, -2, -2, -3, -2, -3, -1, 1, -4, -3, -2, 11, 2, -3, -4, -3, -2, -4]), Clazz.newIntArray (-1, [-2, -2, -2, -3, -2, -1, -2, -3, 2, -1, -1, -2, -1, 3, -3, -2, -2, 2, 7, -1, -3, -2, -1, -4]), Clazz.newIntArray (-1, [0, -3, -3, -3, -1, -2, -2, -3, -3, 3, 1, -2, 1, -1, -2, -2, 0, -3, -1, 4, -3, -2, -1, -4]), Clazz.newIntArray (-1, [-2, -1, 3, 4, -3, 0, 1, -1, 0, -3, -4, 0, -3, -3, -2, 0, -1, -4, -3, -3, 4, 1, -1, -4]), Clazz.newIntArray (-1, [-1, 0, 0, 1, -3, 3, 4, -2, 0, -3, -3, 1, -1, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4]), Clazz.newIntArray (-1, [0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, 0, 0, -2, -1, -1, -1, -1, -1, -4]), Clazz.newIntArray (-1, [-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 1])]), -"PAM250", Clazz.newArray (-1, [ Clazz.newIntArray (-1, [2, -2, 0, 0, -2, 0, 0, 1, -1, -1, -2, -1, -1, -3, 1, 1, 1, -6, -3, 0, 0, 0, 0, -8]), Clazz.newIntArray (-1, [-2, 6, 0, -1, -4, 1, -1, -3, 2, -2, -3, 3, 0, -4, 0, 0, -1, 2, -4, -2, -1, 0, -1, -8]), Clazz.newIntArray (-1, [0, 0, 2, 2, -4, 1, 1, 0, 2, -2, -3, 1, -2, -3, 0, 1, 0, -4, -2, -2, 2, 1, 0, -8]), Clazz.newIntArray (-1, [0, -1, 2, 4, -5, 2, 3, 1, 1, -2, -4, 0, -3, -6, -1, 0, 0, -7, -4, -2, 3, 3, -1, -8]), Clazz.newIntArray (-1, [-2, -4, -4, -5, 12, -5, -5, -3, -3, -2, -6, -5, -5, -4, -3, 0, -2, -8, 0, -2, -4, -5, -3, -8]), Clazz.newIntArray (-1, [0, 1, 1, 2, -5, 4, 2, -1, 3, -2, -2, 1, -1, -5, 0, -1, -1, -5, -4, -2, 1, 3, -1, -8]), Clazz.newIntArray (-1, [0, -1, 1, 3, -5, 2, 4, 0, 1, -2, -3, 0, -2, -5, -1, 0, 0, -7, -4, -2, 3, 3, -1, -8]), Clazz.newIntArray (-1, [1, -3, 0, 1, -3, -1, 0, 5, -2, -3, -4, -2, -3, -5, 0, 1, 0, -7, -5, -1, 0, 0, -1, -8]), Clazz.newIntArray (-1, [-1, 2, 2, 1, -3, 3, 1, -2, 6, -2, -2, 0, -2, -2, 0, -1, -1, -3, 0, -2, 1, 2, -1, -8]), Clazz.newIntArray (-1, [-1, -2, -2, -2, -2, -2, -2, -3, -2, 5, 2, -2, 2, 1, -2, -1, 0, -5, -1, 4, -2, -2, -1, -8]), Clazz.newIntArray (-1, [-2, -3, -3, -4, -6, -2, -3, -4, -2, 2, 6, -3, 4, 2, -3, -3, -2, -2, -1, 2, -3, -3, -1, -8]), Clazz.newIntArray (-1, [-1, 3, 1, 0, -5, 1, 0, -2, 0, -2, -3, 5, 0, -5, -1, 0, 0, -3, -4, -2, 1, 0, -1, -8]), Clazz.newIntArray (-1, [-1, 0, -2, -3, -5, -1, -2, -3, -2, 2, 4, 0, 6, 0, -2, -2, -1, -4, -2, 2, -2, -2, -1, -8]), Clazz.newIntArray (-1, [-3, -4, -3, -6, -4, -5, -5, -5, -2, 1, 2, -5, 0, 9, -5, -3, -3, 0, 7, -1, -4, -5, -2, -8]), Clazz.newIntArray (-1, [1, 0, 0, -1, -3, 0, -1, 0, 0, -2, -3, -1, -2, -5, 6, 1, 0, -6, -5, -1, -1, 0, -1, -8]), Clazz.newIntArray (-1, [1, 0, 1, 0, 0, -1, 0, 1, -1, -1, -3, 0, -2, -3, 1, 2, 1, -2, -3, -1, 0, 0, 0, -8]), Clazz.newIntArray (-1, [1, -1, 0, 0, -2, -1, 0, 0, -1, 0, -2, 0, -1, -3, 0, 1, 3, -5, -3, 0, 0, -1, 0, -8]), Clazz.newIntArray (-1, [-6, 2, -4, -7, -8, -5, -7, -7, -3, -5, -2, -3, -4, 0, -6, -2, -5, 17, 0, -6, -5, -6, -4, -8]), Clazz.newIntArray (-1, [-3, -4, -2, -4, 0, -4, -4, -5, 0, -1, -1, -4, -2, 7, -5, -3, -3, 0, 10, -2, -3, -4, -2, -8]), Clazz.newIntArray (-1, [0, -2, -2, -2, -2, -2, -2, -1, -2, 4, 2, -2, 2, -1, -1, -1, 0, -6, -2, 4, -2, -2, -1, -8]), Clazz.newIntArray (-1, [0, -1, 2, 3, -4, 1, 3, 0, 1, -2, -3, 1, -2, -4, -1, 0, 0, -5, -3, -2, 3, 2, -1, -8]), Clazz.newIntArray (-1, [0, 0, 1, 3, -5, 3, 3, 0, 2, -2, -3, 0, -2, -5, 0, 0, -1, -6, -4, -2, 2, 3, -1, -8]), Clazz.newIntArray (-1, [0, -1, 0, -1, -3, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, 0, 0, -4, -2, -1, -1, -1, -1, -8]), Clazz.newIntArray (-1, [-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, 1])])); -c$.ssHash = c$.prototype.ssHash = new java.util.Hashtable (); -{ -jalview.schemes.ResidueProperties.ssHash.put ("H", java.awt.Color.magenta); -jalview.schemes.ResidueProperties.ssHash.put ("E", java.awt.Color.yellow); -jalview.schemes.ResidueProperties.ssHash.put ("-", java.awt.Color.white); -jalview.schemes.ResidueProperties.ssHash.put (".", java.awt.Color.white); -jalview.schemes.ResidueProperties.ssHash.put ("S", java.awt.Color.cyan); -jalview.schemes.ResidueProperties.ssHash.put ("T", java.awt.Color.blue); -jalview.schemes.ResidueProperties.ssHash.put ("G", java.awt.Color.pink); -jalview.schemes.ResidueProperties.ssHash.put ("I", java.awt.Color.pink); -jalview.schemes.ResidueProperties.ssHash.put ("B", java.awt.Color.yellow); -}Clazz.defineStatics (c$, -"DNA", Clazz.newArray (-1, [ Clazz.newIntArray (-1, [10, -8, -8, -8, -8, 1, 1, 1, -8, 1, 1]), Clazz.newIntArray (-1, [-8, 10, -8, -8, -8, 1, 1, -8, 1, 1, 1]), Clazz.newIntArray (-1, [-8, -8, 10, -8, -8, 1, 1, 1, -8, 1, 1]), Clazz.newIntArray (-1, [-8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1]), Clazz.newIntArray (-1, [-8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 10, 0, 0, 0, 1, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 0, 10, 0, 0, 1, 1]), Clazz.newIntArray (-1, [1, -8, 1, -8, -8, 0, 0, 10, -8, 1, 1]), Clazz.newIntArray (-1, [-8, 1, -8, 1, 1, 0, 0, -8, 10, 1, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])])); -{ -jalview.schemes.ResidueProperties.scoreMatrices.put ("BLOSUM62", new jalview.schemes.ScoreMatrix ("BLOSUM62", jalview.schemes.ResidueProperties.BLOSUM62, 0)); -jalview.schemes.ResidueProperties.scoreMatrices.put ("PAM250", new jalview.schemes.ScoreMatrix ("PAM250", jalview.schemes.ResidueProperties.PAM250, 0)); -jalview.schemes.ResidueProperties.scoreMatrices.put ("DNA", new jalview.schemes.ScoreMatrix ("DNA", jalview.schemes.ResidueProperties.DNA, 1)); -}c$.pidColours = c$.prototype.pidColours = Clazz.newArray (-1, [jalview.schemes.ResidueProperties.midBlue, new java.awt.Color (153, 153, 255), new java.awt.Color (204, 204, 255)]); -Clazz.defineStatics (c$, -"pidThresholds", Clazz.newFloatArray (-1, [80, 60, 40])); -c$.codonHash = c$.prototype.codonHash = new java.util.HashMap (); -c$.Lys = c$.prototype.Lys = new java.util.ArrayList (); -c$.Asn = c$.prototype.Asn = new java.util.ArrayList (); -c$.Gln = c$.prototype.Gln = new java.util.ArrayList (); -c$.His = c$.prototype.His = new java.util.ArrayList (); -c$.Glu = c$.prototype.Glu = new java.util.ArrayList (); -c$.Asp = c$.prototype.Asp = new java.util.ArrayList (); -c$.Tyr = c$.prototype.Tyr = new java.util.ArrayList (); -c$.Thr = c$.prototype.Thr = new java.util.ArrayList (); -c$.Pro = c$.prototype.Pro = new java.util.ArrayList (); -c$.Ala = c$.prototype.Ala = new java.util.ArrayList (); -c$.Ser = c$.prototype.Ser = new java.util.ArrayList (); -c$.Arg = c$.prototype.Arg = new java.util.ArrayList (); -c$.Gly = c$.prototype.Gly = new java.util.ArrayList (); -c$.Trp = c$.prototype.Trp = new java.util.ArrayList (); -c$.Cys = c$.prototype.Cys = new java.util.ArrayList (); -c$.Ile = c$.prototype.Ile = new java.util.ArrayList (); -c$.Met = c$.prototype.Met = new java.util.ArrayList (); -c$.Leu = c$.prototype.Leu = new java.util.ArrayList (); -c$.Val = c$.prototype.Val = new java.util.ArrayList (); -c$.Phe = c$.prototype.Phe = new java.util.ArrayList (); -c$.STOP = c$.prototype.STOP = new java.util.ArrayList (); -Clazz.defineStatics (c$, -"START", "ATG"); -{ -jalview.schemes.ResidueProperties.codonHash.put ("K", jalview.schemes.ResidueProperties.Lys); -jalview.schemes.ResidueProperties.codonHash.put ("N", jalview.schemes.ResidueProperties.Asn); -jalview.schemes.ResidueProperties.codonHash.put ("Q", jalview.schemes.ResidueProperties.Gln); -jalview.schemes.ResidueProperties.codonHash.put ("H", jalview.schemes.ResidueProperties.His); -jalview.schemes.ResidueProperties.codonHash.put ("E", jalview.schemes.ResidueProperties.Glu); -jalview.schemes.ResidueProperties.codonHash.put ("D", jalview.schemes.ResidueProperties.Asp); -jalview.schemes.ResidueProperties.codonHash.put ("Y", jalview.schemes.ResidueProperties.Tyr); -jalview.schemes.ResidueProperties.codonHash.put ("T", jalview.schemes.ResidueProperties.Thr); -jalview.schemes.ResidueProperties.codonHash.put ("P", jalview.schemes.ResidueProperties.Pro); -jalview.schemes.ResidueProperties.codonHash.put ("A", jalview.schemes.ResidueProperties.Ala); -jalview.schemes.ResidueProperties.codonHash.put ("S", jalview.schemes.ResidueProperties.Ser); -jalview.schemes.ResidueProperties.codonHash.put ("R", jalview.schemes.ResidueProperties.Arg); -jalview.schemes.ResidueProperties.codonHash.put ("G", jalview.schemes.ResidueProperties.Gly); -jalview.schemes.ResidueProperties.codonHash.put ("W", jalview.schemes.ResidueProperties.Trp); -jalview.schemes.ResidueProperties.codonHash.put ("C", jalview.schemes.ResidueProperties.Cys); -jalview.schemes.ResidueProperties.codonHash.put ("I", jalview.schemes.ResidueProperties.Ile); -jalview.schemes.ResidueProperties.codonHash.put ("M", jalview.schemes.ResidueProperties.Met); -jalview.schemes.ResidueProperties.codonHash.put ("L", jalview.schemes.ResidueProperties.Leu); -jalview.schemes.ResidueProperties.codonHash.put ("V", jalview.schemes.ResidueProperties.Val); -jalview.schemes.ResidueProperties.codonHash.put ("F", jalview.schemes.ResidueProperties.Phe); -jalview.schemes.ResidueProperties.codonHash.put ("STOP", jalview.schemes.ResidueProperties.STOP); -}c$.ambiguityCodes = c$.prototype.ambiguityCodes = new java.util.Hashtable (); -c$.codonHash2 = c$.prototype.codonHash2 = new java.util.Hashtable (); -c$._ambiguityCodes = c$.prototype._ambiguityCodes = new java.util.Hashtable (); -{ -jalview.schemes.ResidueProperties.ambiguityCodes.put ("R", Clazz.newArray (-1, ["A", "G"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("Y", Clazz.newArray (-1, ["T", "C"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("W", Clazz.newArray (-1, ["A", "T"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("S", Clazz.newArray (-1, ["G", "C"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("M", Clazz.newArray (-1, ["A", "C"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("K", Clazz.newArray (-1, ["G", "T"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("H", Clazz.newArray (-1, ["A", "T", "C"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("B", Clazz.newArray (-1, ["G", "T", "C"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("V", Clazz.newArray (-1, ["G", "A", "C"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("D", Clazz.newArray (-1, ["G", "A", "T"])); -jalview.schemes.ResidueProperties.ambiguityCodes.put ("N", Clazz.newArray (-1, ["G", "A", "T", "C"])); -jalview.schemes.ResidueProperties.codonHash2.put ("AAA", "K"); -jalview.schemes.ResidueProperties.codonHash2.put ("AAG", "K"); -jalview.schemes.ResidueProperties.codonHash2.put ("AAC", "N"); -jalview.schemes.ResidueProperties.codonHash2.put ("AAT", "N"); -jalview.schemes.ResidueProperties.codonHash2.put ("CAA", "Q"); -jalview.schemes.ResidueProperties.codonHash2.put ("CAG", "Q"); -jalview.schemes.ResidueProperties.codonHash2.put ("CAC", "H"); -jalview.schemes.ResidueProperties.codonHash2.put ("CAT", "H"); -jalview.schemes.ResidueProperties.codonHash2.put ("GAA", "E"); -jalview.schemes.ResidueProperties.codonHash2.put ("GAG", "E"); -jalview.schemes.ResidueProperties.codonHash2.put ("GAC", "D"); -jalview.schemes.ResidueProperties.codonHash2.put ("GAT", "D"); -jalview.schemes.ResidueProperties.codonHash2.put ("TAC", "Y"); -jalview.schemes.ResidueProperties.codonHash2.put ("TAT", "Y"); -jalview.schemes.ResidueProperties.codonHash2.put ("ACA", "T"); -jalview.schemes.ResidueProperties.codonHash2.put ("ACC", "T"); -jalview.schemes.ResidueProperties.codonHash2.put ("ACT", "T"); -jalview.schemes.ResidueProperties.codonHash2.put ("ACG", "T"); -jalview.schemes.ResidueProperties.codonHash2.put ("CCA", "P"); -jalview.schemes.ResidueProperties.codonHash2.put ("CCG", "P"); -jalview.schemes.ResidueProperties.codonHash2.put ("CCC", "P"); -jalview.schemes.ResidueProperties.codonHash2.put ("CCT", "P"); -jalview.schemes.ResidueProperties.codonHash2.put ("GCA", "A"); -jalview.schemes.ResidueProperties.codonHash2.put ("GCG", "A"); -jalview.schemes.ResidueProperties.codonHash2.put ("GCC", "A"); -jalview.schemes.ResidueProperties.codonHash2.put ("GCT", "A"); -jalview.schemes.ResidueProperties.codonHash2.put ("TCA", "S"); -jalview.schemes.ResidueProperties.codonHash2.put ("TCG", "S"); -jalview.schemes.ResidueProperties.codonHash2.put ("TCC", "S"); -jalview.schemes.ResidueProperties.codonHash2.put ("TCT", "S"); -jalview.schemes.ResidueProperties.codonHash2.put ("AGC", "S"); -jalview.schemes.ResidueProperties.codonHash2.put ("AGT", "S"); -jalview.schemes.ResidueProperties.codonHash2.put ("AGA", "R"); -jalview.schemes.ResidueProperties.codonHash2.put ("AGG", "R"); -jalview.schemes.ResidueProperties.codonHash2.put ("CGA", "R"); -jalview.schemes.ResidueProperties.codonHash2.put ("CGG", "R"); -jalview.schemes.ResidueProperties.codonHash2.put ("CGC", "R"); -jalview.schemes.ResidueProperties.codonHash2.put ("CGT", "R"); -jalview.schemes.ResidueProperties.codonHash2.put ("GGA", "G"); -jalview.schemes.ResidueProperties.codonHash2.put ("GGG", "G"); -jalview.schemes.ResidueProperties.codonHash2.put ("GGC", "G"); -jalview.schemes.ResidueProperties.codonHash2.put ("GGT", "G"); -jalview.schemes.ResidueProperties.codonHash2.put ("TGA", "*"); -jalview.schemes.ResidueProperties.codonHash2.put ("TAA", "*"); -jalview.schemes.ResidueProperties.codonHash2.put ("TAG", "*"); -jalview.schemes.ResidueProperties.codonHash2.put ("TGG", "W"); -jalview.schemes.ResidueProperties.codonHash2.put ("TGC", "C"); -jalview.schemes.ResidueProperties.codonHash2.put ("TGT", "C"); -jalview.schemes.ResidueProperties.codonHash2.put ("ATA", "I"); -jalview.schemes.ResidueProperties.codonHash2.put ("ATC", "I"); -jalview.schemes.ResidueProperties.codonHash2.put ("ATT", "I"); -jalview.schemes.ResidueProperties.codonHash2.put ("ATG", "M"); -jalview.schemes.ResidueProperties.codonHash2.put ("CTA", "L"); -jalview.schemes.ResidueProperties.codonHash2.put ("CTG", "L"); -jalview.schemes.ResidueProperties.codonHash2.put ("CTC", "L"); -jalview.schemes.ResidueProperties.codonHash2.put ("CTT", "L"); -jalview.schemes.ResidueProperties.codonHash2.put ("TTA", "L"); -jalview.schemes.ResidueProperties.codonHash2.put ("TTG", "L"); -jalview.schemes.ResidueProperties.codonHash2.put ("GTA", "V"); -jalview.schemes.ResidueProperties.codonHash2.put ("GTG", "V"); -jalview.schemes.ResidueProperties.codonHash2.put ("GTC", "V"); -jalview.schemes.ResidueProperties.codonHash2.put ("GTT", "V"); -jalview.schemes.ResidueProperties.codonHash2.put ("TTC", "F"); -jalview.schemes.ResidueProperties.codonHash2.put ("TTT", "F"); -jalview.schemes.ResidueProperties.buildAmbiguityCodonSet (); -}{ -jalview.schemes.ResidueProperties.Lys.add ("AAA"); -jalview.schemes.ResidueProperties.Lys.add ("AAG"); -jalview.schemes.ResidueProperties.Asn.add ("AAC"); -jalview.schemes.ResidueProperties.Asn.add ("AAT"); -jalview.schemes.ResidueProperties.Gln.add ("CAA"); -jalview.schemes.ResidueProperties.Gln.add ("CAG"); -jalview.schemes.ResidueProperties.His.add ("CAC"); -jalview.schemes.ResidueProperties.His.add ("CAT"); -jalview.schemes.ResidueProperties.Glu.add ("GAA"); -jalview.schemes.ResidueProperties.Glu.add ("GAG"); -jalview.schemes.ResidueProperties.Asp.add ("GAC"); -jalview.schemes.ResidueProperties.Asp.add ("GAT"); -jalview.schemes.ResidueProperties.Tyr.add ("TAC"); -jalview.schemes.ResidueProperties.Tyr.add ("TAT"); -jalview.schemes.ResidueProperties.Thr.add ("ACA"); -jalview.schemes.ResidueProperties.Thr.add ("ACG"); -jalview.schemes.ResidueProperties.Thr.add ("ACC"); -jalview.schemes.ResidueProperties.Thr.add ("ACT"); -jalview.schemes.ResidueProperties.Pro.add ("CCA"); -jalview.schemes.ResidueProperties.Pro.add ("CCG"); -jalview.schemes.ResidueProperties.Pro.add ("CCC"); -jalview.schemes.ResidueProperties.Pro.add ("CCT"); -jalview.schemes.ResidueProperties.Ala.add ("GCA"); -jalview.schemes.ResidueProperties.Ala.add ("GCG"); -jalview.schemes.ResidueProperties.Ala.add ("GCC"); -jalview.schemes.ResidueProperties.Ala.add ("GCT"); -jalview.schemes.ResidueProperties.Ser.add ("TCA"); -jalview.schemes.ResidueProperties.Ser.add ("TCG"); -jalview.schemes.ResidueProperties.Ser.add ("TCC"); -jalview.schemes.ResidueProperties.Ser.add ("TCT"); -jalview.schemes.ResidueProperties.Ser.add ("AGC"); -jalview.schemes.ResidueProperties.Ser.add ("AGT"); -jalview.schemes.ResidueProperties.Arg.add ("AGA"); -jalview.schemes.ResidueProperties.Arg.add ("AGG"); -jalview.schemes.ResidueProperties.Arg.add ("CGA"); -jalview.schemes.ResidueProperties.Arg.add ("CGG"); -jalview.schemes.ResidueProperties.Arg.add ("CGC"); -jalview.schemes.ResidueProperties.Arg.add ("CGT"); -jalview.schemes.ResidueProperties.Gly.add ("GGA"); -jalview.schemes.ResidueProperties.Gly.add ("GGG"); -jalview.schemes.ResidueProperties.Gly.add ("GGC"); -jalview.schemes.ResidueProperties.Gly.add ("GGT"); -jalview.schemes.ResidueProperties.STOP.add ("TGA"); -jalview.schemes.ResidueProperties.STOP.add ("TAA"); -jalview.schemes.ResidueProperties.STOP.add ("TAG"); -jalview.schemes.ResidueProperties.Trp.add ("TGG"); -jalview.schemes.ResidueProperties.Cys.add ("TGC"); -jalview.schemes.ResidueProperties.Cys.add ("TGT"); -jalview.schemes.ResidueProperties.Ile.add ("ATA"); -jalview.schemes.ResidueProperties.Ile.add ("ATC"); -jalview.schemes.ResidueProperties.Ile.add ("ATT"); -jalview.schemes.ResidueProperties.Met.add ("ATG"); -jalview.schemes.ResidueProperties.Leu.add ("CTA"); -jalview.schemes.ResidueProperties.Leu.add ("CTG"); -jalview.schemes.ResidueProperties.Leu.add ("CTC"); -jalview.schemes.ResidueProperties.Leu.add ("CTT"); -jalview.schemes.ResidueProperties.Leu.add ("TTA"); -jalview.schemes.ResidueProperties.Leu.add ("TTG"); -jalview.schemes.ResidueProperties.Val.add ("GTA"); -jalview.schemes.ResidueProperties.Val.add ("GTG"); -jalview.schemes.ResidueProperties.Val.add ("GTC"); -jalview.schemes.ResidueProperties.Val.add ("GTT"); -jalview.schemes.ResidueProperties.Phe.add ("TTC"); -jalview.schemes.ResidueProperties.Phe.add ("TTT"); -}c$.propHash = c$.prototype.propHash = new java.util.Hashtable (); -c$.hydrophobic = c$.prototype.hydrophobic = new java.util.Hashtable (); -c$.polar = c$.prototype.polar = new java.util.Hashtable (); -c$.small = c$.prototype.small = new java.util.Hashtable (); -c$.positive = c$.prototype.positive = new java.util.Hashtable (); -c$.negative = c$.prototype.negative = new java.util.Hashtable (); -c$.charged = c$.prototype.charged = new java.util.Hashtable (); -c$.aromatic = c$.prototype.aromatic = new java.util.Hashtable (); -c$.aliphatic = c$.prototype.aliphatic = new java.util.Hashtable (); -c$.tiny = c$.prototype.tiny = new java.util.Hashtable (); -c$.proline = c$.prototype.proline = new java.util.Hashtable (); -{ -jalview.schemes.ResidueProperties.hydrophobic.put ("I", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("L", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("V", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("C", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("A", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("G", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("M", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("F", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("Y", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("W", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("H", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("K", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("X", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("*", new Integer (1)); -jalview.schemes.ResidueProperties.hydrophobic.put ("R", new Integer (0)); -jalview.schemes.ResidueProperties.hydrophobic.put ("E", new Integer (0)); -jalview.schemes.ResidueProperties.hydrophobic.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.hydrophobic.put ("D", new Integer (0)); -jalview.schemes.ResidueProperties.hydrophobic.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.hydrophobic.put ("S", new Integer (0)); -jalview.schemes.ResidueProperties.hydrophobic.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.hydrophobic.put ("P", new Integer (0)); -}{ -jalview.schemes.ResidueProperties.polar.put ("Y", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("W", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("H", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("K", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("R", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("E", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("Q", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("D", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("N", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("S", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("T", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("X", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("*", new Integer (1)); -jalview.schemes.ResidueProperties.polar.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("V", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("A", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("G", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.polar.put ("P", new Integer (0)); -}{ -jalview.schemes.ResidueProperties.small.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("V", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("C", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("A", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("G", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("Y", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("W", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("H", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("K", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("R", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("E", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.small.put ("D", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("N", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("S", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("T", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("P", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.small.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.positive.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("V", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("A", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("G", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("Y", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("W", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("H", new Integer (1)); -jalview.schemes.ResidueProperties.positive.put ("K", new Integer (1)); -jalview.schemes.ResidueProperties.positive.put ("R", new Integer (1)); -jalview.schemes.ResidueProperties.positive.put ("E", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("D", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("S", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("P", new Integer (0)); -jalview.schemes.ResidueProperties.positive.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.positive.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.negative.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("V", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("A", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("G", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("Y", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("W", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("H", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("K", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("R", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("E", new Integer (1)); -jalview.schemes.ResidueProperties.negative.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("D", new Integer (1)); -jalview.schemes.ResidueProperties.negative.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("S", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("P", new Integer (0)); -jalview.schemes.ResidueProperties.negative.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.negative.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.charged.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("V", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("A", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("G", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("Y", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("W", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("H", new Integer (1)); -jalview.schemes.ResidueProperties.charged.put ("K", new Integer (1)); -jalview.schemes.ResidueProperties.charged.put ("R", new Integer (1)); -jalview.schemes.ResidueProperties.charged.put ("E", new Integer (1)); -jalview.schemes.ResidueProperties.charged.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("D", new Integer (1)); -jalview.schemes.ResidueProperties.charged.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("S", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("P", new Integer (0)); -jalview.schemes.ResidueProperties.charged.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.charged.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.aromatic.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("V", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("A", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("G", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("F", new Integer (1)); -jalview.schemes.ResidueProperties.aromatic.put ("Y", new Integer (1)); -jalview.schemes.ResidueProperties.aromatic.put ("W", new Integer (1)); -jalview.schemes.ResidueProperties.aromatic.put ("H", new Integer (1)); -jalview.schemes.ResidueProperties.aromatic.put ("K", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("R", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("E", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("D", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("S", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("P", new Integer (0)); -jalview.schemes.ResidueProperties.aromatic.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.aromatic.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.aliphatic.put ("I", new Integer (1)); -jalview.schemes.ResidueProperties.aliphatic.put ("L", new Integer (1)); -jalview.schemes.ResidueProperties.aliphatic.put ("V", new Integer (1)); -jalview.schemes.ResidueProperties.aliphatic.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("A", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("G", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("Y", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("W", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("H", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("K", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("R", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("E", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("D", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("S", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("P", new Integer (0)); -jalview.schemes.ResidueProperties.aliphatic.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.aliphatic.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.tiny.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("V", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("A", new Integer (1)); -jalview.schemes.ResidueProperties.tiny.put ("G", new Integer (1)); -jalview.schemes.ResidueProperties.tiny.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("Y", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("W", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("H", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("K", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("R", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("E", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("D", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("S", new Integer (1)); -jalview.schemes.ResidueProperties.tiny.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("P", new Integer (0)); -jalview.schemes.ResidueProperties.tiny.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.tiny.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.proline.put ("I", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("L", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("V", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("C", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("A", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("G", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("M", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("F", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("Y", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("W", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("H", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("K", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("R", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("E", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("Q", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("D", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("N", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("S", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("T", new Integer (0)); -jalview.schemes.ResidueProperties.proline.put ("P", new Integer (1)); -jalview.schemes.ResidueProperties.proline.put ("-", new Integer (1)); -jalview.schemes.ResidueProperties.proline.put ("*", new Integer (1)); -}{ -jalview.schemes.ResidueProperties.propHash.put ("hydrophobic", jalview.schemes.ResidueProperties.hydrophobic); -jalview.schemes.ResidueProperties.propHash.put ("small", jalview.schemes.ResidueProperties.small); -jalview.schemes.ResidueProperties.propHash.put ("positive", jalview.schemes.ResidueProperties.positive); -jalview.schemes.ResidueProperties.propHash.put ("negative", jalview.schemes.ResidueProperties.negative); -jalview.schemes.ResidueProperties.propHash.put ("charged", jalview.schemes.ResidueProperties.charged); -jalview.schemes.ResidueProperties.propHash.put ("aromatic", jalview.schemes.ResidueProperties.aromatic); -jalview.schemes.ResidueProperties.propHash.put ("aliphatic", jalview.schemes.ResidueProperties.aliphatic); -jalview.schemes.ResidueProperties.propHash.put ("tiny", jalview.schemes.ResidueProperties.tiny); -jalview.schemes.ResidueProperties.propHash.put ("proline", jalview.schemes.ResidueProperties.proline); -jalview.schemes.ResidueProperties.propHash.put ("polar", jalview.schemes.ResidueProperties.polar); -}{ -var propMatrixF = Clazz.newIntArray (23, 23, 0); -var propMatrixPos = Clazz.newIntArray (23, 23, 0); -var propMatrixEpos = Clazz.newIntArray (23, 23, 0); -for (var i = 0; i < 23; i++) { -var maxF = 0; -var maxP = 0; -var maxEP = 0; -var ic = ""; -if (jalview.schemes.ResidueProperties.aa.length > i) { -ic += jalview.schemes.ResidueProperties.aa[i]; -} else { -ic = "-"; -}for (var j = i + 1; j < 23; j++) { -var jc = ""; -if (jalview.schemes.ResidueProperties.aa.length > j) { -jc += jalview.schemes.ResidueProperties.aa[j]; -} else { -jc = "-"; -}propMatrixF[i][j] = 0; -propMatrixPos[i][j] = 0; -propMatrixEpos[i][j] = 0; -for (var en = jalview.schemes.ResidueProperties.propHash.keys (); en.hasMoreElements (); ) { -var ph = en.nextElement (); -var pph = jalview.schemes.ResidueProperties.propHash.get (ph); -if (pph.get (ic) != null && pph.get (jc) != null) { -var icp = pph.get (ic).intValue (); -var jcp = pph.get (jc).intValue (); -propMatrixPos[i][j] += icp == jcp && icp > 0 ? 2 : 0; -propMatrixPos[j][i] += icp == jcp && icp > 0 ? 2 : 0; -propMatrixF[i][j] += icp == jcp ? 2 : 0; -propMatrixF[j][i] += icp == jcp ? 2 : 0; -propMatrixEpos[i][j] += icp == jcp ? (1 + icp * 2) : 0; -propMatrixEpos[j][i] += icp == jcp ? (1 + icp * 2) : 0; -}} -if (maxF < propMatrixF[i][j]) { -maxF = propMatrixF[i][j]; -}if (maxP < propMatrixPos[i][j]) { -maxP = propMatrixPos[i][j]; -}if (maxEP < propMatrixEpos[i][j]) { -maxEP = propMatrixEpos[i][j]; -}} -propMatrixF[i][i] = maxF; -propMatrixPos[i][i] = maxP; -propMatrixEpos[i][i] = maxEP; -} -jalview.schemes.ResidueProperties.scoreMatrices.put ("PID", new jalview.analysis.scoremodels.PIDScoreModel ()); -jalview.schemes.ResidueProperties.scoreMatrices.put ("Displayed Features", new jalview.analysis.scoremodels.FeatureScoreModel ()); -}Clazz.defineStatics (c$, -"toDssp3State", null); -{ -jalview.schemes.ResidueProperties.toDssp3State = new java.util.Hashtable (); -jalview.schemes.ResidueProperties.toDssp3State.put ("H", "H"); -jalview.schemes.ResidueProperties.toDssp3State.put ("E", "E"); -jalview.schemes.ResidueProperties.toDssp3State.put ("C", " "); -jalview.schemes.ResidueProperties.toDssp3State.put (" ", " "); -jalview.schemes.ResidueProperties.toDssp3State.put ("T", " "); -jalview.schemes.ResidueProperties.toDssp3State.put ("B", "E"); -jalview.schemes.ResidueProperties.toDssp3State.put ("G", "H"); -jalview.schemes.ResidueProperties.toDssp3State.put ("I", "H"); -jalview.schemes.ResidueProperties.toDssp3State.put ("X", " "); -}Clazz.defineStatics (c$, -"toRNAssState", null, -"RNAcloseParen", Clazz.newBooleanArray (255, false)); -{ -jalview.schemes.ResidueProperties.toRNAssState = new java.util.Hashtable (); -jalview.schemes.ResidueProperties.toRNAssState.put (")", "("); -jalview.schemes.ResidueProperties.toRNAssState.put ("(", "("); -jalview.schemes.ResidueProperties.toRNAssState.put ("]", "["); -jalview.schemes.ResidueProperties.toRNAssState.put ("[", "["); -jalview.schemes.ResidueProperties.toRNAssState.put ("{", "{"); -jalview.schemes.ResidueProperties.toRNAssState.put ("}", "{"); -jalview.schemes.ResidueProperties.toRNAssState.put (">", ">"); -jalview.schemes.ResidueProperties.toRNAssState.put ("<", ">"); -jalview.schemes.ResidueProperties.toRNAssState.put ("A", "A"); -jalview.schemes.ResidueProperties.toRNAssState.put ("a", "A"); -jalview.schemes.ResidueProperties.toRNAssState.put ("B", "B"); -jalview.schemes.ResidueProperties.toRNAssState.put ("b", "B"); -jalview.schemes.ResidueProperties.toRNAssState.put ("C", "C"); -jalview.schemes.ResidueProperties.toRNAssState.put ("c", "C"); -jalview.schemes.ResidueProperties.toRNAssState.put ("D", "D"); -jalview.schemes.ResidueProperties.toRNAssState.put ("d", "D"); -jalview.schemes.ResidueProperties.toRNAssState.put ("E", "E"); -jalview.schemes.ResidueProperties.toRNAssState.put ("e", "E"); -jalview.schemes.ResidueProperties.toRNAssState.put ("F", "F"); -jalview.schemes.ResidueProperties.toRNAssState.put ("f", "F"); -jalview.schemes.ResidueProperties.toRNAssState.put ("G", "G"); -jalview.schemes.ResidueProperties.toRNAssState.put ("g", "G"); -jalview.schemes.ResidueProperties.toRNAssState.put ("H", "H"); -jalview.schemes.ResidueProperties.toRNAssState.put ("h", "H"); -jalview.schemes.ResidueProperties.toRNAssState.put ("I", "I"); -jalview.schemes.ResidueProperties.toRNAssState.put ("i", "I"); -jalview.schemes.ResidueProperties.toRNAssState.put ("J", "J"); -jalview.schemes.ResidueProperties.toRNAssState.put ("j", "J"); -jalview.schemes.ResidueProperties.toRNAssState.put ("K", "K"); -jalview.schemes.ResidueProperties.toRNAssState.put ("k", "K"); -jalview.schemes.ResidueProperties.toRNAssState.put ("L", "L"); -jalview.schemes.ResidueProperties.toRNAssState.put ("l", "L"); -jalview.schemes.ResidueProperties.toRNAssState.put ("M", "M"); -jalview.schemes.ResidueProperties.toRNAssState.put ("m", "M"); -jalview.schemes.ResidueProperties.toRNAssState.put ("N", "N"); -jalview.schemes.ResidueProperties.toRNAssState.put ("n", "N"); -jalview.schemes.ResidueProperties.toRNAssState.put ("O", "O"); -jalview.schemes.ResidueProperties.toRNAssState.put ("o", "O"); -jalview.schemes.ResidueProperties.toRNAssState.put ("P", "P"); -jalview.schemes.ResidueProperties.toRNAssState.put ("p", "P"); -jalview.schemes.ResidueProperties.toRNAssState.put ("Q", "Q"); -jalview.schemes.ResidueProperties.toRNAssState.put ("q", "Q"); -jalview.schemes.ResidueProperties.toRNAssState.put ("R", "R"); -jalview.schemes.ResidueProperties.toRNAssState.put ("r", "R"); -jalview.schemes.ResidueProperties.toRNAssState.put ("S", "S"); -jalview.schemes.ResidueProperties.toRNAssState.put ("s", "S"); -jalview.schemes.ResidueProperties.toRNAssState.put ("T", "T"); -jalview.schemes.ResidueProperties.toRNAssState.put ("t", "T"); -jalview.schemes.ResidueProperties.toRNAssState.put ("U", "U"); -jalview.schemes.ResidueProperties.toRNAssState.put ("u", "U"); -jalview.schemes.ResidueProperties.toRNAssState.put ("V", "V"); -jalview.schemes.ResidueProperties.toRNAssState.put ("v", "V"); -jalview.schemes.ResidueProperties.toRNAssState.put ("W", "W"); -jalview.schemes.ResidueProperties.toRNAssState.put ("w", "W"); -jalview.schemes.ResidueProperties.toRNAssState.put ("X", "X"); -jalview.schemes.ResidueProperties.toRNAssState.put ("x", "X"); -jalview.schemes.ResidueProperties.toRNAssState.put ("Y", "Y"); -jalview.schemes.ResidueProperties.toRNAssState.put ("y", "Y"); -jalview.schemes.ResidueProperties.toRNAssState.put ("Z", "Z"); -jalview.schemes.ResidueProperties.toRNAssState.put ("z", "Z"); -for (var p = 0; p < jalview.schemes.ResidueProperties.RNAcloseParen.length; p++) { -jalview.schemes.ResidueProperties.RNAcloseParen[p] = false; -} -for (var k, $k = jalview.schemes.ResidueProperties.toRNAssState.keySet ().iterator (); $k.hasNext () && ((k = $k.next ()) || true);) { -jalview.schemes.ResidueProperties.RNAcloseParen[k.charCodeAt (0)] = k.charAt (0) != jalview.schemes.ResidueProperties.toRNAssState.get (k).charAt (0); -} -}}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.analysis.scoremodels.FeatureScoreModel", "$.PIDScoreModel", "jalview.schemes.ScoreMatrix", "java.awt.Color", "java.util.ArrayList", "$.HashMap", "$.Hashtable", "$.Vector"], "jalview.schemes.ResidueProperties", ["java.lang.StringBuffer"], function () { +c$ = Clazz.declareType (jalview.schemes, "ResidueProperties"); +c$.buildAmbiguityCodonSet = Clazz.defineMethod (c$, "buildAmbiguityCodonSet", +function () { +if (jalview.schemes.ResidueProperties._ambiguityCodes.size () > 0) { +System.err.println ("Ignoring multiple calls to buildAmbiguityCodonSet"); +return; +}for (var acode, $acode = jalview.schemes.ResidueProperties.ambiguityCodes.entrySet ().iterator (); $acode.hasNext () && ((acode = $acode.next ()) || true);) { +for (var r, $r = 0, $$r = acode.getValue (); $r < $$r.length && ((r = $$r[$r]) || true); $r++) { +var codesfor = jalview.schemes.ResidueProperties._ambiguityCodes.get (r); +if (codesfor == null) { +jalview.schemes.ResidueProperties._ambiguityCodes.put (r, codesfor = new java.util.ArrayList ()); +}if (!codesfor.contains (acode.getKey ())) { +codesfor.add (acode.getKey ()); +} else { +System.err.println ("Inconsistency in the IUBMB ambiguity code nomenclature table: collision for " + acode.getKey () + " in residue " + r); +}} +} +var unambcodons = jalview.schemes.ResidueProperties.codonHash2.keySet ().toArray ( new Array (jalview.schemes.ResidueProperties.codonHash2.size ())); +for (var codon, $codon = 0, $$codon = unambcodons; $codon < $$codon.length && ((codon = $$codon[$codon]) || true); $codon++) { +var residue = jalview.schemes.ResidueProperties.codonHash2.get (codon); +var acodon = new Array (codon.length); +for (var i = 0, iSize = codon.length; i < iSize; i++) { +var _ac = "" + codon.charAt (i); +var acodes = jalview.schemes.ResidueProperties._ambiguityCodes.get (_ac); +if (acodes != null) { +acodon[i] = acodes.toArray ( new Array (acodes.size ())); +} else { +acodon[i] = Clazz.newArray (-1, []); +}} +var tpos = Clazz.newIntArray (codon.length, 0); +var cpos = Clazz.newIntArray (codon.length, 0); +for (var i = 0; i < tpos.length; i++) { +tpos[i] = -1; +} +tpos[acodon.length - 1] = 0; +var ipos; +var j; +while (tpos[0] < acodon[0].length) { +var allres = Clazz.newCharArray (tpos.length, '\0'); +var _acodon = ""; +var _anuc; +for (ipos = 0; ipos < tpos.length; ipos++) { +if (acodon[ipos].length == 0 || tpos[ipos] < 0) { +_acodon += codon.charAt (ipos); +allres[ipos] = Clazz.newCharArray (-1, [codon.charAt (ipos)]); +} else { +_acodon += acodon[ipos][tpos[ipos]]; +var altbase = jalview.schemes.ResidueProperties.ambiguityCodes.get (acodon[ipos][tpos[ipos]]); +allres[ipos] = Clazz.newCharArray (altbase.length, '\0'); +j = 0; +for (var ab, $ab = 0, $$ab = altbase; $ab < $$ab.length && ((ab = $$ab[$ab]) || true); $ab++) { +allres[ipos][j++] = ab.charAt (0); +} +}} +for (ipos = 0; ipos < cpos.length; ipos++) { +cpos[ipos] = 0; +} +var valid = true; +do { +var _codon = ""; +for (j = 0; j < cpos.length; j++) { +_codon += allres[j][cpos[j]]; +} +var tr = jalview.schemes.ResidueProperties.codonHash2.get (_codon); +if (valid = (tr != null && tr.equals (residue))) { +ipos = acodon.length - 1; +while (++cpos[ipos] >= allres[ipos].length && ipos > 0) { +cpos[ipos] = 0; +ipos--; +} +}} while (valid && cpos[0] < allres[0].length); +if (valid) { +jalview.schemes.ResidueProperties.codonHash2.put (_acodon, residue); +} else { +}ipos = acodon.length - 1; +while (++tpos[ipos] >= acodon[ipos].length && ipos > 0) { +tpos[ipos] = -1; +ipos--; +} +} +} +}); +c$.getHydmax = Clazz.defineMethod (c$, "getHydmax", +function () { +return 4.5; +}); +c$.getHydmin = Clazz.defineMethod (c$, "getHydmin", +function () { +return -3.9; +}); +c$.getHyd = Clazz.defineMethod (c$, "getHyd", +function () { +return jalview.schemes.ResidueProperties.hyd; +}); +c$.getAA3Hash = Clazz.defineMethod (c$, "getAA3Hash", +function () { +return jalview.schemes.ResidueProperties.aa3Hash; +}); +c$.getDNA = Clazz.defineMethod (c$, "getDNA", +function () { +return jalview.schemes.ResidueProperties.DNA; +}); +c$.getBLOSUM62 = Clazz.defineMethod (c$, "getBLOSUM62", +function () { +return jalview.schemes.ResidueProperties.BLOSUM62; +}); +c$.getPAM250 = Clazz.defineMethod (c$, "getPAM250", +function (A1, A2) { +return jalview.schemes.ResidueProperties.getPAM250 (A1.charAt (0), A2.charAt (0)); +}, "~S,~S"); +c$.getBLOSUM62 = Clazz.defineMethod (c$, "getBLOSUM62", +function (c1, c2) { +var pog = 0; +try { +var a = jalview.schemes.ResidueProperties.aaIndex[c1.charCodeAt (0)]; +var b = jalview.schemes.ResidueProperties.aaIndex[c2.charCodeAt (0)]; +pog = jalview.schemes.ResidueProperties.BLOSUM62[a][b]; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +return pog; +}, "~S,~S"); +c$.getCodons = Clazz.defineMethod (c$, "getCodons", +function (res) { +if (jalview.schemes.ResidueProperties.codonHash.containsKey (res)) { +return jalview.schemes.ResidueProperties.codonHash.get (res); +}return null; +}, "~S"); +c$.codonTranslate = Clazz.defineMethod (c$, "codonTranslate", +function (lccodon) { +if (false) { +return jalview.schemes.ResidueProperties._codonTranslate (lccodon); +}var cdn = jalview.schemes.ResidueProperties.codonHash2.get (lccodon.toUpperCase ()); +if (cdn != null && cdn.equals ("*")) { +return "STOP"; +}return cdn; +}, "~S"); +c$._codonTranslate = Clazz.defineMethod (c$, "_codonTranslate", +function (lccodon) { +var codon = lccodon.toUpperCase (); +if (codon.indexOf ('X') > -1 || codon.indexOf ('N') > -1) { +return "X"; +}for (var key, $key = jalview.schemes.ResidueProperties.codonHash.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { +if (jalview.schemes.ResidueProperties.codonHash.get (key).contains (codon)) { +return key; +}} +return null; +}, "~S"); +c$.getDefaultPeptideMatrix = Clazz.defineMethod (c$, "getDefaultPeptideMatrix", +function () { +return jalview.schemes.ResidueProperties.getBLOSUM62 (); +}); +c$.getDefaultDnaMatrix = Clazz.defineMethod (c$, "getDefaultDnaMatrix", +function () { +return jalview.schemes.ResidueProperties.getDNA (); +}); +c$.getScoreMatrix = Clazz.defineMethod (c$, "getScoreMatrix", +function (pwtype) { +var val = jalview.schemes.ResidueProperties.scoreMatrices.get (pwtype); +if (val != null && Clazz.instanceOf (val, jalview.schemes.ScoreMatrix)) { +return val; +}return null; +}, "~S"); +c$.getScoreModel = Clazz.defineMethod (c$, "getScoreModel", +function (pwtype) { +return jalview.schemes.ResidueProperties.scoreMatrices.get (pwtype); +}, "~S"); +c$.getPAM250 = Clazz.defineMethod (c$, "getPAM250", +function (c, d) { +var a = jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]; +var b = jalview.schemes.ResidueProperties.aaIndex[d.charCodeAt (0)]; +var pog = jalview.schemes.ResidueProperties.PAM250[a][b]; +return pog; +}, "~S,~S"); +c$.getDssp3state = Clazz.defineMethod (c$, "getDssp3state", +function (ssstring) { +if (ssstring == null) { +return null; +}var ss = new StringBuffer (); +for (var i = 0; i < ssstring.length; i++) { +var ssc = ssstring.substring (i, i + 1); +if (jalview.schemes.ResidueProperties.toDssp3State.containsKey (ssc)) { +ss.append (jalview.schemes.ResidueProperties.toDssp3State.get (ssc)); +} else { +ss.append (" "); +}} +return ss.toString (); +}, "~S"); +c$.getRNASecStrucState = Clazz.defineMethod (c$, "getRNASecStrucState", +function (ssstring) { +if (ssstring == null) { +return null; +}var ss = new StringBuffer (); +for (var i = 0; i < ssstring.length; i++) { +var ssc = ssstring.substring (i, i + 1); +if (jalview.schemes.ResidueProperties.toRNAssState.containsKey (ssc)) { +ss.append (ssc); +} else { +ss.append (" "); +}} +return ss.toString (); +}, "~S"); +c$.isCloseParenRNA = Clazz.defineMethod (c$, "isCloseParenRNA", +function (dc) { +return jalview.schemes.ResidueProperties.RNAcloseParen[dc.charCodeAt (0)]; +}, "~S"); +c$.getResidues = Clazz.defineMethod (c$, "getResidues", +function (nucleotide, includeAmbiguous) { +var result = new java.util.ArrayList (); +if (nucleotide) { +for (var nuc, $nuc = jalview.schemes.ResidueProperties.nucleotideName.keySet ().iterator (); $nuc.hasNext () && ((nuc = $nuc.next ()) || true);) { +var val = jalview.schemes.ResidueProperties.nucleotideIndex[nuc.charCodeAt (0)]; +if ((!includeAmbiguous && val > 4) || (val >= 10)) { +continue; +}nuc = nuc.toUpperCase (); +if (!result.contains (nuc)) { +result.add (nuc); +}} +} else { +for (var res, $res = jalview.schemes.ResidueProperties.aa3Hash.keySet ().iterator (); $res.hasNext () && ((res = $res.next ()) || true);) { +var index = jalview.schemes.ResidueProperties.aa3Hash.get (res).intValue (); +if ((!includeAmbiguous && index >= 20) || index >= 23) { +continue; +}res = res.toUpperCase (); +if (!result.contains (res)) { +result.add (res); +}} +}return result; +}, "~B,~B"); +c$.scoreMatrices = c$.prototype.scoreMatrices = new java.util.Hashtable (); +Clazz.defineStatics (c$, +"aaIndex", null, +"nucleotideIndex", null, +"purinepyrimidineIndex", null); +c$.aa3Hash = c$.prototype.aa3Hash = new java.util.HashMap (); +c$.aa2Triplet = c$.prototype.aa2Triplet = new java.util.HashMap (); +c$.nucleotideName = c$.prototype.nucleotideName = new java.util.HashMap (); +{ +jalview.schemes.ResidueProperties.aaIndex = Clazz.newIntArray (255, 0); +for (var i = 0; i < 255; i++) { +jalview.schemes.ResidueProperties.aaIndex[i] = 23; +} +jalview.schemes.ResidueProperties.aaIndex['A'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.aaIndex['R'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.aaIndex['N'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.aaIndex['D'.charCodeAt (0)] = 3; +jalview.schemes.ResidueProperties.aaIndex['C'.charCodeAt (0)] = 4; +jalview.schemes.ResidueProperties.aaIndex['Q'.charCodeAt (0)] = 5; +jalview.schemes.ResidueProperties.aaIndex['E'.charCodeAt (0)] = 6; +jalview.schemes.ResidueProperties.aaIndex['G'.charCodeAt (0)] = 7; +jalview.schemes.ResidueProperties.aaIndex['H'.charCodeAt (0)] = 8; +jalview.schemes.ResidueProperties.aaIndex['I'.charCodeAt (0)] = 9; +jalview.schemes.ResidueProperties.aaIndex['L'.charCodeAt (0)] = 10; +jalview.schemes.ResidueProperties.aaIndex['K'.charCodeAt (0)] = 11; +jalview.schemes.ResidueProperties.aaIndex['M'.charCodeAt (0)] = 12; +jalview.schemes.ResidueProperties.aaIndex['F'.charCodeAt (0)] = 13; +jalview.schemes.ResidueProperties.aaIndex['P'.charCodeAt (0)] = 14; +jalview.schemes.ResidueProperties.aaIndex['S'.charCodeAt (0)] = 15; +jalview.schemes.ResidueProperties.aaIndex['T'.charCodeAt (0)] = 16; +jalview.schemes.ResidueProperties.aaIndex['W'.charCodeAt (0)] = 17; +jalview.schemes.ResidueProperties.aaIndex['Y'.charCodeAt (0)] = 18; +jalview.schemes.ResidueProperties.aaIndex['V'.charCodeAt (0)] = 19; +jalview.schemes.ResidueProperties.aaIndex['B'.charCodeAt (0)] = 20; +jalview.schemes.ResidueProperties.aaIndex['Z'.charCodeAt (0)] = 21; +jalview.schemes.ResidueProperties.aaIndex['X'.charCodeAt (0)] = 22; +jalview.schemes.ResidueProperties.aaIndex['U'.charCodeAt (0)] = 22; +jalview.schemes.ResidueProperties.aaIndex['a'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.aaIndex['r'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.aaIndex['n'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.aaIndex['d'.charCodeAt (0)] = 3; +jalview.schemes.ResidueProperties.aaIndex['c'.charCodeAt (0)] = 4; +jalview.schemes.ResidueProperties.aaIndex['q'.charCodeAt (0)] = 5; +jalview.schemes.ResidueProperties.aaIndex['e'.charCodeAt (0)] = 6; +jalview.schemes.ResidueProperties.aaIndex['g'.charCodeAt (0)] = 7; +jalview.schemes.ResidueProperties.aaIndex['h'.charCodeAt (0)] = 8; +jalview.schemes.ResidueProperties.aaIndex['i'.charCodeAt (0)] = 9; +jalview.schemes.ResidueProperties.aaIndex['l'.charCodeAt (0)] = 10; +jalview.schemes.ResidueProperties.aaIndex['k'.charCodeAt (0)] = 11; +jalview.schemes.ResidueProperties.aaIndex['m'.charCodeAt (0)] = 12; +jalview.schemes.ResidueProperties.aaIndex['f'.charCodeAt (0)] = 13; +jalview.schemes.ResidueProperties.aaIndex['p'.charCodeAt (0)] = 14; +jalview.schemes.ResidueProperties.aaIndex['s'.charCodeAt (0)] = 15; +jalview.schemes.ResidueProperties.aaIndex['t'.charCodeAt (0)] = 16; +jalview.schemes.ResidueProperties.aaIndex['w'.charCodeAt (0)] = 17; +jalview.schemes.ResidueProperties.aaIndex['y'.charCodeAt (0)] = 18; +jalview.schemes.ResidueProperties.aaIndex['v'.charCodeAt (0)] = 19; +jalview.schemes.ResidueProperties.aaIndex['b'.charCodeAt (0)] = 20; +jalview.schemes.ResidueProperties.aaIndex['z'.charCodeAt (0)] = 21; +jalview.schemes.ResidueProperties.aaIndex['x'.charCodeAt (0)] = 22; +jalview.schemes.ResidueProperties.aaIndex['u'.charCodeAt (0)] = 22; +}Clazz.defineStatics (c$, +"maxProteinIndex", 23, +"maxNucleotideIndex", 10); +{ +jalview.schemes.ResidueProperties.nucleotideIndex = Clazz.newIntArray (255, 0); +for (var i = 0; i < 255; i++) { +jalview.schemes.ResidueProperties.nucleotideIndex[i] = 10; +} +jalview.schemes.ResidueProperties.nucleotideIndex['A'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.nucleotideIndex['a'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.nucleotideIndex['C'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.nucleotideIndex['c'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.nucleotideIndex['G'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.nucleotideIndex['g'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.nucleotideIndex['T'.charCodeAt (0)] = 3; +jalview.schemes.ResidueProperties.nucleotideIndex['t'.charCodeAt (0)] = 3; +jalview.schemes.ResidueProperties.nucleotideIndex['U'.charCodeAt (0)] = 4; +jalview.schemes.ResidueProperties.nucleotideIndex['u'.charCodeAt (0)] = 4; +jalview.schemes.ResidueProperties.nucleotideIndex['I'.charCodeAt (0)] = 5; +jalview.schemes.ResidueProperties.nucleotideIndex['i'.charCodeAt (0)] = 5; +jalview.schemes.ResidueProperties.nucleotideIndex['X'.charCodeAt (0)] = 6; +jalview.schemes.ResidueProperties.nucleotideIndex['x'.charCodeAt (0)] = 6; +jalview.schemes.ResidueProperties.nucleotideIndex['R'.charCodeAt (0)] = 7; +jalview.schemes.ResidueProperties.nucleotideIndex['r'.charCodeAt (0)] = 7; +jalview.schemes.ResidueProperties.nucleotideIndex['Y'.charCodeAt (0)] = 8; +jalview.schemes.ResidueProperties.nucleotideIndex['y'.charCodeAt (0)] = 8; +jalview.schemes.ResidueProperties.nucleotideIndex['N'.charCodeAt (0)] = 9; +jalview.schemes.ResidueProperties.nucleotideIndex['n'.charCodeAt (0)] = 9; +jalview.schemes.ResidueProperties.nucleotideName.put ("A", "Adenine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("a", "Adenine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("G", "Guanine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("g", "Guanine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("C", "Cytosine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("c", "Cytosine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("T", "Thymine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("t", "Thymine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("U", "Uracil"); +jalview.schemes.ResidueProperties.nucleotideName.put ("u", "Uracil"); +jalview.schemes.ResidueProperties.nucleotideName.put ("I", "Inosine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("i", "Inosine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("X", "Xanthine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("x", "Xanthine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("R", "Unknown Purine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("r", "Unknown Purine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("Y", "Unknown Pyrimidine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("y", "Unknown Pyrimidine"); +jalview.schemes.ResidueProperties.nucleotideName.put ("N", "Unknown"); +jalview.schemes.ResidueProperties.nucleotideName.put ("n", "Unknown"); +jalview.schemes.ResidueProperties.nucleotideName.put ("W", "Weak nucleotide (A or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("w", "Weak nucleotide (A or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("S", "Strong nucleotide (G or C)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("s", "Strong nucleotide (G or C)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("M", "Amino (A or C)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("m", "Amino (A or C)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("K", "Keto (G or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("k", "Keto (G or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("B", "Not A (G or C or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("b", "Not A (G or C or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("H", "Not G (A or C or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("h", "Not G (A or C or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("D", "Not C (A or G or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("d", "Not C (A or G or T)"); +jalview.schemes.ResidueProperties.nucleotideName.put ("V", "Not T (A or G or C"); +jalview.schemes.ResidueProperties.nucleotideName.put ("v", "Not T (A or G or C"); +}{ +jalview.schemes.ResidueProperties.purinepyrimidineIndex = Clazz.newIntArray (255, 0); +for (var i = 0; i < 255; i++) { +jalview.schemes.ResidueProperties.purinepyrimidineIndex[i] = 3; +} +jalview.schemes.ResidueProperties.purinepyrimidineIndex['A'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['a'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['C'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['c'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['G'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['g'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['T'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['t'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['U'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['u'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['I'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['i'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['X'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['x'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['R'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['r'.charCodeAt (0)] = 0; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['Y'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['y'.charCodeAt (0)] = 1; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['N'.charCodeAt (0)] = 2; +jalview.schemes.ResidueProperties.purinepyrimidineIndex['n'.charCodeAt (0)] = 2; +}{ +jalview.schemes.ResidueProperties.aa3Hash.put ("ALA", new Integer (0)); +jalview.schemes.ResidueProperties.aa3Hash.put ("ARG", new Integer (1)); +jalview.schemes.ResidueProperties.aa3Hash.put ("ASN", new Integer (2)); +jalview.schemes.ResidueProperties.aa3Hash.put ("ASP", new Integer (3)); +jalview.schemes.ResidueProperties.aa3Hash.put ("CYS", new Integer (4)); +jalview.schemes.ResidueProperties.aa3Hash.put ("GLN", new Integer (5)); +jalview.schemes.ResidueProperties.aa3Hash.put ("GLU", new Integer (6)); +jalview.schemes.ResidueProperties.aa3Hash.put ("GLY", new Integer (7)); +jalview.schemes.ResidueProperties.aa3Hash.put ("HIS", new Integer (8)); +jalview.schemes.ResidueProperties.aa3Hash.put ("ILE", new Integer (9)); +jalview.schemes.ResidueProperties.aa3Hash.put ("LEU", new Integer (10)); +jalview.schemes.ResidueProperties.aa3Hash.put ("LYS", new Integer (11)); +jalview.schemes.ResidueProperties.aa3Hash.put ("MET", new Integer (12)); +jalview.schemes.ResidueProperties.aa3Hash.put ("PHE", new Integer (13)); +jalview.schemes.ResidueProperties.aa3Hash.put ("PRO", new Integer (14)); +jalview.schemes.ResidueProperties.aa3Hash.put ("SER", new Integer (15)); +jalview.schemes.ResidueProperties.aa3Hash.put ("THR", new Integer (16)); +jalview.schemes.ResidueProperties.aa3Hash.put ("TRP", new Integer (17)); +jalview.schemes.ResidueProperties.aa3Hash.put ("TYR", new Integer (18)); +jalview.schemes.ResidueProperties.aa3Hash.put ("VAL", new Integer (19)); +jalview.schemes.ResidueProperties.aa3Hash.put ("ASX", new Integer (20)); +jalview.schemes.ResidueProperties.aa3Hash.put ("GLX", new Integer (21)); +jalview.schemes.ResidueProperties.aa3Hash.put ("XAA", new Integer (22)); +jalview.schemes.ResidueProperties.aa3Hash.put ("-", new Integer (23)); +jalview.schemes.ResidueProperties.aa3Hash.put ("*", new Integer (23)); +jalview.schemes.ResidueProperties.aa3Hash.put (".", new Integer (23)); +jalview.schemes.ResidueProperties.aa3Hash.put (" ", new Integer (23)); +jalview.schemes.ResidueProperties.aa3Hash.put ("Gap", new Integer (23)); +}{ +jalview.schemes.ResidueProperties.aa2Triplet.put ("A", "ALA"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("a", "ALA"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("R", "ARG"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("r", "ARG"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("N", "ASN"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("n", "ASN"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("D", "ASP"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("d", "ASP"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("C", "CYS"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("c", "CYS"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("Q", "GLN"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("q", "GLN"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("E", "GLU"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("e", "GLU"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("G", "GLY"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("g", "GLY"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("H", "HIS"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("h", "HIS"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("I", "ILE"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("i", "ILE"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("L", "LEU"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("l", "LEU"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("K", "LYS"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("k", "LYS"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("M", "MET"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("m", "MET"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("F", "PHE"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("f", "PHE"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("P", "PRO"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("p", "PRO"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("S", "SER"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("s", "SER"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("T", "THR"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("t", "THR"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("W", "TRP"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("w", "TRP"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("Y", "TYR"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("y", "TYR"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("V", "VAL"); +jalview.schemes.ResidueProperties.aa2Triplet.put ("v", "VAL"); +}Clazz.defineStatics (c$, +"aa", Clazz.newArray (-1, ["A", "R", "N", "D", "C", "Q", "E", "G", "H", "I", "L", "K", "M", "F", "P", "S", "T", "W", "Y", "V", "B", "Z", "X", "_", "*", ".", " "])); +c$.midBlue = c$.prototype.midBlue = new java.awt.Color (100, 100, 255); +c$.scaleColours = c$.prototype.scaleColours = new java.util.Vector (); +{ +jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (114, 0, 147)); +jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (156, 0, 98)); +jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (190, 0, 0)); +jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.red); +jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (255, 125, 0)); +jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.orange); +jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (255, 194, 85)); +jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.yellow); +jalview.schemes.ResidueProperties.scaleColours.addElement ( new java.awt.Color (255, 255, 181)); +jalview.schemes.ResidueProperties.scaleColours.addElement (java.awt.Color.white); +}c$.taylor = c$.prototype.taylor = Clazz.newArray (-1, [ new java.awt.Color (204, 255, 0), new java.awt.Color (0, 0, 255), new java.awt.Color (204, 0, 255), new java.awt.Color (255, 0, 0), new java.awt.Color (255, 255, 0), new java.awt.Color (255, 0, 204), new java.awt.Color (255, 0, 102), new java.awt.Color (255, 153, 0), new java.awt.Color (0, 102, 255), new java.awt.Color (102, 255, 0), new java.awt.Color (51, 255, 0), new java.awt.Color (102, 0, 255), new java.awt.Color (0, 255, 0), new java.awt.Color (0, 255, 102), new java.awt.Color (255, 204, 0), new java.awt.Color (255, 51, 0), new java.awt.Color (255, 102, 0), new java.awt.Color (0, 204, 255), new java.awt.Color (0, 255, 204), new java.awt.Color (153, 255, 0), java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white]); +c$.nucleotide = c$.prototype.nucleotide = Clazz.newArray (-1, [ new java.awt.Color (100, 247, 63), new java.awt.Color (255, 179, 64), new java.awt.Color (235, 65, 60), new java.awt.Color (60, 136, 238), new java.awt.Color (60, 136, 238), java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white]); +c$.purinepyrimidine = c$.prototype.purinepyrimidine = Clazz.newArray (-1, [ new java.awt.Color (255, 131, 250), new java.awt.Color (64, 224, 208), java.awt.Color.white, java.awt.Color.white]); +c$.zappo = c$.prototype.zappo = Clazz.newArray (-1, [java.awt.Color.pink, jalview.schemes.ResidueProperties.midBlue, java.awt.Color.green, java.awt.Color.red, java.awt.Color.yellow, java.awt.Color.green, java.awt.Color.red, java.awt.Color.magenta, jalview.schemes.ResidueProperties.midBlue, java.awt.Color.pink, java.awt.Color.pink, jalview.schemes.ResidueProperties.midBlue, java.awt.Color.pink, java.awt.Color.orange, java.awt.Color.magenta, java.awt.Color.green, java.awt.Color.green, java.awt.Color.orange, java.awt.Color.orange, java.awt.Color.pink, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white, java.awt.Color.white]); +Clazz.defineStatics (c$, +"hyd2", Clazz.newDoubleArray (-1, [0.62, 0.29, -0.9, -0.74, 1.19, 0.48, -0.4, 1.38, -1.5, 1.06, 0.64, -0.78, 0.12, -0.85, -2.53, -0.18, -0.05, 1.08, 0.81, 0.0, 0.26, 0.0, 0.0]), +"helix", Clazz.newDoubleArray (-1, [1.42, 0.98, 0.67, 1.01, 0.70, 1.11, 1.51, 0.57, 1.00, 1.08, 1.21, 1.16, 1.45, 1.13, 0.57, 0.77, 0.83, 1.08, 0.69, 1.06, 0.84, 1.31, 1.00, 0.0]), +"helixmin", 0.57, +"helixmax", 1.51, +"strand", Clazz.newDoubleArray (-1, [0.83, 0.93, 0.89, 0.54, 1.19, 1.10, 0.37, 0.75, 0.87, 1.60, 1.30, 0.74, 1.05, 1.38, 0.55, 0.75, 1.19, 1.37, 1.47, 1.70, 0.72, 0.74, 1.0, 0.0]), +"strandmin", 0.37, +"strandmax", 1.7, +"turn", Clazz.newDoubleArray (-1, [0.66, 0.95, 1.56, 1.46, 1.19, 0.98, 0.74, 1.56, 0.95, 0.47, 0.59, 1.01, 0.60, 0.60, 1.52, 1.43, 0.96, 0.96, 1.14, 0.50, 1.51, 0.86, 1.00, 0, 0]), +"turnmin", 0.47, +"turnmax", 1.56, +"buried", Clazz.newDoubleArray (-1, [1.7, 0.1, 0.4, 0.4, 4.6, 0.3, 0.3, 1.8, 0.8, 3.1, 2.4, 0.05, 1.9, 2.2, 0.6, 0.8, 0.7, 1.6, 0.5, 2.9, 0.4, 0.3, 1.358, 0.00]), +"buriedmin", 0.05, +"buriedmax", 4.6, +"hyd", Clazz.newDoubleArray (-1, [1.8, -4.5, -3.5, -3.5, 2.5, -3.5, -3.5, -0.4, -3.2, 4.5, 3.8, -3.9, 1.9, 2.8, -1.6, -0.8, -0.7, -0.9, -1.3, 4.2, -3.5, -3.5, -0.49, 0.0]), +"hydmax", 4.5, +"hydmin", -3.9, +"BLOSUM62", Clazz.newArray (-1, [ Clazz.newIntArray (-1, [4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3, -2, 0, -2, -1, 0, -4]), Clazz.newIntArray (-1, [-1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1, -3, -2, -3, -1, 0, -1, -4]), Clazz.newIntArray (-1, [-2, 0, 6, 1, -3, 0, 0, 0, 1, -3, -3, 0, -2, -3, -2, 1, 0, -4, -2, -3, 3, 0, -1, -4]), Clazz.newIntArray (-1, [-2, -2, 1, 6, -3, 0, 2, -1, -1, -3, -4, -1, -3, -3, -1, 0, -1, -4, -3, -3, 4, 1, -1, -4]), Clazz.newIntArray (-1, [0, 3, -3, -3, 9, -3, -4, -3, -3, -1, -1, -3, -1, -2, -3, -1, -1, -2, -2, -1, -3, -3, -2, -4]), Clazz.newIntArray (-1, [-1, 1, 0, 0, -3, 5, 2, -2, 0, -3, -2, 1, 0, -3, -1, 0, -1, -2, -1, -2, 0, 3, -1, -4]), Clazz.newIntArray (-1, [-1, 0, 0, 2, -4, 2, 5, -2, 0, -3, -3, 1, -2, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4]), Clazz.newIntArray (-1, [0, -2, 0, -1, -3, -2, -2, 6, -2, -4, -4, -2, -3, -3, -2, 0, -2, -2, -3, -3, -1, -2, -1, -4]), Clazz.newIntArray (-1, [-2, 0, 1, -1, -3, 0, 0, -2, 8, -3, -3, -1, -2, -1, -2, -1, -2, -2, 2, -3, 0, 0, -1, -4]), Clazz.newIntArray (-1, [-1, -3, -3, -3, -1, -3, -3, -4, -3, 4, 2, -3, 1, 0, -3, -2, -1, -3, -1, 3, -3, -3, -1, -4]), Clazz.newIntArray (-1, [-1, -2, -3, -4, -1, -2, -3, -4, -3, 2, 4, -2, 2, 0, -3, -2, -1, -2, -1, 1, -4, -3, -1, -4]), Clazz.newIntArray (-1, [-1, 2, 0, -1, -3, 1, 1, -2, -1, -3, -2, 5, -1, -3, -1, 0, -1, -3, -2, -2, 0, 1, -1, -4]), Clazz.newIntArray (-1, [-1, -1, -2, -3, -1, 0, -2, -3, -2, 1, 2, -1, 5, 0, -2, -1, -1, -1, -1, 1, -3, -1, -1, -4]), Clazz.newIntArray (-1, [-2, -3, -3, -3, -2, -3, -3, -3, -1, 0, 0, -3, 0, 6, -4, -2, -2, 1, 3, -1, -3, -3, -1, -4]), Clazz.newIntArray (-1, [-1, -2, -2, -1, -3, -1, -1, -2, -2, -3, -3, -1, -2, -4, 7, -1, -1, -4, -3, -2, -2, -1, -2, -4]), Clazz.newIntArray (-1, [1, -1, 1, 0, -1, 0, 0, 0, -1, -2, -2, 0, -1, -2, -1, 4, 1, -3, -2, -2, 0, 0, 0, -4]), Clazz.newIntArray (-1, [0, -1, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -2, -1, 1, 5, -2, -2, 0, -1, -1, 0, -4]), Clazz.newIntArray (-1, [-3, -3, -4, -4, -2, -2, -3, -2, -2, -3, -2, -3, -1, 1, -4, -3, -2, 11, 2, -3, -4, -3, -2, -4]), Clazz.newIntArray (-1, [-2, -2, -2, -3, -2, -1, -2, -3, 2, -1, -1, -2, -1, 3, -3, -2, -2, 2, 7, -1, -3, -2, -1, -4]), Clazz.newIntArray (-1, [0, -3, -3, -3, -1, -2, -2, -3, -3, 3, 1, -2, 1, -1, -2, -2, 0, -3, -1, 4, -3, -2, -1, -4]), Clazz.newIntArray (-1, [-2, -1, 3, 4, -3, 0, 1, -1, 0, -3, -4, 0, -3, -3, -2, 0, -1, -4, -3, -3, 4, 1, -1, -4]), Clazz.newIntArray (-1, [-1, 0, 0, 1, -3, 3, 4, -2, 0, -3, -3, 1, -1, -3, -1, 0, -1, -3, -2, -2, 1, 4, -1, -4]), Clazz.newIntArray (-1, [0, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, 0, 0, -2, -1, -1, -1, -1, -1, -4]), Clazz.newIntArray (-1, [-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 1])]), +"PAM250", Clazz.newArray (-1, [ Clazz.newIntArray (-1, [2, -2, 0, 0, -2, 0, 0, 1, -1, -1, -2, -1, -1, -3, 1, 1, 1, -6, -3, 0, 0, 0, 0, -8]), Clazz.newIntArray (-1, [-2, 6, 0, -1, -4, 1, -1, -3, 2, -2, -3, 3, 0, -4, 0, 0, -1, 2, -4, -2, -1, 0, -1, -8]), Clazz.newIntArray (-1, [0, 0, 2, 2, -4, 1, 1, 0, 2, -2, -3, 1, -2, -3, 0, 1, 0, -4, -2, -2, 2, 1, 0, -8]), Clazz.newIntArray (-1, [0, -1, 2, 4, -5, 2, 3, 1, 1, -2, -4, 0, -3, -6, -1, 0, 0, -7, -4, -2, 3, 3, -1, -8]), Clazz.newIntArray (-1, [-2, -4, -4, -5, 12, -5, -5, -3, -3, -2, -6, -5, -5, -4, -3, 0, -2, -8, 0, -2, -4, -5, -3, -8]), Clazz.newIntArray (-1, [0, 1, 1, 2, -5, 4, 2, -1, 3, -2, -2, 1, -1, -5, 0, -1, -1, -5, -4, -2, 1, 3, -1, -8]), Clazz.newIntArray (-1, [0, -1, 1, 3, -5, 2, 4, 0, 1, -2, -3, 0, -2, -5, -1, 0, 0, -7, -4, -2, 3, 3, -1, -8]), Clazz.newIntArray (-1, [1, -3, 0, 1, -3, -1, 0, 5, -2, -3, -4, -2, -3, -5, 0, 1, 0, -7, -5, -1, 0, 0, -1, -8]), Clazz.newIntArray (-1, [-1, 2, 2, 1, -3, 3, 1, -2, 6, -2, -2, 0, -2, -2, 0, -1, -1, -3, 0, -2, 1, 2, -1, -8]), Clazz.newIntArray (-1, [-1, -2, -2, -2, -2, -2, -2, -3, -2, 5, 2, -2, 2, 1, -2, -1, 0, -5, -1, 4, -2, -2, -1, -8]), Clazz.newIntArray (-1, [-2, -3, -3, -4, -6, -2, -3, -4, -2, 2, 6, -3, 4, 2, -3, -3, -2, -2, -1, 2, -3, -3, -1, -8]), Clazz.newIntArray (-1, [-1, 3, 1, 0, -5, 1, 0, -2, 0, -2, -3, 5, 0, -5, -1, 0, 0, -3, -4, -2, 1, 0, -1, -8]), Clazz.newIntArray (-1, [-1, 0, -2, -3, -5, -1, -2, -3, -2, 2, 4, 0, 6, 0, -2, -2, -1, -4, -2, 2, -2, -2, -1, -8]), Clazz.newIntArray (-1, [-3, -4, -3, -6, -4, -5, -5, -5, -2, 1, 2, -5, 0, 9, -5, -3, -3, 0, 7, -1, -4, -5, -2, -8]), Clazz.newIntArray (-1, [1, 0, 0, -1, -3, 0, -1, 0, 0, -2, -3, -1, -2, -5, 6, 1, 0, -6, -5, -1, -1, 0, -1, -8]), Clazz.newIntArray (-1, [1, 0, 1, 0, 0, -1, 0, 1, -1, -1, -3, 0, -2, -3, 1, 2, 1, -2, -3, -1, 0, 0, 0, -8]), Clazz.newIntArray (-1, [1, -1, 0, 0, -2, -1, 0, 0, -1, 0, -2, 0, -1, -3, 0, 1, 3, -5, -3, 0, 0, -1, 0, -8]), Clazz.newIntArray (-1, [-6, 2, -4, -7, -8, -5, -7, -7, -3, -5, -2, -3, -4, 0, -6, -2, -5, 17, 0, -6, -5, -6, -4, -8]), Clazz.newIntArray (-1, [-3, -4, -2, -4, 0, -4, -4, -5, 0, -1, -1, -4, -2, 7, -5, -3, -3, 0, 10, -2, -3, -4, -2, -8]), Clazz.newIntArray (-1, [0, -2, -2, -2, -2, -2, -2, -1, -2, 4, 2, -2, 2, -1, -1, -1, 0, -6, -2, 4, -2, -2, -1, -8]), Clazz.newIntArray (-1, [0, -1, 2, 3, -4, 1, 3, 0, 1, -2, -3, 1, -2, -4, -1, 0, 0, -5, -3, -2, 3, 2, -1, -8]), Clazz.newIntArray (-1, [0, 0, 1, 3, -5, 3, 3, 0, 2, -2, -3, 0, -2, -5, 0, 0, -1, -6, -4, -2, 2, 3, -1, -8]), Clazz.newIntArray (-1, [0, -1, 0, -1, -3, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, 0, 0, -4, -2, -1, -1, -1, -1, -8]), Clazz.newIntArray (-1, [-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, 1])])); +c$.ssHash = c$.prototype.ssHash = new java.util.Hashtable (); +{ +jalview.schemes.ResidueProperties.ssHash.put ("H", java.awt.Color.magenta); +jalview.schemes.ResidueProperties.ssHash.put ("E", java.awt.Color.yellow); +jalview.schemes.ResidueProperties.ssHash.put ("-", java.awt.Color.white); +jalview.schemes.ResidueProperties.ssHash.put (".", java.awt.Color.white); +jalview.schemes.ResidueProperties.ssHash.put ("S", java.awt.Color.cyan); +jalview.schemes.ResidueProperties.ssHash.put ("T", java.awt.Color.blue); +jalview.schemes.ResidueProperties.ssHash.put ("G", java.awt.Color.pink); +jalview.schemes.ResidueProperties.ssHash.put ("I", java.awt.Color.pink); +jalview.schemes.ResidueProperties.ssHash.put ("B", java.awt.Color.yellow); +}Clazz.defineStatics (c$, +"DNA", Clazz.newArray (-1, [ Clazz.newIntArray (-1, [10, -8, -8, -8, -8, 1, 1, 1, -8, 1, 1]), Clazz.newIntArray (-1, [-8, 10, -8, -8, -8, 1, 1, -8, 1, 1, 1]), Clazz.newIntArray (-1, [-8, -8, 10, -8, -8, 1, 1, 1, -8, 1, 1]), Clazz.newIntArray (-1, [-8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1]), Clazz.newIntArray (-1, [-8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 10, 0, 0, 0, 1, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 0, 10, 0, 0, 1, 1]), Clazz.newIntArray (-1, [1, -8, 1, -8, -8, 0, 0, 10, -8, 1, 1]), Clazz.newIntArray (-1, [-8, 1, -8, 1, 1, 0, 0, -8, 10, 1, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1]), Clazz.newIntArray (-1, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])])); +{ +jalview.schemes.ResidueProperties.scoreMatrices.put ("BLOSUM62", new jalview.schemes.ScoreMatrix ("BLOSUM62", jalview.schemes.ResidueProperties.BLOSUM62, 0)); +jalview.schemes.ResidueProperties.scoreMatrices.put ("PAM250", new jalview.schemes.ScoreMatrix ("PAM250", jalview.schemes.ResidueProperties.PAM250, 0)); +jalview.schemes.ResidueProperties.scoreMatrices.put ("DNA", new jalview.schemes.ScoreMatrix ("DNA", jalview.schemes.ResidueProperties.DNA, 1)); +}c$.pidColours = c$.prototype.pidColours = Clazz.newArray (-1, [jalview.schemes.ResidueProperties.midBlue, new java.awt.Color (153, 153, 255), new java.awt.Color (204, 204, 255)]); +Clazz.defineStatics (c$, +"pidThresholds", Clazz.newFloatArray (-1, [80, 60, 40])); +c$.codonHash = c$.prototype.codonHash = new java.util.HashMap (); +c$.Lys = c$.prototype.Lys = new java.util.ArrayList (); +c$.Asn = c$.prototype.Asn = new java.util.ArrayList (); +c$.Gln = c$.prototype.Gln = new java.util.ArrayList (); +c$.His = c$.prototype.His = new java.util.ArrayList (); +c$.Glu = c$.prototype.Glu = new java.util.ArrayList (); +c$.Asp = c$.prototype.Asp = new java.util.ArrayList (); +c$.Tyr = c$.prototype.Tyr = new java.util.ArrayList (); +c$.Thr = c$.prototype.Thr = new java.util.ArrayList (); +c$.Pro = c$.prototype.Pro = new java.util.ArrayList (); +c$.Ala = c$.prototype.Ala = new java.util.ArrayList (); +c$.Ser = c$.prototype.Ser = new java.util.ArrayList (); +c$.Arg = c$.prototype.Arg = new java.util.ArrayList (); +c$.Gly = c$.prototype.Gly = new java.util.ArrayList (); +c$.Trp = c$.prototype.Trp = new java.util.ArrayList (); +c$.Cys = c$.prototype.Cys = new java.util.ArrayList (); +c$.Ile = c$.prototype.Ile = new java.util.ArrayList (); +c$.Met = c$.prototype.Met = new java.util.ArrayList (); +c$.Leu = c$.prototype.Leu = new java.util.ArrayList (); +c$.Val = c$.prototype.Val = new java.util.ArrayList (); +c$.Phe = c$.prototype.Phe = new java.util.ArrayList (); +c$.STOP = c$.prototype.STOP = new java.util.ArrayList (); +Clazz.defineStatics (c$, +"START", "ATG"); +{ +jalview.schemes.ResidueProperties.codonHash.put ("K", jalview.schemes.ResidueProperties.Lys); +jalview.schemes.ResidueProperties.codonHash.put ("N", jalview.schemes.ResidueProperties.Asn); +jalview.schemes.ResidueProperties.codonHash.put ("Q", jalview.schemes.ResidueProperties.Gln); +jalview.schemes.ResidueProperties.codonHash.put ("H", jalview.schemes.ResidueProperties.His); +jalview.schemes.ResidueProperties.codonHash.put ("E", jalview.schemes.ResidueProperties.Glu); +jalview.schemes.ResidueProperties.codonHash.put ("D", jalview.schemes.ResidueProperties.Asp); +jalview.schemes.ResidueProperties.codonHash.put ("Y", jalview.schemes.ResidueProperties.Tyr); +jalview.schemes.ResidueProperties.codonHash.put ("T", jalview.schemes.ResidueProperties.Thr); +jalview.schemes.ResidueProperties.codonHash.put ("P", jalview.schemes.ResidueProperties.Pro); +jalview.schemes.ResidueProperties.codonHash.put ("A", jalview.schemes.ResidueProperties.Ala); +jalview.schemes.ResidueProperties.codonHash.put ("S", jalview.schemes.ResidueProperties.Ser); +jalview.schemes.ResidueProperties.codonHash.put ("R", jalview.schemes.ResidueProperties.Arg); +jalview.schemes.ResidueProperties.codonHash.put ("G", jalview.schemes.ResidueProperties.Gly); +jalview.schemes.ResidueProperties.codonHash.put ("W", jalview.schemes.ResidueProperties.Trp); +jalview.schemes.ResidueProperties.codonHash.put ("C", jalview.schemes.ResidueProperties.Cys); +jalview.schemes.ResidueProperties.codonHash.put ("I", jalview.schemes.ResidueProperties.Ile); +jalview.schemes.ResidueProperties.codonHash.put ("M", jalview.schemes.ResidueProperties.Met); +jalview.schemes.ResidueProperties.codonHash.put ("L", jalview.schemes.ResidueProperties.Leu); +jalview.schemes.ResidueProperties.codonHash.put ("V", jalview.schemes.ResidueProperties.Val); +jalview.schemes.ResidueProperties.codonHash.put ("F", jalview.schemes.ResidueProperties.Phe); +jalview.schemes.ResidueProperties.codonHash.put ("STOP", jalview.schemes.ResidueProperties.STOP); +}c$.ambiguityCodes = c$.prototype.ambiguityCodes = new java.util.Hashtable (); +c$.codonHash2 = c$.prototype.codonHash2 = new java.util.Hashtable (); +c$._ambiguityCodes = c$.prototype._ambiguityCodes = new java.util.Hashtable (); +{ +jalview.schemes.ResidueProperties.ambiguityCodes.put ("R", Clazz.newArray (-1, ["A", "G"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("Y", Clazz.newArray (-1, ["T", "C"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("W", Clazz.newArray (-1, ["A", "T"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("S", Clazz.newArray (-1, ["G", "C"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("M", Clazz.newArray (-1, ["A", "C"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("K", Clazz.newArray (-1, ["G", "T"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("H", Clazz.newArray (-1, ["A", "T", "C"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("B", Clazz.newArray (-1, ["G", "T", "C"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("V", Clazz.newArray (-1, ["G", "A", "C"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("D", Clazz.newArray (-1, ["G", "A", "T"])); +jalview.schemes.ResidueProperties.ambiguityCodes.put ("N", Clazz.newArray (-1, ["G", "A", "T", "C"])); +jalview.schemes.ResidueProperties.codonHash2.put ("AAA", "K"); +jalview.schemes.ResidueProperties.codonHash2.put ("AAG", "K"); +jalview.schemes.ResidueProperties.codonHash2.put ("AAC", "N"); +jalview.schemes.ResidueProperties.codonHash2.put ("AAT", "N"); +jalview.schemes.ResidueProperties.codonHash2.put ("CAA", "Q"); +jalview.schemes.ResidueProperties.codonHash2.put ("CAG", "Q"); +jalview.schemes.ResidueProperties.codonHash2.put ("CAC", "H"); +jalview.schemes.ResidueProperties.codonHash2.put ("CAT", "H"); +jalview.schemes.ResidueProperties.codonHash2.put ("GAA", "E"); +jalview.schemes.ResidueProperties.codonHash2.put ("GAG", "E"); +jalview.schemes.ResidueProperties.codonHash2.put ("GAC", "D"); +jalview.schemes.ResidueProperties.codonHash2.put ("GAT", "D"); +jalview.schemes.ResidueProperties.codonHash2.put ("TAC", "Y"); +jalview.schemes.ResidueProperties.codonHash2.put ("TAT", "Y"); +jalview.schemes.ResidueProperties.codonHash2.put ("ACA", "T"); +jalview.schemes.ResidueProperties.codonHash2.put ("ACC", "T"); +jalview.schemes.ResidueProperties.codonHash2.put ("ACT", "T"); +jalview.schemes.ResidueProperties.codonHash2.put ("ACG", "T"); +jalview.schemes.ResidueProperties.codonHash2.put ("CCA", "P"); +jalview.schemes.ResidueProperties.codonHash2.put ("CCG", "P"); +jalview.schemes.ResidueProperties.codonHash2.put ("CCC", "P"); +jalview.schemes.ResidueProperties.codonHash2.put ("CCT", "P"); +jalview.schemes.ResidueProperties.codonHash2.put ("GCA", "A"); +jalview.schemes.ResidueProperties.codonHash2.put ("GCG", "A"); +jalview.schemes.ResidueProperties.codonHash2.put ("GCC", "A"); +jalview.schemes.ResidueProperties.codonHash2.put ("GCT", "A"); +jalview.schemes.ResidueProperties.codonHash2.put ("TCA", "S"); +jalview.schemes.ResidueProperties.codonHash2.put ("TCG", "S"); +jalview.schemes.ResidueProperties.codonHash2.put ("TCC", "S"); +jalview.schemes.ResidueProperties.codonHash2.put ("TCT", "S"); +jalview.schemes.ResidueProperties.codonHash2.put ("AGC", "S"); +jalview.schemes.ResidueProperties.codonHash2.put ("AGT", "S"); +jalview.schemes.ResidueProperties.codonHash2.put ("AGA", "R"); +jalview.schemes.ResidueProperties.codonHash2.put ("AGG", "R"); +jalview.schemes.ResidueProperties.codonHash2.put ("CGA", "R"); +jalview.schemes.ResidueProperties.codonHash2.put ("CGG", "R"); +jalview.schemes.ResidueProperties.codonHash2.put ("CGC", "R"); +jalview.schemes.ResidueProperties.codonHash2.put ("CGT", "R"); +jalview.schemes.ResidueProperties.codonHash2.put ("GGA", "G"); +jalview.schemes.ResidueProperties.codonHash2.put ("GGG", "G"); +jalview.schemes.ResidueProperties.codonHash2.put ("GGC", "G"); +jalview.schemes.ResidueProperties.codonHash2.put ("GGT", "G"); +jalview.schemes.ResidueProperties.codonHash2.put ("TGA", "*"); +jalview.schemes.ResidueProperties.codonHash2.put ("TAA", "*"); +jalview.schemes.ResidueProperties.codonHash2.put ("TAG", "*"); +jalview.schemes.ResidueProperties.codonHash2.put ("TGG", "W"); +jalview.schemes.ResidueProperties.codonHash2.put ("TGC", "C"); +jalview.schemes.ResidueProperties.codonHash2.put ("TGT", "C"); +jalview.schemes.ResidueProperties.codonHash2.put ("ATA", "I"); +jalview.schemes.ResidueProperties.codonHash2.put ("ATC", "I"); +jalview.schemes.ResidueProperties.codonHash2.put ("ATT", "I"); +jalview.schemes.ResidueProperties.codonHash2.put ("ATG", "M"); +jalview.schemes.ResidueProperties.codonHash2.put ("CTA", "L"); +jalview.schemes.ResidueProperties.codonHash2.put ("CTG", "L"); +jalview.schemes.ResidueProperties.codonHash2.put ("CTC", "L"); +jalview.schemes.ResidueProperties.codonHash2.put ("CTT", "L"); +jalview.schemes.ResidueProperties.codonHash2.put ("TTA", "L"); +jalview.schemes.ResidueProperties.codonHash2.put ("TTG", "L"); +jalview.schemes.ResidueProperties.codonHash2.put ("GTA", "V"); +jalview.schemes.ResidueProperties.codonHash2.put ("GTG", "V"); +jalview.schemes.ResidueProperties.codonHash2.put ("GTC", "V"); +jalview.schemes.ResidueProperties.codonHash2.put ("GTT", "V"); +jalview.schemes.ResidueProperties.codonHash2.put ("TTC", "F"); +jalview.schemes.ResidueProperties.codonHash2.put ("TTT", "F"); +jalview.schemes.ResidueProperties.buildAmbiguityCodonSet (); +}{ +jalview.schemes.ResidueProperties.Lys.add ("AAA"); +jalview.schemes.ResidueProperties.Lys.add ("AAG"); +jalview.schemes.ResidueProperties.Asn.add ("AAC"); +jalview.schemes.ResidueProperties.Asn.add ("AAT"); +jalview.schemes.ResidueProperties.Gln.add ("CAA"); +jalview.schemes.ResidueProperties.Gln.add ("CAG"); +jalview.schemes.ResidueProperties.His.add ("CAC"); +jalview.schemes.ResidueProperties.His.add ("CAT"); +jalview.schemes.ResidueProperties.Glu.add ("GAA"); +jalview.schemes.ResidueProperties.Glu.add ("GAG"); +jalview.schemes.ResidueProperties.Asp.add ("GAC"); +jalview.schemes.ResidueProperties.Asp.add ("GAT"); +jalview.schemes.ResidueProperties.Tyr.add ("TAC"); +jalview.schemes.ResidueProperties.Tyr.add ("TAT"); +jalview.schemes.ResidueProperties.Thr.add ("ACA"); +jalview.schemes.ResidueProperties.Thr.add ("ACG"); +jalview.schemes.ResidueProperties.Thr.add ("ACC"); +jalview.schemes.ResidueProperties.Thr.add ("ACT"); +jalview.schemes.ResidueProperties.Pro.add ("CCA"); +jalview.schemes.ResidueProperties.Pro.add ("CCG"); +jalview.schemes.ResidueProperties.Pro.add ("CCC"); +jalview.schemes.ResidueProperties.Pro.add ("CCT"); +jalview.schemes.ResidueProperties.Ala.add ("GCA"); +jalview.schemes.ResidueProperties.Ala.add ("GCG"); +jalview.schemes.ResidueProperties.Ala.add ("GCC"); +jalview.schemes.ResidueProperties.Ala.add ("GCT"); +jalview.schemes.ResidueProperties.Ser.add ("TCA"); +jalview.schemes.ResidueProperties.Ser.add ("TCG"); +jalview.schemes.ResidueProperties.Ser.add ("TCC"); +jalview.schemes.ResidueProperties.Ser.add ("TCT"); +jalview.schemes.ResidueProperties.Ser.add ("AGC"); +jalview.schemes.ResidueProperties.Ser.add ("AGT"); +jalview.schemes.ResidueProperties.Arg.add ("AGA"); +jalview.schemes.ResidueProperties.Arg.add ("AGG"); +jalview.schemes.ResidueProperties.Arg.add ("CGA"); +jalview.schemes.ResidueProperties.Arg.add ("CGG"); +jalview.schemes.ResidueProperties.Arg.add ("CGC"); +jalview.schemes.ResidueProperties.Arg.add ("CGT"); +jalview.schemes.ResidueProperties.Gly.add ("GGA"); +jalview.schemes.ResidueProperties.Gly.add ("GGG"); +jalview.schemes.ResidueProperties.Gly.add ("GGC"); +jalview.schemes.ResidueProperties.Gly.add ("GGT"); +jalview.schemes.ResidueProperties.STOP.add ("TGA"); +jalview.schemes.ResidueProperties.STOP.add ("TAA"); +jalview.schemes.ResidueProperties.STOP.add ("TAG"); +jalview.schemes.ResidueProperties.Trp.add ("TGG"); +jalview.schemes.ResidueProperties.Cys.add ("TGC"); +jalview.schemes.ResidueProperties.Cys.add ("TGT"); +jalview.schemes.ResidueProperties.Ile.add ("ATA"); +jalview.schemes.ResidueProperties.Ile.add ("ATC"); +jalview.schemes.ResidueProperties.Ile.add ("ATT"); +jalview.schemes.ResidueProperties.Met.add ("ATG"); +jalview.schemes.ResidueProperties.Leu.add ("CTA"); +jalview.schemes.ResidueProperties.Leu.add ("CTG"); +jalview.schemes.ResidueProperties.Leu.add ("CTC"); +jalview.schemes.ResidueProperties.Leu.add ("CTT"); +jalview.schemes.ResidueProperties.Leu.add ("TTA"); +jalview.schemes.ResidueProperties.Leu.add ("TTG"); +jalview.schemes.ResidueProperties.Val.add ("GTA"); +jalview.schemes.ResidueProperties.Val.add ("GTG"); +jalview.schemes.ResidueProperties.Val.add ("GTC"); +jalview.schemes.ResidueProperties.Val.add ("GTT"); +jalview.schemes.ResidueProperties.Phe.add ("TTC"); +jalview.schemes.ResidueProperties.Phe.add ("TTT"); +}c$.propHash = c$.prototype.propHash = new java.util.Hashtable (); +c$.hydrophobic = c$.prototype.hydrophobic = new java.util.Hashtable (); +c$.polar = c$.prototype.polar = new java.util.Hashtable (); +c$.small = c$.prototype.small = new java.util.Hashtable (); +c$.positive = c$.prototype.positive = new java.util.Hashtable (); +c$.negative = c$.prototype.negative = new java.util.Hashtable (); +c$.charged = c$.prototype.charged = new java.util.Hashtable (); +c$.aromatic = c$.prototype.aromatic = new java.util.Hashtable (); +c$.aliphatic = c$.prototype.aliphatic = new java.util.Hashtable (); +c$.tiny = c$.prototype.tiny = new java.util.Hashtable (); +c$.proline = c$.prototype.proline = new java.util.Hashtable (); +{ +jalview.schemes.ResidueProperties.hydrophobic.put ("I", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("L", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("V", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("C", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("A", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("G", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("M", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("F", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("Y", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("W", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("H", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("K", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("X", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("*", new Integer (1)); +jalview.schemes.ResidueProperties.hydrophobic.put ("R", new Integer (0)); +jalview.schemes.ResidueProperties.hydrophobic.put ("E", new Integer (0)); +jalview.schemes.ResidueProperties.hydrophobic.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.hydrophobic.put ("D", new Integer (0)); +jalview.schemes.ResidueProperties.hydrophobic.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.hydrophobic.put ("S", new Integer (0)); +jalview.schemes.ResidueProperties.hydrophobic.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.hydrophobic.put ("P", new Integer (0)); +}{ +jalview.schemes.ResidueProperties.polar.put ("Y", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("W", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("H", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("K", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("R", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("E", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("Q", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("D", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("N", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("S", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("T", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("X", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("*", new Integer (1)); +jalview.schemes.ResidueProperties.polar.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("V", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("A", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("G", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.polar.put ("P", new Integer (0)); +}{ +jalview.schemes.ResidueProperties.small.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("V", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("C", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("A", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("G", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("Y", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("W", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("H", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("K", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("R", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("E", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.small.put ("D", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("N", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("S", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("T", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("P", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.small.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.positive.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("V", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("A", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("G", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("Y", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("W", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("H", new Integer (1)); +jalview.schemes.ResidueProperties.positive.put ("K", new Integer (1)); +jalview.schemes.ResidueProperties.positive.put ("R", new Integer (1)); +jalview.schemes.ResidueProperties.positive.put ("E", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("D", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("S", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("P", new Integer (0)); +jalview.schemes.ResidueProperties.positive.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.positive.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.negative.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("V", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("A", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("G", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("Y", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("W", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("H", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("K", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("R", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("E", new Integer (1)); +jalview.schemes.ResidueProperties.negative.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("D", new Integer (1)); +jalview.schemes.ResidueProperties.negative.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("S", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("P", new Integer (0)); +jalview.schemes.ResidueProperties.negative.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.negative.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.charged.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("V", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("A", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("G", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("Y", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("W", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("H", new Integer (1)); +jalview.schemes.ResidueProperties.charged.put ("K", new Integer (1)); +jalview.schemes.ResidueProperties.charged.put ("R", new Integer (1)); +jalview.schemes.ResidueProperties.charged.put ("E", new Integer (1)); +jalview.schemes.ResidueProperties.charged.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("D", new Integer (1)); +jalview.schemes.ResidueProperties.charged.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("S", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("P", new Integer (0)); +jalview.schemes.ResidueProperties.charged.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.charged.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.aromatic.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("V", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("A", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("G", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("F", new Integer (1)); +jalview.schemes.ResidueProperties.aromatic.put ("Y", new Integer (1)); +jalview.schemes.ResidueProperties.aromatic.put ("W", new Integer (1)); +jalview.schemes.ResidueProperties.aromatic.put ("H", new Integer (1)); +jalview.schemes.ResidueProperties.aromatic.put ("K", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("R", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("E", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("D", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("S", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("P", new Integer (0)); +jalview.schemes.ResidueProperties.aromatic.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.aromatic.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.aliphatic.put ("I", new Integer (1)); +jalview.schemes.ResidueProperties.aliphatic.put ("L", new Integer (1)); +jalview.schemes.ResidueProperties.aliphatic.put ("V", new Integer (1)); +jalview.schemes.ResidueProperties.aliphatic.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("A", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("G", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("Y", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("W", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("H", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("K", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("R", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("E", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("D", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("S", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("P", new Integer (0)); +jalview.schemes.ResidueProperties.aliphatic.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.aliphatic.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.tiny.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("V", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("A", new Integer (1)); +jalview.schemes.ResidueProperties.tiny.put ("G", new Integer (1)); +jalview.schemes.ResidueProperties.tiny.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("Y", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("W", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("H", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("K", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("R", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("E", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("D", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("S", new Integer (1)); +jalview.schemes.ResidueProperties.tiny.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("P", new Integer (0)); +jalview.schemes.ResidueProperties.tiny.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.tiny.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.proline.put ("I", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("L", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("V", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("C", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("A", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("G", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("M", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("F", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("Y", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("W", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("H", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("K", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("R", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("E", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("Q", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("D", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("N", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("S", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("T", new Integer (0)); +jalview.schemes.ResidueProperties.proline.put ("P", new Integer (1)); +jalview.schemes.ResidueProperties.proline.put ("-", new Integer (1)); +jalview.schemes.ResidueProperties.proline.put ("*", new Integer (1)); +}{ +jalview.schemes.ResidueProperties.propHash.put ("hydrophobic", jalview.schemes.ResidueProperties.hydrophobic); +jalview.schemes.ResidueProperties.propHash.put ("small", jalview.schemes.ResidueProperties.small); +jalview.schemes.ResidueProperties.propHash.put ("positive", jalview.schemes.ResidueProperties.positive); +jalview.schemes.ResidueProperties.propHash.put ("negative", jalview.schemes.ResidueProperties.negative); +jalview.schemes.ResidueProperties.propHash.put ("charged", jalview.schemes.ResidueProperties.charged); +jalview.schemes.ResidueProperties.propHash.put ("aromatic", jalview.schemes.ResidueProperties.aromatic); +jalview.schemes.ResidueProperties.propHash.put ("aliphatic", jalview.schemes.ResidueProperties.aliphatic); +jalview.schemes.ResidueProperties.propHash.put ("tiny", jalview.schemes.ResidueProperties.tiny); +jalview.schemes.ResidueProperties.propHash.put ("proline", jalview.schemes.ResidueProperties.proline); +jalview.schemes.ResidueProperties.propHash.put ("polar", jalview.schemes.ResidueProperties.polar); +}{ +var propMatrixF = Clazz.newIntArray (23, 23, 0); +var propMatrixPos = Clazz.newIntArray (23, 23, 0); +var propMatrixEpos = Clazz.newIntArray (23, 23, 0); +for (var i = 0; i < 23; i++) { +var maxF = 0; +var maxP = 0; +var maxEP = 0; +var ic = ""; +if (jalview.schemes.ResidueProperties.aa.length > i) { +ic += jalview.schemes.ResidueProperties.aa[i]; +} else { +ic = "-"; +}for (var j = i + 1; j < 23; j++) { +var jc = ""; +if (jalview.schemes.ResidueProperties.aa.length > j) { +jc += jalview.schemes.ResidueProperties.aa[j]; +} else { +jc = "-"; +}propMatrixF[i][j] = 0; +propMatrixPos[i][j] = 0; +propMatrixEpos[i][j] = 0; +for (var en = jalview.schemes.ResidueProperties.propHash.keys (); en.hasMoreElements (); ) { +var ph = en.nextElement (); +var pph = jalview.schemes.ResidueProperties.propHash.get (ph); +if (pph.get (ic) != null && pph.get (jc) != null) { +var icp = pph.get (ic).intValue (); +var jcp = pph.get (jc).intValue (); +propMatrixPos[i][j] += icp == jcp && icp > 0 ? 2 : 0; +propMatrixPos[j][i] += icp == jcp && icp > 0 ? 2 : 0; +propMatrixF[i][j] += icp == jcp ? 2 : 0; +propMatrixF[j][i] += icp == jcp ? 2 : 0; +propMatrixEpos[i][j] += icp == jcp ? (1 + icp * 2) : 0; +propMatrixEpos[j][i] += icp == jcp ? (1 + icp * 2) : 0; +}} +if (maxF < propMatrixF[i][j]) { +maxF = propMatrixF[i][j]; +}if (maxP < propMatrixPos[i][j]) { +maxP = propMatrixPos[i][j]; +}if (maxEP < propMatrixEpos[i][j]) { +maxEP = propMatrixEpos[i][j]; +}} +propMatrixF[i][i] = maxF; +propMatrixPos[i][i] = maxP; +propMatrixEpos[i][i] = maxEP; +} +jalview.schemes.ResidueProperties.scoreMatrices.put ("PID", new jalview.analysis.scoremodels.PIDScoreModel ()); +jalview.schemes.ResidueProperties.scoreMatrices.put ("Displayed Features", new jalview.analysis.scoremodels.FeatureScoreModel ()); +}Clazz.defineStatics (c$, +"toDssp3State", null); +{ +jalview.schemes.ResidueProperties.toDssp3State = new java.util.Hashtable (); +jalview.schemes.ResidueProperties.toDssp3State.put ("H", "H"); +jalview.schemes.ResidueProperties.toDssp3State.put ("E", "E"); +jalview.schemes.ResidueProperties.toDssp3State.put ("C", " "); +jalview.schemes.ResidueProperties.toDssp3State.put (" ", " "); +jalview.schemes.ResidueProperties.toDssp3State.put ("T", " "); +jalview.schemes.ResidueProperties.toDssp3State.put ("B", "E"); +jalview.schemes.ResidueProperties.toDssp3State.put ("G", "H"); +jalview.schemes.ResidueProperties.toDssp3State.put ("I", "H"); +jalview.schemes.ResidueProperties.toDssp3State.put ("X", " "); +}Clazz.defineStatics (c$, +"toRNAssState", null, +"RNAcloseParen", Clazz.newBooleanArray (255, false)); +{ +jalview.schemes.ResidueProperties.toRNAssState = new java.util.Hashtable (); +jalview.schemes.ResidueProperties.toRNAssState.put (")", "("); +jalview.schemes.ResidueProperties.toRNAssState.put ("(", "("); +jalview.schemes.ResidueProperties.toRNAssState.put ("]", "["); +jalview.schemes.ResidueProperties.toRNAssState.put ("[", "["); +jalview.schemes.ResidueProperties.toRNAssState.put ("{", "{"); +jalview.schemes.ResidueProperties.toRNAssState.put ("}", "{"); +jalview.schemes.ResidueProperties.toRNAssState.put (">", ">"); +jalview.schemes.ResidueProperties.toRNAssState.put ("<", ">"); +jalview.schemes.ResidueProperties.toRNAssState.put ("A", "A"); +jalview.schemes.ResidueProperties.toRNAssState.put ("a", "A"); +jalview.schemes.ResidueProperties.toRNAssState.put ("B", "B"); +jalview.schemes.ResidueProperties.toRNAssState.put ("b", "B"); +jalview.schemes.ResidueProperties.toRNAssState.put ("C", "C"); +jalview.schemes.ResidueProperties.toRNAssState.put ("c", "C"); +jalview.schemes.ResidueProperties.toRNAssState.put ("D", "D"); +jalview.schemes.ResidueProperties.toRNAssState.put ("d", "D"); +jalview.schemes.ResidueProperties.toRNAssState.put ("E", "E"); +jalview.schemes.ResidueProperties.toRNAssState.put ("e", "E"); +jalview.schemes.ResidueProperties.toRNAssState.put ("F", "F"); +jalview.schemes.ResidueProperties.toRNAssState.put ("f", "F"); +jalview.schemes.ResidueProperties.toRNAssState.put ("G", "G"); +jalview.schemes.ResidueProperties.toRNAssState.put ("g", "G"); +jalview.schemes.ResidueProperties.toRNAssState.put ("H", "H"); +jalview.schemes.ResidueProperties.toRNAssState.put ("h", "H"); +jalview.schemes.ResidueProperties.toRNAssState.put ("I", "I"); +jalview.schemes.ResidueProperties.toRNAssState.put ("i", "I"); +jalview.schemes.ResidueProperties.toRNAssState.put ("J", "J"); +jalview.schemes.ResidueProperties.toRNAssState.put ("j", "J"); +jalview.schemes.ResidueProperties.toRNAssState.put ("K", "K"); +jalview.schemes.ResidueProperties.toRNAssState.put ("k", "K"); +jalview.schemes.ResidueProperties.toRNAssState.put ("L", "L"); +jalview.schemes.ResidueProperties.toRNAssState.put ("l", "L"); +jalview.schemes.ResidueProperties.toRNAssState.put ("M", "M"); +jalview.schemes.ResidueProperties.toRNAssState.put ("m", "M"); +jalview.schemes.ResidueProperties.toRNAssState.put ("N", "N"); +jalview.schemes.ResidueProperties.toRNAssState.put ("n", "N"); +jalview.schemes.ResidueProperties.toRNAssState.put ("O", "O"); +jalview.schemes.ResidueProperties.toRNAssState.put ("o", "O"); +jalview.schemes.ResidueProperties.toRNAssState.put ("P", "P"); +jalview.schemes.ResidueProperties.toRNAssState.put ("p", "P"); +jalview.schemes.ResidueProperties.toRNAssState.put ("Q", "Q"); +jalview.schemes.ResidueProperties.toRNAssState.put ("q", "Q"); +jalview.schemes.ResidueProperties.toRNAssState.put ("R", "R"); +jalview.schemes.ResidueProperties.toRNAssState.put ("r", "R"); +jalview.schemes.ResidueProperties.toRNAssState.put ("S", "S"); +jalview.schemes.ResidueProperties.toRNAssState.put ("s", "S"); +jalview.schemes.ResidueProperties.toRNAssState.put ("T", "T"); +jalview.schemes.ResidueProperties.toRNAssState.put ("t", "T"); +jalview.schemes.ResidueProperties.toRNAssState.put ("U", "U"); +jalview.schemes.ResidueProperties.toRNAssState.put ("u", "U"); +jalview.schemes.ResidueProperties.toRNAssState.put ("V", "V"); +jalview.schemes.ResidueProperties.toRNAssState.put ("v", "V"); +jalview.schemes.ResidueProperties.toRNAssState.put ("W", "W"); +jalview.schemes.ResidueProperties.toRNAssState.put ("w", "W"); +jalview.schemes.ResidueProperties.toRNAssState.put ("X", "X"); +jalview.schemes.ResidueProperties.toRNAssState.put ("x", "X"); +jalview.schemes.ResidueProperties.toRNAssState.put ("Y", "Y"); +jalview.schemes.ResidueProperties.toRNAssState.put ("y", "Y"); +jalview.schemes.ResidueProperties.toRNAssState.put ("Z", "Z"); +jalview.schemes.ResidueProperties.toRNAssState.put ("z", "Z"); +for (var p = 0; p < jalview.schemes.ResidueProperties.RNAcloseParen.length; p++) { +jalview.schemes.ResidueProperties.RNAcloseParen[p] = false; +} +for (var k, $k = jalview.schemes.ResidueProperties.toRNAssState.keySet ().iterator (); $k.hasNext () && ((k = $k.next ()) || true);) { +jalview.schemes.ResidueProperties.RNAcloseParen[k.charCodeAt (0)] = k.charAt (0) != jalview.schemes.ResidueProperties.toRNAssState.get (k).charAt (0); +} +}}); diff --git a/bin/jalview/schemes/ScoreColourScheme.js b/bin/jalview/schemes/ScoreColourScheme.js index 5027bdf..f097a40 100644 --- a/bin/jalview/schemes/ScoreColourScheme.js +++ b/bin/jalview/schemes/ScoreColourScheme.js @@ -1,43 +1,43 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.ScoreColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { -c$ = Clazz.decorateAsClass (function () { -this.min = 0; -this.max = 0; -this.scores = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "ScoreColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function (symbolIndex, scores, min, max) { -Clazz.superConstructor (this, jalview.schemes.ScoreColourScheme, [symbolIndex]); -this.scores = scores; -this.min = min; -this.max = max; -var i; -var iSize = scores.length; -this.colors = new Array (scores.length); -for (i = 0; i < iSize; i++) { -var red = (scores[i] - min) / (max - min); -if (red > 1.0) { -red = 1.0; -}if (red < 0.0) { -red = 0.0; -}this.colors[i] = this.makeColour (red); -} -}, "~A,~A,~N,~N"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -if (this.threshold > 0) { -if (!this.aboveThreshold (c, j)) { -return java.awt.Color.white; -}}if (jalview.util.Comparison.isGap (c)) { -return java.awt.Color.white; -}var currentColour = this.colors[jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]]; -if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "makeColour", -function (c) { -return new java.awt.Color (c, 0.0, 1.0 - c); -}, "~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.ScoreColourScheme", ["jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.awt.Color"], function () { +c$ = Clazz.decorateAsClass (function () { +this.min = 0; +this.max = 0; +this.scores = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "ScoreColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function (symbolIndex, scores, min, max) { +Clazz.superConstructor (this, jalview.schemes.ScoreColourScheme, [symbolIndex]); +this.scores = scores; +this.min = min; +this.max = max; +var i; +var iSize = scores.length; +this.colors = new Array (scores.length); +for (i = 0; i < iSize; i++) { +var red = (scores[i] - min) / (max - min); +if (red > 1.0) { +red = 1.0; +}if (red < 0.0) { +red = 0.0; +}this.colors[i] = this.makeColour (red); +} +}, "~A,~A,~N,~N"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +if (this.threshold > 0) { +if (!this.aboveThreshold (c, j)) { +return java.awt.Color.white; +}}if (jalview.util.Comparison.isGap (c)) { +return java.awt.Color.white; +}var currentColour = this.colors[jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]]; +if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "makeColour", +function (c) { +return new java.awt.Color (c, 0.0, 1.0 - c); +}, "~N"); +}); diff --git a/bin/jalview/schemes/ScoreMatrix.js b/bin/jalview/schemes/ScoreMatrix.js index a12c842..401ab41 100644 --- a/bin/jalview/schemes/ScoreMatrix.js +++ b/bin/jalview/schemes/ScoreMatrix.js @@ -1,86 +1,86 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.analysis.scoremodels.PairwiseSeqScoreModel", "jalview.api.analysis.ScoreModelI"], "jalview.schemes.ScoreMatrix", ["jalview.schemes.ResidueProperties", "java.lang.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.name = null; -this.matrix = null; -this.type = 0; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "ScoreMatrix", jalview.analysis.scoremodels.PairwiseSeqScoreModel, jalview.api.analysis.ScoreModelI); -Clazz.overrideMethod (c$, "getName", -function () { -return this.name; -}); -Clazz.makeConstructor (c$, -function (name, matrix, type) { -Clazz.superConstructor (this, jalview.schemes.ScoreMatrix, []); -this.matrix = matrix; -this.type = type; -this.name = name; -}, "~S,~A,~N"); -Clazz.overrideMethod (c$, "isDNA", -function () { -return this.type == 1; -}); -Clazz.overrideMethod (c$, "isProtein", -function () { -return this.type == 0; -}); -Clazz.overrideMethod (c$, "getMatrix", -function () { -return this.matrix; -}); -Clazz.defineMethod (c$, "getPairwiseScore", -function (A1, A2) { -return this.getPairwiseScore (A1.charAt (0), A2.charAt (0)); -}, "~S,~S"); -Clazz.defineMethod (c$, "getPairwiseScore", -function (c, d) { -var pog = 0; -try { -var a = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]; -var b = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[d.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[d.charCodeAt (0)]; -pog = this.matrix[a][b]; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -return pog; -}, "~S,~S"); -Clazz.overrideMethod (c$, "toString", -function () { -return this.outputMatrix (false); -}); -Clazz.defineMethod (c$, "outputMatrix", -function (html) { -var sb = new StringBuffer (); -var symbols = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex : jalview.schemes.ResidueProperties.nucleotideIndex; -var symMax = (this.type == 0) ? 23 : 10; -var header = true; -if (html) { -sb.append (""); -}for (var sym = 'A'; sym <= 'Z'; sym = String.fromCharCode (sym.charCodeAt (0) + 1)) { -if (symbols[sym.charCodeAt (0)] >= 0 && symbols[sym.charCodeAt (0)] < symMax) { -if (header) { -sb.append (html ? "" : ""); -for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) { -if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) { -sb.append ((html ? "" : "")); -}} -header = false; -sb.append (html ? "\n" : "\n"); -}if (html) { -sb.append (""); -}sb.append ((html ? "" : "")); -for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) { -if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) { -sb.append ((html ? "" : "")); -}} -sb.append (html ? "\n" : "\n"); -}} -if (html) { -sb.append ("
 " : "\t") + sym2 + (html ? " 
" : "") + sym + (html ? "" : "\t") + this.matrix[symbols[sym.charCodeAt (0)]][symbols[sym2.charCodeAt (0)]] + (html ? "
"); -}return sb.toString (); -}, "~B"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.analysis.scoremodels.PairwiseSeqScoreModel", "jalview.api.analysis.ScoreModelI"], "jalview.schemes.ScoreMatrix", ["jalview.schemes.ResidueProperties", "java.lang.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.name = null; +this.matrix = null; +this.type = 0; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "ScoreMatrix", jalview.analysis.scoremodels.PairwiseSeqScoreModel, jalview.api.analysis.ScoreModelI); +Clazz.overrideMethod (c$, "getName", +function () { +return this.name; +}); +Clazz.makeConstructor (c$, +function (name, matrix, type) { +Clazz.superConstructor (this, jalview.schemes.ScoreMatrix, []); +this.matrix = matrix; +this.type = type; +this.name = name; +}, "~S,~A,~N"); +Clazz.overrideMethod (c$, "isDNA", +function () { +return this.type == 1; +}); +Clazz.overrideMethod (c$, "isProtein", +function () { +return this.type == 0; +}); +Clazz.overrideMethod (c$, "getMatrix", +function () { +return this.matrix; +}); +Clazz.defineMethod (c$, "getPairwiseScore", +function (A1, A2) { +return this.getPairwiseScore (A1.charAt (0), A2.charAt (0)); +}, "~S,~S"); +Clazz.defineMethod (c$, "getPairwiseScore", +function (c, d) { +var pog = 0; +try { +var a = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)]; +var b = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[d.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[d.charCodeAt (0)]; +pog = this.matrix[a][b]; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +return pog; +}, "~S,~S"); +Clazz.overrideMethod (c$, "toString", +function () { +return this.outputMatrix (false); +}); +Clazz.defineMethod (c$, "outputMatrix", +function (html) { +var sb = new StringBuffer (); +var symbols = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex : jalview.schemes.ResidueProperties.nucleotideIndex; +var symMax = (this.type == 0) ? 23 : 10; +var header = true; +if (html) { +sb.append (""); +}for (var sym = 'A'; sym <= 'Z'; sym = String.fromCharCode (sym.charCodeAt (0) + 1)) { +if (symbols[sym.charCodeAt (0)] >= 0 && symbols[sym.charCodeAt (0)] < symMax) { +if (header) { +sb.append (html ? "" : ""); +for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) { +if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) { +sb.append ((html ? "" : "")); +}} +header = false; +sb.append (html ? "\n" : "\n"); +}if (html) { +sb.append (""); +}sb.append ((html ? "" : "")); +for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) { +if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) { +sb.append ((html ? "" : "")); +}} +sb.append (html ? "\n" : "\n"); +}} +if (html) { +sb.append ("
 " : "\t") + sym2 + (html ? " 
" : "") + sym + (html ? "" : "\t") + this.matrix[symbols[sym.charCodeAt (0)]][symbols[sym2.charCodeAt (0)]] + (html ? "
"); +}return sb.toString (); +}, "~B"); +}); diff --git a/bin/jalview/schemes/StrandColourScheme.js b/bin/jalview/schemes/StrandColourScheme.js index cf2f6bf..7ccf062 100644 --- a/bin/jalview/schemes/StrandColourScheme.js +++ b/bin/jalview/schemes/StrandColourScheme.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.StrandColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "StrandColourScheme", jalview.schemes.ScoreColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.StrandColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.strand, 0.37, 1.7]); -}); -Clazz.overrideMethod (c$, "makeColour", -function (c) { -return new java.awt.Color (c, c, 1.0 - c); -}, "~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.StrandColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "StrandColourScheme", jalview.schemes.ScoreColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.StrandColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.strand, 0.37, 1.7]); +}); +Clazz.overrideMethod (c$, "makeColour", +function (c) { +return new java.awt.Color (c, c, 1.0 - c); +}, "~N"); +}); diff --git a/bin/jalview/schemes/TCoffeeColourScheme.js b/bin/jalview/schemes/TCoffeeColourScheme.js index 0952425..6350ad9 100644 --- a/bin/jalview/schemes/TCoffeeColourScheme.js +++ b/bin/jalview/schemes/TCoffeeColourScheme.js @@ -1,45 +1,45 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme", "java.awt.Color"], "jalview.schemes.TCoffeeColourScheme", ["jalview.datamodel.AlignmentI", "java.util.ArrayList", "$.IdentityHashMap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.seqMap = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "TCoffeeColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function (alignment) { -Clazz.superConstructor (this, jalview.schemes.TCoffeeColourScheme, []); -this.alignmentChanged (alignment, null); -}, "jalview.datamodel.AnnotatedCollectionI"); -Clazz.overrideMethod (c$, "alignmentChanged", -function (alignment, hiddenReps) { -var annots = new java.util.ArrayList (); -this.seqMap = new java.util.IdentityHashMap (); -var alcontext = Clazz.instanceOf (alignment, jalview.datamodel.AlignmentI) ? alignment : alignment.getContext (); -var w = 0; -for (var al, $al = alcontext.findAnnotation ("TCoffeeScore").iterator (); $al.hasNext () && ((al = $al.next ()) || true);) { -if (al.sequenceRef != null && !al.belowAlignment) { -annots.add (al); -if (w < al.annotations.length) { -w = al.annotations.length; -}var scores = new Array (al.annotations.length); -var i = 0; -for (var an, $an = 0, $$an = al.annotations; $an < $$an.length && ((an = $$an[$an]) || true); $an++) { -scores[i++] = (an != null) ? an.colour : java.awt.Color.white; -} -this.seqMap.put (al.sequenceRef, scores); -}} -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -var cols; -if (this.seqMap == null || (cols = this.seqMap.get (seq)) == null) { -return java.awt.Color.white; -}if (j < 0 || j >= cols.length) { -return java.awt.Color.white; -}return cols[j]; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "applyTo", -function (sg, hiddenRepSequences) { -return new jalview.schemes.TCoffeeColourScheme (sg); -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -c$.$colors = c$.prototype.$colors = Clazz.newArray (-1, [ new java.awt.Color (102, 102, 255), new java.awt.Color (0, 255, 0), new java.awt.Color (102, 255, 0), new java.awt.Color (204, 255, 0), new java.awt.Color (255, 255, 0), new java.awt.Color (255, 204, 0), new java.awt.Color (255, 153, 0), new java.awt.Color (255, 102, 0), new java.awt.Color (255, 51, 0), new java.awt.Color (255, 34, 0)]); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme", "java.awt.Color"], "jalview.schemes.TCoffeeColourScheme", ["jalview.datamodel.AlignmentI", "java.util.ArrayList", "$.IdentityHashMap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.seqMap = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "TCoffeeColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function (alignment) { +Clazz.superConstructor (this, jalview.schemes.TCoffeeColourScheme, []); +this.alignmentChanged (alignment, null); +}, "jalview.datamodel.AnnotatedCollectionI"); +Clazz.overrideMethod (c$, "alignmentChanged", +function (alignment, hiddenReps) { +var annots = new java.util.ArrayList (); +this.seqMap = new java.util.IdentityHashMap (); +var alcontext = Clazz.instanceOf (alignment, jalview.datamodel.AlignmentI) ? alignment : alignment.getContext (); +var w = 0; +for (var al, $al = alcontext.findAnnotation ("TCoffeeScore").iterator (); $al.hasNext () && ((al = $al.next ()) || true);) { +if (al.sequenceRef != null && !al.belowAlignment) { +annots.add (al); +if (w < al.annotations.length) { +w = al.annotations.length; +}var scores = new Array (al.annotations.length); +var i = 0; +for (var an, $an = 0, $$an = al.annotations; $an < $$an.length && ((an = $$an[$an]) || true); $an++) { +scores[i++] = (an != null) ? an.colour : java.awt.Color.white; +} +this.seqMap.put (al.sequenceRef, scores); +}} +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +var cols; +if (this.seqMap == null || (cols = this.seqMap.get (seq)) == null) { +return java.awt.Color.white; +}if (j < 0 || j >= cols.length) { +return java.awt.Color.white; +}return cols[j]; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "applyTo", +function (sg, hiddenRepSequences) { +return new jalview.schemes.TCoffeeColourScheme (sg); +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +c$.$colors = c$.prototype.$colors = Clazz.newArray (-1, [ new java.awt.Color (102, 102, 255), new java.awt.Color (0, 255, 0), new java.awt.Color (102, 255, 0), new java.awt.Color (204, 255, 0), new java.awt.Color (255, 255, 0), new java.awt.Color (255, 204, 0), new java.awt.Color (255, 153, 0), new java.awt.Color (255, 102, 0), new java.awt.Color (255, 51, 0), new java.awt.Color (255, 34, 0)]); +}); diff --git a/bin/jalview/schemes/TaylorColourScheme.js b/bin/jalview/schemes/TaylorColourScheme.js index 156c6fc..65bba75 100644 --- a/bin/jalview/schemes/TaylorColourScheme.js +++ b/bin/jalview/schemes/TaylorColourScheme.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.TaylorColourScheme", ["jalview.schemes.ResidueProperties"], function () { -c$ = Clazz.declareType (jalview.schemes, "TaylorColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.TaylorColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.taylor, 0]); -}); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.TaylorColourScheme", ["jalview.schemes.ResidueProperties"], function () { +c$ = Clazz.declareType (jalview.schemes, "TaylorColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.TaylorColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.taylor, 0]); +}); +}); diff --git a/bin/jalview/schemes/TurnColourScheme.js b/bin/jalview/schemes/TurnColourScheme.js index 74fe374..7e440d8 100644 --- a/bin/jalview/schemes/TurnColourScheme.js +++ b/bin/jalview/schemes/TurnColourScheme.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.TurnColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { -c$ = Clazz.declareType (jalview.schemes, "TurnColourScheme", jalview.schemes.ScoreColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.TurnColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.turn, 0.47, 1.56]); -}); -Clazz.overrideMethod (c$, "makeColour", -function (c) { -return new java.awt.Color (c, 1 - c, 1 - c); -}, "~N"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ScoreColourScheme"], "jalview.schemes.TurnColourScheme", ["jalview.schemes.ResidueProperties", "java.awt.Color"], function () { +c$ = Clazz.declareType (jalview.schemes, "TurnColourScheme", jalview.schemes.ScoreColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.TurnColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.turn, 0.47, 1.56]); +}); +Clazz.overrideMethod (c$, "makeColour", +function (c) { +return new java.awt.Color (c, 1 - c, 1 - c); +}, "~N"); +}); diff --git a/bin/jalview/schemes/UserColourScheme.class b/bin/jalview/schemes/UserColourScheme.class index c6ab601172e6df6d4a0bab45701d81d3c7d02f62..5ca8ca9008ab32b468da260f737109f75c7eea19 100644 GIT binary patch delta 40 wcmX@6yI6OFwkV_GWF67(Vww!B{~5#?*w`5u85!9bzA!K{FvxLFjuFcO0MAMYp8x;= delta 75 zcmZ3idrWtOwkV^^WF67(mOcz@{~5#?*w`5u85!9bzA!K{Fv$I9;6RA5Gw1@v{xdKk Mgg}ZWTZ&}?08On8F8}}l diff --git a/bin/jalview/schemes/UserColourScheme.js b/bin/jalview/schemes/UserColourScheme.js index dcf5f86..ee83987 100644 --- a/bin/jalview/schemes/UserColourScheme.js +++ b/bin/jalview/schemes/UserColourScheme.js @@ -1,165 +1,165 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.UserColourScheme", ["jalview.schemes.ColourSchemeProperty", "$.ResidueProperties", "java.awt.Color", "java.util.StringTokenizer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.lowerCaseColours = null; -this.schemeName = null; -Clazz.instantialize (this, arguments); -}, jalview.schemes, "UserColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.UserColourScheme, [jalview.schemes.ResidueProperties.aaIndex]); -}); -Clazz.makeConstructor (c$, -function (newColors) { -Clazz.superConstructor (this, jalview.schemes.UserColourScheme, [jalview.schemes.ResidueProperties.aaIndex]); -this.colors = newColors; -}, "~A"); -Clazz.overrideMethod (c$, "applyTo", -function (sg, hiddenRepSequences) { -var usc = new jalview.schemes.UserColourScheme (this.colors); -if (this.lowerCaseColours != null) { -usc.schemeName = String.instantialize (this.schemeName); -usc.lowerCaseColours = new Array (this.lowerCaseColours.length); -System.arraycopy (this.lowerCaseColours, 0, usc.lowerCaseColours, 0, this.lowerCaseColours.length); -}return usc; -}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); -Clazz.makeConstructor (c$, -function (colour) { -Clazz.superConstructor (this, jalview.schemes.UserColourScheme, [jalview.schemes.ResidueProperties.aaIndex]); -var col = this.getColourFromString (colour); -if (col == null) { -System.out.println ("Unknown colour!! " + colour); -col = this.createColourFromName (colour); -}this.colors = new Array (24); -for (var i = 0; i < 24; i++) { -this.colors[i] = col; -} -this.schemeName = colour; -}, "~S"); -Clazz.defineMethod (c$, "getColours", -function () { -return this.colors; -}); -Clazz.defineMethod (c$, "getLowerCaseColours", -function () { -return this.lowerCaseColours; -}); -Clazz.defineMethod (c$, "setName", -function (name) { -this.schemeName = name; -}, "~S"); -Clazz.defineMethod (c$, "getName", -function () { -return this.schemeName; -}); -Clazz.defineMethod (c$, "getColourFromString", -function (colour) { -colour = colour.trim (); -var col = null; -try { -var value = Integer.parseInt (colour, 16); -col = new java.awt.Color (value); -} catch (ex) { -if (Clazz.exceptionOf (ex, NumberFormatException)) { -} else { -throw ex; -} -} -if (col == null) { -col = jalview.schemes.ColourSchemeProperty.getAWTColorFromName (colour); -}if (col == null) { -try { -var st = new java.util.StringTokenizer (colour, ","); -var r = Integer.parseInt (st.nextToken ()); -var g = Integer.parseInt (st.nextToken ()); -var b = Integer.parseInt (st.nextToken ()); -col = new java.awt.Color (r, g, b); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -} else { -throw ex; -} -} -}return col; -}, "~S"); -Clazz.defineMethod (c$, "createColourFromName", -function (name) { -var r; -var g; -var b; -var lsize = name.length; -var start = 0; -var end = Clazz.doubleToInt (lsize / 3); -var rgbOffset = Math.abs (name.hashCode () % 10) * 15; -r = Math.abs (name.substring (start, end).hashCode () + rgbOffset) % 210 + 20; -start = end; -end += Clazz.doubleToInt (lsize / 3); -if (end > lsize) { -end = lsize; -}g = Math.abs (name.substring (start, end).hashCode () + rgbOffset) % 210 + 20; -b = Math.abs (name.substring (end).hashCode () + rgbOffset) % 210 + 20; -var color = new java.awt.Color (r, g, b); -return color; -}, "~S"); -Clazz.defineMethod (c$, "parseAppletParameter", -function (paramValue) { -var st = new java.util.StringTokenizer (paramValue, ";"); -var st2; -var token = null; -var colour; -var residues; -try { -while (st.hasMoreElements ()) { -token = st.nextToken ().trim (); -residues = token.substring (0, token.indexOf ("=")); -colour = token.substring (token.indexOf ("=") + 1); -st2 = new java.util.StringTokenizer (residues, " ,"); -while (st2.hasMoreTokens ()) { -token = st2.nextToken (); -if (jalview.schemes.ResidueProperties.aaIndex[token.charCodeAt (0)] == -1) { -continue; -}var colIndex = jalview.schemes.ResidueProperties.aaIndex[token.charCodeAt (0)]; -if (token.equalsIgnoreCase ("lowerCase")) { -if (this.lowerCaseColours == null) { -this.lowerCaseColours = new Array (23); -}for (var i = 0; i < 23; i++) { -if (this.lowerCaseColours[i] == null) { -this.lowerCaseColours[i] = this.getColourFromString (colour); -}} -continue; -}if (token.equals (token.toLowerCase ())) { -if (this.lowerCaseColours == null) { -this.lowerCaseColours = new Array (23); -}this.lowerCaseColours[colIndex] = this.getColourFromString (colour); -} else { -this.colors[colIndex] = this.getColourFromString (colour); -}} -} -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -System.out.println ("Error parsing userDefinedColours:\n" + token + "\n" + ex); -} else { -throw ex; -} -} -}, "~S"); -Clazz.defineMethod (c$, "findColour", -function (c, j, seq) { -var currentColour; -var index = jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]; -if ((this.threshold == 0) || this.aboveThreshold (c, j)) { -if (this.lowerCaseColours != null && 'a' <= c && c <= 'z') { -currentColour = this.lowerCaseColours[index]; -} else { -currentColour = this.colors[index]; -}} else { -currentColour = java.awt.Color.white; -}if (this.conservationColouring) { -currentColour = this.applyConservation (currentColour, j); -}return currentColour; -}, "~S,~N,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "setLowerCaseColours", -function (lcolours) { -this.lowerCaseColours = lcolours; -}, "~A"); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.UserColourScheme", ["jalview.schemes.ColourSchemeProperty", "$.ResidueProperties", "java.awt.Color", "java.util.StringTokenizer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.lowerCaseColours = null; +this.schemeName = null; +Clazz.instantialize (this, arguments); +}, jalview.schemes, "UserColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.UserColourScheme, [jalview.schemes.ResidueProperties.aaIndex]); +}); +Clazz.makeConstructor (c$, +function (newColors) { +Clazz.superConstructor (this, jalview.schemes.UserColourScheme, [jalview.schemes.ResidueProperties.aaIndex]); +this.colors = newColors; +}, "~A"); +Clazz.overrideMethod (c$, "applyTo", +function (sg, hiddenRepSequences) { +var usc = new jalview.schemes.UserColourScheme (this.colors); +if (this.lowerCaseColours != null) { +usc.schemeName = String.instantialize (this.schemeName); +usc.lowerCaseColours = new Array (this.lowerCaseColours.length); +System.arraycopy (this.lowerCaseColours, 0, usc.lowerCaseColours, 0, this.lowerCaseColours.length); +}return usc; +}, "jalview.datamodel.AnnotatedCollectionI,java.util.Map"); +Clazz.makeConstructor (c$, +function (colour) { +Clazz.superConstructor (this, jalview.schemes.UserColourScheme, [jalview.schemes.ResidueProperties.aaIndex]); +var col = this.getColourFromString (colour); +if (col == null) { +System.out.println ("Unknown colour!! " + colour); +col = this.createColourFromName (colour); +}this.colors = new Array (24); +for (var i = 0; i < 24; i++) { +this.colors[i] = col; +} +this.schemeName = colour; +}, "~S"); +Clazz.defineMethod (c$, "getColours", +function () { +return this.colors; +}); +Clazz.defineMethod (c$, "getLowerCaseColours", +function () { +return this.lowerCaseColours; +}); +Clazz.defineMethod (c$, "setName", +function (name) { +this.schemeName = name; +}, "~S"); +Clazz.defineMethod (c$, "getName", +function () { +return this.schemeName; +}); +Clazz.defineMethod (c$, "getColourFromString", +function (colour) { +colour = colour.trim (); +var col = null; +try { +var value = Integer.parseInt (colour, 16); +col = new java.awt.Color (value); +} catch (ex) { +if (Clazz.exceptionOf (ex, NumberFormatException)) { +} else { +throw ex; +} +} +if (col == null) { +col = jalview.schemes.ColourSchemeProperty.getAWTColorFromName (colour); +}if (col == null) { +try { +var st = new java.util.StringTokenizer (colour, ","); +var r = Integer.parseInt (st.nextToken ()); +var g = Integer.parseInt (st.nextToken ()); +var b = Integer.parseInt (st.nextToken ()); +col = new java.awt.Color (r, g, b); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +} else { +throw ex; +} +} +}return col; +}, "~S"); +Clazz.defineMethod (c$, "createColourFromName", +function (name) { +var r; +var g; +var b; +var lsize = name.length; +var start = 0; +var end = Clazz.doubleToInt (lsize / 3); +var rgbOffset = Math.abs (name.hashCode () % 10) * 15; +r = Math.abs (name.substring (start, end).hashCode () + rgbOffset) % 210 + 20; +start = end; +end += Clazz.doubleToInt (lsize / 3); +if (end > lsize) { +end = lsize; +}g = Math.abs (name.substring (start, end).hashCode () + rgbOffset) % 210 + 20; +b = Math.abs (name.substring (end).hashCode () + rgbOffset) % 210 + 20; +var color = new java.awt.Color (r, g, b); +return color; +}, "~S"); +Clazz.defineMethod (c$, "parseAppletParameter", +function (paramValue) { +var st = new java.util.StringTokenizer (paramValue, ";"); +var st2; +var token = null; +var colour; +var residues; +try { +while (st.hasMoreElements ()) { +token = st.nextToken ().trim (); +residues = token.substring (0, token.indexOf ("=")); +colour = token.substring (token.indexOf ("=") + 1); +st2 = new java.util.StringTokenizer (residues, " ,"); +while (st2.hasMoreTokens ()) { +token = st2.nextToken (); +if (jalview.schemes.ResidueProperties.aaIndex[token.charCodeAt (0)] == -1) { +continue; +}var colIndex = jalview.schemes.ResidueProperties.aaIndex[token.charCodeAt (0)]; +if (token.equalsIgnoreCase ("lowerCase")) { +if (this.lowerCaseColours == null) { +this.lowerCaseColours = new Array (23); +}for (var i = 0; i < 23; i++) { +if (this.lowerCaseColours[i] == null) { +this.lowerCaseColours[i] = this.getColourFromString (colour); +}} +continue; +}if (token.equals (token.toLowerCase ())) { +if (this.lowerCaseColours == null) { +this.lowerCaseColours = new Array (23); +}this.lowerCaseColours[colIndex] = this.getColourFromString (colour); +} else { +this.colors[colIndex] = this.getColourFromString (colour); +}} +} +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +System.out.println ("Error parsing userDefinedColours:\n" + token + "\n" + ex); +} else { +throw ex; +} +} +}, "~S"); +Clazz.defineMethod (c$, "findColour", +function (c, j, seq) { +var currentColour; +var index = jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)]; +if ((this.threshold == 0) || this.aboveThreshold (c, j)) { +if (this.lowerCaseColours != null && 'a' <= c && c <= 'z') { +currentColour = this.lowerCaseColours[index]; +} else { +currentColour = this.colors[index]; +}} else { +currentColour = java.awt.Color.white; +}if (this.conservationColouring) { +currentColour = this.applyConservation (currentColour, j); +}return currentColour; +}, "~S,~N,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "setLowerCaseColours", +function (lcolours) { +this.lowerCaseColours = lcolours; +}, "~A"); +}); diff --git a/bin/jalview/schemes/ZappoColourScheme.js b/bin/jalview/schemes/ZappoColourScheme.js index fc253d3..b63064e 100644 --- a/bin/jalview/schemes/ZappoColourScheme.js +++ b/bin/jalview/schemes/ZappoColourScheme.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("jalview.schemes"); -Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.ZappoColourScheme", ["jalview.schemes.ResidueProperties"], function () { -c$ = Clazz.declareType (jalview.schemes, "ZappoColourScheme", jalview.schemes.ResidueColourScheme); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.schemes.ZappoColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.zappo, 0]); -}); -}); +Clazz.declarePackage ("jalview.schemes"); +Clazz.load (["jalview.schemes.ResidueColourScheme"], "jalview.schemes.ZappoColourScheme", ["jalview.schemes.ResidueProperties"], function () { +c$ = Clazz.declareType (jalview.schemes, "ZappoColourScheme", jalview.schemes.ResidueColourScheme); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.schemes.ZappoColourScheme, [jalview.schemes.ResidueProperties.aaIndex, jalview.schemes.ResidueProperties.zappo, 0]); +}); +}); diff --git a/bin/jalview/schemes/package.js b/bin/jalview/schemes/package.js index 045573a..5891eb2 100644 --- a/bin/jalview/schemes/package.js +++ b/bin/jalview/schemes/package.js @@ -1,5 +1,5 @@ -var path = ClazzLoader.getClasspathFor ("jalview.schemes.package"); -path = path.substring (0, path.lastIndexOf ("package.js")); -ClazzLoader.jarClasspath (path + "ClustalxColourScheme.js", [ -"jalview.schemes.ConsensusColour", -"$.ClustalxColourScheme"]); +var path = ClazzLoader.getClasspathFor ("jalview.schemes.package"); +path = path.substring (0, path.lastIndexOf ("package.js")); +ClazzLoader.jarClasspath (path + "ClustalxColourScheme.js", [ +"jalview.schemes.ConsensusColour", +"$.ClustalxColourScheme"]); diff --git a/bin/jalview/structure/AlignmentViewPanelListener.js b/bin/jalview/structure/AlignmentViewPanelListener.js index 979d03f..d293108 100644 --- a/bin/jalview/structure/AlignmentViewPanelListener.js +++ b/bin/jalview/structure/AlignmentViewPanelListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "AlignmentViewPanelListener"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "AlignmentViewPanelListener"); diff --git a/bin/jalview/structure/AtomSpec.js b/bin/jalview/structure/AtomSpec.js index 3e50bc2..0023fdc 100644 --- a/bin/jalview/structure/AtomSpec.js +++ b/bin/jalview/structure/AtomSpec.js @@ -1,35 +1,35 @@ -Clazz.declarePackage ("jalview.structure"); -c$ = Clazz.decorateAsClass (function () { -this.pdbFile = null; -this.chain = null; -this.pdbResNum = 0; -this.atomIndex = 0; -Clazz.instantialize (this, arguments); -}, jalview.structure, "AtomSpec"); -Clazz.makeConstructor (c$, -function (pdbFile, chain, resNo, atomNo) { -this.pdbFile = pdbFile; -this.chain = chain; -this.pdbResNum = resNo; -this.atomIndex = atomNo; -}, "~S,~S,~N,~N"); -Clazz.defineMethod (c$, "getPdbFile", -function () { -return this.pdbFile; -}); -Clazz.defineMethod (c$, "getChain", -function () { -return this.chain; -}); -Clazz.defineMethod (c$, "getPdbResNum", -function () { -return this.pdbResNum; -}); -Clazz.defineMethod (c$, "getAtomIndex", -function () { -return this.atomIndex; -}); -Clazz.overrideMethod (c$, "toString", -function () { -return "pdbFile: " + this.pdbFile + ", chain: " + this.chain + ", res: " + this.pdbResNum + ", atom: " + this.atomIndex; -}); +Clazz.declarePackage ("jalview.structure"); +c$ = Clazz.decorateAsClass (function () { +this.pdbFile = null; +this.chain = null; +this.pdbResNum = 0; +this.atomIndex = 0; +Clazz.instantialize (this, arguments); +}, jalview.structure, "AtomSpec"); +Clazz.makeConstructor (c$, +function (pdbFile, chain, resNo, atomNo) { +this.pdbFile = pdbFile; +this.chain = chain; +this.pdbResNum = resNo; +this.atomIndex = atomNo; +}, "~S,~S,~N,~N"); +Clazz.defineMethod (c$, "getPdbFile", +function () { +return this.pdbFile; +}); +Clazz.defineMethod (c$, "getChain", +function () { +return this.chain; +}); +Clazz.defineMethod (c$, "getPdbResNum", +function () { +return this.pdbResNum; +}); +Clazz.defineMethod (c$, "getAtomIndex", +function () { +return this.atomIndex; +}); +Clazz.overrideMethod (c$, "toString", +function () { +return "pdbFile: " + this.pdbFile + ", chain: " + this.chain + ", res: " + this.pdbResNum + ", atom: " + this.atomIndex; +}); diff --git a/bin/jalview/structure/CommandListener.js b/bin/jalview/structure/CommandListener.js index 5f0c290..8901ca3 100644 --- a/bin/jalview/structure/CommandListener.js +++ b/bin/jalview/structure/CommandListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "CommandListener"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "CommandListener"); diff --git a/bin/jalview/structure/SecondaryStructureListener.js b/bin/jalview/structure/SecondaryStructureListener.js index d9e73f4..b16a9bc 100644 --- a/bin/jalview/structure/SecondaryStructureListener.js +++ b/bin/jalview/structure/SecondaryStructureListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "SecondaryStructureListener"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "SecondaryStructureListener"); diff --git a/bin/jalview/structure/SelectionListener.js b/bin/jalview/structure/SelectionListener.js index f7ce6dc..6dc17bd 100644 --- a/bin/jalview/structure/SelectionListener.js +++ b/bin/jalview/structure/SelectionListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "SelectionListener"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "SelectionListener"); diff --git a/bin/jalview/structure/SelectionSource.js b/bin/jalview/structure/SelectionSource.js index 995ec35..7bb91f3 100644 --- a/bin/jalview/structure/SelectionSource.js +++ b/bin/jalview/structure/SelectionSource.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "SelectionSource"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "SelectionSource"); diff --git a/bin/jalview/structure/SequenceListener.js b/bin/jalview/structure/SequenceListener.js index 026c9c1..6ff05ae 100644 --- a/bin/jalview/structure/SequenceListener.js +++ b/bin/jalview/structure/SequenceListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "SequenceListener"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "SequenceListener"); diff --git a/bin/jalview/structure/StructureListener.js b/bin/jalview/structure/StructureListener.js index 47bde4f..e5ea9ef 100644 --- a/bin/jalview/structure/StructureListener.js +++ b/bin/jalview/structure/StructureListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "StructureListener"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "StructureListener"); diff --git a/bin/jalview/structure/StructureMapping.js b/bin/jalview/structure/StructureMapping.js index 8cf2f33..40c774f 100644 --- a/bin/jalview/structure/StructureMapping.js +++ b/bin/jalview/structure/StructureMapping.js @@ -1,69 +1,69 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.load (null, "jalview.structure.StructureMapping", ["jalview.datamodel.AlignmentAnnotation"], function () { -c$ = Clazz.decorateAsClass (function () { -this.mappingDetails = null; -this.sequence = null; -this.pdbfile = null; -this.pdbid = null; -this.pdbchain = null; -this.mapping = null; -Clazz.instantialize (this, arguments); -}, jalview.structure, "StructureMapping"); -Clazz.makeConstructor (c$, -function (seq, pdbfile, pdbid, chain, mapping, mappingDetails) { -this.sequence = seq; -this.pdbfile = pdbfile; -this.pdbid = pdbid; -this.pdbchain = chain; -this.mapping = mapping; -this.mappingDetails = mappingDetails; -}, "jalview.datamodel.SequenceI,~S,~S,~S,~A,~S"); -Clazz.defineMethod (c$, "getSequence", -function () { -return this.sequence; -}); -Clazz.defineMethod (c$, "getChain", -function () { -return this.pdbchain; -}); -Clazz.defineMethod (c$, "getPdbId", -function () { -return this.pdbid; -}); -Clazz.defineMethod (c$, "getAtomNum", -function (seqpos) { -if (this.mapping.length > seqpos) { -return this.mapping[seqpos][1]; -} else { -return 0; -}}, "~N"); -Clazz.defineMethod (c$, "getPDBResNum", -function (seqpos) { -if (this.mapping.length > seqpos) { -return this.mapping[seqpos][0]; -} else { -return 0; -}}, "~N"); -Clazz.defineMethod (c$, "getSeqPos", -function (pdbResNum) { -for (var i = 0; i < this.mapping.length; i++) { -if (this.mapping[i][0] == pdbResNum) { -return i; -}} -return -1; -}, "~N"); -Clazz.defineMethod (c$, "transfer", -function (ana) { -var ala_copy = new jalview.datamodel.AlignmentAnnotation (ana); -var ds = this.sequence; -while (ds.getDatasetSequence () != null) { -ds = ds.getDatasetSequence (); -} -ala_copy.remap (ds, this.mapping, -1, -1, 0); -ds.addAlignmentAnnotation (ala_copy); -if (ds !== this.sequence) { -ala_copy = new jalview.datamodel.AlignmentAnnotation (ala_copy); -this.sequence.addAlignmentAnnotation (ala_copy); -}return ala_copy; -}, "jalview.datamodel.AlignmentAnnotation"); -}); +Clazz.declarePackage ("jalview.structure"); +Clazz.load (null, "jalview.structure.StructureMapping", ["jalview.datamodel.AlignmentAnnotation"], function () { +c$ = Clazz.decorateAsClass (function () { +this.mappingDetails = null; +this.sequence = null; +this.pdbfile = null; +this.pdbid = null; +this.pdbchain = null; +this.mapping = null; +Clazz.instantialize (this, arguments); +}, jalview.structure, "StructureMapping"); +Clazz.makeConstructor (c$, +function (seq, pdbfile, pdbid, chain, mapping, mappingDetails) { +this.sequence = seq; +this.pdbfile = pdbfile; +this.pdbid = pdbid; +this.pdbchain = chain; +this.mapping = mapping; +this.mappingDetails = mappingDetails; +}, "jalview.datamodel.SequenceI,~S,~S,~S,~A,~S"); +Clazz.defineMethod (c$, "getSequence", +function () { +return this.sequence; +}); +Clazz.defineMethod (c$, "getChain", +function () { +return this.pdbchain; +}); +Clazz.defineMethod (c$, "getPdbId", +function () { +return this.pdbid; +}); +Clazz.defineMethod (c$, "getAtomNum", +function (seqpos) { +if (this.mapping.length > seqpos) { +return this.mapping[seqpos][1]; +} else { +return 0; +}}, "~N"); +Clazz.defineMethod (c$, "getPDBResNum", +function (seqpos) { +if (this.mapping.length > seqpos) { +return this.mapping[seqpos][0]; +} else { +return 0; +}}, "~N"); +Clazz.defineMethod (c$, "getSeqPos", +function (pdbResNum) { +for (var i = 0; i < this.mapping.length; i++) { +if (this.mapping[i][0] == pdbResNum) { +return i; +}} +return -1; +}, "~N"); +Clazz.defineMethod (c$, "transfer", +function (ana) { +var ala_copy = new jalview.datamodel.AlignmentAnnotation (ana); +var ds = this.sequence; +while (ds.getDatasetSequence () != null) { +ds = ds.getDatasetSequence (); +} +ala_copy.remap (ds, this.mapping, -1, -1, 0); +ds.addAlignmentAnnotation (ala_copy); +if (ds !== this.sequence) { +ala_copy = new jalview.datamodel.AlignmentAnnotation (ala_copy); +this.sequence.addAlignmentAnnotation (ala_copy); +}return ala_copy; +}, "jalview.datamodel.AlignmentAnnotation"); +}); diff --git a/bin/jalview/structure/StructureMappingcommandSet.js b/bin/jalview/structure/StructureMappingcommandSet.js index 2f615c6..97ef9f5 100644 --- a/bin/jalview/structure/StructureMappingcommandSet.js +++ b/bin/jalview/structure/StructureMappingcommandSet.js @@ -1,13 +1,13 @@ -Clazz.declarePackage ("jalview.structure"); -c$ = Clazz.decorateAsClass (function () { -this.mapping = null; -this.commands = null; -this.handledBy = null; -Clazz.instantialize (this, arguments); -}, jalview.structure, "StructureMappingcommandSet"); -Clazz.makeConstructor (c$, -function (handledBy, files, commands) { -this.mapping = files; -this.handledBy = handledBy; -this.commands = commands; -}, "~O,~S,~A"); +Clazz.declarePackage ("jalview.structure"); +c$ = Clazz.decorateAsClass (function () { +this.mapping = null; +this.commands = null; +this.handledBy = null; +Clazz.instantialize (this, arguments); +}, jalview.structure, "StructureMappingcommandSet"); +Clazz.makeConstructor (c$, +function (handledBy, files, commands) { +this.mapping = files; +this.handledBy = handledBy; +this.commands = commands; +}, "~O,~S,~A"); diff --git a/bin/jalview/structure/StructureSelectionManager.class b/bin/jalview/structure/StructureSelectionManager.class index bd3d0d73848562cbb00e614124a2c29069fe63b2..837803ee881134d8cc75da31be2f2ad145c2fe0d 100644 GIT binary patch delta 91 zcmZ3tm+`<}#tj#37(Z;jWaG%rypBP3vY5*f>HiGg3>@qXjEw9|K*Yq(a0rMP*%_r6 u7$+Ze@n-(dz&_c~Rcy1G>nC 0 && jalview.io.AppletFormatAdapter.FILE.equals (protocol)) { -this.registerPDBFile (pdb.id.trim (), pdbFile); -}} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -return null; -} else { -throw ex; -} -} -var targetChain; -for (var s = 0; s < sequence.length; s++) { -var infChain = true; -var seq = sequence[s]; -if (targetChains != null && targetChains[s] != null) { -infChain = false; -targetChain = targetChains[s]; -} else if (seq.getName ().indexOf ("|") > -1) { -targetChain = seq.getName ().substring (seq.getName ().lastIndexOf ("|") + 1); -if (targetChain.length > 1) { -if (targetChain.trim ().length == 0) { -targetChain = " "; -} else { -targetChain = ""; -}}} else { -targetChain = ""; -}var max = -10; -var maxAlignseq = null; -var maxChainId = " "; -var maxChain = null; -var first = true; -for (var chain, $chain = pdb.chains.iterator (); $chain.hasNext () && ((chain = $chain.next ()) || true);) { -if (targetChain.length > 0 && !targetChain.equals (chain.id) && !infChain) { -continue; -}var type = chain.isNa ? "dna" : "pep"; -var as = jalview.analysis.AlignSeq.doGlobalNWAlignment (seq, chain.sequence, type); -if (first || as.maxscore > max || (as.maxscore == max && chain.id.equals (targetChain))) { -first = false; -maxChain = chain; -max = as.maxscore; -maxAlignseq = as; -maxChainId = chain.id; -}} -if (maxChain == null) { -continue; -}var mappingDetails = new StringBuilder (128); -mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("PDB Sequence is :").append (jalview.structure.StructureSelectionManager.NEWLINE).append ("Sequence = ").append (maxChain.sequence.getSequenceAsString ()); -mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("No of residues = ").append (maxChain.residues.size ()).append (jalview.structure.StructureSelectionManager.NEWLINE).append (jalview.structure.StructureSelectionManager.NEWLINE); -var ps = ((Clazz.isClassDefined ("jalview.structure.StructureSelectionManager$1") ? 0 : jalview.structure.StructureSelectionManager.$StructureSelectionManager$1$ ()), Clazz.innerTypeInstance (jalview.structure.StructureSelectionManager$1, this, Clazz.cloneFinals ("mappingDetails", mappingDetails), System.out)); -maxAlignseq.printAlignment (ps); -mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("PDB start/end "); -mappingDetails.append (String.valueOf (maxAlignseq.seq2start)).append (" "); -mappingDetails.append (String.valueOf (maxAlignseq.seq2end)); -mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("SEQ start/end "); -mappingDetails.append (String.valueOf (maxAlignseq.seq1start + seq.getStart () - 1)).append (" "); -mappingDetails.append (String.valueOf (maxAlignseq.seq1end + seq.getEnd () - 1)); -maxChain.makeExactMapping (maxAlignseq, seq); -var sqmpping = maxAlignseq.getMappingFromS1 (false); -var omap = new jalview.datamodel.Mapping (sqmpping.getMap ().getInverse ()); -maxChain.transferRESNUMFeatures (seq, null); -var mapping = Clazz.newIntArray (seq.findPosition (seq.getLength ()) + 2, 2, 0); -var resNum = -10000; -var index = 0; -do { -var tmp = maxChain.atoms.elementAt (index); -if (resNum != tmp.resNumber && tmp.alignmentMapping != -1) { -resNum = tmp.resNumber; -mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber; -mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex; -}index++; -} while (index < maxChain.atoms.size ()); -if (protocol.equals (jalview.io.AppletFormatAdapter.PASTE)) { -pdbFile = "INLINE" + pdb.id; -}var newMapping = new jalview.structure.StructureMapping (seq, pdbFile, pdb.id, maxChainId, mapping, mappingDetails.toString ()); -if (forStructureView) { -this.mappings.add (newMapping); -}maxChain.transferResidueAnnotation (newMapping, sqmpping); -} -return pdb; -}, "~B,~A,~A,~S,~S"); -Clazz.defineMethod (c$, "removeStructureViewerListener", -function (svl, pdbfiles) { -this.listeners.removeElement (svl); -if (Clazz.instanceOf (svl, jalview.structure.SequenceListener)) { -for (var i = 0; i < this.listeners.size (); i++) { -if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.StructureListener)) { -(this.listeners.elementAt (i)).releaseReferences (svl); -}} -}if (pdbfiles == null) { -return; -}var pdbs = new java.util.ArrayList (java.util.Arrays.asList (pdbfiles)); -var sl; -for (var i = 0; i < this.listeners.size (); i++) { -if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.StructureListener)) { -sl = this.listeners.elementAt (i); -for (var pdbfile, $pdbfile = 0, $$pdbfile = sl.getPdbFile (); $pdbfile < $$pdbfile.length && ((pdbfile = $$pdbfile[$pdbfile]) || true); $pdbfile++) { -pdbs.remove (pdbfile); -} -}} -if (pdbs.size () > 0) { -var tmp = new java.util.ArrayList (); -for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { -if (!pdbs.contains (sm.pdbfile)) { -tmp.add (sm); -}} -this.mappings = tmp; -}}, "~O,~A"); -Clazz.defineMethod (c$, "mouseOverStructure", -function (pdbResNum, chain, pdbfile) { -var atomSpec = new jalview.structure.AtomSpec (pdbfile, chain, pdbResNum, 0); -var atoms = java.util.Collections.singletonList (atomSpec); -this.mouseOverStructure (atoms); -}, "~N,~S,~S"); -Clazz.defineMethod (c$, "mouseOverStructure", -function (atoms) { -if (this.listeners == null) { -return; -}var hasSequenceListener = false; -for (var i = 0; i < this.listeners.size (); i++) { -if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.SequenceListener)) { -hasSequenceListener = true; -}} -if (!hasSequenceListener) { -return; -}var results = new jalview.datamodel.SearchResults (); -for (var atom, $atom = atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { -var lastseq = null; -var lastipos = -1; -for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { -if (sm.pdbfile.equals (atom.getPdbFile ()) && sm.pdbchain.equals (atom.getChain ())) { -var indexpos = sm.getSeqPos (atom.getPdbResNum ()); -if (lastipos != indexpos && lastseq !== sm.sequence) { -results.addResult (sm.sequence, indexpos, indexpos); -lastipos = indexpos; -lastseq = sm.sequence; -for (var acf, $acf = this.seqmappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -acf.markMappedRegion (sm.sequence, indexpos, results); -} -}}} -} -for (var li, $li = this.listeners.iterator (); $li.hasNext () && ((li = $li.next ()) || true);) { -if (Clazz.instanceOf (li, jalview.structure.SequenceListener)) { -(li).highlightSequence (results); -}} -}, "java.util.List"); -Clazz.defineMethod (c$, "mouseOverSequence", -function (seq, indexpos, index, source) { -var hasSequenceListeners = this.handlingVamsasMo || !this.seqmappings.isEmpty (); -var results = null; -if (index == -1) { -index = seq.findPosition (indexpos); -}for (var i = 0; i < this.listeners.size (); i++) { -var listener = this.listeners.elementAt (i); -if (listener === source) { -continue; -}if (Clazz.instanceOf (listener, jalview.structure.StructureListener)) { -this.highlightStructure (listener, seq, index); -} else { -if (Clazz.instanceOf (listener, jalview.structure.SequenceListener)) { -var seqListener = listener; -if (hasSequenceListeners && seqListener.getVamsasSource () !== source) { -if (this.relaySeqMappings) { -if (results == null) { -results = jalview.util.MappingUtils.buildSearchResults (seq, index, this.seqmappings); -}if (this.handlingVamsasMo) { -results.addResult (seq, index, index); -}seqListener.highlightSequence (results); -}}} else if (Clazz.instanceOf (listener, jalview.structure.VamsasListener) && !this.handlingVamsasMo) { -(listener).mouseOverSequence (seq, indexpos, source); -} else if (Clazz.instanceOf (listener, jalview.structure.SecondaryStructureListener)) { -(listener).mouseOverSequence (seq, indexpos, index); -}}} -}, "jalview.datamodel.SequenceI,~N,~N,jalview.structure.VamsasSource"); -Clazz.defineMethod (c$, "highlightStructure", -function (sl, seq, index) { -if (!sl.isListeningFor (seq)) { -return; -}var atomNo; -var atoms = new java.util.ArrayList (); -for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { -if (sm.sequence === seq || sm.sequence === seq.getDatasetSequence ()) { -atomNo = sm.getAtomNum (index); -if (atomNo > 0) { -atoms.add ( new jalview.structure.AtomSpec (sm.pdbfile, sm.pdbchain, sm.getPDBResNum (index), atomNo)); -}}} -sl.highlightAtoms (atoms); -}, "jalview.structure.StructureListener,jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "mouseOverVamsasSequence", -function (sequenceI, position, source) { -this.handlingVamsasMo = true; -var msg = sequenceI.hashCode () * (1 + position); -if (this.lastmsg != msg) { -this.lastmsg = msg; -this.mouseOverSequence (sequenceI, position, -1, source); -}this.handlingVamsasMo = false; -}, "jalview.datamodel.SequenceI,~N,jalview.structure.VamsasSource"); -Clazz.defineMethod (c$, "colourSequenceFromStructure", -function (seq, pdbid) { -return null; -}, "jalview.datamodel.SequenceI,~S"); -Clazz.defineMethod (c$, "structureSelectionChanged", -function () { -}); -Clazz.defineMethod (c$, "sequenceSelectionChanged", -function () { -}); -Clazz.defineMethod (c$, "sequenceColoursChanged", -function (source) { -var sl; -for (var i = 0; i < this.listeners.size (); i++) { -if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.StructureListener)) { -sl = this.listeners.elementAt (i); -sl.updateColours (source); -}} -}, "~O"); -Clazz.defineMethod (c$, "getMapping", -function (pdbfile) { -var tmp = new java.util.ArrayList (); -for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { -if (sm.pdbfile.equals (pdbfile)) { -tmp.add (sm); -}} -return tmp.toArray ( new Array (tmp.size ())); -}, "~S"); -Clazz.defineMethod (c$, "printMappings", -function (pdbfile, seqs) { -if (pdbfile == null || seqs == null || seqs.isEmpty ()) { -return ""; -}var sb = new StringBuilder (64); -for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { -if (sm.pdbfile.equals (pdbfile) && seqs.contains (sm.sequence)) { -sb.append (sm.mappingDetails); -sb.append (jalview.structure.StructureSelectionManager.NEWLINE); -sb.append ("====================="); -sb.append (jalview.structure.StructureSelectionManager.NEWLINE); -}} -sb.append (jalview.structure.StructureSelectionManager.NEWLINE); -return sb.toString (); -}, "~S,java.util.List"); -Clazz.defineMethod (c$, "removeMappings", -function (set) { -if (set != null) { -for (var acf, $acf = set.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -this.removeMapping (acf); -} -}}, "java.util.Set"); -Clazz.defineMethod (c$, "removeMapping", -function (acf) { -if (acf != null && this.seqmappings.contains (acf)) { -var count = (this.seqMappingRefCounts.get (acf)).intValue (); -count--; -if (count > 0) { -this.seqMappingRefCounts.put (acf, new Integer (count)); -} else { -this.seqmappings.remove (acf); -this.seqMappingRefCounts.remove (acf); -}}}, "jalview.datamodel.AlignedCodonFrame"); -Clazz.defineMethod (c$, "addMappings", -function (set) { -if (set != null) { -for (var acf, $acf = set.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -this.addMapping (acf); -} -}}, "java.util.Set"); -Clazz.defineMethod (c$, "addMapping", -function (acf) { -if (acf != null) { -if (this.seqmappings.contains (acf)) { -this.seqMappingRefCounts.put (acf, new Integer ((this.seqMappingRefCounts.get (acf)).intValue () + 1)); -} else { -this.seqmappings.add (acf); -this.seqMappingRefCounts.put (acf, new Integer (1)); -}}}, "jalview.datamodel.AlignedCodonFrame"); -Clazz.defineMethod (c$, "addSelectionListener", -function (selecter) { -if (!this.sel_listeners.contains (selecter)) { -this.sel_listeners.add (selecter); -}}, "jalview.structure.SelectionListener"); -Clazz.defineMethod (c$, "removeSelectionListener", -function (toremove) { -if (this.sel_listeners.contains (toremove)) { -this.sel_listeners.remove (toremove); -}}, "jalview.structure.SelectionListener"); -Clazz.defineMethod (c$, "sendSelection", -function (selection, colsel, source) { -for (var slis, $slis = this.sel_listeners.iterator (); $slis.hasNext () && ((slis = $slis.next ()) || true);) { -if (slis !== source) { -slis.selection (selection, colsel, source); -}} -}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); -Clazz.defineMethod (c$, "sendViewPosition", -function (source, startRes, endRes, startSeq, endSeq) { -if (this.view_listeners != null && this.view_listeners.size () > 0) { -var listeners = this.view_listeners.elements (); -while (listeners.hasMoreElements ()) { -var slis = listeners.nextElement (); -if (slis !== source) { -slis.viewPosition (startRes, endRes, startSeq, endSeq, source); -};} -}}, "jalview.api.AlignmentViewPanel,~N,~N,~N,~N"); -c$.release = Clazz.defineMethod (c$, "release", -function (jalviewLite) { -{ -if (jalview.structure.StructureSelectionManager.instances == null) { -return; -}var mnger = (jalview.structure.StructureSelectionManager.instances.get (jalviewLite)); -if (mnger != null) { -jalview.structure.StructureSelectionManager.instances.remove (jalviewLite); -try { -mnger.finalize (); -} catch (x) { -} -}}}, "jalview.api.StructureSelectionManagerProvider"); -Clazz.defineMethod (c$, "registerPDBEntry", -function (pdbentry) { -if (pdbentry.getFile () != null && pdbentry.getFile ().trim ().length > 0) { -this.registerPDBFile (pdbentry.getId (), pdbentry.getFile ()); -}}, "jalview.datamodel.PDBEntry"); -Clazz.defineMethod (c$, "addCommandListener", -function (cl) { -if (!this.commandListeners.contains (cl)) { -this.commandListeners.add (cl); -}}, "jalview.structure.CommandListener"); -Clazz.defineMethod (c$, "hasCommandListener", -function (cl) { -return this.commandListeners.contains (cl); -}, "jalview.structure.CommandListener"); -Clazz.defineMethod (c$, "removeCommandListener", -function (l) { -return this.commandListeners.remove (l); -}, "jalview.structure.CommandListener"); -Clazz.defineMethod (c$, "commandPerformed", -function (command, undo, source) { -for (var listener, $listener = this.commandListeners.iterator (); $listener.hasNext () && ((listener = $listener.next ()) || true);) { -listener.mirrorCommand (command, undo, this, source); -} -}, "jalview.commands.CommandI,~B,jalview.structure.VamsasSource"); -Clazz.defineMethod (c$, "mapCommand", -function (command, undo, mapTo, gapChar) { -if (Clazz.instanceOf (command, jalview.commands.EditCommand)) { -return jalview.util.MappingUtils.mapEditCommand (command, undo, mapTo, gapChar, this.seqmappings); -} else if (Clazz.instanceOf (command, jalview.commands.OrderCommand)) { -return jalview.util.MappingUtils.mapOrderCommand (command, undo, mapTo, this.seqmappings); -}return null; -}, "jalview.commands.CommandI,~B,jalview.datamodel.AlignmentI,~S"); -c$.$StructureSelectionManager$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.structure, "StructureSelectionManager$1", java.io.PrintStream); -Clazz.defineMethod (c$, "print", -function (x) { -this.f$.mappingDetails.append (x); -}, "~S"); -Clazz.defineMethod (c$, "println", -function () { -this.f$.mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE); -}); -c$ = Clazz.p0p (); -}; -c$.NEWLINE = c$.prototype.NEWLINE = System.lineSeparator (); -Clazz.defineStatics (c$, -"instances", null, -"nullProvider", null); -}); +Clazz.declarePackage ("jalview.structure"); +Clazz.load (["java.util.ArrayList", "$.HashMap", "$.LinkedHashSet", "$.Vector"], "jalview.structure.StructureSelectionManager", ["MCview.PDBfile", "jalview.analysis.AlignSeq", "jalview.commands.EditCommand", "$.OrderCommand", "jalview.datamodel.Mapping", "$.SearchResults", "jalview.io.AppletFormatAdapter", "jalview.structure.AtomSpec", "$.SecondaryStructureListener", "$.SequenceListener", "$.StructureListener", "$.StructureMapping", "$.VamsasListener", "jalview.util.MappingUtils", "$.MessageManager", "java.lang.Error", "$.NullPointerException", "$.StringBuilder", "java.util.Arrays", "$.Collections", "$.IdentityHashMap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.mappings = null; +this.processSecondaryStructure = false; +this.secStructServices = false; +this.addTempFacAnnot = false; +this.seqmappings = null; +this.seqMappingRefCounts = null; +this.commandListeners = null; +this.sel_listeners = null; +this.pdbIdFileName = null; +this.pdbFileNameId = null; +this.relaySeqMappings = true; +this.listeners = null; +this.handlingVamsasMo = false; +this.lastmsg = 0; +this.view_listeners = null; +Clazz.instantialize (this, arguments); +}, jalview.structure, "StructureSelectionManager"); +Clazz.prepareFields (c$, function () { +this.mappings = new java.util.ArrayList (); +this.seqmappings = new java.util.LinkedHashSet (); +this.seqMappingRefCounts = new java.util.HashMap (); +this.commandListeners = new java.util.ArrayList (); +this.sel_listeners = new java.util.ArrayList (); +this.pdbIdFileName = new java.util.HashMap (); +this.pdbFileNameId = new java.util.HashMap (); +this.listeners = new java.util.Vector (); +this.view_listeners = new java.util.Vector (); +}); +Clazz.defineMethod (c$, "isSecStructServices", +function () { +return this.secStructServices; +}); +Clazz.defineMethod (c$, "setSecStructServices", +function (secStructServices) { +this.secStructServices = secStructServices; +}, "~B"); +Clazz.defineMethod (c$, "isAddTempFacAnnot", +function () { +return this.addTempFacAnnot; +}); +Clazz.defineMethod (c$, "setAddTempFacAnnot", +function (addTempFacAnnot) { +this.addTempFacAnnot = addTempFacAnnot; +}, "~B"); +Clazz.defineMethod (c$, "isProcessSecondaryStructure", +function () { +return this.processSecondaryStructure; +}); +Clazz.defineMethod (c$, "setProcessSecondaryStructure", +function (enable) { +this.processSecondaryStructure = enable; +}, "~B"); +Clazz.defineMethod (c$, "reportMapping", +function () { +if (this.mappings.isEmpty ()) { +System.err.println ("reportMapping: No PDB/Sequence mappings."); +} else { +System.err.println ("reportMapping: There are " + this.mappings.size () + " mappings."); +var i = 0; +for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { +System.err.println ("mapping " + i++ + " : " + sm.pdbfile); +} +}}); +Clazz.defineMethod (c$, "registerPDBFile", +function (idForFile, absoluteFile) { +this.pdbIdFileName.put (idForFile, absoluteFile); +this.pdbFileNameId.put (absoluteFile, idForFile); +}, "~S,~S"); +Clazz.defineMethod (c$, "findIdForPDBFile", +function (idOrFile) { +var id = this.pdbFileNameId.get (idOrFile); +return id; +}, "~S"); +Clazz.defineMethod (c$, "findFileForPDBId", +function (idOrFile) { +var id = this.pdbIdFileName.get (idOrFile); +return id; +}, "~S"); +Clazz.defineMethod (c$, "isPDBFileRegistered", +function (idOrFile) { +return this.pdbFileNameId.containsKey (idOrFile) || this.pdbIdFileName.containsKey (idOrFile); +}, "~S"); +c$.getStructureSelectionManager = Clazz.defineMethod (c$, "getStructureSelectionManager", +function (context) { +if (context == null) { +if (jalview.structure.StructureSelectionManager.nullProvider == null) { +if (jalview.structure.StructureSelectionManager.instances != null) { +throw new Error (jalview.util.MessageManager.getString ("error.implementation_error_structure_selection_manager_null"), new NullPointerException (jalview.util.MessageManager.getString ("exception.ssm_context_is_null"))); +} else { +jalview.structure.StructureSelectionManager.nullProvider = new jalview.structure.StructureSelectionManager (); +}return jalview.structure.StructureSelectionManager.nullProvider; +}}if (jalview.structure.StructureSelectionManager.instances == null) { +jalview.structure.StructureSelectionManager.instances = new java.util.IdentityHashMap (); +}var instance = jalview.structure.StructureSelectionManager.instances.get (context); +if (instance == null) { +if (jalview.structure.StructureSelectionManager.nullProvider != null) { +instance = jalview.structure.StructureSelectionManager.nullProvider; +} else { +instance = new jalview.structure.StructureSelectionManager (); +}jalview.structure.StructureSelectionManager.instances.put (context, instance); +}return instance; +}, "jalview.api.StructureSelectionManagerProvider"); +Clazz.defineMethod (c$, "setRelaySeqMappings", +function (relay) { +this.relaySeqMappings = relay; +}, "~B"); +Clazz.defineMethod (c$, "isRelaySeqMappingsEnabled", +function () { +return this.relaySeqMappings; +}); +Clazz.defineMethod (c$, "addStructureViewerListener", +function (svl) { +if (!this.listeners.contains (svl)) { +this.listeners.addElement (svl); +}}, "~O"); +Clazz.defineMethod (c$, "alreadyMappedToFile", +function (pdbid) { +for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { +if (sm.getPdbId ().equals (pdbid)) { +return sm.pdbfile; +}} +return null; +}, "~S"); +Clazz.defineMethod (c$, "setMapping", +function (sequence, targetChains, pdbFile, protocol) { +return this.setMapping (true, sequence, targetChains, pdbFile, protocol); +}, "~A,~A,~S,~S"); +Clazz.defineMethod (c$, "setMapping", +function (forStructureView, sequence, targetChains, pdbFile, protocol) { +var parseSecStr = this.processSecondaryStructure; +if (this.isPDBFileRegistered (pdbFile)) { +for (var sq, $sq = 0, $$sq = sequence; $sq < $$sq.length && ((sq = $$sq[$sq]) || true); $sq++) { +var ds = sq; +while (ds.getDatasetSequence () != null) { +ds = ds.getDatasetSequence (); +} +;if (ds.getAnnotation () != null) { +for (var ala, $ala = 0, $$ala = ds.getAnnotation (); $ala < $$ala.length && ((ala = $$ala[$ala]) || true); $ala++) { +if (MCview.PDBfile.isCalcIdForFile (ala, this.findIdForPDBFile (pdbFile))) { +parseSecStr = false; +}} +}} +}var pdb = null; +try { +pdb = new MCview.PDBfile (this.addTempFacAnnot, parseSecStr, this.secStructServices, pdbFile, protocol); +if (pdb.id != null && pdb.id.trim ().length > 0 && jalview.io.AppletFormatAdapter.FILE.equals (protocol)) { +this.registerPDBFile (pdb.id.trim (), pdbFile); +}} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +return null; +} else { +throw ex; +} +} +var targetChain; +for (var s = 0; s < sequence.length; s++) { +var infChain = true; +var seq = sequence[s]; +if (targetChains != null && targetChains[s] != null) { +infChain = false; +targetChain = targetChains[s]; +} else if (seq.getName ().indexOf ("|") > -1) { +targetChain = seq.getName ().substring (seq.getName ().lastIndexOf ("|") + 1); +if (targetChain.length > 1) { +if (targetChain.trim ().length == 0) { +targetChain = " "; +} else { +targetChain = ""; +}}} else { +targetChain = ""; +}var max = -10; +var maxAlignseq = null; +var maxChainId = " "; +var maxChain = null; +var first = true; +for (var chain, $chain = pdb.chains.iterator (); $chain.hasNext () && ((chain = $chain.next ()) || true);) { +if (targetChain.length > 0 && !targetChain.equals (chain.id) && !infChain) { +continue; +}var type = chain.isNa ? "dna" : "pep"; +var as = jalview.analysis.AlignSeq.doGlobalNWAlignment (seq, chain.sequence, type); +if (first || as.maxscore > max || (as.maxscore == max && chain.id.equals (targetChain))) { +first = false; +maxChain = chain; +max = as.maxscore; +maxAlignseq = as; +maxChainId = chain.id; +}} +if (maxChain == null) { +continue; +}var mappingDetails = new StringBuilder (128); +mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("PDB Sequence is :").append (jalview.structure.StructureSelectionManager.NEWLINE).append ("Sequence = ").append (maxChain.sequence.getSequenceAsString ()); +mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("No of residues = ").append (maxChain.residues.size ()).append (jalview.structure.StructureSelectionManager.NEWLINE).append (jalview.structure.StructureSelectionManager.NEWLINE); +var ps = ((Clazz.isClassDefined ("jalview.structure.StructureSelectionManager$1") ? 0 : jalview.structure.StructureSelectionManager.$StructureSelectionManager$1$ ()), Clazz.innerTypeInstance (jalview.structure.StructureSelectionManager$1, this, Clazz.cloneFinals ("mappingDetails", mappingDetails), System.out)); +maxAlignseq.printAlignment (ps); +mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("PDB start/end "); +mappingDetails.append (String.valueOf (maxAlignseq.seq2start)).append (" "); +mappingDetails.append (String.valueOf (maxAlignseq.seq2end)); +mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE).append ("SEQ start/end "); +mappingDetails.append (String.valueOf (maxAlignseq.seq1start + seq.getStart () - 1)).append (" "); +mappingDetails.append (String.valueOf (maxAlignseq.seq1end + seq.getEnd () - 1)); +maxChain.makeExactMapping (maxAlignseq, seq); +var sqmpping = maxAlignseq.getMappingFromS1 (false); +var omap = new jalview.datamodel.Mapping (sqmpping.getMap ().getInverse ()); +maxChain.transferRESNUMFeatures (seq, null); +var mapping = Clazz.newIntArray (seq.findPosition (seq.getLength ()) + 2, 2, 0); +var resNum = -10000; +var index = 0; +do { +var tmp = maxChain.atoms.elementAt (index); +if (resNum != tmp.resNumber && tmp.alignmentMapping != -1) { +resNum = tmp.resNumber; +mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber; +mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex; +}index++; +} while (index < maxChain.atoms.size ()); +if (protocol.equals (jalview.io.AppletFormatAdapter.PASTE)) { +pdbFile = "INLINE" + pdb.id; +}var newMapping = new jalview.structure.StructureMapping (seq, pdbFile, pdb.id, maxChainId, mapping, mappingDetails.toString ()); +if (forStructureView) { +this.mappings.add (newMapping); +}maxChain.transferResidueAnnotation (newMapping, sqmpping); +} +return pdb; +}, "~B,~A,~A,~S,~S"); +Clazz.defineMethod (c$, "removeStructureViewerListener", +function (svl, pdbfiles) { +this.listeners.removeElement (svl); +if (Clazz.instanceOf (svl, jalview.structure.SequenceListener)) { +for (var i = 0; i < this.listeners.size (); i++) { +if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.StructureListener)) { +(this.listeners.elementAt (i)).releaseReferences (svl); +}} +}if (pdbfiles == null) { +return; +}var pdbs = new java.util.ArrayList (java.util.Arrays.asList (pdbfiles)); +var sl; +for (var i = 0; i < this.listeners.size (); i++) { +if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.StructureListener)) { +sl = this.listeners.elementAt (i); +for (var pdbfile, $pdbfile = 0, $$pdbfile = sl.getPdbFile (); $pdbfile < $$pdbfile.length && ((pdbfile = $$pdbfile[$pdbfile]) || true); $pdbfile++) { +pdbs.remove (pdbfile); +} +}} +if (pdbs.size () > 0) { +var tmp = new java.util.ArrayList (); +for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { +if (!pdbs.contains (sm.pdbfile)) { +tmp.add (sm); +}} +this.mappings = tmp; +}}, "~O,~A"); +Clazz.defineMethod (c$, "mouseOverStructure", +function (pdbResNum, chain, pdbfile) { +var atomSpec = new jalview.structure.AtomSpec (pdbfile, chain, pdbResNum, 0); +var atoms = java.util.Collections.singletonList (atomSpec); +this.mouseOverStructure (atoms); +}, "~N,~S,~S"); +Clazz.defineMethod (c$, "mouseOverStructure", +function (atoms) { +if (this.listeners == null) { +return; +}var hasSequenceListener = false; +for (var i = 0; i < this.listeners.size (); i++) { +if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.SequenceListener)) { +hasSequenceListener = true; +}} +if (!hasSequenceListener) { +return; +}var results = new jalview.datamodel.SearchResults (); +for (var atom, $atom = atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { +var lastseq = null; +var lastipos = -1; +for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { +if (sm.pdbfile.equals (atom.getPdbFile ()) && sm.pdbchain.equals (atom.getChain ())) { +var indexpos = sm.getSeqPos (atom.getPdbResNum ()); +if (lastipos != indexpos && lastseq !== sm.sequence) { +results.addResult (sm.sequence, indexpos, indexpos); +lastipos = indexpos; +lastseq = sm.sequence; +for (var acf, $acf = this.seqmappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +acf.markMappedRegion (sm.sequence, indexpos, results); +} +}}} +} +for (var li, $li = this.listeners.iterator (); $li.hasNext () && ((li = $li.next ()) || true);) { +if (Clazz.instanceOf (li, jalview.structure.SequenceListener)) { +(li).highlightSequence (results); +}} +}, "java.util.List"); +Clazz.defineMethod (c$, "mouseOverSequence", +function (seq, indexpos, index, source) { +var hasSequenceListeners = this.handlingVamsasMo || !this.seqmappings.isEmpty (); +var results = null; +if (index == -1) { +index = seq.findPosition (indexpos); +}for (var i = 0; i < this.listeners.size (); i++) { +var listener = this.listeners.elementAt (i); +if (listener === source) { +continue; +}if (Clazz.instanceOf (listener, jalview.structure.StructureListener)) { +this.highlightStructure (listener, seq, index); +} else { +if (Clazz.instanceOf (listener, jalview.structure.SequenceListener)) { +var seqListener = listener; +if (hasSequenceListeners && seqListener.getVamsasSource () !== source) { +if (this.relaySeqMappings) { +if (results == null) { +results = jalview.util.MappingUtils.buildSearchResults (seq, index, this.seqmappings); +}if (this.handlingVamsasMo) { +results.addResult (seq, index, index); +}seqListener.highlightSequence (results); +}}} else if (Clazz.instanceOf (listener, jalview.structure.VamsasListener) && !this.handlingVamsasMo) { +(listener).mouseOverSequence (seq, indexpos, source); +} else if (Clazz.instanceOf (listener, jalview.structure.SecondaryStructureListener)) { +(listener).mouseOverSequence (seq, indexpos, index); +}}} +}, "jalview.datamodel.SequenceI,~N,~N,jalview.structure.VamsasSource"); +Clazz.defineMethod (c$, "highlightStructure", +function (sl, seq, index) { +if (!sl.isListeningFor (seq)) { +return; +}var atomNo; +var atoms = new java.util.ArrayList (); +for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { +if (sm.sequence === seq || sm.sequence === seq.getDatasetSequence ()) { +atomNo = sm.getAtomNum (index); +if (atomNo > 0) { +atoms.add ( new jalview.structure.AtomSpec (sm.pdbfile, sm.pdbchain, sm.getPDBResNum (index), atomNo)); +}}} +sl.highlightAtoms (atoms); +}, "jalview.structure.StructureListener,jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "mouseOverVamsasSequence", +function (sequenceI, position, source) { +this.handlingVamsasMo = true; +var msg = sequenceI.hashCode () * (1 + position); +if (this.lastmsg != msg) { +this.lastmsg = msg; +this.mouseOverSequence (sequenceI, position, -1, source); +}this.handlingVamsasMo = false; +}, "jalview.datamodel.SequenceI,~N,jalview.structure.VamsasSource"); +Clazz.defineMethod (c$, "colourSequenceFromStructure", +function (seq, pdbid) { +return null; +}, "jalview.datamodel.SequenceI,~S"); +Clazz.defineMethod (c$, "structureSelectionChanged", +function () { +}); +Clazz.defineMethod (c$, "sequenceSelectionChanged", +function () { +}); +Clazz.defineMethod (c$, "sequenceColoursChanged", +function (source) { +var sl; +for (var i = 0; i < this.listeners.size (); i++) { +if (Clazz.instanceOf (this.listeners.elementAt (i), jalview.structure.StructureListener)) { +sl = this.listeners.elementAt (i); +sl.updateColours (source); +}} +}, "~O"); +Clazz.defineMethod (c$, "getMapping", +function (pdbfile) { +var tmp = new java.util.ArrayList (); +for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { +if (sm.pdbfile.equals (pdbfile)) { +tmp.add (sm); +}} +return tmp.toArray ( new Array (tmp.size ())); +}, "~S"); +Clazz.defineMethod (c$, "printMappings", +function (pdbfile, seqs) { +if (pdbfile == null || seqs == null || seqs.isEmpty ()) { +return ""; +}var sb = new StringBuilder (64); +for (var sm, $sm = this.mappings.iterator (); $sm.hasNext () && ((sm = $sm.next ()) || true);) { +if (sm.pdbfile.equals (pdbfile) && seqs.contains (sm.sequence)) { +sb.append (sm.mappingDetails); +sb.append (jalview.structure.StructureSelectionManager.NEWLINE); +sb.append ("====================="); +sb.append (jalview.structure.StructureSelectionManager.NEWLINE); +}} +sb.append (jalview.structure.StructureSelectionManager.NEWLINE); +return sb.toString (); +}, "~S,java.util.List"); +Clazz.defineMethod (c$, "removeMappings", +function (set) { +if (set != null) { +for (var acf, $acf = set.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +this.removeMapping (acf); +} +}}, "java.util.Set"); +Clazz.defineMethod (c$, "removeMapping", +function (acf) { +if (acf != null && this.seqmappings.contains (acf)) { +var count = (this.seqMappingRefCounts.get (acf)).intValue (); +count--; +if (count > 0) { +this.seqMappingRefCounts.put (acf, new Integer (count)); +} else { +this.seqmappings.remove (acf); +this.seqMappingRefCounts.remove (acf); +}}}, "jalview.datamodel.AlignedCodonFrame"); +Clazz.defineMethod (c$, "addMappings", +function (set) { +if (set != null) { +for (var acf, $acf = set.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +this.addMapping (acf); +} +}}, "java.util.Set"); +Clazz.defineMethod (c$, "addMapping", +function (acf) { +if (acf != null) { +if (this.seqmappings.contains (acf)) { +this.seqMappingRefCounts.put (acf, new Integer ((this.seqMappingRefCounts.get (acf)).intValue () + 1)); +} else { +this.seqmappings.add (acf); +this.seqMappingRefCounts.put (acf, new Integer (1)); +}}}, "jalview.datamodel.AlignedCodonFrame"); +Clazz.defineMethod (c$, "addSelectionListener", +function (selecter) { +if (!this.sel_listeners.contains (selecter)) { +this.sel_listeners.add (selecter); +}}, "jalview.structure.SelectionListener"); +Clazz.defineMethod (c$, "removeSelectionListener", +function (toremove) { +if (this.sel_listeners.contains (toremove)) { +this.sel_listeners.remove (toremove); +}}, "jalview.structure.SelectionListener"); +Clazz.defineMethod (c$, "sendSelection", +function (selection, colsel, source) { +for (var slis, $slis = this.sel_listeners.iterator (); $slis.hasNext () && ((slis = $slis.next ()) || true);) { +if (slis !== source) { +slis.selection (selection, colsel, source); +}} +}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource"); +Clazz.defineMethod (c$, "sendViewPosition", +function (source, startRes, endRes, startSeq, endSeq) { +if (this.view_listeners != null && this.view_listeners.size () > 0) { +var listeners = this.view_listeners.elements (); +while (listeners.hasMoreElements ()) { +var slis = listeners.nextElement (); +if (slis !== source) { +slis.viewPosition (startRes, endRes, startSeq, endSeq, source); +};} +}}, "jalview.api.AlignmentViewPanel,~N,~N,~N,~N"); +c$.release = Clazz.defineMethod (c$, "release", +function (jalviewLite) { +{ +if (jalview.structure.StructureSelectionManager.instances == null) { +return; +}var mnger = (jalview.structure.StructureSelectionManager.instances.get (jalviewLite)); +if (mnger != null) { +jalview.structure.StructureSelectionManager.instances.remove (jalviewLite); +try { +mnger.finalize (); +} catch (x) { +} +}}}, "jalview.api.StructureSelectionManagerProvider"); +Clazz.defineMethod (c$, "registerPDBEntry", +function (pdbentry) { +if (pdbentry.getFile () != null && pdbentry.getFile ().trim ().length > 0) { +this.registerPDBFile (pdbentry.getId (), pdbentry.getFile ()); +}}, "jalview.datamodel.PDBEntry"); +Clazz.defineMethod (c$, "addCommandListener", +function (cl) { +if (!this.commandListeners.contains (cl)) { +this.commandListeners.add (cl); +}}, "jalview.structure.CommandListener"); +Clazz.defineMethod (c$, "hasCommandListener", +function (cl) { +return this.commandListeners.contains (cl); +}, "jalview.structure.CommandListener"); +Clazz.defineMethod (c$, "removeCommandListener", +function (l) { +return this.commandListeners.remove (l); +}, "jalview.structure.CommandListener"); +Clazz.defineMethod (c$, "commandPerformed", +function (command, undo, source) { +for (var listener, $listener = this.commandListeners.iterator (); $listener.hasNext () && ((listener = $listener.next ()) || true);) { +listener.mirrorCommand (command, undo, this, source); +} +}, "jalview.commands.CommandI,~B,jalview.structure.VamsasSource"); +Clazz.defineMethod (c$, "mapCommand", +function (command, undo, mapTo, gapChar) { +if (Clazz.instanceOf (command, jalview.commands.EditCommand)) { +return jalview.util.MappingUtils.mapEditCommand (command, undo, mapTo, gapChar, this.seqmappings); +} else if (Clazz.instanceOf (command, jalview.commands.OrderCommand)) { +return jalview.util.MappingUtils.mapOrderCommand (command, undo, mapTo, this.seqmappings); +}return null; +}, "jalview.commands.CommandI,~B,jalview.datamodel.AlignmentI,~S"); +c$.$StructureSelectionManager$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.structure, "StructureSelectionManager$1", java.io.PrintStream); +Clazz.defineMethod (c$, "print", +function (x) { +this.f$.mappingDetails.append (x); +}, "~S"); +Clazz.defineMethod (c$, "println", +function () { +this.f$.mappingDetails.append (jalview.structure.StructureSelectionManager.NEWLINE); +}); +c$ = Clazz.p0p (); +}; +c$.NEWLINE = c$.prototype.NEWLINE = System.lineSeparator (); +Clazz.defineStatics (c$, +"instances", null, +"nullProvider", null); +}); diff --git a/bin/jalview/structure/VamsasListener.js b/bin/jalview/structure/VamsasListener.js index 4d4fcbc..3e2c764 100644 --- a/bin/jalview/structure/VamsasListener.js +++ b/bin/jalview/structure/VamsasListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "VamsasListener"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "VamsasListener"); diff --git a/bin/jalview/structure/VamsasSource.js b/bin/jalview/structure/VamsasSource.js index a910ac7..6654402 100644 --- a/bin/jalview/structure/VamsasSource.js +++ b/bin/jalview/structure/VamsasSource.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("jalview.structure"); -Clazz.declareInterface (jalview.structure, "VamsasSource"); +Clazz.declarePackage ("jalview.structure"); +Clazz.declareInterface (jalview.structure, "VamsasSource"); diff --git a/bin/jalview/structures/models/AAStructureBindingModel.class b/bin/jalview/structures/models/AAStructureBindingModel.class index 41ab261b7e6b1674a1a5f2fc883ad9dcf6e1cd9c..db598fb0e8e085ce29faa788a88d1009d6823246 100644 GIT binary patch delta 92 zcmcZ}`!;sNO*ux-&9~%kGl}Oi2=hq&V^C*jaA0RR0YrZo_!upDHlI~|z{$kKwt2mF r4kPnS2F}THx?a-%8CV&(*clkv8O&H%fI5H-2SyN&fpK$=ZZ;zT2`v_9 delta 70 zcmaDGdp&l;O*uxd&9~%kGfCtzi10}LV^C*jaA0RR0YrZo_!uoYnKqwMe89=X_JGXelt4HirQ diff --git a/bin/jalview/structures/models/AAStructureBindingModel.js b/bin/jalview/structures/models/AAStructureBindingModel.js index f64bb34..a66cb14 100644 --- a/bin/jalview/structures/models/AAStructureBindingModel.js +++ b/bin/jalview/structures/models/AAStructureBindingModel.js @@ -1,306 +1,306 @@ -Clazz.declarePackage ("jalview.structures.models"); -Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.structure.StructureListener", "jalview.structures.models.SequenceStructureBindingModel"], "jalview.structures.models.AAStructureBindingModel", ["jalview.util.Comparison", "$.MessageManager", "java.lang.Error", "$.StringBuilder", "java.util.ArrayList", "$.Arrays"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ssm = null; -this.pdbEntry = null; -this.sequence = null; -this.chains = null; -this.protocol = null; -this.colourBySequence = true; -this.nucleotide = false; -if (!Clazz.isClassDefined ("jalview.structures.models.AAStructureBindingModel.SuperposeData")) { -jalview.structures.models.AAStructureBindingModel.$AAStructureBindingModel$SuperposeData$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.structures.models, "AAStructureBindingModel", jalview.structures.models.SequenceStructureBindingModel, [jalview.structure.StructureListener, jalview.api.StructureSelectionManagerProvider]); -Clazz.makeConstructor (c$, -function (ssm, seqs) { -Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); -this.ssm = ssm; -this.sequence = seqs; -}, "jalview.structure.StructureSelectionManager,~A"); -Clazz.makeConstructor (c$, -function (ssm, pdbentry, sequenceIs, chains, protocol) { -Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); -this.ssm = ssm; -this.sequence = sequenceIs; -this.nucleotide = jalview.util.Comparison.isNucleotide2 (sequenceIs); -this.chains = chains; -this.pdbEntry = pdbentry; -this.protocol = protocol; -if (chains == null) { -this.chains = new Array (pdbentry.length); -}}, "jalview.structure.StructureSelectionManager,~A,~A,~A,~S"); -Clazz.defineMethod (c$, "getSsm", -function () { -return this.ssm; -}); -Clazz.defineMethod (c$, "getPdbEntry", -function (i) { -return (this.pdbEntry != null && this.pdbEntry.length > i) ? this.pdbEntry[i] : null; -}, "~N"); -Clazz.defineMethod (c$, "hasPdbId", -function (pdbId) { -if (this.pdbEntry != null) { -for (var pdb, $pdb = 0, $$pdb = this.pdbEntry; $pdb < $$pdb.length && ((pdb = $$pdb[$pdb]) || true); $pdb++) { -if (pdb.getId ().equals (pdbId)) { -return true; -}} -}return false; -}, "~S"); -Clazz.defineMethod (c$, "getPdbCount", -function () { -return this.pdbEntry == null ? 0 : this.pdbEntry.length; -}); -Clazz.defineMethod (c$, "getSequence", -function () { -return this.sequence; -}); -Clazz.defineMethod (c$, "getChains", -function () { -return this.chains; -}); -Clazz.defineMethod (c$, "getProtocol", -function () { -return this.protocol; -}); -Clazz.defineMethod (c$, "setPdbentry", -function (pdbentry) { -this.pdbEntry = pdbentry; -}, "~A"); -Clazz.defineMethod (c$, "setSequence", -function (sequence) { -this.sequence = sequence; -}, "~A"); -Clazz.defineMethod (c$, "setChains", -function (chains) { -this.chains = chains; -}, "~A"); -Clazz.defineMethod (c$, "getViewerTitle", -function (viewerName, verbose) { -if (this.getSequence () == null || this.getSequence ().length < 1 || this.getPdbCount () < 1 || this.getSequence ()[0].length < 1) { -return ("Jalview " + viewerName + " Window"); -}var title = new StringBuilder (64); -var pdbEntry = this.getPdbEntry (0); -title.append (viewerName + " view for " + this.getSequence ()[0][0].getName () + ":" + pdbEntry.getId ()); -if (verbose) { -if (pdbEntry.getProperty () != null) { -if (pdbEntry.getProperty ().get ("method") != null) { -title.append (" Method: "); -title.append (pdbEntry.getProperty ().get ("method")); -}if (pdbEntry.getProperty ().get ("chains") != null) { -title.append (" Chain:"); -title.append (pdbEntry.getProperty ().get ("chains")); -}}}return title.toString (); -}, "~S,~B"); -Clazz.defineMethod (c$, "releaseUIResources", -function () { -}); -Clazz.defineMethod (c$, "isColourBySequence", -function () { -return this.colourBySequence; -}); -Clazz.defineMethod (c$, "setColourBySequence", -function (colourBySequence) { -this.colourBySequence = colourBySequence; -}, "~B"); -Clazz.defineMethod (c$, "addSequenceAndChain", -function (pe, seq, tchain) { -if (pe < 0 || pe >= this.getPdbCount ()) { -throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_no_pdbentry_from_index", Clazz.newArray (-1, [Integer.$valueOf (pe).toString ()]))); -}var nullChain = "TheNullChain"; -var s = new java.util.ArrayList (); -var c = new java.util.ArrayList (); -if (this.getChains () == null) { -this.setChains ( new Array (this.getPdbCount ())); -}if (this.getSequence ()[pe] != null) { -for (var i = 0; i < this.getSequence ()[pe].length; i++) { -s.add (this.getSequence ()[pe][i]); -if (this.getChains ()[pe] != null) { -if (i < this.getChains ()[pe].length) { -c.add (this.getChains ()[pe][i]); -} else { -c.add ("TheNullChain"); -}} else { -if (tchain != null && tchain.length > 0) { -c.add ("TheNullChain"); -}}} -}for (var i = 0; i < seq.length; i++) { -if (!s.contains (seq[i])) { -s.add (seq[i]); -if (tchain != null && i < tchain.length) { -c.add (tchain[i] == null ? "TheNullChain" : tchain[i]); -}}} -var tmp = s.toArray ( new Array (s.size ())); -this.getSequence ()[pe] = tmp; -if (c.size () > 0) { -var tch = c.toArray ( new Array (c.size ())); -for (var i = 0; i < tch.length; i++) { -if (tch[i] === "TheNullChain") { -tch[i] = null; -}} -this.getChains ()[pe] = tch; -} else { -this.getChains ()[pe] = null; -}}, "~N,~A,~A"); -Clazz.defineMethod (c$, "addSequenceAndChain", -function (pdbe, seq, chns) { -var v = new java.util.ArrayList (); -var rtn = new java.util.ArrayList (); -for (var i = 0; i < this.getPdbCount (); i++) { -v.add (this.getPdbEntry (i)); -} -for (var i = 0; i < pdbe.length; i++) { -var r = v.indexOf (pdbe[i]); -if (r == -1 || r >= this.getPdbCount ()) { -rtn.add ( Clazz.newIntArray (-1, [v.size (), i])); -v.add (pdbe[i]); -} else { -this.addSequenceAndChain (r, seq[i], chns[i]); -}} -pdbe = v.toArray ( new Array (v.size ())); -this.setPdbentry (pdbe); -if (rtn.size () > 0) { -var sqs = new Array (this.getPdbCount ()); -var sch = new Array (this.getPdbCount ()); -System.arraycopy (this.getSequence (), 0, sqs, 0, this.getSequence ().length); -System.arraycopy (this.getChains (), 0, sch, 0, this.getChains ().length); -this.setSequence (sqs); -this.setChains (sch); -pdbe = new Array (rtn.size ()); -for (var r = 0; r < pdbe.length; r++) { -var stri = (rtn.get (r)); -pdbe[r] = this.getPdbEntry (stri[0]); -this.addSequenceAndChain (stri[0], seq[stri[1]], chns[stri[1]]); -} -} else { -pdbe = null; -}return pdbe; -}, "~A,~A,~A"); -Clazz.defineMethod (c$, "addSequence", -function (pe, seq) { -this.addSequenceAndChain (pe, seq, null); -}, "~N,~A"); -Clazz.defineMethod (c$, "addSequenceForStructFile", -function (pdbFile, seq) { -for (var pe = 0; pe < this.getPdbCount (); pe++) { -if (this.getPdbEntry (pe).getFile ().equals (pdbFile)) { -this.addSequence (pe, seq); -}} -}, "~S,~A"); -Clazz.defineMethod (c$, "isNucleotide", -function () { -return this.nucleotide; -}); -Clazz.defineMethod (c$, "printMappings", -function () { -if (this.pdbEntry == null) { -return ""; -}var sb = new StringBuilder (128); -for (var pdbe = 0; pdbe < this.getPdbCount (); pdbe++) { -var pdbfile = this.getPdbEntry (pdbe).getFile (); -var seqs = java.util.Arrays.asList (this.getSequence ()[pdbe]); -sb.append (this.getSsm ().printMappings (pdbfile, seqs)); -} -return sb.toString (); -}); -Clazz.defineMethod (c$, "getMappedPosition", -function (seq, alignedPos, mapping) { -if (alignedPos >= seq.getLength ()) { -return -1; -}if (jalview.util.Comparison.isGap (seq.getCharAt (alignedPos))) { -return -1; -}var seqPos = seq.findPosition (alignedPos); -var pos = mapping.getPDBResNum (seqPos); -return pos; -}, "jalview.datamodel.SequenceI,~N,jalview.structure.StructureMapping"); -Clazz.defineMethod (c$, "findSuperposableResidues", -function (alignment, matched, structures) { -var refStructure = -1; -var files = this.getPdbFile (); -for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { -var mappings = this.getSsm ().getMapping (files[pdbfnum]); -var lastPos = -1; -var seqCountForPdbFile = this.getSequence ()[pdbfnum].length; -for (var s = 0; s < seqCountForPdbFile; s++) { -for (var mapping, $mapping = 0, $$mapping = mappings; $mapping < $$mapping.length && ((mapping = $$mapping[$mapping]) || true); $mapping++) { -var theSequence = this.getSequence ()[pdbfnum][s]; -if (mapping.getSequence () === theSequence && alignment.findIndex (theSequence) > -1) { -if (refStructure < 0) { -refStructure = pdbfnum; -}for (var r = 0; r < matched.length; r++) { -if (!matched[r]) { -continue; -}var pos = this.getMappedPosition (theSequence, r, mapping); -if (pos < 1 || pos == lastPos) { -matched[r] = false; -continue; -}lastPos = pos; -structures[pdbfnum].pdbResNo[r] = pos; -} -var chain = mapping.getChain (); -if (chain != null && chain.trim ().length > 0) { -structures[pdbfnum].chain = chain; -}structures[pdbfnum].pdbId = mapping.getPdbId (); -structures[pdbfnum].isRna = theSequence.getRNA () != null; -s = seqCountForPdbFile; -break; -}} -} -} -return refStructure; -}, "jalview.datamodel.AlignmentI,~A,~A"); -Clazz.defineMethod (c$, "waitForFileLoad", -function (files) { -var starttime = System.currentTimeMillis (); -var endTime = 10000 + 1000 * files.length + starttime; -var notLoaded = null; -var waiting = true; -while (waiting && System.currentTimeMillis () < endTime) { -waiting = false; -for (var file, $file = 0, $$file = files; $file < $$file.length && ((file = $$file[$file]) || true); $file++) { -notLoaded = file; -try { -var sm = this.getSsm ().getMapping (file); -if (sm == null || sm.length == 0) { -waiting = true; -}} catch (x) { -waiting = true; -} -} -} -if (waiting) { -System.err.println ("Timed out waiting for structure viewer to load file " + notLoaded); -return false; -}return true; -}, "~A"); -Clazz.overrideMethod (c$, "isListeningFor", -function (seq) { -if (this.sequence != null) { -for (var seqs, $seqs = 0, $$seqs = this.sequence; $seqs < $$seqs.length && ((seqs = $$seqs[$seqs]) || true); $seqs++) { -if (seqs != null) { -for (var s, $s = 0, $$s = seqs; $s < $$s.length && ((s = $$s[$s]) || true); $s++) { -if (s === seq) { -return true; -}} -}} -}return false; -}, "jalview.datamodel.SequenceI"); -c$.$AAStructureBindingModel$SuperposeData$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.filename = null; -this.pdbId = null; -this.chain = ""; -this.isRna = false; -this.pdbResNo = null; -Clazz.instantialize (this, arguments); -}, jalview.structures.models.AAStructureBindingModel, "SuperposeData"); -Clazz.makeConstructor (c$, -function (a) { -this.pdbResNo = Clazz.newIntArray (a, 0); -}, "~N"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.structures.models"); +Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.structure.StructureListener", "jalview.structures.models.SequenceStructureBindingModel"], "jalview.structures.models.AAStructureBindingModel", ["jalview.util.Comparison", "$.MessageManager", "java.lang.Error", "$.StringBuilder", "java.util.ArrayList", "$.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ssm = null; +this.pdbEntry = null; +this.sequence = null; +this.chains = null; +this.protocol = null; +this.colourBySequence = true; +this.nucleotide = false; +if (!Clazz.isClassDefined ("jalview.structures.models.AAStructureBindingModel.SuperposeData")) { +jalview.structures.models.AAStructureBindingModel.$AAStructureBindingModel$SuperposeData$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.structures.models, "AAStructureBindingModel", jalview.structures.models.SequenceStructureBindingModel, [jalview.structure.StructureListener, jalview.api.StructureSelectionManagerProvider]); +Clazz.makeConstructor (c$, +function (ssm, seqs) { +Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); +this.ssm = ssm; +this.sequence = seqs; +}, "jalview.structure.StructureSelectionManager,~A"); +Clazz.makeConstructor (c$, +function (ssm, pdbentry, sequenceIs, chains, protocol) { +Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); +this.ssm = ssm; +this.sequence = sequenceIs; +this.nucleotide = jalview.util.Comparison.isNucleotide2 (sequenceIs); +this.chains = chains; +this.pdbEntry = pdbentry; +this.protocol = protocol; +if (chains == null) { +this.chains = new Array (pdbentry.length); +}}, "jalview.structure.StructureSelectionManager,~A,~A,~A,~S"); +Clazz.defineMethod (c$, "getSsm", +function () { +return this.ssm; +}); +Clazz.defineMethod (c$, "getPdbEntry", +function (i) { +return (this.pdbEntry != null && this.pdbEntry.length > i) ? this.pdbEntry[i] : null; +}, "~N"); +Clazz.defineMethod (c$, "hasPdbId", +function (pdbId) { +if (this.pdbEntry != null) { +for (var pdb, $pdb = 0, $$pdb = this.pdbEntry; $pdb < $$pdb.length && ((pdb = $$pdb[$pdb]) || true); $pdb++) { +if (pdb.getId ().equals (pdbId)) { +return true; +}} +}return false; +}, "~S"); +Clazz.defineMethod (c$, "getPdbCount", +function () { +return this.pdbEntry == null ? 0 : this.pdbEntry.length; +}); +Clazz.defineMethod (c$, "getSequence", +function () { +return this.sequence; +}); +Clazz.defineMethod (c$, "getChains", +function () { +return this.chains; +}); +Clazz.defineMethod (c$, "getProtocol", +function () { +return this.protocol; +}); +Clazz.defineMethod (c$, "setPdbentry", +function (pdbentry) { +this.pdbEntry = pdbentry; +}, "~A"); +Clazz.defineMethod (c$, "setSequence", +function (sequence) { +this.sequence = sequence; +}, "~A"); +Clazz.defineMethod (c$, "setChains", +function (chains) { +this.chains = chains; +}, "~A"); +Clazz.defineMethod (c$, "getViewerTitle", +function (viewerName, verbose) { +if (this.getSequence () == null || this.getSequence ().length < 1 || this.getPdbCount () < 1 || this.getSequence ()[0].length < 1) { +return ("Jalview " + viewerName + " Window"); +}var title = new StringBuilder (64); +var pdbEntry = this.getPdbEntry (0); +title.append (viewerName + " view for " + this.getSequence ()[0][0].getName () + ":" + pdbEntry.getId ()); +if (verbose) { +if (pdbEntry.getProperty () != null) { +if (pdbEntry.getProperty ().get ("method") != null) { +title.append (" Method: "); +title.append (pdbEntry.getProperty ().get ("method")); +}if (pdbEntry.getProperty ().get ("chains") != null) { +title.append (" Chain:"); +title.append (pdbEntry.getProperty ().get ("chains")); +}}}return title.toString (); +}, "~S,~B"); +Clazz.defineMethod (c$, "releaseUIResources", +function () { +}); +Clazz.defineMethod (c$, "isColourBySequence", +function () { +return this.colourBySequence; +}); +Clazz.defineMethod (c$, "setColourBySequence", +function (colourBySequence) { +this.colourBySequence = colourBySequence; +}, "~B"); +Clazz.defineMethod (c$, "addSequenceAndChain", +function (pe, seq, tchain) { +if (pe < 0 || pe >= this.getPdbCount ()) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_no_pdbentry_from_index", Clazz.newArray (-1, [Integer.$valueOf (pe).toString ()]))); +}var nullChain = "TheNullChain"; +var s = new java.util.ArrayList (); +var c = new java.util.ArrayList (); +if (this.getChains () == null) { +this.setChains ( new Array (this.getPdbCount ())); +}if (this.getSequence ()[pe] != null) { +for (var i = 0; i < this.getSequence ()[pe].length; i++) { +s.add (this.getSequence ()[pe][i]); +if (this.getChains ()[pe] != null) { +if (i < this.getChains ()[pe].length) { +c.add (this.getChains ()[pe][i]); +} else { +c.add ("TheNullChain"); +}} else { +if (tchain != null && tchain.length > 0) { +c.add ("TheNullChain"); +}}} +}for (var i = 0; i < seq.length; i++) { +if (!s.contains (seq[i])) { +s.add (seq[i]); +if (tchain != null && i < tchain.length) { +c.add (tchain[i] == null ? "TheNullChain" : tchain[i]); +}}} +var tmp = s.toArray ( new Array (s.size ())); +this.getSequence ()[pe] = tmp; +if (c.size () > 0) { +var tch = c.toArray ( new Array (c.size ())); +for (var i = 0; i < tch.length; i++) { +if (tch[i] === "TheNullChain") { +tch[i] = null; +}} +this.getChains ()[pe] = tch; +} else { +this.getChains ()[pe] = null; +}}, "~N,~A,~A"); +Clazz.defineMethod (c$, "addSequenceAndChain", +function (pdbe, seq, chns) { +var v = new java.util.ArrayList (); +var rtn = new java.util.ArrayList (); +for (var i = 0; i < this.getPdbCount (); i++) { +v.add (this.getPdbEntry (i)); +} +for (var i = 0; i < pdbe.length; i++) { +var r = v.indexOf (pdbe[i]); +if (r == -1 || r >= this.getPdbCount ()) { +rtn.add ( Clazz.newIntArray (-1, [v.size (), i])); +v.add (pdbe[i]); +} else { +this.addSequenceAndChain (r, seq[i], chns[i]); +}} +pdbe = v.toArray ( new Array (v.size ())); +this.setPdbentry (pdbe); +if (rtn.size () > 0) { +var sqs = new Array (this.getPdbCount ()); +var sch = new Array (this.getPdbCount ()); +System.arraycopy (this.getSequence (), 0, sqs, 0, this.getSequence ().length); +System.arraycopy (this.getChains (), 0, sch, 0, this.getChains ().length); +this.setSequence (sqs); +this.setChains (sch); +pdbe = new Array (rtn.size ()); +for (var r = 0; r < pdbe.length; r++) { +var stri = (rtn.get (r)); +pdbe[r] = this.getPdbEntry (stri[0]); +this.addSequenceAndChain (stri[0], seq[stri[1]], chns[stri[1]]); +} +} else { +pdbe = null; +}return pdbe; +}, "~A,~A,~A"); +Clazz.defineMethod (c$, "addSequence", +function (pe, seq) { +this.addSequenceAndChain (pe, seq, null); +}, "~N,~A"); +Clazz.defineMethod (c$, "addSequenceForStructFile", +function (pdbFile, seq) { +for (var pe = 0; pe < this.getPdbCount (); pe++) { +if (this.getPdbEntry (pe).getFile ().equals (pdbFile)) { +this.addSequence (pe, seq); +}} +}, "~S,~A"); +Clazz.defineMethod (c$, "isNucleotide", +function () { +return this.nucleotide; +}); +Clazz.defineMethod (c$, "printMappings", +function () { +if (this.pdbEntry == null) { +return ""; +}var sb = new StringBuilder (128); +for (var pdbe = 0; pdbe < this.getPdbCount (); pdbe++) { +var pdbfile = this.getPdbEntry (pdbe).getFile (); +var seqs = java.util.Arrays.asList (this.getSequence ()[pdbe]); +sb.append (this.getSsm ().printMappings (pdbfile, seqs)); +} +return sb.toString (); +}); +Clazz.defineMethod (c$, "getMappedPosition", +function (seq, alignedPos, mapping) { +if (alignedPos >= seq.getLength ()) { +return -1; +}if (jalview.util.Comparison.isGap (seq.getCharAt (alignedPos))) { +return -1; +}var seqPos = seq.findPosition (alignedPos); +var pos = mapping.getPDBResNum (seqPos); +return pos; +}, "jalview.datamodel.SequenceI,~N,jalview.structure.StructureMapping"); +Clazz.defineMethod (c$, "findSuperposableResidues", +function (alignment, matched, structures) { +var refStructure = -1; +var files = this.getPdbFile (); +for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { +var mappings = this.getSsm ().getMapping (files[pdbfnum]); +var lastPos = -1; +var seqCountForPdbFile = this.getSequence ()[pdbfnum].length; +for (var s = 0; s < seqCountForPdbFile; s++) { +for (var mapping, $mapping = 0, $$mapping = mappings; $mapping < $$mapping.length && ((mapping = $$mapping[$mapping]) || true); $mapping++) { +var theSequence = this.getSequence ()[pdbfnum][s]; +if (mapping.getSequence () === theSequence && alignment.findIndex (theSequence) > -1) { +if (refStructure < 0) { +refStructure = pdbfnum; +}for (var r = 0; r < matched.length; r++) { +if (!matched[r]) { +continue; +}var pos = this.getMappedPosition (theSequence, r, mapping); +if (pos < 1 || pos == lastPos) { +matched[r] = false; +continue; +}lastPos = pos; +structures[pdbfnum].pdbResNo[r] = pos; +} +var chain = mapping.getChain (); +if (chain != null && chain.trim ().length > 0) { +structures[pdbfnum].chain = chain; +}structures[pdbfnum].pdbId = mapping.getPdbId (); +structures[pdbfnum].isRna = theSequence.getRNA () != null; +s = seqCountForPdbFile; +break; +}} +} +} +return refStructure; +}, "jalview.datamodel.AlignmentI,~A,~A"); +Clazz.defineMethod (c$, "waitForFileLoad", +function (files) { +var starttime = System.currentTimeMillis (); +var endTime = 10000 + 1000 * files.length + starttime; +var notLoaded = null; +var waiting = true; +while (waiting && System.currentTimeMillis () < endTime) { +waiting = false; +for (var file, $file = 0, $$file = files; $file < $$file.length && ((file = $$file[$file]) || true); $file++) { +notLoaded = file; +try { +var sm = this.getSsm ().getMapping (file); +if (sm == null || sm.length == 0) { +waiting = true; +}} catch (x) { +waiting = true; +} +} +} +if (waiting) { +System.err.println ("Timed out waiting for structure viewer to load file " + notLoaded); +return false; +}return true; +}, "~A"); +Clazz.overrideMethod (c$, "isListeningFor", +function (seq) { +if (this.sequence != null) { +for (var seqs, $seqs = 0, $$seqs = this.sequence; $seqs < $$seqs.length && ((seqs = $$seqs[$seqs]) || true); $seqs++) { +if (seqs != null) { +for (var s, $s = 0, $$s = seqs; $s < $$s.length && ((s = $$s[$s]) || true); $s++) { +if (s === seq) { +return true; +}} +}} +}return false; +}, "jalview.datamodel.SequenceI"); +c$.$AAStructureBindingModel$SuperposeData$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.filename = null; +this.pdbId = null; +this.chain = ""; +this.isRna = false; +this.pdbResNo = null; +Clazz.instantialize (this, arguments); +}, jalview.structures.models.AAStructureBindingModel, "SuperposeData"); +Clazz.makeConstructor (c$, +function (a) { +this.pdbResNo = Clazz.newIntArray (a, 0); +}, "~N"); +c$ = Clazz.p0p (); +}; +}); diff --git a/bin/jalview/structures/models/SequenceStructureBindingModel.js b/bin/jalview/structures/models/SequenceStructureBindingModel.js index 98e8875..f9d2e7a 100644 --- a/bin/jalview/structures/models/SequenceStructureBindingModel.js +++ b/bin/jalview/structures/models/SequenceStructureBindingModel.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("jalview.structures.models"); -Clazz.load (["jalview.api.SequenceStructureBinding"], "jalview.structures.models.SequenceStructureBindingModel", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.loadingFromArchive = false; -this.loadingFinished = true; -Clazz.instantialize (this, arguments); -}, jalview.structures.models, "SequenceStructureBindingModel", null, jalview.api.SequenceStructureBinding); -Clazz.overrideMethod (c$, "setLoadingFromArchive", -function (loadingFromArchive) { -this.loadingFromArchive = loadingFromArchive; -}, "~B"); -Clazz.overrideMethod (c$, "isLoadingFromArchive", -function () { -return this.loadingFromArchive && !this.loadingFinished; -}); -Clazz.overrideMethod (c$, "isLoadingFinished", -function () { -return this.loadingFinished; -}); -Clazz.overrideMethod (c$, "setFinishedLoadingFromArchive", -function (finishedLoading) { -this.loadingFinished = finishedLoading; -}, "~B"); -}); +Clazz.declarePackage ("jalview.structures.models"); +Clazz.load (["jalview.api.SequenceStructureBinding"], "jalview.structures.models.SequenceStructureBindingModel", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.loadingFromArchive = false; +this.loadingFinished = true; +Clazz.instantialize (this, arguments); +}, jalview.structures.models, "SequenceStructureBindingModel", null, jalview.api.SequenceStructureBinding); +Clazz.overrideMethod (c$, "setLoadingFromArchive", +function (loadingFromArchive) { +this.loadingFromArchive = loadingFromArchive; +}, "~B"); +Clazz.overrideMethod (c$, "isLoadingFromArchive", +function () { +return this.loadingFromArchive && !this.loadingFinished; +}); +Clazz.overrideMethod (c$, "isLoadingFinished", +function () { +return this.loadingFinished; +}); +Clazz.overrideMethod (c$, "setFinishedLoadingFromArchive", +function (finishedLoading) { +this.loadingFinished = finishedLoading; +}, "~B"); +}); diff --git a/bin/jalview/util/AWTConsole.js b/bin/jalview/util/AWTConsole.js deleted file mode 100644 index d03b9fa..0000000 --- a/bin/jalview/util/AWTConsole.js +++ /dev/null @@ -1,187 +0,0 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.awt.event.ActionListener", "$.WindowAdapter", "$.WindowListener", "java.io.PipedInputStream"], "jalview.util.AWTConsole", ["jalview.util.MessageManager", "java.awt.BorderLayout", "$.Button", "$.Dimension", "$.Frame", "$.GraphicsEnvironment", "$.Panel", "$.TextArea", "$.Toolkit", "java.io.PipedOutputStream", "java.lang.NullPointerException", "$.Thread"], function () { -c$ = Clazz.decorateAsClass (function () { -this.frame = null; -this.textArea = null; -this.reader = null; -this.reader2 = null; -this.quit = false; -this.pin = null; -this.pin2 = null; -this.errorThrower = null; -Clazz.instantialize (this, arguments); -}, jalview.util, "AWTConsole", java.awt.event.WindowAdapter, [java.awt.event.WindowListener, java.awt.event.ActionListener, Runnable]); -Clazz.prepareFields (c$, function () { -this.pin = new java.io.PipedInputStream (); -this.pin2 = new java.io.PipedInputStream (); -}); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.util.AWTConsole, []); -this.frame = new java.awt.Frame ("Java Console"); -var screenSize = java.awt.Toolkit.getDefaultToolkit ().getScreenSize (); -var frameSize = new java.awt.Dimension ((Clazz.doubleToInt (screenSize.width / 2)), (Clazz.doubleToInt (screenSize.height / 2))); -var x = (Clazz.doubleToInt (frameSize.width / 2)); -var y = (Clazz.doubleToInt (frameSize.height / 2)); -this.frame.setBounds (x, y, frameSize.width, frameSize.height); -this.textArea = new java.awt.TextArea (); -this.textArea.setEditable (false); -var button = new java.awt.Button ("clear"); -var panel = new java.awt.Panel (); -panel.setLayout ( new java.awt.BorderLayout ()); -panel.add (this.textArea, "Center"); -panel.add (button, "South"); -this.frame.add (panel); -this.frame.setVisible (true); -this.frame.addWindowListener (this); -button.addActionListener (this); -try { -var pout = new java.io.PipedOutputStream (this.pin); -System.setOut ( new java.io.PrintStream (pout, true)); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, java.io.IOException)) { -var io = e$$; -{ -this.textArea.append ("Couldn't redirect STDOUT to this console\n" + io.getMessage ()); -} -} else if (Clazz.exceptionOf (e$$, SecurityException)) { -var se = e$$; -{ -this.textArea.append ("Couldn't redirect STDOUT to this console\n" + se.getMessage ()); -} -} else { -throw e$$; -} -} -try { -var pout2 = new java.io.PipedOutputStream (this.pin2); -System.setErr ( new java.io.PrintStream (pout2, true)); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, java.io.IOException)) { -var io = e$$; -{ -this.textArea.append ("Couldn't redirect STDERR to this console\n" + io.getMessage ()); -} -} else if (Clazz.exceptionOf (e$$, SecurityException)) { -var se = e$$; -{ -this.textArea.append ("Couldn't redirect STDERR to this console\n" + se.getMessage ()); -} -} else { -throw e$$; -} -} -this.quit = false; -this.reader = new Thread (this); -this.reader.setDaemon (true); -this.reader.start (); -this.reader2 = new Thread (this); -this.reader2.setDaemon (true); -this.reader2.start (); -System.out.println ("Hello World 2"); -System.out.println ("All fonts available to Graphic2D:\n"); -var ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (); -var fontNames = ge.getAvailableFontFamilyNames (); -for (var n = 0; n < fontNames.length; n++) System.out.println (fontNames[n]); - -System.out.println ("\nLets throw an error on this console"); -this.errorThrower = new Thread (this); -this.errorThrower.setDaemon (true); -this.errorThrower.start (); -}); -Clazz.overrideMethod (c$, "windowClosed", -function (evt) { -this.quit = true; -this.notifyAll (); -try { -this.reader.join (1000); -this.pin.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -try { -this.reader2.join (1000); -this.pin2.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -System.exit (0); -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "windowClosing", -function (evt) { -this.frame.setVisible (false); -this.frame.dispose (); -}, "java.awt.event.WindowEvent"); -Clazz.overrideMethod (c$, "actionPerformed", -function (evt) { -this.textArea.setText (""); -}, "java.awt.event.ActionEvent"); -Clazz.overrideMethod (c$, "run", -function () { -try { -while (Thread.currentThread () === this.reader) { -try { -this.wait (100); -} catch (ie) { -if (Clazz.exceptionOf (ie, InterruptedException)) { -} else { -throw ie; -} -} -if (this.pin.available () != 0) { -var input = this.readLine (this.pin); -this.textArea.append (input); -}if (this.quit) return; -} -while (Thread.currentThread () === this.reader2) { -try { -this.wait (100); -} catch (ie) { -if (Clazz.exceptionOf (ie, InterruptedException)) { -} else { -throw ie; -} -} -if (this.pin2.available () != 0) { -var input = this.readLine (this.pin2); -this.textArea.append (input); -}if (this.quit) return; -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -this.textArea.append ("\nConsole reports an Internal error."); -this.textArea.append ("The error is: " + e); -} else { -throw e; -} -} -if (Thread.currentThread () === this.errorThrower) { -try { -this.wait (1000); -} catch (ie) { -if (Clazz.exceptionOf (ie, InterruptedException)) { -} else { -throw ie; -} -} -throw new NullPointerException (jalview.util.MessageManager.getString ("exception.application_test_npe")); -}}); -Clazz.defineMethod (c$, "readLine", -function ($in) { -var input = ""; -do { -var available = $in.available (); -if (available == 0) break; -var b = Clazz.newByteArray (available, 0); -$in.read (b); -input = input + String.instantialize (b, 0, b.length); -} while (!input.endsWith ("\n") && !input.endsWith ("\r\n") && !this.quit); -return input; -}, "java.io.PipedInputStream"); -}); diff --git a/bin/jalview/util/BrowserLauncher.js b/bin/jalview/util/BrowserLauncher.js deleted file mode 100644 index 0b28b4c..0000000 --- a/bin/jalview/util/BrowserLauncher.js +++ /dev/null @@ -1,487 +0,0 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.BrowserLauncher", ["jalview.bin.Cache", "jalview.util.MessageManager", "java.io.File", "$.IOException", "java.lang.Double", "$.Runtime"], function () { -c$ = Clazz.declareType (jalview.util, "BrowserLauncher"); -c$.loadClasses = Clazz.defineMethod (c$, "loadClasses", -($fz = function () { -switch (jalview.util.BrowserLauncher.jvm) { -case 0: -try { -var aeTargetClass = Class.forName ("com.apple.MacOS.AETarget"); -var osUtilsClass = Class.forName ("com.apple.MacOS.OSUtils"); -var appleEventClass = Class.forName ("com.apple.MacOS.AppleEvent"); -var aeClass = Class.forName ("com.apple.MacOS.ae"); -jalview.util.BrowserLauncher.aeDescClass = Class.forName ("com.apple.MacOS.AEDesc"); -jalview.util.BrowserLauncher.aeTargetConstructor = aeTargetClass.getDeclaredConstructor ( Clazz.newArray (-1, [Number])); -jalview.util.BrowserLauncher.appleEventConstructor = appleEventClass.getDeclaredConstructor ( Clazz.newArray (-1, [Number, Number, aeTargetClass, Number, Number])); -jalview.util.BrowserLauncher.aeDescConstructor = jalview.util.BrowserLauncher.aeDescClass.getDeclaredConstructor ( Clazz.newArray (-1, [String])); -jalview.util.BrowserLauncher.makeOSType = osUtilsClass.getDeclaredMethod ("makeOSType", Clazz.newArray (-1, [String])); -jalview.util.BrowserLauncher.putParameter = appleEventClass.getDeclaredMethod ("putParameter", Clazz.newArray (-1, [Number, jalview.util.BrowserLauncher.aeDescClass])); -jalview.util.BrowserLauncher.sendNoReply = appleEventClass.getDeclaredMethod ("sendNoReply", Clazz.newArray (-1, [])); -var keyDirectObjectField = aeClass.getDeclaredField ("keyDirectObject"); -jalview.util.BrowserLauncher.keyDirectObject = keyDirectObjectField.get (null); -var autoGenerateReturnIDField = appleEventClass.getDeclaredField ("kAutoGenerateReturnID"); -jalview.util.BrowserLauncher.kAutoGenerateReturnID = autoGenerateReturnIDField.get (null); -var anyTransactionIDField = appleEventClass.getDeclaredField ("kAnyTransactionID"); -jalview.util.BrowserLauncher.kAnyTransactionID = anyTransactionIDField.get (null); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, ClassNotFoundException)) { -var cnfe = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = cnfe.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, NoSuchMethodException)) { -var nsme = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = nsme.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, NoSuchFieldException)) { -var nsfe = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = nsfe.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = iae.getMessage (); -return false; -} -} else { -throw e$$; -} -} -break; -case 1: -try { -jalview.util.BrowserLauncher.mrjFileUtilsClass = Class.forName ("com.apple.mrj.MRJFileUtils"); -jalview.util.BrowserLauncher.mrjOSTypeClass = Class.forName ("com.apple.mrj.MRJOSType"); -var systemFolderField = jalview.util.BrowserLauncher.mrjFileUtilsClass.getDeclaredField ("kSystemFolderType"); -jalview.util.BrowserLauncher.kSystemFolderType = systemFolderField.get (null); -jalview.util.BrowserLauncher.findFolder = jalview.util.BrowserLauncher.mrjFileUtilsClass.getDeclaredMethod ("findFolder", Clazz.newArray (-1, [jalview.util.BrowserLauncher.mrjOSTypeClass])); -jalview.util.BrowserLauncher.getFileCreator = jalview.util.BrowserLauncher.mrjFileUtilsClass.getDeclaredMethod ("getFileCreator", Clazz.newArray (-1, [java.io.File])); -jalview.util.BrowserLauncher.getFileType = jalview.util.BrowserLauncher.mrjFileUtilsClass.getDeclaredMethod ("getFileType", Clazz.newArray (-1, [java.io.File])); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, ClassNotFoundException)) { -var cnfe = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = cnfe.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, NoSuchFieldException)) { -var nsfe = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = nsfe.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, NoSuchMethodException)) { -var nsme = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = nsme.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, SecurityException)) { -var se = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = se.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = iae.getMessage (); -return false; -} -} else { -throw e$$; -} -} -break; -case 3: -try { -var linker = Class.forName ("com.apple.mrj.jdirect.Linker"); -var constructor = linker.getConstructor ( Clazz.newArray (-1, [Class])); -jalview.util.BrowserLauncher.linkage = constructor.newInstance ( Clazz.newArray (-1, [jalview.util.BrowserLauncher])); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, ClassNotFoundException)) { -var cnfe = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = cnfe.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, NoSuchMethodException)) { -var nsme = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = nsme.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { -var ite = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = ite.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, InstantiationException)) { -var ie = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = ie.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = iae.getMessage (); -return false; -} -} else { -throw e$$; -} -} -break; -case 4: -try { -jalview.util.BrowserLauncher.mrjFileUtilsClass = Class.forName ("com.apple.mrj.MRJFileUtils"); -jalview.util.BrowserLauncher.$openURL = jalview.util.BrowserLauncher.mrjFileUtilsClass.getDeclaredMethod ("openURL", Clazz.newArray (-1, [String])); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, ClassNotFoundException)) { -var cnfe = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = cnfe.getMessage (); -return false; -} -} else if (Clazz.exceptionOf (e$$, NoSuchMethodException)) { -var nsme = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = nsme.getMessage (); -return false; -} -} else { -throw e$$; -} -} -break; -default: -break; -} -return true; -}, $fz.isPrivate = true, $fz)); -c$.locateBrowser = Clazz.defineMethod (c$, "locateBrowser", -($fz = function () { -if (jalview.util.BrowserLauncher.browser != null) { -return jalview.util.BrowserLauncher.browser; -}switch (jalview.util.BrowserLauncher.jvm) { -case 0: -try { -var finderCreatorCode = jalview.util.BrowserLauncher.makeOSType.invoke (null, Clazz.newArray (-1, ["MACS"])); -var aeTarget = jalview.util.BrowserLauncher.aeTargetConstructor.newInstance ( Clazz.newArray (-1, [finderCreatorCode])); -var gurlType = jalview.util.BrowserLauncher.makeOSType.invoke (null, Clazz.newArray (-1, ["GURL"])); -var appleEvent = jalview.util.BrowserLauncher.appleEventConstructor.newInstance ( Clazz.newArray (-1, [gurlType, gurlType, aeTarget, jalview.util.BrowserLauncher.kAutoGenerateReturnID, jalview.util.BrowserLauncher.kAnyTransactionID])); -return appleEvent; -} catch (e$$) { -if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = iae.getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else if (Clazz.exceptionOf (e$$, InstantiationException)) { -var ie = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = ie.getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { -var ite = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = ite.getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else { -throw e$$; -} -} -case 1: -var systemFolder; -try { -systemFolder = jalview.util.BrowserLauncher.findFolder.invoke (null, Clazz.newArray (-1, [jalview.util.BrowserLauncher.kSystemFolderType])); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, IllegalArgumentException)) { -var iare = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = iare.getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = iae.getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { -var ite = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = ite.getTargetException ().getClass () + ": " + ite.getTargetException ().getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else { -throw e$$; -} -} -var systemFolderFiles = systemFolder.list (); -for (var i = 0; i < systemFolderFiles.length; i++) { -try { -var file = new java.io.File (systemFolder, systemFolderFiles[i]); -if (!file.isFile ()) { -continue; -}var fileType = jalview.util.BrowserLauncher.getFileType.invoke (null, Clazz.newArray (-1, [file])); -if ("FNDR".equals (fileType.toString ())) { -var fileCreator = jalview.util.BrowserLauncher.getFileCreator.invoke (null, Clazz.newArray (-1, [file])); -if ("MACS".equals (fileCreator.toString ())) { -jalview.util.BrowserLauncher.browser = file.toString (); -return jalview.util.BrowserLauncher.browser; -}}} catch (e$$) { -if (Clazz.exceptionOf (e$$, IllegalArgumentException)) { -var iare = e$$; -{ -jalview.util.BrowserLauncher.errorMessage = iare.getMessage (); -return null; -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = iae.getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { -var ite = e$$; -{ -jalview.util.BrowserLauncher.browser = null; -jalview.util.BrowserLauncher.errorMessage = ite.getTargetException ().getClass () + ": " + ite.getTargetException ().getMessage (); -return jalview.util.BrowserLauncher.browser; -} -} else { -throw e$$; -} -} -} -jalview.util.BrowserLauncher.browser = null; -break; -case 3: -case 4: -jalview.util.BrowserLauncher.browser = ""; -break; -case 5: -jalview.util.BrowserLauncher.browser = "cmd.exe"; -break; -case 6: -jalview.util.BrowserLauncher.browser = "command.com"; -break; -case -1: -default: -jalview.util.BrowserLauncher.browser = jalview.bin.Cache.getDefault ("DEFAULT_BROWSER", "firefox"); -break; -} -return jalview.util.BrowserLauncher.browser; -}, $fz.isPrivate = true, $fz)); -c$.resetBrowser = Clazz.defineMethod (c$, "resetBrowser", -function () { -jalview.util.BrowserLauncher.browser = null; -}); -c$.openURL = Clazz.defineMethod (c$, "openURL", -function (url) { -if (!jalview.util.BrowserLauncher.loadedWithoutErrors) { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.browser_not_found", Clazz.newArray (-1, [jalview.util.BrowserLauncher.errorMessage]))); -}var browser = jalview.util.BrowserLauncher.locateBrowser (); -if (browser == null) { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.browser_unable_to_locate", Clazz.newArray (-1, [jalview.util.BrowserLauncher.errorMessage]))); -}switch (jalview.util.BrowserLauncher.jvm) { -case 0: -var aeDesc = null; -try { -aeDesc = jalview.util.BrowserLauncher.aeDescConstructor.newInstance ( Clazz.newArray (-1, [url])); -jalview.util.BrowserLauncher.putParameter.invoke (browser, Clazz.newArray (-1, [jalview.util.BrowserLauncher.keyDirectObject, aeDesc])); -jalview.util.BrowserLauncher.sendNoReply.invoke (browser, Clazz.newArray (-1, [])); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { -var ite = e$$; -{ -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.invocation_target_exception_creating_aedesc", Clazz.newArray (-1, [ite.getMessage ()]))); -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.illegal_access_building_apple_evt", Clazz.newArray (-1, [iae.getMessage ()]))); -} -} else if (Clazz.exceptionOf (e$$, InstantiationException)) { -var ie = e$$; -{ -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.illegal_access_building_apple_evt", Clazz.newArray (-1, [ie.getMessage ()]))); -} -} else { -throw e$$; -} -} finally { -aeDesc = null; -browser = null; -} -break; -case 1: -Runtime.getRuntime ().exec ( Clazz.newArray (-1, [browser, url])); -break; -case 3: -var instance = Clazz.newIntArray (1, 0); -var result = jalview.util.BrowserLauncher.ICStart (instance, 0); -if (result == 0) { -var selectionStart = Clazz.newIntArray (-1, [0]); -var urlBytes = url.getBytes (); -var selectionEnd = Clazz.newIntArray (-1, [urlBytes.length]); -result = jalview.util.BrowserLauncher.ICLaunchURL (instance[0], Clazz.newByteArray (-1, [0]), urlBytes, urlBytes.length, selectionStart, selectionEnd); -if (result == 0) { -jalview.util.BrowserLauncher.ICStop (instance); -} else { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.unable_to_launch_url", Clazz.newArray (-1, [Integer.$valueOf (result).toString ()]))); -}} else { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.unable_to_create_internet_config", Clazz.newArray (-1, [Integer.$valueOf (result).toString ()]))); -}break; -case 4: -try { -jalview.util.BrowserLauncher.$openURL.invoke (null, Clazz.newArray (-1, [url])); -} catch (e$$) { -if (Clazz.exceptionOf (e$$, java.lang.reflect.InvocationTargetException)) { -var ite = e$$; -{ -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.invocation_target_calling_url", Clazz.newArray (-1, [ite.getMessage ()]))); -} -} else if (Clazz.exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.illegal_access_calling_url", Clazz.newArray (-1, [iae.getMessage ()]))); -} -} else { -throw e$$; -} -} -break; -case 5: -case 6: -var process = Runtime.getRuntime ().exec ( Clazz.newArray (-1, [browser, "/c", "start", "\"\"", '"' + url + '"'])); -try { -process.waitFor (); -process.exitValue (); -} catch (ie) { -if (Clazz.exceptionOf (ie, InterruptedException)) { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.interrupted_launching_browser", Clazz.newArray (-1, [ie.getMessage ()]))); -} else { -throw ie; -} -} -break; -case -1: -process = Runtime.getRuntime ().exec ( Clazz.newArray (-1, [browser, "-remote", "openURL(" + url + ", new-window" + ")"])); -try { -var exitCode = process.waitFor (); -if (exitCode != 0) { -Runtime.getRuntime ().exec ( Clazz.newArray (-1, [browser, url])); -}} catch (ie) { -if (Clazz.exceptionOf (ie, InterruptedException)) { -throw new java.io.IOException (jalview.util.MessageManager.formatMessage ("exception.interrupted_launching_browser", Clazz.newArray (-1, [ie.getMessage ()]))); -} else { -throw ie; -} -} -break; -default: -Runtime.getRuntime ().exec ( Clazz.newArray (-1, [browser, url])); -break; -} -}, "~S"); -Clazz.defineStatics (c$, -"jvm", 0, -"browser", null, -"loadedWithoutErrors", false, -"mrjFileUtilsClass", null, -"mrjOSTypeClass", null, -"aeDescClass", null, -"aeTargetConstructor", null, -"appleEventConstructor", null, -"aeDescConstructor", null, -"findFolder", null, -"getFileCreator", null, -"getFileType", null, -"$openURL", null, -"makeOSType", null, -"putParameter", null, -"sendNoReply", null, -"kSystemFolderType", null, -"keyDirectObject", null, -"kAutoGenerateReturnID", null, -"kAnyTransactionID", null, -"linkage", null, -"JDirect_MacOSX", "/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox", -"MRJ_2_0", 0, -"MRJ_2_1", 1, -"MRJ_3_0", 3, -"MRJ_3_1", 4, -"WINDOWS_NT", 5, -"WINDOWS_9x", 6, -"OTHER", -1, -"FINDER_TYPE", "FNDR", -"FINDER_CREATOR", "MACS", -"GURL_EVENT", "GURL", -"FIRST_WINDOWS_PARAMETER", "/c", -"SECOND_WINDOWS_PARAMETER", "start", -"THIRD_WINDOWS_PARAMETER", "\"\"", -"NETSCAPE_REMOTE_PARAMETER", "-remote", -"NETSCAPE_OPEN_PARAMETER_START", "openURL(", -"NETSCAPE_OPEN_NEW_WINDOW", ", new-window", -"NETSCAPE_OPEN_PARAMETER_END", ")", -"errorMessage", null); -{ -jalview.util.BrowserLauncher.loadedWithoutErrors = true; -var osName = System.getProperty ("os.name"); -if (osName.startsWith ("Mac OS")) { -var mrjVersion = System.getProperty ("mrj.version"); -var majorMRJVersion; -if (mrjVersion == null) { -majorMRJVersion = "3.1"; -} else { -majorMRJVersion = mrjVersion.substring (0, 3); -}try { -var version = Double.$valueOf (majorMRJVersion).doubleValue (); -if (version == 2) { -jalview.util.BrowserLauncher.jvm = 0; -} else if ((version >= 2.1) && (version < 3)) { -jalview.util.BrowserLauncher.jvm = 1; -} else if (version == 3.0) { -jalview.util.BrowserLauncher.jvm = 3; -} else if (version >= 3.1) { -jalview.util.BrowserLauncher.jvm = 4; -} else { -jalview.util.BrowserLauncher.loadedWithoutErrors = false; -jalview.util.BrowserLauncher.errorMessage = "Unsupported MRJ version: " + version; -}} catch (nfe) { -if (Clazz.exceptionOf (nfe, NumberFormatException)) { -jalview.util.BrowserLauncher.loadedWithoutErrors = false; -jalview.util.BrowserLauncher.errorMessage = "Invalid MRJ version: " + mrjVersion; -} else { -throw nfe; -} -} -} else if (osName.startsWith ("Windows")) { -if (osName.indexOf ("9") != -1) { -jalview.util.BrowserLauncher.jvm = 6; -} else { -jalview.util.BrowserLauncher.jvm = 5; -}} else { -jalview.util.BrowserLauncher.jvm = -1; -}if (jalview.util.BrowserLauncher.loadedWithoutErrors) { -jalview.util.BrowserLauncher.loadedWithoutErrors = jalview.util.BrowserLauncher.loadClasses (); -}}}); diff --git a/bin/jalview/util/ColorUtils.js b/bin/jalview/util/ColorUtils.js index 129c265..ed016da 100644 --- a/bin/jalview/util/ColorUtils.js +++ b/bin/jalview/util/ColorUtils.js @@ -1,30 +1,30 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.ColorUtils", ["java.awt.Color", "java.util.Random"], function () { -c$ = Clazz.declareType (jalview.util, "ColorUtils"); -c$.generateRandomColor = Clazz.defineMethod (c$, "generateRandomColor", -function (mix) { -var random = new java.util.Random (); -var red = random.nextInt (256); -var green = random.nextInt (256); -var blue = random.nextInt (256); -if (mix != null) { -red = Clazz.doubleToInt ((red + mix.getRed ()) / 2); -green = Clazz.doubleToInt ((green + mix.getGreen ()) / 2); -blue = Clazz.doubleToInt ((blue + mix.getBlue ()) / 2); -}var color = new java.awt.Color (red, green, blue); -return color; -}, "java.awt.Color"); -c$.toTkCode = Clazz.defineMethod (c$, "toTkCode", -function (colour) { -var colstring = "#" + ((colour.getRed () < 16) ? "0" : "") + Integer.toHexString (colour.getRed ()) + ((colour.getGreen () < 16) ? "0" : "") + Integer.toHexString (colour.getGreen ()) + ((colour.getBlue () < 16) ? "0" : "") + Integer.toHexString (colour.getBlue ()); -return colstring; -}, "java.awt.Color"); -c$.darkerThan = Clazz.defineMethod (c$, "darkerThan", -function (col) { -return col == null ? null : col.darker ().darker ().darker (); -}, "java.awt.Color"); -c$.brighterThan = Clazz.defineMethod (c$, "brighterThan", -function (col) { -return col == null ? null : col.brighter ().brighter ().brighter (); -}, "java.awt.Color"); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.ColorUtils", ["java.awt.Color", "java.util.Random"], function () { +c$ = Clazz.declareType (jalview.util, "ColorUtils"); +c$.generateRandomColor = Clazz.defineMethod (c$, "generateRandomColor", +function (mix) { +var random = new java.util.Random (); +var red = random.nextInt (256); +var green = random.nextInt (256); +var blue = random.nextInt (256); +if (mix != null) { +red = Clazz.doubleToInt ((red + mix.getRed ()) / 2); +green = Clazz.doubleToInt ((green + mix.getGreen ()) / 2); +blue = Clazz.doubleToInt ((blue + mix.getBlue ()) / 2); +}var color = new java.awt.Color (red, green, blue); +return color; +}, "java.awt.Color"); +c$.toTkCode = Clazz.defineMethod (c$, "toTkCode", +function (colour) { +var colstring = "#" + ((colour.getRed () < 16) ? "0" : "") + Integer.toHexString (colour.getRed ()) + ((colour.getGreen () < 16) ? "0" : "") + Integer.toHexString (colour.getGreen ()) + ((colour.getBlue () < 16) ? "0" : "") + Integer.toHexString (colour.getBlue ()); +return colstring; +}, "java.awt.Color"); +c$.darkerThan = Clazz.defineMethod (c$, "darkerThan", +function (col) { +return col == null ? null : col.darker ().darker ().darker (); +}, "java.awt.Color"); +c$.brighterThan = Clazz.defineMethod (c$, "brighterThan", +function (col) { +return col == null ? null : col.brighter ().brighter ().brighter (); +}, "java.awt.Color"); +}); diff --git a/bin/jalview/util/Comparison.class b/bin/jalview/util/Comparison.class index 096f53267a93f0f4b28842e76e9db3f6f758e153..590a80c85c8f538d31762aa8c324d13a965a6e13 100644 GIT binary patch delta 29 lcmX@Ad_;M}RBp!3&C|GlGcxxw@Jyb<8_CGE`91G7W&o+M3bp_M delta 30 mcmX@2d{lYERBpzu&C|GlGcxxv@J^n>8_C4ZwD}$HHD&;^2@1FX diff --git a/bin/jalview/util/Comparison.js b/bin/jalview/util/Comparison.js index e46a616..29499bb 100644 --- a/bin/jalview/util/Comparison.js +++ b/bin/jalview/util/Comparison.js @@ -1,131 +1,131 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.Comparison", ["java.util.ArrayList"], function () { -c$ = Clazz.declareType (jalview.util, "Comparison"); -c$.compare = Clazz.defineMethod (c$, "compare", -function (ii, jj) { -return jalview.util.Comparison.compare (ii, jj, 0, ii.getLength () - 1); -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); -c$.compare = Clazz.defineMethod (c$, "compare", -function (ii, jj, start, end) { -var si = ii.getSequenceAsString (); -var sj = jj.getSequenceAsString (); -var ilen = si.length - 1; -var jlen = sj.length - 1; -while (jalview.util.Comparison.isGap (si.charAt (start + ilen))) { -ilen--; -} -while (jalview.util.Comparison.isGap (sj.charAt (start + jlen))) { -jlen--; -} -var count = 0; -var match = 0; -var pid = -1; -if (ilen > jlen) { -for (var j = 0; j < jlen; j++) { -if (si.substring (start + j, start + j + 1).equals (sj.substring (start + j, start + j + 1))) { -match++; -}count++; -} -pid = match / ilen * 100; -} else { -for (var j = 0; j < jlen; j++) { -if (si.substring (start + j, start + j + 1).equals (sj.substring (start + j, start + j + 1))) { -match++; -}count++; -} -pid = match / jlen * 100; -}return pid; -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~N,~N"); -c$.PID = Clazz.defineMethod (c$, "PID", -function (seq1, seq2) { -return jalview.util.Comparison.PID (seq1, seq2, 0, seq1.length); -}, "~S,~S"); -c$.PID = Clazz.defineMethod (c$, "PID", -function (seq1, seq2, start, end) { -return jalview.util.Comparison.PID (seq1, seq2, start, end, true, false); -}, "~S,~S,~N,~N"); -c$.PID = Clazz.defineMethod (c$, "PID", -function (seq1, seq2, start, end, wcGaps, ungappedOnly) { -var s1len = seq1.length; -var s2len = seq2.length; -var len = Math.min (s1len, s2len); -if (end < len) { -len = end; -}if (len < start) { -start = len - 1; -}var elen = len - start; -var bad = 0; -var chr1; -var chr2; -var agap; -for (var i = start; i < len; i++) { -chr1 = seq1.charAt (i); -chr2 = seq2.charAt (i); -agap = jalview.util.Comparison.isGap (chr1) || jalview.util.Comparison.isGap (chr2); -if ('a' <= chr1 && chr1 <= 'z') { -chr1 = String.fromCharCode (chr1.charCodeAt (0) - 32); -}if ('a' <= chr2 && chr2 <= 'z') { -chr2 = String.fromCharCode (chr2.charCodeAt (0) - 32); -}if (chr1 != chr2) { -if (agap) { -if (ungappedOnly) { -elen--; -} else if (!wcGaps) { -bad++; -}} else { -bad++; -}}} -if (elen < 1) { -return 0; -}return (100 * (elen - bad)) / elen; -}, "~S,~S,~N,~N,~B,~B"); -c$.isGap = Clazz.defineMethod (c$, "isGap", -function (c) { -return (c == '-' || c == '.' || c == ' ') ? true : false; -}, "~S"); -c$.isNucleotide = Clazz.defineMethod (c$, "isNucleotide", -function (seqs) { -if (seqs == null) { -return false; -}var ntCount = 0; -var aaCount = 0; -for (var seq, $seq = 0, $$seq = seqs; $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { -if (seq == null) { -continue; -}for (var c, $c = 0, $$c = seq.getSequence (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { -if ('a' <= c && c <= 'z') { -c = String.fromCharCode (c.charCodeAt (0) - 32); -}if (c == 'A' || c == 'G' || c == 'C' || c == 'T' || c == 'U') { -ntCount++; -} else if (!jalview.util.Comparison.isGap (c)) { -aaCount++; -}} -} -if (ntCount * 100 > 85 * (ntCount + aaCount)) { -return true; -} else { -return false; -}}, "~A"); -c$.isNucleotide2 = Clazz.defineMethod (c$, "isNucleotide2", -function (seqs) { -if (seqs == null) { -return false; -}var flattened = new java.util.ArrayList (); -for (var ss, $ss = 0, $$ss = seqs; $ss < $$ss.length && ((ss = $$ss[$ss]) || true); $ss++) { -for (var s, $s = 0, $$s = ss; $s < $$s.length && ((s = $$s[$s]) || true); $s++) { -flattened.add (s); -} -} -var oneDArray = flattened.toArray ( new Array (flattened.size ())); -return jalview.util.Comparison.isNucleotide (oneDArray); -}, "~A"); -Clazz.defineStatics (c$, -"EIGHTY_FIVE", 85, -"TO_UPPER_CASE", 32, -"GAP_SPACE", ' ', -"GAP_DOT", '.', -"GAP_DASH", '-'); -c$.GapChars = c$.prototype.GapChars = String.instantialize ( Clazz.newCharArray (-1, [' ', '.', '-'])); -Clazz.defineStatics (c$, -"caseShift", 32); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.Comparison", ["java.util.ArrayList"], function () { +c$ = Clazz.declareType (jalview.util, "Comparison"); +c$.compare = Clazz.defineMethod (c$, "compare", +function (ii, jj) { +return jalview.util.Comparison.compare (ii, jj, 0, ii.getLength () - 1); +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI"); +c$.compare = Clazz.defineMethod (c$, "compare", +function (ii, jj, start, end) { +var si = ii.getSequenceAsString (); +var sj = jj.getSequenceAsString (); +var ilen = si.length - 1; +var jlen = sj.length - 1; +while (jalview.util.Comparison.isGap (si.charAt (start + ilen))) { +ilen--; +} +while (jalview.util.Comparison.isGap (sj.charAt (start + jlen))) { +jlen--; +} +var count = 0; +var match = 0; +var pid = -1; +if (ilen > jlen) { +for (var j = 0; j < jlen; j++) { +if (si.substring (start + j, start + j + 1).equals (sj.substring (start + j, start + j + 1))) { +match++; +}count++; +} +pid = match / ilen * 100; +} else { +for (var j = 0; j < jlen; j++) { +if (si.substring (start + j, start + j + 1).equals (sj.substring (start + j, start + j + 1))) { +match++; +}count++; +} +pid = match / jlen * 100; +}return pid; +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceI,~N,~N"); +c$.PID = Clazz.defineMethod (c$, "PID", +function (seq1, seq2) { +return jalview.util.Comparison.PID (seq1, seq2, 0, seq1.length); +}, "~S,~S"); +c$.PID = Clazz.defineMethod (c$, "PID", +function (seq1, seq2, start, end) { +return jalview.util.Comparison.PID (seq1, seq2, start, end, true, false); +}, "~S,~S,~N,~N"); +c$.PID = Clazz.defineMethod (c$, "PID", +function (seq1, seq2, start, end, wcGaps, ungappedOnly) { +var s1len = seq1.length; +var s2len = seq2.length; +var len = Math.min (s1len, s2len); +if (end < len) { +len = end; +}if (len < start) { +start = len - 1; +}var elen = len - start; +var bad = 0; +var chr1; +var chr2; +var agap; +for (var i = start; i < len; i++) { +chr1 = seq1.charAt (i); +chr2 = seq2.charAt (i); +agap = jalview.util.Comparison.isGap (chr1) || jalview.util.Comparison.isGap (chr2); +if ('a' <= chr1 && chr1 <= 'z') { +chr1 = String.fromCharCode (chr1.charCodeAt (0) - 32); +}if ('a' <= chr2 && chr2 <= 'z') { +chr2 = String.fromCharCode (chr2.charCodeAt (0) - 32); +}if (chr1 != chr2) { +if (agap) { +if (ungappedOnly) { +elen--; +} else if (!wcGaps) { +bad++; +}} else { +bad++; +}}} +if (elen < 1) { +return 0; +}return (100 * (elen - bad)) / elen; +}, "~S,~S,~N,~N,~B,~B"); +c$.isGap = Clazz.defineMethod (c$, "isGap", +function (c) { +return (c == '-' || c == '.' || c == ' ') ? true : false; +}, "~S"); +c$.isNucleotide = Clazz.defineMethod (c$, "isNucleotide", +function (seqs) { +if (seqs == null) { +return false; +}var ntCount = 0; +var aaCount = 0; +for (var seq, $seq = 0, $$seq = seqs; $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { +if (seq == null) { +continue; +}for (var c, $c = 0, $$c = seq.getSequence (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { +if ('a' <= c && c <= 'z') { +c = String.fromCharCode (c.charCodeAt (0) - 32); +}if (c == 'A' || c == 'G' || c == 'C' || c == 'T' || c == 'U') { +ntCount++; +} else if (!jalview.util.Comparison.isGap (c)) { +aaCount++; +}} +} +if (ntCount * 100 > 85 * (ntCount + aaCount)) { +return true; +} else { +return false; +}}, "~A"); +c$.isNucleotide2 = Clazz.defineMethod (c$, "isNucleotide2", +function (seqs) { +if (seqs == null) { +return false; +}var flattened = new java.util.ArrayList (); +for (var ss, $ss = 0, $$ss = seqs; $ss < $$ss.length && ((ss = $$ss[$ss]) || true); $ss++) { +for (var s, $s = 0, $$s = ss; $s < $$s.length && ((s = $$s[$s]) || true); $s++) { +flattened.add (s); +} +} +var oneDArray = flattened.toArray ( new Array (flattened.size ())); +return jalview.util.Comparison.isNucleotide (oneDArray); +}, "~A"); +Clazz.defineStatics (c$, +"EIGHTY_FIVE", 85, +"TO_UPPER_CASE", 32, +"GAP_SPACE", ' ', +"GAP_DOT", '.', +"GAP_DASH", '-'); +c$.GapChars = c$.prototype.GapChars = String.instantialize ( Clazz.newCharArray (-1, [' ', '.', '-'])); +Clazz.defineStatics (c$, +"caseShift", 32); +}); diff --git a/bin/jalview/util/DBRefUtils.class b/bin/jalview/util/DBRefUtils.class index fae20248a46d0ce4002c29ccbefe4b8620e665f5..0686bf29f903954d91d251fe94f2c8f0239086e3 100644 GIT binary patch delta 28 kcmexi_}y^BbTLNW%`?RAGBWEkuuZOz&|s9DyhtJp0GfIUJOBUy delta 29 lcmexv_``6+bTLN0%`?RAGBO)5uura#&|nf{n!HdV3;?1$2|fS- diff --git a/bin/jalview/util/DBRefUtils.js b/bin/jalview/util/DBRefUtils.js index 051cde7..b27f196 100644 --- a/bin/jalview/util/DBRefUtils.js +++ b/bin/jalview/util/DBRefUtils.js @@ -1,184 +1,184 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.util.HashMap"], "jalview.util.DBRefUtils", ["jalview.datamodel.DBRefEntry", "$.DBRefSource", "$.PDBEntry", "jalview.jsdev.RegExp", "java.util.ArrayList", "$.Hashtable"], function () { -c$ = Clazz.declareType (jalview.util, "DBRefUtils"); -c$.selectRefs = Clazz.defineMethod (c$, "selectRefs", -function (dbrefs, sources) { -if (dbrefs == null) { -return null; -}if (sources == null) { -return dbrefs; -}var srcs = new java.util.HashMap (); -var res = new java.util.ArrayList (); -for (var i = 0; i < sources.length; i++) { -srcs.put ( String.instantialize (sources[i]), new Integer (i)); -} -for (var i = 0, j = dbrefs.length; i < j; i++) { -if (srcs.containsKey (dbrefs[i].getSource ())) { -res.add (dbrefs[i]); -}} -if (res.size () > 0) { -var reply = new Array (res.size ()); -return res.toArray (reply); -}res = null; -return null; -}, "~A,~A"); -c$.isDasCoordinateSystem = Clazz.defineMethod (c$, "isDasCoordinateSystem", -function (string, dBRefEntry) { -if (string == null || dBRefEntry == null) { -return false; -}var coordsys = jalview.util.DBRefUtils.dasCoordinateSystemsLookup.get (string.toLowerCase ()); -return coordsys == null ? false : coordsys.equals (dBRefEntry.getSource ()); -}, "~S,jalview.datamodel.DBRefEntry"); -c$.getCanonicalName = Clazz.defineMethod (c$, "getCanonicalName", -function (source) { -if (source == null) { -return null; -}var canonical = jalview.util.DBRefUtils.canonicalSourceNameLookup.get (source.toLowerCase ()); -return canonical == null ? source : canonical; -}, "~S"); -c$.searchRefs = Clazz.defineMethod (c$, "searchRefs", -function (ref, entry) { -return jalview.util.DBRefUtils.searchRefs (ref, entry, jalview.util.DBRefUtils.matchDbAndIdAndEitherMapOrEquivalentMapList); -}, "~A,jalview.datamodel.DBRefEntry"); -c$.searchRefs = Clazz.defineMethod (c$, "searchRefs", -function (refs, entry, comparator) { -if (refs == null || entry == null) { -return null; -}var rfs = new java.util.ArrayList (); -for (var i = 0; i < refs.length; i++) { -if (comparator.matches (entry, refs[i])) { -rfs.add (refs[i]); -}} -return rfs.size () == 0 ? null : rfs.toArray ( new Array (rfs.size ())); -}, "~A,jalview.datamodel.DBRefEntry,jalview.util.DBRefUtils.DbRefComp"); -c$.parseToDbRef = Clazz.defineMethod (c$, "parseToDbRef", -function (seq, dbname, version, acn) { -var ref = null; -if (dbname != null) { -var locsrc = jalview.util.DBRefUtils.getCanonicalName (dbname); -if (locsrc.equals (jalview.datamodel.DBRefSource.PDB)) { -var r = jalview.jsdev.RegExp.newRegex (["([0-9][0-9A-Za-z]{3})\\s*(.?)\\s*;\\s*([0-9]+)-([0-9]+)"]); -if (r.search (acn.trim ())) { -var pdbid = r.stringMatchedI (1); -var chaincode = r.stringMatchedI (2); -if (chaincode == null) { -chaincode = " "; -}if (chaincode.equals (" ")) { -chaincode = "_"; -}ref = new jalview.datamodel.DBRefEntry (locsrc, version, pdbid + chaincode); -var pdbr = new jalview.datamodel.PDBEntry (); -pdbr.setId (pdbid); -pdbr.setType (jalview.datamodel.PDBEntry.Type.PDB); -pdbr.setProperty ( new java.util.Hashtable ()); -pdbr.setChainCode (chaincode); -seq.addPDBId (pdbr); -} else { -System.err.println ("Malformed PDB DR line:" + acn); -}} else { -ref = new jalview.datamodel.DBRefEntry (locsrc, version, acn); -}}if (ref != null) { -seq.addDBRef (ref); -}return ref; -}, "jalview.datamodel.SequenceI,~S,~S,~S"); -c$.$DBRefUtils$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$1", null, jalview.util.DBRefUtils.DbRefComp); -Clazz.defineMethod (c$, "matches", -function (refa, refb) { -if (refa.getSource () == null || refb.getSource ().equals (refa.getSource ())) { -if (refa.getVersion () == null || refb.getVersion ().equals (refa.getVersion ())) { -if (refa.getAccessionId () == null || refb.getAccessionId ().equals (refa.getAccessionId ())) { -if (refa.getMap () == null || (refb.getMap () != null && refb.getMap ().equals (refa.getMap ()))) { -return true; -}}}}return false; -}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); -c$ = Clazz.p0p (); -}; -c$.$DBRefUtils$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$2", null, jalview.util.DBRefUtils.DbRefComp); -Clazz.defineMethod (c$, "matches", -function (refa, refb) { -if ((refa.getSource () == null || refb.getSource () == null) || refb.getSource ().equals (refa.getSource ())) { -if ((refa.getVersion () == null || refb.getVersion () == null) || refb.getVersion ().equals (refa.getVersion ())) { -if ((refa.getAccessionId () == null || refb.getAccessionId () == null) || refb.getAccessionId ().equals (refa.getAccessionId ())) { -if ((refa.getMap () == null || refb.getMap () == null) || (refb.getMap () != null && refb.getMap ().equals (refa.getMap ()))) { -return true; -}}}}return false; -}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); -c$ = Clazz.p0p (); -}; -c$.$DBRefUtils$3$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$3", null, jalview.util.DBRefUtils.DbRefComp); -Clazz.defineMethod (c$, "matches", -function (refa, refb) { -if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { -if (refa.getAccessionId () != null && refb.getAccessionId () != null || refb.getAccessionId ().equals (refa.getAccessionId ())) { -if ((refa.getMap () == null || refb.getMap () == null) || (refa.getMap () != null && refb.getMap () != null && refb.getMap ().equals (refa.getMap ()))) { -return true; -}}}return false; -}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); -c$ = Clazz.p0p (); -}; -c$.$DBRefUtils$4$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$4", null, jalview.util.DBRefUtils.DbRefComp); -Clazz.defineMethod (c$, "matches", -function (refa, refb) { -if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { -if (refa.getAccessionId () != null && refb.getAccessionId () != null || refb.getAccessionId ().equals (refa.getAccessionId ())) { -if ((refa.getMap () == null && refb.getMap () == null) || (refa.getMap () != null && refb.getMap () != null)) { -if ((refb.getMap ().getMap () == null && refa.getMap ().getMap () == null) || (refb.getMap ().getMap () != null && refa.getMap ().getMap () != null && refb.getMap ().getMap ().getInverse ().equals (refa.getMap ().getMap ()))) { -return true; -}}}}return false; -}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); -c$ = Clazz.p0p (); -}; -c$.$DBRefUtils$5$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$5", null, jalview.util.DBRefUtils.DbRefComp); -Clazz.defineMethod (c$, "matches", -function (refa, refb) { -if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { -if (refa.getAccessionId () != null && refb.getAccessionId () != null || refb.getAccessionId ().equals (refa.getAccessionId ())) { -if (refa.getMap () == null && refb.getMap () == null) { -return true; -}if (refa.getMap () != null && refb.getMap () != null && ((refb.getMap ().getMap () == null && refa.getMap ().getMap () == null) || (refb.getMap ().getMap () != null && refa.getMap ().getMap () != null && refb.getMap ().getMap ().equals (refa.getMap ().getMap ())))) { -return true; -}}}return false; -}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); -c$ = Clazz.p0p (); -}; -c$.$DBRefUtils$6$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$6", null, jalview.util.DBRefUtils.DbRefComp); -Clazz.defineMethod (c$, "matches", -function (refa, refb) { -if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { -if (refa.getAccessionId () != null && refb.getAccessionId () != null && refb.getAccessionId ().equals (refa.getAccessionId ())) { -if (refa.getMap () == null || refb.getMap () == null) { -return true; -}if ((refa.getMap () != null && refb.getMap () != null) && (refb.getMap ().getMap () == null && refa.getMap ().getMap () == null) || (refb.getMap ().getMap () != null && refa.getMap ().getMap () != null && (refb.getMap ().getMap ().equals (refa.getMap ().getMap ())))) { -return true; -}}}return false; -}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); -c$ = Clazz.p0p (); -}; -Clazz.declareInterface (jalview.util.DBRefUtils, "DbRefComp"); -c$.canonicalSourceNameLookup = c$.prototype.canonicalSourceNameLookup = new java.util.HashMap (); -c$.dasCoordinateSystemsLookup = c$.prototype.dasCoordinateSystemsLookup = new java.util.HashMap (); -{ -jalview.util.DBRefUtils.canonicalSourceNameLookup.put ("uniprotkb/swiss-prot", jalview.datamodel.DBRefSource.UNIPROT); -jalview.util.DBRefUtils.canonicalSourceNameLookup.put ("uniprotkb/trembl", jalview.datamodel.DBRefSource.UNIPROT); -jalview.util.DBRefUtils.canonicalSourceNameLookup.put ("pdb", jalview.datamodel.DBRefSource.PDB); -jalview.util.DBRefUtils.dasCoordinateSystemsLookup.put ("pdbresnum", jalview.datamodel.DBRefSource.PDB); -jalview.util.DBRefUtils.dasCoordinateSystemsLookup.put ("uniprot", jalview.datamodel.DBRefSource.UNIPROT); -jalview.util.DBRefUtils.dasCoordinateSystemsLookup.put ("embl", jalview.datamodel.DBRefSource.EMBL); -}c$.matchNonNullonA = c$.prototype.matchNonNullonA = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$1") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$1$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$1, this, null)); -c$.matchEitherNonNull = c$.prototype.matchEitherNonNull = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$2") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$2$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$2, this, null)); -c$.matchDbAndIdAndEitherMap = c$.prototype.matchDbAndIdAndEitherMap = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$3") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$3$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$3, this, null)); -c$.matchDbAndIdAndComplementaryMapList = c$.prototype.matchDbAndIdAndComplementaryMapList = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$4") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$4$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$4, this, null)); -c$.matchDbAndIdAndEquivalentMapList = c$.prototype.matchDbAndIdAndEquivalentMapList = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$5") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$5$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$5, this, null)); -c$.matchDbAndIdAndEitherMapOrEquivalentMapList = c$.prototype.matchDbAndIdAndEitherMapOrEquivalentMapList = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$6") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$6$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$6, this, null)); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.util.HashMap"], "jalview.util.DBRefUtils", ["jalview.datamodel.DBRefEntry", "$.DBRefSource", "$.PDBEntry", "jalview.jsdev.RegExp", "java.util.ArrayList", "$.Hashtable"], function () { +c$ = Clazz.declareType (jalview.util, "DBRefUtils"); +c$.selectRefs = Clazz.defineMethod (c$, "selectRefs", +function (dbrefs, sources) { +if (dbrefs == null) { +return null; +}if (sources == null) { +return dbrefs; +}var srcs = new java.util.HashMap (); +var res = new java.util.ArrayList (); +for (var i = 0; i < sources.length; i++) { +srcs.put ( String.instantialize (sources[i]), new Integer (i)); +} +for (var i = 0, j = dbrefs.length; i < j; i++) { +if (srcs.containsKey (dbrefs[i].getSource ())) { +res.add (dbrefs[i]); +}} +if (res.size () > 0) { +var reply = new Array (res.size ()); +return res.toArray (reply); +}res = null; +return null; +}, "~A,~A"); +c$.isDasCoordinateSystem = Clazz.defineMethod (c$, "isDasCoordinateSystem", +function (string, dBRefEntry) { +if (string == null || dBRefEntry == null) { +return false; +}var coordsys = jalview.util.DBRefUtils.dasCoordinateSystemsLookup.get (string.toLowerCase ()); +return coordsys == null ? false : coordsys.equals (dBRefEntry.getSource ()); +}, "~S,jalview.datamodel.DBRefEntry"); +c$.getCanonicalName = Clazz.defineMethod (c$, "getCanonicalName", +function (source) { +if (source == null) { +return null; +}var canonical = jalview.util.DBRefUtils.canonicalSourceNameLookup.get (source.toLowerCase ()); +return canonical == null ? source : canonical; +}, "~S"); +c$.searchRefs = Clazz.defineMethod (c$, "searchRefs", +function (ref, entry) { +return jalview.util.DBRefUtils.searchRefs (ref, entry, jalview.util.DBRefUtils.matchDbAndIdAndEitherMapOrEquivalentMapList); +}, "~A,jalview.datamodel.DBRefEntry"); +c$.searchRefs = Clazz.defineMethod (c$, "searchRefs", +function (refs, entry, comparator) { +if (refs == null || entry == null) { +return null; +}var rfs = new java.util.ArrayList (); +for (var i = 0; i < refs.length; i++) { +if (comparator.matches (entry, refs[i])) { +rfs.add (refs[i]); +}} +return rfs.size () == 0 ? null : rfs.toArray ( new Array (rfs.size ())); +}, "~A,jalview.datamodel.DBRefEntry,jalview.util.DBRefUtils.DbRefComp"); +c$.parseToDbRef = Clazz.defineMethod (c$, "parseToDbRef", +function (seq, dbname, version, acn) { +var ref = null; +if (dbname != null) { +var locsrc = jalview.util.DBRefUtils.getCanonicalName (dbname); +if (locsrc.equals (jalview.datamodel.DBRefSource.PDB)) { +var r = jalview.jsdev.RegExp.newRegex (["([0-9][0-9A-Za-z]{3})\\s*(.?)\\s*;\\s*([0-9]+)-([0-9]+)"]); +if (r.search (acn.trim ())) { +var pdbid = r.stringMatchedI (1); +var chaincode = r.stringMatchedI (2); +if (chaincode == null) { +chaincode = " "; +}if (chaincode.equals (" ")) { +chaincode = "_"; +}ref = new jalview.datamodel.DBRefEntry (locsrc, version, pdbid + chaincode); +var pdbr = new jalview.datamodel.PDBEntry (); +pdbr.setId (pdbid); +pdbr.setType (jalview.datamodel.PDBEntry.Type.PDB); +pdbr.setProperty ( new java.util.Hashtable ()); +pdbr.setChainCode (chaincode); +seq.addPDBId (pdbr); +} else { +System.err.println ("Malformed PDB DR line:" + acn); +}} else { +ref = new jalview.datamodel.DBRefEntry (locsrc, version, acn); +}}if (ref != null) { +seq.addDBRef (ref); +}return ref; +}, "jalview.datamodel.SequenceI,~S,~S,~S"); +c$.$DBRefUtils$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$1", null, jalview.util.DBRefUtils.DbRefComp); +Clazz.defineMethod (c$, "matches", +function (refa, refb) { +if (refa.getSource () == null || refb.getSource ().equals (refa.getSource ())) { +if (refa.getVersion () == null || refb.getVersion ().equals (refa.getVersion ())) { +if (refa.getAccessionId () == null || refb.getAccessionId ().equals (refa.getAccessionId ())) { +if (refa.getMap () == null || (refb.getMap () != null && refb.getMap ().equals (refa.getMap ()))) { +return true; +}}}}return false; +}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); +c$ = Clazz.p0p (); +}; +c$.$DBRefUtils$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$2", null, jalview.util.DBRefUtils.DbRefComp); +Clazz.defineMethod (c$, "matches", +function (refa, refb) { +if ((refa.getSource () == null || refb.getSource () == null) || refb.getSource ().equals (refa.getSource ())) { +if ((refa.getVersion () == null || refb.getVersion () == null) || refb.getVersion ().equals (refa.getVersion ())) { +if ((refa.getAccessionId () == null || refb.getAccessionId () == null) || refb.getAccessionId ().equals (refa.getAccessionId ())) { +if ((refa.getMap () == null || refb.getMap () == null) || (refb.getMap () != null && refb.getMap ().equals (refa.getMap ()))) { +return true; +}}}}return false; +}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); +c$ = Clazz.p0p (); +}; +c$.$DBRefUtils$3$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$3", null, jalview.util.DBRefUtils.DbRefComp); +Clazz.defineMethod (c$, "matches", +function (refa, refb) { +if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { +if (refa.getAccessionId () != null && refb.getAccessionId () != null || refb.getAccessionId ().equals (refa.getAccessionId ())) { +if ((refa.getMap () == null || refb.getMap () == null) || (refa.getMap () != null && refb.getMap () != null && refb.getMap ().equals (refa.getMap ()))) { +return true; +}}}return false; +}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); +c$ = Clazz.p0p (); +}; +c$.$DBRefUtils$4$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$4", null, jalview.util.DBRefUtils.DbRefComp); +Clazz.defineMethod (c$, "matches", +function (refa, refb) { +if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { +if (refa.getAccessionId () != null && refb.getAccessionId () != null || refb.getAccessionId ().equals (refa.getAccessionId ())) { +if ((refa.getMap () == null && refb.getMap () == null) || (refa.getMap () != null && refb.getMap () != null)) { +if ((refb.getMap ().getMap () == null && refa.getMap ().getMap () == null) || (refb.getMap ().getMap () != null && refa.getMap ().getMap () != null && refb.getMap ().getMap ().getInverse ().equals (refa.getMap ().getMap ()))) { +return true; +}}}}return false; +}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); +c$ = Clazz.p0p (); +}; +c$.$DBRefUtils$5$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$5", null, jalview.util.DBRefUtils.DbRefComp); +Clazz.defineMethod (c$, "matches", +function (refa, refb) { +if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { +if (refa.getAccessionId () != null && refb.getAccessionId () != null || refb.getAccessionId ().equals (refa.getAccessionId ())) { +if (refa.getMap () == null && refb.getMap () == null) { +return true; +}if (refa.getMap () != null && refb.getMap () != null && ((refb.getMap ().getMap () == null && refa.getMap ().getMap () == null) || (refb.getMap ().getMap () != null && refa.getMap ().getMap () != null && refb.getMap ().getMap ().equals (refa.getMap ().getMap ())))) { +return true; +}}}return false; +}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); +c$ = Clazz.p0p (); +}; +c$.$DBRefUtils$6$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "DBRefUtils$6", null, jalview.util.DBRefUtils.DbRefComp); +Clazz.defineMethod (c$, "matches", +function (refa, refb) { +if (refa.getSource () != null && refb.getSource () != null && refb.getSource ().equals (refa.getSource ())) { +if (refa.getAccessionId () != null && refb.getAccessionId () != null && refb.getAccessionId ().equals (refa.getAccessionId ())) { +if (refa.getMap () == null || refb.getMap () == null) { +return true; +}if ((refa.getMap () != null && refb.getMap () != null) && (refb.getMap ().getMap () == null && refa.getMap ().getMap () == null) || (refb.getMap ().getMap () != null && refa.getMap ().getMap () != null && (refb.getMap ().getMap ().equals (refa.getMap ().getMap ())))) { +return true; +}}}return false; +}, "jalview.datamodel.DBRefEntry,jalview.datamodel.DBRefEntry"); +c$ = Clazz.p0p (); +}; +Clazz.declareInterface (jalview.util.DBRefUtils, "DbRefComp"); +c$.canonicalSourceNameLookup = c$.prototype.canonicalSourceNameLookup = new java.util.HashMap (); +c$.dasCoordinateSystemsLookup = c$.prototype.dasCoordinateSystemsLookup = new java.util.HashMap (); +{ +jalview.util.DBRefUtils.canonicalSourceNameLookup.put ("uniprotkb/swiss-prot", jalview.datamodel.DBRefSource.UNIPROT); +jalview.util.DBRefUtils.canonicalSourceNameLookup.put ("uniprotkb/trembl", jalview.datamodel.DBRefSource.UNIPROT); +jalview.util.DBRefUtils.canonicalSourceNameLookup.put ("pdb", jalview.datamodel.DBRefSource.PDB); +jalview.util.DBRefUtils.dasCoordinateSystemsLookup.put ("pdbresnum", jalview.datamodel.DBRefSource.PDB); +jalview.util.DBRefUtils.dasCoordinateSystemsLookup.put ("uniprot", jalview.datamodel.DBRefSource.UNIPROT); +jalview.util.DBRefUtils.dasCoordinateSystemsLookup.put ("embl", jalview.datamodel.DBRefSource.EMBL); +}c$.matchNonNullonA = c$.prototype.matchNonNullonA = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$1") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$1$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$1, this, null)); +c$.matchEitherNonNull = c$.prototype.matchEitherNonNull = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$2") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$2$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$2, this, null)); +c$.matchDbAndIdAndEitherMap = c$.prototype.matchDbAndIdAndEitherMap = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$3") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$3$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$3, this, null)); +c$.matchDbAndIdAndComplementaryMapList = c$.prototype.matchDbAndIdAndComplementaryMapList = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$4") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$4$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$4, this, null)); +c$.matchDbAndIdAndEquivalentMapList = c$.prototype.matchDbAndIdAndEquivalentMapList = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$5") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$5$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$5, this, null)); +c$.matchDbAndIdAndEitherMapOrEquivalentMapList = c$.prototype.matchDbAndIdAndEitherMapOrEquivalentMapList = ((Clazz.isClassDefined ("jalview.util.DBRefUtils$6") ? 0 : jalview.util.DBRefUtils.$DBRefUtils$6$ ()), Clazz.innerTypeInstance (jalview.util.DBRefUtils$6, this, null)); +}); diff --git a/bin/jalview/util/Format.class b/bin/jalview/util/Format.class index 43f3a99f27fd0a46459a8a2b36088930e0e50955..c8b23d7c74cf083d8b1f9b674c19564bcd8b9ea5 100644 GIT binary patch delta 167 zcmW;EF%H3S7>4op?Z4HuRivskssoWUCW%Xk12}|3IDuG9Mmr+DL@yu)gVpK?CJ7oe z<|of@J)8}9p2N3PowHJXv=+CLPhB3RtKv~E-iF-(_6IhpYhGB-kT6M%7c^KnAO#Ts zS|ls~$z~hw7iAPo3`nJzm;cjaBxx`r=b|+x^g1xVs6jVDJr@xBvJA(HC%H#^I#pO1 M+#IPCWgAb8A58QmmjD0& delta 199 zcmX|)PYMBX9L3-J{l>o;3}cL@n3Xgs3)x%C0UW{+ESx|#4q&Y)`4%UTQWjRWE@45F zF;bSV&-=VL8>|Og$6_QE>#TJb!Qx(Y6_q@SH_fA5oDEwwSZ|o5p&Z{;5kiJx>IH=y z_Bep>02Rp6eX`Mn9m7UCgC40h6Y`VV^p%J=Bv0#%0~*N&f*9pr`no`z c9Q>h7{E_BKuJs-BF3bppq*cl(nFrI<2cID*<^TWy diff --git a/bin/jalview/util/Format.js b/bin/jalview/util/Format.js index 739add8..95a3560 100644 --- a/bin/jalview/util/Format.js +++ b/bin/jalview/util/Format.js @@ -1,389 +1,389 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.Format", ["java.lang.Character", "$.IllegalArgumentException", "$.StringBuffer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.width = 0; -this.precision = 0; -this.pre = null; -this.post = null; -this.leading_zeroes = false; -this.show_plus = false; -this.alternate = false; -this.show_space = false; -this.left_align = false; -this.fmt = '\0'; -this.formatString = null; -Clazz.instantialize (this, arguments); -}, jalview.util, "Format"); -Clazz.makeConstructor (c$, -function (s) { -this.formatString = s; -this.width = 0; -this.precision = -1; -this.pre = ""; -this.post = ""; -this.leading_zeroes = false; -this.show_plus = false; -this.alternate = false; -this.show_space = false; -this.left_align = false; -this.fmt = ' '; -var length = s.length; -var parse_state = 0; -var i = 0; -while (parse_state == 0) { -if (i >= length) { -parse_state = 5; -} else if (s.charAt (i) == '%') { -if (i < (length - 1)) { -if (s.charAt (i + 1) == '%') { -this.pre = this.pre + '%'; -i++; -} else { -parse_state = 1; -}} else { -throw new IllegalArgumentException (); -}} else { -this.pre = this.pre + s.charAt (i); -}i++; -} -while (parse_state == 1) { -if (i >= length) { -parse_state = 5; -} else if (s.charAt (i) == ' ') { -this.show_space = true; -} else if (s.charAt (i) == '-') { -this.left_align = true; -} else if (s.charAt (i) == '+') { -this.show_plus = true; -} else if (s.charAt (i) == '0') { -this.leading_zeroes = true; -} else if (s.charAt (i) == '#') { -this.alternate = true; -} else { -parse_state = 2; -i--; -}i++; -} -while (parse_state == 2) { -if (i >= length) { -parse_state = 5; -} else if (('0' <= s.charAt (i)) && (s.charAt (i) <= '9')) { -this.width = ((this.width * 10) + s.charCodeAt (i)) - 48; -i++; -} else if (s.charAt (i) == '.') { -parse_state = 3; -this.precision = 0; -i++; -} else { -parse_state = 4; -}} -while (parse_state == 3) { -if (i >= length) { -parse_state = 5; -} else if (('0' <= s.charAt (i)) && (s.charAt (i) <= '9')) { -this.precision = ((this.precision * 10) + s.charCodeAt (i)) - 48; -i++; -} else { -parse_state = 4; -}} -if (parse_state == 4) { -if (i >= length) { -parse_state = 5; -} else { -this.fmt = s.charAt (i); -}i++; -}if (i < length) { -this.post = s.substring (i, length); -}}, "~S"); -c$.getHexString = Clazz.defineMethod (c$, "getHexString", -function (color) { -var r; -var g; -var b; -r = Integer.toHexString (color.getRed ()); -if (r.length < 2) { -r = "0" + r; -}g = Integer.toHexString (color.getGreen ()); -if (g.length < 2) { -g = "0" + g; -}b = Integer.toHexString (color.getBlue ()); -if (b.length < 2) { -b = "0" + b; -}return r + g + b; -}, "java.awt.Color"); -c$.printDouble = Clazz.defineMethod (c$, "printDouble", -function (s, fmt, x) { -s.print ( new jalview.util.Format (fmt).formDouble (x)); -}, "java.io.PrintStream,~S,~N"); -c$.printLong = Clazz.defineMethod (c$, "printLong", -function (s, fmt, x) { -s.print ( new jalview.util.Format (fmt).formLong (x)); -}, "java.io.PrintStream,~S,~N"); -c$.printChar = Clazz.defineMethod (c$, "printChar", -function (s, fmt, x) { -s.print ( new jalview.util.Format (fmt).formChar (x)); -}, "java.io.PrintStream,~S,~S"); -c$.print = Clazz.defineMethod (c$, "print", -function (s, fmt, x) { -s.print ( new jalview.util.Format (fmt).form (x)); -}, "java.io.PrintStream,~S,~S"); -c$.atoi = Clazz.defineMethod (c$, "atoi", -function (s) { -return jalview.util.Format.atol (s); -}, "~S"); -c$.atol = Clazz.defineMethod (c$, "atol", -function (s) { -var i = 0; -while ((i < s.length) && Character.isWhitespace (s.charAt (i))) { -i++; -} -if ((i < s.length) && (s.charAt (i) == '0')) { -if (((i + 1) < s.length) && ((s.charAt (i + 1) == 'x') || (s.charAt (i + 1) == 'X'))) { -return jalview.util.Format.parseLong (s.substring (i + 2), 16); -} else { -return jalview.util.Format.parseLong (s, 8); -}} else { -return jalview.util.Format.parseLong (s, 10); -}}, "~S"); -c$.parseLong = Clazz.defineMethod (c$, "parseLong", -($fz = function (s, base) { -var i = 0; -var sign = 1; -var r = 0; -while ((i < s.length) && Character.isWhitespace (s.charAt (i))) { -i++; -} -if ((i < s.length) && (s.charAt (i) == '-')) { -sign = -1; -i++; -} else if ((i < s.length) && (s.charAt (i) == '+')) { -i++; -}while (i < s.length) { -var ch = s.charAt (i); -if (('0' <= ch) && (ch.charCodeAt (0) < (48 + base))) { -r = ((r * base) + ch.charCodeAt (0)) - 48; -} else if (('A' <= ch) && (ch.charCodeAt (0) < ((65 + base) - 10))) { -r = ((r * base) + ch.charCodeAt (0)) - 65 + 10; -} else if (('a' <= ch) && (ch.charCodeAt (0) < ((97 + base) - 10))) { -r = ((r * base) + ch.charCodeAt (0)) - 97 + 10; -} else { -return r * sign; -}i++; -} -return r * sign; -}, $fz.isPrivate = true, $fz), "~S,~N"); -c$.atof = Clazz.defineMethod (c$, "atof", -function (s) { -var i = 0; -var sign = 1; -var r = 0; -var p = 1; -var state = 0; -while ((i < s.length) && Character.isWhitespace (s.charAt (i))) { -i++; -} -if ((i < s.length) && (s.charAt (i) == '-')) { -sign = -1; -i++; -} else if ((i < s.length) && (s.charAt (i) == '+')) { -i++; -}while (i < s.length) { -var ch = s.charAt (i); -if (('0' <= ch) && (ch <= '9')) { -if (state == 0) { -r = ((r * 10) + ch.charCodeAt (0)) - 48; -} else if (state == 1) { -p = p / 10; -r = r + (p * (ch.charCodeAt (0) - 48)); -}} else if (ch == '.') { -if (state == 0) { -state = 1; -} else { -return sign * r; -}} else if ((ch == 'e') || (ch == 'E')) { -var e = jalview.util.Format.parseLong (s.substring (i + 1), 10); -return sign * r * Math.pow (10, e); -} else { -return sign * r; -}i++; -} -return sign * r; -}, "~S"); -Clazz.defineMethod (c$, "formDouble", -function (x) { -var r; -if (this.precision < 0) { -this.precision = 6; -}var s = 1; -if (x < 0) { -x = -x; -s = -1; -}if (this.fmt == 'f') { -r = this.fixed_format (x); -} else if ((this.fmt == 'e') || (this.fmt == 'E') || (this.fmt == 'g') || (this.fmt == 'G')) { -r = this.exp_format (x); -} else { -throw new IllegalArgumentException (); -}return this.pad (this.sign (s, r)); -}, "~N"); -Clazz.defineMethod (c$, "formLong", -function (x) { -var r; -var s = 0; -if ((this.fmt == 'd') || (this.fmt == 'i')) { -if (x < 0) { -r = ("" + x).substring (1); -s = -1; -} else { -r = "" + x; -s = 1; -}} else if (this.fmt == 'o') { -r = jalview.util.Format.convert (x, 3, 7, "01234567"); -} else if (this.fmt == 'x') { -r = jalview.util.Format.convert (x, 4, 15, "0123456789abcdef"); -} else if (this.fmt == 'X') { -r = jalview.util.Format.convert (x, 4, 15, "0123456789ABCDEF"); -} else { -throw new IllegalArgumentException (); -}return this.pad (this.sign (s, r)); -}, "~N"); -Clazz.defineMethod (c$, "formChar", -function (c) { -if (this.fmt != 'c') { -throw new IllegalArgumentException (); -}var r = "" + c; -return this.pad (r); -}, "~S"); -Clazz.defineMethod (c$, "form", -function (s) { -if (this.fmt != 's') { -throw new IllegalArgumentException (); -}if (this.precision >= 0) { -s = s.substring (0, this.precision); -}return this.pad (s); -}, "~S"); -c$.repeat = Clazz.defineMethod (c$, "repeat", -($fz = function (c, n) { -if (n <= 0) { -return ""; -}var s = new StringBuffer (n); -for (var i = 0; i < n; i++) { -s.append (c); -} -return s.toString (); -}, $fz.isPrivate = true, $fz), "~S,~N"); -c$.convert = Clazz.defineMethod (c$, "convert", -($fz = function (x, n, m, d) { -if (x == 0) { -return "0"; -}var r = ""; -while (x != 0) { -r = d.charAt ((x & m)) + r; -x = x >>> n; -} -return r; -}, $fz.isPrivate = true, $fz), "~N,~N,~N,~S"); -Clazz.defineMethod (c$, "pad", -($fz = function (r) { -var p = jalview.util.Format.repeat (' ', this.width - r.length); -if (this.left_align) { -return this.pre + r + p + this.post; -} else { -return this.pre + p + r + this.post; -}}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "sign", -($fz = function (s, r) { -var p = ""; -if (s < 0) { -p = "-"; -} else if (s > 0) { -if (this.show_plus) { -p = "+"; -} else if (this.show_space) { -p = " "; -}} else { -if ((this.fmt == 'o') && this.alternate && (r.length > 0) && (r.charAt (0) != '0')) { -p = "0"; -} else if ((this.fmt == 'x') && this.alternate) { -p = "0x"; -} else if ((this.fmt == 'X') && this.alternate) { -p = "0X"; -}}var w = 0; -if (this.leading_zeroes) { -w = this.width; -} else if (((this.fmt == 'd') || (this.fmt == 'i') || (this.fmt == 'x') || (this.fmt == 'X') || (this.fmt == 'o')) && (this.precision > 0)) { -w = this.precision; -}return p + jalview.util.Format.repeat ('0', w - p.length - r.length) + r; -}, $fz.isPrivate = true, $fz), "~N,~S"); -Clazz.defineMethod (c$, "fixed_format", -($fz = function (d) { -var removeTrailing = ((this.fmt == 'G') || (this.fmt == 'g')) && !this.alternate; -if (d > 0x7FFFFFFFFFFFFFFF) { -return this.exp_format (d); -}if (this.precision == 0) { -return Clazz.doubleToLong (d + 0.5) + (removeTrailing ? "" : "."); -}var whole = Clazz.doubleToLong (d); -var fr = d - whole; -if ((fr >= 1) || (fr < 0)) { -return this.exp_format (d); -}var factor = 1; -var leading_zeroes = ""; -for (var i = 1; (i <= this.precision) && (factor <= 0x7FFFFFFFFFFFFFFF); i++) { -factor *= 10; -leading_zeroes = leading_zeroes + "0"; -} -var l = Clazz.doubleToLong ((factor * fr) + 0.5); -if (l >= factor) { -l = 0; -whole++; -}var z = leading_zeroes + l; -z = "." + z.substring (z.length - this.precision, z.length); -if (removeTrailing) { -var t = z.length - 1; -while ((t >= 0) && (z.charAt (t) == '0')) { -t--; -} -if ((t >= 0) && (z.charAt (t) == '.')) { -t--; -}z = z.substring (0, t + 1); -}return whole + z; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "exp_format", -($fz = function (d) { -var f = ""; -var e = 0; -var dd = d; -var factor = 1; -if (d != 0) { -while (dd > 10) { -e++; -factor /= 10; -dd = dd / 10; -} -while (dd < 1) { -e--; -factor *= 10; -dd = dd * 10; -} -}if (((this.fmt == 'g') || (this.fmt == 'G')) && (e >= -4) && (e < this.precision)) { -return this.fixed_format (d); -}d = d * factor; -f = f + this.fixed_format (d); -if ((this.fmt == 'e') || (this.fmt == 'g')) { -f = f + "e"; -} else { -f = f + "E"; -}var p = "000"; -if (e >= 0) { -f = f + "+"; -p = p + e; -} else { -f = f + "-"; -p = p + (-e); -}return f + p.substring (p.length - 3, p.length); -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return this.formatString; -}); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.Format", ["java.lang.Character", "$.IllegalArgumentException", "$.StringBuffer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.width = 0; +this.precision = 0; +this.pre = null; +this.post = null; +this.leading_zeroes = false; +this.show_plus = false; +this.alternate = false; +this.show_space = false; +this.left_align = false; +this.fmt = '\0'; +this.formatString = null; +Clazz.instantialize (this, arguments); +}, jalview.util, "Format"); +Clazz.makeConstructor (c$, +function (s) { +this.formatString = s; +this.width = 0; +this.precision = -1; +this.pre = ""; +this.post = ""; +this.leading_zeroes = false; +this.show_plus = false; +this.alternate = false; +this.show_space = false; +this.left_align = false; +this.fmt = ' '; +var length = s.length; +var parse_state = 0; +var i = 0; +while (parse_state == 0) { +if (i >= length) { +parse_state = 5; +} else if (s.charAt (i) == '%') { +if (i < (length - 1)) { +if (s.charAt (i + 1) == '%') { +this.pre = this.pre + '%'; +i++; +} else { +parse_state = 1; +}} else { +throw new IllegalArgumentException (); +}} else { +this.pre = this.pre + s.charAt (i); +}i++; +} +while (parse_state == 1) { +if (i >= length) { +parse_state = 5; +} else if (s.charAt (i) == ' ') { +this.show_space = true; +} else if (s.charAt (i) == '-') { +this.left_align = true; +} else if (s.charAt (i) == '+') { +this.show_plus = true; +} else if (s.charAt (i) == '0') { +this.leading_zeroes = true; +} else if (s.charAt (i) == '#') { +this.alternate = true; +} else { +parse_state = 2; +i--; +}i++; +} +while (parse_state == 2) { +if (i >= length) { +parse_state = 5; +} else if (('0' <= s.charAt (i)) && (s.charAt (i) <= '9')) { +this.width = ((this.width * 10) + s.charCodeAt (i)) - 48; +i++; +} else if (s.charAt (i) == '.') { +parse_state = 3; +this.precision = 0; +i++; +} else { +parse_state = 4; +}} +while (parse_state == 3) { +if (i >= length) { +parse_state = 5; +} else if (('0' <= s.charAt (i)) && (s.charAt (i) <= '9')) { +this.precision = ((this.precision * 10) + s.charCodeAt (i)) - 48; +i++; +} else { +parse_state = 4; +}} +if (parse_state == 4) { +if (i >= length) { +parse_state = 5; +} else { +this.fmt = s.charAt (i); +}i++; +}if (i < length) { +this.post = s.substring (i, length); +}}, "~S"); +c$.getHexString = Clazz.defineMethod (c$, "getHexString", +function (color) { +var r; +var g; +var b; +r = Integer.toHexString (color.getRed ()); +if (r.length < 2) { +r = "0" + r; +}g = Integer.toHexString (color.getGreen ()); +if (g.length < 2) { +g = "0" + g; +}b = Integer.toHexString (color.getBlue ()); +if (b.length < 2) { +b = "0" + b; +}return r + g + b; +}, "java.awt.Color"); +c$.printDouble = Clazz.defineMethod (c$, "printDouble", +function (s, fmt, x) { +s.print ( new jalview.util.Format (fmt).formDouble (x)); +}, "java.io.PrintStream,~S,~N"); +c$.printLong = Clazz.defineMethod (c$, "printLong", +function (s, fmt, x) { +s.print ( new jalview.util.Format (fmt).formLong (x)); +}, "java.io.PrintStream,~S,~N"); +c$.printChar = Clazz.defineMethod (c$, "printChar", +function (s, fmt, x) { +s.print ( new jalview.util.Format (fmt).formChar (x)); +}, "java.io.PrintStream,~S,~S"); +c$.print = Clazz.defineMethod (c$, "print", +function (s, fmt, x) { +s.print ( new jalview.util.Format (fmt).form (x)); +}, "java.io.PrintStream,~S,~S"); +c$.atoi = Clazz.defineMethod (c$, "atoi", +function (s) { +return jalview.util.Format.atol (s); +}, "~S"); +c$.atol = Clazz.defineMethod (c$, "atol", +function (s) { +var i = 0; +while ((i < s.length) && Character.isWhitespace (s.charAt (i))) { +i++; +} +if ((i < s.length) && (s.charAt (i) == '0')) { +if (((i + 1) < s.length) && ((s.charAt (i + 1) == 'x') || (s.charAt (i + 1) == 'X'))) { +return jalview.util.Format.parseLong (s.substring (i + 2), 16); +} else { +return jalview.util.Format.parseLong (s, 8); +}} else { +return jalview.util.Format.parseLong (s, 10); +}}, "~S"); +c$.parseLong = Clazz.defineMethod (c$, "parseLong", +($fz = function (s, base) { +var i = 0; +var sign = 1; +var r = 0; +while ((i < s.length) && Character.isWhitespace (s.charAt (i))) { +i++; +} +if ((i < s.length) && (s.charAt (i) == '-')) { +sign = -1; +i++; +} else if ((i < s.length) && (s.charAt (i) == '+')) { +i++; +}while (i < s.length) { +var ch = s.charAt (i); +if (('0' <= ch) && (ch.charCodeAt (0) < (48 + base))) { +r = ((r * base) + ch.charCodeAt (0)) - 48; +} else if (('A' <= ch) && (ch.charCodeAt (0) < ((65 + base) - 10))) { +r = ((r * base) + ch.charCodeAt (0)) - 65 + 10; +} else if (('a' <= ch) && (ch.charCodeAt (0) < ((97 + base) - 10))) { +r = ((r * base) + ch.charCodeAt (0)) - 97 + 10; +} else { +return r * sign; +}i++; +} +return r * sign; +}, $fz.isPrivate = true, $fz), "~S,~N"); +c$.atof = Clazz.defineMethod (c$, "atof", +function (s) { +var i = 0; +var sign = 1; +var r = 0; +var p = 1; +var state = 0; +while ((i < s.length) && Character.isWhitespace (s.charAt (i))) { +i++; +} +if ((i < s.length) && (s.charAt (i) == '-')) { +sign = -1; +i++; +} else if ((i < s.length) && (s.charAt (i) == '+')) { +i++; +}while (i < s.length) { +var ch = s.charAt (i); +if (('0' <= ch) && (ch <= '9')) { +if (state == 0) { +r = ((r * 10) + ch.charCodeAt (0)) - 48; +} else if (state == 1) { +p = p / 10; +r = r + (p * (ch.charCodeAt (0) - 48)); +}} else if (ch == '.') { +if (state == 0) { +state = 1; +} else { +return sign * r; +}} else if ((ch == 'e') || (ch == 'E')) { +var e = jalview.util.Format.parseLong (s.substring (i + 1), 10); +return sign * r * Math.pow (10, e); +} else { +return sign * r; +}i++; +} +return sign * r; +}, "~S"); +Clazz.defineMethod (c$, "formDouble", +function (x) { +var r; +if (this.precision < 0) { +this.precision = 6; +}var s = 1; +if (x < 0) { +x = -x; +s = -1; +}if (this.fmt == 'f') { +r = this.fixed_format (x); +} else if ((this.fmt == 'e') || (this.fmt == 'E') || (this.fmt == 'g') || (this.fmt == 'G')) { +r = this.exp_format (x); +} else { +throw new IllegalArgumentException (); +}return this.pad (this.sign (s, r)); +}, "~N"); +Clazz.defineMethod (c$, "formLong", +function (x) { +var r; +var s = 0; +if ((this.fmt == 'd') || (this.fmt == 'i')) { +if (x < 0) { +r = ("" + x).substring (1); +s = -1; +} else { +r = "" + x; +s = 1; +}} else if (this.fmt == 'o') { +r = jalview.util.Format.convert (x, 3, 7, "01234567"); +} else if (this.fmt == 'x') { +r = jalview.util.Format.convert (x, 4, 15, "0123456789abcdef"); +} else if (this.fmt == 'X') { +r = jalview.util.Format.convert (x, 4, 15, "0123456789ABCDEF"); +} else { +throw new IllegalArgumentException (); +}return this.pad (this.sign (s, r)); +}, "~N"); +Clazz.defineMethod (c$, "formChar", +function (c) { +if (this.fmt != 'c') { +throw new IllegalArgumentException (); +}var r = "" + c; +return this.pad (r); +}, "~S"); +Clazz.defineMethod (c$, "form", +function (s) { +if (this.fmt != 's') { +throw new IllegalArgumentException (); +}if (this.precision >= 0) { +s = s.substring (0, this.precision); +}return this.pad (s); +}, "~S"); +c$.repeat = Clazz.defineMethod (c$, "repeat", +($fz = function (c, n) { +if (n <= 0) { +return ""; +}var s = new StringBuffer (n); +for (var i = 0; i < n; i++) { +s.append (c); +} +return s.toString (); +}, $fz.isPrivate = true, $fz), "~S,~N"); +c$.convert = Clazz.defineMethod (c$, "convert", +($fz = function (x, n, m, d) { +if (x == 0) { +return "0"; +}var r = ""; +while (x != 0) { +r = d.charAt ((x & m)) + r; +x = x >>> n; +} +return r; +}, $fz.isPrivate = true, $fz), "~N,~N,~N,~S"); +Clazz.defineMethod (c$, "pad", +($fz = function (r) { +var p = jalview.util.Format.repeat (' ', this.width - r.length); +if (this.left_align) { +return this.pre + r + p + this.post; +} else { +return this.pre + p + r + this.post; +}}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "sign", +($fz = function (s, r) { +var p = ""; +if (s < 0) { +p = "-"; +} else if (s > 0) { +if (this.show_plus) { +p = "+"; +} else if (this.show_space) { +p = " "; +}} else { +if ((this.fmt == 'o') && this.alternate && (r.length > 0) && (r.charAt (0) != '0')) { +p = "0"; +} else if ((this.fmt == 'x') && this.alternate) { +p = "0x"; +} else if ((this.fmt == 'X') && this.alternate) { +p = "0X"; +}}var w = 0; +if (this.leading_zeroes) { +w = this.width; +} else if (((this.fmt == 'd') || (this.fmt == 'i') || (this.fmt == 'x') || (this.fmt == 'X') || (this.fmt == 'o')) && (this.precision > 0)) { +w = this.precision; +}return p + jalview.util.Format.repeat ('0', w - p.length - r.length) + r; +}, $fz.isPrivate = true, $fz), "~N,~S"); +Clazz.defineMethod (c$, "fixed_format", +($fz = function (d) { +var removeTrailing = ((this.fmt == 'G') || (this.fmt == 'g')) && !this.alternate; +if (d > 0x7FFFFFFFFFFFFFFF) { +return this.exp_format (d); +}if (this.precision == 0) { +return Clazz.doubleToLong (d + 0.5) + (removeTrailing ? "" : "."); +}var whole = Clazz.doubleToLong (d); +var fr = d - whole; +if ((fr >= 1) || (fr < 0)) { +return this.exp_format (d); +}var factor = 1; +var leading_zeroes = ""; +for (var i = 1; (i <= this.precision) && (factor <= 0x7FFFFFFFFFFFFFFF); i++) { +factor *= 10; +leading_zeroes = leading_zeroes + "0"; +} +var l = Clazz.doubleToLong ((factor * fr) + 0.5); +if (l >= factor) { +l = 0; +whole++; +}var z = leading_zeroes + l; +z = "." + z.substring (z.length - this.precision, z.length); +if (removeTrailing) { +var t = z.length - 1; +while ((t >= 0) && (z.charAt (t) == '0')) { +t--; +} +if ((t >= 0) && (z.charAt (t) == '.')) { +t--; +}z = z.substring (0, t + 1); +}return whole + z; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "exp_format", +($fz = function (d) { +var f = ""; +var e = 0; +var dd = d; +var factor = 1; +if (d != 0) { +while (dd > 10) { +e++; +factor /= 10; +dd = dd / 10; +} +while (dd < 1) { +e--; +factor *= 10; +dd = dd * 10; +} +}if (((this.fmt == 'g') || (this.fmt == 'G')) && (e >= -4) && (e < this.precision)) { +return this.fixed_format (d); +}d = d * factor; +f = f + this.fixed_format (d); +if ((this.fmt == 'e') || (this.fmt == 'g')) { +f = f + "e"; +} else { +f = f + "E"; +}var p = "000"; +if (e >= 0) { +f = f + "+"; +p = p + e; +} else { +f = f + "-"; +p = p + (-e); +}return f + p.substring (p.length - 3, p.length); +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return this.formatString; +}); +}); diff --git a/bin/jalview/util/GroupUrlLink.class b/bin/jalview/util/GroupUrlLink.class index 8eab61a89e6c965feb1b99d2afb3b94b86430a6e..c9f543df3a5b66122780978e606664e4142c5fd7 100644 GIT binary patch delta 77 zcmaD*bf;)Tgbd@;&5<&#Y|QZtvXdVwIZA(LC}d}tp!}O5^cRC7(_aQ%b_RJM(w5>@ g*zBOZPmnQU^M4arW@ak}_Q~=V#*8wXLo9e00qoHhQUCw| delta 81 zcmcap^q^=%gbd@0&5<&#Y|Kdv3X>lyIm-QJ$a7+6n4rM)n<4ZUgCf&k23>Xrc_7l3 k;+AFFY^%IakTG)e9}`(-W@`qH$ubtkOp;8S11xwL0XFCsl>h($ diff --git a/bin/jalview/util/GroupUrlLink.js b/bin/jalview/util/GroupUrlLink.js index c6f0e7e..5535c1f 100644 --- a/bin/jalview/util/GroupUrlLink.js +++ b/bin/jalview/util/GroupUrlLink.js @@ -1,363 +1,363 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.lang.Exception"], "jalview.util.GroupUrlLink", ["jalview.jsdev.RegExp", "jalview.util.MessageManager", "$.Platform", "$.QuickSort", "java.lang.Error", "$.StringBuffer", "java.util.Hashtable"], function () { -c$ = Clazz.decorateAsClass (function () { -if (!Clazz.isClassDefined ("jalview.util.GroupUrlLink.UrlStringTooLongException")) { -jalview.util.GroupUrlLink.$GroupUrlLink$UrlStringTooLongException$ (); -} -this.url_prefix = null; -this.target = null; -this.label = null; -this.url_suffix = null; -this.separators = null; -this.regexReplace = null; -this.invalidMessage = null; -this.segs = null; -this.mtch = null; -Clazz.instantialize (this, arguments); -}, jalview.util, "GroupUrlLink"); -Clazz.makeConstructor (c$, -function (link) { -var sep = link.indexOf ("|"); -this.segs = Clazz.newIntArray (jalview.util.GroupUrlLink.tokens.length, 0); -var ntoks = 0; -for (var i = 0; i < this.segs.length; i++) { -if ((this.segs[i] = link.indexOf ("$" + jalview.util.GroupUrlLink.tokens[i])) > -1) { -ntoks++; -}} -if (ntoks == 0) { -this.invalidMessage = "Group URL string must contain at least one of "; -for (var i = 0; i < this.segs.length; i++) { -this.invalidMessage += " '$" + jalview.util.GroupUrlLink.tokens[i] + "[=/regex=/]$'"; -} -return; -}var ptok = Clazz.newIntArray (ntoks + 1, 0); -var tmtch = new Array (ntoks + 1); -this.mtch = new Array (ntoks); -for (var i = 0, t = 0; i < this.segs.length; i++) { -if (this.segs[i] > -1) { -ptok[t] = this.segs[i]; -tmtch[t++] = jalview.util.GroupUrlLink.tokens[i]; -}} -ptok[ntoks] = link.length; -tmtch[ntoks] = "$$$$$$$$$"; -jalview.util.QuickSort.sortInt (ptok, tmtch); -for (var i = 0; i < ntoks; i++) { -this.mtch[i] = tmtch[i]; -} -var p = sep; -do { -sep = p; -p = link.indexOf ("|", sep + 1); -} while (p > sep && p < ptok[0]); -this.label = link.substring (0, sep); -if (this.label.indexOf ("|") > -1) { -this.target = this.label.substring (0, this.label.indexOf ("|")); -} else if (this.label.indexOf (" ") > 2) { -this.target = this.label.substring (0, this.label.indexOf (" ")); -} else { -this.target = this.label; -}this.url_prefix = link.substring (sep + 1, ptok[0]); -this.url_suffix = new Array (this.mtch.length); -this.regexReplace = new Array (this.mtch.length); -for (var pass = 0; pass < this.mtch.length; pass++) { -var mlength = 3 + this.mtch[pass].length; -if (link.indexOf ("$" + this.mtch[pass] + "=/") == ptok[pass] && (p = link.indexOf ("/=$", ptok[pass] + mlength)) > ptok[pass] + mlength) { -if (ptok[pass + 1] < p + 3) { -this.invalidMessage = "Token regexes cannot contain other regexes (did you terminate the $" + this.mtch[pass] + " regex with a '/=$' ?"; -return; -}this.url_suffix[pass] = link.substring (p + 3, ptok[pass + 1]); -this.regexReplace[pass] = link.substring (ptok[pass] + mlength, p); -try { -var rg = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace[pass] + "/"); -if (rg == null) { -this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace[pass] + "'\n"; -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace[pass] + "'\n"; -} else { -throw e; -} -} -} else { -this.regexReplace[pass] = null; -if ((p = link.indexOf ("$" + this.mtch[pass] + "$")) == ptok[pass]) { -this.url_suffix[pass] = link.substring (p + this.mtch[pass].length + 2, ptok[pass + 1]); -} else { -this.invalidMessage = "Warning: invalid regex structure (after '" + this.mtch[0] + "') for URL link : " + link; -}}} -var pass = 0; -this.separators = new Array (this.url_suffix.length); -var suffices = this.url_suffix[this.url_suffix.length - 1]; -var lastsep = ","; -while ((p = suffices.indexOf ('|')) > -1) { -this.separators[pass] = suffices.substring (p + 1); -if (pass == 0) { -this.url_suffix[this.url_suffix.length - 1] = suffices.substring (0, p); -} else { -lastsep = (this.separators[pass - 1] = this.separators[pass - 1].substring (0, p)); -}suffices = this.separators[pass]; -pass++; -} -if (pass > 0) { -lastsep = this.separators[pass - 1]; -}while (pass < this.separators.length) { -this.separators[pass++] = lastsep; -} -}, "~S"); -Clazz.defineMethod (c$, "getUrl_suffix", -function () { -return this.url_suffix[this.url_suffix.length - 1]; -}); -Clazz.defineMethod (c$, "getUrl_prefix", -function () { -return this.url_prefix; -}); -Clazz.defineMethod (c$, "getTarget", -function () { -return this.target; -}); -Clazz.defineMethod (c$, "getLabel", -function () { -return this.label; -}); -Clazz.defineMethod (c$, "getIDRegexReplace", -function () { -return this._replaceFor (jalview.util.GroupUrlLink.tokens[0]); -}); -Clazz.defineMethod (c$, "_replaceFor", -($fz = function (token) { -for (var i = 0; i < this.mtch.length; i++) { -if (this.segs[i] > -1 && this.mtch[i].equals (token)) { -return this.regexReplace[i]; -}} -return null; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "getSeqRegexReplace", -function () { -return this._replaceFor (jalview.util.GroupUrlLink.tokens[1]); -}); -Clazz.defineMethod (c$, "getInvalidMessage", -function () { -return this.invalidMessage; -}); -Clazz.defineMethod (c$, "isValid", -function () { -return this.invalidMessage == null; -}); -Clazz.defineMethod (c$, "makeUrls", -function (idstrings, seqstrings, dsstring, onlyIfMatches) { -var rstrings = this.replacementArgs (idstrings, seqstrings, dsstring); -return this.makeUrls (rstrings, onlyIfMatches); -}, "~A,~A,~S,~B"); -Clazz.defineMethod (c$, "replacementArgs", -($fz = function (idstrings, seqstrings, dsstring) { -var rstrings = new java.util.Hashtable (); -rstrings.put (jalview.util.GroupUrlLink.tokens[0], idstrings); -rstrings.put (jalview.util.GroupUrlLink.tokens[1], seqstrings); -rstrings.put (jalview.util.GroupUrlLink.tokens[2], Clazz.newArray (-1, [dsstring])); -if (idstrings.length != seqstrings.length) { -throw new Error (jalview.util.MessageManager.getString ("error.idstring_seqstrings_only_one_per_sequence")); -}return rstrings; -}, $fz.isPrivate = true, $fz), "~A,~A,~S"); -Clazz.defineMethod (c$, "makeUrls", -function (repstrings, onlyIfMatches) { -return this.makeUrlsIf (true, repstrings, onlyIfMatches); -}, "java.util.Hashtable,~B"); -Clazz.defineMethod (c$, "makeUrlStubs", -function (ids, seqstr, string, b) { -var rstrings = this.replacementArgs (ids, seqstr, string); -var stubs = this.makeUrlsIf (false, rstrings, b); -if (stubs != null) { -return Clazz.newArray (-1, [stubs[0], stubs[1], rstrings, Clazz.newBooleanArray (-1, [b])]); -}return null; -}, "~A,~A,~S,~B"); -Clazz.defineMethod (c$, "constructFrom", -function (stubs) { -var results = this.makeUrlsIf (true, stubs[2], (stubs[3])[0]); -return (results[3])[0]; -}, "~A"); -Clazz.defineMethod (c$, "makeUrlsIf", -function (createFullUrl, repstrings, onlyIfMatches) { -var pass = 0; -var idseq = new Array (this.mtch.length); -var mins = 0; -var maxs = 0; -for (var i = 0; i < this.mtch.length; i++) { -idseq[i] = repstrings.get (this.mtch[i]); -if (idseq[i].length >= 1) { -if (mins == 0 && idseq[i].length == 1) { -mins = 1; -}if (maxs < 2) { -maxs = idseq[i].length; -} else { -if (maxs != idseq[i].length) { -throw new Error (jalview.util.MessageManager.formatMessage ("error.cannot_have_mixed_length_replacement_vectors", Clazz.newArray (-1, [(this.mtch[i]), Integer.$valueOf (idseq[i].length).toString (), Integer.$valueOf (maxs).toString ()]))); -}}} else { -throw new Error (jalview.util.MessageManager.getString ("error.cannot_have_zero_length_vector_replacement_strings")); -}} -var matched = new Array (idseq.length); -var rgxs = new Array (matched.length); -for (pass = 0; pass < matched.length; pass++) { -matched[pass] = new StringBuffer (); -if (this.regexReplace[pass] != null) { -rgxs[pass] = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace[pass] + "/"); -} else { -rgxs[pass] = null; -}} -var urllength = this.url_prefix.length; -for (pass = 0; pass < matched.length; pass++) { -urllength += this.url_suffix[pass].length; -} -var thismatched = Clazz.newBooleanArray (maxs, false); -var seqsmatched = 0; -for (var sq = 0; sq < maxs; sq++) { -thismatched[sq] = false; -var thematches = new Array (rgxs.length); -for (pass = 0; pass < rgxs.length; pass++) { -thematches[pass] = new StringBuffer (); -if (idseq[pass].length <= sq) { -continue; -}if (rgxs[pass] != null) { -var rg = rgxs[pass]; -var rematchat = 0; -while (rg.searchFrom (idseq[pass][sq], rematchat)) { -rematchat = rg.matchedTo (); -thismatched[sq] = new Boolean (thismatched[sq] | true).valueOf (); -urllength += rg.charsMatched (); -if ((urllength + 32) > jalview.util.Platform.getMaxCommandLineLength ()) { -throw Clazz.innerTypeInstance (jalview.util.GroupUrlLink.UrlStringTooLongException, this, null, urllength); -}if (!createFullUrl) { -continue; -}var ns = rg.numSubs (); -if (ns == 0) { -thematches[pass].append (rg.stringMatched ()); -} else { -var subs = new StringBuffer (); -var s = 0; -while (s <= ns) { -if (s + 1 <= ns && rg.matchedToI (s) > -1 && rg.matchedToI (s + 1) > -1 && rg.matchedToI (s + 1) < rg.matchedToI (s)) { -var r = s + 1; -var rmtch = new StringBuffer (); -while (r <= ns && rg.matchedToI (r) <= rg.matchedToI (s)) { -if (rg.matchedFromI (r) > -1) { -rmtch.append (rg.stringMatchedI (r)); -}r++; -} -if (rmtch.length () > 0) { -subs.append (rmtch); -}s = r; -} else { -if (rg.matchedFromI (s) > -1) { -subs.append (rg.stringMatchedI (s)); -}s++; -}} -thematches[pass].append (subs); -}} -} else { -if (!onlyIfMatches) { -thismatched[sq] = new Boolean (thismatched[sq] | true).valueOf (); -urllength += idseq[pass][sq].length; -if (createFullUrl) { -thematches[pass] = new StringBuffer (idseq[pass][sq]); -}}}} -if (thismatched[sq]) { -if (createFullUrl) { -for (pass = 0; pass < matched.length; pass++) { -if (idseq[pass].length > 1 && matched[pass].length () > 0) { -matched[pass].append (this.separators[pass]); -}matched[pass].append (thematches[pass]); -} -}seqsmatched++; -}} -if (seqsmatched == 0 || (createFullUrl && matched[0].length () == 0)) { -return null; -}if ((urllength + 32) > jalview.util.Platform.getMaxCommandLineLength ()) { -throw Clazz.innerTypeInstance (jalview.util.GroupUrlLink.UrlStringTooLongException, this, null, urllength); -}if (!createFullUrl) { -return Clazz.newArray (-1, [ Clazz.newIntArray (-1, [seqsmatched]), thismatched]); -}var submiturl = new StringBuffer (); -submiturl.append (this.url_prefix); -for (pass = 0; pass < matched.length; pass++) { -submiturl.append (matched[pass]); -if (this.url_suffix[pass] != null) { -submiturl.append (this.url_suffix[pass]); -}} -return Clazz.newArray (-1, [ Clazz.newIntArray (-1, [seqsmatched]), thismatched, matched, Clazz.newArray (-1, [submiturl.toString ()])]); -}, "~B,java.util.Hashtable,~B"); -Clazz.defineMethod (c$, "getNumberInvolved", -function (urlstub) { -return (urlstub[0])[0]; -}, "~A"); -Clazz.defineMethod (c$, "getGroupURLType", -function () { -var r = 0; -for (var pass = 0; pass < jalview.util.GroupUrlLink.tokens.length; pass++) { -for (var i = 0; i < this.mtch.length; i++) { -if (this.mtch[i].equals (jalview.util.GroupUrlLink.tokens[pass])) { -r += 1 << pass; -}} -} -return r; -}); -Clazz.overrideMethod (c$, "toString", -function () { -var result = new StringBuffer (); -result.append (this.label + "|" + this.url_prefix); -var r; -for (r = 0; r < this.url_suffix.length; r++) { -result.append ("$"); -result.append (this.mtch[r]); -if (this.regexReplace[r] != null) { -result.append ("=/"); -result.append (this.regexReplace[r]); -result.append ("/="); -}result.append ("$"); -result.append (this.url_suffix[r]); -} -for (r = 0; r < this.separators.length; r++) { -result.append ("|"); -result.append (this.separators[r]); -} -return result.toString (); -}); -c$.formStrings = Clazz.defineMethod (c$, "formStrings", -function (seqs) { -var idset = Clazz.newArray (2, seqs.length, null); -for (var i = 0; i < seqs.length; i++) { -idset[0][i] = seqs[i].getName (); -idset[1][i] = seqs[i].getSequenceAsString (); -} -return idset; -}, "~A"); -Clazz.defineMethod (c$, "setLabel", -function (newlabel) { -this.label = newlabel; -}, "~S"); -c$.$GroupUrlLink$UrlStringTooLongException$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.urlLength = 0; -Clazz.instantialize (this, arguments); -}, jalview.util.GroupUrlLink, "UrlStringTooLongException", Exception); -Clazz.makeConstructor (c$, -function (a) { -Clazz.superConstructor (this, jalview.util.GroupUrlLink.UrlStringTooLongException, []); -this.urlLength = a; -}, "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return "Generated url is estimated to be too long (" + this.urlLength + ")"; -}); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"tokens", null); -{ -if (jalview.util.GroupUrlLink.tokens == null) { -jalview.util.GroupUrlLink.tokens = Clazz.newArray (-1, ["SEQUENCEIDS", "SEQUENCES", "DATASETID"]); -}}Clazz.defineStatics (c$, -"SEQUENCEIDS", 1, -"SEQUENCES", 2, -"DATASETID", 4); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.lang.Exception"], "jalview.util.GroupUrlLink", ["jalview.jsdev.RegExp", "jalview.util.MessageManager", "$.Platform", "$.QuickSort", "java.lang.Error", "$.StringBuffer", "java.util.Hashtable"], function () { +c$ = Clazz.decorateAsClass (function () { +if (!Clazz.isClassDefined ("jalview.util.GroupUrlLink.UrlStringTooLongException")) { +jalview.util.GroupUrlLink.$GroupUrlLink$UrlStringTooLongException$ (); +} +this.url_prefix = null; +this.target = null; +this.label = null; +this.url_suffix = null; +this.separators = null; +this.regexReplace = null; +this.invalidMessage = null; +this.segs = null; +this.mtch = null; +Clazz.instantialize (this, arguments); +}, jalview.util, "GroupUrlLink"); +Clazz.makeConstructor (c$, +function (link) { +var sep = link.indexOf ("|"); +this.segs = Clazz.newIntArray (jalview.util.GroupUrlLink.tokens.length, 0); +var ntoks = 0; +for (var i = 0; i < this.segs.length; i++) { +if ((this.segs[i] = link.indexOf ("$" + jalview.util.GroupUrlLink.tokens[i])) > -1) { +ntoks++; +}} +if (ntoks == 0) { +this.invalidMessage = "Group URL string must contain at least one of "; +for (var i = 0; i < this.segs.length; i++) { +this.invalidMessage += " '$" + jalview.util.GroupUrlLink.tokens[i] + "[=/regex=/]$'"; +} +return; +}var ptok = Clazz.newIntArray (ntoks + 1, 0); +var tmtch = new Array (ntoks + 1); +this.mtch = new Array (ntoks); +for (var i = 0, t = 0; i < this.segs.length; i++) { +if (this.segs[i] > -1) { +ptok[t] = this.segs[i]; +tmtch[t++] = jalview.util.GroupUrlLink.tokens[i]; +}} +ptok[ntoks] = link.length; +tmtch[ntoks] = "$$$$$$$$$"; +jalview.util.QuickSort.sortInt (ptok, tmtch); +for (var i = 0; i < ntoks; i++) { +this.mtch[i] = tmtch[i]; +} +var p = sep; +do { +sep = p; +p = link.indexOf ("|", sep + 1); +} while (p > sep && p < ptok[0]); +this.label = link.substring (0, sep); +if (this.label.indexOf ("|") > -1) { +this.target = this.label.substring (0, this.label.indexOf ("|")); +} else if (this.label.indexOf (" ") > 2) { +this.target = this.label.substring (0, this.label.indexOf (" ")); +} else { +this.target = this.label; +}this.url_prefix = link.substring (sep + 1, ptok[0]); +this.url_suffix = new Array (this.mtch.length); +this.regexReplace = new Array (this.mtch.length); +for (var pass = 0; pass < this.mtch.length; pass++) { +var mlength = 3 + this.mtch[pass].length; +if (link.indexOf ("$" + this.mtch[pass] + "=/") == ptok[pass] && (p = link.indexOf ("/=$", ptok[pass] + mlength)) > ptok[pass] + mlength) { +if (ptok[pass + 1] < p + 3) { +this.invalidMessage = "Token regexes cannot contain other regexes (did you terminate the $" + this.mtch[pass] + " regex with a '/=$' ?"; +return; +}this.url_suffix[pass] = link.substring (p + 3, ptok[pass + 1]); +this.regexReplace[pass] = link.substring (ptok[pass] + mlength, p); +try { +var rg = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace[pass] + "/"); +if (rg == null) { +this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace[pass] + "'\n"; +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace[pass] + "'\n"; +} else { +throw e; +} +} +} else { +this.regexReplace[pass] = null; +if ((p = link.indexOf ("$" + this.mtch[pass] + "$")) == ptok[pass]) { +this.url_suffix[pass] = link.substring (p + this.mtch[pass].length + 2, ptok[pass + 1]); +} else { +this.invalidMessage = "Warning: invalid regex structure (after '" + this.mtch[0] + "') for URL link : " + link; +}}} +var pass = 0; +this.separators = new Array (this.url_suffix.length); +var suffices = this.url_suffix[this.url_suffix.length - 1]; +var lastsep = ","; +while ((p = suffices.indexOf ('|')) > -1) { +this.separators[pass] = suffices.substring (p + 1); +if (pass == 0) { +this.url_suffix[this.url_suffix.length - 1] = suffices.substring (0, p); +} else { +lastsep = (this.separators[pass - 1] = this.separators[pass - 1].substring (0, p)); +}suffices = this.separators[pass]; +pass++; +} +if (pass > 0) { +lastsep = this.separators[pass - 1]; +}while (pass < this.separators.length) { +this.separators[pass++] = lastsep; +} +}, "~S"); +Clazz.defineMethod (c$, "getUrl_suffix", +function () { +return this.url_suffix[this.url_suffix.length - 1]; +}); +Clazz.defineMethod (c$, "getUrl_prefix", +function () { +return this.url_prefix; +}); +Clazz.defineMethod (c$, "getTarget", +function () { +return this.target; +}); +Clazz.defineMethod (c$, "getLabel", +function () { +return this.label; +}); +Clazz.defineMethod (c$, "getIDRegexReplace", +function () { +return this._replaceFor (jalview.util.GroupUrlLink.tokens[0]); +}); +Clazz.defineMethod (c$, "_replaceFor", +($fz = function (token) { +for (var i = 0; i < this.mtch.length; i++) { +if (this.segs[i] > -1 && this.mtch[i].equals (token)) { +return this.regexReplace[i]; +}} +return null; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "getSeqRegexReplace", +function () { +return this._replaceFor (jalview.util.GroupUrlLink.tokens[1]); +}); +Clazz.defineMethod (c$, "getInvalidMessage", +function () { +return this.invalidMessage; +}); +Clazz.defineMethod (c$, "isValid", +function () { +return this.invalidMessage == null; +}); +Clazz.defineMethod (c$, "makeUrls", +function (idstrings, seqstrings, dsstring, onlyIfMatches) { +var rstrings = this.replacementArgs (idstrings, seqstrings, dsstring); +return this.makeUrls (rstrings, onlyIfMatches); +}, "~A,~A,~S,~B"); +Clazz.defineMethod (c$, "replacementArgs", +($fz = function (idstrings, seqstrings, dsstring) { +var rstrings = new java.util.Hashtable (); +rstrings.put (jalview.util.GroupUrlLink.tokens[0], idstrings); +rstrings.put (jalview.util.GroupUrlLink.tokens[1], seqstrings); +rstrings.put (jalview.util.GroupUrlLink.tokens[2], Clazz.newArray (-1, [dsstring])); +if (idstrings.length != seqstrings.length) { +throw new Error (jalview.util.MessageManager.getString ("error.idstring_seqstrings_only_one_per_sequence")); +}return rstrings; +}, $fz.isPrivate = true, $fz), "~A,~A,~S"); +Clazz.defineMethod (c$, "makeUrls", +function (repstrings, onlyIfMatches) { +return this.makeUrlsIf (true, repstrings, onlyIfMatches); +}, "java.util.Hashtable,~B"); +Clazz.defineMethod (c$, "makeUrlStubs", +function (ids, seqstr, string, b) { +var rstrings = this.replacementArgs (ids, seqstr, string); +var stubs = this.makeUrlsIf (false, rstrings, b); +if (stubs != null) { +return Clazz.newArray (-1, [stubs[0], stubs[1], rstrings, Clazz.newBooleanArray (-1, [b])]); +}return null; +}, "~A,~A,~S,~B"); +Clazz.defineMethod (c$, "constructFrom", +function (stubs) { +var results = this.makeUrlsIf (true, stubs[2], (stubs[3])[0]); +return (results[3])[0]; +}, "~A"); +Clazz.defineMethod (c$, "makeUrlsIf", +function (createFullUrl, repstrings, onlyIfMatches) { +var pass = 0; +var idseq = new Array (this.mtch.length); +var mins = 0; +var maxs = 0; +for (var i = 0; i < this.mtch.length; i++) { +idseq[i] = repstrings.get (this.mtch[i]); +if (idseq[i].length >= 1) { +if (mins == 0 && idseq[i].length == 1) { +mins = 1; +}if (maxs < 2) { +maxs = idseq[i].length; +} else { +if (maxs != idseq[i].length) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.cannot_have_mixed_length_replacement_vectors", Clazz.newArray (-1, [(this.mtch[i]), Integer.$valueOf (idseq[i].length).toString (), Integer.$valueOf (maxs).toString ()]))); +}}} else { +throw new Error (jalview.util.MessageManager.getString ("error.cannot_have_zero_length_vector_replacement_strings")); +}} +var matched = new Array (idseq.length); +var rgxs = new Array (matched.length); +for (pass = 0; pass < matched.length; pass++) { +matched[pass] = new StringBuffer (); +if (this.regexReplace[pass] != null) { +rgxs[pass] = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace[pass] + "/"); +} else { +rgxs[pass] = null; +}} +var urllength = this.url_prefix.length; +for (pass = 0; pass < matched.length; pass++) { +urllength += this.url_suffix[pass].length; +} +var thismatched = Clazz.newBooleanArray (maxs, false); +var seqsmatched = 0; +for (var sq = 0; sq < maxs; sq++) { +thismatched[sq] = false; +var thematches = new Array (rgxs.length); +for (pass = 0; pass < rgxs.length; pass++) { +thematches[pass] = new StringBuffer (); +if (idseq[pass].length <= sq) { +continue; +}if (rgxs[pass] != null) { +var rg = rgxs[pass]; +var rematchat = 0; +while (rg.searchFrom (idseq[pass][sq], rematchat)) { +rematchat = rg.matchedTo (); +thismatched[sq] = new Boolean (thismatched[sq] | true).valueOf (); +urllength += rg.charsMatched (); +if ((urllength + 32) > jalview.util.Platform.getMaxCommandLineLength ()) { +throw Clazz.innerTypeInstance (jalview.util.GroupUrlLink.UrlStringTooLongException, this, null, urllength); +}if (!createFullUrl) { +continue; +}var ns = rg.numSubs (); +if (ns == 0) { +thematches[pass].append (rg.stringMatched ()); +} else { +var subs = new StringBuffer (); +var s = 0; +while (s <= ns) { +if (s + 1 <= ns && rg.matchedToI (s) > -1 && rg.matchedToI (s + 1) > -1 && rg.matchedToI (s + 1) < rg.matchedToI (s)) { +var r = s + 1; +var rmtch = new StringBuffer (); +while (r <= ns && rg.matchedToI (r) <= rg.matchedToI (s)) { +if (rg.matchedFromI (r) > -1) { +rmtch.append (rg.stringMatchedI (r)); +}r++; +} +if (rmtch.length () > 0) { +subs.append (rmtch); +}s = r; +} else { +if (rg.matchedFromI (s) > -1) { +subs.append (rg.stringMatchedI (s)); +}s++; +}} +thematches[pass].append (subs); +}} +} else { +if (!onlyIfMatches) { +thismatched[sq] = new Boolean (thismatched[sq] | true).valueOf (); +urllength += idseq[pass][sq].length; +if (createFullUrl) { +thematches[pass] = new StringBuffer (idseq[pass][sq]); +}}}} +if (thismatched[sq]) { +if (createFullUrl) { +for (pass = 0; pass < matched.length; pass++) { +if (idseq[pass].length > 1 && matched[pass].length () > 0) { +matched[pass].append (this.separators[pass]); +}matched[pass].append (thematches[pass]); +} +}seqsmatched++; +}} +if (seqsmatched == 0 || (createFullUrl && matched[0].length () == 0)) { +return null; +}if ((urllength + 32) > jalview.util.Platform.getMaxCommandLineLength ()) { +throw Clazz.innerTypeInstance (jalview.util.GroupUrlLink.UrlStringTooLongException, this, null, urllength); +}if (!createFullUrl) { +return Clazz.newArray (-1, [ Clazz.newIntArray (-1, [seqsmatched]), thismatched]); +}var submiturl = new StringBuffer (); +submiturl.append (this.url_prefix); +for (pass = 0; pass < matched.length; pass++) { +submiturl.append (matched[pass]); +if (this.url_suffix[pass] != null) { +submiturl.append (this.url_suffix[pass]); +}} +return Clazz.newArray (-1, [ Clazz.newIntArray (-1, [seqsmatched]), thismatched, matched, Clazz.newArray (-1, [submiturl.toString ()])]); +}, "~B,java.util.Hashtable,~B"); +Clazz.defineMethod (c$, "getNumberInvolved", +function (urlstub) { +return (urlstub[0])[0]; +}, "~A"); +Clazz.defineMethod (c$, "getGroupURLType", +function () { +var r = 0; +for (var pass = 0; pass < jalview.util.GroupUrlLink.tokens.length; pass++) { +for (var i = 0; i < this.mtch.length; i++) { +if (this.mtch[i].equals (jalview.util.GroupUrlLink.tokens[pass])) { +r += 1 << pass; +}} +} +return r; +}); +Clazz.overrideMethod (c$, "toString", +function () { +var result = new StringBuffer (); +result.append (this.label + "|" + this.url_prefix); +var r; +for (r = 0; r < this.url_suffix.length; r++) { +result.append ("$"); +result.append (this.mtch[r]); +if (this.regexReplace[r] != null) { +result.append ("=/"); +result.append (this.regexReplace[r]); +result.append ("/="); +}result.append ("$"); +result.append (this.url_suffix[r]); +} +for (r = 0; r < this.separators.length; r++) { +result.append ("|"); +result.append (this.separators[r]); +} +return result.toString (); +}); +c$.formStrings = Clazz.defineMethod (c$, "formStrings", +function (seqs) { +var idset = Clazz.newArray (2, seqs.length, null); +for (var i = 0; i < seqs.length; i++) { +idset[0][i] = seqs[i].getName (); +idset[1][i] = seqs[i].getSequenceAsString (); +} +return idset; +}, "~A"); +Clazz.defineMethod (c$, "setLabel", +function (newlabel) { +this.label = newlabel; +}, "~S"); +c$.$GroupUrlLink$UrlStringTooLongException$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.urlLength = 0; +Clazz.instantialize (this, arguments); +}, jalview.util.GroupUrlLink, "UrlStringTooLongException", Exception); +Clazz.makeConstructor (c$, +function (a) { +Clazz.superConstructor (this, jalview.util.GroupUrlLink.UrlStringTooLongException, []); +this.urlLength = a; +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return "Generated url is estimated to be too long (" + this.urlLength + ")"; +}); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"tokens", null); +{ +if (jalview.util.GroupUrlLink.tokens == null) { +jalview.util.GroupUrlLink.tokens = Clazz.newArray (-1, ["SEQUENCEIDS", "SEQUENCES", "DATASETID"]); +}}Clazz.defineStatics (c$, +"SEQUENCEIDS", 1, +"SEQUENCES", 2, +"DATASETID", 4); +}); diff --git a/bin/jalview/util/MapList.class b/bin/jalview/util/MapList.class index 8c02e1a48d423df0f97e8d9f118e7947a6b23a99..d5fddbf17b3f379a3c4e1d4c3a0afe04a528a7d1 100644 GIT binary patch delta 87 zcmaD8^de|Om?&e#=5SF_W`QII{=W<&jEw&n4A~i685uX%O8B!eifukC=g!J;jzNZl q@jrvci( diff --git a/bin/jalview/util/MapList.js b/bin/jalview/util/MapList.js index ff777cc..e7281ac 100644 --- a/bin/jalview/util/MapList.js +++ b/bin/jalview/util/MapList.js @@ -1,409 +1,409 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.util.ArrayList"], "jalview.util.MapList", ["java.lang.StringBuilder", "java.util.Arrays"], function () { -c$ = Clazz.decorateAsClass (function () { -this.fromShifts = null; -this.toShifts = null; -this.fromRatio = 0; -this.toRatio = 0; -this.fromLowest = 0; -this.fromHighest = 0; -this.toLowest = 0; -this.toHighest = 0; -Clazz.instantialize (this, arguments); -}, jalview.util, "MapList"); -Clazz.prepareFields (c$, function () { -this.fromShifts = new java.util.ArrayList (); -this.toShifts = new java.util.ArrayList (); -}); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (o == null || !(Clazz.instanceOf (o, jalview.util.MapList))) { -return false; -}var obj = o; -if (obj === this) { -return true; -}if (obj.fromRatio != this.fromRatio || obj.toRatio != this.toRatio || obj.fromShifts == null || obj.toShifts == null) { -return false; -}return java.util.Arrays.deepEquals (this.fromShifts.toArray (), obj.fromShifts.toArray ()) && java.util.Arrays.deepEquals (this.toShifts.toArray (), obj.toShifts.toArray ()); -}, "~O"); -Clazz.defineMethod (c$, "getFromRanges", -function () { -return this.fromShifts; -}); -Clazz.defineMethod (c$, "getToRanges", -function () { -return this.toShifts; -}); -c$.getRanges = Clazz.defineMethod (c$, "getRanges", -function (shifts) { -var rnges = Clazz.newIntArray (2 * shifts.size (), 0); -var i = 0; -for (var r, $r = shifts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { -rnges[i++] = r[0]; -rnges[i++] = r[1]; -} -return rnges; -}, "java.util.List"); -Clazz.defineMethod (c$, "getFromRatio", -function () { -return this.fromRatio; -}); -Clazz.defineMethod (c$, "getToRatio", -function () { -return this.toRatio; -}); -Clazz.defineMethod (c$, "getFromLowest", -function () { -return this.fromLowest; -}); -Clazz.defineMethod (c$, "getFromHighest", -function () { -return this.fromHighest; -}); -Clazz.defineMethod (c$, "getToLowest", -function () { -return this.toLowest; -}); -Clazz.defineMethod (c$, "getToHighest", -function () { -return this.toHighest; -}); -Clazz.makeConstructor (c$, -function (from, to, fromRatio, toRatio) { -this.fromRatio = fromRatio; -this.toRatio = toRatio; -this.fromLowest = from[0]; -this.fromHighest = from[1]; -for (var i = 0; i < from.length; i += 2) { -this.fromLowest = Math.min (this.fromLowest, from[i]); -this.fromHighest = Math.max (this.fromHighest, from[i + 1]); -this.fromShifts.add ( Clazz.newIntArray (-1, [from[i], from[i + 1]])); -} -this.toLowest = to[0]; -this.toHighest = to[1]; -for (var i = 0; i < to.length; i += 2) { -this.toLowest = Math.min (this.toLowest, to[i]); -this.toHighest = Math.max (this.toHighest, to[i + 1]); -this.toShifts.add ( Clazz.newIntArray (-1, [to[i], to[i + 1]])); -} -}, "~A,~A,~N,~N"); -Clazz.makeConstructor (c$, -function (map) { -this.fromLowest = map.fromLowest; -this.fromHighest = map.fromHighest; -this.toLowest = map.toLowest; -this.toHighest = map.toHighest; -this.fromRatio = map.fromRatio; -this.toRatio = map.toRatio; -if (map.fromShifts != null) { -for (var r, $r = map.fromShifts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { -this.fromShifts.add ( Clazz.newIntArray (-1, [r[0], r[1]])); -} -}if (map.toShifts != null) { -for (var r, $r = map.toShifts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { -this.toShifts.add ( Clazz.newIntArray (-1, [r[0], r[1]])); -} -}}, "jalview.util.MapList"); -Clazz.makeConstructor (c$, -function (fromRange, toRange, fromRatio, toRatio) { -this.fromShifts = fromRange; -this.toShifts = toRange; -this.fromRatio = fromRatio; -this.toRatio = toRatio; -this.fromLowest = 2147483647; -this.fromHighest = 0; -for (var range, $range = fromRange.iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { -this.fromLowest = Math.min (this.fromLowest, range[0]); -this.fromHighest = Math.max (this.fromHighest, range[1]); -} -this.toLowest = 2147483647; -this.toHighest = 0; -for (var range, $range = toRange.iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { -this.toLowest = Math.min (this.toLowest, range[0]); -this.toHighest = Math.max (this.toHighest, range[1]); -} -}, "java.util.List,java.util.List,~N,~N"); -Clazz.defineMethod (c$, "makeFromMap", -function () { -return this.posMap (this.fromShifts, this.fromRatio, this.toShifts, this.toRatio); -}); -Clazz.defineMethod (c$, "makeToMap", -function () { -return this.posMap (this.toShifts, this.toRatio, this.fromShifts, this.fromRatio); -}); -Clazz.defineMethod (c$, "posMap", -($fz = function (shiftTo, ratio, shiftFrom, toRatio) { -var iv = 0; -var ivSize = shiftTo.size (); -if (iv >= ivSize) { -return null; -}var intv = shiftTo.get (iv++); -var from = intv[0]; -var to = intv[1]; -if (from > to) { -from = intv[1]; -to = intv[0]; -}while (iv < ivSize) { -intv = shiftTo.get (iv++); -if (intv[0] < from) { -from = intv[0]; -}if (intv[1] < from) { -from = intv[1]; -}if (intv[0] > to) { -to = intv[0]; -}if (intv[1] > to) { -to = intv[1]; -}} -var tF = 0; -var tT = 0; -var mp = Clazz.newIntArray (to - from + 2, 0); -for (var i = 0; i < mp.length; i++) { -var m = jalview.util.MapList.shift (i + from, shiftTo, ratio, shiftFrom, toRatio); -if (m != null) { -if (i == 0) { -tF = tT = m[0]; -} else { -if (m[0] < tF) { -tF = m[0]; -}if (m[0] > tT) { -tT = m[0]; -}}}mp[i] = m; -} -var map = Clazz.newArray (-1, [ Clazz.newIntArray (-1, [from, to, tF, tT]), Clazz.newIntArray (to - from + 2, 0)]); -map[0][2] = tF; -map[0][3] = tT; -for (var i = 0; i < mp.length; i++) { -if (mp[i] != null) { -map[1][i] = mp[i][0] - tF; -} else { -map[1][i] = -1; -}} -return map; -}, $fz.isPrivate = true, $fz), "java.util.List,~N,java.util.List,~N"); -Clazz.defineMethod (c$, "shiftFrom", -function (pos) { -return jalview.util.MapList.shift (pos, this.fromShifts, this.fromRatio, this.toShifts, this.toRatio); -}, "~N"); -Clazz.defineMethod (c$, "shiftTo", -function (pos) { -return jalview.util.MapList.shift (pos, this.toShifts, this.toRatio, this.fromShifts, this.fromRatio); -}, "~N"); -c$.shift = Clazz.defineMethod (c$, "shift", -function (pos, shiftTo, fromRatio, shiftFrom, toRatio) { -var fromCount = jalview.util.MapList.countPos (shiftTo, pos); -if (fromCount == null) { -return null; -}var fromRemainder = (fromCount[0] - 1) % fromRatio; -var toCount = 1 + ((Clazz.doubleToInt ((fromCount[0] - 1) / fromRatio)) * toRatio); -var toPos = jalview.util.MapList.countToPos (shiftFrom, toCount); -if (toPos == null) { -return null; -}return Clazz.newIntArray (-1, [toPos[0], fromRemainder, toPos[1]]); -}, "~N,java.util.List,~N,java.util.List,~N"); -c$.countPos = Clazz.defineMethod (c$, "countPos", -function (shiftTo, pos) { -var count = 0; -var intv; -var iv = 0; -var ivSize = shiftTo.size (); -while (iv < ivSize) { -intv = shiftTo.get (iv++); -if (intv[0] <= intv[1]) { -if (pos >= intv[0] && pos <= intv[1]) { -return Clazz.newIntArray (-1, [count + pos - intv[0] + 1, 1]); -} else { -count += intv[1] - intv[0] + 1; -}} else { -if (pos >= intv[1] && pos <= intv[0]) { -return Clazz.newIntArray (-1, [count + intv[0] - pos + 1, -1]); -} else { -count += intv[0] - intv[1] + 1; -}}} -return null; -}, "java.util.List,~N"); -c$.countToPos = Clazz.defineMethod (c$, "countToPos", -function (shiftFrom, pos) { -var count = 0; -var diff = 0; -var iv = 0; -var ivSize = shiftFrom.size (); -var intv = Clazz.newIntArray (-1, [0, 0]); -while (iv < ivSize) { -intv = shiftFrom.get (iv++); -diff = intv[1] - intv[0]; -if (diff >= 0) { -if (pos <= count + 1 + diff) { -return Clazz.newIntArray (-1, [pos - count - 1 + intv[0], 1]); -} else { -count += 1 + diff; -}} else { -if (pos <= count + 1 - diff) { -return Clazz.newIntArray (-1, [intv[0] - (pos - count - 1), -1]); -} else { -count += 1 - diff; -}}} -return null; -}, "java.util.List,~N"); -Clazz.defineMethod (c$, "locateInFrom", -function (start, end) { -var fromStart = this.shiftTo (start); -var fromEnd = this.shiftTo (end); -return jalview.util.MapList.getIntervals (this.fromShifts, fromStart, fromEnd, this.fromRatio); -}, "~N,~N"); -Clazz.defineMethod (c$, "locateInTo", -function (start, end) { -var toStart = this.shiftFrom (start); -var toEnd = this.shiftFrom (end); -return jalview.util.MapList.getIntervals (this.toShifts, toStart, toEnd, this.toRatio); -}, "~N,~N"); -c$.getIntervals = Clazz.defineMethod (c$, "getIntervals", -function (shiftFrom, fromStart, fromEnd, fromRatio2) { -if (fromStart == null || fromEnd == null) { -return null; -}var startpos; -var endpos; -startpos = fromStart[0]; -endpos = fromEnd[0]; -var endindx = (fromRatio2 - 1); -var intv = 0; -var intvSize = shiftFrom.size (); -var iv; -var i = 0; -var fs = -1; -var fe_s = -1; -var fe = -1; -while (intv < intvSize && (fs == -1 || fe == -1)) { -iv = shiftFrom.get (intv++); -if (fe_s > -1) { -endpos = iv[0]; -endindx--; -}if (iv[0] <= iv[1]) { -if (fs == -1 && startpos >= iv[0] && startpos <= iv[1]) { -fs = i; -}if (endpos >= iv[0] && endpos <= iv[1]) { -if (fe_s == -1) { -fe_s = i; -}if (fe_s != -1) { -if (endpos + endindx <= iv[1]) { -fe = i; -endpos = endpos + endindx; -} else { -endindx -= iv[1] - endpos; -}}}} else { -if (fs == -1 && startpos <= iv[0] && startpos >= iv[1]) { -fs = i; -}if (endpos <= iv[0] && endpos >= iv[1]) { -if (fe_s == -1) { -fe_s = i; -}if (fe_s != -1) { -if (endpos - endindx >= iv[1]) { -fe = i; -endpos = endpos - endindx; -} else { -endindx -= endpos - iv[1]; -}}}}i++; -} -if (fs == fe && fe == -1) { -return null; -}var ranges = new java.util.ArrayList (); -if (fs <= fe) { -intv = fs; -i = fs; -iv = shiftFrom.get (intv++); -iv = Clazz.newIntArray (-1, [iv[0], iv[1]]); -if (i == fs) { -iv[0] = startpos; -}while (i != fe) { -ranges.add (iv); -iv = shiftFrom.get (intv++); -iv = Clazz.newIntArray (-1, [iv[0], iv[1]]); -i++; -} -if (i == fe) { -iv[1] = endpos; -}ranges.add (iv); -} else { -i = shiftFrom.size () - 1; -while (i > fs) { -i--; -} -iv = shiftFrom.get (i); -iv = Clazz.newIntArray (-1, [iv[1], iv[0]]); -if (i == fs) { -iv[0] = startpos; -}while (--i != fe) { -ranges.add (iv); -iv = shiftFrom.get (i); -iv = Clazz.newIntArray (-1, [iv[1], iv[0]]); -} -if (i == fe) { -iv[1] = endpos; -}ranges.add (iv); -}var range = null; -if (ranges != null && ranges.size () > 0) { -range = Clazz.newIntArray (ranges.size () * 2, 0); -intv = 0; -intvSize = ranges.size (); -i = 0; -while (intv < intvSize) { -iv = ranges.get (intv); -range[i++] = iv[0]; -range[i++] = iv[1]; -ranges.set (intv++, null); -} -}return range; -}, "java.util.List,~A,~A,~N"); -Clazz.defineMethod (c$, "getToPosition", -function (mpos) { -var mp = this.shiftTo (mpos); -if (mp != null) { -return mp[0]; -}return mpos; -}, "~N"); -Clazz.defineMethod (c$, "getToWord", -function (mpos) { -var mp = this.shiftTo (mpos); -if (mp != null) { -return Clazz.newIntArray (-1, [mp[0], mp[0] + mp[2] * (this.getFromRatio () - 1)]); -}return null; -}, "~N"); -Clazz.defineMethod (c$, "getMappedPosition", -function (pos) { -var mp = this.shiftFrom (pos); -if (mp != null) { -return mp[0]; -}return pos; -}, "~N"); -Clazz.defineMethod (c$, "getMappedWord", -function (pos) { -var mp = this.shiftFrom (pos); -if (mp != null) { -return Clazz.newIntArray (-1, [mp[0], mp[0] + mp[2] * (this.getToRatio () - 1)]); -}return null; -}, "~N"); -Clazz.defineMethod (c$, "getInverse", -function () { -return new jalview.util.MapList (this.getToRanges (), this.getFromRanges (), this.getToRatio (), this.getFromRatio ()); -}); -Clazz.defineMethod (c$, "containsEither", -function (local, map) { -if (local) { -return ((this.getFromLowest () >= map.getFromLowest () && this.getFromHighest () <= map.getFromHighest ()) || (this.getFromLowest () <= map.getFromLowest () && this.getFromHighest () >= map.getFromHighest ())); -} else { -return ((this.getToLowest () >= map.getToLowest () && this.getToHighest () <= map.getToHighest ()) || (this.getToLowest () <= map.getToLowest () && this.getToHighest () >= map.getToHighest ())); -}}, "~B,jalview.util.MapList"); -Clazz.overrideMethod (c$, "toString", -function () { -var sb = new StringBuilder (64); -sb.append ("From (").append (this.fromRatio).append (":").append (this.toRatio).append (") ["); -for (var shift, $shift = this.fromShifts.iterator (); $shift.hasNext () && ((shift = $shift.next ()) || true);) { -sb.append (" ").append (java.util.Arrays.toString (shift)); -} -sb.append (" ] To ["); -for (var shift, $shift = this.toShifts.iterator (); $shift.hasNext () && ((shift = $shift.next ()) || true);) { -sb.append (" ").append (java.util.Arrays.toString (shift)); -} -sb.append (" ]"); -return sb.toString (); -}); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.util.ArrayList"], "jalview.util.MapList", ["java.lang.StringBuilder", "java.util.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fromShifts = null; +this.toShifts = null; +this.fromRatio = 0; +this.toRatio = 0; +this.fromLowest = 0; +this.fromHighest = 0; +this.toLowest = 0; +this.toHighest = 0; +Clazz.instantialize (this, arguments); +}, jalview.util, "MapList"); +Clazz.prepareFields (c$, function () { +this.fromShifts = new java.util.ArrayList (); +this.toShifts = new java.util.ArrayList (); +}); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (o == null || !(Clazz.instanceOf (o, jalview.util.MapList))) { +return false; +}var obj = o; +if (obj === this) { +return true; +}if (obj.fromRatio != this.fromRatio || obj.toRatio != this.toRatio || obj.fromShifts == null || obj.toShifts == null) { +return false; +}return java.util.Arrays.deepEquals (this.fromShifts.toArray (), obj.fromShifts.toArray ()) && java.util.Arrays.deepEquals (this.toShifts.toArray (), obj.toShifts.toArray ()); +}, "~O"); +Clazz.defineMethod (c$, "getFromRanges", +function () { +return this.fromShifts; +}); +Clazz.defineMethod (c$, "getToRanges", +function () { +return this.toShifts; +}); +c$.getRanges = Clazz.defineMethod (c$, "getRanges", +function (shifts) { +var rnges = Clazz.newIntArray (2 * shifts.size (), 0); +var i = 0; +for (var r, $r = shifts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { +rnges[i++] = r[0]; +rnges[i++] = r[1]; +} +return rnges; +}, "java.util.List"); +Clazz.defineMethod (c$, "getFromRatio", +function () { +return this.fromRatio; +}); +Clazz.defineMethod (c$, "getToRatio", +function () { +return this.toRatio; +}); +Clazz.defineMethod (c$, "getFromLowest", +function () { +return this.fromLowest; +}); +Clazz.defineMethod (c$, "getFromHighest", +function () { +return this.fromHighest; +}); +Clazz.defineMethod (c$, "getToLowest", +function () { +return this.toLowest; +}); +Clazz.defineMethod (c$, "getToHighest", +function () { +return this.toHighest; +}); +Clazz.makeConstructor (c$, +function (from, to, fromRatio, toRatio) { +this.fromRatio = fromRatio; +this.toRatio = toRatio; +this.fromLowest = from[0]; +this.fromHighest = from[1]; +for (var i = 0; i < from.length; i += 2) { +this.fromLowest = Math.min (this.fromLowest, from[i]); +this.fromHighest = Math.max (this.fromHighest, from[i + 1]); +this.fromShifts.add ( Clazz.newIntArray (-1, [from[i], from[i + 1]])); +} +this.toLowest = to[0]; +this.toHighest = to[1]; +for (var i = 0; i < to.length; i += 2) { +this.toLowest = Math.min (this.toLowest, to[i]); +this.toHighest = Math.max (this.toHighest, to[i + 1]); +this.toShifts.add ( Clazz.newIntArray (-1, [to[i], to[i + 1]])); +} +}, "~A,~A,~N,~N"); +Clazz.makeConstructor (c$, +function (map) { +this.fromLowest = map.fromLowest; +this.fromHighest = map.fromHighest; +this.toLowest = map.toLowest; +this.toHighest = map.toHighest; +this.fromRatio = map.fromRatio; +this.toRatio = map.toRatio; +if (map.fromShifts != null) { +for (var r, $r = map.fromShifts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { +this.fromShifts.add ( Clazz.newIntArray (-1, [r[0], r[1]])); +} +}if (map.toShifts != null) { +for (var r, $r = map.toShifts.iterator (); $r.hasNext () && ((r = $r.next ()) || true);) { +this.toShifts.add ( Clazz.newIntArray (-1, [r[0], r[1]])); +} +}}, "jalview.util.MapList"); +Clazz.makeConstructor (c$, +function (fromRange, toRange, fromRatio, toRatio) { +this.fromShifts = fromRange; +this.toShifts = toRange; +this.fromRatio = fromRatio; +this.toRatio = toRatio; +this.fromLowest = 2147483647; +this.fromHighest = 0; +for (var range, $range = fromRange.iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { +this.fromLowest = Math.min (this.fromLowest, range[0]); +this.fromHighest = Math.max (this.fromHighest, range[1]); +} +this.toLowest = 2147483647; +this.toHighest = 0; +for (var range, $range = toRange.iterator (); $range.hasNext () && ((range = $range.next ()) || true);) { +this.toLowest = Math.min (this.toLowest, range[0]); +this.toHighest = Math.max (this.toHighest, range[1]); +} +}, "java.util.List,java.util.List,~N,~N"); +Clazz.defineMethod (c$, "makeFromMap", +function () { +return this.posMap (this.fromShifts, this.fromRatio, this.toShifts, this.toRatio); +}); +Clazz.defineMethod (c$, "makeToMap", +function () { +return this.posMap (this.toShifts, this.toRatio, this.fromShifts, this.fromRatio); +}); +Clazz.defineMethod (c$, "posMap", +($fz = function (shiftTo, ratio, shiftFrom, toRatio) { +var iv = 0; +var ivSize = shiftTo.size (); +if (iv >= ivSize) { +return null; +}var intv = shiftTo.get (iv++); +var from = intv[0]; +var to = intv[1]; +if (from > to) { +from = intv[1]; +to = intv[0]; +}while (iv < ivSize) { +intv = shiftTo.get (iv++); +if (intv[0] < from) { +from = intv[0]; +}if (intv[1] < from) { +from = intv[1]; +}if (intv[0] > to) { +to = intv[0]; +}if (intv[1] > to) { +to = intv[1]; +}} +var tF = 0; +var tT = 0; +var mp = Clazz.newIntArray (to - from + 2, 0); +for (var i = 0; i < mp.length; i++) { +var m = jalview.util.MapList.shift (i + from, shiftTo, ratio, shiftFrom, toRatio); +if (m != null) { +if (i == 0) { +tF = tT = m[0]; +} else { +if (m[0] < tF) { +tF = m[0]; +}if (m[0] > tT) { +tT = m[0]; +}}}mp[i] = m; +} +var map = Clazz.newArray (-1, [ Clazz.newIntArray (-1, [from, to, tF, tT]), Clazz.newIntArray (to - from + 2, 0)]); +map[0][2] = tF; +map[0][3] = tT; +for (var i = 0; i < mp.length; i++) { +if (mp[i] != null) { +map[1][i] = mp[i][0] - tF; +} else { +map[1][i] = -1; +}} +return map; +}, $fz.isPrivate = true, $fz), "java.util.List,~N,java.util.List,~N"); +Clazz.defineMethod (c$, "shiftFrom", +function (pos) { +return jalview.util.MapList.shift (pos, this.fromShifts, this.fromRatio, this.toShifts, this.toRatio); +}, "~N"); +Clazz.defineMethod (c$, "shiftTo", +function (pos) { +return jalview.util.MapList.shift (pos, this.toShifts, this.toRatio, this.fromShifts, this.fromRatio); +}, "~N"); +c$.shift = Clazz.defineMethod (c$, "shift", +function (pos, shiftTo, fromRatio, shiftFrom, toRatio) { +var fromCount = jalview.util.MapList.countPos (shiftTo, pos); +if (fromCount == null) { +return null; +}var fromRemainder = (fromCount[0] - 1) % fromRatio; +var toCount = 1 + ((Clazz.doubleToInt ((fromCount[0] - 1) / fromRatio)) * toRatio); +var toPos = jalview.util.MapList.countToPos (shiftFrom, toCount); +if (toPos == null) { +return null; +}return Clazz.newIntArray (-1, [toPos[0], fromRemainder, toPos[1]]); +}, "~N,java.util.List,~N,java.util.List,~N"); +c$.countPos = Clazz.defineMethod (c$, "countPos", +function (shiftTo, pos) { +var count = 0; +var intv; +var iv = 0; +var ivSize = shiftTo.size (); +while (iv < ivSize) { +intv = shiftTo.get (iv++); +if (intv[0] <= intv[1]) { +if (pos >= intv[0] && pos <= intv[1]) { +return Clazz.newIntArray (-1, [count + pos - intv[0] + 1, 1]); +} else { +count += intv[1] - intv[0] + 1; +}} else { +if (pos >= intv[1] && pos <= intv[0]) { +return Clazz.newIntArray (-1, [count + intv[0] - pos + 1, -1]); +} else { +count += intv[0] - intv[1] + 1; +}}} +return null; +}, "java.util.List,~N"); +c$.countToPos = Clazz.defineMethod (c$, "countToPos", +function (shiftFrom, pos) { +var count = 0; +var diff = 0; +var iv = 0; +var ivSize = shiftFrom.size (); +var intv = Clazz.newIntArray (-1, [0, 0]); +while (iv < ivSize) { +intv = shiftFrom.get (iv++); +diff = intv[1] - intv[0]; +if (diff >= 0) { +if (pos <= count + 1 + diff) { +return Clazz.newIntArray (-1, [pos - count - 1 + intv[0], 1]); +} else { +count += 1 + diff; +}} else { +if (pos <= count + 1 - diff) { +return Clazz.newIntArray (-1, [intv[0] - (pos - count - 1), -1]); +} else { +count += 1 - diff; +}}} +return null; +}, "java.util.List,~N"); +Clazz.defineMethod (c$, "locateInFrom", +function (start, end) { +var fromStart = this.shiftTo (start); +var fromEnd = this.shiftTo (end); +return jalview.util.MapList.getIntervals (this.fromShifts, fromStart, fromEnd, this.fromRatio); +}, "~N,~N"); +Clazz.defineMethod (c$, "locateInTo", +function (start, end) { +var toStart = this.shiftFrom (start); +var toEnd = this.shiftFrom (end); +return jalview.util.MapList.getIntervals (this.toShifts, toStart, toEnd, this.toRatio); +}, "~N,~N"); +c$.getIntervals = Clazz.defineMethod (c$, "getIntervals", +function (shiftFrom, fromStart, fromEnd, fromRatio2) { +if (fromStart == null || fromEnd == null) { +return null; +}var startpos; +var endpos; +startpos = fromStart[0]; +endpos = fromEnd[0]; +var endindx = (fromRatio2 - 1); +var intv = 0; +var intvSize = shiftFrom.size (); +var iv; +var i = 0; +var fs = -1; +var fe_s = -1; +var fe = -1; +while (intv < intvSize && (fs == -1 || fe == -1)) { +iv = shiftFrom.get (intv++); +if (fe_s > -1) { +endpos = iv[0]; +endindx--; +}if (iv[0] <= iv[1]) { +if (fs == -1 && startpos >= iv[0] && startpos <= iv[1]) { +fs = i; +}if (endpos >= iv[0] && endpos <= iv[1]) { +if (fe_s == -1) { +fe_s = i; +}if (fe_s != -1) { +if (endpos + endindx <= iv[1]) { +fe = i; +endpos = endpos + endindx; +} else { +endindx -= iv[1] - endpos; +}}}} else { +if (fs == -1 && startpos <= iv[0] && startpos >= iv[1]) { +fs = i; +}if (endpos <= iv[0] && endpos >= iv[1]) { +if (fe_s == -1) { +fe_s = i; +}if (fe_s != -1) { +if (endpos - endindx >= iv[1]) { +fe = i; +endpos = endpos - endindx; +} else { +endindx -= endpos - iv[1]; +}}}}i++; +} +if (fs == fe && fe == -1) { +return null; +}var ranges = new java.util.ArrayList (); +if (fs <= fe) { +intv = fs; +i = fs; +iv = shiftFrom.get (intv++); +iv = Clazz.newIntArray (-1, [iv[0], iv[1]]); +if (i == fs) { +iv[0] = startpos; +}while (i != fe) { +ranges.add (iv); +iv = shiftFrom.get (intv++); +iv = Clazz.newIntArray (-1, [iv[0], iv[1]]); +i++; +} +if (i == fe) { +iv[1] = endpos; +}ranges.add (iv); +} else { +i = shiftFrom.size () - 1; +while (i > fs) { +i--; +} +iv = shiftFrom.get (i); +iv = Clazz.newIntArray (-1, [iv[1], iv[0]]); +if (i == fs) { +iv[0] = startpos; +}while (--i != fe) { +ranges.add (iv); +iv = shiftFrom.get (i); +iv = Clazz.newIntArray (-1, [iv[1], iv[0]]); +} +if (i == fe) { +iv[1] = endpos; +}ranges.add (iv); +}var range = null; +if (ranges != null && ranges.size () > 0) { +range = Clazz.newIntArray (ranges.size () * 2, 0); +intv = 0; +intvSize = ranges.size (); +i = 0; +while (intv < intvSize) { +iv = ranges.get (intv); +range[i++] = iv[0]; +range[i++] = iv[1]; +ranges.set (intv++, null); +} +}return range; +}, "java.util.List,~A,~A,~N"); +Clazz.defineMethod (c$, "getToPosition", +function (mpos) { +var mp = this.shiftTo (mpos); +if (mp != null) { +return mp[0]; +}return mpos; +}, "~N"); +Clazz.defineMethod (c$, "getToWord", +function (mpos) { +var mp = this.shiftTo (mpos); +if (mp != null) { +return Clazz.newIntArray (-1, [mp[0], mp[0] + mp[2] * (this.getFromRatio () - 1)]); +}return null; +}, "~N"); +Clazz.defineMethod (c$, "getMappedPosition", +function (pos) { +var mp = this.shiftFrom (pos); +if (mp != null) { +return mp[0]; +}return pos; +}, "~N"); +Clazz.defineMethod (c$, "getMappedWord", +function (pos) { +var mp = this.shiftFrom (pos); +if (mp != null) { +return Clazz.newIntArray (-1, [mp[0], mp[0] + mp[2] * (this.getToRatio () - 1)]); +}return null; +}, "~N"); +Clazz.defineMethod (c$, "getInverse", +function () { +return new jalview.util.MapList (this.getToRanges (), this.getFromRanges (), this.getToRatio (), this.getFromRatio ()); +}); +Clazz.defineMethod (c$, "containsEither", +function (local, map) { +if (local) { +return ((this.getFromLowest () >= map.getFromLowest () && this.getFromHighest () <= map.getFromHighest ()) || (this.getFromLowest () <= map.getFromLowest () && this.getFromHighest () >= map.getFromHighest ())); +} else { +return ((this.getToLowest () >= map.getToLowest () && this.getToHighest () <= map.getToHighest ()) || (this.getToLowest () <= map.getToLowest () && this.getToHighest () >= map.getToHighest ())); +}}, "~B,jalview.util.MapList"); +Clazz.overrideMethod (c$, "toString", +function () { +var sb = new StringBuilder (64); +sb.append ("From (").append (this.fromRatio).append (":").append (this.toRatio).append (") ["); +for (var shift, $shift = this.fromShifts.iterator (); $shift.hasNext () && ((shift = $shift.next ()) || true);) { +sb.append (" ").append (java.util.Arrays.toString (shift)); +} +sb.append (" ] To ["); +for (var shift, $shift = this.toShifts.iterator (); $shift.hasNext () && ((shift = $shift.next ()) || true);) { +sb.append (" ").append (java.util.Arrays.toString (shift)); +} +sb.append (" ]"); +return sb.toString (); +}); +}); diff --git a/bin/jalview/util/MappingUtils.js b/bin/jalview/util/MappingUtils.js index e5f76b9..487e30d 100644 --- a/bin/jalview/util/MappingUtils.js +++ b/bin/jalview/util/MappingUtils.js @@ -1,245 +1,245 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.MappingUtils", ["jalview.analysis.AlignmentSorter", "jalview.commands.EditCommand", "$.OrderCommand", "jalview.datamodel.AlignmentOrder", "$.ColumnSelection", "$.SearchResults", "$.Sequence", "$.SequenceGroup", "jalview.util.Comparison", "$.StringUtils", "java.util.ArrayList", "$.Collections", "$.HashMap"], function () { -c$ = Clazz.declareType (jalview.util, "MappingUtils"); -c$.mapCutOrPaste = Clazz.defineMethod (c$, "mapCutOrPaste", -function (edit, undo, targetSeqs, result, mappings) { -var action = edit.getAction (); -if (undo) { -action = action.getUndoAction (); -}System.err.println ("MappingUtils.mapCutOrPaste not yet implemented"); -}, "jalview.commands.EditCommand.Edit,~B,java.util.List,jalview.commands.EditCommand,java.util.Set"); -c$.mapEditCommand = Clazz.defineMethod (c$, "mapEditCommand", -function (command, undo, mapTo, gapChar, mappings) { -if (!mapTo.isNucleotide ()) { -return null; -}var targetCopies = new java.util.HashMap (); -for (var seq, $seq = mapTo.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -var ds = seq.getDatasetSequence (); -if (ds != null) { -var copy = new jalview.datamodel.Sequence (seq); -copy.setDatasetSequence (ds); -targetCopies.put (ds, copy); -}} -var originalSequences = command.priorState (undo); -var result = new jalview.commands.EditCommand (); -var edits = command.getEditIterator (!undo); -while (edits.hasNext ()) { -var edit = edits.next (); -if (edit.getAction () === jalview.commands.EditCommand.Action.CUT || edit.getAction () === jalview.commands.EditCommand.Action.PASTE) { -jalview.util.MappingUtils.mapCutOrPaste (edit, undo, mapTo.getSequences (), result, mappings); -} else if (edit.getAction () === jalview.commands.EditCommand.Action.INSERT_GAP || edit.getAction () === jalview.commands.EditCommand.Action.DELETE_GAP) { -jalview.util.MappingUtils.mapInsertOrDelete (edit, undo, originalSequences, mapTo.getSequences (), targetCopies, gapChar, result, mappings); -}} -return result.getSize () > 0 ? result : null; -}, "jalview.commands.EditCommand,~B,jalview.datamodel.AlignmentI,~S,java.util.Set"); -c$.mapInsertOrDelete = Clazz.defineMethod (c$, "mapInsertOrDelete", -function (edit, undo, originalSequences, targetSeqs, targetCopies, gapChar, result, mappings) { -var action = edit.getAction (); -if (undo) { -action = action.getUndoAction (); -}var count = edit.getNumber (); -var editPos = edit.getPosition (); -for (var seq, $seq = 0, $$seq = edit.getSequences (); $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { -var ds = seq.getDatasetSequence (); -if (ds == null) { -continue; -}var actedOn = originalSequences.get (ds); -var seqpos = actedOn.findPosition (editPos); -var sr = jalview.util.MappingUtils.buildSearchResults (seq, seqpos, mappings); -if (!sr.isEmpty ()) { -for (var targetSeq, $targetSeq = targetSeqs.iterator (); $targetSeq.hasNext () && ((targetSeq = $targetSeq.next ()) || true);) { -ds = targetSeq.getDatasetSequence (); -if (ds == null) { -continue; -}var copyTarget = targetCopies.get (ds); -var match = sr.getResults (copyTarget, 0, copyTarget.getLength ()); -if (match != null) { -var ratio = 3; -var mappedCount = count * 3; -var mappedEditPos = action === jalview.commands.EditCommand.Action.DELETE_GAP ? match[0] - mappedCount : match[0]; -var e = resultClazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, action, Clazz.newArray (-1, [targetSeq]), mappedEditPos, mappedCount, gapChar); -result.addEdit (e); -if (action === jalview.commands.EditCommand.Action.INSERT_GAP) { -copyTarget.setSequence ( String.instantialize (jalview.util.StringUtils.insertCharAt (copyTarget.getSequence (), mappedEditPos, mappedCount, gapChar))); -} else if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { -copyTarget.setSequence ( String.instantialize (jalview.util.StringUtils.deleteChars (copyTarget.getSequence (), mappedEditPos, mappedEditPos + mappedCount))); -}}} -}if (action === jalview.commands.EditCommand.Action.INSERT_GAP) { -actedOn.setSequence ( String.instantialize (jalview.util.StringUtils.insertCharAt (actedOn.getSequence (), editPos, count, gapChar))); -} else if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { -actedOn.setSequence ( String.instantialize (jalview.util.StringUtils.deleteChars (actedOn.getSequence (), editPos, editPos + count))); -}} -}, "jalview.commands.EditCommand.Edit,~B,java.util.Map,java.util.List,java.util.Map,~S,jalview.commands.EditCommand,java.util.Set"); -c$.buildSearchResults = Clazz.defineMethod (c$, "buildSearchResults", -function (seq, index, seqmappings) { -var results = new jalview.datamodel.SearchResults (); -jalview.util.MappingUtils.addSearchResults (results, seq, index, seqmappings); -return results; -}, "jalview.datamodel.SequenceI,~N,java.util.Set"); -c$.addSearchResults = Clazz.defineMethod (c$, "addSearchResults", -function (results, seq, index, seqmappings) { -if (index >= seq.getStart () && index <= seq.getEnd ()) { -for (var acf, $acf = seqmappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -acf.markMappedRegion (seq, index, results); -} -}}, "jalview.datamodel.SearchResults,jalview.datamodel.SequenceI,~N,java.util.Set"); -c$.mapSequenceGroup = Clazz.defineMethod (c$, "mapSequenceGroup", -function (sg, mapFrom, mapTo) { -var targetIsNucleotide = mapTo.isNucleotide (); -var protein = targetIsNucleotide ? mapFrom : mapTo; -var codonFrames = protein.getAlignment ().getCodonFrames (); -var mappedGroup = new jalview.datamodel.SequenceGroup (sg); -mappedGroup.cs = mapTo.getGlobalColourScheme (); -mappedGroup.clear (); -var minStartCol = -1; -var maxEndCol = -1; -var selectionStartRes = sg.getStartRes (); -var selectionEndRes = sg.getEndRes (); -for (var selected, $selected = sg.getSequences ().iterator (); $selected.hasNext () && ((selected = $selected.next ()) || true);) { -var firstUngappedPos = selectionStartRes; -while (firstUngappedPos <= selectionEndRes && jalview.util.Comparison.isGap (selected.getCharAt (firstUngappedPos))) { -firstUngappedPos++; -} -if (firstUngappedPos > selectionEndRes) { -continue; -}var lastUngappedPos = selectionEndRes; -while (lastUngappedPos >= selectionStartRes && jalview.util.Comparison.isGap (selected.getCharAt (lastUngappedPos))) { -lastUngappedPos--; -} -var startResiduePos = selected.findPosition (firstUngappedPos); -var endResiduePos = selected.findPosition (lastUngappedPos); -for (var acf, $acf = codonFrames.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -var mappedSequence = targetIsNucleotide ? acf.getDnaForAaSeq (selected) : acf.getAaForDnaSeq (selected); -if (mappedSequence != null) { -for (var seq, $seq = mapTo.getAlignment ().getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -var mappedStartResidue = 0; -var mappedEndResidue = 0; -if (seq.getDatasetSequence () === mappedSequence) { -var sr = jalview.util.MappingUtils.buildSearchResults (selected, startResiduePos, java.util.Collections.singleton (acf)); -for (var m, $m = sr.getResults ().iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { -mappedStartResidue = m.getStart (); -mappedEndResidue = m.getEnd (); -} -sr = jalview.util.MappingUtils.buildSearchResults (selected, endResiduePos, java.util.Collections.singleton (acf)); -for (var m, $m = sr.getResults ().iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { -mappedStartResidue = Math.min (mappedStartResidue, m.getStart ()); -mappedEndResidue = Math.max (mappedEndResidue, m.getEnd ()); -} -var mappedStartCol = seq.findIndex (mappedStartResidue) - 1; -minStartCol = minStartCol == -1 ? mappedStartCol : Math.min (minStartCol, mappedStartCol); -var mappedEndCol = seq.findIndex (mappedEndResidue) - 1; -maxEndCol = maxEndCol == -1 ? mappedEndCol : Math.max (maxEndCol, mappedEndCol); -mappedGroup.addSequence (seq, false); -break; -}} -}} -} -mappedGroup.setStartRes (minStartCol < 0 ? 0 : minStartCol); -mappedGroup.setEndRes (maxEndCol < 0 ? 0 : maxEndCol); -return mappedGroup; -}, "jalview.datamodel.SequenceGroup,jalview.api.AlignViewportI,jalview.api.AlignViewportI"); -c$.mapOrderCommand = Clazz.defineMethod (c$, "mapOrderCommand", -function (command, undo, mapTo, mappings) { -var sortOrder = command.getSequenceOrder (undo); -var mappedOrder = new java.util.ArrayList (); -var j = 0; -var mappingToNucleotide = mapTo.isNucleotide (); -for (var seq, $seq = 0, $$seq = sortOrder; $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { -for (var acf, $acf = mappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { -var mappedSeq = mappingToNucleotide ? acf.getDnaForAaSeq (seq) : acf.getAaForDnaSeq (seq); -if (mappedSeq != null) { -for (var seq2, $seq2 = mapTo.getSequences ().iterator (); $seq2.hasNext () && ((seq2 = $seq2.next ()) || true);) { -if (seq2.getDatasetSequence () === mappedSeq) { -mappedOrder.add (seq2); -j++; -break; -}} -}} -} -if (j == 0) { -return null; -}if (j < mapTo.getHeight ()) { -for (var seq, $seq = mapTo.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -if (!mappedOrder.contains (seq)) { -mappedOrder.add (seq); -}} -}var mappedOrderArray = mappedOrder.toArray ( new Array (mappedOrder.size ())); -var oldOrder = mapTo.getSequencesArray (); -jalview.analysis.AlignmentSorter.sortBy (mapTo, new jalview.datamodel.AlignmentOrder (mappedOrderArray)); -var result = new jalview.commands.OrderCommand (command.getDescription (), oldOrder, mapTo); -return result; -}, "jalview.commands.OrderCommand,~B,jalview.datamodel.AlignmentI,java.util.Set"); -c$.mapColumnSelection = Clazz.defineMethod (c$, "mapColumnSelection", -function (colsel, mapFrom, mapTo) { -var targetIsNucleotide = mapTo.isNucleotide (); -var protein = targetIsNucleotide ? mapFrom : mapTo; -var codonFrames = protein.getAlignment ().getCodonFrames (); -var mappedColumns = new jalview.datamodel.ColumnSelection (); -if (colsel == null) { -return mappedColumns; -}var fromGapChar = mapFrom.getAlignment ().getGapCharacter (); -for (var obj, $obj = colsel.getSelected ().iterator (); $obj.hasNext () && ((obj = $obj.next ()) || true);) { -var col = (obj).intValue (); -var mappedToMin = 2147483647; -var mappedToMax = -2147483648; -for (var fromSeq, $fromSeq = mapFrom.getAlignment ().getSequences ().iterator (); $fromSeq.hasNext () && ((fromSeq = $fromSeq.next ()) || true);) { -if (fromSeq.getCharAt (col) == fromGapChar) { -continue; -}var residuePos = fromSeq.findPosition (col); -var sr = jalview.util.MappingUtils.buildSearchResults (fromSeq, residuePos, codonFrames); -for (var m, $m = sr.getResults ().iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { -var mappedStartResidue = m.getStart (); -var mappedEndResidue = m.getEnd (); -var mappedSeq = m.getSequence (); -for (var toSeq, $toSeq = mapTo.getAlignment ().getSequences ().iterator (); $toSeq.hasNext () && ((toSeq = $toSeq.next ()) || true);) { -if (toSeq.getDatasetSequence () === mappedSeq) { -var mappedStartCol = toSeq.findIndex (mappedStartResidue); -var mappedEndCol = toSeq.findIndex (mappedEndResidue); -mappedToMin = Math.min (mappedToMin, mappedStartCol); -mappedToMax = Math.max (mappedToMax, mappedEndCol); -break; -}} -} -} -for (var i = mappedToMin; i <= mappedToMax; i++) { -mappedColumns.addElement (i - 1); -} -} -return mappedColumns; -}, "jalview.datamodel.ColumnSelection,jalview.api.AlignViewportI,jalview.api.AlignViewportI"); -c$.findCodonFor = Clazz.defineMethod (c$, "findCodonFor", -function (seq, col, mappings) { -var dsPos = seq.findPosition (col); -for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { -if (mapping.involvesSequence (seq)) { -return mapping.getMappedCodon (seq.getDatasetSequence (), dsPos); -}} -return null; -}, "jalview.datamodel.SequenceI,~N,java.util.Set"); -c$.flattenRanges = Clazz.defineMethod (c$, "flattenRanges", -function (ranges) { -var count = 0; -for (var i = 0; i < ranges.length - 1; i += 2) { -count += ranges[i + 1] - ranges[i] + 1; -} -var result = Clazz.newIntArray (count, 0); -var k = 0; -for (var i = 0; i < ranges.length - 1; i += 2) { -for (var j = ranges[i]; j <= ranges[i + 1]; j++) { -result[k++] = j; -} -} -return result; -}, "~A"); -c$.findMappingsForSequence = Clazz.defineMethod (c$, "findMappingsForSequence", -function (sequence, mappings) { -var result = new java.util.ArrayList (); -if (sequence == null || mappings == null) { -return result; -}for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { -if (mapping.involvesSequence (sequence)) { -result.add (mapping); -}} -return result; -}, "jalview.datamodel.SequenceI,java.util.Set"); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.MappingUtils", ["jalview.analysis.AlignmentSorter", "jalview.commands.EditCommand", "$.OrderCommand", "jalview.datamodel.AlignmentOrder", "$.ColumnSelection", "$.SearchResults", "$.Sequence", "$.SequenceGroup", "jalview.util.Comparison", "$.StringUtils", "java.util.ArrayList", "$.Collections", "$.HashMap"], function () { +c$ = Clazz.declareType (jalview.util, "MappingUtils"); +c$.mapCutOrPaste = Clazz.defineMethod (c$, "mapCutOrPaste", +function (edit, undo, targetSeqs, result, mappings) { +var action = edit.getAction (); +if (undo) { +action = action.getUndoAction (); +}System.err.println ("MappingUtils.mapCutOrPaste not yet implemented"); +}, "jalview.commands.EditCommand.Edit,~B,java.util.List,jalview.commands.EditCommand,java.util.Set"); +c$.mapEditCommand = Clazz.defineMethod (c$, "mapEditCommand", +function (command, undo, mapTo, gapChar, mappings) { +if (!mapTo.isNucleotide ()) { +return null; +}var targetCopies = new java.util.HashMap (); +for (var seq, $seq = mapTo.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +var ds = seq.getDatasetSequence (); +if (ds != null) { +var copy = new jalview.datamodel.Sequence (seq); +copy.setDatasetSequence (ds); +targetCopies.put (ds, copy); +}} +var originalSequences = command.priorState (undo); +var result = new jalview.commands.EditCommand (); +var edits = command.getEditIterator (!undo); +while (edits.hasNext ()) { +var edit = edits.next (); +if (edit.getAction () === jalview.commands.EditCommand.Action.CUT || edit.getAction () === jalview.commands.EditCommand.Action.PASTE) { +jalview.util.MappingUtils.mapCutOrPaste (edit, undo, mapTo.getSequences (), result, mappings); +} else if (edit.getAction () === jalview.commands.EditCommand.Action.INSERT_GAP || edit.getAction () === jalview.commands.EditCommand.Action.DELETE_GAP) { +jalview.util.MappingUtils.mapInsertOrDelete (edit, undo, originalSequences, mapTo.getSequences (), targetCopies, gapChar, result, mappings); +}} +return result.getSize () > 0 ? result : null; +}, "jalview.commands.EditCommand,~B,jalview.datamodel.AlignmentI,~S,java.util.Set"); +c$.mapInsertOrDelete = Clazz.defineMethod (c$, "mapInsertOrDelete", +function (edit, undo, originalSequences, targetSeqs, targetCopies, gapChar, result, mappings) { +var action = edit.getAction (); +if (undo) { +action = action.getUndoAction (); +}var count = edit.getNumber (); +var editPos = edit.getPosition (); +for (var seq, $seq = 0, $$seq = edit.getSequences (); $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { +var ds = seq.getDatasetSequence (); +if (ds == null) { +continue; +}var actedOn = originalSequences.get (ds); +var seqpos = actedOn.findPosition (editPos); +var sr = jalview.util.MappingUtils.buildSearchResults (seq, seqpos, mappings); +if (!sr.isEmpty ()) { +for (var targetSeq, $targetSeq = targetSeqs.iterator (); $targetSeq.hasNext () && ((targetSeq = $targetSeq.next ()) || true);) { +ds = targetSeq.getDatasetSequence (); +if (ds == null) { +continue; +}var copyTarget = targetCopies.get (ds); +var match = sr.getResults (copyTarget, 0, copyTarget.getLength ()); +if (match != null) { +var ratio = 3; +var mappedCount = count * 3; +var mappedEditPos = action === jalview.commands.EditCommand.Action.DELETE_GAP ? match[0] - mappedCount : match[0]; +var e = resultClazz.innerTypeInstance (jalview.commands.EditCommand.Edit, this, null, action, Clazz.newArray (-1, [targetSeq]), mappedEditPos, mappedCount, gapChar); +result.addEdit (e); +if (action === jalview.commands.EditCommand.Action.INSERT_GAP) { +copyTarget.setSequence ( String.instantialize (jalview.util.StringUtils.insertCharAt (copyTarget.getSequence (), mappedEditPos, mappedCount, gapChar))); +} else if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { +copyTarget.setSequence ( String.instantialize (jalview.util.StringUtils.deleteChars (copyTarget.getSequence (), mappedEditPos, mappedEditPos + mappedCount))); +}}} +}if (action === jalview.commands.EditCommand.Action.INSERT_GAP) { +actedOn.setSequence ( String.instantialize (jalview.util.StringUtils.insertCharAt (actedOn.getSequence (), editPos, count, gapChar))); +} else if (action === jalview.commands.EditCommand.Action.DELETE_GAP) { +actedOn.setSequence ( String.instantialize (jalview.util.StringUtils.deleteChars (actedOn.getSequence (), editPos, editPos + count))); +}} +}, "jalview.commands.EditCommand.Edit,~B,java.util.Map,java.util.List,java.util.Map,~S,jalview.commands.EditCommand,java.util.Set"); +c$.buildSearchResults = Clazz.defineMethod (c$, "buildSearchResults", +function (seq, index, seqmappings) { +var results = new jalview.datamodel.SearchResults (); +jalview.util.MappingUtils.addSearchResults (results, seq, index, seqmappings); +return results; +}, "jalview.datamodel.SequenceI,~N,java.util.Set"); +c$.addSearchResults = Clazz.defineMethod (c$, "addSearchResults", +function (results, seq, index, seqmappings) { +if (index >= seq.getStart () && index <= seq.getEnd ()) { +for (var acf, $acf = seqmappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +acf.markMappedRegion (seq, index, results); +} +}}, "jalview.datamodel.SearchResults,jalview.datamodel.SequenceI,~N,java.util.Set"); +c$.mapSequenceGroup = Clazz.defineMethod (c$, "mapSequenceGroup", +function (sg, mapFrom, mapTo) { +var targetIsNucleotide = mapTo.isNucleotide (); +var protein = targetIsNucleotide ? mapFrom : mapTo; +var codonFrames = protein.getAlignment ().getCodonFrames (); +var mappedGroup = new jalview.datamodel.SequenceGroup (sg); +mappedGroup.cs = mapTo.getGlobalColourScheme (); +mappedGroup.clear (); +var minStartCol = -1; +var maxEndCol = -1; +var selectionStartRes = sg.getStartRes (); +var selectionEndRes = sg.getEndRes (); +for (var selected, $selected = sg.getSequences ().iterator (); $selected.hasNext () && ((selected = $selected.next ()) || true);) { +var firstUngappedPos = selectionStartRes; +while (firstUngappedPos <= selectionEndRes && jalview.util.Comparison.isGap (selected.getCharAt (firstUngappedPos))) { +firstUngappedPos++; +} +if (firstUngappedPos > selectionEndRes) { +continue; +}var lastUngappedPos = selectionEndRes; +while (lastUngappedPos >= selectionStartRes && jalview.util.Comparison.isGap (selected.getCharAt (lastUngappedPos))) { +lastUngappedPos--; +} +var startResiduePos = selected.findPosition (firstUngappedPos); +var endResiduePos = selected.findPosition (lastUngappedPos); +for (var acf, $acf = codonFrames.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +var mappedSequence = targetIsNucleotide ? acf.getDnaForAaSeq (selected) : acf.getAaForDnaSeq (selected); +if (mappedSequence != null) { +for (var seq, $seq = mapTo.getAlignment ().getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +var mappedStartResidue = 0; +var mappedEndResidue = 0; +if (seq.getDatasetSequence () === mappedSequence) { +var sr = jalview.util.MappingUtils.buildSearchResults (selected, startResiduePos, java.util.Collections.singleton (acf)); +for (var m, $m = sr.getResults ().iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { +mappedStartResidue = m.getStart (); +mappedEndResidue = m.getEnd (); +} +sr = jalview.util.MappingUtils.buildSearchResults (selected, endResiduePos, java.util.Collections.singleton (acf)); +for (var m, $m = sr.getResults ().iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { +mappedStartResidue = Math.min (mappedStartResidue, m.getStart ()); +mappedEndResidue = Math.max (mappedEndResidue, m.getEnd ()); +} +var mappedStartCol = seq.findIndex (mappedStartResidue) - 1; +minStartCol = minStartCol == -1 ? mappedStartCol : Math.min (minStartCol, mappedStartCol); +var mappedEndCol = seq.findIndex (mappedEndResidue) - 1; +maxEndCol = maxEndCol == -1 ? mappedEndCol : Math.max (maxEndCol, mappedEndCol); +mappedGroup.addSequence (seq, false); +break; +}} +}} +} +mappedGroup.setStartRes (minStartCol < 0 ? 0 : minStartCol); +mappedGroup.setEndRes (maxEndCol < 0 ? 0 : maxEndCol); +return mappedGroup; +}, "jalview.datamodel.SequenceGroup,jalview.api.AlignViewportI,jalview.api.AlignViewportI"); +c$.mapOrderCommand = Clazz.defineMethod (c$, "mapOrderCommand", +function (command, undo, mapTo, mappings) { +var sortOrder = command.getSequenceOrder (undo); +var mappedOrder = new java.util.ArrayList (); +var j = 0; +var mappingToNucleotide = mapTo.isNucleotide (); +for (var seq, $seq = 0, $$seq = sortOrder; $seq < $$seq.length && ((seq = $$seq[$seq]) || true); $seq++) { +for (var acf, $acf = mappings.iterator (); $acf.hasNext () && ((acf = $acf.next ()) || true);) { +var mappedSeq = mappingToNucleotide ? acf.getDnaForAaSeq (seq) : acf.getAaForDnaSeq (seq); +if (mappedSeq != null) { +for (var seq2, $seq2 = mapTo.getSequences ().iterator (); $seq2.hasNext () && ((seq2 = $seq2.next ()) || true);) { +if (seq2.getDatasetSequence () === mappedSeq) { +mappedOrder.add (seq2); +j++; +break; +}} +}} +} +if (j == 0) { +return null; +}if (j < mapTo.getHeight ()) { +for (var seq, $seq = mapTo.getSequences ().iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +if (!mappedOrder.contains (seq)) { +mappedOrder.add (seq); +}} +}var mappedOrderArray = mappedOrder.toArray ( new Array (mappedOrder.size ())); +var oldOrder = mapTo.getSequencesArray (); +jalview.analysis.AlignmentSorter.sortBy (mapTo, new jalview.datamodel.AlignmentOrder (mappedOrderArray)); +var result = new jalview.commands.OrderCommand (command.getDescription (), oldOrder, mapTo); +return result; +}, "jalview.commands.OrderCommand,~B,jalview.datamodel.AlignmentI,java.util.Set"); +c$.mapColumnSelection = Clazz.defineMethod (c$, "mapColumnSelection", +function (colsel, mapFrom, mapTo) { +var targetIsNucleotide = mapTo.isNucleotide (); +var protein = targetIsNucleotide ? mapFrom : mapTo; +var codonFrames = protein.getAlignment ().getCodonFrames (); +var mappedColumns = new jalview.datamodel.ColumnSelection (); +if (colsel == null) { +return mappedColumns; +}var fromGapChar = mapFrom.getAlignment ().getGapCharacter (); +for (var obj, $obj = colsel.getSelected ().iterator (); $obj.hasNext () && ((obj = $obj.next ()) || true);) { +var col = (obj).intValue (); +var mappedToMin = 2147483647; +var mappedToMax = -2147483648; +for (var fromSeq, $fromSeq = mapFrom.getAlignment ().getSequences ().iterator (); $fromSeq.hasNext () && ((fromSeq = $fromSeq.next ()) || true);) { +if (fromSeq.getCharAt (col) == fromGapChar) { +continue; +}var residuePos = fromSeq.findPosition (col); +var sr = jalview.util.MappingUtils.buildSearchResults (fromSeq, residuePos, codonFrames); +for (var m, $m = sr.getResults ().iterator (); $m.hasNext () && ((m = $m.next ()) || true);) { +var mappedStartResidue = m.getStart (); +var mappedEndResidue = m.getEnd (); +var mappedSeq = m.getSequence (); +for (var toSeq, $toSeq = mapTo.getAlignment ().getSequences ().iterator (); $toSeq.hasNext () && ((toSeq = $toSeq.next ()) || true);) { +if (toSeq.getDatasetSequence () === mappedSeq) { +var mappedStartCol = toSeq.findIndex (mappedStartResidue); +var mappedEndCol = toSeq.findIndex (mappedEndResidue); +mappedToMin = Math.min (mappedToMin, mappedStartCol); +mappedToMax = Math.max (mappedToMax, mappedEndCol); +break; +}} +} +} +for (var i = mappedToMin; i <= mappedToMax; i++) { +mappedColumns.addElement (i - 1); +} +} +return mappedColumns; +}, "jalview.datamodel.ColumnSelection,jalview.api.AlignViewportI,jalview.api.AlignViewportI"); +c$.findCodonFor = Clazz.defineMethod (c$, "findCodonFor", +function (seq, col, mappings) { +var dsPos = seq.findPosition (col); +for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { +if (mapping.involvesSequence (seq)) { +return mapping.getMappedCodon (seq.getDatasetSequence (), dsPos); +}} +return null; +}, "jalview.datamodel.SequenceI,~N,java.util.Set"); +c$.flattenRanges = Clazz.defineMethod (c$, "flattenRanges", +function (ranges) { +var count = 0; +for (var i = 0; i < ranges.length - 1; i += 2) { +count += ranges[i + 1] - ranges[i] + 1; +} +var result = Clazz.newIntArray (count, 0); +var k = 0; +for (var i = 0; i < ranges.length - 1; i += 2) { +for (var j = ranges[i]; j <= ranges[i + 1]; j++) { +result[k++] = j; +} +} +return result; +}, "~A"); +c$.findMappingsForSequence = Clazz.defineMethod (c$, "findMappingsForSequence", +function (sequence, mappings) { +var result = new java.util.ArrayList (); +if (sequence == null || mappings == null) { +return result; +}for (var mapping, $mapping = mappings.iterator (); $mapping.hasNext () && ((mapping = $mapping.next ()) || true);) { +if (mapping.involvesSequence (sequence)) { +result.add (mapping); +}} +return result; +}, "jalview.datamodel.SequenceI,java.util.Set"); +}); diff --git a/bin/jalview/util/MessageManager.class b/bin/jalview/util/MessageManager.class index be413954845211fd1cbedafc408c36ee04b7de36..c37487c008330aead44b2ac8d921e0ec9597c63d 100644 GIT binary patch delta 27 jcmZ21wMc4%7$>94W^qnaMs_|1mfs9+v71A<&NBf3WIP8j delta 28 kcmZ1^wODF{7$>9aW^qnaMh<=k*53?nQcjzLxy~~I0BLmxG5`Po diff --git a/bin/jalview/util/MessageManager.js b/bin/jalview/util/MessageManager.js index 44350e0..4283582 100644 --- a/bin/jalview/util/MessageManager.js +++ b/bin/jalview/util/MessageManager.js @@ -1,73 +1,73 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.text.MessageFormat", "java.util.logging.Logger"], "jalview.util.MessageManager", ["java.util.Locale", "$.ResourceBundle", "java.util.logging.Level"], function () { -c$ = Clazz.declareType (jalview.util, "MessageManager"); -c$.getString = Clazz.defineMethod (c$, "getString", -function (key) { -var value = "[missing key] " + key; -try { -value = jalview.util.MessageManager.rb.getString (key); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -jalview.util.MessageManager.log.warning ("I18N missing: " + jalview.util.MessageManager.loc + "\t" + key); -} else { -throw e; -} -} -return value; -}, "~S"); -c$.getLocale = Clazz.defineMethod (c$, "getLocale", -function () { -return jalview.util.MessageManager.loc; -}); -c$.formatMessage = Clazz.defineMethod (c$, "formatMessage", -function (key, params) { -return java.text.MessageFormat.format (jalview.util.MessageManager.getString (key), params); -}, "~S,~A"); -c$.formatMessage = Clazz.defineMethod (c$, "formatMessage", -function (key, params) { -return java.text.MessageFormat.format (jalview.util.MessageManager.getString (key), params); -}, "~S,~A"); -c$.getStringOrReturn = Clazz.defineMethod (c$, "getStringOrReturn", -function (keyroot, name) { -var smkey = keyroot + name.toLowerCase ().replaceAll (" ", ""); -try { -name = jalview.util.MessageManager.rb.getString (smkey); -} catch (x) { -if (Clazz.exceptionOf (x, Exception)) { -jalview.util.MessageManager.log.finest ("I18N missing key with root " + keyroot + ": " + jalview.util.MessageManager.loc + "\t" + smkey); -} else { -throw x; -} -} -return name; -}, "~S,~S"); -Clazz.defineStatics (c$, -"rb", null); -c$.log = c$.prototype.log = java.util.logging.Logger.getLogger (jalview.util.MessageManager.getCanonicalName ()); -Clazz.defineStatics (c$, -"loc", null); -{ -try { -jalview.util.MessageManager.loc = java.util.Locale.getDefault (); -jalview.util.MessageManager.log.info ("Getting messages for lang: " + jalview.util.MessageManager.loc); -jalview.util.MessageManager.rb = java.util.ResourceBundle.getBundle ("lang.Messages", jalview.util.MessageManager.loc); -if (jalview.util.MessageManager.rb == null || jalview.util.MessageManager.log.isLoggable (java.util.logging.Level.FINEST)) { -jalview.util.MessageManager.log.finest ("Language keys: " + jalview.util.MessageManager.rb.keySet ()); -}} catch (e$$) { -if (Clazz.exceptionOf (e$$, Exception)) { -var q = e$$; -{ -jalview.util.MessageManager.log.warning ("Exception when initting Locale for i18n messages\n" + q.getMessage ()); -q.printStackTrace (); -} -} else if (Clazz.exceptionOf (e$$, Error)) { -var v = e$$; -{ -jalview.util.MessageManager.log.warning ("Error when initting Locale for i18n messages\n" + v.getMessage ()); -v.printStackTrace (); -} -} else { -throw e$$; -} -} -}}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.text.MessageFormat", "java.util.logging.Logger"], "jalview.util.MessageManager", ["java.util.Locale", "$.ResourceBundle", "java.util.logging.Level"], function () { +c$ = Clazz.declareType (jalview.util, "MessageManager"); +c$.getString = Clazz.defineMethod (c$, "getString", +function (key) { +var value = "[missing key] " + key; +try { +value = jalview.util.MessageManager.rb.getString (key); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +jalview.util.MessageManager.log.warning ("I18N missing: " + jalview.util.MessageManager.loc + "\t" + key); +} else { +throw e; +} +} +return value; +}, "~S"); +c$.getLocale = Clazz.defineMethod (c$, "getLocale", +function () { +return jalview.util.MessageManager.loc; +}); +c$.formatMessage = Clazz.defineMethod (c$, "formatMessage", +function (key, params) { +return java.text.MessageFormat.format (jalview.util.MessageManager.getString (key), params); +}, "~S,~A"); +c$.formatMessage = Clazz.defineMethod (c$, "formatMessage", +function (key, params) { +return java.text.MessageFormat.format (jalview.util.MessageManager.getString (key), params); +}, "~S,~A"); +c$.getStringOrReturn = Clazz.defineMethod (c$, "getStringOrReturn", +function (keyroot, name) { +var smkey = keyroot + name.toLowerCase ().replaceAll (" ", ""); +try { +name = jalview.util.MessageManager.rb.getString (smkey); +} catch (x) { +if (Clazz.exceptionOf (x, Exception)) { +jalview.util.MessageManager.log.finest ("I18N missing key with root " + keyroot + ": " + jalview.util.MessageManager.loc + "\t" + smkey); +} else { +throw x; +} +} +return name; +}, "~S,~S"); +Clazz.defineStatics (c$, +"rb", null); +c$.log = c$.prototype.log = java.util.logging.Logger.getLogger (jalview.util.MessageManager.getCanonicalName ()); +Clazz.defineStatics (c$, +"loc", null); +{ +try { +jalview.util.MessageManager.loc = java.util.Locale.getDefault (); +jalview.util.MessageManager.log.info ("Getting messages for lang: " + jalview.util.MessageManager.loc); +jalview.util.MessageManager.rb = java.util.ResourceBundle.getBundle ("lang.Messages", jalview.util.MessageManager.loc); +if (jalview.util.MessageManager.rb == null || jalview.util.MessageManager.log.isLoggable (java.util.logging.Level.FINEST)) { +jalview.util.MessageManager.log.finest ("Language keys: " + jalview.util.MessageManager.rb.keySet ()); +}} catch (e$$) { +if (Clazz.exceptionOf (e$$, Exception)) { +var q = e$$; +{ +jalview.util.MessageManager.log.warning ("Exception when initting Locale for i18n messages\n" + q.getMessage ()); +q.printStackTrace (); +} +} else if (Clazz.exceptionOf (e$$, Error)) { +var v = e$$; +{ +jalview.util.MessageManager.log.warning ("Error when initting Locale for i18n messages\n" + v.getMessage ()); +v.printStackTrace (); +} +} else { +throw e$$; +} +} +}}); diff --git a/bin/jalview/util/ParseHtmlBodyAndLinks.class b/bin/jalview/util/ParseHtmlBodyAndLinks.class index 4160bc90927fbebcf3b088458254344254ea1711..3c62b7d3acd8aed383a9fd10b5ad0d3f4e97d5f8 100644 GIT binary patch delta 32 ocmX>leNuYE3{J+=n`d%5Ff(^C@J+tMqt7TmnTJ<$vKsFa0K69p6951J delta 34 qcmX>peM)-63{J)~n`d%5Ff(^E@K3(Oqt7TanTJ=Bk!i9j?-BsbkqQ+6 diff --git a/bin/jalview/util/ParseHtmlBodyAndLinks.js b/bin/jalview/util/ParseHtmlBodyAndLinks.js index bf67f6a..8e41548 100644 --- a/bin/jalview/util/ParseHtmlBodyAndLinks.js +++ b/bin/jalview/util/ParseHtmlBodyAndLinks.js @@ -1,78 +1,78 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.lang.StringBuffer", "java.util.ArrayList", "java.util.regex.Pattern"], "jalview.util.ParseHtmlBodyAndLinks", ["java.util.StringTokenizer"], function () { -c$ = Clazz.decorateAsClass (function () { -this.orig = null; -this.htmlContent = true; -this.links = null; -this.sb = null; -Clazz.instantialize (this, arguments); -}, jalview.util, "ParseHtmlBodyAndLinks"); -Clazz.prepareFields (c$, function () { -this.links = new java.util.ArrayList (); -this.sb = new StringBuffer (); -}); -Clazz.defineMethod (c$, "getOrig", -function () { -return this.orig; -}); -Clazz.defineMethod (c$, "isHtmlContent", -function () { -return this.htmlContent; -}); -Clazz.defineMethod (c$, "getContent", -function () { -return this.sb.toString (); -}); -Clazz.defineMethod (c$, "getLinks", -function () { -return this.links; -}); -Clazz.makeConstructor (c$, -function (description, removeHTML, newline) { -if (description == null || description.length == 0) { -this.htmlContent = false; -return; -}if (description.toUpperCase ().indexOf ("") == -1) { -this.htmlContent = false; -}this.orig = description; -var st = new java.util.StringTokenizer (description, "<"); -var token; -var link; -var startTag; -var tag = null; -while (st.hasMoreElements ()) { -token = st.nextToken ("&>"); -if (token.equalsIgnoreCase ("html") || token.startsWith ("/")) { -continue; -}tag = null; -startTag = token.indexOf ("<"); -if (startTag > -1) { -tag = token.substring (startTag + 1); -token = token.substring (0, startTag); -}if (tag != null && tag.toUpperCase ().startsWith ("A HREF=")) { -if (token.length > 0) { -this.sb.append (token); -}link = tag.substring (tag.indexOf ("\"") + 1, tag.length - 1); -var label = st.nextToken ("<>"); -this.links.add (label + "|" + link); -this.sb.append (label + "%LINK%"); -} else if (tag != null && tag.equalsIgnoreCase ("br")) { -this.sb.append (newline); -} else if (token.startsWith ("lt;")) { -this.sb.append ("<" + token.substring (3)); -} else if (token.startsWith ("gt;")) { -this.sb.append (">" + token.substring (3)); -} else if (token.startsWith ("amp;")) { -this.sb.append ("&" + token.substring (4)); -} else { -this.sb.append (token); -}} -if (removeHTML && !this.htmlContent) { -this.sb = new StringBuffer (jalview.util.ParseHtmlBodyAndLinks.LEFT_ANGLE_BRACKET_PATTERN.matcher (description).replaceAll ("<")); -}}, "~S,~B,~S"); -Clazz.defineMethod (c$, "getNonHtmlContent", -function () { -return this.isHtmlContent () ? this.sb.toString () : this.orig; -}); -c$.LEFT_ANGLE_BRACKET_PATTERN = c$.prototype.LEFT_ANGLE_BRACKET_PATTERN = java.util.regex.Pattern.compile ("<"); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.lang.StringBuffer", "java.util.ArrayList", "java.util.regex.Pattern"], "jalview.util.ParseHtmlBodyAndLinks", ["java.util.StringTokenizer"], function () { +c$ = Clazz.decorateAsClass (function () { +this.orig = null; +this.htmlContent = true; +this.links = null; +this.sb = null; +Clazz.instantialize (this, arguments); +}, jalview.util, "ParseHtmlBodyAndLinks"); +Clazz.prepareFields (c$, function () { +this.links = new java.util.ArrayList (); +this.sb = new StringBuffer (); +}); +Clazz.defineMethod (c$, "getOrig", +function () { +return this.orig; +}); +Clazz.defineMethod (c$, "isHtmlContent", +function () { +return this.htmlContent; +}); +Clazz.defineMethod (c$, "getContent", +function () { +return this.sb.toString (); +}); +Clazz.defineMethod (c$, "getLinks", +function () { +return this.links; +}); +Clazz.makeConstructor (c$, +function (description, removeHTML, newline) { +if (description == null || description.length == 0) { +this.htmlContent = false; +return; +}if (description.toUpperCase ().indexOf ("") == -1) { +this.htmlContent = false; +}this.orig = description; +var st = new java.util.StringTokenizer (description, "<"); +var token; +var link; +var startTag; +var tag = null; +while (st.hasMoreElements ()) { +token = st.nextToken ("&>"); +if (token.equalsIgnoreCase ("html") || token.startsWith ("/")) { +continue; +}tag = null; +startTag = token.indexOf ("<"); +if (startTag > -1) { +tag = token.substring (startTag + 1); +token = token.substring (0, startTag); +}if (tag != null && tag.toUpperCase ().startsWith ("A HREF=")) { +if (token.length > 0) { +this.sb.append (token); +}link = tag.substring (tag.indexOf ("\"") + 1, tag.length - 1); +var label = st.nextToken ("<>"); +this.links.add (label + "|" + link); +this.sb.append (label + "%LINK%"); +} else if (tag != null && tag.equalsIgnoreCase ("br")) { +this.sb.append (newline); +} else if (token.startsWith ("lt;")) { +this.sb.append ("<" + token.substring (3)); +} else if (token.startsWith ("gt;")) { +this.sb.append (">" + token.substring (3)); +} else if (token.startsWith ("amp;")) { +this.sb.append ("&" + token.substring (4)); +} else { +this.sb.append (token); +}} +if (removeHTML && !this.htmlContent) { +this.sb = new StringBuffer (jalview.util.ParseHtmlBodyAndLinks.LEFT_ANGLE_BRACKET_PATTERN.matcher (description).replaceAll ("<")); +}}, "~S,~B,~S"); +Clazz.defineMethod (c$, "getNonHtmlContent", +function () { +return this.isHtmlContent () ? this.sb.toString () : this.orig; +}); +c$.LEFT_ANGLE_BRACKET_PATTERN = c$.prototype.LEFT_ANGLE_BRACKET_PATTERN = java.util.regex.Pattern.compile ("<"); +}); diff --git a/bin/jalview/util/Platform.js b/bin/jalview/util/Platform.js index d349bdb..e599669 100644 --- a/bin/jalview/util/Platform.js +++ b/bin/jalview/util/Platform.js @@ -1,30 +1,30 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.Platform", ["java.lang.StringBuffer"], function () { -c$ = Clazz.declareType (jalview.util, "Platform"); -c$.isAMac = Clazz.defineMethod (c$, "isAMac", -function () { -return java.lang.System.getProperty ("os.name").indexOf ("Mac") > -1; -}); -c$.isHeadless = Clazz.defineMethod (c$, "isHeadless", -function () { -var hdls = java.lang.System.getProperty ("java.awt.headless"); -return hdls != null && hdls.equals ("true"); -}); -c$.getMaxCommandLineLength = Clazz.defineMethod (c$, "getMaxCommandLineLength", -function () { -return 2046; -}); -c$.escapeString = Clazz.defineMethod (c$, "escapeString", -function (file) { -var f = new StringBuffer (); -var p = 0; -var lastp = 0; -while ((p = file.indexOf ('\\', lastp)) > -1) { -f.append (file.subSequence (lastp, p)); -f.append ("\\\\"); -lastp = p + 1; -} -f.append (file.substring (lastp)); -return f.toString (); -}, "~S"); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.Platform", ["java.lang.StringBuffer"], function () { +c$ = Clazz.declareType (jalview.util, "Platform"); +c$.isAMac = Clazz.defineMethod (c$, "isAMac", +function () { +return java.lang.System.getProperty ("os.name").indexOf ("Mac") > -1; +}); +c$.isHeadless = Clazz.defineMethod (c$, "isHeadless", +function () { +var hdls = java.lang.System.getProperty ("java.awt.headless"); +return hdls != null && hdls.equals ("true"); +}); +c$.getMaxCommandLineLength = Clazz.defineMethod (c$, "getMaxCommandLineLength", +function () { +return 2046; +}); +c$.escapeString = Clazz.defineMethod (c$, "escapeString", +function (file) { +var f = new StringBuffer (); +var p = 0; +var lastp = 0; +while ((p = file.indexOf ('\\', lastp)) > -1) { +f.append (file.subSequence (lastp, p)); +f.append ("\\\\"); +lastp = p + 1; +} +f.append (file.substring (lastp)); +return f.toString (); +}, "~S"); +}); diff --git a/bin/jalview/util/QuickSort.js b/bin/jalview/util/QuickSort.js index a0960b5..f8fb52f 100644 --- a/bin/jalview/util/QuickSort.js +++ b/bin/jalview/util/QuickSort.js @@ -1,231 +1,231 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.QuickSort", ["java.lang.Float", "java.util.Arrays"], function () { -c$ = Clazz.declareType (jalview.util, "QuickSort"); -c$.sortInt = Clazz.defineMethod (c$, "sortInt", -function (arr, s) { -jalview.util.QuickSort.sortInt (arr, 0, arr.length - 1, s); -}, "~A,~A"); -c$.sortFloatObject = Clazz.defineMethod (c$, "sortFloatObject", -function (arr, s) { -jalview.util.QuickSort.sortFloat (arr, 0, arr.length - 1, s); -}, "~A,~A"); -c$.sortDouble = Clazz.defineMethod (c$, "sortDouble", -function (arr, s) { -jalview.util.QuickSort.sortDouble (arr, 0, arr.length - 1, s); -}, "~A,~A"); -c$.sort = Clazz.defineMethod (c$, "sort", -function (arr, s) { -jalview.util.QuickSort.stringSort (arr, 0, arr.length - 1, s); -}, "~A,~A"); -c$.stringSort = Clazz.defineMethod (c$, "stringSort", -($fz = function (arr, p, r, s) { -var q; -if (p < r) { -q = jalview.util.QuickSort.stringPartition (arr, p, r, s); -jalview.util.QuickSort.stringSort (arr, p, q, s); -jalview.util.QuickSort.stringSort (arr, q + 1, r, s); -}}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); -c$.sortFloat = Clazz.defineMethod (c$, "sortFloat", -($fz = function (arr, p, r, s) { -var q; -if (p < r) { -q = jalview.util.QuickSort.partitionFloat (arr, p, r, s); -jalview.util.QuickSort.sortFloat (arr, p, q, s); -jalview.util.QuickSort.sortFloat (arr, q + 1, r, s); -}}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); -c$.sortInt = Clazz.defineMethod (c$, "sortInt", -($fz = function (arr, p, r, s) { -var q; -if (p < r) { -q = jalview.util.QuickSort.partitionInt (arr, p, r, s); -jalview.util.QuickSort.sortInt (arr, p, q, s); -jalview.util.QuickSort.sortInt (arr, q + 1, r, s); -}}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); -c$.partitionFloat = Clazz.defineMethod (c$, "partitionFloat", -($fz = function (arr, p, r, s) { -var x = arr[p]; -var i = p - 1; -var j = r + 1; -while (true) { -do { -j = j - 1; -} while (arr[j] > x); -do { -i = i + 1; -} while (arr[i] < x); -if (i < j) { -var tmp = arr[i]; -arr[i] = arr[j]; -arr[j] = tmp; -var tmp2 = s[i]; -s[i] = s[j]; -s[j] = tmp2; -} else { -return j; -}} -}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); -c$.partitionInt = Clazz.defineMethod (c$, "partitionInt", -($fz = function (arr, p, r, s) { -var x = arr[p]; -var i = p - 1; -var j = r + 1; -while (true) { -do { -j = j - 1; -} while (arr[j] > x); -do { -i = i + 1; -} while (arr[i] < x); -if (i < j) { -var tmp = arr[i]; -arr[i] = arr[j]; -arr[j] = tmp; -var tmp2 = s[i]; -s[i] = s[j]; -s[j] = tmp2; -} else { -return j; -}} -}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); -c$.stringPartition = Clazz.defineMethod (c$, "stringPartition", -($fz = function (arr, p, r, s) { -var x = arr[p]; -var i = p - 1; -var j = r + 1; -while (true) { -do { -j = j - 1; -} while (arr[j].compareTo (x) < 0); -do { -i = i + 1; -} while (arr[i].compareTo (x) > 0); -if (i < j) { -var tmp = arr[i]; -arr[i] = arr[j]; -arr[j] = tmp; -var tmp2 = s[i]; -s[i] = s[j]; -s[j] = tmp2; -} else { -return j; -}} -}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); -c$.sortFloatChar = Clazz.defineMethod (c$, "sortFloatChar", -function (arr, s) { -var f1 = Clazz.newFloatArray (arr.length, 0); -var s1 = Clazz.newCharArray (s.length, '\0'); -var nextZeroValue = 0; -var nextNonZeroValue = arr.length - 1; -for (var i = 0; i < arr.length; i++) { -var val = arr[i]; -if (val > 0) { -f1[nextNonZeroValue] = val; -s1[nextNonZeroValue] = s[i]; -nextNonZeroValue--; -} else { -f1[nextZeroValue] = val; -s1[nextZeroValue] = s[i]; -nextZeroValue++; -}} -System.arraycopy (f1, 0, arr, 0, nextZeroValue); -System.arraycopy (s1, 0, s, 0, nextZeroValue); -if (nextZeroValue == arr.length) { -return; -}var nonZeroFloats = java.util.Arrays.copyOfRange (f1, nextZeroValue, f1.length); -var nonZeroChars = java.util.Arrays.copyOfRange (s1, nextZeroValue, s1.length); -jalview.util.QuickSort.externalSortFloat (nonZeroFloats, nonZeroChars); -System.arraycopy (nonZeroFloats, 0, arr, nextZeroValue, nonZeroFloats.length); -System.arraycopy (nonZeroChars, 0, s, nextZeroValue, nonZeroChars.length); -}, "~A,~A"); -c$.externalSortFloat = Clazz.defineMethod (c$, "externalSortFloat", -($fz = function (arr, s) { -var length = arr.length; -var indices = jalview.util.QuickSort.makeIndexArray (length); -java.util.Arrays.sort (indices, new jalview.util.QuickSort.FloatComparator (arr)); -var sortedFloats = Clazz.newFloatArray (length, 0); -var sortedChars = Clazz.newCharArray (s.length, '\0'); -for (var i = 0; i < length; i++) { -sortedFloats[i] = arr[indices[i]]; -sortedChars[i] = s[indices[i]]; -} -System.arraycopy (sortedFloats, 0, arr, 0, length); -System.arraycopy (sortedChars, 0, s, 0, s.length); -}, $fz.isPrivate = true, $fz), "~A,~A"); -c$.makeIndexArray = Clazz.defineMethod (c$, "makeIndexArray", -($fz = function (length) { -var indices = new Array (length); -for (var i = 0; i < length; i++) { -indices[i] = new Integer (i); -} -return indices; -}, $fz.isPrivate = true, $fz), "~N"); -c$.sortIntChar = Clazz.defineMethod (c$, "sortIntChar", -function (arr, s) { -var f1 = Clazz.newIntArray (arr.length, 0); -var s1 = Clazz.newCharArray (s.length, '\0'); -var nextZeroValue = 0; -var nextNonZeroValue = arr.length - 1; -for (var i = 0; i < arr.length; i++) { -var val = arr[i]; -if (val > 0) { -f1[nextNonZeroValue] = val; -s1[nextNonZeroValue] = s[i]; -nextNonZeroValue--; -} else { -f1[nextZeroValue] = val; -s1[nextZeroValue] = s[i]; -nextZeroValue++; -}} -System.arraycopy (f1, 0, arr, 0, nextZeroValue); -System.arraycopy (s1, 0, s, 0, nextZeroValue); -if (nextZeroValue == arr.length) { -return; -}var nonZeroInts = java.util.Arrays.copyOfRange (f1, nextZeroValue, f1.length); -var nonZeroChars = java.util.Arrays.copyOfRange (s1, nextZeroValue, s1.length); -jalview.util.QuickSort.externalSortInt (nonZeroInts, nonZeroChars); -System.arraycopy (nonZeroInts, 0, arr, nextZeroValue, nonZeroInts.length); -System.arraycopy (nonZeroChars, 0, s, nextZeroValue, nonZeroChars.length); -}, "~A,~A"); -c$.externalSortInt = Clazz.defineMethod (c$, "externalSortInt", -($fz = function (arr, s) { -var length = arr.length; -var indices = jalview.util.QuickSort.makeIndexArray (length); -java.util.Arrays.sort (indices, new jalview.util.QuickSort.IntComparator (arr)); -var sortedInts = Clazz.newIntArray (length, 0); -var sortedChars = Clazz.newCharArray (s.length, '\0'); -for (var i = 0; i < length; i++) { -sortedInts[i] = arr[indices[i]]; -sortedChars[i] = s[indices[i]]; -} -System.arraycopy (sortedInts, 0, arr, 0, length); -System.arraycopy (sortedChars, 0, s, 0, s.length); -}, $fz.isPrivate = true, $fz), "~A,~A"); -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.values = null; -Clazz.instantialize (this, arguments); -}, jalview.util.QuickSort, "FloatComparator", null, java.util.Comparator); -Clazz.makeConstructor (c$, -function (a) { -this.values = a; -}, "~A"); -Clazz.overrideMethod (c$, "compare", -function (a, b) { -return Float.compare (this.values[a.intValue ()], this.values[b]); -}, "Integer,Integer"); -c$ = Clazz.p0p (); -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.values = null; -Clazz.instantialize (this, arguments); -}, jalview.util.QuickSort, "IntComparator", null, java.util.Comparator); -Clazz.makeConstructor (c$, -function (a) { -this.values = a; -}, "~A"); -Clazz.overrideMethod (c$, "compare", -function (a, b) { -return Integer.compare (this.values[a], this.values[b]); -}, "Integer,Integer"); -c$ = Clazz.p0p (); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.QuickSort", ["java.lang.Float", "java.util.Arrays"], function () { +c$ = Clazz.declareType (jalview.util, "QuickSort"); +c$.sortInt = Clazz.defineMethod (c$, "sortInt", +function (arr, s) { +jalview.util.QuickSort.sortInt (arr, 0, arr.length - 1, s); +}, "~A,~A"); +c$.sortFloatObject = Clazz.defineMethod (c$, "sortFloatObject", +function (arr, s) { +jalview.util.QuickSort.sortFloat (arr, 0, arr.length - 1, s); +}, "~A,~A"); +c$.sortDouble = Clazz.defineMethod (c$, "sortDouble", +function (arr, s) { +jalview.util.QuickSort.sortDouble (arr, 0, arr.length - 1, s); +}, "~A,~A"); +c$.sort = Clazz.defineMethod (c$, "sort", +function (arr, s) { +jalview.util.QuickSort.stringSort (arr, 0, arr.length - 1, s); +}, "~A,~A"); +c$.stringSort = Clazz.defineMethod (c$, "stringSort", +($fz = function (arr, p, r, s) { +var q; +if (p < r) { +q = jalview.util.QuickSort.stringPartition (arr, p, r, s); +jalview.util.QuickSort.stringSort (arr, p, q, s); +jalview.util.QuickSort.stringSort (arr, q + 1, r, s); +}}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); +c$.sortFloat = Clazz.defineMethod (c$, "sortFloat", +($fz = function (arr, p, r, s) { +var q; +if (p < r) { +q = jalview.util.QuickSort.partitionFloat (arr, p, r, s); +jalview.util.QuickSort.sortFloat (arr, p, q, s); +jalview.util.QuickSort.sortFloat (arr, q + 1, r, s); +}}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); +c$.sortInt = Clazz.defineMethod (c$, "sortInt", +($fz = function (arr, p, r, s) { +var q; +if (p < r) { +q = jalview.util.QuickSort.partitionInt (arr, p, r, s); +jalview.util.QuickSort.sortInt (arr, p, q, s); +jalview.util.QuickSort.sortInt (arr, q + 1, r, s); +}}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); +c$.partitionFloat = Clazz.defineMethod (c$, "partitionFloat", +($fz = function (arr, p, r, s) { +var x = arr[p]; +var i = p - 1; +var j = r + 1; +while (true) { +do { +j = j - 1; +} while (arr[j] > x); +do { +i = i + 1; +} while (arr[i] < x); +if (i < j) { +var tmp = arr[i]; +arr[i] = arr[j]; +arr[j] = tmp; +var tmp2 = s[i]; +s[i] = s[j]; +s[j] = tmp2; +} else { +return j; +}} +}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); +c$.partitionInt = Clazz.defineMethod (c$, "partitionInt", +($fz = function (arr, p, r, s) { +var x = arr[p]; +var i = p - 1; +var j = r + 1; +while (true) { +do { +j = j - 1; +} while (arr[j] > x); +do { +i = i + 1; +} while (arr[i] < x); +if (i < j) { +var tmp = arr[i]; +arr[i] = arr[j]; +arr[j] = tmp; +var tmp2 = s[i]; +s[i] = s[j]; +s[j] = tmp2; +} else { +return j; +}} +}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); +c$.stringPartition = Clazz.defineMethod (c$, "stringPartition", +($fz = function (arr, p, r, s) { +var x = arr[p]; +var i = p - 1; +var j = r + 1; +while (true) { +do { +j = j - 1; +} while (arr[j].compareTo (x) < 0); +do { +i = i + 1; +} while (arr[i].compareTo (x) > 0); +if (i < j) { +var tmp = arr[i]; +arr[i] = arr[j]; +arr[j] = tmp; +var tmp2 = s[i]; +s[i] = s[j]; +s[j] = tmp2; +} else { +return j; +}} +}, $fz.isPrivate = true, $fz), "~A,~N,~N,~A"); +c$.sortFloatChar = Clazz.defineMethod (c$, "sortFloatChar", +function (arr, s) { +var f1 = Clazz.newFloatArray (arr.length, 0); +var s1 = Clazz.newCharArray (s.length, '\0'); +var nextZeroValue = 0; +var nextNonZeroValue = arr.length - 1; +for (var i = 0; i < arr.length; i++) { +var val = arr[i]; +if (val > 0) { +f1[nextNonZeroValue] = val; +s1[nextNonZeroValue] = s[i]; +nextNonZeroValue--; +} else { +f1[nextZeroValue] = val; +s1[nextZeroValue] = s[i]; +nextZeroValue++; +}} +System.arraycopy (f1, 0, arr, 0, nextZeroValue); +System.arraycopy (s1, 0, s, 0, nextZeroValue); +if (nextZeroValue == arr.length) { +return; +}var nonZeroFloats = java.util.Arrays.copyOfRange (f1, nextZeroValue, f1.length); +var nonZeroChars = java.util.Arrays.copyOfRange (s1, nextZeroValue, s1.length); +jalview.util.QuickSort.externalSortFloat (nonZeroFloats, nonZeroChars); +System.arraycopy (nonZeroFloats, 0, arr, nextZeroValue, nonZeroFloats.length); +System.arraycopy (nonZeroChars, 0, s, nextZeroValue, nonZeroChars.length); +}, "~A,~A"); +c$.externalSortFloat = Clazz.defineMethod (c$, "externalSortFloat", +($fz = function (arr, s) { +var length = arr.length; +var indices = jalview.util.QuickSort.makeIndexArray (length); +java.util.Arrays.sort (indices, new jalview.util.QuickSort.FloatComparator (arr)); +var sortedFloats = Clazz.newFloatArray (length, 0); +var sortedChars = Clazz.newCharArray (s.length, '\0'); +for (var i = 0; i < length; i++) { +sortedFloats[i] = arr[indices[i]]; +sortedChars[i] = s[indices[i]]; +} +System.arraycopy (sortedFloats, 0, arr, 0, length); +System.arraycopy (sortedChars, 0, s, 0, s.length); +}, $fz.isPrivate = true, $fz), "~A,~A"); +c$.makeIndexArray = Clazz.defineMethod (c$, "makeIndexArray", +($fz = function (length) { +var indices = new Array (length); +for (var i = 0; i < length; i++) { +indices[i] = new Integer (i); +} +return indices; +}, $fz.isPrivate = true, $fz), "~N"); +c$.sortIntChar = Clazz.defineMethod (c$, "sortIntChar", +function (arr, s) { +var f1 = Clazz.newIntArray (arr.length, 0); +var s1 = Clazz.newCharArray (s.length, '\0'); +var nextZeroValue = 0; +var nextNonZeroValue = arr.length - 1; +for (var i = 0; i < arr.length; i++) { +var val = arr[i]; +if (val > 0) { +f1[nextNonZeroValue] = val; +s1[nextNonZeroValue] = s[i]; +nextNonZeroValue--; +} else { +f1[nextZeroValue] = val; +s1[nextZeroValue] = s[i]; +nextZeroValue++; +}} +System.arraycopy (f1, 0, arr, 0, nextZeroValue); +System.arraycopy (s1, 0, s, 0, nextZeroValue); +if (nextZeroValue == arr.length) { +return; +}var nonZeroInts = java.util.Arrays.copyOfRange (f1, nextZeroValue, f1.length); +var nonZeroChars = java.util.Arrays.copyOfRange (s1, nextZeroValue, s1.length); +jalview.util.QuickSort.externalSortInt (nonZeroInts, nonZeroChars); +System.arraycopy (nonZeroInts, 0, arr, nextZeroValue, nonZeroInts.length); +System.arraycopy (nonZeroChars, 0, s, nextZeroValue, nonZeroChars.length); +}, "~A,~A"); +c$.externalSortInt = Clazz.defineMethod (c$, "externalSortInt", +($fz = function (arr, s) { +var length = arr.length; +var indices = jalview.util.QuickSort.makeIndexArray (length); +java.util.Arrays.sort (indices, new jalview.util.QuickSort.IntComparator (arr)); +var sortedInts = Clazz.newIntArray (length, 0); +var sortedChars = Clazz.newCharArray (s.length, '\0'); +for (var i = 0; i < length; i++) { +sortedInts[i] = arr[indices[i]]; +sortedChars[i] = s[indices[i]]; +} +System.arraycopy (sortedInts, 0, arr, 0, length); +System.arraycopy (sortedChars, 0, s, 0, s.length); +}, $fz.isPrivate = true, $fz), "~A,~A"); +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.values = null; +Clazz.instantialize (this, arguments); +}, jalview.util.QuickSort, "FloatComparator", null, java.util.Comparator); +Clazz.makeConstructor (c$, +function (a) { +this.values = a; +}, "~A"); +Clazz.overrideMethod (c$, "compare", +function (a, b) { +return Float.compare (this.values[a.intValue ()], this.values[b]); +}, "Integer,Integer"); +c$ = Clazz.p0p (); +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.values = null; +Clazz.instantialize (this, arguments); +}, jalview.util.QuickSort, "IntComparator", null, java.util.Comparator); +Clazz.makeConstructor (c$, +function (a) { +this.values = a; +}, "~A"); +Clazz.overrideMethod (c$, "compare", +function (a, b) { +return Integer.compare (this.values[a], this.values[b]); +}, "Integer,Integer"); +c$ = Clazz.p0p (); +}); diff --git a/bin/jalview/util/ReverseListIterator.js b/bin/jalview/util/ReverseListIterator.js index f9edbc8..66e861f 100644 --- a/bin/jalview/util/ReverseListIterator.js +++ b/bin/jalview/util/ReverseListIterator.js @@ -1,23 +1,23 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.util.Iterator"], "jalview.util.ReverseListIterator", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.iterator = null; -Clazz.instantialize (this, arguments); -}, jalview.util, "ReverseListIterator", null, java.util.Iterator); -Clazz.makeConstructor (c$, -function (stuff) { -this.iterator = stuff.listIterator (stuff.size ()); -}, "java.util.List"); -Clazz.overrideMethod (c$, "hasNext", -function () { -return this.iterator.hasPrevious (); -}); -Clazz.overrideMethod (c$, "next", -function () { -return this.iterator.previous (); -}); -Clazz.overrideMethod (c$, "remove", -function () { -this.iterator.remove (); -}); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.util.Iterator"], "jalview.util.ReverseListIterator", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.iterator = null; +Clazz.instantialize (this, arguments); +}, jalview.util, "ReverseListIterator", null, java.util.Iterator); +Clazz.makeConstructor (c$, +function (stuff) { +this.iterator = stuff.listIterator (stuff.size ()); +}, "java.util.List"); +Clazz.overrideMethod (c$, "hasNext", +function () { +return this.iterator.hasPrevious (); +}); +Clazz.overrideMethod (c$, "next", +function () { +return this.iterator.previous (); +}); +Clazz.overrideMethod (c$, "remove", +function () { +this.iterator.remove (); +}); +}); diff --git a/bin/jalview/util/ShiftList.js b/bin/jalview/util/ShiftList.js index 29a9645..258fe14 100644 --- a/bin/jalview/util/ShiftList.js +++ b/bin/jalview/util/ShiftList.js @@ -1,67 +1,67 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (null, "jalview.util.ShiftList", ["java.util.ArrayList"], function () { -c$ = Clazz.decorateAsClass (function () { -this.shifts = null; -Clazz.instantialize (this, arguments); -}, jalview.util, "ShiftList"); -Clazz.makeConstructor (c$, -function () { -this.shifts = new java.util.ArrayList (); -}); -Clazz.defineMethod (c$, "addShift", -function (pos, shift) { -{ -var sidx = 0; -var rshift = null; -while (sidx < this.shifts.size () && (rshift = this.shifts.get (sidx))[0] < pos) { -sidx++; -} -if (sidx == this.shifts.size ()) { -this.shifts.add (sidx, Clazz.newIntArray (-1, [pos, shift])); -} else { -rshift[1] += shift; -}}}, "~N,~N"); -Clazz.defineMethod (c$, "shift", -function (pos) { -if (this.shifts.size () == 0) { -return pos; -}var shifted = pos; -var sidx = 0; -var rshift; -while (sidx < this.shifts.size () && (rshift = (this.shifts.get (sidx++)))[0] <= pos) { -shifted += rshift[1]; -} -return shifted; -}, "~N"); -Clazz.defineMethod (c$, "clear", -function () { -this.shifts.clear (); -}); -Clazz.defineMethod (c$, "getInverse", -function () { -var inverse = new jalview.util.ShiftList (); -{ -if (this.shifts != null) { -for (var sh, $sh = this.shifts.iterator (); $sh.hasNext () && ((sh = $sh.next ()) || true);) { -if (sh != null) { -inverse.shifts.add ( Clazz.newIntArray (-1, [sh[0], -sh[1]])); -}} -}}return inverse; -}); -c$.parseMap = Clazz.defineMethod (c$, "parseMap", -function (gapMap) { -var shiftList = null; -if (gapMap != null && gapMap.length > 0) { -shiftList = new jalview.util.ShiftList (); -for (var i = 0, p = 0; i < gapMap.length; p++, i++) { -if (p != gapMap[i]) { -shiftList.addShift (p, gapMap[i] - p); -p = gapMap[i]; -}} -}return shiftList; -}, "~A"); -Clazz.defineMethod (c$, "getShifts", -function () { -return this.shifts; -}); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.ShiftList", ["java.util.ArrayList"], function () { +c$ = Clazz.decorateAsClass (function () { +this.shifts = null; +Clazz.instantialize (this, arguments); +}, jalview.util, "ShiftList"); +Clazz.makeConstructor (c$, +function () { +this.shifts = new java.util.ArrayList (); +}); +Clazz.defineMethod (c$, "addShift", +function (pos, shift) { +{ +var sidx = 0; +var rshift = null; +while (sidx < this.shifts.size () && (rshift = this.shifts.get (sidx))[0] < pos) { +sidx++; +} +if (sidx == this.shifts.size ()) { +this.shifts.add (sidx, Clazz.newIntArray (-1, [pos, shift])); +} else { +rshift[1] += shift; +}}}, "~N,~N"); +Clazz.defineMethod (c$, "shift", +function (pos) { +if (this.shifts.size () == 0) { +return pos; +}var shifted = pos; +var sidx = 0; +var rshift; +while (sidx < this.shifts.size () && (rshift = (this.shifts.get (sidx++)))[0] <= pos) { +shifted += rshift[1]; +} +return shifted; +}, "~N"); +Clazz.defineMethod (c$, "clear", +function () { +this.shifts.clear (); +}); +Clazz.defineMethod (c$, "getInverse", +function () { +var inverse = new jalview.util.ShiftList (); +{ +if (this.shifts != null) { +for (var sh, $sh = this.shifts.iterator (); $sh.hasNext () && ((sh = $sh.next ()) || true);) { +if (sh != null) { +inverse.shifts.add ( Clazz.newIntArray (-1, [sh[0], -sh[1]])); +}} +}}return inverse; +}); +c$.parseMap = Clazz.defineMethod (c$, "parseMap", +function (gapMap) { +var shiftList = null; +if (gapMap != null && gapMap.length > 0) { +shiftList = new jalview.util.ShiftList (); +for (var i = 0, p = 0; i < gapMap.length; p++, i++) { +if (p != gapMap[i]) { +shiftList.addShift (p, gapMap[i] - p); +p = gapMap[i]; +}} +}return shiftList; +}, "~A"); +Clazz.defineMethod (c$, "getShifts", +function () { +return this.shifts; +}); +}); diff --git a/bin/jalview/util/StringUtils.js b/bin/jalview/util/StringUtils.js index fd878bf..0b21437 100644 --- a/bin/jalview/util/StringUtils.js +++ b/bin/jalview/util/StringUtils.js @@ -1,108 +1,108 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.util.regex.Pattern"], "jalview.util.StringUtils", ["java.lang.StringBuffer", "java.util.ArrayList"], function () { -c$ = Clazz.declareType (jalview.util, "StringUtils"); -c$.insertCharAt = Clazz.defineMethod (c$, "insertCharAt", -function ($in, position, count, ch) { -var tmp = Clazz.newCharArray ($in.length + count, '\0'); -if (position >= $in.length) { -System.arraycopy ($in, 0, tmp, 0, $in.length); -position = $in.length; -} else { -System.arraycopy ($in, 0, tmp, 0, position); -}var index = position; -while (count > 0) { -tmp[index++] = ch; -count--; -} -if (position < $in.length) { -System.arraycopy ($in, position, tmp, index, $in.length - position); -}return tmp; -}, "~A,~N,~N,~S"); -c$.deleteChars = Clazz.defineMethod (c$, "deleteChars", -function ($in, from, to) { -if (from >= $in.length || from < 0) { -return $in; -}var tmp; -if (to >= $in.length) { -tmp = Clazz.newCharArray (from, '\0'); -System.arraycopy ($in, 0, tmp, 0, from); -to = $in.length; -} else { -tmp = Clazz.newCharArray ($in.length - to + from, '\0'); -System.arraycopy ($in, 0, tmp, 0, from); -System.arraycopy ($in, to, tmp, from, $in.length - to); -}return tmp; -}, "~A,~N,~N"); -c$.getLastToken = Clazz.defineMethod (c$, "getLastToken", -function (input, token) { -if (input == null) { -return null; -}if (token == null) { -return input; -}var st = input.$plit (token); -return st[st.length - 1]; -}, "~S,~S"); -c$.separatorListToArray = Clazz.defineMethod (c$, "separatorListToArray", -function (input, delimiter) { -var seplen = delimiter.length; -if (input == null || input.equals ("") || input.equals (delimiter)) { -return null; -}var jv = new java.util.ArrayList (); -var cp = 0; -var pos; -var escape; -var wasescaped = false; -var wasquoted = false; -var lstitem = null; -while ((pos = input.indexOf (delimiter, cp)) >= cp) { -escape = (pos > 0 && input.charAt (pos - 1) == '\\') ? -1 : 0; -if (wasescaped || wasquoted) { -jv.set (jv.size () - 1, lstitem = lstitem + delimiter + input.substring (cp, pos + escape)); -} else { -jv.add (lstitem = input.substring (cp, pos + escape)); -}cp = pos + seplen; -wasescaped = escape == -1; -wasquoted = jalview.util.StringUtils.DELIMITERS_PATTERN.matcher (lstitem).matches (); -} -if (cp < input.length) { -var c = input.substring (cp); -if (wasescaped || wasquoted) { -jv.set (jv.size () - 1, lstitem + delimiter + c); -} else { -if (!c.equals (delimiter)) { -jv.add (c); -}}}if (jv.size () > 0) { -var v = jv.toArray ( new Array (jv.size ())); -jv.clear (); -if (false) { -System.err.println ("Array from '" + delimiter + "' separated List:\n" + v.length); -for (var i = 0; i < v.length; i++) { -System.err.println ("item " + i + " '" + v[i] + "'"); -} -}return v; -}if (false) { -System.err.println ("Empty Array from '" + delimiter + "' separated List"); -}return null; -}, "~S,~S"); -c$.arrayToSeparatorList = Clazz.defineMethod (c$, "arrayToSeparatorList", -function (list, separator) { -var v = new StringBuffer (); -if (list != null && list.length > 0) { -for (var i = 0, iSize = list.length; i < iSize; i++) { -if (list[i] != null) { -if (v.length () > 0) { -v.append (separator); -}v.append (list[i]); -}} -if (false) { -System.err.println ("Returning '" + separator + "' separated List:\n"); -System.err.println (v); -}return v.toString (); -}if (false) { -System.err.println ("Returning empty '" + separator + "' separated List\n"); -}return "" + separator; -}, "~A,~S"); -c$.DELIMITERS_PATTERN = c$.prototype.DELIMITERS_PATTERN = java.util.regex.Pattern.compile (".*='[^']*(?!')"); -Clazz.defineStatics (c$, -"DEBUG", false); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.util.regex.Pattern"], "jalview.util.StringUtils", ["java.lang.StringBuffer", "java.util.ArrayList"], function () { +c$ = Clazz.declareType (jalview.util, "StringUtils"); +c$.insertCharAt = Clazz.defineMethod (c$, "insertCharAt", +function ($in, position, count, ch) { +var tmp = Clazz.newCharArray ($in.length + count, '\0'); +if (position >= $in.length) { +System.arraycopy ($in, 0, tmp, 0, $in.length); +position = $in.length; +} else { +System.arraycopy ($in, 0, tmp, 0, position); +}var index = position; +while (count > 0) { +tmp[index++] = ch; +count--; +} +if (position < $in.length) { +System.arraycopy ($in, position, tmp, index, $in.length - position); +}return tmp; +}, "~A,~N,~N,~S"); +c$.deleteChars = Clazz.defineMethod (c$, "deleteChars", +function ($in, from, to) { +if (from >= $in.length || from < 0) { +return $in; +}var tmp; +if (to >= $in.length) { +tmp = Clazz.newCharArray (from, '\0'); +System.arraycopy ($in, 0, tmp, 0, from); +to = $in.length; +} else { +tmp = Clazz.newCharArray ($in.length - to + from, '\0'); +System.arraycopy ($in, 0, tmp, 0, from); +System.arraycopy ($in, to, tmp, from, $in.length - to); +}return tmp; +}, "~A,~N,~N"); +c$.getLastToken = Clazz.defineMethod (c$, "getLastToken", +function (input, token) { +if (input == null) { +return null; +}if (token == null) { +return input; +}var st = input.$plit (token); +return st[st.length - 1]; +}, "~S,~S"); +c$.separatorListToArray = Clazz.defineMethod (c$, "separatorListToArray", +function (input, delimiter) { +var seplen = delimiter.length; +if (input == null || input.equals ("") || input.equals (delimiter)) { +return null; +}var jv = new java.util.ArrayList (); +var cp = 0; +var pos; +var escape; +var wasescaped = false; +var wasquoted = false; +var lstitem = null; +while ((pos = input.indexOf (delimiter, cp)) >= cp) { +escape = (pos > 0 && input.charAt (pos - 1) == '\\') ? -1 : 0; +if (wasescaped || wasquoted) { +jv.set (jv.size () - 1, lstitem = lstitem + delimiter + input.substring (cp, pos + escape)); +} else { +jv.add (lstitem = input.substring (cp, pos + escape)); +}cp = pos + seplen; +wasescaped = escape == -1; +wasquoted = jalview.util.StringUtils.DELIMITERS_PATTERN.matcher (lstitem).matches (); +} +if (cp < input.length) { +var c = input.substring (cp); +if (wasescaped || wasquoted) { +jv.set (jv.size () - 1, lstitem + delimiter + c); +} else { +if (!c.equals (delimiter)) { +jv.add (c); +}}}if (jv.size () > 0) { +var v = jv.toArray ( new Array (jv.size ())); +jv.clear (); +if (false) { +System.err.println ("Array from '" + delimiter + "' separated List:\n" + v.length); +for (var i = 0; i < v.length; i++) { +System.err.println ("item " + i + " '" + v[i] + "'"); +} +}return v; +}if (false) { +System.err.println ("Empty Array from '" + delimiter + "' separated List"); +}return null; +}, "~S,~S"); +c$.arrayToSeparatorList = Clazz.defineMethod (c$, "arrayToSeparatorList", +function (list, separator) { +var v = new StringBuffer (); +if (list != null && list.length > 0) { +for (var i = 0, iSize = list.length; i < iSize; i++) { +if (list[i] != null) { +if (v.length () > 0) { +v.append (separator); +}v.append (list[i]); +}} +if (false) { +System.err.println ("Returning '" + separator + "' separated List:\n"); +System.err.println (v); +}return v.toString (); +}if (false) { +System.err.println ("Returning empty '" + separator + "' separated List\n"); +}return "" + separator; +}, "~A,~S"); +c$.DELIMITERS_PATTERN = c$.prototype.DELIMITERS_PATTERN = java.util.regex.Pattern.compile (".*='[^']*(?!')"); +Clazz.defineStatics (c$, +"DEBUG", false); +}); diff --git a/bin/jalview/util/TableSorter.js b/bin/jalview/util/TableSorter.js index 44ff978..dcc7fea 100644 --- a/bin/jalview/util/TableSorter.js +++ b/bin/jalview/util/TableSorter.js @@ -1,387 +1,387 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.load (["java.awt.event.MouseAdapter", "javax.swing.Icon", "javax.swing.event.TableModelListener", "javax.swing.table.AbstractTableModel", "$.TableCellRenderer", "java.util.ArrayList", "$.HashMap"], "jalview.util.TableSorter", ["java.awt.Color", "java.util.Arrays", "javax.swing.JLabel", "javax.swing.event.TableModelEvent"], function () { -c$ = Clazz.decorateAsClass (function () { -this.tableModel = null; -this.viewToModel = null; -this.modelToView = null; -this.tableHeader = null; -this.mouseListener = null; -this.tableModelListener = null; -this.columnComparators = null; -this.sortingColumns = null; -if (!Clazz.isClassDefined ("jalview.util.TableSorter.Row")) { -jalview.util.TableSorter.$TableSorter$Row$ (); -} -if (!Clazz.isClassDefined ("jalview.util.TableSorter.TableModelHandler")) { -jalview.util.TableSorter.$TableSorter$TableModelHandler$ (); -} -if (!Clazz.isClassDefined ("jalview.util.TableSorter.MouseHandler")) { -jalview.util.TableSorter.$TableSorter$MouseHandler$ (); -} -if (!Clazz.isClassDefined ("jalview.util.TableSorter.SortableHeaderRenderer")) { -jalview.util.TableSorter.$TableSorter$SortableHeaderRenderer$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.util, "TableSorter", javax.swing.table.AbstractTableModel); -Clazz.prepareFields (c$, function () { -this.columnComparators = new java.util.HashMap (); -this.sortingColumns = new java.util.ArrayList (); -}); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, jalview.util.TableSorter, []); -this.mouseListener = Clazz.innerTypeInstance (jalview.util.TableSorter.MouseHandler, this, null); -this.tableModelListener = Clazz.innerTypeInstance (jalview.util.TableSorter.TableModelHandler, this, null); -}); -Clazz.makeConstructor (c$, -function (tableModel) { -this.construct (); -this.setTableModel (tableModel); -}, "javax.swing.table.TableModel"); -Clazz.makeConstructor (c$, -function (tableModel, tableHeader) { -this.construct (); -this.setTableHeader (tableHeader); -this.setTableModel (tableModel); -}, "javax.swing.table.TableModel,javax.swing.table.JTableHeader"); -Clazz.defineMethod (c$, "clearSortingState", -($fz = function () { -this.viewToModel = null; -this.modelToView = null; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getTableModel", -function () { -return this.tableModel; -}); -Clazz.defineMethod (c$, "setTableModel", -function (tableModel) { -if (this.tableModel != null) { -this.tableModel.removeTableModelListener (this.tableModelListener); -}this.tableModel = tableModel; -if (this.tableModel != null) { -this.tableModel.addTableModelListener (this.tableModelListener); -}this.clearSortingState (); -this.fireTableStructureChanged (); -}, "javax.swing.table.TableModel"); -Clazz.defineMethod (c$, "getTableHeader", -function () { -return this.tableHeader; -}); -Clazz.defineMethod (c$, "setTableHeader", -function (tableHeader) { -if (this.tableHeader != null) { -this.tableHeader.removeMouseListener (this.mouseListener); -var defaultRenderer = this.tableHeader.getDefaultRenderer (); -if (Clazz.instanceOf (defaultRenderer, jalview.util.TableSorter.SortableHeaderRenderer)) { -this.tableHeader.setDefaultRenderer ((defaultRenderer).tableCellRenderer); -}}this.tableHeader = tableHeader; -if (this.tableHeader != null) { -this.tableHeader.addMouseListener (this.mouseListener); -this.tableHeader.setDefaultRenderer (Clazz.innerTypeInstance (jalview.util.TableSorter.SortableHeaderRenderer, this, null, this.tableHeader.getDefaultRenderer ())); -}}, "javax.swing.table.JTableHeader"); -Clazz.defineMethod (c$, "isSorting", -function () { -return this.sortingColumns.size () != 0; -}); -Clazz.defineMethod (c$, "getDirective", -($fz = function (column) { -for (var i = 0; i < this.sortingColumns.size (); i++) { -var directive = this.sortingColumns.get (i); -if (directive.column == column) { -return directive; -}} -return jalview.util.TableSorter.EMPTY_DIRECTIVE; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "getSortingStatus", -function (column) { -return this.getDirective (column).direction; -}, "~N"); -Clazz.defineMethod (c$, "sortingStatusChanged", -($fz = function () { -this.clearSortingState (); -this.fireTableDataChanged (); -if (this.tableHeader != null) { -this.tableHeader.repaint (); -}}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "setSortingStatus", -function (column, status) { -var directive = this.getDirective (column); -if (directive !== jalview.util.TableSorter.EMPTY_DIRECTIVE) { -this.sortingColumns.remove (directive); -}if (status != 0) { -this.sortingColumns.add ( new jalview.util.TableSorter.Directive (column, status)); -}this.sortingStatusChanged (); -}, "~N,~N"); -Clazz.defineMethod (c$, "getHeaderRendererIcon", -function (column, size) { -var directive = this.getDirective (column); -if (directive === jalview.util.TableSorter.EMPTY_DIRECTIVE) { -return null; -}return new jalview.util.TableSorter.Arrow (directive.direction == -1, size, this.sortingColumns.indexOf (directive)); -}, "~N,~N"); -Clazz.defineMethod (c$, "cancelSorting", -($fz = function () { -this.sortingColumns.clear (); -this.sortingStatusChanged (); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "setColumnComparator", -function (type, comparator) { -if (comparator == null) { -this.columnComparators.remove (type); -} else { -this.columnComparators.put (type, comparator); -}}, "Class,java.util.Comparator"); -Clazz.defineMethod (c$, "getComparator", -function (column) { -var columnType = this.tableModel.getColumnClass (column); -var comparator = this.columnComparators.get (columnType); -if (comparator != null) { -return comparator; -}if (Comparable.isAssignableFrom (columnType)) { -return jalview.util.TableSorter.COMPARABLE_COMAPRATOR; -}return jalview.util.TableSorter.LEXICAL_COMPARATOR; -}, "~N"); -Clazz.defineMethod (c$, "getViewToModel", -($fz = function () { -if (this.viewToModel == null) { -var tableModelRowCount = this.tableModel.getRowCount (); -this.viewToModel = new Array (tableModelRowCount); -for (var row = 0; row < tableModelRowCount; row++) { -this.viewToModel[row] = Clazz.innerTypeInstance (jalview.util.TableSorter.Row, this, null, row); -} -if (this.isSorting ()) { -java.util.Arrays.sort (this.viewToModel); -}}return this.viewToModel; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "modelIndex", -function (viewIndex) { -return this.getViewToModel ()[viewIndex].modelIndex; -}, "~N"); -Clazz.defineMethod (c$, "getModelToView", -($fz = function () { -if (this.modelToView == null) { -var n = this.getViewToModel ().length; -this.modelToView = Clazz.newIntArray (n, 0); -for (var i = 0; i < n; i++) { -this.modelToView[this.modelIndex (i)] = i; -} -}return this.modelToView; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getRowCount", -function () { -return (this.tableModel == null) ? 0 : this.tableModel.getRowCount (); -}); -Clazz.defineMethod (c$, "getColumnCount", -function () { -return (this.tableModel == null) ? 0 : this.tableModel.getColumnCount (); -}); -Clazz.overrideMethod (c$, "getColumnName", -function (column) { -return this.tableModel.getColumnName (column); -}, "~N"); -Clazz.overrideMethod (c$, "getColumnClass", -function (column) { -return this.tableModel.getColumnClass (column); -}, "~N"); -Clazz.overrideMethod (c$, "isCellEditable", -function (row, column) { -return this.tableModel.isCellEditable (this.modelIndex (row), column); -}, "~N,~N"); -Clazz.defineMethod (c$, "getValueAt", -function (row, column) { -return this.tableModel.getValueAt (this.modelIndex (row), column); -}, "~N,~N"); -Clazz.overrideMethod (c$, "setValueAt", -function (aValue, row, column) { -this.tableModel.setValueAt (aValue, this.modelIndex (row), column); -}, "~O,~N,~N"); -c$.$TableSorter$Row$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.modelIndex = 0; -Clazz.instantialize (this, arguments); -}, jalview.util.TableSorter, "Row", null, Comparable); -Clazz.makeConstructor (c$, -function (a) { -this.modelIndex = a; -}, "~N"); -Clazz.overrideMethod (c$, "compareTo", -function (a) { -var b = this.modelIndex; -var c = (a).modelIndex; -for (var d = this.b$["jalview.util.TableSorter"].sortingColumns.iterator (); d.hasNext (); ) { -var e = d.next (); -var f = e.column; -var g = this.b$["jalview.util.TableSorter"].tableModel.getValueAt (b, f); -var h = this.b$["jalview.util.TableSorter"].tableModel.getValueAt (c, f); -var i = 0; -if (g == null && h == null) { -i = 0; -} else if (g == null) { -i = -1; -} else if (h == null) { -i = 1; -} else { -i = this.b$["jalview.util.TableSorter"].getComparator (f).compare (g, h); -}if (i != 0) { -return e.direction == -1 ? -i : i; -}} -return 0; -}, "~O"); -c$ = Clazz.p0p (); -}; -c$.$TableSorter$TableModelHandler$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -Clazz.instantialize (this, arguments); -}, jalview.util.TableSorter, "TableModelHandler", null, javax.swing.event.TableModelListener); -Clazz.overrideMethod (c$, "tableChanged", -function (a) { -if (!this.b$["jalview.util.TableSorter"].isSorting ()) { -this.b$["jalview.util.TableSorter"].clearSortingState (); -this.b$["jalview.util.TableSorter"].fireTableChanged (a); -return; -}if (a.getFirstRow () == -1) { -this.b$["jalview.util.TableSorter"].cancelSorting (); -this.b$["jalview.util.TableSorter"].fireTableChanged (a); -return; -}var b = a.getColumn (); -if (a.getFirstRow () == a.getLastRow () && b != -1 && this.b$["jalview.util.TableSorter"].getSortingStatus (b) == 0 && this.b$["jalview.util.TableSorter"].modelToView != null) { -var c = this.b$["jalview.util.TableSorter"].getModelToView ()[a.getFirstRow ()]; -this.b$["jalview.util.TableSorter"].fireTableChanged ( new javax.swing.event.TableModelEvent (this.b$["jalview.util.TableSorter"], c, c, b, a.getType ())); -return; -}this.b$["jalview.util.TableSorter"].clearSortingState (); -this.b$["jalview.util.TableSorter"].fireTableDataChanged (); -return; -}, "javax.swing.event.TableModelEvent"); -c$ = Clazz.p0p (); -}; -c$.$TableSorter$MouseHandler$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -Clazz.instantialize (this, arguments); -}, jalview.util.TableSorter, "MouseHandler", java.awt.event.MouseAdapter); -Clazz.overrideMethod (c$, "mouseClicked", -function (a) { -var b = a.getSource (); -var c = b.getColumnModel (); -var d = c.getColumnIndexAtX (a.getX ()); -var e = c.getColumn (d).getModelIndex (); -if (e != -1) { -var f = this.b$["jalview.util.TableSorter"].getSortingStatus (e); -if (!a.isControlDown ()) { -this.b$["jalview.util.TableSorter"].cancelSorting (); -}f = f + (a.isShiftDown () ? -1 : 1); -f = (f + 4) % 3 - 1; -this.b$["jalview.util.TableSorter"].setSortingStatus (e, f); -}}, "java.awt.event.MouseEvent"); -c$ = Clazz.p0p (); -}; -c$.$TableSorter$SortableHeaderRenderer$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.tableCellRenderer = null; -Clazz.instantialize (this, arguments); -}, jalview.util.TableSorter, "SortableHeaderRenderer", null, javax.swing.table.TableCellRenderer); -Clazz.makeConstructor (c$, -function (a) { -this.tableCellRenderer = a; -}, "javax.swing.table.TableCellRenderer"); -Clazz.defineMethod (c$, "getTableCellRendererComponent", -function (a, b, c, d, e, f) { -var g = this.tableCellRenderer.getTableCellRendererComponent (a, b, c, d, e, f); -if (Clazz.instanceOf (g, javax.swing.JLabel)) { -var h = g; -h.setHorizontalTextPosition (2); -var i = a.convertColumnIndexToModel (f); -h.setIcon (this.b$["jalview.util.TableSorter"].getHeaderRendererIcon (i, h.getFont ().getSize ())); -}return g; -}, "javax.swing.JTable,~O,~B,~B,~N,~N"); -c$ = Clazz.p0p (); -}; -c$.$TableSorter$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "TableSorter$1", null, java.util.Comparator); -Clazz.defineMethod (c$, "compare", -function (o1, o2) { -return (o1).compareTo (o2); -}, "~O,~O"); -c$ = Clazz.p0p (); -}; -c$.$TableSorter$2$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (jalview.util, "TableSorter$2", null, java.util.Comparator); -Clazz.defineMethod (c$, "compare", -function (o1, o2) { -return o1.toString ().compareTo (o2.toString ()); -}, "~O,~O"); -c$ = Clazz.p0p (); -}; -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.descending = false; -this.size = 0; -this.priority = 0; -Clazz.instantialize (this, arguments); -}, jalview.util.TableSorter, "Arrow", null, javax.swing.Icon); -Clazz.makeConstructor (c$, -function (a, b, c) { -this.descending = a; -this.size = b; -this.priority = c; -}, "~B,~N,~N"); -Clazz.overrideMethod (c$, "paintIcon", -function (a, b, c, d) { -var e = a == null ? java.awt.Color.GRAY : a.getBackground (); -var f = Clazz.doubleToInt (Clazz.doubleToInt (this.size / 2) * Math.pow (0.8, this.priority)); -var g = this.descending ? f : -f; -d = d + Clazz.doubleToInt (5 * this.size / 6) + (this.descending ? -g : 0); -var h = this.descending ? 1 : -1; -b.translate (c, d); -b.setColor (e.darker ()); -b.drawLine (Clazz.doubleToInt (f / 2), g, 0, 0); -b.drawLine (Clazz.doubleToInt (f / 2), g + h, 0, h); -b.setColor (e.brighter ()); -b.drawLine (Clazz.doubleToInt (f / 2), g, f, 0); -b.drawLine (Clazz.doubleToInt (f / 2), g + h, f, h); -if (this.descending) { -b.setColor (e.darker ().darker ()); -} else { -b.setColor (e.brighter ().brighter ()); -}b.drawLine (f, 0, 0, 0); -b.setColor (e); -b.translate (-c, -d); -}, "java.awt.Component,java.awt.Graphics,~N,~N"); -Clazz.overrideMethod (c$, "getIconWidth", -function () { -return this.size; -}); -Clazz.overrideMethod (c$, "getIconHeight", -function () { -return this.size; -}); -c$ = Clazz.p0p (); -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -this.column = 0; -this.direction = 0; -Clazz.instantialize (this, arguments); -}, jalview.util.TableSorter, "Directive"); -Clazz.makeConstructor (c$, -function (a, b) { -this.column = a; -this.direction = b; -}, "~N,~N"); -c$ = Clazz.p0p (); -Clazz.defineStatics (c$, -"DESCENDING", -1, -"NOT_SORTED", 0, -"ASCENDING", 1); -c$.EMPTY_DIRECTIVE = c$.prototype.EMPTY_DIRECTIVE = new jalview.util.TableSorter.Directive (-1, 0); -c$.COMPARABLE_COMAPRATOR = c$.prototype.COMPARABLE_COMAPRATOR = ((Clazz.isClassDefined ("jalview.util.TableSorter$1") ? 0 : jalview.util.TableSorter.$TableSorter$1$ ()), Clazz.innerTypeInstance (jalview.util.TableSorter$1, this, null)); -c$.LEXICAL_COMPARATOR = c$.prototype.LEXICAL_COMPARATOR = ((Clazz.isClassDefined ("jalview.util.TableSorter$2") ? 0 : jalview.util.TableSorter.$TableSorter$2$ ()), Clazz.innerTypeInstance (jalview.util.TableSorter$2, this, null)); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (["java.awt.event.MouseAdapter", "javax.swing.Icon", "javax.swing.event.TableModelListener", "javax.swing.table.AbstractTableModel", "$.TableCellRenderer", "java.util.ArrayList", "$.HashMap"], "jalview.util.TableSorter", ["java.awt.Color", "java.util.Arrays", "javax.swing.JLabel", "javax.swing.event.TableModelEvent"], function () { +c$ = Clazz.decorateAsClass (function () { +this.tableModel = null; +this.viewToModel = null; +this.modelToView = null; +this.tableHeader = null; +this.mouseListener = null; +this.tableModelListener = null; +this.columnComparators = null; +this.sortingColumns = null; +if (!Clazz.isClassDefined ("jalview.util.TableSorter.Row")) { +jalview.util.TableSorter.$TableSorter$Row$ (); +} +if (!Clazz.isClassDefined ("jalview.util.TableSorter.TableModelHandler")) { +jalview.util.TableSorter.$TableSorter$TableModelHandler$ (); +} +if (!Clazz.isClassDefined ("jalview.util.TableSorter.MouseHandler")) { +jalview.util.TableSorter.$TableSorter$MouseHandler$ (); +} +if (!Clazz.isClassDefined ("jalview.util.TableSorter.SortableHeaderRenderer")) { +jalview.util.TableSorter.$TableSorter$SortableHeaderRenderer$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.util, "TableSorter", javax.swing.table.AbstractTableModel); +Clazz.prepareFields (c$, function () { +this.columnComparators = new java.util.HashMap (); +this.sortingColumns = new java.util.ArrayList (); +}); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, jalview.util.TableSorter, []); +this.mouseListener = Clazz.innerTypeInstance (jalview.util.TableSorter.MouseHandler, this, null); +this.tableModelListener = Clazz.innerTypeInstance (jalview.util.TableSorter.TableModelHandler, this, null); +}); +Clazz.makeConstructor (c$, +function (tableModel) { +this.construct (); +this.setTableModel (tableModel); +}, "javax.swing.table.TableModel"); +Clazz.makeConstructor (c$, +function (tableModel, tableHeader) { +this.construct (); +this.setTableHeader (tableHeader); +this.setTableModel (tableModel); +}, "javax.swing.table.TableModel,javax.swing.table.JTableHeader"); +Clazz.defineMethod (c$, "clearSortingState", +($fz = function () { +this.viewToModel = null; +this.modelToView = null; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getTableModel", +function () { +return this.tableModel; +}); +Clazz.defineMethod (c$, "setTableModel", +function (tableModel) { +if (this.tableModel != null) { +this.tableModel.removeTableModelListener (this.tableModelListener); +}this.tableModel = tableModel; +if (this.tableModel != null) { +this.tableModel.addTableModelListener (this.tableModelListener); +}this.clearSortingState (); +this.fireTableStructureChanged (); +}, "javax.swing.table.TableModel"); +Clazz.defineMethod (c$, "getTableHeader", +function () { +return this.tableHeader; +}); +Clazz.defineMethod (c$, "setTableHeader", +function (tableHeader) { +if (this.tableHeader != null) { +this.tableHeader.removeMouseListener (this.mouseListener); +var defaultRenderer = this.tableHeader.getDefaultRenderer (); +if (Clazz.instanceOf (defaultRenderer, jalview.util.TableSorter.SortableHeaderRenderer)) { +this.tableHeader.setDefaultRenderer ((defaultRenderer).tableCellRenderer); +}}this.tableHeader = tableHeader; +if (this.tableHeader != null) { +this.tableHeader.addMouseListener (this.mouseListener); +this.tableHeader.setDefaultRenderer (Clazz.innerTypeInstance (jalview.util.TableSorter.SortableHeaderRenderer, this, null, this.tableHeader.getDefaultRenderer ())); +}}, "javax.swing.table.JTableHeader"); +Clazz.defineMethod (c$, "isSorting", +function () { +return this.sortingColumns.size () != 0; +}); +Clazz.defineMethod (c$, "getDirective", +($fz = function (column) { +for (var i = 0; i < this.sortingColumns.size (); i++) { +var directive = this.sortingColumns.get (i); +if (directive.column == column) { +return directive; +}} +return jalview.util.TableSorter.EMPTY_DIRECTIVE; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "getSortingStatus", +function (column) { +return this.getDirective (column).direction; +}, "~N"); +Clazz.defineMethod (c$, "sortingStatusChanged", +($fz = function () { +this.clearSortingState (); +this.fireTableDataChanged (); +if (this.tableHeader != null) { +this.tableHeader.repaint (); +}}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "setSortingStatus", +function (column, status) { +var directive = this.getDirective (column); +if (directive !== jalview.util.TableSorter.EMPTY_DIRECTIVE) { +this.sortingColumns.remove (directive); +}if (status != 0) { +this.sortingColumns.add ( new jalview.util.TableSorter.Directive (column, status)); +}this.sortingStatusChanged (); +}, "~N,~N"); +Clazz.defineMethod (c$, "getHeaderRendererIcon", +function (column, size) { +var directive = this.getDirective (column); +if (directive === jalview.util.TableSorter.EMPTY_DIRECTIVE) { +return null; +}return new jalview.util.TableSorter.Arrow (directive.direction == -1, size, this.sortingColumns.indexOf (directive)); +}, "~N,~N"); +Clazz.defineMethod (c$, "cancelSorting", +($fz = function () { +this.sortingColumns.clear (); +this.sortingStatusChanged (); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "setColumnComparator", +function (type, comparator) { +if (comparator == null) { +this.columnComparators.remove (type); +} else { +this.columnComparators.put (type, comparator); +}}, "Class,java.util.Comparator"); +Clazz.defineMethod (c$, "getComparator", +function (column) { +var columnType = this.tableModel.getColumnClass (column); +var comparator = this.columnComparators.get (columnType); +if (comparator != null) { +return comparator; +}if (Comparable.isAssignableFrom (columnType)) { +return jalview.util.TableSorter.COMPARABLE_COMAPRATOR; +}return jalview.util.TableSorter.LEXICAL_COMPARATOR; +}, "~N"); +Clazz.defineMethod (c$, "getViewToModel", +($fz = function () { +if (this.viewToModel == null) { +var tableModelRowCount = this.tableModel.getRowCount (); +this.viewToModel = new Array (tableModelRowCount); +for (var row = 0; row < tableModelRowCount; row++) { +this.viewToModel[row] = Clazz.innerTypeInstance (jalview.util.TableSorter.Row, this, null, row); +} +if (this.isSorting ()) { +java.util.Arrays.sort (this.viewToModel); +}}return this.viewToModel; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "modelIndex", +function (viewIndex) { +return this.getViewToModel ()[viewIndex].modelIndex; +}, "~N"); +Clazz.defineMethod (c$, "getModelToView", +($fz = function () { +if (this.modelToView == null) { +var n = this.getViewToModel ().length; +this.modelToView = Clazz.newIntArray (n, 0); +for (var i = 0; i < n; i++) { +this.modelToView[this.modelIndex (i)] = i; +} +}return this.modelToView; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getRowCount", +function () { +return (this.tableModel == null) ? 0 : this.tableModel.getRowCount (); +}); +Clazz.defineMethod (c$, "getColumnCount", +function () { +return (this.tableModel == null) ? 0 : this.tableModel.getColumnCount (); +}); +Clazz.overrideMethod (c$, "getColumnName", +function (column) { +return this.tableModel.getColumnName (column); +}, "~N"); +Clazz.overrideMethod (c$, "getColumnClass", +function (column) { +return this.tableModel.getColumnClass (column); +}, "~N"); +Clazz.overrideMethod (c$, "isCellEditable", +function (row, column) { +return this.tableModel.isCellEditable (this.modelIndex (row), column); +}, "~N,~N"); +Clazz.defineMethod (c$, "getValueAt", +function (row, column) { +return this.tableModel.getValueAt (this.modelIndex (row), column); +}, "~N,~N"); +Clazz.overrideMethod (c$, "setValueAt", +function (aValue, row, column) { +this.tableModel.setValueAt (aValue, this.modelIndex (row), column); +}, "~O,~N,~N"); +c$.$TableSorter$Row$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.modelIndex = 0; +Clazz.instantialize (this, arguments); +}, jalview.util.TableSorter, "Row", null, Comparable); +Clazz.makeConstructor (c$, +function (a) { +this.modelIndex = a; +}, "~N"); +Clazz.overrideMethod (c$, "compareTo", +function (a) { +var b = this.modelIndex; +var c = (a).modelIndex; +for (var d = this.b$["jalview.util.TableSorter"].sortingColumns.iterator (); d.hasNext (); ) { +var e = d.next (); +var f = e.column; +var g = this.b$["jalview.util.TableSorter"].tableModel.getValueAt (b, f); +var h = this.b$["jalview.util.TableSorter"].tableModel.getValueAt (c, f); +var i = 0; +if (g == null && h == null) { +i = 0; +} else if (g == null) { +i = -1; +} else if (h == null) { +i = 1; +} else { +i = this.b$["jalview.util.TableSorter"].getComparator (f).compare (g, h); +}if (i != 0) { +return e.direction == -1 ? -i : i; +}} +return 0; +}, "~O"); +c$ = Clazz.p0p (); +}; +c$.$TableSorter$TableModelHandler$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +Clazz.instantialize (this, arguments); +}, jalview.util.TableSorter, "TableModelHandler", null, javax.swing.event.TableModelListener); +Clazz.overrideMethod (c$, "tableChanged", +function (a) { +if (!this.b$["jalview.util.TableSorter"].isSorting ()) { +this.b$["jalview.util.TableSorter"].clearSortingState (); +this.b$["jalview.util.TableSorter"].fireTableChanged (a); +return; +}if (a.getFirstRow () == -1) { +this.b$["jalview.util.TableSorter"].cancelSorting (); +this.b$["jalview.util.TableSorter"].fireTableChanged (a); +return; +}var b = a.getColumn (); +if (a.getFirstRow () == a.getLastRow () && b != -1 && this.b$["jalview.util.TableSorter"].getSortingStatus (b) == 0 && this.b$["jalview.util.TableSorter"].modelToView != null) { +var c = this.b$["jalview.util.TableSorter"].getModelToView ()[a.getFirstRow ()]; +this.b$["jalview.util.TableSorter"].fireTableChanged ( new javax.swing.event.TableModelEvent (this.b$["jalview.util.TableSorter"], c, c, b, a.getType ())); +return; +}this.b$["jalview.util.TableSorter"].clearSortingState (); +this.b$["jalview.util.TableSorter"].fireTableDataChanged (); +return; +}, "javax.swing.event.TableModelEvent"); +c$ = Clazz.p0p (); +}; +c$.$TableSorter$MouseHandler$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +Clazz.instantialize (this, arguments); +}, jalview.util.TableSorter, "MouseHandler", java.awt.event.MouseAdapter); +Clazz.overrideMethod (c$, "mouseClicked", +function (a) { +var b = a.getSource (); +var c = b.getColumnModel (); +var d = c.getColumnIndexAtX (a.getX ()); +var e = c.getColumn (d).getModelIndex (); +if (e != -1) { +var f = this.b$["jalview.util.TableSorter"].getSortingStatus (e); +if (!a.isControlDown ()) { +this.b$["jalview.util.TableSorter"].cancelSorting (); +}f = f + (a.isShiftDown () ? -1 : 1); +f = (f + 4) % 3 - 1; +this.b$["jalview.util.TableSorter"].setSortingStatus (e, f); +}}, "java.awt.event.MouseEvent"); +c$ = Clazz.p0p (); +}; +c$.$TableSorter$SortableHeaderRenderer$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.tableCellRenderer = null; +Clazz.instantialize (this, arguments); +}, jalview.util.TableSorter, "SortableHeaderRenderer", null, javax.swing.table.TableCellRenderer); +Clazz.makeConstructor (c$, +function (a) { +this.tableCellRenderer = a; +}, "javax.swing.table.TableCellRenderer"); +Clazz.defineMethod (c$, "getTableCellRendererComponent", +function (a, b, c, d, e, f) { +var g = this.tableCellRenderer.getTableCellRendererComponent (a, b, c, d, e, f); +if (Clazz.instanceOf (g, javax.swing.JLabel)) { +var h = g; +h.setHorizontalTextPosition (2); +var i = a.convertColumnIndexToModel (f); +h.setIcon (this.b$["jalview.util.TableSorter"].getHeaderRendererIcon (i, h.getFont ().getSize ())); +}return g; +}, "javax.swing.JTable,~O,~B,~B,~N,~N"); +c$ = Clazz.p0p (); +}; +c$.$TableSorter$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "TableSorter$1", null, java.util.Comparator); +Clazz.defineMethod (c$, "compare", +function (o1, o2) { +return (o1).compareTo (o2); +}, "~O,~O"); +c$ = Clazz.p0p (); +}; +c$.$TableSorter$2$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (jalview.util, "TableSorter$2", null, java.util.Comparator); +Clazz.defineMethod (c$, "compare", +function (o1, o2) { +return o1.toString ().compareTo (o2.toString ()); +}, "~O,~O"); +c$ = Clazz.p0p (); +}; +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.descending = false; +this.size = 0; +this.priority = 0; +Clazz.instantialize (this, arguments); +}, jalview.util.TableSorter, "Arrow", null, javax.swing.Icon); +Clazz.makeConstructor (c$, +function (a, b, c) { +this.descending = a; +this.size = b; +this.priority = c; +}, "~B,~N,~N"); +Clazz.overrideMethod (c$, "paintIcon", +function (a, b, c, d) { +var e = a == null ? java.awt.Color.GRAY : a.getBackground (); +var f = Clazz.doubleToInt (Clazz.doubleToInt (this.size / 2) * Math.pow (0.8, this.priority)); +var g = this.descending ? f : -f; +d = d + Clazz.doubleToInt (5 * this.size / 6) + (this.descending ? -g : 0); +var h = this.descending ? 1 : -1; +b.translate (c, d); +b.setColor (e.darker ()); +b.drawLine (Clazz.doubleToInt (f / 2), g, 0, 0); +b.drawLine (Clazz.doubleToInt (f / 2), g + h, 0, h); +b.setColor (e.brighter ()); +b.drawLine (Clazz.doubleToInt (f / 2), g, f, 0); +b.drawLine (Clazz.doubleToInt (f / 2), g + h, f, h); +if (this.descending) { +b.setColor (e.darker ().darker ()); +} else { +b.setColor (e.brighter ().brighter ()); +}b.drawLine (f, 0, 0, 0); +b.setColor (e); +b.translate (-c, -d); +}, "java.awt.Component,java.awt.Graphics,~N,~N"); +Clazz.overrideMethod (c$, "getIconWidth", +function () { +return this.size; +}); +Clazz.overrideMethod (c$, "getIconHeight", +function () { +return this.size; +}); +c$ = Clazz.p0p (); +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +this.column = 0; +this.direction = 0; +Clazz.instantialize (this, arguments); +}, jalview.util.TableSorter, "Directive"); +Clazz.makeConstructor (c$, +function (a, b) { +this.column = a; +this.direction = b; +}, "~N,~N"); +c$ = Clazz.p0p (); +Clazz.defineStatics (c$, +"DESCENDING", -1, +"NOT_SORTED", 0, +"ASCENDING", 1); +c$.EMPTY_DIRECTIVE = c$.prototype.EMPTY_DIRECTIVE = new jalview.util.TableSorter.Directive (-1, 0); +c$.COMPARABLE_COMAPRATOR = c$.prototype.COMPARABLE_COMAPRATOR = ((Clazz.isClassDefined ("jalview.util.TableSorter$1") ? 0 : jalview.util.TableSorter.$TableSorter$1$ ()), Clazz.innerTypeInstance (jalview.util.TableSorter$1, this, null)); +c$.LEXICAL_COMPARATOR = c$.prototype.LEXICAL_COMPARATOR = ((Clazz.isClassDefined ("jalview.util.TableSorter$2") ? 0 : jalview.util.TableSorter.$TableSorter$2$ ()), Clazz.innerTypeInstance (jalview.util.TableSorter$2, this, null)); +}); diff --git a/bin/jalview/util/UrlLink.class b/bin/jalview/util/UrlLink.class index da2ea87ff7054a087c89b63d2b95801708f6281d..0e8bcb6e877786acf75c48173e6163f0b63b5d7a 100644 GIT binary patch delta 63 zcmbPjJi~Z{IX5HUW()4uOzKJuT>lv~8CcmF7}*)585tQF7$o&n*uOKhurov}DE(p( T(`R60$e!%TFS -1) { -this.dynamic = true; -var p = sep; -do { -sep = p; -p = link.indexOf ("|", sep + 1); -} while (p > sep && p < psqid); -this.label = link.substring (0, sep); -if (this.label.indexOf ("|") > -1) { -this.target = this.label.substring (0, this.label.indexOf ("|")); -} else if (this.label.indexOf (" ") > 2) { -this.target = this.label.substring (0, this.label.indexOf (" ")); -} else { -this.target = this.label; -}this.url_prefix = link.substring (sep + 1, psqid); -if (link.indexOf ("$SEQUENCE_ID=/") == psqid && (p = link.indexOf ("/=$", psqid + 14)) > psqid + 14) { -this.url_suffix = link.substring (p + 3); -this.regexReplace = link.substring (psqid + 14, p); -try { -var rg = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace + "/"); -if (rg == null) { -this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace + "'\n"; -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace + "'\n"; -} else { -throw e; -} -} -} else { -this.regexReplace = null; -if (link.indexOf ("$SEQUENCE_ID$") == psqid) { -this.url_suffix = link.substring (psqid + 13); -this.regexReplace = null; -} else { -this.invalidMessage = "Warning: invalid regex structure for URL link : " + link; -}}} else { -this.target = link.substring (0, sep); -this.label = link.substring (0, sep = link.lastIndexOf ("|")); -this.url_prefix = link.substring (sep + 1); -this.regexReplace = null; -this.url_suffix = null; -}}, "~S"); -Clazz.defineMethod (c$, "getUrl_suffix", -function () { -return this.url_suffix; -}); -Clazz.defineMethod (c$, "getUrl_prefix", -function () { -return this.url_prefix; -}); -Clazz.defineMethod (c$, "getTarget", -function () { -return this.target; -}); -Clazz.defineMethod (c$, "getLabel", -function () { -return this.label; -}); -Clazz.defineMethod (c$, "getRegexReplace", -function () { -return this.regexReplace; -}); -Clazz.defineMethod (c$, "getInvalidMessage", -function () { -return this.invalidMessage; -}); -Clazz.defineMethod (c$, "isValid", -function () { -return this.invalidMessage == null; -}); -Clazz.defineMethod (c$, "makeUrls", -function (idstring, onlyIfMatches) { -if (this.dynamic) { -if (this.regexReplace != null) { -var rg = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace + "/"); -if (rg.search (idstring)) { -var ns = rg.numSubs (); -if (ns == 0) { -return Clazz.newArray (-1, [rg.stringMatchedI (ns), this.url_prefix + rg.stringMatched () + this.url_suffix]); -} else { -for (var s = 0; s <= rg.numSubs (); s++) { -System.err.println ("Sub " + s + " : " + rg.matchedFromI (s) + " : " + rg.matchedToI (s) + " : '" + rg.stringMatchedI (s) + "'"); -} -var subs = new java.util.Vector (); -var s = 0; -while (s <= ns) { -if (s + 1 <= ns && rg.matchedToI (s) > -1 && rg.matchedToI (s + 1) > -1 && rg.matchedToI (s + 1) < rg.matchedToI (s)) { -var r = s + 1; -var mtch = ""; -while (r <= ns && rg.matchedToI (r) <= rg.matchedToI (s)) { -if (rg.matchedFromI (r) > -1) { -mtch += rg.stringMatchedI (r); -}r++; -} -if (mtch.length > 0) { -subs.addElement (mtch); -subs.addElement (this.url_prefix + mtch + this.url_suffix); -}s = r; -} else { -if (rg.matchedFromI (s) > -1) { -subs.addElement (rg.stringMatchedI (s)); -subs.addElement (this.url_prefix + rg.stringMatchedI (s) + this.url_suffix); -}s++; -}} -var res = new Array (subs.size ()); -for (var r = 0, rs = subs.size (); r < rs; r++) { -res[r] = subs.elementAt (r); -} -subs.removeAllElements (); -return res; -}}if (onlyIfMatches) { -return null; -}}if (idstring.indexOf ("|") > -1) { -idstring = idstring.substring (idstring.lastIndexOf ("|") + 1); -}return Clazz.newArray (-1, [idstring, this.url_prefix + idstring + this.url_suffix]); -} else { -return Clazz.newArray (-1, ["", this.url_prefix]); -}}, "~S,~B"); -Clazz.overrideMethod (c$, "toString", -function () { -return this.label + "|" + this.url_prefix + (this.dynamic ? ("$SEQUENCE_ID" + ((this.regexReplace != null) ? "=" + this.regexReplace + "=$" : "$")) : "") + ((this.url_suffix == null) ? "" : this.url_suffix); -}); -Clazz.defineMethod (c$, "isDynamic", -function () { -return this.dynamic; -}); -Clazz.defineMethod (c$, "setLabel", -function (newlabel) { -this.label = newlabel; -}, "~S"); -}); +Clazz.declarePackage ("jalview.util"); +Clazz.load (null, "jalview.util.UrlLink", ["jalview.jsdev.RegExp", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.url_suffix = null; +this.url_prefix = null; +this.target = null; +this.label = null; +this.regexReplace = null; +this.dynamic = false; +this.invalidMessage = null; +Clazz.instantialize (this, arguments); +}, jalview.util, "UrlLink"); +Clazz.makeConstructor (c$, +function (link) { +var sep = link.indexOf ("|"); +var psqid = link.indexOf ("$SEQUENCE_ID"); +if (psqid > -1) { +this.dynamic = true; +var p = sep; +do { +sep = p; +p = link.indexOf ("|", sep + 1); +} while (p > sep && p < psqid); +this.label = link.substring (0, sep); +if (this.label.indexOf ("|") > -1) { +this.target = this.label.substring (0, this.label.indexOf ("|")); +} else if (this.label.indexOf (" ") > 2) { +this.target = this.label.substring (0, this.label.indexOf (" ")); +} else { +this.target = this.label; +}this.url_prefix = link.substring (sep + 1, psqid); +if (link.indexOf ("$SEQUENCE_ID=/") == psqid && (p = link.indexOf ("/=$", psqid + 14)) > psqid + 14) { +this.url_suffix = link.substring (p + 3); +this.regexReplace = link.substring (psqid + 14, p); +try { +var rg = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace + "/"); +if (rg == null) { +this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace + "'\n"; +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +this.invalidMessage = "Invalid Regular Expression : '" + this.regexReplace + "'\n"; +} else { +throw e; +} +} +} else { +this.regexReplace = null; +if (link.indexOf ("$SEQUENCE_ID$") == psqid) { +this.url_suffix = link.substring (psqid + 13); +this.regexReplace = null; +} else { +this.invalidMessage = "Warning: invalid regex structure for URL link : " + link; +}}} else { +this.target = link.substring (0, sep); +this.label = link.substring (0, sep = link.lastIndexOf ("|")); +this.url_prefix = link.substring (sep + 1); +this.regexReplace = null; +this.url_suffix = null; +}}, "~S"); +Clazz.defineMethod (c$, "getUrl_suffix", +function () { +return this.url_suffix; +}); +Clazz.defineMethod (c$, "getUrl_prefix", +function () { +return this.url_prefix; +}); +Clazz.defineMethod (c$, "getTarget", +function () { +return this.target; +}); +Clazz.defineMethod (c$, "getLabel", +function () { +return this.label; +}); +Clazz.defineMethod (c$, "getRegexReplace", +function () { +return this.regexReplace; +}); +Clazz.defineMethod (c$, "getInvalidMessage", +function () { +return this.invalidMessage; +}); +Clazz.defineMethod (c$, "isValid", +function () { +return this.invalidMessage == null; +}); +Clazz.defineMethod (c$, "makeUrls", +function (idstring, onlyIfMatches) { +if (this.dynamic) { +if (this.regexReplace != null) { +var rg = jalview.jsdev.RegExp.perlCode ("/" + this.regexReplace + "/"); +if (rg.search (idstring)) { +var ns = rg.numSubs (); +if (ns == 0) { +return Clazz.newArray (-1, [rg.stringMatchedI (ns), this.url_prefix + rg.stringMatched () + this.url_suffix]); +} else { +for (var s = 0; s <= rg.numSubs (); s++) { +System.err.println ("Sub " + s + " : " + rg.matchedFromI (s) + " : " + rg.matchedToI (s) + " : '" + rg.stringMatchedI (s) + "'"); +} +var subs = new java.util.Vector (); +var s = 0; +while (s <= ns) { +if (s + 1 <= ns && rg.matchedToI (s) > -1 && rg.matchedToI (s + 1) > -1 && rg.matchedToI (s + 1) < rg.matchedToI (s)) { +var r = s + 1; +var mtch = ""; +while (r <= ns && rg.matchedToI (r) <= rg.matchedToI (s)) { +if (rg.matchedFromI (r) > -1) { +mtch += rg.stringMatchedI (r); +}r++; +} +if (mtch.length > 0) { +subs.addElement (mtch); +subs.addElement (this.url_prefix + mtch + this.url_suffix); +}s = r; +} else { +if (rg.matchedFromI (s) > -1) { +subs.addElement (rg.stringMatchedI (s)); +subs.addElement (this.url_prefix + rg.stringMatchedI (s) + this.url_suffix); +}s++; +}} +var res = new Array (subs.size ()); +for (var r = 0, rs = subs.size (); r < rs; r++) { +res[r] = subs.elementAt (r); +} +subs.removeAllElements (); +return res; +}}if (onlyIfMatches) { +return null; +}}if (idstring.indexOf ("|") > -1) { +idstring = idstring.substring (idstring.lastIndexOf ("|") + 1); +}return Clazz.newArray (-1, [idstring, this.url_prefix + idstring + this.url_suffix]); +} else { +return Clazz.newArray (-1, ["", this.url_prefix]); +}}, "~S,~B"); +Clazz.overrideMethod (c$, "toString", +function () { +return this.label + "|" + this.url_prefix + (this.dynamic ? ("$SEQUENCE_ID" + ((this.regexReplace != null) ? "=" + this.regexReplace + "=$" : "$")) : "") + ((this.url_suffix == null) ? "" : this.url_suffix); +}); +Clazz.defineMethod (c$, "isDynamic", +function () { +return this.dynamic; +}); +Clazz.defineMethod (c$, "setLabel", +function (newlabel) { +this.label = newlabel; +}, "~S"); +}); diff --git a/bin/jalview/util/jarInputStreamProvider.js b/bin/jalview/util/jarInputStreamProvider.js deleted file mode 100644 index 536a4ea..0000000 --- a/bin/jalview/util/jarInputStreamProvider.js +++ /dev/null @@ -1,2 +0,0 @@ -Clazz.declarePackage ("jalview.util"); -Clazz.declareInterface (jalview.util, "jarInputStreamProvider"); diff --git a/bin/jalview/viewmodel/AlignmentViewport.js b/bin/jalview/viewmodel/AlignmentViewport.js index 6f07731..cdbd489 100644 --- a/bin/jalview/viewmodel/AlignmentViewport.js +++ b/bin/jalview/viewmodel/AlignmentViewport.js @@ -1,1254 +1,1254 @@ -Clazz.declarePackage ("jalview.viewmodel"); -Clazz.load (["jalview.api.AlignViewportI", "jalview.structure.CommandListener", "$.VamsasSource", "jalview.datamodel.ColumnSelection", "jalview.viewmodel.styles.ViewStyle", "jalview.workers.AlignCalcManager", "java.beans.PropertyChangeSupport", "java.util.ArrayDeque", "$.HashMap"], "jalview.viewmodel.AlignmentViewport", ["jalview.analysis.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.AlignmentView", "$.CigarArray", "$.Sequence", "$.SequenceGroup", "jalview.schemes.Blosum62ColourScheme", "$.PIDColourScheme", "$.ResidueProperties", "jalview.util.Comparison", "$.MappingUtils", "jalview.workers.ComplementConsensusThread", "$.ConsensusThread", "$.ConservationThread", "$.StrucConsensusThread", "java.awt.Color", "java.util.ArrayList", "$.BitSet", "$.Hashtable"], function () { -c$ = Clazz.decorateAsClass (function () { -this.viewStyle = null; -this.codingComplement = null; -this.featuresDisplayed = null; -this.historyList = null; -this.redoList = null; -this.alignment = null; -this.sequenceSetID = null; -this.$isDataset = false; -this.hiddenRepSequences = null; -this.colSel = null; -this.autoCalculateConsensus = true; -this.autoCalculateStrucConsensus = true; -this.ignoreGapsInConsensusCalculation = false; -this.globalColourScheme = null; -this.consensus = null; -this.complementConsensus = null; -this.strucConsensus = null; -this.conservation = null; -this.quality = null; -this.groupConsensus = null; -this.groupConservation = null; -this.hconsensus = null; -this.hcomplementConsensus = null; -this.hStrucConsensus = null; -this.hconservation = null; -this.ConsPercGaps = 25; -this.calculator = null; -this.showGroupConservation = false; -this.showGroupConsensus = false; -this.showSequenceLogo = false; -this.normaliseSequenceLogo = false; -this.showConsensusHistogram = true; -this.padGaps = false; -this.sortByTree = false; -this.selectionGroup = null; -this.viewId = null; -this.sgrouphash = -1; -this.colselhash = -1; -this.changeSupport = null; -this.showConservation = true; -this.showQuality = true; -this.showConsensus = true; -this.sequenceColours = null; -this.sortAnnotationsBy = null; -this.showAutocalculatedAbove = false; -this.followHighlight = true; -this.startRes = 0; -this.endRes = 0; -this.startSeq = 0; -this.endSeq = 0; -Clazz.instantialize (this, arguments); -}, jalview.viewmodel, "AlignmentViewport", null, [jalview.api.AlignViewportI, jalview.structure.CommandListener, jalview.structure.VamsasSource]); -Clazz.prepareFields (c$, function () { -this.viewStyle = new jalview.viewmodel.styles.ViewStyle (); -this.historyList = new java.util.ArrayDeque (); -this.redoList = new java.util.ArrayDeque (); -this.colSel = new jalview.datamodel.ColumnSelection (); -this.calculator = new jalview.workers.AlignCalcManager (); -this.changeSupport = new java.beans.PropertyChangeSupport (this); -this.sequenceColours = new java.util.HashMap (); -}); -Clazz.defineMethod (c$, "setFontName", -function (name) { -this.viewStyle.setFontName (name); -}, "~S"); -Clazz.defineMethod (c$, "setFontStyle", -function (style) { -this.viewStyle.setFontStyle (style); -}, "~N"); -Clazz.defineMethod (c$, "setFontSize", -function (size) { -this.viewStyle.setFontSize (size); -}, "~N"); -Clazz.defineMethod (c$, "getFontStyle", -function () { -return this.viewStyle.getFontStyle (); -}); -Clazz.defineMethod (c$, "getFontName", -function () { -return this.viewStyle.getFontName (); -}); -Clazz.defineMethod (c$, "getFontSize", -function () { -return this.viewStyle.getFontSize (); -}); -Clazz.defineMethod (c$, "setUpperCasebold", -function (upperCasebold) { -this.viewStyle.setUpperCasebold (upperCasebold); -}, "~B"); -Clazz.defineMethod (c$, "isUpperCasebold", -function () { -return this.viewStyle.isUpperCasebold (); -}); -Clazz.defineMethod (c$, "isSeqNameItalics", -function () { -return this.viewStyle.isSeqNameItalics (); -}); -Clazz.defineMethod (c$, "setColourByReferenceSeq", -function (colourByReferenceSeq) { -this.viewStyle.setColourByReferenceSeq (colourByReferenceSeq); -}, "~B"); -Clazz.defineMethod (c$, "setColourAppliesToAllGroups", -function (b) { -this.viewStyle.setColourAppliesToAllGroups (b); -}, "~B"); -Clazz.defineMethod (c$, "getColourAppliesToAllGroups", -function () { -return this.viewStyle.getColourAppliesToAllGroups (); -}); -Clazz.defineMethod (c$, "getAbovePIDThreshold", -function () { -return this.viewStyle.getAbovePIDThreshold (); -}); -Clazz.defineMethod (c$, "setIncrement", -function (inc) { -this.viewStyle.setIncrement (inc); -}, "~N"); -Clazz.defineMethod (c$, "getIncrement", -function () { -return this.viewStyle.getIncrement (); -}); -Clazz.defineMethod (c$, "setConservationSelected", -function (b) { -this.viewStyle.setConservationSelected (b); -}, "~B"); -Clazz.defineMethod (c$, "setShowHiddenMarkers", -function (show) { -this.viewStyle.setShowHiddenMarkers (show); -}, "~B"); -Clazz.defineMethod (c$, "getShowHiddenMarkers", -function () { -return this.viewStyle.getShowHiddenMarkers (); -}); -Clazz.defineMethod (c$, "setScaleRightWrapped", -function (b) { -this.viewStyle.setScaleRightWrapped (b); -}, "~B"); -Clazz.defineMethod (c$, "setScaleLeftWrapped", -function (b) { -this.viewStyle.setScaleLeftWrapped (b); -}, "~B"); -Clazz.defineMethod (c$, "setScaleAboveWrapped", -function (b) { -this.viewStyle.setScaleAboveWrapped (b); -}, "~B"); -Clazz.defineMethod (c$, "getScaleLeftWrapped", -function () { -return this.viewStyle.getScaleLeftWrapped (); -}); -Clazz.defineMethod (c$, "getScaleAboveWrapped", -function () { -return this.viewStyle.getScaleAboveWrapped (); -}); -Clazz.defineMethod (c$, "getScaleRightWrapped", -function () { -return this.viewStyle.getScaleRightWrapped (); -}); -Clazz.defineMethod (c$, "setAbovePIDThreshold", -function (b) { -this.viewStyle.setAbovePIDThreshold (b); -}, "~B"); -Clazz.defineMethod (c$, "setThreshold", -function (thresh) { -this.viewStyle.setThreshold (thresh); -}, "~N"); -Clazz.defineMethod (c$, "getThreshold", -function () { -return this.viewStyle.getThreshold (); -}); -Clazz.defineMethod (c$, "getShowJVSuffix", -function () { -return this.viewStyle.getShowJVSuffix (); -}); -Clazz.defineMethod (c$, "setShowJVSuffix", -function (b) { -this.viewStyle.setShowJVSuffix (b); -}, "~B"); -Clazz.defineMethod (c$, "setWrapAlignment", -function (state) { -this.viewStyle.setWrapAlignment (state); -}, "~B"); -Clazz.defineMethod (c$, "setShowText", -function (state) { -this.viewStyle.setShowText (state); -}, "~B"); -Clazz.defineMethod (c$, "setRenderGaps", -function (state) { -this.viewStyle.setRenderGaps (state); -}, "~B"); -Clazz.defineMethod (c$, "getColourText", -function () { -return this.viewStyle.getColourText (); -}); -Clazz.defineMethod (c$, "setColourText", -function (state) { -this.viewStyle.setColourText (state); -}, "~B"); -Clazz.defineMethod (c$, "getWrapAlignment", -function () { -return this.viewStyle.getWrapAlignment (); -}); -Clazz.defineMethod (c$, "getShowText", -function () { -return this.viewStyle.getShowText (); -}); -Clazz.defineMethod (c$, "getWrappedWidth", -function () { -return this.viewStyle.getWrappedWidth (); -}); -Clazz.defineMethod (c$, "setWrappedWidth", -function (w) { -this.viewStyle.setWrappedWidth (w); -}, "~N"); -Clazz.defineMethod (c$, "getCharHeight", -function () { -return this.viewStyle.getCharHeight (); -}); -Clazz.defineMethod (c$, "setCharHeight", -function (h) { -this.viewStyle.setCharHeight (h); -}, "~N"); -Clazz.defineMethod (c$, "getCharWidth", -function () { -return this.viewStyle.getCharWidth (); -}); -Clazz.defineMethod (c$, "setCharWidth", -function (w) { -this.viewStyle.setCharWidth (w); -}, "~N"); -Clazz.defineMethod (c$, "getShowBoxes", -function () { -return this.viewStyle.getShowBoxes (); -}); -Clazz.defineMethod (c$, "getShowUnconserved", -function () { -return this.viewStyle.getShowUnconserved (); -}); -Clazz.defineMethod (c$, "setShowUnconserved", -function (showunconserved) { -this.viewStyle.setShowUnconserved (showunconserved); -}, "~B"); -Clazz.defineMethod (c$, "setSeqNameItalics", -function (default1) { -this.viewStyle.setSeqNameItalics (default1); -}, "~B"); -Clazz.defineMethod (c$, "getAlignment", -function () { -return this.alignment; -}); -Clazz.overrideMethod (c$, "getGapCharacter", -function () { -return this.alignment.getGapCharacter (); -}); -Clazz.defineMethod (c$, "setDataset", -function (b) { -this.$isDataset = b; -}, "~B"); -Clazz.defineMethod (c$, "isDataset", -function () { -return this.$isDataset; -}); -Clazz.overrideMethod (c$, "setGlobalColourScheme", -function (cs) { -this.globalColourScheme = cs; -var recalc = false; -if (cs != null) { -cs.setConservationApplied (recalc = this.getConservationSelected ()); -if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) { -recalc = true; -cs.setThreshold (this.viewStyle.getThreshold (), this.ignoreGapsInConsensusCalculation); -} else { -cs.setThreshold (0, this.ignoreGapsInConsensusCalculation); -}if (recalc) { -cs.setConsensus (this.hconsensus); -cs.setConservation (this.hconservation); -}cs.alignmentChanged (this.alignment, this.hiddenRepSequences); -}if (this.getColourAppliesToAllGroups ()) { -for (var sg, $sg = this.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (cs == null) { -sg.cs = null; -continue; -}sg.cs = cs.applyTo (sg, this.getHiddenRepSequences ()); -sg.setConsPercGaps (this.ConsPercGaps); -if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) { -sg.cs.setThreshold (this.viewStyle.getThreshold (), this.isIgnoreGapsConsensus ()); -recalc = true; -} else { -sg.cs.setThreshold (0, this.isIgnoreGapsConsensus ()); -}if (this.getConservationSelected ()) { -sg.cs.setConservationApplied (true); -recalc = true; -} else { -sg.cs.setConservation (null); -}if (recalc) { -sg.recalcConservation (); -} else { -sg.cs.alignmentChanged (sg, this.hiddenRepSequences); -}} -}}, "jalview.schemes.ColourSchemeI"); -Clazz.overrideMethod (c$, "getGlobalColourScheme", -function () { -return this.globalColourScheme; -}); -Clazz.overrideMethod (c$, "setConservation", -function (cons) { -this.hconservation = cons; -}, "jalview.analysis.Conservation"); -Clazz.overrideMethod (c$, "getConsPercGaps", -function () { -return this.ConsPercGaps; -}); -Clazz.overrideMethod (c$, "setSequenceConsensusHash", -function (hconsensus) { -this.hconsensus = hconsensus; -}, "~A"); -Clazz.overrideMethod (c$, "setComplementConsensusHash", -function (hconsensus) { -this.hcomplementConsensus = hconsensus; -}, "~A"); -Clazz.overrideMethod (c$, "getSequenceConsensusHash", -function () { -return this.hconsensus; -}); -Clazz.overrideMethod (c$, "getComplementConsensusHash", -function () { -return this.hcomplementConsensus; -}); -Clazz.overrideMethod (c$, "getRnaStructureConsensusHash", -function () { -return this.hStrucConsensus; -}); -Clazz.overrideMethod (c$, "setRnaStructureConsensusHash", -function (hStrucConsensus) { -this.hStrucConsensus = hStrucConsensus; -}, "~A"); -Clazz.overrideMethod (c$, "getAlignmentQualityAnnot", -function () { -return this.quality; -}); -Clazz.overrideMethod (c$, "getAlignmentConservationAnnotation", -function () { -return this.conservation; -}); -Clazz.overrideMethod (c$, "getAlignmentConsensusAnnotation", -function () { -return this.consensus; -}); -Clazz.overrideMethod (c$, "getComplementConsensusAnnotation", -function () { -return this.complementConsensus; -}); -Clazz.overrideMethod (c$, "getAlignmentStrucConsensusAnnotation", -function () { -return this.strucConsensus; -}); -Clazz.defineMethod (c$, "updateConservation", -function (ap) { -if (this.alignment.isNucleotide () || this.conservation == null || !this.autoCalculateConsensus) { -return; -}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConservationThread) == null) { -this.calculator.registerWorker ( new jalview.workers.ConservationThread (this, ap)); -}}, "jalview.api.AlignmentViewPanel"); -Clazz.defineMethod (c$, "updateConsensus", -function (ap) { -if (this.consensus == null || !this.autoCalculateConsensus) { -return; -}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConsensusThread) == null) { -this.calculator.registerWorker ( new jalview.workers.ConsensusThread (this, ap)); -}var al = this.getAlignment (); -if (!al.isNucleotide () && al.getCodonFrames () != null && !al.getCodonFrames ().isEmpty ()) { -if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ComplementConsensusThread) == null) { -this.calculator.registerWorker ( new jalview.workers.ComplementConsensusThread (this, ap)); -}}}, "jalview.api.AlignmentViewPanel"); -Clazz.defineMethod (c$, "updateStrucConsensus", -function (ap) { -if (this.autoCalculateStrucConsensus && this.strucConsensus == null && this.alignment.isNucleotide () && this.alignment.hasRNAStructure ()) { -this.initRNAStructure (); -}if (this.strucConsensus == null || !this.autoCalculateStrucConsensus) { -return; -}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.StrucConsensusThread) == null) { -this.calculator.registerWorker ( new jalview.workers.StrucConsensusThread (this, ap)); -}}, "jalview.api.AlignmentViewPanel"); -Clazz.defineMethod (c$, "isCalcInProgress", -function () { -return this.calculator.isWorking (); -}); -Clazz.overrideMethod (c$, "isCalculationInProgress", -function (alignmentAnnotation) { -if (!alignmentAnnotation.autoCalculated) { -return false; -}if (this.calculator.workingInvolvedWith (alignmentAnnotation)) { -return true; -}return false; -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.overrideMethod (c$, "isClosed", -function () { -return this.alignment == null; -}); -Clazz.overrideMethod (c$, "getCalcManager", -function () { -return this.calculator; -}); -Clazz.overrideMethod (c$, "isShowSequenceLogo", -function () { -return this.showSequenceLogo; -}); -Clazz.defineMethod (c$, "setShowSequenceLogo", -function (showSequenceLogo) { -if (showSequenceLogo != this.showSequenceLogo) { -this.showSequenceLogo = showSequenceLogo; -this.calculator.updateAnnotationFor (jalview.workers.ConsensusThread); -this.calculator.updateAnnotationFor (jalview.workers.ComplementConsensusThread); -this.calculator.updateAnnotationFor (jalview.workers.StrucConsensusThread); -}this.showSequenceLogo = showSequenceLogo; -}, "~B"); -Clazz.defineMethod (c$, "setShowConsensusHistogram", -function (showConsensusHistogram) { -this.showConsensusHistogram = showConsensusHistogram; -}, "~B"); -Clazz.defineMethod (c$, "isShowGroupConservation", -function () { -return this.showGroupConservation; -}); -Clazz.defineMethod (c$, "setShowGroupConservation", -function (showGroupConservation) { -this.showGroupConservation = showGroupConservation; -}, "~B"); -Clazz.defineMethod (c$, "isShowGroupConsensus", -function () { -return this.showGroupConsensus; -}); -Clazz.defineMethod (c$, "setShowGroupConsensus", -function (showGroupConsensus) { -this.showGroupConsensus = showGroupConsensus; -}, "~B"); -Clazz.overrideMethod (c$, "isShowConsensusHistogram", -function () { -return this.showConsensusHistogram; -}); -Clazz.overrideMethod (c$, "getSelectionGroup", -function () { -return this.selectionGroup; -}); -Clazz.overrideMethod (c$, "setSelectionGroup", -function (sg) { -this.selectionGroup = sg; -}, "jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "setHiddenColumns", -function (colsel) { -this.colSel = colsel; -}, "jalview.datamodel.ColumnSelection"); -Clazz.overrideMethod (c$, "getColumnSelection", -function () { -return this.colSel; -}); -Clazz.overrideMethod (c$, "setColumnSelection", -function (colSel) { -this.colSel = colSel; -if (colSel != null) { -this.updateHiddenColumns (); -}}, "jalview.datamodel.ColumnSelection"); -Clazz.overrideMethod (c$, "getHiddenRepSequences", -function () { -return this.hiddenRepSequences; -}); -Clazz.overrideMethod (c$, "setHiddenRepSequences", -function (hiddenRepSequences) { -this.hiddenRepSequences = hiddenRepSequences; -}, "java.util.Map"); -Clazz.overrideMethod (c$, "hasHiddenColumns", -function () { -return this.colSel != null && this.colSel.hasHiddenColumns (); -}); -Clazz.defineMethod (c$, "updateHiddenColumns", -function () { -}); -Clazz.overrideMethod (c$, "hasHiddenRows", -function () { -return this.alignment.getHiddenSequences ().getSize () > 0; -}); -Clazz.defineMethod (c$, "setSequenceSetId", -function (newid) { -if (this.sequenceSetID != null) { -System.err.println ("Warning - overwriting a sequenceSetId for a viewport!"); -}this.sequenceSetID = String.instantialize (newid); -}, "~S"); -Clazz.overrideMethod (c$, "getSequenceSetId", -function () { -if (this.sequenceSetID == null) { -this.sequenceSetID = this.alignment.hashCode () + ""; -}return this.sequenceSetID; -}); -Clazz.overrideMethod (c$, "getViewId", -function () { -if (this.viewId == null) { -this.viewId = this.getSequenceSetId () + "." + this.hashCode () + ""; -}return this.viewId; -}); -Clazz.defineMethod (c$, "setIgnoreGapsConsensus", -function (b, ap) { -this.ignoreGapsInConsensusCalculation = b; -if (ap != null) { -this.updateConsensus (ap); -if (this.globalColourScheme != null) { -this.globalColourScheme.setThreshold (this.globalColourScheme.getThreshold (), this.ignoreGapsInConsensusCalculation); -}}}, "~B,jalview.api.AlignmentViewPanel"); -Clazz.defineMethod (c$, "isSelectionGroupChanged", -function (b) { -var hc = (this.selectionGroup == null || this.selectionGroup.getSize () == 0) ? -1 : this.selectionGroup.hashCode (); -if (hc != -1 && hc != this.sgrouphash) { -if (b) { -this.sgrouphash = hc; -}return true; -}return false; -}, "~B"); -Clazz.defineMethod (c$, "isColSelChanged", -function (b) { -var hc = (this.colSel == null || this.colSel.size () == 0) ? -1 : this.colSel.hashCode (); -if (hc != -1 && hc != this.colselhash) { -if (b) { -this.colselhash = hc; -}return true; -}return false; -}, "~B"); -Clazz.overrideMethod (c$, "isIgnoreGapsConsensus", -function () { -return this.ignoreGapsInConsensusCalculation; -}); -Clazz.defineMethod (c$, "addPropertyChangeListener", -function (listener) { -this.changeSupport.addPropertyChangeListener (listener); -}, "java.beans.PropertyChangeListener"); -Clazz.defineMethod (c$, "removePropertyChangeListener", -function (listener) { -this.changeSupport.removePropertyChangeListener (listener); -}, "java.beans.PropertyChangeListener"); -Clazz.defineMethod (c$, "firePropertyChange", -function (prop, oldvalue, newvalue) { -this.changeSupport.firePropertyChange (prop, oldvalue, newvalue); -}, "~S,~O,~O"); -Clazz.defineMethod (c$, "hideSelectedColumns", -function () { -if (this.colSel.size () < 1) { -return; -}this.colSel.hideSelectedColumns (); -this.setSelectionGroup (null); -}); -Clazz.defineMethod (c$, "hideColumns", -function (start, end) { -if (start == end) { -this.colSel.hideColumns (start); -} else { -this.colSel.hideColumns (start, end); -}}, "~N,~N"); -Clazz.defineMethod (c$, "showColumn", -function (col) { -this.colSel.revealHiddenColumns (col); -}, "~N"); -Clazz.defineMethod (c$, "showAllHiddenColumns", -function () { -this.colSel.revealAllHiddenColumns (); -}); -Clazz.defineMethod (c$, "showAllHiddenSeqs", -function () { -if (this.alignment.getHiddenSequences ().getSize () > 0) { -if (this.selectionGroup == null) { -this.selectionGroup = new jalview.datamodel.SequenceGroup (); -this.selectionGroup.setEndRes (this.alignment.getWidth () - 1); -}var tmp = this.alignment.getHiddenSequences ().showAll (this.hiddenRepSequences); -for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -this.selectionGroup.addSequence (seq, false); -this.setSequenceAnnotationsVisible (seq, true); -} -this.hiddenRepSequences = null; -this.firePropertyChange ("alignment", null, this.alignment.getSequences ()); -this.sendSelection (); -}}); -Clazz.defineMethod (c$, "showSequence", -function (index) { -var tmp = this.alignment.getHiddenSequences ().showSequence (index, this.hiddenRepSequences); -if (tmp.size () > 0) { -if (this.selectionGroup == null) { -this.selectionGroup = new jalview.datamodel.SequenceGroup (); -this.selectionGroup.setEndRes (this.alignment.getWidth () - 1); -}for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { -this.selectionGroup.addSequence (seq, false); -this.setSequenceAnnotationsVisible (seq, true); -} -this.firePropertyChange ("alignment", null, this.alignment.getSequences ()); -this.sendSelection (); -}}, "~N"); -Clazz.defineMethod (c$, "hideAllSelectedSeqs", -function () { -if (this.selectionGroup == null || this.selectionGroup.getSize () < 1) { -return; -}var seqs = this.selectionGroup.getSequencesInOrder (this.alignment); -this.hideSequence (seqs); -this.setSelectionGroup (null); -}); -Clazz.defineMethod (c$, "hideSequence", -function (seq) { -if (seq != null) { -for (var i = 0; i < seq.length; i++) { -this.alignment.getHiddenSequences ().hideSequence (seq[i]); -this.setSequenceAnnotationsVisible (seq[i], false); -} -this.firePropertyChange ("alignment", null, this.alignment.getSequences ()); -}}, "~A"); -Clazz.defineMethod (c$, "setSequenceAnnotationsVisible", -function (sequenceI, visible) { -for (var ann, $ann = 0, $$ann = this.alignment.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { -if (ann.sequenceRef === sequenceI) { -ann.visible = visible; -}} -}, "jalview.datamodel.SequenceI,~B"); -Clazz.defineMethod (c$, "hideRepSequences", -function (repSequence, sg) { -var sSize = sg.getSize (); -if (sSize < 2) { -return; -}if (this.hiddenRepSequences == null) { -this.hiddenRepSequences = new java.util.Hashtable (); -}this.hiddenRepSequences.put (repSequence, sg); -var seqs = new Array (sSize - 1); -var index = 0; -for (var i = 0; i < sSize; i++) { -if (sg.getSequenceAt (i) !== repSequence) { -if (index == sSize - 1) { -return; -}seqs[index++] = sg.getSequenceAt (i); -}} -sg.setSeqrep (repSequence); -sg.setHidereps (true); -this.hideSequence (seqs); -}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); -Clazz.defineMethod (c$, "isHiddenRepSequence", -function (seq) { -return this.alignment.getSeqrep () === seq || (this.hiddenRepSequences != null && this.hiddenRepSequences.containsKey (seq)); -}, "jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "getRepresentedSequences", -function (seq) { -return (this.hiddenRepSequences == null ? null : this.hiddenRepSequences.get (seq)); -}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "adjustForHiddenSeqs", -function (alignmentIndex) { -return this.alignment.getHiddenSequences ().adjustForHiddenSeqs (alignmentIndex); -}, "~N"); -Clazz.overrideMethod (c$, "invertColumnSelection", -function () { -this.colSel.invertColumnSelection (0, this.alignment.getWidth ()); -}); -Clazz.overrideMethod (c$, "getSelectionAsNewSequence", -function () { -var sequences; -if (this.selectionGroup == null || this.selectionGroup.getSize () == 0) { -sequences = this.alignment.getSequencesArray (); -var annots = this.alignment.getAlignmentAnnotation (); -for (var i = 0; i < sequences.length; i++) { -sequences[i] = new jalview.datamodel.Sequence (sequences[i], annots); -} -} else { -sequences = this.selectionGroup.getSelectionAsNewSequences (this.alignment); -}return sequences; -}); -Clazz.overrideMethod (c$, "getSequenceSelection", -function () { -var sequences = null; -if (this.selectionGroup != null) { -sequences = this.selectionGroup.getSequencesInOrder (this.alignment); -}if (sequences == null) { -sequences = this.alignment.getSequencesArray (); -}return sequences; -}); -Clazz.overrideMethod (c$, "getViewAsCigars", -function (selectedRegionOnly) { -return new jalview.datamodel.CigarArray (this.alignment, this.colSel, (selectedRegionOnly ? this.selectionGroup : null)); -}, "~B"); -Clazz.defineMethod (c$, "getAlignmentView", -function (selectedOnly) { -return this.getAlignmentView (selectedOnly, false); -}, "~B"); -Clazz.defineMethod (c$, "getAlignmentView", -function (selectedOnly, markGroups) { -return new jalview.datamodel.AlignmentView (this.alignment, this.colSel, this.selectionGroup, this.colSel != null && this.colSel.hasHiddenColumns (), selectedOnly, markGroups); -}, "~B,~B"); -Clazz.overrideMethod (c$, "getViewAsString", -function (selectedRegionOnly) { -var selection = null; -var seqs = null; -var i; -var iSize; -var start = 0; -var end = 0; -if (selectedRegionOnly && this.selectionGroup != null) { -iSize = this.selectionGroup.getSize (); -seqs = this.selectionGroup.getSequencesInOrder (this.alignment); -start = this.selectionGroup.getStartRes (); -end = this.selectionGroup.getEndRes () + 1; -} else { -iSize = this.alignment.getHeight (); -seqs = this.alignment.getSequencesArray (); -end = this.alignment.getWidth (); -}selection = new Array (iSize); -if (this.colSel != null && this.colSel.hasHiddenColumns ()) { -selection = this.colSel.getVisibleSequenceStrings (start, end, seqs); -} else { -for (i = 0; i < iSize; i++) { -selection[i] = seqs[i].getSequenceAsString (start, end); -} -}return selection; -}, "~B"); -Clazz.overrideMethod (c$, "getVisibleRegionBoundaries", -function (min, max) { -var regions = new java.util.ArrayList (); -var start = min; -var end = max; -do { -if (this.colSel != null && this.colSel.hasHiddenColumns ()) { -if (start == 0) { -start = this.colSel.adjustForHiddenColumns (start); -}end = this.colSel.getHiddenBoundaryRight (start); -if (start == end) { -end = max; -}if (end > max) { -end = max; -}}regions.add ( Clazz.newIntArray (-1, [start, end])); -if (this.colSel != null && this.colSel.hasHiddenColumns ()) { -start = this.colSel.adjustForHiddenColumns (end); -start = this.colSel.getHiddenBoundaryLeft (start) + 1; -}} while (end < max); -var startEnd = Clazz.newIntArray (regions.size (), 2, 0); -return regions; -}, "~N,~N"); -Clazz.overrideMethod (c$, "getVisibleAlignmentAnnotation", -function (selectedOnly) { -var ala = new java.util.ArrayList (); -var aa; -if ((aa = this.alignment.getAlignmentAnnotation ()) != null) { -for (var annot, $annot = 0, $$annot = aa; $annot < $$annot.length && ((annot = $$annot[$annot]) || true); $annot++) { -var clone = new jalview.datamodel.AlignmentAnnotation (annot); -if (selectedOnly && this.selectionGroup != null) { -this.colSel.makeVisibleAnnotation (this.selectionGroup.getStartRes (), this.selectionGroup.getEndRes (), clone); -} else { -this.colSel.makeVisibleAnnotation (clone); -}ala.add (clone); -} -}return ala; -}, "~B"); -Clazz.overrideMethod (c$, "isPadGaps", -function () { -return this.padGaps; -}); -Clazz.overrideMethod (c$, "setPadGaps", -function (padGaps) { -this.padGaps = padGaps; -}, "~B"); -Clazz.overrideMethod (c$, "alignmentChanged", -function (ap) { -if (this.isPadGaps ()) { -this.alignment.padGaps (); -}if (this.autoCalculateConsensus) { -this.updateConsensus (ap); -}if (this.hconsensus != null && this.autoCalculateConsensus) { -this.updateConservation (ap); -}if (this.autoCalculateStrucConsensus) { -this.updateStrucConsensus (ap); -}var alWidth = this.alignment.getWidth (); -var groups = this.alignment.getGroups (); -if (groups != null) { -for (var sg, $sg = groups.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (sg.getEndRes () > alWidth) { -sg.setEndRes (alWidth - 1); -}} -}if (this.selectionGroup != null && this.selectionGroup.getEndRes () > alWidth) { -this.selectionGroup.setEndRes (alWidth - 1); -}this.resetAllColourSchemes (); -this.calculator.restartWorkers (); -}, "jalview.api.AlignmentViewPanel"); -Clazz.defineMethod (c$, "resetAllColourSchemes", -function () { -var cs = this.globalColourScheme; -if (cs != null) { -cs.alignmentChanged (this.alignment, this.hiddenRepSequences); -cs.setConsensus (this.hconsensus); -if (cs.conservationApplied ()) { -cs.setConservation (jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.alignment.getWidth (), false, this.getConsPercGaps (), false)); -}}for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (sg.cs != null) { -sg.cs.alignmentChanged (sg, this.hiddenRepSequences); -}sg.recalcConservation (); -} -}); -Clazz.defineMethod (c$, "initAutoAnnotation", -function () { -if (this.hconsensus == null && !this.$isDataset) { -if (!this.alignment.isNucleotide ()) { -this.initConservation (); -this.initQuality (); -} else { -this.initRNAStructure (); -}this.consensus = new jalview.datamodel.AlignmentAnnotation ("Consensus", "PID", new Array (1), 0, 100, 1); -this.initConsensus (this.consensus); -this.initComplementConsensus (); -}}); -Clazz.defineMethod (c$, "initComplementConsensus", -function () { -if (!this.alignment.isNucleotide ()) { -var codonMappings = this.alignment.getCodonFrames (); -if (codonMappings != null && !codonMappings.isEmpty ()) { -this.complementConsensus = new jalview.datamodel.AlignmentAnnotation ("cDNA Consensus", "PID for cDNA", new Array (1), 0, 100, 1); -this.initConsensus (this.complementConsensus); -}}}); -Clazz.defineMethod (c$, "initConsensus", -($fz = function (aa) { -aa.hasText = true; -aa.autoCalculated = true; -if (this.showConsensus) { -this.alignment.addAnnotation (aa); -}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation"); -Clazz.defineMethod (c$, "initConservation", -($fz = function () { -if (this.showConservation) { -if (this.conservation == null) { -this.conservation = new jalview.datamodel.AlignmentAnnotation ("Conservation", "Conservation of total alignment less than " + this.getConsPercGaps () + "% gaps", new Array (1), 0, 11, 1); -this.conservation.hasText = true; -this.conservation.autoCalculated = true; -this.alignment.addAnnotation (this.conservation); -}}}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "initQuality", -($fz = function () { -if (this.showQuality) { -if (this.quality == null) { -this.quality = new jalview.datamodel.AlignmentAnnotation ("Quality", "Alignment Quality based on Blosum62 scores", new Array (1), 0, 11, 1); -this.quality.hasText = true; -this.quality.autoCalculated = true; -this.alignment.addAnnotation (this.quality); -}}}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "initRNAStructure", -($fz = function () { -if (this.alignment.hasRNAStructure () && this.strucConsensus == null) { -this.strucConsensus = new jalview.datamodel.AlignmentAnnotation ("StrucConsensus", "PID", new Array (1), 0, 100, 1); -this.strucConsensus.hasText = true; -this.strucConsensus.autoCalculated = true; -if (this.showConsensus) { -this.alignment.addAnnotation (this.strucConsensus); -}}}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "calcPanelHeight", -function () { -var anns = this.getAlignment ().getAlignmentAnnotation (); -var height = 0; -var charHeight = this.getCharHeight (); -if (anns != null) { -var graphgrp = new java.util.BitSet (); -for (var aa, $aa = 0, $$aa = anns; $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { -if (aa == null) { -System.err.println ("Null annotation row: ignoring."); -continue; -}if (!aa.visible) { -continue; -}if (aa.graphGroup > -1) { -if (graphgrp.get (aa.graphGroup)) { -continue; -} else { -graphgrp.set (aa.graphGroup); -}}aa.height = 0; -if (aa.hasText) { -aa.height += charHeight; -}if (aa.hasIcons) { -aa.height += 16; -}if (aa.graph > 0) { -aa.height += aa.graphHeight; -}if (aa.height == 0) { -aa.height = 20; -}height += aa.height; -} -}if (height == 0) { -height = 20; -}return height; -}); -Clazz.overrideMethod (c$, "updateGroupAnnotationSettings", -function (applyGlobalSettings, preserveNewGroupSettings) { -var updateCalcs = false; -var conv = this.isShowGroupConservation (); -var cons = this.isShowGroupConsensus (); -var showprf = this.isShowSequenceLogo (); -var showConsHist = this.isShowConsensusHistogram (); -var normLogo = this.isNormaliseSequenceLogo (); -var sortg = true; -var aan = this.alignment.getAlignmentAnnotation (); -var oldrfs = new java.util.ArrayList (); -if (aan != null) { -for (var an = 0; an < aan.length; an++) { -if (aan[an].autoCalculated && aan[an].groupRef != null) { -oldrfs.add (aan[an].groupRef); -this.alignment.deleteAnnotation (aan[an], false); -}} -}if (this.alignment.getGroups () != null) { -for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -updateCalcs = false; -if (applyGlobalSettings || (!preserveNewGroupSettings && !oldrfs.contains (sg))) { -sg.setshowSequenceLogo (showprf); -sg.setShowConsensusHistogram (showConsHist); -sg.setNormaliseSequenceLogo (normLogo); -}if (conv) { -updateCalcs = true; -this.alignment.addAnnotation (sg.getConservationRow (), 0); -}if (cons) { -updateCalcs = true; -this.alignment.addAnnotation (sg.getConsensus (), 0); -}if (updateCalcs) { -sg.recalcConservation (); -}} -}oldrfs.clear (); -}, "~B,~B"); -Clazz.defineMethod (c$, "isDisplayReferenceSeq", -function () { -return this.alignment.hasSeqrep () && this.viewStyle.isDisplayReferenceSeq (); -}); -Clazz.defineMethod (c$, "setDisplayReferenceSeq", -function (displayReferenceSeq) { -this.viewStyle.setDisplayReferenceSeq (displayReferenceSeq); -}, "~B"); -Clazz.defineMethod (c$, "isColourByReferenceSeq", -function () { -return this.alignment.hasSeqrep () && this.viewStyle.isColourByReferenceSeq (); -}); -Clazz.overrideMethod (c$, "getSequenceColour", -function (seq) { -var sqc = this.sequenceColours.get (seq); -return (sqc == null ? java.awt.Color.white : sqc); -}, "jalview.datamodel.SequenceI"); -Clazz.overrideMethod (c$, "setSequenceColour", -function (seq, col) { -if (col == null) { -this.sequenceColours.remove (seq); -} else { -this.sequenceColours.put (seq, col); -}}, "jalview.datamodel.SequenceI,java.awt.Color"); -Clazz.overrideMethod (c$, "updateSequenceIdColours", -function () { -for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { -if (sg.idColour != null) { -for (var s, $s = sg.getSequences (this.getHiddenRepSequences ()).iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { -this.sequenceColours.put (s, sg.idColour); -} -}} -}); -Clazz.overrideMethod (c$, "clearSequenceColours", -function () { -this.sequenceColours.clear (); -}); -Clazz.defineMethod (c$, "getCodingComplement", -function () { -return this.codingComplement; -}); -Clazz.defineMethod (c$, "setCodingComplement", -function (av) { -if (this === av) { -System.err.println ("Ignoring recursive setCodingComplement request"); -} else { -this.codingComplement = av; -if (av.getCodingComplement () !== this) { -av.setCodingComplement (this); -}}}, "jalview.api.AlignViewportI"); -Clazz.overrideMethod (c$, "isNucleotide", -function () { -return this.getAlignment () == null ? false : this.getAlignment ().isNucleotide (); -}); -Clazz.overrideMethod (c$, "getFeaturesDisplayed", -function () { -return this.featuresDisplayed; -}); -Clazz.overrideMethod (c$, "setFeaturesDisplayed", -function (featuresDisplayedI) { -this.featuresDisplayed = featuresDisplayedI; -}, "jalview.api.FeaturesDisplayedI"); -Clazz.overrideMethod (c$, "areFeaturesDisplayed", -function () { -return this.featuresDisplayed != null && this.featuresDisplayed.getRegisterdFeaturesCount () > 0; -}); -Clazz.defineMethod (c$, "setShowSequenceFeatures", -function (b) { -this.viewStyle.setShowSequenceFeatures (b); -}, "~B"); -Clazz.defineMethod (c$, "isShowSequenceFeatures", -function () { -return this.viewStyle.isShowSequenceFeatures (); -}); -Clazz.defineMethod (c$, "setShowSequenceFeaturesHeight", -function (selected) { -this.viewStyle.setShowSequenceFeaturesHeight (selected); -}, "~B"); -Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight", -function () { -return this.viewStyle.isShowSequenceFeaturesHeight (); -}); -Clazz.defineMethod (c$, "setShowAnnotation", -function (b) { -this.viewStyle.setShowAnnotation (b); -}, "~B"); -Clazz.defineMethod (c$, "isShowAnnotation", -function () { -return this.viewStyle.isShowAnnotation (); -}); -Clazz.defineMethod (c$, "isRightAlignIds", -function () { -return this.viewStyle.isRightAlignIds (); -}); -Clazz.defineMethod (c$, "setRightAlignIds", -function (rightAlignIds) { -this.viewStyle.setRightAlignIds (rightAlignIds); -}, "~B"); -Clazz.defineMethod (c$, "getConservationSelected", -function () { -return this.viewStyle.getConservationSelected (); -}); -Clazz.defineMethod (c$, "setShowBoxes", -function (state) { -this.viewStyle.setShowBoxes (state); -}, "~B"); -Clazz.defineMethod (c$, "getTextColour", -function () { -return this.viewStyle.getTextColour (); -}); -Clazz.defineMethod (c$, "getTextColour2", -function () { -return this.viewStyle.getTextColour2 (); -}); -Clazz.defineMethod (c$, "getThresholdTextColour", -function () { -return this.viewStyle.getThresholdTextColour (); -}); -Clazz.defineMethod (c$, "isConservationColourSelected", -function () { -return this.viewStyle.isConservationColourSelected (); -}); -Clazz.defineMethod (c$, "isRenderGaps", -function () { -return this.viewStyle.isRenderGaps (); -}); -Clazz.defineMethod (c$, "isShowColourText", -function () { -return this.viewStyle.isShowColourText (); -}); -Clazz.defineMethod (c$, "setConservationColourSelected", -function (conservationColourSelected) { -this.viewStyle.setConservationColourSelected (conservationColourSelected); -}, "~B"); -Clazz.defineMethod (c$, "setShowColourText", -function (showColourText) { -this.viewStyle.setShowColourText (showColourText); -}, "~B"); -Clazz.defineMethod (c$, "setTextColour", -function (textColour) { -this.viewStyle.setTextColour (textColour); -}, "java.awt.Color"); -Clazz.defineMethod (c$, "setThresholdTextColour", -function (thresholdTextColour) { -this.viewStyle.setThresholdTextColour (thresholdTextColour); -}, "~N"); -Clazz.defineMethod (c$, "setTextColour2", -function (textColour2) { -this.viewStyle.setTextColour2 (textColour2); -}, "java.awt.Color"); -Clazz.overrideMethod (c$, "getViewStyle", -function () { -return new jalview.viewmodel.styles.ViewStyle (this.viewStyle); -}); -Clazz.overrideMethod (c$, "setViewStyle", -function (settingsForView) { -this.viewStyle = new jalview.viewmodel.styles.ViewStyle (settingsForView); -}, "jalview.api.ViewStyleI"); -Clazz.defineMethod (c$, "sameStyle", -function (them) { -return this.viewStyle.sameStyle (them); -}, "jalview.api.ViewStyleI"); -Clazz.defineMethod (c$, "getIdWidth", -function () { -return this.viewStyle.getIdWidth (); -}); -Clazz.defineMethod (c$, "setIdWidth", -function (i) { -this.viewStyle.setIdWidth (i); -}, "~N"); -Clazz.defineMethod (c$, "isCentreColumnLabels", -function () { -return this.viewStyle.isCentreColumnLabels (); -}); -Clazz.defineMethod (c$, "setCentreColumnLabels", -function (centreColumnLabels) { -this.viewStyle.setCentreColumnLabels (centreColumnLabels); -}, "~B"); -Clazz.defineMethod (c$, "setShowDBRefs", -function (showdbrefs) { -this.viewStyle.setShowDBRefs (showdbrefs); -}, "~B"); -Clazz.defineMethod (c$, "isShowDBRefs", -function () { -return this.viewStyle.isShowDBRefs (); -}); -Clazz.defineMethod (c$, "isShowNPFeats", -function () { -return this.viewStyle.isShowNPFeats (); -}); -Clazz.defineMethod (c$, "setShowNPFeats", -function (shownpfeats) { -this.viewStyle.setShowNPFeats (shownpfeats); -}, "~B"); -Clazz.defineMethod (c$, "addToHistoryList", -function (command) { -if (this.historyList != null) { -this.historyList.push (command); -this.broadcastCommand (command, false); -}}, "jalview.commands.CommandI"); -Clazz.defineMethod (c$, "broadcastCommand", -function (command, undo) { -this.getStructureSelectionManager ().commandPerformed (command, undo, this.getVamsasSource ()); -}, "jalview.commands.CommandI,~B"); -Clazz.defineMethod (c$, "addToRedoList", -function (command) { -if (this.redoList != null) { -this.redoList.push (command); -}this.broadcastCommand (command, true); -}, "jalview.commands.CommandI"); -Clazz.defineMethod (c$, "clearRedoList", -function () { -if (this.redoList != null) { -this.redoList.clear (); -}}); -Clazz.defineMethod (c$, "setHistoryList", -function (list) { -this.historyList = list; -}, "java.util.Deque"); -Clazz.defineMethod (c$, "getHistoryList", -function () { -return this.historyList; -}); -Clazz.defineMethod (c$, "setRedoList", -function (list) { -this.redoList = list; -}, "java.util.Deque"); -Clazz.defineMethod (c$, "getRedoList", -function () { -return this.redoList; -}); -Clazz.overrideMethod (c$, "getVamsasSource", -function () { -return this; -}); -Clazz.defineMethod (c$, "getSortAnnotationsBy", -function () { -return this.sortAnnotationsBy; -}); -Clazz.defineMethod (c$, "setSortAnnotationsBy", -function (sortAnnotationsBy) { -this.sortAnnotationsBy = sortAnnotationsBy; -}, "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); -Clazz.defineMethod (c$, "isShowAutocalculatedAbove", -function () { -return this.showAutocalculatedAbove; -}); -Clazz.defineMethod (c$, "setShowAutocalculatedAbove", -function (showAutocalculatedAbove) { -this.showAutocalculatedAbove = showAutocalculatedAbove; -}, "~B"); -Clazz.defineMethod (c$, "isScaleProteinAsCdna", -function () { -return this.viewStyle.isScaleProteinAsCdna (); -}); -Clazz.defineMethod (c$, "setScaleProteinAsCdna", -function (b) { -this.viewStyle.setScaleProteinAsCdna (b); -}, "~B"); -Clazz.defineMethod (c$, "isFollowHighlight", -function () { -return this.followHighlight; -}); -Clazz.overrideMethod (c$, "setFollowHighlight", -function (b) { -this.followHighlight = b; -}, "~B"); -Clazz.defineMethod (c$, "getStartRes", -function () { -return this.startRes; -}); -Clazz.overrideMethod (c$, "getEndRes", -function () { -return this.endRes; -}); -Clazz.defineMethod (c$, "getStartSeq", -function () { -return this.startSeq; -}); -Clazz.defineMethod (c$, "setStartRes", -function (res) { -this.startRes = res; -}, "~N"); -Clazz.defineMethod (c$, "setStartSeq", -function (seq) { -this.startSeq = seq; -}, "~N"); -Clazz.defineMethod (c$, "setEndRes", -function (res) { -if (res > this.alignment.getWidth () - 1) { -res = this.alignment.getWidth () - 1; -}if (res < 0) { -res = 0; -}this.endRes = res; -}, "~N"); -Clazz.defineMethod (c$, "setEndSeq", -function (seq) { -if (seq > this.alignment.getHeight ()) { -seq = this.alignment.getHeight (); -}if (seq < 0) { -seq = 0; -}this.endSeq = seq; -}, "~N"); -Clazz.defineMethod (c$, "getEndSeq", -function () { -return this.endSeq; -}); -Clazz.defineMethod (c$, "findComplementScrollTarget", -function (sr) { -var complement = this.getCodingComplement (); -if (complement == null || !complement.isFollowHighlight ()) { -return 0; -}var iAmProtein = !this.getAlignment ().isNucleotide (); -var proteinAlignment = iAmProtein ? this.getAlignment () : complement.getAlignment (); -if (proteinAlignment == null) { -return 0; -}var mappings = proteinAlignment.getCodonFrames (); -var seqOffset = 0; -var sequence = null; -var middleColumn = this.getStartRes () + Clazz.doubleToInt ((this.getEndRes () - this.getStartRes ()) / 2); -var hiddenSequences = this.getAlignment ().getHiddenSequences (); -for (var seqNo = this.getStartSeq (); seqNo < this.getEndSeq (); seqNo++, seqOffset++) { -sequence = this.getAlignment ().getSequenceAt (seqNo); -if (hiddenSequences != null && hiddenSequences.isHidden (sequence)) { -continue; -}if (jalview.util.Comparison.isGap (sequence.getCharAt (middleColumn))) { -continue; -}var seqMappings = jalview.util.MappingUtils.findMappingsForSequence (sequence, mappings); -if (!seqMappings.isEmpty ()) { -break; -}} -if (sequence == null) { -return 0; -}jalview.util.MappingUtils.addSearchResults (sr, sequence, sequence.findPosition (middleColumn), mappings); -return seqOffset; -}, "jalview.datamodel.SearchResults"); -}); +Clazz.declarePackage ("jalview.viewmodel"); +Clazz.load (["jalview.api.AlignViewportI", "jalview.structure.CommandListener", "$.VamsasSource", "jalview.datamodel.ColumnSelection", "jalview.viewmodel.styles.ViewStyle", "jalview.workers.AlignCalcManager", "java.beans.PropertyChangeSupport", "java.util.ArrayDeque", "$.HashMap"], "jalview.viewmodel.AlignmentViewport", ["jalview.analysis.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.AlignmentView", "$.CigarArray", "$.Sequence", "$.SequenceGroup", "jalview.schemes.Blosum62ColourScheme", "$.PIDColourScheme", "$.ResidueProperties", "jalview.util.Comparison", "$.MappingUtils", "jalview.workers.ComplementConsensusThread", "$.ConsensusThread", "$.ConservationThread", "$.StrucConsensusThread", "java.awt.Color", "java.util.ArrayList", "$.BitSet", "$.Hashtable"], function () { +c$ = Clazz.decorateAsClass (function () { +this.viewStyle = null; +this.codingComplement = null; +this.featuresDisplayed = null; +this.historyList = null; +this.redoList = null; +this.alignment = null; +this.sequenceSetID = null; +this.$isDataset = false; +this.hiddenRepSequences = null; +this.colSel = null; +this.autoCalculateConsensus = true; +this.autoCalculateStrucConsensus = true; +this.ignoreGapsInConsensusCalculation = false; +this.globalColourScheme = null; +this.consensus = null; +this.complementConsensus = null; +this.strucConsensus = null; +this.conservation = null; +this.quality = null; +this.groupConsensus = null; +this.groupConservation = null; +this.hconsensus = null; +this.hcomplementConsensus = null; +this.hStrucConsensus = null; +this.hconservation = null; +this.ConsPercGaps = 25; +this.calculator = null; +this.showGroupConservation = false; +this.showGroupConsensus = false; +this.showSequenceLogo = false; +this.normaliseSequenceLogo = false; +this.showConsensusHistogram = true; +this.padGaps = false; +this.sortByTree = false; +this.selectionGroup = null; +this.viewId = null; +this.sgrouphash = -1; +this.colselhash = -1; +this.changeSupport = null; +this.showConservation = true; +this.showQuality = true; +this.showConsensus = true; +this.sequenceColours = null; +this.sortAnnotationsBy = null; +this.showAutocalculatedAbove = false; +this.followHighlight = true; +this.startRes = 0; +this.endRes = 0; +this.startSeq = 0; +this.endSeq = 0; +Clazz.instantialize (this, arguments); +}, jalview.viewmodel, "AlignmentViewport", null, [jalview.api.AlignViewportI, jalview.structure.CommandListener, jalview.structure.VamsasSource]); +Clazz.prepareFields (c$, function () { +this.viewStyle = new jalview.viewmodel.styles.ViewStyle (); +this.historyList = new java.util.ArrayDeque (); +this.redoList = new java.util.ArrayDeque (); +this.colSel = new jalview.datamodel.ColumnSelection (); +this.calculator = new jalview.workers.AlignCalcManager (); +this.changeSupport = new java.beans.PropertyChangeSupport (this); +this.sequenceColours = new java.util.HashMap (); +}); +Clazz.defineMethod (c$, "setFontName", +function (name) { +this.viewStyle.setFontName (name); +}, "~S"); +Clazz.defineMethod (c$, "setFontStyle", +function (style) { +this.viewStyle.setFontStyle (style); +}, "~N"); +Clazz.defineMethod (c$, "setFontSize", +function (size) { +this.viewStyle.setFontSize (size); +}, "~N"); +Clazz.defineMethod (c$, "getFontStyle", +function () { +return this.viewStyle.getFontStyle (); +}); +Clazz.defineMethod (c$, "getFontName", +function () { +return this.viewStyle.getFontName (); +}); +Clazz.defineMethod (c$, "getFontSize", +function () { +return this.viewStyle.getFontSize (); +}); +Clazz.defineMethod (c$, "setUpperCasebold", +function (upperCasebold) { +this.viewStyle.setUpperCasebold (upperCasebold); +}, "~B"); +Clazz.defineMethod (c$, "isUpperCasebold", +function () { +return this.viewStyle.isUpperCasebold (); +}); +Clazz.defineMethod (c$, "isSeqNameItalics", +function () { +return this.viewStyle.isSeqNameItalics (); +}); +Clazz.defineMethod (c$, "setColourByReferenceSeq", +function (colourByReferenceSeq) { +this.viewStyle.setColourByReferenceSeq (colourByReferenceSeq); +}, "~B"); +Clazz.defineMethod (c$, "setColourAppliesToAllGroups", +function (b) { +this.viewStyle.setColourAppliesToAllGroups (b); +}, "~B"); +Clazz.defineMethod (c$, "getColourAppliesToAllGroups", +function () { +return this.viewStyle.getColourAppliesToAllGroups (); +}); +Clazz.defineMethod (c$, "getAbovePIDThreshold", +function () { +return this.viewStyle.getAbovePIDThreshold (); +}); +Clazz.defineMethod (c$, "setIncrement", +function (inc) { +this.viewStyle.setIncrement (inc); +}, "~N"); +Clazz.defineMethod (c$, "getIncrement", +function () { +return this.viewStyle.getIncrement (); +}); +Clazz.defineMethod (c$, "setConservationSelected", +function (b) { +this.viewStyle.setConservationSelected (b); +}, "~B"); +Clazz.defineMethod (c$, "setShowHiddenMarkers", +function (show) { +this.viewStyle.setShowHiddenMarkers (show); +}, "~B"); +Clazz.defineMethod (c$, "getShowHiddenMarkers", +function () { +return this.viewStyle.getShowHiddenMarkers (); +}); +Clazz.defineMethod (c$, "setScaleRightWrapped", +function (b) { +this.viewStyle.setScaleRightWrapped (b); +}, "~B"); +Clazz.defineMethod (c$, "setScaleLeftWrapped", +function (b) { +this.viewStyle.setScaleLeftWrapped (b); +}, "~B"); +Clazz.defineMethod (c$, "setScaleAboveWrapped", +function (b) { +this.viewStyle.setScaleAboveWrapped (b); +}, "~B"); +Clazz.defineMethod (c$, "getScaleLeftWrapped", +function () { +return this.viewStyle.getScaleLeftWrapped (); +}); +Clazz.defineMethod (c$, "getScaleAboveWrapped", +function () { +return this.viewStyle.getScaleAboveWrapped (); +}); +Clazz.defineMethod (c$, "getScaleRightWrapped", +function () { +return this.viewStyle.getScaleRightWrapped (); +}); +Clazz.defineMethod (c$, "setAbovePIDThreshold", +function (b) { +this.viewStyle.setAbovePIDThreshold (b); +}, "~B"); +Clazz.defineMethod (c$, "setThreshold", +function (thresh) { +this.viewStyle.setThreshold (thresh); +}, "~N"); +Clazz.defineMethod (c$, "getThreshold", +function () { +return this.viewStyle.getThreshold (); +}); +Clazz.defineMethod (c$, "getShowJVSuffix", +function () { +return this.viewStyle.getShowJVSuffix (); +}); +Clazz.defineMethod (c$, "setShowJVSuffix", +function (b) { +this.viewStyle.setShowJVSuffix (b); +}, "~B"); +Clazz.defineMethod (c$, "setWrapAlignment", +function (state) { +this.viewStyle.setWrapAlignment (state); +}, "~B"); +Clazz.defineMethod (c$, "setShowText", +function (state) { +this.viewStyle.setShowText (state); +}, "~B"); +Clazz.defineMethod (c$, "setRenderGaps", +function (state) { +this.viewStyle.setRenderGaps (state); +}, "~B"); +Clazz.defineMethod (c$, "getColourText", +function () { +return this.viewStyle.getColourText (); +}); +Clazz.defineMethod (c$, "setColourText", +function (state) { +this.viewStyle.setColourText (state); +}, "~B"); +Clazz.defineMethod (c$, "getWrapAlignment", +function () { +return this.viewStyle.getWrapAlignment (); +}); +Clazz.defineMethod (c$, "getShowText", +function () { +return this.viewStyle.getShowText (); +}); +Clazz.defineMethod (c$, "getWrappedWidth", +function () { +return this.viewStyle.getWrappedWidth (); +}); +Clazz.defineMethod (c$, "setWrappedWidth", +function (w) { +this.viewStyle.setWrappedWidth (w); +}, "~N"); +Clazz.defineMethod (c$, "getCharHeight", +function () { +return this.viewStyle.getCharHeight (); +}); +Clazz.defineMethod (c$, "setCharHeight", +function (h) { +this.viewStyle.setCharHeight (h); +}, "~N"); +Clazz.defineMethod (c$, "getCharWidth", +function () { +return this.viewStyle.getCharWidth (); +}); +Clazz.defineMethod (c$, "setCharWidth", +function (w) { +this.viewStyle.setCharWidth (w); +}, "~N"); +Clazz.defineMethod (c$, "getShowBoxes", +function () { +return this.viewStyle.getShowBoxes (); +}); +Clazz.defineMethod (c$, "getShowUnconserved", +function () { +return this.viewStyle.getShowUnconserved (); +}); +Clazz.defineMethod (c$, "setShowUnconserved", +function (showunconserved) { +this.viewStyle.setShowUnconserved (showunconserved); +}, "~B"); +Clazz.defineMethod (c$, "setSeqNameItalics", +function (default1) { +this.viewStyle.setSeqNameItalics (default1); +}, "~B"); +Clazz.defineMethod (c$, "getAlignment", +function () { +return this.alignment; +}); +Clazz.overrideMethod (c$, "getGapCharacter", +function () { +return this.alignment.getGapCharacter (); +}); +Clazz.defineMethod (c$, "setDataset", +function (b) { +this.$isDataset = b; +}, "~B"); +Clazz.defineMethod (c$, "isDataset", +function () { +return this.$isDataset; +}); +Clazz.overrideMethod (c$, "setGlobalColourScheme", +function (cs) { +this.globalColourScheme = cs; +var recalc = false; +if (cs != null) { +cs.setConservationApplied (recalc = this.getConservationSelected ()); +if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) { +recalc = true; +cs.setThreshold (this.viewStyle.getThreshold (), this.ignoreGapsInConsensusCalculation); +} else { +cs.setThreshold (0, this.ignoreGapsInConsensusCalculation); +}if (recalc) { +cs.setConsensus (this.hconsensus); +cs.setConservation (this.hconservation); +}cs.alignmentChanged (this.alignment, this.hiddenRepSequences); +}if (this.getColourAppliesToAllGroups ()) { +for (var sg, $sg = this.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (cs == null) { +sg.cs = null; +continue; +}sg.cs = cs.applyTo (sg, this.getHiddenRepSequences ()); +sg.setConsPercGaps (this.ConsPercGaps); +if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) { +sg.cs.setThreshold (this.viewStyle.getThreshold (), this.isIgnoreGapsConsensus ()); +recalc = true; +} else { +sg.cs.setThreshold (0, this.isIgnoreGapsConsensus ()); +}if (this.getConservationSelected ()) { +sg.cs.setConservationApplied (true); +recalc = true; +} else { +sg.cs.setConservation (null); +}if (recalc) { +sg.recalcConservation (); +} else { +sg.cs.alignmentChanged (sg, this.hiddenRepSequences); +}} +}}, "jalview.schemes.ColourSchemeI"); +Clazz.overrideMethod (c$, "getGlobalColourScheme", +function () { +return this.globalColourScheme; +}); +Clazz.overrideMethod (c$, "setConservation", +function (cons) { +this.hconservation = cons; +}, "jalview.analysis.Conservation"); +Clazz.overrideMethod (c$, "getConsPercGaps", +function () { +return this.ConsPercGaps; +}); +Clazz.overrideMethod (c$, "setSequenceConsensusHash", +function (hconsensus) { +this.hconsensus = hconsensus; +}, "~A"); +Clazz.overrideMethod (c$, "setComplementConsensusHash", +function (hconsensus) { +this.hcomplementConsensus = hconsensus; +}, "~A"); +Clazz.overrideMethod (c$, "getSequenceConsensusHash", +function () { +return this.hconsensus; +}); +Clazz.overrideMethod (c$, "getComplementConsensusHash", +function () { +return this.hcomplementConsensus; +}); +Clazz.overrideMethod (c$, "getRnaStructureConsensusHash", +function () { +return this.hStrucConsensus; +}); +Clazz.overrideMethod (c$, "setRnaStructureConsensusHash", +function (hStrucConsensus) { +this.hStrucConsensus = hStrucConsensus; +}, "~A"); +Clazz.overrideMethod (c$, "getAlignmentQualityAnnot", +function () { +return this.quality; +}); +Clazz.overrideMethod (c$, "getAlignmentConservationAnnotation", +function () { +return this.conservation; +}); +Clazz.overrideMethod (c$, "getAlignmentConsensusAnnotation", +function () { +return this.consensus; +}); +Clazz.overrideMethod (c$, "getComplementConsensusAnnotation", +function () { +return this.complementConsensus; +}); +Clazz.overrideMethod (c$, "getAlignmentStrucConsensusAnnotation", +function () { +return this.strucConsensus; +}); +Clazz.defineMethod (c$, "updateConservation", +function (ap) { +if (this.alignment.isNucleotide () || this.conservation == null || !this.autoCalculateConsensus) { +return; +}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConservationThread) == null) { +this.calculator.registerWorker ( new jalview.workers.ConservationThread (this, ap)); +}}, "jalview.api.AlignmentViewPanel"); +Clazz.defineMethod (c$, "updateConsensus", +function (ap) { +if (this.consensus == null || !this.autoCalculateConsensus) { +return; +}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConsensusThread) == null) { +this.calculator.registerWorker ( new jalview.workers.ConsensusThread (this, ap)); +}var al = this.getAlignment (); +if (!al.isNucleotide () && al.getCodonFrames () != null && !al.getCodonFrames ().isEmpty ()) { +if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ComplementConsensusThread) == null) { +this.calculator.registerWorker ( new jalview.workers.ComplementConsensusThread (this, ap)); +}}}, "jalview.api.AlignmentViewPanel"); +Clazz.defineMethod (c$, "updateStrucConsensus", +function (ap) { +if (this.autoCalculateStrucConsensus && this.strucConsensus == null && this.alignment.isNucleotide () && this.alignment.hasRNAStructure ()) { +this.initRNAStructure (); +}if (this.strucConsensus == null || !this.autoCalculateStrucConsensus) { +return; +}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.StrucConsensusThread) == null) { +this.calculator.registerWorker ( new jalview.workers.StrucConsensusThread (this, ap)); +}}, "jalview.api.AlignmentViewPanel"); +Clazz.defineMethod (c$, "isCalcInProgress", +function () { +return this.calculator.isWorking (); +}); +Clazz.overrideMethod (c$, "isCalculationInProgress", +function (alignmentAnnotation) { +if (!alignmentAnnotation.autoCalculated) { +return false; +}if (this.calculator.workingInvolvedWith (alignmentAnnotation)) { +return true; +}return false; +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.overrideMethod (c$, "isClosed", +function () { +return this.alignment == null; +}); +Clazz.overrideMethod (c$, "getCalcManager", +function () { +return this.calculator; +}); +Clazz.overrideMethod (c$, "isShowSequenceLogo", +function () { +return this.showSequenceLogo; +}); +Clazz.defineMethod (c$, "setShowSequenceLogo", +function (showSequenceLogo) { +if (showSequenceLogo != this.showSequenceLogo) { +this.showSequenceLogo = showSequenceLogo; +this.calculator.updateAnnotationFor (jalview.workers.ConsensusThread); +this.calculator.updateAnnotationFor (jalview.workers.ComplementConsensusThread); +this.calculator.updateAnnotationFor (jalview.workers.StrucConsensusThread); +}this.showSequenceLogo = showSequenceLogo; +}, "~B"); +Clazz.defineMethod (c$, "setShowConsensusHistogram", +function (showConsensusHistogram) { +this.showConsensusHistogram = showConsensusHistogram; +}, "~B"); +Clazz.defineMethod (c$, "isShowGroupConservation", +function () { +return this.showGroupConservation; +}); +Clazz.defineMethod (c$, "setShowGroupConservation", +function (showGroupConservation) { +this.showGroupConservation = showGroupConservation; +}, "~B"); +Clazz.defineMethod (c$, "isShowGroupConsensus", +function () { +return this.showGroupConsensus; +}); +Clazz.defineMethod (c$, "setShowGroupConsensus", +function (showGroupConsensus) { +this.showGroupConsensus = showGroupConsensus; +}, "~B"); +Clazz.overrideMethod (c$, "isShowConsensusHistogram", +function () { +return this.showConsensusHistogram; +}); +Clazz.overrideMethod (c$, "getSelectionGroup", +function () { +return this.selectionGroup; +}); +Clazz.overrideMethod (c$, "setSelectionGroup", +function (sg) { +this.selectionGroup = sg; +}, "jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "setHiddenColumns", +function (colsel) { +this.colSel = colsel; +}, "jalview.datamodel.ColumnSelection"); +Clazz.overrideMethod (c$, "getColumnSelection", +function () { +return this.colSel; +}); +Clazz.overrideMethod (c$, "setColumnSelection", +function (colSel) { +this.colSel = colSel; +if (colSel != null) { +this.updateHiddenColumns (); +}}, "jalview.datamodel.ColumnSelection"); +Clazz.overrideMethod (c$, "getHiddenRepSequences", +function () { +return this.hiddenRepSequences; +}); +Clazz.overrideMethod (c$, "setHiddenRepSequences", +function (hiddenRepSequences) { +this.hiddenRepSequences = hiddenRepSequences; +}, "java.util.Map"); +Clazz.overrideMethod (c$, "hasHiddenColumns", +function () { +return this.colSel != null && this.colSel.hasHiddenColumns (); +}); +Clazz.defineMethod (c$, "updateHiddenColumns", +function () { +}); +Clazz.overrideMethod (c$, "hasHiddenRows", +function () { +return this.alignment.getHiddenSequences ().getSize () > 0; +}); +Clazz.defineMethod (c$, "setSequenceSetId", +function (newid) { +if (this.sequenceSetID != null) { +System.err.println ("Warning - overwriting a sequenceSetId for a viewport!"); +}this.sequenceSetID = String.instantialize (newid); +}, "~S"); +Clazz.overrideMethod (c$, "getSequenceSetId", +function () { +if (this.sequenceSetID == null) { +this.sequenceSetID = this.alignment.hashCode () + ""; +}return this.sequenceSetID; +}); +Clazz.overrideMethod (c$, "getViewId", +function () { +if (this.viewId == null) { +this.viewId = this.getSequenceSetId () + "." + this.hashCode () + ""; +}return this.viewId; +}); +Clazz.defineMethod (c$, "setIgnoreGapsConsensus", +function (b, ap) { +this.ignoreGapsInConsensusCalculation = b; +if (ap != null) { +this.updateConsensus (ap); +if (this.globalColourScheme != null) { +this.globalColourScheme.setThreshold (this.globalColourScheme.getThreshold (), this.ignoreGapsInConsensusCalculation); +}}}, "~B,jalview.api.AlignmentViewPanel"); +Clazz.defineMethod (c$, "isSelectionGroupChanged", +function (b) { +var hc = (this.selectionGroup == null || this.selectionGroup.getSize () == 0) ? -1 : this.selectionGroup.hashCode (); +if (hc != -1 && hc != this.sgrouphash) { +if (b) { +this.sgrouphash = hc; +}return true; +}return false; +}, "~B"); +Clazz.defineMethod (c$, "isColSelChanged", +function (b) { +var hc = (this.colSel == null || this.colSel.size () == 0) ? -1 : this.colSel.hashCode (); +if (hc != -1 && hc != this.colselhash) { +if (b) { +this.colselhash = hc; +}return true; +}return false; +}, "~B"); +Clazz.overrideMethod (c$, "isIgnoreGapsConsensus", +function () { +return this.ignoreGapsInConsensusCalculation; +}); +Clazz.defineMethod (c$, "addPropertyChangeListener", +function (listener) { +this.changeSupport.addPropertyChangeListener (listener); +}, "java.beans.PropertyChangeListener"); +Clazz.defineMethod (c$, "removePropertyChangeListener", +function (listener) { +this.changeSupport.removePropertyChangeListener (listener); +}, "java.beans.PropertyChangeListener"); +Clazz.defineMethod (c$, "firePropertyChange", +function (prop, oldvalue, newvalue) { +this.changeSupport.firePropertyChange (prop, oldvalue, newvalue); +}, "~S,~O,~O"); +Clazz.defineMethod (c$, "hideSelectedColumns", +function () { +if (this.colSel.size () < 1) { +return; +}this.colSel.hideSelectedColumns (); +this.setSelectionGroup (null); +}); +Clazz.defineMethod (c$, "hideColumns", +function (start, end) { +if (start == end) { +this.colSel.hideColumns (start); +} else { +this.colSel.hideColumns (start, end); +}}, "~N,~N"); +Clazz.defineMethod (c$, "showColumn", +function (col) { +this.colSel.revealHiddenColumns (col); +}, "~N"); +Clazz.defineMethod (c$, "showAllHiddenColumns", +function () { +this.colSel.revealAllHiddenColumns (); +}); +Clazz.defineMethod (c$, "showAllHiddenSeqs", +function () { +if (this.alignment.getHiddenSequences ().getSize () > 0) { +if (this.selectionGroup == null) { +this.selectionGroup = new jalview.datamodel.SequenceGroup (); +this.selectionGroup.setEndRes (this.alignment.getWidth () - 1); +}var tmp = this.alignment.getHiddenSequences ().showAll (this.hiddenRepSequences); +for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +this.selectionGroup.addSequence (seq, false); +this.setSequenceAnnotationsVisible (seq, true); +} +this.hiddenRepSequences = null; +this.firePropertyChange ("alignment", null, this.alignment.getSequences ()); +this.sendSelection (); +}}); +Clazz.defineMethod (c$, "showSequence", +function (index) { +var tmp = this.alignment.getHiddenSequences ().showSequence (index, this.hiddenRepSequences); +if (tmp.size () > 0) { +if (this.selectionGroup == null) { +this.selectionGroup = new jalview.datamodel.SequenceGroup (); +this.selectionGroup.setEndRes (this.alignment.getWidth () - 1); +}for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) { +this.selectionGroup.addSequence (seq, false); +this.setSequenceAnnotationsVisible (seq, true); +} +this.firePropertyChange ("alignment", null, this.alignment.getSequences ()); +this.sendSelection (); +}}, "~N"); +Clazz.defineMethod (c$, "hideAllSelectedSeqs", +function () { +if (this.selectionGroup == null || this.selectionGroup.getSize () < 1) { +return; +}var seqs = this.selectionGroup.getSequencesInOrder (this.alignment); +this.hideSequence (seqs); +this.setSelectionGroup (null); +}); +Clazz.defineMethod (c$, "hideSequence", +function (seq) { +if (seq != null) { +for (var i = 0; i < seq.length; i++) { +this.alignment.getHiddenSequences ().hideSequence (seq[i]); +this.setSequenceAnnotationsVisible (seq[i], false); +} +this.firePropertyChange ("alignment", null, this.alignment.getSequences ()); +}}, "~A"); +Clazz.defineMethod (c$, "setSequenceAnnotationsVisible", +function (sequenceI, visible) { +for (var ann, $ann = 0, $$ann = this.alignment.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) { +if (ann.sequenceRef === sequenceI) { +ann.visible = visible; +}} +}, "jalview.datamodel.SequenceI,~B"); +Clazz.defineMethod (c$, "hideRepSequences", +function (repSequence, sg) { +var sSize = sg.getSize (); +if (sSize < 2) { +return; +}if (this.hiddenRepSequences == null) { +this.hiddenRepSequences = new java.util.Hashtable (); +}this.hiddenRepSequences.put (repSequence, sg); +var seqs = new Array (sSize - 1); +var index = 0; +for (var i = 0; i < sSize; i++) { +if (sg.getSequenceAt (i) !== repSequence) { +if (index == sSize - 1) { +return; +}seqs[index++] = sg.getSequenceAt (i); +}} +sg.setSeqrep (repSequence); +sg.setHidereps (true); +this.hideSequence (seqs); +}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup"); +Clazz.defineMethod (c$, "isHiddenRepSequence", +function (seq) { +return this.alignment.getSeqrep () === seq || (this.hiddenRepSequences != null && this.hiddenRepSequences.containsKey (seq)); +}, "jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "getRepresentedSequences", +function (seq) { +return (this.hiddenRepSequences == null ? null : this.hiddenRepSequences.get (seq)); +}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "adjustForHiddenSeqs", +function (alignmentIndex) { +return this.alignment.getHiddenSequences ().adjustForHiddenSeqs (alignmentIndex); +}, "~N"); +Clazz.overrideMethod (c$, "invertColumnSelection", +function () { +this.colSel.invertColumnSelection (0, this.alignment.getWidth ()); +}); +Clazz.overrideMethod (c$, "getSelectionAsNewSequence", +function () { +var sequences; +if (this.selectionGroup == null || this.selectionGroup.getSize () == 0) { +sequences = this.alignment.getSequencesArray (); +var annots = this.alignment.getAlignmentAnnotation (); +for (var i = 0; i < sequences.length; i++) { +sequences[i] = new jalview.datamodel.Sequence (sequences[i], annots); +} +} else { +sequences = this.selectionGroup.getSelectionAsNewSequences (this.alignment); +}return sequences; +}); +Clazz.overrideMethod (c$, "getSequenceSelection", +function () { +var sequences = null; +if (this.selectionGroup != null) { +sequences = this.selectionGroup.getSequencesInOrder (this.alignment); +}if (sequences == null) { +sequences = this.alignment.getSequencesArray (); +}return sequences; +}); +Clazz.overrideMethod (c$, "getViewAsCigars", +function (selectedRegionOnly) { +return new jalview.datamodel.CigarArray (this.alignment, this.colSel, (selectedRegionOnly ? this.selectionGroup : null)); +}, "~B"); +Clazz.defineMethod (c$, "getAlignmentView", +function (selectedOnly) { +return this.getAlignmentView (selectedOnly, false); +}, "~B"); +Clazz.defineMethod (c$, "getAlignmentView", +function (selectedOnly, markGroups) { +return new jalview.datamodel.AlignmentView (this.alignment, this.colSel, this.selectionGroup, this.colSel != null && this.colSel.hasHiddenColumns (), selectedOnly, markGroups); +}, "~B,~B"); +Clazz.overrideMethod (c$, "getViewAsString", +function (selectedRegionOnly) { +var selection = null; +var seqs = null; +var i; +var iSize; +var start = 0; +var end = 0; +if (selectedRegionOnly && this.selectionGroup != null) { +iSize = this.selectionGroup.getSize (); +seqs = this.selectionGroup.getSequencesInOrder (this.alignment); +start = this.selectionGroup.getStartRes (); +end = this.selectionGroup.getEndRes () + 1; +} else { +iSize = this.alignment.getHeight (); +seqs = this.alignment.getSequencesArray (); +end = this.alignment.getWidth (); +}selection = new Array (iSize); +if (this.colSel != null && this.colSel.hasHiddenColumns ()) { +selection = this.colSel.getVisibleSequenceStrings (start, end, seqs); +} else { +for (i = 0; i < iSize; i++) { +selection[i] = seqs[i].getSequenceAsString (start, end); +} +}return selection; +}, "~B"); +Clazz.overrideMethod (c$, "getVisibleRegionBoundaries", +function (min, max) { +var regions = new java.util.ArrayList (); +var start = min; +var end = max; +do { +if (this.colSel != null && this.colSel.hasHiddenColumns ()) { +if (start == 0) { +start = this.colSel.adjustForHiddenColumns (start); +}end = this.colSel.getHiddenBoundaryRight (start); +if (start == end) { +end = max; +}if (end > max) { +end = max; +}}regions.add ( Clazz.newIntArray (-1, [start, end])); +if (this.colSel != null && this.colSel.hasHiddenColumns ()) { +start = this.colSel.adjustForHiddenColumns (end); +start = this.colSel.getHiddenBoundaryLeft (start) + 1; +}} while (end < max); +var startEnd = Clazz.newIntArray (regions.size (), 2, 0); +return regions; +}, "~N,~N"); +Clazz.overrideMethod (c$, "getVisibleAlignmentAnnotation", +function (selectedOnly) { +var ala = new java.util.ArrayList (); +var aa; +if ((aa = this.alignment.getAlignmentAnnotation ()) != null) { +for (var annot, $annot = 0, $$annot = aa; $annot < $$annot.length && ((annot = $$annot[$annot]) || true); $annot++) { +var clone = new jalview.datamodel.AlignmentAnnotation (annot); +if (selectedOnly && this.selectionGroup != null) { +this.colSel.makeVisibleAnnotation (this.selectionGroup.getStartRes (), this.selectionGroup.getEndRes (), clone); +} else { +this.colSel.makeVisibleAnnotation (clone); +}ala.add (clone); +} +}return ala; +}, "~B"); +Clazz.overrideMethod (c$, "isPadGaps", +function () { +return this.padGaps; +}); +Clazz.overrideMethod (c$, "setPadGaps", +function (padGaps) { +this.padGaps = padGaps; +}, "~B"); +Clazz.overrideMethod (c$, "alignmentChanged", +function (ap) { +if (this.isPadGaps ()) { +this.alignment.padGaps (); +}if (this.autoCalculateConsensus) { +this.updateConsensus (ap); +}if (this.hconsensus != null && this.autoCalculateConsensus) { +this.updateConservation (ap); +}if (this.autoCalculateStrucConsensus) { +this.updateStrucConsensus (ap); +}var alWidth = this.alignment.getWidth (); +var groups = this.alignment.getGroups (); +if (groups != null) { +for (var sg, $sg = groups.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (sg.getEndRes () > alWidth) { +sg.setEndRes (alWidth - 1); +}} +}if (this.selectionGroup != null && this.selectionGroup.getEndRes () > alWidth) { +this.selectionGroup.setEndRes (alWidth - 1); +}this.resetAllColourSchemes (); +this.calculator.restartWorkers (); +}, "jalview.api.AlignmentViewPanel"); +Clazz.defineMethod (c$, "resetAllColourSchemes", +function () { +var cs = this.globalColourScheme; +if (cs != null) { +cs.alignmentChanged (this.alignment, this.hiddenRepSequences); +cs.setConsensus (this.hconsensus); +if (cs.conservationApplied ()) { +cs.setConservation (jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.alignment.getWidth (), false, this.getConsPercGaps (), false)); +}}for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (sg.cs != null) { +sg.cs.alignmentChanged (sg, this.hiddenRepSequences); +}sg.recalcConservation (); +} +}); +Clazz.defineMethod (c$, "initAutoAnnotation", +function () { +if (this.hconsensus == null && !this.$isDataset) { +if (!this.alignment.isNucleotide ()) { +this.initConservation (); +this.initQuality (); +} else { +this.initRNAStructure (); +}this.consensus = new jalview.datamodel.AlignmentAnnotation ("Consensus", "PID", new Array (1), 0, 100, 1); +this.initConsensus (this.consensus); +this.initComplementConsensus (); +}}); +Clazz.defineMethod (c$, "initComplementConsensus", +function () { +if (!this.alignment.isNucleotide ()) { +var codonMappings = this.alignment.getCodonFrames (); +if (codonMappings != null && !codonMappings.isEmpty ()) { +this.complementConsensus = new jalview.datamodel.AlignmentAnnotation ("cDNA Consensus", "PID for cDNA", new Array (1), 0, 100, 1); +this.initConsensus (this.complementConsensus); +}}}); +Clazz.defineMethod (c$, "initConsensus", +($fz = function (aa) { +aa.hasText = true; +aa.autoCalculated = true; +if (this.showConsensus) { +this.alignment.addAnnotation (aa); +}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation"); +Clazz.defineMethod (c$, "initConservation", +($fz = function () { +if (this.showConservation) { +if (this.conservation == null) { +this.conservation = new jalview.datamodel.AlignmentAnnotation ("Conservation", "Conservation of total alignment less than " + this.getConsPercGaps () + "% gaps", new Array (1), 0, 11, 1); +this.conservation.hasText = true; +this.conservation.autoCalculated = true; +this.alignment.addAnnotation (this.conservation); +}}}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "initQuality", +($fz = function () { +if (this.showQuality) { +if (this.quality == null) { +this.quality = new jalview.datamodel.AlignmentAnnotation ("Quality", "Alignment Quality based on Blosum62 scores", new Array (1), 0, 11, 1); +this.quality.hasText = true; +this.quality.autoCalculated = true; +this.alignment.addAnnotation (this.quality); +}}}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "initRNAStructure", +($fz = function () { +if (this.alignment.hasRNAStructure () && this.strucConsensus == null) { +this.strucConsensus = new jalview.datamodel.AlignmentAnnotation ("StrucConsensus", "PID", new Array (1), 0, 100, 1); +this.strucConsensus.hasText = true; +this.strucConsensus.autoCalculated = true; +if (this.showConsensus) { +this.alignment.addAnnotation (this.strucConsensus); +}}}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "calcPanelHeight", +function () { +var anns = this.getAlignment ().getAlignmentAnnotation (); +var height = 0; +var charHeight = this.getCharHeight (); +if (anns != null) { +var graphgrp = new java.util.BitSet (); +for (var aa, $aa = 0, $$aa = anns; $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) { +if (aa == null) { +System.err.println ("Null annotation row: ignoring."); +continue; +}if (!aa.visible) { +continue; +}if (aa.graphGroup > -1) { +if (graphgrp.get (aa.graphGroup)) { +continue; +} else { +graphgrp.set (aa.graphGroup); +}}aa.height = 0; +if (aa.hasText) { +aa.height += charHeight; +}if (aa.hasIcons) { +aa.height += 16; +}if (aa.graph > 0) { +aa.height += aa.graphHeight; +}if (aa.height == 0) { +aa.height = 20; +}height += aa.height; +} +}if (height == 0) { +height = 20; +}return height; +}); +Clazz.overrideMethod (c$, "updateGroupAnnotationSettings", +function (applyGlobalSettings, preserveNewGroupSettings) { +var updateCalcs = false; +var conv = this.isShowGroupConservation (); +var cons = this.isShowGroupConsensus (); +var showprf = this.isShowSequenceLogo (); +var showConsHist = this.isShowConsensusHistogram (); +var normLogo = this.isNormaliseSequenceLogo (); +var sortg = true; +var aan = this.alignment.getAlignmentAnnotation (); +var oldrfs = new java.util.ArrayList (); +if (aan != null) { +for (var an = 0; an < aan.length; an++) { +if (aan[an].autoCalculated && aan[an].groupRef != null) { +oldrfs.add (aan[an].groupRef); +this.alignment.deleteAnnotation (aan[an], false); +}} +}if (this.alignment.getGroups () != null) { +for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +updateCalcs = false; +if (applyGlobalSettings || (!preserveNewGroupSettings && !oldrfs.contains (sg))) { +sg.setshowSequenceLogo (showprf); +sg.setShowConsensusHistogram (showConsHist); +sg.setNormaliseSequenceLogo (normLogo); +}if (conv) { +updateCalcs = true; +this.alignment.addAnnotation (sg.getConservationRow (), 0); +}if (cons) { +updateCalcs = true; +this.alignment.addAnnotation (sg.getConsensus (), 0); +}if (updateCalcs) { +sg.recalcConservation (); +}} +}oldrfs.clear (); +}, "~B,~B"); +Clazz.defineMethod (c$, "isDisplayReferenceSeq", +function () { +return this.alignment.hasSeqrep () && this.viewStyle.isDisplayReferenceSeq (); +}); +Clazz.defineMethod (c$, "setDisplayReferenceSeq", +function (displayReferenceSeq) { +this.viewStyle.setDisplayReferenceSeq (displayReferenceSeq); +}, "~B"); +Clazz.defineMethod (c$, "isColourByReferenceSeq", +function () { +return this.alignment.hasSeqrep () && this.viewStyle.isColourByReferenceSeq (); +}); +Clazz.overrideMethod (c$, "getSequenceColour", +function (seq) { +var sqc = this.sequenceColours.get (seq); +return (sqc == null ? java.awt.Color.white : sqc); +}, "jalview.datamodel.SequenceI"); +Clazz.overrideMethod (c$, "setSequenceColour", +function (seq, col) { +if (col == null) { +this.sequenceColours.remove (seq); +} else { +this.sequenceColours.put (seq, col); +}}, "jalview.datamodel.SequenceI,java.awt.Color"); +Clazz.overrideMethod (c$, "updateSequenceIdColours", +function () { +for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) { +if (sg.idColour != null) { +for (var s, $s = sg.getSequences (this.getHiddenRepSequences ()).iterator (); $s.hasNext () && ((s = $s.next ()) || true);) { +this.sequenceColours.put (s, sg.idColour); +} +}} +}); +Clazz.overrideMethod (c$, "clearSequenceColours", +function () { +this.sequenceColours.clear (); +}); +Clazz.defineMethod (c$, "getCodingComplement", +function () { +return this.codingComplement; +}); +Clazz.defineMethod (c$, "setCodingComplement", +function (av) { +if (this === av) { +System.err.println ("Ignoring recursive setCodingComplement request"); +} else { +this.codingComplement = av; +if (av.getCodingComplement () !== this) { +av.setCodingComplement (this); +}}}, "jalview.api.AlignViewportI"); +Clazz.overrideMethod (c$, "isNucleotide", +function () { +return this.getAlignment () == null ? false : this.getAlignment ().isNucleotide (); +}); +Clazz.overrideMethod (c$, "getFeaturesDisplayed", +function () { +return this.featuresDisplayed; +}); +Clazz.overrideMethod (c$, "setFeaturesDisplayed", +function (featuresDisplayedI) { +this.featuresDisplayed = featuresDisplayedI; +}, "jalview.api.FeaturesDisplayedI"); +Clazz.overrideMethod (c$, "areFeaturesDisplayed", +function () { +return this.featuresDisplayed != null && this.featuresDisplayed.getRegisterdFeaturesCount () > 0; +}); +Clazz.defineMethod (c$, "setShowSequenceFeatures", +function (b) { +this.viewStyle.setShowSequenceFeatures (b); +}, "~B"); +Clazz.defineMethod (c$, "isShowSequenceFeatures", +function () { +return this.viewStyle.isShowSequenceFeatures (); +}); +Clazz.defineMethod (c$, "setShowSequenceFeaturesHeight", +function (selected) { +this.viewStyle.setShowSequenceFeaturesHeight (selected); +}, "~B"); +Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight", +function () { +return this.viewStyle.isShowSequenceFeaturesHeight (); +}); +Clazz.defineMethod (c$, "setShowAnnotation", +function (b) { +this.viewStyle.setShowAnnotation (b); +}, "~B"); +Clazz.defineMethod (c$, "isShowAnnotation", +function () { +return this.viewStyle.isShowAnnotation (); +}); +Clazz.defineMethod (c$, "isRightAlignIds", +function () { +return this.viewStyle.isRightAlignIds (); +}); +Clazz.defineMethod (c$, "setRightAlignIds", +function (rightAlignIds) { +this.viewStyle.setRightAlignIds (rightAlignIds); +}, "~B"); +Clazz.defineMethod (c$, "getConservationSelected", +function () { +return this.viewStyle.getConservationSelected (); +}); +Clazz.defineMethod (c$, "setShowBoxes", +function (state) { +this.viewStyle.setShowBoxes (state); +}, "~B"); +Clazz.defineMethod (c$, "getTextColour", +function () { +return this.viewStyle.getTextColour (); +}); +Clazz.defineMethod (c$, "getTextColour2", +function () { +return this.viewStyle.getTextColour2 (); +}); +Clazz.defineMethod (c$, "getThresholdTextColour", +function () { +return this.viewStyle.getThresholdTextColour (); +}); +Clazz.defineMethod (c$, "isConservationColourSelected", +function () { +return this.viewStyle.isConservationColourSelected (); +}); +Clazz.defineMethod (c$, "isRenderGaps", +function () { +return this.viewStyle.isRenderGaps (); +}); +Clazz.defineMethod (c$, "isShowColourText", +function () { +return this.viewStyle.isShowColourText (); +}); +Clazz.defineMethod (c$, "setConservationColourSelected", +function (conservationColourSelected) { +this.viewStyle.setConservationColourSelected (conservationColourSelected); +}, "~B"); +Clazz.defineMethod (c$, "setShowColourText", +function (showColourText) { +this.viewStyle.setShowColourText (showColourText); +}, "~B"); +Clazz.defineMethod (c$, "setTextColour", +function (textColour) { +this.viewStyle.setTextColour (textColour); +}, "java.awt.Color"); +Clazz.defineMethod (c$, "setThresholdTextColour", +function (thresholdTextColour) { +this.viewStyle.setThresholdTextColour (thresholdTextColour); +}, "~N"); +Clazz.defineMethod (c$, "setTextColour2", +function (textColour2) { +this.viewStyle.setTextColour2 (textColour2); +}, "java.awt.Color"); +Clazz.overrideMethod (c$, "getViewStyle", +function () { +return new jalview.viewmodel.styles.ViewStyle (this.viewStyle); +}); +Clazz.overrideMethod (c$, "setViewStyle", +function (settingsForView) { +this.viewStyle = new jalview.viewmodel.styles.ViewStyle (settingsForView); +}, "jalview.api.ViewStyleI"); +Clazz.defineMethod (c$, "sameStyle", +function (them) { +return this.viewStyle.sameStyle (them); +}, "jalview.api.ViewStyleI"); +Clazz.defineMethod (c$, "getIdWidth", +function () { +return this.viewStyle.getIdWidth (); +}); +Clazz.defineMethod (c$, "setIdWidth", +function (i) { +this.viewStyle.setIdWidth (i); +}, "~N"); +Clazz.defineMethod (c$, "isCentreColumnLabels", +function () { +return this.viewStyle.isCentreColumnLabels (); +}); +Clazz.defineMethod (c$, "setCentreColumnLabels", +function (centreColumnLabels) { +this.viewStyle.setCentreColumnLabels (centreColumnLabels); +}, "~B"); +Clazz.defineMethod (c$, "setShowDBRefs", +function (showdbrefs) { +this.viewStyle.setShowDBRefs (showdbrefs); +}, "~B"); +Clazz.defineMethod (c$, "isShowDBRefs", +function () { +return this.viewStyle.isShowDBRefs (); +}); +Clazz.defineMethod (c$, "isShowNPFeats", +function () { +return this.viewStyle.isShowNPFeats (); +}); +Clazz.defineMethod (c$, "setShowNPFeats", +function (shownpfeats) { +this.viewStyle.setShowNPFeats (shownpfeats); +}, "~B"); +Clazz.defineMethod (c$, "addToHistoryList", +function (command) { +if (this.historyList != null) { +this.historyList.push (command); +this.broadcastCommand (command, false); +}}, "jalview.commands.CommandI"); +Clazz.defineMethod (c$, "broadcastCommand", +function (command, undo) { +this.getStructureSelectionManager ().commandPerformed (command, undo, this.getVamsasSource ()); +}, "jalview.commands.CommandI,~B"); +Clazz.defineMethod (c$, "addToRedoList", +function (command) { +if (this.redoList != null) { +this.redoList.push (command); +}this.broadcastCommand (command, true); +}, "jalview.commands.CommandI"); +Clazz.defineMethod (c$, "clearRedoList", +function () { +if (this.redoList != null) { +this.redoList.clear (); +}}); +Clazz.defineMethod (c$, "setHistoryList", +function (list) { +this.historyList = list; +}, "java.util.Deque"); +Clazz.defineMethod (c$, "getHistoryList", +function () { +return this.historyList; +}); +Clazz.defineMethod (c$, "setRedoList", +function (list) { +this.redoList = list; +}, "java.util.Deque"); +Clazz.defineMethod (c$, "getRedoList", +function () { +return this.redoList; +}); +Clazz.overrideMethod (c$, "getVamsasSource", +function () { +return this; +}); +Clazz.defineMethod (c$, "getSortAnnotationsBy", +function () { +return this.sortAnnotationsBy; +}); +Clazz.defineMethod (c$, "setSortAnnotationsBy", +function (sortAnnotationsBy) { +this.sortAnnotationsBy = sortAnnotationsBy; +}, "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder"); +Clazz.defineMethod (c$, "isShowAutocalculatedAbove", +function () { +return this.showAutocalculatedAbove; +}); +Clazz.defineMethod (c$, "setShowAutocalculatedAbove", +function (showAutocalculatedAbove) { +this.showAutocalculatedAbove = showAutocalculatedAbove; +}, "~B"); +Clazz.defineMethod (c$, "isScaleProteinAsCdna", +function () { +return this.viewStyle.isScaleProteinAsCdna (); +}); +Clazz.defineMethod (c$, "setScaleProteinAsCdna", +function (b) { +this.viewStyle.setScaleProteinAsCdna (b); +}, "~B"); +Clazz.defineMethod (c$, "isFollowHighlight", +function () { +return this.followHighlight; +}); +Clazz.overrideMethod (c$, "setFollowHighlight", +function (b) { +this.followHighlight = b; +}, "~B"); +Clazz.defineMethod (c$, "getStartRes", +function () { +return this.startRes; +}); +Clazz.overrideMethod (c$, "getEndRes", +function () { +return this.endRes; +}); +Clazz.defineMethod (c$, "getStartSeq", +function () { +return this.startSeq; +}); +Clazz.defineMethod (c$, "setStartRes", +function (res) { +this.startRes = res; +}, "~N"); +Clazz.defineMethod (c$, "setStartSeq", +function (seq) { +this.startSeq = seq; +}, "~N"); +Clazz.defineMethod (c$, "setEndRes", +function (res) { +if (res > this.alignment.getWidth () - 1) { +res = this.alignment.getWidth () - 1; +}if (res < 0) { +res = 0; +}this.endRes = res; +}, "~N"); +Clazz.defineMethod (c$, "setEndSeq", +function (seq) { +if (seq > this.alignment.getHeight ()) { +seq = this.alignment.getHeight (); +}if (seq < 0) { +seq = 0; +}this.endSeq = seq; +}, "~N"); +Clazz.defineMethod (c$, "getEndSeq", +function () { +return this.endSeq; +}); +Clazz.defineMethod (c$, "findComplementScrollTarget", +function (sr) { +var complement = this.getCodingComplement (); +if (complement == null || !complement.isFollowHighlight ()) { +return 0; +}var iAmProtein = !this.getAlignment ().isNucleotide (); +var proteinAlignment = iAmProtein ? this.getAlignment () : complement.getAlignment (); +if (proteinAlignment == null) { +return 0; +}var mappings = proteinAlignment.getCodonFrames (); +var seqOffset = 0; +var sequence = null; +var middleColumn = this.getStartRes () + Clazz.doubleToInt ((this.getEndRes () - this.getStartRes ()) / 2); +var hiddenSequences = this.getAlignment ().getHiddenSequences (); +for (var seqNo = this.getStartSeq (); seqNo < this.getEndSeq (); seqNo++, seqOffset++) { +sequence = this.getAlignment ().getSequenceAt (seqNo); +if (hiddenSequences != null && hiddenSequences.isHidden (sequence)) { +continue; +}if (jalview.util.Comparison.isGap (sequence.getCharAt (middleColumn))) { +continue; +}var seqMappings = jalview.util.MappingUtils.findMappingsForSequence (sequence, mappings); +if (!seqMappings.isEmpty ()) { +break; +}} +if (sequence == null) { +return 0; +}jalview.util.MappingUtils.addSearchResults (sr, sequence, sequence.findPosition (middleColumn), mappings); +return seqOffset; +}, "jalview.datamodel.SearchResults"); +}); diff --git a/bin/jalview/viewmodel/PCAModel.class b/bin/jalview/viewmodel/PCAModel.class index 25ba04c75eb53dfb9e1e1642e39667911d818e0d..47bb24024eed9b04f009d34fb6000e4e611f60cb 100644 GIT binary patch delta 861 zcmaKq-Afcv7{-4`*O}RM#btH0O^uRBQ&Y5BC`F>WFf1XYB)TXe5k)P;>LSRCg#Lh` zA_!DS7BjzfH$O8?Q`5B6>=Qx=3cB=0(Y7zx#)Q zEWUQyM$|Nwr-In>;v2;o6~$Gh8HF{~WmToeua{L^DXF&6!cKE(x8tG1$kz50w9sXz zn}-6e=4x=-oanU^gIAy@pWZH(z5l$%Gl8&a^vf+VoI!?Fh6HiOH%pw$&T~^wEiI`j zD6T9q9%~H9Z`*xRsP1PRL^6uv_(z z5HxT$`{>b?tBztczE!4zE93ep+sHD>SI9QWyIMh7a7sW zbEL5b97Qp7nSsK8z1-NUQfR~-~n10VnN=-GNY_8#xKTMWdc8ALS<6em=R89 z#SZ4gZstX*WH$>US7y&=iB$Pl)e&KyKWQA0PbN**;y?uOH5wrSnvoP5pjk=s(nKC_ zm?Mm9WH2vl3b)wHTS+QUXyjd>wnDOuxQHr)qy>qe>_Iia8M8V93Jsh_1;2w(mHdRy(v delta 858 zcmY+COGs2v7{`A{XYRc-jWmqh?4kvUS71*Z4p;xY=v4IEdm=h+*m!VcE02r8zFsf#%lc zmbgAr+RYE_Rufkb1eDQs7#{&p@n`7T6}gb+ifyF0nj)nI+YMzKwt22H`$a@=>QrvE zk>KQPeMag(eZPT4clYLaYp{3#y0BjMt<61m9bbhC;ptRu-Ldf38s>PZuq^)S60A;U5HxWs@| z4M}u|doo72&uih&Jmf1+_#v5Jj55iX@-d?3Gp-8As1jbXOuke*dHRyYZ-qpfp0p8` zm(nLg>pR_6_S@xOBmxBerkyETyh3GDPdg5n<#bjCMG-0KjNsK?_scANtyi)cg<}`U8PGL@=ztgb0FmlM&R!W*$ oDkq 1e-4) { -comps[i] = this.pca.component (i); -}} -this.top = this.pca.getM ().rows - 1; -this.points = new java.util.Vector (); -var scores = this.pca.getComponents (this.top - 1, this.top - 2, this.top - 3, 100); -for (var i = 0; i < this.pca.getM ().rows; i++) { -var sp = new jalview.datamodel.SequencePoint (this.seqs[i], scores[i]); -this.points.addElement (sp); -} -}); -Clazz.defineMethod (c$, "updateRc", -function (rc) { -rc.setPoints (this.points, this.pca.getM ().rows); -}, "jalview.api.RotatableCanvasI"); -Clazz.defineMethod (c$, "isNucleotide", -function () { -return this.nucleotide; -}); -Clazz.defineMethod (c$, "setNucleotide", -function (nucleotide) { -this.nucleotide = nucleotide; -}, "~B"); -Clazz.defineMethod (c$, "getTop", -function () { -return this.top; -}); -Clazz.defineMethod (c$, "updateRcView", -function (dim1, dim2, dim3) { -var scores = this.pca.getComponents (dim1 - 1, dim2 - 1, dim3 - 1, 100); -for (var i = 0; i < this.pca.getM ().rows; i++) { -(this.points.elementAt (i)).coord = scores[i]; -} -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "getDetails", -function () { -return this.pca.getDetails (); -}); -Clazz.defineMethod (c$, "getSeqtrings", -function () { -return this.seqstrings; -}); -Clazz.defineMethod (c$, "getPointsasCsv", -function (transformed, xdim, ydim, zdim) { -var csv = new StringBuffer (); -csv.append ("\"Sequence\""); -if (transformed) { -csv.append (","); -csv.append (xdim); -csv.append (","); -csv.append (ydim); -csv.append (","); -csv.append (zdim); -} else { -for (var d = 1, dmax = this.pca.component (1).length; d <= dmax; d++) { -csv.append ("," + d); -} -}csv.append ("\n"); -for (var s = 0; s < this.seqs.length; s++) { -csv.append ("\"" + this.seqs[s].getName () + "\""); -var fl; -if (!transformed) { -fl = this.pca.component (s); -for (var d = fl.length - 1; d >= 0; d--) { -csv.append (","); -csv.append (fl[d]); -} -} else { -fl = this.getPointPosition (s); -for (var d = 0; d < fl.length; d++) { -csv.append (","); -csv.append (fl[d]); -} -}csv.append ("\n"); -} -return csv.toString (); -}, "~B,~N,~N,~N"); -Clazz.defineMethod (c$, "getPointPosition", -function (s) { -var pts = Clazz.newDoubleArray (3, 0); -var p = this.points.elementAt (s).coord; -pts[0] = p[0]; -pts[1] = p[1]; -pts[2] = p[2]; -return pts; -}, "~N"); -Clazz.defineMethod (c$, "setJvCalcMode", -function (state) { -this.jvCalcMode = state; -}, "~B"); -Clazz.defineMethod (c$, "getScore_matrix", -function () { -return this.score_matrix; -}); -Clazz.defineMethod (c$, "setScore_matrix", -function (score_matrix) { -this.score_matrix = score_matrix; -}, "~S"); -}); +Clazz.declarePackage ("jalview.viewmodel"); +Clazz.load (null, "jalview.viewmodel.PCAModel", ["jalview.analysis.PCA", "jalview.datamodel.SequencePoint", "java.lang.StringBuffer", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.pca = null; +this.top = 0; +this.seqstrings = null; +this.seqs = null; +this.score_matrix = null; +this.nucleotide = false; +this.points = null; +this.jvCalcMode = true; +Clazz.instantialize (this, arguments); +}, jalview.viewmodel, "PCAModel"); +Clazz.makeConstructor (c$, +function (seqstrings2, seqs2, nucleotide2) { +this.seqstrings = seqstrings2; +this.seqs = seqs2; +this.nucleotide = nucleotide2; +this.score_matrix = nucleotide2 ? "PID" : "BLOSUM62"; +}, "jalview.datamodel.AlignmentView,~A,~B"); +Clazz.defineMethod (c$, "isJvCalcMode", +function () { +return this.jvCalcMode; +}); +Clazz.defineMethod (c$, "run", +function () { +this.pca = new jalview.analysis.PCA (this.seqstrings.getSequenceStrings (' '), this.nucleotide, this.score_matrix); +this.pca.setJvCalcMode (this.jvCalcMode); +this.pca.run (); +var ii = 0; +while ((ii < this.seqs.length) && (this.seqs[ii] != null)) { +ii++; +} +var comps = Clazz.newDoubleArray (ii, ii, 0); +for (var i = 0; i < ii; i++) { +if (this.pca.getEigenvalue (i) > 1e-4) { +comps[i] = this.pca.component (i); +}} +this.top = this.pca.getM ().rows - 1; +this.points = new java.util.Vector (); +var scores = this.pca.getComponents (this.top - 1, this.top - 2, this.top - 3, 100); +for (var i = 0; i < this.pca.getM ().rows; i++) { +var sp = new jalview.datamodel.SequencePoint (this.seqs[i], scores[i]); +this.points.addElement (sp); +} +}); +Clazz.defineMethod (c$, "updateRc", +function (rc) { +rc.setPoints (this.points, this.pca.getM ().rows); +}, "jalview.api.RotatableCanvasI"); +Clazz.defineMethod (c$, "isNucleotide", +function () { +return this.nucleotide; +}); +Clazz.defineMethod (c$, "setNucleotide", +function (nucleotide) { +this.nucleotide = nucleotide; +}, "~B"); +Clazz.defineMethod (c$, "getTop", +function () { +return this.top; +}); +Clazz.defineMethod (c$, "updateRcView", +function (dim1, dim2, dim3) { +var scores = this.pca.getComponents (dim1 - 1, dim2 - 1, dim3 - 1, 100); +for (var i = 0; i < this.pca.getM ().rows; i++) { +(this.points.elementAt (i)).coord = scores[i]; +} +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "getDetails", +function () { +return this.pca.getDetails (); +}); +Clazz.defineMethod (c$, "getSeqtrings", +function () { +return this.seqstrings; +}); +Clazz.defineMethod (c$, "getPointsasCsv", +function (transformed, xdim, ydim, zdim) { +var csv = new StringBuffer (); +csv.append ("\"Sequence\""); +if (transformed) { +csv.append (","); +csv.append ("" + xdim); +csv.append (","); +csv.append ("" + ydim); +csv.append (","); +csv.append ("" + zdim); +} else { +for (var d = 1, dmax = this.pca.component (1).length; d <= dmax; d++) { +csv.append ("," + d); +} +}csv.append ("\n"); +for (var s = 0; s < this.seqs.length; s++) { +csv.append ("\"" + this.seqs[s].getName () + "\""); +var fl; +if (!transformed) { +fl = this.pca.component (s); +for (var d = fl.length - 1; d >= 0; d--) { +csv.append (","); +csv.append (fl[d]); +} +} else { +fl = this.getPointPosition (s); +for (var d = 0; d < fl.length; d++) { +csv.append (","); +csv.append (fl[d]); +} +}csv.append ("\n"); +} +return csv.toString (); +}, "~B,~N,~N,~N"); +Clazz.defineMethod (c$, "getPointPosition", +function (s) { +var pts = Clazz.newDoubleArray (3, 0); +var p = this.points.elementAt (s).coord; +pts[0] = p[0]; +pts[1] = p[1]; +pts[2] = p[2]; +return pts; +}, "~N"); +Clazz.defineMethod (c$, "setJvCalcMode", +function (state) { +this.jvCalcMode = state; +}, "~B"); +Clazz.defineMethod (c$, "getScore_matrix", +function () { +return this.score_matrix; +}); +Clazz.defineMethod (c$, "setScore_matrix", +function (score_matrix) { +this.score_matrix = score_matrix; +}, "~S"); +}); diff --git a/bin/jalview/viewmodel/annotationfilter/AnnotationFilterParameter.js b/bin/jalview/viewmodel/annotationfilter/AnnotationFilterParameter.js index 7daaad4..5fd34a4 100644 --- a/bin/jalview/viewmodel/annotationfilter/AnnotationFilterParameter.js +++ b/bin/jalview/viewmodel/annotationfilter/AnnotationFilterParameter.js @@ -1,83 +1,83 @@ -Clazz.declarePackage ("jalview.viewmodel.annotationfilter"); -Clazz.load (["java.lang.Enum", "java.util.ArrayList"], "jalview.viewmodel.annotationfilter.AnnotationFilterParameter", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.thresholdType = null; -this.thresholdValue = 0; -this.filterAlphaHelix = false; -this.filterBetaSheet = false; -this.filterTurn = false; -this.regexString = null; -this.regexSearchFields = null; -Clazz.instantialize (this, arguments); -}, jalview.viewmodel.annotationfilter, "AnnotationFilterParameter"); -Clazz.prepareFields (c$, function () { -this.regexSearchFields = new java.util.ArrayList (); -}); -Clazz.defineMethod (c$, "getThresholdType", -function () { -return this.thresholdType; -}); -Clazz.defineMethod (c$, "setThresholdType", -function (thresholdType) { -this.thresholdType = thresholdType; -}, "jalview.viewmodel.annotationfilter.AnnotationFilterParameter.ThresholdType"); -Clazz.defineMethod (c$, "getThresholdValue", -function () { -return this.thresholdValue; -}); -Clazz.defineMethod (c$, "setThresholdValue", -function (thresholdValue) { -this.thresholdValue = thresholdValue; -}, "~N"); -Clazz.defineMethod (c$, "getRegexString", -function () { -return this.regexString; -}); -Clazz.defineMethod (c$, "setRegexString", -function (regexString) { -this.regexString = regexString; -}, "~S"); -Clazz.defineMethod (c$, "getRegexSearchFields", -function () { -return this.regexSearchFields; -}); -Clazz.defineMethod (c$, "addRegexSearchField", -function (regexSearchField) { -this.regexSearchFields.add (regexSearchField); -}, "jalview.viewmodel.annotationfilter.AnnotationFilterParameter.SearchableAnnotationField"); -Clazz.defineMethod (c$, "isFilterAlphaHelix", -function () { -return this.filterAlphaHelix; -}); -Clazz.defineMethod (c$, "setFilterAlphaHelix", -function (alphaHelix) { -this.filterAlphaHelix = alphaHelix; -}, "~B"); -Clazz.defineMethod (c$, "isFilterBetaSheet", -function () { -return this.filterBetaSheet; -}); -Clazz.defineMethod (c$, "setFilterBetaSheet", -function (betaSheet) { -this.filterBetaSheet = betaSheet; -}, "~B"); -Clazz.defineMethod (c$, "isFilterTurn", -function () { -return this.filterTurn; -}); -Clazz.defineMethod (c$, "setFilterTurn", -function (turn) { -this.filterTurn = turn; -}, "~B"); -Clazz.pu$h (); -c$ = Clazz.declareType (jalview.viewmodel.annotationfilter.AnnotationFilterParameter, "ThresholdType", Enum); -Clazz.defineEnumConstant (c$, "NO_THRESHOLD", 0, []); -Clazz.defineEnumConstant (c$, "BELOW_THRESHOLD", 1, []); -Clazz.defineEnumConstant (c$, "ABOVE_THRESHOLD", 2, []); -c$ = Clazz.p0p (); -Clazz.pu$h (); -c$ = Clazz.declareType (jalview.viewmodel.annotationfilter.AnnotationFilterParameter, "SearchableAnnotationField", Enum); -Clazz.defineEnumConstant (c$, "DISPLAY_STRING", 0, []); -Clazz.defineEnumConstant (c$, "DESCRIPTION", 1, []); -c$ = Clazz.p0p (); -}); +Clazz.declarePackage ("jalview.viewmodel.annotationfilter"); +Clazz.load (["java.lang.Enum", "java.util.ArrayList"], "jalview.viewmodel.annotationfilter.AnnotationFilterParameter", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.thresholdType = null; +this.thresholdValue = 0; +this.filterAlphaHelix = false; +this.filterBetaSheet = false; +this.filterTurn = false; +this.regexString = null; +this.regexSearchFields = null; +Clazz.instantialize (this, arguments); +}, jalview.viewmodel.annotationfilter, "AnnotationFilterParameter"); +Clazz.prepareFields (c$, function () { +this.regexSearchFields = new java.util.ArrayList (); +}); +Clazz.defineMethod (c$, "getThresholdType", +function () { +return this.thresholdType; +}); +Clazz.defineMethod (c$, "setThresholdType", +function (thresholdType) { +this.thresholdType = thresholdType; +}, "jalview.viewmodel.annotationfilter.AnnotationFilterParameter.ThresholdType"); +Clazz.defineMethod (c$, "getThresholdValue", +function () { +return this.thresholdValue; +}); +Clazz.defineMethod (c$, "setThresholdValue", +function (thresholdValue) { +this.thresholdValue = thresholdValue; +}, "~N"); +Clazz.defineMethod (c$, "getRegexString", +function () { +return this.regexString; +}); +Clazz.defineMethod (c$, "setRegexString", +function (regexString) { +this.regexString = regexString; +}, "~S"); +Clazz.defineMethod (c$, "getRegexSearchFields", +function () { +return this.regexSearchFields; +}); +Clazz.defineMethod (c$, "addRegexSearchField", +function (regexSearchField) { +this.regexSearchFields.add (regexSearchField); +}, "jalview.viewmodel.annotationfilter.AnnotationFilterParameter.SearchableAnnotationField"); +Clazz.defineMethod (c$, "isFilterAlphaHelix", +function () { +return this.filterAlphaHelix; +}); +Clazz.defineMethod (c$, "setFilterAlphaHelix", +function (alphaHelix) { +this.filterAlphaHelix = alphaHelix; +}, "~B"); +Clazz.defineMethod (c$, "isFilterBetaSheet", +function () { +return this.filterBetaSheet; +}); +Clazz.defineMethod (c$, "setFilterBetaSheet", +function (betaSheet) { +this.filterBetaSheet = betaSheet; +}, "~B"); +Clazz.defineMethod (c$, "isFilterTurn", +function () { +return this.filterTurn; +}); +Clazz.defineMethod (c$, "setFilterTurn", +function (turn) { +this.filterTurn = turn; +}, "~B"); +Clazz.pu$h (); +c$ = Clazz.declareType (jalview.viewmodel.annotationfilter.AnnotationFilterParameter, "ThresholdType", Enum); +Clazz.defineEnumConstant (c$, "NO_THRESHOLD", 0, []); +Clazz.defineEnumConstant (c$, "BELOW_THRESHOLD", 1, []); +Clazz.defineEnumConstant (c$, "ABOVE_THRESHOLD", 2, []); +c$ = Clazz.p0p (); +Clazz.pu$h (); +c$ = Clazz.declareType (jalview.viewmodel.annotationfilter.AnnotationFilterParameter, "SearchableAnnotationField", Enum); +Clazz.defineEnumConstant (c$, "DISPLAY_STRING", 0, []); +Clazz.defineEnumConstant (c$, "DESCRIPTION", 1, []); +c$ = Clazz.p0p (); +}); diff --git a/bin/jalview/viewmodel/seqfeatures/FeatureRendererModel.class b/bin/jalview/viewmodel/seqfeatures/FeatureRendererModel.class index 5f33a88d45d4ca4e26a75fce66171b18bab14e4b..cd148bd105109586db6eabdeb10c3a1b9c998228 100644 GIT binary patch delta 59 zcmZ4A&bYRnalburF-WsBY+z@!WK`a4r>V-%n7TQ|!jq9pnt|gF PgCaXauF&Qkmftx66q*pS delta 61 zcmZ46&bYpval| 0) { -this.pushFeatureType (nft); -}fdi.setAllVisible (featureTypes); -}, "java.util.List"); -Clazz.defineMethod (c$, "pushFeatureType", -($fz = function (types) { -var ts = types.size (); -var neworder = new Array ((this.renderOrder == null ? 0 : this.renderOrder.length) + ts); -types.toArray (neworder); -if (this.renderOrder != null) { -System.arraycopy (neworder, 0, neworder, this.renderOrder.length, ts); -System.arraycopy (this.renderOrder, 0, neworder, 0, this.renderOrder.length); -}this.renderOrder = neworder; -}, $fz.isPrivate = true, $fz), "java.util.List"); -Clazz.defineMethod (c$, "getMinMax", -function () { -return this.minmax; -}); -Clazz.defineMethod (c$, "normaliseScore", -function (sequenceFeature) { -var mm = (this.minmax.get (sequenceFeature.type))[0]; -var r = Clazz.newByteArray (-1, [0, 255]); -if (mm != null) { -if (r[0] != 0 || mm[0] < 0.0) { -r[0] = 1; -r[1] = Clazz.doubleToByte (Clazz.doubleToInt (128.0) + 127.0 * (sequenceFeature.score / mm[1])); -} else { -r[1] = Clazz.floatToByte (Clazz.doubleToInt (255.0) * (sequenceFeature.score / mm[1])); -}}return r; -}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "updateFeatures", -function () { -if (this.av.getFeaturesDisplayed () == null || this.renderOrder == null || this.newFeatureAdded) { -this.findAllFeatures (); -if (this.av.getFeaturesDisplayed ().getVisibleFeatureCount () < 1) { -return false; -}}return true; -}); -Clazz.defineMethod (c$, "findAllFeatures", -function () { -{ -if (this.firing.equals (Boolean.FALSE)) { -this.firing = Boolean.TRUE; -this.findAllFeatures (true); -this.changeSupport.firePropertyChange ("changeSupport", null, null); -this.firing = Boolean.FALSE; -}}}); -Clazz.overrideMethod (c$, "findFeaturesAtRes", -function (sequence, res) { -var tmp = new java.util.ArrayList (); -var features = sequence.getSequenceFeatures (); -if (features != null) { -for (var i = 0; i < features.length; i++) { -if (!this.av.areFeaturesDisplayed () || !this.av.getFeaturesDisplayed ().isVisible (features[i].getType ())) { -continue; -}if (features[i].featureGroup != null && this.featureGroups != null && this.featureGroups.containsKey (features[i].featureGroup) && !this.featureGroups.get (features[i].featureGroup).booleanValue ()) { -continue; -}if ((features[i].getBegin () <= res) && (features[i].getEnd () >= res)) { -tmp.add (features[i]); -}} -}return tmp; -}, "jalview.datamodel.SequenceI,~N"); -Clazz.defineMethod (c$, "findAllFeatures", -function (newMadeVisible) { -this.newFeatureAdded = false; -if (this.findingFeatures) { -this.newFeatureAdded = true; -return; -}this.findingFeatures = true; -if (this.av.getFeaturesDisplayed () == null) { -this.av.setFeaturesDisplayed ( new jalview.viewmodel.seqfeatures.FeaturesDisplayed ()); -}var featuresDisplayed = this.av.getFeaturesDisplayed (); -var allfeatures = new java.util.ArrayList (); -var oldfeatures = new java.util.ArrayList (); -if (this.renderOrder != null) { -for (var i = 0; i < this.renderOrder.length; i++) { -if (this.renderOrder[i] != null) { -oldfeatures.add (this.renderOrder[i]); -}} -}if (this.minmax == null) { -this.minmax = new java.util.Hashtable (); -}var alignment = this.av.getAlignment (); -for (var i = 0; i < alignment.getHeight (); i++) { -var asq = alignment.getSequenceAt (i); -var features = asq.getSequenceFeatures (); -if (features == null) { -continue; -}var index = 0; -while (index < features.length) { -if (!featuresDisplayed.isRegistered (features[index].getType ())) { -var fgrp = features[index].getFeatureGroup (); -if (fgrp != null) { -var groupDisplayed = this.featureGroups.get (fgrp); -if (groupDisplayed == null) { -groupDisplayed = Boolean.$valueOf (newMadeVisible); -this.featureGroups.put (fgrp, groupDisplayed); -}if (!groupDisplayed.booleanValue ()) { -index++; -continue; -}}if (!(features[index].begin == 0 && features[index].end == 0)) { -if (newMadeVisible && !oldfeatures.contains (features[index].getType ())) { -featuresDisplayed.setVisible (features[index].getType ()); -this.setOrder (features[index].getType (), 0); -}}}if (!allfeatures.contains (features[index].getType ())) { -allfeatures.add (features[index].getType ()); -}if (!Float.isNaN (features[index].score)) { -var nonpos = features[index].getBegin () >= 1 ? 0 : 1; -var mm = this.minmax.get (features[index].getType ()); -if (mm == null) { -mm = Clazz.newArray (-1, [null, null]); -this.minmax.put (features[index].getType (), mm); -}if (mm[nonpos] == null) { -mm[nonpos] = Clazz.newFloatArray (-1, [features[index].score, features[index].score]); -} else { -if (mm[nonpos][0] > features[index].score) { -mm[nonpos][0] = features[index].score; -}if (mm[nonpos][1] < features[index].score) { -mm[nonpos][1] = features[index].score; -}}}index++; -} -} -this.updateRenderOrder (allfeatures); -this.findingFeatures = false; -}, "~B"); -Clazz.defineMethod (c$, "updateRenderOrder", -($fz = function (allFeatures) { -var allfeatures = new java.util.ArrayList (allFeatures); -var oldRender = this.renderOrder; -this.renderOrder = new Array (allfeatures.size ()); -var mmrange; -var fc = null; -var initOrders = (this.featureOrder == null); -var opos = 0; -if (oldRender != null && oldRender.length > 0) { -for (var j = 0; j < oldRender.length; j++) { -if (oldRender[j] != null) { -if (initOrders) { -this.setOrder (oldRender[j], (1 - (1 + j) / oldRender.length)); -}if (allfeatures.contains (oldRender[j])) { -this.renderOrder[opos++] = oldRender[j]; -allfeatures.remove (oldRender[j]); -if (this.minmax != null) { -mmrange = this.minmax.get (oldRender[j]); -if (mmrange != null) { -fc = this.featureColours.get (oldRender[j]); -if (fc != null && Clazz.instanceOf (fc, jalview.schemes.GraduatedColor) && (fc).isAutoScale ()) { -(fc).updateBounds ((mmrange)[0][0], (mmrange)[0][1]); -}}}}}} -}if (allfeatures.size () == 0) { -return; -}var i = allfeatures.size () - 1; -var iSize = i; -var sort = false; -var newf = new Array (allfeatures.size ()); -var sortOrder = Clazz.newFloatArray (allfeatures.size (), 0); -for (var newfeat, $newfeat = allfeatures.iterator (); $newfeat.hasNext () && ((newfeat = $newfeat.next ()) || true);) { -newf[i] = newfeat; -if (this.minmax != null) { -mmrange = this.minmax.get (newf[i]); -if (mmrange != null) { -fc = this.featureColours.get (newf[i]); -if (fc != null && Clazz.instanceOf (fc, jalview.schemes.GraduatedColor) && (fc).isAutoScale ()) { -(fc).updateBounds ((mmrange)[0][0], (mmrange)[0][1]); -}}}if (initOrders || !this.featureOrder.containsKey (newf[i])) { -var denom = initOrders ? allfeatures.size () : this.featureOrder.size (); -this.setOrder (newf[i], i / denom); -}sortOrder[i] = 2 - (this.featureOrder.get (newf[i])).floatValue (); -if (i < iSize) { -sort = sort || sortOrder[i] > sortOrder[i + 1]; -}i--; -} -if (iSize > 1 && sort) { -jalview.util.QuickSort.sortFloatObject (sortOrder, newf); -}sortOrder = null; -System.arraycopy (newf, 0, this.renderOrder, opos, newf.length); -}, $fz.isPrivate = true, $fz), "java.util.List"); -Clazz.overrideMethod (c$, "getFeatureStyle", -function (featureType) { -var fc = this.featureColours.get (featureType); -if (fc == null) { -var ucs = new jalview.schemes.UserColourScheme (); -var col = ucs.createColourFromName (featureType); -this.featureColours.put (featureType, fc = col); -}return fc; -}, "~S"); -Clazz.defineMethod (c$, "getColour", -function (featureType) { -var fc = this.getFeatureStyle (featureType); -if (Clazz.instanceOf (fc, java.awt.Color)) { -return fc; -} else { -if (Clazz.instanceOf (fc, jalview.schemes.GraduatedColor)) { -return (fc).getMaxColor (); -}}throw new Error ("Implementation Error: Unrecognised render object " + fc.getClass () + " for features of type " + featureType); -}, "~S"); -Clazz.defineMethod (c$, "getColour", -function (feature) { -var fc = this.getFeatureStyle (feature.getType ()); -if (Clazz.instanceOf (fc, java.awt.Color)) { -return fc; -} else { -if (Clazz.instanceOf (fc, jalview.schemes.GraduatedColor)) { -return (fc).findColor (feature); -}}throw new Error ("Implementation Error: Unrecognised render object " + fc.getClass () + " for features of type " + feature.getType ()); -}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "showFeature", -function (sequenceFeature) { -var fc = this.getFeatureStyle (sequenceFeature.type); -if (Clazz.instanceOf (fc, jalview.schemes.GraduatedColor)) { -return (fc).isColored (sequenceFeature); -} else { -return true; -}}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "showFeatureOfType", -function (type) { -return this.av.getFeaturesDisplayed ().isVisible (type); -}, "~S"); -Clazz.overrideMethod (c$, "setColour", -function (featureType, col) { -{ -this.featureColours.put (featureType, col); -}}, "~S,~O"); -Clazz.defineMethod (c$, "setTransparency", -function (value) { -this.transparency = value; -}, "~N"); -Clazz.defineMethod (c$, "getTransparency", -function () { -return this.transparency; -}); -Clazz.defineMethod (c$, "setOrder", -function (type, position) { -if (this.featureOrder == null) { -this.featureOrder = new java.util.Hashtable (); -}this.featureOrder.put (type, new Float (position)); -return position; -}, "~S,~N"); -Clazz.defineMethod (c$, "getOrder", -function (type) { -if (this.featureOrder != null) { -if (this.featureOrder.containsKey (type)) { -return (this.featureOrder.get (type)).floatValue (); -}}return -1; -}, "~S"); -Clazz.overrideMethod (c$, "getFeatureColours", -function () { -return new java.util.concurrent.ConcurrentHashMap (this.featureColours); -}); -Clazz.defineMethod (c$, "setFeaturePriority", -function (data) { -this.setFeaturePriority (data, true); -}, "~A"); -Clazz.defineMethod (c$, "setFeaturePriority", -function (data, visibleNew) { -var av_featuresdisplayed = null; -if (visibleNew) { -if ((av_featuresdisplayed = this.av.getFeaturesDisplayed ()) != null) { -this.av.getFeaturesDisplayed ().clear (); -} else { -this.av.setFeaturesDisplayed (av_featuresdisplayed = new jalview.viewmodel.seqfeatures.FeaturesDisplayed ()); -}} else { -av_featuresdisplayed = this.av.getFeaturesDisplayed (); -}if (data == null) { -return; -}this.renderOrder = new Array (data.length); -if (data.length > 0) { -for (var i = 0; i < data.length; i++) { -var type = data[i][0].toString (); -this.setColour (type, data[i][1]); -if ((data[i][2]).booleanValue ()) { -av_featuresdisplayed.setVisible (type); -}this.renderOrder[data.length - i - 1] = type; -} -}}, "~A,~B"); -Clazz.defineMethod (c$, "addPropertyChangeListener", -function (listener) { -this.changeSupport.addPropertyChangeListener (listener); -}, "java.beans.PropertyChangeListener"); -Clazz.defineMethod (c$, "removePropertyChangeListener", -function (listener) { -this.changeSupport.removePropertyChangeListener (listener); -}, "java.beans.PropertyChangeListener"); -Clazz.defineMethod (c$, "getAllFeatureColours", -function () { -return this.featureColours.keySet (); -}); -Clazz.defineMethod (c$, "clearRenderOrder", -function () { -this.renderOrder = null; -}); -Clazz.defineMethod (c$, "hasRenderOrder", -function () { -return this.renderOrder != null; -}); -Clazz.defineMethod (c$, "getRenderOrder", -function () { -if (this.renderOrder == null) { -return java.util.Arrays.asList ( Clazz.newArray (-1, [])); -}return java.util.Arrays.asList (this.renderOrder); -}); -Clazz.defineMethod (c$, "getFeatureGroupsSize", -function () { -return this.featureGroups != null ? 0 : this.featureGroups.size (); -}); -Clazz.overrideMethod (c$, "getFeatureGroups", -function () { -return (this.featureGroups == null) ? java.util.Arrays.asList ( new Array (0)) : java.util.Arrays.asList (this.featureGroups.keySet ().toArray ( new Array (0))); -}); -Clazz.defineMethod (c$, "checkGroupVisibility", -function (group, newGroupsVisible) { -if (this.featureGroups == null) { -}if (this.featureGroups.containsKey (group)) { -return this.featureGroups.get (group).booleanValue (); -}if (newGroupsVisible) { -this.featureGroups.put (group, new Boolean (true)); -return true; -}return false; -}, "~S,~B"); -Clazz.overrideMethod (c$, "getGroups", -function (visible) { -if (this.featureGroups != null) { -var gp = new java.util.ArrayList (); -for (var grp, $grp = this.featureGroups.keySet ().iterator (); $grp.hasNext () && ((grp = $grp.next ()) || true);) { -var state = this.featureGroups.get (grp); -if (state.booleanValue () == visible) { -gp.add (grp); -}} -return gp; -}return null; -}, "~B"); -Clazz.defineMethod (c$, "setGroupVisibility", -function (group, visible) { -this.featureGroups.put (group, new Boolean (visible)); -}, "~S,~B"); -Clazz.defineMethod (c$, "setGroupVisibility", -function (toset, visible) { -if (toset != null && toset.size () > 0 && this.featureGroups != null) { -var rdrw = false; -for (var gst, $gst = toset.iterator (); $gst.hasNext () && ((gst = $gst.next ()) || true);) { -var st = this.featureGroups.get (gst); -this.featureGroups.put (gst, new Boolean (visible)); -if (st != null) { -rdrw = rdrw || (visible != st.booleanValue ()); -}} -if (rdrw) { -}}}, "java.util.List,~B"); -Clazz.overrideMethod (c$, "getDisplayedFeatureCols", -function () { -var fcols = new java.util.Hashtable (); -if (this.getViewport ().getFeaturesDisplayed () == null) { -return fcols; -}var en = this.getViewport ().getFeaturesDisplayed ().getVisibleFeatures (); -while (en.hasNext ()) { -var col = en.next (); -fcols.put (col, this.getColour (col)); -} -return fcols; -}); -Clazz.defineMethod (c$, "getFeaturesDisplayed", -function () { -return this.av.getFeaturesDisplayed (); -}); -Clazz.overrideMethod (c$, "getDisplayedFeatureTypes", -function () { -var typ = null; -typ = this.getRenderOrder ().toArray ( new Array (0)); -var feature_disp = this.av.getFeaturesDisplayed (); -if (feature_disp != null) { -{ -for (var i = 0; i < typ.length; i++) { -if (!feature_disp.isVisible (typ[i])) { -typ[i] = null; -}} -}}return typ; -}); -Clazz.overrideMethod (c$, "getDisplayedFeatureGroups", -function () { -var gps = null; -var _gps = new java.util.ArrayList (); -var en = this.getFeatureGroups ().iterator (); -var g = 0; -var valid = false; -while (en.hasNext ()) { -var gp = en.next (); -if (this.checkGroupVisibility (gp, false)) { -valid = true; -_gps.add (gp); -}if (!valid) { -return null; -} else { -gps = new Array (_gps.size ()); -_gps.toArray (gps); -}} -return gps; -}); -}); +Clazz.declarePackage ("jalview.viewmodel.seqfeatures"); +Clazz.load (["jalview.api.FeatureRenderer", "java.beans.PropertyChangeSupport", "java.lang.Boolean", "java.util.Hashtable", "java.util.concurrent.ConcurrentHashMap"], "jalview.viewmodel.seqfeatures.FeatureRendererModel", ["jalview.schemes.GraduatedColor", "$.UserColourScheme", "jalview.util.QuickSort", "jalview.viewmodel.seqfeatures.FeatureRendererSettings", "$.FeaturesDisplayed", "java.awt.Color", "java.lang.Error", "$.Float", "java.util.ArrayList", "$.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.transparency = 1.0; +this.featureColours = null; +this.featureGroups = null; +this.currentColour = null; +this.renderOrder = null; +this.changeSupport = null; +this.av = null; +this.minmax = null; +this.newFeatureAdded = false; +this.findingFeatures = false; +this.firing = null; +this.featureOrder = null; +Clazz.instantialize (this, arguments); +}, jalview.viewmodel.seqfeatures, "FeatureRendererModel", null, jalview.api.FeatureRenderer); +Clazz.prepareFields (c$, function () { +this.featureColours = new java.util.concurrent.ConcurrentHashMap (); +this.featureGroups = new java.util.concurrent.ConcurrentHashMap (); +this.changeSupport = new java.beans.PropertyChangeSupport (this); +this.minmax = new java.util.Hashtable (); +this.firing = Boolean.FALSE; +}); +Clazz.overrideMethod (c$, "getViewport", +function () { +return this.av; +}); +Clazz.defineMethod (c$, "getSettings", +function () { +return new jalview.viewmodel.seqfeatures.FeatureRendererSettings (this); +}); +Clazz.defineMethod (c$, "transferSettings", +function (fr) { +this.renderOrder = fr.renderOrder; +this.featureGroups = fr.featureGroups; +this.featureColours = fr.featureColours; +this.transparency = fr.transparency; +this.featureOrder = fr.featureOrder; +}, "jalview.viewmodel.seqfeatures.FeatureRendererSettings"); +Clazz.defineMethod (c$, "transferSettings", +function (_fr) { +var fr = _fr; +var frs = new jalview.viewmodel.seqfeatures.FeatureRendererSettings (fr); +this.renderOrder = frs.renderOrder; +this.featureGroups = frs.featureGroups; +this.featureColours = frs.featureColours; +this.transparency = frs.transparency; +this.featureOrder = frs.featureOrder; +if (this.av != null && this.av !== fr.getViewport ()) { +if (_fr.getFeaturesDisplayed () != null) { +var fd = this.getFeaturesDisplayed (); +if (fd == null) { +this.setFeaturesDisplayedFrom (_fr.getFeaturesDisplayed ()); +} else { +{ +fd.clear (); +var fdisp = _fr.getFeaturesDisplayed ().getVisibleFeatures (); +while (fdisp.hasNext ()) { +fd.setVisible (fdisp.next ()); +} +}}}}}, "jalview.api.FeatureRenderer"); +Clazz.defineMethod (c$, "setFeaturesDisplayedFrom", +function (featuresDisplayed) { +this.av.setFeaturesDisplayed ( new jalview.viewmodel.seqfeatures.FeaturesDisplayed (featuresDisplayed)); +}, "jalview.api.FeaturesDisplayedI"); +Clazz.overrideMethod (c$, "setVisible", +function (featureType) { +var fdi = this.av.getFeaturesDisplayed (); +if (fdi == null) { +this.av.setFeaturesDisplayed (fdi = new jalview.viewmodel.seqfeatures.FeaturesDisplayed ()); +}if (!fdi.isRegistered (featureType)) { +this.pushFeatureType (java.util.Arrays.asList ( Clazz.newArray (-1, [featureType]))); +}fdi.setVisible (featureType); +}, "~S"); +Clazz.overrideMethod (c$, "setAllVisible", +function (featureTypes) { +var fdi = this.av.getFeaturesDisplayed (); +if (fdi == null) { +this.av.setFeaturesDisplayed (fdi = new jalview.viewmodel.seqfeatures.FeaturesDisplayed ()); +}var nft = new java.util.ArrayList (); +for (var featureType, $featureType = featureTypes.iterator (); $featureType.hasNext () && ((featureType = $featureType.next ()) || true);) { +if (!fdi.isRegistered (featureType)) { +nft.add (featureType); +}} +if (nft.size () > 0) { +this.pushFeatureType (nft); +}fdi.setAllVisible (featureTypes); +}, "java.util.List"); +Clazz.defineMethod (c$, "pushFeatureType", +($fz = function (types) { +var ts = types.size (); +var neworder = new Array ((this.renderOrder == null ? 0 : this.renderOrder.length) + ts); +types.toArray (neworder); +if (this.renderOrder != null) { +System.arraycopy (neworder, 0, neworder, this.renderOrder.length, ts); +System.arraycopy (this.renderOrder, 0, neworder, 0, this.renderOrder.length); +}this.renderOrder = neworder; +}, $fz.isPrivate = true, $fz), "java.util.List"); +Clazz.defineMethod (c$, "getMinMax", +function () { +return this.minmax; +}); +Clazz.defineMethod (c$, "normaliseScore", +function (sequenceFeature) { +var mm = (this.minmax.get (sequenceFeature.type))[0]; +var r = Clazz.newByteArray (-1, [0, 255]); +if (mm != null) { +if (r[0] != 0 || mm[0] < 0.0) { +r[0] = 1; +r[1] = Clazz.doubleToByte (Clazz.doubleToInt (128.0) + 127.0 * (sequenceFeature.score / mm[1])); +} else { +r[1] = Clazz.floatToByte (Clazz.doubleToInt (255.0) * (sequenceFeature.score / mm[1])); +}}return r; +}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "updateFeatures", +function () { +if (this.av.getFeaturesDisplayed () == null || this.renderOrder == null || this.newFeatureAdded) { +this.findAllFeatures (); +if (this.av.getFeaturesDisplayed ().getVisibleFeatureCount () < 1) { +return false; +}}return true; +}); +Clazz.defineMethod (c$, "findAllFeatures", +function () { +{ +if (this.firing.equals (Boolean.FALSE)) { +this.firing = Boolean.TRUE; +this.findAllFeatures (true); +this.changeSupport.firePropertyChange ("changeSupport", null, null); +this.firing = Boolean.FALSE; +}}}); +Clazz.overrideMethod (c$, "findFeaturesAtRes", +function (sequence, res) { +var tmp = new java.util.ArrayList (); +var features = sequence.getSequenceFeatures (); +if (features != null) { +for (var i = 0; i < features.length; i++) { +if (!this.av.areFeaturesDisplayed () || !this.av.getFeaturesDisplayed ().isVisible (features[i].getType ())) { +continue; +}if (features[i].featureGroup != null && this.featureGroups != null && this.featureGroups.containsKey (features[i].featureGroup) && !this.featureGroups.get (features[i].featureGroup).booleanValue ()) { +continue; +}if ((features[i].getBegin () <= res) && (features[i].getEnd () >= res)) { +tmp.add (features[i]); +}} +}return tmp; +}, "jalview.datamodel.SequenceI,~N"); +Clazz.defineMethod (c$, "findAllFeatures", +function (newMadeVisible) { +this.newFeatureAdded = false; +if (this.findingFeatures) { +this.newFeatureAdded = true; +return; +}this.findingFeatures = true; +if (this.av.getFeaturesDisplayed () == null) { +this.av.setFeaturesDisplayed ( new jalview.viewmodel.seqfeatures.FeaturesDisplayed ()); +}var featuresDisplayed = this.av.getFeaturesDisplayed (); +var allfeatures = new java.util.ArrayList (); +var oldfeatures = new java.util.ArrayList (); +if (this.renderOrder != null) { +for (var i = 0; i < this.renderOrder.length; i++) { +if (this.renderOrder[i] != null) { +oldfeatures.add (this.renderOrder[i]); +}} +}if (this.minmax == null) { +this.minmax = new java.util.Hashtable (); +}var alignment = this.av.getAlignment (); +for (var i = 0; i < alignment.getHeight (); i++) { +var asq = alignment.getSequenceAt (i); +var features = asq.getSequenceFeatures (); +if (features == null) { +continue; +}var index = 0; +while (index < features.length) { +if (!featuresDisplayed.isRegistered (features[index].getType ())) { +var fgrp = features[index].getFeatureGroup (); +if (fgrp != null) { +var groupDisplayed = this.featureGroups.get (fgrp); +if (groupDisplayed == null) { +groupDisplayed = Boolean.$valueOf (newMadeVisible); +this.featureGroups.put (fgrp, groupDisplayed); +}if (!groupDisplayed.booleanValue ()) { +index++; +continue; +}}if (!(features[index].begin == 0 && features[index].end == 0)) { +if (newMadeVisible && !oldfeatures.contains (features[index].getType ())) { +featuresDisplayed.setVisible (features[index].getType ()); +this.setOrder (features[index].getType (), 0); +}}}if (!allfeatures.contains (features[index].getType ())) { +allfeatures.add (features[index].getType ()); +}if (!Float.isNaN (features[index].score)) { +var nonpos = features[index].getBegin () >= 1 ? 0 : 1; +var mm = this.minmax.get (features[index].getType ()); +if (mm == null) { +mm = Clazz.newArray (-1, [null, null]); +this.minmax.put (features[index].getType (), mm); +}if (mm[nonpos] == null) { +mm[nonpos] = Clazz.newFloatArray (-1, [features[index].score, features[index].score]); +} else { +if (mm[nonpos][0] > features[index].score) { +mm[nonpos][0] = features[index].score; +}if (mm[nonpos][1] < features[index].score) { +mm[nonpos][1] = features[index].score; +}}}index++; +} +} +this.updateRenderOrder (allfeatures); +this.findingFeatures = false; +}, "~B"); +Clazz.defineMethod (c$, "updateRenderOrder", +($fz = function (allFeatures) { +var allfeatures = new java.util.ArrayList (allFeatures); +var oldRender = this.renderOrder; +this.renderOrder = new Array (allfeatures.size ()); +var mmrange; +var fc = null; +var initOrders = (this.featureOrder == null); +var opos = 0; +if (oldRender != null && oldRender.length > 0) { +for (var j = 0; j < oldRender.length; j++) { +if (oldRender[j] != null) { +if (initOrders) { +this.setOrder (oldRender[j], (1 - (1 + j) / oldRender.length)); +}if (allfeatures.contains (oldRender[j])) { +this.renderOrder[opos++] = oldRender[j]; +allfeatures.remove (oldRender[j]); +if (this.minmax != null) { +mmrange = this.minmax.get (oldRender[j]); +if (mmrange != null) { +fc = this.featureColours.get (oldRender[j]); +if (fc != null && Clazz.instanceOf (fc, jalview.schemes.GraduatedColor) && (fc).isAutoScale ()) { +(fc).updateBounds ((mmrange)[0][0], (mmrange)[0][1]); +}}}}}} +}if (allfeatures.size () == 0) { +return; +}var i = allfeatures.size () - 1; +var iSize = i; +var sort = false; +var newf = new Array (allfeatures.size ()); +var sortOrder = Clazz.newFloatArray (allfeatures.size (), 0); +for (var newfeat, $newfeat = allfeatures.iterator (); $newfeat.hasNext () && ((newfeat = $newfeat.next ()) || true);) { +newf[i] = newfeat; +if (this.minmax != null) { +mmrange = this.minmax.get (newf[i]); +if (mmrange != null) { +fc = this.featureColours.get (newf[i]); +if (fc != null && Clazz.instanceOf (fc, jalview.schemes.GraduatedColor) && (fc).isAutoScale ()) { +(fc).updateBounds ((mmrange)[0][0], (mmrange)[0][1]); +}}}if (initOrders || !this.featureOrder.containsKey (newf[i])) { +var denom = initOrders ? allfeatures.size () : this.featureOrder.size (); +this.setOrder (newf[i], i / denom); +}sortOrder[i] = 2 - (this.featureOrder.get (newf[i])).floatValue (); +if (i < iSize) { +sort = sort || sortOrder[i] > sortOrder[i + 1]; +}i--; +} +if (iSize > 1 && sort) { +jalview.util.QuickSort.sortFloatObject (sortOrder, newf); +}sortOrder = null; +System.arraycopy (newf, 0, this.renderOrder, opos, newf.length); +}, $fz.isPrivate = true, $fz), "java.util.List"); +Clazz.overrideMethod (c$, "getFeatureStyle", +function (featureType) { +var fc = this.featureColours.get (featureType); +if (fc == null) { +var ucs = new jalview.schemes.UserColourScheme (); +var col = ucs.createColourFromName (featureType); +this.featureColours.put (featureType, fc = col); +}return fc; +}, "~S"); +Clazz.defineMethod (c$, "getColour", +function (featureType) { +var fc = this.getFeatureStyle (featureType); +if (Clazz.instanceOf (fc, java.awt.Color)) { +return fc; +} else { +if (Clazz.instanceOf (fc, jalview.schemes.GraduatedColor)) { +return (fc).getMaxColor (); +}}throw new Error ("Implementation Error: Unrecognised render object " + fc.getClass () + " for features of type " + featureType); +}, "~S"); +Clazz.defineMethod (c$, "getColour", +function (feature) { +var fc = this.getFeatureStyle (feature.getType ()); +if (Clazz.instanceOf (fc, java.awt.Color)) { +return fc; +} else { +if (Clazz.instanceOf (fc, jalview.schemes.GraduatedColor)) { +return (fc).findColor (feature); +}}throw new Error ("Implementation Error: Unrecognised render object " + fc.getClass () + " for features of type " + feature.getType ()); +}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "showFeature", +function (sequenceFeature) { +var fc = this.getFeatureStyle (sequenceFeature.type); +if (Clazz.instanceOf (fc, jalview.schemes.GraduatedColor)) { +return (fc).isColored (sequenceFeature); +} else { +return true; +}}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "showFeatureOfType", +function (type) { +return this.av.getFeaturesDisplayed ().isVisible (type); +}, "~S"); +Clazz.overrideMethod (c$, "setColour", +function (featureType, col) { +{ +this.featureColours.put (featureType, col); +}}, "~S,~O"); +Clazz.defineMethod (c$, "setTransparency", +function (value) { +this.transparency = value; +}, "~N"); +Clazz.defineMethod (c$, "getTransparency", +function () { +return this.transparency; +}); +Clazz.defineMethod (c$, "setOrder", +function (type, position) { +if (this.featureOrder == null) { +this.featureOrder = new java.util.Hashtable (); +}this.featureOrder.put (type, new Float (position)); +return position; +}, "~S,~N"); +Clazz.defineMethod (c$, "getOrder", +function (type) { +if (this.featureOrder != null) { +if (this.featureOrder.containsKey (type)) { +return (this.featureOrder.get (type)).floatValue (); +}}return -1; +}, "~S"); +Clazz.overrideMethod (c$, "getFeatureColours", +function () { +return new java.util.concurrent.ConcurrentHashMap (this.featureColours); +}); +Clazz.defineMethod (c$, "setFeaturePriority", +function (data) { +this.setFeaturePriority (data, true); +}, "~A"); +Clazz.defineMethod (c$, "setFeaturePriority", +function (data, visibleNew) { +var av_featuresdisplayed = null; +if (visibleNew) { +if ((av_featuresdisplayed = this.av.getFeaturesDisplayed ()) != null) { +this.av.getFeaturesDisplayed ().clear (); +} else { +this.av.setFeaturesDisplayed (av_featuresdisplayed = new jalview.viewmodel.seqfeatures.FeaturesDisplayed ()); +}} else { +av_featuresdisplayed = this.av.getFeaturesDisplayed (); +}if (data == null) { +return; +}this.renderOrder = new Array (data.length); +if (data.length > 0) { +for (var i = 0; i < data.length; i++) { +var type = data[i][0].toString (); +this.setColour (type, data[i][1]); +if ((data[i][2]).booleanValue ()) { +av_featuresdisplayed.setVisible (type); +}this.renderOrder[data.length - i - 1] = type; +} +}}, "~A,~B"); +Clazz.defineMethod (c$, "addPropertyChangeListener", +function (listener) { +this.changeSupport.addPropertyChangeListener (listener); +}, "java.beans.PropertyChangeListener"); +Clazz.defineMethod (c$, "removePropertyChangeListener", +function (listener) { +this.changeSupport.removePropertyChangeListener (listener); +}, "java.beans.PropertyChangeListener"); +Clazz.defineMethod (c$, "getAllFeatureColours", +function () { +return this.featureColours.keySet (); +}); +Clazz.defineMethod (c$, "clearRenderOrder", +function () { +this.renderOrder = null; +}); +Clazz.defineMethod (c$, "hasRenderOrder", +function () { +return this.renderOrder != null; +}); +Clazz.defineMethod (c$, "getRenderOrder", +function () { +if (this.renderOrder == null) { +return java.util.Arrays.asList ( Clazz.newArray (-1, [])); +}return java.util.Arrays.asList (this.renderOrder); +}); +Clazz.defineMethod (c$, "getFeatureGroupsSize", +function () { +return this.featureGroups != null ? 0 : this.featureGroups.size (); +}); +Clazz.overrideMethod (c$, "getFeatureGroups", +function () { +return (this.featureGroups == null) ? java.util.Arrays.asList ( new Array (0)) : java.util.Arrays.asList (this.featureGroups.keySet ().toArray ( new Array (0))); +}); +Clazz.defineMethod (c$, "checkGroupVisibility", +function (group, newGroupsVisible) { +if (this.featureGroups == null) { +}if (this.featureGroups.containsKey (group)) { +return this.featureGroups.get (group).booleanValue (); +}if (newGroupsVisible) { +this.featureGroups.put (group, new Boolean (true)); +return true; +}return false; +}, "~S,~B"); +Clazz.overrideMethod (c$, "getGroups", +function (visible) { +if (this.featureGroups != null) { +var gp = new java.util.ArrayList (); +for (var grp, $grp = this.featureGroups.keySet ().iterator (); $grp.hasNext () && ((grp = $grp.next ()) || true);) { +var state = this.featureGroups.get (grp); +if (state.booleanValue () == visible) { +gp.add (grp); +}} +return gp; +}return null; +}, "~B"); +Clazz.defineMethod (c$, "setGroupVisibility", +function (group, visible) { +this.featureGroups.put (group, new Boolean (visible)); +}, "~S,~B"); +Clazz.defineMethod (c$, "setGroupVisibility", +function (toset, visible) { +if (toset != null && toset.size () > 0 && this.featureGroups != null) { +var rdrw = false; +for (var gst, $gst = toset.iterator (); $gst.hasNext () && ((gst = $gst.next ()) || true);) { +var st = this.featureGroups.get (gst); +this.featureGroups.put (gst, new Boolean (visible)); +if (st != null) { +rdrw = rdrw || (visible != st.booleanValue ()); +}} +if (rdrw) { +}}}, "java.util.List,~B"); +Clazz.overrideMethod (c$, "getDisplayedFeatureCols", +function () { +var fcols = new java.util.Hashtable (); +if (this.getViewport ().getFeaturesDisplayed () == null) { +return fcols; +}var en = this.getViewport ().getFeaturesDisplayed ().getVisibleFeatures (); +while (en.hasNext ()) { +var col = en.next (); +fcols.put (col, this.getColour (col)); +} +return fcols; +}); +Clazz.defineMethod (c$, "getFeaturesDisplayed", +function () { +return this.av.getFeaturesDisplayed (); +}); +Clazz.overrideMethod (c$, "getDisplayedFeatureTypes", +function () { +var typ = null; +typ = this.getRenderOrder ().toArray ( new Array (0)); +var feature_disp = this.av.getFeaturesDisplayed (); +if (feature_disp != null) { +{ +for (var i = 0; i < typ.length; i++) { +if (!feature_disp.isVisible (typ[i])) { +typ[i] = null; +}} +}}return typ; +}); +Clazz.overrideMethod (c$, "getDisplayedFeatureGroups", +function () { +var gps = null; +var _gps = new java.util.ArrayList (); +var en = this.getFeatureGroups ().iterator (); +var g = 0; +var valid = false; +while (en.hasNext ()) { +var gp = en.next (); +if (this.checkGroupVisibility (gp, false)) { +valid = true; +_gps.add (gp); +}if (!valid) { +return null; +} else { +gps = new Array (_gps.size ()); +_gps.toArray (gps); +}} +return gps; +}); +}); diff --git a/bin/jalview/viewmodel/seqfeatures/FeatureRendererSettings.js b/bin/jalview/viewmodel/seqfeatures/FeatureRendererSettings.js index f166a1b..187a380 100644 --- a/bin/jalview/viewmodel/seqfeatures/FeatureRendererSettings.js +++ b/bin/jalview/viewmodel/seqfeatures/FeatureRendererSettings.js @@ -1,43 +1,43 @@ -Clazz.declarePackage ("jalview.viewmodel.seqfeatures"); -Clazz.load (null, "jalview.viewmodel.seqfeatures.FeatureRendererSettings", ["jalview.schemes.GraduatedColor", "java.util.Arrays", "java.util.concurrent.ConcurrentHashMap"], function () { -c$ = Clazz.decorateAsClass (function () { -this.renderOrder = null; -this.featureGroups = null; -this.featureColours = null; -this.transparency = 0; -this.featureOrder = null; -Clazz.instantialize (this, arguments); -}, jalview.viewmodel.seqfeatures, "FeatureRendererSettings", null, Cloneable); -Clazz.makeConstructor (c$, -function (renderOrder, featureGroups, featureColours, transparency, featureOrder) { -this.renderOrder = java.util.Arrays.copyOf (renderOrder, renderOrder.length); -this.featureGroups = new java.util.concurrent.ConcurrentHashMap (featureGroups); -this.featureColours = new java.util.concurrent.ConcurrentHashMap (featureColours); -this.transparency = transparency; -this.featureOrder = new java.util.concurrent.ConcurrentHashMap (featureOrder); -}, "~A,java.util.Hashtable,java.util.Hashtable,~N,java.util.Hashtable"); -Clazz.makeConstructor (c$, -function (fr) { -this.renderOrder = null; -this.featureGroups = new java.util.concurrent.ConcurrentHashMap (); -this.featureColours = new java.util.concurrent.ConcurrentHashMap (); -this.featureOrder = new java.util.concurrent.ConcurrentHashMap (); -if (fr.renderOrder != null) { -this.renderOrder = new Array (fr.renderOrder.length); -System.arraycopy (fr.renderOrder, 0, this.renderOrder, 0, fr.renderOrder.length); -}if (fr.featureGroups != null) { -this.featureGroups = new java.util.concurrent.ConcurrentHashMap (fr.featureGroups); -}if (fr.featureColours != null) { -this.featureColours = new java.util.concurrent.ConcurrentHashMap (fr.featureColours); -}var en = fr.featureColours.keySet ().iterator (); -while (en.hasNext ()) { -var next = en.next (); -var val = this.featureColours.get (next); -if (Clazz.instanceOf (val, jalview.schemes.GraduatedColor)) { -this.featureColours.put (next, new jalview.schemes.GraduatedColor (val)); -}} -this.transparency = fr.transparency; -if (fr.featureOrder != null) { -this.featureOrder = new java.util.concurrent.ConcurrentHashMap (fr.featureOrder); -}}, "jalview.viewmodel.seqfeatures.FeatureRendererModel"); -}); +Clazz.declarePackage ("jalview.viewmodel.seqfeatures"); +Clazz.load (null, "jalview.viewmodel.seqfeatures.FeatureRendererSettings", ["jalview.schemes.GraduatedColor", "java.util.Arrays", "java.util.concurrent.ConcurrentHashMap"], function () { +c$ = Clazz.decorateAsClass (function () { +this.renderOrder = null; +this.featureGroups = null; +this.featureColours = null; +this.transparency = 0; +this.featureOrder = null; +Clazz.instantialize (this, arguments); +}, jalview.viewmodel.seqfeatures, "FeatureRendererSettings", null, Cloneable); +Clazz.makeConstructor (c$, +function (renderOrder, featureGroups, featureColours, transparency, featureOrder) { +this.renderOrder = java.util.Arrays.copyOf (renderOrder, renderOrder.length); +this.featureGroups = new java.util.concurrent.ConcurrentHashMap (featureGroups); +this.featureColours = new java.util.concurrent.ConcurrentHashMap (featureColours); +this.transparency = transparency; +this.featureOrder = new java.util.concurrent.ConcurrentHashMap (featureOrder); +}, "~A,java.util.Hashtable,java.util.Hashtable,~N,java.util.Hashtable"); +Clazz.makeConstructor (c$, +function (fr) { +this.renderOrder = null; +this.featureGroups = new java.util.concurrent.ConcurrentHashMap (); +this.featureColours = new java.util.concurrent.ConcurrentHashMap (); +this.featureOrder = new java.util.concurrent.ConcurrentHashMap (); +if (fr.renderOrder != null) { +this.renderOrder = new Array (fr.renderOrder.length); +System.arraycopy (fr.renderOrder, 0, this.renderOrder, 0, fr.renderOrder.length); +}if (fr.featureGroups != null) { +this.featureGroups = new java.util.concurrent.ConcurrentHashMap (fr.featureGroups); +}if (fr.featureColours != null) { +this.featureColours = new java.util.concurrent.ConcurrentHashMap (fr.featureColours); +}var en = fr.featureColours.keySet ().iterator (); +while (en.hasNext ()) { +var next = en.next (); +var val = this.featureColours.get (next); +if (Clazz.instanceOf (val, jalview.schemes.GraduatedColor)) { +this.featureColours.put (next, new jalview.schemes.GraduatedColor (val)); +}} +this.transparency = fr.transparency; +if (fr.featureOrder != null) { +this.featureOrder = new java.util.concurrent.ConcurrentHashMap (fr.featureOrder); +}}, "jalview.viewmodel.seqfeatures.FeatureRendererModel"); +}); diff --git a/bin/jalview/viewmodel/seqfeatures/FeatureSettingsModel.js b/bin/jalview/viewmodel/seqfeatures/FeatureSettingsModel.js index 72b72b5..6623fc4 100644 --- a/bin/jalview/viewmodel/seqfeatures/FeatureSettingsModel.js +++ b/bin/jalview/viewmodel/seqfeatures/FeatureSettingsModel.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("jalview.viewmodel.seqfeatures"); -Clazz.load (["jalview.api.FeatureSettingsModelI"], "jalview.viewmodel.seqfeatures.FeatureSettingsModel", null, function () { -c$ = Clazz.declareType (jalview.viewmodel.seqfeatures, "FeatureSettingsModel", null, jalview.api.FeatureSettingsModelI); -}); +Clazz.declarePackage ("jalview.viewmodel.seqfeatures"); +Clazz.load (["jalview.api.FeatureSettingsModelI"], "jalview.viewmodel.seqfeatures.FeatureSettingsModel", null, function () { +c$ = Clazz.declareType (jalview.viewmodel.seqfeatures, "FeatureSettingsModel", null, jalview.api.FeatureSettingsModelI); +}); diff --git a/bin/jalview/viewmodel/seqfeatures/FeaturesDisplayed.js b/bin/jalview/viewmodel/seqfeatures/FeaturesDisplayed.js index 8f0de99..32ddafc 100644 --- a/bin/jalview/viewmodel/seqfeatures/FeaturesDisplayed.js +++ b/bin/jalview/viewmodel/seqfeatures/FeaturesDisplayed.js @@ -1,68 +1,68 @@ -Clazz.declarePackage ("jalview.viewmodel.seqfeatures"); -Clazz.load (["jalview.api.FeaturesDisplayedI", "java.util.HashSet"], "jalview.viewmodel.seqfeatures.FeaturesDisplayed", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.featuresDisplayed = null; -this.featuresRegistered = null; -Clazz.instantialize (this, arguments); -}, jalview.viewmodel.seqfeatures, "FeaturesDisplayed", null, jalview.api.FeaturesDisplayedI); -Clazz.prepareFields (c$, function () { -this.featuresDisplayed = new java.util.HashSet (); -this.featuresRegistered = new java.util.HashSet (); -}); -Clazz.makeConstructor (c$, -function (featuresDisplayed2) { -var fdisp = featuresDisplayed2.getVisibleFeatures (); -var ftype; -while (fdisp.hasNext ()) { -ftype = fdisp.next (); -this.featuresDisplayed.add (ftype); -this.featuresRegistered.add (ftype); -} -}, "jalview.api.FeaturesDisplayedI"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "getVisibleFeatures", -function () { -return this.featuresDisplayed.iterator (); -}); -Clazz.overrideMethod (c$, "isVisible", -function (featureType) { -return this.featuresDisplayed.contains (featureType); -}, "~S"); -Clazz.overrideMethod (c$, "areVisible", -function (featureTypes) { -return this.featuresDisplayed.containsAll (featureTypes); -}, "java.util.Collection"); -Clazz.overrideMethod (c$, "clear", -function () { -this.featuresDisplayed.clear (); -this.featuresRegistered.clear (); -}); -Clazz.overrideMethod (c$, "setAllVisible", -function (makeVisible) { -this.featuresDisplayed.addAll (makeVisible); -this.featuresRegistered.addAll (makeVisible); -}, "java.util.Collection"); -Clazz.overrideMethod (c$, "setAllRegisteredVisible", -function () { -this.featuresDisplayed.addAll (this.featuresRegistered); -}); -Clazz.overrideMethod (c$, "setVisible", -function (featureType) { -this.featuresDisplayed.add (featureType); -this.featuresRegistered.add (featureType); -}, "~S"); -Clazz.overrideMethod (c$, "isRegistered", -function (type) { -return this.featuresRegistered.contains (type); -}, "~S"); -Clazz.overrideMethod (c$, "getVisibleFeatureCount", -function () { -return this.featuresDisplayed.size (); -}); -Clazz.overrideMethod (c$, "getRegisterdFeaturesCount", -function () { -return this.featuresRegistered.size (); -}); -}); +Clazz.declarePackage ("jalview.viewmodel.seqfeatures"); +Clazz.load (["jalview.api.FeaturesDisplayedI", "java.util.HashSet"], "jalview.viewmodel.seqfeatures.FeaturesDisplayed", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.featuresDisplayed = null; +this.featuresRegistered = null; +Clazz.instantialize (this, arguments); +}, jalview.viewmodel.seqfeatures, "FeaturesDisplayed", null, jalview.api.FeaturesDisplayedI); +Clazz.prepareFields (c$, function () { +this.featuresDisplayed = new java.util.HashSet (); +this.featuresRegistered = new java.util.HashSet (); +}); +Clazz.makeConstructor (c$, +function (featuresDisplayed2) { +var fdisp = featuresDisplayed2.getVisibleFeatures (); +var ftype; +while (fdisp.hasNext ()) { +ftype = fdisp.next (); +this.featuresDisplayed.add (ftype); +this.featuresRegistered.add (ftype); +} +}, "jalview.api.FeaturesDisplayedI"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "getVisibleFeatures", +function () { +return this.featuresDisplayed.iterator (); +}); +Clazz.overrideMethod (c$, "isVisible", +function (featureType) { +return this.featuresDisplayed.contains (featureType); +}, "~S"); +Clazz.overrideMethod (c$, "areVisible", +function (featureTypes) { +return this.featuresDisplayed.containsAll (featureTypes); +}, "java.util.Collection"); +Clazz.overrideMethod (c$, "clear", +function () { +this.featuresDisplayed.clear (); +this.featuresRegistered.clear (); +}); +Clazz.overrideMethod (c$, "setAllVisible", +function (makeVisible) { +this.featuresDisplayed.addAll (makeVisible); +this.featuresRegistered.addAll (makeVisible); +}, "java.util.Collection"); +Clazz.overrideMethod (c$, "setAllRegisteredVisible", +function () { +this.featuresDisplayed.addAll (this.featuresRegistered); +}); +Clazz.overrideMethod (c$, "setVisible", +function (featureType) { +this.featuresDisplayed.add (featureType); +this.featuresRegistered.add (featureType); +}, "~S"); +Clazz.overrideMethod (c$, "isRegistered", +function (type) { +return this.featuresRegistered.contains (type); +}, "~S"); +Clazz.overrideMethod (c$, "getVisibleFeatureCount", +function () { +return this.featuresDisplayed.size (); +}); +Clazz.overrideMethod (c$, "getRegisterdFeaturesCount", +function () { +return this.featuresRegistered.size (); +}); +}); diff --git a/bin/jalview/viewmodel/styles/ViewStyle.js b/bin/jalview/viewmodel/styles/ViewStyle.js index f41fe5d..8ec10fa 100644 --- a/bin/jalview/viewmodel/styles/ViewStyle.js +++ b/bin/jalview/viewmodel/styles/ViewStyle.js @@ -1,457 +1,457 @@ -Clazz.declarePackage ("jalview.viewmodel.styles"); -Clazz.load (["jalview.api.ViewStyleI", "java.awt.Color"], "jalview.viewmodel.styles.ViewStyle", ["java.lang.Boolean"], function () { -c$ = Clazz.decorateAsClass (function () { -this.abovePIDThreshold = false; -this.charHeight = 0; -this.charWidth = 0; -this.idWidth = -1; -this.colourAppliesToAllGroups = false; -this.centreColumnLabels = false; -this.showdbrefs = false; -this.shownpfeats = false; -this.colourByReferenceSeq = false; -this.conservationColourSelected = false; -this.displayReferenceSeq = false; -this.increment = 0; -this.renderGaps = true; -this.rightAlignIds = false; -this.scaleAboveWrapped = false; -this.scaleLeftWrapped = true; -this.scaleRightWrapped = true; -this.seqNameItalics = false; -this.showAnnotation = true; -this.showBoxes = true; -this.showColourText = false; -this.showHiddenMarkers = true; -this.showJVSuffix = true; -this.showSeqFeaturesHeight = false; -this.showSequenceFeatures = false; -this.showText = true; -this.showUnconserved = false; -this.textColour = null; -this.textColour2 = null; -this.threshold = 0; -this.thresholdTextColour = 0; -this.upperCasebold = false; -this.fontName = null; -this.fontSize = 0; -this.scaleProteinAsCdna = true; -this.wrapAlignment = false; -this.wrappedWidth = 0; -this.fontStyle = 0; -Clazz.instantialize (this, arguments); -}, jalview.viewmodel.styles, "ViewStyle", null, jalview.api.ViewStyleI); -Clazz.prepareFields (c$, function () { -this.textColour = java.awt.Color.black; -this.textColour2 = java.awt.Color.white; -}); -Clazz.makeConstructor (c$, -function (vs) { -this.setAbovePIDThreshold (vs.getAbovePIDThreshold ()); -this.setCentreColumnLabels (vs.isCentreColumnLabels ()); -this.setCharHeight (vs.getCharHeight ()); -this.setCharWidth (vs.getCharWidth ()); -this.setColourAppliesToAllGroups (vs.getColourAppliesToAllGroups ()); -this.setColourByReferenceSeq (vs.isColourByReferenceSeq ()); -this.setColourText (vs.getColourText ()); -this.setConservationColourSelected (vs.isConservationColourSelected ()); -this.setConservationSelected (vs.getConservationSelected ()); -this.setDisplayReferenceSeq (vs.isDisplayReferenceSeq ()); -this.setFontName (vs.getFontName ()); -this.setFontSize (vs.getFontSize ()); -this.setFontStyle (vs.getFontStyle ()); -this.setIdWidth (vs.getIdWidth ()); -this.setIncrement (vs.getIncrement ()); -this.setRenderGaps (vs.isRenderGaps ()); -this.setRightAlignIds (vs.isRightAlignIds ()); -this.setScaleAboveWrapped (vs.getScaleAboveWrapped ()); -this.setScaleLeftWrapped (vs.getScaleLeftWrapped ()); -this.setScaleProteinAsCdna (vs.isScaleProteinAsCdna ()); -this.setScaleRightWrapped (vs.getScaleRightWrapped ()); -this.setSeqNameItalics (vs.isSeqNameItalics ()); -this.setShowAnnotation (vs.isShowAnnotation ()); -this.setShowBoxes (vs.getShowBoxes ()); -this.setShowColourText (vs.isShowColourText ()); -this.setShowDBRefs (vs.isShowDBRefs ()); -this.setShowHiddenMarkers (vs.getShowHiddenMarkers ()); -this.setShowJVSuffix (vs.getShowJVSuffix ()); -this.setShowNPFeats (vs.isShowNPFeats ()); -this.setShowSequenceFeaturesHeight (vs.isShowSequenceFeaturesHeight ()); -this.setShowSequenceFeatures (vs.isShowSequenceFeatures ()); -this.setShowText (vs.getShowText ()); -this.setShowUnconserved (vs.getShowUnconserved ()); -this.setTextColour (vs.getTextColour ()); -this.setTextColour2 (vs.getTextColour2 ()); -this.setThreshold (vs.getThreshold ()); -this.setThresholdTextColour (vs.getThresholdTextColour ()); -this.setUpperCasebold (vs.isUpperCasebold ()); -this.setWrapAlignment (vs.getWrapAlignment ()); -this.setWrappedWidth (vs.getWrappedWidth ()); -}, "jalview.api.ViewStyleI"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.overrideMethod (c$, "equals", -function (other) { -if (other == null || !(Clazz.instanceOf (other, jalview.viewmodel.styles.ViewStyle))) { -return false; -}var vs = other; -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 ()); -match = match && String.valueOf (this.getFontName ()).equals (String.valueOf (vs.getFontName ())); -match = match && String.valueOf (this.getTextColour ()).equals (String.valueOf (vs.getTextColour ())); -match = match && String.valueOf (this.getTextColour2 ()).equals (String.valueOf (vs.getTextColour2 ())); -return match; -}, "~O"); -Clazz.overrideMethod (c$, "hashCode", -function () { -var hash = 0; -var m = 1; -hash += m++ * Boolean.$valueOf (this.abovePIDThreshold).hashCode (); -hash += m++ * Boolean.$valueOf (this.centreColumnLabels).hashCode (); -hash += m++ * Boolean.$valueOf (this.colourAppliesToAllGroups).hashCode (); -hash += m++ * Boolean.$valueOf (this.displayReferenceSeq).hashCode (); -hash += m++ * Boolean.$valueOf (this.renderGaps).hashCode (); -hash += m++ * Boolean.$valueOf (this.rightAlignIds).hashCode (); -hash += m++ * Boolean.$valueOf (this.scaleProteinAsCdna).hashCode (); -hash += m++ * Boolean.$valueOf (this.scaleRightWrapped).hashCode (); -hash += m++ * Boolean.$valueOf (this.seqNameItalics).hashCode (); -hash += m++ * Boolean.$valueOf (this.showAnnotation).hashCode (); -hash += m++ * Boolean.$valueOf (this.showBoxes).hashCode (); -hash += m++ * Boolean.$valueOf (this.showdbrefs).hashCode (); -hash += m++ * Boolean.$valueOf (this.showJVSuffix).hashCode (); -hash += m++ * Boolean.$valueOf (this.showSequenceFeatures).hashCode (); -hash += m++ * Boolean.$valueOf (this.showUnconserved).hashCode (); -hash += m++ * Boolean.$valueOf (this.wrapAlignment).hashCode (); -hash += m++ * this.charHeight; -hash += m++ * this.charWidth; -hash += m++ * this.fontSize; -hash += m++ * this.fontStyle; -hash += m++ * this.idWidth; -hash += String.valueOf (this.fontName).hashCode (); -return hash; -}); -Clazz.defineMethod (c$, "isUpperCasebold", -function () { -return this.upperCasebold; -}); -Clazz.overrideMethod (c$, "setUpperCasebold", -function (upperCasebold) { -this.upperCasebold = upperCasebold; -}, "~B"); -Clazz.defineMethod (c$, "getAbovePIDThreshold", -function () { -return this.abovePIDThreshold; -}); -Clazz.defineMethod (c$, "getCharHeight", -function () { -return this.charHeight; -}); -Clazz.defineMethod (c$, "getCharWidth", -function () { -return this.charWidth; -}); -Clazz.defineMethod (c$, "getColourAppliesToAllGroups", -function () { -return this.colourAppliesToAllGroups; -}); -Clazz.defineMethod (c$, "getColourText", -function () { -return this.showColourText; -}); -Clazz.defineMethod (c$, "getConservationSelected", -function () { -return this.conservationColourSelected; -}); -Clazz.defineMethod (c$, "getIncrement", -function () { -return this.increment; -}); -Clazz.defineMethod (c$, "getScaleAboveWrapped", -function () { -return this.scaleAboveWrapped; -}); -Clazz.defineMethod (c$, "getScaleLeftWrapped", -function () { -return this.scaleLeftWrapped; -}); -Clazz.defineMethod (c$, "getScaleRightWrapped", -function () { -return this.scaleRightWrapped; -}); -Clazz.defineMethod (c$, "getShowBoxes", -function () { -return this.showBoxes; -}); -Clazz.defineMethod (c$, "getShowHiddenMarkers", -function () { -return this.showHiddenMarkers; -}); -Clazz.defineMethod (c$, "getShowJVSuffix", -function () { -return this.showJVSuffix; -}); -Clazz.defineMethod (c$, "getShowText", -function () { -return this.showText; -}); -Clazz.defineMethod (c$, "getShowUnconserved", -function () { -return this.showUnconserved; -}); -Clazz.defineMethod (c$, "getTextColour", -function () { -return this.textColour; -}); -Clazz.defineMethod (c$, "getTextColour2", -function () { -return this.textColour2; -}); -Clazz.defineMethod (c$, "getThreshold", -function () { -return this.threshold; -}); -Clazz.defineMethod (c$, "getThresholdTextColour", -function () { -return this.thresholdTextColour; -}); -Clazz.defineMethod (c$, "getWrapAlignment", -function () { -return this.wrapAlignment; -}); -Clazz.defineMethod (c$, "getWrappedWidth", -function () { -return this.wrappedWidth; -}); -Clazz.defineMethod (c$, "isColourByReferenceSeq", -function () { -return this.colourByReferenceSeq; -}); -Clazz.defineMethod (c$, "isConservationColourSelected", -function () { -return this.conservationColourSelected; -}); -Clazz.defineMethod (c$, "isDisplayReferenceSeq", -function () { -return this.displayReferenceSeq; -}); -Clazz.defineMethod (c$, "isRenderGaps", -function () { -return this.renderGaps; -}); -Clazz.defineMethod (c$, "isRightAlignIds", -function () { -return this.rightAlignIds; -}); -Clazz.defineMethod (c$, "isSeqNameItalics", -function () { -return this.seqNameItalics; -}); -Clazz.defineMethod (c$, "isShowAnnotation", -function () { -return this.showAnnotation; -}); -Clazz.defineMethod (c$, "isShowColourText", -function () { -return this.showColourText; -}); -Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight", -function () { -return this.showSeqFeaturesHeight; -}); -Clazz.defineMethod (c$, "isShowSequenceFeatures", -function () { -return this.showSequenceFeatures; -}); -Clazz.overrideMethod (c$, "setAbovePIDThreshold", -function (b) { -this.abovePIDThreshold = b; -}, "~B"); -Clazz.overrideMethod (c$, "setCharHeight", -function (h) { -this.charHeight = h; -}, "~N"); -Clazz.overrideMethod (c$, "setCharWidth", -function (w) { -this.charWidth = w; -}, "~N"); -Clazz.overrideMethod (c$, "setColourAppliesToAllGroups", -function (b) { -this.colourAppliesToAllGroups = b; -}, "~B"); -Clazz.overrideMethod (c$, "setColourByReferenceSeq", -function (colourByReferenceSeq) { -this.colourByReferenceSeq = colourByReferenceSeq; -}, "~B"); -Clazz.overrideMethod (c$, "setColourText", -function (state) { -this.showColourText = state; -}, "~B"); -Clazz.overrideMethod (c$, "setConservationColourSelected", -function (conservationColourSelected) { -this.conservationColourSelected = conservationColourSelected; -}, "~B"); -Clazz.overrideMethod (c$, "setConservationSelected", -function (b) { -this.conservationColourSelected = b; -}, "~B"); -Clazz.overrideMethod (c$, "setDisplayReferenceSeq", -function (displayReferenceSeq) { -this.displayReferenceSeq = displayReferenceSeq; -}, "~B"); -Clazz.overrideMethod (c$, "setIncrement", -function (inc) { -this.increment = inc; -}, "~N"); -Clazz.overrideMethod (c$, "setRenderGaps", -function (state) { -this.renderGaps = state; -}, "~B"); -Clazz.overrideMethod (c$, "setRightAlignIds", -function (rightAlignIds) { -this.rightAlignIds = rightAlignIds; -}, "~B"); -Clazz.overrideMethod (c$, "setScaleAboveWrapped", -function (b) { -this.scaleAboveWrapped = b; -}, "~B"); -Clazz.overrideMethod (c$, "setScaleLeftWrapped", -function (b) { -this.scaleLeftWrapped = b; -}, "~B"); -Clazz.overrideMethod (c$, "setScaleRightWrapped", -function (b) { -this.scaleRightWrapped = b; -}, "~B"); -Clazz.overrideMethod (c$, "setSeqNameItalics", -function (italics) { -this.seqNameItalics = italics; -}, "~B"); -Clazz.overrideMethod (c$, "setShowAnnotation", -function (b) { -this.showAnnotation = b; -}, "~B"); -Clazz.overrideMethod (c$, "setShowBoxes", -function (state) { -this.showBoxes = state; -}, "~B"); -Clazz.overrideMethod (c$, "setShowColourText", -function (showColourText) { -this.showColourText = showColourText; -}, "~B"); -Clazz.overrideMethod (c$, "setShowHiddenMarkers", -function (show) { -this.showHiddenMarkers = show; -}, "~B"); -Clazz.overrideMethod (c$, "setShowJVSuffix", -function (b) { -this.showJVSuffix = b; -}, "~B"); -Clazz.overrideMethod (c$, "setShowSequenceFeaturesHeight", -function (selected) { -this.showSeqFeaturesHeight = selected; -}, "~B"); -Clazz.overrideMethod (c$, "setShowSequenceFeatures", -function (b) { -this.showSequenceFeatures = b; -}, "~B"); -Clazz.overrideMethod (c$, "setShowText", -function (state) { -this.showText = state; -}, "~B"); -Clazz.overrideMethod (c$, "setShowUnconserved", -function (showunconserved) { -this.showUnconserved = showunconserved; -}, "~B"); -Clazz.overrideMethod (c$, "setTextColour", -function (textColour) { -this.textColour = textColour; -}, "java.awt.Color"); -Clazz.overrideMethod (c$, "setTextColour2", -function (textColour2) { -this.textColour2 = textColour2; -}, "java.awt.Color"); -Clazz.overrideMethod (c$, "setThreshold", -function (thresh) { -this.threshold = thresh; -}, "~N"); -Clazz.overrideMethod (c$, "setThresholdTextColour", -function (thresholdTextColour) { -this.thresholdTextColour = thresholdTextColour; -}, "~N"); -Clazz.overrideMethod (c$, "setWrapAlignment", -function (state) { -this.wrapAlignment = state; -}, "~B"); -Clazz.overrideMethod (c$, "setWrappedWidth", -function (w) { -this.wrappedWidth = w; -}, "~N"); -Clazz.overrideMethod (c$, "sameStyle", -function (that) { -return this.equals (that); -}, "jalview.api.ViewStyleI"); -Clazz.defineMethod (c$, "getFontName", -function () { -return this.fontName; -}); -Clazz.defineMethod (c$, "getFontSize", -function () { -return this.fontSize; -}); -Clazz.defineMethod (c$, "getFontStyle", -function () { -return this.fontStyle; -}); -Clazz.overrideMethod (c$, "setFontName", -function (name) { -this.fontName = name; -}, "~S"); -Clazz.overrideMethod (c$, "setFontSize", -function (size) { -this.fontSize = size; -}, "~N"); -Clazz.overrideMethod (c$, "setFontStyle", -function (style) { -this.fontStyle = style; -}, "~N"); -Clazz.defineMethod (c$, "getIdWidth", -function () { -return this.idWidth; -}); -Clazz.overrideMethod (c$, "setIdWidth", -function (idWidth) { -this.idWidth = idWidth; -}, "~N"); -Clazz.defineMethod (c$, "isCentreColumnLabels", -function () { -return this.centreColumnLabels; -}); -Clazz.overrideMethod (c$, "setCentreColumnLabels", -function (centreColumnLabels) { -this.centreColumnLabels = centreColumnLabels; -}, "~B"); -Clazz.defineMethod (c$, "isShowDBRefs", -function () { -return this.showdbrefs; -}); -Clazz.overrideMethod (c$, "setShowDBRefs", -function (showdbrefs) { -this.showdbrefs = showdbrefs; -}, "~B"); -Clazz.defineMethod (c$, "isShowNPFeats", -function () { -return this.shownpfeats; -}); -Clazz.overrideMethod (c$, "setShowNPFeats", -function (shownpfeats) { -this.shownpfeats = shownpfeats; -}, "~B"); -Clazz.defineMethod (c$, "isScaleProteinAsCdna", -function () { -return this.scaleProteinAsCdna; -}); -Clazz.overrideMethod (c$, "setScaleProteinAsCdna", -function (b) { -this.scaleProteinAsCdna = b; -}, "~B"); -}); +Clazz.declarePackage ("jalview.viewmodel.styles"); +Clazz.load (["jalview.api.ViewStyleI", "java.awt.Color"], "jalview.viewmodel.styles.ViewStyle", ["java.lang.Boolean"], function () { +c$ = Clazz.decorateAsClass (function () { +this.abovePIDThreshold = false; +this.charHeight = 0; +this.charWidth = 0; +this.idWidth = -1; +this.colourAppliesToAllGroups = false; +this.centreColumnLabels = false; +this.showdbrefs = false; +this.shownpfeats = false; +this.colourByReferenceSeq = false; +this.conservationColourSelected = false; +this.displayReferenceSeq = false; +this.increment = 0; +this.renderGaps = true; +this.rightAlignIds = false; +this.scaleAboveWrapped = false; +this.scaleLeftWrapped = true; +this.scaleRightWrapped = true; +this.seqNameItalics = false; +this.showAnnotation = true; +this.showBoxes = true; +this.showColourText = false; +this.showHiddenMarkers = true; +this.showJVSuffix = true; +this.showSeqFeaturesHeight = false; +this.showSequenceFeatures = false; +this.showText = true; +this.showUnconserved = false; +this.textColour = null; +this.textColour2 = null; +this.threshold = 0; +this.thresholdTextColour = 0; +this.upperCasebold = false; +this.fontName = null; +this.fontSize = 0; +this.scaleProteinAsCdna = true; +this.wrapAlignment = false; +this.wrappedWidth = 0; +this.fontStyle = 0; +Clazz.instantialize (this, arguments); +}, jalview.viewmodel.styles, "ViewStyle", null, jalview.api.ViewStyleI); +Clazz.prepareFields (c$, function () { +this.textColour = java.awt.Color.black; +this.textColour2 = java.awt.Color.white; +}); +Clazz.makeConstructor (c$, +function (vs) { +this.setAbovePIDThreshold (vs.getAbovePIDThreshold ()); +this.setCentreColumnLabels (vs.isCentreColumnLabels ()); +this.setCharHeight (vs.getCharHeight ()); +this.setCharWidth (vs.getCharWidth ()); +this.setColourAppliesToAllGroups (vs.getColourAppliesToAllGroups ()); +this.setColourByReferenceSeq (vs.isColourByReferenceSeq ()); +this.setColourText (vs.getColourText ()); +this.setConservationColourSelected (vs.isConservationColourSelected ()); +this.setConservationSelected (vs.getConservationSelected ()); +this.setDisplayReferenceSeq (vs.isDisplayReferenceSeq ()); +this.setFontName (vs.getFontName ()); +this.setFontSize (vs.getFontSize ()); +this.setFontStyle (vs.getFontStyle ()); +this.setIdWidth (vs.getIdWidth ()); +this.setIncrement (vs.getIncrement ()); +this.setRenderGaps (vs.isRenderGaps ()); +this.setRightAlignIds (vs.isRightAlignIds ()); +this.setScaleAboveWrapped (vs.getScaleAboveWrapped ()); +this.setScaleLeftWrapped (vs.getScaleLeftWrapped ()); +this.setScaleProteinAsCdna (vs.isScaleProteinAsCdna ()); +this.setScaleRightWrapped (vs.getScaleRightWrapped ()); +this.setSeqNameItalics (vs.isSeqNameItalics ()); +this.setShowAnnotation (vs.isShowAnnotation ()); +this.setShowBoxes (vs.getShowBoxes ()); +this.setShowColourText (vs.isShowColourText ()); +this.setShowDBRefs (vs.isShowDBRefs ()); +this.setShowHiddenMarkers (vs.getShowHiddenMarkers ()); +this.setShowJVSuffix (vs.getShowJVSuffix ()); +this.setShowNPFeats (vs.isShowNPFeats ()); +this.setShowSequenceFeaturesHeight (vs.isShowSequenceFeaturesHeight ()); +this.setShowSequenceFeatures (vs.isShowSequenceFeatures ()); +this.setShowText (vs.getShowText ()); +this.setShowUnconserved (vs.getShowUnconserved ()); +this.setTextColour (vs.getTextColour ()); +this.setTextColour2 (vs.getTextColour2 ()); +this.setThreshold (vs.getThreshold ()); +this.setThresholdTextColour (vs.getThresholdTextColour ()); +this.setUpperCasebold (vs.isUpperCasebold ()); +this.setWrapAlignment (vs.getWrapAlignment ()); +this.setWrappedWidth (vs.getWrappedWidth ()); +}, "jalview.api.ViewStyleI"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.overrideMethod (c$, "equals", +function (other) { +if (other == null || !(Clazz.instanceOf (other, jalview.viewmodel.styles.ViewStyle))) { +return false; +}var vs = other; +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 ()); +match = match && String.valueOf (this.getFontName ()).equals (String.valueOf (vs.getFontName ())); +match = match && String.valueOf (this.getTextColour ()).equals (String.valueOf (vs.getTextColour ())); +match = match && String.valueOf (this.getTextColour2 ()).equals (String.valueOf (vs.getTextColour2 ())); +return match; +}, "~O"); +Clazz.overrideMethod (c$, "hashCode", +function () { +var hash = 0; +var m = 1; +hash += m++ * Boolean.$valueOf (this.abovePIDThreshold).hashCode (); +hash += m++ * Boolean.$valueOf (this.centreColumnLabels).hashCode (); +hash += m++ * Boolean.$valueOf (this.colourAppliesToAllGroups).hashCode (); +hash += m++ * Boolean.$valueOf (this.displayReferenceSeq).hashCode (); +hash += m++ * Boolean.$valueOf (this.renderGaps).hashCode (); +hash += m++ * Boolean.$valueOf (this.rightAlignIds).hashCode (); +hash += m++ * Boolean.$valueOf (this.scaleProteinAsCdna).hashCode (); +hash += m++ * Boolean.$valueOf (this.scaleRightWrapped).hashCode (); +hash += m++ * Boolean.$valueOf (this.seqNameItalics).hashCode (); +hash += m++ * Boolean.$valueOf (this.showAnnotation).hashCode (); +hash += m++ * Boolean.$valueOf (this.showBoxes).hashCode (); +hash += m++ * Boolean.$valueOf (this.showdbrefs).hashCode (); +hash += m++ * Boolean.$valueOf (this.showJVSuffix).hashCode (); +hash += m++ * Boolean.$valueOf (this.showSequenceFeatures).hashCode (); +hash += m++ * Boolean.$valueOf (this.showUnconserved).hashCode (); +hash += m++ * Boolean.$valueOf (this.wrapAlignment).hashCode (); +hash += m++ * this.charHeight; +hash += m++ * this.charWidth; +hash += m++ * this.fontSize; +hash += m++ * this.fontStyle; +hash += m++ * this.idWidth; +hash += String.valueOf (this.fontName).hashCode (); +return hash; +}); +Clazz.defineMethod (c$, "isUpperCasebold", +function () { +return this.upperCasebold; +}); +Clazz.overrideMethod (c$, "setUpperCasebold", +function (upperCasebold) { +this.upperCasebold = upperCasebold; +}, "~B"); +Clazz.defineMethod (c$, "getAbovePIDThreshold", +function () { +return this.abovePIDThreshold; +}); +Clazz.defineMethod (c$, "getCharHeight", +function () { +return this.charHeight; +}); +Clazz.defineMethod (c$, "getCharWidth", +function () { +return this.charWidth; +}); +Clazz.defineMethod (c$, "getColourAppliesToAllGroups", +function () { +return this.colourAppliesToAllGroups; +}); +Clazz.defineMethod (c$, "getColourText", +function () { +return this.showColourText; +}); +Clazz.defineMethod (c$, "getConservationSelected", +function () { +return this.conservationColourSelected; +}); +Clazz.defineMethod (c$, "getIncrement", +function () { +return this.increment; +}); +Clazz.defineMethod (c$, "getScaleAboveWrapped", +function () { +return this.scaleAboveWrapped; +}); +Clazz.defineMethod (c$, "getScaleLeftWrapped", +function () { +return this.scaleLeftWrapped; +}); +Clazz.defineMethod (c$, "getScaleRightWrapped", +function () { +return this.scaleRightWrapped; +}); +Clazz.defineMethod (c$, "getShowBoxes", +function () { +return this.showBoxes; +}); +Clazz.defineMethod (c$, "getShowHiddenMarkers", +function () { +return this.showHiddenMarkers; +}); +Clazz.defineMethod (c$, "getShowJVSuffix", +function () { +return this.showJVSuffix; +}); +Clazz.defineMethod (c$, "getShowText", +function () { +return this.showText; +}); +Clazz.defineMethod (c$, "getShowUnconserved", +function () { +return this.showUnconserved; +}); +Clazz.defineMethod (c$, "getTextColour", +function () { +return this.textColour; +}); +Clazz.defineMethod (c$, "getTextColour2", +function () { +return this.textColour2; +}); +Clazz.defineMethod (c$, "getThreshold", +function () { +return this.threshold; +}); +Clazz.defineMethod (c$, "getThresholdTextColour", +function () { +return this.thresholdTextColour; +}); +Clazz.defineMethod (c$, "getWrapAlignment", +function () { +return this.wrapAlignment; +}); +Clazz.defineMethod (c$, "getWrappedWidth", +function () { +return this.wrappedWidth; +}); +Clazz.defineMethod (c$, "isColourByReferenceSeq", +function () { +return this.colourByReferenceSeq; +}); +Clazz.defineMethod (c$, "isConservationColourSelected", +function () { +return this.conservationColourSelected; +}); +Clazz.defineMethod (c$, "isDisplayReferenceSeq", +function () { +return this.displayReferenceSeq; +}); +Clazz.defineMethod (c$, "isRenderGaps", +function () { +return this.renderGaps; +}); +Clazz.defineMethod (c$, "isRightAlignIds", +function () { +return this.rightAlignIds; +}); +Clazz.defineMethod (c$, "isSeqNameItalics", +function () { +return this.seqNameItalics; +}); +Clazz.defineMethod (c$, "isShowAnnotation", +function () { +return this.showAnnotation; +}); +Clazz.defineMethod (c$, "isShowColourText", +function () { +return this.showColourText; +}); +Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight", +function () { +return this.showSeqFeaturesHeight; +}); +Clazz.defineMethod (c$, "isShowSequenceFeatures", +function () { +return this.showSequenceFeatures; +}); +Clazz.overrideMethod (c$, "setAbovePIDThreshold", +function (b) { +this.abovePIDThreshold = b; +}, "~B"); +Clazz.overrideMethod (c$, "setCharHeight", +function (h) { +this.charHeight = h; +}, "~N"); +Clazz.overrideMethod (c$, "setCharWidth", +function (w) { +this.charWidth = w; +}, "~N"); +Clazz.overrideMethod (c$, "setColourAppliesToAllGroups", +function (b) { +this.colourAppliesToAllGroups = b; +}, "~B"); +Clazz.overrideMethod (c$, "setColourByReferenceSeq", +function (colourByReferenceSeq) { +this.colourByReferenceSeq = colourByReferenceSeq; +}, "~B"); +Clazz.overrideMethod (c$, "setColourText", +function (state) { +this.showColourText = state; +}, "~B"); +Clazz.overrideMethod (c$, "setConservationColourSelected", +function (conservationColourSelected) { +this.conservationColourSelected = conservationColourSelected; +}, "~B"); +Clazz.overrideMethod (c$, "setConservationSelected", +function (b) { +this.conservationColourSelected = b; +}, "~B"); +Clazz.overrideMethod (c$, "setDisplayReferenceSeq", +function (displayReferenceSeq) { +this.displayReferenceSeq = displayReferenceSeq; +}, "~B"); +Clazz.overrideMethod (c$, "setIncrement", +function (inc) { +this.increment = inc; +}, "~N"); +Clazz.overrideMethod (c$, "setRenderGaps", +function (state) { +this.renderGaps = state; +}, "~B"); +Clazz.overrideMethod (c$, "setRightAlignIds", +function (rightAlignIds) { +this.rightAlignIds = rightAlignIds; +}, "~B"); +Clazz.overrideMethod (c$, "setScaleAboveWrapped", +function (b) { +this.scaleAboveWrapped = b; +}, "~B"); +Clazz.overrideMethod (c$, "setScaleLeftWrapped", +function (b) { +this.scaleLeftWrapped = b; +}, "~B"); +Clazz.overrideMethod (c$, "setScaleRightWrapped", +function (b) { +this.scaleRightWrapped = b; +}, "~B"); +Clazz.overrideMethod (c$, "setSeqNameItalics", +function (italics) { +this.seqNameItalics = italics; +}, "~B"); +Clazz.overrideMethod (c$, "setShowAnnotation", +function (b) { +this.showAnnotation = b; +}, "~B"); +Clazz.overrideMethod (c$, "setShowBoxes", +function (state) { +this.showBoxes = state; +}, "~B"); +Clazz.overrideMethod (c$, "setShowColourText", +function (showColourText) { +this.showColourText = showColourText; +}, "~B"); +Clazz.overrideMethod (c$, "setShowHiddenMarkers", +function (show) { +this.showHiddenMarkers = show; +}, "~B"); +Clazz.overrideMethod (c$, "setShowJVSuffix", +function (b) { +this.showJVSuffix = b; +}, "~B"); +Clazz.overrideMethod (c$, "setShowSequenceFeaturesHeight", +function (selected) { +this.showSeqFeaturesHeight = selected; +}, "~B"); +Clazz.overrideMethod (c$, "setShowSequenceFeatures", +function (b) { +this.showSequenceFeatures = b; +}, "~B"); +Clazz.overrideMethod (c$, "setShowText", +function (state) { +this.showText = state; +}, "~B"); +Clazz.overrideMethod (c$, "setShowUnconserved", +function (showunconserved) { +this.showUnconserved = showunconserved; +}, "~B"); +Clazz.overrideMethod (c$, "setTextColour", +function (textColour) { +this.textColour = textColour; +}, "java.awt.Color"); +Clazz.overrideMethod (c$, "setTextColour2", +function (textColour2) { +this.textColour2 = textColour2; +}, "java.awt.Color"); +Clazz.overrideMethod (c$, "setThreshold", +function (thresh) { +this.threshold = thresh; +}, "~N"); +Clazz.overrideMethod (c$, "setThresholdTextColour", +function (thresholdTextColour) { +this.thresholdTextColour = thresholdTextColour; +}, "~N"); +Clazz.overrideMethod (c$, "setWrapAlignment", +function (state) { +this.wrapAlignment = state; +}, "~B"); +Clazz.overrideMethod (c$, "setWrappedWidth", +function (w) { +this.wrappedWidth = w; +}, "~N"); +Clazz.overrideMethod (c$, "sameStyle", +function (that) { +return this.equals (that); +}, "jalview.api.ViewStyleI"); +Clazz.defineMethod (c$, "getFontName", +function () { +return this.fontName; +}); +Clazz.defineMethod (c$, "getFontSize", +function () { +return this.fontSize; +}); +Clazz.defineMethod (c$, "getFontStyle", +function () { +return this.fontStyle; +}); +Clazz.overrideMethod (c$, "setFontName", +function (name) { +this.fontName = name; +}, "~S"); +Clazz.overrideMethod (c$, "setFontSize", +function (size) { +this.fontSize = size; +}, "~N"); +Clazz.overrideMethod (c$, "setFontStyle", +function (style) { +this.fontStyle = style; +}, "~N"); +Clazz.defineMethod (c$, "getIdWidth", +function () { +return this.idWidth; +}); +Clazz.overrideMethod (c$, "setIdWidth", +function (idWidth) { +this.idWidth = idWidth; +}, "~N"); +Clazz.defineMethod (c$, "isCentreColumnLabels", +function () { +return this.centreColumnLabels; +}); +Clazz.overrideMethod (c$, "setCentreColumnLabels", +function (centreColumnLabels) { +this.centreColumnLabels = centreColumnLabels; +}, "~B"); +Clazz.defineMethod (c$, "isShowDBRefs", +function () { +return this.showdbrefs; +}); +Clazz.overrideMethod (c$, "setShowDBRefs", +function (showdbrefs) { +this.showdbrefs = showdbrefs; +}, "~B"); +Clazz.defineMethod (c$, "isShowNPFeats", +function () { +return this.shownpfeats; +}); +Clazz.overrideMethod (c$, "setShowNPFeats", +function (shownpfeats) { +this.shownpfeats = shownpfeats; +}, "~B"); +Clazz.defineMethod (c$, "isScaleProteinAsCdna", +function () { +return this.scaleProteinAsCdna; +}); +Clazz.overrideMethod (c$, "setScaleProteinAsCdna", +function (b) { +this.scaleProteinAsCdna = b; +}, "~B"); +}); diff --git a/bin/jalview/workers/AlignCalcManager.js b/bin/jalview/workers/AlignCalcManager.js index 7f25a9c..39105f8 100644 --- a/bin/jalview/workers/AlignCalcManager.js +++ b/bin/jalview/workers/AlignCalcManager.js @@ -1,192 +1,192 @@ -Clazz.declarePackage ("jalview.workers"); -Clazz.load (["jalview.api.AlignCalcManagerI", "java.util.ArrayList", "$.Collections", "$.HashSet", "$.Hashtable"], "jalview.workers.AlignCalcManager", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.restartable = null; -this.blackList = null; -this.inProgress = null; -this.updating = null; -this.canUpdate = null; -Clazz.instantialize (this, arguments); -}, jalview.workers, "AlignCalcManager", null, jalview.api.AlignCalcManagerI); -Clazz.prepareFields (c$, function () { -this.restartable = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); -this.blackList = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); -this.inProgress = java.util.Collections.synchronizedMap ( new java.util.Hashtable ()); -this.updating = java.util.Collections.synchronizedMap ( new java.util.Hashtable ()); -this.canUpdate = new java.util.HashSet (); -}); -Clazz.overrideMethod (c$, "notifyStart", -function (worker) { -{ -var upd = this.updating.get (worker.getClass ()); -if (upd == null) { -this.updating.put (worker.getClass (), upd = java.util.Collections.synchronizedList ( new java.util.ArrayList ())); -}{ -upd.add (worker); -}}}, "jalview.api.AlignCalcWorkerI"); -Clazz.overrideMethod (c$, "alreadyDoing", -function (worker) { -{ -return this.inProgress.containsKey (worker.getClass ()); -}}, "jalview.api.AlignCalcWorkerI"); -Clazz.overrideMethod (c$, "isPending", -function (workingClass) { -var upd; -{ -upd = this.updating.get (workingClass.getClass ()); -if (upd == null) { -return false; -}{ -if (upd.size () > 1) { -return true; -}}return false; -}}, "jalview.api.AlignCalcWorkerI"); -Clazz.defineMethod (c$, "numberLive", -function (worker) { -{ -var upd = this.updating.get (worker.getClass ()); -if (upd == null) { -return 0; -};return upd.size (); -}}, "jalview.api.AlignCalcWorkerI"); -Clazz.overrideMethod (c$, "notifyWorking", -function (worker) { -{ -if (this.inProgress.get (worker.getClass ()) != null) { -if (false) { -System.err.println ("Warning: Multiple workers are running of type " + worker.getClass ()); -}return false; -}this.inProgress.put (worker.getClass (), worker); -}return true; -}, "jalview.api.AlignCalcWorkerI"); -Clazz.overrideMethod (c$, "workerComplete", -function (worker) { -{ -this.inProgress.remove (worker.getClass ()); -var upd = this.updating.get (worker.getClass ()); -if (upd != null) { -{ -upd.remove (worker); -}this.canUpdate.add (worker); -}}}, "jalview.api.AlignCalcWorkerI"); -Clazz.overrideMethod (c$, "workerCannotRun", -function (worker) { -{ -this.blackList.add (worker.getClass ()); -}}, "jalview.api.AlignCalcWorkerI"); -Clazz.defineMethod (c$, "isBlackListed", -function (workerType) { -{ -return this.blackList.contains (workerType); -}}, "Class"); -Clazz.overrideMethod (c$, "startWorker", -function (worker) { -var workerAsThread = worker; -if (workerAsThread.isAlive ()) { -workerAsThread.interrupt (); -worker = worker.getNewWorker (); -}worker.setName (worker.getClass ().getName ()); -worker.start (); -}, "jalview.api.AlignCalcWorkerI"); -Clazz.defineMethod (c$, "isWorking", -function (worker) { -{ -return worker != null && this.inProgress.get (worker.getClass ()) === worker; -}}, "jalview.api.AlignCalcWorkerI"); -Clazz.defineMethod (c$, "isWorking", -function () { -{ -return this.inProgress.size () > 0; -}}); -Clazz.overrideMethod (c$, "registerWorker", -function (worker) { -{ -if (!this.restartable.contains (worker)) { -this.restartable.add (worker); -}this.startWorker (worker); -}}, "jalview.api.AlignCalcWorkerI"); -Clazz.overrideMethod (c$, "restartWorkers", -function () { -{ -for (var worker, $worker = this.restartable.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { -this.startWorker (worker); -} -}}); -Clazz.overrideMethod (c$, "workingInvolvedWith", -function (alignmentAnnotation) { -{ -for (var worker, $worker = this.inProgress.values ().iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { -if (worker.involves (alignmentAnnotation)) { -return true; -}} -}{ -for (var workers, $workers = this.updating.values ().iterator (); $workers.hasNext () && ((workers = $workers.next ()) || true);) { -for (var worker, $worker = workers.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { -if (worker.involves (alignmentAnnotation)) { -return true; -}} -} -}return false; -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.overrideMethod (c$, "updateAnnotationFor", -function (workerClass) { -var workers; -{ -workers = this.canUpdate.toArray ( new Array (0)); -}for (var worker, $worker = 0, $$worker = workers; $worker < $$worker.length && ((worker = $$worker[$worker]) || true); $worker++) { -if (workerClass.equals (worker.getClass ())) { -worker.updateAnnotation (); -}} -}, "Class"); -Clazz.overrideMethod (c$, "getRegisteredWorkersOfClass", -function (workerClass) { -var workingClass = new java.util.ArrayList (); -var workers; -{ -workers = this.canUpdate.toArray ( new Array (this.canUpdate.size ())); -}for (var worker, $worker = 0, $$worker = workers; $worker < $$worker.length && ((worker = $$worker[$worker]) || true); $worker++) { -if (workerClass.equals (worker.getClass ())) { -workingClass.add (worker); -}} -return (workingClass.size () == 0) ? null : workingClass; -}, "Class"); -Clazz.overrideMethod (c$, "startRegisteredWorkersOfClass", -function (workerClass) { -var workers = this.getRegisteredWorkersOfClass (workerClass); -if (workers == null) { -return false; -}for (var worker, $worker = workers.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { -if (!this.isPending (worker)) { -this.startWorker (worker); -} else { -System.err.println ("Pending exists for " + workerClass); -}} -return true; -}, "Class"); -Clazz.overrideMethod (c$, "workerMayRun", -function (worker) { -{ -if (this.blackList.contains (worker.getClass ())) { -this.blackList.remove (worker.getClass ()); -}}}, "jalview.api.AlignCalcWorkerI"); -Clazz.overrideMethod (c$, "removeRegisteredWorkersOfClass", -function (typeToRemove) { -var workers = this.getRegisteredWorkersOfClass (typeToRemove); -var removable = new java.util.ArrayList (); -var toremovannot = new java.util.HashSet (); -{ -for (var worker, $worker = this.restartable.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { -if (typeToRemove.equals (worker.getClass ())) { -removable.add (worker); -toremovannot.add (worker); -}} -this.restartable.removeAll (removable); -}{ -for (var worker, $worker = this.canUpdate.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { -if (typeToRemove.equals (worker.getClass ())) { -removable.add (worker); -toremovannot.add (worker); -}} -this.canUpdate.removeAll (removable); -}}, "Class"); -}); +Clazz.declarePackage ("jalview.workers"); +Clazz.load (["jalview.api.AlignCalcManagerI", "java.util.ArrayList", "$.Collections", "$.HashSet", "$.Hashtable"], "jalview.workers.AlignCalcManager", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.restartable = null; +this.blackList = null; +this.inProgress = null; +this.updating = null; +this.canUpdate = null; +Clazz.instantialize (this, arguments); +}, jalview.workers, "AlignCalcManager", null, jalview.api.AlignCalcManagerI); +Clazz.prepareFields (c$, function () { +this.restartable = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); +this.blackList = java.util.Collections.synchronizedList ( new java.util.ArrayList ()); +this.inProgress = java.util.Collections.synchronizedMap ( new java.util.Hashtable ()); +this.updating = java.util.Collections.synchronizedMap ( new java.util.Hashtable ()); +this.canUpdate = new java.util.HashSet (); +}); +Clazz.overrideMethod (c$, "notifyStart", +function (worker) { +{ +var upd = this.updating.get (worker.getClass ()); +if (upd == null) { +this.updating.put (worker.getClass (), upd = java.util.Collections.synchronizedList ( new java.util.ArrayList ())); +}{ +upd.add (worker); +}}}, "jalview.api.AlignCalcWorkerI"); +Clazz.overrideMethod (c$, "alreadyDoing", +function (worker) { +{ +return this.inProgress.containsKey (worker.getClass ()); +}}, "jalview.api.AlignCalcWorkerI"); +Clazz.overrideMethod (c$, "isPending", +function (workingClass) { +var upd; +{ +upd = this.updating.get (workingClass.getClass ()); +if (upd == null) { +return false; +}{ +if (upd.size () > 1) { +return true; +}}return false; +}}, "jalview.api.AlignCalcWorkerI"); +Clazz.defineMethod (c$, "numberLive", +function (worker) { +{ +var upd = this.updating.get (worker.getClass ()); +if (upd == null) { +return 0; +};return upd.size (); +}}, "jalview.api.AlignCalcWorkerI"); +Clazz.overrideMethod (c$, "notifyWorking", +function (worker) { +{ +if (this.inProgress.get (worker.getClass ()) != null) { +if (false) { +System.err.println ("Warning: Multiple workers are running of type " + worker.getClass ()); +}return false; +}this.inProgress.put (worker.getClass (), worker); +}return true; +}, "jalview.api.AlignCalcWorkerI"); +Clazz.overrideMethod (c$, "workerComplete", +function (worker) { +{ +this.inProgress.remove (worker.getClass ()); +var upd = this.updating.get (worker.getClass ()); +if (upd != null) { +{ +upd.remove (worker); +}this.canUpdate.add (worker); +}}}, "jalview.api.AlignCalcWorkerI"); +Clazz.overrideMethod (c$, "workerCannotRun", +function (worker) { +{ +this.blackList.add (worker.getClass ()); +}}, "jalview.api.AlignCalcWorkerI"); +Clazz.defineMethod (c$, "isBlackListed", +function (workerType) { +{ +return this.blackList.contains (workerType); +}}, "Class"); +Clazz.overrideMethod (c$, "startWorker", +function (worker) { +var workerAsThread = worker; +if (workerAsThread.isAlive ()) { +workerAsThread.interrupt (); +worker = worker.getNewWorker (); +}worker.setName (worker.getClass ().getName ()); +worker.start (); +}, "jalview.api.AlignCalcWorkerI"); +Clazz.defineMethod (c$, "isWorking", +function (worker) { +{ +return worker != null && this.inProgress.get (worker.getClass ()) === worker; +}}, "jalview.api.AlignCalcWorkerI"); +Clazz.defineMethod (c$, "isWorking", +function () { +{ +return this.inProgress.size () > 0; +}}); +Clazz.overrideMethod (c$, "registerWorker", +function (worker) { +{ +if (!this.restartable.contains (worker)) { +this.restartable.add (worker); +}this.startWorker (worker); +}}, "jalview.api.AlignCalcWorkerI"); +Clazz.overrideMethod (c$, "restartWorkers", +function () { +{ +for (var worker, $worker = this.restartable.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { +this.startWorker (worker); +} +}}); +Clazz.overrideMethod (c$, "workingInvolvedWith", +function (alignmentAnnotation) { +{ +for (var worker, $worker = this.inProgress.values ().iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { +if (worker.involves (alignmentAnnotation)) { +return true; +}} +}{ +for (var workers, $workers = this.updating.values ().iterator (); $workers.hasNext () && ((workers = $workers.next ()) || true);) { +for (var worker, $worker = workers.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { +if (worker.involves (alignmentAnnotation)) { +return true; +}} +} +}return false; +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.overrideMethod (c$, "updateAnnotationFor", +function (workerClass) { +var workers; +{ +workers = this.canUpdate.toArray ( new Array (0)); +}for (var worker, $worker = 0, $$worker = workers; $worker < $$worker.length && ((worker = $$worker[$worker]) || true); $worker++) { +if (workerClass.equals (worker.getClass ())) { +worker.updateAnnotation (); +}} +}, "Class"); +Clazz.overrideMethod (c$, "getRegisteredWorkersOfClass", +function (workerClass) { +var workingClass = new java.util.ArrayList (); +var workers; +{ +workers = this.canUpdate.toArray ( new Array (this.canUpdate.size ())); +}for (var worker, $worker = 0, $$worker = workers; $worker < $$worker.length && ((worker = $$worker[$worker]) || true); $worker++) { +if (workerClass.equals (worker.getClass ())) { +workingClass.add (worker); +}} +return (workingClass.size () == 0) ? null : workingClass; +}, "Class"); +Clazz.overrideMethod (c$, "startRegisteredWorkersOfClass", +function (workerClass) { +var workers = this.getRegisteredWorkersOfClass (workerClass); +if (workers == null) { +return false; +}for (var worker, $worker = workers.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { +if (!this.isPending (worker)) { +this.startWorker (worker); +} else { +System.err.println ("Pending exists for " + workerClass); +}} +return true; +}, "Class"); +Clazz.overrideMethod (c$, "workerMayRun", +function (worker) { +{ +if (this.blackList.contains (worker.getClass ())) { +this.blackList.remove (worker.getClass ()); +}}}, "jalview.api.AlignCalcWorkerI"); +Clazz.overrideMethod (c$, "removeRegisteredWorkersOfClass", +function (typeToRemove) { +var workers = this.getRegisteredWorkersOfClass (typeToRemove); +var removable = new java.util.ArrayList (); +var toremovannot = new java.util.HashSet (); +{ +for (var worker, $worker = this.restartable.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { +if (typeToRemove.equals (worker.getClass ())) { +removable.add (worker); +toremovannot.add (worker); +}} +this.restartable.removeAll (removable); +}{ +for (var worker, $worker = this.canUpdate.iterator (); $worker.hasNext () && ((worker = $worker.next ()) || true);) { +if (typeToRemove.equals (worker.getClass ())) { +removable.add (worker); +toremovannot.add (worker); +}} +this.canUpdate.removeAll (removable); +}}, "Class"); +}); diff --git a/bin/jalview/workers/AlignCalcWorker.js b/bin/jalview/workers/AlignCalcWorker.js index 43b690b..6636e6d 100644 --- a/bin/jalview/workers/AlignCalcWorker.js +++ b/bin/jalview/workers/AlignCalcWorker.js @@ -1,54 +1,54 @@ -Clazz.declarePackage ("jalview.workers"); -Clazz.load (["jalview.api.AlignCalcWorkerI", "swingjs.JSThread"], "jalview.workers.AlignCalcWorker", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.iFirst = 0; -this.iLast = 0; -this.nPer = 2; -this.started = 0; -this.alignment = null; -this.aWidth = 0; -this.alignViewport = null; -this.calcMan = null; -this.ap = null; -this.ourAnnots = null; -Clazz.instantialize (this, arguments); -}, jalview.workers, "AlignCalcWorker", swingjs.JSThread, jalview.api.AlignCalcWorkerI); -Clazz.makeConstructor (c$, -function (alignViewport, alignPanel) { -Clazz.superConstructor (this, jalview.workers.AlignCalcWorker, [null, "AlignCalcWorker"]); -this.alignViewport = alignViewport; -this.calcMan = alignViewport.getCalcManager (); -this.ap = alignPanel; -}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); -Clazz.defineMethod (c$, "abortAndDestroy", -function () { -if (this.calcMan != null) { -this.calcMan.workerComplete (this); -}this.alignViewport = null; -this.calcMan = null; -this.ap = null; -}); -Clazz.overrideMethod (c$, "involves", -function (i) { -return this.ourAnnots != null && this.ourAnnots.contains (i); -}, "jalview.datamodel.AlignmentAnnotation"); -Clazz.overrideMethod (c$, "removeOurAnnotation", -function () { -if (this.ourAnnots != null && this.alignViewport != null) { -var alignment = this.alignViewport.getAlignment (); -{ -for (var aa, $aa = this.ourAnnots.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) { -alignment.deleteAnnotation (aa, true); -} -}}}); -Clazz.defineMethod (c$, "notifyDone", -function () { -if (this.ap != null) { -this.ap.paintAlignment (true); -}this.calcMan.workerComplete (this); -}); -Clazz.defineStatics (c$, -"LOOP_STANDBY", 3, -"LOOP_CALCULATE", 4, -"MS_MAX", 500); -}); +Clazz.declarePackage ("jalview.workers"); +Clazz.load (["jalview.api.AlignCalcWorkerI", "swingjs.JSThread"], "jalview.workers.AlignCalcWorker", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.iFirst = 0; +this.iLast = 0; +this.nPer = 2; +this.started = 0; +this.alignment = null; +this.aWidth = 0; +this.alignViewport = null; +this.calcMan = null; +this.ap = null; +this.ourAnnots = null; +Clazz.instantialize (this, arguments); +}, jalview.workers, "AlignCalcWorker", swingjs.JSThread, jalview.api.AlignCalcWorkerI); +Clazz.makeConstructor (c$, +function (alignViewport, alignPanel) { +Clazz.superConstructor (this, jalview.workers.AlignCalcWorker, [null, "AlignCalcWorker"]); +this.alignViewport = alignViewport; +this.calcMan = alignViewport.getCalcManager (); +this.ap = alignPanel; +}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); +Clazz.defineMethod (c$, "abortAndDestroy", +function () { +if (this.calcMan != null) { +this.calcMan.workerComplete (this); +}this.alignViewport = null; +this.calcMan = null; +this.ap = null; +}); +Clazz.overrideMethod (c$, "involves", +function (i) { +return this.ourAnnots != null && this.ourAnnots.contains (i); +}, "jalview.datamodel.AlignmentAnnotation"); +Clazz.overrideMethod (c$, "removeOurAnnotation", +function () { +if (this.ourAnnots != null && this.alignViewport != null) { +var alignment = this.alignViewport.getAlignment (); +{ +for (var aa, $aa = this.ourAnnots.iterator (); $aa.hasNext () && ((aa = $aa.next ()) || true);) { +alignment.deleteAnnotation (aa, true); +} +}}}); +Clazz.defineMethod (c$, "notifyDone", +function () { +if (this.ap != null) { +this.ap.paintAlignment (true); +}this.calcMan.workerComplete (this); +}); +Clazz.defineStatics (c$, +"LOOP_STANDBY", 3, +"LOOP_CALCULATE", 4, +"MS_MAX", 500); +}); diff --git a/bin/jalview/workers/ComplementConsensusThread.js b/bin/jalview/workers/ComplementConsensusThread.js index 641c3ba..17ece7f 100644 --- a/bin/jalview/workers/ComplementConsensusThread.js +++ b/bin/jalview/workers/ComplementConsensusThread.js @@ -1,46 +1,46 @@ -Clazz.declarePackage ("jalview.workers"); -Clazz.load (["jalview.workers.ConsensusThread"], "jalview.workers.ComplementConsensusThread", ["jalview.analysis.AAFrequency"], function () { -c$ = Clazz.decorateAsClass (function () { -this.mappings = null; -Clazz.instantialize (this, arguments); -}, jalview.workers, "ComplementConsensusThread", jalview.workers.ConsensusThread); -Clazz.overrideMethod (c$, "getNewWorker", -function () { -return new jalview.workers.ComplementConsensusThread (this.alignViewport, this.ap); -}); -Clazz.overrideMethod (c$, "getConsensusAnnotation", -function () { -return this.alignViewport.getComplementConsensusAnnotation (); -}); -Clazz.overrideMethod (c$, "getViewportConsensus", -function () { -return this.alignViewport.getComplementConsensusHash (); -}); -Clazz.defineMethod (c$, "initializeCalc", -function () { -this.mappings = this.alignment.getCodonFrames (); -return (this.mappings != null && !this.mappings.isEmpty () && Clazz.superCall (this, jalview.workers.ComplementConsensusThread, "initializeCalc", [])); -}); -Clazz.overrideMethod (c$, "computeConsensus", -function () { -for (var i = 0; i < 3; i++) { -try { -jalview.analysis.AAFrequency.calculateCdna (this.alignment, this.mappings, this.hconsensus, this.iFirst, this.iLast); -break; -} catch (e) { -if (Clazz.exceptionOf (e, java.util.ConcurrentModificationException)) { -} else { -throw e; -} -} -} -}); -Clazz.overrideMethod (c$, "finalizeCalc", -function () { -this.alignViewport.setComplementConsensusHash (this.hconsensus); -}); -Clazz.overrideMethod (c$, "deriveConsensus", -function (consensusAnnotation, consensusData) { -jalview.analysis.AAFrequency.completeCdnaConsensus (consensusAnnotation, consensusData, this.alignViewport.isShowSequenceLogo (), this.getSequences ().length); -}, "jalview.datamodel.AlignmentAnnotation,~A"); -}); +Clazz.declarePackage ("jalview.workers"); +Clazz.load (["jalview.workers.ConsensusThread"], "jalview.workers.ComplementConsensusThread", ["jalview.analysis.AAFrequency"], function () { +c$ = Clazz.decorateAsClass (function () { +this.mappings = null; +Clazz.instantialize (this, arguments); +}, jalview.workers, "ComplementConsensusThread", jalview.workers.ConsensusThread); +Clazz.overrideMethod (c$, "getNewWorker", +function () { +return new jalview.workers.ComplementConsensusThread (this.alignViewport, this.ap); +}); +Clazz.overrideMethod (c$, "getConsensusAnnotation", +function () { +return this.alignViewport.getComplementConsensusAnnotation (); +}); +Clazz.overrideMethod (c$, "getViewportConsensus", +function () { +return this.alignViewport.getComplementConsensusHash (); +}); +Clazz.defineMethod (c$, "initializeCalc", +function () { +this.mappings = this.alignment.getCodonFrames (); +return (this.mappings != null && !this.mappings.isEmpty () && Clazz.superCall (this, jalview.workers.ComplementConsensusThread, "initializeCalc", [])); +}); +Clazz.overrideMethod (c$, "computeConsensus", +function () { +for (var i = 0; i < 3; i++) { +try { +jalview.analysis.AAFrequency.calculateCdna (this.alignment, this.mappings, this.hconsensus, this.iFirst, this.iLast); +break; +} catch (e) { +if (Clazz.exceptionOf (e, java.util.ConcurrentModificationException)) { +} else { +throw e; +} +} +} +}); +Clazz.overrideMethod (c$, "finalizeCalc", +function () { +this.alignViewport.setComplementConsensusHash (this.hconsensus); +}); +Clazz.overrideMethod (c$, "deriveConsensus", +function (consensusAnnotation, consensusData) { +jalview.analysis.AAFrequency.completeCdnaConsensus (consensusAnnotation, consensusData, this.alignViewport.isShowSequenceLogo (), this.getSequences ().length); +}, "jalview.datamodel.AlignmentAnnotation,~A"); +}); diff --git a/bin/jalview/workers/ConsensusThread.js b/bin/jalview/workers/ConsensusThread.js index 3f62035..089a18e 100644 --- a/bin/jalview/workers/ConsensusThread.js +++ b/bin/jalview/workers/ConsensusThread.js @@ -1,149 +1,149 @@ -Clazz.declarePackage ("jalview.workers"); -Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.ConsensusThread", ["jalview.analysis.AAFrequency"], function () { -c$ = Clazz.decorateAsClass (function () { -this.hconsensus = null; -this.aseqs = null; -Clazz.instantialize (this, arguments); -}, jalview.workers, "ConsensusThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI); -Clazz.overrideMethod (c$, "getNewWorker", -function () { -return new jalview.workers.ConsensusThread (this.alignViewport, this.ap); -}); -Clazz.overrideMethod (c$, "run1", -function (state) { -while (!Thread.interrupted ()) { -if (this.alignViewport.isClosed ()) { -this.abortAndDestroy (); -return; -}try { -switch (state) { -case 0: -if (this.calcMan.isPending (this)) return; -this.calcMan.notifyStart (this); -var consensus = this.getConsensusAnnotation (); -if (consensus == null || this.calcMan.isPending (this)) { -this.calcMan.workerComplete (this); -return; -}state = 3; -break; -case 3: -while (!this.calcMan.notifyWorking (this)) { -if (this.ap != null) { -this.ap.paintAlignment (false); -}try { -if (this.sleepAndReturn (200, state)) return; -} catch (e) { -if (Clazz.exceptionOf (e, InterruptedException)) { -state = 2; -break; -} else { -throw e; -} -} -} -if (this.alignViewport.isClosed ()) { -this.abortAndDestroy (); -state = 2; -break; -}this.alignment = this.alignViewport.getAlignment (); -this.aWidth = -1; -if (this.alignment == null || (this.aWidth = this.alignment.getWidth ()) < 0) { -state = 2; -}this.eraseConsensus (this.aWidth); -state = (this.initializeCalc () ? 4 : 2); -break; -case 4: -this.iFirst = this.iLast; -this.iLast = Math.min (this.iLast + this.nPer, this.aWidth); -if (this.iLast == this.iFirst) { -state = 2; -} else { -this.computeConsensus (); -if (this.sleepAndReturn (0, state)) return; -}break; -case 2: -this.finalizeCalc (); -this.updateAlignment (); -this.notifyDone (); -return; -} -} catch (e$$) { -if (Clazz.exceptionOf (e$$, OutOfMemoryError)) { -var error = e$$; -{ -this.calcMan.workerCannotRun (this); -this.ap.raiseOOMWarning ("calculating consensus", error); -} -} else { -var e = e$$; -{ -System.out.println ("Error in ConsensusThread: " + e); -e.printStackTrace (); -this.calcMan.workerComplete (this); -} -} -} -} -}, "~N"); -Clazz.defineMethod (c$, "initializeCalc", -function () { -this.iLast = 0; -this.hconsensus = new Array (this.aWidth); -this.aseqs = this.getSequences (); -return true; -}); -Clazz.defineMethod (c$, "computeConsensus", -function () { -this.started = System.currentTimeMillis (); -jalview.analysis.AAFrequency.calculate (this.aseqs, this.iFirst, this.iLast, this.hconsensus, true); -if (System.currentTimeMillis () - this.started < 500) this.nPer *= 2; -}); -Clazz.defineMethod (c$, "finalizeCalc", -function () { -this.alignViewport.setSequenceConsensusHash (this.hconsensus); -}); -Clazz.defineMethod (c$, "updateAlignment", -function () { -this.setColourSchemeConsensus (this.hconsensus); -this.updateResultAnnotation (true); -}); -Clazz.defineMethod (c$, "eraseConsensus", -function (aWidth) { -var consensus = this.getConsensusAnnotation (); -consensus.annotations = new Array (aWidth); -}, "~N"); -Clazz.defineMethod (c$, "getSequences", -function () { -return this.alignViewport.getAlignment ().getSequencesArray (); -}); -Clazz.defineMethod (c$, "setColourSchemeConsensus", -function (hconsensus) { -var globalColourScheme = this.alignViewport.getGlobalColourScheme (); -if (globalColourScheme != null) { -globalColourScheme.setConsensus (hconsensus); -}}, "~A"); -Clazz.defineMethod (c$, "getConsensusAnnotation", -function () { -return this.alignViewport.getAlignmentConsensusAnnotation (); -}); -Clazz.overrideMethod (c$, "updateAnnotation", -function () { -this.updateResultAnnotation (false); -}); -Clazz.defineMethod (c$, "updateResultAnnotation", -function (immediate) { -var consensus = this.getConsensusAnnotation (); -var hconsensus = this.getViewportConsensus (); -if (immediate || !this.calcMan.isWorking (this) && consensus != null && hconsensus != null) { -this.deriveConsensus (consensus, hconsensus); -}}, "~B"); -Clazz.defineMethod (c$, "deriveConsensus", -function (consensusAnnotation, consensusData) { -var nseq = this.getSequences ().length; -jalview.analysis.AAFrequency.completeConsensus (consensusAnnotation, consensusData, 0, consensusData.length, this.alignViewport.isIgnoreGapsConsensus (), this.alignViewport.isShowSequenceLogo (), nseq); -}, "jalview.datamodel.AlignmentAnnotation,~A"); -Clazz.defineMethod (c$, "getViewportConsensus", -function () { -return this.alignViewport.getSequenceConsensusHash (); -}); -}); +Clazz.declarePackage ("jalview.workers"); +Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.ConsensusThread", ["jalview.analysis.AAFrequency"], function () { +c$ = Clazz.decorateAsClass (function () { +this.hconsensus = null; +this.aseqs = null; +Clazz.instantialize (this, arguments); +}, jalview.workers, "ConsensusThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI); +Clazz.overrideMethod (c$, "getNewWorker", +function () { +return new jalview.workers.ConsensusThread (this.alignViewport, this.ap); +}); +Clazz.overrideMethod (c$, "run1", +function (state) { +while (!Thread.interrupted ()) { +if (this.alignViewport.isClosed ()) { +this.abortAndDestroy (); +return; +}try { +switch (state) { +case 0: +if (this.calcMan.isPending (this)) return; +this.calcMan.notifyStart (this); +var consensus = this.getConsensusAnnotation (); +if (consensus == null || this.calcMan.isPending (this)) { +this.calcMan.workerComplete (this); +return; +}state = 3; +break; +case 3: +while (!this.calcMan.notifyWorking (this)) { +if (this.ap != null) { +this.ap.paintAlignment (false); +}try { +if (this.sleepAndReturn (200, state)) return; +} catch (e) { +if (Clazz.exceptionOf (e, InterruptedException)) { +state = 2; +break; +} else { +throw e; +} +} +} +if (this.alignViewport.isClosed ()) { +this.abortAndDestroy (); +state = 2; +break; +}this.alignment = this.alignViewport.getAlignment (); +this.aWidth = -1; +if (this.alignment == null || (this.aWidth = this.alignment.getWidth ()) < 0) { +state = 2; +}this.eraseConsensus (this.aWidth); +state = (this.initializeCalc () ? 4 : 2); +break; +case 4: +this.iFirst = this.iLast; +this.iLast = Math.min (this.iLast + this.nPer, this.aWidth); +if (this.iLast == this.iFirst) { +state = 2; +} else { +this.computeConsensus (); +if (this.sleepAndReturn (0, state)) return; +}break; +case 2: +this.finalizeCalc (); +this.updateAlignment (); +this.notifyDone (); +return; +} +} catch (e$$) { +if (Clazz.exceptionOf (e$$, OutOfMemoryError)) { +var error = e$$; +{ +this.calcMan.workerCannotRun (this); +this.ap.raiseOOMWarning ("calculating consensus", error); +} +} else { +var e = e$$; +{ +System.out.println ("Error in ConsensusThread: " + e); +e.printStackTrace (); +this.calcMan.workerComplete (this); +} +} +} +} +}, "~N"); +Clazz.defineMethod (c$, "initializeCalc", +function () { +this.iLast = 0; +this.hconsensus = new Array (this.aWidth); +this.aseqs = this.getSequences (); +return true; +}); +Clazz.defineMethod (c$, "computeConsensus", +function () { +this.started = System.currentTimeMillis (); +jalview.analysis.AAFrequency.calculate (this.aseqs, this.iFirst, this.iLast, this.hconsensus, true); +if (System.currentTimeMillis () - this.started < 500) this.nPer *= 2; +}); +Clazz.defineMethod (c$, "finalizeCalc", +function () { +this.alignViewport.setSequenceConsensusHash (this.hconsensus); +}); +Clazz.defineMethod (c$, "updateAlignment", +function () { +this.setColourSchemeConsensus (this.hconsensus); +this.updateResultAnnotation (true); +}); +Clazz.defineMethod (c$, "eraseConsensus", +function (aWidth) { +var consensus = this.getConsensusAnnotation (); +consensus.annotations = new Array (aWidth); +}, "~N"); +Clazz.defineMethod (c$, "getSequences", +function () { +return this.alignViewport.getAlignment ().getSequencesArray (); +}); +Clazz.defineMethod (c$, "setColourSchemeConsensus", +function (hconsensus) { +var globalColourScheme = this.alignViewport.getGlobalColourScheme (); +if (globalColourScheme != null) { +globalColourScheme.setConsensus (hconsensus); +}}, "~A"); +Clazz.defineMethod (c$, "getConsensusAnnotation", +function () { +return this.alignViewport.getAlignmentConsensusAnnotation (); +}); +Clazz.overrideMethod (c$, "updateAnnotation", +function () { +this.updateResultAnnotation (false); +}); +Clazz.defineMethod (c$, "updateResultAnnotation", +function (immediate) { +var consensus = this.getConsensusAnnotation (); +var hconsensus = this.getViewportConsensus (); +if (immediate || !this.calcMan.isWorking (this) && consensus != null && hconsensus != null) { +this.deriveConsensus (consensus, hconsensus); +}}, "~B"); +Clazz.defineMethod (c$, "deriveConsensus", +function (consensusAnnotation, consensusData) { +var nseq = this.getSequences ().length; +jalview.analysis.AAFrequency.completeConsensus (consensusAnnotation, consensusData, 0, consensusData.length, this.alignViewport.isIgnoreGapsConsensus (), this.alignViewport.isShowSequenceLogo (), nseq); +}, "jalview.datamodel.AlignmentAnnotation,~A"); +Clazz.defineMethod (c$, "getViewportConsensus", +function () { +return this.alignViewport.getSequenceConsensusHash (); +}); +}); diff --git a/bin/jalview/workers/ConservationThread.js b/bin/jalview/workers/ConservationThread.js index dc839a9..d790876 100644 --- a/bin/jalview/workers/ConservationThread.js +++ b/bin/jalview/workers/ConservationThread.js @@ -1,108 +1,108 @@ -Clazz.declarePackage ("jalview.workers"); -Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.ConservationThread", ["jalview.analysis.Conservation", "jalview.schemes.ResidueProperties", "java.util.ArrayList"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ConsPercGaps = 25; -this.cons = null; -this.conservation = null; -this.quality = null; -Clazz.instantialize (this, arguments); -}, jalview.workers, "ConservationThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI); -Clazz.overrideMethod (c$, "getNewWorker", -function () { -return new jalview.workers.ConservationThread (this.alignViewport, this.ap); -}); -Clazz.makeConstructor (c$, -function (alignViewport, alignPanel) { -Clazz.superConstructor (this, jalview.workers.ConservationThread, [alignViewport, alignPanel]); -this.ConsPercGaps = alignViewport.getConsPercGaps (); -}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); -Clazz.overrideMethod (c$, "run1", -function (state) { -while (!Thread.interrupted ()) { -try { -switch (state) { -case 0: -if (this.calcMan.isPending (this)) return; -this.calcMan.notifyStart (this); -state = 3; -break; -case 3: -while (!this.calcMan.notifyWorking (this)) { -if (this.ap != null) { -this.ap.paintAlignment (false); -}try { -if (this.sleepAndReturn (200, state)) return; -} catch (e) { -if (Clazz.exceptionOf (e, InterruptedException)) { -state = 2; -break; -} else { -throw e; -} -} -} -if (this.alignViewport.isClosed ()) { -this.abortAndDestroy (); -state = 2; -break; -}var ourAnnot = new java.util.ArrayList (); -this.alignment = this.alignViewport.getAlignment (); -this.conservation = this.alignViewport.getAlignmentConservationAnnotation (); -this.quality = this.alignViewport.getAlignmentQualityAnnot (); -ourAnnot.add (this.conservation); -ourAnnot.add (this.quality); -this.ourAnnots = ourAnnot; -this.ConsPercGaps = this.alignViewport.getConsPercGaps (); -if (this.alignment == null || (this.aWidth = this.alignment.getWidth ()) < 0) { -this.calcMan.workerComplete (this); -return; -}state = 4; -break; -case 4: -this.iFirst = this.iLast; -this.nPer = this.aWidth + 1; -this.iLast = Math.min (this.iLast + this.nPer, this.aWidth); -if (this.iLast == this.iFirst) { -state = 2; -} else { -this.computeConsensus (); -if (this.sleepAndReturn (0, state)) return; -}break; -case 2: -this.updateResultAnnotation (true); -this.notifyDone (); -return; -} -} catch (e$$) { -if (Clazz.exceptionOf (e$$, OutOfMemoryError)) { -var error = e$$; -{ -this.calcMan.workerCannotRun (this); -this.ap.raiseOOMWarning ("calculating conservation", error); -} -} else { -var e = e$$; -{ -System.out.println ("Error in ConsensusThread: " + e); -e.printStackTrace (); -this.calcMan.workerComplete (this); -} -} -} -} -}, "~N"); -Clazz.defineMethod (c$, "computeConsensus", -($fz = function () { -this.cons = jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.aWidth - 1, false, this.ConsPercGaps, this.quality != null); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "updateResultAnnotation", -($fz = function (b) { -if (b || !this.calcMan.isWorking (this) && this.cons != null && this.conservation != null && this.quality != null) { -this.alignViewport.setConservation (this.cons); -this.cons.completeAnnotations (this.conservation, this.quality, 0, this.aWidth); -}}, $fz.isPrivate = true, $fz), "~B"); -Clazz.overrideMethod (c$, "updateAnnotation", -function () { -this.updateResultAnnotation (false); -}); -}); +Clazz.declarePackage ("jalview.workers"); +Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.ConservationThread", ["jalview.analysis.Conservation", "jalview.schemes.ResidueProperties", "java.util.ArrayList"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ConsPercGaps = 25; +this.cons = null; +this.conservation = null; +this.quality = null; +Clazz.instantialize (this, arguments); +}, jalview.workers, "ConservationThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI); +Clazz.overrideMethod (c$, "getNewWorker", +function () { +return new jalview.workers.ConservationThread (this.alignViewport, this.ap); +}); +Clazz.makeConstructor (c$, +function (alignViewport, alignPanel) { +Clazz.superConstructor (this, jalview.workers.ConservationThread, [alignViewport, alignPanel]); +this.ConsPercGaps = alignViewport.getConsPercGaps (); +}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel"); +Clazz.overrideMethod (c$, "run1", +function (state) { +while (!Thread.interrupted ()) { +try { +switch (state) { +case 0: +if (this.calcMan.isPending (this)) return; +this.calcMan.notifyStart (this); +state = 3; +break; +case 3: +while (!this.calcMan.notifyWorking (this)) { +if (this.ap != null) { +this.ap.paintAlignment (false); +}try { +if (this.sleepAndReturn (200, state)) return; +} catch (e) { +if (Clazz.exceptionOf (e, InterruptedException)) { +state = 2; +break; +} else { +throw e; +} +} +} +if (this.alignViewport.isClosed ()) { +this.abortAndDestroy (); +state = 2; +break; +}var ourAnnot = new java.util.ArrayList (); +this.alignment = this.alignViewport.getAlignment (); +this.conservation = this.alignViewport.getAlignmentConservationAnnotation (); +this.quality = this.alignViewport.getAlignmentQualityAnnot (); +ourAnnot.add (this.conservation); +ourAnnot.add (this.quality); +this.ourAnnots = ourAnnot; +this.ConsPercGaps = this.alignViewport.getConsPercGaps (); +if (this.alignment == null || (this.aWidth = this.alignment.getWidth ()) < 0) { +this.calcMan.workerComplete (this); +return; +}state = 4; +break; +case 4: +this.iFirst = this.iLast; +this.nPer = this.aWidth + 1; +this.iLast = Math.min (this.iLast + this.nPer, this.aWidth); +if (this.iLast == this.iFirst) { +state = 2; +} else { +this.computeConsensus (); +if (this.sleepAndReturn (0, state)) return; +}break; +case 2: +this.updateResultAnnotation (true); +this.notifyDone (); +return; +} +} catch (e$$) { +if (Clazz.exceptionOf (e$$, OutOfMemoryError)) { +var error = e$$; +{ +this.calcMan.workerCannotRun (this); +this.ap.raiseOOMWarning ("calculating conservation", error); +} +} else { +var e = e$$; +{ +System.out.println ("Error in ConsensusThread: " + e); +e.printStackTrace (); +this.calcMan.workerComplete (this); +} +} +} +} +}, "~N"); +Clazz.defineMethod (c$, "computeConsensus", +($fz = function () { +this.cons = jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.aWidth - 1, false, this.ConsPercGaps, this.quality != null); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "updateResultAnnotation", +($fz = function (b) { +if (b || !this.calcMan.isWorking (this) && this.cons != null && this.conservation != null && this.quality != null) { +this.alignViewport.setConservation (this.cons); +this.cons.completeAnnotations (this.conservation, this.quality, 0, this.aWidth); +}}, $fz.isPrivate = true, $fz), "~B"); +Clazz.overrideMethod (c$, "updateAnnotation", +function () { +this.updateResultAnnotation (false); +}); +}); diff --git a/bin/jalview/workers/StrucConsensusThread.class b/bin/jalview/workers/StrucConsensusThread.class index 48b83a51bf53283d2afacda8704169ebeec2ea1e..419bb4353f6a743881a0127c58ec8f0defb4ac34 100644 GIT binary patch delta 574 zcmW-eJ7`m37>1wsG%;0^N*6(Etf0}Fp+f}~wA4jN(M_$Tq-shV#Vbg?42?&W+EfV+ z2XhSKUbm#PFRKDi-vPlQh4@e5d)H+;euB-)nxq`9AKGvMs`Hj zQa`n7(r)^UX&g)Tof)3fWcj`_OEVEQleU+cCTbDdc)?4nN^GXaE31}R&1>G+E^lr3 lA=Y#d&&0??c2H++j6rSUpO6o#L3oxCP@6rmqdYrs-Uf{dU=WR|OeW~mV}W`$UoI1)o`YHk#f7UAO3 z3^UO#bEv7TsmW^LG7vIoB?Up`A|VQbHbFn{+|_&DbDnef&iPi`EA4adytPGYalttd zEPKhi`pyddv;Ruv{^&>ZJ@&Gn9^#g;l%3@s5Vf}y*}+t(GuBmA)ia?MY%$D>a~#p) zLKRolDi>FJ@t;)6$7u!vgEE~zOg*@Bo2^Jc+`h5&@gmI2C!2mud1c;*zDgY#G6mf~N)Nxnc#b+APtDm70#N-a*N4U=eOz%!o;-R7m z8{iR-akSZI=6FJl_WPt8)Dhtaos?Bwqa9j!#&bn!I;ikM(GnY&=cT5+()eLoqRn`5 rmv|)hhh~>S+s0oKF0Wl(snz)%oM~FuunTk5La$44cW?Pd(=q!G1HONA diff --git a/bin/jalview/workers/StrucConsensusThread.js b/bin/jalview/workers/StrucConsensusThread.js index 4010f84..dbe6d50 100644 --- a/bin/jalview/workers/StrucConsensusThread.js +++ b/bin/jalview/workers/StrucConsensusThread.js @@ -1,95 +1,95 @@ -Clazz.declarePackage ("jalview.workers"); -Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.StrucConsensusThread", ["jalview.analysis.StructureFrequency", "java.lang.Thread"], function () { -c$ = Clazz.decorateAsClass (function () { -this.strucConsensus = null; -this.hStrucConsensus = null; -this.nseq = -1; -Clazz.instantialize (this, arguments); -}, jalview.workers, "StrucConsensusThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI); -Clazz.overrideMethod (c$, "getNewWorker", -function () { -return new jalview.workers.StrucConsensusThread (this.alignViewport, this.ap); -}); -Clazz.overrideMethod (c$, "run", -function () { -try { -if (this.calcMan.isPending (this)) { -return; -}this.calcMan.notifyStart (this); -while (!this.calcMan.notifyWorking (this)) { -try { -if (this.ap != null) { -}Thread.sleep (200); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); -} else { -throw ex; -} -} -} -if (this.alignViewport.isClosed ()) { -this.abortAndDestroy (); -return; -}var alignment = this.alignViewport.getAlignment (); -var aWidth = -1; -if (alignment == null || (aWidth = alignment.getWidth ()) < 0) { -this.calcMan.workerComplete (this); -return; -}this.strucConsensus = this.alignViewport.getAlignmentStrucConsensusAnnotation (); -this.hStrucConsensus = this.alignViewport.getRnaStructureConsensusHash (); -this.strucConsensus.annotations = null; -this.strucConsensus.annotations = new Array (aWidth); -this.hStrucConsensus = new Array (aWidth); -var aa = this.alignViewport.getAlignment ().getAlignmentAnnotation (); -var rnaStruc = null; -for (var i = 0; i < aa.length; i++) { -if (aa[i].getRNAStruc () != null && aa[i].isValidStruc ()) { -rnaStruc = aa[i]; -break; -}} -if (rnaStruc == null || !rnaStruc.isValidStruc ()) { -this.calcMan.workerComplete (this); -return; -}try { -var arr = alignment.getSequencesArray (); -this.nseq = arr.length; -jalview.analysis.StructureFrequency.calculate (arr, 0, alignment.getWidth (), this.hStrucConsensus, true, rnaStruc); -} catch (x) { -if (Clazz.exceptionOf (x, ArrayIndexOutOfBoundsException)) { -this.calcMan.workerComplete (this); -return; -} else { -throw x; -} -} -this.alignViewport.setRnaStructureConsensusHash (this.hStrucConsensus); -this.updateResultAnnotation (true); -if (this.alignViewport.getGlobalColourScheme () != null) { -this.alignViewport.getGlobalColourScheme ().setConsensus (this.hStrucConsensus); -}} catch (error) { -if (Clazz.exceptionOf (error, OutOfMemoryError)) { -this.calcMan.workerCannotRun (this); -this.ap.raiseOOMWarning ("calculating RNA structure consensus", error); -} else { -throw error; -} -} finally { -this.calcMan.workerComplete (this); -if (this.ap != null) { -this.ap.paintAlignment (true); -}} -}); -Clazz.overrideMethod (c$, "updateAnnotation", -function () { -this.updateResultAnnotation (false); -}); -Clazz.defineMethod (c$, "updateResultAnnotation", -function (immediate) { -if (immediate || !this.calcMan.isWorking (this) && this.strucConsensus != null && this.hStrucConsensus != null) { -jalview.analysis.StructureFrequency.completeConsensus (this.strucConsensus, this.hStrucConsensus, 0, this.hStrucConsensus.length, this.alignViewport.isIgnoreGapsConsensus (), this.alignViewport.isShowSequenceLogo (), this.nseq); -}}, "~B"); -Clazz.overrideMethod (c$, "run1", -function (state) { -}, "~N"); -}); +Clazz.declarePackage ("jalview.workers"); +Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.StrucConsensusThread", ["jalview.analysis.StructureFrequency", "java.lang.Thread"], function () { +c$ = Clazz.decorateAsClass (function () { +this.strucConsensus = null; +this.hStrucConsensus = null; +this.nseq = -1; +Clazz.instantialize (this, arguments); +}, jalview.workers, "StrucConsensusThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI); +Clazz.overrideMethod (c$, "getNewWorker", +function () { +return new jalview.workers.StrucConsensusThread (this.alignViewport, this.ap); +}); +Clazz.overrideMethod (c$, "run", +function () { +try { +if (this.calcMan.isPending (this)) { +return; +}this.calcMan.notifyStart (this); +while (!this.calcMan.notifyWorking (this)) { +try { +if (this.ap != null) { +}Thread.sleep (200); +} catch (ex) { +if (Clazz.exceptionOf (ex, Exception)) { +ex.printStackTrace (); +} else { +throw ex; +} +} +} +if (this.alignViewport.isClosed ()) { +this.abortAndDestroy (); +return; +}var alignment = this.alignViewport.getAlignment (); +var aWidth = -1; +if (alignment == null || (aWidth = alignment.getWidth ()) < 0) { +this.calcMan.workerComplete (this); +return; +}this.strucConsensus = this.alignViewport.getAlignmentStrucConsensusAnnotation (); +this.hStrucConsensus = this.alignViewport.getRnaStructureConsensusHash (); +this.strucConsensus.annotations = null; +this.strucConsensus.annotations = new Array (aWidth); +this.hStrucConsensus = new Array (aWidth); +var aa = this.alignViewport.getAlignment ().getAlignmentAnnotation (); +var rnaStruc = null; +for (var i = 0; i < aa.length; i++) { +if (aa[i].getRNAStruc () != null && aa[i].isValidStruc ()) { +rnaStruc = aa[i]; +break; +}} +if (rnaStruc == null || !rnaStruc.isValidStruc ()) { +this.calcMan.workerComplete (this); +return; +}try { +var arr = alignment.getSequencesArray (); +this.nseq = arr.length; +jalview.analysis.StructureFrequency.calculate (arr, 0, alignment.getWidth (), this.hStrucConsensus, true, rnaStruc); +} catch (x) { +if (Clazz.exceptionOf (x, ArrayIndexOutOfBoundsException)) { +this.calcMan.workerComplete (this); +return; +} else { +throw x; +} +} +this.alignViewport.setRnaStructureConsensusHash (this.hStrucConsensus); +this.updateResultAnnotation (true); +if (this.alignViewport.getGlobalColourScheme () != null) { +this.alignViewport.getGlobalColourScheme ().setConsensus (this.hStrucConsensus); +}} catch (error) { +if (Clazz.exceptionOf (error, OutOfMemoryError)) { +this.calcMan.workerCannotRun (this); +this.ap.raiseOOMWarning ("calculating RNA structure consensus", error); +} else { +throw error; +} +} finally { +this.calcMan.workerComplete (this); +if (this.ap != null) { +this.ap.paintAlignment (true); +}} +}); +Clazz.overrideMethod (c$, "updateAnnotation", +function () { +this.updateResultAnnotation (false); +}); +Clazz.defineMethod (c$, "updateResultAnnotation", +function (immediate) { +if (immediate || !this.calcMan.isWorking (this) && this.strucConsensus != null && this.hStrucConsensus != null) { +jalview.analysis.StructureFrequency.completeConsensus (this.strucConsensus, this.hStrucConsensus, 0, this.hStrucConsensus.length, this.alignViewport.isIgnoreGapsConsensus (), this.alignViewport.isShowSequenceLogo (), this.nseq); +}}, "~B"); +Clazz.overrideMethod (c$, "run1", +function (state) { +}, "~N"); +}); diff --git a/bin/java.policy.applet b/bin/java.policy.applet deleted file mode 100644 index 35527af..0000000 --- a/bin/java.policy.applet +++ /dev/null @@ -1,7 +0,0 @@ -/* AUTOMATICALLY GENERATED ON Tue Apr 16 17:20:59 EDT 2002*/ -/* DO NOT EDIT */ - -grant { - permission java.security.AllPermission; -}; - diff --git a/bin/javajs/J2SIgnoreImport.js b/bin/javajs/J2SIgnoreImport.js index 5b4de23..bd94c0d 100644 --- a/bin/javajs/J2SIgnoreImport.js +++ b/bin/javajs/J2SIgnoreImport.js @@ -1 +1 @@ -Clazz.declarePackage ("javajs"); +Clazz.declarePackage ("javajs"); diff --git a/bin/javajs/J2SRequireImport.js b/bin/javajs/J2SRequireImport.js index 5b4de23..bd94c0d 100644 --- a/bin/javajs/J2SRequireImport.js +++ b/bin/javajs/J2SRequireImport.js @@ -1 +1 @@ -Clazz.declarePackage ("javajs"); +Clazz.declarePackage ("javajs"); diff --git a/bin/javajs/api/BytePoster.js b/bin/javajs/api/BytePoster.js index c97ddaf..1fb861c 100644 --- a/bin/javajs/api/BytePoster.js +++ b/bin/javajs/api/BytePoster.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "BytePoster"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "BytePoster"); diff --git a/bin/javajs/api/EigenInterface.js b/bin/javajs/api/EigenInterface.js index b5d1d99..b6e97f1 100644 --- a/bin/javajs/api/EigenInterface.js +++ b/bin/javajs/api/EigenInterface.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "EigenInterface"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "EigenInterface"); diff --git a/bin/javajs/api/EventManager.js b/bin/javajs/api/EventManager.js index c5a4fa9..a80b250 100644 --- a/bin/javajs/api/EventManager.js +++ b/bin/javajs/api/EventManager.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "EventManager"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "EventManager"); diff --git a/bin/javajs/api/FontManager.js b/bin/javajs/api/FontManager.js index a809538..f458d89 100644 --- a/bin/javajs/api/FontManager.js +++ b/bin/javajs/api/FontManager.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "FontManager"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "FontManager"); diff --git a/bin/javajs/api/GenericBinaryDocument.js b/bin/javajs/api/GenericBinaryDocument.js index 0da5b99..8a2bbf9 100644 --- a/bin/javajs/api/GenericBinaryDocument.js +++ b/bin/javajs/api/GenericBinaryDocument.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericBinaryDocument"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericBinaryDocument"); diff --git a/bin/javajs/api/GenericCifDataParser.js b/bin/javajs/api/GenericCifDataParser.js index 2696094..6127596 100644 --- a/bin/javajs/api/GenericCifDataParser.js +++ b/bin/javajs/api/GenericCifDataParser.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("javajs.api"); -c$ = Clazz.declareInterface (javajs.api, "GenericCifDataParser"); -Clazz.defineStatics (c$, -"NONE", -1); +Clazz.declarePackage ("javajs.api"); +c$ = Clazz.declareInterface (javajs.api, "GenericCifDataParser"); +Clazz.defineStatics (c$, +"NONE", -1); diff --git a/bin/javajs/api/GenericColor.js b/bin/javajs/api/GenericColor.js index c5d0d77..ed0a0ee 100644 --- a/bin/javajs/api/GenericColor.js +++ b/bin/javajs/api/GenericColor.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericColor"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericColor"); diff --git a/bin/javajs/api/GenericFileInterface.js b/bin/javajs/api/GenericFileInterface.js index 9a09815..deae68e 100644 --- a/bin/javajs/api/GenericFileInterface.js +++ b/bin/javajs/api/GenericFileInterface.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericFileInterface"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericFileInterface"); diff --git a/bin/javajs/api/GenericImageDialog.js b/bin/javajs/api/GenericImageDialog.js index 16c01cb..fa18c18 100644 --- a/bin/javajs/api/GenericImageDialog.js +++ b/bin/javajs/api/GenericImageDialog.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericImageDialog"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericImageDialog"); diff --git a/bin/javajs/api/GenericImageEncoder.js b/bin/javajs/api/GenericImageEncoder.js index f6a2e95..a7313d0 100644 --- a/bin/javajs/api/GenericImageEncoder.js +++ b/bin/javajs/api/GenericImageEncoder.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericImageEncoder"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericImageEncoder"); diff --git a/bin/javajs/api/GenericLineReader.js b/bin/javajs/api/GenericLineReader.js index f4d2aad..787a669 100644 --- a/bin/javajs/api/GenericLineReader.js +++ b/bin/javajs/api/GenericLineReader.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericLineReader"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericLineReader"); diff --git a/bin/javajs/api/GenericMenuInterface.js b/bin/javajs/api/GenericMenuInterface.js index d35fda0..8636834 100644 --- a/bin/javajs/api/GenericMenuInterface.js +++ b/bin/javajs/api/GenericMenuInterface.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericMenuInterface"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericMenuInterface"); diff --git a/bin/javajs/api/GenericMouseInterface.js b/bin/javajs/api/GenericMouseInterface.js index d40a3a0..dad99c3 100644 --- a/bin/javajs/api/GenericMouseInterface.js +++ b/bin/javajs/api/GenericMouseInterface.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericMouseInterface"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericMouseInterface"); diff --git a/bin/javajs/api/GenericPlatform.js b/bin/javajs/api/GenericPlatform.js index 00504e7..ae3869f 100644 --- a/bin/javajs/api/GenericPlatform.js +++ b/bin/javajs/api/GenericPlatform.js @@ -1,11 +1,11 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.load (["javajs.api.FontManager"], "javajs.api.GenericPlatform", null, function () { -c$ = Clazz.declareInterface (javajs.api, "GenericPlatform", javajs.api.FontManager); -Clazz.defineStatics (c$, -"CURSOR_DEFAULT", 0, -"CURSOR_CROSSHAIR", 1, -"CURSOR_WAIT", 3, -"CURSOR_ZOOM", 8, -"CURSOR_HAND", 12, -"CURSOR_MOVE", 13); -}); +Clazz.declarePackage ("javajs.api"); +Clazz.load (["javajs.api.FontManager"], "javajs.api.GenericPlatform", null, function () { +c$ = Clazz.declareInterface (javajs.api, "GenericPlatform", javajs.api.FontManager); +Clazz.defineStatics (c$, +"CURSOR_DEFAULT", 0, +"CURSOR_CROSSHAIR", 1, +"CURSOR_WAIT", 3, +"CURSOR_ZOOM", 8, +"CURSOR_HAND", 12, +"CURSOR_MOVE", 13); +}); diff --git a/bin/javajs/api/GenericZipInputStream.js b/bin/javajs/api/GenericZipInputStream.js index 9e55715..d74cfea 100644 --- a/bin/javajs/api/GenericZipInputStream.js +++ b/bin/javajs/api/GenericZipInputStream.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.load (["java.util.zip.ZipInputStream", "javajs.api.ZInputStream"], "javajs.api.GenericZipInputStream", null, function () { -c$ = Clazz.declareType (javajs.api, "GenericZipInputStream", java.util.zip.ZipInputStream, javajs.api.ZInputStream); -}); +Clazz.declarePackage ("javajs.api"); +Clazz.load (["java.util.zip.ZipInputStream", "javajs.api.ZInputStream"], "javajs.api.GenericZipInputStream", null, function () { +c$ = Clazz.declareType (javajs.api, "GenericZipInputStream", java.util.zip.ZipInputStream, javajs.api.ZInputStream); +}); diff --git a/bin/javajs/api/GenericZipTools.js b/bin/javajs/api/GenericZipTools.js index 00e6edf..902f592 100644 --- a/bin/javajs/api/GenericZipTools.js +++ b/bin/javajs/api/GenericZipTools.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "GenericZipTools"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "GenericZipTools"); diff --git a/bin/javajs/api/HTMLElement.js b/bin/javajs/api/HTMLElement.js index b305eae..97473c7 100644 --- a/bin/javajs/api/HTMLElement.js +++ b/bin/javajs/api/HTMLElement.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "HTMLElement"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "HTMLElement"); diff --git a/bin/javajs/api/HTMLWindowEvent.js b/bin/javajs/api/HTMLWindowEvent.js index 47438ca..538a5c1 100644 --- a/bin/javajs/api/HTMLWindowEvent.js +++ b/bin/javajs/api/HTMLWindowEvent.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "HTMLWindowEvent"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "HTMLWindowEvent"); diff --git a/bin/javajs/api/Interface.js b/bin/javajs/api/Interface.js index 024bf74..8887be8 100644 --- a/bin/javajs/api/Interface.js +++ b/bin/javajs/api/Interface.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("javajs.api"); -c$ = Clazz.declareType (javajs.api, "Interface"); -c$.getInterface = Clazz.defineMethod (c$, "getInterface", -function (name) { -try { -var x = Class.forName (name); -return (x == null ? null : x.newInstance ()); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e); -return null; -} else { -throw e; -} -} -}, "~S"); +Clazz.declarePackage ("javajs.api"); +c$ = Clazz.declareType (javajs.api, "Interface"); +c$.getInterface = Clazz.defineMethod (c$, "getInterface", +function (name) { +try { +var x = Class.forName (name); +return (x == null ? null : x.newInstance ()); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e); +return null; +} else { +throw e; +} +} +}, "~S"); diff --git a/bin/javajs/api/JSInterface.js b/bin/javajs/api/JSInterface.js index 1086b93..ce34ecc 100644 --- a/bin/javajs/api/JSInterface.js +++ b/bin/javajs/api/JSInterface.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "JSInterface"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "JSInterface"); diff --git a/bin/javajs/api/JSONEncodable.js b/bin/javajs/api/JSONEncodable.js index 9f5778f..e94f4b8 100644 --- a/bin/javajs/api/JSONEncodable.js +++ b/bin/javajs/api/JSONEncodable.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "JSONEncodable"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "JSONEncodable"); diff --git a/bin/javajs/api/JmolObjectInterface.js b/bin/javajs/api/JmolObjectInterface.js index a499b01..0f1e805 100644 --- a/bin/javajs/api/JmolObjectInterface.js +++ b/bin/javajs/api/JmolObjectInterface.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "JmolObjectInterface"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "JmolObjectInterface"); diff --git a/bin/javajs/api/PlatformViewer.js b/bin/javajs/api/PlatformViewer.js index 8cad055..32ed2dc 100644 --- a/bin/javajs/api/PlatformViewer.js +++ b/bin/javajs/api/PlatformViewer.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "PlatformViewer"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "PlatformViewer"); diff --git a/bin/javajs/api/SC.js b/bin/javajs/api/SC.js index 0edd956..01512cd 100644 --- a/bin/javajs/api/SC.js +++ b/bin/javajs/api/SC.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "SC"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "SC"); diff --git a/bin/javajs/api/SwingController.js b/bin/javajs/api/SwingController.js index 75f1f05..277bc34 100644 --- a/bin/javajs/api/SwingController.js +++ b/bin/javajs/api/SwingController.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "SwingController"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "SwingController"); diff --git a/bin/javajs/api/ZInputStream.js b/bin/javajs/api/ZInputStream.js index abc5bb9..7a79598 100644 --- a/bin/javajs/api/ZInputStream.js +++ b/bin/javajs/api/ZInputStream.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.api"); -Clazz.declareInterface (javajs.api, "ZInputStream"); +Clazz.declarePackage ("javajs.api"); +Clazz.declareInterface (javajs.api, "ZInputStream"); diff --git a/bin/javajs/awt/BorderLayout.js b/bin/javajs/awt/BorderLayout.js index 875b476..1686394 100644 --- a/bin/javajs/awt/BorderLayout.js +++ b/bin/javajs/awt/BorderLayout.js @@ -1,10 +1,10 @@ -Clazz.declarePackage ("javajs.awt"); -Clazz.load (["javajs.awt.LayoutManager"], "javajs.awt.BorderLayout", null, function () { -c$ = Clazz.declareType (javajs.awt, "BorderLayout", javajs.awt.LayoutManager); -Clazz.defineStatics (c$, -"CENTER", "Center", -"NORTH", "North", -"SOUTH", "South", -"EAST", "East", -"WEST", "West"); -}); +Clazz.declarePackage ("javajs.awt"); +Clazz.load (["javajs.awt.LayoutManager"], "javajs.awt.BorderLayout", null, function () { +c$ = Clazz.declareType (javajs.awt, "BorderLayout", javajs.awt.LayoutManager); +Clazz.defineStatics (c$, +"CENTER", "Center", +"NORTH", "North", +"SOUTH", "South", +"EAST", "East", +"WEST", "West"); +}); diff --git a/bin/javajs/awt/Color.js b/bin/javajs/awt/Color.js index 1f168d2..725aa31 100644 --- a/bin/javajs/awt/Color.js +++ b/bin/javajs/awt/Color.js @@ -1,43 +1,43 @@ -Clazz.declarePackage ("javajs.awt"); -Clazz.load (["javajs.api.GenericColor"], "javajs.awt.Color", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.argb = 0; -Clazz.instantialize (this, arguments); -}, javajs.awt, "Color", null, javajs.api.GenericColor); -Clazz.overrideMethod (c$, "getRGB", -function () { -return this.argb & 0x00FFFFFF; -}); -Clazz.overrideMethod (c$, "getOpacity255", -function () { -return ((this.argb >> 24) & 0xFF); -}); -Clazz.overrideMethod (c$, "setOpacity255", -function (a) { -this.argb = this.argb & 0xFFFFFF | ((a & 0xFF) << 24); -}, "~N"); -c$.get1 = Clazz.defineMethod (c$, "get1", -function (rgb) { -var c = new javajs.awt.Color (); -c.argb = rgb | 0xFF000000; -return c; -}, "~N"); -c$.get3 = Clazz.defineMethod (c$, "get3", -function (r, g, b) { -return new javajs.awt.Color ().set4 (r, g, b, 0xFF); -}, "~N,~N,~N"); -c$.get4 = Clazz.defineMethod (c$, "get4", -function (r, g, b, a) { -return new javajs.awt.Color ().set4 (r, g, b, a); -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "set4", -($fz = function (r, g, b, a) { -this.argb = ((a << 24) | (r << 16) | (g << 8) | b) & 0xFFFFFFFF; -return this; -}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N"); -Clazz.overrideMethod (c$, "toString", -function () { -var s = ("00000000" + Integer.toHexString (this.argb)); -return "[0x" + s.substring (s.length - 8, s.length) + "]"; -}); -}); +Clazz.declarePackage ("javajs.awt"); +Clazz.load (["javajs.api.GenericColor"], "javajs.awt.Color", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.argb = 0; +Clazz.instantialize (this, arguments); +}, javajs.awt, "Color", null, javajs.api.GenericColor); +Clazz.overrideMethod (c$, "getRGB", +function () { +return this.argb & 0x00FFFFFF; +}); +Clazz.overrideMethod (c$, "getOpacity255", +function () { +return ((this.argb >> 24) & 0xFF); +}); +Clazz.overrideMethod (c$, "setOpacity255", +function (a) { +this.argb = this.argb & 0xFFFFFF | ((a & 0xFF) << 24); +}, "~N"); +c$.get1 = Clazz.defineMethod (c$, "get1", +function (rgb) { +var c = new javajs.awt.Color (); +c.argb = rgb | 0xFF000000; +return c; +}, "~N"); +c$.get3 = Clazz.defineMethod (c$, "get3", +function (r, g, b) { +return new javajs.awt.Color ().set4 (r, g, b, 0xFF); +}, "~N,~N,~N"); +c$.get4 = Clazz.defineMethod (c$, "get4", +function (r, g, b, a) { +return new javajs.awt.Color ().set4 (r, g, b, a); +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "set4", +($fz = function (r, g, b, a) { +this.argb = ((a << 24) | (r << 16) | (g << 8) | b) & 0xFFFFFFFF; +return this; +}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N"); +Clazz.overrideMethod (c$, "toString", +function () { +var s = ("00000000" + Integer.toHexString (this.argb)); +return "[0x" + s.substring (s.length - 8, s.length) + "]"; +}); +}); diff --git a/bin/javajs/awt/Component.js b/bin/javajs/awt/Component.js index f17a3eb..20f1f1a 100644 --- a/bin/javajs/awt/Component.js +++ b/bin/javajs/awt/Component.js @@ -1,120 +1,120 @@ -Clazz.declarePackage ("javajs.awt"); -Clazz.load (null, "javajs.awt.Component", ["javajs.util.CU"], function () { -c$ = Clazz.decorateAsClass (function () { -this.visible = false; -this.enabled = true; -this.text = null; -this.name = null; -this.width = 0; -this.height = 0; -this.id = null; -this.parent = null; -this.mouseListener = null; -this.bgcolor = null; -this.minWidth = 30; -this.minHeight = 30; -this.renderWidth = 0; -this.renderHeight = 0; -Clazz.instantialize (this, arguments); -}, javajs.awt, "Component"); -Clazz.defineMethod (c$, "setParent", -function (p) { -this.parent = p; -}, "~O"); -Clazz.makeConstructor (c$, -function (type) { -this.id = javajs.awt.Component.newID (type); -if (type == null) return; -{ -SwingController.register(this, type); -}}, "~S"); -c$.newID = Clazz.defineMethod (c$, "newID", -function (type) { -return type + ("" + Math.random ()).substring (3, 10); -}, "~S"); -Clazz.defineMethod (c$, "setBackground", -function (color) { -this.bgcolor = color; -}, "javajs.api.GenericColor"); -Clazz.defineMethod (c$, "setText", -function (text) { -this.text = text; -{ -SwingController.setText(this); -}}, "~S"); -Clazz.defineMethod (c$, "setName", -function (name) { -this.name = name; -}, "~S"); -Clazz.defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz.defineMethod (c$, "getParent", -function () { -return this.parent; -}); -Clazz.defineMethod (c$, "setPreferredSize", -function (dimension) { -this.width = dimension.width; -this.height = dimension.height; -}, "javajs.awt.Dimension"); -Clazz.defineMethod (c$, "addMouseListener", -function (listener) { -this.mouseListener = listener; -}, "~O"); -Clazz.defineMethod (c$, "getText", -function () { -return this.text; -}); -Clazz.defineMethod (c$, "isEnabled", -function () { -return this.enabled; -}); -Clazz.defineMethod (c$, "setEnabled", -function (enabled) { -this.enabled = enabled; -{ -SwingController.setEnabled(this); -}}, "~B"); -Clazz.defineMethod (c$, "isVisible", -function () { -return this.visible; -}); -Clazz.defineMethod (c$, "setVisible", -function (visible) { -this.visible = visible; -{ -SwingController.setVisible(this); -}}, "~B"); -Clazz.defineMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz.defineMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz.defineMethod (c$, "setMinimumSize", -function (d) { -this.minWidth = d.width; -this.minHeight = d.height; -}, "javajs.awt.Dimension"); -Clazz.defineMethod (c$, "getSubcomponentWidth", -function () { -return this.width; -}); -Clazz.defineMethod (c$, "getSubcomponentHeight", -function () { -return this.height; -}); -Clazz.defineMethod (c$, "getCSSstyle", -function (defaultPercentW, defaultPercentH) { -var width = (this.renderWidth > 0 ? this.renderWidth : this.getSubcomponentWidth ()); -var height = (this.renderHeight > 0 ? this.renderHeight : this.getSubcomponentHeight ()); -return (width > 0 ? "width:" + width + "px;" : defaultPercentW > 0 ? "width:" + defaultPercentW + "%;" : "") + (height > 0 ? "height:" + height + "px;" : defaultPercentH > 0 ? "height:" + defaultPercentH + "%;" : "") + (this.bgcolor == null ? "" : "background-color:" + javajs.util.CU.toCSSString (this.bgcolor) + ";"); -}, "~N,~N"); -Clazz.defineMethod (c$, "repaint", -function () { -}); -}); +Clazz.declarePackage ("javajs.awt"); +Clazz.load (null, "javajs.awt.Component", ["javajs.util.CU"], function () { +c$ = Clazz.decorateAsClass (function () { +this.visible = false; +this.enabled = true; +this.text = null; +this.name = null; +this.width = 0; +this.height = 0; +this.id = null; +this.parent = null; +this.mouseListener = null; +this.bgcolor = null; +this.minWidth = 30; +this.minHeight = 30; +this.renderWidth = 0; +this.renderHeight = 0; +Clazz.instantialize (this, arguments); +}, javajs.awt, "Component"); +Clazz.defineMethod (c$, "setParent", +function (p) { +this.parent = p; +}, "~O"); +Clazz.makeConstructor (c$, +function (type) { +this.id = javajs.awt.Component.newID (type); +if (type == null) return; +{ +SwingController.register(this, type); +}}, "~S"); +c$.newID = Clazz.defineMethod (c$, "newID", +function (type) { +return type + ("" + Math.random ()).substring (3, 10); +}, "~S"); +Clazz.defineMethod (c$, "setBackground", +function (color) { +this.bgcolor = color; +}, "javajs.api.GenericColor"); +Clazz.defineMethod (c$, "setText", +function (text) { +this.text = text; +{ +SwingController.setText(this); +}}, "~S"); +Clazz.defineMethod (c$, "setName", +function (name) { +this.name = name; +}, "~S"); +Clazz.defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz.defineMethod (c$, "getParent", +function () { +return this.parent; +}); +Clazz.defineMethod (c$, "setPreferredSize", +function (dimension) { +this.width = dimension.width; +this.height = dimension.height; +}, "javajs.awt.Dimension"); +Clazz.defineMethod (c$, "addMouseListener", +function (listener) { +this.mouseListener = listener; +}, "~O"); +Clazz.defineMethod (c$, "getText", +function () { +return this.text; +}); +Clazz.defineMethod (c$, "isEnabled", +function () { +return this.enabled; +}); +Clazz.defineMethod (c$, "setEnabled", +function (enabled) { +this.enabled = enabled; +{ +SwingController.setEnabled(this); +}}, "~B"); +Clazz.defineMethod (c$, "isVisible", +function () { +return this.visible; +}); +Clazz.defineMethod (c$, "setVisible", +function (visible) { +this.visible = visible; +{ +SwingController.setVisible(this); +}}, "~B"); +Clazz.defineMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz.defineMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz.defineMethod (c$, "setMinimumSize", +function (d) { +this.minWidth = d.width; +this.minHeight = d.height; +}, "javajs.awt.Dimension"); +Clazz.defineMethod (c$, "getSubcomponentWidth", +function () { +return this.width; +}); +Clazz.defineMethod (c$, "getSubcomponentHeight", +function () { +return this.height; +}); +Clazz.defineMethod (c$, "getCSSstyle", +function (defaultPercentW, defaultPercentH) { +var width = (this.renderWidth > 0 ? this.renderWidth : this.getSubcomponentWidth ()); +var height = (this.renderHeight > 0 ? this.renderHeight : this.getSubcomponentHeight ()); +return (width > 0 ? "width:" + width + "px;" : defaultPercentW > 0 ? "width:" + defaultPercentW + "%;" : "") + (height > 0 ? "height:" + height + "px;" : defaultPercentH > 0 ? "height:" + defaultPercentH + "%;" : "") + (this.bgcolor == null ? "" : "background-color:" + javajs.util.CU.toCSSString (this.bgcolor) + ";"); +}, "~N,~N"); +Clazz.defineMethod (c$, "repaint", +function () { +}); +}); diff --git a/bin/javajs/awt/Container.js b/bin/javajs/awt/Container.js index fe3fb75..5bb85ea 100644 --- a/bin/javajs/awt/Container.js +++ b/bin/javajs/awt/Container.js @@ -1,65 +1,65 @@ -Clazz.declarePackage ("javajs.awt"); -Clazz.load (["javajs.awt.Component"], "javajs.awt.Container", ["javajs.util.Lst"], function () { -c$ = Clazz.decorateAsClass (function () { -this.list = null; -this.cList = null; -Clazz.instantialize (this, arguments); -}, javajs.awt, "Container", javajs.awt.Component); -Clazz.defineMethod (c$, "getComponent", -function (i) { -return this.list.get (i); -}, "~N"); -Clazz.defineMethod (c$, "getComponentCount", -function () { -return (this.list == null ? 0 : this.list.size ()); -}); -Clazz.defineMethod (c$, "getComponents", -function () { -if (this.cList == null) { -if (this.list == null) return new Array (0); -this.cList = this.list.toArray (); -}return this.cList; -}); -Clazz.defineMethod (c$, "add", -function (component) { -return this.addComponent (component); -}, "javajs.awt.Component"); -Clazz.defineMethod (c$, "addComponent", -function (component) { -if (this.list == null) this.list = new javajs.util.Lst (); -this.list.addLast (component); -this.cList = null; -component.parent = this; -return component; -}, "javajs.awt.Component"); -Clazz.defineMethod (c$, "insertComponent", -function (component, index) { -if (this.list == null) return this.addComponent (component); -this.list.add (index, component); -this.cList = null; -component.parent = this; -return component; -}, "javajs.awt.Component,~N"); -Clazz.defineMethod (c$, "remove", -function (i) { -var c = this.list.remove (i); -c.parent = null; -this.cList = null; -}, "~N"); -Clazz.defineMethod (c$, "removeAll", -function () { -if (this.list != null) { -for (var i = this.list.size (); --i >= 0; ) this.list.get (i).parent = null; - -this.list.clear (); -}this.cList = null; -}); -Clazz.defineMethod (c$, "getSubcomponentWidth", -function () { -return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentWidth () : 0); -}); -Clazz.defineMethod (c$, "getSubcomponentHeight", -function () { -return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentHeight () : 0); -}); -}); +Clazz.declarePackage ("javajs.awt"); +Clazz.load (["javajs.awt.Component"], "javajs.awt.Container", ["javajs.util.Lst"], function () { +c$ = Clazz.decorateAsClass (function () { +this.list = null; +this.cList = null; +Clazz.instantialize (this, arguments); +}, javajs.awt, "Container", javajs.awt.Component); +Clazz.defineMethod (c$, "getComponent", +function (i) { +return this.list.get (i); +}, "~N"); +Clazz.defineMethod (c$, "getComponentCount", +function () { +return (this.list == null ? 0 : this.list.size ()); +}); +Clazz.defineMethod (c$, "getComponents", +function () { +if (this.cList == null) { +if (this.list == null) return new Array (0); +this.cList = this.list.toArray (); +}return this.cList; +}); +Clazz.defineMethod (c$, "add", +function (component) { +return this.addComponent (component); +}, "javajs.awt.Component"); +Clazz.defineMethod (c$, "addComponent", +function (component) { +if (this.list == null) this.list = new javajs.util.Lst (); +this.list.addLast (component); +this.cList = null; +component.parent = this; +return component; +}, "javajs.awt.Component"); +Clazz.defineMethod (c$, "insertComponent", +function (component, index) { +if (this.list == null) return this.addComponent (component); +this.list.add (index, component); +this.cList = null; +component.parent = this; +return component; +}, "javajs.awt.Component,~N"); +Clazz.defineMethod (c$, "remove", +function (i) { +var c = this.list.remove (i); +c.parent = null; +this.cList = null; +}, "~N"); +Clazz.defineMethod (c$, "removeAll", +function () { +if (this.list != null) { +for (var i = this.list.size (); --i >= 0; ) this.list.get (i).parent = null; + +this.list.clear (); +}this.cList = null; +}); +Clazz.defineMethod (c$, "getSubcomponentWidth", +function () { +return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentWidth () : 0); +}); +Clazz.defineMethod (c$, "getSubcomponentHeight", +function () { +return (this.list != null && this.list.size () == 1 ? this.list.get (0).getSubcomponentHeight () : 0); +}); +}); diff --git a/bin/javajs/awt/Dimension.js b/bin/javajs/awt/Dimension.js index 4d21384..448d107 100644 --- a/bin/javajs/awt/Dimension.js +++ b/bin/javajs/awt/Dimension.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("javajs.awt"); -c$ = Clazz.decorateAsClass (function () { -this.width = 0; -this.height = 0; -Clazz.instantialize (this, arguments); -}, javajs.awt, "Dimension"); -Clazz.makeConstructor (c$, -function (w, h) { -this.set (w, h); -}, "~N,~N"); -Clazz.defineMethod (c$, "set", -function (w, h) { -this.width = w; -this.height = h; -return this; -}, "~N,~N"); +Clazz.declarePackage ("javajs.awt"); +c$ = Clazz.decorateAsClass (function () { +this.width = 0; +this.height = 0; +Clazz.instantialize (this, arguments); +}, javajs.awt, "Dimension"); +Clazz.makeConstructor (c$, +function (w, h) { +this.set (w, h); +}, "~N,~N"); +Clazz.defineMethod (c$, "set", +function (w, h) { +this.width = w; +this.height = h; +return this; +}, "~N,~N"); diff --git a/bin/javajs/awt/Font.js b/bin/javajs/awt/Font.js index a5f2df9..809c862 100644 --- a/bin/javajs/awt/Font.js +++ b/bin/javajs/awt/Font.js @@ -1,105 +1,105 @@ -Clazz.declarePackage ("javajs.awt"); -Clazz.load (null, "javajs.awt.Font", ["javajs.util.AU"], function () { -c$ = Clazz.decorateAsClass (function () { -this.fid = 0; -this.fontFace = null; -this.fontStyle = null; -this.fontSizeNominal = 0; -this.idFontFace = 0; -this.idFontStyle = 0; -this.fontSize = 0; -this.font = null; -this.fontMetrics = null; -this.manager = null; -this.ascent = 0; -this.descent = 0; -this.isBold = false; -this.isItalic = false; -Clazz.instantialize (this, arguments); -}, javajs.awt, "Font"); -Clazz.makeConstructor (c$, -($fz = function (manager, fid, idFontFace, idFontStyle, fontSize, fontSizeNominal, graphics) { -this.manager = manager; -this.fid = fid; -this.fontFace = javajs.awt.Font.fontFaces[idFontFace]; -this.fontStyle = javajs.awt.Font.fontStyles[idFontStyle]; -this.idFontFace = idFontFace; -this.idFontStyle = idFontStyle; -this.fontSize = fontSize; -this.isBold = (idFontStyle & 1) == 1; -this.isItalic = (idFontStyle & 2) == 2; -this.fontSizeNominal = fontSizeNominal; -this.font = manager.newFont (javajs.awt.Font.fontFaces[idFontFace], this.isBold, this.isItalic, fontSize); -this.fontMetrics = manager.getFontMetrics (this, graphics); -this.descent = manager.getFontDescent (this.fontMetrics); -this.ascent = manager.getFontAscent (this.fontMetrics); -}, $fz.isPrivate = true, $fz), "javajs.api.FontManager,~N,~N,~N,~N,~N,~O"); -c$.getFont3D = Clazz.defineMethod (c$, "getFont3D", -function (fontID) { -return javajs.awt.Font.font3ds[fontID & 0xFF]; -}, "~N"); -c$.createFont3D = Clazz.defineMethod (c$, "createFont3D", -function (fontface, fontstyle, fontsize, fontsizeNominal, manager, graphicsForMetrics) { -if (fontsize > 0xFF) fontsize = 0xFF; -var fontsizeX16 = (Clazz.floatToInt (fontsize)) << 4; -var fontkey = ((fontface & 3) | ((fontstyle & 3) << 2) | (fontsizeX16 << 4)); -for (var i = javajs.awt.Font.fontkeyCount; --i > 0; ) if (fontkey == javajs.awt.Font.fontkeys[i] && javajs.awt.Font.font3ds[i].fontSizeNominal == fontsizeNominal) return javajs.awt.Font.font3ds[i]; - -var fontIndexNext = javajs.awt.Font.fontkeyCount++; -if (fontIndexNext == javajs.awt.Font.fontkeys.length) javajs.awt.Font.fontkeys = javajs.util.AU.arrayCopyI (javajs.awt.Font.fontkeys, fontIndexNext + 8); -javajs.awt.Font.font3ds = javajs.util.AU.arrayCopyObject (javajs.awt.Font.font3ds, fontIndexNext + 8); -var font3d = new javajs.awt.Font (manager, fontIndexNext, fontface, fontstyle, fontsize, fontsizeNominal, graphicsForMetrics); -javajs.awt.Font.font3ds[fontIndexNext] = font3d; -javajs.awt.Font.fontkeys[fontIndexNext] = fontkey; -return font3d; -}, "~N,~N,~N,~N,javajs.api.FontManager,~O"); -c$.getFontFaceID = Clazz.defineMethod (c$, "getFontFaceID", -function (fontface) { -return ("Monospaced".equalsIgnoreCase (fontface) ? 2 : "Serif".equalsIgnoreCase (fontface) ? 1 : 0); -}, "~S"); -c$.getFontStyleID = Clazz.defineMethod (c$, "getFontStyleID", -function (fontstyle) { -for (var i = 4; --i >= 0; ) if (javajs.awt.Font.fontStyles[i].equalsIgnoreCase (fontstyle)) return i; - -return -1; -}, "~S"); -Clazz.defineMethod (c$, "getAscent", -function () { -return this.ascent; -}); -Clazz.defineMethod (c$, "getDescent", -function () { -return this.descent; -}); -Clazz.defineMethod (c$, "getHeight", -function () { -return this.getAscent () + this.getDescent (); -}); -Clazz.defineMethod (c$, "getFontMetrics", -function () { -return this.fontMetrics; -}); -Clazz.defineMethod (c$, "stringWidth", -function (text) { -return this.manager.fontStringWidth (this, text); -}, "~S"); -Clazz.defineMethod (c$, "getInfo", -function () { -return this.fontSizeNominal + " " + this.fontFace + " " + this.fontStyle; -}); -Clazz.defineStatics (c$, -"FONT_ALLOCATION_UNIT", 8, -"fontkeyCount", 1, -"fontkeys", Clazz.newIntArray (8, 0)); -c$.font3ds = c$.prototype.font3ds = new Array (8); -Clazz.defineStatics (c$, -"FONT_FACE_SANS", 0, -"FONT_FACE_SERIF", 1, -"FONT_FACE_MONO", 2, -"fontFaces", Clazz.newArray (-1, ["SansSerif", "Serif", "Monospaced", ""]), -"FONT_STYLE_PLAIN", 0, -"FONT_STYLE_BOLD", 1, -"FONT_STYLE_ITALIC", 2, -"FONT_STYLE_BOLDITALIC", 3, -"fontStyles", Clazz.newArray (-1, ["Plain", "Bold", "Italic", "BoldItalic"])); -}); +Clazz.declarePackage ("javajs.awt"); +Clazz.load (null, "javajs.awt.Font", ["javajs.util.AU"], function () { +c$ = Clazz.decorateAsClass (function () { +this.fid = 0; +this.fontFace = null; +this.fontStyle = null; +this.fontSizeNominal = 0; +this.idFontFace = 0; +this.idFontStyle = 0; +this.fontSize = 0; +this.font = null; +this.fontMetrics = null; +this.manager = null; +this.ascent = 0; +this.descent = 0; +this.isBold = false; +this.isItalic = false; +Clazz.instantialize (this, arguments); +}, javajs.awt, "Font"); +Clazz.makeConstructor (c$, +($fz = function (manager, fid, idFontFace, idFontStyle, fontSize, fontSizeNominal, graphics) { +this.manager = manager; +this.fid = fid; +this.fontFace = javajs.awt.Font.fontFaces[idFontFace]; +this.fontStyle = javajs.awt.Font.fontStyles[idFontStyle]; +this.idFontFace = idFontFace; +this.idFontStyle = idFontStyle; +this.fontSize = fontSize; +this.isBold = (idFontStyle & 1) == 1; +this.isItalic = (idFontStyle & 2) == 2; +this.fontSizeNominal = fontSizeNominal; +this.font = manager.newFont (javajs.awt.Font.fontFaces[idFontFace], this.isBold, this.isItalic, fontSize); +this.fontMetrics = manager.getFontMetrics (this, graphics); +this.descent = manager.getFontDescent (this.fontMetrics); +this.ascent = manager.getFontAscent (this.fontMetrics); +}, $fz.isPrivate = true, $fz), "javajs.api.FontManager,~N,~N,~N,~N,~N,~O"); +c$.getFont3D = Clazz.defineMethod (c$, "getFont3D", +function (fontID) { +return javajs.awt.Font.font3ds[fontID & 0xFF]; +}, "~N"); +c$.createFont3D = Clazz.defineMethod (c$, "createFont3D", +function (fontface, fontstyle, fontsize, fontsizeNominal, manager, graphicsForMetrics) { +if (fontsize > 0xFF) fontsize = 0xFF; +var fontsizeX16 = (Clazz.floatToInt (fontsize)) << 4; +var fontkey = ((fontface & 3) | ((fontstyle & 3) << 2) | (fontsizeX16 << 4)); +for (var i = javajs.awt.Font.fontkeyCount; --i > 0; ) if (fontkey == javajs.awt.Font.fontkeys[i] && javajs.awt.Font.font3ds[i].fontSizeNominal == fontsizeNominal) return javajs.awt.Font.font3ds[i]; + +var fontIndexNext = javajs.awt.Font.fontkeyCount++; +if (fontIndexNext == javajs.awt.Font.fontkeys.length) javajs.awt.Font.fontkeys = javajs.util.AU.arrayCopyI (javajs.awt.Font.fontkeys, fontIndexNext + 8); +javajs.awt.Font.font3ds = javajs.util.AU.arrayCopyObject (javajs.awt.Font.font3ds, fontIndexNext + 8); +var font3d = new javajs.awt.Font (manager, fontIndexNext, fontface, fontstyle, fontsize, fontsizeNominal, graphicsForMetrics); +javajs.awt.Font.font3ds[fontIndexNext] = font3d; +javajs.awt.Font.fontkeys[fontIndexNext] = fontkey; +return font3d; +}, "~N,~N,~N,~N,javajs.api.FontManager,~O"); +c$.getFontFaceID = Clazz.defineMethod (c$, "getFontFaceID", +function (fontface) { +return ("Monospaced".equalsIgnoreCase (fontface) ? 2 : "Serif".equalsIgnoreCase (fontface) ? 1 : 0); +}, "~S"); +c$.getFontStyleID = Clazz.defineMethod (c$, "getFontStyleID", +function (fontstyle) { +for (var i = 4; --i >= 0; ) if (javajs.awt.Font.fontStyles[i].equalsIgnoreCase (fontstyle)) return i; + +return -1; +}, "~S"); +Clazz.defineMethod (c$, "getAscent", +function () { +return this.ascent; +}); +Clazz.defineMethod (c$, "getDescent", +function () { +return this.descent; +}); +Clazz.defineMethod (c$, "getHeight", +function () { +return this.getAscent () + this.getDescent (); +}); +Clazz.defineMethod (c$, "getFontMetrics", +function () { +return this.fontMetrics; +}); +Clazz.defineMethod (c$, "stringWidth", +function (text) { +return this.manager.fontStringWidth (this, text); +}, "~S"); +Clazz.defineMethod (c$, "getInfo", +function () { +return this.fontSizeNominal + " " + this.fontFace + " " + this.fontStyle; +}); +Clazz.defineStatics (c$, +"FONT_ALLOCATION_UNIT", 8, +"fontkeyCount", 1, +"fontkeys", Clazz.newIntArray (8, 0)); +c$.font3ds = c$.prototype.font3ds = new Array (8); +Clazz.defineStatics (c$, +"FONT_FACE_SANS", 0, +"FONT_FACE_SERIF", 1, +"FONT_FACE_MONO", 2, +"fontFaces", Clazz.newArray (-1, ["SansSerif", "Serif", "Monospaced", ""]), +"FONT_STYLE_PLAIN", 0, +"FONT_STYLE_BOLD", 1, +"FONT_STYLE_ITALIC", 2, +"FONT_STYLE_BOLDITALIC", 3, +"fontStyles", Clazz.newArray (-1, ["Plain", "Bold", "Italic", "BoldItalic"])); +}); diff --git a/bin/javajs/awt/LayoutManager.js b/bin/javajs/awt/LayoutManager.js index 49c8b3a..93d4055 100644 --- a/bin/javajs/awt/LayoutManager.js +++ b/bin/javajs/awt/LayoutManager.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.awt"); -c$ = Clazz.declareType (javajs.awt, "LayoutManager"); +Clazz.declarePackage ("javajs.awt"); +c$ = Clazz.declareType (javajs.awt, "LayoutManager"); diff --git a/bin/javajs/awt/event/ActionEvent.js b/bin/javajs/awt/event/ActionEvent.js index 11f0d44..5ff2dcc 100644 --- a/bin/javajs/awt/event/ActionEvent.js +++ b/bin/javajs/awt/event/ActionEvent.js @@ -1,11 +1,11 @@ -Clazz.declarePackage ("javajs.awt.event"); -Clazz.load (["javajs.awt.event.Event"], "javajs.awt.event.ActionEvent", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.actionCommand = null; -Clazz.instantialize (this, arguments); -}, javajs.awt.event, "ActionEvent", javajs.awt.event.Event); -Clazz.defineMethod (c$, "getActionCommand", -function () { -return this.actionCommand; -}); -}); +Clazz.declarePackage ("javajs.awt.event"); +Clazz.load (["javajs.awt.event.Event"], "javajs.awt.event.ActionEvent", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.actionCommand = null; +Clazz.instantialize (this, arguments); +}, javajs.awt.event, "ActionEvent", javajs.awt.event.Event); +Clazz.defineMethod (c$, "getActionCommand", +function () { +return this.actionCommand; +}); +}); diff --git a/bin/javajs/awt/event/ActionListener.js b/bin/javajs/awt/event/ActionListener.js index c41017a..09f483e 100644 --- a/bin/javajs/awt/event/ActionListener.js +++ b/bin/javajs/awt/event/ActionListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.awt.event"); -Clazz.declareInterface (javajs.awt.event, "ActionListener"); +Clazz.declarePackage ("javajs.awt.event"); +Clazz.declareInterface (javajs.awt.event, "ActionListener"); diff --git a/bin/javajs/awt/event/Event.js b/bin/javajs/awt/event/Event.js index 795e48f..522ac2f 100644 --- a/bin/javajs/awt/event/Event.js +++ b/bin/javajs/awt/event/Event.js @@ -1,49 +1,49 @@ -Clazz.declarePackage ("javajs.awt.event"); -c$ = Clazz.decorateAsClass (function () { -this.source = null; -Clazz.instantialize (this, arguments); -}, javajs.awt.event, "Event"); -Clazz.defineMethod (c$, "getSource", -function () { -return this.source; -}); -Clazz.defineStatics (c$, -"MOUSE_LEFT", 16, -"MOUSE_MIDDLE", 8, -"MOUSE_RIGHT", 4, -"MOUSE_WHEEL", 32, -"MAC_COMMAND", 20, -"BUTTON_MASK", 28, -"MOUSE_DOWN", 501, -"MOUSE_UP", 502, -"MOUSE_MOVE", 503, -"MOUSE_ENTER", 504, -"MOUSE_EXIT", 505, -"MOUSE_DRAG", 506, -"SHIFT_MASK", 1, -"ALT_MASK", 8, -"CTRL_MASK", 2, -"CTRL_ALT", 10, -"CTRL_SHIFT", 3, -"META_MASK", 4, -"VK_SHIFT", 16, -"VK_ALT", 18, -"VK_CONTROL", 17, -"VK_META", 157, -"VK_LEFT", 37, -"VK_RIGHT", 39, -"VK_PERIOD", 46, -"VK_SPACE", 32, -"VK_DOWN", 40, -"VK_UP", 38, -"VK_ESCAPE", 27, -"VK_DELETE", 127, -"VK_BACK_SPACE", 8, -"VK_PAGE_DOWN", 34, -"VK_PAGE_UP", 33, -"MOVED", 0, -"DRAGGED", 1, -"CLICKED", 2, -"WHEELED", 3, -"PRESSED", 4, -"RELEASED", 5); +Clazz.declarePackage ("javajs.awt.event"); +c$ = Clazz.decorateAsClass (function () { +this.source = null; +Clazz.instantialize (this, arguments); +}, javajs.awt.event, "Event"); +Clazz.defineMethod (c$, "getSource", +function () { +return this.source; +}); +Clazz.defineStatics (c$, +"MOUSE_LEFT", 16, +"MOUSE_MIDDLE", 8, +"MOUSE_RIGHT", 4, +"MOUSE_WHEEL", 32, +"MAC_COMMAND", 20, +"BUTTON_MASK", 28, +"MOUSE_DOWN", 501, +"MOUSE_UP", 502, +"MOUSE_MOVE", 503, +"MOUSE_ENTER", 504, +"MOUSE_EXIT", 505, +"MOUSE_DRAG", 506, +"SHIFT_MASK", 1, +"ALT_MASK", 8, +"CTRL_MASK", 2, +"CTRL_ALT", 10, +"CTRL_SHIFT", 3, +"META_MASK", 4, +"VK_SHIFT", 16, +"VK_ALT", 18, +"VK_CONTROL", 17, +"VK_META", 157, +"VK_LEFT", 37, +"VK_RIGHT", 39, +"VK_PERIOD", 46, +"VK_SPACE", 32, +"VK_DOWN", 40, +"VK_UP", 38, +"VK_ESCAPE", 27, +"VK_DELETE", 127, +"VK_BACK_SPACE", 8, +"VK_PAGE_DOWN", 34, +"VK_PAGE_UP", 33, +"MOVED", 0, +"DRAGGED", 1, +"CLICKED", 2, +"WHEELED", 3, +"PRESSED", 4, +"RELEASED", 5); diff --git a/bin/javajs/awt/event/ItemEvent.js b/bin/javajs/awt/event/ItemEvent.js index 8aa944f..b2722ab 100644 --- a/bin/javajs/awt/event/ItemEvent.js +++ b/bin/javajs/awt/event/ItemEvent.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("javajs.awt.event"); -Clazz.load (["javajs.awt.event.Event"], "javajs.awt.event.ItemEvent", null, function () { -c$ = Clazz.declareType (javajs.awt.event, "ItemEvent", javajs.awt.event.Event); -}); +Clazz.declarePackage ("javajs.awt.event"); +Clazz.load (["javajs.awt.event.Event"], "javajs.awt.event.ItemEvent", null, function () { +c$ = Clazz.declareType (javajs.awt.event, "ItemEvent", javajs.awt.event.Event); +}); diff --git a/bin/javajs/awt/event/WindowEvent.js b/bin/javajs/awt/event/WindowEvent.js index efa578b..0017c88 100644 --- a/bin/javajs/awt/event/WindowEvent.js +++ b/bin/javajs/awt/event/WindowEvent.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("javajs.awt.event"); -Clazz.load (["javajs.awt.event.Event"], "javajs.awt.event.WindowEvent", null, function () { -c$ = Clazz.declareType (javajs.awt.event, "WindowEvent", javajs.awt.event.Event); -}); +Clazz.declarePackage ("javajs.awt.event"); +Clazz.load (["javajs.awt.event.Event"], "javajs.awt.event.WindowEvent", null, function () { +c$ = Clazz.declareType (javajs.awt.event, "WindowEvent", javajs.awt.event.Event); +}); diff --git a/bin/javajs/awt/event/WindowListener.js b/bin/javajs/awt/event/WindowListener.js index bb9e9c5..7656d2f 100644 --- a/bin/javajs/awt/event/WindowListener.js +++ b/bin/javajs/awt/event/WindowListener.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.awt.event"); -Clazz.declareInterface (javajs.awt.event, "WindowListener"); +Clazz.declarePackage ("javajs.awt.event"); +Clazz.declareInterface (javajs.awt.event, "WindowListener"); diff --git a/bin/javajs/export/PDFCreator.js b/bin/javajs/export/PDFCreator.js index 7f5c820..3442530 100644 --- a/bin/javajs/export/PDFCreator.js +++ b/bin/javajs/export/PDFCreator.js @@ -1,300 +1,300 @@ -Clazz.declarePackage ("javajs.export"); -Clazz.load (null, "javajs.export.PDFCreator", ["java.lang.Double", "java.util.Hashtable", "javajs.export.PDFObject", "javajs.util.Lst", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.os = null; -this.indirectObjects = null; -this.root = null; -this.graphics = null; -this.pt = 0; -this.xrefPt = 0; -this.count = 0; -this.height = 0; -this.width = 0; -this.fonts = null; -this.images = null; -Clazz.instantialize (this, arguments); -}, javajs["export"], "PDFCreator"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "setOutputStream", -function (os) { -this.os = os; -}, "java.io.OutputStream"); -Clazz.defineMethod (c$, "newDocument", -function (paperWidth, paperHeight, isLandscape) { -this.width = (isLandscape ? paperHeight : paperWidth); -this.height = (isLandscape ? paperWidth : paperHeight); -System.out.println ("Creating PDF with width=" + this.width + " and height=" + this.height); -this.fonts = new java.util.Hashtable (); -this.indirectObjects = new javajs.util.Lst (); -this.root = this.newObject ("Catalog"); -var pages = this.newObject ("Pages"); -var page = this.newObject ("Page"); -var pageContents = this.newObject (null); -this.graphics = this.newObject ("XObject"); -this.root.addDef ("Pages", pages.getRef ()); -pages.addDef ("Count", "1"); -pages.addDef ("Kids", "[ " + page.getRef () + " ]"); -page.addDef ("Parent", pages.getRef ()); -page.addDef ("MediaBox", "[ 0 0 " + paperWidth + " " + paperHeight + " ]"); -if (isLandscape) page.addDef ("Rotate", "90"); -pageContents.addDef ("Length", "?"); -pageContents.append ((isLandscape ? "q 0 1 1 0 0 0 " : "q 1 0 0 -1 0 " + (paperHeight)) + " cm /" + this.graphics.getID () + " Do Q"); -page.addDef ("Contents", pageContents.getRef ()); -this.addProcSet (page); -this.addProcSet (this.graphics); -this.graphics.addDef ("Subtype", "/Form"); -this.graphics.addDef ("FormType", "1"); -this.graphics.addDef ("BBox", "[0 0 " + this.width + " " + this.height + "]"); -this.graphics.addDef ("Matrix", "[1 0 0 1 0 0]"); -this.graphics.addDef ("Length", "?"); -page.addResource ("XObject", this.graphics.getID (), this.graphics.getRef ()); -this.g ("q 1 w 1 J 1 j 10 M []0 d q "); -this.clip (0, 0, this.width, this.height); -}, "~N,~N,~B"); -Clazz.defineMethod (c$, "addProcSet", -($fz = function (o) { -o.addResource (null, "ProcSet", "[/PDF /Text /ImageB /ImageC /ImageI]"); -}, $fz.isPrivate = true, $fz), "javajs.export.PDFObject"); -Clazz.defineMethod (c$, "clip", -($fz = function (x1, y1, x2, y2) { -this.moveto (x1, y1); -this.lineto (x2, y1); -this.lineto (x2, y2); -this.lineto (x1, y2); -this.g ("h W n"); -}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "moveto", -function (x, y) { -this.g (x + " " + y + " m"); -}, "~N,~N"); -Clazz.defineMethod (c$, "lineto", -function (x, y) { -this.g (x + " " + y + " l"); -}, "~N,~N"); -Clazz.defineMethod (c$, "newObject", -($fz = function (type) { -var o = new javajs["export"].PDFObject (++this.count); -if (type != null) o.addDef ("Type", "/" + type); -this.indirectObjects.addLast (o); -return o; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "addInfo", -function (data) { -var info = new java.util.Hashtable (); -for (var e, $e = data.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { -var value = "(" + e.getValue ().$replace (')', '_').$replace ('(', '_') + ")"; -info.put (e.getKey (), value); -} -this.root.addDef ("Info", info); -}, "java.util.Map"); -Clazz.defineMethod (c$, "addFontResource", -($fz = function (fname) { -var f = this.newObject ("Font"); -this.fonts.put (fname, f); -f.addDef ("BaseFont", fname); -f.addDef ("Encoding", "/WinAnsiEncoding"); -f.addDef ("Subtype", "/Type1"); -this.graphics.addResource ("Font", f.getID (), f.getRef ()); -return f; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "addImageResource", -function (newImage, width, height, buffer, isRGB) { -var imageObj = this.newObject ("XObject"); -if (this.images == null) this.images = new java.util.Hashtable (); -this.images.put (newImage, imageObj); -imageObj.addDef ("Subtype", "/Image"); -imageObj.addDef ("Length", "?"); -imageObj.addDef ("ColorSpace", isRGB ? "/DeviceRGB" : "/DeviceGray"); -imageObj.addDef ("BitsPerComponent", "8"); -imageObj.addDef ("Width", "" + width); -imageObj.addDef ("Height", "" + height); -this.graphics.addResource ("XObject", imageObj.getID (), imageObj.getRef ()); -var n = buffer.length; -var stream = Clazz.newByteArray (n * (isRGB ? 3 : 1), 0); -if (isRGB) { -for (var i = 0, pt = 0; i < n; i++) { -stream[pt++] = ((buffer[i] >> 16) & 0xFF); -stream[pt++] = ((buffer[i] >> 8) & 0xFF); -stream[pt++] = (buffer[i] & 0xFF); -} -} else { -for (var i = 0; i < n; i++) stream[i] = buffer[i]; - -}imageObj.setStream (stream); -this.graphics.addResource ("XObject", imageObj.getID (), imageObj.getRef ()); -}, "~O,~N,~N,~A,~B"); -Clazz.defineMethod (c$, "g", -function (cmd) { -this.graphics.append (cmd).appendC ('\n'); -}, "~S"); -Clazz.defineMethod (c$, "output", -($fz = function (s) { -var b = s.getBytes (); -this.os.write (b, 0, b.length); -this.pt += b.length; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "closeDocument", -function () { -this.g ("Q Q"); -this.outputHeader (); -this.writeObjects (); -this.writeXRefTable (); -this.writeTrailer (); -this.os.flush (); -this.os.close (); -}); -Clazz.defineMethod (c$, "outputHeader", -($fz = function () { -this.output ("%PDF-1.3\n%"); -var b = Clazz.newByteArray (-1, [-1, -1, -1, -1]); -this.os.write (b, 0, b.length); -this.pt += 4; -this.output ("\n"); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeTrailer", -($fz = function () { -var trailer = new javajs["export"].PDFObject (-2); -this.output ("trailer"); -trailer.addDef ("Size", "" + this.indirectObjects.size ()); -trailer.addDef ("Root", this.root.getRef ()); -trailer.output (this.os); -this.output ("startxref\n"); -this.output ("" + this.xrefPt + "\n"); -this.output ("%%EOF\n"); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeObjects", -($fz = function () { -var nObj = this.indirectObjects.size (); -for (var i = 0; i < nObj; i++) { -var o = this.indirectObjects.get (i); -if (!o.isFont ()) continue; -o.pt = this.pt; -this.pt += o.output (this.os); -} -for (var i = 0; i < nObj; i++) { -var o = this.indirectObjects.get (i); -if (o.isFont ()) continue; -o.pt = this.pt; -this.pt += o.output (this.os); -} -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeXRefTable", -($fz = function () { -this.xrefPt = this.pt; -var nObj = this.indirectObjects.size (); -var sb = new javajs.util.SB (); -sb.append ("xref\n0 " + (nObj + 1) + "\n0000000000 65535 f\r\n"); -for (var i = 0; i < nObj; i++) { -var o = this.indirectObjects.get (i); -var s = "0000000000" + o.pt; -sb.append (s.substring (s.length - 10)); -sb.append (" 00000 n\r\n"); -} -this.output (sb.toString ()); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "canDoLineTo", -function () { -return true; -}); -Clazz.defineMethod (c$, "fill", -function () { -this.g ("f"); -}); -Clazz.defineMethod (c$, "stroke", -function () { -this.g ("S"); -}); -Clazz.defineMethod (c$, "doCircle", -function (x, y, r, doFill) { -var d = r * 4 * (Math.sqrt (2) - 1) / 3; -var dx = x; -var dy = y; -this.g ((dx + r) + " " + dy + " m"); -this.g ((dx + r) + " " + (dy + d) + " " + (dx + d) + " " + (dy + r) + " " + (dx) + " " + (dy + r) + " " + " c"); -this.g ((dx - d) + " " + (dy + r) + " " + (dx - r) + " " + (dy + d) + " " + (dx - r) + " " + (dy) + " c"); -this.g ((dx - r) + " " + (dy - d) + " " + (dx - d) + " " + (dy - r) + " " + (dx) + " " + (dy - r) + " c"); -this.g ((dx + d) + " " + (dy - r) + " " + (dx + r) + " " + (dy - d) + " " + (dx + r) + " " + (dy) + " c"); -this.g (doFill ? "f" : "s"); -}, "~N,~N,~N,~B"); -Clazz.defineMethod (c$, "doPolygon", -function (axPoints, ayPoints, nPoints, doFill) { -this.moveto (axPoints[0], ayPoints[0]); -for (var i = 1; i < nPoints; i++) this.lineto (axPoints[i], ayPoints[i]); - -this.g (doFill ? "f" : "s"); -}, "~A,~A,~N,~B"); -Clazz.defineMethod (c$, "doRect", -function (x, y, width, height, doFill) { -this.g (x + " " + y + " " + width + " " + height + " re " + (doFill ? "f" : "s")); -}, "~N,~N,~N,~N,~B"); -Clazz.defineMethod (c$, "drawImage", -function (image, destX0, destY0, destX1, destY1, srcX0, srcY0, srcX1, srcY1) { -var imageObj = this.images.get (image); -if (imageObj == null) return; -this.g ("q"); -this.clip (destX0, destY0, destX1, destY1); -var iw = Double.parseDouble (imageObj.getDef ("Width")); -var ih = Double.parseDouble (imageObj.getDef ("Height")); -var dw = (destX1 - destX0 + 1); -var dh = (destY1 - destY0 + 1); -var sw = (srcX1 - srcX0 + 1); -var sh = (srcY1 - srcY0 + 1); -var scaleX = dw / sw; -var scaleY = dh / sh; -var transX = destX0 - srcX0 * scaleX; -var transY = destY0 + (ih - srcY0) * scaleY; -this.g (scaleX * iw + " 0 0 " + -scaleY * ih + " " + transX + " " + transY + " cm"); -this.g ("/" + imageObj.getID () + " Do"); -this.g ("Q"); -}, "~O,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "drawStringRotated", -function (s, x, y, angle) { -this.g ("q " + this.getRotation (angle) + " " + x + " " + y + " cm BT(" + s + ")Tj ET Q"); -}, "~S,~N,~N,~N"); -Clazz.defineMethod (c$, "getRotation", -function (angle) { -var cos = 0; -var sin = 0; -switch (angle) { -case 0: -cos = 1; -break; -case 90: -sin = 1; -break; -case -90: -sin = -1; -break; -case 180: -cos = -1; -break; -default: -var a = (angle / 180.0 * 3.141592653589793); -cos = Math.cos (a); -sin = Math.sin (a); -if (Math.abs (cos) < 0.0001) cos = 0; -if (Math.abs (sin) < 0.0001) sin = 0; -} -return cos + " " + sin + " " + sin + " " + -cos; -}, "~N"); -Clazz.defineMethod (c$, "setColor", -function (rgb, isFill) { -this.g (rgb[0] + " " + rgb[1] + " " + rgb[2] + (isFill ? " rg" : " RG")); -}, "~A,~B"); -Clazz.defineMethod (c$, "setFont", -function (fname, size) { -var f = this.fonts.get (fname); -if (f == null) f = this.addFontResource (fname); -this.g ("/" + f.getID () + " " + size + " Tf"); -}, "~S,~N"); -Clazz.defineMethod (c$, "setLineWidth", -function (width) { -this.g (width + " w"); -}, "~N"); -Clazz.defineMethod (c$, "translateScale", -function (x, y, scale) { -this.g (scale + " 0 0 " + scale + " " + x + " " + y + " cm"); -}, "~N,~N,~N"); -}); +Clazz.declarePackage ("javajs.export"); +Clazz.load (null, "javajs.export.PDFCreator", ["java.lang.Double", "java.util.Hashtable", "javajs.export.PDFObject", "javajs.util.Lst", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.os = null; +this.indirectObjects = null; +this.root = null; +this.graphics = null; +this.pt = 0; +this.xrefPt = 0; +this.count = 0; +this.height = 0; +this.width = 0; +this.fonts = null; +this.images = null; +Clazz.instantialize (this, arguments); +}, javajs["export"], "PDFCreator"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "setOutputStream", +function (os) { +this.os = os; +}, "java.io.OutputStream"); +Clazz.defineMethod (c$, "newDocument", +function (paperWidth, paperHeight, isLandscape) { +this.width = (isLandscape ? paperHeight : paperWidth); +this.height = (isLandscape ? paperWidth : paperHeight); +System.out.println ("Creating PDF with width=" + this.width + " and height=" + this.height); +this.fonts = new java.util.Hashtable (); +this.indirectObjects = new javajs.util.Lst (); +this.root = this.newObject ("Catalog"); +var pages = this.newObject ("Pages"); +var page = this.newObject ("Page"); +var pageContents = this.newObject (null); +this.graphics = this.newObject ("XObject"); +this.root.addDef ("Pages", pages.getRef ()); +pages.addDef ("Count", "1"); +pages.addDef ("Kids", "[ " + page.getRef () + " ]"); +page.addDef ("Parent", pages.getRef ()); +page.addDef ("MediaBox", "[ 0 0 " + paperWidth + " " + paperHeight + " ]"); +if (isLandscape) page.addDef ("Rotate", "90"); +pageContents.addDef ("Length", "?"); +pageContents.append ((isLandscape ? "q 0 1 1 0 0 0 " : "q 1 0 0 -1 0 " + (paperHeight)) + " cm /" + this.graphics.getID () + " Do Q"); +page.addDef ("Contents", pageContents.getRef ()); +this.addProcSet (page); +this.addProcSet (this.graphics); +this.graphics.addDef ("Subtype", "/Form"); +this.graphics.addDef ("FormType", "1"); +this.graphics.addDef ("BBox", "[0 0 " + this.width + " " + this.height + "]"); +this.graphics.addDef ("Matrix", "[1 0 0 1 0 0]"); +this.graphics.addDef ("Length", "?"); +page.addResource ("XObject", this.graphics.getID (), this.graphics.getRef ()); +this.g ("q 1 w 1 J 1 j 10 M []0 d q "); +this.clip (0, 0, this.width, this.height); +}, "~N,~N,~B"); +Clazz.defineMethod (c$, "addProcSet", +($fz = function (o) { +o.addResource (null, "ProcSet", "[/PDF /Text /ImageB /ImageC /ImageI]"); +}, $fz.isPrivate = true, $fz), "javajs.export.PDFObject"); +Clazz.defineMethod (c$, "clip", +($fz = function (x1, y1, x2, y2) { +this.moveto (x1, y1); +this.lineto (x2, y1); +this.lineto (x2, y2); +this.lineto (x1, y2); +this.g ("h W n"); +}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "moveto", +function (x, y) { +this.g (x + " " + y + " m"); +}, "~N,~N"); +Clazz.defineMethod (c$, "lineto", +function (x, y) { +this.g (x + " " + y + " l"); +}, "~N,~N"); +Clazz.defineMethod (c$, "newObject", +($fz = function (type) { +var o = new javajs["export"].PDFObject (++this.count); +if (type != null) o.addDef ("Type", "/" + type); +this.indirectObjects.addLast (o); +return o; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "addInfo", +function (data) { +var info = new java.util.Hashtable (); +for (var e, $e = data.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { +var value = "(" + e.getValue ().$replace (')', '_').$replace ('(', '_') + ")"; +info.put (e.getKey (), value); +} +this.root.addDef ("Info", info); +}, "java.util.Map"); +Clazz.defineMethod (c$, "addFontResource", +($fz = function (fname) { +var f = this.newObject ("Font"); +this.fonts.put (fname, f); +f.addDef ("BaseFont", fname); +f.addDef ("Encoding", "/WinAnsiEncoding"); +f.addDef ("Subtype", "/Type1"); +this.graphics.addResource ("Font", f.getID (), f.getRef ()); +return f; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "addImageResource", +function (newImage, width, height, buffer, isRGB) { +var imageObj = this.newObject ("XObject"); +if (this.images == null) this.images = new java.util.Hashtable (); +this.images.put (newImage, imageObj); +imageObj.addDef ("Subtype", "/Image"); +imageObj.addDef ("Length", "?"); +imageObj.addDef ("ColorSpace", isRGB ? "/DeviceRGB" : "/DeviceGray"); +imageObj.addDef ("BitsPerComponent", "8"); +imageObj.addDef ("Width", "" + width); +imageObj.addDef ("Height", "" + height); +this.graphics.addResource ("XObject", imageObj.getID (), imageObj.getRef ()); +var n = buffer.length; +var stream = Clazz.newByteArray (n * (isRGB ? 3 : 1), 0); +if (isRGB) { +for (var i = 0, pt = 0; i < n; i++) { +stream[pt++] = ((buffer[i] >> 16) & 0xFF); +stream[pt++] = ((buffer[i] >> 8) & 0xFF); +stream[pt++] = (buffer[i] & 0xFF); +} +} else { +for (var i = 0; i < n; i++) stream[i] = buffer[i]; + +}imageObj.setStream (stream); +this.graphics.addResource ("XObject", imageObj.getID (), imageObj.getRef ()); +}, "~O,~N,~N,~A,~B"); +Clazz.defineMethod (c$, "g", +function (cmd) { +this.graphics.append (cmd).appendC ('\n'); +}, "~S"); +Clazz.defineMethod (c$, "output", +($fz = function (s) { +var b = s.getBytes (); +this.os.write (b, 0, b.length); +this.pt += b.length; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "closeDocument", +function () { +this.g ("Q Q"); +this.outputHeader (); +this.writeObjects (); +this.writeXRefTable (); +this.writeTrailer (); +this.os.flush (); +this.os.close (); +}); +Clazz.defineMethod (c$, "outputHeader", +($fz = function () { +this.output ("%PDF-1.3\n%"); +var b = Clazz.newByteArray (-1, [-1, -1, -1, -1]); +this.os.write (b, 0, b.length); +this.pt += 4; +this.output ("\n"); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeTrailer", +($fz = function () { +var trailer = new javajs["export"].PDFObject (-2); +this.output ("trailer"); +trailer.addDef ("Size", "" + this.indirectObjects.size ()); +trailer.addDef ("Root", this.root.getRef ()); +trailer.output (this.os); +this.output ("startxref\n"); +this.output ("" + this.xrefPt + "\n"); +this.output ("%%EOF\n"); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeObjects", +($fz = function () { +var nObj = this.indirectObjects.size (); +for (var i = 0; i < nObj; i++) { +var o = this.indirectObjects.get (i); +if (!o.isFont ()) continue; +o.pt = this.pt; +this.pt += o.output (this.os); +} +for (var i = 0; i < nObj; i++) { +var o = this.indirectObjects.get (i); +if (o.isFont ()) continue; +o.pt = this.pt; +this.pt += o.output (this.os); +} +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeXRefTable", +($fz = function () { +this.xrefPt = this.pt; +var nObj = this.indirectObjects.size (); +var sb = new javajs.util.SB (); +sb.append ("xref\n0 " + (nObj + 1) + "\n0000000000 65535 f\r\n"); +for (var i = 0; i < nObj; i++) { +var o = this.indirectObjects.get (i); +var s = "0000000000" + o.pt; +sb.append (s.substring (s.length - 10)); +sb.append (" 00000 n\r\n"); +} +this.output (sb.toString ()); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "canDoLineTo", +function () { +return true; +}); +Clazz.defineMethod (c$, "fill", +function () { +this.g ("f"); +}); +Clazz.defineMethod (c$, "stroke", +function () { +this.g ("S"); +}); +Clazz.defineMethod (c$, "doCircle", +function (x, y, r, doFill) { +var d = r * 4 * (Math.sqrt (2) - 1) / 3; +var dx = x; +var dy = y; +this.g ((dx + r) + " " + dy + " m"); +this.g ((dx + r) + " " + (dy + d) + " " + (dx + d) + " " + (dy + r) + " " + (dx) + " " + (dy + r) + " " + " c"); +this.g ((dx - d) + " " + (dy + r) + " " + (dx - r) + " " + (dy + d) + " " + (dx - r) + " " + (dy) + " c"); +this.g ((dx - r) + " " + (dy - d) + " " + (dx - d) + " " + (dy - r) + " " + (dx) + " " + (dy - r) + " c"); +this.g ((dx + d) + " " + (dy - r) + " " + (dx + r) + " " + (dy - d) + " " + (dx + r) + " " + (dy) + " c"); +this.g (doFill ? "f" : "s"); +}, "~N,~N,~N,~B"); +Clazz.defineMethod (c$, "doPolygon", +function (axPoints, ayPoints, nPoints, doFill) { +this.moveto (axPoints[0], ayPoints[0]); +for (var i = 1; i < nPoints; i++) this.lineto (axPoints[i], ayPoints[i]); + +this.g (doFill ? "f" : "s"); +}, "~A,~A,~N,~B"); +Clazz.defineMethod (c$, "doRect", +function (x, y, width, height, doFill) { +this.g (x + " " + y + " " + width + " " + height + " re " + (doFill ? "f" : "s")); +}, "~N,~N,~N,~N,~B"); +Clazz.defineMethod (c$, "drawImage", +function (image, destX0, destY0, destX1, destY1, srcX0, srcY0, srcX1, srcY1) { +var imageObj = this.images.get (image); +if (imageObj == null) return; +this.g ("q"); +this.clip (destX0, destY0, destX1, destY1); +var iw = Double.parseDouble (imageObj.getDef ("Width")); +var ih = Double.parseDouble (imageObj.getDef ("Height")); +var dw = (destX1 - destX0 + 1); +var dh = (destY1 - destY0 + 1); +var sw = (srcX1 - srcX0 + 1); +var sh = (srcY1 - srcY0 + 1); +var scaleX = dw / sw; +var scaleY = dh / sh; +var transX = destX0 - srcX0 * scaleX; +var transY = destY0 + (ih - srcY0) * scaleY; +this.g (scaleX * iw + " 0 0 " + -scaleY * ih + " " + transX + " " + transY + " cm"); +this.g ("/" + imageObj.getID () + " Do"); +this.g ("Q"); +}, "~O,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "drawStringRotated", +function (s, x, y, angle) { +this.g ("q " + this.getRotation (angle) + " " + x + " " + y + " cm BT(" + s + ")Tj ET Q"); +}, "~S,~N,~N,~N"); +Clazz.defineMethod (c$, "getRotation", +function (angle) { +var cos = 0; +var sin = 0; +switch (angle) { +case 0: +cos = 1; +break; +case 90: +sin = 1; +break; +case -90: +sin = -1; +break; +case 180: +cos = -1; +break; +default: +var a = (angle / 180.0 * 3.141592653589793); +cos = Math.cos (a); +sin = Math.sin (a); +if (Math.abs (cos) < 0.0001) cos = 0; +if (Math.abs (sin) < 0.0001) sin = 0; +} +return cos + " " + sin + " " + sin + " " + -cos; +}, "~N"); +Clazz.defineMethod (c$, "setColor", +function (rgb, isFill) { +this.g (rgb[0] + " " + rgb[1] + " " + rgb[2] + (isFill ? " rg" : " RG")); +}, "~A,~B"); +Clazz.defineMethod (c$, "setFont", +function (fname, size) { +var f = this.fonts.get (fname); +if (f == null) f = this.addFontResource (fname); +this.g ("/" + f.getID () + " " + size + " Tf"); +}, "~S,~N"); +Clazz.defineMethod (c$, "setLineWidth", +function (width) { +this.g (width + " w"); +}, "~N"); +Clazz.defineMethod (c$, "translateScale", +function (x, y, scale) { +this.g (scale + " 0 0 " + scale + " " + x + " " + y + " cm"); +}, "~N,~N,~N"); +}); diff --git a/bin/javajs/export/PDFObject.class b/bin/javajs/export/PDFObject.class index c270a411f8333e6fb94111d5819a948501ffddad..9a6e8fe60f1f870090012f926373ca0fbfadfc4d 100644 GIT binary patch delta 54 zcmbQIJ6CtZOCd(R&98*^GBOu1a7 0) { -var s = this.index + " 0 obj\n"; -this.write (os, s.getBytes (), 0); -}var streamLen = 0; -if (this.dictionary != null) { -if (this.dictionary.containsKey ("Length")) { -if (this.stream == null) this.setAsStream (); -streamLen = this.stream.length; -var doDeflate = (streamLen > 1000); -if (doDeflate) { -var deflater = new java.util.zip.Deflater (9); -var outBytes = new java.io.ByteArrayOutputStream (1024); -var compBytes = new java.util.zip.DeflaterOutputStream (outBytes, deflater); -compBytes.write (this.stream, 0, streamLen); -compBytes.finish (); -this.stream = outBytes.toByteArray (); -this.dictionary.put ("Filter", "/FlateDecode"); -streamLen = this.stream.length; -}this.dictionary.put ("Length", "" + streamLen); -}this.write (os, this.getDictionaryText (this.dictionary, "\n").getBytes (), 0); -}if (this.length () > 0) this.write (os, this.toString ().getBytes (), 0); -if (this.stream != null) { -this.write (os, "stream\r\n".getBytes (), 0); -this.write (os, this.stream, streamLen); -this.write (os, "\r\nendstream\r\n".getBytes (), 0); -}if (this.index > 0) this.write (os, "endobj\n".getBytes (), 0); -return this.len; -}, "java.io.OutputStream"); -Clazz.defineMethod (c$, "write", -($fz = function (os, bytes, nBytes) { -if (nBytes == 0) nBytes = bytes.length; -this.len += nBytes; -os.write (bytes, 0, nBytes); -}, $fz.isPrivate = true, $fz), "java.io.OutputStream,~A,~N"); -Clazz.defineMethod (c$, "getDictionaryText", -($fz = function (d, nl) { -var sb = new javajs.util.SB (); -sb.append ("<<"); -if (d.containsKey ("Type")) sb.append ("/Type").appendO (d.get ("Type")); -for (var e, $e = d.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { -var s = e.getKey (); -if (s.equals ("Type") || s.startsWith ("!")) continue; -sb.append ("/" + s); -var o = e.getValue (); -if (Clazz.instanceOf (o, java.util.Map)) { -sb.append ((this.getDictionaryText (o, ""))); -continue; -}s = e.getValue (); -if (!s.startsWith ("/")) sb.append (" "); -sb.appendO (s); -} -return (sb.length () > 3 ? sb.append (">>").append (nl).toString () : ""); -}, $fz.isPrivate = true, $fz), "java.util.Map,~S"); -Clazz.defineMethod (c$, "createSubdict", -($fz = function (d0, dict) { -var d = d0.get (dict); -if (d == null) d0.put (dict, d = new java.util.Hashtable ()); -return d; -}, $fz.isPrivate = true, $fz), "java.util.Map,~S"); -Clazz.defineMethod (c$, "addResource", -function (type, key, value) { -var r = this.createSubdict (this.dictionary, "Resources"); -if (type != null) r = this.createSubdict (r, type); -r.put (key, value); -}, "~S,~S,~S"); -}); +Clazz.declarePackage ("javajs.export"); +Clazz.load (["javajs.util.SB"], "javajs.export.PDFObject", ["java.io.ByteArrayOutputStream", "java.util.Hashtable", "$.Map", "java.util.zip.Deflater", "$.DeflaterOutputStream"], function () { +c$ = Clazz.decorateAsClass (function () { +this.dictionary = null; +this.stream = null; +this.index = 0; +this.type = null; +this.len = 0; +this.pt = 0; +Clazz.instantialize (this, arguments); +}, javajs["export"], "PDFObject", javajs.util.SB); +Clazz.makeConstructor (c$, +function (index) { +Clazz.superConstructor (this, javajs["export"].PDFObject, []); +this.index = index; +}, "~N"); +Clazz.defineMethod (c$, "getRef", +function () { +return this.index + " 0 R"; +}); +Clazz.defineMethod (c$, "getID", +function () { +return this.type.substring (0, 1) + this.index; +}); +Clazz.defineMethod (c$, "isFont", +function () { +return "Font".equals (this.type); +}); +Clazz.defineMethod (c$, "setStream", +function (stream) { +this.stream = stream; +}, "~A"); +Clazz.defineMethod (c$, "getDef", +function (key) { +return this.dictionary.get (key); +}, "~S"); +Clazz.defineMethod (c$, "addDef", +function (key, value) { +if (this.dictionary == null) this.dictionary = new java.util.Hashtable (); +this.dictionary.put (key, value); +if (key.equals ("Type")) this.type = (value).substring (1); +}, "~S,~O"); +Clazz.defineMethod (c$, "setAsStream", +function () { +this.stream = this.toBytes (0, -1); +this.setLength (0); +}); +Clazz.defineMethod (c$, "output", +function (os) { +if (this.index > 0) { +var s = this.index + " 0 obj\n"; +this.write (os, s.getBytes (), 0); +}var streamLen = 0; +if (this.dictionary != null) { +if (this.dictionary.containsKey ("Length")) { +if (this.stream == null) this.setAsStream (); +streamLen = this.stream.length; +var doDeflate = (streamLen > 1000); +if (doDeflate) { +var deflater = new java.util.zip.Deflater (9); +var outBytes = new java.io.ByteArrayOutputStream (1024); +var compBytes = new java.util.zip.DeflaterOutputStream (outBytes, deflater); +compBytes.write (this.stream, 0, streamLen); +compBytes.finish (); +this.stream = outBytes.toByteArray (); +this.dictionary.put ("Filter", "/FlateDecode"); +streamLen = this.stream.length; +}this.dictionary.put ("Length", "" + streamLen); +}this.write (os, this.getDictionaryText (this.dictionary, "\n").getBytes (), 0); +}if (this.length () > 0) this.write (os, this.toString ().getBytes (), 0); +if (this.stream != null) { +this.write (os, "stream\r\n".getBytes (), 0); +this.write (os, this.stream, streamLen); +this.write (os, "\r\nendstream\r\n".getBytes (), 0); +}if (this.index > 0) this.write (os, "endobj\n".getBytes (), 0); +return this.len; +}, "java.io.OutputStream"); +Clazz.defineMethod (c$, "write", +($fz = function (os, bytes, nBytes) { +if (nBytes == 0) nBytes = bytes.length; +this.len += nBytes; +os.write (bytes, 0, nBytes); +}, $fz.isPrivate = true, $fz), "java.io.OutputStream,~A,~N"); +Clazz.defineMethod (c$, "getDictionaryText", +($fz = function (d, nl) { +var sb = new javajs.util.SB (); +sb.append ("<<"); +if (d.containsKey ("Type")) sb.append ("/Type").appendO (d.get ("Type")); +for (var e, $e = d.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { +var s = e.getKey (); +if (s.equals ("Type") || s.startsWith ("!")) continue; +sb.append ("/" + s); +var o = e.getValue (); +if (Clazz.instanceOf (o, java.util.Map)) { +sb.append ((this.getDictionaryText (o, ""))); +continue; +}s = e.getValue (); +if (!s.startsWith ("/")) sb.append (" "); +sb.appendO (s); +} +return (sb.length () > 3 ? sb.append (">>").append (nl).toString () : ""); +}, $fz.isPrivate = true, $fz), "java.util.Map,~S"); +Clazz.defineMethod (c$, "createSubdict", +($fz = function (d0, dict) { +var d = d0.get (dict); +if (d == null) d0.put (dict, d = new java.util.Hashtable ()); +return d; +}, $fz.isPrivate = true, $fz), "java.util.Map,~S"); +Clazz.defineMethod (c$, "addResource", +function (type, key, value) { +var r = this.createSubdict (this.dictionary, "Resources"); +if (type != null) r = this.createSubdict (r, type); +r.put (key, value); +}, "~S,~S,~S"); +}); diff --git a/bin/javajs/img/BMPDecoder.js b/bin/javajs/img/BMPDecoder.js index b32016b..c3b4dc7 100644 --- a/bin/javajs/img/BMPDecoder.js +++ b/bin/javajs/img/BMPDecoder.js @@ -1,144 +1,144 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (null, "javajs.img.BMPDecoder", ["javajs.util.Rdr"], function () { -c$ = Clazz.decorateAsClass (function () { -this.bis = null; -this.temp = null; -Clazz.instantialize (this, arguments); -}, javajs.img, "BMPDecoder"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "decodeWindowsBMP", -function (bytes) { -try { -this.bis = javajs.util.Rdr.getBIS (bytes); -this.temp = Clazz.newByteArray (4, 0); -if (this.readByte () != 66 || this.readByte () != 77) return null; -this.readInt (); -this.readShort (); -this.readShort (); -this.readInt (); -var imageWidth; -var imageHeight; -var bitsPerPixel; -var nColors = 0; -var imageSize = 0; -var headerSize = this.readInt (); -switch (headerSize) { -case 12: -imageWidth = this.readShort (); -imageHeight = this.readShort (); -this.readShort (); -bitsPerPixel = this.readShort (); -break; -case 40: -imageWidth = this.readInt (); -imageHeight = this.readInt (); -this.readShort (); -bitsPerPixel = this.readShort (); -var ncompression = this.readInt (); -if (ncompression != 0) { -System.out.println ("BMP Compression is :" + ncompression + " -- aborting"); -return null; -}imageSize = this.readInt (); -this.readInt (); -this.readInt (); -nColors = this.readInt (); -this.readInt (); -break; -default: -System.out.println ("BMP Header unrecognized, length=" + headerSize + " -- aborting"); -return null; -} -var isYReversed = (imageHeight < 0); -if (isYReversed) imageHeight = -imageHeight; -var nPixels = imageHeight * imageWidth; -var bytesPerPixel = Clazz.doubleToInt (bitsPerPixel / 8); -nColors = (nColors > 0 ? nColors : 1 << bitsPerPixel); -var npad = (bytesPerPixel == 4 ? 0 : imageSize == 0 ? 4 - (imageWidth % 4) : (Clazz.doubleToInt (imageSize / imageHeight)) - imageWidth * bytesPerPixel) % 4; -var palette; -var buf = Clazz.newIntArray (nPixels, 0); -var dpt = (isYReversed ? imageWidth : -imageWidth); -var pt0 = (isYReversed ? 0 : nPixels + dpt); -var pt1 = (isYReversed ? nPixels : dpt); -switch (bitsPerPixel) { -case 32: -case 24: -for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0; i < imageWidth; i++) buf[pt + i] = this.readColor (bytesPerPixel); - - -break; -case 8: -palette = Clazz.newIntArray (nColors, 0); -for (var i = 0; i < nColors; i++) palette[i] = this.readColor (4); - -for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0; i < imageWidth; i++) buf[pt + i] = palette[this.readByte ()]; - - -break; -case 4: -npad = (4 - ((Clazz.doubleToInt ((imageWidth + 1) / 2)) % 4)) % 4; -palette = Clazz.newIntArray (nColors, 0); -for (var i = 0; i < nColors; i++) palette[i] = this.readColor (4); - -var b4 = 0; -for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0, shift = 4; i < imageWidth; i++, shift = 4 - shift) buf[pt + i] = palette[((shift == 4 ? (b4 = this.readByte ()) : b4) >> shift) & 0xF]; - - -break; -case 1: -var color1 = this.readColor (3); -var color2 = this.readColor (3); -npad = (4 - ((Clazz.doubleToInt ((imageWidth + 7) / 8)) % 4)) % 4; -var b = 0; -for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0, bpt = -1; i < imageWidth; i++, bpt--) { -if (bpt < 0) { -b = this.readByte (); -bpt = 7; -}buf[pt + i] = ((b & (1 << bpt)) == 0 ? color1 : color2); -} - -break; -case 64: -case 2: -default: -System.out.println ("Not a 32-, 24-, 8-, 4-, or 1-bit Windows Bitmap, aborting..."); -return null; -} -return Clazz.newArray (-1, [buf, Integer.$valueOf (imageWidth), Integer.$valueOf (imageHeight)]); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println ("Caught exception in loadbitmap!"); -} else { -throw e; -} -} -return null; -}, "~A"); -Clazz.defineMethod (c$, "pad", -($fz = function (npad) { -for (var i = 0; i < npad; i++) this.readByte (); - -return true; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "readColor", -($fz = function (n) { -this.bis.read (this.temp, 0, n); -return -16777216 | ((this.temp[2] & 0xff) << 16) | ((this.temp[1] & 0xff) << 8) | this.temp[0] & 0xff; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "readInt", -($fz = function () { -this.bis.read (this.temp, 0, 4); -return ((this.temp[3] & 0xff) << 24) | ((this.temp[2] & 0xff) << 16) | ((this.temp[1] & 0xff) << 8) | this.temp[0] & 0xff; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "readShort", -($fz = function () { -this.bis.read (this.temp, 0, 2); -return ((this.temp[1] & 0xff) << 8) | this.temp[0] & 0xff; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "readByte", -($fz = function () { -this.bis.read (this.temp, 0, 1); -return this.temp[0] & 0xff; -}, $fz.isPrivate = true, $fz)); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (null, "javajs.img.BMPDecoder", ["javajs.util.Rdr"], function () { +c$ = Clazz.decorateAsClass (function () { +this.bis = null; +this.temp = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "BMPDecoder"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "decodeWindowsBMP", +function (bytes) { +try { +this.bis = javajs.util.Rdr.getBIS (bytes); +this.temp = Clazz.newByteArray (4, 0); +if (this.readByte () != 66 || this.readByte () != 77) return null; +this.readInt (); +this.readShort (); +this.readShort (); +this.readInt (); +var imageWidth; +var imageHeight; +var bitsPerPixel; +var nColors = 0; +var imageSize = 0; +var headerSize = this.readInt (); +switch (headerSize) { +case 12: +imageWidth = this.readShort (); +imageHeight = this.readShort (); +this.readShort (); +bitsPerPixel = this.readShort (); +break; +case 40: +imageWidth = this.readInt (); +imageHeight = this.readInt (); +this.readShort (); +bitsPerPixel = this.readShort (); +var ncompression = this.readInt (); +if (ncompression != 0) { +System.out.println ("BMP Compression is :" + ncompression + " -- aborting"); +return null; +}imageSize = this.readInt (); +this.readInt (); +this.readInt (); +nColors = this.readInt (); +this.readInt (); +break; +default: +System.out.println ("BMP Header unrecognized, length=" + headerSize + " -- aborting"); +return null; +} +var isYReversed = (imageHeight < 0); +if (isYReversed) imageHeight = -imageHeight; +var nPixels = imageHeight * imageWidth; +var bytesPerPixel = Clazz.doubleToInt (bitsPerPixel / 8); +nColors = (nColors > 0 ? nColors : 1 << bitsPerPixel); +var npad = (bytesPerPixel == 4 ? 0 : imageSize == 0 ? 4 - (imageWidth % 4) : (Clazz.doubleToInt (imageSize / imageHeight)) - imageWidth * bytesPerPixel) % 4; +var palette; +var buf = Clazz.newIntArray (nPixels, 0); +var dpt = (isYReversed ? imageWidth : -imageWidth); +var pt0 = (isYReversed ? 0 : nPixels + dpt); +var pt1 = (isYReversed ? nPixels : dpt); +switch (bitsPerPixel) { +case 32: +case 24: +for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0; i < imageWidth; i++) buf[pt + i] = this.readColor (bytesPerPixel); + + +break; +case 8: +palette = Clazz.newIntArray (nColors, 0); +for (var i = 0; i < nColors; i++) palette[i] = this.readColor (4); + +for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0; i < imageWidth; i++) buf[pt + i] = palette[this.readByte ()]; + + +break; +case 4: +npad = (4 - ((Clazz.doubleToInt ((imageWidth + 1) / 2)) % 4)) % 4; +palette = Clazz.newIntArray (nColors, 0); +for (var i = 0; i < nColors; i++) palette[i] = this.readColor (4); + +var b4 = 0; +for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0, shift = 4; i < imageWidth; i++, shift = 4 - shift) buf[pt + i] = palette[((shift == 4 ? (b4 = this.readByte ()) : b4) >> shift) & 0xF]; + + +break; +case 1: +var color1 = this.readColor (3); +var color2 = this.readColor (3); +npad = (4 - ((Clazz.doubleToInt ((imageWidth + 7) / 8)) % 4)) % 4; +var b = 0; +for (var pt = pt0; pt != pt1; pt += dpt, this.pad (npad)) for (var i = 0, bpt = -1; i < imageWidth; i++, bpt--) { +if (bpt < 0) { +b = this.readByte (); +bpt = 7; +}buf[pt + i] = ((b & (1 << bpt)) == 0 ? color1 : color2); +} + +break; +case 64: +case 2: +default: +System.out.println ("Not a 32-, 24-, 8-, 4-, or 1-bit Windows Bitmap, aborting..."); +return null; +} +return Clazz.newArray (-1, [buf, Integer.$valueOf (imageWidth), Integer.$valueOf (imageHeight)]); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println ("Caught exception in loadbitmap!"); +} else { +throw e; +} +} +return null; +}, "~A"); +Clazz.defineMethod (c$, "pad", +($fz = function (npad) { +for (var i = 0; i < npad; i++) this.readByte (); + +return true; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "readColor", +($fz = function (n) { +this.bis.read (this.temp, 0, n); +return -16777216 | ((this.temp[2] & 0xff) << 16) | ((this.temp[1] & 0xff) << 8) | this.temp[0] & 0xff; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "readInt", +($fz = function () { +this.bis.read (this.temp, 0, 4); +return ((this.temp[3] & 0xff) << 24) | ((this.temp[2] & 0xff) << 16) | ((this.temp[1] & 0xff) << 8) | this.temp[0] & 0xff; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "readShort", +($fz = function () { +this.bis.read (this.temp, 0, 2); +return ((this.temp[1] & 0xff) << 8) | this.temp[0] & 0xff; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "readByte", +($fz = function () { +this.bis.read (this.temp, 0, 1); +return this.temp[0] & 0xff; +}, $fz.isPrivate = true, $fz)); +}); diff --git a/bin/javajs/img/CRCEncoder.js b/bin/javajs/img/CRCEncoder.js index 3a7582e..2dca50d 100644 --- a/bin/javajs/img/CRCEncoder.js +++ b/bin/javajs/img/CRCEncoder.js @@ -1,74 +1,74 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.CRCEncoder", ["java.util.zip.CRC32", "javajs.util.AU"], function () { -c$ = Clazz.decorateAsClass (function () { -this.startPos = 0; -this.bytePos = 0; -this.crc = null; -this.pngBytes = null; -this.dataLen = 0; -this.int2 = null; -this.int4 = null; -Clazz.instantialize (this, arguments); -}, javajs.img, "CRCEncoder", javajs.img.ImageEncoder); -Clazz.prepareFields (c$, function () { -this.int2 = Clazz.newByteArray (2, 0); -this.int4 = Clazz.newByteArray (4, 0); -}); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.img.CRCEncoder, []); -this.pngBytes = Clazz.newByteArray (250, 0); -this.crc = new java.util.zip.CRC32 (); -}); -Clazz.defineMethod (c$, "setData", -function (b, pt) { -this.pngBytes = b; -this.dataLen = b.length; -this.startPos = this.bytePos = pt; -}, "~A,~N"); -Clazz.defineMethod (c$, "getBytes", -function () { -return (this.dataLen == this.pngBytes.length ? this.pngBytes : javajs.util.AU.arrayCopyByte (this.pngBytes, this.dataLen)); -}); -Clazz.defineMethod (c$, "writeCRC", -function () { -this.crc.reset (); -this.crc.update (this.pngBytes, this.startPos, this.bytePos - this.startPos); -this.writeInt4 (this.crc.getValue ()); -}); -Clazz.defineMethod (c$, "writeInt2", -function (n) { -this.int2[0] = ((n >> 8) & 0xff); -this.int2[1] = (n & 0xff); -this.writeBytes (this.int2); -}, "~N"); -Clazz.defineMethod (c$, "writeInt4", -function (n) { -javajs.img.CRCEncoder.getInt4 (n, this.int4); -this.writeBytes (this.int4); -}, "~N"); -c$.getInt4 = Clazz.defineMethod (c$, "getInt4", -function (n, int4) { -int4[0] = ((n >> 24) & 0xff); -int4[1] = ((n >> 16) & 0xff); -int4[2] = ((n >> 8) & 0xff); -int4[3] = (n & 0xff); -}, "~N,~A"); -Clazz.defineMethod (c$, "writeByte", -function (b) { -var temp = Clazz.newByteArray (-1, [b]); -this.writeBytes (temp); -}, "~N"); -Clazz.defineMethod (c$, "writeString", -function (s) { -this.writeBytes (s.getBytes ()); -}, "~S"); -Clazz.defineMethod (c$, "writeBytes", -function (data) { -var newPos = this.bytePos + data.length; -this.dataLen = Math.max (this.dataLen, newPos); -if (newPos > this.pngBytes.length) this.pngBytes = javajs.util.AU.arrayCopyByte (this.pngBytes, newPos + 16); -System.arraycopy (data, 0, this.pngBytes, this.bytePos, data.length); -this.bytePos = newPos; -}, "~A"); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.CRCEncoder", ["java.util.zip.CRC32", "javajs.util.AU"], function () { +c$ = Clazz.decorateAsClass (function () { +this.startPos = 0; +this.bytePos = 0; +this.crc = null; +this.pngBytes = null; +this.dataLen = 0; +this.int2 = null; +this.int4 = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "CRCEncoder", javajs.img.ImageEncoder); +Clazz.prepareFields (c$, function () { +this.int2 = Clazz.newByteArray (2, 0); +this.int4 = Clazz.newByteArray (4, 0); +}); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.img.CRCEncoder, []); +this.pngBytes = Clazz.newByteArray (250, 0); +this.crc = new java.util.zip.CRC32 (); +}); +Clazz.defineMethod (c$, "setData", +function (b, pt) { +this.pngBytes = b; +this.dataLen = b.length; +this.startPos = this.bytePos = pt; +}, "~A,~N"); +Clazz.defineMethod (c$, "getBytes", +function () { +return (this.dataLen == this.pngBytes.length ? this.pngBytes : javajs.util.AU.arrayCopyByte (this.pngBytes, this.dataLen)); +}); +Clazz.defineMethod (c$, "writeCRC", +function () { +this.crc.reset (); +this.crc.update (this.pngBytes, this.startPos, this.bytePos - this.startPos); +this.writeInt4 (this.crc.getValue ()); +}); +Clazz.defineMethod (c$, "writeInt2", +function (n) { +this.int2[0] = ((n >> 8) & 0xff); +this.int2[1] = (n & 0xff); +this.writeBytes (this.int2); +}, "~N"); +Clazz.defineMethod (c$, "writeInt4", +function (n) { +javajs.img.CRCEncoder.getInt4 (n, this.int4); +this.writeBytes (this.int4); +}, "~N"); +c$.getInt4 = Clazz.defineMethod (c$, "getInt4", +function (n, int4) { +int4[0] = ((n >> 24) & 0xff); +int4[1] = ((n >> 16) & 0xff); +int4[2] = ((n >> 8) & 0xff); +int4[3] = (n & 0xff); +}, "~N,~A"); +Clazz.defineMethod (c$, "writeByte", +function (b) { +var temp = Clazz.newByteArray (-1, [b]); +this.writeBytes (temp); +}, "~N"); +Clazz.defineMethod (c$, "writeString", +function (s) { +this.writeBytes (s.getBytes ()); +}, "~S"); +Clazz.defineMethod (c$, "writeBytes", +function (data) { +var newPos = this.bytePos + data.length; +this.dataLen = Math.max (this.dataLen, newPos); +if (newPos > this.pngBytes.length) this.pngBytes = javajs.util.AU.arrayCopyByte (this.pngBytes, newPos + 16); +System.arraycopy (data, 0, this.pngBytes, this.bytePos, data.length); +this.bytePos = newPos; +}, "~A"); +}); diff --git a/bin/javajs/img/GifEncoder$ColorCell.class b/bin/javajs/img/GifEncoder$ColorCell.class index 738eed0442d4e33cef76fdcd3bfccf28498e45a6..305c14213efd94272455f7154cc0d64463c94910 100644 GIT binary patch delta 28 kcmZpYY>?crn1gZG<|Q27%*=TV;*&pddowamcHnUW0Eg`efB*mh delta 30 mcmZpWY?9otn1gZ8<|Q27%*+K05|cl1dow#QGEKJQaRLCC!wAIy diff --git a/bin/javajs/img/GifEncoder.class b/bin/javajs/img/GifEncoder.class index ee78a468a26e42b4cfca629d179c4994096a451a..a2954d3a8f0af013c8617843cde0941a7a2606f7 100644 GIT binary patch delta 53 zcmV-50LuTseY}0Jsv7~Kv#T300ts;d5&Qr!2LP6{= 0 && this.looping) this.writeNetscapeLoopExtension (); -this.writeImage (); -}}); -Clazz.overrideMethod (c$, "close", -function () { -if (this.addTrailer) { -this.writeTrailer (); -} else { -this.doClose = false; -}if (this.capturing) this.params.put ("captureByteCount", Integer.$valueOf (this.byteCount)); -}); -Clazz.defineMethod (c$, "createPalette", -($fz = function () { -var tempColors = new javajs.util.Lst (); -var ciHash = new java.util.Hashtable (); -for (var i = 0, n = this.pixels.length; i < n; i++) { -var rgb = this.pixels[i]; -var key = Integer.$valueOf (rgb); -var item = ciHash.get (key); -if (item == null) { -item = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorItem, this, null, rgb, rgb == this.backgroundColor); -ciHash.put (key, item); -tempColors.addLast (item); -}} -var nColors = tempColors.size (); -System.out.println ("GIF total image colors: " + nColors); -ciHash = null; -var cells = this.quantizeColors (tempColors); -nColors = cells.size (); -System.out.println ("GIF final color count: " + nColors); -var colorMap = new java.util.Hashtable (); -this.bitsPerPixel = (nColors <= 2 ? 1 : nColors <= 4 ? 2 : nColors <= 16 ? 4 : 8); -this.palette = new Array (1 << this.bitsPerPixel); -for (var i = 0; i < nColors; i++) { -var c = cells.get (i); -colorMap.put (Integer.$valueOf (javajs.util.CU.colorPtToFFRGB (this.palette[i] = c.setColor ())), c); -} -this.pixels = this.indexPixels (cells, colorMap); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "quantizeColors", -($fz = function (tempColors) { -var n = tempColors.size (); -var cells = new javajs.util.Lst (); -var cc = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, 0); -cc.addLast (Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorItem, this, null, this.backgroundColor, true)); -cells.addLast (cc); -cc = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, 1); -if (n > 256) cells.addLast (cc); -for (var i = 0; i < n; i++) { -var c = tempColors.get (i); -if (c.isBackground) continue; -cc.addLast (c); -if (n <= 256) { -cells.addLast (cc); -cc = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, cells.size ()); -}} -tempColors.clear (); -if (n > 256) while ((n = cells.size ()) < 256) { -var maxVol = 0; -var maxCell = null; -for (var i = n; --i >= 1; ) { -var c = cells.get (i); -var v = c.getVolume (false); -if (v > maxVol) { -maxVol = v; -maxCell = c; -}} -if (maxCell == null || !maxCell.splitCell (cells)) break; -} -return cells; -}, $fz.isPrivate = true, $fz), "javajs.util.Lst"); -Clazz.defineMethod (c$, "indexPixels", -($fz = function (cells, colorMap) { -var w2 = this.width + 2; -var errors = new Array (w2); -var newPixels = Clazz.newIntArray (this.pixels.length, 0); -var err = new javajs.util.P3 (); -var lab; -var rgb; -var nearestCell = new java.util.Hashtable (); -for (var i = 0, p = 0; i < this.height; ++i) { -var notLastRow = (i != this.height - 1); -for (var j = 0; j < this.width; ++j, p++) { -if (this.pixels[p] == this.backgroundColor) { -continue; -}var pe = errors[p % w2]; -if (pe == null || pe.x == 3.4028235E38) { -lab = null; -rgb = this.pixels[p]; -} else { -lab = this.toLABnorm (this.pixels[p]); -err = pe; -err.x = this.clamp (err.x, -75, 75); -err.y = this.clamp (err.y, -75, 75); -err.z = this.clamp (err.z, -75, 75); -lab.add (err); -rgb = javajs.util.CU.colorPtToFFRGB (this.toRGB (lab)); -}var key = Integer.$valueOf (rgb); -var cell = colorMap.get (key); -if (cell == null) { -lab = this.toLABnorm (rgb); -cell = nearestCell.get (key); -if (cell == null) { -var maxerr = 3.4028235E38; -for (var ib = cells.size (); --ib >= 1; ) { -var c = cells.get (ib); -err.sub2 (lab, c.center); -var d = err.lengthSquared (); -if (d < maxerr) { -maxerr = d; -cell = c; -}} -nearestCell.put (key, cell); -}if (this.floydSteinberg) { -err.sub2 (lab, cell.center); -var notLastCol = (j < this.width - 1); -if (notLastCol) this.addError (err, 7, errors, p + 1, w2); -if (notLastRow) { -if (j > 0) this.addError (err, 3, errors, p + this.width - 1, w2); -this.addError (err, 5, errors, p + this.width, w2); -if (notLastCol) this.addError (err, 1, errors, p + this.width + 1, w2); -}}err.x = 3.4028235E38; -}newPixels[p] = cell.index; -} -} -return newPixels; -}, $fz.isPrivate = true, $fz), "javajs.util.Lst,java.util.Map"); -Clazz.defineMethod (c$, "addError", -($fz = function (err, f, errors, p, w2) { -if (this.pixels[p] == this.backgroundColor) return; -p %= w2; -var errp = errors[p]; -if (errp == null) errp = errors[p] = new javajs.util.P3 (); - else if (errp.x == 3.4028235E38) errp.set (0, 0, 0); -errp.scaleAdd2 (f / 16, err, errp); -}, $fz.isPrivate = true, $fz), "javajs.util.P3,~N,~A,~N,~N"); -Clazz.defineMethod (c$, "toLABnorm", -function (rgb) { -var lab = javajs.util.CU.colorPtFromInt (rgb, null); -this.rgbToXyz (lab, lab); -this.xyzToLab (lab, lab); -lab.y = (lab.y + 86.185) / (184.439) * 100; -lab.z = (lab.z + 107.863) / (202.345) * 100; -return lab; -}, "~N"); -Clazz.defineMethod (c$, "toRGB", -function (lab) { -var xyz = javajs.util.P3.newP (lab); -xyz.y = xyz.y / 100 * (184.439) - 86.185; -xyz.z = xyz.z / 100 * (202.345) - 107.863; -this.labToXyz (xyz, xyz); -return this.xyzToRgb (xyz, xyz); -}, "javajs.util.P3"); -Clazz.defineMethod (c$, "rgbToXyz", -function (rgb, xyz) { -if (xyz == null) xyz = new javajs.util.P3 (); -xyz.x = this.sxyz (rgb.x); -xyz.y = this.sxyz (rgb.y); -xyz.z = this.sxyz (rgb.z); -javajs.img.GifEncoder.rgb2xyz.rotate (xyz); -return xyz; -}, "javajs.util.P3,javajs.util.P3"); -Clazz.defineMethod (c$, "sxyz", -($fz = function (x) { -x /= 255; -return (x <= 0.04045 ? x / 12.92 : Math.pow (((x + 0.055) / 1.055), 2.4)) * 100; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "xyzToRgb", -function (xyz, rgb) { -if (rgb == null) rgb = new javajs.util.P3 (); -rgb.setT (xyz); -rgb.scale (0.01); -javajs.img.GifEncoder.xyz2rgb.rotate (rgb); -rgb.x = this.clamp (this.srgb (rgb.x), 0, 255); -rgb.y = this.clamp (this.srgb (rgb.y), 0, 255); -rgb.z = this.clamp (this.srgb (rgb.z), 0, 255); -return rgb; -}, "javajs.util.P3,javajs.util.P3"); -Clazz.defineMethod (c$, "srgb", -($fz = function (x) { -return (x > 0.0031308 ? (1.055 * Math.pow (x, 0.4166666666666667)) - 0.055 : x * 12.92) * 255; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "xyzToLab", -function (xyz, lab) { -if (lab == null) lab = new javajs.util.P3 (); -var x = this.flab (xyz.x / 95.0429); -var y = this.flab (xyz.y / 100); -var z = this.flab (xyz.z / 108.89); -lab.x = (116 * y) - 16; -lab.y = 500 * (x - y); -lab.z = 200 * (y - z); -return lab; -}, "javajs.util.P3,javajs.util.P3"); -Clazz.defineMethod (c$, "flab", -($fz = function (t) { -return (t > 8.85645168E-3 ? Math.pow (t, 0.333333333) : 7.78703704 * t + 0.137931034); -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "labToXyz", -function (lab, xyz) { -if (xyz == null) xyz = new javajs.util.P3 (); -xyz.setT (lab); -var y = (xyz.x + 16) / 116; -var x = xyz.y / 500 + y; -var z = y - xyz.z / 200; -xyz.x = this.fxyz (x) * 95.0429; -xyz.y = this.fxyz (y) * 100; -xyz.z = this.fxyz (z) * 108.89; -return xyz; -}, "javajs.util.P3,javajs.util.P3"); -Clazz.defineMethod (c$, "fxyz", -($fz = function (t) { -return (t > 0.206896552 ? t * t * t : 0.128418549 * (t - 0.137931034)); -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "clamp", -($fz = function (c, min, max) { -c = (c < min ? min : c > max ? max : c); -return (min == 0 ? Math.round (c) : c); -}, $fz.isPrivate = true, $fz), "~N,~N,~N"); -Clazz.defineMethod (c$, "writeHeader", -($fz = function () { -this.putString ("GIF89a"); -this.putWord (this.width); -this.putWord (this.height); -this.putByte (0); -this.putByte (0); -this.putByte (0); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeGraphicControlExtension", -($fz = function () { -if (this.isTransparent || this.delayTime100ths >= 0) { -this.putByte (0x21); -this.putByte (0xf9); -this.putByte (4); -this.putByte ((this.isTransparent ? 9 : 0) | (this.delayTime100ths > 0 ? 2 : 0)); -this.putWord (this.delayTime100ths > 0 ? this.delayTime100ths : 0); -this.putByte (0); -this.putByte (0); -}}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeNetscapeLoopExtension", -($fz = function () { -this.putByte (0x21); -this.putByte (0xff); -this.putByte (0x0B); -this.putString ("NETSCAPE2.0"); -this.putByte (3); -this.putByte (1); -this.putWord (0); -this.putByte (0); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeImage", -($fz = function () { -this.putByte (0x2C); -this.putWord (0); -this.putWord (0); -this.putWord (this.width); -this.putWord (this.height); -var packedFields = 0x80 | (this.interlaced ? 0x40 : 0) | (this.bitsPerPixel - 1); -this.putByte (packedFields); -var colorMapSize = 1 << this.bitsPerPixel; -var p = new javajs.util.P3 (); -for (var i = 0; i < colorMapSize; i++) { -if (this.palette[i] != null) p = this.palette[i]; -this.putByte (Clazz.floatToInt (p.x)); -this.putByte (Clazz.floatToInt (p.y)); -this.putByte (Clazz.floatToInt (p.z)); -} -this.putByte (this.initCodeSize = (this.bitsPerPixel <= 1 ? 2 : this.bitsPerPixel)); -this.compress (); -this.putByte (0); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeTrailer", -($fz = function () { -this.putByte (0x3B); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "nextPixel", -($fz = function () { -if (this.countDown-- == 0) return -1; -var colorIndex = this.pixels[this.curpt]; -++this.curx; -if (this.curx == this.width) { -this.curx = 0; -if (this.interlaced) this.updateY (javajs.img.GifEncoder.INTERLACE_PARAMS[this.pass], javajs.img.GifEncoder.INTERLACE_PARAMS[this.pass + 4]); - else ++this.cury; -}this.curpt = this.cury * this.width + this.curx; -return colorIndex & 0xff; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "updateY", -($fz = function (yNext, yNew) { -this.cury += yNext; -if (yNew >= 0 && this.cury >= this.height) { -this.cury = yNew; -++this.pass; -}}, $fz.isPrivate = true, $fz), "~N,~N"); -Clazz.defineMethod (c$, "putWord", -($fz = function (w) { -this.putByte (w); -this.putByte (w >> 8); -}, $fz.isPrivate = true, $fz), "~N"); -c$.MAXCODE = Clazz.defineMethod (c$, "MAXCODE", -($fz = function (nBits) { -return (1 << nBits) - 1; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "compress", -($fz = function () { -this.countDown = this.width * this.height; -this.pass = 0; -this.curx = 0; -this.cury = 0; -this.clearFlag = false; -this.nBits = this.initCodeSize + 1; -this.maxcode = javajs.img.GifEncoder.MAXCODE (this.nBits); -this.clearCode = 1 << this.initCodeSize; -this.EOFCode = this.clearCode + 1; -this.freeEnt = this.clearCode + 2; -this.bufPt = 0; -var ent = this.nextPixel (); -var hshift = 0; -var fcode; -for (fcode = this.hsize; fcode < 65536; fcode *= 2) ++hshift; - -hshift = 8 - hshift; -var hsizeReg = this.hsize; -this.clearHash (hsizeReg); -this.output (this.clearCode); -var c; -outer_loop : while ((c = this.nextPixel ()) != -1) { -fcode = (c << this.maxbits) + ent; -var i = (c << hshift) ^ ent; -if (this.htab[i] == fcode) { -ent = this.codetab[i]; -continue; -} else if (this.htab[i] >= 0) { -var disp = hsizeReg - i; -if (i == 0) disp = 1; -do { -if ((i -= disp) < 0) i += hsizeReg; -if (this.htab[i] == fcode) { -ent = this.codetab[i]; -continue outer_loop; -}} while (this.htab[i] >= 0); -}this.output (ent); -ent = c; -if (this.freeEnt < this.maxmaxcode) { -this.codetab[i] = this.freeEnt++; -this.htab[i] = fcode; -} else { -this.clearBlock (); -}} -this.output (ent); -this.output (this.EOFCode); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "output", -($fz = function (code) { -this.curAccum &= this.masks[this.curBits]; -if (this.curBits > 0) this.curAccum |= (code << this.curBits); - else this.curAccum = code; -this.curBits += this.nBits; -while (this.curBits >= 8) { -this.byteOut ((this.curAccum & 0xff)); -this.curAccum >>= 8; -this.curBits -= 8; -} -if (this.freeEnt > this.maxcode || this.clearFlag) { -if (this.clearFlag) { -this.maxcode = javajs.img.GifEncoder.MAXCODE (this.nBits = this.initCodeSize + 1); -this.clearFlag = false; -} else { -++this.nBits; -if (this.nBits == this.maxbits) this.maxcode = this.maxmaxcode; - else this.maxcode = javajs.img.GifEncoder.MAXCODE (this.nBits); -}}if (code == this.EOFCode) { -while (this.curBits > 0) { -this.byteOut ((this.curAccum & 0xff)); -this.curAccum >>= 8; -this.curBits -= 8; -} -this.flushBytes (); -}}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "clearBlock", -($fz = function () { -this.clearHash (this.hsize); -this.freeEnt = this.clearCode + 2; -this.clearFlag = true; -this.output (this.clearCode); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "clearHash", -($fz = function (hsize) { -for (var i = 0; i < hsize; ++i) this.htab[i] = -1; - -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "byteOut", -($fz = function (c) { -this.buf[this.bufPt++] = c; -if (this.bufPt >= 254) this.flushBytes (); -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "flushBytes", -function () { -if (this.bufPt > 0) { -this.putByte (this.bufPt); -this.out.write (this.buf, 0, this.bufPt); -this.byteCount += this.bufPt; -this.bufPt = 0; -}}); -c$.$GifEncoder$ColorItem$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.isBackground = false; -Clazz.instantialize (this, arguments); -}, javajs.img.GifEncoder, "ColorItem", javajs.util.P3); -Clazz.makeConstructor (c$, -function (a, b) { -Clazz.superConstructor (this, javajs.img.GifEncoder.ColorItem, []); -this.isBackground = b; -this.setT (this.b$["javajs.img.GifEncoder"].toLABnorm (a)); -}, "~N,~B"); -c$ = Clazz.p0p (); -}; -c$.$GifEncoder$ColorCell$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.index = 0; -this.center = null; -this.volume = 0; -Clazz.instantialize (this, arguments); -}, javajs.img.GifEncoder, "ColorCell", javajs.util.Lst); -Clazz.makeConstructor (c$, -function (a) { -Clazz.superConstructor (this, javajs.img.GifEncoder.ColorCell, []); -this.index = a; -}, "~N"); -Clazz.defineMethod (c$, "getVolume", -function (a) { -if (this.volume != 0) return this.volume; -if (this.size () < 2) return -1; -var b = -2147483647; -var c = 2147483647; -var d = -2147483647; -var e = 2147483647; -var f = -2147483647; -var g = 2147483647; -var h = this.size (); -for (var i = h; --i >= 0; ) { -var j = this.get (i); -if (j.x < c) c = j.x; -if (j.y < e) e = j.y; -if (j.z < g) g = j.z; -if (j.x > b) b = j.x; -if (j.y > d) d = j.y; -if (j.z > f) f = j.z; -} -var j = (b - c); -var k = (d - e); -var l = (f - g); -return this.volume = j * j + k * k + l * l; -}, "~B"); -Clazz.defineMethod (c$, "setColor", -function () { -var a = this.size (); -this.center = new javajs.util.P3 (); -for (var b = a; --b >= 0; ) this.center.add (this.get (b)); - -this.center.scale (1 / a); -return this.b$["javajs.img.GifEncoder"].toRGB (this.center); -}); -Clazz.defineMethod (c$, "splitCell", -function (a) { -var b = this.size (); -if (b < 2) return false; -var c = a.size (); -var d = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, c); -a.addLast (d); -var e = Clazz.newFloatArray (3, 3, 0); -for (var f = 0; f < 3; f++) { -var g = 3.4028235E38; -var h = -3.4028235E38; -for (var i = b; --i >= 0; ) { -var j = this.get (i); -var k = (f == 0 ? j.x : f == 1 ? j.y : j.z); -if (g > k) g = k; -if (h < k) h = k; -} -e[0][f] = g; -e[1][f] = h; -e[2][f] = h - g; -} -var g = e[2]; -var h = (g[0] >= g[1] ? (g[0] >= g[2] ? 0 : 2) : g[1] >= g[2] ? 1 : 2); -var i = e[0][h] + e[2][h] / 2; -this.volume = 0; -switch (h) { -case 0: -for (var j = b; --j >= 0; ) if (this.get (j).x >= i) d.addLast (this.remove (j)); - -break; -case 1: -for (var k = b; --k >= 0; ) if (this.get (k).y >= i) d.addLast (this.remove (k)); - -break; -case 2: -for (var l = this.size (); --l >= 0; ) if (this.get (l).z >= i) d.addLast (this.remove (l)); - -break; -} -return true; -}, "javajs.util.Lst"); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"xyz2rgb", null, -"rgb2xyz", null); -{ -javajs.img.GifEncoder.rgb2xyz = javajs.util.M3.newA9 ( Clazz.newFloatArray (-1, [0.4124, 0.3576, 0.1805, 0.2126, 0.7152, 0.0722, 0.0193, 0.1192, 0.9505])); -javajs.img.GifEncoder.xyz2rgb = javajs.util.M3.newA9 ( Clazz.newFloatArray (-1, [3.2406, -1.5372, -0.4986, -0.9689, 1.8758, 0.0415, 0.0557, -0.204, 1.0570])); -}Clazz.defineStatics (c$, -"EOF", -1, -"INTERLACE_PARAMS", Clazz.newIntArray (-1, [8, 8, 4, 2, 4, 2, 1, 0]), -"BITS", 12, -"HSIZE", 5003); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.img.ImageEncoder", "javajs.util.Lst", "$.P3"], "javajs.img.GifEncoder", ["java.lang.Boolean", "java.util.Hashtable", "javajs.util.CU", "$.M3"], function () { +c$ = Clazz.decorateAsClass (function () { +this.params = null; +this.palette = null; +this.backgroundColor = 0; +this.interlaced = false; +this.addHeader = true; +this.addImage = true; +this.addTrailer = true; +this.isTransparent = false; +this.floydSteinberg = true; +this.capturing = false; +this.looping = false; +this.delayTime100ths = -1; +this.bitsPerPixel = 1; +this.byteCount = 0; +if (!Clazz.isClassDefined ("javajs.img.GifEncoder.ColorItem")) { +javajs.img.GifEncoder.$GifEncoder$ColorItem$ (); +} +if (!Clazz.isClassDefined ("javajs.img.GifEncoder.ColorCell")) { +javajs.img.GifEncoder.$GifEncoder$ColorCell$ (); +} +this.initCodeSize = 0; +this.curpt = 0; +this.nBits = 0; +this.maxbits = 12; +this.maxcode = 0; +this.maxmaxcode = 4096; +this.htab = null; +this.codetab = null; +this.hsize = 5003; +this.freeEnt = 0; +this.clearFlag = false; +this.clearCode = 0; +this.EOFCode = 0; +this.countDown = 0; +this.pass = 0; +this.curx = 0; +this.cury = 0; +this.curAccum = 0; +this.curBits = 0; +this.masks = null; +this.bufPt = 0; +this.buf = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "GifEncoder", javajs.img.ImageEncoder); +Clazz.prepareFields (c$, function () { +this.htab = Clazz.newIntArray (5003, 0); +this.codetab = Clazz.newIntArray (5003, 0); +this.masks = Clazz.newIntArray (-1, [0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF]); +this.buf = Clazz.newByteArray (256, 0); +}); +Clazz.overrideMethod (c$, "setParams", +function (params) { +this.params = params; +var ic = params.get ("transparentColor"); +if (ic == null) { +ic = params.get ("backgroundColor"); +if (ic != null) this.backgroundColor = ic.intValue (); +} else { +this.backgroundColor = ic.intValue (); +this.isTransparent = true; +}this.interlaced = (Boolean.TRUE === params.get ("interlaced")); +if (params.containsKey ("captureRootExt") || !params.containsKey ("captureMode")) return; +this.interlaced = false; +this.capturing = true; +try { +this.byteCount = (params.get ("captureByteCount")).intValue (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +switch ("maec".indexOf ((params.get ("captureMode")).substring (0, 1))) { +case 0: +params.put ("captureMode", "add"); +this.addImage = false; +this.addTrailer = false; +break; +case 1: +this.addHeader = false; +this.addTrailer = false; +var fps = Math.abs ((params.get ("captureFps")).intValue ()); +this.delayTime100ths = (fps == 0 ? 0 : Clazz.doubleToInt (100 / fps)); +this.looping = (Boolean.FALSE !== params.get ("captureLooping")); +break; +case 2: +this.addHeader = false; +this.addImage = false; +break; +case 3: +this.addHeader = false; +this.addImage = false; +this.out.cancel (); +break; +} +}, "java.util.Map"); +Clazz.overrideMethod (c$, "generate", +function () { +if (this.addHeader) this.writeHeader (); +this.addHeader = false; +if (this.addImage) { +this.createPalette (); +this.writeGraphicControlExtension (); +if (this.delayTime100ths >= 0 && this.looping) this.writeNetscapeLoopExtension (); +this.writeImage (); +}}); +Clazz.overrideMethod (c$, "close", +function () { +if (this.addTrailer) { +this.writeTrailer (); +} else { +this.doClose = false; +}if (this.capturing) this.params.put ("captureByteCount", Integer.$valueOf (this.byteCount)); +}); +Clazz.defineMethod (c$, "createPalette", +($fz = function () { +var tempColors = new javajs.util.Lst (); +var ciHash = new java.util.Hashtable (); +for (var i = 0, n = this.pixels.length; i < n; i++) { +var rgb = this.pixels[i]; +var key = Integer.$valueOf (rgb); +var item = ciHash.get (key); +if (item == null) { +item = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorItem, this, null, rgb, rgb == this.backgroundColor); +ciHash.put (key, item); +tempColors.addLast (item); +}} +var nColors = tempColors.size (); +System.out.println ("GIF total image colors: " + nColors); +ciHash = null; +var cells = this.quantizeColors (tempColors); +nColors = cells.size (); +System.out.println ("GIF final color count: " + nColors); +var colorMap = new java.util.Hashtable (); +this.bitsPerPixel = (nColors <= 2 ? 1 : nColors <= 4 ? 2 : nColors <= 16 ? 4 : 8); +this.palette = new Array (1 << this.bitsPerPixel); +for (var i = 0; i < nColors; i++) { +var c = cells.get (i); +colorMap.put (Integer.$valueOf (javajs.util.CU.colorPtToFFRGB (this.palette[i] = c.setColor ())), c); +} +this.pixels = this.indexPixels (cells, colorMap); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "quantizeColors", +($fz = function (tempColors) { +var n = tempColors.size (); +var cells = new javajs.util.Lst (); +var cc = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, 0); +cc.addLast (Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorItem, this, null, this.backgroundColor, true)); +cells.addLast (cc); +cc = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, 1); +if (n > 256) cells.addLast (cc); +for (var i = 0; i < n; i++) { +var c = tempColors.get (i); +if (c.isBackground) continue; +cc.addLast (c); +if (n <= 256) { +cells.addLast (cc); +cc = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, cells.size ()); +}} +tempColors.clear (); +if (n > 256) while ((n = cells.size ()) < 256) { +var maxVol = 0; +var maxCell = null; +for (var i = n; --i >= 1; ) { +var c = cells.get (i); +var v = c.getVolume (false); +if (v > maxVol) { +maxVol = v; +maxCell = c; +}} +if (maxCell == null || !maxCell.splitCell (cells)) break; +} +return cells; +}, $fz.isPrivate = true, $fz), "javajs.util.Lst"); +Clazz.defineMethod (c$, "indexPixels", +($fz = function (cells, colorMap) { +var w2 = this.width + 2; +var errors = new Array (w2); +var newPixels = Clazz.newIntArray (this.pixels.length, 0); +var err = new javajs.util.P3 (); +var lab; +var rgb; +var nearestCell = new java.util.Hashtable (); +for (var i = 0, p = 0; i < this.height; ++i) { +var notLastRow = (i != this.height - 1); +for (var j = 0; j < this.width; ++j, p++) { +if (this.pixels[p] == this.backgroundColor) { +continue; +}var pe = errors[p % w2]; +if (pe == null || pe.x == 3.4028235E38) { +lab = null; +rgb = this.pixels[p]; +} else { +lab = this.toLABnorm (this.pixels[p]); +err = pe; +err.x = this.clamp (err.x, -75, 75); +err.y = this.clamp (err.y, -75, 75); +err.z = this.clamp (err.z, -75, 75); +lab.add (err); +rgb = javajs.util.CU.colorPtToFFRGB (this.toRGB (lab)); +}var key = Integer.$valueOf (rgb); +var cell = colorMap.get (key); +if (cell == null) { +lab = this.toLABnorm (rgb); +cell = nearestCell.get (key); +if (cell == null) { +var maxerr = 3.4028235E38; +for (var ib = cells.size (); --ib >= 1; ) { +var c = cells.get (ib); +err.sub2 (lab, c.center); +var d = err.lengthSquared (); +if (d < maxerr) { +maxerr = d; +cell = c; +}} +nearestCell.put (key, cell); +}if (this.floydSteinberg) { +err.sub2 (lab, cell.center); +var notLastCol = (j < this.width - 1); +if (notLastCol) this.addError (err, 7, errors, p + 1, w2); +if (notLastRow) { +if (j > 0) this.addError (err, 3, errors, p + this.width - 1, w2); +this.addError (err, 5, errors, p + this.width, w2); +if (notLastCol) this.addError (err, 1, errors, p + this.width + 1, w2); +}}err.x = 3.4028235E38; +}newPixels[p] = cell.index; +} +} +return newPixels; +}, $fz.isPrivate = true, $fz), "javajs.util.Lst,java.util.Map"); +Clazz.defineMethod (c$, "addError", +($fz = function (err, f, errors, p, w2) { +if (this.pixels[p] == this.backgroundColor) return; +p %= w2; +var errp = errors[p]; +if (errp == null) errp = errors[p] = new javajs.util.P3 (); + else if (errp.x == 3.4028235E38) errp.set (0, 0, 0); +errp.scaleAdd2 (f / 16, err, errp); +}, $fz.isPrivate = true, $fz), "javajs.util.P3,~N,~A,~N,~N"); +Clazz.defineMethod (c$, "toLABnorm", +function (rgb) { +var lab = javajs.util.CU.colorPtFromInt (rgb, null); +this.rgbToXyz (lab, lab); +this.xyzToLab (lab, lab); +lab.y = (lab.y + 86.185) / (184.439) * 100; +lab.z = (lab.z + 107.863) / (202.345) * 100; +return lab; +}, "~N"); +Clazz.defineMethod (c$, "toRGB", +function (lab) { +var xyz = javajs.util.P3.newP (lab); +xyz.y = xyz.y / 100 * (184.439) - 86.185; +xyz.z = xyz.z / 100 * (202.345) - 107.863; +this.labToXyz (xyz, xyz); +return this.xyzToRgb (xyz, xyz); +}, "javajs.util.P3"); +Clazz.defineMethod (c$, "rgbToXyz", +function (rgb, xyz) { +if (xyz == null) xyz = new javajs.util.P3 (); +xyz.x = this.sxyz (rgb.x); +xyz.y = this.sxyz (rgb.y); +xyz.z = this.sxyz (rgb.z); +javajs.img.GifEncoder.rgb2xyz.rotate (xyz); +return xyz; +}, "javajs.util.P3,javajs.util.P3"); +Clazz.defineMethod (c$, "sxyz", +($fz = function (x) { +x /= 255; +return (x <= 0.04045 ? x / 12.92 : Math.pow (((x + 0.055) / 1.055), 2.4)) * 100; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "xyzToRgb", +function (xyz, rgb) { +if (rgb == null) rgb = new javajs.util.P3 (); +rgb.setT (xyz); +rgb.scale (0.01); +javajs.img.GifEncoder.xyz2rgb.rotate (rgb); +rgb.x = this.clamp (this.srgb (rgb.x), 0, 255); +rgb.y = this.clamp (this.srgb (rgb.y), 0, 255); +rgb.z = this.clamp (this.srgb (rgb.z), 0, 255); +return rgb; +}, "javajs.util.P3,javajs.util.P3"); +Clazz.defineMethod (c$, "srgb", +($fz = function (x) { +return (x > 0.0031308 ? (1.055 * Math.pow (x, 0.4166666666666667)) - 0.055 : x * 12.92) * 255; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "xyzToLab", +function (xyz, lab) { +if (lab == null) lab = new javajs.util.P3 (); +var x = this.flab (xyz.x / 95.0429); +var y = this.flab (xyz.y / 100); +var z = this.flab (xyz.z / 108.89); +lab.x = (116 * y) - 16; +lab.y = 500 * (x - y); +lab.z = 200 * (y - z); +return lab; +}, "javajs.util.P3,javajs.util.P3"); +Clazz.defineMethod (c$, "flab", +($fz = function (t) { +return (t > 8.85645168E-3 ? Math.pow (t, 0.333333333) : 7.78703704 * t + 0.137931034); +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "labToXyz", +function (lab, xyz) { +if (xyz == null) xyz = new javajs.util.P3 (); +xyz.setT (lab); +var y = (xyz.x + 16) / 116; +var x = xyz.y / 500 + y; +var z = y - xyz.z / 200; +xyz.x = this.fxyz (x) * 95.0429; +xyz.y = this.fxyz (y) * 100; +xyz.z = this.fxyz (z) * 108.89; +return xyz; +}, "javajs.util.P3,javajs.util.P3"); +Clazz.defineMethod (c$, "fxyz", +($fz = function (t) { +return (t > 0.206896552 ? t * t * t : 0.128418549 * (t - 0.137931034)); +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "clamp", +($fz = function (c, min, max) { +c = (c < min ? min : c > max ? max : c); +return (min == 0 ? Math.round (c) : c); +}, $fz.isPrivate = true, $fz), "~N,~N,~N"); +Clazz.defineMethod (c$, "writeHeader", +($fz = function () { +this.putString ("GIF89a"); +this.putWord (this.width); +this.putWord (this.height); +this.putByte (0); +this.putByte (0); +this.putByte (0); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeGraphicControlExtension", +($fz = function () { +if (this.isTransparent || this.delayTime100ths >= 0) { +this.putByte (0x21); +this.putByte (0xf9); +this.putByte (4); +this.putByte ((this.isTransparent ? 9 : 0) | (this.delayTime100ths > 0 ? 2 : 0)); +this.putWord (this.delayTime100ths > 0 ? this.delayTime100ths : 0); +this.putByte (0); +this.putByte (0); +}}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeNetscapeLoopExtension", +($fz = function () { +this.putByte (0x21); +this.putByte (0xff); +this.putByte (0x0B); +this.putString ("NETSCAPE2.0"); +this.putByte (3); +this.putByte (1); +this.putWord (0); +this.putByte (0); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeImage", +($fz = function () { +this.putByte (0x2C); +this.putWord (0); +this.putWord (0); +this.putWord (this.width); +this.putWord (this.height); +var packedFields = 0x80 | (this.interlaced ? 0x40 : 0) | (this.bitsPerPixel - 1); +this.putByte (packedFields); +var colorMapSize = 1 << this.bitsPerPixel; +var p = new javajs.util.P3 (); +for (var i = 0; i < colorMapSize; i++) { +if (this.palette[i] != null) p = this.palette[i]; +this.putByte (Clazz.floatToInt (p.x)); +this.putByte (Clazz.floatToInt (p.y)); +this.putByte (Clazz.floatToInt (p.z)); +} +this.putByte (this.initCodeSize = (this.bitsPerPixel <= 1 ? 2 : this.bitsPerPixel)); +this.compress (); +this.putByte (0); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeTrailer", +($fz = function () { +this.putByte (0x3B); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "nextPixel", +($fz = function () { +if (this.countDown-- == 0) return -1; +var colorIndex = this.pixels[this.curpt]; +++this.curx; +if (this.curx == this.width) { +this.curx = 0; +if (this.interlaced) this.updateY (javajs.img.GifEncoder.INTERLACE_PARAMS[this.pass], javajs.img.GifEncoder.INTERLACE_PARAMS[this.pass + 4]); + else ++this.cury; +}this.curpt = this.cury * this.width + this.curx; +return colorIndex & 0xff; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "updateY", +($fz = function (yNext, yNew) { +this.cury += yNext; +if (yNew >= 0 && this.cury >= this.height) { +this.cury = yNew; +++this.pass; +}}, $fz.isPrivate = true, $fz), "~N,~N"); +Clazz.defineMethod (c$, "putWord", +($fz = function (w) { +this.putByte (w); +this.putByte (w >> 8); +}, $fz.isPrivate = true, $fz), "~N"); +c$.MAXCODE = Clazz.defineMethod (c$, "MAXCODE", +($fz = function (nBits) { +return (1 << nBits) - 1; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "compress", +($fz = function () { +this.countDown = this.width * this.height; +this.pass = 0; +this.curx = 0; +this.cury = 0; +this.clearFlag = false; +this.nBits = this.initCodeSize + 1; +this.maxcode = javajs.img.GifEncoder.MAXCODE (this.nBits); +this.clearCode = 1 << this.initCodeSize; +this.EOFCode = this.clearCode + 1; +this.freeEnt = this.clearCode + 2; +this.bufPt = 0; +var ent = this.nextPixel (); +var hshift = 0; +var fcode; +for (fcode = this.hsize; fcode < 65536; fcode *= 2) ++hshift; + +hshift = 8 - hshift; +var hsizeReg = this.hsize; +this.clearHash (hsizeReg); +this.output (this.clearCode); +var c; +outer_loop : while ((c = this.nextPixel ()) != -1) { +fcode = (c << this.maxbits) + ent; +var i = (c << hshift) ^ ent; +if (this.htab[i] == fcode) { +ent = this.codetab[i]; +continue; +} else if (this.htab[i] >= 0) { +var disp = hsizeReg - i; +if (i == 0) disp = 1; +do { +if ((i -= disp) < 0) i += hsizeReg; +if (this.htab[i] == fcode) { +ent = this.codetab[i]; +continue outer_loop; +}} while (this.htab[i] >= 0); +}this.output (ent); +ent = c; +if (this.freeEnt < this.maxmaxcode) { +this.codetab[i] = this.freeEnt++; +this.htab[i] = fcode; +} else { +this.clearBlock (); +}} +this.output (ent); +this.output (this.EOFCode); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "output", +($fz = function (code) { +this.curAccum &= this.masks[this.curBits]; +if (this.curBits > 0) this.curAccum |= (code << this.curBits); + else this.curAccum = code; +this.curBits += this.nBits; +while (this.curBits >= 8) { +this.byteOut ((this.curAccum & 0xff)); +this.curAccum >>= 8; +this.curBits -= 8; +} +if (this.freeEnt > this.maxcode || this.clearFlag) { +if (this.clearFlag) { +this.maxcode = javajs.img.GifEncoder.MAXCODE (this.nBits = this.initCodeSize + 1); +this.clearFlag = false; +} else { +++this.nBits; +if (this.nBits == this.maxbits) this.maxcode = this.maxmaxcode; + else this.maxcode = javajs.img.GifEncoder.MAXCODE (this.nBits); +}}if (code == this.EOFCode) { +while (this.curBits > 0) { +this.byteOut ((this.curAccum & 0xff)); +this.curAccum >>= 8; +this.curBits -= 8; +} +this.flushBytes (); +}}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "clearBlock", +($fz = function () { +this.clearHash (this.hsize); +this.freeEnt = this.clearCode + 2; +this.clearFlag = true; +this.output (this.clearCode); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "clearHash", +($fz = function (hsize) { +for (var i = 0; i < hsize; ++i) this.htab[i] = -1; + +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "byteOut", +($fz = function (c) { +this.buf[this.bufPt++] = c; +if (this.bufPt >= 254) this.flushBytes (); +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "flushBytes", +function () { +if (this.bufPt > 0) { +this.putByte (this.bufPt); +this.out.write (this.buf, 0, this.bufPt); +this.byteCount += this.bufPt; +this.bufPt = 0; +}}); +c$.$GifEncoder$ColorItem$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.isBackground = false; +Clazz.instantialize (this, arguments); +}, javajs.img.GifEncoder, "ColorItem", javajs.util.P3); +Clazz.makeConstructor (c$, +function (a, b) { +Clazz.superConstructor (this, javajs.img.GifEncoder.ColorItem, []); +this.isBackground = b; +this.setT (this.b$["javajs.img.GifEncoder"].toLABnorm (a)); +}, "~N,~B"); +c$ = Clazz.p0p (); +}; +c$.$GifEncoder$ColorCell$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.index = 0; +this.center = null; +this.volume = 0; +Clazz.instantialize (this, arguments); +}, javajs.img.GifEncoder, "ColorCell", javajs.util.Lst); +Clazz.makeConstructor (c$, +function (a) { +Clazz.superConstructor (this, javajs.img.GifEncoder.ColorCell, []); +this.index = a; +}, "~N"); +Clazz.defineMethod (c$, "getVolume", +function (a) { +if (this.volume != 0) return this.volume; +if (this.size () < 2) return -1; +var b = -2147483647; +var c = 2147483647; +var d = -2147483647; +var e = 2147483647; +var f = -2147483647; +var g = 2147483647; +var h = this.size (); +for (var i = h; --i >= 0; ) { +var j = this.get (i); +if (j.x < c) c = j.x; +if (j.y < e) e = j.y; +if (j.z < g) g = j.z; +if (j.x > b) b = j.x; +if (j.y > d) d = j.y; +if (j.z > f) f = j.z; +} +var j = (b - c); +var k = (d - e); +var l = (f - g); +return this.volume = j * j + k * k + l * l; +}, "~B"); +Clazz.defineMethod (c$, "setColor", +function () { +var a = this.size (); +this.center = new javajs.util.P3 (); +for (var b = a; --b >= 0; ) this.center.add (this.get (b)); + +this.center.scale (1 / a); +return this.b$["javajs.img.GifEncoder"].toRGB (this.center); +}); +Clazz.defineMethod (c$, "splitCell", +function (a) { +var b = this.size (); +if (b < 2) return false; +var c = a.size (); +var d = Clazz.innerTypeInstance (javajs.img.GifEncoder.ColorCell, this, null, c); +a.addLast (d); +var e = Clazz.newFloatArray (3, 3, 0); +for (var f = 0; f < 3; f++) { +var g = 3.4028235E38; +var h = -3.4028235E38; +for (var i = b; --i >= 0; ) { +var j = this.get (i); +var k = (f == 0 ? j.x : f == 1 ? j.y : j.z); +if (g > k) g = k; +if (h < k) h = k; +} +e[0][f] = g; +e[1][f] = h; +e[2][f] = h - g; +} +var g = e[2]; +var h = (g[0] >= g[1] ? (g[0] >= g[2] ? 0 : 2) : g[1] >= g[2] ? 1 : 2); +var i = e[0][h] + e[2][h] / 2; +this.volume = 0; +switch (h) { +case 0: +for (var j = b; --j >= 0; ) if (this.get (j).x >= i) d.addLast (this.remove (j)); + +break; +case 1: +for (var k = b; --k >= 0; ) if (this.get (k).y >= i) d.addLast (this.remove (k)); + +break; +case 2: +for (var l = this.size (); --l >= 0; ) if (this.get (l).z >= i) d.addLast (this.remove (l)); + +break; +} +return true; +}, "javajs.util.Lst"); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"xyz2rgb", null, +"rgb2xyz", null); +{ +javajs.img.GifEncoder.rgb2xyz = javajs.util.M3.newA9 ( Clazz.newFloatArray (-1, [0.4124, 0.3576, 0.1805, 0.2126, 0.7152, 0.0722, 0.0193, 0.1192, 0.9505])); +javajs.img.GifEncoder.xyz2rgb = javajs.util.M3.newA9 ( Clazz.newFloatArray (-1, [3.2406, -1.5372, -0.4986, -0.9689, 1.8758, 0.0415, 0.0557, -0.204, 1.0570])); +}Clazz.defineStatics (c$, +"EOF", -1, +"INTERLACE_PARAMS", Clazz.newIntArray (-1, [8, 8, 4, 2, 4, 2, 1, 0]), +"BITS", 12, +"HSIZE", 5003); +}); diff --git a/bin/javajs/img/ImageEncoder.js b/bin/javajs/img/ImageEncoder.js index 79e2086..a0fc4c0 100644 --- a/bin/javajs/img/ImageEncoder.js +++ b/bin/javajs/img/ImageEncoder.js @@ -1,41 +1,41 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (["javajs.api.GenericImageEncoder"], "javajs.img.ImageEncoder", ["java.lang.Boolean"], function () { -c$ = Clazz.decorateAsClass (function () { -this.out = null; -this.width = -1; -this.height = -1; -this.quality = -1; -this.date = null; -this.logging = false; -this.doClose = true; -this.pixels = null; -Clazz.instantialize (this, arguments); -}, javajs.img, "ImageEncoder", null, javajs.api.GenericImageEncoder); -Clazz.overrideMethod (c$, "createImage", -function (type, out, params) { -this.out = out; -this.logging = (Boolean.TRUE === params.get ("logging")); -this.width = (params.get ("imageWidth")).intValue (); -this.height = (params.get ("imageHeight")).intValue (); -this.pixels = params.get ("imagePixels"); -this.date = params.get ("date"); -var q = params.get ("quality"); -this.quality = (q == null ? -1 : q.intValue ()); -this.setParams (params); -this.generate (); -this.close (); -return this.doClose; -}, "~S,javajs.util.OC,java.util.Map"); -Clazz.defineMethod (c$, "putString", -function (s) { -var b = s.getBytes (); -this.out.write (b, 0, b.length); -}, "~S"); -Clazz.defineMethod (c$, "putByte", -function (b) { -this.out.writeByteAsInt (b); -}, "~N"); -Clazz.defineMethod (c$, "close", -function () { -}); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.api.GenericImageEncoder"], "javajs.img.ImageEncoder", ["java.lang.Boolean"], function () { +c$ = Clazz.decorateAsClass (function () { +this.out = null; +this.width = -1; +this.height = -1; +this.quality = -1; +this.date = null; +this.logging = false; +this.doClose = true; +this.pixels = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "ImageEncoder", null, javajs.api.GenericImageEncoder); +Clazz.overrideMethod (c$, "createImage", +function (type, out, params) { +this.out = out; +this.logging = (Boolean.TRUE === params.get ("logging")); +this.width = (params.get ("imageWidth")).intValue (); +this.height = (params.get ("imageHeight")).intValue (); +this.pixels = params.get ("imagePixels"); +this.date = params.get ("date"); +var q = params.get ("quality"); +this.quality = (q == null ? -1 : q.intValue ()); +this.setParams (params); +this.generate (); +this.close (); +return this.doClose; +}, "~S,javajs.util.OC,java.util.Map"); +Clazz.defineMethod (c$, "putString", +function (s) { +var b = s.getBytes (); +this.out.write (b, 0, b.length); +}, "~S"); +Clazz.defineMethod (c$, "putByte", +function (b) { +this.out.writeByteAsInt (b); +}, "~N"); +Clazz.defineMethod (c$, "close", +function () { +}); +}); diff --git a/bin/javajs/img/Jpg64Encoder.js b/bin/javajs/img/Jpg64Encoder.js index 2ef2678..c8eb5d1 100644 --- a/bin/javajs/img/Jpg64Encoder.js +++ b/bin/javajs/img/Jpg64Encoder.js @@ -1,23 +1,23 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (["javajs.img.JpgEncoder"], "javajs.img.Jpg64Encoder", ["javajs.util.Base64"], function () { -c$ = Clazz.decorateAsClass (function () { -this.outTemp = null; -Clazz.instantialize (this, arguments); -}, javajs.img, "Jpg64Encoder", javajs.img.JpgEncoder); -Clazz.defineMethod (c$, "setParams", -function (params) { -this.defaultQuality = 75; -this.outTemp = params.remove ("outputChannelTemp"); -Clazz.superCall (this, javajs.img.Jpg64Encoder, "setParams", [params]); -}, "java.util.Map"); -Clazz.defineMethod (c$, "generate", -function () { -var out0 = this.out; -this.out = this.outTemp; -Clazz.superCall (this, javajs.img.Jpg64Encoder, "generate", []); -var bytes = javajs.util.Base64.getBytes64 (this.out.toByteArray ()); -this.outTemp = null; -this.out = out0; -this.out.write (bytes, 0, bytes.length); -}); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.img.JpgEncoder"], "javajs.img.Jpg64Encoder", ["javajs.util.Base64"], function () { +c$ = Clazz.decorateAsClass (function () { +this.outTemp = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "Jpg64Encoder", javajs.img.JpgEncoder); +Clazz.defineMethod (c$, "setParams", +function (params) { +this.defaultQuality = 75; +this.outTemp = params.remove ("outputChannelTemp"); +Clazz.superCall (this, javajs.img.Jpg64Encoder, "setParams", [params]); +}, "java.util.Map"); +Clazz.defineMethod (c$, "generate", +function () { +var out0 = this.out; +this.out = this.outTemp; +Clazz.superCall (this, javajs.img.Jpg64Encoder, "generate", []); +var bytes = javajs.util.Base64.getBytes64 (this.out.toByteArray ()); +this.outTemp = null; +this.out = out0; +this.out.write (bytes, 0, bytes.length); +}); +}); diff --git a/bin/javajs/img/JpgEncoder.js b/bin/javajs/img/JpgEncoder.js index 9edf3b2..b13c26f 100644 --- a/bin/javajs/img/JpgEncoder.js +++ b/bin/javajs/img/JpgEncoder.js @@ -1,753 +1,753 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (["javajs.img.ImageEncoder", "javajs.util.AU"], ["javajs.img.DCT", "$.JpgEncoder", "$.JpegObj", "$.Huffman"], null, function () { -c$ = Clazz.decorateAsClass (function () { -this.jpegObj = null; -this.huf = null; -this.dct = null; -this.defaultQuality = 100; -this.applicationTag = null; -Clazz.instantialize (this, arguments); -}, javajs.img, "JpgEncoder", javajs.img.ImageEncoder); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.img.JpgEncoder, []); -}); -Clazz.overrideMethod (c$, "setParams", -function (params) { -if (this.quality <= 0) this.quality = (params.containsKey ("qualityJPG") ? (params.get ("qualityJPG")).intValue () : this.defaultQuality); -this.jpegObj = new javajs.img.JpegObj (); -this.jpegObj.comment = params.get ("comment"); -this.applicationTag = params.get ("jpgAppTag"); -}, "java.util.Map"); -Clazz.overrideMethod (c$, "generate", -function () { -this.jpegObj.imageWidth = this.width; -this.jpegObj.imageHeight = this.height; -this.dct = new javajs.img.DCT (this.quality); -this.huf = new javajs.img.Huffman (this.width, this.height); -if (this.jpegObj == null) return; -this.jpegObj.getYCCArray (this.pixels); -var longState = this.writeHeaders (this.jpegObj, this.dct); -this.writeCompressedData (this.jpegObj, this.dct, this.huf); -this.writeMarker (javajs.img.JpgEncoder.eoi); -if (longState != null) { -var b = longState.getBytes (); -this.out.write (b, 0, b.length); -}}); -Clazz.defineMethod (c$, "writeCompressedData", -($fz = function (jpegObj, dct, huf) { -var i; -var j; -var r; -var c; -var a; -var b; -var comp; -var xpos; -var ypos; -var xblockoffset; -var yblockoffset; -var inputArray; -var dctArray1 = Clazz.newFloatArray (8, 8, 0); -var dctArray2 = Clazz.newDoubleArray (8, 8, 0); -var dctArray3 = Clazz.newIntArray (64, 0); -var lastDCvalue = Clazz.newIntArray (jpegObj.numberOfComponents, 0); -var minBlockWidth; -var minBlockHeight; -minBlockWidth = ((huf.imageWidth % 8 != 0) ? Clazz.doubleToInt (Math.floor (huf.imageWidth / 8.0) + 1) * 8 : huf.imageWidth); -minBlockHeight = ((huf.imageHeight % 8 != 0) ? Clazz.doubleToInt (Math.floor (huf.imageHeight / 8.0) + 1) * 8 : huf.imageHeight); -for (comp = 0; comp < jpegObj.numberOfComponents; comp++) { -minBlockWidth = Math.min (minBlockWidth, jpegObj.blockWidth[comp]); -minBlockHeight = Math.min (minBlockHeight, jpegObj.blockHeight[comp]); -} -xpos = 0; -for (r = 0; r < minBlockHeight; r++) { -for (c = 0; c < minBlockWidth; c++) { -xpos = c * 8; -ypos = r * 8; -for (comp = 0; comp < jpegObj.numberOfComponents; comp++) { -inputArray = jpegObj.components[comp]; -var vsampF = jpegObj.vsampFactor[comp]; -var hsampF = jpegObj.hsampFactor[comp]; -var qNumber = jpegObj.qtableNumber[comp]; -var dcNumber = jpegObj.dctableNumber[comp]; -var acNumber = jpegObj.actableNumber[comp]; -for (i = 0; i < vsampF; i++) { -for (j = 0; j < hsampF; j++) { -xblockoffset = j * 8; -yblockoffset = i * 8; -for (a = 0; a < 8; a++) { -for (b = 0; b < 8; b++) { -dctArray1[a][b] = inputArray[ypos + yblockoffset + a][xpos + xblockoffset + b]; -} -} -dctArray2 = javajs.img.DCT.forwardDCT (dctArray1); -dctArray3 = javajs.img.DCT.quantizeBlock (dctArray2, dct.divisors[qNumber]); -huf.HuffmanBlockEncoder (this.out, dctArray3, lastDCvalue[comp], dcNumber, acNumber); -lastDCvalue[comp] = dctArray3[0]; -} -} -} -} -} -huf.flushBuffer (this.out); -}, $fz.isPrivate = true, $fz), "javajs.img.JpegObj,javajs.img.DCT,javajs.img.Huffman"); -Clazz.defineMethod (c$, "writeHeaders", -($fz = function (jpegObj, dct) { -var i; -var j; -var index; -var offset; -var tempArray; -this.writeMarker (javajs.img.JpgEncoder.soi); -this.writeArray (javajs.img.JpgEncoder.jfif); -var comment = null; -if (jpegObj.comment.length > 0) this.writeString (jpegObj.comment, 0xE1); -this.writeString ("JPEG Encoder Copyright 1998, James R. Weeks and BioElectroMech.\n\n", 0xFE); -var dqt = Clazz.newByteArray (134, 0); -dqt[0] = 0xFF; -dqt[1] = 0xDB; -dqt[2] = 0; -dqt[3] = 132; -offset = 4; -for (i = 0; i < 2; i++) { -dqt[offset++] = ((0) + i); -tempArray = dct.quantum[i]; -for (j = 0; j < 64; j++) { -dqt[offset++] = tempArray[javajs.img.Huffman.jpegNaturalOrder[j]]; -} -} -this.writeArray (dqt); -var sof = Clazz.newByteArray (19, 0); -sof[0] = 0xFF; -sof[1] = 0xC0; -sof[2] = 0; -sof[3] = 17; -sof[4] = jpegObj.precision; -sof[5] = ((jpegObj.imageHeight >> 8) & 0xFF); -sof[6] = ((jpegObj.imageHeight) & 0xFF); -sof[7] = ((jpegObj.imageWidth >> 8) & 0xFF); -sof[8] = ((jpegObj.imageWidth) & 0xFF); -sof[9] = jpegObj.numberOfComponents; -index = 10; -for (i = 0; i < sof[9]; i++) { -sof[index++] = jpegObj.compID[i]; -sof[index++] = ((jpegObj.hsampFactor[i] << 4) + jpegObj.vsampFactor[i]); -sof[index++] = jpegObj.qtableNumber[i]; -} -this.writeArray (sof); -this.WriteDHTHeader (javajs.img.Huffman.bitsDCluminance, javajs.img.Huffman.valDCluminance); -this.WriteDHTHeader (javajs.img.Huffman.bitsACluminance, javajs.img.Huffman.valACluminance); -this.WriteDHTHeader (javajs.img.Huffman.bitsDCchrominance, javajs.img.Huffman.valDCchrominance); -this.WriteDHTHeader (javajs.img.Huffman.bitsACchrominance, javajs.img.Huffman.valACchrominance); -var sos = Clazz.newByteArray (14, 0); -sos[0] = 0xFF; -sos[1] = 0xDA; -sos[2] = 0; -sos[3] = 12; -sos[4] = jpegObj.numberOfComponents; -index = 5; -for (i = 0; i < sos[4]; i++) { -sos[index++] = jpegObj.compID[i]; -sos[index++] = ((jpegObj.dctableNumber[i] << 4) + jpegObj.actableNumber[i]); -} -sos[index++] = jpegObj.ss; -sos[index++] = jpegObj.se; -sos[index++] = ((jpegObj.ah << 4) + jpegObj.al); -this.writeArray (sos); -return comment; -}, $fz.isPrivate = true, $fz), "javajs.img.JpegObj,javajs.img.DCT"); -Clazz.defineMethod (c$, "writeString", -($fz = function (s, id) { -var len = s.length; -var i0 = 0; -var suffix = this.applicationTag; -while (i0 < len) { -var nBytes = len - i0; -if (nBytes > 65510) { -nBytes = 65500; -var pt = s.lastIndexOf ('\n', i0 + nBytes); -if (pt > i0 + 1) nBytes = pt - i0; -}if (i0 + nBytes == len) suffix = ""; -this.writeTag (nBytes + suffix.length, id); -this.writeArray (s.substring (i0, i0 + nBytes).getBytes ()); -if (suffix.length > 0) this.writeArray (suffix.getBytes ()); -i0 += nBytes; -} -}, $fz.isPrivate = true, $fz), "~S,~N"); -Clazz.defineMethod (c$, "writeTag", -($fz = function (length, id) { -length += 2; -var com = Clazz.newByteArray (4, 0); -com[0] = 0xFF; -com[1] = id; -com[2] = ((length >> 8) & 0xFF); -com[3] = (length & 0xFF); -this.writeArray (com); -}, $fz.isPrivate = true, $fz), "~N,~N"); -Clazz.defineMethod (c$, "WriteDHTHeader", -function (bits, val) { -var dht; -var bytes = 0; -for (var j = 1; j < 17; j++) bytes += bits[j]; - -dht = Clazz.newByteArray (21 + bytes, 0); -dht[0] = 0xFF; -dht[1] = 0xC4; -var index = 4; -for (var j = 0; j < 17; j++) dht[index++] = bits[j]; - -for (var j = 0; j < bytes; j++) dht[index++] = val[j]; - -dht[2] = (((index - 2) >> 8) & 0xFF); -dht[3] = ((index - 2) & 0xFF); -this.writeArray (dht); -}, "~A,~A"); -Clazz.defineMethod (c$, "writeMarker", -function (data) { -this.out.write (data, 0, 2); -}, "~A"); -Clazz.defineMethod (c$, "writeArray", -function (data) { -this.out.write (data, 0, data.length); -}, "~A"); -Clazz.defineStatics (c$, -"CONTINUE_MAX", 65500, -"CONTINUE_MAX_BUFFER", 65510, -"eoi", Clazz.newByteArray (-1, [0xFF, 0xD9]), -"jfif", Clazz.newByteArray (-1, [0xff, 0xe0, 0, 16, 0x4a, 0x46, 0x49, 0x46, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0]), -"soi", Clazz.newByteArray (-1, [0xFF, 0xD8])); -c$ = Clazz.decorateAsClass (function () { -this.quantum = null; -this.divisors = null; -this.quantum_luminance = null; -this.DivisorsLuminance = null; -this.quantum_chrominance = null; -this.DivisorsChrominance = null; -Clazz.instantialize (this, arguments); -}, javajs.img, "DCT"); -Clazz.prepareFields (c$, function () { -this.quantum = javajs.util.AU.newInt2 (2); -this.divisors = javajs.util.AU.newDouble2 (2); -this.quantum_luminance = Clazz.newIntArray (64, 0); -this.DivisorsLuminance = Clazz.newDoubleArray (64, 0); -this.quantum_chrominance = Clazz.newIntArray (64, 0); -this.DivisorsChrominance = Clazz.newDoubleArray (64, 0); -}); -Clazz.makeConstructor (c$, -function (quality) { -this.initMatrix (quality); -}, "~N"); -Clazz.defineMethod (c$, "initMatrix", -($fz = function (quality) { -quality = (quality < 1 ? 1 : quality > 100 ? 100 : quality); -quality = (quality < 50 ? Clazz.doubleToInt (5000 / quality) : 200 - quality * 2); -this.quantum_luminance[0] = 16; -this.quantum_luminance[1] = 11; -this.quantum_luminance[2] = 10; -this.quantum_luminance[3] = 16; -this.quantum_luminance[4] = 24; -this.quantum_luminance[5] = 40; -this.quantum_luminance[6] = 51; -this.quantum_luminance[7] = 61; -this.quantum_luminance[8] = 12; -this.quantum_luminance[9] = 12; -this.quantum_luminance[10] = 14; -this.quantum_luminance[11] = 19; -this.quantum_luminance[12] = 26; -this.quantum_luminance[13] = 58; -this.quantum_luminance[14] = 60; -this.quantum_luminance[15] = 55; -this.quantum_luminance[16] = 14; -this.quantum_luminance[17] = 13; -this.quantum_luminance[18] = 16; -this.quantum_luminance[19] = 24; -this.quantum_luminance[20] = 40; -this.quantum_luminance[21] = 57; -this.quantum_luminance[22] = 69; -this.quantum_luminance[23] = 56; -this.quantum_luminance[24] = 14; -this.quantum_luminance[25] = 17; -this.quantum_luminance[26] = 22; -this.quantum_luminance[27] = 29; -this.quantum_luminance[28] = 51; -this.quantum_luminance[29] = 87; -this.quantum_luminance[30] = 80; -this.quantum_luminance[31] = 62; -this.quantum_luminance[32] = 18; -this.quantum_luminance[33] = 22; -this.quantum_luminance[34] = 37; -this.quantum_luminance[35] = 56; -this.quantum_luminance[36] = 68; -this.quantum_luminance[37] = 109; -this.quantum_luminance[38] = 103; -this.quantum_luminance[39] = 77; -this.quantum_luminance[40] = 24; -this.quantum_luminance[41] = 35; -this.quantum_luminance[42] = 55; -this.quantum_luminance[43] = 64; -this.quantum_luminance[44] = 81; -this.quantum_luminance[45] = 104; -this.quantum_luminance[46] = 113; -this.quantum_luminance[47] = 92; -this.quantum_luminance[48] = 49; -this.quantum_luminance[49] = 64; -this.quantum_luminance[50] = 78; -this.quantum_luminance[51] = 87; -this.quantum_luminance[52] = 103; -this.quantum_luminance[53] = 121; -this.quantum_luminance[54] = 120; -this.quantum_luminance[55] = 101; -this.quantum_luminance[56] = 72; -this.quantum_luminance[57] = 92; -this.quantum_luminance[58] = 95; -this.quantum_luminance[59] = 98; -this.quantum_luminance[60] = 112; -this.quantum_luminance[61] = 100; -this.quantum_luminance[62] = 103; -this.quantum_luminance[63] = 99; -javajs.img.DCT.AANscale (this.DivisorsLuminance, this.quantum_luminance, quality); -for (var i = 4; i < 64; i++) this.quantum_chrominance[i] = 99; - -this.quantum_chrominance[0] = 17; -this.quantum_chrominance[1] = 18; -this.quantum_chrominance[2] = 24; -this.quantum_chrominance[3] = 47; -this.quantum_chrominance[8] = 18; -this.quantum_chrominance[9] = 21; -this.quantum_chrominance[10] = 26; -this.quantum_chrominance[11] = 66; -this.quantum_chrominance[16] = 24; -this.quantum_chrominance[17] = 26; -this.quantum_chrominance[18] = 56; -this.quantum_chrominance[24] = 47; -this.quantum_chrominance[25] = 66; -javajs.img.DCT.AANscale (this.DivisorsChrominance, this.quantum_chrominance, quality); -this.quantum[0] = this.quantum_luminance; -this.quantum[1] = this.quantum_chrominance; -this.divisors[0] = this.DivisorsLuminance; -this.divisors[1] = this.DivisorsChrominance; -}, $fz.isPrivate = true, $fz), "~N"); -c$.AANscale = Clazz.defineMethod (c$, "AANscale", -($fz = function (divisors, values, quality) { -for (var j = 0; j < 64; j++) { -var temp = Clazz.doubleToInt ((values[j] * quality + 50) / 100); -values[j] = (temp < 1 ? 1 : temp > 255 ? 255 : temp); -} -for (var i = 0, index = 0; i < 8; i++) for (var j = 0; j < 8; j++, index++) divisors[index] = (0.125 / (values[index] * javajs.img.DCT.AANscaleFactor[i] * javajs.img.DCT.AANscaleFactor[j])); - - -}, $fz.isPrivate = true, $fz), "~A,~A,~N"); -c$.forwardDCT = Clazz.defineMethod (c$, "forwardDCT", -function (input) { -var output = Clazz.newDoubleArray (8, 8, 0); -var tmp0; -var tmp1; -var tmp2; -var tmp3; -var tmp4; -var tmp5; -var tmp6; -var tmp7; -var tmp10; -var tmp11; -var tmp12; -var tmp13; -var z1; -var z2; -var z3; -var z4; -var z5; -var z11; -var z13; -for (var i = 0; i < 8; i++) for (var j = 0; j < 8; j++) output[i][j] = (input[i][j] - 128.0); - - -for (var i = 0; i < 8; i++) { -tmp0 = output[i][0] + output[i][7]; -tmp7 = output[i][0] - output[i][7]; -tmp1 = output[i][1] + output[i][6]; -tmp6 = output[i][1] - output[i][6]; -tmp2 = output[i][2] + output[i][5]; -tmp5 = output[i][2] - output[i][5]; -tmp3 = output[i][3] + output[i][4]; -tmp4 = output[i][3] - output[i][4]; -tmp10 = tmp0 + tmp3; -tmp13 = tmp0 - tmp3; -tmp11 = tmp1 + tmp2; -tmp12 = tmp1 - tmp2; -output[i][0] = tmp10 + tmp11; -output[i][4] = tmp10 - tmp11; -z1 = (tmp12 + tmp13) * 0.707106781; -output[i][2] = tmp13 + z1; -output[i][6] = tmp13 - z1; -tmp10 = tmp4 + tmp5; -tmp11 = tmp5 + tmp6; -tmp12 = tmp6 + tmp7; -z5 = (tmp10 - tmp12) * 0.382683433; -z2 = 0.541196100 * tmp10 + z5; -z4 = 1.306562965 * tmp12 + z5; -z3 = tmp11 * 0.707106781; -z11 = tmp7 + z3; -z13 = tmp7 - z3; -output[i][5] = z13 + z2; -output[i][3] = z13 - z2; -output[i][1] = z11 + z4; -output[i][7] = z11 - z4; -} -for (var i = 0; i < 8; i++) { -tmp0 = output[0][i] + output[7][i]; -tmp7 = output[0][i] - output[7][i]; -tmp1 = output[1][i] + output[6][i]; -tmp6 = output[1][i] - output[6][i]; -tmp2 = output[2][i] + output[5][i]; -tmp5 = output[2][i] - output[5][i]; -tmp3 = output[3][i] + output[4][i]; -tmp4 = output[3][i] - output[4][i]; -tmp10 = tmp0 + tmp3; -tmp13 = tmp0 - tmp3; -tmp11 = tmp1 + tmp2; -tmp12 = tmp1 - tmp2; -output[0][i] = tmp10 + tmp11; -output[4][i] = tmp10 - tmp11; -z1 = (tmp12 + tmp13) * 0.707106781; -output[2][i] = tmp13 + z1; -output[6][i] = tmp13 - z1; -tmp10 = tmp4 + tmp5; -tmp11 = tmp5 + tmp6; -tmp12 = tmp6 + tmp7; -z5 = (tmp10 - tmp12) * 0.382683433; -z2 = 0.541196100 * tmp10 + z5; -z4 = 1.306562965 * tmp12 + z5; -z3 = tmp11 * 0.707106781; -z11 = tmp7 + z3; -z13 = tmp7 - z3; -output[5][i] = z13 + z2; -output[3][i] = z13 - z2; -output[1][i] = z11 + z4; -output[7][i] = z11 - z4; -} -return output; -}, "~A"); -c$.quantizeBlock = Clazz.defineMethod (c$, "quantizeBlock", -function (inputData, divisorsCode) { -var outputData = Clazz.newIntArray (64, 0); -for (var i = 0, index = 0; i < 8; i++) for (var j = 0; j < 8; j++, index++) outputData[index] = (Math.round (inputData[i][j] * divisorsCode[index])); - - -return outputData; -}, "~A,~A"); -Clazz.defineStatics (c$, -"N", 8, -"NN", 64, -"AANscaleFactor", Clazz.newDoubleArray (-1, [1.0, 1.387039845, 1.306562965, 1.175875602, 1.0, 0.785694958, 0.541196100, 0.275899379])); -c$ = Clazz.decorateAsClass (function () { -this.bufferPutBits = 0; -this.bufferPutBuffer = 0; -this.imageHeight = 0; -this.imageWidth = 0; -this.dc_matrix0 = null; -this.ac_matrix0 = null; -this.dc_matrix1 = null; -this.ac_matrix1 = null; -this.dc_matrix = null; -this.ac_matrix = null; -this.numOfDCTables = 0; -this.numOfACTables = 0; -Clazz.instantialize (this, arguments); -}, javajs.img, "Huffman"); -Clazz.makeConstructor (c$, -function (width, height) { -this.initHuf (); -this.imageWidth = width; -this.imageHeight = height; -}, "~N,~N"); -Clazz.defineMethod (c$, "HuffmanBlockEncoder", -function (out, zigzag, prec, dcCode, acCode) { -var temp; -var temp2; -var nbits; -var k; -var r; -var i; -this.numOfDCTables = 2; -this.numOfACTables = 2; -var matrixDC = this.dc_matrix[dcCode]; -var matrixAC = this.ac_matrix[acCode]; -temp = temp2 = zigzag[0] - prec; -if (temp < 0) { -temp = -temp; -temp2--; -}nbits = 0; -while (temp != 0) { -nbits++; -temp >>= 1; -} -this.bufferIt (out, matrixDC[nbits][0], matrixDC[nbits][1]); -if (nbits != 0) { -this.bufferIt (out, temp2, nbits); -}r = 0; -for (k = 1; k < 64; k++) { -if ((temp = zigzag[javajs.img.Huffman.jpegNaturalOrder[k]]) == 0) { -r++; -} else { -while (r > 15) { -this.bufferIt (out, matrixAC[0xF0][0], matrixAC[0xF0][1]); -r -= 16; -} -temp2 = temp; -if (temp < 0) { -temp = -temp; -temp2--; -}nbits = 1; -while ((temp >>= 1) != 0) { -nbits++; -} -i = (r << 4) + nbits; -this.bufferIt (out, matrixAC[i][0], matrixAC[i][1]); -this.bufferIt (out, temp2, nbits); -r = 0; -}} -if (r > 0) { -this.bufferIt (out, matrixAC[0][0], matrixAC[0][1]); -}}, "javajs.util.OC,~A,~N,~N,~N"); -Clazz.defineMethod (c$, "bufferIt", -function (out, code, size) { -var putBuffer = code; -var putBits = this.bufferPutBits; -putBuffer &= (1 << size) - 1; -putBits += size; -putBuffer <<= 24 - putBits; -putBuffer |= this.bufferPutBuffer; -while (putBits >= 8) { -var c = ((putBuffer >> 16) & 0xFF); -out.writeByteAsInt (c); -if (c == 0xFF) { -out.writeByteAsInt (0); -}putBuffer <<= 8; -putBits -= 8; -} -this.bufferPutBuffer = putBuffer; -this.bufferPutBits = putBits; -}, "javajs.util.OC,~N,~N"); -Clazz.defineMethod (c$, "flushBuffer", -function (out) { -var putBuffer = this.bufferPutBuffer; -var putBits = this.bufferPutBits; -while (putBits >= 8) { -var c = ((putBuffer >> 16) & 0xFF); -out.writeByteAsInt (c); -if (c == 0xFF) { -out.writeByteAsInt (0); -}putBuffer <<= 8; -putBits -= 8; -} -if (putBits > 0) { -var c = ((putBuffer >> 16) & 0xFF); -out.writeByteAsInt (c); -}}, "javajs.util.OC"); -Clazz.defineMethod (c$, "initHuf", -($fz = function () { -this.dc_matrix0 = Clazz.newIntArray (12, 2, 0); -this.dc_matrix1 = Clazz.newIntArray (12, 2, 0); -this.ac_matrix0 = Clazz.newIntArray (255, 2, 0); -this.ac_matrix1 = Clazz.newIntArray (255, 2, 0); -this.dc_matrix = javajs.util.AU.newInt3 (2, -1); -this.ac_matrix = javajs.util.AU.newInt3 (2, -1); -var p; -var l; -var i; -var lastp; -var si; -var code; -var huffsize = Clazz.newIntArray (257, 0); -var huffcode = Clazz.newIntArray (257, 0); -p = 0; -for (l = 1; l <= 16; l++) { -for (i = javajs.img.Huffman.bitsDCchrominance[l]; --i >= 0; ) { -huffsize[p++] = l; -} -} -huffsize[p] = 0; -lastp = p; -code = 0; -si = huffsize[0]; -p = 0; -while (huffsize[p] != 0) { -while (huffsize[p] == si) { -huffcode[p++] = code; -code++; -} -code <<= 1; -si++; -} -for (p = 0; p < lastp; p++) { -this.dc_matrix1[javajs.img.Huffman.valDCchrominance[p]][0] = huffcode[p]; -this.dc_matrix1[javajs.img.Huffman.valDCchrominance[p]][1] = huffsize[p]; -} -p = 0; -for (l = 1; l <= 16; l++) { -for (i = javajs.img.Huffman.bitsACchrominance[l]; --i >= 0; ) { -huffsize[p++] = l; -} -} -huffsize[p] = 0; -lastp = p; -code = 0; -si = huffsize[0]; -p = 0; -while (huffsize[p] != 0) { -while (huffsize[p] == si) { -huffcode[p++] = code; -code++; -} -code <<= 1; -si++; -} -for (p = 0; p < lastp; p++) { -this.ac_matrix1[javajs.img.Huffman.valACchrominance[p]][0] = huffcode[p]; -this.ac_matrix1[javajs.img.Huffman.valACchrominance[p]][1] = huffsize[p]; -} -p = 0; -for (l = 1; l <= 16; l++) { -for (i = javajs.img.Huffman.bitsDCluminance[l]; --i >= 0; ) { -huffsize[p++] = l; -} -} -huffsize[p] = 0; -lastp = p; -code = 0; -si = huffsize[0]; -p = 0; -while (huffsize[p] != 0) { -while (huffsize[p] == si) { -huffcode[p++] = code; -code++; -} -code <<= 1; -si++; -} -for (p = 0; p < lastp; p++) { -this.dc_matrix0[javajs.img.Huffman.valDCluminance[p]][0] = huffcode[p]; -this.dc_matrix0[javajs.img.Huffman.valDCluminance[p]][1] = huffsize[p]; -} -p = 0; -for (l = 1; l <= 16; l++) { -for (i = javajs.img.Huffman.bitsACluminance[l]; --i >= 0; ) { -huffsize[p++] = l; -} -} -huffsize[p] = 0; -lastp = p; -code = 0; -si = huffsize[0]; -p = 0; -while (huffsize[p] != 0) { -while (huffsize[p] == si) { -huffcode[p++] = code; -code++; -} -code <<= 1; -si++; -} -for (var q = 0; q < lastp; q++) { -this.ac_matrix0[javajs.img.Huffman.valACluminance[q]][0] = huffcode[q]; -this.ac_matrix0[javajs.img.Huffman.valACluminance[q]][1] = huffsize[q]; -} -this.dc_matrix[0] = this.dc_matrix0; -this.dc_matrix[1] = this.dc_matrix1; -this.ac_matrix[0] = this.ac_matrix0; -this.ac_matrix[1] = this.ac_matrix1; -}, $fz.isPrivate = true, $fz)); -Clazz.defineStatics (c$, -"bitsDCluminance", Clazz.newIntArray (-1, [0x00, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]), -"valDCluminance", Clazz.newIntArray (-1, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), -"bitsDCchrominance", Clazz.newIntArray (-1, [0x01, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]), -"valDCchrominance", Clazz.newIntArray (-1, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), -"bitsACluminance", Clazz.newIntArray (-1, [0x10, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d]), -"valACluminance", Clazz.newIntArray (-1, [0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa]), -"bitsACchrominance", Clazz.newIntArray (-1, [0x11, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77]), -"valACchrominance", Clazz.newIntArray (-1, [0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa]), -"jpegNaturalOrder", Clazz.newIntArray (-1, [0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63])); -c$ = Clazz.decorateAsClass (function () { -this.comment = null; -this.imageHeight = 0; -this.imageWidth = 0; -this.blockWidth = null; -this.blockHeight = null; -this.precision = 8; -this.numberOfComponents = 3; -this.components = null; -this.compID = null; -this.hsampFactor = null; -this.vsampFactor = null; -this.qtableNumber = null; -this.dctableNumber = null; -this.actableNumber = null; -this.lastColumnIsDummy = null; -this.lastRowIsDummy = null; -this.ss = 0; -this.se = 63; -this.ah = 0; -this.al = 0; -this.compWidth = null; -this.compHeight = null; -this.maxHsampFactor = 0; -this.maxVsampFactor = 0; -Clazz.instantialize (this, arguments); -}, javajs.img, "JpegObj"); -Clazz.prepareFields (c$, function () { -this.compID = Clazz.newIntArray (-1, [1, 2, 3]); -this.hsampFactor = Clazz.newIntArray (-1, [1, 1, 1]); -this.vsampFactor = Clazz.newIntArray (-1, [1, 1, 1]); -this.qtableNumber = Clazz.newIntArray (-1, [0, 1, 1]); -this.dctableNumber = Clazz.newIntArray (-1, [0, 1, 1]); -this.actableNumber = Clazz.newIntArray (-1, [0, 1, 1]); -this.lastColumnIsDummy = Clazz.newBooleanArray (-1, [false, false, false]); -this.lastRowIsDummy = Clazz.newBooleanArray (-1, [false, false, false]); -}); -Clazz.makeConstructor (c$, -function () { -this.components = javajs.util.AU.newFloat3 (this.numberOfComponents, -1); -this.compWidth = Clazz.newIntArray (this.numberOfComponents, 0); -this.compHeight = Clazz.newIntArray (this.numberOfComponents, 0); -this.blockWidth = Clazz.newIntArray (this.numberOfComponents, 0); -this.blockHeight = Clazz.newIntArray (this.numberOfComponents, 0); -}); -Clazz.defineMethod (c$, "getYCCArray", -function (pixels) { -this.maxHsampFactor = 1; -this.maxVsampFactor = 1; -for (var y = 0; y < this.numberOfComponents; y++) { -this.maxHsampFactor = Math.max (this.maxHsampFactor, this.hsampFactor[y]); -this.maxVsampFactor = Math.max (this.maxVsampFactor, this.vsampFactor[y]); -} -for (var y = 0; y < this.numberOfComponents; y++) { -this.compWidth[y] = (Clazz.doubleToInt (((this.imageWidth % 8 != 0) ? (Clazz.doubleToInt (Math.ceil (this.imageWidth / 8.0))) * 8 : this.imageWidth) / this.maxHsampFactor)) * this.hsampFactor[y]; -if (this.compWidth[y] != ((Clazz.doubleToInt (this.imageWidth / this.maxHsampFactor)) * this.hsampFactor[y])) { -this.lastColumnIsDummy[y] = true; -}this.blockWidth[y] = Clazz.doubleToInt (Math.ceil (this.compWidth[y] / 8.0)); -this.compHeight[y] = (Clazz.doubleToInt (((this.imageHeight % 8 != 0) ? (Clazz.doubleToInt (Math.ceil (this.imageHeight / 8.0))) * 8 : this.imageHeight) / this.maxVsampFactor)) * this.vsampFactor[y]; -if (this.compHeight[y] != ((Clazz.doubleToInt (this.imageHeight / this.maxVsampFactor)) * this.vsampFactor[y])) { -this.lastRowIsDummy[y] = true; -}this.blockHeight[y] = Clazz.doubleToInt (Math.ceil (this.compHeight[y] / 8.0)); -} -var Y = Clazz.newFloatArray (this.compHeight[0], this.compWidth[0], 0); -var Cr1 = Clazz.newFloatArray (this.compHeight[0], this.compWidth[0], 0); -var Cb1 = Clazz.newFloatArray (this.compHeight[0], this.compWidth[0], 0); -for (var pt = 0, y = 0; y < this.imageHeight; ++y) { -for (var x = 0; x < this.imageWidth; ++x, pt++) { -var p = pixels[pt]; -var r = ((p >> 16) & 0xff); -var g = ((p >> 8) & 0xff); -var b = (p & 0xff); -Y[y][x] = ((0.299 * r + 0.587 * g + 0.114 * b)); -Cb1[y][x] = 128 + ((-0.16874 * r - 0.33126 * g + 0.5 * b)); -Cr1[y][x] = 128 + ((0.5 * r - 0.41869 * g - 0.08131 * b)); -} -} -this.components[0] = Y; -this.components[1] = Cb1; -this.components[2] = Cr1; -}, "~A"); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.img.ImageEncoder", "javajs.util.AU"], ["javajs.img.DCT", "$.JpgEncoder", "$.JpegObj", "$.Huffman"], null, function () { +c$ = Clazz.decorateAsClass (function () { +this.jpegObj = null; +this.huf = null; +this.dct = null; +this.defaultQuality = 100; +this.applicationTag = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "JpgEncoder", javajs.img.ImageEncoder); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.img.JpgEncoder, []); +}); +Clazz.overrideMethod (c$, "setParams", +function (params) { +if (this.quality <= 0) this.quality = (params.containsKey ("qualityJPG") ? (params.get ("qualityJPG")).intValue () : this.defaultQuality); +this.jpegObj = new javajs.img.JpegObj (); +this.jpegObj.comment = params.get ("comment"); +this.applicationTag = params.get ("jpgAppTag"); +}, "java.util.Map"); +Clazz.overrideMethod (c$, "generate", +function () { +this.jpegObj.imageWidth = this.width; +this.jpegObj.imageHeight = this.height; +this.dct = new javajs.img.DCT (this.quality); +this.huf = new javajs.img.Huffman (this.width, this.height); +if (this.jpegObj == null) return; +this.jpegObj.getYCCArray (this.pixels); +var longState = this.writeHeaders (this.jpegObj, this.dct); +this.writeCompressedData (this.jpegObj, this.dct, this.huf); +this.writeMarker (javajs.img.JpgEncoder.eoi); +if (longState != null) { +var b = longState.getBytes (); +this.out.write (b, 0, b.length); +}}); +Clazz.defineMethod (c$, "writeCompressedData", +($fz = function (jpegObj, dct, huf) { +var i; +var j; +var r; +var c; +var a; +var b; +var comp; +var xpos; +var ypos; +var xblockoffset; +var yblockoffset; +var inputArray; +var dctArray1 = Clazz.newFloatArray (8, 8, 0); +var dctArray2 = Clazz.newDoubleArray (8, 8, 0); +var dctArray3 = Clazz.newIntArray (64, 0); +var lastDCvalue = Clazz.newIntArray (jpegObj.numberOfComponents, 0); +var minBlockWidth; +var minBlockHeight; +minBlockWidth = ((huf.imageWidth % 8 != 0) ? Clazz.doubleToInt (Math.floor (huf.imageWidth / 8.0) + 1) * 8 : huf.imageWidth); +minBlockHeight = ((huf.imageHeight % 8 != 0) ? Clazz.doubleToInt (Math.floor (huf.imageHeight / 8.0) + 1) * 8 : huf.imageHeight); +for (comp = 0; comp < jpegObj.numberOfComponents; comp++) { +minBlockWidth = Math.min (minBlockWidth, jpegObj.blockWidth[comp]); +minBlockHeight = Math.min (minBlockHeight, jpegObj.blockHeight[comp]); +} +xpos = 0; +for (r = 0; r < minBlockHeight; r++) { +for (c = 0; c < minBlockWidth; c++) { +xpos = c * 8; +ypos = r * 8; +for (comp = 0; comp < jpegObj.numberOfComponents; comp++) { +inputArray = jpegObj.components[comp]; +var vsampF = jpegObj.vsampFactor[comp]; +var hsampF = jpegObj.hsampFactor[comp]; +var qNumber = jpegObj.qtableNumber[comp]; +var dcNumber = jpegObj.dctableNumber[comp]; +var acNumber = jpegObj.actableNumber[comp]; +for (i = 0; i < vsampF; i++) { +for (j = 0; j < hsampF; j++) { +xblockoffset = j * 8; +yblockoffset = i * 8; +for (a = 0; a < 8; a++) { +for (b = 0; b < 8; b++) { +dctArray1[a][b] = inputArray[ypos + yblockoffset + a][xpos + xblockoffset + b]; +} +} +dctArray2 = javajs.img.DCT.forwardDCT (dctArray1); +dctArray3 = javajs.img.DCT.quantizeBlock (dctArray2, dct.divisors[qNumber]); +huf.HuffmanBlockEncoder (this.out, dctArray3, lastDCvalue[comp], dcNumber, acNumber); +lastDCvalue[comp] = dctArray3[0]; +} +} +} +} +} +huf.flushBuffer (this.out); +}, $fz.isPrivate = true, $fz), "javajs.img.JpegObj,javajs.img.DCT,javajs.img.Huffman"); +Clazz.defineMethod (c$, "writeHeaders", +($fz = function (jpegObj, dct) { +var i; +var j; +var index; +var offset; +var tempArray; +this.writeMarker (javajs.img.JpgEncoder.soi); +this.writeArray (javajs.img.JpgEncoder.jfif); +var comment = null; +if (jpegObj.comment.length > 0) this.writeString (jpegObj.comment, 0xE1); +this.writeString ("JPEG Encoder Copyright 1998, James R. Weeks and BioElectroMech.\n\n", 0xFE); +var dqt = Clazz.newByteArray (134, 0); +dqt[0] = 0xFF; +dqt[1] = 0xDB; +dqt[2] = 0; +dqt[3] = 132; +offset = 4; +for (i = 0; i < 2; i++) { +dqt[offset++] = ((0) + i); +tempArray = dct.quantum[i]; +for (j = 0; j < 64; j++) { +dqt[offset++] = tempArray[javajs.img.Huffman.jpegNaturalOrder[j]]; +} +} +this.writeArray (dqt); +var sof = Clazz.newByteArray (19, 0); +sof[0] = 0xFF; +sof[1] = 0xC0; +sof[2] = 0; +sof[3] = 17; +sof[4] = jpegObj.precision; +sof[5] = ((jpegObj.imageHeight >> 8) & 0xFF); +sof[6] = ((jpegObj.imageHeight) & 0xFF); +sof[7] = ((jpegObj.imageWidth >> 8) & 0xFF); +sof[8] = ((jpegObj.imageWidth) & 0xFF); +sof[9] = jpegObj.numberOfComponents; +index = 10; +for (i = 0; i < sof[9]; i++) { +sof[index++] = jpegObj.compID[i]; +sof[index++] = ((jpegObj.hsampFactor[i] << 4) + jpegObj.vsampFactor[i]); +sof[index++] = jpegObj.qtableNumber[i]; +} +this.writeArray (sof); +this.WriteDHTHeader (javajs.img.Huffman.bitsDCluminance, javajs.img.Huffman.valDCluminance); +this.WriteDHTHeader (javajs.img.Huffman.bitsACluminance, javajs.img.Huffman.valACluminance); +this.WriteDHTHeader (javajs.img.Huffman.bitsDCchrominance, javajs.img.Huffman.valDCchrominance); +this.WriteDHTHeader (javajs.img.Huffman.bitsACchrominance, javajs.img.Huffman.valACchrominance); +var sos = Clazz.newByteArray (14, 0); +sos[0] = 0xFF; +sos[1] = 0xDA; +sos[2] = 0; +sos[3] = 12; +sos[4] = jpegObj.numberOfComponents; +index = 5; +for (i = 0; i < sos[4]; i++) { +sos[index++] = jpegObj.compID[i]; +sos[index++] = ((jpegObj.dctableNumber[i] << 4) + jpegObj.actableNumber[i]); +} +sos[index++] = jpegObj.ss; +sos[index++] = jpegObj.se; +sos[index++] = ((jpegObj.ah << 4) + jpegObj.al); +this.writeArray (sos); +return comment; +}, $fz.isPrivate = true, $fz), "javajs.img.JpegObj,javajs.img.DCT"); +Clazz.defineMethod (c$, "writeString", +($fz = function (s, id) { +var len = s.length; +var i0 = 0; +var suffix = this.applicationTag; +while (i0 < len) { +var nBytes = len - i0; +if (nBytes > 65510) { +nBytes = 65500; +var pt = s.lastIndexOf ('\n', i0 + nBytes); +if (pt > i0 + 1) nBytes = pt - i0; +}if (i0 + nBytes == len) suffix = ""; +this.writeTag (nBytes + suffix.length, id); +this.writeArray (s.substring (i0, i0 + nBytes).getBytes ()); +if (suffix.length > 0) this.writeArray (suffix.getBytes ()); +i0 += nBytes; +} +}, $fz.isPrivate = true, $fz), "~S,~N"); +Clazz.defineMethod (c$, "writeTag", +($fz = function (length, id) { +length += 2; +var com = Clazz.newByteArray (4, 0); +com[0] = 0xFF; +com[1] = id; +com[2] = ((length >> 8) & 0xFF); +com[3] = (length & 0xFF); +this.writeArray (com); +}, $fz.isPrivate = true, $fz), "~N,~N"); +Clazz.defineMethod (c$, "WriteDHTHeader", +function (bits, val) { +var dht; +var bytes = 0; +for (var j = 1; j < 17; j++) bytes += bits[j]; + +dht = Clazz.newByteArray (21 + bytes, 0); +dht[0] = 0xFF; +dht[1] = 0xC4; +var index = 4; +for (var j = 0; j < 17; j++) dht[index++] = bits[j]; + +for (var j = 0; j < bytes; j++) dht[index++] = val[j]; + +dht[2] = (((index - 2) >> 8) & 0xFF); +dht[3] = ((index - 2) & 0xFF); +this.writeArray (dht); +}, "~A,~A"); +Clazz.defineMethod (c$, "writeMarker", +function (data) { +this.out.write (data, 0, 2); +}, "~A"); +Clazz.defineMethod (c$, "writeArray", +function (data) { +this.out.write (data, 0, data.length); +}, "~A"); +Clazz.defineStatics (c$, +"CONTINUE_MAX", 65500, +"CONTINUE_MAX_BUFFER", 65510, +"eoi", Clazz.newByteArray (-1, [0xFF, 0xD9]), +"jfif", Clazz.newByteArray (-1, [0xff, 0xe0, 0, 16, 0x4a, 0x46, 0x49, 0x46, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0]), +"soi", Clazz.newByteArray (-1, [0xFF, 0xD8])); +c$ = Clazz.decorateAsClass (function () { +this.quantum = null; +this.divisors = null; +this.quantum_luminance = null; +this.DivisorsLuminance = null; +this.quantum_chrominance = null; +this.DivisorsChrominance = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "DCT"); +Clazz.prepareFields (c$, function () { +this.quantum = javajs.util.AU.newInt2 (2); +this.divisors = javajs.util.AU.newDouble2 (2); +this.quantum_luminance = Clazz.newIntArray (64, 0); +this.DivisorsLuminance = Clazz.newDoubleArray (64, 0); +this.quantum_chrominance = Clazz.newIntArray (64, 0); +this.DivisorsChrominance = Clazz.newDoubleArray (64, 0); +}); +Clazz.makeConstructor (c$, +function (quality) { +this.initMatrix (quality); +}, "~N"); +Clazz.defineMethod (c$, "initMatrix", +($fz = function (quality) { +quality = (quality < 1 ? 1 : quality > 100 ? 100 : quality); +quality = (quality < 50 ? Clazz.doubleToInt (5000 / quality) : 200 - quality * 2); +this.quantum_luminance[0] = 16; +this.quantum_luminance[1] = 11; +this.quantum_luminance[2] = 10; +this.quantum_luminance[3] = 16; +this.quantum_luminance[4] = 24; +this.quantum_luminance[5] = 40; +this.quantum_luminance[6] = 51; +this.quantum_luminance[7] = 61; +this.quantum_luminance[8] = 12; +this.quantum_luminance[9] = 12; +this.quantum_luminance[10] = 14; +this.quantum_luminance[11] = 19; +this.quantum_luminance[12] = 26; +this.quantum_luminance[13] = 58; +this.quantum_luminance[14] = 60; +this.quantum_luminance[15] = 55; +this.quantum_luminance[16] = 14; +this.quantum_luminance[17] = 13; +this.quantum_luminance[18] = 16; +this.quantum_luminance[19] = 24; +this.quantum_luminance[20] = 40; +this.quantum_luminance[21] = 57; +this.quantum_luminance[22] = 69; +this.quantum_luminance[23] = 56; +this.quantum_luminance[24] = 14; +this.quantum_luminance[25] = 17; +this.quantum_luminance[26] = 22; +this.quantum_luminance[27] = 29; +this.quantum_luminance[28] = 51; +this.quantum_luminance[29] = 87; +this.quantum_luminance[30] = 80; +this.quantum_luminance[31] = 62; +this.quantum_luminance[32] = 18; +this.quantum_luminance[33] = 22; +this.quantum_luminance[34] = 37; +this.quantum_luminance[35] = 56; +this.quantum_luminance[36] = 68; +this.quantum_luminance[37] = 109; +this.quantum_luminance[38] = 103; +this.quantum_luminance[39] = 77; +this.quantum_luminance[40] = 24; +this.quantum_luminance[41] = 35; +this.quantum_luminance[42] = 55; +this.quantum_luminance[43] = 64; +this.quantum_luminance[44] = 81; +this.quantum_luminance[45] = 104; +this.quantum_luminance[46] = 113; +this.quantum_luminance[47] = 92; +this.quantum_luminance[48] = 49; +this.quantum_luminance[49] = 64; +this.quantum_luminance[50] = 78; +this.quantum_luminance[51] = 87; +this.quantum_luminance[52] = 103; +this.quantum_luminance[53] = 121; +this.quantum_luminance[54] = 120; +this.quantum_luminance[55] = 101; +this.quantum_luminance[56] = 72; +this.quantum_luminance[57] = 92; +this.quantum_luminance[58] = 95; +this.quantum_luminance[59] = 98; +this.quantum_luminance[60] = 112; +this.quantum_luminance[61] = 100; +this.quantum_luminance[62] = 103; +this.quantum_luminance[63] = 99; +javajs.img.DCT.AANscale (this.DivisorsLuminance, this.quantum_luminance, quality); +for (var i = 4; i < 64; i++) this.quantum_chrominance[i] = 99; + +this.quantum_chrominance[0] = 17; +this.quantum_chrominance[1] = 18; +this.quantum_chrominance[2] = 24; +this.quantum_chrominance[3] = 47; +this.quantum_chrominance[8] = 18; +this.quantum_chrominance[9] = 21; +this.quantum_chrominance[10] = 26; +this.quantum_chrominance[11] = 66; +this.quantum_chrominance[16] = 24; +this.quantum_chrominance[17] = 26; +this.quantum_chrominance[18] = 56; +this.quantum_chrominance[24] = 47; +this.quantum_chrominance[25] = 66; +javajs.img.DCT.AANscale (this.DivisorsChrominance, this.quantum_chrominance, quality); +this.quantum[0] = this.quantum_luminance; +this.quantum[1] = this.quantum_chrominance; +this.divisors[0] = this.DivisorsLuminance; +this.divisors[1] = this.DivisorsChrominance; +}, $fz.isPrivate = true, $fz), "~N"); +c$.AANscale = Clazz.defineMethod (c$, "AANscale", +($fz = function (divisors, values, quality) { +for (var j = 0; j < 64; j++) { +var temp = Clazz.doubleToInt ((values[j] * quality + 50) / 100); +values[j] = (temp < 1 ? 1 : temp > 255 ? 255 : temp); +} +for (var i = 0, index = 0; i < 8; i++) for (var j = 0; j < 8; j++, index++) divisors[index] = (0.125 / (values[index] * javajs.img.DCT.AANscaleFactor[i] * javajs.img.DCT.AANscaleFactor[j])); + + +}, $fz.isPrivate = true, $fz), "~A,~A,~N"); +c$.forwardDCT = Clazz.defineMethod (c$, "forwardDCT", +function (input) { +var output = Clazz.newDoubleArray (8, 8, 0); +var tmp0; +var tmp1; +var tmp2; +var tmp3; +var tmp4; +var tmp5; +var tmp6; +var tmp7; +var tmp10; +var tmp11; +var tmp12; +var tmp13; +var z1; +var z2; +var z3; +var z4; +var z5; +var z11; +var z13; +for (var i = 0; i < 8; i++) for (var j = 0; j < 8; j++) output[i][j] = (input[i][j] - 128.0); + + +for (var i = 0; i < 8; i++) { +tmp0 = output[i][0] + output[i][7]; +tmp7 = output[i][0] - output[i][7]; +tmp1 = output[i][1] + output[i][6]; +tmp6 = output[i][1] - output[i][6]; +tmp2 = output[i][2] + output[i][5]; +tmp5 = output[i][2] - output[i][5]; +tmp3 = output[i][3] + output[i][4]; +tmp4 = output[i][3] - output[i][4]; +tmp10 = tmp0 + tmp3; +tmp13 = tmp0 - tmp3; +tmp11 = tmp1 + tmp2; +tmp12 = tmp1 - tmp2; +output[i][0] = tmp10 + tmp11; +output[i][4] = tmp10 - tmp11; +z1 = (tmp12 + tmp13) * 0.707106781; +output[i][2] = tmp13 + z1; +output[i][6] = tmp13 - z1; +tmp10 = tmp4 + tmp5; +tmp11 = tmp5 + tmp6; +tmp12 = tmp6 + tmp7; +z5 = (tmp10 - tmp12) * 0.382683433; +z2 = 0.541196100 * tmp10 + z5; +z4 = 1.306562965 * tmp12 + z5; +z3 = tmp11 * 0.707106781; +z11 = tmp7 + z3; +z13 = tmp7 - z3; +output[i][5] = z13 + z2; +output[i][3] = z13 - z2; +output[i][1] = z11 + z4; +output[i][7] = z11 - z4; +} +for (var i = 0; i < 8; i++) { +tmp0 = output[0][i] + output[7][i]; +tmp7 = output[0][i] - output[7][i]; +tmp1 = output[1][i] + output[6][i]; +tmp6 = output[1][i] - output[6][i]; +tmp2 = output[2][i] + output[5][i]; +tmp5 = output[2][i] - output[5][i]; +tmp3 = output[3][i] + output[4][i]; +tmp4 = output[3][i] - output[4][i]; +tmp10 = tmp0 + tmp3; +tmp13 = tmp0 - tmp3; +tmp11 = tmp1 + tmp2; +tmp12 = tmp1 - tmp2; +output[0][i] = tmp10 + tmp11; +output[4][i] = tmp10 - tmp11; +z1 = (tmp12 + tmp13) * 0.707106781; +output[2][i] = tmp13 + z1; +output[6][i] = tmp13 - z1; +tmp10 = tmp4 + tmp5; +tmp11 = tmp5 + tmp6; +tmp12 = tmp6 + tmp7; +z5 = (tmp10 - tmp12) * 0.382683433; +z2 = 0.541196100 * tmp10 + z5; +z4 = 1.306562965 * tmp12 + z5; +z3 = tmp11 * 0.707106781; +z11 = tmp7 + z3; +z13 = tmp7 - z3; +output[5][i] = z13 + z2; +output[3][i] = z13 - z2; +output[1][i] = z11 + z4; +output[7][i] = z11 - z4; +} +return output; +}, "~A"); +c$.quantizeBlock = Clazz.defineMethod (c$, "quantizeBlock", +function (inputData, divisorsCode) { +var outputData = Clazz.newIntArray (64, 0); +for (var i = 0, index = 0; i < 8; i++) for (var j = 0; j < 8; j++, index++) outputData[index] = (Math.round (inputData[i][j] * divisorsCode[index])); + + +return outputData; +}, "~A,~A"); +Clazz.defineStatics (c$, +"N", 8, +"NN", 64, +"AANscaleFactor", Clazz.newDoubleArray (-1, [1.0, 1.387039845, 1.306562965, 1.175875602, 1.0, 0.785694958, 0.541196100, 0.275899379])); +c$ = Clazz.decorateAsClass (function () { +this.bufferPutBits = 0; +this.bufferPutBuffer = 0; +this.imageHeight = 0; +this.imageWidth = 0; +this.dc_matrix0 = null; +this.ac_matrix0 = null; +this.dc_matrix1 = null; +this.ac_matrix1 = null; +this.dc_matrix = null; +this.ac_matrix = null; +this.numOfDCTables = 0; +this.numOfACTables = 0; +Clazz.instantialize (this, arguments); +}, javajs.img, "Huffman"); +Clazz.makeConstructor (c$, +function (width, height) { +this.initHuf (); +this.imageWidth = width; +this.imageHeight = height; +}, "~N,~N"); +Clazz.defineMethod (c$, "HuffmanBlockEncoder", +function (out, zigzag, prec, dcCode, acCode) { +var temp; +var temp2; +var nbits; +var k; +var r; +var i; +this.numOfDCTables = 2; +this.numOfACTables = 2; +var matrixDC = this.dc_matrix[dcCode]; +var matrixAC = this.ac_matrix[acCode]; +temp = temp2 = zigzag[0] - prec; +if (temp < 0) { +temp = -temp; +temp2--; +}nbits = 0; +while (temp != 0) { +nbits++; +temp >>= 1; +} +this.bufferIt (out, matrixDC[nbits][0], matrixDC[nbits][1]); +if (nbits != 0) { +this.bufferIt (out, temp2, nbits); +}r = 0; +for (k = 1; k < 64; k++) { +if ((temp = zigzag[javajs.img.Huffman.jpegNaturalOrder[k]]) == 0) { +r++; +} else { +while (r > 15) { +this.bufferIt (out, matrixAC[0xF0][0], matrixAC[0xF0][1]); +r -= 16; +} +temp2 = temp; +if (temp < 0) { +temp = -temp; +temp2--; +}nbits = 1; +while ((temp >>= 1) != 0) { +nbits++; +} +i = (r << 4) + nbits; +this.bufferIt (out, matrixAC[i][0], matrixAC[i][1]); +this.bufferIt (out, temp2, nbits); +r = 0; +}} +if (r > 0) { +this.bufferIt (out, matrixAC[0][0], matrixAC[0][1]); +}}, "javajs.util.OC,~A,~N,~N,~N"); +Clazz.defineMethod (c$, "bufferIt", +function (out, code, size) { +var putBuffer = code; +var putBits = this.bufferPutBits; +putBuffer &= (1 << size) - 1; +putBits += size; +putBuffer <<= 24 - putBits; +putBuffer |= this.bufferPutBuffer; +while (putBits >= 8) { +var c = ((putBuffer >> 16) & 0xFF); +out.writeByteAsInt (c); +if (c == 0xFF) { +out.writeByteAsInt (0); +}putBuffer <<= 8; +putBits -= 8; +} +this.bufferPutBuffer = putBuffer; +this.bufferPutBits = putBits; +}, "javajs.util.OC,~N,~N"); +Clazz.defineMethod (c$, "flushBuffer", +function (out) { +var putBuffer = this.bufferPutBuffer; +var putBits = this.bufferPutBits; +while (putBits >= 8) { +var c = ((putBuffer >> 16) & 0xFF); +out.writeByteAsInt (c); +if (c == 0xFF) { +out.writeByteAsInt (0); +}putBuffer <<= 8; +putBits -= 8; +} +if (putBits > 0) { +var c = ((putBuffer >> 16) & 0xFF); +out.writeByteAsInt (c); +}}, "javajs.util.OC"); +Clazz.defineMethod (c$, "initHuf", +($fz = function () { +this.dc_matrix0 = Clazz.newIntArray (12, 2, 0); +this.dc_matrix1 = Clazz.newIntArray (12, 2, 0); +this.ac_matrix0 = Clazz.newIntArray (255, 2, 0); +this.ac_matrix1 = Clazz.newIntArray (255, 2, 0); +this.dc_matrix = javajs.util.AU.newInt3 (2, -1); +this.ac_matrix = javajs.util.AU.newInt3 (2, -1); +var p; +var l; +var i; +var lastp; +var si; +var code; +var huffsize = Clazz.newIntArray (257, 0); +var huffcode = Clazz.newIntArray (257, 0); +p = 0; +for (l = 1; l <= 16; l++) { +for (i = javajs.img.Huffman.bitsDCchrominance[l]; --i >= 0; ) { +huffsize[p++] = l; +} +} +huffsize[p] = 0; +lastp = p; +code = 0; +si = huffsize[0]; +p = 0; +while (huffsize[p] != 0) { +while (huffsize[p] == si) { +huffcode[p++] = code; +code++; +} +code <<= 1; +si++; +} +for (p = 0; p < lastp; p++) { +this.dc_matrix1[javajs.img.Huffman.valDCchrominance[p]][0] = huffcode[p]; +this.dc_matrix1[javajs.img.Huffman.valDCchrominance[p]][1] = huffsize[p]; +} +p = 0; +for (l = 1; l <= 16; l++) { +for (i = javajs.img.Huffman.bitsACchrominance[l]; --i >= 0; ) { +huffsize[p++] = l; +} +} +huffsize[p] = 0; +lastp = p; +code = 0; +si = huffsize[0]; +p = 0; +while (huffsize[p] != 0) { +while (huffsize[p] == si) { +huffcode[p++] = code; +code++; +} +code <<= 1; +si++; +} +for (p = 0; p < lastp; p++) { +this.ac_matrix1[javajs.img.Huffman.valACchrominance[p]][0] = huffcode[p]; +this.ac_matrix1[javajs.img.Huffman.valACchrominance[p]][1] = huffsize[p]; +} +p = 0; +for (l = 1; l <= 16; l++) { +for (i = javajs.img.Huffman.bitsDCluminance[l]; --i >= 0; ) { +huffsize[p++] = l; +} +} +huffsize[p] = 0; +lastp = p; +code = 0; +si = huffsize[0]; +p = 0; +while (huffsize[p] != 0) { +while (huffsize[p] == si) { +huffcode[p++] = code; +code++; +} +code <<= 1; +si++; +} +for (p = 0; p < lastp; p++) { +this.dc_matrix0[javajs.img.Huffman.valDCluminance[p]][0] = huffcode[p]; +this.dc_matrix0[javajs.img.Huffman.valDCluminance[p]][1] = huffsize[p]; +} +p = 0; +for (l = 1; l <= 16; l++) { +for (i = javajs.img.Huffman.bitsACluminance[l]; --i >= 0; ) { +huffsize[p++] = l; +} +} +huffsize[p] = 0; +lastp = p; +code = 0; +si = huffsize[0]; +p = 0; +while (huffsize[p] != 0) { +while (huffsize[p] == si) { +huffcode[p++] = code; +code++; +} +code <<= 1; +si++; +} +for (var q = 0; q < lastp; q++) { +this.ac_matrix0[javajs.img.Huffman.valACluminance[q]][0] = huffcode[q]; +this.ac_matrix0[javajs.img.Huffman.valACluminance[q]][1] = huffsize[q]; +} +this.dc_matrix[0] = this.dc_matrix0; +this.dc_matrix[1] = this.dc_matrix1; +this.ac_matrix[0] = this.ac_matrix0; +this.ac_matrix[1] = this.ac_matrix1; +}, $fz.isPrivate = true, $fz)); +Clazz.defineStatics (c$, +"bitsDCluminance", Clazz.newIntArray (-1, [0x00, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]), +"valDCluminance", Clazz.newIntArray (-1, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), +"bitsDCchrominance", Clazz.newIntArray (-1, [0x01, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]), +"valDCchrominance", Clazz.newIntArray (-1, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), +"bitsACluminance", Clazz.newIntArray (-1, [0x10, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d]), +"valACluminance", Clazz.newIntArray (-1, [0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa]), +"bitsACchrominance", Clazz.newIntArray (-1, [0x11, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77]), +"valACchrominance", Clazz.newIntArray (-1, [0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa]), +"jpegNaturalOrder", Clazz.newIntArray (-1, [0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63])); +c$ = Clazz.decorateAsClass (function () { +this.comment = null; +this.imageHeight = 0; +this.imageWidth = 0; +this.blockWidth = null; +this.blockHeight = null; +this.precision = 8; +this.numberOfComponents = 3; +this.components = null; +this.compID = null; +this.hsampFactor = null; +this.vsampFactor = null; +this.qtableNumber = null; +this.dctableNumber = null; +this.actableNumber = null; +this.lastColumnIsDummy = null; +this.lastRowIsDummy = null; +this.ss = 0; +this.se = 63; +this.ah = 0; +this.al = 0; +this.compWidth = null; +this.compHeight = null; +this.maxHsampFactor = 0; +this.maxVsampFactor = 0; +Clazz.instantialize (this, arguments); +}, javajs.img, "JpegObj"); +Clazz.prepareFields (c$, function () { +this.compID = Clazz.newIntArray (-1, [1, 2, 3]); +this.hsampFactor = Clazz.newIntArray (-1, [1, 1, 1]); +this.vsampFactor = Clazz.newIntArray (-1, [1, 1, 1]); +this.qtableNumber = Clazz.newIntArray (-1, [0, 1, 1]); +this.dctableNumber = Clazz.newIntArray (-1, [0, 1, 1]); +this.actableNumber = Clazz.newIntArray (-1, [0, 1, 1]); +this.lastColumnIsDummy = Clazz.newBooleanArray (-1, [false, false, false]); +this.lastRowIsDummy = Clazz.newBooleanArray (-1, [false, false, false]); +}); +Clazz.makeConstructor (c$, +function () { +this.components = javajs.util.AU.newFloat3 (this.numberOfComponents, -1); +this.compWidth = Clazz.newIntArray (this.numberOfComponents, 0); +this.compHeight = Clazz.newIntArray (this.numberOfComponents, 0); +this.blockWidth = Clazz.newIntArray (this.numberOfComponents, 0); +this.blockHeight = Clazz.newIntArray (this.numberOfComponents, 0); +}); +Clazz.defineMethod (c$, "getYCCArray", +function (pixels) { +this.maxHsampFactor = 1; +this.maxVsampFactor = 1; +for (var y = 0; y < this.numberOfComponents; y++) { +this.maxHsampFactor = Math.max (this.maxHsampFactor, this.hsampFactor[y]); +this.maxVsampFactor = Math.max (this.maxVsampFactor, this.vsampFactor[y]); +} +for (var y = 0; y < this.numberOfComponents; y++) { +this.compWidth[y] = (Clazz.doubleToInt (((this.imageWidth % 8 != 0) ? (Clazz.doubleToInt (Math.ceil (this.imageWidth / 8.0))) * 8 : this.imageWidth) / this.maxHsampFactor)) * this.hsampFactor[y]; +if (this.compWidth[y] != ((Clazz.doubleToInt (this.imageWidth / this.maxHsampFactor)) * this.hsampFactor[y])) { +this.lastColumnIsDummy[y] = true; +}this.blockWidth[y] = Clazz.doubleToInt (Math.ceil (this.compWidth[y] / 8.0)); +this.compHeight[y] = (Clazz.doubleToInt (((this.imageHeight % 8 != 0) ? (Clazz.doubleToInt (Math.ceil (this.imageHeight / 8.0))) * 8 : this.imageHeight) / this.maxVsampFactor)) * this.vsampFactor[y]; +if (this.compHeight[y] != ((Clazz.doubleToInt (this.imageHeight / this.maxVsampFactor)) * this.vsampFactor[y])) { +this.lastRowIsDummy[y] = true; +}this.blockHeight[y] = Clazz.doubleToInt (Math.ceil (this.compHeight[y] / 8.0)); +} +var Y = Clazz.newFloatArray (this.compHeight[0], this.compWidth[0], 0); +var Cr1 = Clazz.newFloatArray (this.compHeight[0], this.compWidth[0], 0); +var Cb1 = Clazz.newFloatArray (this.compHeight[0], this.compWidth[0], 0); +for (var pt = 0, y = 0; y < this.imageHeight; ++y) { +for (var x = 0; x < this.imageWidth; ++x, pt++) { +var p = pixels[pt]; +var r = ((p >> 16) & 0xff); +var g = ((p >> 8) & 0xff); +var b = (p & 0xff); +Y[y][x] = ((0.299 * r + 0.587 * g + 0.114 * b)); +Cb1[y][x] = 128 + ((-0.16874 * r - 0.33126 * g + 0.5 * b)); +Cr1[y][x] = 128 + ((0.5 * r - 0.41869 * g - 0.08131 * b)); +} +} +this.components[0] = Y; +this.components[1] = Cb1; +this.components[2] = Cr1; +}, "~A"); +}); diff --git a/bin/javajs/img/PdfEncoder.js b/bin/javajs/img/PdfEncoder.js index 0a468dc..664879f 100644 --- a/bin/javajs/img/PdfEncoder.js +++ b/bin/javajs/img/PdfEncoder.js @@ -1,58 +1,58 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.PdfEncoder", ["java.util.Hashtable", "javajs.export.PDFCreator"], function () { -c$ = Clazz.decorateAsClass (function () { -this.isLandscape = false; -this.pdf = null; -this.comment = null; -Clazz.instantialize (this, arguments); -}, javajs.img, "PdfEncoder", javajs.img.ImageEncoder); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.img.PdfEncoder, []); -}); -Clazz.overrideMethod (c$, "setParams", -function (params) { -this.isLandscape = (this.quality > 1); -this.comment = "Jmol " + params.get ("comment"); -}, "java.util.Map"); -Clazz.overrideMethod (c$, "generate", -function () { -this.pdf = new javajs["export"].PDFCreator (); -var pageWidth = 576; -var pageHeight = 792; -this.pdf.setOutputStream (this.out); -this.pdf.newDocument (pageWidth, pageHeight, this.isLandscape); -this.addMyImage (pageWidth, pageHeight); -var ht = new java.util.Hashtable (); -if (this.comment != null) ht.put ("Producer", this.comment); -ht.put ("Author", "JMol"); -ht.put ("CreationDate", this.date); -this.pdf.addInfo (ht); -this.pdf.closeDocument (); -}); -Clazz.defineMethod (c$, "addMyImage", -($fz = function (pageWidth, pageHeight) { -this.pdf.addImageResource ("img1", this.width, this.height, this.pixels, true); -var w = (this.isLandscape ? pageHeight : pageWidth); -var h = (this.isLandscape ? pageWidth : pageHeight); -var iw = this.width; -var ih = this.height; -if (iw > 0.9 * w) { -ih = Clazz.doubleToInt (ih * 0.9 * w / iw); -iw = Clazz.doubleToInt (w * 0.9); -}if (ih > 0.9 * h) { -iw = Clazz.doubleToInt (iw * 0.9 * h / ih); -ih = Clazz.doubleToInt (h * 0.9); -}var x = 0; -var y = 0; -var x1 = iw; -var y1 = ih; -if (w > iw) { -x = Clazz.doubleToInt ((w - iw) / 2); -x1 = iw + x; -}if (h > ih) { -y = Clazz.doubleToInt ((h - ih) / 2); -y1 = ih + y; -}this.pdf.drawImage ("img1", x, y, x1, y1, 0, 0, this.width, this.height); -}, $fz.isPrivate = true, $fz), "~N,~N"); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.PdfEncoder", ["java.util.Hashtable", "javajs.export.PDFCreator"], function () { +c$ = Clazz.decorateAsClass (function () { +this.isLandscape = false; +this.pdf = null; +this.comment = null; +Clazz.instantialize (this, arguments); +}, javajs.img, "PdfEncoder", javajs.img.ImageEncoder); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.img.PdfEncoder, []); +}); +Clazz.overrideMethod (c$, "setParams", +function (params) { +this.isLandscape = (this.quality > 1); +this.comment = "Jmol " + params.get ("comment"); +}, "java.util.Map"); +Clazz.overrideMethod (c$, "generate", +function () { +this.pdf = new javajs["export"].PDFCreator (); +var pageWidth = 576; +var pageHeight = 792; +this.pdf.setOutputStream (this.out); +this.pdf.newDocument (pageWidth, pageHeight, this.isLandscape); +this.addMyImage (pageWidth, pageHeight); +var ht = new java.util.Hashtable (); +if (this.comment != null) ht.put ("Producer", this.comment); +ht.put ("Author", "JMol"); +ht.put ("CreationDate", this.date); +this.pdf.addInfo (ht); +this.pdf.closeDocument (); +}); +Clazz.defineMethod (c$, "addMyImage", +($fz = function (pageWidth, pageHeight) { +this.pdf.addImageResource ("img1", this.width, this.height, this.pixels, true); +var w = (this.isLandscape ? pageHeight : pageWidth); +var h = (this.isLandscape ? pageWidth : pageHeight); +var iw = this.width; +var ih = this.height; +if (iw > 0.9 * w) { +ih = Clazz.doubleToInt (ih * 0.9 * w / iw); +iw = Clazz.doubleToInt (w * 0.9); +}if (ih > 0.9 * h) { +iw = Clazz.doubleToInt (iw * 0.9 * h / ih); +ih = Clazz.doubleToInt (h * 0.9); +}var x = 0; +var y = 0; +var x1 = iw; +var y1 = ih; +if (w > iw) { +x = Clazz.doubleToInt ((w - iw) / 2); +x1 = iw + x; +}if (h > ih) { +y = Clazz.doubleToInt ((h - ih) / 2); +y1 = ih + y; +}this.pdf.drawImage ("img1", x, y, x1, y1, 0, 0, this.width, this.height); +}, $fz.isPrivate = true, $fz), "~N,~N"); +}); diff --git a/bin/javajs/img/PngEncoder.js b/bin/javajs/img/PngEncoder.js index 8c07dbd..0accd9e 100644 --- a/bin/javajs/img/PngEncoder.js +++ b/bin/javajs/img/PngEncoder.js @@ -1,173 +1,173 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (["javajs.img.CRCEncoder"], "javajs.img.PngEncoder", ["java.io.ByteArrayOutputStream", "java.util.zip.Deflater", "$.DeflaterOutputStream"], function () { -c$ = Clazz.decorateAsClass (function () { -this.encodeAlpha = false; -this.filter = 0; -this.bytesPerPixel = 0; -this.compressionLevel = 0; -this.type = null; -this.transparentColor = null; -this.appData = null; -this.appPrefix = null; -this.comment = null; -this.bytes = null; -this.scanLines = null; -this.byteWidth = 0; -Clazz.instantialize (this, arguments); -}, javajs.img, "PngEncoder", javajs.img.CRCEncoder); -Clazz.overrideMethod (c$, "setParams", -function (params) { -if (this.quality < 0) this.quality = (params.containsKey ("qualityPNG") ? (params.get ("qualityPNG")).intValue () : 2); -if (this.quality > 9) this.quality = 9; -this.encodeAlpha = false; -this.filter = 0; -this.compressionLevel = this.quality; -this.transparentColor = params.get ("transparentColor"); -this.comment = params.get ("comment"); -this.type = (params.get ("type") + "0000").substring (0, 4); -this.bytes = params.get ("pngImgData"); -this.appData = params.get ("pngAppData"); -this.appPrefix = params.get ("pngAppPrefix"); -}, "java.util.Map"); -Clazz.overrideMethod (c$, "generate", -function () { -if (this.bytes == null) { -if (!this.pngEncode ()) { -this.out.cancel (); -return; -}this.bytes = this.getBytes (); -} else { -this.dataLen = this.bytes.length; -}var len = this.dataLen; -if (this.appData != null) { -javajs.img.PngEncoder.setJmolTypeText (this.appPrefix, this.bytes, len, this.appData.length, this.type); -this.out.write (this.bytes, 0, len); -len = (this.bytes = this.appData).length; -}this.out.write (this.bytes, 0, len); -}); -Clazz.defineMethod (c$, "pngEncode", -($fz = function () { -var pngIdBytes = Clazz.newByteArray (-1, [-119, 80, 78, 71, 13, 10, 26, 10]); -this.writeBytes (pngIdBytes); -this.writeHeader (); -this.writeText (javajs.img.PngEncoder.getApplicationText (this.appPrefix, this.type, 0, 0)); -this.writeText ("Software\0Jmol " + this.comment); -this.writeText ("Creation Time\0" + this.date); -if (!this.encodeAlpha && this.transparentColor != null) this.writeTransparentColor (this.transparentColor.intValue ()); -return this.writeImageData (); -}, $fz.isPrivate = true, $fz)); -c$.setJmolTypeText = Clazz.defineMethod (c$, "setJmolTypeText", -($fz = function (prefix, b, nPNG, nState, type) { -var s = "tEXt" + javajs.img.PngEncoder.getApplicationText (prefix, type, nPNG, nState); -var encoder = new javajs.img.PngEncoder (); -var test = s.substring (0, 4 + prefix.length).getBytes (); -for (var i = test.length; --i >= 0; ) if (b[i + 37] != test[i]) { -System.out.println ("image is not of the right form; appending data, but not adding tEXt tag."); -return; -} -encoder.setData (b, 37); -encoder.writeString (s); -encoder.writeCRC (); -}, $fz.isPrivate = true, $fz), "~S,~A,~N,~N,~S"); -c$.getApplicationText = Clazz.defineMethod (c$, "getApplicationText", -($fz = function (prefix, type, nPNG, nState) { -var sPNG = "000000000" + nPNG; -sPNG = sPNG.substring (sPNG.length - 9); -var sState = "000000000" + nState; -sState = sState.substring (sState.length - 9); -return prefix + "\0" + type + (type.equals ("PNG") ? "0" : "") + sPNG + "+" + sState; -}, $fz.isPrivate = true, $fz), "~S,~S,~N,~N"); -Clazz.defineMethod (c$, "writeHeader", -($fz = function () { -this.writeInt4 (13); -this.startPos = this.bytePos; -this.writeString ("IHDR"); -this.writeInt4 (this.width); -this.writeInt4 (this.height); -this.writeByte (8); -this.writeByte (this.encodeAlpha ? 6 : 2); -this.writeByte (0); -this.writeByte (0); -this.writeByte (0); -this.writeCRC (); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeText", -($fz = function (msg) { -this.writeInt4 (msg.length); -this.startPos = this.bytePos; -this.writeString ("tEXt" + msg); -this.writeCRC (); -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "writeTransparentColor", -($fz = function (icolor) { -this.writeInt4 (6); -this.startPos = this.bytePos; -this.writeString ("tRNS"); -this.writeInt2 ((icolor >> 16) & 0xFF); -this.writeInt2 ((icolor >> 8) & 0xFF); -this.writeInt2 (icolor & 0xFF); -this.writeCRC (); -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "writeImageData", -($fz = function () { -this.bytesPerPixel = (this.encodeAlpha ? 4 : 3); -this.byteWidth = this.width * this.bytesPerPixel; -var scanWidth = this.byteWidth + 1; -var rowsLeft = this.height; -var nRows; -var scanPos; -var deflater = new java.util.zip.Deflater (this.compressionLevel); -var outBytes = new java.io.ByteArrayOutputStream (1024); -var compBytes = new java.util.zip.DeflaterOutputStream (outBytes, deflater); -var pt = 0; -try { -while (rowsLeft > 0) { -nRows = Math.max (1, Math.min (Clazz.doubleToInt (32767 / scanWidth), rowsLeft)); -this.scanLines = Clazz.newByteArray (scanWidth * nRows, 0); -var nPixels = this.width * nRows; -scanPos = 0; -for (var i = 0; i < nPixels; i++, pt++) { -if (i % this.width == 0) { -this.scanLines[scanPos++] = this.filter; -}this.scanLines[scanPos++] = ((this.pixels[pt] >> 16) & 0xff); -this.scanLines[scanPos++] = ((this.pixels[pt] >> 8) & 0xff); -this.scanLines[scanPos++] = ((this.pixels[pt]) & 0xff); -if (this.encodeAlpha) { -this.scanLines[scanPos++] = ((this.pixels[pt] >> 24) & 0xff); -}} -compBytes.write (this.scanLines, 0, scanPos); -rowsLeft -= nRows; -} -compBytes.close (); -var compressedLines = outBytes.toByteArray (); -this.writeInt4 (compressedLines.length); -this.startPos = this.bytePos; -this.writeString ("IDAT"); -this.writeBytes (compressedLines); -this.writeCRC (); -this.writeEnd (); -deflater.finish (); -return true; -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -System.err.println (e.toString ()); -return false; -} else { -throw e; -} -} -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeEnd", -($fz = function () { -this.writeInt4 (0); -this.startPos = this.bytePos; -this.writeString ("IEND"); -this.writeCRC (); -}, $fz.isPrivate = true, $fz)); -Clazz.defineStatics (c$, -"FILTER_NONE", 0, -"FILTER_SUB", 1, -"FILTER_UP", 2, -"FILTER_LAST", 2, -"PT_FIRST_TAG", 37); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.img.CRCEncoder"], "javajs.img.PngEncoder", ["java.io.ByteArrayOutputStream", "java.util.zip.Deflater", "$.DeflaterOutputStream"], function () { +c$ = Clazz.decorateAsClass (function () { +this.encodeAlpha = false; +this.filter = 0; +this.bytesPerPixel = 0; +this.compressionLevel = 0; +this.type = null; +this.transparentColor = null; +this.appData = null; +this.appPrefix = null; +this.comment = null; +this.bytes = null; +this.scanLines = null; +this.byteWidth = 0; +Clazz.instantialize (this, arguments); +}, javajs.img, "PngEncoder", javajs.img.CRCEncoder); +Clazz.overrideMethod (c$, "setParams", +function (params) { +if (this.quality < 0) this.quality = (params.containsKey ("qualityPNG") ? (params.get ("qualityPNG")).intValue () : 2); +if (this.quality > 9) this.quality = 9; +this.encodeAlpha = false; +this.filter = 0; +this.compressionLevel = this.quality; +this.transparentColor = params.get ("transparentColor"); +this.comment = params.get ("comment"); +this.type = (params.get ("type") + "0000").substring (0, 4); +this.bytes = params.get ("pngImgData"); +this.appData = params.get ("pngAppData"); +this.appPrefix = params.get ("pngAppPrefix"); +}, "java.util.Map"); +Clazz.overrideMethod (c$, "generate", +function () { +if (this.bytes == null) { +if (!this.pngEncode ()) { +this.out.cancel (); +return; +}this.bytes = this.getBytes (); +} else { +this.dataLen = this.bytes.length; +}var len = this.dataLen; +if (this.appData != null) { +javajs.img.PngEncoder.setJmolTypeText (this.appPrefix, this.bytes, len, this.appData.length, this.type); +this.out.write (this.bytes, 0, len); +len = (this.bytes = this.appData).length; +}this.out.write (this.bytes, 0, len); +}); +Clazz.defineMethod (c$, "pngEncode", +($fz = function () { +var pngIdBytes = Clazz.newByteArray (-1, [-119, 80, 78, 71, 13, 10, 26, 10]); +this.writeBytes (pngIdBytes); +this.writeHeader (); +this.writeText (javajs.img.PngEncoder.getApplicationText (this.appPrefix, this.type, 0, 0)); +this.writeText ("Software\0Jmol " + this.comment); +this.writeText ("Creation Time\0" + this.date); +if (!this.encodeAlpha && this.transparentColor != null) this.writeTransparentColor (this.transparentColor.intValue ()); +return this.writeImageData (); +}, $fz.isPrivate = true, $fz)); +c$.setJmolTypeText = Clazz.defineMethod (c$, "setJmolTypeText", +($fz = function (prefix, b, nPNG, nState, type) { +var s = "tEXt" + javajs.img.PngEncoder.getApplicationText (prefix, type, nPNG, nState); +var encoder = new javajs.img.PngEncoder (); +var test = s.substring (0, 4 + prefix.length).getBytes (); +for (var i = test.length; --i >= 0; ) if (b[i + 37] != test[i]) { +System.out.println ("image is not of the right form; appending data, but not adding tEXt tag."); +return; +} +encoder.setData (b, 37); +encoder.writeString (s); +encoder.writeCRC (); +}, $fz.isPrivate = true, $fz), "~S,~A,~N,~N,~S"); +c$.getApplicationText = Clazz.defineMethod (c$, "getApplicationText", +($fz = function (prefix, type, nPNG, nState) { +var sPNG = "000000000" + nPNG; +sPNG = sPNG.substring (sPNG.length - 9); +var sState = "000000000" + nState; +sState = sState.substring (sState.length - 9); +return prefix + "\0" + type + (type.equals ("PNG") ? "0" : "") + sPNG + "+" + sState; +}, $fz.isPrivate = true, $fz), "~S,~S,~N,~N"); +Clazz.defineMethod (c$, "writeHeader", +($fz = function () { +this.writeInt4 (13); +this.startPos = this.bytePos; +this.writeString ("IHDR"); +this.writeInt4 (this.width); +this.writeInt4 (this.height); +this.writeByte (8); +this.writeByte (this.encodeAlpha ? 6 : 2); +this.writeByte (0); +this.writeByte (0); +this.writeByte (0); +this.writeCRC (); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeText", +($fz = function (msg) { +this.writeInt4 (msg.length); +this.startPos = this.bytePos; +this.writeString ("tEXt" + msg); +this.writeCRC (); +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "writeTransparentColor", +($fz = function (icolor) { +this.writeInt4 (6); +this.startPos = this.bytePos; +this.writeString ("tRNS"); +this.writeInt2 ((icolor >> 16) & 0xFF); +this.writeInt2 ((icolor >> 8) & 0xFF); +this.writeInt2 (icolor & 0xFF); +this.writeCRC (); +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "writeImageData", +($fz = function () { +this.bytesPerPixel = (this.encodeAlpha ? 4 : 3); +this.byteWidth = this.width * this.bytesPerPixel; +var scanWidth = this.byteWidth + 1; +var rowsLeft = this.height; +var nRows; +var scanPos; +var deflater = new java.util.zip.Deflater (this.compressionLevel); +var outBytes = new java.io.ByteArrayOutputStream (1024); +var compBytes = new java.util.zip.DeflaterOutputStream (outBytes, deflater); +var pt = 0; +try { +while (rowsLeft > 0) { +nRows = Math.max (1, Math.min (Clazz.doubleToInt (32767 / scanWidth), rowsLeft)); +this.scanLines = Clazz.newByteArray (scanWidth * nRows, 0); +var nPixels = this.width * nRows; +scanPos = 0; +for (var i = 0; i < nPixels; i++, pt++) { +if (i % this.width == 0) { +this.scanLines[scanPos++] = this.filter; +}this.scanLines[scanPos++] = ((this.pixels[pt] >> 16) & 0xff); +this.scanLines[scanPos++] = ((this.pixels[pt] >> 8) & 0xff); +this.scanLines[scanPos++] = ((this.pixels[pt]) & 0xff); +if (this.encodeAlpha) { +this.scanLines[scanPos++] = ((this.pixels[pt] >> 24) & 0xff); +}} +compBytes.write (this.scanLines, 0, scanPos); +rowsLeft -= nRows; +} +compBytes.close (); +var compressedLines = outBytes.toByteArray (); +this.writeInt4 (compressedLines.length); +this.startPos = this.bytePos; +this.writeString ("IDAT"); +this.writeBytes (compressedLines); +this.writeCRC (); +this.writeEnd (); +deflater.finish (); +return true; +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +System.err.println (e.toString ()); +return false; +} else { +throw e; +} +} +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeEnd", +($fz = function () { +this.writeInt4 (0); +this.startPos = this.bytePos; +this.writeString ("IEND"); +this.writeCRC (); +}, $fz.isPrivate = true, $fz)); +Clazz.defineStatics (c$, +"FILTER_NONE", 0, +"FILTER_SUB", 1, +"FILTER_UP", 2, +"FILTER_LAST", 2, +"PT_FIRST_TAG", 37); +}); diff --git a/bin/javajs/img/PpmEncoder.js b/bin/javajs/img/PpmEncoder.js index 7cb6943..1769c71 100644 --- a/bin/javajs/img/PpmEncoder.js +++ b/bin/javajs/img/PpmEncoder.js @@ -1,23 +1,23 @@ -Clazz.declarePackage ("javajs.img"); -Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.PpmEncoder", null, function () { -c$ = Clazz.declareType (javajs.img, "PpmEncoder", javajs.img.ImageEncoder); -Clazz.overrideMethod (c$, "setParams", -function (params) { -}, "java.util.Map"); -Clazz.overrideMethod (c$, "generate", -function () { -this.putString ("P6\n"); -this.putString (this.width + " " + this.height + "\n"); -this.putString ("255\n"); -var ppmPixels = Clazz.newByteArray (this.width * 3, 0); -for (var pt = 0, row = 0; row < this.height; ++row) { -for (var col = 0, j = 0; col < this.width; ++col, pt++) { -var p = this.pixels[pt]; -ppmPixels[j++] = ((p >> 16) & 0xff); -ppmPixels[j++] = ((p >> 8) & 0xff); -ppmPixels[j++] = (p & 0xff); -} -this.out.write (ppmPixels, 0, ppmPixels.length); -} -}); -}); +Clazz.declarePackage ("javajs.img"); +Clazz.load (["javajs.img.ImageEncoder"], "javajs.img.PpmEncoder", null, function () { +c$ = Clazz.declareType (javajs.img, "PpmEncoder", javajs.img.ImageEncoder); +Clazz.overrideMethod (c$, "setParams", +function (params) { +}, "java.util.Map"); +Clazz.overrideMethod (c$, "generate", +function () { +this.putString ("P6\n"); +this.putString (this.width + " " + this.height + "\n"); +this.putString ("255\n"); +var ppmPixels = Clazz.newByteArray (this.width * 3, 0); +for (var pt = 0, row = 0; row < this.height; ++row) { +for (var col = 0, j = 0; col < this.width; ++col, pt++) { +var p = this.pixels[pt]; +ppmPixels[j++] = ((p >> 16) & 0xff); +ppmPixels[j++] = ((p >> 8) & 0xff); +ppmPixels[j++] = (p & 0xff); +} +this.out.write (ppmPixels, 0, ppmPixels.length); +} +}); +}); diff --git a/bin/javajs/img/package.js b/bin/javajs/img/package.js index 0982066..4086dd3 100644 --- a/bin/javajs/img/package.js +++ b/bin/javajs/img/package.js @@ -1,7 +1,7 @@ -var path = ClazzLoader.getClasspathFor ("javajs.img.package"); -path = path.substring (0, path.lastIndexOf ("package.js")); -ClazzLoader.jarClasspath (path + "JpgEncoder.js", [ -"javajs.img.DCT", -"$.JpgEncoder", -"$.JpegObj", -"$.Huffman"]); +var path = ClazzLoader.getClasspathFor ("javajs.img.package"); +path = path.substring (0, path.lastIndexOf ("package.js")); +ClazzLoader.jarClasspath (path + "JpgEncoder.js", [ +"javajs.img.DCT", +"$.JpgEncoder", +"$.JpegObj", +"$.Huffman"]); diff --git a/bin/javajs/swing/AbstractButton.js b/bin/javajs/swing/AbstractButton.js index 7a53af7..f97cb2f 100644 --- a/bin/javajs/swing/AbstractButton.js +++ b/bin/javajs/swing/AbstractButton.js @@ -1,82 +1,82 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.api.SC", "javajs.swing.JComponent"], "javajs.swing.AbstractButton", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.itemListener = null; -this.applet = null; -this.htmlName = null; -this.selected = false; -this.popupMenu = null; -this.icon = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "AbstractButton", javajs.swing.JComponent, javajs.api.SC); -Clazz.makeConstructor (c$, -function (type) { -Clazz.superConstructor (this, javajs.swing.AbstractButton, [type]); -this.enabled = true; -}, "~S"); -Clazz.overrideMethod (c$, "setSelected", -function (selected) { -this.selected = selected; -{ -SwingController.setSelected(this); -}}, "~B"); -Clazz.overrideMethod (c$, "isSelected", -function () { -return this.selected; -}); -Clazz.overrideMethod (c$, "addItemListener", -function (listener) { -this.itemListener = listener; -}, "~O"); -Clazz.overrideMethod (c$, "getIcon", -function () { -return this.icon; -}); -Clazz.overrideMethod (c$, "setIcon", -function (icon) { -this.icon = icon; -}, "~O"); -Clazz.overrideMethod (c$, "init", -function (text, icon, actionCommand, popupMenu) { -this.text = text; -this.icon = icon; -this.actionCommand = actionCommand; -this.popupMenu = popupMenu; -{ -SwingController.initMenuItem(this); -}}, "~S,~O,~S,javajs.api.SC"); -Clazz.defineMethod (c$, "getTopPopupMenu", -function () { -return this.popupMenu; -}); -Clazz.defineMethod (c$, "add", -function (item) { -this.addComponent (item); -}, "javajs.api.SC"); -Clazz.overrideMethod (c$, "insert", -function (subMenu, index) { -this.insertComponent (subMenu, index); -}, "javajs.api.SC,~N"); -Clazz.overrideMethod (c$, "getPopupMenu", -function () { -return null; -}); -Clazz.defineMethod (c$, "getMenuHTML", -function () { -var label = (this.icon != null ? this.icon : this.text != null ? this.text : null); -var s = (label == null ? "" : "
  • " + label + "" + this.htmlMenuOpener ("ul")); -var n = this.getComponentCount (); -if (n > 0) for (var i = 0; i < n; i++) s += this.getComponent (i).toHTML (); - -if (label != null) s += "
  • "; -return s; -}); -Clazz.defineMethod (c$, "htmlMenuOpener", -function (type) { -return "<" + type + " id=\"" + this.id + "\"" + (this.enabled ? "" : this.getHtmlDisabled ()) + ">"; -}, "~S"); -Clazz.defineMethod (c$, "getHtmlDisabled", -function () { -return " disabled=\"disabled\""; -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.api.SC", "javajs.swing.JComponent"], "javajs.swing.AbstractButton", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.itemListener = null; +this.applet = null; +this.htmlName = null; +this.selected = false; +this.popupMenu = null; +this.icon = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "AbstractButton", javajs.swing.JComponent, javajs.api.SC); +Clazz.makeConstructor (c$, +function (type) { +Clazz.superConstructor (this, javajs.swing.AbstractButton, [type]); +this.enabled = true; +}, "~S"); +Clazz.overrideMethod (c$, "setSelected", +function (selected) { +this.selected = selected; +{ +SwingController.setSelected(this); +}}, "~B"); +Clazz.overrideMethod (c$, "isSelected", +function () { +return this.selected; +}); +Clazz.overrideMethod (c$, "addItemListener", +function (listener) { +this.itemListener = listener; +}, "~O"); +Clazz.overrideMethod (c$, "getIcon", +function () { +return this.icon; +}); +Clazz.overrideMethod (c$, "setIcon", +function (icon) { +this.icon = icon; +}, "~O"); +Clazz.overrideMethod (c$, "init", +function (text, icon, actionCommand, popupMenu) { +this.text = text; +this.icon = icon; +this.actionCommand = actionCommand; +this.popupMenu = popupMenu; +{ +SwingController.initMenuItem(this); +}}, "~S,~O,~S,javajs.api.SC"); +Clazz.defineMethod (c$, "getTopPopupMenu", +function () { +return this.popupMenu; +}); +Clazz.defineMethod (c$, "add", +function (item) { +this.addComponent (item); +}, "javajs.api.SC"); +Clazz.overrideMethod (c$, "insert", +function (subMenu, index) { +this.insertComponent (subMenu, index); +}, "javajs.api.SC,~N"); +Clazz.overrideMethod (c$, "getPopupMenu", +function () { +return null; +}); +Clazz.defineMethod (c$, "getMenuHTML", +function () { +var label = (this.icon != null ? this.icon : this.text != null ? this.text : null); +var s = (label == null ? "" : "
  • " + label + "" + this.htmlMenuOpener ("ul")); +var n = this.getComponentCount (); +if (n > 0) for (var i = 0; i < n; i++) s += this.getComponent (i).toHTML (); + +if (label != null) s += "
  • "; +return s; +}); +Clazz.defineMethod (c$, "htmlMenuOpener", +function (type) { +return "<" + type + " id=\"" + this.id + "\"" + (this.enabled ? "" : this.getHtmlDisabled ()) + ">"; +}, "~S"); +Clazz.defineMethod (c$, "getHtmlDisabled", +function () { +return " disabled=\"disabled\""; +}); +}); diff --git a/bin/javajs/swing/AbstractTableModel.js b/bin/javajs/swing/AbstractTableModel.js index 1f7382c..c17cd4a 100644 --- a/bin/javajs/swing/AbstractTableModel.js +++ b/bin/javajs/swing/AbstractTableModel.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.TableColumn"], "javajs.swing.AbstractTableModel", null, function () { -Clazz.declareInterface (javajs.swing, "AbstractTableModel", javajs.swing.TableColumn); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.TableColumn"], "javajs.swing.AbstractTableModel", null, function () { +Clazz.declareInterface (javajs.swing, "AbstractTableModel", javajs.swing.TableColumn); +}); diff --git a/bin/javajs/swing/ButtonGroup.js b/bin/javajs/swing/ButtonGroup.js index dbeaf88..ebd1ca6 100644 --- a/bin/javajs/swing/ButtonGroup.js +++ b/bin/javajs/swing/ButtonGroup.js @@ -1,15 +1,15 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (null, "javajs.swing.ButtonGroup", ["javajs.awt.Component"], function () { -c$ = Clazz.decorateAsClass (function () { -this.id = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "ButtonGroup"); -Clazz.makeConstructor (c$, -function () { -this.id = javajs.awt.Component.newID ("bg"); -}); -Clazz.defineMethod (c$, "add", -function (item) { -(item).htmlName = this.id; -}, "javajs.api.SC"); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (null, "javajs.swing.ButtonGroup", ["javajs.awt.Component"], function () { +c$ = Clazz.decorateAsClass (function () { +this.id = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "ButtonGroup"); +Clazz.makeConstructor (c$, +function () { +this.id = javajs.awt.Component.newID ("bg"); +}); +Clazz.defineMethod (c$, "add", +function (item) { +(item).htmlName = this.id; +}, "javajs.api.SC"); +}); diff --git a/bin/javajs/swing/Cell.js b/bin/javajs/swing/Cell.js index 2fc85c8..5ac8a90 100644 --- a/bin/javajs/swing/Cell.js +++ b/bin/javajs/swing/Cell.js @@ -1,21 +1,21 @@ -Clazz.declarePackage ("javajs.swing"); -c$ = Clazz.decorateAsClass (function () { -this.component = null; -this.colspan = 0; -this.rowspan = 0; -this.textAlign = 0; -this.c = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "Cell"); -Clazz.makeConstructor (c$, -function (btn, c) { -this.component = btn; -this.colspan = c.gridwidth; -this.rowspan = c.gridheight; -this.c = c; -}, "javajs.swing.JComponent,javajs.swing.GridBagConstraints"); -Clazz.defineMethod (c$, "toHTML", -function (id) { -var style = this.c.getStyle (false); -return "" + this.component.toHTML () + ""; -}, "~S"); +Clazz.declarePackage ("javajs.swing"); +c$ = Clazz.decorateAsClass (function () { +this.component = null; +this.colspan = 0; +this.rowspan = 0; +this.textAlign = 0; +this.c = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "Cell"); +Clazz.makeConstructor (c$, +function (btn, c) { +this.component = btn; +this.colspan = c.gridwidth; +this.rowspan = c.gridheight; +this.c = c; +}, "javajs.swing.JComponent,javajs.swing.GridBagConstraints"); +Clazz.defineMethod (c$, "toHTML", +function (id) { +var style = this.c.getStyle (false); +return "" + this.component.toHTML () + ""; +}, "~S"); diff --git a/bin/javajs/swing/ColumnSelectionModel.js b/bin/javajs/swing/ColumnSelectionModel.js index f9395b7..4ce0290 100644 --- a/bin/javajs/swing/ColumnSelectionModel.js +++ b/bin/javajs/swing/ColumnSelectionModel.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.declareInterface (javajs.swing, "ColumnSelectionModel"); +Clazz.declarePackage ("javajs.swing"); +Clazz.declareInterface (javajs.swing, "ColumnSelectionModel"); diff --git a/bin/javajs/swing/Document.js b/bin/javajs/swing/Document.js index 90cf95a..243ba05 100644 --- a/bin/javajs/swing/Document.js +++ b/bin/javajs/swing/Document.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.declareInterface (javajs.swing, "Document"); +Clazz.declarePackage ("javajs.swing"); +Clazz.declareInterface (javajs.swing, "Document"); diff --git a/bin/javajs/swing/FlowLayout.js b/bin/javajs/swing/FlowLayout.js index 8989304..6ed7d37 100644 --- a/bin/javajs/swing/FlowLayout.js +++ b/bin/javajs/swing/FlowLayout.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.awt.LayoutManager"], "javajs.swing.FlowLayout", null, function () { -c$ = Clazz.declareType (javajs.swing, "FlowLayout", javajs.awt.LayoutManager); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.awt.LayoutManager"], "javajs.swing.FlowLayout", null, function () { +c$ = Clazz.declareType (javajs.swing, "FlowLayout", javajs.awt.LayoutManager); +}); diff --git a/bin/javajs/swing/Grid.js b/bin/javajs/swing/Grid.js index 2551964..d0b179f 100644 --- a/bin/javajs/swing/Grid.js +++ b/bin/javajs/swing/Grid.js @@ -1,46 +1,46 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (null, "javajs.swing.Grid", ["javajs.swing.Cell", "javajs.util.AU", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.nrows = 0; -this.ncols = 0; -this.grid = null; -this.renderer = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "Grid"); -Clazz.makeConstructor (c$, -function (rows, cols) { -this.grid = Clazz.newArray (0, 0, null); -}, "~N,~N"); -Clazz.defineMethod (c$, "add", -function (btn, c) { -if (c.gridx >= this.ncols) { -this.ncols = c.gridx + 1; -for (var i = 0; i < this.nrows; i++) { -this.grid[i] = javajs.util.AU.ensureLength (this.grid[i], this.ncols * 2); -} -}if (c.gridy >= this.nrows) { -var g = new Array (c.gridy * 2 + 1); -for (var i = 0; i < this.nrows; i++) g[i] = this.grid[i]; - -for (var i = g.length; --i >= this.nrows; ) g[i] = new Array (this.ncols * 2 + 1); - -this.grid = g; -this.nrows = c.gridy + 1; -}this.grid[c.gridy][c.gridx] = new javajs.swing.Cell (btn, c); -}, "javajs.swing.JComponent,javajs.swing.GridBagConstraints"); -Clazz.defineMethod (c$, "toHTML", -function (id) { -var sb = new javajs.util.SB (); -id += "_grid"; -sb.append ("\n"); -for (var i = 0; i < this.nrows; i++) { -var rowid = id + "_" + i; -sb.append ("\n"); -for (var j = 0; j < this.ncols; j++) if (this.grid[i][j] != null) sb.append (this.grid[i][j].toHTML (rowid + "_" + j)); - -sb.append (""); -} -sb.append ("\n
    \n"); -return sb.toString (); -}, "~S"); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (null, "javajs.swing.Grid", ["javajs.swing.Cell", "javajs.util.AU", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.nrows = 0; +this.ncols = 0; +this.grid = null; +this.renderer = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "Grid"); +Clazz.makeConstructor (c$, +function (rows, cols) { +this.grid = Clazz.newArray (0, 0, null); +}, "~N,~N"); +Clazz.defineMethod (c$, "add", +function (btn, c) { +if (c.gridx >= this.ncols) { +this.ncols = c.gridx + 1; +for (var i = 0; i < this.nrows; i++) { +this.grid[i] = javajs.util.AU.ensureLength (this.grid[i], this.ncols * 2); +} +}if (c.gridy >= this.nrows) { +var g = new Array (c.gridy * 2 + 1); +for (var i = 0; i < this.nrows; i++) g[i] = this.grid[i]; + +for (var i = g.length; --i >= this.nrows; ) g[i] = new Array (this.ncols * 2 + 1); + +this.grid = g; +this.nrows = c.gridy + 1; +}this.grid[c.gridy][c.gridx] = new javajs.swing.Cell (btn, c); +}, "javajs.swing.JComponent,javajs.swing.GridBagConstraints"); +Clazz.defineMethod (c$, "toHTML", +function (id) { +var sb = new javajs.util.SB (); +id += "_grid"; +sb.append ("\n"); +for (var i = 0; i < this.nrows; i++) { +var rowid = id + "_" + i; +sb.append ("\n"); +for (var j = 0; j < this.ncols; j++) if (this.grid[i][j] != null) sb.append (this.grid[i][j].toHTML (rowid + "_" + j)); + +sb.append (""); +} +sb.append ("\n
    \n"); +return sb.toString (); +}, "~S"); +}); diff --git a/bin/javajs/swing/GridBagConstraints.js b/bin/javajs/swing/GridBagConstraints.js index 31cf45c..f631d92 100644 --- a/bin/javajs/swing/GridBagConstraints.js +++ b/bin/javajs/swing/GridBagConstraints.js @@ -1,41 +1,41 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (null, "javajs.swing.GridBagConstraints", ["javajs.swing.Insets"], function () { -c$ = Clazz.decorateAsClass (function () { -this.gridx = 0; -this.gridy = 0; -this.gridwidth = 0; -this.gridheight = 0; -this.weightx = 0; -this.weighty = 0; -this.anchor = 0; -this.fill = 0; -this.insets = null; -this.ipadx = 0; -this.ipady = 0; -Clazz.instantialize (this, arguments); -}, javajs.swing, "GridBagConstraints"); -Clazz.makeConstructor (c$, -function (gridx, gridy, gridwidth, gridheight, weightx, weighty, anchor, fill, insets, ipadx, ipady) { -this.gridx = gridx; -this.gridy = gridy; -this.gridwidth = gridwidth; -this.gridheight = gridheight; -this.weightx = weightx; -this.weighty = weighty; -this.anchor = anchor; -this.fill = fill; -if (insets == null) insets = new javajs.swing.Insets (0, 0, 0, 0); -this.insets = insets; -this.ipadx = ipadx; -this.ipady = ipady; -}, "~N,~N,~N,~N,~N,~N,~N,~N,javajs.swing.Insets,~N,~N"); -Clazz.defineMethod (c$, "getStyle", -function (margins) { -return "style='" + (margins ? "margin:" + this.insets.top + "px " + (this.ipady + this.insets.right) + "px " + this.insets.bottom + "px " + (this.ipadx + this.insets.left) + "px;" : "text-align:" + (this.anchor == 13 ? "right" : this.anchor == 17 ? "left" : "center")) + "'"; -}, "~B"); -Clazz.defineStatics (c$, -"NONE", 0, -"CENTER", 10, -"WEST", 17, -"EAST", 13); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (null, "javajs.swing.GridBagConstraints", ["javajs.swing.Insets"], function () { +c$ = Clazz.decorateAsClass (function () { +this.gridx = 0; +this.gridy = 0; +this.gridwidth = 0; +this.gridheight = 0; +this.weightx = 0; +this.weighty = 0; +this.anchor = 0; +this.fill = 0; +this.insets = null; +this.ipadx = 0; +this.ipady = 0; +Clazz.instantialize (this, arguments); +}, javajs.swing, "GridBagConstraints"); +Clazz.makeConstructor (c$, +function (gridx, gridy, gridwidth, gridheight, weightx, weighty, anchor, fill, insets, ipadx, ipady) { +this.gridx = gridx; +this.gridy = gridy; +this.gridwidth = gridwidth; +this.gridheight = gridheight; +this.weightx = weightx; +this.weighty = weighty; +this.anchor = anchor; +this.fill = fill; +if (insets == null) insets = new javajs.swing.Insets (0, 0, 0, 0); +this.insets = insets; +this.ipadx = ipadx; +this.ipady = ipady; +}, "~N,~N,~N,~N,~N,~N,~N,~N,javajs.swing.Insets,~N,~N"); +Clazz.defineMethod (c$, "getStyle", +function (margins) { +return "style='" + (margins ? "margin:" + this.insets.top + "px " + (this.ipady + this.insets.right) + "px " + this.insets.bottom + "px " + (this.ipadx + this.insets.left) + "px;" : "text-align:" + (this.anchor == 13 ? "right" : this.anchor == 17 ? "left" : "center")) + "'"; +}, "~B"); +Clazz.defineStatics (c$, +"NONE", 0, +"CENTER", 10, +"WEST", 17, +"EAST", 13); +}); diff --git a/bin/javajs/swing/GridBagLayout.js b/bin/javajs/swing/GridBagLayout.js index e2a6b72..f2d3d43 100644 --- a/bin/javajs/swing/GridBagLayout.js +++ b/bin/javajs/swing/GridBagLayout.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.awt.LayoutManager"], "javajs.swing.GridBagLayout", null, function () { -c$ = Clazz.declareType (javajs.swing, "GridBagLayout", javajs.awt.LayoutManager); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.awt.LayoutManager"], "javajs.swing.GridBagLayout", null, function () { +c$ = Clazz.declareType (javajs.swing, "GridBagLayout", javajs.awt.LayoutManager); +}); diff --git a/bin/javajs/swing/Insets.js b/bin/javajs/swing/Insets.js index c9338fd..989e644 100644 --- a/bin/javajs/swing/Insets.js +++ b/bin/javajs/swing/Insets.js @@ -1,15 +1,15 @@ -Clazz.declarePackage ("javajs.swing"); -c$ = Clazz.decorateAsClass (function () { -this.top = 0; -this.left = 0; -this.bottom = 0; -this.right = 0; -Clazz.instantialize (this, arguments); -}, javajs.swing, "Insets"); -Clazz.makeConstructor (c$, -function (top, left, bottom, right) { -this.top = top; -this.left = left; -this.bottom = bottom; -this.right = right; -}, "~N,~N,~N,~N"); +Clazz.declarePackage ("javajs.swing"); +c$ = Clazz.decorateAsClass (function () { +this.top = 0; +this.left = 0; +this.bottom = 0; +this.right = 0; +Clazz.instantialize (this, arguments); +}, javajs.swing, "Insets"); +Clazz.makeConstructor (c$, +function (top, left, bottom, right) { +this.top = top; +this.left = left; +this.bottom = bottom; +this.right = right; +}, "~N,~N,~N,~N"); diff --git a/bin/javajs/swing/JButton.js b/bin/javajs/swing/JButton.js index 6fa242d..b1f5cc2 100644 --- a/bin/javajs/swing/JButton.js +++ b/bin/javajs/swing/JButton.js @@ -1,14 +1,14 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JButton", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.swing, "JButton", javajs.swing.AbstractButton); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JButton, ["btnJB"]); -}); -Clazz.overrideMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append (""); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JButton", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.swing, "JButton", javajs.swing.AbstractButton); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JButton, ["btnJB"]); +}); +Clazz.overrideMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append (""); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JCheckBox.js b/bin/javajs/swing/JCheckBox.js index f4697cb..bae9b88 100644 --- a/bin/javajs/swing/JCheckBox.js +++ b/bin/javajs/swing/JCheckBox.js @@ -1,13 +1,13 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JCheckBox", null, function () { -c$ = Clazz.declareType (javajs.swing, "JCheckBox", javajs.swing.AbstractButton); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JCheckBox, ["chkJCB"]); -}); -Clazz.overrideMethod (c$, "toHTML", -function () { -var s = ""; -return s; -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JCheckBox", null, function () { +c$ = Clazz.declareType (javajs.swing, "JCheckBox", javajs.swing.AbstractButton); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JCheckBox, ["chkJCB"]); +}); +Clazz.overrideMethod (c$, "toHTML", +function () { +var s = ""; +return s; +}); +}); diff --git a/bin/javajs/swing/JCheckBoxMenuItem.js b/bin/javajs/swing/JCheckBoxMenuItem.js index 7f50135..0b6f970 100644 --- a/bin/javajs/swing/JCheckBoxMenuItem.js +++ b/bin/javajs/swing/JCheckBoxMenuItem.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JMenuItem"], "javajs.swing.JCheckBoxMenuItem", null, function () { -c$ = Clazz.declareType (javajs.swing, "JCheckBoxMenuItem", javajs.swing.JMenuItem); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JCheckBoxMenuItem, ["chk", 2]); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JMenuItem"], "javajs.swing.JCheckBoxMenuItem", null, function () { +c$ = Clazz.declareType (javajs.swing, "JCheckBoxMenuItem", javajs.swing.JMenuItem); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JCheckBoxMenuItem, ["chk", 2]); +}); +}); diff --git a/bin/javajs/swing/JComboBox.js b/bin/javajs/swing/JComboBox.js index 3e829b4..088b19f 100644 --- a/bin/javajs/swing/JComboBox.js +++ b/bin/javajs/swing/JComboBox.js @@ -1,36 +1,36 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JComboBox", ["javajs.util.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.info = null; -this.selectedIndex = 0; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JComboBox", javajs.swing.AbstractButton); -Clazz.makeConstructor (c$, -function (info) { -Clazz.superConstructor (this, javajs.swing.JComboBox, ["cmbJCB"]); -this.info = info; -}, "~A"); -Clazz.defineMethod (c$, "setSelectedIndex", -function (i) { -this.selectedIndex = i; -{ -SwingController.setSelectedIndex(this); -}}, "~N"); -Clazz.defineMethod (c$, "getSelectedIndex", -function () { -return this.selectedIndex; -}); -Clazz.defineMethod (c$, "getSelectedItem", -function () { -return (this.selectedIndex < 0 ? null : this.info[this.selectedIndex]); -}); -Clazz.overrideMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append ("\n\n"); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JComboBox", ["javajs.util.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.info = null; +this.selectedIndex = 0; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JComboBox", javajs.swing.AbstractButton); +Clazz.makeConstructor (c$, +function (info) { +Clazz.superConstructor (this, javajs.swing.JComboBox, ["cmbJCB"]); +this.info = info; +}, "~A"); +Clazz.defineMethod (c$, "setSelectedIndex", +function (i) { +this.selectedIndex = i; +{ +SwingController.setSelectedIndex(this); +}}, "~N"); +Clazz.defineMethod (c$, "getSelectedIndex", +function () { +return this.selectedIndex; +}); +Clazz.defineMethod (c$, "getSelectedItem", +function () { +return (this.selectedIndex < 0 ? null : this.info[this.selectedIndex]); +}); +Clazz.overrideMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append ("\n\n"); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JComponent.js b/bin/javajs/swing/JComponent.js index 28b137e..aca8bfd 100644 --- a/bin/javajs/swing/JComponent.js +++ b/bin/javajs/swing/JComponent.js @@ -1,25 +1,25 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.awt.Container"], "javajs.swing.JComponent", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.autoScrolls = false; -this.actionCommand = null; -this.actionListener = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JComponent", javajs.awt.Container); -Clazz.defineMethod (c$, "setAutoscrolls", -function (b) { -this.autoScrolls = b; -}, "~B"); -Clazz.defineMethod (c$, "addActionListener", -function (listener) { -this.actionListener = listener; -}, "~O"); -Clazz.defineMethod (c$, "getActionCommand", -function () { -return this.actionCommand; -}); -Clazz.defineMethod (c$, "setActionCommand", -function (actionCommand) { -this.actionCommand = actionCommand; -}, "~S"); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.awt.Container"], "javajs.swing.JComponent", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.autoScrolls = false; +this.actionCommand = null; +this.actionListener = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JComponent", javajs.awt.Container); +Clazz.defineMethod (c$, "setAutoscrolls", +function (b) { +this.autoScrolls = b; +}, "~B"); +Clazz.defineMethod (c$, "addActionListener", +function (listener) { +this.actionListener = listener; +}, "~O"); +Clazz.defineMethod (c$, "getActionCommand", +function () { +return this.actionCommand; +}); +Clazz.defineMethod (c$, "setActionCommand", +function (actionCommand) { +this.actionCommand = actionCommand; +}, "~S"); +}); diff --git a/bin/javajs/swing/JComponentImp.js b/bin/javajs/swing/JComponentImp.js index 2158688..a19f4ee 100644 --- a/bin/javajs/swing/JComponentImp.js +++ b/bin/javajs/swing/JComponentImp.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JComponentImp", null, function () { -c$ = Clazz.declareType (javajs.swing, "JComponentImp", javajs.swing.JComponent); -Clazz.overrideMethod (c$, "toHTML", -function () { -return null; -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JComponentImp", null, function () { +c$ = Clazz.declareType (javajs.swing, "JComponentImp", javajs.swing.JComponent); +Clazz.overrideMethod (c$, "toHTML", +function () { +return null; +}); +}); diff --git a/bin/javajs/swing/JContentPane.js b/bin/javajs/swing/JContentPane.js index 5f822fa..5cd86e3 100644 --- a/bin/javajs/swing/JContentPane.js +++ b/bin/javajs/swing/JContentPane.js @@ -1,17 +1,17 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JContentPane", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.swing, "JContentPane", javajs.swing.JComponent); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JContentPane, ["JCP"]); -}); -Clazz.defineMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append ("\n
    \n"); -if (this.list != null) for (var i = 0; i < this.list.size (); i++) sb.append (this.list.get (i).toHTML ()); - -sb.append ("\n
    \n"); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JContentPane", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.swing, "JContentPane", javajs.swing.JComponent); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JContentPane, ["JCP"]); +}); +Clazz.defineMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append ("\n
    \n"); +if (this.list != null) for (var i = 0; i < this.list.size (); i++) sb.append (this.list.get (i).toHTML ()); + +sb.append ("\n
    \n"); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JDialog.js b/bin/javajs/swing/JDialog.js index 16bacd5..6b11856 100644 --- a/bin/javajs/swing/JDialog.js +++ b/bin/javajs/swing/JDialog.js @@ -1,82 +1,82 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.awt.Container"], "javajs.swing.JDialog", ["javajs.awt.Color", "javajs.swing.JContentPane", "javajs.util.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.defaultWidth = 600; -this.defaultHeight = 300; -this.contentPane = null; -this.title = null; -this.html = null; -this.zIndex = 9000; -this.loc = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JDialog", javajs.awt.Container); -Clazz.defineMethod (c$, "setZIndex", -function (zIndex) { -this.zIndex = zIndex; -}, "~N"); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JDialog, ["JD"]); -this.add (this.contentPane = new javajs.swing.JContentPane ()); -this.setBackground (javajs.awt.Color.get3 (210, 210, 240)); -this.contentPane.setBackground (javajs.awt.Color.get3 (230, 230, 230)); -}); -Clazz.defineMethod (c$, "setLocation", -function (loc) { -this.loc = loc; -}, "~A"); -Clazz.defineMethod (c$, "getContentPane", -function () { -return this.contentPane; -}); -Clazz.defineMethod (c$, "setTitle", -function (title) { -this.title = title; -}, "~S"); -Clazz.defineMethod (c$, "pack", -function () { -this.html = null; -}); -Clazz.defineMethod (c$, "validate", -function () { -this.html = null; -}); -Clazz.defineMethod (c$, "setVisible", -function (tf) { -if (tf && this.html == null) this.setDialog (); -Clazz.superCall (this, javajs.swing.JDialog, "setVisible", [tf]); -}, "~B"); -Clazz.defineMethod (c$, "dispose", -function () { -{ -{ -SwingController.dispose(this); -}}}); -Clazz.overrideMethod (c$, "repaint", -function () { -this.setDialog (); -}); -Clazz.defineMethod (c$, "setDialog", -($fz = function () { -this.html = this.toHTML (); -{ -SwingController.setDialog(this); -}}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "toHTML", -function () { -this.renderWidth = this.getSubcomponentWidth (); -if (this.renderWidth == 0) this.renderWidth = this.defaultWidth; -this.renderHeight = this.contentPane.getSubcomponentHeight (); -if (this.renderHeight == 0) this.renderHeight = this.defaultHeight; -var h = this.renderHeight - 25; -var sb = new javajs.util.SB (); -sb.append ("\n
    \n"); -sb.append ("\n
    " + "" + this.title + "" + "
    \n"); -sb.append ("\n
    \n"); -sb.append (this.contentPane.toHTML ()); -sb.append ("\n
    \n"); -return sb.toString (); -}); -Clazz.defineStatics (c$, -"headerHeight", 25); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.awt.Container"], "javajs.swing.JDialog", ["javajs.awt.Color", "javajs.swing.JContentPane", "javajs.util.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.defaultWidth = 600; +this.defaultHeight = 300; +this.contentPane = null; +this.title = null; +this.html = null; +this.zIndex = 9000; +this.loc = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JDialog", javajs.awt.Container); +Clazz.defineMethod (c$, "setZIndex", +function (zIndex) { +this.zIndex = zIndex; +}, "~N"); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JDialog, ["JD"]); +this.add (this.contentPane = new javajs.swing.JContentPane ()); +this.setBackground (javajs.awt.Color.get3 (210, 210, 240)); +this.contentPane.setBackground (javajs.awt.Color.get3 (230, 230, 230)); +}); +Clazz.defineMethod (c$, "setLocation", +function (loc) { +this.loc = loc; +}, "~A"); +Clazz.defineMethod (c$, "getContentPane", +function () { +return this.contentPane; +}); +Clazz.defineMethod (c$, "setTitle", +function (title) { +this.title = title; +}, "~S"); +Clazz.defineMethod (c$, "pack", +function () { +this.html = null; +}); +Clazz.defineMethod (c$, "validate", +function () { +this.html = null; +}); +Clazz.defineMethod (c$, "setVisible", +function (tf) { +if (tf && this.html == null) this.setDialog (); +Clazz.superCall (this, javajs.swing.JDialog, "setVisible", [tf]); +}, "~B"); +Clazz.defineMethod (c$, "dispose", +function () { +{ +{ +SwingController.dispose(this); +}}}); +Clazz.overrideMethod (c$, "repaint", +function () { +this.setDialog (); +}); +Clazz.defineMethod (c$, "setDialog", +($fz = function () { +this.html = this.toHTML (); +{ +SwingController.setDialog(this); +}}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "toHTML", +function () { +this.renderWidth = this.getSubcomponentWidth (); +if (this.renderWidth == 0) this.renderWidth = this.defaultWidth; +this.renderHeight = this.contentPane.getSubcomponentHeight (); +if (this.renderHeight == 0) this.renderHeight = this.defaultHeight; +var h = this.renderHeight - 25; +var sb = new javajs.util.SB (); +sb.append ("\n
    \n"); +sb.append ("\n
    " + "" + this.title + "" + "
    \n"); +sb.append ("\n
    \n"); +sb.append (this.contentPane.toHTML ()); +sb.append ("\n
    \n"); +return sb.toString (); +}); +Clazz.defineStatics (c$, +"headerHeight", 25); +}); diff --git a/bin/javajs/swing/JEditorPane.js b/bin/javajs/swing/JEditorPane.js index 4f40aab..f8dcf8c 100644 --- a/bin/javajs/swing/JEditorPane.js +++ b/bin/javajs/swing/JEditorPane.js @@ -1,15 +1,15 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JEditorPane", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.swing, "JEditorPane", javajs.swing.JComponent); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JEditorPane, ["txtJEP"]); -this.text = ""; -}); -Clazz.overrideMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append (""); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JEditorPane", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.swing, "JEditorPane", javajs.swing.JComponent); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JEditorPane, ["txtJEP"]); +this.text = ""; +}); +Clazz.overrideMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append (""); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JLabel.js b/bin/javajs/swing/JLabel.js index 778976c..2146a5e 100644 --- a/bin/javajs/swing/JLabel.js +++ b/bin/javajs/swing/JLabel.js @@ -1,17 +1,17 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JLabel", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.swing, "JLabel", javajs.swing.JComponent); -Clazz.makeConstructor (c$, -function (text) { -Clazz.superConstructor (this, javajs.swing.JLabel, ["lblJL"]); -this.text = text; -}, "~S"); -Clazz.overrideMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append (""); -sb.append (this.text); -sb.append (""); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JLabel", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.swing, "JLabel", javajs.swing.JComponent); +Clazz.makeConstructor (c$, +function (text) { +Clazz.superConstructor (this, javajs.swing.JLabel, ["lblJL"]); +this.text = text; +}, "~S"); +Clazz.overrideMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append (""); +sb.append (this.text); +sb.append (""); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JMenu.js b/bin/javajs/swing/JMenu.js index f887330..4dae0ad 100644 --- a/bin/javajs/swing/JMenu.js +++ b/bin/javajs/swing/JMenu.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JMenuItem"], "javajs.swing.JMenu", null, function () { -c$ = Clazz.declareType (javajs.swing, "JMenu", javajs.swing.JMenuItem); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JMenu, ["mnu", 4]); -}); -Clazz.defineMethod (c$, "getItemCount", -function () { -return this.getComponentCount (); -}); -Clazz.defineMethod (c$, "getItem", -function (i) { -return this.getComponent (i); -}, "~N"); -Clazz.overrideMethod (c$, "getPopupMenu", -function () { -return this; -}); -Clazz.overrideMethod (c$, "toHTML", -function () { -return this.getMenuHTML (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JMenuItem"], "javajs.swing.JMenu", null, function () { +c$ = Clazz.declareType (javajs.swing, "JMenu", javajs.swing.JMenuItem); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JMenu, ["mnu", 4]); +}); +Clazz.defineMethod (c$, "getItemCount", +function () { +return this.getComponentCount (); +}); +Clazz.defineMethod (c$, "getItem", +function (i) { +return this.getComponent (i); +}, "~N"); +Clazz.overrideMethod (c$, "getPopupMenu", +function () { +return this; +}); +Clazz.overrideMethod (c$, "toHTML", +function () { +return this.getMenuHTML (); +}); +}); diff --git a/bin/javajs/swing/JMenuItem.js b/bin/javajs/swing/JMenuItem.js index 36e3220..b1183cc 100644 --- a/bin/javajs/swing/JMenuItem.js +++ b/bin/javajs/swing/JMenuItem.js @@ -1,36 +1,36 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JMenuItem", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.btnType = 0; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JMenuItem", javajs.swing.AbstractButton); -Clazz.makeConstructor (c$, -function (text) { -Clazz.superConstructor (this, javajs.swing.JMenuItem, ["btn"]); -this.setText (text); -this.btnType = (text == null ? 0 : 1); -}, "~S"); -Clazz.makeConstructor (c$, -function (type, i) { -Clazz.superConstructor (this, javajs.swing.JMenuItem, [type]); -this.btnType = i; -}, "~S,~N"); -Clazz.overrideMethod (c$, "toHTML", -function () { -return this.htmlMenuOpener ("li") + (this.text == null ? "" : "" + this.htmlLabel () + "") + ""; -}); -Clazz.overrideMethod (c$, "getHtmlDisabled", -function () { -return " class=\"ui-state-disabled\""; -}); -Clazz.defineMethod (c$, "htmlLabel", -($fz = function () { -return (this.btnType == 1 ? this.text : ""); -}, $fz.isPrivate = true, $fz)); -Clazz.defineStatics (c$, -"TYPE_SEPARATOR", 0, -"TYPE_BUTTON", 1, -"TYPE_CHECKBOX", 2, -"TYPE_RADIO", 3, -"TYPE_MENU", 4); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JMenuItem", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.btnType = 0; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JMenuItem", javajs.swing.AbstractButton); +Clazz.makeConstructor (c$, +function (text) { +Clazz.superConstructor (this, javajs.swing.JMenuItem, ["btn"]); +this.setText (text); +this.btnType = (text == null ? 0 : 1); +}, "~S"); +Clazz.makeConstructor (c$, +function (type, i) { +Clazz.superConstructor (this, javajs.swing.JMenuItem, [type]); +this.btnType = i; +}, "~S,~N"); +Clazz.overrideMethod (c$, "toHTML", +function () { +return this.htmlMenuOpener ("li") + (this.text == null ? "" : "" + this.htmlLabel () + "") + ""; +}); +Clazz.overrideMethod (c$, "getHtmlDisabled", +function () { +return " class=\"ui-state-disabled\""; +}); +Clazz.defineMethod (c$, "htmlLabel", +($fz = function () { +return (this.btnType == 1 ? this.text : ""); +}, $fz.isPrivate = true, $fz)); +Clazz.defineStatics (c$, +"TYPE_SEPARATOR", 0, +"TYPE_BUTTON", 1, +"TYPE_CHECKBOX", 2, +"TYPE_RADIO", 3, +"TYPE_MENU", 4); +}); diff --git a/bin/javajs/swing/JPanel.js b/bin/javajs/swing/JPanel.js index a7a7ef9..76bb933 100644 --- a/bin/javajs/swing/JPanel.js +++ b/bin/javajs/swing/JPanel.js @@ -1,39 +1,39 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JPanel", ["javajs.swing.Grid", "$.GridBagConstraints", "javajs.util.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.grid = null; -this.nElements = 0; -this.last = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JPanel", javajs.swing.JComponent); -Clazz.makeConstructor (c$, -function (manager) { -Clazz.superConstructor (this, javajs.swing.JPanel, ["JP"]); -this.grid = new javajs.swing.Grid (10, 10); -}, "javajs.awt.LayoutManager"); -Clazz.defineMethod (c$, "add", -function (btn, c) { -this.last = (++this.nElements == 1 ? btn : null); -if (Clazz.instanceOf (c, String)) { -if (c.equals ("North")) c = new javajs.swing.GridBagConstraints (0, 0, 3, 1, 0, 0, 10, 0, null, 0, 0); - else if (c.equals ("South")) c = new javajs.swing.GridBagConstraints (0, 2, 3, 1, 0, 0, 10, 0, null, 0, 0); - else if (c.equals ("East")) c = new javajs.swing.GridBagConstraints (2, 1, 1, 1, 0, 0, 13, 0, null, 0, 0); - else if (c.equals ("West")) c = new javajs.swing.GridBagConstraints (0, 1, 1, 1, 0, 0, 17, 0, null, 0, 0); - else c = new javajs.swing.GridBagConstraints (1, 1, 1, 1, 0, 0, 10, 0, null, 0, 0); -}this.grid.add (btn, c); -}, "javajs.swing.JComponent,~O"); -Clazz.overrideMethod (c$, "toHTML", -function () { -if (this.last != null) { -this.grid = new javajs.swing.Grid (1, 1); -this.grid.add (this.last, new javajs.swing.GridBagConstraints (0, 0, 1, 1, 0, 0, 10, 0, null, 0, 0)); -this.last = null; -}var sb = new javajs.util.SB (); -sb.append ("\n
    \n"); -sb.append ("\n"); -sb.append (this.grid.toHTML (this.id)); -sb.append (""); -sb.append ("\n
    \n"); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JPanel", ["javajs.swing.Grid", "$.GridBagConstraints", "javajs.util.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.grid = null; +this.nElements = 0; +this.last = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JPanel", javajs.swing.JComponent); +Clazz.makeConstructor (c$, +function (manager) { +Clazz.superConstructor (this, javajs.swing.JPanel, ["JP"]); +this.grid = new javajs.swing.Grid (10, 10); +}, "javajs.awt.LayoutManager"); +Clazz.defineMethod (c$, "add", +function (btn, c) { +this.last = (++this.nElements == 1 ? btn : null); +if (Clazz.instanceOf (c, String)) { +if (c.equals ("North")) c = new javajs.swing.GridBagConstraints (0, 0, 3, 1, 0, 0, 10, 0, null, 0, 0); + else if (c.equals ("South")) c = new javajs.swing.GridBagConstraints (0, 2, 3, 1, 0, 0, 10, 0, null, 0, 0); + else if (c.equals ("East")) c = new javajs.swing.GridBagConstraints (2, 1, 1, 1, 0, 0, 13, 0, null, 0, 0); + else if (c.equals ("West")) c = new javajs.swing.GridBagConstraints (0, 1, 1, 1, 0, 0, 17, 0, null, 0, 0); + else c = new javajs.swing.GridBagConstraints (1, 1, 1, 1, 0, 0, 10, 0, null, 0, 0); +}this.grid.add (btn, c); +}, "javajs.swing.JComponent,~O"); +Clazz.overrideMethod (c$, "toHTML", +function () { +if (this.last != null) { +this.grid = new javajs.swing.Grid (1, 1); +this.grid.add (this.last, new javajs.swing.GridBagConstraints (0, 0, 1, 1, 0, 0, 10, 0, null, 0, 0)); +this.last = null; +}var sb = new javajs.util.SB (); +sb.append ("\n
    \n"); +sb.append ("\n"); +sb.append (this.grid.toHTML (this.id)); +sb.append (""); +sb.append ("\n
    \n"); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JPopupMenu.js b/bin/javajs/swing/JPopupMenu.js index 855df96..95cbc1f 100644 --- a/bin/javajs/swing/JPopupMenu.js +++ b/bin/javajs/swing/JPopupMenu.js @@ -1,37 +1,37 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JPopupMenu", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.tainted = true; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JPopupMenu", javajs.swing.AbstractButton); -Clazz.makeConstructor (c$, -function (name) { -Clazz.superConstructor (this, javajs.swing.JPopupMenu, ["mnu"]); -this.name = name; -}, "~S"); -Clazz.defineMethod (c$, "setInvoker", -function (applet) { -this.applet = applet; -{ -SwingController.setMenu(this); -}}, "~O"); -Clazz.defineMethod (c$, "show", -function (applet, x, y) { -{ -if (applet != null) -this.tainted = true; -SwingController.showMenu(this, x, y); -}}, "javajs.awt.Component,~N,~N"); -Clazz.defineMethod (c$, "disposeMenu", -function () { -{ -SwingController.disposeMenu(this); -}}); -Clazz.overrideMethod (c$, "toHTML", -function () { -return this.getMenuHTML (); -}); -{ -{ -SwingController.setDraggable(javajs.swing.JPopupMenu); -}}}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JPopupMenu", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.tainted = true; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JPopupMenu", javajs.swing.AbstractButton); +Clazz.makeConstructor (c$, +function (name) { +Clazz.superConstructor (this, javajs.swing.JPopupMenu, ["mnu"]); +this.name = name; +}, "~S"); +Clazz.defineMethod (c$, "setInvoker", +function (applet) { +this.applet = applet; +{ +SwingController.setMenu(this); +}}, "~O"); +Clazz.defineMethod (c$, "show", +function (applet, x, y) { +{ +if (applet != null) +this.tainted = true; +SwingController.showMenu(this, x, y); +}}, "javajs.awt.Component,~N,~N"); +Clazz.defineMethod (c$, "disposeMenu", +function () { +{ +SwingController.disposeMenu(this); +}}); +Clazz.overrideMethod (c$, "toHTML", +function () { +return this.getMenuHTML (); +}); +{ +{ +SwingController.setDraggable(javajs.swing.JPopupMenu); +}}}); diff --git a/bin/javajs/swing/JRadioButtonMenuItem.js b/bin/javajs/swing/JRadioButtonMenuItem.js index 1ba2401..8388819 100644 --- a/bin/javajs/swing/JRadioButtonMenuItem.js +++ b/bin/javajs/swing/JRadioButtonMenuItem.js @@ -1,11 +1,11 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JMenuItem"], "javajs.swing.JRadioButtonMenuItem", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.isRadio = true; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JRadioButtonMenuItem", javajs.swing.JMenuItem); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JRadioButtonMenuItem, ["rad", 3]); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JMenuItem"], "javajs.swing.JRadioButtonMenuItem", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.isRadio = true; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JRadioButtonMenuItem", javajs.swing.JMenuItem); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JRadioButtonMenuItem, ["rad", 3]); +}); +}); diff --git a/bin/javajs/swing/JScrollPane.js b/bin/javajs/swing/JScrollPane.js index 64c766a..2ba9959 100644 --- a/bin/javajs/swing/JScrollPane.js +++ b/bin/javajs/swing/JScrollPane.js @@ -1,22 +1,22 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JScrollPane", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.swing, "JScrollPane", javajs.swing.JComponent); -Clazz.makeConstructor (c$, -function (component) { -Clazz.superConstructor (this, javajs.swing.JScrollPane, ["JScP"]); -this.add (component); -}, "javajs.swing.JComponent"); -Clazz.defineMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append ("\n
    \n"); -if (this.list != null) { -var c = this.list.get (0); -sb.append (c.toHTML ()); -}sb.append ("\n
    \n"); -return sb.toString (); -}); -Clazz.overrideMethod (c$, "setMinimumSize", -function (dimension) { -}, "javajs.awt.Dimension"); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JScrollPane", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.swing, "JScrollPane", javajs.swing.JComponent); +Clazz.makeConstructor (c$, +function (component) { +Clazz.superConstructor (this, javajs.swing.JScrollPane, ["JScP"]); +this.add (component); +}, "javajs.swing.JComponent"); +Clazz.defineMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append ("\n
    \n"); +if (this.list != null) { +var c = this.list.get (0); +sb.append (c.toHTML ()); +}sb.append ("\n
    \n"); +return sb.toString (); +}); +Clazz.overrideMethod (c$, "setMinimumSize", +function (dimension) { +}, "javajs.awt.Dimension"); +}); diff --git a/bin/javajs/swing/JSplitPane.js b/bin/javajs/swing/JSplitPane.js index 11f99e2..08969e2 100644 --- a/bin/javajs/swing/JSplitPane.js +++ b/bin/javajs/swing/JSplitPane.js @@ -1,67 +1,67 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JSplitPane", ["javajs.swing.JComponentImp", "javajs.util.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.isH = true; -this.split = 1; -this.right = null; -this.left = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JSplitPane", javajs.swing.JComponent); -Clazz.makeConstructor (c$, -function (split) { -Clazz.superConstructor (this, javajs.swing.JSplitPane, ["JSpP"]); -this.split = split; -this.isH = (split == 1); -}, "~N"); -Clazz.defineMethod (c$, "setRightComponent", -function (r) { -this.right = new javajs.swing.JComponentImp (null); -this.right.add (r); -}, "javajs.swing.JComponent"); -Clazz.defineMethod (c$, "setLeftComponent", -function (l) { -this.left = new javajs.swing.JComponentImp (null); -this.left.add (l); -}, "javajs.swing.JComponent"); -Clazz.defineMethod (c$, "getSubcomponentWidth", -function () { -var w = this.width; -if (w == 0) { -var wleft = this.left.getSubcomponentWidth (); -var wright = this.right.getSubcomponentWidth (); -if (wleft > 0 && wright > 0) { -if (this.isH) w = wleft + wright; - else w = Math.max (wleft, wright); -}}return w; -}); -Clazz.defineMethod (c$, "getSubcomponentHeight", -function () { -var h = this.height; -if (h == 0) { -var hleft = this.left.getSubcomponentHeight (); -var hright = this.right.getSubcomponentHeight (); -if (hleft > 0 && hright > 0) { -if (this.isH) h = Math.max (hleft, hright); - else h = hleft + hright; -}}return h; -}); -Clazz.defineMethod (c$, "toHTML", -function () { -if (this.left == null || this.right == null) return ""; -var isH = (this.split == 1); -if (this.width == 0) this.width = this.getSubcomponentWidth (); -if (this.height == 0) this.height = this.getSubcomponentHeight (); -var sb = new javajs.util.SB (); -sb.append ("
    "); -if (isH) sb.append ("
    "); - else sb.append ("
    "); -sb.append (this.left.getComponents ()[0].toHTML ()); -if (isH) sb.append ("
    "); - else sb.append ("
    "); -sb.append (this.right.getComponents ()[0].toHTML ()); -sb.append ("
    \n"); -return sb.toString (); -}); -Clazz.defineStatics (c$, -"HORIZONTAL_SPLIT", 1); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JSplitPane", ["javajs.swing.JComponentImp", "javajs.util.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.isH = true; +this.split = 1; +this.right = null; +this.left = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JSplitPane", javajs.swing.JComponent); +Clazz.makeConstructor (c$, +function (split) { +Clazz.superConstructor (this, javajs.swing.JSplitPane, ["JSpP"]); +this.split = split; +this.isH = (split == 1); +}, "~N"); +Clazz.defineMethod (c$, "setRightComponent", +function (r) { +this.right = new javajs.swing.JComponentImp (null); +this.right.add (r); +}, "javajs.swing.JComponent"); +Clazz.defineMethod (c$, "setLeftComponent", +function (l) { +this.left = new javajs.swing.JComponentImp (null); +this.left.add (l); +}, "javajs.swing.JComponent"); +Clazz.defineMethod (c$, "getSubcomponentWidth", +function () { +var w = this.width; +if (w == 0) { +var wleft = this.left.getSubcomponentWidth (); +var wright = this.right.getSubcomponentWidth (); +if (wleft > 0 && wright > 0) { +if (this.isH) w = wleft + wright; + else w = Math.max (wleft, wright); +}}return w; +}); +Clazz.defineMethod (c$, "getSubcomponentHeight", +function () { +var h = this.height; +if (h == 0) { +var hleft = this.left.getSubcomponentHeight (); +var hright = this.right.getSubcomponentHeight (); +if (hleft > 0 && hright > 0) { +if (this.isH) h = Math.max (hleft, hright); + else h = hleft + hright; +}}return h; +}); +Clazz.defineMethod (c$, "toHTML", +function () { +if (this.left == null || this.right == null) return ""; +var isH = (this.split == 1); +if (this.width == 0) this.width = this.getSubcomponentWidth (); +if (this.height == 0) this.height = this.getSubcomponentHeight (); +var sb = new javajs.util.SB (); +sb.append ("
    "); +if (isH) sb.append ("
    "); + else sb.append ("
    "); +sb.append (this.left.getComponents ()[0].toHTML ()); +if (isH) sb.append ("
    "); + else sb.append ("
    "); +sb.append (this.right.getComponents ()[0].toHTML ()); +sb.append ("
    \n"); +return sb.toString (); +}); +Clazz.defineStatics (c$, +"HORIZONTAL_SPLIT", 1); +}); diff --git a/bin/javajs/swing/JTable.js b/bin/javajs/swing/JTable.js index a281668..b8f4499 100644 --- a/bin/javajs/swing/JTable.js +++ b/bin/javajs/swing/JTable.js @@ -1,67 +1,67 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.ColumnSelectionModel", "$.JComponent", "$.ListSelectionModel"], "javajs.swing.JTable", ["javajs.util.BS", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.tableModel = null; -this.bsSelectedCells = null; -this.bsSelectedRows = null; -this.rowSelectionAllowed = false; -this.cellSelectionEnabled = false; -this.selectionListener = null; -Clazz.instantialize (this, arguments); -}, javajs.swing, "JTable", javajs.swing.JComponent, [javajs.swing.ListSelectionModel, javajs.swing.ColumnSelectionModel]); -Clazz.makeConstructor (c$, -function (tableModel) { -Clazz.superConstructor (this, javajs.swing.JTable, ["JT"]); -this.tableModel = tableModel; -this.bsSelectedCells = new javajs.util.BS (); -this.bsSelectedRows = new javajs.util.BS (); -}, "javajs.swing.AbstractTableModel"); -Clazz.overrideMethod (c$, "getSelectionModel", -function () { -return this; -}); -Clazz.defineMethod (c$, "getColumnModel", -function () { -return this; -}); -Clazz.defineMethod (c$, "setPreferredScrollableViewportSize", -function (dimension) { -this.width = dimension.width; -this.height = dimension.height; -}, "javajs.awt.Dimension"); -Clazz.defineMethod (c$, "clearSelection", -function () { -this.bsSelectedCells.clearAll (); -this.bsSelectedRows.clearAll (); -}); -Clazz.defineMethod (c$, "setRowSelectionAllowed", -function (b) { -this.rowSelectionAllowed = b; -}, "~B"); -Clazz.defineMethod (c$, "setRowSelectionInterval", -function (i, j) { -this.bsSelectedRows.clearAll (); -this.bsSelectedRows.setBits (i, j); -this.bsSelectedCells.clearAll (); -}, "~N,~N"); -Clazz.defineMethod (c$, "setCellSelectionEnabled", -function (enabled) { -this.cellSelectionEnabled = enabled; -}, "~B"); -Clazz.overrideMethod (c$, "addListSelectionListener", -function (listener) { -this.selectionListener = listener; -}, "~O"); -Clazz.overrideMethod (c$, "getColumn", -function (i) { -return this.tableModel.getColumn (i); -}, "~N"); -Clazz.overrideMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append ("\n"); -this.tableModel.toHTML (sb, this.id, this.bsSelectedRows); -sb.append ("\n
    \n"); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.ColumnSelectionModel", "$.JComponent", "$.ListSelectionModel"], "javajs.swing.JTable", ["javajs.util.BS", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.tableModel = null; +this.bsSelectedCells = null; +this.bsSelectedRows = null; +this.rowSelectionAllowed = false; +this.cellSelectionEnabled = false; +this.selectionListener = null; +Clazz.instantialize (this, arguments); +}, javajs.swing, "JTable", javajs.swing.JComponent, [javajs.swing.ListSelectionModel, javajs.swing.ColumnSelectionModel]); +Clazz.makeConstructor (c$, +function (tableModel) { +Clazz.superConstructor (this, javajs.swing.JTable, ["JT"]); +this.tableModel = tableModel; +this.bsSelectedCells = new javajs.util.BS (); +this.bsSelectedRows = new javajs.util.BS (); +}, "javajs.swing.AbstractTableModel"); +Clazz.overrideMethod (c$, "getSelectionModel", +function () { +return this; +}); +Clazz.defineMethod (c$, "getColumnModel", +function () { +return this; +}); +Clazz.defineMethod (c$, "setPreferredScrollableViewportSize", +function (dimension) { +this.width = dimension.width; +this.height = dimension.height; +}, "javajs.awt.Dimension"); +Clazz.defineMethod (c$, "clearSelection", +function () { +this.bsSelectedCells.clearAll (); +this.bsSelectedRows.clearAll (); +}); +Clazz.defineMethod (c$, "setRowSelectionAllowed", +function (b) { +this.rowSelectionAllowed = b; +}, "~B"); +Clazz.defineMethod (c$, "setRowSelectionInterval", +function (i, j) { +this.bsSelectedRows.clearAll (); +this.bsSelectedRows.setBits (i, j); +this.bsSelectedCells.clearAll (); +}, "~N,~N"); +Clazz.defineMethod (c$, "setCellSelectionEnabled", +function (enabled) { +this.cellSelectionEnabled = enabled; +}, "~B"); +Clazz.overrideMethod (c$, "addListSelectionListener", +function (listener) { +this.selectionListener = listener; +}, "~O"); +Clazz.overrideMethod (c$, "getColumn", +function (i) { +return this.tableModel.getColumn (i); +}, "~N"); +Clazz.overrideMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append ("\n"); +this.tableModel.toHTML (sb, this.id, this.bsSelectedRows); +sb.append ("\n
    \n"); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JTextField.js b/bin/javajs/swing/JTextField.js index 9cc639f..88b08a6 100644 --- a/bin/javajs/swing/JTextField.js +++ b/bin/javajs/swing/JTextField.js @@ -1,15 +1,15 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JTextField", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.swing, "JTextField", javajs.swing.JComponent); -Clazz.makeConstructor (c$, -function (value) { -Clazz.superConstructor (this, javajs.swing.JTextField, ["txtJT"]); -this.text = value; -}, "~S"); -Clazz.overrideMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append (""); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.JComponent"], "javajs.swing.JTextField", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.swing, "JTextField", javajs.swing.JComponent); +Clazz.makeConstructor (c$, +function (value) { +Clazz.superConstructor (this, javajs.swing.JTextField, ["txtJT"]); +this.text = value; +}, "~S"); +Clazz.overrideMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append (""); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/JTextPane.js b/bin/javajs/swing/JTextPane.js index 23d5a22..25d3764 100644 --- a/bin/javajs/swing/JTextPane.js +++ b/bin/javajs/swing/JTextPane.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.load (["javajs.swing.Document", "$.JComponent"], "javajs.swing.JTextPane", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.swing, "JTextPane", javajs.swing.JComponent, javajs.swing.Document); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.swing.JTextPane, ["txtJTP"]); -this.text = ""; -}); -Clazz.defineMethod (c$, "getDocument", -function () { -return this; -}); -Clazz.overrideMethod (c$, "insertString", -function (i, s, object) { -i = Math.min (i, this.text.length); -this.text = this.text.substring (0, i) + s + this.text.substring (i); -}, "~N,~S,~O"); -Clazz.overrideMethod (c$, "toHTML", -function () { -var sb = new javajs.util.SB (); -sb.append (""); -return sb.toString (); -}); -}); +Clazz.declarePackage ("javajs.swing"); +Clazz.load (["javajs.swing.Document", "$.JComponent"], "javajs.swing.JTextPane", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.swing, "JTextPane", javajs.swing.JComponent, javajs.swing.Document); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.swing.JTextPane, ["txtJTP"]); +this.text = ""; +}); +Clazz.defineMethod (c$, "getDocument", +function () { +return this; +}); +Clazz.overrideMethod (c$, "insertString", +function (i, s, object) { +i = Math.min (i, this.text.length); +this.text = this.text.substring (0, i) + s + this.text.substring (i); +}, "~N,~S,~O"); +Clazz.overrideMethod (c$, "toHTML", +function () { +var sb = new javajs.util.SB (); +sb.append (""); +return sb.toString (); +}); +}); diff --git a/bin/javajs/swing/ListSelectionModel.js b/bin/javajs/swing/ListSelectionModel.js index 5cb1d3a..c5fd420 100644 --- a/bin/javajs/swing/ListSelectionModel.js +++ b/bin/javajs/swing/ListSelectionModel.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.declareInterface (javajs.swing, "ListSelectionModel"); +Clazz.declarePackage ("javajs.swing"); +Clazz.declareInterface (javajs.swing, "ListSelectionModel"); diff --git a/bin/javajs/swing/SwingConstants.js b/bin/javajs/swing/SwingConstants.js index f10e094..2298d0a 100644 --- a/bin/javajs/swing/SwingConstants.js +++ b/bin/javajs/swing/SwingConstants.js @@ -1,6 +1,6 @@ -Clazz.declarePackage ("javajs.swing"); -c$ = Clazz.declareType (javajs.swing, "SwingConstants"); -Clazz.defineStatics (c$, -"LEFT", 2, -"CENTER", 0, -"RIGHT", 4); +Clazz.declarePackage ("javajs.swing"); +c$ = Clazz.declareType (javajs.swing, "SwingConstants"); +Clazz.defineStatics (c$, +"LEFT", 2, +"CENTER", 0, +"RIGHT", 4); diff --git a/bin/javajs/swing/TableCellRenderer.js b/bin/javajs/swing/TableCellRenderer.js index 94b3f9f..6b1942e 100644 --- a/bin/javajs/swing/TableCellRenderer.js +++ b/bin/javajs/swing/TableCellRenderer.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.declareInterface (javajs.swing, "TableCellRenderer"); +Clazz.declarePackage ("javajs.swing"); +Clazz.declareInterface (javajs.swing, "TableCellRenderer"); diff --git a/bin/javajs/swing/TableColumn.js b/bin/javajs/swing/TableColumn.js index e2fa800..19d5394 100644 --- a/bin/javajs/swing/TableColumn.js +++ b/bin/javajs/swing/TableColumn.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("javajs.swing"); -Clazz.declareInterface (javajs.swing, "TableColumn"); +Clazz.declarePackage ("javajs.swing"); +Clazz.declareInterface (javajs.swing, "TableColumn"); diff --git a/bin/javajs/util/A4.js b/bin/javajs/util/A4.js index d3d3a66..b3f66b8 100644 --- a/bin/javajs/util/A4.js +++ b/bin/javajs/util/A4.js @@ -1,89 +1,89 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.api.JSONEncodable"], "javajs.util.A4", ["javajs.util.T3"], function () { -c$ = Clazz.decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.z = 0; -this.angle = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "A4", null, [javajs.api.JSONEncodable, java.io.Serializable]); -Clazz.makeConstructor (c$, -function () { -this.z = 1.0; -}); -c$.new4 = Clazz.defineMethod (c$, "new4", -function (x, y, z, angle) { -var a = new javajs.util.A4 (); -a.set4 (x, y, z, angle); -return a; -}, "~N,~N,~N,~N"); -c$.newAA = Clazz.defineMethod (c$, "newAA", -function (a1) { -var a = new javajs.util.A4 (); -a.set4 (a1.x, a1.y, a1.z, a1.angle); -return a; -}, "javajs.util.A4"); -c$.newVA = Clazz.defineMethod (c$, "newVA", -function (axis, angle) { -var a = new javajs.util.A4 (); -a.setVA (axis, angle); -return a; -}, "javajs.util.V3,~N"); -Clazz.defineMethod (c$, "setVA", -function (axis, angle) { -this.x = axis.x; -this.y = axis.y; -this.z = axis.z; -this.angle = angle; -}, "javajs.util.V3,~N"); -Clazz.defineMethod (c$, "set4", -function (x, y, z, angle) { -this.x = x; -this.y = y; -this.z = z; -this.angle = angle; -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "setAA", -function (a) { -this.x = a.x; -this.y = a.y; -this.z = a.z; -this.angle = a.angle; -}, "javajs.util.A4"); -Clazz.defineMethod (c$, "setM", -function (m1) { -this.setFromMat (m1.m00, m1.m01, m1.m02, m1.m10, m1.m11, m1.m12, m1.m20, m1.m21, m1.m22); -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "setFromMat", -($fz = function (m00, m01, m02, m10, m11, m12, m20, m21, m22) { -var cos = (m00 + m11 + m22 - 1.0) * 0.5; -this.x = (m21 - m12); -this.y = (m02 - m20); -this.z = (m10 - m01); -var sin = 0.5 * Math.sqrt (this.x * this.x + this.y * this.y + this.z * this.z); -if (sin == 0 && cos == 1) { -this.x = this.y = 0; -this.z = 1; -this.angle = 0; -} else { -this.angle = Math.atan2 (sin, cos); -}}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz.overrideMethod (c$, "hashCode", -function () { -return javajs.util.T3.floatToIntBits0 (this.x) ^ javajs.util.T3.floatToIntBits0 (this.y) ^ javajs.util.T3.floatToIntBits0 (this.z) ^ javajs.util.T3.floatToIntBits0 (this.angle); -}); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (!(Clazz.instanceOf (o, javajs.util.A4))) return false; -var a1 = o; -return this.x == a1.x && this.y == a1.y && this.z == a1.z && this.angle == a1.angle; -}, "~O"); -Clazz.overrideMethod (c$, "toString", -function () { -return "(" + this.x + ", " + this.y + ", " + this.z + ", " + this.angle + ")"; -}); -Clazz.overrideMethod (c$, "toJSON", -function () { -return "[" + this.x + "," + this.y + "," + this.z + "," + (this.angle * 180.0 / 3.141592653589793) + "]"; -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.JSONEncodable"], "javajs.util.A4", ["javajs.util.T3"], function () { +c$ = Clazz.decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.z = 0; +this.angle = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "A4", null, [javajs.api.JSONEncodable, java.io.Serializable]); +Clazz.makeConstructor (c$, +function () { +this.z = 1.0; +}); +c$.new4 = Clazz.defineMethod (c$, "new4", +function (x, y, z, angle) { +var a = new javajs.util.A4 (); +a.set4 (x, y, z, angle); +return a; +}, "~N,~N,~N,~N"); +c$.newAA = Clazz.defineMethod (c$, "newAA", +function (a1) { +var a = new javajs.util.A4 (); +a.set4 (a1.x, a1.y, a1.z, a1.angle); +return a; +}, "javajs.util.A4"); +c$.newVA = Clazz.defineMethod (c$, "newVA", +function (axis, angle) { +var a = new javajs.util.A4 (); +a.setVA (axis, angle); +return a; +}, "javajs.util.V3,~N"); +Clazz.defineMethod (c$, "setVA", +function (axis, angle) { +this.x = axis.x; +this.y = axis.y; +this.z = axis.z; +this.angle = angle; +}, "javajs.util.V3,~N"); +Clazz.defineMethod (c$, "set4", +function (x, y, z, angle) { +this.x = x; +this.y = y; +this.z = z; +this.angle = angle; +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "setAA", +function (a) { +this.x = a.x; +this.y = a.y; +this.z = a.z; +this.angle = a.angle; +}, "javajs.util.A4"); +Clazz.defineMethod (c$, "setM", +function (m1) { +this.setFromMat (m1.m00, m1.m01, m1.m02, m1.m10, m1.m11, m1.m12, m1.m20, m1.m21, m1.m22); +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "setFromMat", +($fz = function (m00, m01, m02, m10, m11, m12, m20, m21, m22) { +var cos = (m00 + m11 + m22 - 1.0) * 0.5; +this.x = (m21 - m12); +this.y = (m02 - m20); +this.z = (m10 - m01); +var sin = 0.5 * Math.sqrt (this.x * this.x + this.y * this.y + this.z * this.z); +if (sin == 0 && cos == 1) { +this.x = this.y = 0; +this.z = 1; +this.angle = 0; +} else { +this.angle = Math.atan2 (sin, cos); +}}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz.overrideMethod (c$, "hashCode", +function () { +return javajs.util.T3.floatToIntBits0 (this.x) ^ javajs.util.T3.floatToIntBits0 (this.y) ^ javajs.util.T3.floatToIntBits0 (this.z) ^ javajs.util.T3.floatToIntBits0 (this.angle); +}); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (!(Clazz.instanceOf (o, javajs.util.A4))) return false; +var a1 = o; +return this.x == a1.x && this.y == a1.y && this.z == a1.z && this.angle == a1.angle; +}, "~O"); +Clazz.overrideMethod (c$, "toString", +function () { +return "(" + this.x + ", " + this.y + ", " + this.z + ", " + this.angle + ")"; +}); +Clazz.overrideMethod (c$, "toJSON", +function () { +return "[" + this.x + "," + this.y + "," + this.z + "," + (this.angle * 180.0 / 3.141592653589793) + "]"; +}); +}); diff --git a/bin/javajs/util/AU.js b/bin/javajs/util/AU.js index f7f0201..080d17c 100644 --- a/bin/javajs/util/AU.js +++ b/bin/javajs/util/AU.js @@ -1,351 +1,351 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (null, "javajs.util.AU", ["java.util.Arrays", "javajs.util.Lst"], function () { -c$ = Clazz.declareType (javajs.util, "AU"); -c$.ensureLength = Clazz.defineMethod (c$, "ensureLength", -function (array, minimumLength) { -if (array != null && javajs.util.AU.getLength (array) >= minimumLength) return array; -return javajs.util.AU.arrayCopyObject (array, minimumLength); -}, "~O,~N"); -c$.ensureLengthS = Clazz.defineMethod (c$, "ensureLengthS", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return javajs.util.AU.arrayCopyS (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthA = Clazz.defineMethod (c$, "ensureLengthA", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return javajs.util.AU.arrayCopyF (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthI = Clazz.defineMethod (c$, "ensureLengthI", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return javajs.util.AU.arrayCopyI (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthShort = Clazz.defineMethod (c$, "ensureLengthShort", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return javajs.util.AU.arrayCopyShort (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthByte = Clazz.defineMethod (c$, "ensureLengthByte", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return javajs.util.AU.arrayCopyByte (array, minimumLength); -}, "~A,~N"); -c$.doubleLength = Clazz.defineMethod (c$, "doubleLength", -function (array) { -return javajs.util.AU.arrayCopyObject (array, (array == null ? 16 : 2 * javajs.util.AU.getLength (array))); -}, "~O"); -c$.doubleLengthS = Clazz.defineMethod (c$, "doubleLengthS", -function (array) { -return javajs.util.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthF = Clazz.defineMethod (c$, "doubleLengthF", -function (array) { -return javajs.util.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthI = Clazz.defineMethod (c$, "doubleLengthI", -function (array) { -return javajs.util.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthShort = Clazz.defineMethod (c$, "doubleLengthShort", -function (array) { -return javajs.util.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthByte = Clazz.defineMethod (c$, "doubleLengthByte", -function (array) { -return javajs.util.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthBool = Clazz.defineMethod (c$, "doubleLengthBool", -function (array) { -return javajs.util.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.deleteElements = Clazz.defineMethod (c$, "deleteElements", -function (array, firstElement, nElements) { -if (nElements == 0 || array == null) return array; -var oldLength = javajs.util.AU.getLength (array); -if (firstElement >= oldLength) return array; -var n = oldLength - (firstElement + nElements); -if (n < 0) n = 0; -var t = javajs.util.AU.newInstanceO (array, firstElement + n); -if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement); -if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n); -return t; -}, "~O,~N,~N"); -c$.arrayCopyObject = Clazz.defineMethod (c$, "arrayCopyObject", -function (array, newLength) { -if (array == null) { -return null; -}var oldLength = javajs.util.AU.getLength (array); -if (newLength == oldLength) return array; -var t = javajs.util.AU.newInstanceO (array, newLength); -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -return t; -}, "~O,~N"); -c$.newInstanceO = Clazz.defineMethod (c$, "newInstanceO", -($fz = function (array, n) { -{ -if (!array.getClass().getComponentType) -return new Array(n); -}}, $fz.isPrivate = true, $fz), "~O,~N"); -c$.getLength = Clazz.defineMethod (c$, "getLength", -function (array) { -{ -return array.length -}}, "~O"); -c$.arrayCopyS = Clazz.defineMethod (c$, "arrayCopyS", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = new Array (newLength); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyII = Clazz.defineMethod (c$, "arrayCopyII", -function (array, newLength) { -var t = javajs.util.AU.newInt2 (newLength); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyPt = Clazz.defineMethod (c$, "arrayCopyPt", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = new Array (newLength); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyF = Clazz.defineMethod (c$, "arrayCopyF", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz.newFloatArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyI = Clazz.defineMethod (c$, "arrayCopyI", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz.newIntArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyRangeI = Clazz.defineMethod (c$, "arrayCopyRangeI", -function (array, i0, n) { -if (array == null) return null; -var oldLength = array.length; -if (n == -1) n = oldLength; -if (n == -2) n = Clazz.doubleToInt (oldLength / 2); -n = n - i0; -var t = Clazz.newIntArray (n, 0); -System.arraycopy (array, i0, t, 0, n); -return t; -}, "~A,~N,~N"); -c$.arrayCopyRangeRevI = Clazz.defineMethod (c$, "arrayCopyRangeRevI", -function (array, i0, n) { -if (array == null) return null; -var t = javajs.util.AU.arrayCopyRangeI (array, i0, n); -if (n < 0) n = array.length; -for (var i = Clazz.doubleToInt (n / 2); --i >= 0; ) javajs.util.AU.swapInt (t, i, n - 1 - i); - -return t; -}, "~A,~N,~N"); -c$.arrayCopyShort = Clazz.defineMethod (c$, "arrayCopyShort", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz.newShortArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyByte = Clazz.defineMethod (c$, "arrayCopyByte", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz.newByteArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyBool = Clazz.defineMethod (c$, "arrayCopyBool", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz.newBooleanArray (newLength, false); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.swapInt = Clazz.defineMethod (c$, "swapInt", -function (array, indexA, indexB) { -var t = array[indexA]; -array[indexA] = array[indexB]; -array[indexB] = t; -}, "~A,~N,~N"); -c$.dumpArray = Clazz.defineMethod (c$, "dumpArray", -function (msg, A, x1, x2, y1, y2) { -var s = "dumpArray: " + msg + "\n"; -for (var x = x1; x <= x2; x++) s += "\t*" + x + "*"; - -for (var y = y2; y >= y1; y--) { -s += "\n*" + y + "*"; -for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN); - -} -return s; -}, "~S,~A,~N,~N,~N,~N"); -c$.dumpIntArray = Clazz.defineMethod (c$, "dumpIntArray", -function (A, n) { -var str = ""; -for (var i = 0; i < n; i++) str += " " + A[i]; - -return str; -}, "~A,~N"); -c$.sortedItem = Clazz.defineMethod (c$, "sortedItem", -function (v, n) { -if (v.size () == 0) return null; -if (v.size () == 1) return v.get (0); -var keys = v.toArray ( new Array (v.size ())); -java.util.Arrays.sort (keys); -return keys[n % keys.length]; -}, "javajs.util.Lst,~N"); -c$.createArrayOfArrayList = Clazz.defineMethod (c$, "createArrayOfArrayList", -function (size) { -return new Array (size); -}, "~N"); -c$.createArrayOfHashtable = Clazz.defineMethod (c$, "createArrayOfHashtable", -function (size) { -return new Array (size); -}, "~N"); -c$.swap = Clazz.defineMethod (c$, "swap", -function (o, i, j) { -var oi = o[i]; -o[i] = o[j]; -o[j] = oi; -}, "~A,~N,~N"); -c$.newFloat2 = Clazz.defineMethod (c$, "newFloat2", -function (n) { -{ -return Clazz.newArray(n, null); -}}, "~N"); -c$.newInt2 = Clazz.defineMethod (c$, "newInt2", -function (n) { -{ -return Clazz.newArray(n, null); -}}, "~N"); -c$.newInt3 = Clazz.defineMethod (c$, "newInt3", -function (nx, ny) { -{ -return Clazz.newArray(nx, null); -}}, "~N,~N"); -c$.newFloat3 = Clazz.defineMethod (c$, "newFloat3", -function (nx, ny) { -{ -return Clazz.newArray(nx, null); -}}, "~N,~N"); -c$.newInt4 = Clazz.defineMethod (c$, "newInt4", -function (n) { -{ -return Clazz.newArray(n, null); -}}, "~N"); -c$.newShort2 = Clazz.defineMethod (c$, "newShort2", -function (n) { -{ -return Clazz.newArray(n, null); -}}, "~N"); -c$.newByte2 = Clazz.defineMethod (c$, "newByte2", -function (n) { -{ -return Clazz.newArray(n, null); -}}, "~N"); -c$.newDouble2 = Clazz.defineMethod (c$, "newDouble2", -function (n) { -{ -return Clazz.newArray(n, null); -}}, "~N"); -c$.removeMapKeys = Clazz.defineMethod (c$, "removeMapKeys", -function (map, root) { -var list = new javajs.util.Lst (); -for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key); - -for (var i = list.size (); --i >= 0; ) map.remove (list.get (i)); - -return list.size (); -}, "java.util.Map,~S"); -c$.isAS = Clazz.defineMethod (c$, "isAS", -function (x) { -{ -return Clazz.isAS(x); -}}, "~O"); -c$.isASS = Clazz.defineMethod (c$, "isASS", -function (x) { -{ -return Clazz.isASS(x); -}}, "~O"); -c$.isAP = Clazz.defineMethod (c$, "isAP", -function (x) { -{ -return Clazz.isAP(x); -}}, "~O"); -c$.isAF = Clazz.defineMethod (c$, "isAF", -function (x) { -{ -return Clazz.isAF(x); -}}, "~O"); -c$.isAFloat = Clazz.defineMethod (c$, "isAFloat", -function (x) { -{ -return Clazz.isAFloat(x); -}}, "~O"); -c$.isAD = Clazz.defineMethod (c$, "isAD", -function (x) { -{ -return Clazz.isAF(x); -}}, "~O"); -c$.isADD = Clazz.defineMethod (c$, "isADD", -function (x) { -{ -return Clazz.isAFF(x); -}}, "~O"); -c$.isAB = Clazz.defineMethod (c$, "isAB", -function (x) { -{ -return Clazz.isAI(x); -}}, "~O"); -c$.isAI = Clazz.defineMethod (c$, "isAI", -function (x) { -{ -return Clazz.isAI(x); -}}, "~O"); -c$.isAII = Clazz.defineMethod (c$, "isAII", -function (x) { -{ -return Clazz.isAII(x); -}}, "~O"); -c$.isAFF = Clazz.defineMethod (c$, "isAFF", -function (x) { -{ -return Clazz.isAFF(x); -}}, "~O"); -c$.isAFFF = Clazz.defineMethod (c$, "isAFFF", -function (x) { -{ -return Clazz.isAFFF(x); -}}, "~O"); -c$.ensureSignedBytes = Clazz.defineMethod (c$, "ensureSignedBytes", -function (b) { -{ -for (var i = b.length; --i >= 0;) { -var j = b[i] & 0xFF; -if (j >= 0x80) j -= 0x100; -b[i] = j; -} -}}, "~A"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (null, "javajs.util.AU", ["java.util.Arrays", "javajs.util.Lst"], function () { +c$ = Clazz.declareType (javajs.util, "AU"); +c$.ensureLength = Clazz.defineMethod (c$, "ensureLength", +function (array, minimumLength) { +if (array != null && javajs.util.AU.getLength (array) >= minimumLength) return array; +return javajs.util.AU.arrayCopyObject (array, minimumLength); +}, "~O,~N"); +c$.ensureLengthS = Clazz.defineMethod (c$, "ensureLengthS", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return javajs.util.AU.arrayCopyS (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthA = Clazz.defineMethod (c$, "ensureLengthA", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return javajs.util.AU.arrayCopyF (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthI = Clazz.defineMethod (c$, "ensureLengthI", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return javajs.util.AU.arrayCopyI (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthShort = Clazz.defineMethod (c$, "ensureLengthShort", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return javajs.util.AU.arrayCopyShort (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthByte = Clazz.defineMethod (c$, "ensureLengthByte", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return javajs.util.AU.arrayCopyByte (array, minimumLength); +}, "~A,~N"); +c$.doubleLength = Clazz.defineMethod (c$, "doubleLength", +function (array) { +return javajs.util.AU.arrayCopyObject (array, (array == null ? 16 : 2 * javajs.util.AU.getLength (array))); +}, "~O"); +c$.doubleLengthS = Clazz.defineMethod (c$, "doubleLengthS", +function (array) { +return javajs.util.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthF = Clazz.defineMethod (c$, "doubleLengthF", +function (array) { +return javajs.util.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthI = Clazz.defineMethod (c$, "doubleLengthI", +function (array) { +return javajs.util.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthShort = Clazz.defineMethod (c$, "doubleLengthShort", +function (array) { +return javajs.util.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthByte = Clazz.defineMethod (c$, "doubleLengthByte", +function (array) { +return javajs.util.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthBool = Clazz.defineMethod (c$, "doubleLengthBool", +function (array) { +return javajs.util.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.deleteElements = Clazz.defineMethod (c$, "deleteElements", +function (array, firstElement, nElements) { +if (nElements == 0 || array == null) return array; +var oldLength = javajs.util.AU.getLength (array); +if (firstElement >= oldLength) return array; +var n = oldLength - (firstElement + nElements); +if (n < 0) n = 0; +var t = javajs.util.AU.newInstanceO (array, firstElement + n); +if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement); +if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n); +return t; +}, "~O,~N,~N"); +c$.arrayCopyObject = Clazz.defineMethod (c$, "arrayCopyObject", +function (array, newLength) { +if (array == null) { +return null; +}var oldLength = javajs.util.AU.getLength (array); +if (newLength == oldLength) return array; +var t = javajs.util.AU.newInstanceO (array, newLength); +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +return t; +}, "~O,~N"); +c$.newInstanceO = Clazz.defineMethod (c$, "newInstanceO", +($fz = function (array, n) { +{ +if (!array.getClass().getComponentType) +return new Array(n); +}}, $fz.isPrivate = true, $fz), "~O,~N"); +c$.getLength = Clazz.defineMethod (c$, "getLength", +function (array) { +{ +return array.length +}}, "~O"); +c$.arrayCopyS = Clazz.defineMethod (c$, "arrayCopyS", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = new Array (newLength); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyII = Clazz.defineMethod (c$, "arrayCopyII", +function (array, newLength) { +var t = javajs.util.AU.newInt2 (newLength); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyPt = Clazz.defineMethod (c$, "arrayCopyPt", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = new Array (newLength); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyF = Clazz.defineMethod (c$, "arrayCopyF", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz.newFloatArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyI = Clazz.defineMethod (c$, "arrayCopyI", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz.newIntArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyRangeI = Clazz.defineMethod (c$, "arrayCopyRangeI", +function (array, i0, n) { +if (array == null) return null; +var oldLength = array.length; +if (n == -1) n = oldLength; +if (n == -2) n = Clazz.doubleToInt (oldLength / 2); +n = n - i0; +var t = Clazz.newIntArray (n, 0); +System.arraycopy (array, i0, t, 0, n); +return t; +}, "~A,~N,~N"); +c$.arrayCopyRangeRevI = Clazz.defineMethod (c$, "arrayCopyRangeRevI", +function (array, i0, n) { +if (array == null) return null; +var t = javajs.util.AU.arrayCopyRangeI (array, i0, n); +if (n < 0) n = array.length; +for (var i = Clazz.doubleToInt (n / 2); --i >= 0; ) javajs.util.AU.swapInt (t, i, n - 1 - i); + +return t; +}, "~A,~N,~N"); +c$.arrayCopyShort = Clazz.defineMethod (c$, "arrayCopyShort", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz.newShortArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyByte = Clazz.defineMethod (c$, "arrayCopyByte", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz.newByteArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyBool = Clazz.defineMethod (c$, "arrayCopyBool", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz.newBooleanArray (newLength, false); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.swapInt = Clazz.defineMethod (c$, "swapInt", +function (array, indexA, indexB) { +var t = array[indexA]; +array[indexA] = array[indexB]; +array[indexB] = t; +}, "~A,~N,~N"); +c$.dumpArray = Clazz.defineMethod (c$, "dumpArray", +function (msg, A, x1, x2, y1, y2) { +var s = "dumpArray: " + msg + "\n"; +for (var x = x1; x <= x2; x++) s += "\t*" + x + "*"; + +for (var y = y2; y >= y1; y--) { +s += "\n*" + y + "*"; +for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN); + +} +return s; +}, "~S,~A,~N,~N,~N,~N"); +c$.dumpIntArray = Clazz.defineMethod (c$, "dumpIntArray", +function (A, n) { +var str = ""; +for (var i = 0; i < n; i++) str += " " + A[i]; + +return str; +}, "~A,~N"); +c$.sortedItem = Clazz.defineMethod (c$, "sortedItem", +function (v, n) { +if (v.size () == 0) return null; +if (v.size () == 1) return v.get (0); +var keys = v.toArray ( new Array (v.size ())); +java.util.Arrays.sort (keys); +return keys[n % keys.length]; +}, "javajs.util.Lst,~N"); +c$.createArrayOfArrayList = Clazz.defineMethod (c$, "createArrayOfArrayList", +function (size) { +return new Array (size); +}, "~N"); +c$.createArrayOfHashtable = Clazz.defineMethod (c$, "createArrayOfHashtable", +function (size) { +return new Array (size); +}, "~N"); +c$.swap = Clazz.defineMethod (c$, "swap", +function (o, i, j) { +var oi = o[i]; +o[i] = o[j]; +o[j] = oi; +}, "~A,~N,~N"); +c$.newFloat2 = Clazz.defineMethod (c$, "newFloat2", +function (n) { +{ +return Clazz.newArray(n, null); +}}, "~N"); +c$.newInt2 = Clazz.defineMethod (c$, "newInt2", +function (n) { +{ +return Clazz.newArray(n, null); +}}, "~N"); +c$.newInt3 = Clazz.defineMethod (c$, "newInt3", +function (nx, ny) { +{ +return Clazz.newArray(nx, null); +}}, "~N,~N"); +c$.newFloat3 = Clazz.defineMethod (c$, "newFloat3", +function (nx, ny) { +{ +return Clazz.newArray(nx, null); +}}, "~N,~N"); +c$.newInt4 = Clazz.defineMethod (c$, "newInt4", +function (n) { +{ +return Clazz.newArray(n, null); +}}, "~N"); +c$.newShort2 = Clazz.defineMethod (c$, "newShort2", +function (n) { +{ +return Clazz.newArray(n, null); +}}, "~N"); +c$.newByte2 = Clazz.defineMethod (c$, "newByte2", +function (n) { +{ +return Clazz.newArray(n, null); +}}, "~N"); +c$.newDouble2 = Clazz.defineMethod (c$, "newDouble2", +function (n) { +{ +return Clazz.newArray(n, null); +}}, "~N"); +c$.removeMapKeys = Clazz.defineMethod (c$, "removeMapKeys", +function (map, root) { +var list = new javajs.util.Lst (); +for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key); + +for (var i = list.size (); --i >= 0; ) map.remove (list.get (i)); + +return list.size (); +}, "java.util.Map,~S"); +c$.isAS = Clazz.defineMethod (c$, "isAS", +function (x) { +{ +return Clazz.isAS(x); +}}, "~O"); +c$.isASS = Clazz.defineMethod (c$, "isASS", +function (x) { +{ +return Clazz.isASS(x); +}}, "~O"); +c$.isAP = Clazz.defineMethod (c$, "isAP", +function (x) { +{ +return Clazz.isAP(x); +}}, "~O"); +c$.isAF = Clazz.defineMethod (c$, "isAF", +function (x) { +{ +return Clazz.isAF(x); +}}, "~O"); +c$.isAFloat = Clazz.defineMethod (c$, "isAFloat", +function (x) { +{ +return Clazz.isAFloat(x); +}}, "~O"); +c$.isAD = Clazz.defineMethod (c$, "isAD", +function (x) { +{ +return Clazz.isAF(x); +}}, "~O"); +c$.isADD = Clazz.defineMethod (c$, "isADD", +function (x) { +{ +return Clazz.isAFF(x); +}}, "~O"); +c$.isAB = Clazz.defineMethod (c$, "isAB", +function (x) { +{ +return Clazz.isAI(x); +}}, "~O"); +c$.isAI = Clazz.defineMethod (c$, "isAI", +function (x) { +{ +return Clazz.isAI(x); +}}, "~O"); +c$.isAII = Clazz.defineMethod (c$, "isAII", +function (x) { +{ +return Clazz.isAII(x); +}}, "~O"); +c$.isAFF = Clazz.defineMethod (c$, "isAFF", +function (x) { +{ +return Clazz.isAFF(x); +}}, "~O"); +c$.isAFFF = Clazz.defineMethod (c$, "isAFFF", +function (x) { +{ +return Clazz.isAFFF(x); +}}, "~O"); +c$.ensureSignedBytes = Clazz.defineMethod (c$, "ensureSignedBytes", +function (b) { +{ +for (var i = b.length; --i >= 0;) { +var j = b[i] & 0xFF; +if (j >= 0x80) j -= 0x100; +b[i] = j; +} +}}, "~A"); +}); diff --git a/bin/javajs/util/AjaxURLConnection.js b/bin/javajs/util/AjaxURLConnection.js index 41e35ef..50f227d 100644 --- a/bin/javajs/util/AjaxURLConnection.js +++ b/bin/javajs/util/AjaxURLConnection.js @@ -1,39 +1,39 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.net.URLConnection"], "javajs.util.AjaxURLConnection", ["javajs.util.AU", "$.Rdr", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.bytesOut = null; -this.postOut = ""; -Clazz.instantialize (this, arguments); -}, javajs.util, "AjaxURLConnection", java.net.URLConnection); -Clazz.defineMethod (c$, "doAjax", -($fz = function () { -var jmol = null; -{ -jmol = Jmol; -}return jmol._doAjax (this.url, this.postOut, this.bytesOut); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "connect", -function () { -}); -Clazz.defineMethod (c$, "outputBytes", -function (bytes) { -this.bytesOut = bytes; -}, "~A"); -Clazz.defineMethod (c$, "outputString", -function (post) { -this.postOut = post; -}, "~S"); -Clazz.overrideMethod (c$, "getInputStream", -function () { -var is = null; -var o = this.doAjax (); -if (javajs.util.AU.isAB (o)) is = javajs.util.Rdr.getBIS (o); - else if (Clazz.instanceOf (o, javajs.util.SB)) is = javajs.util.Rdr.getBIS (javajs.util.Rdr.getBytesFromSB (o)); - else if (Clazz.instanceOf (o, String)) is = javajs.util.Rdr.getBIS ((o).getBytes ()); -return is; -}); -Clazz.defineMethod (c$, "getContents", -function () { -return this.doAjax (); -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.net.URLConnection"], "javajs.util.AjaxURLConnection", ["javajs.util.AU", "$.Rdr", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.bytesOut = null; +this.postOut = ""; +Clazz.instantialize (this, arguments); +}, javajs.util, "AjaxURLConnection", java.net.URLConnection); +Clazz.defineMethod (c$, "doAjax", +($fz = function () { +var jmol = null; +{ +jmol = Jmol; +}return jmol._doAjax (this.url, this.postOut, this.bytesOut); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "connect", +function () { +}); +Clazz.defineMethod (c$, "outputBytes", +function (bytes) { +this.bytesOut = bytes; +}, "~A"); +Clazz.defineMethod (c$, "outputString", +function (post) { +this.postOut = post; +}, "~S"); +Clazz.overrideMethod (c$, "getInputStream", +function () { +var is = null; +var o = this.doAjax (); +if (javajs.util.AU.isAB (o)) is = javajs.util.Rdr.getBIS (o); + else if (Clazz.instanceOf (o, javajs.util.SB)) is = javajs.util.Rdr.getBIS (javajs.util.Rdr.getBytesFromSB (o)); + else if (Clazz.instanceOf (o, String)) is = javajs.util.Rdr.getBIS ((o).getBytes ()); +return is; +}); +Clazz.defineMethod (c$, "getContents", +function () { +return this.doAjax (); +}); +}); diff --git a/bin/javajs/util/AjaxURLStreamHandler.js b/bin/javajs/util/AjaxURLStreamHandler.js index 600c417..59628d6 100644 --- a/bin/javajs/util/AjaxURLStreamHandler.js +++ b/bin/javajs/util/AjaxURLStreamHandler.js @@ -1,34 +1,34 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.net.URLStreamHandler"], "javajs.util.AjaxURLStreamHandler", ["javajs.util.AjaxURLConnection", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.protocol = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "AjaxURLStreamHandler", java.net.URLStreamHandler); -Clazz.makeConstructor (c$, -function (protocol) { -Clazz.superConstructor (this, javajs.util.AjaxURLStreamHandler, []); -this.protocol = protocol; -}, "~S"); -Clazz.defineMethod (c$, "openConnection", -function (url) { -return new javajs.util.AjaxURLConnection (url); -}, "java.net.URL"); -Clazz.overrideMethod (c$, "toExternalForm", -function (u) { -var result = new javajs.util.SB (); -result.append (u.getProtocol ()); -result.append (":"); -if (u.getAuthority () != null && u.getAuthority ().length > 0) { -result.append ("//"); -result.append (u.getAuthority ()); -}if (u.getPath () != null) { -result.append (u.getPath ()); -}if (u.getQuery () != null) { -result.append ("?"); -result.append (u.getQuery ()); -}if (u.getRef () != null) { -result.append ("#"); -result.append (u.getRef ()); -}return result.toString (); -}, "java.net.URL"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.net.URLStreamHandler"], "javajs.util.AjaxURLStreamHandler", ["javajs.util.AjaxURLConnection", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.protocol = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "AjaxURLStreamHandler", java.net.URLStreamHandler); +Clazz.makeConstructor (c$, +function (protocol) { +Clazz.superConstructor (this, javajs.util.AjaxURLStreamHandler, []); +this.protocol = protocol; +}, "~S"); +Clazz.defineMethod (c$, "openConnection", +function (url) { +return new javajs.util.AjaxURLConnection (url); +}, "java.net.URL"); +Clazz.overrideMethod (c$, "toExternalForm", +function (u) { +var result = new javajs.util.SB (); +result.append (u.getProtocol ()); +result.append (":"); +if (u.getAuthority () != null && u.getAuthority ().length > 0) { +result.append ("//"); +result.append (u.getAuthority ()); +}if (u.getPath () != null) { +result.append (u.getPath ()); +}if (u.getQuery () != null) { +result.append ("?"); +result.append (u.getQuery ()); +}if (u.getRef () != null) { +result.append ("#"); +result.append (u.getRef ()); +}return result.toString (); +}, "java.net.URL"); +}); diff --git a/bin/javajs/util/AjaxURLStreamHandlerFactory.js b/bin/javajs/util/AjaxURLStreamHandlerFactory.js index 88452ce..e51bb4e 100644 --- a/bin/javajs/util/AjaxURLStreamHandlerFactory.js +++ b/bin/javajs/util/AjaxURLStreamHandlerFactory.js @@ -1,16 +1,16 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.net.URLStreamHandlerFactory", "java.util.Hashtable"], "javajs.util.AjaxURLStreamHandlerFactory", ["javajs.util.AjaxURLStreamHandler"], function () { -c$ = Clazz.decorateAsClass (function () { -this.htFactories = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "AjaxURLStreamHandlerFactory", null, java.net.URLStreamHandlerFactory); -Clazz.prepareFields (c$, function () { -this.htFactories = new java.util.Hashtable (); -}); -Clazz.overrideMethod (c$, "createURLStreamHandler", -function (protocol) { -var fac = this.htFactories.get (protocol); -if (fac == null) this.htFactories.put (protocol, fac = new javajs.util.AjaxURLStreamHandler (protocol)); -return (fac.protocol == null ? null : fac); -}, "~S"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.net.URLStreamHandlerFactory", "java.util.Hashtable"], "javajs.util.AjaxURLStreamHandlerFactory", ["javajs.util.AjaxURLStreamHandler"], function () { +c$ = Clazz.decorateAsClass (function () { +this.htFactories = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "AjaxURLStreamHandlerFactory", null, java.net.URLStreamHandlerFactory); +Clazz.prepareFields (c$, function () { +this.htFactories = new java.util.Hashtable (); +}); +Clazz.overrideMethod (c$, "createURLStreamHandler", +function (protocol) { +var fac = this.htFactories.get (protocol); +if (fac == null) this.htFactories.put (protocol, fac = new javajs.util.AjaxURLStreamHandler (protocol)); +return (fac.protocol == null ? null : fac); +}, "~S"); +}); diff --git a/bin/javajs/util/ArrayDataReader.js b/bin/javajs/util/ArrayDataReader.js index 89f64c3..532e8a9 100644 --- a/bin/javajs/util/ArrayDataReader.js +++ b/bin/javajs/util/ArrayDataReader.js @@ -1,31 +1,31 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.DataReader"], "javajs.util.ArrayDataReader", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.data = null; -this.pt = 0; -this.len = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "ArrayDataReader", javajs.util.DataReader); -Clazz.overrideMethod (c$, "setData", -function (data) { -this.data = data; -this.len = this.data.length; -return this; -}, "~O"); -Clazz.defineMethod (c$, "read", -function (buf, off, len) { -return this.readBuf (buf, off, len); -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "readLine", -function () { -return (this.pt < this.len ? this.data[this.pt++] : null); -}); -Clazz.defineMethod (c$, "mark", -function (ptr) { -this.ptMark = this.pt; -}, "~N"); -Clazz.overrideMethod (c$, "reset", -function () { -this.pt = this.ptMark; -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.DataReader"], "javajs.util.ArrayDataReader", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.data = null; +this.pt = 0; +this.len = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "ArrayDataReader", javajs.util.DataReader); +Clazz.overrideMethod (c$, "setData", +function (data) { +this.data = data; +this.len = this.data.length; +return this; +}, "~O"); +Clazz.defineMethod (c$, "read", +function (buf, off, len) { +return this.readBuf (buf, off, len); +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "readLine", +function () { +return (this.pt < this.len ? this.data[this.pt++] : null); +}); +Clazz.defineMethod (c$, "mark", +function (ptr) { +this.ptMark = this.pt; +}, "~N"); +Clazz.overrideMethod (c$, "reset", +function () { +this.pt = this.ptMark; +}); +}); diff --git a/bin/javajs/util/BArray.js b/bin/javajs/util/BArray.js index 33ba55d..866e432 100644 --- a/bin/javajs/util/BArray.js +++ b/bin/javajs/util/BArray.js @@ -1,27 +1,27 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.data = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "BArray"); -Clazz.makeConstructor (c$, -function (data) { -this.data = data; -}, "~A"); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (Clazz.instanceOf (o, javajs.util.BArray)) { -var d = (o).data; -if (d.length == this.data.length) { -for (var i = 0; i < d.length; i++) if (d[i] != this.data[i]) return false; - -return true; -}}return false; -}, "~O"); -Clazz.defineMethod (c$, "hashCode", -function () { -return this.data.hashCode (); -}); -Clazz.overrideMethod (c$, "toString", -function () { -return String.instantialize (this.data); -}); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.data = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "BArray"); +Clazz.makeConstructor (c$, +function (data) { +this.data = data; +}, "~A"); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (Clazz.instanceOf (o, javajs.util.BArray)) { +var d = (o).data; +if (d.length == this.data.length) { +for (var i = 0; i < d.length; i++) if (d[i] != this.data[i]) return false; + +return true; +}}return false; +}, "~O"); +Clazz.defineMethod (c$, "hashCode", +function () { +return this.data.hashCode (); +}); +Clazz.overrideMethod (c$, "toString", +function () { +return String.instantialize (this.data); +}); diff --git a/bin/javajs/util/BC.js b/bin/javajs/util/BC.js index ec20ff4..cc5ed5a 100644 --- a/bin/javajs/util/BC.js +++ b/bin/javajs/util/BC.js @@ -1,65 +1,65 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.declareType (javajs.util, "BC"); -Clazz.makeConstructor (c$, -function () { -}); -c$.bytesToFloat = Clazz.defineMethod (c$, "bytesToFloat", -function (bytes, j, isBigEndian) { -return javajs.util.BC.intToFloat (javajs.util.BC.bytesToInt (bytes, j, isBigEndian)); -}, "~A,~N,~B"); -c$.bytesToInt = Clazz.defineMethod (c$, "bytesToInt", -function (bytes, j, isBigEndian) { -var n = (isBigEndian ? (bytes[j + 3] & 0xff) | (bytes[j + 2] & 0xff) << 8 | (bytes[j + 1] & 0xff) << 16 | (bytes[j] & 0xff) << 24 : (bytes[j++] & 0xff) | (bytes[j++] & 0xff) << 8 | (bytes[j++] & 0xff) << 16 | (bytes[j++] & 0xff) << 24); -{ -return (n > 0x7FFFFFFF ? n - 0x100000000 : n); -}}, "~A,~N,~B"); -c$.intToFloat = Clazz.defineMethod (c$, "intToFloat", -function (x) { -{ -if (x == 0) return 0; -var o = javajs.util.BC; -if (o.fracIEEE == null) -o.setFracIEEE(); -var m = ((x & 0x7F800000) >> 23); -return ((x & 0x80000000) == 0 ? 1 : -1) * o.shiftIEEE((x & 0x7FFFFF) | 0x800000, m - 149); -}}, "~N"); -c$.bytesToDoubleToFloat = Clazz.defineMethod (c$, "bytesToDoubleToFloat", -function (bytes, j, isBigEndian) { -{ -if (javajs.util.BC.fracIEEE == null) javajs.util.BC.setFracIEEE (); -{ -var o = javajs.util.BC; -var b1, b2, b3, b4, b5; -if (isBigEndian) { -b1 = bytes[j] & 0xFF; -b2 = bytes[j + 1] & 0xFF; -b3 = bytes[j + 2] & 0xFF; -b4 = bytes[j + 3] & 0xFF; -b5 = bytes[j + 4] & 0xFF; -} else { -b1 = bytes[j + 7] & 0xFF; -b2 = bytes[j + 6] & 0xFF; -b3 = bytes[j + 5] & 0xFF; -b4 = bytes[j + 4] & 0xFF; -b5 = bytes[j + 3] & 0xFF; -} -var s = ((b1 & 0x80) == 0 ? 1 : -1); -var e = (((b1 & 0x7F) << 4) | (b2 >> 4)) - 1026; -b2 = (b2 & 0xF) | 0x10; -return s * (o.shiftIEEE(b2, e) + o.shiftIEEE(b3, e - 8) + o.shiftIEEE(b4, e - 16) -+ o.shiftIEEE(b5, e - 24)); -}}}, "~A,~N,~B"); -c$.setFracIEEE = Clazz.defineMethod (c$, "setFracIEEE", -($fz = function () { -javajs.util.BC.fracIEEE = Clazz.newFloatArray (270, 0); -for (var i = 0; i < 270; i++) javajs.util.BC.fracIEEE[i] = Math.pow (2, i - 141); - -}, $fz.isPrivate = true, $fz)); -c$.shiftIEEE = Clazz.defineMethod (c$, "shiftIEEE", -function (f, i) { -if (f == 0 || i < -140) return 0; -if (i > 128) return 3.4028235E38; -return f * javajs.util.BC.fracIEEE[i + 140]; -}, "~N,~N"); -Clazz.defineStatics (c$, -"fracIEEE", null); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.declareType (javajs.util, "BC"); +Clazz.makeConstructor (c$, +function () { +}); +c$.bytesToFloat = Clazz.defineMethod (c$, "bytesToFloat", +function (bytes, j, isBigEndian) { +return javajs.util.BC.intToFloat (javajs.util.BC.bytesToInt (bytes, j, isBigEndian)); +}, "~A,~N,~B"); +c$.bytesToInt = Clazz.defineMethod (c$, "bytesToInt", +function (bytes, j, isBigEndian) { +var n = (isBigEndian ? (bytes[j + 3] & 0xff) | (bytes[j + 2] & 0xff) << 8 | (bytes[j + 1] & 0xff) << 16 | (bytes[j] & 0xff) << 24 : (bytes[j++] & 0xff) | (bytes[j++] & 0xff) << 8 | (bytes[j++] & 0xff) << 16 | (bytes[j++] & 0xff) << 24); +{ +return (n > 0x7FFFFFFF ? n - 0x100000000 : n); +}}, "~A,~N,~B"); +c$.intToFloat = Clazz.defineMethod (c$, "intToFloat", +function (x) { +{ +if (x == 0) return 0; +var o = javajs.util.BC; +if (o.fracIEEE == null) +o.setFracIEEE(); +var m = ((x & 0x7F800000) >> 23); +return ((x & 0x80000000) == 0 ? 1 : -1) * o.shiftIEEE((x & 0x7FFFFF) | 0x800000, m - 149); +}}, "~N"); +c$.bytesToDoubleToFloat = Clazz.defineMethod (c$, "bytesToDoubleToFloat", +function (bytes, j, isBigEndian) { +{ +if (javajs.util.BC.fracIEEE == null) javajs.util.BC.setFracIEEE (); +{ +var o = javajs.util.BC; +var b1, b2, b3, b4, b5; +if (isBigEndian) { +b1 = bytes[j] & 0xFF; +b2 = bytes[j + 1] & 0xFF; +b3 = bytes[j + 2] & 0xFF; +b4 = bytes[j + 3] & 0xFF; +b5 = bytes[j + 4] & 0xFF; +} else { +b1 = bytes[j + 7] & 0xFF; +b2 = bytes[j + 6] & 0xFF; +b3 = bytes[j + 5] & 0xFF; +b4 = bytes[j + 4] & 0xFF; +b5 = bytes[j + 3] & 0xFF; +} +var s = ((b1 & 0x80) == 0 ? 1 : -1); +var e = (((b1 & 0x7F) << 4) | (b2 >> 4)) - 1026; +b2 = (b2 & 0xF) | 0x10; +return s * (o.shiftIEEE(b2, e) + o.shiftIEEE(b3, e - 8) + o.shiftIEEE(b4, e - 16) ++ o.shiftIEEE(b5, e - 24)); +}}}, "~A,~N,~B"); +c$.setFracIEEE = Clazz.defineMethod (c$, "setFracIEEE", +($fz = function () { +javajs.util.BC.fracIEEE = Clazz.newFloatArray (270, 0); +for (var i = 0; i < 270; i++) javajs.util.BC.fracIEEE[i] = Math.pow (2, i - 141); + +}, $fz.isPrivate = true, $fz)); +c$.shiftIEEE = Clazz.defineMethod (c$, "shiftIEEE", +function (f, i) { +if (f == 0 || i < -140) return 0; +if (i > 128) return 3.4028235E38; +return f * javajs.util.BC.fracIEEE[i + 140]; +}, "~N,~N"); +Clazz.defineStatics (c$, +"fracIEEE", null); diff --git a/bin/javajs/util/BS.js b/bin/javajs/util/BS.js index bc34911..5677631 100644 --- a/bin/javajs/util/BS.js +++ b/bin/javajs/util/BS.js @@ -1,357 +1,357 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.api.JSONEncodable"], "javajs.util.BS", ["java.lang.IndexOutOfBoundsException", "$.NegativeArraySizeException", "javajs.util.PT", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.words = null; -this.wordsInUse = 0; -this.sizeIsSticky = false; -Clazz.instantialize (this, arguments); -}, javajs.util, "BS", null, [Cloneable, javajs.api.JSONEncodable]); -c$.wordIndex = Clazz.defineMethod (c$, "wordIndex", -($fz = function (bitIndex) { -return bitIndex >> 5; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "recalculateWordsInUse", -($fz = function () { -var i; -for (i = this.wordsInUse - 1; i >= 0; i--) if (this.words[i] != 0) break; - -this.wordsInUse = i + 1; -}, $fz.isPrivate = true, $fz)); -Clazz.makeConstructor (c$, -function () { -this.initWords (32); -this.sizeIsSticky = false; -}); -c$.newN = Clazz.defineMethod (c$, "newN", -function (nbits) { -var bs = new javajs.util.BS (); -bs.init (nbits); -return bs; -}, "~N"); -Clazz.defineMethod (c$, "init", -($fz = function (nbits) { -if (nbits < 0) throw new NegativeArraySizeException ("nbits < 0: " + nbits); -this.initWords (nbits); -this.sizeIsSticky = true; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "initWords", -($fz = function (nbits) { -this.words = Clazz.newIntArray (javajs.util.BS.wordIndex (nbits - 1) + 1, 0); -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "ensureCapacity", -($fz = function (wordsRequired) { -if (this.words.length < wordsRequired) { -var request = Math.max (2 * this.words.length, wordsRequired); -this.setLength (request); -this.sizeIsSticky = false; -}}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "expandTo", -($fz = function (wordIndex) { -var wordsRequired = wordIndex + 1; -if (this.wordsInUse < wordsRequired) { -this.ensureCapacity (wordsRequired); -this.wordsInUse = wordsRequired; -}}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "set", -function (bitIndex) { -if (bitIndex < 0) throw new IndexOutOfBoundsException ("bitIndex < 0: " + bitIndex); -var wordIndex = javajs.util.BS.wordIndex (bitIndex); -this.expandTo (wordIndex); -this.words[wordIndex] |= (1 << bitIndex); -}, "~N"); -Clazz.defineMethod (c$, "setBitTo", -function (bitIndex, value) { -if (value) this.set (bitIndex); - else this.clear (bitIndex); -}, "~N,~B"); -Clazz.defineMethod (c$, "setBits", -function (fromIndex, toIndex) { -if (fromIndex == toIndex) return; -var startWordIndex = javajs.util.BS.wordIndex (fromIndex); -var endWordIndex = javajs.util.BS.wordIndex (toIndex - 1); -this.expandTo (endWordIndex); -var firstWordMask = -1 << fromIndex; -var lastWordMask = -1 >>> -toIndex; -if (startWordIndex == endWordIndex) { -this.words[startWordIndex] |= (firstWordMask & lastWordMask); -} else { -this.words[startWordIndex] |= firstWordMask; -for (var i = startWordIndex + 1; i < endWordIndex; i++) this.words[i] = -1; - -this.words[endWordIndex] |= lastWordMask; -}}, "~N,~N"); -Clazz.defineMethod (c$, "clear", -function (bitIndex) { -if (bitIndex < 0) throw new IndexOutOfBoundsException ("bitIndex < 0: " + bitIndex); -var wordIndex = javajs.util.BS.wordIndex (bitIndex); -if (wordIndex >= this.wordsInUse) return; -this.words[wordIndex] &= ~(1 << bitIndex); -this.recalculateWordsInUse (); -}, "~N"); -Clazz.defineMethod (c$, "clearBits", -function (fromIndex, toIndex) { -if (fromIndex == toIndex) return; -var startWordIndex = javajs.util.BS.wordIndex (fromIndex); -if (startWordIndex >= this.wordsInUse) return; -var endWordIndex = javajs.util.BS.wordIndex (toIndex - 1); -if (endWordIndex >= this.wordsInUse) { -toIndex = this.length (); -endWordIndex = this.wordsInUse - 1; -}var firstWordMask = -1 << fromIndex; -var lastWordMask = -1 >>> -toIndex; -if (startWordIndex == endWordIndex) { -this.words[startWordIndex] &= ~(firstWordMask & lastWordMask); -} else { -this.words[startWordIndex] &= ~firstWordMask; -for (var i = startWordIndex + 1; i < endWordIndex; i++) this.words[i] = 0; - -this.words[endWordIndex] &= ~lastWordMask; -}this.recalculateWordsInUse (); -}, "~N,~N"); -Clazz.defineMethod (c$, "clearAll", -function () { -while (this.wordsInUse > 0) this.words[--this.wordsInUse] = 0; - -}); -Clazz.defineMethod (c$, "get", -function (bitIndex) { -if (bitIndex < 0) throw new IndexOutOfBoundsException ("bitIndex < 0: " + bitIndex); -var wordIndex = javajs.util.BS.wordIndex (bitIndex); -return (wordIndex < this.wordsInUse) && ((this.words[wordIndex] & (1 << bitIndex)) != 0); -}, "~N"); -Clazz.defineMethod (c$, "nextSetBit", -function (fromIndex) { -if (fromIndex < 0) throw new IndexOutOfBoundsException ("fromIndex < 0: " + fromIndex); -var u = javajs.util.BS.wordIndex (fromIndex); -if (u >= this.wordsInUse) return -1; -var word = this.words[u] & (-1 << fromIndex); -while (true) { -if (word != 0) return (u * 32) + Integer.numberOfTrailingZeros (word); -if (++u == this.wordsInUse) return -1; -word = this.words[u]; -} -}, "~N"); -Clazz.defineMethod (c$, "nextClearBit", -function (fromIndex) { -if (fromIndex < 0) throw new IndexOutOfBoundsException ("fromIndex < 0: " + fromIndex); -var u = javajs.util.BS.wordIndex (fromIndex); -if (u >= this.wordsInUse) return fromIndex; -var word = ~this.words[u] & (-1 << fromIndex); -while (true) { -if (word != 0) return (u * 32) + Integer.numberOfTrailingZeros (word); -if (++u == this.wordsInUse) return this.wordsInUse * 32; -word = ~this.words[u]; -} -}, "~N"); -Clazz.defineMethod (c$, "length", -function () { -if (this.wordsInUse == 0) return 0; -return 32 * (this.wordsInUse - 1) + (32 - Integer.numberOfLeadingZeros (this.words[this.wordsInUse - 1])); -}); -Clazz.defineMethod (c$, "isEmpty", -function () { -return this.wordsInUse == 0; -}); -Clazz.defineMethod (c$, "intersects", -function (set) { -for (var i = Math.min (this.wordsInUse, set.wordsInUse) - 1; i >= 0; i--) if ((this.words[i] & set.words[i]) != 0) return true; - -return false; -}, "javajs.util.BS"); -Clazz.defineMethod (c$, "cardinality", -function () { -var sum = 0; -for (var i = 0; i < this.wordsInUse; i++) sum += Integer.bitCount (this.words[i]); - -return sum; -}); -Clazz.defineMethod (c$, "and", -function (set) { -if (this === set) return; -while (this.wordsInUse > set.wordsInUse) this.words[--this.wordsInUse] = 0; - -for (var i = 0; i < this.wordsInUse; i++) this.words[i] &= set.words[i]; - -this.recalculateWordsInUse (); -}, "javajs.util.BS"); -Clazz.defineMethod (c$, "or", -function (set) { -if (this === set) return; -var wordsInCommon = Math.min (this.wordsInUse, set.wordsInUse); -if (this.wordsInUse < set.wordsInUse) { -this.ensureCapacity (set.wordsInUse); -this.wordsInUse = set.wordsInUse; -}for (var i = 0; i < wordsInCommon; i++) this.words[i] |= set.words[i]; - -if (wordsInCommon < set.wordsInUse) System.arraycopy (set.words, wordsInCommon, this.words, wordsInCommon, this.wordsInUse - wordsInCommon); -}, "javajs.util.BS"); -Clazz.defineMethod (c$, "xor", -function (set) { -var wordsInCommon = Math.min (this.wordsInUse, set.wordsInUse); -if (this.wordsInUse < set.wordsInUse) { -this.ensureCapacity (set.wordsInUse); -this.wordsInUse = set.wordsInUse; -}for (var i = 0; i < wordsInCommon; i++) this.words[i] ^= set.words[i]; - -if (wordsInCommon < set.wordsInUse) System.arraycopy (set.words, wordsInCommon, this.words, wordsInCommon, set.wordsInUse - wordsInCommon); -this.recalculateWordsInUse (); -}, "javajs.util.BS"); -Clazz.defineMethod (c$, "andNot", -function (set) { -for (var i = Math.min (this.wordsInUse, set.wordsInUse) - 1; i >= 0; i--) this.words[i] &= ~set.words[i]; - -this.recalculateWordsInUse (); -}, "javajs.util.BS"); -Clazz.overrideMethod (c$, "hashCode", -function () { -var h = 1234; -for (var i = this.wordsInUse; --i >= 0; ) h ^= this.words[i] * (i + 1); - -return ((h >> 32) ^ h); -}); -Clazz.defineMethod (c$, "size", -function () { -return this.words.length * 32; -}); -Clazz.overrideMethod (c$, "equals", -function (obj) { -if (!(Clazz.instanceOf (obj, javajs.util.BS))) return false; -if (this === obj) return true; -var set = obj; -if (this.wordsInUse != set.wordsInUse) return false; -for (var i = 0; i < this.wordsInUse; i++) if (this.words[i] != set.words[i]) return false; - -return true; -}, "~O"); -Clazz.overrideMethod (c$, "clone", -function () { -if (!this.sizeIsSticky && this.wordsInUse != this.words.length) this.setLength (this.wordsInUse); -return javajs.util.BS.copy (this); -}); -Clazz.defineMethod (c$, "setLength", -($fz = function (n) { -var a = Clazz.newIntArray (n, 0); -System.arraycopy (this.words, 0, a, 0, Math.min (this.wordsInUse, n)); -this.words = a; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return javajs.util.BS.escape (this, '{', '}'); -}); -c$.copy = Clazz.defineMethod (c$, "copy", -function (bitsetToCopy) { -var bs; -{ -bs = Clazz.clone(bitsetToCopy); -}var wordCount = bitsetToCopy.wordsInUse; -if (wordCount == 0) { -bs.words = javajs.util.BS.emptyBitmap; -} else { -bs.words = Clazz.newIntArray (bs.wordsInUse = wordCount, 0); -System.arraycopy (bitsetToCopy.words, 0, bs.words, 0, wordCount); -}return bs; -}, "javajs.util.BS"); -Clazz.defineMethod (c$, "cardinalityN", -function (max) { -var n = this.cardinality (); -for (var i = this.length (); --i >= max; ) if (this.get (i)) n--; - -return n; -}, "~N"); -Clazz.overrideMethod (c$, "toJSON", -function () { -var numBits = (this.wordsInUse > 128) ? this.cardinality () : this.wordsInUse * 32; -var b = javajs.util.SB.newN (6 * numBits + 2); -b.appendC ('['); -var i = this.nextSetBit (0); -if (i != -1) { -b.appendI (i); -for (i = this.nextSetBit (i + 1); i >= 0; i = this.nextSetBit (i + 1)) { -var endOfRun = this.nextClearBit (i); -do { -b.append (", ").appendI (i); -} while (++i < endOfRun); -} -}b.appendC (']'); -return b.toString (); -}); -c$.escape = Clazz.defineMethod (c$, "escape", -function (bs, chOpen, chClose) { -if (bs == null) return chOpen + "{}" + chClose; -var s = new javajs.util.SB (); -s.append (chOpen + "{"); -var imax = bs.length (); -var iLast = -1; -var iFirst = -2; -var i = -1; -while (++i <= imax) { -var isSet = bs.get (i); -if (i == imax || iLast >= 0 && !isSet) { -if (iLast >= 0 && iFirst != iLast) s.append ((iFirst == iLast - 1 ? " " : ":") + iLast); -if (i == imax) break; -iLast = -1; -}if (bs.get (i)) { -if (iLast < 0) { -s.append ((iFirst == -2 ? "" : " ") + i); -iFirst = i; -}iLast = i; -}} -s.append ("}").appendC (chClose); -return s.toString (); -}, "javajs.util.BS,~S,~S"); -c$.unescape = Clazz.defineMethod (c$, "unescape", -function (str) { -var ch; -var len; -if (str == null || (len = (str = str.trim ()).length) < 4 || str.equalsIgnoreCase ("({null})") || (ch = str.charAt (0)) != '(' && ch != '[' || str.charAt (len - 1) != (ch == '(' ? ')' : ']') || str.charAt (1) != '{' || str.indexOf ('}') != len - 2) return null; -len -= 2; -for (var i = len; --i >= 2; ) if (!javajs.util.PT.isDigit (ch = str.charAt (i)) && ch != ' ' && ch != '\t' && ch != ':') return null; - -var lastN = len; -while (javajs.util.PT.isDigit (str.charAt (--lastN))) { -} -if (++lastN == len) lastN = 0; - else try { -lastN = Integer.parseInt (str.substring (lastN, len)); -} catch (e) { -if (Clazz.exceptionOf (e, NumberFormatException)) { -return null; -} else { -throw e; -} -} -var bs = javajs.util.BS.newN (lastN); -lastN = -1; -var iPrev = -1; -var iThis = -2; -for (var i = 2; i <= len; i++) { -switch (ch = str.charAt (i)) { -case '\t': -case ' ': -case '}': -if (iThis < 0) break; -if (iThis < lastN) return null; -lastN = iThis; -if (iPrev < 0) iPrev = iThis; -bs.setBits (iPrev, iThis + 1); -iPrev = -1; -iThis = -2; -break; -case ':': -iPrev = lastN = iThis; -iThis = -2; -break; -default: -if (javajs.util.PT.isDigit (ch)) { -if (iThis < 0) iThis = 0; -iThis = (iThis * 10) + (ch.charCodeAt (0) - 48); -}} -} -return (iPrev >= 0 ? null : bs); -}, "~S"); -Clazz.defineStatics (c$, -"ADDRESS_BITS_PER_WORD", 5, -"BITS_PER_WORD", 32, -"WORD_MASK", 0xffffffff, -"emptyBitmap", Clazz.newIntArray (0, 0)); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.JSONEncodable"], "javajs.util.BS", ["java.lang.IndexOutOfBoundsException", "$.NegativeArraySizeException", "javajs.util.PT", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.words = null; +this.wordsInUse = 0; +this.sizeIsSticky = false; +Clazz.instantialize (this, arguments); +}, javajs.util, "BS", null, [Cloneable, javajs.api.JSONEncodable]); +c$.wordIndex = Clazz.defineMethod (c$, "wordIndex", +($fz = function (bitIndex) { +return bitIndex >> 5; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "recalculateWordsInUse", +($fz = function () { +var i; +for (i = this.wordsInUse - 1; i >= 0; i--) if (this.words[i] != 0) break; + +this.wordsInUse = i + 1; +}, $fz.isPrivate = true, $fz)); +Clazz.makeConstructor (c$, +function () { +this.initWords (32); +this.sizeIsSticky = false; +}); +c$.newN = Clazz.defineMethod (c$, "newN", +function (nbits) { +var bs = new javajs.util.BS (); +bs.init (nbits); +return bs; +}, "~N"); +Clazz.defineMethod (c$, "init", +($fz = function (nbits) { +if (nbits < 0) throw new NegativeArraySizeException ("nbits < 0: " + nbits); +this.initWords (nbits); +this.sizeIsSticky = true; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "initWords", +($fz = function (nbits) { +this.words = Clazz.newIntArray (javajs.util.BS.wordIndex (nbits - 1) + 1, 0); +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "ensureCapacity", +($fz = function (wordsRequired) { +if (this.words.length < wordsRequired) { +var request = Math.max (2 * this.words.length, wordsRequired); +this.setLength (request); +this.sizeIsSticky = false; +}}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "expandTo", +($fz = function (wordIndex) { +var wordsRequired = wordIndex + 1; +if (this.wordsInUse < wordsRequired) { +this.ensureCapacity (wordsRequired); +this.wordsInUse = wordsRequired; +}}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "set", +function (bitIndex) { +if (bitIndex < 0) throw new IndexOutOfBoundsException ("bitIndex < 0: " + bitIndex); +var wordIndex = javajs.util.BS.wordIndex (bitIndex); +this.expandTo (wordIndex); +this.words[wordIndex] |= (1 << bitIndex); +}, "~N"); +Clazz.defineMethod (c$, "setBitTo", +function (bitIndex, value) { +if (value) this.set (bitIndex); + else this.clear (bitIndex); +}, "~N,~B"); +Clazz.defineMethod (c$, "setBits", +function (fromIndex, toIndex) { +if (fromIndex == toIndex) return; +var startWordIndex = javajs.util.BS.wordIndex (fromIndex); +var endWordIndex = javajs.util.BS.wordIndex (toIndex - 1); +this.expandTo (endWordIndex); +var firstWordMask = -1 << fromIndex; +var lastWordMask = -1 >>> -toIndex; +if (startWordIndex == endWordIndex) { +this.words[startWordIndex] |= (firstWordMask & lastWordMask); +} else { +this.words[startWordIndex] |= firstWordMask; +for (var i = startWordIndex + 1; i < endWordIndex; i++) this.words[i] = -1; + +this.words[endWordIndex] |= lastWordMask; +}}, "~N,~N"); +Clazz.defineMethod (c$, "clear", +function (bitIndex) { +if (bitIndex < 0) throw new IndexOutOfBoundsException ("bitIndex < 0: " + bitIndex); +var wordIndex = javajs.util.BS.wordIndex (bitIndex); +if (wordIndex >= this.wordsInUse) return; +this.words[wordIndex] &= ~(1 << bitIndex); +this.recalculateWordsInUse (); +}, "~N"); +Clazz.defineMethod (c$, "clearBits", +function (fromIndex, toIndex) { +if (fromIndex == toIndex) return; +var startWordIndex = javajs.util.BS.wordIndex (fromIndex); +if (startWordIndex >= this.wordsInUse) return; +var endWordIndex = javajs.util.BS.wordIndex (toIndex - 1); +if (endWordIndex >= this.wordsInUse) { +toIndex = this.length (); +endWordIndex = this.wordsInUse - 1; +}var firstWordMask = -1 << fromIndex; +var lastWordMask = -1 >>> -toIndex; +if (startWordIndex == endWordIndex) { +this.words[startWordIndex] &= ~(firstWordMask & lastWordMask); +} else { +this.words[startWordIndex] &= ~firstWordMask; +for (var i = startWordIndex + 1; i < endWordIndex; i++) this.words[i] = 0; + +this.words[endWordIndex] &= ~lastWordMask; +}this.recalculateWordsInUse (); +}, "~N,~N"); +Clazz.defineMethod (c$, "clearAll", +function () { +while (this.wordsInUse > 0) this.words[--this.wordsInUse] = 0; + +}); +Clazz.defineMethod (c$, "get", +function (bitIndex) { +if (bitIndex < 0) throw new IndexOutOfBoundsException ("bitIndex < 0: " + bitIndex); +var wordIndex = javajs.util.BS.wordIndex (bitIndex); +return (wordIndex < this.wordsInUse) && ((this.words[wordIndex] & (1 << bitIndex)) != 0); +}, "~N"); +Clazz.defineMethod (c$, "nextSetBit", +function (fromIndex) { +if (fromIndex < 0) throw new IndexOutOfBoundsException ("fromIndex < 0: " + fromIndex); +var u = javajs.util.BS.wordIndex (fromIndex); +if (u >= this.wordsInUse) return -1; +var word = this.words[u] & (-1 << fromIndex); +while (true) { +if (word != 0) return (u * 32) + Integer.numberOfTrailingZeros (word); +if (++u == this.wordsInUse) return -1; +word = this.words[u]; +} +}, "~N"); +Clazz.defineMethod (c$, "nextClearBit", +function (fromIndex) { +if (fromIndex < 0) throw new IndexOutOfBoundsException ("fromIndex < 0: " + fromIndex); +var u = javajs.util.BS.wordIndex (fromIndex); +if (u >= this.wordsInUse) return fromIndex; +var word = ~this.words[u] & (-1 << fromIndex); +while (true) { +if (word != 0) return (u * 32) + Integer.numberOfTrailingZeros (word); +if (++u == this.wordsInUse) return this.wordsInUse * 32; +word = ~this.words[u]; +} +}, "~N"); +Clazz.defineMethod (c$, "length", +function () { +if (this.wordsInUse == 0) return 0; +return 32 * (this.wordsInUse - 1) + (32 - Integer.numberOfLeadingZeros (this.words[this.wordsInUse - 1])); +}); +Clazz.defineMethod (c$, "isEmpty", +function () { +return this.wordsInUse == 0; +}); +Clazz.defineMethod (c$, "intersects", +function (set) { +for (var i = Math.min (this.wordsInUse, set.wordsInUse) - 1; i >= 0; i--) if ((this.words[i] & set.words[i]) != 0) return true; + +return false; +}, "javajs.util.BS"); +Clazz.defineMethod (c$, "cardinality", +function () { +var sum = 0; +for (var i = 0; i < this.wordsInUse; i++) sum += Integer.bitCount (this.words[i]); + +return sum; +}); +Clazz.defineMethod (c$, "and", +function (set) { +if (this === set) return; +while (this.wordsInUse > set.wordsInUse) this.words[--this.wordsInUse] = 0; + +for (var i = 0; i < this.wordsInUse; i++) this.words[i] &= set.words[i]; + +this.recalculateWordsInUse (); +}, "javajs.util.BS"); +Clazz.defineMethod (c$, "or", +function (set) { +if (this === set) return; +var wordsInCommon = Math.min (this.wordsInUse, set.wordsInUse); +if (this.wordsInUse < set.wordsInUse) { +this.ensureCapacity (set.wordsInUse); +this.wordsInUse = set.wordsInUse; +}for (var i = 0; i < wordsInCommon; i++) this.words[i] |= set.words[i]; + +if (wordsInCommon < set.wordsInUse) System.arraycopy (set.words, wordsInCommon, this.words, wordsInCommon, this.wordsInUse - wordsInCommon); +}, "javajs.util.BS"); +Clazz.defineMethod (c$, "xor", +function (set) { +var wordsInCommon = Math.min (this.wordsInUse, set.wordsInUse); +if (this.wordsInUse < set.wordsInUse) { +this.ensureCapacity (set.wordsInUse); +this.wordsInUse = set.wordsInUse; +}for (var i = 0; i < wordsInCommon; i++) this.words[i] ^= set.words[i]; + +if (wordsInCommon < set.wordsInUse) System.arraycopy (set.words, wordsInCommon, this.words, wordsInCommon, set.wordsInUse - wordsInCommon); +this.recalculateWordsInUse (); +}, "javajs.util.BS"); +Clazz.defineMethod (c$, "andNot", +function (set) { +for (var i = Math.min (this.wordsInUse, set.wordsInUse) - 1; i >= 0; i--) this.words[i] &= ~set.words[i]; + +this.recalculateWordsInUse (); +}, "javajs.util.BS"); +Clazz.overrideMethod (c$, "hashCode", +function () { +var h = 1234; +for (var i = this.wordsInUse; --i >= 0; ) h ^= this.words[i] * (i + 1); + +return ((h >> 32) ^ h); +}); +Clazz.defineMethod (c$, "size", +function () { +return this.words.length * 32; +}); +Clazz.overrideMethod (c$, "equals", +function (obj) { +if (!(Clazz.instanceOf (obj, javajs.util.BS))) return false; +if (this === obj) return true; +var set = obj; +if (this.wordsInUse != set.wordsInUse) return false; +for (var i = 0; i < this.wordsInUse; i++) if (this.words[i] != set.words[i]) return false; + +return true; +}, "~O"); +Clazz.overrideMethod (c$, "clone", +function () { +if (!this.sizeIsSticky && this.wordsInUse != this.words.length) this.setLength (this.wordsInUse); +return javajs.util.BS.copy (this); +}); +Clazz.defineMethod (c$, "setLength", +($fz = function (n) { +var a = Clazz.newIntArray (n, 0); +System.arraycopy (this.words, 0, a, 0, Math.min (this.wordsInUse, n)); +this.words = a; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return javajs.util.BS.escape (this, '{', '}'); +}); +c$.copy = Clazz.defineMethod (c$, "copy", +function (bitsetToCopy) { +var bs; +{ +bs = Clazz.clone(bitsetToCopy); +}var wordCount = bitsetToCopy.wordsInUse; +if (wordCount == 0) { +bs.words = javajs.util.BS.emptyBitmap; +} else { +bs.words = Clazz.newIntArray (bs.wordsInUse = wordCount, 0); +System.arraycopy (bitsetToCopy.words, 0, bs.words, 0, wordCount); +}return bs; +}, "javajs.util.BS"); +Clazz.defineMethod (c$, "cardinalityN", +function (max) { +var n = this.cardinality (); +for (var i = this.length (); --i >= max; ) if (this.get (i)) n--; + +return n; +}, "~N"); +Clazz.overrideMethod (c$, "toJSON", +function () { +var numBits = (this.wordsInUse > 128) ? this.cardinality () : this.wordsInUse * 32; +var b = javajs.util.SB.newN (6 * numBits + 2); +b.appendC ('['); +var i = this.nextSetBit (0); +if (i != -1) { +b.appendI (i); +for (i = this.nextSetBit (i + 1); i >= 0; i = this.nextSetBit (i + 1)) { +var endOfRun = this.nextClearBit (i); +do { +b.append (", ").appendI (i); +} while (++i < endOfRun); +} +}b.appendC (']'); +return b.toString (); +}); +c$.escape = Clazz.defineMethod (c$, "escape", +function (bs, chOpen, chClose) { +if (bs == null) return chOpen + "{}" + chClose; +var s = new javajs.util.SB (); +s.append (chOpen + "{"); +var imax = bs.length (); +var iLast = -1; +var iFirst = -2; +var i = -1; +while (++i <= imax) { +var isSet = bs.get (i); +if (i == imax || iLast >= 0 && !isSet) { +if (iLast >= 0 && iFirst != iLast) s.append ((iFirst == iLast - 1 ? " " : ":") + iLast); +if (i == imax) break; +iLast = -1; +}if (bs.get (i)) { +if (iLast < 0) { +s.append ((iFirst == -2 ? "" : " ") + i); +iFirst = i; +}iLast = i; +}} +s.append ("}").appendC (chClose); +return s.toString (); +}, "javajs.util.BS,~S,~S"); +c$.unescape = Clazz.defineMethod (c$, "unescape", +function (str) { +var ch; +var len; +if (str == null || (len = (str = str.trim ()).length) < 4 || str.equalsIgnoreCase ("({null})") || (ch = str.charAt (0)) != '(' && ch != '[' || str.charAt (len - 1) != (ch == '(' ? ')' : ']') || str.charAt (1) != '{' || str.indexOf ('}') != len - 2) return null; +len -= 2; +for (var i = len; --i >= 2; ) if (!javajs.util.PT.isDigit (ch = str.charAt (i)) && ch != ' ' && ch != '\t' && ch != ':') return null; + +var lastN = len; +while (javajs.util.PT.isDigit (str.charAt (--lastN))) { +} +if (++lastN == len) lastN = 0; + else try { +lastN = Integer.parseInt (str.substring (lastN, len)); +} catch (e) { +if (Clazz.exceptionOf (e, NumberFormatException)) { +return null; +} else { +throw e; +} +} +var bs = javajs.util.BS.newN (lastN); +lastN = -1; +var iPrev = -1; +var iThis = -2; +for (var i = 2; i <= len; i++) { +switch (ch = str.charAt (i)) { +case '\t': +case ' ': +case '}': +if (iThis < 0) break; +if (iThis < lastN) return null; +lastN = iThis; +if (iPrev < 0) iPrev = iThis; +bs.setBits (iPrev, iThis + 1); +iPrev = -1; +iThis = -2; +break; +case ':': +iPrev = lastN = iThis; +iThis = -2; +break; +default: +if (javajs.util.PT.isDigit (ch)) { +if (iThis < 0) iThis = 0; +iThis = (iThis * 10) + (ch.charCodeAt (0) - 48); +}} +} +return (iPrev >= 0 ? null : bs); +}, "~S"); +Clazz.defineStatics (c$, +"ADDRESS_BITS_PER_WORD", 5, +"BITS_PER_WORD", 32, +"WORD_MASK", 0xffffffff, +"emptyBitmap", Clazz.newIntArray (0, 0)); +}); diff --git a/bin/javajs/util/Base64.js b/bin/javajs/util/Base64.js index 15f1a5f..e513e54 100644 --- a/bin/javajs/util/Base64.js +++ b/bin/javajs/util/Base64.js @@ -1,54 +1,54 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (null, "javajs.util.Base64", ["javajs.util.SB"], function () { -c$ = Clazz.declareType (javajs.util, "Base64"); -c$.getBytes64 = Clazz.defineMethod (c$, "getBytes64", -function (bytes) { -return javajs.util.Base64.getBase64 (bytes).toBytes (0, -1); -}, "~A"); -c$.getBase64 = Clazz.defineMethod (c$, "getBase64", -function (bytes) { -var nBytes = bytes.length; -var sout = new javajs.util.SB (); -if (nBytes == 0) return sout; -for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) { -if (i % 75 == 0 && i != 0) sout.append ("\r\n"); -nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0); -var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF); -sout.appendC (javajs.util.Base64.base64.charAt ((outbytes >> 18) & 0x3F)); -sout.appendC (javajs.util.Base64.base64.charAt ((outbytes >> 12) & 0x3F)); -sout.appendC (nPad == 2 ? '=' : javajs.util.Base64.base64.charAt ((outbytes >> 6) & 0x3F)); -sout.appendC (nPad >= 1 ? '=' : javajs.util.Base64.base64.charAt (outbytes & 0x3F)); -} -return sout; -}, "~A"); -c$.decodeBase64 = Clazz.defineMethod (c$, "decodeBase64", -function (strBase64) { -var nBytes = 0; -var ch; -var pt0 = strBase64.indexOf (";base64,") + 1; -if (pt0 > 0) pt0 += 7; -var chars64 = strBase64.toCharArray (); -var len64 = chars64.length; -if (len64 == 0) return Clazz.newByteArray (0, 0); -for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || javajs.util.Base64.decode64[ch] > 0 ? 3 : 0); - -nBytes = nBytes >> 2; -var bytes = Clazz.newByteArray (nBytes, 0); -var offset = 18; -for (var i = pt0, pt = 0, b = 0; i < len64; i++) { -if (javajs.util.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) { -b |= javajs.util.Base64.decode64[ch] << offset; -offset -= 6; -if (offset < 0) { -bytes[pt++] = ((b & 0xFF0000) >> 16); -if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8); -if (pt < nBytes) bytes[pt++] = (b & 0xFF); -offset = 18; -b = 0; -}}} -return bytes; -}, "~S"); -Clazz.defineStatics (c$, -"base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", -"decode64", Clazz.newIntArray (-1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 62, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0])); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (null, "javajs.util.Base64", ["javajs.util.SB"], function () { +c$ = Clazz.declareType (javajs.util, "Base64"); +c$.getBytes64 = Clazz.defineMethod (c$, "getBytes64", +function (bytes) { +return javajs.util.Base64.getBase64 (bytes).toBytes (0, -1); +}, "~A"); +c$.getBase64 = Clazz.defineMethod (c$, "getBase64", +function (bytes) { +var nBytes = bytes.length; +var sout = new javajs.util.SB (); +if (nBytes == 0) return sout; +for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) { +if (i % 75 == 0 && i != 0) sout.append ("\r\n"); +nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0); +var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF); +sout.appendC (javajs.util.Base64.base64.charAt ((outbytes >> 18) & 0x3F)); +sout.appendC (javajs.util.Base64.base64.charAt ((outbytes >> 12) & 0x3F)); +sout.appendC (nPad == 2 ? '=' : javajs.util.Base64.base64.charAt ((outbytes >> 6) & 0x3F)); +sout.appendC (nPad >= 1 ? '=' : javajs.util.Base64.base64.charAt (outbytes & 0x3F)); +} +return sout; +}, "~A"); +c$.decodeBase64 = Clazz.defineMethod (c$, "decodeBase64", +function (strBase64) { +var nBytes = 0; +var ch; +var pt0 = strBase64.indexOf (";base64,") + 1; +if (pt0 > 0) pt0 += 7; +var chars64 = strBase64.toCharArray (); +var len64 = chars64.length; +if (len64 == 0) return Clazz.newByteArray (0, 0); +for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || javajs.util.Base64.decode64[ch] > 0 ? 3 : 0); + +nBytes = nBytes >> 2; +var bytes = Clazz.newByteArray (nBytes, 0); +var offset = 18; +for (var i = pt0, pt = 0, b = 0; i < len64; i++) { +if (javajs.util.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) { +b |= javajs.util.Base64.decode64[ch] << offset; +offset -= 6; +if (offset < 0) { +bytes[pt++] = ((b & 0xFF0000) >> 16); +if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8); +if (pt < nBytes) bytes[pt++] = (b & 0xFF); +offset = 18; +b = 0; +}}} +return bytes; +}, "~S"); +Clazz.defineStatics (c$, +"base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", +"decode64", Clazz.newIntArray (-1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 62, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0])); +}); diff --git a/bin/javajs/util/BinaryDocument.js b/bin/javajs/util/BinaryDocument.js index 420db0b..a0edf33 100644 --- a/bin/javajs/util/BinaryDocument.js +++ b/bin/javajs/util/BinaryDocument.js @@ -1,218 +1,218 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.api.GenericBinaryDocument", "javajs.util.BC"], "javajs.util.BinaryDocument", ["java.io.DataInputStream", "java.lang.Double"], function () { -c$ = Clazz.decorateAsClass (function () { -this.stream = null; -this.isRandom = false; -this.isBigEndian = true; -this.jzt = null; -this.t8 = null; -this.nBytes = 0; -this.out = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "BinaryDocument", javajs.util.BC, javajs.api.GenericBinaryDocument); -Clazz.prepareFields (c$, function () { -this.t8 = Clazz.newByteArray (8, 0); -}); -Clazz.overrideMethod (c$, "close", -function () { -if (this.stream != null) try { -this.stream.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -if (this.out != null) this.out.closeChannel (); -}); -Clazz.overrideMethod (c$, "setStream", -function (jzt, bis, isBigEndian) { -if (jzt != null) this.jzt = jzt; -if (bis != null) this.stream = new java.io.DataInputStream (bis); -this.isBigEndian = isBigEndian; -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~B"); -Clazz.overrideMethod (c$, "setStreamData", -function (stream, isBigEndian) { -if (stream != null) this.stream = stream; -this.isBigEndian = isBigEndian; -}, "java.io.DataInputStream,~B"); -Clazz.defineMethod (c$, "setRandom", -function (TF) { -this.isRandom = TF; -}, "~B"); -Clazz.overrideMethod (c$, "readByte", -function () { -this.nBytes++; -return this.ioReadByte (); -}); -Clazz.defineMethod (c$, "ioReadByte", -($fz = function () { -var b = this.stream.readByte (); -if (this.out != null) this.out.writeByteAsInt (b); -return b; -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "readByteArray", -function (b, off, len) { -var n = this.ioRead (b, off, len); -this.nBytes += n; -return n; -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "ioRead", -($fz = function (b, off, len) { -var m = 0; -while (len > 0) { -var n = this.stream.read (b, off, len); -m += n; -if (n > 0 && this.out != null) this.writeBytes (b, off, n); -if (n >= len) break; -off += n; -len -= n; -} -return m; -}, $fz.isPrivate = true, $fz), "~A,~N,~N"); -Clazz.defineMethod (c$, "writeBytes", -function (b, off, n) { -this.out.write (b, off, n); -}, "~A,~N,~N"); -Clazz.overrideMethod (c$, "readString", -function (nChar) { -var temp = Clazz.newByteArray (nChar, 0); -var n = this.readByteArray (temp, 0, nChar); -return String.instantialize (temp, 0, n, "UTF-8"); -}, "~N"); -Clazz.overrideMethod (c$, "readShort", -function () { -this.nBytes += 2; -var n = (this.isBigEndian ? this.ioReadShort () : ((this.ioReadByte () & 0xff) | (this.ioReadByte () & 0xff) << 8)); -{ -return (n > 0x7FFF ? n - 0x10000 : n); -}}); -Clazz.defineMethod (c$, "ioReadShort", -($fz = function () { -var b = this.stream.readShort (); -if (this.out != null) this.writeShort (b); -return b; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeShort", -function (i) { -this.out.writeByteAsInt (i >> 8); -this.out.writeByteAsInt (i); -}, "~N"); -Clazz.overrideMethod (c$, "readIntLE", -function () { -this.nBytes += 4; -return this.readLEInt (); -}); -Clazz.overrideMethod (c$, "readInt", -function () { -this.nBytes += 4; -return (this.isBigEndian ? this.ioReadInt () : this.readLEInt ()); -}); -Clazz.defineMethod (c$, "ioReadInt", -($fz = function () { -var i = this.stream.readInt (); -if (this.out != null) this.writeInt (i); -return i; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeInt", -function (i) { -this.out.writeByteAsInt (i >> 24); -this.out.writeByteAsInt (i >> 16); -this.out.writeByteAsInt (i >> 8); -this.out.writeByteAsInt (i); -}, "~N"); -Clazz.overrideMethod (c$, "swapBytesI", -function (n) { -return (((n >> 24) & 0xff) | ((n >> 16) & 0xff) << 8 | ((n >> 8) & 0xff) << 16 | (n & 0xff) << 24); -}, "~N"); -Clazz.overrideMethod (c$, "swapBytesS", -function (n) { -return ((((n >> 8) & 0xff) | (n & 0xff) << 8)); -}, "~N"); -Clazz.overrideMethod (c$, "readUnsignedShort", -function () { -this.nBytes += 2; -var a = (this.ioReadByte () & 0xff); -var b = (this.ioReadByte () & 0xff); -return (this.isBigEndian ? (a << 8) + b : (b << 8) + a); -}); -Clazz.overrideMethod (c$, "readLong", -function () { -this.nBytes += 8; -return (this.isBigEndian ? this.ioReadLong () : (((this.ioReadByte ()) & 0xff) | ((this.ioReadByte ()) & 0xff) << 8 | ((this.ioReadByte ()) & 0xff) << 16 | ((this.ioReadByte ()) & 0xff) << 24 | ((this.ioReadByte ()) & 0xff) << 32 | ((this.ioReadByte ()) & 0xff) << 40 | ((this.ioReadByte ()) & 0xff) << 48 | ((this.ioReadByte ()) & 0xff) << 54)); -}); -Clazz.defineMethod (c$, "ioReadLong", -($fz = function () { -var b = this.stream.readLong (); -if (this.out != null) this.writeLong (b); -return b; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "writeLong", -function (b) { -this.writeInt (((b >> 32) & 0xFFFFFFFF)); -this.writeInt ((b & 0xFFFFFFFF)); -}, "~N"); -Clazz.defineMethod (c$, "readLEInt", -($fz = function () { -this.ioRead (this.t8, 0, 4); -return javajs.util.BC.bytesToInt (this.t8, 0, false); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "readFloat", -function () { -return javajs.util.BC.intToFloat (this.readInt ()); -}); -Clazz.overrideMethod (c$, "readDouble", -function () { -{ -this.readByteArray(this.t8, 0, 8); -return this.bytesToDoubleToFloat(this.t8, 0, this.isBigEndian); -}}); -Clazz.defineMethod (c$, "ioReadDouble", -($fz = function () { -var d = this.stream.readDouble (); -if (this.out != null) this.writeLong (Double.doubleToRawLongBits (d)); -return d; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "readLELong", -($fz = function () { -return (((this.ioReadByte ()) & 0xff) | ((this.ioReadByte ()) & 0xff) << 8 | ((this.ioReadByte ()) & 0xff) << 16 | ((this.ioReadByte ()) & 0xff) << 24 | ((this.ioReadByte ()) & 0xff) << 32 | ((this.ioReadByte ()) & 0xff) << 40 | ((this.ioReadByte ()) & 0xff) << 48 | ((this.ioReadByte ()) & 0xff) << 56); -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "seek", -function (offset) { -try { -if (offset == this.nBytes) return; -if (offset < this.nBytes) { -this.stream.reset (); -if (this.out != null && this.nBytes != 0) this.out.reset (); -this.nBytes = 0; -} else { -offset -= this.nBytes; -}if (this.out == null) { -this.stream.skipBytes (offset); -} else { -this.readByteArray ( Clazz.newByteArray (offset, 0), 0, offset); -}this.nBytes += offset; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -}, "~N"); -Clazz.overrideMethod (c$, "getPosition", -function () { -return this.nBytes; -}); -Clazz.overrideMethod (c$, "setOutputChannel", -function (out) { -this.out = out; -}, "javajs.util.OC"); -Clazz.overrideMethod (c$, "getAllDataFiles", -function (binaryFileList, firstFile) { -return null; -}, "~S,~S"); -Clazz.overrideMethod (c$, "getAllDataMapped", -function (replace, string, fileData) { -}, "~S,~S,java.util.Map"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.GenericBinaryDocument", "javajs.util.BC"], "javajs.util.BinaryDocument", ["java.io.DataInputStream", "java.lang.Double"], function () { +c$ = Clazz.decorateAsClass (function () { +this.stream = null; +this.isRandom = false; +this.isBigEndian = true; +this.jzt = null; +this.t8 = null; +this.nBytes = 0; +this.out = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "BinaryDocument", javajs.util.BC, javajs.api.GenericBinaryDocument); +Clazz.prepareFields (c$, function () { +this.t8 = Clazz.newByteArray (8, 0); +}); +Clazz.overrideMethod (c$, "close", +function () { +if (this.stream != null) try { +this.stream.close (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +if (this.out != null) this.out.closeChannel (); +}); +Clazz.overrideMethod (c$, "setStream", +function (jzt, bis, isBigEndian) { +if (jzt != null) this.jzt = jzt; +if (bis != null) this.stream = new java.io.DataInputStream (bis); +this.isBigEndian = isBigEndian; +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~B"); +Clazz.overrideMethod (c$, "setStreamData", +function (stream, isBigEndian) { +if (stream != null) this.stream = stream; +this.isBigEndian = isBigEndian; +}, "java.io.DataInputStream,~B"); +Clazz.defineMethod (c$, "setRandom", +function (TF) { +this.isRandom = TF; +}, "~B"); +Clazz.overrideMethod (c$, "readByte", +function () { +this.nBytes++; +return this.ioReadByte (); +}); +Clazz.defineMethod (c$, "ioReadByte", +($fz = function () { +var b = this.stream.readByte (); +if (this.out != null) this.out.writeByteAsInt (b); +return b; +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "readByteArray", +function (b, off, len) { +var n = this.ioRead (b, off, len); +this.nBytes += n; +return n; +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "ioRead", +($fz = function (b, off, len) { +var m = 0; +while (len > 0) { +var n = this.stream.read (b, off, len); +m += n; +if (n > 0 && this.out != null) this.writeBytes (b, off, n); +if (n >= len) break; +off += n; +len -= n; +} +return m; +}, $fz.isPrivate = true, $fz), "~A,~N,~N"); +Clazz.defineMethod (c$, "writeBytes", +function (b, off, n) { +this.out.write (b, off, n); +}, "~A,~N,~N"); +Clazz.overrideMethod (c$, "readString", +function (nChar) { +var temp = Clazz.newByteArray (nChar, 0); +var n = this.readByteArray (temp, 0, nChar); +return String.instantialize (temp, 0, n, "UTF-8"); +}, "~N"); +Clazz.overrideMethod (c$, "readShort", +function () { +this.nBytes += 2; +var n = (this.isBigEndian ? this.ioReadShort () : ((this.ioReadByte () & 0xff) | (this.ioReadByte () & 0xff) << 8)); +{ +return (n > 0x7FFF ? n - 0x10000 : n); +}}); +Clazz.defineMethod (c$, "ioReadShort", +($fz = function () { +var b = this.stream.readShort (); +if (this.out != null) this.writeShort (b); +return b; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeShort", +function (i) { +this.out.writeByteAsInt (i >> 8); +this.out.writeByteAsInt (i); +}, "~N"); +Clazz.overrideMethod (c$, "readIntLE", +function () { +this.nBytes += 4; +return this.readLEInt (); +}); +Clazz.overrideMethod (c$, "readInt", +function () { +this.nBytes += 4; +return (this.isBigEndian ? this.ioReadInt () : this.readLEInt ()); +}); +Clazz.defineMethod (c$, "ioReadInt", +($fz = function () { +var i = this.stream.readInt (); +if (this.out != null) this.writeInt (i); +return i; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeInt", +function (i) { +this.out.writeByteAsInt (i >> 24); +this.out.writeByteAsInt (i >> 16); +this.out.writeByteAsInt (i >> 8); +this.out.writeByteAsInt (i); +}, "~N"); +Clazz.overrideMethod (c$, "swapBytesI", +function (n) { +return (((n >> 24) & 0xff) | ((n >> 16) & 0xff) << 8 | ((n >> 8) & 0xff) << 16 | (n & 0xff) << 24); +}, "~N"); +Clazz.overrideMethod (c$, "swapBytesS", +function (n) { +return ((((n >> 8) & 0xff) | (n & 0xff) << 8)); +}, "~N"); +Clazz.overrideMethod (c$, "readUnsignedShort", +function () { +this.nBytes += 2; +var a = (this.ioReadByte () & 0xff); +var b = (this.ioReadByte () & 0xff); +return (this.isBigEndian ? (a << 8) + b : (b << 8) + a); +}); +Clazz.overrideMethod (c$, "readLong", +function () { +this.nBytes += 8; +return (this.isBigEndian ? this.ioReadLong () : (((this.ioReadByte ()) & 0xff) | ((this.ioReadByte ()) & 0xff) << 8 | ((this.ioReadByte ()) & 0xff) << 16 | ((this.ioReadByte ()) & 0xff) << 24 | ((this.ioReadByte ()) & 0xff) << 32 | ((this.ioReadByte ()) & 0xff) << 40 | ((this.ioReadByte ()) & 0xff) << 48 | ((this.ioReadByte ()) & 0xff) << 54)); +}); +Clazz.defineMethod (c$, "ioReadLong", +($fz = function () { +var b = this.stream.readLong (); +if (this.out != null) this.writeLong (b); +return b; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "writeLong", +function (b) { +this.writeInt (((b >> 32) & 0xFFFFFFFF)); +this.writeInt ((b & 0xFFFFFFFF)); +}, "~N"); +Clazz.defineMethod (c$, "readLEInt", +($fz = function () { +this.ioRead (this.t8, 0, 4); +return javajs.util.BC.bytesToInt (this.t8, 0, false); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "readFloat", +function () { +return javajs.util.BC.intToFloat (this.readInt ()); +}); +Clazz.overrideMethod (c$, "readDouble", +function () { +{ +this.readByteArray(this.t8, 0, 8); +return this.bytesToDoubleToFloat(this.t8, 0, this.isBigEndian); +}}); +Clazz.defineMethod (c$, "ioReadDouble", +($fz = function () { +var d = this.stream.readDouble (); +if (this.out != null) this.writeLong (Double.doubleToRawLongBits (d)); +return d; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "readLELong", +($fz = function () { +return (((this.ioReadByte ()) & 0xff) | ((this.ioReadByte ()) & 0xff) << 8 | ((this.ioReadByte ()) & 0xff) << 16 | ((this.ioReadByte ()) & 0xff) << 24 | ((this.ioReadByte ()) & 0xff) << 32 | ((this.ioReadByte ()) & 0xff) << 40 | ((this.ioReadByte ()) & 0xff) << 48 | ((this.ioReadByte ()) & 0xff) << 56); +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "seek", +function (offset) { +try { +if (offset == this.nBytes) return; +if (offset < this.nBytes) { +this.stream.reset (); +if (this.out != null && this.nBytes != 0) this.out.reset (); +this.nBytes = 0; +} else { +offset -= this.nBytes; +}if (this.out == null) { +this.stream.skipBytes (offset); +} else { +this.readByteArray ( Clazz.newByteArray (offset, 0), 0, offset); +}this.nBytes += offset; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +}, "~N"); +Clazz.overrideMethod (c$, "getPosition", +function () { +return this.nBytes; +}); +Clazz.overrideMethod (c$, "setOutputChannel", +function (out) { +this.out = out; +}, "javajs.util.OC"); +Clazz.overrideMethod (c$, "getAllDataFiles", +function (binaryFileList, firstFile) { +return null; +}, "~S,~S"); +Clazz.overrideMethod (c$, "getAllDataMapped", +function (replace, string, fileData) { +}, "~S,~S,java.util.Map"); +}); diff --git a/bin/javajs/util/CU.js b/bin/javajs/util/CU.js index f6b3020..edd8bdd 100644 --- a/bin/javajs/util/CU.js +++ b/bin/javajs/util/CU.js @@ -1,135 +1,135 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.util.Hashtable"], "javajs.util.CU", ["javajs.util.P3", "$.PT"], function () { -c$ = Clazz.declareType (javajs.util, "CU"); -c$.toRGBHexString = Clazz.defineMethod (c$, "toRGBHexString", -function (c) { -var rgb = c.getRGB (); -if (rgb == 0) return "000000"; -var r = "00" + Integer.toHexString ((rgb >> 16) & 0xFF); -r = r.substring (r.length - 2); -var g = "00" + Integer.toHexString ((rgb >> 8) & 0xFF); -g = g.substring (g.length - 2); -var b = "00" + Integer.toHexString (rgb & 0xFF); -b = b.substring (b.length - 2); -return r + g + b; -}, "javajs.api.GenericColor"); -c$.toCSSString = Clazz.defineMethod (c$, "toCSSString", -function (c) { -var opacity = c.getOpacity255 (); -if (opacity == 255) return "#" + javajs.util.CU.toRGBHexString (c); -var rgb = c.getRGB (); -return "rgba(" + ((rgb >> 16) & 0xFF) + "," + ((rgb >> 8) & 0xff) + "," + (rgb & 0xff) + "," + opacity / 255 + ")"; -}, "javajs.api.GenericColor"); -c$.getArgbFromString = Clazz.defineMethod (c$, "getArgbFromString", -function (strColor) { -var len = 0; -if (strColor == null || (len = strColor.length) == 0) return 0; -if (strColor.charAt (0) == '[' && strColor.charAt (len - 1) == ']') { -var check; -if (strColor.indexOf (",") >= 0) { -var tokens = javajs.util.PT.split (strColor.substring (1, strColor.length - 1), ","); -if (tokens.length != 3) return 0; -var red = javajs.util.PT.parseFloat (tokens[0]); -var grn = javajs.util.PT.parseFloat (tokens[1]); -var blu = javajs.util.PT.parseFloat (tokens[2]); -return javajs.util.CU.colorTriadToFFRGB (red, grn, blu); -}switch (len) { -case 9: -check = "x"; -break; -case 10: -check = "0x"; -break; -default: -return 0; -} -if (strColor.indexOf (check) != 1) return 0; -strColor = "#" + strColor.substring (len - 7, len - 1); -len = 7; -}if (len == 7 && strColor.charAt (0) == '#') { -try { -return javajs.util.PT.parseIntRadix (strColor.substring (1, 7), 16) | 0xFF000000; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -return 0; -} else { -throw e; -} -} -}var boxedArgb = javajs.util.CU.mapJavaScriptColors.get (strColor.toLowerCase ()); -return (boxedArgb == null ? 0 : boxedArgb.intValue ()); -}, "~S"); -c$.colorTriadToFFRGB = Clazz.defineMethod (c$, "colorTriadToFFRGB", -function (x, y, z) { -if (x <= 1 && y <= 1 && z <= 1) { -if (x > 0) x = x * 256 - 1; -if (y > 0) y = y * 256 - 1; -if (z > 0) z = z * 256 - 1; -}return javajs.util.CU.rgb (Clazz.floatToInt (x), Clazz.floatToInt (y), Clazz.floatToInt (z)); -}, "~N,~N,~N"); -c$.rgb = Clazz.defineMethod (c$, "rgb", -function (red, grn, blu) { -return 0xFF000000 | (red << 16) | (grn << 8) | blu; -}, "~N,~N,~N"); -c$.colorPtFromString = Clazz.defineMethod (c$, "colorPtFromString", -function (colorName) { -return javajs.util.CU.colorPtFromInt (javajs.util.CU.getArgbFromString (colorName), null); -}, "~S"); -c$.colorPtFromInt = Clazz.defineMethod (c$, "colorPtFromInt", -function (color, pt) { -if (pt == null) pt = new javajs.util.P3 (); -pt.set ((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF); -return pt; -}, "~N,javajs.util.P3"); -c$.colorPtToFFRGB = Clazz.defineMethod (c$, "colorPtToFFRGB", -function (pt) { -return javajs.util.CU.colorTriadToFFRGB (pt.x, pt.y, pt.z); -}, "javajs.util.T3"); -c$.toRGB3f = Clazz.defineMethod (c$, "toRGB3f", -function (c, f) { -f[0] = ((c >> 16) & 0xFF) / 255; -f[1] = ((c >> 8) & 0xFF) / 255; -f[2] = (c & 0xFF) / 255; -}, "~N,~A"); -c$.toFFGGGfromRGB = Clazz.defineMethod (c$, "toFFGGGfromRGB", -function (rgb) { -var grey = (Clazz.doubleToInt (((2989 * ((rgb >> 16) & 0xFF)) + (5870 * ((rgb >> 8) & 0xFF)) + (1140 * (rgb & 0xFF)) + 5000) / 10000)) & 0xFFFFFF; -return javajs.util.CU.rgb (grey, grey, grey); -}, "~N"); -c$.rgbToHSL = Clazz.defineMethod (c$, "rgbToHSL", -function (rgb, doRound) { -var r = rgb.x / 255; -var g = rgb.y / 255; -var b = rgb.z / 255; -var min = Math.min (r, Math.min (g, b)); -var max = Math.max (r, Math.max (g, b)); -var p = (max + min); -var q = (max - min); -var h = (60 * ((q == 0 ? 0 : max == r ? ((g - b) / q + 6) : max == g ? (b - r) / q + 2 : (r - g) / q + 4))) % 360; -var s = q / (q == 0 ? 1 : p <= 1 ? p : 2 - p); -return (doRound ? javajs.util.P3.new3 (Math.round (h * 10) / 10, Math.round (s * 1000) / 10, Math.round (p * 500) / 10) : javajs.util.P3.new3 (h, s * 100, p * 50)); -}, "javajs.util.P3,~B"); -c$.hslToRGB = Clazz.defineMethod (c$, "hslToRGB", -function (hsl) { -var h = Math.max (0, Math.min (360, hsl.x)) / 60; -var s = Math.max (0, Math.min (100, hsl.y)) / 100; -var l = Math.max (0, Math.min (100, hsl.z)) / 100; -var p = l - (l < 0.5 ? l : 1 - l) * s; -var q = 2 * (l - p); -var r = javajs.util.CU.toRGB (p, q, h + 2); -var g = javajs.util.CU.toRGB (p, q, h); -var b = javajs.util.CU.toRGB (p, q, h - 2); -return javajs.util.P3.new3 (Math.round (r * 255), Math.round (g * 255), Math.round (b * 255)); -}, "javajs.util.P3"); -c$.toRGB = Clazz.defineMethod (c$, "toRGB", -($fz = function (p, q, h) { -return ((h = (h + (h < 0 ? 6 : h > 6 ? -6 : 0))) < 1 ? p + q * h : h < 3 ? p + q : h < 4 ? p + q * (4 - h) : p); -}, $fz.isPrivate = true, $fz), "~N,~N,~N"); -Clazz.defineStatics (c$, -"colorNames", Clazz.newArray (-1, ["black", "pewhite", "pecyan", "pepurple", "pegreen", "peblue", "peviolet", "pebrown", "pepink", "peyellow", "pedarkgreen", "peorange", "pelightblue", "pedarkcyan", "pedarkgray", "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen", "bluetint", "greenblue", "greentint", "grey", "pinktint", "redorange", "yellowtint"]), -"colorArgbs", Clazz.newIntArray (-1, [0xFF000000, 0xFFffffff, 0xFF00ffff, 0xFFd020ff, 0xFF00ff00, 0xFF6060ff, 0xFFff80c0, 0xFFa42028, 0xFFffd8d8, 0xFFffff00, 0xFF00c000, 0xFFffb000, 0xFFb0b0ff, 0xFF00a0a0, 0xFF606060, 0xFFF0F8FF, 0xFFFAEBD7, 0xFF00FFFF, 0xFF7FFFD4, 0xFFF0FFFF, 0xFFF5F5DC, 0xFFFFE4C4, 0xFFFFEBCD, 0xFF0000FF, 0xFF8A2BE2, 0xFFA52A2A, 0xFFDEB887, 0xFF5F9EA0, 0xFF7FFF00, 0xFFD2691E, 0xFFFF7F50, 0xFF6495ED, 0xFFFFF8DC, 0xFFDC143C, 0xFF00FFFF, 0xFF00008B, 0xFF008B8B, 0xFFB8860B, 0xFFA9A9A9, 0xFF006400, 0xFFBDB76B, 0xFF8B008B, 0xFF556B2F, 0xFFFF8C00, 0xFF9932CC, 0xFF8B0000, 0xFFE9967A, 0xFF8FBC8F, 0xFF483D8B, 0xFF2F4F4F, 0xFF00CED1, 0xFF9400D3, 0xFFFF1493, 0xFF00BFFF, 0xFF696969, 0xFF1E90FF, 0xFFB22222, 0xFFFFFAF0, 0xFF228B22, 0xFFFF00FF, 0xFFDCDCDC, 0xFFF8F8FF, 0xFFFFD700, 0xFFDAA520, 0xFF808080, 0xFF008000, 0xFFADFF2F, 0xFFF0FFF0, 0xFFFF69B4, 0xFFCD5C5C, 0xFF4B0082, 0xFFFFFFF0, 0xFFF0E68C, 0xFFE6E6FA, 0xFFFFF0F5, 0xFF7CFC00, 0xFFFFFACD, 0xFFADD8E6, 0xFFF08080, 0xFFE0FFFF, 0xFFFAFAD2, 0xFF90EE90, 0xFFD3D3D3, 0xFFFFB6C1, 0xFFFFA07A, 0xFF20B2AA, 0xFF87CEFA, 0xFF778899, 0xFFB0C4DE, 0xFFFFFFE0, 0xFF00FF00, 0xFF32CD32, 0xFFFAF0E6, 0xFFFF00FF, 0xFF800000, 0xFF66CDAA, 0xFF0000CD, 0xFFBA55D3, 0xFF9370DB, 0xFF3CB371, 0xFF7B68EE, 0xFF00FA9A, 0xFF48D1CC, 0xFFC71585, 0xFF191970, 0xFFF5FFFA, 0xFFFFE4E1, 0xFFFFE4B5, 0xFFFFDEAD, 0xFF000080, 0xFFFDF5E6, 0xFF808000, 0xFF6B8E23, 0xFFFFA500, 0xFFFF4500, 0xFFDA70D6, 0xFFEEE8AA, 0xFF98FB98, 0xFFAFEEEE, 0xFFDB7093, 0xFFFFEFD5, 0xFFFFDAB9, 0xFFCD853F, 0xFFFFC0CB, 0xFFDDA0DD, 0xFFB0E0E6, 0xFF800080, 0xFFFF0000, 0xFFBC8F8F, 0xFF4169E1, 0xFF8B4513, 0xFFFA8072, 0xFFF4A460, 0xFF2E8B57, 0xFFFFF5EE, 0xFFA0522D, 0xFFC0C0C0, 0xFF87CEEB, 0xFF6A5ACD, 0xFF708090, 0xFFFFFAFA, 0xFF00FF7F, 0xFF4682B4, 0xFFD2B48C, 0xFF008080, 0xFFD8BFD8, 0xFFFF6347, 0xFF40E0D0, 0xFFEE82EE, 0xFFF5DEB3, 0xFFFFFFFF, 0xFFF5F5F5, 0xFFFFFF00, 0xFF9ACD32, 0xFFAFD7FF, 0xFF2E8B57, 0xFF98FFB3, 0xFF808080, 0xFFFFABBB, 0xFFFF4500, 0xFFF6F675])); -c$.mapJavaScriptColors = c$.prototype.mapJavaScriptColors = new java.util.Hashtable (); -{ -for (var i = javajs.util.CU.colorNames.length; --i >= 0; ) javajs.util.CU.mapJavaScriptColors.put (javajs.util.CU.colorNames[i], Integer.$valueOf (javajs.util.CU.colorArgbs[i])); - -}}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.util.Hashtable"], "javajs.util.CU", ["javajs.util.P3", "$.PT"], function () { +c$ = Clazz.declareType (javajs.util, "CU"); +c$.toRGBHexString = Clazz.defineMethod (c$, "toRGBHexString", +function (c) { +var rgb = c.getRGB (); +if (rgb == 0) return "000000"; +var r = "00" + Integer.toHexString ((rgb >> 16) & 0xFF); +r = r.substring (r.length - 2); +var g = "00" + Integer.toHexString ((rgb >> 8) & 0xFF); +g = g.substring (g.length - 2); +var b = "00" + Integer.toHexString (rgb & 0xFF); +b = b.substring (b.length - 2); +return r + g + b; +}, "javajs.api.GenericColor"); +c$.toCSSString = Clazz.defineMethod (c$, "toCSSString", +function (c) { +var opacity = c.getOpacity255 (); +if (opacity == 255) return "#" + javajs.util.CU.toRGBHexString (c); +var rgb = c.getRGB (); +return "rgba(" + ((rgb >> 16) & 0xFF) + "," + ((rgb >> 8) & 0xff) + "," + (rgb & 0xff) + "," + opacity / 255 + ")"; +}, "javajs.api.GenericColor"); +c$.getArgbFromString = Clazz.defineMethod (c$, "getArgbFromString", +function (strColor) { +var len = 0; +if (strColor == null || (len = strColor.length) == 0) return 0; +if (strColor.charAt (0) == '[' && strColor.charAt (len - 1) == ']') { +var check; +if (strColor.indexOf (",") >= 0) { +var tokens = javajs.util.PT.split (strColor.substring (1, strColor.length - 1), ","); +if (tokens.length != 3) return 0; +var red = javajs.util.PT.parseFloat (tokens[0]); +var grn = javajs.util.PT.parseFloat (tokens[1]); +var blu = javajs.util.PT.parseFloat (tokens[2]); +return javajs.util.CU.colorTriadToFFRGB (red, grn, blu); +}switch (len) { +case 9: +check = "x"; +break; +case 10: +check = "0x"; +break; +default: +return 0; +} +if (strColor.indexOf (check) != 1) return 0; +strColor = "#" + strColor.substring (len - 7, len - 1); +len = 7; +}if (len == 7 && strColor.charAt (0) == '#') { +try { +return javajs.util.PT.parseIntRadix (strColor.substring (1, 7), 16) | 0xFF000000; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +return 0; +} else { +throw e; +} +} +}var boxedArgb = javajs.util.CU.mapJavaScriptColors.get (strColor.toLowerCase ()); +return (boxedArgb == null ? 0 : boxedArgb.intValue ()); +}, "~S"); +c$.colorTriadToFFRGB = Clazz.defineMethod (c$, "colorTriadToFFRGB", +function (x, y, z) { +if (x <= 1 && y <= 1 && z <= 1) { +if (x > 0) x = x * 256 - 1; +if (y > 0) y = y * 256 - 1; +if (z > 0) z = z * 256 - 1; +}return javajs.util.CU.rgb (Clazz.floatToInt (x), Clazz.floatToInt (y), Clazz.floatToInt (z)); +}, "~N,~N,~N"); +c$.rgb = Clazz.defineMethod (c$, "rgb", +function (red, grn, blu) { +return 0xFF000000 | (red << 16) | (grn << 8) | blu; +}, "~N,~N,~N"); +c$.colorPtFromString = Clazz.defineMethod (c$, "colorPtFromString", +function (colorName) { +return javajs.util.CU.colorPtFromInt (javajs.util.CU.getArgbFromString (colorName), null); +}, "~S"); +c$.colorPtFromInt = Clazz.defineMethod (c$, "colorPtFromInt", +function (color, pt) { +if (pt == null) pt = new javajs.util.P3 (); +pt.set ((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF); +return pt; +}, "~N,javajs.util.P3"); +c$.colorPtToFFRGB = Clazz.defineMethod (c$, "colorPtToFFRGB", +function (pt) { +return javajs.util.CU.colorTriadToFFRGB (pt.x, pt.y, pt.z); +}, "javajs.util.T3"); +c$.toRGB3f = Clazz.defineMethod (c$, "toRGB3f", +function (c, f) { +f[0] = ((c >> 16) & 0xFF) / 255; +f[1] = ((c >> 8) & 0xFF) / 255; +f[2] = (c & 0xFF) / 255; +}, "~N,~A"); +c$.toFFGGGfromRGB = Clazz.defineMethod (c$, "toFFGGGfromRGB", +function (rgb) { +var grey = (Clazz.doubleToInt (((2989 * ((rgb >> 16) & 0xFF)) + (5870 * ((rgb >> 8) & 0xFF)) + (1140 * (rgb & 0xFF)) + 5000) / 10000)) & 0xFFFFFF; +return javajs.util.CU.rgb (grey, grey, grey); +}, "~N"); +c$.rgbToHSL = Clazz.defineMethod (c$, "rgbToHSL", +function (rgb, doRound) { +var r = rgb.x / 255; +var g = rgb.y / 255; +var b = rgb.z / 255; +var min = Math.min (r, Math.min (g, b)); +var max = Math.max (r, Math.max (g, b)); +var p = (max + min); +var q = (max - min); +var h = (60 * ((q == 0 ? 0 : max == r ? ((g - b) / q + 6) : max == g ? (b - r) / q + 2 : (r - g) / q + 4))) % 360; +var s = q / (q == 0 ? 1 : p <= 1 ? p : 2 - p); +return (doRound ? javajs.util.P3.new3 (Math.round (h * 10) / 10, Math.round (s * 1000) / 10, Math.round (p * 500) / 10) : javajs.util.P3.new3 (h, s * 100, p * 50)); +}, "javajs.util.P3,~B"); +c$.hslToRGB = Clazz.defineMethod (c$, "hslToRGB", +function (hsl) { +var h = Math.max (0, Math.min (360, hsl.x)) / 60; +var s = Math.max (0, Math.min (100, hsl.y)) / 100; +var l = Math.max (0, Math.min (100, hsl.z)) / 100; +var p = l - (l < 0.5 ? l : 1 - l) * s; +var q = 2 * (l - p); +var r = javajs.util.CU.toRGB (p, q, h + 2); +var g = javajs.util.CU.toRGB (p, q, h); +var b = javajs.util.CU.toRGB (p, q, h - 2); +return javajs.util.P3.new3 (Math.round (r * 255), Math.round (g * 255), Math.round (b * 255)); +}, "javajs.util.P3"); +c$.toRGB = Clazz.defineMethod (c$, "toRGB", +($fz = function (p, q, h) { +return ((h = (h + (h < 0 ? 6 : h > 6 ? -6 : 0))) < 1 ? p + q * h : h < 3 ? p + q : h < 4 ? p + q * (4 - h) : p); +}, $fz.isPrivate = true, $fz), "~N,~N,~N"); +Clazz.defineStatics (c$, +"colorNames", Clazz.newArray (-1, ["black", "pewhite", "pecyan", "pepurple", "pegreen", "peblue", "peviolet", "pebrown", "pepink", "peyellow", "pedarkgreen", "peorange", "pelightblue", "pedarkcyan", "pedarkgray", "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen", "bluetint", "greenblue", "greentint", "grey", "pinktint", "redorange", "yellowtint"]), +"colorArgbs", Clazz.newIntArray (-1, [0xFF000000, 0xFFffffff, 0xFF00ffff, 0xFFd020ff, 0xFF00ff00, 0xFF6060ff, 0xFFff80c0, 0xFFa42028, 0xFFffd8d8, 0xFFffff00, 0xFF00c000, 0xFFffb000, 0xFFb0b0ff, 0xFF00a0a0, 0xFF606060, 0xFFF0F8FF, 0xFFFAEBD7, 0xFF00FFFF, 0xFF7FFFD4, 0xFFF0FFFF, 0xFFF5F5DC, 0xFFFFE4C4, 0xFFFFEBCD, 0xFF0000FF, 0xFF8A2BE2, 0xFFA52A2A, 0xFFDEB887, 0xFF5F9EA0, 0xFF7FFF00, 0xFFD2691E, 0xFFFF7F50, 0xFF6495ED, 0xFFFFF8DC, 0xFFDC143C, 0xFF00FFFF, 0xFF00008B, 0xFF008B8B, 0xFFB8860B, 0xFFA9A9A9, 0xFF006400, 0xFFBDB76B, 0xFF8B008B, 0xFF556B2F, 0xFFFF8C00, 0xFF9932CC, 0xFF8B0000, 0xFFE9967A, 0xFF8FBC8F, 0xFF483D8B, 0xFF2F4F4F, 0xFF00CED1, 0xFF9400D3, 0xFFFF1493, 0xFF00BFFF, 0xFF696969, 0xFF1E90FF, 0xFFB22222, 0xFFFFFAF0, 0xFF228B22, 0xFFFF00FF, 0xFFDCDCDC, 0xFFF8F8FF, 0xFFFFD700, 0xFFDAA520, 0xFF808080, 0xFF008000, 0xFFADFF2F, 0xFFF0FFF0, 0xFFFF69B4, 0xFFCD5C5C, 0xFF4B0082, 0xFFFFFFF0, 0xFFF0E68C, 0xFFE6E6FA, 0xFFFFF0F5, 0xFF7CFC00, 0xFFFFFACD, 0xFFADD8E6, 0xFFF08080, 0xFFE0FFFF, 0xFFFAFAD2, 0xFF90EE90, 0xFFD3D3D3, 0xFFFFB6C1, 0xFFFFA07A, 0xFF20B2AA, 0xFF87CEFA, 0xFF778899, 0xFFB0C4DE, 0xFFFFFFE0, 0xFF00FF00, 0xFF32CD32, 0xFFFAF0E6, 0xFFFF00FF, 0xFF800000, 0xFF66CDAA, 0xFF0000CD, 0xFFBA55D3, 0xFF9370DB, 0xFF3CB371, 0xFF7B68EE, 0xFF00FA9A, 0xFF48D1CC, 0xFFC71585, 0xFF191970, 0xFFF5FFFA, 0xFFFFE4E1, 0xFFFFE4B5, 0xFFFFDEAD, 0xFF000080, 0xFFFDF5E6, 0xFF808000, 0xFF6B8E23, 0xFFFFA500, 0xFFFF4500, 0xFFDA70D6, 0xFFEEE8AA, 0xFF98FB98, 0xFFAFEEEE, 0xFFDB7093, 0xFFFFEFD5, 0xFFFFDAB9, 0xFFCD853F, 0xFFFFC0CB, 0xFFDDA0DD, 0xFFB0E0E6, 0xFF800080, 0xFFFF0000, 0xFFBC8F8F, 0xFF4169E1, 0xFF8B4513, 0xFFFA8072, 0xFFF4A460, 0xFF2E8B57, 0xFFFFF5EE, 0xFFA0522D, 0xFFC0C0C0, 0xFF87CEEB, 0xFF6A5ACD, 0xFF708090, 0xFFFFFAFA, 0xFF00FF7F, 0xFF4682B4, 0xFFD2B48C, 0xFF008080, 0xFFD8BFD8, 0xFFFF6347, 0xFF40E0D0, 0xFFEE82EE, 0xFFF5DEB3, 0xFFFFFFFF, 0xFFF5F5F5, 0xFFFFFF00, 0xFF9ACD32, 0xFFAFD7FF, 0xFF2E8B57, 0xFF98FFB3, 0xFF808080, 0xFFFFABBB, 0xFFFF4500, 0xFFF6F675])); +c$.mapJavaScriptColors = c$.prototype.mapJavaScriptColors = new java.util.Hashtable (); +{ +for (var i = javajs.util.CU.colorNames.length; --i >= 0; ) javajs.util.CU.mapJavaScriptColors.put (javajs.util.CU.colorNames[i], Integer.$valueOf (javajs.util.CU.colorArgbs[i])); + +}}); diff --git a/bin/javajs/util/CifDataParser.class b/bin/javajs/util/CifDataParser.class index cf79e991924a3c60aac59a51ba61b63b9be2ca3a..56f6075d5e585421483687176876ab3b770e560d 100644 GIT binary patch delta 83 zcmV-Z0IdJyOW{kf`4Ryrv-%R}0Run)3zOs&IRQ|!9~I3A0XMVl9S8ygE&vac_#Y|( p6|*EDUjqRkvxFlB0u&km4-NeQCIJBnA}Rz9{QwLB0Uwi|B}QVr7N!6I delta 86 zcmV-c0IC1sOXN$i`4Rysv-%R}0Ruq*43p#(IRXtrvmO=A2mv^=>>UUK11|s&llLDg s0ulnVA|PJ_0U@)3BLxB#8vqau{QxEb0SO{11P=WG3;_Wg0+X91Mv$Bqr2qf` diff --git a/bin/javajs/util/CifDataParser.js b/bin/javajs/util/CifDataParser.js index c00c5e1..07e1495 100644 --- a/bin/javajs/util/CifDataParser.js +++ b/bin/javajs/util/CifDataParser.js @@ -1,303 +1,303 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.api.GenericCifDataParser", "java.util.Hashtable", "javajs.util.SB"], "javajs.util.CifDataParser", ["javajs.util.Lst", "$.PT"], function () { -c$ = Clazz.decorateAsClass (function () { -this.reader = null; -this.br = null; -this.line = null; -this.str = null; -this.ich = 0; -this.cch = 0; -this.wasUnQuoted = false; -this.strPeeked = null; -this.ichPeeked = 0; -this.fieldCount = 0; -this.loopData = null; -this.fileHeader = null; -this.isHeader = true; -this.nullString = "\0"; -this.fields = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "CifDataParser", null, javajs.api.GenericCifDataParser); -Clazz.prepareFields (c$, function () { -this.fileHeader = new javajs.util.SB (); -}); -Clazz.defineMethod (c$, "setNullValue", -function (nullString) { -this.nullString = nullString; -}, "~S"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.overrideMethod (c$, "getLoopData", -function (i) { -return this.loopData[i]; -}, "~N"); -Clazz.overrideMethod (c$, "getFieldCount", -function () { -return this.fieldCount; -}); -Clazz.overrideMethod (c$, "getField", -function (i) { -return this.fields[i]; -}, "~N"); -Clazz.overrideMethod (c$, "set", -function (reader, br) { -this.reader = reader; -this.br = br; -return this; -}, "javajs.api.GenericLineReader,java.io.BufferedReader"); -Clazz.overrideMethod (c$, "getFileHeader", -function () { -return this.fileHeader.toString (); -}); -Clazz.overrideMethod (c$, "getAllCifData", -function () { -this.line = ""; -var key; -var data = null; -var allData = new java.util.Hashtable (); -var models = new javajs.util.Lst (); -allData.put ("models", models); -try { -while ((key = this.getNextToken ()) != null) { -if (key.startsWith ("global_") || key.startsWith ("data_")) { -models.addLast (data = new java.util.Hashtable ()); -data.put ("name", key); -continue; -}if (key.startsWith ("loop_")) { -this.getAllCifLoopData (data); -continue; -}if (key.charAt (0) != '_') { -System.out.println ("CIF ERROR ? should be an underscore: " + key); -} else { -var value = this.getNextToken (); -if (value == null) { -System.out.println ("CIF ERROR ? end of file; data missing: " + key); -} else { -data.put (this.fixKey (key), value); -}}} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -try { -if (this.br != null) this.br.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -return allData; -}); -Clazz.defineMethod (c$, "getAllCifLoopData", -($fz = function (data) { -var key; -var keyWords = new javajs.util.Lst (); -while ((key = this.peekToken ()) != null && key.charAt (0) == '_') { -key = this.fixKey (this.getTokenPeeked ()); -keyWords.addLast (key); -data.put (key, new javajs.util.Lst ()); -} -this.fieldCount = keyWords.size (); -if (this.fieldCount == 0) return; -this.loopData = new Array (this.fieldCount); -while (this.getData ()) for (var i = 0; i < this.fieldCount; i++) (data.get (keyWords.get (i))).addLast (this.loopData[i]); - - -}, $fz.isPrivate = true, $fz), "java.util.Map"); -Clazz.overrideMethod (c$, "readLine", -function () { -try { -this.line = (this.reader == null ? this.br.readLine () : this.reader.readNextLine ()); -if (this.line == null) return null; -if (this.isHeader) { -if (this.line.startsWith ("#")) this.fileHeader.append (this.line).appendC ('\n'); - else this.isHeader = false; -}return this.line; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -return null; -} else { -throw e; -} -} -}); -Clazz.overrideMethod (c$, "getData", -function () { -for (var i = 0; i < this.fieldCount; ++i) if ((this.loopData[i] = this.getNextDataToken ()) == null) return false; - -return (this.fieldCount > 0); -}); -Clazz.overrideMethod (c$, "skipLoop", -function (doReport) { -var str; -var ret = (doReport ? new javajs.util.SB () : null); -var n = 0; -while ((str = this.peekToken ()) != null && str.charAt (0) == '_') { -if (ret != null) ret.append (str).append ("\n"); -this.getTokenPeeked (); -n++; -} -var m = 0; -while ((str = this.getNextDataToken ()) != null) { -if (ret == null) continue; -ret.append (str).append (" "); -if ((++m % n) == 0) ret.append ("\n"); -} -return (ret == null ? null : ret.toString ()); -}, "~B"); -Clazz.overrideMethod (c$, "getNextToken", -function () { -while (!this.strHasMoreTokens ()) if (this.setStringNextLine () == null) return null; - -return this.nextStrToken (); -}); -Clazz.overrideMethod (c$, "getNextDataToken", -function () { -var str = this.peekToken (); -if (str == null) return null; -if (this.wasUnQuoted) if (str.charAt (0) == '_' || str.startsWith ("loop_") || str.startsWith ("data_") || str.startsWith ("stop_") || str.startsWith ("global_")) return null; -return this.getTokenPeeked (); -}); -Clazz.overrideMethod (c$, "peekToken", -function () { -while (!this.strHasMoreTokens ()) if (this.setStringNextLine () == null) return null; - -var ich = this.ich; -this.strPeeked = this.nextStrToken (); -this.ichPeeked = this.ich; -this.ich = ich; -return this.strPeeked; -}); -Clazz.overrideMethod (c$, "getTokenPeeked", -function () { -this.ich = this.ichPeeked; -return this.strPeeked; -}); -Clazz.overrideMethod (c$, "fullTrim", -function (str) { -var pt0 = -1; -var pt1 = str.length; -while (++pt0 < pt1 && javajs.util.PT.isWhitespace (str.charAt (pt0))) { -} -while (--pt1 > pt0 && javajs.util.PT.isWhitespace (str.charAt (pt1))) { -} -return str.substring (pt0, pt1 + 1); -}, "~S"); -Clazz.overrideMethod (c$, "toUnicode", -function (data) { -var pt; -try { -while ((pt = data.indexOf ('\\')) >= 0) { -var c = data.charCodeAt (pt + 1); -var ch = (c >= 65 && c <= 90 ? "ABX\u0394E\u03a6\u0393HI_K\u039bMNO\u03a0\u0398P\u03a3TY_\u03a9\u039e\u03a5Z".substring (c - 65, c - 64) : c >= 97 && c <= 122 ? "\u03b1\u03b2\u03c7\u03a4\u03a5\u03c6\u03b3\u03b7\u03b9_\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03b8\u03c1\u03c3\u03c4\u03c5_\u03c9\u03be\u03c5\u03b6".substring (c - 97, c - 96) : "_"); -data = data.substring (0, pt) + ch + data.substring (pt + 2); -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -return data; -}, "~S"); -Clazz.overrideMethod (c$, "parseLoopParameters", -function (fields, fieldOf, propertyOf) { -var propertyCount = 0; -if (fields == null) { -this.fields = new Array (100); -} else { -if (!javajs.util.CifDataParser.htFields.containsKey (fields[0])) for (var i = fields.length; --i >= 0; ) javajs.util.CifDataParser.htFields.put (fields[i], Integer.$valueOf (i)); - -for (var i = fields.length; --i >= 0; ) fieldOf[i] = -1; - -propertyCount = fields.length; -}this.fieldCount = 0; -while (true) { -var str = this.peekToken (); -if (str == null) { -this.fieldCount = 0; -break; -}if (str.charAt (0) != '_') break; -var pt = this.fieldCount++; -str = this.fixKey (this.getTokenPeeked ()); -if (fields == null) { -this.fields[propertyOf[pt] = fieldOf[pt] = pt] = str; -continue; -}var iField = javajs.util.CifDataParser.htFields.get (str); -var i = (iField == null ? -1 : iField.intValue ()); -if ((propertyOf[pt] = i) != -1) fieldOf[i] = pt; -} -if (this.fieldCount > 0) this.loopData = new Array (this.fieldCount); -return propertyCount; -}, "~A,~A,~A"); -Clazz.overrideMethod (c$, "fixKey", -function (key) { -return (javajs.util.PT.rep (key.startsWith ("_magnetic") ? key.substring (9) : key.startsWith ("_jana") ? key.substring (5) : key, ".", "_").toLowerCase ()); -}, "~S"); -Clazz.defineMethod (c$, "setString", -($fz = function (str) { -this.str = this.line = str; -this.cch = (str == null ? 0 : str.length); -this.ich = 0; -}, $fz.isPrivate = true, $fz), "~S"); -Clazz.defineMethod (c$, "setStringNextLine", -($fz = function () { -this.setString (this.readLine ()); -if (this.line == null || this.line.length == 0) return this.line; -if (this.line.charAt (0) != ';') { -if (this.str.startsWith ("###non-st#")) this.ich = 10; -return this.line; -}this.ich = 1; -var str = '\1' + this.line.substring (1) + '\n'; -while (this.readLine () != null) { -if (this.line.startsWith (";")) { -str = str.substring (0, str.length - 1) + '\1' + this.line.substring (1); -break; -}str += this.line + '\n'; -} -this.setString (str); -return str; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "strHasMoreTokens", -($fz = function () { -if (this.str == null) return false; -var ch = '#'; -while (this.ich < this.cch && ((ch = this.str.charAt (this.ich)) == ' ' || ch == '\t')) ++this.ich; - -return (this.ich < this.cch && ch != '#'); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "nextStrToken", -($fz = function () { -if (this.ich == this.cch) return null; -var ichStart = this.ich; -var ch = this.str.charAt (ichStart); -if (ch != '\'' && ch != '"' && ch != '\1') { -this.wasUnQuoted = true; -while (this.ich < this.cch && (ch = this.str.charAt (this.ich)) != ' ' && ch != '\t') ++this.ich; - -if (this.ich == ichStart + 1) if (this.nullString != null && (this.str.charAt (ichStart) == '.' || this.str.charAt (ichStart) == '?')) return this.nullString; -var s = this.str.substring (ichStart, this.ich); -return s; -}this.wasUnQuoted = false; -var chOpeningQuote = ch; -var previousCharacterWasQuote = false; -while (++this.ich < this.cch) { -ch = this.str.charAt (this.ich); -if (previousCharacterWasQuote && (ch == ' ' || ch == '\t')) break; -previousCharacterWasQuote = (ch == chOpeningQuote); -} -if (this.ich == this.cch) { -if (previousCharacterWasQuote) return this.str.substring (ichStart + 1, this.ich - 1); -return this.str.substring (ichStart, this.ich); -}++this.ich; -return this.str.substring (ichStart + 1, this.ich - 2); -}, $fz.isPrivate = true, $fz)); -c$.htFields = c$.prototype.htFields = new java.util.Hashtable (); -Clazz.defineStatics (c$, -"grABC", "ABX\u0394E\u03a6\u0393HI_K\u039bMNO\u03a0\u0398P\u03a3TY_\u03a9\u039e\u03a5Z", -"grabc", "\u03b1\u03b2\u03c7\u03a4\u03a5\u03c6\u03b3\u03b7\u03b9_\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03b8\u03c1\u03c3\u03c4\u03c5_\u03c9\u03be\u03c5\u03b6"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.GenericCifDataParser", "java.util.Hashtable", "javajs.util.SB"], "javajs.util.CifDataParser", ["javajs.util.Lst", "$.PT"], function () { +c$ = Clazz.decorateAsClass (function () { +this.reader = null; +this.br = null; +this.line = null; +this.str = null; +this.ich = 0; +this.cch = 0; +this.wasUnQuoted = false; +this.strPeeked = null; +this.ichPeeked = 0; +this.fieldCount = 0; +this.loopData = null; +this.fileHeader = null; +this.isHeader = true; +this.nullString = "\0"; +this.fields = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "CifDataParser", null, javajs.api.GenericCifDataParser); +Clazz.prepareFields (c$, function () { +this.fileHeader = new javajs.util.SB (); +}); +Clazz.defineMethod (c$, "setNullValue", +function (nullString) { +this.nullString = nullString; +}, "~S"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.overrideMethod (c$, "getLoopData", +function (i) { +return this.loopData[i]; +}, "~N"); +Clazz.overrideMethod (c$, "getFieldCount", +function () { +return this.fieldCount; +}); +Clazz.overrideMethod (c$, "getField", +function (i) { +return this.fields[i]; +}, "~N"); +Clazz.overrideMethod (c$, "set", +function (reader, br) { +this.reader = reader; +this.br = br; +return this; +}, "javajs.api.GenericLineReader,java.io.BufferedReader"); +Clazz.overrideMethod (c$, "getFileHeader", +function () { +return this.fileHeader.toString (); +}); +Clazz.overrideMethod (c$, "getAllCifData", +function () { +this.line = ""; +var key; +var data = null; +var allData = new java.util.Hashtable (); +var models = new javajs.util.Lst (); +allData.put ("models", models); +try { +while ((key = this.getNextToken ()) != null) { +if (key.startsWith ("global_") || key.startsWith ("data_")) { +models.addLast (data = new java.util.Hashtable ()); +data.put ("name", key); +continue; +}if (key.startsWith ("loop_")) { +this.getAllCifLoopData (data); +continue; +}if (key.charAt (0) != '_') { +System.out.println ("CIF ERROR ? should be an underscore: " + key); +} else { +var value = this.getNextToken (); +if (value == null) { +System.out.println ("CIF ERROR ? end of file; data missing: " + key); +} else { +data.put (this.fixKey (key), value); +}}} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +try { +if (this.br != null) this.br.close (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +return allData; +}); +Clazz.defineMethod (c$, "getAllCifLoopData", +($fz = function (data) { +var key; +var keyWords = new javajs.util.Lst (); +while ((key = this.peekToken ()) != null && key.charAt (0) == '_') { +key = this.fixKey (this.getTokenPeeked ()); +keyWords.addLast (key); +data.put (key, new javajs.util.Lst ()); +} +this.fieldCount = keyWords.size (); +if (this.fieldCount == 0) return; +this.loopData = new Array (this.fieldCount); +while (this.getData ()) for (var i = 0; i < this.fieldCount; i++) (data.get (keyWords.get (i))).addLast (this.loopData[i]); + + +}, $fz.isPrivate = true, $fz), "java.util.Map"); +Clazz.overrideMethod (c$, "readLine", +function () { +try { +this.line = (this.reader == null ? this.br.readLine () : this.reader.readNextLine ()); +if (this.line == null) return null; +if (this.isHeader) { +if (this.line.startsWith ("#")) this.fileHeader.append (this.line).appendC ('\n'); + else this.isHeader = false; +}return this.line; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +return null; +} else { +throw e; +} +} +}); +Clazz.overrideMethod (c$, "getData", +function () { +for (var i = 0; i < this.fieldCount; ++i) if ((this.loopData[i] = this.getNextDataToken ()) == null) return false; + +return (this.fieldCount > 0); +}); +Clazz.overrideMethod (c$, "skipLoop", +function (doReport) { +var str; +var ret = (doReport ? new javajs.util.SB () : null); +var n = 0; +while ((str = this.peekToken ()) != null && str.charAt (0) == '_') { +if (ret != null) ret.append (str).append ("\n"); +this.getTokenPeeked (); +n++; +} +var m = 0; +while ((str = this.getNextDataToken ()) != null) { +if (ret == null) continue; +ret.append (str).append (" "); +if ((++m % n) == 0) ret.append ("\n"); +} +return (ret == null ? null : ret.toString ()); +}, "~B"); +Clazz.overrideMethod (c$, "getNextToken", +function () { +while (!this.strHasMoreTokens ()) if (this.setStringNextLine () == null) return null; + +return this.nextStrToken (); +}); +Clazz.overrideMethod (c$, "getNextDataToken", +function () { +var str = this.peekToken (); +if (str == null) return null; +if (this.wasUnQuoted) if (str.charAt (0) == '_' || str.startsWith ("loop_") || str.startsWith ("data_") || str.startsWith ("stop_") || str.startsWith ("global_")) return null; +return this.getTokenPeeked (); +}); +Clazz.overrideMethod (c$, "peekToken", +function () { +while (!this.strHasMoreTokens ()) if (this.setStringNextLine () == null) return null; + +var ich = this.ich; +this.strPeeked = this.nextStrToken (); +this.ichPeeked = this.ich; +this.ich = ich; +return this.strPeeked; +}); +Clazz.overrideMethod (c$, "getTokenPeeked", +function () { +this.ich = this.ichPeeked; +return this.strPeeked; +}); +Clazz.overrideMethod (c$, "fullTrim", +function (str) { +var pt0 = -1; +var pt1 = str.length; +while (++pt0 < pt1 && javajs.util.PT.isWhitespace (str.charAt (pt0))) { +} +while (--pt1 > pt0 && javajs.util.PT.isWhitespace (str.charAt (pt1))) { +} +return str.substring (pt0, pt1 + 1); +}, "~S"); +Clazz.overrideMethod (c$, "toUnicode", +function (data) { +var pt; +try { +while ((pt = data.indexOf ('\\')) >= 0) { +var c = data.charCodeAt (pt + 1); +var ch = (c >= 65 && c <= 90 ? "ABX\u0394E\u03a6\u0393HI_K\u039bMNO\u03a0\u0398P\u03a3TY_\u03a9\u039e\u03a5Z".substring (c - 65, c - 64) : c >= 97 && c <= 122 ? "\u03b1\u03b2\u03c7\u03a4\u03a5\u03c6\u03b3\u03b7\u03b9_\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03b8\u03c1\u03c3\u03c4\u03c5_\u03c9\u03be\u03c5\u03b6".substring (c - 97, c - 96) : "_"); +data = data.substring (0, pt) + ch + data.substring (pt + 2); +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +return data; +}, "~S"); +Clazz.overrideMethod (c$, "parseLoopParameters", +function (fields, fieldOf, propertyOf) { +var propertyCount = 0; +if (fields == null) { +this.fields = new Array (100); +} else { +if (!javajs.util.CifDataParser.htFields.containsKey (fields[0])) for (var i = fields.length; --i >= 0; ) javajs.util.CifDataParser.htFields.put (fields[i], Integer.$valueOf (i)); + +for (var i = fields.length; --i >= 0; ) fieldOf[i] = -1; + +propertyCount = fields.length; +}this.fieldCount = 0; +while (true) { +var str = this.peekToken (); +if (str == null) { +this.fieldCount = 0; +break; +}if (str.charAt (0) != '_') break; +var pt = this.fieldCount++; +str = this.fixKey (this.getTokenPeeked ()); +if (fields == null) { +this.fields[propertyOf[pt] = fieldOf[pt] = pt] = str; +continue; +}var iField = javajs.util.CifDataParser.htFields.get (str); +var i = (iField == null ? -1 : iField.intValue ()); +if ((propertyOf[pt] = i) != -1) fieldOf[i] = pt; +} +if (this.fieldCount > 0) this.loopData = new Array (this.fieldCount); +return propertyCount; +}, "~A,~A,~A"); +Clazz.overrideMethod (c$, "fixKey", +function (key) { +return (javajs.util.PT.rep (key.startsWith ("_magnetic") ? key.substring (9) : key.startsWith ("_jana") ? key.substring (5) : key, ".", "_").toLowerCase ()); +}, "~S"); +Clazz.defineMethod (c$, "setString", +($fz = function (str) { +this.str = this.line = str; +this.cch = (str == null ? 0 : str.length); +this.ich = 0; +}, $fz.isPrivate = true, $fz), "~S"); +Clazz.defineMethod (c$, "setStringNextLine", +($fz = function () { +this.setString (this.readLine ()); +if (this.line == null || this.line.length == 0) return this.line; +if (this.line.charAt (0) != ';') { +if (this.str.startsWith ("###non-st#")) this.ich = 10; +return this.line; +}this.ich = 1; +var str = '\1' + this.line.substring (1) + '\n'; +while (this.readLine () != null) { +if (this.line.startsWith (";")) { +str = str.substring (0, str.length - 1) + '\1' + this.line.substring (1); +break; +}str += this.line + '\n'; +} +this.setString (str); +return str; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "strHasMoreTokens", +($fz = function () { +if (this.str == null) return false; +var ch = '#'; +while (this.ich < this.cch && ((ch = this.str.charAt (this.ich)) == ' ' || ch == '\t')) ++this.ich; + +return (this.ich < this.cch && ch != '#'); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "nextStrToken", +($fz = function () { +if (this.ich == this.cch) return null; +var ichStart = this.ich; +var ch = this.str.charAt (ichStart); +if (ch != '\'' && ch != '"' && ch != '\1') { +this.wasUnQuoted = true; +while (this.ich < this.cch && (ch = this.str.charAt (this.ich)) != ' ' && ch != '\t') ++this.ich; + +if (this.ich == ichStart + 1) if (this.nullString != null && (this.str.charAt (ichStart) == '.' || this.str.charAt (ichStart) == '?')) return this.nullString; +var s = this.str.substring (ichStart, this.ich); +return s; +}this.wasUnQuoted = false; +var chOpeningQuote = ch; +var previousCharacterWasQuote = false; +while (++this.ich < this.cch) { +ch = this.str.charAt (this.ich); +if (previousCharacterWasQuote && (ch == ' ' || ch == '\t')) break; +previousCharacterWasQuote = (ch == chOpeningQuote); +} +if (this.ich == this.cch) { +if (previousCharacterWasQuote) return this.str.substring (ichStart + 1, this.ich - 1); +return this.str.substring (ichStart, this.ich); +}++this.ich; +return this.str.substring (ichStart + 1, this.ich - 2); +}, $fz.isPrivate = true, $fz)); +c$.htFields = c$.prototype.htFields = new java.util.Hashtable (); +Clazz.defineStatics (c$, +"grABC", "ABX\u0394E\u03a6\u0393HI_K\u039bMNO\u03a0\u0398P\u03a3TY_\u03a9\u039e\u03a5Z", +"grabc", "\u03b1\u03b2\u03c7\u03a4\u03a5\u03c6\u03b3\u03b7\u03b9_\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03b8\u03c1\u03c3\u03c4\u03c5_\u03c9\u03be\u03c5\u03b6"); +}); diff --git a/bin/javajs/util/CompoundDocDirEntry.js b/bin/javajs/util/CompoundDocDirEntry.js index d792190..5c3ab43 100644 --- a/bin/javajs/util/CompoundDocDirEntry.js +++ b/bin/javajs/util/CompoundDocDirEntry.js @@ -1,58 +1,58 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.cd = null; -this.unicodeName64 = null; -this.nBytesUnicodeName = 0; -this.entryType = 0; -this.uniqueID16 = null; -this.userflags4 = null; -this.SIDfirstSector = 0; -this.lenStream = 0; -this.unused = null; -this.entryName = null; -this.isStandard = false; -this.isEmpty = false; -Clazz.instantialize (this, arguments); -}, javajs.util, "CompoundDocDirEntry"); -Clazz.prepareFields (c$, function () { -this.unicodeName64 = Clazz.newByteArray (64, 0); -this.uniqueID16 = Clazz.newByteArray (16, 0); -this.userflags4 = Clazz.newByteArray (4, 0); -this.unused = Clazz.newByteArray (8, 0); -}); -Clazz.makeConstructor (c$, -function (compoundDocument) { -this.cd = compoundDocument; -}, "javajs.util.CompoundDocument"); -Clazz.defineMethod (c$, "readData", -function () { -try { -this.cd.readByteArray (this.unicodeName64, 0, 64); -this.nBytesUnicodeName = this.cd.readShort (); -this.entryType = this.cd.readByte (); -this.cd.readByte (); -this.cd.readInt (); -this.cd.readInt (); -this.cd.readInt (); -this.cd.readByteArray (this.uniqueID16, 0, 16); -this.cd.readByteArray (this.userflags4, 0, 4); -this.cd.readByteArray (this.unused, 0, 8); -this.cd.readByteArray (this.unused, 0, 8); -this.SIDfirstSector = this.cd.readInt (); -this.lenStream = this.cd.readInt (); -this.cd.readByteArray (this.unused, 0, 4); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -return false; -} else { -throw e; -} -} -this.entryName = ""; -for (var i = 0; i < this.nBytesUnicodeName - 2; i += 2) this.entryName += String.fromCharCode (this.unicodeName64[i]); - -this.isStandard = (this.entryType == 5 || this.lenStream >= this.cd.header.minBytesStandardStream); -this.isEmpty = (this.entryType == 0 || this.lenStream <= 0); -return true; -}); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.cd = null; +this.unicodeName64 = null; +this.nBytesUnicodeName = 0; +this.entryType = 0; +this.uniqueID16 = null; +this.userflags4 = null; +this.SIDfirstSector = 0; +this.lenStream = 0; +this.unused = null; +this.entryName = null; +this.isStandard = false; +this.isEmpty = false; +Clazz.instantialize (this, arguments); +}, javajs.util, "CompoundDocDirEntry"); +Clazz.prepareFields (c$, function () { +this.unicodeName64 = Clazz.newByteArray (64, 0); +this.uniqueID16 = Clazz.newByteArray (16, 0); +this.userflags4 = Clazz.newByteArray (4, 0); +this.unused = Clazz.newByteArray (8, 0); +}); +Clazz.makeConstructor (c$, +function (compoundDocument) { +this.cd = compoundDocument; +}, "javajs.util.CompoundDocument"); +Clazz.defineMethod (c$, "readData", +function () { +try { +this.cd.readByteArray (this.unicodeName64, 0, 64); +this.nBytesUnicodeName = this.cd.readShort (); +this.entryType = this.cd.readByte (); +this.cd.readByte (); +this.cd.readInt (); +this.cd.readInt (); +this.cd.readInt (); +this.cd.readByteArray (this.uniqueID16, 0, 16); +this.cd.readByteArray (this.userflags4, 0, 4); +this.cd.readByteArray (this.unused, 0, 8); +this.cd.readByteArray (this.unused, 0, 8); +this.SIDfirstSector = this.cd.readInt (); +this.lenStream = this.cd.readInt (); +this.cd.readByteArray (this.unused, 0, 4); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +return false; +} else { +throw e; +} +} +this.entryName = ""; +for (var i = 0; i < this.nBytesUnicodeName - 2; i += 2) this.entryName += String.fromCharCode (this.unicodeName64[i]); + +this.isStandard = (this.entryType == 5 || this.lenStream >= this.cd.header.minBytesStandardStream); +this.isEmpty = (this.entryType == 0 || this.lenStream <= 0); +return true; +}); diff --git a/bin/javajs/util/CompoundDocHeader.js b/bin/javajs/util/CompoundDocHeader.js index 14d9c45..30d7fd1 100644 --- a/bin/javajs/util/CompoundDocHeader.js +++ b/bin/javajs/util/CompoundDocHeader.js @@ -1,66 +1,66 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.cd = null; -this.magicNumbers = null; -this.uniqueID16 = null; -this.revNumber = 0; -this.verNumber = 0; -this.sectorPower = 0; -this.shortSectorPower = 0; -this.unused = null; -this.nSATsectors = 0; -this.SID_DIR_start = 0; -this.minBytesStandardStream = 0; -this.SID_SSAT_start = 0; -this.nSSATsectors = 0; -this.SID_MSAT_next = 0; -this.nAdditionalMATsectors = 0; -this.MSAT0 = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "CompoundDocHeader"); -Clazz.prepareFields (c$, function () { -this.magicNumbers = Clazz.newByteArray (8, 0); -this.uniqueID16 = Clazz.newByteArray (16, 0); -this.unused = Clazz.newByteArray (10, 0); -this.MSAT0 = Clazz.newIntArray (109, 0); -}); -Clazz.makeConstructor (c$, -function (compoundDocument) { -this.cd = compoundDocument; -}, "javajs.util.CompoundDocument"); -Clazz.defineMethod (c$, "readData", -function () { -try { -this.cd.readByteArray (this.magicNumbers, 0, 8); -if (this.magicNumbers[0] != 0xD0 || this.magicNumbers[1] != 0xCF || this.magicNumbers[2] != 0x11 || this.magicNumbers[3] != 0xE0 || this.magicNumbers[4] != 0xA1 || this.magicNumbers[5] != 0xB1 || this.magicNumbers[6] != 0x1A || this.magicNumbers[7] != 0xE1) return false; -this.cd.readByteArray (this.uniqueID16, 0, 16); -this.revNumber = this.cd.readByte (); -this.cd.readByte (); -this.verNumber = this.cd.readByte (); -this.cd.readByte (); -var b1 = this.cd.readByte (); -var b2 = this.cd.readByte (); -this.cd.isBigEndian = (b1 == -1 && b2 == -2); -this.sectorPower = this.cd.readShort (); -this.shortSectorPower = this.cd.readShort (); -this.cd.readByteArray (this.unused, 0, 10); -this.nSATsectors = this.cd.readInt (); -this.SID_DIR_start = this.cd.readInt (); -this.cd.readByteArray (this.unused, 0, 4); -this.minBytesStandardStream = this.cd.readInt (); -this.SID_SSAT_start = this.cd.readInt (); -this.nSSATsectors = this.cd.readInt (); -this.SID_MSAT_next = this.cd.readInt (); -this.nAdditionalMATsectors = this.cd.readInt (); -for (var i = 0; i < 109; i++) this.MSAT0[i] = this.cd.readInt (); - -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -return false; -} else { -throw e; -} -} -return true; -}); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.cd = null; +this.magicNumbers = null; +this.uniqueID16 = null; +this.revNumber = 0; +this.verNumber = 0; +this.sectorPower = 0; +this.shortSectorPower = 0; +this.unused = null; +this.nSATsectors = 0; +this.SID_DIR_start = 0; +this.minBytesStandardStream = 0; +this.SID_SSAT_start = 0; +this.nSSATsectors = 0; +this.SID_MSAT_next = 0; +this.nAdditionalMATsectors = 0; +this.MSAT0 = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "CompoundDocHeader"); +Clazz.prepareFields (c$, function () { +this.magicNumbers = Clazz.newByteArray (8, 0); +this.uniqueID16 = Clazz.newByteArray (16, 0); +this.unused = Clazz.newByteArray (10, 0); +this.MSAT0 = Clazz.newIntArray (109, 0); +}); +Clazz.makeConstructor (c$, +function (compoundDocument) { +this.cd = compoundDocument; +}, "javajs.util.CompoundDocument"); +Clazz.defineMethod (c$, "readData", +function () { +try { +this.cd.readByteArray (this.magicNumbers, 0, 8); +if (this.magicNumbers[0] != 0xD0 || this.magicNumbers[1] != 0xCF || this.magicNumbers[2] != 0x11 || this.magicNumbers[3] != 0xE0 || this.magicNumbers[4] != 0xA1 || this.magicNumbers[5] != 0xB1 || this.magicNumbers[6] != 0x1A || this.magicNumbers[7] != 0xE1) return false; +this.cd.readByteArray (this.uniqueID16, 0, 16); +this.revNumber = this.cd.readByte (); +this.cd.readByte (); +this.verNumber = this.cd.readByte (); +this.cd.readByte (); +var b1 = this.cd.readByte (); +var b2 = this.cd.readByte (); +this.cd.isBigEndian = (b1 == -1 && b2 == -2); +this.sectorPower = this.cd.readShort (); +this.shortSectorPower = this.cd.readShort (); +this.cd.readByteArray (this.unused, 0, 10); +this.nSATsectors = this.cd.readInt (); +this.SID_DIR_start = this.cd.readInt (); +this.cd.readByteArray (this.unused, 0, 4); +this.minBytesStandardStream = this.cd.readInt (); +this.SID_SSAT_start = this.cd.readInt (); +this.nSSATsectors = this.cd.readInt (); +this.SID_MSAT_next = this.cd.readInt (); +this.nAdditionalMATsectors = this.cd.readInt (); +for (var i = 0; i < 109; i++) this.MSAT0[i] = this.cd.readInt (); + +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +return false; +} else { +throw e; +} +} +return true; +}); diff --git a/bin/javajs/util/CompoundDocument.class b/bin/javajs/util/CompoundDocument.class index ef31fcfbb55fa69ee187d79c4889e2944a74dccb..d2a24d46dda6a2a34c8418b39951e1fb8e620042 100644 GIT binary patch delta 158 zcmaFpd)s$Ix(s9M<_sAnCgvmt!O6XHfwKP@co~@385kKE7}*(ZxEPoi0vRM37#XA( z7#Jlt|C3{86cS}%`^TWj$jJDIfs2v<7X!cdW)X!fX2zn;^~w>98j=iLe;8!Ik_t?} z7&!hgurhLq0$HpKOpFPPu~5UVZBkv!$gIJ@K6!(hf`C8JGIb%KwfzhXKxGpEW9J_^ delta 145 zcmccZ`_Okox(s8-<_sAnCgxNIp~<~+fowk+xc)ORO@1gR$tbn?w;VI0uowgTKL$lc zM#eu3T#Wp`82CAyHVY_ZF*6o#u2zm<)Rbc2{=*;xmQ`T-#lXt+hk=!mOBBRpU}8*Q tjAdYCkYZq9yuSIj%34NdO$Lt1tJM?)d7Ri8ZPbMr7#aH+7=Q{V000WKA>RN1 diff --git a/bin/javajs/util/CompoundDocument.js b/bin/javajs/util/CompoundDocument.js index 7e480bc..a37c69e 100644 --- a/bin/javajs/util/CompoundDocument.js +++ b/bin/javajs/util/CompoundDocument.js @@ -1,286 +1,286 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.BinaryDocument", "$.CompoundDocHeader", "$.Lst"], "javajs.util.CompoundDocument", ["java.io.DataInputStream", "javajs.util.CompoundDocDirEntry", "$.SB", "$.ZipData"], function () { -c$ = Clazz.decorateAsClass (function () { -this.header = null; -this.directory = null; -this.rootEntry = null; -this.SAT = null; -this.SSAT = null; -this.sectorSize = 0; -this.shortSectorSize = 0; -this.nShortSectorsPerStandardSector = 0; -this.nIntPerSector = 0; -this.nDirEntriesperSector = 0; -this.data = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "CompoundDocument", javajs.util.BinaryDocument); -Clazz.prepareFields (c$, function () { -this.header = new javajs.util.CompoundDocHeader (this); -this.directory = new javajs.util.Lst (); -}); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.util.CompoundDocument); -this.isBigEndian = true; -}); -Clazz.overrideMethod (c$, "setStream", -function (jzt, bis, isBigEndian) { -this.jzt = jzt; -if (!this.isRandom) { -this.stream = new java.io.DataInputStream (bis); -}this.stream.mark (2147483647); -if (!this.readHeader ()) return; -this.getSectorAllocationTable (); -this.getShortSectorAllocationTable (); -this.getDirectoryTable (); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~B"); -Clazz.defineMethod (c$, "getDirectory", -function () { -return this.directory; -}); -Clazz.defineMethod (c$, "getDirectoryListing", -function (separator) { -var str = ""; -for (var i = 0; i < this.directory.size (); i++) { -var thisEntry = this.directory.get (i); -if (!thisEntry.isEmpty) str += separator + thisEntry.entryName + "\tlen=" + thisEntry.lenStream + "\tSID=" + thisEntry.SIDfirstSector + (thisEntry.isStandard ? "\tfileOffset=" + this.getOffset (thisEntry.SIDfirstSector) : ""); -} -return str; -}, "~S"); -Clazz.defineMethod (c$, "getAllData", -function () { -return this.getAllDataFiles (null, null); -}); -Clazz.overrideMethod (c$, "getAllDataMapped", -function (prefix, binaryFileList, fileData) { -fileData.put ("#Directory_Listing", this.getDirectoryListing ("|")); -binaryFileList = "|" + binaryFileList + "|"; -for (var i = 0; i < this.directory.size (); i++) { -var thisEntry = this.directory.get (i); -if (!thisEntry.isEmpty && thisEntry.entryType != 5) { -var name = thisEntry.entryName; -System.out.println ("CompoundDocument file " + name); -var isBinary = (binaryFileList.indexOf ("|" + name + "|") >= 0); -if (isBinary) name += ":asBinaryString"; -var data = new javajs.util.SB (); -data.append ("BEGIN Directory Entry ").append (name).append ("\n"); -data.appendSB (this.getEntryAsString (thisEntry, isBinary)); -data.append ("\nEND Directory Entry ").append (name).append ("\n"); -fileData.put (prefix + "/" + name, data.toString ()); -}} -this.close (); -}, "~S,~S,java.util.Map"); -Clazz.overrideMethod (c$, "getAllDataFiles", -function (binaryFileList, firstFile) { -if (firstFile != null) { -for (var i = 0; i < this.directory.size (); i++) { -var thisEntry = this.directory.get (i); -if (thisEntry.entryName.equals (firstFile)) { -this.directory.remove (i); -this.directory.add (1, thisEntry); -break; -}} -}this.data = new javajs.util.SB (); -this.data.append ("Compound Document File Directory: "); -this.data.append (this.getDirectoryListing ("|")); -this.data.append ("\n"); -binaryFileList = "|" + binaryFileList + "|"; -for (var i = 0; i < this.directory.size (); i++) { -var thisEntry = this.directory.get (i); -if (!thisEntry.isEmpty && thisEntry.entryType != 5) { -var name = thisEntry.entryName; -if (name.endsWith (".gz")) name = name.substring (0, name.length - 3); -this.data.append ("BEGIN Directory Entry ").append (name).append ("\n"); -this.data.appendSB (this.getEntryAsString (thisEntry, binaryFileList.indexOf ("|" + thisEntry.entryName + "|") >= 0)); -this.data.append ("\n"); -this.data.append ("END Directory Entry ").append (thisEntry.entryName).append ("\n"); -}} -this.close (); -return this.data; -}, "~S,~S"); -Clazz.defineMethod (c$, "getFileAsString", -function (entryName) { -for (var i = 0; i < this.directory.size (); i++) { -var thisEntry = this.directory.get (i); -if (thisEntry.entryName.equals (entryName)) return this.getEntryAsString (thisEntry, false); -} -return new javajs.util.SB (); -}, "~S"); -Clazz.defineMethod (c$, "getOffset", -($fz = function (SID) { -return (SID + 1) * this.sectorSize; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "gotoSector", -($fz = function (SID) { -this.seek (this.getOffset (SID)); -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "readHeader", -($fz = function () { -if (!this.header.readData ()) return false; -this.sectorSize = 1 << this.header.sectorPower; -this.shortSectorSize = 1 << this.header.shortSectorPower; -this.nShortSectorsPerStandardSector = Clazz.doubleToInt (this.sectorSize / this.shortSectorSize); -this.nIntPerSector = Clazz.doubleToInt (this.sectorSize / 4); -this.nDirEntriesperSector = Clazz.doubleToInt (this.sectorSize / 128); -return true; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getSectorAllocationTable", -($fz = function () { -var nSID = 0; -var thisSID; -this.SAT = Clazz.newIntArray (this.header.nSATsectors * this.nIntPerSector + 109, 0); -try { -for (var i = 0; i < 109; i++) { -thisSID = this.header.MSAT0[i]; -if (thisSID < 0) break; -this.gotoSector (thisSID); -for (var j = 0; j < this.nIntPerSector; j++) { -this.SAT[nSID++] = this.readInt (); -} -} -var nMaster = this.header.nAdditionalMATsectors; -thisSID = this.header.SID_MSAT_next; -var MSAT = Clazz.newIntArray (this.nIntPerSector, 0); -out : while (nMaster-- > 0 && thisSID >= 0) { -this.gotoSector (thisSID); -for (var i = 0; i < this.nIntPerSector; i++) MSAT[i] = this.readInt (); - -for (var i = 0; i < this.nIntPerSector - 1; i++) { -thisSID = MSAT[i]; -if (thisSID < 0) break out; -this.gotoSector (thisSID); -for (var j = this.nIntPerSector; --j >= 0; ) this.SAT[nSID++] = this.readInt (); - -} -thisSID = MSAT[this.nIntPerSector - 1]; -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getShortSectorAllocationTable", -($fz = function () { -var nSSID = 0; -var thisSID = this.header.SID_SSAT_start; -var nMax = this.header.nSSATsectors * this.nIntPerSector; -this.SSAT = Clazz.newIntArray (nMax, 0); -try { -while (thisSID > 0 && nSSID < nMax) { -this.gotoSector (thisSID); -for (var j = 0; j < this.nIntPerSector; j++) { -this.SSAT[nSSID++] = this.readInt (); -} -thisSID = this.SAT[thisSID]; -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getDirectoryTable", -($fz = function () { -var thisSID = this.header.SID_DIR_start; -var thisEntry; -this.rootEntry = null; -try { -while (thisSID > 0) { -this.gotoSector (thisSID); -for (var j = this.nDirEntriesperSector; --j >= 0; ) { -thisEntry = new javajs.util.CompoundDocDirEntry (this); -thisEntry.readData (); -if (thisEntry.lenStream > 0) { -this.directory.addLast (thisEntry); -}if (thisEntry.entryType == 5) this.rootEntry = thisEntry; -} -thisSID = this.SAT[thisSID]; -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getEntryAsString", -($fz = function (thisEntry, asBinaryString) { -if (thisEntry.isEmpty) return new javajs.util.SB (); -return (thisEntry.isStandard ? this.getStandardStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString) : this.getShortStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString)); -}, $fz.isPrivate = true, $fz), "javajs.util.CompoundDocDirEntry,~B"); -Clazz.defineMethod (c$, "getStandardStringData", -($fz = function (thisSID, nBytes, asBinaryString) { -var data = new javajs.util.SB (); -var byteBuf = Clazz.newByteArray (this.sectorSize, 0); -var gzipData = new javajs.util.ZipData (nBytes); -try { -while (thisSID > 0 && nBytes > 0) { -this.gotoSector (thisSID); -nBytes = this.getSectorData (data, byteBuf, this.sectorSize, nBytes, asBinaryString, gzipData); -thisSID = this.SAT[thisSID]; -} -if (nBytes == -9999) return new javajs.util.SB (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -if (gzipData.isEnabled) gzipData.addTo (this.jzt, data); -return data; -}, $fz.isPrivate = true, $fz), "~N,~N,~B"); -Clazz.defineMethod (c$, "getSectorData", -($fz = function (data, byteBuf, nSectorBytes, nBytes, asBinaryString, gzipData) { -this.readByteArray (byteBuf, 0, byteBuf.length); -var n = gzipData.addBytes (byteBuf, nSectorBytes, nBytes); -if (n >= 0) return n; -if (asBinaryString) { -for (var i = 0; i < nSectorBytes; i++) { -data.append (Integer.toHexString (byteBuf[i] & 0xFF)).appendC (' '); -if (--nBytes < 1) break; -} -} else { -for (var i = 0; i < nSectorBytes; i++) { -if (byteBuf[i] == 0) return -9999; -data.appendC (String.fromCharCode (byteBuf[i])); -if (--nBytes < 1) break; -} -}return nBytes; -}, $fz.isPrivate = true, $fz), "javajs.util.SB,~A,~N,~N,~B,javajs.util.ZipData"); -Clazz.defineMethod (c$, "getShortStringData", -($fz = function (shortSID, nBytes, asBinaryString) { -var data = new javajs.util.SB (); -if (this.rootEntry == null) return data; -var thisSID = this.rootEntry.SIDfirstSector; -var ptShort = 0; -var byteBuf = Clazz.newByteArray (this.shortSectorSize, 0); -var gzipData = new javajs.util.ZipData (nBytes); -try { -while (thisSID >= 0 && shortSID >= 0 && nBytes > 0) { -while (shortSID - ptShort >= this.nShortSectorsPerStandardSector) { -ptShort += this.nShortSectorsPerStandardSector; -thisSID = this.SAT[thisSID]; -} -this.seek (this.getOffset (thisSID) + (shortSID - ptShort) * this.shortSectorSize); -nBytes = this.getSectorData (data, byteBuf, this.shortSectorSize, nBytes, asBinaryString, gzipData); -shortSID = this.SSAT[shortSID]; -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (data.toString ()); -System.out.println ("reader error in CompoundDocument " + e.toString ()); -} else { -throw e; -} -} -if (gzipData.isEnabled) gzipData.addTo (this.jzt, data); -return data; -}, $fz.isPrivate = true, $fz), "~N,~N,~B"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.BinaryDocument", "$.CompoundDocHeader", "$.Lst"], "javajs.util.CompoundDocument", ["java.io.DataInputStream", "javajs.util.CompoundDocDirEntry", "$.SB", "$.ZipData"], function () { +c$ = Clazz.decorateAsClass (function () { +this.header = null; +this.directory = null; +this.rootEntry = null; +this.SAT = null; +this.SSAT = null; +this.sectorSize = 0; +this.shortSectorSize = 0; +this.nShortSectorsPerStandardSector = 0; +this.nIntPerSector = 0; +this.nDirEntriesperSector = 0; +this.data = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "CompoundDocument", javajs.util.BinaryDocument); +Clazz.prepareFields (c$, function () { +this.header = new javajs.util.CompoundDocHeader (this); +this.directory = new javajs.util.Lst (); +}); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.util.CompoundDocument); +this.isBigEndian = true; +}); +Clazz.overrideMethod (c$, "setStream", +function (jzt, bis, isBigEndian) { +this.jzt = jzt; +if (!this.isRandom) { +this.stream = new java.io.DataInputStream (bis); +}this.stream.mark (2147483647); +if (!this.readHeader ()) return; +this.getSectorAllocationTable (); +this.getShortSectorAllocationTable (); +this.getDirectoryTable (); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~B"); +Clazz.defineMethod (c$, "getDirectory", +function () { +return this.directory; +}); +Clazz.defineMethod (c$, "getDirectoryListing", +function (separator) { +var str = ""; +for (var i = 0; i < this.directory.size (); i++) { +var thisEntry = this.directory.get (i); +if (!thisEntry.isEmpty) str += separator + thisEntry.entryName + "\tlen=" + thisEntry.lenStream + "\tSID=" + thisEntry.SIDfirstSector + (thisEntry.isStandard ? "\tfileOffset=" + this.getOffset (thisEntry.SIDfirstSector) : ""); +} +return str; +}, "~S"); +Clazz.defineMethod (c$, "getAllData", +function () { +return this.getAllDataFiles (null, null); +}); +Clazz.overrideMethod (c$, "getAllDataMapped", +function (prefix, binaryFileList, fileData) { +fileData.put ("#Directory_Listing", this.getDirectoryListing ("|")); +binaryFileList = "|" + binaryFileList + "|"; +for (var i = 0; i < this.directory.size (); i++) { +var thisEntry = this.directory.get (i); +if (!thisEntry.isEmpty && thisEntry.entryType != 5) { +var name = thisEntry.entryName; +System.out.println ("CompoundDocument file " + name); +var isBinary = (binaryFileList.indexOf ("|" + name + "|") >= 0); +if (isBinary) name += ":asBinaryString"; +var data = new javajs.util.SB (); +data.append ("BEGIN Directory Entry ").append (name).append ("\n"); +data.appendSB (this.getEntryAsString (thisEntry, isBinary)); +data.append ("\nEND Directory Entry ").append (name).append ("\n"); +fileData.put (prefix + "/" + name, data.toString ()); +}} +this.close (); +}, "~S,~S,java.util.Map"); +Clazz.overrideMethod (c$, "getAllDataFiles", +function (binaryFileList, firstFile) { +if (firstFile != null) { +for (var i = 0; i < this.directory.size (); i++) { +var thisEntry = this.directory.get (i); +if (thisEntry.entryName.equals (firstFile)) { +this.directory.remove (i); +this.directory.add (1, thisEntry); +break; +}} +}this.data = new javajs.util.SB (); +this.data.append ("Compound Document File Directory: "); +this.data.append (this.getDirectoryListing ("|")); +this.data.append ("\n"); +binaryFileList = "|" + binaryFileList + "|"; +for (var i = 0; i < this.directory.size (); i++) { +var thisEntry = this.directory.get (i); +if (!thisEntry.isEmpty && thisEntry.entryType != 5) { +var name = thisEntry.entryName; +if (name.endsWith (".gz")) name = name.substring (0, name.length - 3); +this.data.append ("BEGIN Directory Entry ").append (name).append ("\n"); +this.data.appendSB (this.getEntryAsString (thisEntry, binaryFileList.indexOf ("|" + thisEntry.entryName + "|") >= 0)); +this.data.append ("\n"); +this.data.append ("END Directory Entry ").append (thisEntry.entryName).append ("\n"); +}} +this.close (); +return this.data; +}, "~S,~S"); +Clazz.defineMethod (c$, "getFileAsString", +function (entryName) { +for (var i = 0; i < this.directory.size (); i++) { +var thisEntry = this.directory.get (i); +if (thisEntry.entryName.equals (entryName)) return this.getEntryAsString (thisEntry, false); +} +return new javajs.util.SB (); +}, "~S"); +Clazz.defineMethod (c$, "getOffset", +($fz = function (SID) { +return (SID + 1) * this.sectorSize; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "gotoSector", +($fz = function (SID) { +this.seek (this.getOffset (SID)); +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "readHeader", +($fz = function () { +if (!this.header.readData ()) return false; +this.sectorSize = 1 << this.header.sectorPower; +this.shortSectorSize = 1 << this.header.shortSectorPower; +this.nShortSectorsPerStandardSector = Clazz.doubleToInt (this.sectorSize / this.shortSectorSize); +this.nIntPerSector = Clazz.doubleToInt (this.sectorSize / 4); +this.nDirEntriesperSector = Clazz.doubleToInt (this.sectorSize / 128); +return true; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getSectorAllocationTable", +($fz = function () { +var nSID = 0; +var thisSID; +this.SAT = Clazz.newIntArray (this.header.nSATsectors * this.nIntPerSector + 109, 0); +try { +for (var i = 0; i < 109; i++) { +thisSID = this.header.MSAT0[i]; +if (thisSID < 0) break; +this.gotoSector (thisSID); +for (var j = 0; j < this.nIntPerSector; j++) { +this.SAT[nSID++] = this.readInt (); +} +} +var nMaster = this.header.nAdditionalMATsectors; +thisSID = this.header.SID_MSAT_next; +var MSAT = Clazz.newIntArray (this.nIntPerSector, 0); +out : while (nMaster-- > 0 && thisSID >= 0) { +this.gotoSector (thisSID); +for (var i = 0; i < this.nIntPerSector; i++) MSAT[i] = this.readInt (); + +for (var i = 0; i < this.nIntPerSector - 1; i++) { +thisSID = MSAT[i]; +if (thisSID < 0) break out; +this.gotoSector (thisSID); +for (var j = this.nIntPerSector; --j >= 0; ) this.SAT[nSID++] = this.readInt (); + +} +thisSID = MSAT[this.nIntPerSector - 1]; +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getShortSectorAllocationTable", +($fz = function () { +var nSSID = 0; +var thisSID = this.header.SID_SSAT_start; +var nMax = this.header.nSSATsectors * this.nIntPerSector; +this.SSAT = Clazz.newIntArray (nMax, 0); +try { +while (thisSID > 0 && nSSID < nMax) { +this.gotoSector (thisSID); +for (var j = 0; j < this.nIntPerSector; j++) { +this.SSAT[nSSID++] = this.readInt (); +} +thisSID = this.SAT[thisSID]; +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getDirectoryTable", +($fz = function () { +var thisSID = this.header.SID_DIR_start; +var thisEntry; +this.rootEntry = null; +try { +while (thisSID > 0) { +this.gotoSector (thisSID); +for (var j = this.nDirEntriesperSector; --j >= 0; ) { +thisEntry = new javajs.util.CompoundDocDirEntry (this); +thisEntry.readData (); +if (thisEntry.lenStream > 0) { +this.directory.addLast (thisEntry); +}if (thisEntry.entryType == 5) this.rootEntry = thisEntry; +} +thisSID = this.SAT[thisSID]; +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getEntryAsString", +($fz = function (thisEntry, asBinaryString) { +if (thisEntry.isEmpty) return new javajs.util.SB (); +return (thisEntry.isStandard ? this.getStandardStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString) : this.getShortStringData (thisEntry.SIDfirstSector, thisEntry.lenStream, asBinaryString)); +}, $fz.isPrivate = true, $fz), "javajs.util.CompoundDocDirEntry,~B"); +Clazz.defineMethod (c$, "getStandardStringData", +($fz = function (thisSID, nBytes, asBinaryString) { +var data = new javajs.util.SB (); +var byteBuf = Clazz.newByteArray (this.sectorSize, 0); +var gzipData = new javajs.util.ZipData (nBytes); +try { +while (thisSID > 0 && nBytes > 0) { +this.gotoSector (thisSID); +nBytes = this.getSectorData (data, byteBuf, this.sectorSize, nBytes, asBinaryString, gzipData); +thisSID = this.SAT[thisSID]; +} +if (nBytes == -9999) return new javajs.util.SB (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +if (gzipData.isEnabled) gzipData.addTo (this.jzt, data); +return data; +}, $fz.isPrivate = true, $fz), "~N,~N,~B"); +Clazz.defineMethod (c$, "getSectorData", +($fz = function (data, byteBuf, nSectorBytes, nBytes, asBinaryString, gzipData) { +this.readByteArray (byteBuf, 0, byteBuf.length); +var n = gzipData.addBytes (byteBuf, nSectorBytes, nBytes); +if (n >= 0) return n; +if (asBinaryString) { +for (var i = 0; i < nSectorBytes; i++) { +data.append (Integer.toHexString (byteBuf[i] & 0xFF)).appendC (' '); +if (--nBytes < 1) break; +} +} else { +for (var i = 0; i < nSectorBytes; i++) { +if (byteBuf[i] == 0) return -9999; +data.appendC (String.fromCharCode (byteBuf[i])); +if (--nBytes < 1) break; +} +}return nBytes; +}, $fz.isPrivate = true, $fz), "javajs.util.SB,~A,~N,~N,~B,javajs.util.ZipData"); +Clazz.defineMethod (c$, "getShortStringData", +($fz = function (shortSID, nBytes, asBinaryString) { +var data = new javajs.util.SB (); +if (this.rootEntry == null) return data; +var thisSID = this.rootEntry.SIDfirstSector; +var ptShort = 0; +var byteBuf = Clazz.newByteArray (this.shortSectorSize, 0); +var gzipData = new javajs.util.ZipData (nBytes); +try { +while (thisSID >= 0 && shortSID >= 0 && nBytes > 0) { +while (shortSID - ptShort >= this.nShortSectorsPerStandardSector) { +ptShort += this.nShortSectorsPerStandardSector; +thisSID = this.SAT[thisSID]; +} +this.seek (this.getOffset (thisSID) + (shortSID - ptShort) * this.shortSectorSize); +nBytes = this.getSectorData (data, byteBuf, this.shortSectorSize, nBytes, asBinaryString, gzipData); +shortSID = this.SSAT[shortSID]; +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (data.toString ()); +System.out.println ("reader error in CompoundDocument " + e.toString ()); +} else { +throw e; +} +} +if (gzipData.isEnabled) gzipData.addTo (this.jzt, data); +return data; +}, $fz.isPrivate = true, $fz), "~N,~N,~B"); +}); diff --git a/bin/javajs/util/DF.js b/bin/javajs/util/DF.js index 9247146..6122352 100644 --- a/bin/javajs/util/DF.js +++ b/bin/javajs/util/DF.js @@ -1,78 +1,78 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.lang.Boolean"], "javajs.util.DF", ["java.lang.Double", "$.Float", "javajs.util.PT", "$.SB"], function () { -c$ = Clazz.declareType (javajs.util, "DF"); -c$.setUseNumberLocalization = Clazz.defineMethod (c$, "setUseNumberLocalization", -function (TF) { -javajs.util.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE); -}, "~B"); -c$.formatDecimalDbl = Clazz.defineMethod (c$, "formatDecimalDbl", -function (value, decimalDigits) { -if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value; -return javajs.util.DF.formatDecimal (value, decimalDigits); -}, "~N,~N"); -c$.formatDecimal = Clazz.defineMethod (c$, "formatDecimal", -function (value, decimalDigits) { -if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value; -var n; -if (decimalDigits < 0) { -decimalDigits = -decimalDigits; -if (decimalDigits > javajs.util.DF.formattingStrings.length) decimalDigits = javajs.util.DF.formattingStrings.length; -if (value == 0) return javajs.util.DF.formattingStrings[decimalDigits] + "E+0"; -n = 0; -var d; -if (Math.abs (value) < 1) { -n = 10; -d = value * 1e-10; -} else { -n = -10; -d = value * 1e10; -}var s = ("" + d).toUpperCase (); -var i = s.indexOf ("E"); -n = javajs.util.PT.parseInt (s.substring (i + 1)) + n; -return (i < 0 ? "" + value : javajs.util.DF.formatDecimal (javajs.util.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n); -}if (decimalDigits >= javajs.util.DF.formattingStrings.length) decimalDigits = javajs.util.DF.formattingStrings.length - 1; -var s1 = ("" + value).toUpperCase (); -var pt = s1.indexOf ("."); -if (pt < 0) return s1 + javajs.util.DF.formattingStrings[decimalDigits].substring (1); -var isNeg = s1.startsWith ("-"); -if (isNeg) { -s1 = s1.substring (1); -pt--; -}var pt1 = s1.indexOf ("E-"); -if (pt1 > 0) { -n = javajs.util.PT.parseInt (s1.substring (pt1 + 1)); -s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1); -pt = 1; -}pt1 = s1.indexOf ("E"); -if (pt1 > 0) { -n = javajs.util.PT.parseInt (s1.substring (pt1 + 1)); -s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000"; -s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1); -pt = s1.indexOf ("."); -}var len = s1.length; -var pt2 = decimalDigits + pt + 1; -if (pt2 < len && s1.charAt (pt2) >= '5') { -return javajs.util.DF.formatDecimal (value + (isNeg ? -1 : 1) * javajs.util.DF.formatAdds[decimalDigits], decimalDigits); -}var sb = javajs.util.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt))); -for (var i = 0; i < decimalDigits; i++, pt++) { -if (pt < len) sb.appendC (s1.charAt (pt)); - else sb.appendC ('0'); -} -s1 = (isNeg ? "-" : "") + sb; -return (Boolean.TRUE.equals (javajs.util.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.')); -}, "~N,~N"); -c$.formatDecimalTrimmed = Clazz.defineMethod (c$, "formatDecimalTrimmed", -function (x, precision) { -var str = javajs.util.DF.formatDecimalDbl (x, precision); -var m = str.length - 1; -var zero = '0'; -while (m >= 0 && str.charAt (m) == zero) m--; - -return str.substring (0, m + 1); -}, "~N,~N"); -Clazz.defineStatics (c$, -"formattingStrings", Clazz.newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]), -"zeros", "0000000000000000000000000000000000000000", -"formatAdds", Clazz.newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005])); -c$.useNumberLocalization = c$.prototype.useNumberLocalization = Clazz.newArray (-1, [Boolean.TRUE]); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.lang.Boolean"], "javajs.util.DF", ["java.lang.Double", "$.Float", "javajs.util.PT", "$.SB"], function () { +c$ = Clazz.declareType (javajs.util, "DF"); +c$.setUseNumberLocalization = Clazz.defineMethod (c$, "setUseNumberLocalization", +function (TF) { +javajs.util.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE); +}, "~B"); +c$.formatDecimalDbl = Clazz.defineMethod (c$, "formatDecimalDbl", +function (value, decimalDigits) { +if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value; +return javajs.util.DF.formatDecimal (value, decimalDigits); +}, "~N,~N"); +c$.formatDecimal = Clazz.defineMethod (c$, "formatDecimal", +function (value, decimalDigits) { +if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value; +var n; +if (decimalDigits < 0) { +decimalDigits = -decimalDigits; +if (decimalDigits > javajs.util.DF.formattingStrings.length) decimalDigits = javajs.util.DF.formattingStrings.length; +if (value == 0) return javajs.util.DF.formattingStrings[decimalDigits] + "E+0"; +n = 0; +var d; +if (Math.abs (value) < 1) { +n = 10; +d = value * 1e-10; +} else { +n = -10; +d = value * 1e10; +}var s = ("" + d).toUpperCase (); +var i = s.indexOf ("E"); +n = javajs.util.PT.parseInt (s.substring (i + 1)) + n; +return (i < 0 ? "" + value : javajs.util.DF.formatDecimal (javajs.util.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n); +}if (decimalDigits >= javajs.util.DF.formattingStrings.length) decimalDigits = javajs.util.DF.formattingStrings.length - 1; +var s1 = ("" + value).toUpperCase (); +var pt = s1.indexOf ("."); +if (pt < 0) return s1 + javajs.util.DF.formattingStrings[decimalDigits].substring (1); +var isNeg = s1.startsWith ("-"); +if (isNeg) { +s1 = s1.substring (1); +pt--; +}var pt1 = s1.indexOf ("E-"); +if (pt1 > 0) { +n = javajs.util.PT.parseInt (s1.substring (pt1 + 1)); +s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1); +pt = 1; +}pt1 = s1.indexOf ("E"); +if (pt1 > 0) { +n = javajs.util.PT.parseInt (s1.substring (pt1 + 1)); +s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000"; +s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1); +pt = s1.indexOf ("."); +}var len = s1.length; +var pt2 = decimalDigits + pt + 1; +if (pt2 < len && s1.charAt (pt2) >= '5') { +return javajs.util.DF.formatDecimal (value + (isNeg ? -1 : 1) * javajs.util.DF.formatAdds[decimalDigits], decimalDigits); +}var sb = javajs.util.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt))); +for (var i = 0; i < decimalDigits; i++, pt++) { +if (pt < len) sb.appendC (s1.charAt (pt)); + else sb.appendC ('0'); +} +s1 = (isNeg ? "-" : "") + sb; +return (Boolean.TRUE.equals (javajs.util.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.')); +}, "~N,~N"); +c$.formatDecimalTrimmed = Clazz.defineMethod (c$, "formatDecimalTrimmed", +function (x, precision) { +var str = javajs.util.DF.formatDecimalDbl (x, precision); +var m = str.length - 1; +var zero = '0'; +while (m >= 0 && str.charAt (m) == zero) m--; + +return str.substring (0, m + 1); +}, "~N,~N"); +Clazz.defineStatics (c$, +"formattingStrings", Clazz.newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]), +"zeros", "0000000000000000000000000000000000000000", +"formatAdds", Clazz.newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005])); +c$.useNumberLocalization = c$.prototype.useNumberLocalization = Clazz.newArray (-1, [Boolean.TRUE]); +}); diff --git a/bin/javajs/util/DataReader.js b/bin/javajs/util/DataReader.js index 3be547c..ea8774f 100644 --- a/bin/javajs/util/DataReader.js +++ b/bin/javajs/util/DataReader.js @@ -1,34 +1,34 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.io.BufferedReader"], "javajs.util.DataReader", ["java.io.StringReader"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ptMark = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "DataReader", java.io.BufferedReader); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javajs.util.DataReader, [ new java.io.StringReader ("")]); -}); -Clazz.defineMethod (c$, "getBufferedReader", -function () { -return this; -}); -Clazz.defineMethod (c$, "readBuf", -function (buf, off, len) { -var nRead = 0; -var line = this.readLine (); -if (line == null) return 0; -var linept = 0; -var linelen = line.length; -for (var i = off; i < len && linelen >= 0; i++) { -if (linept >= linelen) { -linept = 0; -buf[i] = '\n'; -line = this.readLine (); -linelen = (line == null ? -1 : line.length); -} else { -buf[i] = line.charAt (linept++); -}nRead++; -} -return nRead; -}, "~A,~N,~N"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.io.BufferedReader"], "javajs.util.DataReader", ["java.io.StringReader"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ptMark = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "DataReader", java.io.BufferedReader); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javajs.util.DataReader, [ new java.io.StringReader ("")]); +}); +Clazz.defineMethod (c$, "getBufferedReader", +function () { +return this; +}); +Clazz.defineMethod (c$, "readBuf", +function (buf, off, len) { +var nRead = 0; +var line = this.readLine (); +if (line == null) return 0; +var linept = 0; +var linelen = line.length; +for (var i = off; i < len && linelen >= 0; i++) { +if (linept >= linelen) { +linept = 0; +buf[i] = '\n'; +line = this.readLine (); +linelen = (line == null ? -1 : line.length); +} else { +buf[i] = line.charAt (linept++); +}nRead++; +} +return nRead; +}, "~A,~N,~N"); +}); diff --git a/bin/javajs/util/Eigen.js b/bin/javajs/util/Eigen.js index b08955b..4d28a61 100644 --- a/bin/javajs/util/Eigen.js +++ b/bin/javajs/util/Eigen.js @@ -1,254 +1,254 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.api.EigenInterface"], "javajs.util.Eigen", ["javajs.util.V3"], function () { -c$ = Clazz.decorateAsClass (function () { -this.n = 3; -this.d = null; -this.e = null; -this.V = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "Eigen", null, javajs.api.EigenInterface); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "set", -function (n) { -this.n = n; -this.V = Clazz.newDoubleArray (n, n, 0); -this.d = Clazz.newDoubleArray (n, 0); -this.e = Clazz.newDoubleArray (n, 0); -return this; -}, "~N"); -Clazz.overrideMethod (c$, "setM", -function (m) { -this.set (m.length); -this.calc (m); -return this; -}, "~A"); -Clazz.overrideMethod (c$, "getEigenvalues", -function () { -return this.d; -}); -Clazz.overrideMethod (c$, "fillFloatArrays", -function (eigenVectors, eigenValues) { -for (var i = 0; i < 3; i++) { -if (eigenVectors != null) { -if (eigenVectors[i] == null) eigenVectors[i] = new javajs.util.V3 (); -eigenVectors[i].set (this.V[0][i], this.V[1][i], this.V[2][i]); -}if (eigenValues != null) eigenValues[i] = this.d[i]; -} -}, "~A,~A"); -Clazz.overrideMethod (c$, "getEigenvectorsFloatTransposed", -function () { -var f = Clazz.newFloatArray (this.n, this.n, 0); -for (var i = this.n; --i >= 0; ) for (var j = this.n; --j >= 0; ) f[j][i] = this.V[i][j]; - - -return f; -}); -Clazz.defineMethod (c$, "calc", -function (A) { -for (var i = 0; i < this.n; i++) { -for (var j = 0; j < this.n; j++) { -this.V[i][j] = A[i][j]; -} -} -this.tred2 (); -this.tql2 (); -}, "~A"); -Clazz.defineMethod (c$, "getRealEigenvalues", -function () { -return this.d; -}); -Clazz.defineMethod (c$, "getImagEigenvalues", -function () { -return this.e; -}); -Clazz.defineMethod (c$, "tred2", -($fz = function () { -for (var j = 0; j < this.n; j++) { -this.d[j] = this.V[this.n - 1][j]; -} -for (var i = this.n - 1; i > 0; i--) { -var scale = 0.0; -var h = 0.0; -for (var k = 0; k < i; k++) { -scale = scale + Math.abs (this.d[k]); -} -if (scale == 0.0) { -this.e[i] = this.d[i - 1]; -for (var j = 0; j < i; j++) { -this.d[j] = this.V[i - 1][j]; -this.V[i][j] = 0.0; -this.V[j][i] = 0.0; -} -} else { -for (var k = 0; k < i; k++) { -this.d[k] /= scale; -h += this.d[k] * this.d[k]; -} -var f = this.d[i - 1]; -var g = Math.sqrt (h); -if (f > 0) { -g = -g; -}this.e[i] = scale * g; -h = h - f * g; -this.d[i - 1] = f - g; -for (var j = 0; j < i; j++) { -this.e[j] = 0.0; -} -for (var j = 0; j < i; j++) { -f = this.d[j]; -this.V[j][i] = f; -g = this.e[j] + this.V[j][j] * f; -for (var k = j + 1; k <= i - 1; k++) { -g += this.V[k][j] * this.d[k]; -this.e[k] += this.V[k][j] * f; -} -this.e[j] = g; -} -f = 0.0; -for (var j = 0; j < i; j++) { -this.e[j] /= h; -f += this.e[j] * this.d[j]; -} -var hh = f / (h + h); -for (var j = 0; j < i; j++) { -this.e[j] -= hh * this.d[j]; -} -for (var j = 0; j < i; j++) { -f = this.d[j]; -g = this.e[j]; -for (var k = j; k <= i - 1; k++) { -this.V[k][j] -= (f * this.e[k] + g * this.d[k]); -} -this.d[j] = this.V[i - 1][j]; -this.V[i][j] = 0.0; -} -}this.d[i] = h; -} -for (var i = 0; i < this.n - 1; i++) { -this.V[this.n - 1][i] = this.V[i][i]; -this.V[i][i] = 1.0; -var h = this.d[i + 1]; -if (h != 0.0) { -for (var k = 0; k <= i; k++) { -this.d[k] = this.V[k][i + 1] / h; -} -for (var j = 0; j <= i; j++) { -var g = 0.0; -for (var k = 0; k <= i; k++) { -g += this.V[k][i + 1] * this.V[k][j]; -} -for (var k = 0; k <= i; k++) { -this.V[k][j] -= g * this.d[k]; -} -} -}for (var k = 0; k <= i; k++) { -this.V[k][i + 1] = 0.0; -} -} -for (var j = 0; j < this.n; j++) { -this.d[j] = this.V[this.n - 1][j]; -this.V[this.n - 1][j] = 0.0; -} -this.V[this.n - 1][this.n - 1] = 1.0; -this.e[0] = 0.0; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "tql2", -($fz = function () { -for (var i = 1; i < this.n; i++) { -this.e[i - 1] = this.e[i]; -} -this.e[this.n - 1] = 0.0; -var f = 0.0; -var tst1 = 0.0; -var eps = Math.pow (2.0, -52.0); -for (var l = 0; l < this.n; l++) { -tst1 = Math.max (tst1, Math.abs (this.d[l]) + Math.abs (this.e[l])); -var m = l; -while (m < this.n) { -if (Math.abs (this.e[m]) <= eps * tst1) { -break; -}m++; -} -if (m > l) { -var iter = 0; -do { -iter = iter + 1; -var g = this.d[l]; -var p = (this.d[l + 1] - g) / (2.0 * this.e[l]); -var r = javajs.util.Eigen.hypot (p, 1.0); -if (p < 0) { -r = -r; -}this.d[l] = this.e[l] / (p + r); -this.d[l + 1] = this.e[l] * (p + r); -var dl1 = this.d[l + 1]; -var h = g - this.d[l]; -for (var i = l + 2; i < this.n; i++) { -this.d[i] -= h; -} -f = f + h; -p = this.d[m]; -var c = 1.0; -var c2 = c; -var c3 = c; -var el1 = this.e[l + 1]; -var s = 0.0; -var s2 = 0.0; -for (var i = m - 1; i >= l; i--) { -c3 = c2; -c2 = c; -s2 = s; -g = c * this.e[i]; -h = c * p; -r = javajs.util.Eigen.hypot (p, this.e[i]); -this.e[i + 1] = s * r; -s = this.e[i] / r; -c = p / r; -p = c * this.d[i] - s * g; -this.d[i + 1] = h + s * (c * g + s * this.d[i]); -for (var k = 0; k < this.n; k++) { -h = this.V[k][i + 1]; -this.V[k][i + 1] = s * this.V[k][i] + c * h; -this.V[k][i] = c * this.V[k][i] - s * h; -} -} -p = -s * s2 * c3 * el1 * this.e[l] / dl1; -this.e[l] = s * p; -this.d[l] = c * p; -} while (Math.abs (this.e[l]) > eps * tst1); -}this.d[l] = this.d[l] + f; -this.e[l] = 0.0; -} -for (var i = 0; i < this.n - 1; i++) { -var k = i; -var p = this.d[i]; -for (var j = i + 1; j < this.n; j++) { -if (this.d[j] < p) { -k = j; -p = this.d[j]; -}} -if (k != i) { -this.d[k] = this.d[i]; -this.d[i] = p; -for (var j = 0; j < this.n; j++) { -p = this.V[j][i]; -this.V[j][i] = this.V[j][k]; -this.V[j][k] = p; -} -}} -}, $fz.isPrivate = true, $fz)); -c$.hypot = Clazz.defineMethod (c$, "hypot", -($fz = function (a, b) { -var r; -if (Math.abs (a) > Math.abs (b)) { -r = b / a; -r = Math.abs (a) * Math.sqrt (1 + r * r); -} else if (b != 0) { -r = a / b; -r = Math.abs (b) * Math.sqrt (1 + r * r); -} else { -r = 0.0; -}return r; -}, $fz.isPrivate = true, $fz), "~N,~N"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.EigenInterface"], "javajs.util.Eigen", ["javajs.util.V3"], function () { +c$ = Clazz.decorateAsClass (function () { +this.n = 3; +this.d = null; +this.e = null; +this.V = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "Eigen", null, javajs.api.EigenInterface); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "set", +function (n) { +this.n = n; +this.V = Clazz.newDoubleArray (n, n, 0); +this.d = Clazz.newDoubleArray (n, 0); +this.e = Clazz.newDoubleArray (n, 0); +return this; +}, "~N"); +Clazz.overrideMethod (c$, "setM", +function (m) { +this.set (m.length); +this.calc (m); +return this; +}, "~A"); +Clazz.overrideMethod (c$, "getEigenvalues", +function () { +return this.d; +}); +Clazz.overrideMethod (c$, "fillFloatArrays", +function (eigenVectors, eigenValues) { +for (var i = 0; i < 3; i++) { +if (eigenVectors != null) { +if (eigenVectors[i] == null) eigenVectors[i] = new javajs.util.V3 (); +eigenVectors[i].set (this.V[0][i], this.V[1][i], this.V[2][i]); +}if (eigenValues != null) eigenValues[i] = this.d[i]; +} +}, "~A,~A"); +Clazz.overrideMethod (c$, "getEigenvectorsFloatTransposed", +function () { +var f = Clazz.newFloatArray (this.n, this.n, 0); +for (var i = this.n; --i >= 0; ) for (var j = this.n; --j >= 0; ) f[j][i] = this.V[i][j]; + + +return f; +}); +Clazz.defineMethod (c$, "calc", +function (A) { +for (var i = 0; i < this.n; i++) { +for (var j = 0; j < this.n; j++) { +this.V[i][j] = A[i][j]; +} +} +this.tred2 (); +this.tql2 (); +}, "~A"); +Clazz.defineMethod (c$, "getRealEigenvalues", +function () { +return this.d; +}); +Clazz.defineMethod (c$, "getImagEigenvalues", +function () { +return this.e; +}); +Clazz.defineMethod (c$, "tred2", +($fz = function () { +for (var j = 0; j < this.n; j++) { +this.d[j] = this.V[this.n - 1][j]; +} +for (var i = this.n - 1; i > 0; i--) { +var scale = 0.0; +var h = 0.0; +for (var k = 0; k < i; k++) { +scale = scale + Math.abs (this.d[k]); +} +if (scale == 0.0) { +this.e[i] = this.d[i - 1]; +for (var j = 0; j < i; j++) { +this.d[j] = this.V[i - 1][j]; +this.V[i][j] = 0.0; +this.V[j][i] = 0.0; +} +} else { +for (var k = 0; k < i; k++) { +this.d[k] /= scale; +h += this.d[k] * this.d[k]; +} +var f = this.d[i - 1]; +var g = Math.sqrt (h); +if (f > 0) { +g = -g; +}this.e[i] = scale * g; +h = h - f * g; +this.d[i - 1] = f - g; +for (var j = 0; j < i; j++) { +this.e[j] = 0.0; +} +for (var j = 0; j < i; j++) { +f = this.d[j]; +this.V[j][i] = f; +g = this.e[j] + this.V[j][j] * f; +for (var k = j + 1; k <= i - 1; k++) { +g += this.V[k][j] * this.d[k]; +this.e[k] += this.V[k][j] * f; +} +this.e[j] = g; +} +f = 0.0; +for (var j = 0; j < i; j++) { +this.e[j] /= h; +f += this.e[j] * this.d[j]; +} +var hh = f / (h + h); +for (var j = 0; j < i; j++) { +this.e[j] -= hh * this.d[j]; +} +for (var j = 0; j < i; j++) { +f = this.d[j]; +g = this.e[j]; +for (var k = j; k <= i - 1; k++) { +this.V[k][j] -= (f * this.e[k] + g * this.d[k]); +} +this.d[j] = this.V[i - 1][j]; +this.V[i][j] = 0.0; +} +}this.d[i] = h; +} +for (var i = 0; i < this.n - 1; i++) { +this.V[this.n - 1][i] = this.V[i][i]; +this.V[i][i] = 1.0; +var h = this.d[i + 1]; +if (h != 0.0) { +for (var k = 0; k <= i; k++) { +this.d[k] = this.V[k][i + 1] / h; +} +for (var j = 0; j <= i; j++) { +var g = 0.0; +for (var k = 0; k <= i; k++) { +g += this.V[k][i + 1] * this.V[k][j]; +} +for (var k = 0; k <= i; k++) { +this.V[k][j] -= g * this.d[k]; +} +} +}for (var k = 0; k <= i; k++) { +this.V[k][i + 1] = 0.0; +} +} +for (var j = 0; j < this.n; j++) { +this.d[j] = this.V[this.n - 1][j]; +this.V[this.n - 1][j] = 0.0; +} +this.V[this.n - 1][this.n - 1] = 1.0; +this.e[0] = 0.0; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "tql2", +($fz = function () { +for (var i = 1; i < this.n; i++) { +this.e[i - 1] = this.e[i]; +} +this.e[this.n - 1] = 0.0; +var f = 0.0; +var tst1 = 0.0; +var eps = Math.pow (2.0, -52.0); +for (var l = 0; l < this.n; l++) { +tst1 = Math.max (tst1, Math.abs (this.d[l]) + Math.abs (this.e[l])); +var m = l; +while (m < this.n) { +if (Math.abs (this.e[m]) <= eps * tst1) { +break; +}m++; +} +if (m > l) { +var iter = 0; +do { +iter = iter + 1; +var g = this.d[l]; +var p = (this.d[l + 1] - g) / (2.0 * this.e[l]); +var r = javajs.util.Eigen.hypot (p, 1.0); +if (p < 0) { +r = -r; +}this.d[l] = this.e[l] / (p + r); +this.d[l + 1] = this.e[l] * (p + r); +var dl1 = this.d[l + 1]; +var h = g - this.d[l]; +for (var i = l + 2; i < this.n; i++) { +this.d[i] -= h; +} +f = f + h; +p = this.d[m]; +var c = 1.0; +var c2 = c; +var c3 = c; +var el1 = this.e[l + 1]; +var s = 0.0; +var s2 = 0.0; +for (var i = m - 1; i >= l; i--) { +c3 = c2; +c2 = c; +s2 = s; +g = c * this.e[i]; +h = c * p; +r = javajs.util.Eigen.hypot (p, this.e[i]); +this.e[i + 1] = s * r; +s = this.e[i] / r; +c = p / r; +p = c * this.d[i] - s * g; +this.d[i + 1] = h + s * (c * g + s * this.d[i]); +for (var k = 0; k < this.n; k++) { +h = this.V[k][i + 1]; +this.V[k][i + 1] = s * this.V[k][i] + c * h; +this.V[k][i] = c * this.V[k][i] - s * h; +} +} +p = -s * s2 * c3 * el1 * this.e[l] / dl1; +this.e[l] = s * p; +this.d[l] = c * p; +} while (Math.abs (this.e[l]) > eps * tst1); +}this.d[l] = this.d[l] + f; +this.e[l] = 0.0; +} +for (var i = 0; i < this.n - 1; i++) { +var k = i; +var p = this.d[i]; +for (var j = i + 1; j < this.n; j++) { +if (this.d[j] < p) { +k = j; +p = this.d[j]; +}} +if (k != i) { +this.d[k] = this.d[i]; +this.d[i] = p; +for (var j = 0; j < this.n; j++) { +p = this.V[j][i]; +this.V[j][i] = this.V[j][k]; +this.V[j][k] = p; +} +}} +}, $fz.isPrivate = true, $fz)); +c$.hypot = Clazz.defineMethod (c$, "hypot", +($fz = function (a, b) { +var r; +if (Math.abs (a) > Math.abs (b)) { +r = b / a; +r = Math.abs (a) * Math.sqrt (1 + r * r); +} else if (b != 0) { +r = a / b; +r = Math.abs (b) * Math.sqrt (1 + r * r); +} else { +r = 0.0; +}return r; +}, $fz.isPrivate = true, $fz), "~N,~N"); +}); diff --git a/bin/javajs/util/Encoding.js b/bin/javajs/util/Encoding.js index aecf019..d7abfc0 100644 --- a/bin/javajs/util/Encoding.js +++ b/bin/javajs/util/Encoding.js @@ -1,10 +1,10 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.lang.Enum"], "javajs.util.Encoding", null, function () { -c$ = Clazz.declareType (javajs.util, "Encoding", Enum); -Clazz.defineEnumConstant (c$, "NONE", 0, []); -Clazz.defineEnumConstant (c$, "UTF8", 1, []); -Clazz.defineEnumConstant (c$, "UTF_16BE", 2, []); -Clazz.defineEnumConstant (c$, "UTF_16LE", 3, []); -Clazz.defineEnumConstant (c$, "UTF_32BE", 4, []); -Clazz.defineEnumConstant (c$, "UTF_32LE", 5, []); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.lang.Enum"], "javajs.util.Encoding", null, function () { +c$ = Clazz.declareType (javajs.util, "Encoding", Enum); +Clazz.defineEnumConstant (c$, "NONE", 0, []); +Clazz.defineEnumConstant (c$, "UTF8", 1, []); +Clazz.defineEnumConstant (c$, "UTF_16BE", 2, []); +Clazz.defineEnumConstant (c$, "UTF_16LE", 3, []); +Clazz.defineEnumConstant (c$, "UTF_32BE", 4, []); +Clazz.defineEnumConstant (c$, "UTF_32LE", 5, []); +}); diff --git a/bin/javajs/util/LimitedLineReader.js b/bin/javajs/util/LimitedLineReader.js index c8c7764..95d0741 100644 --- a/bin/javajs/util/LimitedLineReader.js +++ b/bin/javajs/util/LimitedLineReader.js @@ -1,33 +1,33 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.buf = null; -this.cchBuf = 0; -this.ichCurrent = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "LimitedLineReader"); -Clazz.makeConstructor (c$, -function (bufferedReader, readLimit) { -bufferedReader.mark (readLimit + 1); -this.buf = Clazz.newCharArray (readLimit, '\0'); -this.cchBuf = Math.max (bufferedReader.read (this.buf, 0, readLimit), 0); -this.ichCurrent = 0; -bufferedReader.reset (); -}, "java.io.BufferedReader,~N"); -Clazz.defineMethod (c$, "getHeader", -function (n) { -return (n == 0 ? String.instantialize (this.buf) : String.instantialize (this.buf, 0, Math.min (this.cchBuf, n))); -}, "~N"); -Clazz.defineMethod (c$, "readLineWithNewline", -function () { -while (this.ichCurrent < this.cchBuf) { -var ichBeginningOfLine = this.ichCurrent; -var ch = String.fromCharCode (0); -while (this.ichCurrent < this.cchBuf && (ch = this.buf[this.ichCurrent++]) != '\r' && ch != '\n') { -} -if (ch == '\r' && this.ichCurrent < this.cchBuf && this.buf[this.ichCurrent] == '\n') ++this.ichCurrent; -var cchLine = this.ichCurrent - ichBeginningOfLine; -if (this.buf[ichBeginningOfLine] == '#') continue; -return String.instantialize (this.buf, ichBeginningOfLine, cchLine); -} -return ""; -}); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.buf = null; +this.cchBuf = 0; +this.ichCurrent = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "LimitedLineReader"); +Clazz.makeConstructor (c$, +function (bufferedReader, readLimit) { +bufferedReader.mark (readLimit + 1); +this.buf = Clazz.newCharArray (readLimit, '\0'); +this.cchBuf = Math.max (bufferedReader.read (this.buf, 0, readLimit), 0); +this.ichCurrent = 0; +bufferedReader.reset (); +}, "java.io.BufferedReader,~N"); +Clazz.defineMethod (c$, "getHeader", +function (n) { +return (n == 0 ? String.instantialize (this.buf) : String.instantialize (this.buf, 0, Math.min (this.cchBuf, n))); +}, "~N"); +Clazz.defineMethod (c$, "readLineWithNewline", +function () { +while (this.ichCurrent < this.cchBuf) { +var ichBeginningOfLine = this.ichCurrent; +var ch = String.fromCharCode (0); +while (this.ichCurrent < this.cchBuf && (ch = this.buf[this.ichCurrent++]) != '\r' && ch != '\n') { +} +if (ch == '\r' && this.ichCurrent < this.cchBuf && this.buf[this.ichCurrent] == '\n') ++this.ichCurrent; +var cchLine = this.ichCurrent - ichBeginningOfLine; +if (this.buf[ichBeginningOfLine] == '#') continue; +return String.instantialize (this.buf, ichBeginningOfLine, cchLine); +} +return ""; +}); diff --git a/bin/javajs/util/ListDataReader.js b/bin/javajs/util/ListDataReader.js index 54d8d69..dbd859d 100644 --- a/bin/javajs/util/ListDataReader.js +++ b/bin/javajs/util/ListDataReader.js @@ -1,31 +1,31 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.DataReader"], "javajs.util.ListDataReader", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.data = null; -this.pt = 0; -this.len = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "ListDataReader", javajs.util.DataReader); -Clazz.overrideMethod (c$, "setData", -function (data) { -this.data = data; -this.len = this.data.size (); -return this; -}, "~O"); -Clazz.defineMethod (c$, "read", -function (buf, off, len) { -return this.readBuf (buf, off, len); -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "readLine", -function () { -return (this.pt < this.len ? this.data.get (this.pt++) : null); -}); -Clazz.defineMethod (c$, "mark", -function (ptr) { -this.ptMark = this.pt; -}, "~N"); -Clazz.overrideMethod (c$, "reset", -function () { -this.pt = this.ptMark; -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.DataReader"], "javajs.util.ListDataReader", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.data = null; +this.pt = 0; +this.len = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "ListDataReader", javajs.util.DataReader); +Clazz.overrideMethod (c$, "setData", +function (data) { +this.data = data; +this.len = this.data.size (); +return this; +}, "~O"); +Clazz.defineMethod (c$, "read", +function (buf, off, len) { +return this.readBuf (buf, off, len); +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "readLine", +function () { +return (this.pt < this.len ? this.data.get (this.pt++) : null); +}); +Clazz.defineMethod (c$, "mark", +function (ptr) { +this.ptMark = this.pt; +}, "~N"); +Clazz.overrideMethod (c$, "reset", +function () { +this.pt = this.ptMark; +}); +}); diff --git a/bin/javajs/util/Lst.js b/bin/javajs/util/Lst.js index 414e59d..f809b5a 100644 --- a/bin/javajs/util/Lst.js +++ b/bin/javajs/util/Lst.js @@ -1,14 +1,14 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.util.ArrayList"], "javajs.util.Lst", null, function () { -c$ = Clazz.declareType (javajs.util, "Lst", java.util.ArrayList); -Clazz.defineMethod (c$, "addLast", -function (v) { -{ -return this.add1(v); -}}, "~O"); -Clazz.defineMethod (c$, "removeObj", -function (v) { -{ -return this.removeObject(v); -}}, "~O"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.util.ArrayList"], "javajs.util.Lst", null, function () { +c$ = Clazz.declareType (javajs.util, "Lst", java.util.ArrayList); +Clazz.defineMethod (c$, "addLast", +function (v) { +{ +return this.add1(v); +}}, "~O"); +Clazz.defineMethod (c$, "removeObj", +function (v) { +{ +return this.removeObject(v); +}}, "~O"); +}); diff --git a/bin/javajs/util/M3.js b/bin/javajs/util/M3.js index a395f3f..8461118 100644 --- a/bin/javajs/util/M3.js +++ b/bin/javajs/util/M3.js @@ -1,298 +1,298 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.M34"], "javajs.util.M3", ["javajs.util.T3"], function () { -c$ = Clazz.declareType (javajs.util, "M3", javajs.util.M34, java.io.Serializable); -c$.newA9 = Clazz.defineMethod (c$, "newA9", -function (v) { -var m = new javajs.util.M3 (); -m.setA (v); -return m; -}, "~A"); -c$.newM3 = Clazz.defineMethod (c$, "newM3", -function (m1) { -var m = new javajs.util.M3 (); -if (m1 == null) { -m.setScale (1); -return m; -}m.m00 = m1.m00; -m.m01 = m1.m01; -m.m02 = m1.m02; -m.m10 = m1.m10; -m.m11 = m1.m11; -m.m12 = m1.m12; -m.m20 = m1.m20; -m.m21 = m1.m21; -m.m22 = m1.m22; -return m; -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "setScale", -function (scale) { -this.clear33 (); -this.m00 = this.m11 = this.m22 = scale; -}, "~N"); -Clazz.defineMethod (c$, "setM3", -function (m1) { -this.setM33 (m1); -}, "javajs.util.M34"); -Clazz.defineMethod (c$, "setA", -function (m) { -this.m00 = m[0]; -this.m01 = m[1]; -this.m02 = m[2]; -this.m10 = m[3]; -this.m11 = m[4]; -this.m12 = m[5]; -this.m20 = m[6]; -this.m21 = m[7]; -this.m22 = m[8]; -}, "~A"); -Clazz.defineMethod (c$, "setElement", -function (row, col, v) { -this.set33 (row, col, v); -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "getElement", -function (row, col) { -return this.get33 (row, col); -}, "~N,~N"); -Clazz.defineMethod (c$, "setRow", -function (row, x, y, z) { -switch (row) { -case 0: -this.m00 = x; -this.m01 = y; -this.m02 = z; -return; -case 1: -this.m10 = x; -this.m11 = y; -this.m12 = z; -return; -case 2: -this.m20 = x; -this.m21 = y; -this.m22 = z; -return; -default: -this.err (); -} -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "setRowV", -function (row, v) { -switch (row) { -case 0: -this.m00 = v.x; -this.m01 = v.y; -this.m02 = v.z; -return; -case 1: -this.m10 = v.x; -this.m11 = v.y; -this.m12 = v.z; -return; -case 2: -this.m20 = v.x; -this.m21 = v.y; -this.m22 = v.z; -return; -default: -this.err (); -} -}, "~N,javajs.util.T3"); -Clazz.defineMethod (c$, "setRowA", -function (row, v) { -this.setRow33 (row, v); -}, "~N,~A"); -Clazz.overrideMethod (c$, "getRow", -function (row, v) { -this.getRow33 (row, v); -}, "~N,~A"); -Clazz.defineMethod (c$, "setColumn3", -function (column, x, y, z) { -switch (column) { -case 0: -this.m00 = x; -this.m10 = y; -this.m20 = z; -break; -case 1: -this.m01 = x; -this.m11 = y; -this.m21 = z; -break; -case 2: -this.m02 = x; -this.m12 = y; -this.m22 = z; -break; -default: -this.err (); -} -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "setColumnV", -function (column, v) { -switch (column) { -case 0: -this.m00 = v.x; -this.m10 = v.y; -this.m20 = v.z; -break; -case 1: -this.m01 = v.x; -this.m11 = v.y; -this.m21 = v.z; -break; -case 2: -this.m02 = v.x; -this.m12 = v.y; -this.m22 = v.z; -break; -default: -this.err (); -} -}, "~N,javajs.util.T3"); -Clazz.defineMethod (c$, "getColumnV", -function (column, v) { -switch (column) { -case 0: -v.x = this.m00; -v.y = this.m10; -v.z = this.m20; -break; -case 1: -v.x = this.m01; -v.y = this.m11; -v.z = this.m21; -break; -case 2: -v.x = this.m02; -v.y = this.m12; -v.z = this.m22; -break; -default: -this.err (); -} -}, "~N,javajs.util.T3"); -Clazz.defineMethod (c$, "setColumnA", -function (column, v) { -this.setColumn33 (column, v); -}, "~N,~A"); -Clazz.defineMethod (c$, "getColumn", -function (column, v) { -this.getColumn33 (column, v); -}, "~N,~A"); -Clazz.defineMethod (c$, "add", -function (m1) { -this.add33 (m1); -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "sub", -function (m1) { -this.sub33 (m1); -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "transpose", -function () { -this.transpose33 (); -}); -Clazz.defineMethod (c$, "transposeM", -function (m1) { -this.setM33 (m1); -this.transpose33 (); -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "invertM", -function (m1) { -this.setM33 (m1); -this.invert (); -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "invert", -function () { -var s = this.determinant3 (); -if (s == 0.0) return; -s = 1 / s; -this.set9 (this.m11 * this.m22 - this.m12 * this.m21, this.m02 * this.m21 - this.m01 * this.m22, this.m01 * this.m12 - this.m02 * this.m11, this.m12 * this.m20 - this.m10 * this.m22, this.m00 * this.m22 - this.m02 * this.m20, this.m02 * this.m10 - this.m00 * this.m12, this.m10 * this.m21 - this.m11 * this.m20, this.m01 * this.m20 - this.m00 * this.m21, this.m00 * this.m11 - this.m01 * this.m10); -this.scale (s); -}); -Clazz.defineMethod (c$, "setAsXRotation", -function (angle) { -this.setXRot (angle); -return this; -}, "~N"); -Clazz.defineMethod (c$, "setAsYRotation", -function (angle) { -this.setYRot (angle); -return this; -}, "~N"); -Clazz.defineMethod (c$, "setAsZRotation", -function (angle) { -this.setZRot (angle); -return this; -}, "~N"); -Clazz.defineMethod (c$, "scale", -function (scalar) { -this.mul33 (scalar); -}, "~N"); -Clazz.defineMethod (c$, "mul", -function (m1) { -this.mul2 (this, m1); -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "mul2", -function (m1, m2) { -this.set9 (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22); -}, "javajs.util.M3,javajs.util.M3"); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (!(Clazz.instanceOf (o, javajs.util.M3))) return false; -var m = o; -return this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22; -}, "~O"); -Clazz.overrideMethod (c$, "hashCode", -function () { -return javajs.util.T3.floatToIntBits0 (this.m00) ^ javajs.util.T3.floatToIntBits0 (this.m01) ^ javajs.util.T3.floatToIntBits0 (this.m02) ^ javajs.util.T3.floatToIntBits0 (this.m10) ^ javajs.util.T3.floatToIntBits0 (this.m11) ^ javajs.util.T3.floatToIntBits0 (this.m12) ^ javajs.util.T3.floatToIntBits0 (this.m20) ^ javajs.util.T3.floatToIntBits0 (this.m21) ^ javajs.util.T3.floatToIntBits0 (this.m22); -}); -Clazz.defineMethod (c$, "setZero", -function () { -this.clear33 (); -}); -Clazz.defineMethod (c$, "set9", -($fz = function (m00, m01, m02, m10, m11, m12, m20, m21, m22) { -this.m00 = m00; -this.m01 = m01; -this.m02 = m02; -this.m10 = m10; -this.m11 = m11; -this.m12 = m12; -this.m20 = m20; -this.m21 = m21; -this.m22 = m22; -}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return "[\n [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "]" + "\n [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "]" + "\n [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "] ]"; -}); -Clazz.defineMethod (c$, "setAA", -function (a) { -this.setAA33 (a); -return this; -}, "javajs.util.A4"); -Clazz.defineMethod (c$, "setAsBallRotation", -function (responseFactor, dx, dy) { -var r = Math.sqrt (dx * dx + dy * dy); -var th = r * responseFactor; -if (th == 0) { -this.setScale (1); -return false; -}var c = Math.cos (th); -var s = Math.sin (th); -var nx = -dy / r; -var ny = dx / r; -var c1 = c - 1; -this.m00 = 1 + c1 * nx * nx; -this.m01 = this.m10 = c1 * nx * ny; -this.m20 = -(this.m02 = s * nx); -this.m11 = 1 + c1 * ny * ny; -this.m21 = -(this.m12 = s * ny); -this.m22 = c; -return true; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "isRotation", -function () { -return (Math.abs (this.determinant3 () - 1) < 0.001); -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.M34"], "javajs.util.M3", ["javajs.util.T3"], function () { +c$ = Clazz.declareType (javajs.util, "M3", javajs.util.M34, java.io.Serializable); +c$.newA9 = Clazz.defineMethod (c$, "newA9", +function (v) { +var m = new javajs.util.M3 (); +m.setA (v); +return m; +}, "~A"); +c$.newM3 = Clazz.defineMethod (c$, "newM3", +function (m1) { +var m = new javajs.util.M3 (); +if (m1 == null) { +m.setScale (1); +return m; +}m.m00 = m1.m00; +m.m01 = m1.m01; +m.m02 = m1.m02; +m.m10 = m1.m10; +m.m11 = m1.m11; +m.m12 = m1.m12; +m.m20 = m1.m20; +m.m21 = m1.m21; +m.m22 = m1.m22; +return m; +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "setScale", +function (scale) { +this.clear33 (); +this.m00 = this.m11 = this.m22 = scale; +}, "~N"); +Clazz.defineMethod (c$, "setM3", +function (m1) { +this.setM33 (m1); +}, "javajs.util.M34"); +Clazz.defineMethod (c$, "setA", +function (m) { +this.m00 = m[0]; +this.m01 = m[1]; +this.m02 = m[2]; +this.m10 = m[3]; +this.m11 = m[4]; +this.m12 = m[5]; +this.m20 = m[6]; +this.m21 = m[7]; +this.m22 = m[8]; +}, "~A"); +Clazz.defineMethod (c$, "setElement", +function (row, col, v) { +this.set33 (row, col, v); +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "getElement", +function (row, col) { +return this.get33 (row, col); +}, "~N,~N"); +Clazz.defineMethod (c$, "setRow", +function (row, x, y, z) { +switch (row) { +case 0: +this.m00 = x; +this.m01 = y; +this.m02 = z; +return; +case 1: +this.m10 = x; +this.m11 = y; +this.m12 = z; +return; +case 2: +this.m20 = x; +this.m21 = y; +this.m22 = z; +return; +default: +this.err (); +} +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "setRowV", +function (row, v) { +switch (row) { +case 0: +this.m00 = v.x; +this.m01 = v.y; +this.m02 = v.z; +return; +case 1: +this.m10 = v.x; +this.m11 = v.y; +this.m12 = v.z; +return; +case 2: +this.m20 = v.x; +this.m21 = v.y; +this.m22 = v.z; +return; +default: +this.err (); +} +}, "~N,javajs.util.T3"); +Clazz.defineMethod (c$, "setRowA", +function (row, v) { +this.setRow33 (row, v); +}, "~N,~A"); +Clazz.overrideMethod (c$, "getRow", +function (row, v) { +this.getRow33 (row, v); +}, "~N,~A"); +Clazz.defineMethod (c$, "setColumn3", +function (column, x, y, z) { +switch (column) { +case 0: +this.m00 = x; +this.m10 = y; +this.m20 = z; +break; +case 1: +this.m01 = x; +this.m11 = y; +this.m21 = z; +break; +case 2: +this.m02 = x; +this.m12 = y; +this.m22 = z; +break; +default: +this.err (); +} +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "setColumnV", +function (column, v) { +switch (column) { +case 0: +this.m00 = v.x; +this.m10 = v.y; +this.m20 = v.z; +break; +case 1: +this.m01 = v.x; +this.m11 = v.y; +this.m21 = v.z; +break; +case 2: +this.m02 = v.x; +this.m12 = v.y; +this.m22 = v.z; +break; +default: +this.err (); +} +}, "~N,javajs.util.T3"); +Clazz.defineMethod (c$, "getColumnV", +function (column, v) { +switch (column) { +case 0: +v.x = this.m00; +v.y = this.m10; +v.z = this.m20; +break; +case 1: +v.x = this.m01; +v.y = this.m11; +v.z = this.m21; +break; +case 2: +v.x = this.m02; +v.y = this.m12; +v.z = this.m22; +break; +default: +this.err (); +} +}, "~N,javajs.util.T3"); +Clazz.defineMethod (c$, "setColumnA", +function (column, v) { +this.setColumn33 (column, v); +}, "~N,~A"); +Clazz.defineMethod (c$, "getColumn", +function (column, v) { +this.getColumn33 (column, v); +}, "~N,~A"); +Clazz.defineMethod (c$, "add", +function (m1) { +this.add33 (m1); +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "sub", +function (m1) { +this.sub33 (m1); +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "transpose", +function () { +this.transpose33 (); +}); +Clazz.defineMethod (c$, "transposeM", +function (m1) { +this.setM33 (m1); +this.transpose33 (); +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "invertM", +function (m1) { +this.setM33 (m1); +this.invert (); +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "invert", +function () { +var s = this.determinant3 (); +if (s == 0.0) return; +s = 1 / s; +this.set9 (this.m11 * this.m22 - this.m12 * this.m21, this.m02 * this.m21 - this.m01 * this.m22, this.m01 * this.m12 - this.m02 * this.m11, this.m12 * this.m20 - this.m10 * this.m22, this.m00 * this.m22 - this.m02 * this.m20, this.m02 * this.m10 - this.m00 * this.m12, this.m10 * this.m21 - this.m11 * this.m20, this.m01 * this.m20 - this.m00 * this.m21, this.m00 * this.m11 - this.m01 * this.m10); +this.scale (s); +}); +Clazz.defineMethod (c$, "setAsXRotation", +function (angle) { +this.setXRot (angle); +return this; +}, "~N"); +Clazz.defineMethod (c$, "setAsYRotation", +function (angle) { +this.setYRot (angle); +return this; +}, "~N"); +Clazz.defineMethod (c$, "setAsZRotation", +function (angle) { +this.setZRot (angle); +return this; +}, "~N"); +Clazz.defineMethod (c$, "scale", +function (scalar) { +this.mul33 (scalar); +}, "~N"); +Clazz.defineMethod (c$, "mul", +function (m1) { +this.mul2 (this, m1); +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "mul2", +function (m1, m2) { +this.set9 (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22); +}, "javajs.util.M3,javajs.util.M3"); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (!(Clazz.instanceOf (o, javajs.util.M3))) return false; +var m = o; +return this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22; +}, "~O"); +Clazz.overrideMethod (c$, "hashCode", +function () { +return javajs.util.T3.floatToIntBits0 (this.m00) ^ javajs.util.T3.floatToIntBits0 (this.m01) ^ javajs.util.T3.floatToIntBits0 (this.m02) ^ javajs.util.T3.floatToIntBits0 (this.m10) ^ javajs.util.T3.floatToIntBits0 (this.m11) ^ javajs.util.T3.floatToIntBits0 (this.m12) ^ javajs.util.T3.floatToIntBits0 (this.m20) ^ javajs.util.T3.floatToIntBits0 (this.m21) ^ javajs.util.T3.floatToIntBits0 (this.m22); +}); +Clazz.defineMethod (c$, "setZero", +function () { +this.clear33 (); +}); +Clazz.defineMethod (c$, "set9", +($fz = function (m00, m01, m02, m10, m11, m12, m20, m21, m22) { +this.m00 = m00; +this.m01 = m01; +this.m02 = m02; +this.m10 = m10; +this.m11 = m11; +this.m12 = m12; +this.m20 = m20; +this.m21 = m21; +this.m22 = m22; +}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return "[\n [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "]" + "\n [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "]" + "\n [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "] ]"; +}); +Clazz.defineMethod (c$, "setAA", +function (a) { +this.setAA33 (a); +return this; +}, "javajs.util.A4"); +Clazz.defineMethod (c$, "setAsBallRotation", +function (responseFactor, dx, dy) { +var r = Math.sqrt (dx * dx + dy * dy); +var th = r * responseFactor; +if (th == 0) { +this.setScale (1); +return false; +}var c = Math.cos (th); +var s = Math.sin (th); +var nx = -dy / r; +var ny = dx / r; +var c1 = c - 1; +this.m00 = 1 + c1 * nx * nx; +this.m01 = this.m10 = c1 * nx * ny; +this.m20 = -(this.m02 = s * nx); +this.m11 = 1 + c1 * ny * ny; +this.m21 = -(this.m12 = s * ny); +this.m22 = c; +return true; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "isRotation", +function () { +return (Math.abs (this.determinant3 () - 1) < 0.001); +}); +}); diff --git a/bin/javajs/util/M34.js b/bin/javajs/util/M34.js index 47c6a34..ae3f33d 100644 --- a/bin/javajs/util/M34.js +++ b/bin/javajs/util/M34.js @@ -1,336 +1,336 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (null, "javajs.util.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () { -c$ = Clazz.decorateAsClass (function () { -this.m00 = 0; -this.m01 = 0; -this.m02 = 0; -this.m10 = 0; -this.m11 = 0; -this.m12 = 0; -this.m20 = 0; -this.m21 = 0; -this.m22 = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "M34"); -Clazz.defineMethod (c$, "setAA33", -function (a) { -var x = a.x; -var y = a.y; -var z = a.z; -var angle = a.angle; -var n = Math.sqrt (x * x + y * y + z * z); -n = 1 / n; -x *= n; -y *= n; -z *= n; -var c = Math.cos (angle); -var s = Math.sin (angle); -var omc = 1.0 - c; -this.m00 = (c + x * x * omc); -this.m11 = (c + y * y * omc); -this.m22 = (c + z * z * omc); -var tmp1 = x * y * omc; -var tmp2 = z * s; -this.m01 = (tmp1 - tmp2); -this.m10 = (tmp1 + tmp2); -tmp1 = x * z * omc; -tmp2 = y * s; -this.m02 = (tmp1 + tmp2); -this.m20 = (tmp1 - tmp2); -tmp1 = y * z * omc; -tmp2 = x * s; -this.m12 = (tmp1 - tmp2); -this.m21 = (tmp1 + tmp2); -}, "javajs.util.A4"); -Clazz.defineMethod (c$, "rotate", -function (t) { -this.rotate2 (t, t); -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "rotate2", -function (t, result) { -result.set (this.m00 * t.x + this.m01 * t.y + this.m02 * t.z, this.m10 * t.x + this.m11 * t.y + this.m12 * t.z, this.m20 * t.x + this.m21 * t.y + this.m22 * t.z); -}, "javajs.util.T3,javajs.util.T3"); -Clazz.defineMethod (c$, "setM33", -function (m1) { -this.m00 = m1.m00; -this.m01 = m1.m01; -this.m02 = m1.m02; -this.m10 = m1.m10; -this.m11 = m1.m11; -this.m12 = m1.m12; -this.m20 = m1.m20; -this.m21 = m1.m21; -this.m22 = m1.m22; -}, "javajs.util.M34"); -Clazz.defineMethod (c$, "clear33", -function () { -this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0; -}); -Clazz.defineMethod (c$, "set33", -function (row, col, v) { -switch (row) { -case 0: -switch (col) { -case 0: -this.m00 = v; -return; -case 1: -this.m01 = v; -return; -case 2: -this.m02 = v; -return; -} -break; -case 1: -switch (col) { -case 0: -this.m10 = v; -return; -case 1: -this.m11 = v; -return; -case 2: -this.m12 = v; -return; -} -break; -case 2: -switch (col) { -case 0: -this.m20 = v; -return; -case 1: -this.m21 = v; -return; -case 2: -this.m22 = v; -return; -} -break; -} -this.err (); -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "get33", -function (row, col) { -switch (row) { -case 0: -switch (col) { -case 0: -return this.m00; -case 1: -return this.m01; -case 2: -return this.m02; -} -break; -case 1: -switch (col) { -case 0: -return this.m10; -case 1: -return this.m11; -case 2: -return this.m12; -} -break; -case 2: -switch (col) { -case 0: -return this.m20; -case 1: -return this.m21; -case 2: -return this.m22; -} -break; -} -this.err (); -return 0; -}, "~N,~N"); -Clazz.defineMethod (c$, "setRow33", -function (row, v) { -switch (row) { -case 0: -this.m00 = v[0]; -this.m01 = v[1]; -this.m02 = v[2]; -return; -case 1: -this.m10 = v[0]; -this.m11 = v[1]; -this.m12 = v[2]; -return; -case 2: -this.m20 = v[0]; -this.m21 = v[1]; -this.m22 = v[2]; -return; -default: -this.err (); -} -}, "~N,~A"); -Clazz.defineMethod (c$, "getRow33", -function (row, v) { -switch (row) { -case 0: -v[0] = this.m00; -v[1] = this.m01; -v[2] = this.m02; -return; -case 1: -v[0] = this.m10; -v[1] = this.m11; -v[2] = this.m12; -return; -case 2: -v[0] = this.m20; -v[1] = this.m21; -v[2] = this.m22; -return; -} -this.err (); -}, "~N,~A"); -Clazz.defineMethod (c$, "setColumn33", -function (column, v) { -switch (column) { -case 0: -this.m00 = v[0]; -this.m10 = v[1]; -this.m20 = v[2]; -break; -case 1: -this.m01 = v[0]; -this.m11 = v[1]; -this.m21 = v[2]; -break; -case 2: -this.m02 = v[0]; -this.m12 = v[1]; -this.m22 = v[2]; -break; -default: -this.err (); -} -}, "~N,~A"); -Clazz.defineMethod (c$, "getColumn33", -function (column, v) { -switch (column) { -case 0: -v[0] = this.m00; -v[1] = this.m10; -v[2] = this.m20; -break; -case 1: -v[0] = this.m01; -v[1] = this.m11; -v[2] = this.m21; -break; -case 2: -v[0] = this.m02; -v[1] = this.m12; -v[2] = this.m22; -break; -default: -this.err (); -} -}, "~N,~A"); -Clazz.defineMethod (c$, "add33", -function (m1) { -this.m00 += m1.m00; -this.m01 += m1.m01; -this.m02 += m1.m02; -this.m10 += m1.m10; -this.m11 += m1.m11; -this.m12 += m1.m12; -this.m20 += m1.m20; -this.m21 += m1.m21; -this.m22 += m1.m22; -}, "javajs.util.M34"); -Clazz.defineMethod (c$, "sub33", -function (m1) { -this.m00 -= m1.m00; -this.m01 -= m1.m01; -this.m02 -= m1.m02; -this.m10 -= m1.m10; -this.m11 -= m1.m11; -this.m12 -= m1.m12; -this.m20 -= m1.m20; -this.m21 -= m1.m21; -this.m22 -= m1.m22; -}, "javajs.util.M34"); -Clazz.defineMethod (c$, "mul33", -function (x) { -this.m00 *= x; -this.m01 *= x; -this.m02 *= x; -this.m10 *= x; -this.m11 *= x; -this.m12 *= x; -this.m20 *= x; -this.m21 *= x; -this.m22 *= x; -}, "~N"); -Clazz.defineMethod (c$, "transpose33", -function () { -var tmp = this.m01; -this.m01 = this.m10; -this.m10 = tmp; -tmp = this.m02; -this.m02 = this.m20; -this.m20 = tmp; -tmp = this.m12; -this.m12 = this.m21; -this.m21 = tmp; -}); -Clazz.defineMethod (c$, "setXRot", -function (angle) { -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = 1.0; -this.m01 = 0.0; -this.m02 = 0.0; -this.m10 = 0.0; -this.m11 = c; -this.m12 = -s; -this.m20 = 0.0; -this.m21 = s; -this.m22 = c; -}, "~N"); -Clazz.defineMethod (c$, "setYRot", -function (angle) { -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = c; -this.m01 = 0.0; -this.m02 = s; -this.m10 = 0.0; -this.m11 = 1.0; -this.m12 = 0.0; -this.m20 = -s; -this.m21 = 0.0; -this.m22 = c; -}, "~N"); -Clazz.defineMethod (c$, "setZRot", -function (angle) { -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = c; -this.m01 = -s; -this.m02 = 0.0; -this.m10 = s; -this.m11 = c; -this.m12 = 0.0; -this.m20 = 0.0; -this.m21 = 0.0; -this.m22 = 1.0; -}, "~N"); -Clazz.defineMethod (c$, "determinant3", -function () { -return this.m00 * (this.m11 * this.m22 - this.m21 * this.m12) - this.m01 * (this.m10 * this.m22 - this.m20 * this.m12) + this.m02 * (this.m10 * this.m21 - this.m20 * this.m11); -}); -Clazz.defineMethod (c$, "err", -function () { -throw new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds"); -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (null, "javajs.util.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () { +c$ = Clazz.decorateAsClass (function () { +this.m00 = 0; +this.m01 = 0; +this.m02 = 0; +this.m10 = 0; +this.m11 = 0; +this.m12 = 0; +this.m20 = 0; +this.m21 = 0; +this.m22 = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "M34"); +Clazz.defineMethod (c$, "setAA33", +function (a) { +var x = a.x; +var y = a.y; +var z = a.z; +var angle = a.angle; +var n = Math.sqrt (x * x + y * y + z * z); +n = 1 / n; +x *= n; +y *= n; +z *= n; +var c = Math.cos (angle); +var s = Math.sin (angle); +var omc = 1.0 - c; +this.m00 = (c + x * x * omc); +this.m11 = (c + y * y * omc); +this.m22 = (c + z * z * omc); +var tmp1 = x * y * omc; +var tmp2 = z * s; +this.m01 = (tmp1 - tmp2); +this.m10 = (tmp1 + tmp2); +tmp1 = x * z * omc; +tmp2 = y * s; +this.m02 = (tmp1 + tmp2); +this.m20 = (tmp1 - tmp2); +tmp1 = y * z * omc; +tmp2 = x * s; +this.m12 = (tmp1 - tmp2); +this.m21 = (tmp1 + tmp2); +}, "javajs.util.A4"); +Clazz.defineMethod (c$, "rotate", +function (t) { +this.rotate2 (t, t); +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "rotate2", +function (t, result) { +result.set (this.m00 * t.x + this.m01 * t.y + this.m02 * t.z, this.m10 * t.x + this.m11 * t.y + this.m12 * t.z, this.m20 * t.x + this.m21 * t.y + this.m22 * t.z); +}, "javajs.util.T3,javajs.util.T3"); +Clazz.defineMethod (c$, "setM33", +function (m1) { +this.m00 = m1.m00; +this.m01 = m1.m01; +this.m02 = m1.m02; +this.m10 = m1.m10; +this.m11 = m1.m11; +this.m12 = m1.m12; +this.m20 = m1.m20; +this.m21 = m1.m21; +this.m22 = m1.m22; +}, "javajs.util.M34"); +Clazz.defineMethod (c$, "clear33", +function () { +this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0; +}); +Clazz.defineMethod (c$, "set33", +function (row, col, v) { +switch (row) { +case 0: +switch (col) { +case 0: +this.m00 = v; +return; +case 1: +this.m01 = v; +return; +case 2: +this.m02 = v; +return; +} +break; +case 1: +switch (col) { +case 0: +this.m10 = v; +return; +case 1: +this.m11 = v; +return; +case 2: +this.m12 = v; +return; +} +break; +case 2: +switch (col) { +case 0: +this.m20 = v; +return; +case 1: +this.m21 = v; +return; +case 2: +this.m22 = v; +return; +} +break; +} +this.err (); +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "get33", +function (row, col) { +switch (row) { +case 0: +switch (col) { +case 0: +return this.m00; +case 1: +return this.m01; +case 2: +return this.m02; +} +break; +case 1: +switch (col) { +case 0: +return this.m10; +case 1: +return this.m11; +case 2: +return this.m12; +} +break; +case 2: +switch (col) { +case 0: +return this.m20; +case 1: +return this.m21; +case 2: +return this.m22; +} +break; +} +this.err (); +return 0; +}, "~N,~N"); +Clazz.defineMethod (c$, "setRow33", +function (row, v) { +switch (row) { +case 0: +this.m00 = v[0]; +this.m01 = v[1]; +this.m02 = v[2]; +return; +case 1: +this.m10 = v[0]; +this.m11 = v[1]; +this.m12 = v[2]; +return; +case 2: +this.m20 = v[0]; +this.m21 = v[1]; +this.m22 = v[2]; +return; +default: +this.err (); +} +}, "~N,~A"); +Clazz.defineMethod (c$, "getRow33", +function (row, v) { +switch (row) { +case 0: +v[0] = this.m00; +v[1] = this.m01; +v[2] = this.m02; +return; +case 1: +v[0] = this.m10; +v[1] = this.m11; +v[2] = this.m12; +return; +case 2: +v[0] = this.m20; +v[1] = this.m21; +v[2] = this.m22; +return; +} +this.err (); +}, "~N,~A"); +Clazz.defineMethod (c$, "setColumn33", +function (column, v) { +switch (column) { +case 0: +this.m00 = v[0]; +this.m10 = v[1]; +this.m20 = v[2]; +break; +case 1: +this.m01 = v[0]; +this.m11 = v[1]; +this.m21 = v[2]; +break; +case 2: +this.m02 = v[0]; +this.m12 = v[1]; +this.m22 = v[2]; +break; +default: +this.err (); +} +}, "~N,~A"); +Clazz.defineMethod (c$, "getColumn33", +function (column, v) { +switch (column) { +case 0: +v[0] = this.m00; +v[1] = this.m10; +v[2] = this.m20; +break; +case 1: +v[0] = this.m01; +v[1] = this.m11; +v[2] = this.m21; +break; +case 2: +v[0] = this.m02; +v[1] = this.m12; +v[2] = this.m22; +break; +default: +this.err (); +} +}, "~N,~A"); +Clazz.defineMethod (c$, "add33", +function (m1) { +this.m00 += m1.m00; +this.m01 += m1.m01; +this.m02 += m1.m02; +this.m10 += m1.m10; +this.m11 += m1.m11; +this.m12 += m1.m12; +this.m20 += m1.m20; +this.m21 += m1.m21; +this.m22 += m1.m22; +}, "javajs.util.M34"); +Clazz.defineMethod (c$, "sub33", +function (m1) { +this.m00 -= m1.m00; +this.m01 -= m1.m01; +this.m02 -= m1.m02; +this.m10 -= m1.m10; +this.m11 -= m1.m11; +this.m12 -= m1.m12; +this.m20 -= m1.m20; +this.m21 -= m1.m21; +this.m22 -= m1.m22; +}, "javajs.util.M34"); +Clazz.defineMethod (c$, "mul33", +function (x) { +this.m00 *= x; +this.m01 *= x; +this.m02 *= x; +this.m10 *= x; +this.m11 *= x; +this.m12 *= x; +this.m20 *= x; +this.m21 *= x; +this.m22 *= x; +}, "~N"); +Clazz.defineMethod (c$, "transpose33", +function () { +var tmp = this.m01; +this.m01 = this.m10; +this.m10 = tmp; +tmp = this.m02; +this.m02 = this.m20; +this.m20 = tmp; +tmp = this.m12; +this.m12 = this.m21; +this.m21 = tmp; +}); +Clazz.defineMethod (c$, "setXRot", +function (angle) { +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = 1.0; +this.m01 = 0.0; +this.m02 = 0.0; +this.m10 = 0.0; +this.m11 = c; +this.m12 = -s; +this.m20 = 0.0; +this.m21 = s; +this.m22 = c; +}, "~N"); +Clazz.defineMethod (c$, "setYRot", +function (angle) { +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = c; +this.m01 = 0.0; +this.m02 = s; +this.m10 = 0.0; +this.m11 = 1.0; +this.m12 = 0.0; +this.m20 = -s; +this.m21 = 0.0; +this.m22 = c; +}, "~N"); +Clazz.defineMethod (c$, "setZRot", +function (angle) { +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = c; +this.m01 = -s; +this.m02 = 0.0; +this.m10 = s; +this.m11 = c; +this.m12 = 0.0; +this.m20 = 0.0; +this.m21 = 0.0; +this.m22 = 1.0; +}, "~N"); +Clazz.defineMethod (c$, "determinant3", +function () { +return this.m00 * (this.m11 * this.m22 - this.m21 * this.m12) - this.m01 * (this.m10 * this.m22 - this.m20 * this.m12) + this.m02 * (this.m10 * this.m21 - this.m20 * this.m11); +}); +Clazz.defineMethod (c$, "err", +function () { +throw new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds"); +}); +}); diff --git a/bin/javajs/util/M4.js b/bin/javajs/util/M4.js index 211ae5d..59c23db 100644 --- a/bin/javajs/util/M4.js +++ b/bin/javajs/util/M4.js @@ -1,486 +1,486 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.M34"], "javajs.util.M4", ["javajs.util.T3"], function () { -c$ = Clazz.decorateAsClass (function () { -this.m03 = 0; -this.m13 = 0; -this.m23 = 0; -this.m30 = 0; -this.m31 = 0; -this.m32 = 0; -this.m33 = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "M4", javajs.util.M34); -c$.newA16 = Clazz.defineMethod (c$, "newA16", -function (v) { -var m = new javajs.util.M4 (); -m.m00 = v[0]; -m.m01 = v[1]; -m.m02 = v[2]; -m.m03 = v[3]; -m.m10 = v[4]; -m.m11 = v[5]; -m.m12 = v[6]; -m.m13 = v[7]; -m.m20 = v[8]; -m.m21 = v[9]; -m.m22 = v[10]; -m.m23 = v[11]; -m.m30 = v[12]; -m.m31 = v[13]; -m.m32 = v[14]; -m.m33 = v[15]; -return m; -}, "~A"); -c$.newM4 = Clazz.defineMethod (c$, "newM4", -function (m1) { -var m = new javajs.util.M4 (); -if (m1 == null) { -m.setIdentity (); -return m; -}m.setToM3 (m1); -m.m03 = m1.m03; -m.m13 = m1.m13; -m.m23 = m1.m23; -m.m30 = m1.m30; -m.m31 = m1.m31; -m.m32 = m1.m32; -m.m33 = m1.m33; -return m; -}, "javajs.util.M4"); -c$.newMV = Clazz.defineMethod (c$, "newMV", -function (m1, t) { -var m = new javajs.util.M4 (); -m.setMV (m1, t); -return m; -}, "javajs.util.M3,javajs.util.T3"); -Clazz.defineMethod (c$, "setZero", -function () { -this.clear33 (); -this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0; -}); -Clazz.defineMethod (c$, "setIdentity", -function () { -this.setZero (); -this.m00 = this.m11 = this.m22 = this.m33 = 1.0; -}); -Clazz.defineMethod (c$, "setM4", -function (m1) { -this.setM33 (m1); -this.m03 = m1.m03; -this.m13 = m1.m13; -this.m23 = m1.m23; -this.m30 = m1.m30; -this.m31 = m1.m31; -this.m32 = m1.m32; -this.m33 = m1.m33; -return this; -}, "javajs.util.M4"); -Clazz.defineMethod (c$, "setMV", -function (m1, t) { -this.setM33 (m1); -this.setTranslation (t); -this.m33 = 1; -}, "javajs.util.M3,javajs.util.T3"); -Clazz.defineMethod (c$, "setToM3", -function (m1) { -this.setM33 (m1); -this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0; -this.m33 = 1.0; -}, "javajs.util.M34"); -Clazz.defineMethod (c$, "setToAA", -function (a) { -this.setIdentity (); -this.setAA33 (a); -}, "javajs.util.A4"); -Clazz.defineMethod (c$, "setA", -function (m) { -this.m00 = m[0]; -this.m01 = m[1]; -this.m02 = m[2]; -this.m03 = m[3]; -this.m10 = m[4]; -this.m11 = m[5]; -this.m12 = m[6]; -this.m13 = m[7]; -this.m20 = m[8]; -this.m21 = m[9]; -this.m22 = m[10]; -this.m23 = m[11]; -this.m30 = m[12]; -this.m31 = m[13]; -this.m32 = m[14]; -this.m33 = m[15]; -}, "~A"); -Clazz.defineMethod (c$, "setTranslation", -function (trans) { -this.m03 = trans.x; -this.m13 = trans.y; -this.m23 = trans.z; -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "setElement", -function (row, col, v) { -if (row < 3 && col < 3) { -this.set33 (row, col, v); -return; -}if (row > 3 || col > 3) this.err (); -switch (row) { -case 0: -this.m03 = v; -return; -case 1: -this.m13 = v; -return; -case 2: -this.m23 = v; -return; -} -switch (col) { -case 0: -this.m30 = v; -return; -case 1: -this.m31 = v; -return; -case 2: -this.m32 = v; -return; -case 3: -this.m33 = v; -return; -} -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "getElement", -function (row, col) { -if (row < 3 && col < 3) return this.get33 (row, col); -if (row > 3 || col > 3) { -this.err (); -return 0; -}switch (row) { -case 0: -return this.m03; -case 1: -return this.m13; -case 2: -return this.m23; -default: -switch (col) { -case 0: -return this.m30; -case 1: -return this.m31; -case 2: -return this.m32; -default: -return this.m33; -} -} -}, "~N,~N"); -Clazz.defineMethod (c$, "getTranslation", -function (trans) { -trans.x = this.m03; -trans.y = this.m13; -trans.z = this.m23; -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "getRotationScale", -function (m1) { -m1.m00 = this.m00; -m1.m01 = this.m01; -m1.m02 = this.m02; -m1.m10 = this.m10; -m1.m11 = this.m11; -m1.m12 = this.m12; -m1.m20 = this.m20; -m1.m21 = this.m21; -m1.m22 = this.m22; -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "setRotationScale", -function (m1) { -this.m00 = m1.m00; -this.m01 = m1.m01; -this.m02 = m1.m02; -this.m10 = m1.m10; -this.m11 = m1.m11; -this.m12 = m1.m12; -this.m20 = m1.m20; -this.m21 = m1.m21; -this.m22 = m1.m22; -}, "javajs.util.M3"); -Clazz.defineMethod (c$, "setRowA", -function (row, v) { -if (row < 3) this.setRow33 (row, v); -switch (row) { -case 0: -this.m03 = v[3]; -return; -case 1: -this.m13 = v[3]; -return; -case 2: -this.m23 = v[3]; -return; -case 3: -this.m30 = v[0]; -this.m31 = v[1]; -this.m32 = v[2]; -this.m33 = v[3]; -return; -} -this.err (); -}, "~N,~A"); -Clazz.overrideMethod (c$, "getRow", -function (row, v) { -if (row < 3) this.getRow33 (row, v); -switch (row) { -case 0: -v[3] = this.m03; -return; -case 1: -v[3] = this.m13; -return; -case 2: -v[3] = this.m23; -return; -case 3: -v[0] = this.m30; -v[1] = this.m31; -v[2] = this.m32; -v[3] = this.m33; -return; -} -this.err (); -}, "~N,~A"); -Clazz.defineMethod (c$, "setColumn4", -function (column, x, y, z, w) { -if (column == 0) { -this.m00 = x; -this.m10 = y; -this.m20 = z; -this.m30 = w; -} else if (column == 1) { -this.m01 = x; -this.m11 = y; -this.m21 = z; -this.m31 = w; -} else if (column == 2) { -this.m02 = x; -this.m12 = y; -this.m22 = z; -this.m32 = w; -} else if (column == 3) { -this.m03 = x; -this.m13 = y; -this.m23 = z; -this.m33 = w; -} else { -this.err (); -}}, "~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "setColumnA", -function (column, v) { -if (column < 3) this.setColumn33 (column, v); -switch (column) { -case 0: -this.m30 = v[3]; -return; -case 1: -this.m31 = v[3]; -return; -case 2: -this.m32 = v[3]; -return; -case 3: -this.m03 = v[0]; -this.m13 = v[1]; -this.m23 = v[2]; -this.m33 = v[3]; -return; -default: -this.err (); -} -}, "~N,~A"); -Clazz.defineMethod (c$, "getColumn", -function (column, v) { -if (column < 3) this.getColumn33 (column, v); -switch (column) { -case 0: -v[3] = this.m30; -return; -case 1: -v[3] = this.m31; -return; -case 2: -v[3] = this.m32; -return; -case 3: -v[0] = this.m03; -v[1] = this.m13; -v[2] = this.m23; -v[3] = this.m33; -return; -default: -this.err (); -} -}, "~N,~A"); -Clazz.defineMethod (c$, "sub", -function (m1) { -this.sub33 (m1); -this.m03 -= m1.m03; -this.m13 -= m1.m13; -this.m23 -= m1.m23; -this.m30 -= m1.m30; -this.m31 -= m1.m31; -this.m32 -= m1.m32; -this.m33 -= m1.m33; -}, "javajs.util.M4"); -Clazz.defineMethod (c$, "transpose", -function () { -this.transpose33 (); -var tmp = this.m03; -this.m03 = this.m30; -this.m30 = tmp; -tmp = this.m13; -this.m13 = this.m31; -this.m31 = tmp; -tmp = this.m23; -this.m23 = this.m32; -this.m32 = tmp; -}); -Clazz.defineMethod (c$, "invert", -function () { -var s = this.determinant4 (); -if (s == 0.0) return this; -s = 1 / s; -this.set (this.m11 * (this.m22 * this.m33 - this.m23 * this.m32) + this.m12 * (this.m23 * this.m31 - this.m21 * this.m33) + this.m13 * (this.m21 * this.m32 - this.m22 * this.m31), this.m21 * (this.m02 * this.m33 - this.m03 * this.m32) + this.m22 * (this.m03 * this.m31 - this.m01 * this.m33) + this.m23 * (this.m01 * this.m32 - this.m02 * this.m31), this.m31 * (this.m02 * this.m13 - this.m03 * this.m12) + this.m32 * (this.m03 * this.m11 - this.m01 * this.m13) + this.m33 * (this.m01 * this.m12 - this.m02 * this.m11), this.m01 * (this.m13 * this.m22 - this.m12 * this.m23) + this.m02 * (this.m11 * this.m23 - this.m13 * this.m21) + this.m03 * (this.m12 * this.m21 - this.m11 * this.m22), this.m12 * (this.m20 * this.m33 - this.m23 * this.m30) + this.m13 * (this.m22 * this.m30 - this.m20 * this.m32) + this.m10 * (this.m23 * this.m32 - this.m22 * this.m33), this.m22 * (this.m00 * this.m33 - this.m03 * this.m30) + this.m23 * (this.m02 * this.m30 - this.m00 * this.m32) + this.m20 * (this.m03 * this.m32 - this.m02 * this.m33), this.m32 * (this.m00 * this.m13 - this.m03 * this.m10) + this.m33 * (this.m02 * this.m10 - this.m00 * this.m12) + this.m30 * (this.m03 * this.m12 - this.m02 * this.m13), this.m02 * (this.m13 * this.m20 - this.m10 * this.m23) + this.m03 * (this.m10 * this.m22 - this.m12 * this.m20) + this.m00 * (this.m12 * this.m23 - this.m13 * this.m22), this.m13 * (this.m20 * this.m31 - this.m21 * this.m30) + this.m10 * (this.m21 * this.m33 - this.m23 * this.m31) + this.m11 * (this.m23 * this.m30 - this.m20 * this.m33), this.m23 * (this.m00 * this.m31 - this.m01 * this.m30) + this.m20 * (this.m01 * this.m33 - this.m03 * this.m31) + this.m21 * (this.m03 * this.m30 - this.m00 * this.m33), this.m33 * (this.m00 * this.m11 - this.m01 * this.m10) + this.m30 * (this.m01 * this.m13 - this.m03 * this.m11) + this.m31 * (this.m03 * this.m10 - this.m00 * this.m13), this.m03 * (this.m11 * this.m20 - this.m10 * this.m21) + this.m00 * (this.m13 * this.m21 - this.m11 * this.m23) + this.m01 * (this.m10 * this.m23 - this.m13 * this.m20), this.m10 * (this.m22 * this.m31 - this.m21 * this.m32) + this.m11 * (this.m20 * this.m32 - this.m22 * this.m30) + this.m12 * (this.m21 * this.m30 - this.m20 * this.m31), this.m20 * (this.m02 * this.m31 - this.m01 * this.m32) + this.m21 * (this.m00 * this.m32 - this.m02 * this.m30) + this.m22 * (this.m01 * this.m30 - this.m00 * this.m31), this.m30 * (this.m02 * this.m11 - this.m01 * this.m12) + this.m31 * (this.m00 * this.m12 - this.m02 * this.m10) + this.m32 * (this.m01 * this.m10 - this.m00 * this.m11), this.m00 * (this.m11 * this.m22 - this.m12 * this.m21) + this.m01 * (this.m12 * this.m20 - this.m10 * this.m22) + this.m02 * (this.m10 * this.m21 - this.m11 * this.m20)); -this.scale (s); -return this; -}); -Clazz.defineMethod (c$, "set", -($fz = function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { -this.m00 = m00; -this.m01 = m01; -this.m02 = m02; -this.m03 = m03; -this.m10 = m10; -this.m11 = m11; -this.m12 = m12; -this.m13 = m13; -this.m20 = m20; -this.m21 = m21; -this.m22 = m22; -this.m23 = m23; -this.m30 = m30; -this.m31 = m31; -this.m32 = m32; -this.m33 = m33; -}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "determinant4", -function () { -return (this.m00 * this.m11 - this.m01 * this.m10) * (this.m22 * this.m33 - this.m23 * this.m32) - (this.m00 * this.m12 - this.m02 * this.m10) * (this.m21 * this.m33 - this.m23 * this.m31) + (this.m00 * this.m13 - this.m03 * this.m10) * (this.m21 * this.m32 - this.m22 * this.m31) + (this.m01 * this.m12 - this.m02 * this.m11) * (this.m20 * this.m33 - this.m23 * this.m30) - (this.m01 * this.m13 - this.m03 * this.m11) * (this.m20 * this.m32 - this.m22 * this.m30) + (this.m02 * this.m13 - this.m03 * this.m12) * (this.m20 * this.m31 - this.m21 * this.m30); -}); -Clazz.defineMethod (c$, "scale", -($fz = function (scalar) { -this.mul33 (scalar); -this.m03 *= scalar; -this.m13 *= scalar; -this.m23 *= scalar; -this.m30 *= scalar; -this.m31 *= scalar; -this.m32 *= scalar; -this.m33 *= scalar; -}, $fz.isPrivate = true, $fz), "~N"); -Clazz.defineMethod (c$, "mul", -function (m1) { -this.mul2 (this, m1); -}, "javajs.util.M4"); -Clazz.defineMethod (c$, "mul2", -function (m1, m2) { -this.set (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20 + m1.m03 * m2.m30, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21 + m1.m03 * m2.m31, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22 + m1.m03 * m2.m32, m1.m00 * m2.m03 + m1.m01 * m2.m13 + m1.m02 * m2.m23 + m1.m03 * m2.m33, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20 + m1.m13 * m2.m30, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21 + m1.m13 * m2.m31, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22 + m1.m13 * m2.m32, m1.m10 * m2.m03 + m1.m11 * m2.m13 + m1.m12 * m2.m23 + m1.m13 * m2.m33, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20 + m1.m23 * m2.m30, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21 + m1.m23 * m2.m31, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22 + m1.m23 * m2.m32, m1.m20 * m2.m03 + m1.m21 * m2.m13 + m1.m22 * m2.m23 + m1.m23 * m2.m33, m1.m30 * m2.m00 + m1.m31 * m2.m10 + m1.m32 * m2.m20 + m1.m33 * m2.m30, m1.m30 * m2.m01 + m1.m31 * m2.m11 + m1.m32 * m2.m21 + m1.m33 * m2.m31, m1.m30 * m2.m02 + m1.m31 * m2.m12 + m1.m32 * m2.m22 + m1.m33 * m2.m32, m1.m30 * m2.m03 + m1.m31 * m2.m13 + m1.m32 * m2.m23 + m1.m33 * m2.m33); -}, "javajs.util.M4,javajs.util.M4"); -Clazz.defineMethod (c$, "transform", -function (vec) { -this.transform2 (vec, vec); -}, "javajs.util.T4"); -Clazz.defineMethod (c$, "transform2", -function (vec, vecOut) { -vecOut.set4 (this.m00 * vec.x + this.m01 * vec.y + this.m02 * vec.z + this.m03 * vec.w, this.m10 * vec.x + this.m11 * vec.y + this.m12 * vec.z + this.m13 * vec.w, this.m20 * vec.x + this.m21 * vec.y + this.m22 * vec.z + this.m23 * vec.w, this.m30 * vec.x + this.m31 * vec.y + this.m32 * vec.z + this.m33 * vec.w); -}, "javajs.util.T4,javajs.util.T4"); -Clazz.defineMethod (c$, "rotTrans", -function (point) { -this.rotTrans2 (point, point); -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "rotTrans2", -function (point, pointOut) { -pointOut.set (this.m00 * point.x + this.m01 * point.y + this.m02 * point.z + this.m03, this.m10 * point.x + this.m11 * point.y + this.m12 * point.z + this.m13, this.m20 * point.x + this.m21 * point.y + this.m22 * point.z + this.m23); -return pointOut; -}, "javajs.util.T3,javajs.util.T3"); -Clazz.defineMethod (c$, "setAsXYRotation", -function (angle) { -this.setIdentity (); -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m22 = c; -this.m23 = -s; -this.m32 = s; -this.m33 = c; -return this; -}, "~N"); -Clazz.defineMethod (c$, "setAsYZRotation", -function (angle) { -this.setIdentity (); -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = c; -this.m03 = -s; -this.m30 = s; -this.m33 = c; -return this; -}, "~N"); -Clazz.defineMethod (c$, "setAsXZRotation", -function (angle) { -this.setIdentity (); -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m11 = c; -this.m13 = -s; -this.m31 = s; -this.m33 = c; -return this; -}, "~N"); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (!(Clazz.instanceOf (o, javajs.util.M4))) return false; -var m = o; -return (this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m03 == m.m03 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m13 == m.m13 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22 && this.m23 == m.m23 && this.m30 == m.m30 && this.m31 == m.m31 && this.m32 == m.m32 && this.m33 == m.m33); -}, "~O"); -Clazz.overrideMethod (c$, "hashCode", -function () { -return javajs.util.T3.floatToIntBits0 (this.m00) ^ javajs.util.T3.floatToIntBits0 (this.m01) ^ javajs.util.T3.floatToIntBits0 (this.m02) ^ javajs.util.T3.floatToIntBits0 (this.m03) ^ javajs.util.T3.floatToIntBits0 (this.m10) ^ javajs.util.T3.floatToIntBits0 (this.m11) ^ javajs.util.T3.floatToIntBits0 (this.m12) ^ javajs.util.T3.floatToIntBits0 (this.m13) ^ javajs.util.T3.floatToIntBits0 (this.m20) ^ javajs.util.T3.floatToIntBits0 (this.m21) ^ javajs.util.T3.floatToIntBits0 (this.m22) ^ javajs.util.T3.floatToIntBits0 (this.m23) ^ javajs.util.T3.floatToIntBits0 (this.m30) ^ javajs.util.T3.floatToIntBits0 (this.m31) ^ javajs.util.T3.floatToIntBits0 (this.m32) ^ javajs.util.T3.floatToIntBits0 (this.m33); -}); -Clazz.overrideMethod (c$, "toString", -function () { -return "[\n [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "\t" + this.m03 + "]" + "\n [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "\t" + this.m13 + "]" + "\n [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "\t" + this.m23 + "]" + "\n [" + this.m30 + "\t" + this.m31 + "\t" + this.m32 + "\t" + this.m33 + "] ]"; -}); -Clazz.defineMethod (c$, "round", -function (f) { -this.m00 = this.rnd (this.m00, f); -this.m01 = this.rnd (this.m01, f); -this.m02 = this.rnd (this.m02, f); -this.m03 = this.rnd (this.m03, f); -this.m10 = this.rnd (this.m10, f); -this.m11 = this.rnd (this.m11, f); -this.m12 = this.rnd (this.m12, f); -this.m13 = this.rnd (this.m13, f); -this.m20 = this.rnd (this.m20, f); -this.m21 = this.rnd (this.m21, f); -this.m22 = this.rnd (this.m22, f); -this.m23 = this.rnd (this.m23, f); -this.m30 = this.rnd (this.m30, f); -this.m31 = this.rnd (this.m31, f); -this.m32 = this.rnd (this.m32, f); -this.m33 = this.rnd (this.m33, f); -return this; -}, "~N"); -Clazz.defineMethod (c$, "rnd", -($fz = function (n, f) { -return (Math.abs (n) < f ? 0 : n); -}, $fz.isPrivate = true, $fz), "~N,~N"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.M34"], "javajs.util.M4", ["javajs.util.T3"], function () { +c$ = Clazz.decorateAsClass (function () { +this.m03 = 0; +this.m13 = 0; +this.m23 = 0; +this.m30 = 0; +this.m31 = 0; +this.m32 = 0; +this.m33 = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "M4", javajs.util.M34); +c$.newA16 = Clazz.defineMethod (c$, "newA16", +function (v) { +var m = new javajs.util.M4 (); +m.m00 = v[0]; +m.m01 = v[1]; +m.m02 = v[2]; +m.m03 = v[3]; +m.m10 = v[4]; +m.m11 = v[5]; +m.m12 = v[6]; +m.m13 = v[7]; +m.m20 = v[8]; +m.m21 = v[9]; +m.m22 = v[10]; +m.m23 = v[11]; +m.m30 = v[12]; +m.m31 = v[13]; +m.m32 = v[14]; +m.m33 = v[15]; +return m; +}, "~A"); +c$.newM4 = Clazz.defineMethod (c$, "newM4", +function (m1) { +var m = new javajs.util.M4 (); +if (m1 == null) { +m.setIdentity (); +return m; +}m.setToM3 (m1); +m.m03 = m1.m03; +m.m13 = m1.m13; +m.m23 = m1.m23; +m.m30 = m1.m30; +m.m31 = m1.m31; +m.m32 = m1.m32; +m.m33 = m1.m33; +return m; +}, "javajs.util.M4"); +c$.newMV = Clazz.defineMethod (c$, "newMV", +function (m1, t) { +var m = new javajs.util.M4 (); +m.setMV (m1, t); +return m; +}, "javajs.util.M3,javajs.util.T3"); +Clazz.defineMethod (c$, "setZero", +function () { +this.clear33 (); +this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0; +}); +Clazz.defineMethod (c$, "setIdentity", +function () { +this.setZero (); +this.m00 = this.m11 = this.m22 = this.m33 = 1.0; +}); +Clazz.defineMethod (c$, "setM4", +function (m1) { +this.setM33 (m1); +this.m03 = m1.m03; +this.m13 = m1.m13; +this.m23 = m1.m23; +this.m30 = m1.m30; +this.m31 = m1.m31; +this.m32 = m1.m32; +this.m33 = m1.m33; +return this; +}, "javajs.util.M4"); +Clazz.defineMethod (c$, "setMV", +function (m1, t) { +this.setM33 (m1); +this.setTranslation (t); +this.m33 = 1; +}, "javajs.util.M3,javajs.util.T3"); +Clazz.defineMethod (c$, "setToM3", +function (m1) { +this.setM33 (m1); +this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0; +this.m33 = 1.0; +}, "javajs.util.M34"); +Clazz.defineMethod (c$, "setToAA", +function (a) { +this.setIdentity (); +this.setAA33 (a); +}, "javajs.util.A4"); +Clazz.defineMethod (c$, "setA", +function (m) { +this.m00 = m[0]; +this.m01 = m[1]; +this.m02 = m[2]; +this.m03 = m[3]; +this.m10 = m[4]; +this.m11 = m[5]; +this.m12 = m[6]; +this.m13 = m[7]; +this.m20 = m[8]; +this.m21 = m[9]; +this.m22 = m[10]; +this.m23 = m[11]; +this.m30 = m[12]; +this.m31 = m[13]; +this.m32 = m[14]; +this.m33 = m[15]; +}, "~A"); +Clazz.defineMethod (c$, "setTranslation", +function (trans) { +this.m03 = trans.x; +this.m13 = trans.y; +this.m23 = trans.z; +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "setElement", +function (row, col, v) { +if (row < 3 && col < 3) { +this.set33 (row, col, v); +return; +}if (row > 3 || col > 3) this.err (); +switch (row) { +case 0: +this.m03 = v; +return; +case 1: +this.m13 = v; +return; +case 2: +this.m23 = v; +return; +} +switch (col) { +case 0: +this.m30 = v; +return; +case 1: +this.m31 = v; +return; +case 2: +this.m32 = v; +return; +case 3: +this.m33 = v; +return; +} +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "getElement", +function (row, col) { +if (row < 3 && col < 3) return this.get33 (row, col); +if (row > 3 || col > 3) { +this.err (); +return 0; +}switch (row) { +case 0: +return this.m03; +case 1: +return this.m13; +case 2: +return this.m23; +default: +switch (col) { +case 0: +return this.m30; +case 1: +return this.m31; +case 2: +return this.m32; +default: +return this.m33; +} +} +}, "~N,~N"); +Clazz.defineMethod (c$, "getTranslation", +function (trans) { +trans.x = this.m03; +trans.y = this.m13; +trans.z = this.m23; +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "getRotationScale", +function (m1) { +m1.m00 = this.m00; +m1.m01 = this.m01; +m1.m02 = this.m02; +m1.m10 = this.m10; +m1.m11 = this.m11; +m1.m12 = this.m12; +m1.m20 = this.m20; +m1.m21 = this.m21; +m1.m22 = this.m22; +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "setRotationScale", +function (m1) { +this.m00 = m1.m00; +this.m01 = m1.m01; +this.m02 = m1.m02; +this.m10 = m1.m10; +this.m11 = m1.m11; +this.m12 = m1.m12; +this.m20 = m1.m20; +this.m21 = m1.m21; +this.m22 = m1.m22; +}, "javajs.util.M3"); +Clazz.defineMethod (c$, "setRowA", +function (row, v) { +if (row < 3) this.setRow33 (row, v); +switch (row) { +case 0: +this.m03 = v[3]; +return; +case 1: +this.m13 = v[3]; +return; +case 2: +this.m23 = v[3]; +return; +case 3: +this.m30 = v[0]; +this.m31 = v[1]; +this.m32 = v[2]; +this.m33 = v[3]; +return; +} +this.err (); +}, "~N,~A"); +Clazz.overrideMethod (c$, "getRow", +function (row, v) { +if (row < 3) this.getRow33 (row, v); +switch (row) { +case 0: +v[3] = this.m03; +return; +case 1: +v[3] = this.m13; +return; +case 2: +v[3] = this.m23; +return; +case 3: +v[0] = this.m30; +v[1] = this.m31; +v[2] = this.m32; +v[3] = this.m33; +return; +} +this.err (); +}, "~N,~A"); +Clazz.defineMethod (c$, "setColumn4", +function (column, x, y, z, w) { +if (column == 0) { +this.m00 = x; +this.m10 = y; +this.m20 = z; +this.m30 = w; +} else if (column == 1) { +this.m01 = x; +this.m11 = y; +this.m21 = z; +this.m31 = w; +} else if (column == 2) { +this.m02 = x; +this.m12 = y; +this.m22 = z; +this.m32 = w; +} else if (column == 3) { +this.m03 = x; +this.m13 = y; +this.m23 = z; +this.m33 = w; +} else { +this.err (); +}}, "~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "setColumnA", +function (column, v) { +if (column < 3) this.setColumn33 (column, v); +switch (column) { +case 0: +this.m30 = v[3]; +return; +case 1: +this.m31 = v[3]; +return; +case 2: +this.m32 = v[3]; +return; +case 3: +this.m03 = v[0]; +this.m13 = v[1]; +this.m23 = v[2]; +this.m33 = v[3]; +return; +default: +this.err (); +} +}, "~N,~A"); +Clazz.defineMethod (c$, "getColumn", +function (column, v) { +if (column < 3) this.getColumn33 (column, v); +switch (column) { +case 0: +v[3] = this.m30; +return; +case 1: +v[3] = this.m31; +return; +case 2: +v[3] = this.m32; +return; +case 3: +v[0] = this.m03; +v[1] = this.m13; +v[2] = this.m23; +v[3] = this.m33; +return; +default: +this.err (); +} +}, "~N,~A"); +Clazz.defineMethod (c$, "sub", +function (m1) { +this.sub33 (m1); +this.m03 -= m1.m03; +this.m13 -= m1.m13; +this.m23 -= m1.m23; +this.m30 -= m1.m30; +this.m31 -= m1.m31; +this.m32 -= m1.m32; +this.m33 -= m1.m33; +}, "javajs.util.M4"); +Clazz.defineMethod (c$, "transpose", +function () { +this.transpose33 (); +var tmp = this.m03; +this.m03 = this.m30; +this.m30 = tmp; +tmp = this.m13; +this.m13 = this.m31; +this.m31 = tmp; +tmp = this.m23; +this.m23 = this.m32; +this.m32 = tmp; +}); +Clazz.defineMethod (c$, "invert", +function () { +var s = this.determinant4 (); +if (s == 0.0) return this; +s = 1 / s; +this.set (this.m11 * (this.m22 * this.m33 - this.m23 * this.m32) + this.m12 * (this.m23 * this.m31 - this.m21 * this.m33) + this.m13 * (this.m21 * this.m32 - this.m22 * this.m31), this.m21 * (this.m02 * this.m33 - this.m03 * this.m32) + this.m22 * (this.m03 * this.m31 - this.m01 * this.m33) + this.m23 * (this.m01 * this.m32 - this.m02 * this.m31), this.m31 * (this.m02 * this.m13 - this.m03 * this.m12) + this.m32 * (this.m03 * this.m11 - this.m01 * this.m13) + this.m33 * (this.m01 * this.m12 - this.m02 * this.m11), this.m01 * (this.m13 * this.m22 - this.m12 * this.m23) + this.m02 * (this.m11 * this.m23 - this.m13 * this.m21) + this.m03 * (this.m12 * this.m21 - this.m11 * this.m22), this.m12 * (this.m20 * this.m33 - this.m23 * this.m30) + this.m13 * (this.m22 * this.m30 - this.m20 * this.m32) + this.m10 * (this.m23 * this.m32 - this.m22 * this.m33), this.m22 * (this.m00 * this.m33 - this.m03 * this.m30) + this.m23 * (this.m02 * this.m30 - this.m00 * this.m32) + this.m20 * (this.m03 * this.m32 - this.m02 * this.m33), this.m32 * (this.m00 * this.m13 - this.m03 * this.m10) + this.m33 * (this.m02 * this.m10 - this.m00 * this.m12) + this.m30 * (this.m03 * this.m12 - this.m02 * this.m13), this.m02 * (this.m13 * this.m20 - this.m10 * this.m23) + this.m03 * (this.m10 * this.m22 - this.m12 * this.m20) + this.m00 * (this.m12 * this.m23 - this.m13 * this.m22), this.m13 * (this.m20 * this.m31 - this.m21 * this.m30) + this.m10 * (this.m21 * this.m33 - this.m23 * this.m31) + this.m11 * (this.m23 * this.m30 - this.m20 * this.m33), this.m23 * (this.m00 * this.m31 - this.m01 * this.m30) + this.m20 * (this.m01 * this.m33 - this.m03 * this.m31) + this.m21 * (this.m03 * this.m30 - this.m00 * this.m33), this.m33 * (this.m00 * this.m11 - this.m01 * this.m10) + this.m30 * (this.m01 * this.m13 - this.m03 * this.m11) + this.m31 * (this.m03 * this.m10 - this.m00 * this.m13), this.m03 * (this.m11 * this.m20 - this.m10 * this.m21) + this.m00 * (this.m13 * this.m21 - this.m11 * this.m23) + this.m01 * (this.m10 * this.m23 - this.m13 * this.m20), this.m10 * (this.m22 * this.m31 - this.m21 * this.m32) + this.m11 * (this.m20 * this.m32 - this.m22 * this.m30) + this.m12 * (this.m21 * this.m30 - this.m20 * this.m31), this.m20 * (this.m02 * this.m31 - this.m01 * this.m32) + this.m21 * (this.m00 * this.m32 - this.m02 * this.m30) + this.m22 * (this.m01 * this.m30 - this.m00 * this.m31), this.m30 * (this.m02 * this.m11 - this.m01 * this.m12) + this.m31 * (this.m00 * this.m12 - this.m02 * this.m10) + this.m32 * (this.m01 * this.m10 - this.m00 * this.m11), this.m00 * (this.m11 * this.m22 - this.m12 * this.m21) + this.m01 * (this.m12 * this.m20 - this.m10 * this.m22) + this.m02 * (this.m10 * this.m21 - this.m11 * this.m20)); +this.scale (s); +return this; +}); +Clazz.defineMethod (c$, "set", +($fz = function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { +this.m00 = m00; +this.m01 = m01; +this.m02 = m02; +this.m03 = m03; +this.m10 = m10; +this.m11 = m11; +this.m12 = m12; +this.m13 = m13; +this.m20 = m20; +this.m21 = m21; +this.m22 = m22; +this.m23 = m23; +this.m30 = m30; +this.m31 = m31; +this.m32 = m32; +this.m33 = m33; +}, $fz.isPrivate = true, $fz), "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "determinant4", +function () { +return (this.m00 * this.m11 - this.m01 * this.m10) * (this.m22 * this.m33 - this.m23 * this.m32) - (this.m00 * this.m12 - this.m02 * this.m10) * (this.m21 * this.m33 - this.m23 * this.m31) + (this.m00 * this.m13 - this.m03 * this.m10) * (this.m21 * this.m32 - this.m22 * this.m31) + (this.m01 * this.m12 - this.m02 * this.m11) * (this.m20 * this.m33 - this.m23 * this.m30) - (this.m01 * this.m13 - this.m03 * this.m11) * (this.m20 * this.m32 - this.m22 * this.m30) + (this.m02 * this.m13 - this.m03 * this.m12) * (this.m20 * this.m31 - this.m21 * this.m30); +}); +Clazz.defineMethod (c$, "scale", +($fz = function (scalar) { +this.mul33 (scalar); +this.m03 *= scalar; +this.m13 *= scalar; +this.m23 *= scalar; +this.m30 *= scalar; +this.m31 *= scalar; +this.m32 *= scalar; +this.m33 *= scalar; +}, $fz.isPrivate = true, $fz), "~N"); +Clazz.defineMethod (c$, "mul", +function (m1) { +this.mul2 (this, m1); +}, "javajs.util.M4"); +Clazz.defineMethod (c$, "mul2", +function (m1, m2) { +this.set (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20 + m1.m03 * m2.m30, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21 + m1.m03 * m2.m31, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22 + m1.m03 * m2.m32, m1.m00 * m2.m03 + m1.m01 * m2.m13 + m1.m02 * m2.m23 + m1.m03 * m2.m33, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20 + m1.m13 * m2.m30, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21 + m1.m13 * m2.m31, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22 + m1.m13 * m2.m32, m1.m10 * m2.m03 + m1.m11 * m2.m13 + m1.m12 * m2.m23 + m1.m13 * m2.m33, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20 + m1.m23 * m2.m30, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21 + m1.m23 * m2.m31, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22 + m1.m23 * m2.m32, m1.m20 * m2.m03 + m1.m21 * m2.m13 + m1.m22 * m2.m23 + m1.m23 * m2.m33, m1.m30 * m2.m00 + m1.m31 * m2.m10 + m1.m32 * m2.m20 + m1.m33 * m2.m30, m1.m30 * m2.m01 + m1.m31 * m2.m11 + m1.m32 * m2.m21 + m1.m33 * m2.m31, m1.m30 * m2.m02 + m1.m31 * m2.m12 + m1.m32 * m2.m22 + m1.m33 * m2.m32, m1.m30 * m2.m03 + m1.m31 * m2.m13 + m1.m32 * m2.m23 + m1.m33 * m2.m33); +}, "javajs.util.M4,javajs.util.M4"); +Clazz.defineMethod (c$, "transform", +function (vec) { +this.transform2 (vec, vec); +}, "javajs.util.T4"); +Clazz.defineMethod (c$, "transform2", +function (vec, vecOut) { +vecOut.set4 (this.m00 * vec.x + this.m01 * vec.y + this.m02 * vec.z + this.m03 * vec.w, this.m10 * vec.x + this.m11 * vec.y + this.m12 * vec.z + this.m13 * vec.w, this.m20 * vec.x + this.m21 * vec.y + this.m22 * vec.z + this.m23 * vec.w, this.m30 * vec.x + this.m31 * vec.y + this.m32 * vec.z + this.m33 * vec.w); +}, "javajs.util.T4,javajs.util.T4"); +Clazz.defineMethod (c$, "rotTrans", +function (point) { +this.rotTrans2 (point, point); +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "rotTrans2", +function (point, pointOut) { +pointOut.set (this.m00 * point.x + this.m01 * point.y + this.m02 * point.z + this.m03, this.m10 * point.x + this.m11 * point.y + this.m12 * point.z + this.m13, this.m20 * point.x + this.m21 * point.y + this.m22 * point.z + this.m23); +return pointOut; +}, "javajs.util.T3,javajs.util.T3"); +Clazz.defineMethod (c$, "setAsXYRotation", +function (angle) { +this.setIdentity (); +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m22 = c; +this.m23 = -s; +this.m32 = s; +this.m33 = c; +return this; +}, "~N"); +Clazz.defineMethod (c$, "setAsYZRotation", +function (angle) { +this.setIdentity (); +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = c; +this.m03 = -s; +this.m30 = s; +this.m33 = c; +return this; +}, "~N"); +Clazz.defineMethod (c$, "setAsXZRotation", +function (angle) { +this.setIdentity (); +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m11 = c; +this.m13 = -s; +this.m31 = s; +this.m33 = c; +return this; +}, "~N"); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (!(Clazz.instanceOf (o, javajs.util.M4))) return false; +var m = o; +return (this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m03 == m.m03 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m13 == m.m13 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22 && this.m23 == m.m23 && this.m30 == m.m30 && this.m31 == m.m31 && this.m32 == m.m32 && this.m33 == m.m33); +}, "~O"); +Clazz.overrideMethod (c$, "hashCode", +function () { +return javajs.util.T3.floatToIntBits0 (this.m00) ^ javajs.util.T3.floatToIntBits0 (this.m01) ^ javajs.util.T3.floatToIntBits0 (this.m02) ^ javajs.util.T3.floatToIntBits0 (this.m03) ^ javajs.util.T3.floatToIntBits0 (this.m10) ^ javajs.util.T3.floatToIntBits0 (this.m11) ^ javajs.util.T3.floatToIntBits0 (this.m12) ^ javajs.util.T3.floatToIntBits0 (this.m13) ^ javajs.util.T3.floatToIntBits0 (this.m20) ^ javajs.util.T3.floatToIntBits0 (this.m21) ^ javajs.util.T3.floatToIntBits0 (this.m22) ^ javajs.util.T3.floatToIntBits0 (this.m23) ^ javajs.util.T3.floatToIntBits0 (this.m30) ^ javajs.util.T3.floatToIntBits0 (this.m31) ^ javajs.util.T3.floatToIntBits0 (this.m32) ^ javajs.util.T3.floatToIntBits0 (this.m33); +}); +Clazz.overrideMethod (c$, "toString", +function () { +return "[\n [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "\t" + this.m03 + "]" + "\n [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "\t" + this.m13 + "]" + "\n [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "\t" + this.m23 + "]" + "\n [" + this.m30 + "\t" + this.m31 + "\t" + this.m32 + "\t" + this.m33 + "] ]"; +}); +Clazz.defineMethod (c$, "round", +function (f) { +this.m00 = this.rnd (this.m00, f); +this.m01 = this.rnd (this.m01, f); +this.m02 = this.rnd (this.m02, f); +this.m03 = this.rnd (this.m03, f); +this.m10 = this.rnd (this.m10, f); +this.m11 = this.rnd (this.m11, f); +this.m12 = this.rnd (this.m12, f); +this.m13 = this.rnd (this.m13, f); +this.m20 = this.rnd (this.m20, f); +this.m21 = this.rnd (this.m21, f); +this.m22 = this.rnd (this.m22, f); +this.m23 = this.rnd (this.m23, f); +this.m30 = this.rnd (this.m30, f); +this.m31 = this.rnd (this.m31, f); +this.m32 = this.rnd (this.m32, f); +this.m33 = this.rnd (this.m33, f); +return this; +}, "~N"); +Clazz.defineMethod (c$, "rnd", +($fz = function (n, f) { +return (Math.abs (n) < f ? 0 : n); +}, $fz.isPrivate = true, $fz), "~N,~N"); +}); diff --git a/bin/javajs/util/Matrix.js b/bin/javajs/util/Matrix.js index 50972a4..cadc683 100644 --- a/bin/javajs/util/Matrix.js +++ b/bin/javajs/util/Matrix.js @@ -1,223 +1,223 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.a = null; -this.m = 0; -this.n = 0; -if (!Clazz.isClassDefined ("javajs.util.Matrix.LUDecomp")) { -javajs.util.Matrix.$Matrix$LUDecomp$ (); -} -Clazz.instantialize (this, arguments); -}, javajs.util, "Matrix", null, Cloneable); -Clazz.makeConstructor (c$, -function (a, m, n) { -this.a = (a == null ? Clazz.newDoubleArray (m, n, 0) : a); -this.m = m; -this.n = n; -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "getRowDimension", -function () { -return this.m; -}); -Clazz.defineMethod (c$, "getColumnDimension", -function () { -return this.n; -}); -Clazz.defineMethod (c$, "getArray", -function () { -return this.a; -}); -Clazz.defineMethod (c$, "getArrayCopy", -function () { -var x = Clazz.newDoubleArray (this.m, this.n, 0); -for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) x[i][j] = this.a[i][j]; - - -return x; -}); -Clazz.defineMethod (c$, "copy", -function () { -var x = new javajs.util.Matrix (null, this.m, this.n); -var c = x.a; -for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) c[i][j] = this.a[i][j]; - - -return x; -}); -Clazz.overrideMethod (c$, "clone", -function () { -return this.copy (); -}); -Clazz.defineMethod (c$, "getSubmatrix", -function (i0, j0, nrows, ncols) { -var x = new javajs.util.Matrix (null, nrows, ncols); -var xa = x.a; -for (var i = nrows; --i >= 0; ) for (var j = ncols; --j >= 0; ) xa[i][j] = this.a[i0 + i][j0 + j]; - - -return x; -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "getMatrixSelected", -function (r, n) { -var x = new javajs.util.Matrix (null, r.length, n); -var xa = x.a; -for (var i = r.length; --i >= 0; ) { -var b = this.a[r[i]]; -for (var j = n; --j >= 0; ) xa[i][j] = b[j]; - -} -return x; -}, "~A,~N"); -Clazz.defineMethod (c$, "transpose", -function () { -var x = new javajs.util.Matrix (null, this.n, this.m); -var c = x.a; -for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) c[j][i] = this.a[i][j]; - - -return x; -}); -Clazz.defineMethod (c$, "add", -function (b) { -return this.scaleAdd (b, 1); -}, "javajs.util.Matrix"); -Clazz.defineMethod (c$, "sub", -function (b) { -return this.scaleAdd (b, -1); -}, "javajs.util.Matrix"); -Clazz.defineMethod (c$, "scaleAdd", -function (b, scale) { -var x = new javajs.util.Matrix (null, this.m, this.n); -var xa = x.a; -var ba = b.a; -for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) xa[i][j] = ba[i][j] * scale + this.a[i][j]; - - -return x; -}, "javajs.util.Matrix,~N"); -Clazz.defineMethod (c$, "mul", -function (b) { -if (b.m != this.n) return null; -var x = new javajs.util.Matrix (null, this.m, b.n); -var xa = x.a; -var ba = b.a; -for (var j = b.n; --j >= 0; ) for (var i = this.m; --i >= 0; ) { -var arowi = this.a[i]; -var s = 0; -for (var k = this.n; --k >= 0; ) s += arowi[k] * ba[k][j]; - -xa[i][j] = s; -} - -return x; -}, "javajs.util.Matrix"); -Clazz.defineMethod (c$, "inverse", -function () { -return Clazz.innerTypeInstance (javajs.util.Matrix.LUDecomp, this, null, this.m, this.n).solve (javajs.util.Matrix.identity (this.m, this.m), this.n); -}); -Clazz.defineMethod (c$, "trace", -function () { -var t = 0; -for (var i = Math.min (this.m, this.n); --i >= 0; ) t += this.a[i][i]; - -return t; -}); -c$.identity = Clazz.defineMethod (c$, "identity", -function (m, n) { -var x = new javajs.util.Matrix (null, m, n); -var xa = x.a; -for (var i = Math.min (m, n); --i >= 0; ) xa[i][i] = 1; - -return x; -}, "~N,~N"); -Clazz.defineMethod (c$, "getRotation", -function () { -return this.getSubmatrix (0, 0, this.m - 1, this.n - 1); -}); -Clazz.defineMethod (c$, "getTranslation", -function () { -return this.getSubmatrix (0, this.n - 1, this.m - 1, 1); -}); -c$.newT = Clazz.defineMethod (c$, "newT", -function (r, asColumn) { -return (asColumn ? new javajs.util.Matrix ( Clazz.newArray (-1, [ Clazz.newDoubleArray (-1, [r.x]), Clazz.newDoubleArray (-1, [r.y]), Clazz.newDoubleArray (-1, [r.z])]), 3, 1) : new javajs.util.Matrix ( Clazz.newArray (-1, [ Clazz.newDoubleArray (-1, [r.x, r.y, r.z])]), 1, 3)); -}, "javajs.util.T3,~B"); -Clazz.overrideMethod (c$, "toString", -function () { -var s = "[\n"; -for (var i = 0; i < this.m; i++) { -s += " ["; -for (var j = 0; j < this.n; j++) s += " " + this.a[i][j]; - -s += "]\n"; -} -s += "]"; -return s; -}); -c$.$Matrix$LUDecomp$ = function () { -Clazz.pu$h (); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.LU = null; -this.piv = null; -this.pivsign = 0; -Clazz.instantialize (this, arguments); -}, javajs.util.Matrix, "LUDecomp"); -Clazz.makeConstructor (c$, -function (a, b) { -this.LU = this.b$["javajs.util.Matrix"].getArrayCopy (); -this.piv = Clazz.newIntArray (a, 0); -for (var c = a; --c >= 0; ) this.piv[c] = c; - -this.pivsign = 1; -var d; -var e = Clazz.newDoubleArray (a, 0); -for (var f = 0; f < b; f++) { -for (var g = a; --g >= 0; ) e[g] = this.LU[g][f]; - -for (var h = a; --h >= 0; ) { -d = this.LU[h]; -var i = Math.min (h, f); -var j = 0.0; -for (var k = i; --k >= 0; ) j += d[k] * e[k]; - -d[f] = e[h] -= j; -} -var i = f; -for (var j = a; --j > f; ) if (Math.abs (e[j]) > Math.abs (e[i])) i = j; - -if (i != f) { -for (var k = b; --k >= 0; ) { -var l = this.LU[i][k]; -this.LU[i][k] = this.LU[f][k]; -this.LU[f][k] = l; -} -var l = this.piv[i]; -this.piv[i] = this.piv[f]; -this.piv[f] = l; -this.pivsign = -this.pivsign; -}if ( new Boolean (f < a & this.LU[f][f] != 0.0).valueOf ()) for (var k = a; --k > f; ) this.LU[k][f] /= this.LU[f][f]; - -} -}, "~N,~N"); -Clazz.defineMethod (c$, "solve", -function (a, b) { -for (var c = 0; c < b; c++) if (this.LU[c][c] == 0) return null; - -var d = a.n; -var e = a.getMatrixSelected (this.piv, d); -var f = e.a; -for (var g = 0; g < b; g++) for (var h = g + 1; h < b; h++) for (var i = 0; i < d; i++) f[h][i] -= f[g][i] * this.LU[h][g]; - - - -for (var j = b; --j >= 0; ) { -for (var k = d; --k >= 0; ) f[j][k] /= this.LU[j][j]; - -for (var l = j; --l >= 0; ) for (var m = d; --m >= 0; ) f[l][m] -= f[j][m] * this.LU[l][j]; - - -} -return e; -}, "javajs.util.Matrix,~N"); -c$ = Clazz.p0p (); -}; +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.a = null; +this.m = 0; +this.n = 0; +if (!Clazz.isClassDefined ("javajs.util.Matrix.LUDecomp")) { +javajs.util.Matrix.$Matrix$LUDecomp$ (); +} +Clazz.instantialize (this, arguments); +}, javajs.util, "Matrix", null, Cloneable); +Clazz.makeConstructor (c$, +function (a, m, n) { +this.a = (a == null ? Clazz.newDoubleArray (m, n, 0) : a); +this.m = m; +this.n = n; +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "getRowDimension", +function () { +return this.m; +}); +Clazz.defineMethod (c$, "getColumnDimension", +function () { +return this.n; +}); +Clazz.defineMethod (c$, "getArray", +function () { +return this.a; +}); +Clazz.defineMethod (c$, "getArrayCopy", +function () { +var x = Clazz.newDoubleArray (this.m, this.n, 0); +for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) x[i][j] = this.a[i][j]; + + +return x; +}); +Clazz.defineMethod (c$, "copy", +function () { +var x = new javajs.util.Matrix (null, this.m, this.n); +var c = x.a; +for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) c[i][j] = this.a[i][j]; + + +return x; +}); +Clazz.overrideMethod (c$, "clone", +function () { +return this.copy (); +}); +Clazz.defineMethod (c$, "getSubmatrix", +function (i0, j0, nrows, ncols) { +var x = new javajs.util.Matrix (null, nrows, ncols); +var xa = x.a; +for (var i = nrows; --i >= 0; ) for (var j = ncols; --j >= 0; ) xa[i][j] = this.a[i0 + i][j0 + j]; + + +return x; +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "getMatrixSelected", +function (r, n) { +var x = new javajs.util.Matrix (null, r.length, n); +var xa = x.a; +for (var i = r.length; --i >= 0; ) { +var b = this.a[r[i]]; +for (var j = n; --j >= 0; ) xa[i][j] = b[j]; + +} +return x; +}, "~A,~N"); +Clazz.defineMethod (c$, "transpose", +function () { +var x = new javajs.util.Matrix (null, this.n, this.m); +var c = x.a; +for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) c[j][i] = this.a[i][j]; + + +return x; +}); +Clazz.defineMethod (c$, "add", +function (b) { +return this.scaleAdd (b, 1); +}, "javajs.util.Matrix"); +Clazz.defineMethod (c$, "sub", +function (b) { +return this.scaleAdd (b, -1); +}, "javajs.util.Matrix"); +Clazz.defineMethod (c$, "scaleAdd", +function (b, scale) { +var x = new javajs.util.Matrix (null, this.m, this.n); +var xa = x.a; +var ba = b.a; +for (var i = this.m; --i >= 0; ) for (var j = this.n; --j >= 0; ) xa[i][j] = ba[i][j] * scale + this.a[i][j]; + + +return x; +}, "javajs.util.Matrix,~N"); +Clazz.defineMethod (c$, "mul", +function (b) { +if (b.m != this.n) return null; +var x = new javajs.util.Matrix (null, this.m, b.n); +var xa = x.a; +var ba = b.a; +for (var j = b.n; --j >= 0; ) for (var i = this.m; --i >= 0; ) { +var arowi = this.a[i]; +var s = 0; +for (var k = this.n; --k >= 0; ) s += arowi[k] * ba[k][j]; + +xa[i][j] = s; +} + +return x; +}, "javajs.util.Matrix"); +Clazz.defineMethod (c$, "inverse", +function () { +return Clazz.innerTypeInstance (javajs.util.Matrix.LUDecomp, this, null, this.m, this.n).solve (javajs.util.Matrix.identity (this.m, this.m), this.n); +}); +Clazz.defineMethod (c$, "trace", +function () { +var t = 0; +for (var i = Math.min (this.m, this.n); --i >= 0; ) t += this.a[i][i]; + +return t; +}); +c$.identity = Clazz.defineMethod (c$, "identity", +function (m, n) { +var x = new javajs.util.Matrix (null, m, n); +var xa = x.a; +for (var i = Math.min (m, n); --i >= 0; ) xa[i][i] = 1; + +return x; +}, "~N,~N"); +Clazz.defineMethod (c$, "getRotation", +function () { +return this.getSubmatrix (0, 0, this.m - 1, this.n - 1); +}); +Clazz.defineMethod (c$, "getTranslation", +function () { +return this.getSubmatrix (0, this.n - 1, this.m - 1, 1); +}); +c$.newT = Clazz.defineMethod (c$, "newT", +function (r, asColumn) { +return (asColumn ? new javajs.util.Matrix ( Clazz.newArray (-1, [ Clazz.newDoubleArray (-1, [r.x]), Clazz.newDoubleArray (-1, [r.y]), Clazz.newDoubleArray (-1, [r.z])]), 3, 1) : new javajs.util.Matrix ( Clazz.newArray (-1, [ Clazz.newDoubleArray (-1, [r.x, r.y, r.z])]), 1, 3)); +}, "javajs.util.T3,~B"); +Clazz.overrideMethod (c$, "toString", +function () { +var s = "[\n"; +for (var i = 0; i < this.m; i++) { +s += " ["; +for (var j = 0; j < this.n; j++) s += " " + this.a[i][j]; + +s += "]\n"; +} +s += "]"; +return s; +}); +c$.$Matrix$LUDecomp$ = function () { +Clazz.pu$h (); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.LU = null; +this.piv = null; +this.pivsign = 0; +Clazz.instantialize (this, arguments); +}, javajs.util.Matrix, "LUDecomp"); +Clazz.makeConstructor (c$, +function (a, b) { +this.LU = this.b$["javajs.util.Matrix"].getArrayCopy (); +this.piv = Clazz.newIntArray (a, 0); +for (var c = a; --c >= 0; ) this.piv[c] = c; + +this.pivsign = 1; +var d; +var e = Clazz.newDoubleArray (a, 0); +for (var f = 0; f < b; f++) { +for (var g = a; --g >= 0; ) e[g] = this.LU[g][f]; + +for (var h = a; --h >= 0; ) { +d = this.LU[h]; +var i = Math.min (h, f); +var j = 0.0; +for (var k = i; --k >= 0; ) j += d[k] * e[k]; + +d[f] = e[h] -= j; +} +var i = f; +for (var j = a; --j > f; ) if (Math.abs (e[j]) > Math.abs (e[i])) i = j; + +if (i != f) { +for (var k = b; --k >= 0; ) { +var l = this.LU[i][k]; +this.LU[i][k] = this.LU[f][k]; +this.LU[f][k] = l; +} +var l = this.piv[i]; +this.piv[i] = this.piv[f]; +this.piv[f] = l; +this.pivsign = -this.pivsign; +}if ( new Boolean (f < a & this.LU[f][f] != 0.0).valueOf ()) for (var k = a; --k > f; ) this.LU[k][f] /= this.LU[f][f]; + +} +}, "~N,~N"); +Clazz.defineMethod (c$, "solve", +function (a, b) { +for (var c = 0; c < b; c++) if (this.LU[c][c] == 0) return null; + +var d = a.n; +var e = a.getMatrixSelected (this.piv, d); +var f = e.a; +for (var g = 0; g < b; g++) for (var h = g + 1; h < b; h++) for (var i = 0; i < d; i++) f[h][i] -= f[g][i] * this.LU[h][g]; + + + +for (var j = b; --j >= 0; ) { +for (var k = d; --k >= 0; ) f[j][k] /= this.LU[j][j]; + +for (var l = j; --l >= 0; ) for (var m = d; --m >= 0; ) f[l][m] -= f[j][m] * this.LU[l][j]; + + +} +return e; +}, "javajs.util.Matrix,~N"); +c$ = Clazz.p0p (); +}; diff --git a/bin/javajs/util/Measure.class b/bin/javajs/util/Measure.class index 9d2f97991352261569d4805adbbdc6a6b909f87b..e478913ee1d2b5807fffbbab31dcaa764a7a062e 100644 GIT binary patch delta 44 zcmV+{0Mq~Pe(ip+?=b;63qS$?034GcHXpOjHK7Tg C=MWzN delta 46 zcmV+}0MY;Le(!#;?=b 1) { -cosang = 1; -}if (cosang < -1) { -cosang = -1; -}var torsion = Math.acos (cosang); -var dot = ijx * cx + ijy * cy + ijz * cz; -var absDot = Math.abs (dot); -torsion = (dot / absDot > 0) ? torsion : -torsion; -return (asDegrees ? torsion / 0.017453292 : torsion); -}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.T3,~B"); -c$.computeHelicalAxis = Clazz.defineMethod (c$, "computeHelicalAxis", -function (a, b, dq) { -var vab = new javajs.util.V3 (); -vab.sub2 (b, a); -var theta = dq.getTheta (); -var n = dq.getNormal (); -var v_dot_n = vab.dot (n); -if (Math.abs (v_dot_n) < 0.0001) v_dot_n = 0; -var va_prime_d = new javajs.util.V3 (); -va_prime_d.cross (vab, n); -if (va_prime_d.dot (va_prime_d) != 0) va_prime_d.normalize (); -var vda = new javajs.util.V3 (); -var vcb = javajs.util.V3.newV (n); -if (v_dot_n == 0) v_dot_n = 1.4E-45; -vcb.scale (v_dot_n); -vda.sub2 (vcb, vab); -vda.scale (0.5); -va_prime_d.scale (theta == 0 ? 0 : (vda.length () / Math.tan (theta / 2 / 180 * 3.141592653589793))); -var r = javajs.util.V3.newV (va_prime_d); -if (theta != 0) r.add (vda); -var pt_a_prime = javajs.util.P3.newP (a); -pt_a_prime.sub (r); -if (v_dot_n != 1.4E-45) n.scale (v_dot_n); -var pt_b_prime = javajs.util.P3.newP (pt_a_prime); -pt_b_prime.add (n); -theta = javajs.util.Measure.computeTorsion (a, pt_a_prime, pt_b_prime, b, true); -if (Float.isNaN (theta) || r.length () < 0.0001) theta = dq.getThetaDirectedV (n); -var residuesPerTurn = Math.abs (theta == 0 ? 0 : 360 / theta); -var pitch = Math.abs (v_dot_n == 1.4E-45 ? 0 : n.length () * (theta == 0 ? 1 : 360 / theta)); -return Clazz.newArray (-1, [pt_a_prime, n, r, javajs.util.P3.new3 (theta, pitch, residuesPerTurn), pt_b_prime]); -}, "javajs.util.P3,javajs.util.P3,javajs.util.Quat"); -c$.getPlaneThroughPoints = Clazz.defineMethod (c$, "getPlaneThroughPoints", -function (pointA, pointB, pointC, vNorm, vAB, plane) { -var w = javajs.util.Measure.getNormalThroughPoints (pointA, pointB, pointC, vNorm, vAB); -plane.set4 (vNorm.x, vNorm.y, vNorm.z, w); -return plane; -}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3,javajs.util.P4"); -c$.getPlaneThroughPoint = Clazz.defineMethod (c$, "getPlaneThroughPoint", -function (pt, normal, plane) { -plane.set4 (normal.x, normal.y, normal.z, -normal.dot (pt)); -}, "javajs.util.T3,javajs.util.V3,javajs.util.P4"); -c$.distanceToPlane = Clazz.defineMethod (c$, "distanceToPlane", -function (plane, pt) { -return (plane == null ? NaN : (plane.dot (pt) + plane.w) / Math.sqrt (plane.dot (plane))); -}, "javajs.util.P4,javajs.util.T3"); -c$.directedDistanceToPlane = Clazz.defineMethod (c$, "directedDistanceToPlane", -function (pt, plane, ptref) { -var f = plane.dot (pt) + plane.w; -var f1 = plane.dot (ptref) + plane.w; -return Math.signum (f1) * f / Math.sqrt (plane.dot (plane)); -}, "javajs.util.P3,javajs.util.P4,javajs.util.P3"); -c$.distanceToPlaneD = Clazz.defineMethod (c$, "distanceToPlaneD", -function (plane, d, pt) { -return (plane == null ? NaN : (plane.dot (pt) + plane.w) / d); -}, "javajs.util.P4,~N,javajs.util.P3"); -c$.distanceToPlaneV = Clazz.defineMethod (c$, "distanceToPlaneV", -function (norm, w, pt) { -return (norm == null ? NaN : (norm.dot (pt) + w) / Math.sqrt (norm.dot (norm))); -}, "javajs.util.V3,~N,javajs.util.P3"); -c$.calcNormalizedNormal = Clazz.defineMethod (c$, "calcNormalizedNormal", -function (pointA, pointB, pointC, vNormNorm, vAB) { -vAB.sub2 (pointB, pointA); -vNormNorm.sub2 (pointC, pointA); -vNormNorm.cross (vAB, vNormNorm); -vNormNorm.normalize (); -}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3"); -c$.getDirectedNormalThroughPoints = Clazz.defineMethod (c$, "getDirectedNormalThroughPoints", -function (pointA, pointB, pointC, ptRef, vNorm, vAB) { -var nd = javajs.util.Measure.getNormalThroughPoints (pointA, pointB, pointC, vNorm, vAB); -if (ptRef != null) { -var pt0 = javajs.util.P3.newP (pointA); -pt0.add (vNorm); -var d = pt0.distance (ptRef); -pt0.sub2 (pointA, vNorm); -if (d > pt0.distance (ptRef)) { -vNorm.scale (-1); -nd = -nd; -}}return nd; -}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3"); -c$.getNormalThroughPoints = Clazz.defineMethod (c$, "getNormalThroughPoints", -function (pointA, pointB, pointC, vNorm, vTemp) { -javajs.util.Measure.calcNormalizedNormal (pointA, pointB, pointC, vNorm, vTemp); -vTemp.setT (pointA); -return -vTemp.dot (vNorm); -}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3"); -c$.getPlaneProjection = Clazz.defineMethod (c$, "getPlaneProjection", -function (pt, plane, ptProj, vNorm) { -var dist = javajs.util.Measure.distanceToPlane (plane, pt); -vNorm.set (plane.x, plane.y, plane.z); -vNorm.normalize (); -vNorm.scale (-dist); -ptProj.add2 (pt, vNorm); -}, "javajs.util.P3,javajs.util.P4,javajs.util.P3,javajs.util.V3"); -c$.getNormalToLine = Clazz.defineMethod (c$, "getNormalToLine", -function (pointA, pointB, vNormNorm) { -vNormNorm.sub2 (pointA, pointB); -vNormNorm.cross (vNormNorm, javajs.util.Measure.axisY); -vNormNorm.normalize (); -if (Float.isNaN (vNormNorm.x)) vNormNorm.set (1, 0, 0); -}, "javajs.util.P3,javajs.util.P3,javajs.util.V3"); -c$.getBisectingPlane = Clazz.defineMethod (c$, "getBisectingPlane", -function (pointA, vAB, ptTemp, vTemp, plane) { -ptTemp.scaleAdd2 (0.5, vAB, pointA); -vTemp.setT (vAB); -vTemp.normalize (); -javajs.util.Measure.getPlaneThroughPoint (ptTemp, vTemp, plane); -}, "javajs.util.P3,javajs.util.V3,javajs.util.T3,javajs.util.V3,javajs.util.P4"); -c$.projectOntoAxis = Clazz.defineMethod (c$, "projectOntoAxis", -function (point, axisA, axisUnitVector, vectorProjection) { -vectorProjection.sub2 (point, axisA); -var projectedLength = vectorProjection.dot (axisUnitVector); -point.scaleAdd2 (projectedLength, axisUnitVector, axisA); -vectorProjection.sub2 (point, axisA); -}, "javajs.util.P3,javajs.util.P3,javajs.util.V3,javajs.util.V3"); -c$.calcBestAxisThroughPoints = Clazz.defineMethod (c$, "calcBestAxisThroughPoints", -function (points, axisA, axisUnitVector, vectorProjection, nTriesMax) { -var nPoints = points.length; -axisA.setT (points[0]); -axisUnitVector.sub2 (points[nPoints - 1], axisA); -axisUnitVector.normalize (); -javajs.util.Measure.calcAveragePointN (points, nPoints, axisA); -var nTries = 0; -while (nTries++ < nTriesMax && javajs.util.Measure.findAxis (points, nPoints, axisA, axisUnitVector, vectorProjection) > 0.001) { -} -var tempA = javajs.util.P3.newP (points[0]); -javajs.util.Measure.projectOntoAxis (tempA, axisA, axisUnitVector, vectorProjection); -axisA.setT (tempA); -}, "~A,javajs.util.P3,javajs.util.V3,javajs.util.V3,~N"); -c$.findAxis = Clazz.defineMethod (c$, "findAxis", -function (points, nPoints, axisA, axisUnitVector, vectorProjection) { -var sumXiYi = new javajs.util.V3 (); -var vTemp = new javajs.util.V3 (); -var pt = new javajs.util.P3 (); -var ptProj = new javajs.util.P3 (); -var a = javajs.util.V3.newV (axisUnitVector); -var sum_Xi2 = 0; -for (var i = nPoints; --i >= 0; ) { -pt.setT (points[i]); -ptProj.setT (pt); -javajs.util.Measure.projectOntoAxis (ptProj, axisA, axisUnitVector, vectorProjection); -vTemp.sub2 (pt, ptProj); -vTemp.cross (vectorProjection, vTemp); -sumXiYi.add (vTemp); -sum_Xi2 += vectorProjection.lengthSquared (); -} -var m = javajs.util.V3.newV (sumXiYi); -m.scale (1 / sum_Xi2); -vTemp.cross (m, axisUnitVector); -axisUnitVector.add (vTemp); -axisUnitVector.normalize (); -vTemp.sub2 (axisUnitVector, a); -return vTemp.length (); -}, "~A,~N,javajs.util.P3,javajs.util.V3,javajs.util.V3"); -c$.calcAveragePoint = Clazz.defineMethod (c$, "calcAveragePoint", -function (pointA, pointB, pointC) { -pointC.set ((pointA.x + pointB.x) / 2, (pointA.y + pointB.y) / 2, (pointA.z + pointB.z) / 2); -}, "javajs.util.P3,javajs.util.P3,javajs.util.P3"); -c$.calcAveragePointN = Clazz.defineMethod (c$, "calcAveragePointN", -function (points, nPoints, averagePoint) { -averagePoint.setT (points[0]); -for (var i = 1; i < nPoints; i++) averagePoint.add (points[i]); - -averagePoint.scale (1 / nPoints); -}, "~A,~N,javajs.util.P3"); -c$.transformPoints = Clazz.defineMethod (c$, "transformPoints", -function (vPts, m4, center) { -var v = new javajs.util.Lst (); -for (var i = 0; i < vPts.size (); i++) { -var pt = javajs.util.P3.newP (vPts.get (i)); -pt.sub (center); -m4.rotTrans (pt); -pt.add (center); -v.addLast (pt); -} -return v; -}, "javajs.util.Lst,javajs.util.M4,javajs.util.P3"); -c$.isInTetrahedron = Clazz.defineMethod (c$, "isInTetrahedron", -function (pt, ptA, ptB, ptC, ptD, plane, vTemp, vTemp2, fullyEnclosed) { -var b = (javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptC, ptD, ptA, vTemp, vTemp2, plane), pt) >= 0); -if (b != (javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptA, ptD, ptB, vTemp, vTemp2, plane), pt) >= 0)) return false; -if (b != (javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptB, ptD, ptC, vTemp, vTemp2, plane), pt) >= 0)) return false; -var d = javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptA, ptB, ptC, vTemp, vTemp2, plane), pt); -if (fullyEnclosed) return (b == (d >= 0)); -var d1 = javajs.util.Measure.distanceToPlane (plane, ptD); -return d1 * d <= 0 || Math.abs (d1) > Math.abs (d); -}, "javajs.util.P3,javajs.util.P3,javajs.util.P3,javajs.util.P3,javajs.util.P3,javajs.util.P4,javajs.util.V3,javajs.util.V3,~B"); -c$.getIntersectionPP = Clazz.defineMethod (c$, "getIntersectionPP", -function (plane1, plane2) { -var a1 = plane1.x; -var b1 = plane1.y; -var c1 = plane1.z; -var d1 = plane1.w; -var a2 = plane2.x; -var b2 = plane2.y; -var c2 = plane2.z; -var d2 = plane2.w; -var norm1 = javajs.util.V3.new3 (a1, b1, c1); -var norm2 = javajs.util.V3.new3 (a2, b2, c2); -var nxn = new javajs.util.V3 (); -nxn.cross (norm1, norm2); -var ax = Math.abs (nxn.x); -var ay = Math.abs (nxn.y); -var az = Math.abs (nxn.z); -var x; -var y; -var z; -var diff; -var type = (ax > ay ? (ax > az ? 1 : 3) : ay > az ? 2 : 3); -switch (type) { -case 1: -x = 0; -diff = (b1 * c2 - b2 * c1); -if (Math.abs (diff) < 0.01) return null; -y = (c1 * d2 - c2 * d1) / diff; -z = (b2 * d1 - d2 * b1) / diff; -break; -case 2: -diff = (a1 * c2 - a2 * c1); -if (Math.abs (diff) < 0.01) return null; -x = (c1 * d2 - c2 * d1) / diff; -y = 0; -z = (a2 * d1 - d2 * a1) / diff; -break; -case 3: -default: -diff = (a1 * b2 - a2 * b1); -if (Math.abs (diff) < 0.01) return null; -x = (b1 * d2 - b2 * d1) / diff; -y = (a2 * d1 - d2 * a1) / diff; -z = 0; -} -var list = new javajs.util.Lst (); -list.addLast (javajs.util.P3.new3 (x, y, z)); -nxn.normalize (); -list.addLast (nxn); -return list; -}, "javajs.util.P4,javajs.util.P4"); -c$.getIntersection = Clazz.defineMethod (c$, "getIntersection", -function (pt1, v, plane, ptRet, tempNorm, vTemp) { -javajs.util.Measure.getPlaneProjection (pt1, plane, ptRet, tempNorm); -tempNorm.set (plane.x, plane.y, plane.z); -tempNorm.normalize (); -if (v == null) v = javajs.util.V3.newV (tempNorm); -var l_dot_n = v.dot (tempNorm); -if (Math.abs (l_dot_n) < 0.01) return null; -vTemp.sub2 (ptRet, pt1); -ptRet.scaleAdd2 (vTemp.dot (tempNorm) / l_dot_n, v, pt1); -return ptRet; -}, "javajs.util.P3,javajs.util.V3,javajs.util.P4,javajs.util.P3,javajs.util.V3,javajs.util.V3"); -c$.calculateQuaternionRotation = Clazz.defineMethod (c$, "calculateQuaternionRotation", -function (centerAndPoints, retStddev) { -retStddev[1] = NaN; -var q = new javajs.util.Quat (); -if (centerAndPoints[0].length == 1 || centerAndPoints[0].length != centerAndPoints[1].length) return q; -var n = centerAndPoints[0].length - 1; -if (n < 2) return q; -var Sxx = 0; -var Sxy = 0; -var Sxz = 0; -var Syx = 0; -var Syy = 0; -var Syz = 0; -var Szx = 0; -var Szy = 0; -var Szz = 0; -var ptA = new javajs.util.P3 (); -var ptB = new javajs.util.P3 (); -for (var i = n + 1; --i >= 1; ) { -var aij = centerAndPoints[0][i]; -var bij = centerAndPoints[1][i]; -ptA.sub2 (aij, centerAndPoints[0][0]); -ptB.sub2 (bij, centerAndPoints[0][1]); -Sxx += ptA.x * ptB.x; -Sxy += ptA.x * ptB.y; -Sxz += ptA.x * ptB.z; -Syx += ptA.y * ptB.x; -Syy += ptA.y * ptB.y; -Syz += ptA.y * ptB.z; -Szx += ptA.z * ptB.x; -Szy += ptA.z * ptB.y; -Szz += ptA.z * ptB.z; -} -retStddev[0] = javajs.util.Measure.getRmsd (centerAndPoints, q); -var N = Clazz.newDoubleArray (4, 4, 0); -N[0][0] = Sxx + Syy + Szz; -N[0][1] = N[1][0] = Syz - Szy; -N[0][2] = N[2][0] = Szx - Sxz; -N[0][3] = N[3][0] = Sxy - Syx; -N[1][1] = Sxx - Syy - Szz; -N[1][2] = N[2][1] = Sxy + Syx; -N[1][3] = N[3][1] = Szx + Sxz; -N[2][2] = -Sxx + Syy - Szz; -N[2][3] = N[3][2] = Syz + Szy; -N[3][3] = -Sxx - Syy + Szz; -var v = (javajs.api.Interface.getInterface ("javajs.util.Eigen")).setM (N).getEigenvectorsFloatTransposed ()[3]; -q = javajs.util.Quat.newP4 (javajs.util.P4.new4 (v[1], v[2], v[3], v[0])); -retStddev[1] = javajs.util.Measure.getRmsd (centerAndPoints, q); -return q; -}, "~A,~A"); -c$.getTransformMatrix4 = Clazz.defineMethod (c$, "getTransformMatrix4", -function (ptsA, ptsB, m, centerA) { -var cptsA = javajs.util.Measure.getCenterAndPoints (ptsA); -var cptsB = javajs.util.Measure.getCenterAndPoints (ptsB); -var retStddev = Clazz.newFloatArray (2, 0); -var q = javajs.util.Measure.calculateQuaternionRotation ( Clazz.newArray (-1, [cptsA, cptsB]), retStddev); -var r = q.getMatrix (); -if (centerA == null) r.rotate (cptsA[0]); - else centerA.setT (cptsA[0]); -var t = javajs.util.V3.newVsub (cptsB[0], cptsA[0]); -m.setMV (r, t); -return retStddev[1]; -}, "javajs.util.Lst,javajs.util.Lst,javajs.util.M4,javajs.util.P3"); -c$.getCenterAndPoints = Clazz.defineMethod (c$, "getCenterAndPoints", -function (vPts) { -var n = vPts.size (); -var pts = new Array (n + 1); -pts[0] = new javajs.util.P3 (); -if (n > 0) { -for (var i = 0; i < n; i++) { -pts[0].add (pts[i + 1] = vPts.get (i)); -} -pts[0].scale (1 / n); -}return pts; -}, "javajs.util.Lst"); -c$.getRmsd = Clazz.defineMethod (c$, "getRmsd", -function (centerAndPoints, q) { -var sum2 = 0; -var ptsA = centerAndPoints[0]; -var ptsB = centerAndPoints[1]; -var cA = ptsA[0]; -var cB = ptsB[0]; -var n = ptsA.length - 1; -var ptAnew = new javajs.util.P3 (); -for (var i = n + 1; --i >= 1; ) { -ptAnew.sub2 (ptsA[i], cA); -q.transform2 (ptAnew, ptAnew).add (cB); -sum2 += ptAnew.distanceSquared (ptsB[i]); -} -return Math.sqrt (sum2 / n); -}, "~A,javajs.util.Quat"); -Clazz.defineStatics (c$, -"radiansPerDegree", (0.017453292519943295)); -c$.axisY = c$.prototype.axisY = javajs.util.V3.new3 (0, 1, 0); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.V3"], "javajs.util.Measure", ["java.lang.Float", "javajs.api.Interface", "javajs.util.Lst", "$.P3", "$.P4", "$.Quat"], function () { +c$ = Clazz.declareType (javajs.util, "Measure"); +c$.computeAngle = Clazz.defineMethod (c$, "computeAngle", +function (pointA, pointB, pointC, vectorBA, vectorBC, asDegrees) { +vectorBA.sub2 (pointA, pointB); +vectorBC.sub2 (pointC, pointB); +var angle = vectorBA.angle (vectorBC); +return (asDegrees ? angle / 0.017453292 : angle); +}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3,~B"); +c$.computeAngleABC = Clazz.defineMethod (c$, "computeAngleABC", +function (pointA, pointB, pointC, asDegrees) { +var vectorBA = new javajs.util.V3 (); +var vectorBC = new javajs.util.V3 (); +return javajs.util.Measure.computeAngle (pointA, pointB, pointC, vectorBA, vectorBC, asDegrees); +}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,~B"); +c$.computeTorsion = Clazz.defineMethod (c$, "computeTorsion", +function (p1, p2, p3, p4, asDegrees) { +var ijx = p1.x - p2.x; +var ijy = p1.y - p2.y; +var ijz = p1.z - p2.z; +var kjx = p3.x - p2.x; +var kjy = p3.y - p2.y; +var kjz = p3.z - p2.z; +var klx = p3.x - p4.x; +var kly = p3.y - p4.y; +var klz = p3.z - p4.z; +var ax = ijy * kjz - ijz * kjy; +var ay = ijz * kjx - ijx * kjz; +var az = ijx * kjy - ijy * kjx; +var cx = kjy * klz - kjz * kly; +var cy = kjz * klx - kjx * klz; +var cz = kjx * kly - kjy * klx; +var ai2 = 1 / (ax * ax + ay * ay + az * az); +var ci2 = 1 / (cx * cx + cy * cy + cz * cz); +var ai = Math.sqrt (ai2); +var ci = Math.sqrt (ci2); +var denom = ai * ci; +var cross = ax * cx + ay * cy + az * cz; +var cosang = cross * denom; +if (cosang > 1) { +cosang = 1; +}if (cosang < -1) { +cosang = -1; +}var torsion = Math.acos (cosang); +var dot = ijx * cx + ijy * cy + ijz * cz; +var absDot = Math.abs (dot); +torsion = (dot / absDot > 0) ? torsion : -torsion; +return (asDegrees ? torsion / 0.017453292 : torsion); +}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.T3,~B"); +c$.computeHelicalAxis = Clazz.defineMethod (c$, "computeHelicalAxis", +function (a, b, dq) { +var vab = new javajs.util.V3 (); +vab.sub2 (b, a); +var theta = dq.getTheta (); +var n = dq.getNormal (); +var v_dot_n = vab.dot (n); +if (Math.abs (v_dot_n) < 0.0001) v_dot_n = 0; +var va_prime_d = new javajs.util.V3 (); +va_prime_d.cross (vab, n); +if (va_prime_d.dot (va_prime_d) != 0) va_prime_d.normalize (); +var vda = new javajs.util.V3 (); +var vcb = javajs.util.V3.newV (n); +if (v_dot_n == 0) v_dot_n = 1.4E-45; +vcb.scale (v_dot_n); +vda.sub2 (vcb, vab); +vda.scale (0.5); +va_prime_d.scale (theta == 0 ? 0 : (vda.length () / Math.tan (theta / 2 / 180 * 3.141592653589793))); +var r = javajs.util.V3.newV (va_prime_d); +if (theta != 0) r.add (vda); +var pt_a_prime = javajs.util.P3.newP (a); +pt_a_prime.sub (r); +if (v_dot_n != 1.4E-45) n.scale (v_dot_n); +var pt_b_prime = javajs.util.P3.newP (pt_a_prime); +pt_b_prime.add (n); +theta = javajs.util.Measure.computeTorsion (a, pt_a_prime, pt_b_prime, b, true); +if (Float.isNaN (theta) || r.length () < 0.0001) theta = dq.getThetaDirectedV (n); +var residuesPerTurn = Math.abs (theta == 0 ? 0 : 360 / theta); +var pitch = Math.abs (v_dot_n == 1.4E-45 ? 0 : n.length () * (theta == 0 ? 1 : 360 / theta)); +return Clazz.newArray (-1, [pt_a_prime, n, r, javajs.util.P3.new3 (theta, pitch, residuesPerTurn), pt_b_prime]); +}, "javajs.util.P3,javajs.util.P3,javajs.util.Quat"); +c$.getPlaneThroughPoints = Clazz.defineMethod (c$, "getPlaneThroughPoints", +function (pointA, pointB, pointC, vNorm, vAB, plane) { +var w = javajs.util.Measure.getNormalThroughPoints (pointA, pointB, pointC, vNorm, vAB); +plane.set4 (vNorm.x, vNorm.y, vNorm.z, w); +return plane; +}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3,javajs.util.P4"); +c$.getPlaneThroughPoint = Clazz.defineMethod (c$, "getPlaneThroughPoint", +function (pt, normal, plane) { +plane.set4 (normal.x, normal.y, normal.z, -normal.dot (pt)); +}, "javajs.util.T3,javajs.util.V3,javajs.util.P4"); +c$.distanceToPlane = Clazz.defineMethod (c$, "distanceToPlane", +function (plane, pt) { +return (plane == null ? NaN : (plane.dot (pt) + plane.w) / Math.sqrt (plane.dot (plane))); +}, "javajs.util.P4,javajs.util.T3"); +c$.directedDistanceToPlane = Clazz.defineMethod (c$, "directedDistanceToPlane", +function (pt, plane, ptref) { +var f = plane.dot (pt) + plane.w; +var f1 = plane.dot (ptref) + plane.w; +return Math.signum (f1) * f / Math.sqrt (plane.dot (plane)); +}, "javajs.util.P3,javajs.util.P4,javajs.util.P3"); +c$.distanceToPlaneD = Clazz.defineMethod (c$, "distanceToPlaneD", +function (plane, d, pt) { +return (plane == null ? NaN : (plane.dot (pt) + plane.w) / d); +}, "javajs.util.P4,~N,javajs.util.P3"); +c$.distanceToPlaneV = Clazz.defineMethod (c$, "distanceToPlaneV", +function (norm, w, pt) { +return (norm == null ? NaN : (norm.dot (pt) + w) / Math.sqrt (norm.dot (norm))); +}, "javajs.util.V3,~N,javajs.util.P3"); +c$.calcNormalizedNormal = Clazz.defineMethod (c$, "calcNormalizedNormal", +function (pointA, pointB, pointC, vNormNorm, vAB) { +vAB.sub2 (pointB, pointA); +vNormNorm.sub2 (pointC, pointA); +vNormNorm.cross (vAB, vNormNorm); +vNormNorm.normalize (); +}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3"); +c$.getDirectedNormalThroughPoints = Clazz.defineMethod (c$, "getDirectedNormalThroughPoints", +function (pointA, pointB, pointC, ptRef, vNorm, vAB) { +var nd = javajs.util.Measure.getNormalThroughPoints (pointA, pointB, pointC, vNorm, vAB); +if (ptRef != null) { +var pt0 = javajs.util.P3.newP (pointA); +pt0.add (vNorm); +var d = pt0.distance (ptRef); +pt0.sub2 (pointA, vNorm); +if (d > pt0.distance (ptRef)) { +vNorm.scale (-1); +nd = -nd; +}}return nd; +}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3"); +c$.getNormalThroughPoints = Clazz.defineMethod (c$, "getNormalThroughPoints", +function (pointA, pointB, pointC, vNorm, vTemp) { +javajs.util.Measure.calcNormalizedNormal (pointA, pointB, pointC, vNorm, vTemp); +vTemp.setT (pointA); +return -vTemp.dot (vNorm); +}, "javajs.util.T3,javajs.util.T3,javajs.util.T3,javajs.util.V3,javajs.util.V3"); +c$.getPlaneProjection = Clazz.defineMethod (c$, "getPlaneProjection", +function (pt, plane, ptProj, vNorm) { +var dist = javajs.util.Measure.distanceToPlane (plane, pt); +vNorm.set (plane.x, plane.y, plane.z); +vNorm.normalize (); +vNorm.scale (-dist); +ptProj.add2 (pt, vNorm); +}, "javajs.util.P3,javajs.util.P4,javajs.util.P3,javajs.util.V3"); +c$.getNormalToLine = Clazz.defineMethod (c$, "getNormalToLine", +function (pointA, pointB, vNormNorm) { +vNormNorm.sub2 (pointA, pointB); +vNormNorm.cross (vNormNorm, javajs.util.Measure.axisY); +vNormNorm.normalize (); +if (Float.isNaN (vNormNorm.x)) vNormNorm.set (1, 0, 0); +}, "javajs.util.P3,javajs.util.P3,javajs.util.V3"); +c$.getBisectingPlane = Clazz.defineMethod (c$, "getBisectingPlane", +function (pointA, vAB, ptTemp, vTemp, plane) { +ptTemp.scaleAdd2 (0.5, vAB, pointA); +vTemp.setT (vAB); +vTemp.normalize (); +javajs.util.Measure.getPlaneThroughPoint (ptTemp, vTemp, plane); +}, "javajs.util.P3,javajs.util.V3,javajs.util.T3,javajs.util.V3,javajs.util.P4"); +c$.projectOntoAxis = Clazz.defineMethod (c$, "projectOntoAxis", +function (point, axisA, axisUnitVector, vectorProjection) { +vectorProjection.sub2 (point, axisA); +var projectedLength = vectorProjection.dot (axisUnitVector); +point.scaleAdd2 (projectedLength, axisUnitVector, axisA); +vectorProjection.sub2 (point, axisA); +}, "javajs.util.P3,javajs.util.P3,javajs.util.V3,javajs.util.V3"); +c$.calcBestAxisThroughPoints = Clazz.defineMethod (c$, "calcBestAxisThroughPoints", +function (points, axisA, axisUnitVector, vectorProjection, nTriesMax) { +var nPoints = points.length; +axisA.setT (points[0]); +axisUnitVector.sub2 (points[nPoints - 1], axisA); +axisUnitVector.normalize (); +javajs.util.Measure.calcAveragePointN (points, nPoints, axisA); +var nTries = 0; +while (nTries++ < nTriesMax && javajs.util.Measure.findAxis (points, nPoints, axisA, axisUnitVector, vectorProjection) > 0.001) { +} +var tempA = javajs.util.P3.newP (points[0]); +javajs.util.Measure.projectOntoAxis (tempA, axisA, axisUnitVector, vectorProjection); +axisA.setT (tempA); +}, "~A,javajs.util.P3,javajs.util.V3,javajs.util.V3,~N"); +c$.findAxis = Clazz.defineMethod (c$, "findAxis", +function (points, nPoints, axisA, axisUnitVector, vectorProjection) { +var sumXiYi = new javajs.util.V3 (); +var vTemp = new javajs.util.V3 (); +var pt = new javajs.util.P3 (); +var ptProj = new javajs.util.P3 (); +var a = javajs.util.V3.newV (axisUnitVector); +var sum_Xi2 = 0; +for (var i = nPoints; --i >= 0; ) { +pt.setT (points[i]); +ptProj.setT (pt); +javajs.util.Measure.projectOntoAxis (ptProj, axisA, axisUnitVector, vectorProjection); +vTemp.sub2 (pt, ptProj); +vTemp.cross (vectorProjection, vTemp); +sumXiYi.add (vTemp); +sum_Xi2 += vectorProjection.lengthSquared (); +} +var m = javajs.util.V3.newV (sumXiYi); +m.scale (1 / sum_Xi2); +vTemp.cross (m, axisUnitVector); +axisUnitVector.add (vTemp); +axisUnitVector.normalize (); +vTemp.sub2 (axisUnitVector, a); +return vTemp.length (); +}, "~A,~N,javajs.util.P3,javajs.util.V3,javajs.util.V3"); +c$.calcAveragePoint = Clazz.defineMethod (c$, "calcAveragePoint", +function (pointA, pointB, pointC) { +pointC.set ((pointA.x + pointB.x) / 2, (pointA.y + pointB.y) / 2, (pointA.z + pointB.z) / 2); +}, "javajs.util.P3,javajs.util.P3,javajs.util.P3"); +c$.calcAveragePointN = Clazz.defineMethod (c$, "calcAveragePointN", +function (points, nPoints, averagePoint) { +averagePoint.setT (points[0]); +for (var i = 1; i < nPoints; i++) averagePoint.add (points[i]); + +averagePoint.scale (1 / nPoints); +}, "~A,~N,javajs.util.P3"); +c$.transformPoints = Clazz.defineMethod (c$, "transformPoints", +function (vPts, m4, center) { +var v = new javajs.util.Lst (); +for (var i = 0; i < vPts.size (); i++) { +var pt = javajs.util.P3.newP (vPts.get (i)); +pt.sub (center); +m4.rotTrans (pt); +pt.add (center); +v.addLast (pt); +} +return v; +}, "javajs.util.Lst,javajs.util.M4,javajs.util.P3"); +c$.isInTetrahedron = Clazz.defineMethod (c$, "isInTetrahedron", +function (pt, ptA, ptB, ptC, ptD, plane, vTemp, vTemp2, fullyEnclosed) { +var b = (javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptC, ptD, ptA, vTemp, vTemp2, plane), pt) >= 0); +if (b != (javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptA, ptD, ptB, vTemp, vTemp2, plane), pt) >= 0)) return false; +if (b != (javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptB, ptD, ptC, vTemp, vTemp2, plane), pt) >= 0)) return false; +var d = javajs.util.Measure.distanceToPlane (javajs.util.Measure.getPlaneThroughPoints (ptA, ptB, ptC, vTemp, vTemp2, plane), pt); +if (fullyEnclosed) return (b == (d >= 0)); +var d1 = javajs.util.Measure.distanceToPlane (plane, ptD); +return d1 * d <= 0 || Math.abs (d1) > Math.abs (d); +}, "javajs.util.P3,javajs.util.P3,javajs.util.P3,javajs.util.P3,javajs.util.P3,javajs.util.P4,javajs.util.V3,javajs.util.V3,~B"); +c$.getIntersectionPP = Clazz.defineMethod (c$, "getIntersectionPP", +function (plane1, plane2) { +var a1 = plane1.x; +var b1 = plane1.y; +var c1 = plane1.z; +var d1 = plane1.w; +var a2 = plane2.x; +var b2 = plane2.y; +var c2 = plane2.z; +var d2 = plane2.w; +var norm1 = javajs.util.V3.new3 (a1, b1, c1); +var norm2 = javajs.util.V3.new3 (a2, b2, c2); +var nxn = new javajs.util.V3 (); +nxn.cross (norm1, norm2); +var ax = Math.abs (nxn.x); +var ay = Math.abs (nxn.y); +var az = Math.abs (nxn.z); +var x; +var y; +var z; +var diff; +var type = (ax > ay ? (ax > az ? 1 : 3) : ay > az ? 2 : 3); +switch (type) { +case 1: +x = 0; +diff = (b1 * c2 - b2 * c1); +if (Math.abs (diff) < 0.01) return null; +y = (c1 * d2 - c2 * d1) / diff; +z = (b2 * d1 - d2 * b1) / diff; +break; +case 2: +diff = (a1 * c2 - a2 * c1); +if (Math.abs (diff) < 0.01) return null; +x = (c1 * d2 - c2 * d1) / diff; +y = 0; +z = (a2 * d1 - d2 * a1) / diff; +break; +case 3: +default: +diff = (a1 * b2 - a2 * b1); +if (Math.abs (diff) < 0.01) return null; +x = (b1 * d2 - b2 * d1) / diff; +y = (a2 * d1 - d2 * a1) / diff; +z = 0; +} +var list = new javajs.util.Lst (); +list.addLast (javajs.util.P3.new3 (x, y, z)); +nxn.normalize (); +list.addLast (nxn); +return list; +}, "javajs.util.P4,javajs.util.P4"); +c$.getIntersection = Clazz.defineMethod (c$, "getIntersection", +function (pt1, v, plane, ptRet, tempNorm, vTemp) { +javajs.util.Measure.getPlaneProjection (pt1, plane, ptRet, tempNorm); +tempNorm.set (plane.x, plane.y, plane.z); +tempNorm.normalize (); +if (v == null) v = javajs.util.V3.newV (tempNorm); +var l_dot_n = v.dot (tempNorm); +if (Math.abs (l_dot_n) < 0.01) return null; +vTemp.sub2 (ptRet, pt1); +ptRet.scaleAdd2 (vTemp.dot (tempNorm) / l_dot_n, v, pt1); +return ptRet; +}, "javajs.util.P3,javajs.util.V3,javajs.util.P4,javajs.util.P3,javajs.util.V3,javajs.util.V3"); +c$.calculateQuaternionRotation = Clazz.defineMethod (c$, "calculateQuaternionRotation", +function (centerAndPoints, retStddev) { +retStddev[1] = NaN; +var q = new javajs.util.Quat (); +if (centerAndPoints[0].length == 1 || centerAndPoints[0].length != centerAndPoints[1].length) return q; +var n = centerAndPoints[0].length - 1; +if (n < 2) return q; +var Sxx = 0; +var Sxy = 0; +var Sxz = 0; +var Syx = 0; +var Syy = 0; +var Syz = 0; +var Szx = 0; +var Szy = 0; +var Szz = 0; +var ptA = new javajs.util.P3 (); +var ptB = new javajs.util.P3 (); +for (var i = n + 1; --i >= 1; ) { +var aij = centerAndPoints[0][i]; +var bij = centerAndPoints[1][i]; +ptA.sub2 (aij, centerAndPoints[0][0]); +ptB.sub2 (bij, centerAndPoints[0][1]); +Sxx += ptA.x * ptB.x; +Sxy += ptA.x * ptB.y; +Sxz += ptA.x * ptB.z; +Syx += ptA.y * ptB.x; +Syy += ptA.y * ptB.y; +Syz += ptA.y * ptB.z; +Szx += ptA.z * ptB.x; +Szy += ptA.z * ptB.y; +Szz += ptA.z * ptB.z; +} +retStddev[0] = javajs.util.Measure.getRmsd (centerAndPoints, q); +var N = Clazz.newDoubleArray (4, 4, 0); +N[0][0] = Sxx + Syy + Szz; +N[0][1] = N[1][0] = Syz - Szy; +N[0][2] = N[2][0] = Szx - Sxz; +N[0][3] = N[3][0] = Sxy - Syx; +N[1][1] = Sxx - Syy - Szz; +N[1][2] = N[2][1] = Sxy + Syx; +N[1][3] = N[3][1] = Szx + Sxz; +N[2][2] = -Sxx + Syy - Szz; +N[2][3] = N[3][2] = Syz + Szy; +N[3][3] = -Sxx - Syy + Szz; +var v = (javajs.api.Interface.getInterface ("javajs.util.Eigen")).setM (N).getEigenvectorsFloatTransposed ()[3]; +q = javajs.util.Quat.newP4 (javajs.util.P4.new4 (v[1], v[2], v[3], v[0])); +retStddev[1] = javajs.util.Measure.getRmsd (centerAndPoints, q); +return q; +}, "~A,~A"); +c$.getTransformMatrix4 = Clazz.defineMethod (c$, "getTransformMatrix4", +function (ptsA, ptsB, m, centerA) { +var cptsA = javajs.util.Measure.getCenterAndPoints (ptsA); +var cptsB = javajs.util.Measure.getCenterAndPoints (ptsB); +var retStddev = Clazz.newFloatArray (2, 0); +var q = javajs.util.Measure.calculateQuaternionRotation ( Clazz.newArray (-1, [cptsA, cptsB]), retStddev); +var r = q.getMatrix (); +if (centerA == null) r.rotate (cptsA[0]); + else centerA.setT (cptsA[0]); +var t = javajs.util.V3.newVsub (cptsB[0], cptsA[0]); +m.setMV (r, t); +return retStddev[1]; +}, "javajs.util.Lst,javajs.util.Lst,javajs.util.M4,javajs.util.P3"); +c$.getCenterAndPoints = Clazz.defineMethod (c$, "getCenterAndPoints", +function (vPts) { +var n = vPts.size (); +var pts = new Array (n + 1); +pts[0] = new javajs.util.P3 (); +if (n > 0) { +for (var i = 0; i < n; i++) { +pts[0].add (pts[i + 1] = vPts.get (i)); +} +pts[0].scale (1 / n); +}return pts; +}, "javajs.util.Lst"); +c$.getRmsd = Clazz.defineMethod (c$, "getRmsd", +function (centerAndPoints, q) { +var sum2 = 0; +var ptsA = centerAndPoints[0]; +var ptsB = centerAndPoints[1]; +var cA = ptsA[0]; +var cB = ptsB[0]; +var n = ptsA.length - 1; +var ptAnew = new javajs.util.P3 (); +for (var i = n + 1; --i >= 1; ) { +ptAnew.sub2 (ptsA[i], cA); +q.transform2 (ptAnew, ptAnew).add (cB); +sum2 += ptAnew.distanceSquared (ptsB[i]); +} +return Math.sqrt (sum2 / n); +}, "~A,javajs.util.Quat"); +Clazz.defineStatics (c$, +"radiansPerDegree", (0.017453292519943295)); +c$.axisY = c$.prototype.axisY = javajs.util.V3.new3 (0, 1, 0); +}); diff --git a/bin/javajs/util/OC.class b/bin/javajs/util/OC.class index 962e240e3569d578a558e8515313f9d6f3411891..1ff4f426fc44976c92e37b53087e24cfa08ca1b9 100644 GIT binary patch delta 48 zcmca%a?NDJ9sx$}&3gsp89BHa*rb$L1k*M@71U>9jM^+JqQt~*&LGGsE)uudUQCh& E08b_hY5)KL delta 50 zcmca+a>Hc99sx$3&3gsp898|v*rk+M1eKjOKM~YtVvOD_BBI2^VZk88DJ~-IwAofn Gk_7-?hzo20 diff --git a/bin/javajs/util/OC.js b/bin/javajs/util/OC.js index 76f148a..f720165 100644 --- a/bin/javajs/util/OC.js +++ b/bin/javajs/util/OC.js @@ -1,236 +1,236 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["java.io.OutputStream"], "javajs.util.OC", ["java.io.BufferedWriter", "$.ByteArrayOutputStream", "$.OutputStreamWriter", "javajs.util.Base64", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.bytePoster = null; -this.fileName = null; -this.bw = null; -this.isLocalFile = false; -this.byteCount = 0; -this.isCanceled = false; -this.closed = false; -this.os = null; -this.sb = null; -this.type = null; -this.$isBase64 = false; -this.os0 = null; -this.bytes = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "OC", java.io.OutputStream); -Clazz.defineMethod (c$, "setParams", -function (bytePoster, fileName, asWriter, os) { -this.bytePoster = bytePoster; -this.fileName = fileName; -this.$isBase64 = ";base64,".equals (fileName); -if (this.$isBase64) { -fileName = null; -this.os0 = os; -os = null; -}this.os = os; -this.isLocalFile = (fileName != null && !javajs.util.OC.isRemote (fileName)); -if (asWriter && !this.$isBase64 && os != null) this.bw = new java.io.BufferedWriter ( new java.io.OutputStreamWriter (os)); -return this; -}, "javajs.api.BytePoster,~S,~B,java.io.OutputStream"); -Clazz.defineMethod (c$, "setBytes", -function (b) { -this.bytes = b; -return this; -}, "~A"); -Clazz.defineMethod (c$, "getFileName", -function () { -return this.fileName; -}); -Clazz.defineMethod (c$, "getName", -function () { -return (this.fileName == null ? null : this.fileName.substring (this.fileName.lastIndexOf ("/") + 1)); -}); -Clazz.defineMethod (c$, "getByteCount", -function () { -return this.byteCount; -}); -Clazz.defineMethod (c$, "setType", -function (type) { -this.type = type; -}, "~S"); -Clazz.defineMethod (c$, "getType", -function () { -return this.type; -}); -Clazz.defineMethod (c$, "append", -function (s) { -try { -if (this.bw != null) { -this.bw.write (s); -} else if (this.os == null) { -if (this.sb == null) this.sb = new javajs.util.SB (); -this.sb.append (s); -} else { -var b = s.getBytes (); -this.os.write (b, 0, b.length); -this.byteCount += b.length; -return this; -}} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -this.byteCount += s.length; -return this; -}, "~S"); -Clazz.defineMethod (c$, "reset", -function () { -this.sb = null; -this.initOS (); -}); -Clazz.defineMethod (c$, "initOS", -($fz = function () { -if (this.sb != null) { -var s = this.sb.toString (); -this.reset (); -this.append (s); -return; -}try { -{ -this.os = null; -}if (this.os == null) this.os = new java.io.ByteArrayOutputStream (); -if (this.bw != null) { -this.bw.close (); -this.bw = new java.io.BufferedWriter ( new java.io.OutputStreamWriter (this.os)); -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -this.byteCount = 0; -}, $fz.isPrivate = true, $fz)); -Clazz.overrideMethod (c$, "write", -function (buf, i, len) { -if (this.os == null) this.initOS (); -try { -this.os.write (buf, i, len); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -this.byteCount += len; -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "writeByteAsInt", -function (b) { -if (this.os == null) this.initOS (); -{ -this.os.writeByteAsInt(b); -}this.byteCount++; -}, "~N"); -Clazz.defineMethod (c$, "cancel", -function () { -this.isCanceled = true; -this.closeChannel (); -}); -Clazz.defineMethod (c$, "closeChannel", -function () { -if (this.closed) return null; -try { -if (this.bw != null) { -this.bw.flush (); -this.bw.close (); -} else if (this.os != null) { -this.os.flush (); -this.os.close (); -}if (this.os0 != null && this.isCanceled) { -this.os0.flush (); -this.os0.close (); -}} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -if (this.isCanceled) { -this.closed = true; -return null; -}if (this.fileName == null) { -if (this.$isBase64) { -var s = this.getBase64 (); -if (this.os0 != null) { -this.os = this.os0; -this.append (s); -}this.sb = new javajs.util.SB (); -this.sb.append (s); -this.$isBase64 = false; -return this.closeChannel (); -}return (this.sb == null ? null : this.sb.toString ()); -}this.closed = true; -var jmol = null; -var _function = null; -{ -jmol = Jmol; _function = (typeof this.fileName == "function" ? -this.fileName : null); -}if (jmol != null) { -var data = (this.sb == null ? this.toByteArray () : this.sb.toString ()); -if (_function == null) jmol._doAjax (this.fileName, null, data); - else jmol._apply (this.fileName, data); -}return null; -}); -Clazz.defineMethod (c$, "isBase64", -function () { -return this.$isBase64; -}); -Clazz.defineMethod (c$, "getBase64", -function () { -return javajs.util.Base64.getBase64 (this.toByteArray ()).toString (); -}); -Clazz.defineMethod (c$, "toByteArray", -function () { -return (this.bytes != null ? this.bytes : Clazz.instanceOf (this.os, java.io.ByteArrayOutputStream) ? (this.os).toByteArray () : null); -}); -Clazz.defineMethod (c$, "close", -function () { -this.closeChannel (); -}); -Clazz.overrideMethod (c$, "toString", -function () { -if (this.bw != null) try { -this.bw.flush (); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -if (this.sb != null) return this.closeChannel (); -return this.byteCount + " bytes"; -}); -Clazz.defineMethod (c$, "postByteArray", -($fz = function () { -var bytes = (this.sb == null ? this.toByteArray () : this.sb.toString ().getBytes ()); -return this.bytePoster.postByteArray (this.fileName, bytes); -}, $fz.isPrivate = true, $fz)); -c$.isRemote = Clazz.defineMethod (c$, "isRemote", -function (fileName) { -if (fileName == null) return false; -var itype = javajs.util.OC.urlTypeIndex (fileName); -return (itype >= 0 && itype != 4); -}, "~S"); -c$.isLocal = Clazz.defineMethod (c$, "isLocal", -function (fileName) { -if (fileName == null) return false; -var itype = javajs.util.OC.urlTypeIndex (fileName); -return (itype < 0 || itype == 4); -}, "~S"); -c$.urlTypeIndex = Clazz.defineMethod (c$, "urlTypeIndex", -function (name) { -if (name == null) return -2; -for (var i = 0; i < javajs.util.OC.urlPrefixes.length; ++i) { -if (name.startsWith (javajs.util.OC.urlPrefixes[i])) { -return i; -}} -return -1; -}, "~S"); -Clazz.defineStatics (c$, -"urlPrefixes", Clazz.newArray (-1, ["http:", "https:", "sftp:", "ftp:", "file:"]), -"URL_LOCAL", 4); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["java.io.OutputStream"], "javajs.util.OC", ["java.io.BufferedWriter", "$.ByteArrayOutputStream", "$.OutputStreamWriter", "javajs.util.Base64", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.bytePoster = null; +this.fileName = null; +this.bw = null; +this.isLocalFile = false; +this.byteCount = 0; +this.isCanceled = false; +this.closed = false; +this.os = null; +this.sb = null; +this.type = null; +this.$isBase64 = false; +this.os0 = null; +this.bytes = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "OC", java.io.OutputStream); +Clazz.defineMethod (c$, "setParams", +function (bytePoster, fileName, asWriter, os) { +this.bytePoster = bytePoster; +this.fileName = fileName; +this.$isBase64 = ";base64,".equals (fileName); +if (this.$isBase64) { +fileName = null; +this.os0 = os; +os = null; +}this.os = os; +this.isLocalFile = (fileName != null && !javajs.util.OC.isRemote (fileName)); +if (asWriter && !this.$isBase64 && os != null) this.bw = new java.io.BufferedWriter ( new java.io.OutputStreamWriter (os)); +return this; +}, "javajs.api.BytePoster,~S,~B,java.io.OutputStream"); +Clazz.defineMethod (c$, "setBytes", +function (b) { +this.bytes = b; +return this; +}, "~A"); +Clazz.defineMethod (c$, "getFileName", +function () { +return this.fileName; +}); +Clazz.defineMethod (c$, "getName", +function () { +return (this.fileName == null ? null : this.fileName.substring (this.fileName.lastIndexOf ("/") + 1)); +}); +Clazz.defineMethod (c$, "getByteCount", +function () { +return this.byteCount; +}); +Clazz.defineMethod (c$, "setType", +function (type) { +this.type = type; +}, "~S"); +Clazz.defineMethod (c$, "getType", +function () { +return this.type; +}); +Clazz.defineMethod (c$, "append", +function (s) { +try { +if (this.bw != null) { +this.bw.write (s); +} else if (this.os == null) { +if (this.sb == null) this.sb = new javajs.util.SB (); +this.sb.append (s); +} else { +var b = s.getBytes (); +this.os.write (b, 0, b.length); +this.byteCount += b.length; +return this; +}} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +this.byteCount += s.length; +return this; +}, "~S"); +Clazz.defineMethod (c$, "reset", +function () { +this.sb = null; +this.initOS (); +}); +Clazz.defineMethod (c$, "initOS", +($fz = function () { +if (this.sb != null) { +var s = this.sb.toString (); +this.reset (); +this.append (s); +return; +}try { +{ +this.os = null; +}if (this.os == null) this.os = new java.io.ByteArrayOutputStream (); +if (this.bw != null) { +this.bw.close (); +this.bw = new java.io.BufferedWriter ( new java.io.OutputStreamWriter (this.os)); +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +this.byteCount = 0; +}, $fz.isPrivate = true, $fz)); +Clazz.overrideMethod (c$, "write", +function (buf, i, len) { +if (this.os == null) this.initOS (); +try { +this.os.write (buf, i, len); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +this.byteCount += len; +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "writeByteAsInt", +function (b) { +if (this.os == null) this.initOS (); +{ +this.os.writeByteAsInt(b); +}this.byteCount++; +}, "~N"); +Clazz.defineMethod (c$, "cancel", +function () { +this.isCanceled = true; +this.closeChannel (); +}); +Clazz.defineMethod (c$, "closeChannel", +function () { +if (this.closed) return null; +try { +if (this.bw != null) { +this.bw.flush (); +this.bw.close (); +} else if (this.os != null) { +this.os.flush (); +this.os.close (); +}if (this.os0 != null && this.isCanceled) { +this.os0.flush (); +this.os0.close (); +}} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +if (this.isCanceled) { +this.closed = true; +return null; +}if (this.fileName == null) { +if (this.$isBase64) { +var s = this.getBase64 (); +if (this.os0 != null) { +this.os = this.os0; +this.append (s); +}this.sb = new javajs.util.SB (); +this.sb.append (s); +this.$isBase64 = false; +return this.closeChannel (); +}return (this.sb == null ? null : this.sb.toString ()); +}this.closed = true; +var jmol = null; +var _function = null; +{ +jmol = Jmol; _function = (typeof this.fileName == "function" ? +this.fileName : null); +}if (jmol != null) { +var data = (this.sb == null ? this.toByteArray () : this.sb.toString ()); +if (_function == null) jmol._doAjax (this.fileName, null, data); + else jmol._apply (this.fileName, data); +}return null; +}); +Clazz.defineMethod (c$, "isBase64", +function () { +return this.$isBase64; +}); +Clazz.defineMethod (c$, "getBase64", +function () { +return javajs.util.Base64.getBase64 (this.toByteArray ()).toString (); +}); +Clazz.defineMethod (c$, "toByteArray", +function () { +return (this.bytes != null ? this.bytes : Clazz.instanceOf (this.os, java.io.ByteArrayOutputStream) ? (this.os).toByteArray () : null); +}); +Clazz.defineMethod (c$, "close", +function () { +this.closeChannel (); +}); +Clazz.overrideMethod (c$, "toString", +function () { +if (this.bw != null) try { +this.bw.flush (); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +if (this.sb != null) return this.closeChannel (); +return this.byteCount + " bytes"; +}); +Clazz.defineMethod (c$, "postByteArray", +($fz = function () { +var bytes = (this.sb == null ? this.toByteArray () : this.sb.toString ().getBytes ()); +return this.bytePoster.postByteArray (this.fileName, bytes); +}, $fz.isPrivate = true, $fz)); +c$.isRemote = Clazz.defineMethod (c$, "isRemote", +function (fileName) { +if (fileName == null) return false; +var itype = javajs.util.OC.urlTypeIndex (fileName); +return (itype >= 0 && itype != 4); +}, "~S"); +c$.isLocal = Clazz.defineMethod (c$, "isLocal", +function (fileName) { +if (fileName == null) return false; +var itype = javajs.util.OC.urlTypeIndex (fileName); +return (itype < 0 || itype == 4); +}, "~S"); +c$.urlTypeIndex = Clazz.defineMethod (c$, "urlTypeIndex", +function (name) { +if (name == null) return -2; +for (var i = 0; i < javajs.util.OC.urlPrefixes.length; ++i) { +if (name.startsWith (javajs.util.OC.urlPrefixes[i])) { +return i; +}} +return -1; +}, "~S"); +Clazz.defineStatics (c$, +"urlPrefixes", Clazz.newArray (-1, ["http:", "https:", "sftp:", "ftp:", "file:"]), +"URL_LOCAL", 4); +}); diff --git a/bin/javajs/util/P3.js b/bin/javajs/util/P3.js index cc292cd..b44211d 100644 --- a/bin/javajs/util/P3.js +++ b/bin/javajs/util/P3.js @@ -1,26 +1,26 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.T3"], "javajs.util.P3", null, function () { -c$ = Clazz.declareType (javajs.util, "P3", javajs.util.T3); -c$.newP = Clazz.defineMethod (c$, "newP", -function (t) { -var p = new javajs.util.P3 (); -p.x = t.x; -p.y = t.y; -p.z = t.z; -return p; -}, "javajs.util.T3"); -c$.getUnlikely = Clazz.defineMethod (c$, "getUnlikely", -function () { -return (javajs.util.P3.unlikely == null ? javajs.util.P3.unlikely = javajs.util.P3.new3 (3.141592653589793, 2.718281828459045, (8.539734222673566)) : javajs.util.P3.unlikely); -}); -c$.new3 = Clazz.defineMethod (c$, "new3", -function (x, y, z) { -var p = new javajs.util.P3 (); -p.x = x; -p.y = y; -p.z = z; -return p; -}, "~N,~N,~N"); -Clazz.defineStatics (c$, -"unlikely", null); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.T3"], "javajs.util.P3", null, function () { +c$ = Clazz.declareType (javajs.util, "P3", javajs.util.T3); +c$.newP = Clazz.defineMethod (c$, "newP", +function (t) { +var p = new javajs.util.P3 (); +p.x = t.x; +p.y = t.y; +p.z = t.z; +return p; +}, "javajs.util.T3"); +c$.getUnlikely = Clazz.defineMethod (c$, "getUnlikely", +function () { +return (javajs.util.P3.unlikely == null ? javajs.util.P3.unlikely = javajs.util.P3.new3 (3.141592653589793, 2.718281828459045, (8.539734222673566)) : javajs.util.P3.unlikely); +}); +c$.new3 = Clazz.defineMethod (c$, "new3", +function (x, y, z) { +var p = new javajs.util.P3 (); +p.x = x; +p.y = y; +p.z = z; +return p; +}, "~N,~N,~N"); +Clazz.defineStatics (c$, +"unlikely", null); +}); diff --git a/bin/javajs/util/P3i.js b/bin/javajs/util/P3i.js index 4888909..e4e31b5 100644 --- a/bin/javajs/util/P3i.js +++ b/bin/javajs/util/P3i.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.T3i"], "javajs.util.P3i", null, function () { -c$ = Clazz.declareType (javajs.util, "P3i", javajs.util.T3i); -c$.new3 = Clazz.defineMethod (c$, "new3", -function (x, y, z) { -var pt = new javajs.util.P3i (); -pt.x = x; -pt.y = y; -pt.z = z; -return pt; -}, "~N,~N,~N"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.T3i"], "javajs.util.P3i", null, function () { +c$ = Clazz.declareType (javajs.util, "P3i", javajs.util.T3i); +c$.new3 = Clazz.defineMethod (c$, "new3", +function (x, y, z) { +var pt = new javajs.util.P3i (); +pt.x = x; +pt.y = y; +pt.z = z; +return pt; +}, "~N,~N,~N"); +}); diff --git a/bin/javajs/util/P4.js b/bin/javajs/util/P4.js index c317cd6..2afde3c 100644 --- a/bin/javajs/util/P4.js +++ b/bin/javajs/util/P4.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.T4"], "javajs.util.P4", null, function () { -c$ = Clazz.declareType (javajs.util, "P4", javajs.util.T4); -c$.new4 = Clazz.defineMethod (c$, "new4", -function (x, y, z, w) { -var pt = new javajs.util.P4 (); -pt.set4 (x, y, z, w); -return pt; -}, "~N,~N,~N,~N"); -c$.newPt = Clazz.defineMethod (c$, "newPt", -function (value) { -var pt = new javajs.util.P4 (); -pt.set4 (value.x, value.y, value.z, value.w); -return pt; -}, "javajs.util.P4"); -Clazz.defineMethod (c$, "distance4", -function (p1) { -var dx = this.x - p1.x; -var dy = this.y - p1.y; -var dz = this.z - p1.z; -var dw = this.w - p1.w; -return Math.sqrt (dx * dx + dy * dy + dz * dz + dw * dw); -}, "javajs.util.P4"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.T4"], "javajs.util.P4", null, function () { +c$ = Clazz.declareType (javajs.util, "P4", javajs.util.T4); +c$.new4 = Clazz.defineMethod (c$, "new4", +function (x, y, z, w) { +var pt = new javajs.util.P4 (); +pt.set4 (x, y, z, w); +return pt; +}, "~N,~N,~N,~N"); +c$.newPt = Clazz.defineMethod (c$, "newPt", +function (value) { +var pt = new javajs.util.P4 (); +pt.set4 (value.x, value.y, value.z, value.w); +return pt; +}, "javajs.util.P4"); +Clazz.defineMethod (c$, "distance4", +function (p1) { +var dx = this.x - p1.x; +var dy = this.y - p1.y; +var dz = this.z - p1.z; +var dw = this.w - p1.w; +return Math.sqrt (dx * dx + dy * dy + dz * dz + dw * dw); +}, "javajs.util.P4"); +}); diff --git a/bin/javajs/util/PT.class b/bin/javajs/util/PT.class index c3955d6cbff85f63b61100c300b9fc18ec9aa667..280974d8a4dca6f4883ed2cec254ea18f1c015aa 100644 GIT binary patch delta 181 zcmaF@(!1;%PnduLMEF+)P9|kc-S@~ZK;+w;C7RfNCZT{(TkXdL6gCrOKUj}A& z26J}C%-;-d(woouY-0l&*c$wSPk@2#4+9V5U!VbuYRsEkL%4+*dp1u@_h6QDW{}|m a$%!&MF#ciSV-$o?AX1BwdGqhA95w)L#xb`5 delta 225 zcmdn}i1GO&#tpMn8JBLJts2K@=*GbLk3oo$k&%h-KZ7I#2Rnl~BRfMVP=JAvf#E*` z6S5FckYO^X`b@@In-{D5u`qixs7(H%tu7_V#P*AU=??=l5X&<1N&R6EW0aNu#UR48 z*+^%R3}eRTs~!iLMV2v0bMgOWUdY4Zx7ZETFpljDOw2naE-|6$-^ z{0lULQO$voX>)7{w=m;`&6(*Q%u4PIa$F!;QJ{na;~xe-MnMP#BDEMn%Fk!zumJ!$ Ctu)vG diff --git a/bin/javajs/util/PT.js b/bin/javajs/util/PT.js index b20715c..2bfe06d 100644 --- a/bin/javajs/util/PT.js +++ b/bin/javajs/util/PT.js @@ -1,945 +1,945 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (null, "javajs.util.PT", ["java.lang.Boolean", "$.Double", "$.Float", "$.Number", "java.util.Map", "javajs.api.JSONEncodable", "javajs.util.AU", "$.DF", "$.Lst", "$.M34", "$.M4", "$.SB"], function () { -c$ = Clazz.declareType (javajs.util, "PT"); -c$.parseInt = Clazz.defineMethod (c$, "parseInt", -function (str) { -return javajs.util.PT.parseIntNext (str, Clazz.newIntArray (-1, [0])); -}, "~S"); -c$.parseIntNext = Clazz.defineMethod (c$, "parseIntNext", -function (str, next) { -var cch = str.length; -if (next[0] < 0 || next[0] >= cch) return -2147483648; -return javajs.util.PT.parseIntChecked (str, cch, next); -}, "~S,~A"); -c$.parseIntChecked = Clazz.defineMethod (c$, "parseIntChecked", -function (str, ichMax, next) { -var digitSeen = false; -var value = 0; -var ich = next[0]; -if (ich < 0) return -2147483648; -var ch; -while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; - -var negative = false; -if (ich < ichMax && str.charCodeAt (ich) == 45) { -negative = true; -++ich; -}while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { -value = value * 10 + (ch - 48); -digitSeen = true; -++ich; -} -if (!digitSeen) value = -2147483648; - else if (negative) value = -value; -next[0] = ich; -return value; -}, "~S,~N,~A"); -c$.isWhiteSpace = Clazz.defineMethod (c$, "isWhiteSpace", -function (str, ich) { -var ch; -return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n')); -}, "~S,~N"); -c$.parseFloatChecked = Clazz.defineMethod (c$, "parseFloatChecked", -function (str, ichMax, next, isStrict) { -var digitSeen = false; -var ich = next[0]; -if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN; -while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; - -var negative = false; -if (ich < ichMax && str.charAt (ich) == '-') { -++ich; -negative = true; -}var ch = 0; -var ival = 0; -var ival2 = 0; -while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { -ival = (ival * 10) + (ch - 48) * 1; -++ich; -digitSeen = true; -} -var isDecimal = false; -var iscale = 0; -var nzero = (ival == 0 ? -1 : 0); -if (ch == 46) { -isDecimal = true; -while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { -digitSeen = true; -if (nzero < 0) { -if (ch == 48) { -nzero--; -continue; -}nzero = -nzero; -}if (iscale < javajs.util.PT.decimalScale.length) { -ival2 = (ival2 * 10) + (ch - 48) * 1; -iscale++; -}} -}var value; -if (!digitSeen) { -value = NaN; -} else if (ival2 > 0) { -value = ival2 * javajs.util.PT.decimalScale[iscale - 1]; -if (nzero > 1) { -if (nzero - 2 < javajs.util.PT.decimalScale.length) { -value *= javajs.util.PT.decimalScale[nzero - 2]; -} else { -value *= Math.pow (10, 1 - nzero); -}} else { -value += ival; -}} else { -value = ival; -}var isExponent = false; -if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) { -isExponent = true; -if (++ich >= ichMax) return NaN; -ch = str.charCodeAt (ich); -if ((ch == 43) && (++ich >= ichMax)) return NaN; -next[0] = ich; -var exponent = javajs.util.PT.parseIntChecked (str, ichMax, next); -if (exponent == -2147483648) return NaN; -if (exponent > 0 && exponent <= javajs.util.PT.tensScale.length) value *= javajs.util.PT.tensScale[exponent - 1]; - else if (exponent < 0 && -exponent <= javajs.util.PT.decimalScale.length) value *= javajs.util.PT.decimalScale[-exponent - 1]; - else if (exponent != 0) value *= Math.pow (10, exponent); -} else { -next[0] = ich; -}if (negative) value = -value; -if (value == Infinity) value = 3.4028235E38; -return (!isStrict || (!isExponent || isDecimal) && javajs.util.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN); -}, "~S,~N,~A,~B"); -c$.checkTrailingText = Clazz.defineMethod (c$, "checkTrailingText", -function (str, ich, ichMax) { -var ch; -while (ich < ichMax && (javajs.util.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich; - -return (ich == ichMax); -}, "~S,~N,~N"); -c$.parseFloatArray = Clazz.defineMethod (c$, "parseFloatArray", -function (str) { -return javajs.util.PT.parseFloatArrayNext (str, Clazz.newIntArray (1, 0), null, null, null); -}, "~S"); -c$.parseFloatArrayInfested = Clazz.defineMethod (c$, "parseFloatArrayInfested", -function (tokens, data) { -var len = data.length; -var nTokens = tokens.length; -var n = 0; -var max = 0; -for (var i = 0; i >= 0 && i < len && n < nTokens; i++) { -var f; -while (Float.isNaN (f = javajs.util.PT.parseFloat (tokens[n++])) && n < nTokens) { -} -if (!Float.isNaN (f)) data[(max = i)] = f; -if (n == nTokens) break; -} -return max + 1; -}, "~A,~A"); -c$.parseFloatArrayNext = Clazz.defineMethod (c$, "parseFloatArrayNext", -function (str, next, f, strStart, strEnd) { -var n = 0; -var pt = next[0]; -if (pt >= 0) { -if (strStart != null) { -var p = str.indexOf (strStart, pt); -if (p >= 0) next[0] = p + strStart.length; -}str = str.substring (next[0]); -pt = (strEnd == null ? -1 : str.indexOf (strEnd)); -if (pt < 0) pt = str.length; - else str = str.substring (0, pt); -next[0] += pt + 1; -var tokens = javajs.util.PT.getTokens (str); -if (f == null) f = Clazz.newFloatArray (tokens.length, 0); -n = javajs.util.PT.parseFloatArrayInfested (tokens, f); -}if (f == null) return Clazz.newFloatArray (0, 0); -for (var i = n; i < f.length; i++) f[i] = NaN; - -return f; -}, "~S,~A,~A,~S,~S"); -c$.parseFloatRange = Clazz.defineMethod (c$, "parseFloatRange", -function (str, ichMax, next) { -var cch = str.length; -if (ichMax > cch) ichMax = cch; -if (next[0] < 0 || next[0] >= ichMax) return NaN; -return javajs.util.PT.parseFloatChecked (str, ichMax, next, false); -}, "~S,~N,~A"); -c$.parseFloatNext = Clazz.defineMethod (c$, "parseFloatNext", -function (str, next) { -var cch = (str == null ? -1 : str.length); -return (next[0] < 0 || next[0] >= cch ? NaN : javajs.util.PT.parseFloatChecked (str, cch, next, false)); -}, "~S,~A"); -c$.parseFloatStrict = Clazz.defineMethod (c$, "parseFloatStrict", -function (str) { -var cch = str.length; -if (cch == 0) return NaN; -return javajs.util.PT.parseFloatChecked (str, cch, Clazz.newIntArray (-1, [0]), true); -}, "~S"); -c$.parseFloat = Clazz.defineMethod (c$, "parseFloat", -function (str) { -return javajs.util.PT.parseFloatNext (str, Clazz.newIntArray (-1, [0])); -}, "~S"); -c$.parseIntRadix = Clazz.defineMethod (c$, "parseIntRadix", -function (s, i) { -{ -return Integer.parseIntRadix(s, i); -}}, "~S,~N"); -c$.getTokens = Clazz.defineMethod (c$, "getTokens", -function (line) { -return javajs.util.PT.getTokensAt (line, 0); -}, "~S"); -c$.parseToken = Clazz.defineMethod (c$, "parseToken", -function (str) { -return javajs.util.PT.parseTokenNext (str, Clazz.newIntArray (-1, [0])); -}, "~S"); -c$.parseTrimmed = Clazz.defineMethod (c$, "parseTrimmed", -function (str) { -return javajs.util.PT.parseTrimmedRange (str, 0, str.length); -}, "~S"); -c$.parseTrimmedAt = Clazz.defineMethod (c$, "parseTrimmedAt", -function (str, ichStart) { -return javajs.util.PT.parseTrimmedRange (str, ichStart, str.length); -}, "~S,~N"); -c$.parseTrimmedRange = Clazz.defineMethod (c$, "parseTrimmedRange", -function (str, ichStart, ichMax) { -var cch = str.length; -if (ichMax < cch) cch = ichMax; -if (cch < ichStart) return ""; -return javajs.util.PT.parseTrimmedChecked (str, ichStart, cch); -}, "~S,~N,~N"); -c$.getTokensAt = Clazz.defineMethod (c$, "getTokensAt", -function (line, ich) { -if (line == null) return null; -var cchLine = line.length; -if (ich < 0 || ich > cchLine) return null; -var tokenCount = javajs.util.PT.countTokens (line, ich); -var tokens = new Array (tokenCount); -var next = Clazz.newIntArray (1, 0); -next[0] = ich; -for (var i = 0; i < tokenCount; ++i) tokens[i] = javajs.util.PT.parseTokenChecked (line, cchLine, next); - -return tokens; -}, "~S,~N"); -c$.countChar = Clazz.defineMethod (c$, "countChar", -function (line, c) { -var tokenCount = 0; -var pt = -1; -while ((pt = line.indexOf (c, pt + 1)) >= 0) tokenCount++; - -return tokenCount; -}, "~S,~S"); -c$.countTokens = Clazz.defineMethod (c$, "countTokens", -function (line, ich) { -var tokenCount = 0; -if (line != null) { -var ichMax = line.length; -while (true) { -while (ich < ichMax && javajs.util.PT.isWhiteSpace (line, ich)) ++ich; - -if (ich == ichMax) break; -++tokenCount; -do { -++ich; -} while (ich < ichMax && !javajs.util.PT.isWhiteSpace (line, ich)); -} -}return tokenCount; -}, "~S,~N"); -c$.parseTokenNext = Clazz.defineMethod (c$, "parseTokenNext", -function (str, next) { -var cch = str.length; -return (next[0] < 0 || next[0] >= cch ? null : javajs.util.PT.parseTokenChecked (str, cch, next)); -}, "~S,~A"); -c$.parseTokenRange = Clazz.defineMethod (c$, "parseTokenRange", -function (str, ichMax, next) { -var cch = str.length; -if (ichMax > cch) ichMax = cch; -return (next[0] < 0 || next[0] >= ichMax ? null : javajs.util.PT.parseTokenChecked (str, ichMax, next)); -}, "~S,~N,~A"); -c$.parseTokenChecked = Clazz.defineMethod (c$, "parseTokenChecked", -function (str, ichMax, next) { -var ich = next[0]; -while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; - -var ichNonWhite = ich; -while (ich < ichMax && !javajs.util.PT.isWhiteSpace (str, ich)) ++ich; - -next[0] = ich; -return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich)); -}, "~S,~N,~A"); -c$.parseTrimmedChecked = Clazz.defineMethod (c$, "parseTrimmedChecked", -function (str, ich, ichMax) { -while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; - -var ichLast = ichMax - 1; -while (ichLast >= ich && javajs.util.PT.isWhiteSpace (str, ichLast)) --ichLast; - -return (ichLast < ich ? "" : str.substring (ich, ichLast + 1)); -}, "~S,~N,~N"); -c$.dVal = Clazz.defineMethod (c$, "dVal", -function (s) { -{ -if(s==null) -throw new NumberFormatException("null"); -var d=parseFloat(s); -if(isNaN(d)) -throw new NumberFormatException("Not a Number : "+s); -return d -}}, "~S"); -c$.fVal = Clazz.defineMethod (c$, "fVal", -function (s) { -{ -return this.dVal(s); -}}, "~S"); -c$.parseIntRange = Clazz.defineMethod (c$, "parseIntRange", -function (str, ichMax, next) { -var cch = str.length; -if (ichMax > cch) ichMax = cch; -return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : javajs.util.PT.parseIntChecked (str, ichMax, next)); -}, "~S,~N,~A"); -c$.parseFloatArrayData = Clazz.defineMethod (c$, "parseFloatArrayData", -function (tokens, data) { -javajs.util.PT.parseFloatArrayDataN (tokens, data, data.length); -}, "~A,~A"); -c$.parseFloatArrayDataN = Clazz.defineMethod (c$, "parseFloatArrayDataN", -function (tokens, data, nData) { -for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : javajs.util.PT.parseFloat (tokens[i])); - -}, "~A,~A,~N"); -c$.split = Clazz.defineMethod (c$, "split", -function (text, run) { -if (text.length == 0) return new Array (0); -var n = 1; -var i = text.indexOf (run); -var lines; -var runLen = run.length; -if (i < 0 || runLen == 0) { -lines = new Array (1); -lines[0] = text; -return lines; -}var len = text.length - runLen; -for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen); - -lines = new Array (n); -i = 0; -var ipt = 0; -var pt = 0; -for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) { -lines[pt++] = text.substring (i, ipt); -i = ipt + runLen; -} -if (text.indexOf (run, len) != len) len += runLen; -lines[pt] = text.substring (i, len); -return lines; -}, "~S,~S"); -c$.getQuotedStringAt = Clazz.defineMethod (c$, "getQuotedStringAt", -function (line, ipt0) { -var next = Clazz.newIntArray (-1, [ipt0]); -return javajs.util.PT.getQuotedStringNext (line, next); -}, "~S,~N"); -c$.getQuotedStringNext = Clazz.defineMethod (c$, "getQuotedStringNext", -function (line, next) { -var i = next[0]; -if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return ""; -var pt = i + 1; -var len = line.length; -while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++; - -next[0] = i + 1; -return line.substring (pt, i); -}, "~S,~A"); -c$.getCSVString = Clazz.defineMethod (c$, "getCSVString", -function (line, next) { -var i = next[1]; -if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null; -var pt = next[0] = i; -var len = line.length; -var escaped = false; -var haveEscape = false; -while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) { -escaped = false; -haveEscape = true; -i++; -} -if (i >= len) { -next[1] = -1; -return null; -}next[1] = i + 1; -var s = line.substring (pt + 1, i); -return (haveEscape ? javajs.util.PT.rep (javajs.util.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s); -}, "~S,~A"); -c$.isOneOf = Clazz.defineMethod (c$, "isOneOf", -function (key, semiList) { -if (semiList.length == 0) return false; -if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";"; -return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0; -}, "~S,~S"); -c$.getQuotedAttribute = Clazz.defineMethod (c$, "getQuotedAttribute", -function (info, name) { -var i = info.indexOf (name + "="); -return (i < 0 ? null : javajs.util.PT.getQuotedStringAt (info, i)); -}, "~S,~S"); -c$.approx = Clazz.defineMethod (c$, "approx", -function (f, n) { -return Math.round (f * n) / n; -}, "~N,~N"); -c$.rep = Clazz.defineMethod (c$, "rep", -function (str, strFrom, strTo) { -if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str; -var isOnce = (strTo.indexOf (strFrom) >= 0); -do { -str = str.$replace (strFrom, strTo); -} while (!isOnce && str.indexOf (strFrom) >= 0); -return str; -}, "~S,~S,~S"); -c$.formatF = Clazz.defineMethod (c$, "formatF", -function (value, width, precision, alignLeft, zeroPad) { -return javajs.util.PT.formatS (javajs.util.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad); -}, "~N,~N,~N,~B,~B"); -c$.formatD = Clazz.defineMethod (c$, "formatD", -function (value, width, precision, alignLeft, zeroPad, allowOverflow) { -return javajs.util.PT.formatS (javajs.util.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad); -}, "~N,~N,~N,~B,~B,~B"); -c$.formatS = Clazz.defineMethod (c$, "formatS", -function (value, width, precision, alignLeft, zeroPad) { -if (value == null) return ""; -var len = value.length; -if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision); - else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1); -var padLength = width - value.length; -if (padLength <= 0) return value; -var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-'); -var padChar = (zeroPad ? '0' : ' '); -var padChar0 = (isNeg ? '-' : padChar); -var sb = new javajs.util.SB (); -if (alignLeft) sb.append (value); -sb.appendC (padChar0); -for (var i = padLength; --i > 0; ) sb.appendC (padChar); - -if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value); -return sb.toString (); -}, "~S,~N,~N,~B,~B"); -c$.replaceWithCharacter = Clazz.defineMethod (c$, "replaceWithCharacter", -function (str, strFrom, chTo) { -if (str == null) return null; -for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo); - -return str; -}, "~S,~S,~S"); -c$.replaceAllCharacters = Clazz.defineMethod (c$, "replaceAllCharacters", -function (str, strFrom, strTo) { -for (var i = strFrom.length; --i >= 0; ) { -var chFrom = strFrom.substring (i, i + 1); -str = javajs.util.PT.rep (str, chFrom, strTo); -} -return str; -}, "~S,~S,~S"); -c$.trim = Clazz.defineMethod (c$, "trim", -function (str, chars) { -if (str == null || str.length == 0) return str; -if (chars.length == 0) return str.trim (); -var len = str.length; -var k = 0; -while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++; - -var m = str.length - 1; -while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--; - -return str.substring (k, m + 1); -}, "~S,~S"); -c$.trimQuotes = Clazz.defineMethod (c$, "trimQuotes", -function (value) { -return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value); -}, "~S"); -c$.isNonStringPrimitive = Clazz.defineMethod (c$, "isNonStringPrimitive", -function (info) { -return Clazz.instanceOf (info, Number) || Clazz.instanceOf (info, Boolean); -}, "~O"); -c$.arrayGet = Clazz.defineMethod (c$, "arrayGet", -($fz = function (info, i) { -{ -return info[i]; -}}, $fz.isPrivate = true, $fz), "~O,~N"); -c$.toJSON = Clazz.defineMethod (c$, "toJSON", -function (infoType, info) { -if (info == null) return javajs.util.PT.packageJSON (infoType, null); -if (javajs.util.PT.isNonStringPrimitive (info)) return javajs.util.PT.packageJSON (infoType, info.toString ()); -var s = null; -var sb = null; -while (true) { -if (Clazz.instanceOf (info, String)) { -s = info; -{ -if (typeof s == "undefined") s = "null" -}if (s.indexOf ("{\"") != 0) { -s = javajs.util.PT.rep (s, "\"", "\\\""); -s = javajs.util.PT.rep (s, "\n", "\\n"); -s = "\"" + s + "\""; -}break; -}if (Clazz.instanceOf (info, javajs.api.JSONEncodable)) { -if ((s = (info).toJSON ()) == null) s = "null"; -break; -}sb = new javajs.util.SB (); -if (Clazz.instanceOf (info, java.util.Map)) { -sb.append ("{ "); -var sep = ""; -for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { -sb.append (sep).append (javajs.util.PT.packageJSON (key, javajs.util.PT.toJSON (null, (info).get (key)))); -sep = ","; -} -sb.append (" }"); -break; -}if (Clazz.instanceOf (info, javajs.util.Lst)) { -sb.append ("[ "); -var n = (info).size (); -for (var i = 0; i < n; i++) { -if (i > 0) sb.appendC (','); -sb.append (javajs.util.PT.toJSON (null, (info).get (i))); -} -sb.append (" ]"); -break; -}if (Clazz.instanceOf (info, javajs.util.M34)) { -var len = (Clazz.instanceOf (info, javajs.util.M4) ? 4 : 3); -var x = Clazz.newFloatArray (len, 0); -var m = info; -sb.appendC ('['); -for (var i = 0; i < len; i++) { -if (i > 0) sb.appendC (','); -m.getRow (i, x); -sb.append (javajs.util.PT.toJSON (null, x)); -} -sb.appendC (']'); -break; -}s = javajs.util.PT.nonArrayString (info); -if (s == null) { -sb.append ("["); -var n = javajs.util.AU.getLength (info); -for (var i = 0; i < n; i++) { -if (i > 0) sb.appendC (','); -sb.append (javajs.util.PT.toJSON (null, javajs.util.PT.arrayGet (info, i))); -} -sb.append ("]"); -break; -}info = info.toString (); -} -return javajs.util.PT.packageJSON (infoType, (s == null ? sb.toString () : s)); -}, "~S,~O"); -c$.nonArrayString = Clazz.defineMethod (c$, "nonArrayString", -function (x) { -{ -var s = x.toString(); return (s.startsWith("[object") && -s.endsWith("Array]") ? null : s); -}}, "~O"); -c$.byteArrayToJSON = Clazz.defineMethod (c$, "byteArrayToJSON", -function (data) { -var sb = new javajs.util.SB (); -sb.append ("["); -var n = data.length; -for (var i = 0; i < n; i++) { -if (i > 0) sb.appendC (','); -sb.appendI (data[i] & 0xFF); -} -sb.append ("]"); -return sb.toString (); -}, "~A"); -c$.packageJSON = Clazz.defineMethod (c$, "packageJSON", -function (infoType, info) { -return (infoType == null ? info : "\"" + infoType + "\": " + info); -}, "~S,~S"); -c$.escapeUrl = Clazz.defineMethod (c$, "escapeUrl", -function (url) { -url = javajs.util.PT.rep (url, "\n", ""); -url = javajs.util.PT.rep (url, "%", "%25"); -url = javajs.util.PT.rep (url, "#", "%23"); -url = javajs.util.PT.rep (url, "[", "%5B"); -url = javajs.util.PT.rep (url, "]", "%5D"); -url = javajs.util.PT.rep (url, " ", "%20"); -return url; -}, "~S"); -c$.esc = Clazz.defineMethod (c$, "esc", -function (str) { -if (str == null || str.length == 0) return "\"\""; -var haveEscape = false; -var i = 0; -for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) { -haveEscape = true; -break; -} -if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) { -var pt = -1; -var ch = "\\\\\tt\rr\nn\"\"".charAt (i++); -var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++); -var sb = new javajs.util.SB (); -var pt0 = 0; -while ((pt = str.indexOf (ch, pt + 1)) >= 0) { -sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2); -pt0 = pt + 1; -} -sb.append (str.substring (pt0, str.length)); -str = sb.toString (); -} -return "\"" + javajs.util.PT.escUnicode (str) + "\""; -}, "~S"); -c$.escUnicode = Clazz.defineMethod (c$, "escUnicode", -function (str) { -for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) { -var s = "0000" + Integer.toHexString (str.charCodeAt (i)); -str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1); -} -return str; -}, "~S"); -c$.escF = Clazz.defineMethod (c$, "escF", -function (f) { -var sf = "" + f; -{ -if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) -sf += ".0"; -}return sf; -}, "~N"); -c$.join = Clazz.defineMethod (c$, "join", -function (s, c, i0) { -if (s.length < i0) return null; -var sb = new javajs.util.SB (); -sb.append (s[i0++]); -for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]); - -return sb.toString (); -}, "~A,~S,~N"); -c$.isLike = Clazz.defineMethod (c$, "isLike", -function (a, b) { -var areEqual = a.equals (b); -if (areEqual) return true; -var isStart = b.startsWith ("*"); -var isEnd = b.endsWith ("*"); -return (!isStart && !isEnd) ? areEqual : isStart && isEnd ? b.length == 1 || a.contains (b.substring (1, b.length - 1)) : isStart ? a.endsWith (b.substring (1)) : a.startsWith (b.substring (0, b.length - 1)); -}, "~S,~S"); -c$.getMapValueNoCase = Clazz.defineMethod (c$, "getMapValueNoCase", -function (h, key) { -if ("this".equals (key)) return h; -var val = h.get (key); -if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue (); - -return val; -}, "java.util.Map,~S"); -c$.clean = Clazz.defineMethod (c$, "clean", -function (s) { -return javajs.util.PT.rep (javajs.util.PT.replaceAllCharacters (s, " \t\n\r", " "), " ", " ").trim (); -}, "~S"); -c$.fdup = Clazz.defineMethod (c$, "fdup", -function (f, pt, n) { -var ch; -var count = 0; -for (var i = pt; --i >= 1; ) { -if (javajs.util.PT.isDigit (ch = f.charAt (i))) continue; -switch (ch) { -case '.': -if (count++ != 0) return f; -continue; -case '-': -if (i != 1 && f.charAt (i - 1) != '.') return f; -continue; -default: -return f; -} -} -var s = f.substring (0, pt + 1); -var sb = new javajs.util.SB (); -for (var i = 0; i < n; i++) sb.append (s); - -sb.append (f.substring (pt + 1)); -return sb.toString (); -}, "~S,~N,~N"); -c$.formatString = Clazz.defineMethod (c$, "formatString", -function (strFormat, key, strT, floatT, doubleT, doOne) { -if (strFormat == null) return null; -if ("".equals (strFormat)) return ""; -var len = key.length; -if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat; -var strLabel = ""; -var ich; -var ichPercent; -var ichKey; -for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) { -if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent); -ich = ichPercent + 1; -if (ichKey > ichPercent + 6) { -strLabel += '%'; -continue; -}try { -var alignLeft = false; -if (strFormat.charAt (ich) == '-') { -alignLeft = true; -++ich; -}var zeroPad = false; -if (strFormat.charAt (ich) == '0') { -zeroPad = true; -++ich; -}var ch; -var width = 0; -while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) { -width = (10 * width) + (ch.charCodeAt (0) - 48); -++ich; -} -var precision = 2147483647; -var isExponential = false; -if (strFormat.charAt (ich) == '.') { -++ich; -if ((ch = strFormat.charAt (ich)) == '-') { -isExponential = true; -++ich; -}if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') { -precision = ch.charCodeAt (0) - 48; -++ich; -}if (isExponential) precision = -precision - (strT == null ? 1 : 0); -}var st = strFormat.substring (ich, ich + len); -if (!st.equals (key)) { -ich = ichPercent + 1; -strLabel += '%'; -continue; -}ich += len; -if (!Float.isNaN (floatT)) strLabel += javajs.util.PT.formatF (floatT, width, precision, alignLeft, zeroPad); - else if (strT != null) strLabel += javajs.util.PT.formatS (strT, width, precision, alignLeft, zeroPad); - else if (!Double.isNaN (doubleT)) strLabel += javajs.util.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true); -if (doOne) break; -} catch (ioobe) { -if (Clazz.exceptionOf (ioobe, IndexOutOfBoundsException)) { -ich = ichPercent; -break; -} else { -throw ioobe; -} -} -} -strLabel += strFormat.substring (ich); -return strLabel; -}, "~S,~S,~S,~N,~N,~B"); -c$.formatStringS = Clazz.defineMethod (c$, "formatStringS", -function (strFormat, key, strT) { -return javajs.util.PT.formatString (strFormat, key, strT, NaN, NaN, false); -}, "~S,~S,~S"); -c$.formatStringF = Clazz.defineMethod (c$, "formatStringF", -function (strFormat, key, floatT) { -return javajs.util.PT.formatString (strFormat, key, null, floatT, NaN, false); -}, "~S,~S,~N"); -c$.formatStringI = Clazz.defineMethod (c$, "formatStringI", -function (strFormat, key, intT) { -return javajs.util.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false); -}, "~S,~S,~N"); -c$.sprintf = Clazz.defineMethod (c$, "sprintf", -function (strFormat, list, values) { -if (values == null) return strFormat; -var n = list.length; -if (n == values.length) try { -for (var o = 0; o < n; o++) { -if (values[o] == null) continue; -switch (list.charAt (o)) { -case 's': -strFormat = javajs.util.PT.formatString (strFormat, "s", values[o], NaN, NaN, true); -break; -case 'f': -strFormat = javajs.util.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true); -break; -case 'i': -strFormat = javajs.util.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true); -strFormat = javajs.util.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true); -break; -case 'd': -strFormat = javajs.util.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true); -break; -case 'p': -var pVal = values[o]; -strFormat = javajs.util.PT.formatString (strFormat, "p", null, pVal.x, NaN, true); -strFormat = javajs.util.PT.formatString (strFormat, "p", null, pVal.y, NaN, true); -strFormat = javajs.util.PT.formatString (strFormat, "p", null, pVal.z, NaN, true); -break; -case 'q': -var qVal = values[o]; -strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.x, NaN, true); -strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.y, NaN, true); -strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.z, NaN, true); -strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.w, NaN, true); -break; -case 'S': -var sVal = values[o]; -for (var i = 0; i < sVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true); - -break; -case 'F': -var fVal = values[o]; -for (var i = 0; i < fVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "f", null, fVal[i], NaN, true); - -break; -case 'I': -var iVal = values[o]; -for (var i = 0; i < iVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true); - -for (var i = 0; i < iVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true); - -break; -case 'D': -var dVal = values[o]; -for (var i = 0; i < dVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "e", null, NaN, dVal[i], true); - -} -} -return javajs.util.PT.rep (strFormat, "%%", "%"); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -System.out.println ("TextFormat.sprintf error " + list + " " + strFormat); -return javajs.util.PT.rep (strFormat, "%", "?"); -}, "~S,~S,~A"); -c$.formatCheck = Clazz.defineMethod (c$, "formatCheck", -function (strFormat) { -if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat; -strFormat = javajs.util.PT.rep (strFormat, "%%", "\1"); -strFormat = javajs.util.PT.rep (strFormat, "%p", "%6.2p"); -strFormat = javajs.util.PT.rep (strFormat, "%q", "%6.2q"); -var format = javajs.util.PT.split (strFormat, "%"); -var sb = new javajs.util.SB (); -sb.append (format[0]); -for (var i = 1; i < format.length; i++) { -var f = "%" + format[i]; -var pt; -if (f.length >= 3) { -if ((pt = f.indexOf ('p')) >= 0) f = javajs.util.PT.fdup (f, pt, 3); -if ((pt = f.indexOf ('q')) >= 0) f = javajs.util.PT.fdup (f, pt, 4); -}sb.append (f); -} -return sb.toString ().$replace ('\1', '%'); -}, "~S"); -c$.leftJustify = Clazz.defineMethod (c$, "leftJustify", -function (s, s1, s2) { -s.append (s2); -var n = s1.length - s2.length; -if (n > 0) s.append (s1.substring (0, n)); -}, "javajs.util.SB,~S,~S"); -c$.rightJustify = Clazz.defineMethod (c$, "rightJustify", -function (s, s1, s2) { -var n = s1.length - s2.length; -if (n > 0) s.append (s1.substring (0, n)); -s.append (s2); -}, "javajs.util.SB,~S,~S"); -c$.safeTruncate = Clazz.defineMethod (c$, "safeTruncate", -function (f, n) { -if (f > -0.001 && f < 0.001) f = 0; -return (f + " ").substring (0, n); -}, "~N,~N"); -c$.isWild = Clazz.defineMethod (c$, "isWild", -function (s) { -return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0); -}, "~S"); -c$.isMatch = Clazz.defineMethod (c$, "isMatch", -function (search, match, checkStar, allowInitialStar) { -if (search.equals (match)) return true; -var mLen = match.length; -if (mLen == 0) return false; -var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false); -if (mLen == 1 && isStar0) return true; -var isStar1 = (checkStar && match.endsWith ("*")); -var haveQ = (match.indexOf ('?') >= 0); -if (!haveQ) { -if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1))); - else if (isStar1) return search.startsWith (match.substring (0, mLen - 1)); -}var sLen = search.length; -var qqqq = "????"; -var nq = 4; -while (nq < sLen) { -qqqq += qqqq; -nq += 4; -} -if (checkStar) { -if (isStar0) { -match = qqqq + match.substring (1); -mLen += nq - 1; -}if (isStar1) { -match = match.substring (0, mLen - 1) + qqqq; -mLen += nq - 1; -}}if (mLen < sLen) return false; -var ich = 0; -while (mLen > sLen) { -if (allowInitialStar && match.charAt (ich) == '?') { -++ich; -} else if (match.charAt (ich + mLen - 1) != '?') { -return false; -}--mLen; -} -for (var i = sLen; --i >= 0; ) { -var chm = match.charAt (ich + i); -if (chm == '?') continue; -var chs = search.charAt (i); -if (chm != chs && (chm != '\1' || chs != '?')) return false; -} -return true; -}, "~S,~S,~B,~B"); -c$.replaceQuotedStrings = Clazz.defineMethod (c$, "replaceQuotedStrings", -function (s, list, newList) { -var n = list.size (); -for (var i = 0; i < n; i++) { -var name = list.get (i); -var newName = newList.get (i); -if (!newName.equals (name)) s = javajs.util.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\""); -} -return s; -}, "~S,javajs.util.Lst,javajs.util.Lst"); -c$.replaceStrings = Clazz.defineMethod (c$, "replaceStrings", -function (s, list, newList) { -var n = list.size (); -for (var i = 0; i < n; i++) { -var name = list.get (i); -var newName = newList.get (i); -if (!newName.equals (name)) s = javajs.util.PT.rep (s, name, newName); -} -return s; -}, "~S,javajs.util.Lst,javajs.util.Lst"); -c$.isDigit = Clazz.defineMethod (c$, "isDigit", -function (ch) { -var c = (ch).charCodeAt (0); -return (48 <= c && c <= 57); -}, "~S"); -c$.isUpperCase = Clazz.defineMethod (c$, "isUpperCase", -function (ch) { -var c = (ch).charCodeAt (0); -return (65 <= c && c <= 90); -}, "~S"); -c$.isLowerCase = Clazz.defineMethod (c$, "isLowerCase", -function (ch) { -var c = (ch).charCodeAt (0); -return (97 <= c && c <= 122); -}, "~S"); -c$.isLetter = Clazz.defineMethod (c$, "isLetter", -function (ch) { -var c = (ch).charCodeAt (0); -return (65 <= c && c <= 90 || 97 <= c && c <= 122); -}, "~S"); -c$.isLetterOrDigit = Clazz.defineMethod (c$, "isLetterOrDigit", -function (ch) { -var c = (ch).charCodeAt (0); -return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); -}, "~S"); -c$.isWhitespace = Clazz.defineMethod (c$, "isWhitespace", -function (ch) { -var c = (ch).charCodeAt (0); -return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd); -}, "~S"); -c$.fixPtFloats = Clazz.defineMethod (c$, "fixPtFloats", -function (pt, f) { -pt.x = Math.round (pt.x * f) / f; -pt.y = Math.round (pt.y * f) / f; -pt.z = Math.round (pt.z * f) / f; -}, "javajs.util.T3,~N"); -c$.fixDouble = Clazz.defineMethod (c$, "fixDouble", -function (d, f) { -return Math.round (d * f) / f; -}, "~N,~N"); -c$.parseFloatFraction = Clazz.defineMethod (c$, "parseFloatFraction", -function (s) { -var pt = s.indexOf ("/"); -return (pt < 0 ? javajs.util.PT.parseFloat (s) : javajs.util.PT.parseFloat (s.substring (0, pt)) / javajs.util.PT.parseFloat (s.substring (pt + 1))); -}, "~S"); -Clazz.defineStatics (c$, -"tensScale", Clazz.newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]), -"decimalScale", Clazz.newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]), -"FLOAT_MIN_SAFE", 2E-45, -"escapable", "\\\\\tt\rr\nn\"\"", -"FRACTIONAL_PRECISION", 100000, -"CARTESIAN_PRECISION", 10000); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (null, "javajs.util.PT", ["java.lang.Boolean", "$.Double", "$.Float", "$.Number", "java.util.Map", "javajs.api.JSONEncodable", "javajs.util.AU", "$.DF", "$.Lst", "$.M34", "$.M4", "$.SB"], function () { +c$ = Clazz.declareType (javajs.util, "PT"); +c$.parseInt = Clazz.defineMethod (c$, "parseInt", +function (str) { +return javajs.util.PT.parseIntNext (str, Clazz.newIntArray (-1, [0])); +}, "~S"); +c$.parseIntNext = Clazz.defineMethod (c$, "parseIntNext", +function (str, next) { +var cch = str.length; +if (next[0] < 0 || next[0] >= cch) return -2147483648; +return javajs.util.PT.parseIntChecked (str, cch, next); +}, "~S,~A"); +c$.parseIntChecked = Clazz.defineMethod (c$, "parseIntChecked", +function (str, ichMax, next) { +var digitSeen = false; +var value = 0; +var ich = next[0]; +if (ich < 0) return -2147483648; +var ch; +while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; + +var negative = false; +if (ich < ichMax && str.charCodeAt (ich) == 45) { +negative = true; +++ich; +}while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { +value = value * 10 + (ch - 48); +digitSeen = true; +++ich; +} +if (!digitSeen) value = -2147483648; + else if (negative) value = -value; +next[0] = ich; +return value; +}, "~S,~N,~A"); +c$.isWhiteSpace = Clazz.defineMethod (c$, "isWhiteSpace", +function (str, ich) { +var ch; +return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n')); +}, "~S,~N"); +c$.parseFloatChecked = Clazz.defineMethod (c$, "parseFloatChecked", +function (str, ichMax, next, isStrict) { +var digitSeen = false; +var ich = next[0]; +if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN; +while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; + +var negative = false; +if (ich < ichMax && str.charAt (ich) == '-') { +++ich; +negative = true; +}var ch = 0; +var ival = 0; +var ival2 = 0; +while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { +ival = (ival * 10) + (ch - 48) * 1; +++ich; +digitSeen = true; +} +var isDecimal = false; +var iscale = 0; +var nzero = (ival == 0 ? -1 : 0); +if (ch == 46) { +isDecimal = true; +while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { +digitSeen = true; +if (nzero < 0) { +if (ch == 48) { +nzero--; +continue; +}nzero = -nzero; +}if (iscale < javajs.util.PT.decimalScale.length) { +ival2 = (ival2 * 10) + (ch - 48) * 1; +iscale++; +}} +}var value; +if (!digitSeen) { +value = NaN; +} else if (ival2 > 0) { +value = ival2 * javajs.util.PT.decimalScale[iscale - 1]; +if (nzero > 1) { +if (nzero - 2 < javajs.util.PT.decimalScale.length) { +value *= javajs.util.PT.decimalScale[nzero - 2]; +} else { +value *= Math.pow (10, 1 - nzero); +}} else { +value += ival; +}} else { +value = ival; +}var isExponent = false; +if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) { +isExponent = true; +if (++ich >= ichMax) return NaN; +ch = str.charCodeAt (ich); +if ((ch == 43) && (++ich >= ichMax)) return NaN; +next[0] = ich; +var exponent = javajs.util.PT.parseIntChecked (str, ichMax, next); +if (exponent == -2147483648) return NaN; +if (exponent > 0 && exponent <= javajs.util.PT.tensScale.length) value *= javajs.util.PT.tensScale[exponent - 1]; + else if (exponent < 0 && -exponent <= javajs.util.PT.decimalScale.length) value *= javajs.util.PT.decimalScale[-exponent - 1]; + else if (exponent != 0) value *= Math.pow (10, exponent); +} else { +next[0] = ich; +}if (negative) value = -value; +if (value == Infinity) value = 3.4028235E38; +return (!isStrict || (!isExponent || isDecimal) && javajs.util.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN); +}, "~S,~N,~A,~B"); +c$.checkTrailingText = Clazz.defineMethod (c$, "checkTrailingText", +function (str, ich, ichMax) { +var ch; +while (ich < ichMax && (javajs.util.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich; + +return (ich == ichMax); +}, "~S,~N,~N"); +c$.parseFloatArray = Clazz.defineMethod (c$, "parseFloatArray", +function (str) { +return javajs.util.PT.parseFloatArrayNext (str, Clazz.newIntArray (1, 0), null, null, null); +}, "~S"); +c$.parseFloatArrayInfested = Clazz.defineMethod (c$, "parseFloatArrayInfested", +function (tokens, data) { +var len = data.length; +var nTokens = tokens.length; +var n = 0; +var max = 0; +for (var i = 0; i >= 0 && i < len && n < nTokens; i++) { +var f; +while (Float.isNaN (f = javajs.util.PT.parseFloat (tokens[n++])) && n < nTokens) { +} +if (!Float.isNaN (f)) data[(max = i)] = f; +if (n == nTokens) break; +} +return max + 1; +}, "~A,~A"); +c$.parseFloatArrayNext = Clazz.defineMethod (c$, "parseFloatArrayNext", +function (str, next, f, strStart, strEnd) { +var n = 0; +var pt = next[0]; +if (pt >= 0) { +if (strStart != null) { +var p = str.indexOf (strStart, pt); +if (p >= 0) next[0] = p + strStart.length; +}str = str.substring (next[0]); +pt = (strEnd == null ? -1 : str.indexOf (strEnd)); +if (pt < 0) pt = str.length; + else str = str.substring (0, pt); +next[0] += pt + 1; +var tokens = javajs.util.PT.getTokens (str); +if (f == null) f = Clazz.newFloatArray (tokens.length, 0); +n = javajs.util.PT.parseFloatArrayInfested (tokens, f); +}if (f == null) return Clazz.newFloatArray (0, 0); +for (var i = n; i < f.length; i++) f[i] = NaN; + +return f; +}, "~S,~A,~A,~S,~S"); +c$.parseFloatRange = Clazz.defineMethod (c$, "parseFloatRange", +function (str, ichMax, next) { +var cch = str.length; +if (ichMax > cch) ichMax = cch; +if (next[0] < 0 || next[0] >= ichMax) return NaN; +return javajs.util.PT.parseFloatChecked (str, ichMax, next, false); +}, "~S,~N,~A"); +c$.parseFloatNext = Clazz.defineMethod (c$, "parseFloatNext", +function (str, next) { +var cch = (str == null ? -1 : str.length); +return (next[0] < 0 || next[0] >= cch ? NaN : javajs.util.PT.parseFloatChecked (str, cch, next, false)); +}, "~S,~A"); +c$.parseFloatStrict = Clazz.defineMethod (c$, "parseFloatStrict", +function (str) { +var cch = str.length; +if (cch == 0) return NaN; +return javajs.util.PT.parseFloatChecked (str, cch, Clazz.newIntArray (-1, [0]), true); +}, "~S"); +c$.parseFloat = Clazz.defineMethod (c$, "parseFloat", +function (str) { +return javajs.util.PT.parseFloatNext (str, Clazz.newIntArray (-1, [0])); +}, "~S"); +c$.parseIntRadix = Clazz.defineMethod (c$, "parseIntRadix", +function (s, i) { +{ +return Integer.parseIntRadix(s, i); +}}, "~S,~N"); +c$.getTokens = Clazz.defineMethod (c$, "getTokens", +function (line) { +return javajs.util.PT.getTokensAt (line, 0); +}, "~S"); +c$.parseToken = Clazz.defineMethod (c$, "parseToken", +function (str) { +return javajs.util.PT.parseTokenNext (str, Clazz.newIntArray (-1, [0])); +}, "~S"); +c$.parseTrimmed = Clazz.defineMethod (c$, "parseTrimmed", +function (str) { +return javajs.util.PT.parseTrimmedRange (str, 0, str.length); +}, "~S"); +c$.parseTrimmedAt = Clazz.defineMethod (c$, "parseTrimmedAt", +function (str, ichStart) { +return javajs.util.PT.parseTrimmedRange (str, ichStart, str.length); +}, "~S,~N"); +c$.parseTrimmedRange = Clazz.defineMethod (c$, "parseTrimmedRange", +function (str, ichStart, ichMax) { +var cch = str.length; +if (ichMax < cch) cch = ichMax; +if (cch < ichStart) return ""; +return javajs.util.PT.parseTrimmedChecked (str, ichStart, cch); +}, "~S,~N,~N"); +c$.getTokensAt = Clazz.defineMethod (c$, "getTokensAt", +function (line, ich) { +if (line == null) return null; +var cchLine = line.length; +if (ich < 0 || ich > cchLine) return null; +var tokenCount = javajs.util.PT.countTokens (line, ich); +var tokens = new Array (tokenCount); +var next = Clazz.newIntArray (1, 0); +next[0] = ich; +for (var i = 0; i < tokenCount; ++i) tokens[i] = javajs.util.PT.parseTokenChecked (line, cchLine, next); + +return tokens; +}, "~S,~N"); +c$.countChar = Clazz.defineMethod (c$, "countChar", +function (line, c) { +var tokenCount = 0; +var pt = -1; +while ((pt = line.indexOf (c, pt + 1)) >= 0) tokenCount++; + +return tokenCount; +}, "~S,~S"); +c$.countTokens = Clazz.defineMethod (c$, "countTokens", +function (line, ich) { +var tokenCount = 0; +if (line != null) { +var ichMax = line.length; +while (true) { +while (ich < ichMax && javajs.util.PT.isWhiteSpace (line, ich)) ++ich; + +if (ich == ichMax) break; +++tokenCount; +do { +++ich; +} while (ich < ichMax && !javajs.util.PT.isWhiteSpace (line, ich)); +} +}return tokenCount; +}, "~S,~N"); +c$.parseTokenNext = Clazz.defineMethod (c$, "parseTokenNext", +function (str, next) { +var cch = str.length; +return (next[0] < 0 || next[0] >= cch ? null : javajs.util.PT.parseTokenChecked (str, cch, next)); +}, "~S,~A"); +c$.parseTokenRange = Clazz.defineMethod (c$, "parseTokenRange", +function (str, ichMax, next) { +var cch = str.length; +if (ichMax > cch) ichMax = cch; +return (next[0] < 0 || next[0] >= ichMax ? null : javajs.util.PT.parseTokenChecked (str, ichMax, next)); +}, "~S,~N,~A"); +c$.parseTokenChecked = Clazz.defineMethod (c$, "parseTokenChecked", +function (str, ichMax, next) { +var ich = next[0]; +while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; + +var ichNonWhite = ich; +while (ich < ichMax && !javajs.util.PT.isWhiteSpace (str, ich)) ++ich; + +next[0] = ich; +return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich)); +}, "~S,~N,~A"); +c$.parseTrimmedChecked = Clazz.defineMethod (c$, "parseTrimmedChecked", +function (str, ich, ichMax) { +while (ich < ichMax && javajs.util.PT.isWhiteSpace (str, ich)) ++ich; + +var ichLast = ichMax - 1; +while (ichLast >= ich && javajs.util.PT.isWhiteSpace (str, ichLast)) --ichLast; + +return (ichLast < ich ? "" : str.substring (ich, ichLast + 1)); +}, "~S,~N,~N"); +c$.dVal = Clazz.defineMethod (c$, "dVal", +function (s) { +{ +if(s==null) +throw new NumberFormatException("null"); +var d=parseFloat(s); +if(isNaN(d)) +throw new NumberFormatException("Not a Number : "+s); +return d +}}, "~S"); +c$.fVal = Clazz.defineMethod (c$, "fVal", +function (s) { +{ +return this.dVal(s); +}}, "~S"); +c$.parseIntRange = Clazz.defineMethod (c$, "parseIntRange", +function (str, ichMax, next) { +var cch = str.length; +if (ichMax > cch) ichMax = cch; +return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : javajs.util.PT.parseIntChecked (str, ichMax, next)); +}, "~S,~N,~A"); +c$.parseFloatArrayData = Clazz.defineMethod (c$, "parseFloatArrayData", +function (tokens, data) { +javajs.util.PT.parseFloatArrayDataN (tokens, data, data.length); +}, "~A,~A"); +c$.parseFloatArrayDataN = Clazz.defineMethod (c$, "parseFloatArrayDataN", +function (tokens, data, nData) { +for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : javajs.util.PT.parseFloat (tokens[i])); + +}, "~A,~A,~N"); +c$.split = Clazz.defineMethod (c$, "split", +function (text, run) { +if (text.length == 0) return new Array (0); +var n = 1; +var i = text.indexOf (run); +var lines; +var runLen = run.length; +if (i < 0 || runLen == 0) { +lines = new Array (1); +lines[0] = text; +return lines; +}var len = text.length - runLen; +for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen); + +lines = new Array (n); +i = 0; +var ipt = 0; +var pt = 0; +for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) { +lines[pt++] = text.substring (i, ipt); +i = ipt + runLen; +} +if (text.indexOf (run, len) != len) len += runLen; +lines[pt] = text.substring (i, len); +return lines; +}, "~S,~S"); +c$.getQuotedStringAt = Clazz.defineMethod (c$, "getQuotedStringAt", +function (line, ipt0) { +var next = Clazz.newIntArray (-1, [ipt0]); +return javajs.util.PT.getQuotedStringNext (line, next); +}, "~S,~N"); +c$.getQuotedStringNext = Clazz.defineMethod (c$, "getQuotedStringNext", +function (line, next) { +var i = next[0]; +if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return ""; +var pt = i + 1; +var len = line.length; +while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++; + +next[0] = i + 1; +return line.substring (pt, i); +}, "~S,~A"); +c$.getCSVString = Clazz.defineMethod (c$, "getCSVString", +function (line, next) { +var i = next[1]; +if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null; +var pt = next[0] = i; +var len = line.length; +var escaped = false; +var haveEscape = false; +while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) { +escaped = false; +haveEscape = true; +i++; +} +if (i >= len) { +next[1] = -1; +return null; +}next[1] = i + 1; +var s = line.substring (pt + 1, i); +return (haveEscape ? javajs.util.PT.rep (javajs.util.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s); +}, "~S,~A"); +c$.isOneOf = Clazz.defineMethod (c$, "isOneOf", +function (key, semiList) { +if (semiList.length == 0) return false; +if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";"; +return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0; +}, "~S,~S"); +c$.getQuotedAttribute = Clazz.defineMethod (c$, "getQuotedAttribute", +function (info, name) { +var i = info.indexOf (name + "="); +return (i < 0 ? null : javajs.util.PT.getQuotedStringAt (info, i)); +}, "~S,~S"); +c$.approx = Clazz.defineMethod (c$, "approx", +function (f, n) { +return Math.round (f * n) / n; +}, "~N,~N"); +c$.rep = Clazz.defineMethod (c$, "rep", +function (str, strFrom, strTo) { +if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str; +var isOnce = (strTo.indexOf (strFrom) >= 0); +do { +str = str.$replace (strFrom, strTo); +} while (!isOnce && str.indexOf (strFrom) >= 0); +return str; +}, "~S,~S,~S"); +c$.formatF = Clazz.defineMethod (c$, "formatF", +function (value, width, precision, alignLeft, zeroPad) { +return javajs.util.PT.formatS (javajs.util.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad); +}, "~N,~N,~N,~B,~B"); +c$.formatD = Clazz.defineMethod (c$, "formatD", +function (value, width, precision, alignLeft, zeroPad, allowOverflow) { +return javajs.util.PT.formatS (javajs.util.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad); +}, "~N,~N,~N,~B,~B,~B"); +c$.formatS = Clazz.defineMethod (c$, "formatS", +function (value, width, precision, alignLeft, zeroPad) { +if (value == null) return ""; +var len = value.length; +if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision); + else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1); +var padLength = width - value.length; +if (padLength <= 0) return value; +var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-'); +var padChar = (zeroPad ? '0' : ' '); +var padChar0 = (isNeg ? '-' : padChar); +var sb = new javajs.util.SB (); +if (alignLeft) sb.append (value); +sb.appendC (padChar0); +for (var i = padLength; --i > 0; ) sb.appendC (padChar); + +if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value); +return sb.toString (); +}, "~S,~N,~N,~B,~B"); +c$.replaceWithCharacter = Clazz.defineMethod (c$, "replaceWithCharacter", +function (str, strFrom, chTo) { +if (str == null) return null; +for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo); + +return str; +}, "~S,~S,~S"); +c$.replaceAllCharacters = Clazz.defineMethod (c$, "replaceAllCharacters", +function (str, strFrom, strTo) { +for (var i = strFrom.length; --i >= 0; ) { +var chFrom = strFrom.substring (i, i + 1); +str = javajs.util.PT.rep (str, chFrom, strTo); +} +return str; +}, "~S,~S,~S"); +c$.trim = Clazz.defineMethod (c$, "trim", +function (str, chars) { +if (str == null || str.length == 0) return str; +if (chars.length == 0) return str.trim (); +var len = str.length; +var k = 0; +while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++; + +var m = str.length - 1; +while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--; + +return str.substring (k, m + 1); +}, "~S,~S"); +c$.trimQuotes = Clazz.defineMethod (c$, "trimQuotes", +function (value) { +return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value); +}, "~S"); +c$.isNonStringPrimitive = Clazz.defineMethod (c$, "isNonStringPrimitive", +function (info) { +return Clazz.instanceOf (info, Number) || Clazz.instanceOf (info, Boolean); +}, "~O"); +c$.arrayGet = Clazz.defineMethod (c$, "arrayGet", +($fz = function (info, i) { +{ +return info[i]; +}}, $fz.isPrivate = true, $fz), "~O,~N"); +c$.toJSON = Clazz.defineMethod (c$, "toJSON", +function (infoType, info) { +if (info == null) return javajs.util.PT.packageJSON (infoType, null); +if (javajs.util.PT.isNonStringPrimitive (info)) return javajs.util.PT.packageJSON (infoType, info.toString ()); +var s = null; +var sb = null; +while (true) { +if (Clazz.instanceOf (info, String)) { +s = info; +{ +if (typeof s == "undefined") s = "null" +}if (s.indexOf ("{\"") != 0) { +s = javajs.util.PT.rep (s, "\"", "\\\""); +s = javajs.util.PT.rep (s, "\n", "\\n"); +s = "\"" + s + "\""; +}break; +}if (Clazz.instanceOf (info, javajs.api.JSONEncodable)) { +if ((s = (info).toJSON ()) == null) s = "null"; +break; +}sb = new javajs.util.SB (); +if (Clazz.instanceOf (info, java.util.Map)) { +sb.append ("{ "); +var sep = ""; +for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { +sb.append (sep).append (javajs.util.PT.packageJSON (key, javajs.util.PT.toJSON (null, (info).get (key)))); +sep = ","; +} +sb.append (" }"); +break; +}if (Clazz.instanceOf (info, javajs.util.Lst)) { +sb.append ("[ "); +var n = (info).size (); +for (var i = 0; i < n; i++) { +if (i > 0) sb.appendC (','); +sb.append (javajs.util.PT.toJSON (null, (info).get (i))); +} +sb.append (" ]"); +break; +}if (Clazz.instanceOf (info, javajs.util.M34)) { +var len = (Clazz.instanceOf (info, javajs.util.M4) ? 4 : 3); +var x = Clazz.newFloatArray (len, 0); +var m = info; +sb.appendC ('['); +for (var i = 0; i < len; i++) { +if (i > 0) sb.appendC (','); +m.getRow (i, x); +sb.append (javajs.util.PT.toJSON (null, x)); +} +sb.appendC (']'); +break; +}s = javajs.util.PT.nonArrayString (info); +if (s == null) { +sb.append ("["); +var n = javajs.util.AU.getLength (info); +for (var i = 0; i < n; i++) { +if (i > 0) sb.appendC (','); +sb.append (javajs.util.PT.toJSON (null, javajs.util.PT.arrayGet (info, i))); +} +sb.append ("]"); +break; +}info = info.toString (); +} +return javajs.util.PT.packageJSON (infoType, (s == null ? sb.toString () : s)); +}, "~S,~O"); +c$.nonArrayString = Clazz.defineMethod (c$, "nonArrayString", +function (x) { +{ +var s = x.toString(); return (s.startsWith("[object") && +s.endsWith("Array]") ? null : s); +}}, "~O"); +c$.byteArrayToJSON = Clazz.defineMethod (c$, "byteArrayToJSON", +function (data) { +var sb = new javajs.util.SB (); +sb.append ("["); +var n = data.length; +for (var i = 0; i < n; i++) { +if (i > 0) sb.appendC (','); +sb.appendI (data[i] & 0xFF); +} +sb.append ("]"); +return sb.toString (); +}, "~A"); +c$.packageJSON = Clazz.defineMethod (c$, "packageJSON", +function (infoType, info) { +return (infoType == null ? info : "\"" + infoType + "\": " + info); +}, "~S,~S"); +c$.escapeUrl = Clazz.defineMethod (c$, "escapeUrl", +function (url) { +url = javajs.util.PT.rep (url, "\n", ""); +url = javajs.util.PT.rep (url, "%", "%25"); +url = javajs.util.PT.rep (url, "#", "%23"); +url = javajs.util.PT.rep (url, "[", "%5B"); +url = javajs.util.PT.rep (url, "]", "%5D"); +url = javajs.util.PT.rep (url, " ", "%20"); +return url; +}, "~S"); +c$.esc = Clazz.defineMethod (c$, "esc", +function (str) { +if (str == null || str.length == 0) return "\"\""; +var haveEscape = false; +var i = 0; +for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) { +haveEscape = true; +break; +} +if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) { +var pt = -1; +var ch = "\\\\\tt\rr\nn\"\"".charAt (i++); +var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++); +var sb = new javajs.util.SB (); +var pt0 = 0; +while ((pt = str.indexOf (ch, pt + 1)) >= 0) { +sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2); +pt0 = pt + 1; +} +sb.append (str.substring (pt0, str.length)); +str = sb.toString (); +} +return "\"" + javajs.util.PT.escUnicode (str) + "\""; +}, "~S"); +c$.escUnicode = Clazz.defineMethod (c$, "escUnicode", +function (str) { +for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) { +var s = "0000" + Integer.toHexString (str.charCodeAt (i)); +str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1); +} +return str; +}, "~S"); +c$.escF = Clazz.defineMethod (c$, "escF", +function (f) { +var sf = "" + f; +{ +if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) +sf += ".0"; +}return sf; +}, "~N"); +c$.join = Clazz.defineMethod (c$, "join", +function (s, c, i0) { +if (s.length < i0) return null; +var sb = new javajs.util.SB (); +sb.append (s[i0++]); +for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]); + +return sb.toString (); +}, "~A,~S,~N"); +c$.isLike = Clazz.defineMethod (c$, "isLike", +function (a, b) { +var areEqual = a.equals (b); +if (areEqual) return true; +var isStart = b.startsWith ("*"); +var isEnd = b.endsWith ("*"); +return (!isStart && !isEnd) ? areEqual : isStart && isEnd ? b.length == 1 || a.contains (b.substring (1, b.length - 1)) : isStart ? a.endsWith (b.substring (1)) : a.startsWith (b.substring (0, b.length - 1)); +}, "~S,~S"); +c$.getMapValueNoCase = Clazz.defineMethod (c$, "getMapValueNoCase", +function (h, key) { +if ("this".equals (key)) return h; +var val = h.get (key); +if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue (); + +return val; +}, "java.util.Map,~S"); +c$.clean = Clazz.defineMethod (c$, "clean", +function (s) { +return javajs.util.PT.rep (javajs.util.PT.replaceAllCharacters (s, " \t\n\r", " "), " ", " ").trim (); +}, "~S"); +c$.fdup = Clazz.defineMethod (c$, "fdup", +function (f, pt, n) { +var ch; +var count = 0; +for (var i = pt; --i >= 1; ) { +if (javajs.util.PT.isDigit (ch = f.charAt (i))) continue; +switch (ch) { +case '.': +if (count++ != 0) return f; +continue; +case '-': +if (i != 1 && f.charAt (i - 1) != '.') return f; +continue; +default: +return f; +} +} +var s = f.substring (0, pt + 1); +var sb = new javajs.util.SB (); +for (var i = 0; i < n; i++) sb.append (s); + +sb.append (f.substring (pt + 1)); +return sb.toString (); +}, "~S,~N,~N"); +c$.formatString = Clazz.defineMethod (c$, "formatString", +function (strFormat, key, strT, floatT, doubleT, doOne) { +if (strFormat == null) return null; +if ("".equals (strFormat)) return ""; +var len = key.length; +if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat; +var strLabel = ""; +var ich; +var ichPercent; +var ichKey; +for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) { +if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent); +ich = ichPercent + 1; +if (ichKey > ichPercent + 6) { +strLabel += '%'; +continue; +}try { +var alignLeft = false; +if (strFormat.charAt (ich) == '-') { +alignLeft = true; +++ich; +}var zeroPad = false; +if (strFormat.charAt (ich) == '0') { +zeroPad = true; +++ich; +}var ch; +var width = 0; +while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) { +width = (10 * width) + (ch.charCodeAt (0) - 48); +++ich; +} +var precision = 2147483647; +var isExponential = false; +if (strFormat.charAt (ich) == '.') { +++ich; +if ((ch = strFormat.charAt (ich)) == '-') { +isExponential = true; +++ich; +}if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') { +precision = ch.charCodeAt (0) - 48; +++ich; +}if (isExponential) precision = -precision - (strT == null ? 1 : 0); +}var st = strFormat.substring (ich, ich + len); +if (!st.equals (key)) { +ich = ichPercent + 1; +strLabel += '%'; +continue; +}ich += len; +if (!Float.isNaN (floatT)) strLabel += javajs.util.PT.formatF (floatT, width, precision, alignLeft, zeroPad); + else if (strT != null) strLabel += javajs.util.PT.formatS (strT, width, precision, alignLeft, zeroPad); + else if (!Double.isNaN (doubleT)) strLabel += javajs.util.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true); +if (doOne) break; +} catch (ioobe) { +if (Clazz.exceptionOf (ioobe, IndexOutOfBoundsException)) { +ich = ichPercent; +break; +} else { +throw ioobe; +} +} +} +strLabel += strFormat.substring (ich); +return strLabel; +}, "~S,~S,~S,~N,~N,~B"); +c$.formatStringS = Clazz.defineMethod (c$, "formatStringS", +function (strFormat, key, strT) { +return javajs.util.PT.formatString (strFormat, key, strT, NaN, NaN, false); +}, "~S,~S,~S"); +c$.formatStringF = Clazz.defineMethod (c$, "formatStringF", +function (strFormat, key, floatT) { +return javajs.util.PT.formatString (strFormat, key, null, floatT, NaN, false); +}, "~S,~S,~N"); +c$.formatStringI = Clazz.defineMethod (c$, "formatStringI", +function (strFormat, key, intT) { +return javajs.util.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false); +}, "~S,~S,~N"); +c$.sprintf = Clazz.defineMethod (c$, "sprintf", +function (strFormat, list, values) { +if (values == null) return strFormat; +var n = list.length; +if (n == values.length) try { +for (var o = 0; o < n; o++) { +if (values[o] == null) continue; +switch (list.charAt (o)) { +case 's': +strFormat = javajs.util.PT.formatString (strFormat, "s", values[o], NaN, NaN, true); +break; +case 'f': +strFormat = javajs.util.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true); +break; +case 'i': +strFormat = javajs.util.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true); +strFormat = javajs.util.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true); +break; +case 'd': +strFormat = javajs.util.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true); +break; +case 'p': +var pVal = values[o]; +strFormat = javajs.util.PT.formatString (strFormat, "p", null, pVal.x, NaN, true); +strFormat = javajs.util.PT.formatString (strFormat, "p", null, pVal.y, NaN, true); +strFormat = javajs.util.PT.formatString (strFormat, "p", null, pVal.z, NaN, true); +break; +case 'q': +var qVal = values[o]; +strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.x, NaN, true); +strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.y, NaN, true); +strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.z, NaN, true); +strFormat = javajs.util.PT.formatString (strFormat, "q", null, qVal.w, NaN, true); +break; +case 'S': +var sVal = values[o]; +for (var i = 0; i < sVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true); + +break; +case 'F': +var fVal = values[o]; +for (var i = 0; i < fVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "f", null, fVal[i], NaN, true); + +break; +case 'I': +var iVal = values[o]; +for (var i = 0; i < iVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true); + +for (var i = 0; i < iVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true); + +break; +case 'D': +var dVal = values[o]; +for (var i = 0; i < dVal.length; i++) strFormat = javajs.util.PT.formatString (strFormat, "e", null, NaN, dVal[i], true); + +} +} +return javajs.util.PT.rep (strFormat, "%%", "%"); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +System.out.println ("TextFormat.sprintf error " + list + " " + strFormat); +return javajs.util.PT.rep (strFormat, "%", "?"); +}, "~S,~S,~A"); +c$.formatCheck = Clazz.defineMethod (c$, "formatCheck", +function (strFormat) { +if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat; +strFormat = javajs.util.PT.rep (strFormat, "%%", "\1"); +strFormat = javajs.util.PT.rep (strFormat, "%p", "%6.2p"); +strFormat = javajs.util.PT.rep (strFormat, "%q", "%6.2q"); +var format = javajs.util.PT.split (strFormat, "%"); +var sb = new javajs.util.SB (); +sb.append (format[0]); +for (var i = 1; i < format.length; i++) { +var f = "%" + format[i]; +var pt; +if (f.length >= 3) { +if ((pt = f.indexOf ('p')) >= 0) f = javajs.util.PT.fdup (f, pt, 3); +if ((pt = f.indexOf ('q')) >= 0) f = javajs.util.PT.fdup (f, pt, 4); +}sb.append (f); +} +return sb.toString ().$replace ('\1', '%'); +}, "~S"); +c$.leftJustify = Clazz.defineMethod (c$, "leftJustify", +function (s, s1, s2) { +s.append (s2); +var n = s1.length - s2.length; +if (n > 0) s.append (s1.substring (0, n)); +}, "javajs.util.SB,~S,~S"); +c$.rightJustify = Clazz.defineMethod (c$, "rightJustify", +function (s, s1, s2) { +var n = s1.length - s2.length; +if (n > 0) s.append (s1.substring (0, n)); +s.append (s2); +}, "javajs.util.SB,~S,~S"); +c$.safeTruncate = Clazz.defineMethod (c$, "safeTruncate", +function (f, n) { +if (f > -0.001 && f < 0.001) f = 0; +return (f + " ").substring (0, n); +}, "~N,~N"); +c$.isWild = Clazz.defineMethod (c$, "isWild", +function (s) { +return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0); +}, "~S"); +c$.isMatch = Clazz.defineMethod (c$, "isMatch", +function (search, match, checkStar, allowInitialStar) { +if (search.equals (match)) return true; +var mLen = match.length; +if (mLen == 0) return false; +var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false); +if (mLen == 1 && isStar0) return true; +var isStar1 = (checkStar && match.endsWith ("*")); +var haveQ = (match.indexOf ('?') >= 0); +if (!haveQ) { +if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1))); + else if (isStar1) return search.startsWith (match.substring (0, mLen - 1)); +}var sLen = search.length; +var qqqq = "????"; +var nq = 4; +while (nq < sLen) { +qqqq += qqqq; +nq += 4; +} +if (checkStar) { +if (isStar0) { +match = qqqq + match.substring (1); +mLen += nq - 1; +}if (isStar1) { +match = match.substring (0, mLen - 1) + qqqq; +mLen += nq - 1; +}}if (mLen < sLen) return false; +var ich = 0; +while (mLen > sLen) { +if (allowInitialStar && match.charAt (ich) == '?') { +++ich; +} else if (match.charAt (ich + mLen - 1) != '?') { +return false; +}--mLen; +} +for (var i = sLen; --i >= 0; ) { +var chm = match.charAt (ich + i); +if (chm == '?') continue; +var chs = search.charAt (i); +if (chm != chs && (chm != '\1' || chs != '?')) return false; +} +return true; +}, "~S,~S,~B,~B"); +c$.replaceQuotedStrings = Clazz.defineMethod (c$, "replaceQuotedStrings", +function (s, list, newList) { +var n = list.size (); +for (var i = 0; i < n; i++) { +var name = list.get (i); +var newName = newList.get (i); +if (!newName.equals (name)) s = javajs.util.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\""); +} +return s; +}, "~S,javajs.util.Lst,javajs.util.Lst"); +c$.replaceStrings = Clazz.defineMethod (c$, "replaceStrings", +function (s, list, newList) { +var n = list.size (); +for (var i = 0; i < n; i++) { +var name = list.get (i); +var newName = newList.get (i); +if (!newName.equals (name)) s = javajs.util.PT.rep (s, name, newName); +} +return s; +}, "~S,javajs.util.Lst,javajs.util.Lst"); +c$.isDigit = Clazz.defineMethod (c$, "isDigit", +function (ch) { +var c = (ch).charCodeAt (0); +return (48 <= c && c <= 57); +}, "~S"); +c$.isUpperCase = Clazz.defineMethod (c$, "isUpperCase", +function (ch) { +var c = (ch).charCodeAt (0); +return (65 <= c && c <= 90); +}, "~S"); +c$.isLowerCase = Clazz.defineMethod (c$, "isLowerCase", +function (ch) { +var c = (ch).charCodeAt (0); +return (97 <= c && c <= 122); +}, "~S"); +c$.isLetter = Clazz.defineMethod (c$, "isLetter", +function (ch) { +var c = (ch).charCodeAt (0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122); +}, "~S"); +c$.isLetterOrDigit = Clazz.defineMethod (c$, "isLetterOrDigit", +function (ch) { +var c = (ch).charCodeAt (0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); +}, "~S"); +c$.isWhitespace = Clazz.defineMethod (c$, "isWhitespace", +function (ch) { +var c = (ch).charCodeAt (0); +return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd); +}, "~S"); +c$.fixPtFloats = Clazz.defineMethod (c$, "fixPtFloats", +function (pt, f) { +pt.x = Math.round (pt.x * f) / f; +pt.y = Math.round (pt.y * f) / f; +pt.z = Math.round (pt.z * f) / f; +}, "javajs.util.T3,~N"); +c$.fixDouble = Clazz.defineMethod (c$, "fixDouble", +function (d, f) { +return Math.round (d * f) / f; +}, "~N,~N"); +c$.parseFloatFraction = Clazz.defineMethod (c$, "parseFloatFraction", +function (s) { +var pt = s.indexOf ("/"); +return (pt < 0 ? javajs.util.PT.parseFloat (s) : javajs.util.PT.parseFloat (s.substring (0, pt)) / javajs.util.PT.parseFloat (s.substring (pt + 1))); +}, "~S"); +Clazz.defineStatics (c$, +"tensScale", Clazz.newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]), +"decimalScale", Clazz.newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]), +"FLOAT_MIN_SAFE", 2E-45, +"escapable", "\\\\\tt\rr\nn\"\"", +"FRACTIONAL_PRECISION", 100000, +"CARTESIAN_PRECISION", 10000); +}); diff --git a/bin/javajs/util/Quat.js b/bin/javajs/util/Quat.js index 0db2469..bfc5444 100644 --- a/bin/javajs/util/Quat.js +++ b/bin/javajs/util/Quat.js @@ -1,427 +1,427 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.P4"], "javajs.util.Quat", ["java.lang.Float", "javajs.util.A4", "$.M3", "$.V3"], function () { -c$ = Clazz.decorateAsClass (function () { -this.q0 = 0; -this.q1 = 0; -this.q2 = 0; -this.q3 = 0; -this.mat = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "Quat"); -Clazz.makeConstructor (c$, -function () { -this.q0 = 1; -}); -c$.newQ = Clazz.defineMethod (c$, "newQ", -function (q) { -var q1 = new javajs.util.Quat (); -q1.set (q); -return q1; -}, "javajs.util.Quat"); -c$.newVA = Clazz.defineMethod (c$, "newVA", -function (v, theta) { -var q = new javajs.util.Quat (); -q.setTA (v, theta); -return q; -}, "javajs.util.T3,~N"); -c$.newM = Clazz.defineMethod (c$, "newM", -function (mat) { -var q = new javajs.util.Quat (); -q.setM (javajs.util.M3.newM3 (mat)); -return q; -}, "javajs.util.M3"); -c$.newAA = Clazz.defineMethod (c$, "newAA", -function (a) { -var q = new javajs.util.Quat (); -q.setAA (a); -return q; -}, "javajs.util.A4"); -c$.newP4 = Clazz.defineMethod (c$, "newP4", -function (pt) { -var q = new javajs.util.Quat (); -q.setP4 (pt); -return q; -}, "javajs.util.P4"); -c$.new4 = Clazz.defineMethod (c$, "new4", -function (q1, q2, q3, q0) { -var q = new javajs.util.Quat (); -if (q0 < -1) { -q.q0 = -1; -return q; -}if (q0 > 1) { -q.q0 = 1; -return q; -}q.q0 = q0; -q.q1 = q1; -q.q2 = q2; -q.q3 = q3; -return q; -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "set", -function (q) { -this.q0 = q.q0; -this.q1 = q.q1; -this.q2 = q.q2; -this.q3 = q.q3; -}, "javajs.util.Quat"); -Clazz.defineMethod (c$, "setP4", -($fz = function (pt) { -var factor = (pt == null ? 0 : pt.distance4 (javajs.util.Quat.qZero)); -if (factor == 0) { -this.q0 = 1; -return; -}this.q0 = pt.w / factor; -this.q1 = pt.x / factor; -this.q2 = pt.y / factor; -this.q3 = pt.z / factor; -}, $fz.isPrivate = true, $fz), "javajs.util.P4"); -Clazz.defineMethod (c$, "setTA", -function (pt, theta) { -if (pt.x == 0 && pt.y == 0 && pt.z == 0) { -this.q0 = 1; -return; -}var fact = (Math.sin (theta / 2 * 0.017453292519943295) / Math.sqrt (pt.x * pt.x + pt.y * pt.y + pt.z * pt.z)); -this.q0 = (Math.cos (theta / 2 * 0.017453292519943295)); -this.q1 = (pt.x * fact); -this.q2 = (pt.y * fact); -this.q3 = (pt.z * fact); -}, "javajs.util.T3,~N"); -Clazz.defineMethod (c$, "setAA", -function (a) { -var aa = javajs.util.A4.newAA (a); -if (aa.angle == 0) aa.y = 1; -this.setM ( new javajs.util.M3 ().setAA (aa)); -}, "javajs.util.A4"); -Clazz.defineMethod (c$, "setM", -($fz = function (mat) { -this.mat = mat; -var trace = mat.m00 + mat.m11 + mat.m22; -var temp; -var w; -var x; -var y; -var z; -if (trace >= 0.5) { -w = Math.sqrt (1.0 + trace); -x = (mat.m21 - mat.m12) / w; -y = (mat.m02 - mat.m20) / w; -z = (mat.m10 - mat.m01) / w; -} else if ((temp = mat.m00 + mat.m00 - trace) >= 0.5) { -x = Math.sqrt (1.0 + temp); -w = (mat.m21 - mat.m12) / x; -y = (mat.m10 + mat.m01) / x; -z = (mat.m20 + mat.m02) / x; -} else if ((temp = mat.m11 + mat.m11 - trace) >= 0.5 || mat.m11 > mat.m22) { -y = Math.sqrt (1.0 + temp); -w = (mat.m02 - mat.m20) / y; -x = (mat.m10 + mat.m01) / y; -z = (mat.m21 + mat.m12) / y; -} else { -z = Math.sqrt (1.0 + mat.m22 + mat.m22 - trace); -w = (mat.m10 - mat.m01) / z; -x = (mat.m20 + mat.m02) / z; -y = (mat.m21 + mat.m12) / z; -}this.q0 = (w * 0.5); -this.q1 = (x * 0.5); -this.q2 = (y * 0.5); -this.q3 = (z * 0.5); -}, $fz.isPrivate = true, $fz), "javajs.util.M3"); -Clazz.defineMethod (c$, "setRef", -function (qref) { -if (qref == null) { -this.mul (this.getFixFactor ()); -return; -}if (this.dot (qref) >= 0) return; -this.q0 *= -1; -this.q1 *= -1; -this.q2 *= -1; -this.q3 *= -1; -}, "javajs.util.Quat"); -c$.getQuaternionFrame = Clazz.defineMethod (c$, "getQuaternionFrame", -function (center, x, xy) { -var vA = javajs.util.V3.newV (x); -var vB = javajs.util.V3.newV (xy); -if (center != null) { -vA.sub (center); -vB.sub (center); -}return javajs.util.Quat.getQuaternionFrameV (vA, vB, null, false); -}, "javajs.util.P3,javajs.util.T3,javajs.util.T3"); -c$.getQuaternionFrameV = Clazz.defineMethod (c$, "getQuaternionFrameV", -function (vA, vB, vC, yBased) { -if (vC == null) { -vC = new javajs.util.V3 (); -vC.cross (vA, vB); -if (yBased) vA.cross (vB, vC); -}var vBprime = new javajs.util.V3 (); -vBprime.cross (vC, vA); -vA.normalize (); -vBprime.normalize (); -vC.normalize (); -var mat = new javajs.util.M3 (); -mat.setColumnV (0, vA); -mat.setColumnV (1, vBprime); -mat.setColumnV (2, vC); -var q = javajs.util.Quat.newM (mat); -return q; -}, "javajs.util.V3,javajs.util.V3,javajs.util.V3,~B"); -Clazz.defineMethod (c$, "getMatrix", -function () { -if (this.mat == null) this.setMatrix (); -return this.mat; -}); -Clazz.defineMethod (c$, "setMatrix", -($fz = function () { -this.mat = new javajs.util.M3 (); -this.mat.m00 = this.q0 * this.q0 + this.q1 * this.q1 - this.q2 * this.q2 - this.q3 * this.q3; -this.mat.m01 = 2 * this.q1 * this.q2 - 2 * this.q0 * this.q3; -this.mat.m02 = 2 * this.q1 * this.q3 + 2 * this.q0 * this.q2; -this.mat.m10 = 2 * this.q1 * this.q2 + 2 * this.q0 * this.q3; -this.mat.m11 = this.q0 * this.q0 - this.q1 * this.q1 + this.q2 * this.q2 - this.q3 * this.q3; -this.mat.m12 = 2 * this.q2 * this.q3 - 2 * this.q0 * this.q1; -this.mat.m20 = 2 * this.q1 * this.q3 - 2 * this.q0 * this.q2; -this.mat.m21 = 2 * this.q2 * this.q3 + 2 * this.q0 * this.q1; -this.mat.m22 = this.q0 * this.q0 - this.q1 * this.q1 - this.q2 * this.q2 + this.q3 * this.q3; -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "add", -function (x) { -return javajs.util.Quat.newVA (this.getNormal (), this.getTheta () + x); -}, "~N"); -Clazz.defineMethod (c$, "mul", -function (x) { -return (x == 1 ? javajs.util.Quat.new4 (this.q1, this.q2, this.q3, this.q0) : javajs.util.Quat.newVA (this.getNormal (), this.getTheta () * x)); -}, "~N"); -Clazz.defineMethod (c$, "mulQ", -function (p) { -return javajs.util.Quat.new4 (this.q0 * p.q1 + this.q1 * p.q0 + this.q2 * p.q3 - this.q3 * p.q2, this.q0 * p.q2 + this.q2 * p.q0 + this.q3 * p.q1 - this.q1 * p.q3, this.q0 * p.q3 + this.q3 * p.q0 + this.q1 * p.q2 - this.q2 * p.q1, this.q0 * p.q0 - this.q1 * p.q1 - this.q2 * p.q2 - this.q3 * p.q3); -}, "javajs.util.Quat"); -Clazz.defineMethod (c$, "div", -function (p) { -return this.mulQ (p.inv ()); -}, "javajs.util.Quat"); -Clazz.defineMethod (c$, "divLeft", -function (p) { -return this.inv ().mulQ (p); -}, "javajs.util.Quat"); -Clazz.defineMethod (c$, "dot", -function (q) { -return this.q0 * q.q0 + this.q1 * q.q1 + this.q2 * q.q2 + this.q3 * q.q3; -}, "javajs.util.Quat"); -Clazz.defineMethod (c$, "inv", -function () { -return javajs.util.Quat.new4 (-this.q1, -this.q2, -this.q3, this.q0); -}); -Clazz.defineMethod (c$, "negate", -function () { -return javajs.util.Quat.new4 (-this.q1, -this.q2, -this.q3, -this.q0); -}); -Clazz.defineMethod (c$, "getFixFactor", -($fz = function () { -return (this.q0 < 0 || this.q0 == 0 && (this.q1 < 0 || this.q1 == 0 && (this.q2 < 0 || this.q2 == 0 && this.q3 < 0)) ? -1 : 1); -}, $fz.isPrivate = true, $fz)); -Clazz.defineMethod (c$, "getVector", -function (i) { -return this.getVectorScaled (i, 1); -}, "~N"); -Clazz.defineMethod (c$, "getVectorScaled", -function (i, scale) { -if (i == -1) { -scale *= this.getFixFactor (); -return javajs.util.V3.new3 (this.q1 * scale, this.q2 * scale, this.q3 * scale); -}if (this.mat == null) this.setMatrix (); -var v = new javajs.util.V3 (); -this.mat.getColumnV (i, v); -if (scale != 1) v.scale (scale); -return v; -}, "~N,~N"); -Clazz.defineMethod (c$, "getNormal", -function () { -var v = javajs.util.Quat.getRawNormal (this); -v.scale (this.getFixFactor ()); -return v; -}); -c$.getRawNormal = Clazz.defineMethod (c$, "getRawNormal", -($fz = function (q) { -var v = javajs.util.V3.new3 (q.q1, q.q2, q.q3); -if (v.length () == 0) return javajs.util.V3.new3 (0, 0, 1); -v.normalize (); -return v; -}, $fz.isPrivate = true, $fz), "javajs.util.Quat"); -Clazz.defineMethod (c$, "getTheta", -function () { -return (Math.acos (Math.abs (this.q0)) * 2 * 180 / 3.141592653589793); -}); -Clazz.defineMethod (c$, "getThetaRadians", -function () { -return (Math.acos (Math.abs (this.q0)) * 2); -}); -Clazz.defineMethod (c$, "getNormalDirected", -function (v0) { -var v = this.getNormal (); -if (v.x * v0.x + v.y * v0.y + v.z * v0.z < 0) { -v.scale (-1); -}return v; -}, "javajs.util.V3"); -Clazz.defineMethod (c$, "get3dProjection", -function (v3d) { -v3d.set (this.q1, this.q2, this.q3); -return v3d; -}, "javajs.util.V3"); -Clazz.defineMethod (c$, "getThetaDirected", -function (axisAngle) { -var theta = this.getTheta (); -var v = this.getNormal (); -if (axisAngle.x * this.q1 + axisAngle.y * this.q2 + axisAngle.z * this.q3 < 0) { -v.scale (-1); -theta = -theta; -}axisAngle.set4 (v.x, v.y, v.z, theta); -return axisAngle; -}, "javajs.util.P4"); -Clazz.defineMethod (c$, "getThetaDirectedV", -function (vector) { -var theta = this.getTheta (); -var v = this.getNormal (); -if (vector.x * this.q1 + vector.y * this.q2 + vector.z * this.q3 < 0) { -v.scale (-1); -theta = -theta; -}return theta; -}, "javajs.util.V3"); -Clazz.defineMethod (c$, "toPoint4f", -function () { -return javajs.util.P4.new4 (this.q1, this.q2, this.q3, this.q0); -}); -Clazz.defineMethod (c$, "toAxisAngle4f", -function () { -var theta = 2 * Math.acos (Math.abs (this.q0)); -var sinTheta2 = Math.sin (theta / 2); -var v = this.getNormal (); -if (sinTheta2 < 0) { -v.scale (-1); -theta = 3.141592653589793 - theta; -}return javajs.util.A4.newVA (v, theta); -}); -Clazz.defineMethod (c$, "transform2", -function (pt, ptNew) { -if (this.mat == null) this.setMatrix (); -this.mat.rotate2 (pt, ptNew); -return ptNew; -}, "javajs.util.T3,javajs.util.T3"); -Clazz.defineMethod (c$, "leftDifference", -function (q2) { -var q2adjusted = (this.dot (q2) < 0 ? q2.negate () : q2); -return this.inv ().mulQ (q2adjusted); -}, "javajs.util.Quat"); -Clazz.defineMethod (c$, "rightDifference", -function (q2) { -var q2adjusted = (this.dot (q2) < 0 ? q2.negate () : q2); -return this.mulQ (q2adjusted.inv ()); -}, "javajs.util.Quat"); -Clazz.overrideMethod (c$, "toString", -function () { -return "{" + this.q1 + " " + this.q2 + " " + this.q3 + " " + this.q0 + "}"; -}); -c$.div = Clazz.defineMethod (c$, "div", -function (data1, data2, nMax, isRelative) { -var n; -if (data1 == null || data2 == null || (n = Math.min (data1.length, data2.length)) == 0) return null; -if (nMax > 0 && n > nMax) n = nMax; -var dqs = new Array (n); -for (var i = 0; i < n; i++) { -if (data1[i] == null || data2[i] == null) return null; -dqs[i] = (isRelative ? data1[i].divLeft (data2[i]) : data1[i].div (data2[i])); -} -return dqs; -}, "~A,~A,~N,~B"); -c$.sphereMean = Clazz.defineMethod (c$, "sphereMean", -function (data, retStddev, criterion) { -if (data == null || data.length == 0) return new javajs.util.Quat (); -if (retStddev == null) retStddev = Clazz.newFloatArray (1, 0); -if (data.length == 1) { -retStddev[0] = 0; -return javajs.util.Quat.newQ (data[0]); -}var diff = 3.4028235E38; -var lastStddev = 3.4028235E38; -var qMean = javajs.util.Quat.simpleAverage (data); -var maxIter = 100; -var iter = 0; -while (diff > criterion && lastStddev != 0 && iter < maxIter) { -qMean = javajs.util.Quat.newMean (data, qMean); -retStddev[0] = javajs.util.Quat.stdDev (data, qMean); -diff = Math.abs (retStddev[0] - lastStddev); -lastStddev = retStddev[0]; -} -return qMean; -}, "~A,~A,~N"); -c$.simpleAverage = Clazz.defineMethod (c$, "simpleAverage", -($fz = function (ndata) { -var mean = javajs.util.V3.new3 (0, 0, 1); -var v = ndata[0].getNormal (); -mean.add (v); -for (var i = ndata.length; --i >= 0; ) mean.add (ndata[i].getNormalDirected (mean)); - -mean.sub (v); -mean.normalize (); -var f = 0; -for (var i = ndata.length; --i >= 0; ) f += Math.abs (ndata[i].get3dProjection (v).dot (mean)); - -if (f != 0) mean.scale (f / ndata.length); -f = Math.sqrt (1 - mean.lengthSquared ()); -if (Float.isNaN (f)) f = 0; -return javajs.util.Quat.newP4 (javajs.util.P4.new4 (mean.x, mean.y, mean.z, f)); -}, $fz.isPrivate = true, $fz), "~A"); -c$.newMean = Clazz.defineMethod (c$, "newMean", -($fz = function (data, mean) { -var sum = new javajs.util.V3 (); -var v; -var q; -var dq; -for (var i = data.length; --i >= 0; ) { -q = data[i]; -dq = q.div (mean); -v = dq.getNormal (); -v.scale (dq.getTheta ()); -sum.add (v); -} -sum.scale (1 / data.length); -var dqMean = javajs.util.Quat.newVA (sum, sum.length ()); -return dqMean.mulQ (mean); -}, $fz.isPrivate = true, $fz), "~A,javajs.util.Quat"); -c$.stdDev = Clazz.defineMethod (c$, "stdDev", -($fz = function (data, mean) { -var sum2 = 0; -var n = data.length; -for (var i = n; --i >= 0; ) { -var theta = data[i].div (mean).getTheta (); -sum2 += theta * theta; -} -return Math.sqrt (sum2 / n); -}, $fz.isPrivate = true, $fz), "~A,javajs.util.Quat"); -Clazz.defineMethod (c$, "getEulerZYZ", -function () { -var rA; -var rB; -var rG; -if (this.q1 == 0 && this.q2 == 0) { -var theta = this.getTheta (); -return Clazz.newFloatArray (-1, [this.q3 < 0 ? -theta : theta, 0, 0]); -}rA = Math.atan2 (2 * (this.q2 * this.q3 + this.q0 * this.q1), 2 * (-this.q1 * this.q3 + this.q0 * this.q2)); -rB = Math.acos (this.q3 * this.q3 - this.q2 * this.q2 - this.q1 * this.q1 + this.q0 * this.q0); -rG = Math.atan2 (2 * (this.q2 * this.q3 - this.q0 * this.q1), 2 * (this.q0 * this.q2 + this.q1 * this.q3)); -return Clazz.newFloatArray (-1, [(rA / 0.017453292519943295), (rB / 0.017453292519943295), (rG / 0.017453292519943295)]); -}); -Clazz.defineMethod (c$, "getEulerZXZ", -function () { -var rA; -var rB; -var rG; -if (this.q1 == 0 && this.q2 == 0) { -var theta = this.getTheta (); -return Clazz.newFloatArray (-1, [this.q3 < 0 ? -theta : theta, 0, 0]); -}rA = Math.atan2 (2 * (this.q1 * this.q3 - this.q0 * this.q2), 2 * (this.q0 * this.q1 + this.q2 * this.q3)); -rB = Math.acos (this.q3 * this.q3 - this.q2 * this.q2 - this.q1 * this.q1 + this.q0 * this.q0); -rG = Math.atan2 (2 * (this.q1 * this.q3 + this.q0 * this.q2), 2 * (-this.q2 * this.q3 + this.q0 * this.q1)); -return Clazz.newFloatArray (-1, [(rA / 0.017453292519943295), (rB / 0.017453292519943295), (rG / 0.017453292519943295)]); -}); -c$.qZero = c$.prototype.qZero = new javajs.util.P4 (); -Clazz.defineStatics (c$, -"RAD_PER_DEG", 0.017453292519943295); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.P4"], "javajs.util.Quat", ["java.lang.Float", "javajs.util.A4", "$.M3", "$.V3"], function () { +c$ = Clazz.decorateAsClass (function () { +this.q0 = 0; +this.q1 = 0; +this.q2 = 0; +this.q3 = 0; +this.mat = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "Quat"); +Clazz.makeConstructor (c$, +function () { +this.q0 = 1; +}); +c$.newQ = Clazz.defineMethod (c$, "newQ", +function (q) { +var q1 = new javajs.util.Quat (); +q1.set (q); +return q1; +}, "javajs.util.Quat"); +c$.newVA = Clazz.defineMethod (c$, "newVA", +function (v, theta) { +var q = new javajs.util.Quat (); +q.setTA (v, theta); +return q; +}, "javajs.util.T3,~N"); +c$.newM = Clazz.defineMethod (c$, "newM", +function (mat) { +var q = new javajs.util.Quat (); +q.setM (javajs.util.M3.newM3 (mat)); +return q; +}, "javajs.util.M3"); +c$.newAA = Clazz.defineMethod (c$, "newAA", +function (a) { +var q = new javajs.util.Quat (); +q.setAA (a); +return q; +}, "javajs.util.A4"); +c$.newP4 = Clazz.defineMethod (c$, "newP4", +function (pt) { +var q = new javajs.util.Quat (); +q.setP4 (pt); +return q; +}, "javajs.util.P4"); +c$.new4 = Clazz.defineMethod (c$, "new4", +function (q1, q2, q3, q0) { +var q = new javajs.util.Quat (); +if (q0 < -1) { +q.q0 = -1; +return q; +}if (q0 > 1) { +q.q0 = 1; +return q; +}q.q0 = q0; +q.q1 = q1; +q.q2 = q2; +q.q3 = q3; +return q; +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "set", +function (q) { +this.q0 = q.q0; +this.q1 = q.q1; +this.q2 = q.q2; +this.q3 = q.q3; +}, "javajs.util.Quat"); +Clazz.defineMethod (c$, "setP4", +($fz = function (pt) { +var factor = (pt == null ? 0 : pt.distance4 (javajs.util.Quat.qZero)); +if (factor == 0) { +this.q0 = 1; +return; +}this.q0 = pt.w / factor; +this.q1 = pt.x / factor; +this.q2 = pt.y / factor; +this.q3 = pt.z / factor; +}, $fz.isPrivate = true, $fz), "javajs.util.P4"); +Clazz.defineMethod (c$, "setTA", +function (pt, theta) { +if (pt.x == 0 && pt.y == 0 && pt.z == 0) { +this.q0 = 1; +return; +}var fact = (Math.sin (theta / 2 * 0.017453292519943295) / Math.sqrt (pt.x * pt.x + pt.y * pt.y + pt.z * pt.z)); +this.q0 = (Math.cos (theta / 2 * 0.017453292519943295)); +this.q1 = (pt.x * fact); +this.q2 = (pt.y * fact); +this.q3 = (pt.z * fact); +}, "javajs.util.T3,~N"); +Clazz.defineMethod (c$, "setAA", +function (a) { +var aa = javajs.util.A4.newAA (a); +if (aa.angle == 0) aa.y = 1; +this.setM ( new javajs.util.M3 ().setAA (aa)); +}, "javajs.util.A4"); +Clazz.defineMethod (c$, "setM", +($fz = function (mat) { +this.mat = mat; +var trace = mat.m00 + mat.m11 + mat.m22; +var temp; +var w; +var x; +var y; +var z; +if (trace >= 0.5) { +w = Math.sqrt (1.0 + trace); +x = (mat.m21 - mat.m12) / w; +y = (mat.m02 - mat.m20) / w; +z = (mat.m10 - mat.m01) / w; +} else if ((temp = mat.m00 + mat.m00 - trace) >= 0.5) { +x = Math.sqrt (1.0 + temp); +w = (mat.m21 - mat.m12) / x; +y = (mat.m10 + mat.m01) / x; +z = (mat.m20 + mat.m02) / x; +} else if ((temp = mat.m11 + mat.m11 - trace) >= 0.5 || mat.m11 > mat.m22) { +y = Math.sqrt (1.0 + temp); +w = (mat.m02 - mat.m20) / y; +x = (mat.m10 + mat.m01) / y; +z = (mat.m21 + mat.m12) / y; +} else { +z = Math.sqrt (1.0 + mat.m22 + mat.m22 - trace); +w = (mat.m10 - mat.m01) / z; +x = (mat.m20 + mat.m02) / z; +y = (mat.m21 + mat.m12) / z; +}this.q0 = (w * 0.5); +this.q1 = (x * 0.5); +this.q2 = (y * 0.5); +this.q3 = (z * 0.5); +}, $fz.isPrivate = true, $fz), "javajs.util.M3"); +Clazz.defineMethod (c$, "setRef", +function (qref) { +if (qref == null) { +this.mul (this.getFixFactor ()); +return; +}if (this.dot (qref) >= 0) return; +this.q0 *= -1; +this.q1 *= -1; +this.q2 *= -1; +this.q3 *= -1; +}, "javajs.util.Quat"); +c$.getQuaternionFrame = Clazz.defineMethod (c$, "getQuaternionFrame", +function (center, x, xy) { +var vA = javajs.util.V3.newV (x); +var vB = javajs.util.V3.newV (xy); +if (center != null) { +vA.sub (center); +vB.sub (center); +}return javajs.util.Quat.getQuaternionFrameV (vA, vB, null, false); +}, "javajs.util.P3,javajs.util.T3,javajs.util.T3"); +c$.getQuaternionFrameV = Clazz.defineMethod (c$, "getQuaternionFrameV", +function (vA, vB, vC, yBased) { +if (vC == null) { +vC = new javajs.util.V3 (); +vC.cross (vA, vB); +if (yBased) vA.cross (vB, vC); +}var vBprime = new javajs.util.V3 (); +vBprime.cross (vC, vA); +vA.normalize (); +vBprime.normalize (); +vC.normalize (); +var mat = new javajs.util.M3 (); +mat.setColumnV (0, vA); +mat.setColumnV (1, vBprime); +mat.setColumnV (2, vC); +var q = javajs.util.Quat.newM (mat); +return q; +}, "javajs.util.V3,javajs.util.V3,javajs.util.V3,~B"); +Clazz.defineMethod (c$, "getMatrix", +function () { +if (this.mat == null) this.setMatrix (); +return this.mat; +}); +Clazz.defineMethod (c$, "setMatrix", +($fz = function () { +this.mat = new javajs.util.M3 (); +this.mat.m00 = this.q0 * this.q0 + this.q1 * this.q1 - this.q2 * this.q2 - this.q3 * this.q3; +this.mat.m01 = 2 * this.q1 * this.q2 - 2 * this.q0 * this.q3; +this.mat.m02 = 2 * this.q1 * this.q3 + 2 * this.q0 * this.q2; +this.mat.m10 = 2 * this.q1 * this.q2 + 2 * this.q0 * this.q3; +this.mat.m11 = this.q0 * this.q0 - this.q1 * this.q1 + this.q2 * this.q2 - this.q3 * this.q3; +this.mat.m12 = 2 * this.q2 * this.q3 - 2 * this.q0 * this.q1; +this.mat.m20 = 2 * this.q1 * this.q3 - 2 * this.q0 * this.q2; +this.mat.m21 = 2 * this.q2 * this.q3 + 2 * this.q0 * this.q1; +this.mat.m22 = this.q0 * this.q0 - this.q1 * this.q1 - this.q2 * this.q2 + this.q3 * this.q3; +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "add", +function (x) { +return javajs.util.Quat.newVA (this.getNormal (), this.getTheta () + x); +}, "~N"); +Clazz.defineMethod (c$, "mul", +function (x) { +return (x == 1 ? javajs.util.Quat.new4 (this.q1, this.q2, this.q3, this.q0) : javajs.util.Quat.newVA (this.getNormal (), this.getTheta () * x)); +}, "~N"); +Clazz.defineMethod (c$, "mulQ", +function (p) { +return javajs.util.Quat.new4 (this.q0 * p.q1 + this.q1 * p.q0 + this.q2 * p.q3 - this.q3 * p.q2, this.q0 * p.q2 + this.q2 * p.q0 + this.q3 * p.q1 - this.q1 * p.q3, this.q0 * p.q3 + this.q3 * p.q0 + this.q1 * p.q2 - this.q2 * p.q1, this.q0 * p.q0 - this.q1 * p.q1 - this.q2 * p.q2 - this.q3 * p.q3); +}, "javajs.util.Quat"); +Clazz.defineMethod (c$, "div", +function (p) { +return this.mulQ (p.inv ()); +}, "javajs.util.Quat"); +Clazz.defineMethod (c$, "divLeft", +function (p) { +return this.inv ().mulQ (p); +}, "javajs.util.Quat"); +Clazz.defineMethod (c$, "dot", +function (q) { +return this.q0 * q.q0 + this.q1 * q.q1 + this.q2 * q.q2 + this.q3 * q.q3; +}, "javajs.util.Quat"); +Clazz.defineMethod (c$, "inv", +function () { +return javajs.util.Quat.new4 (-this.q1, -this.q2, -this.q3, this.q0); +}); +Clazz.defineMethod (c$, "negate", +function () { +return javajs.util.Quat.new4 (-this.q1, -this.q2, -this.q3, -this.q0); +}); +Clazz.defineMethod (c$, "getFixFactor", +($fz = function () { +return (this.q0 < 0 || this.q0 == 0 && (this.q1 < 0 || this.q1 == 0 && (this.q2 < 0 || this.q2 == 0 && this.q3 < 0)) ? -1 : 1); +}, $fz.isPrivate = true, $fz)); +Clazz.defineMethod (c$, "getVector", +function (i) { +return this.getVectorScaled (i, 1); +}, "~N"); +Clazz.defineMethod (c$, "getVectorScaled", +function (i, scale) { +if (i == -1) { +scale *= this.getFixFactor (); +return javajs.util.V3.new3 (this.q1 * scale, this.q2 * scale, this.q3 * scale); +}if (this.mat == null) this.setMatrix (); +var v = new javajs.util.V3 (); +this.mat.getColumnV (i, v); +if (scale != 1) v.scale (scale); +return v; +}, "~N,~N"); +Clazz.defineMethod (c$, "getNormal", +function () { +var v = javajs.util.Quat.getRawNormal (this); +v.scale (this.getFixFactor ()); +return v; +}); +c$.getRawNormal = Clazz.defineMethod (c$, "getRawNormal", +($fz = function (q) { +var v = javajs.util.V3.new3 (q.q1, q.q2, q.q3); +if (v.length () == 0) return javajs.util.V3.new3 (0, 0, 1); +v.normalize (); +return v; +}, $fz.isPrivate = true, $fz), "javajs.util.Quat"); +Clazz.defineMethod (c$, "getTheta", +function () { +return (Math.acos (Math.abs (this.q0)) * 2 * 180 / 3.141592653589793); +}); +Clazz.defineMethod (c$, "getThetaRadians", +function () { +return (Math.acos (Math.abs (this.q0)) * 2); +}); +Clazz.defineMethod (c$, "getNormalDirected", +function (v0) { +var v = this.getNormal (); +if (v.x * v0.x + v.y * v0.y + v.z * v0.z < 0) { +v.scale (-1); +}return v; +}, "javajs.util.V3"); +Clazz.defineMethod (c$, "get3dProjection", +function (v3d) { +v3d.set (this.q1, this.q2, this.q3); +return v3d; +}, "javajs.util.V3"); +Clazz.defineMethod (c$, "getThetaDirected", +function (axisAngle) { +var theta = this.getTheta (); +var v = this.getNormal (); +if (axisAngle.x * this.q1 + axisAngle.y * this.q2 + axisAngle.z * this.q3 < 0) { +v.scale (-1); +theta = -theta; +}axisAngle.set4 (v.x, v.y, v.z, theta); +return axisAngle; +}, "javajs.util.P4"); +Clazz.defineMethod (c$, "getThetaDirectedV", +function (vector) { +var theta = this.getTheta (); +var v = this.getNormal (); +if (vector.x * this.q1 + vector.y * this.q2 + vector.z * this.q3 < 0) { +v.scale (-1); +theta = -theta; +}return theta; +}, "javajs.util.V3"); +Clazz.defineMethod (c$, "toPoint4f", +function () { +return javajs.util.P4.new4 (this.q1, this.q2, this.q3, this.q0); +}); +Clazz.defineMethod (c$, "toAxisAngle4f", +function () { +var theta = 2 * Math.acos (Math.abs (this.q0)); +var sinTheta2 = Math.sin (theta / 2); +var v = this.getNormal (); +if (sinTheta2 < 0) { +v.scale (-1); +theta = 3.141592653589793 - theta; +}return javajs.util.A4.newVA (v, theta); +}); +Clazz.defineMethod (c$, "transform2", +function (pt, ptNew) { +if (this.mat == null) this.setMatrix (); +this.mat.rotate2 (pt, ptNew); +return ptNew; +}, "javajs.util.T3,javajs.util.T3"); +Clazz.defineMethod (c$, "leftDifference", +function (q2) { +var q2adjusted = (this.dot (q2) < 0 ? q2.negate () : q2); +return this.inv ().mulQ (q2adjusted); +}, "javajs.util.Quat"); +Clazz.defineMethod (c$, "rightDifference", +function (q2) { +var q2adjusted = (this.dot (q2) < 0 ? q2.negate () : q2); +return this.mulQ (q2adjusted.inv ()); +}, "javajs.util.Quat"); +Clazz.overrideMethod (c$, "toString", +function () { +return "{" + this.q1 + " " + this.q2 + " " + this.q3 + " " + this.q0 + "}"; +}); +c$.div = Clazz.defineMethod (c$, "div", +function (data1, data2, nMax, isRelative) { +var n; +if (data1 == null || data2 == null || (n = Math.min (data1.length, data2.length)) == 0) return null; +if (nMax > 0 && n > nMax) n = nMax; +var dqs = new Array (n); +for (var i = 0; i < n; i++) { +if (data1[i] == null || data2[i] == null) return null; +dqs[i] = (isRelative ? data1[i].divLeft (data2[i]) : data1[i].div (data2[i])); +} +return dqs; +}, "~A,~A,~N,~B"); +c$.sphereMean = Clazz.defineMethod (c$, "sphereMean", +function (data, retStddev, criterion) { +if (data == null || data.length == 0) return new javajs.util.Quat (); +if (retStddev == null) retStddev = Clazz.newFloatArray (1, 0); +if (data.length == 1) { +retStddev[0] = 0; +return javajs.util.Quat.newQ (data[0]); +}var diff = 3.4028235E38; +var lastStddev = 3.4028235E38; +var qMean = javajs.util.Quat.simpleAverage (data); +var maxIter = 100; +var iter = 0; +while (diff > criterion && lastStddev != 0 && iter < maxIter) { +qMean = javajs.util.Quat.newMean (data, qMean); +retStddev[0] = javajs.util.Quat.stdDev (data, qMean); +diff = Math.abs (retStddev[0] - lastStddev); +lastStddev = retStddev[0]; +} +return qMean; +}, "~A,~A,~N"); +c$.simpleAverage = Clazz.defineMethod (c$, "simpleAverage", +($fz = function (ndata) { +var mean = javajs.util.V3.new3 (0, 0, 1); +var v = ndata[0].getNormal (); +mean.add (v); +for (var i = ndata.length; --i >= 0; ) mean.add (ndata[i].getNormalDirected (mean)); + +mean.sub (v); +mean.normalize (); +var f = 0; +for (var i = ndata.length; --i >= 0; ) f += Math.abs (ndata[i].get3dProjection (v).dot (mean)); + +if (f != 0) mean.scale (f / ndata.length); +f = Math.sqrt (1 - mean.lengthSquared ()); +if (Float.isNaN (f)) f = 0; +return javajs.util.Quat.newP4 (javajs.util.P4.new4 (mean.x, mean.y, mean.z, f)); +}, $fz.isPrivate = true, $fz), "~A"); +c$.newMean = Clazz.defineMethod (c$, "newMean", +($fz = function (data, mean) { +var sum = new javajs.util.V3 (); +var v; +var q; +var dq; +for (var i = data.length; --i >= 0; ) { +q = data[i]; +dq = q.div (mean); +v = dq.getNormal (); +v.scale (dq.getTheta ()); +sum.add (v); +} +sum.scale (1 / data.length); +var dqMean = javajs.util.Quat.newVA (sum, sum.length ()); +return dqMean.mulQ (mean); +}, $fz.isPrivate = true, $fz), "~A,javajs.util.Quat"); +c$.stdDev = Clazz.defineMethod (c$, "stdDev", +($fz = function (data, mean) { +var sum2 = 0; +var n = data.length; +for (var i = n; --i >= 0; ) { +var theta = data[i].div (mean).getTheta (); +sum2 += theta * theta; +} +return Math.sqrt (sum2 / n); +}, $fz.isPrivate = true, $fz), "~A,javajs.util.Quat"); +Clazz.defineMethod (c$, "getEulerZYZ", +function () { +var rA; +var rB; +var rG; +if (this.q1 == 0 && this.q2 == 0) { +var theta = this.getTheta (); +return Clazz.newFloatArray (-1, [this.q3 < 0 ? -theta : theta, 0, 0]); +}rA = Math.atan2 (2 * (this.q2 * this.q3 + this.q0 * this.q1), 2 * (-this.q1 * this.q3 + this.q0 * this.q2)); +rB = Math.acos (this.q3 * this.q3 - this.q2 * this.q2 - this.q1 * this.q1 + this.q0 * this.q0); +rG = Math.atan2 (2 * (this.q2 * this.q3 - this.q0 * this.q1), 2 * (this.q0 * this.q2 + this.q1 * this.q3)); +return Clazz.newFloatArray (-1, [(rA / 0.017453292519943295), (rB / 0.017453292519943295), (rG / 0.017453292519943295)]); +}); +Clazz.defineMethod (c$, "getEulerZXZ", +function () { +var rA; +var rB; +var rG; +if (this.q1 == 0 && this.q2 == 0) { +var theta = this.getTheta (); +return Clazz.newFloatArray (-1, [this.q3 < 0 ? -theta : theta, 0, 0]); +}rA = Math.atan2 (2 * (this.q1 * this.q3 - this.q0 * this.q2), 2 * (this.q0 * this.q1 + this.q2 * this.q3)); +rB = Math.acos (this.q3 * this.q3 - this.q2 * this.q2 - this.q1 * this.q1 + this.q0 * this.q0); +rG = Math.atan2 (2 * (this.q1 * this.q3 + this.q0 * this.q2), 2 * (-this.q2 * this.q3 + this.q0 * this.q1)); +return Clazz.newFloatArray (-1, [(rA / 0.017453292519943295), (rB / 0.017453292519943295), (rG / 0.017453292519943295)]); +}); +c$.qZero = c$.prototype.qZero = new javajs.util.P4 (); +Clazz.defineStatics (c$, +"RAD_PER_DEG", 0.017453292519943295); +}); diff --git a/bin/javajs/util/Rdr.class b/bin/javajs/util/Rdr.class index 2611f4eb7b00656881936d696f5f8f8ea84b0719..0617f27a19be77193abca9c4cb16a9cd5b81bc25 100644 GIT binary patch delta 212 zcmdlHvO8qMNd?BP&8HOd8O5a-IE9@U|1to0>VJHrfi20MNp&R+~no3E-|V`P-wyhd#aV|@jK2yeGjK9?0sV1BBb^ZdPev>A diff --git a/bin/javajs/util/Rdr.js b/bin/javajs/util/Rdr.js index 6f65dc5..45a14ab 100644 --- a/bin/javajs/util/Rdr.js +++ b/bin/javajs/util/Rdr.js @@ -1,311 +1,311 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.api.GenericLineReader"], "javajs.util.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "javajs.util.AU", "$.Base64", "$.Encoding", "$.SB"], function () { -c$ = Clazz.decorateAsClass (function () { -this.reader = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "Rdr", null, javajs.api.GenericLineReader); -Clazz.makeConstructor (c$, -function (reader) { -this.reader = reader; -}, "java.io.BufferedReader"); -Clazz.overrideMethod (c$, "readNextLine", -function () { -return this.reader.readLine (); -}); -c$.readCifData = Clazz.defineMethod (c$, "readCifData", -function (parser, br) { -return parser.set (null, br).getAllCifData (); -}, "javajs.api.GenericCifDataParser,java.io.BufferedReader"); -c$.fixUTF = Clazz.defineMethod (c$, "fixUTF", -function (bytes) { -var encoding = javajs.util.Rdr.getUTFEncoding (bytes); -if (encoding !== javajs.util.Encoding.NONE) try { -var s = String.instantialize (bytes, encoding.name ().$replace ('_', '-')); -switch (encoding) { -case javajs.util.Encoding.UTF8: -case javajs.util.Encoding.UTF_16BE: -case javajs.util.Encoding.UTF_16LE: -s = s.substring (1); -break; -default: -break; -} -return s; -} catch (e) { -if (Clazz.exceptionOf (e, java.io.UnsupportedEncodingException)) { -System.out.println (e); -} else { -throw e; -} -} -return String.instantialize (bytes); -}, "~A"); -c$.getUTFEncoding = Clazz.defineMethod (c$, "getUTFEncoding", -($fz = function (bytes) { -if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return javajs.util.Encoding.UTF8; -if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return javajs.util.Encoding.UTF_32BE; -if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return javajs.util.Encoding.UTF_32LE; -if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return javajs.util.Encoding.UTF_16LE; -if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return javajs.util.Encoding.UTF_16BE; -return javajs.util.Encoding.NONE; -}, $fz.isPrivate = true, $fz), "~A"); -c$.getUTFEncodingForStream = Clazz.defineMethod (c$, "getUTFEncodingForStream", -($fz = function (is) { -{ -is.resetStream(); -}var abMagic = Clazz.newByteArray (4, 0); -abMagic[3] = 1; -try { -is.mark (5); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -return javajs.util.Encoding.NONE; -} else { -throw e; -} -} -is.read (abMagic, 0, 4); -is.reset (); -return javajs.util.Rdr.getUTFEncoding (abMagic); -}, $fz.isPrivate = true, $fz), "java.io.BufferedInputStream"); -c$.isBase64 = Clazz.defineMethod (c$, "isBase64", -function (sb) { -return (sb.indexOf (";base64,") == 0); -}, "javajs.util.SB"); -c$.isCompoundDocumentS = Clazz.defineMethod (c$, "isCompoundDocumentS", -function (is) { -return javajs.util.Rdr.isCompoundDocumentB (javajs.util.Rdr.getMagic (is, 8)); -}, "java.io.InputStream"); -c$.isCompoundDocumentB = Clazz.defineMethod (c$, "isCompoundDocumentB", -function (bytes) { -return (bytes.length >= 8 && bytes[0] == 0xD0 && bytes[1] == 0xCF && bytes[2] == 0x11 && bytes[3] == 0xE0 && bytes[4] == 0xA1 && bytes[5] == 0xB1 && bytes[6] == 0x1A && bytes[7] == 0xE1); -}, "~A"); -c$.isGzipS = Clazz.defineMethod (c$, "isGzipS", -function (is) { -return javajs.util.Rdr.isGzipB (javajs.util.Rdr.getMagic (is, 2)); -}, "java.io.InputStream"); -c$.isGzipB = Clazz.defineMethod (c$, "isGzipB", -function (bytes) { -return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B); -}, "~A"); -c$.isPickleS = Clazz.defineMethod (c$, "isPickleS", -function (is) { -return javajs.util.Rdr.isPickleB (javajs.util.Rdr.getMagic (is, 2)); -}, "java.io.InputStream"); -c$.isPickleB = Clazz.defineMethod (c$, "isPickleB", -function (bytes) { -return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71); -}, "~A"); -c$.isPngZipStream = Clazz.defineMethod (c$, "isPngZipStream", -function (is) { -return javajs.util.Rdr.isPngZipB (javajs.util.Rdr.getMagic (is, 55)); -}, "java.io.InputStream"); -c$.isPngZipB = Clazz.defineMethod (c$, "isPngZipB", -function (bytes) { -return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A); -}, "~A"); -c$.isZipS = Clazz.defineMethod (c$, "isZipS", -function (is) { -return javajs.util.Rdr.isZipB (javajs.util.Rdr.getMagic (is, 4)); -}, "java.io.InputStream"); -c$.isZipB = Clazz.defineMethod (c$, "isZipB", -function (bytes) { -return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04); -}, "~A"); -c$.getMagic = Clazz.defineMethod (c$, "getMagic", -($fz = function (is, n) { -var abMagic = Clazz.newByteArray (n, 0); -{ -is.resetStream(); -}try { -is.mark (n + 1); -is.read (abMagic, 0, n); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -try { -is.reset (); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -return abMagic; -}, $fz.isPrivate = true, $fz), "java.io.InputStream,~N"); -c$.guessMimeTypeForBytes = Clazz.defineMethod (c$, "guessMimeTypeForBytes", -function (bytes) { -switch (bytes.length < 2 ? -1 : bytes[1]) { -case 0: -return "image/jpg"; -case 0x49: -return "image/gif"; -case 0x4D: -return "image/BMP"; -case 0x50: -return "image/png"; -default: -return "image/unknown"; -} -}, "~A"); -c$.getBIS = Clazz.defineMethod (c$, "getBIS", -function (bytes) { -return new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes)); -}, "~A"); -c$.getBR = Clazz.defineMethod (c$, "getBR", -function (string) { -return new java.io.BufferedReader ( new java.io.StringReader (string)); -}, "~S"); -c$.getUnzippedInputStream = Clazz.defineMethod (c$, "getUnzippedInputStream", -function (jzt, bis) { -while (javajs.util.Rdr.isGzipS (bis)) bis = new java.io.BufferedInputStream (jzt.newGZIPInputStream (bis)); - -return bis; -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); -c$.getBytesFromSB = Clazz.defineMethod (c$, "getBytesFromSB", -function (sb) { -return (javajs.util.Rdr.isBase64 (sb) ? javajs.util.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1)); -}, "javajs.util.SB"); -c$.getStreamAsBytes = Clazz.defineMethod (c$, "getStreamAsBytes", -function (bis, out) { -var buf = Clazz.newByteArray (1024, 0); -var bytes = (out == null ? Clazz.newByteArray (4096, 0) : null); -var len = 0; -var totalLen = 0; -while ((len = bis.read (buf, 0, 1024)) > 0) { -totalLen += len; -if (out == null) { -if (totalLen >= bytes.length) bytes = javajs.util.AU.ensureLengthByte (bytes, totalLen * 2); -System.arraycopy (buf, 0, bytes, totalLen - len, len); -} else { -out.write (buf, 0, len); -}} -bis.close (); -if (out == null) { -return javajs.util.AU.arrayCopyByte (bytes, totalLen); -}return totalLen + " bytes"; -}, "java.io.BufferedInputStream,javajs.util.OC"); -c$.getBufferedReader = Clazz.defineMethod (c$, "getBufferedReader", -function (bis, charSet) { -if (javajs.util.Rdr.getUTFEncodingForStream (bis) === javajs.util.Encoding.NONE) return new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet))); -var bytes = javajs.util.Rdr.getLimitedStreamBytes (bis, -1); -bis.close (); -return javajs.util.Rdr.getBR (charSet == null ? javajs.util.Rdr.fixUTF (bytes) : String.instantialize (bytes, charSet)); -}, "java.io.BufferedInputStream,~S"); -c$.getLimitedStreamBytes = Clazz.defineMethod (c$, "getLimitedStreamBytes", -function (is, n) { -var buflen = (n > 0 && n < 1024 ? n : 1024); -var buf = Clazz.newByteArray (buflen, 0); -var bytes = Clazz.newByteArray (n < 0 ? 4096 : n, 0); -var len = 0; -var totalLen = 0; -if (n < 0) n = 2147483647; -while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) { -totalLen += len; -if (totalLen > bytes.length) bytes = javajs.util.AU.ensureLengthByte (bytes, totalLen * 2); -System.arraycopy (buf, 0, bytes, totalLen - len, len); -if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen; -} -if (totalLen == bytes.length) return bytes; -buf = Clazz.newByteArray (totalLen, 0); -System.arraycopy (bytes, 0, buf, 0, totalLen); -return buf; -}, "java.io.InputStream,~N"); -c$.StreamToUTF8String = Clazz.defineMethod (c$, "StreamToUTF8String", -function (bis) { -var data = new Array (1); -try { -javajs.util.Rdr.readAllAsString (javajs.util.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -return data[0]; -}, "java.io.BufferedInputStream"); -c$.readAllAsString = Clazz.defineMethod (c$, "readAllAsString", -function (br, nBytesMax, allowBinary, data, i) { -try { -var sb = javajs.util.SB.newN (8192); -var line; -if (nBytesMax < 0) { -line = br.readLine (); -if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) { -sb.append (line).appendC ('\n'); -while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n'); - -}} else { -var n = 0; -var len; -while (n < nBytesMax && (line = br.readLine ()) != null) { -if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1); -sb.append (line).appendC ('\n'); -n += len + 1; -} -}br.close (); -data[i] = sb.toString (); -return true; -} catch (ioe) { -if (Clazz.exceptionOf (ioe, Exception)) { -data[i] = ioe.toString (); -return false; -} else { -throw ioe; -} -} -}, "java.io.BufferedReader,~N,~B,~A,~N"); -c$.getPngZipPointAndCount = Clazz.defineMethod (c$, "getPngZipPointAndCount", -function (bis, pt_count) { -bis.mark (75); -try { -var data = javajs.util.Rdr.getLimitedStreamBytes (bis, 74); -bis.reset (); -var pt = 0; -for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f; - -var n = 0; -for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f; - -pt_count[0] = pt; -pt_count[1] = n; -} catch (e) { -pt_count[1] = 0; -} -}, "java.io.BufferedInputStream,~A"); -c$.getPngZipStream = Clazz.defineMethod (c$, "getPngZipStream", -function (bis, asNewStream) { -if (!javajs.util.Rdr.isPngZipStream (bis)) return bis; -var data = Clazz.newByteArray (0, 0); -bis.mark (75); -try { -var pt_count = Clazz.newIntArray (2, 0); -javajs.util.Rdr.getPngZipPointAndCount (bis, pt_count); -if (pt_count[1] != 0) { -var pt = pt_count[0]; -while (pt > 0) pt -= bis.skip (pt); - -if (!asNewStream) return bis; -data = javajs.util.Rdr.getLimitedStreamBytes (bis, pt_count[1]); -}} catch (e) { -} finally { -try { -if (asNewStream) bis.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -} -return javajs.util.Rdr.getBIS (data); -}, "java.io.BufferedInputStream,~B"); -c$.getZipRoot = Clazz.defineMethod (c$, "getZipRoot", -function (fileName) { -var pt = fileName.indexOf ("|"); -return (pt < 0 ? fileName : fileName.substring (0, pt)); -}, "~S"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.GenericLineReader"], "javajs.util.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "javajs.util.AU", "$.Base64", "$.Encoding", "$.SB"], function () { +c$ = Clazz.decorateAsClass (function () { +this.reader = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "Rdr", null, javajs.api.GenericLineReader); +Clazz.makeConstructor (c$, +function (reader) { +this.reader = reader; +}, "java.io.BufferedReader"); +Clazz.overrideMethod (c$, "readNextLine", +function () { +return this.reader.readLine (); +}); +c$.readCifData = Clazz.defineMethod (c$, "readCifData", +function (parser, br) { +return parser.set (null, br).getAllCifData (); +}, "javajs.api.GenericCifDataParser,java.io.BufferedReader"); +c$.fixUTF = Clazz.defineMethod (c$, "fixUTF", +function (bytes) { +var encoding = javajs.util.Rdr.getUTFEncoding (bytes); +if (encoding !== javajs.util.Encoding.NONE) try { +var s = String.instantialize (bytes, encoding.name ().$replace ('_', '-')); +switch (encoding) { +case javajs.util.Encoding.UTF8: +case javajs.util.Encoding.UTF_16BE: +case javajs.util.Encoding.UTF_16LE: +s = s.substring (1); +break; +default: +break; +} +return s; +} catch (e) { +if (Clazz.exceptionOf (e, java.io.UnsupportedEncodingException)) { +System.out.println (e); +} else { +throw e; +} +} +return String.instantialize (bytes); +}, "~A"); +c$.getUTFEncoding = Clazz.defineMethod (c$, "getUTFEncoding", +($fz = function (bytes) { +if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return javajs.util.Encoding.UTF8; +if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return javajs.util.Encoding.UTF_32BE; +if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return javajs.util.Encoding.UTF_32LE; +if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return javajs.util.Encoding.UTF_16LE; +if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return javajs.util.Encoding.UTF_16BE; +return javajs.util.Encoding.NONE; +}, $fz.isPrivate = true, $fz), "~A"); +c$.getUTFEncodingForStream = Clazz.defineMethod (c$, "getUTFEncodingForStream", +($fz = function (is) { +{ +is.resetStream(); +}var abMagic = Clazz.newByteArray (4, 0); +abMagic[3] = 1; +try { +is.mark (5); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +return javajs.util.Encoding.NONE; +} else { +throw e; +} +} +is.read (abMagic, 0, 4); +is.reset (); +return javajs.util.Rdr.getUTFEncoding (abMagic); +}, $fz.isPrivate = true, $fz), "java.io.BufferedInputStream"); +c$.isBase64 = Clazz.defineMethod (c$, "isBase64", +function (sb) { +return (sb.indexOf (";base64,") == 0); +}, "javajs.util.SB"); +c$.isCompoundDocumentS = Clazz.defineMethod (c$, "isCompoundDocumentS", +function (is) { +return javajs.util.Rdr.isCompoundDocumentB (javajs.util.Rdr.getMagic (is, 8)); +}, "java.io.InputStream"); +c$.isCompoundDocumentB = Clazz.defineMethod (c$, "isCompoundDocumentB", +function (bytes) { +return (bytes.length >= 8 && bytes[0] == 0xD0 && bytes[1] == 0xCF && bytes[2] == 0x11 && bytes[3] == 0xE0 && bytes[4] == 0xA1 && bytes[5] == 0xB1 && bytes[6] == 0x1A && bytes[7] == 0xE1); +}, "~A"); +c$.isGzipS = Clazz.defineMethod (c$, "isGzipS", +function (is) { +return javajs.util.Rdr.isGzipB (javajs.util.Rdr.getMagic (is, 2)); +}, "java.io.InputStream"); +c$.isGzipB = Clazz.defineMethod (c$, "isGzipB", +function (bytes) { +return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B); +}, "~A"); +c$.isPickleS = Clazz.defineMethod (c$, "isPickleS", +function (is) { +return javajs.util.Rdr.isPickleB (javajs.util.Rdr.getMagic (is, 2)); +}, "java.io.InputStream"); +c$.isPickleB = Clazz.defineMethod (c$, "isPickleB", +function (bytes) { +return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71); +}, "~A"); +c$.isPngZipStream = Clazz.defineMethod (c$, "isPngZipStream", +function (is) { +return javajs.util.Rdr.isPngZipB (javajs.util.Rdr.getMagic (is, 55)); +}, "java.io.InputStream"); +c$.isPngZipB = Clazz.defineMethod (c$, "isPngZipB", +function (bytes) { +return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A); +}, "~A"); +c$.isZipS = Clazz.defineMethod (c$, "isZipS", +function (is) { +return javajs.util.Rdr.isZipB (javajs.util.Rdr.getMagic (is, 4)); +}, "java.io.InputStream"); +c$.isZipB = Clazz.defineMethod (c$, "isZipB", +function (bytes) { +return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04); +}, "~A"); +c$.getMagic = Clazz.defineMethod (c$, "getMagic", +($fz = function (is, n) { +var abMagic = Clazz.newByteArray (n, 0); +{ +is.resetStream(); +}try { +is.mark (n + 1); +is.read (abMagic, 0, n); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +try { +is.reset (); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +return abMagic; +}, $fz.isPrivate = true, $fz), "java.io.InputStream,~N"); +c$.guessMimeTypeForBytes = Clazz.defineMethod (c$, "guessMimeTypeForBytes", +function (bytes) { +switch (bytes.length < 2 ? -1 : bytes[1]) { +case 0: +return "image/jpg"; +case 0x49: +return "image/gif"; +case 0x4D: +return "image/BMP"; +case 0x50: +return "image/png"; +default: +return "image/unknown"; +} +}, "~A"); +c$.getBIS = Clazz.defineMethod (c$, "getBIS", +function (bytes) { +return new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes)); +}, "~A"); +c$.getBR = Clazz.defineMethod (c$, "getBR", +function (string) { +return new java.io.BufferedReader ( new java.io.StringReader (string)); +}, "~S"); +c$.getUnzippedInputStream = Clazz.defineMethod (c$, "getUnzippedInputStream", +function (jzt, bis) { +while (javajs.util.Rdr.isGzipS (bis)) bis = new java.io.BufferedInputStream (jzt.newGZIPInputStream (bis)); + +return bis; +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); +c$.getBytesFromSB = Clazz.defineMethod (c$, "getBytesFromSB", +function (sb) { +return (javajs.util.Rdr.isBase64 (sb) ? javajs.util.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1)); +}, "javajs.util.SB"); +c$.getStreamAsBytes = Clazz.defineMethod (c$, "getStreamAsBytes", +function (bis, out) { +var buf = Clazz.newByteArray (1024, 0); +var bytes = (out == null ? Clazz.newByteArray (4096, 0) : null); +var len = 0; +var totalLen = 0; +while ((len = bis.read (buf, 0, 1024)) > 0) { +totalLen += len; +if (out == null) { +if (totalLen >= bytes.length) bytes = javajs.util.AU.ensureLengthByte (bytes, totalLen * 2); +System.arraycopy (buf, 0, bytes, totalLen - len, len); +} else { +out.write (buf, 0, len); +}} +bis.close (); +if (out == null) { +return javajs.util.AU.arrayCopyByte (bytes, totalLen); +}return totalLen + " bytes"; +}, "java.io.BufferedInputStream,javajs.util.OC"); +c$.getBufferedReader = Clazz.defineMethod (c$, "getBufferedReader", +function (bis, charSet) { +if (javajs.util.Rdr.getUTFEncodingForStream (bis) === javajs.util.Encoding.NONE) return new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet))); +var bytes = javajs.util.Rdr.getLimitedStreamBytes (bis, -1); +bis.close (); +return javajs.util.Rdr.getBR (charSet == null ? javajs.util.Rdr.fixUTF (bytes) : String.instantialize (bytes, charSet)); +}, "java.io.BufferedInputStream,~S"); +c$.getLimitedStreamBytes = Clazz.defineMethod (c$, "getLimitedStreamBytes", +function (is, n) { +var buflen = (n > 0 && n < 1024 ? n : 1024); +var buf = Clazz.newByteArray (buflen, 0); +var bytes = Clazz.newByteArray (n < 0 ? 4096 : n, 0); +var len = 0; +var totalLen = 0; +if (n < 0) n = 2147483647; +while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) { +totalLen += len; +if (totalLen > bytes.length) bytes = javajs.util.AU.ensureLengthByte (bytes, totalLen * 2); +System.arraycopy (buf, 0, bytes, totalLen - len, len); +if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen; +} +if (totalLen == bytes.length) return bytes; +buf = Clazz.newByteArray (totalLen, 0); +System.arraycopy (bytes, 0, buf, 0, totalLen); +return buf; +}, "java.io.InputStream,~N"); +c$.StreamToUTF8String = Clazz.defineMethod (c$, "StreamToUTF8String", +function (bis) { +var data = new Array (1); +try { +javajs.util.Rdr.readAllAsString (javajs.util.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +return data[0]; +}, "java.io.BufferedInputStream"); +c$.readAllAsString = Clazz.defineMethod (c$, "readAllAsString", +function (br, nBytesMax, allowBinary, data, i) { +try { +var sb = javajs.util.SB.newN (8192); +var line; +if (nBytesMax < 0) { +line = br.readLine (); +if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) { +sb.append (line).appendC ('\n'); +while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n'); + +}} else { +var n = 0; +var len; +while (n < nBytesMax && (line = br.readLine ()) != null) { +if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1); +sb.append (line).appendC ('\n'); +n += len + 1; +} +}br.close (); +data[i] = sb.toString (); +return true; +} catch (ioe) { +if (Clazz.exceptionOf (ioe, Exception)) { +data[i] = ioe.toString (); +return false; +} else { +throw ioe; +} +} +}, "java.io.BufferedReader,~N,~B,~A,~N"); +c$.getPngZipPointAndCount = Clazz.defineMethod (c$, "getPngZipPointAndCount", +function (bis, pt_count) { +bis.mark (75); +try { +var data = javajs.util.Rdr.getLimitedStreamBytes (bis, 74); +bis.reset (); +var pt = 0; +for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f; + +var n = 0; +for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f; + +pt_count[0] = pt; +pt_count[1] = n; +} catch (e) { +pt_count[1] = 0; +} +}, "java.io.BufferedInputStream,~A"); +c$.getPngZipStream = Clazz.defineMethod (c$, "getPngZipStream", +function (bis, asNewStream) { +if (!javajs.util.Rdr.isPngZipStream (bis)) return bis; +var data = Clazz.newByteArray (0, 0); +bis.mark (75); +try { +var pt_count = Clazz.newIntArray (2, 0); +javajs.util.Rdr.getPngZipPointAndCount (bis, pt_count); +if (pt_count[1] != 0) { +var pt = pt_count[0]; +while (pt > 0) pt -= bis.skip (pt); + +if (!asNewStream) return bis; +data = javajs.util.Rdr.getLimitedStreamBytes (bis, pt_count[1]); +}} catch (e) { +} finally { +try { +if (asNewStream) bis.close (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +} +return javajs.util.Rdr.getBIS (data); +}, "java.io.BufferedInputStream,~B"); +c$.getZipRoot = Clazz.defineMethod (c$, "getZipRoot", +function (fileName) { +var pt = fileName.indexOf ("|"); +return (pt < 0 ? fileName : fileName.substring (0, pt)); +}, "~S"); +}); diff --git a/bin/javajs/util/SB.js b/bin/javajs/util/SB.js index daa1518..b597d0f 100644 --- a/bin/javajs/util/SB.js +++ b/bin/javajs/util/SB.js @@ -1,151 +1,151 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.sb = null; -this.s = null; -Clazz.instantialize (this, arguments); -}, javajs.util, "SB"); -Clazz.makeConstructor (c$, -function () { -{ -this.s = ""; -}}); -c$.newN = Clazz.defineMethod (c$, "newN", -function (n) { -{ -return new javajs.util.SB(); -}}, "~N"); -c$.newS = Clazz.defineMethod (c$, "newS", -function (s) { -{ -var sb = new javajs.util.SB(); -sb.s = s; -return sb; -}}, "~S"); -Clazz.defineMethod (c$, "append", -function (s) { -{ -this.s += s -}return this; -}, "~S"); -Clazz.defineMethod (c$, "appendC", -function (c) { -{ -this.s += c; -}return this; -}, "~S"); -Clazz.defineMethod (c$, "appendI", -function (i) { -{ -this.s += i -}return this; -}, "~N"); -Clazz.defineMethod (c$, "appendB", -function (b) { -{ -this.s += b -}return this; -}, "~B"); -Clazz.defineMethod (c$, "appendF", -function (f) { -{ -var sf = "" + f; -if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) -sf += ".0" ; -this.s += sf; -}return this; -}, "~N"); -Clazz.defineMethod (c$, "appendD", -function (d) { -{ -var sf = "" + d; -if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) -sf += ".0" ; -this.s += sf; -}return this; -}, "~N"); -Clazz.defineMethod (c$, "appendSB", -function (buf) { -{ -this.s += buf.s; -}return this; -}, "javajs.util.SB"); -Clazz.defineMethod (c$, "appendO", -function (data) { -if (data != null) { -{ -this.s += data.toString(); -}}return this; -}, "~O"); -Clazz.defineMethod (c$, "appendCB", -function (cb, off, len) { -{ -for (var i = len,j=off; --i >= 0;) -this.s += cb[j++]; -}}, "~A,~N,~N"); -Clazz.overrideMethod (c$, "toString", -function () { -{ -return this.s; -}}); -Clazz.defineMethod (c$, "length", -function () { -{ -return this.s.length; -}}); -Clazz.defineMethod (c$, "indexOf", -function (s) { -{ -return this.s.indexOf(s); -}}, "~S"); -Clazz.defineMethod (c$, "charAt", -function (i) { -{ -return this.s.charAt(i); -}}, "~N"); -Clazz.defineMethod (c$, "charCodeAt", -function (i) { -{ -return this.s.charCodeAt(i); -}}, "~N"); -Clazz.defineMethod (c$, "setLength", -function (n) { -{ -this.s = this.s.substring(0, n); -}}, "~N"); -Clazz.defineMethod (c$, "lastIndexOf", -function (s) { -{ -return this.s.lastIndexOf(s); -}}, "~S"); -Clazz.defineMethod (c$, "indexOf2", -function (s, i) { -{ -return this.s.indexOf(s, i); -}}, "~S,~N"); -Clazz.defineMethod (c$, "substring", -function (i) { -{ -return this.s.substring(i); -}}, "~N"); -Clazz.defineMethod (c$, "substring2", -function (i, j) { -{ -return this.s.substring(i, j); -}}, "~N,~N"); -Clazz.defineMethod (c$, "toBytes", -function (off, len) { -if (len < 0) len = this.length () - off; -var b = Clazz.newByteArray (len, 0); -for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0); - -return b; -}, "~N,~N"); -Clazz.defineMethod (c$, "replace", -function (start, end, str) { -{ -this.s = this.s.substring(0, start) + str + this.s.substring(end); -}}, "~N,~N,~S"); -Clazz.defineMethod (c$, "insert", -function (offset, str) { -this.replace (offset, offset, str); -}, "~N,~S"); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.sb = null; +this.s = null; +Clazz.instantialize (this, arguments); +}, javajs.util, "SB"); +Clazz.makeConstructor (c$, +function () { +{ +this.s = ""; +}}); +c$.newN = Clazz.defineMethod (c$, "newN", +function (n) { +{ +return new javajs.util.SB(); +}}, "~N"); +c$.newS = Clazz.defineMethod (c$, "newS", +function (s) { +{ +var sb = new javajs.util.SB(); +sb.s = s; +return sb; +}}, "~S"); +Clazz.defineMethod (c$, "append", +function (s) { +{ +this.s += s +}return this; +}, "~S"); +Clazz.defineMethod (c$, "appendC", +function (c) { +{ +this.s += c; +}return this; +}, "~S"); +Clazz.defineMethod (c$, "appendI", +function (i) { +{ +this.s += i +}return this; +}, "~N"); +Clazz.defineMethod (c$, "appendB", +function (b) { +{ +this.s += b +}return this; +}, "~B"); +Clazz.defineMethod (c$, "appendF", +function (f) { +{ +var sf = "" + f; +if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) +sf += ".0" ; +this.s += sf; +}return this; +}, "~N"); +Clazz.defineMethod (c$, "appendD", +function (d) { +{ +var sf = "" + d; +if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) +sf += ".0" ; +this.s += sf; +}return this; +}, "~N"); +Clazz.defineMethod (c$, "appendSB", +function (buf) { +{ +this.s += buf.s; +}return this; +}, "javajs.util.SB"); +Clazz.defineMethod (c$, "appendO", +function (data) { +if (data != null) { +{ +this.s += data.toString(); +}}return this; +}, "~O"); +Clazz.defineMethod (c$, "appendCB", +function (cb, off, len) { +{ +for (var i = len,j=off; --i >= 0;) +this.s += cb[j++]; +}}, "~A,~N,~N"); +Clazz.overrideMethod (c$, "toString", +function () { +{ +return this.s; +}}); +Clazz.defineMethod (c$, "length", +function () { +{ +return this.s.length; +}}); +Clazz.defineMethod (c$, "indexOf", +function (s) { +{ +return this.s.indexOf(s); +}}, "~S"); +Clazz.defineMethod (c$, "charAt", +function (i) { +{ +return this.s.charAt(i); +}}, "~N"); +Clazz.defineMethod (c$, "charCodeAt", +function (i) { +{ +return this.s.charCodeAt(i); +}}, "~N"); +Clazz.defineMethod (c$, "setLength", +function (n) { +{ +this.s = this.s.substring(0, n); +}}, "~N"); +Clazz.defineMethod (c$, "lastIndexOf", +function (s) { +{ +return this.s.lastIndexOf(s); +}}, "~S"); +Clazz.defineMethod (c$, "indexOf2", +function (s, i) { +{ +return this.s.indexOf(s, i); +}}, "~S,~N"); +Clazz.defineMethod (c$, "substring", +function (i) { +{ +return this.s.substring(i); +}}, "~N"); +Clazz.defineMethod (c$, "substring2", +function (i, j) { +{ +return this.s.substring(i, j); +}}, "~N,~N"); +Clazz.defineMethod (c$, "toBytes", +function (off, len) { +if (len < 0) len = this.length () - off; +var b = Clazz.newByteArray (len, 0); +for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0); + +return b; +}, "~N,~N"); +Clazz.defineMethod (c$, "replace", +function (start, end, str) { +{ +this.s = this.s.substring(0, start) + str + this.s.substring(end); +}}, "~N,~N,~S"); +Clazz.defineMethod (c$, "insert", +function (offset, str) { +this.replace (offset, offset, str); +}, "~N,~S"); diff --git a/bin/javajs/util/StringDataReader.js b/bin/javajs/util/StringDataReader.js index 691fb2c..229c2ac 100644 --- a/bin/javajs/util/StringDataReader.js +++ b/bin/javajs/util/StringDataReader.js @@ -1,12 +1,12 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.DataReader"], "javajs.util.StringDataReader", ["java.io.StringReader"], function () { -c$ = Clazz.declareType (javajs.util, "StringDataReader", javajs.util.DataReader); -Clazz.makeConstructor (c$, -function (data) { -Clazz.superConstructor (this, javajs.util.StringDataReader, [ new java.io.StringReader (data)]); -}, "~S"); -Clazz.overrideMethod (c$, "setData", -function (data) { -return new javajs.util.StringDataReader (data); -}, "~O"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.DataReader"], "javajs.util.StringDataReader", ["java.io.StringReader"], function () { +c$ = Clazz.declareType (javajs.util, "StringDataReader", javajs.util.DataReader); +Clazz.makeConstructor (c$, +function (data) { +Clazz.superConstructor (this, javajs.util.StringDataReader, [ new java.io.StringReader (data)]); +}, "~S"); +Clazz.overrideMethod (c$, "setData", +function (data) { +return new javajs.util.StringDataReader (data); +}, "~O"); +}); diff --git a/bin/javajs/util/T3.js b/bin/javajs/util/T3.js index a914fe2..81c591c 100644 --- a/bin/javajs/util/T3.js +++ b/bin/javajs/util/T3.js @@ -1,141 +1,141 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.api.JSONEncodable"], "javajs.util.T3", ["java.lang.Float"], function () { -c$ = Clazz.decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.z = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]); -Clazz.defineMethod (c$, "set", -function (x, y, z) { -this.x = x; -this.y = y; -this.z = z; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "setA", -function (t) { -this.x = t[0]; -this.y = t[1]; -this.z = t[2]; -}, "~A"); -Clazz.defineMethod (c$, "setT", -function (t1) { -this.x = t1.x; -this.y = t1.y; -this.z = t1.z; -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "add2", -function (t1, t2) { -this.x = t1.x + t2.x; -this.y = t1.y + t2.y; -this.z = t1.z + t2.z; -}, "javajs.util.T3,javajs.util.T3"); -Clazz.defineMethod (c$, "add", -function (t1) { -this.x += t1.x; -this.y += t1.y; -this.z += t1.z; -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "distanceSquared", -function (p1) { -var dx = this.x - p1.x; -var dy = this.y - p1.y; -var dz = this.z - p1.z; -return (dx * dx + dy * dy + dz * dz); -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "distance", -function (p1) { -return Math.sqrt (this.distanceSquared (p1)); -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "sub2", -function (t1, t2) { -this.x = t1.x - t2.x; -this.y = t1.y - t2.y; -this.z = t1.z - t2.z; -}, "javajs.util.T3,javajs.util.T3"); -Clazz.defineMethod (c$, "sub", -function (t1) { -this.x -= t1.x; -this.y -= t1.y; -this.z -= t1.z; -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "scale", -function (s) { -this.x *= s; -this.y *= s; -this.z *= s; -}, "~N"); -Clazz.defineMethod (c$, "add3", -function (a, b, c) { -this.x += a; -this.y += b; -this.z += c; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "scaleT", -function (p) { -this.x *= p.x; -this.y *= p.y; -this.z *= p.z; -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "scaleAdd2", -function (s, t1, t2) { -this.x = s * t1.x + t2.x; -this.y = s * t1.y + t2.y; -this.z = s * t1.z + t2.z; -}, "~N,javajs.util.T3,javajs.util.T3"); -Clazz.defineMethod (c$, "ave", -function (a, b) { -this.x = (a.x + b.x) / 2; -this.y = (a.y + b.y) / 2; -this.z = (a.z + b.z) / 2; -}, "javajs.util.T3,javajs.util.T3"); -Clazz.defineMethod (c$, "dot", -function (v) { -return this.x * v.x + this.y * v.y + this.z * v.z; -}, "javajs.util.T3"); -Clazz.defineMethod (c$, "lengthSquared", -function () { -return this.x * this.x + this.y * this.y + this.z * this.z; -}); -Clazz.defineMethod (c$, "length", -function () { -return Math.sqrt (this.lengthSquared ()); -}); -Clazz.defineMethod (c$, "normalize", -function () { -var d = this.length (); -this.x /= d; -this.y /= d; -this.z /= d; -}); -Clazz.defineMethod (c$, "cross", -function (v1, v2) { -this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); -}, "javajs.util.T3,javajs.util.T3"); -Clazz.overrideMethod (c$, "hashCode", -function () { -var bits = 1; -bits = 31 * bits + javajs.util.T3.floatToIntBits0 (this.x); -bits = 31 * bits + javajs.util.T3.floatToIntBits0 (this.y); -bits = 31 * bits + javajs.util.T3.floatToIntBits0 (this.z); -return (bits ^ (bits >> 32)); -}); -c$.floatToIntBits0 = Clazz.defineMethod (c$, "floatToIntBits0", -function (f) { -return (f == 0 ? 0 : Float.floatToIntBits (f)); -}, "~N"); -Clazz.overrideMethod (c$, "equals", -function (t1) { -if (!(Clazz.instanceOf (t1, javajs.util.T3))) return false; -var t2 = t1; -return (this.x == t2.x && this.y == t2.y && this.z == t2.z); -}, "~O"); -Clazz.overrideMethod (c$, "toString", -function () { -return "{" + this.x + ", " + this.y + ", " + this.z + "}"; -}); -Clazz.overrideMethod (c$, "toJSON", -function () { -return "[" + this.x + "," + this.y + "," + this.z + "]"; -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.JSONEncodable"], "javajs.util.T3", ["java.lang.Float"], function () { +c$ = Clazz.decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.z = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]); +Clazz.defineMethod (c$, "set", +function (x, y, z) { +this.x = x; +this.y = y; +this.z = z; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "setA", +function (t) { +this.x = t[0]; +this.y = t[1]; +this.z = t[2]; +}, "~A"); +Clazz.defineMethod (c$, "setT", +function (t1) { +this.x = t1.x; +this.y = t1.y; +this.z = t1.z; +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "add2", +function (t1, t2) { +this.x = t1.x + t2.x; +this.y = t1.y + t2.y; +this.z = t1.z + t2.z; +}, "javajs.util.T3,javajs.util.T3"); +Clazz.defineMethod (c$, "add", +function (t1) { +this.x += t1.x; +this.y += t1.y; +this.z += t1.z; +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "distanceSquared", +function (p1) { +var dx = this.x - p1.x; +var dy = this.y - p1.y; +var dz = this.z - p1.z; +return (dx * dx + dy * dy + dz * dz); +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "distance", +function (p1) { +return Math.sqrt (this.distanceSquared (p1)); +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "sub2", +function (t1, t2) { +this.x = t1.x - t2.x; +this.y = t1.y - t2.y; +this.z = t1.z - t2.z; +}, "javajs.util.T3,javajs.util.T3"); +Clazz.defineMethod (c$, "sub", +function (t1) { +this.x -= t1.x; +this.y -= t1.y; +this.z -= t1.z; +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "scale", +function (s) { +this.x *= s; +this.y *= s; +this.z *= s; +}, "~N"); +Clazz.defineMethod (c$, "add3", +function (a, b, c) { +this.x += a; +this.y += b; +this.z += c; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "scaleT", +function (p) { +this.x *= p.x; +this.y *= p.y; +this.z *= p.z; +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "scaleAdd2", +function (s, t1, t2) { +this.x = s * t1.x + t2.x; +this.y = s * t1.y + t2.y; +this.z = s * t1.z + t2.z; +}, "~N,javajs.util.T3,javajs.util.T3"); +Clazz.defineMethod (c$, "ave", +function (a, b) { +this.x = (a.x + b.x) / 2; +this.y = (a.y + b.y) / 2; +this.z = (a.z + b.z) / 2; +}, "javajs.util.T3,javajs.util.T3"); +Clazz.defineMethod (c$, "dot", +function (v) { +return this.x * v.x + this.y * v.y + this.z * v.z; +}, "javajs.util.T3"); +Clazz.defineMethod (c$, "lengthSquared", +function () { +return this.x * this.x + this.y * this.y + this.z * this.z; +}); +Clazz.defineMethod (c$, "length", +function () { +return Math.sqrt (this.lengthSquared ()); +}); +Clazz.defineMethod (c$, "normalize", +function () { +var d = this.length (); +this.x /= d; +this.y /= d; +this.z /= d; +}); +Clazz.defineMethod (c$, "cross", +function (v1, v2) { +this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); +}, "javajs.util.T3,javajs.util.T3"); +Clazz.overrideMethod (c$, "hashCode", +function () { +var bits = 1; +bits = 31 * bits + javajs.util.T3.floatToIntBits0 (this.x); +bits = 31 * bits + javajs.util.T3.floatToIntBits0 (this.y); +bits = 31 * bits + javajs.util.T3.floatToIntBits0 (this.z); +return (bits ^ (bits >> 32)); +}); +c$.floatToIntBits0 = Clazz.defineMethod (c$, "floatToIntBits0", +function (f) { +return (f == 0 ? 0 : Float.floatToIntBits (f)); +}, "~N"); +Clazz.overrideMethod (c$, "equals", +function (t1) { +if (!(Clazz.instanceOf (t1, javajs.util.T3))) return false; +var t2 = t1; +return (this.x == t2.x && this.y == t2.y && this.z == t2.z); +}, "~O"); +Clazz.overrideMethod (c$, "toString", +function () { +return "{" + this.x + ", " + this.y + ", " + this.z + "}"; +}); +Clazz.overrideMethod (c$, "toJSON", +function () { +return "[" + this.x + "," + this.y + "," + this.z + "]"; +}); +}); diff --git a/bin/javajs/util/T3d.js b/bin/javajs/util/T3d.js index 4040423..984370c 100644 --- a/bin/javajs/util/T3d.js +++ b/bin/javajs/util/T3d.js @@ -1,87 +1,87 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (null, "javajs.util.T3d", ["java.lang.Double"], function () { -c$ = Clazz.decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.z = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "T3d", null, java.io.Serializable); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "set", -function (x, y, z) { -this.x = x; -this.y = y; -this.z = z; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "setA", -function (t) { -this.x = t[0]; -this.y = t[1]; -this.z = t[2]; -}, "~A"); -Clazz.defineMethod (c$, "setT", -function (t1) { -this.x = t1.x; -this.y = t1.y; -this.z = t1.z; -}, "javajs.util.T3d"); -Clazz.defineMethod (c$, "add2", -function (t1, t2) { -this.x = t1.x + t2.x; -this.y = t1.y + t2.y; -this.z = t1.z + t2.z; -}, "javajs.util.T3d,javajs.util.T3d"); -Clazz.defineMethod (c$, "add", -function (t1) { -this.x += t1.x; -this.y += t1.y; -this.z += t1.z; -}, "javajs.util.T3d"); -Clazz.defineMethod (c$, "sub2", -function (t1, t2) { -this.x = t1.x - t2.x; -this.y = t1.y - t2.y; -this.z = t1.z - t2.z; -}, "javajs.util.T3d,javajs.util.T3d"); -Clazz.defineMethod (c$, "sub", -function (t1) { -this.x -= t1.x; -this.y -= t1.y; -this.z -= t1.z; -}, "javajs.util.T3d"); -Clazz.defineMethod (c$, "scale", -function (s) { -this.x *= s; -this.y *= s; -this.z *= s; -}, "~N"); -Clazz.defineMethod (c$, "scaleAdd", -function (s, t1, t2) { -this.x = s * t1.x + t2.x; -this.y = s * t1.y + t2.y; -this.z = s * t1.z + t2.z; -}, "~N,javajs.util.T3d,javajs.util.T3d"); -Clazz.overrideMethod (c$, "hashCode", -function () { -var xbits = javajs.util.T3d.doubleToLongBits0 (this.x); -var ybits = javajs.util.T3d.doubleToLongBits0 (this.y); -var zbits = javajs.util.T3d.doubleToLongBits0 (this.z); -return (xbits ^ (xbits >> 32) ^ ybits ^ (ybits >> 32) ^ zbits ^ (zbits >> 32)); -}); -c$.doubleToLongBits0 = Clazz.defineMethod (c$, "doubleToLongBits0", -function (d) { -return (d == 0 ? 0 : Double.doubleToLongBits (d)); -}, "~N"); -Clazz.overrideMethod (c$, "equals", -function (t1) { -if (!(Clazz.instanceOf (t1, javajs.util.T3d))) return false; -var t2 = t1; -return (this.x == t2.x && this.y == t2.y && this.z == t2.z); -}, "~O"); -Clazz.overrideMethod (c$, "toString", -function () { -return "{" + this.x + ", " + this.y + ", " + this.z + "}"; -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (null, "javajs.util.T3d", ["java.lang.Double"], function () { +c$ = Clazz.decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.z = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "T3d", null, java.io.Serializable); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "set", +function (x, y, z) { +this.x = x; +this.y = y; +this.z = z; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "setA", +function (t) { +this.x = t[0]; +this.y = t[1]; +this.z = t[2]; +}, "~A"); +Clazz.defineMethod (c$, "setT", +function (t1) { +this.x = t1.x; +this.y = t1.y; +this.z = t1.z; +}, "javajs.util.T3d"); +Clazz.defineMethod (c$, "add2", +function (t1, t2) { +this.x = t1.x + t2.x; +this.y = t1.y + t2.y; +this.z = t1.z + t2.z; +}, "javajs.util.T3d,javajs.util.T3d"); +Clazz.defineMethod (c$, "add", +function (t1) { +this.x += t1.x; +this.y += t1.y; +this.z += t1.z; +}, "javajs.util.T3d"); +Clazz.defineMethod (c$, "sub2", +function (t1, t2) { +this.x = t1.x - t2.x; +this.y = t1.y - t2.y; +this.z = t1.z - t2.z; +}, "javajs.util.T3d,javajs.util.T3d"); +Clazz.defineMethod (c$, "sub", +function (t1) { +this.x -= t1.x; +this.y -= t1.y; +this.z -= t1.z; +}, "javajs.util.T3d"); +Clazz.defineMethod (c$, "scale", +function (s) { +this.x *= s; +this.y *= s; +this.z *= s; +}, "~N"); +Clazz.defineMethod (c$, "scaleAdd", +function (s, t1, t2) { +this.x = s * t1.x + t2.x; +this.y = s * t1.y + t2.y; +this.z = s * t1.z + t2.z; +}, "~N,javajs.util.T3d,javajs.util.T3d"); +Clazz.overrideMethod (c$, "hashCode", +function () { +var xbits = javajs.util.T3d.doubleToLongBits0 (this.x); +var ybits = javajs.util.T3d.doubleToLongBits0 (this.y); +var zbits = javajs.util.T3d.doubleToLongBits0 (this.z); +return (xbits ^ (xbits >> 32) ^ ybits ^ (ybits >> 32) ^ zbits ^ (zbits >> 32)); +}); +c$.doubleToLongBits0 = Clazz.defineMethod (c$, "doubleToLongBits0", +function (d) { +return (d == 0 ? 0 : Double.doubleToLongBits (d)); +}, "~N"); +Clazz.overrideMethod (c$, "equals", +function (t1) { +if (!(Clazz.instanceOf (t1, javajs.util.T3d))) return false; +var t2 = t1; +return (this.x == t2.x && this.y == t2.y && this.z == t2.z); +}, "~O"); +Clazz.overrideMethod (c$, "toString", +function () { +return "{" + this.x + ", " + this.y + ", " + this.z + "}"; +}); +}); diff --git a/bin/javajs/util/T3i.js b/bin/javajs/util/T3i.js index bc24bf4..43b9910 100644 --- a/bin/javajs/util/T3i.js +++ b/bin/javajs/util/T3i.js @@ -1,48 +1,48 @@ -Clazz.declarePackage ("javajs.util"); -c$ = Clazz.decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.z = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "T3i", null, java.io.Serializable); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.defineMethod (c$, "set", -function (x, y, z) { -this.x = x; -this.y = y; -this.z = z; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "setT", -function (t1) { -this.x = t1.x; -this.y = t1.y; -this.z = t1.z; -}, "javajs.util.T3i"); -Clazz.defineMethod (c$, "add", -function (t) { -this.x += t.x; -this.y += t.y; -this.z += t.z; -}, "javajs.util.T3i"); -Clazz.defineMethod (c$, "scaleAdd", -function (s, t1, t2) { -this.x = s * t1.x + t2.x; -this.y = s * t1.y + t2.y; -this.z = s * t1.z + t2.z; -}, "~N,javajs.util.T3i,javajs.util.T3i"); -Clazz.overrideMethod (c$, "hashCode", -function () { -return this.x ^ this.y ^ this.z; -}); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (!(Clazz.instanceOf (o, javajs.util.T3i))) return false; -var t = o; -return (this.x == t.x && this.y == t.y && this.z == t.z); -}, "~O"); -Clazz.overrideMethod (c$, "toString", -function () { -return "(" + this.x + ", " + this.y + ", " + this.z + ")"; -}); +Clazz.declarePackage ("javajs.util"); +c$ = Clazz.decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.z = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "T3i", null, java.io.Serializable); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.defineMethod (c$, "set", +function (x, y, z) { +this.x = x; +this.y = y; +this.z = z; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "setT", +function (t1) { +this.x = t1.x; +this.y = t1.y; +this.z = t1.z; +}, "javajs.util.T3i"); +Clazz.defineMethod (c$, "add", +function (t) { +this.x += t.x; +this.y += t.y; +this.z += t.z; +}, "javajs.util.T3i"); +Clazz.defineMethod (c$, "scaleAdd", +function (s, t1, t2) { +this.x = s * t1.x + t2.x; +this.y = s * t1.y + t2.y; +this.z = s * t1.z + t2.z; +}, "~N,javajs.util.T3i,javajs.util.T3i"); +Clazz.overrideMethod (c$, "hashCode", +function () { +return this.x ^ this.y ^ this.z; +}); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (!(Clazz.instanceOf (o, javajs.util.T3i))) return false; +var t = o; +return (this.x == t.x && this.y == t.y && this.z == t.z); +}, "~O"); +Clazz.overrideMethod (c$, "toString", +function () { +return "(" + this.x + ", " + this.y + ", " + this.z + ")"; +}); diff --git a/bin/javajs/util/T4.js b/bin/javajs/util/T4.js index 3ea8edd..d33a2c7 100644 --- a/bin/javajs/util/T4.js +++ b/bin/javajs/util/T4.js @@ -1,37 +1,37 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.T3"], "javajs.util.T4", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.w = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "T4", javajs.util.T3); -Clazz.defineMethod (c$, "set4", -function (x, y, z, w) { -this.x = x; -this.y = y; -this.z = z; -this.w = w; -}, "~N,~N,~N,~N"); -Clazz.defineMethod (c$, "scale4", -function (s) { -this.scale (s); -this.w *= s; -}, "~N"); -Clazz.overrideMethod (c$, "hashCode", -function () { -return javajs.util.T3.floatToIntBits0 (this.x) ^ javajs.util.T3.floatToIntBits0 (this.y) ^ javajs.util.T3.floatToIntBits0 (this.z) ^ javajs.util.T3.floatToIntBits0 (this.w); -}); -Clazz.overrideMethod (c$, "equals", -function (o) { -if (!(Clazz.instanceOf (o, javajs.util.T4))) return false; -var t = o; -return (this.x == t.x && this.y == t.y && this.z == t.z && this.w == t.w); -}, "~O"); -Clazz.overrideMethod (c$, "toString", -function () { -return "(" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + ")"; -}); -Clazz.overrideMethod (c$, "toJSON", -function () { -return "[" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + "]"; -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.T3"], "javajs.util.T4", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.w = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "T4", javajs.util.T3); +Clazz.defineMethod (c$, "set4", +function (x, y, z, w) { +this.x = x; +this.y = y; +this.z = z; +this.w = w; +}, "~N,~N,~N,~N"); +Clazz.defineMethod (c$, "scale4", +function (s) { +this.scale (s); +this.w *= s; +}, "~N"); +Clazz.overrideMethod (c$, "hashCode", +function () { +return javajs.util.T3.floatToIntBits0 (this.x) ^ javajs.util.T3.floatToIntBits0 (this.y) ^ javajs.util.T3.floatToIntBits0 (this.z) ^ javajs.util.T3.floatToIntBits0 (this.w); +}); +Clazz.overrideMethod (c$, "equals", +function (o) { +if (!(Clazz.instanceOf (o, javajs.util.T4))) return false; +var t = o; +return (this.x == t.x && this.y == t.y && this.z == t.z && this.w == t.w); +}, "~O"); +Clazz.overrideMethod (c$, "toString", +function () { +return "(" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + ")"; +}); +Clazz.overrideMethod (c$, "toJSON", +function () { +return "[" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + "]"; +}); +}); diff --git a/bin/javajs/util/V3.js b/bin/javajs/util/V3.js index 37591c1..28f7077 100644 --- a/bin/javajs/util/V3.js +++ b/bin/javajs/util/V3.js @@ -1,31 +1,31 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.T3"], "javajs.util.V3", null, function () { -c$ = Clazz.declareType (javajs.util, "V3", javajs.util.T3); -Clazz.makeConstructor (c$, -function () { -}); -c$.newV = Clazz.defineMethod (c$, "newV", -function (t) { -return javajs.util.V3.new3 (t.x, t.y, t.z); -}, "javajs.util.T3"); -c$.newVsub = Clazz.defineMethod (c$, "newVsub", -function (t1, t2) { -return javajs.util.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z); -}, "javajs.util.T3,javajs.util.T3"); -c$.new3 = Clazz.defineMethod (c$, "new3", -function (x, y, z) { -var v = new javajs.util.V3 (); -v.x = x; -v.y = y; -v.z = z; -return v; -}, "~N,~N,~N"); -Clazz.defineMethod (c$, "angle", -function (v1) { -var xx = this.y * v1.z - this.z * v1.y; -var yy = this.z * v1.x - this.x * v1.z; -var zz = this.x * v1.y - this.y * v1.x; -var cross = Math.sqrt (xx * xx + yy * yy + zz * zz); -return Math.abs (Math.atan2 (cross, this.dot (v1))); -}, "javajs.util.V3"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.T3"], "javajs.util.V3", null, function () { +c$ = Clazz.declareType (javajs.util, "V3", javajs.util.T3); +Clazz.makeConstructor (c$, +function () { +}); +c$.newV = Clazz.defineMethod (c$, "newV", +function (t) { +return javajs.util.V3.new3 (t.x, t.y, t.z); +}, "javajs.util.T3"); +c$.newVsub = Clazz.defineMethod (c$, "newVsub", +function (t1, t2) { +return javajs.util.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z); +}, "javajs.util.T3,javajs.util.T3"); +c$.new3 = Clazz.defineMethod (c$, "new3", +function (x, y, z) { +var v = new javajs.util.V3 (); +v.x = x; +v.y = y; +v.z = z; +return v; +}, "~N,~N,~N"); +Clazz.defineMethod (c$, "angle", +function (v1) { +var xx = this.y * v1.z - this.z * v1.y; +var yy = this.z * v1.x - this.x * v1.z; +var zz = this.x * v1.y - this.y * v1.x; +var cross = Math.sqrt (xx * xx + yy * yy + zz * zz); +return Math.abs (Math.atan2 (cross, this.dot (v1))); +}, "javajs.util.V3"); +}); diff --git a/bin/javajs/util/V3d.js b/bin/javajs/util/V3d.js index 729c5a3..c3a166e 100644 --- a/bin/javajs/util/V3d.js +++ b/bin/javajs/util/V3d.js @@ -1,27 +1,27 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (["javajs.util.T3d"], "javajs.util.V3d", null, function () { -c$ = Clazz.declareType (javajs.util, "V3d", javajs.util.T3d); -Clazz.defineMethod (c$, "cross", -function (v1, v2) { -this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); -}, "javajs.util.V3d,javajs.util.V3d"); -Clazz.defineMethod (c$, "normalize", -function () { -var d = this.length (); -this.x /= d; -this.y /= d; -this.z /= d; -}); -Clazz.defineMethod (c$, "dot", -function (v) { -return this.x * v.x + this.y * v.y + this.z * v.z; -}, "javajs.util.V3d"); -Clazz.defineMethod (c$, "lengthSquared", -function () { -return this.x * this.x + this.y * this.y + this.z * this.z; -}); -Clazz.defineMethod (c$, "length", -function () { -return Math.sqrt (this.lengthSquared ()); -}); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.util.T3d"], "javajs.util.V3d", null, function () { +c$ = Clazz.declareType (javajs.util, "V3d", javajs.util.T3d); +Clazz.defineMethod (c$, "cross", +function (v1, v2) { +this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); +}, "javajs.util.V3d,javajs.util.V3d"); +Clazz.defineMethod (c$, "normalize", +function () { +var d = this.length (); +this.x /= d; +this.y /= d; +this.z /= d; +}); +Clazz.defineMethod (c$, "dot", +function (v) { +return this.x * v.x + this.y * v.y + this.z * v.z; +}, "javajs.util.V3d"); +Clazz.defineMethod (c$, "lengthSquared", +function () { +return this.x * this.x + this.y * this.y + this.z * this.z; +}); +Clazz.defineMethod (c$, "length", +function () { +return Math.sqrt (this.lengthSquared ()); +}); +}); diff --git a/bin/javajs/util/XmlUtil.js b/bin/javajs/util/XmlUtil.js index ee4fff9..68b0ce4 100644 --- a/bin/javajs/util/XmlUtil.js +++ b/bin/javajs/util/XmlUtil.js @@ -1,73 +1,73 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (null, "javajs.util.XmlUtil", ["javajs.util.PT"], function () { -c$ = Clazz.declareType (javajs.util, "XmlUtil"); -Clazz.makeConstructor (c$, -function () { -}); -c$.openDocument = Clazz.defineMethod (c$, "openDocument", -function (data) { -data.append ("\n"); -}, "javajs.util.SB"); -c$.openTag = Clazz.defineMethod (c$, "openTag", -function (sb, name) { -sb.append ("<").append (name).append (">\n"); -}, "javajs.util.SB,~S"); -c$.openTagAttr = Clazz.defineMethod (c$, "openTagAttr", -function (sb, name, attributes) { -javajs.util.XmlUtil.appendTagAll (sb, name, attributes, null, false, false); -sb.append ("\n"); -}, "javajs.util.SB,~S,~A"); -c$.closeTag = Clazz.defineMethod (c$, "closeTag", -function (sb, name) { -sb.append ("\n"); -}, "javajs.util.SB,~S"); -c$.appendTagAll = Clazz.defineMethod (c$, "appendTagAll", -function (sb, name, attributes, data, isCdata, doClose) { -var closer = ">"; -if (name.endsWith ("/")) { -name = name.substring (0, name.length - 1); -if (data == null) { -closer = "/>\n"; -doClose = false; -}}sb.append ("<").append (name); -if (attributes != null) for (var i = 0; i < attributes.length; i++) { -var o = attributes[i]; -if (o == null) continue; -if (Clazz.instanceOf (o, Array)) for (var j = 0; j < (o).length; j += 2) javajs.util.XmlUtil.appendAttrib (sb, (o)[j], (o)[j + 1]); - - else javajs.util.XmlUtil.appendAttrib (sb, o, attributes[++i]); -} -sb.append (closer); -if (data != null) { -if (isCdata) data = javajs.util.XmlUtil.wrapCdata (data); -sb.appendO (data); -}if (doClose) javajs.util.XmlUtil.closeTag (sb, name); -}, "javajs.util.SB,~S,~A,~O,~B,~B"); -c$.wrapCdata = Clazz.defineMethod (c$, "wrapCdata", -function (data) { -var s = "" + data; -return (s.indexOf ("&") < 0 && s.indexOf ("<") < 0 ? (s.startsWith ("\n") ? "" : "\n") + s : "", "]]]]>") + "]]>"); -}, "~O"); -c$.unwrapCdata = Clazz.defineMethod (c$, "unwrapCdata", -function (s) { -return (s.startsWith ("") ? javajs.util.PT.rep (s.substring (9, s.length - 3), "]]]]>", "]]>") : s); -}, "~S"); -c$.appendTagObj = Clazz.defineMethod (c$, "appendTagObj", -function (sb, name, attributes, data) { -javajs.util.XmlUtil.appendTagAll (sb, name, attributes, data, false, true); -}, "javajs.util.SB,~S,~A,~O"); -c$.appendTag = Clazz.defineMethod (c$, "appendTag", -function (sb, name, data) { -if (Clazz.instanceOf (data, Array)) javajs.util.XmlUtil.appendTagAll (sb, name, data, null, false, true); - else javajs.util.XmlUtil.appendTagAll (sb, name, null, data, false, true); -}, "javajs.util.SB,~S,~O"); -c$.appendCdata = Clazz.defineMethod (c$, "appendCdata", -function (sb, name, attributes, data) { -javajs.util.XmlUtil.appendTagAll (sb, name, attributes, data, true, true); -}, "javajs.util.SB,~S,~A,~S"); -c$.appendAttrib = Clazz.defineMethod (c$, "appendAttrib", -function (sb, name, value) { -if (value == null) return; -sb.append (" ").appendO (name).append ("=\"").appendO (value).append ("\""); -}, "javajs.util.SB,~O,~O"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (null, "javajs.util.XmlUtil", ["javajs.util.PT"], function () { +c$ = Clazz.declareType (javajs.util, "XmlUtil"); +Clazz.makeConstructor (c$, +function () { +}); +c$.openDocument = Clazz.defineMethod (c$, "openDocument", +function (data) { +data.append ("\n"); +}, "javajs.util.SB"); +c$.openTag = Clazz.defineMethod (c$, "openTag", +function (sb, name) { +sb.append ("<").append (name).append (">\n"); +}, "javajs.util.SB,~S"); +c$.openTagAttr = Clazz.defineMethod (c$, "openTagAttr", +function (sb, name, attributes) { +javajs.util.XmlUtil.appendTagAll (sb, name, attributes, null, false, false); +sb.append ("\n"); +}, "javajs.util.SB,~S,~A"); +c$.closeTag = Clazz.defineMethod (c$, "closeTag", +function (sb, name) { +sb.append ("\n"); +}, "javajs.util.SB,~S"); +c$.appendTagAll = Clazz.defineMethod (c$, "appendTagAll", +function (sb, name, attributes, data, isCdata, doClose) { +var closer = ">"; +if (name.endsWith ("/")) { +name = name.substring (0, name.length - 1); +if (data == null) { +closer = "/>\n"; +doClose = false; +}}sb.append ("<").append (name); +if (attributes != null) for (var i = 0; i < attributes.length; i++) { +var o = attributes[i]; +if (o == null) continue; +if (Clazz.instanceOf (o, Array)) for (var j = 0; j < (o).length; j += 2) javajs.util.XmlUtil.appendAttrib (sb, (o)[j], (o)[j + 1]); + + else javajs.util.XmlUtil.appendAttrib (sb, o, attributes[++i]); +} +sb.append (closer); +if (data != null) { +if (isCdata) data = javajs.util.XmlUtil.wrapCdata (data); +sb.appendO (data); +}if (doClose) javajs.util.XmlUtil.closeTag (sb, name); +}, "javajs.util.SB,~S,~A,~O,~B,~B"); +c$.wrapCdata = Clazz.defineMethod (c$, "wrapCdata", +function (data) { +var s = "" + data; +return (s.indexOf ("&") < 0 && s.indexOf ("<") < 0 ? (s.startsWith ("\n") ? "" : "\n") + s : "", "]]]]>") + "]]>"); +}, "~O"); +c$.unwrapCdata = Clazz.defineMethod (c$, "unwrapCdata", +function (s) { +return (s.startsWith ("") ? javajs.util.PT.rep (s.substring (9, s.length - 3), "]]]]>", "]]>") : s); +}, "~S"); +c$.appendTagObj = Clazz.defineMethod (c$, "appendTagObj", +function (sb, name, attributes, data) { +javajs.util.XmlUtil.appendTagAll (sb, name, attributes, data, false, true); +}, "javajs.util.SB,~S,~A,~O"); +c$.appendTag = Clazz.defineMethod (c$, "appendTag", +function (sb, name, data) { +if (Clazz.instanceOf (data, Array)) javajs.util.XmlUtil.appendTagAll (sb, name, data, null, false, true); + else javajs.util.XmlUtil.appendTagAll (sb, name, null, data, false, true); +}, "javajs.util.SB,~S,~O"); +c$.appendCdata = Clazz.defineMethod (c$, "appendCdata", +function (sb, name, attributes, data) { +javajs.util.XmlUtil.appendTagAll (sb, name, attributes, data, true, true); +}, "javajs.util.SB,~S,~A,~S"); +c$.appendAttrib = Clazz.defineMethod (c$, "appendAttrib", +function (sb, name, value) { +if (value == null) return; +sb.append (" ").appendO (name).append ("=\"").appendO (value).append ("\""); +}, "javajs.util.SB,~O,~O"); +}); diff --git a/bin/javajs/util/ZipData.js b/bin/javajs/util/ZipData.js index 8f318ca..8d9db8e 100644 --- a/bin/javajs/util/ZipData.js +++ b/bin/javajs/util/ZipData.js @@ -1,45 +1,45 @@ -Clazz.declarePackage ("javajs.util"); -Clazz.load (null, "javajs.util.ZipData", ["javajs.util.Rdr", "$.ZipTools"], function () { -c$ = Clazz.decorateAsClass (function () { -this.isEnabled = true; -this.buf = null; -this.pt = 0; -this.nBytes = 0; -Clazz.instantialize (this, arguments); -}, javajs.util, "ZipData"); -Clazz.makeConstructor (c$, -function (nBytes) { -this.nBytes = nBytes; -}, "~N"); -Clazz.defineMethod (c$, "addBytes", -function (byteBuf, nSectorBytes, nBytesRemaining) { -if (this.pt == 0) { -if (!javajs.util.Rdr.isGzipB (byteBuf)) { -this.isEnabled = false; -return -1; -}this.buf = Clazz.newByteArray (nBytesRemaining, 0); -}var nToAdd = Math.min (nSectorBytes, nBytesRemaining); -System.arraycopy (byteBuf, 0, this.buf, this.pt, nToAdd); -this.pt += nToAdd; -return nBytesRemaining - nToAdd; -}, "~A,~N,~N"); -Clazz.defineMethod (c$, "addTo", -function (jzt, data) { -data.append (javajs.util.ZipData.getGzippedBytesAsString (jzt, this.buf)); -}, "javajs.api.GenericZipTools,javajs.util.SB"); -c$.getGzippedBytesAsString = Clazz.defineMethod (c$, "getGzippedBytesAsString", -function (jzt, bytes) { -try { -var bis = jzt.getUnGzippedInputStream (bytes); -var s = javajs.util.ZipTools.getStreamAsString (bis); -bis.close (); -return s; -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -return ""; -} else { -throw e; -} -} -}, "javajs.api.GenericZipTools,~A"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (null, "javajs.util.ZipData", ["javajs.util.Rdr", "$.ZipTools"], function () { +c$ = Clazz.decorateAsClass (function () { +this.isEnabled = true; +this.buf = null; +this.pt = 0; +this.nBytes = 0; +Clazz.instantialize (this, arguments); +}, javajs.util, "ZipData"); +Clazz.makeConstructor (c$, +function (nBytes) { +this.nBytes = nBytes; +}, "~N"); +Clazz.defineMethod (c$, "addBytes", +function (byteBuf, nSectorBytes, nBytesRemaining) { +if (this.pt == 0) { +if (!javajs.util.Rdr.isGzipB (byteBuf)) { +this.isEnabled = false; +return -1; +}this.buf = Clazz.newByteArray (nBytesRemaining, 0); +}var nToAdd = Math.min (nSectorBytes, nBytesRemaining); +System.arraycopy (byteBuf, 0, this.buf, this.pt, nToAdd); +this.pt += nToAdd; +return nBytesRemaining - nToAdd; +}, "~A,~N,~N"); +Clazz.defineMethod (c$, "addTo", +function (jzt, data) { +data.append (javajs.util.ZipData.getGzippedBytesAsString (jzt, this.buf)); +}, "javajs.api.GenericZipTools,javajs.util.SB"); +c$.getGzippedBytesAsString = Clazz.defineMethod (c$, "getGzippedBytesAsString", +function (jzt, bytes) { +try { +var bis = jzt.getUnGzippedInputStream (bytes); +var s = javajs.util.ZipTools.getStreamAsString (bis); +bis.close (); +return s; +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +return ""; +} else { +throw e; +} +} +}, "javajs.api.GenericZipTools,~A"); +}); diff --git a/bin/javajs/util/ZipTools.class b/bin/javajs/util/ZipTools.class index ee31ca79d3e6ff163f98b98107cdeec9f2d9a37f..6d95ca3e4a9f285bb05bc49b69278cc597c18ad0 100644 GIT binary patch delta 75 zcmV-R0JQ(PWQ=666d3_WvlSWE0tRpZ3I70ElkpoDvo0LN4FT`7@+q>71OEU5v+*0+4FT}8%qg+~ z13dr_lYuKSAPoW%9v)8z0Sy)a0ReLXbN~VXBme*a0s)Z#2><{D= 0); -var bytes = javajs.util.Rdr.getLimitedStreamBytes (zis, ze.getSize ()); -var str; -if (asBinaryString) { -str = this.getBinaryStringForBytes (bytes); -name += ":asBinaryString"; -} else { -str = javajs.util.Rdr.fixUTF (bytes); -}str = "BEGIN Directory Entry " + name + "\n" + str + "\nEND Directory Entry " + name + "\n"; -fileData.put (name0 + "|" + name, str); -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -fileData.put ("#Directory_Listing", listing.toString ()); -}, "java.io.InputStream,~A,~S,~S,java.util.Map"); -Clazz.defineMethod (c$, "getBinaryStringForBytes", -($fz = function (bytes) { -var ret = new javajs.util.SB (); -for (var i = 0; i < bytes.length; i++) ret.append (Integer.toHexString (bytes[i] & 0xFF)).appendC (' '); - -return ret.toString (); -}, $fz.isPrivate = true, $fz), "~A"); -Clazz.overrideMethod (c$, "getZipFileDirectory", -function (bis, list, listPtr, asBufferedInputStream) { -var ret; -if (list == null || listPtr >= list.length) return this.getZipDirectoryAsStringAndClose (bis); -bis = javajs.util.Rdr.getPngZipStream (bis, true); -var fileName = list[listPtr]; -var zis = new java.util.zip.ZipInputStream (bis); -var ze; -try { -var isAll = (fileName.equals (".")); -if (isAll || fileName.lastIndexOf ("/") == fileName.length - 1) { -ret = new javajs.util.SB (); -while ((ze = zis.getNextEntry ()) != null) { -var name = ze.getName (); -if (isAll || name.startsWith (fileName)) ret.append (name).appendC ('\n'); -} -var str = ret.toString (); -return (asBufferedInputStream ? javajs.util.Rdr.getBIS (str.getBytes ()) : str); -}var pt = fileName.indexOf (":asBinaryString"); -var asBinaryString = (pt > 0); -if (asBinaryString) fileName = fileName.substring (0, pt); -fileName = fileName.$replace ('\\', '/'); -while ((ze = zis.getNextEntry ()) != null && !fileName.equals (ze.getName ())) { -} -var bytes = (ze == null ? null : javajs.util.Rdr.getLimitedStreamBytes (zis, ze.getSize ())); -ze = null; -zis.close (); -if (bytes == null) return ""; -if (javajs.util.Rdr.isZipB (bytes) || javajs.util.Rdr.isPngZipB (bytes)) return this.getZipFileDirectory (javajs.util.Rdr.getBIS (bytes), list, ++listPtr, asBufferedInputStream); -if (asBufferedInputStream) return javajs.util.Rdr.getBIS (bytes); -if (asBinaryString) { -ret = new javajs.util.SB (); -for (var i = 0; i < bytes.length; i++) ret.append (Integer.toHexString (bytes[i] & 0xFF)).appendC (' '); - -return ret.toString (); -}if (javajs.util.Rdr.isGzipB (bytes)) bytes = javajs.util.Rdr.getLimitedStreamBytes (this.getUnGzippedInputStream (bytes), -1); -return javajs.util.Rdr.fixUTF (bytes); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -return ""; -} else { -throw e; -} -} -}, "java.io.BufferedInputStream,~A,~N,~B"); -Clazz.overrideMethod (c$, "getZipFileContentsAsBytes", -function (bis, list, listPtr) { -var ret = Clazz.newByteArray (0, 0); -var fileName = list[listPtr]; -if (fileName.lastIndexOf ("/") == fileName.length - 1) return ret; -try { -bis = javajs.util.Rdr.getPngZipStream (bis, true); -var zis = new java.util.zip.ZipInputStream (bis); -var ze; -while ((ze = zis.getNextEntry ()) != null) { -if (!fileName.equals (ze.getName ())) continue; -var bytes = javajs.util.Rdr.getLimitedStreamBytes (zis, ze.getSize ()); -return ((javajs.util.Rdr.isZipB (bytes) || javajs.util.Rdr.isPngZipB (bytes)) && ++listPtr < list.length ? this.getZipFileContentsAsBytes (javajs.util.Rdr.getBIS (bytes), list, listPtr) : bytes); -} -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -return ret; -}, "java.io.BufferedInputStream,~A,~N"); -Clazz.overrideMethod (c$, "getZipDirectoryAsStringAndClose", -function (bis) { -var sb = new javajs.util.SB (); -var s = new Array (0); -try { -s = this.getZipDirectoryOrErrorAndClose (bis, null); -bis.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -for (var i = 0; i < s.length; i++) sb.append (s[i]).appendC ('\n'); - -return sb.toString (); -}, "java.io.BufferedInputStream"); -Clazz.overrideMethod (c$, "getZipDirectoryAndClose", -function (bis, manifestID) { -var s = new Array (0); -try { -s = this.getZipDirectoryOrErrorAndClose (bis, manifestID); -bis.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -System.out.println (e.toString ()); -} else { -throw e; -} -} -return s; -}, "java.io.BufferedInputStream,~S"); -Clazz.defineMethod (c$, "getZipDirectoryOrErrorAndClose", -($fz = function (bis, manifestID) { -bis = javajs.util.Rdr.getPngZipStream (bis, true); -var v = new javajs.util.Lst (); -var zis = new java.util.zip.ZipInputStream (bis); -var ze; -var manifest = null; -while ((ze = zis.getNextEntry ()) != null) { -var fileName = ze.getName (); -if (manifestID != null && fileName.startsWith (manifestID)) manifest = javajs.util.ZipTools.getStreamAsString (zis); - else if (!fileName.startsWith ("__MACOS")) v.addLast (fileName); -} -zis.close (); -if (manifestID != null) v.add (0, manifest == null ? "" : manifest + "\n############\n"); -return v.toArray ( new Array (v.size ())); -}, $fz.isPrivate = true, $fz), "java.io.BufferedInputStream,~S"); -c$.getStreamAsString = Clazz.defineMethod (c$, "getStreamAsString", -function (is) { -return javajs.util.Rdr.fixUTF (javajs.util.Rdr.getLimitedStreamBytes (is, -1)); -}, "java.io.InputStream"); -Clazz.overrideMethod (c$, "newGZIPInputStream", -function (is) { -return new java.io.BufferedInputStream ( new java.util.zip.GZIPInputStream (is, 512)); -}, "java.io.InputStream"); -Clazz.overrideMethod (c$, "getUnGzippedInputStream", -function (bytes) { -try { -return javajs.util.Rdr.getUnzippedInputStream (this, javajs.util.Rdr.getBIS (bytes)); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -return null; -} else { -throw e; -} -} -}, "~A"); -Clazz.overrideMethod (c$, "addZipEntry", -function (zos, fileName) { -(zos).putNextEntry ( new java.util.zip.ZipEntry (fileName)); -}, "~O,~S"); -Clazz.overrideMethod (c$, "closeZipEntry", -function (zos) { -(zos).closeEntry (); -}, "~O"); -Clazz.overrideMethod (c$, "getZipOutputStream", -function (bos) { -{ -return javajs.api.Interface.getInterface( -"java.util.zip.ZipOutputStream").setZOS(bos); -}}, "~O"); -Clazz.overrideMethod (c$, "getCrcValue", -function (bytes) { -var crc = new java.util.zip.CRC32 (); -crc.update (bytes, 0, bytes.length); -return crc.getValue (); -}, "~A"); -Clazz.overrideMethod (c$, "readFileAsMap", -function (bis, bdata, name) { -var pt = (name == null ? -1 : name.indexOf ("|")); -name = (pt >= 0 ? name.substring (pt + 1) : null); -try { -if (javajs.util.Rdr.isPngZipStream (bis)) { -var isImage = "_IMAGE_".equals (name); -if (name == null || isImage) bdata.put ((isImage ? "_DATA_" : "_IMAGE_"), new javajs.util.BArray (javajs.util.ZipTools.getPngImageBytes (bis))); -if (!isImage) this.cacheZipContents (bis, name, bdata, true); -} else if (javajs.util.Rdr.isZipS (bis)) { -this.cacheZipContents (bis, name, bdata, true); -} else if (name == null) { -bdata.put ("_DATA_", new javajs.util.BArray (javajs.util.Rdr.getLimitedStreamBytes (bis, -1))); -} else { -throw new java.io.IOException ("ZIP file " + name + " not found"); -}bdata.put ("$_BINARY_$", Boolean.TRUE); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -bdata.clear (); -bdata.put ("_ERROR_", e.getMessage ()); -} else { -throw e; -} -} -}, "java.io.BufferedInputStream,java.util.Map,~S"); -Clazz.overrideMethod (c$, "cacheZipContents", -function (bis, fileName, cache, asByteArray) { -var zis = javajs.util.ZipTools.newZIS (bis); -var ze; -var listing = new javajs.util.SB (); -var n = 0; -var oneFile = (asByteArray && fileName != null); -var pt = (oneFile ? fileName.indexOf ("|") : -1); -var file0 = (pt >= 0 ? fileName : null); -if (pt >= 0) fileName = fileName.substring (0, pt); -try { -while ((ze = zis.getNextEntry ()) != null) { -var name = ze.getName (); -if (fileName != null) { -if (oneFile) { -if (!name.equalsIgnoreCase (fileName)) continue; -} else { -listing.append (name).appendC ('\n'); -}}var nBytes = ze.getSize (); -var bytes = javajs.util.Rdr.getLimitedStreamBytes (zis, nBytes); -if (file0 != null) { -this.readFileAsMap (javajs.util.Rdr.getBIS (bytes), cache, file0); -return null; -}n += bytes.length; -var o = (asByteArray ? new javajs.util.BArray (bytes) : bytes); -cache.put ((oneFile ? "_DATA_" : (fileName == null ? "" : fileName + "|") + name), o); -if (oneFile) break; -} -zis.close (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -try { -zis.close (); -} catch (e1) { -if (Clazz.exceptionOf (e1, java.io.IOException)) { -} else { -throw e1; -} -} -return null; -} else { -throw e; -} -} -if (n == 0 || fileName == null) return null; -System.out.println ("ZipTools cached " + n + " bytes from " + fileName); -return listing.toString (); -}, "java.io.BufferedInputStream,~S,java.util.Map,~B"); -c$.getPngImageBytes = Clazz.defineMethod (c$, "getPngImageBytes", -($fz = function (bis) { -try { -if (javajs.util.Rdr.isPngZipStream (bis)) { -var pt_count = Clazz.newIntArray (2, 0); -javajs.util.Rdr.getPngZipPointAndCount (bis, pt_count); -if (pt_count[1] != 0) return javajs.util.ZipTools.deActivatePngZipB (javajs.util.Rdr.getLimitedStreamBytes (bis, pt_count[0])); -}return javajs.util.Rdr.getLimitedStreamBytes (bis, -1); -} catch (e) { -if (Clazz.exceptionOf (e, java.io.IOException)) { -return null; -} else { -throw e; -} -} -}, $fz.isPrivate = true, $fz), "java.io.BufferedInputStream"); -c$.deActivatePngZipB = Clazz.defineMethod (c$, "deActivatePngZipB", -($fz = function (bytes) { -if (javajs.util.Rdr.isPngZipB (bytes)) bytes[51] = 32; -return bytes; -}, $fz.isPrivate = true, $fz), "~A"); -}); +Clazz.declarePackage ("javajs.util"); +Clazz.load (["javajs.api.GenericZipTools"], "javajs.util.ZipTools", ["java.io.BufferedInputStream", "$.IOException", "java.lang.Boolean", "java.util.zip.CRC32", "$.GZIPInputStream", "$.ZipEntry", "$.ZipInputStream", "javajs.api.GenericZipInputStream", "$.ZInputStream", "javajs.util.BArray", "$.Lst", "$.PT", "$.Rdr", "$.SB"], function () { +c$ = Clazz.declareType (javajs.util, "ZipTools", null, javajs.api.GenericZipTools); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.overrideMethod (c$, "newZipInputStream", +function (is) { +return javajs.util.ZipTools.newZIS (is); +}, "java.io.InputStream"); +c$.newZIS = Clazz.defineMethod (c$, "newZIS", +($fz = function (is) { +return (Clazz.instanceOf (is, javajs.api.ZInputStream) ? is : Clazz.instanceOf (is, java.io.BufferedInputStream) ? new javajs.api.GenericZipInputStream (is) : new javajs.api.GenericZipInputStream ( new java.io.BufferedInputStream (is))); +}, $fz.isPrivate = true, $fz), "java.io.InputStream"); +Clazz.overrideMethod (c$, "getAllZipData", +function (is, subfileList, name0, binaryFileList, fileData) { +var zis = javajs.util.ZipTools.newZIS (is); +var ze; +var listing = new javajs.util.SB (); +binaryFileList = "|" + binaryFileList + "|"; +var prefix = javajs.util.PT.join (subfileList, '/', 1); +var prefixd = null; +if (prefix != null) { +prefixd = prefix.substring (0, prefix.indexOf ("/") + 1); +if (prefixd.length == 0) prefixd = null; +}try { +while ((ze = zis.getNextEntry ()) != null) { +var name = ze.getName (); +if (prefix != null && prefixd != null && !(name.equals (prefix) || name.startsWith (prefixd))) continue; +listing.append (name).appendC ('\n'); +var sname = "|" + name.substring (name.lastIndexOf ("/") + 1) + "|"; +var asBinaryString = (binaryFileList.indexOf (sname) >= 0); +var bytes = javajs.util.Rdr.getLimitedStreamBytes (zis, ze.getSize ()); +var str; +if (asBinaryString) { +str = this.getBinaryStringForBytes (bytes); +name += ":asBinaryString"; +} else { +str = javajs.util.Rdr.fixUTF (bytes); +}str = "BEGIN Directory Entry " + name + "\n" + str + "\nEND Directory Entry " + name + "\n"; +fileData.put (name0 + "|" + name, str); +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +fileData.put ("#Directory_Listing", listing.toString ()); +}, "java.io.InputStream,~A,~S,~S,java.util.Map"); +Clazz.defineMethod (c$, "getBinaryStringForBytes", +($fz = function (bytes) { +var ret = new javajs.util.SB (); +for (var i = 0; i < bytes.length; i++) ret.append (Integer.toHexString (bytes[i] & 0xFF)).appendC (' '); + +return ret.toString (); +}, $fz.isPrivate = true, $fz), "~A"); +Clazz.overrideMethod (c$, "getZipFileDirectory", +function (bis, list, listPtr, asBufferedInputStream) { +var ret; +if (list == null || listPtr >= list.length) return this.getZipDirectoryAsStringAndClose (bis); +bis = javajs.util.Rdr.getPngZipStream (bis, true); +var fileName = list[listPtr]; +var zis = new java.util.zip.ZipInputStream (bis); +var ze; +try { +var isAll = (fileName.equals (".")); +if (isAll || fileName.lastIndexOf ("/") == fileName.length - 1) { +ret = new javajs.util.SB (); +while ((ze = zis.getNextEntry ()) != null) { +var name = ze.getName (); +if (isAll || name.startsWith (fileName)) ret.append (name).appendC ('\n'); +} +var str = ret.toString (); +return (asBufferedInputStream ? javajs.util.Rdr.getBIS (str.getBytes ()) : str); +}var pt = fileName.indexOf (":asBinaryString"); +var asBinaryString = (pt > 0); +if (asBinaryString) fileName = fileName.substring (0, pt); +fileName = fileName.$replace ('\\', '/'); +while ((ze = zis.getNextEntry ()) != null && !fileName.equals (ze.getName ())) { +} +var bytes = (ze == null ? null : javajs.util.Rdr.getLimitedStreamBytes (zis, ze.getSize ())); +ze = null; +zis.close (); +if (bytes == null) return ""; +if (javajs.util.Rdr.isZipB (bytes) || javajs.util.Rdr.isPngZipB (bytes)) return this.getZipFileDirectory (javajs.util.Rdr.getBIS (bytes), list, ++listPtr, asBufferedInputStream); +if (asBufferedInputStream) return javajs.util.Rdr.getBIS (bytes); +if (asBinaryString) { +ret = new javajs.util.SB (); +for (var i = 0; i < bytes.length; i++) ret.append (Integer.toHexString (bytes[i] & 0xFF)).appendC (' '); + +return ret.toString (); +}if (javajs.util.Rdr.isGzipB (bytes)) bytes = javajs.util.Rdr.getLimitedStreamBytes (this.getUnGzippedInputStream (bytes), -1); +return javajs.util.Rdr.fixUTF (bytes); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +return ""; +} else { +throw e; +} +} +}, "java.io.BufferedInputStream,~A,~N,~B"); +Clazz.overrideMethod (c$, "getZipFileContentsAsBytes", +function (bis, list, listPtr) { +var ret = Clazz.newByteArray (0, 0); +var fileName = list[listPtr]; +if (fileName.lastIndexOf ("/") == fileName.length - 1) return ret; +try { +bis = javajs.util.Rdr.getPngZipStream (bis, true); +var zis = new java.util.zip.ZipInputStream (bis); +var ze; +while ((ze = zis.getNextEntry ()) != null) { +if (!fileName.equals (ze.getName ())) continue; +var bytes = javajs.util.Rdr.getLimitedStreamBytes (zis, ze.getSize ()); +return ((javajs.util.Rdr.isZipB (bytes) || javajs.util.Rdr.isPngZipB (bytes)) && ++listPtr < list.length ? this.getZipFileContentsAsBytes (javajs.util.Rdr.getBIS (bytes), list, listPtr) : bytes); +} +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +return ret; +}, "java.io.BufferedInputStream,~A,~N"); +Clazz.overrideMethod (c$, "getZipDirectoryAsStringAndClose", +function (bis) { +var sb = new javajs.util.SB (); +var s = new Array (0); +try { +s = this.getZipDirectoryOrErrorAndClose (bis, null); +bis.close (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +for (var i = 0; i < s.length; i++) sb.append (s[i]).appendC ('\n'); + +return sb.toString (); +}, "java.io.BufferedInputStream"); +Clazz.overrideMethod (c$, "getZipDirectoryAndClose", +function (bis, manifestID) { +var s = new Array (0); +try { +s = this.getZipDirectoryOrErrorAndClose (bis, manifestID); +bis.close (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +System.out.println (e.toString ()); +} else { +throw e; +} +} +return s; +}, "java.io.BufferedInputStream,~S"); +Clazz.defineMethod (c$, "getZipDirectoryOrErrorAndClose", +($fz = function (bis, manifestID) { +bis = javajs.util.Rdr.getPngZipStream (bis, true); +var v = new javajs.util.Lst (); +var zis = new java.util.zip.ZipInputStream (bis); +var ze; +var manifest = null; +while ((ze = zis.getNextEntry ()) != null) { +var fileName = ze.getName (); +if (manifestID != null && fileName.startsWith (manifestID)) manifest = javajs.util.ZipTools.getStreamAsString (zis); + else if (!fileName.startsWith ("__MACOS")) v.addLast (fileName); +} +zis.close (); +if (manifestID != null) v.add (0, manifest == null ? "" : manifest + "\n############\n"); +return v.toArray ( new Array (v.size ())); +}, $fz.isPrivate = true, $fz), "java.io.BufferedInputStream,~S"); +c$.getStreamAsString = Clazz.defineMethod (c$, "getStreamAsString", +function (is) { +return javajs.util.Rdr.fixUTF (javajs.util.Rdr.getLimitedStreamBytes (is, -1)); +}, "java.io.InputStream"); +Clazz.overrideMethod (c$, "newGZIPInputStream", +function (is) { +return new java.io.BufferedInputStream ( new java.util.zip.GZIPInputStream (is, 512)); +}, "java.io.InputStream"); +Clazz.overrideMethod (c$, "getUnGzippedInputStream", +function (bytes) { +try { +return javajs.util.Rdr.getUnzippedInputStream (this, javajs.util.Rdr.getBIS (bytes)); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +return null; +} else { +throw e; +} +} +}, "~A"); +Clazz.overrideMethod (c$, "addZipEntry", +function (zos, fileName) { +(zos).putNextEntry ( new java.util.zip.ZipEntry (fileName)); +}, "~O,~S"); +Clazz.overrideMethod (c$, "closeZipEntry", +function (zos) { +(zos).closeEntry (); +}, "~O"); +Clazz.overrideMethod (c$, "getZipOutputStream", +function (bos) { +{ +return javajs.api.Interface.getInterface( +"java.util.zip.ZipOutputStream").setZOS(bos); +}}, "~O"); +Clazz.overrideMethod (c$, "getCrcValue", +function (bytes) { +var crc = new java.util.zip.CRC32 (); +crc.update (bytes, 0, bytes.length); +return crc.getValue (); +}, "~A"); +Clazz.overrideMethod (c$, "readFileAsMap", +function (bis, bdata, name) { +var pt = (name == null ? -1 : name.indexOf ("|")); +name = (pt >= 0 ? name.substring (pt + 1) : null); +try { +if (javajs.util.Rdr.isPngZipStream (bis)) { +var isImage = "_IMAGE_".equals (name); +if (name == null || isImage) bdata.put ((isImage ? "_DATA_" : "_IMAGE_"), new javajs.util.BArray (javajs.util.ZipTools.getPngImageBytes (bis))); +if (!isImage) this.cacheZipContents (bis, name, bdata, true); +} else if (javajs.util.Rdr.isZipS (bis)) { +this.cacheZipContents (bis, name, bdata, true); +} else if (name == null) { +bdata.put ("_DATA_", new javajs.util.BArray (javajs.util.Rdr.getLimitedStreamBytes (bis, -1))); +} else { +throw new java.io.IOException ("ZIP file " + name + " not found"); +}bdata.put ("$_BINARY_$", Boolean.TRUE); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +bdata.clear (); +bdata.put ("_ERROR_", e.getMessage ()); +} else { +throw e; +} +} +}, "java.io.BufferedInputStream,java.util.Map,~S"); +Clazz.overrideMethod (c$, "cacheZipContents", +function (bis, fileName, cache, asByteArray) { +var zis = javajs.util.ZipTools.newZIS (bis); +var ze; +var listing = new javajs.util.SB (); +var n = 0; +var oneFile = (asByteArray && fileName != null); +var pt = (oneFile ? fileName.indexOf ("|") : -1); +var file0 = (pt >= 0 ? fileName : null); +if (pt >= 0) fileName = fileName.substring (0, pt); +try { +while ((ze = zis.getNextEntry ()) != null) { +var name = ze.getName (); +if (fileName != null) { +if (oneFile) { +if (!name.equalsIgnoreCase (fileName)) continue; +} else { +listing.append (name).appendC ('\n'); +}}var nBytes = ze.getSize (); +var bytes = javajs.util.Rdr.getLimitedStreamBytes (zis, nBytes); +if (file0 != null) { +this.readFileAsMap (javajs.util.Rdr.getBIS (bytes), cache, file0); +return null; +}n += bytes.length; +var o = (asByteArray ? new javajs.util.BArray (bytes) : bytes); +cache.put ((oneFile ? "_DATA_" : (fileName == null ? "" : fileName + "|") + name), o); +if (oneFile) break; +} +zis.close (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +try { +zis.close (); +} catch (e1) { +if (Clazz.exceptionOf (e1, java.io.IOException)) { +} else { +throw e1; +} +} +return null; +} else { +throw e; +} +} +if (n == 0 || fileName == null) return null; +System.out.println ("ZipTools cached " + n + " bytes from " + fileName); +return listing.toString (); +}, "java.io.BufferedInputStream,~S,java.util.Map,~B"); +c$.getPngImageBytes = Clazz.defineMethod (c$, "getPngImageBytes", +($fz = function (bis) { +try { +if (javajs.util.Rdr.isPngZipStream (bis)) { +var pt_count = Clazz.newIntArray (2, 0); +javajs.util.Rdr.getPngZipPointAndCount (bis, pt_count); +if (pt_count[1] != 0) return javajs.util.ZipTools.deActivatePngZipB (javajs.util.Rdr.getLimitedStreamBytes (bis, pt_count[0])); +}return javajs.util.Rdr.getLimitedStreamBytes (bis, -1); +} catch (e) { +if (Clazz.exceptionOf (e, java.io.IOException)) { +return null; +} else { +throw e; +} +} +}, $fz.isPrivate = true, $fz), "java.io.BufferedInputStream"); +c$.deActivatePngZipB = Clazz.defineMethod (c$, "deActivatePngZipB", +($fz = function (bytes) { +if (javajs.util.Rdr.isPngZipB (bytes)) bytes[51] = 32; +return bytes; +}, $fz.isPrivate = true, $fz), "~A"); +}); diff --git a/bin/lang/Messages.properties b/bin/lang/Messages.properties deleted file mode 100644 index b2bf58b..0000000 --- a/bin/lang/Messages.properties +++ /dev/null @@ -1,1247 +0,0 @@ -action.refresh_services = Refresh Services -action.reset_services = Reset Services -action.merge_results = Merge Results -action.load_scheme = Load scheme -action.save_scheme = Save scheme -action.save_image = Save Image -action.paste = Paste -action.show_html_source = Show HTML Source -action.print = Print -action.web_service = Web Service -action.cancel_job = Cancel Job -action.start_job = Start Job -action.revert = Revert -action.move_down = Move Down -action.move_up = Move Up -action.remove_return_datatype = Remove return datatype -action.add_return_datatype = Add return datatype -action.remove_input_parameter = Remove selected input parameter -action.add_input_parameter = Add input parameter -action.edit = Edit -action.new = New -action.open_file = Open file -action.show_unconserved = Show Unconserved -action.open_new_alignment = Open new alignment -action.raise_associated_windows = Raise Associated Windows -action.minimize_associated_windows = Minimize Associated Windows -action.close_all = Close all -action.load_project = Load Project -action.save_project = Save Project -action.quit = Quit -action.expand_views = Expand Views -action.gather_views = Gather Views -action.page_setup = Page Setup -action.reload = Reload -action.load = Load -action.open = Open -action.cancel = Cancel -action.create = Create -action.update = Update -action.delete = Delete -action.snapshot = Snapshot -action.clear = Clear -action.accept = Accept -action.select_ddbb = --- Select Database --- -action.undo = Undo -action.redo = Redo -action.reset = Reset -action.remove_left = Remove left -action.remove_right = Remove right -action.remove_empty_columns = Remove Empty Columns -action.remove_all_gaps = Remove All Gaps -action.left_justify_alignment = Left Justify Alignment -action.right_justify_alignment = Right Justify Alignment -action.boxes = Boxes -action.text = Text -action.by_pairwise_id = by Pairwise Identity -action.by_id = by Id -action.by_length = by Length -action.by_group = by Group -action.unmark_as_reference = Unmark as Reference -action.set_as_reference = Set as Reference -action.remove = Remove -action.remove_redundancy = Remove Redundancy... -action.pairwise_alignment = Pairwise Alignments... -action.by_rna_helixes = by RNA Helices -action.user_defined = User Defined... -action.by_conservation = By Conservation -action.wrap = Wrap -action.show_gaps = Show Gaps -action.show_hidden_markers = Show Hidden Markers -action.find = Find -action.undefine_groups = Undefine Groups -action.create_groups = Create Groups -action.make_groups_selection = Make Groups For Selection -action.copy = Copy -action.cut = Cut -action.font = Font... -action.scale_above = Scale Above -action.scale_left = Scale Left -action.scale_right = Scale Right -action.by_tree_order = By Tree Order -action.sort = Sort -action.calculate_tree = Calculate Tree -action.help = Help -action.by_annotation = by Annotation... -action.invert_sequence_selection = Invert Sequence Selection -action.invert_column_selection = Invert Column Selection -action.show = Show -action.hide = Hide -action.ok = OK -action.set_defaults = Defaults -action.create_group = Create Group -action.remove_group = Remove Group -action.edit_group = Edit Group -action.border_colour = Border colour -action.edit_new_group = Edit New Group -action.hide_sequences = Hide Sequences -action.sequences = Sequences -action.ids = IDS -action.ids_sequences = IDS and sequences -action.reveal_all = Reveal All -action.reveal_sequences = Reveal Sequences -action.find_all = Find all -action.find_next = Find next -action.file = File -action.view = View -action.annotations = Annotations -action.change_params = Change Parameters -action.apply = Apply -action.apply_threshold_all_groups = Apply threshold to all groups -action.apply_all_groups = Apply to all Groups -action.by_chain = By Chain -action.by_sequence = By Sequence -action.paste_annotations = Paste Annotations -action.format = Format -action.select = Select -action.new_view = New View -action.close = Close -action.add = Add -action.save_as_default = Save as default -action.save_as = Save as -action.save = Save -action.cancel_fetch = Cancel Fetch -action.save_omit_hidden_columns = Save / Omit Hidden Regions -action.change_font = Change Font -action.change_font_tree_panel = Change Font (Tree Panel) -action.colour = Colour -action.calculate = Calculate -action.select_all = Select all -action.deselect_all = Deselect all -action.invert_selection = Invert selection -action.using_jmol = Using Jmol -action.link = Link -action.group_link = Group Link -action.show_chain = Show Chain -action.show_group = Show Group -action.fetch_db_references = Fetch DB References -action.view_flanking_regions = Show flanking regions -label.view_flanking_regions = Show sequence data either side of the subsequences involved in this alignment -label.str = Str: -label.seq = Seq: -label.structures_manager = Structures Manager -label.nickname = Nickname: -label.url = URL: -label.input_file_url = Enter URL or Input File -label.select_feature = Select feature: -label.name = Name -label.name_param = Name: {0} -label.group = Group -label.group_name = Group Name -label.group_description = Group Description -label.edit_group_name_description = Edit Group Name/Description -label.colour = Colour: -label.description = Description: -label.start = Start: -label.end = End: -label.current_parameter_set_name = Current parameter set name: -label.service_action = Service Action: -label.post_url = POST URL: -label.url_suffix = URL Suffix -label.sequence_source = Sequence Source -label.per_seq = per Sequence -label.result_vertically_separable = Results are vertically separable -label.amend = Amend -label.undo_command = Undo {0} -label.redo_command = Redo {0} -label.principal_component_analysis = Principal Component Analysis -label.average_distance_identity = Average Distance Using % Identity -label.neighbour_joining_identity = Neighbour Joining Using % Identity -label.treecalc_title = {0} Using {1} -label.tree_calc_av = Average Distance -label.tree_calc_nj = Neighbour Joining -label.select_score_model = Select score model -label.score_model_pid = % Identity -label.score_model_blosum62 = BLOSUM62 -label.score_model_pam250 = PAM 250 -label.score_model_conservation = Physicochemical property conservation -label.score_model_enhconservation = Physicochemical property conservation -label.status_bar = Status bar -label.out_to_textbox = Output to Textbox -label.clustalx = Clustalx -label.clustal = Clustal -label.zappo = Zappo -label.taylor = Taylor -label.blc = BLC -label.fasta = Fasta -label.msf = MSF -label.pfam = PFAM -label.pileup = Pileup -label.pir = PIR -label.hydrophobicity = Hydrophobicity -label.helix_propensity = Helix Propensity -label.strand_propensity = Strand Propensity -label.turn_propensity = Turn Propensity -label.buried_index = Buried Index -label.purine_pyrimidine = Purine/Pyrimidine -label.percentage_identity = Percentage Identity -label.blosum62 = BLOSUM62 -label.blosum62_score = BLOSUM62 Score -label.tcoffee_scores = T-Coffee Scores -label.average_distance_bloslum62 = Average Distance Using BLOSUM62 -label.neighbour_blosum62 = Neighbour Joining Using BLOSUM62 -label.show_annotations = Show annotations -label.hide_annotations = Hide annotations -label.show_all_seq_annotations = Show sequence related -label.hide_all_seq_annotations = Hide sequence related -label.show_all_al_annotations = Show alignment related -label.hide_all_al_annotations = Hide alignment related -label.hide_all = Hide all -label.add_reference_annotations = Add reference annotations -label.find_tip = Search alignment, selection or sequence ids for a subsequence (ignoring gaps).
    Accepts regular expressions - search Help for 'regex' for details. -label.colour_text = Colour Text -label.show_non_conversed = Show nonconserved -label.overview_window = Overview Window -label.none = None -label.above_identity_threshold = Above Identity Threshold -label.show_sequence_features = Show Sequence Features -label.nucleotide = Nucleotide -label.protein = Protein -label.to_new_alignment = To New Alignment -label.to_this_alignment = Add To This Alignment -label.apply_colour_to_all_groups = Apply Colour To All Groups -label.modify_identity_thereshold = Modify Identity Threshold... -label.modify_conservation_thereshold = Modify Conservation Threshold... -label.input_from_textbox = Input from textbox -label.centre_column_labels = Centre column labels -label.automatic_scrolling = Automatic Scrolling -label.documentation = Documentation -label.about = About... -label.show_sequence_limits = Show Sequence Limits -label.feature_settings = Feature Settings... -label.all_columns = All Columns -label.all_sequences = All Sequences -label.selected_columns = Selected Columns -label.selected_sequences = Selected Sequences -label.except_selected_sequences = All except selected sequences -label.all_but_selected_region = All but Selected Region (Shift+Ctrl+H) -label.selected_region = Selected Region -label.all_sequences_columns = All Sequences and Columns -label.hide_insertions = Hide columns gapped for selection -label.hide_selected_annotations = Hide selected annotations -label.show_selected_annotations = Show selected annotations -label.group_consensus = Group Consensus -label.group_conservation = Group Conservation -label.show_consensus_histogram = Show Consensus Histogram -label.show_consensus_logo = Show Consensus Logo -label.norm_consensus_logo = Normalise Consensus Logo -label.apply_all_groups = Apply to all groups -label.autocalculated_annotation = Autocalculated Annotation -label.show_first = Show first -label.show_last = Show last -label.struct_from_pdb = Process secondary structure from PDB -label.use_rnaview = Use RNAView for secondary structure -label.autoadd_secstr = Add secondary structure annotation to alignment -label.autoadd_temp = Add Temperature Factor annotation to alignment -label.structure_viewer = Default structure viewer -label.chimera_path = Path to Chimera program -label.chimera_path_tip = Jalview will first try any path entered here, else standard installation locations.
    Double-click to browse for file. -label.invalid_chimera_path = Chimera path not found or not executable -label.chimera_missing = Chimera structure viewer not found.
    Please enter the path to Chimera (if installed),
    or download and install UCSF Chimera. -label.chimera_failed = Error opening Chimera - is it installed?\nCheck path in Preferences, Structure -label.min_colour = Minimum Colour -label.max_colour = Maximum Colour -label.use_original_colours = Use Original Colours -label.threshold_minmax = Threshold is min/max -label.represent_group_with = Represent Group with {0} -label.selection = Selection -label.group_colour = Group Colour -label.sequence = Sequence -label.view_pdb_structure = View PDB Structure -label.min = Min: -label.max = Max: -label.colour_by_label = Colour by label -label.new_feature = New Feature -label.match_case = Match Case -label.view_alignment_editor = View in alignment editor -label.labels = Labels -label.output_values = Output Values... -label.output_points = Output points... -label.output_transformed_points = Output transformed points -label.input_data = Input Data... -label.nucleotide_matrix = Nucleotide matrix -label.protein_matrix = Protein matrix -label.show_bootstrap_values = Show Bootstrap Values -label.show_distances = Show distances -label.mark_unassociated_leaves = Mark Unassociated Leaves -label.fit_to_window = Fit To Window -label.newick_format = Newick Format -label.select_newick_like_tree_file = Select a newick-like tree file -label.colours = Colours -label.view_mapping = View Mapping -label.wireframe = Wireframe -label.depthcue = Depthcue -label.z_buffering = Z Buffering -label.charge_cysteine = Charge & Cysteine -label.all_chains_visible = All Chains Visible -label.successfully_added_features_alignment = Successfully added features to alignment -label.keyboard_editing_mode = Keyboard editing mode is {0} -label.paste_features_annotations_Tcoffee_here = Paste your features / annotations / T-coffee score file here. -label.removed_columns = Removed {0} columns. -label.removed_empty_columns = Removed {0} empty columns. -label.paste_newick_tree_file = Paste your Newick tree file here. -label.order_by_params = Order by {0} -label.html_content = {0} -label.paste_pdb_file= Paste your PDB file here. -label.paste_pdb_file_for_sequence = Paste PDB file for sequence {0} -label.could_not_parse_newick_file = Could not parse Newick file\!\n {0} -label.successfully_pasted_tcoffee_scores_to_alignment= Successfully pasted T-Coffee scores to alignment. -label.failed_add_tcoffee_scores = Failed to add T-Coffee scores: -label.successfully_pasted_annotation_to_alignment= Successfully pasted annotation to alignment. -label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file = Couldn't parse pasted text as a valid annotation, feature, GFF, or T-Coffee score file -label.successfully_pasted_alignment_file = Successfully pasted alignment file -label.paste_your_alignment_file = Paste your alignment file here -label.paste_your = Paste your -label.finished_searching = Finished searching -label.search_results= Search results {0} : {1} -label.found_match_for = Found match for {0} -label.font = Font: -label.size = Size: -label.style = Style: -label.enter_redundancy_threshold = Enter the redundancy threshold -label.calculating = Calculating.... -label.modify_conservation_visibility = Modify conservation visibility -label.colour_residues_above_occurence = Colour residues above % occurence -label.set_this_label_text = set this label text -label.sequences_from = Sequences from {0} -label.successfully_loaded_file = Successfully loaded file {0} -label.successfully_saved_to_file_in_format = Successfully saved to file: {0} in {1} format. -label.copied_sequences_to_clipboard = Copied {0} sequences to clipboard. -label.check_file_matches_sequence_ids_alignment = Check that the file matches sequence IDs in the alignment. -label.problem_reading_tcoffee_score_file = Problem reading T-COFFEE score file -label.source_to_target = {0} ... {1} -label.per_sequence_only= Per-sequence only -label.to_file = to File -label.to_textbox = to Textbox -label.jalview = Jalview -label.csv_spreadsheet = CSV (Spreadsheet) -label.status = Status -label.channels = Channels -label.channel_title_item_count = {0} ({1}) -label.blog_item_published_on_date = {0} {1} -label.select_das_service_from_table = Select a DAS service from the table to read a full description here. -label.session_update = Session Update -label.new_vamsas_session = New Vamsas Session -label.load_vamsas_session = Load Vamsas Session -label.save_vamsas_session = Save Vamsas Session -label.select_vamsas_session_opened_as_new_vamsas_session= Select a vamsas session to be opened as a new vamsas session. -label.open_saved_vamsas_session = Open a saved VAMSAS session -label.groovy_console = Groovy Console... -label.lineart = Lineart -label.dont_ask_me_again = Don't ask me again -label.select_eps_character_rendering_style = Select EPS character rendering style -label.invert_selection = Invert Selection -label.optimise_order = Optimise Order -label.seq_sort_by_score = Sequence sort by Score -label.load_colours = Load Colours -label.save_colours = Save Colours -label.fetch_das_features = Fetch DAS Features -label.selected_database_to_fetch_from = Selected {0} database {1} to fetch from {2} -label.database_param = Database: {0} -label.example = Example -label.example_param = Example: {0} -label.select_file_format_before_saving = You must select a file format before saving! -label.file_format_not_specified = File format not specified -label.alignment_contains_hidden_columns = The Alignment contains hidden regions (hidden sequences/columns).\nDo you want to save only the visible alignment? -label.couldnt_save_file = Couldn't save file: {0} -label.error_saving_file = Error Saving File -label.remove_from_default_list = Remove from default list? -label.remove_user_defined_colour = Remove user defined colour -label.you_must_select_least_two_sequences = You must select at least 2 sequences. -label.invalid_selection = Invalid Selection -label.principal_component_analysis_must_take_least_four_input_sequences = Principal component analysis must take\nat least 4 input sequences. -label.sequence_selection_insufficient = Sequence selection insufficient -label.you_need_more_two_sequences_selected_build_tree = You need to have more than two sequences selected to build a tree! -label.not_enough_sequences = Not enough sequences -label.selected_region_to_tree_may_only_contain_residues_or_gaps = The selected region to create a tree may\nonly contain residues or gaps.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. -label.sequences_selection_not_aligned = Sequences in selection are not aligned -label.sequences_must_be_aligned_before_creating_tree = The sequences must be aligned before creating a tree.\nTry using the Pad function in the edit menu,\n or one of the multiple sequence alignment web services. -label.sequences_not_aligned = Sequences not aligned -label.problem_reading_tree_file = Problem reading tree file -label.possible_problem_with_tree_file = Possible problem with tree file -label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Please select at least three bases in at least one sequence in order to perform a cDNA translation. -label.translation_failed = Translation Failed -label.error_when_translating_sequences_submit_bug_report = Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace. -label.implementation_error = Implementation error: -label.automatically_associate_pdb_files_with_sequences_same_name = Do you want to automatically associate the {0} PDB files with sequences in the alignment that have the same name? -label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name -label.ignore_unmatched_dropped_files_info = Do you want to ignore the {0} files whose names did not match any sequence IDs ? -label.ignore_unmatched_dropped_files = Ignore unmatched dropped files? -label.view_name_original = Original -label.enter_view_name = Enter View Name -label.enter_label = Enter label -label.enter_label_for_the_structure = Enter a label for the structure? -label.pdb_entry_is_already_displayed = {0} is already displayed.\nDo you want to re-use this viewer ? -label.map_sequences_to_visible_window = Map Sequences to Visible Window: {0} -label.add_pdbentry_to_view = Do you want to add {0} to the view called\n{1}\n -label.align_to_existing_structure_view = Align to existing structure view -label.pdb_entries_couldnt_be_retrieved = The following pdb entries could not be retrieved from the PDB\:\n{0}\nPlease retry, or try downloading them manually. -label.couldnt_load_file = Couldn't load file -label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied. Please enter an Id to identify this structure. -label.no_pdb_id_in_file = No PDB Id in File -label.couldnt_read_pasted_text = Couldn't read the pasted text {0} -label.error_parsing_text = Error parsing text -label.enter_local_das_source = Enter Nickname & URL of Local DAS Source -label.you_can_only_edit_or_remove_local_das_sources = You can only edit or remove local DAS Sources! -label.public_das_source = Public DAS source - not editable -label.input_alignment_from_url = Input Alignment From URL -label.input_alignment = Input Alignment -label.couldnt_import_as_vamsas_session = Couldn't import {0} as a new vamsas session. -label.vamsas_document_import_failed = Vamsas Document Import Failed -label.couldnt_locate = Couldn't locate {0} -label.url_not_found = URL not found -label.no_link_selected = No link selected -label.new_sequence_url_link = New sequence URL link -label.cannot_edit_annotations_in_wrapped_view = Cannot edit annotations in wrapped view -label.wrapped_view_no_edit = Wrapped view - no edit -label.error_retrieving_data = Error Retrieving Data -label.user_colour_scheme_must_have_name = User colour scheme must have a name -label.no_name_colour_scheme = No name for colour scheme -label.invalid_url = Invalid URL ! -label.error_loading_file = Error loading file -label.problems_opening_file = Encountered problems opening {0}!! -label.file_open_error = File open error -label.no_das_sources_selected_warn = No das sources were selected.\nPlease select some sources and\ntry again. -label.no_das_sources_selected_title = No DAS Sources Selected -label.colour_scheme_exists_overwrite = Colour scheme {0} exists.\nContinue saving colour scheme as {1}?" -label.duplicate_scheme_name = Duplicate scheme name -label.jalview_new_questionnaire = There is a new Questionnaire available. Would you like to complete it now ?\n -label.jalview_user_survey = Jalview User Survey -label.alignment_properties = Alignment Properties: {0} -label.alignment_props = Alignment Properties -label.input_cut_paste = Cut & Paste Input -label.input_cut_paste_params = Cut & Paste Input - {0} -label.alignment_output_command = Alignment output - {0} -label.annotations = Annotations -label.structure_options = Structure Options -label.features = Features -label.overview_params = Overview {0} -label.paste_newick_file = Paste Newick file -label.load_tree_from_file = From File - -label.colour_by_annotation = Colour by Annotation -label.selection_output_command = Selection output - {0} -label.annotation_for_displayid =

    Annotation for {0}

    -label.pdb_sequence_mapping = PDB - Sequence Mapping -label.pca_details = PCA details -label.redundancy_threshold_selection = Redundancy threshold selection -label.user_defined_colours = User defined colours -label.jalviewLite_release = JalviewLite - Release {0} -label.jaview_build_date = Build date: {0} -label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt, -label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. -label.jalview_dev_managers = Development managed by The Barton Group, University of Dundee, Scotland, UK. -label.jalview_distribution_lists = For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list -label.jalview_please_cite = If you use Jalview, please cite: -label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) -label.jalview_cite_1_title = Jalview Version 2 - a multiple sequence alignment editor and analysis workbench -label.jalview_cite_1_ref = Bioinformatics doi: 10.1093/bioinformatics/btp033 -label.right_click = Right click -label.to_add_annotation = to add annotation -label.alignment_has_no_annotations = Alignment has no annotations -label.retrieving_pdb_data = Retrieving PDB data... -label.label = Label -label.no_features_added_to_this_alignment = No Features added to this alignment!! -label.features_can_be_added_from_searches_1 = (Features can be added from searches or -label.features_can_be_added_from_searches_2 = from Jalview / GFF features files) -label.calculating_pca= Calculating PCA -label.reveal_columns = Reveal Columns -label.jalview_cannot_open_file = Jalview can't open file -label.jalview_applet = Jalview applet -label.loading_data = Loading data -label.memory_stats = Total Free Memory: {0} MB; Max Memory: {1} MB; {2} % -label.calculating_tree = Calculating tree -label.state_queueing = queuing -label.state_running = running -label.state_complete = complete -label.state_completed = finished -label.state_job_cancelled = job cancelled!! -label.state_job_error = job error! -label.server_error_try_later = Server Error! (try later) -label.error_loading_pdb_data = Error loading PDB data!! -label.fetching_pdb_data = Fetching PDB data... -label.structure_type = Structure type -label.settings_for_type = Settings for {0} -label.view_full_application = View in Full Application -label.load_associated_tree = Load Associated Tree ... -label.load_features_annotations = Load Features/Annotations ... -label.export_features = Export Features ... -label.export_annotations = Export Annotations ... -label.to_upper_case = To Upper Case -label.to_lower_case = To Lower Case -label.toggle_case = Toggle Case -label.edit_name_description = Edit Name/Description ... -label.create_sequence_feature = Create Sequence Feature ... -label.edit_sequence = Edit Sequence -label.edit_sequences = Edit Sequences -label.sequence_details = Sequence Details -label.jmol_help = Jmol Help -label.chimera_help = Chimera Help -label.close_viewer = Close Viewer -label.confirm_close_chimera = This will close Jalview''s connection to {0}.
    Do you want to close the Chimera window as well? -label.chimera_help = Chimera Help -label.all = All -label.sort_by = Sort alignment by -label.sort_by_score = Sort by Score -label.sort_by_density = Sort by Density -label.sequence_sort_by_density = Sequence sort by Density -label.sort_ann_by = Sort annotations by -label.sort_annotations_by_sequence = Sort by sequence -label.sort_annotations_by_label = Sort by label -label.reveal = Reveal -label.hide_columns = Hide Columns -label.load_jalview_annotations = Load Jalview Annotations or Features File -label.load_tree_file = Load a tree file -label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = Retrieve and parse sequence database records for the alignment or the currently selected sequences -label.standard_databases = Standard Databases -label.fetch_embl_uniprot = Fetch from EMBL/EMBLCDS or Uniprot/PDB and any selected DAS sources -label.reset_min_max_colours_to_defaults = Reset min and max colours to defaults from user preferences. -label.align_structures_using_linked_alignment_views = Align structures using {0} linked alignment views -label.connect_to_session = Connect to session {0} -label.threshold_feature_display_by_score = Threshold the feature display by score. -label.threshold_feature_no_thereshold = No Threshold -label.threshold_feature_above_thereshold = Above Threshold -label.threshold_feature_below_thereshold = Below Threshold -label.adjust_thereshold = Adjust threshold -label.toggle_absolute_relative_display_threshold = Toggle between absolute and relative display threshold. -label.display_features_same_type_different_label_using_different_colour = Display features of the same type with a different label using a different colour. (e.g. domain features) -label.select_colour_minimum_value = Select Colour for Minimum Value -label.select_colour_maximum_value = Select Colour for Maximum Value -label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Open a new structure viewer with all structures associated with the current selection and superimpose them using the alignment. -label.open_url_param = Open URL {0} -label.open_url_seqs_param = Open URL ({0}..) ({1} seqs) -label.load_pdb_file_associate_with_sequence = Load a PDB file and associate it with sequence {0} -label.reveal_hidden_columns = Reveal Hidden Columns with Right Mouse Button -label.dark_colour = Dark Colour -label.light_colour = Light Colour -label.highlightnode = Left click to select leaves.
    Double-click to invert leaves.
    Right click to change colour. -label.load_colour_scheme = Load colour scheme -label.copy_format_from = Copy format from -label.toggle_enabled_views = When enabled, allows many views to be selected. -label.select_all_views = Select all views -label.select_many_views = Select many views -label.edit_notes_parameter_set = Click to edit the notes for this parameter set. -label.open_local_file = Open local file -label.enable_automatically_sort_alignment_when_open_new_tree = Enable this to automatically sort
    the alignment when you open
    a new tree. -label.listen_for_selections = Listen for selections -label.selections_mirror_selections_made_same_sequences_other_views = When selected, selections in this view will mirror
    selections made on the same sequences in other views. -label.toggle_sequence_visibility = Shift+H toggles sequence visiblity -label.toggle_columns_visibility = Ctrl+H toggles column visiblity. -label.toggles_visibility_hidden_selected_regions = H toggles visibility of hidden or selected regions -label.rename_tab_eXpand_reGroup= Right-click to rename tab
    Press X to eXpand tabs, G to reGroup. -label.right_align_sequence_id = Right Align Sequence Id -label.sequence_id_tooltip = Sequence ID Tooltip -label.no_services = -label.select_copy_raw_html = Select this if you want to copy raw html -label.share_data_vamsas_applications = Share data with other vamsas applications -label.connect_to = Connect to -label.join_existing_vamsas_session = Join an existing vamsas session -label.from_url = from URL -label.any_trees_calculated_or_loaded_alignment_automatically_sort = When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment -label.sort_with_new_tree = Sort With New Tree -label.from_textbox = from Textbox -label.window = Window -label.preferences = Preferences -label.tools = Tools -label.fetch_sequences = Fetch Sequence(s) -label.stop_vamsas_session = Stop Vamsas Session -label.collect_garbage = Collect Garbage -label.show_memory_usage = Show Memory Usage -label.show_java_console = Show Java Console -label.show_jalview_news = Show Jalview News -label.take_snapshot = Take snapshot -label.monospaced_fonts_faster_to_render = Monospaced fonts are faster to render -label.anti_alias_fonts = Anti-alias Fonts (Slower to render) -label.monospaced_font= Monospaced -label.quality = Quality -label.maximize_window = Maximize Window -label.conservation = Conservation -label.consensus = Consensus -label.histogram = Histogram -label.logo = Logo -label.non_positional_features = List Non-positional Features -label.database_references = List Database References -label.share_selection_across_views = Share selection across views -label.scroll_highlighted_regions = Scroll to highlighted regions -label.gap_symbol = Gap Symbol -label.prot_alignment_colour = Protein Alignment Colour -label.nuc_alignment_colour = Nucleotide Alignment Colour -label.address = Address -label.port = Port -label.default_browser_unix = Default Browser (Unix) -label.send_usage_statistics = Send usage statistics -label.check_for_questionnaires = Check for questionnaires -label.check_for_latest_version = Check for latest version -label.url_linkfrom_sequence_id = URL link from Sequence ID -label.use_proxy_server = Use a proxy server -label.eps_rendering_style = EPS rendering style -label.append_start_end = Append /start-end (/15-380) -label.full_sequence_id = Full Sequence Id -label.smooth_font = Smooth Font -label.autocalculate_consensus = AutoCalculate Consensus -label.pad_gaps = Pad Gaps -label.pad_gaps_when_editing = Pad Gaps When Editing -label.automatically_set_id_width = Automatically set ID width -label.figure_id_column_width = Figure ID column width -label.use_modeller_output = Use Modeller Output -label.wrap_alignment = Wrap Alignment -label.right_align_ids = Right Align Ids -label.sequence_name_italics = Italic Sequence Ids -label.open_overview = Open Overview -label.default_colour_scheme_for_alignment = Default Colour Scheme for alignment -label.annotation_shading_default = Annotation Shading Default -label.default_minimum_colour_annotation_shading = Default Minimum Colour for annotation shading -label.default_maximum_colour_annotation_shading = Default Maximum Colour for annotation shading -label.visual = Visual -label.connections = Connections -label.output = Output -label.editing = Editing -label.das_settings = DAS Settings -label.web_services = Web Services -label.right_click_to_edit_currently_selected_parameter = Right click to edit currently selected parameter. -label.let_jmol_manage_structure_colours = Let Jmol manage structure colours -label.let_chimera_manage_structure_colours = Let Chimera manage structure colours -label.marks_leaves_tree_not_associated_with_sequence = Marks leaves of tree not associated with a sequence -label.index_web_services_menu_by_host_site = Index web services in menu by the host site -label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up = Check this option if you want to be informed
    when a web service URL cannot be accessed by Jalview
    when it starts up -label.new_service_url = New Service URL -label.edit_service_url = Edit Service URL -label.delete_service_url = Delete Service URL -label.details = Details -label.options = Options -label.parameters = Parameters -label.available_das_sources = Available DAS Sources -label.full_details = Full Details -label.authority = Authority -label.type = Type -label.proxy_server = Proxy Server -label.file_output = File Output -label.select_input_type = Select input type -label.set_options_for_type = Set options for type -label.data_input_parameters = Data input parameters -label.data_returned_by_service = Data returned by service -label.rsbs_encoded_service = RSBS Encoded Service -label.parsing_errors = Parsing errors -label.simple_bioinformatics_rest_services = Simple Bioinformatics Rest Services -label.web_service_discovery_urls = Web Service Discovery URLS -label.input_parameter_name = Input Parameter name -label.short_descriptive_name_for_service = Short descriptive name for service -label.function_service_performs = What kind of function the service performs (e.g. alignment, analysis, search, etc). -label.brief_description_service = Brief description of service -label.url_post_data_service = URL to post data to service. Include any special parameters needed here -label.optional_suffix = Optional suffix added to URL when retrieving results from service -label.preferred_gap_character = Which gap character does this service prefer? -label.gap_character = Gap character -label.move_return_type_up_order= Move return type up order -label.move_return_type_down_order= Move return type down order -label.update_user_parameter_set = Update this existing user parameter set -label.delete_user_parameter_set = Delete the currently selected user parameter set -label.create_user_parameter_set = Create a new parameter set with the current settings. -label.revert_changes_user_parameter_set = Undo all changes to the current parameter set -label.start_job_current_settings = Start Job with current settings -label.cancel_job_close_dialog = Close this dialog and cancel job -label.input_output = Input/Output -label.cut_paste = Cut'n'Paste -label.adjusting_parameters_for_calculation = Adjusting parameters for existing Calculation -label.2d_rna_structure_line = 2D RNA {0} (alignment) -label.2d_rna_sequence_name = 2D RNA - {0} -label.edit_name_and_description_current_group = Edit name and description of current group. -label.view_structure_for = View structure for {0} -label.view_all_structures = View all {0} structures. -label.view_all_representative_structures = View all {0} representative structures. -label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Opens a new structure viewer with all representative structures\nassociated with the current selection\nsuperimposed with the current alignment. -label.associate_structure_with_sequence = Associate Structure with Sequence -label.from_file = from file -label.enter_pdb_id = Enter PDB Id -label.discover_pdb_ids = Discover PDB ids -label.text_colour = Text Colour -label.structure = Structure -label.view_structure = View Structure -label.view_protein_structure = View Protein Structure -label.view_rna_structure = View Nucleotide Structure -label.clustalx_colours = Clustalx colours -label.above_identity_percentage = Above % Identity -label.create_sequence_details_report_annotation_for = Annotation for {0} -label.sequence_details_for = Sequence Details for {0} -label.sequence_name = Sequence Name -label.sequence_description = Sequence Description -label.edit_sequence_name_description = Edit Sequence Name/Description -label.spaces_converted_to_backslashes = Spaces have been converted to _ -label.no_spaces_allowed_sequence_name = No spaces allowed in Sequence Name -label.select_outline_colour = Select Outline Colour -label.web_browser_not_found_unix = Unixers\: Couldn't find default web browser.\nAdd the full path to your browser in Preferences." -label.web_browser_not_found = Web browser not found -label.select_pdb_file_for = Select a PDB file for {0} -label.html = HTML -label.wrap = Wrap -label.show_database_refs = Show Database Refs -label.show_non_positional_features = Show Non-Positional Features -label.save_png_image = Save As PNG Image -label.load_tree_for_sequence_set = Load a tree for this sequence set -label.export_image = Export Image -label.vamsas_store = VAMSAS store -label.translate_cDNA = Translate as cDNA -label.linked_view_title = Linked cDNA and protein view -label.align = Align -label.extract_scores = Extract Scores -label.get_cross_refs = Get Cross-References -label.sort_alignment_new_tree = Sort Alignment With New Tree -label.add_sequences = Add Sequences -label.new_window = New Window -label.split_window = Split Window -label.refresh_available_sources = Refresh Available Sources -label.use_registry = Use Registry -label.add_local_source = Add Local Source -label.set_as_default = Set as Default -label.show_labels = Show labels -label.background_colour = Background Colour -label.associate_nodes_with = Associate Nodes With -label.jalview_pca_calculation = Jalview PCA Calculation -label.link_name = Link Name -label.pdb_file = PDB file -label.colour_with_jmol = Colour with Jmol -label.colour_with_chimera = Colour with Chimera -label.align_structures = Align structures -label.jmol = Jmol -label.chimera = Chimera -label.sort_alignment_by_tree = Sort Alignment By Tree -label.mark_unlinked_leaves = Mark Unlinked Leaves -label.associate_leaves_with = Associate Leaves With -label.save_colour_scheme_with_unique_name_added_to_colour_menu = Save your colour scheme with a unique name and it will be added to the Colour menu -label.case_sensitive = Case Sensitive -label.lower_case_colour = Lower Case Colour -label.index_by_host = Index by host -label.index_by_type = Index by type -label.enable_jabaws_services = Enable JABAWS Services -label.display_warnings = Display warnings -label.move_url_up = Move URL up -label.move_url_down = Move URL down -label.add_sbrs_definition = Add a SBRS definition -label.edit_sbrs_definition = Edit SBRS definition -label.delete_sbrs_definition = Delete SBRS definition -label.your_sequences_have_been_verified = Your sequences have been verified against known sequence databases. Some of the ids have been\n altered, most likely the start/end residue will have been updated.\n Save your alignment to maintain the updated id.\n\n -label.sequence_names_updated = Sequence names updated -label.dbref_search_completed = DBRef search completed -label.show_all_chains = Show all chains -label.fetch_all_param = Fetch all {0} -label.paste_new_window = Paste To New Window -label.settings_for_param = Settings for {0} -label.view_params = View {0} -label.all_views = All Views -label.align_sequences_to_existing_alignment = Align sequences to an existing alignment -label.realign_with_params = Realign with {0} -label.calcname_with_default_settings = {0} with Defaults -label.action_with_default_settings = {0} with default settings -label.edit_settings_and_run = Edit settings and run... -label.view_and_change_parameters_before_alignment = View and change the parameters before alignment -label.run_with_preset_params = Run {0} with preset -label.view_and_change_parameters_before_running_calculation = View and change parameters before running calculation -label.view_documentation = View documentation -label.select_return_type = Select return type -label.translation_of_params = Translation of {0} -label.features_for_params = Features for - {0} -label.annotations_for_params = Annotations for - {0} -label.generating_features_for_params = Generating features for - {0} -label.generating_annotations_for_params = Generating annotations for - {0} -label.varna_params = VARNA - {0} -label.sequence_feature_settings = Sequence Feature Settings -label.pairwise_aligned_sequences = Pairwise Aligned Sequences -label.original_data_for_params = Original Data for {0} -label.points_for_params = Points for {0} -label.transformed_points_for_params = Transformed points for {0} -label.graduated_color_for_params = Graduated Feature Colour for {0} -label.select_backgroud_colour = Select Background Colour -label.invalid_font = Invalid Font -label.separate_multiple_accession_ids = Enter one or more PDB Ids -label.separate_multiple_query_values = Enter one or more {0}s separated by a semi-colon ";" -label.search_all = Enter one or more search values separated by a semi-colon ";" (Note: This Searches the entire PDB database) -label.replace_commas_semicolons = Replace commas with semi-colons -label.parsing_failed_syntax_errors_shown_below_param = Parsing failed. Syntax errors shown below {0} -label.parsing_failed_unrecoverable_exception_thrown_param = \nParsing failed. An unrecoverable exception was thrown\:\n {0} -label.example_query_param = Example query: {0} -label.enter_value_increase_conservation_visibility = Enter value to increase conservation visibility -label.enter_percentage_identity_above_which_colour_residues = Enter % identity above which to colour residues -label.wswublast_client_credits = To display sequence features an exact Uniprot id with 100% sequence identity match must be entered.\nIn order to display these features, try changing the names of your sequences to the ids suggested below.\n\nRunning WSWUBlast at EBI.\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R.\nSOAP-based services provided by the European Bioinformatics Institute.\nNucleic Acids Res. 33(1)\:W25-W28 (2005)); -label.blasting_for_unidentified_sequence = BLASTing for unidentified sequences -label.select_columns_containing = Select columns containing -label.select_columns_not_containing = Select columns that do not contain -option.trim_retrieved_seqs = Trim retrieved sequences -label.trim_retrieved_sequences = When the reference sequence is longer than the sequence that you are working with, only keep the relevant subsequences. -label.use_sequence_id_1 = Use $SEQUENCE_ID$ or $SEQUENCE_ID=//=$ -label.use_sequence_id_2 = \nto embed sequence id in URL -label.ws_parameters_for = Parameters for {0} -label.switch_server = Switch server -label.choose_jabaws_server = Choose a server for running this service -label.services_at = Services at {0} -label.rest_client_submit = {0} using {1} -label.fetch_retrieve_from =Retrieve from {0} -label.fetch_retrieve_from_all_sources = Retrieve from all {0} sources in {1}
    First is :{2} -#label.feature_settings_click_drag = Click/drag feature types up or down to change render order.
    Double click to select columns containing feature in alignment/current selection
    Pressing Alt will select columns outside features rather than inside
    Pressing Shift to modify current selection (rather than clear current selection)
    Press CTRL or Command/Meta to toggle columns in/outside features
    -label.feature_settings_click_drag = Drag up or down to change render order.
    Double click to select columns containing feature. -label.transparency_tip = Adjust transparency to 'see through' feature colours. -label.opt_and_params_further_details = see further details by right-clicking -label.opt_and_params_show_brief_desc_image_link = Click to show brief description
    Right click for further information. -label.opt_and_params_show_brief_desc = Click to show brief description
    -label.adjusts_width_generated_eps_png = Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed -label.manually_specify_width_left_column = Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set -label.job_created_when_checked = When checked, a job is created for every sequence in the current selection. -label.when_checked_job_visible_region_and_results = When checked, a single job is created for the visible region and results mapped back onto their location in the alignment. Otherwise, a job would be created for every contiguous region visible in the alignment or current selection (e.g. a multiple alignment). -label.flat_file_representation = Flat file representation of this rest service using the Really Simple Bioinformatics Service formalism -label.result_of_parsing_rsbs = Results of parsing the RSBS representation -label.user_preset = User Preset -label.service_preset = Service Preset -label.run_with_preset = Run {0} with preset -label.view_service_doc_url = View {1} -label.submit_sequence = Submit {0} {1} {2} {3} to
    {4} -action.by_title_param = by {0} -label.alignment = Alignment -label.secondary_structure_prediction = Secondary Structure Prediction -label.sequence_database_search = Sequence Database Search -label.analysis = Analysis -label.protein_disorder = Protein Disorder -label.source_from_db_source = Sources from {0} -label.from_msname = from {0} -label.superpose_with = Superpose with ... -action.do = Do -label.scale_label_to_column = Scale Label to Column -label.add_new_row = Add New Row -label.edit_label_description = Edit Label/Description -label.hide_row = Hide This Row -label.delete_row = Delete This Row -label.show_all_hidden_rows = Show All Hidden Rows -label.export_annotation = Export Annotation -label.copy_consensus_sequence = Copy Consensus Sequence -label.helix = Helix -label.sheet = Sheet -label.rna_helix = RNA Helix -label.remove_annotation = Remove Annotation -label.colour_by = Colour by... -label.muscle_multiple_protein_sequence_alignment = Muscle Multiple Protein Sequence Alignment -label.mafft_multiple_sequence_alignment = MAFFT Multiple Sequence Alignment -label.clustalw_multiple_sequence_alignment = ClustalW Multiple Sequence Alignment -label.jnet_secondary_structure_prediction = JNet Secondary Structure Prediction -label.multiharmony = Multi-Harmony -label.unable_start_web_service_analysis = Unable to start web service analysis -label.job_couldnt_be_started_check_input = The Job couldn't be started. Please check your input, and the Jalview console for any warning messages. -label.prompt_each_time = Prompt each time -label.use_source = Use Source -label.couldnt_save_project = Couldn't save project -label.error_whilst_saving_current_state_to = Error whilst saving current state to {0} -label.error_whilst_loading_project_from = Error whilst loading project from {0} -label.couldnt_load_project = Couldn't load project -label.pca_sequences_not_aligned = The sequences must be aligned before calculating PCA.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. -label.invalid_name_preset_exists = Invalid name - preset already exists. -label.invalid_name = Invalid name -label.set_proxy_settings = Please set up your proxy settings in the 'Connections' tab of the Preferences window -label.proxy_authorization_failed = Proxy Authorization Failed -label.internal_jalview_error = Internal Jalview Error -label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located. -label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service\! -label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown -label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service\! -label.seq_search_service_is_unknown = The Sequence Search Service named {0} is unknown -label.feature_type = Feature Type -label.display = Display -label.service_url = Service URL -label.copied_sequences = Copied sequences -label.cut_sequences = Cut Sequences -label.conservation_colour_increment = Conservation Colour Increment ({0}) -label.percentage_identity_thereshold = Percentage Identity Threshold ({0}) -label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User Colour scheme dialog -label.save_alignment_to_file = Save Alignment to file -label.save_features_to_file = Save Features to File -label.save_annotation_to_file = Save Annotation to File -label.no_features_on_alignment = No features found on alignment -label.save_pdb_file = Save PDB File -label.save_text_to_file = Save Text to File -label.save_state = Save State -label.restore_state = Restore State -label.saving_jalview_project = Saving jalview project {0} -label.loading_jalview_project = Loading jalview project {0} -label.save_vamsas_document_archive = Save Vamsas Document Archive -label.saving_vamsas_doc = Saving VAMSAS Document to {0} -label.load_feature_colours = Load Feature Colours -label.save_feature_colours = Save Feature Colour Scheme -label.dataset_for = {0} Dataset for {1} -label.select_startup_file = Select startup file -label.select_default_browser = Select default web browser -label.save_tree_as_newick = Save tree as newick file -label.create_eps_from_tree = Create EPS file from tree -label.create_png_from_tree = Create PNG image from tree -label.save_colour_scheme = Save colour scheme -label.edit_params_for = Edit parameters for {0} -label.choose_filename_for_param_file = Choose a filename for this parameter file -label.save_as_html = Save as HTML -label.recently_opened = Recently Opened -label.blasting_for_unidentified_sequence_jobs_running = BLASTing for unidentified sequences - {0} jobs running. -label.tree_from = Tree from {0} -label.webservice_job_title = {0} using {1} -label.select_visible_region_of = selected {0} region of {1} -label.visible = Visible -label.select_unselect_visible_regions_from = select and unselected {0} regions from {1} -label.visible_region_of = visible region of -label.webservice_job_title_on = {0} using {1} on {2} -label.updating_vamsas_session = Updating vamsas session -label.loading_file = Loading File: {0} -label.edit_params = Edit {0} -error.not_implemented = Not implemented -error.no_such_method_as_clone1_for = No such method as clone1 for {0} -error.null_from_clone1 = Null from clone1! -error.implementation_error_sortbyfeature = Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY. -error.not_yet_implemented = Not yet implemented -error.unknown_type_dna_or_pep = Unknown Type {0} - dna or pep are the only allowed values. -error.implementation_error_dont_know_thereshold_annotationcolourgradient = Implementation error: don't know about threshold setting for current AnnotationColourGradient. -error.implementation_error_embeddedpopup_not_null = Implementation error - embeddedPopup must be non-null -error.invalid_colour_for_mycheckbox = Invalid color for MyCheckBox -error.implementation_error_unrecognised_render_object_for_features_type = Implementation Error: Unrecognised render object {0} for features of type {1} -error.implementation_error_unsupported_feature_colour_object = Implementation error: Unsupported feature colour object. -error.invalid_separator_parameter = Invalid separator parameter - must be non-zero length -error.alignment_cigararray_not_implemented = Alignment(CigarArray) not yet implemented -error.weak_sequencei_equivalence_not_yet_implemented = Weak sequenceI equivalence not yet implemented. -error.implementation_error_can_only_make_alignmnet_from_cigararray = Implementation Error - can only make an alignment view from a CigarArray of sequences. -error.empty_view_cannot_be_updated = empty view cannot be updated. -error.mismatch_between_number_of_sequences_in_block = Mismatch between number of sequences in block {0} ({1}) and the original view ({2}) -error.padding_not_yet_implemented = Padding not yet implemented -error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks={0}) -error.unknown_seq_cigar_operation = Unknown SeqCigar operation {0} -error.implementation_bug_parse_cigar_string = Implementation bug in parseCigarString -error.implementation_error_invalid_operation_string = Implementation error. Invalid operation string. -error.invalid_range_string = Invalid range string (must be zero or positive number) -error.implementation_error_delete_range_out_of_bounds = Implementation Error: deleteRange out of bounds: start must be non-negative and less than end. -error.implementation_error = Implementation error -error.implementation_error_unknown_operation = Implementation Error! Unknown operation {0} -error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Implementation Error - unexpected null from getSequenceAndDeletions -error.implementation_error_set_seq_null = Implementation Error - _setSeq(null,...) -error.implementation_error_s = Implementation Error: _s= {0} -error.implementation_error_seqcigar_possible = SeqCigar: Possible implementation error: sequence is longer than dataset sequence -error.implmentation_bug_seq_null = Implementation Bug. Null seq -error.implementation_bug_cigar_operation_list_range_list = Implementation Bug. Cigar Operation list!= range list -error.not_yet_implemented_cigar_object_from_cigar_string = NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence. -error.implementation_bug_cigar_operation = Implementation Bug. Cigar Operation {0} {1} not one of {2}, {3}, or {4}. -error.implementation_error_for_new_cigar = Implementation error for new Cigar(SequenceI) -error.implementation_error_cigar_seq_no_operations = Implementation error: {0}th sequence Cigar has no operations. -error.implementation_error_jmol_getting_data = Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016 -error.implementation_error_no_pdbentry_from_index = Implementation error - no corresponding pdbentry (for index {0}) to add sequences mappings to -error.jmol_version_not_compatible_with_jalview_version = Jmol version {0} is not compatible with this version of Jalview. Report this problem at issues.jalview.org -error.not_implemented_remove = Remove: Not implemented -error.not_implemented_clone = Clone: Not implemented -error.implementation_error_chimera_getting_data = Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016 -error.call_setprogressbar_before_registering_handler = call setProgressBar before registering the progress bar's handler. -label.cancelled_params = Cancelled {0} -error.implementation_error_cannot_show_view_alignment_frame = Implementation error: cannot show a view from another alignment in an AlignFrame. -error.implementation_error_dont_know_about_thereshold_setting = Implementation error: don't know about threshold setting for current AnnotationColourGradient. -error.eps_generation_not_implemented = EPS Generation not yet implemented -error.png_generation_not_implemented = PNG Generation not yet implemented -error.try_join_vamsas_session_another = Trying to join a vamsas session when another is already connected -error.invalid_vamsas_session_id = Invalid vamsas session id -error.implementation_error_cannot_create_groovyshell = Implementation Error. Cannot create groovyShell without Groovy on the classpath! -label.groovy_support_failed = Jalview Groovy Support Failed -label.couldnt_create_groovy_shell = Couldn't create the groovy Shell. Check the error log for the details of what went wrong. -error.unsupported_version_calcIdparam = Unsupported Version for calcIdparam {0} -error.implementation_error_cant_reorder_tree = Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode. -error.invalid_value_for_option = Invalid value {0} for option {1} -error.implementation_error_cannot_import_vamsas_doc = Implementation Error - cannot import existing vamsas document into an existing session, Yet! -label.vamsas_doc_couldnt_be_opened_as_new_session = VAMSAS Document could not be opened as a new session - please choose another -error.implementation_error_vamsas_operation_not_init = Impementation error! Vamsas Operations when client not initialised and connected -error.jalview_no_connected_vamsas_session = Jalview not connected to Vamsas session -error.implementation_error_cannot_recover_vamsas_object_mappings = IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made -error.setstatus_called_non_existent_job_pane = setStatus called for non-existent job pane {0} -error.implementation_error_cannot_find_marshaller_for_param_set =Implementation error: Can't find a marshaller for the parameter set -error.implementation_error_old_jalview_object_not_bound =IMPLEMENTATION ERROR: old jalview object is not bound ! ({0}) -error.implementation_error_vamsas_doc_class_should_bind_to_type = Implementation Error: Vamsas Document Class {0} should bind to a {1} (found a {2}) -error.implementation_error_jalview_class_should_bind_to_type = Implementation Error: Jalview Class {0} should bind to a {1} (found a {2}) -error.invalid_vamsas_rangetype_cannot_resolve_lists = Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice! -error.implementation_error_maplist_is_null = Implementation error. MapList is null for initMapType. -error.implementation_error_cannot_have_null_alignment = Implementation error: Cannot have null alignment property key -error.implementation_error_null_fileparse = Implementation error. Null FileParse in copy constructor -error.implementation_error_cannot_map_alignment_sequences = IMPLEMENTATION ERROR: Cannot map an alignment of sequences from different datasets into a single alignment in the vamsas document. -error.implementation_error_cannot_duplicate_colour_scheme = Serious implementation error: cannot duplicate colourscheme {0} -error.implementation_error_structure_selection_manager_null = Implementation error. Structure selection manager's context is 'null' -exception.ssm_context_is_null = SSM context is null -error.idstring_seqstrings_only_one_per_sequence = idstrings and seqstrings contain one string each per sequence -error.cannot_have_mixed_length_replacement_vectors = Cannot have mixed length replacement vectors. Replacement vector for {0} is {1} strings long, and have already seen a {2} length vector. -error.cannot_have_zero_length_vector_replacement_strings = Cannot have zero length vector of replacement strings - either 1 value or n values. -error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = Implementation Error! Multiple single sequence prediction jobs are not yet supported -error.implementation_error_invalid_msa_index_for_job =Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object! -error.implementation_error_startjob_called = Implementation error - StartJob(JpredJob) called on {0} -error.multiple_jnet_subjob_merge_not_implemented = Multiple JNet subjob merging not yet implemented -label.job_never_ran = Job never ran - input returned to user. -error.implementation_error_minlen_must_be_greater_zero = Implementation error: minlen must be zero or more -error.implementation_error_msawbjob_called = Implementation error - StartJob(MsaWSJob) called on a WSJobInstance {0} -error.implementation_error_cannot_attach_ws_menu_entry = IMPLEMENTATION ERROR: cannot attach WS Menu Entry without service handle reference! -error.parameter_migration_not_implemented_yet = Parameter migration not implemented yet -error.implementation_error_cannot_set_jaba_option = Implementation error: cannot set Jaba Option to a value outside its allowed value range! -error.implementation_error_valuetype_doesnt_support_jabaws_type = IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type : {0} -error.cannot_create_jabaws_param_set = Cannot create a JabaWSParamSet from non-JabaWS parameters -error.cannot_set_arguments_to_jabaws_param_set = Cannot set arguments to a JabaWSParamSet that are not JabaWS arguments -error.implementation_error_runner_config_not_available = Implementation Error: Runner Config not available for a JABAWS service of type {0} ({1}) -error.implementation_error_cannot_handle_jaba_param = Implementation Error: Cannot handle Jaba parameter object {0} -error.implementation_error_attempt_to_delete_service_preset = Implementation error: Attempt to delete a service preset! -error.implementation_error_cannot_locate_oldname_presetname = Implementation error: Can't locate either oldname ({0}) or presetName ({1}in the datastore!" -error.implementation_error_jabaws_param_set_only_handled_by = Implementation error: JabaWsParamSets can only be handled by JabaParamStore -error.cannot_set_source_file_for = Cannot set source file for {0} -error.mismatch_service_instance_preset = Probable mismatch between service instance and preset! -error.cannot_set_params_for_ws_preset = Cannot set Parameters for a Jaba Web service's preset -error.implementation_error_can_only_instantiate_jaba_param_sets = Implementation error: Can only instantiate Jaba parameter sets -error.no_aacon_service_found = No AACon service found -error.implementation_error_couldnt_copy_value_constraint = Implementation error: could not copy ValueConstrain! -error.couldnt_encode_as_utf8 = Couldn't encode {0} as UTF-8. -error.tree_inputtype_not_yet_implemented = Tree InputType not yet implemented -error.implementation_error_need_to_have_httpresponse = Implementation Error: need to have an HttpResponse to process -error.dbrefsource_implementation_exception =DBRefSource Implementation Exception -error.implementation_error_dbinstance_must_implement_interface = Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given{0}) -error.implementation_error_must_init_dbsources =Implementation error. Must initialise dbSources -label.view_controller_toggled_marked = {0} {1} columns {2} containing features of type {3} across {4} sequence(s) -label.toggled = Toggled -label.marked = Marked -label.not = not -label.no_feature_of_type_found = No features of type {0} found. -label.submission_params = Submission {0} -label.empty_alignment_job = Empty Alignment Job -label.add_new_sbrs_service = Add a new Simple Bioinformatics Rest Service -label.edit_sbrs_entry = Edit Simple Bioinformatics Rest Service entry -label.pca_recalculating = Recalculating PCA -label.pca_calculating = Calculating PCA -label.select_foreground_colour = Choose foreground colour -label.select_colour_for_text = Select Colour for Text -label.adjunst_foreground_text_colour_thereshold = Adjust Foreground Text Colour Threshold -label.select_subtree_colour = Select Sub-Tree Colour -label.create_new_sequence_features = Create New Sequence Feature(s) -label.amend_delete_features = Amend/Delete Features for {0} -exception.out_of_bounds_for_file = Out of bounds for file: i={0}, Final Buffer: i0={1} iend={2} -exception.null_string_given_to_regex_search = Null String Given to Regex.search -exception.null_string_like_given_to_regex_search = Null StringLike Given to Regex.search -exception.null_string_given_to_regex_reverse_search = Null String Given to Regex.reverseSearch -exception.null_string_like_given_to_regex_reverse_search = Null StringLike Given to Regex.reverseSearch -exception.null_string_like_given_to_regex_search_from = Null String Given to Regex.searchFrom -exception.null_string_like_given_to_regex_search_region = Null String Given to Regex.searchRegion -exception.replace_null_regex_pointer = Replacer has null Regex pointer -exception.bad_pattern_to_regex_perl_code = bad pattern to Regex.perlCode: {0} -exception.no_stub_implementation_for_interface = There is no stub implementation for the interface: {0} -exception.cannot_set_endpoint_address_unknown_port = Cannot set Endpoint Address for Unknown Port {0} -exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Querying matching opening parenthesis for non-closing parenthesis character {0} -exception.mismatched_unseen_closing_char = Mismatched (unseen) closing character {0} -exception.mismatched_closing_char = Mismatched closing character {0} -exception.mismatched_opening_char = Mismatched opening character {0} at {1} -exception.invalid_datasource_couldnt_obtain_reader = Invalid datasource. Could not obtain Reader -exception.index_value_not_in_range = {0}: Index value {1} not in range [0..{2}] -exception.unterminated_cigar_string = Unterminated cigar string -exception.unexpected_operation_cigar_string_pos = Unexpected operation {0} in cigar string (position {1} in {2} -exception.couldnt_parse_responde_from_annotated3d_server = Couldn't parse response from Annotate3d server -exception.application_test_npe = Application test: throwing an NullPointerException It should arrive at the console -exception.overwriting_vamsas_id_binding = Overwriting vamsas id binding -exception.overwriting_jalview_id_binding = Overwriting jalview id binding -error.implementation_error_unknown_file_format_string = Implementation error: Unknown file format string -exception.failed_to_resolve_gzip_stream = Failed to resolve GZIP stream -exception.problem_opening_file_also_tried = Problem opening {0} (also tried {1}) : {2} -exception.problem_opening_file = Problem opening {0} : {1} -exception.failed_to_read_data_from_source = Failed to read data from source: {0} -exception.no_init_source_stream = Unitialised Source Stream -exception.invalid_source_stream = Invalid Source Stream: {0} -error.implementation_error_reset_called_for_invalid_source = Implementation Error: Reset called for invalid source. -exception.number_of_residues_in_query_sequence_differ_from_prediction = Number of residues in {0} supposed query sequence ({1}\n{2})\ndiffer from number of prediction sites in prediction ({3}) -label.mapped = mapped -exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: Entry ({0}) has an unexpected number of columns -exception.couldnt_parse_concise_annotation_for_prediction = Couldn't parse concise annotation for prediction profile.\n{0} -exception.newfile = NewickFile\: {0}\n -label.no_tree_read_in = No Tree read in -exception.rnaml_couldnt_access_datasource = Couldn't access datasource ({0}) -exception.ranml_couldnt_process_data = Couldn't process data as RNAML file ({0}) -exception.ranml_invalid_file = Invalid RNAML file ({0}) -exception.ranml_problem_parsing_data = Problem parsing data as RNAML ({0}) -exception.pfam_no_sequences_found = No sequences found (PFAM input) -exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM' -exception.couldnt_parse_sequence_line = Could not parse sequence line: {0} -exception.error_parsing_line = Error parsing {0} -exception.unknown_annotation_detected = Unknown annotation detected: {0} {1} -exception.couldnt_store_sequence_mappings = Couldn't store sequence mappings for {0} -exception.matrix_too_many_iteration = Too many iterations in {0} (max is {1}) -exception.browser_not_found = Exception in finding browser: {0} -exception.browser_unable_to_locate = Unable to locate browser: {0} -exception.invocation_target_exception_creating_aedesc = InvocationTargetException while creating AEDesc: {0} -exception.illegal_access_building_apple_evt= IllegalAccessException while building AppleEvent: {0} -exception.instantiation_creating_aedesc = InstantiationException while creating AEDesc: {0} -exception.unable_to_launch_url = Unable to launch URL: {0} -exception.unable_to_create_internet_config = Unable to create an Internet Config instance: {0} -exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0} -exception.illegal_access_calling_url = IllegalAccessException while calling openURL: {0} -exception.interrupted_launching_browser = InterruptedException while launching browser: {0} -exception.das_source_doesnt_support_sequence_command = Source {0} does not support the sequence command. -exception.invalid_das_source = Invalid das source: {0} -exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1} -label.no_embl_record_found = # No EMBL record retrieved for {0}:{1} -label.embl_successfully_parsed = # Successfully parsed the {0} queries into an Alignment -exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1} -exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data -exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment -exception.unknown_format_for_file = Unknown format {0} for file \: \n{1} -label.remove_gaps = Remove Gaps -exception.couldnt_recover_sequence_props_for_jnet_query = Couldn't recover sequence properties for JNet Query sequence! -exception.server_timeout_try_later = Server timed out - try again later\n -exception.web_service_returned_null_try_later= Server at {0} returned null object, it probably cannot be contacted. Try again later. -exception.cannot_contact_service_endpoint_at = Cannot contact service endpoint at {0} -error.implementation_error_cannot_find_service_url_in_given_set = Implementation error: Cannot find service url in the given url set! -error.implementation_error_cannot_find_service_url_in_given_set_param_store = Implementation error: Cannot find service url in the given url set for this service parameter store ({0}} -exception.jobsubmission_invalid_params_set = Invalid parameter set. Check Jalview implementation -exception.notvaliddata_group_contains_less_than_min_seqs = Group contains less than {0} sequences. -exception.outofmemory_loading_pdb_file = Out of memory loading PDB File -exception.eps_coudnt_write_output_file = Could not write to the output file: {0} -exception.eps_method_not_supported = Method not currently supported by EpsGraphics2D version {0} -exception.eps_unable_to_get_inverse_matrix = Unable to get inverse of matrix: {0} -warn.job_cannot_be_cancelled_close_window = This job cannot be cancelled.\nJust close the window. -warn.service_not_supported = Service not supported! -warn.input_is_too_big = Input is too big! -warn.invalid_job_param_set = Invalid job parameter set! -warn.oneseq_msainput_selection = The current selection only contains a single sequence. Do you want to submit all sequences for alignment instead ? -info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn't support this program.\n{0} -info.job_couldnt_be_run_exceeded_hard_limit = Job could not be run because it exceeded a hard limit on the server.\n{0} -info.job_couldnt_be_run_incorrect_param_setting = Job could not be run because some of the parameter settings are not supported by the server.\n{0}\nPlease check to make sure you have used the correct parameter set for this service\!\n -info.no_jobs_ran = No jobs ran -info.failed_to_submit_prediction = Failed to submit the prediction\:\n{0} {1} -info.invalid_jnet_job_result_data ={0}\n{1}\nInvalid JNet job result data\!\n{2} -info.failed_to_submit_sequences_for_alignment = Failed to submit sequences for alignment.\nIt is most likely that there is a problem with the server.\nJust close the window\n -info.alignment_object_method_notes = \nAlignment Object Method Notes\n -info.server_exception = \n{0} Server exception\!\n{1} -info.invalid_msa_input_mininfo = Need at least two sequences with at least 3 residues each, with no hidden regions between them. -info.invalid_msa_notenough = Not enough sequence data to align -status.processing_commandline_args = Processing commandline arguments... -status.das_features_being_retrived = DAS features being retrieved... -status.searching_for_sequences_from = Searching for sequences from {0} -status.finished_searching_for_sequences_from = Finished searching for sequences from {0} -label.eps_file = EPS file -label.png_image = PNG image -status.saving_file = Saving {0} -status.export_complete = Export complete. -status.fetching_pdb = Fetching PDB {0} -status.refreshing_news = Refreshing news -status.importing_vamsas_session_from = Importing VAMSAS session from {0} -status.opening_params = Opening {0} -status.waiting_sequence_database_fetchers_init = Waiting for Sequence Database Fetchers to initialise -status.init_sequence_database_fetchers = Initialising Sequence Database Fetchers -status.fetching_sequence_queries_from = Fetching {0} sequence queries from {1} -status.finshed_querying = Finished querying -status.parsing_results = Parsing results. -status.processing = Processing... -status.refreshing_web_service_menus = Refreshing Web Service Menus -status.collecting_job_results = Collecting job results. -status.fetching_das_sequence_features = Fetching DAS Sequence Features -status.no_das_sources_active = No DAS Sources Active -status.das_feature_fetching_cancelled = DAS Feature Fetching Cancelled -status.das_feature_fetching_complete = DAS Feature Fetching Complete -status.fetching_db_refs = Fetching db refs -status.loading_cached_pdb_entries = Loading Cached PDB Entries -status.searching_for_pdb_structures = Searching for PDB Structures -status.opening_file = opening file -status.colouring_chimera = Colouring Chimera -label.font_doesnt_have_letters_defined = Font doesn't have letters defined\nso cannot be used\nwith alignment data -label.font_too_small = Font size is too small -label.error_loading_file_params = Error loading file {0} -label.error_loading_jalview_file = Error loading Jalview file -warn.out_of_memory_when_action = Out of memory when {0}\!\!\nSee help files for increasing Java Virtual Machine memory. -warn.out_of_memory_loading_file = Out of memory loading file {0}\!\!\nSee help files for increasing Java Virtual Machine memory. -label.out_of_memory = Out of memory -label.invalid_id_column_width = Invalid ID Column width -warn.user_defined_width_requirements = The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide. -label.couldnt_create_sequence_fetcher = Couldn't create SequenceFetcher -warn.couldnt_create_sequence_fetcher_client = Could not create the sequence fetcher client. Check error logs for details. -warn.server_didnt_pass_validation = Service did not pass validation.\nCheck the Jalview Console for more details. -warn.url_must_contain = Sequence URL must contain $SEQUENCE_ID$ or a regex $SEQUENCE_ID=//=$ -info.validate_jabaws_server = Validate JabaWS Server ?\n(Look in console output for results) -label.test_server = Test Server? -info.you_want_jalview_to_find_uniprot_accessions = Do you want Jalview to find\nUniprot Accession ids for given sequence names? -label.find_uniprot_accession_ids = Find Uniprot Accession Ids -label.new_sequence_fetcher = New Sequence Fetcher -label.additional_sequence_fetcher = Additional Sequence Fetcher -label.select_database_retrieval_source = Select Database Retrieval Source -label.overwrite_existing_file = Overwrite existing file? -label.file_already_exists = File exists -label.edit_jabaws_url = Edit JABAWS URL -label.add_jabaws_url = Add new JABAWS URL -label.news_from_jalview = News from http://www.jalview.org -label.cut_paste_alignmen_file = Cut & Paste Alignment File -label.enter_redundancy_thereshold = Enter the redundancy threshold -label.select_dark_light_set_thereshold = Select a dark and light text colour, then set the threshold to
    switch between colours, based on background colour
    -label.select_feature_colour = Select Feature Colour -label.delete_all = Delete all sequences -warn.delete_all = Deleting all sequences will close the alignment window.
    Confirm deletion or Cancel. -label.add_annotations_for = Add annotations for -label.choose_annotations = Choose annotations -label.find = Find -label.invalid_search = Search string invalid -error.invalid_regex = Invalid regular expression -label.ignore_gaps_consensus = Ignore Gaps In Consensus -label.show_group_histogram = Show Group Histogram -label.show_group_logo = Show Group Logo -label.normalise_group_logo = Normalise Group Logo -label.show_histogram = Show Histogram -label.show_logo = Show Logo -label.normalise_logo = Normalise Logo -label.no_colour_selection_in_scheme = Please make a colour selection before applying colour scheme -label.no_colour_selection_warn = Error saving colour scheme -label.open_split_window? = Would you like to open as a split window, with cDNA and protein linked? -label.open_split_window = Open split window -label.no_mappings = No mappings found -label.mapping_failed = No sequence mapping could be made between the alignments.
    A mapping requires sequence names to match, and equivalent sequence lengths. -action.no = No -action.yes = Yes -label.for = for -label.select_by_annotation = Select/Hide Columns by Annotation -action.select_by_annotation = Select/Hide Columns by Annotation... -label.threshold_filter = Threshold Filter -action.hide = Hide -action.select = Select -label.alpha_helix = Alpha Helix -label.beta_strand = Beta Strand -label.turn = Turn -label.select_all = Select All -label.structures_filter = Structures Filter -label.search_filter = Search Filter -label.description = Description -label.include_description= Include Description -action.back = Back -label.hide_insertions = Hide Insertions -label.mark_as_representative = Mark as representative -label.open_jabaws_web_page = Open JABAWS web page -label.opens_the_jabaws_server_homepage = Opens the JABAWS server's homepage in web browser -label.pdb_sequence_getcher = PDB Sequence Fetcher -label.result = result -label.results = results -label.structure_chooser = Structure Chooser -label.select = Select : -label.invert = Invert -label.select_pdb_file = Select PDB File -info.select_filter_option = Select Filter Option/Manual Entry -info.associate_wit_sequence = Associate with Sequence -label.search_result = Search Result -label.found_structures_summary = Found Structures Summary -label.configure_displayed_columns = Configure Displayed Columns -label.start_jalview = Start Jalview -label.biojs_html_export = BioJS -label.scale_as_cdna = Scale protein residues to codons -label.scale_protein_to_cdna = Scale Protein to cDNA -label.scale_protein_to_cdna_tip = Make protein residues same width as codons in split frame views -info.select_annotation_row = Select Annotation Row -info.enter_search_text_here = Enter Search Text Here -info.enter_search_text_to_enable = Enter Search Text to Enable -info.search_in_annotation_label = Search in {0} Label -info.search_in_annotation_description = Search in {0} Description -info.change_threshold_mode_to_enable = Change Threshold Mode to Enable diff --git a/bin/lang/Messages_es.properties b/bin/lang/Messages_es.properties deleted file mode 100644 index 6db40cf..0000000 --- a/bin/lang/Messages_es.properties +++ /dev/null @@ -1,1136 +0,0 @@ -action.refresh_services = Refrescar servicios -action.reset_services = Reiniciar servicios -action.merge_results = Unificar resultados -action.load_scheme = Cargar esquema -action.save_scheme = Guardar esquema -action.save_image = Guardar imagen -action.paste = Pegar -action.show_html_source = Mostrar código HTML -action.print = Imprimir -action.web_service = Servicio web -action.cancel_job = Cancelar trabajo -action.start_job = Arrancar trabajo -action.revert = Deshacer -action.move_down = Mover hacia abajo -action.move_up = Mover hacia arriba -action.remove_return_datatype = Borrar tipo de datos de retorno -action.add_return_datatype = Añadir tipo de datos de retorno -action.remove_input_parameter = Borrar el parámetro de entrada seleccionado -action.add_input_parameter = Añadir parámetro de entrada seleccionado -action.edit = Editar -action.new = Nuevo -action.open_file = Abrir fichero -action.show_unconserved = Mostrar regiones no conservadas -action.open_new_alignment = Abrir nuevo alineamiento -action.raise_associated_windows = Destacar ventanas asociadas -action.minimize_associated_windows = Minimizar ventanas asociadas -action.close_all = Cerrar todo -action.load_project = Cargar proyecto -action.save_project = Guardar proyecto -action.quit = Salir -action.expand_views = Expandir vistas -action.gather_views = Capturar vistas -action.page_setup = Configuración de la página -action.reload = Recargar -action.load = Cargar -action.open = Abrir -action.cancel = Cancelar -action.create = Crear -action.update = Actualizar -action.delete = Borrar -action.snapshot = Imagen -action.clear = Limpiar -action.accept = Aceptar -action.select_ddbb = --- Seleccionar base de datos --- -action.undo = Deshacer -action.redo = Rehacer -action.reset = Reiniciar -action.remove_left = Eliminar parte izquierda -action.remove_right = Eliminar parte derecha -action.remove_empty_columns = Eliminar las columnas vacías -action.remove_all_gaps = Eliminar todos los huecos -action.left_justify_alignment = Ajustar el alineamiento a la izquierda -action.right_justify_alignment = Ajustar el alineamiento a la derecha -action.boxes = Casillas -action.text = Texto -action.by_pairwise_id = Identificar por parejas -action.by_id = Por identificador -action.by_length = Por longitud -action.by_group = Por grupo -action.remove = Eliminar -action.remove_redundancy = Eliminar redundancia... -action.pairwise_alignment = Alineamiento de pares... -action.by_rna_helixes = Por hélices de RNA -action.user_defined = Definido por el usuario... -action.by_conservation = Por conservación -action.wrap = Envolver -action.show_gaps = Mostrar huecos -action.show_hidden_markers = Mostrar marcadores ocultos -action.find = Buscar -action.undefine_groups = Grupos sin definir -action.create_groups = Crear grupos -action.make_groups_selection = Hacer grupos para seleccionar -action.copy = Copiar -action.cut = Cortar -action.font = Fuente... -action.scale_above = Escala superior -action.scale_left = Escala izquierda -action.scale_right = Escala derecha -action.by_tree_order = Por orden del árbol -action.sort = Ordenar -action.calculate_tree = Calcular árbol -action.help = Ayuda -action.by_annotation = Por anotación... -action.invert_sequence_selection = Invertir selección de secuencias -action.invert_column_selection = Invertir selección de columnas -action.show = Mostrar -action.hide = Ocultar -action.ok = OK -action.set_defaults = Defecto -action.create_group = Crear grupo -action.remove_group = Eliminar grupo -action.edit_group = Editar grupo -action.border_colour = Color del borde -action.edit_new_group = Editar nuevo grupo -action.hide_sequences = Ocultar secuencias -action.sequences = Secuencias -action.ids = IDS -action.ids_sequences = IDS y secuencias -action.reveal_all = Revelar todo -action.reveal_sequences = Revelar secuencias -action.find_all = Buscar todo -action.find_next = Buscar siguiente -action.file = Archivo -action.view = Ver -action.change_params = Cambiar parámetros -action.apply = Aplicar -action.apply_threshold_all_groups = Aplicar umbral a todos los grupos -action.apply_all_groups = Aplicar a todos los grupos -action.by_chain = Por cadena -action.by_sequence = Por secuencia -action.paste_annotations = Pegar anotaciones -action.format = Formato -action.select = Seleccionar -action.new_view = Nueva vista -action.close = Cerrar -action.add = Añadir -action.save_as_default = Guardar como por defecto -action.save_as = Guardar como -action.save = Guardar -action.cancel_fetch = Cancelar búsqueda -action.save_omit_hidden_columns = Guardar / Omitir las columnas ocultas -action.change_font = Cambiar Fuente -action.change_font_tree_panel = Cambiar fuente (panel del árbol) -action.colour = Color -action.calculate = Calcular -action.select_all = Seleccionar Todo -action.deselect_all = Deseleccionar Todo -action.invert_selection = Invertir selección -action.using_jmol = Usar Jmol -action.link = Enlazar -action.group_link = Enlazar grupo -action.show_chain = Mostrar cadena -action.show_group = Mostrar grupo -action.fetch_db_references = Recuperar referencias a base de datos -action.view_flanking_regions = Mostrar flancos -label.view_flanking_regions = Mostrar los datos de la secuencia a ambos lados de las subsecuencias implicadas en este alineamiento -label.str = Str: -label.seq = Seq: -label.structures_manager = Administrar estructuras -label.nickname = Sobrenombre: -label.url = URL: -label.input_file_url = Introducir URL en el fichero de entrada -label.select_feature = Seleccionar función: -label.name = Nombre: -label.name_param = Nombre: {0} -label.group = Grupo: -label.group_name = Nombre del grupo -label.group_description = Descripción del grupo -label.edit_group_name_description = Editar nombre/descripción del grupo -label.colour = Color: -label.description = Descripción: -label.start = Comenzar: -label.end = Terminar: -label.current_parameter_set_name = Nombre actual del conjunto de parámetros: -label.service_action = Acción de servicio: -label.post_url = POST URL: -label.url_suffix = URL Sufijo -label.sequence_source = Fuente de la secuencia -label.per_seq = por secuencia -label.result_vertically_separable = Los resultados son separables verticalmente -label.amend = Modificar -label.undo_command = Deshacer {0} -label.redo_command = Rehacer {0} -label.principal_component_analysis = Análisis del Componente Principal -label.average_distance_identity = Distancia Media Usando % de Identidad -label.neighbour_joining_identity = Unir vecinos utilizando % de Identidad -label.treecalc_title = {0} utilizando {1} -label.tree_calc_av = Distancia media -label.tree_calc_nj = Unir vecinos -label.select_score_model = Selecciones modelo de puntuación -label.score_model_pid = % Identidad -label.score_model_blosum62 = BLOSUM62 -label.score_model_pam250 = PAM 250 -label.score_model_conservation = Conservación de las propiedades físico-químicas -label.score_model_enhconservation = Conservación de las propiedades físico-químicas -label.status_bar = Barra de estado -label.out_to_textbox = Generar cuadro de texto -label.clustalx = Clustalx -label.clustal = Clustal -label.zappo = Zappo -label.taylor = Taylor -label.blc = BLC -label.fasta = Fasta -label.msf = MSF -label.pfam = PFAM -label.pileup = Pileup -label.pir = PIR -label.hydrophobicity = Hidrofobicidad -label.helix_propensity = Tendencia de la hélice -label.strand_propensity = Tendencia de la hebra -label.turn_propensity = Tendencia de giro -label.buried_index = Índice de encubrimiento -label.purine_pyrimidine = Purina/Pirimidina -label.percentage_identity = Porcentaje de identidad -label.blosum62 = BLOSUM62 -label.blosum62_score = Puntuación del BLOSUM62 -label.tcoffee_scores = Puntuación del T-Coffee -label.average_distance_bloslum62 = Distancia Media Usando BLOSUM62 -label.neighbour_blosum62 = Neighbour Joining usando BLOSUM62 -label.show_annotations = Mostrar anotaciones -label.colour_text = Color del texto -label.show_non_conversed = Mostrar no conservadas -label.overview_window = Ventana resumen -label.none = Ninguno -label.above_identity_threshold = Por encima del umbral de identidad -label.show_sequence_features = Mostrar las características de las secuencias -label.nucleotide = Nucleótido -label.to_new_alignment = A nuevo alineamiento -label.to_this_alignment = Añadir a este alineamiento -label.apply_colour_to_all_groups = Aplicar color a todos los grupos -label.modify_identity_thereshold = Modificar el umbral de identidad... -label.modify_conservation_thereshold = Modificar el umbral de conservación... -label.input_from_textbox = Introducir desde el cuadro de texto -label.centre_column_labels = Centrar las etiquetas de las columnas -label.automatic_scrolling = Desplazamiento automático -label.documentation = Documentación -label.about = Acerca de... -label.show_sequence_limits = Mostrar los límites de la secuencia -label.feature_settings = Ajustar funciones... -label.sequence_features = Funciones de la secuencia -label.all_columns = Todas las columnas -label.all_sequences = Todas las secuencias -label.selected_columns = Columnas seleccionadas -label.selected_sequences = Secuencias seleccionadas -label.all_but_selected_region = Todo menos la región seleccionada (Shift+Ctrl+H) -label.selected_region = Región seleccionada -label.all_sequences_columns = Todas las secuencias y columnas -label.group_consensus = Consenso de grupo -label.group_conservation = Conservación de grupo -label.show_consensus_histogram = Mostrar el histograma de consenso -label.show_consensus_logo = Mostrar el logo de consenso -label.norm_consensus_logo = Normalizar el logo de consenso -label.apply_all_groups = Aplicar a todos los grupos -label.autocalculated_annotation = Anotación autocalculada -label.min_colour = Color mínimo -label.max_colour = Color máximo -label.use_original_colours = Usar colores originales -label.threshold_minmax = El umbral es mín/máx -label.represent_group_with = Representar al grupo con -label.selection = Seleccionar -label.group_colour = Color del grupo -label.sequence = Secuencia -label.view_pdb_structure = Ver estructura PDB -label.min = Mín: -label.max = Máx: -label.colour_by_label = Color por etiquetas -label.new_feature = Nueva función -label.match_case = Hacer corresponder mayúsculas y minúsculas -label.view_alignment_editor = Ver en el editor de alineamientos -label.labels = Etiquetas -label.output_values = Valores de salida... -label.output_points = Puntos de salida... -label.output_transformed_points = Puntos de salida transformados -label.input_data = Datos de entrada... -label.nucleotide_matrix = Matriz nucleotídica -label.protein_matrix = Matriz proteica -label.show_bootstrap_values = Mostrar valores de Bootstrap -label.show_distances = Mostrar distancias -label.mark_unassociated_leaves = Marcar hojas no asociadas -label.fit_to_window = Ajustar a la ventana -label.newick_format = Formato Newick -label.select_newick_like_tree_file = Seleccione un fichero de árbol tipo Newick -label.colours = Colores -label.view_mapping = Ver mapeado -label.wireframe = Estructura metálica -label.depthcue = Clave de profundidad -label.z_buffering = Tamponamiento Z -label.charge_cysteine = Carga & Cisteína -label.all_chains_visible = Todas las cadenas visibles -label.successfully_added_features_alignment = Funciones añadidas exitosamente al alineamiento -label.keyboard_editing_mode = El modo de editar teclado es {0} -label.paste_features_annotations_Tcoffee_here = Pegar tus funciones / anotaciones / puntuación del fichero T-coffee aquí. -label.removed_columns = {0} columnas eliminadas. -label.removed_empty_columns = {0} columnas vacías eliminadas. -label.paste_newick_tree_file = Pegar su fichero árbol Newick aquí. -label.order_by_params = Ordenar por {0} -label.html_content = {0} -label.paste_pdb_file= Pegar tu fichero PDB aquí. -label.paste_pdb_file_for_sequence = Pegar fichero PDB para la secuencia {0} -label.could_not_parse_newick_file = No se pudo analizar el fichero Newick\\\!\\n {0} -label.successfully_pasted_tcoffee_scores_to_alignment= Pegada exitosamente la puntuación T-Coffee al alineamiento. -label.failed_add_tcoffee_scores = Fallo al añadir las puntuaciones T-Coffee: -label.successfully_pasted_annotation_to_alignment = Anotación pegada exitosamente al alineamiento. -label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file = No es posible parsear el texto pegado como una anotación características, GFF, o fichero T-Coffee válidos -label.successfully_pasted_alignment_file = Fichero de alineamiento pegado exitosamente -label.paste_your_alignment_file = Pegar su fichero de alineamiento aquí -label.paste_your = Pegar su -label.finished_searching = Búsqueda finalizada -label.search_results= Buscar Resultados {0} : {1} -label.found_match_for = Buscar coincidencia para {0} -label.font = Fuente: -label.size = Talla: -label.style = Estilo: -label.enter_redundancy_threshold = Introducir el umbral de redundancia -label.calculating = Calculando.... -label.modify_conservation_visibility = Modificar la visibilidad de conservación -label.colour_residues_above_occurence = Residuos de color por encima del % de aparición -label.set_this_label_text = fijar como etiqueta -label.sequences_from = Secuencias de {0} -label.successfully_loaded_file = Fichero cargado exitosamente {0} -label.successfully_saved_to_file_in_format = Guardado exitosamente en el fichero: {0} en formato {1}. -label.copied_sequences_to_clipboard = Copiadas {0} secuencias en el portapapeles. -label.check_file_matches_sequence_ids_alignment = Comprobar que el fichero coincide con el ID de la secuencia en el alineamiento. -label.problem_reading_tcoffee_score_file = Problema de lectura del fichero de puntuaciones T-COFFEE -label.source_to_target = {0} a {1} -label.per_sequence_only= Sólo por secuencia -label.to_file = a fichero -label.to_textbox = a cuadro de texto -label.jalview = Jalview -label.csv_spreadsheet = CSV (Hoja de cálculo) -label.status = [Estado] -label.channels = Canales -label.channel_title_item_count = {0} ({1}) -label.blog_item_published_on_date = {0} {1} -label.select_das_service_from_table = Seleccionar servicio DAS de la tabla para leer una descripción completa aquí. -label.session_update = Actualizar sesión -label.new_vamsas_session = Nueva sesión Vamsas -label.load_vamsas_session = Cargar sesión Vamsas -label.save_vamsas_session = Guardar sesión Vamsas -label.select_vamsas_session_opened_as_new_vamsas_session= Selecciones una sesión vamsas para abrirla como una nueva sesión. -label.open_saved_vamsas_session = Abrir una sesión VAMSAS guardada -label.groovy_console = Consola Groovy -label.lineart = lineart -label.dont_ask_me_again = No volver a preguntar -label.select_eps_character_rendering_style = Seleccionar el carácter EPS como estilo de visualización -label.invert_selection = Invertir selección -label.optimise_order = Optimizar orden -label.seq_sort_by_score = Ordenar las secuencias por puntuación -label.load_colours = Cargar colores -label.save_colours = Guardar colores -label.fetch_das_features = Recuperar funciones DAS -label.selected_database_to_fetch_from = Seleccionada {0} Base de datos {1} para buscar de {2} -label.database_param = Base de datos: {0} -label.example = Ejemplo -label.example_param = Ejemplo: {0} -label.select_file_format_before_saving = Debe seleccionar un formato de fichero antes de guardar! -label.file_format_not_specified = Formato de fichero no especificado -label.alignment_contains_hidden_columns = El alineamiento contiene columnas ocultas.\\nQuieres guardar s\u00F3lo el alineamiento visible? -label.couldnt_save_file = No se pudo guardar el fichero: {0} -label.error_saving_file = Error guardando el fichero -label.remove_from_default_list = eliminar de la lista de defectuosos? -label.remove_user_defined_colour = Eliminar el color definido por el usuario -label.you_must_select_least_two_sequences = Debes seleccionar al menos 2 secuencias. -label.invalid_selection = Selección inválida -label.principal_component_analysis_must_take_least_four_input_sequences = El an\u00E1lisis de la componente principal debe tomar\\nal menos 4 secuencias de entrada. -label.sequence_selection_insufficient = Selección de secuencias insuficiente -label.you_need_more_two_sequences_selected_build_tree = necesitas seleccionar más de dos secuencias para construir un árbol! -label.not_enough_sequences = No suficientes secuencias -label.selected_region_to_tree_may_only_contain_residues_or_gaps = La regi\u00F3n seleccionada para construir un \u00E1rbol puede\\ncontener s\u00F3lo residuos o espacios.\\nPrueba usando la funci\u00F3n Pad en el men\u00FA de edici\u00F3n,\\n o uno de los m\u00FAltiples servicios web de alineamiento de secuencias. -label.sequences_selection_not_aligned = Las secuencias seleccionadas no están alineadas -label.sequences_must_be_aligned_before_creating_tree = Las secuencias deben estar alineadas antes de crear el \u00E1rbol.\\nPrueba usando la funci\u00F3n Pad en el men\u00FA de editar,\\n o uno de los m\u00FAltiples servicios web de alineamiento de secuencias. -label.sequences_not_aligned = Secuencias no alineadas -label.problem_reading_tree_file = Problema al leer el fichero del árbol -label.possible_problem_with_tree_file = Posible problema con el fichero del árbol -label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Por favor seleccionar al menos tres bases de al menos una secuencia para poder realizar la traducción de cDNA. -label.translation_failed = Translation Failed -label.error_when_translating_sequences_submit_bug_report = Desafortunadamente, algo fue mal a la hora de traducir tus secuencias.\\nPor favor, revisa la consola Jalview java \\ny presenta un informe de error que incluya el seguimiento. -label.implementation_error = Error de implementación: -label.automatically_associate_pdb_files_with_sequences_same_name = Quieres asociar automáticamente los {0} ficheros PDB con las secuencias del alineamiento que tengan el mismo nombre? -label.automatically_associate_pdb_files_by_name = Asociar los ficheros PDB por nombre automáticamente -label.ignore_unmatched_dropped_files_info = Quieres ignorar los {0} ficheros cuyos nombres no coincidan con ningún IDs de las secuencias ? -label.ignore_unmatched_dropped_files = Ignorar los ficheros sin coincidencias? -label.enter_view_name = Introducir nombre visible (¿?) -label.enter_label = Introducir etiqueta -label.enter_label_for_the_structure = Introducir una etiqueta para la estructura? -label.pdb_entry_is_already_displayed = {0} Ya est\u00E1 mostrado.\\nQuieres volver a usar este visor? -label.map_sequences_to_visible_window = Mapa de secuencias en ventana visible: {0} -label.add_pdbentry_to_view = Quieres a\u00F1adir {0} a la vista llamada\\n{1}\\n -label.align_to_existing_structure_view = Alinear a una estructura ya existente -label.pdb_entries_couldnt_be_retrieved = Las siguientes entradas pdb no pueden ser extra\u00EDdas del PDB\\\:\\n{0}\\nPor favor, prueba descarg\u00E1ndolas manualmente. -label.couldnt_load_file = No se pudo cargar el fichero -label.couldnt_find_pdb_id_in_file = No se pudo encontrar un Id PDB en el fichero suministrado. Por favor, introduzca un Id para identificar esta estructura. -label.no_pdb_id_in_file = No hay un Id PDB en el fichero -label.couldnt_read_pasted_text = No se pudo leer el texto pegado {0} -label.error_parsing_text = Error analizando el texto -label.enter_local_das_source = Intruduzca el Nickname & URL de la fuente DAS local -label.you_can_only_edit_or_remove_local_das_sources = Sólo puedes editar o eliminar fuentes DAS locales! -label.public_das_source = Fuente pública DAS - no editable -label.input_alignment_from_url = Alineamiento de entrada desde URL -label.input_alignment = Alineamiento de entrada -label.couldnt_import_as_vamsas_session = No se pudo importar {0} como una nueva sesión Vamsas. -label.vamsas_document_import_failed = Fallo en la importación del documento Vamsas -label.couldnt_locate = No se pudo localizar {0} -label.url_not_found = URL no encontrada -label.no_link_selected = Enlace no seleccionado -label.new_sequence_url_link = Enlace a una nueva secuencia URL -label.cannot_edit_annotations_in_wrapped_view = No se pueden editar anotaciones en vista envolvente -label.wrapped_view_no_edit = Vista envolvente - no editar -label.error_retrieving_data = Error en la recuperación de datos -label.user_colour_scheme_must_have_name = El esquema de colores del usuario debe tener un nombre -label.no_name_colour_scheme = No hay nombre para el esquema de colores -label.invalid_url = URL Invalido! -label.error_loading_file = Error al cargar el fichero -label.problems_opening_file = Encontrados problemas al abrir el fichero {0}!! -label.file_open_error = Error al abrir el fichero -label.no_das_sources_selected_warn = No han sido seleccionadas fuentes DAS.\\nPor favor, seleccione algunas fuentes y\\npruebe de nuevo. -label.no_das_sources_selected_title = No han sido seleccionadas fuentes DAS -label.colour_scheme_exists_overwrite = El esquema de colores {0} ya existe.\\nContinuar guardando el esquema de colores como {1}? -label.duplicate_scheme_name = Duplicar nombre de esquema -label.jalview_new_questionnaire = Hay un nuevo cuestionario disponible. Querr\u00EDa completarlo ahora ?\\n -label.jalview_user_survey = Encuesta de usuario Jalview -label.alignment_properties = Propiedades del alineamiento: {0} -label.alignment_props = Propiedades del alineamiento -label.input_cut_paste = Cortar y pegar la entrada -label.input_cut_paste_params = Cortar y pegar la entrada - {0} -label.alignment_output_command = Alineamiento de salida - {0} -label.annotations = Anotaciones -label.features = Funciones -label.overview_params = Visión general {0} -label.paste_newick_file = Pegar nuevo fichero Newick -label.load_tree_from_file = desde fichero - -label.colour_by_annotation = Color por anotación -label.selection_output_command = Seleccionar salida - {0} -label.annotation_for_displayid =

    Anotación para {0}

    -label.pdb_sequence_mapping = PDB - Mapeado de secuencia -label.pca_details = detalles de la PCA -label.redundancy_threshold_selection = Selección del umbral de redundancia -label.user_defined_colours = Colores definidos del usuario -label.jalviewLite_release = JalviewLite - versión {0} -label.jaview_build_date = Fecha de creación: {0} -label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt, -label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. -label.jalview_dev_managers = Desarrollo gestionado por The Barton Group, University of Dundee, Scotland, UK. -label.jalview_distribution_lists = Para ayuda, ver el FAQ at www.jalview.org y/o adjuntar la lista de envío jalview-discuss@jalview.org -label.jalview_please_cite = Si usa Jalview incluya la siguiente cita, por favor: -label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) -label.jalview_cite_1_title = Jalview Version 2 - un editor de alineamiento múltiple de secuencias y banco de trabajo de análisis -label.jalview_cite_1_ref = Bioinformaticos doi: 10.1093/bioinformatics/btp033 -label.right_click = clic en el botón derecho -label.to_add_annotation = para añadir anotación -label.alignment_has_no_annotations = El alineamiento no tiene anotaciones -label.retrieving_pdb_data = Recuperación de datos PDB... -label.label = Etiqueta -label.no_features_added_to_this_alignment = No hay funciones asociadas a este alineamiento!! -label.features_can_be_added_from_searches_1 = (Las funciones pueden ser añadidas de búsquedas o -label.features_can_be_added_from_searches_2 = de ficheros de funciones Jalview / GFF) -label.calculating_pca= Calculando PCA -label.reveal_columns = Mostrar Columnas -label.jalview_cannot_open_file = Jalview no puede abrir el fichero -label.jalview_applet = Aplicación Jalview -label.loading_data = Cargando datos -label.memory_stats = Memoria libre total: {0} MB; Memoria máxima: {1} MB; {2} % -label.calculating_tree = Calculando árbol -label.state_queueing = En cola -label.state_running = Procesando -label.state_complete = Completar -label.state_completed = Finalizado -label.state_job_cancelled = ¡Trabajo cancelado! -label.state_job_error = Error del trabajo! -label.server_error_try_later = ¡Error del servidor! (Intentar más tarde) -label.error_loading_pdb_data = ¡Error cargando los datos PDB! -label.fetching_pdb_data = Buscando los datos PDB... -label.structure_type = Estructura_tipo -label.settings_for_type = Ajustes para {0} -label.view_full_application = Ver en la aplicación completa -label.load_associated_tree = Cargar árbol asociado ... -label.load_features_annotations = Cargar características/anotaciones ... -label.export_features = Exportar características... -label.export_annotations = Exportar anotaciones ... -label.jalview_copy = Copiar (sólo Jalview) -label.jalview_cut = Cortar (sólo Jalview) -label.to_upper_case = Pasar a mayúsculas -label.to_lower_case = Pasar a minúsculas -label.toggle_case = Alternar mayúsculas y minúsculas -label.edit_name_description = Editar nombre/descripción -label.create_sequence_feature = Crear función de secuencia -label.edit_sequence = Editar secuencia -label.edit_sequences = Editar secuencias -label.sequence_details = Detalles de la secuencia -label.jmol_help = Ayuda de Jmol -label.all = Todo -label.sort_by = Ordenar por -label.sort_by_score = Ordenar por puntuación -label.sort_by_density = Ordenar por densidad -label.sequence_sort_by_density = Ordenar las secuencias por densidad -label.reveal = Revelar -label.hide_columns = Ocultar columnas -label.load_jalview_annotations = Cargar un fichero de anotación de Jalivew o un fichero de características -label.load_tree_file = Cargar un fichero de árbol -label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = Recuperar y parsear un registro de secuencia de base de datos para el alineamiento o secuencias actualmente seleccionados -label.standard_databases = Bases de datos estándar -label.fetch_embl_uniprot = Recuperar de EMBL/EMBLCDS o Uniprot/PDB y de cualquier fuente DAS seleccionada -label.reset_min_max_colours_to_defaults = Reiniciar los colores min y max colours a los valores por defecto establecidos en las preferencias de usuario -label.align_structures_using_linked_alignment_views = Alinear las estructuras utlizando las {0} vistas de alineamiento enlazadas -label.connect_to_session = Conectar a la sesión {0} -label.threshold_feature_display_by_score = Filtrar la característica mostrada por puntuación. -label.threshold_feature_no_thereshold = Sin umbral -label.threshold_feature_above_thereshold = Por encima del umbral -label.threshold_feature_below_thereshold = Por debajo del umbral -label.adjust_thereshold = Ajustar umbral -label.toggle_absolute_relative_display_threshold = Cambiar entre mostrar el umbral absoluto y el relativo. -label.display_features_same_type_different_label_using_different_colour = Mostrar las características del mismo tipo con una etiqueta diferente y empleando un color distinto (p.e. características del dominio) -label.select_colour_minimum_value = Seleccionar el color para el valor mínimo -label.select_colour_maximum_value = Seleccionar el color para el valor máximo -label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista Jmol con todas las estructuras asociadas con la selección acxtual y superponer las utilizando el alineamiento. -label.open_url_param = Abrir URL {0} -label.open_url_seqs_param = Abrir URL ({0}..) ({1} secuencias) -label.load_pdb_file_associate_with_sequence = Cargar un fichero PDB y asociarlo con la secuencia {0} -label.reveal_hidden_columns = Revelar las columnas ocultas con el botón derecho del ratón -label.dark_colour = Oscurecer color -label.light_colour = Aclarar color -label.highlightnode = Pulse el botón izquierdo para seleccionar las hojas.
    Haga doble clic para invertir las hojas.
    Pulse el botón derecho para cambiar el color. -label.load_colour_scheme = Cargar esquema cromático -label.toggle_enabled_views = Cuando está habilitado, permite que se seleccionen varias vistas. -label.edit_notes_parameter_set = Haga clic para editar las notas de este conjunto de parámetros. -label.open_local_file = Abrir fichero local -label.enable_automatically_sort_alignment_when_open_new_tree = Habilite esta opción para ordenar automáticamente
    el alineamiento cuando abra
    un nuevo árbol. -label.listen_for_selections = Atención a las selecciones -label.selections_mirror_selections_made_same_sequences_other_views = Cuando está habilitado, las selecciones de esta vista serán un reflejo
    de las selecciones realizadas en las mismas secuencias de otras vistas. -label.toggle_sequence_visibility = Shift+H cambia la visibilidad de la secuencia -label.toggle_columns_visibility = Ctrl+H cambia la visibilidad de la columna -label.toggles_visibility_hidden_selected_regions = H cambiar la visibilidad de las regiones ocultas o seleccionadas -label.rename_tab_eXpand_reGroup= Haga clic en el botón derecho para renombrar la pestaña
    Presione X para expandir las tablas y G para reagrupar. -label.right_align_sequence_id = Alinear a la derecha el ID de la secuencia -label.sequence_id_tooltip = Ayuda del ID de la secuencia -label.no_services = -label.select_copy_raw_html = Seleccione esta opción si desea copiar el html en bruto -label.share_data_vamsas_applications = Compartir datos con otras aplicaciones vamsas -label.connect_to = Conectar a -label.join_existing_vamsas_session = Unirse a una sesión vamsas existente -label.from_url = desde una URL -label.any_trees_calculated_or_loaded_alignment_automatically_sort = Cuando está habilitado, cualquier árbol calculado o cargado en el alineamiento lo ordenará -label.sort_with_new_tree = Ordenar con el nuevo árbol -label.from_textbox = desde un área de texto -label.window = Ventana -label.preferences = Preferencias -label.tools = Herramientas -label.fetch_sequences = Recuperar secuencia(s) -label.stop_vamsas_session = Parar sesión vamsas -label.collect_garbage = Recolector de basura -label.show_memory_usage = Mostrar uso de memoria -label.show_java_console = Mostrar consola de Java -label.show_jalview_news = Mostrar las noticias de Jalview -label.take_snapshot = Tomar captura -label.monospaced_fonts_faster_to_render = Las fuentes monoespaciadas son más rápidas de pintar -label.anti_alias_fonts = Fuentes anti-alias (más lentas de pintar) -label.monospaced_font= Monoespaciadas -label.quality = Calidad -label.maximize_window = Maximizar ventana -label.conservation = Conservación -label.consensus = Consenso -label.histogram = Histograma -label.logo = Logo -label.non_positional_features = Características no posicionales -label.database_references = Referencias a base de datos -label.share_selection_across_views = Compartir la selección en todas las vistas -label.scroll_highlighted_regions = Desplazarse hasta las regiones resaltadas -label.gap_symbol = Símbolo del hueco -label.alignment_colour = Color del alineamiento -label.address = Dirección -label.port = Puerto -label.default_browser_unix = Navegador por defecto (Unix) -label.send_usage_statistics = Enviar estadísticas de uso -label.check_for_questionnaires = Comprobar los cuestionarios -label.check_for_latest_version = Comprobar la última versión -label.url_linkfrom_sequence_id = URL del enlace del ID de la secuencia -label.use_proxy_server = Utilizar un servidor proxy -label.eps_rendering_style = Estilo de visualización EPS -label.append_start_end = Añadir /inicio-fin (/15-380) -label.full_sequence_id = ID de la secuencia completo -label.smooth_font = Fuente alargada -label.autocalculate_consensus = Autocalcular consenso -label.pad_gaps = Rellenar huecos -label.pad_gaps_when_editing = Rellenar huecos al editar -label.automatically_set_id_width = Establecer automáticamente al anchura del ID -label.figure_id_column_width = Anchura de la columna del ID de la Figura -label.use_modeller_output = Utilizar la salidad del Modeller -label.wrap_alignment = Envolver alineamiento -label.right_align_ids = Alinear IDs a la derecha -label.sequence_name_italics = Nombre de la secuencia en cursiva -label.open_overview = Abrir resumen -label.default_colour_scheme_for_alignment = Esquema cromático por defecto para el alineamiento -label.annotation_shading_default = Sombreado por defecto de la anotación -label.default_minimum_colour_annotation_shading = Por mínimo por defecto para el sombreado de la anotación -label.default_maximum_colour_annotation_shading = Por máximo por defecto para el sombreado de la anotación -label.visual = Visual -label.connections = Conexiones -label.output = Salida -label.editing = Edición -label.das_settings = Configuración DAS -label.web_services = Servicios web -label.right_click_to_edit_currently_selected_parameter = Haga clic en el botón derecho para editar el parámetro seleccionado actualmente. -label.let_jmol_manage_structure_colours = Permitir que Jmol gestione la estructuras cromáticas -label.marks_leaves_tree_not_associated_with_sequence = Marcar las hojas del árbol que no están asociadas a una secuencia -label.index_web_services_menu_by_host_site = Indizar los servicios web en el menú por el host que los aloja -label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up = Marque esta opción si desea ser informado
    cuando no se pueda acceder a la URL de un servicio web
    al arrancar Jalview. -label.new_service_url = Nueva URL del servicio -label.edit_service_url = Editar la URL del servicio -label.delete_service_url = Borrar la URL del servicio -label.details = Detalles -label.options = Opciones -label.parameters = Paramétros -label.available_das_sources = Fuentes DAS disponibles -label.full_details = Detalles completos -label.authority = Autoridad -label.type = Tipo -label.proxy_server = Servidor proxy -label.file_output = Fichero de salida -label.select_input_type = Seleccionar el tipo de entrada -label.set_options_for_type = Establecer opciones para el tipo -label.data_input_parameters = Datos de los parámetros de entrada -label.data_returned_by_service = Datos devueltos por el servicio -label.rsbs_encoded_service = Servicio RSBS codificado -label.parsing_errors = Errores de parseo -label.simple_bioinformatics_rest_services = Simple Bioinformatics Rest Services -label.web_service_discovery_urls = URL de descubrimiento de servicios web -label.input_parameter_name = Nombre del parámetro de entrada -label.short_descriptive_name_for_service = Nombre corto descriptivo del servicio -label.function_service_performs = Tipo de función que realiza el servicio (p.e. alineamiento, análisis, búsqueda, etc). -label.brief_description_service = Descripción breve del servicio -label.url_post_data_service = URL a la que enviar los datos del servicio. Incluya cualquier parámetro especial que se necesite aquí -label.optional_suffix = Sufijo opcional añadido a la URL al recuperar los resultados del servicio -label.preferred_gap_character = ¿Qué caracter para el hueco prefiere el servicio? -label.gap_character = Carácter para hueco -label.move_return_type_up_order= Mover el tipo de returno hacia arriba en el orden -label.move_return_type_down_order= Mover el tipo de returno hacia abajo en el orden -label.update_user_parameter_set = Actualizar el conjunto de parámetros de usuario existente -label.delete_user_parameter_set = Borrar el conjunto de parámetros de usuario existente -label.create_user_parameter_set = Crear un nuevo conjunto de parámetro con la configuración actual. -label.revert_changes_user_parameter_set = Deshacer todos los cambios en el conjunto de parámetros actual -label.start_job_current_settings = Arrancar trabajo con la configuración actual -label.cancel_job_close_dialog = Cerrar este diálogo y cancelar el trabajo -label.input_output = Entrada/Salida -label.cut_paste = Cortar y pegar -label.adjusting_parameters_for_calculation = Ajustar los parámetros para el cálculo existente -label.2d_rna_structure_line = 2D RNA {0} -label.2d_rna_sequence_name = 2D RNA - {0} -label.edit_name_and_description_current_group = Editar el nombre y la descripción del grupo actual. -label.view_structure_for = Visualizar la estructura para {0} -label.view_all_structures = Visualizar todas las {0} estructuras. -label.view_all_representative_structures = Visualizar todas las {0} estructuras representativas. -label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista de Jmol con todas las estructuras representativas\nasociadas con la selecci\u00F3n actual\nsuperpuesta con el alineamiento actual. -label.associate_structure_with_sequence = Asociar estructura con la secuencia -label.from_file = desde fichero -label.enter_pdb_id = Introducir PDB Id -label.discover_pdb_ids = Buscar PDB ids -label.text_colour = Color del texto -label.structure = Estructura -label.view_structure = Visualizar estructura -label.clustalx_colours = Colores de Clustalx -label.above_identity_percentage = Sobre % identidad -label.create_sequence_details_report_annotation_for = Anotación para {0} -label.sequece_details_for = Detalles de la secuencia para {0} -label.sequence_name = Nombre de la secuencia -label.sequence_description = Descripción de la secuencia -label.edit_sequence_name_description = Editar el nombre/descripción de la secuencia -label.spaces_converted_to_backslashes = Los espacios se han convertido en _ -label.no_spaces_allowed_sequence_name = No se permiten espacios en el nombre de la secuencia -label.select_outline_colour = Seleccionar el color del límite -label.web_browser_not_found_unix = Unixers\: No es posible encontrar el navegador web por defecto.\nA\u00F1ada la ruta completa de su navegador en la pesta\u00F1a de Preferencias. -label.web_browser_not_found = No se encuentra el navegador web -label.select_pdb_file_for = Seleccione un fichero PDB para {0} -label.html = HTML -label.wrap = Envolver -label.show_database_refs = Mostrar las referencias en base de datos -label.show_non_positional_features = Mostrar las características no posicionales -label.save_png_image = Guardar como imagen PNG -label.load_tree_for_sequence_set = Cargar un árbol para este conjunto de secuencias -label.export_image = Exportar imagen -label.vamsas_store = Almacén VAMSAS -label.translate_cDNA = Traducir cDNA -label.extract_scores = Extraer puntuaciones -label.get_cross_refs = Obtener referencias cruzadas -label.sort_alignment_new_tree = Alinear el alineamiento con el nuevo árbol -label.add_sequences = Añadir secuencias -label.new_window = Nueva ventana -label.refresh_available_sources = Refrescar las fuentes disponibles -label.use_registry = Utilizar el registro -label.add_local_source = Añadir fuente local -label.set_as_default = Establecer por defecto -label.show_labels = Mostrar etiquetas -label.background_colour = Color de fondo -label.associate_nodes_with = Asociar nodos con -label.jalview_pca_calculation = Cálculo del PCA por Jalview -label.link_name = Nombre del enalce -label.pdb_file = Fichero PDB -label.colour_with_jmol = Colorear con Jmol -label.align_structures = Alinear estructuras -label.jmol = Jmol -label.sort_alignment_by_tree = Ordenar alineamiento por árbol -label.mark_unlinked_leaves = Marcar las hojas como no enlazadas -label.associate_leaves_with = Asociar hojas con -label.save_colour_scheme_with_unique_name_added_to_colour_menu = Guarde el esquema cromáticos con un nombre único y se añadirá al menú de colores -label.case_sensitive = Sensible a mayúsculas -label.lower_case_colour = Color para las minúsculas -label.index_by_host = Indizar por host -label.index_by_type = Indizar por tipo -label.enable_jabaws_services = Habilitar servicios JABAWS -label.display_warnings = Mostrar advertencias -label.move_url_up = Mover la URL hacia arriba -label.move_url_down = Mover la URL hacia abajo -label.add_sbrs_definition = Añadir una definición SBRS -label.edit_sbrs_definition = Editar una definición SBRS -label.delete_sbrs_definition = Borrar una definición SBRS -label.your_sequences_have_been_verified = Sus secuencias has sido verificadas en una base de datos de secuencias conocidas. Algunos de sus ID se han alterado y\n, probablemente, el residuo de inicio/fin se haya actualizado.\nGuarde su alineamiento para mantener el ID actualizado.\n\n -label.sequence_names_updated = Nombres de secuencia actualizados -label.dbref_search_completed = Búsqueda de DBRef terminada -label.show_all_chains = Mostrar todas las cadenas -label.fetch_all_param = Recuperar todas {0} -label.paste_new_window = Pegar en una nueva ventana -label.settings_for_param = Configuración para {0} -label.view_params = Visualizar {0} -label.select_all_views = Seleccionar todas las vistas -label.align_sequences_to_existing_alignment = Alinear las secuencias con el alineamiento existente -label.realign_with_params = Realinear con {0} -label.calcname_with_default_settings = {0} por defecto -label.action_with_default_settings = {0} con la configuración por defecto -label.edit_settings_and_run = Editar la configuración y ejecutar... -label.view_and_change_parameters_before_alignment = Ver y cambiar los parámetros antes del alineamiento -label.run_with_preset_params = Ejecutar {0} con preconfiguración -label.view_and_change_parameters_before_running_calculation = Ver y cambiar los parámetros antes de lanzar el cálculo -label.view_documentation = Ver documentación -label.select_return_type = Seleccionar el tipo de retorno -label.translation_of_params = Traducción de {0} -label.features_for_params = Características de - {0} -label.annotations_for_params = Anotaciones de - {0} -label.generating_features_for_params = Generando características de - {0} -label.generating_annotations_for_params = Generando anotaciones de - {0} -label.varna_params = VARNA - {0} -label.sequence_feature_settings = Configuración de las características de la secuencia -label.pairwise_aligned_sequences = Secuencias alineadas a pares -label.original_data_for_params = Datos originales de {0} -label.points_for_params = Puntos de {0} -label.transformed_points_for_params = Puntos transformados de {0} -label.graduated_color_for_params = Color graduado para la característica de {0} -label.select_backgroud_colour = Seleccionar color de fondo -label.invalid_font = Fuente no válida -label.separate_multiple_accession_ids = Separar los accession id con un punto y coma ";" -label.replace_commas_semicolons = Cambiar comas por puntos y comas -label.parsing_failed_syntax_errors_shown_below_param = Parseo erróneo. A continuación, se muestras los errores de sintaxis {0} -label.parsing_failed_unrecoverable_exception_thrown_param = \nParseo err\u00F3neo. Se ha lanzado una excepci\u00F3n fatal\:\n {0} -label.example_query_param = Consulta de ejemplo: {0} -label.enter_value_increase_conservation_visibility = Introduzca un valor para incrementar la visibilidad de la conservación -label.enter_percentage_identity_above_which_colour_residues = Introduza un % de identidad por encima del cual se colorearán los residuos -label.wswublast_client_credits = Para mostrar las caracter\u00EDsticas de una secuencia, debe indicarse un id de Uniprot cuya secuencia se corresponda al 100 % con la introducida.\nPara mostrar estas caracter\u00EDsticas, prueba a cambar los nombre de sus secuencia con los ID que se sugieren a continuaci\u00F3n.\n\nRunning WSWUBlast at EBI.\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R.\nSOAP-based services provided by the European Bioinformatics Institute.\nNucleic Acids Res. 33(1)\:W25-W28 (2005)); -label.blasting_for_unidentified_sequence = Ejecutar BLAST para la secuencias sin identificar -label.select_columns_containing = Seleccione las columnas que contengan -label.select_columns_not_containing = Seleccione las columnas que no contengan -option.trim_retrieved_seqs = Ajustar las secuencias recuperadas -label.trim_retrieved_sequences = Cuando la secuencia de referencia es más larga que la secuencia con la que está trabajando, sólo se mantienen las subsecuencias relevantes. -label.use_sequence_id_1 = Utilice $SEQUENCE_ID$ o $SEQUENCE_ID=//=$ -label.use_sequence_id_2 = \nto para embeber el id de la secuencia en una URL -label.ws_parameters_for = Parámetros para {0} -label.switch_server = Cambiar servidor -label.open_jabaws_web_page = Abra el página principal del servidor JABAWS en un navegador web -label.choose_jabaws_server = Escoja un servidor para ejecutar este servicio -label.services_at = Servicios en {0} -label.rest_client_submit = {0} utilizando {1} -label.fetch_retrieve_from =Recuperar de {0} -label.fetch_retrieve_from_all_sources = Recuperar de todas las fuentes {0} en {1}
    La primera es :{2} -label.feature_settings_click_drag = Haga clic o arrastre los tipos de las características hacia arriba o hacia abajo para cambiar el orden de visualización.
    Haga doble clic para seleccionar las columnas que contienen las características del alineamiento/selección actual.
    -label.opt_and_params_further_details = ver los detalles adicionales haciendo clic en el botón derecho -label.opt_and_params_show_brief_desc_image_link = Haga clic para ver una descripción breve
    Haga clic en el botón derecho para obtener información adicional. -label.opt_and_params_show_brief_desc = Haga clic para ver una descripción breve
    -label.adjusts_width_generated_eps_png = Ajusta la anchura del fichero EPS o PNG generado para asegurar incluso que el ID de la secuencia más larga o las etiquetas de anotación se muestran -label.manually_specify_width_left_column = Especificar manualmente la anchura de la columna izquierda en las etiquetas de los ID de la secuencia y las anotaciones se mostrar en las figuras del alineamiento exportado.Esta configuraicón se ignorará si está marcada la opción 'Establecer automáticamente al anchura del ID' -label.job_created_when_checked = Cuando está habilitado, se crea un trabajo para cada secuencia de la selección actual -label.when_checked_job_visible_region_and_results = Cuando está habilitado, se crea un único trabajo para la región visible y los resultados de mapean en su ubicación dentro del alineamiento. En caso contrario, se creará un trabajo para cada región visible y contigua en el alineamiento o selección actual (p.e. un alineamiento múlitple). -label.flat_file_representation = La representación del fichero plano de este servicio utilizando el formalismo Really Simple Bioinformatics Service -label.result_of_parsing_rsbs = Resultados de parsear la representación RSBS -label.user_preset = Preselección de usuario -label.service_preset = Preselección del servicio -label.run_with_preset = Ejecutar {0} con preselección -label.view_service_doc_url = Visualizar {1} -label.submit_sequence = Enviar {0} {1} {2} {3} a
    {4} -action.by_title_param = por {0} -label.alignment = Alineamiento -label.secondary_structure_prediction = Predicción de la estructura secundaria -label.sequence_database_search = Búsqueda en base de datos de secuencias -label.analysis = Análisis -label.protein_disorder = Desorden en la proteína -label.source_from_db_source = Fuentes de {0} -label.from_msname = de {0} -label.superpose_with = Superponer con... -action.do = Hacer -label.scale_label_to_column = Ajustar la etiqueta a la columna -label.add_new_row = Añadir nuevo fila -label.edit_label_description = Editar etiqueta/descripción -label.hide_row = Ocultar esta fila -label.delete_row = Borrar esta fila -label.show_all_hidden_rows = Mostrar todas las filas ocultas -label.export_annotation = Exportar anotación -label.copy_consensus_sequence = Copiar secuencia de consenso -label.helix = Hélice -label.sheet = Hoja -label.rna_helix = Hélice de ARN -label.remove_annotation = Borrar anotación -label.colour_by = Colorear por... -label.muscle_multiple_protein_sequence_alignment = Alineamiento múltiple de secuencias de proteínas con Muscle -label.mafft_multiple_sequence_alignment = Alineamiento múltiple de secuencias con MAFFT -label.clustalw_multiple_sequence_alignment = Alineamiento múltiple de secuencias con ClustalW -label.jnet_secondary_structure_prediction = Predicción de la estructura secundaria con JNet -label.multiharmony = Multi-Harmony -label.unable_start_web_service_analysis = No es posible iniciar el servicio web de análisis -label.job_couldnt_be_started_check_input = El trabajo no puede arrancarse. Por favor, compruebe los parámetros de entrada y los mensajes de advertencia de la consola de Jalview. -label.prompt_each_time = Preguntar siempre -label.use_source = Fuente -label.couldnt_save_project = No es posible guardar el proyecto -label.error_whilst_saving_current_state_to = Error mientras se guardaba el estado a {0} -label.error_whilst_loading_project_from = Error cargando el proyecto desde {0} -label.couldnt_load_project = No es posible cargar el proyecto -label.pca_sequences_not_aligned = Las secuencias deben estar alineadas antes de calcular el PCA.\nPruebe a utilizar la funci\u00F3n de rellenar huecos en el men\u00FA Editar,\no cualquiera de los servicios web de alineamiento m\u00FAltiple. -label.invalid_name_preset_exists = Nombre no válido - esta preconfiguración ya existe. -label.invalid_name = Nombre no válido -label.set_proxy_settings = Por favor, configure su proxy en la pestaña 'Conexiones' de la ventana de Preferencia -label.proxy_authorization_failed = Autorización del proxy fallida -label.internal_jalview_error = Error interno de Jalview -label.secondary_structure_prediction_service_couldnt_be_located = No se ha podido encontrar el Servicio de Predicciónd de la Estructura Secudaria {0} en {1}. -label.service_called_is_not_msa_service = El Servicio llamado \n{0}\nno es un \nServicio de Alineamiento M\u00FAltiple de Secuencias\! -label.msa_service_is_unknown = El Servicio de Alineamiento Múltiple llamado {0} es desconocido -label.service_called_is_not_seq_search_service = El Servicio llamando \n{0}\nno es un \nServicio de B\u00FAsqueda de Secuencias\! -label.seq_search_service_is_unknown = El Servicio de Búsqueda de Sencuencias llamado {0} es desconocido -label.feature_type = Tipo de característisca -label.display = Representación -label.service_url = URL del servicio -label.copied_sequences = Secuencias copiadas -label.cut_sequences = Cortar secuencias -label.conservation_colour_increment = Incremento de Conservación del Color ({0}) -label.percentage_identity_thereshold = Umbral del Porcentaje de Identidad ({0}) -label.error_unsupported_owwner_user_colour_scheme = Propietario no soportado para el diálogo del Esquema Cromático del Usuario -label.save_alignment_to_file = Guardar Alineamiento en fichero -label.save_features_to_file = Guardar Características en un fichero -label.save_annotation_to_file = Guardar Anotación en un fichero -label.no_features_on_alignment = No se han encontrado características en el alineamiento -label.save_pdb_file = Guardar fichero PDB -label.save_text_to_file = Guardar Texto en un fichero -label.save_state = Guardar estado -label.restore_state = Restaurar estado -label.saving_jalview_project = Guardando el proyecto de Jalview {0} -label.loading_jalview_project = Cargando el proyecto de Jalview {0} -label.save_vamsas_document_archive = Guardar el archivo de documento Vamsas -label.saving_vamsas_doc = Guardando el documento VAMSAS en {0} -label.load_feature_colours = Cargar colores de características -label.save_feature_colours = Guardar esquema cromático de características -label.dataset_for = {0} conjunto de datos para {1} -label.select_startup_file = Seleccionar fichero de arranque -label.select_default_browser = Seleccionar navegador web por defecto -label.save_tree_as_newick = Guardar árbol como fichero newick -label.create_eps_from_tree = Crear un fichero EPS a partir de un árbol -label.create_png_from_tree = Crear una imagen PNG a partir de un árbol -label.save_colour_scheme = Guardar esquema cromático -label.edit_params_for = Editar los parámetros de {0} -label.choose_filename_for_param_file = Escoja un nombre de fichero para este fichero de parámetros -label.save_as_html = Guardar como HTML -label.recently_opened = Abiertos recientemente -label.blasting_for_unidentified_sequence_jobs_running = Ejecutando BLAST de las secuencias no indentificadas - {0} trabajos en marcha. -label.tree_from = Árbol de {0} -label.webservice_job_title = {0} usando {1} -label.select_visible_region_of = seleccionada {0} región de {1} -label.visible = Visible -label.select_unselect_visible_regions_from = seleccionada y deseleccionadas {0} regiones de {1} -label.visible_region_of = región visible de -label.webservice_job_title_on = {0} usando {1} de {2} -label.updating_vamsas_session = Actualizando sesión VAMSAS -label.loading_file = Cargando fichero: {0} -label.edit_params = Editar {0} -error.not_implemented = No implementado -error.no_such_method_as_clone1_for = No existe ese método como un clone1 de {0} -error.null_from_clone1 = Nulo de clone1! -error.implementation_error_sortbyfeature = Error de implementación - sortByFeature debe ser uno de FEATURE_SCORE, FEATURE_LABEL o FEATURE_DENSITY. -error.not_yet_implemented = No se ha implementado todavía -error.unknown_type_dna_or_pep = Tipo desconocido {0} - dna o pep son los únicos valores permitidos -error.implementation_error_dont_know_thereshold_annotationcolourgradient = Error de implementación: no se conoce el valor umbral para el AnnotationColourGradient actual. -error.implementation_error_embeddedpopup_not_null = Error de implementación - embeddedPopup debe ser no nulo. -error.invalid_colour_for_mycheckbox = Color no válido para MyCheckBox -error.implementation_error_unrecognised_render_object_for_features_type = Error de implementación: no se reconoce el objeto de representación {0} para las características de tipo {1} -error.implementation_error_unsupported_feature_colour_object = Error de implementación: objeto de color de características no soportado. -error.invalid_separator_parameter = Separador de parámetros no válido - debe tener longitud mayor que cero -error.alignment_cigararray_not_implemented = Alignment(CigarArray) no se ha implementado todavía -error.weak_sequencei_equivalence_not_yet_implemented = Equivalencia débil sequenceI no se ha implementado todavía. -error.implementation_error_can_only_make_alignmnet_from_cigararray = Error de implementación - sólo se puede construir un vista de alineamiento a partir de una CigarArray de secuencias. -error.empty_view_cannot_be_updated = una vista vacía no se puede actualizar. -error.mismatch_between_number_of_sequences_in_block = No hay coincidencia entre el número de secuencias en el bloque {0} ({1}) y la vista original ({2}) -error.padding_not_yet_implemented = El relleno no se ha implementado todavía -error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = No hay coincidencia entre los bloques visibles para actualizar y el número de contigs en la vista (contigs=0,blocks={0}) -error.unknown_seq_cigar_operation = Operación SeqCigar {0} desconocida -error.implementation_bug_parse_cigar_string = Bug de implementación en parseCigarString -error.implementation_error_invalid_operation_string = Error de implementación. Cadena de operación no válida. -error.invalid_range_string = Rango de la cadena no válido (debe ser cero o un número positivo) -error.implementation_error_delete_range_out_of_bounds = Error de implementación: deleteRange fuera de rango: el comienzo debe ser cero o positivo y menor que el final. -error.implementation_error = Error de implementación -error.implementation_error_unknown_operation = ¡Error de implementación! Operación desconocida {0} -error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Error de implementación - valor nulo no esperado en getSequenceAndDeletions -error.implementation_error_set_seq_null = Error de implementación - _setSeq(null,...) -error.implementation_error_s = Error de implementación: _s= {0} -error.implementation_error_seqcigar_possible = SeqCigar: posible error de implementación: la secuencia es más larga de el conjunto de datos de la secuencia -error.implmentation_bug_seq_null = Bug de implementación. Seq nula -error.implementation_bug_cigar_operation_list_range_list = Bug de implementación: Cigar Operation list!= range list -error.not_yet_implemented_cigar_object_from_cigar_string = No implementado todavía: construcción de un objeto Cigar desde una cadena y una secuencia con huecos. -error.implementation_bug_cigar_operation = Bug de implementación. La operación Cigar {0} {1} no es ni {2}, ni {3} ni {4}. -error.implementation_error_for_new_cigar = Error de implementación en new Cigar(SequenceI) -error.implementation_error_cigar_seq_no_operations = Error de implementación: la {0}a secuencia Cigar no tiene operaciones. -error.implementation_error_jmol_getting_data = Error de implementación - Jmol parece estar todavía intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016 -error.implementation_error_no_pdbentry_from_index = Error de implementación - no existe la correspondiente entrada pdb (para el índice {0}) para añadir el mapeo de secuencias a -error.jmol_version_not_compatible_with_jalview_version = La versión {0} de Jmol no es compatible con esta versión de Jalview. Informe de este problema en http://issues.jalview.org -error.not_implemented_remove = Borrar: no implementado -error.not_implemented_clone = Clonar: no implementado -error.implementation_error_chimera_getting_data = Error de implementación - Chimera parece estar todavía intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016 -error.call_setprogressbar_before_registering_handler = llamada a setProgressBar antes de registrar el manejador de la barra de estado -label.cancelled_params = {0} cancelado -error.implementation_error_cannot_show_view_alignment_frame = Error de implementación: no es posible mostrar una vista de otro alineamiento en un AlignFrame. -error.implementation_error_dont_know_about_thereshold_setting = Error de implementación: no se conoce la configuración del umbral para el AnnotationColourGradient actual. -error.eps_generation_not_implemented = La generación de EPS no se ha implementado todavía -error.png_generation_not_implemented = La generación de PNG no se ha implementado todavía -error.try_join_vamsas_session_another = Tratando de establecer una sesión VAMSAS cuando ya había otra conectada -error.invalid_vamsas_session_id = Identificador de sesión VAMSAS no válido -error.implementation_error_cannot_create_groovyshell = Error de implementación:no se puede crear groovyShell sin Groovy en el classpath -label.groovy_support_failed = El soporte Groovy de Jalview ha fallado -label.couldnt_create_groovy_shell = No es posible crear el shell de Groovy. Compruebe el fichero de log para conocer los detalles. -error.unsupported_version_calcIdparam = Versión no soportada de {0} -error.implementation_error_cant_reorder_tree = Error de implementación: no es posible reordenar este árbol. No DefaultMutableTreeNode. -error.invalid_value_for_option = Valor no válido de {0} para la opción {1} -error.implementation_error_cannot_import_vamsas_doc = Error de implementación - todavía no es posible importar el documento VAMSAS existente en una sesión existente. -label.vamsas_doc_couldnt_be_opened_as_new_session = El documento VAMSAS no ha podido abrirse como una nueva sesión. Por favor, escoja otra. -error.implementation_error_vamsas_operation_not_init = ¡Error de implementación! Operaciones VAMSAS cuando el cliente no estaba inicializado ni conectado -error.jalview_no_connected_vamsas_session = Jalview está conectado a una sesión VAMSAS -error.implementation_error_cannot_recover_vamsas_object_mappings = Error de implementación: no es posible recuperar los mapeos del objeto VAMSAS - no se ha hecho ningún backup -error.setstatus_called_non_existent_job_pane = se lllamado a setStatus para el panel de trabajo {0} no existente -error.implementation_error_cannot_find_marshaller_for_param_set =Error de implementación: no puede encontrar un marshaller para el conjunto de parámetros -error.implementation_error_old_jalview_object_not_bound =Error de implementación: ¡el objeto Jalview antiguo no está enlazado! ({0}) -error.implementation_error_vamsas_doc_class_should_bind_to_type = Error de implementación: la clase de documento VAMSAS {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2}) -error.implementation_error_jalview_class_should_bind_to_type = Error de implementación: la clase Jalview {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2}) -error.invalid_vamsas_rangetype_cannot_resolve_lists = RangeType VAMSAS no válido - ¡no es posible resolver ambas listas de Pos y Seg con los valores elegidos! -error.implementation_error_maplist_is_null = Error de implementación. MapList es nulo en initMapType. -error.implementation_error_cannot_have_null_alignment = Error de implementación: no es posible tener una clave nula en el alineamiento -error.implementation_error_null_fileparse = Error de implementación. FileParse nulo en el construictor de copia -error.implementation_error_cannot_map_alignment_sequences = Error de implementación: no es posible maper un alineamiento de secuencias desde distintos conjuntos de datos en un único alineamiento en el documento VAMSAS. -error.implementation_error_cannot_duplicate_colour_scheme = Error grave de implementación: no es posible duplicar el esquema cromático {0} -error.implementation_error_structure_selection_manager_null = Error de implementación. El contexto structure selection manager's es nulo -exception.ssm_context_is_null = El contexto SSM es nulo -error.idstring_seqstrings_only_one_per_sequence = idstrings y seqstrings contienen una cadena por cada secuencia -error.cannot_have_mixed_length_replacement_vectors = No es posible tener vectores de reemplazo de distinta longitud. El vector de reemplazo para {0} es de {1} cadenas de largo, pero se ha considerado ya como un vector de longitud {2}. -error.cannot_have_zero_length_vector_replacement_strings = No es posible tener un vector de cadenas de reemplazo de longitud cero - debe ser uno o n. -error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = ¡Error de implementación! Todavía no se soportan varios trabajos de predicción asociados a una única secuencia. -error.implementation_error_invalid_msa_index_for_job = ¡Error de implementación! Valor msaIndex no válido para JPredJob en el objeto de entrada MSA padre! -error.implementation_error_startjob_called = Error de implementación - StartJob(JpredJob) invocado en {0} -error.multiple_jnet_subjob_merge_not_implemented = Todavía no se han implementado varios subtrabajos JNet conjuntos. -label.job_never_ran = El trabajo nunca se ejecutó - entrada devuelta al usuario. -error.implementation_error_minlen_must_be_greater_zero = Error de implementación: minlen debe ser cero o más -error.implementation_error_msawbjob_called = Error de implementación - StartJob(MsaWSJob) invocado en un WSJobInstance {0} -error.implementation_error_cannot_attach_ws_menu_entry = Error de implementación: ¡no es posible adjunto una WS Menu Entry sin una referencia a un manejador del servicio! -error.parameter_migration_not_implemented_yet = La migración de parámetros no se ha implementado todavía -error.implementation_error_cannot_set_jaba_option = Error de implementación: no es posible establecer el valor de Jaba Option a un valor fuera de su rango permitido -error.implementation_error_valuetype_doesnt_support_jabaws_type = Error de implementación: jalview.ws.params.ValueConstrainI.ValueType no soporta el tipo JABAWS: {0} -error.cannot_create_jabaws_param_set = No es posible crear un JabaWSParamSet con parámetros no JabaWS -error.cannot_set_arguments_to_jabaws_param_set = No es posible establecer argumentos en JabaWSParamSet que no sean argumentos JabaWS -error.implementation_error_runner_config_not_available = Error de implementación: Runner Config no está disponible para un servicio JABAWS de tipo {0} ({1}) -error.implementation_error_cannot_handle_jaba_param = Error de implementación: no es posible manejar el objeto del parámetro Jaba {0} -error.implementation_error_attempt_to_delete_service_preset = Error de implementación: intento de borrar un servicio preestablecido -error.implementation_error_cannot_locate_oldname_presetname = Error de implementación: no es posible localizar ni el nombre antiguo ({0}) ni el presetName ({1} en el almacén de datos. -error.implementation_error_jabaws_param_set_only_handled_by = Error de implementación: JabaWsParamSets sólo puede ser manejado por JabaParamStore -error.cannot_set_source_file_for = No es posible establecer el fichero fuente para {0} -error.mismatch_service_instance_preset = Posible desajuste entre la instancia del servicio y la prestablecida -error.cannot_set_params_for_ws_preset = No es posible establecer los parámetros para el servicio web JABA presestablecido -error.implementation_error_can_only_instantiate_jaba_param_sets = Error de implementación: sólo se puede instanciar conjuntos de parámetros Jaba -error.no_aacon_service_found = No se ha encontrado ningún servicio AACon -error.implementation_error_couldnt_copy_value_constraint = Error de implementación: ¡no se puede copiar ValueConstrain! -error.couldnt_encode_as_utf8 = No se ha podido codificar {0} como UTF-8. -error.tree_inputtype_not_yet_implemented = No se ha implementado todavía el árbol como InputType -error.implementation_error_need_to_have_httpresponse = Error de implementación: se necesita tener un HttpResponse que procesar -error.dbrefsource_implementation_exception = Excepción de implementación DBRefSource -error.implementation_error_dbinstance_must_implement_interface = Error de Implementación- getDbInstances debe recibir una clase que implemente jalview.ws.seqfetcher.DbSourceProxy (recibió {0}) -error.implementation_error_must_init_dbsources =Error de implementación. Debe inicializar dbSources -label.view_controller_toggled_marked = {0} {1} columnas {2} conteniendo características del tipo {3} en {4} secuencia(s) -label.toggled = Invertida -label.marked = Marcada -label.not = no -label.no_feature_of_type_found = No se han encontrado características del tipo {0}. -label.submission_params = Envío {0} -label.empty_alignment_job = Trabajo de alineamiento vacío -label.add_new_sbrs_service = Añadir un nuevo SBRS -label.edit_sbrs_entry = Editar entrada SBRS -label.pca_recalculating = Recalculando PCA -label.pca_calculating = Calculando PCA -label.select_foreground_colour = Escoger color del primer plano -label.select_colour_for_text = Seleccione el color del texto -label.adjunst_foreground_text_colour_thereshold = Ajustar el umbral del color del texto en primer plano -label.select_subtree_colour = Seleccioanr el color del sub-árbol -label.create_new_sequence_features = Crear nueva(s) característica(s) de secuencia -label.amend_delete_features = Arrelgar/Borrar características de {0} -exception.out_of_bounds_for_file = Fuera de rango para el fichero: i={0}, Buffer final: i0={1} iend={2} -exception.null_string_given_to_regex_search = Cadena nula enviada a Regex.search -exception.null_string_like_given_to_regex_search = StringLike nula enviada a Regex.search -exception.null_string_given_to_regex_reverse_search = Cadena nula enviada a Regex.reverseSearch -exception.null_string_like_given_to_regex_reverse_search = StringLike nula enviada a Regex.reverseSearch -exception.null_string_like_given_to_regex_search_from = Cadena nula enviada a Regex.searchFrom -exception.null_string_like_given_to_regex_search_region = Cadena nula enviada a Regex.searchRegion -exception.replace_null_regex_pointer = Reemplazador tiene un puntero Regex nulo -exception.bad_pattern_to_regex_perl_code = patrón erróneo en Regex.perlCode: {0} -exception.no_stub_implementation_for_interface = No existe una implementación del stub para la interfaz: {0} -exception.cannot_set_endpoint_address_unknown_port = No es posible estabelcer la dirección de punto final para el puerto desconocido {0} -exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Consultando la coincidencia de apertura de paréntesis para paréntesis sin cerrar (?) -exception.mismatched_unseen_closing_char = Discordancia (no vista) en el carácter de cierre {0} -exception.mismatched_closing_char = Carácter de cierre discordante {0} -exception.mismatched_opening_char = Carácter de apertura discordante {0} en {1} -exception.invalid_datasource_couldnt_obtain_reader = Fuente de datos no válida. No es posible obtener el Reader -exception.index_value_not_in_range = {0}: el valor del índice {1} en se encuentra en el rango [0..{2}] -exception.unterminated_cigar_string = Cadena cigar sin terminar -exception.unexpected_operation_cigar_string_pos = Operación no esperada {0} en una cadena cigar (posición {1} en {2}) -exception.couldnt_parse_responde_from_annotated3d_server = No es posible parsear la respuesta procedente del servidor Annotate3d -exception.application_test_npe = Prueba de aplicación: lanzando un NullPointerException que debe aparecer en la consola -exception.overwriting_vamsas_id_binding = Sobreescribiendo la asociación al VAMSAS id -exception.overwriting_jalview_id_binding = Sobreescribiendo la asociación al Jalview id -error.implementation_error_unknown_file_format_string = Error de implementación: cadena de formato de fichero desconocido -exception.failed_to_resolve_gzip_stream = Fallo al resolver el flujo GZIP -exception.problem_opening_file_also_tried = Problema abriendo {0} (también se intentó {1}) : {2} -exception.problem_opening_file = Problema abriendo {0} : {1} -exception.failed_to_read_data_from_source = Error al leer datos de la fuente: {0} -exception.no_init_source_stream = Flujo de fuente sin inicializar -exception.invalid_source_stream = Flujo de fuente no válida: {0} -error.implementation_error_reset_called_for_invalid_source = Error de implementación: se ha invocado un Reset en una fuente no válida. -exception.number_of_residues_in_query_sequence_differ_from_prediction = El n\u00FAmero de residuos en la supuesta secuencia consultada {0} ({1}\n{2})\ndifiere del n\u00FAmero de sitios de predicci\u00F3n en la predicci\u00F3n ({3}) -label.mapped = mapeado -exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: La entrada ({0}) tiene un número inesperado de columnas -exception.couldnt_parse_concise_annotation_for_prediction = No es posible parsear la anotaci\u00F3n concisa para el perfil de predicci\u00F3n.\n{0} -exception.newfile = Fichero Newick\: {0}\n -label.no_tree_read_in = No hay lectura de árbol en -exception.rnaml_couldnt_access_datasource = No ha sido posible acceder la fuente de datos ({0}) -exception.ranml_couldnt_process_data = No ha sido posible procesar los datos como un fichero RNAML ({0}) -exception.ranml_invalid_file = Fichero RNAML no válido ({0}) -exception.ranml_problem_parsing_data = Problema parseando los datos como RNAML ({0}) -exception.pfam_no_sequences_found = No se han encontrado secuencias (entrada PFAM) -exception.stockholm_invalid_format = Este fichero no es tiene un formato STOCKHOLM válido: la primera línea no contiene '# STOCKHOLM' -exception.couldnt_parse_sequence_line = No es posible parse la línea de secuencia: {0} -exception.error_parsing_line = Error parseando {0} -exception.unknown_annotation_detected = Anotación desconocida detectada: {0} {1} -exception.couldnt_store_sequence_mappings = No es posible almacenar los mapeos de secuencia para {0} -exception.matrix_too_many_iteration = Demasiadas iteraciones en {0} (el máximo es {1}) -exception.browser_not_found = Excepción al buscar el navegador: {0} -exception.browser_unable_to_locate = Imposible encontrar el navegador: {0} -exception.invocation_target_exception_creating_aedesc = InvocationTargetException mientras se creaba AEDesc: {0} -exception.illegal_access_building_apple_evt= IllegalAccessException mientras se construía AppleEvent: {0} -exception.instantiation_creating_aedesc = InstantiationException mientras se creaba AEDesc: {0} -exception.unable_to_launch_url = Imposible lanzar la URL: {0} -exception.unable_to_create_internet_config = Imposible crear una instancia de configuración de Internet: {0} -exception.invocation_target_calling_url = InvocationTargetException mientras se invocaba openURL: {0} -exception.illegal_access_calling_url = IllegalAccessException mientras se invocaba openURL: {0} -exception.interrupted_launching_browser = InterruptedException mientras se lanzaba el navegador: {0} -exception.das_source_doesnt_support_sequence_command = La fuente {0} no soporta el comando sequence. -exception.invalid_das_source = Fuente DAS no válida: {0} -exception.ebiembl_retrieval_failed_on = La recuperación de datos EBI EMBL XML ha fallado en {0}:{1} -label.no_embl_record_found = # No se ha recuperado ningún registro EMBL de {0}:{1} -label.embl_successfully_parsed = # Se han parseado con éxito las consultas {0} en un alineamiento -exception.no_pdb_records_for_chain = No se han encontrado registros {0} para la cadena {1} -exception.unexpected_handling_rnaml_translation_for_pdb = Excepcion inesperada cuando se traducían a RNAML los datos PDB -exception.couldnt_recover_sequence_properties_for_alignment = No es posible recuperar las propiedades de la secuencia para el alineamiento -exception.unknown_format_for_file = Formato desconocido {0} para el fichero \: \n{1} -label.remove_gaps = Eliminar huecos -exception.couldnt_recover_sequence_props_for_jnet_query = No ha sido posible recuperar las propiedades de la secuencia para la secuencia JNet Query! -exception.server_timeout_try_later = Tiempo de conexi\u00F3n ha expirado - int\u00E9ntelo de nuevo m\u00E1s tarde\n -exception.web_service_returned_null_try_later= El servidor {0} ha devuelto un objeto nulo, por lo que probablemente no se haya podido contactar con él. Inténtelo de nuevo más tarde. -exception.cannot_contact_service_endpoint_at = No es posible contactar por el punto de acceso al servicio en {0} -error.implementation_error_cannot_find_service_url_in_given_set = Error de implementación: no es posible encontrar la URL del servicio en el conjunto de URL proporcionado -error.implementation_error_cannot_find_service_url_in_given_set_param_store = Error de implementación: la URL del servicio en el conjunto de URL para este almacén de parámetros del servicio({0}) -exception.jobsubmission_invalid_params_set = Conjunto de parámetros no válido. Comprueba la implementación de Jalview -exception.notvaliddata_group_contains_less_than_min_seqs = El grupo contiene menos de {0} secuencias. -exception.outofmemory_loading_pdb_file = Sin menoria al cargar el fichero PDB -exception.eps_coudnt_write_output_file = No es posible escribir el fichero de salida: {0} -exception.eps_method_not_supported = Método actualmente no suportado por la versión {0} de EpsGraphics2D -exception.eps_unable_to_get_inverse_matrix = Imposible obtener la inversa de la matrix: {0} -warn.job_cannot_be_cancelled_close_window = Este trabajo no se puede cancelar.\nSimplemente, cierre la ventana. -warn.service_not_supported = ¡Servicio no soportado! -warn.input_is_too_big = ¡El tamaño de la entrada es demasiado grande! -warn.invalid_job_param_set = ¡Conjunto de parámetros del trabajo no válido! -info.job_couldnt_be_run_server_doesnt_support_program = No es posible ejecutar el trabajo porque el servidor no soporta este programa.\n{0} -info.job_couldnt_be_run_exceeded_hard_limit = No es posible ejecutar el trabajo porque excede los l\u00EDmites del servidor.\n{0} -info.job_couldnt_be_run_incorrect_param_setting = No es posible ejecutar el trabjao porque el servidor no soporta algunos de los par\u00E1metros.\n{0}\nPor favor, aseg\u00FArese de que ha usado los par\u00E1metros adecuados para este servicio\n -info.no_jobs_ran = No se ha ejecutado ningún trabajo -info.failed_to_submit_prediction = Error al enviar la predicci\u00F3n\:\n{0} {1} -info.invalid_jnet_job_result_data ={0}\n{1}\nResultados del trabajo JNet no v\u00E1lidos\!\n{2} -info.failed_to_submit_sequences_for_alignment = Error al enviar la secuencias para el alineamiento.\nLo m\u00E1s probable es que haya un problema en el servidor.\nSimplemente, cierre la ventana\n -info.alignment_object_method_notes = \nNotas sobre los m\u00E9todos del objeto alineamiento\n -info.server_exception = \n{0} Excepci\u00F3n del servidor\!\n{1} -status.processing_commandline_args = Procesando los argumentos de la línea de comandos... -status.das_features_being_retrived = Recuperando características DAS... -status.searching_for_sequences_from = Buscando secuencias en {0} -status.finished_searching_for_sequences_from = Finalizada la búsqueda de secuencias en {0} -label.eps_file = Fichero EPS -label.png_image = Imagen PNG -status.saving_file = Guardando {0} -status.export_complete = Exportación completada. -status.fetching_pdb = Recuperando PDB {0} -status.refreshing_news = Refrescando noticias -status.importing_vamsas_session_from = Importando sesión VAMSAS de {0} -status.opening_params = Abriendo {0} -status.waiting_sequence_database_fetchers_init = Esperando la inicialización de los recuperadores de bases de datos de secuencias -status.init_sequence_database_fetchers = Inicializando recuperadores de bases de datos de secuencias -status.fetching_sequence_queries_from = Recuperando {0} consultas de secuencias de {1} -status.finshed_querying = Consulta finalizada -status.parsing_results = Parseando resultados. -status.processing = Procesando... -status.refreshing_web_service_menus = Refrescando los menús de servicios web -status.collecting_job_results = Recolectando los resultados de los trabajos. -status.fetching_das_sequence_features = Recuperando las características DAS de las secuencias -status.no_das_sources_active = No existe ninguna fuente DAS activa -status.das_feature_fetching_cancelled = Recuperación de características DAS cancelada -status.das_feature_fetching_complete = Recuperación de características DAS completada -status.fetching_db_refs = Recuperando db refs -label.font_doesnt_have_letters_defined = La fuente no tiene letras definidas\npor lo que no puede emplease\ncon datos de alineamientos -label.font_too_small = Tamaño de la letra es demasiado pequeña -label.error_loading_file_params = Error cargando el fichero {0} -label.error_loading_jalview_file = Error cargando el fichero Jalview -warn.out_of_memory_when_action = Sin memoria al {0}\!\!\nConsulte los ficheros de ayuda para ajustar la memoria de la m\u00E1quina virtual de Java. -warn.out_of_memory_loading_file = Sin memoria al cargar el fichero {0}\!\!\nConsulte los ficheros de ayuda para ajustar la memoria de la m\u00E1quina virtual de Java. -label.out_of_memory = Sin memoria -label.invalid_id_column_width = Identificador de anchura de columna no válido -warn.user_defined_width_requirements = La anchura definida por el usuario para la \nlas columnas de anotaci\u00F3n e identificador de secuencias\nen figuras exportadas debe ser\na, al menos, de 12 p\u00EDxels -label.couldnt_create_sequence_fetcher = No es posible crear SequenceFetcher -warn.couldnt_create_sequence_fetcher_client = No es posible crear el cliente de recuperador de secuencias. Comprueba el fichero de log para más detalles. -warn.server_didnt_pass_validation = El servicio no ha pasado la validaci\u00F3n.\nCompruebe la consola de Jalview para m\u00E1s detalles. -warn.url_must_contain = La URL de la secuencia debe contener $SEQUENCE_ID$ o un regex $SEQUENCE_ID=//=$ -info.validate_jabaws_server = \u00BFValidar el servidor JabaWS?\n(Consulte la consola de salida para obtener los resultados) -label.test_server = ¿Probar servidor? -info.you_want_jalview_to_find_uniprot_accessions = \u00BFDesea que Jalview encuentre\nUniprot Accession ids para los nombres de secuencias dados? -label.find_uniprot_accession_ids = Buscar Uniprot Accession Ids -label.new_sequence_fetcher = Añadir recuperador de secuencias -label.additional_sequence_fetcher = Recuperador de secuencia adicional -label.select_database_retrieval_source = Seleccionar fuente de recuperación de bases de datos -label.overwrite_existing_file = ¿Sobreescribir el fichero existente? -label.file_already_exists = El fichero existe -label.edit_jabaws_url = Editar JABAWS URL -label.add_jabaws_url = Añadir nueva JABAWS URL -label.news_from_jalview = Noticias de http://www.jalview.org -label.cut_paste_alignmen_file = Cortar & Pegar fichero de alineamiento -label.enter_redundancy_thereshold = Introducir el umbral de redundancia -label.select_dark_light_set_thereshold = Seleccionar un color oscuro y un color claro para el texto y establecer el umbral en que
    cambiar entre colores, basándose en el color de fondo
    -label.select_feature_colour = Seleccionar color de las características -label.ignore_gaps_consensus = Ignorar huecos en el consenso -label.show_group_histogram = Mostrar histograma de grupo -label.show_group_logo = Mostrar logo de grupo -label.normalise_group_logo = Normalizar el logo de grupo -label.show_histogram = Mostrar histograma -label.show_logo = Mostrar logo -label.normalise_logo = Normalizar logo -label.no_colour_selection_in_scheme = Por favor, seleccione un color antes de aplicar el esquema cromático -label.no_colour_selection_warn = Error guardando el esquema cromático \ No newline at end of file diff --git a/bin/netscape/javascript/JSException.js b/bin/netscape/javascript/JSException.js index 41d9f27..8033210 100644 --- a/bin/netscape/javascript/JSException.js +++ b/bin/netscape/javascript/JSException.js @@ -1,4 +1,4 @@ -Clazz.declarePackage ("netscape.javascript"); -Clazz.load (["java.lang.Exception"], "netscape.javascript.JSException", null, function () { -c$ = Clazz.declareType (netscape.javascript, "JSException", Exception); -}); +Clazz.declarePackage ("netscape.javascript"); +Clazz.load (["java.lang.Exception"], "netscape.javascript.JSException", null, function () { +c$ = Clazz.declareType (netscape.javascript, "JSException", Exception); +}); diff --git a/bin/netscape/javascript/JSObject.js b/bin/netscape/javascript/JSObject.js index 661d426..e43f247 100644 --- a/bin/netscape/javascript/JSObject.js +++ b/bin/netscape/javascript/JSObject.js @@ -1,19 +1,19 @@ -Clazz.declarePackage ("netscape.javascript"); -c$ = Clazz.declareType (netscape.javascript, "JSObject"); -c$.getWindow = Clazz.defineMethod (c$, "getWindow", -function (jvlite) { -{ -return window; -}}, "jalview.bin.JalviewLite"); -Clazz.defineMethod (c$, "call", -function (func, params) { -{ -alert("call " + func); -func.apply(null, params); -}}, "~S,~A"); -Clazz.defineMethod (c$, "eval", -function (string) { -{ -alert("evval " + string); -}return this.eval (string); -}, "~S"); +Clazz.declarePackage ("netscape.javascript"); +c$ = Clazz.declareType (netscape.javascript, "JSObject"); +c$.getWindow = Clazz.defineMethod (c$, "getWindow", +function (jvlite) { +{ +return window; +}}, "jalview.bin.JalviewLite"); +Clazz.defineMethod (c$, "call", +function (func, params) { +{ +alert("call " + func); +func.apply(null, params); +}}, "~S,~A"); +Clazz.defineMethod (c$, "eval", +function (string) { +{ +alert("evval " + string); +}return this.eval (string); +}, "~S"); diff --git a/bin/org/exolab/castor/mapping/Mapping.js b/bin/org/exolab/castor/mapping/Mapping.js index d15a01d..b4a3c0f 100644 --- a/bin/org/exolab/castor/mapping/Mapping.js +++ b/bin/org/exolab/castor/mapping/Mapping.js @@ -1,8 +1,8 @@ -Clazz.declarePackage ("org.exolab.castor.mapping"); -c$ = Clazz.declareType (org.exolab.castor.mapping, "Mapping"); -Clazz.makeConstructor (c$, -function (classLoader) { -}, "ClassLoader"); -Clazz.defineMethod (c$, "loadMapping", -function (url) { -}, "java.net.URL"); +Clazz.declarePackage ("org.exolab.castor.mapping"); +c$ = Clazz.declareType (org.exolab.castor.mapping, "Mapping"); +Clazz.makeConstructor (c$, +function (classLoader) { +}, "ClassLoader"); +Clazz.defineMethod (c$, "loadMapping", +function (url) { +}, "java.net.URL"); diff --git a/bin/org/exolab/castor/xml/Unmarshaller.js b/bin/org/exolab/castor/xml/Unmarshaller.js index 09f0175..70aff82 100644 --- a/bin/org/exolab/castor/xml/Unmarshaller.js +++ b/bin/org/exolab/castor/xml/Unmarshaller.js @@ -1,24 +1,24 @@ -Clazz.declarePackage ("org.exolab.castor.xml"); -c$ = Clazz.declareType (org.exolab.castor.xml, "Unmarshaller"); -Clazz.makeConstructor (c$, -function (record) { -}, "~O"); -Clazz.defineMethod (c$, "setIgnoreExtraElements", -function (b) { -}, "~B"); -Clazz.defineMethod (c$, "setIgnoreExtraAttributes", -function (b) { -}, "~B"); -Clazz.defineMethod (c$, "setMapping", -function (map) { -}, "org.exolab.castor.mapping.Mapping"); -Clazz.defineMethod (c$, "setLogWriter", -function (printWriter) { -}, "java.io.PrintWriter"); -Clazz.defineMethod (c$, "unmarshal", -function (file) { -return null; -}, "java.io.Reader"); -Clazz.defineMethod (c$, "setDebug", -function (debugEnabled) { -}, "~B"); +Clazz.declarePackage ("org.exolab.castor.xml"); +c$ = Clazz.declareType (org.exolab.castor.xml, "Unmarshaller"); +Clazz.makeConstructor (c$, +function (record) { +}, "~O"); +Clazz.defineMethod (c$, "setIgnoreExtraElements", +function (b) { +}, "~B"); +Clazz.defineMethod (c$, "setIgnoreExtraAttributes", +function (b) { +}, "~B"); +Clazz.defineMethod (c$, "setMapping", +function (map) { +}, "org.exolab.castor.mapping.Mapping"); +Clazz.defineMethod (c$, "setLogWriter", +function (printWriter) { +}, "java.io.PrintWriter"); +Clazz.defineMethod (c$, "unmarshal", +function (file) { +return null; +}, "java.io.Reader"); +Clazz.defineMethod (c$, "setDebug", +function (debugEnabled) { +}, "~B"); diff --git a/bin/org/jmol/viewer/Viewer.js b/bin/org/jmol/viewer/Viewer.js index 42c1406..078e834 100644 --- a/bin/org/jmol/viewer/Viewer.js +++ b/bin/org/jmol/viewer/Viewer.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("org.jmol.viewer"); -c$ = Clazz.declareType (org.jmol.viewer, "Viewer"); +Clazz.declarePackage ("org.jmol.viewer"); +c$ = Clazz.declareType (org.jmol.viewer, "Viewer"); diff --git a/bin/swingjs/JSEvent.js b/bin/swingjs/JSEvent.js deleted file mode 100644 index 35812e3..0000000 --- a/bin/swingjs/JSEvent.js +++ /dev/null @@ -1,4 +0,0 @@ -Clazz.declarePackage ("swingjs"); -Clazz.load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () { -c$ = Clazz.declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent); -}); diff --git a/bin/swingjs/JSThread.js b/bin/swingjs/JSThread.js index 5c12398..92f41fb 100644 --- a/bin/swingjs/JSThread.js +++ b/bin/swingjs/JSThread.js @@ -1,49 +1,49 @@ -Clazz.declarePackage ("swingjs"); -Clazz.load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.isJS = false; -Clazz.instantialize (this, arguments); -}, swingjs, "JSThread", Thread, swingjs.api.JSFunction); -Clazz.makeConstructor (c$, -function (group, name) { -Clazz.superConstructor (this, swingjs.JSThread, [group, name]); -{ -this.isJS = true; -}}, "ThreadGroup,~S"); -Clazz.overrideMethod (c$, "run", -function () { -this.run1 (0); -}); -Clazz.defineMethod (c$, "start", -function () { -{ -swingjs.JSToolkit.setTimeout(this, 1, 0); -}}); -Clazz.defineMethod (c$, "sleepAndReturn", -function (delay, state) { -if (!this.isJS) { -Thread.sleep (delay); -return false; -}var me = this; -var r = ((Clazz.isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz.innerTypeInstance (swingjs.JSThread$1, this, Clazz.cloneFinals ("me", me, "state", state))); -{ -setTimeout( -function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))}, -delay -); -}return true; -}, "~N,~N"); -c$.$JSThread$1$ = function () { -Clazz.pu$h (); -c$ = Clazz.declareAnonymous (swingjs, "JSThread$1", null, Runnable); -Clazz.overrideMethod (c$, "run", -function () { -this.f$.me.run1 (this.f$.state); -}); -c$ = Clazz.p0p (); -}; -Clazz.defineStatics (c$, -"INIT", 0, -"LOOP", 1, -"DONE", 2); -}); +Clazz.declarePackage ("swingjs"); +Clazz.load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.isJS = false; +Clazz.instantialize (this, arguments); +}, swingjs, "JSThread", Thread, swingjs.api.JSFunction); +Clazz.makeConstructor (c$, +function (group, name) { +Clazz.superConstructor (this, swingjs.JSThread, [group, name]); +{ +this.isJS = true; +}}, "ThreadGroup,~S"); +Clazz.overrideMethod (c$, "run", +function () { +this.run1 (0); +}); +Clazz.defineMethod (c$, "start", +function () { +{ +swingjs.JSToolkit.setTimeout(this, 1, 0); +}}); +Clazz.defineMethod (c$, "sleepAndReturn", +function (delay, state) { +if (!this.isJS) { +Thread.sleep (delay); +return false; +}var me = this; +var r = ((Clazz.isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz.innerTypeInstance (swingjs.JSThread$1, this, Clazz.cloneFinals ("me", me, "state", state))); +{ +setTimeout( +function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))}, +delay +); +}return true; +}, "~N,~N"); +c$.$JSThread$1$ = function () { +Clazz.pu$h (); +c$ = Clazz.declareAnonymous (swingjs, "JSThread$1", null, Runnable); +Clazz.overrideMethod (c$, "run", +function () { +this.f$.me.run1 (this.f$.state); +}); +c$ = Clazz.p0p (); +}; +Clazz.defineStatics (c$, +"INIT", 0, +"LOOP", 1, +"DONE", 2); +}); diff --git a/bin/swingjs/api/DOMNode.js b/bin/swingjs/api/DOMNode.js index f518093..ad28942 100644 --- a/bin/swingjs/api/DOMNode.js +++ b/bin/swingjs/api/DOMNode.js @@ -1,58 +1,58 @@ -Clazz.declarePackage ("swingjs.api"); -c$ = Clazz.declareType (swingjs.api, "DOMNode"); -c$.createElement = Clazz.defineMethod (c$, "createElement", -function (key, id) { -var obj = null; -{ -obj = document.createElement(key); -obj.id = id; -}return obj; -}, "~S,~S"); -c$.getParent = Clazz.defineMethod (c$, "getParent", -function (obj) { -{ -return obj.parentNode; -}}, "swingjs.api.DOMNode"); -c$.remove = Clazz.defineMethod (c$, "remove", -function (obj) { -{ -try { -var p = obj.parentNode; -p.removeNode(obj); -} catch(e) {}; -return p; -}}, "swingjs.api.DOMNode"); -c$.add = Clazz.defineMethod (c$, "add", -function (parent, child) { -{ -parent && parent.appendChild(child); -}}, "swingjs.api.DOMNode,swingjs.api.DOMNode"); -c$.getAttr = Clazz.defineMethod (c$, "getAttr", -function (obj, attr) { -{ -if (obj)return obj[attr]; -}}, "swingjs.api.DOMNode,~S"); -Clazz.defineMethod (c$, "getStyle", -function (style) { -{ -if (obj)return obj.style[style]; -}}, "~S"); -c$.setAttr = Clazz.defineMethod (c$, "setAttr", -function (obj, attr, val) { -{ -obj[attr] = (val == "TRUE" ? true : val); -}return obj; -}, "swingjs.api.DOMNode,~S,~O"); -c$.setStyles = Clazz.defineMethod (c$, "setStyles", -function (obj, attr) { -{ -for (var i = 0; i < attr.length;) { -//System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]]) -; -obj.style[attr[i++]] = attr[i++]; } -}return obj; -}, "swingjs.api.DOMNode,~A"); -c$.setSize = Clazz.defineMethod (c$, "setSize", -function (obj, width, height) { -return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]); -}, "swingjs.api.DOMNode,~N,~N"); +Clazz.declarePackage ("swingjs.api"); +c$ = Clazz.declareType (swingjs.api, "DOMNode"); +c$.createElement = Clazz.defineMethod (c$, "createElement", +function (key, id) { +var obj = null; +{ +obj = document.createElement(key); +obj.id = id; +}return obj; +}, "~S,~S"); +c$.getParent = Clazz.defineMethod (c$, "getParent", +function (obj) { +{ +return obj.parentNode; +}}, "swingjs.api.DOMNode"); +c$.remove = Clazz.defineMethod (c$, "remove", +function (obj) { +{ +try { +var p = obj.parentNode; +p.removeNode(obj); +} catch(e) {}; +return p; +}}, "swingjs.api.DOMNode"); +c$.add = Clazz.defineMethod (c$, "add", +function (parent, child) { +{ +parent && parent.appendChild(child); +}}, "swingjs.api.DOMNode,swingjs.api.DOMNode"); +c$.getAttr = Clazz.defineMethod (c$, "getAttr", +function (obj, attr) { +{ +if (obj)return obj[attr]; +}}, "swingjs.api.DOMNode,~S"); +Clazz.defineMethod (c$, "getStyle", +function (style) { +{ +if (obj)return obj.style[style]; +}}, "~S"); +c$.setAttr = Clazz.defineMethod (c$, "setAttr", +function (obj, attr, val) { +{ +obj[attr] = (val == "TRUE" ? true : val); +}return obj; +}, "swingjs.api.DOMNode,~S,~O"); +c$.setStyles = Clazz.defineMethod (c$, "setStyles", +function (obj, attr) { +{ +for (var i = 0; i < attr.length;) { +//System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]]) +; +obj.style[attr[i++]] = attr[i++]; } +}return obj; +}, "swingjs.api.DOMNode,~A"); +c$.setSize = Clazz.defineMethod (c$, "setSize", +function (obj, width, height) { +return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]); +}, "swingjs.api.DOMNode,~N,~N"); diff --git a/bin/swingjs/api/JSFunction.js b/bin/swingjs/api/JSFunction.js index 4923079..1c8077b 100644 --- a/bin/swingjs/api/JSFunction.js +++ b/bin/swingjs/api/JSFunction.js @@ -1,2 +1,2 @@ -Clazz.declarePackage ("swingjs.api"); -Clazz.declareInterface (swingjs.api, "JSFunction"); +Clazz.declarePackage ("swingjs.api"); +Clazz.declareInterface (swingjs.api, "JSFunction"); diff --git a/bin/uniref50.fa b/bin/uniref50.fa deleted file mode 100644 index 72c062d..0000000 --- a/bin/uniref50.fa +++ /dev/null @@ -1,60 +0,0 @@ ->FER_CAPAA Ferredoxin ------------------------------------------------------------ASYKVKLITPDGP -IEFDCPDDVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDDDQLEEGWVLTCVAYPQSDV -TIETHKEAELVG- ->FER_CAPAN Ferredoxin, chloroplast precursor -MA------SVSATMISTSFMPRKPAVTSL-KPIPNVGE--ALFGLKS-A--NGGKVTCMASYKVKLITPDGP -IEFDCPDNVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDDDQLEEGWVLTCVAYPQSDV -TIETHKEAELVG- ->FER1_SOLLC Ferredoxin-1, chloroplast precursor -MA------SISGTMISTSFLPRKPAVTSL-KAISNVGE--ALFGLKS-G--RNGRITCMASYKVKLITPEGP -IEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGSVDQSDGNFLDEDQEAAGFVLTCVAYPKGDV -TIETHKEEELTA- ->Q93XJ9_SOLTU Ferredoxin I precursor -MA------SISGTMISTSFLPRKPVVTSL-KAISNVGE--ALFGLKS-G--RNGRITCMASYKVKLITPDGP -IEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGTVDQSDGKFLDDDQEAAGFVLTCVAYPKCDV -TIETHKEEELTA- ->FER1_PEA Ferredoxin-1, chloroplast precursor -MATT---PALYGTAVSTSFLRTQPMPMSV-TTTKAFSN--GFLGLKT-SLKRGDLAVAMASYKVKLVTPDGT -QEFECPSDVYILDHAEEVGIDLPYSCRAGSCSSCAGKVVGGEVDQSDGSFLDDEQIEAGFVLTCVAYPTSDV -VIETHKEEDLTA- ->Q7XA98_TRIPR Ferredoxin I -MATT---PALYGTAVSTSFMRRQPVPMSV-ATTTTTKAFPSGFGLKSVSTKRGDLAVAMATYKVKLITPEGP -QEFDCPDDVYILDHAEEVGIELPYSCRAGSCSSCAGKVVNGNVNQEDGSFLDDEQIEGGWVLTCVAFPTSDV -TIETHKEEELTA- ->FER1_MESCR Ferredoxin-1, chloroplast precursor -MAAT--TAALSGATMSTAFAPK--TPPMTAALPTNVGR--ALFGLKS-SASR-GRVTAMAAYKVTLVTPEGK -QELECPDDVYILDAAEEAGIDLPYSCRAGSCSSCAGKVTSGSVNQDDGSFLDDDQIKEGWVLTCVAYPTGDV -TIETHKEEELTA- ->FER1_SPIOL Ferredoxin-1, chloroplast precursor -MAAT--TTTMMG--MATTFVPKPQAPPMMAALPSNTGR--SLFGLKT-GSR--GGRMTMAAYKVTLVTPTGN -VEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLDDDQIDEGWVLTCAAYPVSDV -TIETHKEEELTA- ->FER3_RAPSA Ferredoxin, leaf L-A ------------------------------------------------------------ATYKVKFITPEGE -QEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDDDQIAEGFVLTCAAYPTSDV -TIETHREEDMV-- ->FER1_ARATH Ferredoxin-1, chloroplast precursor -MAST----ALSSAIVGTSFIRRSPAPISLRSLPSANTQ--SLFGLKS-GTARGGRVTAMATYKVKFITPEGE -LEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDDEQIGEGFVLTCAAYPTSDV -TIETHKEEDIV-- ->FER_BRANA Ferredoxin ------------------------------------------------------------ATYKVKFITPEGE -QEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGFVDQSDESFLDDDQIAEGFVLTCAAYPTSDV -TIETHKEEELV-- ->FER2_ARATH Ferredoxin-2, chloroplast precursor -MAST----ALSSAIVSTSFLRRQQTPISLRSLPFANTQ--SLFGLKS-STARGGRVTAMATYKVKFITPEGE -QEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDDEQMSEGYVLTCVAYPTSDV -VIETHKEEAIM-- ->Q93Z60_ARATH At1g10960/T19D16_12 -MAST----ALSSAIVSTSFLRRQQTPISLRSLPFANTQ--SLFGLKS-STARGGRVTAMATYKVKFITPEGE -QEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDD------------------- -------------- ->FER1_MAIZE Ferredoxin-1, chloroplast precursor -MATVLGSPRAPAFFFSSSSLRAAPAPTAV--ALPAAKV--GIMGRSA-SSRR--RLRAQATYNVKLITPEGE -VELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDV -VIETHKEEELTGA ->O80429_MAIZE Ferredoxin -MAAT---------ALSMSILR---APPPCFSSPLRLRV--AVAKPLA-APMRRQLLRAQATYNVKLITPEGE -VELQVPDDVYILDFAEEEGIDLPFSCRAGSCSSCAGKVVSGSVDQSDQSFLNDNQVADGWVLTCAAYPTSDV -VIETHKEDDLL-- diff --git a/resources/.cvsignore b/resources/.cvsignore index 43d40c0..3971c16 100644 --- a/resources/.cvsignore +++ b/resources/.cvsignore @@ -1,2 +1,2 @@ -axisCommons -jalview_mapping.xml +axisCommons +jalview_mapping.xml diff --git a/resources/authors.props b/resources/authors.props index d41c2ca..7499ee3 100644 --- a/resources/authors.props +++ b/resources/authors.props @@ -1,4 +1,4 @@ -YEAR=2014 -AUTHORS=J Procter, AM Waterhouse, M Carstairs, TC Ofoegbu, J Engelhardt, LM Lui, A Menard, D Barton, N Sherstnev, D Roldan-Martinez, M Clamp, S Searle, G Barton -AUTHORFNAMES=Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu 'Charles' Ofoegbu, Jan Engelhardt, Lauren Lui, Anne Menard, Daniel Barton, Natasha Sherstnev, David Roldan-Martinez, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton +YEAR=2014 +AUTHORS=J Procter, AM Waterhouse, M Carstairs, TC Ofoegbu, J Engelhardt, LM Lui, A Menard, D Barton, N Sherstnev, D Roldan-Martinez, M Clamp, S Searle, G Barton +AUTHORFNAMES=Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu 'Charles' Ofoegbu, Jan Engelhardt, Lauren Lui, Anne Menard, Daniel Barton, Natasha Sherstnev, David Roldan-Martinez, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton \ No newline at end of file diff --git a/resources/biojs_templates/BioJsMSA_1.0.txt b/resources/biojs_templates/BioJsMSA_1.0.txt index 26a483b..2fe404b 100644 --- a/resources/biojs_templates/BioJsMSA_1.0.txt +++ b/resources/biojs_templates/BioJsMSA_1.0.txt @@ -1,9048 +1,9048 @@ - -

    BioJS viewer
    - - - - - - - - Jalview Logo - -
    -
    - - - - -
    -
    - -
    press "Run with JS"
    - - - - - - - - + +
    BioJS viewer
    + + + + + + + + Jalview Logo + +
    +
    + + + + +
    +
    + +
    press "Run with JS"
    + + + + + + + + diff --git a/resources/biojs_templates/BioJsMSA_1.1.txt b/resources/biojs_templates/BioJsMSA_1.1.txt index 26a483b..2fe404b 100644 --- a/resources/biojs_templates/BioJsMSA_1.1.txt +++ b/resources/biojs_templates/BioJsMSA_1.1.txt @@ -1,9048 +1,9048 @@ - -
    BioJS viewer
    - - - - - - - - Jalview Logo - -
    -
    - - - - -
    -
    - -
    press "Run with JS"
    - - - - - - - - + +
    BioJS viewer
    + + + + + + + + Jalview Logo + +
    +
    + + + + +
    +
    + +
    press "Run with JS"
    + + + + + + + + diff --git a/resources/biojs_templates/Latest_BioJsMSA_1.2.txt b/resources/biojs_templates/Latest_BioJsMSA_1.2.txt index 26a483b..2fe404b 100644 --- a/resources/biojs_templates/Latest_BioJsMSA_1.2.txt +++ b/resources/biojs_templates/Latest_BioJsMSA_1.2.txt @@ -1,9048 +1,9048 @@ - -
    BioJS viewer
    - - - - - - - - Jalview Logo - -
    -
    - - - - -
    -
    - -
    press "Run with JS"
    - - - - - - - - + +
    BioJS viewer
    + + + + + + + + Jalview Logo + +
    +
    + + + + +
    +
    + +
    press "Run with JS"
    + + + + + + + + diff --git a/resources/embl_mapping.xml b/resources/embl_mapping.xml index ccbde5e..1946827 100644 --- a/resources/embl_mapping.xml +++ b/resources/embl_mapping.xml @@ -1,152 +1,152 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/.cvsignore b/resources/images/.cvsignore index 1d13d05..c2e1d9b 100644 --- a/resources/images/.cvsignore +++ b/resources/images/.cvsignore @@ -1,10 +1,10 @@ -dna.gif -dna1.gif -dna2.gif -dna3.gif -dna4.gif -dna5.gif -dna6.gif -dna7.gif -dna8.gif -dna9.gif +dna.gif +dna1.gif +dna2.gif +dna3.gif +dna4.gif +dna5.gif +dna6.gif +dna7.gif +dna8.gif +dna9.gif diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index b2bf58b..1ef8c6f 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1,1247 +1,1247 @@ -action.refresh_services = Refresh Services -action.reset_services = Reset Services -action.merge_results = Merge Results -action.load_scheme = Load scheme -action.save_scheme = Save scheme -action.save_image = Save Image -action.paste = Paste -action.show_html_source = Show HTML Source -action.print = Print -action.web_service = Web Service -action.cancel_job = Cancel Job -action.start_job = Start Job -action.revert = Revert -action.move_down = Move Down -action.move_up = Move Up -action.remove_return_datatype = Remove return datatype -action.add_return_datatype = Add return datatype -action.remove_input_parameter = Remove selected input parameter -action.add_input_parameter = Add input parameter -action.edit = Edit -action.new = New -action.open_file = Open file -action.show_unconserved = Show Unconserved -action.open_new_alignment = Open new alignment -action.raise_associated_windows = Raise Associated Windows -action.minimize_associated_windows = Minimize Associated Windows -action.close_all = Close all -action.load_project = Load Project -action.save_project = Save Project -action.quit = Quit -action.expand_views = Expand Views -action.gather_views = Gather Views -action.page_setup = Page Setup -action.reload = Reload -action.load = Load -action.open = Open -action.cancel = Cancel -action.create = Create -action.update = Update -action.delete = Delete -action.snapshot = Snapshot -action.clear = Clear -action.accept = Accept -action.select_ddbb = --- Select Database --- -action.undo = Undo -action.redo = Redo -action.reset = Reset -action.remove_left = Remove left -action.remove_right = Remove right -action.remove_empty_columns = Remove Empty Columns -action.remove_all_gaps = Remove All Gaps -action.left_justify_alignment = Left Justify Alignment -action.right_justify_alignment = Right Justify Alignment -action.boxes = Boxes -action.text = Text -action.by_pairwise_id = by Pairwise Identity -action.by_id = by Id -action.by_length = by Length -action.by_group = by Group -action.unmark_as_reference = Unmark as Reference -action.set_as_reference = Set as Reference -action.remove = Remove -action.remove_redundancy = Remove Redundancy... -action.pairwise_alignment = Pairwise Alignments... -action.by_rna_helixes = by RNA Helices -action.user_defined = User Defined... -action.by_conservation = By Conservation -action.wrap = Wrap -action.show_gaps = Show Gaps -action.show_hidden_markers = Show Hidden Markers -action.find = Find -action.undefine_groups = Undefine Groups -action.create_groups = Create Groups -action.make_groups_selection = Make Groups For Selection -action.copy = Copy -action.cut = Cut -action.font = Font... -action.scale_above = Scale Above -action.scale_left = Scale Left -action.scale_right = Scale Right -action.by_tree_order = By Tree Order -action.sort = Sort -action.calculate_tree = Calculate Tree -action.help = Help -action.by_annotation = by Annotation... -action.invert_sequence_selection = Invert Sequence Selection -action.invert_column_selection = Invert Column Selection -action.show = Show -action.hide = Hide -action.ok = OK -action.set_defaults = Defaults -action.create_group = Create Group -action.remove_group = Remove Group -action.edit_group = Edit Group -action.border_colour = Border colour -action.edit_new_group = Edit New Group -action.hide_sequences = Hide Sequences -action.sequences = Sequences -action.ids = IDS -action.ids_sequences = IDS and sequences -action.reveal_all = Reveal All -action.reveal_sequences = Reveal Sequences -action.find_all = Find all -action.find_next = Find next -action.file = File -action.view = View -action.annotations = Annotations -action.change_params = Change Parameters -action.apply = Apply -action.apply_threshold_all_groups = Apply threshold to all groups -action.apply_all_groups = Apply to all Groups -action.by_chain = By Chain -action.by_sequence = By Sequence -action.paste_annotations = Paste Annotations -action.format = Format -action.select = Select -action.new_view = New View -action.close = Close -action.add = Add -action.save_as_default = Save as default -action.save_as = Save as -action.save = Save -action.cancel_fetch = Cancel Fetch -action.save_omit_hidden_columns = Save / Omit Hidden Regions -action.change_font = Change Font -action.change_font_tree_panel = Change Font (Tree Panel) -action.colour = Colour -action.calculate = Calculate -action.select_all = Select all -action.deselect_all = Deselect all -action.invert_selection = Invert selection -action.using_jmol = Using Jmol -action.link = Link -action.group_link = Group Link -action.show_chain = Show Chain -action.show_group = Show Group -action.fetch_db_references = Fetch DB References -action.view_flanking_regions = Show flanking regions -label.view_flanking_regions = Show sequence data either side of the subsequences involved in this alignment -label.str = Str: -label.seq = Seq: -label.structures_manager = Structures Manager -label.nickname = Nickname: -label.url = URL: -label.input_file_url = Enter URL or Input File -label.select_feature = Select feature: -label.name = Name -label.name_param = Name: {0} -label.group = Group -label.group_name = Group Name -label.group_description = Group Description -label.edit_group_name_description = Edit Group Name/Description -label.colour = Colour: -label.description = Description: -label.start = Start: -label.end = End: -label.current_parameter_set_name = Current parameter set name: -label.service_action = Service Action: -label.post_url = POST URL: -label.url_suffix = URL Suffix -label.sequence_source = Sequence Source -label.per_seq = per Sequence -label.result_vertically_separable = Results are vertically separable -label.amend = Amend -label.undo_command = Undo {0} -label.redo_command = Redo {0} -label.principal_component_analysis = Principal Component Analysis -label.average_distance_identity = Average Distance Using % Identity -label.neighbour_joining_identity = Neighbour Joining Using % Identity -label.treecalc_title = {0} Using {1} -label.tree_calc_av = Average Distance -label.tree_calc_nj = Neighbour Joining -label.select_score_model = Select score model -label.score_model_pid = % Identity -label.score_model_blosum62 = BLOSUM62 -label.score_model_pam250 = PAM 250 -label.score_model_conservation = Physicochemical property conservation -label.score_model_enhconservation = Physicochemical property conservation -label.status_bar = Status bar -label.out_to_textbox = Output to Textbox -label.clustalx = Clustalx -label.clustal = Clustal -label.zappo = Zappo -label.taylor = Taylor -label.blc = BLC -label.fasta = Fasta -label.msf = MSF -label.pfam = PFAM -label.pileup = Pileup -label.pir = PIR -label.hydrophobicity = Hydrophobicity -label.helix_propensity = Helix Propensity -label.strand_propensity = Strand Propensity -label.turn_propensity = Turn Propensity -label.buried_index = Buried Index -label.purine_pyrimidine = Purine/Pyrimidine -label.percentage_identity = Percentage Identity -label.blosum62 = BLOSUM62 -label.blosum62_score = BLOSUM62 Score -label.tcoffee_scores = T-Coffee Scores -label.average_distance_bloslum62 = Average Distance Using BLOSUM62 -label.neighbour_blosum62 = Neighbour Joining Using BLOSUM62 -label.show_annotations = Show annotations -label.hide_annotations = Hide annotations -label.show_all_seq_annotations = Show sequence related -label.hide_all_seq_annotations = Hide sequence related -label.show_all_al_annotations = Show alignment related -label.hide_all_al_annotations = Hide alignment related -label.hide_all = Hide all -label.add_reference_annotations = Add reference annotations -label.find_tip = Search alignment, selection or sequence ids for a subsequence (ignoring gaps).
    Accepts regular expressions - search Help for 'regex' for details. -label.colour_text = Colour Text -label.show_non_conversed = Show nonconserved -label.overview_window = Overview Window -label.none = None -label.above_identity_threshold = Above Identity Threshold -label.show_sequence_features = Show Sequence Features -label.nucleotide = Nucleotide -label.protein = Protein -label.to_new_alignment = To New Alignment -label.to_this_alignment = Add To This Alignment -label.apply_colour_to_all_groups = Apply Colour To All Groups -label.modify_identity_thereshold = Modify Identity Threshold... -label.modify_conservation_thereshold = Modify Conservation Threshold... -label.input_from_textbox = Input from textbox -label.centre_column_labels = Centre column labels -label.automatic_scrolling = Automatic Scrolling -label.documentation = Documentation -label.about = About... -label.show_sequence_limits = Show Sequence Limits -label.feature_settings = Feature Settings... -label.all_columns = All Columns -label.all_sequences = All Sequences -label.selected_columns = Selected Columns -label.selected_sequences = Selected Sequences -label.except_selected_sequences = All except selected sequences -label.all_but_selected_region = All but Selected Region (Shift+Ctrl+H) -label.selected_region = Selected Region -label.all_sequences_columns = All Sequences and Columns -label.hide_insertions = Hide columns gapped for selection -label.hide_selected_annotations = Hide selected annotations -label.show_selected_annotations = Show selected annotations -label.group_consensus = Group Consensus -label.group_conservation = Group Conservation -label.show_consensus_histogram = Show Consensus Histogram -label.show_consensus_logo = Show Consensus Logo -label.norm_consensus_logo = Normalise Consensus Logo -label.apply_all_groups = Apply to all groups -label.autocalculated_annotation = Autocalculated Annotation -label.show_first = Show first -label.show_last = Show last -label.struct_from_pdb = Process secondary structure from PDB -label.use_rnaview = Use RNAView for secondary structure -label.autoadd_secstr = Add secondary structure annotation to alignment -label.autoadd_temp = Add Temperature Factor annotation to alignment -label.structure_viewer = Default structure viewer -label.chimera_path = Path to Chimera program -label.chimera_path_tip = Jalview will first try any path entered here, else standard installation locations.
    Double-click to browse for file. -label.invalid_chimera_path = Chimera path not found or not executable -label.chimera_missing = Chimera structure viewer not found.
    Please enter the path to Chimera (if installed),
    or download and install UCSF Chimera. -label.chimera_failed = Error opening Chimera - is it installed?\nCheck path in Preferences, Structure -label.min_colour = Minimum Colour -label.max_colour = Maximum Colour -label.use_original_colours = Use Original Colours -label.threshold_minmax = Threshold is min/max -label.represent_group_with = Represent Group with {0} -label.selection = Selection -label.group_colour = Group Colour -label.sequence = Sequence -label.view_pdb_structure = View PDB Structure -label.min = Min: -label.max = Max: -label.colour_by_label = Colour by label -label.new_feature = New Feature -label.match_case = Match Case -label.view_alignment_editor = View in alignment editor -label.labels = Labels -label.output_values = Output Values... -label.output_points = Output points... -label.output_transformed_points = Output transformed points -label.input_data = Input Data... -label.nucleotide_matrix = Nucleotide matrix -label.protein_matrix = Protein matrix -label.show_bootstrap_values = Show Bootstrap Values -label.show_distances = Show distances -label.mark_unassociated_leaves = Mark Unassociated Leaves -label.fit_to_window = Fit To Window -label.newick_format = Newick Format -label.select_newick_like_tree_file = Select a newick-like tree file -label.colours = Colours -label.view_mapping = View Mapping -label.wireframe = Wireframe -label.depthcue = Depthcue -label.z_buffering = Z Buffering -label.charge_cysteine = Charge & Cysteine -label.all_chains_visible = All Chains Visible -label.successfully_added_features_alignment = Successfully added features to alignment -label.keyboard_editing_mode = Keyboard editing mode is {0} -label.paste_features_annotations_Tcoffee_here = Paste your features / annotations / T-coffee score file here. -label.removed_columns = Removed {0} columns. -label.removed_empty_columns = Removed {0} empty columns. -label.paste_newick_tree_file = Paste your Newick tree file here. -label.order_by_params = Order by {0} -label.html_content = {0} -label.paste_pdb_file= Paste your PDB file here. -label.paste_pdb_file_for_sequence = Paste PDB file for sequence {0} -label.could_not_parse_newick_file = Could not parse Newick file\!\n {0} -label.successfully_pasted_tcoffee_scores_to_alignment= Successfully pasted T-Coffee scores to alignment. -label.failed_add_tcoffee_scores = Failed to add T-Coffee scores: -label.successfully_pasted_annotation_to_alignment= Successfully pasted annotation to alignment. -label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file = Couldn't parse pasted text as a valid annotation, feature, GFF, or T-Coffee score file -label.successfully_pasted_alignment_file = Successfully pasted alignment file -label.paste_your_alignment_file = Paste your alignment file here -label.paste_your = Paste your -label.finished_searching = Finished searching -label.search_results= Search results {0} : {1} -label.found_match_for = Found match for {0} -label.font = Font: -label.size = Size: -label.style = Style: -label.enter_redundancy_threshold = Enter the redundancy threshold -label.calculating = Calculating.... -label.modify_conservation_visibility = Modify conservation visibility -label.colour_residues_above_occurence = Colour residues above % occurence -label.set_this_label_text = set this label text -label.sequences_from = Sequences from {0} -label.successfully_loaded_file = Successfully loaded file {0} -label.successfully_saved_to_file_in_format = Successfully saved to file: {0} in {1} format. -label.copied_sequences_to_clipboard = Copied {0} sequences to clipboard. -label.check_file_matches_sequence_ids_alignment = Check that the file matches sequence IDs in the alignment. -label.problem_reading_tcoffee_score_file = Problem reading T-COFFEE score file -label.source_to_target = {0} ... {1} -label.per_sequence_only= Per-sequence only -label.to_file = to File -label.to_textbox = to Textbox -label.jalview = Jalview -label.csv_spreadsheet = CSV (Spreadsheet) -label.status = Status -label.channels = Channels -label.channel_title_item_count = {0} ({1}) -label.blog_item_published_on_date = {0} {1} -label.select_das_service_from_table = Select a DAS service from the table to read a full description here. -label.session_update = Session Update -label.new_vamsas_session = New Vamsas Session -label.load_vamsas_session = Load Vamsas Session -label.save_vamsas_session = Save Vamsas Session -label.select_vamsas_session_opened_as_new_vamsas_session= Select a vamsas session to be opened as a new vamsas session. -label.open_saved_vamsas_session = Open a saved VAMSAS session -label.groovy_console = Groovy Console... -label.lineart = Lineart -label.dont_ask_me_again = Don't ask me again -label.select_eps_character_rendering_style = Select EPS character rendering style -label.invert_selection = Invert Selection -label.optimise_order = Optimise Order -label.seq_sort_by_score = Sequence sort by Score -label.load_colours = Load Colours -label.save_colours = Save Colours -label.fetch_das_features = Fetch DAS Features -label.selected_database_to_fetch_from = Selected {0} database {1} to fetch from {2} -label.database_param = Database: {0} -label.example = Example -label.example_param = Example: {0} -label.select_file_format_before_saving = You must select a file format before saving! -label.file_format_not_specified = File format not specified -label.alignment_contains_hidden_columns = The Alignment contains hidden regions (hidden sequences/columns).\nDo you want to save only the visible alignment? -label.couldnt_save_file = Couldn't save file: {0} -label.error_saving_file = Error Saving File -label.remove_from_default_list = Remove from default list? -label.remove_user_defined_colour = Remove user defined colour -label.you_must_select_least_two_sequences = You must select at least 2 sequences. -label.invalid_selection = Invalid Selection -label.principal_component_analysis_must_take_least_four_input_sequences = Principal component analysis must take\nat least 4 input sequences. -label.sequence_selection_insufficient = Sequence selection insufficient -label.you_need_more_two_sequences_selected_build_tree = You need to have more than two sequences selected to build a tree! -label.not_enough_sequences = Not enough sequences -label.selected_region_to_tree_may_only_contain_residues_or_gaps = The selected region to create a tree may\nonly contain residues or gaps.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. -label.sequences_selection_not_aligned = Sequences in selection are not aligned -label.sequences_must_be_aligned_before_creating_tree = The sequences must be aligned before creating a tree.\nTry using the Pad function in the edit menu,\n or one of the multiple sequence alignment web services. -label.sequences_not_aligned = Sequences not aligned -label.problem_reading_tree_file = Problem reading tree file -label.possible_problem_with_tree_file = Possible problem with tree file -label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Please select at least three bases in at least one sequence in order to perform a cDNA translation. -label.translation_failed = Translation Failed -label.error_when_translating_sequences_submit_bug_report = Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace. -label.implementation_error = Implementation error: -label.automatically_associate_pdb_files_with_sequences_same_name = Do you want to automatically associate the {0} PDB files with sequences in the alignment that have the same name? -label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name -label.ignore_unmatched_dropped_files_info = Do you want to ignore the {0} files whose names did not match any sequence IDs ? -label.ignore_unmatched_dropped_files = Ignore unmatched dropped files? -label.view_name_original = Original -label.enter_view_name = Enter View Name -label.enter_label = Enter label -label.enter_label_for_the_structure = Enter a label for the structure? -label.pdb_entry_is_already_displayed = {0} is already displayed.\nDo you want to re-use this viewer ? -label.map_sequences_to_visible_window = Map Sequences to Visible Window: {0} -label.add_pdbentry_to_view = Do you want to add {0} to the view called\n{1}\n -label.align_to_existing_structure_view = Align to existing structure view -label.pdb_entries_couldnt_be_retrieved = The following pdb entries could not be retrieved from the PDB\:\n{0}\nPlease retry, or try downloading them manually. -label.couldnt_load_file = Couldn't load file -label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied. Please enter an Id to identify this structure. -label.no_pdb_id_in_file = No PDB Id in File -label.couldnt_read_pasted_text = Couldn't read the pasted text {0} -label.error_parsing_text = Error parsing text -label.enter_local_das_source = Enter Nickname & URL of Local DAS Source -label.you_can_only_edit_or_remove_local_das_sources = You can only edit or remove local DAS Sources! -label.public_das_source = Public DAS source - not editable -label.input_alignment_from_url = Input Alignment From URL -label.input_alignment = Input Alignment -label.couldnt_import_as_vamsas_session = Couldn't import {0} as a new vamsas session. -label.vamsas_document_import_failed = Vamsas Document Import Failed -label.couldnt_locate = Couldn't locate {0} -label.url_not_found = URL not found -label.no_link_selected = No link selected -label.new_sequence_url_link = New sequence URL link -label.cannot_edit_annotations_in_wrapped_view = Cannot edit annotations in wrapped view -label.wrapped_view_no_edit = Wrapped view - no edit -label.error_retrieving_data = Error Retrieving Data -label.user_colour_scheme_must_have_name = User colour scheme must have a name -label.no_name_colour_scheme = No name for colour scheme -label.invalid_url = Invalid URL ! -label.error_loading_file = Error loading file -label.problems_opening_file = Encountered problems opening {0}!! -label.file_open_error = File open error -label.no_das_sources_selected_warn = No das sources were selected.\nPlease select some sources and\ntry again. -label.no_das_sources_selected_title = No DAS Sources Selected -label.colour_scheme_exists_overwrite = Colour scheme {0} exists.\nContinue saving colour scheme as {1}?" -label.duplicate_scheme_name = Duplicate scheme name -label.jalview_new_questionnaire = There is a new Questionnaire available. Would you like to complete it now ?\n -label.jalview_user_survey = Jalview User Survey -label.alignment_properties = Alignment Properties: {0} -label.alignment_props = Alignment Properties -label.input_cut_paste = Cut & Paste Input -label.input_cut_paste_params = Cut & Paste Input - {0} -label.alignment_output_command = Alignment output - {0} -label.annotations = Annotations -label.structure_options = Structure Options -label.features = Features -label.overview_params = Overview {0} -label.paste_newick_file = Paste Newick file -label.load_tree_from_file = From File - -label.colour_by_annotation = Colour by Annotation -label.selection_output_command = Selection output - {0} -label.annotation_for_displayid =

    Annotation for {0}

    -label.pdb_sequence_mapping = PDB - Sequence Mapping -label.pca_details = PCA details -label.redundancy_threshold_selection = Redundancy threshold selection -label.user_defined_colours = User defined colours -label.jalviewLite_release = JalviewLite - Release {0} -label.jaview_build_date = Build date: {0} -label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt, -label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. -label.jalview_dev_managers = Development managed by The Barton Group, University of Dundee, Scotland, UK. -label.jalview_distribution_lists = For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list -label.jalview_please_cite = If you use Jalview, please cite: -label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) -label.jalview_cite_1_title = Jalview Version 2 - a multiple sequence alignment editor and analysis workbench -label.jalview_cite_1_ref = Bioinformatics doi: 10.1093/bioinformatics/btp033 -label.right_click = Right click -label.to_add_annotation = to add annotation -label.alignment_has_no_annotations = Alignment has no annotations -label.retrieving_pdb_data = Retrieving PDB data... -label.label = Label -label.no_features_added_to_this_alignment = No Features added to this alignment!! -label.features_can_be_added_from_searches_1 = (Features can be added from searches or -label.features_can_be_added_from_searches_2 = from Jalview / GFF features files) -label.calculating_pca= Calculating PCA -label.reveal_columns = Reveal Columns -label.jalview_cannot_open_file = Jalview can't open file -label.jalview_applet = Jalview applet -label.loading_data = Loading data -label.memory_stats = Total Free Memory: {0} MB; Max Memory: {1} MB; {2} % -label.calculating_tree = Calculating tree -label.state_queueing = queuing -label.state_running = running -label.state_complete = complete -label.state_completed = finished -label.state_job_cancelled = job cancelled!! -label.state_job_error = job error! -label.server_error_try_later = Server Error! (try later) -label.error_loading_pdb_data = Error loading PDB data!! -label.fetching_pdb_data = Fetching PDB data... -label.structure_type = Structure type -label.settings_for_type = Settings for {0} -label.view_full_application = View in Full Application -label.load_associated_tree = Load Associated Tree ... -label.load_features_annotations = Load Features/Annotations ... -label.export_features = Export Features ... -label.export_annotations = Export Annotations ... -label.to_upper_case = To Upper Case -label.to_lower_case = To Lower Case -label.toggle_case = Toggle Case -label.edit_name_description = Edit Name/Description ... -label.create_sequence_feature = Create Sequence Feature ... -label.edit_sequence = Edit Sequence -label.edit_sequences = Edit Sequences -label.sequence_details = Sequence Details -label.jmol_help = Jmol Help -label.chimera_help = Chimera Help -label.close_viewer = Close Viewer -label.confirm_close_chimera = This will close Jalview''s connection to {0}.
    Do you want to close the Chimera window as well? -label.chimera_help = Chimera Help -label.all = All -label.sort_by = Sort alignment by -label.sort_by_score = Sort by Score -label.sort_by_density = Sort by Density -label.sequence_sort_by_density = Sequence sort by Density -label.sort_ann_by = Sort annotations by -label.sort_annotations_by_sequence = Sort by sequence -label.sort_annotations_by_label = Sort by label -label.reveal = Reveal -label.hide_columns = Hide Columns -label.load_jalview_annotations = Load Jalview Annotations or Features File -label.load_tree_file = Load a tree file -label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = Retrieve and parse sequence database records for the alignment or the currently selected sequences -label.standard_databases = Standard Databases -label.fetch_embl_uniprot = Fetch from EMBL/EMBLCDS or Uniprot/PDB and any selected DAS sources -label.reset_min_max_colours_to_defaults = Reset min and max colours to defaults from user preferences. -label.align_structures_using_linked_alignment_views = Align structures using {0} linked alignment views -label.connect_to_session = Connect to session {0} -label.threshold_feature_display_by_score = Threshold the feature display by score. -label.threshold_feature_no_thereshold = No Threshold -label.threshold_feature_above_thereshold = Above Threshold -label.threshold_feature_below_thereshold = Below Threshold -label.adjust_thereshold = Adjust threshold -label.toggle_absolute_relative_display_threshold = Toggle between absolute and relative display threshold. -label.display_features_same_type_different_label_using_different_colour = Display features of the same type with a different label using a different colour. (e.g. domain features) -label.select_colour_minimum_value = Select Colour for Minimum Value -label.select_colour_maximum_value = Select Colour for Maximum Value -label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Open a new structure viewer with all structures associated with the current selection and superimpose them using the alignment. -label.open_url_param = Open URL {0} -label.open_url_seqs_param = Open URL ({0}..) ({1} seqs) -label.load_pdb_file_associate_with_sequence = Load a PDB file and associate it with sequence {0} -label.reveal_hidden_columns = Reveal Hidden Columns with Right Mouse Button -label.dark_colour = Dark Colour -label.light_colour = Light Colour -label.highlightnode = Left click to select leaves.
    Double-click to invert leaves.
    Right click to change colour. -label.load_colour_scheme = Load colour scheme -label.copy_format_from = Copy format from -label.toggle_enabled_views = When enabled, allows many views to be selected. -label.select_all_views = Select all views -label.select_many_views = Select many views -label.edit_notes_parameter_set = Click to edit the notes for this parameter set. -label.open_local_file = Open local file -label.enable_automatically_sort_alignment_when_open_new_tree = Enable this to automatically sort
    the alignment when you open
    a new tree. -label.listen_for_selections = Listen for selections -label.selections_mirror_selections_made_same_sequences_other_views = When selected, selections in this view will mirror
    selections made on the same sequences in other views. -label.toggle_sequence_visibility = Shift+H toggles sequence visiblity -label.toggle_columns_visibility = Ctrl+H toggles column visiblity. -label.toggles_visibility_hidden_selected_regions = H toggles visibility of hidden or selected regions -label.rename_tab_eXpand_reGroup= Right-click to rename tab
    Press X to eXpand tabs, G to reGroup. -label.right_align_sequence_id = Right Align Sequence Id -label.sequence_id_tooltip = Sequence ID Tooltip -label.no_services = -label.select_copy_raw_html = Select this if you want to copy raw html -label.share_data_vamsas_applications = Share data with other vamsas applications -label.connect_to = Connect to -label.join_existing_vamsas_session = Join an existing vamsas session -label.from_url = from URL -label.any_trees_calculated_or_loaded_alignment_automatically_sort = When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment -label.sort_with_new_tree = Sort With New Tree -label.from_textbox = from Textbox -label.window = Window -label.preferences = Preferences -label.tools = Tools -label.fetch_sequences = Fetch Sequence(s) -label.stop_vamsas_session = Stop Vamsas Session -label.collect_garbage = Collect Garbage -label.show_memory_usage = Show Memory Usage -label.show_java_console = Show Java Console -label.show_jalview_news = Show Jalview News -label.take_snapshot = Take snapshot -label.monospaced_fonts_faster_to_render = Monospaced fonts are faster to render -label.anti_alias_fonts = Anti-alias Fonts (Slower to render) -label.monospaced_font= Monospaced -label.quality = Quality -label.maximize_window = Maximize Window -label.conservation = Conservation -label.consensus = Consensus -label.histogram = Histogram -label.logo = Logo -label.non_positional_features = List Non-positional Features -label.database_references = List Database References -label.share_selection_across_views = Share selection across views -label.scroll_highlighted_regions = Scroll to highlighted regions -label.gap_symbol = Gap Symbol -label.prot_alignment_colour = Protein Alignment Colour -label.nuc_alignment_colour = Nucleotide Alignment Colour -label.address = Address -label.port = Port -label.default_browser_unix = Default Browser (Unix) -label.send_usage_statistics = Send usage statistics -label.check_for_questionnaires = Check for questionnaires -label.check_for_latest_version = Check for latest version -label.url_linkfrom_sequence_id = URL link from Sequence ID -label.use_proxy_server = Use a proxy server -label.eps_rendering_style = EPS rendering style -label.append_start_end = Append /start-end (/15-380) -label.full_sequence_id = Full Sequence Id -label.smooth_font = Smooth Font -label.autocalculate_consensus = AutoCalculate Consensus -label.pad_gaps = Pad Gaps -label.pad_gaps_when_editing = Pad Gaps When Editing -label.automatically_set_id_width = Automatically set ID width -label.figure_id_column_width = Figure ID column width -label.use_modeller_output = Use Modeller Output -label.wrap_alignment = Wrap Alignment -label.right_align_ids = Right Align Ids -label.sequence_name_italics = Italic Sequence Ids -label.open_overview = Open Overview -label.default_colour_scheme_for_alignment = Default Colour Scheme for alignment -label.annotation_shading_default = Annotation Shading Default -label.default_minimum_colour_annotation_shading = Default Minimum Colour for annotation shading -label.default_maximum_colour_annotation_shading = Default Maximum Colour for annotation shading -label.visual = Visual -label.connections = Connections -label.output = Output -label.editing = Editing -label.das_settings = DAS Settings -label.web_services = Web Services -label.right_click_to_edit_currently_selected_parameter = Right click to edit currently selected parameter. -label.let_jmol_manage_structure_colours = Let Jmol manage structure colours -label.let_chimera_manage_structure_colours = Let Chimera manage structure colours -label.marks_leaves_tree_not_associated_with_sequence = Marks leaves of tree not associated with a sequence -label.index_web_services_menu_by_host_site = Index web services in menu by the host site -label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up = Check this option if you want to be informed
    when a web service URL cannot be accessed by Jalview
    when it starts up -label.new_service_url = New Service URL -label.edit_service_url = Edit Service URL -label.delete_service_url = Delete Service URL -label.details = Details -label.options = Options -label.parameters = Parameters -label.available_das_sources = Available DAS Sources -label.full_details = Full Details -label.authority = Authority -label.type = Type -label.proxy_server = Proxy Server -label.file_output = File Output -label.select_input_type = Select input type -label.set_options_for_type = Set options for type -label.data_input_parameters = Data input parameters -label.data_returned_by_service = Data returned by service -label.rsbs_encoded_service = RSBS Encoded Service -label.parsing_errors = Parsing errors -label.simple_bioinformatics_rest_services = Simple Bioinformatics Rest Services -label.web_service_discovery_urls = Web Service Discovery URLS -label.input_parameter_name = Input Parameter name -label.short_descriptive_name_for_service = Short descriptive name for service -label.function_service_performs = What kind of function the service performs (e.g. alignment, analysis, search, etc). -label.brief_description_service = Brief description of service -label.url_post_data_service = URL to post data to service. Include any special parameters needed here -label.optional_suffix = Optional suffix added to URL when retrieving results from service -label.preferred_gap_character = Which gap character does this service prefer? -label.gap_character = Gap character -label.move_return_type_up_order= Move return type up order -label.move_return_type_down_order= Move return type down order -label.update_user_parameter_set = Update this existing user parameter set -label.delete_user_parameter_set = Delete the currently selected user parameter set -label.create_user_parameter_set = Create a new parameter set with the current settings. -label.revert_changes_user_parameter_set = Undo all changes to the current parameter set -label.start_job_current_settings = Start Job with current settings -label.cancel_job_close_dialog = Close this dialog and cancel job -label.input_output = Input/Output -label.cut_paste = Cut'n'Paste -label.adjusting_parameters_for_calculation = Adjusting parameters for existing Calculation -label.2d_rna_structure_line = 2D RNA {0} (alignment) -label.2d_rna_sequence_name = 2D RNA - {0} -label.edit_name_and_description_current_group = Edit name and description of current group. -label.view_structure_for = View structure for {0} -label.view_all_structures = View all {0} structures. -label.view_all_representative_structures = View all {0} representative structures. -label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Opens a new structure viewer with all representative structures\nassociated with the current selection\nsuperimposed with the current alignment. -label.associate_structure_with_sequence = Associate Structure with Sequence -label.from_file = from file -label.enter_pdb_id = Enter PDB Id -label.discover_pdb_ids = Discover PDB ids -label.text_colour = Text Colour -label.structure = Structure -label.view_structure = View Structure -label.view_protein_structure = View Protein Structure -label.view_rna_structure = View Nucleotide Structure -label.clustalx_colours = Clustalx colours -label.above_identity_percentage = Above % Identity -label.create_sequence_details_report_annotation_for = Annotation for {0} -label.sequence_details_for = Sequence Details for {0} -label.sequence_name = Sequence Name -label.sequence_description = Sequence Description -label.edit_sequence_name_description = Edit Sequence Name/Description -label.spaces_converted_to_backslashes = Spaces have been converted to _ -label.no_spaces_allowed_sequence_name = No spaces allowed in Sequence Name -label.select_outline_colour = Select Outline Colour -label.web_browser_not_found_unix = Unixers\: Couldn't find default web browser.\nAdd the full path to your browser in Preferences." -label.web_browser_not_found = Web browser not found -label.select_pdb_file_for = Select a PDB file for {0} -label.html = HTML -label.wrap = Wrap -label.show_database_refs = Show Database Refs -label.show_non_positional_features = Show Non-Positional Features -label.save_png_image = Save As PNG Image -label.load_tree_for_sequence_set = Load a tree for this sequence set -label.export_image = Export Image -label.vamsas_store = VAMSAS store -label.translate_cDNA = Translate as cDNA -label.linked_view_title = Linked cDNA and protein view -label.align = Align -label.extract_scores = Extract Scores -label.get_cross_refs = Get Cross-References -label.sort_alignment_new_tree = Sort Alignment With New Tree -label.add_sequences = Add Sequences -label.new_window = New Window -label.split_window = Split Window -label.refresh_available_sources = Refresh Available Sources -label.use_registry = Use Registry -label.add_local_source = Add Local Source -label.set_as_default = Set as Default -label.show_labels = Show labels -label.background_colour = Background Colour -label.associate_nodes_with = Associate Nodes With -label.jalview_pca_calculation = Jalview PCA Calculation -label.link_name = Link Name -label.pdb_file = PDB file -label.colour_with_jmol = Colour with Jmol -label.colour_with_chimera = Colour with Chimera -label.align_structures = Align structures -label.jmol = Jmol -label.chimera = Chimera -label.sort_alignment_by_tree = Sort Alignment By Tree -label.mark_unlinked_leaves = Mark Unlinked Leaves -label.associate_leaves_with = Associate Leaves With -label.save_colour_scheme_with_unique_name_added_to_colour_menu = Save your colour scheme with a unique name and it will be added to the Colour menu -label.case_sensitive = Case Sensitive -label.lower_case_colour = Lower Case Colour -label.index_by_host = Index by host -label.index_by_type = Index by type -label.enable_jabaws_services = Enable JABAWS Services -label.display_warnings = Display warnings -label.move_url_up = Move URL up -label.move_url_down = Move URL down -label.add_sbrs_definition = Add a SBRS definition -label.edit_sbrs_definition = Edit SBRS definition -label.delete_sbrs_definition = Delete SBRS definition -label.your_sequences_have_been_verified = Your sequences have been verified against known sequence databases. Some of the ids have been\n altered, most likely the start/end residue will have been updated.\n Save your alignment to maintain the updated id.\n\n -label.sequence_names_updated = Sequence names updated -label.dbref_search_completed = DBRef search completed -label.show_all_chains = Show all chains -label.fetch_all_param = Fetch all {0} -label.paste_new_window = Paste To New Window -label.settings_for_param = Settings for {0} -label.view_params = View {0} -label.all_views = All Views -label.align_sequences_to_existing_alignment = Align sequences to an existing alignment -label.realign_with_params = Realign with {0} -label.calcname_with_default_settings = {0} with Defaults -label.action_with_default_settings = {0} with default settings -label.edit_settings_and_run = Edit settings and run... -label.view_and_change_parameters_before_alignment = View and change the parameters before alignment -label.run_with_preset_params = Run {0} with preset -label.view_and_change_parameters_before_running_calculation = View and change parameters before running calculation -label.view_documentation = View documentation -label.select_return_type = Select return type -label.translation_of_params = Translation of {0} -label.features_for_params = Features for - {0} -label.annotations_for_params = Annotations for - {0} -label.generating_features_for_params = Generating features for - {0} -label.generating_annotations_for_params = Generating annotations for - {0} -label.varna_params = VARNA - {0} -label.sequence_feature_settings = Sequence Feature Settings -label.pairwise_aligned_sequences = Pairwise Aligned Sequences -label.original_data_for_params = Original Data for {0} -label.points_for_params = Points for {0} -label.transformed_points_for_params = Transformed points for {0} -label.graduated_color_for_params = Graduated Feature Colour for {0} -label.select_backgroud_colour = Select Background Colour -label.invalid_font = Invalid Font -label.separate_multiple_accession_ids = Enter one or more PDB Ids -label.separate_multiple_query_values = Enter one or more {0}s separated by a semi-colon ";" -label.search_all = Enter one or more search values separated by a semi-colon ";" (Note: This Searches the entire PDB database) -label.replace_commas_semicolons = Replace commas with semi-colons -label.parsing_failed_syntax_errors_shown_below_param = Parsing failed. Syntax errors shown below {0} -label.parsing_failed_unrecoverable_exception_thrown_param = \nParsing failed. An unrecoverable exception was thrown\:\n {0} -label.example_query_param = Example query: {0} -label.enter_value_increase_conservation_visibility = Enter value to increase conservation visibility -label.enter_percentage_identity_above_which_colour_residues = Enter % identity above which to colour residues -label.wswublast_client_credits = To display sequence features an exact Uniprot id with 100% sequence identity match must be entered.\nIn order to display these features, try changing the names of your sequences to the ids suggested below.\n\nRunning WSWUBlast at EBI.\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R.\nSOAP-based services provided by the European Bioinformatics Institute.\nNucleic Acids Res. 33(1)\:W25-W28 (2005)); -label.blasting_for_unidentified_sequence = BLASTing for unidentified sequences -label.select_columns_containing = Select columns containing -label.select_columns_not_containing = Select columns that do not contain -option.trim_retrieved_seqs = Trim retrieved sequences -label.trim_retrieved_sequences = When the reference sequence is longer than the sequence that you are working with, only keep the relevant subsequences. -label.use_sequence_id_1 = Use $SEQUENCE_ID$ or $SEQUENCE_ID=//=$ -label.use_sequence_id_2 = \nto embed sequence id in URL -label.ws_parameters_for = Parameters for {0} -label.switch_server = Switch server -label.choose_jabaws_server = Choose a server for running this service -label.services_at = Services at {0} -label.rest_client_submit = {0} using {1} -label.fetch_retrieve_from =Retrieve from {0} -label.fetch_retrieve_from_all_sources = Retrieve from all {0} sources in {1}
    First is :{2} -#label.feature_settings_click_drag = Click/drag feature types up or down to change render order.
    Double click to select columns containing feature in alignment/current selection
    Pressing Alt will select columns outside features rather than inside
    Pressing Shift to modify current selection (rather than clear current selection)
    Press CTRL or Command/Meta to toggle columns in/outside features
    -label.feature_settings_click_drag = Drag up or down to change render order.
    Double click to select columns containing feature. -label.transparency_tip = Adjust transparency to 'see through' feature colours. -label.opt_and_params_further_details = see further details by right-clicking -label.opt_and_params_show_brief_desc_image_link = Click to show brief description
    Right click for further information. -label.opt_and_params_show_brief_desc = Click to show brief description
    -label.adjusts_width_generated_eps_png = Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed -label.manually_specify_width_left_column = Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set -label.job_created_when_checked = When checked, a job is created for every sequence in the current selection. -label.when_checked_job_visible_region_and_results = When checked, a single job is created for the visible region and results mapped back onto their location in the alignment. Otherwise, a job would be created for every contiguous region visible in the alignment or current selection (e.g. a multiple alignment). -label.flat_file_representation = Flat file representation of this rest service using the Really Simple Bioinformatics Service formalism -label.result_of_parsing_rsbs = Results of parsing the RSBS representation -label.user_preset = User Preset -label.service_preset = Service Preset -label.run_with_preset = Run {0} with preset -label.view_service_doc_url = View {1} -label.submit_sequence = Submit {0} {1} {2} {3} to
    {4} -action.by_title_param = by {0} -label.alignment = Alignment -label.secondary_structure_prediction = Secondary Structure Prediction -label.sequence_database_search = Sequence Database Search -label.analysis = Analysis -label.protein_disorder = Protein Disorder -label.source_from_db_source = Sources from {0} -label.from_msname = from {0} -label.superpose_with = Superpose with ... -action.do = Do -label.scale_label_to_column = Scale Label to Column -label.add_new_row = Add New Row -label.edit_label_description = Edit Label/Description -label.hide_row = Hide This Row -label.delete_row = Delete This Row -label.show_all_hidden_rows = Show All Hidden Rows -label.export_annotation = Export Annotation -label.copy_consensus_sequence = Copy Consensus Sequence -label.helix = Helix -label.sheet = Sheet -label.rna_helix = RNA Helix -label.remove_annotation = Remove Annotation -label.colour_by = Colour by... -label.muscle_multiple_protein_sequence_alignment = Muscle Multiple Protein Sequence Alignment -label.mafft_multiple_sequence_alignment = MAFFT Multiple Sequence Alignment -label.clustalw_multiple_sequence_alignment = ClustalW Multiple Sequence Alignment -label.jnet_secondary_structure_prediction = JNet Secondary Structure Prediction -label.multiharmony = Multi-Harmony -label.unable_start_web_service_analysis = Unable to start web service analysis -label.job_couldnt_be_started_check_input = The Job couldn't be started. Please check your input, and the Jalview console for any warning messages. -label.prompt_each_time = Prompt each time -label.use_source = Use Source -label.couldnt_save_project = Couldn't save project -label.error_whilst_saving_current_state_to = Error whilst saving current state to {0} -label.error_whilst_loading_project_from = Error whilst loading project from {0} -label.couldnt_load_project = Couldn't load project -label.pca_sequences_not_aligned = The sequences must be aligned before calculating PCA.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. -label.invalid_name_preset_exists = Invalid name - preset already exists. -label.invalid_name = Invalid name -label.set_proxy_settings = Please set up your proxy settings in the 'Connections' tab of the Preferences window -label.proxy_authorization_failed = Proxy Authorization Failed -label.internal_jalview_error = Internal Jalview Error -label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located. -label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service\! -label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown -label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service\! -label.seq_search_service_is_unknown = The Sequence Search Service named {0} is unknown -label.feature_type = Feature Type -label.display = Display -label.service_url = Service URL -label.copied_sequences = Copied sequences -label.cut_sequences = Cut Sequences -label.conservation_colour_increment = Conservation Colour Increment ({0}) -label.percentage_identity_thereshold = Percentage Identity Threshold ({0}) -label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User Colour scheme dialog -label.save_alignment_to_file = Save Alignment to file -label.save_features_to_file = Save Features to File -label.save_annotation_to_file = Save Annotation to File -label.no_features_on_alignment = No features found on alignment -label.save_pdb_file = Save PDB File -label.save_text_to_file = Save Text to File -label.save_state = Save State -label.restore_state = Restore State -label.saving_jalview_project = Saving jalview project {0} -label.loading_jalview_project = Loading jalview project {0} -label.save_vamsas_document_archive = Save Vamsas Document Archive -label.saving_vamsas_doc = Saving VAMSAS Document to {0} -label.load_feature_colours = Load Feature Colours -label.save_feature_colours = Save Feature Colour Scheme -label.dataset_for = {0} Dataset for {1} -label.select_startup_file = Select startup file -label.select_default_browser = Select default web browser -label.save_tree_as_newick = Save tree as newick file -label.create_eps_from_tree = Create EPS file from tree -label.create_png_from_tree = Create PNG image from tree -label.save_colour_scheme = Save colour scheme -label.edit_params_for = Edit parameters for {0} -label.choose_filename_for_param_file = Choose a filename for this parameter file -label.save_as_html = Save as HTML -label.recently_opened = Recently Opened -label.blasting_for_unidentified_sequence_jobs_running = BLASTing for unidentified sequences - {0} jobs running. -label.tree_from = Tree from {0} -label.webservice_job_title = {0} using {1} -label.select_visible_region_of = selected {0} region of {1} -label.visible = Visible -label.select_unselect_visible_regions_from = select and unselected {0} regions from {1} -label.visible_region_of = visible region of -label.webservice_job_title_on = {0} using {1} on {2} -label.updating_vamsas_session = Updating vamsas session -label.loading_file = Loading File: {0} -label.edit_params = Edit {0} -error.not_implemented = Not implemented -error.no_such_method_as_clone1_for = No such method as clone1 for {0} -error.null_from_clone1 = Null from clone1! -error.implementation_error_sortbyfeature = Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY. -error.not_yet_implemented = Not yet implemented -error.unknown_type_dna_or_pep = Unknown Type {0} - dna or pep are the only allowed values. -error.implementation_error_dont_know_thereshold_annotationcolourgradient = Implementation error: don't know about threshold setting for current AnnotationColourGradient. -error.implementation_error_embeddedpopup_not_null = Implementation error - embeddedPopup must be non-null -error.invalid_colour_for_mycheckbox = Invalid color for MyCheckBox -error.implementation_error_unrecognised_render_object_for_features_type = Implementation Error: Unrecognised render object {0} for features of type {1} -error.implementation_error_unsupported_feature_colour_object = Implementation error: Unsupported feature colour object. -error.invalid_separator_parameter = Invalid separator parameter - must be non-zero length -error.alignment_cigararray_not_implemented = Alignment(CigarArray) not yet implemented -error.weak_sequencei_equivalence_not_yet_implemented = Weak sequenceI equivalence not yet implemented. -error.implementation_error_can_only_make_alignmnet_from_cigararray = Implementation Error - can only make an alignment view from a CigarArray of sequences. -error.empty_view_cannot_be_updated = empty view cannot be updated. -error.mismatch_between_number_of_sequences_in_block = Mismatch between number of sequences in block {0} ({1}) and the original view ({2}) -error.padding_not_yet_implemented = Padding not yet implemented -error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks={0}) -error.unknown_seq_cigar_operation = Unknown SeqCigar operation {0} -error.implementation_bug_parse_cigar_string = Implementation bug in parseCigarString -error.implementation_error_invalid_operation_string = Implementation error. Invalid operation string. -error.invalid_range_string = Invalid range string (must be zero or positive number) -error.implementation_error_delete_range_out_of_bounds = Implementation Error: deleteRange out of bounds: start must be non-negative and less than end. -error.implementation_error = Implementation error -error.implementation_error_unknown_operation = Implementation Error! Unknown operation {0} -error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Implementation Error - unexpected null from getSequenceAndDeletions -error.implementation_error_set_seq_null = Implementation Error - _setSeq(null,...) -error.implementation_error_s = Implementation Error: _s= {0} -error.implementation_error_seqcigar_possible = SeqCigar: Possible implementation error: sequence is longer than dataset sequence -error.implmentation_bug_seq_null = Implementation Bug. Null seq -error.implementation_bug_cigar_operation_list_range_list = Implementation Bug. Cigar Operation list!= range list -error.not_yet_implemented_cigar_object_from_cigar_string = NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence. -error.implementation_bug_cigar_operation = Implementation Bug. Cigar Operation {0} {1} not one of {2}, {3}, or {4}. -error.implementation_error_for_new_cigar = Implementation error for new Cigar(SequenceI) -error.implementation_error_cigar_seq_no_operations = Implementation error: {0}th sequence Cigar has no operations. -error.implementation_error_jmol_getting_data = Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016 -error.implementation_error_no_pdbentry_from_index = Implementation error - no corresponding pdbentry (for index {0}) to add sequences mappings to -error.jmol_version_not_compatible_with_jalview_version = Jmol version {0} is not compatible with this version of Jalview. Report this problem at issues.jalview.org -error.not_implemented_remove = Remove: Not implemented -error.not_implemented_clone = Clone: Not implemented -error.implementation_error_chimera_getting_data = Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016 -error.call_setprogressbar_before_registering_handler = call setProgressBar before registering the progress bar's handler. -label.cancelled_params = Cancelled {0} -error.implementation_error_cannot_show_view_alignment_frame = Implementation error: cannot show a view from another alignment in an AlignFrame. -error.implementation_error_dont_know_about_thereshold_setting = Implementation error: don't know about threshold setting for current AnnotationColourGradient. -error.eps_generation_not_implemented = EPS Generation not yet implemented -error.png_generation_not_implemented = PNG Generation not yet implemented -error.try_join_vamsas_session_another = Trying to join a vamsas session when another is already connected -error.invalid_vamsas_session_id = Invalid vamsas session id -error.implementation_error_cannot_create_groovyshell = Implementation Error. Cannot create groovyShell without Groovy on the classpath! -label.groovy_support_failed = Jalview Groovy Support Failed -label.couldnt_create_groovy_shell = Couldn't create the groovy Shell. Check the error log for the details of what went wrong. -error.unsupported_version_calcIdparam = Unsupported Version for calcIdparam {0} -error.implementation_error_cant_reorder_tree = Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode. -error.invalid_value_for_option = Invalid value {0} for option {1} -error.implementation_error_cannot_import_vamsas_doc = Implementation Error - cannot import existing vamsas document into an existing session, Yet! -label.vamsas_doc_couldnt_be_opened_as_new_session = VAMSAS Document could not be opened as a new session - please choose another -error.implementation_error_vamsas_operation_not_init = Impementation error! Vamsas Operations when client not initialised and connected -error.jalview_no_connected_vamsas_session = Jalview not connected to Vamsas session -error.implementation_error_cannot_recover_vamsas_object_mappings = IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made -error.setstatus_called_non_existent_job_pane = setStatus called for non-existent job pane {0} -error.implementation_error_cannot_find_marshaller_for_param_set =Implementation error: Can't find a marshaller for the parameter set -error.implementation_error_old_jalview_object_not_bound =IMPLEMENTATION ERROR: old jalview object is not bound ! ({0}) -error.implementation_error_vamsas_doc_class_should_bind_to_type = Implementation Error: Vamsas Document Class {0} should bind to a {1} (found a {2}) -error.implementation_error_jalview_class_should_bind_to_type = Implementation Error: Jalview Class {0} should bind to a {1} (found a {2}) -error.invalid_vamsas_rangetype_cannot_resolve_lists = Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice! -error.implementation_error_maplist_is_null = Implementation error. MapList is null for initMapType. -error.implementation_error_cannot_have_null_alignment = Implementation error: Cannot have null alignment property key -error.implementation_error_null_fileparse = Implementation error. Null FileParse in copy constructor -error.implementation_error_cannot_map_alignment_sequences = IMPLEMENTATION ERROR: Cannot map an alignment of sequences from different datasets into a single alignment in the vamsas document. -error.implementation_error_cannot_duplicate_colour_scheme = Serious implementation error: cannot duplicate colourscheme {0} -error.implementation_error_structure_selection_manager_null = Implementation error. Structure selection manager's context is 'null' -exception.ssm_context_is_null = SSM context is null -error.idstring_seqstrings_only_one_per_sequence = idstrings and seqstrings contain one string each per sequence -error.cannot_have_mixed_length_replacement_vectors = Cannot have mixed length replacement vectors. Replacement vector for {0} is {1} strings long, and have already seen a {2} length vector. -error.cannot_have_zero_length_vector_replacement_strings = Cannot have zero length vector of replacement strings - either 1 value or n values. -error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = Implementation Error! Multiple single sequence prediction jobs are not yet supported -error.implementation_error_invalid_msa_index_for_job =Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object! -error.implementation_error_startjob_called = Implementation error - StartJob(JpredJob) called on {0} -error.multiple_jnet_subjob_merge_not_implemented = Multiple JNet subjob merging not yet implemented -label.job_never_ran = Job never ran - input returned to user. -error.implementation_error_minlen_must_be_greater_zero = Implementation error: minlen must be zero or more -error.implementation_error_msawbjob_called = Implementation error - StartJob(MsaWSJob) called on a WSJobInstance {0} -error.implementation_error_cannot_attach_ws_menu_entry = IMPLEMENTATION ERROR: cannot attach WS Menu Entry without service handle reference! -error.parameter_migration_not_implemented_yet = Parameter migration not implemented yet -error.implementation_error_cannot_set_jaba_option = Implementation error: cannot set Jaba Option to a value outside its allowed value range! -error.implementation_error_valuetype_doesnt_support_jabaws_type = IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type : {0} -error.cannot_create_jabaws_param_set = Cannot create a JabaWSParamSet from non-JabaWS parameters -error.cannot_set_arguments_to_jabaws_param_set = Cannot set arguments to a JabaWSParamSet that are not JabaWS arguments -error.implementation_error_runner_config_not_available = Implementation Error: Runner Config not available for a JABAWS service of type {0} ({1}) -error.implementation_error_cannot_handle_jaba_param = Implementation Error: Cannot handle Jaba parameter object {0} -error.implementation_error_attempt_to_delete_service_preset = Implementation error: Attempt to delete a service preset! -error.implementation_error_cannot_locate_oldname_presetname = Implementation error: Can't locate either oldname ({0}) or presetName ({1}in the datastore!" -error.implementation_error_jabaws_param_set_only_handled_by = Implementation error: JabaWsParamSets can only be handled by JabaParamStore -error.cannot_set_source_file_for = Cannot set source file for {0} -error.mismatch_service_instance_preset = Probable mismatch between service instance and preset! -error.cannot_set_params_for_ws_preset = Cannot set Parameters for a Jaba Web service's preset -error.implementation_error_can_only_instantiate_jaba_param_sets = Implementation error: Can only instantiate Jaba parameter sets -error.no_aacon_service_found = No AACon service found -error.implementation_error_couldnt_copy_value_constraint = Implementation error: could not copy ValueConstrain! -error.couldnt_encode_as_utf8 = Couldn't encode {0} as UTF-8. -error.tree_inputtype_not_yet_implemented = Tree InputType not yet implemented -error.implementation_error_need_to_have_httpresponse = Implementation Error: need to have an HttpResponse to process -error.dbrefsource_implementation_exception =DBRefSource Implementation Exception -error.implementation_error_dbinstance_must_implement_interface = Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given{0}) -error.implementation_error_must_init_dbsources =Implementation error. Must initialise dbSources -label.view_controller_toggled_marked = {0} {1} columns {2} containing features of type {3} across {4} sequence(s) -label.toggled = Toggled -label.marked = Marked -label.not = not -label.no_feature_of_type_found = No features of type {0} found. -label.submission_params = Submission {0} -label.empty_alignment_job = Empty Alignment Job -label.add_new_sbrs_service = Add a new Simple Bioinformatics Rest Service -label.edit_sbrs_entry = Edit Simple Bioinformatics Rest Service entry -label.pca_recalculating = Recalculating PCA -label.pca_calculating = Calculating PCA -label.select_foreground_colour = Choose foreground colour -label.select_colour_for_text = Select Colour for Text -label.adjunst_foreground_text_colour_thereshold = Adjust Foreground Text Colour Threshold -label.select_subtree_colour = Select Sub-Tree Colour -label.create_new_sequence_features = Create New Sequence Feature(s) -label.amend_delete_features = Amend/Delete Features for {0} -exception.out_of_bounds_for_file = Out of bounds for file: i={0}, Final Buffer: i0={1} iend={2} -exception.null_string_given_to_regex_search = Null String Given to Regex.search -exception.null_string_like_given_to_regex_search = Null StringLike Given to Regex.search -exception.null_string_given_to_regex_reverse_search = Null String Given to Regex.reverseSearch -exception.null_string_like_given_to_regex_reverse_search = Null StringLike Given to Regex.reverseSearch -exception.null_string_like_given_to_regex_search_from = Null String Given to Regex.searchFrom -exception.null_string_like_given_to_regex_search_region = Null String Given to Regex.searchRegion -exception.replace_null_regex_pointer = Replacer has null Regex pointer -exception.bad_pattern_to_regex_perl_code = bad pattern to Regex.perlCode: {0} -exception.no_stub_implementation_for_interface = There is no stub implementation for the interface: {0} -exception.cannot_set_endpoint_address_unknown_port = Cannot set Endpoint Address for Unknown Port {0} -exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Querying matching opening parenthesis for non-closing parenthesis character {0} -exception.mismatched_unseen_closing_char = Mismatched (unseen) closing character {0} -exception.mismatched_closing_char = Mismatched closing character {0} -exception.mismatched_opening_char = Mismatched opening character {0} at {1} -exception.invalid_datasource_couldnt_obtain_reader = Invalid datasource. Could not obtain Reader -exception.index_value_not_in_range = {0}: Index value {1} not in range [0..{2}] -exception.unterminated_cigar_string = Unterminated cigar string -exception.unexpected_operation_cigar_string_pos = Unexpected operation {0} in cigar string (position {1} in {2} -exception.couldnt_parse_responde_from_annotated3d_server = Couldn't parse response from Annotate3d server -exception.application_test_npe = Application test: throwing an NullPointerException It should arrive at the console -exception.overwriting_vamsas_id_binding = Overwriting vamsas id binding -exception.overwriting_jalview_id_binding = Overwriting jalview id binding -error.implementation_error_unknown_file_format_string = Implementation error: Unknown file format string -exception.failed_to_resolve_gzip_stream = Failed to resolve GZIP stream -exception.problem_opening_file_also_tried = Problem opening {0} (also tried {1}) : {2} -exception.problem_opening_file = Problem opening {0} : {1} -exception.failed_to_read_data_from_source = Failed to read data from source: {0} -exception.no_init_source_stream = Unitialised Source Stream -exception.invalid_source_stream = Invalid Source Stream: {0} -error.implementation_error_reset_called_for_invalid_source = Implementation Error: Reset called for invalid source. -exception.number_of_residues_in_query_sequence_differ_from_prediction = Number of residues in {0} supposed query sequence ({1}\n{2})\ndiffer from number of prediction sites in prediction ({3}) -label.mapped = mapped -exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: Entry ({0}) has an unexpected number of columns -exception.couldnt_parse_concise_annotation_for_prediction = Couldn't parse concise annotation for prediction profile.\n{0} -exception.newfile = NewickFile\: {0}\n -label.no_tree_read_in = No Tree read in -exception.rnaml_couldnt_access_datasource = Couldn't access datasource ({0}) -exception.ranml_couldnt_process_data = Couldn't process data as RNAML file ({0}) -exception.ranml_invalid_file = Invalid RNAML file ({0}) -exception.ranml_problem_parsing_data = Problem parsing data as RNAML ({0}) -exception.pfam_no_sequences_found = No sequences found (PFAM input) -exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM' -exception.couldnt_parse_sequence_line = Could not parse sequence line: {0} -exception.error_parsing_line = Error parsing {0} -exception.unknown_annotation_detected = Unknown annotation detected: {0} {1} -exception.couldnt_store_sequence_mappings = Couldn't store sequence mappings for {0} -exception.matrix_too_many_iteration = Too many iterations in {0} (max is {1}) -exception.browser_not_found = Exception in finding browser: {0} -exception.browser_unable_to_locate = Unable to locate browser: {0} -exception.invocation_target_exception_creating_aedesc = InvocationTargetException while creating AEDesc: {0} -exception.illegal_access_building_apple_evt= IllegalAccessException while building AppleEvent: {0} -exception.instantiation_creating_aedesc = InstantiationException while creating AEDesc: {0} -exception.unable_to_launch_url = Unable to launch URL: {0} -exception.unable_to_create_internet_config = Unable to create an Internet Config instance: {0} -exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0} -exception.illegal_access_calling_url = IllegalAccessException while calling openURL: {0} -exception.interrupted_launching_browser = InterruptedException while launching browser: {0} -exception.das_source_doesnt_support_sequence_command = Source {0} does not support the sequence command. -exception.invalid_das_source = Invalid das source: {0} -exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1} -label.no_embl_record_found = # No EMBL record retrieved for {0}:{1} -label.embl_successfully_parsed = # Successfully parsed the {0} queries into an Alignment -exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1} -exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data -exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment -exception.unknown_format_for_file = Unknown format {0} for file \: \n{1} -label.remove_gaps = Remove Gaps -exception.couldnt_recover_sequence_props_for_jnet_query = Couldn't recover sequence properties for JNet Query sequence! -exception.server_timeout_try_later = Server timed out - try again later\n -exception.web_service_returned_null_try_later= Server at {0} returned null object, it probably cannot be contacted. Try again later. -exception.cannot_contact_service_endpoint_at = Cannot contact service endpoint at {0} -error.implementation_error_cannot_find_service_url_in_given_set = Implementation error: Cannot find service url in the given url set! -error.implementation_error_cannot_find_service_url_in_given_set_param_store = Implementation error: Cannot find service url in the given url set for this service parameter store ({0}} -exception.jobsubmission_invalid_params_set = Invalid parameter set. Check Jalview implementation -exception.notvaliddata_group_contains_less_than_min_seqs = Group contains less than {0} sequences. -exception.outofmemory_loading_pdb_file = Out of memory loading PDB File -exception.eps_coudnt_write_output_file = Could not write to the output file: {0} -exception.eps_method_not_supported = Method not currently supported by EpsGraphics2D version {0} -exception.eps_unable_to_get_inverse_matrix = Unable to get inverse of matrix: {0} -warn.job_cannot_be_cancelled_close_window = This job cannot be cancelled.\nJust close the window. -warn.service_not_supported = Service not supported! -warn.input_is_too_big = Input is too big! -warn.invalid_job_param_set = Invalid job parameter set! -warn.oneseq_msainput_selection = The current selection only contains a single sequence. Do you want to submit all sequences for alignment instead ? -info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn't support this program.\n{0} -info.job_couldnt_be_run_exceeded_hard_limit = Job could not be run because it exceeded a hard limit on the server.\n{0} -info.job_couldnt_be_run_incorrect_param_setting = Job could not be run because some of the parameter settings are not supported by the server.\n{0}\nPlease check to make sure you have used the correct parameter set for this service\!\n -info.no_jobs_ran = No jobs ran -info.failed_to_submit_prediction = Failed to submit the prediction\:\n{0} {1} -info.invalid_jnet_job_result_data ={0}\n{1}\nInvalid JNet job result data\!\n{2} -info.failed_to_submit_sequences_for_alignment = Failed to submit sequences for alignment.\nIt is most likely that there is a problem with the server.\nJust close the window\n -info.alignment_object_method_notes = \nAlignment Object Method Notes\n -info.server_exception = \n{0} Server exception\!\n{1} -info.invalid_msa_input_mininfo = Need at least two sequences with at least 3 residues each, with no hidden regions between them. -info.invalid_msa_notenough = Not enough sequence data to align -status.processing_commandline_args = Processing commandline arguments... -status.das_features_being_retrived = DAS features being retrieved... -status.searching_for_sequences_from = Searching for sequences from {0} -status.finished_searching_for_sequences_from = Finished searching for sequences from {0} -label.eps_file = EPS file -label.png_image = PNG image -status.saving_file = Saving {0} -status.export_complete = Export complete. -status.fetching_pdb = Fetching PDB {0} -status.refreshing_news = Refreshing news -status.importing_vamsas_session_from = Importing VAMSAS session from {0} -status.opening_params = Opening {0} -status.waiting_sequence_database_fetchers_init = Waiting for Sequence Database Fetchers to initialise -status.init_sequence_database_fetchers = Initialising Sequence Database Fetchers -status.fetching_sequence_queries_from = Fetching {0} sequence queries from {1} -status.finshed_querying = Finished querying -status.parsing_results = Parsing results. -status.processing = Processing... -status.refreshing_web_service_menus = Refreshing Web Service Menus -status.collecting_job_results = Collecting job results. -status.fetching_das_sequence_features = Fetching DAS Sequence Features -status.no_das_sources_active = No DAS Sources Active -status.das_feature_fetching_cancelled = DAS Feature Fetching Cancelled -status.das_feature_fetching_complete = DAS Feature Fetching Complete -status.fetching_db_refs = Fetching db refs -status.loading_cached_pdb_entries = Loading Cached PDB Entries -status.searching_for_pdb_structures = Searching for PDB Structures -status.opening_file = opening file -status.colouring_chimera = Colouring Chimera -label.font_doesnt_have_letters_defined = Font doesn't have letters defined\nso cannot be used\nwith alignment data -label.font_too_small = Font size is too small -label.error_loading_file_params = Error loading file {0} -label.error_loading_jalview_file = Error loading Jalview file -warn.out_of_memory_when_action = Out of memory when {0}\!\!\nSee help files for increasing Java Virtual Machine memory. -warn.out_of_memory_loading_file = Out of memory loading file {0}\!\!\nSee help files for increasing Java Virtual Machine memory. -label.out_of_memory = Out of memory -label.invalid_id_column_width = Invalid ID Column width -warn.user_defined_width_requirements = The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide. -label.couldnt_create_sequence_fetcher = Couldn't create SequenceFetcher -warn.couldnt_create_sequence_fetcher_client = Could not create the sequence fetcher client. Check error logs for details. -warn.server_didnt_pass_validation = Service did not pass validation.\nCheck the Jalview Console for more details. -warn.url_must_contain = Sequence URL must contain $SEQUENCE_ID$ or a regex $SEQUENCE_ID=//=$ -info.validate_jabaws_server = Validate JabaWS Server ?\n(Look in console output for results) -label.test_server = Test Server? -info.you_want_jalview_to_find_uniprot_accessions = Do you want Jalview to find\nUniprot Accession ids for given sequence names? -label.find_uniprot_accession_ids = Find Uniprot Accession Ids -label.new_sequence_fetcher = New Sequence Fetcher -label.additional_sequence_fetcher = Additional Sequence Fetcher -label.select_database_retrieval_source = Select Database Retrieval Source -label.overwrite_existing_file = Overwrite existing file? -label.file_already_exists = File exists -label.edit_jabaws_url = Edit JABAWS URL -label.add_jabaws_url = Add new JABAWS URL -label.news_from_jalview = News from http://www.jalview.org -label.cut_paste_alignmen_file = Cut & Paste Alignment File -label.enter_redundancy_thereshold = Enter the redundancy threshold -label.select_dark_light_set_thereshold = Select a dark and light text colour, then set the threshold to
    switch between colours, based on background colour
    -label.select_feature_colour = Select Feature Colour -label.delete_all = Delete all sequences -warn.delete_all = Deleting all sequences will close the alignment window.
    Confirm deletion or Cancel. -label.add_annotations_for = Add annotations for -label.choose_annotations = Choose annotations -label.find = Find -label.invalid_search = Search string invalid -error.invalid_regex = Invalid regular expression -label.ignore_gaps_consensus = Ignore Gaps In Consensus -label.show_group_histogram = Show Group Histogram -label.show_group_logo = Show Group Logo -label.normalise_group_logo = Normalise Group Logo -label.show_histogram = Show Histogram -label.show_logo = Show Logo -label.normalise_logo = Normalise Logo -label.no_colour_selection_in_scheme = Please make a colour selection before applying colour scheme -label.no_colour_selection_warn = Error saving colour scheme -label.open_split_window? = Would you like to open as a split window, with cDNA and protein linked? -label.open_split_window = Open split window -label.no_mappings = No mappings found -label.mapping_failed = No sequence mapping could be made between the alignments.
    A mapping requires sequence names to match, and equivalent sequence lengths. -action.no = No -action.yes = Yes -label.for = for -label.select_by_annotation = Select/Hide Columns by Annotation -action.select_by_annotation = Select/Hide Columns by Annotation... -label.threshold_filter = Threshold Filter -action.hide = Hide -action.select = Select -label.alpha_helix = Alpha Helix -label.beta_strand = Beta Strand -label.turn = Turn -label.select_all = Select All -label.structures_filter = Structures Filter -label.search_filter = Search Filter -label.description = Description -label.include_description= Include Description -action.back = Back -label.hide_insertions = Hide Insertions -label.mark_as_representative = Mark as representative -label.open_jabaws_web_page = Open JABAWS web page -label.opens_the_jabaws_server_homepage = Opens the JABAWS server's homepage in web browser -label.pdb_sequence_getcher = PDB Sequence Fetcher -label.result = result -label.results = results -label.structure_chooser = Structure Chooser -label.select = Select : -label.invert = Invert -label.select_pdb_file = Select PDB File -info.select_filter_option = Select Filter Option/Manual Entry -info.associate_wit_sequence = Associate with Sequence -label.search_result = Search Result -label.found_structures_summary = Found Structures Summary -label.configure_displayed_columns = Configure Displayed Columns -label.start_jalview = Start Jalview -label.biojs_html_export = BioJS -label.scale_as_cdna = Scale protein residues to codons -label.scale_protein_to_cdna = Scale Protein to cDNA -label.scale_protein_to_cdna_tip = Make protein residues same width as codons in split frame views -info.select_annotation_row = Select Annotation Row -info.enter_search_text_here = Enter Search Text Here -info.enter_search_text_to_enable = Enter Search Text to Enable -info.search_in_annotation_label = Search in {0} Label -info.search_in_annotation_description = Search in {0} Description -info.change_threshold_mode_to_enable = Change Threshold Mode to Enable +action.refresh_services = Refresh Services +action.reset_services = Reset Services +action.merge_results = Merge Results +action.load_scheme = Load scheme +action.save_scheme = Save scheme +action.save_image = Save Image +action.paste = Paste +action.show_html_source = Show HTML Source +action.print = Print +action.web_service = Web Service +action.cancel_job = Cancel Job +action.start_job = Start Job +action.revert = Revert +action.move_down = Move Down +action.move_up = Move Up +action.remove_return_datatype = Remove return datatype +action.add_return_datatype = Add return datatype +action.remove_input_parameter = Remove selected input parameter +action.add_input_parameter = Add input parameter +action.edit = Edit +action.new = New +action.open_file = Open file +action.show_unconserved = Show Unconserved +action.open_new_alignment = Open new alignment +action.raise_associated_windows = Raise Associated Windows +action.minimize_associated_windows = Minimize Associated Windows +action.close_all = Close all +action.load_project = Load Project +action.save_project = Save Project +action.quit = Quit +action.expand_views = Expand Views +action.gather_views = Gather Views +action.page_setup = Page Setup +action.reload = Reload +action.load = Load +action.open = Open +action.cancel = Cancel +action.create = Create +action.update = Update +action.delete = Delete +action.snapshot = Snapshot +action.clear = Clear +action.accept = Accept +action.select_ddbb = --- Select Database --- +action.undo = Undo +action.redo = Redo +action.reset = Reset +action.remove_left = Remove left +action.remove_right = Remove right +action.remove_empty_columns = Remove Empty Columns +action.remove_all_gaps = Remove All Gaps +action.left_justify_alignment = Left Justify Alignment +action.right_justify_alignment = Right Justify Alignment +action.boxes = Boxes +action.text = Text +action.by_pairwise_id = by Pairwise Identity +action.by_id = by Id +action.by_length = by Length +action.by_group = by Group +action.unmark_as_reference = Unmark as Reference +action.set_as_reference = Set as Reference +action.remove = Remove +action.remove_redundancy = Remove Redundancy... +action.pairwise_alignment = Pairwise Alignments... +action.by_rna_helixes = by RNA Helices +action.user_defined = User Defined... +action.by_conservation = By Conservation +action.wrap = Wrap +action.show_gaps = Show Gaps +action.show_hidden_markers = Show Hidden Markers +action.find = Find +action.undefine_groups = Undefine Groups +action.create_groups = Create Groups +action.make_groups_selection = Make Groups For Selection +action.copy = Copy +action.cut = Cut +action.font = Font... +action.scale_above = Scale Above +action.scale_left = Scale Left +action.scale_right = Scale Right +action.by_tree_order = By Tree Order +action.sort = Sort +action.calculate_tree = Calculate Tree +action.help = Help +action.by_annotation = by Annotation... +action.invert_sequence_selection = Invert Sequence Selection +action.invert_column_selection = Invert Column Selection +action.show = Show +action.hide = Hide +action.ok = OK +action.set_defaults = Defaults +action.create_group = Create Group +action.remove_group = Remove Group +action.edit_group = Edit Group +action.border_colour = Border colour +action.edit_new_group = Edit New Group +action.hide_sequences = Hide Sequences +action.sequences = Sequences +action.ids = IDS +action.ids_sequences = IDS and sequences +action.reveal_all = Reveal All +action.reveal_sequences = Reveal Sequences +action.find_all = Find all +action.find_next = Find next +action.file = File +action.view = View +action.annotations = Annotations +action.change_params = Change Parameters +action.apply = Apply +action.apply_threshold_all_groups = Apply threshold to all groups +action.apply_all_groups = Apply to all Groups +action.by_chain = By Chain +action.by_sequence = By Sequence +action.paste_annotations = Paste Annotations +action.format = Format +action.select = Select +action.new_view = New View +action.close = Close +action.add = Add +action.save_as_default = Save as default +action.save_as = Save as +action.save = Save +action.cancel_fetch = Cancel Fetch +action.save_omit_hidden_columns = Save / Omit Hidden Regions +action.change_font = Change Font +action.change_font_tree_panel = Change Font (Tree Panel) +action.colour = Colour +action.calculate = Calculate +action.select_all = Select all +action.deselect_all = Deselect all +action.invert_selection = Invert selection +action.using_jmol = Using Jmol +action.link = Link +action.group_link = Group Link +action.show_chain = Show Chain +action.show_group = Show Group +action.fetch_db_references = Fetch DB References +action.view_flanking_regions = Show flanking regions +label.view_flanking_regions = Show sequence data either side of the subsequences involved in this alignment +label.str = Str: +label.seq = Seq: +label.structures_manager = Structures Manager +label.nickname = Nickname: +label.url = URL: +label.input_file_url = Enter URL or Input File +label.select_feature = Select feature: +label.name = Name +label.name_param = Name: {0} +label.group = Group +label.group_name = Group Name +label.group_description = Group Description +label.edit_group_name_description = Edit Group Name/Description +label.colour = Colour: +label.description = Description: +label.start = Start: +label.end = End: +label.current_parameter_set_name = Current parameter set name: +label.service_action = Service Action: +label.post_url = POST URL: +label.url_suffix = URL Suffix +label.sequence_source = Sequence Source +label.per_seq = per Sequence +label.result_vertically_separable = Results are vertically separable +label.amend = Amend +label.undo_command = Undo {0} +label.redo_command = Redo {0} +label.principal_component_analysis = Principal Component Analysis +label.average_distance_identity = Average Distance Using % Identity +label.neighbour_joining_identity = Neighbour Joining Using % Identity +label.treecalc_title = {0} Using {1} +label.tree_calc_av = Average Distance +label.tree_calc_nj = Neighbour Joining +label.select_score_model = Select score model +label.score_model_pid = % Identity +label.score_model_blosum62 = BLOSUM62 +label.score_model_pam250 = PAM 250 +label.score_model_conservation = Physicochemical property conservation +label.score_model_enhconservation = Physicochemical property conservation +label.status_bar = Status bar +label.out_to_textbox = Output to Textbox +label.clustalx = Clustalx +label.clustal = Clustal +label.zappo = Zappo +label.taylor = Taylor +label.blc = BLC +label.fasta = Fasta +label.msf = MSF +label.pfam = PFAM +label.pileup = Pileup +label.pir = PIR +label.hydrophobicity = Hydrophobicity +label.helix_propensity = Helix Propensity +label.strand_propensity = Strand Propensity +label.turn_propensity = Turn Propensity +label.buried_index = Buried Index +label.purine_pyrimidine = Purine/Pyrimidine +label.percentage_identity = Percentage Identity +label.blosum62 = BLOSUM62 +label.blosum62_score = BLOSUM62 Score +label.tcoffee_scores = T-Coffee Scores +label.average_distance_bloslum62 = Average Distance Using BLOSUM62 +label.neighbour_blosum62 = Neighbour Joining Using BLOSUM62 +label.show_annotations = Show annotations +label.hide_annotations = Hide annotations +label.show_all_seq_annotations = Show sequence related +label.hide_all_seq_annotations = Hide sequence related +label.show_all_al_annotations = Show alignment related +label.hide_all_al_annotations = Hide alignment related +label.hide_all = Hide all +label.add_reference_annotations = Add reference annotations +label.find_tip = Search alignment, selection or sequence ids for a subsequence (ignoring gaps).
    Accepts regular expressions - search Help for 'regex' for details. +label.colour_text = Colour Text +label.show_non_conversed = Show nonconserved +label.overview_window = Overview Window +label.none = None +label.above_identity_threshold = Above Identity Threshold +label.show_sequence_features = Show Sequence Features +label.nucleotide = Nucleotide +label.protein = Protein +label.to_new_alignment = To New Alignment +label.to_this_alignment = Add To This Alignment +label.apply_colour_to_all_groups = Apply Colour To All Groups +label.modify_identity_thereshold = Modify Identity Threshold... +label.modify_conservation_thereshold = Modify Conservation Threshold... +label.input_from_textbox = Input from textbox +label.centre_column_labels = Centre column labels +label.automatic_scrolling = Automatic Scrolling +label.documentation = Documentation +label.about = About... +label.show_sequence_limits = Show Sequence Limits +label.feature_settings = Feature Settings... +label.all_columns = All Columns +label.all_sequences = All Sequences +label.selected_columns = Selected Columns +label.selected_sequences = Selected Sequences +label.except_selected_sequences = All except selected sequences +label.all_but_selected_region = All but Selected Region (Shift+Ctrl+H) +label.selected_region = Selected Region +label.all_sequences_columns = All Sequences and Columns +label.hide_insertions = Hide columns gapped for selection +label.hide_selected_annotations = Hide selected annotations +label.show_selected_annotations = Show selected annotations +label.group_consensus = Group Consensus +label.group_conservation = Group Conservation +label.show_consensus_histogram = Show Consensus Histogram +label.show_consensus_logo = Show Consensus Logo +label.norm_consensus_logo = Normalise Consensus Logo +label.apply_all_groups = Apply to all groups +label.autocalculated_annotation = Autocalculated Annotation +label.show_first = Show first +label.show_last = Show last +label.struct_from_pdb = Process secondary structure from PDB +label.use_rnaview = Use RNAView for secondary structure +label.autoadd_secstr = Add secondary structure annotation to alignment +label.autoadd_temp = Add Temperature Factor annotation to alignment +label.structure_viewer = Default structure viewer +label.chimera_path = Path to Chimera program +label.chimera_path_tip = Jalview will first try any path entered here, else standard installation locations.
    Double-click to browse for file. +label.invalid_chimera_path = Chimera path not found or not executable +label.chimera_missing = Chimera structure viewer not found.
    Please enter the path to Chimera (if installed),
    or download and install UCSF Chimera. +label.chimera_failed = Error opening Chimera - is it installed?\nCheck path in Preferences, Structure +label.min_colour = Minimum Colour +label.max_colour = Maximum Colour +label.use_original_colours = Use Original Colours +label.threshold_minmax = Threshold is min/max +label.represent_group_with = Represent Group with {0} +label.selection = Selection +label.group_colour = Group Colour +label.sequence = Sequence +label.view_pdb_structure = View PDB Structure +label.min = Min: +label.max = Max: +label.colour_by_label = Colour by label +label.new_feature = New Feature +label.match_case = Match Case +label.view_alignment_editor = View in alignment editor +label.labels = Labels +label.output_values = Output Values... +label.output_points = Output points... +label.output_transformed_points = Output transformed points +label.input_data = Input Data... +label.nucleotide_matrix = Nucleotide matrix +label.protein_matrix = Protein matrix +label.show_bootstrap_values = Show Bootstrap Values +label.show_distances = Show distances +label.mark_unassociated_leaves = Mark Unassociated Leaves +label.fit_to_window = Fit To Window +label.newick_format = Newick Format +label.select_newick_like_tree_file = Select a newick-like tree file +label.colours = Colours +label.view_mapping = View Mapping +label.wireframe = Wireframe +label.depthcue = Depthcue +label.z_buffering = Z Buffering +label.charge_cysteine = Charge & Cysteine +label.all_chains_visible = All Chains Visible +label.successfully_added_features_alignment = Successfully added features to alignment +label.keyboard_editing_mode = Keyboard editing mode is {0} +label.paste_features_annotations_Tcoffee_here = Paste your features / annotations / T-coffee score file here. +label.removed_columns = Removed {0} columns. +label.removed_empty_columns = Removed {0} empty columns. +label.paste_newick_tree_file = Paste your Newick tree file here. +label.order_by_params = Order by {0} +label.html_content = {0} +label.paste_pdb_file= Paste your PDB file here. +label.paste_pdb_file_for_sequence = Paste PDB file for sequence {0} +label.could_not_parse_newick_file = Could not parse Newick file\!\n {0} +label.successfully_pasted_tcoffee_scores_to_alignment= Successfully pasted T-Coffee scores to alignment. +label.failed_add_tcoffee_scores = Failed to add T-Coffee scores: +label.successfully_pasted_annotation_to_alignment= Successfully pasted annotation to alignment. +label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file = Couldn't parse pasted text as a valid annotation, feature, GFF, or T-Coffee score file +label.successfully_pasted_alignment_file = Successfully pasted alignment file +label.paste_your_alignment_file = Paste your alignment file here +label.paste_your = Paste your +label.finished_searching = Finished searching +label.search_results= Search results {0} : {1} +label.found_match_for = Found match for {0} +label.font = Font: +label.size = Size: +label.style = Style: +label.enter_redundancy_threshold = Enter the redundancy threshold +label.calculating = Calculating.... +label.modify_conservation_visibility = Modify conservation visibility +label.colour_residues_above_occurence = Colour residues above % occurence +label.set_this_label_text = set this label text +label.sequences_from = Sequences from {0} +label.successfully_loaded_file = Successfully loaded file {0} +label.successfully_saved_to_file_in_format = Successfully saved to file: {0} in {1} format. +label.copied_sequences_to_clipboard = Copied {0} sequences to clipboard. +label.check_file_matches_sequence_ids_alignment = Check that the file matches sequence IDs in the alignment. +label.problem_reading_tcoffee_score_file = Problem reading T-COFFEE score file +label.source_to_target = {0} ... {1} +label.per_sequence_only= Per-sequence only +label.to_file = to File +label.to_textbox = to Textbox +label.jalview = Jalview +label.csv_spreadsheet = CSV (Spreadsheet) +label.status = Status +label.channels = Channels +label.channel_title_item_count = {0} ({1}) +label.blog_item_published_on_date = {0} {1} +label.select_das_service_from_table = Select a DAS service from the table to read a full description here. +label.session_update = Session Update +label.new_vamsas_session = New Vamsas Session +label.load_vamsas_session = Load Vamsas Session +label.save_vamsas_session = Save Vamsas Session +label.select_vamsas_session_opened_as_new_vamsas_session= Select a vamsas session to be opened as a new vamsas session. +label.open_saved_vamsas_session = Open a saved VAMSAS session +label.groovy_console = Groovy Console... +label.lineart = Lineart +label.dont_ask_me_again = Don't ask me again +label.select_eps_character_rendering_style = Select EPS character rendering style +label.invert_selection = Invert Selection +label.optimise_order = Optimise Order +label.seq_sort_by_score = Sequence sort by Score +label.load_colours = Load Colours +label.save_colours = Save Colours +label.fetch_das_features = Fetch DAS Features +label.selected_database_to_fetch_from = Selected {0} database {1} to fetch from {2} +label.database_param = Database: {0} +label.example = Example +label.example_param = Example: {0} +label.select_file_format_before_saving = You must select a file format before saving! +label.file_format_not_specified = File format not specified +label.alignment_contains_hidden_columns = The Alignment contains hidden regions (hidden sequences/columns).\nDo you want to save only the visible alignment? +label.couldnt_save_file = Couldn't save file: {0} +label.error_saving_file = Error Saving File +label.remove_from_default_list = Remove from default list? +label.remove_user_defined_colour = Remove user defined colour +label.you_must_select_least_two_sequences = You must select at least 2 sequences. +label.invalid_selection = Invalid Selection +label.principal_component_analysis_must_take_least_four_input_sequences = Principal component analysis must take\nat least 4 input sequences. +label.sequence_selection_insufficient = Sequence selection insufficient +label.you_need_more_two_sequences_selected_build_tree = You need to have more than two sequences selected to build a tree! +label.not_enough_sequences = Not enough sequences +label.selected_region_to_tree_may_only_contain_residues_or_gaps = The selected region to create a tree may\nonly contain residues or gaps.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. +label.sequences_selection_not_aligned = Sequences in selection are not aligned +label.sequences_must_be_aligned_before_creating_tree = The sequences must be aligned before creating a tree.\nTry using the Pad function in the edit menu,\n or one of the multiple sequence alignment web services. +label.sequences_not_aligned = Sequences not aligned +label.problem_reading_tree_file = Problem reading tree file +label.possible_problem_with_tree_file = Possible problem with tree file +label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Please select at least three bases in at least one sequence in order to perform a cDNA translation. +label.translation_failed = Translation Failed +label.error_when_translating_sequences_submit_bug_report = Unfortunately, something went wrong when translating your sequences.\nPlease take a look in the Jalview java console\nand submit a bug report including the stacktrace. +label.implementation_error = Implementation error: +label.automatically_associate_pdb_files_with_sequences_same_name = Do you want to automatically associate the {0} PDB files with sequences in the alignment that have the same name? +label.automatically_associate_pdb_files_by_name = Automatically Associate PDB files by name +label.ignore_unmatched_dropped_files_info = Do you want to ignore the {0} files whose names did not match any sequence IDs ? +label.ignore_unmatched_dropped_files = Ignore unmatched dropped files? +label.view_name_original = Original +label.enter_view_name = Enter View Name +label.enter_label = Enter label +label.enter_label_for_the_structure = Enter a label for the structure? +label.pdb_entry_is_already_displayed = {0} is already displayed.\nDo you want to re-use this viewer ? +label.map_sequences_to_visible_window = Map Sequences to Visible Window: {0} +label.add_pdbentry_to_view = Do you want to add {0} to the view called\n{1}\n +label.align_to_existing_structure_view = Align to existing structure view +label.pdb_entries_couldnt_be_retrieved = The following pdb entries could not be retrieved from the PDB\:\n{0}\nPlease retry, or try downloading them manually. +label.couldnt_load_file = Couldn't load file +label.couldnt_find_pdb_id_in_file = Couldn't find a PDB id in the file supplied. Please enter an Id to identify this structure. +label.no_pdb_id_in_file = No PDB Id in File +label.couldnt_read_pasted_text = Couldn't read the pasted text {0} +label.error_parsing_text = Error parsing text +label.enter_local_das_source = Enter Nickname & URL of Local DAS Source +label.you_can_only_edit_or_remove_local_das_sources = You can only edit or remove local DAS Sources! +label.public_das_source = Public DAS source - not editable +label.input_alignment_from_url = Input Alignment From URL +label.input_alignment = Input Alignment +label.couldnt_import_as_vamsas_session = Couldn't import {0} as a new vamsas session. +label.vamsas_document_import_failed = Vamsas Document Import Failed +label.couldnt_locate = Couldn't locate {0} +label.url_not_found = URL not found +label.no_link_selected = No link selected +label.new_sequence_url_link = New sequence URL link +label.cannot_edit_annotations_in_wrapped_view = Cannot edit annotations in wrapped view +label.wrapped_view_no_edit = Wrapped view - no edit +label.error_retrieving_data = Error Retrieving Data +label.user_colour_scheme_must_have_name = User colour scheme must have a name +label.no_name_colour_scheme = No name for colour scheme +label.invalid_url = Invalid URL ! +label.error_loading_file = Error loading file +label.problems_opening_file = Encountered problems opening {0}!! +label.file_open_error = File open error +label.no_das_sources_selected_warn = No das sources were selected.\nPlease select some sources and\ntry again. +label.no_das_sources_selected_title = No DAS Sources Selected +label.colour_scheme_exists_overwrite = Colour scheme {0} exists.\nContinue saving colour scheme as {1}?" +label.duplicate_scheme_name = Duplicate scheme name +label.jalview_new_questionnaire = There is a new Questionnaire available. Would you like to complete it now ?\n +label.jalview_user_survey = Jalview User Survey +label.alignment_properties = Alignment Properties: {0} +label.alignment_props = Alignment Properties +label.input_cut_paste = Cut & Paste Input +label.input_cut_paste_params = Cut & Paste Input - {0} +label.alignment_output_command = Alignment output - {0} +label.annotations = Annotations +label.structure_options = Structure Options +label.features = Features +label.overview_params = Overview {0} +label.paste_newick_file = Paste Newick file +label.load_tree_from_file = From File - +label.colour_by_annotation = Colour by Annotation +label.selection_output_command = Selection output - {0} +label.annotation_for_displayid =

    Annotation for {0}

    +label.pdb_sequence_mapping = PDB - Sequence Mapping +label.pca_details = PCA details +label.redundancy_threshold_selection = Redundancy threshold selection +label.user_defined_colours = User defined colours +label.jalviewLite_release = JalviewLite - Release {0} +label.jaview_build_date = Build date: {0} +label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt, +label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. +label.jalview_dev_managers = Development managed by The Barton Group, University of Dundee, Scotland, UK. +label.jalview_distribution_lists = For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list +label.jalview_please_cite = If you use Jalview, please cite: +label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) +label.jalview_cite_1_title = Jalview Version 2 - a multiple sequence alignment editor and analysis workbench +label.jalview_cite_1_ref = Bioinformatics doi: 10.1093/bioinformatics/btp033 +label.right_click = Right click +label.to_add_annotation = to add annotation +label.alignment_has_no_annotations = Alignment has no annotations +label.retrieving_pdb_data = Retrieving PDB data... +label.label = Label +label.no_features_added_to_this_alignment = No Features added to this alignment!! +label.features_can_be_added_from_searches_1 = (Features can be added from searches or +label.features_can_be_added_from_searches_2 = from Jalview / GFF features files) +label.calculating_pca= Calculating PCA +label.reveal_columns = Reveal Columns +label.jalview_cannot_open_file = Jalview can't open file +label.jalview_applet = Jalview applet +label.loading_data = Loading data +label.memory_stats = Total Free Memory: {0} MB; Max Memory: {1} MB; {2} % +label.calculating_tree = Calculating tree +label.state_queueing = queuing +label.state_running = running +label.state_complete = complete +label.state_completed = finished +label.state_job_cancelled = job cancelled!! +label.state_job_error = job error! +label.server_error_try_later = Server Error! (try later) +label.error_loading_pdb_data = Error loading PDB data!! +label.fetching_pdb_data = Fetching PDB data... +label.structure_type = Structure type +label.settings_for_type = Settings for {0} +label.view_full_application = View in Full Application +label.load_associated_tree = Load Associated Tree ... +label.load_features_annotations = Load Features/Annotations ... +label.export_features = Export Features ... +label.export_annotations = Export Annotations ... +label.to_upper_case = To Upper Case +label.to_lower_case = To Lower Case +label.toggle_case = Toggle Case +label.edit_name_description = Edit Name/Description ... +label.create_sequence_feature = Create Sequence Feature ... +label.edit_sequence = Edit Sequence +label.edit_sequences = Edit Sequences +label.sequence_details = Sequence Details +label.jmol_help = Jmol Help +label.chimera_help = Chimera Help +label.close_viewer = Close Viewer +label.confirm_close_chimera = This will close Jalview''s connection to {0}.
    Do you want to close the Chimera window as well? +label.chimera_help = Chimera Help +label.all = All +label.sort_by = Sort alignment by +label.sort_by_score = Sort by Score +label.sort_by_density = Sort by Density +label.sequence_sort_by_density = Sequence sort by Density +label.sort_ann_by = Sort annotations by +label.sort_annotations_by_sequence = Sort by sequence +label.sort_annotations_by_label = Sort by label +label.reveal = Reveal +label.hide_columns = Hide Columns +label.load_jalview_annotations = Load Jalview Annotations or Features File +label.load_tree_file = Load a tree file +label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = Retrieve and parse sequence database records for the alignment or the currently selected sequences +label.standard_databases = Standard Databases +label.fetch_embl_uniprot = Fetch from EMBL/EMBLCDS or Uniprot/PDB and any selected DAS sources +label.reset_min_max_colours_to_defaults = Reset min and max colours to defaults from user preferences. +label.align_structures_using_linked_alignment_views = Align structures using {0} linked alignment views +label.connect_to_session = Connect to session {0} +label.threshold_feature_display_by_score = Threshold the feature display by score. +label.threshold_feature_no_thereshold = No Threshold +label.threshold_feature_above_thereshold = Above Threshold +label.threshold_feature_below_thereshold = Below Threshold +label.adjust_thereshold = Adjust threshold +label.toggle_absolute_relative_display_threshold = Toggle between absolute and relative display threshold. +label.display_features_same_type_different_label_using_different_colour = Display features of the same type with a different label using a different colour. (e.g. domain features) +label.select_colour_minimum_value = Select Colour for Minimum Value +label.select_colour_maximum_value = Select Colour for Maximum Value +label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Open a new structure viewer with all structures associated with the current selection and superimpose them using the alignment. +label.open_url_param = Open URL {0} +label.open_url_seqs_param = Open URL ({0}..) ({1} seqs) +label.load_pdb_file_associate_with_sequence = Load a PDB file and associate it with sequence {0} +label.reveal_hidden_columns = Reveal Hidden Columns with Right Mouse Button +label.dark_colour = Dark Colour +label.light_colour = Light Colour +label.highlightnode = Left click to select leaves.
    Double-click to invert leaves.
    Right click to change colour. +label.load_colour_scheme = Load colour scheme +label.copy_format_from = Copy format from +label.toggle_enabled_views = When enabled, allows many views to be selected. +label.select_all_views = Select all views +label.select_many_views = Select many views +label.edit_notes_parameter_set = Click to edit the notes for this parameter set. +label.open_local_file = Open local file +label.enable_automatically_sort_alignment_when_open_new_tree = Enable this to automatically sort
    the alignment when you open
    a new tree. +label.listen_for_selections = Listen for selections +label.selections_mirror_selections_made_same_sequences_other_views = When selected, selections in this view will mirror
    selections made on the same sequences in other views. +label.toggle_sequence_visibility = Shift+H toggles sequence visiblity +label.toggle_columns_visibility = Ctrl+H toggles column visiblity. +label.toggles_visibility_hidden_selected_regions = H toggles visibility of hidden or selected regions +label.rename_tab_eXpand_reGroup= Right-click to rename tab
    Press X to eXpand tabs, G to reGroup. +label.right_align_sequence_id = Right Align Sequence Id +label.sequence_id_tooltip = Sequence ID Tooltip +label.no_services = +label.select_copy_raw_html = Select this if you want to copy raw html +label.share_data_vamsas_applications = Share data with other vamsas applications +label.connect_to = Connect to +label.join_existing_vamsas_session = Join an existing vamsas session +label.from_url = from URL +label.any_trees_calculated_or_loaded_alignment_automatically_sort = When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment +label.sort_with_new_tree = Sort With New Tree +label.from_textbox = from Textbox +label.window = Window +label.preferences = Preferences +label.tools = Tools +label.fetch_sequences = Fetch Sequence(s) +label.stop_vamsas_session = Stop Vamsas Session +label.collect_garbage = Collect Garbage +label.show_memory_usage = Show Memory Usage +label.show_java_console = Show Java Console +label.show_jalview_news = Show Jalview News +label.take_snapshot = Take snapshot +label.monospaced_fonts_faster_to_render = Monospaced fonts are faster to render +label.anti_alias_fonts = Anti-alias Fonts (Slower to render) +label.monospaced_font= Monospaced +label.quality = Quality +label.maximize_window = Maximize Window +label.conservation = Conservation +label.consensus = Consensus +label.histogram = Histogram +label.logo = Logo +label.non_positional_features = List Non-positional Features +label.database_references = List Database References +label.share_selection_across_views = Share selection across views +label.scroll_highlighted_regions = Scroll to highlighted regions +label.gap_symbol = Gap Symbol +label.prot_alignment_colour = Protein Alignment Colour +label.nuc_alignment_colour = Nucleotide Alignment Colour +label.address = Address +label.port = Port +label.default_browser_unix = Default Browser (Unix) +label.send_usage_statistics = Send usage statistics +label.check_for_questionnaires = Check for questionnaires +label.check_for_latest_version = Check for latest version +label.url_linkfrom_sequence_id = URL link from Sequence ID +label.use_proxy_server = Use a proxy server +label.eps_rendering_style = EPS rendering style +label.append_start_end = Append /start-end (/15-380) +label.full_sequence_id = Full Sequence Id +label.smooth_font = Smooth Font +label.autocalculate_consensus = AutoCalculate Consensus +label.pad_gaps = Pad Gaps +label.pad_gaps_when_editing = Pad Gaps When Editing +label.automatically_set_id_width = Automatically set ID width +label.figure_id_column_width = Figure ID column width +label.use_modeller_output = Use Modeller Output +label.wrap_alignment = Wrap Alignment +label.right_align_ids = Right Align Ids +label.sequence_name_italics = Italic Sequence Ids +label.open_overview = Open Overview +label.default_colour_scheme_for_alignment = Default Colour Scheme for alignment +label.annotation_shading_default = Annotation Shading Default +label.default_minimum_colour_annotation_shading = Default Minimum Colour for annotation shading +label.default_maximum_colour_annotation_shading = Default Maximum Colour for annotation shading +label.visual = Visual +label.connections = Connections +label.output = Output +label.editing = Editing +label.das_settings = DAS Settings +label.web_services = Web Services +label.right_click_to_edit_currently_selected_parameter = Right click to edit currently selected parameter. +label.let_jmol_manage_structure_colours = Let Jmol manage structure colours +label.let_chimera_manage_structure_colours = Let Chimera manage structure colours +label.marks_leaves_tree_not_associated_with_sequence = Marks leaves of tree not associated with a sequence +label.index_web_services_menu_by_host_site = Index web services in menu by the host site +label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up = Check this option if you want to be informed
    when a web service URL cannot be accessed by Jalview
    when it starts up +label.new_service_url = New Service URL +label.edit_service_url = Edit Service URL +label.delete_service_url = Delete Service URL +label.details = Details +label.options = Options +label.parameters = Parameters +label.available_das_sources = Available DAS Sources +label.full_details = Full Details +label.authority = Authority +label.type = Type +label.proxy_server = Proxy Server +label.file_output = File Output +label.select_input_type = Select input type +label.set_options_for_type = Set options for type +label.data_input_parameters = Data input parameters +label.data_returned_by_service = Data returned by service +label.rsbs_encoded_service = RSBS Encoded Service +label.parsing_errors = Parsing errors +label.simple_bioinformatics_rest_services = Simple Bioinformatics Rest Services +label.web_service_discovery_urls = Web Service Discovery URLS +label.input_parameter_name = Input Parameter name +label.short_descriptive_name_for_service = Short descriptive name for service +label.function_service_performs = What kind of function the service performs (e.g. alignment, analysis, search, etc). +label.brief_description_service = Brief description of service +label.url_post_data_service = URL to post data to service. Include any special parameters needed here +label.optional_suffix = Optional suffix added to URL when retrieving results from service +label.preferred_gap_character = Which gap character does this service prefer? +label.gap_character = Gap character +label.move_return_type_up_order= Move return type up order +label.move_return_type_down_order= Move return type down order +label.update_user_parameter_set = Update this existing user parameter set +label.delete_user_parameter_set = Delete the currently selected user parameter set +label.create_user_parameter_set = Create a new parameter set with the current settings. +label.revert_changes_user_parameter_set = Undo all changes to the current parameter set +label.start_job_current_settings = Start Job with current settings +label.cancel_job_close_dialog = Close this dialog and cancel job +label.input_output = Input/Output +label.cut_paste = Cut'n'Paste +label.adjusting_parameters_for_calculation = Adjusting parameters for existing Calculation +label.2d_rna_structure_line = 2D RNA {0} (alignment) +label.2d_rna_sequence_name = 2D RNA - {0} +label.edit_name_and_description_current_group = Edit name and description of current group. +label.view_structure_for = View structure for {0} +label.view_all_structures = View all {0} structures. +label.view_all_representative_structures = View all {0} representative structures. +label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Opens a new structure viewer with all representative structures\nassociated with the current selection\nsuperimposed with the current alignment. +label.associate_structure_with_sequence = Associate Structure with Sequence +label.from_file = from file +label.enter_pdb_id = Enter PDB Id +label.discover_pdb_ids = Discover PDB ids +label.text_colour = Text Colour +label.structure = Structure +label.view_structure = View Structure +label.view_protein_structure = View Protein Structure +label.view_rna_structure = View Nucleotide Structure +label.clustalx_colours = Clustalx colours +label.above_identity_percentage = Above % Identity +label.create_sequence_details_report_annotation_for = Annotation for {0} +label.sequence_details_for = Sequence Details for {0} +label.sequence_name = Sequence Name +label.sequence_description = Sequence Description +label.edit_sequence_name_description = Edit Sequence Name/Description +label.spaces_converted_to_backslashes = Spaces have been converted to _ +label.no_spaces_allowed_sequence_name = No spaces allowed in Sequence Name +label.select_outline_colour = Select Outline Colour +label.web_browser_not_found_unix = Unixers\: Couldn't find default web browser.\nAdd the full path to your browser in Preferences." +label.web_browser_not_found = Web browser not found +label.select_pdb_file_for = Select a PDB file for {0} +label.html = HTML +label.wrap = Wrap +label.show_database_refs = Show Database Refs +label.show_non_positional_features = Show Non-Positional Features +label.save_png_image = Save As PNG Image +label.load_tree_for_sequence_set = Load a tree for this sequence set +label.export_image = Export Image +label.vamsas_store = VAMSAS store +label.translate_cDNA = Translate as cDNA +label.linked_view_title = Linked cDNA and protein view +label.align = Align +label.extract_scores = Extract Scores +label.get_cross_refs = Get Cross-References +label.sort_alignment_new_tree = Sort Alignment With New Tree +label.add_sequences = Add Sequences +label.new_window = New Window +label.split_window = Split Window +label.refresh_available_sources = Refresh Available Sources +label.use_registry = Use Registry +label.add_local_source = Add Local Source +label.set_as_default = Set as Default +label.show_labels = Show labels +label.background_colour = Background Colour +label.associate_nodes_with = Associate Nodes With +label.jalview_pca_calculation = Jalview PCA Calculation +label.link_name = Link Name +label.pdb_file = PDB file +label.colour_with_jmol = Colour with Jmol +label.colour_with_chimera = Colour with Chimera +label.align_structures = Align structures +label.jmol = Jmol +label.chimera = Chimera +label.sort_alignment_by_tree = Sort Alignment By Tree +label.mark_unlinked_leaves = Mark Unlinked Leaves +label.associate_leaves_with = Associate Leaves With +label.save_colour_scheme_with_unique_name_added_to_colour_menu = Save your colour scheme with a unique name and it will be added to the Colour menu +label.case_sensitive = Case Sensitive +label.lower_case_colour = Lower Case Colour +label.index_by_host = Index by host +label.index_by_type = Index by type +label.enable_jabaws_services = Enable JABAWS Services +label.display_warnings = Display warnings +label.move_url_up = Move URL up +label.move_url_down = Move URL down +label.add_sbrs_definition = Add a SBRS definition +label.edit_sbrs_definition = Edit SBRS definition +label.delete_sbrs_definition = Delete SBRS definition +label.your_sequences_have_been_verified = Your sequences have been verified against known sequence databases. Some of the ids have been\n altered, most likely the start/end residue will have been updated.\n Save your alignment to maintain the updated id.\n\n +label.sequence_names_updated = Sequence names updated +label.dbref_search_completed = DBRef search completed +label.show_all_chains = Show all chains +label.fetch_all_param = Fetch all {0} +label.paste_new_window = Paste To New Window +label.settings_for_param = Settings for {0} +label.view_params = View {0} +label.all_views = All Views +label.align_sequences_to_existing_alignment = Align sequences to an existing alignment +label.realign_with_params = Realign with {0} +label.calcname_with_default_settings = {0} with Defaults +label.action_with_default_settings = {0} with default settings +label.edit_settings_and_run = Edit settings and run... +label.view_and_change_parameters_before_alignment = View and change the parameters before alignment +label.run_with_preset_params = Run {0} with preset +label.view_and_change_parameters_before_running_calculation = View and change parameters before running calculation +label.view_documentation = View documentation +label.select_return_type = Select return type +label.translation_of_params = Translation of {0} +label.features_for_params = Features for - {0} +label.annotations_for_params = Annotations for - {0} +label.generating_features_for_params = Generating features for - {0} +label.generating_annotations_for_params = Generating annotations for - {0} +label.varna_params = VARNA - {0} +label.sequence_feature_settings = Sequence Feature Settings +label.pairwise_aligned_sequences = Pairwise Aligned Sequences +label.original_data_for_params = Original Data for {0} +label.points_for_params = Points for {0} +label.transformed_points_for_params = Transformed points for {0} +label.graduated_color_for_params = Graduated Feature Colour for {0} +label.select_backgroud_colour = Select Background Colour +label.invalid_font = Invalid Font +label.separate_multiple_accession_ids = Enter one or more PDB Ids +label.separate_multiple_query_values = Enter one or more {0}s separated by a semi-colon ";" +label.search_all = Enter one or more search values separated by a semi-colon ";" (Note: This Searches the entire PDB database) +label.replace_commas_semicolons = Replace commas with semi-colons +label.parsing_failed_syntax_errors_shown_below_param = Parsing failed. Syntax errors shown below {0} +label.parsing_failed_unrecoverable_exception_thrown_param = \nParsing failed. An unrecoverable exception was thrown\:\n {0} +label.example_query_param = Example query: {0} +label.enter_value_increase_conservation_visibility = Enter value to increase conservation visibility +label.enter_percentage_identity_above_which_colour_residues = Enter % identity above which to colour residues +label.wswublast_client_credits = To display sequence features an exact Uniprot id with 100% sequence identity match must be entered.\nIn order to display these features, try changing the names of your sequences to the ids suggested below.\n\nRunning WSWUBlast at EBI.\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R.\nSOAP-based services provided by the European Bioinformatics Institute.\nNucleic Acids Res. 33(1)\:W25-W28 (2005)); +label.blasting_for_unidentified_sequence = BLASTing for unidentified sequences +label.select_columns_containing = Select columns containing +label.select_columns_not_containing = Select columns that do not contain +option.trim_retrieved_seqs = Trim retrieved sequences +label.trim_retrieved_sequences = When the reference sequence is longer than the sequence that you are working with, only keep the relevant subsequences. +label.use_sequence_id_1 = Use $SEQUENCE_ID$ or $SEQUENCE_ID=//=$ +label.use_sequence_id_2 = \nto embed sequence id in URL +label.ws_parameters_for = Parameters for {0} +label.switch_server = Switch server +label.choose_jabaws_server = Choose a server for running this service +label.services_at = Services at {0} +label.rest_client_submit = {0} using {1} +label.fetch_retrieve_from =Retrieve from {0} +label.fetch_retrieve_from_all_sources = Retrieve from all {0} sources in {1}
    First is :{2} +#label.feature_settings_click_drag = Click/drag feature types up or down to change render order.
    Double click to select columns containing feature in alignment/current selection
    Pressing Alt will select columns outside features rather than inside
    Pressing Shift to modify current selection (rather than clear current selection)
    Press CTRL or Command/Meta to toggle columns in/outside features
    +label.feature_settings_click_drag = Drag up or down to change render order.
    Double click to select columns containing feature. +label.transparency_tip = Adjust transparency to 'see through' feature colours. +label.opt_and_params_further_details = see further details by right-clicking +label.opt_and_params_show_brief_desc_image_link = Click to show brief description
    Right click for further information. +label.opt_and_params_show_brief_desc = Click to show brief description
    +label.adjusts_width_generated_eps_png = Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed +label.manually_specify_width_left_column = Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set +label.job_created_when_checked = When checked, a job is created for every sequence in the current selection. +label.when_checked_job_visible_region_and_results = When checked, a single job is created for the visible region and results mapped back onto their location in the alignment. Otherwise, a job would be created for every contiguous region visible in the alignment or current selection (e.g. a multiple alignment). +label.flat_file_representation = Flat file representation of this rest service using the Really Simple Bioinformatics Service formalism +label.result_of_parsing_rsbs = Results of parsing the RSBS representation +label.user_preset = User Preset +label.service_preset = Service Preset +label.run_with_preset = Run {0} with preset +label.view_service_doc_url = View {1} +label.submit_sequence = Submit {0} {1} {2} {3} to
    {4} +action.by_title_param = by {0} +label.alignment = Alignment +label.secondary_structure_prediction = Secondary Structure Prediction +label.sequence_database_search = Sequence Database Search +label.analysis = Analysis +label.protein_disorder = Protein Disorder +label.source_from_db_source = Sources from {0} +label.from_msname = from {0} +label.superpose_with = Superpose with ... +action.do = Do +label.scale_label_to_column = Scale Label to Column +label.add_new_row = Add New Row +label.edit_label_description = Edit Label/Description +label.hide_row = Hide This Row +label.delete_row = Delete This Row +label.show_all_hidden_rows = Show All Hidden Rows +label.export_annotation = Export Annotation +label.copy_consensus_sequence = Copy Consensus Sequence +label.helix = Helix +label.sheet = Sheet +label.rna_helix = RNA Helix +label.remove_annotation = Remove Annotation +label.colour_by = Colour by... +label.muscle_multiple_protein_sequence_alignment = Muscle Multiple Protein Sequence Alignment +label.mafft_multiple_sequence_alignment = MAFFT Multiple Sequence Alignment +label.clustalw_multiple_sequence_alignment = ClustalW Multiple Sequence Alignment +label.jnet_secondary_structure_prediction = JNet Secondary Structure Prediction +label.multiharmony = Multi-Harmony +label.unable_start_web_service_analysis = Unable to start web service analysis +label.job_couldnt_be_started_check_input = The Job couldn't be started. Please check your input, and the Jalview console for any warning messages. +label.prompt_each_time = Prompt each time +label.use_source = Use Source +label.couldnt_save_project = Couldn't save project +label.error_whilst_saving_current_state_to = Error whilst saving current state to {0} +label.error_whilst_loading_project_from = Error whilst loading project from {0} +label.couldnt_load_project = Couldn't load project +label.pca_sequences_not_aligned = The sequences must be aligned before calculating PCA.\nTry using the Pad function in the edit menu,\nor one of the multiple sequence alignment web services. +label.invalid_name_preset_exists = Invalid name - preset already exists. +label.invalid_name = Invalid name +label.set_proxy_settings = Please set up your proxy settings in the 'Connections' tab of the Preferences window +label.proxy_authorization_failed = Proxy Authorization Failed +label.internal_jalview_error = Internal Jalview Error +label.secondary_structure_prediction_service_couldnt_be_located = The Secondary Structure Prediction Service named {0} at {1} couldn't be located. +label.service_called_is_not_msa_service = The Service called \n{0}\nis not a \nMultiple Sequence Alignment Service\! +label.msa_service_is_unknown = The Multiple Sequence Alignment Service named {0} is unknown +label.service_called_is_not_seq_search_service = The Service called \n{0}\nis not a \nSequence Search Service\! +label.seq_search_service_is_unknown = The Sequence Search Service named {0} is unknown +label.feature_type = Feature Type +label.display = Display +label.service_url = Service URL +label.copied_sequences = Copied sequences +label.cut_sequences = Cut Sequences +label.conservation_colour_increment = Conservation Colour Increment ({0}) +label.percentage_identity_thereshold = Percentage Identity Threshold ({0}) +label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User Colour scheme dialog +label.save_alignment_to_file = Save Alignment to file +label.save_features_to_file = Save Features to File +label.save_annotation_to_file = Save Annotation to File +label.no_features_on_alignment = No features found on alignment +label.save_pdb_file = Save PDB File +label.save_text_to_file = Save Text to File +label.save_state = Save State +label.restore_state = Restore State +label.saving_jalview_project = Saving jalview project {0} +label.loading_jalview_project = Loading jalview project {0} +label.save_vamsas_document_archive = Save Vamsas Document Archive +label.saving_vamsas_doc = Saving VAMSAS Document to {0} +label.load_feature_colours = Load Feature Colours +label.save_feature_colours = Save Feature Colour Scheme +label.dataset_for = {0} Dataset for {1} +label.select_startup_file = Select startup file +label.select_default_browser = Select default web browser +label.save_tree_as_newick = Save tree as newick file +label.create_eps_from_tree = Create EPS file from tree +label.create_png_from_tree = Create PNG image from tree +label.save_colour_scheme = Save colour scheme +label.edit_params_for = Edit parameters for {0} +label.choose_filename_for_param_file = Choose a filename for this parameter file +label.save_as_html = Save as HTML +label.recently_opened = Recently Opened +label.blasting_for_unidentified_sequence_jobs_running = BLASTing for unidentified sequences - {0} jobs running. +label.tree_from = Tree from {0} +label.webservice_job_title = {0} using {1} +label.select_visible_region_of = selected {0} region of {1} +label.visible = Visible +label.select_unselect_visible_regions_from = select and unselected {0} regions from {1} +label.visible_region_of = visible region of +label.webservice_job_title_on = {0} using {1} on {2} +label.updating_vamsas_session = Updating vamsas session +label.loading_file = Loading File: {0} +label.edit_params = Edit {0} +error.not_implemented = Not implemented +error.no_such_method_as_clone1_for = No such method as clone1 for {0} +error.null_from_clone1 = Null from clone1! +error.implementation_error_sortbyfeature = Implementation Error - sortByFeature method must be one of FEATURE_SCORE, FEATURE_LABEL or FEATURE_DENSITY. +error.not_yet_implemented = Not yet implemented +error.unknown_type_dna_or_pep = Unknown Type {0} - dna or pep are the only allowed values. +error.implementation_error_dont_know_thereshold_annotationcolourgradient = Implementation error: don't know about threshold setting for current AnnotationColourGradient. +error.implementation_error_embeddedpopup_not_null = Implementation error - embeddedPopup must be non-null +error.invalid_colour_for_mycheckbox = Invalid color for MyCheckBox +error.implementation_error_unrecognised_render_object_for_features_type = Implementation Error: Unrecognised render object {0} for features of type {1} +error.implementation_error_unsupported_feature_colour_object = Implementation error: Unsupported feature colour object. +error.invalid_separator_parameter = Invalid separator parameter - must be non-zero length +error.alignment_cigararray_not_implemented = Alignment(CigarArray) not yet implemented +error.weak_sequencei_equivalence_not_yet_implemented = Weak sequenceI equivalence not yet implemented. +error.implementation_error_can_only_make_alignmnet_from_cigararray = Implementation Error - can only make an alignment view from a CigarArray of sequences. +error.empty_view_cannot_be_updated = empty view cannot be updated. +error.mismatch_between_number_of_sequences_in_block = Mismatch between number of sequences in block {0} ({1}) and the original view ({2}) +error.padding_not_yet_implemented = Padding not yet implemented +error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks={0}) +error.unknown_seq_cigar_operation = Unknown SeqCigar operation {0} +error.implementation_bug_parse_cigar_string = Implementation bug in parseCigarString +error.implementation_error_invalid_operation_string = Implementation error. Invalid operation string. +error.invalid_range_string = Invalid range string (must be zero or positive number) +error.implementation_error_delete_range_out_of_bounds = Implementation Error: deleteRange out of bounds: start must be non-negative and less than end. +error.implementation_error = Implementation error +error.implementation_error_unknown_operation = Implementation Error! Unknown operation {0} +error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Implementation Error - unexpected null from getSequenceAndDeletions +error.implementation_error_set_seq_null = Implementation Error - _setSeq(null,...) +error.implementation_error_s = Implementation Error: _s= {0} +error.implementation_error_seqcigar_possible = SeqCigar: Possible implementation error: sequence is longer than dataset sequence +error.implmentation_bug_seq_null = Implementation Bug. Null seq +error.implementation_bug_cigar_operation_list_range_list = Implementation Bug. Cigar Operation list!= range list +error.not_yet_implemented_cigar_object_from_cigar_string = NOT YET Implemented: Constructing a Cigar object from a cigar string and a gapped sequence. +error.implementation_bug_cigar_operation = Implementation Bug. Cigar Operation {0} {1} not one of {2}, {3}, or {4}. +error.implementation_error_for_new_cigar = Implementation error for new Cigar(SequenceI) +error.implementation_error_cigar_seq_no_operations = Implementation error: {0}th sequence Cigar has no operations. +error.implementation_error_jmol_getting_data = Implementation error - Jmol seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016 +error.implementation_error_no_pdbentry_from_index = Implementation error - no corresponding pdbentry (for index {0}) to add sequences mappings to +error.jmol_version_not_compatible_with_jalview_version = Jmol version {0} is not compatible with this version of Jalview. Report this problem at issues.jalview.org +error.not_implemented_remove = Remove: Not implemented +error.not_implemented_clone = Clone: Not implemented +error.implementation_error_chimera_getting_data = Implementation error - Chimera seems to be still working on getting its data - report at http://issues.jalview.org/browse/JAL-1016 +error.call_setprogressbar_before_registering_handler = call setProgressBar before registering the progress bar's handler. +label.cancelled_params = Cancelled {0} +error.implementation_error_cannot_show_view_alignment_frame = Implementation error: cannot show a view from another alignment in an AlignFrame. +error.implementation_error_dont_know_about_thereshold_setting = Implementation error: don't know about threshold setting for current AnnotationColourGradient. +error.eps_generation_not_implemented = EPS Generation not yet implemented +error.png_generation_not_implemented = PNG Generation not yet implemented +error.try_join_vamsas_session_another = Trying to join a vamsas session when another is already connected +error.invalid_vamsas_session_id = Invalid vamsas session id +error.implementation_error_cannot_create_groovyshell = Implementation Error. Cannot create groovyShell without Groovy on the classpath! +label.groovy_support_failed = Jalview Groovy Support Failed +label.couldnt_create_groovy_shell = Couldn't create the groovy Shell. Check the error log for the details of what went wrong. +error.unsupported_version_calcIdparam = Unsupported Version for calcIdparam {0} +error.implementation_error_cant_reorder_tree = Implementation Error: Can't reorder this tree. Not DefaultMutableTreeNode. +error.invalid_value_for_option = Invalid value {0} for option {1} +error.implementation_error_cannot_import_vamsas_doc = Implementation Error - cannot import existing vamsas document into an existing session, Yet! +label.vamsas_doc_couldnt_be_opened_as_new_session = VAMSAS Document could not be opened as a new session - please choose another +error.implementation_error_vamsas_operation_not_init = Impementation error! Vamsas Operations when client not initialised and connected +error.jalview_no_connected_vamsas_session = Jalview not connected to Vamsas session +error.implementation_error_cannot_recover_vamsas_object_mappings = IMPLEMENTATION ERROR: Cannot recover vamsas object mappings - no backup was made +error.setstatus_called_non_existent_job_pane = setStatus called for non-existent job pane {0} +error.implementation_error_cannot_find_marshaller_for_param_set =Implementation error: Can't find a marshaller for the parameter set +error.implementation_error_old_jalview_object_not_bound =IMPLEMENTATION ERROR: old jalview object is not bound ! ({0}) +error.implementation_error_vamsas_doc_class_should_bind_to_type = Implementation Error: Vamsas Document Class {0} should bind to a {1} (found a {2}) +error.implementation_error_jalview_class_should_bind_to_type = Implementation Error: Jalview Class {0} should bind to a {1} (found a {2}) +error.invalid_vamsas_rangetype_cannot_resolve_lists = Invalid vamsas RangeType - cannot resolve both lists of Pos and Seg from choice! +error.implementation_error_maplist_is_null = Implementation error. MapList is null for initMapType. +error.implementation_error_cannot_have_null_alignment = Implementation error: Cannot have null alignment property key +error.implementation_error_null_fileparse = Implementation error. Null FileParse in copy constructor +error.implementation_error_cannot_map_alignment_sequences = IMPLEMENTATION ERROR: Cannot map an alignment of sequences from different datasets into a single alignment in the vamsas document. +error.implementation_error_cannot_duplicate_colour_scheme = Serious implementation error: cannot duplicate colourscheme {0} +error.implementation_error_structure_selection_manager_null = Implementation error. Structure selection manager's context is 'null' +exception.ssm_context_is_null = SSM context is null +error.idstring_seqstrings_only_one_per_sequence = idstrings and seqstrings contain one string each per sequence +error.cannot_have_mixed_length_replacement_vectors = Cannot have mixed length replacement vectors. Replacement vector for {0} is {1} strings long, and have already seen a {2} length vector. +error.cannot_have_zero_length_vector_replacement_strings = Cannot have zero length vector of replacement strings - either 1 value or n values. +error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = Implementation Error! Multiple single sequence prediction jobs are not yet supported +error.implementation_error_invalid_msa_index_for_job =Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object! +error.implementation_error_startjob_called = Implementation error - StartJob(JpredJob) called on {0} +error.multiple_jnet_subjob_merge_not_implemented = Multiple JNet subjob merging not yet implemented +label.job_never_ran = Job never ran - input returned to user. +error.implementation_error_minlen_must_be_greater_zero = Implementation error: minlen must be zero or more +error.implementation_error_msawbjob_called = Implementation error - StartJob(MsaWSJob) called on a WSJobInstance {0} +error.implementation_error_cannot_attach_ws_menu_entry = IMPLEMENTATION ERROR: cannot attach WS Menu Entry without service handle reference! +error.parameter_migration_not_implemented_yet = Parameter migration not implemented yet +error.implementation_error_cannot_set_jaba_option = Implementation error: cannot set Jaba Option to a value outside its allowed value range! +error.implementation_error_valuetype_doesnt_support_jabaws_type = IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type : {0} +error.cannot_create_jabaws_param_set = Cannot create a JabaWSParamSet from non-JabaWS parameters +error.cannot_set_arguments_to_jabaws_param_set = Cannot set arguments to a JabaWSParamSet that are not JabaWS arguments +error.implementation_error_runner_config_not_available = Implementation Error: Runner Config not available for a JABAWS service of type {0} ({1}) +error.implementation_error_cannot_handle_jaba_param = Implementation Error: Cannot handle Jaba parameter object {0} +error.implementation_error_attempt_to_delete_service_preset = Implementation error: Attempt to delete a service preset! +error.implementation_error_cannot_locate_oldname_presetname = Implementation error: Can't locate either oldname ({0}) or presetName ({1}in the datastore!" +error.implementation_error_jabaws_param_set_only_handled_by = Implementation error: JabaWsParamSets can only be handled by JabaParamStore +error.cannot_set_source_file_for = Cannot set source file for {0} +error.mismatch_service_instance_preset = Probable mismatch between service instance and preset! +error.cannot_set_params_for_ws_preset = Cannot set Parameters for a Jaba Web service's preset +error.implementation_error_can_only_instantiate_jaba_param_sets = Implementation error: Can only instantiate Jaba parameter sets +error.no_aacon_service_found = No AACon service found +error.implementation_error_couldnt_copy_value_constraint = Implementation error: could not copy ValueConstrain! +error.couldnt_encode_as_utf8 = Couldn't encode {0} as UTF-8. +error.tree_inputtype_not_yet_implemented = Tree InputType not yet implemented +error.implementation_error_need_to_have_httpresponse = Implementation Error: need to have an HttpResponse to process +error.dbrefsource_implementation_exception =DBRefSource Implementation Exception +error.implementation_error_dbinstance_must_implement_interface = Implmentation Error - getDbInstances must be given a class that implements jalview.ws.seqfetcher.DbSourceProxy (was given{0}) +error.implementation_error_must_init_dbsources =Implementation error. Must initialise dbSources +label.view_controller_toggled_marked = {0} {1} columns {2} containing features of type {3} across {4} sequence(s) +label.toggled = Toggled +label.marked = Marked +label.not = not +label.no_feature_of_type_found = No features of type {0} found. +label.submission_params = Submission {0} +label.empty_alignment_job = Empty Alignment Job +label.add_new_sbrs_service = Add a new Simple Bioinformatics Rest Service +label.edit_sbrs_entry = Edit Simple Bioinformatics Rest Service entry +label.pca_recalculating = Recalculating PCA +label.pca_calculating = Calculating PCA +label.select_foreground_colour = Choose foreground colour +label.select_colour_for_text = Select Colour for Text +label.adjunst_foreground_text_colour_thereshold = Adjust Foreground Text Colour Threshold +label.select_subtree_colour = Select Sub-Tree Colour +label.create_new_sequence_features = Create New Sequence Feature(s) +label.amend_delete_features = Amend/Delete Features for {0} +exception.out_of_bounds_for_file = Out of bounds for file: i={0}, Final Buffer: i0={1} iend={2} +exception.null_string_given_to_regex_search = Null String Given to Regex.search +exception.null_string_like_given_to_regex_search = Null StringLike Given to Regex.search +exception.null_string_given_to_regex_reverse_search = Null String Given to Regex.reverseSearch +exception.null_string_like_given_to_regex_reverse_search = Null StringLike Given to Regex.reverseSearch +exception.null_string_like_given_to_regex_search_from = Null String Given to Regex.searchFrom +exception.null_string_like_given_to_regex_search_region = Null String Given to Regex.searchRegion +exception.replace_null_regex_pointer = Replacer has null Regex pointer +exception.bad_pattern_to_regex_perl_code = bad pattern to Regex.perlCode: {0} +exception.no_stub_implementation_for_interface = There is no stub implementation for the interface: {0} +exception.cannot_set_endpoint_address_unknown_port = Cannot set Endpoint Address for Unknown Port {0} +exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Querying matching opening parenthesis for non-closing parenthesis character {0} +exception.mismatched_unseen_closing_char = Mismatched (unseen) closing character {0} +exception.mismatched_closing_char = Mismatched closing character {0} +exception.mismatched_opening_char = Mismatched opening character {0} at {1} +exception.invalid_datasource_couldnt_obtain_reader = Invalid datasource. Could not obtain Reader +exception.index_value_not_in_range = {0}: Index value {1} not in range [0..{2}] +exception.unterminated_cigar_string = Unterminated cigar string +exception.unexpected_operation_cigar_string_pos = Unexpected operation {0} in cigar string (position {1} in {2} +exception.couldnt_parse_responde_from_annotated3d_server = Couldn't parse response from Annotate3d server +exception.application_test_npe = Application test: throwing an NullPointerException It should arrive at the console +exception.overwriting_vamsas_id_binding = Overwriting vamsas id binding +exception.overwriting_jalview_id_binding = Overwriting jalview id binding +error.implementation_error_unknown_file_format_string = Implementation error: Unknown file format string +exception.failed_to_resolve_gzip_stream = Failed to resolve GZIP stream +exception.problem_opening_file_also_tried = Problem opening {0} (also tried {1}) : {2} +exception.problem_opening_file = Problem opening {0} : {1} +exception.failed_to_read_data_from_source = Failed to read data from source: {0} +exception.no_init_source_stream = Unitialised Source Stream +exception.invalid_source_stream = Invalid Source Stream: {0} +error.implementation_error_reset_called_for_invalid_source = Implementation Error: Reset called for invalid source. +exception.number_of_residues_in_query_sequence_differ_from_prediction = Number of residues in {0} supposed query sequence ({1}\n{2})\ndiffer from number of prediction sites in prediction ({3}) +label.mapped = mapped +exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: Entry ({0}) has an unexpected number of columns +exception.couldnt_parse_concise_annotation_for_prediction = Couldn't parse concise annotation for prediction profile.\n{0} +exception.newfile = NewickFile\: {0}\n +label.no_tree_read_in = No Tree read in +exception.rnaml_couldnt_access_datasource = Couldn't access datasource ({0}) +exception.ranml_couldnt_process_data = Couldn't process data as RNAML file ({0}) +exception.ranml_invalid_file = Invalid RNAML file ({0}) +exception.ranml_problem_parsing_data = Problem parsing data as RNAML ({0}) +exception.pfam_no_sequences_found = No sequences found (PFAM input) +exception.stockholm_invalid_format = This file is not in valid STOCKHOLM format: First line does not contain '# STOCKHOLM' +exception.couldnt_parse_sequence_line = Could not parse sequence line: {0} +exception.error_parsing_line = Error parsing {0} +exception.unknown_annotation_detected = Unknown annotation detected: {0} {1} +exception.couldnt_store_sequence_mappings = Couldn't store sequence mappings for {0} +exception.matrix_too_many_iteration = Too many iterations in {0} (max is {1}) +exception.browser_not_found = Exception in finding browser: {0} +exception.browser_unable_to_locate = Unable to locate browser: {0} +exception.invocation_target_exception_creating_aedesc = InvocationTargetException while creating AEDesc: {0} +exception.illegal_access_building_apple_evt= IllegalAccessException while building AppleEvent: {0} +exception.instantiation_creating_aedesc = InstantiationException while creating AEDesc: {0} +exception.unable_to_launch_url = Unable to launch URL: {0} +exception.unable_to_create_internet_config = Unable to create an Internet Config instance: {0} +exception.invocation_target_calling_url = InvocationTargetException while calling openURL: {0} +exception.illegal_access_calling_url = IllegalAccessException while calling openURL: {0} +exception.interrupted_launching_browser = InterruptedException while launching browser: {0} +exception.das_source_doesnt_support_sequence_command = Source {0} does not support the sequence command. +exception.invalid_das_source = Invalid das source: {0} +exception.ebiembl_retrieval_failed_on = EBI EMBL XML retrieval failed on {0}:{1} +label.no_embl_record_found = # No EMBL record retrieved for {0}:{1} +label.embl_successfully_parsed = # Successfully parsed the {0} queries into an Alignment +exception.no_pdb_records_for_chain = No PDB Records for {0} chain {1} +exception.unexpected_handling_rnaml_translation_for_pdb = Unexpected exception when handling RNAML translation of PDB data +exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment +exception.unknown_format_for_file = Unknown format {0} for file \: \n{1} +label.remove_gaps = Remove Gaps +exception.couldnt_recover_sequence_props_for_jnet_query = Couldn't recover sequence properties for JNet Query sequence! +exception.server_timeout_try_later = Server timed out - try again later\n +exception.web_service_returned_null_try_later= Server at {0} returned null object, it probably cannot be contacted. Try again later. +exception.cannot_contact_service_endpoint_at = Cannot contact service endpoint at {0} +error.implementation_error_cannot_find_service_url_in_given_set = Implementation error: Cannot find service url in the given url set! +error.implementation_error_cannot_find_service_url_in_given_set_param_store = Implementation error: Cannot find service url in the given url set for this service parameter store ({0}} +exception.jobsubmission_invalid_params_set = Invalid parameter set. Check Jalview implementation +exception.notvaliddata_group_contains_less_than_min_seqs = Group contains less than {0} sequences. +exception.outofmemory_loading_pdb_file = Out of memory loading PDB File +exception.eps_coudnt_write_output_file = Could not write to the output file: {0} +exception.eps_method_not_supported = Method not currently supported by EpsGraphics2D version {0} +exception.eps_unable_to_get_inverse_matrix = Unable to get inverse of matrix: {0} +warn.job_cannot_be_cancelled_close_window = This job cannot be cancelled.\nJust close the window. +warn.service_not_supported = Service not supported! +warn.input_is_too_big = Input is too big! +warn.invalid_job_param_set = Invalid job parameter set! +warn.oneseq_msainput_selection = The current selection only contains a single sequence. Do you want to submit all sequences for alignment instead ? +info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn't support this program.\n{0} +info.job_couldnt_be_run_exceeded_hard_limit = Job could not be run because it exceeded a hard limit on the server.\n{0} +info.job_couldnt_be_run_incorrect_param_setting = Job could not be run because some of the parameter settings are not supported by the server.\n{0}\nPlease check to make sure you have used the correct parameter set for this service\!\n +info.no_jobs_ran = No jobs ran +info.failed_to_submit_prediction = Failed to submit the prediction\:\n{0} {1} +info.invalid_jnet_job_result_data ={0}\n{1}\nInvalid JNet job result data\!\n{2} +info.failed_to_submit_sequences_for_alignment = Failed to submit sequences for alignment.\nIt is most likely that there is a problem with the server.\nJust close the window\n +info.alignment_object_method_notes = \nAlignment Object Method Notes\n +info.server_exception = \n{0} Server exception\!\n{1} +info.invalid_msa_input_mininfo = Need at least two sequences with at least 3 residues each, with no hidden regions between them. +info.invalid_msa_notenough = Not enough sequence data to align +status.processing_commandline_args = Processing commandline arguments... +status.das_features_being_retrived = DAS features being retrieved... +status.searching_for_sequences_from = Searching for sequences from {0} +status.finished_searching_for_sequences_from = Finished searching for sequences from {0} +label.eps_file = EPS file +label.png_image = PNG image +status.saving_file = Saving {0} +status.export_complete = Export complete. +status.fetching_pdb = Fetching PDB {0} +status.refreshing_news = Refreshing news +status.importing_vamsas_session_from = Importing VAMSAS session from {0} +status.opening_params = Opening {0} +status.waiting_sequence_database_fetchers_init = Waiting for Sequence Database Fetchers to initialise +status.init_sequence_database_fetchers = Initialising Sequence Database Fetchers +status.fetching_sequence_queries_from = Fetching {0} sequence queries from {1} +status.finshed_querying = Finished querying +status.parsing_results = Parsing results. +status.processing = Processing... +status.refreshing_web_service_menus = Refreshing Web Service Menus +status.collecting_job_results = Collecting job results. +status.fetching_das_sequence_features = Fetching DAS Sequence Features +status.no_das_sources_active = No DAS Sources Active +status.das_feature_fetching_cancelled = DAS Feature Fetching Cancelled +status.das_feature_fetching_complete = DAS Feature Fetching Complete +status.fetching_db_refs = Fetching db refs +status.loading_cached_pdb_entries = Loading Cached PDB Entries +status.searching_for_pdb_structures = Searching for PDB Structures +status.opening_file = opening file +status.colouring_chimera = Colouring Chimera +label.font_doesnt_have_letters_defined = Font doesn't have letters defined\nso cannot be used\nwith alignment data +label.font_too_small = Font size is too small +label.error_loading_file_params = Error loading file {0} +label.error_loading_jalview_file = Error loading Jalview file +warn.out_of_memory_when_action = Out of memory when {0}\!\!\nSee help files for increasing Java Virtual Machine memory. +warn.out_of_memory_loading_file = Out of memory loading file {0}\!\!\nSee help files for increasing Java Virtual Machine memory. +label.out_of_memory = Out of memory +label.invalid_id_column_width = Invalid ID Column width +warn.user_defined_width_requirements = The user defined width for the\nannotation and sequence ID columns\nin exported figures must be\nat least 12 pixels wide. +label.couldnt_create_sequence_fetcher = Couldn't create SequenceFetcher +warn.couldnt_create_sequence_fetcher_client = Could not create the sequence fetcher client. Check error logs for details. +warn.server_didnt_pass_validation = Service did not pass validation.\nCheck the Jalview Console for more details. +warn.url_must_contain = Sequence URL must contain $SEQUENCE_ID$ or a regex $SEQUENCE_ID=//=$ +info.validate_jabaws_server = Validate JabaWS Server ?\n(Look in console output for results) +label.test_server = Test Server? +info.you_want_jalview_to_find_uniprot_accessions = Do you want Jalview to find\nUniprot Accession ids for given sequence names? +label.find_uniprot_accession_ids = Find Uniprot Accession Ids +label.new_sequence_fetcher = New Sequence Fetcher +label.additional_sequence_fetcher = Additional Sequence Fetcher +label.select_database_retrieval_source = Select Database Retrieval Source +label.overwrite_existing_file = Overwrite existing file? +label.file_already_exists = File exists +label.edit_jabaws_url = Edit JABAWS URL +label.add_jabaws_url = Add new JABAWS URL +label.news_from_jalview = News from http://www.jalview.org +label.cut_paste_alignmen_file = Cut & Paste Alignment File +label.enter_redundancy_thereshold = Enter the redundancy threshold +label.select_dark_light_set_thereshold = Select a dark and light text colour, then set the threshold to
    switch between colours, based on background colour
    +label.select_feature_colour = Select Feature Colour +label.delete_all = Delete all sequences +warn.delete_all = Deleting all sequences will close the alignment window.
    Confirm deletion or Cancel. +label.add_annotations_for = Add annotations for +label.choose_annotations = Choose annotations +label.find = Find +label.invalid_search = Search string invalid +error.invalid_regex = Invalid regular expression +label.ignore_gaps_consensus = Ignore Gaps In Consensus +label.show_group_histogram = Show Group Histogram +label.show_group_logo = Show Group Logo +label.normalise_group_logo = Normalise Group Logo +label.show_histogram = Show Histogram +label.show_logo = Show Logo +label.normalise_logo = Normalise Logo +label.no_colour_selection_in_scheme = Please make a colour selection before applying colour scheme +label.no_colour_selection_warn = Error saving colour scheme +label.open_split_window? = Would you like to open as a split window, with cDNA and protein linked? +label.open_split_window = Open split window +label.no_mappings = No mappings found +label.mapping_failed = No sequence mapping could be made between the alignments.
    A mapping requires sequence names to match, and equivalent sequence lengths. +action.no = No +action.yes = Yes +label.for = for +label.select_by_annotation = Select/Hide Columns by Annotation +action.select_by_annotation = Select/Hide Columns by Annotation... +label.threshold_filter = Threshold Filter +action.hide = Hide +action.select = Select +label.alpha_helix = Alpha Helix +label.beta_strand = Beta Strand +label.turn = Turn +label.select_all = Select All +label.structures_filter = Structures Filter +label.search_filter = Search Filter +label.description = Description +label.include_description= Include Description +action.back = Back +label.hide_insertions = Hide Insertions +label.mark_as_representative = Mark as representative +label.open_jabaws_web_page = Open JABAWS web page +label.opens_the_jabaws_server_homepage = Opens the JABAWS server's homepage in web browser +label.pdb_sequence_getcher = PDB Sequence Fetcher +label.result = result +label.results = results +label.structure_chooser = Structure Chooser +label.select = Select : +label.invert = Invert +label.select_pdb_file = Select PDB File +info.select_filter_option = Select Filter Option/Manual Entry +info.associate_wit_sequence = Associate with Sequence +label.search_result = Search Result +label.found_structures_summary = Found Structures Summary +label.configure_displayed_columns = Configure Displayed Columns +label.start_jalview = Start Jalview +label.biojs_html_export = BioJS +label.scale_as_cdna = Scale protein residues to codons +label.scale_protein_to_cdna = Scale Protein to cDNA +label.scale_protein_to_cdna_tip = Make protein residues same width as codons in split frame views +info.select_annotation_row = Select Annotation Row +info.enter_search_text_here = Enter Search Text Here +info.enter_search_text_to_enable = Enter Search Text to Enable +info.search_in_annotation_label = Search in {0} Label +info.search_in_annotation_description = Search in {0} Description +info.change_threshold_mode_to_enable = Change Threshold Mode to Enable diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 6db40cf..3e74e40 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -1,1136 +1,1136 @@ -action.refresh_services = Refrescar servicios -action.reset_services = Reiniciar servicios -action.merge_results = Unificar resultados -action.load_scheme = Cargar esquema -action.save_scheme = Guardar esquema -action.save_image = Guardar imagen -action.paste = Pegar -action.show_html_source = Mostrar código HTML -action.print = Imprimir -action.web_service = Servicio web -action.cancel_job = Cancelar trabajo -action.start_job = Arrancar trabajo -action.revert = Deshacer -action.move_down = Mover hacia abajo -action.move_up = Mover hacia arriba -action.remove_return_datatype = Borrar tipo de datos de retorno -action.add_return_datatype = Añadir tipo de datos de retorno -action.remove_input_parameter = Borrar el parámetro de entrada seleccionado -action.add_input_parameter = Añadir parámetro de entrada seleccionado -action.edit = Editar -action.new = Nuevo -action.open_file = Abrir fichero -action.show_unconserved = Mostrar regiones no conservadas -action.open_new_alignment = Abrir nuevo alineamiento -action.raise_associated_windows = Destacar ventanas asociadas -action.minimize_associated_windows = Minimizar ventanas asociadas -action.close_all = Cerrar todo -action.load_project = Cargar proyecto -action.save_project = Guardar proyecto -action.quit = Salir -action.expand_views = Expandir vistas -action.gather_views = Capturar vistas -action.page_setup = Configuración de la página -action.reload = Recargar -action.load = Cargar -action.open = Abrir -action.cancel = Cancelar -action.create = Crear -action.update = Actualizar -action.delete = Borrar -action.snapshot = Imagen -action.clear = Limpiar -action.accept = Aceptar -action.select_ddbb = --- Seleccionar base de datos --- -action.undo = Deshacer -action.redo = Rehacer -action.reset = Reiniciar -action.remove_left = Eliminar parte izquierda -action.remove_right = Eliminar parte derecha -action.remove_empty_columns = Eliminar las columnas vacías -action.remove_all_gaps = Eliminar todos los huecos -action.left_justify_alignment = Ajustar el alineamiento a la izquierda -action.right_justify_alignment = Ajustar el alineamiento a la derecha -action.boxes = Casillas -action.text = Texto -action.by_pairwise_id = Identificar por parejas -action.by_id = Por identificador -action.by_length = Por longitud -action.by_group = Por grupo -action.remove = Eliminar -action.remove_redundancy = Eliminar redundancia... -action.pairwise_alignment = Alineamiento de pares... -action.by_rna_helixes = Por hélices de RNA -action.user_defined = Definido por el usuario... -action.by_conservation = Por conservación -action.wrap = Envolver -action.show_gaps = Mostrar huecos -action.show_hidden_markers = Mostrar marcadores ocultos -action.find = Buscar -action.undefine_groups = Grupos sin definir -action.create_groups = Crear grupos -action.make_groups_selection = Hacer grupos para seleccionar -action.copy = Copiar -action.cut = Cortar -action.font = Fuente... -action.scale_above = Escala superior -action.scale_left = Escala izquierda -action.scale_right = Escala derecha -action.by_tree_order = Por orden del árbol -action.sort = Ordenar -action.calculate_tree = Calcular árbol -action.help = Ayuda -action.by_annotation = Por anotación... -action.invert_sequence_selection = Invertir selección de secuencias -action.invert_column_selection = Invertir selección de columnas -action.show = Mostrar -action.hide = Ocultar -action.ok = OK -action.set_defaults = Defecto -action.create_group = Crear grupo -action.remove_group = Eliminar grupo -action.edit_group = Editar grupo -action.border_colour = Color del borde -action.edit_new_group = Editar nuevo grupo -action.hide_sequences = Ocultar secuencias -action.sequences = Secuencias -action.ids = IDS -action.ids_sequences = IDS y secuencias -action.reveal_all = Revelar todo -action.reveal_sequences = Revelar secuencias -action.find_all = Buscar todo -action.find_next = Buscar siguiente -action.file = Archivo -action.view = Ver -action.change_params = Cambiar parámetros -action.apply = Aplicar -action.apply_threshold_all_groups = Aplicar umbral a todos los grupos -action.apply_all_groups = Aplicar a todos los grupos -action.by_chain = Por cadena -action.by_sequence = Por secuencia -action.paste_annotations = Pegar anotaciones -action.format = Formato -action.select = Seleccionar -action.new_view = Nueva vista -action.close = Cerrar -action.add = Añadir -action.save_as_default = Guardar como por defecto -action.save_as = Guardar como -action.save = Guardar -action.cancel_fetch = Cancelar búsqueda -action.save_omit_hidden_columns = Guardar / Omitir las columnas ocultas -action.change_font = Cambiar Fuente -action.change_font_tree_panel = Cambiar fuente (panel del árbol) -action.colour = Color -action.calculate = Calcular -action.select_all = Seleccionar Todo -action.deselect_all = Deseleccionar Todo -action.invert_selection = Invertir selección -action.using_jmol = Usar Jmol -action.link = Enlazar -action.group_link = Enlazar grupo -action.show_chain = Mostrar cadena -action.show_group = Mostrar grupo -action.fetch_db_references = Recuperar referencias a base de datos -action.view_flanking_regions = Mostrar flancos -label.view_flanking_regions = Mostrar los datos de la secuencia a ambos lados de las subsecuencias implicadas en este alineamiento -label.str = Str: -label.seq = Seq: -label.structures_manager = Administrar estructuras -label.nickname = Sobrenombre: -label.url = URL: -label.input_file_url = Introducir URL en el fichero de entrada -label.select_feature = Seleccionar función: -label.name = Nombre: -label.name_param = Nombre: {0} -label.group = Grupo: -label.group_name = Nombre del grupo -label.group_description = Descripción del grupo -label.edit_group_name_description = Editar nombre/descripción del grupo -label.colour = Color: -label.description = Descripción: -label.start = Comenzar: -label.end = Terminar: -label.current_parameter_set_name = Nombre actual del conjunto de parámetros: -label.service_action = Acción de servicio: -label.post_url = POST URL: -label.url_suffix = URL Sufijo -label.sequence_source = Fuente de la secuencia -label.per_seq = por secuencia -label.result_vertically_separable = Los resultados son separables verticalmente -label.amend = Modificar -label.undo_command = Deshacer {0} -label.redo_command = Rehacer {0} -label.principal_component_analysis = Análisis del Componente Principal -label.average_distance_identity = Distancia Media Usando % de Identidad -label.neighbour_joining_identity = Unir vecinos utilizando % de Identidad -label.treecalc_title = {0} utilizando {1} -label.tree_calc_av = Distancia media -label.tree_calc_nj = Unir vecinos -label.select_score_model = Selecciones modelo de puntuación -label.score_model_pid = % Identidad -label.score_model_blosum62 = BLOSUM62 -label.score_model_pam250 = PAM 250 -label.score_model_conservation = Conservación de las propiedades físico-químicas -label.score_model_enhconservation = Conservación de las propiedades físico-químicas -label.status_bar = Barra de estado -label.out_to_textbox = Generar cuadro de texto -label.clustalx = Clustalx -label.clustal = Clustal -label.zappo = Zappo -label.taylor = Taylor -label.blc = BLC -label.fasta = Fasta -label.msf = MSF -label.pfam = PFAM -label.pileup = Pileup -label.pir = PIR -label.hydrophobicity = Hidrofobicidad -label.helix_propensity = Tendencia de la hélice -label.strand_propensity = Tendencia de la hebra -label.turn_propensity = Tendencia de giro -label.buried_index = Índice de encubrimiento -label.purine_pyrimidine = Purina/Pirimidina -label.percentage_identity = Porcentaje de identidad -label.blosum62 = BLOSUM62 -label.blosum62_score = Puntuación del BLOSUM62 -label.tcoffee_scores = Puntuación del T-Coffee -label.average_distance_bloslum62 = Distancia Media Usando BLOSUM62 -label.neighbour_blosum62 = Neighbour Joining usando BLOSUM62 -label.show_annotations = Mostrar anotaciones -label.colour_text = Color del texto -label.show_non_conversed = Mostrar no conservadas -label.overview_window = Ventana resumen -label.none = Ninguno -label.above_identity_threshold = Por encima del umbral de identidad -label.show_sequence_features = Mostrar las características de las secuencias -label.nucleotide = Nucleótido -label.to_new_alignment = A nuevo alineamiento -label.to_this_alignment = Añadir a este alineamiento -label.apply_colour_to_all_groups = Aplicar color a todos los grupos -label.modify_identity_thereshold = Modificar el umbral de identidad... -label.modify_conservation_thereshold = Modificar el umbral de conservación... -label.input_from_textbox = Introducir desde el cuadro de texto -label.centre_column_labels = Centrar las etiquetas de las columnas -label.automatic_scrolling = Desplazamiento automático -label.documentation = Documentación -label.about = Acerca de... -label.show_sequence_limits = Mostrar los límites de la secuencia -label.feature_settings = Ajustar funciones... -label.sequence_features = Funciones de la secuencia -label.all_columns = Todas las columnas -label.all_sequences = Todas las secuencias -label.selected_columns = Columnas seleccionadas -label.selected_sequences = Secuencias seleccionadas -label.all_but_selected_region = Todo menos la región seleccionada (Shift+Ctrl+H) -label.selected_region = Región seleccionada -label.all_sequences_columns = Todas las secuencias y columnas -label.group_consensus = Consenso de grupo -label.group_conservation = Conservación de grupo -label.show_consensus_histogram = Mostrar el histograma de consenso -label.show_consensus_logo = Mostrar el logo de consenso -label.norm_consensus_logo = Normalizar el logo de consenso -label.apply_all_groups = Aplicar a todos los grupos -label.autocalculated_annotation = Anotación autocalculada -label.min_colour = Color mínimo -label.max_colour = Color máximo -label.use_original_colours = Usar colores originales -label.threshold_minmax = El umbral es mín/máx -label.represent_group_with = Representar al grupo con -label.selection = Seleccionar -label.group_colour = Color del grupo -label.sequence = Secuencia -label.view_pdb_structure = Ver estructura PDB -label.min = Mín: -label.max = Máx: -label.colour_by_label = Color por etiquetas -label.new_feature = Nueva función -label.match_case = Hacer corresponder mayúsculas y minúsculas -label.view_alignment_editor = Ver en el editor de alineamientos -label.labels = Etiquetas -label.output_values = Valores de salida... -label.output_points = Puntos de salida... -label.output_transformed_points = Puntos de salida transformados -label.input_data = Datos de entrada... -label.nucleotide_matrix = Matriz nucleotídica -label.protein_matrix = Matriz proteica -label.show_bootstrap_values = Mostrar valores de Bootstrap -label.show_distances = Mostrar distancias -label.mark_unassociated_leaves = Marcar hojas no asociadas -label.fit_to_window = Ajustar a la ventana -label.newick_format = Formato Newick -label.select_newick_like_tree_file = Seleccione un fichero de árbol tipo Newick -label.colours = Colores -label.view_mapping = Ver mapeado -label.wireframe = Estructura metálica -label.depthcue = Clave de profundidad -label.z_buffering = Tamponamiento Z -label.charge_cysteine = Carga & Cisteína -label.all_chains_visible = Todas las cadenas visibles -label.successfully_added_features_alignment = Funciones añadidas exitosamente al alineamiento -label.keyboard_editing_mode = El modo de editar teclado es {0} -label.paste_features_annotations_Tcoffee_here = Pegar tus funciones / anotaciones / puntuación del fichero T-coffee aquí. -label.removed_columns = {0} columnas eliminadas. -label.removed_empty_columns = {0} columnas vacías eliminadas. -label.paste_newick_tree_file = Pegar su fichero árbol Newick aquí. -label.order_by_params = Ordenar por {0} -label.html_content = {0} -label.paste_pdb_file= Pegar tu fichero PDB aquí. -label.paste_pdb_file_for_sequence = Pegar fichero PDB para la secuencia {0} -label.could_not_parse_newick_file = No se pudo analizar el fichero Newick\\\!\\n {0} -label.successfully_pasted_tcoffee_scores_to_alignment= Pegada exitosamente la puntuación T-Coffee al alineamiento. -label.failed_add_tcoffee_scores = Fallo al añadir las puntuaciones T-Coffee: -label.successfully_pasted_annotation_to_alignment = Anotación pegada exitosamente al alineamiento. -label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file = No es posible parsear el texto pegado como una anotación características, GFF, o fichero T-Coffee válidos -label.successfully_pasted_alignment_file = Fichero de alineamiento pegado exitosamente -label.paste_your_alignment_file = Pegar su fichero de alineamiento aquí -label.paste_your = Pegar su -label.finished_searching = Búsqueda finalizada -label.search_results= Buscar Resultados {0} : {1} -label.found_match_for = Buscar coincidencia para {0} -label.font = Fuente: -label.size = Talla: -label.style = Estilo: -label.enter_redundancy_threshold = Introducir el umbral de redundancia -label.calculating = Calculando.... -label.modify_conservation_visibility = Modificar la visibilidad de conservación -label.colour_residues_above_occurence = Residuos de color por encima del % de aparición -label.set_this_label_text = fijar como etiqueta -label.sequences_from = Secuencias de {0} -label.successfully_loaded_file = Fichero cargado exitosamente {0} -label.successfully_saved_to_file_in_format = Guardado exitosamente en el fichero: {0} en formato {1}. -label.copied_sequences_to_clipboard = Copiadas {0} secuencias en el portapapeles. -label.check_file_matches_sequence_ids_alignment = Comprobar que el fichero coincide con el ID de la secuencia en el alineamiento. -label.problem_reading_tcoffee_score_file = Problema de lectura del fichero de puntuaciones T-COFFEE -label.source_to_target = {0} a {1} -label.per_sequence_only= Sólo por secuencia -label.to_file = a fichero -label.to_textbox = a cuadro de texto -label.jalview = Jalview -label.csv_spreadsheet = CSV (Hoja de cálculo) -label.status = [Estado] -label.channels = Canales -label.channel_title_item_count = {0} ({1}) -label.blog_item_published_on_date = {0} {1} -label.select_das_service_from_table = Seleccionar servicio DAS de la tabla para leer una descripción completa aquí. -label.session_update = Actualizar sesión -label.new_vamsas_session = Nueva sesión Vamsas -label.load_vamsas_session = Cargar sesión Vamsas -label.save_vamsas_session = Guardar sesión Vamsas -label.select_vamsas_session_opened_as_new_vamsas_session= Selecciones una sesión vamsas para abrirla como una nueva sesión. -label.open_saved_vamsas_session = Abrir una sesión VAMSAS guardada -label.groovy_console = Consola Groovy -label.lineart = lineart -label.dont_ask_me_again = No volver a preguntar -label.select_eps_character_rendering_style = Seleccionar el carácter EPS como estilo de visualización -label.invert_selection = Invertir selección -label.optimise_order = Optimizar orden -label.seq_sort_by_score = Ordenar las secuencias por puntuación -label.load_colours = Cargar colores -label.save_colours = Guardar colores -label.fetch_das_features = Recuperar funciones DAS -label.selected_database_to_fetch_from = Seleccionada {0} Base de datos {1} para buscar de {2} -label.database_param = Base de datos: {0} -label.example = Ejemplo -label.example_param = Ejemplo: {0} -label.select_file_format_before_saving = Debe seleccionar un formato de fichero antes de guardar! -label.file_format_not_specified = Formato de fichero no especificado -label.alignment_contains_hidden_columns = El alineamiento contiene columnas ocultas.\\nQuieres guardar s\u00F3lo el alineamiento visible? -label.couldnt_save_file = No se pudo guardar el fichero: {0} -label.error_saving_file = Error guardando el fichero -label.remove_from_default_list = eliminar de la lista de defectuosos? -label.remove_user_defined_colour = Eliminar el color definido por el usuario -label.you_must_select_least_two_sequences = Debes seleccionar al menos 2 secuencias. -label.invalid_selection = Selección inválida -label.principal_component_analysis_must_take_least_four_input_sequences = El an\u00E1lisis de la componente principal debe tomar\\nal menos 4 secuencias de entrada. -label.sequence_selection_insufficient = Selección de secuencias insuficiente -label.you_need_more_two_sequences_selected_build_tree = necesitas seleccionar más de dos secuencias para construir un árbol! -label.not_enough_sequences = No suficientes secuencias -label.selected_region_to_tree_may_only_contain_residues_or_gaps = La regi\u00F3n seleccionada para construir un \u00E1rbol puede\\ncontener s\u00F3lo residuos o espacios.\\nPrueba usando la funci\u00F3n Pad en el men\u00FA de edici\u00F3n,\\n o uno de los m\u00FAltiples servicios web de alineamiento de secuencias. -label.sequences_selection_not_aligned = Las secuencias seleccionadas no están alineadas -label.sequences_must_be_aligned_before_creating_tree = Las secuencias deben estar alineadas antes de crear el \u00E1rbol.\\nPrueba usando la funci\u00F3n Pad en el men\u00FA de editar,\\n o uno de los m\u00FAltiples servicios web de alineamiento de secuencias. -label.sequences_not_aligned = Secuencias no alineadas -label.problem_reading_tree_file = Problema al leer el fichero del árbol -label.possible_problem_with_tree_file = Posible problema con el fichero del árbol -label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Por favor seleccionar al menos tres bases de al menos una secuencia para poder realizar la traducción de cDNA. -label.translation_failed = Translation Failed -label.error_when_translating_sequences_submit_bug_report = Desafortunadamente, algo fue mal a la hora de traducir tus secuencias.\\nPor favor, revisa la consola Jalview java \\ny presenta un informe de error que incluya el seguimiento. -label.implementation_error = Error de implementación: -label.automatically_associate_pdb_files_with_sequences_same_name = Quieres asociar automáticamente los {0} ficheros PDB con las secuencias del alineamiento que tengan el mismo nombre? -label.automatically_associate_pdb_files_by_name = Asociar los ficheros PDB por nombre automáticamente -label.ignore_unmatched_dropped_files_info = Quieres ignorar los {0} ficheros cuyos nombres no coincidan con ningún IDs de las secuencias ? -label.ignore_unmatched_dropped_files = Ignorar los ficheros sin coincidencias? -label.enter_view_name = Introducir nombre visible (¿?) -label.enter_label = Introducir etiqueta -label.enter_label_for_the_structure = Introducir una etiqueta para la estructura? -label.pdb_entry_is_already_displayed = {0} Ya est\u00E1 mostrado.\\nQuieres volver a usar este visor? -label.map_sequences_to_visible_window = Mapa de secuencias en ventana visible: {0} -label.add_pdbentry_to_view = Quieres a\u00F1adir {0} a la vista llamada\\n{1}\\n -label.align_to_existing_structure_view = Alinear a una estructura ya existente -label.pdb_entries_couldnt_be_retrieved = Las siguientes entradas pdb no pueden ser extra\u00EDdas del PDB\\\:\\n{0}\\nPor favor, prueba descarg\u00E1ndolas manualmente. -label.couldnt_load_file = No se pudo cargar el fichero -label.couldnt_find_pdb_id_in_file = No se pudo encontrar un Id PDB en el fichero suministrado. Por favor, introduzca un Id para identificar esta estructura. -label.no_pdb_id_in_file = No hay un Id PDB en el fichero -label.couldnt_read_pasted_text = No se pudo leer el texto pegado {0} -label.error_parsing_text = Error analizando el texto -label.enter_local_das_source = Intruduzca el Nickname & URL de la fuente DAS local -label.you_can_only_edit_or_remove_local_das_sources = Sólo puedes editar o eliminar fuentes DAS locales! -label.public_das_source = Fuente pública DAS - no editable -label.input_alignment_from_url = Alineamiento de entrada desde URL -label.input_alignment = Alineamiento de entrada -label.couldnt_import_as_vamsas_session = No se pudo importar {0} como una nueva sesión Vamsas. -label.vamsas_document_import_failed = Fallo en la importación del documento Vamsas -label.couldnt_locate = No se pudo localizar {0} -label.url_not_found = URL no encontrada -label.no_link_selected = Enlace no seleccionado -label.new_sequence_url_link = Enlace a una nueva secuencia URL -label.cannot_edit_annotations_in_wrapped_view = No se pueden editar anotaciones en vista envolvente -label.wrapped_view_no_edit = Vista envolvente - no editar -label.error_retrieving_data = Error en la recuperación de datos -label.user_colour_scheme_must_have_name = El esquema de colores del usuario debe tener un nombre -label.no_name_colour_scheme = No hay nombre para el esquema de colores -label.invalid_url = URL Invalido! -label.error_loading_file = Error al cargar el fichero -label.problems_opening_file = Encontrados problemas al abrir el fichero {0}!! -label.file_open_error = Error al abrir el fichero -label.no_das_sources_selected_warn = No han sido seleccionadas fuentes DAS.\\nPor favor, seleccione algunas fuentes y\\npruebe de nuevo. -label.no_das_sources_selected_title = No han sido seleccionadas fuentes DAS -label.colour_scheme_exists_overwrite = El esquema de colores {0} ya existe.\\nContinuar guardando el esquema de colores como {1}? -label.duplicate_scheme_name = Duplicar nombre de esquema -label.jalview_new_questionnaire = Hay un nuevo cuestionario disponible. Querr\u00EDa completarlo ahora ?\\n -label.jalview_user_survey = Encuesta de usuario Jalview -label.alignment_properties = Propiedades del alineamiento: {0} -label.alignment_props = Propiedades del alineamiento -label.input_cut_paste = Cortar y pegar la entrada -label.input_cut_paste_params = Cortar y pegar la entrada - {0} -label.alignment_output_command = Alineamiento de salida - {0} -label.annotations = Anotaciones -label.features = Funciones -label.overview_params = Visión general {0} -label.paste_newick_file = Pegar nuevo fichero Newick -label.load_tree_from_file = desde fichero - -label.colour_by_annotation = Color por anotación -label.selection_output_command = Seleccionar salida - {0} -label.annotation_for_displayid =

    Anotación para {0}

    -label.pdb_sequence_mapping = PDB - Mapeado de secuencia -label.pca_details = detalles de la PCA -label.redundancy_threshold_selection = Selección del umbral de redundancia -label.user_defined_colours = Colores definidos del usuario -label.jalviewLite_release = JalviewLite - versión {0} -label.jaview_build_date = Fecha de creación: {0} -label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt, -label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. -label.jalview_dev_managers = Desarrollo gestionado por The Barton Group, University of Dundee, Scotland, UK. -label.jalview_distribution_lists = Para ayuda, ver el FAQ at www.jalview.org y/o adjuntar la lista de envío jalview-discuss@jalview.org -label.jalview_please_cite = Si usa Jalview incluya la siguiente cita, por favor: -label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) -label.jalview_cite_1_title = Jalview Version 2 - un editor de alineamiento múltiple de secuencias y banco de trabajo de análisis -label.jalview_cite_1_ref = Bioinformaticos doi: 10.1093/bioinformatics/btp033 -label.right_click = clic en el botón derecho -label.to_add_annotation = para añadir anotación -label.alignment_has_no_annotations = El alineamiento no tiene anotaciones -label.retrieving_pdb_data = Recuperación de datos PDB... -label.label = Etiqueta -label.no_features_added_to_this_alignment = No hay funciones asociadas a este alineamiento!! -label.features_can_be_added_from_searches_1 = (Las funciones pueden ser añadidas de búsquedas o -label.features_can_be_added_from_searches_2 = de ficheros de funciones Jalview / GFF) -label.calculating_pca= Calculando PCA -label.reveal_columns = Mostrar Columnas -label.jalview_cannot_open_file = Jalview no puede abrir el fichero -label.jalview_applet = Aplicación Jalview -label.loading_data = Cargando datos -label.memory_stats = Memoria libre total: {0} MB; Memoria máxima: {1} MB; {2} % -label.calculating_tree = Calculando árbol -label.state_queueing = En cola -label.state_running = Procesando -label.state_complete = Completar -label.state_completed = Finalizado -label.state_job_cancelled = ¡Trabajo cancelado! -label.state_job_error = Error del trabajo! -label.server_error_try_later = ¡Error del servidor! (Intentar más tarde) -label.error_loading_pdb_data = ¡Error cargando los datos PDB! -label.fetching_pdb_data = Buscando los datos PDB... -label.structure_type = Estructura_tipo -label.settings_for_type = Ajustes para {0} -label.view_full_application = Ver en la aplicación completa -label.load_associated_tree = Cargar árbol asociado ... -label.load_features_annotations = Cargar características/anotaciones ... -label.export_features = Exportar características... -label.export_annotations = Exportar anotaciones ... -label.jalview_copy = Copiar (sólo Jalview) -label.jalview_cut = Cortar (sólo Jalview) -label.to_upper_case = Pasar a mayúsculas -label.to_lower_case = Pasar a minúsculas -label.toggle_case = Alternar mayúsculas y minúsculas -label.edit_name_description = Editar nombre/descripción -label.create_sequence_feature = Crear función de secuencia -label.edit_sequence = Editar secuencia -label.edit_sequences = Editar secuencias -label.sequence_details = Detalles de la secuencia -label.jmol_help = Ayuda de Jmol -label.all = Todo -label.sort_by = Ordenar por -label.sort_by_score = Ordenar por puntuación -label.sort_by_density = Ordenar por densidad -label.sequence_sort_by_density = Ordenar las secuencias por densidad -label.reveal = Revelar -label.hide_columns = Ocultar columnas -label.load_jalview_annotations = Cargar un fichero de anotación de Jalivew o un fichero de características -label.load_tree_file = Cargar un fichero de árbol -label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = Recuperar y parsear un registro de secuencia de base de datos para el alineamiento o secuencias actualmente seleccionados -label.standard_databases = Bases de datos estándar -label.fetch_embl_uniprot = Recuperar de EMBL/EMBLCDS o Uniprot/PDB y de cualquier fuente DAS seleccionada -label.reset_min_max_colours_to_defaults = Reiniciar los colores min y max colours a los valores por defecto establecidos en las preferencias de usuario -label.align_structures_using_linked_alignment_views = Alinear las estructuras utlizando las {0} vistas de alineamiento enlazadas -label.connect_to_session = Conectar a la sesión {0} -label.threshold_feature_display_by_score = Filtrar la característica mostrada por puntuación. -label.threshold_feature_no_thereshold = Sin umbral -label.threshold_feature_above_thereshold = Por encima del umbral -label.threshold_feature_below_thereshold = Por debajo del umbral -label.adjust_thereshold = Ajustar umbral -label.toggle_absolute_relative_display_threshold = Cambiar entre mostrar el umbral absoluto y el relativo. -label.display_features_same_type_different_label_using_different_colour = Mostrar las características del mismo tipo con una etiqueta diferente y empleando un color distinto (p.e. características del dominio) -label.select_colour_minimum_value = Seleccionar el color para el valor mínimo -label.select_colour_maximum_value = Seleccionar el color para el valor máximo -label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista Jmol con todas las estructuras asociadas con la selección acxtual y superponer las utilizando el alineamiento. -label.open_url_param = Abrir URL {0} -label.open_url_seqs_param = Abrir URL ({0}..) ({1} secuencias) -label.load_pdb_file_associate_with_sequence = Cargar un fichero PDB y asociarlo con la secuencia {0} -label.reveal_hidden_columns = Revelar las columnas ocultas con el botón derecho del ratón -label.dark_colour = Oscurecer color -label.light_colour = Aclarar color -label.highlightnode = Pulse el botón izquierdo para seleccionar las hojas.
    Haga doble clic para invertir las hojas.
    Pulse el botón derecho para cambiar el color. -label.load_colour_scheme = Cargar esquema cromático -label.toggle_enabled_views = Cuando está habilitado, permite que se seleccionen varias vistas. -label.edit_notes_parameter_set = Haga clic para editar las notas de este conjunto de parámetros. -label.open_local_file = Abrir fichero local -label.enable_automatically_sort_alignment_when_open_new_tree = Habilite esta opción para ordenar automáticamente
    el alineamiento cuando abra
    un nuevo árbol. -label.listen_for_selections = Atención a las selecciones -label.selections_mirror_selections_made_same_sequences_other_views = Cuando está habilitado, las selecciones de esta vista serán un reflejo
    de las selecciones realizadas en las mismas secuencias de otras vistas. -label.toggle_sequence_visibility = Shift+H cambia la visibilidad de la secuencia -label.toggle_columns_visibility = Ctrl+H cambia la visibilidad de la columna -label.toggles_visibility_hidden_selected_regions = H cambiar la visibilidad de las regiones ocultas o seleccionadas -label.rename_tab_eXpand_reGroup= Haga clic en el botón derecho para renombrar la pestaña
    Presione X para expandir las tablas y G para reagrupar. -label.right_align_sequence_id = Alinear a la derecha el ID de la secuencia -label.sequence_id_tooltip = Ayuda del ID de la secuencia -label.no_services = -label.select_copy_raw_html = Seleccione esta opción si desea copiar el html en bruto -label.share_data_vamsas_applications = Compartir datos con otras aplicaciones vamsas -label.connect_to = Conectar a -label.join_existing_vamsas_session = Unirse a una sesión vamsas existente -label.from_url = desde una URL -label.any_trees_calculated_or_loaded_alignment_automatically_sort = Cuando está habilitado, cualquier árbol calculado o cargado en el alineamiento lo ordenará -label.sort_with_new_tree = Ordenar con el nuevo árbol -label.from_textbox = desde un área de texto -label.window = Ventana -label.preferences = Preferencias -label.tools = Herramientas -label.fetch_sequences = Recuperar secuencia(s) -label.stop_vamsas_session = Parar sesión vamsas -label.collect_garbage = Recolector de basura -label.show_memory_usage = Mostrar uso de memoria -label.show_java_console = Mostrar consola de Java -label.show_jalview_news = Mostrar las noticias de Jalview -label.take_snapshot = Tomar captura -label.monospaced_fonts_faster_to_render = Las fuentes monoespaciadas son más rápidas de pintar -label.anti_alias_fonts = Fuentes anti-alias (más lentas de pintar) -label.monospaced_font= Monoespaciadas -label.quality = Calidad -label.maximize_window = Maximizar ventana -label.conservation = Conservación -label.consensus = Consenso -label.histogram = Histograma -label.logo = Logo -label.non_positional_features = Características no posicionales -label.database_references = Referencias a base de datos -label.share_selection_across_views = Compartir la selección en todas las vistas -label.scroll_highlighted_regions = Desplazarse hasta las regiones resaltadas -label.gap_symbol = Símbolo del hueco -label.alignment_colour = Color del alineamiento -label.address = Dirección -label.port = Puerto -label.default_browser_unix = Navegador por defecto (Unix) -label.send_usage_statistics = Enviar estadísticas de uso -label.check_for_questionnaires = Comprobar los cuestionarios -label.check_for_latest_version = Comprobar la última versión -label.url_linkfrom_sequence_id = URL del enlace del ID de la secuencia -label.use_proxy_server = Utilizar un servidor proxy -label.eps_rendering_style = Estilo de visualización EPS -label.append_start_end = Añadir /inicio-fin (/15-380) -label.full_sequence_id = ID de la secuencia completo -label.smooth_font = Fuente alargada -label.autocalculate_consensus = Autocalcular consenso -label.pad_gaps = Rellenar huecos -label.pad_gaps_when_editing = Rellenar huecos al editar -label.automatically_set_id_width = Establecer automáticamente al anchura del ID -label.figure_id_column_width = Anchura de la columna del ID de la Figura -label.use_modeller_output = Utilizar la salidad del Modeller -label.wrap_alignment = Envolver alineamiento -label.right_align_ids = Alinear IDs a la derecha -label.sequence_name_italics = Nombre de la secuencia en cursiva -label.open_overview = Abrir resumen -label.default_colour_scheme_for_alignment = Esquema cromático por defecto para el alineamiento -label.annotation_shading_default = Sombreado por defecto de la anotación -label.default_minimum_colour_annotation_shading = Por mínimo por defecto para el sombreado de la anotación -label.default_maximum_colour_annotation_shading = Por máximo por defecto para el sombreado de la anotación -label.visual = Visual -label.connections = Conexiones -label.output = Salida -label.editing = Edición -label.das_settings = Configuración DAS -label.web_services = Servicios web -label.right_click_to_edit_currently_selected_parameter = Haga clic en el botón derecho para editar el parámetro seleccionado actualmente. -label.let_jmol_manage_structure_colours = Permitir que Jmol gestione la estructuras cromáticas -label.marks_leaves_tree_not_associated_with_sequence = Marcar las hojas del árbol que no están asociadas a una secuencia -label.index_web_services_menu_by_host_site = Indizar los servicios web en el menú por el host que los aloja -label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up = Marque esta opción si desea ser informado
    cuando no se pueda acceder a la URL de un servicio web
    al arrancar Jalview. -label.new_service_url = Nueva URL del servicio -label.edit_service_url = Editar la URL del servicio -label.delete_service_url = Borrar la URL del servicio -label.details = Detalles -label.options = Opciones -label.parameters = Paramétros -label.available_das_sources = Fuentes DAS disponibles -label.full_details = Detalles completos -label.authority = Autoridad -label.type = Tipo -label.proxy_server = Servidor proxy -label.file_output = Fichero de salida -label.select_input_type = Seleccionar el tipo de entrada -label.set_options_for_type = Establecer opciones para el tipo -label.data_input_parameters = Datos de los parámetros de entrada -label.data_returned_by_service = Datos devueltos por el servicio -label.rsbs_encoded_service = Servicio RSBS codificado -label.parsing_errors = Errores de parseo -label.simple_bioinformatics_rest_services = Simple Bioinformatics Rest Services -label.web_service_discovery_urls = URL de descubrimiento de servicios web -label.input_parameter_name = Nombre del parámetro de entrada -label.short_descriptive_name_for_service = Nombre corto descriptivo del servicio -label.function_service_performs = Tipo de función que realiza el servicio (p.e. alineamiento, análisis, búsqueda, etc). -label.brief_description_service = Descripción breve del servicio -label.url_post_data_service = URL a la que enviar los datos del servicio. Incluya cualquier parámetro especial que se necesite aquí -label.optional_suffix = Sufijo opcional añadido a la URL al recuperar los resultados del servicio -label.preferred_gap_character = ¿Qué caracter para el hueco prefiere el servicio? -label.gap_character = Carácter para hueco -label.move_return_type_up_order= Mover el tipo de returno hacia arriba en el orden -label.move_return_type_down_order= Mover el tipo de returno hacia abajo en el orden -label.update_user_parameter_set = Actualizar el conjunto de parámetros de usuario existente -label.delete_user_parameter_set = Borrar el conjunto de parámetros de usuario existente -label.create_user_parameter_set = Crear un nuevo conjunto de parámetro con la configuración actual. -label.revert_changes_user_parameter_set = Deshacer todos los cambios en el conjunto de parámetros actual -label.start_job_current_settings = Arrancar trabajo con la configuración actual -label.cancel_job_close_dialog = Cerrar este diálogo y cancelar el trabajo -label.input_output = Entrada/Salida -label.cut_paste = Cortar y pegar -label.adjusting_parameters_for_calculation = Ajustar los parámetros para el cálculo existente -label.2d_rna_structure_line = 2D RNA {0} -label.2d_rna_sequence_name = 2D RNA - {0} -label.edit_name_and_description_current_group = Editar el nombre y la descripción del grupo actual. -label.view_structure_for = Visualizar la estructura para {0} -label.view_all_structures = Visualizar todas las {0} estructuras. -label.view_all_representative_structures = Visualizar todas las {0} estructuras representativas. -label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista de Jmol con todas las estructuras representativas\nasociadas con la selecci\u00F3n actual\nsuperpuesta con el alineamiento actual. -label.associate_structure_with_sequence = Asociar estructura con la secuencia -label.from_file = desde fichero -label.enter_pdb_id = Introducir PDB Id -label.discover_pdb_ids = Buscar PDB ids -label.text_colour = Color del texto -label.structure = Estructura -label.view_structure = Visualizar estructura -label.clustalx_colours = Colores de Clustalx -label.above_identity_percentage = Sobre % identidad -label.create_sequence_details_report_annotation_for = Anotación para {0} -label.sequece_details_for = Detalles de la secuencia para {0} -label.sequence_name = Nombre de la secuencia -label.sequence_description = Descripción de la secuencia -label.edit_sequence_name_description = Editar el nombre/descripción de la secuencia -label.spaces_converted_to_backslashes = Los espacios se han convertido en _ -label.no_spaces_allowed_sequence_name = No se permiten espacios en el nombre de la secuencia -label.select_outline_colour = Seleccionar el color del límite -label.web_browser_not_found_unix = Unixers\: No es posible encontrar el navegador web por defecto.\nA\u00F1ada la ruta completa de su navegador en la pesta\u00F1a de Preferencias. -label.web_browser_not_found = No se encuentra el navegador web -label.select_pdb_file_for = Seleccione un fichero PDB para {0} -label.html = HTML -label.wrap = Envolver -label.show_database_refs = Mostrar las referencias en base de datos -label.show_non_positional_features = Mostrar las características no posicionales -label.save_png_image = Guardar como imagen PNG -label.load_tree_for_sequence_set = Cargar un árbol para este conjunto de secuencias -label.export_image = Exportar imagen -label.vamsas_store = Almacén VAMSAS -label.translate_cDNA = Traducir cDNA -label.extract_scores = Extraer puntuaciones -label.get_cross_refs = Obtener referencias cruzadas -label.sort_alignment_new_tree = Alinear el alineamiento con el nuevo árbol -label.add_sequences = Añadir secuencias -label.new_window = Nueva ventana -label.refresh_available_sources = Refrescar las fuentes disponibles -label.use_registry = Utilizar el registro -label.add_local_source = Añadir fuente local -label.set_as_default = Establecer por defecto -label.show_labels = Mostrar etiquetas -label.background_colour = Color de fondo -label.associate_nodes_with = Asociar nodos con -label.jalview_pca_calculation = Cálculo del PCA por Jalview -label.link_name = Nombre del enalce -label.pdb_file = Fichero PDB -label.colour_with_jmol = Colorear con Jmol -label.align_structures = Alinear estructuras -label.jmol = Jmol -label.sort_alignment_by_tree = Ordenar alineamiento por árbol -label.mark_unlinked_leaves = Marcar las hojas como no enlazadas -label.associate_leaves_with = Asociar hojas con -label.save_colour_scheme_with_unique_name_added_to_colour_menu = Guarde el esquema cromáticos con un nombre único y se añadirá al menú de colores -label.case_sensitive = Sensible a mayúsculas -label.lower_case_colour = Color para las minúsculas -label.index_by_host = Indizar por host -label.index_by_type = Indizar por tipo -label.enable_jabaws_services = Habilitar servicios JABAWS -label.display_warnings = Mostrar advertencias -label.move_url_up = Mover la URL hacia arriba -label.move_url_down = Mover la URL hacia abajo -label.add_sbrs_definition = Añadir una definición SBRS -label.edit_sbrs_definition = Editar una definición SBRS -label.delete_sbrs_definition = Borrar una definición SBRS -label.your_sequences_have_been_verified = Sus secuencias has sido verificadas en una base de datos de secuencias conocidas. Algunos de sus ID se han alterado y\n, probablemente, el residuo de inicio/fin se haya actualizado.\nGuarde su alineamiento para mantener el ID actualizado.\n\n -label.sequence_names_updated = Nombres de secuencia actualizados -label.dbref_search_completed = Búsqueda de DBRef terminada -label.show_all_chains = Mostrar todas las cadenas -label.fetch_all_param = Recuperar todas {0} -label.paste_new_window = Pegar en una nueva ventana -label.settings_for_param = Configuración para {0} -label.view_params = Visualizar {0} -label.select_all_views = Seleccionar todas las vistas -label.align_sequences_to_existing_alignment = Alinear las secuencias con el alineamiento existente -label.realign_with_params = Realinear con {0} -label.calcname_with_default_settings = {0} por defecto -label.action_with_default_settings = {0} con la configuración por defecto -label.edit_settings_and_run = Editar la configuración y ejecutar... -label.view_and_change_parameters_before_alignment = Ver y cambiar los parámetros antes del alineamiento -label.run_with_preset_params = Ejecutar {0} con preconfiguración -label.view_and_change_parameters_before_running_calculation = Ver y cambiar los parámetros antes de lanzar el cálculo -label.view_documentation = Ver documentación -label.select_return_type = Seleccionar el tipo de retorno -label.translation_of_params = Traducción de {0} -label.features_for_params = Características de - {0} -label.annotations_for_params = Anotaciones de - {0} -label.generating_features_for_params = Generando características de - {0} -label.generating_annotations_for_params = Generando anotaciones de - {0} -label.varna_params = VARNA - {0} -label.sequence_feature_settings = Configuración de las características de la secuencia -label.pairwise_aligned_sequences = Secuencias alineadas a pares -label.original_data_for_params = Datos originales de {0} -label.points_for_params = Puntos de {0} -label.transformed_points_for_params = Puntos transformados de {0} -label.graduated_color_for_params = Color graduado para la característica de {0} -label.select_backgroud_colour = Seleccionar color de fondo -label.invalid_font = Fuente no válida -label.separate_multiple_accession_ids = Separar los accession id con un punto y coma ";" -label.replace_commas_semicolons = Cambiar comas por puntos y comas -label.parsing_failed_syntax_errors_shown_below_param = Parseo erróneo. A continuación, se muestras los errores de sintaxis {0} -label.parsing_failed_unrecoverable_exception_thrown_param = \nParseo err\u00F3neo. Se ha lanzado una excepci\u00F3n fatal\:\n {0} -label.example_query_param = Consulta de ejemplo: {0} -label.enter_value_increase_conservation_visibility = Introduzca un valor para incrementar la visibilidad de la conservación -label.enter_percentage_identity_above_which_colour_residues = Introduza un % de identidad por encima del cual se colorearán los residuos -label.wswublast_client_credits = Para mostrar las caracter\u00EDsticas de una secuencia, debe indicarse un id de Uniprot cuya secuencia se corresponda al 100 % con la introducida.\nPara mostrar estas caracter\u00EDsticas, prueba a cambar los nombre de sus secuencia con los ID que se sugieren a continuaci\u00F3n.\n\nRunning WSWUBlast at EBI.\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R.\nSOAP-based services provided by the European Bioinformatics Institute.\nNucleic Acids Res. 33(1)\:W25-W28 (2005)); -label.blasting_for_unidentified_sequence = Ejecutar BLAST para la secuencias sin identificar -label.select_columns_containing = Seleccione las columnas que contengan -label.select_columns_not_containing = Seleccione las columnas que no contengan -option.trim_retrieved_seqs = Ajustar las secuencias recuperadas -label.trim_retrieved_sequences = Cuando la secuencia de referencia es más larga que la secuencia con la que está trabajando, sólo se mantienen las subsecuencias relevantes. -label.use_sequence_id_1 = Utilice $SEQUENCE_ID$ o $SEQUENCE_ID=//=$ -label.use_sequence_id_2 = \nto para embeber el id de la secuencia en una URL -label.ws_parameters_for = Parámetros para {0} -label.switch_server = Cambiar servidor -label.open_jabaws_web_page = Abra el página principal del servidor JABAWS en un navegador web -label.choose_jabaws_server = Escoja un servidor para ejecutar este servicio -label.services_at = Servicios en {0} -label.rest_client_submit = {0} utilizando {1} -label.fetch_retrieve_from =Recuperar de {0} -label.fetch_retrieve_from_all_sources = Recuperar de todas las fuentes {0} en {1}
    La primera es :{2} -label.feature_settings_click_drag = Haga clic o arrastre los tipos de las características hacia arriba o hacia abajo para cambiar el orden de visualización.
    Haga doble clic para seleccionar las columnas que contienen las características del alineamiento/selección actual.
    -label.opt_and_params_further_details = ver los detalles adicionales haciendo clic en el botón derecho -label.opt_and_params_show_brief_desc_image_link = Haga clic para ver una descripción breve
    Haga clic en el botón derecho para obtener información adicional. -label.opt_and_params_show_brief_desc = Haga clic para ver una descripción breve
    -label.adjusts_width_generated_eps_png = Ajusta la anchura del fichero EPS o PNG generado para asegurar incluso que el ID de la secuencia más larga o las etiquetas de anotación se muestran -label.manually_specify_width_left_column = Especificar manualmente la anchura de la columna izquierda en las etiquetas de los ID de la secuencia y las anotaciones se mostrar en las figuras del alineamiento exportado.Esta configuraicón se ignorará si está marcada la opción 'Establecer automáticamente al anchura del ID' -label.job_created_when_checked = Cuando está habilitado, se crea un trabajo para cada secuencia de la selección actual -label.when_checked_job_visible_region_and_results = Cuando está habilitado, se crea un único trabajo para la región visible y los resultados de mapean en su ubicación dentro del alineamiento. En caso contrario, se creará un trabajo para cada región visible y contigua en el alineamiento o selección actual (p.e. un alineamiento múlitple). -label.flat_file_representation = La representación del fichero plano de este servicio utilizando el formalismo Really Simple Bioinformatics Service -label.result_of_parsing_rsbs = Resultados de parsear la representación RSBS -label.user_preset = Preselección de usuario -label.service_preset = Preselección del servicio -label.run_with_preset = Ejecutar {0} con preselección -label.view_service_doc_url = Visualizar {1} -label.submit_sequence = Enviar {0} {1} {2} {3} a
    {4} -action.by_title_param = por {0} -label.alignment = Alineamiento -label.secondary_structure_prediction = Predicción de la estructura secundaria -label.sequence_database_search = Búsqueda en base de datos de secuencias -label.analysis = Análisis -label.protein_disorder = Desorden en la proteína -label.source_from_db_source = Fuentes de {0} -label.from_msname = de {0} -label.superpose_with = Superponer con... -action.do = Hacer -label.scale_label_to_column = Ajustar la etiqueta a la columna -label.add_new_row = Añadir nuevo fila -label.edit_label_description = Editar etiqueta/descripción -label.hide_row = Ocultar esta fila -label.delete_row = Borrar esta fila -label.show_all_hidden_rows = Mostrar todas las filas ocultas -label.export_annotation = Exportar anotación -label.copy_consensus_sequence = Copiar secuencia de consenso -label.helix = Hélice -label.sheet = Hoja -label.rna_helix = Hélice de ARN -label.remove_annotation = Borrar anotación -label.colour_by = Colorear por... -label.muscle_multiple_protein_sequence_alignment = Alineamiento múltiple de secuencias de proteínas con Muscle -label.mafft_multiple_sequence_alignment = Alineamiento múltiple de secuencias con MAFFT -label.clustalw_multiple_sequence_alignment = Alineamiento múltiple de secuencias con ClustalW -label.jnet_secondary_structure_prediction = Predicción de la estructura secundaria con JNet -label.multiharmony = Multi-Harmony -label.unable_start_web_service_analysis = No es posible iniciar el servicio web de análisis -label.job_couldnt_be_started_check_input = El trabajo no puede arrancarse. Por favor, compruebe los parámetros de entrada y los mensajes de advertencia de la consola de Jalview. -label.prompt_each_time = Preguntar siempre -label.use_source = Fuente -label.couldnt_save_project = No es posible guardar el proyecto -label.error_whilst_saving_current_state_to = Error mientras se guardaba el estado a {0} -label.error_whilst_loading_project_from = Error cargando el proyecto desde {0} -label.couldnt_load_project = No es posible cargar el proyecto -label.pca_sequences_not_aligned = Las secuencias deben estar alineadas antes de calcular el PCA.\nPruebe a utilizar la funci\u00F3n de rellenar huecos en el men\u00FA Editar,\no cualquiera de los servicios web de alineamiento m\u00FAltiple. -label.invalid_name_preset_exists = Nombre no válido - esta preconfiguración ya existe. -label.invalid_name = Nombre no válido -label.set_proxy_settings = Por favor, configure su proxy en la pestaña 'Conexiones' de la ventana de Preferencia -label.proxy_authorization_failed = Autorización del proxy fallida -label.internal_jalview_error = Error interno de Jalview -label.secondary_structure_prediction_service_couldnt_be_located = No se ha podido encontrar el Servicio de Predicciónd de la Estructura Secudaria {0} en {1}. -label.service_called_is_not_msa_service = El Servicio llamado \n{0}\nno es un \nServicio de Alineamiento M\u00FAltiple de Secuencias\! -label.msa_service_is_unknown = El Servicio de Alineamiento Múltiple llamado {0} es desconocido -label.service_called_is_not_seq_search_service = El Servicio llamando \n{0}\nno es un \nServicio de B\u00FAsqueda de Secuencias\! -label.seq_search_service_is_unknown = El Servicio de Búsqueda de Sencuencias llamado {0} es desconocido -label.feature_type = Tipo de característisca -label.display = Representación -label.service_url = URL del servicio -label.copied_sequences = Secuencias copiadas -label.cut_sequences = Cortar secuencias -label.conservation_colour_increment = Incremento de Conservación del Color ({0}) -label.percentage_identity_thereshold = Umbral del Porcentaje de Identidad ({0}) -label.error_unsupported_owwner_user_colour_scheme = Propietario no soportado para el diálogo del Esquema Cromático del Usuario -label.save_alignment_to_file = Guardar Alineamiento en fichero -label.save_features_to_file = Guardar Características en un fichero -label.save_annotation_to_file = Guardar Anotación en un fichero -label.no_features_on_alignment = No se han encontrado características en el alineamiento -label.save_pdb_file = Guardar fichero PDB -label.save_text_to_file = Guardar Texto en un fichero -label.save_state = Guardar estado -label.restore_state = Restaurar estado -label.saving_jalview_project = Guardando el proyecto de Jalview {0} -label.loading_jalview_project = Cargando el proyecto de Jalview {0} -label.save_vamsas_document_archive = Guardar el archivo de documento Vamsas -label.saving_vamsas_doc = Guardando el documento VAMSAS en {0} -label.load_feature_colours = Cargar colores de características -label.save_feature_colours = Guardar esquema cromático de características -label.dataset_for = {0} conjunto de datos para {1} -label.select_startup_file = Seleccionar fichero de arranque -label.select_default_browser = Seleccionar navegador web por defecto -label.save_tree_as_newick = Guardar árbol como fichero newick -label.create_eps_from_tree = Crear un fichero EPS a partir de un árbol -label.create_png_from_tree = Crear una imagen PNG a partir de un árbol -label.save_colour_scheme = Guardar esquema cromático -label.edit_params_for = Editar los parámetros de {0} -label.choose_filename_for_param_file = Escoja un nombre de fichero para este fichero de parámetros -label.save_as_html = Guardar como HTML -label.recently_opened = Abiertos recientemente -label.blasting_for_unidentified_sequence_jobs_running = Ejecutando BLAST de las secuencias no indentificadas - {0} trabajos en marcha. -label.tree_from = Árbol de {0} -label.webservice_job_title = {0} usando {1} -label.select_visible_region_of = seleccionada {0} región de {1} -label.visible = Visible -label.select_unselect_visible_regions_from = seleccionada y deseleccionadas {0} regiones de {1} -label.visible_region_of = región visible de -label.webservice_job_title_on = {0} usando {1} de {2} -label.updating_vamsas_session = Actualizando sesión VAMSAS -label.loading_file = Cargando fichero: {0} -label.edit_params = Editar {0} -error.not_implemented = No implementado -error.no_such_method_as_clone1_for = No existe ese método como un clone1 de {0} -error.null_from_clone1 = Nulo de clone1! -error.implementation_error_sortbyfeature = Error de implementación - sortByFeature debe ser uno de FEATURE_SCORE, FEATURE_LABEL o FEATURE_DENSITY. -error.not_yet_implemented = No se ha implementado todavía -error.unknown_type_dna_or_pep = Tipo desconocido {0} - dna o pep son los únicos valores permitidos -error.implementation_error_dont_know_thereshold_annotationcolourgradient = Error de implementación: no se conoce el valor umbral para el AnnotationColourGradient actual. -error.implementation_error_embeddedpopup_not_null = Error de implementación - embeddedPopup debe ser no nulo. -error.invalid_colour_for_mycheckbox = Color no válido para MyCheckBox -error.implementation_error_unrecognised_render_object_for_features_type = Error de implementación: no se reconoce el objeto de representación {0} para las características de tipo {1} -error.implementation_error_unsupported_feature_colour_object = Error de implementación: objeto de color de características no soportado. -error.invalid_separator_parameter = Separador de parámetros no válido - debe tener longitud mayor que cero -error.alignment_cigararray_not_implemented = Alignment(CigarArray) no se ha implementado todavía -error.weak_sequencei_equivalence_not_yet_implemented = Equivalencia débil sequenceI no se ha implementado todavía. -error.implementation_error_can_only_make_alignmnet_from_cigararray = Error de implementación - sólo se puede construir un vista de alineamiento a partir de una CigarArray de secuencias. -error.empty_view_cannot_be_updated = una vista vacía no se puede actualizar. -error.mismatch_between_number_of_sequences_in_block = No hay coincidencia entre el número de secuencias en el bloque {0} ({1}) y la vista original ({2}) -error.padding_not_yet_implemented = El relleno no se ha implementado todavía -error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = No hay coincidencia entre los bloques visibles para actualizar y el número de contigs en la vista (contigs=0,blocks={0}) -error.unknown_seq_cigar_operation = Operación SeqCigar {0} desconocida -error.implementation_bug_parse_cigar_string = Bug de implementación en parseCigarString -error.implementation_error_invalid_operation_string = Error de implementación. Cadena de operación no válida. -error.invalid_range_string = Rango de la cadena no válido (debe ser cero o un número positivo) -error.implementation_error_delete_range_out_of_bounds = Error de implementación: deleteRange fuera de rango: el comienzo debe ser cero o positivo y menor que el final. -error.implementation_error = Error de implementación -error.implementation_error_unknown_operation = ¡Error de implementación! Operación desconocida {0} -error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Error de implementación - valor nulo no esperado en getSequenceAndDeletions -error.implementation_error_set_seq_null = Error de implementación - _setSeq(null,...) -error.implementation_error_s = Error de implementación: _s= {0} -error.implementation_error_seqcigar_possible = SeqCigar: posible error de implementación: la secuencia es más larga de el conjunto de datos de la secuencia -error.implmentation_bug_seq_null = Bug de implementación. Seq nula -error.implementation_bug_cigar_operation_list_range_list = Bug de implementación: Cigar Operation list!= range list -error.not_yet_implemented_cigar_object_from_cigar_string = No implementado todavía: construcción de un objeto Cigar desde una cadena y una secuencia con huecos. -error.implementation_bug_cigar_operation = Bug de implementación. La operación Cigar {0} {1} no es ni {2}, ni {3} ni {4}. -error.implementation_error_for_new_cigar = Error de implementación en new Cigar(SequenceI) -error.implementation_error_cigar_seq_no_operations = Error de implementación: la {0}a secuencia Cigar no tiene operaciones. -error.implementation_error_jmol_getting_data = Error de implementación - Jmol parece estar todavía intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016 -error.implementation_error_no_pdbentry_from_index = Error de implementación - no existe la correspondiente entrada pdb (para el índice {0}) para añadir el mapeo de secuencias a -error.jmol_version_not_compatible_with_jalview_version = La versión {0} de Jmol no es compatible con esta versión de Jalview. Informe de este problema en http://issues.jalview.org -error.not_implemented_remove = Borrar: no implementado -error.not_implemented_clone = Clonar: no implementado -error.implementation_error_chimera_getting_data = Error de implementación - Chimera parece estar todavía intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016 -error.call_setprogressbar_before_registering_handler = llamada a setProgressBar antes de registrar el manejador de la barra de estado -label.cancelled_params = {0} cancelado -error.implementation_error_cannot_show_view_alignment_frame = Error de implementación: no es posible mostrar una vista de otro alineamiento en un AlignFrame. -error.implementation_error_dont_know_about_thereshold_setting = Error de implementación: no se conoce la configuración del umbral para el AnnotationColourGradient actual. -error.eps_generation_not_implemented = La generación de EPS no se ha implementado todavía -error.png_generation_not_implemented = La generación de PNG no se ha implementado todavía -error.try_join_vamsas_session_another = Tratando de establecer una sesión VAMSAS cuando ya había otra conectada -error.invalid_vamsas_session_id = Identificador de sesión VAMSAS no válido -error.implementation_error_cannot_create_groovyshell = Error de implementación:no se puede crear groovyShell sin Groovy en el classpath -label.groovy_support_failed = El soporte Groovy de Jalview ha fallado -label.couldnt_create_groovy_shell = No es posible crear el shell de Groovy. Compruebe el fichero de log para conocer los detalles. -error.unsupported_version_calcIdparam = Versión no soportada de {0} -error.implementation_error_cant_reorder_tree = Error de implementación: no es posible reordenar este árbol. No DefaultMutableTreeNode. -error.invalid_value_for_option = Valor no válido de {0} para la opción {1} -error.implementation_error_cannot_import_vamsas_doc = Error de implementación - todavía no es posible importar el documento VAMSAS existente en una sesión existente. -label.vamsas_doc_couldnt_be_opened_as_new_session = El documento VAMSAS no ha podido abrirse como una nueva sesión. Por favor, escoja otra. -error.implementation_error_vamsas_operation_not_init = ¡Error de implementación! Operaciones VAMSAS cuando el cliente no estaba inicializado ni conectado -error.jalview_no_connected_vamsas_session = Jalview está conectado a una sesión VAMSAS -error.implementation_error_cannot_recover_vamsas_object_mappings = Error de implementación: no es posible recuperar los mapeos del objeto VAMSAS - no se ha hecho ningún backup -error.setstatus_called_non_existent_job_pane = se lllamado a setStatus para el panel de trabajo {0} no existente -error.implementation_error_cannot_find_marshaller_for_param_set =Error de implementación: no puede encontrar un marshaller para el conjunto de parámetros -error.implementation_error_old_jalview_object_not_bound =Error de implementación: ¡el objeto Jalview antiguo no está enlazado! ({0}) -error.implementation_error_vamsas_doc_class_should_bind_to_type = Error de implementación: la clase de documento VAMSAS {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2}) -error.implementation_error_jalview_class_should_bind_to_type = Error de implementación: la clase Jalview {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2}) -error.invalid_vamsas_rangetype_cannot_resolve_lists = RangeType VAMSAS no válido - ¡no es posible resolver ambas listas de Pos y Seg con los valores elegidos! -error.implementation_error_maplist_is_null = Error de implementación. MapList es nulo en initMapType. -error.implementation_error_cannot_have_null_alignment = Error de implementación: no es posible tener una clave nula en el alineamiento -error.implementation_error_null_fileparse = Error de implementación. FileParse nulo en el construictor de copia -error.implementation_error_cannot_map_alignment_sequences = Error de implementación: no es posible maper un alineamiento de secuencias desde distintos conjuntos de datos en un único alineamiento en el documento VAMSAS. -error.implementation_error_cannot_duplicate_colour_scheme = Error grave de implementación: no es posible duplicar el esquema cromático {0} -error.implementation_error_structure_selection_manager_null = Error de implementación. El contexto structure selection manager's es nulo -exception.ssm_context_is_null = El contexto SSM es nulo -error.idstring_seqstrings_only_one_per_sequence = idstrings y seqstrings contienen una cadena por cada secuencia -error.cannot_have_mixed_length_replacement_vectors = No es posible tener vectores de reemplazo de distinta longitud. El vector de reemplazo para {0} es de {1} cadenas de largo, pero se ha considerado ya como un vector de longitud {2}. -error.cannot_have_zero_length_vector_replacement_strings = No es posible tener un vector de cadenas de reemplazo de longitud cero - debe ser uno o n. -error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = ¡Error de implementación! Todavía no se soportan varios trabajos de predicción asociados a una única secuencia. -error.implementation_error_invalid_msa_index_for_job = ¡Error de implementación! Valor msaIndex no válido para JPredJob en el objeto de entrada MSA padre! -error.implementation_error_startjob_called = Error de implementación - StartJob(JpredJob) invocado en {0} -error.multiple_jnet_subjob_merge_not_implemented = Todavía no se han implementado varios subtrabajos JNet conjuntos. -label.job_never_ran = El trabajo nunca se ejecutó - entrada devuelta al usuario. -error.implementation_error_minlen_must_be_greater_zero = Error de implementación: minlen debe ser cero o más -error.implementation_error_msawbjob_called = Error de implementación - StartJob(MsaWSJob) invocado en un WSJobInstance {0} -error.implementation_error_cannot_attach_ws_menu_entry = Error de implementación: ¡no es posible adjunto una WS Menu Entry sin una referencia a un manejador del servicio! -error.parameter_migration_not_implemented_yet = La migración de parámetros no se ha implementado todavía -error.implementation_error_cannot_set_jaba_option = Error de implementación: no es posible establecer el valor de Jaba Option a un valor fuera de su rango permitido -error.implementation_error_valuetype_doesnt_support_jabaws_type = Error de implementación: jalview.ws.params.ValueConstrainI.ValueType no soporta el tipo JABAWS: {0} -error.cannot_create_jabaws_param_set = No es posible crear un JabaWSParamSet con parámetros no JabaWS -error.cannot_set_arguments_to_jabaws_param_set = No es posible establecer argumentos en JabaWSParamSet que no sean argumentos JabaWS -error.implementation_error_runner_config_not_available = Error de implementación: Runner Config no está disponible para un servicio JABAWS de tipo {0} ({1}) -error.implementation_error_cannot_handle_jaba_param = Error de implementación: no es posible manejar el objeto del parámetro Jaba {0} -error.implementation_error_attempt_to_delete_service_preset = Error de implementación: intento de borrar un servicio preestablecido -error.implementation_error_cannot_locate_oldname_presetname = Error de implementación: no es posible localizar ni el nombre antiguo ({0}) ni el presetName ({1} en el almacén de datos. -error.implementation_error_jabaws_param_set_only_handled_by = Error de implementación: JabaWsParamSets sólo puede ser manejado por JabaParamStore -error.cannot_set_source_file_for = No es posible establecer el fichero fuente para {0} -error.mismatch_service_instance_preset = Posible desajuste entre la instancia del servicio y la prestablecida -error.cannot_set_params_for_ws_preset = No es posible establecer los parámetros para el servicio web JABA presestablecido -error.implementation_error_can_only_instantiate_jaba_param_sets = Error de implementación: sólo se puede instanciar conjuntos de parámetros Jaba -error.no_aacon_service_found = No se ha encontrado ningún servicio AACon -error.implementation_error_couldnt_copy_value_constraint = Error de implementación: ¡no se puede copiar ValueConstrain! -error.couldnt_encode_as_utf8 = No se ha podido codificar {0} como UTF-8. -error.tree_inputtype_not_yet_implemented = No se ha implementado todavía el árbol como InputType -error.implementation_error_need_to_have_httpresponse = Error de implementación: se necesita tener un HttpResponse que procesar -error.dbrefsource_implementation_exception = Excepción de implementación DBRefSource -error.implementation_error_dbinstance_must_implement_interface = Error de Implementación- getDbInstances debe recibir una clase que implemente jalview.ws.seqfetcher.DbSourceProxy (recibió {0}) -error.implementation_error_must_init_dbsources =Error de implementación. Debe inicializar dbSources -label.view_controller_toggled_marked = {0} {1} columnas {2} conteniendo características del tipo {3} en {4} secuencia(s) -label.toggled = Invertida -label.marked = Marcada -label.not = no -label.no_feature_of_type_found = No se han encontrado características del tipo {0}. -label.submission_params = Envío {0} -label.empty_alignment_job = Trabajo de alineamiento vacío -label.add_new_sbrs_service = Añadir un nuevo SBRS -label.edit_sbrs_entry = Editar entrada SBRS -label.pca_recalculating = Recalculando PCA -label.pca_calculating = Calculando PCA -label.select_foreground_colour = Escoger color del primer plano -label.select_colour_for_text = Seleccione el color del texto -label.adjunst_foreground_text_colour_thereshold = Ajustar el umbral del color del texto en primer plano -label.select_subtree_colour = Seleccioanr el color del sub-árbol -label.create_new_sequence_features = Crear nueva(s) característica(s) de secuencia -label.amend_delete_features = Arrelgar/Borrar características de {0} -exception.out_of_bounds_for_file = Fuera de rango para el fichero: i={0}, Buffer final: i0={1} iend={2} -exception.null_string_given_to_regex_search = Cadena nula enviada a Regex.search -exception.null_string_like_given_to_regex_search = StringLike nula enviada a Regex.search -exception.null_string_given_to_regex_reverse_search = Cadena nula enviada a Regex.reverseSearch -exception.null_string_like_given_to_regex_reverse_search = StringLike nula enviada a Regex.reverseSearch -exception.null_string_like_given_to_regex_search_from = Cadena nula enviada a Regex.searchFrom -exception.null_string_like_given_to_regex_search_region = Cadena nula enviada a Regex.searchRegion -exception.replace_null_regex_pointer = Reemplazador tiene un puntero Regex nulo -exception.bad_pattern_to_regex_perl_code = patrón erróneo en Regex.perlCode: {0} -exception.no_stub_implementation_for_interface = No existe una implementación del stub para la interfaz: {0} -exception.cannot_set_endpoint_address_unknown_port = No es posible estabelcer la dirección de punto final para el puerto desconocido {0} -exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Consultando la coincidencia de apertura de paréntesis para paréntesis sin cerrar (?) -exception.mismatched_unseen_closing_char = Discordancia (no vista) en el carácter de cierre {0} -exception.mismatched_closing_char = Carácter de cierre discordante {0} -exception.mismatched_opening_char = Carácter de apertura discordante {0} en {1} -exception.invalid_datasource_couldnt_obtain_reader = Fuente de datos no válida. No es posible obtener el Reader -exception.index_value_not_in_range = {0}: el valor del índice {1} en se encuentra en el rango [0..{2}] -exception.unterminated_cigar_string = Cadena cigar sin terminar -exception.unexpected_operation_cigar_string_pos = Operación no esperada {0} en una cadena cigar (posición {1} en {2}) -exception.couldnt_parse_responde_from_annotated3d_server = No es posible parsear la respuesta procedente del servidor Annotate3d -exception.application_test_npe = Prueba de aplicación: lanzando un NullPointerException que debe aparecer en la consola -exception.overwriting_vamsas_id_binding = Sobreescribiendo la asociación al VAMSAS id -exception.overwriting_jalview_id_binding = Sobreescribiendo la asociación al Jalview id -error.implementation_error_unknown_file_format_string = Error de implementación: cadena de formato de fichero desconocido -exception.failed_to_resolve_gzip_stream = Fallo al resolver el flujo GZIP -exception.problem_opening_file_also_tried = Problema abriendo {0} (también se intentó {1}) : {2} -exception.problem_opening_file = Problema abriendo {0} : {1} -exception.failed_to_read_data_from_source = Error al leer datos de la fuente: {0} -exception.no_init_source_stream = Flujo de fuente sin inicializar -exception.invalid_source_stream = Flujo de fuente no válida: {0} -error.implementation_error_reset_called_for_invalid_source = Error de implementación: se ha invocado un Reset en una fuente no válida. -exception.number_of_residues_in_query_sequence_differ_from_prediction = El n\u00FAmero de residuos en la supuesta secuencia consultada {0} ({1}\n{2})\ndifiere del n\u00FAmero de sitios de predicci\u00F3n en la predicci\u00F3n ({3}) -label.mapped = mapeado -exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: La entrada ({0}) tiene un número inesperado de columnas -exception.couldnt_parse_concise_annotation_for_prediction = No es posible parsear la anotaci\u00F3n concisa para el perfil de predicci\u00F3n.\n{0} -exception.newfile = Fichero Newick\: {0}\n -label.no_tree_read_in = No hay lectura de árbol en -exception.rnaml_couldnt_access_datasource = No ha sido posible acceder la fuente de datos ({0}) -exception.ranml_couldnt_process_data = No ha sido posible procesar los datos como un fichero RNAML ({0}) -exception.ranml_invalid_file = Fichero RNAML no válido ({0}) -exception.ranml_problem_parsing_data = Problema parseando los datos como RNAML ({0}) -exception.pfam_no_sequences_found = No se han encontrado secuencias (entrada PFAM) -exception.stockholm_invalid_format = Este fichero no es tiene un formato STOCKHOLM válido: la primera línea no contiene '# STOCKHOLM' -exception.couldnt_parse_sequence_line = No es posible parse la línea de secuencia: {0} -exception.error_parsing_line = Error parseando {0} -exception.unknown_annotation_detected = Anotación desconocida detectada: {0} {1} -exception.couldnt_store_sequence_mappings = No es posible almacenar los mapeos de secuencia para {0} -exception.matrix_too_many_iteration = Demasiadas iteraciones en {0} (el máximo es {1}) -exception.browser_not_found = Excepción al buscar el navegador: {0} -exception.browser_unable_to_locate = Imposible encontrar el navegador: {0} -exception.invocation_target_exception_creating_aedesc = InvocationTargetException mientras se creaba AEDesc: {0} -exception.illegal_access_building_apple_evt= IllegalAccessException mientras se construía AppleEvent: {0} -exception.instantiation_creating_aedesc = InstantiationException mientras se creaba AEDesc: {0} -exception.unable_to_launch_url = Imposible lanzar la URL: {0} -exception.unable_to_create_internet_config = Imposible crear una instancia de configuración de Internet: {0} -exception.invocation_target_calling_url = InvocationTargetException mientras se invocaba openURL: {0} -exception.illegal_access_calling_url = IllegalAccessException mientras se invocaba openURL: {0} -exception.interrupted_launching_browser = InterruptedException mientras se lanzaba el navegador: {0} -exception.das_source_doesnt_support_sequence_command = La fuente {0} no soporta el comando sequence. -exception.invalid_das_source = Fuente DAS no válida: {0} -exception.ebiembl_retrieval_failed_on = La recuperación de datos EBI EMBL XML ha fallado en {0}:{1} -label.no_embl_record_found = # No se ha recuperado ningún registro EMBL de {0}:{1} -label.embl_successfully_parsed = # Se han parseado con éxito las consultas {0} en un alineamiento -exception.no_pdb_records_for_chain = No se han encontrado registros {0} para la cadena {1} -exception.unexpected_handling_rnaml_translation_for_pdb = Excepcion inesperada cuando se traducían a RNAML los datos PDB -exception.couldnt_recover_sequence_properties_for_alignment = No es posible recuperar las propiedades de la secuencia para el alineamiento -exception.unknown_format_for_file = Formato desconocido {0} para el fichero \: \n{1} -label.remove_gaps = Eliminar huecos -exception.couldnt_recover_sequence_props_for_jnet_query = No ha sido posible recuperar las propiedades de la secuencia para la secuencia JNet Query! -exception.server_timeout_try_later = Tiempo de conexi\u00F3n ha expirado - int\u00E9ntelo de nuevo m\u00E1s tarde\n -exception.web_service_returned_null_try_later= El servidor {0} ha devuelto un objeto nulo, por lo que probablemente no se haya podido contactar con él. Inténtelo de nuevo más tarde. -exception.cannot_contact_service_endpoint_at = No es posible contactar por el punto de acceso al servicio en {0} -error.implementation_error_cannot_find_service_url_in_given_set = Error de implementación: no es posible encontrar la URL del servicio en el conjunto de URL proporcionado -error.implementation_error_cannot_find_service_url_in_given_set_param_store = Error de implementación: la URL del servicio en el conjunto de URL para este almacén de parámetros del servicio({0}) -exception.jobsubmission_invalid_params_set = Conjunto de parámetros no válido. Comprueba la implementación de Jalview -exception.notvaliddata_group_contains_less_than_min_seqs = El grupo contiene menos de {0} secuencias. -exception.outofmemory_loading_pdb_file = Sin menoria al cargar el fichero PDB -exception.eps_coudnt_write_output_file = No es posible escribir el fichero de salida: {0} -exception.eps_method_not_supported = Método actualmente no suportado por la versión {0} de EpsGraphics2D -exception.eps_unable_to_get_inverse_matrix = Imposible obtener la inversa de la matrix: {0} -warn.job_cannot_be_cancelled_close_window = Este trabajo no se puede cancelar.\nSimplemente, cierre la ventana. -warn.service_not_supported = ¡Servicio no soportado! -warn.input_is_too_big = ¡El tamaño de la entrada es demasiado grande! -warn.invalid_job_param_set = ¡Conjunto de parámetros del trabajo no válido! -info.job_couldnt_be_run_server_doesnt_support_program = No es posible ejecutar el trabajo porque el servidor no soporta este programa.\n{0} -info.job_couldnt_be_run_exceeded_hard_limit = No es posible ejecutar el trabajo porque excede los l\u00EDmites del servidor.\n{0} -info.job_couldnt_be_run_incorrect_param_setting = No es posible ejecutar el trabjao porque el servidor no soporta algunos de los par\u00E1metros.\n{0}\nPor favor, aseg\u00FArese de que ha usado los par\u00E1metros adecuados para este servicio\n -info.no_jobs_ran = No se ha ejecutado ningún trabajo -info.failed_to_submit_prediction = Error al enviar la predicci\u00F3n\:\n{0} {1} -info.invalid_jnet_job_result_data ={0}\n{1}\nResultados del trabajo JNet no v\u00E1lidos\!\n{2} -info.failed_to_submit_sequences_for_alignment = Error al enviar la secuencias para el alineamiento.\nLo m\u00E1s probable es que haya un problema en el servidor.\nSimplemente, cierre la ventana\n -info.alignment_object_method_notes = \nNotas sobre los m\u00E9todos del objeto alineamiento\n -info.server_exception = \n{0} Excepci\u00F3n del servidor\!\n{1} -status.processing_commandline_args = Procesando los argumentos de la línea de comandos... -status.das_features_being_retrived = Recuperando características DAS... -status.searching_for_sequences_from = Buscando secuencias en {0} -status.finished_searching_for_sequences_from = Finalizada la búsqueda de secuencias en {0} -label.eps_file = Fichero EPS -label.png_image = Imagen PNG -status.saving_file = Guardando {0} -status.export_complete = Exportación completada. -status.fetching_pdb = Recuperando PDB {0} -status.refreshing_news = Refrescando noticias -status.importing_vamsas_session_from = Importando sesión VAMSAS de {0} -status.opening_params = Abriendo {0} -status.waiting_sequence_database_fetchers_init = Esperando la inicialización de los recuperadores de bases de datos de secuencias -status.init_sequence_database_fetchers = Inicializando recuperadores de bases de datos de secuencias -status.fetching_sequence_queries_from = Recuperando {0} consultas de secuencias de {1} -status.finshed_querying = Consulta finalizada -status.parsing_results = Parseando resultados. -status.processing = Procesando... -status.refreshing_web_service_menus = Refrescando los menús de servicios web -status.collecting_job_results = Recolectando los resultados de los trabajos. -status.fetching_das_sequence_features = Recuperando las características DAS de las secuencias -status.no_das_sources_active = No existe ninguna fuente DAS activa -status.das_feature_fetching_cancelled = Recuperación de características DAS cancelada -status.das_feature_fetching_complete = Recuperación de características DAS completada -status.fetching_db_refs = Recuperando db refs -label.font_doesnt_have_letters_defined = La fuente no tiene letras definidas\npor lo que no puede emplease\ncon datos de alineamientos -label.font_too_small = Tamaño de la letra es demasiado pequeña -label.error_loading_file_params = Error cargando el fichero {0} -label.error_loading_jalview_file = Error cargando el fichero Jalview -warn.out_of_memory_when_action = Sin memoria al {0}\!\!\nConsulte los ficheros de ayuda para ajustar la memoria de la m\u00E1quina virtual de Java. -warn.out_of_memory_loading_file = Sin memoria al cargar el fichero {0}\!\!\nConsulte los ficheros de ayuda para ajustar la memoria de la m\u00E1quina virtual de Java. -label.out_of_memory = Sin memoria -label.invalid_id_column_width = Identificador de anchura de columna no válido -warn.user_defined_width_requirements = La anchura definida por el usuario para la \nlas columnas de anotaci\u00F3n e identificador de secuencias\nen figuras exportadas debe ser\na, al menos, de 12 p\u00EDxels -label.couldnt_create_sequence_fetcher = No es posible crear SequenceFetcher -warn.couldnt_create_sequence_fetcher_client = No es posible crear el cliente de recuperador de secuencias. Comprueba el fichero de log para más detalles. -warn.server_didnt_pass_validation = El servicio no ha pasado la validaci\u00F3n.\nCompruebe la consola de Jalview para m\u00E1s detalles. -warn.url_must_contain = La URL de la secuencia debe contener $SEQUENCE_ID$ o un regex $SEQUENCE_ID=//=$ -info.validate_jabaws_server = \u00BFValidar el servidor JabaWS?\n(Consulte la consola de salida para obtener los resultados) -label.test_server = ¿Probar servidor? -info.you_want_jalview_to_find_uniprot_accessions = \u00BFDesea que Jalview encuentre\nUniprot Accession ids para los nombres de secuencias dados? -label.find_uniprot_accession_ids = Buscar Uniprot Accession Ids -label.new_sequence_fetcher = Añadir recuperador de secuencias -label.additional_sequence_fetcher = Recuperador de secuencia adicional -label.select_database_retrieval_source = Seleccionar fuente de recuperación de bases de datos -label.overwrite_existing_file = ¿Sobreescribir el fichero existente? -label.file_already_exists = El fichero existe -label.edit_jabaws_url = Editar JABAWS URL -label.add_jabaws_url = Añadir nueva JABAWS URL -label.news_from_jalview = Noticias de http://www.jalview.org -label.cut_paste_alignmen_file = Cortar & Pegar fichero de alineamiento -label.enter_redundancy_thereshold = Introducir el umbral de redundancia -label.select_dark_light_set_thereshold = Seleccionar un color oscuro y un color claro para el texto y establecer el umbral en que
    cambiar entre colores, basándose en el color de fondo
    -label.select_feature_colour = Seleccionar color de las características -label.ignore_gaps_consensus = Ignorar huecos en el consenso -label.show_group_histogram = Mostrar histograma de grupo -label.show_group_logo = Mostrar logo de grupo -label.normalise_group_logo = Normalizar el logo de grupo -label.show_histogram = Mostrar histograma -label.show_logo = Mostrar logo -label.normalise_logo = Normalizar logo -label.no_colour_selection_in_scheme = Por favor, seleccione un color antes de aplicar el esquema cromático +action.refresh_services = Refrescar servicios +action.reset_services = Reiniciar servicios +action.merge_results = Unificar resultados +action.load_scheme = Cargar esquema +action.save_scheme = Guardar esquema +action.save_image = Guardar imagen +action.paste = Pegar +action.show_html_source = Mostrar código HTML +action.print = Imprimir +action.web_service = Servicio web +action.cancel_job = Cancelar trabajo +action.start_job = Arrancar trabajo +action.revert = Deshacer +action.move_down = Mover hacia abajo +action.move_up = Mover hacia arriba +action.remove_return_datatype = Borrar tipo de datos de retorno +action.add_return_datatype = Añadir tipo de datos de retorno +action.remove_input_parameter = Borrar el parámetro de entrada seleccionado +action.add_input_parameter = Añadir parámetro de entrada seleccionado +action.edit = Editar +action.new = Nuevo +action.open_file = Abrir fichero +action.show_unconserved = Mostrar regiones no conservadas +action.open_new_alignment = Abrir nuevo alineamiento +action.raise_associated_windows = Destacar ventanas asociadas +action.minimize_associated_windows = Minimizar ventanas asociadas +action.close_all = Cerrar todo +action.load_project = Cargar proyecto +action.save_project = Guardar proyecto +action.quit = Salir +action.expand_views = Expandir vistas +action.gather_views = Capturar vistas +action.page_setup = Configuración de la página +action.reload = Recargar +action.load = Cargar +action.open = Abrir +action.cancel = Cancelar +action.create = Crear +action.update = Actualizar +action.delete = Borrar +action.snapshot = Imagen +action.clear = Limpiar +action.accept = Aceptar +action.select_ddbb = --- Seleccionar base de datos --- +action.undo = Deshacer +action.redo = Rehacer +action.reset = Reiniciar +action.remove_left = Eliminar parte izquierda +action.remove_right = Eliminar parte derecha +action.remove_empty_columns = Eliminar las columnas vacías +action.remove_all_gaps = Eliminar todos los huecos +action.left_justify_alignment = Ajustar el alineamiento a la izquierda +action.right_justify_alignment = Ajustar el alineamiento a la derecha +action.boxes = Casillas +action.text = Texto +action.by_pairwise_id = Identificar por parejas +action.by_id = Por identificador +action.by_length = Por longitud +action.by_group = Por grupo +action.remove = Eliminar +action.remove_redundancy = Eliminar redundancia... +action.pairwise_alignment = Alineamiento de pares... +action.by_rna_helixes = Por hélices de RNA +action.user_defined = Definido por el usuario... +action.by_conservation = Por conservación +action.wrap = Envolver +action.show_gaps = Mostrar huecos +action.show_hidden_markers = Mostrar marcadores ocultos +action.find = Buscar +action.undefine_groups = Grupos sin definir +action.create_groups = Crear grupos +action.make_groups_selection = Hacer grupos para seleccionar +action.copy = Copiar +action.cut = Cortar +action.font = Fuente... +action.scale_above = Escala superior +action.scale_left = Escala izquierda +action.scale_right = Escala derecha +action.by_tree_order = Por orden del árbol +action.sort = Ordenar +action.calculate_tree = Calcular árbol +action.help = Ayuda +action.by_annotation = Por anotación... +action.invert_sequence_selection = Invertir selección de secuencias +action.invert_column_selection = Invertir selección de columnas +action.show = Mostrar +action.hide = Ocultar +action.ok = OK +action.set_defaults = Defecto +action.create_group = Crear grupo +action.remove_group = Eliminar grupo +action.edit_group = Editar grupo +action.border_colour = Color del borde +action.edit_new_group = Editar nuevo grupo +action.hide_sequences = Ocultar secuencias +action.sequences = Secuencias +action.ids = IDS +action.ids_sequences = IDS y secuencias +action.reveal_all = Revelar todo +action.reveal_sequences = Revelar secuencias +action.find_all = Buscar todo +action.find_next = Buscar siguiente +action.file = Archivo +action.view = Ver +action.change_params = Cambiar parámetros +action.apply = Aplicar +action.apply_threshold_all_groups = Aplicar umbral a todos los grupos +action.apply_all_groups = Aplicar a todos los grupos +action.by_chain = Por cadena +action.by_sequence = Por secuencia +action.paste_annotations = Pegar anotaciones +action.format = Formato +action.select = Seleccionar +action.new_view = Nueva vista +action.close = Cerrar +action.add = Añadir +action.save_as_default = Guardar como por defecto +action.save_as = Guardar como +action.save = Guardar +action.cancel_fetch = Cancelar búsqueda +action.save_omit_hidden_columns = Guardar / Omitir las columnas ocultas +action.change_font = Cambiar Fuente +action.change_font_tree_panel = Cambiar fuente (panel del árbol) +action.colour = Color +action.calculate = Calcular +action.select_all = Seleccionar Todo +action.deselect_all = Deseleccionar Todo +action.invert_selection = Invertir selección +action.using_jmol = Usar Jmol +action.link = Enlazar +action.group_link = Enlazar grupo +action.show_chain = Mostrar cadena +action.show_group = Mostrar grupo +action.fetch_db_references = Recuperar referencias a base de datos +action.view_flanking_regions = Mostrar flancos +label.view_flanking_regions = Mostrar los datos de la secuencia a ambos lados de las subsecuencias implicadas en este alineamiento +label.str = Str: +label.seq = Seq: +label.structures_manager = Administrar estructuras +label.nickname = Sobrenombre: +label.url = URL: +label.input_file_url = Introducir URL en el fichero de entrada +label.select_feature = Seleccionar función: +label.name = Nombre: +label.name_param = Nombre: {0} +label.group = Grupo: +label.group_name = Nombre del grupo +label.group_description = Descripción del grupo +label.edit_group_name_description = Editar nombre/descripción del grupo +label.colour = Color: +label.description = Descripción: +label.start = Comenzar: +label.end = Terminar: +label.current_parameter_set_name = Nombre actual del conjunto de parámetros: +label.service_action = Acción de servicio: +label.post_url = POST URL: +label.url_suffix = URL Sufijo +label.sequence_source = Fuente de la secuencia +label.per_seq = por secuencia +label.result_vertically_separable = Los resultados son separables verticalmente +label.amend = Modificar +label.undo_command = Deshacer {0} +label.redo_command = Rehacer {0} +label.principal_component_analysis = Análisis del Componente Principal +label.average_distance_identity = Distancia Media Usando % de Identidad +label.neighbour_joining_identity = Unir vecinos utilizando % de Identidad +label.treecalc_title = {0} utilizando {1} +label.tree_calc_av = Distancia media +label.tree_calc_nj = Unir vecinos +label.select_score_model = Selecciones modelo de puntuación +label.score_model_pid = % Identidad +label.score_model_blosum62 = BLOSUM62 +label.score_model_pam250 = PAM 250 +label.score_model_conservation = Conservación de las propiedades físico-químicas +label.score_model_enhconservation = Conservación de las propiedades físico-químicas +label.status_bar = Barra de estado +label.out_to_textbox = Generar cuadro de texto +label.clustalx = Clustalx +label.clustal = Clustal +label.zappo = Zappo +label.taylor = Taylor +label.blc = BLC +label.fasta = Fasta +label.msf = MSF +label.pfam = PFAM +label.pileup = Pileup +label.pir = PIR +label.hydrophobicity = Hidrofobicidad +label.helix_propensity = Tendencia de la hélice +label.strand_propensity = Tendencia de la hebra +label.turn_propensity = Tendencia de giro +label.buried_index = Índice de encubrimiento +label.purine_pyrimidine = Purina/Pirimidina +label.percentage_identity = Porcentaje de identidad +label.blosum62 = BLOSUM62 +label.blosum62_score = Puntuación del BLOSUM62 +label.tcoffee_scores = Puntuación del T-Coffee +label.average_distance_bloslum62 = Distancia Media Usando BLOSUM62 +label.neighbour_blosum62 = Neighbour Joining usando BLOSUM62 +label.show_annotations = Mostrar anotaciones +label.colour_text = Color del texto +label.show_non_conversed = Mostrar no conservadas +label.overview_window = Ventana resumen +label.none = Ninguno +label.above_identity_threshold = Por encima del umbral de identidad +label.show_sequence_features = Mostrar las características de las secuencias +label.nucleotide = Nucleótido +label.to_new_alignment = A nuevo alineamiento +label.to_this_alignment = Añadir a este alineamiento +label.apply_colour_to_all_groups = Aplicar color a todos los grupos +label.modify_identity_thereshold = Modificar el umbral de identidad... +label.modify_conservation_thereshold = Modificar el umbral de conservación... +label.input_from_textbox = Introducir desde el cuadro de texto +label.centre_column_labels = Centrar las etiquetas de las columnas +label.automatic_scrolling = Desplazamiento automático +label.documentation = Documentación +label.about = Acerca de... +label.show_sequence_limits = Mostrar los límites de la secuencia +label.feature_settings = Ajustar funciones... +label.sequence_features = Funciones de la secuencia +label.all_columns = Todas las columnas +label.all_sequences = Todas las secuencias +label.selected_columns = Columnas seleccionadas +label.selected_sequences = Secuencias seleccionadas +label.all_but_selected_region = Todo menos la región seleccionada (Shift+Ctrl+H) +label.selected_region = Región seleccionada +label.all_sequences_columns = Todas las secuencias y columnas +label.group_consensus = Consenso de grupo +label.group_conservation = Conservación de grupo +label.show_consensus_histogram = Mostrar el histograma de consenso +label.show_consensus_logo = Mostrar el logo de consenso +label.norm_consensus_logo = Normalizar el logo de consenso +label.apply_all_groups = Aplicar a todos los grupos +label.autocalculated_annotation = Anotación autocalculada +label.min_colour = Color mínimo +label.max_colour = Color máximo +label.use_original_colours = Usar colores originales +label.threshold_minmax = El umbral es mín/máx +label.represent_group_with = Representar al grupo con +label.selection = Seleccionar +label.group_colour = Color del grupo +label.sequence = Secuencia +label.view_pdb_structure = Ver estructura PDB +label.min = Mín: +label.max = Máx: +label.colour_by_label = Color por etiquetas +label.new_feature = Nueva función +label.match_case = Hacer corresponder mayúsculas y minúsculas +label.view_alignment_editor = Ver en el editor de alineamientos +label.labels = Etiquetas +label.output_values = Valores de salida... +label.output_points = Puntos de salida... +label.output_transformed_points = Puntos de salida transformados +label.input_data = Datos de entrada... +label.nucleotide_matrix = Matriz nucleotídica +label.protein_matrix = Matriz proteica +label.show_bootstrap_values = Mostrar valores de Bootstrap +label.show_distances = Mostrar distancias +label.mark_unassociated_leaves = Marcar hojas no asociadas +label.fit_to_window = Ajustar a la ventana +label.newick_format = Formato Newick +label.select_newick_like_tree_file = Seleccione un fichero de árbol tipo Newick +label.colours = Colores +label.view_mapping = Ver mapeado +label.wireframe = Estructura metálica +label.depthcue = Clave de profundidad +label.z_buffering = Tamponamiento Z +label.charge_cysteine = Carga & Cisteína +label.all_chains_visible = Todas las cadenas visibles +label.successfully_added_features_alignment = Funciones añadidas exitosamente al alineamiento +label.keyboard_editing_mode = El modo de editar teclado es {0} +label.paste_features_annotations_Tcoffee_here = Pegar tus funciones / anotaciones / puntuación del fichero T-coffee aquí. +label.removed_columns = {0} columnas eliminadas. +label.removed_empty_columns = {0} columnas vacías eliminadas. +label.paste_newick_tree_file = Pegar su fichero árbol Newick aquí. +label.order_by_params = Ordenar por {0} +label.html_content = {0} +label.paste_pdb_file= Pegar tu fichero PDB aquí. +label.paste_pdb_file_for_sequence = Pegar fichero PDB para la secuencia {0} +label.could_not_parse_newick_file = No se pudo analizar el fichero Newick\\\!\\n {0} +label.successfully_pasted_tcoffee_scores_to_alignment= Pegada exitosamente la puntuación T-Coffee al alineamiento. +label.failed_add_tcoffee_scores = Fallo al añadir las puntuaciones T-Coffee: +label.successfully_pasted_annotation_to_alignment = Anotación pegada exitosamente al alineamiento. +label.couldnt_parse_pasted_text_as_valid_annotation_feature_GFF_tcoffee_file = No es posible parsear el texto pegado como una anotación características, GFF, o fichero T-Coffee válidos +label.successfully_pasted_alignment_file = Fichero de alineamiento pegado exitosamente +label.paste_your_alignment_file = Pegar su fichero de alineamiento aquí +label.paste_your = Pegar su +label.finished_searching = Búsqueda finalizada +label.search_results= Buscar Resultados {0} : {1} +label.found_match_for = Buscar coincidencia para {0} +label.font = Fuente: +label.size = Talla: +label.style = Estilo: +label.enter_redundancy_threshold = Introducir el umbral de redundancia +label.calculating = Calculando.... +label.modify_conservation_visibility = Modificar la visibilidad de conservación +label.colour_residues_above_occurence = Residuos de color por encima del % de aparición +label.set_this_label_text = fijar como etiqueta +label.sequences_from = Secuencias de {0} +label.successfully_loaded_file = Fichero cargado exitosamente {0} +label.successfully_saved_to_file_in_format = Guardado exitosamente en el fichero: {0} en formato {1}. +label.copied_sequences_to_clipboard = Copiadas {0} secuencias en el portapapeles. +label.check_file_matches_sequence_ids_alignment = Comprobar que el fichero coincide con el ID de la secuencia en el alineamiento. +label.problem_reading_tcoffee_score_file = Problema de lectura del fichero de puntuaciones T-COFFEE +label.source_to_target = {0} a {1} +label.per_sequence_only= Sólo por secuencia +label.to_file = a fichero +label.to_textbox = a cuadro de texto +label.jalview = Jalview +label.csv_spreadsheet = CSV (Hoja de cálculo) +label.status = [Estado] +label.channels = Canales +label.channel_title_item_count = {0} ({1}) +label.blog_item_published_on_date = {0} {1} +label.select_das_service_from_table = Seleccionar servicio DAS de la tabla para leer una descripción completa aquí. +label.session_update = Actualizar sesión +label.new_vamsas_session = Nueva sesión Vamsas +label.load_vamsas_session = Cargar sesión Vamsas +label.save_vamsas_session = Guardar sesión Vamsas +label.select_vamsas_session_opened_as_new_vamsas_session= Selecciones una sesión vamsas para abrirla como una nueva sesión. +label.open_saved_vamsas_session = Abrir una sesión VAMSAS guardada +label.groovy_console = Consola Groovy +label.lineart = lineart +label.dont_ask_me_again = No volver a preguntar +label.select_eps_character_rendering_style = Seleccionar el carácter EPS como estilo de visualización +label.invert_selection = Invertir selección +label.optimise_order = Optimizar orden +label.seq_sort_by_score = Ordenar las secuencias por puntuación +label.load_colours = Cargar colores +label.save_colours = Guardar colores +label.fetch_das_features = Recuperar funciones DAS +label.selected_database_to_fetch_from = Seleccionada {0} Base de datos {1} para buscar de {2} +label.database_param = Base de datos: {0} +label.example = Ejemplo +label.example_param = Ejemplo: {0} +label.select_file_format_before_saving = Debe seleccionar un formato de fichero antes de guardar! +label.file_format_not_specified = Formato de fichero no especificado +label.alignment_contains_hidden_columns = El alineamiento contiene columnas ocultas.\\nQuieres guardar s\u00F3lo el alineamiento visible? +label.couldnt_save_file = No se pudo guardar el fichero: {0} +label.error_saving_file = Error guardando el fichero +label.remove_from_default_list = eliminar de la lista de defectuosos? +label.remove_user_defined_colour = Eliminar el color definido por el usuario +label.you_must_select_least_two_sequences = Debes seleccionar al menos 2 secuencias. +label.invalid_selection = Selección inválida +label.principal_component_analysis_must_take_least_four_input_sequences = El an\u00E1lisis de la componente principal debe tomar\\nal menos 4 secuencias de entrada. +label.sequence_selection_insufficient = Selección de secuencias insuficiente +label.you_need_more_two_sequences_selected_build_tree = necesitas seleccionar más de dos secuencias para construir un árbol! +label.not_enough_sequences = No suficientes secuencias +label.selected_region_to_tree_may_only_contain_residues_or_gaps = La regi\u00F3n seleccionada para construir un \u00E1rbol puede\\ncontener s\u00F3lo residuos o espacios.\\nPrueba usando la funci\u00F3n Pad en el men\u00FA de edici\u00F3n,\\n o uno de los m\u00FAltiples servicios web de alineamiento de secuencias. +label.sequences_selection_not_aligned = Las secuencias seleccionadas no están alineadas +label.sequences_must_be_aligned_before_creating_tree = Las secuencias deben estar alineadas antes de crear el \u00E1rbol.\\nPrueba usando la funci\u00F3n Pad en el men\u00FA de editar,\\n o uno de los m\u00FAltiples servicios web de alineamiento de secuencias. +label.sequences_not_aligned = Secuencias no alineadas +label.problem_reading_tree_file = Problema al leer el fichero del árbol +label.possible_problem_with_tree_file = Posible problema con el fichero del árbol +label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation = Por favor seleccionar al menos tres bases de al menos una secuencia para poder realizar la traducción de cDNA. +label.translation_failed = Translation Failed +label.error_when_translating_sequences_submit_bug_report = Desafortunadamente, algo fue mal a la hora de traducir tus secuencias.\\nPor favor, revisa la consola Jalview java \\ny presenta un informe de error que incluya el seguimiento. +label.implementation_error = Error de implementación: +label.automatically_associate_pdb_files_with_sequences_same_name = Quieres asociar automáticamente los {0} ficheros PDB con las secuencias del alineamiento que tengan el mismo nombre? +label.automatically_associate_pdb_files_by_name = Asociar los ficheros PDB por nombre automáticamente +label.ignore_unmatched_dropped_files_info = Quieres ignorar los {0} ficheros cuyos nombres no coincidan con ningún IDs de las secuencias ? +label.ignore_unmatched_dropped_files = Ignorar los ficheros sin coincidencias? +label.enter_view_name = Introducir nombre visible (¿?) +label.enter_label = Introducir etiqueta +label.enter_label_for_the_structure = Introducir una etiqueta para la estructura? +label.pdb_entry_is_already_displayed = {0} Ya est\u00E1 mostrado.\\nQuieres volver a usar este visor? +label.map_sequences_to_visible_window = Mapa de secuencias en ventana visible: {0} +label.add_pdbentry_to_view = Quieres a\u00F1adir {0} a la vista llamada\\n{1}\\n +label.align_to_existing_structure_view = Alinear a una estructura ya existente +label.pdb_entries_couldnt_be_retrieved = Las siguientes entradas pdb no pueden ser extra\u00EDdas del PDB\\\:\\n{0}\\nPor favor, prueba descarg\u00E1ndolas manualmente. +label.couldnt_load_file = No se pudo cargar el fichero +label.couldnt_find_pdb_id_in_file = No se pudo encontrar un Id PDB en el fichero suministrado. Por favor, introduzca un Id para identificar esta estructura. +label.no_pdb_id_in_file = No hay un Id PDB en el fichero +label.couldnt_read_pasted_text = No se pudo leer el texto pegado {0} +label.error_parsing_text = Error analizando el texto +label.enter_local_das_source = Intruduzca el Nickname & URL de la fuente DAS local +label.you_can_only_edit_or_remove_local_das_sources = Sólo puedes editar o eliminar fuentes DAS locales! +label.public_das_source = Fuente pública DAS - no editable +label.input_alignment_from_url = Alineamiento de entrada desde URL +label.input_alignment = Alineamiento de entrada +label.couldnt_import_as_vamsas_session = No se pudo importar {0} como una nueva sesión Vamsas. +label.vamsas_document_import_failed = Fallo en la importación del documento Vamsas +label.couldnt_locate = No se pudo localizar {0} +label.url_not_found = URL no encontrada +label.no_link_selected = Enlace no seleccionado +label.new_sequence_url_link = Enlace a una nueva secuencia URL +label.cannot_edit_annotations_in_wrapped_view = No se pueden editar anotaciones en vista envolvente +label.wrapped_view_no_edit = Vista envolvente - no editar +label.error_retrieving_data = Error en la recuperación de datos +label.user_colour_scheme_must_have_name = El esquema de colores del usuario debe tener un nombre +label.no_name_colour_scheme = No hay nombre para el esquema de colores +label.invalid_url = URL Invalido! +label.error_loading_file = Error al cargar el fichero +label.problems_opening_file = Encontrados problemas al abrir el fichero {0}!! +label.file_open_error = Error al abrir el fichero +label.no_das_sources_selected_warn = No han sido seleccionadas fuentes DAS.\\nPor favor, seleccione algunas fuentes y\\npruebe de nuevo. +label.no_das_sources_selected_title = No han sido seleccionadas fuentes DAS +label.colour_scheme_exists_overwrite = El esquema de colores {0} ya existe.\\nContinuar guardando el esquema de colores como {1}? +label.duplicate_scheme_name = Duplicar nombre de esquema +label.jalview_new_questionnaire = Hay un nuevo cuestionario disponible. Querr\u00EDa completarlo ahora ?\\n +label.jalview_user_survey = Encuesta de usuario Jalview +label.alignment_properties = Propiedades del alineamiento: {0} +label.alignment_props = Propiedades del alineamiento +label.input_cut_paste = Cortar y pegar la entrada +label.input_cut_paste_params = Cortar y pegar la entrada - {0} +label.alignment_output_command = Alineamiento de salida - {0} +label.annotations = Anotaciones +label.features = Funciones +label.overview_params = Visión general {0} +label.paste_newick_file = Pegar nuevo fichero Newick +label.load_tree_from_file = desde fichero - +label.colour_by_annotation = Color por anotación +label.selection_output_command = Seleccionar salida - {0} +label.annotation_for_displayid =

    Anotación para {0}

    +label.pdb_sequence_mapping = PDB - Mapeado de secuencia +label.pca_details = detalles de la PCA +label.redundancy_threshold_selection = Selección del umbral de redundancia +label.user_defined_colours = Colores definidos del usuario +label.jalviewLite_release = JalviewLite - versión {0} +label.jaview_build_date = Fecha de creación: {0} +label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt, +label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton. +label.jalview_dev_managers = Desarrollo gestionado por The Barton Group, University of Dundee, Scotland, UK. +label.jalview_distribution_lists = Para ayuda, ver el FAQ at www.jalview.org y/o adjuntar la lista de envío jalview-discuss@jalview.org +label.jalview_please_cite = Si usa Jalview incluya la siguiente cita, por favor: +label.jalview_cite_1_authors = Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) +label.jalview_cite_1_title = Jalview Version 2 - un editor de alineamiento múltiple de secuencias y banco de trabajo de análisis +label.jalview_cite_1_ref = Bioinformaticos doi: 10.1093/bioinformatics/btp033 +label.right_click = clic en el botón derecho +label.to_add_annotation = para añadir anotación +label.alignment_has_no_annotations = El alineamiento no tiene anotaciones +label.retrieving_pdb_data = Recuperación de datos PDB... +label.label = Etiqueta +label.no_features_added_to_this_alignment = No hay funciones asociadas a este alineamiento!! +label.features_can_be_added_from_searches_1 = (Las funciones pueden ser añadidas de búsquedas o +label.features_can_be_added_from_searches_2 = de ficheros de funciones Jalview / GFF) +label.calculating_pca= Calculando PCA +label.reveal_columns = Mostrar Columnas +label.jalview_cannot_open_file = Jalview no puede abrir el fichero +label.jalview_applet = Aplicación Jalview +label.loading_data = Cargando datos +label.memory_stats = Memoria libre total: {0} MB; Memoria máxima: {1} MB; {2} % +label.calculating_tree = Calculando árbol +label.state_queueing = En cola +label.state_running = Procesando +label.state_complete = Completar +label.state_completed = Finalizado +label.state_job_cancelled = ¡Trabajo cancelado! +label.state_job_error = Error del trabajo! +label.server_error_try_later = ¡Error del servidor! (Intentar más tarde) +label.error_loading_pdb_data = ¡Error cargando los datos PDB! +label.fetching_pdb_data = Buscando los datos PDB... +label.structure_type = Estructura_tipo +label.settings_for_type = Ajustes para {0} +label.view_full_application = Ver en la aplicación completa +label.load_associated_tree = Cargar árbol asociado ... +label.load_features_annotations = Cargar características/anotaciones ... +label.export_features = Exportar características... +label.export_annotations = Exportar anotaciones ... +label.jalview_copy = Copiar (sólo Jalview) +label.jalview_cut = Cortar (sólo Jalview) +label.to_upper_case = Pasar a mayúsculas +label.to_lower_case = Pasar a minúsculas +label.toggle_case = Alternar mayúsculas y minúsculas +label.edit_name_description = Editar nombre/descripción +label.create_sequence_feature = Crear función de secuencia +label.edit_sequence = Editar secuencia +label.edit_sequences = Editar secuencias +label.sequence_details = Detalles de la secuencia +label.jmol_help = Ayuda de Jmol +label.all = Todo +label.sort_by = Ordenar por +label.sort_by_score = Ordenar por puntuación +label.sort_by_density = Ordenar por densidad +label.sequence_sort_by_density = Ordenar las secuencias por densidad +label.reveal = Revelar +label.hide_columns = Ocultar columnas +label.load_jalview_annotations = Cargar un fichero de anotación de Jalivew o un fichero de características +label.load_tree_file = Cargar un fichero de árbol +label.retrieve_parse_sequence_database_records_alignment_or_selected_sequences = Recuperar y parsear un registro de secuencia de base de datos para el alineamiento o secuencias actualmente seleccionados +label.standard_databases = Bases de datos estándar +label.fetch_embl_uniprot = Recuperar de EMBL/EMBLCDS o Uniprot/PDB y de cualquier fuente DAS seleccionada +label.reset_min_max_colours_to_defaults = Reiniciar los colores min y max colours a los valores por defecto establecidos en las preferencias de usuario +label.align_structures_using_linked_alignment_views = Alinear las estructuras utlizando las {0} vistas de alineamiento enlazadas +label.connect_to_session = Conectar a la sesión {0} +label.threshold_feature_display_by_score = Filtrar la característica mostrada por puntuación. +label.threshold_feature_no_thereshold = Sin umbral +label.threshold_feature_above_thereshold = Por encima del umbral +label.threshold_feature_below_thereshold = Por debajo del umbral +label.adjust_thereshold = Ajustar umbral +label.toggle_absolute_relative_display_threshold = Cambiar entre mostrar el umbral absoluto y el relativo. +label.display_features_same_type_different_label_using_different_colour = Mostrar las características del mismo tipo con una etiqueta diferente y empleando un color distinto (p.e. características del dominio) +label.select_colour_minimum_value = Seleccionar el color para el valor mínimo +label.select_colour_maximum_value = Seleccionar el color para el valor máximo +label.open_new_jmol_view_with_all_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista Jmol con todas las estructuras asociadas con la selección acxtual y superponer las utilizando el alineamiento. +label.open_url_param = Abrir URL {0} +label.open_url_seqs_param = Abrir URL ({0}..) ({1} secuencias) +label.load_pdb_file_associate_with_sequence = Cargar un fichero PDB y asociarlo con la secuencia {0} +label.reveal_hidden_columns = Revelar las columnas ocultas con el botón derecho del ratón +label.dark_colour = Oscurecer color +label.light_colour = Aclarar color +label.highlightnode = Pulse el botón izquierdo para seleccionar las hojas.
    Haga doble clic para invertir las hojas.
    Pulse el botón derecho para cambiar el color. +label.load_colour_scheme = Cargar esquema cromático +label.toggle_enabled_views = Cuando está habilitado, permite que se seleccionen varias vistas. +label.edit_notes_parameter_set = Haga clic para editar las notas de este conjunto de parámetros. +label.open_local_file = Abrir fichero local +label.enable_automatically_sort_alignment_when_open_new_tree = Habilite esta opción para ordenar automáticamente
    el alineamiento cuando abra
    un nuevo árbol. +label.listen_for_selections = Atención a las selecciones +label.selections_mirror_selections_made_same_sequences_other_views = Cuando está habilitado, las selecciones de esta vista serán un reflejo
    de las selecciones realizadas en las mismas secuencias de otras vistas. +label.toggle_sequence_visibility = Shift+H cambia la visibilidad de la secuencia +label.toggle_columns_visibility = Ctrl+H cambia la visibilidad de la columna +label.toggles_visibility_hidden_selected_regions = H cambiar la visibilidad de las regiones ocultas o seleccionadas +label.rename_tab_eXpand_reGroup= Haga clic en el botón derecho para renombrar la pestaña
    Presione X para expandir las tablas y G para reagrupar. +label.right_align_sequence_id = Alinear a la derecha el ID de la secuencia +label.sequence_id_tooltip = Ayuda del ID de la secuencia +label.no_services = +label.select_copy_raw_html = Seleccione esta opción si desea copiar el html en bruto +label.share_data_vamsas_applications = Compartir datos con otras aplicaciones vamsas +label.connect_to = Conectar a +label.join_existing_vamsas_session = Unirse a una sesión vamsas existente +label.from_url = desde una URL +label.any_trees_calculated_or_loaded_alignment_automatically_sort = Cuando está habilitado, cualquier árbol calculado o cargado en el alineamiento lo ordenará +label.sort_with_new_tree = Ordenar con el nuevo árbol +label.from_textbox = desde un área de texto +label.window = Ventana +label.preferences = Preferencias +label.tools = Herramientas +label.fetch_sequences = Recuperar secuencia(s) +label.stop_vamsas_session = Parar sesión vamsas +label.collect_garbage = Recolector de basura +label.show_memory_usage = Mostrar uso de memoria +label.show_java_console = Mostrar consola de Java +label.show_jalview_news = Mostrar las noticias de Jalview +label.take_snapshot = Tomar captura +label.monospaced_fonts_faster_to_render = Las fuentes monoespaciadas son más rápidas de pintar +label.anti_alias_fonts = Fuentes anti-alias (más lentas de pintar) +label.monospaced_font= Monoespaciadas +label.quality = Calidad +label.maximize_window = Maximizar ventana +label.conservation = Conservación +label.consensus = Consenso +label.histogram = Histograma +label.logo = Logo +label.non_positional_features = Características no posicionales +label.database_references = Referencias a base de datos +label.share_selection_across_views = Compartir la selección en todas las vistas +label.scroll_highlighted_regions = Desplazarse hasta las regiones resaltadas +label.gap_symbol = Símbolo del hueco +label.alignment_colour = Color del alineamiento +label.address = Dirección +label.port = Puerto +label.default_browser_unix = Navegador por defecto (Unix) +label.send_usage_statistics = Enviar estadísticas de uso +label.check_for_questionnaires = Comprobar los cuestionarios +label.check_for_latest_version = Comprobar la última versión +label.url_linkfrom_sequence_id = URL del enlace del ID de la secuencia +label.use_proxy_server = Utilizar un servidor proxy +label.eps_rendering_style = Estilo de visualización EPS +label.append_start_end = Añadir /inicio-fin (/15-380) +label.full_sequence_id = ID de la secuencia completo +label.smooth_font = Fuente alargada +label.autocalculate_consensus = Autocalcular consenso +label.pad_gaps = Rellenar huecos +label.pad_gaps_when_editing = Rellenar huecos al editar +label.automatically_set_id_width = Establecer automáticamente al anchura del ID +label.figure_id_column_width = Anchura de la columna del ID de la Figura +label.use_modeller_output = Utilizar la salidad del Modeller +label.wrap_alignment = Envolver alineamiento +label.right_align_ids = Alinear IDs a la derecha +label.sequence_name_italics = Nombre de la secuencia en cursiva +label.open_overview = Abrir resumen +label.default_colour_scheme_for_alignment = Esquema cromático por defecto para el alineamiento +label.annotation_shading_default = Sombreado por defecto de la anotación +label.default_minimum_colour_annotation_shading = Por mínimo por defecto para el sombreado de la anotación +label.default_maximum_colour_annotation_shading = Por máximo por defecto para el sombreado de la anotación +label.visual = Visual +label.connections = Conexiones +label.output = Salida +label.editing = Edición +label.das_settings = Configuración DAS +label.web_services = Servicios web +label.right_click_to_edit_currently_selected_parameter = Haga clic en el botón derecho para editar el parámetro seleccionado actualmente. +label.let_jmol_manage_structure_colours = Permitir que Jmol gestione la estructuras cromáticas +label.marks_leaves_tree_not_associated_with_sequence = Marcar las hojas del árbol que no están asociadas a una secuencia +label.index_web_services_menu_by_host_site = Indizar los servicios web en el menú por el host que los aloja +label.option_want_informed_web_service_URL_cannot_be_accessed_jalview_when_starts_up = Marque esta opción si desea ser informado
    cuando no se pueda acceder a la URL de un servicio web
    al arrancar Jalview. +label.new_service_url = Nueva URL del servicio +label.edit_service_url = Editar la URL del servicio +label.delete_service_url = Borrar la URL del servicio +label.details = Detalles +label.options = Opciones +label.parameters = Paramétros +label.available_das_sources = Fuentes DAS disponibles +label.full_details = Detalles completos +label.authority = Autoridad +label.type = Tipo +label.proxy_server = Servidor proxy +label.file_output = Fichero de salida +label.select_input_type = Seleccionar el tipo de entrada +label.set_options_for_type = Establecer opciones para el tipo +label.data_input_parameters = Datos de los parámetros de entrada +label.data_returned_by_service = Datos devueltos por el servicio +label.rsbs_encoded_service = Servicio RSBS codificado +label.parsing_errors = Errores de parseo +label.simple_bioinformatics_rest_services = Simple Bioinformatics Rest Services +label.web_service_discovery_urls = URL de descubrimiento de servicios web +label.input_parameter_name = Nombre del parámetro de entrada +label.short_descriptive_name_for_service = Nombre corto descriptivo del servicio +label.function_service_performs = Tipo de función que realiza el servicio (p.e. alineamiento, análisis, búsqueda, etc). +label.brief_description_service = Descripción breve del servicio +label.url_post_data_service = URL a la que enviar los datos del servicio. Incluya cualquier parámetro especial que se necesite aquí +label.optional_suffix = Sufijo opcional añadido a la URL al recuperar los resultados del servicio +label.preferred_gap_character = ¿Qué caracter para el hueco prefiere el servicio? +label.gap_character = Carácter para hueco +label.move_return_type_up_order= Mover el tipo de returno hacia arriba en el orden +label.move_return_type_down_order= Mover el tipo de returno hacia abajo en el orden +label.update_user_parameter_set = Actualizar el conjunto de parámetros de usuario existente +label.delete_user_parameter_set = Borrar el conjunto de parámetros de usuario existente +label.create_user_parameter_set = Crear un nuevo conjunto de parámetro con la configuración actual. +label.revert_changes_user_parameter_set = Deshacer todos los cambios en el conjunto de parámetros actual +label.start_job_current_settings = Arrancar trabajo con la configuración actual +label.cancel_job_close_dialog = Cerrar este diálogo y cancelar el trabajo +label.input_output = Entrada/Salida +label.cut_paste = Cortar y pegar +label.adjusting_parameters_for_calculation = Ajustar los parámetros para el cálculo existente +label.2d_rna_structure_line = 2D RNA {0} +label.2d_rna_sequence_name = 2D RNA - {0} +label.edit_name_and_description_current_group = Editar el nombre y la descripción del grupo actual. +label.view_structure_for = Visualizar la estructura para {0} +label.view_all_structures = Visualizar todas las {0} estructuras. +label.view_all_representative_structures = Visualizar todas las {0} estructuras representativas. +label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Abrir una nueva vista de Jmol con todas las estructuras representativas\nasociadas con la selecci\u00F3n actual\nsuperpuesta con el alineamiento actual. +label.associate_structure_with_sequence = Asociar estructura con la secuencia +label.from_file = desde fichero +label.enter_pdb_id = Introducir PDB Id +label.discover_pdb_ids = Buscar PDB ids +label.text_colour = Color del texto +label.structure = Estructura +label.view_structure = Visualizar estructura +label.clustalx_colours = Colores de Clustalx +label.above_identity_percentage = Sobre % identidad +label.create_sequence_details_report_annotation_for = Anotación para {0} +label.sequece_details_for = Detalles de la secuencia para {0} +label.sequence_name = Nombre de la secuencia +label.sequence_description = Descripción de la secuencia +label.edit_sequence_name_description = Editar el nombre/descripción de la secuencia +label.spaces_converted_to_backslashes = Los espacios se han convertido en _ +label.no_spaces_allowed_sequence_name = No se permiten espacios en el nombre de la secuencia +label.select_outline_colour = Seleccionar el color del límite +label.web_browser_not_found_unix = Unixers\: No es posible encontrar el navegador web por defecto.\nA\u00F1ada la ruta completa de su navegador en la pesta\u00F1a de Preferencias. +label.web_browser_not_found = No se encuentra el navegador web +label.select_pdb_file_for = Seleccione un fichero PDB para {0} +label.html = HTML +label.wrap = Envolver +label.show_database_refs = Mostrar las referencias en base de datos +label.show_non_positional_features = Mostrar las características no posicionales +label.save_png_image = Guardar como imagen PNG +label.load_tree_for_sequence_set = Cargar un árbol para este conjunto de secuencias +label.export_image = Exportar imagen +label.vamsas_store = Almacén VAMSAS +label.translate_cDNA = Traducir cDNA +label.extract_scores = Extraer puntuaciones +label.get_cross_refs = Obtener referencias cruzadas +label.sort_alignment_new_tree = Alinear el alineamiento con el nuevo árbol +label.add_sequences = Añadir secuencias +label.new_window = Nueva ventana +label.refresh_available_sources = Refrescar las fuentes disponibles +label.use_registry = Utilizar el registro +label.add_local_source = Añadir fuente local +label.set_as_default = Establecer por defecto +label.show_labels = Mostrar etiquetas +label.background_colour = Color de fondo +label.associate_nodes_with = Asociar nodos con +label.jalview_pca_calculation = Cálculo del PCA por Jalview +label.link_name = Nombre del enalce +label.pdb_file = Fichero PDB +label.colour_with_jmol = Colorear con Jmol +label.align_structures = Alinear estructuras +label.jmol = Jmol +label.sort_alignment_by_tree = Ordenar alineamiento por árbol +label.mark_unlinked_leaves = Marcar las hojas como no enlazadas +label.associate_leaves_with = Asociar hojas con +label.save_colour_scheme_with_unique_name_added_to_colour_menu = Guarde el esquema cromáticos con un nombre único y se añadirá al menú de colores +label.case_sensitive = Sensible a mayúsculas +label.lower_case_colour = Color para las minúsculas +label.index_by_host = Indizar por host +label.index_by_type = Indizar por tipo +label.enable_jabaws_services = Habilitar servicios JABAWS +label.display_warnings = Mostrar advertencias +label.move_url_up = Mover la URL hacia arriba +label.move_url_down = Mover la URL hacia abajo +label.add_sbrs_definition = Añadir una definición SBRS +label.edit_sbrs_definition = Editar una definición SBRS +label.delete_sbrs_definition = Borrar una definición SBRS +label.your_sequences_have_been_verified = Sus secuencias has sido verificadas en una base de datos de secuencias conocidas. Algunos de sus ID se han alterado y\n, probablemente, el residuo de inicio/fin se haya actualizado.\nGuarde su alineamiento para mantener el ID actualizado.\n\n +label.sequence_names_updated = Nombres de secuencia actualizados +label.dbref_search_completed = Búsqueda de DBRef terminada +label.show_all_chains = Mostrar todas las cadenas +label.fetch_all_param = Recuperar todas {0} +label.paste_new_window = Pegar en una nueva ventana +label.settings_for_param = Configuración para {0} +label.view_params = Visualizar {0} +label.select_all_views = Seleccionar todas las vistas +label.align_sequences_to_existing_alignment = Alinear las secuencias con el alineamiento existente +label.realign_with_params = Realinear con {0} +label.calcname_with_default_settings = {0} por defecto +label.action_with_default_settings = {0} con la configuración por defecto +label.edit_settings_and_run = Editar la configuración y ejecutar... +label.view_and_change_parameters_before_alignment = Ver y cambiar los parámetros antes del alineamiento +label.run_with_preset_params = Ejecutar {0} con preconfiguración +label.view_and_change_parameters_before_running_calculation = Ver y cambiar los parámetros antes de lanzar el cálculo +label.view_documentation = Ver documentación +label.select_return_type = Seleccionar el tipo de retorno +label.translation_of_params = Traducción de {0} +label.features_for_params = Características de - {0} +label.annotations_for_params = Anotaciones de - {0} +label.generating_features_for_params = Generando características de - {0} +label.generating_annotations_for_params = Generando anotaciones de - {0} +label.varna_params = VARNA - {0} +label.sequence_feature_settings = Configuración de las características de la secuencia +label.pairwise_aligned_sequences = Secuencias alineadas a pares +label.original_data_for_params = Datos originales de {0} +label.points_for_params = Puntos de {0} +label.transformed_points_for_params = Puntos transformados de {0} +label.graduated_color_for_params = Color graduado para la característica de {0} +label.select_backgroud_colour = Seleccionar color de fondo +label.invalid_font = Fuente no válida +label.separate_multiple_accession_ids = Separar los accession id con un punto y coma ";" +label.replace_commas_semicolons = Cambiar comas por puntos y comas +label.parsing_failed_syntax_errors_shown_below_param = Parseo erróneo. A continuación, se muestras los errores de sintaxis {0} +label.parsing_failed_unrecoverable_exception_thrown_param = \nParseo err\u00F3neo. Se ha lanzado una excepci\u00F3n fatal\:\n {0} +label.example_query_param = Consulta de ejemplo: {0} +label.enter_value_increase_conservation_visibility = Introduzca un valor para incrementar la visibilidad de la conservación +label.enter_percentage_identity_above_which_colour_residues = Introduza un % de identidad por encima del cual se colorearán los residuos +label.wswublast_client_credits = Para mostrar las caracter\u00EDsticas de una secuencia, debe indicarse un id de Uniprot cuya secuencia se corresponda al 100 % con la introducida.\nPara mostrar estas caracter\u00EDsticas, prueba a cambar los nombre de sus secuencia con los ID que se sugieren a continuaci\u00F3n.\n\nRunning WSWUBlast at EBI.\nPlease quote Pillai S., Silventoinen V., Kallio K., Senger M., Sobhany S., Tate J., Velankar S., Golovin A., Henrick K., Rice P., Stoehr P., Lopez R.\nSOAP-based services provided by the European Bioinformatics Institute.\nNucleic Acids Res. 33(1)\:W25-W28 (2005)); +label.blasting_for_unidentified_sequence = Ejecutar BLAST para la secuencias sin identificar +label.select_columns_containing = Seleccione las columnas que contengan +label.select_columns_not_containing = Seleccione las columnas que no contengan +option.trim_retrieved_seqs = Ajustar las secuencias recuperadas +label.trim_retrieved_sequences = Cuando la secuencia de referencia es más larga que la secuencia con la que está trabajando, sólo se mantienen las subsecuencias relevantes. +label.use_sequence_id_1 = Utilice $SEQUENCE_ID$ o $SEQUENCE_ID=//=$ +label.use_sequence_id_2 = \nto para embeber el id de la secuencia en una URL +label.ws_parameters_for = Parámetros para {0} +label.switch_server = Cambiar servidor +label.open_jabaws_web_page = Abra el página principal del servidor JABAWS en un navegador web +label.choose_jabaws_server = Escoja un servidor para ejecutar este servicio +label.services_at = Servicios en {0} +label.rest_client_submit = {0} utilizando {1} +label.fetch_retrieve_from =Recuperar de {0} +label.fetch_retrieve_from_all_sources = Recuperar de todas las fuentes {0} en {1}
    La primera es :{2} +label.feature_settings_click_drag = Haga clic o arrastre los tipos de las características hacia arriba o hacia abajo para cambiar el orden de visualización.
    Haga doble clic para seleccionar las columnas que contienen las características del alineamiento/selección actual.
    +label.opt_and_params_further_details = ver los detalles adicionales haciendo clic en el botón derecho +label.opt_and_params_show_brief_desc_image_link = Haga clic para ver una descripción breve
    Haga clic en el botón derecho para obtener información adicional. +label.opt_and_params_show_brief_desc = Haga clic para ver una descripción breve
    +label.adjusts_width_generated_eps_png = Ajusta la anchura del fichero EPS o PNG generado para asegurar incluso que el ID de la secuencia más larga o las etiquetas de anotación se muestran +label.manually_specify_width_left_column = Especificar manualmente la anchura de la columna izquierda en las etiquetas de los ID de la secuencia y las anotaciones se mostrar en las figuras del alineamiento exportado.Esta configuraicón se ignorará si está marcada la opción 'Establecer automáticamente al anchura del ID' +label.job_created_when_checked = Cuando está habilitado, se crea un trabajo para cada secuencia de la selección actual +label.when_checked_job_visible_region_and_results = Cuando está habilitado, se crea un único trabajo para la región visible y los resultados de mapean en su ubicación dentro del alineamiento. En caso contrario, se creará un trabajo para cada región visible y contigua en el alineamiento o selección actual (p.e. un alineamiento múlitple). +label.flat_file_representation = La representación del fichero plano de este servicio utilizando el formalismo Really Simple Bioinformatics Service +label.result_of_parsing_rsbs = Resultados de parsear la representación RSBS +label.user_preset = Preselección de usuario +label.service_preset = Preselección del servicio +label.run_with_preset = Ejecutar {0} con preselección +label.view_service_doc_url = Visualizar {1} +label.submit_sequence = Enviar {0} {1} {2} {3} a
    {4} +action.by_title_param = por {0} +label.alignment = Alineamiento +label.secondary_structure_prediction = Predicción de la estructura secundaria +label.sequence_database_search = Búsqueda en base de datos de secuencias +label.analysis = Análisis +label.protein_disorder = Desorden en la proteína +label.source_from_db_source = Fuentes de {0} +label.from_msname = de {0} +label.superpose_with = Superponer con... +action.do = Hacer +label.scale_label_to_column = Ajustar la etiqueta a la columna +label.add_new_row = Añadir nuevo fila +label.edit_label_description = Editar etiqueta/descripción +label.hide_row = Ocultar esta fila +label.delete_row = Borrar esta fila +label.show_all_hidden_rows = Mostrar todas las filas ocultas +label.export_annotation = Exportar anotación +label.copy_consensus_sequence = Copiar secuencia de consenso +label.helix = Hélice +label.sheet = Hoja +label.rna_helix = Hélice de ARN +label.remove_annotation = Borrar anotación +label.colour_by = Colorear por... +label.muscle_multiple_protein_sequence_alignment = Alineamiento múltiple de secuencias de proteínas con Muscle +label.mafft_multiple_sequence_alignment = Alineamiento múltiple de secuencias con MAFFT +label.clustalw_multiple_sequence_alignment = Alineamiento múltiple de secuencias con ClustalW +label.jnet_secondary_structure_prediction = Predicción de la estructura secundaria con JNet +label.multiharmony = Multi-Harmony +label.unable_start_web_service_analysis = No es posible iniciar el servicio web de análisis +label.job_couldnt_be_started_check_input = El trabajo no puede arrancarse. Por favor, compruebe los parámetros de entrada y los mensajes de advertencia de la consola de Jalview. +label.prompt_each_time = Preguntar siempre +label.use_source = Fuente +label.couldnt_save_project = No es posible guardar el proyecto +label.error_whilst_saving_current_state_to = Error mientras se guardaba el estado a {0} +label.error_whilst_loading_project_from = Error cargando el proyecto desde {0} +label.couldnt_load_project = No es posible cargar el proyecto +label.pca_sequences_not_aligned = Las secuencias deben estar alineadas antes de calcular el PCA.\nPruebe a utilizar la funci\u00F3n de rellenar huecos en el men\u00FA Editar,\no cualquiera de los servicios web de alineamiento m\u00FAltiple. +label.invalid_name_preset_exists = Nombre no válido - esta preconfiguración ya existe. +label.invalid_name = Nombre no válido +label.set_proxy_settings = Por favor, configure su proxy en la pestaña 'Conexiones' de la ventana de Preferencia +label.proxy_authorization_failed = Autorización del proxy fallida +label.internal_jalview_error = Error interno de Jalview +label.secondary_structure_prediction_service_couldnt_be_located = No se ha podido encontrar el Servicio de Predicciónd de la Estructura Secudaria {0} en {1}. +label.service_called_is_not_msa_service = El Servicio llamado \n{0}\nno es un \nServicio de Alineamiento M\u00FAltiple de Secuencias\! +label.msa_service_is_unknown = El Servicio de Alineamiento Múltiple llamado {0} es desconocido +label.service_called_is_not_seq_search_service = El Servicio llamando \n{0}\nno es un \nServicio de B\u00FAsqueda de Secuencias\! +label.seq_search_service_is_unknown = El Servicio de Búsqueda de Sencuencias llamado {0} es desconocido +label.feature_type = Tipo de característisca +label.display = Representación +label.service_url = URL del servicio +label.copied_sequences = Secuencias copiadas +label.cut_sequences = Cortar secuencias +label.conservation_colour_increment = Incremento de Conservación del Color ({0}) +label.percentage_identity_thereshold = Umbral del Porcentaje de Identidad ({0}) +label.error_unsupported_owwner_user_colour_scheme = Propietario no soportado para el diálogo del Esquema Cromático del Usuario +label.save_alignment_to_file = Guardar Alineamiento en fichero +label.save_features_to_file = Guardar Características en un fichero +label.save_annotation_to_file = Guardar Anotación en un fichero +label.no_features_on_alignment = No se han encontrado características en el alineamiento +label.save_pdb_file = Guardar fichero PDB +label.save_text_to_file = Guardar Texto en un fichero +label.save_state = Guardar estado +label.restore_state = Restaurar estado +label.saving_jalview_project = Guardando el proyecto de Jalview {0} +label.loading_jalview_project = Cargando el proyecto de Jalview {0} +label.save_vamsas_document_archive = Guardar el archivo de documento Vamsas +label.saving_vamsas_doc = Guardando el documento VAMSAS en {0} +label.load_feature_colours = Cargar colores de características +label.save_feature_colours = Guardar esquema cromático de características +label.dataset_for = {0} conjunto de datos para {1} +label.select_startup_file = Seleccionar fichero de arranque +label.select_default_browser = Seleccionar navegador web por defecto +label.save_tree_as_newick = Guardar árbol como fichero newick +label.create_eps_from_tree = Crear un fichero EPS a partir de un árbol +label.create_png_from_tree = Crear una imagen PNG a partir de un árbol +label.save_colour_scheme = Guardar esquema cromático +label.edit_params_for = Editar los parámetros de {0} +label.choose_filename_for_param_file = Escoja un nombre de fichero para este fichero de parámetros +label.save_as_html = Guardar como HTML +label.recently_opened = Abiertos recientemente +label.blasting_for_unidentified_sequence_jobs_running = Ejecutando BLAST de las secuencias no indentificadas - {0} trabajos en marcha. +label.tree_from = Árbol de {0} +label.webservice_job_title = {0} usando {1} +label.select_visible_region_of = seleccionada {0} región de {1} +label.visible = Visible +label.select_unselect_visible_regions_from = seleccionada y deseleccionadas {0} regiones de {1} +label.visible_region_of = región visible de +label.webservice_job_title_on = {0} usando {1} de {2} +label.updating_vamsas_session = Actualizando sesión VAMSAS +label.loading_file = Cargando fichero: {0} +label.edit_params = Editar {0} +error.not_implemented = No implementado +error.no_such_method_as_clone1_for = No existe ese método como un clone1 de {0} +error.null_from_clone1 = Nulo de clone1! +error.implementation_error_sortbyfeature = Error de implementación - sortByFeature debe ser uno de FEATURE_SCORE, FEATURE_LABEL o FEATURE_DENSITY. +error.not_yet_implemented = No se ha implementado todavía +error.unknown_type_dna_or_pep = Tipo desconocido {0} - dna o pep son los únicos valores permitidos +error.implementation_error_dont_know_thereshold_annotationcolourgradient = Error de implementación: no se conoce el valor umbral para el AnnotationColourGradient actual. +error.implementation_error_embeddedpopup_not_null = Error de implementación - embeddedPopup debe ser no nulo. +error.invalid_colour_for_mycheckbox = Color no válido para MyCheckBox +error.implementation_error_unrecognised_render_object_for_features_type = Error de implementación: no se reconoce el objeto de representación {0} para las características de tipo {1} +error.implementation_error_unsupported_feature_colour_object = Error de implementación: objeto de color de características no soportado. +error.invalid_separator_parameter = Separador de parámetros no válido - debe tener longitud mayor que cero +error.alignment_cigararray_not_implemented = Alignment(CigarArray) no se ha implementado todavía +error.weak_sequencei_equivalence_not_yet_implemented = Equivalencia débil sequenceI no se ha implementado todavía. +error.implementation_error_can_only_make_alignmnet_from_cigararray = Error de implementación - sólo se puede construir un vista de alineamiento a partir de una CigarArray de secuencias. +error.empty_view_cannot_be_updated = una vista vacía no se puede actualizar. +error.mismatch_between_number_of_sequences_in_block = No hay coincidencia entre el número de secuencias en el bloque {0} ({1}) y la vista original ({2}) +error.padding_not_yet_implemented = El relleno no se ha implementado todavía +error.mismatch_between_visible_blocks_to_update_and_number_of_contigs_in_view = No hay coincidencia entre los bloques visibles para actualizar y el número de contigs en la vista (contigs=0,blocks={0}) +error.unknown_seq_cigar_operation = Operación SeqCigar {0} desconocida +error.implementation_bug_parse_cigar_string = Bug de implementación en parseCigarString +error.implementation_error_invalid_operation_string = Error de implementación. Cadena de operación no válida. +error.invalid_range_string = Rango de la cadena no válido (debe ser cero o un número positivo) +error.implementation_error_delete_range_out_of_bounds = Error de implementación: deleteRange fuera de rango: el comienzo debe ser cero o positivo y menor que el final. +error.implementation_error = Error de implementación +error.implementation_error_unknown_operation = ¡Error de implementación! Operación desconocida {0} +error.implementation_error_unexpected_null_from_get_sequence_and_deletions = Error de implementación - valor nulo no esperado en getSequenceAndDeletions +error.implementation_error_set_seq_null = Error de implementación - _setSeq(null,...) +error.implementation_error_s = Error de implementación: _s= {0} +error.implementation_error_seqcigar_possible = SeqCigar: posible error de implementación: la secuencia es más larga de el conjunto de datos de la secuencia +error.implmentation_bug_seq_null = Bug de implementación. Seq nula +error.implementation_bug_cigar_operation_list_range_list = Bug de implementación: Cigar Operation list!= range list +error.not_yet_implemented_cigar_object_from_cigar_string = No implementado todavía: construcción de un objeto Cigar desde una cadena y una secuencia con huecos. +error.implementation_bug_cigar_operation = Bug de implementación. La operación Cigar {0} {1} no es ni {2}, ni {3} ni {4}. +error.implementation_error_for_new_cigar = Error de implementación en new Cigar(SequenceI) +error.implementation_error_cigar_seq_no_operations = Error de implementación: la {0}a secuencia Cigar no tiene operaciones. +error.implementation_error_jmol_getting_data = Error de implementación - Jmol parece estar todavía intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016 +error.implementation_error_no_pdbentry_from_index = Error de implementación - no existe la correspondiente entrada pdb (para el índice {0}) para añadir el mapeo de secuencias a +error.jmol_version_not_compatible_with_jalview_version = La versión {0} de Jmol no es compatible con esta versión de Jalview. Informe de este problema en http://issues.jalview.org +error.not_implemented_remove = Borrar: no implementado +error.not_implemented_clone = Clonar: no implementado +error.implementation_error_chimera_getting_data = Error de implementación - Chimera parece estar todavía intentando recuperar sus datos - informe de ello en http://issues.jalview.org/browse/JAL-1016 +error.call_setprogressbar_before_registering_handler = llamada a setProgressBar antes de registrar el manejador de la barra de estado +label.cancelled_params = {0} cancelado +error.implementation_error_cannot_show_view_alignment_frame = Error de implementación: no es posible mostrar una vista de otro alineamiento en un AlignFrame. +error.implementation_error_dont_know_about_thereshold_setting = Error de implementación: no se conoce la configuración del umbral para el AnnotationColourGradient actual. +error.eps_generation_not_implemented = La generación de EPS no se ha implementado todavía +error.png_generation_not_implemented = La generación de PNG no se ha implementado todavía +error.try_join_vamsas_session_another = Tratando de establecer una sesión VAMSAS cuando ya había otra conectada +error.invalid_vamsas_session_id = Identificador de sesión VAMSAS no válido +error.implementation_error_cannot_create_groovyshell = Error de implementación:no se puede crear groovyShell sin Groovy en el classpath +label.groovy_support_failed = El soporte Groovy de Jalview ha fallado +label.couldnt_create_groovy_shell = No es posible crear el shell de Groovy. Compruebe el fichero de log para conocer los detalles. +error.unsupported_version_calcIdparam = Versión no soportada de {0} +error.implementation_error_cant_reorder_tree = Error de implementación: no es posible reordenar este árbol. No DefaultMutableTreeNode. +error.invalid_value_for_option = Valor no válido de {0} para la opción {1} +error.implementation_error_cannot_import_vamsas_doc = Error de implementación - todavía no es posible importar el documento VAMSAS existente en una sesión existente. +label.vamsas_doc_couldnt_be_opened_as_new_session = El documento VAMSAS no ha podido abrirse como una nueva sesión. Por favor, escoja otra. +error.implementation_error_vamsas_operation_not_init = ¡Error de implementación! Operaciones VAMSAS cuando el cliente no estaba inicializado ni conectado +error.jalview_no_connected_vamsas_session = Jalview está conectado a una sesión VAMSAS +error.implementation_error_cannot_recover_vamsas_object_mappings = Error de implementación: no es posible recuperar los mapeos del objeto VAMSAS - no se ha hecho ningún backup +error.setstatus_called_non_existent_job_pane = se lllamado a setStatus para el panel de trabajo {0} no existente +error.implementation_error_cannot_find_marshaller_for_param_set =Error de implementación: no puede encontrar un marshaller para el conjunto de parámetros +error.implementation_error_old_jalview_object_not_bound =Error de implementación: ¡el objeto Jalview antiguo no está enlazado! ({0}) +error.implementation_error_vamsas_doc_class_should_bind_to_type = Error de implementación: la clase de documento VAMSAS {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2}) +error.implementation_error_jalview_class_should_bind_to_type = Error de implementación: la clase Jalview {0} debe enlazar a {1} (pero se ha encontrado que lo está a {2}) +error.invalid_vamsas_rangetype_cannot_resolve_lists = RangeType VAMSAS no válido - ¡no es posible resolver ambas listas de Pos y Seg con los valores elegidos! +error.implementation_error_maplist_is_null = Error de implementación. MapList es nulo en initMapType. +error.implementation_error_cannot_have_null_alignment = Error de implementación: no es posible tener una clave nula en el alineamiento +error.implementation_error_null_fileparse = Error de implementación. FileParse nulo en el construictor de copia +error.implementation_error_cannot_map_alignment_sequences = Error de implementación: no es posible maper un alineamiento de secuencias desde distintos conjuntos de datos en un único alineamiento en el documento VAMSAS. +error.implementation_error_cannot_duplicate_colour_scheme = Error grave de implementación: no es posible duplicar el esquema cromático {0} +error.implementation_error_structure_selection_manager_null = Error de implementación. El contexto structure selection manager's es nulo +exception.ssm_context_is_null = El contexto SSM es nulo +error.idstring_seqstrings_only_one_per_sequence = idstrings y seqstrings contienen una cadena por cada secuencia +error.cannot_have_mixed_length_replacement_vectors = No es posible tener vectores de reemplazo de distinta longitud. El vector de reemplazo para {0} es de {1} cadenas de largo, pero se ha considerado ya como un vector de longitud {2}. +error.cannot_have_zero_length_vector_replacement_strings = No es posible tener un vector de cadenas de reemplazo de longitud cero - debe ser uno o n. +error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = ¡Error de implementación! Todavía no se soportan varios trabajos de predicción asociados a una única secuencia. +error.implementation_error_invalid_msa_index_for_job = ¡Error de implementación! Valor msaIndex no válido para JPredJob en el objeto de entrada MSA padre! +error.implementation_error_startjob_called = Error de implementación - StartJob(JpredJob) invocado en {0} +error.multiple_jnet_subjob_merge_not_implemented = Todavía no se han implementado varios subtrabajos JNet conjuntos. +label.job_never_ran = El trabajo nunca se ejecutó - entrada devuelta al usuario. +error.implementation_error_minlen_must_be_greater_zero = Error de implementación: minlen debe ser cero o más +error.implementation_error_msawbjob_called = Error de implementación - StartJob(MsaWSJob) invocado en un WSJobInstance {0} +error.implementation_error_cannot_attach_ws_menu_entry = Error de implementación: ¡no es posible adjunto una WS Menu Entry sin una referencia a un manejador del servicio! +error.parameter_migration_not_implemented_yet = La migración de parámetros no se ha implementado todavía +error.implementation_error_cannot_set_jaba_option = Error de implementación: no es posible establecer el valor de Jaba Option a un valor fuera de su rango permitido +error.implementation_error_valuetype_doesnt_support_jabaws_type = Error de implementación: jalview.ws.params.ValueConstrainI.ValueType no soporta el tipo JABAWS: {0} +error.cannot_create_jabaws_param_set = No es posible crear un JabaWSParamSet con parámetros no JabaWS +error.cannot_set_arguments_to_jabaws_param_set = No es posible establecer argumentos en JabaWSParamSet que no sean argumentos JabaWS +error.implementation_error_runner_config_not_available = Error de implementación: Runner Config no está disponible para un servicio JABAWS de tipo {0} ({1}) +error.implementation_error_cannot_handle_jaba_param = Error de implementación: no es posible manejar el objeto del parámetro Jaba {0} +error.implementation_error_attempt_to_delete_service_preset = Error de implementación: intento de borrar un servicio preestablecido +error.implementation_error_cannot_locate_oldname_presetname = Error de implementación: no es posible localizar ni el nombre antiguo ({0}) ni el presetName ({1} en el almacén de datos. +error.implementation_error_jabaws_param_set_only_handled_by = Error de implementación: JabaWsParamSets sólo puede ser manejado por JabaParamStore +error.cannot_set_source_file_for = No es posible establecer el fichero fuente para {0} +error.mismatch_service_instance_preset = Posible desajuste entre la instancia del servicio y la prestablecida +error.cannot_set_params_for_ws_preset = No es posible establecer los parámetros para el servicio web JABA presestablecido +error.implementation_error_can_only_instantiate_jaba_param_sets = Error de implementación: sólo se puede instanciar conjuntos de parámetros Jaba +error.no_aacon_service_found = No se ha encontrado ningún servicio AACon +error.implementation_error_couldnt_copy_value_constraint = Error de implementación: ¡no se puede copiar ValueConstrain! +error.couldnt_encode_as_utf8 = No se ha podido codificar {0} como UTF-8. +error.tree_inputtype_not_yet_implemented = No se ha implementado todavía el árbol como InputType +error.implementation_error_need_to_have_httpresponse = Error de implementación: se necesita tener un HttpResponse que procesar +error.dbrefsource_implementation_exception = Excepción de implementación DBRefSource +error.implementation_error_dbinstance_must_implement_interface = Error de Implementación- getDbInstances debe recibir una clase que implemente jalview.ws.seqfetcher.DbSourceProxy (recibió {0}) +error.implementation_error_must_init_dbsources =Error de implementación. Debe inicializar dbSources +label.view_controller_toggled_marked = {0} {1} columnas {2} conteniendo características del tipo {3} en {4} secuencia(s) +label.toggled = Invertida +label.marked = Marcada +label.not = no +label.no_feature_of_type_found = No se han encontrado características del tipo {0}. +label.submission_params = Envío {0} +label.empty_alignment_job = Trabajo de alineamiento vacío +label.add_new_sbrs_service = Añadir un nuevo SBRS +label.edit_sbrs_entry = Editar entrada SBRS +label.pca_recalculating = Recalculando PCA +label.pca_calculating = Calculando PCA +label.select_foreground_colour = Escoger color del primer plano +label.select_colour_for_text = Seleccione el color del texto +label.adjunst_foreground_text_colour_thereshold = Ajustar el umbral del color del texto en primer plano +label.select_subtree_colour = Seleccioanr el color del sub-árbol +label.create_new_sequence_features = Crear nueva(s) característica(s) de secuencia +label.amend_delete_features = Arrelgar/Borrar características de {0} +exception.out_of_bounds_for_file = Fuera de rango para el fichero: i={0}, Buffer final: i0={1} iend={2} +exception.null_string_given_to_regex_search = Cadena nula enviada a Regex.search +exception.null_string_like_given_to_regex_search = StringLike nula enviada a Regex.search +exception.null_string_given_to_regex_reverse_search = Cadena nula enviada a Regex.reverseSearch +exception.null_string_like_given_to_regex_reverse_search = StringLike nula enviada a Regex.reverseSearch +exception.null_string_like_given_to_regex_search_from = Cadena nula enviada a Regex.searchFrom +exception.null_string_like_given_to_regex_search_region = Cadena nula enviada a Regex.searchRegion +exception.replace_null_regex_pointer = Reemplazador tiene un puntero Regex nulo +exception.bad_pattern_to_regex_perl_code = patrón erróneo en Regex.perlCode: {0} +exception.no_stub_implementation_for_interface = No existe una implementación del stub para la interfaz: {0} +exception.cannot_set_endpoint_address_unknown_port = No es posible estabelcer la dirección de punto final para el puerto desconocido {0} +exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis = Consultando la coincidencia de apertura de paréntesis para paréntesis sin cerrar (?) +exception.mismatched_unseen_closing_char = Discordancia (no vista) en el carácter de cierre {0} +exception.mismatched_closing_char = Carácter de cierre discordante {0} +exception.mismatched_opening_char = Carácter de apertura discordante {0} en {1} +exception.invalid_datasource_couldnt_obtain_reader = Fuente de datos no válida. No es posible obtener el Reader +exception.index_value_not_in_range = {0}: el valor del índice {1} en se encuentra en el rango [0..{2}] +exception.unterminated_cigar_string = Cadena cigar sin terminar +exception.unexpected_operation_cigar_string_pos = Operación no esperada {0} en una cadena cigar (posición {1} en {2}) +exception.couldnt_parse_responde_from_annotated3d_server = No es posible parsear la respuesta procedente del servidor Annotate3d +exception.application_test_npe = Prueba de aplicación: lanzando un NullPointerException que debe aparecer en la consola +exception.overwriting_vamsas_id_binding = Sobreescribiendo la asociación al VAMSAS id +exception.overwriting_jalview_id_binding = Sobreescribiendo la asociación al Jalview id +error.implementation_error_unknown_file_format_string = Error de implementación: cadena de formato de fichero desconocido +exception.failed_to_resolve_gzip_stream = Fallo al resolver el flujo GZIP +exception.problem_opening_file_also_tried = Problema abriendo {0} (también se intentó {1}) : {2} +exception.problem_opening_file = Problema abriendo {0} : {1} +exception.failed_to_read_data_from_source = Error al leer datos de la fuente: {0} +exception.no_init_source_stream = Flujo de fuente sin inicializar +exception.invalid_source_stream = Flujo de fuente no válida: {0} +error.implementation_error_reset_called_for_invalid_source = Error de implementación: se ha invocado un Reset en una fuente no válida. +exception.number_of_residues_in_query_sequence_differ_from_prediction = El n\u00FAmero de residuos en la supuesta secuencia consultada {0} ({1}\n{2})\ndifiere del n\u00FAmero de sitios de predicci\u00F3n en la predicci\u00F3n ({3}) +label.mapped = mapeado +exception.jpredconcide_entry_has_unexpected_number_of_columns = JPredConcise: La entrada ({0}) tiene un número inesperado de columnas +exception.couldnt_parse_concise_annotation_for_prediction = No es posible parsear la anotaci\u00F3n concisa para el perfil de predicci\u00F3n.\n{0} +exception.newfile = Fichero Newick\: {0}\n +label.no_tree_read_in = No hay lectura de árbol en +exception.rnaml_couldnt_access_datasource = No ha sido posible acceder la fuente de datos ({0}) +exception.ranml_couldnt_process_data = No ha sido posible procesar los datos como un fichero RNAML ({0}) +exception.ranml_invalid_file = Fichero RNAML no válido ({0}) +exception.ranml_problem_parsing_data = Problema parseando los datos como RNAML ({0}) +exception.pfam_no_sequences_found = No se han encontrado secuencias (entrada PFAM) +exception.stockholm_invalid_format = Este fichero no es tiene un formato STOCKHOLM válido: la primera línea no contiene '# STOCKHOLM' +exception.couldnt_parse_sequence_line = No es posible parse la línea de secuencia: {0} +exception.error_parsing_line = Error parseando {0} +exception.unknown_annotation_detected = Anotación desconocida detectada: {0} {1} +exception.couldnt_store_sequence_mappings = No es posible almacenar los mapeos de secuencia para {0} +exception.matrix_too_many_iteration = Demasiadas iteraciones en {0} (el máximo es {1}) +exception.browser_not_found = Excepción al buscar el navegador: {0} +exception.browser_unable_to_locate = Imposible encontrar el navegador: {0} +exception.invocation_target_exception_creating_aedesc = InvocationTargetException mientras se creaba AEDesc: {0} +exception.illegal_access_building_apple_evt= IllegalAccessException mientras se construía AppleEvent: {0} +exception.instantiation_creating_aedesc = InstantiationException mientras se creaba AEDesc: {0} +exception.unable_to_launch_url = Imposible lanzar la URL: {0} +exception.unable_to_create_internet_config = Imposible crear una instancia de configuración de Internet: {0} +exception.invocation_target_calling_url = InvocationTargetException mientras se invocaba openURL: {0} +exception.illegal_access_calling_url = IllegalAccessException mientras se invocaba openURL: {0} +exception.interrupted_launching_browser = InterruptedException mientras se lanzaba el navegador: {0} +exception.das_source_doesnt_support_sequence_command = La fuente {0} no soporta el comando sequence. +exception.invalid_das_source = Fuente DAS no válida: {0} +exception.ebiembl_retrieval_failed_on = La recuperación de datos EBI EMBL XML ha fallado en {0}:{1} +label.no_embl_record_found = # No se ha recuperado ningún registro EMBL de {0}:{1} +label.embl_successfully_parsed = # Se han parseado con éxito las consultas {0} en un alineamiento +exception.no_pdb_records_for_chain = No se han encontrado registros {0} para la cadena {1} +exception.unexpected_handling_rnaml_translation_for_pdb = Excepcion inesperada cuando se traducían a RNAML los datos PDB +exception.couldnt_recover_sequence_properties_for_alignment = No es posible recuperar las propiedades de la secuencia para el alineamiento +exception.unknown_format_for_file = Formato desconocido {0} para el fichero \: \n{1} +label.remove_gaps = Eliminar huecos +exception.couldnt_recover_sequence_props_for_jnet_query = No ha sido posible recuperar las propiedades de la secuencia para la secuencia JNet Query! +exception.server_timeout_try_later = Tiempo de conexi\u00F3n ha expirado - int\u00E9ntelo de nuevo m\u00E1s tarde\n +exception.web_service_returned_null_try_later= El servidor {0} ha devuelto un objeto nulo, por lo que probablemente no se haya podido contactar con él. Inténtelo de nuevo más tarde. +exception.cannot_contact_service_endpoint_at = No es posible contactar por el punto de acceso al servicio en {0} +error.implementation_error_cannot_find_service_url_in_given_set = Error de implementación: no es posible encontrar la URL del servicio en el conjunto de URL proporcionado +error.implementation_error_cannot_find_service_url_in_given_set_param_store = Error de implementación: la URL del servicio en el conjunto de URL para este almacén de parámetros del servicio({0}) +exception.jobsubmission_invalid_params_set = Conjunto de parámetros no válido. Comprueba la implementación de Jalview +exception.notvaliddata_group_contains_less_than_min_seqs = El grupo contiene menos de {0} secuencias. +exception.outofmemory_loading_pdb_file = Sin menoria al cargar el fichero PDB +exception.eps_coudnt_write_output_file = No es posible escribir el fichero de salida: {0} +exception.eps_method_not_supported = Método actualmente no suportado por la versión {0} de EpsGraphics2D +exception.eps_unable_to_get_inverse_matrix = Imposible obtener la inversa de la matrix: {0} +warn.job_cannot_be_cancelled_close_window = Este trabajo no se puede cancelar.\nSimplemente, cierre la ventana. +warn.service_not_supported = ¡Servicio no soportado! +warn.input_is_too_big = ¡El tamaño de la entrada es demasiado grande! +warn.invalid_job_param_set = ¡Conjunto de parámetros del trabajo no válido! +info.job_couldnt_be_run_server_doesnt_support_program = No es posible ejecutar el trabajo porque el servidor no soporta este programa.\n{0} +info.job_couldnt_be_run_exceeded_hard_limit = No es posible ejecutar el trabajo porque excede los l\u00EDmites del servidor.\n{0} +info.job_couldnt_be_run_incorrect_param_setting = No es posible ejecutar el trabjao porque el servidor no soporta algunos de los par\u00E1metros.\n{0}\nPor favor, aseg\u00FArese de que ha usado los par\u00E1metros adecuados para este servicio\n +info.no_jobs_ran = No se ha ejecutado ningún trabajo +info.failed_to_submit_prediction = Error al enviar la predicci\u00F3n\:\n{0} {1} +info.invalid_jnet_job_result_data ={0}\n{1}\nResultados del trabajo JNet no v\u00E1lidos\!\n{2} +info.failed_to_submit_sequences_for_alignment = Error al enviar la secuencias para el alineamiento.\nLo m\u00E1s probable es que haya un problema en el servidor.\nSimplemente, cierre la ventana\n +info.alignment_object_method_notes = \nNotas sobre los m\u00E9todos del objeto alineamiento\n +info.server_exception = \n{0} Excepci\u00F3n del servidor\!\n{1} +status.processing_commandline_args = Procesando los argumentos de la línea de comandos... +status.das_features_being_retrived = Recuperando características DAS... +status.searching_for_sequences_from = Buscando secuencias en {0} +status.finished_searching_for_sequences_from = Finalizada la búsqueda de secuencias en {0} +label.eps_file = Fichero EPS +label.png_image = Imagen PNG +status.saving_file = Guardando {0} +status.export_complete = Exportación completada. +status.fetching_pdb = Recuperando PDB {0} +status.refreshing_news = Refrescando noticias +status.importing_vamsas_session_from = Importando sesión VAMSAS de {0} +status.opening_params = Abriendo {0} +status.waiting_sequence_database_fetchers_init = Esperando la inicialización de los recuperadores de bases de datos de secuencias +status.init_sequence_database_fetchers = Inicializando recuperadores de bases de datos de secuencias +status.fetching_sequence_queries_from = Recuperando {0} consultas de secuencias de {1} +status.finshed_querying = Consulta finalizada +status.parsing_results = Parseando resultados. +status.processing = Procesando... +status.refreshing_web_service_menus = Refrescando los menús de servicios web +status.collecting_job_results = Recolectando los resultados de los trabajos. +status.fetching_das_sequence_features = Recuperando las características DAS de las secuencias +status.no_das_sources_active = No existe ninguna fuente DAS activa +status.das_feature_fetching_cancelled = Recuperación de características DAS cancelada +status.das_feature_fetching_complete = Recuperación de características DAS completada +status.fetching_db_refs = Recuperando db refs +label.font_doesnt_have_letters_defined = La fuente no tiene letras definidas\npor lo que no puede emplease\ncon datos de alineamientos +label.font_too_small = Tamaño de la letra es demasiado pequeña +label.error_loading_file_params = Error cargando el fichero {0} +label.error_loading_jalview_file = Error cargando el fichero Jalview +warn.out_of_memory_when_action = Sin memoria al {0}\!\!\nConsulte los ficheros de ayuda para ajustar la memoria de la m\u00E1quina virtual de Java. +warn.out_of_memory_loading_file = Sin memoria al cargar el fichero {0}\!\!\nConsulte los ficheros de ayuda para ajustar la memoria de la m\u00E1quina virtual de Java. +label.out_of_memory = Sin memoria +label.invalid_id_column_width = Identificador de anchura de columna no válido +warn.user_defined_width_requirements = La anchura definida por el usuario para la \nlas columnas de anotaci\u00F3n e identificador de secuencias\nen figuras exportadas debe ser\na, al menos, de 12 p\u00EDxels +label.couldnt_create_sequence_fetcher = No es posible crear SequenceFetcher +warn.couldnt_create_sequence_fetcher_client = No es posible crear el cliente de recuperador de secuencias. Comprueba el fichero de log para más detalles. +warn.server_didnt_pass_validation = El servicio no ha pasado la validaci\u00F3n.\nCompruebe la consola de Jalview para m\u00E1s detalles. +warn.url_must_contain = La URL de la secuencia debe contener $SEQUENCE_ID$ o un regex $SEQUENCE_ID=//=$ +info.validate_jabaws_server = \u00BFValidar el servidor JabaWS?\n(Consulte la consola de salida para obtener los resultados) +label.test_server = ¿Probar servidor? +info.you_want_jalview_to_find_uniprot_accessions = \u00BFDesea que Jalview encuentre\nUniprot Accession ids para los nombres de secuencias dados? +label.find_uniprot_accession_ids = Buscar Uniprot Accession Ids +label.new_sequence_fetcher = Añadir recuperador de secuencias +label.additional_sequence_fetcher = Recuperador de secuencia adicional +label.select_database_retrieval_source = Seleccionar fuente de recuperación de bases de datos +label.overwrite_existing_file = ¿Sobreescribir el fichero existente? +label.file_already_exists = El fichero existe +label.edit_jabaws_url = Editar JABAWS URL +label.add_jabaws_url = Añadir nueva JABAWS URL +label.news_from_jalview = Noticias de http://www.jalview.org +label.cut_paste_alignmen_file = Cortar & Pegar fichero de alineamiento +label.enter_redundancy_thereshold = Introducir el umbral de redundancia +label.select_dark_light_set_thereshold = Seleccionar un color oscuro y un color claro para el texto y establecer el umbral en que
    cambiar entre colores, basándose en el color de fondo
    +label.select_feature_colour = Seleccionar color de las características +label.ignore_gaps_consensus = Ignorar huecos en el consenso +label.show_group_histogram = Mostrar histograma de grupo +label.show_group_logo = Mostrar logo de grupo +label.normalise_group_logo = Normalizar el logo de grupo +label.show_histogram = Mostrar histograma +label.show_logo = Mostrar logo +label.normalise_logo = Normalizar logo +label.no_colour_selection_in_scheme = Por favor, seleccione un color antes de aplicar el esquema cromático label.no_colour_selection_warn = Error guardando el esquema cromático \ No newline at end of file diff --git a/resources/uniprot_mapping.xml b/resources/uniprot_mapping.xml index a8634af..37a812f 100644 --- a/resources/uniprot_mapping.xml +++ b/resources/uniprot_mapping.xml @@ -1,97 +1,97 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/site/j2s/JU/DebugJS.js b/site/j2s/JU/DebugJS.js new file mode 100644 index 0000000..d795843 --- /dev/null +++ b/site/j2s/JU/DebugJS.js @@ -0,0 +1,9 @@ +Clazz.declarePackage ("JU"); +c$ = Clazz.declareType (JU, "DebugJS"); +c$._ = Clazz.defineMethod (c$, "_", +function (msg) { +{ +if (Clazz._debugging) { +debugger; +} +}}, "~S"); diff --git a/site/j2s/awt2swing/Scrollbar.js b/site/j2s/awt2swing/Scrollbar.js index b68bd0c..239fbc6 100644 --- a/site/j2s/awt2swing/Scrollbar.js +++ b/site/j2s/awt2swing/Scrollbar.js @@ -1,4 +1,8 @@ Clazz.declarePackage ("awt2swing"); Clazz.load (["javax.swing.JScrollBar"], "awt2swing.Scrollbar", null, function () { c$ = Clazz.declareType (awt2swing, "Scrollbar", javax.swing.JScrollBar); +Clazz.defineMethod (c$, "addChangeListener", +function (l) { +this.addAdjustmentListener (l); +}, "javax.swing.event.ChangeListener"); }); diff --git a/site/j2s/core/core.js b/site/j2s/core/core.js new file mode 100644 index 0000000..7d9637a --- /dev/null +++ b/site/j2s/core/core.js @@ -0,0 +1,2980 @@ +(function(Clazz +,Clazz_getClassName +,Clazz_newLongArray +,Clazz_doubleToByte +,Clazz_doubleToInt +,Clazz_doubleToLong +,Clazz_declarePackage +,Clazz_instanceOf +,Clazz_load +,Clazz_instantialize +,Clazz_decorateAsClass +,Clazz_floatToInt +,Clazz_floatToLong +,Clazz_makeConstructor +,Clazz_defineEnumConstant +,Clazz_exceptionOf +,Clazz_newIntArray +,Clazz_defineStatics +,Clazz_newFloatArray +,Clazz_declareType +,Clazz_prepareFields +,Clazz_superConstructor +,Clazz_newByteArray +,Clazz_declareInterface +,Clazz_p0p +,Clazz_pu$h +,Clazz_newShortArray +,Clazz_innerTypeInstance +,Clazz_isClassDefined +,Clazz_prepareCallback +,Clazz_newArray +,Clazz_castNullAs +,Clazz_floatToShort +,Clazz_superCall +,Clazz_decorateAsType +,Clazz_newBooleanArray +,Clazz_newCharArray +,Clazz_implementOf +,Clazz_newDoubleArray +,Clazz_overrideConstructor +,Clazz_clone +,Clazz_doubleToShort +,Clazz_getInheritedLevel +,Clazz_getParamsType +,Clazz_isAF +,Clazz_isAI +,Clazz_isAS +,Clazz_isASS +,Clazz_isAP +,Clazz_isAFloat +,Clazz_isAII +,Clazz_isAFF +,Clazz_isAFFF +,Clazz_tryToSearchAndExecute +,Clazz_getStackTrace +,Clazz_inheritArgs +,Clazz_alert +,Clazz_defineMethod +,Clazz_overrideMethod +,Clazz_declareAnonymous +,Clazz_checkPrivateMethod +,Clazz_cloneFinals +){ +var $t$; +//var c$; +// SwingJSJavaExt.js + + +// This library will be wrapped by an additional anonymous function using ANT in +// build_03_tojs.xml. This task will also modify variable names. References +// to Clazz._ will not be changed, but other Clazz_xxx will be changed to +// (local scope) Clazz_xxx, allowing them to be further compressed using +// Google Closure Compiler in that same ANT task. + +// BH 7/24/2015 7:21:51 AM renamed from JSmolJavaExt.js +// BH 5/31/2015 5:53:04 PM Number.compareTo added +// BH 5/21/2015 5:46:30 PM Number("0xFFFFFFFF") is not -1 +// BH 4/23/2015 9:08:59 AM xx.getComponentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works +// BH 4/12/2015 1:37:44 PM adding Math.rint = Math.round +// BH 1/16/2015 10:09:38 AM Chrome failure jqGrig due to new String("x").toString() not being a simple string +// BH 8/14/2014 6:49:22 PM Character class efficiencies +// BH 7/24/2014 9:02:18 AM most browsers do not support String.codePointAt() +// BH 7/11/2014 4:17:22 PM fix for Boolean.valueOf("false") not being false +// BH 5/27/2014 6:29:59 AM ensure floats and doubles have decimal point in toString +// BH 4/1/2014 12:23:41 PM Encoding moved to Clazz._Encoding; +// BH 4/1/2014 7:51:46 AM removing java.lang.B00lean +// BH 3/7/2014 9:17:10 AM removing Array.toString; moving that code here from j2sJmol.js +// BH 1/30/2014 9:04:25 AM adding Throwable.getStackTrace() as a STRING +// BH 12/4/2013 9:20:44 PM fix for reassigning Date.prototype.toString() +// BH 12/3/2013 11:43:10 AM bizarre Safari bug in reassigning Boolean (OK, I admit, we shouldn't have done that...) +// BH 12/1/2013 6:50:16 AM evit Number.prototype.toString assignment removed! +// BH 11/30/2013 1:46:31 PM fixing Byte, Short, Long, Integer, Float, Double to reflect proper bounds and error conditions +// BH 11/29/2013 8:58:49 PM removing Boolean.toString(boolean) +// BH 11/4/2013 7:34:26 AM changing "var nativeClazz" to "var nativeClass" to avoid ANT replacement of "nativeClazz_" to "nativeClazz_" +// BH 10/19/2013 1:29:27 PM fixed String.$replace() +// BH 10/18/2013 6:09:23 PM fixed (Double|Float).valueOf(NaN).valueOf(), which should return NaN, not throw an error +// BH 10/12/2013 11:18:44 AM fixed bug in Double(String) and Float(String) that was returning typeof "string" +// BH 10/10/2013 2:40:20 PM added Math.log10 +// BH 7/23/2013 7:24:01 AM fixing Number.shortValue() and Number.byteValue() for negative values +// BH 6/16/2013 1:31:30 PM adding /| in String.replace -- thank you David Koes +// BH 3/13/2013 12:49:23 PM setting Boolean.valueOf() "@" +// BH 3/2/2013 10:46:45 PM removed Double.valueOf(String) +// BH 11/6/2012 8:26:33 PM added instanceof Int32Array in String.instantialize +// BH 10/13/2012 11:38:07 PM corrected Integer.parseInt to allow only +-0123456789; created Integer.parseIntRadix +// BH 11/1/2012 added Short +// BH 9/10/2012 6:27:21 AM added java.net.URL... classes +// BH 1/7/2013 7:40:06 AM added Clazz_dateToString + +;(function(Clazz) { + +// moved here from package.js +// these classes will be created as objects prior to any others +// and are then available immediately + + Clazz._Loader.registerPackages("java", [ "io", "lang", "lang.reflect", "util" ]); + + var sJU = "java.util"; + + //var sJU = "JU"; + //Clazz._Loader.registerPackages (sJU, ["regex", "zip"]); + //var javautil = JU; + + var javautil = java.util; + + Clazz._Loader.ignore([ + "net.sf.j2s.ajax.HttpRequest", + sJU + ".MapEntry.Type", + //"java.net.UnknownServiceException", + "java.lang.Runtime", + "java.security.AccessController", + "java.security.PrivilegedExceptionAction", + "java.io.File", + "java.io.FileInputStream", + "java.io.FileWriter", + "java.io.OutputStreamWriter", +// sJU + ".Calendar", // bypassed in ModelCollection +// "java.text.SimpleDateFormat", // not used +// "java.text.DateFormat", // not used + sJU + ".concurrent.Executors" + ]) + +Math.rint = Math.round; + +Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046}); + +if(Clazz._supportsNativeObject){ + // Number and Array are special -- do not override prototype.toString -- "length - 2" here + for(var i=0;i 0 ? x - 0x10000 : x); +}); + +Clazz_defineMethod(Number,"byteValue", +function(){ +var x = Math.round(this)&0xff; +return (this < 0 && x > 0 ? x - 0x100 : x); +}); + +Clazz_defineMethod(Number,"intValue", +function(){ +return Math.round(this)&0xffffffff; +}); + +Clazz_defineMethod(Number,"longValue", +function(){ +return Math.round(this); +}); + +Clazz_defineMethod(Number,"floatValue", +function(){ +return this.valueOf(); +}); +Clazz_defineMethod(Number,"doubleValue", +function(){ +return parseFloat(this.valueOf()); +}); + +Clazz_overrideMethod(Number,"hashCode", +function(){ +return this.valueOf(); +}); + +java.lang.Integer=Integer=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Integer,"Integer",Number,Comparable,null,true); +Integer.prototype.valueOf=function(){return 0;}; +Integer.toString=Integer.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +} else if(this===Integer){ +return"class java.lang.Integer"; +} +return""+this.valueOf(); +}; + +/* + +Clazz_makeConstructor(Integer, +function(){ +this.valueOf=function(){ +return 0; +}; +}); +*/ + + +Clazz_overrideConstructor(Integer, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + this.valueOf=function(){return v;}; +}); //BH +/* +Clazz_makeConstructor(Integer, +function(s){ +var value=Integer.parseInt(s,10); +this.valueOf=function(){ +return value; +}; +},"String"); +*/ +Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000; +Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff; +Integer.TYPE=Integer.prototype.TYPE=Integer; + + +Clazz_defineMethod(Integer,"bitCount", +function(i) { + i = i - ((i >>> 1) & 0x55555555); + i = (i & 0x33333333) + ((i >>> 2) & 0x33333333); + i = (i + (i >>> 4)) & 0x0f0f0f0f; + i = i + (i >>> 8); + i = i + (i >>> 16); + return i & 0x3f; +},"Number"); +Integer.bitCount=Integer.prototype.bitCount; + +Clazz_defineMethod(Integer,"numberOfLeadingZeros", +function(i) { + if (i == 0) return 32; + var n = 1; + if (i >>> 16 == 0) { n += 16; i <<= 16; } + if (i >>> 24 == 0) { n += 8; i <<= 8; } + if (i >>> 28 == 0) { n += 4; i <<= 4; } + if (i >>> 30 == 0) { n += 2; i <<= 2; } + n -= i >>> 31; + return n; +},"Number"); +Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros; + +Clazz_defineMethod(Integer,"numberOfTrailingZeros", +function(i) { + if (i == 0) return 32; + var n = 31; + var y = i <<16; if (y != 0) { n = n -16; i = y; } + y = i << 8; if (y != 0) { n = n - 8; i = y; } + y = i << 4; if (y != 0) { n = n - 4; i = y; } + y = i << 2; if (y != 0) { n = n - 2; i = y; } + return n - ((i << 1) >>> 31); +},"Number"); +Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros; + +Clazz_defineMethod(Integer,"parseIntRadix", +function(s,radix){ +if(s==null){ +throw new NumberFormatException("null"); +}if(radix<2){ +throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX"); +}if(radix>36){ +throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX"); +} +if (radix == 10) { + for (var i = s.length; --i >= 0;) { + var c = s.charCodeAt(i); + if (c >= 48 && c <= 57) continue; + if (i > 0 || c != 43 && c != 45) + throw new NumberFormatException("Not a Number : "+s); + + } +} +var i=parseInt(s,radix); +if(isNaN(i)){ +throw new NumberFormatException("Not a Number : "+s); +} +return i; +},"String, Number"); +Integer.parseIntRadix=Integer.prototype.parseIntRadix; + +Clazz_defineMethod(Integer,"parseInt", +function(s){ +return Integer.parseIntRadix(s,10); +},"String"); +Integer.parseInt=Integer.prototype.parseInt; + +/* +Clazz_defineMethod(Integer,"$valueOf", +function(s){ +return new Integer(Integer.parseIntRadix(s,10)); +},"String"); +*/ + +Clazz_overrideMethod(Integer,"$valueOf", +function(s){ +return new Integer(s); +}); + +/* +Clazz_defineMethod(Integer,"$valueOf", +function(s,r){ +return new Integer(Integer.parseIntRadix(s,r)); +},"String, Number"); +*/ + +Integer.$valueOf=Integer.prototype.$valueOf; + + +Clazz_overrideMethod(Integer,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Integer)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Integer.toHexString=Integer.prototype.toHexString=function(d){ +if(d.valueOf)d=d.valueOf(); +if (d < 0) { +var b = d & 0xFFFFFF; +var c = ((d>>24)&0xFF); +return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6); +} +return d._numberToString(16);}; +Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);}; +Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);}; + +Integer.decodeRaw=Clazz_defineMethod(Integer,"decodeRaw", function(n){ +if (n.indexOf(".") >= 0)n = ""; +var i = (n.startsWith("-") ? 1 : 0); +n = n.replace(/\#/, "0x").toLowerCase(); +var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10); +// The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10. +// Number is strict, but Number("055") does not work, though ParseInt("055", 8) does. +// need to make sure negative numbers are negative +n = Number(n) & 0xFFFFFFFF; +return (radix == 8 ? parseInt(n, 8) : n); +},"~S"); + +Integer.decode=Clazz_defineMethod(Integer,"decode", function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE) + throw new NumberFormatException("Invalid Integer"); + return new Integer(n); +},"~S"); + +Clazz_overrideMethod(Integer,"hashCode", +function(){ +return this.valueOf(); +}); + +// Note that Long is problematic in JavaScript + +java.lang.Long=Long=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Long,"Long",Number,Comparable,null,true); +Long.prototype.valueOf=function(){return 0;}; +Long.toString=Long.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +}else if(this===Long){ +return"class java.lang.Long"; +} +return""+this.valueOf(); +}; + +Clazz_overrideConstructor(Long, function(v){ + v == null && (v = 0); + v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10)); +this.valueOf=function(){return v;}; +}); + +//Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000; +//Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff; +Long.TYPE=Long.prototype.TYPE=Long; + +Clazz_defineMethod(Long,"parseLong", +function(s,radix){ + return Integer.parseInt(s, radix || 10); +}); + +Long.parseLong=Long.prototype.parseLong; + +Clazz_overrideMethod(Long,"$valueOf", +function(s){ +return new Long(s); +}); +/* +Clazz_defineMethod(Long,"$valueOf", +function(s){ +return new Long(s); +},"Number"); + +Clazz_defineMethod(Long,"$valueOf", +function(s,r){ +return new Long(Long.parseLong(s,r)); +},"String, Number"); +*/ +Long.$valueOf=Long.prototype.$valueOf; +Clazz_overrideMethod(Long,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Long)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Long.toHexString=Long.prototype.toHexString=function(i){ +return i.toString(16); +}; +Long.toOctalString=Long.prototype.toOctalString=function(i){ +return i.toString(8); +}; +Long.toBinaryString=Long.prototype.toBinaryString=function(i){ +return i.toString(2); +}; + + +Long.decode=Clazz_defineMethod(Long,"decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n)) + throw new NumberFormatException("Invalid Long"); + return new Long(n); +},"~S"); + +java.lang.Short = Short = function () { +Clazz_instantialize (this, arguments); +}; +Clazz_decorateAsType (Short, "Short", Number, Comparable, null, true); +Short.prototype.valueOf = function () { return 0; }; +Short.toString = Short.prototype.toString = function () { + if (arguments.length != 0) { + return "" + arguments[0]; + } else if (this === Short) { + return "class java.lang.Short"; // Short.class.toString + } + return "" + this.valueOf (); +}; + +Clazz_overrideConstructor(Short, +function (v) { + v == null && (v = 0); + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + v = v.shortValue(); + this.valueOf = function () {return v;}; +}); + + +Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768; +Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767; +Short.TYPE = Short.prototype.TYPE = Short; + +Clazz_defineMethod(Short, "parseShortRadix", +function (s, radix) { +return Integer.parseIntRadix(s, radix).shortValue(); +}, "String, Number"); +Short.parseShortRadix = Short.prototype.parseShortRadix; + +Clazz_defineMethod(Short, "parseShort", +function (s) { +return Short.parseShortRadix (s, 10); +}, "String"); + +Short.parseShort = Short.prototype.parseShort; + +/* +Clazz_defineMethod(Short, "$valueOf", +function (s) { +return new Short(Short.parseShort (s, 10)); +}, "String"); + */ + +Clazz_overrideMethod(Short, "$valueOf", +function (s) { +return new Short(s); +}); + +/* +Clazz_defineMethod(Short, "$valueOf", +function (s, r) { +return new Short(Short.parseShort (s, r)); +}, "String, Number"); + */ + +Short.$valueOf = Short.prototype.$valueOf; +Clazz_overrideMethod(Short, "equals", +function (s) { +if(s == null || !Clazz_instanceOf(s, Short) ){ + return false; +} +return s.valueOf() == this.valueOf(); +}, "Object"); +Short.toHexString = Short.prototype.toHexString = function (i) { + return i.toString (16); +}; +Short.toOctalString = Short.prototype.toOctalString = function (i) { + return i.toString (8); +}; +Short.toBinaryString = Short.prototype.toBinaryString = function (i) { + return i.toString (2); +}; +Short.decode = Clazz_defineMethod(Short, "decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < -32768|| n > 32767) + throw new NumberFormatException("Invalid Short"); + return new Short(n); +}, "~S"); + +java.lang.Byte=Byte=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Byte,"Byte",Number,Comparable,null,true); +Byte.prototype.valueOf=function(){return 0;}; +Byte.toString=Byte.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +}else if(this===Byte){ +return"class java.lang.Byte"; +} +return""+this.valueOf(); +}; +Clazz_makeConstructor(Byte, +function(v){ + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + v = v.byteValue(); +this.valueOf=function(){ +return v; +}; +}); + +Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828; +Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128; +Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127; +Byte.SIZE=Byte.prototype.SIZE=8; +Byte.TYPE=Byte.prototype.TYPE=Byte; + +Clazz_defineMethod(Byte,"parseByteRadix", +function(s,radix){ + return Integer.parseIntRadix(s, radix).byteValue(); +},"String, Number"); +Byte.parseByteRadix=Byte.prototype.parseByteRadix; + +Clazz_defineMethod(Byte,"parseByte", +function(s){ +return Byte.parseByte(s,10); +},"String"); + +Byte.parseByte=Byte.prototype.parseByte; + +Clazz_overrideMethod(Byte, "$valueOf", +function (s) { +return new Byte(s); +}); + +Byte.$valueOf=Byte.prototype.$valueOf; +Clazz_overrideMethod(Byte,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Byte)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Byte.toHexString=Byte.prototype.toHexString=function(i){ +return i.toString(16); +}; +Byte.toOctalString=Byte.prototype.toOctalString=function(i){ +return i.toString(8); +}; +Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){ +return i.toString(2); +}; +Byte.decode=Clazz_defineMethod(Byte,"decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < -128|| n > 127) + throw new NumberFormatException("Invalid Byte"); +return new Byte(n); +},"~S"); + +Clazz._floatToString = function(f) { + var s = ""+f + if (s.indexOf(".") < 0 && s.indexOf("e") < 0) + s += ".0"; + return s; +} + +java.lang.Float=Float=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Float,"Float",Number,Comparable,null,true); +Float.prototype.valueOf=function(){return 0;}; +Float.toString=Float.prototype.toString=function(){ +if(arguments.length!=0){ +return Clazz._floatToString(arguments[0]); +}else if(this===Float){ +return"class java.lang.Float"; +} +return Clazz._floatToString(this.valueOf()); +}; + +Clazz_overrideConstructor(Float, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Number(v); + this.valueOf=function(){return v;} +}); + +Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028; +Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38; +Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45; +Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; +Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; +Float.NaN=Number.NaN; +Float.TYPE=Float.prototype.TYPE=Float; + +Clazz_defineMethod(Float,"parseFloat", +function(s){ +if(s==null){ +throw new NumberFormatException("null"); +} +if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here +var floatVal=Number(s); +if(isNaN(floatVal)){ +throw new NumberFormatException("Not a Number : "+s); +} +return floatVal; +},"String"); +Float.parseFloat=Float.prototype.parseFloat; + +Clazz_overrideMethod(Float,"$valueOf", +function(s){ +return new Float(s); +}); + +Float.$valueOf=Float.prototype.$valueOf; + +Clazz_defineMethod(Float,"isNaN", +function(num){ +return isNaN(num); +},"Number"); +Float.isNaN=Float.prototype.isNaN; +Clazz_defineMethod(Float,"isInfinite", +function(num){ +return!isFinite(num); +},"Number"); +Float.isInfinite=Float.prototype.isInfinite; + +Clazz_overrideMethod(Float,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Float)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); + +java.lang.Double=Double=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Double,"Double",Number,Comparable,null,true); +Double.prototype.valueOf=function(){return 0;}; +Double.toString=Double.prototype.toString=function(){ +if(arguments.length!=0){ +return Clazz._floatToString(arguments[0]); +}else if(this===Double){ +return"class java.lang.Double"; +} +return Clazz._floatToString(this.valueOf()); +}; + +Clazz_overrideConstructor(Double, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Double.parseDouble(v); + this.valueOf=function(){return v;}; +}); // BH + +Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468; +Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324; +Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308; +Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; +Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; +Double.NaN=Number.NaN; +Double.TYPE=Double.prototype.TYPE=Double; + +Clazz_defineMethod(Double,"isNaN", +function(num){ +return isNaN(num); +},"Number"); +Double.isNaN=Double.prototype.isNaN; +Clazz_defineMethod(Double,"isInfinite", +function(num){ +return!isFinite(num); +},"Number"); +Double.isInfinite=Double.prototype.isInfinite; + +Clazz_defineMethod(Double,"parseDouble", +function(s){ +if(s==null){ +throw new NumberFormatException("null"); +} +if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here +var doubleVal=Number(s); +if(isNaN(doubleVal)){ +throw new NumberFormatException("Not a Number : "+s); +} +return doubleVal; +},"String"); +Double.parseDouble=Double.prototype.parseDouble; + +/* +Clazz_defineMethod(Double,"$valueOf", +function(s){ +return new Double(this.parseDouble(s)); +},"String"); +*/ + +Clazz_defineMethod(Double,"$valueOf", +function(v){ +return new Double(v); +},"Number"); + +Double.$valueOf=Double.prototype.$valueOf; + +Clazz_overrideMethod(Double,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Double)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); + + +//java.lang.B00lean = Boolean; ?? BH why this? +Boolean = java.lang.Boolean = Boolean || function () {Clazz_instantialize (this, arguments);}; +if (Clazz._supportsNativeObject) { + for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) { + var p = Clazz._extendedObjectMethods[i]; + Boolean.prototype[p] = Clazz._O.prototype[p]; + } +} +Boolean.__CLASS_NAME__="Boolean"; +Clazz_implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]); +Boolean.equals=Clazz._innerFunctions.equals; +Boolean.getName=Clazz._innerFunctions.getName; +Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530; + +//Clazz_makeConstructor(Boolean, +//function(value){ +//this.valueOf=function(){ +//return value; +//}; +//},"~B"); + +Clazz_overrideConstructor(Boolean, +function(s){ + var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false); + this.valueOf=function(){return b;}; +},"~O"); + +Boolean.parseBoolean=Clazz_defineMethod(Boolean,"parseBoolean", +function(s){ +return Boolean.toBoolean(s); +},"~S"); +Clazz_defineMethod(Boolean,"booleanValue", +function(){ +return this.valueOf(); +}); +Boolean.$valueOf=Clazz_overrideMethod(Boolean,"$valueOf", +function(b){ +return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE); +}); + +/* +Boolean.toString=Clazz_defineMethod(Boolean,"toString", +function(b){ +return b?"true":"false"; +},"~B"); +*/ + +Clazz_overrideMethod(Boolean,"toString", +function(){ +return this.valueOf()?"true":"false"; +}); +Clazz_overrideMethod(Boolean,"hashCode", +function(){ +return this.valueOf()?1231:1237; +}); +Clazz_overrideMethod(Boolean,"equals", +function(obj){ +if(Clazz_instanceOf(obj,Boolean)){ +return this.booleanValue()==obj.booleanValue(); +}return false; +},"~O"); +Boolean.getBoolean=Clazz_defineMethod(Boolean,"getBoolean", +function(name){ +var result=false; +try{ +result=Boolean.toBoolean(System.getProperty(name)); +}catch(e){ +if(Clazz_instanceOf(e,IllegalArgumentException)){ +}else if(Clazz_instanceOf(e,NullPointerException)){ +}else{ +throw e; +} +} +return result; +},"~S"); +Clazz_overrideMethod(Boolean,"compareTo", +function(b){ +return(b.value==this.value?0:(this.value?1:-1)); +},"Boolean"); +Boolean.toBoolean=Clazz_defineMethod(Boolean,"toBoolean", +($fz=function(name){ +return((name!=null)&&name.equalsIgnoreCase("true")); +},$fz.isPrivate=true,$fz),"~S"); +Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true); +Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false); +Boolean.TYPE=Boolean.prototype.TYPE=Boolean; + + +Clazz._Encoding=new Object(); + +(function(Encoding) { + +Encoding.UTF8="utf-8"; +Encoding.UTF16="utf-16"; +Encoding.ASCII="ascii"; + + +Encoding.guessEncoding=function(str){ +if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){ +return Encoding.UTF8; +}else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){ +return Encoding.UTF16; +}else{ +return Encoding.ASCII; +} +}; + +Encoding.readUTF8=function(str){ +var encoding=this.guessEncoding(str); +var startIdx=0; +if(encoding==Encoding.UTF8){ +startIdx=3; +}else if(encoding==Encoding.UTF16){ +startIdx=2; +} +var arrs=new Array(); +for(var i=startIdx;i0xc0&&charCode<0xe0){ +var c1=charCode&0x1f; +i++; +var c2=str.charCodeAt(i)&0x3f; +var c=(c1<<6)+c2; +arrs[arrs.length]=String.fromCharCode(c); +}else if(charCode>=0xe0){ +var c1=charCode&0x0f; +i++; +var c2=str.charCodeAt(i)&0x3f; +i++; +var c3=str.charCodeAt(i)&0x3f; +var c=(c1<<12)+(c2<<6)+c3; +arrs[arrs.length]=String.fromCharCode(c); +} +} +return arrs.join(''); +}; + +Encoding.convert2UTF8=function(str){ +var encoding=this.guessEncoding(str); +var startIdx=0; +if(encoding==Encoding.UTF8){ +return str; +}else if(encoding==Encoding.UTF16){ +startIdx=2; +} + +var offset=0; +var arrs=new Array(offset+str.length-startIdx); + +for(var i=startIdx;i>6); +var c2=0x80+(charCode&0x003f); +arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2); +}else{ +var c1=0xe0+((charCode&0xf000)>>12); +var c2=0x80+((charCode&0x0fc0)>>6); +var c3=0x80+(charCode&0x003f); +arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3); +} +} +return arrs.join(''); +}; +Encoding.base64Chars=new Array( +'A','B','C','D','E','F','G','H', +'I','J','K','L','M','N','O','P', +'Q','R','S','T','U','V','W','X', +'Y','Z','a','b','c','d','e','f', +'g','h','i','j','k','l','m','n', +'o','p','q','r','s','t','u','v', +'w','x','y','z','0','1','2','3', +'4','5','6','7','8','9','+','/' +); +Encoding.encodeBase64=function(str){ +if(str==null||str.length==0)return str; +var b64=Encoding.base64Chars; +var length=str.length; +var index=0; +var buf=[]; +var c0,c1,c2; +while(index>2]; +if(index>4)]; +if(index>6)]; +buf[buf.length]=b64[c2&0x3F]; +}else{ +buf[buf.length]=b64[((c1<<2)&0x3c)]; +buf[buf.length]='='; +} +}else{ +buf[buf.length]=b64[(c0<<4)&0x30]; +buf[buf.length]='='; +buf[buf.length]='='; +} +} +return buf.join(''); +}; +Encoding.decodeBase64=function(str){ +if(str==null||str.length==0)return str; +var b64=Encoding.base64Chars; +var xb64=Encoding.xBase64Chars; +if(Encoding.xBase64Chars==null){ +xb64=new Object(); +for(var i=0;i>4); +if(c2!=null){ +buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2); +if(c3!=null){ +buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3); +} +} +} +return buf.join(''); +}; + +if(String.prototype.$replace==null){ +java.lang.String=String; +if(Clazz._supportsNativeObject){ +for(var i=0;i= 0) c1 = "\\" + c1; + } else { + c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;}); + } + return this.replace(new RegExp(c1,"gm"),c2); +}; +sp.$generateExpFunction=function(str){ +var arr=[]; +var orders=[]; +var idx=0; +arr[0]=""; +var i=0; +for(;ithis.length-len)|| +(ooffset>other.length-len)){ +return false; +} +var s1=this.substring(toffset,toffset+len); +var s2=other.substring(ooffset,ooffset+len); +if(ignoreCase){ +s1=s1.toLowerCase(); +s2=s2.toLowerCase(); +} +return s1==s2; +}; + + + +sp.$plit=function(regex,limit){ +if (!limit && regex == " ") + return this.split(regex); + +if(limit!=null&&limit>0){ +if(limit==1){ +return this; +} +var regExp=new RegExp("("+regex+")","gm"); +var count=1; +var s=this.replace(regExp,function($0,$1){ +count++; +if(count==limit){ +return"@@_@@"; +}else if(count>limit){ +return $0; +}else{ +return $0; +} +}); +regExp=new RegExp(regex,"gm"); +var arr=this.split(regExp); +if(arr.length>limit){ +arr[limit-1]=s.substring(s.indexOf("@@_@@")+5); +arr.length=limit; +} +return arr; +}else{ +var regExp=new RegExp(regex,"gm"); +return this.split(regExp); +} +}; +/* +sp.trim=function(){ +var len=this.length; +var st=0; + +while((st0)||(lens.length-pc)){ +return false; +} +while(--pc>=0){ +if(s.charAt(to++)!=prefix.charAt(po++)){ +return false; +} +} +return true; +}; + +sp.startsWith=function(prefix){ +if(arguments.length==1){ +return sn(this,arguments[0],0); +}else if(arguments.length==2){ +return sn(this,arguments[0],arguments[1]); +}else{ +return false; +} +}; + +sp.endsWith=function(suffix){ +return sn(this, suffix,this.length-suffix.length); +}; + +} + +sp.equals=function(anObject){ +return this.valueOf()==anObject; +}; + +sp.equalsIgnoreCase=function(anotherString){ +return(anotherString==null)?false:(this==anotherString +||this.toLowerCase()==anotherString.toLowerCase()); +}; + + +sp.hash=0; + +sp.hashCode=function(){ +var h=this.hash; +if(h==0){ +var off=0; +var len=this.length; +for(var i=0;i255){ +arrs[ii]=0x1a; +arrs[ii+1]=c&0xff; +arrs[ii+2]=(c&0xff00)>>8; +ii+=2; +}else{ +arrs[ii]=c; +} +ii++; +} +return arrs; +}; + +/* +sp.compareTo=function(anotherString){ +if(anotherString==null){ +throw new java.lang.NullPointerException(); +} +var len1=this.length; +var len2=anotherString.length; +var n=Math.min(len1,len2); +var k=0; +while(k= 0} // bh added +sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added + + + +sp.toCharArray=function(){ +var result=new Array(this.length); +for(var i=0;is2){ +return 1; +}else{ +return-1; +} +} +}; + +sp.contentEquals=function(sb){ +if(this.length!=sb.length()){ +return false; +} +var v=sb.getValue(); +var i=0; +var j=0; +var n=this.length; +while(n--!=0){ +if(this.charCodeAt(i++)!=v[j++]){ +return false; +} +} +return true; +}; + +sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){ +if(srcBegin<0){ +throw new StringIndexOutOfBoundsException(srcBegin); +} +if(srcEnd>this.length){ +throw new StringIndexOutOfBoundsException(srcEnd); +} +if(srcBegin>srcEnd){ +throw new StringIndexOutOfBoundsException(srcEnd-srcBegin); +} +if(dst==null){ +throw new NullPointerException(); +} +for(var i=0;i=sourceCount){ +return(targetCount==0?sourceCount:-1); +} +if(fromIndex<0){ +fromIndex=0; +} +if(targetCount==0){ +return fromIndex; +} + +var first=target[targetOffset]; +var i=sourceOffset+fromIndex; +var max=sourceOffset+(sourceCount-targetCount); + +startSearchForFirstChar: +while(true){ + +while(i<=max&&source[i]!=first){ +i++; +} +if(i>max){ +return-1; +} + + +var j=i+1; +var end=j+targetCount-1; +var k=targetOffset+1; +while(j0&&typeof x[0]=="number"){ +var arr=new Array(x.length); +for(var i=0;ibytes.length){ +throw new IndexOutOfBoundsException(); +} +if(length>0){ +var isChar=(bytes[offset].length!=null); +if(isChar){ +for(var i=0;i0;){ +value[i]=String.fromCharCode(bytes[i+offset]&0xff); +} +}else{ +hibyte<<=8; +for(var i=count;i-->0;){ +value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); +} +} +return value.join(''); +} +}else{ +var s=""; +for(var i=0;ibytes.length){ + throw new IndexOutOfBoundsException(); + } + if(length>0){ + var isChar=(bytes[offset].length!=null); + if(isChar){ + for(var i=0;i0;){ + value[i]=String.fromCharCode(bytes[i+offset]&0xff); + } + }else{ + hibyte<<=8; + for(var i=count;i-->0;){ + value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); + } + } + return value.join(''); +default: + var s=""; + for(var i=0;i= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680 + || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000)); +},"~N"); +c$.isLetter=Clazz_defineMethod(c$,"isLetter", +function(c){ +c = c.charCodeAt(0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122); +},"~N"); +c$.isLetterOrDigit=Clazz_defineMethod(c$,"isLetterOrDigit", +function(c){ +c = c.charCodeAt(0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); +},"~N"); +c$.isSpaceChar=Clazz_defineMethod(c$,"isSpaceChar", +function(c){ + var i = c.charCodeAt(0); +if(i==0x20||i==0xa0||i==0x1680)return true; +if(i<0x2000)return false; +return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000; +},"~N"); +c$.digit=Clazz_defineMethod(c$,"digit", +function(c,radix){ +var i = c.charCodeAt(0); +if(radix >= 2 && radix <= 36){ + if(i < 128){ + var result = -1; + if(48 <= i && i <= 57){ + result = i - 48; + }else if(97 <= i && i <= 122){ + result = i - 87; + }else if(65 <= i && i <= 90){ + result=i-(55); + } + return (result < radix ? result : -1); + } +} +return -1; +},"~N,~N"); +Clazz_overrideMethod(c$,"toString", +function(){ +var buf=[this.value]; +return String.valueOf(buf); +}); +c$.toString=Clazz_overrideMethod(c$,"toString", +function(c){ +{ +if(this===Character){ +return"class java.lang.Character"; +} +}return String.valueOf(c); +},"~N"); +Clazz_defineStatics(c$, +"MIN_VALUE",'\u0000', +"MAX_VALUE",'\uffff', +"MIN_RADIX",2, +"MAX_RADIX",36, +"TYPE",null); + +java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character; + + + +Clazz._ArrayWrapper = function(a, type) { + return { + a: a, + __CLASS_NAME__:"Array", + superClazz: Array, + getComponentType: function() {return type}, + instanceOf: function(o) { return Clazz_instanceOf(type, o) }, + getName: function() { return this.__CLASS_NAME__ } + }; +} +c$=Clazz_declareType(java.lang.reflect,"Array"); +c$.newInstance=Clazz_defineMethod(c$,"newInstance", +function(componentType,size){ +var a = Clazz_newArray(size); + a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);}; +return a; +},"Class,~N"); + +javautil.Date=Date; +Date.TYPE="javautil.Date"; +Date.__CLASS_NAME__="Date"; +Clazz_implementOf(Date,[java.io.Serializable,java.lang.Comparable]); + +Clazz_defineMethod(javautil.Date,"clone", +function(){ +return new Date(this.getTime()); +}); + +Clazz_defineMethod(javautil.Date,"before", +function(when){ +return this.getTime()when.getTime(); +},"javautil.Date"); +Clazz_defineMethod(javautil.Date,"equals", +function(obj){ +return Clazz_instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime(); +},"Object"); +Clazz_defineMethod(javautil.Date,"compareTo", +function(anotherDate){ +var thisTime=this.getTime(); +var anotherTime=anotherDate.getTime(); +return(thisTime>32)); +}); + +c$=Clazz_decorateAsClass(function(){ +this.source=null; +Clazz_instantialize(this,arguments); +},javautil,"EventObject",null,java.io.Serializable); +Clazz_makeConstructor(c$, +function(source){ +if(source!=null)this.source=source; +else throw new IllegalArgumentException(); +},"~O"); +Clazz_defineMethod(c$,"getSource", +function(){ +return this.source; +}); +Clazz_overrideMethod(c$,"toString", +function(){ +return this.getClass().getName()+"[source="+String.valueOf(this.source)+']'; +}); +Clazz_declareInterface(javautil,"EventListener"); + +c$=Clazz_decorateAsClass(function(){ +this.listener=null; +Clazz_instantialize(this,arguments); +},javautil,"EventListenerProxy",null,javautil.EventListener); +Clazz_makeConstructor(c$, +function(listener){ +this.listener=listener; +},"javautil.EventListener"); +Clazz_defineMethod(c$,"getListener", +function(){ +return this.listener; +}); +Clazz_declareInterface(javautil,"Iterator"); + +Clazz_declareInterface(javautil,"ListIterator",javautil.Iterator); +Clazz_declareInterface(javautil,"Enumeration"); +Clazz_declareInterface(javautil,"Collection",Iterable); + +Clazz_declareInterface(javautil,"Set",javautil.Collection); +Clazz_declareInterface(javautil,"Map"); +Clazz_declareInterface(javautil.Map,"Entry"); + +Clazz_declareInterface(javautil,"List",javautil.Collection); + +Clazz_declareInterface(javautil,"Queue",javautil.Collection); +Clazz_declareInterface(javautil,"RandomAccess"); +c$=Clazz_decorateAsClass(function(){ +this.detailMessage=null; +this.cause=null; +this.stackTrace=null; +Clazz_instantialize(this,arguments); +},java.lang,"Throwable",null,java.io.Serializable); +Clazz_prepareFields(c$,function(){ +this.cause=this; +//alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller) +}); +Clazz_makeConstructor(c$, +function(){ +this.fillInStackTrace(); +}); +Clazz_makeConstructor(c$, +function(message){ +this.fillInStackTrace(); +this.detailMessage=message; +},"~S"); +Clazz_makeConstructor(c$, +function(message,cause){ +this.fillInStackTrace(); +this.detailMessage=message; +this.cause=cause; +},"~S,Throwable"); +Clazz_makeConstructor(c$, +function(cause){ +this.fillInStackTrace(); +this.detailMessage=(cause==null?null:cause.toString()); +this.cause=cause; +},"Throwable"); +Clazz_defineMethod(c$,"getMessage", +function(){ +return (this.message || this.detailMessage || this.toString()); +}); +Clazz_defineMethod(c$,"getLocalizedMessage", +function(){ +return this.getMessage(); +}); +Clazz_defineMethod(c$,"getCause", +function(){ +return(this.cause===this?null:this.cause); +}); +Clazz_defineMethod(c$,"initCause", +function(cause){ +if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause"); +if(cause===this)throw new IllegalArgumentException("Self-causation not permitted"); +this.cause=cause; +return this; +},"Throwable"); +Clazz_overrideMethod(c$,"toString", +function(){ +var s=this.getClass().getName(); +var message=this.message || this.detailMessage; +return(message ? s+": "+message : s); +}); +Clazz_defineMethod(c$,"printStackTrace", +function(){ +System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz_getStackTrace()); +}); + +Clazz_defineMethod(c$,"getStackTrace", +function(){ +var s = "" + this + "\n"; +for(var i=0;i-1||caller!=null){ +var clazzName=null; +var nativeClass=null; +if(!noLooping||caller==Clazz_tryToSearchAndExecute||caller==Clazz_superCall||caller==null){ +if(index<0){ +break; +} +noLooping=true; +superCaller=Clazz._callingStackTraces[index].caller; +nativeClass=Clazz._callingStackTraces[index].owner; +index--; +}else{ +superCaller=caller; +if(superCaller.claxxOwner!=null){ +nativeClass=superCaller.claxxOwner; +}else if(superCaller.exClazz!=null){ +nativeClass=superCaller.exClazz; +} +} +var st=new StackTraceElement( +((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)? +nativeClass.__CLASS_NAME__:"anonymous"), +((superCaller.exName==null)?"anonymous":superCaller.exName) ++" ("+Clazz_getParamsType(superCaller.arguments)+")", +null,-1); +st.nativeClazz=nativeClass; +this.stackTrace[this.stackTrace.length]=st; +for(var i=0;i":this.declaringClass; +}); +Clazz_defineMethod(c$,"getFileName", +function(){ +return this.fileName; +}); +Clazz_defineMethod(c$,"getLineNumber", +function(){ +return this.lineNumber; +}); +Clazz_defineMethod(c$,"getMethodName", +function(){ +return(this.methodName==null)?"":this.methodName; +}); +Clazz_overrideMethod(c$,"hashCode", +function(){ +if(this.methodName==null){ +return 0; +}return this.methodName.hashCode()^this.declaringClass.hashCode(); +}); +Clazz_defineMethod(c$,"isNativeMethod", +function(){ +return this.lineNumber==-2; +}); +Clazz_overrideMethod(c$,"toString", +function(){ +var buf=new StringBuilder(80); +buf.append(this.getClassName()); +buf.append('.'); +buf.append(this.getMethodName()); +if(this.isNativeMethod()){ +buf.append("(Native Method)"); +}else{ +var fName=this.getFileName(); +if(fName==null){ +buf.append("(Unknown Source)"); +}else{ +var lineNum=this.getLineNumber(); +buf.append('('); +buf.append(fName); +if(lineNum>=0){ +buf.append(':'); +buf.append(lineNum); +}buf.append(')'); +}}return buf.toString(); +}); +TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz_getStackTrace())}); +c$=Clazz_declareType(java.lang,"Error",Throwable); + +c$=Clazz_declareType(java.lang,"LinkageError",Error); + +c$=Clazz_declareType(java.lang,"IncompatibleClassChangeError",LinkageError); + +c$=Clazz_declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"AssertionError",Error); +Clazz_makeConstructor(c$, +function(detailMessage){ +Clazz_superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz_instanceOf(detailMessage,Throwable)?detailMessage:null)]); +},"~O"); +Clazz_makeConstructor(c$, +function(detailMessage){ +this.construct("" + detailMessage); +},"~B"); +Clazz_makeConstructor(c$, +function(detailMessage){ +this.construct("" + detailMessage); +},"~N"); + +c$=Clazz_declareType(java.lang,"ClassCircularityError",LinkageError); + +c$=Clazz_declareType(java.lang,"ClassFormatError",LinkageError); + +c$=Clazz_decorateAsClass(function(){ +this.exception=null; +Clazz_instantialize(this,arguments); +},java.lang,"ExceptionInInitializerError",LinkageError); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,ExceptionInInitializerError); +this.initCause(null); +}); +Clazz_makeConstructor(c$, +function(detailMessage){ +Clazz_superConstructor(this,ExceptionInInitializerError,[detailMessage]); +this.initCause(null); +},"~S"); +Clazz_makeConstructor(c$, +function(exception){ +Clazz_superConstructor(this,ExceptionInInitializerError); +this.exception=exception; +this.initCause(exception); +},"Throwable"); +Clazz_defineMethod(c$,"getException", +function(){ +return this.exception; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.exception; +}); + +c$=Clazz_declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"InstantiationError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"VirtualMachineError",Error); + +c$=Clazz_declareType(java.lang,"InternalError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"NoClassDefFoundError",LinkageError); + +c$=Clazz_declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"OutOfMemoryError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"StackOverflowError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"UnknownError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"UnsatisfiedLinkError",LinkageError); + +c$=Clazz_declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError); + +c$=Clazz_declareType(java.lang,"VerifyError",LinkageError); + +c$=Clazz_declareType(java.lang,"ThreadDeath",Error); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,ThreadDeath,[]); +}); + +c$=Clazz_declareType(java.lang,"Exception",Throwable); + +c$=Clazz_declareType(java.lang,"RuntimeException",Exception); + +c$=Clazz_declareType(java.lang,"ArithmeticException",RuntimeException); + +c$=Clazz_declareType(java.lang,"IndexOutOfBoundsException",RuntimeException); + +c$=Clazz_declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException); +Clazz_makeConstructor(c$, +function(index){ +Clazz_superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]); +},"~N"); + +c$=Clazz_declareType(java.lang,"ArrayStoreException",RuntimeException); + +c$=Clazz_declareType(java.lang,"ClassCastException",RuntimeException); + +c$=Clazz_decorateAsClass(function(){ +this.ex=null; +Clazz_instantialize(this,arguments); +},java.lang,"ClassNotFoundException",Exception); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,ClassNotFoundException,[Clazz_castNullAs("Throwable")]); +}); +Clazz_makeConstructor(c$, +function(detailMessage){ +Clazz_superConstructor(this,ClassNotFoundException,[detailMessage,null]); +},"~S"); +Clazz_makeConstructor(c$, +function(detailMessage,exception){ +Clazz_superConstructor(this,ClassNotFoundException,[detailMessage]); +this.ex=exception; +},"~S,Throwable"); +Clazz_defineMethod(c$,"getException", +function(){ +return this.ex; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.ex; +}); + +c$=Clazz_declareType(java.lang,"CloneNotSupportedException",Exception); + +c$=Clazz_declareType(java.lang,"IllegalAccessException",Exception); + +c$=Clazz_declareType(java.lang,"IllegalArgumentException",RuntimeException); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_declareType(java.lang,"IllegalMonitorStateException",RuntimeException); + +c$=Clazz_declareType(java.lang,"IllegalStateException",RuntimeException); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException); + +c$=Clazz_declareType(java.lang,"InstantiationException",Exception); + +c$=Clazz_declareType(java.lang,"InterruptedException",Exception); + +c$=Clazz_declareType(java.lang,"NegativeArraySizeException",RuntimeException); + +c$=Clazz_declareType(java.lang,"NoSuchFieldException",Exception); + +c$=Clazz_declareType(java.lang,"NoSuchMethodException",Exception); + +c$=Clazz_declareType(java.lang,"NullPointerException",RuntimeException); + +c$=Clazz_declareType(java.lang,"NumberFormatException",IllegalArgumentException); + +c$=Clazz_declareType(java.lang,"SecurityException",RuntimeException); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException); +Clazz_makeConstructor(c$, +function(index){ +Clazz_superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]); +},"~N"); + +c$=Clazz_declareType(java.lang,"UnsupportedOperationException",RuntimeException); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,UnsupportedOperationException,[]); +}); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_decorateAsClass(function(){ +this.target=null; +Clazz_instantialize(this,arguments); +},java.lang.reflect,"InvocationTargetException",Exception); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz_castNullAs("Throwable")]); +}); +Clazz_makeConstructor(c$, +function(exception){ +Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]); +this.target=exception; +},"Throwable"); +Clazz_makeConstructor(c$, +function(exception,detailMessage){ +Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]); +this.target=exception; +},"Throwable,~S"); +Clazz_defineMethod(c$,"getTargetException", +function(){ +return this.target; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.target; +}); + +c$=Clazz_decorateAsClass(function(){ +this.undeclaredThrowable=null; +Clazz_instantialize(this,arguments); +},java.lang.reflect,"UndeclaredThrowableException",RuntimeException); +Clazz_makeConstructor(c$, +function(exception){ +Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException); +this.undeclaredThrowable=exception; +this.initCause(exception); +},"Throwable"); +Clazz_makeConstructor(c$, +function(exception,detailMessage){ +Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]); +this.undeclaredThrowable=exception; +this.initCause(exception); +},"Throwable,~S"); +Clazz_defineMethod(c$,"getUndeclaredThrowable", +function(){ +return this.undeclaredThrowable; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.undeclaredThrowable; +}); + +c$=Clazz_declareType(java.io,"IOException",Exception); + + +c$=Clazz_declareType(java.io,"CharConversionException",java.io.IOException); + +c$=Clazz_declareType(java.io,"EOFException",java.io.IOException); + +c$=Clazz_declareType(java.io,"FileNotFoundException",java.io.IOException); + +c$=Clazz_decorateAsClass(function(){ +this.bytesTransferred=0; +Clazz_instantialize(this,arguments); +},java.io,"InterruptedIOException",java.io.IOException); + +c$=Clazz_declareType(java.io,"ObjectStreamException",java.io.IOException); + +c$=Clazz_decorateAsClass(function(){ +this.classname=null; +Clazz_instantialize(this,arguments); +},java.io,"InvalidClassException",java.io.ObjectStreamException); +Clazz_makeConstructor(c$, +function(className,detailMessage){ +Clazz_superConstructor(this,java.io.InvalidClassException,[detailMessage]); +this.classname=className; +},"~S,~S"); +Clazz_defineMethod(c$,"getMessage", +function(){ +var msg=Clazz_superCall(this,java.io.InvalidClassException,"getMessage",[]); +if(this.classname!=null){ +msg=this.classname+';' + ' '+msg; +}return msg; +}); + +c$=Clazz_declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"NotActiveException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"NotSerializableException",java.io.ObjectStreamException); + +c$=Clazz_decorateAsClass(function(){ +this.eof=false; +this.length=0; +Clazz_instantialize(this,arguments); +},java.io,"OptionalDataException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"SyncFailedException",java.io.IOException); + +c$=Clazz_declareType(java.io,"UnsupportedEncodingException",java.io.IOException); + +c$=Clazz_declareType(java.io,"UTFDataFormatException",java.io.IOException); + +c$=Clazz_decorateAsClass(function(){ +this.detail=null; +Clazz_instantialize(this,arguments); +},java.io,"WriteAbortedException",java.io.ObjectStreamException); +Clazz_makeConstructor(c$, +function(detailMessage,rootCause){ +Clazz_superConstructor(this,java.io.WriteAbortedException,[detailMessage]); +this.detail=rootCause; +this.initCause(rootCause); +},"~S,Exception"); +Clazz_defineMethod(c$,"getMessage", +function(){ +var msg=Clazz_superCall(this,java.io.WriteAbortedException,"getMessage",[]); +return (this.detail ? msg + "; "+this.detail.toString() : msg); +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.detail; +}); + +c$=Clazz_declareType(javautil,"ConcurrentModificationException",RuntimeException); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,javautil.ConcurrentModificationException,[]); +}); + +c$=Clazz_declareType(javautil,"EmptyStackException",RuntimeException); + +c$=Clazz_decorateAsClass(function(){ +this.className=null; +this.key=null; +Clazz_instantialize(this,arguments); +},javautil,"MissingResourceException",RuntimeException); +Clazz_makeConstructor(c$, +function(detailMessage,className,resourceName){ +Clazz_superConstructor(this,javautil.MissingResourceException,[detailMessage]); +this.className=className; +this.key=resourceName; +},"~S,~S,~S"); +Clazz_defineMethod(c$,"getClassName", +function(){ +return this.className; +}); +Clazz_defineMethod(c$,"getKey", +function(){ +return this.key; +}); + +c$=Clazz_declareType(javautil,"NoSuchElementException",RuntimeException); + +c$=Clazz_declareType(javautil,"TooManyListenersException",Exception); + +c$=Clazz_declareType(java.lang,"Void"); +Clazz_defineStatics(c$, +"TYPE",null); +{ +java.lang.Void.TYPE=java.lang.Void; +}Clazz_declareInterface(java.lang.reflect,"GenericDeclaration"); +Clazz_declareInterface(java.lang.reflect,"AnnotatedElement"); + +c$=Clazz_declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement); +Clazz_makeConstructor(c$, +function(){ +}); +Clazz_defineMethod(c$,"isAccessible", +function(){ +return false; +}); +c$.setAccessible=Clazz_defineMethod(c$,"setAccessible", +function(objects,flag){ +return; +},"~A,~B"); +Clazz_defineMethod(c$,"setAccessible", +function(flag){ +return; +},"~B"); +Clazz_overrideMethod(c$,"isAnnotationPresent", +function(annotationType){ +return false; +},"Class"); +Clazz_overrideMethod(c$,"getDeclaredAnnotations", +function(){ +return new Array(0); +}); +Clazz_overrideMethod(c$,"getAnnotations", +function(){ +return new Array(0); +}); +Clazz_overrideMethod(c$,"getAnnotation", +function(annotationType){ +return null; +},"Class"); +c$.marshallArguments=Clazz_defineMethod(c$,"marshallArguments", +function(parameterTypes,args){ +return null; +},"~A,~A"); +Clazz_defineMethod(c$,"invokeV", +function(receiver,args){ +return; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeL", +function(receiver,args){ +return null; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeI", +function(receiver,args){ +return 0; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeJ", +function(receiver,args){ +return 0; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeF", +function(receiver,args){ +return 0.0; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeD", +function(receiver,args){ +return 0.0; +},"~O,~A"); +c$.emptyArgs=c$.prototype.emptyArgs=new Array(0); +Clazz_declareInterface(java.lang.reflect,"InvocationHandler"); +c$=Clazz_declareInterface(java.lang.reflect,"Member"); +Clazz_defineStatics(c$, +"PUBLIC",0, +"DECLARED",1); + +c$=Clazz_declareType(java.lang.reflect,"Modifier"); +Clazz_makeConstructor(c$, +function(){ +}); +c$.isAbstract=Clazz_defineMethod(c$,"isAbstract", +function(modifiers){ +return((modifiers&1024)!=0); +},"~N"); +c$.isFinal=Clazz_defineMethod(c$,"isFinal", +function(modifiers){ +return((modifiers&16)!=0); +},"~N"); +c$.isInterface=Clazz_defineMethod(c$,"isInterface", +function(modifiers){ +return((modifiers&512)!=0); +},"~N"); +c$.isNative=Clazz_defineMethod(c$,"isNative", +function(modifiers){ +return((modifiers&256)!=0); +},"~N"); +c$.isPrivate=Clazz_defineMethod(c$,"isPrivate", +function(modifiers){ +return((modifiers&2)!=0); +},"~N"); +c$.isProtected=Clazz_defineMethod(c$,"isProtected", +function(modifiers){ +return((modifiers&4)!=0); +},"~N"); +c$.isPublic=Clazz_defineMethod(c$,"isPublic", +function(modifiers){ +return((modifiers&1)!=0); +},"~N"); +c$.isStatic=Clazz_defineMethod(c$,"isStatic", +function(modifiers){ +return((modifiers&8)!=0); +},"~N"); +c$.isStrict=Clazz_defineMethod(c$,"isStrict", +function(modifiers){ +return((modifiers&2048)!=0); +},"~N"); +c$.isSynchronized=Clazz_defineMethod(c$,"isSynchronized", +function(modifiers){ +return((modifiers&32)!=0); +},"~N"); +c$.isTransient=Clazz_defineMethod(c$,"isTransient", +function(modifiers){ +return((modifiers&128)!=0); +},"~N"); +c$.isVolatile=Clazz_defineMethod(c$,"isVolatile", +function(modifiers){ +return((modifiers&64)!=0); +},"~N"); +c$.toString=Clazz_defineMethod(c$,"toString", +function(modifiers){ +var sb=new Array(0); +if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public"; +if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected"; +if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private"; +if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract"; +if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static"; +if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final"; +if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient"; +if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile"; +if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized"; +if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native"; +if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp"; +if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface"; +if(sb.length>0){ +return sb.join(" "); +}return""; +},"~N"); +Clazz_defineStatics(c$, +"PUBLIC",0x1, +"PRIVATE",0x2, +"PROTECTED",0x4, +"STATIC",0x8, +"FINAL",0x10, +"SYNCHRONIZED",0x20, +"VOLATILE",0x40, +"TRANSIENT",0x80, +"NATIVE",0x100, +"INTERFACE",0x200, +"ABSTRACT",0x400, +"STRICT",0x800, +"BRIDGE",0x40, +"VARARGS",0x80, +"SYNTHETIC",0x1000, +"ANNOTATION",0x2000, +"ENUM",0x4000); + +c$=Clazz_decorateAsClass(function(){ +this.clazz=null; +this.parameterTypes=null; +this.exceptionTypes=null; +this.modifiers=0; +Clazz_instantialize(this,arguments); +},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]); +Clazz_makeConstructor(c$, +function(declaringClass,parameterTypes,checkedExceptions,modifiers){ +Clazz_superConstructor(this,java.lang.reflect.Constructor,[]); +this.clazz=declaringClass; +this.parameterTypes=parameterTypes; +this.exceptionTypes=checkedExceptions; +this.modifiers=modifiers; +},"Class,~A,~A,~N"); +Clazz_overrideMethod(c$,"getTypeParameters", +function(){ +return null; +}); +Clazz_defineMethod(c$,"toGenericString", +function(){ +return null; +}); +Clazz_defineMethod(c$,"getGenericParameterTypes", +function(){ +return null; +}); +Clazz_defineMethod(c$,"getGenericExceptionTypes", +function(){ +return null; +}); +Clazz_defineMethod(c$,"getParameterAnnotations", +function(){ +return null; +}); +Clazz_defineMethod(c$,"isVarArgs", +function(){ +return false; +}); +Clazz_overrideMethod(c$,"isSynthetic", +function(){ +return false; +}); +Clazz_overrideMethod(c$,"equals", +function(object){ +if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Constructor)){ +var other=object; +if(this.getDeclaringClass()===other.getDeclaringClass()){ +var params1=this.parameterTypes; +var params2=other.parameterTypes; +if(params1.length==params2.length){ +for(var i=0;ithis&&0this&&0=a},"~N");c$.isUpperCase=c(c$,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~N");c$.isLowerCase=c(c$,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~N");c$.isWhitespace=c(c$,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a||5760==a||8192<= a&&8199!=a&&(8203>=a||8232==a||8233==a||12288==a)},"~N");c$.isLetter=c(c$,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~N");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~N");c$.isSpaceChar=c(c$,"isSpaceChar",function(a){a=a.charCodeAt(0);return 32==a||160==a||5760==a?!0:8192>a?!1:8203>=a||8232==a||8233==a||8239==a||12288==a},"~N");c$.digit=c(c$,"digit",function(a,b){var c=a.charCodeAt(0); if(2<=b&&36>=b&&128>c){var d=-1;48<=c&&57>=c?d=c-48:97<=c&&122>=c?d=c-87:65<=c&&90>=c&&(d=c-55);return da.getTime()},"javautil.Date");c(j.Date,"equals",function(a){return q(a,j.Date)&&this.getTime()==a.getTime()},"Object");c(j.Date,"compareTo",function(a){var b=this.getTime();a=a.getTime();return b>32)});c$=r(function(){this.source=null;p(this,arguments)},j,"EventObject",null,java.io.Serializable);f(c$,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");c(c$,"getSource",function(){return this.source});e(c$,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});t(j,"EventListener");c$=r(function(){this.listener=null;p(this,arguments)},j,"EventListenerProxy",null,j.EventListener);f(c$,function(a){this.listener= -a},"javautil.EventListener");c(c$,"getListener",function(){return this.listener});t(j,"Iterator");t(j,"ListIterator",j.Iterator);t(j,"Enumeration");t(j,"Collection",Iterable);t(j,"Set",j.Collection);t(j,"Map");t(j.Map,"Entry");t(j,"List",j.Collection);t(j,"Queue",j.Collection);t(j,"RandomAccess");c$=r(function(){this.stackTrace=this.cause=this.detailMessage=null;p(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);F(c$,function(){this.cause=this});f(c$,function(){this.fillInStackTrace()}); +a},"javautil.EventListener");c(c$,"getListener",function(){return this.listener});t(j,"Iterator");t(j,"ListIterator",j.Iterator);t(j,"Enumeration");t(j,"Collection",Iterable);t(j,"Set",j.Collection);t(j,"Map");t(j.Map,"Entry");t(j,"List",j.Collection);t(j,"Queue",j.Collection);t(j,"RandomAccess");c$=r(function(){this.stackTrace=this.cause=this.detailMessage=null;p(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);G(c$,function(){this.cause=this});f(c$,function(){this.fillInStackTrace()}); f(c$,function(a){this.fillInStackTrace();this.detailMessage=a},"~S");f(c$,function(a,b){this.fillInStackTrace();this.detailMessage=a;this.cause=b},"~S,Throwable");f(c$,function(a){this.fillInStackTrace();this.detailMessage=null==a?null:a.toString();this.cause=a},"Throwable");c(c$,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(c$,"getLocalizedMessage",function(){return this.getMessage()});c(c$,"getCause",function(){return this.cause===this?null:this.cause});c(c$, -"initCause",function(a){if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");if(a===this)throw new IllegalArgumentException("Self-causation not permitted");this.cause=a;return this},"Throwable");e(c$,"toString",function(){var a=this.getClass().getName(),b=this.message||this.detailMessage;return b?a+": "+b:a});c(c$,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+D())});c(c$,"getStackTrace",function(){for(var a=""+this+ -"\n",b=0;bH(c.nativeClazz,Throwable))a+=c+"\n"}return a});c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(c$,"fillInStackTrace",function(){this.stackTrace=[];for(var a=arguments.callee.caller,b=null,c=[],d=k._callingStackTraces.length- -1,e=!0;-1d)break;e=!0;b=k._callingStackTraces[d].caller;f=k._callingStackTraces[d].owner;d--}else b=a,null!=b.claxxOwner?f=b.claxxOwner:null!=b.exClazz&&(f=b.exClazz);a=new StackTraceElement(null!=f&&0!=f.__CLASS_NAME__.length?f.__CLASS_NAME__:"anonymous",(null==b.exName?"anonymous":b.exName)+" ("+I(b.arguments)+")",null,-1);a.nativeClazz=f;this.stackTrace[this.stackTrace.length]=a;for(f=0;fI(c.nativeClazz,Throwable))a+=c+"\n"}return a});c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(c$,"fillInStackTrace",function(){this.stackTrace=[];for(var a=arguments.callee.caller,b=null,c=[],d=k._callingStackTraces.length- +1,e=!0;-1d)break;e=!0;b=k._callingStackTraces[d].caller;f=k._callingStackTraces[d].owner;d--}else b=a,null!=b.claxxOwner?f=b.claxxOwner:null!=b.exClazz&&(f=b.exClazz);a=new StackTraceElement(null!=f&&0!=f.__CLASS_NAME__.length?f.__CLASS_NAME__:"anonymous",(null==b.exName?"anonymous":b.exName)+" ("+J(b.arguments)+")",null,-1);a.nativeClazz=f;this.stackTrace[this.stackTrace.length]=a;for(f=0;f":this.declaringClass});c(c$,"getFileName",function(){return this.fileName});c(c$,"getLineNumber",function(){return this.lineNumber});c(c$,"getMethodName",function(){return null==this.methodName?"":this.methodName});e(c$,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(c$,"isNativeMethod",function(){return-2== this.lineNumber});e(c$,"toString",function(){var a=new StringBuilder(80);a.append(this.getClassName());a.append(".");a.append(this.getMethodName());if(this.isNativeMethod())a.append("(Native Method)");else{var b=this.getFileName();if(null==b)a.append("(Unknown Source)");else{var c=this.getLineNumber();a.append("(");a.append(b);0<=c&&(a.append(":"),a.append(c));a.append(")")}}return a.toString()});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+ -(this.getStackTrace?this.getStackTrace():D())});c$=d(java.lang,"Error",Throwable);c$=d(java.lang,"LinkageError",Error);c$=d(java.lang,"IncompatibleClassChangeError",LinkageError);c$=d(java.lang,"AbstractMethodError",IncompatibleClassChangeError);c$=d(java.lang,"AssertionError",Error);f(c$,function(a){m(this,AssertionError,[String.valueOf(a),q(a,Throwable)?a:null])},"~O");f(c$,function(a){this.construct(""+a)},"~B");f(c$,function(a){this.construct(""+a)},"~N");c$=d(java.lang,"ClassCircularityError", +(this.getStackTrace?this.getStackTrace():E())});c$=d(java.lang,"Error",Throwable);c$=d(java.lang,"LinkageError",Error);c$=d(java.lang,"IncompatibleClassChangeError",LinkageError);c$=d(java.lang,"AbstractMethodError",IncompatibleClassChangeError);c$=d(java.lang,"AssertionError",Error);f(c$,function(a){m(this,AssertionError,[String.valueOf(a),q(a,Throwable)?a:null])},"~O");f(c$,function(a){this.construct(""+a)},"~B");f(c$,function(a){this.construct(""+a)},"~N");c$=d(java.lang,"ClassCircularityError", LinkageError);c$=d(java.lang,"ClassFormatError",LinkageError);c$=r(function(){this.exception=null;p(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);f(c$,function(){m(this,ExceptionInInitializerError);this.initCause(null)});f(c$,function(a){m(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");f(c$,function(a){m(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(c$,"getException",function(){return this.exception});e(c$,"getCause", function(){return this.exception});c$=d(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=d(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=d(java.lang,"VirtualMachineError",Error);c$=d(java.lang,"InternalError",VirtualMachineError);c$=d(java.lang,"NoClassDefFoundError",LinkageError);c$=d(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);c$=d(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);c$=d(java.lang,"OutOfMemoryError",VirtualMachineError);c$= d(java.lang,"StackOverflowError",VirtualMachineError);c$=d(java.lang,"UnknownError",VirtualMachineError);c$=d(java.lang,"UnsatisfiedLinkError",LinkageError);c$=d(java.lang,"UnsupportedClassVersionError",ClassFormatError);c$=d(java.lang,"VerifyError",LinkageError);c$=d(java.lang,"ThreadDeath",Error);f(c$,function(){m(this,ThreadDeath,[])});c$=d(java.lang,"Exception",Throwable);c$=d(java.lang,"RuntimeException",Exception);c$=d(java.lang,"ArithmeticException",RuntimeException);c$=d(java.lang,"IndexOutOfBoundsException", -RuntimeException);c$=d(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);f(c$,function(a){m(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");c$=d(java.lang,"ArrayStoreException",RuntimeException);c$=d(java.lang,"ClassCastException",RuntimeException);c$=r(function(){this.ex=null;p(this,arguments)},java.lang,"ClassNotFoundException",Exception);f(c$,function(){m(this,ClassNotFoundException,[C("Throwable")])});f(c$,function(a){m(this,ClassNotFoundException, +RuntimeException);c$=d(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);f(c$,function(a){m(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");c$=d(java.lang,"ArrayStoreException",RuntimeException);c$=d(java.lang,"ClassCastException",RuntimeException);c$=r(function(){this.ex=null;p(this,arguments)},java.lang,"ClassNotFoundException",Exception);f(c$,function(){m(this,ClassNotFoundException,[D("Throwable")])});f(c$,function(a){m(this,ClassNotFoundException, [a,null])},"~S");f(c$,function(a,b){m(this,ClassNotFoundException,[a]);this.ex=b},"~S,Throwable");c(c$,"getException",function(){return this.ex});e(c$,"getCause",function(){return this.ex});c$=d(java.lang,"CloneNotSupportedException",Exception);c$=d(java.lang,"IllegalAccessException",Exception);c$=d(java.lang,"IllegalArgumentException",RuntimeException);f(c$,function(a){m(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");c$=d(java.lang,"IllegalMonitorStateException",RuntimeException); c$=d(java.lang,"IllegalStateException",RuntimeException);f(c$,function(a){m(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");c$=d(java.lang,"IllegalThreadStateException",IllegalArgumentException);c$=d(java.lang,"InstantiationException",Exception);c$=d(java.lang,"InterruptedException",Exception);c$=d(java.lang,"NegativeArraySizeException",RuntimeException);c$=d(java.lang,"NoSuchFieldException",Exception);c$=d(java.lang,"NoSuchMethodException",Exception);c$=d(java.lang,"NullPointerException", RuntimeException);c$=d(java.lang,"NumberFormatException",IllegalArgumentException);c$=d(java.lang,"SecurityException",RuntimeException);f(c$,function(a){m(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");c$=d(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);f(c$,function(a){m(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");c$=d(java.lang,"UnsupportedOperationException",RuntimeException);f(c$,function(){m(this,UnsupportedOperationException, -[])});f(c$,function(a){m(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");c$=r(function(){this.target=null;p(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);f(c$,function(){m(this,java.lang.reflect.InvocationTargetException,[C("Throwable")])});f(c$,function(a){m(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");f(c$,function(a,b){m(this,java.lang.reflect.InvocationTargetException,[b,a]);this.target=a},"Throwable,~S"); +[])});f(c$,function(a){m(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");c$=r(function(){this.target=null;p(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);f(c$,function(){m(this,java.lang.reflect.InvocationTargetException,[D("Throwable")])});f(c$,function(a){m(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");f(c$,function(a,b){m(this,java.lang.reflect.InvocationTargetException,[b,a]);this.target=a},"Throwable,~S"); c(c$,"getTargetException",function(){return this.target});e(c$,"getCause",function(){return this.target});c$=r(function(){this.undeclaredThrowable=null;p(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",RuntimeException);f(c$,function(a){m(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");f(c$,function(a,b){m(this,java.lang.reflect.UndeclaredThrowableException,[b]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S"); c(c$,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});e(c$,"getCause",function(){return this.undeclaredThrowable});c$=d(java.io,"IOException",Exception);c$=d(java.io,"CharConversionException",java.io.IOException);c$=d(java.io,"EOFException",java.io.IOException);c$=d(java.io,"FileNotFoundException",java.io.IOException);c$=r(function(){this.bytesTransferred=0;p(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=d(java.io,"ObjectStreamException",java.io.IOException); c$=r(function(){this.classname=null;p(this,arguments)},java.io,"InvalidClassException",java.io.ObjectStreamException);f(c$,function(a,b){m(this,java.io.InvalidClassException,[b]);this.classname=a},"~S,~S");c(c$,"getMessage",function(){var a=B(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(a=this.classname+"; "+a);return a});c$=d(java.io,"InvalidObjectException",java.io.ObjectStreamException);c$=d(java.io,"NotActiveException",java.io.ObjectStreamException);c$=d(java.io, @@ -81,11 +81,11 @@ java.lang.reflect.Modifier.isPrivate(a)&&(b[b.length]="private");java.lang.refle (b[b.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(b[b.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(b[b.length]="interface");return 0 0 ? x - 0x10000 : x); +}); + +Clazz_defineMethod(Number,"byteValue", +function(){ +var x = Math.round(this)&0xff; +return (this < 0 && x > 0 ? x - 0x100 : x); +}); + +Clazz_defineMethod(Number,"intValue", +function(){ +return Math.round(this)&0xffffffff; +}); + +Clazz_defineMethod(Number,"longValue", +function(){ +return Math.round(this); +}); + +Clazz_defineMethod(Number,"floatValue", +function(){ +return this.valueOf(); +}); +Clazz_defineMethod(Number,"doubleValue", +function(){ +return parseFloat(this.valueOf()); +}); + +Clazz_overrideMethod(Number,"hashCode", +function(){ +return this.valueOf(); +}); + +java.lang.Integer=Integer=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Integer,"Integer",Number,Comparable,null,true); +Integer.prototype.valueOf=function(){return 0;}; +Integer.toString=Integer.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +} else if(this===Integer){ +return"class java.lang.Integer"; +} +return""+this.valueOf(); +}; + +/* + +Clazz_makeConstructor(Integer, +function(){ +this.valueOf=function(){ +return 0; +}; +}); +*/ + + +Clazz_overrideConstructor(Integer, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + this.valueOf=function(){return v;}; +}); //BH +/* +Clazz_makeConstructor(Integer, +function(s){ +var value=Integer.parseInt(s,10); +this.valueOf=function(){ +return value; +}; +},"String"); +*/ +Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000; +Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff; +Integer.TYPE=Integer.prototype.TYPE=Integer; + + +Clazz_defineMethod(Integer,"bitCount", +function(i) { + i = i - ((i >>> 1) & 0x55555555); + i = (i & 0x33333333) + ((i >>> 2) & 0x33333333); + i = (i + (i >>> 4)) & 0x0f0f0f0f; + i = i + (i >>> 8); + i = i + (i >>> 16); + return i & 0x3f; +},"Number"); +Integer.bitCount=Integer.prototype.bitCount; + +Clazz_defineMethod(Integer,"numberOfLeadingZeros", +function(i) { + if (i == 0) return 32; + var n = 1; + if (i >>> 16 == 0) { n += 16; i <<= 16; } + if (i >>> 24 == 0) { n += 8; i <<= 8; } + if (i >>> 28 == 0) { n += 4; i <<= 4; } + if (i >>> 30 == 0) { n += 2; i <<= 2; } + n -= i >>> 31; + return n; +},"Number"); +Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros; + +Clazz_defineMethod(Integer,"numberOfTrailingZeros", +function(i) { + if (i == 0) return 32; + var n = 31; + var y = i <<16; if (y != 0) { n = n -16; i = y; } + y = i << 8; if (y != 0) { n = n - 8; i = y; } + y = i << 4; if (y != 0) { n = n - 4; i = y; } + y = i << 2; if (y != 0) { n = n - 2; i = y; } + return n - ((i << 1) >>> 31); +},"Number"); +Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros; + +Clazz_defineMethod(Integer,"parseIntRadix", +function(s,radix){ +if(s==null){ +throw new NumberFormatException("null"); +}if(radix<2){ +throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX"); +}if(radix>36){ +throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX"); +} +if (radix == 10) { + for (var i = s.length; --i >= 0;) { + var c = s.charCodeAt(i); + if (c >= 48 && c <= 57) continue; + if (i > 0 || c != 43 && c != 45) + throw new NumberFormatException("Not a Number : "+s); + + } +} +var i=parseInt(s,radix); +if(isNaN(i)){ +throw new NumberFormatException("Not a Number : "+s); +} +return i; +},"String, Number"); +Integer.parseIntRadix=Integer.prototype.parseIntRadix; + +Clazz_defineMethod(Integer,"parseInt", +function(s){ +return Integer.parseIntRadix(s,10); +},"String"); +Integer.parseInt=Integer.prototype.parseInt; + +/* +Clazz_defineMethod(Integer,"$valueOf", +function(s){ +return new Integer(Integer.parseIntRadix(s,10)); +},"String"); +*/ + +Clazz_overrideMethod(Integer,"$valueOf", +function(s){ +return new Integer(s); +}); + +/* +Clazz_defineMethod(Integer,"$valueOf", +function(s,r){ +return new Integer(Integer.parseIntRadix(s,r)); +},"String, Number"); +*/ + +Integer.$valueOf=Integer.prototype.$valueOf; + + +Clazz_overrideMethod(Integer,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Integer)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Integer.toHexString=Integer.prototype.toHexString=function(d){ +if(d.valueOf)d=d.valueOf(); +if (d < 0) { +var b = d & 0xFFFFFF; +var c = ((d>>24)&0xFF); +return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6); +} +return d._numberToString(16);}; +Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);}; +Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);}; + +Integer.decodeRaw=Clazz_defineMethod(Integer,"decodeRaw", function(n){ +if (n.indexOf(".") >= 0)n = ""; +var i = (n.startsWith("-") ? 1 : 0); +n = n.replace(/\#/, "0x").toLowerCase(); +var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10); +// The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10. +// Number is strict, but Number("055") does not work, though ParseInt("055", 8) does. +// need to make sure negative numbers are negative +n = Number(n) & 0xFFFFFFFF; +return (radix == 8 ? parseInt(n, 8) : n); +},"~S"); + +Integer.decode=Clazz_defineMethod(Integer,"decode", function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE) + throw new NumberFormatException("Invalid Integer"); + return new Integer(n); +},"~S"); + +Clazz_overrideMethod(Integer,"hashCode", +function(){ +return this.valueOf(); +}); + +// Note that Long is problematic in JavaScript + +java.lang.Long=Long=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Long,"Long",Number,Comparable,null,true); +Long.prototype.valueOf=function(){return 0;}; +Long.toString=Long.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +}else if(this===Long){ +return"class java.lang.Long"; +} +return""+this.valueOf(); +}; + +Clazz_overrideConstructor(Long, function(v){ + v == null && (v = 0); + v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10)); +this.valueOf=function(){return v;}; +}); + +//Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000; +//Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff; +Long.TYPE=Long.prototype.TYPE=Long; + +Clazz_defineMethod(Long,"parseLong", +function(s,radix){ + return Integer.parseInt(s, radix || 10); +}); + +Long.parseLong=Long.prototype.parseLong; + +Clazz_overrideMethod(Long,"$valueOf", +function(s){ +return new Long(s); +}); +/* +Clazz_defineMethod(Long,"$valueOf", +function(s){ +return new Long(s); +},"Number"); + +Clazz_defineMethod(Long,"$valueOf", +function(s,r){ +return new Long(Long.parseLong(s,r)); +},"String, Number"); +*/ +Long.$valueOf=Long.prototype.$valueOf; +Clazz_overrideMethod(Long,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Long)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Long.toHexString=Long.prototype.toHexString=function(i){ +return i.toString(16); +}; +Long.toOctalString=Long.prototype.toOctalString=function(i){ +return i.toString(8); +}; +Long.toBinaryString=Long.prototype.toBinaryString=function(i){ +return i.toString(2); +}; + + +Long.decode=Clazz_defineMethod(Long,"decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n)) + throw new NumberFormatException("Invalid Long"); + return new Long(n); +},"~S"); + +java.lang.Short = Short = function () { +Clazz_instantialize (this, arguments); +}; +Clazz_decorateAsType (Short, "Short", Number, Comparable, null, true); +Short.prototype.valueOf = function () { return 0; }; +Short.toString = Short.prototype.toString = function () { + if (arguments.length != 0) { + return "" + arguments[0]; + } else if (this === Short) { + return "class java.lang.Short"; // Short.class.toString + } + return "" + this.valueOf (); +}; + +Clazz_overrideConstructor(Short, +function (v) { + v == null && (v = 0); + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + v = v.shortValue(); + this.valueOf = function () {return v;}; +}); + + +Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768; +Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767; +Short.TYPE = Short.prototype.TYPE = Short; + +Clazz_defineMethod(Short, "parseShortRadix", +function (s, radix) { +return Integer.parseIntRadix(s, radix).shortValue(); +}, "String, Number"); +Short.parseShortRadix = Short.prototype.parseShortRadix; + +Clazz_defineMethod(Short, "parseShort", +function (s) { +return Short.parseShortRadix (s, 10); +}, "String"); + +Short.parseShort = Short.prototype.parseShort; + +/* +Clazz_defineMethod(Short, "$valueOf", +function (s) { +return new Short(Short.parseShort (s, 10)); +}, "String"); + */ + +Clazz_overrideMethod(Short, "$valueOf", +function (s) { +return new Short(s); +}); + +/* +Clazz_defineMethod(Short, "$valueOf", +function (s, r) { +return new Short(Short.parseShort (s, r)); +}, "String, Number"); + */ + +Short.$valueOf = Short.prototype.$valueOf; +Clazz_overrideMethod(Short, "equals", +function (s) { +if(s == null || !Clazz_instanceOf(s, Short) ){ + return false; +} +return s.valueOf() == this.valueOf(); +}, "Object"); +Short.toHexString = Short.prototype.toHexString = function (i) { + return i.toString (16); +}; +Short.toOctalString = Short.prototype.toOctalString = function (i) { + return i.toString (8); +}; +Short.toBinaryString = Short.prototype.toBinaryString = function (i) { + return i.toString (2); +}; +Short.decode = Clazz_defineMethod(Short, "decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < -32768|| n > 32767) + throw new NumberFormatException("Invalid Short"); + return new Short(n); +}, "~S"); + +java.lang.Byte=Byte=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Byte,"Byte",Number,Comparable,null,true); +Byte.prototype.valueOf=function(){return 0;}; +Byte.toString=Byte.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +}else if(this===Byte){ +return"class java.lang.Byte"; +} +return""+this.valueOf(); +}; +Clazz_makeConstructor(Byte, +function(v){ + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + v = v.byteValue(); +this.valueOf=function(){ +return v; +}; +}); + +Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828; +Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128; +Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127; +Byte.SIZE=Byte.prototype.SIZE=8; +Byte.TYPE=Byte.prototype.TYPE=Byte; + +Clazz_defineMethod(Byte,"parseByteRadix", +function(s,radix){ + return Integer.parseIntRadix(s, radix).byteValue(); +},"String, Number"); +Byte.parseByteRadix=Byte.prototype.parseByteRadix; + +Clazz_defineMethod(Byte,"parseByte", +function(s){ +return Byte.parseByte(s,10); +},"String"); + +Byte.parseByte=Byte.prototype.parseByte; + +Clazz_overrideMethod(Byte, "$valueOf", +function (s) { +return new Byte(s); +}); + +Byte.$valueOf=Byte.prototype.$valueOf; +Clazz_overrideMethod(Byte,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Byte)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Byte.toHexString=Byte.prototype.toHexString=function(i){ +return i.toString(16); +}; +Byte.toOctalString=Byte.prototype.toOctalString=function(i){ +return i.toString(8); +}; +Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){ +return i.toString(2); +}; +Byte.decode=Clazz_defineMethod(Byte,"decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < -128|| n > 127) + throw new NumberFormatException("Invalid Byte"); +return new Byte(n); +},"~S"); + +Clazz._floatToString = function(f) { + var s = ""+f + if (s.indexOf(".") < 0 && s.indexOf("e") < 0) + s += ".0"; + return s; +} + +java.lang.Float=Float=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Float,"Float",Number,Comparable,null,true); +Float.prototype.valueOf=function(){return 0;}; +Float.toString=Float.prototype.toString=function(){ +if(arguments.length!=0){ +return Clazz._floatToString(arguments[0]); +}else if(this===Float){ +return"class java.lang.Float"; +} +return Clazz._floatToString(this.valueOf()); +}; + +Clazz_overrideConstructor(Float, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Number(v); + this.valueOf=function(){return v;} +}); + +Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028; +Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38; +Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45; +Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; +Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; +Float.NaN=Number.NaN; +Float.TYPE=Float.prototype.TYPE=Float; + +Clazz_defineMethod(Float,"parseFloat", +function(s){ +if(s==null){ +throw new NumberFormatException("null"); +} +if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here +var floatVal=Number(s); +if(isNaN(floatVal)){ +throw new NumberFormatException("Not a Number : "+s); +} +return floatVal; +},"String"); +Float.parseFloat=Float.prototype.parseFloat; + +Clazz_overrideMethod(Float,"$valueOf", +function(s){ +return new Float(s); +}); + +Float.$valueOf=Float.prototype.$valueOf; + +Clazz_defineMethod(Float,"isNaN", +function(num){ +return isNaN(num); +},"Number"); +Float.isNaN=Float.prototype.isNaN; +Clazz_defineMethod(Float,"isInfinite", +function(num){ +return!isFinite(num); +},"Number"); +Float.isInfinite=Float.prototype.isInfinite; + +Clazz_overrideMethod(Float,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Float)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); + +java.lang.Double=Double=function(){ +Clazz_instantialize(this,arguments); +}; +Clazz_decorateAsType(Double,"Double",Number,Comparable,null,true); +Double.prototype.valueOf=function(){return 0;}; +Double.toString=Double.prototype.toString=function(){ +if(arguments.length!=0){ +return Clazz._floatToString(arguments[0]); +}else if(this===Double){ +return"class java.lang.Double"; +} +return Clazz._floatToString(this.valueOf()); +}; + +Clazz_overrideConstructor(Double, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Double.parseDouble(v); + this.valueOf=function(){return v;}; +}); // BH + +Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468; +Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324; +Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308; +Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; +Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; +Double.NaN=Number.NaN; +Double.TYPE=Double.prototype.TYPE=Double; + +Clazz_defineMethod(Double,"isNaN", +function(num){ +return isNaN(num); +},"Number"); +Double.isNaN=Double.prototype.isNaN; +Clazz_defineMethod(Double,"isInfinite", +function(num){ +return!isFinite(num); +},"Number"); +Double.isInfinite=Double.prototype.isInfinite; + +Clazz_defineMethod(Double,"parseDouble", +function(s){ +if(s==null){ +throw new NumberFormatException("null"); +} +if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here +var doubleVal=Number(s); +if(isNaN(doubleVal)){ +throw new NumberFormatException("Not a Number : "+s); +} +return doubleVal; +},"String"); +Double.parseDouble=Double.prototype.parseDouble; + +/* +Clazz_defineMethod(Double,"$valueOf", +function(s){ +return new Double(this.parseDouble(s)); +},"String"); +*/ + +Clazz_defineMethod(Double,"$valueOf", +function(v){ +return new Double(v); +},"Number"); + +Double.$valueOf=Double.prototype.$valueOf; + +Clazz_overrideMethod(Double,"equals", +function(s){ +if(s==null||!Clazz_instanceOf(s,Double)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); + + +//java.lang.B00lean = Boolean; ?? BH why this? +Boolean = java.lang.Boolean = Boolean || function () {Clazz_instantialize (this, arguments);}; +if (Clazz._supportsNativeObject) { + for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) { + var p = Clazz._extendedObjectMethods[i]; + Boolean.prototype[p] = Clazz._O.prototype[p]; + } +} +Boolean.__CLASS_NAME__="Boolean"; +Clazz_implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]); +Boolean.equals=Clazz._innerFunctions.equals; +Boolean.getName=Clazz._innerFunctions.getName; +Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530; + +//Clazz_makeConstructor(Boolean, +//function(value){ +//this.valueOf=function(){ +//return value; +//}; +//},"~B"); + +Clazz_overrideConstructor(Boolean, +function(s){ + var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false); + this.valueOf=function(){return b;}; +},"~O"); + +Boolean.parseBoolean=Clazz_defineMethod(Boolean,"parseBoolean", +function(s){ +return Boolean.toBoolean(s); +},"~S"); +Clazz_defineMethod(Boolean,"booleanValue", +function(){ +return this.valueOf(); +}); +Boolean.$valueOf=Clazz_overrideMethod(Boolean,"$valueOf", +function(b){ +return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE); +}); + +/* +Boolean.toString=Clazz_defineMethod(Boolean,"toString", +function(b){ +return b?"true":"false"; +},"~B"); +*/ + +Clazz_overrideMethod(Boolean,"toString", +function(){ +return this.valueOf()?"true":"false"; +}); +Clazz_overrideMethod(Boolean,"hashCode", +function(){ +return this.valueOf()?1231:1237; +}); +Clazz_overrideMethod(Boolean,"equals", +function(obj){ +if(Clazz_instanceOf(obj,Boolean)){ +return this.booleanValue()==obj.booleanValue(); +}return false; +},"~O"); +Boolean.getBoolean=Clazz_defineMethod(Boolean,"getBoolean", +function(name){ +var result=false; +try{ +result=Boolean.toBoolean(System.getProperty(name)); +}catch(e){ +if(Clazz_instanceOf(e,IllegalArgumentException)){ +}else if(Clazz_instanceOf(e,NullPointerException)){ +}else{ +throw e; +} +} +return result; +},"~S"); +Clazz_overrideMethod(Boolean,"compareTo", +function(b){ +return(b.value==this.value?0:(this.value?1:-1)); +},"Boolean"); +Boolean.toBoolean=Clazz_defineMethod(Boolean,"toBoolean", +($fz=function(name){ +return((name!=null)&&name.equalsIgnoreCase("true")); +},$fz.isPrivate=true,$fz),"~S"); +Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true); +Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false); +Boolean.TYPE=Boolean.prototype.TYPE=Boolean; + + +Clazz._Encoding=new Object(); + +(function(Encoding) { + +Encoding.UTF8="utf-8"; +Encoding.UTF16="utf-16"; +Encoding.ASCII="ascii"; + + +Encoding.guessEncoding=function(str){ +if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){ +return Encoding.UTF8; +}else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){ +return Encoding.UTF16; +}else{ +return Encoding.ASCII; +} +}; + +Encoding.readUTF8=function(str){ +var encoding=this.guessEncoding(str); +var startIdx=0; +if(encoding==Encoding.UTF8){ +startIdx=3; +}else if(encoding==Encoding.UTF16){ +startIdx=2; +} +var arrs=new Array(); +for(var i=startIdx;i0xc0&&charCode<0xe0){ +var c1=charCode&0x1f; +i++; +var c2=str.charCodeAt(i)&0x3f; +var c=(c1<<6)+c2; +arrs[arrs.length]=String.fromCharCode(c); +}else if(charCode>=0xe0){ +var c1=charCode&0x0f; +i++; +var c2=str.charCodeAt(i)&0x3f; +i++; +var c3=str.charCodeAt(i)&0x3f; +var c=(c1<<12)+(c2<<6)+c3; +arrs[arrs.length]=String.fromCharCode(c); +} +} +return arrs.join(''); +}; + +Encoding.convert2UTF8=function(str){ +var encoding=this.guessEncoding(str); +var startIdx=0; +if(encoding==Encoding.UTF8){ +return str; +}else if(encoding==Encoding.UTF16){ +startIdx=2; +} + +var offset=0; +var arrs=new Array(offset+str.length-startIdx); + +for(var i=startIdx;i>6); +var c2=0x80+(charCode&0x003f); +arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2); +}else{ +var c1=0xe0+((charCode&0xf000)>>12); +var c2=0x80+((charCode&0x0fc0)>>6); +var c3=0x80+(charCode&0x003f); +arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3); +} +} +return arrs.join(''); +}; +Encoding.base64Chars=new Array( +'A','B','C','D','E','F','G','H', +'I','J','K','L','M','N','O','P', +'Q','R','S','T','U','V','W','X', +'Y','Z','a','b','c','d','e','f', +'g','h','i','j','k','l','m','n', +'o','p','q','r','s','t','u','v', +'w','x','y','z','0','1','2','3', +'4','5','6','7','8','9','+','/' +); +Encoding.encodeBase64=function(str){ +if(str==null||str.length==0)return str; +var b64=Encoding.base64Chars; +var length=str.length; +var index=0; +var buf=[]; +var c0,c1,c2; +while(index>2]; +if(index>4)]; +if(index>6)]; +buf[buf.length]=b64[c2&0x3F]; +}else{ +buf[buf.length]=b64[((c1<<2)&0x3c)]; +buf[buf.length]='='; +} +}else{ +buf[buf.length]=b64[(c0<<4)&0x30]; +buf[buf.length]='='; +buf[buf.length]='='; +} +} +return buf.join(''); +}; +Encoding.decodeBase64=function(str){ +if(str==null||str.length==0)return str; +var b64=Encoding.base64Chars; +var xb64=Encoding.xBase64Chars; +if(Encoding.xBase64Chars==null){ +xb64=new Object(); +for(var i=0;i>4); +if(c2!=null){ +buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2); +if(c3!=null){ +buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3); +} +} +} +return buf.join(''); +}; + +if(String.prototype.$replace==null){ +java.lang.String=String; +if(Clazz._supportsNativeObject){ +for(var i=0;i= 0) c1 = "\\" + c1; + } else { + c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;}); + } + return this.replace(new RegExp(c1,"gm"),c2); +}; +sp.$generateExpFunction=function(str){ +var arr=[]; +var orders=[]; +var idx=0; +arr[0]=""; +var i=0; +for(;ithis.length-len)|| +(ooffset>other.length-len)){ +return false; +} +var s1=this.substring(toffset,toffset+len); +var s2=other.substring(ooffset,ooffset+len); +if(ignoreCase){ +s1=s1.toLowerCase(); +s2=s2.toLowerCase(); +} +return s1==s2; +}; + + + +sp.$plit=function(regex,limit){ +if (!limit && regex == " ") + return this.split(regex); + +if(limit!=null&&limit>0){ +if(limit==1){ +return this; +} +var regExp=new RegExp("("+regex+")","gm"); +var count=1; +var s=this.replace(regExp,function($0,$1){ +count++; +if(count==limit){ +return"@@_@@"; +}else if(count>limit){ +return $0; +}else{ +return $0; +} +}); +regExp=new RegExp(regex,"gm"); +var arr=this.split(regExp); +if(arr.length>limit){ +arr[limit-1]=s.substring(s.indexOf("@@_@@")+5); +arr.length=limit; +} +return arr; +}else{ +var regExp=new RegExp(regex,"gm"); +return this.split(regExp); +} +}; +/* +sp.trim=function(){ +var len=this.length; +var st=0; + +while((st0)||(lens.length-pc)){ +return false; +} +while(--pc>=0){ +if(s.charAt(to++)!=prefix.charAt(po++)){ +return false; +} +} +return true; +}; + +sp.startsWith=function(prefix){ +if(arguments.length==1){ +return sn(this,arguments[0],0); +}else if(arguments.length==2){ +return sn(this,arguments[0],arguments[1]); +}else{ +return false; +} +}; + +sp.endsWith=function(suffix){ +return sn(this, suffix,this.length-suffix.length); +}; + +} + +sp.equals=function(anObject){ +return this.valueOf()==anObject; +}; + +sp.equalsIgnoreCase=function(anotherString){ +return(anotherString==null)?false:(this==anotherString +||this.toLowerCase()==anotherString.toLowerCase()); +}; + + +sp.hash=0; + +sp.hashCode=function(){ +var h=this.hash; +if(h==0){ +var off=0; +var len=this.length; +for(var i=0;i255){ +arrs[ii]=0x1a; +arrs[ii+1]=c&0xff; +arrs[ii+2]=(c&0xff00)>>8; +ii+=2; +}else{ +arrs[ii]=c; +} +ii++; +} +return arrs; +}; + +/* +sp.compareTo=function(anotherString){ +if(anotherString==null){ +throw new java.lang.NullPointerException(); +} +var len1=this.length; +var len2=anotherString.length; +var n=Math.min(len1,len2); +var k=0; +while(k= 0} // bh added +sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added + + + +sp.toCharArray=function(){ +var result=new Array(this.length); +for(var i=0;is2){ +return 1; +}else{ +return-1; +} +} +}; + +sp.contentEquals=function(sb){ +if(this.length!=sb.length()){ +return false; +} +var v=sb.getValue(); +var i=0; +var j=0; +var n=this.length; +while(n--!=0){ +if(this.charCodeAt(i++)!=v[j++]){ +return false; +} +} +return true; +}; + +sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){ +if(srcBegin<0){ +throw new StringIndexOutOfBoundsException(srcBegin); +} +if(srcEnd>this.length){ +throw new StringIndexOutOfBoundsException(srcEnd); +} +if(srcBegin>srcEnd){ +throw new StringIndexOutOfBoundsException(srcEnd-srcBegin); +} +if(dst==null){ +throw new NullPointerException(); +} +for(var i=0;i=sourceCount){ +return(targetCount==0?sourceCount:-1); +} +if(fromIndex<0){ +fromIndex=0; +} +if(targetCount==0){ +return fromIndex; +} + +var first=target[targetOffset]; +var i=sourceOffset+fromIndex; +var max=sourceOffset+(sourceCount-targetCount); + +startSearchForFirstChar: +while(true){ + +while(i<=max&&source[i]!=first){ +i++; +} +if(i>max){ +return-1; +} + + +var j=i+1; +var end=j+targetCount-1; +var k=targetOffset+1; +while(j0&&typeof x[0]=="number"){ +var arr=new Array(x.length); +for(var i=0;ibytes.length){ +throw new IndexOutOfBoundsException(); +} +if(length>0){ +var isChar=(bytes[offset].length!=null); +if(isChar){ +for(var i=0;i0;){ +value[i]=String.fromCharCode(bytes[i+offset]&0xff); +} +}else{ +hibyte<<=8; +for(var i=count;i-->0;){ +value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); +} +} +return value.join(''); +} +}else{ +var s=""; +for(var i=0;ibytes.length){ + throw new IndexOutOfBoundsException(); + } + if(length>0){ + var isChar=(bytes[offset].length!=null); + if(isChar){ + for(var i=0;i0;){ + value[i]=String.fromCharCode(bytes[i+offset]&0xff); + } + }else{ + hibyte<<=8; + for(var i=count;i-->0;){ + value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); + } + } + return value.join(''); +default: + var s=""; + for(var i=0;i= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680 + || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000)); +},"~N"); +c$.isLetter=Clazz_defineMethod(c$,"isLetter", +function(c){ +c = c.charCodeAt(0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122); +},"~N"); +c$.isLetterOrDigit=Clazz_defineMethod(c$,"isLetterOrDigit", +function(c){ +c = c.charCodeAt(0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); +},"~N"); +c$.isSpaceChar=Clazz_defineMethod(c$,"isSpaceChar", +function(c){ + var i = c.charCodeAt(0); +if(i==0x20||i==0xa0||i==0x1680)return true; +if(i<0x2000)return false; +return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000; +},"~N"); +c$.digit=Clazz_defineMethod(c$,"digit", +function(c,radix){ +var i = c.charCodeAt(0); +if(radix >= 2 && radix <= 36){ + if(i < 128){ + var result = -1; + if(48 <= i && i <= 57){ + result = i - 48; + }else if(97 <= i && i <= 122){ + result = i - 87; + }else if(65 <= i && i <= 90){ + result=i-(55); + } + return (result < radix ? result : -1); + } +} +return -1; +},"~N,~N"); +Clazz_overrideMethod(c$,"toString", +function(){ +var buf=[this.value]; +return String.valueOf(buf); +}); +c$.toString=Clazz_overrideMethod(c$,"toString", +function(c){ +{ +if(this===Character){ +return"class java.lang.Character"; +} +}return String.valueOf(c); +},"~N"); +Clazz_defineStatics(c$, +"MIN_VALUE",'\u0000', +"MAX_VALUE",'\uffff', +"MIN_RADIX",2, +"MAX_RADIX",36, +"TYPE",null); + +java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character; + + + +Clazz._ArrayWrapper = function(a, type) { + return { + a: a, + __CLASS_NAME__:"Array", + superClazz: Array, + getComponentType: function() {return type}, + instanceOf: function(o) { return Clazz_instanceOf(type, o) }, + getName: function() { return this.__CLASS_NAME__ } + }; +} +c$=Clazz_declareType(java.lang.reflect,"Array"); +c$.newInstance=Clazz_defineMethod(c$,"newInstance", +function(componentType,size){ +var a = Clazz_newArray(size); + a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);}; +return a; +},"Class,~N"); + +javautil.Date=Date; +Date.TYPE="javautil.Date"; +Date.__CLASS_NAME__="Date"; +Clazz_implementOf(Date,[java.io.Serializable,java.lang.Comparable]); + +Clazz_defineMethod(javautil.Date,"clone", +function(){ +return new Date(this.getTime()); +}); + +Clazz_defineMethod(javautil.Date,"before", +function(when){ +return this.getTime()when.getTime(); +},"javautil.Date"); +Clazz_defineMethod(javautil.Date,"equals", +function(obj){ +return Clazz_instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime(); +},"Object"); +Clazz_defineMethod(javautil.Date,"compareTo", +function(anotherDate){ +var thisTime=this.getTime(); +var anotherTime=anotherDate.getTime(); +return(thisTime>32)); +}); + +c$=Clazz_decorateAsClass(function(){ +this.source=null; +Clazz_instantialize(this,arguments); +},javautil,"EventObject",null,java.io.Serializable); +Clazz_makeConstructor(c$, +function(source){ +if(source!=null)this.source=source; +else throw new IllegalArgumentException(); +},"~O"); +Clazz_defineMethod(c$,"getSource", +function(){ +return this.source; +}); +Clazz_overrideMethod(c$,"toString", +function(){ +return this.getClass().getName()+"[source="+String.valueOf(this.source)+']'; +}); +Clazz_declareInterface(javautil,"EventListener"); + +c$=Clazz_decorateAsClass(function(){ +this.listener=null; +Clazz_instantialize(this,arguments); +},javautil,"EventListenerProxy",null,javautil.EventListener); +Clazz_makeConstructor(c$, +function(listener){ +this.listener=listener; +},"javautil.EventListener"); +Clazz_defineMethod(c$,"getListener", +function(){ +return this.listener; +}); +Clazz_declareInterface(javautil,"Iterator"); + +Clazz_declareInterface(javautil,"ListIterator",javautil.Iterator); +Clazz_declareInterface(javautil,"Enumeration"); +Clazz_declareInterface(javautil,"Collection",Iterable); + +Clazz_declareInterface(javautil,"Set",javautil.Collection); +Clazz_declareInterface(javautil,"Map"); +Clazz_declareInterface(javautil.Map,"Entry"); + +Clazz_declareInterface(javautil,"List",javautil.Collection); + +Clazz_declareInterface(javautil,"Queue",javautil.Collection); +Clazz_declareInterface(javautil,"RandomAccess"); +c$=Clazz_decorateAsClass(function(){ +this.detailMessage=null; +this.cause=null; +this.stackTrace=null; +Clazz_instantialize(this,arguments); +},java.lang,"Throwable",null,java.io.Serializable); +Clazz_prepareFields(c$,function(){ +this.cause=this; +//alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller) +}); +Clazz_makeConstructor(c$, +function(){ +this.fillInStackTrace(); +}); +Clazz_makeConstructor(c$, +function(message){ +this.fillInStackTrace(); +this.detailMessage=message; +},"~S"); +Clazz_makeConstructor(c$, +function(message,cause){ +this.fillInStackTrace(); +this.detailMessage=message; +this.cause=cause; +},"~S,Throwable"); +Clazz_makeConstructor(c$, +function(cause){ +this.fillInStackTrace(); +this.detailMessage=(cause==null?null:cause.toString()); +this.cause=cause; +},"Throwable"); +Clazz_defineMethod(c$,"getMessage", +function(){ +return (this.message || this.detailMessage || this.toString()); +}); +Clazz_defineMethod(c$,"getLocalizedMessage", +function(){ +return this.getMessage(); +}); +Clazz_defineMethod(c$,"getCause", +function(){ +return(this.cause===this?null:this.cause); +}); +Clazz_defineMethod(c$,"initCause", +function(cause){ +if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause"); +if(cause===this)throw new IllegalArgumentException("Self-causation not permitted"); +this.cause=cause; +return this; +},"Throwable"); +Clazz_overrideMethod(c$,"toString", +function(){ +var s=this.getClass().getName(); +var message=this.message || this.detailMessage; +return(message ? s+": "+message : s); +}); +Clazz_defineMethod(c$,"printStackTrace", +function(){ +System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz_getStackTrace()); +}); + +Clazz_defineMethod(c$,"getStackTrace", +function(){ +var s = "" + this + "\n"; +for(var i=0;i-1||caller!=null){ +var clazzName=null; +var nativeClass=null; +if(!noLooping||caller==Clazz_tryToSearchAndExecute||caller==Clazz_superCall||caller==null){ +if(index<0){ +break; +} +noLooping=true; +superCaller=Clazz._callingStackTraces[index].caller; +nativeClass=Clazz._callingStackTraces[index].owner; +index--; +}else{ +superCaller=caller; +if(superCaller.claxxOwner!=null){ +nativeClass=superCaller.claxxOwner; +}else if(superCaller.exClazz!=null){ +nativeClass=superCaller.exClazz; +} +} +var st=new StackTraceElement( +((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)? +nativeClass.__CLASS_NAME__:"anonymous"), +((superCaller.exName==null)?"anonymous":superCaller.exName) ++" ("+Clazz_getParamsType(superCaller.arguments)+")", +null,-1); +st.nativeClazz=nativeClass; +this.stackTrace[this.stackTrace.length]=st; +for(var i=0;i":this.declaringClass; +}); +Clazz_defineMethod(c$,"getFileName", +function(){ +return this.fileName; +}); +Clazz_defineMethod(c$,"getLineNumber", +function(){ +return this.lineNumber; +}); +Clazz_defineMethod(c$,"getMethodName", +function(){ +return(this.methodName==null)?"":this.methodName; +}); +Clazz_overrideMethod(c$,"hashCode", +function(){ +if(this.methodName==null){ +return 0; +}return this.methodName.hashCode()^this.declaringClass.hashCode(); +}); +Clazz_defineMethod(c$,"isNativeMethod", +function(){ +return this.lineNumber==-2; +}); +Clazz_overrideMethod(c$,"toString", +function(){ +var buf=new StringBuilder(80); +buf.append(this.getClassName()); +buf.append('.'); +buf.append(this.getMethodName()); +if(this.isNativeMethod()){ +buf.append("(Native Method)"); +}else{ +var fName=this.getFileName(); +if(fName==null){ +buf.append("(Unknown Source)"); +}else{ +var lineNum=this.getLineNumber(); +buf.append('('); +buf.append(fName); +if(lineNum>=0){ +buf.append(':'); +buf.append(lineNum); +}buf.append(')'); +}}return buf.toString(); +}); +TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz_getStackTrace())}); +c$=Clazz_declareType(java.lang,"Error",Throwable); + +c$=Clazz_declareType(java.lang,"LinkageError",Error); + +c$=Clazz_declareType(java.lang,"IncompatibleClassChangeError",LinkageError); + +c$=Clazz_declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"AssertionError",Error); +Clazz_makeConstructor(c$, +function(detailMessage){ +Clazz_superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz_instanceOf(detailMessage,Throwable)?detailMessage:null)]); +},"~O"); +Clazz_makeConstructor(c$, +function(detailMessage){ +this.construct("" + detailMessage); +},"~B"); +Clazz_makeConstructor(c$, +function(detailMessage){ +this.construct("" + detailMessage); +},"~N"); + +c$=Clazz_declareType(java.lang,"ClassCircularityError",LinkageError); + +c$=Clazz_declareType(java.lang,"ClassFormatError",LinkageError); + +c$=Clazz_decorateAsClass(function(){ +this.exception=null; +Clazz_instantialize(this,arguments); +},java.lang,"ExceptionInInitializerError",LinkageError); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,ExceptionInInitializerError); +this.initCause(null); +}); +Clazz_makeConstructor(c$, +function(detailMessage){ +Clazz_superConstructor(this,ExceptionInInitializerError,[detailMessage]); +this.initCause(null); +},"~S"); +Clazz_makeConstructor(c$, +function(exception){ +Clazz_superConstructor(this,ExceptionInInitializerError); +this.exception=exception; +this.initCause(exception); +},"Throwable"); +Clazz_defineMethod(c$,"getException", +function(){ +return this.exception; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.exception; +}); + +c$=Clazz_declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"InstantiationError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"VirtualMachineError",Error); + +c$=Clazz_declareType(java.lang,"InternalError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"NoClassDefFoundError",LinkageError); + +c$=Clazz_declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError); + +c$=Clazz_declareType(java.lang,"OutOfMemoryError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"StackOverflowError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"UnknownError",VirtualMachineError); + +c$=Clazz_declareType(java.lang,"UnsatisfiedLinkError",LinkageError); + +c$=Clazz_declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError); + +c$=Clazz_declareType(java.lang,"VerifyError",LinkageError); + +c$=Clazz_declareType(java.lang,"ThreadDeath",Error); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,ThreadDeath,[]); +}); + +c$=Clazz_declareType(java.lang,"Exception",Throwable); + +c$=Clazz_declareType(java.lang,"RuntimeException",Exception); + +c$=Clazz_declareType(java.lang,"ArithmeticException",RuntimeException); + +c$=Clazz_declareType(java.lang,"IndexOutOfBoundsException",RuntimeException); + +c$=Clazz_declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException); +Clazz_makeConstructor(c$, +function(index){ +Clazz_superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]); +},"~N"); + +c$=Clazz_declareType(java.lang,"ArrayStoreException",RuntimeException); + +c$=Clazz_declareType(java.lang,"ClassCastException",RuntimeException); + +c$=Clazz_decorateAsClass(function(){ +this.ex=null; +Clazz_instantialize(this,arguments); +},java.lang,"ClassNotFoundException",Exception); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,ClassNotFoundException,[Clazz_castNullAs("Throwable")]); +}); +Clazz_makeConstructor(c$, +function(detailMessage){ +Clazz_superConstructor(this,ClassNotFoundException,[detailMessage,null]); +},"~S"); +Clazz_makeConstructor(c$, +function(detailMessage,exception){ +Clazz_superConstructor(this,ClassNotFoundException,[detailMessage]); +this.ex=exception; +},"~S,Throwable"); +Clazz_defineMethod(c$,"getException", +function(){ +return this.ex; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.ex; +}); + +c$=Clazz_declareType(java.lang,"CloneNotSupportedException",Exception); + +c$=Clazz_declareType(java.lang,"IllegalAccessException",Exception); + +c$=Clazz_declareType(java.lang,"IllegalArgumentException",RuntimeException); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_declareType(java.lang,"IllegalMonitorStateException",RuntimeException); + +c$=Clazz_declareType(java.lang,"IllegalStateException",RuntimeException); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException); + +c$=Clazz_declareType(java.lang,"InstantiationException",Exception); + +c$=Clazz_declareType(java.lang,"InterruptedException",Exception); + +c$=Clazz_declareType(java.lang,"NegativeArraySizeException",RuntimeException); + +c$=Clazz_declareType(java.lang,"NoSuchFieldException",Exception); + +c$=Clazz_declareType(java.lang,"NoSuchMethodException",Exception); + +c$=Clazz_declareType(java.lang,"NullPointerException",RuntimeException); + +c$=Clazz_declareType(java.lang,"NumberFormatException",IllegalArgumentException); + +c$=Clazz_declareType(java.lang,"SecurityException",RuntimeException); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException); +Clazz_makeConstructor(c$, +function(index){ +Clazz_superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]); +},"~N"); + +c$=Clazz_declareType(java.lang,"UnsupportedOperationException",RuntimeException); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,UnsupportedOperationException,[]); +}); +Clazz_makeConstructor(c$, +function(cause){ +Clazz_superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz_decorateAsClass(function(){ +this.target=null; +Clazz_instantialize(this,arguments); +},java.lang.reflect,"InvocationTargetException",Exception); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz_castNullAs("Throwable")]); +}); +Clazz_makeConstructor(c$, +function(exception){ +Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]); +this.target=exception; +},"Throwable"); +Clazz_makeConstructor(c$, +function(exception,detailMessage){ +Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]); +this.target=exception; +},"Throwable,~S"); +Clazz_defineMethod(c$,"getTargetException", +function(){ +return this.target; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.target; +}); + +c$=Clazz_decorateAsClass(function(){ +this.undeclaredThrowable=null; +Clazz_instantialize(this,arguments); +},java.lang.reflect,"UndeclaredThrowableException",RuntimeException); +Clazz_makeConstructor(c$, +function(exception){ +Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException); +this.undeclaredThrowable=exception; +this.initCause(exception); +},"Throwable"); +Clazz_makeConstructor(c$, +function(exception,detailMessage){ +Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]); +this.undeclaredThrowable=exception; +this.initCause(exception); +},"Throwable,~S"); +Clazz_defineMethod(c$,"getUndeclaredThrowable", +function(){ +return this.undeclaredThrowable; +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.undeclaredThrowable; +}); + +c$=Clazz_declareType(java.io,"IOException",Exception); + + +c$=Clazz_declareType(java.io,"CharConversionException",java.io.IOException); + +c$=Clazz_declareType(java.io,"EOFException",java.io.IOException); + +c$=Clazz_declareType(java.io,"FileNotFoundException",java.io.IOException); + +c$=Clazz_decorateAsClass(function(){ +this.bytesTransferred=0; +Clazz_instantialize(this,arguments); +},java.io,"InterruptedIOException",java.io.IOException); + +c$=Clazz_declareType(java.io,"ObjectStreamException",java.io.IOException); + +c$=Clazz_decorateAsClass(function(){ +this.classname=null; +Clazz_instantialize(this,arguments); +},java.io,"InvalidClassException",java.io.ObjectStreamException); +Clazz_makeConstructor(c$, +function(className,detailMessage){ +Clazz_superConstructor(this,java.io.InvalidClassException,[detailMessage]); +this.classname=className; +},"~S,~S"); +Clazz_defineMethod(c$,"getMessage", +function(){ +var msg=Clazz_superCall(this,java.io.InvalidClassException,"getMessage",[]); +if(this.classname!=null){ +msg=this.classname+';' + ' '+msg; +}return msg; +}); + +c$=Clazz_declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"NotActiveException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"NotSerializableException",java.io.ObjectStreamException); + +c$=Clazz_decorateAsClass(function(){ +this.eof=false; +this.length=0; +Clazz_instantialize(this,arguments); +},java.io,"OptionalDataException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException); + +c$=Clazz_declareType(java.io,"SyncFailedException",java.io.IOException); + +c$=Clazz_declareType(java.io,"UnsupportedEncodingException",java.io.IOException); + +c$=Clazz_declareType(java.io,"UTFDataFormatException",java.io.IOException); + +c$=Clazz_decorateAsClass(function(){ +this.detail=null; +Clazz_instantialize(this,arguments); +},java.io,"WriteAbortedException",java.io.ObjectStreamException); +Clazz_makeConstructor(c$, +function(detailMessage,rootCause){ +Clazz_superConstructor(this,java.io.WriteAbortedException,[detailMessage]); +this.detail=rootCause; +this.initCause(rootCause); +},"~S,Exception"); +Clazz_defineMethod(c$,"getMessage", +function(){ +var msg=Clazz_superCall(this,java.io.WriteAbortedException,"getMessage",[]); +return (this.detail ? msg + "; "+this.detail.toString() : msg); +}); +Clazz_overrideMethod(c$,"getCause", +function(){ +return this.detail; +}); + +c$=Clazz_declareType(javautil,"ConcurrentModificationException",RuntimeException); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,javautil.ConcurrentModificationException,[]); +}); + +c$=Clazz_declareType(javautil,"EmptyStackException",RuntimeException); + +c$=Clazz_decorateAsClass(function(){ +this.className=null; +this.key=null; +Clazz_instantialize(this,arguments); +},javautil,"MissingResourceException",RuntimeException); +Clazz_makeConstructor(c$, +function(detailMessage,className,resourceName){ +Clazz_superConstructor(this,javautil.MissingResourceException,[detailMessage]); +this.className=className; +this.key=resourceName; +},"~S,~S,~S"); +Clazz_defineMethod(c$,"getClassName", +function(){ +return this.className; +}); +Clazz_defineMethod(c$,"getKey", +function(){ +return this.key; +}); + +c$=Clazz_declareType(javautil,"NoSuchElementException",RuntimeException); + +c$=Clazz_declareType(javautil,"TooManyListenersException",Exception); + +c$=Clazz_declareType(java.lang,"Void"); +Clazz_defineStatics(c$, +"TYPE",null); +{ +java.lang.Void.TYPE=java.lang.Void; +}Clazz_declareInterface(java.lang.reflect,"GenericDeclaration"); +Clazz_declareInterface(java.lang.reflect,"AnnotatedElement"); + +c$=Clazz_declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement); +Clazz_makeConstructor(c$, +function(){ +}); +Clazz_defineMethod(c$,"isAccessible", +function(){ +return false; +}); +c$.setAccessible=Clazz_defineMethod(c$,"setAccessible", +function(objects,flag){ +return; +},"~A,~B"); +Clazz_defineMethod(c$,"setAccessible", +function(flag){ +return; +},"~B"); +Clazz_overrideMethod(c$,"isAnnotationPresent", +function(annotationType){ +return false; +},"Class"); +Clazz_overrideMethod(c$,"getDeclaredAnnotations", +function(){ +return new Array(0); +}); +Clazz_overrideMethod(c$,"getAnnotations", +function(){ +return new Array(0); +}); +Clazz_overrideMethod(c$,"getAnnotation", +function(annotationType){ +return null; +},"Class"); +c$.marshallArguments=Clazz_defineMethod(c$,"marshallArguments", +function(parameterTypes,args){ +return null; +},"~A,~A"); +Clazz_defineMethod(c$,"invokeV", +function(receiver,args){ +return; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeL", +function(receiver,args){ +return null; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeI", +function(receiver,args){ +return 0; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeJ", +function(receiver,args){ +return 0; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeF", +function(receiver,args){ +return 0.0; +},"~O,~A"); +Clazz_defineMethod(c$,"invokeD", +function(receiver,args){ +return 0.0; +},"~O,~A"); +c$.emptyArgs=c$.prototype.emptyArgs=new Array(0); +Clazz_declareInterface(java.lang.reflect,"InvocationHandler"); +c$=Clazz_declareInterface(java.lang.reflect,"Member"); +Clazz_defineStatics(c$, +"PUBLIC",0, +"DECLARED",1); + +c$=Clazz_declareType(java.lang.reflect,"Modifier"); +Clazz_makeConstructor(c$, +function(){ +}); +c$.isAbstract=Clazz_defineMethod(c$,"isAbstract", +function(modifiers){ +return((modifiers&1024)!=0); +},"~N"); +c$.isFinal=Clazz_defineMethod(c$,"isFinal", +function(modifiers){ +return((modifiers&16)!=0); +},"~N"); +c$.isInterface=Clazz_defineMethod(c$,"isInterface", +function(modifiers){ +return((modifiers&512)!=0); +},"~N"); +c$.isNative=Clazz_defineMethod(c$,"isNative", +function(modifiers){ +return((modifiers&256)!=0); +},"~N"); +c$.isPrivate=Clazz_defineMethod(c$,"isPrivate", +function(modifiers){ +return((modifiers&2)!=0); +},"~N"); +c$.isProtected=Clazz_defineMethod(c$,"isProtected", +function(modifiers){ +return((modifiers&4)!=0); +},"~N"); +c$.isPublic=Clazz_defineMethod(c$,"isPublic", +function(modifiers){ +return((modifiers&1)!=0); +},"~N"); +c$.isStatic=Clazz_defineMethod(c$,"isStatic", +function(modifiers){ +return((modifiers&8)!=0); +},"~N"); +c$.isStrict=Clazz_defineMethod(c$,"isStrict", +function(modifiers){ +return((modifiers&2048)!=0); +},"~N"); +c$.isSynchronized=Clazz_defineMethod(c$,"isSynchronized", +function(modifiers){ +return((modifiers&32)!=0); +},"~N"); +c$.isTransient=Clazz_defineMethod(c$,"isTransient", +function(modifiers){ +return((modifiers&128)!=0); +},"~N"); +c$.isVolatile=Clazz_defineMethod(c$,"isVolatile", +function(modifiers){ +return((modifiers&64)!=0); +},"~N"); +c$.toString=Clazz_defineMethod(c$,"toString", +function(modifiers){ +var sb=new Array(0); +if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public"; +if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected"; +if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private"; +if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract"; +if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static"; +if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final"; +if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient"; +if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile"; +if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized"; +if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native"; +if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp"; +if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface"; +if(sb.length>0){ +return sb.join(" "); +}return""; +},"~N"); +Clazz_defineStatics(c$, +"PUBLIC",0x1, +"PRIVATE",0x2, +"PROTECTED",0x4, +"STATIC",0x8, +"FINAL",0x10, +"SYNCHRONIZED",0x20, +"VOLATILE",0x40, +"TRANSIENT",0x80, +"NATIVE",0x100, +"INTERFACE",0x200, +"ABSTRACT",0x400, +"STRICT",0x800, +"BRIDGE",0x40, +"VARARGS",0x80, +"SYNTHETIC",0x1000, +"ANNOTATION",0x2000, +"ENUM",0x4000); + +c$=Clazz_decorateAsClass(function(){ +this.clazz=null; +this.parameterTypes=null; +this.exceptionTypes=null; +this.modifiers=0; +Clazz_instantialize(this,arguments); +},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]); +Clazz_makeConstructor(c$, +function(declaringClass,parameterTypes,checkedExceptions,modifiers){ +Clazz_superConstructor(this,java.lang.reflect.Constructor,[]); +this.clazz=declaringClass; +this.parameterTypes=parameterTypes; +this.exceptionTypes=checkedExceptions; +this.modifiers=modifiers; +},"Class,~A,~A,~N"); +Clazz_overrideMethod(c$,"getTypeParameters", +function(){ +return null; +}); +Clazz_defineMethod(c$,"toGenericString", +function(){ +return null; +}); +Clazz_defineMethod(c$,"getGenericParameterTypes", +function(){ +return null; +}); +Clazz_defineMethod(c$,"getGenericExceptionTypes", +function(){ +return null; +}); +Clazz_defineMethod(c$,"getParameterAnnotations", +function(){ +return null; +}); +Clazz_defineMethod(c$,"isVarArgs", +function(){ +return false; +}); +Clazz_overrideMethod(c$,"isSynthetic", +function(){ +return false; +}); +Clazz_overrideMethod(c$,"equals", +function(object){ +if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Constructor)){ +var other=object; +if(this.getDeclaringClass()===other.getDeclaringClass()){ +var params1=this.parameterTypes; +var params2=other.parameterTypes; +if(params1.length==params2.length){ +for(var i=0;i 0.0) { +allzero = false; +} else if (d < 0.0) { +throw new IllegalArgumentException ("negative dash length"); +}} +if (allzero) { +throw new IllegalArgumentException ("dash lengths all zero"); +}}this.width = width; +this.cap = cap; +this.join = join; +this.miterlimit = miterlimit; +if (dash != null) { +this.dash = dash.clone (); +}this.dash_phase = dash_phase; +}, "~N,~N,~N,~N,~A,~N"); +Clazz_makeConstructor (c$, +function (width, cap, join, miterlimit) { +this.construct (width, cap, join, miterlimit, null, 0.0); +}, "~N,~N,~N,~N"); +Clazz_makeConstructor (c$, +function (width, cap, join) { +this.construct (width, cap, join, 10.0, null, 0.0); +}, "~N,~N,~N"); +Clazz_makeConstructor (c$, +function (width) { +this.construct (width, 2, 0, 10.0, null, 0.0); +}, "~N"); +Clazz_makeConstructor (c$, +function () { +this.construct (1.0, 2, 0, 10.0, null, 0.0); +}); +Clazz_overrideMethod (c$, "createStrokedShape", +function (s) { +return s; +}, "java.awt.Shape"); +Clazz_defineMethod (c$, "getLineWidth", +function () { +return this.width; +}); +Clazz_defineMethod (c$, "getEndCap", +function () { +return this.cap; +}); +Clazz_defineMethod (c$, "getLineJoin", +function () { +return this.join; +}); +Clazz_defineMethod (c$, "getMiterLimit", +function () { +return this.miterlimit; +}); +Clazz_defineMethod (c$, "getDashArray", +function () { +if (this.dash == null) { +return null; +}return this.dash.clone (); +}); +Clazz_defineMethod (c$, "getDashPhase", +function () { +return this.dash_phase; +}); +Clazz_overrideMethod (c$, "hashCode", +function () { +var hash = Float.floatToIntBits (this.width); +hash = hash * 31 + this.join; +hash = hash * 31 + this.cap; +hash = hash * 31 + Float.floatToIntBits (this.miterlimit); +if (this.dash != null) { +hash = hash * 31 + Float.floatToIntBits (this.dash_phase); +for (var i = 0; i < this.dash.length; i++) { +hash = hash * 31 + Float.floatToIntBits (this.dash[i]); +} +}return hash; +}); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (!(Clazz_instanceOf (obj, java.awt.BasicStroke))) { +return false; +}var bs = obj; +if (this.width != bs.width) { +return false; +}if (this.join != bs.join) { +return false; +}if (this.cap != bs.cap) { +return false; +}if (this.miterlimit != bs.miterlimit) { +return false; +}if (this.dash != null) { +if (this.dash_phase != bs.dash_phase) { +return false; +}if (!java.util.Arrays.equals (this.dash, bs.dash)) { +return false; +}} else if (bs.dash != null) { +return false; +}return true; +}, "~O"); +Clazz_defineStatics (c$, +"JOIN_MITER", 0, +"JOIN_ROUND", 1, +"JOIN_BEVEL", 2, +"CAP_BUTT", 0, +"CAP_ROUND", 1, +"CAP_SQUARE", 2); +}); +Clazz_declarePackage ("java.awt"); +Clazz_declareInterface (java.awt, "Stroke"); +Clazz_declarePackage ("java.util"); +Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () { +c$ = Clazz_decorateAsClass (function () { +this.language = null; +this.country = null; +this.variant = null; +this.hashCodeValue = 0; +Clazz_instantialize (this, arguments); +}, java.util, "Locale", null, [Cloneable, java.io.Serializable]); +Clazz_makeConstructor (c$, +function (language, country, variant) { +this.language = language.intern (); +this.country = country.intern (); +this.variant = variant.intern (); +}, "~S,~S,~S"); +Clazz_makeConstructor (c$, +function (language, country) { +this.construct (language, country, ""); +}, "~S,~S"); +Clazz_makeConstructor (c$, +function (language) { +this.construct (language, "", ""); +}, "~S"); +Clazz_makeConstructor (c$, + function (language, country, flag) { +this.language = language; +this.country = country; +this.variant = ""; +}, "~S,~S,~B"); +c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", + function (key, language, country) { +var locale = new java.util.Locale (language, country, false); +java.util.Locale.cache.put (key, locale); +return locale; +}, "~S,~S,~S"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function (language, country, variant) { +if (language == null || country == null || variant == null) { +throw new NullPointerException (); +}var sb = new StringBuilder (); +sb.append (language).append ('_').append (country).append ('_').append (variant); +var key = sb.toString (); +var locale = java.util.Locale.cache.get (key); +if (locale == null) { +locale = new java.util.Locale (language, country, variant); +var l = java.util.Locale.cache.put (key, locale); +if (l != null) { +locale = l; +}}return locale; +}, "~S,~S,~S"); +c$.getDefault = Clazz_defineMethod (c$, "getDefault", +function () { +if (java.util.Locale.defaultLocale == null) { +var language; +var country; +var variant; +language = "en"; +country = ""; +variant = ""; +java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant); +}return java.util.Locale.defaultLocale; +}); +c$.setDefault = Clazz_defineMethod (c$, "setDefault", +function (newLocale) { +if (newLocale == null) throw new NullPointerException ("Can't set default locale to NULL"); +java.util.Locale.defaultLocale = newLocale; +}, "java.util.Locale"); +Clazz_defineMethod (c$, "getLanguage", +function () { +return this.language; +}); +Clazz_defineMethod (c$, "getCountry", +function () { +return this.country; +}); +Clazz_defineMethod (c$, "getVariant", +function () { +return this.variant; +}); +Clazz_overrideMethod (c$, "toString", +function () { +var l = this.language.length != 0; +var c = this.country.length != 0; +var v = this.variant.length != 0; +var result = new StringBuilder (this.language); +if (c || (l && v)) { +result.append ('_').append (this.country); +}if (v && (l || c)) { +result.append ('_').append (this.variant); +}return result.toString (); +}); +Clazz_defineMethod (c$, "getDisplayLanguage", +function () { +return this.getDisplayLanguage (java.util.Locale.getDefault ()); +}); +Clazz_defineMethod (c$, "getDisplayLanguage", +function (inLocale) { +return this.getDisplayString (this.language, inLocale, 0); +}, "java.util.Locale"); +Clazz_defineMethod (c$, "getDisplayCountry", +function () { +return this.getDisplayCountry (java.util.Locale.getDefault ()); +}); +Clazz_defineMethod (c$, "getDisplayCountry", +function (inLocale) { +return this.getDisplayString (this.country, inLocale, 1); +}, "java.util.Locale"); +Clazz_defineMethod (c$, "getDisplayString", + function (code, inLocale, type) { +if (code.length == 0) { +return ""; +}if (inLocale == null) { +throw new NullPointerException (); +}return inLocale.toString (); +}, "~S,java.util.Locale,~N"); +Clazz_defineMethod (c$, "getDisplayVariant", +function () { +return this.getDisplayVariant (java.util.Locale.getDefault ()); +}); +Clazz_defineMethod (c$, "getDisplayVariant", +function (inLocale) { +if (this.variant.length == 0) return ""; +return this.variant; +}, "java.util.Locale"); +Clazz_defineMethod (c$, "getDisplayName", +function () { +return this.getDisplayName (java.util.Locale.getDefault ()); +}); +Clazz_defineMethod (c$, "getDisplayName", +function (inLocale) { +return inLocale.toString (); +}, "java.util.Locale"); +Clazz_defineMethod (c$, "clone", +function () { +try { +var that = Clazz_superCall (this, java.util.Locale, "clone", []); +return that; +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_overrideMethod (c$, "hashCode", +function () { +var hc = this.hashCodeValue; +if (hc == 0) { +hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4); +this.hashCodeValue = hc; +}return hc; +}); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (this === obj) return true; +if (!(Clazz_instanceOf (obj, java.util.Locale))) return false; +var other = obj; +return this.language === other.language && this.country === other.country && this.variant === other.variant; +}, "~O"); +c$.cache = c$.prototype.cache = new java.util.HashMap (32); +c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", ""); +c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", ""); +Clazz_defineStatics (c$, +"DISPLAY_LANGUAGE", 0, +"DISPLAY_COUNTRY", 1, +"defaultLocale", null); +}); +Clazz_declarePackage ("java.util"); +Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () { +c$ = Clazz_decorateAsClass (function () { +this.parent = null; +this.locale = null; +this.expired = false; +this.$keySet = null; +Clazz_instantialize (this, arguments); +}, java.util, "ResourceBundle"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "getString", +function (key) { +return this.getObject (key); +}, "~S"); +Clazz_defineMethod (c$, "getStringArray", +function (key) { +return this.getObject (key); +}, "~S"); +Clazz_defineMethod (c$, "getObject", +function (key) { +var obj = this.handleGetObject (key); +if (obj == null) { +if (this.parent != null) { +obj = this.parent.getObject (key); +}if (obj == null) throw new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key); +}return obj; +}, "~S"); +Clazz_defineMethod (c$, "getLocale", +function () { +return this.locale; +}); +Clazz_defineMethod (c$, "setParent", +function (parent) { +this.parent = parent; +}, "java.util.ResourceBundle"); +c$.getBundle = Clazz_defineMethod (c$, "getBundle", +function (baseName, targetLocale, loader, control) { +var n = 4; +{ +n = arguments.length; +}switch (n) { +case 2: +if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) { +control = targetLocale; +targetLocale = null; +}break; +case 3: +if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) { +control = loader; +loader = null; +}break; +} +if (targetLocale == null) targetLocale = java.util.Locale.getDefault (); +if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); +return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control); +}, "~S,~O,~O,java.util.ResourceBundle.Control"); +c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", + function (baseName, locale, loader, control) { +if (control == null) { +throw new NullPointerException ("ResourceBundle locale or control is null"); +}var cacheKey = new java.util.ResourceBundle.CacheKey (baseName, locale, loader); +var bundle = null; +var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); +if (bundleRef != null) { +bundle = bundleRef; +bundleRef = null; +}if (java.util.ResourceBundle.isValidBundle (bundle)) { +return bundle; +}var formats = control.getFormats (baseName); +var baseBundle = null; +for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) { +var candidateLocales = control.getCandidateLocales (baseName, targetLocale); +bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle); +if (java.util.ResourceBundle.isValidBundle (bundle)) { +var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale); +if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) { +break; +}if (isBaseBundle && baseBundle == null) { +baseBundle = bundle; +}}} +if (bundle == null) { +if (baseBundle == null) { +java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ()); +}bundle = baseBundle; +}return bundle; +}, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control"); +c$.findBundle = Clazz_defineMethod (c$, "findBundle", + function (cacheKey, candidateLocales, formats, index, control, baseBundle) { +var targetLocale = candidateLocales.get (index); +var parent = null; +if (index != candidateLocales.size () - 1) { +parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle); +} else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) { +return baseBundle; +}var expiredBundle = false; +cacheKey.setLocale (targetLocale); +var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control); +if (java.util.ResourceBundle.isValidBundle (bundle)) { +expiredBundle = bundle.expired; +if (!expiredBundle) { +if (bundle.parent === parent) { +return bundle; +}var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); +if (bundleRef != null && bundleRef === bundle) { +java.util.ResourceBundle.cacheList.remove (cacheKey); +}}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) { +var constKey = cacheKey.clone (); +try { +try { +bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle); +if (bundle != null) { +if (bundle.parent == null) { +bundle.setParent (parent); +}bundle.locale = targetLocale; +bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control); +return bundle; +}java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control); +} finally { +} +} finally { +if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) { +Thread.currentThread ().interrupt (); +}} +}return parent; +}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle"); +c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", + function (cacheKey, formats, control, reload) { +var targetLocale = cacheKey.getLocale (); +var bundle = null; +var size = formats.size (); +for (var i = 0; i < size; i++) { +var format = formats.get (i); +try { +bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload); +} catch (e$$) { +if (Clazz_exceptionOf (e$$, LinkageError)) { +var error = e$$; +{ +cacheKey.setCause (error); +} +} else if (Clazz_exceptionOf (e$$, Exception)) { +var cause = e$$; +{ +cacheKey.setCause (cause); +} +} else { +throw e$$; +} +} +if (bundle != null) { +cacheKey.setFormat (format); +bundle.locale = targetLocale; +bundle.expired = false; +break; +}} +return bundle; +}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B"); +c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", + function (bundle) { +return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE; +}, "java.util.ResourceBundle"); +c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", + function (baseName, locale, cause) { +if (Clazz_instanceOf (cause, java.util.MissingResourceException)) { +cause = null; +}throw new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause); +}, "~S,java.util.Locale,Throwable"); +c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", + function (cacheKey, control) { +var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); +if (bundleRef == null) { +return null; +}var bundle = bundleRef; +return bundle; +}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control"); +c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", + function (cacheKey, bundle, control) { +var key = cacheKey.clone (); +java.util.ResourceBundle.cacheList.put (key, bundle); +return bundle; +}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control"); +c$.clearCache = Clazz_defineMethod (c$, "clearCache", +function () { +java.util.ResourceBundle.cacheList.clear (); +}); +Clazz_defineMethod (c$, "containsKey", +function (key) { +if (key == null) { +throw new NullPointerException (); +}for (var rb = this; rb != null; rb = rb.parent) { +if (rb.handleKeySet ().contains (key)) { +return true; +}} +return false; +}, "~S"); +Clazz_defineMethod (c$, "keySet", +function () { +var keys = new java.util.HashSet (); +for (var rb = this; rb != null; rb = rb.parent) { +keys.addAll (rb.handleKeySet ()); +} +return keys; +}); +Clazz_defineMethod (c$, "handleKeySet", +function () { +if (this.$keySet == null) { +{ +if (this.$keySet == null) { +var keys = new java.util.HashSet (); +var enumKeys = this.getKeys (); +while (enumKeys.hasMoreElements ()) { +var key = enumKeys.nextElement (); +if (this.handleGetObject (key) != null) { +keys.add (key); +}} +this.$keySet = keys; +}}}return this.$keySet; +}); +c$.$ResourceBundle$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle); +Clazz_defineMethod (c$, "getKeys", +function () { +return null; +}); +Clazz_defineMethod (c$, "handleGetObject", +function (key) { +return null; +}, "~S"); +Clazz_overrideMethod (c$, "toString", +function () { +return "NONEXISTENT_BUNDLE"; +}); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.name = null; +this.locale = null; +this.format = null; +this.cause = null; +this.hashCodeCache = 0; +Clazz_instantialize (this, arguments); +}, java.util.ResourceBundle, "CacheKey", null, Cloneable); +Clazz_makeConstructor (c$, +function (a, b, c) { +this.name = a; +this.locale = b; +if (this.name != null) this.calculateHashCode (); +}, "~S,java.util.Locale,~O"); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "getLocale", +function () { +return this.locale; +}); +Clazz_defineMethod (c$, "setLocale", +function (a) { +if (!this.locale.equals (a)) { +this.locale = a; +this.calculateHashCode (); +}return this; +}, "java.util.Locale"); +Clazz_overrideMethod (c$, "equals", +function (a) { +if (this === a) { +return true; +}try { +var b = a; +if (this.hashCodeCache != b.hashCodeCache) { +return false; +}if (!this.name.equals (b.name)) { +return false; +}if (!this.locale.equals (b.locale)) { +return false; +}return true; +} catch (e$$) { +if (Clazz_exceptionOf (e$$, NullPointerException)) { +var e = e$$; +{ +} +} else if (Clazz_exceptionOf (e$$, ClassCastException)) { +var e = e$$; +{ +} +} else { +throw e$$; +} +} +return false; +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +return this.hashCodeCache; +}); +Clazz_defineMethod (c$, "calculateHashCode", + function () { +this.hashCodeCache = this.name.hashCode () << 3; +this.hashCodeCache ^= this.locale.hashCode (); +}); +Clazz_defineMethod (c$, "clone", +function () { +try { +var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []); +a.cause = null; +return a; +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_defineMethod (c$, "setFormat", +function (a) { +this.format = a; +}, "~S"); +Clazz_defineMethod (c$, "setCause", + function (a) { +if (this.cause == null) { +this.cause = a; +} else { +if (Clazz_instanceOf (this.cause, ClassNotFoundException)) { +this.cause = a; +}}}, "Throwable"); +Clazz_defineMethod (c$, "getCause", + function () { +return this.cause; +}); +Clazz_overrideMethod (c$, "toString", +function () { +var a = this.locale.toString (); +if (a.length == 0) { +if (this.locale.getVariant ().length != 0) { +a = "__" + this.locale.getVariant (); +} else { +a = "\"\""; +}}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]"; +}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.util.ResourceBundle, "Control"); +Clazz_makeConstructor (c$, +function () { +}); +c$.getControl = Clazz_defineMethod (c$, "getControl", +function (a) { +if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { +return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { +return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { +return java.util.ResourceBundle.Control.INSTANCE; +}throw new IllegalArgumentException (); +}, "java.util.List"); +c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", +function (a) { +if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { +return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { +return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { +return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK; +}throw new IllegalArgumentException (); +}, "java.util.List"); +Clazz_defineMethod (c$, "getFormats", +function (a) { +if (a == null) { +throw new NullPointerException (); +}return java.util.ResourceBundle.Control.FORMAT_DEFAULT; +}, "~S"); +Clazz_defineMethod (c$, "getCandidateLocales", +function (a, b) { +if (a == null) { +throw new NullPointerException (); +}var c = b.getLanguage (); +var d = b.getCountry (); +var e = b.getVariant (); +var f = new java.util.ArrayList (4); +if (e.length > 0) { +f.add (b); +}if (d.length > 0) { +f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, "")); +}if (c.length > 0) { +f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", "")); +}f.add (java.util.Locale.ROOT); +return f; +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "getFallbackLocale", +function (a, b) { +if (a == null) { +throw new NullPointerException (); +}var c = java.util.Locale.getDefault (); +return b.equals (c) ? null : c; +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "newBundle", +function (a, b, c, d, e) { +var f = this.toBundleName (a, b); +var g = null; +if (c.equals ("java.class")) { +g = swingjs.api.Interface.getInstance (f, false); +} else if (c.equals ("java.properties")) { +var h = this.toResourceName0 (f, "properties"); +if (h == null) { +return null; +}var i = swingjs.JSToolkit.getJavaResource (h, false); +var j = null; +j = (i == null ? null : new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ()))); +if (j != null) { +try { +g = this.newPropertyBundle (j); +} finally { +j.close (); +} +}} else { +throw new IllegalArgumentException ("unknown format: " + c); +}return g; +}, "~S,java.util.Locale,~S,~O,~B"); +Clazz_defineMethod (c$, "newPropertyBundle", + function (a) { +return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a); +}, "java.io.InputStream"); +Clazz_defineMethod (c$, "getTimeToLive", +function (a, b) { +if (a == null || b == null) { +throw new NullPointerException (); +}return -2; +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "toBundleName", +function (a, b) { +if (b === java.util.Locale.ROOT) { +return a; +}var c = b.getLanguage (); +var d = b.getCountry (); +var e = b.getVariant (); +if (c === "" && d === "" && e === "") { +return a; +}var f = new StringBuilder (a); +f.append ('_'); +if (e !== "") { +f.append (c).append ('_').append (d).append ('_').append (e); +} else if (d !== "") { +f.append (c).append ('_').append (d); +} else { +f.append (c); +}return f.toString (); +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "toResourceName", +function (a, b) { +var c = new StringBuilder (a.length + 1 + b.length); +c.append (a.$replace ('.', '/')).append ('.').append (b); +return c.toString (); +}, "~S,~S"); +Clazz_defineMethod (c$, "toResourceName0", + function (a, b) { +if (a.contains ("://")) { +return null; +} else { +return this.toResourceName (a, b); +}}, "~S,~S"); +c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"])); +c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"])); +c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"])); +Clazz_defineStatics (c$, +"TTL_DONT_CACHE", -1, +"TTL_NO_EXPIRATION_CONTROL", -2); +c$.INSTANCE = c$.prototype.INSTANCE = new java.util.ResourceBundle.Control (); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.formats = null; +Clazz_instantialize (this, arguments); +}, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []); +this.formats = a; +}, "java.util.List"); +Clazz_overrideMethod (c$, "getFormats", +function (a) { +if (a == null) { +throw new NullPointerException (); +}return this.formats; +}, "~S"); +c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); +c$.CLASS_ONLY = c$.prototype.CLASS_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl); +Clazz_overrideMethod (c$, "getFallbackLocale", +function (a, b) { +if (a == null || b == null) { +throw new NullPointerException (); +}return null; +}, "~S,java.util.Locale"); +c$.NO_FALLBACK = c$.prototype.NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT); +c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); +c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"INITIAL_CACHE_SIZE", 32); +c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null)); +c$.cacheList = c$.prototype.cacheList = new java.util.HashMap (32); +}); +Clazz_declarePackage ("JU"); +Clazz_load (["javajs.api.GenericLineReader"], "JU.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "JU.AU", "$.Base64", "$.Encoding", "$.SB"], function () { +c$ = Clazz_decorateAsClass (function () { +this.reader = null; +Clazz_instantialize (this, arguments); +}, JU, "Rdr", null, javajs.api.GenericLineReader); +Clazz_makeConstructor (c$, +function (reader) { +this.reader = reader; +}, "java.io.BufferedReader"); +Clazz_overrideMethod (c$, "readNextLine", +function () { +return this.reader.readLine (); +}); +c$.readCifData = Clazz_defineMethod (c$, "readCifData", +function (parser, br) { +return parser.set (null, br).getAllCifData (); +}, "javajs.api.GenericCifDataParser,java.io.BufferedReader"); +c$.fixUTF = Clazz_defineMethod (c$, "fixUTF", +function (bytes) { +var encoding = JU.Rdr.getUTFEncoding (bytes); +if (encoding !== JU.Encoding.NONE) try { +var s = String.instantialize (bytes, encoding.name ().$replace ('_', '-')); +switch (encoding) { +case JU.Encoding.UTF8: +case JU.Encoding.UTF_16BE: +case JU.Encoding.UTF_16LE: +s = s.substring (1); +break; +default: +break; +} +return s; +} catch (e) { +if (Clazz_exceptionOf (e, java.io.UnsupportedEncodingException)) { +System.out.println (e); +} else { +throw e; +} +} +return String.instantialize (bytes); +}, "~A"); +c$.getUTFEncoding = Clazz_defineMethod (c$, "getUTFEncoding", + function (bytes) { +if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return JU.Encoding.UTF8; +if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return JU.Encoding.UTF_32BE; +if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return JU.Encoding.UTF_32LE; +if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return JU.Encoding.UTF_16LE; +if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return JU.Encoding.UTF_16BE; +return JU.Encoding.NONE; +}, "~A"); +c$.getUTFEncodingForStream = Clazz_defineMethod (c$, "getUTFEncodingForStream", + function (is) { +{ +is.resetStream(); +}var abMagic = Clazz_newByteArray (4, 0); +abMagic[3] = 1; +try { +is.mark (5); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +return JU.Encoding.NONE; +} else { +throw e; +} +} +is.read (abMagic, 0, 4); +is.reset (); +return JU.Rdr.getUTFEncoding (abMagic); +}, "java.io.BufferedInputStream"); +c$.isBase64 = Clazz_defineMethod (c$, "isBase64", +function (sb) { +return (sb.indexOf (";base64,") == 0); +}, "JU.SB"); +c$.isCompoundDocumentS = Clazz_defineMethod (c$, "isCompoundDocumentS", +function (is) { +return JU.Rdr.isCompoundDocumentB (JU.Rdr.getMagic (is, 8)); +}, "java.io.InputStream"); +c$.isCompoundDocumentB = Clazz_defineMethod (c$, "isCompoundDocumentB", +function (bytes) { +return (bytes.length >= 8 && bytes[0] == 0xD0 && bytes[1] == 0xCF && bytes[2] == 0x11 && bytes[3] == 0xE0 && bytes[4] == 0xA1 && bytes[5] == 0xB1 && bytes[6] == 0x1A && bytes[7] == 0xE1); +}, "~A"); +c$.isGzipS = Clazz_defineMethod (c$, "isGzipS", +function (is) { +return JU.Rdr.isGzipB (JU.Rdr.getMagic (is, 2)); +}, "java.io.InputStream"); +c$.isGzipB = Clazz_defineMethod (c$, "isGzipB", +function (bytes) { +return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B); +}, "~A"); +c$.isPickleS = Clazz_defineMethod (c$, "isPickleS", +function (is) { +return JU.Rdr.isPickleB (JU.Rdr.getMagic (is, 2)); +}, "java.io.InputStream"); +c$.isPickleB = Clazz_defineMethod (c$, "isPickleB", +function (bytes) { +return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71); +}, "~A"); +c$.isPngZipStream = Clazz_defineMethod (c$, "isPngZipStream", +function (is) { +return JU.Rdr.isPngZipB (JU.Rdr.getMagic (is, 55)); +}, "java.io.InputStream"); +c$.isPngZipB = Clazz_defineMethod (c$, "isPngZipB", +function (bytes) { +return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A); +}, "~A"); +c$.isZipS = Clazz_defineMethod (c$, "isZipS", +function (is) { +return JU.Rdr.isZipB (JU.Rdr.getMagic (is, 4)); +}, "java.io.InputStream"); +c$.isZipB = Clazz_defineMethod (c$, "isZipB", +function (bytes) { +return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04); +}, "~A"); +c$.getMagic = Clazz_defineMethod (c$, "getMagic", + function (is, n) { +var abMagic = Clazz_newByteArray (n, 0); +{ +is.resetStream(); +}try { +is.mark (n + 1); +is.read (abMagic, 0, n); +} catch (e) { +if (Clazz_exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +try { +is.reset (); +} catch (e) { +if (Clazz_exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +return abMagic; +}, "java.io.InputStream,~N"); +c$.getBIS = Clazz_defineMethod (c$, "getBIS", +function (bytes) { +return new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes)); +}, "~A"); +c$.getBR = Clazz_defineMethod (c$, "getBR", +function (string) { +return new java.io.BufferedReader ( new java.io.StringReader (string)); +}, "~S"); +c$.getUnzippedInputStream = Clazz_defineMethod (c$, "getUnzippedInputStream", +function (jzt, bis) { +while (JU.Rdr.isGzipS (bis)) bis = new java.io.BufferedInputStream (JU.Rdr.newGZIPInputStream (jzt, bis)); + +return bis; +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); +c$.getBytesFromSB = Clazz_defineMethod (c$, "getBytesFromSB", +function (sb) { +return (JU.Rdr.isBase64 (sb) ? JU.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1)); +}, "JU.SB"); +c$.getStreamAsBytes = Clazz_defineMethod (c$, "getStreamAsBytes", +function (bis, out) { +var buf = Clazz_newByteArray (1024, 0); +var bytes = (out == null ? Clazz_newByteArray (4096, 0) : null); +var len = 0; +var totalLen = 0; +while ((len = bis.read (buf, 0, 1024)) > 0) { +totalLen += len; +if (out == null) { +if (totalLen >= bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2); +System.arraycopy (buf, 0, bytes, totalLen - len, len); +} else { +out.write (buf, 0, len); +}} +bis.close (); +if (out == null) { +return JU.AU.arrayCopyByte (bytes, totalLen); +}return totalLen + " bytes"; +}, "java.io.BufferedInputStream,JU.OC"); +c$.getBufferedReader = Clazz_defineMethod (c$, "getBufferedReader", +function (bis, charSet) { +if (JU.Rdr.getUTFEncodingForStream (bis) === JU.Encoding.NONE) return new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet))); +var bytes = JU.Rdr.getLimitedStreamBytes (bis, -1); +bis.close (); +return JU.Rdr.getBR (charSet == null ? JU.Rdr.fixUTF (bytes) : String.instantialize (bytes, charSet)); +}, "java.io.BufferedInputStream,~S"); +c$.getLimitedStreamBytes = Clazz_defineMethod (c$, "getLimitedStreamBytes", +function (is, n) { +var buflen = (n > 0 && n < 1024 ? n : 1024); +var buf = Clazz_newByteArray (buflen, 0); +var bytes = Clazz_newByteArray (n < 0 ? 4096 : n, 0); +var len = 0; +var totalLen = 0; +if (n < 0) n = 2147483647; +while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) { +totalLen += len; +if (totalLen > bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2); +System.arraycopy (buf, 0, bytes, totalLen - len, len); +if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen; +} +if (totalLen == bytes.length) return bytes; +buf = Clazz_newByteArray (totalLen, 0); +System.arraycopy (bytes, 0, buf, 0, totalLen); +return buf; +}, "java.io.InputStream,~N"); +c$.StreamToUTF8String = Clazz_defineMethod (c$, "StreamToUTF8String", +function (bis) { +var data = new Array (1); +try { +JU.Rdr.readAllAsString (JU.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0); +} catch (e) { +if (Clazz_exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +return data[0]; +}, "java.io.BufferedInputStream"); +c$.readAllAsString = Clazz_defineMethod (c$, "readAllAsString", +function (br, nBytesMax, allowBinary, data, i) { +try { +var sb = JU.SB.newN (8192); +var line; +if (nBytesMax < 0) { +line = br.readLine (); +if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) { +sb.append (line).appendC ('\n'); +while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n'); + +}} else { +var n = 0; +var len; +while (n < nBytesMax && (line = br.readLine ()) != null) { +if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1); +sb.append (line).appendC ('\n'); +n += len + 1; +} +}br.close (); +data[i] = sb.toString (); +return true; +} catch (ioe) { +if (Clazz_exceptionOf (ioe, Exception)) { +data[i] = ioe.toString (); +return false; +} else { +throw ioe; +} +} +}, "java.io.BufferedReader,~N,~B,~A,~N"); +c$.getPngZipPointAndCount = Clazz_defineMethod (c$, "getPngZipPointAndCount", +function (bis, pt_count) { +bis.mark (75); +try { +var data = JU.Rdr.getLimitedStreamBytes (bis, 74); +bis.reset (); +var pt = 0; +for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f; + +var n = 0; +for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f; + +pt_count[0] = pt; +pt_count[1] = n; +} catch (e) { +pt_count[1] = 0; +} +}, "java.io.BufferedInputStream,~A"); +c$.getPngZipStream = Clazz_defineMethod (c$, "getPngZipStream", +function (bis, asNewStream) { +if (!JU.Rdr.isPngZipStream (bis)) return bis; +var data = Clazz_newByteArray (0, 0); +bis.mark (75); +try { +var pt_count = Clazz_newIntArray (2, 0); +JU.Rdr.getPngZipPointAndCount (bis, pt_count); +if (pt_count[1] != 0) { +var pt = pt_count[0]; +while (pt > 0) pt -= bis.skip (pt); + +if (!asNewStream) return bis; +data = JU.Rdr.getLimitedStreamBytes (bis, pt_count[1]); +}} catch (e) { +} finally { +try { +if (asNewStream) bis.close (); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +} else { +throw e; +} +} +} +return JU.Rdr.getBIS (data); +}, "java.io.BufferedInputStream,~B"); +c$.readFileAsMap = Clazz_defineMethod (c$, "readFileAsMap", +function (jzt, is, bdata, name) { +jzt.readFileAsMap (is, bdata, name); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,java.util.Map,~S"); +c$.getZipDirectoryAsStringAndClose = Clazz_defineMethod (c$, "getZipDirectoryAsStringAndClose", +function (jzt, t) { +return jzt.getZipDirectoryAsStringAndClose (t); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); +c$.newGZIPInputStream = Clazz_defineMethod (c$, "newGZIPInputStream", +function (jzt, bis) { +return jzt.newGZIPInputStream (bis); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); +c$.newZipInputStream = Clazz_defineMethod (c$, "newZipInputStream", +function (jzt, $in) { +return jzt.newZipInputStream ($in); +}, "javajs.api.GenericZipTools,java.io.InputStream"); +c$.getZipFileDirectory = Clazz_defineMethod (c$, "getZipFileDirectory", +function (jzt, bis, subFileList, listPtr, asBufferedInputStream) { +return jzt.getZipFileDirectory (jzt, bis, subFileList, listPtr, asBufferedInputStream); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N,~B"); +c$.getZipDirectoryAndClose = Clazz_defineMethod (c$, "getZipDirectoryAndClose", +function (jzt, t, manifestID) { +return jzt.getZipDirectoryAndClose (t, manifestID); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~S"); +c$.getAllZipData = Clazz_defineMethod (c$, "getAllZipData", +function (jzt, bis, subFileList, replace, string, fileData) { +jzt.getAllZipData (bis, subFileList, replace, string, fileData); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~S,~S,java.util.Map"); +c$.getZipFileContentsAsBytes = Clazz_defineMethod (c$, "getZipFileContentsAsBytes", +function (jzt, bis, subFileList, i) { +return jzt.getZipFileContentsAsBytes (bis, subFileList, i); +}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N"); +c$.addZipEntry = Clazz_defineMethod (c$, "addZipEntry", +function (jzt, zos, fileName) { +jzt.addZipEntry (zos, fileName); +}, "javajs.api.GenericZipTools,~O,~S"); +c$.closeZipEntry = Clazz_defineMethod (c$, "closeZipEntry", +function (jzt, zos) { +jzt.closeZipEntry (zos); +}, "javajs.api.GenericZipTools,~O"); +c$.getZipOutputStream = Clazz_defineMethod (c$, "getZipOutputStream", +function (jzt, bos) { +return jzt.getZipOutputStream (bos); +}, "javajs.api.GenericZipTools,~O"); +c$.getCrcValue = Clazz_defineMethod (c$, "getCrcValue", +function (jzt, bytes) { +return jzt.getCrcValue (bytes); +}, "javajs.api.GenericZipTools,~A"); +c$.getZipRoot = Clazz_defineMethod (c$, "getZipRoot", +function (fileName) { +var pt = fileName.indexOf ("|"); +return (pt < 0 ? fileName : fileName.substring (0, pt)); +}, "~S"); +}); +Clazz_declarePackage ("javajs.api"); +Clazz_declareInterface (javajs.api, "GenericLineReader"); +Clazz_load (["java.io.FilterInputStream"], "java.io.BufferedInputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.buf = null; +this.count = 0; +this.pos = 0; +this.markpos = -1; +this.marklimit = 0; +Clazz_instantialize (this, arguments); +}, java.io, "BufferedInputStream", java.io.FilterInputStream); +Clazz_defineMethod (c$, "getInIfOpen", + function () { +var input = this.$in; +if (input == null) throw new java.io.IOException ("Stream closed"); +return input; +}); +Clazz_defineMethod (c$, "getBufIfOpen", + function () { +var buffer = this.buf; +if (buffer == null) throw new java.io.IOException ("Stream closed"); +return buffer; +}); +Clazz_overrideMethod (c$, "resetStream", +function () { +}); +Clazz_makeConstructor (c$, +function ($in) { +Clazz_superConstructor (this, java.io.BufferedInputStream, [$in]); +this.buf = Clazz_newByteArray (8192, 0); +}, "java.io.InputStream"); +Clazz_defineMethod (c$, "fill", + function () { +var buffer = this.getBufIfOpen (); +if (this.markpos < 0) this.pos = 0; + else if (this.pos >= buffer.length) if (this.markpos > 0) { +var sz = this.pos - this.markpos; +System.arraycopy (buffer, this.markpos, buffer, 0, sz); +this.pos = sz; +this.markpos = 0; +} else if (buffer.length >= this.marklimit) { +this.markpos = -1; +this.pos = 0; +} else { +var nsz = this.pos * 2; +if (nsz > this.marklimit) nsz = this.marklimit; +var nbuf = Clazz_newByteArray (nsz, 0); +System.arraycopy (buffer, 0, nbuf, 0, this.pos); +buffer = this.buf = nbuf; +}this.count = this.pos; +var n = this.getInIfOpen ().read (buffer, this.pos, buffer.length - this.pos); +if (n > 0) this.count = n + this.pos; +}); +Clazz_overrideMethod (c$, "readByteAsInt", +function () { +if (this.pos >= this.count) { +this.fill (); +if (this.pos >= this.count) return -1; +}return this.getBufIfOpen ()[this.pos++] & 0xff; +}); +Clazz_defineMethod (c$, "read1", + function (b, off, len) { +var avail = this.count - this.pos; +if (avail <= 0) { +if (len >= this.getBufIfOpen ().length && this.markpos < 0) { +return this.getInIfOpen ().read (b, off, len); +}this.fill (); +avail = this.count - this.pos; +if (avail <= 0) return -1; +}var cnt = (avail < len) ? avail : len; +System.arraycopy (this.getBufIfOpen (), this.pos, b, off, cnt); +this.pos += cnt; +return cnt; +}, "~A,~N,~N"); +Clazz_overrideMethod (c$, "read", +function (b, off, len) { +if (arguments.length == 1) { + off = 0; + len = b.length; +} +this.getBufIfOpen (); +if ((off | len | (off + len) | (b.length - (off + len))) < 0) { +throw new IndexOutOfBoundsException (); +} else if (len == 0) { +return 0; +}var n = 0; +for (; ; ) { +var nread = this.read1 (b, off + n, len - n); +if (nread <= 0) return (n == 0) ? nread : n; +n += nread; +if (n >= len) return n; +var input = this.$in; +if (input != null && input.available () <= 0) return n; +} +}, "~A,~N,~N"); +Clazz_overrideMethod (c$, "skip", +function (n) { +this.getBufIfOpen (); +if (n <= 0) { +return 0; +}var avail = this.count - this.pos; +if (avail <= 0) { +if (this.markpos < 0) return this.getInIfOpen ().skip (n); +this.fill (); +avail = this.count - this.pos; +if (avail <= 0) return 0; +}var skipped = (avail < n) ? avail : n; +this.pos += skipped; +return skipped; +}, "~N"); +Clazz_overrideMethod (c$, "available", +function () { +var n = this.count - this.pos; +var avail = this.getInIfOpen ().available (); +return n > (2147483647 - avail) ? 2147483647 : n + avail; +}); +Clazz_overrideMethod (c$, "mark", +function (readlimit) { +this.marklimit = readlimit; +this.markpos = this.pos; +}, "~N"); +Clazz_overrideMethod (c$, "reset", +function () { +this.getBufIfOpen (); +if (this.markpos < 0) throw new java.io.IOException ("Resetting to invalid mark"); +this.pos = this.markpos; +}); +Clazz_overrideMethod (c$, "markSupported", +function () { +return true; +}); +Clazz_overrideMethod (c$, "close", +function () { +var input = this.$in; +this.$in = null; +if (input != null) input.close (); +return; +}); +Clazz_defineStatics (c$, +"DEFAULT_BUFFER_SIZE", 8192); +}); +Clazz_load (["java.io.InputStream"], "java.io.FilterInputStream", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.$in = null; +Clazz_instantialize (this, arguments); +}, java.io, "FilterInputStream", java.io.InputStream); +Clazz_makeConstructor (c$, +function ($in) { +Clazz_superConstructor (this, java.io.FilterInputStream, []); +this.$in = $in; +}, "java.io.InputStream"); +Clazz_defineMethod (c$, "readByteAsInt", +function () { +return this.$in.readByteAsInt (); +}); +Clazz_defineMethod (c$, "read", +function (b, off, len) { + if (arguments.length == 1) { off = 0; len = b.length; } +return this.$in.read (b, off, len); +}, "~A,~N,~N"); +Clazz_defineMethod (c$, "skip", +function (n) { +return this.$in.skip (n); +}, "~N"); +Clazz_defineMethod (c$, "available", +function () { +return this.$in.available (); +}); +Clazz_defineMethod (c$, "close", +function () { +this.$in.close (); +}); +Clazz_defineMethod (c$, "mark", +function (readlimit) { +this.$in.mark (readlimit); +}, "~N"); +Clazz_defineMethod (c$, "reset", +function () { +this.$in.reset (); +}); +Clazz_defineMethod (c$, "markSupported", +function () { +return this.$in.markSupported (); +}); +}); +Clazz_load (null, "java.io.InputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () { +c$ = Clazz_declareType (java.io, "InputStream"); +Clazz_defineMethod (c$, "read", +function (b, off, len) { +if (b == null) { +throw new NullPointerException (); +} + if (arguments.length == 1) { off = 0; len = b.length; } + +if (off < 0 || len < 0 || len > b.length - off) { +throw new IndexOutOfBoundsException (); +} else if (len == 0) { +return 0; +}var c = this.readByteAsInt (); +if (c == -1) { +return -1; +}b[off] = c; +var i = 1; +try { +for (; i < len; i++) { +c = this.readByteAsInt (); +if (c == -1) { +break; +}b[off + i] = c; +} +} catch (ee) { +if (Clazz_exceptionOf (ee, java.io.IOException)) { +} else { +throw ee; +} +} +return i; +}, "~A,~N,~N"); +Clazz_defineMethod (c$, "skip", +function (n) { +var remaining = n; +var nr; +if (java.io.InputStream.skipBuffer == null) java.io.InputStream.skipBuffer = Clazz_newByteArray (2048, 0); +var localSkipBuffer = java.io.InputStream.skipBuffer; +if (n <= 0) { +return 0; +}while (remaining > 0) { +nr = this.read (localSkipBuffer, 0, Math.min (2048, remaining)); +if (nr < 0) { +break; +}remaining -= nr; +} +return n - remaining; +}, "~N"); +Clazz_defineMethod (c$, "available", +function () { +return 0; +}); +Clazz_defineMethod (c$, "close", +function () { +}); +Clazz_defineMethod (c$, "mark", +function (readlimit) { +}, "~N"); +Clazz_defineMethod (c$, "reset", +function () { +throw new java.io.IOException ("mark/reset not supported"); +}); +Clazz_defineMethod (c$, "markSupported", +function () { +return false; +}); +Clazz_defineMethod (c$, "resetStream", +function () { +}); +Clazz_defineStatics (c$, +"SKIP_BUFFER_SIZE", 2048, +"skipBuffer", null); +}); +Clazz_load (["java.io.Reader"], "java.io.BufferedReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException", "JU.SB"], function () { +c$ = Clazz_decorateAsClass (function () { +this.$in = null; +this.cb = null; +this.nChars = 0; +this.nextChar = 0; +this.markedChar = -1; +this.readAheadLimit = 0; +this.skipLF = false; +this.markedSkipLF = false; +Clazz_instantialize (this, arguments); +}, java.io, "BufferedReader", java.io.Reader); +Clazz_defineMethod (c$, "setSize", + function (sz) { +if (sz <= 0) throw new IllegalArgumentException ("Buffer size <= 0"); +this.cb = Clazz_newCharArray (sz, '\0'); +this.nextChar = this.nChars = 0; +}, "~N"); +Clazz_makeConstructor (c$, +function ($in) { +Clazz_superConstructor (this, java.io.BufferedReader, [$in]); +this.$in = $in; +this.setSize (8192); +}, "java.io.Reader"); +Clazz_defineMethod (c$, "ensureOpen", + function () { +if (this.$in == null) throw new java.io.IOException ("Stream closed"); +}); +Clazz_defineMethod (c$, "fill", + function () { +var dst; +if (this.markedChar <= -1) { +dst = 0; +} else { +var delta = this.nextChar - this.markedChar; +if (delta >= this.readAheadLimit) { +this.markedChar = -2; +this.readAheadLimit = 0; +dst = 0; +} else { +if (this.readAheadLimit <= this.cb.length) { +System.arraycopy (this.cb, this.markedChar, this.cb, 0, delta); +this.markedChar = 0; +dst = delta; +} else { +var ncb = Clazz_newCharArray (this.readAheadLimit, '\0'); +System.arraycopy (this.cb, this.markedChar, ncb, 0, delta); +this.cb = ncb; +this.markedChar = 0; +dst = delta; +}this.nextChar = this.nChars = delta; +}}var n; +do { +n = this.$in.read (this.cb, dst, this.cb.length - dst); +} while (n == 0); +if (n > 0) { +this.nChars = dst + n; +this.nextChar = dst; +}}); +Clazz_defineMethod (c$, "read1", + function (cbuf, off, len) { +if (this.nextChar >= this.nChars) { +if (len >= this.cb.length && this.markedChar <= -1 && !this.skipLF) { +return this.$in.read (cbuf, off, len); +}this.fill (); +}if (this.nextChar >= this.nChars) return -1; +if (this.skipLF) { +this.skipLF = false; +if (this.cb[this.nextChar] == '\n') { +this.nextChar++; +if (this.nextChar >= this.nChars) this.fill (); +if (this.nextChar >= this.nChars) return -1; +}}var n = Math.min (len, this.nChars - this.nextChar); +System.arraycopy (this.cb, this.nextChar, cbuf, off, n); +this.nextChar += n; +return n; +}, "~A,~N,~N"); +Clazz_defineMethod (c$, "read", +function (cbuf, off, len) { +{ +this.ensureOpen (); +if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) { +throw new IndexOutOfBoundsException (); +} else if (len == 0) { +return 0; +}var n = this.read1 (cbuf, off, len); +if (n <= 0) return n; +while ((n < len) && this.$in.ready ()) { +var n1 = this.read1 (cbuf, off + n, len - n); +if (n1 <= 0) break; +n += n1; +} +return n; +}}, "~A,~N,~N"); +Clazz_defineMethod (c$, "readLine1", + function (ignoreLF) { +var s = null; +var startChar; +{ +this.ensureOpen (); +var omitLF = ignoreLF || this.skipLF; +for (; ; ) { +if (this.nextChar >= this.nChars) this.fill (); +if (this.nextChar >= this.nChars) { +if (s != null && s.length () > 0) return s.toString (); +return null; +}var eol = false; +var c = String.fromCharCode (0); +var i; +if (omitLF && (this.cb[this.nextChar] == '\n')) this.nextChar++; +this.skipLF = false; +omitLF = false; +charLoop : for (i = this.nextChar; i < this.nChars; i++) { +c = this.cb[i]; +if ((c == '\n') || (c == '\r')) { +eol = true; +break charLoop; +}} +startChar = this.nextChar; +this.nextChar = i; +if (eol) { +var str; +if (s == null) { +str = String.instantialize (this.cb, startChar, i - startChar); +} else { +s.appendCB (this.cb, startChar, i - startChar); +str = s.toString (); +}this.nextChar++; +if (c == '\r') { +this.skipLF = true; +}return str; +}if (s == null) s = JU.SB.newN (80); +s.appendCB (this.cb, startChar, i - startChar); +} +}}, "~B"); +Clazz_defineMethod (c$, "readLine", +function () { +return this.readLine1 (false); +}); +Clazz_overrideMethod (c$, "skip", +function (n) { +if (n < 0) { +throw new IllegalArgumentException ("skip value is negative"); +}{ +this.ensureOpen (); +var r = n; +while (r > 0) { +if (this.nextChar >= this.nChars) this.fill (); +if (this.nextChar >= this.nChars) break; +if (this.skipLF) { +this.skipLF = false; +if (this.cb[this.nextChar] == '\n') { +this.nextChar++; +}}var d = this.nChars - this.nextChar; +if (r <= d) { +this.nextChar += r; +r = 0; +break; +}r -= d; +this.nextChar = this.nChars; +} +return n - r; +}}, "~N"); +Clazz_defineMethod (c$, "ready", +function () { +{ +this.ensureOpen (); +if (this.skipLF) { +if (this.nextChar >= this.nChars && this.$in.ready ()) { +this.fill (); +}if (this.nextChar < this.nChars) { +if (this.cb[this.nextChar] == '\n') this.nextChar++; +this.skipLF = false; +}}return (this.nextChar < this.nChars) || this.$in.ready (); +}}); +Clazz_overrideMethod (c$, "markSupported", +function () { +return true; +}); +Clazz_overrideMethod (c$, "mark", +function (readAheadLimit) { +if (readAheadLimit < 0) { +throw new IllegalArgumentException ("Read-ahead limit < 0"); +}{ +this.ensureOpen (); +this.readAheadLimit = readAheadLimit; +this.markedChar = this.nextChar; +this.markedSkipLF = this.skipLF; +}}, "~N"); +Clazz_overrideMethod (c$, "reset", +function () { +{ +this.ensureOpen (); +if (this.markedChar < 0) throw new java.io.IOException ((this.markedChar == -2) ? "Mark invalid" : "Stream not marked"); +this.nextChar = this.markedChar; +this.skipLF = this.markedSkipLF; +}}); +Clazz_defineMethod (c$, "close", +function () { +{ +if (this.$in == null) return; +this.$in.close (); +this.$in = null; +this.cb = null; +}}); +Clazz_defineStatics (c$, +"INVALIDATED", -2, +"UNMARKED", -1, +"DEFAULT_CHAR_BUFFER_SIZE", 8192, +"DEFAULT_EXPECTED_LINE_LENGTH", 80); +}); +Clazz_load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.buf = null; +this.pos = 0; +this.$mark = 0; +this.count = 0; +Clazz_instantialize (this, arguments); +}, java.io, "ByteArrayInputStream", java.io.InputStream); +Clazz_makeConstructor (c$, +function (buf) { +Clazz_superConstructor (this, java.io.ByteArrayInputStream, []); +this.buf = buf; +this.pos = 0; +this.count = buf.length; +}, "~A"); +Clazz_overrideMethod (c$, "readByteAsInt", +function () { +return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1; +}); +Clazz_overrideMethod (c$, "read", +function (b, off, len) { +if (b == null) { +throw new NullPointerException (); +} + if (arguments.length == 1) { off = 0; len = b.length; } + +if (off < 0 || len < 0 || len > b.length - off) { +throw new IndexOutOfBoundsException (); +}if (this.pos >= this.count) { +return -1; +}var avail = this.count - this.pos; +if (len > avail) { +len = avail; +}if (len <= 0) { +return 0; +}System.arraycopy (this.buf, this.pos, b, off, len); +this.pos += len; +return len; +}, "~A,~N,~N"); +Clazz_overrideMethod (c$, "skip", +function (n) { +var k = this.count - this.pos; +if (n < k) { +k = n < 0 ? 0 : n; +}this.pos += k; +return k; +}, "~N"); +Clazz_overrideMethod (c$, "available", +function () { +return this.count - this.pos; +}); +Clazz_overrideMethod (c$, "markSupported", +function () { +return true; +}); +Clazz_overrideMethod (c$, "mark", +function (readAheadLimit) { +this.$mark = this.pos; +}, "~N"); +Clazz_overrideMethod (c$, "resetStream", +function () { +}); +Clazz_overrideMethod (c$, "reset", +function () { +this.pos = this.$mark; +}); +Clazz_overrideMethod (c$, "close", +function () { +}); +}); +Clazz_load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.lock = null; +this.skipBuffer = null; +Clazz_instantialize (this, arguments); +}, java.io, "Reader", null, java.io.Closeable); +Clazz_makeConstructor (c$, +function (lock) { +if (lock == null) { +throw new NullPointerException (); +}this.lock = lock; +}, "~O"); +Clazz_defineMethod (c$, "skip", +function (n) { +if (n < 0) throw new IllegalArgumentException ("skip value is negative"); +var nn = Math.min (n, 8192); +{ +if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer = Clazz_newCharArray (nn, '\0'); +var r = n; +while (r > 0) { +var nc = this.read (this.skipBuffer, 0, Math.min (r, nn)); +if (nc == -1) break; +r -= nc; +} +return n - r; +}}, "~N"); +Clazz_defineMethod (c$, "ready", +function () { +return false; +}); +Clazz_defineMethod (c$, "markSupported", +function () { +return false; +}); +Clazz_defineMethod (c$, "mark", +function (readAheadLimit) { +throw new java.io.IOException ("mark() not supported"); +}, "~N"); +Clazz_defineMethod (c$, "reset", +function () { +throw new java.io.IOException ("reset() not supported"); +}); +Clazz_defineStatics (c$, +"MAX_SKIP_BUFFE_SIZE", 8192); +}); +Clazz_load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.str = null; +this.length = 0; +this.next = 0; +this.$mark = 0; +Clazz_instantialize (this, arguments); +}, java.io, "StringReader", java.io.Reader); +Clazz_makeConstructor (c$, +function (s) { +Clazz_superConstructor (this, java.io.StringReader, [s]); +this.str = s; +this.length = s.length; +}, "~S"); +Clazz_defineMethod (c$, "ensureOpen", + function () { +if (this.str == null) throw new java.io.IOException ("Stream closed"); +}); +Clazz_overrideMethod (c$, "read", +function (cbuf, off, len) { +{ +this.ensureOpen (); +if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) { +throw new IndexOutOfBoundsException (); +} else if (len == 0) { +return 0; +}if (this.next >= this.length) return -1; +var n = Math.min (this.length - this.next, len); +this.str.getChars (this.next, this.next + n, cbuf, off); +this.next += n; +return n; +}}, "~A,~N,~N"); +Clazz_overrideMethod (c$, "skip", +function (ns) { +{ +this.ensureOpen (); +if (this.next >= this.length) return 0; +var n = Math.min (this.length - this.next, ns); +n = Math.max (-this.next, n); +this.next += n; +return n; +}}, "~N"); +Clazz_overrideMethod (c$, "ready", +function () { +{ +this.ensureOpen (); +return true; +}}); +Clazz_overrideMethod (c$, "markSupported", +function () { +return true; +}); +Clazz_overrideMethod (c$, "mark", +function (readAheadLimit) { +if (readAheadLimit < 0) { +throw new IllegalArgumentException ("Read-ahead limit < 0"); +}{ +this.ensureOpen (); +this.$mark = this.next; +}}, "~N"); +Clazz_overrideMethod (c$, "reset", +function () { +{ +this.ensureOpen (); +this.next = this.$mark; +}}); +Clazz_overrideMethod (c$, "close", +function () { +this.str = null; +}); +}); +Clazz_declarePackage ("JU"); +Clazz_load (null, "JU.Base64", ["JU.SB"], function () { +c$ = Clazz_declareType (JU, "Base64"); +c$.getBytes64 = Clazz_defineMethod (c$, "getBytes64", +function (bytes) { +return JU.Base64.getBase64 (bytes).toBytes (0, -1); +}, "~A"); +c$.getBase64 = Clazz_defineMethod (c$, "getBase64", +function (bytes) { +var nBytes = bytes.length; +var sout = new JU.SB (); +if (nBytes == 0) return sout; +for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) { +if (i % 75 == 0 && i != 0) sout.append ("\r\n"); +nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0); +var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF); +sout.appendC (JU.Base64.base64.charAt ((outbytes >> 18) & 0x3F)); +sout.appendC (JU.Base64.base64.charAt ((outbytes >> 12) & 0x3F)); +sout.appendC (nPad == 2 ? '=' : JU.Base64.base64.charAt ((outbytes >> 6) & 0x3F)); +sout.appendC (nPad >= 1 ? '=' : JU.Base64.base64.charAt (outbytes & 0x3F)); +} +return sout; +}, "~A"); +c$.decodeBase64 = Clazz_defineMethod (c$, "decodeBase64", +function (strBase64) { +var nBytes = 0; +var ch; +var pt0 = strBase64.indexOf (";base64,") + 1; +if (pt0 > 0) pt0 += 7; +var chars64 = strBase64.toCharArray (); +var len64 = chars64.length; +if (len64 == 0) return Clazz_newByteArray (0, 0); +for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || JU.Base64.decode64[ch] > 0 ? 3 : 0); + +nBytes = nBytes >> 2; +var bytes = Clazz_newByteArray (nBytes, 0); +var offset = 18; +for (var i = pt0, pt = 0, b = 0; i < len64; i++) { +if (JU.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) { +b |= JU.Base64.decode64[ch] << offset; +offset -= 6; +if (offset < 0) { +bytes[pt++] = ((b & 0xFF0000) >> 16); +if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8); +if (pt < nBytes) bytes[pt++] = (b & 0xFF); +offset = 18; +b = 0; +}}} +return bytes; +}, "~S"); +Clazz_defineStatics (c$, +"base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", +"decode64", Clazz_newIntArray (-1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 62, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0])); +}); +Clazz_declarePackage ("JU"); +Clazz_load (["java.lang.Enum"], "JU.Encoding", null, function () { +c$ = Clazz_declareType (JU, "Encoding", Enum); +Clazz_defineEnumConstant (c$, "NONE", 0, []); +Clazz_defineEnumConstant (c$, "UTF8", 1, []); +Clazz_defineEnumConstant (c$, "UTF_16BE", 2, []); +Clazz_defineEnumConstant (c$, "UTF_16LE", 3, []); +Clazz_defineEnumConstant (c$, "UTF_32BE", 4, []); +Clazz_defineEnumConstant (c$, "UTF_32LE", 5, []); +}); +Clazz_declarePackage ("java.util"); +Clazz_load (["java.lang.RuntimeException"], "java.util.MissingResourceException", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.className = null; +this.key = null; +Clazz_instantialize (this, arguments); +}, java.util, "MissingResourceException", RuntimeException); +Clazz_makeConstructor (c$, +function (s, className, key) { +Clazz_superConstructor (this, java.util.MissingResourceException, [s]); +this.className = className; +this.key = key; +}, "~S,~S,~S"); +Clazz_makeConstructor (c$, +function (message, className, key, cause) { +Clazz_superConstructor (this, java.util.MissingResourceException, [message, cause]); +this.className = className; +this.key = key; +}, "~S,~S,~S,Throwable"); +Clazz_defineMethod (c$, "getClassName", +function () { +return this.className; +}); +Clazz_defineMethod (c$, "getKey", +function () { +return this.key; +}); +}); +Clazz_declarePackage ("jssun.misc"); +Clazz_load (null, "jssun.misc.MessageUtils", ["java.lang.Character", "$.StringBuffer"], function () { +c$ = Clazz_declareType (jssun.misc, "MessageUtils"); +Clazz_makeConstructor (c$, +function () { +}); +c$.subst = Clazz_defineMethod (c$, "subst", +function (patt, arg) { +var args = Clazz_newArray (-1, [arg]); +return jssun.misc.MessageUtils.subst (patt, args); +}, "~S,~S"); +c$.subst = Clazz_defineMethod (c$, "subst", +function (patt, arg1, arg2) { +var args = Clazz_newArray (-1, [arg1, arg2]); +return jssun.misc.MessageUtils.subst (patt, args); +}, "~S,~S,~S"); +c$.subst = Clazz_defineMethod (c$, "subst", +function (patt, arg1, arg2, arg3) { +var args = Clazz_newArray (-1, [arg1, arg2, arg3]); +return jssun.misc.MessageUtils.subst (patt, args); +}, "~S,~S,~S,~S"); +c$.subst = Clazz_defineMethod (c$, "subst", +function (patt, args) { +var result = new StringBuffer (); +var len = patt.length; +for (var i = 0; i >= 0 && i < len; i++) { +var ch = patt.charAt (i); +if (ch == '%') { +if (i != len) { +var index = Character.digit (patt.charAt (i + 1), 10); +if (index == -1) { +result.append (patt.charAt (i + 1)); +i++; +} else if (index < args.length) { +result.append (args[index]); +i++; +}}} else { +result.append (ch); +}} +return result.toString (); +}, "~S,~A"); +c$.substProp = Clazz_defineMethod (c$, "substProp", +function (propName, arg) { +return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg); +}, "~S,~S"); +c$.substProp = Clazz_defineMethod (c$, "substProp", +function (propName, arg1, arg2) { +return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2); +}, "~S,~S,~S"); +c$.substProp = Clazz_defineMethod (c$, "substProp", +function (propName, arg1, arg2, arg3) { +return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2, arg3); +}, "~S,~S,~S,~S"); +c$.toStderr = Clazz_defineMethod (c$, "toStderr", +function (msg) { +{ +System.out.println(msg); +}}, "~S"); +c$.toStdout = Clazz_defineMethod (c$, "toStdout", +function (msg) { +{ +System.out.println(msg); +}}, "~S"); +c$.err = Clazz_defineMethod (c$, "err", +function (s) { +jssun.misc.MessageUtils.toStderr (s + "\n"); +}, "~S"); +c$.out = Clazz_defineMethod (c$, "out", +function (s) { +jssun.misc.MessageUtils.toStdout (s + "\n"); +}, "~S"); +c$.where = Clazz_defineMethod (c$, "where", +function () { +{ +System.out.println(Clazz_getStackTrace()); +}}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.geom.Dimension2D"], "java.awt.Dimension", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.width = 0; +this.height = 0; +Clazz_instantialize (this, arguments); +}, java.awt, "Dimension", java.awt.geom.Dimension2D); +Clazz_makeConstructor (c$, +function () { +this.construct (0, 0); +}); +Clazz_makeConstructor (c$, +function (d) { +this.construct (d.width, d.height); +}, "java.awt.Dimension"); +Clazz_makeConstructor (c$, +function (width, height) { +Clazz_superConstructor (this, java.awt.Dimension, []); +this.width = width; +this.height = height; +}, "~N,~N"); +Clazz_overrideMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz_overrideMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz_defineMethod (c$, "setSize", +function (width, height) { +this.width = Clazz_doubleToInt (Math.ceil (width)); +this.height = Clazz_doubleToInt (Math.ceil (height)); +}, "~N,~N"); +Clazz_defineMethod (c$, "getSize", +function () { +return new java.awt.Dimension (this.width, this.height); +}); +Clazz_defineMethod (c$, "setSize", +function (d) { +this.setSize (d.width, d.height); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "setSize", +function (width, height) { +this.width = width; +this.height = height; +}, "~N,~N"); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (Clazz_instanceOf (obj, java.awt.Dimension)) { +var d = obj; +return (this.width == d.width) && (this.height == d.height); +}return false; +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +var sum = this.width + this.height; +return Clazz_doubleToInt (sum * (sum + 1) / 2) + this.width; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[width=" + this.width + ",height=" + this.height + "]"; +}); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (null, "java.awt.geom.Dimension2D", ["java.lang.InternalError"], function () { +c$ = Clazz_declareType (java.awt.geom, "Dimension2D", null, Cloneable); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "setSize", +function (d) { +this.setSize (d.getWidth (), d.getHeight ()); +}, "java.awt.geom.Dimension2D"); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.geom.Dimension2D, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.Container"], "java.awt.Panel", ["java.awt.FlowLayout"], function () { +c$ = Clazz_declareType (java.awt, "Panel", java.awt.Container); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.Panel, []); +this.setPanel (); +}); +Clazz_defineMethod (c$, "setPanel", +function () { +this.setAppContext (); +this.setLayout ( new java.awt.FlowLayout ()); +}); +Clazz_makeConstructor (c$, +function (layout) { +Clazz_superConstructor (this, java.awt.Panel, []); +if (layout == null) layout = new java.awt.FlowLayout (); +this.setAppContext (); +this.setLayout (layout); +}, "java.awt.LayoutManager"); +Clazz_overrideMethod (c$, "constructComponentName", +function () { +{ +return "panel" + java.awt.Panel.nameCounter++; +}}); +Clazz_defineMethod (c$, "addNotify", +function () { +if (this.peer == null) this.peer = this.getToolkit ().createPanel (this); +Clazz_superCall (this, java.awt.Panel, "addNotify", []); +}); +Clazz_defineStatics (c$, +"base", "panel", +"nameCounter", 0); +}); +Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){ +c$=Clazz_decorateAsClass(function(){ +this.firstIndex=0; +this.lastIndex=0; +this.array=null; +Clazz_instantialize(this,arguments); +},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]); + +Clazz_overrideConstructor(c$, +function(){ +this.setup(0); +}); + +Clazz_defineMethod(c$, "setup", +function(capacity){ +//Clazz_superConstructor(this,java.util.ArrayList,[]); +this.firstIndex=this.lastIndex=0; +try{ +this.array=this.newElementArray(capacity); +}catch(e){ +if(Clazz_instanceOf(e,NegativeArraySizeException)){ +throw new IllegalArgumentException(); +}else{ +throw e; +} +} +},"~N"); +/* +Clazz_makeConstructor(c$, +function(collection){ +Clazz_superConstructor(this,java.util.ArrayList,[]); +var size=collection.size(); +this.firstIndex=this.lastIndex=0; +this.array=this.newElementArray(size+(Math.floor(size/10))); +this.addAll(collection); +},"java.util.Collection"); + +*/ + +Clazz_defineMethod(c$,"newElementArray", +($fz=function(size){ +return new Array(size); +},$fz.isPrivate=true,$fz),"~N"); + +Clazz_overrideMethod(c$,"add", +function(location,object){ + +if (arguments.length == 1) { + // coming from Java methods, e.g. Collections.list() + // location is actually the object + return this.add1(location); +} +var size=this.size(); +if(00)||this.lastIndex==this.array.length){ +System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,location); +}else{ +var index=location+this.firstIndex; +System.arraycopy(this.array,index,this.array,index+1,size-location); +this.lastIndex++; +}this.array[location+this.firstIndex]=object; +}else if(location==0){ +if(this.firstIndex==0){ +this.growAtFront(1); +}this.array[--this.firstIndex]=object; +}else if(location==size){ +if(this.lastIndex==this.array.length){ +this.growAtEnd(1); +}this.array[this.lastIndex++]=object; +}else{ +throw new IndexOutOfBoundsException(); +}this.modCount++; +},"~N,~O"); + +Clazz_overrideMethod(c$,"add1", +function(object){ +if(this.lastIndex==this.array.length){ +this.growAtEnd(1); +}this.array[this.lastIndex++]=object; +this.modCount++; +return true; +},"~O"); + +/* BH disallow addAll(int,List) + * +Clazz_defineMethod(c$,"addAll", +function(location,collection){ +var size=this.size(); +if(location<0||location>size){ +throw new IndexOutOfBoundsException(); +}var growSize=collection.size(); +if(00)||this.lastIndex>this.array.length-growSize){ +var newFirst=this.firstIndex-growSize; +if(newFirst<0){ +var index=location+this.firstIndex; +System.arraycopy(this.array,index,this.array,index-newFirst,size-location); +this.lastIndex-=newFirst; +newFirst=0; +}System.arraycopy(this.array,this.firstIndex,this.array,newFirst,location); +this.firstIndex=newFirst; +}else{ +var index=location+this.firstIndex; +System.arraycopy(this.array,index,this.array,index+growSize,size-location); +this.lastIndex+=growSize; +}}else if(location==0){ +this.growAtFront(growSize); +this.firstIndex-=growSize; +}else if(location==size){ +if(this.lastIndex>this.array.length-growSize){ +this.growAtEnd(growSize); +}this.lastIndex+=growSize; +}if(growSize>0){ +var it=collection.iterator(); +var index=location+this.firstIndex; +var end=index+growSize; +while(index0){ + if(this.lastIndex>this.array.length-growSize){ + this.growAtEnd(growSize); +} +var it=collection.iterator(); +var end=this.lastIndex+growSize; +while(this.lastIndex= i1;) +this.array[i] = null; +},"~N,~N"); + +Clazz_defineMethod(c$,"clone", +function(){ +try{ +var newList=Clazz_superCall(this,java.util.ArrayList,"clone",[]); +newList.array=this.array.clone(); +return newList; +}catch(e){ +if(Clazz_instanceOf(e,CloneNotSupportedException)){ +return null; +}else{ +throw e; +} +} +}); +Clazz_overrideMethod(c$,"contains", +function(object){ +if(object!=null){ +for(var i=this.firstIndex;i0){ +this.growAtFront(minimumCapacity-this.array.length); +}else{ +this.growAtEnd(minimumCapacity-this.array.length); +}}},"~N"); +Clazz_overrideMethod(c$,"get", +function(location){ +if(0<=location&&location=required-(this.array.length-this.lastIndex)){ + var newLast=this.lastIndex-this.firstIndex; + if(size>0){ + System.arraycopy(this.array,this.firstIndex,this.array,0,size); + var start=newLastincrement){ + increment=required; + } + if(increment<12){ + increment=12; + } + var newArray=this.newElementArray(size+increment); + if(size>0){ + System.arraycopy(this.array,this.firstIndex,newArray,this.firstIndex,size); + } + this.array=newArray; +} + +},$fz.isPrivate=true,$fz),"~N"); +Clazz_defineMethod(c$,"growAtFront", +($fz=function(required){ +var size=this.size(); +if(this.array.length-this.lastIndex>=required){ +var newFirst=this.array.length-size; +if(size>0){ +System.arraycopy(this.array,this.firstIndex,this.array,newFirst,size); +var length=this.firstIndex+size>newFirst?newFirst:this.firstIndex+size; +this.fill(this.firstIndex,length); +}this.firstIndex=newFirst; +this.lastIndex=this.array.length; +}else{ +var increment=Math.floor(size/2); +if(required>increment){ +increment=required; +}if(increment<12){ +increment=12; +}var newArray=this.newElementArray(size+increment); +if(size>0){ +System.arraycopy(this.array,this.firstIndex,newArray,newArray.length-size,size); +}this.firstIndex=newArray.length-size; +this.lastIndex=newArray.length; +this.array=newArray; +}},$fz.isPrivate=true,$fz),"~N"); +Clazz_defineMethod(c$,"growForInsert", +($fz=function(location,required){ +var size=this.size(); +var increment=Math.floor(size/2); +if(required>increment){ +increment=required; +}if(increment<12){ +increment=12; +}var newArray=this.newElementArray(size+increment); +if(location=this.firstIndex;i--){ +if(object.equals(this.array[i])){ +return i-this.firstIndex; +}} +}else{ +for(var i=this.lastIndex-1;i>=this.firstIndex;i--){ +if(this.array[i]==null){ +return i-this.firstIndex; +}} +}return-1; +},"~O"); +Clazz_overrideMethod(c$,"remove", +function(location){ +if (0 + location != location)return this.removeObject(location) +var result; +var size=this.size(); +if(0<=location&&location=0&&start<=end&&end<=this.size()){ +if(start==end){ +return; +}var size=this.size(); +if(end==size){ + this.fill(this.firstIndex+start,this.lastIndex); +this.lastIndex=this.firstIndex+start; +}else if(start==0){ + this.fill(this.firstIndex,this.firstIndex+end); +this.firstIndex+=end; +}else{ +System.arraycopy(this.array,this.firstIndex+end,this.array,this.firstIndex+start,size-end); +var newLast=this.lastIndex+start-end; +this.fill(newLast,this.lastIndex); +this.lastIndex=newLast; +}this.modCount++; +}else{ +throw new IndexOutOfBoundsException(); +}},"~N,~N"); +Clazz_overrideMethod(c$,"set", +function(location,object){ +if(0<=location&&locationcontents.length) + contents= new Array(size); +System.arraycopy(this.array,this.firstIndex,contents,0,size); +if(size=0; +}); +Clazz_overrideMethod(c$,"nextIndex", +function(){ +return this.pos+1; +}); +Clazz_overrideMethod(c$,"previous", +function(){ +if(this.expectedModCount==this._list.modCount){ +try{ +var a=this._list.get(this.pos); +this.lastPosition=this.pos; +this.pos--; +return a; +}catch(e){ +if(Clazz_instanceOf(e,IndexOutOfBoundsException)){ +throw new java.util.NoSuchElementException(); +}else{ +throw e; +} +} +}throw new java.util.ConcurrentModificationException(); +}); +Clazz_overrideMethod(c$,"previousIndex", +function(){ +return this.pos; +}); +Clazz_overrideMethod(c$,"set", +function(a){ +if(this.expectedModCount==this._list.modCount){ +try{ +this._list.set(this.lastPosition,a); +}catch(e){ +if(Clazz_instanceOf(e,IndexOutOfBoundsException)){ +throw new IllegalStateException(); +}else{ +throw e; +} +} +}else{ +throw new java.util.ConcurrentModificationException(); +}},"~O"); +c$=Clazz_p0p(); +//}; + + + + +Clazz_pu$h(self.c$); +c$=Clazz_declareType(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess); +c$=Clazz_p0p(); + + + + +Clazz_pu$h(self.c$); +c$=Clazz_decorateAsClass(function(){ +this.fullList=null; +this.offset=0; +this.$size=0; +Clazz_instantialize(this,arguments); +},java.util.AbstractList,"SubAbstractList",java.util.AbstractList); +Clazz_makeConstructor(c$, +function(a,b,c){ +Clazz_superConstructor(this,java.util.AbstractList.SubAbstractList); +this.fullList=a; +this.modCount=this.fullList.modCount; +this.offset=b; +this.$size=c-b; +},"java.util.AbstractList,~N,~N"); +Clazz_defineMethod(c$,"add", +function(a,b){ +if(this.modCount==this.fullList.modCount){ +if(0<=a&&a<=this.$size){ +this.fullList.add(a+this.offset,b); +this.$size++; +this.modCount=this.fullList.modCount; +}else{ +throw new IndexOutOfBoundsException(); +}}else{ +throw new java.util.ConcurrentModificationException(); +}},"~N,~O"); +Clazz_defineMethod(c$,"addAll", +function(a,b){ +if(this.modCount==this.fullList.modCount){ +if(0<=a&&a<=this.$size){ +var c=this.fullList.addAll(a+this.offset,b); +if(c){ +this.$size+=b.size(); +this.modCount=this.fullList.modCount; +}return c; +}throw new IndexOutOfBoundsException(); +}throw new java.util.ConcurrentModificationException(); +},"~N,java.util.Collection"); +Clazz_defineMethod(c$,"addAll", +function(a){ +if(this.modCount==this.fullList.modCount){ +var b=this.fullList.addAll(this.offset+this.$size,a); +if(b){ +this.$size+=a.size(); +this.modCount=this.fullList.modCount; +}return b; +}throw new java.util.ConcurrentModificationException(); +},"java.util.Collection"); +Clazz_defineMethod(c$,"get", +function(a){ +if(this.modCount==this.fullList.modCount){ +if(0<=a&&a=this.start; +}); +Clazz_defineMethod(c$,"next", +function(){ +if(this.iterator.nextIndex()=this.start){ +return this.iterator.previous(); +}throw new java.util.NoSuchElementException(); +}); +Clazz_defineMethod(c$,"previousIndex", +function(){ +var a=this.iterator.previousIndex(); +if(a>=this.start){ +return a-this.start; +}return-1; +}); +Clazz_defineMethod(c$,"remove", +function(){ +this.iterator.remove(); +this.subList.sizeChanged(false); +this.end--; +}); +Clazz_defineMethod(c$,"set", +function(a){ +this.iterator.set(a); +},"~O"); +c$=Clazz_p0p(); +c$=Clazz_p0p(); +}); +// 4/23/2015 1:20:24 PM BH removing need for array.getClass().getComponentType() + +Clazz_load(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){ +c$=Clazz_declareType(java.util,"AbstractCollection",null,java.util.Collection); +Clazz_makeConstructor(c$, +function(){ +}); +Clazz_overrideMethod(c$,"add", +function(object){ +throw new UnsupportedOperationException(); +},"~O"); +Clazz_overrideMethod(c$,"addAll", +function(collection){ +var result=false; +var it=collection.iterator(); +while(it.hasNext()){ +if(this.add(it.next())){ +result=true; +}} +return result; +},"java.util.Collection"); +Clazz_overrideMethod(c$,"clear", +function(){ +var it=this.iterator(); +while(it.hasNext()){ +it.next(); +it.remove(); +} +}); +Clazz_overrideMethod(c$,"contains", +function(object){ +var it=this.iterator(); +if(object!=null){ +while(it.hasNext()){ +if(object.equals(it.next())){ +return true; +}} +}else{ +while(it.hasNext()){ +if(it.next()==null){ +return true; +}} +}return false; +},"~O"); +Clazz_overrideMethod(c$,"containsAll", +function(collection){ +var it=collection.iterator(); +while(it.hasNext()){ +if(!this.contains(it.next())){ +return false; +}} +return true; +},"java.util.Collection"); +Clazz_overrideMethod(c$,"isEmpty", +function(){ +return this.size()==0; +}); +Clazz_overrideMethod(c$,"remove", +function(object){ +var it=this.iterator(); +if(object!=null){ +while(it.hasNext()){ +if(object.equals(it.next())){ +it.remove(); +return true; +}} +}else{ +while(it.hasNext()){ +if(it.next()==null){ +it.remove(); +return true; +}} +}return false; +},"~O"); +Clazz_overrideMethod(c$,"removeAll", +function(collection){ +var result=false; +var it=this.iterator(); +while(it.hasNext()){ +if(collection.contains(it.next())){ +it.remove(); +result=true; +}} +return result; +},"java.util.Collection"); +Clazz_overrideMethod(c$,"retainAll", +function(collection){ +var result=false; +var it=this.iterator(); +while(it.hasNext()){ +if(!collection.contains(it.next())){ +it.remove(); +result=true; +}} +return result; +},"java.util.Collection"); +Clazz_defineMethod(c$,"toArray", +function(){ +var size=this.size(); +var index=0; +var it=this.iterator(); +var array=new Array(size); +while(indexcontents.length){ // BH unnec +//var ct=contents.getClass().getComponentType(); +//contents=java.lang.reflect.Array.newInstance(ct,size); +//} +for(var entry,$entry=this.iterator();$entry.hasNext()&&((entry=$entry.next())||true);){ +contents[index++]=entry; +} +if(index=0){ +//this.elementCount=0; +//this.elementData=this.newElementArray(capacity==0?1:capacity); +//this.loadFactor=0.75; +//this.computeMaxSize(); +//}else{ +//throw new IllegalArgumentException(); +//}},"~N"); +Clazz_makeConstructor(c$, +function(){ +this.construct(16); +}); +Clazz_makeConstructor(c$, +function(capacity){ +Clazz_superConstructor(this,java.util.HashMap,[]); +if(capacity>=0){ +this.elementCount=0; +this.elementData=this.newElementArray(capacity==0?1:capacity); +this.loadFactor=0.75; +this.computeMaxSize(); +}else{ +throw new IllegalArgumentException(); +}},"~N"); +Clazz_makeConstructor(c$, +function(capacity,loadFactor){ +Clazz_superConstructor(this,java.util.HashMap,[]); +if(capacity>=0&&loadFactor>0){ +this.elementCount=0; +this.elementData=this.newElementArray(capacity==0?1:capacity); +this.loadFactor=loadFactor; +this.computeMaxSize(); +}else{ +throw new IllegalArgumentException(); +}},"~N,~N"); +Clazz_makeConstructor(c$, +function(map){ +this.construct(map.size()<6?11:map.size()*2); +Clazz_superCall(this,java.util.HashMap,"putAll",[map]); +},"java.util.Map"); + + +/* +Clazz_makeConstructor(c$, +function(capacity,loadFactor){ +this.doConstruct(capacity,loadFactor); +},"~N,~N"); + +Clazz_defineMethod(c$, "doConstruct", +function(capacity,loadFactor) { +capacity || (capacity = 16); +loadFactor || (loadFactor = 0.75); +if (typeof capacity != "number") { + var map = capacity; + this.loadFactor=loadFactor; + this.elementData=this.newElementArray(map.size()<6?11:map.size()*2); + this.computeMaxSize(); + this.putAllHM(map); + return; +} + +//Clazz_superConstructor(this,java.util.HashMap,[]); +if(capacity>=0&&loadFactor>0){ +this.elementData=this.newElementArray(capacity==0?1:capacity); +this.loadFactor=loadFactor; +this.computeMaxSize(); +}else{ +throw new IllegalArgumentException(); +} +},"~N,~N"); + +//Clazz_makeConstructor(c$, +//function(map){ +//this.construct(map.size()<6?11:map.size()*2); +//Clazz_superCall(this,java.util.HashMap,"putAll",[map]); +//},"java.util.Map"); + +*/ +Clazz_overrideMethod(c$,"clear", +function(){ +if(this.elementCount>0){ +this.elementCount=0; +java.util.Arrays.fill(this.elementData,null); +this.modCount++; +}}); +Clazz_defineMethod(c$,"clone", +function(){ + return this.cloneHM(); +}); + +Clazz_defineMethod(c$,"cloneHM", +function(){ +try{ +var map=this.cloneAM();//Clazz_superCall(this,java.util.HashMap,"clone",[]); +map.elementData=this.newElementArray(this.elementData.length); +var entry; +for(var i=0;i=0;){ +var entry=this.elementData[i]; +while(entry!=null){ +if(value.equals(entry.value)){ +return true; +}entry=entry.next; +} +} +}else{ +for(var i=this.elementData.length;--i>=0;){ +var entry=this.elementData[i]; +while(entry!=null){ +if(entry.value==null){ +return true; +}entry=entry.next; +} +} +}return false; +},"~O"); +Clazz_overrideMethod(c$,"entrySet", +function(){ +return new java.util.HashMap.HashMapEntrySet(this); +}); +Clazz_overrideMethod(c$,"get", +function(key){ +var m=this.getEntry(key); +if(m!=null){ +return m.value; +}return null; +},"~O"); +Clazz_defineMethod(c$,"getEntry", +function(key){ +var index=this.getModuloHash(key); +return this.findEntry(key,index); +},"~O"); +Clazz_defineMethod(c$,"getModuloHash", +function(key){ +if(key==null){ +return 0; +}return(key.hashCode()&0x7FFFFFFF)%this.elementData.length; +},"~O"); +Clazz_defineMethod(c$,"findEntry", +function(key,index){ +var m; +m=this.elementData[index]; +if(key!=null){ +while(m!=null&&!this.keysEqual(key,m)){ +m=m.next; +} +}else{ +while(m!=null&&m.key!=null){ +m=m.next; +} +}return m; +},"~O,~N"); +Clazz_overrideMethod(c$,"isEmpty", +function(){ +return this.elementCount==0; +}); +Clazz_overrideMethod(c$,"keySet", +function(){ +if(this.$keySet==null){ +this.$keySet=((Clazz_isClassDefined("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$()),Clazz_innerTypeInstance(java.util.HashMap$1,this,null)); +}return this.$keySet; +}); +Clazz_overrideMethod(c$,"put", +function(key,value){ +var index=this.getModuloHash(key); +var entry=this.findEntry(key,index); +if(entry==null){ +this.modCount++; +if(++this.elementCount>this.threshold){ +this.rehash(); +index=key==null?0:(key.hashCode()&0x7FFFFFFF)%this.elementData.length; +}entry=this.createEntry(key,index,value); +return null; +}var result=entry.value; +entry.value=value; +return result; +},"~O,~O"); +Clazz_defineMethod(c$,"createEntry", +function(key,index,value){ +var entry=new java.util.HashMap.Entry(key,value); +entry.next=this.elementData[index]; +this.elementData[index]=entry; +return entry; +},"~O,~N,~O"); +Clazz_defineMethod(c$,"putAll", +function(map){ +if(!map.isEmpty()){ +var capacity=this.elementCount+map.size(); +if(capacity>this.threshold){ +this.rehash(capacity); +} +this.putAllHM(map); + +}},"java.util.Map"); +Clazz_defineMethod(c$,"rehash", +function(capacity){ +var length=(capacity==0?1:capacity<<1); +var newData=this.newElementArray(length); +for(var i=0;itwice?min:twice,'\0'); +System.arraycopy(this.value,0,newData,0,this.count); +this.value=newData; +this.shared=false; +},$fz.isPrivate=true,$fz),"~N"); +Clazz_defineMethod(c$,"appendNull", +function(){ +var newSize=this.count+4; +if(newSize>this.value.length){ +this.enlargeBuffer(newSize); +}else if(this.shared){ +this.value=this.value.clone(); +this.shared=false; +}this.value[this.count++]='n'; +this.value[this.count++]='u'; +this.value[this.count++]='l'; +this.value[this.count++]='l'; +}); +Clazz_defineMethod(c$,"append0", +function(chars){ +var newSize=this.count+chars.length; +if(newSize>this.value.length){ +this.enlargeBuffer(newSize); +}else if(this.shared){ +this.value=this.value.clone(); +this.shared=false; +}System.arraycopy(chars,0,this.value,this.count,chars.length); +this.count=newSize; +},"~A"); +Clazz_defineMethod(c$,"append0", +function(chars,start,length){ +if(chars==null){ +throw new NullPointerException(); +}if(start>=0&&0<=length&&length<=chars.length-start){ +var newSize=this.count+length; +if(newSize>this.value.length){ +this.enlargeBuffer(newSize); +}else if(this.shared){ +this.value=this.value.clone(); +this.shared=false; +}System.arraycopy(chars,start,this.value,this.count,length); +this.count=newSize; +}else{ +throw new ArrayIndexOutOfBoundsException(); +}},"~A,~N,~N"); +Clazz_defineMethod(c$,"append0", +function(ch){ +if(this.count==this.value.length){ +this.enlargeBuffer(this.count+1); +}if(this.shared){ +this.value=this.value.clone(); +this.shared=false; +}this.value[this.count++]=ch; +},"~N"); +Clazz_defineMethod(c$,"append0", +function(string){ +if(string==null){ +this.appendNull(); +return; +}var adding=string.length; +var newSize=this.count+adding; +if(newSize>this.value.length){ +this.enlargeBuffer(newSize); +}else if(this.shared){ +this.value=this.value.clone(); +this.shared=false; +}string.getChars(0,adding,this.value,this.count); +this.count=newSize; +},"~S"); +Clazz_defineMethod(c$,"append0", +function(s,start,end){ +if(s==null)s="null"; +if(start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException(); +this.append0(s.subSequence(start,end).toString()); +},"CharSequence,~N,~N"); +Clazz_defineMethod(c$,"capacity", +function(){ +return this.value.length; +}); +Clazz_defineMethod(c$,"charAt", +function(index){ +if(index<0||index>=this.count)throw new StringIndexOutOfBoundsException(index); +return this.value[index]; +},"~N"); +Clazz_defineMethod(c$,"delete0", +function(start,end){ +if(start>=0){ +if(end>this.count){ +end=this.count; +}if(end==start){ +return; +}if(end>start){ +var length=this.count-end; +if(length>0){ +if(!this.shared){ +System.arraycopy(this.value,end,this.value,start,length); +}else{ +var newData=Clazz_newArray(this.value.length,'\0'); +System.arraycopy(this.value,0,newData,0,start); +System.arraycopy(this.value,end,newData,start,length); +this.value=newData; +this.shared=false; +}}this.count-=end-start; +return; +}}throw new StringIndexOutOfBoundsException(); +},"~N,~N"); +Clazz_defineMethod(c$,"deleteCharAt0", +function(location){ +if(0>location||location>=this.count)throw new StringIndexOutOfBoundsException(location); +var length=this.count-location-1; +if(length>0){ +if(!this.shared){ +System.arraycopy(this.value,location+1,this.value,location,length); +}else{ +var newData=Clazz_newArray(this.value.length,'\0'); +System.arraycopy(this.value,0,newData,0,location); +System.arraycopy(this.value,location+1,newData,location,length); +this.value=newData; +this.shared=false; +}}this.count--; +},"~N"); +Clazz_defineMethod(c$,"ensureCapacity", +function(min){ +if(min>this.value.length){ +this.enlargeBuffer(min); +}},"~N"); +Clazz_defineMethod(c$,"getChars", +function(start,end,dest,destStart){ +if(start>this.count||end>this.count||start>end){ +throw new StringIndexOutOfBoundsException(); +}System.arraycopy(this.value,start,dest,destStart,end-start); +},"~N,~N,~A,~N"); +Clazz_defineMethod(c$,"insert0", +function(index,chars){ +if(0>index||index>this.count){ +throw new StringIndexOutOfBoundsException(index); +}if(chars.length!=0){ +this.move(chars.length,index); +System.arraycopy(chars,0,this.value,index,chars.length); +this.count+=chars.length; +}},"~N,~A"); +Clazz_defineMethod(c$,"insert0", +function(index,chars,start,length){ +if(0<=index&&index<=this.count){ +if(start>=0&&0<=length&&length<=chars.length-start){ +if(length!=0){ +this.move(length,index); +System.arraycopy(chars,start,this.value,index,length); +this.count+=length; +}return; +}throw new StringIndexOutOfBoundsException("offset "+start+", len "+length+", array.length "+chars.length); +}throw new StringIndexOutOfBoundsException(index); +},"~N,~A,~N,~N"); +Clazz_defineMethod(c$,"insert0", +function(index,ch){ +if(0>index||index>this.count){ +throw new ArrayIndexOutOfBoundsException(index); +}this.move(1,index); +this.value[index]=ch; +this.count++; +},"~N,~N"); +Clazz_defineMethod(c$,"insert0", +function(index,string){ +if(0<=index&&index<=this.count){ +if(string==null)string="null"; +var min=string.length; +if(min!=0){ +this.move(min,index); +string.getChars(0,min,this.value,index); +this.count+=min; +}}else{ +throw new StringIndexOutOfBoundsException(index); +}},"~N,~S"); +Clazz_defineMethod(c$,"insert0", +function(index,s,start,end){ +if(s==null)s="null"; +if(index<0||index>this.count||start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException(); +this.insert0(index,s.subSequence(start,end).toString()); +},"~N,CharSequence,~N,~N"); +Clazz_defineMethod(c$,"length", +function(){ +return this.count; +}); +Clazz_defineMethod(c$,"move", +($fz=function(size,index){ +var newSize; +if(this.value.length-this.count>=size){ +if(!this.shared){ +System.arraycopy(this.value,index,this.value,index+size,this.count-index); +return; +}newSize=this.value.length; +}else{ +var a=this.count+size; +var b=(this.value.length<<1)+2; +newSize=a>b?a:b; +}var newData=Clazz_newArray(newSize,'\0'); +System.arraycopy(this.value,0,newData,0,index); +System.arraycopy(this.value,index,newData,index+size,this.count-index); +this.value=newData; +this.shared=false; +},$fz.isPrivate=true,$fz),"~N,~N"); +Clazz_defineMethod(c$,"replace0", +function(start,end,string){ +if(start>=0){ +if(end>this.count)end=this.count; +if(end>start){ +var stringLength=string.length; +var diff=end-start-stringLength; +if(diff>0){ +if(!this.shared){ +System.arraycopy(this.value,end,this.value,start+stringLength,this.count-end); +}else{ +var newData=Clazz_newArray(this.value.length,'\0'); +System.arraycopy(this.value,0,newData,0,start); +System.arraycopy(this.value,end,newData,start+stringLength,this.count-end); +this.value=newData; +this.shared=false; +}}else if(diff<0){ +this.move(-diff,end); +}else if(this.shared){ +this.value=this.value.clone(); +this.shared=false; +}string.getChars(0,stringLength,this.value,start); +this.count-=diff; +return; +}if(start==end){ +if(string==null)throw new NullPointerException(); +this.insert0(start,string); +return; +}}throw new StringIndexOutOfBoundsException(); +},"~N,~N,~S"); +Clazz_defineMethod(c$,"reverse0", +function(){ +if(this.count<2){ +return; +}if(!this.shared){ +for(var i=0,end=this.count,mid=Math.floor(this.count/2);iindex||index>=this.count){ +throw new StringIndexOutOfBoundsException(index); +}if(this.shared){ +this.value=this.value.clone(); +this.shared=false; +}this.value[index]=ch; +},"~N,~N"); +Clazz_defineMethod(c$,"setLength", +function(length){ +if(length<0)throw new StringIndexOutOfBoundsException(length); +if(this.countthis.value.length){ +this.enlargeBuffer(length); +}else{ +if(this.shared){ +var newData=Clazz_newArray(this.value.length,'\0'); +System.arraycopy(this.value,0,newData,0,this.count); +this.value=newData; +this.shared=false; +}else{ +for(var i=this.count;i=256&&this.count<=(this.value.length>>1))return String.instantialize(this.value,0,this.count); +this.shared=true; +return String.instantialize(0,this.count,this.value); +}); +Clazz_defineMethod(c$,"subSequence", +function(start,end){ +return this.substring(start,end); +},"~N,~N"); +Clazz_defineMethod(c$,"indexOf", +function(string){ +return this.indexOf(string,0); +},"~S"); +Clazz_defineMethod(c$,"indexOf", +function(subString,start){ +if(start<0)start=0; +var subCount=subString.length; +if(subCount>0){ +if(subCount+start>this.count)return-1; +var firstChar=subString.charAt(0); +while(true){ +var i=start; +var found=false; +for(;ithis.count)return-1; +var o1=i; +var o2=0; +while(++o2=0){ +if(subCount>0){ +if(start>this.count-subCount)start=this.count-subCount; +var firstChar=subString.charAt(0); +while(true){ +var i=start; +var found=false; +for(;i>=0;--i)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){ +found=true; +break; +} +if(!found)return-1; +var o1=i; +var o2=0; +while(++o2 " + to); +if (original.slice) + return original.slice(from, to); + // MSIE and Chrome do not have Int32Array.slice() +var c = Clazz_newIntArray(newLength, 0); +for (var i = 0; i < newLength; i++) + c[i] = original[from++]; +return c; +}, "~A,~N,~N"); + +c$.sort=Clazz_overrideMethod(c$,"sort", +function(a,c,d,e){ + switch (arguments.length) { + case 1: + var aux=a.sort(function(o1,o2){ + if(typeof o1=="string"||o1 instanceof Comparable){ + return o1.compareTo(o2); + } + return o1-o2; + }); + for(var i=0;itoIndex)throw new IllegalArgumentException("fromIndex("+fromIndex+") > toIndex("+toIndex+")"); +if(fromIndex<0)throw new ArrayIndexOutOfBoundsException(fromIndex); +if(toIndex>arrayLen)throw new ArrayIndexOutOfBoundsException(toIndex); +},$fz.isPrivate=true,$fz),"~N,~N,~N"); +c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", +function(a,key){ +var low=0; +var high=a.length-1; +while(low<=high){ +var mid=(low+high)>>1; +var midVal=a[mid]; +if(midValkey)high=mid-1; +else return mid; +} +return-(low+1); +},"~A,~N"); +c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", +function(a,key){ +var low=0; +var high=a.length-1; +while(low<=high){ +var mid=(low+high)>>1; +var midVal=a[mid]; +var cmp=(midVal).compareTo(key); +if(cmp<0)low=mid+1; +else if(cmp>0)high=mid-1; +else return mid; +} +return-(low+1); +},"~A,~O"); +c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", +function(a,key,c){ +if(c==null)return java.util.Arrays.binarySearch(a,key); +var low=0; +var high=a.length-1; +while(low<=high){ +var mid=(low+high)>>1; +var midVal=a[mid]; +var cmp=c.compare(midVal,key); +if(cmp<0)low=mid+1; +else if(cmp>0)high=mid-1; +else return mid; +} +return-(low+1); +},"~A,~O,java.util.Comparator"); +c$.equals=Clazz_defineMethod(c$,"equals", +function(a,a2){ +if(a===a2)return true; +if(a==null||a2==null)return false; +var length=a.length; +if(a2.length!=length)return false; +for(var i=0;i 13) { +throw new IllegalArgumentException ("illegal cursor type"); +}var c = java.awt.Cursor.predefinedPrivate[type]; +if (c == null) { +java.awt.Cursor.predefinedPrivate[type] = c = new java.awt.Cursor (type); +}if (java.awt.Cursor.predefined[type] == null) { +java.awt.Cursor.predefined[type] = c; +}return c; +}, "~N"); +c$.getSystemCustomCursor = Clazz_defineMethod (c$, "getSystemCustomCursor", +function (name) { +return null; +}, "~S"); +c$.getDefaultCursor = Clazz_defineMethod (c$, "getDefaultCursor", +function () { +return java.awt.Cursor.getPredefinedCursor (0); +}); +Clazz_makeConstructor (c$, +function (type) { +if (type < 0 || type > 13) { +throw new IllegalArgumentException ("illegal cursor type"); +}this.type = type; +this.name = "TODO_CURSOR"; +}, "~N"); +Clazz_makeConstructor (c$, +function (name) { +this.type = -1; +this.name = name; +}, "~S"); +Clazz_defineMethod (c$, "getType", +function () { +return this.type; +}); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[" + this.getName () + "]"; +}); +Clazz_defineStatics (c$, +"DEFAULT_CURSOR", 0, +"CROSSHAIR_CURSOR", 1, +"TEXT_CURSOR", 2, +"WAIT_CURSOR", 3, +"SW_RESIZE_CURSOR", 4, +"SE_RESIZE_CURSOR", 5, +"NW_RESIZE_CURSOR", 6, +"NE_RESIZE_CURSOR", 7, +"N_RESIZE_CURSOR", 8, +"S_RESIZE_CURSOR", 9, +"W_RESIZE_CURSOR", 10, +"E_RESIZE_CURSOR", 11, +"HAND_CURSOR", 12, +"MOVE_CURSOR", 13); +c$.predefined = c$.prototype.predefined = new Array (14); +c$.predefinedPrivate = c$.prototype.predefinedPrivate = new Array (14); +Clazz_defineStatics (c$, +"cursorProperties", Clazz_newArray (-1, [ Clazz_newArray (-1, ["AWT.DefaultCursor", "Default Cursor"]), Clazz_newArray (-1, ["AWT.CrosshairCursor", "Crosshair Cursor"]), Clazz_newArray (-1, ["AWT.TextCursor", "Text Cursor"]), Clazz_newArray (-1, ["AWT.WaitCursor", "Wait Cursor"]), Clazz_newArray (-1, ["AWT.SWResizeCursor", "Southwest Resize Cursor"]), Clazz_newArray (-1, ["AWT.SEResizeCursor", "Southeast Resize Cursor"]), Clazz_newArray (-1, ["AWT.NWResizeCursor", "Northwest Resize Cursor"]), Clazz_newArray (-1, ["AWT.NEResizeCursor", "Northeast Resize Cursor"]), Clazz_newArray (-1, ["AWT.NResizeCursor", "North Resize Cursor"]), Clazz_newArray (-1, ["AWT.SResizeCursor", "South Resize Cursor"]), Clazz_newArray (-1, ["AWT.WResizeCursor", "West Resize Cursor"]), Clazz_newArray (-1, ["AWT.EResizeCursor", "East Resize Cursor"]), Clazz_newArray (-1, ["AWT.HandCursor", "Hand Cursor"]), Clazz_newArray (-1, ["AWT.MoveCursor", "Move Cursor"])]), +"CUSTOM_CURSOR", -1); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.lang.Error"], "java.awt.AWTError", null, function () { +c$ = Clazz_declareType (java.awt, "AWTError", Error); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (null, "java.awt.Insets", ["java.lang.InternalError"], function () { +c$ = Clazz_decorateAsClass (function () { +this.top = 0; +this.left = 0; +this.bottom = 0; +this.right = 0; +Clazz_instantialize (this, arguments); +}, java.awt, "Insets", null, [Cloneable, java.io.Serializable]); +Clazz_makeConstructor (c$, +function (top, left, bottom, right) { +this.top = top; +this.left = left; +this.bottom = bottom; +this.right = right; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "set", +function (top, left, bottom, right) { +this.top = top; +this.left = left; +this.bottom = bottom; +this.right = right; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (Clazz_instanceOf (obj, java.awt.Insets)) { +var insets = obj; +return ((this.top == insets.top) && (this.left == insets.left) && (this.bottom == insets.bottom) && (this.right == insets.right)); +}return false; +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +var sum1 = this.left + this.bottom; +var sum2 = this.right + this.top; +var val1 = Clazz_doubleToInt (sum1 * (sum1 + 1) / 2) + this.left; +var val2 = Clazz_doubleToInt (sum2 * (sum2 + 1) / 2) + this.top; +var sum3 = val1 + val2; +return Clazz_doubleToInt (sum3 * (sum3 + 1) / 2) + val2; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]"; +}); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.Insets, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.util.Map", "$.HashMap"], "java.awt.RenderingHints", ["java.lang.IllegalArgumentException", "$.InternalError", "java.util.Collections"], function () { +c$ = Clazz_decorateAsClass (function () { +this.hintmap = null; +Clazz_instantialize (this, arguments); +}, java.awt, "RenderingHints", null, [java.util.Map, Cloneable]); +Clazz_prepareFields (c$, function () { +this.hintmap = new java.util.HashMap (7); +}); +Clazz_overrideMethod (c$, "size", +function () { +return this.hintmap.size (); +}); +Clazz_overrideMethod (c$, "isEmpty", +function () { +return this.hintmap.isEmpty (); +}); +Clazz_overrideMethod (c$, "containsKey", +function (key) { +return this.hintmap.containsKey (key); +}, "~O"); +Clazz_overrideMethod (c$, "containsValue", +function (value) { +return this.hintmap.containsValue (value); +}, "~O"); +Clazz_overrideMethod (c$, "get", +function (key) { +return this.hintmap.get (key); +}, "~O"); +Clazz_overrideMethod (c$, "put", +function (key, value) { +if (!(key).isCompatibleValue (value)) { +throw new IllegalArgumentException (value + " incompatible with " + key); +}return this.hintmap.put (key, value); +}, "~O,~O"); +Clazz_defineMethod (c$, "add", +function (hints) { +this.hintmap.putAll (hints.hintmap); +}, "java.awt.RenderingHints"); +Clazz_overrideMethod (c$, "clear", +function () { +this.hintmap.clear (); +}); +Clazz_overrideMethod (c$, "remove", +function (key) { +return this.hintmap.remove (key); +}, "~O"); +Clazz_overrideMethod (c$, "putAll", +function (m) { +if (java.awt.RenderingHints.isInstance (m)) { +for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.hintmap.put (entry.getKey (), entry.getValue ()); + +} else { +for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.put (entry.getKey (), entry.getValue ()); + +}}, "java.util.Map"); +Clazz_overrideMethod (c$, "keySet", +function () { +return this.hintmap.keySet (); +}); +Clazz_overrideMethod (c$, "values", +function () { +return this.hintmap.values (); +}); +Clazz_overrideMethod (c$, "entrySet", +function () { +return java.util.Collections.unmodifiableMap (this.hintmap).entrySet (); +}); +Clazz_overrideMethod (c$, "equals", +function (o) { +if (Clazz_instanceOf (o, java.awt.RenderingHints)) { +return this.hintmap.equals ((o).hintmap); +} else if (Clazz_instanceOf (o, java.util.Map)) { +return this.hintmap.equals (o); +}return false; +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +return this.hintmap.hashCode (); +}); +Clazz_overrideMethod (c$, "clone", +function () { +var rh; +try { +{ +rh = Clazz_clone(this); +if (this.hintmap != null) { rh.hintmap = +this.hintmap.cloneHM(); } +}} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +return rh; +}); +Clazz_overrideMethod (c$, "toString", +function () { +if (this.hintmap == null) { +return this.getClass ().getName () + "@" + Integer.toHexString (this.hashCode ()) + " (0 hints)"; +}return this.hintmap.toString (); +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.privatekey = 0; +Clazz_instantialize (this, arguments); +}, java.awt.RenderingHints, "Key"); +Clazz_defineMethod (c$, "getIdentity", + function () { +return this.getClass ().getName () + "@" + Integer.toHexString (System.identityHashCode (this.getClass ())) + ":" + Integer.toHexString (this.privatekey); +}); +Clazz_defineMethod (c$, "recordIdentity", + function (a) { +var b = a.getIdentity (); +var c = java.awt.RenderingHints.Key.identitymap.get (b); +if (c != null) { +var d = c; +if (d != null && d.getClass () === a.getClass ()) { +throw new IllegalArgumentException (b + " already registered"); +}}java.awt.RenderingHints.Key.identitymap.put (b, a); +}, "java.awt.RenderingHints.Key"); +Clazz_makeConstructor (c$, +function (a) { +this.privatekey = a; +this.recordIdentity (this); +}, "~N"); +Clazz_defineMethod (c$, "intKey", +function () { +return this.privatekey; +}); +Clazz_overrideMethod (c$, "equals", +function (a) { +return this === a; +}, "~O"); +c$.identitymap = c$.prototype.identitymap = new java.util.HashMap (17); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.description = null; +Clazz_instantialize (this, arguments); +}, java.awt.RenderingHints, "SunKey", java.awt.RenderingHints.Key); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.RenderingHints.SunKey, [a]); +this.description = b; +}, "~N,~S"); +Clazz_defineMethod (c$, "getIndex", +function () { +return this.privatekey; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.description; +}); +Clazz_overrideMethod (c$, "isCompatibleValue", +function (a) { +if (Clazz_instanceOf (a, java.awt.RenderingHints.Value)) { +return (a).isCompatibleKey (this); +}return false; +}, "~O"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.myKey = null; +this.index = 0; +this.description = null; +Clazz_instantialize (this, arguments); +}, java.awt.RenderingHints, "Value"); +c$.register = Clazz_defineMethod (c$, "register", + function (a, b) { +var c = a.getIndex (); +var d = b.getIndex (); +if (java.awt.RenderingHints.Value.ValueObjects[c][d] != null) { +throw new InternalError ("duplicate index: " + d); +}java.awt.RenderingHints.Value.ValueObjects[c][d] = b; +}, "java.awt.RenderingHints.SunKey,java.awt.RenderingHints.Value"); +c$.get = Clazz_defineMethod (c$, "get", +function (a, b) { +return java.awt.RenderingHints.Value.ValueObjects[a][b]; +}, "~N,~N"); +Clazz_makeConstructor (c$, +function (a, b, c) { +this.myKey = a; +this.index = b; +this.description = c; +java.awt.RenderingHints.Value.register (a, this); +}, "java.awt.RenderingHints.SunKey,~N,~S"); +Clazz_defineMethod (c$, "getIndex", +function () { +return this.index; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.description; +}); +Clazz_defineMethod (c$, "isCompatibleKey", +function (a) { +return this.myKey === a; +}, "java.awt.RenderingHints.SunKey"); +Clazz_overrideMethod (c$, "hashCode", +function () { +return this.description.hashCode (); +}); +Clazz_overrideMethod (c$, "equals", +function (a) { +return this === a; +}, "~O"); +c$.ValueObjects = c$.prototype.ValueObjects = Clazz_newArray (9, 8, null); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.RenderingHints, "LCDContrastKey", java.awt.RenderingHints.SunKey); +Clazz_overrideMethod (c$, "isCompatibleValue", +function (a) { +if (Clazz_instanceOf (a, Integer)) { +var b = (a).intValue (); +return b >= 100 && b <= 250; +}return false; +}, "~O"); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"NUM_KEYS", 9, +"VALS_PER_KEY", 8, +"INTKEY_RENDERING", 0, +"INTVAL_RENDER_DEFAULT", 0, +"INTVAL_RENDER_SPEED", 1, +"INTVAL_RENDER_QUALITY", 2, +"INTKEY_ANTIALIASING", 1, +"INTVAL_ANTIALIAS_DEFAULT", 0, +"INTVAL_ANTIALIAS_OFF", 1, +"INTVAL_ANTIALIAS_ON", 2, +"INTKEY_TEXT_ANTIALIASING", 2, +"INTVAL_TEXT_ANTIALIAS_DEFAULT", 0, +"INTVAL_TEXT_ANTIALIAS_OFF", 1, +"INTVAL_TEXT_ANTIALIAS_ON", 2, +"INTVAL_TEXT_ANTIALIAS_GASP", 3, +"INTVAL_TEXT_ANTIALIAS_LCD_HRGB", 4, +"INTVAL_TEXT_ANTIALIAS_LCD_HBGR", 5, +"INTVAL_TEXT_ANTIALIAS_LCD_VRGB", 6, +"INTVAL_TEXT_ANTIALIAS_LCD_VBGR", 7, +"INTKEY_FRACTIONALMETRICS", 3, +"INTVAL_FRACTIONALMETRICS_DEFAULT", 0, +"INTVAL_FRACTIONALMETRICS_OFF", 1, +"INTVAL_FRACTIONALMETRICS_ON", 2, +"INTKEY_DITHERING", 4, +"INTVAL_DITHER_DEFAULT", 0, +"INTVAL_DITHER_DISABLE", 1, +"INTVAL_DITHER_ENABLE", 2, +"INTKEY_INTERPOLATION", 5, +"INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", 0, +"INTVAL_INTERPOLATION_BILINEAR", 1, +"INTVAL_INTERPOLATION_BICUBIC", 2, +"INTKEY_ALPHA_INTERPOLATION", 6, +"INTVAL_ALPHA_INTERPOLATION_DEFAULT", 0, +"INTVAL_ALPHA_INTERPOLATION_SPEED", 1, +"INTVAL_ALPHA_INTERPOLATION_QUALITY", 2, +"INTKEY_COLOR_RENDERING", 7, +"INTVAL_COLOR_RENDER_DEFAULT", 0, +"INTVAL_COLOR_RENDER_SPEED", 1, +"INTVAL_COLOR_RENDER_QUALITY", 2, +"INTKEY_STROKE_CONTROL", 8, +"INTVAL_STROKE_DEFAULT", 0, +"INTVAL_STROKE_NORMALIZE", 1, +"INTVAL_STROKE_PURE", 2, +"INTKEY_AATEXT_LCD_CONTRAST", 100); +c$.KEY_RENDERING = c$.prototype.KEY_RENDERING = new java.awt.RenderingHints.SunKey (0, "Global rendering quality key"); +c$.VALUE_RENDER_SPEED = c$.prototype.VALUE_RENDER_SPEED = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 1, "Fastest rendering methods"); +c$.VALUE_RENDER_QUALITY = c$.prototype.VALUE_RENDER_QUALITY = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 2, "Highest quality rendering methods"); +c$.VALUE_RENDER_DEFAULT = c$.prototype.VALUE_RENDER_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 0, "Default rendering methods"); +c$.KEY_ANTIALIASING = c$.prototype.KEY_ANTIALIASING = new java.awt.RenderingHints.SunKey (1, "Global antialiasing enable key"); +c$.VALUE_ANTIALIAS_ON = c$.prototype.VALUE_ANTIALIAS_ON = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 2, "Antialiased rendering mode"); +c$.VALUE_ANTIALIAS_OFF = c$.prototype.VALUE_ANTIALIAS_OFF = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 1, "Nonantialiased rendering mode"); +c$.VALUE_ANTIALIAS_DEFAULT = c$.prototype.VALUE_ANTIALIAS_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 0, "Default antialiasing rendering mode"); +c$.KEY_FRACTIONALMETRICS = c$.prototype.KEY_FRACTIONALMETRICS = new java.awt.RenderingHints.SunKey (3, "Fractional metrics enable key"); +c$.VALUE_FRACTIONALMETRICS_ON = c$.prototype.VALUE_FRACTIONALMETRICS_ON = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 2, "Fractional text metrics mode"); +c$.VALUE_FRACTIONALMETRICS_OFF = c$.prototype.VALUE_FRACTIONALMETRICS_OFF = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 1, "Integer text metrics mode"); +c$.VALUE_FRACTIONALMETRICS_DEFAULT = c$.prototype.VALUE_FRACTIONALMETRICS_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 0, "Default fractional text metrics mode"); +c$.KEY_DITHERING = c$.prototype.KEY_DITHERING = new java.awt.RenderingHints.SunKey (4, "Dithering quality key"); +c$.VALUE_DITHER_ENABLE = c$.prototype.VALUE_DITHER_ENABLE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 2, "Dithered rendering mode"); +c$.VALUE_DITHER_DISABLE = c$.prototype.VALUE_DITHER_DISABLE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 1, "Nondithered rendering mode"); +c$.VALUE_DITHER_DEFAULT = c$.prototype.VALUE_DITHER_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 0, "Default dithering mode"); +c$.KEY_INTERPOLATION = c$.prototype.KEY_INTERPOLATION = new java.awt.RenderingHints.SunKey (5, "Image interpolation method key"); +c$.VALUE_INTERPOLATION_NEAREST_NEIGHBOR = c$.prototype.VALUE_INTERPOLATION_NEAREST_NEIGHBOR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 0, "Nearest Neighbor image interpolation mode"); +c$.VALUE_INTERPOLATION_BILINEAR = c$.prototype.VALUE_INTERPOLATION_BILINEAR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 1, "Bilinear image interpolation mode"); +c$.VALUE_INTERPOLATION_BICUBIC = c$.prototype.VALUE_INTERPOLATION_BICUBIC = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 2, "Bicubic image interpolation mode"); +c$.KEY_ALPHA_INTERPOLATION = c$.prototype.KEY_ALPHA_INTERPOLATION = new java.awt.RenderingHints.SunKey (6, "Alpha blending interpolation method key"); +c$.VALUE_ALPHA_INTERPOLATION_SPEED = c$.prototype.VALUE_ALPHA_INTERPOLATION_SPEED = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 1, "Fastest alpha blending methods"); +c$.VALUE_ALPHA_INTERPOLATION_QUALITY = c$.prototype.VALUE_ALPHA_INTERPOLATION_QUALITY = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 2, "Highest quality alpha blending methods"); +c$.VALUE_ALPHA_INTERPOLATION_DEFAULT = c$.prototype.VALUE_ALPHA_INTERPOLATION_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 0, "Default alpha blending methods"); +c$.KEY_COLOR_RENDERING = c$.prototype.KEY_COLOR_RENDERING = new java.awt.RenderingHints.SunKey (7, "Color rendering quality key"); +c$.VALUE_COLOR_RENDER_SPEED = c$.prototype.VALUE_COLOR_RENDER_SPEED = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 1, "Fastest color rendering mode"); +c$.VALUE_COLOR_RENDER_QUALITY = c$.prototype.VALUE_COLOR_RENDER_QUALITY = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 2, "Highest quality color rendering mode"); +c$.VALUE_COLOR_RENDER_DEFAULT = c$.prototype.VALUE_COLOR_RENDER_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 0, "Default color rendering mode"); +c$.KEY_STROKE_CONTROL = c$.prototype.KEY_STROKE_CONTROL = new java.awt.RenderingHints.SunKey (8, "Stroke normalization control key"); +c$.VALUE_STROKE_DEFAULT = c$.prototype.VALUE_STROKE_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 0, "Default stroke normalization"); +c$.VALUE_STROKE_NORMALIZE = c$.prototype.VALUE_STROKE_NORMALIZE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 1, "Normalize strokes for consistent rendering"); +c$.VALUE_STROKE_PURE = c$.prototype.VALUE_STROKE_PURE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 2, "Pure stroke conversion for accurate paths"); +c$.KEY_TEXT_ANTIALIASING = c$.prototype.KEY_TEXT_ANTIALIASING = new java.awt.RenderingHints.SunKey (2, "Text-specific antialiasing enable key"); +c$.VALUE_TEXT_ANTIALIAS_ON = c$.prototype.VALUE_TEXT_ANTIALIAS_ON = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 2, "Antialiased text mode"); +c$.VALUE_TEXT_ANTIALIAS_OFF = c$.prototype.VALUE_TEXT_ANTIALIAS_OFF = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 1, "Nonantialiased text mode"); +c$.VALUE_TEXT_ANTIALIAS_DEFAULT = c$.prototype.VALUE_TEXT_ANTIALIAS_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 0, "Default antialiasing text mode"); +c$.VALUE_TEXT_ANTIALIAS_GASP = c$.prototype.VALUE_TEXT_ANTIALIAS_GASP = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 3, "gasp antialiasing text mode"); +c$.VALUE_TEXT_ANTIALIAS_LCD_HRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HRGB = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 4, "LCD HRGB antialiasing text mode"); +c$.VALUE_TEXT_ANTIALIAS_LCD_HBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HBGR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 5, "LCD HBGR antialiasing text mode"); +c$.VALUE_TEXT_ANTIALIAS_LCD_VRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VRGB = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 6, "LCD VRGB antialiasing text mode"); +c$.VALUE_TEXT_ANTIALIAS_LCD_VBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VBGR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 7, "LCD VBGR antialiasing text mode"); +c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = new java.awt.RenderingHints.LCDContrastKey (100, "Text-specific LCD contrast key"); +c$.KEY_TEXT_LCD_CONTRAST = c$.prototype.KEY_TEXT_LCD_CONTRAST = java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST; +}); +//BH note: a declared static superclass must come before a static class referencing it + +Clazz_load(["java.util.AbstractList","$.AbstractMap","$.AbstractSet","$.Collection","$.Iterator","$.List","$.ListIterator","$.Map","$.RandomAccess","$.Set","$.SortedMap","$.SortedSet","java.lang.NullPointerException","$.UnsupportedOperationException","java.lang.reflect.Array"],"java.util.Collections",["java.lang.ArrayIndexOutOfBoundsException","$.ClassCastException","$.IllegalArgumentException","$.IndexOutOfBoundsException","java.util.ArrayList","$.Arrays","$.Enumeration","java.util.Map.Entry","java.util.NoSuchElementException","$.Random"],function(){ +c$=Clazz_declareType(java.util,"Collections"); +c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", +function(list,object){ +if(list==null){ +throw new NullPointerException(); +}if(list.isEmpty()){ +return-1; +}var key=object; +if(!(Clazz_instanceOf(list,java.util.RandomAccess))){ +var it=list.listIterator(); +while(it.hasNext()){ +var result; +if((result=key.compareTo(it.next()))<=0){ +if(result==0){ +return it.previousIndex(); +}return-it.previousIndex()-1; +}} +return-list.size()-1; +}var low=0; +var mid=list.size(); +var high=mid-1; +var result=-1; +while(low<=high){ +mid=(low+high)>>1; +if((result=key.compareTo(list.get(mid)))>0){ +low=mid+1; +}else if(result==0){ +return mid; +}else{ +high=mid-1; +}} +return-mid-(result<0?1:2); +},"java.util.List,~O"); +c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", +function(list,object,comparator){ +if(comparator==null){ +return java.util.Collections.binarySearch(list,object); +}if(!(Clazz_instanceOf(list,java.util.RandomAccess))){ +var it=list.listIterator(); +while(it.hasNext()){ +var result; +if((result=comparator.compare(object,it.next()))<=0){ +if(result==0){ +return it.previousIndex(); +}return-it.previousIndex()-1; +}} +return-list.size()-1; +}var low=0; +var mid=list.size(); +var high=mid-1; +var result=-1; +while(low<=high){ +mid=(low+high)>>1; +if((result=comparator.compare(object,list.get(mid)))>0){ +low=mid+1; +}else if(result==0){ +return mid; +}else{ +high=mid-1; +}} +return-mid-(result<0?1:2); +},"java.util.List,~O,java.util.Comparator"); +c$.copy=Clazz_defineMethod(c$,"copy", +function(destination,source){ +if(destination.size()0){ +min=next; +}} +return min; +},"java.util.Collection"); +c$.min=Clazz_defineMethod(c$,"min", +function(collection,comparator){ +var it=collection.iterator(); +var min=it.next(); +while(it.hasNext()){ +var next=it.next(); +if(comparator.compare(min,next)>0){ +min=next; +}} +return min; +},"java.util.Collection,java.util.Comparator"); +c$.nCopies=Clazz_defineMethod(c$,"nCopies", +function(length,object){ +return new java.util.Collections.CopiesList(length,object); +},"~N,~O"); +c$.reverse=Clazz_defineMethod(c$,"reverse", +function(list){ +var size=list.size(); +var front=list.listIterator(); +var back=list.listIterator(size); +for(var i=0;i0;i--){ +var index=random.nextInt()%(i+1); +if(index<0){ +index=-index; +}var temp=array[i]; +array[i]=array[index]; +array[index]=temp; +} +var i=0; +var it=list.listIterator(); +while(it.hasNext()){ +it.next(); +it.set(array[i++]); +} +}else{ +var rawList=list; +for(var i=rawList.size()-1;i>0;i--){ +var index=random.nextInt()%(i+1); +if(index<0){ +index=-index; +}rawList.set(index,rawList.set(i,rawList.get(index))); +} +}},"java.util.List,java.util.Random"); +c$.singleton=Clazz_defineMethod(c$,"singleton", +function(object){ +return new java.util.Collections.SingletonSet(object); +},"~O"); +c$.singletonList=Clazz_defineMethod(c$,"singletonList", +function(object){ +return new java.util.Collections.SingletonList(object); +},"~O"); +c$.singletonMap=Clazz_defineMethod(c$,"singletonMap", +function(key,value){ +return new java.util.Collections.SingletonMap(key,value); +},"~O,~O"); +c$.sort=Clazz_defineMethod(c$,"sort", +function(list){ +var array=list.toArray(); +java.util.Arrays.sort(array); +var i=0; +var it=list.listIterator(); +while(it.hasNext()){ +it.next(); +it.set(array[i++]); +} +},"java.util.List"); +c$.sort=Clazz_defineMethod(c$,"sort", +function(list,comparator){ +var array=list.toArray(new Array(list.size())); +java.util.Arrays.sort(array,comparator); +var i=0; +var it=list.listIterator(); +while(it.hasNext()){ +it.next(); +it.set(array[i++]); +} +},"java.util.List,java.util.Comparator"); +c$.swap=Clazz_defineMethod(c$,"swap", +function(list,index1,index2){ +if(list==null){ +throw new NullPointerException(); +}if(index1==index2){ +return; +}var rawList=list; +rawList.set(index2,rawList.set(index1,rawList.get(index2))); +},"java.util.List,~N,~N"); +c$.replaceAll=Clazz_defineMethod(c$,"replaceAll", +function(list,obj,obj2){ +var index; +var found=false; +while((index=list.indexOf(obj))>-1){ +found=true; +list.set(index,obj2); +} +return found; +},"java.util.List,~O,~O"); +c$.rotate=Clazz_defineMethod(c$,"rotate", +function(lst,dist){ +var list=lst; +var size=list.size(); +if(size==0){ +return; +}var normdist; +if(dist>0){ +normdist=dist%size; +}else{ +normdist=size-((dist%size)*(-1)); +}if(normdist==0||normdist==size){ +return; +}if(Clazz_instanceOf(list,java.util.RandomAccess)){ +var temp=list.get(0); +var index=0; +var beginIndex=0; +for(var i=0;isize){ +return-1; +}if(sublistSize==0){ +return 0; +}var firstObj=sublist.get(0); +var index=list.indexOf(firstObj); +if(index==-1){ +return-1; +}while(index=sublistSize)){ +var listIt=list.listIterator(index); +if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){ +var sublistIt=sublist.listIterator(1); +var difFound=false; +while(sublistIt.hasNext()){ +var element=sublistIt.next(); +if(!listIt.hasNext()){ +return-1; +}if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){ +difFound=true; +break; +}} +if(!difFound){ +return index; +}}index++; +} +return-1; +},"java.util.List,java.util.List"); +c$.lastIndexOfSubList=Clazz_defineMethod(c$,"lastIndexOfSubList", +function(list,sublist){ +var sublistSize=sublist.size(); +var size=list.size(); +if(sublistSize>size){ +return-1; +}if(sublistSize==0){ +return size; +}var lastObj=sublist.get(sublistSize-1); +var index=list.lastIndexOf(lastObj); +while((index>-1)&&(index+1>=sublistSize)){ +var listIt=list.listIterator(index+1); +if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){ +var sublistIt=sublist.listIterator(sublistSize-1); +var difFound=false; +while(sublistIt.hasPrevious()){ +var element=sublistIt.previous(); +if(!listIt.hasPrevious()){ +return-1; +}if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){ +difFound=true; +break; +}} +if(!difFound){ +return listIt.nextIndex(); +}}index--; +} +return-1; +},"java.util.List,java.util.List"); +c$.list=Clazz_defineMethod(c$,"list", +function(enumeration){ +var list=new java.util.ArrayList(); +while(enumeration.hasMoreElements()){ +list.add(enumeration.nextElement()); +} +return list; +},"java.util.Enumeration"); +c$.synchronizedCollection=Clazz_defineMethod(c$,"synchronizedCollection", +function(collection){ +if(collection==null){ +throw new NullPointerException(); +}return new java.util.Collections.SynchronizedCollection(collection); +},"java.util.Collection"); +c$.synchronizedList=Clazz_defineMethod(c$,"synchronizedList", +function(list){ +if(list==null){ +throw new NullPointerException(); +}if(Clazz_instanceOf(list,java.util.RandomAccess)){ +return new java.util.Collections.SynchronizedRandomAccessList(list); +}return new java.util.Collections.SynchronizedList(list); +},"java.util.List"); +c$.synchronizedMap=Clazz_defineMethod(c$,"synchronizedMap", +function(map){ +if(map==null){ +throw new NullPointerException(); +}return new java.util.Collections.SynchronizedMap(map); +},"java.util.Map"); +c$.synchronizedSet=Clazz_defineMethod(c$,"synchronizedSet", +function(set){ +if(set==null){ +throw new NullPointerException(); +}return new java.util.Collections.SynchronizedSet(set); +},"java.util.Set"); +c$.synchronizedSortedMap=Clazz_defineMethod(c$,"synchronizedSortedMap", +function(map){ +if(map==null){ +throw new NullPointerException(); +}return new java.util.Collections.SynchronizedSortedMap(map); +},"java.util.SortedMap"); +c$.synchronizedSortedSet=Clazz_defineMethod(c$,"synchronizedSortedSet", +function(set){ +if(set==null){ +throw new NullPointerException(); +}return new java.util.Collections.SynchronizedSortedSet(set); +},"java.util.SortedSet"); +c$.unmodifiableCollection=Clazz_defineMethod(c$,"unmodifiableCollection", +function(collection){ +if(collection==null){ +throw new NullPointerException(); +}return new java.util.Collections.UnmodifiableCollection(collection); +},"java.util.Collection"); +c$.unmodifiableList=Clazz_defineMethod(c$,"unmodifiableList", +function(list){ +if(list==null){ +throw new NullPointerException(); +}if(Clazz_instanceOf(list,java.util.RandomAccess)){ +return new java.util.Collections.UnmodifiableRandomAccessList(list); +}return new java.util.Collections.UnmodifiableList(list); +},"java.util.List"); +c$.unmodifiableMap=Clazz_defineMethod(c$,"unmodifiableMap", +function(map){ +if(map==null){ +throw new NullPointerException(); +}return new java.util.Collections.UnmodifiableMap(map); +},"java.util.Map"); +c$.unmodifiableSet=Clazz_defineMethod(c$,"unmodifiableSet", +function(set){ +if(set==null){ +throw new NullPointerException(); +}return new java.util.Collections.UnmodifiableSet(set); +},"java.util.Set"); +c$.unmodifiableSortedMap=Clazz_defineMethod(c$,"unmodifiableSortedMap", +function(map){ +if(map==null){ +throw new NullPointerException(); +}return new java.util.Collections.UnmodifiableSortedMap(map); +},"java.util.SortedMap"); +c$.unmodifiableSortedSet=Clazz_defineMethod(c$,"unmodifiableSortedSet", +function(set){ +if(set==null){ +throw new NullPointerException(); +}return new java.util.Collections.UnmodifiableSortedSet(set); +},"java.util.SortedSet"); +c$.frequency=Clazz_defineMethod(c$,"frequency", +function(c,o){ +if(c==null){ +throw new NullPointerException(); +}if(c.isEmpty()){ +return 0; +} +var result=0; +var itr=c.iterator(); +while(itr.hasNext()){ +var e=itr.next(); +if(o==null?e==null:o.equals(e)){ +result++; +}} +return result; +},"java.util.Collection,~O"); + +c$.emptyList=Clazz_defineMethod(c$,"emptyList", +function(){ +return java.util.Collections.EMPTY_LIST; +}); +c$.emptySet=Clazz_defineMethod(c$,"emptySet", +function(){ +return java.util.Collections.EMPTY_SET; +}); +c$.emptyMap=Clazz_defineMethod(c$,"emptyMap", +function(){ +return java.util.Collections.EMPTY_MAP; +}); +c$.checkedCollection=Clazz_defineMethod(c$,"checkedCollection", +function(c,type){ +return new java.util.Collections.CheckedCollection(c,type); +},"java.util.Collection,Class"); +c$.checkedMap=Clazz_defineMethod(c$,"checkedMap", +function(m,keyType,valueType){ +return new java.util.Collections.CheckedMap(m,keyType,valueType); +},"java.util.Map,Class,Class"); +c$.checkedList=Clazz_defineMethod(c$,"checkedList", +function(list,type){ +if(Clazz_instanceOf(list,java.util.RandomAccess)){ +return new java.util.Collections.CheckedRandomAccessList(list,type); +}return new java.util.Collections.CheckedList(list,type); +},"java.util.List,Class"); +c$.checkedSet=Clazz_defineMethod(c$,"checkedSet", +function(s,type){ +return new java.util.Collections.CheckedSet(s,type); +},"java.util.Set,Class"); +c$.checkedSortedMap=Clazz_defineMethod(c$,"checkedSortedMap", +function(m,keyType,valueType){ +return new java.util.Collections.CheckedSortedMap(m,keyType,valueType); +},"java.util.SortedMap,Class,Class"); +c$.checkedSortedSet=Clazz_defineMethod(c$,"checkedSortedSet", +function(s,type){ +return new java.util.Collections.CheckedSortedSet(s,type); +},"java.util.SortedSet,Class"); +c$.addAll=Clazz_defineMethod(c$,"addAll", +function(c,a){ +var modified=false; +for(var i=0;ic1.size()){ +var tmp=c1; +c1=c2; +c2=tmp; +}var it=c1.iterator(); +while(it.hasNext()){ +if(c2.contains(it.next())){ +return false; +}} +return true; +},"java.util.Collection,java.util.Collection"); +c$.checkType=Clazz_defineMethod(c$,"checkType", +function(obj,type){ +if(!type.isInstance(obj)){ +throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type); +}return obj; +},"~O,Class"); + +c$.$Collections$1$=function(c){ +Clazz_pu$h(self.c$); +c$=Clazz_decorateAsClass(function(){ +Clazz_prepareCallback(this,arguments); +this.it=null; +Clazz_instantialize(this,arguments); +},java.util,"Collections$1",null,java.util.Enumeration); + +Clazz_prepareFields(c$,function(){ +this.it=c.iterator(); +}); + +Clazz_defineMethod(c$,"hasMoreElements", +function(){ +return this.it.hasNext(); +}); +Clazz_defineMethod(c$,"nextElement", +function(){ +return this.it.next(); +}); +c$=Clazz_p0p(); +}; + +Clazz_pu$h(self.c$); +c$=Clazz_decorateAsClass(function(){ +this.n=0; +this.element=null; +Clazz_instantialize(this,arguments); +},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable); +Clazz_makeConstructor(c$, +function(a,b){ +Clazz_superConstructor(this,java.util.Collections.CopiesList,[]); +if(a<0){ +throw new IllegalArgumentException(); +}this.n=a; +this.element=b; +},"~N,~O"); +Clazz_overrideMethod(c$,"contains", +function(a){ +return this.element==null?a==null:this.element.equals(a); +},"~O"); +Clazz_overrideMethod(c$,"size", +function(){ +return this.n; +}); +Clazz_overrideMethod(c$,"get", +function(a){ +if(0<=a&&a=0;){ +b[d]=c.next(); +} +return b; +}); +Clazz_defineMethod(c$,"toArray", +function(a){ +var b=this.c.size(); +var c=0; +var d=this.iterator(); +if(b>a.length){ +var e=a.getClass().getComponentType(); +a=java.lang.reflect.Array.newInstance(e,b); +}while(c>>(48-bits)); +},"~N"); +Clazz_defineMethod(c$,"nextBoolean", +function(){ +return Math.random()>0.5; +}); +Clazz_defineMethod(c$,"nextBytes", +function(buf){ +for(var i=0;i=1); +var norm=Math.sqrt(-2*Math.log(s)/s); +this.nextNextGaussian=v2*norm; +this.haveNextNextGaussian=true; +return v1*norm; +}); +Clazz_defineMethod(c$,"nextInt", +function(){ +return Math.ceil(0xffff*Math.random())-0x8000; +}); +Clazz_defineMethod(c$,"nextInt", +function(n){ +if(n>0){ +n = Math.min(n, 31); +return Math.floor((2 << (n - 1)) * Math.random()) + +/* +if((n&-n)==n){ +return((n*this.next(31))>>31); +}var bits; +var val; +do{ +bits=this.next(31); +val=bits%n; +}while(bits-val+(n-1)<0); + + +return val; + +*/ +} +throw new IllegalArgumentException(); +},"~N"); +Clazz_defineMethod(c$,"nextLong", +function(){ +return Math.ceil(0xffffffff*Math.random())-0x80000000; +}); +Clazz_defineMethod(c$,"setSeed", +function(seed){ +Math.seedrandom(seed); +//this.seed=(seed^25214903917)&(281474976710655); +//this.haveNextNextGaussian=false; +},"~N"); +Clazz_defineStatics(c$, +"multiplier",0x5deece66d); +}); + +// seedrandom.js +// Author: David Bau 3/11/2010 +// +// Defines a method Math.seedrandom() that, when called, substitutes +// an explicitly seeded RC4-based algorithm for Math.random(). Also +// supports automatic seeding from local or network sources of entropy. +// +// Usage: +// +// +// +// Math.seedrandom('yipee'); Sets Math.random to a function that is +// initialized using the given explicit seed. +// +// Math.seedrandom(); Sets Math.random to a function that is +// seeded using the current time, dom state, +// and other accumulated local entropy. +// The generated seed string is returned. +// +// Math.seedrandom('yowza', true); +// Seeds using the given explicit seed mixed +// together with accumulated entropy. +// +// +// Seeds using physical random bits downloaded +// from random.org. +// +// Examples: +// +// Math.seedrandom("hello"); // Use "hello" as the seed. +// document.write(Math.random()); // Always 0.5463663768140734 +// document.write(Math.random()); // Always 0.43973793770592234 +// var rng1 = Math.random; // Remember the current prng. +// +// var autoseed = Math.seedrandom(); // New prng with an automatic seed. +// document.write(Math.random()); // Pretty much unpredictable. +// +// Math.random = rng1; // Continue "hello" prng sequence. +// document.write(Math.random()); // Always 0.554769432473455 +// +// Math.seedrandom(autoseed); // Restart at the previous seed. +// document.write(Math.random()); // Repeat the 'unpredictable' value. +// +// Notes: +// +// Each time seedrandom('arg') is called, entropy from the passed seed +// is accumulated in a pool to help generate future seeds for the +// zero-argument form of Math.seedrandom, so entropy can be injected over +// time by calling seedrandom with explicit data repeatedly. +// +// On speed - This javascript implementation of Math.random() is about +// 3-10x slower than the built-in Math.random() because it is not native +// code, but this is typically fast enough anyway. Seeding is more expensive, +// especially if you use auto-seeding. Some details (timings on Chrome 4): +// +// Our Math.random() - avg less than 0.002 milliseconds per call +// seedrandom('explicit') - avg less than 0.5 milliseconds per call +// seedrandom('explicit', true) - avg less than 2 milliseconds per call +// seedrandom() - avg about 38 milliseconds per call +// +// LICENSE (BSD): +// +// Copyright 2010 David Bau, all rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of this module nor the names of its contributors may +// be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +/** + * All code is in an anonymous closure to keep the global namespace clean. + * + * @param {number=} overflow + * @param {number=} startdenom + */ +(function (pool, math, width, chunks, significance, overflow, startdenom) { + +var copyright = "Copyright 2010 David Bau, all rights reserved. (BSD)" +// +// seedrandom() +// This is the seedrandom function described above. +// +math['seedrandom'] = function seedrandom(seed, use_entropy) { + var key = []; + var arc4; + + // Flatten the seed string or build one from local entropy if needed. + seed = mixkey(flatten( + use_entropy ? [seed, pool] : + arguments.length ? seed : + [new Date().getTime(), pool, window], 3), key); + + // Use the seed to initialize an ARC4 generator. + arc4 = new ARC4(key); + + // Mix the randomness into accumulated entropy. + mixkey(arc4.S, pool); + + // Override Math.random + + // This function returns a random double in [0, 1) that contains + // randomness in every bit of the mantissa of the IEEE 754 value. + + math['random'] = function random() { // Closure to return a random double: + var n = arc4.g(chunks); // Start with a numerator n < 2 ^ 48 + var d = startdenom; // and denominator d = 2 ^ 48. + var x = 0; // and no 'extra last byte'. + while (n < significance) { // Fill up all significant digits by + n = (n + x) * width; // shifting numerator and + d *= width; // denominator and generating a + x = arc4.g(1); // new least-significant-byte. + } + while (n >= overflow) { // To avoid rounding up, before adding + n /= 2; // last byte, shift everything + d /= 2; // right using integer math until + x >>>= 1; // we have exactly the desired bits. + } + return (n + x) / d; // Form the number within [0, 1). + }; + + // Return the seed that was used + return seed; +}; + +// +// ARC4 +// +// An ARC4 implementation. The constructor takes a key in the form of +// an array of at most (width) integers that should be 0 <= x < (width). +// +// The g(count) method returns a pseudorandom integer that concatenates +// the next (count) outputs from ARC4. Its return value is a number x +// that is in the range 0 <= x < (width ^ count). +// +/** @constructor */ +function ARC4(key) { + var t, u, me = this, keylen = key.length; + var i = 0, j = me.i = me.j = me.m = 0; + me.S = []; + me.c = []; + + // The empty key [] is treated as [0]. + if (!keylen) { key = [keylen++]; } + + // Set up S using the standard key scheduling algorithm. + while (i < width) { me.S[i] = i++; } + for (i = 0; i < width; i++) { + t = me.S[i]; + j = lowbits(j + t + key[i % keylen]); + u = me.S[j]; + me.S[i] = u; + me.S[j] = t; + } + + // The "g" method returns the next (count) outputs as one number. + me.g = function getnext(count) { + var s = me.S; + var i = lowbits(me.i + 1); var t = s[i]; + var j = lowbits(me.j + t); var u = s[j]; + s[i] = u; + s[j] = t; + var r = s[lowbits(t + u)]; + while (--count) { + i = lowbits(i + 1); t = s[i]; + j = lowbits(j + t); u = s[j]; + s[i] = u; + s[j] = t; + r = r * width + s[lowbits(t + u)]; + } + me.i = i; + me.j = j; + return r; + }; + // For robust unpredictability discard an initial batch of values. + // See http://www.rsa.com/rsalabs/node.asp?id=2009 + me.g(width); +} + +// +// flatten() +// Converts an object tree to nested arrays of strings. +// +/** @param {Object=} result + * @param {string=} prop */ +function flatten(obj, depth, result, prop) { + result = []; + if (depth && typeof(obj) == 'object') { + for (prop in obj) { + if (prop.indexOf('S') < 5) { // Avoid FF3 bug (local/sessionStorage) + try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {} + } + } + } + return result.length ? result : '' + obj; +} + +// +// mixkey() +// Mixes a string seed into a key that is an array of integers, and +// returns a shortened string seed that is equivalent to the result key. +// +/** @param {number=} smear + * @param {number=} j */ +function mixkey(seed, key, smear, j) { + seed += ''; // Ensure the seed is a string + smear = 0; + for (j = 0; j < seed.length; j++) { + key[lowbits(j)] = + lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j)); + } + seed = ''; + for (j in key) { seed += String.fromCharCode(key[j]); } + return seed; +} + +// +// lowbits() +// A quick "n mod width" for width a power of 2. +// +function lowbits(n) { return n & (width - 1); } + +// +// The following constants are related to IEEE 754 limits. +// +startdenom = math.pow(width, chunks); +significance = math.pow(2, significance); +overflow = significance * 2; + +// +// When seedrandom.js is loaded, we immediately mix a few bits +// from the built-in RNG into the entropy pool. Because we do +// not want to intefere with determinstic PRNG state later, +// seedrandom will not call math.random on its own again after +// initialization. +// +mixkey(math.random(), pool); + +// End anonymous scope, and pass initial values. +})( + [], // pool: entropy pool starts empty + Math, // math: package containing random, pow, and seedrandom + 256, // width: each RC4 output is 0 <= x < 256 + 6, // chunks: at least six RC4 outputs for each double + 52 // significance: there are 52 significant digits in a double +); + +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.util.EventListenerProxy", "java.awt.event.AWTEventListener"], "java.awt.event.AWTEventListenerProxy", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.eventMask = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "AWTEventListenerProxy", java.util.EventListenerProxy, java.awt.event.AWTEventListener); +Clazz_makeConstructor (c$, +function (eventMask, listener) { +Clazz_superConstructor (this, java.awt.event.AWTEventListenerProxy, [listener]); +this.eventMask = eventMask; +}, "~N,java.awt.event.AWTEventListener"); +Clazz_defineMethod (c$, "eventDispatched", +function (evt) { +(this.getListener ()).eventDispatched (evt); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "getEventMask", +function () { +return this.eventMask; +}); +}); +Clazz_declarePackage ("java.beans"); +Clazz_load (["java.beans.ChangeListenerMap"], "java.beans.PropertyChangeSupport", ["java.lang.Boolean", "$.NullPointerException", "java.beans.IndexedPropertyChangeEvent", "$.PropertyChangeEvent", "$.PropertyChangeListenerProxy"], function () { +c$ = Clazz_decorateAsClass (function () { +this.map = null; +this.source = null; +Clazz_instantialize (this, arguments); +}, java.beans, "PropertyChangeSupport"); +Clazz_prepareFields (c$, function () { +this.map = new java.beans.PropertyChangeSupport.PropertyChangeListenerMap (); +}); +Clazz_makeConstructor (c$, +function (sourceBean) { +if (sourceBean == null) { +throw new NullPointerException (); +}this.source = sourceBean; +}, "~O"); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (listener) { +this.addPropertyChangeListener1 (listener); +}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "addPropertyChangeListener1", +function (listener) { +if (listener == null) { +return; +}if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) { +var proxy = listener; +this.addPropertyChangeListener (proxy.getPropertyName (), proxy.getListener ()); +} else { +this.map.add (null, listener); +}}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "removePropertyChangeListener", +function (listener) { +if (listener == null) { +return; +}if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) { +var proxy = listener; +this.removePropertyChangeListener (proxy.getPropertyName (), proxy.getListener ()); +} else { +this.map.remove (null, listener); +}}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function () { +return this.map.getListeners (); +}); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (propertyName, listener) { +{ +if (arguments.length == 1) { +this.addPropertyChangeListener1(propertyName); +return; +} +}this.addPropertyChangeListener2 (propertyName, listener); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "addPropertyChangeListener2", +function (propertyName, listener) { +if (listener == null || propertyName == null) { +return; +}listener = this.map.extract (listener); +if (listener != null) { +this.map.add (propertyName, listener); +}}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "removePropertyChangeListener", +function (propertyName, listener) { +if (listener == null || propertyName == null) { +return; +}listener = this.map.extract (listener); +if (listener != null) { +this.map.remove (propertyName, listener); +}}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function (propertyName) { +return this.map.getListeners (propertyName); +}, "~S"); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +if (oldValue != null && newValue != null && oldValue.equals (newValue)) { +return; +}this.firePropertyChangeEvt ( new java.beans.PropertyChangeEvent (this.source, propertyName, oldValue, newValue)); +}, "~S,~O,~O"); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +if (oldValue == newValue) { +return; +}this.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue)); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +if (oldValue == newValue) { +return; +}this.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); +}, "~S,~B,~B"); +Clazz_defineMethod (c$, "firePropertyChangeEvt", +function (evt) { +var oldValue = evt.getOldValue (); +var newValue = evt.getNewValue (); +var propertyName = evt.getPropertyName (); +if (oldValue != null && newValue != null && oldValue.equals (newValue)) { +return; +}var common = this.map.get (null); +var named = (propertyName != null) ? this.map.get (propertyName) : null; +this.fire (common, evt); +this.fire (named, evt); +}, "java.beans.PropertyChangeEvent"); +Clazz_defineMethod (c$, "fire", + function (listeners, event) { +if (listeners != null) { +for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) { +listener.propertyChange (event); +} +}}, "~A,java.beans.PropertyChangeEvent"); +Clazz_defineMethod (c$, "fireIndexedPropertyChange", +function (propertyName, index, oldValue, newValue) { +this.firePropertyChangeEvt ( new java.beans.IndexedPropertyChangeEvent (this.source, propertyName, oldValue, newValue, index)); +}, "~S,~N,~O,~O"); +Clazz_defineMethod (c$, "fireIndexedPropertyChange", +function (propertyName, index, oldValue, newValue) { +if (oldValue == newValue) { +return; +}this.fireIndexedPropertyChange (propertyName, index, Integer.$valueOf (oldValue), Integer.$valueOf (newValue)); +}, "~S,~N,~N,~N"); +Clazz_defineMethod (c$, "fireIndexedPropertyChange", +function (propertyName, index, oldValue, newValue) { +if (oldValue == newValue) { +return; +}this.fireIndexedPropertyChange (propertyName, index, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); +}, "~S,~N,~B,~B"); +Clazz_defineMethod (c$, "hasListeners", +function (propertyName) { +return this.map.hasListeners (propertyName); +}, "~S"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.beans.PropertyChangeSupport, "PropertyChangeListenerMap", java.beans.ChangeListenerMap); +Clazz_overrideMethod (c$, "newArray", +function (a) { +return (0 < a) ? new Array (a) : java.beans.PropertyChangeSupport.PropertyChangeListenerMap.EMPTY; +}, "~N"); +Clazz_overrideMethod (c$, "newProxy", +function (a, b) { +return new java.beans.PropertyChangeListenerProxy (a, b); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineStatics (c$, +"EMPTY", Clazz_newArray (-1, [])); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.beans"); +Clazz_load (null, "java.beans.ChangeListenerMap", ["java.util.ArrayList", "$.Collections", "$.EventListenerProxy", "$.HashMap"], function () { +c$ = Clazz_decorateAsClass (function () { +this.map = null; +Clazz_instantialize (this, arguments); +}, java.beans, "ChangeListenerMap"); +Clazz_defineMethod (c$, "add", +function (name, listener) { +if (this.map == null) { +this.map = new java.util.HashMap (); +}var array = this.map.get (name); +var size = (array != null) ? array.length : 0; +var clone = this.newArray (size + 1); +clone[size] = listener; +if (array != null) { +System.arraycopy (array, 0, clone, 0, size); +}this.map.put (name, clone); +}, "~S,~O"); +Clazz_defineMethod (c$, "remove", +function (name, listener) { +if (this.map != null) { +var array = this.map.get (name); +if (array != null) { +for (var i = 0; i < array.length; i++) { +if (listener.equals (array[i])) { +var size = array.length - 1; +if (size > 0) { +var clone = this.newArray (size); +System.arraycopy (array, 0, clone, 0, i); +System.arraycopy (array, i + 1, clone, i, size - i); +this.map.put (name, clone); +} else { +this.map.remove (name); +if (this.map.isEmpty ()) { +this.map = null; +}}break; +}} +}}}, "~S,~O"); +Clazz_defineMethod (c$, "get", +function (name) { +return (this.map != null) ? this.map.get (name) : null; +}, "~S"); +Clazz_defineMethod (c$, "set", +function (name, listeners) { +if (listeners != null) { +if (this.map == null) { +this.map = new java.util.HashMap (); +}this.map.put (name, listeners); +} else if (this.map != null) { +this.map.remove (name); +if (this.map.isEmpty ()) { +this.map = null; +}}}, "~S,~A"); +Clazz_defineMethod (c$, "getListeners", +function () { +if (this.map == null) { +return this.newArray (0); +}var list = new java.util.ArrayList (); +var listeners = this.map.get (null); +if (listeners != null) { +for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) { +list.add (listener); +} +}for (var entry, $entry = this.map.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { +var name = entry.getKey (); +if (name != null) { +for (var listener, $listener = 0, $$listener = entry.getValue (); $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) { +list.add (this.newProxy (name, listener)); +} +}} +return list.toArray (this.newArray (list.size ())); +}); +Clazz_defineMethod (c$, "getListeners", +function (name) { +if (name != null) { +var listeners = this.get (name); +if (listeners != null) { +return listeners.clone (); +}}return this.newArray (0); +}, "~S"); +Clazz_defineMethod (c$, "hasListeners", +function (name) { +if (this.map == null) { +return false; +}var array = this.map.get (null); +return (array != null) || ((name != null) && (null != this.map.get (name))); +}, "~S"); +Clazz_defineMethod (c$, "getEntries", +function () { +return (this.map != null) ? this.map.entrySet () : java.util.Collections.emptySet (); +}); +Clazz_defineMethod (c$, "extract", +function (listener) { +while (Clazz_instanceOf (listener, java.util.EventListenerProxy)) { +var proxy = listener; +listener = proxy.getListener (); +} +return listener; +}, "~O"); +}); +Clazz_declarePackage ("java.beans"); +Clazz_load (["java.beans.PropertyChangeEvent"], "java.beans.IndexedPropertyChangeEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.index = 0; +Clazz_instantialize (this, arguments); +}, java.beans, "IndexedPropertyChangeEvent", java.beans.PropertyChangeEvent); +Clazz_makeConstructor (c$, +function (source, propertyName, oldValue, newValue, index) { +Clazz_superConstructor (this, java.beans.IndexedPropertyChangeEvent, [source, propertyName, oldValue, newValue]); +this.index = index; +}, "~O,~S,~O,~O,~N"); +Clazz_defineMethod (c$, "getIndex", +function () { +return this.index; +}); +}); +Clazz_declarePackage ("java.beans"); +Clazz_load (["java.util.EventObject"], "java.beans.PropertyChangeEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.propertyName = null; +this.newValue = null; +this.oldValue = null; +this.propagationId = null; +Clazz_instantialize (this, arguments); +}, java.beans, "PropertyChangeEvent", java.util.EventObject); +Clazz_makeConstructor (c$, +function (source, propertyName, oldValue, newValue) { +Clazz_superConstructor (this, java.beans.PropertyChangeEvent, [source]); +this.propertyName = propertyName; +this.newValue = newValue; +this.oldValue = oldValue; +}, "~O,~S,~O,~O"); +Clazz_defineMethod (c$, "getPropertyName", +function () { +return this.propertyName; +}); +Clazz_defineMethod (c$, "getNewValue", +function () { +return this.newValue; +}); +Clazz_defineMethod (c$, "getOldValue", +function () { +return this.oldValue; +}); +Clazz_defineMethod (c$, "setPropagationId", +function (propagationId) { +this.propagationId = propagationId; +}, "~O"); +Clazz_defineMethod (c$, "getPropagationId", +function () { +return this.propagationId; +}); +}); +Clazz_declarePackage ("java.beans"); +Clazz_load (["java.util.EventListenerProxy", "java.beans.PropertyChangeListener"], "java.beans.PropertyChangeListenerProxy", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.propertyName = null; +Clazz_instantialize (this, arguments); +}, java.beans, "PropertyChangeListenerProxy", java.util.EventListenerProxy, java.beans.PropertyChangeListener); +Clazz_makeConstructor (c$, +function (propertyName, listener) { +Clazz_superConstructor (this, java.beans.PropertyChangeListenerProxy, [listener]); +this.propertyName = propertyName; +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "propertyChange", +function (evt) { +(this.getListener ()).propertyChange (evt); +}, "java.beans.PropertyChangeEvent"); +Clazz_defineMethod (c$, "getPropertyName", +function () { +return this.propertyName; +}); +}); +Clazz_declarePackage ("java.beans"); +Clazz_load (["java.util.EventListener"], "java.beans.PropertyChangeListener", null, function () { +Clazz_declareInterface (java.beans, "PropertyChangeListener", java.util.EventListener); +}); +Clazz_declarePackage ("java.security"); +Clazz_declareInterface (java.security, "PrivilegedAction"); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +Clazz_instantialize (this, arguments); +}, java.awt, "Point", java.awt.geom.Point2D); +Clazz_makeConstructor (c$, +function () { +this.construct (0, 0); +}); +Clazz_makeConstructor (c$, +function (p) { +this.construct (p.x, p.y); +}, "java.awt.Point"); +Clazz_makeConstructor (c$, +function (x, y) { +Clazz_superConstructor (this, java.awt.Point, []); +this.x = x; +this.y = y; +}, "~N,~N"); +Clazz_overrideMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_overrideMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_defineMethod (c$, "getLocation", +function () { +return new java.awt.Point (this.x, this.y); +}); +Clazz_defineMethod (c$, "setLocation", +function (p) { +this.setLocation (p.x, p.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "setLocation", +function (x, y) { +this.x = Clazz_doubleToInt (Math.floor (x + 0.5)); +this.y = Clazz_doubleToInt (Math.floor (y + 0.5)); +}, "~N,~N"); +Clazz_defineMethod (c$, "move", +function (x, y) { +this.x = x; +this.y = y; +}, "~N,~N"); +Clazz_defineMethod (c$, "translate", +function (dx, dy) { +this.x += dx; +this.y += dy; +}, "~N,~N"); +Clazz_defineMethod (c$, "equals", +function (obj) { +if (Clazz_instanceOf (obj, java.awt.Point)) { +var pt = obj; +return (this.x == pt.x) && (this.y == pt.y); +}return Clazz_superCall (this, java.awt.Point, "equals", [obj]); +}, "~O"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]"; +}); +}); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (["java.lang.StringBuffer", "java.util.Collections", "$.HashMap", "$.IdentityHashMap"], ["jssun.awt.AppContext", "$.MostRecentThreadAppContext", "$.MostRecentKeyValue"], ["java.lang.Thread", "java.util.HashSet", "java.beans.PropertyChangeSupport"], function () { +c$ = Clazz_decorateAsClass (function () { +this.table = null; +this.threadGroup = null; +this.changeSupport = null; +this.$isDisposed = false; +this.mostRecentKeyValue = null; +this.shadowMostRecentKeyValue = null; +Clazz_instantialize (this, arguments); +}, jssun.awt, "AppContext"); +Clazz_prepareFields (c$, function () { +this.table = new java.util.HashMap (); +}); +c$.getAppContexts = Clazz_defineMethod (c$, "getAppContexts", +function () { +return new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ()); +}); +Clazz_defineMethod (c$, "isDisposed", +function () { +return this.$isDisposed; +}); +Clazz_makeConstructor (c$, +function (threadGroup) { +jssun.awt.AppContext.numAppContexts++; +this.threadGroup = threadGroup; +jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this); +}, "ThreadGroup"); +c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", +function () { +var currentThread = Thread.currentThread (); +var appContext = null; +var recent = jssun.awt.AppContext.mostRecentThreadAppContext; +if ((recent != null) && (recent.thread === currentThread)) { +appContext = recent.appContext; +} else { +var currentThreadGroup = currentThread.getThreadGroup (); +var threadGroup = currentThreadGroup; +appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup); +while (appContext == null) { +threadGroup = threadGroup.getParent (); +if (threadGroup == null) { +return null; +}appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup); +} +for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) { +jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext); +} +jssun.awt.AppContext.mostRecentThreadAppContext = new jssun.awt.MostRecentThreadAppContext (currentThread, appContext); +}return appContext; +}); +c$.isMainContext = Clazz_defineMethod (c$, "isMainContext", +function (ctx) { +return false; +}, "jssun.awt.AppContext"); +Clazz_defineMethod (c$, "dispose", +function () { +}); +Clazz_defineMethod (c$, "get", +function (key) { +{ +var recent = this.mostRecentKeyValue; +if ((recent != null) && (recent.key === key)) { +return recent.value; +}var value = this.table.get (key); +if (this.mostRecentKeyValue == null) { +this.mostRecentKeyValue = new jssun.awt.MostRecentKeyValue (key, value); +this.shadowMostRecentKeyValue = new jssun.awt.MostRecentKeyValue (key, value); +} else { +var auxKeyValue = this.mostRecentKeyValue; +this.shadowMostRecentKeyValue.setPair (key, value); +this.mostRecentKeyValue = this.shadowMostRecentKeyValue; +this.shadowMostRecentKeyValue = auxKeyValue; +}return value; +}}, "~O"); +Clazz_defineMethod (c$, "put", +function (key, value) { +{ +var recent = this.mostRecentKeyValue; +if ((recent != null) && (recent.key === key)) recent.value = value; +return this.table.put (key, value); +}}, "~O,~O"); +Clazz_defineMethod (c$, "remove", +function (key) { +{ +var recent = this.mostRecentKeyValue; +if ((recent != null) && (recent.key === key)) recent.value = null; +return this.table.remove (key); +}}, "~O"); +Clazz_defineMethod (c$, "getThreadGroup", +function () { +return this.threadGroup; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]"; +}); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function () { +if (this.changeSupport == null) { +return new Array (0); +}return this.changeSupport.getPropertyChangeListeners (); +}); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (propertyName, listener) { +if (listener == null) { +return; +}if (this.changeSupport == null) { +this.changeSupport = new java.beans.PropertyChangeSupport (this); +}this.changeSupport.addPropertyChangeListener (propertyName, listener); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "removePropertyChangeListener", +function (propertyName, listener) { +if (listener == null || this.changeSupport == null) { +return; +}this.changeSupport.removePropertyChangeListener (propertyName, listener); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function (propertyName) { +if (this.changeSupport == null) { +return new Array (0); +}return this.changeSupport.getPropertyChangeListeners (propertyName); +}, "~S"); +c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY = new StringBuffer ("EventQueue"); +c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ()); +Clazz_defineStatics (c$, +"DISPOSED_PROPERTY_NAME", "disposed", +"GUI_DISPOSED", "guidisposed", +"numAppContexts", 0, +"mostRecentThreadAppContext", null); +c$ = Clazz_decorateAsClass (function () { +this.thread = null; +this.appContext = null; +Clazz_instantialize (this, arguments); +}, jssun.awt, "MostRecentThreadAppContext"); +Clazz_makeConstructor (c$, +function (key, value) { +this.thread = key; +this.appContext = value; +}, "Thread,jssun.awt.AppContext"); +c$ = Clazz_decorateAsClass (function () { +this.key = null; +this.value = null; +Clazz_instantialize (this, arguments); +}, jssun.awt, "MostRecentKeyValue"); +Clazz_makeConstructor (c$, +function (k, v) { +this.key = k; +this.value = v; +}, "~O,~O"); +Clazz_defineMethod (c$, "setPair", +function (k, v) { +this.key = k; +this.value = v; +}, "~O,~O"); +}); +Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){ +c$=Clazz_declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]); +Clazz_makeConstructor(c$, +function(cs){ +if(cs==null){ +throw new NullPointerException(); +} +Clazz_superConstructor(this,StringBuffer,[cs.toString()]); +},"CharSequence"); +Clazz_defineMethod(c$,"append", +function(b){ +return this.append(b?"true":"false"); +},"~B"); +Clazz_defineMethod(c$,"append", +function(ch){ +this.append0(ch); +return this; +},"~N"); +Clazz_defineMethod(c$,"append", +function(d){ +return this.append(Double.toString(d)); +},"~N"); +Clazz_defineMethod(c$,"append", +function(obj){ +if(obj==null){ +this.appendNull(); +}else{ +this.append0(obj.toString()); +}return this; +},"~O"); +Clazz_defineMethod(c$,"append", +function(string){ +this.append0(string); +return this; +},"~S"); +Clazz_defineMethod(c$,"append", +function(sb){ +if(sb==null){ +this.appendNull(); +}else{ +{ +this.append0(sb.getValue(),0,sb.length()); +}}return this; +},"StringBuffer"); +Clazz_defineMethod(c$,"append", +function(chars){ +this.append0(chars); +return this; +},"~A"); +Clazz_defineMethod(c$,"append", +function(chars,start,length){ +this.append0(chars,start,length); +return this; +},"~A,~N,~N"); +Clazz_defineMethod(c$,"append", +function(s){ +if(s==null){ +this.appendNull(); +}else{ +this.append0(s.toString()); +}return this; +},"CharSequence"); +Clazz_defineMethod(c$,"append", +function(s,start,end){ +this.append0(s,start,end); +return this; +},"CharSequence,~N,~N"); +Clazz_defineMethod(c$,"appendCodePoint", +function(codePoint){ +return this.append(Character.toChars(codePoint)); +},"~N"); +Clazz_defineMethod(c$,"$delete", +function(start,end){ +this.delete0(start,end); +return this; +},"~N,~N"); +Clazz_defineMethod(c$,"deleteCharAt", +function(location){ +this.deleteCharAt0(location); +return this; +},"~N"); +Clazz_defineMethod(c$,"insert", +function(index,ch){ +this.insert0(index,ch); +return this; +},"~N,~N"); +Clazz_defineMethod(c$,"insert", +function(index,b){ +return this.insert(index,b?"true":"false"); +},"~N,~B"); +Clazz_defineMethod(c$,"insert", +function(index,i){ +return this.insert(index,Integer.toString(i)); +},"~N,~N"); +Clazz_defineMethod(c$,"insert", +function(index,l){ +return this.insert(index,Long.toString(l)); +},"~N,~N"); +Clazz_defineMethod(c$,"insert", +function(index,d){ +return this.insert(index,Double.toString(d)); +},"~N,~N"); +Clazz_defineMethod(c$,"insert", +function(index,f){ +return this.insert(index,Float.toString(f)); +},"~N,~N"); +Clazz_defineMethod(c$,"insert", +function(index,obj){ +return this.insert(index,obj==null?"null":obj.toString()); +},"~N,~O"); +Clazz_defineMethod(c$,"insert", +function(index,string){ +this.insert0(index,string); +return this; +},"~N,~S"); +Clazz_defineMethod(c$,"insert", +function(index,chars){ +this.insert0(index,chars); +return this; +},"~N,~A"); +Clazz_defineMethod(c$,"insert", +function(index,chars,start,length){ +this.insert0(index,chars,start,length); +return this; +},"~N,~A,~N,~N"); +Clazz_defineMethod(c$,"insert", +function(index,s){ +this.insert0(index,s==null?"null":s.toString()); +return this; +},"~N,CharSequence"); +Clazz_defineMethod(c$,"insert", +function(index,s,start,end){ +this.insert0(index,s,start,end); +return this; +},"~N,CharSequence,~N,~N"); +Clazz_defineMethod(c$,"replace", +function(start,end,string){ +this.replace0(start,end,string); +return this; +},"~N,~N,~S"); +Clazz_defineMethod(c$,"reverse", +function(){ +this.reverse0(); +return this; +}); +Clazz_overrideMethod(c$,"subSequence", +function(start,end){ +return Clazz_superCall(this,StringBuffer,"substring",[start,end]); +},"~N,~N"); +}); +Clazz_load(["java.util.AbstractMap","$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.IdentityHashMap",["java.lang.IllegalArgumentException","$.IllegalStateException","java.util.AbstractCollection","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.NoSuchElementException"],function(){ +c$=Clazz_decorateAsClass(function(){ +this.elementData=null; +this.$size=0; +this.threshold=0; +this.modCount=0; +Clazz_instantialize(this,arguments); +},java.util,"IdentityHashMap",java.util.AbstractMap,[java.util.Map,java.io.Serializable,Cloneable]); +Clazz_makeConstructor(c$, +function(){ +this.construct(21); +}); +Clazz_makeConstructor(c$, +function(maxSize){ +Clazz_superConstructor(this,java.util.IdentityHashMap,[]); +if(maxSize>=0){ +this.$size=0; +this.threshold=this.getThreshold(maxSize); +this.elementData=this.newElementArray(this.computeElementArraySize()); +}else{ +throw new IllegalArgumentException(); +}},"~N"); +Clazz_defineMethod(c$,"getThreshold", +($fz=function(maxSize){ +return maxSize>3?maxSize:3; +},$fz.isPrivate=true,$fz),"~N"); +Clazz_defineMethod(c$,"computeElementArraySize", +($fz=function(){ +return(Math.floor((this.threshold*10000)/7500))*2; +},$fz.isPrivate=true,$fz)); +Clazz_defineMethod(c$,"newElementArray", +($fz=function(s){ +return new Array(s); +},$fz.isPrivate=true,$fz),"~N"); +Clazz_makeConstructor(c$, +function(map){ +this.construct(map.size()<6?11:map.size()*2); +this.putAllImpl(map); +},"java.util.Map"); +Clazz_defineMethod(c$,"massageValue", +($fz=function(value){ +return((value===java.util.IdentityHashMap.NULL_OBJECT)?null:value); +},$fz.isPrivate=true,$fz),"~O"); +Clazz_overrideMethod(c$,"clear", +function(){ +this.$size=0; +for(var i=0;ithis.threshold){ +this.rehash(); +index=this.findIndex(_key,this.elementData); +}this.elementData[index]=_key; +this.elementData[index+1]=null; +}var result=this.elementData[index+1]; +this.elementData[index+1]=_value; +return this.massageValue(result); +},"~O,~O"); +Clazz_overrideMethod(c$,"putAll", +function(map){ +this.putAllImpl(map); +},"java.util.Map"); +Clazz_defineMethod(c$,"rehash", +($fz=function(){ +var newlength=this.elementData.length<<1; +if(newlength==0){ +newlength=1; +}var newData=this.newElementArray(newlength); +for(var i=0;iindex; +if(next= 0) { +return true; +}var owner = this.getOwner_NoClientCode (); +return (owner != null) && owner.isModalExcluded (exclusionType); +}, "java.awt.Dialog.ModalExclusionType"); +Clazz_defineMethod (c$, "updateChildrenBlocking", +function () { +}); +Clazz_defineMethod (c$, "addWindowListener", +function (l) { +if (l == null) { +return; +}this.newEventsOnly = true; +this.windowListener = java.awt.AWTEventMulticaster.add (this.windowListener, l); +}, "java.awt.event.WindowListener"); +Clazz_defineMethod (c$, "addWindowStateListener", +function (l) { +if (l == null) { +return; +}this.windowStateListener = java.awt.AWTEventMulticaster.add (this.windowStateListener, l); +this.newEventsOnly = true; +}, "java.awt.event.WindowStateListener"); +Clazz_defineMethod (c$, "addWindowFocusListener", +function (l) { +if (l == null) { +return; +}this.windowFocusListener = java.awt.AWTEventMulticaster.add (this.windowFocusListener, l); +this.newEventsOnly = true; +}, "java.awt.event.WindowFocusListener"); +Clazz_defineMethod (c$, "removeWindowListener", +function (l) { +if (l == null) { +return; +}this.windowListener = java.awt.AWTEventMulticaster.remove (this.windowListener, l); +}, "java.awt.event.WindowListener"); +Clazz_defineMethod (c$, "removeWindowStateListener", +function (l) { +if (l == null) { +return; +}this.windowStateListener = java.awt.AWTEventMulticaster.remove (this.windowStateListener, l); +}, "java.awt.event.WindowStateListener"); +Clazz_defineMethod (c$, "removeWindowFocusListener", +function (l) { +if (l == null) { +return; +}this.windowFocusListener = java.awt.AWTEventMulticaster.remove (this.windowFocusListener, l); +}, "java.awt.event.WindowFocusListener"); +Clazz_defineMethod (c$, "getWindowListeners", +function () { +return (this.getListeners (java.awt.event.WindowListener)); +}); +Clazz_defineMethod (c$, "getWindowFocusListeners", +function () { +return (this.getListeners (java.awt.event.WindowFocusListener)); +}); +Clazz_defineMethod (c$, "getWindowStateListeners", +function () { +return (this.getListeners (java.awt.event.WindowStateListener)); +}); +Clazz_defineMethod (c$, "getListeners", +function (listenerType) { +var l = null; +if (listenerType === java.awt.event.WindowFocusListener) { +l = this.windowFocusListener; +} else if (listenerType === java.awt.event.WindowStateListener) { +l = this.windowStateListener; +} else if (listenerType === java.awt.event.WindowListener) { +l = this.windowListener; +} else { +return Clazz_superCall (this, java.awt.Window, "getListeners", [listenerType]); +}return java.awt.AWTEventMulticaster.getListeners (l, listenerType); +}, "Class"); +Clazz_defineMethod (c$, "eventEnabled", +function (e) { +switch (e.id) { +case 200: +case 201: +case 202: +case 203: +case 204: +case 205: +case 206: +if ((this.eventMask & 64) != 0 || this.windowListener != null) { +return true; +}return false; +case 207: +case 208: +if ((this.eventMask & 524288) != 0 || this.windowFocusListener != null) { +return true; +}return false; +case 209: +if ((this.eventMask & 262144) != 0 || this.windowStateListener != null) { +return true; +}return false; +default: +break; +} +return Clazz_superCall (this, java.awt.Window, "eventEnabled", [e]); +}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "processEvent", +function (e) { +if (Clazz_instanceOf (e, java.awt.event.WindowEvent)) { +switch (e.getID ()) { +case 200: +case 201: +case 202: +case 203: +case 204: +case 205: +case 206: +this.processWindowEvent (e); +break; +case 207: +case 208: +this.processWindowFocusEvent (e); +break; +case 209: +this.processWindowStateEvent (e); +default: +break; +} +return; +}this.processEventCont (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "processWindowEvent", +function (e) { +var listener = this.windowListener; +if (listener != null) { +switch (e.getID ()) { +case 200: +listener.windowOpened (e); +break; +case 201: +listener.windowClosing (e); +break; +case 202: +listener.windowClosed (e); +break; +case 203: +listener.windowIconified (e); +break; +case 204: +listener.windowDeiconified (e); +break; +case 205: +listener.windowActivated (e); +break; +case 206: +listener.windowDeactivated (e); +break; +default: +break; +} +}}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "processWindowFocusEvent", +function (e) { +var listener = this.windowFocusListener; +if (listener != null) { +switch (e.getID ()) { +case 207: +listener.windowGainedFocus (e); +break; +case 208: +listener.windowLostFocus (e); +break; +default: +break; +} +}}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "processWindowStateEvent", +function (e) { +var listener = this.windowStateListener; +if (listener != null) { +switch (e.getID ()) { +case 209: +listener.windowStateChanged (e); +break; +default: +break; +} +}}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "preProcessKeyEvent", +function (e) { +}, "java.awt.event.KeyEvent"); +Clazz_overrideMethod (c$, "postProcessKeyEvent", +function (e) { +}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "setAlwaysOnTop", +function (alwaysOnTop) { +var oldAlwaysOnTop; +{ +oldAlwaysOnTop = this.alwaysOnTop; +this.alwaysOnTop = alwaysOnTop; +}if (oldAlwaysOnTop != alwaysOnTop) { +if (this.isAlwaysOnTopSupported ()) { +}this.firePropertyChangeBool ("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop); +}}, "~B"); +Clazz_defineMethod (c$, "isAlwaysOnTopSupported", +function () { +return java.awt.Toolkit.getDefaultToolkit ().isAlwaysOnTopSupported (); +}); +Clazz_defineMethod (c$, "isAlwaysOnTop", +function () { +return this.alwaysOnTop; +}); +Clazz_defineMethod (c$, "isActive", +function () { +return false; +}); +Clazz_defineMethod (c$, "isFocused", +function () { +return swingjs.JSToolkit.isFocused (this); +}); +Clazz_overrideMethod (c$, "getFocusTraversalKeys", +function (id) { +return null; +}, "~N"); +Clazz_defineMethod (c$, "setFocusCycleRoot", +function (focusCycleRoot) { +}, "~B"); +Clazz_defineMethod (c$, "isFocusCycleRoot", +function () { +return true; +}); +Clazz_overrideMethod (c$, "getFocusCycleRootAncestor", +function () { +return null; +}); +Clazz_defineMethod (c$, "isFocusableWindow", +function () { +if (!this.getFocusableWindowState ()) { +return false; +}if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) { +return true; +}for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) { +if (Clazz_instanceOf (owner, java.awt.Frame) || Clazz_instanceOf (owner, java.awt.Dialog)) { +return owner.isShowing (); +}} +return false; +}); +Clazz_defineMethod (c$, "getFocusableWindowState", +function () { +return this.focusableWindowState; +}); +Clazz_defineMethod (c$, "setFocusableWindowState", +function (focusableWindowState) { +var oldFocusableWindowState; +{ +oldFocusableWindowState = this.focusableWindowState; +this.focusableWindowState = focusableWindowState; +}this.firePropertyChangeBool ("focusableWindowState", oldFocusableWindowState, focusableWindowState); +if (oldFocusableWindowState && !focusableWindowState && this.isFocused ()) { +for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) { +} +}}, "~B"); +Clazz_defineMethod (c$, "dispatchEventImpl", +function (e) { +if (e.getID () == 101) { +this.invalidate (); +this.validate (); +}Clazz_superCall (this, java.awt.Window, "dispatchEventImpl", [e]); +}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "postEvent", +function (e) { +if (this.handleEvent (e)) { +e.consume (); +return true; +}return false; +}, "java.awt.Event"); +Clazz_defineMethod (c$, "isShowing", +function () { +return this.visible; +}); +Clazz_defineMethod (c$, "applyResourceBundle", +function (rb) { +this.applyComponentOrientation (java.awt.ComponentOrientation.getOrientation (rb)); +}, "java.util.ResourceBundle"); +Clazz_defineMethod (c$, "applyResourceBundle", +function (rbName) { +this.applyResourceBundle (java.util.ResourceBundle.getBundle (rbName)); +}, "~S"); +Clazz_defineMethod (c$, "addOwnedWindow", +function (weakWindow) { +if (weakWindow != null) { +{ +if (!this.ownedWindowList.contains (weakWindow)) { +this.ownedWindowList.addElement (weakWindow); +}}}}, "java.awt.Window"); +Clazz_defineMethod (c$, "removeOwnedWindow", +function (weakWindow) { +if (weakWindow != null) { +this.ownedWindowList.removeElement (weakWindow); +}}, "java.awt.Window"); +Clazz_defineMethod (c$, "connectOwnedWindow", +function (child) { +child.parent = this; +this.addOwnedWindow (child); +}, "java.awt.Window"); +Clazz_defineMethod (c$, "addToWindowList", + function () { +var windowList = this.appContext.get (java.awt.Window); +if (windowList == null) { +windowList = new java.util.Vector (); +this.appContext.put (java.awt.Window, windowList); +}windowList.add (this); +}); +c$.removeFromWindowList = Clazz_defineMethod (c$, "removeFromWindowList", + function (context, w) { +{ +var windowList = context.get (java.awt.Window); +if (windowList != null) { +windowList.remove (w); +}}}, "jssun.awt.AppContext,java.awt.Window"); +Clazz_defineMethod (c$, "getGraphicsConfiguration", +function () { +if (this.graphicsConfig == null) this.graphicsConfig = swingjs.JSToolkit.getGraphicsConfiguration (); +return this.graphicsConfig; +}); +Clazz_overrideMethod (c$, "resetGC", +function () { +}); +Clazz_defineMethod (c$, "setLocationRelativeTo", +function (c) { +var root = null; +if (c != null) { +if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) { +root = c; +} else { +var parent; +for (parent = c.getParent (); parent != null; parent = parent.getParent ()) { +if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) { +root = parent; +break; +}} +}}if ((c != null && !c.isShowing ()) || root == null || !root.isShowing ()) { +var paneSize = this.getSize (); +var centerPoint = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getCenterPoint (); +this.setLocation (centerPoint.x - Clazz_doubleToInt (paneSize.width / 2), centerPoint.y - Clazz_doubleToInt (paneSize.height / 2)); +} else { +var invokerSize = c.getSize (); +var invokerScreenLocation = c.getLocationOnScreen (); +var windowBounds = this.getBounds (); +var dx = invokerScreenLocation.x + ((invokerSize.width - windowBounds.width) >> 1); +var dy = invokerScreenLocation.y + ((invokerSize.height - windowBounds.height) >> 1); +var ss = root.getGraphicsConfiguration ().getBounds (); +if (dy + windowBounds.height > ss.y + ss.height) { +dy = ss.y + ss.height - windowBounds.height; +if (invokerScreenLocation.x - ss.x + Clazz_doubleToInt (invokerSize.width / 2) < Clazz_doubleToInt (ss.width / 2)) { +dx = invokerScreenLocation.x + invokerSize.width; +} else { +dx = invokerScreenLocation.x - windowBounds.width; +}}if (dx + windowBounds.width > ss.x + ss.width) { +dx = ss.x + ss.width - windowBounds.width; +}if (dx < ss.x) dx = ss.x; +if (dy < ss.y) dy = ss.y; +this.setLocation (dx, dy); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "deliverMouseWheelToAncestor", +function (e) { +}, "java.awt.event.MouseWheelEvent"); +Clazz_overrideMethod (c$, "dispatchMouseWheelToAncestor", +function (e) { +return false; +}, "java.awt.event.MouseWheelEvent"); +Clazz_defineMethod (c$, "getTemporaryLostComponent", +function () { +return this.temporaryLostComponent; +}); +Clazz_defineMethod (c$, "setTemporaryLostComponent", +function (component) { +var previousComp = this.temporaryLostComponent; +if (component == null || component.canBeFocusOwner ()) { +this.temporaryLostComponent = component; +} else { +this.temporaryLostComponent = null; +}return previousComp; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "canContainFocusOwner", +function (focusOwnerCandidate) { +return Clazz_superCall (this, java.awt.Window, "canContainFocusOwner", [focusOwnerCandidate]) && this.isFocusableWindow (); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "setBounds", +function (r) { +this.setBounds (r.x, r.y, r.width, r.height); +}, "java.awt.Rectangle"); +Clazz_overrideMethod (c$, "isRecursivelyVisible", +function () { +return this.visible; +}); +Clazz_defineMethod (c$, "getOpacity", +function () { +{ +return this.opacity; +}}); +Clazz_defineMethod (c$, "setOpacity", +function (opacity) { +{ +if (opacity < 0.0 || opacity > 1.0) { +throw new IllegalArgumentException ("The value of opacity should be in the range [0.0f .. 1.0f]."); +}this.opacity = opacity; +}}, "~N"); +Clazz_defineMethod (c$, "getShape", +function () { +{ +return this.shape; +}}); +Clazz_defineMethod (c$, "setShape", +function (shape) { +{ +this.shape = shape; +}}, "java.awt.Shape"); +Clazz_defineMethod (c$, "setOpaque", +function (opaque) { +{ +java.awt.Window.setLayersOpaque (this, opaque); +this.opaque = opaque; +var peer = this.getPeer (); +if (peer != null) { +peer.setOpaque (opaque); +}}}, "~B"); +c$.setLayersOpaque = Clazz_defineMethod (c$, "setLayersOpaque", + function (component, isOpaque) { +if (Clazz_instanceOf (component, javax.swing.RootPaneContainer)) { +var rpc = component; +var root = rpc.getRootPane (); +var lp = root.getLayeredPane (); +var c = root.getContentPane (); +var content = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null; +lp.setOpaque (isOpaque); +root.setOpaque (isOpaque); +root.setDoubleBuffered (isOpaque); +if (content != null) { +content.setOpaque (isOpaque); +content.setDoubleBuffered (isOpaque); +var numChildren = content.getComponentCount (); +if (numChildren > 0) { +var child = content.getComponent (0); +if (Clazz_instanceOf (child, javax.swing.RootPaneContainer)) { +java.awt.Window.setLayersOpaque (child, isOpaque); +}}}}var bg = component.getBackground (); +var hasTransparentBg = java.awt.Window.TRANSPARENT_BACKGROUND_COLOR.equals (bg); +var container = null; +if (Clazz_instanceOf (component, java.awt.Container)) { +container = component; +}if (isOpaque) { +if (hasTransparentBg) { +var newColor = null; +if (container != null && container.preserveBackgroundColor != null) { +newColor = container.preserveBackgroundColor; +} else { +newColor = new java.awt.Color (255, 255, 255); +}component.setBackground (newColor); +}} else { +if (!hasTransparentBg && container != null) { +container.preserveBackgroundColor = bg; +}component.setBackground (java.awt.Window.TRANSPARENT_BACKGROUND_COLOR); +}}, "java.awt.Component,~B"); +Clazz_overrideMethod (c$, "getContainer", +function () { +return null; +}); +Clazz_overrideMethod (c$, "mixOnReshaping", +function () { +}); +Clazz_overrideMethod (c$, "getLocationOnWindow", +function () { +return new java.awt.Point (0, 0); +}); +c$.$Window$1DisposeAction$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +Clazz_instantialize (this, arguments); +}, java.awt, "Window$1DisposeAction", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +var a; +{ +a = new Array (this.b$["java.awt.Window"].ownedWindowList.size ()); +this.b$["java.awt.Window"].ownedWindowList.copyInto (a); +}for (var b = 0; b < a.length; b++) { +var c = (((a[b]))); +if (c != null) { +c.disposeImpl (); +}} +this.b$["java.awt.Window"].hide (); +this.b$["java.awt.Window"].beforeFirstShow = true; +this.b$["java.awt.Window"].removeNotify (); +this.b$["java.awt.Window"].clearCurrentFocusCycleRootOnHide (); +}); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"systemSyncLWRequests", false, +"OPENED", 0x01, +"base", "win", +"nameCounter", 0); +c$.allWindows = c$.prototype.allWindows = new java.util.ArrayList (); +c$.TRANSPARENT_BACKGROUND_COLOR = c$.prototype.TRANSPARENT_BACKGROUND_COLOR = new java.awt.Color (0, 0, 0, 0); +c$ = Clazz_decorateAsClass (function () { +this.focusRoot = null; +this.focusOwner = null; +Clazz_instantialize (this, arguments); +}, java.awt, "FocusManager"); +}); +Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.Vector",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringBuffer","java.lang.reflect.Array","java.util.Arrays","$.Collections","$.Enumeration","$.NoSuchElementException"],function(){ +c$=Clazz_decorateAsClass(function(){ +this.elementCount=0; +this.elementData=null; +this.capacityIncrement=0; +Clazz_instantialize(this,arguments); +},java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]); +Clazz_makeConstructor(c$, +function(){ +this.construct(10,0); +}); +Clazz_makeConstructor(c$, +function(capacity){ +this.construct(capacity,0); +},"~N"); +Clazz_makeConstructor(c$, +function(capacity,capacityIncrement){ +Clazz_superConstructor(this,java.util.Vector,[]); +this.elementCount=0; +try{ +this.elementData=this.newElementArray(capacity); +}catch(e){ +if(Clazz_instanceOf(e,NegativeArraySizeException)){ +throw new IllegalArgumentException(); +}else{ +throw e; +} +} +this.capacityIncrement=capacityIncrement; +},"~N,~N"); +Clazz_makeConstructor(c$, +function(collection){ +this.construct(collection.size(),0); +var it=collection.iterator(); +while(it.hasNext()){ +this.elementData[this.elementCount++]=it.next(); +} +},"java.util.Collection"); +Clazz_defineMethod(c$,"newElementArray", +($fz=function(size){ +return new Array(size); +},$fz.isPrivate=true,$fz),"~N"); +Clazz_defineMethod(c$,"add", +function(location,object){ +this.insertElementAt(object,location); +},"~N,~O"); +Clazz_defineMethod(c$,"add", +function(object){ +this.addElement(object); +return true; +},"~O"); +Clazz_defineMethod(c$,"addAll", +function(location,collection){ +if(0<=location&&location<=this.elementCount){ +var size=collection.size(); +if(size==0){ +return false; +}var required=size-(this.elementData.length-this.elementCount); +if(required>0){ +this.growBy(required); +}var count=this.elementCount-location; +if(count>0){ +System.arraycopy(this.elementData,location,this.elementData,location+size,count); +}var it=collection.iterator(); +while(it.hasNext()){ +this.elementData[location++]=it.next(); +} +this.elementCount+=size; +this.modCount++; +return true; +}throw new ArrayIndexOutOfBoundsException(location); +},"~N,java.util.Collection"); +Clazz_defineMethod(c$,"addAll", +function(collection){ +return this.addAll(this.elementCount,collection); +},"java.util.Collection"); +Clazz_defineMethod(c$,"addElement", +function(object){ +if(this.elementCount==this.elementData.length){ +this.growByOne(); +}this.elementData[this.elementCount++]=object; +this.modCount++; +},"~O"); +Clazz_defineMethod(c$,"capacity", +function(){ +return this.elementData.length; +}); +Clazz_overrideMethod(c$,"clear", +function(){ +this.removeAllElements(); +}); +Clazz_defineMethod(c$,"clone", +function(){ +try{ +var vector=Clazz_superCall(this,java.util.Vector,"clone",[]); +vector.elementData=this.elementData.clone(); +return vector; +}catch(e){ +if(Clazz_instanceOf(e,CloneNotSupportedException)){ +return null; +}else{ +throw e; +} +} +}); +Clazz_overrideMethod(c$,"contains", +function(object){ +return this.indexOf(object,0)!=-1; +},"~O"); +Clazz_defineMethod(c$,"copyInto", +function(elements){ +System.arraycopy(this.elementData,0,elements,0,this.elementCount); +},"~A"); +Clazz_defineMethod(c$,"elementAt", +function(location){ +if(locationnext?minimumCapacity:next); +}},"~N"); +Clazz_overrideMethod(c$,"equals", +function(object){ +if(this===object){ +return true; +}if(Clazz_instanceOf(object,java.util.List)){ +var list=object; +if(list.size()!=this.size()){ +return false; +}var index=0; +var it=list.iterator(); +while(it.hasNext()){ +var e1=this.elementData[index++]; +var e2=it.next(); +if(!(e1==null?e2==null:e1.equals(e2))){ +return false; +}} +return true; +}return false; +},"~O"); +Clazz_defineMethod(c$,"firstElement", +function(){ +if(this.elementCount>0){ +return this.elementData[0]; +}throw new java.util.NoSuchElementException(); +}); +Clazz_overrideMethod(c$,"get", +function(location){ +return this.elementAt(location); +},"~N"); +Clazz_defineMethod(c$,"grow", +($fz=function(newCapacity){ +var newData=this.newElementArray(newCapacity); +System.arraycopy(this.elementData,0,newData,0,this.elementCount); +this.elementData=newData; +},$fz.isPrivate=true,$fz),"~N"); +Clazz_defineMethod(c$,"growByOne", +($fz=function(){ +var adding=0; +if(this.capacityIncrement<=0){ +if((adding=this.elementData.length)==0){ +adding=1; +}}else{ +adding=this.capacityIncrement; +}var newData=this.newElementArray(this.elementData.length+adding); +System.arraycopy(this.elementData,0,newData,0,this.elementCount); +this.elementData=newData; +},$fz.isPrivate=true,$fz)); +Clazz_defineMethod(c$,"growBy", +($fz=function(required){ +var adding=0; +if(this.capacityIncrement<=0){ +if((adding=this.elementData.length)==0){ +adding=required; +}while(adding0){ +System.arraycopy(this.elementData,location,this.elementData,location+1,count); +}this.elementData[location]=object; +this.elementCount++; +this.modCount++; +}else{ +throw new ArrayIndexOutOfBoundsException(location); +}},"~O,~N"); +Clazz_overrideMethod(c$,"isEmpty", +function(){ +return this.elementCount==0; +}); +Clazz_defineMethod(c$,"lastElement", +function(){ +try{ +return this.elementData[this.elementCount-1]; +}catch(e){ +if(Clazz_instanceOf(e,IndexOutOfBoundsException)){ +throw new java.util.NoSuchElementException(); +}else{ +throw e; +} +} +}); +Clazz_defineMethod(c$,"lastIndexOf", +function(object){ +return this.lastIndexOf(object,this.elementCount-1); +},"~O"); +Clazz_defineMethod(c$,"lastIndexOf", +function(object,location){ +if(location=0;i--){ +if(object.equals(this.elementData[i])){ +return i; +}} +}else{ +for(var i=location;i>=0;i--){ +if(this.elementData[i]==null){ +return i; +}} +}return-1; +}throw new ArrayIndexOutOfBoundsException(location); +},"~O,~N"); +Clazz_defineMethod(c$,"remove", +function(location){ +if(location0){ +System.arraycopy(this.elementData,location+1,this.elementData,location,size); +}this.elementData[this.elementCount]=null; +this.modCount++; +return result; +}throw new ArrayIndexOutOfBoundsException(location); +},"~N"); +Clazz_defineMethod(c$,"remove", +function(object){ +return this.removeElement(object); +},"~O"); +Clazz_defineMethod(c$,"removeAllElements", +function(){ +java.util.Arrays.fill(this.elementData,0,this.elementCount,null); +this.modCount++; +this.elementCount=0; +}); +Clazz_defineMethod(c$,"removeElement", +function(object){ +var index; +if((index=this.indexOf(object,0))==-1){ +return false; +}this.removeElementAt(index); +return true; +},"~O"); +Clazz_defineMethod(c$,"removeElementAt", +function(location){ +if(0<=location&&location0){ +System.arraycopy(this.elementData,location+1,this.elementData,location,size); +}this.elementData[this.elementCount]=null; +this.modCount++; +}else{ +throw new ArrayIndexOutOfBoundsException(location); +}},"~N"); +Clazz_overrideMethod(c$,"removeRange", +function(start,end){ +if(start>=0&&start<=end&&end<=this.size()){ +if(start==end){ +return; +}if(end!=this.elementCount){ +System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end); +var newCount=this.elementCount-(end-start); +java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null); +this.elementCount=newCount; +}else{ +java.util.Arrays.fill(this.elementData,start,this.elementCount,null); +this.elementCount=start; +}this.modCount++; +}else{ +throw new IndexOutOfBoundsException(); +}},"~N,~N"); +Clazz_overrideMethod(c$,"set", +function(location,object){ +if(locationlength){ +java.util.Arrays.fill(this.elementData,length,this.elementCount,null); +}this.elementCount=length; +this.modCount++; +},"~N"); +Clazz_overrideMethod(c$,"size", +function(){ +return this.elementCount; +}); +Clazz_overrideMethod(c$,"subList", +function(start,end){ +return new java.util.Collections.SynchronizedRandomAccessList(Clazz_superCall(this,java.util.Vector,"subList",[start,end]),this); +},"~N,~N"); +Clazz_defineMethod(c$,"toArray", +function(){ +var result=new Array(this.elementCount); +System.arraycopy(this.elementData,0,result,0,this.elementCount); +return result; +}); +Clazz_defineMethod(c$,"toArray", +function(contents){ +if(this.elementCount>contents.length){ +var ct=contents.getClass().getComponentType(); +contents=java.lang.reflect.Array.newInstance(ct,this.elementCount); +}System.arraycopy(this.elementData,0,contents,0,this.elementCount); +if(this.elementCount 255) { +rangeError = true; +badComponentString = badComponentString + " Alpha"; +}if (r < 0 || r > 255) { +rangeError = true; +badComponentString = badComponentString + " Red"; +}if (g < 0 || g > 255) { +rangeError = true; +badComponentString = badComponentString + " Green"; +}if (b < 0 || b > 255) { +rangeError = true; +badComponentString = badComponentString + " Blue"; +}if (rangeError == true) { +throw new IllegalArgumentException ("Color parameter outside of expected range:" + badComponentString); +}}, "~N,~N,~N,~N"); +Clazz_makeConstructor (c$, +function () { +{ +var a = arguments; +switch(a.length) { +case 0: +break; +case 1: +this.value = (a[0].value ? a[0].value : 0xff000000 | a[0]); +break; +case 2: +this.value = (a[1] ? a[0] : 0xff000000 | a[0]); +break; +case 3: +var n = a[0] + a[1] + a[2]; +if (n > 0 && n < 3.001) +this.setFloat(a[0], a[1], a[2], 1); +else +this.setColor4(a[0], a[1], a[2], 255); +break; +case 4: +var n = a[0] + a[1] + a[2] + a[3]; +if (n > 0 && n < 4.001) +this.setFloat(a[0], a[1], a[2], a[3]); +else +this.setColor4(a[0], a[1], a[2], a[3]); +break; +} +return this; +}}); +Clazz_defineMethod (c$, "setColor4", + function (r, g, b, a) { +this.value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0); +java.awt.Color.testColorValueRange (r, g, b, a); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setFloat", + function (r, g, b, f) { +this.setColor4 (Clazz_doubleToInt (r * 255 + 0.5), Clazz_doubleToInt (g * 255 + 0.5), Clazz_doubleToInt (b * 255 + 0.5), Clazz_doubleToInt (f * 255 + 0.5)); +this.frgbvalue = Clazz_newFloatArray (3, 0); +this.frgbvalue[0] = r; +this.frgbvalue[1] = g; +this.frgbvalue[2] = b; +this.falpha = f; +}, "~N,~N,~N,~N"); +c$.getColorF4 = Clazz_defineMethod (c$, "getColorF4", +function (r, g, b, a) { +var c = new java.awt.Color (); +c.setFloat (r, g, b, a); +return c; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getRed", +function () { +return (this.getRGB () >> 16) & 0xFF; +}); +Clazz_defineMethod (c$, "getGreen", +function () { +return (this.getRGB () >> 8) & 0xFF; +}); +Clazz_defineMethod (c$, "getBlue", +function () { +return (this.getRGB () >> 0) & 0xFF; +}); +Clazz_defineMethod (c$, "getAlpha", +function () { +return (this.getRGB () >> 24) & 0xff; +}); +Clazz_defineMethod (c$, "getRGB", +function () { +return this.value; +}); +Clazz_defineMethod (c$, "brighter", +function () { +var r = this.getRed (); +var g = this.getGreen (); +var b = this.getBlue (); +var i = Clazz_doubleToInt (3.333333333333333); +if (r == 0 && g == 0 && b == 0) { +return new java.awt.Color (i, i, i); +}if (r > 0 && r < i) r = i; +if (g > 0 && g < i) g = i; +if (b > 0 && b < i) b = i; +return new java.awt.Color (Math.min (Clazz_doubleToInt (r / 0.7), 255), Math.min (Clazz_doubleToInt (g / 0.7), 255), Math.min (Clazz_doubleToInt (b / 0.7), 255)); +}); +Clazz_defineMethod (c$, "darker", +function () { +return new java.awt.Color (Math.max (Clazz_doubleToInt (this.getRed () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getGreen () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getBlue () * 0.7), 0)); +}); +Clazz_overrideMethod (c$, "hashCode", +function () { +return this.value; +}); +Clazz_overrideMethod (c$, "equals", +function (obj) { +return Clazz_instanceOf (obj, java.awt.Color) && (obj).getRGB () == this.getRGB (); +}, "~O"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[r=" + this.getRed () + ",g=" + this.getGreen () + ",b=" + this.getBlue () + "]"; +}); +c$.decode = Clazz_defineMethod (c$, "decode", +function (nm) { +var intval = Integer.decode (nm); +var i = intval.intValue (); +return new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); +}, "~S"); +c$.getColor = Clazz_defineMethod (c$, "getColor", +function (nm) { +return java.awt.Color.getColor (nm, null); +}, "~S"); +c$.getColor = Clazz_defineMethod (c$, "getColor", +function (nm, v) { +var intval = Integer.getInteger (nm); +if (intval == null) { +return v; +}var i = intval.intValue (); +return new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); +}, "~S,java.awt.Color"); +c$.getColor = Clazz_defineMethod (c$, "getColor", +function (nm, v) { +var intval = Integer.getInteger (nm); +var i = (intval != null) ? intval.intValue () : v; +return new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, (i >> 0) & 0xFF); +}, "~S,~N"); +c$.HSBtoRGB = Clazz_defineMethod (c$, "HSBtoRGB", +function (hue, saturation, brightness) { +var r = 0; +var g = 0; +var b = 0; +if (saturation == 0) { +r = g = b = Clazz_floatToInt (brightness * 255.0 + 0.5); +} else { +var h = (hue - Math.floor (hue)) * 6.0; +var f = h - java.lang.Math.floor (h); +var p = brightness * (1.0 - saturation); +var q = brightness * (1.0 - saturation * f); +var t = brightness * (1.0 - (saturation * (1.0 - f))); +switch (Clazz_floatToInt (h)) { +case 0: +r = Clazz_floatToInt (brightness * 255.0 + 0.5); +g = Clazz_floatToInt (t * 255.0 + 0.5); +b = Clazz_floatToInt (p * 255.0 + 0.5); +break; +case 1: +r = Clazz_floatToInt (q * 255.0 + 0.5); +g = Clazz_floatToInt (brightness * 255.0 + 0.5); +b = Clazz_floatToInt (p * 255.0 + 0.5); +break; +case 2: +r = Clazz_floatToInt (p * 255.0 + 0.5); +g = Clazz_floatToInt (brightness * 255.0 + 0.5); +b = Clazz_floatToInt (t * 255.0 + 0.5); +break; +case 3: +r = Clazz_floatToInt (p * 255.0 + 0.5); +g = Clazz_floatToInt (q * 255.0 + 0.5); +b = Clazz_floatToInt (brightness * 255.0 + 0.5); +break; +case 4: +r = Clazz_floatToInt (t * 255.0 + 0.5); +g = Clazz_floatToInt (p * 255.0 + 0.5); +b = Clazz_floatToInt (brightness * 255.0 + 0.5); +break; +case 5: +r = Clazz_floatToInt (brightness * 255.0 + 0.5); +g = Clazz_floatToInt (p * 255.0 + 0.5); +b = Clazz_floatToInt (q * 255.0 + 0.5); +break; +} +}return 0xff000000 | (r << 16) | (g << 8) | (b << 0); +}, "~N,~N,~N"); +c$.RGBtoHSB = Clazz_defineMethod (c$, "RGBtoHSB", +function (r, g, b, hsbvals) { +var hue; +var saturation; +var brightness; +if (hsbvals == null) { +hsbvals = Clazz_newFloatArray (3, 0); +}var cmax = (r > g) ? r : g; +if (b > cmax) cmax = b; +var cmin = (r < g) ? r : g; +if (b < cmin) cmin = b; +brightness = (cmax) / 255.0; +if (cmax != 0) saturation = ((cmax - cmin)) / (cmax); + else saturation = 0; +if (saturation == 0) hue = 0; + else { +var redc = ((cmax - r)) / ((cmax - cmin)); +var greenc = ((cmax - g)) / ((cmax - cmin)); +var bluec = ((cmax - b)) / ((cmax - cmin)); +if (r == cmax) hue = bluec - greenc; + else if (g == cmax) hue = 2.0 + redc - bluec; + else hue = 4.0 + greenc - redc; +hue = hue / 6.0; +if (hue < 0) hue = hue + 1.0; +}hsbvals[0] = hue; +hsbvals[1] = saturation; +hsbvals[2] = brightness; +return hsbvals; +}, "~N,~N,~N,~A"); +c$.getHSBColor = Clazz_defineMethod (c$, "getHSBColor", +function (h, s, b) { +return new java.awt.Color (java.awt.Color.HSBtoRGB (h, s, b)); +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "getRGBComponents", +function (compArray) { +var f; +if (compArray == null) { +f = Clazz_newFloatArray (4, 0); +} else { +f = compArray; +}if (this.frgbvalue == null) { +f[0] = (this.getRed ()) / 255; +f[1] = (this.getGreen ()) / 255; +f[2] = (this.getBlue ()) / 255; +f[3] = (this.getAlpha ()) / 255; +} else { +f[0] = this.frgbvalue[0]; +f[1] = this.frgbvalue[1]; +f[2] = this.frgbvalue[2]; +f[3] = this.falpha; +}return f; +}, "~A"); +Clazz_defineMethod (c$, "getRGBColorComponents", +function (compArray) { +var f; +if (compArray == null) { +f = Clazz_newFloatArray (3, 0); +} else { +f = compArray; +}if (this.frgbvalue == null) { +f[0] = (this.getRed ()) / 255; +f[1] = (this.getGreen ()) / 255; +f[2] = (this.getBlue ()) / 255; +} else { +f[0] = this.frgbvalue[0]; +f[1] = this.frgbvalue[1]; +f[2] = this.frgbvalue[2]; +}return f; +}, "~A"); +Clazz_overrideMethod (c$, "createContext", +function (cm, r, r2d, xform, hints) { +if (this.context == null || this.context.getRGB () != this.getRGB ()) { +this.context = new java.awt.ColorPaintContext (this.getRGB (), cm); +}return this.context; +}, "java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints"); +Clazz_overrideMethod (c$, "getTransparency", +function () { +var alpha = this.getAlpha (); +if (alpha == 0xff) { +return 1; +} else if (alpha == 0) { +return 2; +} else { +return 3; +}}); +c$.white = c$.prototype.white = new java.awt.Color (255, 255, 255); +c$.WHITE = c$.prototype.WHITE = java.awt.Color.white; +c$.lightGray = c$.prototype.lightGray = new java.awt.Color (192, 192, 192); +c$.LIGHT_GRAY = c$.prototype.LIGHT_GRAY = java.awt.Color.lightGray; +c$.gray = c$.prototype.gray = new java.awt.Color (128, 128, 128); +c$.GRAY = c$.prototype.GRAY = java.awt.Color.gray; +c$.darkGray = c$.prototype.darkGray = new java.awt.Color (64, 64, 64); +c$.DARK_GRAY = c$.prototype.DARK_GRAY = java.awt.Color.darkGray; +c$.black = c$.prototype.black = new java.awt.Color (0, 0, 0); +c$.BLACK = c$.prototype.BLACK = java.awt.Color.black; +c$.red = c$.prototype.red = new java.awt.Color (255, 0, 0); +c$.RED = c$.prototype.RED = java.awt.Color.red; +c$.pink = c$.prototype.pink = new java.awt.Color (255, 175, 175); +c$.PINK = c$.prototype.PINK = java.awt.Color.pink; +c$.orange = c$.prototype.orange = new java.awt.Color (255, 200, 0); +c$.ORANGE = c$.prototype.ORANGE = java.awt.Color.orange; +c$.yellow = c$.prototype.yellow = new java.awt.Color (255, 255, 0); +c$.YELLOW = c$.prototype.YELLOW = java.awt.Color.yellow; +c$.green = c$.prototype.green = new java.awt.Color (0, 255, 0); +c$.GREEN = c$.prototype.GREEN = java.awt.Color.green; +c$.magenta = c$.prototype.magenta = new java.awt.Color (255, 0, 255); +c$.MAGENTA = c$.prototype.MAGENTA = java.awt.Color.magenta; +c$.cyan = c$.prototype.cyan = new java.awt.Color (0, 255, 255); +c$.CYAN = c$.prototype.CYAN = java.awt.Color.cyan; +c$.blue = c$.prototype.blue = new java.awt.Color (0, 0, 255); +c$.BLUE = c$.prototype.BLUE = java.awt.Color.blue; +Clazz_defineStatics (c$, +"FACTOR", 0.7); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.Transparency"], "java.awt.Paint", null, function () { +Clazz_declareInterface (java.awt, "Paint", java.awt.Transparency); +}); +Clazz_declarePackage ("java.awt"); +c$ = Clazz_declareInterface (java.awt, "Transparency"); +Clazz_defineStatics (c$, +"OPAQUE", 1, +"BITMASK", 2, +"TRANSLUCENT", 3); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.PaintContext"], "java.awt.ColorPaintContext", ["java.awt.image.ColorModel"], function () { +c$ = Clazz_decorateAsClass (function () { +this.color = 0; +Clazz_instantialize (this, arguments); +}, java.awt, "ColorPaintContext", null, java.awt.PaintContext); +Clazz_makeConstructor (c$, +function (color, cm) { +this.color = color; +}, "~N,java.awt.image.ColorModel"); +Clazz_overrideMethod (c$, "dispose", +function () { +}); +Clazz_defineMethod (c$, "getRGB", +function () { +return this.color; +}); +Clazz_overrideMethod (c$, "getColorModel", +function () { +return java.awt.image.ColorModel.getRGBdefault (); +}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_declareInterface (java.awt, "PaintContext"); +Clazz_declarePackage ("java.awt.image"); +Clazz_load (["java.awt.Transparency", "java.awt.color.ColorSpace"], "java.awt.image.ColorModel", ["java.lang.IllegalArgumentException", "$.NullPointerException", "$.UnsupportedOperationException", "JU.AU"], function () { +c$ = Clazz_decorateAsClass (function () { +this.pixel_bits = 0; +this.nBits = null; +this.transparency = 3; +this.supportsAlpha = true; +this.$isAlphaPremultiplied = false; +this.numComponents = -1; +this.numColorComponents = -1; +this.colorSpace = null; +this.colorSpaceType = 5; +this.maxBits = 0; +this.is_sRGB = true; +this.transferType = 0; +Clazz_instantialize (this, arguments); +}, java.awt.image, "ColorModel", null, java.awt.Transparency); +Clazz_prepareFields (c$, function () { +this.colorSpace = java.awt.color.ColorSpace.getInstance (1000); +}); +c$.getRGBdefault = Clazz_defineMethod (c$, "getRGBdefault", +function () { +if (java.awt.image.ColorModel.RGBdefault == null) { +java.awt.image.ColorModel.RGBdefault = new java.awt.image.DirectColorModel (32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000); +}return java.awt.image.ColorModel.RGBdefault; +}); +Clazz_makeConstructor (c$, +function (bits) { +this.pixel_bits = bits; +if (bits < 1) { +throw new IllegalArgumentException ("Number of bits must be > 0"); +}this.numComponents = 4; +this.numColorComponents = 3; +this.maxBits = bits; +this.transferType = java.awt.image.ColorModel.getDefaultTransferType (bits); +}, "~N"); +Clazz_makeConstructor (c$, +function (pixel_bits, bits, cspace, hasAlpha, isAlphaPremultiplied, transparency, transferType) { +this.colorSpace = cspace; +this.colorSpaceType = cspace.getType (); +this.numColorComponents = cspace.getNumComponents (); +this.numComponents = this.numColorComponents + (hasAlpha ? 1 : 0); +this.supportsAlpha = hasAlpha; +if (bits.length < this.numComponents) { +throw new IllegalArgumentException ("Number of color/alpha components should be " + this.numComponents + " but length of bits array is " + bits.length); +}if (transparency < 1 || transparency > 3) { +throw new IllegalArgumentException ("Unknown transparency: " + transparency); +}if (this.supportsAlpha == false) { +this.$isAlphaPremultiplied = false; +this.transparency = 1; +} else { +this.$isAlphaPremultiplied = isAlphaPremultiplied; +this.transparency = transparency; +}this.nBits = bits.clone (); +this.pixel_bits = pixel_bits; +if (pixel_bits <= 0) { +throw new IllegalArgumentException ("Number of pixel bits must be > 0"); +}this.maxBits = 0; +for (var i = 0; i < bits.length; i++) { +if (bits[i] < 0) { +throw new IllegalArgumentException ("Number of bits must be >= 0"); +}if (this.maxBits < bits[i]) { +this.maxBits = bits[i]; +}} +if (this.maxBits == 0) { +throw new IllegalArgumentException ("There must be at least one component with > 0 pixel bits."); +}if (cspace !== java.awt.color.ColorSpace.getInstance (1000)) { +this.is_sRGB = false; +}this.transferType = transferType; +}, "~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N"); +Clazz_defineMethod (c$, "hasAlpha", +function () { +return this.supportsAlpha; +}); +Clazz_defineMethod (c$, "isAlphaPremultiplied", +function () { +return this.$isAlphaPremultiplied; +}); +Clazz_defineMethod (c$, "getTransferType", +function () { +return this.transferType; +}); +Clazz_defineMethod (c$, "getPixelSize", +function () { +return this.pixel_bits; +}); +Clazz_defineMethod (c$, "getComponentSize", +function (componentIdx) { +if (this.nBits == null) { +throw new NullPointerException ("Number of bits array is null."); +}return this.nBits[componentIdx]; +}, "~N"); +Clazz_defineMethod (c$, "getComponentSize", +function () { +if (this.nBits != null) { +return this.nBits.clone (); +}return null; +}); +Clazz_overrideMethod (c$, "getTransparency", +function () { +return this.transparency; +}); +Clazz_defineMethod (c$, "getNumComponents", +function () { +return this.numComponents; +}); +Clazz_defineMethod (c$, "getNumColorComponents", +function () { +return this.numColorComponents; +}); +Clazz_defineMethod (c$, "getRGB", +function (pixel) { +return (this.getAlpha (pixel) << 24) | (this.getRed (pixel) << 16) | (this.getGreen (pixel) << 8) | (this.getBlue (pixel) << 0); +}, "~N"); +Clazz_defineMethod (c$, "getRed", +function (inData) { +var pixel = 0; +var length = 0; +var idata = inData; +pixel = idata[0]; +length = idata.length; +if (length == 1) { +return this.getRed (pixel); +} else { +throw new UnsupportedOperationException ("This method is not supported by this color model"); +}}, "~O"); +Clazz_defineMethod (c$, "getGreen", +function (inData) { +var pixel = 0; +var length = 0; +var idata = inData; +pixel = idata[0]; +length = idata.length; +if (length == 1) { +return this.getGreen (pixel); +} else { +throw new UnsupportedOperationException ("This method is not supported by this color model"); +}}, "~O"); +Clazz_defineMethod (c$, "getBlue", +function (inData) { +var pixel = 0; +var length = 0; +var idata = inData; +pixel = idata[0]; +length = idata.length; +if (length == 1) { +return this.getBlue (pixel); +} else { +throw new UnsupportedOperationException ("This method is not supported by this color model"); +}}, "~O"); +Clazz_defineMethod (c$, "getAlpha", +function (inData) { +var pixel = 0; +var length = 0; +var idata = inData; +pixel = idata[0]; +length = idata.length; +if (length == 1) { +return this.getAlpha (pixel); +} else { +throw new UnsupportedOperationException ("This method is not supported by this color model"); +}}, "~O"); +Clazz_defineMethod (c$, "getRGB", +function (inData) { +return (this.getAlpha (inData) << 24) | (this.getRed (inData) << 16) | (this.getGreen (inData) << 8) | (this.getBlue (inData) << 0); +}, "~O"); +Clazz_defineMethod (c$, "getDataElements", +function (rgb, pixel) { +throw new UnsupportedOperationException ("This method is not supported by this color model."); +}, "~N,~O"); +Clazz_defineMethod (c$, "getComponents", +function (pixel, components, offset) { +throw new UnsupportedOperationException ("This method is not supported by this color model."); +}, "~N,~A,~N"); +Clazz_defineMethod (c$, "getComponents", +function (pixel, components, offset) { +throw new UnsupportedOperationException ("This method is not supported by this color model."); +}, "~O,~A,~N"); +Clazz_defineMethod (c$, "getUnnormalizedComponents", +function (normComponents, normOffset, components, offset) { +if (this.colorSpace == null) { +throw new UnsupportedOperationException ("This method is not supported by this color model."); +}if (this.nBits == null) { +throw new UnsupportedOperationException ("This method is not supported. Unable to determine #bits per component."); +}if ((normComponents.length - normOffset) < this.numComponents) { +throw new IllegalArgumentException ("Incorrect number of components. Expecting " + this.numComponents); +}if (components == null) { +components = Clazz_newIntArray (offset + this.numComponents, 0); +}if (this.supportsAlpha && this.$isAlphaPremultiplied) { +var normAlpha = normComponents[normOffset + this.numColorComponents]; +for (var i = 0; i < this.numColorComponents; i++) { +components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) * normAlpha + 0.5); +} +components[offset + this.numColorComponents] = Clazz_floatToInt (normAlpha * ((1 << this.nBits[this.numColorComponents]) - 1) + 0.5); +} else { +for (var i = 0; i < this.numComponents; i++) { +components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) + 0.5); +} +}return components; +}, "~A,~N,~A,~N"); +Clazz_defineMethod (c$, "getNormalizedComponents", +function (components, offset, normComponents, normOffset) { +if (this.colorSpace == null) { +throw new UnsupportedOperationException ("This method is not supported by this color model."); +}if (this.nBits == null) { +throw new UnsupportedOperationException ("This method is not supported. Unable to determine #bits per component."); +}if ((components.length - offset) < this.numComponents) { +throw new IllegalArgumentException ("Incorrect number of components. Expecting " + this.numComponents); +}if (normComponents == null) { +normComponents = Clazz_newFloatArray (this.numComponents + normOffset, 0); +}if (this.supportsAlpha && this.$isAlphaPremultiplied) { +var normAlpha = components[offset + this.numColorComponents]; +normAlpha /= ((1 << this.nBits[this.numColorComponents]) - 1); +if (normAlpha != 0.0) { +for (var i = 0; i < this.numColorComponents; i++) { +normComponents[normOffset + i] = (components[offset + i]) / (normAlpha * (((1 << this.nBits[i]) - 1))); +} +} else { +for (var i = 0; i < this.numColorComponents; i++) { +normComponents[normOffset + i] = 0.0; +} +}normComponents[normOffset + this.numColorComponents] = normAlpha; +} else { +for (var i = 0; i < this.numComponents; i++) { +normComponents[normOffset + i] = (components[offset + i]) / (((1 << this.nBits[i]) - 1)); +} +}return normComponents; +}, "~A,~N,~A,~N"); +Clazz_defineMethod (c$, "getDataElement", +function (components, offset) { +return this.getDataElementInt (components, offset); +}, "~A,~N"); +Clazz_defineMethod (c$, "getDataElementInt", +function (components, offset) { +throw new UnsupportedOperationException ("This method is not supported by this color model."); +}, "~A,~N"); +Clazz_defineMethod (c$, "getDataElement", +function (normComponents, normOffset) { +if (JU.AU.isAI (normComponents)) { +var ints = normComponents; +return this.getDataElementInt (ints, normOffset); +}var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0); +return this.getDataElement (components, 0); +}, "~A,~N"); +Clazz_defineMethod (c$, "getDataElements", +function (normComponents, normOffset, obj) { +var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0); +return this.getDataElements (components, 0, obj); +}, "~A,~N,~O"); +Clazz_defineMethod (c$, "getNormalizedComponents", +function (pixel, normComponents, normOffset) { +var components = this.getComponents (pixel, null, 0); +return this.getNormalizedComponents (components, 0, normComponents, normOffset); +}, "~O,~A,~N"); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (!(Clazz_instanceOf (obj, java.awt.image.ColorModel))) { +return false; +}var cm = obj; +if (this === cm) { +return true; +}if (this.supportsAlpha != cm.hasAlpha () || this.$isAlphaPremultiplied != cm.isAlphaPremultiplied () || this.pixel_bits != cm.getPixelSize () || this.transparency != cm.getTransparency () || this.numComponents != cm.getNumComponents ()) { +return false; +}var nb = cm.getComponentSize (); +if ((this.nBits != null) && (nb != null)) { +for (var i = 0; i < this.numComponents; i++) { +if (this.nBits[i] != nb[i]) { +return false; +}} +} else { +return ((this.nBits == null) && (nb == null)); +}return true; +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +var result = 0; +result = (this.supportsAlpha ? 2 : 3) + (this.$isAlphaPremultiplied ? 4 : 5) + this.pixel_bits * 6 + this.transparency * 7 + this.numComponents * 8; +if (this.nBits != null) { +for (var i = 0; i < this.numComponents; i++) { +result = result + this.nBits[i] * (i + 9); +} +}return result; +}); +Clazz_defineMethod (c$, "getColorSpace", +function () { +return this.colorSpace; +}); +Clazz_defineMethod (c$, "isCompatibleRaster", +function (raster) { +throw new UnsupportedOperationException ("This method has not been implemented for this ColorModel."); +}, "java.awt.image.Raster"); +Clazz_defineMethod (c$, "createCompatibleWritableRaster", +function (w, h) { +throw new UnsupportedOperationException ("This method is not supported by this color model"); +}, "~N,~N"); +Clazz_defineMethod (c$, "createCompatibleSampleModel", +function (w, h) { +throw new UnsupportedOperationException ("This method is not supported by this color model"); +}, "~N,~N"); +Clazz_defineMethod (c$, "isCompatibleSampleModel", +function (sm) { +throw new UnsupportedOperationException ("This method is not supported by this color model"); +}, "java.awt.image.SampleModel"); +Clazz_overrideMethod (c$, "finalize", +function () { +}); +Clazz_defineMethod (c$, "getAlphaRaster", +function (raster) { +return null; +}, "java.awt.image.WritableRaster"); +Clazz_overrideMethod (c$, "toString", +function () { +return String.instantialize ("ColorModel: #pixelBits = " + this.pixel_bits + " numComponents = " + this.numComponents + " color space = " + this.colorSpace + " transparency = " + this.transparency + " has alpha = " + this.supportsAlpha + " isAlphaPre = " + this.$isAlphaPremultiplied); +}); +c$.getDefaultTransferType = Clazz_defineMethod (c$, "getDefaultTransferType", +function (pixel_bits) { +if (pixel_bits <= 8) { +return 0; +}return 3; +}, "~N"); +c$.isLinearRGBspace = Clazz_defineMethod (c$, "isLinearRGBspace", +function (cs) { +return false; +}, "java.awt.color.ColorSpace"); +c$.isLinearGRAYspace = Clazz_defineMethod (c$, "isLinearGRAYspace", +function (cs) { +return false; +}, "java.awt.color.ColorSpace"); +Clazz_defineStatics (c$, +"RGBdefault", null, +"l8Tos8", null, +"s8Tol8", null, +"l16Tos8", null, +"s8Tol16", null, +"g8Tos8Map", null, +"lg16Toog8Map", null, +"g16Tos8Map", null, +"lg16Toog16Map", null); +}); +Clazz_declarePackage ("java.awt.color"); +Clazz_load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.type = 0; +this.numComponents = 0; +this.compName = null; +Clazz_instantialize (this, arguments); +}, java.awt.color, "ColorSpace"); +Clazz_makeConstructor (c$, +function (type, numcomponents) { +this.type = type; +this.numComponents = numcomponents; +}, "~N,~N"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function (colorspace) { +var theColorSpace; +switch (colorspace) { +default: +case 1000: +if (java.awt.color.ColorSpace.sRGBspace == null) { +java.awt.color.ColorSpace.sRGBspace = new java.awt.color.ColorSpace (5, 3); +}theColorSpace = java.awt.color.ColorSpace.sRGBspace; +break; +} +return theColorSpace; +}, "~N"); +Clazz_defineMethod (c$, "isCS_sRGB", +function () { +return (this === java.awt.color.ColorSpace.sRGBspace); +}); +Clazz_defineMethod (c$, "toRGB", +function (colorvalue) { +return colorvalue; +}, "~A"); +Clazz_defineMethod (c$, "fromRGB", +function (rgbvalue) { +return rgbvalue; +}, "~A"); +Clazz_defineMethod (c$, "getType", +function () { +return this.type; +}); +Clazz_defineMethod (c$, "getNumComponents", +function () { +return this.numComponents; +}); +Clazz_defineMethod (c$, "getName", +function (idx) { +if ((idx < 0) || (idx > this.numComponents - 1)) { +throw new IllegalArgumentException ("Component index out of range: " + idx); +}if (this.compName == null) { +switch (this.type) { +case 0: +this.compName = Clazz_newArray (-1, ["X", "Y", "Z"]); +break; +case 1: +this.compName = Clazz_newArray (-1, ["L", "a", "b"]); +break; +case 2: +this.compName = Clazz_newArray (-1, ["L", "u", "v"]); +break; +case 3: +this.compName = Clazz_newArray (-1, ["Y", "Cb", "Cr"]); +break; +case 4: +this.compName = Clazz_newArray (-1, ["Y", "x", "y"]); +break; +case 5: +this.compName = Clazz_newArray (-1, ["Red", "Green", "Blue"]); +break; +case 6: +this.compName = Clazz_newArray (-1, ["Gray"]); +break; +case 7: +this.compName = Clazz_newArray (-1, ["Hue", "Saturation", "Value"]); +break; +case 8: +this.compName = Clazz_newArray (-1, ["Hue", "Lightness", "Saturation"]); +break; +case 9: +this.compName = Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]); +break; +case 11: +this.compName = Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow"]); +break; +default: +var tmp = new Array (this.numComponents); +for (var i = 0; i < tmp.length; i++) { +tmp[i] = "Unnamed color component(" + i + ")"; +} +this.compName = tmp; +} +}return this.compName[idx]; +}, "~N"); +Clazz_defineMethod (c$, "getMinValue", +function (component) { +if ((component < 0) || (component > this.numComponents - 1)) { +throw new IllegalArgumentException ("Component index out of range: " + component); +}return 0.0; +}, "~N"); +Clazz_defineMethod (c$, "getMaxValue", +function (component) { +if ((component < 0) || (component > this.numComponents - 1)) { +throw new IllegalArgumentException ("Component index out of range: " + component); +}return 1.0; +}, "~N"); +Clazz_defineStatics (c$, +"sRGBspace", null, +"TYPE_XYZ", 0, +"TYPE_Lab", 1, +"TYPE_Luv", 2, +"TYPE_YCbCr", 3, +"TYPE_Yxy", 4, +"TYPE_RGB", 5, +"TYPE_GRAY", 6, +"TYPE_HSV", 7, +"TYPE_HLS", 8, +"TYPE_CMYK", 9, +"TYPE_CMY", 11, +"TYPE_2CLR", 12, +"TYPE_3CLR", 13, +"TYPE_4CLR", 14, +"TYPE_5CLR", 15, +"TYPE_6CLR", 16, +"TYPE_7CLR", 17, +"TYPE_8CLR", 18, +"TYPE_9CLR", 19, +"TYPE_ACLR", 20, +"TYPE_BCLR", 21, +"TYPE_CCLR", 22, +"TYPE_DCLR", 23, +"TYPE_ECLR", 24, +"TYPE_FCLR", 25, +"CS_sRGB", 1000, +"CS_LINEAR_RGB", 1004, +"CS_CIEXYZ", 1001, +"CS_PYCC", 1002, +"CS_GRAY", 1003); +}); +Clazz_declarePackage ("java.util"); +Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () { +c$ = Clazz_decorateAsClass (function () { +this.parent = null; +this.locale = null; +this.expired = false; +this.$keySet = null; +Clazz_instantialize (this, arguments); +}, java.util, "ResourceBundle"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "getString", +function (key) { +return this.getObject (key); +}, "~S"); +Clazz_defineMethod (c$, "getStringArray", +function (key) { +return this.getObject (key); +}, "~S"); +Clazz_defineMethod (c$, "getObject", +function (key) { +var obj = this.handleGetObject (key); +if (obj == null) { +if (this.parent != null) { +obj = this.parent.getObject (key); +}if (obj == null) throw new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key); +}return obj; +}, "~S"); +Clazz_defineMethod (c$, "getLocale", +function () { +return this.locale; +}); +Clazz_defineMethod (c$, "setParent", +function (parent) { +this.parent = parent; +}, "java.util.ResourceBundle"); +c$.getBundle = Clazz_defineMethod (c$, "getBundle", +function (baseName, targetLocale, loader, control) { +var n = 4; +{ +n = arguments.length; +}switch (n) { +case 2: +if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) { +control = targetLocale; +targetLocale = null; +}break; +case 3: +if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) { +control = loader; +loader = null; +}break; +} +if (targetLocale == null) targetLocale = java.util.Locale.getDefault (); +if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); +return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control); +}, "~S,~O,~O,java.util.ResourceBundle.Control"); +c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", + function (baseName, locale, loader, control) { +if (control == null) { +throw new NullPointerException ("ResourceBundle locale or control is null"); +}var cacheKey = new java.util.ResourceBundle.CacheKey (baseName, locale, loader); +var bundle = null; +var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); +if (bundleRef != null) { +bundle = bundleRef; +bundleRef = null; +}if (java.util.ResourceBundle.isValidBundle (bundle)) { +return bundle; +}var formats = control.getFormats (baseName); +var baseBundle = null; +for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) { +var candidateLocales = control.getCandidateLocales (baseName, targetLocale); +bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle); +if (java.util.ResourceBundle.isValidBundle (bundle)) { +var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale); +if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) { +break; +}if (isBaseBundle && baseBundle == null) { +baseBundle = bundle; +}}} +if (bundle == null) { +if (baseBundle == null) { +java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ()); +}bundle = baseBundle; +}return bundle; +}, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control"); +c$.findBundle = Clazz_defineMethod (c$, "findBundle", + function (cacheKey, candidateLocales, formats, index, control, baseBundle) { +var targetLocale = candidateLocales.get (index); +var parent = null; +if (index != candidateLocales.size () - 1) { +parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle); +} else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) { +return baseBundle; +}var expiredBundle = false; +cacheKey.setLocale (targetLocale); +var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control); +if (java.util.ResourceBundle.isValidBundle (bundle)) { +expiredBundle = bundle.expired; +if (!expiredBundle) { +if (bundle.parent === parent) { +return bundle; +}var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); +if (bundleRef != null && bundleRef === bundle) { +java.util.ResourceBundle.cacheList.remove (cacheKey); +}}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) { +var constKey = cacheKey.clone (); +try { +try { +bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle); +if (bundle != null) { +if (bundle.parent == null) { +bundle.setParent (parent); +}bundle.locale = targetLocale; +bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control); +return bundle; +}java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control); +} finally { +} +} finally { +if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) { +Thread.currentThread ().interrupt (); +}} +}return parent; +}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle"); +c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", + function (cacheKey, formats, control, reload) { +var targetLocale = cacheKey.getLocale (); +var bundle = null; +var size = formats.size (); +for (var i = 0; i < size; i++) { +var format = formats.get (i); +try { +bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload); +} catch (e$$) { +if (Clazz_exceptionOf (e$$, LinkageError)) { +var error = e$$; +{ +cacheKey.setCause (error); +} +} else if (Clazz_exceptionOf (e$$, Exception)) { +var cause = e$$; +{ +cacheKey.setCause (cause); +} +} else { +throw e$$; +} +} +if (bundle != null) { +cacheKey.setFormat (format); +bundle.locale = targetLocale; +bundle.expired = false; +break; +}} +return bundle; +}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B"); +c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", + function (bundle) { +return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE; +}, "java.util.ResourceBundle"); +c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", + function (baseName, locale, cause) { +if (Clazz_instanceOf (cause, java.util.MissingResourceException)) { +cause = null; +}throw new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause); +}, "~S,java.util.Locale,Throwable"); +c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", + function (cacheKey, control) { +var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); +if (bundleRef == null) { +return null; +}var bundle = bundleRef; +return bundle; +}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control"); +c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", + function (cacheKey, bundle, control) { +var key = cacheKey.clone (); +java.util.ResourceBundle.cacheList.put (key, bundle); +return bundle; +}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control"); +c$.clearCache = Clazz_defineMethod (c$, "clearCache", +function () { +java.util.ResourceBundle.cacheList.clear (); +}); +Clazz_defineMethod (c$, "containsKey", +function (key) { +if (key == null) { +throw new NullPointerException (); +}for (var rb = this; rb != null; rb = rb.parent) { +if (rb.handleKeySet ().contains (key)) { +return true; +}} +return false; +}, "~S"); +Clazz_defineMethod (c$, "keySet", +function () { +var keys = new java.util.HashSet (); +for (var rb = this; rb != null; rb = rb.parent) { +keys.addAll (rb.handleKeySet ()); +} +return keys; +}); +Clazz_defineMethod (c$, "handleKeySet", +function () { +if (this.$keySet == null) { +{ +if (this.$keySet == null) { +var keys = new java.util.HashSet (); +var enumKeys = this.getKeys (); +while (enumKeys.hasMoreElements ()) { +var key = enumKeys.nextElement (); +if (this.handleGetObject (key) != null) { +keys.add (key); +}} +this.$keySet = keys; +}}}return this.$keySet; +}); +c$.$ResourceBundle$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle); +Clazz_defineMethod (c$, "getKeys", +function () { +return null; +}); +Clazz_defineMethod (c$, "handleGetObject", +function (key) { +return null; +}, "~S"); +Clazz_overrideMethod (c$, "toString", +function () { +return "NONEXISTENT_BUNDLE"; +}); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.name = null; +this.locale = null; +this.format = null; +this.cause = null; +this.hashCodeCache = 0; +Clazz_instantialize (this, arguments); +}, java.util.ResourceBundle, "CacheKey", null, Cloneable); +Clazz_makeConstructor (c$, +function (a, b, c) { +this.name = a; +this.locale = b; +if (this.name != null) this.calculateHashCode (); +}, "~S,java.util.Locale,~O"); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "getLocale", +function () { +return this.locale; +}); +Clazz_defineMethod (c$, "setLocale", +function (a) { +if (!this.locale.equals (a)) { +this.locale = a; +this.calculateHashCode (); +}return this; +}, "java.util.Locale"); +Clazz_overrideMethod (c$, "equals", +function (a) { +if (this === a) { +return true; +}try { +var b = a; +if (this.hashCodeCache != b.hashCodeCache) { +return false; +}if (!this.name.equals (b.name)) { +return false; +}if (!this.locale.equals (b.locale)) { +return false; +}return true; +} catch (e$$) { +if (Clazz_exceptionOf (e$$, NullPointerException)) { +var e = e$$; +{ +} +} else if (Clazz_exceptionOf (e$$, ClassCastException)) { +var e = e$$; +{ +} +} else { +throw e$$; +} +} +return false; +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +return this.hashCodeCache; +}); +Clazz_defineMethod (c$, "calculateHashCode", + function () { +this.hashCodeCache = this.name.hashCode () << 3; +this.hashCodeCache ^= this.locale.hashCode (); +}); +Clazz_defineMethod (c$, "clone", +function () { +try { +var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []); +a.cause = null; +return a; +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_defineMethod (c$, "setFormat", +function (a) { +this.format = a; +}, "~S"); +Clazz_defineMethod (c$, "setCause", + function (a) { +if (this.cause == null) { +this.cause = a; +} else { +if (Clazz_instanceOf (this.cause, ClassNotFoundException)) { +this.cause = a; +}}}, "Throwable"); +Clazz_defineMethod (c$, "getCause", + function () { +return this.cause; +}); +Clazz_overrideMethod (c$, "toString", +function () { +var a = this.locale.toString (); +if (a.length == 0) { +if (this.locale.getVariant ().length != 0) { +a = "__" + this.locale.getVariant (); +} else { +a = "\"\""; +}}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]"; +}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.util.ResourceBundle, "Control"); +Clazz_makeConstructor (c$, +function () { +}); +c$.getControl = Clazz_defineMethod (c$, "getControl", +function (a) { +if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { +return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { +return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { +return java.util.ResourceBundle.Control.INSTANCE; +}throw new IllegalArgumentException (); +}, "java.util.List"); +c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", +function (a) { +if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { +return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { +return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK; +}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { +return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK; +}throw new IllegalArgumentException (); +}, "java.util.List"); +Clazz_defineMethod (c$, "getFormats", +function (a) { +if (a == null) { +throw new NullPointerException (); +}return java.util.ResourceBundle.Control.FORMAT_DEFAULT; +}, "~S"); +Clazz_defineMethod (c$, "getCandidateLocales", +function (a, b) { +if (a == null) { +throw new NullPointerException (); +}var c = b.getLanguage (); +var d = b.getCountry (); +var e = b.getVariant (); +var f = new java.util.ArrayList (4); +if (e.length > 0) { +f.add (b); +}if (d.length > 0) { +f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, "")); +}if (c.length > 0) { +f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", "")); +}f.add (java.util.Locale.ROOT); +return f; +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "getFallbackLocale", +function (a, b) { +if (a == null) { +throw new NullPointerException (); +}var c = java.util.Locale.getDefault (); +return b.equals (c) ? null : c; +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "newBundle", +function (a, b, c, d, e) { +var f = this.toBundleName (a, b); +var g = null; +if (c.equals ("java.class")) { +g = swingjs.api.Interface.getInstance (f, false); +} else if (c.equals ("java.properties")) { +var h = this.toResourceName0 (f, "properties"); +if (h == null) { +return null; +}var i = swingjs.JSToolkit.getJavaResource (h, false); +var j = null; +j = (i == null ? null : new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ()))); +if (j != null) { +try { +g = this.newPropertyBundle (j); +} finally { +j.close (); +} +}} else { +throw new IllegalArgumentException ("unknown format: " + c); +}return g; +}, "~S,java.util.Locale,~S,~O,~B"); +Clazz_defineMethod (c$, "newPropertyBundle", + function (a) { +return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a); +}, "java.io.InputStream"); +Clazz_defineMethod (c$, "getTimeToLive", +function (a, b) { +if (a == null || b == null) { +throw new NullPointerException (); +}return -2; +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "toBundleName", +function (a, b) { +if (b === java.util.Locale.ROOT) { +return a; +}var c = b.getLanguage (); +var d = b.getCountry (); +var e = b.getVariant (); +if (c === "" && d === "" && e === "") { +return a; +}var f = new StringBuilder (a); +f.append ('_'); +if (e !== "") { +f.append (c).append ('_').append (d).append ('_').append (e); +} else if (d !== "") { +f.append (c).append ('_').append (d); +} else { +f.append (c); +}return f.toString (); +}, "~S,java.util.Locale"); +Clazz_defineMethod (c$, "toResourceName", +function (a, b) { +var c = new StringBuilder (a.length + 1 + b.length); +c.append (a.$replace ('.', '/')).append ('.').append (b); +return c.toString (); +}, "~S,~S"); +Clazz_defineMethod (c$, "toResourceName0", + function (a, b) { +if (a.contains ("://")) { +return null; +} else { +return this.toResourceName (a, b); +}}, "~S,~S"); +c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"])); +c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"])); +c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"])); +Clazz_defineStatics (c$, +"TTL_DONT_CACHE", -1, +"TTL_NO_EXPIRATION_CONTROL", -2); +c$.INSTANCE = c$.prototype.INSTANCE = new java.util.ResourceBundle.Control (); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.formats = null; +Clazz_instantialize (this, arguments); +}, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []); +this.formats = a; +}, "java.util.List"); +Clazz_overrideMethod (c$, "getFormats", +function (a) { +if (a == null) { +throw new NullPointerException (); +}return this.formats; +}, "~S"); +c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); +c$.CLASS_ONLY = c$.prototype.CLASS_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl); +Clazz_overrideMethod (c$, "getFallbackLocale", +function (a, b) { +if (a == null || b == null) { +throw new NullPointerException (); +}return null; +}, "~S,java.util.Locale"); +c$.NO_FALLBACK = c$.prototype.NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT); +c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); +c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"INITIAL_CACHE_SIZE", 32); +c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null)); +c$.cacheList = c$.prototype.cacheList = new java.util.HashMap (32); +}); +Clazz_declarePackage ("java.applet"); +Clazz_load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () { +c$ = Clazz_decorateAsClass (function () { +this.stub = null; +Clazz_instantialize (this, arguments); +}, java.applet, "Applet", java.awt.Panel); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.applet.Applet, []); +this.setPanel (); +}); +Clazz_defineMethod (c$, "setStub", +function (stub) { +this.stub = stub; +}, "java.applet.AppletStub"); +Clazz_defineMethod (c$, "isActive", +function () { +if (this.stub != null) { +return this.stub.isActive (); +} else { +return false; +}}); +Clazz_defineMethod (c$, "getDocumentBase", +function () { +return this.stub.getDocumentBase (); +}); +Clazz_defineMethod (c$, "getCodeBase", +function () { +return this.stub.getCodeBase (); +}); +Clazz_defineMethod (c$, "getParameter", +function (name) { +return this.stub.getParameter (name); +}, "~S"); +Clazz_defineMethod (c$, "getAppletContext", +function () { +return this.stub.getAppletContext (); +}); +Clazz_defineMethod (c$, "resize", +function (width, height) { +var d = this.size (); +if ((d.width != width) || (d.height != height)) { +Clazz_superCall (this, java.applet.Applet, "resize", [width, height]); +if (this.stub != null) { +this.stub.appletResize (width, height); +}}}, "~N,~N"); +Clazz_defineMethod (c$, "resize", +function (d) { +this.resize (d.width, d.height); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "showStatus", +function (msg) { +this.getAppletContext ().showStatus (msg); +}, "~S"); +Clazz_defineMethod (c$, "getImage", +function (url) { +return this.getAppletContext ().getImage (url); +}, "java.net.URL"); +Clazz_defineMethod (c$, "getImage", +function (url, name) { +try { +return this.getImage ( new java.net.URL (url, name)); +} catch (e) { +if (Clazz_exceptionOf (e, java.net.MalformedURLException)) { +return null; +} else { +throw e; +} +} +}, "java.net.URL,~S"); +Clazz_defineMethod (c$, "getAppletInfo", +function () { +return null; +}); +Clazz_defineMethod (c$, "getLocale", +function () { +var locale = Clazz_superCall (this, java.applet.Applet, "getLocale", []); +if (locale == null) { +return java.util.Locale.getDefault (); +}return locale; +}); +Clazz_defineMethod (c$, "getParameterInfo", +function () { +return null; +}); +Clazz_defineMethod (c$, "init", +function () { +}); +Clazz_defineMethod (c$, "start", +function () { +}); +Clazz_defineMethod (c$, "stop", +function () { +}); +Clazz_defineMethod (c$, "destroy", +function () { +}); +}); +Clazz_declarePackage ("java.net"); +Clazz_load (["java.util.Hashtable"], "java.net.URL", ["java.io.IOException", "java.lang.Character", "$.Error", "java.net.MalformedURLException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.protocol = null; +this.host = null; +this.port = -1; +this.file = null; +this.query = null; +this.authority = null; +this.path = null; +this.userInfo = null; +this.ref = null; +this.handler = null; +this.$hashCode = -1; +Clazz_instantialize (this, arguments); +}, java.net, "URL", null, java.io.Serializable); +Clazz_makeConstructor (c$, +function (context, spec, handler) { +{ +switch (arguments.length) { +case 1: +spec = context;context = handler = null; +break; +case 2: +handler = null; +break; +case 3: +if (context == null || Clazz_instanceOf(context, java.net.URL)) +break; +default: +alert("java.net.URL constructor format not supported"); +break; +} +context && context.valueOf && context.valueOf() == null && (context = null); +}var original = spec; +var i; +var limit; +var c; +var start = 0; +var newProtocol = null; +var aRef = false; +var isRelative = false; +try { +limit = spec.length; +while ((limit > 0) && (spec.charAt (limit - 1) <= ' ')) { +limit--; +} +while ((start < limit) && (spec.charAt (start) <= ' ')) { +start++; +} +if (spec.regionMatches (true, start, "url:", 0, 4)) { +start += 4; +}if (start < spec.length && spec.charAt (start) == '#') { +aRef = true; +}for (i = start; !aRef && (i < limit) && ((c = spec.charCodeAt (i)) != 47); i++) { +if (c == 58) { +var s = spec.substring (start, i).toLowerCase (); +if (this.isValidProtocol (s)) { +newProtocol = s; +start = i + 1; +}break; +}} +this.protocol = newProtocol; +if ((context != null) && ((newProtocol == null) || newProtocol.equalsIgnoreCase (context.protocol))) { +if (handler == null) { +handler = context.handler; +}if (context.path != null && context.path.startsWith ("/")) newProtocol = null; +if (newProtocol == null) { +this.protocol = context.protocol; +this.authority = context.authority; +this.userInfo = context.userInfo; +this.host = context.host; +this.port = context.port; +this.file = context.file; +this.path = context.path; +isRelative = true; +}}if (this.protocol == null) { +throw new java.net.MalformedURLException ("no protocol: " + original); +}if (handler == null && (handler = java.net.URL.getURLStreamHandler (this.protocol)) == null) { +throw new java.net.MalformedURLException ("unknown protocol: " + this.protocol); +}this.handler = handler; +i = spec.indexOf ('#', start); +if (i >= 0) { +this.ref = spec.substring (i + 1, limit); +limit = i; +}if (isRelative && start == limit) { +this.query = context.query; +if (this.ref == null) { +this.ref = context.ref; +}}handler.parseURL (this, spec, start, limit); +} catch (e$$) { +if (Clazz_exceptionOf (e$$, java.net.MalformedURLException)) { +var e = e$$; +{ +throw e; +} +} else if (Clazz_exceptionOf (e$$, Exception)) { +var e = e$$; +{ +var exception = new java.net.MalformedURLException (e.getMessage ()); +exception.initCause (e); +throw exception; +} +} else { +throw e$$; +} +} +}, "java.net.URL,~S,java.net.URLStreamHandler"); +Clazz_defineMethod (c$, "isValidProtocol", + function (protocol) { +var len = protocol.length; +if (len < 1) return false; +var c = protocol.charAt (0); +if (!Character.isLetter (c)) return false; +for (var i = 1; i < len; i++) { +c = protocol.charAt (i); +if (!Character.isLetterOrDigit (c) && c != '.' && c != '+' && c != '-') { +return false; +}} +return true; +}, "~S"); +Clazz_defineMethod (c$, "set5", +function (protocol, host, port, file, ref) { +{ +this.protocol = protocol; +this.host = host; +this.authority = port == -1 ? host : host + ":" + port; +this.port = port; +this.file = file; +this.ref = ref; +this.$hashCode = -1; +var q = file.lastIndexOf ('?'); +if (q != -1) { +this.query = file.substring (q + 1); +this.path = file.substring (0, q); +} else this.path = file; +}}, "~S,~S,~N,~S,~S"); +Clazz_defineMethod (c$, "set", +function (protocol, host, port, authority, userInfo, path, query, ref) { +{ +this.protocol = protocol; +this.host = host; +this.port = port; +this.file = query == null ? path : path + "?" + query; +this.userInfo = userInfo; +this.path = path; +this.ref = ref; +this.$hashCode = -1; +this.query = query; +this.authority = authority; +}}, "~S,~S,~N,~S,~S,~S,~S,~S"); +Clazz_defineMethod (c$, "getQuery", +function () { +return this.query; +}); +Clazz_defineMethod (c$, "getPath", +function () { +return this.path; +}); +Clazz_defineMethod (c$, "getUserInfo", +function () { +return this.userInfo; +}); +Clazz_defineMethod (c$, "getAuthority", +function () { +return this.authority; +}); +Clazz_defineMethod (c$, "getPort", +function () { +return this.port; +}); +Clazz_defineMethod (c$, "getDefaultPort", +function () { +return this.handler.getDefaultPort (); +}); +Clazz_defineMethod (c$, "getProtocol", +function () { +return this.protocol; +}); +Clazz_defineMethod (c$, "getHost", +function () { +return this.host; +}); +Clazz_defineMethod (c$, "getFile", +function () { +return this.file; +}); +Clazz_defineMethod (c$, "getRef", +function () { +return this.ref; +}); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (!(Clazz_instanceOf (obj, java.net.URL))) return false; +var u2 = obj; +return this.handler.equals2 (this, u2); +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +if (this.$hashCode != -1) return this.$hashCode; +this.$hashCode = this.handler.hashCode (this); +return this.$hashCode; +}); +Clazz_defineMethod (c$, "sameFile", +function (other) { +return this.handler.sameFile (this, other); +}, "java.net.URL"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.toExternalForm (); +}); +Clazz_defineMethod (c$, "toExternalForm", +function () { +return this.handler.toExternalForm (this); +}); +Clazz_defineMethod (c$, "openConnection", +function () { +return this.handler.openConnection (this); +}); +Clazz_defineMethod (c$, "openStream", +function () { +return this.openConnection ().getInputStream (); +}); +Clazz_defineMethod (c$, "getContent", +function () { +return this.openConnection ().getInputStream (); +}); +c$.setURLStreamHandlerFactory = Clazz_defineMethod (c$, "setURLStreamHandlerFactory", +function (fac) { +{ +if (java.net.URL.factory != null) { +throw new Error ("factory already defined"); +}var security = System.getSecurityManager (); +if (security != null) { +security.checkSetFactory (); +}java.net.URL.handlers.clear (); +java.net.URL.factory = fac; +}}, "java.net.URLStreamHandlerFactory"); +c$.getURLStreamHandler = Clazz_defineMethod (c$, "getURLStreamHandler", +function (protocol) { +var handler = java.net.URL.handlers.get (protocol); +if (handler == null) { +if (java.net.URL.factory != null) { +handler = java.net.URL.factory.createURLStreamHandler (protocol); +}}return handler; +}, "~S"); +Clazz_defineStatics (c$, +"factory", null); +c$.handlers = c$.prototype.handlers = new java.util.Hashtable (); +c$.streamHandlerLock = c$.prototype.streamHandlerLock = new Clazz._O (); +}); + +// modified by Bob Hanson 3/21/2014 6:44:21 AM to reduce this.b$[....] phrases to simply this.h$ +// BH added ability to use a non-Java key for HTML elements, for example. +// BH 8/24/2014 8:48:58 PM all synchronization and inner classes removed + + +Clazz_load([],"java.util.HashtableIterator",[],function(){ +c$=Clazz_decorateAsClass(function(){ +this.position=0; +this.expectedModCount=0; +this.type=null; +this.lastEntry=null; +this.lastPosition=0; +this.canRemove=false; +Clazz_instantialize(this,arguments); +},java.util,"HashtableIterator",null,java.util.Iterator); +Clazz_makeConstructor(c$, +function(a){ +this.type=a; +this.h$ = a.h$; +this.position=this.h$.lastSlot; +this.expectedModCount=this.h$.modCount; +},"java.util.AbstractSet"); +Clazz_overrideMethod(c$,"hasNext", +function(){ +if(this.lastEntry&&this.lastEntry.next){ +return true; +}while(this.position>=this.h$.firstSlot){ +if(this.h$.elementData[this.position]==null){ +this.position--; +}else{ +return true; +}} +return false; +}); +Clazz_overrideMethod(c$,"next", +function(){ +if(this.expectedModCount==this.h$.modCount){ +if(this.lastEntry){ +this.lastEntry=this.lastEntry.next; +}if(this.lastEntry==null){ +while(this.position>=this.h$.firstSlot&&(this.lastEntry=this.h$.elementData[this.position])==null){ +this.position--; +} +if(this.lastEntry){ +this.lastPosition=this.position; +this.position--; +}}if(this.lastEntry){ +this.canRemove=true; +return this.type.get(this.lastEntry); +}throw new java.util.NoSuchElementException(); +}throw new java.util.ConcurrentModificationException(); +}); +Clazz_overrideMethod(c$,"remove", +function(){ +if(this.expectedModCount==this.h$.modCount){ +if(this.canRemove){ +this.canRemove=false; +{ +var a=false; +var b=this.h$.elementData[this.lastPosition]; +if(b===this.lastEntry){ +this.h$.elementData[this.lastPosition]=b.next; +a=true; +}else{ +while(b&&b.next!==this.lastEntry){ +b=b.next; +} +if(b){ +b.next=this.lastEntry.next; +a=true; +}}if(a){ +this.h$.modCount++; +this.h$.elementCount--; +this.expectedModCount++; +return; +}}}else{ +throw new IllegalStateException(); +}}throw new java.util.ConcurrentModificationException(); +}); +}); + + + +//////////////////////////// + + +Clazz_load([],"java.util.HashtableEnumerator",[],function(){ +c$=Clazz_decorateAsClass(function(){ +this.key=false; +this.start=0; +this.entry=null; +Clazz_instantialize(this,arguments); +},java.util,"HashtableEnumerator",null,java.util.Enumeration); + +Clazz_makeConstructor(c$, +function(a, b){ +this.key = a; +this.h$ = b; +if (this.h$)this.start=this.h$.lastSlot+1; +},"~B,java.util.Hashtable"); +Clazz_overrideMethod(c$,"hasMoreElements", +function(){ +if (!this.h$)return false; +if(this.entry)return true; + +while(--this.start>=this.h$.firstSlot){ +if(this.h$.elementData[this.start]){ +this.entry=this.h$.elementData[this.start]; +return true; +}} +return false; +}); +Clazz_overrideMethod(c$,"nextElement", +function(){ +if(this.hasMoreElements()){ +var a=this.key?this.entry.key:this.entry.value; +this.entry=this.entry.next; +return a; +} +throw new java.util.NoSuchElementException(); +}); +}); + +//////////////////////////// + +Clazz_load([],"java.util.HashtableEntrySet",[],function(){ +c$=Clazz_decorateAsClass(function(){ +Clazz_instantialize(this,arguments); +},java.util,"HashtableEntrySet",java.util.AbstractSet); + +Clazz_makeConstructor(c$, +function(a){ +this.h$ = a; +},"java.util.Hashtable"); +Clazz_overrideMethod(c$,"size", +function(){ +return this.h$.elementCount; +}); +Clazz_overrideMethod(c$,"clear", +function(){ +this.h$.clear(); +}); +Clazz_overrideMethod(c$,"remove", +function(object){ +if(this.contains(object)){ +this.h$.remove((object).getKey()); +return true; +}return false; +},"~O"); +Clazz_defineMethod(c$,"contains", +function(object){ +var entry=this.h$.getEntry((object).getKey()); +return object.equals(entry); +},"~O"); + +Clazz_overrideMethod(c$,"get", +function(entry){ +return entry; +},"java.util.MapEntry"); + +Clazz_defineMethod(c$,"iterator", +function(){ +return new java.util.HashtableIterator(this); +}); +}); + + +//////////////////////////// + +Clazz_load([],"java.util.HashtableKeySet",[],function(){ +c$=Clazz_decorateAsClass(function(){ +Clazz_instantialize(this,arguments); +},java.util,"HashtableKeySet",java.util.AbstractSet); + +Clazz_makeConstructor(c$, +function(a){ +this.h$ = a; +},"java.util.Hashtable"); + +Clazz_overrideMethod(c$,"contains", +function(object){ +return this.h$.containsKey(object); +},"~O"); +Clazz_overrideMethod(c$,"size", +function(){ +return this.h$.elementCount; +}); +Clazz_overrideMethod(c$,"clear", +function(){ +this.h$.clear(); +}); +Clazz_overrideMethod(c$,"remove", +function(key){ +if(this.h$.containsKey(key)){ +this.h$.remove(key); +return true; +}return false; +},"~O"); + +Clazz_overrideMethod(c$,"get", +function(entry){ +return entry.key; +},"java.util.MapEntry"); + +Clazz_overrideMethod(c$,"iterator", +function(){ +return new java.util.HashtableIterator(this); +}); +}); + +//////////////////////////// + +Clazz_load([],"java.util.HashtableValueCollection",[],function(){ +c$=Clazz_decorateAsClass(function(){ +Clazz_instantialize(this,arguments); +},java.util,"HashtableValueCollection",null,java.util.AbstractCollection); + +Clazz_makeConstructor(c$, +function(a){ +this.h$ = a; +},"java.util.Hashtable"); +Clazz_overrideMethod(c$,"contains", +function(object){ +return this.h$.contains(object); +},"~O"); +Clazz_overrideMethod(c$,"size", +function(){ +return this.h$.elementCount; +}); +Clazz_overrideMethod(c$,"clear", +function(){ +this.h$.clear(); +}); + +Clazz_overrideMethod(c$,"get", +function(entry){ +return entry.value; +},"java.util.MapEntry"); + +Clazz_overrideMethod(c$,"iterator", +function(){ +return new java.util.HashtableIterator(this); +}); +}); +//////////////////////////// + + +Clazz_load(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){ +c$=Clazz_decorateAsClass(function(){ +this.next=null; +this.hashcode=0; +Clazz_instantialize(this,arguments); +},java.util,"HashtableEntry",java.util.MapEntry); +Clazz_overrideConstructor(c$, +function(a,b){ +this.key = a; +this.value = b; +this.hashcode=a.hashCode(); +}); +Clazz_defineMethod(c$,"clone", +function(){ +var a=Clazz_superCall(this,java.util.HashtableEntry,"clone",[]); +if(this.next!=null){ +a.next=this.next.clone(); +} +return a; +}); +Clazz_overrideMethod(c$,"setValue", +function(a){ +if(a==null){ +throw new NullPointerException(); +}var b=this.value; +this.value=a; +return b; +},"~O"); +Clazz_defineMethod(c$,"getKeyHash", +function(){ +return this.key.hashCode(); +}); +Clazz_defineMethod(c$,"equalsKey", +function(a,b){ +return this.hashcode==(!a.hashCode || a.hashCode())&&this.key.equals(a); +},"~O,~N"); +Clazz_overrideMethod(c$,"toString", +function(){ +return this.key+"="+this.value; +}); +}); + + + +//////////////////////////// + + +Clazz_load(["java.util.Dictionary","$.Enumeration","$.HashtableEnumerator","$.Iterator","$.Map","$.MapEntry","$.NoSuchElementException"],"java.util.Hashtable",["java.lang.IllegalArgumentException","$.IllegalStateException","$.NullPointerException","$.StringBuilder","java.util.AbstractCollection","$.AbstractSet","$.Arrays","$.Collections","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.HashtableEntry"],function(){ +c$=Clazz_decorateAsClass(function(){ +this.elementCount=0; +this.elementData=null; +this.loadFactor=0; +this.threshold=0; +this.firstSlot=0; +this.lastSlot=-1; +this.modCount=0; +Clazz_instantialize(this,arguments); +},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]); +c$.newEntry=Clazz_defineMethod(c$,"newEntry", +($fz=function(key,value,hash){ +return new java.util.HashtableEntry(key,value); +},$fz.isPrivate=true,$fz),"~O,~O,~N"); +Clazz_overrideConstructor(c$, +function(){ +this.elementCount=0; +this.elementData=this.newElementArray(11); +this.firstSlot=this.elementData.length; +this.loadFactor=0.75; +this.computeMaxSize(); +}); +Clazz_defineMethod(c$,"newElementArray", +($fz=function(size){ +return new Array(size); +},$fz.isPrivate=true,$fz),"~N"); +Clazz_overrideMethod(c$,"clear", +function(){ +this.elementCount=0; +for (var i = this.elementData.length; --i >= 0;) + this.elementData[i] = null; +this.modCount++; +}); +Clazz_defineMethod(c$,"clone", +function(){ +try{ +var hashtable=Clazz_superCall(this,java.util.Hashtable,"clone",[]); +hashtable.elementData=this.elementData.clone(); +var entry; +for(var i=this.elementData.length;--i>=0;){ +if((entry=this.elementData[i])){ +hashtable.elementData[i]=entry.clone(); +}} +return hashtable; +}catch(e){ +if(Clazz_instanceOf(e,CloneNotSupportedException)){ +return null; +}else{ +throw e; +} +} +}); +Clazz_defineMethod(c$,"computeMaxSize", +($fz=function(){ +this.threshold=Math.round((this.elementData.length*this.loadFactor)); +},$fz.isPrivate=true,$fz)); +Clazz_defineMethod(c$,"contains", +function(value){ +if(value==null){ +throw new NullPointerException(); +}for(var i=this.elementData.length;--i>=0;){ +var entry=this.elementData[i]; +while(entry){ +if(value.equals(entry.value)){ +return true; +}entry=entry.next; +} +} +return false; +},"~O"); +Clazz_overrideMethod(c$,"containsKey", +function(key){ + if(!key.hashCode) { + key.hashCode = function(){return 1}; + if (!key.equals) + key.equals = function(a) {return this == a}; + } +return this.getEntry(key)!=null ; +},"~O"); +Clazz_overrideMethod(c$,"containsValue", +function(value){ +return this.contains(value); +},"~O"); +Clazz_overrideMethod(c$,"elements", +function(){ +if(this.elementCount==0){ +return java.util.Hashtable.EMPTY_ENUMERATION; +} +return new java.util.HashtableEnumerator(false, this); +}); +Clazz_overrideMethod(c$,"entrySet", +function(){ +return new java.util.HashtableEntrySet(this); +}); +Clazz_overrideMethod(c$,"equals", +function(object){ +if(this===object){ +return true; +}if(Clazz_instanceOf(object,java.util.Map)){ +var map=object; +if(this.size()!=map.size()){ +return false; +}var entries=this.entrySet(); +for(var e,$e=map.entrySet().iterator();$e.hasNext()&&((e=$e.next())||true);){ +if(!entries.contains(e)){ +return false; +}} +return true; +}return false; +},"~O"); +Clazz_overrideMethod(c$,"get", +function(key){ + if(!key.hashCode) { + key.hashCode = function(){return 1}; + if (!key.equals) + key.equals = function(a) {return this == a}; + } +var hash=key.hashCode(); +var index=(hash&0x7FFFFFFF)%this.elementData.length; +var entry=this.elementData[index]; +while(entry){ +if(entry.equalsKey(key,hash)){ +return entry.value; +}entry=entry.next; +} +return null; +},"~O"); +Clazz_defineMethod(c$,"getEntry", +function(key){ +var hash=key.hashCode(); +var index=(hash&0x7FFFFFFF)%this.elementData.length; +var entry=this.elementData[index]; +while(entry){ +if(entry.equalsKey(key,hash)){ +return entry; +}entry=entry.next; +} +return null; +},"~O"); +Clazz_overrideMethod(c$,"hashCode", +function(){ +var result=0; +var it=this.entrySet().iterator(); +while(it.hasNext()){ +var entry=it.next(); +var key=entry.getKey(); +var value=entry.getValue(); +var hash=(key!==this?key.hashCode():0)^(value!==this?(value!=null?value.hashCode():0):0); +result+=hash; +} +return result; +}); +Clazz_overrideMethod(c$,"isEmpty", +function(){ +return this.elementCount==0; +}); +Clazz_overrideMethod(c$,"keys", +function(){ +if(this.elementCount==0){ +return java.util.Hashtable.EMPTY_ENUMERATION; +} +return new java.util.HashtableEnumerator(true, this); +}); +Clazz_overrideMethod(c$,"keySet", +function(){ +return new java.util.HashtableKeySet(this); +}); +Clazz_overrideMethod(c$,"put", +function(key,value){ +if(key!=null&&value!=null){ + if(!key.hashCode) { + key.hashCode = function(){return 1}; + if (!key.equals) + key.equals = function(a) {return this == a}; + } + var hash=key.hashCode(); + var index=(hash&0x7FFFFFFF)%this.elementData.length; + var entry=this.elementData[index]; + while(entry!=null&&!entry.equalsKey(key,hash)){ + entry=entry.next; +} +if(entry==null){ +this.modCount++; +if(++this.elementCount>this.threshold){ +this.rehash(); +index=(hash&0x7FFFFFFF)%this.elementData.length; +}if(indexthis.lastSlot){ +this.lastSlot=index; +} + +entry=java.util.Hashtable.newEntry(key,value,hash); +entry.next=this.elementData[index]; +this.elementData[index]=entry; +return null; +}var result=entry.value; +entry.value=value; +return result; +}throw new NullPointerException(); +},"~O,~O"); +Clazz_overrideMethod(c$,"putAll", +function(map){ +for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){ +this.put(entry.getKey(),entry.getValue()); +} +},"java.util.Map"); + +Clazz_defineMethod(c$,"rehash", +function(){ +var length=(this.elementData.length<<1)+1; +if(length==0){ +length=1; +}var newFirst=length; +var newLast=-1; +var newData=this.newElementArray(length); +for(var i=this.lastSlot+1;--i>=this.firstSlot;){ +var entry=this.elementData[i]; +while(entry!=null){ +var index=(entry.getKeyHash()&0x7FFFFFFF)%length; +if(indexnewLast){ +newLast=index; +}var next=entry.next; +entry.next=newData[index]; +newData[index]=entry; +entry=next; +} +} +this.firstSlot=newFirst; +this.lastSlot=newLast; +this.elementData=newData; +this.computeMaxSize(); +}); +Clazz_overrideMethod(c$,"remove", +function(key){ +var hash=key.hashCode(); +var index=(hash&0x7FFFFFFF)%this.elementData.length; +var last=null; +var entry=this.elementData[index]; +while(entry!=null&&!entry.equalsKey(key,hash)){ +last=entry; +entry=entry.next; +} +if(entry!=null){ +this.modCount++; +if(last==null){ +this.elementData[index]=entry.next; +}else{ +last.next=entry.next; +}this.elementCount--; +var result=entry.value; +entry.value=null; +return result; +}return null; +},"~O"); +Clazz_overrideMethod(c$,"size", +function(){ +return this.elementCount; +}); +Clazz_overrideMethod(c$,"toString", +function(){ +if(this.isEmpty()){ +return"{}"; +}var buffer=new StringBuilder(this.size()*28); +buffer.append('{'); +for(var i=this.lastSlot;i>=this.firstSlot;i--){ +var entry=this.elementData[i]; +while(entry!=null){ +if(entry.key!==this){ +buffer.append(entry.key); +}else{ +buffer.append("(this Map)"); +}buffer.append('='); +if(entry.value!==this){ +buffer.append(entry.value); +}else{ +buffer.append("(this Map)"); +}buffer.append(", "); +entry=entry.next; +} +} +if(this.elementCount>0){ +buffer.setLength(buffer.length()-2); +}buffer.append('}'); +return buffer.toString(); +}); +Clazz_overrideMethod(c$,"values", +function(){ +return new java.util.HashtableValueCollection(this); +}); +java.util.Hashtable.EMPTY_ENUMERATION = new java.util.HashtableEnumerator(); +}); +c$=Clazz_declareType(java.util,"Dictionary"); +Clazz_makeConstructor(c$, +function(){ +}); +Clazz_declarePackage ("java.net"); +Clazz_load (["java.io.IOException"], "java.net.MalformedURLException", null, function () { +c$ = Clazz_declareType (java.net, "MalformedURLException", java.io.IOException); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.net.MalformedURLException, []); +}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (null, "java.awt.GraphicsEnvironment", ["swingjs.JSToolkit"], function () { +c$ = Clazz_declareType (java.awt, "GraphicsEnvironment"); +Clazz_makeConstructor (c$, +function () { +}); +c$.getLocalGraphicsEnvironment = Clazz_defineMethod (c$, "getLocalGraphicsEnvironment", +function () { +if (java.awt.GraphicsEnvironment.localEnv == null) { +java.awt.GraphicsEnvironment.localEnv = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsEnvironment"); +}return java.awt.GraphicsEnvironment.localEnv; +}); +c$.isHeadless = Clazz_defineMethod (c$, "isHeadless", +function () { +return false; +}); +c$.getHeadlessProperty = Clazz_defineMethod (c$, "getHeadlessProperty", + function () { +return false; +}); +c$.checkHeadless = Clazz_defineMethod (c$, "checkHeadless", +function () { +}); +Clazz_defineMethod (c$, "isHeadlessInstance", +function () { +return java.awt.GraphicsEnvironment.getHeadlessProperty (); +}); +Clazz_defineMethod (c$, "registerFont", +function (font) { +return true; +}, "java.awt.Font"); +Clazz_defineMethod (c$, "preferLocaleFonts", +function () { +}); +Clazz_defineMethod (c$, "preferProportionalFonts", +function () { +}); +Clazz_defineMethod (c$, "getCenterPoint", +function () { +return null; +}); +Clazz_defineStatics (c$, +"localEnv", null); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.WindowEvent", ["java.awt.Window", "jssun.awt.AppContext", "$.SunToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.opposite = null; +this.oldState = 0; +this.newState = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "WindowEvent", java.awt.event.ComponentEvent); +Clazz_makeConstructor (c$, +function (source, id, opposite, oldState, newState) { +Clazz_superConstructor (this, java.awt.event.WindowEvent, [source, id]); +this.opposite = opposite; +this.oldState = oldState; +this.newState = newState; +}, "java.awt.Window,~N,java.awt.Window,~N,~N"); +Clazz_makeConstructor (c$, +function (source, id, opposite) { +this.construct (source, id, opposite, 0, 0); +}, "java.awt.Window,~N,java.awt.Window"); +Clazz_makeConstructor (c$, +function (source, id, oldState, newState) { +this.construct (source, id, null, oldState, newState); +}, "java.awt.Window,~N,~N,~N"); +Clazz_makeConstructor (c$, +function (source, id) { +this.construct (source, id, null, 0, 0); +}, "java.awt.Window,~N"); +Clazz_defineMethod (c$, "getWindow", +function () { +return (Clazz_instanceOf (this.source, java.awt.Window)) ? this.source : null; +}); +Clazz_defineMethod (c$, "getOppositeWindow", +function () { +if (this.opposite == null) { +return null; +}return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null; +}); +Clazz_defineMethod (c$, "getOldState", +function () { +return this.oldState; +}); +Clazz_defineMethod (c$, "getNewState", +function () { +return this.newState; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 200: +typeStr = "WINDOW_OPENED"; +break; +case 201: +typeStr = "WINDOW_CLOSING"; +break; +case 202: +typeStr = "WINDOW_CLOSED"; +break; +case 203: +typeStr = "WINDOW_ICONIFIED"; +break; +case 204: +typeStr = "WINDOW_DEICONIFIED"; +break; +case 205: +typeStr = "WINDOW_ACTIVATED"; +break; +case 206: +typeStr = "WINDOW_DEACTIVATED"; +break; +case 207: +typeStr = "WINDOW_GAINED_FOCUS"; +break; +case 208: +typeStr = "WINDOW_LOST_FOCUS"; +break; +case 209: +typeStr = "WINDOW_STATE_CHANGED"; +break; +default: +typeStr = "unknown type"; +} +typeStr += ",opposite=" + this.getOppositeWindow () + ",oldState=" + this.oldState + ",newState=" + this.newState; +return typeStr; +}); +Clazz_defineStatics (c$, +"WINDOW_FIRST", 200, +"WINDOW_OPENED", 200, +"WINDOW_CLOSING", 201, +"WINDOW_CLOSED", 202, +"WINDOW_ICONIFIED", 203, +"WINDOW_DEICONIFIED", 204, +"WINDOW_ACTIVATED", 205, +"WINDOW_DEACTIVATED", 206, +"WINDOW_GAINED_FOCUS", 207, +"WINDOW_LOST_FOCUS", 208, +"WINDOW_STATE_CHANGED", 209, +"WINDOW_LAST", 209); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Container", "javax.swing.Action", "java.util.ArrayList", "javax.swing.SwingUtilities", "javax.swing.event.EventListenerList", "jssun.awt.RequestFocusController"], "javax.swing.JComponent", ["java.lang.IllegalArgumentException", "java.util.HashSet", "$.Hashtable", "java.applet.Applet", "java.awt.Component", "$.Insets", "$.Rectangle", "$.Window", "java.beans.PropertyChangeListener", "java.util.Locale", "javax.swing.ActionMap", "$.AncestorNotifier", "$.ArrayTable", "$.CellRendererPane", "$.ClientPropertyKey", "$.ComponentInputMap", "$.InputMap", "$.JApplet", "$.JDialog", "$.JFrame", "$.JWindow", "$.KeyStroke", "$.KeyboardManager", "javax.swing.Popup.HeavyWeightWindow", "javax.swing.RepaintManager", "javax.swing.border.AbstractBorder", "javax.swing.event.AncestorListener", "jssun.font.FontDesignMetrics", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.isAlignmentXSet = false; +this.alignmentX = 0; +this.isAlignmentYSet = false; +this.alignmentY = 0; +this.ui = null; +this.listenerList = null; +this.clientProperties = null; +this.autoscrolls = false; +this.border = null; +this.flags = 0; +this.verifyInputWhenFocusTarget = true; +this.paintingChild = null; +this.popupMenu = null; +this.focusInputMap = null; +this.ancestorInputMap = null; +this.windowInputMap = null; +this.actionMap = null; +if (!Clazz_isClassDefined ("javax.swing.JComponent.ActionStandin")) { +javax.swing.JComponent.$JComponent$ActionStandin$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "JComponent", java.awt.Container); +Clazz_prepareFields (c$, function () { +this.listenerList = new javax.swing.event.EventListenerList (); +}); +c$.safelyGetGraphics = Clazz_defineMethod (c$, "safelyGetGraphics", +function (c, root) { +{ +javax.swing.JComponent.componentObtainingGraphicsFrom = root; +var g = c.getGraphics (); +javax.swing.JComponent.componentObtainingGraphicsFrom = null; +return g; +}}, "java.awt.Component,java.awt.Component"); +c$.getGraphicsInvoked = Clazz_defineMethod (c$, "getGraphicsInvoked", +function (root) { +if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) { +var rootPane = (root).getRootPane (); +if (rootPane != null) { +rootPane.disableTrueDoubleBuffering (); +}}}, "java.awt.Component"); +c$.isComponentObtainingGraphicsFrom = Clazz_defineMethod (c$, "isComponentObtainingGraphicsFrom", + function (c) { +{ +return (javax.swing.JComponent.componentObtainingGraphicsFrom === c); +}}, "java.awt.Component"); +c$.getManagingFocusForwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusForwardTraversalKeys", +function () { +{ +if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) { +javax.swing.JComponent.managingFocusForwardTraversalKeys = new java.util.HashSet (1); +javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2)); +}}return javax.swing.JComponent.managingFocusForwardTraversalKeys; +}); +c$.getManagingFocusBackwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusBackwardTraversalKeys", +function () { +{ +if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) { +javax.swing.JComponent.managingFocusBackwardTraversalKeys = new java.util.HashSet (1); +javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3)); +}}return javax.swing.JComponent.managingFocusBackwardTraversalKeys; +}); +c$.fetchRectangle = Clazz_defineMethod (c$, "fetchRectangle", + function () { +{ +var rect; +var size = javax.swing.JComponent.tempRectangles.size (); +if (size > 0) { +rect = javax.swing.JComponent.tempRectangles.remove (size - 1); +} else { +rect = new java.awt.Rectangle (0, 0, 0, 0); +}return rect; +}}); +c$.recycleRectangle = Clazz_defineMethod (c$, "recycleRectangle", + function (rect) { +{ +javax.swing.JComponent.tempRectangles.add (rect); +}}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "setInheritsPopupMenu", +function (value) { +var oldValue = this.getFlag (23); +this.setFlag (23, value); +this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value); +}, "~B"); +Clazz_defineMethod (c$, "getInheritsPopupMenu", +function () { +return this.getFlag (23); +}); +Clazz_defineMethod (c$, "setComponentPopupMenu", +function (popup) { +if (popup != null) { +this.enableEvents (16); +}var oldPopup = this.popupMenu; +this.popupMenu = popup; +this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup); +}, "javax.swing.JPopupMenu"); +Clazz_defineMethod (c$, "getComponentPopupMenu", +function () { +if (!this.getInheritsPopupMenu ()) { +return this.popupMenu; +}if (this.popupMenu == null) { +var parent = this.getParent (); +while (parent != null) { +if (Clazz_instanceOf (parent, javax.swing.JComponent)) { +return (parent).getComponentPopupMenu (); +}if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) { +break; +}parent = parent.getParent (); +} +return null; +}return this.popupMenu; +}); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JComponent); +this.enableEvents (8); +Clazz_superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]); +}); +Clazz_defineMethod (c$, "updateUI", +function () { +}); +Clazz_defineMethod (c$, "setUI", +function (newUI) { +this.uninstallUIAndProperties (); +this.ui = newUI; +if (this.ui != null) { +this.ui.installUI (this); +}this.revalidate (); +this.repaint (); +}, "javax.swing.plaf.ComponentUI"); +Clazz_defineMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_defineMethod (c$, "uninstallUIAndProperties", + function () { +if (this.ui != null) { +this.ui.uninstallUI (this); +}}); +Clazz_defineMethod (c$, "getUIClassID", +function () { +return "ComponentUI"; +}); +Clazz_defineMethod (c$, "getComponentGraphics", +function (g) { +var componentGraphics = g; +componentGraphics.setColor (this.getForeground ()); +componentGraphics.setFont (this.getFont ()); +return componentGraphics; +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintComponent", +function (g) { +if (this.ui != null) { +var scratchGraphics = (g == null) ? null : g.createSwingJS (); +try { +this.ui.update (scratchGraphics, this); +} finally { +scratchGraphics.dispose (); +} +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintChildren", +function (g) { +var isJComponent; +var sg = g; +{ +var i = this.getComponentCount () - 1; +if (i < 0) { +return; +}if (this.paintingChild != null && (Clazz_instanceOf (this.paintingChild, javax.swing.JComponent))) { +for (; i >= 0; i--) { +if (this.getComponent (i) === this.paintingChild) { +break; +}} +}var tmpRect = javax.swing.JComponent.fetchRectangle (); +for (; i >= 0; i--) { +var comp = this.getComponent (i); +isJComponent = (Clazz_instanceOf (comp, javax.swing.JComponent)); +if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) { +var cr = comp.getBounds (tmpRect); +var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height); +cg.setColor (comp.getForeground ()); +cg.setFont (comp.getFont ()); +var shouldSetFlagBack = false; +try { +if (isJComponent) { +(comp).paint (cg); +} else { +comp.paint (cg); +}} finally { +cg.dispose (); +if (shouldSetFlagBack) { +(comp).setFlag (1, false); +(comp).setFlag (2, false); +}} +}} +javax.swing.JComponent.recycleRectangle (tmpRect); +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintBorder", +function (g) { +var border = this.getBorder (); +if (border != null) { +border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ()); +}}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "paint", +function (g) { +var shouldClearPaintFlags = false; +if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) { +return; +}var componentGraphics = this.getComponentGraphics (g); +var co = componentGraphics.createSwingJS (); +try { +if (this.getParent () != null && !(Clazz_instanceOf (this.getParent (), javax.swing.JComponent))) { +this.adjustPaintFlags (); +shouldClearPaintFlags = true; +}this.paintComponent (co); +this.paintBorder (co); +this.paintChildren (co); +} finally { +co.dispose (); +if (shouldClearPaintFlags) { +this.setFlag (1, false); +this.setFlag (2, false); +this.setFlag (11, false); +this.setFlag (12, false); +}} +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintForceDoubleBuffered", +function (g) { +var rm = javax.swing.RepaintManager.currentManager (this); +var clip = g.getClipBounds (); +rm.beginPaint (); +this.setFlag (13, true); +try { +rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height); +} finally { +rm.endPaint (); +this.setFlag (13, false); +} +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "isPainting", +function () { +var component = this; +while (component != null) { +if (Clazz_instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) { +return true; +}component = component.getParent (); +} +return false; +}); +Clazz_defineMethod (c$, "adjustPaintFlags", + function () { +var jparent = null; +var parent; +for (parent = this.getParent (); parent != null; parent = parent.getParent ()) { +if (Clazz_instanceOf (parent, javax.swing.JComponent)) { +jparent = parent; +if (jparent.getFlag (1)) this.setFlag (1, true); +if (jparent.getFlag (2)) this.setFlag (2, true); +if (jparent.getFlag (11)) this.setFlag (11, true); +if (jparent.getFlag (12)) this.setFlag (12, true); +break; +}} +}); +Clazz_overrideMethod (c$, "printAll", +function (g) { +this.setFlag (12, true); +try { +this.print (g); +} finally { +this.setFlag (12, false); +} +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "print", +function (g) { +this.setFlag (11, true); +this.firePropertyChangeBool ("paintingForPrint", false, true); +try { +this.paint (g); +} finally { +this.setFlag (11, false); +this.firePropertyChangeBool ("paintingForPrint", true, false); +} +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "printComponent", +function (g) { +this.paintComponent (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "printChildren", +function (g) { +this.paintChildren (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "printBorder", +function (g) { +this.paintBorder (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "isPaintingTile", +function () { +return this.getFlag (2); +}); +Clazz_defineMethod (c$, "isPaintingForPrint", +function () { +return this.getFlag (11); +}); +Clazz_defineMethod (c$, "isManagingFocus", +function () { +return false; +}); +Clazz_defineMethod (c$, "registerNextFocusableComponent", + function () { +this.registerNextFocusableComponent (this.getNextFocusableComponent ()); +}); +Clazz_defineMethod (c$, "registerNextFocusableComponent", + function (nextFocusableComponent) { +if (nextFocusableComponent == null) { +return; +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "deregisterNextFocusableComponent", + function () { +var nextFocusableComponent = this.getNextFocusableComponent (); +if (nextFocusableComponent == null) { +return; +}var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor (); +if (nearestRoot == null) { +return; +}}); +Clazz_defineMethod (c$, "setNextFocusableComponent", +function (aComponent) { +var displayable = this.isDisplayable (); +if (displayable) { +this.deregisterNextFocusableComponent (); +}this.putClientProperty ("nextFocus", aComponent); +if (displayable) { +this.registerNextFocusableComponent (aComponent); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "getNextFocusableComponent", +function () { +return this.getClientProperty ("nextFocus"); +}); +Clazz_defineMethod (c$, "setRequestFocusEnabled", +function (requestFocusEnabled) { +this.setFlag (22, !requestFocusEnabled); +}, "~B"); +Clazz_defineMethod (c$, "isRequestFocusEnabled", +function () { +return !this.getFlag (22); +}); +Clazz_defineMethod (c$, "requestFocus", +function (temporary) { +Clazz_superCall (this, javax.swing.JComponent, "requestFocus", []); +return true; +}, "~B"); +Clazz_defineMethod (c$, "requestFocusInWindow", +function (temporary) { +return Clazz_superCall (this, javax.swing.JComponent, "requestFocusInWindow", []); +}, "~B"); +Clazz_defineMethod (c$, "grabFocus", +function () { +this.requestFocus (); +}); +Clazz_defineMethod (c$, "setVerifyInputWhenFocusTarget", +function (verifyInputWhenFocusTarget) { +var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget; +this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget; +this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget); +}, "~B"); +Clazz_defineMethod (c$, "getVerifyInputWhenFocusTarget", +function () { +return this.verifyInputWhenFocusTarget; +}); +Clazz_overrideMethod (c$, "getFontMetrics", +function (font) { +return jssun.font.FontDesignMetrics.getMetrics (font); +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "getPreferredSize", +function () { +return this.getPrefSizeJComp (); +}); +Clazz_defineMethod (c$, "getPrefSizeJComp", +function () { +var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this)); +return (size == null ? this.preferredSize () : size); +}); +Clazz_defineMethod (c$, "getMaximumSize", +function () { +if (this.isMaximumSizeSet ()) { +return Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []); +}var size = null; +if (this.ui != null) { +size = this.ui.getMaximumSize (this); +}return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []); +}); +Clazz_defineMethod (c$, "getMinimumSize", +function () { +if (this.isMinimumSizeSet ()) { +return Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []); +}var size = null; +if (this.ui != null) { +size = this.ui.getMinimumSize (this); +}return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []); +}); +Clazz_overrideMethod (c$, "contains", +function (x, y) { +return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y); +}, "~N,~N"); +Clazz_defineMethod (c$, "setBorder", +function (border) { +var oldBorder = this.border; +this.border = border; +this.firePropertyChangeObject ("border", oldBorder, border); +if (border !== oldBorder) { +if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) { +this.revalidate (); +}this.repaint (); +}}, "javax.swing.border.Border"); +Clazz_defineMethod (c$, "getBorder", +function () { +return this.border; +}); +Clazz_defineMethod (c$, "getInsets", +function () { +if (this.border != null) { +return this.border.getBorderInsets (this); +}return Clazz_superCall (this, javax.swing.JComponent, "getInsets", []); +}); +Clazz_defineMethod (c$, "getInsets", +function (insets) { +if (insets == null) { +insets = new java.awt.Insets (0, 0, 0, 0); +}if (this.border != null) { +if (Clazz_instanceOf (this.border, javax.swing.border.AbstractBorder)) { +return (this.border).getBorderInsets (this, insets); +} else { +return this.border.getBorderInsets (this); +}} else { +insets.left = insets.top = insets.right = insets.bottom = 0; +return insets; +}}, "java.awt.Insets"); +Clazz_defineMethod (c$, "getAlignmentY", +function () { +if (this.isAlignmentYSet) { +return this.alignmentY; +}return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentY", []); +}); +Clazz_defineMethod (c$, "setAlignmentY", +function (alignmentY) { +this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY; +this.isAlignmentYSet = true; +}, "~N"); +Clazz_defineMethod (c$, "getAlignmentX", +function () { +if (this.isAlignmentXSet) { +return this.alignmentX; +}return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentX", []); +}); +Clazz_defineMethod (c$, "setAlignmentX", +function (alignmentX) { +this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX; +this.isAlignmentXSet = true; +}, "~N"); +Clazz_defineMethod (c$, "setInputVerifier", +function (inputVerifier) { +var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER); +this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier); +this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier); +}, "javax.swing.InputVerifier"); +Clazz_defineMethod (c$, "getInputVerifier", +function () { +return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER); +}); +Clazz_defineMethod (c$, "registerKeyboardAction", +function (anAction, aCommand, aKeyStroke, aCondition) { +var inputMap = this.getInputMap (aCondition, true); +if (inputMap != null) { +var actionMap = this.getActionMap (true); +var action = Clazz_innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand); +inputMap.put (aKeyStroke, action); +if (actionMap != null) { +actionMap.put (action, action); +}}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N"); +Clazz_defineMethod (c$, "registerWithKeyboardManager", + function (onlyIfNew) { +var inputMap = this.getInputMap (2, false); +var strokes; +var registered = this.getClientProperty ("_WhenInFocusedWindow"); +if (inputMap != null) { +strokes = inputMap.allKeys (); +if (strokes != null) { +for (var counter = strokes.length - 1; counter >= 0; counter--) { +if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) { +this.registerWithKeyboardManager (strokes[counter]); +}if (registered != null) { +registered.remove (strokes[counter]); +}} +}} else { +strokes = null; +}if (registered != null && registered.size () > 0) { +var keys = registered.keys (); +while (keys.hasMoreElements ()) { +var ks = keys.nextElement (); +this.unregisterWithKeyboardManager (ks); +} +registered.clear (); +}if (strokes != null && strokes.length > 0) { +if (registered == null) { +registered = new java.util.Hashtable (strokes.length); +this.putClientProperty ("_WhenInFocusedWindow", registered); +}for (var counter = strokes.length - 1; counter >= 0; counter--) { +registered.put (strokes[counter], strokes[counter]); +} +} else { +this.putClientProperty ("_WhenInFocusedWindow", null); +}}, "~B"); +Clazz_defineMethod (c$, "unregisterWithKeyboardManager", + function () { +var registered = this.getClientProperty ("_WhenInFocusedWindow"); +if (registered != null && registered.size () > 0) { +var keys = registered.keys (); +while (keys.hasMoreElements ()) { +var ks = keys.nextElement (); +this.unregisterWithKeyboardManager (ks); +} +}this.putClientProperty ("_WhenInFocusedWindow", null); +}); +Clazz_defineMethod (c$, "componentInputMapChanged", +function (inputMap) { +var km = this.getInputMap (2, false); +while (km !== inputMap && km != null) { +km = km.getParent (); +} +if (km != null) { +this.registerWithKeyboardManager (false); +}}, "javax.swing.ComponentInputMap"); +Clazz_defineMethod (c$, "registerWithKeyboardManager", + function (aKeyStroke) { +javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this); +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "unregisterWithKeyboardManager", + function (aKeyStroke) { +javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this); +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "registerKeyboardAction", +function (anAction, aKeyStroke, aCondition) { +this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition); +}, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N"); +Clazz_defineMethod (c$, "unregisterKeyboardAction", +function (aKeyStroke) { +var am = this.getActionMap (false); +for (var counter = 0; counter < 3; counter++) { +var km = this.getInputMap (counter, false); +if (km != null) { +var actionID = km.get (aKeyStroke); +if (am != null && actionID != null) { +am.remove (actionID); +}km.remove (aKeyStroke); +}} +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "getRegisteredKeyStrokes", +function () { +var counts = Clazz_newIntArray (3, 0); +var strokes = new Array (3); +for (var counter = 0; counter < 3; counter++) { +var km = this.getInputMap (counter, false); +strokes[counter] = (km != null) ? km.allKeys () : null; +counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0; +} +var retValue = new Array (counts[0] + counts[1] + counts[2]); +for (var counter = 0, last = 0; counter < 3; counter++) { +if (counts[counter] > 0) { +System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]); +last += counts[counter]; +}} +return retValue; +}); +Clazz_defineMethod (c$, "getConditionForKeyStroke", +function (aKeyStroke) { +for (var counter = 0; counter < 3; counter++) { +var inputMap = this.getInputMap (counter, false); +if (inputMap != null && inputMap.get (aKeyStroke) != null) { +return counter; +}} +return -1; +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "getActionForKeyStroke", +function (aKeyStroke) { +var am = this.getActionMap (false); +if (am == null) { +return null; +}for (var counter = 0; counter < 3; counter++) { +var inputMap = this.getInputMap (counter, false); +if (inputMap != null) { +var actionBinding = inputMap.get (aKeyStroke); +if (actionBinding != null) { +var action = am.get (actionBinding); +if (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin)) { +return (action).actionListener; +}return action; +}}} +return null; +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "resetKeyboardActions", +function () { +for (var counter = 0; counter < 3; counter++) { +var inputMap = this.getInputMap (counter, false); +if (inputMap != null) { +inputMap.clear (); +}} +var am = this.getActionMap (false); +if (am != null) { +am.clear (); +}}); +Clazz_defineMethod (c$, "setInputMap", +function (condition, map) { +switch (condition) { +case 2: +if (map != null && !(Clazz_instanceOf (map, javax.swing.ComponentInputMap))) { +throw new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap"); +}this.windowInputMap = map; +this.setFlag (7, true); +this.registerWithKeyboardManager (false); +break; +case 1: +this.ancestorInputMap = map; +this.setFlag (6, true); +break; +case 0: +this.focusInputMap = map; +this.setFlag (5, true); +break; +default: +throw new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT"); +} +}, "~N,javax.swing.InputMap"); +Clazz_defineMethod (c$, "getInputMap", +function (condition) { +return this.getInputMap (condition, true); +}, "~N"); +Clazz_defineMethod (c$, "getInputMap", +function () { +return this.getInputMap (0, true); +}); +Clazz_defineMethod (c$, "setActionMap", +function (am) { +this.actionMap = am; +this.setFlag (8, true); +}, "javax.swing.ActionMap"); +Clazz_defineMethod (c$, "getActionMap", +function () { +return this.getActionMap (true); +}); +Clazz_defineMethod (c$, "getInputMap", +function (condition, create) { +switch (condition) { +case 0: +if (this.getFlag (5)) { +return this.focusInputMap; +}if (create) { +var km = new javax.swing.InputMap (); +this.setInputMap (condition, km); +return km; +}break; +case 1: +if (this.getFlag (6)) { +return this.ancestorInputMap; +}if (create) { +var km = new javax.swing.InputMap (); +this.setInputMap (condition, km); +return km; +}break; +case 2: +if (this.getFlag (7)) { +return this.windowInputMap; +}if (create) { +var km = new javax.swing.ComponentInputMap (this); +this.setInputMap (condition, km); +return km; +}break; +default: +throw new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT"); +} +return null; +}, "~N,~B"); +Clazz_defineMethod (c$, "getActionMap", +function (create) { +{ +(arguments.length == 0) && (create = true); +}if (this.getFlag (8)) { +return this.actionMap; +}if (create) { +var am = new javax.swing.ActionMap (); +this.setActionMap (am); +return am; +}return null; +}, "~B"); +Clazz_defineMethod (c$, "getBaseline", +function (width, height) { +Clazz_superCall (this, javax.swing.JComponent, "getBaseline", [width, height]); +if (this.ui != null) { +return this.ui.getBaseline (this, width, height); +}return -1; +}, "~N,~N"); +Clazz_overrideMethod (c$, "getBaselineResizeBehavior", +function () { +if (this.ui != null) { +return this.ui.getBaselineResizeBehavior (this); +}return java.awt.Component.BaselineResizeBehavior.OTHER; +}); +Clazz_defineMethod (c$, "requestDefaultFocus", +function () { +var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor (); +if (nearestRoot == null) { +return false; +}return false; +}); +Clazz_defineMethod (c$, "setVisible", +function (aFlag) { +if (aFlag != this.isVisible ()) { +Clazz_superCall (this, javax.swing.JComponent, "setVisible", [aFlag]); +var parent = this.getParent (); +if (parent != null) { +var r = this.getBounds (); +parent.repaint (r.x, r.y, r.width, r.height); +}this.revalidate (); +}}, "~B"); +Clazz_defineMethod (c$, "setEnabled", +function (enabled) { +var oldEnabled = this.isEnabled (); +Clazz_superCall (this, javax.swing.JComponent, "setEnabled", [enabled]); +this.firePropertyChangeBool ("enabled", oldEnabled, enabled); +if (enabled != oldEnabled) { +this.repaint (); +}}, "~B"); +Clazz_defineMethod (c$, "setForeground", +function (fg) { +var oldFg = this.getForeground (); +Clazz_superCall (this, javax.swing.JComponent, "setForeground", [fg]); +if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) { +this.repaint (); +}}, "java.awt.Color"); +Clazz_defineMethod (c$, "setBackground", +function (bg) { +var oldBg = this.getBackground (); +Clazz_superCall (this, javax.swing.JComponent, "setBackground", [bg]); +if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) { +this.repaint (); +}}, "java.awt.Color"); +Clazz_defineMethod (c$, "setFont", +function (font) { +var oldFont = this.getFont (); +Clazz_superCall (this, javax.swing.JComponent, "setFont", [font]); +if (font !== oldFont) { +this.revalidate (); +this.repaint (); +}}, "java.awt.Font"); +c$.getDefaultLocale = Clazz_defineMethod (c$, "getDefaultLocale", +function () { +var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale"); +if (l == null) { +l = java.util.Locale.getDefault (); +javax.swing.JComponent.setDefaultLocale (l); +}return l; +}); +c$.setDefaultLocale = Clazz_defineMethod (c$, "setDefaultLocale", +function (l) { +javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l); +}, "java.util.Locale"); +Clazz_defineMethod (c$, "processComponentKeyEvent", +function (e) { +}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "processKeyEvent", +function (e) { +var shouldProcessKey; +Clazz_superCall (this, javax.swing.JComponent, "processKeyEvent", [e]); +if (!e.isConsumed ()) { +this.processComponentKeyEvent (e); +}shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e); +if (e.isConsumed ()) { +return; +}if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) { +e.consume (); +}}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "processKeyBinding", +function (ks, e, condition, pressed) { +var map = this.getInputMap (condition, false); +var am = this.getActionMap (false); +if (map != null && am != null && this.isEnabled ()) { +var binding = map.get (ks); +var action = (binding == null) ? null : am.get (binding); +if (action != null) { +return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ()); +}}return false; +}, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B"); +Clazz_defineMethod (c$, "processKeyBindings", +function (e, pressed) { +if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) { +return false; +}var ks; +if (e.getID () == 400) { +ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ()); +} else { +ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true)); +}if (this.processKeyBinding (ks, e, 0, pressed)) return true; +var parent = this; +while (parent != null && !(Clazz_instanceOf (parent, java.awt.Window)) && !(Clazz_instanceOf (parent, java.applet.Applet))) { +if (Clazz_instanceOf (parent, javax.swing.JComponent)) { +if ((parent).processKeyBinding (ks, e, 1, pressed)) return true; +}parent = parent.getParent (); +} +if (parent != null) { +return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed); +}return false; +}, "java.awt.event.KeyEvent,~B"); +c$.processKeyBindingsForAllComponents = Clazz_defineMethod (c$, "processKeyBindingsForAllComponents", +function (e, container, pressed) { +while (true) { +if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) { +return true; +}if (Clazz_instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) { +container = (container).getOwner (); +} else { +return false; +}} +}, "java.awt.event.KeyEvent,java.awt.Container,~B"); +Clazz_defineMethod (c$, "setToolTipText", +function (text) { +this.putClientProperty ("ToolTipText", text); +}, "~S"); +Clazz_defineMethod (c$, "getToolTipText", +function () { +return this.getClientProperty ("ToolTipText"); +}); +Clazz_defineMethod (c$, "getToolTipText", +function (event) { +return this.getToolTipText (); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "getToolTipLocation", +function (event) { +return null; +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "getPopupLocation", +function (event) { +return null; +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "createToolTip", +function () { +var tip = new javax.swing.JToolTip (); +tip.setComponent (this); +return tip; +}); +Clazz_defineMethod (c$, "scrollRectToVisible", +function (aRect) { +var parent; +var dx = this.getX (); +var dy = this.getY (); +for (parent = this.getParent (); !(parent == null) && !(Clazz_instanceOf (parent, javax.swing.JComponent)) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) { +var bounds = parent.getBounds (); +dx += bounds.x; +dy += bounds.y; +} +if (!(parent == null) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane))) { +aRect.x += dx; +aRect.y += dy; +(parent).scrollRectToVisible (aRect); +aRect.x -= dx; +aRect.y -= dy; +}}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "setAutoscrolls", +function (autoscrolls) { +}, "~B"); +Clazz_defineMethod (c$, "getAutoscrolls", +function () { +return this.autoscrolls; +}); +Clazz_defineMethod (c$, "superProcessMouseMotionEvent", +function (e) { +Clazz_superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "setCreatedDoubleBuffer", +function (newValue) { +this.setFlag (9, newValue); +}, "~B"); +Clazz_defineMethod (c$, "getCreatedDoubleBuffer", +function () { +return this.getFlag (9); +}); +Clazz_defineMethod (c$, "getClientProperties", + function () { +if (this.clientProperties == null) { +this.clientProperties = new javax.swing.ArrayTable (); +}return this.clientProperties; +}); +Clazz_defineMethod (c$, "getClientProperty", +function (key) { +if (this.clientProperties == null) { +return null; +} else { +{ +return this.clientProperties.get (key); +}}}, "~O"); +Clazz_defineMethod (c$, "putClientProperty", +function (key, value) { +if (value == null && this.clientProperties == null) { +return; +}var clientProperties = this.getClientProperties (); +var oldValue; +{ +oldValue = clientProperties.get (key); +if (value != null) { +clientProperties.put (key, value); +} else if (oldValue != null) { +clientProperties.remove (key); +} else { +return; +}}this.clientPropertyChanged (key, oldValue, value); +this.firePropertyChangeObject (key.toString (), oldValue, value); +}, "~O,~O"); +Clazz_defineMethod (c$, "clientPropertyChanged", +function (key, oldValue, newValue) { +}, "~O,~O,~O"); +Clazz_defineMethod (c$, "setUIProperty", +function (propertyName, value) { +if (propertyName === "opaque") { +if (!this.getFlag (24)) { +this.setOpaque ((value).booleanValue ()); +this.setFlag (24, false); +}} else if (propertyName === "autoscrolls") { +if (!this.getFlag (25)) { +this.setAutoscrolls ((value).booleanValue ()); +this.setFlag (25, false); +}} else if (propertyName === "focusTraversalKeysForward") { +} else if (propertyName === "focusTraversalKeysBackward") { +} else { +System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5)); +}}, "~S,~O"); +c$.isLightweightComponent = Clazz_defineMethod (c$, "isLightweightComponent", +function (c) { +return !(Clazz_instanceOf (c, javax.swing.JApplet) || Clazz_instanceOf (c, javax.swing.JFrame) || Clazz_instanceOf (c, javax.swing.JWindow) || Clazz_instanceOf (c, javax.swing.JDialog)); +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "isOpaque", +function () { +return this.getFlag (3); +}); +Clazz_defineMethod (c$, "setOpaque", +function (isOpaque) { +var oldValue = this.getFlag (3); +this.setFlag (3, isOpaque); +this.setFlag (24, true); +this.firePropertyChangeBool ("opaque", oldValue, isOpaque); +}, "~B"); +Clazz_defineMethod (c$, "rectangleIsObscured", +function (x, y, width, height) { +var numChildren = this.getComponentCount (); +for (var i = 0; i < numChildren; i++) { +var child = this.getComponent (i); +var cx; +var cy; +var cw; +var ch; +cx = child.getX (); +cy = child.getY (); +cw = child.getWidth (); +ch = child.getHeight (); +if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) { +if (Clazz_instanceOf (child, javax.swing.JComponent)) { +return (child).isOpaque (); +} else { +return false; +}}} +return false; +}, "~N,~N,~N,~N"); +c$.computeVisibleRect = Clazz_defineMethod (c$, "computeVisibleRect", +function (c, visibleRect) { +var p = c.getParent (); +var bounds = c.getBounds (); +if (p == null || Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) { +visibleRect.reshape (0, 0, bounds.width, bounds.height); +} else { +javax.swing.JComponent.computeVisibleRect (p, visibleRect); +visibleRect.x -= bounds.x; +visibleRect.y -= bounds.y; +javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect); +}}, "java.awt.Component,java.awt.Rectangle"); +Clazz_defineMethod (c$, "computeVisibleRect", +function (visibleRect) { +javax.swing.JComponent.computeVisibleRect (this, visibleRect); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "getVisibleRect", +function () { +var visibleRect = new java.awt.Rectangle (); +this.computeVisibleRect (visibleRect); +return visibleRect; +}); +Clazz_defineMethod (c$, "getTopLevelAncestor", +function () { +for (var p = this; p != null; p = p.getParent ()) { +if (Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) { +return p; +}} +return null; +}); +Clazz_defineMethod (c$, "getAncestorNotifier", + function () { +return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER); +}); +Clazz_defineMethod (c$, "addAncestorListener", +function (listener) { +var ancestorNotifier = this.getAncestorNotifier (); +if (ancestorNotifier == null) { +ancestorNotifier = new javax.swing.AncestorNotifier (this); +this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier); +}ancestorNotifier.addAncestorListener (listener); +}, "javax.swing.event.AncestorListener"); +Clazz_defineMethod (c$, "removeAncestorListener", +function (listener) { +var ancestorNotifier = this.getAncestorNotifier (); +if (ancestorNotifier == null) { +return; +}ancestorNotifier.removeAncestorListener (listener); +if (ancestorNotifier.listenerList.getListenerList ().length == 0) { +ancestorNotifier.removeAllListeners (); +this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null); +}}, "javax.swing.event.AncestorListener"); +Clazz_defineMethod (c$, "getAncestorListeners", +function () { +var ancestorNotifier = this.getAncestorNotifier (); +if (ancestorNotifier == null) { +return new Array (0); +}return ancestorNotifier.getAncestorListeners (); +}); +Clazz_defineMethod (c$, "getListeners", +function (listenerType) { +var result; +if (listenerType === javax.swing.event.AncestorListener) { +result = this.getAncestorListeners (); +} else if (listenerType === java.beans.PropertyChangeListener) { +result = this.getPropertyChangeListeners (); +} else { +result = this.listenerList.getListeners (listenerType); +}if (result.length == 0) { +return Clazz_superCall (this, javax.swing.JComponent, "getListeners", [listenerType]); +}return result; +}, "Class"); +Clazz_defineMethod (c$, "addNotify", +function () { +Clazz_superCall (this, javax.swing.JComponent, "addNotify", []); +this.firePropertyChangeObject ("ancestor", null, this.getParent ()); +this.registerWithKeyboardManager (false); +this.registerNextFocusableComponent (); +}); +Clazz_defineMethod (c$, "removeNotify", +function () { +Clazz_superCall (this, javax.swing.JComponent, "removeNotify", []); +this.firePropertyChangeObject ("ancestor", this.getParent (), null); +this.unregisterWithKeyboardManager (); +this.deregisterNextFocusableComponent (); +if (this.getCreatedDoubleBuffer ()) { +javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer (); +this.setCreatedDoubleBuffer (false); +}}); +Clazz_defineMethod (c$, "repaint", +function (tm, x, y, width, height) { +javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "repaint", +function (r) { +this.repaint (0, r.x, r.y, r.width, r.height); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "revalidate", +function () { +if (this.getParent () == null) { +return; +}if (javax.swing.SwingUtilities.isEventDispatchThread ()) { +this.invalidate (); +javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this); +} else { +{ +if (this.getFlag (28)) { +return; +}this.setFlag (28, true); +}var callRevalidate = ((Clazz_isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$2, this, null)); +javax.swing.SwingUtilities.invokeLater (callRevalidate); +}}); +Clazz_defineMethod (c$, "isValidateRoot", +function () { +return false; +}); +Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", +function () { +return true; +}); +Clazz_defineMethod (c$, "isPaintingOrigin", +function () { +return false; +}); +Clazz_defineMethod (c$, "paintImmediately", +function (x, y, w, h) { +{ +if (arguments.length == 1) { +var r = x; +x = r.x; +y = r.y; +w = r.width; +h = r.height; +} +}var c = this; +var parent; +if (!this.isShowing ()) { +return; +}while (!(c).isOpaque ()) { +parent = c.getParent (); +if (parent != null) { +x += c.getX (); +y += c.getY (); +c = parent; +} else { +break; +}if (!(Clazz_instanceOf (c, javax.swing.JComponent))) { +break; +}} +if (Clazz_instanceOf (c, javax.swing.JComponent)) { +(c)._paintImmediately (x, y, w, h); +} else { +c.repaint (x, y, w, h); +}}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "paintImmediately", +function (r) { +this.paintImmediately (r.x, r.y, r.width, r.height); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "alwaysOnTop", +function () { +return false; +}); +Clazz_defineMethod (c$, "setPaintingChild", +function (paintingChild) { +this.paintingChild = paintingChild; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "_paintImmediately", +function (x, y, w, h) { +var g; +var c; +var tmpX; +var tmpY; +var tmpWidth; +var tmpHeight; +var offsetX = 0; +var offsetY = 0; +var hasBuffer = false; +var bufferedComponent = null; +var paintingComponent = this; +var path = new java.util.ArrayList (7); +var pIndex = -1; +var pCount = 0; +tmpX = tmpY = tmpWidth = tmpHeight = 0; +var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle (); +paintImmediatelyClip.x = x; +paintImmediatelyClip.y = y; +paintImmediatelyClip.width = w; +paintImmediatelyClip.height = h; +var ontop = this.alwaysOnTop () && this.isOpaque (); +if (ontop) { +javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip); +if (paintImmediatelyClip.width == 0) { +javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); +return; +}}var child; +for (c = this, child = null; c != null && !(Clazz_instanceOf (c, java.awt.Window)) && !(Clazz_instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) { +var jc = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null; +path.add (c); +if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) { +var resetPC; +if (c !== this) { +if (jc.isPaintingOrigin ()) { +resetPC = true; +} else { +var children = c.getComponents (); +var i = 0; +for (; i < children.length; i++) { +if (children[i] === child) break; +} +switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) { +case 0: +resetPC = false; +break; +case 2: +javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); +return; +default: +resetPC = true; +break; +} +}} else { +resetPC = false; +}if (resetPC) { +paintingComponent = jc; +pIndex = pCount; +offsetX = offsetY = 0; +hasBuffer = false; +}}pCount++; +if (!ontop) { +var bx = c.getX (); +var by = c.getY (); +tmpWidth = c.getWidth (); +tmpHeight = c.getHeight (); +javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip); +paintImmediatelyClip.x += bx; +paintImmediatelyClip.y += by; +offsetX += bx; +offsetY += by; +}} +if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) { +javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); +return; +}paintingComponent.setFlag (13, true); +paintImmediatelyClip.x -= offsetX; +paintImmediatelyClip.y -= offsetY; +if (paintingComponent !== this) { +var comp; +var i = pIndex; +for (; i > 0; i--) { +comp = path.get (i); +if (Clazz_instanceOf (comp, javax.swing.JComponent)) { +(comp).setPaintingChild (path.get (i - 1)); +}} +}try { +g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS (); +try { +if (hasBuffer) { +var rm = javax.swing.RepaintManager.currentManager (bufferedComponent); +rm.beginPaint (); +try { +rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height); +} finally { +rm.endPaint (); +} +} else { +paintingComponent.paint (g); +}} finally { +g.dispose (); +} +} finally { +if (paintingComponent !== this) { +var comp; +var i = pIndex; +for (; i > 0; i--) { +comp = path.get (i); +if (Clazz_instanceOf (comp, javax.swing.JComponent)) { +(comp).setPaintingChild (null); +}} +}paintingComponent.setFlag (13, false); +} +javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "paintToOffscreen", +function (g, x, y, w, h, maxX, maxY) { +try { +this.setFlag (1, true); +if ((y + h) < maxY || (x + w) < maxX) { +this.setFlag (2, true); +}if (this.getFlag (13)) { +this.paint (g); +} else { +if (!this.rectangleIsObscured (x, y, w, h)) { +this.paintComponent (g); +this.paintBorder (g); +}this.paintChildren (g); +}} finally { +this.setFlag (1, false); +this.setFlag (2, false); +} +}, "java.awt.Graphics,~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getObscuredState", + function (compIndex, x, y, width, height) { +var retValue = 0; +var tmpRect = javax.swing.JComponent.fetchRectangle (); +for (var i = compIndex - 1; i >= 0; i--) { +var sibling = this.getComponent (i); +if (!sibling.isVisible ()) { +continue; +}var siblingRect; +var opaque; +if (Clazz_instanceOf (sibling, javax.swing.JComponent)) { +opaque = (sibling).isOpaque (); +if (!opaque) { +if (retValue == 1) { +continue; +}}} else { +opaque = true; +}siblingRect = sibling.getBounds (tmpRect); +if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) { +javax.swing.JComponent.recycleRectangle (tmpRect); +return 2; +} else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) { +retValue = 1; +}} +javax.swing.JComponent.recycleRectangle (tmpRect); +return retValue; +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "checkIfChildObscuredBySibling", +function () { +return true; +}); +Clazz_defineMethod (c$, "setFlag", + function (aFlag, aValue) { +if (aValue) { +this.flags |= (1 << aFlag); +} else { +this.flags &= ~(1 << aFlag); +}}, "~N,~B"); +Clazz_defineMethod (c$, "getFlag", + function (aFlag) { +var mask = (1 << aFlag); +return ((this.flags & mask) == mask); +}, "~N"); +Clazz_defineMethod (c$, "setDoubleBuffered", +function (aFlag) { +}, "~B"); +Clazz_overrideMethod (c$, "isDoubleBuffered", +function () { +return this.getFlag (0); +}); +Clazz_defineMethod (c$, "getRootPane", +function () { +return javax.swing.SwingUtilities.getRootPane (this); +}); +Clazz_defineMethod (c$, "paramString", +function () { +var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : ""); +var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : ""); +var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : ""); +var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ())); +return Clazz_superCall (this, javax.swing.JComponent, "paramString", []) + ",alignmentX=" + this.alignmentX + ",alignmentY=" + this.alignmentY + ",border=" + borderString + ",flags=" + this.flags + ",maximumSize=" + maximumSizeString + ",minimumSize=" + minimumSizeString + ",preferredSize=" + preferredSizeString; +}); +c$.$JComponent$ActionStandin$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +this.actionListener = null; +this.command = null; +this.action = null; +Clazz_instantialize (this, arguments); +}, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action); +Clazz_makeConstructor (c$, +function (a, b) { +this.actionListener = a; +if (Clazz_instanceOf (a, javax.swing.Action)) { +this.action = a; +} else { +this.action = null; +}this.command = b; +}, "java.awt.event.ActionListener,~S"); +Clazz_defineMethod (c$, "getValue", +function (a) { +if (a != null) { +if (a.equals ("ActionCommandKey")) { +return this.command; +}if (this.action != null) { +return this.action.getValue (a); +}if (a.equals ("Name")) { +return "ActionStandin"; +}}return null; +}, "~S"); +Clazz_defineMethod (c$, "isEnabled", +function () { +if (this.actionListener == null) { +return false; +}if (this.action == null) { +return true; +}return this.action.isEnabled (); +}); +Clazz_defineMethod (c$, "actionPerformed", +function (a) { +if (this.actionListener != null) { +this.actionListener.actionPerformed (a); +}}, "java.awt.event.ActionEvent"); +Clazz_overrideMethod (c$, "putValue", +function (a, b) { +}, "~S,~O"); +Clazz_overrideMethod (c$, "setEnabled", +function (a) { +}, "~B"); +Clazz_overrideMethod (c$, "addPropertyChangeListener", +function (a) { +}, "java.beans.PropertyChangeListener"); +Clazz_overrideMethod (c$, "removePropertyChangeListener", +function (a) { +}, "java.beans.PropertyChangeListener"); +c$ = Clazz_p0p (); +}; +c$.$JComponent$2$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (javax.swing, "JComponent$2", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +{ +this.b$["javax.swing.JComponent"].setFlag (28, false); +}this.b$["javax.swing.JComponent"].revalidate (); +}); +c$ = Clazz_p0p (); +}; +c$.$JComponent$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController); +Clazz_overrideMethod (c$, "acceptRequestFocus", +function (from, to, temporary, focusedWindowChangeAllowed, cause) { +if ((to == null) || !(Clazz_instanceOf (to, javax.swing.JComponent))) { +return true; +}if ((from == null) || !(Clazz_instanceOf (from, javax.swing.JComponent))) { +return true; +}var target = to; +if (!target.getVerifyInputWhenFocusTarget ()) { +return true; +}var jFocusOwner = from; +var iv = jFocusOwner.getInputVerifier (); +if (iv == null) { +return true; +} else { +var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY); +if (currentSource === jFocusOwner) { +return true; +}javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner); +try { +return iv.shouldYieldFocus (jFocusOwner); +} finally { +if (currentSource != null) { +javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource); +} else { +javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY); +}} +}}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause"); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.array = null; +this.count = 0; +this.capacity = 0; +Clazz_instantialize (this, arguments); +}, javax.swing.JComponent, "IntVector"); +Clazz_defineMethod (c$, "size", +function () { +return this.count; +}); +Clazz_defineMethod (c$, "elementAt", +function (a) { +return this.array[a]; +}, "~N"); +Clazz_defineMethod (c$, "addElement", +function (a) { +if (this.count == this.capacity) { +this.capacity = (this.capacity + 2) * 2; +var b = Clazz_newIntArray (this.capacity, 0); +if (this.count > 0) { +System.arraycopy (this.array, 0, b, 0, this.count); +}this.array = b; +}this.array[this.count++] = a; +}, "~N"); +Clazz_defineMethod (c$, "setElementAt", +function (a, b) { +this.array[b] = a; +}, "~N,~N"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.JComponent, "KeyboardState"); +c$.getKeyCodeArray = Clazz_defineMethod (c$, "getKeyCodeArray", +function () { +var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey); +if (a == null) { +a = new javax.swing.JComponent.IntVector (); +javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a); +}return a; +}); +c$.registerKeyPressed = Clazz_defineMethod (c$, "registerKeyPressed", +function (a) { +var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray (); +var c = b.size (); +var d; +for (d = 0; d < c; d++) { +if (b.elementAt (d) == -1) { +b.setElementAt (a, d); +return; +}} +b.addElement (a); +}, "~N"); +c$.registerKeyReleased = Clazz_defineMethod (c$, "registerKeyReleased", +function (a) { +var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray (); +var c = b.size (); +var d; +for (d = 0; d < c; d++) { +if (b.elementAt (d) == a) { +b.setElementAt (-1, d); +return; +}} +}, "~N"); +c$.keyIsPressed = Clazz_defineMethod (c$, "keyIsPressed", +function (a) { +var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray (); +var c = b.size (); +var d; +for (d = 0; d < c; d++) { +if (b.elementAt (d) == a) { +return true; +}} +return false; +}, "~N"); +c$.shouldProcess = Clazz_defineMethod (c$, "shouldProcess", +function (a) { +switch (a.getID ()) { +case 401: +if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) { +javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ()); +}return true; +case 402: +if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) { +javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ()); +return true; +}return false; +case 400: +return true; +default: +return false; +} +}, "java.awt.event.KeyEvent"); +c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState; +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"uiClassID", "ComponentUI", +"managingFocusForwardTraversalKeys", null, +"managingFocusBackwardTraversalKeys", null, +"NOT_OBSCURED", 0, +"PARTIALLY_OBSCURED", 1, +"COMPLETELY_OBSCURED", 2, +"DEBUG_GRAPHICS_LOADED", false); +c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY = new Clazz._O (); +Clazz_defineStatics (c$, +"WHEN_FOCUSED", 0, +"WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1, +"WHEN_IN_FOCUSED_WINDOW", 2, +"UNDEFINED_CONDITION", -1, +"WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow", +"TOOL_TIP_TEXT_KEY", "ToolTipText", +"NEXT_FOCUS", "nextFocus", +"IS_DOUBLE_BUFFERED", 0, +"ANCESTOR_USING_BUFFER", 1, +"IS_PAINTING_TILE", 2, +"IS_OPAQUE", 3, +"FOCUS_INPUTMAP_CREATED", 5, +"ANCESTOR_INPUTMAP_CREATED", 6, +"WIF_INPUTMAP_CREATED", 7, +"ACTIONMAP_CREATED", 8, +"CREATED_DOUBLE_BUFFER", 9, +"IS_PRINTING", 11, +"IS_PRINTING_ALL", 12, +"IS_REPAINTING", 13, +"REQUEST_FOCUS_DISABLED", 22, +"INHERITS_POPUP_MENU", 23, +"OPAQUE_SET", 24, +"AUTOSCROLLS_SET", 25, +"REVALIDATE_RUNNABLE_SCHEDULED", 28); +c$.tempRectangles = c$.prototype.tempRectangles = new java.util.ArrayList (11); +Clazz_defineStatics (c$, +"defaultLocale", "JComponent.defaultLocale", +"componentObtainingGraphicsFrom", null); +c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock = new Clazz._O (); +c$.focusController = c$.prototype.focusController = ((Clazz_isClassDefined ("javax.swing.JComponent$1") ? 0 : javax.swing.JComponent.$JComponent$1$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$1, this, null)); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.event.ActionListener"], "javax.swing.Action", null, function () { +c$ = Clazz_declareInterface (javax.swing, "Action", java.awt.event.ActionListener); +Clazz_defineStatics (c$, +"DEFAULT", "Default", +"NAME", "Name", +"SHORT_DESCRIPTION", "ShortDescription", +"LONG_DESCRIPTION", "LongDescription", +"SMALL_ICON", "SmallIcon", +"ACTION_COMMAND_KEY", "ActionCommandKey", +"ACCELERATOR_KEY", "AcceleratorKey", +"MNEMONIC_KEY", "MnemonicKey", +"SELECTED_KEY", "SwingSelectedKey", +"DISPLAYED_MNEMONIC_INDEX_KEY", "SwingDisplayedMnemonicIndexKey", +"LARGE_ICON_KEY", "SwingLargeIconKey"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Frame", "java.awt.event.WindowListener", "javax.swing.SwingConstants"], "javax.swing.SwingUtilities", ["java.lang.Character", "$.Error", "$.Thread", "java.applet.Applet", "java.awt.Component", "$.Container", "$.EventQueue", "$.Point", "$.Rectangle", "$.Window", "java.awt.event.ActionEvent", "$.MouseEvent", "$.MouseWheelEvent", "javax.swing.JComponent", "javax.swing.JComponent.ActionStandin", "javax.swing.JRootPane", "$.RootPaneContainer", "javax.swing.event.MenuDragMouseEvent", "javax.swing.plaf.UIResource", "jssun.awt.AppContext", "jssun.swing.UIAction", "swingjs.api.Interface"], function () { +c$ = Clazz_declareType (javax.swing, "SwingUtilities", null, javax.swing.SwingConstants); +c$.installSwingDropTargetAsNecessary = Clazz_defineMethod (c$, "installSwingDropTargetAsNecessary", +function (c, t) { +}, "java.awt.Component,javax.swing.TransferHandler"); +c$.isRectangleContainingRectangle = Clazz_defineMethod (c$, "isRectangleContainingRectangle", +function (a, b) { +if (b.x >= a.x && (b.x + b.width) <= (a.x + a.width) && b.y >= a.y && (b.y + b.height) <= (a.y + a.height)) { +return true; +}return false; +}, "java.awt.Rectangle,java.awt.Rectangle"); +c$.getLocalBounds = Clazz_defineMethod (c$, "getLocalBounds", +function (aComponent) { +var b = new java.awt.Rectangle (aComponent.getBounds ()); +b.x = b.y = 0; +return b; +}, "java.awt.Component"); +c$.getWindowAncestor = Clazz_defineMethod (c$, "getWindowAncestor", +function (c) { +for (var p = c.getParent (); p != null; p = p.getParent ()) { +if (Clazz_instanceOf (p, java.awt.Window)) { +return p; +}} +return null; +}, "java.awt.Component"); +c$.convertScreenLocationToParent = Clazz_defineMethod (c$, "convertScreenLocationToParent", +function (parent, x, y) { +for (var p = parent; p != null; p = p.getParent ()) { +if (Clazz_instanceOf (p, java.awt.Window)) { +var point = new java.awt.Point (x, y); +javax.swing.SwingUtilities.convertPointFromScreen (point, parent); +return point; +}} +throw new Error ("convertScreenLocationToParent: no window ancestor"); +}, "java.awt.Container,~N,~N"); +c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", +function (source, aPoint, destination) { +var p; +if (source == null && destination == null) return aPoint; +if (source == null) { +source = javax.swing.SwingUtilities.getWindowAncestor (destination); +if (source == null) throw new Error ("Source component not connected to component tree hierarchy"); +}p = new java.awt.Point (aPoint); +javax.swing.SwingUtilities.convertPointToScreen (p, source); +if (destination == null) { +destination = javax.swing.SwingUtilities.getWindowAncestor (source); +if (destination == null) throw new Error ("Destination component not connected to component tree hierarchy"); +}javax.swing.SwingUtilities.convertPointFromScreen (p, destination); +return p; +}, "java.awt.Component,java.awt.Point,java.awt.Component"); +c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", +function (source, x, y, destination) { +var point = new java.awt.Point (x, y); +return javax.swing.SwingUtilities.convertPoint (source, point, destination); +}, "java.awt.Component,~N,~N,java.awt.Component"); +c$.convertRectangle = Clazz_defineMethod (c$, "convertRectangle", +function (source, aRectangle, destination) { +var point = new java.awt.Point (aRectangle.x, aRectangle.y); +point = javax.swing.SwingUtilities.convertPoint (source, point, destination); +return new java.awt.Rectangle (point.x, point.y, aRectangle.width, aRectangle.height); +}, "java.awt.Component,java.awt.Rectangle,java.awt.Component"); +c$.getAncestorOfClass = Clazz_defineMethod (c$, "getAncestorOfClass", +function (c, comp) { +if (comp == null || c == null) return null; +var parent = comp.getParent (); +while (parent != null && !(c.isInstance (parent))) parent = parent.getParent (); + +return parent; +}, "Class,java.awt.Component"); +c$.getAncestorNamed = Clazz_defineMethod (c$, "getAncestorNamed", +function (name, comp) { +if (comp == null || name == null) return null; +var parent = comp.getParent (); +while (parent != null && !(name.equals (parent.getName ()))) parent = parent.getParent (); + +return parent; +}, "~S,java.awt.Component"); +c$.getDeepestComponentAt = Clazz_defineMethod (c$, "getDeepestComponentAt", +function (parent, x, y) { +if (!parent.contains (x, y)) { +return null; +}if (Clazz_instanceOf (parent, java.awt.Container)) { +var components = (parent).getComponents (); +for (var i = 0; i < components.length; i++) { +var comp = components[i]; +if (comp != null && comp.isVisible ()) { +var loc = comp.getLocation (); +if (Clazz_instanceOf (comp, java.awt.Container)) { +comp = javax.swing.SwingUtilities.getDeepestComponentAt (comp, x - loc.x, y - loc.y); +} else { +comp = comp.getComponentAt (x - loc.x, y - loc.y); +}if (comp != null && comp.isVisible ()) { +return comp; +}}} +}return parent; +}, "java.awt.Component,~N,~N"); +c$.convertMouseEvent = Clazz_defineMethod (c$, "convertMouseEvent", +function (source, sourceEvent, destination) { +var p = javax.swing.SwingUtilities.convertPoint (source, new java.awt.Point (sourceEvent.getX (), sourceEvent.getY ()), destination); +var newSource; +if (destination != null) newSource = destination; + else newSource = source; +var newEvent; +if (Clazz_instanceOf (sourceEvent, java.awt.event.MouseWheelEvent)) { +var sourceWheelEvent = sourceEvent; +newEvent = new java.awt.event.MouseWheelEvent (newSource, sourceWheelEvent.getID (), sourceWheelEvent.getWhen (), sourceWheelEvent.getModifiers (), p.x, p.y, sourceWheelEvent.getXOnScreen (), sourceWheelEvent.getYOnScreen (), sourceWheelEvent.getClickCount (), sourceWheelEvent.isPopupTrigger (), sourceWheelEvent.getScrollType (), sourceWheelEvent.getScrollAmount (), sourceWheelEvent.getWheelRotation ()); +} else if (Clazz_instanceOf (sourceEvent, javax.swing.event.MenuDragMouseEvent)) { +var sourceMenuDragEvent = sourceEvent; +newEvent = new javax.swing.event.MenuDragMouseEvent (newSource, sourceMenuDragEvent.getID (), sourceMenuDragEvent.getWhen (), sourceMenuDragEvent.getModifiers (), p.x, p.y, sourceMenuDragEvent.getXOnScreen (), sourceMenuDragEvent.getYOnScreen (), sourceMenuDragEvent.getClickCount (), sourceMenuDragEvent.isPopupTrigger (), sourceMenuDragEvent.getPath (), sourceMenuDragEvent.getMenuSelectionManager ()); +} else { +newEvent = new java.awt.event.MouseEvent (newSource, sourceEvent.getID (), sourceEvent.getWhen (), sourceEvent.getModifiers (), p.x, p.y, sourceEvent.getXOnScreen (), sourceEvent.getYOnScreen (), sourceEvent.getClickCount (), sourceEvent.isPopupTrigger (), 0); +}return newEvent; +}, "java.awt.Component,java.awt.event.MouseEvent,java.awt.Component"); +c$.convertPointToScreen = Clazz_defineMethod (c$, "convertPointToScreen", +function (p, c) { +var x; +var y; +do { +if (Clazz_instanceOf (c, javax.swing.JComponent)) { +x = (c).getX (); +y = (c).getY (); +} else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) { +try { +var pp = c.getLocationOnScreen (); +x = pp.x; +y = pp.y; +} catch (icse) { +if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) { +x = c.getX (); +y = c.getY (); +} else { +throw icse; +} +} +} else { +x = c.getX (); +y = c.getY (); +}p.x += x; +p.y += y; +if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break; +c = c.getParent (); +} while (c != null); +}, "java.awt.Point,java.awt.Component"); +c$.convertPointFromScreen = Clazz_defineMethod (c$, "convertPointFromScreen", +function (p, c) { +var x; +var y; +do { +if (Clazz_instanceOf (c, javax.swing.JComponent)) { +x = (c).getX (); +y = (c).getY (); +} else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) { +try { +var pp = c.getLocationOnScreen (); +x = pp.x; +y = pp.y; +} catch (icse) { +if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) { +x = c.getX (); +y = c.getY (); +} else { +throw icse; +} +} +} else { +x = c.getX (); +y = c.getY (); +}p.x -= x; +p.y -= y; +if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break; +c = c.getParent (); +} while (c != null); +}, "java.awt.Point,java.awt.Component"); +c$.windowForComponent = Clazz_defineMethod (c$, "windowForComponent", +function (c) { +return javax.swing.SwingUtilities.getWindowAncestor (c); +}, "java.awt.Component"); +c$.isDescendingFrom = Clazz_defineMethod (c$, "isDescendingFrom", +function (a, b) { +if (a === b) return true; +for (var p = a.getParent (); p != null; p = p.getParent ()) if (p === b) return true; + +return false; +}, "java.awt.Component,java.awt.Component"); +c$.computeIntersection = Clazz_defineMethod (c$, "computeIntersection", +function (x, y, width, height, dest) { +var x1 = (x > dest.x) ? x : dest.x; +var x2 = ((x + width) < (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width); +var y1 = (y > dest.y) ? y : dest.y; +var y2 = ((y + height) < (dest.y + dest.height) ? (y + height) : (dest.y + dest.height)); +dest.x = x1; +dest.y = y1; +dest.width = x2 - x1; +dest.height = y2 - y1; +if (dest.width < 0 || dest.height < 0) { +dest.x = dest.y = dest.width = dest.height = 0; +}return dest; +}, "~N,~N,~N,~N,java.awt.Rectangle"); +c$.computeUnion = Clazz_defineMethod (c$, "computeUnion", +function (x, y, width, height, dest) { +var x1 = (x < dest.x) ? x : dest.x; +var x2 = ((x + width) > (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width); +var y1 = (y < dest.y) ? y : dest.y; +var y2 = ((y + height) > (dest.y + dest.height)) ? (y + height) : (dest.y + dest.height); +dest.x = x1; +dest.y = y1; +dest.width = (x2 - x1); +dest.height = (y2 - y1); +return dest; +}, "~N,~N,~N,~N,java.awt.Rectangle"); +c$.computeDifference = Clazz_defineMethod (c$, "computeDifference", +function (rectA, rectB) { +if (rectB == null || !rectA.intersects (rectB) || javax.swing.SwingUtilities.isRectangleContainingRectangle (rectB, rectA)) { +return new Array (0); +}var t = new java.awt.Rectangle (); +var a = null; +var b = null; +var c = null; +var d = null; +var result; +var rectCount = 0; +if (javax.swing.SwingUtilities.isRectangleContainingRectangle (rectA, rectB)) { +t.x = rectA.x; +t.y = rectA.y; +t.width = rectB.x - rectA.x; +t.height = rectA.height; +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.x = rectB.x; +t.y = rectA.y; +t.width = rectB.width; +t.height = rectB.y - rectA.y; +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}t.x = rectB.x; +t.y = rectB.y + rectB.height; +t.width = rectB.width; +t.height = rectA.y + rectA.height - (rectB.y + rectB.height); +if (t.width > 0 && t.height > 0) { +c = new java.awt.Rectangle (t); +rectCount++; +}t.x = rectB.x + rectB.width; +t.y = rectA.y; +t.width = rectA.x + rectA.width - (rectB.x + rectB.width); +t.height = rectA.height; +if (t.width > 0 && t.height > 0) { +d = new java.awt.Rectangle (t); +rectCount++; +}} else { +if (rectB.x <= rectA.x && rectB.y <= rectA.y) { +if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) { +t.x = rectA.x; +t.y = rectB.y + rectB.height; +t.width = rectA.width; +t.height = rectA.y + rectA.height - (rectB.y + rectB.height); +if (t.width > 0 && t.height > 0) { +a = t; +rectCount++; +}} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) { +t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); +if (t.width > 0 && t.height > 0) { +a = t; +rectCount++; +}} else { +t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectB.y + rectB.height) - rectA.y); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}}} else if (rectB.x <= rectA.x && (rectB.y + rectB.height) >= (rectA.y + rectA.height)) { +if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) { +t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); +if (t.width > 0 && t.height > 0) { +a = t; +rectCount++; +}} else { +t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectA.y + rectA.height) - rectB.y); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}}} else if (rectB.x <= rectA.x) { +if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) { +t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}} else { +t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectB.height); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); +if (t.width > 0 && t.height > 0) { +c = new java.awt.Rectangle (t); +rectCount++; +}}} else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) { +if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) { +t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); +if (t.width > 0 && t.height > 0) { +a = t; +rectCount++; +}} else if (rectB.y <= rectA.y) { +t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, (rectB.y + rectB.height) - rectA.y); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) { +t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, (rectA.y + rectA.height) - rectB.y); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}} else { +t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, rectB.height); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); +if (t.width > 0 && t.height > 0) { +c = new java.awt.Rectangle (t); +rectCount++; +}}} else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) { +if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) { +t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}} else if (rectB.y <= rectA.y) { +t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectB.x, (rectB.y + rectB.height), rectB.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); +if (t.width > 0 && t.height > 0) { +c = new java.awt.Rectangle (t); +rectCount++; +}} else { +t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); +if (t.width > 0 && t.height > 0) { +a = new java.awt.Rectangle (t); +rectCount++; +}t.reshape (rectB.x, rectA.y, rectB.width, rectB.y - rectA.y); +if (t.width > 0 && t.height > 0) { +b = new java.awt.Rectangle (t); +rectCount++; +}t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); +if (t.width > 0 && t.height > 0) { +c = new java.awt.Rectangle (t); +rectCount++; +}}}}result = new Array (rectCount); +rectCount = 0; +if (a != null) result[rectCount++] = a; +if (b != null) result[rectCount++] = b; +if (c != null) result[rectCount++] = c; +if (d != null) result[rectCount++] = d; +return result; +}, "java.awt.Rectangle,java.awt.Rectangle"); +c$.isLeftMouseButton = Clazz_defineMethod (c$, "isLeftMouseButton", +function (anEvent) { +return ((anEvent.getModifiers () & 16) != 0); +}, "java.awt.event.MouseEvent"); +c$.isMiddleMouseButton = Clazz_defineMethod (c$, "isMiddleMouseButton", +function (anEvent) { +return ((anEvent.getModifiers () & 8) == 8); +}, "java.awt.event.MouseEvent"); +c$.isRightMouseButton = Clazz_defineMethod (c$, "isRightMouseButton", +function (anEvent) { +return ((anEvent.getModifiers () & 4) == 4); +}, "java.awt.event.MouseEvent"); +c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", +function (g, c, p, x, y, w, h) { +javax.swing.SwingUtilities.getCellRendererPane (c, p).paintComponent (g, c, p, x, y, w, h, false); +}, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N"); +c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", +function (g, c, p, r) { +javax.swing.SwingUtilities.paintComponent (g, c, p, r.x, r.y, r.width, r.height); +}, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle"); +c$.getCellRendererPane = Clazz_defineMethod (c$, "getCellRendererPane", + function (c, p) { +var shell = c.getParent (); +if (Clazz_instanceOf (shell, javax.swing.CellRendererPane)) { +if (shell.getParent () !== p) { +p.add (shell); +}} else { +shell = swingjs.api.Interface.getInstance ("javax.swing.CellRendererPane", false); +shell.add (c); +p.add (shell); +}return shell; +}, "java.awt.Component,java.awt.Container"); +c$.updateComponentTreeUI = Clazz_defineMethod (c$, "updateComponentTreeUI", +function (c) { +javax.swing.SwingUtilities.updateComponentTreeUI0 (c); +c.invalidate (); +c.validate (); +c.repaint (); +}, "java.awt.Component"); +c$.updateComponentTreeUI0 = Clazz_defineMethod (c$, "updateComponentTreeUI0", + function (c) { +if (Clazz_instanceOf (c, javax.swing.JComponent)) { +var jc = c; +jc.updateUI (); +var jpm = jc.getComponentPopupMenu (); +if (jpm != null) { +javax.swing.SwingUtilities.updateComponentTreeUI (jpm); +}}var children = null; +if (Clazz_instanceOf (c, javax.swing.JMenu)) { +children = (c).getMenuComponents (); +} else if (Clazz_instanceOf (c, java.awt.Container)) { +children = (c).getComponents (); +}if (children != null) { +for (var i = 0; i < children.length; i++) { +javax.swing.SwingUtilities.updateComponentTreeUI0 (children[i]); +} +}}, "java.awt.Component"); +c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", +function (doRun) { +java.awt.EventQueue.invokeLater (doRun); +}, "Runnable"); +c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", +function (doRun) { +java.awt.EventQueue.invokeAndWait (doRun); +}, "Runnable"); +c$.isEventDispatchThread = Clazz_defineMethod (c$, "isEventDispatchThread", +function () { +return java.awt.EventQueue.isDispatchThread (); +}); +c$.getRootPane = Clazz_defineMethod (c$, "getRootPane", +function (c) { +if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) { +return (c).getRootPane (); +}for (; c != null; c = c.getParent ()) { +if (Clazz_instanceOf (c, javax.swing.JRootPane)) { +return c; +}} +return null; +}, "java.awt.Component"); +c$.getRoot = Clazz_defineMethod (c$, "getRoot", +function (c) { +var applet = null; +for (var p = c; p != null; p = p.getParent ()) { +if (Clazz_instanceOf (p, java.awt.Window)) { +return p; +}if (Clazz_instanceOf (p, java.applet.Applet)) { +applet = p; +}} +return applet; +}, "java.awt.Component"); +c$.processKeyBindings = Clazz_defineMethod (c$, "processKeyBindings", +function (event) { +if (event != null) { +if (event.isConsumed ()) { +return false; +}var component = event.getComponent (); +var pressed = (event.getID () == 401); +if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (event)) { +return false; +}while (component != null) { +if (Clazz_instanceOf (component, javax.swing.JComponent)) { +return (component).processKeyBindings (event, pressed); +}if ((Clazz_instanceOf (component, java.applet.Applet)) || (Clazz_instanceOf (component, java.awt.Window))) { +return javax.swing.JComponent.processKeyBindingsForAllComponents (event, component, pressed); +}component = component.getParent (); +} +}return false; +}, "java.awt.event.KeyEvent"); +c$.isValidKeyEventForKeyBindings = Clazz_defineMethod (c$, "isValidKeyEventForKeyBindings", +function (e) { +if (e.getID () == 400) { +var mod = e.getModifiers (); +if (((mod & 8) != 0) && ((mod & 2) == 0)) { +return false; +}}return true; +}, "java.awt.event.KeyEvent"); +c$.notifyAction = Clazz_defineMethod (c$, "notifyAction", +function (action, ks, event, sender, modifiers) { +if (action == null) { +return false; +}if (Clazz_instanceOf (action, jssun.swing.UIAction)) { +if (!(action).isEnabled (sender)) { +return false; +}} else if (!action.isEnabled ()) { +return false; +}var commandO; +var stayNull; +commandO = action.getValue ("ActionCommandKey"); +if (commandO == null && (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin))) { +stayNull = true; +} else { +stayNull = false; +}var command; +if (commandO != null) { +command = commandO.toString (); +} else if (!stayNull && event.getKeyChar () != '\uffff') { +command = String.valueOf (event.getKeyChar ()); +} else { +command = null; +}action.actionPerformed ( new java.awt.event.ActionEvent (sender, 1001, command, event.getWhen (), modifiers)); +return true; +}, "javax.swing.Action,javax.swing.KeyStroke,java.awt.event.KeyEvent,~O,~N"); +c$.replaceUIInputMap = Clazz_defineMethod (c$, "replaceUIInputMap", +function (component, type, uiInputMap) { +var map = component.getInputMap (type, (uiInputMap != null)); +while (map != null) { +var parent = map.getParent (); +if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) { +map.setParent (uiInputMap); +return; +}map = parent; +} +}, "javax.swing.JComponent,~N,javax.swing.InputMap"); +c$.replaceUIActionMap = Clazz_defineMethod (c$, "replaceUIActionMap", +function (component, uiActionMap) { +var map = component.getActionMap ((uiActionMap != null)); +;while (map != null) { +var parent = map.getParent (); +if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) { +map.setParent (uiActionMap); +return; +}map = parent; +} +}, "javax.swing.JComponent,javax.swing.ActionMap"); +c$.getUIInputMap = Clazz_defineMethod (c$, "getUIInputMap", +function (component, condition) { +var map = component.getInputMap (condition, false); +while (map != null) { +var parent = map.getParent (); +if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) { +return parent; +}map = parent; +} +return null; +}, "javax.swing.JComponent,~N"); +c$.getUIActionMap = Clazz_defineMethod (c$, "getUIActionMap", +function (component) { +var map = component.getActionMap (false); +while (map != null) { +var parent = map.getParent (); +if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) { +return parent; +}map = parent; +} +return null; +}, "javax.swing.JComponent"); +c$.getSharedOwnerFrame = Clazz_defineMethod (c$, "getSharedOwnerFrame", +function () { +var sharedOwnerFrame = javax.swing.SwingUtilities.appContextGet (javax.swing.SwingUtilities.sharedOwnerFrameKey); +if (sharedOwnerFrame == null) { +sharedOwnerFrame = new javax.swing.SwingUtilities.SharedOwnerFrame (); +javax.swing.SwingUtilities.appContextPut (javax.swing.SwingUtilities.sharedOwnerFrameKey, sharedOwnerFrame); +}return sharedOwnerFrame; +}); +c$.getSharedOwnerFrameShutdownListener = Clazz_defineMethod (c$, "getSharedOwnerFrameShutdownListener", +function () { +var sharedOwnerFrame = javax.swing.SwingUtilities.getSharedOwnerFrame (); +return sharedOwnerFrame; +}); +c$.appContextGet = Clazz_defineMethod (c$, "appContextGet", +function (key) { +return jssun.awt.AppContext.getAppContext ().get (key); +}, "~O"); +c$.appContextPut = Clazz_defineMethod (c$, "appContextPut", +function (key, value) { +jssun.awt.AppContext.getAppContext ().put (key, value); +}, "~O,~O"); +c$.appContextRemove = Clazz_defineMethod (c$, "appContextRemove", +function (key) { +jssun.awt.AppContext.getAppContext ().remove (key); +}, "~O"); +c$.loadSystemClass = Clazz_defineMethod (c$, "loadSystemClass", +function (className) { +return Clazz._4Name (className, true, Thread.currentThread ().getContextClassLoader ()); +}, "~S"); +c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", +function (c) { +return c.getComponentOrientation ().isLeftToRight (); +}, "java.awt.Component"); +c$.doesIconReferenceImage = Clazz_defineMethod (c$, "doesIconReferenceImage", +function (icon, image) { +var iconImage = (icon != null && (Clazz_instanceOf (icon, javax.swing.ImageIcon))) ? (icon).getImage () : null; +return (iconImage === image); +}, "javax.swing.Icon,java.awt.Image"); +c$.findDisplayedMnemonicIndex = Clazz_defineMethod (c$, "findDisplayedMnemonicIndex", +function (text, mnemonic) { +if (text == null || mnemonic == 0) { +return -1; +}var uc = Character.toUpperCase (String.fromCharCode (mnemonic)); +var lc = Character.toLowerCase (String.fromCharCode (mnemonic)); +var uci = text.indexOf (uc); +var lci = text.indexOf (lc); +if (uci == -1) { +return lci; +} else if (lci == -1) { +return uci; +} else { +return (lci < uci) ? lci : uci; +}}, "~S,~N"); +c$.calculateInnerArea = Clazz_defineMethod (c$, "calculateInnerArea", +function (c, r) { +if (c == null) { +return null; +}var rect = r; +var insets = c.getInsets (); +if (rect == null) { +rect = new java.awt.Rectangle (); +}rect.x = insets.left; +rect.y = insets.top; +rect.width = c.getWidth () - insets.left - insets.right; +rect.height = c.getHeight () - insets.top - insets.bottom; +return rect; +}, "javax.swing.JComponent,java.awt.Rectangle"); +c$.updateRendererOrEditorUI = Clazz_defineMethod (c$, "updateRendererOrEditorUI", +function (rendererOrEditor) { +if (rendererOrEditor == null) { +return; +}var component = null; +if (Clazz_instanceOf (rendererOrEditor, java.awt.Component)) { +component = rendererOrEditor; +}if (Clazz_instanceOf (rendererOrEditor, javax.swing.DefaultCellEditor)) { +component = (rendererOrEditor).getComponent (); +}if (component != null) { +javax.swing.SwingUtilities.updateComponentTreeUI (component); +}}, "~O"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.SwingUtilities, "SharedOwnerFrame", java.awt.Frame, java.awt.event.WindowListener); +Clazz_defineMethod (c$, "addNotify", +function () { +Clazz_superCall (this, javax.swing.SwingUtilities.SharedOwnerFrame, "addNotify", []); +this.installListeners (); +}); +Clazz_defineMethod (c$, "installListeners", +function () { +var a = this.getOwnedWindows (); +for (var b = 0; b < a.length; b++) { +var c = a[b]; +if (c != null) { +c.removeWindowListener (this); +c.addWindowListener (this); +}} +}); +Clazz_overrideMethod (c$, "windowClosed", +function (a) { +var b = this.getOwnedWindows (); +for (var c = 0; c < b.length; c++) { +var d = b[c]; +if (d != null) { +if (d.isDisplayable ()) { +return; +}d.removeWindowListener (this); +}this.dispose (); +} +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowOpened", +function (a) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowClosing", +function (a) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowIconified", +function (a) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowDeiconified", +function (a) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowActivated", +function (a) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowDeactivated", +function (a) { +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "show", +function () { +}); +Clazz_overrideMethod (c$, "dispose", +function () { +}); +c$ = Clazz_p0p (); +c$.sharedOwnerFrameKey = c$.prototype.sharedOwnerFrameKey = new Clazz._O (); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.Window"], "java.awt.Frame", ["java.lang.IllegalArgumentException", "java.awt.Cursor", "$.IllegalComponentStateException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.maximizedBounds = null; +this.title = "Untitled"; +this.resizable = true; +this.undecorated = false; +this.mbManagement = false; +this.$state = 0; +this.ownedWindows = null; +this.menuBar = null; +Clazz_instantialize (this, arguments); +}, java.awt, "Frame", java.awt.Window); +Clazz_makeConstructor (c$, +function () { +this.construct (""); +}); +Clazz_makeConstructor (c$, +function (gc) { +this.construct ("", gc); +}, "java.awt.GraphicsConfiguration"); +Clazz_makeConstructor (c$, +function (title) { +Clazz_superConstructor (this, java.awt.Frame, []); +this.initFrame (title, null); +}, "~S"); +Clazz_makeConstructor (c$, +function (title, gc) { +Clazz_superConstructor (this, java.awt.Frame, [gc]); +this.initFrame (title, gc); +}, "~S,java.awt.GraphicsConfiguration"); +Clazz_defineMethod (c$, "initFrame", + function (title, gc) { +this.title = title; +}, "~S,java.awt.GraphicsConfiguration"); +Clazz_overrideMethod (c$, "constructComponentName", +function () { +{ +return "frame" + java.awt.Frame.$nameCounter++; +}}); +Clazz_defineMethod (c$, "addNotify", +function () { +if (this.peer == null) { +this.peer = this.getToolkit ().createFrame (this); +}var p = this.peer; +p.setMaximizedBounds (this.maximizedBounds); +Clazz_superCall (this, java.awt.Frame, "addNotify", []); +}); +Clazz_defineMethod (c$, "getTitle", +function () { +return this.title; +}); +Clazz_defineMethod (c$, "setTitle", +function (title) { +var oldTitle = this.title; +if (title == null) { +title = ""; +}{ +this.title = title; +}this.firePropertyChangeObject ("title", oldTitle, title); +}, "~S"); +Clazz_defineMethod (c$, "getIconImage", +function () { +var icons = this.icons; +if (icons != null) { +if (icons.size () > 0) { +return icons.get (0); +}}return null; +}); +Clazz_defineMethod (c$, "isResizable", +function () { +return this.resizable; +}); +Clazz_defineMethod (c$, "setResizable", +function (resizable) { +var oldResizable = this.resizable; +{ +this.resizable = resizable; +}this.firePropertyChangeBool ("resizable", oldResizable, resizable); +}, "~B"); +Clazz_defineMethod (c$, "setState", +function (state) { +var current = this.getExtendedState (); +if (state == 1 && (current & 1) == 0) { +this.setExtendedState (current | 1); +} else if (state == 0 && (current & 1) != 0) { +this.setExtendedState (current & -2); +}}, "~N"); +Clazz_defineMethod (c$, "setExtendedState", +function (state) { +if (!this.isFrameStateSupported (state)) { +return; +}this.$state = state; +}, "~N"); +Clazz_defineMethod (c$, "isFrameStateSupported", + function (state) { +if (!this.getToolkit ().isFrameStateSupported (state)) { +if (((state & 1) != 0) && !this.getToolkit ().isFrameStateSupported (1)) { +return false; +} else { +state &= -2; +}return this.getToolkit ().isFrameStateSupported (state); +}return true; +}, "~N"); +Clazz_defineMethod (c$, "getState", +function () { +return (this.getExtendedState () & 1) != 0 ? 1 : 0; +}); +Clazz_defineMethod (c$, "getExtendedState", +function () { +return this.$state; +}); +Clazz_defineMethod (c$, "setMaximizedBounds", +function (bounds) { +this.maximizedBounds = bounds; +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "getMaximizedBounds", +function () { +return this.maximizedBounds; +}); +Clazz_defineMethod (c$, "setUndecorated", +function (undecorated) { +{ +if (this.isDisplayable ()) { +throw new java.awt.IllegalComponentStateException ("The frame is displayable."); +}this.undecorated = undecorated; +}}, "~B"); +Clazz_defineMethod (c$, "isUndecorated", +function () { +return this.undecorated; +}); +Clazz_overrideMethod (c$, "removeNotify", +function () { +}); +Clazz_defineMethod (c$, "paramString", +function () { +var str = Clazz_superCall (this, java.awt.Frame, "paramString", []); +if (this.title != null) { +str += ",title=" + this.title; +}if (this.resizable) { +str += ",resizable"; +}this.getExtendedState (); +if (this.$state == 0) { +str += ",normal"; +} else { +if ((this.$state & 1) != 0) { +str += ",iconified"; +}if ((this.$state & 6) == 6) { +str += ",maximized"; +} else if ((this.$state & 2) != 0) { +str += ",maximized_horiz"; +} else if ((this.$state & 4) != 0) { +str += ",maximized_vert"; +}}return str; +}); +Clazz_defineMethod (c$, "setCursor", +function (cursorType) { +if (cursorType < 0 || cursorType > 13) { +throw new IllegalArgumentException ("illegal cursor type"); +}this.setCursor (java.awt.Cursor.getPredefinedCursor (cursorType)); +}, "~N"); +Clazz_defineMethod (c$, "getCursorType", +function () { +return (this.getCursor ().getType ()); +}); +c$.getFrames = Clazz_defineMethod (c$, "getFrames", +function () { +var allWindows = java.awt.Window.getWindows (); +var frameCount = 0; +for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) { +if (Clazz_instanceOf (w, java.awt.Frame)) { +frameCount++; +}} +var frames = new Array (frameCount); +var c = 0; +for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) { +if (Clazz_instanceOf (w, java.awt.Frame)) { +frames[c++] = w; +}} +return frames; +}); +Clazz_defineStatics (c$, +"DEFAULT_CURSOR", 0, +"CROSSHAIR_CURSOR", 1, +"TEXT_CURSOR", 2, +"WAIT_CURSOR", 3, +"SW_RESIZE_CURSOR", 4, +"SE_RESIZE_CURSOR", 5, +"NW_RESIZE_CURSOR", 6, +"NE_RESIZE_CURSOR", 7, +"N_RESIZE_CURSOR", 8, +"S_RESIZE_CURSOR", 9, +"W_RESIZE_CURSOR", 10, +"E_RESIZE_CURSOR", 11, +"HAND_CURSOR", 12, +"MOVE_CURSOR", 13, +"NORMAL", 0, +"ICONIFIED", 1, +"MAXIMIZED_HORIZ", 2, +"MAXIMIZED_VERT", 4, +"MAXIMIZED_BOTH", 6, +"$base", "frame", +"$nameCounter", 0); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.lang.IllegalStateException"], "java.awt.IllegalComponentStateException", null, function () { +c$ = Clazz_declareType (java.awt, "IllegalComponentStateException", IllegalStateException); +}); +Clazz_declarePackage ("javax.swing"); +c$ = Clazz_declareInterface (javax.swing, "SwingConstants"); +Clazz_defineStatics (c$, +"CENTER", 0, +"TOP", 1, +"LEFT", 2, +"BOTTOM", 3, +"RIGHT", 4, +"NORTH", 1, +"NORTH_EAST", 2, +"EAST", 3, +"SOUTH_EAST", 4, +"SOUTH", 5, +"SOUTH_WEST", 6, +"WEST", 7, +"NORTH_WEST", 8, +"HORIZONTAL", 0, +"VERTICAL", 1, +"LEADING", 10, +"TRAILING", 11, +"NEXT", 12, +"PREVIOUS", 13); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.Shape", "java.awt.geom.Rectangle2D"], "java.awt.Rectangle", ["java.awt.Dimension", "$.Point"], function () { +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.width = 0; +this.height = 0; +Clazz_instantialize (this, arguments); +}, java.awt, "Rectangle", java.awt.geom.Rectangle2D, java.awt.Shape); +Clazz_makeConstructor (c$, +function () { +this.construct (0, 0, 0, 0); +}); +Clazz_makeConstructor (c$, +function (r) { +this.construct (r.x, r.y, r.width, r.height); +}, "java.awt.Rectangle"); +Clazz_makeConstructor (c$, +function (x, y, width, height) { +Clazz_superConstructor (this, java.awt.Rectangle, []); +this.x = x; +this.y = y; +this.width = width; +this.height = height; +}, "~N,~N,~N,~N"); +Clazz_makeConstructor (c$, +function (width, height) { +this.construct (0, 0, width, height); +}, "~N,~N"); +Clazz_makeConstructor (c$, +function (p, d) { +this.construct (p.x, p.y, d.width, d.height); +}, "java.awt.Point,java.awt.Dimension"); +Clazz_makeConstructor (c$, +function (p) { +this.construct (p.x, p.y, 0, 0); +}, "java.awt.Point"); +Clazz_makeConstructor (c$, +function (d) { +this.construct (0, 0, d.width, d.height); +}, "java.awt.Dimension"); +Clazz_overrideMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_overrideMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_overrideMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz_overrideMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz_overrideMethod (c$, "getBounds", +function () { +return new java.awt.Rectangle (this.x, this.y, this.width, this.height); +}); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +return new java.awt.Rectangle (this.x, this.y, this.width, this.height); +}); +Clazz_defineMethod (c$, "setBounds", +function (r) { +this.reshape (r.x, r.y, r.width, r.height); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "setBounds", +function (x, y, width, height) { +this.reshape (x, y, width, height); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setRect", +function (x, y, width, height) { +var newx; +var newy; +var neww; +var newh; +if (x > 4.294967294E9) { +newx = 2147483647; +neww = -1; +} else { +newx = java.awt.Rectangle.clip (x, false); +if (width >= 0) width += x - newx; +neww = java.awt.Rectangle.clip (width, width >= 0); +}if (y > 4.294967294E9) { +newy = 2147483647; +newh = -1; +} else { +newy = java.awt.Rectangle.clip (y, false); +if (height >= 0) height += y - newy; +newh = java.awt.Rectangle.clip (height, height >= 0); +}this.reshape (newx, newy, neww, newh); +}, "~N,~N,~N,~N"); +c$.clip = Clazz_defineMethod (c$, "clip", + function (v, doceil) { +if (v <= -2147483648) { +return -2147483648; +}if (v >= 2147483647) { +return 2147483647; +}return Clazz_doubleToInt (doceil ? Math.ceil (v) : Math.floor (v)); +}, "~N,~B"); +Clazz_defineMethod (c$, "reshape", +function (x, y, width, height) { +this.x = x; +this.y = y; +this.width = width; +this.height = height; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getLocation", +function () { +return new java.awt.Point (this.x, this.y); +}); +Clazz_defineMethod (c$, "setLocation", +function (p) { +this.setLocation (p.x, p.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "setLocation", +function (x, y) { +this.move (x, y); +}, "~N,~N"); +Clazz_defineMethod (c$, "move", +function (x, y) { +this.x = x; +this.y = y; +}, "~N,~N"); +Clazz_defineMethod (c$, "translate", +function (dx, dy) { +var oldv = this.x; +var newv = oldv + dx; +if (dx < 0) { +if (newv > oldv) { +if (this.width >= 0) { +this.width += newv - -2147483648; +}newv = -2147483648; +}} else { +if (newv < oldv) { +if (this.width >= 0) { +this.width += newv - 2147483647; +if (this.width < 0) this.width = 2147483647; +}newv = 2147483647; +}}this.x = newv; +oldv = this.y; +newv = oldv + dy; +if (dy < 0) { +if (newv > oldv) { +if (this.height >= 0) { +this.height += newv - -2147483648; +}newv = -2147483648; +}} else { +if (newv < oldv) { +if (this.height >= 0) { +this.height += newv - 2147483647; +if (this.height < 0) this.height = 2147483647; +}newv = 2147483647; +}}this.y = newv; +}, "~N,~N"); +Clazz_defineMethod (c$, "getSize", +function () { +return new java.awt.Dimension (this.width, this.height); +}); +Clazz_defineMethod (c$, "setSize", +function (d) { +this.setSize (d.width, d.height); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "setSize", +function (width, height) { +this.resize (width, height); +}, "~N,~N"); +Clazz_defineMethod (c$, "resize", +function (width, height) { +this.width = width; +this.height = height; +}, "~N,~N"); +Clazz_defineMethod (c$, "contains", +function (p) { +return this.contains (p.x, p.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "contains", +function (x, y) { +return this.inside (x, y); +}, "~N,~N"); +Clazz_defineMethod (c$, "contains", +function (r) { +return this.contains (r.x, r.y, r.width, r.height); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "contains", +function (X, Y, W, H) { +var w = this.width; +var h = this.height; +if ((w | h | W | H) < 0) { +return false; +}var x = this.x; +var y = this.y; +if (X < x || Y < y) { +return false; +}w += x; +W += X; +if (W <= X) { +if (w >= x || W > w) return false; +} else { +if (w >= x && W > w) return false; +}h += y; +H += Y; +if (H <= Y) { +if (h >= y || H > h) return false; +} else { +if (h >= y && H > h) return false; +}return true; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "inside", +function (X, Y) { +var w = this.width; +var h = this.height; +if ((w | h) < 0) { +return false; +}var x = this.x; +var y = this.y; +if (X < x || Y < y) { +return false; +}w += x; +h += y; +return ((w < x || w > X) && (h < y || h > Y)); +}, "~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (r) { +var tw = this.width; +var th = this.height; +var rw = r.width; +var rh = r.height; +if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) { +return false; +}var tx = this.x; +var ty = this.y; +var rx = r.x; +var ry = r.y; +rw += rx; +rh += ry; +tw += tx; +th += ty; +return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry)); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "intersection", +function (r) { +var tx1 = this.x; +var ty1 = this.y; +var rx1 = r.x; +var ry1 = r.y; +var tx2 = tx1; +tx2 += this.width; +var ty2 = ty1; +ty2 += this.height; +var rx2 = rx1; +rx2 += r.width; +var ry2 = ry1; +ry2 += r.height; +if (tx1 < rx1) tx1 = rx1; +if (ty1 < ry1) ty1 = ry1; +if (tx2 > rx2) tx2 = rx2; +if (ty2 > ry2) ty2 = ry2; +tx2 -= tx1; +ty2 -= ty1; +if (tx2 < -2147483648) tx2 = -2147483648; +if (ty2 < -2147483648) ty2 = -2147483648; +return new java.awt.Rectangle (tx1, ty1, tx2, ty2); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "union", +function (r) { +var tx2 = this.width; +var ty2 = this.height; +if ((tx2 | ty2) < 0) { +return new java.awt.Rectangle (r); +}var rx2 = r.width; +var ry2 = r.height; +if ((rx2 | ry2) < 0) { +return new java.awt.Rectangle (this); +}var tx1 = this.x; +var ty1 = this.y; +tx2 += tx1; +ty2 += ty1; +var rx1 = r.x; +var ry1 = r.y; +rx2 += rx1; +ry2 += ry1; +if (tx1 > rx1) tx1 = rx1; +if (ty1 > ry1) ty1 = ry1; +if (tx2 < rx2) tx2 = rx2; +if (ty2 < ry2) ty2 = ry2; +tx2 -= tx1; +ty2 -= ty1; +if (tx2 > 2147483647) tx2 = 2147483647; +if (ty2 > 2147483647) ty2 = 2147483647; +return new java.awt.Rectangle (tx1, ty1, tx2, ty2); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "add", +function (newx, newy) { +if ((this.width | this.height) < 0) { +this.x = newx; +this.y = newy; +this.width = this.height = 0; +return; +}var x1 = this.x; +var y1 = this.y; +var x2 = this.width; +var y2 = this.height; +x2 += x1; +y2 += y1; +if (x1 > newx) x1 = newx; +if (y1 > newy) y1 = newy; +if (x2 < newx) x2 = newx; +if (y2 < newy) y2 = newy; +x2 -= x1; +y2 -= y1; +if (x2 > 2147483647) x2 = 2147483647; +if (y2 > 2147483647) y2 = 2147483647; +this.reshape (x1, y1, x2, y2); +}, "~N,~N"); +Clazz_defineMethod (c$, "add", +function (pt) { +this.add (pt.x, pt.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "add", +function (r) { +var tx2 = this.width; +var ty2 = this.height; +if ((tx2 | ty2) < 0) { +this.reshape (r.x, r.y, r.width, r.height); +}var rx2 = r.width; +var ry2 = r.height; +if ((rx2 | ry2) < 0) { +return; +}var tx1 = this.x; +var ty1 = this.y; +tx2 += tx1; +ty2 += ty1; +var rx1 = r.x; +var ry1 = r.y; +rx2 += rx1; +ry2 += ry1; +if (tx1 > rx1) tx1 = rx1; +if (ty1 > ry1) ty1 = ry1; +if (tx2 < rx2) tx2 = rx2; +if (ty2 < ry2) ty2 = ry2; +tx2 -= tx1; +ty2 -= ty1; +if (tx2 > 2147483647) tx2 = 2147483647; +if (ty2 > 2147483647) ty2 = 2147483647; +this.reshape (tx1, ty1, tx2, ty2); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "grow", +function (h, v) { +var x0 = this.x; +var y0 = this.y; +var x1 = this.width; +var y1 = this.height; +x1 += x0; +y1 += y0; +x0 -= h; +y0 -= v; +x1 += h; +y1 += v; +if (x1 < x0) { +x1 -= x0; +if (x1 < -2147483648) x1 = -2147483648; +if (x0 < -2147483648) x0 = -2147483648; + else if (x0 > 2147483647) x0 = 2147483647; +} else { +if (x0 < -2147483648) x0 = -2147483648; + else if (x0 > 2147483647) x0 = 2147483647; +x1 -= x0; +if (x1 < -2147483648) x1 = -2147483648; + else if (x1 > 2147483647) x1 = 2147483647; +}if (y1 < y0) { +y1 -= y0; +if (y1 < -2147483648) y1 = -2147483648; +if (y0 < -2147483648) y0 = -2147483648; + else if (y0 > 2147483647) y0 = 2147483647; +} else { +if (y0 < -2147483648) y0 = -2147483648; + else if (y0 > 2147483647) y0 = 2147483647; +y1 -= y0; +if (y1 < -2147483648) y1 = -2147483648; + else if (y1 > 2147483647) y1 = 2147483647; +}this.reshape (x0, y0, x1, y1); +}, "~N,~N"); +Clazz_overrideMethod (c$, "isEmpty", +function () { +return (this.width <= 0) || (this.height <= 0); +}); +Clazz_defineMethod (c$, "outcode", +function (x, y) { +var out = 0; +if (this.width <= 0) { +out |= 5; +} else if (x < this.x) { +out |= 1; +} else if (x > this.x + this.width) { +out |= 4; +}if (this.height <= 0) { +out |= 10; +} else if (y < this.y) { +out |= 2; +} else if (y > this.y + this.height) { +out |= 8; +}return out; +}, "~N,~N"); +Clazz_overrideMethod (c$, "createIntersection", +function (r) { +if (Clazz_instanceOf (r, java.awt.Rectangle)) { +return this.intersection (r); +}var dest = new java.awt.geom.Rectangle2D.Double (); +java.awt.geom.Rectangle2D.intersect (this, r, dest); +return dest; +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "createUnion", +function (r) { +if (Clazz_instanceOf (r, java.awt.Rectangle)) { +return this.union (r); +}var dest = new java.awt.geom.Rectangle2D.Double (); +java.awt.geom.Rectangle2D.union (this, r, dest); +return dest; +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "equals", +function (obj) { +if (Clazz_instanceOf (obj, java.awt.Rectangle)) { +var r = obj; +return ((this.x == r.x) && (this.y == r.y) && (this.width == r.width) && (this.height == r.height)); +}return Clazz_superCall (this, java.awt.Rectangle, "equals", [obj]); +}, "~O"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",width=" + this.width + ",height=" + this.height + "]"; +}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_declareInterface (java.awt, "Shape"); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () { +c$ = Clazz_declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.Rectangle2D, []); +}); +Clazz_defineMethod (c$, "setRect", +function (r) { +this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "intersectsLine", +function (x1, y1, x2, y2) { +var out1; +var out2; +if ((out2 = this.outcode (x2, y2)) == 0) { +return true; +}while ((out1 = this.outcode (x1, y1)) != 0) { +if ((out1 & out2) != 0) { +return false; +}if ((out1 & (5)) != 0) { +var x = this.getX (); +if ((out1 & 4) != 0) { +x += this.getWidth (); +}y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1); +x1 = x; +} else { +var y = this.getY (); +if ((out1 & 8) != 0) { +y += this.getHeight (); +}x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1); +y1 = y; +}} +return true; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "intersectsLine", +function (l) { +return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ()); +}, "java.awt.geom.Line2D"); +Clazz_defineMethod (c$, "outcode", +function (p) { +return this.outcode (p.getX (), p.getY ()); +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "setFrame", +function (x, y, w, h) { +this.setRect (x, y, w, h); +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +return this.clone (); +}); +Clazz_defineMethod (c$, "contains", +function (x, y) { +var x0 = this.getX (); +var y0 = this.getY (); +return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ()); +}, "~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (x, y, w, h) { +if (this.isEmpty () || w <= 0 || h <= 0) { +return false; +}var x0 = this.getX (); +var y0 = this.getY (); +return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ()); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "contains", +function (x, y, w, h) { +if (this.isEmpty () || w <= 0 || h <= 0) { +return false; +}var x0 = this.getX (); +var y0 = this.getY (); +return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ()); +}, "~N,~N,~N,~N"); +c$.intersect = Clazz_defineMethod (c$, "intersect", +function (src1, src2, dest) { +var x1 = Math.max (src1.getMinX (), src2.getMinX ()); +var y1 = Math.max (src1.getMinY (), src2.getMinY ()); +var x2 = Math.min (src1.getMaxX (), src2.getMaxX ()); +var y2 = Math.min (src1.getMaxY (), src2.getMaxY ()); +dest.setFrame (x1, y1, x2 - x1, y2 - y1); +}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D"); +c$.union = Clazz_defineMethod (c$, "union", +function (src1, src2, dest) { +var x1 = Math.min (src1.getMinX (), src2.getMinX ()); +var y1 = Math.min (src1.getMinY (), src2.getMinY ()); +var x2 = Math.max (src1.getMaxX (), src2.getMaxX ()); +var y2 = Math.max (src1.getMaxY (), src2.getMaxY ()); +dest.setFrameFromDiagonal (x1, y1, x2, y2); +}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "add", +function (newx, newy) { +var x1 = Math.min (this.getMinX (), newx); +var x2 = Math.max (this.getMaxX (), newx); +var y1 = Math.min (this.getMinY (), newy); +var y2 = Math.max (this.getMaxY (), newy); +this.setRect (x1, y1, x2 - x1, y2 - y1); +}, "~N,~N"); +Clazz_defineMethod (c$, "add", +function (pt) { +this.add (pt.getX (), pt.getY ()); +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "add", +function (r) { +var x1 = Math.min (this.getMinX (), r.getMinX ()); +var x2 = Math.max (this.getMaxX (), r.getMaxX ()); +var y1 = Math.min (this.getMinY (), r.getMinY ()); +var y2 = Math.max (this.getMaxY (), r.getMaxY ()); +this.setRect (x1, y1, x2 - x1, y2 - y1); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "getPathIterator", +function (at) { +return new java.awt.geom.RectIterator (this, at); +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "getPathIterator", +function (at, flatness) { +return new java.awt.geom.RectIterator (this, at); +}, "java.awt.geom.AffineTransform,~N"); +Clazz_overrideMethod (c$, "hashCode", +function () { +var bits = java.lang.Double.doubleToLongBits (this.getX ()); +bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37; +bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43; +bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47; +return ((bits) ^ ((bits >> 32))); +}); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (obj === this) { +return true; +}if (Clazz_instanceOf (obj, java.awt.geom.Rectangle2D)) { +var r2d = obj; +return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ())); +}return false; +}, "~O"); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.width = 0; +this.height = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D); +Clazz_makeConstructor (c$, +function (a, b, c, d) { +Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Float, []); +{ +if (arguments.length == 0) +return; +}this.setRect (a, b, c, d); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_defineMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_defineMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz_defineMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz_overrideMethod (c$, "isEmpty", +function () { +return (this.width <= 0.0) || (this.height <= 0.0); +}); +Clazz_defineMethod (c$, "setRect", +function (a, b, c, d) { +this.x = a; +this.y = b; +this.width = c; +this.height = d; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setRect", +function (a, b, c, d) { +this.x = a; +this.y = b; +this.width = c; +this.height = d; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setRect", +function (a) { +this.x = a.getX (); +this.y = a.getY (); +this.width = a.getWidth (); +this.height = a.getHeight (); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "outcode", +function (a, b) { +var c = 0; +if (this.width <= 0) { +c |= 5; +} else if (a < this.x) { +c |= 1; +} else if (a > this.x + this.width) { +c |= 4; +}if (this.height <= 0) { +c |= 10; +} else if (b < this.y) { +c |= 2; +} else if (b > this.y + this.height) { +c |= 8; +}return c; +}, "~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +return new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height); +}); +Clazz_overrideMethod (c$, "createIntersection", +function (a) { +var b; +if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) { +b = new java.awt.geom.Rectangle2D.Float (); +} else { +b = new java.awt.geom.Rectangle2D.Double (); +}java.awt.geom.Rectangle2D.intersect (this, a, b); +return b; +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "createUnion", +function (a) { +var b; +if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) { +b = new java.awt.geom.Rectangle2D.Float (); +} else { +b = new java.awt.geom.Rectangle2D.Double (); +}java.awt.geom.Rectangle2D.union (this, a, b); +return b; +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]"; +}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.width = 0; +this.height = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []); +}); +Clazz_makeConstructor (c$, +function (a, b, c, d) { +Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []); +this.setRect (a, b, c, d); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_defineMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_defineMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz_defineMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz_overrideMethod (c$, "isEmpty", +function () { +return (this.width <= 0.0) || (this.height <= 0.0); +}); +Clazz_defineMethod (c$, "setRect", +function (a, b, c, d) { +this.x = a; +this.y = b; +this.width = c; +this.height = d; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setRect", +function (a) { +this.x = a.getX (); +this.y = a.getY (); +this.width = a.getWidth (); +this.height = a.getHeight (); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "outcode", +function (a, b) { +var c = 0; +if (this.width <= 0) { +c |= 5; +} else if (a < this.x) { +c |= 1; +} else if (a > this.x + this.width) { +c |= 4; +}if (this.height <= 0) { +c |= 10; +} else if (b < this.y) { +c |= 2; +} else if (b > this.y + this.height) { +c |= 8; +}return c; +}, "~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +return new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height); +}); +Clazz_overrideMethod (c$, "createIntersection", +function (a) { +var b = new java.awt.geom.Rectangle2D.Double (); +java.awt.geom.Rectangle2D.intersect (this, a, b); +return b; +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "createUnion", +function (a) { +var b = new java.awt.geom.Rectangle2D.Double (); +java.awt.geom.Rectangle2D.union (this, a, b); +return b; +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]"; +}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"OUT_LEFT", 1, +"OUT_TOP", 2, +"OUT_RIGHT", 4, +"OUT_BOTTOM", 8); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.Shape"], "java.awt.geom.RectangularShape", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator"], function () { +c$ = Clazz_declareType (java.awt.geom, "RectangularShape", null, [java.awt.Shape, Cloneable]); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "getMinX", +function () { +return this.getX (); +}); +Clazz_defineMethod (c$, "getMinY", +function () { +return this.getY (); +}); +Clazz_defineMethod (c$, "getMaxX", +function () { +return this.getX () + this.getWidth (); +}); +Clazz_defineMethod (c$, "getMaxY", +function () { +return this.getY () + this.getHeight (); +}); +Clazz_defineMethod (c$, "getCenterX", +function () { +return this.getX () + this.getWidth () / 2.0; +}); +Clazz_defineMethod (c$, "getCenterY", +function () { +return this.getY () + this.getHeight () / 2.0; +}); +Clazz_defineMethod (c$, "getFrame", +function () { +return new java.awt.geom.Rectangle2D.Double (this.getX (), this.getY (), this.getWidth (), this.getHeight ()); +}); +Clazz_defineMethod (c$, "setFrame", +function (loc, size) { +this.setFrame (loc.getX (), loc.getY (), size.getWidth (), size.getHeight ()); +}, "java.awt.geom.Point2D,java.awt.geom.Dimension2D"); +Clazz_defineMethod (c$, "setFrame", +function (r) { +this.setFrame (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "setFrameFromDiagonal", +function (x1, y1, x2, y2) { +if (x2 < x1) { +var t = x1; +x1 = x2; +x2 = t; +}if (y2 < y1) { +var t = y1; +y1 = y2; +y2 = t; +}this.setFrame (x1, y1, x2 - x1, y2 - y1); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setFrameFromDiagonal", +function (p1, p2) { +this.setFrameFromDiagonal (p1.getX (), p1.getY (), p2.getX (), p2.getY ()); +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "setFrameFromCenter", +function (centerX, centerY, cornerX, cornerY) { +var halfW = Math.abs (cornerX - centerX); +var halfH = Math.abs (cornerY - centerY); +this.setFrame (centerX - halfW, centerY - halfH, halfW * 2.0, halfH * 2.0); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setFrameFromCenter", +function (center, corner) { +this.setFrameFromCenter (center.getX (), center.getY (), corner.getX (), corner.getY ()); +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "contains", +function (p) { +return this.contains (p.getX (), p.getY ()); +}, "java.awt.geom.Point2D"); +Clazz_overrideMethod (c$, "intersects", +function (r) { +return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "contains", +function (r) { +return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "getBounds", +function () { +var width = this.getWidth (); +var height = this.getHeight (); +if (width < 0 || height < 0) { +return new java.awt.Rectangle (); +}var x = this.getX (); +var y = this.getY (); +var x1 = Math.floor (x); +var y1 = Math.floor (y); +var x2 = Math.ceil (x + width); +var y2 = Math.ceil (y + height); +return new java.awt.Rectangle (Clazz_doubleToInt (x1), Clazz_doubleToInt (y1), Clazz_doubleToInt (x2 - x1), Clazz_doubleToInt (y2 - y1)); +}); +Clazz_overrideMethod (c$, "getPathIterator", +function (at, flatness) { +return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); +}, "java.awt.geom.AffineTransform,~N"); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.geom.RectangularShape, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.FlatteningPathIterator", ["java.lang.IllegalArgumentException", "java.util.NoSuchElementException", "java.awt.geom.CubicCurve2D", "$.QuadCurve2D"], function () { +c$ = Clazz_decorateAsClass (function () { +this.src = null; +this.squareflat = 0; +this.limit = 0; +this.hold = null; +this.curx = 0; +this.cury = 0; +this.movx = 0; +this.movy = 0; +this.holdType = 0; +this.holdEnd = 0; +this.holdIndex = 0; +this.levels = null; +this.levelIndex = 0; +this.done = false; +Clazz_instantialize (this, arguments); +}, java.awt.geom, "FlatteningPathIterator", null, java.awt.geom.PathIterator); +Clazz_prepareFields (c$, function () { +this.hold = Clazz_newDoubleArray (14, 0); +}); +Clazz_makeConstructor (c$, +function (src, flatness) { +this.construct (src, flatness, 10); +}, "java.awt.geom.PathIterator,~N"); +Clazz_makeConstructor (c$, +function (src, flatness, limit) { +if (flatness < 0.0) { +throw new IllegalArgumentException ("flatness must be >= 0"); +}if (limit < 0) { +throw new IllegalArgumentException ("limit must be >= 0"); +}this.src = src; +this.squareflat = flatness * flatness; +this.limit = limit; +this.levels = Clazz_newIntArray (limit + 1, 0); +this.next (false); +}, "java.awt.geom.PathIterator,~N,~N"); +Clazz_defineMethod (c$, "getFlatness", +function () { +return Math.sqrt (this.squareflat); +}); +Clazz_defineMethod (c$, "getRecursionLimit", +function () { +return this.limit; +}); +Clazz_defineMethod (c$, "getWindingRule", +function () { +return this.src.getWindingRule (); +}); +Clazz_defineMethod (c$, "isDone", +function () { +return this.done; +}); +Clazz_defineMethod (c$, "ensureHoldCapacity", +function (want) { +if (this.holdIndex - want < 0) { +var have = this.hold.length - this.holdIndex; +var newsize = this.hold.length + 24; +var newhold = Clazz_newDoubleArray (newsize, 0); +System.arraycopy (this.hold, this.holdIndex, newhold, this.holdIndex + 24, have); +this.hold = newhold; +this.holdIndex += 24; +this.holdEnd += 24; +}}, "~N"); +Clazz_defineMethod (c$, "next", +function () { +this.next (true); +}); +Clazz_defineMethod (c$, "next", + function (doNext) { +var level; +if (this.holdIndex >= this.holdEnd) { +if (doNext) { +this.src.next (); +}if (this.src.isDone ()) { +this.done = true; +return; +}this.holdType = this.src.currentSegment (this.hold); +this.levelIndex = 0; +this.levels[0] = 0; +}switch (this.holdType) { +case 0: +case 1: +this.curx = this.hold[0]; +this.cury = this.hold[1]; +if (this.holdType == 0) { +this.movx = this.curx; +this.movy = this.cury; +}this.holdIndex = 0; +this.holdEnd = 0; +break; +case 4: +this.curx = this.movx; +this.cury = this.movy; +this.holdIndex = 0; +this.holdEnd = 0; +break; +case 2: +if (this.holdIndex >= this.holdEnd) { +this.holdIndex = this.hold.length - 6; +this.holdEnd = this.hold.length - 2; +this.hold[this.holdIndex + 0] = this.curx; +this.hold[this.holdIndex + 1] = this.cury; +this.hold[this.holdIndex + 2] = this.hold[0]; +this.hold[this.holdIndex + 3] = this.hold[1]; +this.hold[this.holdIndex + 4] = this.curx = this.hold[2]; +this.hold[this.holdIndex + 5] = this.cury = this.hold[3]; +}level = this.levels[this.levelIndex]; +while (level < this.limit) { +if (java.awt.geom.QuadCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) { +break; +}this.ensureHoldCapacity (4); +java.awt.geom.QuadCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 4, this.hold, this.holdIndex); +this.holdIndex -= 4; +level++; +this.levels[this.levelIndex] = level; +this.levelIndex++; +this.levels[this.levelIndex] = level; +} +this.holdIndex += 4; +this.levelIndex--; +break; +case 3: +if (this.holdIndex >= this.holdEnd) { +this.holdIndex = this.hold.length - 8; +this.holdEnd = this.hold.length - 2; +this.hold[this.holdIndex + 0] = this.curx; +this.hold[this.holdIndex + 1] = this.cury; +this.hold[this.holdIndex + 2] = this.hold[0]; +this.hold[this.holdIndex + 3] = this.hold[1]; +this.hold[this.holdIndex + 4] = this.hold[2]; +this.hold[this.holdIndex + 5] = this.hold[3]; +this.hold[this.holdIndex + 6] = this.curx = this.hold[4]; +this.hold[this.holdIndex + 7] = this.cury = this.hold[5]; +}level = this.levels[this.levelIndex]; +while (level < this.limit) { +if (java.awt.geom.CubicCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) { +break; +}this.ensureHoldCapacity (6); +java.awt.geom.CubicCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 6, this.hold, this.holdIndex); +this.holdIndex -= 6; +level++; +this.levels[this.levelIndex] = level; +this.levelIndex++; +this.levels[this.levelIndex] = level; +} +this.holdIndex += 6; +this.levelIndex--; +break; +} +}, "~B"); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("flattening iterator out of bounds"); +}var type = this.holdType; +if (type != 4) { +coords[0] = this.hold[this.holdIndex + 0]; +coords[1] = this.hold[this.holdIndex + 1]; +if (type != 0) { +type = 1; +}}return type; +}, "~A"); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("flattening iterator out of bounds"); +}var type = this.holdType; +if (type != 4) { +coords[0] = this.hold[this.holdIndex + 0]; +coords[1] = this.hold[this.holdIndex + 1]; +if (type != 0) { +type = 1; +}}return type; +}, "~A"); +Clazz_defineStatics (c$, +"GROW_SIZE", 24); +}); +Clazz_declarePackage ("java.awt.geom"); +c$ = Clazz_declareInterface (java.awt.geom, "PathIterator"); +Clazz_defineStatics (c$, +"WIND_EVEN_ODD", 0, +"WIND_NON_ZERO", 1, +"SEG_MOVETO", 0, +"SEG_LINETO", 1, +"SEG_QUADTO", 2, +"SEG_CUBICTO", 3, +"SEG_CLOSE", 4); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.Shape"], "java.awt.geom.CubicCurve2D", ["java.lang.InternalError", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadCurve2D", "$.Rectangle2D", "jssun.awt.geom.Curve", "swingjs.api.Interface"], function () { +c$ = Clazz_declareType (java.awt.geom, "CubicCurve2D", null, [java.awt.Shape, Cloneable]); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "setCurve", +function (coords, offset) { +this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]); +}, "~A,~N"); +Clazz_defineMethod (c$, "setCurve", +function (p1, cp1, cp2, p2) { +this.setCurve (p1.getX (), p1.getY (), cp1.getX (), cp1.getY (), cp2.getX (), cp2.getY (), p2.getX (), p2.getY ()); +}, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "setCurve", +function (pts, offset) { +this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY (), pts[offset + 3].getX (), pts[offset + 3].getY ()); +}, "~A,~N"); +Clazz_defineMethod (c$, "setCurve", +function (c) { +this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX1 (), c.getCtrlY1 (), c.getCtrlX2 (), c.getCtrlY2 (), c.getX2 (), c.getY2 ()); +}, "java.awt.geom.CubicCurve2D"); +c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", +function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) { +return Math.max (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx1, ctrly1), java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx2, ctrly2)); +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", +function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) { +return Math.sqrt (java.awt.geom.CubicCurve2D.getFlatnessSq (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2)); +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", +function (coords, offset) { +return java.awt.geom.CubicCurve2D.getFlatnessSq (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]); +}, "~A,~N"); +c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", +function (coords, offset) { +return java.awt.geom.CubicCurve2D.getFlatness (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]); +}, "~A,~N"); +Clazz_defineMethod (c$, "getFlatnessSq", +function () { +return java.awt.geom.CubicCurve2D.getFlatnessSq (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ()); +}); +Clazz_defineMethod (c$, "getFlatness", +function () { +return java.awt.geom.CubicCurve2D.getFlatness (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ()); +}); +Clazz_defineMethod (c$, "subdivide", +function (left, right) { +java.awt.geom.CubicCurve2D.subdivide (this, left, right); +}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D"); +c$.subdivide = Clazz_defineMethod (c$, "subdivide", +function (src, left, right) { +var x1 = src.getX1 (); +var y1 = src.getY1 (); +var ctrlx1 = src.getCtrlX1 (); +var ctrly1 = src.getCtrlY1 (); +var ctrlx2 = src.getCtrlX2 (); +var ctrly2 = src.getCtrlY2 (); +var x2 = src.getX2 (); +var y2 = src.getY2 (); +var centerx = (ctrlx1 + ctrlx2) / 2.0; +var centery = (ctrly1 + ctrly2) / 2.0; +ctrlx1 = (x1 + ctrlx1) / 2.0; +ctrly1 = (y1 + ctrly1) / 2.0; +ctrlx2 = (x2 + ctrlx2) / 2.0; +ctrly2 = (y2 + ctrly2) / 2.0; +var ctrlx12 = (ctrlx1 + centerx) / 2.0; +var ctrly12 = (ctrly1 + centery) / 2.0; +var ctrlx21 = (ctrlx2 + centerx) / 2.0; +var ctrly21 = (ctrly2 + centery) / 2.0; +centerx = (ctrlx12 + ctrlx21) / 2.0; +centery = (ctrly12 + ctrly21) / 2.0; +if (left != null) { +left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx12, ctrly12, centerx, centery); +}if (right != null) { +right.setCurve (centerx, centery, ctrlx21, ctrly21, ctrlx2, ctrly2, x2, y2); +}}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D"); +c$.subdivide = Clazz_defineMethod (c$, "subdivide", +function (src, srcoff, left, leftoff, right, rightoff) { +var x1 = src[srcoff + 0]; +var y1 = src[srcoff + 1]; +var ctrlx1 = src[srcoff + 2]; +var ctrly1 = src[srcoff + 3]; +var ctrlx2 = src[srcoff + 4]; +var ctrly2 = src[srcoff + 5]; +var x2 = src[srcoff + 6]; +var y2 = src[srcoff + 7]; +if (left != null) { +left[leftoff + 0] = x1; +left[leftoff + 1] = y1; +}if (right != null) { +right[rightoff + 6] = x2; +right[rightoff + 7] = y2; +}x1 = (x1 + ctrlx1) / 2.0; +y1 = (y1 + ctrly1) / 2.0; +x2 = (x2 + ctrlx2) / 2.0; +y2 = (y2 + ctrly2) / 2.0; +var centerx = (ctrlx1 + ctrlx2) / 2.0; +var centery = (ctrly1 + ctrly2) / 2.0; +ctrlx1 = (x1 + centerx) / 2.0; +ctrly1 = (y1 + centery) / 2.0; +ctrlx2 = (x2 + centerx) / 2.0; +ctrly2 = (y2 + centery) / 2.0; +centerx = (ctrlx1 + ctrlx2) / 2.0; +centery = (ctrly1 + ctrly2) / 2.0; +if (left != null) { +left[leftoff + 2] = x1; +left[leftoff + 3] = y1; +left[leftoff + 4] = ctrlx1; +left[leftoff + 5] = ctrly1; +left[leftoff + 6] = centerx; +left[leftoff + 7] = centery; +}if (right != null) { +right[rightoff + 0] = centerx; +right[rightoff + 1] = centery; +right[rightoff + 2] = ctrlx2; +right[rightoff + 3] = ctrly2; +right[rightoff + 4] = x2; +right[rightoff + 5] = y2; +}}, "~A,~N,~A,~N,~A,~N"); +c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", +function (eqn) { +return java.awt.geom.CubicCurve2D.solveCubic (eqn, eqn); +}, "~A"); +c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", +function (eqn, res) { +var d = eqn[3]; +if (d == 0.0) { +return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res); +}var a = eqn[2] / d; +var b = eqn[1] / d; +var c = eqn[0] / d; +var roots = 0; +var Q = (a * a - 3.0 * b) / 9.0; +var R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0; +var R2 = R * R; +var Q3 = Q * Q * Q; +a = a / 3.0; +if (R2 < Q3) { +var theta = Math.acos (R / Math.sqrt (Q3)); +Q = -2.0 * Math.sqrt (Q); +if (res === eqn) { +eqn = Clazz_newDoubleArray (4, 0); +System.arraycopy (res, 0, eqn, 0, 4); +}res[roots++] = Q * Math.cos (theta / 3.0) - a; +res[roots++] = Q * Math.cos ((theta + 6.283185307179586) / 3.0) - a; +res[roots++] = Q * Math.cos ((theta - 6.283185307179586) / 3.0) - a; +java.awt.geom.CubicCurve2D.fixRoots (res, eqn); +} else { +var neg = (R < 0.0); +var S = Math.sqrt (R2 - Q3); +if (neg) { +R = -R; +}var A = Math.pow (R + S, 0.3333333333333333); +if (!neg) { +A = -A; +}var B = (A == 0.0) ? 0.0 : (Q / A); +res[roots++] = (A + B) - a; +}return roots; +}, "~A,~A"); +c$.fixRoots = Clazz_defineMethod (c$, "fixRoots", + function (res, eqn) { +var EPSILON = 1E-5; +for (var i = 0; i < 3; i++) { +var t = res[i]; +if (Math.abs (t) < 1.0E-5) { +res[i] = java.awt.geom.CubicCurve2D.findZero (t, 0, eqn); +} else if (Math.abs (t - 1) < 1.0E-5) { +res[i] = java.awt.geom.CubicCurve2D.findZero (t, 1, eqn); +}} +}, "~A,~A"); +c$.solveEqn = Clazz_defineMethod (c$, "solveEqn", + function (eqn, order, t) { +var v = eqn[order]; +while (--order >= 0) { +v = v * t + eqn[order]; +} +return v; +}, "~A,~N,~N"); +c$.findZero = Clazz_defineMethod (c$, "findZero", + function (t, target, eqn) { +var slopeqn = Clazz_newDoubleArray (-1, [eqn[1], 2 * eqn[2], 3 * eqn[3]]); +var slope; +var origdelta = 0; +var origt = t; +while (true) { +slope = java.awt.geom.CubicCurve2D.solveEqn (slopeqn, 2, t); +if (slope == 0) { +return t; +}var y = java.awt.geom.CubicCurve2D.solveEqn (eqn, 3, t); +if (y == 0) { +return t; +}var delta = -(y / slope); +if (origdelta == 0) { +origdelta = delta; +}if (t < target) { +if (delta < 0) return t; +} else if (t > target) { +if (delta > 0) return t; +} else { +return (delta > 0 ? (target + 4.9E-324) : (target - 4.9E-324)); +}var newt = t + delta; +if (t == newt) { +return t; +}if (delta * origdelta < 0) { +var tag = (origt < t ? java.awt.geom.CubicCurve2D.getTag (target, origt, t) : java.awt.geom.CubicCurve2D.getTag (target, t, origt)); +if (tag != 0) { +return (origt + t) / 2; +}t = target; +} else { +t = newt; +}} +}, "~N,~N,~A"); +Clazz_defineMethod (c$, "contains", +function (x, y) { +if (!(x * 0.0 + y * 0.0 == 0.0)) { +return false; +}var x1 = this.getX1 (); +var y1 = this.getY1 (); +var x2 = this.getX2 (); +var y2 = this.getY2 (); +var crossings = (jssun.awt.geom.Curve.pointCrossingsForLine (x, y, x1, y1, x2, y2) + jssun.awt.geom.Curve.pointCrossingsForCubic (x, y, x1, y1, this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), x2, y2, 0)); +return ((crossings & 1) == 1); +}, "~N,~N"); +Clazz_defineMethod (c$, "contains", +function (p) { +return this.contains (p.getX (), p.getY ()); +}, "java.awt.geom.Point2D"); +c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", + function (eqn, val, c1, cp1, cp2, c2) { +eqn[0] = c1 - val; +eqn[1] = (cp1 - c1) * 3.0; +eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0; +eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1; +return; +}, "~A,~N,~N,~N,~N,~N"); +c$.evalCubic = Clazz_defineMethod (c$, "evalCubic", + function (vals, num, include0, include1, inflect, c1, cp1, cp2, c2) { +var j = 0; +for (var i = 0; i < num; i++) { +var t = vals[i]; +if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + (2 * inflect[2] + 3 * inflect[3] * t) * t != 0)) { +var u = 1 - t; +vals[j++] = c1 * u * u * u + 3 * cp1 * t * u * u + 3 * cp2 * t * t * u + c2 * t * t * t; +}} +return j; +}, "~A,~N,~B,~B,~A,~N,~N,~N,~N"); +c$.getTag = Clazz_defineMethod (c$, "getTag", + function (coord, low, high) { +if (coord <= low) { +return (coord < low ? -2 : -1); +}if (coord >= high) { +return (coord > high ? 2 : 1); +}return 0; +}, "~N,~N,~N"); +c$.inwards = Clazz_defineMethod (c$, "inwards", + function (pttag, opt1tag, opt2tag) { +switch (pttag) { +case -2: +case 2: +default: +return false; +case -1: +return (opt1tag >= 0 || opt2tag >= 0); +case 0: +return true; +case 1: +return (opt1tag <= 0 || opt2tag <= 0); +} +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (x, y, w, h) { +if (w <= 0 || h <= 0) { +return false; +}var x1 = this.getX1 (); +var y1 = this.getY1 (); +var x1tag = java.awt.geom.CubicCurve2D.getTag (x1, x, x + w); +var y1tag = java.awt.geom.CubicCurve2D.getTag (y1, y, y + h); +if (x1tag == 0 && y1tag == 0) { +return true; +}var x2 = this.getX2 (); +var y2 = this.getY2 (); +var x2tag = java.awt.geom.CubicCurve2D.getTag (x2, x, x + w); +var y2tag = java.awt.geom.CubicCurve2D.getTag (y2, y, y + h); +if (x2tag == 0 && y2tag == 0) { +return true; +}var ctrlx1 = this.getCtrlX1 (); +var ctrly1 = this.getCtrlY1 (); +var ctrlx2 = this.getCtrlX2 (); +var ctrly2 = this.getCtrlY2 (); +var ctrlx1tag = java.awt.geom.CubicCurve2D.getTag (ctrlx1, x, x + w); +var ctrly1tag = java.awt.geom.CubicCurve2D.getTag (ctrly1, y, y + h); +var ctrlx2tag = java.awt.geom.CubicCurve2D.getTag (ctrlx2, x, x + w); +var ctrly2tag = java.awt.geom.CubicCurve2D.getTag (ctrly2, y, y + h); +if (x1tag < 0 && x2tag < 0 && ctrlx1tag < 0 && ctrlx2tag < 0) { +return false; +}if (y1tag < 0 && y2tag < 0 && ctrly1tag < 0 && ctrly2tag < 0) { +return false; +}if (x1tag > 0 && x2tag > 0 && ctrlx1tag > 0 && ctrlx2tag > 0) { +return false; +}if (y1tag > 0 && y2tag > 0 && ctrly1tag > 0 && ctrly2tag > 0) { +return false; +}if (java.awt.geom.CubicCurve2D.inwards (x1tag, x2tag, ctrlx1tag) && java.awt.geom.CubicCurve2D.inwards (y1tag, y2tag, ctrly1tag)) { +return true; +}if (java.awt.geom.CubicCurve2D.inwards (x2tag, x1tag, ctrlx2tag) && java.awt.geom.CubicCurve2D.inwards (y2tag, y1tag, ctrly2tag)) { +return true; +}var xoverlap = (x1tag * x2tag <= 0); +var yoverlap = (y1tag * y2tag <= 0); +if (x1tag == 0 && x2tag == 0 && yoverlap) { +return true; +}if (y1tag == 0 && y2tag == 0 && xoverlap) { +return true; +}var eqn = Clazz_newDoubleArray (4, 0); +var res = Clazz_newDoubleArray (4, 0); +if (!yoverlap) { +java.awt.geom.CubicCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly1, ctrly2, y2); +var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res); +num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, x1, ctrlx1, ctrlx2, x2); +return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], x, x + w) * java.awt.geom.CubicCurve2D.getTag (res[1], x, x + w) <= 0); +}if (!xoverlap) { +java.awt.geom.CubicCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2); +var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res); +num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2); +return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], y, y + h) * java.awt.geom.CubicCurve2D.getTag (res[1], y, y + h) <= 0); +}var dx = x2 - x1; +var dy = y2 - y1; +var k = y2 * x1 - x2 * y1; +var c1tag; +var c2tag; +if (y1tag == 0) { +c1tag = x1tag; +} else { +c1tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w); +}if (y2tag == 0) { +c2tag = x2tag; +} else { +c2tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w); +}if (c1tag * c2tag <= 0) { +return true; +}c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); +java.awt.geom.CubicCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2); +var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res); +num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2); +var tags = Clazz_newIntArray (num + 1, 0); +for (var i = 0; i < num; i++) { +tags[i] = java.awt.geom.CubicCurve2D.getTag (res[i], y, y + h); +} +tags[num] = c1tag; +java.util.Arrays.sort (tags); +return ((num >= 1 && tags[0] * tags[1] <= 0) || (num >= 3 && tags[2] * tags[3] <= 0)); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (r) { +return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "contains", +function (x, y, w, h) { +if (w <= 0 || h <= 0) { +return false; +}if (!(this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h))) { +return false; +}var rect = new java.awt.geom.Rectangle2D.Double (x, y, w, h); +return !rect.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "contains", +function (r) { +return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "getBounds", +function () { +return this.getBounds2D ().getBounds (); +}); +Clazz_defineMethod (c$, "getPathIterator", +function (at) { +return (swingjs.api.Interface.getInstance ("java.awt.geom.CubicInterator", false)).set (this, at); +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "getPathIterator", +function (at, flatness) { +return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); +}, "java.awt.geom.AffineTransform,~N"); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.geom.CubicCurve2D, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x1 = 0; +this.y1 = 0; +this.ctrlx1 = 0; +this.ctrly1 = 0; +this.ctrlx2 = 0; +this.ctrly2 = 0; +this.x2 = 0; +this.y2 = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.CubicCurve2D, "Float", java.awt.geom.CubicCurve2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []); +}); +Clazz_makeConstructor (c$, +function (a, b, c, d, e, f, g, h) { +Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []); +this.setCurve (a, b, c, d, e, f, g, h); +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getX1", +function () { +return this.x1; +}); +Clazz_overrideMethod (c$, "getY1", +function () { +return this.y1; +}); +Clazz_overrideMethod (c$, "getP1", +function () { +return new java.awt.geom.Point2D.Float (this.x1, this.y1); +}); +Clazz_overrideMethod (c$, "getCtrlX1", +function () { +return this.ctrlx1; +}); +Clazz_overrideMethod (c$, "getCtrlY1", +function () { +return this.ctrly1; +}); +Clazz_overrideMethod (c$, "getCtrlP1", +function () { +return new java.awt.geom.Point2D.Float (this.ctrlx1, this.ctrly1); +}); +Clazz_overrideMethod (c$, "getCtrlX2", +function () { +return this.ctrlx2; +}); +Clazz_overrideMethod (c$, "getCtrlY2", +function () { +return this.ctrly2; +}); +Clazz_overrideMethod (c$, "getCtrlP2", +function () { +return new java.awt.geom.Point2D.Float (this.ctrlx2, this.ctrly2); +}); +Clazz_overrideMethod (c$, "getX2", +function () { +return this.x2; +}); +Clazz_overrideMethod (c$, "getY2", +function () { +return this.y2; +}); +Clazz_overrideMethod (c$, "getP2", +function () { +return new java.awt.geom.Point2D.Float (this.x2, this.y2); +}); +Clazz_defineMethod (c$, "setCurve", +function (a, b, c, d, e, f, g, h) { +this.x1 = a; +this.y1 = b; +this.ctrlx1 = c; +this.ctrly1 = d; +this.ctrlx2 = e; +this.ctrly2 = f; +this.x2 = g; +this.y2 = h; +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setCurve", +function (a, b, c, d, e, f, g, h) { +this.x1 = a; +this.y1 = b; +this.ctrlx1 = c; +this.ctrly1 = d; +this.ctrlx2 = e; +this.ctrly2 = f; +this.x2 = g; +this.y2 = h; +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2)); +var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2)); +var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2)); +var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2)); +return new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b); +}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x1 = 0; +this.y1 = 0; +this.ctrlx1 = 0; +this.ctrly1 = 0; +this.ctrlx2 = 0; +this.ctrly2 = 0; +this.x2 = 0; +this.y2 = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.CubicCurve2D, "Double", java.awt.geom.CubicCurve2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []); +}); +Clazz_makeConstructor (c$, +function (a, b, c, d, e, f, g, h) { +Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []); +this.setCurve (a, b, c, d, e, f, g, h); +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getX1", +function () { +return this.x1; +}); +Clazz_overrideMethod (c$, "getY1", +function () { +return this.y1; +}); +Clazz_overrideMethod (c$, "getP1", +function () { +return new java.awt.geom.Point2D.Double (this.x1, this.y1); +}); +Clazz_overrideMethod (c$, "getCtrlX1", +function () { +return this.ctrlx1; +}); +Clazz_overrideMethod (c$, "getCtrlY1", +function () { +return this.ctrly1; +}); +Clazz_overrideMethod (c$, "getCtrlP1", +function () { +return new java.awt.geom.Point2D.Double (this.ctrlx1, this.ctrly1); +}); +Clazz_overrideMethod (c$, "getCtrlX2", +function () { +return this.ctrlx2; +}); +Clazz_overrideMethod (c$, "getCtrlY2", +function () { +return this.ctrly2; +}); +Clazz_overrideMethod (c$, "getCtrlP2", +function () { +return new java.awt.geom.Point2D.Double (this.ctrlx2, this.ctrly2); +}); +Clazz_overrideMethod (c$, "getX2", +function () { +return this.x2; +}); +Clazz_overrideMethod (c$, "getY2", +function () { +return this.y2; +}); +Clazz_overrideMethod (c$, "getP2", +function () { +return new java.awt.geom.Point2D.Double (this.x2, this.y2); +}); +Clazz_defineMethod (c$, "setCurve", +function (a, b, c, d, e, f, g, h) { +this.x1 = a; +this.y1 = b; +this.ctrlx1 = c; +this.ctrly1 = d; +this.ctrlx2 = e; +this.ctrly2 = f; +this.x2 = g; +this.y2 = h; +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2)); +var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2)); +var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2)); +var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2)); +return new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b); +}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"BELOW", -2, +"LOWEDGE", -1, +"INSIDE", 0, +"HIGHEDGE", 1, +"ABOVE", 2); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.cubic = null; +this.affine = null; +this.index = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_makeConstructor (c$, +function (q, at) { +this.set (q, at); +}, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "set", +function (q, at) { +this.cubic = q; +this.affine = at; +return this; +}, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getWindingRule", +function () { +return 1; +}); +Clazz_overrideMethod (c$, "isDone", +function () { +return (this.index > 1); +}); +Clazz_overrideMethod (c$, "next", +function () { +this.index++; +}); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("cubic iterator iterator out of bounds"); +}var type; +if (this.index == 0) { +coords[0] = this.cubic.getX1 (); +coords[1] = this.cubic.getY1 (); +type = 0; +} else { +coords[0] = this.cubic.getCtrlX1 (); +coords[1] = this.cubic.getCtrlY1 (); +coords[2] = this.cubic.getCtrlX2 (); +coords[3] = this.cubic.getCtrlY2 (); +coords[4] = this.cubic.getX2 (); +coords[5] = this.cubic.getY2 (); +type = 3; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3); +}return type; +}, "~A"); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("cubic iterator iterator out of bounds"); +}var type; +if (this.index == 0) { +coords[0] = this.cubic.getX1 (); +coords[1] = this.cubic.getY1 (); +type = 0; +} else { +coords[0] = this.cubic.getCtrlX1 (); +coords[1] = this.cubic.getCtrlY1 (); +coords[2] = this.cubic.getCtrlX2 (); +coords[3] = this.cubic.getCtrlY2 (); +coords[4] = this.cubic.getX2 (); +coords[5] = this.cubic.getY2 (); +type = 3; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3); +}return type; +}, "~A"); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.Shape"], "java.awt.geom.Line2D", ["java.lang.InternalError", "java.awt.geom.LineIterator", "$.Point2D", "$.Rectangle2D"], function () { +c$ = Clazz_declareType (java.awt.geom, "Line2D", null, [java.awt.Shape, Cloneable]); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "setLine", +function (p1, p2) { +this.setLine (p1.getX (), p1.getY (), p2.getX (), p2.getY ()); +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "setLine", +function (l) { +this.setLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ()); +}, "java.awt.geom.Line2D"); +c$.relativeCCW = Clazz_defineMethod (c$, "relativeCCW", +function (x1, y1, x2, y2, px, py) { +x2 -= x1; +y2 -= y1; +px -= x1; +py -= y1; +var ccw = px * y2 - py * x2; +if (ccw == 0.0) { +ccw = px * x2 + py * y2; +if (ccw > 0.0) { +px -= x2; +py -= y2; +ccw = px * x2 + py * y2; +if (ccw < 0.0) { +ccw = 0.0; +}}}return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "relativeCCW", +function (px, py) { +return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); +}, "~N,~N"); +Clazz_defineMethod (c$, "relativeCCW", +function (p) { +return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), p.getX (), p.getY ()); +}, "java.awt.geom.Point2D"); +c$.linesIntersect = Clazz_defineMethod (c$, "linesIntersect", +function (x1, y1, x2, y2, x3, y3, x4, y4) { +return ((java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x3, y3) * java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x4, y4) <= 0) && (java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x1, y1) * java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x2, y2) <= 0)); +}, "~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "intersectsLine", +function (x1, y1, x2, y2) { +return java.awt.geom.Line2D.linesIntersect (x1, y1, x2, y2, this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "intersectsLine", +function (l) { +return java.awt.geom.Line2D.linesIntersect (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 (), this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); +}, "java.awt.geom.Line2D"); +c$.ptSegDistSq = Clazz_defineMethod (c$, "ptSegDistSq", +function (x1, y1, x2, y2, px, py) { +x2 -= x1; +y2 -= y1; +px -= x1; +py -= y1; +var dotprod = px * x2 + py * y2; +var projlenSq; +if (dotprod <= 0.0) { +projlenSq = 0.0; +} else { +px = x2 - px; +py = y2 - py; +dotprod = px * x2 + py * y2; +if (dotprod <= 0.0) { +projlenSq = 0.0; +} else { +projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2); +}}var lenSq = px * px + py * py - projlenSq; +if (lenSq < 0) { +lenSq = 0; +}return lenSq; +}, "~N,~N,~N,~N,~N,~N"); +c$.ptSegDist = Clazz_defineMethod (c$, "ptSegDist", +function (x1, y1, x2, y2, px, py) { +return Math.sqrt (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, px, py)); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "ptSegDistSq", +function (px, py) { +return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); +}, "~N,~N"); +Clazz_defineMethod (c$, "ptSegDistSq", +function (pt) { +return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "ptSegDist", +function (px, py) { +return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); +}, "~N,~N"); +Clazz_defineMethod (c$, "ptSegDist", +function (pt) { +return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); +}, "java.awt.geom.Point2D"); +c$.ptLineDistSq = Clazz_defineMethod (c$, "ptLineDistSq", +function (x1, y1, x2, y2, px, py) { +x2 -= x1; +y2 -= y1; +px -= x1; +py -= y1; +var dotprod = px * x2 + py * y2; +var projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2); +var lenSq = px * px + py * py - projlenSq; +if (lenSq < 0) { +lenSq = 0; +}return lenSq; +}, "~N,~N,~N,~N,~N,~N"); +c$.ptLineDist = Clazz_defineMethod (c$, "ptLineDist", +function (x1, y1, x2, y2, px, py) { +return Math.sqrt (java.awt.geom.Line2D.ptLineDistSq (x1, y1, x2, y2, px, py)); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "ptLineDistSq", +function (px, py) { +return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); +}, "~N,~N"); +Clazz_defineMethod (c$, "ptLineDistSq", +function (pt) { +return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "ptLineDist", +function (px, py) { +return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); +}, "~N,~N"); +Clazz_defineMethod (c$, "ptLineDist", +function (pt) { +return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "contains", +function (x, y) { +return false; +}, "~N,~N"); +Clazz_defineMethod (c$, "contains", +function (p) { +return false; +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "intersects", +function (x, y, w, h) { +return this.intersects ( new java.awt.geom.Rectangle2D.Double (x, y, w, h)); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (r) { +return r.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "contains", +function (x, y, w, h) { +return false; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "contains", +function (r) { +return false; +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "getBounds", +function () { +return this.getBounds2D ().getBounds (); +}); +Clazz_defineMethod (c$, "getPathIterator", +function (at) { +return new java.awt.geom.LineIterator (this, at); +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "getPathIterator", +function (at, flatness) { +return new java.awt.geom.LineIterator (this, at); +}, "java.awt.geom.AffineTransform,~N"); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.geom.Line2D, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x1 = 0; +this.y1 = 0; +this.x2 = 0; +this.y2 = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Line2D, "Float", java.awt.geom.Line2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []); +}); +Clazz_makeConstructor (c$, +function (a, b, c, d) { +Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []); +this.setLine (a, b, c, d); +}, "~N,~N,~N,~N"); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []); +this.setLine (a, b); +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_overrideMethod (c$, "getX1", +function () { +return this.x1; +}); +Clazz_overrideMethod (c$, "getY1", +function () { +return this.y1; +}); +Clazz_overrideMethod (c$, "getP1", +function () { +return new java.awt.geom.Point2D.Float (this.x1, this.y1); +}); +Clazz_overrideMethod (c$, "getX2", +function () { +return this.x2; +}); +Clazz_overrideMethod (c$, "getY2", +function () { +return this.y2; +}); +Clazz_overrideMethod (c$, "getP2", +function () { +return new java.awt.geom.Point2D.Float (this.x2, this.y2); +}); +Clazz_defineMethod (c$, "setLine", +function (a, b, c, d) { +this.x1 = a; +this.y1 = b; +this.x2 = c; +this.y2 = d; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setLine", +function (a, b, c, d) { +this.x1 = a; +this.y1 = b; +this.x2 = c; +this.y2 = d; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a; +var b; +var c; +var d; +if (this.x1 < this.x2) { +a = this.x1; +c = this.x2 - this.x1; +} else { +a = this.x2; +c = this.x1 - this.x2; +}if (this.y1 < this.y2) { +b = this.y1; +d = this.y2 - this.y1; +} else { +b = this.y2; +d = this.y1 - this.y2; +}return new java.awt.geom.Rectangle2D.Float (a, b, c, d); +}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x1 = 0; +this.y1 = 0; +this.x2 = 0; +this.y2 = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Line2D, "Double", java.awt.geom.Line2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []); +}); +Clazz_makeConstructor (c$, +function (a, b, c, d) { +Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []); +this.setLine (a, b, c, d); +}, "~N,~N,~N,~N"); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []); +this.setLine (a, b); +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_overrideMethod (c$, "getX1", +function () { +return this.x1; +}); +Clazz_overrideMethod (c$, "getY1", +function () { +return this.y1; +}); +Clazz_overrideMethod (c$, "getP1", +function () { +return new java.awt.geom.Point2D.Double (this.x1, this.y1); +}); +Clazz_overrideMethod (c$, "getX2", +function () { +return this.x2; +}); +Clazz_overrideMethod (c$, "getY2", +function () { +return this.y2; +}); +Clazz_overrideMethod (c$, "getP2", +function () { +return new java.awt.geom.Point2D.Double (this.x2, this.y2); +}); +Clazz_defineMethod (c$, "setLine", +function (a, b, c, d) { +this.x1 = a; +this.y1 = b; +this.x2 = c; +this.y2 = d; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a; +var b; +var c; +var d; +if (this.x1 < this.x2) { +a = this.x1; +c = this.x2 - this.x1; +} else { +a = this.x2; +c = this.x1 - this.x2; +}if (this.y1 < this.y2) { +b = this.y1; +d = this.y2 - this.y1; +} else { +b = this.y2; +d = this.y1 - this.y2; +}return new java.awt.geom.Rectangle2D.Double (a, b, c, d); +}); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.line = null; +this.affine = null; +this.index = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator); +Clazz_makeConstructor (c$, +function (l, at) { +this.line = l; +this.affine = at; +}, "java.awt.geom.Line2D,java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getWindingRule", +function () { +return 1; +}); +Clazz_overrideMethod (c$, "isDone", +function () { +return (this.index > 1); +}); +Clazz_overrideMethod (c$, "next", +function () { +this.index++; +}); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("line iterator out of bounds"); +}var type; +if (this.index == 0) { +coords[0] = this.line.getX1 (); +coords[1] = this.line.getY1 (); +type = 0; +} else { +coords[0] = this.line.getX2 (); +coords[1] = this.line.getY2 (); +type = 1; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, 1); +}return type; +}, "~A"); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("line iterator out of bounds"); +}var type; +if (this.index == 0) { +coords[0] = this.line.getX1 (); +coords[1] = this.line.getY1 (); +type = 0; +} else { +coords[0] = this.line.getX2 (); +coords[1] = this.line.getY2 (); +type = 1; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, 1); +}return type; +}, "~A"); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.Shape"], "java.awt.geom.QuadCurve2D", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadIterator", "$.Rectangle2D"], function () { +c$ = Clazz_declareType (java.awt.geom, "QuadCurve2D", null, [java.awt.Shape, Cloneable]); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "setCurve", +function (coords, offset) { +this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5]); +}, "~A,~N"); +Clazz_defineMethod (c$, "setCurve", +function (p1, cp, p2) { +this.setCurve (p1.getX (), p1.getY (), cp.getX (), cp.getY (), p2.getX (), p2.getY ()); +}, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "setCurve", +function (pts, offset) { +this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY ()); +}, "~A,~N"); +Clazz_defineMethod (c$, "setCurve", +function (c) { +this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX (), c.getCtrlY (), c.getX2 (), c.getY2 ()); +}, "java.awt.geom.QuadCurve2D"); +c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", +function (x1, y1, ctrlx, ctrly, x2, y2) { +return java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx, ctrly); +}, "~N,~N,~N,~N,~N,~N"); +c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", +function (x1, y1, ctrlx, ctrly, x2, y2) { +return java.awt.geom.Line2D.ptSegDist (x1, y1, x2, y2, ctrlx, ctrly); +}, "~N,~N,~N,~N,~N,~N"); +c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", +function (coords, offset) { +return java.awt.geom.Line2D.ptSegDistSq (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]); +}, "~A,~N"); +c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", +function (coords, offset) { +return java.awt.geom.Line2D.ptSegDist (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]); +}, "~A,~N"); +Clazz_defineMethod (c$, "getFlatnessSq", +function () { +return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ()); +}); +Clazz_defineMethod (c$, "getFlatness", +function () { +return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ()); +}); +Clazz_defineMethod (c$, "subdivide", +function (left, right) { +java.awt.geom.QuadCurve2D.subdivide (this, left, right); +}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D"); +c$.subdivide = Clazz_defineMethod (c$, "subdivide", +function (src, left, right) { +var x1 = src.getX1 (); +var y1 = src.getY1 (); +var ctrlx = src.getCtrlX (); +var ctrly = src.getCtrlY (); +var x2 = src.getX2 (); +var y2 = src.getY2 (); +var ctrlx1 = (x1 + ctrlx) / 2.0; +var ctrly1 = (y1 + ctrly) / 2.0; +var ctrlx2 = (x2 + ctrlx) / 2.0; +var ctrly2 = (y2 + ctrly) / 2.0; +ctrlx = (ctrlx1 + ctrlx2) / 2.0; +ctrly = (ctrly1 + ctrly2) / 2.0; +if (left != null) { +left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx, ctrly); +}if (right != null) { +right.setCurve (ctrlx, ctrly, ctrlx2, ctrly2, x2, y2); +}}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D"); +c$.subdivide = Clazz_defineMethod (c$, "subdivide", +function (src, srcoff, left, leftoff, right, rightoff) { +var x1 = src[srcoff + 0]; +var y1 = src[srcoff + 1]; +var ctrlx = src[srcoff + 2]; +var ctrly = src[srcoff + 3]; +var x2 = src[srcoff + 4]; +var y2 = src[srcoff + 5]; +if (left != null) { +left[leftoff + 0] = x1; +left[leftoff + 1] = y1; +}if (right != null) { +right[rightoff + 4] = x2; +right[rightoff + 5] = y2; +}x1 = (x1 + ctrlx) / 2.0; +y1 = (y1 + ctrly) / 2.0; +x2 = (x2 + ctrlx) / 2.0; +y2 = (y2 + ctrly) / 2.0; +ctrlx = (x1 + x2) / 2.0; +ctrly = (y1 + y2) / 2.0; +if (left != null) { +left[leftoff + 2] = x1; +left[leftoff + 3] = y1; +left[leftoff + 4] = ctrlx; +left[leftoff + 5] = ctrly; +}if (right != null) { +right[rightoff + 0] = ctrlx; +right[rightoff + 1] = ctrly; +right[rightoff + 2] = x2; +right[rightoff + 3] = y2; +}}, "~A,~N,~A,~N,~A,~N"); +c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", +function (eqn) { +return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, eqn); +}, "~A"); +c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", +function (eqn, res) { +var a = eqn[2]; +var b = eqn[1]; +var c = eqn[0]; +var roots = 0; +if (a == 0.0) { +if (b == 0.0) { +return -1; +}res[roots++] = -c / b; +} else { +var d = b * b - 4.0 * a * c; +if (d < 0.0) { +return 0; +}d = Math.sqrt (d); +if (b < 0.0) { +d = -d; +}var q = (b + d) / -2.0; +res[roots++] = q / a; +if (q != 0.0) { +res[roots++] = c / q; +}}return roots; +}, "~A,~A"); +Clazz_defineMethod (c$, "contains", +function (x, y) { +var x1 = this.getX1 (); +var y1 = this.getY1 (); +var xc = this.getCtrlX (); +var yc = this.getCtrlY (); +var x2 = this.getX2 (); +var y2 = this.getY2 (); +var kx = x1 - 2 * xc + x2; +var ky = y1 - 2 * yc + y2; +var dx = x - x1; +var dy = y - y1; +var dxl = x2 - x1; +var dyl = y2 - y1; +var t0 = (dx * ky - dy * kx) / (dxl * ky - dyl * kx); +if (t0 < 0 || t0 > 1 || t0 != t0) { +return false; +}var xb = kx * t0 * t0 + 2 * (xc - x1) * t0 + x1; +var yb = ky * t0 * t0 + 2 * (yc - y1) * t0 + y1; +var xl = dxl * t0 + x1; +var yl = dyl * t0 + y1; +return (x >= xb && x < xl) || (x >= xl && x < xb) || (y >= yb && y < yl) || (y >= yl && y < yb); +}, "~N,~N"); +Clazz_defineMethod (c$, "contains", +function (p) { +return this.contains (p.getX (), p.getY ()); +}, "java.awt.geom.Point2D"); +c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", + function (eqn, val, c1, cp, c2) { +eqn[0] = c1 - val; +eqn[1] = cp + cp - c1 - c1; +eqn[2] = c1 - cp - cp + c2; +return; +}, "~A,~N,~N,~N,~N"); +c$.evalQuadratic = Clazz_defineMethod (c$, "evalQuadratic", + function (vals, num, include0, include1, inflect, c1, ctrl, c2) { +var j = 0; +for (var i = 0; i < num; i++) { +var t = vals[i]; +if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + 2 * inflect[2] * t != 0)) { +var u = 1 - t; +vals[j++] = c1 * u * u + 2 * ctrl * t * u + c2 * t * t; +}} +return j; +}, "~A,~N,~B,~B,~A,~N,~N,~N"); +c$.getTag = Clazz_defineMethod (c$, "getTag", + function (coord, low, high) { +if (coord <= low) { +return (coord < low ? -2 : -1); +}if (coord >= high) { +return (coord > high ? 2 : 1); +}return 0; +}, "~N,~N,~N"); +c$.inwards = Clazz_defineMethod (c$, "inwards", + function (pttag, opt1tag, opt2tag) { +switch (pttag) { +case -2: +case 2: +default: +return false; +case -1: +return (opt1tag >= 0 || opt2tag >= 0); +case 0: +return true; +case 1: +return (opt1tag <= 0 || opt2tag <= 0); +} +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (x, y, w, h) { +if (w <= 0 || h <= 0) { +return false; +}var x1 = this.getX1 (); +var y1 = this.getY1 (); +var x1tag = java.awt.geom.QuadCurve2D.getTag (x1, x, x + w); +var y1tag = java.awt.geom.QuadCurve2D.getTag (y1, y, y + h); +if (x1tag == 0 && y1tag == 0) { +return true; +}var x2 = this.getX2 (); +var y2 = this.getY2 (); +var x2tag = java.awt.geom.QuadCurve2D.getTag (x2, x, x + w); +var y2tag = java.awt.geom.QuadCurve2D.getTag (y2, y, y + h); +if (x2tag == 0 && y2tag == 0) { +return true; +}var ctrlx = this.getCtrlX (); +var ctrly = this.getCtrlY (); +var ctrlxtag = java.awt.geom.QuadCurve2D.getTag (ctrlx, x, x + w); +var ctrlytag = java.awt.geom.QuadCurve2D.getTag (ctrly, y, y + h); +if (x1tag < 0 && x2tag < 0 && ctrlxtag < 0) { +return false; +}if (y1tag < 0 && y2tag < 0 && ctrlytag < 0) { +return false; +}if (x1tag > 0 && x2tag > 0 && ctrlxtag > 0) { +return false; +}if (y1tag > 0 && y2tag > 0 && ctrlytag > 0) { +return false; +}if (java.awt.geom.QuadCurve2D.inwards (x1tag, x2tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y1tag, y2tag, ctrlytag)) { +return true; +}if (java.awt.geom.QuadCurve2D.inwards (x2tag, x1tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y2tag, y1tag, ctrlytag)) { +return true; +}var xoverlap = (x1tag * x2tag <= 0); +var yoverlap = (y1tag * y2tag <= 0); +if (x1tag == 0 && x2tag == 0 && yoverlap) { +return true; +}if (y1tag == 0 && y2tag == 0 && xoverlap) { +return true; +}var eqn = Clazz_newDoubleArray (3, 0); +var res = Clazz_newDoubleArray (3, 0); +if (!yoverlap) { +java.awt.geom.QuadCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly, y2); +return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, x1, ctrlx, x2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], x, x + w) * java.awt.geom.QuadCurve2D.getTag (res[1], x, x + w) <= 0); +}if (!xoverlap) { +java.awt.geom.QuadCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx, x2); +return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, y1, ctrly, y2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h) * java.awt.geom.QuadCurve2D.getTag (res[1], y, y + h) <= 0); +}var dx = x2 - x1; +var dy = y2 - y1; +var k = y2 * x1 - x2 * y1; +var c1tag; +var c2tag; +if (y1tag == 0) { +c1tag = x1tag; +} else { +c1tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w); +}if (y2tag == 0) { +c2tag = x2tag; +} else { +c2tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w); +}if (c1tag * c2tag <= 0) { +return true; +}c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); +java.awt.geom.QuadCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx, x2); +var num = java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res); +java.awt.geom.QuadCurve2D.evalQuadratic (res, num, true, true, null, y1, ctrly, y2); +c2tag = java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h); +return (c1tag * c2tag <= 0); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (r) { +return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "contains", +function (x, y, w, h) { +if (w <= 0 || h <= 0) { +return false; +}return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h)); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "contains", +function (r) { +return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "getBounds", +function () { +return this.getBounds2D ().getBounds (); +}); +Clazz_defineMethod (c$, "getPathIterator", +function (at) { +return new java.awt.geom.QuadIterator (this, at); +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "getPathIterator", +function (at, flatness) { +return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); +}, "java.awt.geom.AffineTransform,~N"); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.geom.QuadCurve2D, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x1 = 0; +this.y1 = 0; +this.ctrlx = 0; +this.ctrly = 0; +this.x2 = 0; +this.y2 = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.QuadCurve2D, "Float", java.awt.geom.QuadCurve2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []); +}); +Clazz_makeConstructor (c$, +function (a, b, c, d, e, f) { +Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []); +this.setCurve (a, b, c, d, e, f); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getX1", +function () { +return this.x1; +}); +Clazz_overrideMethod (c$, "getY1", +function () { +return this.y1; +}); +Clazz_overrideMethod (c$, "getP1", +function () { +return new java.awt.geom.Point2D.Float (this.x1, this.y1); +}); +Clazz_overrideMethod (c$, "getCtrlX", +function () { +return this.ctrlx; +}); +Clazz_overrideMethod (c$, "getCtrlY", +function () { +return this.ctrly; +}); +Clazz_overrideMethod (c$, "getCtrlPt", +function () { +return new java.awt.geom.Point2D.Float (this.ctrlx, this.ctrly); +}); +Clazz_overrideMethod (c$, "getX2", +function () { +return this.x2; +}); +Clazz_overrideMethod (c$, "getY2", +function () { +return this.y2; +}); +Clazz_overrideMethod (c$, "getP2", +function () { +return new java.awt.geom.Point2D.Float (this.x2, this.y2); +}); +Clazz_defineMethod (c$, "setCurve", +function (a, b, c, d, e, f) { +this.x1 = a; +this.y1 = b; +this.ctrlx = c; +this.ctrly = d; +this.x2 = e; +this.y2 = f; +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setCurve", +function (a, b, c, d, e, f) { +this.x1 = a; +this.y1 = b; +this.ctrlx = c; +this.ctrly = d; +this.x2 = e; +this.y2 = f; +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx); +var b = Math.min (Math.min (this.y1, this.y2), this.ctrly); +var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx); +var d = Math.max (Math.max (this.y1, this.y2), this.ctrly); +return new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b); +}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x1 = 0; +this.y1 = 0; +this.ctrlx = 0; +this.ctrly = 0; +this.x2 = 0; +this.y2 = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.QuadCurve2D, "Double", java.awt.geom.QuadCurve2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []); +}); +Clazz_makeConstructor (c$, +function (a, b, c, d, e, f) { +Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []); +this.setCurve (a, b, c, d, e, f); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getX1", +function () { +return this.x1; +}); +Clazz_overrideMethod (c$, "getY1", +function () { +return this.y1; +}); +Clazz_overrideMethod (c$, "getP1", +function () { +return new java.awt.geom.Point2D.Double (this.x1, this.y1); +}); +Clazz_overrideMethod (c$, "getCtrlX", +function () { +return this.ctrlx; +}); +Clazz_overrideMethod (c$, "getCtrlY", +function () { +return this.ctrly; +}); +Clazz_overrideMethod (c$, "getCtrlPt", +function () { +return new java.awt.geom.Point2D.Double (this.ctrlx, this.ctrly); +}); +Clazz_overrideMethod (c$, "getX2", +function () { +return this.x2; +}); +Clazz_overrideMethod (c$, "getY2", +function () { +return this.y2; +}); +Clazz_overrideMethod (c$, "getP2", +function () { +return new java.awt.geom.Point2D.Double (this.x2, this.y2); +}); +Clazz_defineMethod (c$, "setCurve", +function (a, b, c, d, e, f) { +this.x1 = a; +this.y1 = b; +this.ctrlx = c; +this.ctrly = d; +this.x2 = e; +this.y2 = f; +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx); +var b = Math.min (Math.min (this.y1, this.y2), this.ctrly); +var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx); +var d = Math.max (Math.max (this.y1, this.y2), this.ctrly); +return new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b); +}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"BELOW", -2, +"LOWEDGE", -1, +"INSIDE", 0, +"HIGHEDGE", 1, +"ABOVE", 2); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.QuadIterator", ["java.util.NoSuchElementException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.quad = null; +this.affine = null; +this.index = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom, "QuadIterator", null, java.awt.geom.PathIterator); +Clazz_makeConstructor (c$, +function (q, at) { +this.quad = q; +this.affine = at; +}, "java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getWindingRule", +function () { +return 1; +}); +Clazz_overrideMethod (c$, "isDone", +function () { +return (this.index > 1); +}); +Clazz_overrideMethod (c$, "next", +function () { +this.index++; +}); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("quad iterator iterator out of bounds"); +}var type; +if (this.index == 0) { +coords[0] = this.quad.getX1 (); +coords[1] = this.quad.getY1 (); +type = 0; +} else { +coords[0] = this.quad.getCtrlX (); +coords[1] = this.quad.getCtrlY (); +coords[2] = this.quad.getX2 (); +coords[3] = this.quad.getY2 (); +type = 2; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2); +}return type; +}, "~A"); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("quad iterator iterator out of bounds"); +}var type; +if (this.index == 0) { +coords[0] = this.quad.getX1 (); +coords[1] = this.quad.getY1 (); +type = 0; +} else { +coords[0] = this.quad.getCtrlX (); +coords[1] = this.quad.getCtrlY (); +coords[2] = this.quad.getX2 (); +coords[3] = this.quad.getY2 (); +type = 2; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2); +}return type; +}, "~A"); +}); +Clazz_declarePackage ("jssun.awt.geom"); +Clazz_load (null, "jssun.awt.geom.Curve", ["java.lang.Double", "$.InternalError", "java.awt.geom.IllegalPathStateException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.direction = 0; +Clazz_instantialize (this, arguments); +}, jssun.awt.geom, "Curve"); +c$.insertMove = Clazz_defineMethod (c$, "insertMove", +function (curves, x, y) { +curves.add ( new jssun.awt.geom.Order0 (x, y)); +}, "java.util.Vector,~N,~N"); +c$.insertLine = Clazz_defineMethod (c$, "insertLine", +function (curves, x0, y0, x1, y1) { +if (y0 < y1) { +curves.add ( new jssun.awt.geom.Order1 (x0, y0, x1, y1, 1)); +} else if (y0 > y1) { +curves.add ( new jssun.awt.geom.Order1 (x1, y1, x0, y0, -1)); +} else { +}}, "java.util.Vector,~N,~N,~N,~N"); +c$.insertQuad = Clazz_defineMethod (c$, "insertQuad", +function (curves, x0, y0, coords) { +var y1 = coords[3]; +if (y0 > y1) { +jssun.awt.geom.Order2.insert (curves, coords, coords[2], y1, coords[0], coords[1], x0, y0, -1); +} else if (y0 == y1 && y0 == coords[1]) { +return; +} else { +jssun.awt.geom.Order2.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], y1, 1); +}}, "java.util.Vector,~N,~N,~A"); +c$.insertCubic = Clazz_defineMethod (c$, "insertCubic", +function (curves, x0, y0, coords) { +var y1 = coords[5]; +if (y0 > y1) { +jssun.awt.geom.Order3.insert (curves, coords, coords[4], y1, coords[2], coords[3], coords[0], coords[1], x0, y0, -1); +} else if (y0 == y1 && y0 == coords[1] && y0 == coords[3]) { +return; +} else { +jssun.awt.geom.Order3.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], coords[3], coords[4], y1, 1); +}}, "java.util.Vector,~N,~N,~A"); +c$.pointCrossingsForPath = Clazz_defineMethod (c$, "pointCrossingsForPath", +function (pi, px, py) { +if (pi.isDone ()) { +return 0; +}var coords = Clazz_newDoubleArray (6, 0); +if (pi.currentSegment (coords) != 0) { +throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); +}pi.next (); +var movx = coords[0]; +var movy = coords[1]; +var curx = movx; +var cury = movy; +var endx; +var endy; +var crossings = 0; +while (!pi.isDone ()) { +switch (pi.currentSegment (coords)) { +case 0: +if (cury != movy) { +crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy); +}movx = curx = coords[0]; +movy = cury = coords[1]; +break; +case 1: +endx = coords[0]; +endy = coords[1]; +crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, endx, endy); +curx = endx; +cury = endy; +break; +case 2: +endx = coords[2]; +endy = coords[3]; +crossings += jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, curx, cury, coords[0], coords[1], endx, endy, 0); +curx = endx; +cury = endy; +break; +case 3: +endx = coords[4]; +endy = coords[5]; +crossings += jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0); +curx = endx; +cury = endy; +break; +case 4: +if (cury != movy) { +crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy); +}curx = movx; +cury = movy; +break; +} +pi.next (); +} +if (cury != movy) { +crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy); +}return crossings; +}, "java.awt.geom.PathIterator,~N,~N"); +c$.pointCrossingsForLine = Clazz_defineMethod (c$, "pointCrossingsForLine", +function (px, py, x0, y0, x1, y1) { +if (py < y0 && py < y1) return 0; +if (py >= y0 && py >= y1) return 0; +if (px >= x0 && px >= x1) return 0; +if (px < x0 && px < x1) return (y0 < y1) ? 1 : -1; +var xintercept = x0 + (py - y0) * (x1 - x0) / (y1 - y0); +if (px >= xintercept) return 0; +return (y0 < y1) ? 1 : -1; +}, "~N,~N,~N,~N,~N,~N"); +c$.pointCrossingsForQuad = Clazz_defineMethod (c$, "pointCrossingsForQuad", +function (px, py, x0, y0, xc, yc, x1, y1, level) { +if (py < y0 && py < yc && py < y1) return 0; +if (py >= y0 && py >= yc && py >= y1) return 0; +if (px >= x0 && px >= xc && px >= x1) return 0; +if (px < x0 && px < xc && px < x1) { +if (py >= y0) { +if (py < y1) return 1; +} else { +if (py >= y1) return -1; +}return 0; +}if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1); +var x0c = (x0 + xc) / 2; +var y0c = (y0 + yc) / 2; +var xc1 = (xc + x1) / 2; +var yc1 = (yc + y1) / 2; +xc = (x0c + xc1) / 2; +yc = (y0c + yc1) / 2; +if (Double.isNaN (xc) || Double.isNaN (yc)) { +return 0; +}return (jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, x0, y0, x0c, y0c, xc, yc, level + 1) + jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, xc, yc, xc1, yc1, x1, y1, level + 1)); +}, "~N,~N,~N,~N,~N,~N,~N,~N,~N"); +c$.pointCrossingsForCubic = Clazz_defineMethod (c$, "pointCrossingsForCubic", +function (px, py, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) { +if (py < y0 && py < yc0 && py < yc1 && py < y1) return 0; +if (py >= y0 && py >= yc0 && py >= yc1 && py >= y1) return 0; +if (px >= x0 && px >= xc0 && px >= xc1 && px >= x1) return 0; +if (px < x0 && px < xc0 && px < xc1 && px < x1) { +if (py >= y0) { +if (py < y1) return 1; +} else { +if (py >= y1) return -1; +}return 0; +}if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1); +var xmid = (xc0 + xc1) / 2; +var ymid = (yc0 + yc1) / 2; +xc0 = (x0 + xc0) / 2; +yc0 = (y0 + yc0) / 2; +xc1 = (xc1 + x1) / 2; +yc1 = (yc1 + y1) / 2; +var xc0m = (xc0 + xmid) / 2; +var yc0m = (yc0 + ymid) / 2; +var xmc1 = (xmid + xc1) / 2; +var ymc1 = (ymid + yc1) / 2; +xmid = (xc0m + xmc1) / 2; +ymid = (yc0m + ymc1) / 2; +if (Double.isNaN (xmid) || Double.isNaN (ymid)) { +return 0; +}return (jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1) + jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1)); +}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +c$.rectCrossingsForPath = Clazz_defineMethod (c$, "rectCrossingsForPath", +function (pi, rxmin, rymin, rxmax, rymax) { +if (rxmax <= rxmin || rymax <= rymin) { +return 0; +}if (pi.isDone ()) { +return 0; +}var coords = Clazz_newDoubleArray (6, 0); +if (pi.currentSegment (coords) != 0) { +throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); +}pi.next (); +var curx; +var cury; +var movx; +var movy; +var endx; +var endy; +curx = movx = coords[0]; +cury = movy = coords[1]; +var crossings = 0; +while (crossings != -2147483648 && !pi.isDone ()) { +switch (pi.currentSegment (coords)) { +case 0: +if (curx != movx || cury != movy) { +crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy); +}movx = curx = coords[0]; +movy = cury = coords[1]; +break; +case 1: +endx = coords[0]; +endy = coords[1]; +crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, endx, endy); +curx = endx; +cury = endy; +break; +case 2: +endx = coords[2]; +endy = coords[3]; +crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], endx, endy, 0); +curx = endx; +cury = endy; +break; +case 3: +endx = coords[4]; +endy = coords[5]; +crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0); +curx = endx; +cury = endy; +break; +case 4: +if (curx != movx || cury != movy) { +crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy); +}curx = movx; +cury = movy; +break; +} +pi.next (); +} +if (crossings != -2147483648 && (curx != movx || cury != movy)) { +crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy); +}return crossings; +}, "java.awt.geom.PathIterator,~N,~N,~N,~N"); +c$.rectCrossingsForLine = Clazz_defineMethod (c$, "rectCrossingsForLine", +function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1) { +if (y0 >= rymax && y1 >= rymax) return crossings; +if (y0 <= rymin && y1 <= rymin) return crossings; +if (x0 <= rxmin && x1 <= rxmin) return crossings; +if (x0 >= rxmax && x1 >= rxmax) { +if (y0 < y1) { +if (y0 <= rymin) crossings++; +if (y1 >= rymax) crossings++; +} else if (y1 < y0) { +if (y1 <= rymin) crossings--; +if (y0 >= rymax) crossings--; +}return crossings; +}if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) { +return -2147483648; +}var xi0 = x0; +if (y0 < rymin) { +xi0 += ((rymin - y0) * (x1 - x0) / (y1 - y0)); +} else if (y0 > rymax) { +xi0 += ((rymax - y0) * (x1 - x0) / (y1 - y0)); +}var xi1 = x1; +if (y1 < rymin) { +xi1 += ((rymin - y1) * (x0 - x1) / (y0 - y1)); +} else if (y1 > rymax) { +xi1 += ((rymax - y1) * (x0 - x1) / (y0 - y1)); +}if (xi0 <= rxmin && xi1 <= rxmin) return crossings; +if (xi0 >= rxmax && xi1 >= rxmax) { +if (y0 < y1) { +if (y0 <= rymin) crossings++; +if (y1 >= rymax) crossings++; +} else if (y1 < y0) { +if (y1 <= rymin) crossings--; +if (y0 >= rymax) crossings--; +}return crossings; +}return -2147483648; +}, "~N,~N,~N,~N,~N,~N,~N,~N,~N"); +c$.rectCrossingsForQuad = Clazz_defineMethod (c$, "rectCrossingsForQuad", +function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc, yc, x1, y1, level) { +if (y0 >= rymax && yc >= rymax && y1 >= rymax) return crossings; +if (y0 <= rymin && yc <= rymin && y1 <= rymin) return crossings; +if (x0 <= rxmin && xc <= rxmin && x1 <= rxmin) return crossings; +if (x0 >= rxmax && xc >= rxmax && x1 >= rxmax) { +if (y0 < y1) { +if (y0 <= rymin && y1 > rymin) crossings++; +if (y0 < rymax && y1 >= rymax) crossings++; +} else if (y1 < y0) { +if (y1 <= rymin && y0 > rymin) crossings--; +if (y1 < rymax && y0 >= rymax) crossings--; +}return crossings; +}if ((x0 < rxmax && x0 > rxmin && y0 < rymax && y0 > rymin) || (x1 < rxmax && x1 > rxmin && y1 < rymax && y1 > rymin)) { +return -2147483648; +}if (level > 52) { +return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1); +}var x0c = (x0 + xc) / 2; +var y0c = (y0 + yc) / 2; +var xc1 = (xc + x1) / 2; +var yc1 = (yc + y1) / 2; +xc = (x0c + xc1) / 2; +yc = (y0c + yc1) / 2; +if (Double.isNaN (xc) || Double.isNaN (yc)) { +return 0; +}crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x0c, y0c, xc, yc, level + 1); +if (crossings != -2147483648) { +crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, xc, yc, xc1, yc1, x1, y1, level + 1); +}return crossings; +}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +c$.rectCrossingsForCubic = Clazz_defineMethod (c$, "rectCrossingsForCubic", +function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) { +if (y0 >= rymax && yc0 >= rymax && yc1 >= rymax && y1 >= rymax) { +return crossings; +}if (y0 <= rymin && yc0 <= rymin && yc1 <= rymin && y1 <= rymin) { +return crossings; +}if (x0 <= rxmin && xc0 <= rxmin && xc1 <= rxmin && x1 <= rxmin) { +return crossings; +}if (x0 >= rxmax && xc0 >= rxmax && xc1 >= rxmax && x1 >= rxmax) { +if (y0 < y1) { +if (y0 <= rymin && y1 > rymin) crossings++; +if (y0 < rymax && y1 >= rymax) crossings++; +} else if (y1 < y0) { +if (y1 <= rymin && y0 > rymin) crossings--; +if (y1 < rymax && y0 >= rymax) crossings--; +}return crossings; +}if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) { +return -2147483648; +}if (level > 52) { +return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1); +}var xmid = (xc0 + xc1) / 2; +var ymid = (yc0 + yc1) / 2; +xc0 = (x0 + xc0) / 2; +yc0 = (y0 + yc0) / 2; +xc1 = (xc1 + x1) / 2; +yc1 = (yc1 + y1) / 2; +var xc0m = (xc0 + xmid) / 2; +var yc0m = (yc0 + ymid) / 2; +var xmc1 = (xmid + xc1) / 2; +var ymc1 = (ymid + yc1) / 2; +xmid = (xc0m + xmc1) / 2; +ymid = (yc0m + ymc1) / 2; +if (Double.isNaN (xmid) || Double.isNaN (ymid)) { +return 0; +}crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1); +if (crossings != -2147483648) { +crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1); +}return crossings; +}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_makeConstructor (c$, +function (direction) { +this.direction = direction; +}, "~N"); +Clazz_defineMethod (c$, "getDirection", +function () { +return this.direction; +}); +Clazz_defineMethod (c$, "getWithDirection", +function (direction) { +return (this.direction == direction ? this : this.getReversedCurve ()); +}, "~N"); +c$.round = Clazz_defineMethod (c$, "round", +function (v) { +return v; +}, "~N"); +c$.orderof = Clazz_defineMethod (c$, "orderof", +function (x1, x2) { +if (x1 < x2) { +return -1; +}if (x1 > x2) { +return 1; +}return 0; +}, "~N,~N"); +c$.signeddiffbits = Clazz_defineMethod (c$, "signeddiffbits", +function (y1, y2) { +return (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2)); +}, "~N,~N"); +c$.diffbits = Clazz_defineMethod (c$, "diffbits", +function (y1, y2) { +return Math.abs (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2)); +}, "~N,~N"); +c$.prev = Clazz_defineMethod (c$, "prev", +function (v) { +return Double.longBitsToDouble (Double.doubleToLongBits (v) - 1); +}, "~N"); +c$.next = Clazz_defineMethod (c$, "next", +function (v) { +return Double.longBitsToDouble (Double.doubleToLongBits (v) + 1); +}, "~N"); +Clazz_overrideMethod (c$, "toString", +function () { +return ("Curve[" + this.getOrder () + ", " + ("(" + jssun.awt.geom.Curve.round (this.getX0 ()) + ", " + jssun.awt.geom.Curve.round (this.getY0 ()) + "), ") + this.controlPointString () + ("(" + jssun.awt.geom.Curve.round (this.getX1 ()) + ", " + jssun.awt.geom.Curve.round (this.getY1 ()) + "), ") + (this.direction == 1 ? "D" : "U") + "]"); +}); +Clazz_defineMethod (c$, "controlPointString", +function () { +return ""; +}); +Clazz_defineMethod (c$, "crossingsFor", +function (x, y) { +if (y >= this.getYTop () && y < this.getYBot ()) { +if (x < this.getXMax () && (x < this.getXMin () || x < this.XforY (y))) { +return 1; +}}return 0; +}, "~N,~N"); +Clazz_defineMethod (c$, "accumulateCrossings", +function (c) { +var xhi = c.getXHi (); +if (this.getXMin () >= xhi) { +return false; +}var xlo = c.getXLo (); +var ylo = c.getYLo (); +var yhi = c.getYHi (); +var y0 = this.getYTop (); +var y1 = this.getYBot (); +var tstart; +var ystart; +var tend; +var yend; +if (y0 < ylo) { +if (y1 <= ylo) { +return false; +}ystart = ylo; +tstart = this.TforY (ylo); +} else { +if (y0 >= yhi) { +return false; +}ystart = y0; +tstart = 0; +}if (y1 > yhi) { +yend = yhi; +tend = this.TforY (yhi); +} else { +yend = y1; +tend = 1; +}var hitLo = false; +var hitHi = false; +while (true) { +var x = this.XforT (tstart); +if (x < xhi) { +if (hitHi || x > xlo) { +return true; +}hitLo = true; +} else { +if (hitLo) { +return true; +}hitHi = true; +}if (tstart >= tend) { +break; +}tstart = this.nextVertical (tstart, tend); +} +if (hitLo) { +c.record (ystart, yend, this.direction); +}return false; +}, "jssun.awt.geom.Crossings"); +Clazz_defineMethod (c$, "getSubCurve", +function (ystart, yend) { +return this.getSubCurve (ystart, yend, this.direction); +}, "~N,~N"); +Clazz_defineMethod (c$, "compareTo", +function (that, yrange) { +var y0 = yrange[0]; +var y1 = yrange[1]; +y1 = Math.min (Math.min (y1, this.getYBot ()), that.getYBot ()); +if (y1 <= yrange[0]) { +System.err.println ("this == " + this); +System.err.println ("that == " + that); +System.out.println ("target range = " + yrange[0] + "=>" + yrange[1]); +throw new InternalError ("backstepping from " + yrange[0] + " to " + y1); +}yrange[1] = y1; +if (this.getXMax () <= that.getXMin ()) { +if (this.getXMin () == that.getXMax ()) { +return 0; +}return -1; +}if (this.getXMin () >= that.getXMax ()) { +return 1; +}var s0 = this.TforY (y0); +var ys0 = this.YforT (s0); +if (ys0 < y0) { +s0 = this.refineTforY (s0, ys0, y0); +ys0 = this.YforT (s0); +}var s1 = this.TforY (y1); +if (this.YforT (s1) < y0) { +s1 = this.refineTforY (s1, this.YforT (s1), y0); +}var t0 = that.TforY (y0); +var yt0 = that.YforT (t0); +if (yt0 < y0) { +t0 = that.refineTforY (t0, yt0, y0); +yt0 = that.YforT (t0); +}var t1 = that.TforY (y1); +if (that.YforT (t1) < y0) { +t1 = that.refineTforY (t1, that.YforT (t1), y0); +}var xs0 = this.XforT (s0); +var xt0 = that.XforT (t0); +var scale = Math.max (Math.abs (y0), Math.abs (y1)); +var ymin = Math.max (scale * 1E-14, 1E-300); +if (this.fairlyClose (xs0, xt0)) { +var bump = ymin; +var maxbump = Math.min (ymin * 1E13, (y1 - y0) * .1); +var y = y0 + bump; +while (y <= y1) { +if (this.fairlyClose (this.XforY (y), that.XforY (y))) { +if ((bump *= 2) > maxbump) { +bump = maxbump; +}} else { +y -= bump; +while (true) { +bump /= 2; +var newy = y + bump; +if (newy <= y) { +break; +}if (this.fairlyClose (this.XforY (newy), that.XforY (newy))) { +y = newy; +}} +break; +}y += bump; +} +if (y > y0) { +if (y < y1) { +yrange[1] = y; +}return 0; +}}if (ymin <= 0) { +System.out.println ("ymin = " + ymin); +}while (s0 < s1 && t0 < t1) { +var sh = this.nextVertical (s0, s1); +var xsh = this.XforT (sh); +var ysh = this.YforT (sh); +var th = that.nextVertical (t0, t1); +var xth = that.XforT (th); +var yth = that.YforT (th); +try { +if (this.findIntersect (that, yrange, ymin, 0, 0, s0, xs0, ys0, sh, xsh, ysh, t0, xt0, yt0, th, xth, yth)) { +break; +}} catch (t) { +System.err.println ("Error: " + t); +System.err.println ("y range was " + yrange[0] + "=>" + yrange[1]); +System.err.println ("s y range is " + ys0 + "=>" + ysh); +System.err.println ("t y range is " + yt0 + "=>" + yth); +System.err.println ("ymin is " + ymin); +return 0; +} +if (ysh < yth) { +if (ysh > yrange[0]) { +if (ysh < yrange[1]) { +yrange[1] = ysh; +}break; +}s0 = sh; +xs0 = xsh; +ys0 = ysh; +} else { +if (yth > yrange[0]) { +if (yth < yrange[1]) { +yrange[1] = yth; +}break; +}t0 = th; +xt0 = xth; +yt0 = yth; +}} +var ymid = (yrange[0] + yrange[1]) / 2; +return jssun.awt.geom.Curve.orderof (this.XforY (ymid), that.XforY (ymid)); +}, "jssun.awt.geom.Curve,~A"); +Clazz_defineMethod (c$, "findIntersect", +function (that, yrange, ymin, slevel, tlevel, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1) { +if (ys0 > yt1 || yt0 > ys1) { +return false; +}if (Math.min (xs0, xs1) > Math.max (xt0, xt1) || Math.max (xs0, xs1) < Math.min (xt0, xt1)) { +return false; +}if (s1 - s0 > 0.001) { +var s = (s0 + s1) / 2; +var xs = this.XforT (s); +var ys = this.YforT (s); +if (s == s0 || s == s1) { +System.out.println ("s0 = " + s0); +System.out.println ("s1 = " + s1); +throw new InternalError ("no s progress!"); +}if (t1 - t0 > 0.001) { +var t = (t0 + t1) / 2; +var xt = that.XforT (t); +var yt = that.YforT (t); +if (t == t0 || t == t1) { +System.out.println ("t0 = " + t0); +System.out.println ("t1 = " + t1); +throw new InternalError ("no t progress!"); +}if (ys >= yt0 && yt >= ys0) { +if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t, xt, yt)) { +return true; +}}if (ys >= yt) { +if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t, xt, yt, t1, xt1, yt1)) { +return true; +}}if (yt >= ys) { +if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) { +return true; +}}if (ys1 >= yt && yt1 >= ys) { +if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) { +return true; +}}} else { +if (ys >= yt0) { +if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t1, xt1, yt1)) { +return true; +}}if (yt1 >= ys) { +if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1)) { +return true; +}}}} else if (t1 - t0 > 0.001) { +var t = (t0 + t1) / 2; +var xt = that.XforT (t); +var yt = that.YforT (t); +if (t == t0 || t == t1) { +System.out.println ("t0 = " + t0); +System.out.println ("t1 = " + t1); +throw new InternalError ("no t progress!"); +}if (yt >= ys0) { +if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) { +return true; +}}if (ys1 >= yt) { +if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) { +return true; +}}} else { +var xlk = xs1 - xs0; +var ylk = ys1 - ys0; +var xnm = xt1 - xt0; +var ynm = yt1 - yt0; +var xmk = xt0 - xs0; +var ymk = yt0 - ys0; +var det = xnm * ylk - ynm * xlk; +if (det != 0) { +var detinv = 1 / det; +var s = (xnm * ymk - ynm * xmk) * detinv; +var t = (xlk * ymk - ylk * xmk) * detinv; +if (s >= 0 && s <= 1 && t >= 0 && t <= 1) { +s = s0 + s * (s1 - s0); +t = t0 + t * (t1 - t0); +if (s < 0 || s > 1 || t < 0 || t > 1) { +System.out.println ("Uh oh!"); +}var y = (this.YforT (s) + that.YforT (t)) / 2; +if (y <= yrange[1] && y > yrange[0]) { +yrange[1] = y; +return true; +}}}}return false; +}, "jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "refineTforY", +function (t0, yt0, y0) { +var t1 = 1; +while (true) { +var th = (t0 + t1) / 2; +if (th == t0 || th == t1) { +return t1; +}var y = this.YforT (th); +if (y < y0) { +t0 = th; +yt0 = y; +} else if (y > y0) { +t1 = th; +} else { +return t1; +}} +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "fairlyClose", +function (v1, v2) { +return (Math.abs (v1 - v2) < Math.max (Math.abs (v1), Math.abs (v2)) * 1E-10); +}, "~N,~N"); +Clazz_defineStatics (c$, +"INCREASING", 1, +"DECREASING", -1, +"RECT_INTERSECTS", 0x80000000, +"TMIN", 1E-3); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.lang.RuntimeException"], "java.awt.geom.IllegalPathStateException", null, function () { +c$ = Clazz_declareType (java.awt.geom, "IllegalPathStateException", RuntimeException); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.IllegalPathStateException, []); +}); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.w = 0; +this.h = 0; +this.affine = null; +this.index = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator); +Clazz_makeConstructor (c$, +function (r, at) { +this.x = r.getX (); +this.y = r.getY (); +this.w = r.getWidth (); +this.h = r.getHeight (); +this.affine = at; +if (this.w < 0 || this.h < 0) { +this.index = 6; +}}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getWindingRule", +function () { +return 1; +}); +Clazz_overrideMethod (c$, "isDone", +function () { +return this.index > 5; +}); +Clazz_overrideMethod (c$, "next", +function () { +this.index++; +}); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("rect iterator out of bounds"); +}if (this.index == 5) { +return 4; +}coords[0] = this.x; +coords[1] = this.y; +if (this.index == 1 || this.index == 2) { +coords[0] += this.w; +}if (this.index == 2 || this.index == 3) { +coords[1] += this.h; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, 1); +}return (this.index == 0 ? 0 : 1); +}, "~A"); +Clazz_defineMethod (c$, "currentSegment", +function (coords) { +if (this.isDone ()) { +throw new java.util.NoSuchElementException ("rect iterator out of bounds"); +}if (this.index == 5) { +return 4; +}coords[0] = this.x; +coords[1] = this.y; +if (this.index == 1 || this.index == 2) { +coords[0] += this.w; +}if (this.index == 2 || this.index == 3) { +coords[1] += this.h; +}if (this.affine != null) { +this.affine.transform (coords, 0, coords, 0, 1); +}return (this.index == 0 ? 0 : 1); +}, "~A"); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ActionEvent", ["java.awt.event.KeyEvent"], function () { +c$ = Clazz_decorateAsClass (function () { +this.actionCommand = null; +this.when = 0; +this.modifiers = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "ActionEvent", java.awt.AWTEvent); +Clazz_makeConstructor (c$, +function (source, id, command) { +this.construct (source, id, command, 0); +}, "~O,~N,~S"); +Clazz_makeConstructor (c$, +function (source, id, command, modifiers) { +this.construct (source, id, command, 0, modifiers); +}, "~O,~N,~S,~N"); +Clazz_makeConstructor (c$, +function (source, id, command, when, modifiers) { +Clazz_superConstructor (this, java.awt.event.ActionEvent, [source, id]); +this.actionCommand = command; +this.when = when; +this.modifiers = modifiers; +}, "~O,~N,~S,~N,~N"); +Clazz_defineMethod (c$, "getActionCommand", +function () { +return this.actionCommand; +}); +Clazz_defineMethod (c$, "getWhen", +function () { +return this.when; +}); +Clazz_defineMethod (c$, "getModifiers", +function () { +return this.modifiers; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 1001: +typeStr = "ACTION_PERFORMED"; +break; +default: +typeStr = "unknown type"; +} +return typeStr + ",cmd=" + this.actionCommand + ",when=" + this.when + ",modifiers=" + java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers); +}); +Clazz_defineStatics (c$, +"SHIFT_MASK", 1, +"CTRL_MASK", 2, +"META_MASK", 4, +"ALT_MASK", 8, +"ACTION_FIRST", 1001, +"ACTION_LAST", 1001, +"ACTION_PERFORMED", 1001); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.KeyEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Toolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.isProxyActive = false; +this.keyCode = 0; +this.keyChar = '\0'; +this.keyLocation = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "KeyEvent", java.awt.event.InputEvent); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, keyCode, keyChar, keyLocation) { +Clazz_superConstructor (this, java.awt.event.KeyEvent, [source, id, when, modifiers]); +if (id == 400) { +if (keyChar == '\uffff') { +throw new IllegalArgumentException ("invalid keyChar"); +}if (keyCode != 0) { +throw new IllegalArgumentException ("invalid keyCode"); +}if (keyLocation != 0) { +throw new IllegalArgumentException ("invalid keyLocation"); +}}this.keyCode = keyCode; +this.keyChar = keyChar; +if ((keyLocation < 0) || (keyLocation > 4)) { +throw new IllegalArgumentException ("invalid keyLocation"); +}this.keyLocation = keyLocation; +if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) { +this.setNewModifiers (); +} else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) { +this.setOldModifiers (); +}}, "java.awt.Component,~N,~N,~N,~N,~S,~N"); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, keyCode, keyChar) { +this.construct (source, id, when, modifiers, keyCode, keyChar, 0); +}, "java.awt.Component,~N,~N,~N,~N,~S"); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, keyCode) { +this.construct (source, id, when, modifiers, keyCode, String.fromCharCode (keyCode)); +}, "java.awt.Component,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getKeyCode", +function () { +return this.keyCode; +}); +Clazz_defineMethod (c$, "setKeyCode", +function (keyCode) { +this.keyCode = keyCode; +}, "~N"); +Clazz_defineMethod (c$, "getKeyChar", +function () { +return this.keyChar; +}); +Clazz_defineMethod (c$, "setKeyChar", +function (keyChar) { +this.keyChar = keyChar; +}, "~S"); +Clazz_defineMethod (c$, "setModifiers", +function (modifiers) { +this.modifiers = modifiers; +if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) { +this.setNewModifiers (); +} else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) { +this.setOldModifiers (); +}}, "~N"); +Clazz_defineMethod (c$, "getKeyLocation", +function () { +return this.keyLocation; +}); +c$.getKeyText = Clazz_defineMethod (c$, "getKeyText", +function (keyCode) { +if (keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90) { +return String.valueOf (String.fromCharCode (keyCode)); +}switch (keyCode) { +case 10: +return java.awt.Toolkit.getProperty ("AWT.enter", "Enter"); +case 8: +return java.awt.Toolkit.getProperty ("AWT.backSpace", "Backspace"); +case 9: +return java.awt.Toolkit.getProperty ("AWT.tab", "Tab"); +case 3: +return java.awt.Toolkit.getProperty ("AWT.cancel", "Cancel"); +case 12: +return java.awt.Toolkit.getProperty ("AWT.clear", "Clear"); +case 65312: +return java.awt.Toolkit.getProperty ("AWT.compose", "Compose"); +case 19: +return java.awt.Toolkit.getProperty ("AWT.pause", "Pause"); +case 20: +return java.awt.Toolkit.getProperty ("AWT.capsLock", "Caps Lock"); +case 27: +return java.awt.Toolkit.getProperty ("AWT.escape", "Escape"); +case 32: +return java.awt.Toolkit.getProperty ("AWT.space", "Space"); +case 33: +return java.awt.Toolkit.getProperty ("AWT.pgup", "Page Up"); +case 34: +return java.awt.Toolkit.getProperty ("AWT.pgdn", "Page Down"); +case 35: +return java.awt.Toolkit.getProperty ("AWT.end", "End"); +case 36: +return java.awt.Toolkit.getProperty ("AWT.home", "Home"); +case 37: +return java.awt.Toolkit.getProperty ("AWT.left", "Left"); +case 38: +return java.awt.Toolkit.getProperty ("AWT.up", "Up"); +case 39: +return java.awt.Toolkit.getProperty ("AWT.right", "Right"); +case 40: +return java.awt.Toolkit.getProperty ("AWT.down", "Down"); +case 65368: +return java.awt.Toolkit.getProperty ("AWT.begin", "Begin"); +case 16: +return java.awt.Toolkit.getProperty ("AWT.shift", "Shift"); +case 17: +return java.awt.Toolkit.getProperty ("AWT.control", "Control"); +case 18: +return java.awt.Toolkit.getProperty ("AWT.alt", "Alt"); +case 157: +return java.awt.Toolkit.getProperty ("AWT.meta", "Meta"); +case 65406: +return java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"); +case 44: +return java.awt.Toolkit.getProperty ("AWT.comma", "Comma"); +case 46: +return java.awt.Toolkit.getProperty ("AWT.period", "Period"); +case 47: +return java.awt.Toolkit.getProperty ("AWT.slash", "Slash"); +case 59: +return java.awt.Toolkit.getProperty ("AWT.semicolon", "Semicolon"); +case 61: +return java.awt.Toolkit.getProperty ("AWT.equals", "Equals"); +case 91: +return java.awt.Toolkit.getProperty ("AWT.openBracket", "Open Bracket"); +case 92: +return java.awt.Toolkit.getProperty ("AWT.backSlash", "Back Slash"); +case 93: +return java.awt.Toolkit.getProperty ("AWT.closeBracket", "Close Bracket"); +case 106: +return java.awt.Toolkit.getProperty ("AWT.multiply", "NumPad *"); +case 107: +return java.awt.Toolkit.getProperty ("AWT.add", "NumPad +"); +case 108: +return java.awt.Toolkit.getProperty ("AWT.separator", "NumPad ,"); +case 109: +return java.awt.Toolkit.getProperty ("AWT.subtract", "NumPad -"); +case 110: +return java.awt.Toolkit.getProperty ("AWT.decimal", "NumPad ."); +case 111: +return java.awt.Toolkit.getProperty ("AWT.divide", "NumPad /"); +case 127: +return java.awt.Toolkit.getProperty ("AWT.delete", "Delete"); +case 144: +return java.awt.Toolkit.getProperty ("AWT.numLock", "Num Lock"); +case 145: +return java.awt.Toolkit.getProperty ("AWT.scrollLock", "Scroll Lock"); +case 524: +return java.awt.Toolkit.getProperty ("AWT.windows", "Windows"); +case 525: +return java.awt.Toolkit.getProperty ("AWT.context", "Context Menu"); +case 112: +return java.awt.Toolkit.getProperty ("AWT.f1", "F1"); +case 113: +return java.awt.Toolkit.getProperty ("AWT.f2", "F2"); +case 114: +return java.awt.Toolkit.getProperty ("AWT.f3", "F3"); +case 115: +return java.awt.Toolkit.getProperty ("AWT.f4", "F4"); +case 116: +return java.awt.Toolkit.getProperty ("AWT.f5", "F5"); +case 117: +return java.awt.Toolkit.getProperty ("AWT.f6", "F6"); +case 118: +return java.awt.Toolkit.getProperty ("AWT.f7", "F7"); +case 119: +return java.awt.Toolkit.getProperty ("AWT.f8", "F8"); +case 120: +return java.awt.Toolkit.getProperty ("AWT.f9", "F9"); +case 121: +return java.awt.Toolkit.getProperty ("AWT.f10", "F10"); +case 122: +return java.awt.Toolkit.getProperty ("AWT.f11", "F11"); +case 123: +return java.awt.Toolkit.getProperty ("AWT.f12", "F12"); +case 61440: +return java.awt.Toolkit.getProperty ("AWT.f13", "F13"); +case 61441: +return java.awt.Toolkit.getProperty ("AWT.f14", "F14"); +case 61442: +return java.awt.Toolkit.getProperty ("AWT.f15", "F15"); +case 61443: +return java.awt.Toolkit.getProperty ("AWT.f16", "F16"); +case 61444: +return java.awt.Toolkit.getProperty ("AWT.f17", "F17"); +case 61445: +return java.awt.Toolkit.getProperty ("AWT.f18", "F18"); +case 61446: +return java.awt.Toolkit.getProperty ("AWT.f19", "F19"); +case 61447: +return java.awt.Toolkit.getProperty ("AWT.f20", "F20"); +case 61448: +return java.awt.Toolkit.getProperty ("AWT.f21", "F21"); +case 61449: +return java.awt.Toolkit.getProperty ("AWT.f22", "F22"); +case 61450: +return java.awt.Toolkit.getProperty ("AWT.f23", "F23"); +case 61451: +return java.awt.Toolkit.getProperty ("AWT.f24", "F24"); +case 154: +return java.awt.Toolkit.getProperty ("AWT.printScreen", "Print Screen"); +case 155: +return java.awt.Toolkit.getProperty ("AWT.insert", "Insert"); +case 156: +return java.awt.Toolkit.getProperty ("AWT.help", "Help"); +case 192: +return java.awt.Toolkit.getProperty ("AWT.backQuote", "Back Quote"); +case 222: +return java.awt.Toolkit.getProperty ("AWT.quote", "Quote"); +case 224: +return java.awt.Toolkit.getProperty ("AWT.up", "Up"); +case 225: +return java.awt.Toolkit.getProperty ("AWT.down", "Down"); +case 226: +return java.awt.Toolkit.getProperty ("AWT.left", "Left"); +case 227: +return java.awt.Toolkit.getProperty ("AWT.right", "Right"); +case 128: +return java.awt.Toolkit.getProperty ("AWT.deadGrave", "Dead Grave"); +case 129: +return java.awt.Toolkit.getProperty ("AWT.deadAcute", "Dead Acute"); +case 130: +return java.awt.Toolkit.getProperty ("AWT.deadCircumflex", "Dead Circumflex"); +case 131: +return java.awt.Toolkit.getProperty ("AWT.deadTilde", "Dead Tilde"); +case 132: +return java.awt.Toolkit.getProperty ("AWT.deadMacron", "Dead Macron"); +case 133: +return java.awt.Toolkit.getProperty ("AWT.deadBreve", "Dead Breve"); +case 134: +return java.awt.Toolkit.getProperty ("AWT.deadAboveDot", "Dead Above Dot"); +case 135: +return java.awt.Toolkit.getProperty ("AWT.deadDiaeresis", "Dead Diaeresis"); +case 136: +return java.awt.Toolkit.getProperty ("AWT.deadAboveRing", "Dead Above Ring"); +case 137: +return java.awt.Toolkit.getProperty ("AWT.deadDoubleAcute", "Dead Double Acute"); +case 138: +return java.awt.Toolkit.getProperty ("AWT.deadCaron", "Dead Caron"); +case 139: +return java.awt.Toolkit.getProperty ("AWT.deadCedilla", "Dead Cedilla"); +case 140: +return java.awt.Toolkit.getProperty ("AWT.deadOgonek", "Dead Ogonek"); +case 141: +return java.awt.Toolkit.getProperty ("AWT.deadIota", "Dead Iota"); +case 142: +return java.awt.Toolkit.getProperty ("AWT.deadVoicedSound", "Dead Voiced Sound"); +case 143: +return java.awt.Toolkit.getProperty ("AWT.deadSemivoicedSound", "Dead Semivoiced Sound"); +case 150: +return java.awt.Toolkit.getProperty ("AWT.ampersand", "Ampersand"); +case 151: +return java.awt.Toolkit.getProperty ("AWT.asterisk", "Asterisk"); +case 152: +return java.awt.Toolkit.getProperty ("AWT.quoteDbl", "Double Quote"); +case 153: +return java.awt.Toolkit.getProperty ("AWT.Less", "Less"); +case 160: +return java.awt.Toolkit.getProperty ("AWT.greater", "Greater"); +case 161: +return java.awt.Toolkit.getProperty ("AWT.braceLeft", "Left Brace"); +case 162: +return java.awt.Toolkit.getProperty ("AWT.braceRight", "Right Brace"); +case 512: +return java.awt.Toolkit.getProperty ("AWT.at", "At"); +case 513: +return java.awt.Toolkit.getProperty ("AWT.colon", "Colon"); +case 514: +return java.awt.Toolkit.getProperty ("AWT.circumflex", "Circumflex"); +case 515: +return java.awt.Toolkit.getProperty ("AWT.dollar", "Dollar"); +case 516: +return java.awt.Toolkit.getProperty ("AWT.euro", "Euro"); +case 517: +return java.awt.Toolkit.getProperty ("AWT.exclamationMark", "Exclamation Mark"); +case 518: +return java.awt.Toolkit.getProperty ("AWT.invertedExclamationMark", "Inverted Exclamation Mark"); +case 519: +return java.awt.Toolkit.getProperty ("AWT.leftParenthesis", "Left Parenthesis"); +case 520: +return java.awt.Toolkit.getProperty ("AWT.numberSign", "Number Sign"); +case 45: +return java.awt.Toolkit.getProperty ("AWT.minus", "Minus"); +case 521: +return java.awt.Toolkit.getProperty ("AWT.plus", "Plus"); +case 522: +return java.awt.Toolkit.getProperty ("AWT.rightParenthesis", "Right Parenthesis"); +case 523: +return java.awt.Toolkit.getProperty ("AWT.underscore", "Underscore"); +case 24: +return java.awt.Toolkit.getProperty ("AWT.final", "Final"); +case 28: +return java.awt.Toolkit.getProperty ("AWT.convert", "Convert"); +case 29: +return java.awt.Toolkit.getProperty ("AWT.noconvert", "No Convert"); +case 30: +return java.awt.Toolkit.getProperty ("AWT.accept", "Accept"); +case 31: +return java.awt.Toolkit.getProperty ("AWT.modechange", "Mode Change"); +case 21: +return java.awt.Toolkit.getProperty ("AWT.kana", "Kana"); +case 25: +return java.awt.Toolkit.getProperty ("AWT.kanji", "Kanji"); +case 240: +return java.awt.Toolkit.getProperty ("AWT.alphanumeric", "Alphanumeric"); +case 241: +return java.awt.Toolkit.getProperty ("AWT.katakana", "Katakana"); +case 242: +return java.awt.Toolkit.getProperty ("AWT.hiragana", "Hiragana"); +case 243: +return java.awt.Toolkit.getProperty ("AWT.fullWidth", "Full-Width"); +case 244: +return java.awt.Toolkit.getProperty ("AWT.halfWidth", "Half-Width"); +case 245: +return java.awt.Toolkit.getProperty ("AWT.romanCharacters", "Roman Characters"); +case 256: +return java.awt.Toolkit.getProperty ("AWT.allCandidates", "All Candidates"); +case 257: +return java.awt.Toolkit.getProperty ("AWT.previousCandidate", "Previous Candidate"); +case 258: +return java.awt.Toolkit.getProperty ("AWT.codeInput", "Code Input"); +case 259: +return java.awt.Toolkit.getProperty ("AWT.japaneseKatakana", "Japanese Katakana"); +case 260: +return java.awt.Toolkit.getProperty ("AWT.japaneseHiragana", "Japanese Hiragana"); +case 261: +return java.awt.Toolkit.getProperty ("AWT.japaneseRoman", "Japanese Roman"); +case 262: +return java.awt.Toolkit.getProperty ("AWT.kanaLock", "Kana Lock"); +case 263: +return java.awt.Toolkit.getProperty ("AWT.inputMethodOnOff", "Input Method On/Off"); +case 65481: +return java.awt.Toolkit.getProperty ("AWT.again", "Again"); +case 65483: +return java.awt.Toolkit.getProperty ("AWT.undo", "Undo"); +case 65485: +return java.awt.Toolkit.getProperty ("AWT.copy", "Copy"); +case 65487: +return java.awt.Toolkit.getProperty ("AWT.paste", "Paste"); +case 65489: +return java.awt.Toolkit.getProperty ("AWT.cut", "Cut"); +case 65488: +return java.awt.Toolkit.getProperty ("AWT.find", "Find"); +case 65482: +return java.awt.Toolkit.getProperty ("AWT.props", "Props"); +case 65480: +return java.awt.Toolkit.getProperty ("AWT.stop", "Stop"); +} +if (keyCode >= 96 && keyCode <= 105) { +var numpad = java.awt.Toolkit.getProperty ("AWT.numpad", "NumPad"); +var c = String.fromCharCode (keyCode - 96 + 48); +return numpad + "-" + c; +}var unknown = java.awt.Toolkit.getProperty ("AWT.unknown", "Unknown"); +return unknown + " keyCode: 0x" + Integer.toString (keyCode, 16); +}, "~N"); +c$.getKeyModifiersText = Clazz_defineMethod (c$, "getKeyModifiersText", +function (modifiers) { +var buf = new StringBuilder (); +if ((modifiers & 4) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta")); +buf.append ("+"); +}if ((modifiers & 2) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl")); +buf.append ("+"); +}if ((modifiers & 8) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt")); +buf.append ("+"); +}if ((modifiers & 1) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift")); +buf.append ("+"); +}if ((modifiers & 32) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph")); +buf.append ("+"); +}if ((modifiers & 16) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1")); +buf.append ("+"); +}if (buf.length () > 0) { +buf.setLength (buf.length () - 1); +}return buf.toString (); +}, "~N"); +Clazz_defineMethod (c$, "isActionKey", +function () { +switch (this.keyCode) { +case 36: +case 35: +case 33: +case 34: +case 38: +case 40: +case 37: +case 39: +case 65368: +case 226: +case 224: +case 227: +case 225: +case 112: +case 113: +case 114: +case 115: +case 116: +case 117: +case 118: +case 119: +case 120: +case 121: +case 122: +case 123: +case 61440: +case 61441: +case 61442: +case 61443: +case 61444: +case 61445: +case 61446: +case 61447: +case 61448: +case 61449: +case 61450: +case 61451: +case 154: +case 145: +case 20: +case 144: +case 19: +case 155: +case 24: +case 28: +case 29: +case 30: +case 31: +case 21: +case 25: +case 240: +case 241: +case 242: +case 243: +case 244: +case 245: +case 256: +case 257: +case 258: +case 259: +case 260: +case 261: +case 262: +case 263: +case 65481: +case 65483: +case 65485: +case 65487: +case 65489: +case 65488: +case 65482: +case 65480: +case 156: +case 524: +case 525: +return true; +} +return false; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var str = new StringBuilder (100); +switch (this.id) { +case 401: +str.append ("KEY_PRESSED"); +break; +case 402: +str.append ("KEY_RELEASED"); +break; +case 400: +str.append ("KEY_TYPED"); +break; +default: +str.append ("unknown type"); +break; +} +str.append (",keyCode=").append ("" + this.keyCode); +str.append (",keyText=").append (java.awt.event.KeyEvent.getKeyText (this.keyCode)); +str.append (",keyChar="); +switch (this.keyChar) { +case '\b': +str.append (java.awt.event.KeyEvent.getKeyText (8)); +break; +case '\t': +str.append (java.awt.event.KeyEvent.getKeyText (9)); +break; +case '\n': +str.append (java.awt.event.KeyEvent.getKeyText (10)); +break; +case '\u0018': +str.append (java.awt.event.KeyEvent.getKeyText (3)); +break; +case '\u001b': +str.append (java.awt.event.KeyEvent.getKeyText (27)); +break; +case '\u007f': +str.append (java.awt.event.KeyEvent.getKeyText (127)); +break; +case '\uffff': +str.append (java.awt.Toolkit.getProperty ("AWT.undefined", "Undefined")); +str.append (" keyChar"); +break; +default: +str.append ("'").append (this.keyChar).append ("'"); +break; +} +if (this.getModifiers () != 0) { +str.append (",modifiers=").append (java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers)); +}if (this.getModifiersEx () != 0) { +str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers)); +}str.append (",keyLocation="); +switch (this.keyLocation) { +case 0: +str.append ("KEY_LOCATION_UNKNOWN"); +break; +case 1: +str.append ("KEY_LOCATION_STANDARD"); +break; +case 2: +str.append ("KEY_LOCATION_LEFT"); +break; +case 3: +str.append ("KEY_LOCATION_RIGHT"); +break; +case 4: +str.append ("KEY_LOCATION_NUMPAD"); +break; +default: +str.append ("KEY_LOCATION_UNKNOWN"); +break; +} +return str.toString (); +}); +Clazz_defineMethod (c$, "setNewModifiers", + function () { +if ((this.modifiers & 1) != 0) { +this.modifiers |= 64; +}if ((this.modifiers & 8) != 0) { +this.modifiers |= 512; +}if ((this.modifiers & 2) != 0) { +this.modifiers |= 128; +}if ((this.modifiers & 4) != 0) { +this.modifiers |= 256; +}if ((this.modifiers & 32) != 0) { +this.modifiers |= 8192; +}if ((this.modifiers & 16) != 0) { +this.modifiers |= 1024; +}}); +Clazz_defineMethod (c$, "setOldModifiers", + function () { +if ((this.modifiers & 64) != 0) { +this.modifiers |= 1; +}if ((this.modifiers & 512) != 0) { +this.modifiers |= 8; +}if ((this.modifiers & 128) != 0) { +this.modifiers |= 2; +}if ((this.modifiers & 256) != 0) { +this.modifiers |= 4; +}if ((this.modifiers & 8192) != 0) { +this.modifiers |= 32; +}if ((this.modifiers & 1024) != 0) { +this.modifiers |= 16; +}}); +Clazz_defineStatics (c$, +"KEY_FIRST", 400, +"KEY_LAST", 402, +"KEY_TYPED", 400, +"KEY_PRESSED", 401, +"KEY_RELEASED", 402, +"VK_ENTER", '\n', +"VK_BACK_SPACE", '\b', +"VK_TAB", '\t', +"VK_CANCEL", 0x03, +"VK_CLEAR", 0x0C, +"VK_SHIFT", 0x10, +"VK_CONTROL", 0x11, +"VK_ALT", 0x12, +"VK_PAUSE", 0x13, +"VK_CAPS_LOCK", 0x14, +"VK_ESCAPE", 0x1B, +"VK_SPACE", 0x20, +"VK_PAGE_UP", 0x21, +"VK_PAGE_DOWN", 0x22, +"VK_END", 0x23, +"VK_HOME", 0x24, +"VK_LEFT", 0x25, +"VK_UP", 0x26, +"VK_RIGHT", 0x27, +"VK_DOWN", 0x28, +"VK_COMMA", 0x2C, +"VK_MINUS", 0x2D, +"VK_PERIOD", 0x2E, +"VK_SLASH", 0x2F, +"VK_0", 0x30, +"VK_1", 0x31, +"VK_2", 0x32, +"VK_3", 0x33, +"VK_4", 0x34, +"VK_5", 0x35, +"VK_6", 0x36, +"VK_7", 0x37, +"VK_8", 0x38, +"VK_9", 0x39, +"VK_SEMICOLON", 0x3B, +"VK_EQUALS", 0x3D, +"VK_A", 0x41, +"VK_B", 0x42, +"VK_C", 0x43, +"VK_D", 0x44, +"VK_E", 0x45, +"VK_F", 0x46, +"VK_G", 0x47, +"VK_H", 0x48, +"VK_I", 0x49, +"VK_J", 0x4A, +"VK_K", 0x4B, +"VK_L", 0x4C, +"VK_M", 0x4D, +"VK_N", 0x4E, +"VK_O", 0x4F, +"VK_P", 0x50, +"VK_Q", 0x51, +"VK_R", 0x52, +"VK_S", 0x53, +"VK_T", 0x54, +"VK_U", 0x55, +"VK_V", 0x56, +"VK_W", 0x57, +"VK_X", 0x58, +"VK_Y", 0x59, +"VK_Z", 0x5A, +"VK_OPEN_BRACKET", 0x5B, +"VK_BACK_SLASH", 0x5C, +"VK_CLOSE_BRACKET", 0x5D, +"VK_NUMPAD0", 0x60, +"VK_NUMPAD1", 0x61, +"VK_NUMPAD2", 0x62, +"VK_NUMPAD3", 0x63, +"VK_NUMPAD4", 0x64, +"VK_NUMPAD5", 0x65, +"VK_NUMPAD6", 0x66, +"VK_NUMPAD7", 0x67, +"VK_NUMPAD8", 0x68, +"VK_NUMPAD9", 0x69, +"VK_MULTIPLY", 0x6A, +"VK_ADD", 0x6B, +"VK_SEPARATER", 0x6C, +"VK_SEPARATOR", 108, +"VK_SUBTRACT", 0x6D, +"VK_DECIMAL", 0x6E, +"VK_DIVIDE", 0x6F, +"VK_DELETE", 0x7F, +"VK_NUM_LOCK", 0x90, +"VK_SCROLL_LOCK", 0x91, +"VK_F1", 0x70, +"VK_F2", 0x71, +"VK_F3", 0x72, +"VK_F4", 0x73, +"VK_F5", 0x74, +"VK_F6", 0x75, +"VK_F7", 0x76, +"VK_F8", 0x77, +"VK_F9", 0x78, +"VK_F10", 0x79, +"VK_F11", 0x7A, +"VK_F12", 0x7B, +"VK_F13", 0xF000, +"VK_F14", 0xF001, +"VK_F15", 0xF002, +"VK_F16", 0xF003, +"VK_F17", 0xF004, +"VK_F18", 0xF005, +"VK_F19", 0xF006, +"VK_F20", 0xF007, +"VK_F21", 0xF008, +"VK_F22", 0xF009, +"VK_F23", 0xF00A, +"VK_F24", 0xF00B, +"VK_PRINTSCREEN", 0x9A, +"VK_INSERT", 0x9B, +"VK_HELP", 0x9C, +"VK_META", 0x9D, +"VK_BACK_QUOTE", 0xC0, +"VK_QUOTE", 0xDE, +"VK_KP_UP", 0xE0, +"VK_KP_DOWN", 0xE1, +"VK_KP_LEFT", 0xE2, +"VK_KP_RIGHT", 0xE3, +"VK_DEAD_GRAVE", 0x80, +"VK_DEAD_ACUTE", 0x81, +"VK_DEAD_CIRCUMFLEX", 0x82, +"VK_DEAD_TILDE", 0x83, +"VK_DEAD_MACRON", 0x84, +"VK_DEAD_BREVE", 0x85, +"VK_DEAD_ABOVEDOT", 0x86, +"VK_DEAD_DIAERESIS", 0x87, +"VK_DEAD_ABOVERING", 0x88, +"VK_DEAD_DOUBLEACUTE", 0x89, +"VK_DEAD_CARON", 0x8a, +"VK_DEAD_CEDILLA", 0x8b, +"VK_DEAD_OGONEK", 0x8c, +"VK_DEAD_IOTA", 0x8d, +"VK_DEAD_VOICED_SOUND", 0x8e, +"VK_DEAD_SEMIVOICED_SOUND", 0x8f, +"VK_AMPERSAND", 0x96, +"VK_ASTERISK", 0x97, +"VK_QUOTEDBL", 0x98, +"VK_LESS", 0x99, +"VK_GREATER", 0xa0, +"VK_BRACELEFT", 0xa1, +"VK_BRACERIGHT", 0xa2, +"VK_AT", 0x0200, +"VK_COLON", 0x0201, +"VK_CIRCUMFLEX", 0x0202, +"VK_DOLLAR", 0x0203, +"VK_EURO_SIGN", 0x0204, +"VK_EXCLAMATION_MARK", 0x0205, +"VK_INVERTED_EXCLAMATION_MARK", 0x0206, +"VK_LEFT_PARENTHESIS", 0x0207, +"VK_NUMBER_SIGN", 0x0208, +"VK_PLUS", 0x0209, +"VK_RIGHT_PARENTHESIS", 0x020A, +"VK_UNDERSCORE", 0x020B, +"VK_WINDOWS", 0x020C, +"VK_CONTEXT_MENU", 0x020D, +"VK_FINAL", 0x0018, +"VK_CONVERT", 0x001C, +"VK_NONCONVERT", 0x001D, +"VK_ACCEPT", 0x001E, +"VK_MODECHANGE", 0x001F, +"VK_KANA", 0x0015, +"VK_KANJI", 0x0019, +"VK_ALPHANUMERIC", 0x00F0, +"VK_KATAKANA", 0x00F1, +"VK_HIRAGANA", 0x00F2, +"VK_FULL_WIDTH", 0x00F3, +"VK_HALF_WIDTH", 0x00F4, +"VK_ROMAN_CHARACTERS", 0x00F5, +"VK_ALL_CANDIDATES", 0x0100, +"VK_PREVIOUS_CANDIDATE", 0x0101, +"VK_CODE_INPUT", 0x0102, +"VK_JAPANESE_KATAKANA", 0x0103, +"VK_JAPANESE_HIRAGANA", 0x0104, +"VK_JAPANESE_ROMAN", 0x0105, +"VK_KANA_LOCK", 0x0106, +"VK_INPUT_METHOD_ON_OFF", 0x0107, +"VK_CUT", 0xFFD1, +"VK_COPY", 0xFFCD, +"VK_PASTE", 0xFFCF, +"VK_UNDO", 0xFFCB, +"VK_AGAIN", 0xFFC9, +"VK_FIND", 0xFFD0, +"VK_PROPS", 0xFFCA, +"VK_STOP", 0xFFC8, +"VK_COMPOSE", 0xFF20, +"VK_ALT_GRAPH", 0xFF7E, +"VK_BEGIN", 0xFF58, +"VK_UNDEFINED", 0x0, +"CHAR_UNDEFINED", String.fromCharCode (0xFFFF), +"KEY_LOCATION_UNKNOWN", 0, +"KEY_LOCATION_STANDARD", 1, +"KEY_LOCATION_LEFT", 2, +"KEY_LOCATION_RIGHT", 3, +"KEY_LOCATION_NUMPAD", 4); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.scrollType = 0; +this.scrollAmount = 0; +this.wheelRotation = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) { +this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation); +}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N"); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) { +Clazz_superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]); +this.scrollType = scrollType; +this.scrollAmount = scrollAmount; +this.wheelRotation = wheelRotation; +}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N"); +Clazz_defineMethod (c$, "getScrollType", +function () { +return this.scrollType; +}); +Clazz_defineMethod (c$, "getScrollAmount", +function () { +return this.scrollAmount; +}); +Clazz_defineMethod (c$, "getWheelRotation", +function () { +return this.wheelRotation; +}); +Clazz_defineMethod (c$, "getUnitsToScroll", +function () { +return this.scrollAmount * this.wheelRotation; +}); +Clazz_defineMethod (c$, "paramString", +function () { +var scrollTypeStr = null; +if (this.getScrollType () == 0) { +scrollTypeStr = "WHEEL_UNIT_SCROLL"; +} else if (this.getScrollType () == 1) { +scrollTypeStr = "WHEEL_BLOCK_SCROLL"; +} else { +scrollTypeStr = "unknown scroll type"; +}return Clazz_superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation (); +}); +Clazz_defineStatics (c$, +"WHEEL_UNIT_SCROLL", 0, +"WHEEL_BLOCK_SCROLL", 1); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () { +c$ = Clazz_decorateAsClass (function () { +this.enabled = true; +this.arrayTable = null; +this.changeSupport = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]); +c$.shouldReconfigure = Clazz_defineMethod (c$, "shouldReconfigure", +function (e) { +if (e.getPropertyName () == null) { +javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false); +}return false; +}, "java.beans.PropertyChangeEvent"); +c$.setEnabledFromAction = Clazz_defineMethod (c$, "setEnabledFromAction", +function (c, a) { +c.setEnabled ((a != null) ? a.isEnabled () : true); +}, "javax.swing.JComponent,javax.swing.Action"); +c$.setToolTipTextFromAction = Clazz_defineMethod (c$, "setToolTipTextFromAction", +function (c, a) { +c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null); +}, "javax.swing.JComponent,javax.swing.Action"); +c$.hasSelectedKey = Clazz_defineMethod (c$, "hasSelectedKey", +function (a) { +return (a != null && a.getValue ("SwingSelectedKey") != null); +}, "javax.swing.Action"); +c$.isSelected = Clazz_defineMethod (c$, "isSelected", +function (a) { +return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey")); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_makeConstructor (c$, +function (name) { +this.putValue ("Name", name); +}, "~S"); +Clazz_makeConstructor (c$, +function (name, icon) { +this.construct (name); +this.putValue ("SmallIcon", icon); +}, "~S,javax.swing.Icon"); +Clazz_defineMethod (c$, "getValue", +function (key) { +if (key === "enabled") { +return this.enabled; +}if (this.arrayTable == null) { +return null; +}return this.arrayTable.get (key); +}, "~S"); +Clazz_overrideMethod (c$, "putValue", +function (key, newValue) { +var oldValue = null; +if (key === "enabled") { +if (newValue == null || !(Clazz_instanceOf (newValue, Boolean))) { +newValue = new Boolean (false); +}oldValue = new Boolean (this.enabled); +this.enabled = (newValue).booleanValue (); +} else { +if (this.arrayTable == null) { +this.arrayTable = new javax.swing.ArrayTable (); +}if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key); +if (newValue == null) { +this.arrayTable.remove (key); +} else { +this.arrayTable.put (key, newValue); +}}this.firePropertyChange (key, oldValue, newValue); +}, "~S,~O"); +Clazz_defineMethod (c$, "isEnabled", +function () { +return this.enabled; +}); +Clazz_overrideMethod (c$, "setEnabled", +function (newValue) { +var oldValue = this.enabled; +if (oldValue != newValue) { +this.enabled = newValue; +this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); +}}, "~B"); +Clazz_defineMethod (c$, "getKeys", +function () { +if (this.arrayTable == null) { +return null; +}var keys = new Array (this.arrayTable.size ()); +this.arrayTable.getKeys (keys); +return keys; +}); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) { +return; +}this.changeSupport.firePropertyChange (propertyName, oldValue, newValue); +}, "~S,~O,~O"); +Clazz_overrideMethod (c$, "addPropertyChangeListener", +function (listener) { +if (this.changeSupport == null) { +this.changeSupport = new javax.swing.event.SwingPropertyChangeSupport (this); +}this.changeSupport.addPropertyChangeListener (listener); +}, "java.beans.PropertyChangeListener"); +Clazz_overrideMethod (c$, "removePropertyChangeListener", +function (listener) { +if (this.changeSupport == null) { +return; +}this.changeSupport.removePropertyChangeListener (listener); +}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function () { +if (this.changeSupport == null) { +return new Array (0); +}return this.changeSupport.getPropertyChangeListeners (); +}); +Clazz_defineMethod (c$, "clone", +function () { +var newAction = Clazz_superCall (this, javax.swing.AbstractAction, "clone", []); +{ +if (this.arrayTable != null) { +newAction.arrayTable = this.arrayTable.clone (); +}}return newAction; +}); +Clazz_defineStatics (c$, +"RECONFIGURE_ON_NULL", null); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.ItemSelectable", "java.awt.event.ActionListener", "$.ItemListener", "javax.swing.ActionPropertyChangeListener", "$.JComponent", "$.SwingConstants", "javax.swing.event.ChangeListener"], "javax.swing.AbstractButton", ["java.lang.Boolean", "$.IllegalArgumentException", "java.awt.event.ActionEvent", "$.ItemEvent", "javax.swing.AbstractAction", "$.DefaultButtonModel", "$.OverlayLayout", "$.SwingUtilities", "$.UIManager", "javax.swing.event.ChangeEvent", "javax.swing.plaf.UIResource"], function () { +c$ = Clazz_decorateAsClass (function () { +this.model = null; +this.text = ""; +this.margin = null; +this.defaultMargin = null; +this.defaultIcon = null; +this.pressedIcon = null; +this.disabledIcon = null; +this.selectedIcon = null; +this.disabledSelectedIcon = null; +this.rolloverIcon = null; +this.rolloverSelectedIcon = null; +this.$paintBorder = true; +this.paintFocus = true; +this.rolloverEnabled = false; +this.contentAreaFilled = true; +this.verticalAlignment = 0; +this.horizontalAlignment = 0; +this.verticalTextPosition = 0; +this.horizontalTextPosition = 11; +this.iconTextGap = 4; +this.mnemonic = 0; +this.mnemonicIndex = -1; +this.multiClickThreshhold = 0; +this.borderPaintedSet = false; +this.rolloverEnabledSet = false; +this.iconTextGapSet = false; +this.contentAreaFilledSet = false; +this.$setLayout = false; +this.defaultCapable = true; +this.handler = null; +this.changeListener = null; +this.actionListener = null; +this.itemListener = null; +this.changeEvent = null; +this.hideActionText = false; +this.$action = null; +this.actionPropertyChangeListener = null; +if (!Clazz_isClassDefined ("javax.swing.AbstractButton.ButtonChangeListener")) { +javax.swing.AbstractButton.$AbstractButton$ButtonChangeListener$ (); +} +if (!Clazz_isClassDefined ("javax.swing.AbstractButton.Handler")) { +javax.swing.AbstractButton.$AbstractButton$Handler$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "AbstractButton", javax.swing.JComponent, [java.awt.ItemSelectable, javax.swing.SwingConstants]); +Clazz_defineMethod (c$, "setHideActionText", +function (hideActionText) { +if (hideActionText != this.hideActionText) { +this.hideActionText = hideActionText; +if (this.getAction () != null) { +this.setTextFromAction (this.getAction (), false); +}this.firePropertyChangeBool ("hideActionText", !hideActionText, hideActionText); +}}, "~B"); +Clazz_defineMethod (c$, "getHideActionText", +function () { +return this.hideActionText; +}); +Clazz_defineMethod (c$, "getText", +function () { +return this.text; +}); +Clazz_defineMethod (c$, "setText", +function (text) { +var oldValue = this.text; +this.text = text; +this.firePropertyChangeObject ("text", oldValue, text); +this.updateDisplayedMnemonicIndex (text, this.getMnemonic ()); +if (text == null || oldValue == null || !text.equals (oldValue)) { +this.revalidate (); +this.repaint (); +}}, "~S"); +Clazz_defineMethod (c$, "isSelected", +function () { +return this.model.isSelected (); +}); +Clazz_defineMethod (c$, "setSelected", +function (b) { +this.model.setSelected (b); +}, "~B"); +Clazz_defineMethod (c$, "doClick", +function () { +this.doClick (68); +}); +Clazz_defineMethod (c$, "doClick", +function (pressTime) { +}, "~N"); +Clazz_defineMethod (c$, "setMargin", +function (m) { +if (Clazz_instanceOf (m, javax.swing.plaf.UIResource)) { +this.defaultMargin = m; +} else if (Clazz_instanceOf (this.margin, javax.swing.plaf.UIResource)) { +this.defaultMargin = this.margin; +}if (m == null && this.defaultMargin != null) { +m = this.defaultMargin; +}var old = this.margin; +this.margin = m; +this.firePropertyChangeObject ("margin", old, m); +if (old == null || !old.equals (m)) { +this.revalidate (); +this.repaint (); +}}, "java.awt.Insets"); +Clazz_defineMethod (c$, "getMargin", +function () { +return (this.margin == null) ? null : this.margin.clone (); +}); +Clazz_defineMethod (c$, "getIcon", +function () { +return this.defaultIcon; +}); +Clazz_defineMethod (c$, "setIcon", +function (defaultIcon) { +var oldValue = this.defaultIcon; +this.defaultIcon = defaultIcon; +if (defaultIcon !== oldValue && (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource))) { +this.disabledIcon = null; +}this.firePropertyChangeObject ("icon", oldValue, defaultIcon); +if (defaultIcon !== oldValue) { +if (defaultIcon == null || oldValue == null || defaultIcon.getIconWidth () != oldValue.getIconWidth () || defaultIcon.getIconHeight () != oldValue.getIconHeight ()) { +this.revalidate (); +}this.repaint (); +}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getPressedIcon", +function () { +return this.pressedIcon; +}); +Clazz_defineMethod (c$, "setPressedIcon", +function (pressedIcon) { +var oldValue = this.pressedIcon; +this.pressedIcon = pressedIcon; +this.firePropertyChangeObject ("pressedIcon", oldValue, pressedIcon); +if (pressedIcon !== oldValue) { +if (this.getModel ().isPressed ()) { +this.repaint (); +}}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getSelectedIcon", +function () { +return this.selectedIcon; +}); +Clazz_defineMethod (c$, "setSelectedIcon", +function (selectedIcon) { +var oldValue = this.selectedIcon; +this.selectedIcon = selectedIcon; +if (selectedIcon !== oldValue && Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) { +this.disabledSelectedIcon = null; +}this.firePropertyChangeObject ("selectedIcon", oldValue, selectedIcon); +if (selectedIcon !== oldValue) { +if (this.isSelected ()) { +this.repaint (); +}}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getRolloverIcon", +function () { +return this.rolloverIcon; +}); +Clazz_defineMethod (c$, "setRolloverIcon", +function (rolloverIcon) { +var oldValue = this.rolloverIcon; +this.rolloverIcon = rolloverIcon; +this.firePropertyChangeObject ("rolloverIcon", oldValue, rolloverIcon); +this.setRolloverEnabled (true); +if (rolloverIcon !== oldValue) { +this.repaint (); +}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getRolloverSelectedIcon", +function () { +return this.rolloverSelectedIcon; +}); +Clazz_defineMethod (c$, "setRolloverSelectedIcon", +function (rolloverSelectedIcon) { +var oldValue = this.rolloverSelectedIcon; +this.rolloverSelectedIcon = rolloverSelectedIcon; +this.firePropertyChangeObject ("rolloverSelectedIcon", oldValue, rolloverSelectedIcon); +this.setRolloverEnabled (true); +if (rolloverSelectedIcon !== oldValue) { +if (this.isSelected ()) { +this.repaint (); +}}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getDisabledIcon", +function () { +if (this.disabledIcon == null) { +this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.getIcon ()); +if (this.disabledIcon != null) { +this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon); +}}return this.disabledIcon; +}); +Clazz_defineMethod (c$, "setDisabledIcon", +function (disabledIcon) { +var oldValue = this.disabledIcon; +this.disabledIcon = disabledIcon; +this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon); +if (disabledIcon !== oldValue) { +if (!this.isEnabled ()) { +this.repaint (); +}}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getDisabledSelectedIcon", +function () { +if (this.disabledSelectedIcon == null) { +if (this.selectedIcon != null) { +this.disabledSelectedIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledSelectedIcon (this, this.getSelectedIcon ()); +} else { +return this.getDisabledIcon (); +}}return this.disabledSelectedIcon; +}); +Clazz_defineMethod (c$, "setDisabledSelectedIcon", +function (disabledSelectedIcon) { +var oldValue = this.disabledSelectedIcon; +this.disabledSelectedIcon = disabledSelectedIcon; +this.firePropertyChangeObject ("disabledSelectedIcon", oldValue, disabledSelectedIcon); +if (disabledSelectedIcon !== oldValue) { +if (disabledSelectedIcon == null || oldValue == null || disabledSelectedIcon.getIconWidth () != oldValue.getIconWidth () || disabledSelectedIcon.getIconHeight () != oldValue.getIconHeight ()) { +this.revalidate (); +}if (!this.isEnabled () && this.isSelected ()) { +this.repaint (); +}}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getVerticalAlignment", +function () { +return this.verticalAlignment; +}); +Clazz_defineMethod (c$, "setVerticalAlignment", +function (alignment) { +if (alignment == this.verticalAlignment) return; +var oldValue = this.verticalAlignment; +this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment"); +this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "getHorizontalAlignment", +function () { +return this.horizontalAlignment; +}); +Clazz_defineMethod (c$, "setHorizontalAlignment", +function (alignment) { +if (alignment == this.horizontalAlignment) return; +var oldValue = this.horizontalAlignment; +this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment"); +this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "getVerticalTextPosition", +function () { +return this.verticalTextPosition; +}); +Clazz_defineMethod (c$, "setVerticalTextPosition", +function (textPosition) { +if (textPosition == this.verticalTextPosition) return; +var oldValue = this.verticalTextPosition; +this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition"); +this.firePropertyChangeInt ("verticalTextPosition", oldValue, this.verticalTextPosition); +this.revalidate (); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "getHorizontalTextPosition", +function () { +return this.horizontalTextPosition; +}); +Clazz_defineMethod (c$, "setHorizontalTextPosition", +function (textPosition) { +if (textPosition == this.horizontalTextPosition) return; +var oldValue = this.horizontalTextPosition; +this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition"); +this.firePropertyChangeInt ("horizontalTextPosition", oldValue, this.horizontalTextPosition); +this.revalidate (); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "getIconTextGap", +function () { +return this.iconTextGap; +}); +Clazz_defineMethod (c$, "setIconTextGap", +function (iconTextGap) { +var oldValue = this.iconTextGap; +this.iconTextGap = iconTextGap; +this.iconTextGapSet = true; +this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap); +if (iconTextGap != oldValue) { +this.revalidate (); +this.repaint (); +}}, "~N"); +Clazz_defineMethod (c$, "checkHorizontalKey", +function (key, exception) { +if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) { +return key; +} else { +throw new IllegalArgumentException (exception); +}}, "~N,~S"); +Clazz_defineMethod (c$, "checkVerticalKey", +function (key, exception) { +if ((key == 1) || (key == 0) || (key == 3)) { +return key; +} else { +throw new IllegalArgumentException (exception); +}}, "~N,~S"); +Clazz_defineMethod (c$, "removeNotify", +function () { +Clazz_superCall (this, javax.swing.AbstractButton, "removeNotify", []); +if (this.isRolloverEnabled ()) { +this.getModel ().setRollover (false); +}}); +Clazz_defineMethod (c$, "setActionCommand", +function (actionCommand) { +this.getModel ().setActionCommand (actionCommand); +}, "~S"); +Clazz_defineMethod (c$, "getActionCommand", +function () { +var ac = this.getModel ().getActionCommand (); +if (ac == null) { +ac = this.getText (); +}return ac; +}); +Clazz_defineMethod (c$, "setAction", +function (a) { +var oldValue = this.getAction (); +if (this.$action == null || !this.$action.equals (a)) { +this.$action = a; +if (oldValue != null) { +this.removeActionListener (oldValue); +oldValue.removePropertyChangeListener (this.actionPropertyChangeListener); +this.actionPropertyChangeListener = null; +}this.configurePropertiesFromAction (this.$action); +if (this.$action != null) { +if (!this.isListener (java.awt.event.ActionListener, this.$action)) { +this.addActionListener (this.$action); +}this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action); +this.$action.addPropertyChangeListener (this.actionPropertyChangeListener); +}this.firePropertyChangeObject ("action", oldValue, this.$action); +}}, "javax.swing.Action"); +Clazz_defineMethod (c$, "isListener", + function (c, a) { +var isListener = false; +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === c && listeners[i + 1] === a) { +isListener = true; +}} +return isListener; +}, "Class,java.awt.event.ActionListener"); +Clazz_defineMethod (c$, "getAction", +function () { +return this.$action; +}); +Clazz_defineMethod (c$, "configurePropertiesFromAction", +function (a) { +this.setMnemonicFromAction (a); +this.setTextFromAction (a, false); +javax.swing.AbstractAction.setToolTipTextFromAction (this, a); +this.setIconFromAction (a); +this.setActionCommandFromAction (a); +javax.swing.AbstractAction.setEnabledFromAction (this, a); +if (javax.swing.AbstractAction.hasSelectedKey (a) && this.shouldUpdateSelectedStateFromAction ()) { +this.setSelectedFromAction (a); +}this.setDisplayedMnemonicIndexFromAction (a, false); +}, "javax.swing.Action"); +Clazz_overrideMethod (c$, "clientPropertyChanged", +function (key, oldValue, newValue) { +if (key === "hideActionText") { +var current = (Clazz_instanceOf (newValue, Boolean)) ? newValue : false; +if (this.getHideActionText () != current) { +this.setHideActionText (current); +}}}, "~O,~O,~O"); +Clazz_defineMethod (c$, "shouldUpdateSelectedStateFromAction", +function () { +return false; +}); +Clazz_defineMethod (c$, "actionPropertyChanged", +function (action, propertyName) { +if (propertyName === "Name") { +this.setTextFromAction (action, true); +} else if (propertyName === "enabled") { +javax.swing.AbstractAction.setEnabledFromAction (this, action); +} else if (propertyName === "ShortDescription") { +javax.swing.AbstractAction.setToolTipTextFromAction (this, action); +} else if (propertyName === "SmallIcon") { +this.smallIconChanged (action); +} else if (propertyName === "MnemonicKey") { +this.setMnemonicFromAction (action); +} else if (propertyName === "ActionCommandKey") { +this.setActionCommandFromAction (action); +} else if (propertyName === "SwingSelectedKey" && javax.swing.AbstractAction.hasSelectedKey (action) && this.shouldUpdateSelectedStateFromAction ()) { +this.setSelectedFromAction (action); +} else if (propertyName === "SwingDisplayedMnemonicIndexKey") { +this.setDisplayedMnemonicIndexFromAction (action, true); +} else if (propertyName === "SwingLargeIconKey") { +this.largeIconChanged (action); +}}, "javax.swing.Action,~S"); +Clazz_defineMethod (c$, "setDisplayedMnemonicIndexFromAction", + function (a, fromPropertyChange) { +var iValue = (a == null) ? null : a.getValue ("SwingDisplayedMnemonicIndexKey"); +if (fromPropertyChange || iValue != null) { +var value; +if (iValue == null) { +value = -1; +} else { +value = (iValue).intValue (); +var text = this.getText (); +if (text == null || value >= text.length) { +value = -1; +}}this.setDisplayedMnemonicIndex (value); +}}, "javax.swing.Action,~B"); +Clazz_defineMethod (c$, "setMnemonicFromAction", + function (a) { +var n = (a == null) ? null : a.getValue ("MnemonicKey"); +this.setMnemonic ((n == null) ? '\0' : n); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "setTextFromAction", + function (a, propertyChange) { +var hideText = this.getHideActionText (); +if (!propertyChange) { +this.setText ((a != null && !hideText) ? a.getValue ("Name") : null); +} else if (!hideText) { +this.setText (a.getValue ("Name")); +}}, "javax.swing.Action,~B"); +Clazz_defineMethod (c$, "setIconFromAction", +function (a) { +var icon = null; +if (a != null) { +icon = a.getValue ("SwingLargeIconKey"); +if (icon == null) { +icon = a.getValue ("SmallIcon"); +}}this.setIcon (icon); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "smallIconChanged", +function (a) { +if (a.getValue ("SwingLargeIconKey") == null) { +this.setIconFromAction (a); +}}, "javax.swing.Action"); +Clazz_defineMethod (c$, "largeIconChanged", +function (a) { +this.setIconFromAction (a); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "setActionCommandFromAction", + function (a) { +this.setActionCommand ((a != null) ? a.getValue ("ActionCommandKey") : null); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "setSelectedFromAction", + function (a) { +var selected = false; +if (a != null) { +selected = javax.swing.AbstractAction.isSelected (a); +}if (selected != this.isSelected ()) { +this.setSelected (selected); +if (!selected && this.isSelected ()) { +if (Clazz_instanceOf (this.getModel (), javax.swing.DefaultButtonModel)) { +var group = (this.getModel ()).getGroup (); +if (group != null) { +group.clearSelection (); +}}}}}, "javax.swing.Action"); +Clazz_defineMethod (c$, "createActionPropertyChangeListener", +function (a) { +return this.createActionPropertyChangeListener0 (a); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "createActionPropertyChangeListener0", +function (a) { +return new javax.swing.AbstractButton.ButtonActionPropertyChangeListener (this, a); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "isBorderPainted", +function () { +return this.$paintBorder; +}); +Clazz_defineMethod (c$, "setBorderPainted", +function (b) { +var oldValue = this.$paintBorder; +this.$paintBorder = b; +this.borderPaintedSet = true; +this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder); +if (b != oldValue) { +this.revalidate (); +this.repaint (); +}}, "~B"); +Clazz_defineMethod (c$, "paintBorder", +function (g) { +if (this.isBorderPainted ()) { +Clazz_superCall (this, javax.swing.AbstractButton, "paintBorder", [g]); +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "isFocusPainted", +function () { +return this.paintFocus; +}); +Clazz_defineMethod (c$, "setFocusPainted", +function (b) { +var oldValue = this.paintFocus; +this.paintFocus = b; +this.firePropertyChangeBool ("focusPainted", oldValue, this.paintFocus); +if (b != oldValue && this.isFocusOwner ()) { +this.revalidate (); +this.repaint (); +}}, "~B"); +Clazz_defineMethod (c$, "isContentAreaFilled", +function () { +return this.contentAreaFilled; +}); +Clazz_defineMethod (c$, "setContentAreaFilled", +function (b) { +var oldValue = this.contentAreaFilled; +this.contentAreaFilled = b; +this.contentAreaFilledSet = true; +this.firePropertyChangeBool ("contentAreaFilled", oldValue, this.contentAreaFilled); +if (b != oldValue) { +this.repaint (); +}}, "~B"); +Clazz_defineMethod (c$, "isRolloverEnabled", +function () { +return this.rolloverEnabled; +}); +Clazz_defineMethod (c$, "setRolloverEnabled", +function (b) { +var oldValue = this.rolloverEnabled; +this.rolloverEnabled = b; +this.rolloverEnabledSet = true; +this.firePropertyChangeBool ("rolloverEnabled", oldValue, this.rolloverEnabled); +if (b != oldValue) { +this.repaint (); +}}, "~B"); +Clazz_defineMethod (c$, "getMnemonic", +function () { +return this.mnemonic; +}); +Clazz_defineMethod (c$, "setMnemonic", +function (mnemonic) { +this.model.setMnemonic (mnemonic); +this.updateMnemonicProperties (); +}, "~N"); +Clazz_defineMethod (c$, "setMnemonic", +function (mnemonic) { +var vk = (mnemonic).charCodeAt (0); +if (vk >= 97 && vk <= 122) vk -= (32); +this.setMnemonic (vk); +}, "~S"); +Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", +function (index) { +var oldValue = this.mnemonicIndex; +if (index == -1) { +this.mnemonicIndex = -1; +} else { +var text = this.getText (); +var textLength = (text == null) ? 0 : text.length; +if (index < -1 || index >= textLength) { +throw new IllegalArgumentException ("index == " + index); +}}this.mnemonicIndex = index; +this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index); +if (index != oldValue) { +this.revalidate (); +this.repaint (); +}}, "~N"); +Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", +function () { +return this.mnemonicIndex; +}); +Clazz_defineMethod (c$, "updateDisplayedMnemonicIndex", + function (text, mnemonic) { +this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, mnemonic)); +}, "~S,~N"); +Clazz_defineMethod (c$, "updateMnemonicProperties", + function () { +var newMnemonic = this.model.getMnemonic (); +if (this.mnemonic != newMnemonic) { +var oldValue = this.mnemonic; +this.mnemonic = newMnemonic; +this.firePropertyChangeInt ("mnemonic", oldValue, this.mnemonic); +this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic); +this.revalidate (); +this.repaint (); +}}); +Clazz_defineMethod (c$, "setMultiClickThreshhold", +function (threshhold) { +if (threshhold < 0) { +throw new IllegalArgumentException ("threshhold must be >= 0"); +}this.multiClickThreshhold = threshhold; +}, "~N"); +Clazz_defineMethod (c$, "getMultiClickThreshhold", +function () { +return this.multiClickThreshhold; +}); +Clazz_defineMethod (c$, "getModel", +function () { +return this.model; +}); +Clazz_defineMethod (c$, "setModel", +function (newModel) { +var oldModel = this.getModel (); +if (oldModel != null) { +oldModel.removeChangeListener (this.changeListener); +oldModel.removeActionListener (this.actionListener); +oldModel.removeItemListener (this.itemListener); +this.changeListener = null; +this.actionListener = null; +this.itemListener = null; +}this.model = newModel; +if (newModel != null) { +this.changeListener = this.createChangeListener (); +this.actionListener = this.createActionListener (); +this.itemListener = this.createItemListener (); +newModel.addChangeListener (this.changeListener); +newModel.addActionListener (this.actionListener); +newModel.addItemListener (this.itemListener); +this.updateMnemonicProperties (); +Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [newModel.isEnabled ()]); +} else { +this.mnemonic = 0; +}this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic); +this.firePropertyChangeObject ("model", oldModel, newModel); +if (newModel !== oldModel) { +this.revalidate (); +this.repaint (); +}}, "javax.swing.ButtonModel"); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_defineMethod (c$, "setUI", +function (ui) { +Clazz_superCall (this, javax.swing.AbstractButton, "setUI", [ui]); +if (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource)) { +this.setDisabledIcon (null); +}if (Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) { +this.setDisabledSelectedIcon (null); +}}, "javax.swing.plaf.ButtonUI"); +Clazz_overrideMethod (c$, "updateUI", +function () { +}); +Clazz_overrideMethod (c$, "addImpl", +function (comp, constraints, index) { +if (!this.$setLayout) { +this.setLayout ( new javax.swing.OverlayLayout (this)); +}return this.addImplSAEM (comp, constraints, index); +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "setLayout", +function (mgr) { +this.$setLayout = true; +Clazz_superCall (this, javax.swing.AbstractButton, "setLayout", [mgr]); +}, "java.awt.LayoutManager"); +Clazz_defineMethod (c$, "addChangeListener", +function (l) { +this.listenerList.add (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "removeChangeListener", +function (l) { +this.listenerList.remove (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "getChangeListeners", +function () { +return (this.listenerList.getListeners (javax.swing.event.ChangeListener)); +}); +Clazz_defineMethod (c$, "fireStateChanged", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.ChangeListener) { +if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); +(listeners[i + 1]).stateChanged (this.changeEvent); +}} +}); +Clazz_defineMethod (c$, "addActionListener", +function (l) { +this.listenerList.add (java.awt.event.ActionListener, l); +}, "java.awt.event.ActionListener"); +Clazz_defineMethod (c$, "removeActionListener", +function (l) { +if ((l != null) && (this.getAction () === l)) { +this.setAction (null); +} else { +this.listenerList.remove (java.awt.event.ActionListener, l); +}}, "java.awt.event.ActionListener"); +Clazz_defineMethod (c$, "getActionListeners", +function () { +return (this.listenerList.getListeners (java.awt.event.ActionListener)); +}); +Clazz_defineMethod (c$, "createChangeListener", +function () { +return this.getHandler (); +}); +Clazz_defineMethod (c$, "fireActionPerformed", +function (event) { +var listeners = this.listenerList.getListenerList (); +var e = null; +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === java.awt.event.ActionListener) { +if (e == null) { +var actionCommand = event.getActionCommand (); +if (actionCommand == null) { +actionCommand = this.getActionCommand (); +}e = new java.awt.event.ActionEvent (this, 1001, actionCommand, event.getWhen (), event.getModifiers ()); +}(listeners[i + 1]).actionPerformed (e); +}} +}, "java.awt.event.ActionEvent"); +Clazz_defineMethod (c$, "fireItemStateChanged", +function (event) { +var listeners = this.listenerList.getListenerList (); +var e = null; +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === java.awt.event.ItemListener) { +if (e == null) { +e = new java.awt.event.ItemEvent (this, 701, this, event.getStateChange ()); +}(listeners[i + 1]).itemStateChanged (e); +}} +}, "java.awt.event.ItemEvent"); +Clazz_defineMethod (c$, "createActionListener", +function () { +return this.getHandler (); +}); +Clazz_defineMethod (c$, "createItemListener", +function () { +return this.getHandler (); +}); +Clazz_defineMethod (c$, "setEnabled", +function (b) { +if (!b && this.model.isRollover ()) { +this.model.setRollover (false); +}Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [b]); +this.model.setEnabled (b); +}, "~B"); +Clazz_defineMethod (c$, "getLabel", +function () { +return this.getText (); +}); +Clazz_defineMethod (c$, "setLabel", +function (label) { +this.setText (label); +}, "~S"); +Clazz_overrideMethod (c$, "addItemListener", +function (l) { +this.listenerList.add (java.awt.event.ItemListener, l); +}, "java.awt.event.ItemListener"); +Clazz_overrideMethod (c$, "removeItemListener", +function (l) { +this.listenerList.remove (java.awt.event.ItemListener, l); +}, "java.awt.event.ItemListener"); +Clazz_defineMethod (c$, "getItemListeners", +function () { +return this.listenerList.getListeners (java.awt.event.ItemListener); +}); +Clazz_overrideMethod (c$, "getSelectedObjects", +function () { +if (this.isSelected () == false) { +return null; +}var selectedObjects = new Array (1); +selectedObjects[0] = this.getText (); +return selectedObjects; +}); +Clazz_defineMethod (c$, "init", +function (text, icon) { +if (text != null) { +this.setText (text); +}if (icon != null) { +this.setIcon (icon); +}this.updateUI (); +this.setAlignmentX (0.0); +this.setAlignmentY (0.5); +}, "~S,javax.swing.Icon"); +Clazz_defineMethod (c$, "imageUpdate", +function (img, infoflags, x, y, w, h) { +var iconDisplayed = this.getIcon (); +if (iconDisplayed == null) { +return false; +}if (!this.model.isEnabled ()) { +if (this.model.isSelected ()) { +iconDisplayed = this.getDisabledSelectedIcon (); +} else { +iconDisplayed = this.getDisabledIcon (); +}} else if (this.model.isPressed () && this.model.isArmed ()) { +iconDisplayed = this.getPressedIcon (); +} else if (this.isRolloverEnabled () && this.model.isRollover ()) { +if (this.model.isSelected ()) { +iconDisplayed = this.getRolloverSelectedIcon (); +} else { +iconDisplayed = this.getRolloverIcon (); +}} else if (this.model.isSelected ()) { +iconDisplayed = this.getSelectedIcon (); +}if (!javax.swing.SwingUtilities.doesIconReferenceImage (iconDisplayed, img)) { +return false; +}return Clazz_superCall (this, javax.swing.AbstractButton, "imageUpdate", [img, infoflags, x, y, w, h]); +}, "java.awt.Image,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setUIProperty", +function (propertyName, value) { +if (propertyName === "borderPainted") { +if (!this.borderPaintedSet) { +this.setBorderPainted ((value).booleanValue ()); +this.borderPaintedSet = false; +}} else if (propertyName === "rolloverEnabled") { +if (!this.rolloverEnabledSet) { +this.setRolloverEnabled ((value).booleanValue ()); +this.rolloverEnabledSet = false; +}} else if (propertyName === "iconTextGap") { +if (!this.iconTextGapSet) { +this.setIconTextGap ((value).intValue ()); +this.iconTextGapSet = false; +}} else if (propertyName === "contentAreaFilled") { +if (!this.contentAreaFilledSet) { +this.setContentAreaFilled ((value).booleanValue ()); +this.contentAreaFilledSet = false; +}} else { +Clazz_superCall (this, javax.swing.AbstractButton, "setUIProperty", [propertyName, value]); +}}, "~S,~O"); +Clazz_defineMethod (c$, "paramString", +function () { +var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : ""); +var pressedIconString = ((this.pressedIcon != null) && (this.pressedIcon !== this) ? this.pressedIcon.toString () : ""); +var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : ""); +var selectedIconString = ((this.selectedIcon != null) && (this.selectedIcon !== this) ? this.selectedIcon.toString () : ""); +var disabledSelectedIconString = ((this.disabledSelectedIcon != null) && (this.disabledSelectedIcon !== this) ? this.disabledSelectedIcon.toString () : ""); +var rolloverIconString = ((this.rolloverIcon != null) && (this.rolloverIcon !== this) ? this.rolloverIcon.toString () : ""); +var rolloverSelectedIconString = ((this.rolloverSelectedIcon != null) && (this.rolloverSelectedIcon !== this) ? this.rolloverSelectedIcon.toString () : ""); +var paintBorderString = (this.$paintBorder ? "true" : "false"); +var paintFocusString = (this.paintFocus ? "true" : "false"); +var rolloverEnabledString = (this.rolloverEnabled ? "true" : "false"); +return Clazz_superCall (this, javax.swing.AbstractButton, "paramString", []) + ",defaultIcon=" + defaultIconString + ",disabledIcon=" + disabledIconString + ",disabledSelectedIcon=" + disabledSelectedIconString + ",margin=" + this.margin + ",paintBorder=" + paintBorderString + ",paintFocus=" + paintFocusString + ",pressedIcon=" + pressedIconString + ",rolloverEnabled=" + rolloverEnabledString + ",rolloverIcon=" + rolloverIconString + ",rolloverSelectedIcon=" + rolloverSelectedIconString + ",selectedIcon=" + selectedIconString + ",text=" + this.text; +}); +Clazz_defineMethod (c$, "getHandler", + function () { +if (this.handler == null) { +this.handler = Clazz_innerTypeInstance (javax.swing.AbstractButton.Handler, this, null); +}return this.handler; +}); +c$.$AbstractButton$ButtonChangeListener$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +Clazz_instantialize (this, arguments); +}, javax.swing.AbstractButton, "ButtonChangeListener", null, javax.swing.event.ChangeListener); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_overrideMethod (c$, "stateChanged", +function (a) { +this.b$["javax.swing.AbstractButton"].getHandler ().stateChanged (a); +}, "javax.swing.event.ChangeEvent"); +c$ = Clazz_p0p (); +}; +c$.$AbstractButton$Handler$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +Clazz_instantialize (this, arguments); +}, javax.swing.AbstractButton, "Handler", null, [java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener]); +Clazz_overrideMethod (c$, "stateChanged", +function (a) { +this.b$["javax.swing.AbstractButton"].updateMnemonicProperties (); +if (this.b$["javax.swing.AbstractButton"].isEnabled () != this.b$["javax.swing.AbstractButton"].model.isEnabled ()) { +this.b$["javax.swing.AbstractButton"].setEnabled (this.b$["javax.swing.AbstractButton"].model.isEnabled ()); +}this.b$["javax.swing.AbstractButton"].fireStateChanged (); +this.b$["javax.swing.AbstractButton"].repaint (); +}, "javax.swing.event.ChangeEvent"); +Clazz_overrideMethod (c$, "actionPerformed", +function (a) { +this.b$["javax.swing.AbstractButton"].fireActionPerformed (a); +}, "java.awt.event.ActionEvent"); +Clazz_overrideMethod (c$, "itemStateChanged", +function (a) { +this.b$["javax.swing.AbstractButton"].fireItemStateChanged (a); +if (this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction ()) { +var b = this.b$["javax.swing.AbstractButton"].getAction (); +if (b != null && javax.swing.AbstractAction.hasSelectedKey (b)) { +var c = this.b$["javax.swing.AbstractButton"].isSelected (); +var d = javax.swing.AbstractAction.isSelected (b); +if (d != c) { +b.putValue ("SwingSelectedKey", new Boolean (c)); +}}}}, "java.awt.event.ItemEvent"); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.AbstractButton, "ButtonActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener); +Clazz_overrideMethod (c$, "actionPropertyChanged", +function (a, b, c) { +if (javax.swing.AbstractAction.shouldReconfigure (c)) { +a.configurePropertiesFromAction (b); +} else { +a.actionPropertyChanged (b, c.getPropertyName ()); +}}, "javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent"); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"MODEL_CHANGED_PROPERTY", "model", +"TEXT_CHANGED_PROPERTY", "text", +"MNEMONIC_CHANGED_PROPERTY", "mnemonic", +"MARGIN_CHANGED_PROPERTY", "margin", +"VERTICAL_ALIGNMENT_CHANGED_PROPERTY", "verticalAlignment", +"HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY", "horizontalAlignment", +"VERTICAL_TEXT_POSITION_CHANGED_PROPERTY", "verticalTextPosition", +"HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY", "horizontalTextPosition", +"BORDER_PAINTED_CHANGED_PROPERTY", "borderPainted", +"FOCUS_PAINTED_CHANGED_PROPERTY", "focusPainted", +"ROLLOVER_ENABLED_CHANGED_PROPERTY", "rolloverEnabled", +"CONTENT_AREA_FILLED_CHANGED_PROPERTY", "contentAreaFilled", +"ICON_CHANGED_PROPERTY", "icon", +"PRESSED_ICON_CHANGED_PROPERTY", "pressedIcon", +"SELECTED_ICON_CHANGED_PROPERTY", "selectedIcon", +"ROLLOVER_ICON_CHANGED_PROPERTY", "rolloverIcon", +"ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY", "rolloverSelectedIcon", +"DISABLED_ICON_CHANGED_PROPERTY", "disabledIcon", +"DISABLED_SELECTED_ICON_CHANGED_PROPERTY", "disabledSelectedIcon"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (null, "javax.swing.ArrayTable", ["java.util.Hashtable"], function () { +c$ = Clazz_decorateAsClass (function () { +this.table = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "ArrayTable", null, Cloneable); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "put", +function (key, value) { +if (this.table == null) { +this.table = Clazz_newArray (-1, [key, value]); +} else { +var size = this.size (); +if (size < 8) { +if (this.containsKey (key)) { +var tmp = this.table; +for (var i = 0; i < tmp.length - 1; i += 2) { +if (tmp[i].equals (key)) { +tmp[i + 1] = value; +break; +}} +} else { +var array = this.table; +var i = array.length; +var tmp = new Array (i + 2); +System.arraycopy (array, 0, tmp, 0, i); +tmp[i] = key; +tmp[i + 1] = value; +this.table = tmp; +}} else { +if ((size == 8) && this.isArray ()) { +this.grow (); +}(this.table).put (key, value); +}}}, "~O,~O"); +Clazz_defineMethod (c$, "get", +function (key) { +var value = null; +if (this.table != null) { +if (this.isArray ()) { +var array = this.table; +for (var i = 0; i < array.length - 1; i += 2) { +if (array[i].equals (key)) { +value = array[i + 1]; +break; +}} +} else { +value = (this.table).get (key); +}}return value; +}, "~O"); +Clazz_defineMethod (c$, "size", +function () { +var size; +if (this.table == null) return 0; +if (this.isArray ()) { +size = Clazz_doubleToInt ((this.table).length / 2); +} else { +size = (this.table).size (); +}return size; +}); +Clazz_defineMethod (c$, "containsKey", +function (key) { +var contains = false; +if (this.table != null) { +if (this.isArray ()) { +var array = this.table; +for (var i = 0; i < array.length - 1; i += 2) { +if (array[i].equals (key)) { +contains = true; +break; +}} +} else { +contains = (this.table).containsKey (key); +}}return contains; +}, "~O"); +Clazz_defineMethod (c$, "remove", +function (key) { +var value = null; +if (key == null) { +return null; +}if (this.table != null) { +if (this.isArray ()) { +var index = -1; +var array = this.table; +for (var i = array.length - 2; i >= 0; i -= 2) { +if (array[i].equals (key)) { +index = i; +value = array[i + 1]; +break; +}} +if (index != -1) { +var tmp = new Array (array.length - 2); +System.arraycopy (array, 0, tmp, 0, index); +if (index < tmp.length) System.arraycopy (array, index + 2, tmp, index, tmp.length - index); +this.table = (tmp.length == 0) ? null : tmp; +}} else { +value = (this.table).remove (key); +}if (this.size () == 7 && !this.isArray ()) { +this.shrink (); +}}return value; +}, "~O"); +Clazz_defineMethod (c$, "clear", +function () { +this.table = null; +}); +Clazz_overrideMethod (c$, "clone", +function () { +var newArrayTable = new javax.swing.ArrayTable (); +if (this.isArray ()) { +var array = this.table; +for (var i = 0; i < array.length - 1; i += 2) { +newArrayTable.put (array[i], array[i + 1]); +} +} else { +var tmp = this.table; +var keys = tmp.keys (); +while (keys.hasMoreElements ()) { +var o = keys.nextElement (); +newArrayTable.put (o, tmp.get (o)); +} +}return newArrayTable; +}); +Clazz_defineMethod (c$, "getKeys", +function (keys) { +if (this.table == null) { +return null; +}if (this.isArray ()) { +var array = this.table; +if (keys == null) { +keys = new Array (Clazz_doubleToInt (array.length / 2)); +}for (var i = 0, index = 0; i < array.length - 1; i += 2, index++) { +keys[index] = array[i]; +} +} else { +var tmp = this.table; +var enum_ = tmp.keys (); +var counter = tmp.size (); +if (keys == null) { +keys = new Array (counter); +}while (counter > 0) { +keys[--counter] = enum_.nextElement (); +} +}return keys; +}, "~A"); +Clazz_defineMethod (c$, "isArray", + function () { +return (Clazz_instanceOf (this.table, Array)); +}); +Clazz_defineMethod (c$, "grow", + function () { +var array = this.table; +var tmp = new java.util.Hashtable (Clazz_doubleToInt (array.length / 2)); +for (var i = 0; i < array.length; i += 2) { +tmp.put (array[i], array[i + 1]); +} +this.table = tmp; +}); +Clazz_defineMethod (c$, "shrink", + function () { +var tmp = this.table; +var array = new Array (tmp.size () * 2); +var keys = tmp.keys (); +var j = 0; +while (keys.hasMoreElements ()) { +var o = keys.nextElement (); +array[j] = o; +array[j + 1] = tmp.get (o); +j += 2; +} +this.table = array; +}); +Clazz_defineStatics (c$, +"ARRAY_BOUNDARY", 8); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () { +c$ = Clazz_decorateAsClass (function () { +this.notifyOnEDT = false; +Clazz_instantialize (this, arguments); +}, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport); +Clazz_makeConstructor (c$, +function (sourceBean) { +this.construct (sourceBean, false); +}, "~O"); +Clazz_makeConstructor (c$, +function (sourceBean, notifyOnEDT) { +Clazz_superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]); +this.notifyOnEDT = notifyOnEDT; +}, "~O,~B"); +Clazz_defineMethod (c$, "firePropertyChangeEvt", +function (evt) { +if (evt == null) { +throw new NullPointerException (); +}if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) { +Clazz_superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]); +} else { +javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("javax.swing.event.SwingPropertyChangeSupport$1") ? 0 : javax.swing.event.SwingPropertyChangeSupport.$SwingPropertyChangeSupport$1$ ()), Clazz_innerTypeInstance (javax.swing.event.SwingPropertyChangeSupport$1, this, Clazz_cloneFinals ("evt", evt)))); +}}, "java.beans.PropertyChangeEvent"); +Clazz_defineMethod (c$, "isNotifyOnEDT", +function () { +return this.notifyOnEDT; +}); +c$.$SwingPropertyChangeSupport$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt); +}); +c$ = Clazz_p0p (); +}; +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JComponent"], "javax.swing.JLayeredPane", ["java.util.ArrayList", "$.Hashtable", "java.awt.Color"], function () { +c$ = Clazz_decorateAsClass (function () { +this.componentToLayer = null; +this.optimizedDrawingPossible = true; +Clazz_instantialize (this, arguments); +}, javax.swing, "JLayeredPane", javax.swing.JComponent); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JLayeredPane, []); +this.setLayout (null); +}); +Clazz_defineMethod (c$, "validateOptimizedDrawing", + function () { +var layeredComponentFound = false; +{ +var layer = null; +for (var c, $c = 0, $$c = this.getComponents (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { +layer = null; +if ((Clazz_instanceOf (c, javax.swing.JComponent) && (layer = (c).getClientProperty ("layeredContainerLayer")) != null)) { +if (layer != null && layer.equals (javax.swing.JLayeredPane.FRAME_CONTENT_LAYER)) continue; +layeredComponentFound = true; +break; +}} +}if (layeredComponentFound) this.optimizedDrawingPossible = false; + else this.optimizedDrawingPossible = true; +}); +Clazz_overrideMethod (c$, "addImpl", +function (comp, constraints, index) { +var layer = javax.swing.JLayeredPane.DEFAULT_LAYER.intValue (); +var pos; +if (Clazz_instanceOf (constraints, Integer)) { +layer = (constraints).intValue (); +this.setLayer (comp, layer); +} else layer = this.getLayer (comp); +pos = this.insertIndexForLayer (layer, index); +this.addImplSAEM (comp, constraints, pos); +comp.validate (); +comp.repaint (); +this.validateOptimizedDrawing (); +return comp; +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "remove", +function (index) { +var c = this.getComponent (index); +Clazz_superCall (this, javax.swing.JLayeredPane, "remove", [index]); +if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) { +this.getComponentToLayer ().remove (c); +}this.validateOptimizedDrawing (); +}, "~N"); +Clazz_defineMethod (c$, "removeAll", +function () { +var children = this.getComponents (); +var cToL = this.getComponentToLayer (); +for (var counter = children.length - 1; counter >= 0; counter--) { +var c = children[counter]; +if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) { +cToL.remove (c); +}} +Clazz_superCall (this, javax.swing.JLayeredPane, "removeAll", []); +}); +Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", +function () { +return this.optimizedDrawingPossible; +}); +c$.putLayer = Clazz_defineMethod (c$, "putLayer", +function (c, layer) { +var layerObj; +layerObj = new Integer (layer); +c.putClientProperty ("layeredContainerLayer", layerObj); +}, "javax.swing.JComponent,~N"); +c$.getLayer = Clazz_defineMethod (c$, "getLayer", +function (c) { +var i; +if ((i = c.getClientProperty ("layeredContainerLayer")) != null) return i.intValue (); +return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue (); +}, "javax.swing.JComponent"); +c$.getLayeredPaneAbove = Clazz_defineMethod (c$, "getLayeredPaneAbove", +function (c) { +if (c == null) return null; +var parent = c.getParent (); +while (parent != null && !(Clazz_instanceOf (parent, javax.swing.JLayeredPane))) parent = parent.getParent (); + +return parent; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "setLayer", +function (c, layer) { +this.setLayer (c, layer, -1); +}, "java.awt.Component,~N"); +Clazz_defineMethod (c$, "setLayer", +function (c, layer, position) { +var layerObj; +layerObj = this.getObjectForLayer (layer); +if (layer == this.getLayer (c) && position == this.getPosition (c)) { +this.repaint (c.getBounds ()); +return; +}if (Clazz_instanceOf (c, javax.swing.JComponent)) (c).putClientProperty ("layeredContainerLayer", layerObj); + else this.getComponentToLayer ().put (c, layerObj); +if (c.getParent () == null || c.getParent () !== this) { +this.repaint (c.getBounds ()); +return; +}var index = this.insertIndexForLayer (c, layer, position); +this.setComponentZOrder (c, index); +this.repaint (c.getBounds ()); +}, "java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getLayer", +function (c) { +var i; +if (Clazz_instanceOf (c, javax.swing.JComponent)) i = (c).getClientProperty ("layeredContainerLayer"); + else i = this.getComponentToLayer ().get (c); +if (i == null) return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue (); +return i.intValue (); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getIndexOf", +function (c) { +var i; +var count; +count = this.getComponentCount (); +for (i = 0; i < count; i++) { +if (c === this.getComponent (i)) return i; +} +return -1; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "moveToFront", +function (c) { +this.setPosition (c, 0); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "moveToBack", +function (c) { +this.setPosition (c, -1); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "setPosition", +function (c, position) { +this.setLayer (c, this.getLayer (c), position); +}, "java.awt.Component,~N"); +Clazz_defineMethod (c$, "getPosition", +function (c) { +var i; +var count; +var startLayer; +var curLayer; +var startLocation; +var pos = 0; +count = this.getComponentCount (); +startLocation = this.getIndexOf (c); +if (startLocation == -1) return -1; +startLayer = this.getLayer (c); +for (i = startLocation - 1; i >= 0; i--) { +curLayer = this.getLayer (this.getComponent (i)); +if (curLayer == startLayer) pos++; + else return pos; +} +return pos; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "highestLayer", +function () { +if (this.getComponentCount () > 0) return this.getLayer (this.getComponent (0)); +return 0; +}); +Clazz_defineMethod (c$, "lowestLayer", +function () { +var count = this.getComponentCount (); +if (count > 0) return this.getLayer (this.getComponent (count - 1)); +return 0; +}); +Clazz_defineMethod (c$, "getComponentCountInLayer", +function (layer) { +var i; +var count; +var curLayer; +var layerCount = 0; +count = this.getComponentCount (); +for (i = 0; i < count; i++) { +curLayer = this.getLayer (this.getComponent (i)); +if (curLayer == layer) { +layerCount++; +} else if (layerCount > 0 || curLayer < layer) { +break; +}} +return layerCount; +}, "~N"); +Clazz_defineMethod (c$, "getComponentsInLayer", +function (layer) { +var i; +var count; +var curLayer; +var layerCount = 0; +var results; +results = new Array (this.getComponentCountInLayer (layer)); +count = this.getComponentCount (); +for (i = 0; i < count; i++) { +curLayer = this.getLayer (this.getComponent (i)); +if (curLayer == layer) { +results[layerCount++] = this.getComponent (i); +} else if (layerCount > 0 || curLayer < layer) { +break; +}} +return results; +}, "~N"); +Clazz_defineMethod (c$, "paint", +function (g) { +if (this.isOpaque ()) { +var r = g.getClipBounds (); +var c = this.getBackground (); +if (c == null) c = java.awt.Color.lightGray; +g.setColor (c); +if (r != null) { +g.fillRect (r.x, r.y, r.width, r.height); +} else { +g.fillRect (0, 0, this.getWidth (), this.getHeight ()); +}}Clazz_superCall (this, javax.swing.JLayeredPane, "paint", [g]); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "getComponentToLayer", +function () { +if (this.componentToLayer == null) this.componentToLayer = new java.util.Hashtable (4); +return this.componentToLayer; +}); +Clazz_defineMethod (c$, "getObjectForLayer", +function (layer) { +var layerObj; +switch (layer) { +case 0: +layerObj = javax.swing.JLayeredPane.DEFAULT_LAYER; +break; +case 100: +layerObj = javax.swing.JLayeredPane.PALETTE_LAYER; +break; +case 200: +layerObj = javax.swing.JLayeredPane.MODAL_LAYER; +break; +case 300: +layerObj = javax.swing.JLayeredPane.POPUP_LAYER; +break; +case 400: +layerObj = javax.swing.JLayeredPane.DRAG_LAYER; +break; +default: +layerObj = new Integer (layer); +} +return layerObj; +}, "~N"); +Clazz_defineMethod (c$, "insertIndexForLayer", +function (layer, position) { +return this.insertIndexForLayer (null, layer, position); +}, "~N,~N"); +Clazz_defineMethod (c$, "insertIndexForLayer", + function (comp, layer, position) { +var i; +var count; +var curLayer; +var layerStart = -1; +var layerEnd = -1; +var componentCount = this.getComponentCount (); +var compList = new java.util.ArrayList (componentCount); +for (var index = 0; index < componentCount; index++) { +if (this.getComponent (index) !== comp) { +compList.add (this.getComponent (index)); +}} +count = compList.size (); +for (i = 0; i < count; i++) { +curLayer = this.getLayer (compList.get (i)); +if (layerStart == -1 && curLayer == layer) { +layerStart = i; +}if (curLayer < layer) { +if (i == 0) { +layerStart = 0; +layerEnd = 0; +} else { +layerEnd = i; +}break; +}} +if (layerStart == -1 && layerEnd == -1) return count; +if (layerStart != -1 && layerEnd == -1) layerEnd = count; +if (layerEnd != -1 && layerStart == -1) layerStart = layerEnd; +if (position == -1) return layerEnd; +if (position > -1 && layerStart + position <= layerEnd) return layerStart + position; +return layerEnd; +}, "java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "paramString", +function () { +var optimizedDrawingPossibleString = (this.optimizedDrawingPossible ? "true" : "false"); +return Clazz_superCall (this, javax.swing.JLayeredPane, "paramString", []) + ",optimizedDrawingPossible=" + optimizedDrawingPossibleString; +}); +c$.DEFAULT_LAYER = c$.prototype.DEFAULT_LAYER = new Integer (0); +c$.PALETTE_LAYER = c$.prototype.PALETTE_LAYER = new Integer (100); +c$.MODAL_LAYER = c$.prototype.MODAL_LAYER = new Integer (200); +c$.POPUP_LAYER = c$.prototype.POPUP_LAYER = new Integer (300); +c$.DRAG_LAYER = c$.prototype.DRAG_LAYER = new Integer (400); +c$.FRAME_CONTENT_LAYER = c$.prototype.FRAME_CONTENT_LAYER = new Integer (-30000); +Clazz_defineStatics (c$, +"LAYER_PROPERTY", "layeredContainerLayer"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JComponent"], "javax.swing.JPanel", ["java.lang.Boolean", "java.awt.FlowLayout", "javax.swing.UIManager"], function () { +c$ = Clazz_declareType (javax.swing, "JPanel", javax.swing.JComponent); +Clazz_makeConstructor (c$, +function (layout, isDoubleBuffered) { +Clazz_superConstructor (this, javax.swing.JPanel, []); +this.setLayout (layout); +this.setUIProperty ("opaque", Boolean.TRUE); +this.updateUI (); +}, "java.awt.LayoutManager,~B"); +Clazz_makeConstructor (c$, +function (layout) { +this.construct (layout, true); +}, "java.awt.LayoutManager"); +Clazz_makeConstructor (c$, +function (isDoubleBuffered) { +this.construct ( new java.awt.FlowLayout (), isDoubleBuffered); +}, "~B"); +Clazz_makeConstructor (c$, +function () { +this.construct (true); +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "PanelUI"; +}); +Clazz_defineStatics (c$, +"$uiClassID", "PanelUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.lang.Enum", "java.util.Enumeration", "javax.swing.UIDefaults"], "javax.swing.MultiUIDefaults", ["java.lang.StringBuffer", "java.util.HashSet"], function () { +c$ = Clazz_decorateAsClass (function () { +this.tables = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "MultiUIDefaults", javax.swing.UIDefaults); +Clazz_makeConstructor (c$, +function (defaults) { +Clazz_superConstructor (this, javax.swing.MultiUIDefaults); +this.tables = defaults; +}, "~A"); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.MultiUIDefaults); +this.tables = new Array (0); +}); +Clazz_defineMethod (c$, "get", +function (key) { +var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key]); +if (value != null) { +return value; +}for (var i = 0; i < this.tables.length; i++) { +var table = this.tables[i]; +value = (table != null) ? table.get (key) : null; +if (value != null) { +return value; +}} +return null; +}, "~O"); +Clazz_defineMethod (c$, "get", +function (key, l) { +var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key, l]); +if (value != null) { +return value; +}for (var i = 0; i < this.tables.length; i++) { +var table = this.tables[i]; +value = (table != null) ? table.get (key, l) : null; +if (value != null) { +return value; +}} +return null; +}, "~O,java.util.Locale"); +Clazz_overrideMethod (c$, "size", +function () { +return this.entrySet ().size (); +}); +Clazz_overrideMethod (c$, "isEmpty", +function () { +return this.size () == 0; +}); +Clazz_overrideMethod (c$, "keys", +function () { +return new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS, this.entrySet ()); +}); +Clazz_overrideMethod (c$, "elements", +function () { +return new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS, this.entrySet ()); +}); +Clazz_defineMethod (c$, "entrySet", +function () { +var set = new java.util.HashSet (); +for (var i = this.tables.length - 1; i >= 0; i--) { +if (this.tables[i] != null) { +set.addAll (this.tables[i].entrySet ()); +}} +set.addAll (Clazz_superCall (this, javax.swing.MultiUIDefaults, "entrySet", [])); +return set; +}); +Clazz_defineMethod (c$, "getUIError", +function (msg) { +if (this.tables.length > 0) { +this.tables[0].getUIError (msg); +} else { +Clazz_superCall (this, javax.swing.MultiUIDefaults, "getUIError", [msg]); +}}, "~S"); +Clazz_defineMethod (c$, "remove", +function (key) { +var value = null; +for (var i = this.tables.length - 1; i >= 0; i--) { +if (this.tables[i] != null) { +var v = this.tables[i].remove (key); +if (v != null) { +value = v; +}}} +var v = Clazz_superCall (this, javax.swing.MultiUIDefaults, "remove", [key]); +if (v != null) { +value = v; +}return value; +}, "~O"); +Clazz_defineMethod (c$, "clear", +function () { +Clazz_superCall (this, javax.swing.MultiUIDefaults, "clear", []); +for (var i = 0; i < this.tables.length; i++) { +var table = this.tables[i]; +if (table != null) { +table.clear (); +}} +}); +Clazz_overrideMethod (c$, "toString", +function () { +var buf = new StringBuffer (); +buf.append ("{"); +var keys = this.keys (); +while (keys.hasMoreElements ()) { +var key = keys.nextElement (); +buf.append (key + "=" + this.get (key) + ", "); +} +var length = buf.length (); +if (length > 1) { +buf.$delete (length - 2, length); +}buf.append ("}"); +return buf.toString (); +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.iterator = null; +this.type = null; +Clazz_instantialize (this, arguments); +}, javax.swing.MultiUIDefaults, "MultiUIDefaultsEnumerator", null, java.util.Enumeration); +Clazz_makeConstructor (c$, +function (a, b) { +this.type = a; +this.iterator = b.iterator (); +}, "javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type,java.util.Set"); +Clazz_overrideMethod (c$, "hasMoreElements", +function () { +return this.iterator.hasNext (); +}); +Clazz_overrideMethod (c$, "nextElement", +function () { +switch (this.type) { +case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS: +return this.iterator.next ().getKey (); +case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS: +return this.iterator.next ().getValue (); +default: +return null; +} +}); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator, "Type", Enum); +Clazz_defineEnumConstant (c$, "KEYS", 0, []); +Clazz_defineEnumConstant (c$, "ELEMENTS", 1, []); +c$ = Clazz_p0p (); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (null, "java.awt.Font", ["java.awt.font.TextAttribute", "java.awt.geom.AffineTransform", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.family = null; +this.name = null; +this.style = 0; +this.size = 0; +this.pointSize = 0; +this.$hasLayoutAttributes = false; +this.nonIdentityTx = false; +this.hash = 0; +Clazz_instantialize (this, arguments); +}, java.awt, "Font"); +Clazz_makeConstructor (c$, +function (name, style, size) { +this.name = (name != null) ? name : "Default"; +this.style = (style & -4) == 0 ? style : 0; +this.size = size; +this.pointSize = size; +}, "~S,~N,~N"); +Clazz_makeConstructor (c$, + function (name, style, sizePts) { +this.name = (name != null) ? name : "Default"; +this.style = (style & -4) == 0 ? style : 0; +this.size = Clazz_doubleToInt (sizePts + 0.5); +this.pointSize = sizePts; +}, "~S,~N,~N"); +Clazz_makeConstructor (c$, +function (font) { +this.name = font.name; +this.style = font.style; +this.size = font.size; +this.pointSize = font.pointSize; +}, "java.awt.Font"); +Clazz_defineMethod (c$, "getTransform", +function () { +return new java.awt.geom.AffineTransform (); +}); +Clazz_defineMethod (c$, "getFamily", +function () { +return (this.family == null ? this.family = swingjs.JSToolkit.getFontFamily (this) : this.family); +}); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "getFontName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "getStyle", +function () { +return this.style; +}); +Clazz_defineMethod (c$, "getSize", +function () { +return this.size; +}); +Clazz_defineMethod (c$, "getSize2D", +function () { +return this.pointSize; +}); +Clazz_defineMethod (c$, "isPlain", +function () { +return this.style == 0; +}); +Clazz_defineMethod (c$, "isBold", +function () { +return (this.style & 1) != 0; +}); +Clazz_defineMethod (c$, "isItalic", +function () { +return (this.style & 2) != 0; +}); +Clazz_defineMethod (c$, "isTransformed", +function () { +return this.nonIdentityTx; +}); +Clazz_defineMethod (c$, "hasLayoutAttributes", +function () { +return this.$hasLayoutAttributes; +}); +c$.getFont = Clazz_defineMethod (c$, "getFont", +function (nm) { +return java.awt.Font.getFont (nm, null); +}, "~S"); +c$.decode = Clazz_defineMethod (c$, "decode", +function (str) { +var fontName = str; +var styleName = ""; +var fontSize = 12; +var fontStyle = 0; +if (str == null) { +return new java.awt.Font ("Dialog", fontStyle, fontSize); +}var lastHyphen = str.lastIndexOf ('-'); +var lastSpace = str.lastIndexOf (' '); +var sepChar = (lastHyphen > lastSpace) ? '-' : ' '; +var sizeIndex = str.lastIndexOf (sepChar); +var styleIndex = str.lastIndexOf (sepChar, sizeIndex - 1); +var strlen = str.length; +if (sizeIndex > 0 && sizeIndex + 1 < strlen) { +try { +fontSize = Integer.$valueOf (str.substring (sizeIndex + 1)).intValue (); +if (fontSize <= 0) { +fontSize = 12; +}} catch (e) { +if (Clazz_exceptionOf (e, NumberFormatException)) { +styleIndex = sizeIndex; +sizeIndex = strlen; +if (str.charAt (sizeIndex - 1) == sepChar) { +sizeIndex--; +}} else { +throw e; +} +} +}if (styleIndex >= 0 && styleIndex + 1 < strlen) { +styleName = str.substring (styleIndex + 1, sizeIndex); +styleName = styleName.toLowerCase (); +if (styleName.equals ("bolditalic")) { +fontStyle = 3; +} else if (styleName.equals ("italic")) { +fontStyle = 2; +} else if (styleName.equals ("bold")) { +fontStyle = 1; +} else if (styleName.equals ("plain")) { +fontStyle = 0; +} else { +styleIndex = sizeIndex; +if (str.charAt (styleIndex - 1) == sepChar) { +styleIndex--; +}}fontName = str.substring (0, styleIndex); +} else { +var fontEnd = strlen; +if (styleIndex > 0) { +fontEnd = styleIndex; +} else if (sizeIndex > 0) { +fontEnd = sizeIndex; +}if (fontEnd > 0 && str.charAt (fontEnd - 1) == sepChar) { +fontEnd--; +}fontName = str.substring (0, fontEnd); +}return new java.awt.Font (fontName, fontStyle, fontSize); +}, "~S"); +c$.getFont = Clazz_defineMethod (c$, "getFont", +function (nm, font) { +var str = null; +try { +str = System.getProperty (nm); +} catch (e) { +if (Clazz_exceptionOf (e, SecurityException)) { +} else { +throw e; +} +} +if (str == null) { +return font; +}return java.awt.Font.decode (str); +}, "~S,java.awt.Font"); +Clazz_overrideMethod (c$, "hashCode", +function () { +if (this.hash == 0) { +this.hash = this.name.hashCode () ^ this.style ^ this.size; +}return this.hash; +}); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (obj === this) { +return true; +}if (obj != null) { +try { +var font = obj; +if (this.size == font.size && this.style == font.style && this.nonIdentityTx == font.nonIdentityTx && this.$hasLayoutAttributes == font.$hasLayoutAttributes && this.pointSize == font.pointSize && this.name.equals (font.name)) { +return true; +}} catch (e) { +if (Clazz_exceptionOf (e, ClassCastException)) { +} else { +throw e; +} +} +}return false; +}, "~O"); +Clazz_overrideMethod (c$, "toString", +function () { +var strStyle; +if (this.isBold ()) { +strStyle = this.isItalic () ? "bolditalic" : "bold"; +} else { +strStyle = this.isItalic () ? "italic" : "plain"; +}return this.getClass ().getName () + "[family=" + this.getFamily () + ",name=" + this.name + ",style=" + strStyle + ",size=" + this.size + "]"; +}); +Clazz_defineMethod (c$, "getAvailableAttributes", +function () { +var attributes = Clazz_newArray (-1, [java.awt.font.TextAttribute.FAMILY, java.awt.font.TextAttribute.WEIGHT, java.awt.font.TextAttribute.WIDTH, java.awt.font.TextAttribute.SIZE, java.awt.font.TextAttribute.UNDERLINE, java.awt.font.TextAttribute.STRIKETHROUGH]); +return attributes; +}); +Clazz_defineMethod (c$, "deriveFont", +function (style, size) { +return new java.awt.Font (this.name, style, size); +}, "~N,~N"); +Clazz_defineMethod (c$, "deriveFont", +function (size) { +return new java.awt.Font (this.name, this.style, size); +}, "~N"); +Clazz_defineMethod (c$, "deriveFont", +function (style) { +return new java.awt.Font (this.name, style, this.size); +}, "~N"); +Clazz_defineMethod (c$, "hasUniformLineMetrics", +function () { +return false; +}); +Clazz_overrideMethod (c$, "finalize", +function () { +}); +Clazz_defineStatics (c$, +"DIALOG", "Dialog", +"DIALOG_INPUT", "DialogInput", +"SANS_SERIF", "SansSerif", +"SERIF", "Serif", +"MONOSPACED", "Monospaced", +"PLAIN", 0, +"BOLD", 1, +"ITALIC", 2, +"ROMAN_BASELINE", 0, +"CENTER_BASELINE", 1, +"HANGING_BASELINE", 2, +"TRUETYPE_FONT", 0, +"TYPE1_FONT", 1, +"LAYOUT_LEFT_TO_RIGHT", 0, +"LAYOUT_RIGHT_TO_LEFT", 1, +"LAYOUT_NO_START_CONTEXT", 2, +"LAYOUT_NO_LIMIT_CONTEXT", 4); +}); +Clazz_declarePackage ("java.awt.font"); +Clazz_load (["java.text.AttributedCharacterIterator", "java.lang.Boolean", "$.Float", "java.util.HashMap"], "java.awt.font.TextAttribute", ["java.io.InvalidObjectException"], function () { +c$ = Clazz_declareType (java.awt.font, "TextAttribute", java.text.AttributedCharacterIterator.Attribute); +Clazz_makeConstructor (c$, +function (name) { +Clazz_superConstructor (this, java.awt.font.TextAttribute, [name]); +if (this.getClass () === java.awt.font.TextAttribute) { +java.awt.font.TextAttribute.$instanceMap.put (name, this); +}}, "~S"); +Clazz_overrideMethod (c$, "readResolve", +function () { +if (this.getClass () !== java.awt.font.TextAttribute) { +throw new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve"); +}var instance = java.awt.font.TextAttribute.$instanceMap.get (this.getName ()); +if (instance != null) { +return instance; +} else { +throw new java.io.InvalidObjectException ("unknown attribute name"); +}}); +c$.$instanceMap = c$.prototype.$instanceMap = new java.util.HashMap (29); +c$.FAMILY = c$.prototype.FAMILY = new java.awt.font.TextAttribute ("family"); +c$.WEIGHT = c$.prototype.WEIGHT = new java.awt.font.TextAttribute ("weight"); +c$.WEIGHT_EXTRA_LIGHT = c$.prototype.WEIGHT_EXTRA_LIGHT = Float.$valueOf (0.5); +c$.WEIGHT_LIGHT = c$.prototype.WEIGHT_LIGHT = Float.$valueOf (0.75); +c$.WEIGHT_DEMILIGHT = c$.prototype.WEIGHT_DEMILIGHT = Float.$valueOf (0.875); +c$.WEIGHT_REGULAR = c$.prototype.WEIGHT_REGULAR = Float.$valueOf (1.0); +c$.WEIGHT_SEMIBOLD = c$.prototype.WEIGHT_SEMIBOLD = Float.$valueOf (1.25); +c$.WEIGHT_MEDIUM = c$.prototype.WEIGHT_MEDIUM = Float.$valueOf (1.5); +c$.WEIGHT_DEMIBOLD = c$.prototype.WEIGHT_DEMIBOLD = Float.$valueOf (1.75); +c$.WEIGHT_BOLD = c$.prototype.WEIGHT_BOLD = Float.$valueOf (2.0); +c$.WEIGHT_HEAVY = c$.prototype.WEIGHT_HEAVY = Float.$valueOf (2.25); +c$.WEIGHT_EXTRABOLD = c$.prototype.WEIGHT_EXTRABOLD = Float.$valueOf (2.5); +c$.WEIGHT_ULTRABOLD = c$.prototype.WEIGHT_ULTRABOLD = Float.$valueOf (2.75); +c$.WIDTH = c$.prototype.WIDTH = new java.awt.font.TextAttribute ("width"); +c$.WIDTH_CONDENSED = c$.prototype.WIDTH_CONDENSED = Float.$valueOf (0.75); +c$.WIDTH_SEMI_CONDENSED = c$.prototype.WIDTH_SEMI_CONDENSED = Float.$valueOf (0.875); +c$.WIDTH_REGULAR = c$.prototype.WIDTH_REGULAR = Float.$valueOf (1.0); +c$.WIDTH_SEMI_EXTENDED = c$.prototype.WIDTH_SEMI_EXTENDED = Float.$valueOf (1.25); +c$.WIDTH_EXTENDED = c$.prototype.WIDTH_EXTENDED = Float.$valueOf (1.5); +c$.POSTURE = c$.prototype.POSTURE = new java.awt.font.TextAttribute ("posture"); +c$.POSTURE_REGULAR = c$.prototype.POSTURE_REGULAR = Float.$valueOf (0.0); +c$.POSTURE_OBLIQUE = c$.prototype.POSTURE_OBLIQUE = Float.$valueOf (0.20); +c$.SIZE = c$.prototype.SIZE = new java.awt.font.TextAttribute ("size"); +c$.TRANSFORM = c$.prototype.TRANSFORM = new java.awt.font.TextAttribute ("transform"); +c$.SUPERSCRIPT = c$.prototype.SUPERSCRIPT = new java.awt.font.TextAttribute ("superscript"); +c$.SUPERSCRIPT_SUPER = c$.prototype.SUPERSCRIPT_SUPER = Integer.$valueOf (1); +c$.SUPERSCRIPT_SUB = c$.prototype.SUPERSCRIPT_SUB = Integer.$valueOf (-1); +c$.FONT = c$.prototype.FONT = new java.awt.font.TextAttribute ("font"); +c$.CHAR_REPLACEMENT = c$.prototype.CHAR_REPLACEMENT = new java.awt.font.TextAttribute ("char_replacement"); +c$.FOREGROUND = c$.prototype.FOREGROUND = new java.awt.font.TextAttribute ("foreground"); +c$.BACKGROUND = c$.prototype.BACKGROUND = new java.awt.font.TextAttribute ("background"); +c$.UNDERLINE = c$.prototype.UNDERLINE = new java.awt.font.TextAttribute ("underline"); +c$.UNDERLINE_ON = c$.prototype.UNDERLINE_ON = Integer.$valueOf (0); +c$.STRIKETHROUGH = c$.prototype.STRIKETHROUGH = new java.awt.font.TextAttribute ("strikethrough"); +c$.STRIKETHROUGH_ON = c$.prototype.STRIKETHROUGH_ON = Boolean.TRUE; +c$.RUN_DIRECTION = c$.prototype.RUN_DIRECTION = new java.awt.font.TextAttribute ("run_direction"); +c$.RUN_DIRECTION_LTR = c$.prototype.RUN_DIRECTION_LTR = Boolean.FALSE; +c$.RUN_DIRECTION_RTL = c$.prototype.RUN_DIRECTION_RTL = Boolean.TRUE; +c$.BIDI_EMBEDDING = c$.prototype.BIDI_EMBEDDING = new java.awt.font.TextAttribute ("bidi_embedding"); +c$.JUSTIFICATION = c$.prototype.JUSTIFICATION = new java.awt.font.TextAttribute ("justification"); +c$.JUSTIFICATION_FULL = c$.prototype.JUSTIFICATION_FULL = Float.$valueOf (1.0); +c$.JUSTIFICATION_NONE = c$.prototype.JUSTIFICATION_NONE = Float.$valueOf (0.0); +c$.INPUT_METHOD_HIGHLIGHT = c$.prototype.INPUT_METHOD_HIGHLIGHT = new java.awt.font.TextAttribute ("input method highlight"); +c$.INPUT_METHOD_UNDERLINE = c$.prototype.INPUT_METHOD_UNDERLINE = new java.awt.font.TextAttribute ("input method underline"); +c$.UNDERLINE_LOW_ONE_PIXEL = c$.prototype.UNDERLINE_LOW_ONE_PIXEL = Integer.$valueOf (1); +c$.UNDERLINE_LOW_TWO_PIXEL = c$.prototype.UNDERLINE_LOW_TWO_PIXEL = Integer.$valueOf (2); +c$.UNDERLINE_LOW_DOTTED = c$.prototype.UNDERLINE_LOW_DOTTED = Integer.$valueOf (3); +c$.UNDERLINE_LOW_GRAY = c$.prototype.UNDERLINE_LOW_GRAY = Integer.$valueOf (4); +c$.UNDERLINE_LOW_DASHED = c$.prototype.UNDERLINE_LOW_DASHED = Integer.$valueOf (5); +c$.SWAP_COLORS = c$.prototype.SWAP_COLORS = new java.awt.font.TextAttribute ("swap_colors"); +c$.SWAP_COLORS_ON = c$.prototype.SWAP_COLORS_ON = Boolean.TRUE; +c$.NUMERIC_SHAPING = c$.prototype.NUMERIC_SHAPING = new java.awt.font.TextAttribute ("numeric_shaping"); +c$.KERNING = c$.prototype.KERNING = new java.awt.font.TextAttribute ("kerning"); +c$.KERNING_ON = c$.prototype.KERNING_ON = Integer.$valueOf (1); +c$.LIGATURES = c$.prototype.LIGATURES = new java.awt.font.TextAttribute ("ligatures"); +c$.LIGATURES_ON = c$.prototype.LIGATURES_ON = Integer.$valueOf (1); +c$.TRACKING = c$.prototype.TRACKING = new java.awt.font.TextAttribute ("tracking"); +c$.TRACKING_TIGHT = c$.prototype.TRACKING_TIGHT = Float.$valueOf (-0.04); +c$.TRACKING_LOOSE = c$.prototype.TRACKING_LOOSE = Float.$valueOf (.04); +}); +Clazz_declarePackage ("java.text"); +Clazz_load (["java.text.CharacterIterator", "java.io.InvalidObjectException", "java.util.HashMap"], "java.text.AttributedCharacterIterator", null, function () { +Clazz_declareInterface (java.text, "AttributedCharacterIterator", java.text.CharacterIterator); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.name = null; +Clazz_instantialize (this, arguments); +}, java.text.AttributedCharacterIterator, "Attribute", null, java.io.Serializable); +Clazz_makeConstructor (c$, +function (a) { +this.name = a; +if (this.getClass () === java.text.AttributedCharacterIterator.Attribute) { +java.text.AttributedCharacterIterator.Attribute.instanceMap.put (a, this); +}}, "~S"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "(" + this.name + ")"; +}); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "readResolve", +function () { +if (this.getClass () !== java.text.AttributedCharacterIterator.Attribute) { +throw new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve"); +}var a = java.text.AttributedCharacterIterator.Attribute.instanceMap.get (this.getName ()); +if (a != null) { +return a; +} else { +throw new java.io.InvalidObjectException ("unknown attribute name"); +}}); +c$.instanceMap = c$.prototype.instanceMap = new java.util.HashMap (7); +c$.LANGUAGE = c$.prototype.LANGUAGE = new java.text.AttributedCharacterIterator.Attribute ("language"); +c$.READING = c$.prototype.READING = new java.text.AttributedCharacterIterator.Attribute ("reading"); +c$.INPUT_METHOD_SEGMENT = c$.prototype.INPUT_METHOD_SEGMENT = new java.text.AttributedCharacterIterator.Attribute ("input_method_segment"); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.text"); +c$ = Clazz_declareInterface (java.text, "CharacterIterator", Cloneable); +Clazz_defineStatics (c$, +"DONE", '\uFFFF'); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (null, "java.awt.geom.Point2D", ["java.lang.Double", "$.InternalError"], function () { +c$ = Clazz_declareType (java.awt.geom, "Point2D", null, Cloneable); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "setLocation", +function (p) { +this.setLocation (p.getX (), p.getY ()); +}, "java.awt.geom.Point2D"); +c$.distanceSq = Clazz_defineMethod (c$, "distanceSq", +function (x1, y1, x2, y2) { +x1 -= x2; +y1 -= y2; +return (x1 * x1 + y1 * y1); +}, "~N,~N,~N,~N"); +c$.distance = Clazz_defineMethod (c$, "distance", +function (x1, y1, x2, y2) { +x1 -= x2; +y1 -= y2; +return Math.sqrt (x1 * x1 + y1 * y1); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "distanceSq", +function (px, py) { +px -= this.getX (); +py -= this.getY (); +return (px * px + py * py); +}, "~N,~N"); +Clazz_defineMethod (c$, "distanceSq", +function (pt) { +var px = pt.getX () - this.getX (); +var py = pt.getY () - this.getY (); +return (px * px + py * py); +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "distance", +function (px, py) { +px -= this.getX (); +py -= this.getY (); +return Math.sqrt (px * px + py * py); +}, "~N,~N"); +Clazz_defineMethod (c$, "distance", +function (pt) { +var px = pt.getX () - this.getX (); +var py = pt.getY () - this.getY (); +return Math.sqrt (px * px + py * py); +}, "java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.geom.Point2D, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_overrideMethod (c$, "hashCode", +function () { +var bits = java.lang.Double.doubleToLongBits (this.getX ()); +bits ^= java.lang.Double.doubleToLongBits (this.getY ()) * 31; +return ((bits) ^ ((bits >> 32))); +}); +Clazz_defineMethod (c$, "equals", +function (obj) { +if (Clazz_instanceOf (obj, java.awt.geom.Point2D)) { +var p2d = obj; +return (this.getX () == p2d.getX ()) && (this.getY () == p2d.getY ()); +}return Clazz_superCall (this, java.awt.geom.Point2D, "equals", [obj]); +}, "~O"); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Point2D, "Float", java.awt.geom.Point2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []); +}); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []); +this.x = a; +this.y = b; +}, "~N,~N"); +Clazz_overrideMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_overrideMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_defineMethod (c$, "setLocation", +function (a, b) { +this.x = a; +this.y = b; +}, "~N,~N"); +Clazz_defineMethod (c$, "setLocation", +function (a, b) { +this.x = a; +this.y = b; +}, "~N,~N"); +Clazz_overrideMethod (c$, "toString", +function () { +return "Point2D.Float[" + this.x + ", " + this.y + "]"; +}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Point2D, "Double", java.awt.geom.Point2D); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []); +}); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []); +this.x = a; +this.y = b; +}, "~N,~N"); +Clazz_overrideMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_overrideMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_defineMethod (c$, "setLocation", +function (a, b) { +this.x = a; +this.y = b; +}, "~N,~N"); +Clazz_overrideMethod (c$, "toString", +function () { +return "Point2D.Double[" + this.x + ", " + this.y + "]"; +}); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (null, "java.awt.geom.AffineTransform", ["java.lang.Double", "$.InternalError", "JU.AU", "java.awt.geom.NoninvertibleTransformException", "$.Path2D", "$.Point2D", "java.awt.geom.Point2D.Double"], function () { +c$ = Clazz_decorateAsClass (function () { +this.m00 = 0; +this.m10 = 0; +this.m01 = 0; +this.m11 = 0; +this.m02 = 0; +this.m12 = 0; +this.state = 0; +this.type = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom, "AffineTransform", null, [Cloneable, java.io.Serializable]); +Clazz_makeConstructor (c$, + function (m00, m10, m01, m11, m02, m12, state) { +{ +switch (arguments.length) { case 0: this.m00 = this.m11 = 1.0; +return; +case 1: +if (Clazz_instanceOf(m00, java.awt.geom.AffineTransform)) { +var Tx = m00; this.m00 = +Tx.m00; this.m10 = Tx.m10; this.m01 = Tx.m01; this.m11 = +Tx.m11; this.m02 = Tx.m02; this.m12 = Tx.m12; this.state = +Tx.state; this.type = Tx.type; +} else { +var flatmatrix = m00; +this.m00 = flatmatrix[0]; +this.m10 = flatmatrix[1]; +this.m01 = flatmatrix[2]; +this.m11 = flatmatrix[3]; +if (flatmatrix.length > 5) { +this.m02 = flatmatrix[4]; +this.m12 = flatmatrix[5]; +} +this.updateState(); +} +return; +case 6: +this.m00 = m00; +this.m10 = m10; +this.m01 = m01; +this.m11 = m11; +this.m02 = m02; +this.m12 = m12; +this.updateState(); +return; +} +}this.m00 = m00; +this.m10 = m10; +this.m01 = m01; +this.m11 = m11; +this.m02 = m02; +this.m12 = m12; +this.state = state; +this.type = -1; +}, "~N,~N,~N,~N,~N,~N,~N"); +c$.getTranslateInstance = Clazz_defineMethod (c$, "getTranslateInstance", +function (tx, ty) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToTranslation (tx, ty); +return Tx; +}, "~N,~N"); +c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", +function (theta) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToRotation (theta); +return Tx; +}, "~N"); +c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", +function (theta, anchorx, anchory) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToRotation (theta, anchorx, anchory); +return Tx; +}, "~N,~N,~N"); +c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", +function (vecx, vecy) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToRotation (vecx, vecy); +return Tx; +}, "~N,~N"); +c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", +function (vecx, vecy, anchorx, anchory) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToRotation (vecx, vecy, anchorx, anchory); +return Tx; +}, "~N,~N,~N,~N"); +c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", +function (numquadrants) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToQuadrantRotation (numquadrants); +return Tx; +}, "~N"); +c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", +function (numquadrants, anchorx, anchory) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToQuadrantRotation (numquadrants, anchorx, anchory); +return Tx; +}, "~N,~N,~N"); +c$.getScaleInstance = Clazz_defineMethod (c$, "getScaleInstance", +function (sx, sy) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToScale (sx, sy); +return Tx; +}, "~N,~N"); +c$.getShearInstance = Clazz_defineMethod (c$, "getShearInstance", +function (shx, shy) { +var Tx = new java.awt.geom.AffineTransform (); +Tx.setToShear (shx, shy); +return Tx; +}, "~N,~N"); +Clazz_defineMethod (c$, "getType", +function () { +if (this.type == -1) { +this.calculateType (); +}return this.type; +}); +Clazz_defineMethod (c$, "calculateType", + function () { +var ret = 0; +var sgn0; +var sgn1; +var M0; +var M1; +var M2; +var M3; +this.updateState (); +switch (this.state) { +default: +this.stateError (); +case (7): +ret = 1; +case (6): +if ((M0 = this.m00) * (M2 = this.m01) + (M3 = this.m10) * (M1 = this.m11) != 0) { +this.type = 32; +return; +}sgn0 = (M0 >= 0.0); +sgn1 = (M1 >= 0.0); +if (sgn0 == sgn1) { +if (M0 != M1 || M2 != -M3) { +ret |= (20); +} else if (M0 * M1 - M2 * M3 != 1.0) { +ret |= (18); +} else { +ret |= 16; +}} else { +if (M0 != -M1 || M2 != M3) { +ret |= (84); +} else if (M0 * M1 - M2 * M3 != 1.0) { +ret |= (82); +} else { +ret |= (80); +}}break; +case (5): +ret = 1; +case (4): +sgn0 = ((M0 = this.m01) >= 0.0); +sgn1 = ((M1 = this.m10) >= 0.0); +if (sgn0 != sgn1) { +if (M0 != -M1) { +ret |= (12); +} else if (M0 != 1.0 && M0 != -1.0) { +ret |= (10); +} else { +ret |= 8; +}} else { +if (M0 == M1) { +ret |= (74); +} else { +ret |= (76); +}}break; +case (3): +ret = 1; +case (2): +sgn0 = ((M0 = this.m00) >= 0.0); +sgn1 = ((M1 = this.m11) >= 0.0); +if (sgn0 == sgn1) { +if (sgn0) { +if (M0 == M1) { +ret |= 2; +} else { +ret |= 4; +}} else { +if (M0 != M1) { +ret |= (12); +} else if (M0 != -1.0) { +ret |= (10); +} else { +ret |= 8; +}}} else { +if (M0 == -M1) { +if (M0 == 1.0 || M0 == -1.0) { +ret |= 64; +} else { +ret |= (66); +}} else { +ret |= (68); +}}break; +case (1): +ret = 1; +break; +case (0): +break; +} +this.type = ret; +}); +Clazz_defineMethod (c$, "getDeterminant", +function () { +switch (this.state) { +default: +this.stateError (); +case (7): +case (6): +return this.m00 * this.m11 - this.m01 * this.m10; +case (5): +case (4): +return -(this.m01 * this.m10); +case (3): +case (2): +return this.m00 * this.m11; +case (1): +case (0): +return 1.0; +} +}); +Clazz_defineMethod (c$, "updateState", +function () { +if (this.m01 == 0.0 && this.m10 == 0.0) { +if (this.m00 == 1.0 && this.m11 == 1.0) { +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 0; +this.type = 0; +} else { +this.state = 1; +this.type = 1; +}} else { +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 2; +this.type = -1; +} else { +this.state = (3); +this.type = -1; +}}} else { +if (this.m00 == 0.0 && this.m11 == 0.0) { +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 4; +this.type = -1; +} else { +this.state = (5); +this.type = -1; +}} else { +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = (6); +this.type = -1; +} else { +this.state = (7); +this.type = -1; +}}}}); +Clazz_defineMethod (c$, "stateError", + function () { +throw new InternalError ("missing case in transform state switch"); +}); +Clazz_defineMethod (c$, "getMatrix", +function (flatmatrix) { +flatmatrix[0] = this.m00; +flatmatrix[1] = this.m10; +flatmatrix[2] = this.m01; +flatmatrix[3] = this.m11; +if (flatmatrix.length > 5) { +flatmatrix[4] = this.m02; +flatmatrix[5] = this.m12; +}}, "~A"); +Clazz_defineMethod (c$, "getScaleX", +function () { +return this.m00; +}); +Clazz_defineMethod (c$, "getScaleY", +function () { +return this.m11; +}); +Clazz_defineMethod (c$, "getShearX", +function () { +return this.m01; +}); +Clazz_defineMethod (c$, "getShearY", +function () { +return this.m10; +}); +Clazz_defineMethod (c$, "getTranslateX", +function () { +return this.m02; +}); +Clazz_defineMethod (c$, "getTranslateY", +function () { +return this.m12; +}); +Clazz_defineMethod (c$, "translate", +function (tx, ty) { +switch (this.state) { +default: +this.stateError (); +case (7): +this.m02 = tx * this.m00 + ty * this.m01 + this.m02; +this.m12 = tx * this.m10 + ty * this.m11 + this.m12; +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 6; +if (this.type != -1) { +this.type -= 1; +}}return; +case (6): +this.m02 = tx * this.m00 + ty * this.m01; +this.m12 = tx * this.m10 + ty * this.m11; +if (this.m02 != 0.0 || this.m12 != 0.0) { +this.state = 7; +this.type |= 1; +}return; +case (5): +this.m02 = ty * this.m01 + this.m02; +this.m12 = tx * this.m10 + this.m12; +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 4; +if (this.type != -1) { +this.type -= 1; +}}return; +case (4): +this.m02 = ty * this.m01; +this.m12 = tx * this.m10; +if (this.m02 != 0.0 || this.m12 != 0.0) { +this.state = 5; +this.type |= 1; +}return; +case (3): +this.m02 = tx * this.m00 + this.m02; +this.m12 = ty * this.m11 + this.m12; +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 2; +if (this.type != -1) { +this.type -= 1; +}}return; +case (2): +this.m02 = tx * this.m00; +this.m12 = ty * this.m11; +if (this.m02 != 0.0 || this.m12 != 0.0) { +this.state = 3; +this.type |= 1; +}return; +case (1): +this.m02 = tx + this.m02; +this.m12 = ty + this.m12; +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 0; +this.type = 0; +}return; +case (0): +this.m02 = tx; +this.m12 = ty; +if (tx != 0.0 || ty != 0.0) { +this.state = 1; +this.type = 1; +}return; +} +}, "~N,~N"); +Clazz_defineMethod (c$, "rotate90", + function () { +var M0 = this.m00; +this.m00 = this.m01; +this.m01 = -M0; +M0 = this.m10; +this.m10 = this.m11; +this.m11 = -M0; +var state = java.awt.geom.AffineTransform.rot90conversion[this.state]; +if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) { +state -= 2; +}this.state = state; +this.type = -1; +}); +Clazz_defineMethod (c$, "rotate180", + function () { +this.m00 = -this.m00; +this.m11 = -this.m11; +var state = this.state; +if ((state & (4)) != 0) { +this.m01 = -this.m01; +this.m10 = -this.m10; +} else { +if (this.m00 == 1.0 && this.m11 == 1.0) { +this.state = state & -3; +} else { +this.state = state | 2; +}}this.type = -1; +}); +Clazz_defineMethod (c$, "rotate270", + function () { +var M0 = this.m00; +this.m00 = -this.m01; +this.m01 = M0; +M0 = this.m10; +this.m10 = -this.m11; +this.m11 = M0; +var state = java.awt.geom.AffineTransform.rot90conversion[this.state]; +if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) { +state -= 2; +}this.state = state; +this.type = -1; +}); +Clazz_defineMethod (c$, "rotate", +function (theta) { +var sin = Math.sin (theta); +if (sin == 1.0) { +this.rotate90 (); +} else if (sin == -1.0) { +this.rotate270 (); +} else { +var cos = Math.cos (theta); +if (cos == -1.0) { +this.rotate180 (); +} else if (cos != 1.0) { +var M0; +var M1; +M0 = this.m00; +M1 = this.m01; +this.m00 = cos * M0 + sin * M1; +this.m01 = -sin * M0 + cos * M1; +M0 = this.m10; +M1 = this.m11; +this.m10 = cos * M0 + sin * M1; +this.m11 = -sin * M0 + cos * M1; +this.updateState (); +}}}, "~N"); +Clazz_defineMethod (c$, "rotate", +function (theta, anchorx, anchory) { +this.translate (anchorx, anchory); +this.rotate (theta); +this.translate (-anchorx, -anchory); +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "rotate", +function (vecx, vecy) { +if (vecy == 0.0) { +if (vecx < 0.0) { +this.rotate180 (); +}} else if (vecx == 0.0) { +if (vecy > 0.0) { +this.rotate90 (); +} else { +this.rotate270 (); +}} else { +var len = Math.sqrt (vecx * vecx + vecy * vecy); +var sin = vecy / len; +var cos = vecx / len; +var M0; +var M1; +M0 = this.m00; +M1 = this.m01; +this.m00 = cos * M0 + sin * M1; +this.m01 = -sin * M0 + cos * M1; +M0 = this.m10; +M1 = this.m11; +this.m10 = cos * M0 + sin * M1; +this.m11 = -sin * M0 + cos * M1; +this.updateState (); +}}, "~N,~N"); +Clazz_defineMethod (c$, "rotate", +function (vecx, vecy, anchorx, anchory) { +this.translate (anchorx, anchory); +this.rotate (vecx, vecy); +this.translate (-anchorx, -anchory); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "quadrantRotate", +function (numquadrants) { +switch (numquadrants & 3) { +case 0: +break; +case 1: +this.rotate90 (); +break; +case 2: +this.rotate180 (); +break; +case 3: +this.rotate270 (); +break; +} +}, "~N"); +Clazz_defineMethod (c$, "quadrantRotate", +function (numquadrants, anchorx, anchory) { +switch (numquadrants & 3) { +case 0: +return; +case 1: +this.m02 += anchorx * (this.m00 - this.m01) + anchory * (this.m01 + this.m00); +this.m12 += anchorx * (this.m10 - this.m11) + anchory * (this.m11 + this.m10); +this.rotate90 (); +break; +case 2: +this.m02 += anchorx * (this.m00 + this.m00) + anchory * (this.m01 + this.m01); +this.m12 += anchorx * (this.m10 + this.m10) + anchory * (this.m11 + this.m11); +this.rotate180 (); +break; +case 3: +this.m02 += anchorx * (this.m00 + this.m01) + anchory * (this.m01 - this.m00); +this.m12 += anchorx * (this.m10 + this.m11) + anchory * (this.m11 - this.m10); +this.rotate270 (); +break; +} +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state &= -2; +} else { +this.state |= 1; +}}, "~N,~N,~N"); +Clazz_defineMethod (c$, "scale", +function (sx, sy) { +var state = this.state; +switch (state) { +default: +this.stateError (); +case (7): +case (6): +this.m00 *= sx; +this.m11 *= sy; +case (5): +case (4): +this.m01 *= sy; +this.m10 *= sx; +if (this.m01 == 0 && this.m10 == 0) { +state &= 1; +if (this.m00 == 1.0 && this.m11 == 1.0) { +this.type = (state == 0 ? 0 : 1); +} else { +state |= 2; +this.type = -1; +}this.state = state; +}return; +case (3): +case (2): +this.m00 *= sx; +this.m11 *= sy; +if (this.m00 == 1.0 && this.m11 == 1.0) { +this.state = (state &= 1); +this.type = (state == 0 ? 0 : 1); +} else { +this.type = -1; +}return; +case (1): +case (0): +this.m00 = sx; +this.m11 = sy; +if (sx != 1.0 || sy != 1.0) { +this.state = state | 2; +this.type = -1; +}return; +} +}, "~N,~N"); +Clazz_defineMethod (c$, "shear", +function (shx, shy) { +var state = this.state; +switch (state) { +default: +this.stateError (); +case (7): +case (6): +var M0; +var M1; +M0 = this.m00; +M1 = this.m01; +this.m00 = M0 + M1 * shy; +this.m01 = M0 * shx + M1; +M0 = this.m10; +M1 = this.m11; +this.m10 = M0 + M1 * shy; +this.m11 = M0 * shx + M1; +this.updateState (); +return; +case (5): +case (4): +this.m00 = this.m01 * shy; +this.m11 = this.m10 * shx; +if (this.m00 != 0.0 || this.m11 != 0.0) { +this.state = state | 2; +}this.type = -1; +return; +case (3): +case (2): +this.m01 = this.m00 * shx; +this.m10 = this.m11 * shy; +if (this.m01 != 0.0 || this.m10 != 0.0) { +this.state = state | 4; +}this.type = -1; +return; +case (1): +case (0): +this.m01 = shx; +this.m10 = shy; +if (this.m01 != 0.0 || this.m10 != 0.0) { +this.state = state | 2 | 4; +this.type = -1; +}return; +} +}, "~N,~N"); +Clazz_defineMethod (c$, "setToIdentity", +function () { +this.m00 = this.m11 = 1.0; +this.m10 = this.m01 = this.m02 = this.m12 = 0.0; +this.state = 0; +this.type = 0; +}); +Clazz_defineMethod (c$, "setToTranslation", +function (tx, ty) { +this.m00 = 1.0; +this.m10 = 0.0; +this.m01 = 0.0; +this.m11 = 1.0; +this.m02 = tx; +this.m12 = ty; +if (tx != 0.0 || ty != 0.0) { +this.state = 1; +this.type = 1; +} else { +this.state = 0; +this.type = 0; +}}, "~N,~N"); +Clazz_defineMethod (c$, "setToRotation", +function (theta) { +var sin = Math.sin (theta); +var cos; +if (sin == 1.0 || sin == -1.0) { +cos = 0.0; +this.state = 4; +this.type = 8; +} else { +cos = Math.cos (theta); +if (cos == -1.0) { +sin = 0.0; +this.state = 2; +this.type = 8; +} else if (cos == 1.0) { +sin = 0.0; +this.state = 0; +this.type = 0; +} else { +this.state = 6; +this.type = 16; +}}this.m00 = cos; +this.m10 = sin; +this.m01 = -sin; +this.m11 = cos; +this.m02 = 0.0; +this.m12 = 0.0; +}, "~N"); +Clazz_defineMethod (c$, "setToRotation", +function (theta, anchorx, anchory) { +this.setToRotation (theta); +var sin = this.m10; +var oneMinusCos = 1.0 - this.m00; +this.m02 = anchorx * oneMinusCos + anchory * sin; +this.m12 = anchory * oneMinusCos - anchorx * sin; +if (this.m02 != 0.0 || this.m12 != 0.0) { +this.state |= 1; +this.type |= 1; +}}, "~N,~N,~N"); +Clazz_defineMethod (c$, "setToRotation", +function (vecx, vecy) { +var sin; +var cos; +if (vecy == 0) { +sin = 0.0; +if (vecx < 0.0) { +cos = -1.0; +this.state = 2; +this.type = 8; +} else { +cos = 1.0; +this.state = 0; +this.type = 0; +}} else if (vecx == 0) { +cos = 0.0; +sin = (vecy > 0.0) ? 1.0 : -1.0; +this.state = 4; +this.type = 8; +} else { +var len = Math.sqrt (vecx * vecx + vecy * vecy); +cos = vecx / len; +sin = vecy / len; +this.state = 6; +this.type = 16; +}this.m00 = cos; +this.m10 = sin; +this.m01 = -sin; +this.m11 = cos; +this.m02 = 0.0; +this.m12 = 0.0; +}, "~N,~N"); +Clazz_defineMethod (c$, "setToRotation", +function (vecx, vecy, anchorx, anchory) { +this.setToRotation (vecx, vecy); +var sin = this.m10; +var oneMinusCos = 1.0 - this.m00; +this.m02 = anchorx * oneMinusCos + anchory * sin; +this.m12 = anchory * oneMinusCos - anchorx * sin; +if (this.m02 != 0.0 || this.m12 != 0.0) { +this.state |= 1; +this.type |= 1; +}}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setToQuadrantRotation", +function (numquadrants) { +switch (numquadrants & 3) { +case 0: +this.m00 = 1.0; +this.m10 = 0.0; +this.m01 = 0.0; +this.m11 = 1.0; +this.m02 = 0.0; +this.m12 = 0.0; +this.state = 0; +this.type = 0; +break; +case 1: +this.m00 = 0.0; +this.m10 = 1.0; +this.m01 = -1.0; +this.m11 = 0.0; +this.m02 = 0.0; +this.m12 = 0.0; +this.state = 4; +this.type = 8; +break; +case 2: +this.m00 = -1.0; +this.m10 = 0.0; +this.m01 = 0.0; +this.m11 = -1.0; +this.m02 = 0.0; +this.m12 = 0.0; +this.state = 2; +this.type = 8; +break; +case 3: +this.m00 = 0.0; +this.m10 = -1.0; +this.m01 = 1.0; +this.m11 = 0.0; +this.m02 = 0.0; +this.m12 = 0.0; +this.state = 4; +this.type = 8; +break; +} +}, "~N"); +Clazz_defineMethod (c$, "setToQuadrantRotation", +function (numquadrants, anchorx, anchory) { +switch (numquadrants & 3) { +case 0: +this.m00 = 1.0; +this.m10 = 0.0; +this.m01 = 0.0; +this.m11 = 1.0; +this.m02 = 0.0; +this.m12 = 0.0; +this.state = 0; +this.type = 0; +break; +case 1: +this.m00 = 0.0; +this.m10 = 1.0; +this.m01 = -1.0; +this.m11 = 0.0; +this.m02 = anchorx + anchory; +this.m12 = anchory - anchorx; +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 4; +this.type = 8; +} else { +this.state = 5; +this.type = 9; +}break; +case 2: +this.m00 = -1.0; +this.m10 = 0.0; +this.m01 = 0.0; +this.m11 = -1.0; +this.m02 = anchorx + anchorx; +this.m12 = anchory + anchory; +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 2; +this.type = 8; +} else { +this.state = 3; +this.type = 9; +}break; +case 3: +this.m00 = 0.0; +this.m10 = -1.0; +this.m01 = 1.0; +this.m11 = 0.0; +this.m02 = anchorx - anchory; +this.m12 = anchory + anchorx; +if (this.m02 == 0.0 && this.m12 == 0.0) { +this.state = 4; +this.type = 8; +} else { +this.state = 5; +this.type = 9; +}break; +} +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "setToScale", +function (sx, sy) { +this.m00 = sx; +this.m10 = 0.0; +this.m01 = 0.0; +this.m11 = sy; +this.m02 = 0.0; +this.m12 = 0.0; +if (sx != 1.0 || sy != 1.0) { +this.state = 2; +this.type = -1; +} else { +this.state = 0; +this.type = 0; +}}, "~N,~N"); +Clazz_defineMethod (c$, "setToShear", +function (shx, shy) { +this.m00 = 1.0; +this.m01 = shx; +this.m10 = shy; +this.m11 = 1.0; +this.m02 = 0.0; +this.m12 = 0.0; +if (shx != 0.0 || shy != 0.0) { +this.state = (6); +this.type = -1; +} else { +this.state = 0; +this.type = 0; +}}, "~N,~N"); +Clazz_defineMethod (c$, "setTransform", +function (Tx) { +this.m00 = Tx.m00; +this.m10 = Tx.m10; +this.m01 = Tx.m01; +this.m11 = Tx.m11; +this.m02 = Tx.m02; +this.m12 = Tx.m12; +this.state = Tx.state; +this.type = Tx.type; +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "setTransform", +function (m00, m10, m01, m11, m02, m12) { +this.m00 = m00; +this.m10 = m10; +this.m01 = m01; +this.m11 = m11; +this.m02 = m02; +this.m12 = m12; +this.updateState (); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "concatenate", +function (Tx) { +var M0; +var M1; +var T00; +var T01; +var T10; +var T11; +var T02; +var T12; +var mystate = this.state; +var txstate = Tx.state; +switch ((txstate << 3) | mystate) { +case (0): +case (1): +case (2): +case (3): +case (4): +case (5): +case (6): +case (7): +return; +case (56): +this.m01 = Tx.m01; +this.m10 = Tx.m10; +case (24): +this.m00 = Tx.m00; +this.m11 = Tx.m11; +case (8): +this.m02 = Tx.m02; +this.m12 = Tx.m12; +this.state = txstate; +this.type = Tx.type; +return; +case (48): +this.m01 = Tx.m01; +this.m10 = Tx.m10; +case (16): +this.m00 = Tx.m00; +this.m11 = Tx.m11; +this.state = txstate; +this.type = Tx.type; +return; +case (40): +this.m02 = Tx.m02; +this.m12 = Tx.m12; +case (32): +this.m01 = Tx.m01; +this.m10 = Tx.m10; +this.m00 = this.m11 = 0.0; +this.state = txstate; +this.type = Tx.type; +return; +case (15): +case (14): +case (13): +case (12): +case (11): +case (10): +case (9): +this.translate (Tx.m02, Tx.m12); +return; +case (23): +case (22): +case (21): +case (20): +case (19): +case (18): +case (17): +this.scale (Tx.m00, Tx.m11); +return; +case (39): +case (38): +T01 = Tx.m01; +T10 = Tx.m10; +M0 = this.m00; +this.m00 = this.m01 * T10; +this.m01 = M0 * T01; +M0 = this.m10; +this.m10 = this.m11 * T10; +this.m11 = M0 * T01; +this.type = -1; +return; +case (37): +case (36): +this.m00 = this.m01 * Tx.m10; +this.m01 = 0.0; +this.m11 = this.m10 * Tx.m01; +this.m10 = 0.0; +this.state = mystate ^ (6); +this.type = -1; +return; +case (35): +case (34): +this.m01 = this.m00 * Tx.m01; +this.m00 = 0.0; +this.m10 = this.m11 * Tx.m10; +this.m11 = 0.0; +this.state = mystate ^ (6); +this.type = -1; +return; +case (33): +this.m00 = 0.0; +this.m01 = Tx.m01; +this.m10 = Tx.m10; +this.m11 = 0.0; +this.state = 5; +this.type = -1; +return; +} +T00 = Tx.m00; +T01 = Tx.m01; +T02 = Tx.m02; +T10 = Tx.m10; +T11 = Tx.m11; +T12 = Tx.m12; +switch (mystate) { +default: +this.stateError (); +case (6): +this.state = mystate | txstate; +case (7): +M0 = this.m00; +M1 = this.m01; +this.m00 = T00 * M0 + T10 * M1; +this.m01 = T01 * M0 + T11 * M1; +this.m02 += T02 * M0 + T12 * M1; +M0 = this.m10; +M1 = this.m11; +this.m10 = T00 * M0 + T10 * M1; +this.m11 = T01 * M0 + T11 * M1; +this.m12 += T02 * M0 + T12 * M1; +this.type = -1; +return; +case (5): +case (4): +M0 = this.m01; +this.m00 = T10 * M0; +this.m01 = T11 * M0; +this.m02 += T12 * M0; +M0 = this.m10; +this.m10 = T00 * M0; +this.m11 = T01 * M0; +this.m12 += T02 * M0; +break; +case (3): +case (2): +M0 = this.m00; +this.m00 = T00 * M0; +this.m01 = T01 * M0; +this.m02 += T02 * M0; +M0 = this.m11; +this.m10 = T10 * M0; +this.m11 = T11 * M0; +this.m12 += T12 * M0; +break; +case (1): +this.m00 = T00; +this.m01 = T01; +this.m02 += T02; +this.m10 = T10; +this.m11 = T11; +this.m12 += T12; +this.state = txstate | 1; +this.type = -1; +return; +} +this.updateState (); +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "preConcatenate", +function (Tx) { +var M0; +var M1; +var T00; +var T01; +var T10; +var T11; +var T02; +var T12; +var mystate = this.state; +var txstate = Tx.state; +switch ((txstate << 3) | mystate) { +case (0): +case (1): +case (2): +case (3): +case (4): +case (5): +case (6): +case (7): +return; +case (8): +case (10): +case (12): +case (14): +this.m02 = Tx.m02; +this.m12 = Tx.m12; +this.state = mystate | 1; +this.type |= 1; +return; +case (9): +case (11): +case (13): +case (15): +this.m02 = this.m02 + Tx.m02; +this.m12 = this.m12 + Tx.m12; +return; +case (17): +case (16): +this.state = mystate | 2; +case (23): +case (22): +case (21): +case (20): +case (19): +case (18): +T00 = Tx.m00; +T11 = Tx.m11; +if ((mystate & 4) != 0) { +this.m01 = this.m01 * T00; +this.m10 = this.m10 * T11; +if ((mystate & 2) != 0) { +this.m00 = this.m00 * T00; +this.m11 = this.m11 * T11; +}} else { +this.m00 = this.m00 * T00; +this.m11 = this.m11 * T11; +}if ((mystate & 1) != 0) { +this.m02 = this.m02 * T00; +this.m12 = this.m12 * T11; +}this.type = -1; +return; +case (37): +case (36): +mystate = mystate | 2; +case (33): +case (32): +case (35): +case (34): +this.state = mystate ^ 4; +case (39): +case (38): +T01 = Tx.m01; +T10 = Tx.m10; +M0 = this.m00; +this.m00 = this.m10 * T01; +this.m10 = M0 * T10; +M0 = this.m01; +this.m01 = this.m11 * T01; +this.m11 = M0 * T10; +M0 = this.m02; +this.m02 = this.m12 * T01; +this.m12 = M0 * T10; +this.type = -1; +return; +} +T00 = Tx.m00; +T01 = Tx.m01; +T02 = Tx.m02; +T10 = Tx.m10; +T11 = Tx.m11; +T12 = Tx.m12; +switch (mystate) { +default: +this.stateError (); +case (7): +M0 = this.m02; +M1 = this.m12; +T02 += M0 * T00 + M1 * T01; +T12 += M0 * T10 + M1 * T11; +case (6): +this.m02 = T02; +this.m12 = T12; +M0 = this.m00; +M1 = this.m10; +this.m00 = M0 * T00 + M1 * T01; +this.m10 = M0 * T10 + M1 * T11; +M0 = this.m01; +M1 = this.m11; +this.m01 = M0 * T00 + M1 * T01; +this.m11 = M0 * T10 + M1 * T11; +break; +case (5): +M0 = this.m02; +M1 = this.m12; +T02 += M0 * T00 + M1 * T01; +T12 += M0 * T10 + M1 * T11; +case (4): +this.m02 = T02; +this.m12 = T12; +M0 = this.m10; +this.m00 = M0 * T01; +this.m10 = M0 * T11; +M0 = this.m01; +this.m01 = M0 * T00; +this.m11 = M0 * T10; +break; +case (3): +M0 = this.m02; +M1 = this.m12; +T02 += M0 * T00 + M1 * T01; +T12 += M0 * T10 + M1 * T11; +case (2): +this.m02 = T02; +this.m12 = T12; +M0 = this.m00; +this.m00 = M0 * T00; +this.m10 = M0 * T10; +M0 = this.m11; +this.m01 = M0 * T01; +this.m11 = M0 * T11; +break; +case (1): +M0 = this.m02; +M1 = this.m12; +T02 += M0 * T00 + M1 * T01; +T12 += M0 * T10 + M1 * T11; +case (0): +this.m02 = T02; +this.m12 = T12; +this.m00 = T00; +this.m10 = T10; +this.m01 = T01; +this.m11 = T11; +this.state = mystate | txstate; +this.type = -1; +return; +} +this.updateState (); +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "createInverse", +function () { +var det; +switch (this.state) { +default: +this.stateError (); +case (7): +det = this.m00 * this.m11 - this.m01 * this.m10; +if (Math.abs (det) <= 4.9E-324) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); +}return new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, (this.m01 * this.m12 - this.m11 * this.m02) / det, (this.m10 * this.m02 - this.m00 * this.m12) / det, (7)); +case (6): +det = this.m00 * this.m11 - this.m01 * this.m10; +if (Math.abs (det) <= 4.9E-324) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); +}return new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, 0.0, 0.0, (6)); +case (5): +if (this.m01 == 0.0 || this.m10 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}return new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, -this.m12 / this.m10, -this.m02 / this.m01, (5)); +case (4): +if (this.m01 == 0.0 || this.m10 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}return new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, 0.0, 0.0, (4)); +case (3): +if (this.m00 == 0.0 || this.m11 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}return new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, -this.m02 / this.m00, -this.m12 / this.m11, (3)); +case (2): +if (this.m00 == 0.0 || this.m11 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}return new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, 0.0, 0.0, (2)); +case (1): +return new java.awt.geom.AffineTransform (1.0, 0.0, 0.0, 1.0, -this.m02, -this.m12, (1)); +case (0): +return new java.awt.geom.AffineTransform (); +} +}); +Clazz_defineMethod (c$, "invert", +function () { +var M00; +var M01; +var M02; +var M10; +var M11; +var M12; +var det; +switch (this.state) { +default: +this.stateError (); +case (7): +M00 = this.m00; +M01 = this.m01; +M02 = this.m02; +M10 = this.m10; +M11 = this.m11; +M12 = this.m12; +det = M00 * M11 - M01 * M10; +if (Math.abs (det) <= 4.9E-324) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); +}this.m00 = M11 / det; +this.m10 = -M10 / det; +this.m01 = -M01 / det; +this.m11 = M00 / det; +this.m02 = (M01 * M12 - M11 * M02) / det; +this.m12 = (M10 * M02 - M00 * M12) / det; +break; +case (6): +M00 = this.m00; +M01 = this.m01; +M10 = this.m10; +M11 = this.m11; +det = M00 * M11 - M01 * M10; +if (Math.abs (det) <= 4.9E-324) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); +}this.m00 = M11 / det; +this.m10 = -M10 / det; +this.m01 = -M01 / det; +this.m11 = M00 / det; +break; +case (5): +M01 = this.m01; +M02 = this.m02; +M10 = this.m10; +M12 = this.m12; +if (M01 == 0.0 || M10 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}this.m10 = 1.0 / M01; +this.m01 = 1.0 / M10; +this.m02 = -M12 / M10; +this.m12 = -M02 / M01; +break; +case (4): +M01 = this.m01; +M10 = this.m10; +if (M01 == 0.0 || M10 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}this.m10 = 1.0 / M01; +this.m01 = 1.0 / M10; +break; +case (3): +M00 = this.m00; +M02 = this.m02; +M11 = this.m11; +M12 = this.m12; +if (M00 == 0.0 || M11 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}this.m00 = 1.0 / M00; +this.m11 = 1.0 / M11; +this.m02 = -M02 / M00; +this.m12 = -M12 / M11; +break; +case (2): +M00 = this.m00; +M11 = this.m11; +if (M00 == 0.0 || M11 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}this.m00 = 1.0 / M00; +this.m11 = 1.0 / M11; +break; +case (1): +this.m02 = -this.m02; +this.m12 = -this.m12; +break; +case (0): +break; +} +}); +Clazz_defineMethod (c$, "transform", +function (ptSrc, ptDst) { +if (ptDst == null) { +if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) { +ptDst = new java.awt.geom.Point2D.Double (); +} else { +ptDst = new java.awt.geom.Point2D.Float (); +}}var x = ptSrc.getX (); +var y = ptSrc.getY (); +switch (this.state) { +default: +this.stateError (); +case (7): +ptDst.setLocation (x * this.m00 + y * this.m01 + this.m02, x * this.m10 + y * this.m11 + this.m12); +return ptDst; +case (6): +ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11); +return ptDst; +case (5): +ptDst.setLocation (y * this.m01 + this.m02, x * this.m10 + this.m12); +return ptDst; +case (4): +ptDst.setLocation (y * this.m01, x * this.m10); +return ptDst; +case (3): +ptDst.setLocation (x * this.m00 + this.m02, y * this.m11 + this.m12); +return ptDst; +case (2): +ptDst.setLocation (x * this.m00, y * this.m11); +return ptDst; +case (1): +ptDst.setLocation (x + this.m02, y + this.m12); +return ptDst; +case (0): +ptDst.setLocation (x, y); +return ptDst; +} +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "transform", +function (srcPts, srcOff, dstPts, dstOff, numPts) { +if (numPts == 0) return; +if (!JU.AU.isAD (srcPts)) { +var src = srcPts; +var dst = dstPts; +this.transform (src, srcOff, dst, dstOff, numPts); +return; +}var M00; +var M01; +var M02; +var M10; +var M11; +var M12; +if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) { +System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); +srcOff = dstOff; +}switch (this.state) { +default: +this.stateError (); +case (7): +M00 = this.m00; +M01 = this.m01; +M02 = this.m02; +M10 = this.m10; +M11 = this.m11; +M12 = this.m12; +while (--numPts >= 0) { +var x = srcPts[srcOff++]; +var y = srcPts[srcOff++]; +dstPts[dstOff++] = M00 * x + M01 * y + M02; +dstPts[dstOff++] = M10 * x + M11 * y + M12; +} +return; +case (6): +M00 = this.m00; +M01 = this.m01; +M10 = this.m10; +M11 = this.m11; +while (--numPts >= 0) { +var x = srcPts[srcOff++]; +var y = srcPts[srcOff++]; +dstPts[dstOff++] = M00 * x + M01 * y; +dstPts[dstOff++] = M10 * x + M11 * y; +} +return; +case (5): +M01 = this.m01; +M02 = this.m02; +M10 = this.m10; +M12 = this.m12; +while (--numPts >= 0) { +var x = srcPts[srcOff++]; +dstPts[dstOff++] = M01 * srcPts[srcOff++] + M02; +dstPts[dstOff++] = M10 * x + M12; +} +return; +case (4): +M01 = this.m01; +M10 = this.m10; +while (--numPts >= 0) { +var x = srcPts[srcOff++]; +dstPts[dstOff++] = M01 * srcPts[srcOff++]; +dstPts[dstOff++] = M10 * x; +} +return; +case (3): +M00 = this.m00; +M02 = this.m02; +M11 = this.m11; +M12 = this.m12; +while (--numPts >= 0) { +dstPts[dstOff++] = M00 * srcPts[srcOff++] + M02; +dstPts[dstOff++] = M11 * srcPts[srcOff++] + M12; +} +return; +case (2): +M00 = this.m00; +M11 = this.m11; +while (--numPts >= 0) { +dstPts[dstOff++] = M00 * srcPts[srcOff++]; +dstPts[dstOff++] = M11 * srcPts[srcOff++]; +} +return; +case (1): +M02 = this.m02; +M12 = this.m12; +while (--numPts >= 0) { +dstPts[dstOff++] = srcPts[srcOff++] + M02; +dstPts[dstOff++] = srcPts[srcOff++] + M12; +} +return; +case (0): +if (srcPts !== dstPts || srcOff != dstOff) { +System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); +}return; +} +}, "~A,~N,~A,~N,~N"); +Clazz_defineMethod (c$, "inverseTransform", +function (ptSrc, ptDst) { +if (ptDst == null) { +if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) { +ptDst = new java.awt.geom.Point2D.Double (); +} else { +ptDst = new java.awt.geom.Point2D.Float (); +}}var x = ptSrc.getX (); +var y = ptSrc.getY (); +switch (this.state) { +default: +this.stateError (); +case (7): +x -= this.m02; +y -= this.m12; +case (6): +var det = this.m00 * this.m11 - this.m01 * this.m10; +if (Math.abs (det) <= 4.9E-324) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); +}ptDst.setLocation ((x * this.m11 - y * this.m01) / det, (y * this.m00 - x * this.m10) / det); +return ptDst; +case (5): +x -= this.m02; +y -= this.m12; +case (4): +if (this.m01 == 0.0 || this.m10 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}ptDst.setLocation (y / this.m10, x / this.m01); +return ptDst; +case (3): +x -= this.m02; +y -= this.m12; +case (2): +if (this.m00 == 0.0 || this.m11 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}ptDst.setLocation (x / this.m00, y / this.m11); +return ptDst; +case (1): +ptDst.setLocation (x - this.m02, y - this.m12); +return ptDst; +case (0): +ptDst.setLocation (x, y); +return ptDst; +} +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "inverseTransform", +function (srcPts, srcOff, dstPts, dstOff, numPts) { +var M00; +var M01; +var M02; +var M10; +var M11; +var M12; +var det; +if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) { +System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); +srcOff = dstOff; +}switch (this.state) { +default: +this.stateError (); +case (7): +M00 = this.m00; +M01 = this.m01; +M02 = this.m02; +M10 = this.m10; +M11 = this.m11; +M12 = this.m12; +det = M00 * M11 - M01 * M10; +if (Math.abs (det) <= 4.9E-324) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); +}while (--numPts >= 0) { +var x = srcPts[srcOff++] - M02; +var y = srcPts[srcOff++] - M12; +dstPts[dstOff++] = (x * M11 - y * M01) / det; +dstPts[dstOff++] = (y * M00 - x * M10) / det; +} +return; +case (6): +M00 = this.m00; +M01 = this.m01; +M10 = this.m10; +M11 = this.m11; +det = M00 * M11 - M01 * M10; +if (Math.abs (det) <= 4.9E-324) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); +}while (--numPts >= 0) { +var x = srcPts[srcOff++]; +var y = srcPts[srcOff++]; +dstPts[dstOff++] = (x * M11 - y * M01) / det; +dstPts[dstOff++] = (y * M00 - x * M10) / det; +} +return; +case (5): +M01 = this.m01; +M02 = this.m02; +M10 = this.m10; +M12 = this.m12; +if (M01 == 0.0 || M10 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}while (--numPts >= 0) { +var x = srcPts[srcOff++] - M02; +dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M10; +dstPts[dstOff++] = x / M01; +} +return; +case (4): +M01 = this.m01; +M10 = this.m10; +if (M01 == 0.0 || M10 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}while (--numPts >= 0) { +var x = srcPts[srcOff++]; +dstPts[dstOff++] = srcPts[srcOff++] / M10; +dstPts[dstOff++] = x / M01; +} +return; +case (3): +M00 = this.m00; +M02 = this.m02; +M11 = this.m11; +M12 = this.m12; +if (M00 == 0.0 || M11 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}while (--numPts >= 0) { +dstPts[dstOff++] = (srcPts[srcOff++] - M02) / M00; +dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M11; +} +return; +case (2): +M00 = this.m00; +M11 = this.m11; +if (M00 == 0.0 || M11 == 0.0) { +throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); +}while (--numPts >= 0) { +dstPts[dstOff++] = srcPts[srcOff++] / M00; +dstPts[dstOff++] = srcPts[srcOff++] / M11; +} +return; +case (1): +M02 = this.m02; +M12 = this.m12; +while (--numPts >= 0) { +dstPts[dstOff++] = srcPts[srcOff++] - M02; +dstPts[dstOff++] = srcPts[srcOff++] - M12; +} +return; +case (0): +if (srcPts !== dstPts || srcOff != dstOff) { +System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); +}return; +} +}, "~A,~N,~A,~N,~N"); +Clazz_defineMethod (c$, "deltaTransform", +function (ptSrc, ptDst) { +if (ptDst == null) { +if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) { +ptDst = new java.awt.geom.Point2D.Double (); +} else { +ptDst = new java.awt.geom.Point2D.Float (); +}}var x = ptSrc.getX (); +var y = ptSrc.getY (); +switch (this.state) { +default: +this.stateError (); +case (7): +case (6): +ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11); +return ptDst; +case (5): +case (4): +ptDst.setLocation (y * this.m01, x * this.m10); +return ptDst; +case (3): +case (2): +ptDst.setLocation (x * this.m00, y * this.m11); +return ptDst; +case (1): +case (0): +ptDst.setLocation (x, y); +return ptDst; +} +}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "deltaTransform", +function (srcPts, srcOff, dstPts, dstOff, numPts) { +var M00; +var M01; +var M10; +var M11; +if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) { +System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); +srcOff = dstOff; +}switch (this.state) { +default: +this.stateError (); +case (7): +case (6): +M00 = this.m00; +M01 = this.m01; +M10 = this.m10; +M11 = this.m11; +while (--numPts >= 0) { +var x = srcPts[srcOff++]; +var y = srcPts[srcOff++]; +dstPts[dstOff++] = x * M00 + y * M01; +dstPts[dstOff++] = x * M10 + y * M11; +} +return; +case (5): +case (4): +M01 = this.m01; +M10 = this.m10; +while (--numPts >= 0) { +var x = srcPts[srcOff++]; +dstPts[dstOff++] = srcPts[srcOff++] * M01; +dstPts[dstOff++] = x * M10; +} +return; +case (3): +case (2): +M00 = this.m00; +M11 = this.m11; +while (--numPts >= 0) { +dstPts[dstOff++] = srcPts[srcOff++] * M00; +dstPts[dstOff++] = srcPts[srcOff++] * M11; +} +return; +case (1): +case (0): +if (srcPts !== dstPts || srcOff != dstOff) { +System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); +}return; +} +}, "~A,~N,~A,~N,~N"); +Clazz_defineMethod (c$, "createTransformedShape", +function (pSrc) { +if (pSrc == null) { +return null; +}return new java.awt.geom.Path2D.Double (pSrc, this); +}, "java.awt.Shape"); +c$._matround = Clazz_defineMethod (c$, "_matround", + function (matval) { +return Math.rint (matval * 1E15) / 1E15; +}, "~N"); +Clazz_overrideMethod (c$, "toString", +function () { +return ("AffineTransform[[" + java.awt.geom.AffineTransform._matround (this.m00) + ", " + java.awt.geom.AffineTransform._matround (this.m01) + ", " + java.awt.geom.AffineTransform._matround (this.m02) + "], [" + java.awt.geom.AffineTransform._matround (this.m10) + ", " + java.awt.geom.AffineTransform._matround (this.m11) + ", " + java.awt.geom.AffineTransform._matround (this.m12) + "]]"); +}); +Clazz_defineMethod (c$, "isIdentity", +function () { +return (this.state == 0 || (this.getType () == 0)); +}); +Clazz_defineMethod (c$, "clone", +function () { +try { +return Clazz_superCall (this, java.awt.geom.AffineTransform, "clone", []); +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +throw new InternalError (); +} else { +throw e; +} +} +}); +Clazz_overrideMethod (c$, "hashCode", +function () { +var bits = Double.doubleToLongBits (this.m00); +bits = bits * 31 + Double.doubleToLongBits (this.m01); +bits = bits * 31 + Double.doubleToLongBits (this.m02); +bits = bits * 31 + Double.doubleToLongBits (this.m10); +bits = bits * 31 + Double.doubleToLongBits (this.m11); +bits = bits * 31 + Double.doubleToLongBits (this.m12); +return ((bits) ^ ((bits >> 32))); +}); +Clazz_overrideMethod (c$, "equals", +function (obj) { +if (!(Clazz_instanceOf (obj, java.awt.geom.AffineTransform))) { +return false; +}var a = obj; +return ((this.m00 == a.m00) && (this.m01 == a.m01) && (this.m02 == a.m02) && (this.m10 == a.m10) && (this.m11 == a.m11) && (this.m12 == a.m12)); +}, "~O"); +Clazz_defineStatics (c$, +"TYPE_UNKNOWN", -1, +"TYPE_IDENTITY", 0, +"TYPE_TRANSLATION", 1, +"TYPE_UNIFORM_SCALE", 2, +"TYPE_GENERAL_SCALE", 4, +"TYPE_MASK_SCALE", (6), +"TYPE_FLIP", 64, +"TYPE_QUADRANT_ROTATION", 8, +"TYPE_GENERAL_ROTATION", 16, +"TYPE_MASK_ROTATION", (24), +"TYPE_GENERAL_TRANSFORM", 32, +"APPLY_IDENTITY", 0, +"APPLY_TRANSLATE", 1, +"APPLY_SCALE", 2, +"APPLY_SHEAR", 4, +"HI_SHIFT", 3, +"HI_IDENTITY", 0, +"HI_TRANSLATE", 8, +"HI_SCALE", 16, +"HI_SHEAR", 32, +"rot90conversion", Clazz_newIntArray (-1, [4, 5, 4, 5, 2, 3, 6, 7])); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.lang.Exception"], "java.awt.geom.NoninvertibleTransformException", null, function () { +c$ = Clazz_declareType (java.awt.geom, "NoninvertibleTransformException", Exception); +}); +Clazz_declarePackage ("java.awt.geom"); +Clazz_load (["java.awt.Shape", "java.awt.geom.PathIterator"], "java.awt.geom.Path2D", ["java.lang.Double", "$.IllegalArgumentException", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.IllegalPathStateException", "$.Point2D", "$.Rectangle2D", "jssun.awt.geom.Curve"], function () { +c$ = Clazz_decorateAsClass (function () { +this.pointTypes = null; +this.numTypes = 0; +this.numCoords = 0; +this.windingRule = 0; +Clazz_instantialize (this, arguments); +}, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_makeConstructor (c$, +function (rule, initialTypes) { +this.setWindingRule (rule); +this.pointTypes = Clazz_newByteArray (initialTypes, 0); +}, "~N,~N"); +Clazz_defineMethod (c$, "closePath", +function () { +if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) { +this.needRoom (true, 0); +this.pointTypes[this.numTypes++] = 4; +}}); +Clazz_defineMethod (c$, "append", +function (s, connect) { +this.append (s.getPathIterator (null), connect); +}, "java.awt.Shape,~B"); +Clazz_defineMethod (c$, "getWindingRule", +function () { +return this.windingRule; +}); +Clazz_defineMethod (c$, "setWindingRule", +function (rule) { +if (rule != 0 && rule != 1) { +throw new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO"); +}this.windingRule = rule; +}, "~N"); +Clazz_defineMethod (c$, "getCurrentPoint", +function () { +var index = this.numCoords; +if (this.numTypes < 1 || index < 1) { +return null; +}if (this.pointTypes[this.numTypes - 1] == 4) { +loop : for (var i = this.numTypes - 2; i > 0; i--) { +switch (this.pointTypes[i]) { +case 0: +break loop; +case 1: +index -= 2; +break; +case 2: +index -= 4; +break; +case 3: +index -= 6; +break; +case 4: +break; +} +} +}return this.getPoint (index - 2); +}); +Clazz_defineMethod (c$, "reset", +function () { +this.numTypes = this.numCoords = 0; +}); +Clazz_defineMethod (c$, "createTransformedShape", +function (at) { +var p2d = this.clone (); +if (at != null) { +p2d.transform (at); +}return p2d; +}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getBounds", +function () { +return this.getBounds2D ().getBounds (); +}); +c$.contains = Clazz_defineMethod (c$, "contains", +function (pi, x, y) { +if (x * 0.0 + y * 0.0 == 0.0) { +var mask = (pi.getWindingRule () == 1 ? -1 : 1); +var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y); +return ((cross & mask) != 0); +} else { +return false; +}}, "java.awt.geom.PathIterator,~N,~N"); +c$.contains = Clazz_defineMethod (c$, "contains", +function (pi, p) { +return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ()); +}, "java.awt.geom.PathIterator,java.awt.geom.Point2D"); +Clazz_defineMethod (c$, "contains", +function (x, y) { +if (x * 0.0 + y * 0.0 == 0.0) { +if (this.numTypes < 2) { +return false; +}var mask = (this.windingRule == 1 ? -1 : 1); +return ((this.pointCrossings (x, y) & mask) != 0); +} else { +return false; +}}, "~N,~N"); +Clazz_defineMethod (c$, "contains", +function (p) { +return this.contains (p.getX (), p.getY ()); +}, "java.awt.geom.Point2D"); +c$.contains = Clazz_defineMethod (c$, "contains", +function (pi, x, y, w, h) { +if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { +return false; +}if (w <= 0 || h <= 0) { +return false; +}var mask = (pi.getWindingRule () == 1 ? -1 : 2); +var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h); +return (crossings != -2147483648 && (crossings & mask) != 0); +}, "java.awt.geom.PathIterator,~N,~N,~N,~N"); +c$.contains = Clazz_defineMethod (c$, "contains", +function (pi, r) { +return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "contains", +function (x, y, w, h) { +if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { +return false; +}if (w <= 0 || h <= 0) { +return false; +}var mask = (this.windingRule == 1 ? -1 : 2); +var crossings = this.rectCrossings (x, y, x + w, y + h); +return (crossings != -2147483648 && (crossings & mask) != 0); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "contains", +function (r) { +return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +c$.intersects = Clazz_defineMethod (c$, "intersects", +function (pi, x, y, w, h) { +if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { +return false; +}if (w <= 0 || h <= 0) { +return false; +}var mask = (pi.getWindingRule () == 1 ? -1 : 2); +var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h); +return (crossings == -2147483648 || (crossings & mask) != 0); +}, "java.awt.geom.PathIterator,~N,~N,~N,~N"); +c$.intersects = Clazz_defineMethod (c$, "intersects", +function (pi, r) { +return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D"); +Clazz_defineMethod (c$, "intersects", +function (x, y, w, h) { +if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { +return false; +}if (w <= 0 || h <= 0) { +return false; +}var mask = (this.windingRule == 1 ? -1 : 2); +var crossings = this.rectCrossings (x, y, x + w, y + h); +return (crossings == -2147483648 || (crossings & mask) != 0); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "intersects", +function (r) { +return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); +}, "java.awt.geom.Rectangle2D"); +Clazz_overrideMethod (c$, "getPathIterator", +function (at, flatness) { +return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); +}, "java.awt.geom.AffineTransform,~N"); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.typeIdx = 0; +this.pointIdx = 0; +this.path = null; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator); +Clazz_makeConstructor (c$, +function (a) { +this.path = a; +}, "java.awt.geom.Path2D"); +Clazz_overrideMethod (c$, "getWindingRule", +function () { +return this.path.getWindingRule (); +}); +Clazz_overrideMethod (c$, "isDone", +function () { +return (this.typeIdx >= this.path.numTypes); +}); +Clazz_overrideMethod (c$, "next", +function () { +var a = this.path.pointTypes[this.typeIdx++]; +this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a]; +}); +Clazz_defineStatics (c$, +"curvecoords", Clazz_newIntArray (-1, [2, 2, 4, 6, 0])); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.floatCoords = null; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D); +Clazz_makeConstructor (c$, +function () { +this.construct (1, 20); +}); +Clazz_makeConstructor (c$, +function (a) { +this.construct (a, 20); +}, "~N"); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []); +this.setWindingRule (a); +this.pointTypes = Clazz_newByteArray (b, 0); +this.floatCoords = Clazz_newFloatArray (b * 2, 0); +}, "~N,~N"); +Clazz_makeConstructor (c$, +function (a) { +this.construct (a, null); +}, "java.awt.Shape"); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []); +this.setPath (a, b); +}, "java.awt.Shape,java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "setPath", + function (a, b) { +if (Clazz_instanceOf (a, java.awt.geom.Path2D)) { +var c = a; +this.setWindingRule (c.windingRule); +this.numTypes = c.numTypes; +this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length); +this.numCoords = c.numCoords; +this.floatCoords = c.cloneCoordsFloat (b); +} else { +var c = a.getPathIterator (b); +this.setWindingRule (c.getWindingRule ()); +this.pointTypes = Clazz_newByteArray (20, 0); +this.floatCoords = Clazz_newFloatArray (40, 0); +this.append (c, false); +}}, "java.awt.Shape,java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "cloneCoordsFloat", +function (a) { +var b; +if (a == null) { +b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length); +} else { +b = Clazz_newFloatArray (this.floatCoords.length, 0); +a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); +}return b; +}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "cloneCoordsDouble", +function (a) { +var b = Clazz_newDoubleArray (this.floatCoords.length, 0); +if (a == null) { +for (var c = 0; c < this.numCoords; c++) { +b[c] = this.floatCoords[c]; +} +} else { +a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); +}return b; +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "append", +function (a, b) { +{ +if (typeof pi == "number") { +this.floatCoords[this.numCoords++] = pi; +this.floatCoords[this.numCoords++] = connect; +return; +} +}var c = Clazz_newFloatArray (6, 0); +while (!a.isDone ()) { +switch (a.currentSegment (c)) { +case 0: +if (!b || this.numTypes < 1 || this.numCoords < 1) { +this.moveTo (c[0], c[1]); +break; +}if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) { +break; +}case 1: +this.lineTo (c[0], c[1]); +break; +case 2: +this.quadTo (c[0], c[1], c[2], c[3]); +break; +case 3: +this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]); +break; +case 4: +this.closePath (); +break; +} +a.next (); +b = false; +} +}, "java.awt.geom.PathIterator,~B"); +Clazz_overrideMethod (c$, "getPoint", +function (a) { +return new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]); +}, "~N"); +Clazz_overrideMethod (c$, "needRoom", +function (a, b) { +if (a && this.numTypes == 0) { +throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); +}var c = this.pointTypes.length; +if (this.numTypes >= c) { +var d = c; +if (d > 500) { +d = 500; +}this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d); +}c = this.floatCoords.length; +if (this.numCoords + b > c) { +var d = c; +if (d > 1000) { +d = 1000; +}if (d < b) { +d = b; +}this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d); +}}, "~B,~N"); +Clazz_defineMethod (c$, "moveTo", +function (a, b) { +if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) { +this.floatCoords[this.numCoords - 2] = a; +this.floatCoords[this.numCoords - 1] = b; +} else { +this.needRoom (false, 2); +this.pointTypes[this.numTypes++] = 0; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +}}, "~N,~N"); +Clazz_defineMethod (c$, "moveTo", +function (a, b) { +if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) { +this.floatCoords[this.numCoords - 2] = a; +this.floatCoords[this.numCoords - 1] = b; +} else { +this.needRoom (false, 2); +this.pointTypes[this.numTypes++] = 0; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +}}, "~N,~N"); +Clazz_defineMethod (c$, "lineTo", +function (a, b) { +this.needRoom (true, 2); +this.pointTypes[this.numTypes++] = 1; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +}, "~N,~N"); +Clazz_defineMethod (c$, "lineTo", +function (a, b) { +this.needRoom (true, 2); +this.pointTypes[this.numTypes++] = 1; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +}, "~N,~N"); +Clazz_defineMethod (c$, "quadTo", +function (a, b, c, d) { +this.needRoom (true, 4); +this.pointTypes[this.numTypes++] = 2; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +this.floatCoords[this.numCoords++] = c; +this.floatCoords[this.numCoords++] = d; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "quadTo", +function (a, b, c, d) { +this.needRoom (true, 4); +this.pointTypes[this.numTypes++] = 2; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +this.floatCoords[this.numCoords++] = c; +this.floatCoords[this.numCoords++] = d; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "curveTo", +function (a, b, c, d, e, f) { +this.needRoom (true, 6); +this.pointTypes[this.numTypes++] = 3; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +this.floatCoords[this.numCoords++] = c; +this.floatCoords[this.numCoords++] = d; +this.floatCoords[this.numCoords++] = e; +this.floatCoords[this.numCoords++] = f; +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "curveTo", +function (a, b, c, d, e, f) { +this.needRoom (true, 6); +this.pointTypes[this.numTypes++] = 3; +this.floatCoords[this.numCoords++] = a; +this.floatCoords[this.numCoords++] = b; +this.floatCoords[this.numCoords++] = c; +this.floatCoords[this.numCoords++] = d; +this.floatCoords[this.numCoords++] = e; +this.floatCoords[this.numCoords++] = f; +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "pointCrossings", +function (a, b) { +var c; +var d; +var e; +var f; +var g; +var h; +var i = this.floatCoords; +e = c = i[0]; +f = d = i[1]; +var j = 0; +var k = 2; +for (var l = 1; l < this.numTypes; l++) { +switch (this.pointTypes[l]) { +case 0: +if (f != d) { +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); +}c = e = i[k++]; +d = f = i[k++]; +break; +case 1: +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]); +e = g; +f = h; +break; +case 2: +j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0); +e = g; +f = h; +break; +case 3: +j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0); +e = g; +f = h; +break; +case 4: +if (f != d) { +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); +}e = c; +f = d; +break; +} +} +if (f != d) { +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); +}return j; +}, "~N,~N"); +Clazz_overrideMethod (c$, "rectCrossings", +function (a, b, c, d) { +var e = this.floatCoords; +var f; +var g; +var h; +var i; +var j; +var k; +f = h = e[0]; +g = i = e[1]; +var l = 0; +var m = 2; +for (var n = 1; l != -2147483648 && n < this.numTypes; n++) { +switch (this.pointTypes[n]) { +case 0: +if (f != h || g != i) { +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); +}h = f = e[m++]; +i = g = e[m++]; +break; +case 1: +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]); +f = j; +g = k; +break; +case 2: +l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0); +f = j; +g = k; +break; +case 3: +l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0); +f = j; +g = k; +break; +case 4: +if (f != h || g != i) { +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); +}f = h; +g = i; +break; +} +} +if (l != -2147483648 && (f != h || g != i)) { +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); +}return l; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "transform", +function (a) { +a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz_doubleToInt (this.numCoords / 2)); +}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a; +var b; +var c; +var d; +var e = this.numCoords; +if (e > 0) { +b = d = this.floatCoords[--e]; +a = c = this.floatCoords[--e]; +while (e > 0) { +var f = this.floatCoords[--e]; +var g = this.floatCoords[--e]; +if (g < a) a = g; +if (f < b) b = f; +if (g > c) c = g; +if (f > d) d = f; +} +} else { +a = b = c = d = 0.0; +}return new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b); +}); +Clazz_defineMethod (c$, "getPathIterator", +function (a) { +if (a == null) { +return new java.awt.geom.Path2D.Float.CopyIterator (this); +} else { +return new java.awt.geom.Path2D.Float.TxIterator (this, a); +}}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "clone", +function () { +return new java.awt.geom.Path2D.Float (this); +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.floatCoords = null; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]); +this.floatCoords = a.floatCoords; +}, "java.awt.geom.Path2D.Float"); +Clazz_defineMethod (c$, "currentSegment", +function (a) { +var b = this.path.pointTypes[this.typeIdx]; +var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; +if (c > 0) { +for (var d = 0; d < c; d++) { +a[d] = this.floatCoords[this.pointIdx + d]; +} +}return b; +}, "~A"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.floatCoords = null; +this.affine = null; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]); +this.floatCoords = a.floatCoords; +this.affine = b; +}, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "currentSegment", +function (a) { +var b = this.path.pointTypes[this.typeIdx]; +var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; +if (c > 0) { +this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2)); +}return b; +}, "~A"); +c$ = Clazz_p0p (); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.doubleCoords = null; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D); +Clazz_makeConstructor (c$, +function () { +this.construct (1, 20); +}); +Clazz_makeConstructor (c$, +function (a) { +this.construct (a, 20); +}, "~N"); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Double, [a, b]); +this.doubleCoords = Clazz_newDoubleArray (b * 2, 0); +}, "~N,~N"); +Clazz_makeConstructor (c$, +function (a) { +this.construct (a, null); +}, "java.awt.Shape"); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Double, []); +if (Clazz_instanceOf (a, java.awt.geom.Path2D)) { +var c = a; +this.setWindingRule (c.windingRule); +this.numTypes = c.numTypes; +this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length); +this.numCoords = c.numCoords; +this.doubleCoords = c.cloneCoordsDouble (b); +} else { +var c = a.getPathIterator (b); +this.setWindingRule (c.getWindingRule ()); +this.pointTypes = Clazz_newByteArray (20, 0); +this.doubleCoords = Clazz_newDoubleArray (40, 0); +this.append (c, false); +}}, "java.awt.Shape,java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "cloneCoordsFloat", +function (a) { +var b = Clazz_newFloatArray (this.doubleCoords.length, 0); +if (a == null) { +for (var c = 0; c < this.numCoords; c++) { +b[c] = this.doubleCoords[c]; +} +} else { +a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); +}return b; +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "cloneCoordsDouble", +function (a) { +var b; +if (a == null) { +b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length); +} else { +b = Clazz_newDoubleArray (this.doubleCoords.length, 0); +a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); +}return b; +}, "java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "append", +function (a, b) { +{ +if (typeof pi == "number") { +this.floatCoords[this.numCoords++] = pi; +this.floatCoords[this.numCoords++] = connect; +return; +} +}var c = Clazz_newDoubleArray (6, 0); +while (!a.isDone ()) { +switch (a.currentSegment (c)) { +case 0: +if (!b || this.numTypes < 1 || this.numCoords < 1) { +this.moveTo (c[0], c[1]); +break; +}if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) { +break; +}case 1: +this.lineTo (c[0], c[1]); +break; +case 2: +this.quadTo (c[0], c[1], c[2], c[3]); +break; +case 3: +this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]); +break; +case 4: +this.closePath (); +break; +} +a.next (); +b = false; +} +}, "java.awt.geom.PathIterator,~B"); +Clazz_overrideMethod (c$, "getPoint", +function (a) { +return new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]); +}, "~N"); +Clazz_overrideMethod (c$, "needRoom", +function (a, b) { +if (a && this.numTypes == 0) { +throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); +}var c = this.pointTypes.length; +if (this.numTypes >= c) { +var d = c; +if (d > 500) { +d = 500; +}this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d); +}c = this.doubleCoords.length; +if (this.numCoords + b > c) { +var d = c; +if (d > 1000) { +d = 1000; +}if (d < b) { +d = b; +}this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d); +}}, "~B,~N"); +Clazz_overrideMethod (c$, "moveTo", +function (a, b) { +if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) { +this.doubleCoords[this.numCoords - 2] = a; +this.doubleCoords[this.numCoords - 1] = b; +} else { +this.needRoom (false, 2); +this.pointTypes[this.numTypes++] = 0; +this.doubleCoords[this.numCoords++] = a; +this.doubleCoords[this.numCoords++] = b; +}}, "~N,~N"); +Clazz_overrideMethod (c$, "lineTo", +function (a, b) { +this.needRoom (true, 2); +this.pointTypes[this.numTypes++] = 1; +this.doubleCoords[this.numCoords++] = a; +this.doubleCoords[this.numCoords++] = b; +}, "~N,~N"); +Clazz_overrideMethod (c$, "quadTo", +function (a, b, c, d) { +this.needRoom (true, 4); +this.pointTypes[this.numTypes++] = 2; +this.doubleCoords[this.numCoords++] = a; +this.doubleCoords[this.numCoords++] = b; +this.doubleCoords[this.numCoords++] = c; +this.doubleCoords[this.numCoords++] = d; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "curveTo", +function (a, b, c, d, e, f) { +this.needRoom (true, 6); +this.pointTypes[this.numTypes++] = 3; +this.doubleCoords[this.numCoords++] = a; +this.doubleCoords[this.numCoords++] = b; +this.doubleCoords[this.numCoords++] = c; +this.doubleCoords[this.numCoords++] = d; +this.doubleCoords[this.numCoords++] = e; +this.doubleCoords[this.numCoords++] = f; +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "pointCrossings", +function (a, b) { +var c; +var d; +var e; +var f; +var g; +var h; +var i = this.doubleCoords; +e = c = i[0]; +f = d = i[1]; +var j = 0; +var k = 2; +for (var l = 1; l < this.numTypes; l++) { +switch (this.pointTypes[l]) { +case 0: +if (f != d) { +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); +}c = e = i[k++]; +d = f = i[k++]; +break; +case 1: +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]); +e = g; +f = h; +break; +case 2: +j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0); +e = g; +f = h; +break; +case 3: +j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0); +e = g; +f = h; +break; +case 4: +if (f != d) { +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); +}e = c; +f = d; +break; +} +} +if (f != d) { +j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); +}return j; +}, "~N,~N"); +Clazz_overrideMethod (c$, "rectCrossings", +function (a, b, c, d) { +var e = this.doubleCoords; +var f; +var g; +var h; +var i; +var j; +var k; +f = h = e[0]; +g = i = e[1]; +var l = 0; +var m = 2; +for (var n = 1; l != -2147483648 && n < this.numTypes; n++) { +switch (this.pointTypes[n]) { +case 0: +if (f != h || g != i) { +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); +}h = f = e[m++]; +i = g = e[m++]; +break; +case 1: +j = e[m++]; +k = e[m++]; +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k); +f = j; +g = k; +break; +case 2: +l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0); +f = j; +g = k; +break; +case 3: +l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0); +f = j; +g = k; +break; +case 4: +if (f != h || g != i) { +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); +}f = h; +g = i; +break; +} +} +if (l != -2147483648 && (f != h || g != i)) { +l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); +}return l; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "transform", +function (a) { +a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz_doubleToInt (this.numCoords / 2)); +}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getBounds2D", +function () { +var a; +var b; +var c; +var d; +var e = this.numCoords; +if (e > 0) { +b = d = this.doubleCoords[--e]; +a = c = this.doubleCoords[--e]; +while (e > 0) { +var f = this.doubleCoords[--e]; +var g = this.doubleCoords[--e]; +if (g < a) a = g; +if (f < b) b = f; +if (g > c) c = g; +if (f > d) d = f; +} +} else { +a = b = c = d = 0.0; +}return new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b); +}); +Clazz_defineMethod (c$, "getPathIterator", +function (a) { +if (a == null) { +return new java.awt.geom.Path2D.Double.CopyIterator (this); +} else { +return new java.awt.geom.Path2D.Double.TxIterator (this, a); +}}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "clone", +function () { +return new java.awt.geom.Path2D.Double (this); +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.doubleCoords = null; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]); +this.doubleCoords = a.doubleCoords; +}, "java.awt.geom.Path2D.Double"); +Clazz_defineMethod (c$, "currentSegment", +function (a) { +var b = this.path.pointTypes[this.typeIdx]; +var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; +if (c > 0) { +for (var d = 0; d < c; d++) { +a[d] = this.doubleCoords[this.pointIdx + d]; +} +}return b; +}, "~A"); +Clazz_defineMethod (c$, "currentSegment", +function (a) { +var b = this.path.pointTypes[this.typeIdx]; +var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; +if (c > 0) { +System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c); +}return b; +}, "~A"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.doubleCoords = null; +this.affine = null; +Clazz_instantialize (this, arguments); +}, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]); +this.doubleCoords = a.doubleCoords; +this.affine = b; +}, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform"); +Clazz_defineMethod (c$, "currentSegment", +function (a) { +var b = this.path.pointTypes[this.typeIdx]; +var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; +if (c > 0) { +this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2)); +}return b; +}, "~A"); +Clazz_defineMethod (c$, "currentSegment", +function (a) { +var b = this.path.pointTypes[this.typeIdx]; +var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; +if (c > 0) { +this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2)); +}return b; +}, "~A"); +c$ = Clazz_p0p (); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"WIND_EVEN_ODD", 0, +"WIND_NON_ZERO", 1, +"SEG_MOVETO", 0, +"SEG_LINETO", 1, +"SEG_QUADTO", 2, +"SEG_CUBICTO", 3, +"SEG_CLOSE", 4, +"INIT_SIZE", 20, +"EXPAND_MAX", 500); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_declareInterface (javax.swing, "Icon"); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JTextField"], "javax.swing.JPasswordField", ["javax.swing.text.Segment"], function () { +c$ = Clazz_decorateAsClass (function () { +this.echoChar = '\0'; +this.echoCharSet = false; +Clazz_instantialize (this, arguments); +}, javax.swing, "JPasswordField", javax.swing.JTextField); +Clazz_makeConstructor (c$, +function () { +this.construct (null, null, 0); +}); +Clazz_makeConstructor (c$, +function (text) { +this.construct (null, text, 0); +}, "~S"); +Clazz_makeConstructor (c$, +function (columns) { +this.construct (null, null, columns); +}, "~N"); +Clazz_makeConstructor (c$, +function (text, columns) { +this.construct (null, text, columns); +}, "~S,~N"); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "PasswordFieldUI"; +}); +Clazz_defineMethod (c$, "updateUI", +function () { +if (!this.echoCharSet) { +this.echoChar = '*'; +}Clazz_superCall (this, javax.swing.JPasswordField, "updateUI", []); +}); +Clazz_defineMethod (c$, "getEchoChar", +function () { +return this.echoChar; +}); +Clazz_defineMethod (c$, "setEchoChar", +function (c) { +this.echoChar = c; +this.echoCharSet = true; +this.repaint (); +this.revalidate (); +}, "~S"); +Clazz_defineMethod (c$, "echoCharIsSet", +function () { +return this.echoChar.charCodeAt (0) != 0; +}); +Clazz_overrideMethod (c$, "cut", +function () { +}); +Clazz_overrideMethod (c$, "copy", +function () { +}); +Clazz_defineMethod (c$, "getPassword", +function () { +var doc = this.getDocument (); +var txt = new javax.swing.text.Segment (); +try { +doc.getText (0, doc.getLength (), txt); +} catch (e) { +if (Clazz_exceptionOf (e, javax.swing.text.BadLocationException)) { +return null; +} else { +throw e; +} +} +var retValue = Clazz_newCharArray (txt.count, '\0'); +System.arraycopy (txt.array, txt.offset, retValue, 0, txt.count); +return retValue; +}); +Clazz_defineMethod (c$, "paramString", +function () { +return Clazz_superCall (this, javax.swing.JPasswordField, "paramString", []) + ",echoChar=" + this.echoChar; +}); +Clazz_defineMethod (c$, "customSetUIProperty", +function (propertyName, value) { +if (propertyName === "echoChar") { +if (!this.echoCharSet) { +this.setEchoChar ((value).charValue ()); +this.echoCharSet = false; +}return true; +}return false; +}, "~S,~O"); +Clazz_defineStatics (c$, +"$$uiClassID", "PasswordFieldUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.ActionPropertyChangeListener", "$.SwingConstants", "javax.swing.event.ChangeListener", "javax.swing.text.JTextComponent", "$.TextAction"], "javax.swing.JTextField", ["java.lang.Boolean", "$.IllegalArgumentException", "java.awt.EventQueue", "java.awt.event.ActionEvent", "$.ActionListener", "$.InputEvent", "javax.swing.AbstractAction", "$.JViewport", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.$action = null; +this.actionPropertyChangeListener = null; +this.horizontalAlignment = 10; +this.columns = 0; +this.columnWidth = 0; +this.command = null; +if (!Clazz_isClassDefined ("javax.swing.JTextField.ScrollRepainter")) { +javax.swing.JTextField.$JTextField$ScrollRepainter$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "JTextField", javax.swing.text.JTextComponent, javax.swing.SwingConstants); +Clazz_makeConstructor (c$, +function () { +this.construct (null, null, 0); +}); +Clazz_makeConstructor (c$, +function (text) { +this.construct (null, text, 0); +}, "~S"); +Clazz_makeConstructor (c$, +function (columns) { +this.construct (null, null, columns); +}, "~N"); +Clazz_makeConstructor (c$, +function (text, columns) { +this.construct (null, text, columns); +}, "~S,~N"); +Clazz_makeConstructor (c$, +function (doc, text, columns) { +Clazz_superConstructor (this, javax.swing.JTextField); +if (columns < 0) { +throw new IllegalArgumentException ("columns less than zero."); +}this.columns = columns; +if (doc == null) { +doc = this.createDefaultModel (); +}this.setDocument (doc); +if (text != null) { +this.setText (text); +}}, "javax.swing.text.Document,~S,~N"); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "TextFieldUI"; +}); +Clazz_defineMethod (c$, "setDocument", +function (doc) { +if (doc != null) { +doc.putProperty ("filterNewlines", Boolean.TRUE); +}Clazz_superCall (this, javax.swing.JTextField, "setDocument", [doc]); +}, "javax.swing.text.Document"); +Clazz_overrideMethod (c$, "isValidateRoot", +function () { +var parent = this.getParent (); +if (Clazz_instanceOf (parent, javax.swing.JViewport)) { +return false; +}return true; +}); +Clazz_defineMethod (c$, "getHorizontalAlignment", +function () { +return this.horizontalAlignment; +}); +Clazz_defineMethod (c$, "setHorizontalAlignment", +function (alignment) { +if (alignment == this.horizontalAlignment) return; +var oldValue = this.horizontalAlignment; +if ((alignment == 2) || (alignment == 0) || (alignment == 4) || (alignment == 10) || (alignment == 11)) { +this.horizontalAlignment = alignment; +} else { +throw new IllegalArgumentException ("horizontalAlignment"); +}this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment); +this.invalidate (); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "createDefaultModel", +function () { +return swingjs.JSToolkit.getPlainDocument (this); +}); +Clazz_defineMethod (c$, "getColumns", +function () { +return this.columns; +}); +Clazz_defineMethod (c$, "setColumns", +function (columns) { +var oldVal = this.columns; +if (columns < 0) { +throw new IllegalArgumentException ("columns less than zero."); +}if (columns != oldVal) { +this.columns = columns; +this.invalidate (); +}}, "~N"); +Clazz_defineMethod (c$, "getColumnWidth", +function () { +if (this.columnWidth == 0) { +var metrics = this.getFontMetrics (this.getFont ()); +this.columnWidth = metrics.charWidth ('m'); +}return this.columnWidth; +}); +Clazz_overrideMethod (c$, "getPreferredSize", +function () { +return this.getPrefSizeJTF (); +}); +Clazz_defineMethod (c$, "getPrefSizeJTF", +function () { +var size = this.getPrefSizeJComp (); +if (this.columns != 0) { +var insets = this.getInsets (); +size.width = this.columns * this.getColumnWidth () + insets.left + insets.right; +}return size; +}); +Clazz_defineMethod (c$, "setFont", +function (f) { +Clazz_superCall (this, javax.swing.JTextField, "setFont", [f]); +this.columnWidth = 0; +}, "java.awt.Font"); +Clazz_defineMethod (c$, "addActionListener", +function (l) { +this.listenerList.add (java.awt.event.ActionListener, l); +}, "java.awt.event.ActionListener"); +Clazz_defineMethod (c$, "removeActionListener", +function (l) { +if ((l != null) && (this.getAction () === l)) { +this.setAction (null); +} else { +this.listenerList.remove (java.awt.event.ActionListener, l); +}}, "java.awt.event.ActionListener"); +Clazz_defineMethod (c$, "getActionListeners", +function () { +return this.listenerList.getListeners (java.awt.event.ActionListener); +}); +Clazz_defineMethod (c$, "fireActionPerformed", +function () { +var listeners = this.listenerList.getListenerList (); +var modifiers = 0; +var currentEvent = java.awt.EventQueue.getCurrentEvent (); +if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) { +modifiers = (currentEvent).getModifiers (); +} else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) { +modifiers = (currentEvent).getModifiers (); +}var e = new java.awt.event.ActionEvent (this, 1001, (this.command != null) ? this.command : this.getText (), java.awt.EventQueue.getMostRecentEventTime (), modifiers); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === java.awt.event.ActionListener) { +(listeners[i + 1]).actionPerformed (e); +}} +}); +Clazz_defineMethod (c$, "setActionCommand", +function (command) { +this.command = command; +}, "~S"); +Clazz_defineMethod (c$, "setAction", +function (a) { +var oldValue = this.getAction (); +if (this.$action == null || !this.$action.equals (a)) { +this.$action = a; +if (oldValue != null) { +this.removeActionListener (oldValue); +oldValue.removePropertyChangeListener (this.actionPropertyChangeListener); +this.actionPropertyChangeListener = null; +}this.configurePropertiesFromAction (this.$action); +if (this.$action != null) { +if (!this.isListener (java.awt.event.ActionListener, this.$action)) { +this.addActionListener (this.$action); +}this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action); +this.$action.addPropertyChangeListener (this.actionPropertyChangeListener); +}this.firePropertyChangeObject ("action", oldValue, this.$action); +}}, "javax.swing.Action"); +Clazz_defineMethod (c$, "isListener", + function (c, a) { +var isListener = false; +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === c && listeners[i + 1] === a) { +isListener = true; +}} +return isListener; +}, "Class,java.awt.event.ActionListener"); +Clazz_defineMethod (c$, "getAction", +function () { +return this.$action; +}); +Clazz_defineMethod (c$, "configurePropertiesFromAction", +function (a) { +javax.swing.AbstractAction.setEnabledFromAction (this, a); +javax.swing.AbstractAction.setToolTipTextFromAction (this, a); +this.setActionCommandFromAction (a); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "actionPropertyChanged", +function (action, propertyName) { +if (propertyName === "ActionCommandKey") { +this.setActionCommandFromAction (action); +} else if (propertyName === "enabled") { +javax.swing.AbstractAction.setEnabledFromAction (this, action); +} else if (propertyName === "ShortDescription") { +javax.swing.AbstractAction.setToolTipTextFromAction (this, action); +}}, "javax.swing.Action,~S"); +Clazz_defineMethod (c$, "setActionCommandFromAction", + function (action) { +this.setActionCommand ((action == null) ? null : action.getValue ("ActionCommandKey")); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "createActionPropertyChangeListener", +function (a) { +return new javax.swing.JTextField.TextFieldActionPropertyChangeListener (this, a); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "getActions", +function () { +return javax.swing.text.TextAction.augmentList (Clazz_superCall (this, javax.swing.JTextField, "getActions", []), javax.swing.JTextField.defaultActions); +}); +Clazz_defineMethod (c$, "postActionEvent", +function () { +this.fireActionPerformed (); +}); +Clazz_defineMethod (c$, "hasActionListener", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === java.awt.event.ActionListener) { +return true; +}} +return false; +}); +Clazz_defineMethod (c$, "paramString", +function () { +var horizontalAlignmentString; +if (this.horizontalAlignment == 2) { +horizontalAlignmentString = "LEFT"; +} else if (this.horizontalAlignment == 0) { +horizontalAlignmentString = "CENTER"; +} else if (this.horizontalAlignment == 4) { +horizontalAlignmentString = "RIGHT"; +} else if (this.horizontalAlignment == 10) { +horizontalAlignmentString = "LEADING"; +} else if (this.horizontalAlignment == 11) { +horizontalAlignmentString = "TRAILING"; +} else horizontalAlignmentString = ""; +var commandString = (this.command != null ? this.command : ""); +return Clazz_superCall (this, javax.swing.JTextField, "paramString", []) + ",columns=" + this.columns + ",columnWidth=" + this.columnWidth + ",command=" + commandString + ",horizontalAlignment=" + horizontalAlignmentString; +}); +c$.$JTextField$ScrollRepainter$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +Clazz_instantialize (this, arguments); +}, javax.swing.JTextField, "ScrollRepainter", null, javax.swing.event.ChangeListener); +Clazz_overrideMethod (c$, "stateChanged", +function (a) { +this.b$["javax.swing.JTextField"].repaint (); +}, "javax.swing.event.ChangeEvent"); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.JTextField, "TextFieldActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener); +Clazz_overrideMethod (c$, "actionPropertyChanged", +function (a, b, c) { +if (javax.swing.AbstractAction.shouldReconfigure (c)) { +a.configurePropertiesFromAction (b); +} else { +a.actionPropertyChanged (b, c.getPropertyName ()); +}}, "javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.JTextField, "NotifyAction", javax.swing.text.TextAction); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JTextField.NotifyAction, ["notify-field-accept"]); +}); +Clazz_overrideMethod (c$, "actionPerformed", +function (a) { +var b = this.getFocusedComponent (); +if (Clazz_instanceOf (b, javax.swing.JTextField)) { +var c = b; +c.postActionEvent (); +}}, "java.awt.event.ActionEvent"); +Clazz_overrideMethod (c$, "isEnabled", +function () { +var a = this.getFocusedComponent (); +if (Clazz_instanceOf (a, javax.swing.JTextField)) { +return (a).hasActionListener (); +}return false; +}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"notifyAction", "notify-field-accept"); +c$.defaultActions = c$.prototype.defaultActions = Clazz_newArray (-1, [ new javax.swing.JTextField.NotifyAction ()]); +Clazz_defineStatics (c$, +"$uiClassID", "TextFieldUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.action = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener); +Clazz_makeConstructor (c$, +function (c, a) { +this.setTarget (c); +this.action = a; +}, "~O,javax.swing.Action"); +Clazz_overrideMethod (c$, "propertyChange", +function (e) { +var target = this.getTarget (); +if (target == null) { +this.getAction ().removePropertyChangeListener (this); +} else { +this.actionPropertyChanged (target, this.getAction (), e); +}}, "java.beans.PropertyChangeEvent"); +Clazz_defineMethod (c$, "setTarget", + function (c) { +}, "~O"); +Clazz_defineMethod (c$, "getTarget", +function () { +return null; +}); +Clazz_defineMethod (c$, "getAction", +function () { +return this.action; +}); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.ChangeListener", null, function () { +Clazz_declareInterface (javax.swing.event, "ChangeListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (null, "javax.swing.ActionMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () { +c$ = Clazz_decorateAsClass (function () { +this.arrayTable = null; +this.parent = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "ActionMap"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "setParent", +function (map) { +this.parent = map; +}, "javax.swing.ActionMap"); +Clazz_defineMethod (c$, "getParent", +function () { +return this.parent; +}); +Clazz_defineMethod (c$, "put", +function (key, action) { +if (key == null) { +return; +}if (action == null) { +this.remove (key); +} else { +if (this.arrayTable == null) { +this.arrayTable = new javax.swing.ArrayTable (); +}this.arrayTable.put (key, action); +}}, "~O,javax.swing.Action"); +Clazz_defineMethod (c$, "get", +function (key) { +var value = (this.arrayTable == null) ? null : this.arrayTable.get (key); +if (value == null) { +var parent = this.getParent (); +if (parent != null) { +return parent.get (key); +}}return value; +}, "~O"); +Clazz_defineMethod (c$, "remove", +function (key) { +if (this.arrayTable != null) { +this.arrayTable.remove (key); +}}, "~O"); +Clazz_defineMethod (c$, "clear", +function () { +if (this.arrayTable != null) { +this.arrayTable.clear (); +}}); +Clazz_defineMethod (c$, "keys", +function () { +if (this.arrayTable == null) { +return null; +}return this.arrayTable.getKeys (null); +}); +Clazz_defineMethod (c$, "size", +function () { +if (this.arrayTable == null) { +return 0; +}return this.arrayTable.size (); +}); +Clazz_defineMethod (c$, "allKeys", +function () { +var count = this.size (); +var parent = this.getParent (); +if (count == 0) { +if (parent != null) { +return parent.allKeys (); +}return this.keys (); +}if (parent == null) { +return this.keys (); +}var keys = this.keys (); +var pKeys = parent.allKeys (); +if (pKeys == null) { +return keys; +}if (keys == null) { +return pKeys; +}var keyMap = new java.util.HashMap (); +var counter; +for (counter = keys.length - 1; counter >= 0; counter--) { +keyMap.put (keys[counter], keys[counter]); +} +for (counter = pKeys.length - 1; counter >= 0; counter--) { +keyMap.put (pKeys[counter], pKeys[counter]); +} +return keyMap.keySet ().toArray (); +}); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (null, "javax.swing.InputMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () { +c$ = Clazz_decorateAsClass (function () { +this.arrayTable = null; +this.parent = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "InputMap"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "setParent", +function (map) { +this.parent = map; +}, "javax.swing.InputMap"); +Clazz_defineMethod (c$, "getParent", +function () { +return this.parent; +}); +Clazz_defineMethod (c$, "put", +function (keyStroke, actionMapKey) { +if (keyStroke == null) { +return; +}if (actionMapKey == null) { +this.remove (keyStroke); +} else { +if (this.arrayTable == null) { +this.arrayTable = new javax.swing.ArrayTable (); +}this.arrayTable.put (keyStroke, actionMapKey); +}}, "javax.swing.KeyStroke,~O"); +Clazz_defineMethod (c$, "get", +function (keyStroke) { +if (this.arrayTable == null) { +var parent = this.getParent (); +if (parent != null) { +return parent.get (keyStroke); +}return null; +}var value = this.arrayTable.get (keyStroke); +if (value == null) { +var parent = this.getParent (); +if (parent != null) { +return parent.get (keyStroke); +}}return value; +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "remove", +function (key) { +if (this.arrayTable != null) { +this.arrayTable.remove (key); +}}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "clear", +function () { +if (this.arrayTable != null) { +this.arrayTable.clear (); +}}); +Clazz_defineMethod (c$, "keys", +function () { +if (this.arrayTable == null) { +return null; +}var keys = new Array (this.arrayTable.size ()); +this.arrayTable.getKeys (keys); +return keys; +}); +Clazz_defineMethod (c$, "size", +function () { +if (this.arrayTable == null) { +return 0; +}return this.arrayTable.size (); +}); +Clazz_defineMethod (c$, "allKeys", +function () { +var count = this.size (); +var parent = this.getParent (); +if (count == 0) { +if (parent != null) { +return parent.allKeys (); +}return this.keys (); +}if (parent == null) { +return this.keys (); +}var keys = this.keys (); +var pKeys = parent.allKeys (); +if (pKeys == null) { +return keys; +}if (keys == null) { +return pKeys; +}var keyMap = new java.util.HashMap (); +var counter; +for (counter = keys.length - 1; counter >= 0; counter--) { +keyMap.put (keys[counter], keys[counter]); +} +for (counter = pKeys.length - 1; counter >= 0; counter--) { +keyMap.put (pKeys[counter], pKeys[counter]); +} +var allKeys = new Array (keyMap.size ()); +return keyMap.keySet ().toArray (allKeys); +}); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_declareInterface (javax.swing, "Scrollable"); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventObject"], "javax.swing.event.CaretEvent", null, function () { +c$ = Clazz_declareType (javax.swing.event, "CaretEvent", java.util.EventObject); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.DocumentListener", null, function () { +Clazz_declareInterface (javax.swing.event, "DocumentListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (null, "javax.swing.event.EventListenerList", ["java.lang.reflect.Array"], function () { +c$ = Clazz_decorateAsClass (function () { +this.listenerList = null; +Clazz_instantialize (this, arguments); +}, javax.swing.event, "EventListenerList"); +Clazz_prepareFields (c$, function () { +this.listenerList = javax.swing.event.EventListenerList.NULL_ARRAY; +}); +Clazz_defineMethod (c$, "getListenerList", +function () { +return this.listenerList; +}); +Clazz_defineMethod (c$, "getListeners", +function (t) { +var lList = this.listenerList; +var n = this.getListenerCount (lList, t); +var result = java.lang.reflect.Array.newInstance (t, n); +var j = 0; +for (var i = lList.length - 2; i >= 0; i -= 2) { +if (lList[i] === t) { +result[j++] = lList[i + 1]; +}} +return result; +}, "Class"); +Clazz_defineMethod (c$, "getListenerCount", +function () { +return Clazz_doubleToInt (this.listenerList.length / 2); +}); +Clazz_defineMethod (c$, "getListenerCount", +function (t) { +var lList = this.listenerList; +return this.getListenerCount (lList, t); +}, "Class"); +Clazz_defineMethod (c$, "getListenerCount", + function (list, t) { +var count = 0; +for (var i = 0; i < list.length; i += 2) { +if (t === list[i]) count++; +} +return count; +}, "~A,Class"); +Clazz_defineMethod (c$, "add", +function (t, l) { +if (l == null) { +return; +}if (this.listenerList === javax.swing.event.EventListenerList.NULL_ARRAY) { +this.listenerList = Clazz_newArray (-1, [t, l]); +} else { +var i = this.listenerList.length; +var tmp = new Array (i + 2); +System.arraycopy (this.listenerList, 0, tmp, 0, i); +tmp[i] = t; +tmp[i + 1] = l; +this.listenerList = tmp; +}}, "Class,~O"); +Clazz_defineMethod (c$, "remove", +function (t, l) { +if (l == null) { +return; +}var index = -1; +for (var i = this.listenerList.length - 2; i >= 0; i -= 2) { +if ((this.listenerList[i] === t) && (this.listenerList[i + 1].equals (l) == true)) { +index = i; +break; +}} +if (index != -1) { +var tmp = new Array (this.listenerList.length - 2); +System.arraycopy (this.listenerList, 0, tmp, 0, index); +if (index < tmp.length) System.arraycopy (this.listenerList, index + 2, tmp, index, tmp.length - index); +this.listenerList = (tmp.length == 0) ? javax.swing.event.EventListenerList.NULL_ARRAY : tmp; +}}, "Class,~O"); +Clazz_overrideMethod (c$, "toString", +function () { +var lList = this.listenerList; +var s = "EventListenerList: "; +s += Clazz_doubleToInt (lList.length / 2) + " listeners: "; +for (var i = 0; i <= lList.length - 2; i += 2) { +s += " type " + (lList[i]).getName (); +s += " listener " + lList[i + 1]; +} +return s; +}); +c$.NULL_ARRAY = c$.prototype.NULL_ARRAY = new Array (0); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventObject"], "javax.swing.event.ChangeEvent", null, function () { +c$ = Clazz_declareType (javax.swing.event, "ChangeEvent", java.util.EventObject); +}); +Clazz_declarePackage ("jssun.swing"); +Clazz_load (["jssun.swing.UIClientPropertyKey"], "jssun.swing.StringUIClientPropertyKey", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.key = null; +Clazz_instantialize (this, arguments); +}, jssun.swing, "StringUIClientPropertyKey", null, jssun.swing.UIClientPropertyKey); +Clazz_makeConstructor (c$, +function (key) { +this.key = key; +}, "~S"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.key; +}); +}); +Clazz_declarePackage ("jssun.swing"); +Clazz_declareInterface (jssun.swing, "UIClientPropertyKey"); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () { +c$ = Clazz_declareType (java.awt, "Graphics2D", java.awt.Graphics); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.Graphics2D, []); +}); +Clazz_overrideMethod (c$, "draw3DRect", +function (x, y, width, height, raised) { +var p = this.getPaint (); +var c = this.getColor (); +var brighter = c.brighter (); +var darker = c.darker (); +this.setColor (raised ? brighter : darker); +this.fillRect (x, y, 1, height + 1); +this.fillRect (x + 1, y, width - 1, 1); +this.setColor (raised ? darker : brighter); +this.fillRect (x + 1, y + height, width, 1); +this.fillRect (x + width, y, 1, height); +this.setPaint (p); +}, "~N,~N,~N,~N,~B"); +Clazz_overrideMethod (c$, "fill3DRect", +function (x, y, width, height, raised) { +var p = this.getPaint (); +var c = this.getColor (); +var brighter = c.brighter (); +var darker = c.darker (); +if (!raised) { +this.setColor (darker); +} else if (p !== c) { +this.setColor (c); +}this.fillRect (x + 1, y + 1, width - 2, height - 2); +this.setColor (raised ? brighter : darker); +this.fillRect (x, y, 1, height); +this.fillRect (x + 1, y, width - 2, 1); +this.setColor (raised ? darker : brighter); +this.fillRect (x + 1, y + height - 1, width - 1, 1); +this.fillRect (x + width - 1, y, 1, height - 1); +this.setPaint (p); +}, "~N,~N,~N,~N,~B"); +}); +Clazz_declarePackage ("java.awt"); +c$ = Clazz_declareType (java.awt, "Graphics"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "create", +function () { +return this.createSwingJS (); +}); +Clazz_defineMethod (c$, "create", +function (x, y, width, height) { +return this.create4 (x, y, width, height); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "create4", +function (x, y, width, height) { +var g = this.createSwingJS (); +if (g == null) return null; +g.translate (x, y); +g.clipRect (0, 0, width, height); +return g; +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getFontMetrics", +function () { +return this.getFontMetrics (this.getFont ()); +}); +Clazz_defineMethod (c$, "drawRect", +function (x, y, width, height) { +if ((width < 0) || (height < 0)) { +return; +}if (height == 0 || width == 0) { +this.drawLine (x, y, x + width, y + height); +} else { +this.drawLine (x, y, x + width - 1, y); +this.drawLine (x + width, y, x + width, y + height - 1); +this.drawLine (x + width, y + height, x + 1, y + height); +this.drawLine (x, y + height, x, y + 1); +}}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "draw3DRect", +function (x, y, width, height, raised) { +var c = this.getColor (); +var brighter = c.brighter (); +var darker = c.darker (); +this.setColor (raised ? brighter : darker); +this.drawLine (x, y, x, y + height); +this.drawLine (x + 1, y, x + width - 1, y); +this.setColor (raised ? darker : brighter); +this.drawLine (x + 1, y + height, x + width, y + height); +this.drawLine (x + width, y, x + width, y + height - 1); +this.setColor (c); +}, "~N,~N,~N,~N,~B"); +Clazz_defineMethod (c$, "fill3DRect", +function (x, y, width, height, raised) { +var c = this.getColor (); +var brighter = c.brighter (); +var darker = c.darker (); +if (!raised) { +this.setColor (darker); +}this.fillRect (x + 1, y + 1, width - 2, height - 2); +this.setColor (raised ? brighter : darker); +this.drawLine (x, y, x, y + height - 1); +this.drawLine (x + 1, y, x + width - 2, y); +this.setColor (raised ? darker : brighter); +this.drawLine (x + 1, y + height - 1, x + width - 1, y + height - 1); +this.drawLine (x + width - 1, y, x + width - 1, y + height - 2); +this.setColor (c); +}, "~N,~N,~N,~N,~B"); +Clazz_defineMethod (c$, "drawPolygon", +function (p) { +this.drawPolygon (p.xpoints, p.ypoints, p.npoints); +}, "java.awt.Polygon"); +Clazz_defineMethod (c$, "fillPolygon", +function (p) { +this.fillPolygon (p.xpoints, p.ypoints, p.npoints); +}, "java.awt.Polygon"); +Clazz_defineMethod (c$, "drawChars", +function (data, offset, length, x, y) { +this.drawString ( String.instantialize (data, offset, length), x, y); +}, "~A,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "drawBytes", +function (data, offset, length, x, y) { +this.drawString ( String.instantialize (data, 0, offset, length), x, y); +}, "~A,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "finalize", +function () { +this.dispose (); +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[font=" + this.getFont () + ",color=" + this.getColor () + "]"; +}); +Clazz_defineMethod (c$, "getClipRect", +function () { +return this.getClipBounds (); +}); +Clazz_defineMethod (c$, "hitClip", +function (x, y, width, height) { +var clipRect = this.getClipBounds (); +if (clipRect == null) { +return true; +}return clipRect.intersects (x, y, width, height); +}, "~N,~N,~N,~N"); +Clazz_declarePackage ("jssun.font"); +Clazz_load (["java.awt.FontMetrics", "java.util.Hashtable"], "jssun.font.FontDesignMetrics", ["java.lang.IndexOutOfBoundsException", "java.awt.Toolkit", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.ascent = 0; +this.descent = 0; +this.leading = 0; +this.height = -1; +Clazz_instantialize (this, arguments); +}, jssun.font, "FontDesignMetrics", java.awt.FontMetrics); +c$.getMetrics = Clazz_defineMethod (c$, "getMetrics", +function (font) { +var m = null; +var r; +r = jssun.font.FontDesignMetrics.metricsCache.get (font); +if (r != null) { +m = r.get (); +}if (m == null) { +m = new jssun.font.FontDesignMetrics (font); +jssun.font.FontDesignMetrics.metricsCache.put (font, new jssun.font.FontDesignMetrics.KeyReference (font, m)); +}for (var i = 0; i < jssun.font.FontDesignMetrics.recentMetrics.length; i++) { +if (jssun.font.FontDesignMetrics.recentMetrics[i] === m) { +return m; +}} +{ +jssun.font.FontDesignMetrics.recentMetrics[jssun.font.FontDesignMetrics.recentIndex++] = m; +if (jssun.font.FontDesignMetrics.recentIndex == 5) { +jssun.font.FontDesignMetrics.recentIndex = 0; +}}return m; +}, "java.awt.Font"); +Clazz_makeConstructor (c$, + function (font) { +Clazz_superConstructor (this, jssun.font.FontDesignMetrics, [font]); +this.font = font; +this.initMatrixAndMetrics (); +}, "java.awt.Font"); +Clazz_defineMethod (c$, "initMatrixAndMetrics", + function () { +{ +//need to calculate ascent, descent, leading, and maxAdvance +}}); +Clazz_defineMethod (c$, "charWidth", +function (ch) { +var s = ""; +{ +s = "" + ch; +}return this.stringWidth (s); +}, "~S"); +Clazz_overrideMethod (c$, "stringWidth", +function (str) { +return Clazz_doubleToInt (0.5 + this.getWidth (str)); +}, "~S"); +Clazz_defineMethod (c$, "getWidth", + function (str) { +return swingjs.JSToolkit.getStringWidth (null, this.font, str); +}, "~S"); +Clazz_overrideMethod (c$, "charsWidth", +function (data, off, len) { +var width = 0; +if (len < 0) { +throw new IndexOutOfBoundsException ("len=" + len); +}var limit = off + len; +for (var i = off; i < limit; i++) { +var ch = data[i]; +width += this.stringWidth ("" + ch); +} +return Clazz_doubleToInt (0.5 + width); +}, "~A,~N,~N"); +Clazz_overrideMethod (c$, "getWidths", +function () { +var widths = Clazz_newIntArray (256, 0); +return widths; +}); +Clazz_defineMethod (c$, "getAscent", +function () { +if (this.ascent == 0) this.ascent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getAscent (); +return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.ascent); +}); +Clazz_defineMethod (c$, "getDescent", +function () { +if (this.descent == 0) this.descent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getDescent (); +return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent); +}); +Clazz_overrideMethod (c$, "getLeading", +function () { +return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading) - Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent); +}); +Clazz_overrideMethod (c$, "getHeight", +function () { +if (this.height < 0) { +this.height = this.getAscent () + Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading); +}return this.height; +}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.key = null; +this.val = null; +Clazz_instantialize (this, arguments); +}, jssun.font.FontDesignMetrics, "KeyReference"); +Clazz_makeConstructor (c$, +function (a, b) { +this.key = a; +this.val = b; +}, "~O,~O"); +Clazz_defineMethod (c$, "get", +function () { +return this.val; +}); +Clazz_defineMethod (c$, "dispose", +function () { +if (jssun.font.FontDesignMetrics.metricsCache.get (this.key) === this) { +jssun.font.FontDesignMetrics.metricsCache.remove (this.key); +}}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"roundingUpValue", 0.95); +c$.metricsCache = c$.prototype.metricsCache = new java.util.Hashtable (); +Clazz_defineStatics (c$, +"MAXRECENT", 5); +c$.recentMetrics = c$.prototype.recentMetrics = new Array (5); +Clazz_defineStatics (c$, +"recentIndex", 0); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.font.FontRenderContext"], "java.awt.FontMetrics", ["java.lang.Character"], function () { +c$ = Clazz_decorateAsClass (function () { +this.font = null; +Clazz_instantialize (this, arguments); +}, java.awt, "FontMetrics"); +Clazz_makeConstructor (c$, +function (font) { +this.font = font; +}, "java.awt.Font"); +Clazz_defineMethod (c$, "getFont", +function () { +return this.font; +}); +Clazz_defineMethod (c$, "getFontRenderContext", +function () { +return java.awt.FontMetrics.DEFAULT_FRC; +}); +Clazz_defineMethod (c$, "getLeading", +function () { +return 0; +}); +Clazz_defineMethod (c$, "getAscent", +function () { +return this.font.getSize (); +}); +Clazz_defineMethod (c$, "getDescent", +function () { +return 0; +}); +Clazz_defineMethod (c$, "getHeight", +function () { +return this.getLeading () + this.getAscent () + this.getDescent (); +}); +Clazz_defineMethod (c$, "getMaxAscent", +function () { +return this.getAscent (); +}); +Clazz_defineMethod (c$, "getMaxDescent", +function () { +return this.getDescent (); +}); +Clazz_defineMethod (c$, "getMaxDecent", +function () { +return this.getMaxDescent (); +}); +Clazz_defineMethod (c$, "getMaxAdvance", +function () { +return -1; +}); +Clazz_defineMethod (c$, "charWidth", +function (codePoint) { +if (!Character.isValidCodePoint (codePoint)) { +codePoint = 0xffff; +}if (codePoint < 256) { +return this.getWidths ()[codePoint]; +} else { +var buffer = Clazz_newCharArray (2, '\0'); +var len = Character.toChars (codePoint, buffer, 0); +return this.charsWidth (buffer, 0, len); +}}, "~N"); +Clazz_defineMethod (c$, "charWidth", +function (ch) { +if (ch.charCodeAt (0) < 256) { +return this.getWidths ()[ch.charCodeAt (0)]; +}var data = Clazz_newCharArray (-1, [ch]); +return this.charsWidth (data, 0, 1); +}, "~S"); +Clazz_defineMethod (c$, "stringWidth", +function (str) { +var len = str.length; +var data = Clazz_newCharArray (len, '\0'); +str.getChars (0, len, data, 0); +return this.charsWidth (data, 0, len); +}, "~S"); +Clazz_defineMethod (c$, "charsWidth", +function (data, off, len) { +return this.stringWidth ( String.instantialize (data, off, len)); +}, "~A,~N,~N"); +Clazz_defineMethod (c$, "bytesWidth", +function (data, off, len) { +return this.stringWidth ( String.instantialize (data, 0, off, len)); +}, "~A,~N,~N"); +Clazz_defineMethod (c$, "getWidths", +function () { +var widths = Clazz_newIntArray (256, 0); +for (var ch = String.fromCharCode (0); ch.charCodeAt (0) < 256; ch = String.fromCharCode (ch.charCodeAt (0) + 1)) { +widths[ch.charCodeAt (0)] = this.charWidth (ch); +} +return widths; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[font=" + this.getFont () + "ascent=" + this.getAscent () + ", descent=" + this.getDescent () + ", height=" + this.getHeight () + "]"; +}); +c$.DEFAULT_FRC = c$.prototype.DEFAULT_FRC = new java.awt.font.FontRenderContext (null, false, false); +}); +Clazz_declarePackage ("JU"); +Clazz_load (null, "JU.PT", ["java.lang.Boolean", "$.Double", "$.Float", "$.Number", "java.util.Map", "javajs.api.JSONEncodable", "JU.AU", "$.DF", "$.Lst", "$.M34", "$.M4", "$.SB"], function () { +c$ = Clazz_declareType (JU, "PT"); +c$.parseInt = Clazz_defineMethod (c$, "parseInt", +function (str) { +return JU.PT.parseIntNext (str, Clazz_newIntArray (-1, [0])); +}, "~S"); +c$.parseIntNext = Clazz_defineMethod (c$, "parseIntNext", +function (str, next) { +var cch = str.length; +if (next[0] < 0 || next[0] >= cch) return -2147483648; +return JU.PT.parseIntChecked (str, cch, next); +}, "~S,~A"); +c$.parseIntChecked = Clazz_defineMethod (c$, "parseIntChecked", +function (str, ichMax, next) { +var digitSeen = false; +var value = 0; +var ich = next[0]; +if (ich < 0) return -2147483648; +var ch; +while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; + +var negative = false; +if (ich < ichMax && str.charCodeAt (ich) == 45) { +negative = true; +++ich; +}while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { +value = value * 10 + (ch - 48); +digitSeen = true; +++ich; +} +if (!digitSeen) value = -2147483648; + else if (negative) value = -value; +next[0] = ich; +return value; +}, "~S,~N,~A"); +c$.isWhiteSpace = Clazz_defineMethod (c$, "isWhiteSpace", +function (str, ich) { +var ch; +return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n')); +}, "~S,~N"); +c$.parseFloatChecked = Clazz_defineMethod (c$, "parseFloatChecked", +function (str, ichMax, next, isStrict) { +var digitSeen = false; +var ich = next[0]; +if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN; +while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; + +var negative = false; +if (ich < ichMax && str.charAt (ich) == '-') { +++ich; +negative = true; +}var ch = 0; +var ival = 0; +var ival2 = 0; +while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { +ival = (ival * 10) + (ch - 48) * 1; +++ich; +digitSeen = true; +} +var isDecimal = false; +var iscale = 0; +var nzero = (ival == 0 ? -1 : 0); +if (ch == 46) { +isDecimal = true; +while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { +digitSeen = true; +if (nzero < 0) { +if (ch == 48) { +nzero--; +continue; +}nzero = -nzero; +}if (iscale < JU.PT.decimalScale.length) { +ival2 = (ival2 * 10) + (ch - 48) * 1; +iscale++; +}} +}var value; +if (!digitSeen) { +value = NaN; +} else if (ival2 > 0) { +value = ival2 * JU.PT.decimalScale[iscale - 1]; +if (nzero > 1) { +if (nzero - 2 < JU.PT.decimalScale.length) { +value *= JU.PT.decimalScale[nzero - 2]; +} else { +value *= Math.pow (10, 1 - nzero); +}} else { +value += ival; +}} else { +value = ival; +}var isExponent = false; +if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) { +isExponent = true; +if (++ich >= ichMax) return NaN; +ch = str.charCodeAt (ich); +if ((ch == 43) && (++ich >= ichMax)) return NaN; +next[0] = ich; +var exponent = JU.PT.parseIntChecked (str, ichMax, next); +if (exponent == -2147483648) return NaN; +if (exponent > 0 && exponent <= JU.PT.tensScale.length) value *= JU.PT.tensScale[exponent - 1]; + else if (exponent < 0 && -exponent <= JU.PT.decimalScale.length) value *= JU.PT.decimalScale[-exponent - 1]; + else if (exponent != 0) value *= Math.pow (10, exponent); +} else { +next[0] = ich; +}if (negative) value = -value; +if (value == Infinity) value = 3.4028235E38; +return (!isStrict || (!isExponent || isDecimal) && JU.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN); +}, "~S,~N,~A,~B"); +c$.checkTrailingText = Clazz_defineMethod (c$, "checkTrailingText", +function (str, ich, ichMax) { +var ch; +while (ich < ichMax && (JU.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich; + +return (ich == ichMax); +}, "~S,~N,~N"); +c$.parseFloatArray = Clazz_defineMethod (c$, "parseFloatArray", +function (str) { +return JU.PT.parseFloatArrayNext (str, Clazz_newIntArray (1, 0), null, null, null); +}, "~S"); +c$.parseFloatArrayInfested = Clazz_defineMethod (c$, "parseFloatArrayInfested", +function (tokens, data) { +var len = data.length; +var nTokens = tokens.length; +var n = 0; +var max = 0; +for (var i = 0; i >= 0 && i < len && n < nTokens; i++) { +var f; +while (Float.isNaN (f = JU.PT.parseFloat (tokens[n++])) && n < nTokens) { +} +if (!Float.isNaN (f)) data[(max = i)] = f; +if (n == nTokens) break; +} +return max + 1; +}, "~A,~A"); +c$.parseFloatArrayNext = Clazz_defineMethod (c$, "parseFloatArrayNext", +function (str, next, f, strStart, strEnd) { +var n = 0; +var pt = next[0]; +if (pt >= 0) { +if (strStart != null) { +var p = str.indexOf (strStart, pt); +if (p >= 0) next[0] = p + strStart.length; +}str = str.substring (next[0]); +pt = (strEnd == null ? -1 : str.indexOf (strEnd)); +if (pt < 0) pt = str.length; + else str = str.substring (0, pt); +next[0] += pt + 1; +var tokens = JU.PT.getTokens (str); +if (f == null) f = Clazz_newFloatArray (tokens.length, 0); +n = JU.PT.parseFloatArrayInfested (tokens, f); +}if (f == null) return Clazz_newFloatArray (0, 0); +for (var i = n; i < f.length; i++) f[i] = NaN; + +return f; +}, "~S,~A,~A,~S,~S"); +c$.parseFloatRange = Clazz_defineMethod (c$, "parseFloatRange", +function (str, ichMax, next) { +var cch = str.length; +if (ichMax > cch) ichMax = cch; +if (next[0] < 0 || next[0] >= ichMax) return NaN; +return JU.PT.parseFloatChecked (str, ichMax, next, false); +}, "~S,~N,~A"); +c$.parseFloatNext = Clazz_defineMethod (c$, "parseFloatNext", +function (str, next) { +var cch = (str == null ? -1 : str.length); +return (next[0] < 0 || next[0] >= cch ? NaN : JU.PT.parseFloatChecked (str, cch, next, false)); +}, "~S,~A"); +c$.parseFloatStrict = Clazz_defineMethod (c$, "parseFloatStrict", +function (str) { +var cch = str.length; +if (cch == 0) return NaN; +return JU.PT.parseFloatChecked (str, cch, Clazz_newIntArray (-1, [0]), true); +}, "~S"); +c$.parseFloat = Clazz_defineMethod (c$, "parseFloat", +function (str) { +return JU.PT.parseFloatNext (str, Clazz_newIntArray (-1, [0])); +}, "~S"); +c$.parseIntRadix = Clazz_defineMethod (c$, "parseIntRadix", +function (s, i) { +{ +return Integer.parseIntRadix(s, i); +}}, "~S,~N"); +c$.getTokens = Clazz_defineMethod (c$, "getTokens", +function (line) { +return JU.PT.getTokensAt (line, 0); +}, "~S"); +c$.parseToken = Clazz_defineMethod (c$, "parseToken", +function (str) { +return JU.PT.parseTokenNext (str, Clazz_newIntArray (-1, [0])); +}, "~S"); +c$.parseTrimmed = Clazz_defineMethod (c$, "parseTrimmed", +function (str) { +return JU.PT.parseTrimmedRange (str, 0, str.length); +}, "~S"); +c$.parseTrimmedAt = Clazz_defineMethod (c$, "parseTrimmedAt", +function (str, ichStart) { +return JU.PT.parseTrimmedRange (str, ichStart, str.length); +}, "~S,~N"); +c$.parseTrimmedRange = Clazz_defineMethod (c$, "parseTrimmedRange", +function (str, ichStart, ichMax) { +var cch = str.length; +if (ichMax < cch) cch = ichMax; +if (cch < ichStart) return ""; +return JU.PT.parseTrimmedChecked (str, ichStart, cch); +}, "~S,~N,~N"); +c$.getTokensAt = Clazz_defineMethod (c$, "getTokensAt", +function (line, ich) { +if (line == null) return null; +var cchLine = line.length; +if (ich < 0 || ich > cchLine) return null; +var tokenCount = JU.PT.countTokens (line, ich); +var tokens = new Array (tokenCount); +var next = Clazz_newIntArray (1, 0); +next[0] = ich; +for (var i = 0; i < tokenCount; ++i) tokens[i] = JU.PT.parseTokenChecked (line, cchLine, next); + +return tokens; +}, "~S,~N"); +c$.countTokens = Clazz_defineMethod (c$, "countTokens", +function (line, ich) { +var tokenCount = 0; +if (line != null) { +var ichMax = line.length; +while (true) { +while (ich < ichMax && JU.PT.isWhiteSpace (line, ich)) ++ich; + +if (ich == ichMax) break; +++tokenCount; +do { +++ich; +} while (ich < ichMax && !JU.PT.isWhiteSpace (line, ich)); +} +}return tokenCount; +}, "~S,~N"); +c$.parseTokenNext = Clazz_defineMethod (c$, "parseTokenNext", +function (str, next) { +var cch = str.length; +return (next[0] < 0 || next[0] >= cch ? null : JU.PT.parseTokenChecked (str, cch, next)); +}, "~S,~A"); +c$.parseTokenRange = Clazz_defineMethod (c$, "parseTokenRange", +function (str, ichMax, next) { +var cch = str.length; +if (ichMax > cch) ichMax = cch; +return (next[0] < 0 || next[0] >= ichMax ? null : JU.PT.parseTokenChecked (str, ichMax, next)); +}, "~S,~N,~A"); +c$.parseTokenChecked = Clazz_defineMethod (c$, "parseTokenChecked", +function (str, ichMax, next) { +var ich = next[0]; +while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; + +var ichNonWhite = ich; +while (ich < ichMax && !JU.PT.isWhiteSpace (str, ich)) ++ich; + +next[0] = ich; +return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich)); +}, "~S,~N,~A"); +c$.parseTrimmedChecked = Clazz_defineMethod (c$, "parseTrimmedChecked", +function (str, ich, ichMax) { +while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; + +var ichLast = ichMax - 1; +while (ichLast >= ich && JU.PT.isWhiteSpace (str, ichLast)) --ichLast; + +return (ichLast < ich ? "" : str.substring (ich, ichLast + 1)); +}, "~S,~N,~N"); +c$.dVal = Clazz_defineMethod (c$, "dVal", +function (s) { +{ +if(s==null) +throw new NumberFormatException("null"); +var d=parseFloat(s); +if(isNaN(d)) +throw new NumberFormatException("Not a Number : "+s); +return d +}}, "~S"); +c$.fVal = Clazz_defineMethod (c$, "fVal", +function (s) { +{ +return this.dVal(s); +}}, "~S"); +c$.parseIntRange = Clazz_defineMethod (c$, "parseIntRange", +function (str, ichMax, next) { +var cch = str.length; +if (ichMax > cch) ichMax = cch; +return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : JU.PT.parseIntChecked (str, ichMax, next)); +}, "~S,~N,~A"); +c$.parseFloatArrayData = Clazz_defineMethod (c$, "parseFloatArrayData", +function (tokens, data) { +JU.PT.parseFloatArrayDataN (tokens, data, data.length); +}, "~A,~A"); +c$.parseFloatArrayDataN = Clazz_defineMethod (c$, "parseFloatArrayDataN", +function (tokens, data, nData) { +for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : JU.PT.parseFloat (tokens[i])); + +}, "~A,~A,~N"); +c$.split = Clazz_defineMethod (c$, "split", +function (text, run) { +if (text.length == 0) return new Array (0); +var n = 1; +var i = text.indexOf (run); +var lines; +var runLen = run.length; +if (i < 0 || runLen == 0) { +lines = new Array (1); +lines[0] = text; +return lines; +}var len = text.length - runLen; +for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen); + +lines = new Array (n); +i = 0; +var ipt = 0; +var pt = 0; +for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) { +lines[pt++] = text.substring (i, ipt); +i = ipt + runLen; +} +if (text.indexOf (run, len) != len) len += runLen; +lines[pt] = text.substring (i, len); +return lines; +}, "~S,~S"); +c$.getQuotedStringAt = Clazz_defineMethod (c$, "getQuotedStringAt", +function (line, ipt0) { +var next = Clazz_newIntArray (-1, [ipt0]); +return JU.PT.getQuotedStringNext (line, next); +}, "~S,~N"); +c$.getQuotedStringNext = Clazz_defineMethod (c$, "getQuotedStringNext", +function (line, next) { +var i = next[0]; +if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return ""; +var pt = i + 1; +var len = line.length; +while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++; + +next[0] = i + 1; +return line.substring (pt, i); +}, "~S,~A"); +c$.getCSVString = Clazz_defineMethod (c$, "getCSVString", +function (line, next) { +var i = next[1]; +if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null; +var pt = next[0] = i; +var len = line.length; +var escaped = false; +var haveEscape = false; +while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) { +escaped = false; +haveEscape = true; +i++; +} +if (i >= len) { +next[1] = -1; +return null; +}next[1] = i + 1; +var s = line.substring (pt + 1, i); +return (haveEscape ? JU.PT.rep (JU.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s); +}, "~S,~A"); +c$.isOneOf = Clazz_defineMethod (c$, "isOneOf", +function (key, semiList) { +if (semiList.length == 0) return false; +if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";"; +return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0; +}, "~S,~S"); +c$.getQuotedAttribute = Clazz_defineMethod (c$, "getQuotedAttribute", +function (info, name) { +var i = info.indexOf (name + "="); +return (i < 0 ? null : JU.PT.getQuotedStringAt (info, i)); +}, "~S,~S"); +c$.approx = Clazz_defineMethod (c$, "approx", +function (f, n) { +return Math.round (f * n) / n; +}, "~N,~N"); +c$.rep = Clazz_defineMethod (c$, "rep", +function (str, strFrom, strTo) { +if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str; +var isOnce = (strTo.indexOf (strFrom) >= 0); +do { +str = str.$replace (strFrom, strTo); +} while (!isOnce && str.indexOf (strFrom) >= 0); +return str; +}, "~S,~S,~S"); +c$.formatF = Clazz_defineMethod (c$, "formatF", +function (value, width, precision, alignLeft, zeroPad) { +return JU.PT.formatS (JU.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad); +}, "~N,~N,~N,~B,~B"); +c$.formatD = Clazz_defineMethod (c$, "formatD", +function (value, width, precision, alignLeft, zeroPad, allowOverflow) { +return JU.PT.formatS (JU.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad); +}, "~N,~N,~N,~B,~B,~B"); +c$.formatS = Clazz_defineMethod (c$, "formatS", +function (value, width, precision, alignLeft, zeroPad) { +if (value == null) return ""; +var len = value.length; +if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision); + else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1); +var padLength = width - value.length; +if (padLength <= 0) return value; +var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-'); +var padChar = (zeroPad ? '0' : ' '); +var padChar0 = (isNeg ? '-' : padChar); +var sb = new JU.SB (); +if (alignLeft) sb.append (value); +sb.appendC (padChar0); +for (var i = padLength; --i > 0; ) sb.appendC (padChar); + +if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value); +return sb.toString (); +}, "~S,~N,~N,~B,~B"); +c$.replaceWithCharacter = Clazz_defineMethod (c$, "replaceWithCharacter", +function (str, strFrom, chTo) { +if (str == null) return null; +for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo); + +return str; +}, "~S,~S,~S"); +c$.replaceAllCharacters = Clazz_defineMethod (c$, "replaceAllCharacters", +function (str, strFrom, strTo) { +for (var i = strFrom.length; --i >= 0; ) { +var chFrom = strFrom.substring (i, i + 1); +str = JU.PT.rep (str, chFrom, strTo); +} +return str; +}, "~S,~S,~S"); +c$.trim = Clazz_defineMethod (c$, "trim", +function (str, chars) { +if (chars.length == 0) return str.trim (); +var len = str.length; +var k = 0; +while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++; + +var m = str.length - 1; +while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--; + +return str.substring (k, m + 1); +}, "~S,~S"); +c$.trimQuotes = Clazz_defineMethod (c$, "trimQuotes", +function (value) { +return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value); +}, "~S"); +c$.isNonStringPrimitive = Clazz_defineMethod (c$, "isNonStringPrimitive", +function (info) { +return Clazz_instanceOf (info, Number) || Clazz_instanceOf (info, Boolean); +}, "~O"); +c$.arrayGet = Clazz_defineMethod (c$, "arrayGet", + function (info, i) { +{ +return info[i]; +}}, "~O,~N"); +c$.toJSON = Clazz_defineMethod (c$, "toJSON", +function (infoType, info) { +if (info == null) return JU.PT.packageJSON (infoType, null); +if (JU.PT.isNonStringPrimitive (info)) return JU.PT.packageJSON (infoType, info.toString ()); +var s = null; +var sb = null; +while (true) { +if (Clazz_instanceOf (info, String)) { +s = info; +{ +if (typeof s == "undefined") s = "null" +}if (s.indexOf ("{\"") != 0) { +s = JU.PT.rep (s, "\"", "\\\""); +s = JU.PT.rep (s, "\n", "\\n"); +s = "\"" + s + "\""; +}break; +}if (Clazz_instanceOf (info, javajs.api.JSONEncodable)) { +if ((s = (info).toJSON ()) == null) s = "null"; +break; +}sb = new JU.SB (); +if (Clazz_instanceOf (info, java.util.Map)) { +sb.append ("{ "); +var sep = ""; +for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { +sb.append (sep).append (JU.PT.packageJSON (key, JU.PT.toJSON (null, (info).get (key)))); +sep = ","; +} +sb.append (" }"); +break; +}if (Clazz_instanceOf (info, JU.Lst)) { +sb.append ("[ "); +var n = (info).size (); +for (var i = 0; i < n; i++) { +if (i > 0) sb.appendC (','); +sb.append (JU.PT.toJSON (null, (info).get (i))); +} +sb.append (" ]"); +break; +}if (Clazz_instanceOf (info, JU.M34)) { +var len = (Clazz_instanceOf (info, JU.M4) ? 4 : 3); +var x = Clazz_newFloatArray (len, 0); +var m = info; +sb.appendC ('['); +for (var i = 0; i < len; i++) { +if (i > 0) sb.appendC (','); +m.getRow (i, x); +sb.append (JU.PT.toJSON (null, x)); +} +sb.appendC (']'); +break; +}s = JU.PT.nonArrayString (info); +if (s == null) { +sb.append ("["); +var n = JU.AU.getLength (info); +for (var i = 0; i < n; i++) { +if (i > 0) sb.appendC (','); +sb.append (JU.PT.toJSON (null, JU.PT.arrayGet (info, i))); +} +sb.append ("]"); +break; +}info = info.toString (); +} +return JU.PT.packageJSON (infoType, (s == null ? sb.toString () : s)); +}, "~S,~O"); +c$.nonArrayString = Clazz_defineMethod (c$, "nonArrayString", +function (x) { +{ +var s = x.toString(); return (s.startsWith("[object") && +s.endsWith("Array]") ? null : s); +}}, "~O"); +c$.byteArrayToJSON = Clazz_defineMethod (c$, "byteArrayToJSON", +function (data) { +var sb = new JU.SB (); +sb.append ("["); +var n = data.length; +for (var i = 0; i < n; i++) { +if (i > 0) sb.appendC (','); +sb.appendI (data[i] & 0xFF); +} +sb.append ("]"); +return sb.toString (); +}, "~A"); +c$.packageJSON = Clazz_defineMethod (c$, "packageJSON", +function (infoType, info) { +return (infoType == null ? info : "\"" + infoType + "\": " + info); +}, "~S,~S"); +c$.isAS = Clazz_defineMethod (c$, "isAS", +function (x) { +{ +return Clazz_isAS(x); +}}, "~O"); +c$.isASS = Clazz_defineMethod (c$, "isASS", +function (x) { +{ +return Clazz_isASS(x); +}}, "~O"); +c$.isAP = Clazz_defineMethod (c$, "isAP", +function (x) { +{ +return Clazz_isAP(x); +}}, "~O"); +c$.isAF = Clazz_defineMethod (c$, "isAF", +function (x) { +{ +return Clazz_isAF(x); +}}, "~O"); +c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", +function (x) { +{ +return Clazz_isAFloat(x); +}}, "~O"); +c$.isAD = Clazz_defineMethod (c$, "isAD", +function (x) { +{ +return Clazz_isAF(x); +}}, "~O"); +c$.isADD = Clazz_defineMethod (c$, "isADD", +function (x) { +{ +return Clazz_isAFF(x); +}}, "~O"); +c$.isAB = Clazz_defineMethod (c$, "isAB", +function (x) { +{ +return Clazz_isAI(x); +}}, "~O"); +c$.isAI = Clazz_defineMethod (c$, "isAI", +function (x) { +{ +return Clazz_isAI(x); +}}, "~O"); +c$.isAII = Clazz_defineMethod (c$, "isAII", +function (x) { +{ +return Clazz_isAII(x); +}}, "~O"); +c$.isAFF = Clazz_defineMethod (c$, "isAFF", +function (x) { +{ +return Clazz_isAFF(x); +}}, "~O"); +c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", +function (x) { +{ +return Clazz_isAFFF(x); +}}, "~O"); +c$.escapeUrl = Clazz_defineMethod (c$, "escapeUrl", +function (url) { +url = JU.PT.rep (url, "\n", ""); +url = JU.PT.rep (url, "%", "%25"); +url = JU.PT.rep (url, "#", "%23"); +url = JU.PT.rep (url, "[", "%5B"); +url = JU.PT.rep (url, "]", "%5D"); +url = JU.PT.rep (url, " ", "%20"); +return url; +}, "~S"); +c$.esc = Clazz_defineMethod (c$, "esc", +function (str) { +if (str == null || str.length == 0) return "\"\""; +var haveEscape = false; +var i = 0; +for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) { +haveEscape = true; +break; +} +if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) { +var pt = -1; +var ch = "\\\\\tt\rr\nn\"\"".charAt (i++); +var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++); +var sb = new JU.SB (); +var pt0 = 0; +while ((pt = str.indexOf (ch, pt + 1)) >= 0) { +sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2); +pt0 = pt + 1; +} +sb.append (str.substring (pt0, str.length)); +str = sb.toString (); +} +return "\"" + JU.PT.escUnicode (str) + "\""; +}, "~S"); +c$.escUnicode = Clazz_defineMethod (c$, "escUnicode", +function (str) { +for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) { +var s = "0000" + Integer.toHexString (str.charCodeAt (i)); +str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1); +} +return str; +}, "~S"); +c$.escF = Clazz_defineMethod (c$, "escF", +function (f) { +var sf = "" + f; +{ +if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) +sf += ".0"; +}return sf; +}, "~N"); +c$.join = Clazz_defineMethod (c$, "join", +function (s, c, i0) { +if (s.length < i0) return null; +var sb = new JU.SB (); +sb.append (s[i0++]); +for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]); + +return sb.toString (); +}, "~A,~S,~N"); +c$.isLike = Clazz_defineMethod (c$, "isLike", +function (a, b) { +var areEqual = a.equals (b); +if (areEqual) return true; +var isStart = b.startsWith ("*"); +var isEnd = b.endsWith ("*"); +return (!isStart && !isEnd) ? areEqual : isStart && isEnd ? b.length == 1 || a.contains (b.substring (1, b.length - 1)) : isStart ? a.endsWith (b.substring (1)) : a.startsWith (b.substring (0, b.length - 1)); +}, "~S,~S"); +c$.getMapValueNoCase = Clazz_defineMethod (c$, "getMapValueNoCase", +function (h, key) { +if ("this".equals (key)) return h; +var val = h.get (key); +if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue (); + +return val; +}, "java.util.Map,~S"); +c$.getMapSubset = Clazz_defineMethod (c$, "getMapSubset", +function (h, key, h2) { +var val = h.get (key); +if (val != null) { +h2.put (key, val); +return; +}for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { +var k = e.getKey (); +if (JU.PT.isLike (k, key)) h2.put (k, e.getValue ()); +} +}, "java.util.Map,~S,java.util.Map"); +c$.clean = Clazz_defineMethod (c$, "clean", +function (s) { +return JU.PT.rep (JU.PT.replaceAllCharacters (s, " \t\n\r", " "), " ", " ").trim (); +}, "~S"); +c$.fdup = Clazz_defineMethod (c$, "fdup", +function (f, pt, n) { +var ch; +var count = 0; +for (var i = pt; --i >= 1; ) { +if (JU.PT.isDigit (ch = f.charAt (i))) continue; +switch (ch) { +case '.': +if (count++ != 0) return f; +continue; +case '-': +if (i != 1 && f.charAt (i - 1) != '.') return f; +continue; +default: +return f; +} +} +var s = f.substring (0, pt + 1); +var sb = new JU.SB (); +for (var i = 0; i < n; i++) sb.append (s); + +sb.append (f.substring (pt + 1)); +return sb.toString (); +}, "~S,~N,~N"); +c$.formatString = Clazz_defineMethod (c$, "formatString", +function (strFormat, key, strT, floatT, doubleT, doOne) { +if (strFormat == null) return null; +if ("".equals (strFormat)) return ""; +var len = key.length; +if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat; +var strLabel = ""; +var ich; +var ichPercent; +var ichKey; +for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) { +if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent); +ich = ichPercent + 1; +if (ichKey > ichPercent + 6) { +strLabel += '%'; +continue; +}try { +var alignLeft = false; +if (strFormat.charAt (ich) == '-') { +alignLeft = true; +++ich; +}var zeroPad = false; +if (strFormat.charAt (ich) == '0') { +zeroPad = true; +++ich; +}var ch; +var width = 0; +while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) { +width = (10 * width) + (ch.charCodeAt (0) - 48); +++ich; +} +var precision = 2147483647; +var isExponential = false; +if (strFormat.charAt (ich) == '.') { +++ich; +if ((ch = strFormat.charAt (ich)) == '-') { +isExponential = true; +++ich; +}if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') { +precision = ch.charCodeAt (0) - 48; +++ich; +}if (isExponential) precision = -precision - (strT == null ? 1 : 0); +}var st = strFormat.substring (ich, ich + len); +if (!st.equals (key)) { +ich = ichPercent + 1; +strLabel += '%'; +continue; +}ich += len; +if (!Float.isNaN (floatT)) strLabel += JU.PT.formatF (floatT, width, precision, alignLeft, zeroPad); + else if (strT != null) strLabel += JU.PT.formatS (strT, width, precision, alignLeft, zeroPad); + else if (!Double.isNaN (doubleT)) strLabel += JU.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true); +if (doOne) break; +} catch (ioobe) { +if (Clazz_exceptionOf (ioobe, IndexOutOfBoundsException)) { +ich = ichPercent; +break; +} else { +throw ioobe; +} +} +} +strLabel += strFormat.substring (ich); +return strLabel; +}, "~S,~S,~S,~N,~N,~B"); +c$.formatStringS = Clazz_defineMethod (c$, "formatStringS", +function (strFormat, key, strT) { +return JU.PT.formatString (strFormat, key, strT, NaN, NaN, false); +}, "~S,~S,~S"); +c$.formatStringF = Clazz_defineMethod (c$, "formatStringF", +function (strFormat, key, floatT) { +return JU.PT.formatString (strFormat, key, null, floatT, NaN, false); +}, "~S,~S,~N"); +c$.formatStringI = Clazz_defineMethod (c$, "formatStringI", +function (strFormat, key, intT) { +return JU.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false); +}, "~S,~S,~N"); +c$.sprintf = Clazz_defineMethod (c$, "sprintf", +function (strFormat, list, values) { +if (values == null) return strFormat; +var n = list.length; +if (n == values.length) try { +for (var o = 0; o < n; o++) { +if (values[o] == null) continue; +switch (list.charAt (o)) { +case 's': +strFormat = JU.PT.formatString (strFormat, "s", values[o], NaN, NaN, true); +break; +case 'f': +strFormat = JU.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true); +break; +case 'i': +strFormat = JU.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true); +strFormat = JU.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true); +break; +case 'd': +strFormat = JU.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true); +break; +case 'p': +var pVal = values[o]; +strFormat = JU.PT.formatString (strFormat, "p", null, pVal.x, NaN, true); +strFormat = JU.PT.formatString (strFormat, "p", null, pVal.y, NaN, true); +strFormat = JU.PT.formatString (strFormat, "p", null, pVal.z, NaN, true); +break; +case 'q': +var qVal = values[o]; +strFormat = JU.PT.formatString (strFormat, "q", null, qVal.x, NaN, true); +strFormat = JU.PT.formatString (strFormat, "q", null, qVal.y, NaN, true); +strFormat = JU.PT.formatString (strFormat, "q", null, qVal.z, NaN, true); +strFormat = JU.PT.formatString (strFormat, "q", null, qVal.w, NaN, true); +break; +case 'S': +var sVal = values[o]; +for (var i = 0; i < sVal.length; i++) strFormat = JU.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true); + +break; +case 'F': +var fVal = values[o]; +for (var i = 0; i < fVal.length; i++) strFormat = JU.PT.formatString (strFormat, "f", null, fVal[i], NaN, true); + +break; +case 'I': +var iVal = values[o]; +for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true); + +for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true); + +break; +case 'D': +var dVal = values[o]; +for (var i = 0; i < dVal.length; i++) strFormat = JU.PT.formatString (strFormat, "e", null, NaN, dVal[i], true); + +} +} +return JU.PT.rep (strFormat, "%%", "%"); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +} else { +throw e; +} +} +System.out.println ("TextFormat.sprintf error " + list + " " + strFormat); +return JU.PT.rep (strFormat, "%", "?"); +}, "~S,~S,~A"); +c$.formatCheck = Clazz_defineMethod (c$, "formatCheck", +function (strFormat) { +if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat; +strFormat = JU.PT.rep (strFormat, "%%", "\1"); +strFormat = JU.PT.rep (strFormat, "%p", "%6.2p"); +strFormat = JU.PT.rep (strFormat, "%q", "%6.2q"); +var format = JU.PT.split (strFormat, "%"); +var sb = new JU.SB (); +sb.append (format[0]); +for (var i = 1; i < format.length; i++) { +var f = "%" + format[i]; +var pt; +if (f.length >= 3) { +if ((pt = f.indexOf ('p')) >= 0) f = JU.PT.fdup (f, pt, 3); +if ((pt = f.indexOf ('q')) >= 0) f = JU.PT.fdup (f, pt, 4); +}sb.append (f); +} +return sb.toString ().$replace ('\1', '%'); +}, "~S"); +c$.leftJustify = Clazz_defineMethod (c$, "leftJustify", +function (s, s1, s2) { +s.append (s2); +var n = s1.length - s2.length; +if (n > 0) s.append (s1.substring (0, n)); +}, "JU.SB,~S,~S"); +c$.rightJustify = Clazz_defineMethod (c$, "rightJustify", +function (s, s1, s2) { +var n = s1.length - s2.length; +if (n > 0) s.append (s1.substring (0, n)); +s.append (s2); +}, "JU.SB,~S,~S"); +c$.safeTruncate = Clazz_defineMethod (c$, "safeTruncate", +function (f, n) { +if (f > -0.001 && f < 0.001) f = 0; +return (f + " ").substring (0, n); +}, "~N,~N"); +c$.isWild = Clazz_defineMethod (c$, "isWild", +function (s) { +return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0); +}, "~S"); +c$.isMatch = Clazz_defineMethod (c$, "isMatch", +function (search, match, checkStar, allowInitialStar) { +if (search.equals (match)) return true; +var mLen = match.length; +if (mLen == 0) return false; +var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false); +if (mLen == 1 && isStar0) return true; +var isStar1 = (checkStar && match.endsWith ("*")); +var haveQ = (match.indexOf ('?') >= 0); +if (!haveQ) { +if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1))); + else if (isStar1) return search.startsWith (match.substring (0, mLen - 1)); +}var sLen = search.length; +var qqqq = "????"; +var nq = 4; +while (nq < sLen) { +qqqq += qqqq; +nq += 4; +} +if (checkStar) { +if (isStar0) { +match = qqqq + match.substring (1); +mLen += nq - 1; +}if (isStar1) { +match = match.substring (0, mLen - 1) + qqqq; +mLen += nq - 1; +}}if (mLen < sLen) return false; +var ich = 0; +while (mLen > sLen) { +if (allowInitialStar && match.charAt (ich) == '?') { +++ich; +} else if (match.charAt (ich + mLen - 1) != '?') { +return false; +}--mLen; +} +for (var i = sLen; --i >= 0; ) { +var chm = match.charAt (ich + i); +if (chm == '?') continue; +var chs = search.charAt (i); +if (chm != chs && (chm != '\1' || chs != '?')) return false; +} +return true; +}, "~S,~S,~B,~B"); +c$.replaceQuotedStrings = Clazz_defineMethod (c$, "replaceQuotedStrings", +function (s, list, newList) { +var n = list.size (); +for (var i = 0; i < n; i++) { +var name = list.get (i); +var newName = newList.get (i); +if (!newName.equals (name)) s = JU.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\""); +} +return s; +}, "~S,JU.Lst,JU.Lst"); +c$.replaceStrings = Clazz_defineMethod (c$, "replaceStrings", +function (s, list, newList) { +var n = list.size (); +for (var i = 0; i < n; i++) { +var name = list.get (i); +var newName = newList.get (i); +if (!newName.equals (name)) s = JU.PT.rep (s, name, newName); +} +return s; +}, "~S,JU.Lst,JU.Lst"); +c$.isDigit = Clazz_defineMethod (c$, "isDigit", +function (ch) { +var c = (ch).charCodeAt (0); +return (48 <= c && c <= 57); +}, "~S"); +c$.isUpperCase = Clazz_defineMethod (c$, "isUpperCase", +function (ch) { +var c = (ch).charCodeAt (0); +return (65 <= c && c <= 90); +}, "~S"); +c$.isLowerCase = Clazz_defineMethod (c$, "isLowerCase", +function (ch) { +var c = (ch).charCodeAt (0); +return (97 <= c && c <= 122); +}, "~S"); +c$.isLetter = Clazz_defineMethod (c$, "isLetter", +function (ch) { +var c = (ch).charCodeAt (0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122); +}, "~S"); +c$.isLetterOrDigit = Clazz_defineMethod (c$, "isLetterOrDigit", +function (ch) { +var c = (ch).charCodeAt (0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); +}, "~S"); +c$.isWhitespace = Clazz_defineMethod (c$, "isWhitespace", +function (ch) { +var c = (ch).charCodeAt (0); +return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd); +}, "~S"); +c$.fixPtFloats = Clazz_defineMethod (c$, "fixPtFloats", +function (pt, f) { +pt.x = Math.round (pt.x * f) / f; +pt.y = Math.round (pt.y * f) / f; +pt.z = Math.round (pt.z * f) / f; +}, "JU.T3,~N"); +c$.fixDouble = Clazz_defineMethod (c$, "fixDouble", +function (d, f) { +return Math.round (d * f) / f; +}, "~N,~N"); +c$.parseFloatFraction = Clazz_defineMethod (c$, "parseFloatFraction", +function (s) { +var pt = s.indexOf ("/"); +return (pt < 0 ? JU.PT.parseFloat (s) : JU.PT.parseFloat (s.substring (0, pt)) / JU.PT.parseFloat (s.substring (pt + 1))); +}, "~S"); +Clazz_defineStatics (c$, +"tensScale", Clazz_newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]), +"decimalScale", Clazz_newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]), +"FLOAT_MIN_SAFE", 2E-45, +"escapable", "\\\\\tt\rr\nn\"\"", +"FRACTIONAL_PRECISION", 100000, +"CARTESIAN_PRECISION", 10000); +}); +Clazz_declarePackage ("javajs.api"); +Clazz_declareInterface (javajs.api, "JSONEncodable"); +Clazz_declarePackage ("JU"); +Clazz_load (null, "JU.AU", ["java.util.Arrays", "JU.Lst"], function () { +c$ = Clazz_declareType (JU, "AU"); +c$.ensureLength = Clazz_defineMethod (c$, "ensureLength", +function (array, minimumLength) { +if (array != null && JU.AU.getLength (array) >= minimumLength) return array; +return JU.AU.arrayCopyObject (array, minimumLength); +}, "~O,~N"); +c$.ensureLengthS = Clazz_defineMethod (c$, "ensureLengthS", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return JU.AU.arrayCopyS (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthA = Clazz_defineMethod (c$, "ensureLengthA", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return JU.AU.arrayCopyF (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthI = Clazz_defineMethod (c$, "ensureLengthI", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return JU.AU.arrayCopyI (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthShort = Clazz_defineMethod (c$, "ensureLengthShort", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return JU.AU.arrayCopyShort (array, minimumLength); +}, "~A,~N"); +c$.ensureLengthByte = Clazz_defineMethod (c$, "ensureLengthByte", +function (array, minimumLength) { +if (array != null && array.length >= minimumLength) return array; +return JU.AU.arrayCopyByte (array, minimumLength); +}, "~A,~N"); +c$.doubleLength = Clazz_defineMethod (c$, "doubleLength", +function (array) { +return JU.AU.arrayCopyObject (array, (array == null ? 16 : 2 * JU.AU.getLength (array))); +}, "~O"); +c$.doubleLengthS = Clazz_defineMethod (c$, "doubleLengthS", +function (array) { +return JU.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthF = Clazz_defineMethod (c$, "doubleLengthF", +function (array) { +return JU.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthI = Clazz_defineMethod (c$, "doubleLengthI", +function (array) { +return JU.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthShort = Clazz_defineMethod (c$, "doubleLengthShort", +function (array) { +return JU.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthByte = Clazz_defineMethod (c$, "doubleLengthByte", +function (array) { +return JU.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.doubleLengthBool = Clazz_defineMethod (c$, "doubleLengthBool", +function (array) { +return JU.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length)); +}, "~A"); +c$.deleteElements = Clazz_defineMethod (c$, "deleteElements", +function (array, firstElement, nElements) { +if (nElements == 0 || array == null) return array; +var oldLength = JU.AU.getLength (array); +if (firstElement >= oldLength) return array; +var n = oldLength - (firstElement + nElements); +if (n < 0) n = 0; +var t = JU.AU.newInstanceO (array, firstElement + n); +if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement); +if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n); +return t; +}, "~O,~N,~N"); +c$.arrayCopyObject = Clazz_defineMethod (c$, "arrayCopyObject", +function (array, newLength) { +if (array == null) { +return null; +}var oldLength = JU.AU.getLength (array); +if (newLength == oldLength) return array; +var t = JU.AU.newInstanceO (array, newLength); +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +return t; +}, "~O,~N"); +c$.newInstanceO = Clazz_defineMethod (c$, "newInstanceO", + function (array, n) { +{ +if (!array.getClass().getComponentType) +return new Array(n); +}}, "~O,~N"); +c$.getLength = Clazz_defineMethod (c$, "getLength", +function (array) { +{ +return array.length +}}, "~O"); +c$.arrayCopyS = Clazz_defineMethod (c$, "arrayCopyS", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = new Array (newLength); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyII = Clazz_defineMethod (c$, "arrayCopyII", +function (array, newLength) { +var t = JU.AU.newInt2 (newLength); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyPt = Clazz_defineMethod (c$, "arrayCopyPt", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = new Array (newLength); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyF = Clazz_defineMethod (c$, "arrayCopyF", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz_newFloatArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyI = Clazz_defineMethod (c$, "arrayCopyI", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz_newIntArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyRangeI = Clazz_defineMethod (c$, "arrayCopyRangeI", +function (array, i0, n) { +if (array == null) return null; +var oldLength = array.length; +if (n == -1) n = oldLength; +if (n == -2) n = Clazz_doubleToInt (oldLength / 2); +n = n - i0; +var t = Clazz_newIntArray (n, 0); +System.arraycopy (array, i0, t, 0, n); +return t; +}, "~A,~N,~N"); +c$.arrayCopyRangeRevI = Clazz_defineMethod (c$, "arrayCopyRangeRevI", +function (array, i0, n) { +if (array == null) return null; +var t = JU.AU.arrayCopyRangeI (array, i0, n); +if (n < 0) n = array.length; +for (var i = Clazz_doubleToInt (n / 2); --i >= 0; ) JU.AU.swapInt (t, i, n - 1 - i); + +return t; +}, "~A,~N,~N"); +c$.arrayCopyShort = Clazz_defineMethod (c$, "arrayCopyShort", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz_newShortArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyByte = Clazz_defineMethod (c$, "arrayCopyByte", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz_newByteArray (newLength, 0); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.arrayCopyBool = Clazz_defineMethod (c$, "arrayCopyBool", +function (array, newLength) { +if (newLength < 0) newLength = array.length; +var t = Clazz_newBooleanArray (newLength, false); +if (array != null) { +var oldLength = array.length; +System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); +}return t; +}, "~A,~N"); +c$.swapInt = Clazz_defineMethod (c$, "swapInt", +function (array, indexA, indexB) { +var t = array[indexA]; +array[indexA] = array[indexB]; +array[indexB] = t; +}, "~A,~N,~N"); +c$.dumpArray = Clazz_defineMethod (c$, "dumpArray", +function (msg, A, x1, x2, y1, y2) { +var s = "dumpArray: " + msg + "\n"; +for (var x = x1; x <= x2; x++) s += "\t*" + x + "*"; + +for (var y = y2; y >= y1; y--) { +s += "\n*" + y + "*"; +for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN); + +} +return s; +}, "~S,~A,~N,~N,~N,~N"); +c$.dumpIntArray = Clazz_defineMethod (c$, "dumpIntArray", +function (A, n) { +var str = ""; +for (var i = 0; i < n; i++) str += " " + A[i]; + +return str; +}, "~A,~N"); +c$.sortedItem = Clazz_defineMethod (c$, "sortedItem", +function (v, n) { +if (v.size () == 0) return null; +if (v.size () == 1) return v.get (0); +var keys = v.toArray ( new Array (v.size ())); +java.util.Arrays.sort (keys); +return keys[n % keys.length]; +}, "JU.Lst,~N"); +c$.createArrayOfArrayList = Clazz_defineMethod (c$, "createArrayOfArrayList", +function (size) { +return new Array (size); +}, "~N"); +c$.createArrayOfHashtable = Clazz_defineMethod (c$, "createArrayOfHashtable", +function (size) { +return new Array (size); +}, "~N"); +c$.swap = Clazz_defineMethod (c$, "swap", +function (o, i, j) { +var oi = o[i]; +o[i] = o[j]; +o[j] = oi; +}, "~A,~N,~N"); +c$.newFloat2 = Clazz_defineMethod (c$, "newFloat2", +function (n) { +{ +return Clazz_newArray(n, null); +}}, "~N"); +c$.newInt2 = Clazz_defineMethod (c$, "newInt2", +function (n) { +{ +return Clazz_newArray(n, null); +}}, "~N"); +c$.newInt3 = Clazz_defineMethod (c$, "newInt3", +function (nx, ny) { +{ +return Clazz_newArray(nx, null); +}}, "~N,~N"); +c$.newFloat3 = Clazz_defineMethod (c$, "newFloat3", +function (nx, ny) { +{ +return Clazz_newArray(nx, null); +}}, "~N,~N"); +c$.newInt4 = Clazz_defineMethod (c$, "newInt4", +function (n) { +{ +return Clazz_newArray(n, null); +}}, "~N"); +c$.newShort2 = Clazz_defineMethod (c$, "newShort2", +function (n) { +{ +return Clazz_newArray(n, null); +}}, "~N"); +c$.newByte2 = Clazz_defineMethod (c$, "newByte2", +function (n) { +{ +return Clazz_newArray(n, null); +}}, "~N"); +c$.newDouble2 = Clazz_defineMethod (c$, "newDouble2", +function (n) { +{ +return Clazz_newArray(n, null); +}}, "~N"); +c$.removeMapKeys = Clazz_defineMethod (c$, "removeMapKeys", +function (map, root) { +var list = new JU.Lst (); +for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key); + +for (var i = list.size (); --i >= 0; ) map.remove (list.get (i)); + +return list.size (); +}, "java.util.Map,~S"); +c$.isAS = Clazz_defineMethod (c$, "isAS", +function (x) { +{ +return Clazz_isAS(x); +}}, "~O"); +c$.isASS = Clazz_defineMethod (c$, "isASS", +function (x) { +{ +return Clazz_isASS(x); +}}, "~O"); +c$.isAP = Clazz_defineMethod (c$, "isAP", +function (x) { +{ +return Clazz_isAP(x); +}}, "~O"); +c$.isAF = Clazz_defineMethod (c$, "isAF", +function (x) { +{ +return Clazz_isAF(x); +}}, "~O"); +c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", +function (x) { +{ +return Clazz_isAFloat(x); +}}, "~O"); +c$.isAD = Clazz_defineMethod (c$, "isAD", +function (x) { +{ +return Clazz_isAF(x); +}}, "~O"); +c$.isADD = Clazz_defineMethod (c$, "isADD", +function (x) { +{ +return Clazz_isAFF(x); +}}, "~O"); +c$.isAB = Clazz_defineMethod (c$, "isAB", +function (x) { +{ +return Clazz_isAI(x); +}}, "~O"); +c$.isAI = Clazz_defineMethod (c$, "isAI", +function (x) { +{ +return Clazz_isAI(x); +}}, "~O"); +c$.isAII = Clazz_defineMethod (c$, "isAII", +function (x) { +{ +return Clazz_isAII(x); +}}, "~O"); +c$.isAFF = Clazz_defineMethod (c$, "isAFF", +function (x) { +{ +return Clazz_isAFF(x); +}}, "~O"); +c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", +function (x) { +{ +return Clazz_isAFFF(x); +}}, "~O"); +c$.ensureSignedBytes = Clazz_defineMethod (c$, "ensureSignedBytes", +function (b) { +if (b != null) { +{ +for (var i = b.length; --i >= 0;) { var j = b[i] & 0xFF; if +(j >= 0x80) j -= 0x100; b[i] = j; } +}}return b; +}, "~A"); +}); +Clazz_declarePackage ("JU"); +Clazz_load (["java.util.ArrayList"], "JU.Lst", null, function () { +c$ = Clazz_declareType (JU, "Lst", java.util.ArrayList); +Clazz_defineMethod (c$, "addLast", +function (v) { +{ +return this.add1(v); +}}, "~O"); +Clazz_defineMethod (c$, "removeObj", +function (v) { +{ +return this.removeObject(v); +}}, "~O"); +}); +Clazz_declarePackage ("JU"); +Clazz_load (["java.lang.Boolean"], "JU.DF", ["java.lang.Double", "$.Float", "JU.PT", "$.SB"], function () { +c$ = Clazz_declareType (JU, "DF"); +c$.setUseNumberLocalization = Clazz_defineMethod (c$, "setUseNumberLocalization", +function (TF) { +JU.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE); +}, "~B"); +c$.formatDecimalDbl = Clazz_defineMethod (c$, "formatDecimalDbl", +function (value, decimalDigits) { +if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value; +return JU.DF.formatDecimal (value, decimalDigits); +}, "~N,~N"); +c$.formatDecimal = Clazz_defineMethod (c$, "formatDecimal", +function (value, decimalDigits) { +if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value; +var n; +if (decimalDigits < 0) { +decimalDigits = -decimalDigits; +if (decimalDigits > JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length; +if (value == 0) return JU.DF.formattingStrings[decimalDigits] + "E+0"; +n = 0; +var d; +if (Math.abs (value) < 1) { +n = 10; +d = value * 1e-10; +} else { +n = -10; +d = value * 1e10; +}var s = ("" + d).toUpperCase (); +var i = s.indexOf ("E"); +n = JU.PT.parseInt (s.substring (i + 1)) + n; +return (i < 0 ? "" + value : JU.DF.formatDecimal (JU.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n); +}if (decimalDigits >= JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length - 1; +var s1 = ("" + value).toUpperCase (); +var pt = s1.indexOf ("."); +if (pt < 0) return s1 + JU.DF.formattingStrings[decimalDigits].substring (1); +var isNeg = s1.startsWith ("-"); +if (isNeg) { +s1 = s1.substring (1); +pt--; +}var pt1 = s1.indexOf ("E-"); +if (pt1 > 0) { +n = JU.PT.parseInt (s1.substring (pt1 + 1)); +s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1); +pt = 1; +}pt1 = s1.indexOf ("E"); +if (pt1 > 0) { +n = JU.PT.parseInt (s1.substring (pt1 + 1)); +s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000"; +s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1); +pt = s1.indexOf ("."); +}var len = s1.length; +var pt2 = decimalDigits + pt + 1; +if (pt2 < len && s1.charAt (pt2) >= '5') { +return JU.DF.formatDecimal (value + (isNeg ? -1 : 1) * JU.DF.formatAdds[decimalDigits], decimalDigits); +}var sb = JU.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt))); +for (var i = 0; i < decimalDigits; i++, pt++) { +if (pt < len) sb.appendC (s1.charAt (pt)); + else sb.appendC ('0'); +} +s1 = (isNeg ? "-" : "") + sb; +return (Boolean.TRUE.equals (JU.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.')); +}, "~N,~N"); +c$.formatDecimalTrimmed = Clazz_defineMethod (c$, "formatDecimalTrimmed", +function (x, precision) { +var str = JU.DF.formatDecimalDbl (x, precision); +var m = str.length - 1; +var zero = '0'; +while (m >= 0 && str.charAt (m) == zero) m--; + +return str.substring (0, m + 1); +}, "~N,~N"); +Clazz_defineStatics (c$, +"formattingStrings", Clazz_newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]), +"zeros", "0000000000000000000000000000000000000000", +"formatAdds", Clazz_newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005])); +c$.useNumberLocalization = c$.prototype.useNumberLocalization = Clazz_newArray (-1, [Boolean.TRUE]); +}); +Clazz_declarePackage ("JU"); +c$ = Clazz_decorateAsClass (function () { +this.sb = null; +this.s = null; +Clazz_instantialize (this, arguments); +}, JU, "SB"); +Clazz_makeConstructor (c$, +function () { +{ +this.s = ""; +}}); +c$.newN = Clazz_defineMethod (c$, "newN", +function (n) { +{ +return new JU.SB(); +}}, "~N"); +c$.newS = Clazz_defineMethod (c$, "newS", +function (s) { +{ +var sb = new JU.SB(); +sb.s = s; +return sb; +}}, "~S"); +Clazz_defineMethod (c$, "append", +function (s) { +{ +this.s += s +}return this; +}, "~S"); +Clazz_defineMethod (c$, "appendC", +function (c) { +{ +this.s += c; +}return this; +}, "~S"); +Clazz_defineMethod (c$, "appendI", +function (i) { +{ +this.s += i +}return this; +}, "~N"); +Clazz_defineMethod (c$, "appendB", +function (b) { +{ +this.s += b +}return this; +}, "~B"); +Clazz_defineMethod (c$, "appendF", +function (f) { +{ +var sf = "" + f; +if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) +sf += ".0" ; +this.s += sf; +}return this; +}, "~N"); +Clazz_defineMethod (c$, "appendD", +function (d) { +{ +var sf = "" + d; +if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) +sf += ".0" ; +this.s += sf; +}return this; +}, "~N"); +Clazz_defineMethod (c$, "appendSB", +function (buf) { +{ +this.s += buf.s; +}return this; +}, "JU.SB"); +Clazz_defineMethod (c$, "appendO", +function (data) { +if (data != null) { +{ +this.s += data.toString(); +}}return this; +}, "~O"); +Clazz_defineMethod (c$, "appendCB", +function (cb, off, len) { +{ +for (var i = len,j=off; --i >= 0;) +this.s += cb[j++]; +}}, "~A,~N,~N"); +Clazz_overrideMethod (c$, "toString", +function () { +{ +return this.s; +}}); +Clazz_defineMethod (c$, "length", +function () { +{ +return this.s.length; +}}); +Clazz_defineMethod (c$, "indexOf", +function (s) { +{ +return this.s.indexOf(s); +}}, "~S"); +Clazz_defineMethod (c$, "charAt", +function (i) { +{ +return this.s.charAt(i); +}}, "~N"); +Clazz_defineMethod (c$, "charCodeAt", +function (i) { +{ +return this.s.charCodeAt(i); +}}, "~N"); +Clazz_defineMethod (c$, "setLength", +function (n) { +{ +this.s = this.s.substring(0, n); +}}, "~N"); +Clazz_defineMethod (c$, "lastIndexOf", +function (s) { +{ +return this.s.lastIndexOf(s); +}}, "~S"); +Clazz_defineMethod (c$, "indexOf2", +function (s, i) { +{ +return this.s.indexOf(s, i); +}}, "~S,~N"); +Clazz_defineMethod (c$, "substring", +function (i) { +{ +return this.s.substring(i); +}}, "~N"); +Clazz_defineMethod (c$, "substring2", +function (i, j) { +{ +return this.s.substring(i, j); +}}, "~N,~N"); +Clazz_defineMethod (c$, "toBytes", +function (off, len) { +if (len < 0) len = this.length () - off; +var b = Clazz_newByteArray (len, 0); +for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0); + +return b; +}, "~N,~N"); +Clazz_defineMethod (c$, "replace", +function (start, end, str) { +{ +this.s = this.s.substring(0, start) + str + this.s.substring(end); +}}, "~N,~N,~S"); +Clazz_defineMethod (c$, "insert", +function (offset, str) { +this.replace (offset, offset, str); +}, "~N,~S"); +Clazz_declarePackage ("JU"); +Clazz_load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.m00 = 0; +this.m01 = 0; +this.m02 = 0; +this.m10 = 0; +this.m11 = 0; +this.m12 = 0; +this.m20 = 0; +this.m21 = 0; +this.m22 = 0; +Clazz_instantialize (this, arguments); +}, JU, "M34"); +Clazz_defineMethod (c$, "setAA33", +function (a) { +var x = a.x; +var y = a.y; +var z = a.z; +var angle = a.angle; +var n = Math.sqrt (x * x + y * y + z * z); +n = 1 / n; +x *= n; +y *= n; +z *= n; +var c = Math.cos (angle); +var s = Math.sin (angle); +var omc = 1.0 - c; +this.m00 = (c + x * x * omc); +this.m11 = (c + y * y * omc); +this.m22 = (c + z * z * omc); +var tmp1 = x * y * omc; +var tmp2 = z * s; +this.m01 = (tmp1 - tmp2); +this.m10 = (tmp1 + tmp2); +tmp1 = x * z * omc; +tmp2 = y * s; +this.m02 = (tmp1 + tmp2); +this.m20 = (tmp1 - tmp2); +tmp1 = y * z * omc; +tmp2 = x * s; +this.m12 = (tmp1 - tmp2); +this.m21 = (tmp1 + tmp2); +}, "JU.A4"); +Clazz_defineMethod (c$, "rotate", +function (t) { +this.rotate2 (t, t); +}, "JU.T3"); +Clazz_defineMethod (c$, "rotate2", +function (t, result) { +result.set (this.m00 * t.x + this.m01 * t.y + this.m02 * t.z, this.m10 * t.x + this.m11 * t.y + this.m12 * t.z, this.m20 * t.x + this.m21 * t.y + this.m22 * t.z); +}, "JU.T3,JU.T3"); +Clazz_defineMethod (c$, "setM33", +function (m1) { +this.m00 = m1.m00; +this.m01 = m1.m01; +this.m02 = m1.m02; +this.m10 = m1.m10; +this.m11 = m1.m11; +this.m12 = m1.m12; +this.m20 = m1.m20; +this.m21 = m1.m21; +this.m22 = m1.m22; +}, "JU.M34"); +Clazz_defineMethod (c$, "clear33", +function () { +this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0; +}); +Clazz_defineMethod (c$, "set33", +function (row, col, v) { +switch (row) { +case 0: +switch (col) { +case 0: +this.m00 = v; +return; +case 1: +this.m01 = v; +return; +case 2: +this.m02 = v; +return; +} +break; +case 1: +switch (col) { +case 0: +this.m10 = v; +return; +case 1: +this.m11 = v; +return; +case 2: +this.m12 = v; +return; +} +break; +case 2: +switch (col) { +case 0: +this.m20 = v; +return; +case 1: +this.m21 = v; +return; +case 2: +this.m22 = v; +return; +} +break; +} +this.err (); +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "get33", +function (row, col) { +switch (row) { +case 0: +switch (col) { +case 0: +return this.m00; +case 1: +return this.m01; +case 2: +return this.m02; +} +break; +case 1: +switch (col) { +case 0: +return this.m10; +case 1: +return this.m11; +case 2: +return this.m12; +} +break; +case 2: +switch (col) { +case 0: +return this.m20; +case 1: +return this.m21; +case 2: +return this.m22; +} +break; +} +this.err (); +return 0; +}, "~N,~N"); +Clazz_defineMethod (c$, "setRow33", +function (row, v) { +switch (row) { +case 0: +this.m00 = v[0]; +this.m01 = v[1]; +this.m02 = v[2]; +return; +case 1: +this.m10 = v[0]; +this.m11 = v[1]; +this.m12 = v[2]; +return; +case 2: +this.m20 = v[0]; +this.m21 = v[1]; +this.m22 = v[2]; +return; +default: +this.err (); +} +}, "~N,~A"); +Clazz_defineMethod (c$, "getRow33", +function (row, v) { +switch (row) { +case 0: +v[0] = this.m00; +v[1] = this.m01; +v[2] = this.m02; +return; +case 1: +v[0] = this.m10; +v[1] = this.m11; +v[2] = this.m12; +return; +case 2: +v[0] = this.m20; +v[1] = this.m21; +v[2] = this.m22; +return; +} +this.err (); +}, "~N,~A"); +Clazz_defineMethod (c$, "setColumn33", +function (column, v) { +switch (column) { +case 0: +this.m00 = v[0]; +this.m10 = v[1]; +this.m20 = v[2]; +break; +case 1: +this.m01 = v[0]; +this.m11 = v[1]; +this.m21 = v[2]; +break; +case 2: +this.m02 = v[0]; +this.m12 = v[1]; +this.m22 = v[2]; +break; +default: +this.err (); +} +}, "~N,~A"); +Clazz_defineMethod (c$, "getColumn33", +function (column, v) { +switch (column) { +case 0: +v[0] = this.m00; +v[1] = this.m10; +v[2] = this.m20; +break; +case 1: +v[0] = this.m01; +v[1] = this.m11; +v[2] = this.m21; +break; +case 2: +v[0] = this.m02; +v[1] = this.m12; +v[2] = this.m22; +break; +default: +this.err (); +} +}, "~N,~A"); +Clazz_defineMethod (c$, "add33", +function (m1) { +this.m00 += m1.m00; +this.m01 += m1.m01; +this.m02 += m1.m02; +this.m10 += m1.m10; +this.m11 += m1.m11; +this.m12 += m1.m12; +this.m20 += m1.m20; +this.m21 += m1.m21; +this.m22 += m1.m22; +}, "JU.M34"); +Clazz_defineMethod (c$, "sub33", +function (m1) { +this.m00 -= m1.m00; +this.m01 -= m1.m01; +this.m02 -= m1.m02; +this.m10 -= m1.m10; +this.m11 -= m1.m11; +this.m12 -= m1.m12; +this.m20 -= m1.m20; +this.m21 -= m1.m21; +this.m22 -= m1.m22; +}, "JU.M34"); +Clazz_defineMethod (c$, "mul33", +function (x) { +this.m00 *= x; +this.m01 *= x; +this.m02 *= x; +this.m10 *= x; +this.m11 *= x; +this.m12 *= x; +this.m20 *= x; +this.m21 *= x; +this.m22 *= x; +}, "~N"); +Clazz_defineMethod (c$, "transpose33", +function () { +var tmp = this.m01; +this.m01 = this.m10; +this.m10 = tmp; +tmp = this.m02; +this.m02 = this.m20; +this.m20 = tmp; +tmp = this.m12; +this.m12 = this.m21; +this.m21 = tmp; +}); +Clazz_defineMethod (c$, "setXRot", +function (angle) { +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = 1.0; +this.m01 = 0.0; +this.m02 = 0.0; +this.m10 = 0.0; +this.m11 = c; +this.m12 = -s; +this.m20 = 0.0; +this.m21 = s; +this.m22 = c; +}, "~N"); +Clazz_defineMethod (c$, "setYRot", +function (angle) { +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = c; +this.m01 = 0.0; +this.m02 = s; +this.m10 = 0.0; +this.m11 = 1.0; +this.m12 = 0.0; +this.m20 = -s; +this.m21 = 0.0; +this.m22 = c; +}, "~N"); +Clazz_defineMethod (c$, "setZRot", +function (angle) { +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = c; +this.m01 = -s; +this.m02 = 0.0; +this.m10 = s; +this.m11 = c; +this.m12 = 0.0; +this.m20 = 0.0; +this.m21 = 0.0; +this.m22 = 1.0; +}, "~N"); +Clazz_defineMethod (c$, "determinant3", +function () { +return this.m00 * (this.m11 * this.m22 - this.m21 * this.m12) - this.m01 * (this.m10 * this.m22 - this.m20 * this.m12) + this.m02 * (this.m10 * this.m21 - this.m20 * this.m11); +}); +Clazz_defineMethod (c$, "err", +function () { +throw new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds"); +}); +}); +Clazz_declarePackage ("JU"); +Clazz_load (["JU.M34"], "JU.M4", ["JU.T3"], function () { +c$ = Clazz_decorateAsClass (function () { +this.m03 = 0; +this.m13 = 0; +this.m23 = 0; +this.m30 = 0; +this.m31 = 0; +this.m32 = 0; +this.m33 = 0; +Clazz_instantialize (this, arguments); +}, JU, "M4", JU.M34); +c$.newA16 = Clazz_defineMethod (c$, "newA16", +function (v) { +var m = new JU.M4 (); +m.m00 = v[0]; +m.m01 = v[1]; +m.m02 = v[2]; +m.m03 = v[3]; +m.m10 = v[4]; +m.m11 = v[5]; +m.m12 = v[6]; +m.m13 = v[7]; +m.m20 = v[8]; +m.m21 = v[9]; +m.m22 = v[10]; +m.m23 = v[11]; +m.m30 = v[12]; +m.m31 = v[13]; +m.m32 = v[14]; +m.m33 = v[15]; +return m; +}, "~A"); +c$.newM4 = Clazz_defineMethod (c$, "newM4", +function (m1) { +var m = new JU.M4 (); +if (m1 == null) { +m.setIdentity (); +return m; +}m.setToM3 (m1); +m.m03 = m1.m03; +m.m13 = m1.m13; +m.m23 = m1.m23; +m.m30 = m1.m30; +m.m31 = m1.m31; +m.m32 = m1.m32; +m.m33 = m1.m33; +return m; +}, "JU.M4"); +c$.newMV = Clazz_defineMethod (c$, "newMV", +function (m1, t) { +var m = new JU.M4 (); +m.setMV (m1, t); +return m; +}, "JU.M3,JU.T3"); +Clazz_defineMethod (c$, "setZero", +function () { +this.clear33 (); +this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0; +}); +Clazz_defineMethod (c$, "setIdentity", +function () { +this.setZero (); +this.m00 = this.m11 = this.m22 = this.m33 = 1.0; +}); +Clazz_defineMethod (c$, "setM4", +function (m1) { +this.setM33 (m1); +this.m03 = m1.m03; +this.m13 = m1.m13; +this.m23 = m1.m23; +this.m30 = m1.m30; +this.m31 = m1.m31; +this.m32 = m1.m32; +this.m33 = m1.m33; +return this; +}, "JU.M4"); +Clazz_defineMethod (c$, "setMV", +function (m1, t) { +this.setM33 (m1); +this.setTranslation (t); +this.m33 = 1; +}, "JU.M3,JU.T3"); +Clazz_defineMethod (c$, "setToM3", +function (m1) { +this.setM33 (m1); +this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0; +this.m33 = 1.0; +}, "JU.M34"); +Clazz_defineMethod (c$, "setToAA", +function (a) { +this.setIdentity (); +this.setAA33 (a); +}, "JU.A4"); +Clazz_defineMethod (c$, "setA", +function (m) { +this.m00 = m[0]; +this.m01 = m[1]; +this.m02 = m[2]; +this.m03 = m[3]; +this.m10 = m[4]; +this.m11 = m[5]; +this.m12 = m[6]; +this.m13 = m[7]; +this.m20 = m[8]; +this.m21 = m[9]; +this.m22 = m[10]; +this.m23 = m[11]; +this.m30 = m[12]; +this.m31 = m[13]; +this.m32 = m[14]; +this.m33 = m[15]; +}, "~A"); +Clazz_defineMethod (c$, "setTranslation", +function (trans) { +this.m03 = trans.x; +this.m13 = trans.y; +this.m23 = trans.z; +}, "JU.T3"); +Clazz_defineMethod (c$, "setElement", +function (row, col, v) { +if (row < 3 && col < 3) { +this.set33 (row, col, v); +return; +}if (row > 3 || col > 3) this.err (); +switch (row) { +case 0: +this.m03 = v; +return; +case 1: +this.m13 = v; +return; +case 2: +this.m23 = v; +return; +} +switch (col) { +case 0: +this.m30 = v; +return; +case 1: +this.m31 = v; +return; +case 2: +this.m32 = v; +return; +case 3: +this.m33 = v; +return; +} +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "getElement", +function (row, col) { +if (row < 3 && col < 3) return this.get33 (row, col); +if (row > 3 || col > 3) { +this.err (); +return 0; +}switch (row) { +case 0: +return this.m03; +case 1: +return this.m13; +case 2: +return this.m23; +default: +switch (col) { +case 0: +return this.m30; +case 1: +return this.m31; +case 2: +return this.m32; +default: +return this.m33; +} +} +}, "~N,~N"); +Clazz_defineMethod (c$, "getTranslation", +function (trans) { +trans.x = this.m03; +trans.y = this.m13; +trans.z = this.m23; +}, "JU.T3"); +Clazz_defineMethod (c$, "getRotationScale", +function (m1) { +m1.m00 = this.m00; +m1.m01 = this.m01; +m1.m02 = this.m02; +m1.m10 = this.m10; +m1.m11 = this.m11; +m1.m12 = this.m12; +m1.m20 = this.m20; +m1.m21 = this.m21; +m1.m22 = this.m22; +}, "JU.M3"); +Clazz_defineMethod (c$, "setRotationScale", +function (m1) { +this.m00 = m1.m00; +this.m01 = m1.m01; +this.m02 = m1.m02; +this.m10 = m1.m10; +this.m11 = m1.m11; +this.m12 = m1.m12; +this.m20 = m1.m20; +this.m21 = m1.m21; +this.m22 = m1.m22; +}, "JU.M3"); +Clazz_defineMethod (c$, "setRowA", +function (row, v) { +if (row < 3) this.setRow33 (row, v); +switch (row) { +case 0: +this.m03 = v[3]; +return; +case 1: +this.m13 = v[3]; +return; +case 2: +this.m23 = v[3]; +return; +case 3: +this.m30 = v[0]; +this.m31 = v[1]; +this.m32 = v[2]; +this.m33 = v[3]; +return; +} +this.err (); +}, "~N,~A"); +Clazz_overrideMethod (c$, "getRow", +function (row, v) { +if (row < 3) this.getRow33 (row, v); +switch (row) { +case 0: +v[3] = this.m03; +return; +case 1: +v[3] = this.m13; +return; +case 2: +v[3] = this.m23; +return; +case 3: +v[0] = this.m30; +v[1] = this.m31; +v[2] = this.m32; +v[3] = this.m33; +return; +} +this.err (); +}, "~N,~A"); +Clazz_defineMethod (c$, "setColumn4", +function (column, x, y, z, w) { +if (column == 0) { +this.m00 = x; +this.m10 = y; +this.m20 = z; +this.m30 = w; +} else if (column == 1) { +this.m01 = x; +this.m11 = y; +this.m21 = z; +this.m31 = w; +} else if (column == 2) { +this.m02 = x; +this.m12 = y; +this.m22 = z; +this.m32 = w; +} else if (column == 3) { +this.m03 = x; +this.m13 = y; +this.m23 = z; +this.m33 = w; +} else { +this.err (); +}}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setColumnA", +function (column, v) { +if (column < 3) this.setColumn33 (column, v); +switch (column) { +case 0: +this.m30 = v[3]; +return; +case 1: +this.m31 = v[3]; +return; +case 2: +this.m32 = v[3]; +return; +case 3: +this.m03 = v[0]; +this.m13 = v[1]; +this.m23 = v[2]; +this.m33 = v[3]; +return; +default: +this.err (); +} +}, "~N,~A"); +Clazz_defineMethod (c$, "getColumn", +function (column, v) { +if (column < 3) this.getColumn33 (column, v); +switch (column) { +case 0: +v[3] = this.m30; +return; +case 1: +v[3] = this.m31; +return; +case 2: +v[3] = this.m32; +return; +case 3: +v[0] = this.m03; +v[1] = this.m13; +v[2] = this.m23; +v[3] = this.m33; +return; +default: +this.err (); +} +}, "~N,~A"); +Clazz_defineMethod (c$, "sub", +function (m1) { +this.sub33 (m1); +this.m03 -= m1.m03; +this.m13 -= m1.m13; +this.m23 -= m1.m23; +this.m30 -= m1.m30; +this.m31 -= m1.m31; +this.m32 -= m1.m32; +this.m33 -= m1.m33; +}, "JU.M4"); +Clazz_defineMethod (c$, "transpose", +function () { +this.transpose33 (); +var tmp = this.m03; +this.m03 = this.m30; +this.m30 = tmp; +tmp = this.m13; +this.m13 = this.m31; +this.m31 = tmp; +tmp = this.m23; +this.m23 = this.m32; +this.m32 = tmp; +}); +Clazz_defineMethod (c$, "invert", +function () { +var s = this.determinant4 (); +if (s == 0.0) return this; +s = 1 / s; +this.set (this.m11 * (this.m22 * this.m33 - this.m23 * this.m32) + this.m12 * (this.m23 * this.m31 - this.m21 * this.m33) + this.m13 * (this.m21 * this.m32 - this.m22 * this.m31), this.m21 * (this.m02 * this.m33 - this.m03 * this.m32) + this.m22 * (this.m03 * this.m31 - this.m01 * this.m33) + this.m23 * (this.m01 * this.m32 - this.m02 * this.m31), this.m31 * (this.m02 * this.m13 - this.m03 * this.m12) + this.m32 * (this.m03 * this.m11 - this.m01 * this.m13) + this.m33 * (this.m01 * this.m12 - this.m02 * this.m11), this.m01 * (this.m13 * this.m22 - this.m12 * this.m23) + this.m02 * (this.m11 * this.m23 - this.m13 * this.m21) + this.m03 * (this.m12 * this.m21 - this.m11 * this.m22), this.m12 * (this.m20 * this.m33 - this.m23 * this.m30) + this.m13 * (this.m22 * this.m30 - this.m20 * this.m32) + this.m10 * (this.m23 * this.m32 - this.m22 * this.m33), this.m22 * (this.m00 * this.m33 - this.m03 * this.m30) + this.m23 * (this.m02 * this.m30 - this.m00 * this.m32) + this.m20 * (this.m03 * this.m32 - this.m02 * this.m33), this.m32 * (this.m00 * this.m13 - this.m03 * this.m10) + this.m33 * (this.m02 * this.m10 - this.m00 * this.m12) + this.m30 * (this.m03 * this.m12 - this.m02 * this.m13), this.m02 * (this.m13 * this.m20 - this.m10 * this.m23) + this.m03 * (this.m10 * this.m22 - this.m12 * this.m20) + this.m00 * (this.m12 * this.m23 - this.m13 * this.m22), this.m13 * (this.m20 * this.m31 - this.m21 * this.m30) + this.m10 * (this.m21 * this.m33 - this.m23 * this.m31) + this.m11 * (this.m23 * this.m30 - this.m20 * this.m33), this.m23 * (this.m00 * this.m31 - this.m01 * this.m30) + this.m20 * (this.m01 * this.m33 - this.m03 * this.m31) + this.m21 * (this.m03 * this.m30 - this.m00 * this.m33), this.m33 * (this.m00 * this.m11 - this.m01 * this.m10) + this.m30 * (this.m01 * this.m13 - this.m03 * this.m11) + this.m31 * (this.m03 * this.m10 - this.m00 * this.m13), this.m03 * (this.m11 * this.m20 - this.m10 * this.m21) + this.m00 * (this.m13 * this.m21 - this.m11 * this.m23) + this.m01 * (this.m10 * this.m23 - this.m13 * this.m20), this.m10 * (this.m22 * this.m31 - this.m21 * this.m32) + this.m11 * (this.m20 * this.m32 - this.m22 * this.m30) + this.m12 * (this.m21 * this.m30 - this.m20 * this.m31), this.m20 * (this.m02 * this.m31 - this.m01 * this.m32) + this.m21 * (this.m00 * this.m32 - this.m02 * this.m30) + this.m22 * (this.m01 * this.m30 - this.m00 * this.m31), this.m30 * (this.m02 * this.m11 - this.m01 * this.m12) + this.m31 * (this.m00 * this.m12 - this.m02 * this.m10) + this.m32 * (this.m01 * this.m10 - this.m00 * this.m11), this.m00 * (this.m11 * this.m22 - this.m12 * this.m21) + this.m01 * (this.m12 * this.m20 - this.m10 * this.m22) + this.m02 * (this.m10 * this.m21 - this.m11 * this.m20)); +this.scale (s); +return this; +}); +Clazz_defineMethod (c$, "set", + function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { +this.m00 = m00; +this.m01 = m01; +this.m02 = m02; +this.m03 = m03; +this.m10 = m10; +this.m11 = m11; +this.m12 = m12; +this.m13 = m13; +this.m20 = m20; +this.m21 = m21; +this.m22 = m22; +this.m23 = m23; +this.m30 = m30; +this.m31 = m31; +this.m32 = m32; +this.m33 = m33; +}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "determinant4", +function () { +return (this.m00 * this.m11 - this.m01 * this.m10) * (this.m22 * this.m33 - this.m23 * this.m32) - (this.m00 * this.m12 - this.m02 * this.m10) * (this.m21 * this.m33 - this.m23 * this.m31) + (this.m00 * this.m13 - this.m03 * this.m10) * (this.m21 * this.m32 - this.m22 * this.m31) + (this.m01 * this.m12 - this.m02 * this.m11) * (this.m20 * this.m33 - this.m23 * this.m30) - (this.m01 * this.m13 - this.m03 * this.m11) * (this.m20 * this.m32 - this.m22 * this.m30) + (this.m02 * this.m13 - this.m03 * this.m12) * (this.m20 * this.m31 - this.m21 * this.m30); +}); +Clazz_defineMethod (c$, "scale", + function (scalar) { +this.mul33 (scalar); +this.m03 *= scalar; +this.m13 *= scalar; +this.m23 *= scalar; +this.m30 *= scalar; +this.m31 *= scalar; +this.m32 *= scalar; +this.m33 *= scalar; +}, "~N"); +Clazz_defineMethod (c$, "mul", +function (m1) { +this.mul2 (this, m1); +}, "JU.M4"); +Clazz_defineMethod (c$, "mul2", +function (m1, m2) { +this.set (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20 + m1.m03 * m2.m30, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21 + m1.m03 * m2.m31, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22 + m1.m03 * m2.m32, m1.m00 * m2.m03 + m1.m01 * m2.m13 + m1.m02 * m2.m23 + m1.m03 * m2.m33, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20 + m1.m13 * m2.m30, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21 + m1.m13 * m2.m31, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22 + m1.m13 * m2.m32, m1.m10 * m2.m03 + m1.m11 * m2.m13 + m1.m12 * m2.m23 + m1.m13 * m2.m33, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20 + m1.m23 * m2.m30, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21 + m1.m23 * m2.m31, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22 + m1.m23 * m2.m32, m1.m20 * m2.m03 + m1.m21 * m2.m13 + m1.m22 * m2.m23 + m1.m23 * m2.m33, m1.m30 * m2.m00 + m1.m31 * m2.m10 + m1.m32 * m2.m20 + m1.m33 * m2.m30, m1.m30 * m2.m01 + m1.m31 * m2.m11 + m1.m32 * m2.m21 + m1.m33 * m2.m31, m1.m30 * m2.m02 + m1.m31 * m2.m12 + m1.m32 * m2.m22 + m1.m33 * m2.m32, m1.m30 * m2.m03 + m1.m31 * m2.m13 + m1.m32 * m2.m23 + m1.m33 * m2.m33); +}, "JU.M4,JU.M4"); +Clazz_defineMethod (c$, "transform", +function (vec) { +this.transform2 (vec, vec); +}, "JU.T4"); +Clazz_defineMethod (c$, "transform2", +function (vec, vecOut) { +vecOut.set4 (this.m00 * vec.x + this.m01 * vec.y + this.m02 * vec.z + this.m03 * vec.w, this.m10 * vec.x + this.m11 * vec.y + this.m12 * vec.z + this.m13 * vec.w, this.m20 * vec.x + this.m21 * vec.y + this.m22 * vec.z + this.m23 * vec.w, this.m30 * vec.x + this.m31 * vec.y + this.m32 * vec.z + this.m33 * vec.w); +}, "JU.T4,JU.T4"); +Clazz_defineMethod (c$, "rotTrans", +function (point) { +this.rotTrans2 (point, point); +}, "JU.T3"); +Clazz_defineMethod (c$, "rotTrans2", +function (point, pointOut) { +pointOut.set (this.m00 * point.x + this.m01 * point.y + this.m02 * point.z + this.m03, this.m10 * point.x + this.m11 * point.y + this.m12 * point.z + this.m13, this.m20 * point.x + this.m21 * point.y + this.m22 * point.z + this.m23); +return pointOut; +}, "JU.T3,JU.T3"); +Clazz_defineMethod (c$, "setAsXYRotation", +function (angle) { +this.setIdentity (); +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m22 = c; +this.m23 = -s; +this.m32 = s; +this.m33 = c; +return this; +}, "~N"); +Clazz_defineMethod (c$, "setAsYZRotation", +function (angle) { +this.setIdentity (); +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m00 = c; +this.m03 = -s; +this.m30 = s; +this.m33 = c; +return this; +}, "~N"); +Clazz_defineMethod (c$, "setAsXZRotation", +function (angle) { +this.setIdentity (); +var c = Math.cos (angle); +var s = Math.sin (angle); +this.m11 = c; +this.m13 = -s; +this.m31 = s; +this.m33 = c; +return this; +}, "~N"); +Clazz_overrideMethod (c$, "equals", +function (o) { +if (!(Clazz_instanceOf (o, JU.M4))) return false; +var m = o; +return (this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m03 == m.m03 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m13 == m.m13 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22 && this.m23 == m.m23 && this.m30 == m.m30 && this.m31 == m.m31 && this.m32 == m.m32 && this.m33 == m.m33); +}, "~O"); +Clazz_overrideMethod (c$, "hashCode", +function () { +return JU.T3.floatToIntBits0 (this.m00) ^ JU.T3.floatToIntBits0 (this.m01) ^ JU.T3.floatToIntBits0 (this.m02) ^ JU.T3.floatToIntBits0 (this.m03) ^ JU.T3.floatToIntBits0 (this.m10) ^ JU.T3.floatToIntBits0 (this.m11) ^ JU.T3.floatToIntBits0 (this.m12) ^ JU.T3.floatToIntBits0 (this.m13) ^ JU.T3.floatToIntBits0 (this.m20) ^ JU.T3.floatToIntBits0 (this.m21) ^ JU.T3.floatToIntBits0 (this.m22) ^ JU.T3.floatToIntBits0 (this.m23) ^ JU.T3.floatToIntBits0 (this.m30) ^ JU.T3.floatToIntBits0 (this.m31) ^ JU.T3.floatToIntBits0 (this.m32) ^ JU.T3.floatToIntBits0 (this.m33); +}); +Clazz_overrideMethod (c$, "toString", +function () { +return "[\n [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "\t" + this.m03 + "]" + "\n [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "\t" + this.m13 + "]" + "\n [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "\t" + this.m23 + "]" + "\n [" + this.m30 + "\t" + this.m31 + "\t" + this.m32 + "\t" + this.m33 + "] ]"; +}); +}); +Clazz_declarePackage ("JU"); +Clazz_load (["javajs.api.JSONEncodable"], "JU.T3", ["java.lang.Float"], function () { +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.z = 0; +Clazz_instantialize (this, arguments); +}, JU, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]); +Clazz_defineMethod (c$, "set", +function (x, y, z) { +this.x = x; +this.y = y; +this.z = z; +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "setA", +function (t) { +this.x = t[0]; +this.y = t[1]; +this.z = t[2]; +}, "~A"); +Clazz_defineMethod (c$, "setT", +function (t1) { +this.x = t1.x; +this.y = t1.y; +this.z = t1.z; +}, "JU.T3"); +Clazz_defineMethod (c$, "add2", +function (t1, t2) { +this.x = t1.x + t2.x; +this.y = t1.y + t2.y; +this.z = t1.z + t2.z; +}, "JU.T3,JU.T3"); +Clazz_defineMethod (c$, "add", +function (t1) { +this.x += t1.x; +this.y += t1.y; +this.z += t1.z; +}, "JU.T3"); +Clazz_defineMethod (c$, "distanceSquared", +function (p1) { +var dx = this.x - p1.x; +var dy = this.y - p1.y; +var dz = this.z - p1.z; +return (dx * dx + dy * dy + dz * dz); +}, "JU.T3"); +Clazz_defineMethod (c$, "distance", +function (p1) { +return Math.sqrt (this.distanceSquared (p1)); +}, "JU.T3"); +Clazz_defineMethod (c$, "sub2", +function (t1, t2) { +this.x = t1.x - t2.x; +this.y = t1.y - t2.y; +this.z = t1.z - t2.z; +}, "JU.T3,JU.T3"); +Clazz_defineMethod (c$, "sub", +function (t1) { +this.x -= t1.x; +this.y -= t1.y; +this.z -= t1.z; +}, "JU.T3"); +Clazz_defineMethod (c$, "scale", +function (s) { +this.x *= s; +this.y *= s; +this.z *= s; +}, "~N"); +Clazz_defineMethod (c$, "add3", +function (a, b, c) { +this.x += a; +this.y += b; +this.z += c; +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "scaleT", +function (p) { +this.x *= p.x; +this.y *= p.y; +this.z *= p.z; +}, "JU.T3"); +Clazz_defineMethod (c$, "scaleAdd2", +function (s, t1, t2) { +this.x = s * t1.x + t2.x; +this.y = s * t1.y + t2.y; +this.z = s * t1.z + t2.z; +}, "~N,JU.T3,JU.T3"); +Clazz_defineMethod (c$, "ave", +function (a, b) { +this.x = (a.x + b.x) / 2; +this.y = (a.y + b.y) / 2; +this.z = (a.z + b.z) / 2; +}, "JU.T3,JU.T3"); +Clazz_defineMethod (c$, "dot", +function (v) { +return this.x * v.x + this.y * v.y + this.z * v.z; +}, "JU.T3"); +Clazz_defineMethod (c$, "lengthSquared", +function () { +return this.x * this.x + this.y * this.y + this.z * this.z; +}); +Clazz_defineMethod (c$, "length", +function () { +return Math.sqrt (this.lengthSquared ()); +}); +Clazz_defineMethod (c$, "normalize", +function () { +var d = this.length (); +this.x /= d; +this.y /= d; +this.z /= d; +}); +Clazz_defineMethod (c$, "cross", +function (v1, v2) { +this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); +}, "JU.T3,JU.T3"); +Clazz_overrideMethod (c$, "hashCode", +function () { +var bits = 1; +bits = 31 * bits + JU.T3.floatToIntBits0 (this.x); +bits = 31 * bits + JU.T3.floatToIntBits0 (this.y); +bits = 31 * bits + JU.T3.floatToIntBits0 (this.z); +return (bits ^ (bits >> 32)); +}); +c$.floatToIntBits0 = Clazz_defineMethod (c$, "floatToIntBits0", +function (f) { +return (f == 0 ? 0 : Float.floatToIntBits (f)); +}, "~N"); +Clazz_overrideMethod (c$, "equals", +function (t1) { +if (!(Clazz_instanceOf (t1, JU.T3))) return false; +var t2 = t1; +return (this.x == t2.x && this.y == t2.y && this.z == t2.z); +}, "~O"); +Clazz_overrideMethod (c$, "toString", +function () { +return "{" + this.x + ", " + this.y + ", " + this.z + "}"; +}); +Clazz_overrideMethod (c$, "toJSON", +function () { +return "[" + this.x + "," + this.y + "," + this.z + "]"; +}); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.LayoutManager2", "javax.swing.AbstractAction", "$.JComponent"], "javax.swing.JRootPane", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.BorderLayout", "$.Dimension", "$.IllegalComponentStateException", "javax.swing.JLayeredPane", "$.JPanel", "$.SwingUtilities", "$.UIManager", "jssun.awt.AppContext"], function () { +c$ = Clazz_decorateAsClass (function () { +this.windowDecorationStyle = 0; +this.menuBar = null; +this.contentPane = null; +this.layeredPane = null; +this.glassPane = null; +this.defaultButton = null; +this.defaultPressAction = null; +this.defaultReleaseAction = null; +this.useTrueDoubleBuffering = true; +if (!Clazz_isClassDefined ("javax.swing.JRootPane.RootLayout")) { +javax.swing.JRootPane.$JRootPane$RootLayout$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "JRootPane", javax.swing.JComponent); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JRootPane, []); +var appletName = jssun.awt.AppContext.getAppContext ().getThreadGroup ().getName (); +this.setName (appletName + ".JRootPane"); +this.setGlassPane (this.createGlassPane ()); +this.setLayeredPane (this.createLayeredPane ()); +this.setContentPane (this.createContentPane ()); +this.setLayout (this.createRootLayout ()); +this.updateUI (); +}); +Clazz_overrideMethod (c$, "setDoubleBuffered", +function (aFlag) { +}, "~B"); +Clazz_defineMethod (c$, "getWindowDecorationStyle", +function () { +return this.windowDecorationStyle; +}); +Clazz_defineMethod (c$, "setWindowDecorationStyle", +function (windowDecorationStyle) { +if (windowDecorationStyle < 0 || windowDecorationStyle > 8) { +throw new IllegalArgumentException ("Invalid decoration style"); +}var oldWindowDecorationStyle = this.getWindowDecorationStyle (); +this.windowDecorationStyle = windowDecorationStyle; +this.firePropertyChangeInt ("windowDecorationStyle", oldWindowDecorationStyle, windowDecorationStyle); +}, "~N"); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "RootPaneUI"; +}); +Clazz_defineMethod (c$, "createLayeredPane", +function () { +var p = new javax.swing.JLayeredPane (); +p.setName (this.getName () + ".layeredPane"); +return p; +}); +Clazz_defineMethod (c$, "createContentPane", +function () { +var c = new javax.swing.JPanel (); +c.setName (this.getName () + ".contentPane"); +c.setLayout (((Clazz_isClassDefined ("javax.swing.JRootPane$1") ? 0 : javax.swing.JRootPane.$JRootPane$1$ ()), Clazz_innerTypeInstance (javax.swing.JRootPane$1, this, null))); +return c; +}); +Clazz_defineMethod (c$, "createGlassPane", +function () { +var c = new javax.swing.JPanel (); +c.setName (this.getName () + ".glassPane"); +c.setVisible (false); +(c).setOpaque (false); +return c; +}); +Clazz_defineMethod (c$, "createRootLayout", +function () { +return Clazz_innerTypeInstance (javax.swing.JRootPane.RootLayout, this, null); +}); +Clazz_defineMethod (c$, "setJMenuBar", +function (menu) { +if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar); +this.menuBar = menu; +if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER); +}, "javax.swing.JMenuBar"); +Clazz_defineMethod (c$, "setMenuBar", +function (menu) { +if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar); +this.menuBar = menu; +if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER); +}, "javax.swing.JMenuBar"); +Clazz_defineMethod (c$, "getJMenuBar", +function () { +return this.menuBar; +}); +Clazz_defineMethod (c$, "getMenuBar", +function () { +return this.menuBar; +}); +Clazz_defineMethod (c$, "setContentPane", +function (content) { +if (content == null) throw new java.awt.IllegalComponentStateException ("contentPane cannot be set to null."); +if (this.contentPane != null && this.contentPane.getParent () === this.layeredPane) this.layeredPane.remove (this.contentPane); +this.contentPane = content; +this.layeredPane.add (this.contentPane, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER); +}, "java.awt.Container"); +Clazz_defineMethod (c$, "getContentPane", +function () { +return this.contentPane; +}); +Clazz_defineMethod (c$, "setLayeredPane", +function (layered) { +if (layered == null) throw new java.awt.IllegalComponentStateException ("layeredPane cannot be set to null."); +if (this.layeredPane != null && this.layeredPane.getParent () === this) this.remove (this.layeredPane); +this.layeredPane = layered; +this.add (this.layeredPane, -1); +}, "javax.swing.JLayeredPane"); +Clazz_defineMethod (c$, "getLayeredPane", +function () { +return this.layeredPane; +}); +Clazz_defineMethod (c$, "setGlassPane", +function (glass) { +if (glass == null) { +throw new NullPointerException ("glassPane cannot be set to null."); +}var visible = false; +if (this.glassPane != null && this.glassPane.getParent () === this) { +this.remove (this.glassPane); +visible = this.glassPane.isVisible (); +}glass.setVisible (visible); +this.glassPane = glass; +this.add (this.glassPane, 0); +if (visible) { +this.repaint (); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "getGlassPane", +function () { +return this.glassPane; +}); +Clazz_overrideMethod (c$, "isValidateRoot", +function () { +return true; +}); +Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", +function () { +return !this.glassPane.isVisible (); +}); +Clazz_defineMethod (c$, "addNotify", +function () { +Clazz_superCall (this, javax.swing.JRootPane, "addNotify", []); +this.enableEvents (8); +}); +Clazz_defineMethod (c$, "setDefaultButton", +function (defaultButton) { +var oldDefault = this.defaultButton; +if (oldDefault !== defaultButton) { +this.defaultButton = defaultButton; +if (oldDefault != null) { +oldDefault.repaint (); +}if (defaultButton != null) { +defaultButton.repaint (); +}}this.firePropertyChangeObject ("defaultButton", oldDefault, defaultButton); +}, "javax.swing.JButton"); +Clazz_defineMethod (c$, "getDefaultButton", +function () { +return this.defaultButton; +}); +Clazz_defineMethod (c$, "setUseTrueDoubleBuffering", +function (useTrueDoubleBuffering) { +this.useTrueDoubleBuffering = useTrueDoubleBuffering; +}, "~B"); +Clazz_defineMethod (c$, "getUseTrueDoubleBuffering", +function () { +return this.useTrueDoubleBuffering; +}); +Clazz_defineMethod (c$, "disableTrueDoubleBuffering", +function () { +}); +Clazz_overrideMethod (c$, "addImpl", +function (comp, constraints, index) { +this.addImplSAEM (comp, constraints, index); +if (this.glassPane != null && this.glassPane.getParent () === this && this.getComponent (0) !== this.glassPane) { +this.add (this.glassPane, 0); +}return comp; +}, "java.awt.Component,~O,~N"); +c$.$JRootPane$RootLayout$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +Clazz_instantialize (this, arguments); +}, javax.swing.JRootPane, "RootLayout", null, java.awt.LayoutManager2); +Clazz_overrideMethod (c$, "preferredLayoutSize", +function (a) { +var b; +var c; +var d = this.b$["javax.swing.JRootPane"].getInsets (); +if (this.b$["javax.swing.JRootPane"].contentPane != null) { +b = this.b$["javax.swing.JRootPane"].contentPane.getPreferredSize (); +} else { +b = a.getSize (); +}if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { +c = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize (); +} else { +c = new java.awt.Dimension (0, 0); +}return new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "minimumLayoutSize", +function (a) { +var b; +var c; +var d = this.b$["javax.swing.JRootPane"].getInsets (); +if (this.b$["javax.swing.JRootPane"].contentPane != null) { +b = this.b$["javax.swing.JRootPane"].contentPane.getMinimumSize (); +} else { +b = a.getSize (); +}if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { +c = this.b$["javax.swing.JRootPane"].menuBar.getMinimumSize (); +} else { +c = new java.awt.Dimension (0, 0); +}return new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "maximumLayoutSize", +function (a) { +var b; +var c; +var d = this.b$["javax.swing.JRootPane"].getInsets (); +if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { +c = this.b$["javax.swing.JRootPane"].menuBar.getMaximumSize (); +} else { +c = new java.awt.Dimension (0, 0); +}if (this.b$["javax.swing.JRootPane"].contentPane != null) { +b = this.b$["javax.swing.JRootPane"].contentPane.getMaximumSize (); +} else { +b = new java.awt.Dimension (2147483647, 2147483647 - d.top - d.bottom - c.height - 1); +}return new java.awt.Dimension (Math.min (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "layoutContainer", +function (a) { +var b = a.getBounds (); +var c = this.b$["javax.swing.JRootPane"].getInsets (); +var d = 0; +var e = b.width - c.right - c.left; +var f = b.height - c.top - c.bottom; +if (this.b$["javax.swing.JRootPane"].layeredPane != null) { +this.b$["javax.swing.JRootPane"].layeredPane.setBounds (c.left, c.top, e, f); +}if (this.b$["javax.swing.JRootPane"].glassPane != null) { +this.b$["javax.swing.JRootPane"].glassPane.setBounds (c.left, c.top, e, f); +}if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { +var g = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize (); +this.b$["javax.swing.JRootPane"].menuBar.setBounds (0, 0, e, g.height); +d += g.height; +}if (this.b$["javax.swing.JRootPane"].contentPane != null) { +this.b$["javax.swing.JRootPane"].contentPane.setBounds (0, d, e, f - d); +}}, "java.awt.Container"); +Clazz_defineMethod (c$, "addLayoutComponent", +function (a, b) { +}, "~S,java.awt.Component"); +Clazz_overrideMethod (c$, "removeLayoutComponent", +function (a) { +}, "java.awt.Component"); +Clazz_defineMethod (c$, "addLayoutComponent", +function (a, b) { +}, "java.awt.Component,~O"); +Clazz_overrideMethod (c$, "getLayoutAlignmentX", +function (a) { +return 0.0; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayoutAlignmentY", +function (a) { +return 0.0; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "invalidateLayout", +function (a) { +}, "java.awt.Container"); +c$ = Clazz_p0p (); +}; +c$.$JRootPane$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (javax.swing, "JRootPane$1", java.awt.BorderLayout); +Clazz_defineMethod (c$, "addLayoutComponent", +function (comp, constraints) { +if (constraints == null) { +constraints = "Center"; +}Clazz_superCall (this, javax.swing.JRootPane$1, "addLayoutComponent", [comp, constraints]); +}, "java.awt.Component,~O"); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.owner = null; +this.root = null; +this.press = false; +Clazz_instantialize (this, arguments); +}, javax.swing.JRootPane, "DefaultAction", javax.swing.AbstractAction); +Clazz_makeConstructor (c$, +function (a, b) { +Clazz_superConstructor (this, javax.swing.JRootPane.DefaultAction, []); +this.root = a; +this.press = b; +}, "javax.swing.JRootPane,~B"); +Clazz_defineMethod (c$, "setOwner", +function (a) { +this.owner = a; +}, "javax.swing.JButton"); +Clazz_overrideMethod (c$, "actionPerformed", +function (a) { +if (this.owner != null && javax.swing.SwingUtilities.getRootPane (this.owner) === this.root) { +var b = this.owner.getModel (); +if (this.press) { +b.setArmed (true); +b.setPressed (true); +} else { +b.setPressed (false); +}}}, "java.awt.event.ActionEvent"); +Clazz_overrideMethod (c$, "isEnabled", +function () { +return this.owner.getModel ().isEnabled (); +}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"$uiClassID", "RootPaneUI", +"NONE", 0, +"FRAME", 1, +"PLAIN_DIALOG", 2, +"INFORMATION_DIALOG", 3, +"ERROR_DIALOG", 4, +"COLOR_CHOOSER_DIALOG", 5, +"FILE_CHOOSER_DIALOG", 6, +"QUESTION_DIALOG", 7, +"WARNING_DIALOG", 8); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.AbstractButton", "$.DefaultButtonModel"], "javax.swing.JToggleButton", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.InputEvent", "$.ItemEvent", "javax.swing.UIManager"], function () { +c$ = Clazz_declareType (javax.swing, "JToggleButton", javax.swing.AbstractButton); +Clazz_makeConstructor (c$, +function () { +this.construct (null, null, false); +}); +Clazz_makeConstructor (c$, +function (icon) { +this.construct (null, icon, false); +}, "javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (icon, selected) { +this.construct (null, icon, selected); +}, "javax.swing.Icon,~B"); +Clazz_makeConstructor (c$, +function (text) { +this.construct (text, null, false); +}, "~S"); +Clazz_makeConstructor (c$, +function (text, selected) { +this.construct (text, null, selected); +}, "~S,~B"); +Clazz_makeConstructor (c$, +function (a) { +this.construct (); +this.setAction (a); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function (text, icon) { +this.construct (text, icon, false); +}, "~S,javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text, icon, selected) { +Clazz_superConstructor (this, javax.swing.JToggleButton, []); +this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ()); +this.model.setSelected (selected); +this.init (text, icon); +}, "~S,javax.swing.Icon,~B"); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "ToggleButtonUI"; +}); +Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", +function () { +return true; +}); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.JToggleButton, "ToggleButtonModel", javax.swing.DefaultButtonModel); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JToggleButton.ToggleButtonModel, []); +}); +Clazz_overrideMethod (c$, "isSelected", +function () { +return (this.stateMask & 2) != 0; +}); +Clazz_overrideMethod (c$, "setSelected", +function (a) { +var b = this.getGroup (); +if (b != null) { +b.setSelected (this, a); +a = b.isSelected (this); +}if (this.isSelected () == a) { +return; +}if (a) { +this.stateMask |= 2; +} else { +this.stateMask &= -3; +}this.fireStateChanged (); +this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, this.isSelected () ? 1 : 2)); +}, "~B"); +Clazz_overrideMethod (c$, "setPressed", +function (a) { +if ((this.isPressed () == a) || !this.isEnabled ()) { +return; +}if (a == false && this.isArmed ()) { +this.setSelected (!this.isSelected ()); +}if (a) { +this.stateMask |= 4; +} else { +this.stateMask &= -5; +}this.fireStateChanged (); +if (!this.isPressed () && this.isArmed ()) { +var b = 0; +var c = java.awt.EventQueue.getCurrentEvent (); +if (Clazz_instanceOf (c, java.awt.event.InputEvent)) { +b = (c).getModifiers (); +} else if (Clazz_instanceOf (c, java.awt.event.ActionEvent)) { +b = (c).getModifiers (); +}this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), b)); +}}, "~B"); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"$uiClassID", "ToggleButtonUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.ItemSelectable"], "javax.swing.ButtonModel", null, function () { +Clazz_declareInterface (javax.swing, "ButtonModel", java.awt.ItemSelectable); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JRadioButton", ["javax.swing.UIManager"], function () { +c$ = Clazz_declareType (javax.swing, "JRadioButton", javax.swing.JToggleButton); +Clazz_makeConstructor (c$, +function () { +this.construct (null, null, false); +}); +Clazz_makeConstructor (c$, +function (icon) { +this.construct (null, icon, false); +}, "javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (a) { +this.construct (); +this.setAction (a); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function (icon, selected) { +this.construct (null, icon, selected); +}, "javax.swing.Icon,~B"); +Clazz_makeConstructor (c$, +function (text) { +this.construct (text, null, false); +}, "~S"); +Clazz_makeConstructor (c$, +function (text, selected) { +this.construct (text, null, selected); +}, "~S,~B"); +Clazz_makeConstructor (c$, +function (text, icon) { +this.construct (text, icon, false); +}, "~S,javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text, icon, selected) { +Clazz_superConstructor (this, javax.swing.JRadioButton, [text, icon, selected]); +this.setBorderPainted (false); +this.setHorizontalAlignment (10); +}, "~S,javax.swing.Icon,~B"); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "RadioButtonUI"; +}); +Clazz_overrideMethod (c$, "setIconFromAction", +function (a) { +}, "javax.swing.Action"); +Clazz_defineStatics (c$, +"$$uiClassID", "RadioButtonUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.applet.Applet", "javax.swing.RootPaneContainer"], "javax.swing.JApplet", ["java.awt.BorderLayout", "$.Color", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () { +c$ = Clazz_decorateAsClass (function () { +this.rootPane = null; +this.rootPaneCheckingEnabled = false; +this.transferHandler = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JApplet", java.applet.Applet, javax.swing.RootPaneContainer); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JApplet, []); +this.setJApplet (); +}); +Clazz_defineMethod (c$, "setJApplet", + function () { +this.setPanel (); +this.setForeground (java.awt.Color.black); +this.setBackground (java.awt.Color.white); +this.setLocale (javax.swing.JComponent.getDefaultLocale ()); +this.setLayout ( new java.awt.BorderLayout ()); +this.setRootPane (this.createRootPane ()); +this.setRootPaneCheckingEnabled (true); +this.setFocusTraversalPolicyProvider (true); +this.enableEvents (8); +}); +Clazz_defineMethod (c$, "createRootPane", +function () { +var rp = new javax.swing.JRootPane (); +rp.setOpaque (true); +return rp; +}); +Clazz_defineMethod (c$, "setTransferHandler", +function (newHandler) { +var oldHandler = this.transferHandler; +this.transferHandler = newHandler; +javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); +this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); +}, "javax.swing.TransferHandler"); +Clazz_defineMethod (c$, "getTransferHandler", +function () { +return this.transferHandler; +}); +Clazz_defineMethod (c$, "paint", +function (g) { +this.getContentPane ().paint (g); +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "setJMenuBar", +function (menuBar) { +this.getRootPane ().setMenuBar (menuBar); +}, "javax.swing.JMenuBar"); +Clazz_defineMethod (c$, "getJMenuBar", +function () { +return this.getRootPane ().getMenuBar (); +}); +Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", +function () { +return this.rootPaneCheckingEnabled; +}); +Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", +function (enabled) { +this.rootPaneCheckingEnabled = enabled; +}, "~B"); +Clazz_overrideMethod (c$, "addImpl", +function (comp, constraints, index) { +if (this.isRootPaneCheckingEnabled ()) { +return this.getContentPane ().add (comp, constraints, index); +}return this.addImplSAEM (comp, constraints, index); +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "remove", +function (comp) { +if (comp === this.rootPane) { +this.removeChild (comp); +} else { +this.getContentPane ().removeChild (comp); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "setLayout", +function (manager) { +if (this.isRootPaneCheckingEnabled ()) { +this.getContentPane ().setLayout (manager); +} else { +Clazz_superCall (this, javax.swing.JApplet, "setLayout", [manager]); +}}, "java.awt.LayoutManager"); +Clazz_overrideMethod (c$, "getRootPane", +function () { +return this.rootPane; +}); +Clazz_defineMethod (c$, "setRootPane", +function (root) { +if (this.rootPane != null) { +this.remove (this.rootPane); +}this.rootPane = root; +if (this.rootPane != null) { +var checkingEnabled = this.isRootPaneCheckingEnabled (); +try { +this.setRootPaneCheckingEnabled (false); +this.add (this.rootPane, "Center"); +} finally { +this.setRootPaneCheckingEnabled (checkingEnabled); +} +}}, "javax.swing.JRootPane"); +Clazz_overrideMethod (c$, "getContentPane", +function () { +return this.getRootPane ().getContentPane (); +}); +Clazz_overrideMethod (c$, "setContentPane", +function (contentPane) { +this.getRootPane ().setContentPane (contentPane); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayeredPane", +function () { +return this.getRootPane ().getLayeredPane (); +}); +Clazz_overrideMethod (c$, "setLayeredPane", +function (layeredPane) { +this.getRootPane ().setLayeredPane (layeredPane); +}, "javax.swing.JLayeredPane"); +Clazz_overrideMethod (c$, "getGlassPane", +function () { +return this.getRootPane ().getGlassPane (); +}); +Clazz_overrideMethod (c$, "setGlassPane", +function (glassPane) { +this.getRootPane ().setGlassPane (glassPane); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getGraphics", +function () { +javax.swing.JComponent.getGraphicsInvoked (this); +return Clazz_superCall (this, javax.swing.JApplet, "getGraphics", []); +}); +Clazz_defineMethod (c$, "repaint", +function (time, x, y, width, height) { +if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { +System.out.println ("repaintNow " + this); +javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); +} else { +Clazz_superCall (this, javax.swing.JApplet, "repaint", [time, x, y, width, height]); +}}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "repaintNow", +function () { +this.repaint (100, 0, 0, this.getWidth (), this.getHeight ()); +}); +Clazz_defineMethod (c$, "paramString", +function () { +var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : ""); +var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); +return Clazz_superCall (this, javax.swing.JApplet, "paramString", []) + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; +}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.lang.Thread"], ["java.awt.EventQueueItem", "$.EventQueue", "$.Queue"], ["java.lang.Error", "java.lang.reflect.InvocationTargetException", "java.util.EmptyStackException", "java.awt.ActiveEvent", "$.Component", "$.EventDispatchThread", "$.SentEvent", "$.SequencedEvent", "$.Toolkit", "java.awt.event.ActionEvent", "$.FocusEvent", "$.InputEvent", "$.InputMethodEvent", "$.InvocationEvent", "$.KeyEvent", "$.MouseEvent", "$.PaintEvent", "$.WindowEvent", "jssun.awt.AWTAutoShutdown", "$.AppContext", "$.PeerEvent", "$.SunToolkit", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.queues = null; +this.nextQueue = null; +this.previousQueue = null; +this.dispatchThread = null; +this.threadGroup = null; +this.mostRecentEventTime = 0; +this.currentEvent = null; +this.waitForID = 0; +this.name = null; +Clazz_instantialize (this, arguments); +}, java.awt, "EventQueue"); +Clazz_prepareFields (c$, function () { +this.queues = new Array (4); +this.threadGroup = Thread.currentThread ().getThreadGroup (); +this.mostRecentEventTime = System.currentTimeMillis (); +this.name = "AWT-EventQueue-" + java.awt.EventQueue.nextThreadNum (); +}); +c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", + function () { +return java.awt.EventQueue.threadInitNumber++; +}); +c$.noEvents = Clazz_defineMethod (c$, "noEvents", +function (eventQueue) { +return eventQueue.noEvents (); +}, "java.awt.EventQueue"); +c$.getNextQueue = Clazz_defineMethod (c$, "getNextQueue", +function (eventQueue) { +return eventQueue.nextQueue; +}, "java.awt.EventQueue"); +c$.removeSourceEvents = Clazz_defineMethod (c$, "removeSourceEvents", +function (eventQueue, source, removeAllEvents) { +eventQueue.removeSourceEvents (source, removeAllEvents); +}, "java.awt.EventQueue,~O,~B"); +Clazz_makeConstructor (c$, +function () { +for (var i = 0; i < 4; i++) { +this.queues[i] = new java.awt.Queue (); +} +}); +Clazz_defineMethod (c$, "postEvent", +function (event) { +jssun.awt.SunToolkit.flushPendingEvents (); +this.postEventPrivate (event); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "postEventPrivate", +function (theEvent) { +theEvent.isPosted = true; +{ +if (this.dispatchThread == null && this.nextQueue == null) { +if (theEvent.getSource () === jssun.awt.AWTAutoShutdown.getInstance ()) { +return; +} else { +this.initDispatchThread (); +}}if (this.nextQueue != null) { +this.nextQueue.postEventPrivate (theEvent); +return; +}this.postEventNow (theEvent, java.awt.EventQueue.getPriority (theEvent)); +}}, "java.awt.AWTEvent"); +c$.getPriority = Clazz_defineMethod (c$, "getPriority", + function (theEvent) { +if (Clazz_instanceOf (theEvent, jssun.awt.PeerEvent)) { +var flags = (theEvent).getFlags (); +if ((flags & 2) != 0) return 3; +if ((flags & 1) != 0) return 2; +if ((flags & 4) != 0) return 0; +}switch (theEvent.getID ()) { +case 1201: +case 800: +case 801: +return 0; +default: +return 1; +} +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "postEventNow", + function (theEvent, priority) { +if (this.coalesceEvent (theEvent, priority)) { +return; +}var newItem = new java.awt.EventQueueItem (theEvent); +this.cacheEQItem (newItem); +if (this.queues[priority].head == null) { +var shouldNotify = this.noEvents (); +this.queues[priority].head = this.queues[priority].tail = newItem; +if (shouldNotify) { +if (theEvent.getSource () !== jssun.awt.AWTAutoShutdown.getInstance ()) { +jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (this.dispatchThread); +}}} else { +this.queues[priority].tail.next = newItem; +this.queues[priority].tail = newItem; +}}, "java.awt.AWTEvent,~N"); +Clazz_defineMethod (c$, "coalescePaintEvent", + function (e) { +var sourcePeer = (e.getSource ()).peer; +if (sourcePeer != null) { +sourcePeer.coalescePaintEvent (e); +}var cache = (e.getSource ()).eventCache; +if (cache == null) { +return false; +}var index = java.awt.EventQueue.eventToCacheIndex (e); +if (index != -1 && cache[index] != null) { +var merged = this.mergePaintEvents (e, cache[index].event); +if (merged != null) { +cache[index].event = merged; +return true; +}}return false; +}, "java.awt.event.PaintEvent"); +Clazz_defineMethod (c$, "mergePaintEvents", + function (a, b) { +var aRect = a.getUpdateRect (); +var bRect = b.getUpdateRect (); +if (bRect.contains (aRect)) { +return b; +}if (aRect.contains (bRect)) { +return a; +}return null; +}, "java.awt.event.PaintEvent,java.awt.event.PaintEvent"); +Clazz_defineMethod (c$, "coalesceMouseEvent", + function (e) { +var cache = (e.getSource ()).eventCache; +if (cache == null) { +return false; +}var index = java.awt.EventQueue.eventToCacheIndex (e); +if (index != -1 && cache[index] != null) { +cache[index].event = e; +return true; +}return false; +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "coalescePeerEvent", + function (e) { +var cache = (e.getSource ()).eventCache; +if (cache == null) { +return false; +}var index = java.awt.EventQueue.eventToCacheIndex (e); +if (index != -1 && cache[index] != null) { +e = e.coalesceEvents (cache[index].event); +if (e != null) { +cache[index].event = e; +return true; +} else { +cache[index] = null; +}}return false; +}, "jssun.awt.PeerEvent"); +Clazz_defineMethod (c$, "coalesceOtherEvent", + function (e, priority) { +var id = e.getID (); +var source = e.getSource (); +for (var entry = this.queues[priority].head; entry != null; entry = entry.next) { +if (entry.event.getSource () === source && entry.id == id) { +var coalescedEvent = source.coalesceEvents (entry.event, e); +if (coalescedEvent != null) { +entry.event = coalescedEvent; +return true; +}}} +return false; +}, "java.awt.AWTEvent,~N"); +Clazz_defineMethod (c$, "coalesceEvent", + function (e, priority) { +if (!(Clazz_instanceOf (e.getSource (), java.awt.Component))) { +return false; +}if (Clazz_instanceOf (e, jssun.awt.PeerEvent)) { +return this.coalescePeerEvent (e); +}if ((e.getSource ()).isCoalescingEnabled () && this.coalesceOtherEvent (e, priority)) { +return true; +}if (Clazz_instanceOf (e, java.awt.event.PaintEvent)) { +return this.coalescePaintEvent (e); +}if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) { +return this.coalesceMouseEvent (e); +}return false; +}, "java.awt.AWTEvent,~N"); +Clazz_defineMethod (c$, "cacheEQItem", + function (entry) { +var index = java.awt.EventQueue.eventToCacheIndex (entry.event); +if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) { +var source = entry.event.getSource (); +if (source.eventCache == null) { +source.eventCache = new Array (5); +}source.eventCache[index] = entry; +}}, "java.awt.EventQueueItem"); +Clazz_defineMethod (c$, "uncacheEQItem", + function (entry) { +var index = java.awt.EventQueue.eventToCacheIndex (entry.event); +if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) { +var source = entry.event.getSource (); +if (source.eventCache == null) { +return; +}source.eventCache[index] = null; +}}, "java.awt.EventQueueItem"); +c$.eventToCacheIndex = Clazz_defineMethod (c$, "eventToCacheIndex", + function (e) { +switch (e.getID ()) { +case 800: +return 0; +case 801: +return 1; +case 503: +return 2; +case 506: +return 3; +default: +return -1; +} +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "noEvents", + function () { +for (var i = 0; i < 4; i++) { +if (this.queues[i].head != null) { +return false; +}} +return true; +}); +Clazz_defineMethod (c$, "getNextEvent", +function () { +jssun.awt.SunToolkit.flushPendingEvents (); +{ +for (var i = 3; i >= 0; i--) { +if (this.queues[i].head != null) { +var entry = this.queues[i].head; +this.queues[i].head = entry.next; +if (entry.next == null) { +this.queues[i].tail = null; +}this.uncacheEQItem (entry); +return entry.event; +}} +jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this.dispatchThread); +}return null; +}); +Clazz_defineMethod (c$, "getNextEventForID", +function (id) { +jssun.awt.SunToolkit.flushPendingEvents (); +{ +for (var i = 0; i < 4; i++) { +for (var entry = this.queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) { +if (entry.id == id) { +if (prev == null) { +this.queues[i].head = entry.next; +} else { +prev.next = entry.next; +}if (this.queues[i].tail === entry) { +this.queues[i].tail = prev; +}this.uncacheEQItem (entry); +return entry.event; +}} +} +this.waitForID = id; +this.waitForID = 0; +}return null; +}, "~N"); +Clazz_defineMethod (c$, "peekEvent", +function () { +for (var i = 3; i >= 0; i--) { +if (this.queues[i].head != null) { +return this.queues[i].head.event; +}} +return null; +}); +Clazz_defineMethod (c$, "peekEvent", +function (id) { +for (var i = 3; i >= 0; i--) { +var q = this.queues[i].head; +for (; q != null; q = q.next) { +if (q.id == id) { +return q.event; +}} +} +return null; +}, "~N"); +Clazz_defineMethod (c$, "dispatchEvent", +function (event) { +var src = event.getSource (); +this.dispatchEventImpl (event, src, false); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "dispatchEventAndWait", +function (event, src) { +this.dispatchEventImpl (event, src, true); +}, "java.awt.AWTEvent,~O"); +Clazz_defineMethod (c$, "dispatchEventImpl", + function (event, src, andWait) { +event.isPosted = true; +if (Clazz_instanceOf (event, java.awt.ActiveEvent)) { +this.setCurrentEventAndMostRecentTimeImpl (event); +swingjs.JSToolkit.dispatchEvent (event, null, andWait); +} else if (Clazz_instanceOf (src, java.awt.Component)) { +swingjs.JSToolkit.dispatchEvent (event, src, andWait); +event.dispatched (); +} else if (Clazz_instanceOf (src, jssun.awt.AWTAutoShutdown)) { +if (this.noEvents ()) { +this.dispatchThread.stopDispatching (); +}} else { +System.err.println ("unable to dispatch event: " + event); +}}, "java.awt.AWTEvent,~O,~B"); +c$.getMostRecentEventTime = Clazz_defineMethod (c$, "getMostRecentEventTime", +function () { +return 0; +}); +Clazz_defineMethod (c$, "getMostRecentEventTimeEx", +function () { +return this.mostRecentEventTime; +}); +c$.getCurrentEvent = Clazz_defineMethod (c$, "getCurrentEvent", +function () { +return java.awt.Toolkit.getEventQueue ().getCurrentEventImpl (); +}); +Clazz_defineMethod (c$, "getCurrentEventImpl", + function () { +return (swingjs.JSToolkit.isDispatchThread () ? (this.currentEvent) : null); +}); +Clazz_defineMethod (c$, "push", +function (newEventQueue) { +if (this.nextQueue != null) { +this.nextQueue.push (newEventQueue); +return; +}{ +while (this.peekEvent () != null) { +try { +newEventQueue.postEventPrivate (this.getNextEvent ()); +} catch (ie) { +if (Clazz_exceptionOf (ie, InterruptedException)) { +} else { +throw ie; +} +} +} +newEventQueue.previousQueue = this; +}if (this.dispatchThread != null) { +this.dispatchThread.stopDispatchingLater (); +}this.nextQueue = newEventQueue; +var appContext = jssun.awt.AppContext.getAppContext (); +if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) { +appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, newEventQueue); +}}, "java.awt.EventQueue"); +Clazz_defineMethod (c$, "pop", +function () { +var prev = this.previousQueue; +{ +{ +if (this.nextQueue != null) { +this.nextQueue.pop (); +return; +}if (this.previousQueue == null) { +throw new java.util.EmptyStackException (); +}this.previousQueue.nextQueue = null; +while (this.peekEvent () != null) { +try { +this.previousQueue.postEventPrivate (this.getNextEvent ()); +} catch (ie) { +if (Clazz_exceptionOf (ie, InterruptedException)) { +} else { +throw ie; +} +} +} +var appContext = jssun.awt.AppContext.getAppContext (); +if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) { +appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, this.previousQueue); +}this.previousQueue = null; +}}var dt = this.dispatchThread; +if (dt != null) { +dt.stopDispatching (); +}}); +c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", +function () { +return swingjs.JSToolkit.isDispatchThread (); +}); +Clazz_defineMethod (c$, "initDispatchThread", +function () { +{ +if (this.dispatchThread == null) { +var t = new java.awt.EventDispatchThread (this.threadGroup, this.name, this); +jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (t); +this.dispatchThread = t; +this.dispatchThread.start (); +}}}); +Clazz_defineMethod (c$, "detachDispatchThread", +function () { +this.dispatchThread = null; +}); +Clazz_defineMethod (c$, "getDispatchThread", +function () { +return this.dispatchThread; +}); +Clazz_defineMethod (c$, "removeSourceEvents", +function (source, removeAllEvents) { +jssun.awt.SunToolkit.flushPendingEvents (); +{ +for (var i = 0; i < 4; i++) { +var entry = this.queues[i].head; +var prev = null; +while (entry != null) { +if ((entry.event.getSource () === source) && (removeAllEvents || !(Clazz_instanceOf (entry.event, java.awt.SequencedEvent) || Clazz_instanceOf (entry.event, java.awt.SentEvent) || Clazz_instanceOf (entry.event, java.awt.event.FocusEvent) || Clazz_instanceOf (entry.event, java.awt.event.WindowEvent) || Clazz_instanceOf (entry.event, java.awt.event.KeyEvent) || Clazz_instanceOf (entry.event, java.awt.event.InputMethodEvent)))) { +if (Clazz_instanceOf (entry.event, java.awt.SequencedEvent)) { +(entry.event).dispose (); +}if (Clazz_instanceOf (entry.event, java.awt.SentEvent)) { +(entry.event).dispose (); +}if (prev == null) { +this.queues[i].head = entry.next; +} else { +prev.next = entry.next; +}this.uncacheEQItem (entry); +} else { +prev = entry; +}entry = entry.next; +} +this.queues[i].tail = prev; +} +}}, "~O,~B"); +c$.setCurrentEventAndMostRecentTime = Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTime", +function (e) { +java.awt.Toolkit.getEventQueue ().setCurrentEventAndMostRecentTimeImpl (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTimeImpl", + function (e) { +if (swingjs.JSToolkit.isDispatchThread ()) { +return; +}this.currentEvent = e; +var mostRecentEventTime2 = -9223372036854775808; +if (Clazz_instanceOf (e, java.awt.event.InputEvent)) { +var ie = e; +mostRecentEventTime2 = ie.getWhen (); +} else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) { +var ime = e; +mostRecentEventTime2 = ime.getWhen (); +} else if (Clazz_instanceOf (e, java.awt.event.ActionEvent)) { +var ae = e; +mostRecentEventTime2 = ae.getWhen (); +} else if (Clazz_instanceOf (e, java.awt.event.InvocationEvent)) { +var ie = e; +mostRecentEventTime2 = ie.getWhen (); +}this.mostRecentEventTime = Math.max (this.mostRecentEventTime, mostRecentEventTime2); +}, "java.awt.AWTEvent"); +c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", +function (runnable) { +java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), runnable)); +}, "Runnable"); +c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", +function (runnable) { +java.awt.EventQueue.invokeAndWaitStatic (java.awt.Toolkit.getDefaultToolkit (), runnable); +}, "Runnable"); +c$.invokeAndWaitStatic = Clazz_defineMethod (c$, "invokeAndWaitStatic", + function (source, runnable) { +if (java.awt.EventQueue.isDispatchThread ()) { +throw new Error ("Cannot call invokeAndWait from the event dispatcher thread"); +}var event = new java.awt.event.InvocationEvent (source, runnable, null, true); +swingjs.JSToolkit.dispatchEvent (event, null, true); +var eventThrowable = event.getThrowable (); +if (eventThrowable != null) { +throw new java.lang.reflect.InvocationTargetException (eventThrowable); +}}, "~O,Runnable"); +Clazz_defineMethod (c$, "wakeup", +function (isShutdown) { +{ +if (this.nextQueue != null) { +this.nextQueue.wakeup (isShutdown); +} else if (this.dispatchThread != null) { +try { +this.dispatchThread.start (); +} catch (e) { +if (Clazz_exceptionOf (e, IllegalThreadStateException)) { +this.dispatchThread.run (); +} else { +throw e; +} +} +} else if (!isShutdown) { +this.initDispatchThread (); +}}}, "~B"); +Clazz_defineStatics (c$, +"threadInitNumber", 0, +"LOW_PRIORITY", 0, +"NORM_PRIORITY", 1, +"HIGH_PRIORITY", 2, +"ULTIMATE_PRIORITY", 3, +"NUM_PRIORITIES", 4, +"PAINT", 0, +"UPDATE", 1, +"MOVE", 2, +"DRAG", 3, +"PEER", 4, +"CACHE_LENGTH", 5); +c$ = Clazz_decorateAsClass (function () { +this.head = null; +this.tail = null; +Clazz_instantialize (this, arguments); +}, java.awt, "Queue"); +c$ = Clazz_decorateAsClass (function () { +this.event = null; +this.id = 0; +this.next = null; +Clazz_instantialize (this, arguments); +}, java.awt, "EventQueueItem"); +Clazz_makeConstructor (c$, +function (evt) { +this.event = evt; +this.id = evt.getID (); +}, "java.awt.AWTEvent"); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.event.ActionListener", "$.AdjustmentListener", "$.ComponentListener", "$.ContainerListener", "$.FocusListener", "$.HierarchyBoundsListener", "$.HierarchyListener", "$.InputMethodListener", "$.ItemListener", "$.KeyListener", "$.MouseListener", "$.MouseMotionListener", "$.MouseWheelListener", "$.TextListener", "$.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.AWTEventMulticaster", ["java.lang.NullPointerException", "java.lang.reflect.Array"], function () { +c$ = Clazz_decorateAsClass (function () { +this.a = null; +this.b = null; +Clazz_instantialize (this, arguments); +}, java.awt, "AWTEventMulticaster", null, [java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.WindowListener, java.awt.event.WindowFocusListener, java.awt.event.WindowStateListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.AdjustmentListener, java.awt.event.TextListener, java.awt.event.InputMethodListener, java.awt.event.HierarchyListener, java.awt.event.HierarchyBoundsListener, java.awt.event.MouseWheelListener]); +Clazz_makeConstructor (c$, +function (a, b) { +this.a = a; +this.b = b; +}, "java.util.EventListener,java.util.EventListener"); +Clazz_defineMethod (c$, "remove", +function (oldl) { +if (oldl === this.a) return this.b; +if (oldl === this.b) return this.a; +var a2 = java.awt.AWTEventMulticaster.removeInternal (this.a, oldl); +var b2 = java.awt.AWTEventMulticaster.removeInternal (this.b, oldl); +if (a2 === this.a && b2 === this.b) { +return this; +}return java.awt.AWTEventMulticaster.addInternal (a2, b2); +}, "java.util.EventListener"); +Clazz_defineMethod (c$, "componentResized", +function (e) { +(this.a).componentResized (e); +(this.b).componentResized (e); +}, "java.awt.event.ComponentEvent"); +Clazz_defineMethod (c$, "componentMoved", +function (e) { +(this.a).componentMoved (e); +(this.b).componentMoved (e); +}, "java.awt.event.ComponentEvent"); +Clazz_defineMethod (c$, "componentShown", +function (e) { +(this.a).componentShown (e); +(this.b).componentShown (e); +}, "java.awt.event.ComponentEvent"); +Clazz_defineMethod (c$, "componentHidden", +function (e) { +(this.a).componentHidden (e); +(this.b).componentHidden (e); +}, "java.awt.event.ComponentEvent"); +Clazz_defineMethod (c$, "componentAdded", +function (e) { +(this.a).componentAdded (e); +(this.b).componentAdded (e); +}, "java.awt.event.ContainerEvent"); +Clazz_defineMethod (c$, "componentRemoved", +function (e) { +(this.a).componentRemoved (e); +(this.b).componentRemoved (e); +}, "java.awt.event.ContainerEvent"); +Clazz_defineMethod (c$, "focusGained", +function (e) { +(this.a).focusGained (e); +(this.b).focusGained (e); +}, "java.awt.event.FocusEvent"); +Clazz_defineMethod (c$, "focusLost", +function (e) { +(this.a).focusLost (e); +(this.b).focusLost (e); +}, "java.awt.event.FocusEvent"); +Clazz_defineMethod (c$, "keyTyped", +function (e) { +(this.a).keyTyped (e); +(this.b).keyTyped (e); +}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "keyPressed", +function (e) { +(this.a).keyPressed (e); +(this.b).keyPressed (e); +}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "keyReleased", +function (e) { +(this.a).keyReleased (e); +(this.b).keyReleased (e); +}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "mouseClicked", +function (e) { +(this.a).mouseClicked (e); +(this.b).mouseClicked (e); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mousePressed", +function (e) { +(this.a).mousePressed (e); +(this.b).mousePressed (e); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseReleased", +function (e) { +(this.a).mouseReleased (e); +(this.b).mouseReleased (e); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseEntered", +function (e) { +(this.a).mouseEntered (e); +(this.b).mouseEntered (e); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseExited", +function (e) { +(this.a).mouseExited (e); +(this.b).mouseExited (e); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseDragged", +function (e) { +(this.a).mouseDragged (e); +(this.b).mouseDragged (e); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseMoved", +function (e) { +(this.a).mouseMoved (e); +(this.b).mouseMoved (e); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "windowOpened", +function (e) { +(this.a).windowOpened (e); +(this.b).windowOpened (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowClosing", +function (e) { +(this.a).windowClosing (e); +(this.b).windowClosing (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowClosed", +function (e) { +(this.a).windowClosed (e); +(this.b).windowClosed (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowIconified", +function (e) { +(this.a).windowIconified (e); +(this.b).windowIconified (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowDeiconified", +function (e) { +(this.a).windowDeiconified (e); +(this.b).windowDeiconified (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowActivated", +function (e) { +(this.a).windowActivated (e); +(this.b).windowActivated (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowDeactivated", +function (e) { +(this.a).windowDeactivated (e); +(this.b).windowDeactivated (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowStateChanged", +function (e) { +(this.a).windowStateChanged (e); +(this.b).windowStateChanged (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowGainedFocus", +function (e) { +(this.a).windowGainedFocus (e); +(this.b).windowGainedFocus (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowLostFocus", +function (e) { +(this.a).windowLostFocus (e); +(this.b).windowLostFocus (e); +}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "actionPerformed", +function (e) { +(this.a).actionPerformed (e); +(this.b).actionPerformed (e); +}, "java.awt.event.ActionEvent"); +Clazz_defineMethod (c$, "itemStateChanged", +function (e) { +(this.a).itemStateChanged (e); +(this.b).itemStateChanged (e); +}, "java.awt.event.ItemEvent"); +Clazz_defineMethod (c$, "adjustmentValueChanged", +function (e) { +(this.a).adjustmentValueChanged (e); +(this.b).adjustmentValueChanged (e); +}, "java.awt.event.AdjustmentEvent"); +Clazz_defineMethod (c$, "textValueChanged", +function (e) { +(this.a).textValueChanged (e); +(this.b).textValueChanged (e); +}, "java.awt.event.TextEvent"); +Clazz_defineMethod (c$, "inputMethodTextChanged", +function (e) { +(this.a).inputMethodTextChanged (e); +(this.b).inputMethodTextChanged (e); +}, "java.awt.event.InputMethodEvent"); +Clazz_defineMethod (c$, "caretPositionChanged", +function (e) { +(this.a).caretPositionChanged (e); +(this.b).caretPositionChanged (e); +}, "java.awt.event.InputMethodEvent"); +Clazz_defineMethod (c$, "hierarchyChanged", +function (e) { +(this.a).hierarchyChanged (e); +(this.b).hierarchyChanged (e); +}, "java.awt.event.HierarchyEvent"); +Clazz_defineMethod (c$, "ancestorMoved", +function (e) { +(this.a).ancestorMoved (e); +(this.b).ancestorMoved (e); +}, "java.awt.event.HierarchyEvent"); +Clazz_defineMethod (c$, "ancestorResized", +function (e) { +(this.a).ancestorResized (e); +(this.b).ancestorResized (e); +}, "java.awt.event.HierarchyEvent"); +Clazz_defineMethod (c$, "mouseWheelMoved", +function (e) { +(this.a).mouseWheelMoved (e); +(this.b).mouseWheelMoved (e); +}, "java.awt.event.MouseWheelEvent"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.ComponentListener,java.awt.event.ComponentListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.ContainerListener,java.awt.event.ContainerListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.FocusListener,java.awt.event.FocusListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.KeyListener,java.awt.event.KeyListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.MouseListener,java.awt.event.MouseListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.WindowListener,java.awt.event.WindowListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.ActionListener,java.awt.event.ActionListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.ItemListener,java.awt.event.ItemListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.TextListener,java.awt.event.TextListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return java.awt.AWTEventMulticaster.addInternal (a, b); +}, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.ComponentListener,java.awt.event.ComponentListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.ContainerListener,java.awt.event.ContainerListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.FocusListener,java.awt.event.FocusListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.KeyListener,java.awt.event.KeyListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.MouseListener,java.awt.event.MouseListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.WindowListener,java.awt.event.WindowListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.ActionListener,java.awt.event.ActionListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.ItemListener,java.awt.event.ItemListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.TextListener,java.awt.event.TextListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return java.awt.AWTEventMulticaster.removeInternal (l, oldl); +}, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener"); +c$.addInternal = Clazz_defineMethod (c$, "addInternal", +function (a, b) { +if (a == null) return b; +if (b == null) return a; +return new java.awt.AWTEventMulticaster (a, b); +}, "java.util.EventListener,java.util.EventListener"); +c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", +function (l, oldl) { +if (l === oldl || l == null) { +return null; +} else if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) { +return (l).remove (oldl); +} else { +return l; +}}, "java.util.EventListener,java.util.EventListener"); +c$.getListenerCount = Clazz_defineMethod (c$, "getListenerCount", + function (l, listenerType) { +if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) { +var mc = l; +return java.awt.AWTEventMulticaster.getListenerCount (mc.a, listenerType) + java.awt.AWTEventMulticaster.getListenerCount (mc.b, listenerType); +} else { +return listenerType.isInstance (l) ? 1 : 0; +}}, "java.util.EventListener,Class"); +c$.populateListenerArray = Clazz_defineMethod (c$, "populateListenerArray", + function (a, l, index) { +if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) { +var mc = l; +var lhs = java.awt.AWTEventMulticaster.populateListenerArray (a, mc.a, index); +return java.awt.AWTEventMulticaster.populateListenerArray (a, mc.b, lhs); +} else if (a.getClass ().getComponentType ().isInstance (l)) { +a[index] = l; +return index + 1; +} else { +return index; +}}, "~A,java.util.EventListener,~N"); +c$.getListeners = Clazz_defineMethod (c$, "getListeners", +function (l, listenerType) { +if (listenerType == null) { +throw new NullPointerException ("Listener type should not be null"); +}var n = java.awt.AWTEventMulticaster.getListenerCount (l, listenerType); +var result = java.lang.reflect.Array.newInstance (listenerType, n); +java.awt.AWTEventMulticaster.populateListenerArray (result, l, 0); +return result; +}, "java.util.EventListener,Class"); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.util.EventObject"], "java.awt.AWTEvent", ["java.awt.Component", "java.awt.peer.LightweightPeer"], function () { +c$ = Clazz_decorateAsClass (function () { +this.bdata = null; +this.id = 0; +this.num = 0; +this.consumed = false; +this.focusManagerIsDispatching = false; +this.isPosted = false; +Clazz_instantialize (this, arguments); +}, java.awt, "AWTEvent", java.util.EventObject); +Clazz_makeConstructor (c$, +function (event) { +this.construct (event.target, event.id); +}, "java.awt.Event"); +Clazz_makeConstructor (c$, +function (source, id) { +Clazz_superConstructor (this, java.awt.AWTEvent, [source]); +this.id = id; +this.num = ++java.awt.AWTEvent.idnum; +switch (id) { +case 1001: +case 701: +case 601: +case 900: +this.consumed = true; +break; +default: +} +}, "~O,~N"); +Clazz_defineMethod (c$, "setSource", +function (newSource) { +if (this.source === newSource) { +return; +}var comp = null; +if (Clazz_instanceOf (newSource, java.awt.Component)) { +comp = newSource; +while (comp != null && comp.peer != null && (Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer))) { +comp = comp.parent; +} +}this.source = newSource; +}, "~O"); +Clazz_defineMethod (c$, "getID", +function () { +return this.id; +}); +Clazz_overrideMethod (c$, "toString", +function () { +var srcName = null; +if (Clazz_instanceOf (this.source, java.awt.Component)) { +srcName = (this.source).getName (); +}return this.getClass ().getName () + "[" + this.paramString () + "] on " + (srcName != null ? srcName : this.source); +}); +Clazz_defineMethod (c$, "paramString", +function () { +return ""; +}); +Clazz_defineMethod (c$, "consume", +function () { +switch (this.id) { +case 401: +case 402: +case 501: +case 502: +case 503: +case 506: +case 504: +case 505: +case 507: +case 1100: +case 1101: +this.consumed = true; +break; +default: +} +}); +Clazz_defineMethod (c$, "isConsumed", +function () { +return this.consumed; +}); +Clazz_defineMethod (c$, "copyPrivateDataInto", +function (that) { +that.bdata = this.bdata; +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "dispatched", +function () { +}); +Clazz_defineStatics (c$, +"idnum", 0, +"COMPONENT_EVENT_MASK", 0x01, +"CONTAINER_EVENT_MASK", 0x02, +"FOCUS_EVENT_MASK", 0x04, +"KEY_EVENT_MASK", 0x08, +"MOUSE_EVENT_MASK", 0x10, +"MOUSE_MOTION_EVENT_MASK", 0x20, +"WINDOW_EVENT_MASK", 0x40, +"ACTION_EVENT_MASK", 0x80, +"ADJUSTMENT_EVENT_MASK", 0x100, +"ITEM_EVENT_MASK", 0x200, +"TEXT_EVENT_MASK", 0x400, +"INPUT_METHOD_EVENT_MASK", 0x800, +"INPUT_METHODS_ENABLED_MASK", 0x1000, +"PAINT_EVENT_MASK", 0x2000, +"INVOCATION_EVENT_MASK", 0x4000, +"HIERARCHY_EVENT_MASK", 0x8000, +"HIERARCHY_BOUNDS_EVENT_MASK", 0x10000, +"MOUSE_WHEEL_EVENT_MASK", 0x20000, +"WINDOW_STATE_EVENT_MASK", 0x40000, +"WINDOW_FOCUS_EVENT_MASK", 0x80000, +"RESERVED_ID_MAX", 1999); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.util.EventListener"], "java.awt.event.AWTEventListener", null, function () { +Clazz_declareInterface (java.awt.event, "AWTEventListener", java.util.EventListener); +}); +Clazz_declarePackage ("java.awt"); +Clazz_declareInterface (java.awt, "ActiveEvent"); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () { +c$ = Clazz_decorateAsClass (function () { +this.runnable = null; +this.notifier = null; +this.catchExceptions = false; +this.exception = null; +this.throwable = null; +this.when = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent); +Clazz_makeConstructor (c$, +function (source, runnable) { +this.construct (source, runnable, null, false); +}, "~O,Runnable"); +Clazz_makeConstructor (c$, +function (source, runnable, notifier, catchThrowables) { +this.construct (source, 1200, runnable, notifier, catchThrowables); +}, "~O,Runnable,~O,~B"); +Clazz_makeConstructor (c$, +function (source, id, runnable, notifier, catchThrowables) { +Clazz_superConstructor (this, java.awt.event.InvocationEvent, [source, id]); +this.runnable = runnable; +this.notifier = notifier; +this.catchExceptions = catchThrowables; +this.when = System.currentTimeMillis (); +}, "~O,~N,Runnable,~O,~B"); +Clazz_overrideMethod (c$, "dispatch", +function () { +if (this.catchExceptions) { +try { +this.runnable.run (); +} catch (t) { +if (Clazz_instanceOf (t, Exception)) { +this.exception = t; +}this.throwable = t; +} +} else { +this.runnable.run (); +}if (this.notifier != null) { +{ +this.notifier.notifyAll (); +}}}); +Clazz_defineMethod (c$, "getException", +function () { +return (this.catchExceptions) ? this.exception : null; +}); +Clazz_defineMethod (c$, "getThrowable", +function () { +return (this.catchExceptions) ? this.throwable : null; +}); +Clazz_defineMethod (c$, "getWhen", +function () { +return this.when; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 1200: +typeStr = "INVOCATION_DEFAULT"; +break; +default: +typeStr = "unknown type"; +} +return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when; +}); +Clazz_defineStatics (c$, +"SWINGJS_INVOCATION_LOW", 1201, +"INVOCATION_FIRST", 1200, +"INVOCATION_DEFAULT", 1200, +"INVOCATION_LAST", 1201); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ComponentEvent", ["java.awt.Component"], function () { +c$ = Clazz_declareType (java.awt.event, "ComponentEvent", java.awt.AWTEvent); +Clazz_defineMethod (c$, "getComponent", +function () { +return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +var b = (this.source != null ? (this.source).getBounds () : null); +switch (this.id) { +case 102: +typeStr = "COMPONENT_SHOWN"; +break; +case 103: +typeStr = "COMPONENT_HIDDEN"; +break; +case 100: +typeStr = "COMPONENT_MOVED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")"; +break; +case 101: +typeStr = "COMPONENT_RESIZED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")"; +break; +default: +typeStr = "unknown type"; +} +return typeStr; +}); +Clazz_defineStatics (c$, +"COMPONENT_FIRST", 100, +"COMPONENT_LAST", 103, +"COMPONENT_MOVED", 100, +"COMPONENT_RESIZED", 101, +"COMPONENT_SHOWN", 102, +"COMPONENT_HIDDEN", 103); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.MouseEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Point", "$.Toolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.x = 0; +this.y = 0; +this.xAbs = 0; +this.yAbs = 0; +this.clickCount = 0; +this.button = 0; +this.popupTrigger = false; +Clazz_instantialize (this, arguments); +}, java.awt.event, "MouseEvent", java.awt.event.InputEvent); +Clazz_defineMethod (c$, "getLocationOnScreen", +function () { +return new java.awt.Point (this.xAbs, this.yAbs); +}); +Clazz_defineMethod (c$, "getXOnScreen", +function () { +return this.xAbs; +}); +Clazz_defineMethod (c$, "getYOnScreen", +function () { +return this.yAbs; +}); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, x, y, clickCount, popupTrigger, button) { +this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, button); +var eventLocationOnScreen = new java.awt.Point (0, 0); +try { +eventLocationOnScreen = source.getLocationOnScreen (); +this.xAbs = eventLocationOnScreen.x + x; +this.yAbs = eventLocationOnScreen.y + y; +} catch (e) { +if (Clazz_exceptionOf (e, java.awt.IllegalComponentStateException)) { +this.xAbs = 0; +this.yAbs = 0; +} else { +throw e; +} +} +}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N"); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, x, y, clickCount, popupTrigger) { +this.construct (source, id, when, modifiers, x, y, clickCount, popupTrigger, 0); +}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B"); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, button) { +Clazz_superConstructor (this, java.awt.event.MouseEvent, [source, id, when, modifiers]); +this.x = x; +this.y = y; +this.xAbs = xAbs; +this.yAbs = yAbs; +this.clickCount = clickCount; +this.popupTrigger = popupTrigger; +if (button < 0 || button > 3) { +throw new IllegalArgumentException ("Invalid button value"); +}this.button = button; +if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) { +this.setNewModifiers (); +} else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0 || button != 0)) { +this.setOldModifiers (); +}}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N"); +Clazz_defineMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_defineMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_defineMethod (c$, "getPoint", +function () { +var x; +var y; +{ +x = this.x; +y = this.y; +}return new java.awt.Point (x, y); +}); +Clazz_defineMethod (c$, "translatePoint", +function (x, y) { +this.x += x; +this.y += y; +}, "~N,~N"); +Clazz_defineMethod (c$, "getClickCount", +function () { +return this.clickCount; +}); +Clazz_defineMethod (c$, "getButton", +function () { +return this.button; +}); +Clazz_defineMethod (c$, "isPopupTrigger", +function () { +return this.popupTrigger; +}); +c$.getMouseModifiersText = Clazz_defineMethod (c$, "getMouseModifiersText", +function (modifiers) { +var buf = new StringBuilder (); +if ((modifiers & 8) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt")); +buf.append ("+"); +}if ((modifiers & 4) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta")); +buf.append ("+"); +}if ((modifiers & 2) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl")); +buf.append ("+"); +}if ((modifiers & 1) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift")); +buf.append ("+"); +}if ((modifiers & 32) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph")); +buf.append ("+"); +}if ((modifiers & 16) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1")); +buf.append ("+"); +}if ((modifiers & 8) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2")); +buf.append ("+"); +}if ((modifiers & 4) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3")); +buf.append ("+"); +}if (buf.length () > 0) { +buf.setLength (buf.length () - 1); +}return buf.toString (); +}, "~N"); +Clazz_overrideMethod (c$, "paramString", +function () { +var str = new StringBuilder (80); +str.append (java.awt.event.MouseEvent.getIdString (this.id)); +str.append (",(" + this.x).append ("," + this.y).append ("," + this.when).append (")"); +str.append (",absolute(").append ("" + this.xAbs).append (",").append ("" + this.yAbs).append (")"); +str.append (",button=").append ("" + this.getButton ()); +if (this.getModifiers () != 0) { +str.append (",modifiers=").append (java.awt.event.MouseEvent.getMouseModifiersText (this.modifiers)); +}if (this.getModifiersEx () != 0) { +str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers)); +}str.append (",clickCount=").append ("" + this.clickCount); +return str.toString (); +}); +c$.getIdString = Clazz_defineMethod (c$, "getIdString", +function (id) { +switch (id) { +case 501: +return "MOUSE_PRESSED"; +case 502: +return "MOUSE_RELEASED"; +case 500: +return "MOUSE_CLICKED"; +case 504: +return "MOUSE_ENTERED"; +case 505: +return "MOUSE_EXITED"; +case 503: +return "MOUSE_MOVED"; +case 506: +return "MOUSE_DRAGGED"; +case 507: +return "MOUSE_WHEEL"; +default: +return "unknown type"; +} +}, "~N"); +Clazz_defineMethod (c$, "setNewModifiers", + function () { +if ((this.modifiers & 16) != 0) { +this.modifiers |= 1024; +}if ((this.modifiers & 8) != 0) { +this.modifiers |= 2048; +}if ((this.modifiers & 4) != 0) { +this.modifiers |= 4096; +}if (this.id == 501 || this.id == 502 || this.id == 500) { +if ((this.modifiers & 16) != 0) { +this.button = 1; +this.modifiers &= -13; +if (this.id != 501) { +this.modifiers &= -1025; +}} else if ((this.modifiers & 8) != 0) { +this.button = 2; +this.modifiers &= -21; +if (this.id != 501) { +this.modifiers &= -2049; +}} else if ((this.modifiers & 4) != 0) { +this.button = 3; +this.modifiers &= -25; +if (this.id != 501) { +this.modifiers &= -4097; +}}}if ((this.modifiers & 8) != 0) { +this.modifiers |= 512; +}if ((this.modifiers & 4) != 0) { +this.modifiers |= 256; +}if ((this.modifiers & 1) != 0) { +this.modifiers |= 64; +}if ((this.modifiers & 2) != 0) { +this.modifiers |= 128; +}if ((this.modifiers & 32) != 0) { +this.modifiers |= 8192; +}}); +Clazz_defineMethod (c$, "setOldModifiers", + function () { +if (this.id == 501 || this.id == 502 || this.id == 500) { +switch (this.button) { +case 1: +this.modifiers |= 16; +break; +case 2: +this.modifiers |= 8; +break; +case 3: +this.modifiers |= 4; +break; +} +} else { +if ((this.modifiers & 1024) != 0) { +this.modifiers |= 16; +}if ((this.modifiers & 2048) != 0) { +this.modifiers |= 8; +}if ((this.modifiers & 4096) != 0) { +this.modifiers |= 4; +}}if ((this.modifiers & 512) != 0) { +this.modifiers |= 8; +}if ((this.modifiers & 256) != 0) { +this.modifiers |= 4; +}if ((this.modifiers & 64) != 0) { +this.modifiers |= 1; +}if ((this.modifiers & 128) != 0) { +this.modifiers |= 2; +}if ((this.modifiers & 8192) != 0) { +this.modifiers |= 32; +}}); +Clazz_defineStatics (c$, +"MOUSE_FIRST", 500, +"MOUSE_LAST", 507, +"MOUSE_CLICKED", 500, +"MOUSE_PRESSED", 501, +"MOUSE_RELEASED", 502, +"MOUSE_MOVED", 503, +"MOUSE_ENTERED", 504, +"MOUSE_EXITED", 505, +"MOUSE_DRAGGED", 506, +"MOUSE_WHEEL", 507, +"NOBUTTON", 0, +"BUTTON1", 1, +"BUTTON2", 2, +"BUTTON3", 3); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.InputEvent", ["java.lang.StringBuilder", "java.awt.Toolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.when = 0; +this.modifiers = 0; +this.canAccessSystemClipboard = false; +Clazz_instantialize (this, arguments); +}, java.awt.event, "InputEvent", java.awt.event.ComponentEvent); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers) { +Clazz_superConstructor (this, java.awt.event.InputEvent, [source, id]); +this.when = when; +this.modifiers = modifiers; +this.canAccessSystemClipboard = false; +}, "java.awt.Component,~N,~N,~N"); +Clazz_defineMethod (c$, "isShiftDown", +function () { +return (this.modifiers & 1) != 0; +}); +Clazz_defineMethod (c$, "isControlDown", +function () { +return (this.modifiers & 2) != 0; +}); +Clazz_defineMethod (c$, "isMetaDown", +function () { +return (this.modifiers & 4) != 0; +}); +Clazz_defineMethod (c$, "isAltDown", +function () { +return (this.modifiers & 8) != 0; +}); +Clazz_defineMethod (c$, "isAltGraphDown", +function () { +return (this.modifiers & 32) != 0; +}); +Clazz_defineMethod (c$, "getWhen", +function () { +return this.when; +}); +Clazz_defineMethod (c$, "getModifiers", +function () { +return this.modifiers & (-16321); +}); +Clazz_defineMethod (c$, "getModifiersEx", +function () { +return this.modifiers & -64; +}); +Clazz_overrideMethod (c$, "consume", +function () { +this.consumed = true; +}); +Clazz_overrideMethod (c$, "isConsumed", +function () { +return this.consumed; +}); +c$.getModifiersExText = Clazz_defineMethod (c$, "getModifiersExText", +function (modifiers) { +var buf = new StringBuilder (); +if ((modifiers & 256) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta")); +buf.append ("+"); +}if ((modifiers & 128) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl")); +buf.append ("+"); +}if ((modifiers & 512) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt")); +buf.append ("+"); +}if ((modifiers & 64) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift")); +buf.append ("+"); +}if ((modifiers & 8192) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph")); +buf.append ("+"); +}if ((modifiers & 1024) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1")); +buf.append ("+"); +}if ((modifiers & 2048) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2")); +buf.append ("+"); +}if ((modifiers & 4096) != 0) { +buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3")); +buf.append ("+"); +}if (buf.length () > 0) { +buf.setLength (buf.length () - 1); +}return buf.toString (); +}, "~N"); +Clazz_defineStatics (c$, +"SHIFT_MASK", 1, +"CTRL_MASK", 2, +"META_MASK", 4, +"ALT_MASK", 8, +"ALT_GRAPH_MASK", 32, +"BUTTON1_MASK", 16, +"BUTTON2_MASK", 8, +"BUTTON3_MASK", 4, +"SHIFT_DOWN_MASK", 64, +"CTRL_DOWN_MASK", 128, +"META_DOWN_MASK", 256, +"ALT_DOWN_MASK", 512, +"BUTTON1_DOWN_MASK", 1024, +"BUTTON2_DOWN_MASK", 2048, +"BUTTON3_DOWN_MASK", 4096, +"ALT_GRAPH_DOWN_MASK", 8192, +"FIRST_HIGH_BIT", 16384, +"JDK_1_3_MODIFIERS", 63, +"HIGH_MODIFIERS", -16384); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.AWTEventMulticaster", "java.awt.event.AWTEventListener", "java.util.HashMap"], "java.awt.Toolkit", ["java.util.ArrayList", "java.awt.Cursor", "$.Insets", "$.RenderingHints", "java.awt.event.AWTEventListenerProxy", "java.beans.PropertyChangeSupport", "jssun.awt.NullComponentPeer"], function () { +c$ = Clazz_decorateAsClass (function () { +this.desktopProperties = null; +this.desktopPropsSupport = null; +this.calls = null; +this.eventListener = null; +this.listener2SelectiveListener = null; +if (!Clazz_isClassDefined ("java.awt.Toolkit.SelectiveAWTEventListener")) { +java.awt.Toolkit.$Toolkit$SelectiveAWTEventListener$ (); +} +Clazz_instantialize (this, arguments); +}, java.awt, "Toolkit"); +Clazz_prepareFields (c$, function () { +this.desktopProperties = new java.util.HashMap (); +this.desktopPropsSupport = java.awt.Toolkit.createPropertyChangeSupport (this); +this.calls = Clazz_newIntArray (32, 0); +this.listener2SelectiveListener = new java.util.HashMap (); +}); +Clazz_defineMethod (c$, "createComponent", +function (target) { +if (java.awt.Toolkit.lightweightMarker == null) { +java.awt.Toolkit.lightweightMarker = new jssun.awt.NullComponentPeer (); +}return java.awt.Toolkit.lightweightMarker; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "loadSystemColors", +function (systemColors) { +}, "~A"); +Clazz_defineMethod (c$, "setDynamicLayout", +function (dynamic) { +}, "~B"); +Clazz_defineMethod (c$, "isDynamicLayoutSet", +function () { +if (this !== java.awt.Toolkit.getDefaultToolkit ()) { +return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutSet (); +} else { +return false; +}}); +Clazz_defineMethod (c$, "isDynamicLayoutActive", +function () { +if (this !== java.awt.Toolkit.getDefaultToolkit ()) { +return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutActive (); +} else { +return false; +}}); +Clazz_defineMethod (c$, "getScreenInsets", +function (gc) { +if (this !== java.awt.Toolkit.getDefaultToolkit ()) { +return java.awt.Toolkit.getDefaultToolkit ().getScreenInsets (gc); +} else { +return new java.awt.Insets (0, 0, 0, 0); +}}, "java.awt.GraphicsConfiguration"); +c$.getDefaultToolkit = Clazz_defineMethod (c$, "getDefaultToolkit", +function () { +return (java.awt.Toolkit.toolkit == null ? java.awt.Toolkit.toolkit = new swingjs.JSToolkit () : java.awt.Toolkit.toolkit); +}); +Clazz_defineMethod (c$, "createImage", +function (imagedata) { +return this.createImage (imagedata, 0, imagedata.length); +}, "~A"); +Clazz_defineMethod (c$, "getMenuShortcutKeyMask", +function () { +return 2; +}); +c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", +function (c) { +return null; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "createCustomCursor", +function (cursor, hotSpot, name) { +return new java.awt.Cursor (0); +}, "java.awt.Image,java.awt.Point,~S"); +Clazz_defineMethod (c$, "isFrameStateSupported", +function (state) { +return (state == 0); +}, "~N"); +c$.getProperty = Clazz_defineMethod (c$, "getProperty", +function (key, defaultValue) { +if (java.awt.Toolkit.resources != null) { +try { +return java.awt.Toolkit.resources.getString (key); +} catch (e) { +if (Clazz_exceptionOf (e, java.util.MissingResourceException)) { +} else { +throw e; +} +} +}return defaultValue; +}, "~S,~S"); +Clazz_defineMethod (c$, "getSystemEventQueue", +function () { +return this.getSystemEventQueueImpl (); +}); +c$.getEventQueue = Clazz_defineMethod (c$, "getEventQueue", +function () { +return java.awt.Toolkit.getDefaultToolkit ().getSystemEventQueueImpl (); +}); +Clazz_defineMethod (c$, "getDesktopProperty", +function (propertyName) { +if (this.desktopProperties.isEmpty ()) { +this.initializeDesktopProperties (); +}var value; +if (propertyName.equals ("awt.dynamicLayoutSupported")) { +value = this.lazilyLoadDesktopProperty (propertyName); +return value; +}value = this.desktopProperties.get (propertyName); +if (value == null) { +value = this.lazilyLoadDesktopProperty (propertyName); +if (value != null) { +this.setDesktopProperty (propertyName, value); +}}if (Clazz_instanceOf (value, java.awt.RenderingHints)) { +value = (value).clone (); +}return value; +}, "~S"); +Clazz_defineMethod (c$, "setDesktopProperty", +function (name, newValue) { +var oldValue; +{ +oldValue = this.desktopProperties.get (name); +this.desktopProperties.put (name, newValue); +}this.desktopPropsSupport.firePropertyChange (name, oldValue, newValue); +}, "~S,~O"); +Clazz_defineMethod (c$, "lazilyLoadDesktopProperty", +function (name) { +return null; +}, "~S"); +Clazz_defineMethod (c$, "initializeDesktopProperties", +function () { +}); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (name, pcl) { +this.desktopPropsSupport.addPropertyChangeListener (name, pcl); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "removePropertyChangeListener", +function (name, pcl) { +this.desktopPropsSupport.removePropertyChangeListener (name, pcl); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function () { +return this.desktopPropsSupport.getPropertyChangeListeners (); +}); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function (propertyName) { +return this.desktopPropsSupport.getPropertyChangeListeners (propertyName); +}, "~S"); +Clazz_defineMethod (c$, "isAlwaysOnTopSupported", +function () { +return true; +}); +c$.deProxyAWTEventListener = Clazz_defineMethod (c$, "deProxyAWTEventListener", + function (l) { +var localL = l; +if (localL == null) { +return null; +}if (Clazz_instanceOf (l, java.awt.event.AWTEventListenerProxy)) { +localL = (l).getListener (); +}return localL; +}, "java.awt.event.AWTEventListener"); +Clazz_defineMethod (c$, "addAWTEventListener", +function (listener, eventMask) { +var localL = java.awt.Toolkit.deProxyAWTEventListener (listener); +if (localL == null) { +return; +}{ +var selectiveListener = this.listener2SelectiveListener.get (localL); +if (selectiveListener == null) { +selectiveListener = Clazz_innerTypeInstance (java.awt.Toolkit.SelectiveAWTEventListener, this, null, localL, eventMask); +this.listener2SelectiveListener.put (localL, selectiveListener); +this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.add (this.eventListener, selectiveListener); +}selectiveListener.orEventMasks (eventMask); +java.awt.Toolkit.enabledOnToolkitMask |= eventMask; +var mask = eventMask; +for (var i = 0; i < 32; i++) { +if (mask == 0) { +break; +}if ((mask & 1) != 0) { +this.calls[i]++; +}mask >>>= 1; +} +}}, "java.awt.event.AWTEventListener,~N"); +Clazz_defineMethod (c$, "removeAWTEventListener", +function (listener) { +var localL = java.awt.Toolkit.deProxyAWTEventListener (listener); +if (listener == null) { +return; +}{ +var selectiveListener = this.listener2SelectiveListener.get (localL); +if (selectiveListener != null) { +this.listener2SelectiveListener.remove (localL); +var listenerCalls = selectiveListener.getCalls (); +for (var i = 0; i < 32; i++) { +this.calls[i] -= listenerCalls[i]; +if (this.calls[i] == 0) { +java.awt.Toolkit.enabledOnToolkitMask &= ~(1 << i); +}} +}this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.remove (this.eventListener, (selectiveListener == null) ? localL : selectiveListener); +}}, "java.awt.event.AWTEventListener"); +c$.enabledOnToolkit = Clazz_defineMethod (c$, "enabledOnToolkit", +function (eventMask) { +return (java.awt.Toolkit.enabledOnToolkitMask & eventMask) != 0; +}, "~N"); +Clazz_defineMethod (c$, "countAWTEventListeners", +function (eventMask) { +var ci = 0; +for (; eventMask != 0; eventMask >>>= 1, ci++) { +} +ci--; +return this.calls[ci]; +}, "~N"); +Clazz_defineMethod (c$, "getAWTEventListeners", +function () { +{ +var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener); +var ret = new Array (la.length); +for (var i = 0; i < la.length; i++) { +var sael = la[i]; +var tempL = sael.getListener (); +ret[i] = new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), tempL); +} +return ret; +}}); +Clazz_defineMethod (c$, "getAWTEventListeners", +function (eventMask) { +{ +var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener); +var list = new java.util.ArrayList (la.length); +for (var i = 0; i < la.length; i++) { +var sael = la[i]; +if ((sael.getEventMask () & eventMask) == eventMask) { +list.add ( new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), sael.getListener ())); +}} +return list.toArray ( new Array (0)); +}}, "~N"); +Clazz_defineMethod (c$, "notifyAWTEventListeners", +function (theEvent) { +var eventListener = this.eventListener; +if (eventListener != null) { +eventListener.eventDispatched (theEvent); +}}, "java.awt.AWTEvent"); +c$.createPropertyChangeSupport = Clazz_defineMethod (c$, "createPropertyChangeSupport", + function (toolkit) { +return new java.beans.PropertyChangeSupport (toolkit); +}, "java.awt.Toolkit"); +c$.$Toolkit$SelectiveAWTEventListener$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +this.listener = null; +this.eventMask = 0; +this.calls = null; +Clazz_instantialize (this, arguments); +}, java.awt.Toolkit, "SelectiveAWTEventListener", null, java.awt.event.AWTEventListener); +Clazz_prepareFields (c$, function () { +this.calls = Clazz_newIntArray (32, 0); +}); +Clazz_defineMethod (c$, "getListener", +function () { +return this.listener; +}); +Clazz_defineMethod (c$, "getEventMask", +function () { +return this.eventMask; +}); +Clazz_defineMethod (c$, "getCalls", +function () { +return this.calls; +}); +Clazz_defineMethod (c$, "orEventMasks", +function (a) { +this.eventMask |= a; +for (var b = 0; b < 32; b++) { +if (a == 0) { +break; +}if ((a & 1) != 0) { +this.calls[b]++; +}a >>>= 1; +} +}, "~N"); +Clazz_makeConstructor (c$, +function (a, b) { +this.listener = a; +this.eventMask = b; +}, "java.awt.event.AWTEventListener,~N"); +Clazz_defineMethod (c$, "eventDispatched", +function (a) { +var b = 0; +if (((b = this.eventMask & 1) != 0 && a.id >= 100 && a.id <= 103) || ((b = this.eventMask & 2) != 0 && a.id >= 300 && a.id <= 301) || ((b = this.eventMask & 4) != 0 && a.id >= 1004 && a.id <= 1005) || ((b = this.eventMask & 8) != 0 && a.id >= 400 && a.id <= 402) || ((b = this.eventMask & 131072) != 0 && a.id == 507) || ((b = this.eventMask & 32) != 0 && (a.id == 503 || a.id == 506)) || ((b = this.eventMask & 16) != 0 && a.id != 503 && a.id != 506 && a.id != 507 && a.id >= 500 && a.id <= 507) || ((b = this.eventMask & 64) != 0 && (a.id >= 200 && a.id <= 209)) || ((b = this.eventMask & 128) != 0 && a.id >= 1001 && a.id <= 1001) || ((b = this.eventMask & 256) != 0 && a.id >= 601 && a.id <= 601) || ((b = this.eventMask & 512) != 0 && a.id >= 701 && a.id <= 701) || ((b = this.eventMask & 1024) != 0 && a.id >= 900 && a.id <= 900) || ((b = this.eventMask & 2048) != 0 && a.id >= 1100 && a.id <= 1101) || ((b = this.eventMask & 8192) != 0 && a.id >= 800 && a.id <= 801) || ((b = this.eventMask & 16384) != 0 && a.id >= 1200 && a.id <= 1201) || ((b = this.eventMask & 32768) != 0 && a.id == 1400) || ((b = this.eventMask & 65536) != 0 && (a.id == 1401 || a.id == 1402)) || ((b = this.eventMask & 262144) != 0 && a.id == 209) || ((b = this.eventMask & 524288) != 0 && (a.id == 207 || a.id == 208))) { +var c = 0; +for (var d = b; d != 0; d >>>= 1, c++) { +} +c--; +for (var e = 0; e < this.calls[c]; e++) { +this.listener.eventDispatched (a); +} +}}, "java.awt.AWTEvent"); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.Toolkit, "ToolkitEventMulticaster", java.awt.AWTEventMulticaster, java.awt.event.AWTEventListener); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +if (a == null) return b; +if (b == null) return a; +return new java.awt.Toolkit.ToolkitEventMulticaster (a, b); +}, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (a, b) { +return java.awt.AWTEventMulticaster.removeInternal (a, b); +}, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener"); +Clazz_defineMethod (c$, "remove", +function (a) { +if (a === this.a) return this.b; +if (a === this.b) return this.a; +var b = java.awt.AWTEventMulticaster.removeInternal (this.a, a); +var c = java.awt.AWTEventMulticaster.removeInternal (this.b, a); +if (b === this.a && c === this.b) { +return this; +}return java.awt.Toolkit.ToolkitEventMulticaster.add (b, c); +}, "java.util.EventListener"); +Clazz_defineMethod (c$, "eventDispatched", +function (a) { +(this.a).eventDispatched (a); +(this.b).eventDispatched (a); +}, "java.awt.AWTEvent"); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"lightweightMarker", null, +"toolkit", null, +"resources", null, +"LONG_BITS", 32, +"enabledOnToolkitMask", 0); +}); +Clazz_declarePackage ("java.lang"); +Clazz_load (["java.lang.Enum"], "java.lang.Thread", ["java.lang.Exception", "$.IllegalArgumentException", "$.IllegalThreadStateException", "$.NoSuchMethodError", "$.NullPointerException", "$.ThreadDeath", "java.util.HashMap", "java.lang.ThreadGroup", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.name = null; +this.priority = 5; +this.daemon = false; +this.target = null; +this.group = null; +this.tid = 0; +this.threadStatus = 0; +this.parkBlocker = null; +this.stopBeforeStart = false; +this.throwableFromStop = null; +this.me = null; +this.uncaughtExceptionHandler = null; +this.$interrupted = false; +this.stopped = false; +Clazz_instantialize (this, arguments); +}, java.lang, "Thread", null, Runnable); +c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", + function () { +return java.lang.Thread.threadInitNumber++; +}); +c$.nextThreadID = Clazz_defineMethod (c$, "nextThreadID", + function () { +return ++java.lang.Thread.threadSeqNumber; +}); +c$.currentThread = Clazz_defineMethod (c$, "currentThread", +function () { +if (java.lang.Thread.thisThread == null) { +java.lang.Thread.thisThread = new java.lang.Thread ("master"); +java.lang.Thread.thisThread.setPriority (5); +}return java.lang.Thread.thisThread; +}); +c$.yield = Clazz_defineMethod (c$, "yield", +function () { +}); +c$.sleep = Clazz_defineMethod (c$, "sleep", +function (millis) { +}, "~N"); +c$.sleep = Clazz_defineMethod (c$, "sleep", +function (millis, nanos) { +if (millis < 0) { +throw new IllegalArgumentException ("timeout value is negative"); +}if (nanos < 0 || nanos > 999999) { +throw new IllegalArgumentException ("nanosecond timeout value out of range"); +}if (nanos >= 500000 || (nanos != 0 && millis == 0)) { +millis++; +}java.lang.Thread.sleep (millis); +}, "~N,~N"); +Clazz_defineMethod (c$, "init", + function (g, target, name, stackSize) { +this.init (g, target, name, stackSize, null); +}, "java.lang.ThreadGroup,Runnable,~S,~N"); +Clazz_defineMethod (c$, "init", + function (g, target, name, stackSize, acc) { +var parent = (java.lang.Thread.thisThread == null ? null : java.lang.Thread.thisThread); +if (g == null) { +if (g == null && parent != null) { +g = parent.getThreadGroup (); +}}if (g == null) { +g = this.newThreadGroup (null, name); +parent = this; +}g.checkAccess (); +g.addUnstarted (); +this.group = g; +this.priority = parent.getPriority (); +this.name = name; +this.target = target; +this.setPriority (this.priority); +this.tid = java.lang.Thread.nextThreadID (); +this.me = this; +}, "java.lang.ThreadGroup,Runnable,~S,~N,~O"); +Clazz_defineMethod (c$, "newThreadGroup", +function (group, name) { +return new java.lang.ThreadGroup (group, name); +}, "java.lang.ThreadGroup,~S"); +Clazz_makeConstructor (c$, +function () { +this.init (null, null, "Thread-" + java.lang.Thread.nextThreadNum (), 0); +}); +Clazz_makeConstructor (c$, +function (target) { +this.init (null, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0); +}, "Runnable"); +Clazz_makeConstructor (c$, +function (group, target) { +this.init (group, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0); +}, "java.lang.ThreadGroup,Runnable"); +Clazz_makeConstructor (c$, +function (name) { +this.init (null, null, name, 0); +}, "~S"); +Clazz_makeConstructor (c$, +function (group, name) { +this.init (group, null, name, 0); +}, "java.lang.ThreadGroup,~S"); +Clazz_makeConstructor (c$, +function (target, name) { +this.init (null, target, name, 0); +}, "Runnable,~S"); +Clazz_makeConstructor (c$, +function (group, target, name) { +this.init (group, target, name, 0); +}, "java.lang.ThreadGroup,Runnable,~S"); +Clazz_makeConstructor (c$, +function (group, target, name, stackSize) { +this.init (group, target, name, stackSize); +}, "java.lang.ThreadGroup,Runnable,~S,~N"); +Clazz_defineMethod (c$, "start", +function () { +if (this.threadStatus != 0 || this !== this.me) throw new IllegalThreadStateException (); +this.group.add (this); +this.start0 (); +if (this.stopBeforeStart) { +this.stop0 (this.throwableFromStop); +}}); +Clazz_defineMethod (c$, "start0", + function () { +}); +Clazz_defineMethod (c$, "run", +function () { +if (this.target != null) { +this.target.run (); +}}); +Clazz_defineMethod (c$, "stop", +function () { +if ((this.threadStatus != 0) && !this.isAlive ()) { +return; +}this.stop1 ( new ThreadDeath ()); +}); +Clazz_defineMethod (c$, "stop", +function (obj) { +this.stop1 (obj); +}, "Throwable"); +Clazz_defineMethod (c$, "stop1", + function (th) { +if (this.threadStatus != 0) { +this.resume (); +this.stop0 (th); +} else { +if (th == null) { +throw new NullPointerException (); +}this.stopBeforeStart = true; +this.throwableFromStop = th; +}}, "Throwable"); +Clazz_defineMethod (c$, "interrupt", +function () { +this.interrupt0 (); +}); +c$.interrupted = Clazz_defineMethod (c$, "interrupted", +function () { +return java.lang.Thread.currentThread ().isInterruptedB (true); +}); +Clazz_defineMethod (c$, "isInterrupted", +function () { +return this.isInterruptedB (false); +}); +Clazz_defineMethod (c$, "isInterruptedB", + function (clearInterrupted) { +var wasInt = this.$interrupted; +if (clearInterrupted) this.$interrupted = false; +return wasInt; +}, "~B"); +Clazz_defineMethod (c$, "destroy", +function () { +throw new NoSuchMethodError (); +}); +Clazz_defineMethod (c$, "isAlive", +function () { +return true; +}); +Clazz_defineMethod (c$, "suspend", +function () { +this.checkAccess (); +this.suspend0 (); +}); +Clazz_defineMethod (c$, "resume", +function () { +this.checkAccess (); +this.resume0 (); +}); +Clazz_defineMethod (c$, "setPriority", +function (newPriority) { +var g; +this.checkAccess (); +if (newPriority > 10 || newPriority < 1) { +throw new IllegalArgumentException (); +}if ((g = this.getThreadGroup ()) != null) { +if (newPriority > g.getMaxPriority ()) { +newPriority = g.getMaxPriority (); +}this.setPriority0 (this.priority = newPriority); +}}, "~N"); +Clazz_defineMethod (c$, "getPriority", +function () { +return this.priority; +}); +Clazz_defineMethod (c$, "setName", +function (name) { +this.checkAccess (); +this.name = name; +}, "~S"); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "getThreadGroup", +function () { +return this.group; +}); +c$.activeCount = Clazz_defineMethod (c$, "activeCount", +function () { +return java.lang.Thread.currentThread ().getThreadGroup ().activeCount (); +}); +c$.enumerate = Clazz_defineMethod (c$, "enumerate", +function (tarray) { +return java.lang.Thread.currentThread ().getThreadGroup ().enumerate (tarray); +}, "~A"); +Clazz_defineMethod (c$, "countStackFrames", +function () { +return 0; +}); +Clazz_defineMethod (c$, "join", +function (millis) { +var base = System.currentTimeMillis (); +var now = 0; +if (millis < 0) { +throw new IllegalArgumentException ("timeout value is negative"); +}swingjs.JSToolkit.warn ("Cannot wait in Thread"); +if (millis == 0) { +while (this.isAlive ()) { +this.wait (0); +} +} else { +while (this.isAlive ()) { +var delay = millis - now; +if (delay <= 0) { +break; +}this.wait (delay); +now = System.currentTimeMillis () - base; +} +}}, "~N"); +Clazz_defineMethod (c$, "join", +function (millis, nanos) { +if (millis < 0) { +throw new IllegalArgumentException ("timeout value is negative"); +}if (nanos < 0 || nanos > 999999) { +throw new IllegalArgumentException ("nanosecond timeout value out of range"); +}if (nanos >= 500000 || (nanos != 0 && millis == 0)) { +millis++; +}this.join (millis); +}, "~N,~N"); +Clazz_defineMethod (c$, "join", +function () { +this.join (0); +}); +c$.dumpStack = Clazz_defineMethod (c$, "dumpStack", +function () { + new Exception ("Stack trace").printStackTrace (); +}); +Clazz_defineMethod (c$, "setDaemon", +function (on) { +this.checkAccess (); +if (this.isAlive ()) { +throw new IllegalThreadStateException (); +}this.daemon = on; +}, "~B"); +Clazz_defineMethod (c$, "isDaemon", +function () { +return this.daemon; +}); +Clazz_defineMethod (c$, "checkAccess", +function () { +}); +Clazz_overrideMethod (c$, "toString", +function () { +var group = this.getThreadGroup (); +if (group != null) { +return "Thread[" + this.getName () + "," + this.getPriority () + "," + group.getName () + "]"; +} else { +return "Thread[" + this.getName () + "," + this.getPriority () + "," + "" + "]"; +}}); +Clazz_defineMethod (c$, "getContextClassLoader", +function () { +return null; +}); +Clazz_defineMethod (c$, "setContextClassLoader", +function (cl) { +}, "ClassLoader"); +c$.holdsLock = Clazz_defineMethod (c$, "holdsLock", +function (obj) { +return false; +}, "~O"); +Clazz_defineMethod (c$, "getStackTrace", +function () { +return ( new Exception ()).getStackTrace (); +}); +c$.getAllStackTraces = Clazz_defineMethod (c$, "getAllStackTraces", +function () { +var threads = java.lang.Thread.getThreads (); +var traces = java.lang.Thread.dumpThreads (threads); +var m = new java.util.HashMap (threads.length); +for (var i = 0; i < threads.length; i++) { +var stackTrace = traces[i]; +if (stackTrace != null) { +m.put (threads[i], stackTrace); +}} +return m; +}); +c$.dumpThreads = Clazz_defineMethod (c$, "dumpThreads", + function (threads) { +return null; +}, "~A"); +c$.getThreads = Clazz_defineMethod (c$, "getThreads", + function () { +return null; +}); +Clazz_defineMethod (c$, "getId", +function () { +return this.tid; +}); +Clazz_defineMethod (c$, "getState", +function () { +switch (this.threadStatus) { +case 0: +return java.lang.Thread.State.NEW; +case 1: +return java.lang.Thread.State.RUNNABLE; +case 2: +default: +return java.lang.Thread.State.TERMINATED; +case 3: +return java.lang.Thread.State.TIMED_WAITING; +case 4: +return java.lang.Thread.State.WAITING; +} +}); +c$.setDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "setDefaultUncaughtExceptionHandler", +function (eh) { +java.lang.Thread.defaultUncaughtExceptionHandler = eh; +}, "java.lang.Thread.UncaughtExceptionHandler"); +c$.getDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "getDefaultUncaughtExceptionHandler", +function () { +return java.lang.Thread.defaultUncaughtExceptionHandler; +}); +Clazz_defineMethod (c$, "getUncaughtExceptionHandler", +function () { +return this.uncaughtExceptionHandler != null ? this.uncaughtExceptionHandler : this.group; +}); +Clazz_defineMethod (c$, "setUncaughtExceptionHandler", +function (eh) { +this.checkAccess (); +this.uncaughtExceptionHandler = eh; +}, "java.lang.Thread.UncaughtExceptionHandler"); +Clazz_defineMethod (c$, "setPriority0", + function (newPriority) { +}, "~N"); +Clazz_defineMethod (c$, "stop0", + function (o) { +this.stopped = true; +}, "~O"); +Clazz_defineMethod (c$, "suspend0", + function () { +}); +Clazz_defineMethod (c$, "resume0", + function () { +}); +Clazz_defineMethod (c$, "interrupt0", + function () { +this.$interrupted = true; +}); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.lang.Thread, "State", Enum); +Clazz_defineEnumConstant (c$, "NEW", 0, []); +Clazz_defineEnumConstant (c$, "RUNNABLE", 1, []); +Clazz_defineEnumConstant (c$, "BLOCKED", 2, []); +Clazz_defineEnumConstant (c$, "WAITING", 3, []); +Clazz_defineEnumConstant (c$, "TIMED_WAITING", 4, []); +Clazz_defineEnumConstant (c$, "TERMINATED", 5, []); +c$ = Clazz_p0p (); +Clazz_declareInterface (java.lang.Thread, "UncaughtExceptionHandler"); +Clazz_defineStatics (c$, +"threadInitNumber", 0, +"threadSeqNumber", 0, +"thisThread", null, +"MIN_PRIORITY", 1, +"NORM_PRIORITY", 5, +"MAX_PRIORITY", 10, +"defaultUncaughtExceptionHandler", null); +}); +Clazz_declarePackage ("java.lang"); +Clazz_load (["java.lang.Thread"], "java.lang.ThreadGroup", ["java.lang.IllegalThreadStateException", "$.ThreadDeath", "java.util.Arrays"], function () { +c$ = Clazz_decorateAsClass (function () { +this.parent = null; +this.name = null; +this.maxPriority = 10; +this.destroyed = false; +this.daemon = false; +this.vmAllowSuspension = false; +this.nUnstartedThreads = 0; +this.nthreads = 0; +this.threads = null; +this.ngroups = 0; +this.groups = null; +this.html5Applet = null; +Clazz_instantialize (this, arguments); +}, java.lang, "ThreadGroup", null, java.lang.Thread.UncaughtExceptionHandler); +Clazz_makeConstructor (c$, +function (name) { +this.construct (java.lang.Thread.currentThread ().getThreadGroup (), name); +}, "~S"); +Clazz_makeConstructor (c$, +function (parent, name) { +this.name = name; +this.parent = parent; +if (parent != null) { +this.maxPriority = parent.maxPriority; +this.daemon = parent.daemon; +this.vmAllowSuspension = parent.vmAllowSuspension; +parent.add (this); +}}, "java.lang.ThreadGroup,~S"); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "getParent", +function () { +if (this.parent != null) this.parent.checkAccess (); +return this.parent; +}); +Clazz_defineMethod (c$, "getMaxPriority", +function () { +return this.maxPriority; +}); +Clazz_defineMethod (c$, "isDaemon", +function () { +return this.daemon; +}); +Clazz_defineMethod (c$, "isDestroyed", +function () { +return this.destroyed; +}); +Clazz_defineMethod (c$, "setDaemon", +function (daemon) { +this.checkAccess (); +this.daemon = daemon; +}, "~B"); +Clazz_defineMethod (c$, "setMaxPriority", +function (pri) { +var ngroupsSnapshot; +var groupsSnapshot; +{ +this.checkAccess (); +if (pri < 1 || pri > 10) { +return; +}this.maxPriority = (this.parent != null) ? Math.min (pri, this.parent.maxPriority) : pri; +ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}}for (var i = 0; i < ngroupsSnapshot; i++) { +groupsSnapshot[i].setMaxPriority (pri); +} +}, "~N"); +Clazz_defineMethod (c$, "parentOf", +function (g) { +for (; g != null; g = g.parent) { +if (g === this) { +return true; +}} +return false; +}, "java.lang.ThreadGroup"); +Clazz_defineMethod (c$, "checkAccess", +function () { +}); +Clazz_defineMethod (c$, "activeCount", +function () { +var result; +var ngroupsSnapshot; +var groupsSnapshot; +{ +if (this.destroyed) { +return 0; +}result = this.nthreads; +ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}}for (var i = 0; i < ngroupsSnapshot; i++) { +result += groupsSnapshot[i].activeCount (); +} +return result; +}); +Clazz_defineMethod (c$, "enumerate", +function (list) { +this.checkAccess (); +return this.enumerate (list, 0, true); +}, "~A"); +Clazz_defineMethod (c$, "enumerate", +function (list, recurse) { +this.checkAccess (); +return this.enumerate (list, 0, recurse); +}, "~A,~B"); +Clazz_defineMethod (c$, "enumerate", + function (list, n, recurse) { +var ngroupsSnapshot = 0; +var groupsSnapshot = null; +{ +if (this.destroyed) { +return 0; +}var nt = this.nthreads; +if (nt > list.length - n) { +nt = list.length - n; +}for (var i = 0; i < nt; i++) { +if (this.threads[i].isAlive ()) { +list[n++] = this.threads[i]; +}} +if (recurse) { +ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}}}if (recurse) { +for (var i = 0; i < ngroupsSnapshot; i++) { +n = groupsSnapshot[i].enumerate (list, n, true); +} +}return n; +}, "~A,~N,~B"); +Clazz_defineMethod (c$, "activeGroupCount", +function () { +var ngroupsSnapshot; +var groupsSnapshot; +{ +if (this.destroyed) { +return 0; +}ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}}var n = ngroupsSnapshot; +for (var i = 0; i < ngroupsSnapshot; i++) { +n += groupsSnapshot[i].activeGroupCount (); +} +return n; +}); +Clazz_defineMethod (c$, "enumerate", +function (list) { +this.checkAccess (); +return this.enumerate (list, 0, true); +}, "~A"); +Clazz_defineMethod (c$, "enumerate", +function (list, recurse) { +this.checkAccess (); +return this.enumerate (list, 0, recurse); +}, "~A,~B"); +Clazz_defineMethod (c$, "enumerate", + function (list, n, recurse) { +var ngroupsSnapshot = 0; +var groupsSnapshot = null; +{ +if (this.destroyed) { +return 0; +}var ng = this.ngroups; +if (ng > list.length - n) { +ng = list.length - n; +}if (ng > 0) { +System.arraycopy (this.groups, 0, list, n, ng); +n += ng; +}if (recurse) { +ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}}}if (recurse) { +for (var i = 0; i < ngroupsSnapshot; i++) { +n = groupsSnapshot[i].enumerate (list, n, true); +} +}return n; +}, "~A,~N,~B"); +Clazz_defineMethod (c$, "stop", +function () { +if (this.stopOrSuspend (false)) java.lang.Thread.currentThread ().stop (); +}); +Clazz_defineMethod (c$, "interrupt", +function () { +var ngroupsSnapshot; +var groupsSnapshot; +{ +this.checkAccess (); +for (var i = 0; i < this.nthreads; i++) { +this.threads[i].interrupt (); +} +ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}}for (var i = 0; i < ngroupsSnapshot; i++) { +groupsSnapshot[i].interrupt (); +} +}); +Clazz_defineMethod (c$, "suspend", +function () { +if (this.stopOrSuspend (true)) java.lang.Thread.currentThread ().suspend (); +}); +Clazz_defineMethod (c$, "stopOrSuspend", + function (suspend) { +var suicide = false; +var us = java.lang.Thread.currentThread (); +var ngroupsSnapshot; +var groupsSnapshot = null; +{ +this.checkAccess (); +for (var i = 0; i < this.nthreads; i++) { +if (this.threads[i] === us) suicide = true; + else if (suspend) this.threads[i].suspend (); + else this.threads[i].stop (); +} +ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +}}for (var i = 0; i < ngroupsSnapshot; i++) suicide = groupsSnapshot[i].stopOrSuspend (suspend) || suicide; + +return suicide; +}, "~B"); +Clazz_defineMethod (c$, "resume", +function () { +var ngroupsSnapshot; +var groupsSnapshot; +{ +this.checkAccess (); +for (var i = 0; i < this.nthreads; i++) { +this.threads[i].resume (); +} +ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}}for (var i = 0; i < ngroupsSnapshot; i++) { +groupsSnapshot[i].resume (); +} +}); +Clazz_defineMethod (c$, "destroy", +function () { +var ngroupsSnapshot; +var groupsSnapshot; +{ +this.checkAccess (); +if (this.destroyed || (this.nthreads > 0)) { +throw new IllegalThreadStateException (); +}ngroupsSnapshot = this.ngroups; +if (this.groups != null) { +groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); +} else { +groupsSnapshot = null; +}if (this.parent != null) { +this.destroyed = true; +this.ngroups = 0; +this.groups = null; +this.nthreads = 0; +this.threads = null; +}}for (var i = 0; i < ngroupsSnapshot; i += 1) { +groupsSnapshot[i].destroy (); +} +if (this.parent != null) { +this.parent.remove (this); +}}); +Clazz_defineMethod (c$, "add", + function (g) { +{ +if (this.destroyed) { +throw new IllegalThreadStateException (); +}if (this.groups == null) { +this.groups = new Array (4); +} else if (this.ngroups == this.groups.length) { +this.groups = java.util.Arrays.copyOf (this.groups, this.ngroups * 2); +}this.groups[this.ngroups] = g; +this.ngroups++; +}}, "java.lang.ThreadGroup"); +Clazz_defineMethod (c$, "remove", + function (g) { +{ +if (this.destroyed) { +return; +}for (var i = 0; i < this.ngroups; i++) { +if (this.groups[i] === g) { +this.ngroups -= 1; +System.arraycopy (this.groups, i + 1, this.groups, i, this.ngroups - i); +this.groups[this.ngroups] = null; +break; +}} +if (this.nthreads == 0) { +this.notifyAll (); +}if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) { +this.destroy (); +}}}, "java.lang.ThreadGroup"); +Clazz_defineMethod (c$, "addUnstarted", +function () { +{ +if (this.destroyed) { +throw new IllegalThreadStateException (); +}this.nUnstartedThreads++; +}}); +Clazz_defineMethod (c$, "add", +function (t) { +{ +if (this.destroyed) { +throw new IllegalThreadStateException (); +}if (this.threads == null) { +this.threads = new Array (4); +} else if (this.nthreads == this.threads.length) { +this.threads = java.util.Arrays.copyOf (this.threads, this.nthreads * 2); +}this.threads[this.nthreads] = t; +this.nthreads++; +this.nUnstartedThreads--; +}}, "java.lang.Thread"); +Clazz_defineMethod (c$, "remove", +function (t) { +{ +if (this.destroyed) { +return; +}for (var i = 0; i < this.nthreads; i++) { +if (this.threads[i] === t) { +System.arraycopy (this.threads, i + 1, this.threads, i, --this.nthreads - i); +this.threads[this.nthreads] = null; +break; +}} +if (this.nthreads == 0) { +this.notifyAll (); +}if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) { +this.destroy (); +}}}, "java.lang.Thread"); +Clazz_defineMethod (c$, "uncaughtException", +function (t, e) { +if (this.parent != null) { +this.parent.uncaughtException (t, e); +} else { +var ueh = java.lang.Thread.getDefaultUncaughtExceptionHandler (); +if (ueh != null) { +ueh.uncaughtException (t, e); +} else if (!(Clazz_instanceOf (e, ThreadDeath))) { +System.err.print ("Exception in thread \"" + t.getName () + "\" "); +e.printStackTrace (System.err); +}}}, "java.lang.Thread,Throwable"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[name=" + this.getName () + ",maxpri=" + this.maxPriority + ",html5Applet=" + this.html5Applet + "]"; +}); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.LayoutManager"], "java.awt.FlowLayout", ["java.awt.Dimension"], function () { +c$ = Clazz_decorateAsClass (function () { +this.align = 0; +this.newAlign = 0; +this.hgap = 0; +this.vgap = 0; +this.alignOnBaseline = false; +Clazz_instantialize (this, arguments); +}, java.awt, "FlowLayout", null, [java.awt.LayoutManager, java.io.Serializable]); +Clazz_makeConstructor (c$, +function () { +this.construct (1, 5, 5); +}); +Clazz_makeConstructor (c$, +function (align) { +this.construct (align, 5, 5); +}, "~N"); +Clazz_makeConstructor (c$, +function (align, hgap, vgap) { +this.hgap = hgap; +this.vgap = vgap; +this.setAlignment (align); +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "getAlignment", +function () { +return this.newAlign; +}); +Clazz_defineMethod (c$, "setAlignment", +function (align) { +this.newAlign = align; +switch (align) { +case 3: +this.align = 0; +break; +case 4: +this.align = 2; +break; +default: +this.align = align; +break; +} +}, "~N"); +Clazz_defineMethod (c$, "getHgap", +function () { +return this.hgap; +}); +Clazz_defineMethod (c$, "setHgap", +function (hgap) { +this.hgap = hgap; +}, "~N"); +Clazz_defineMethod (c$, "getVgap", +function () { +return this.vgap; +}); +Clazz_defineMethod (c$, "setVgap", +function (vgap) { +this.vgap = vgap; +}, "~N"); +Clazz_defineMethod (c$, "setAlignOnBaseline", +function (alignOnBaseline) { +this.alignOnBaseline = alignOnBaseline; +}, "~B"); +Clazz_defineMethod (c$, "getAlignOnBaseline", +function () { +return this.alignOnBaseline; +}); +Clazz_overrideMethod (c$, "addLayoutComponent", +function (name, comp) { +}, "~S,java.awt.Component"); +Clazz_overrideMethod (c$, "removeLayoutComponent", +function (comp) { +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "preferredLayoutSize", +function (target) { +{ +var dim = new java.awt.Dimension (0, 0); +var nmembers = target.getComponentCount (); +var firstVisibleComponent = true; +var useBaseline = this.getAlignOnBaseline (); +var maxAscent = 0; +var maxDescent = 0; +for (var i = 0; i < nmembers; i++) { +var m = target.getComponent (i); +if (m.isVisible ()) { +var d = m.getPreferredSize (); +dim.height = Math.max (dim.height, d.height); +if (firstVisibleComponent) { +firstVisibleComponent = false; +} else { +dim.width += this.hgap; +}dim.width += d.width; +if (useBaseline) { +var baseline = m.getBaseline (d.width, d.height); +if (baseline >= 0) { +maxAscent = Math.max (maxAscent, baseline); +maxDescent = Math.max (maxDescent, d.height - baseline); +}}}} +if (useBaseline) { +dim.height = Math.max (maxAscent + maxDescent, dim.height); +}var insets = target.getInsets (); +dim.width += insets.left + insets.right + this.hgap * 2; +dim.height += insets.top + insets.bottom + this.vgap * 2; +return dim; +}}, "java.awt.Container"); +Clazz_overrideMethod (c$, "minimumLayoutSize", +function (target) { +{ +var useBaseline = this.getAlignOnBaseline (); +var dim = new java.awt.Dimension (0, 0); +var nmembers = target.getComponentCount (); +var maxAscent = 0; +var maxDescent = 0; +var firstVisibleComponent = true; +for (var i = 0; i < nmembers; i++) { +var m = target.getComponent (i); +if (m.visible) { +var d = m.getMinimumSize (); +dim.height = Math.max (dim.height, d.height); +if (firstVisibleComponent) { +firstVisibleComponent = false; +} else { +dim.width += this.hgap; +}dim.width += d.width; +if (useBaseline) { +var baseline = m.getBaseline (d.width, d.height); +if (baseline >= 0) { +maxAscent = Math.max (maxAscent, baseline); +maxDescent = Math.max (maxDescent, dim.height - baseline); +}}}} +if (useBaseline) { +dim.height = Math.max (maxAscent + maxDescent, dim.height); +}var insets = target.getInsets (); +dim.width += insets.left + insets.right + this.hgap * 2; +dim.height += insets.top + insets.bottom + this.vgap * 2; +return dim; +}}, "java.awt.Container"); +Clazz_defineMethod (c$, "moveComponents", + function (target, x, y, width, height, rowStart, rowEnd, ltr, useBaseline, ascent, descent) { +switch (this.newAlign) { +case 0: +x += ltr ? 0 : width; +break; +case 1: +x += Clazz_doubleToInt (width / 2); +break; +case 2: +x += ltr ? width : 0; +break; +case 3: +break; +case 4: +x += width; +break; +} +var maxAscent = 0; +var nonbaselineHeight = 0; +var baselineOffset = 0; +if (useBaseline) { +var maxDescent = 0; +for (var i = rowStart; i < rowEnd; i++) { +var m = target.getComponent (i); +if (m.visible) { +if (ascent[i] >= 0) { +maxAscent = Math.max (maxAscent, ascent[i]); +maxDescent = Math.max (maxDescent, descent[i]); +} else { +nonbaselineHeight = Math.max (m.getHeight (), nonbaselineHeight); +}}} +height = Math.max (maxAscent + maxDescent, nonbaselineHeight); +baselineOffset = Clazz_doubleToInt ((height - maxAscent - maxDescent) / 2); +}for (var i = rowStart; i < rowEnd; i++) { +var m = target.getComponent (i); +if (m.isVisible ()) { +var cy; +if (useBaseline && ascent[i] >= 0) { +cy = y + baselineOffset + maxAscent - ascent[i]; +} else { +cy = y + Clazz_doubleToInt ((height - m.height) / 2); +}if (ltr) { +m.setLocation (x, cy); +} else { +m.setLocation (target.width - x - m.width, cy); +}x += m.width + this.hgap; +}} +return height; +}, "java.awt.Container,~N,~N,~N,~N,~N,~N,~B,~B,~A,~A"); +Clazz_overrideMethod (c$, "layoutContainer", +function (target) { +System.out.println ("FlowLayout laying out " + target); +{ +var insets = target.getInsets (); +var maxwidth = target.width - (insets.left + insets.right + this.hgap * 2); +var nmembers = target.getComponentCount (); +var x = 0; +var y = insets.top + this.vgap; +var rowh = 0; +var start = 0; +var ltr = target.getComponentOrientation ().isLeftToRight (); +var useBaseline = this.getAlignOnBaseline (); +var ascent = null; +var descent = null; +if (useBaseline) { +ascent = Clazz_newIntArray (nmembers, 0); +descent = Clazz_newIntArray (nmembers, 0); +}for (var i = 0; i < nmembers; i++) { +var m = target.getComponent (i); +if (m.isVisible ()) { +var d = m.getPreferredSize (); +m.setSize (d.width, d.height); +if (useBaseline) { +var baseline = m.getBaseline (d.width, d.height); +if (baseline >= 0) { +ascent[i] = baseline; +descent[i] = d.height - baseline; +} else { +ascent[i] = -1; +}}if ((x == 0) || ((x + d.width) <= maxwidth)) { +if (x > 0) { +x += this.hgap; +}x += d.width; +rowh = Math.max (rowh, d.height); +} else { +rowh = this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, i, ltr, useBaseline, ascent, descent); +x = d.width; +y += this.vgap + rowh; +rowh = d.height; +start = i; +}}} +this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, nmembers, ltr, useBaseline, ascent, descent); +}}, "java.awt.Container"); +Clazz_overrideMethod (c$, "toString", +function () { +var str = ""; +switch (this.align) { +case 0: +str = ",align=left"; +break; +case 1: +str = ",align=center"; +break; +case 2: +str = ",align=right"; +break; +case 3: +str = ",align=leading"; +break; +case 4: +str = ",align=trailing"; +break; +} +return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + str + "]"; +}); +Clazz_defineStatics (c$, +"LEFT", 0, +"CENTER", 1, +"RIGHT", 2, +"LEADING", 3, +"TRAILING", 4); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.LayoutManager2"], "java.awt.BorderLayout", ["java.lang.IllegalArgumentException", "java.awt.Dimension"], function () { +c$ = Clazz_decorateAsClass (function () { +this.hgap = 0; +this.vgap = 0; +this.north = null; +this.west = null; +this.east = null; +this.south = null; +this.center = null; +this.firstLine = null; +this.lastLine = null; +this.firstItem = null; +this.lastItem = null; +Clazz_instantialize (this, arguments); +}, java.awt, "BorderLayout", null, [java.awt.LayoutManager2, java.io.Serializable]); +Clazz_makeConstructor (c$, +function () { +this.construct (0, 0); +}); +Clazz_makeConstructor (c$, +function (hgap, vgap) { +this.hgap = hgap; +this.vgap = vgap; +}, "~N,~N"); +Clazz_defineMethod (c$, "getHgap", +function () { +return this.hgap; +}); +Clazz_defineMethod (c$, "setHgap", +function (hgap) { +this.hgap = hgap; +}, "~N"); +Clazz_defineMethod (c$, "getVgap", +function () { +return this.vgap; +}); +Clazz_defineMethod (c$, "setVgap", +function (vgap) { +this.vgap = vgap; +}, "~N"); +Clazz_defineMethod (c$, "addLayoutComponent", +function (comp, constraints) { +{ +if ((constraints == null) || (Clazz_instanceOf (constraints, String))) { +this.addLayoutComponent (constraints, comp); +} else { +throw new IllegalArgumentException ("cannot add to layout: constraint must be a string (or null)"); +}}}, "java.awt.Component,~O"); +Clazz_defineMethod (c$, "addLayoutComponent", +function (name, comp) { +{ +if (name == null) { +name = "Center"; +}System.out.println ("BorderLayout adding " + name + " " + comp); +if ("Center".equals (name)) { +this.center = comp; +} else if ("North".equals (name)) { +this.north = comp; +} else if ("South".equals (name)) { +this.south = comp; +} else if ("East".equals (name)) { +this.east = comp; +} else if ("West".equals (name)) { +this.west = comp; +} else if ("First".equals (name)) { +this.firstLine = comp; +} else if ("Last".equals (name)) { +this.lastLine = comp; +} else if ("Before".equals (name)) { +this.firstItem = comp; +} else if ("After".equals (name)) { +this.lastItem = comp; +} else { +throw new IllegalArgumentException ("cannot add to layout: unknown constraint: " + name); +}}}, "~S,java.awt.Component"); +Clazz_overrideMethod (c$, "removeLayoutComponent", +function (comp) { +{ +if (comp === this.center) { +this.center = null; +} else if (comp === this.north) { +this.north = null; +} else if (comp === this.south) { +this.south = null; +} else if (comp === this.east) { +this.east = null; +} else if (comp === this.west) { +this.west = null; +}if (comp === this.firstLine) { +this.firstLine = null; +} else if (comp === this.lastLine) { +this.lastLine = null; +} else if (comp === this.firstItem) { +this.firstItem = null; +} else if (comp === this.lastItem) { +this.lastItem = null; +}}}, "java.awt.Component"); +Clazz_defineMethod (c$, "getLayoutComponent", +function (constraints) { +if ("Center".equals (constraints)) { +return this.center; +} else if ("North".equals (constraints)) { +return this.north; +} else if ("South".equals (constraints)) { +return this.south; +} else if ("West".equals (constraints)) { +return this.west; +} else if ("East".equals (constraints)) { +return this.east; +} else if ("First".equals (constraints)) { +return this.firstLine; +} else if ("Last".equals (constraints)) { +return this.lastLine; +} else if ("Before".equals (constraints)) { +return this.firstItem; +} else if ("After".equals (constraints)) { +return this.lastItem; +} else { +throw new IllegalArgumentException ("cannot get component: unknown constraint: " + constraints); +}}, "~O"); +Clazz_defineMethod (c$, "getLayoutComponent", +function (target, constraints) { +var ltr = target.getComponentOrientation ().isLeftToRight (); +var result = null; +if ("North".equals (constraints)) { +result = (this.firstLine != null) ? this.firstLine : this.north; +} else if ("South".equals (constraints)) { +result = (this.lastLine != null) ? this.lastLine : this.south; +} else if ("West".equals (constraints)) { +result = ltr ? this.firstItem : this.lastItem; +if (result == null) { +result = this.west; +}} else if ("East".equals (constraints)) { +result = ltr ? this.lastItem : this.firstItem; +if (result == null) { +result = this.east; +}} else if ("Center".equals (constraints)) { +result = this.center; +} else { +throw new IllegalArgumentException ("cannot get component: invalid constraint: " + constraints); +}return result; +}, "java.awt.Container,~O"); +Clazz_defineMethod (c$, "getConstraints", +function (comp) { +if (comp == null) { +return null; +}if (comp === this.center) { +return "Center"; +} else if (comp === this.north) { +return "North"; +} else if (comp === this.south) { +return "South"; +} else if (comp === this.west) { +return "West"; +} else if (comp === this.east) { +return "East"; +} else if (comp === this.firstLine) { +return "First"; +} else if (comp === this.lastLine) { +return "Last"; +} else if (comp === this.firstItem) { +return "Before"; +} else if (comp === this.lastItem) { +return "After"; +}return null; +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "minimumLayoutSize", +function (target) { +{ +var dim = new java.awt.Dimension (0, 0); +var ltr = target.getComponentOrientation ().isLeftToRight (); +var c = null; +if ((c = this.getChild ("East", ltr)) != null) { +var d = c.getMinimumSize (); +dim.width += d.width + this.hgap; +dim.height = Math.max (d.height, dim.height); +}if ((c = this.getChild ("West", ltr)) != null) { +var d = c.getMinimumSize (); +dim.width += d.width + this.hgap; +dim.height = Math.max (d.height, dim.height); +}if ((c = this.getChild ("Center", ltr)) != null) { +var d = c.getMinimumSize (); +dim.width += d.width; +dim.height = Math.max (d.height, dim.height); +}if ((c = this.getChild ("North", ltr)) != null) { +var d = c.getMinimumSize (); +dim.width = Math.max (d.width, dim.width); +dim.height += d.height + this.vgap; +}if ((c = this.getChild ("South", ltr)) != null) { +var d = c.getMinimumSize (); +dim.width = Math.max (d.width, dim.width); +dim.height += d.height + this.vgap; +}var insets = target.getInsets (); +dim.width += insets.left + insets.right; +dim.height += insets.top + insets.bottom; +return dim; +}}, "java.awt.Container"); +Clazz_overrideMethod (c$, "preferredLayoutSize", +function (target) { +{ +var dim = new java.awt.Dimension (0, 0); +var ltr = target.getComponentOrientation ().isLeftToRight (); +var c = null; +if ((c = this.getChild ("East", ltr)) != null) { +var d = c.getPreferredSize (); +dim.width += d.width + this.hgap; +dim.height = Math.max (d.height, dim.height); +}if ((c = this.getChild ("West", ltr)) != null) { +var d = c.getPreferredSize (); +dim.width += d.width + this.hgap; +dim.height = Math.max (d.height, dim.height); +}if ((c = this.getChild ("Center", ltr)) != null) { +var d = c.getPreferredSize (); +dim.width += d.width; +dim.height = Math.max (d.height, dim.height); +}if ((c = this.getChild ("North", ltr)) != null) { +var d = c.getPreferredSize (); +dim.width = Math.max (d.width, dim.width); +dim.height += d.height + this.vgap; +}if ((c = this.getChild ("South", ltr)) != null) { +var d = c.getPreferredSize (); +dim.width = Math.max (d.width, dim.width); +dim.height += d.height + this.vgap; +}var insets = target.getInsets (); +dim.width += insets.left + insets.right; +dim.height += insets.top + insets.bottom; +return dim; +}}, "java.awt.Container"); +Clazz_overrideMethod (c$, "maximumLayoutSize", +function (target) { +return new java.awt.Dimension (2147483647, 2147483647); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayoutAlignmentX", +function (parent) { +return 0.5; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayoutAlignmentY", +function (parent) { +return 0.5; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "invalidateLayout", +function (target) { +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "layoutContainer", +function (target) { +System.out.println ("BorderLayout laying out " + target); +{ +var insets = target.getInsets (); +var top = insets.top; +var bottom = target.height - insets.bottom; +var left = insets.left; +var right = target.width - insets.right; +var ltr = target.getComponentOrientation ().isLeftToRight (); +var c = null; +if ((c = this.getChild ("North", ltr)) != null) { +c.setSize (right - left, c.height); +var d = c.getPreferredSize (); +c.setBounds (left, top, right - left, d.height); +top += d.height + this.vgap; +}if ((c = this.getChild ("South", ltr)) != null) { +c.setSize (right - left, c.height); +var d = c.getPreferredSize (); +c.setBounds (left, bottom - d.height, right - left, d.height); +bottom -= d.height + this.vgap; +}if ((c = this.getChild ("East", ltr)) != null) { +c.setSize (c.width, bottom - top); +var d = c.getPreferredSize (); +c.setBounds (right - d.width, top, d.width, bottom - top); +right -= d.width + this.hgap; +}if ((c = this.getChild ("West", ltr)) != null) { +c.setSize (c.width, bottom - top); +var d = c.getPreferredSize (); +c.setBounds (left, top, d.width, bottom - top); +left += d.width + this.hgap; +}if ((c = this.getChild ("Center", ltr)) != null) { +c.setBounds (left, top, right - left, bottom - top); +}}}, "java.awt.Container"); +Clazz_defineMethod (c$, "getChild", + function (key, ltr) { +var result = null; +if (key === "North") { +result = (this.firstLine != null) ? this.firstLine : this.north; +} else if (key === "South") { +result = (this.lastLine != null) ? this.lastLine : this.south; +} else if (key === "West") { +result = ltr ? this.firstItem : this.lastItem; +if (result == null) { +result = this.west; +}} else if (key === "East") { +result = ltr ? this.lastItem : this.firstItem; +if (result == null) { +result = this.east; +}} else if (key === "Center") { +result = this.center; +}if (result != null && !result.visible) { +result = null; +}return result; +}, "~S,~B"); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + "]"; +}); +Clazz_defineStatics (c$, +"NORTH", "North", +"SOUTH", "South", +"EAST", "East", +"WEST", "West", +"CENTER", "Center", +"BEFORE_FIRST_LINE", "First", +"AFTER_LAST_LINE", "Last", +"BEFORE_LINE_BEGINS", "Before", +"AFTER_LINE_ENDS", "After"); +c$.PAGE_START = c$.prototype.PAGE_START = "First"; +c$.PAGE_END = c$.prototype.PAGE_END = "Last"; +c$.LINE_START = c$.prototype.LINE_START = "Before"; +c$.LINE_END = c$.prototype.LINE_END = "After"; +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.LayoutManager"], "java.awt.LayoutManager2", null, function () { +Clazz_declareInterface (java.awt, "LayoutManager2", java.awt.LayoutManager); +}); +Clazz_declarePackage ("java.awt"); +Clazz_declareInterface (java.awt, "LayoutManager"); +Clazz_declarePackage ("java.awt"); +Clazz_load (["jssun.awt.SunGraphicsCallback"], "java.awt.GraphicsCallback", null, function () { +c$ = Clazz_declareType (java.awt, "GraphicsCallback", jssun.awt.SunGraphicsCallback); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintCallback", java.awt.GraphicsCallback); +Clazz_makeConstructor (c$, + function () { +Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintCallback, []); +}); +Clazz_overrideMethod (c$, "run", +function (a, b) { +a.paint (b); +}, "java.awt.Component,java.awt.Graphics"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function () { +return java.awt.GraphicsCallback.PaintCallback.instance; +}); +c$.instance = c$.prototype.instance = new java.awt.GraphicsCallback.PaintCallback (); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintAllCallback", java.awt.GraphicsCallback); +Clazz_makeConstructor (c$, + function () { +Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintAllCallback, []); +}); +Clazz_overrideMethod (c$, "run", +function (a, b) { +a.paintAll (b); +}, "java.awt.Component,java.awt.Graphics"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function () { +return java.awt.GraphicsCallback.PaintAllCallback.instance; +}); +c$.instance = c$.prototype.instance = new java.awt.GraphicsCallback.PaintAllCallback (); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintHeavyweightComponentsCallback", java.awt.GraphicsCallback); +Clazz_makeConstructor (c$, + function () { +Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback, []); +}); +Clazz_overrideMethod (c$, "run", +function (a, b) { +if (a.isLightweight ()) { +a.paintHeavyweightComponents (b); +} else { +a.paintAll (b); +}}, "java.awt.Component,java.awt.Graphics"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function () { +return java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.instance; +}); +c$.instance = c$.prototype.instance = new java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback (); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.Component", "java.awt.event.AWTEventListener"], ["java.awt.LightweightDispatcher", "$.Container"], ["java.lang.ArrayIndexOutOfBoundsException", "$.IllegalArgumentException", "$.IllegalStateException", "java.util.ArrayList", "java.awt.AWTEventMulticaster", "$.Dimension", "$.GraphicsCallback", "$.Insets", "$.LayoutManager2", "$.Toolkit", "java.awt.event.ContainerEvent", "$.ContainerListener", "$.MouseEvent", "$.MouseWheelEvent", "java.awt.peer.ContainerPeer", "$.LightweightPeer"], function () { +c$ = Clazz_decorateAsClass (function () { +this.component = null; +this.layoutMgr = null; +this.dispatcher = null; +this.focusCycleRoot = false; +this.focusTraversalPolicyProvider = false; +this.containerListener = null; +this.listeningChildren = 0; +this.listeningBoundsChildren = 0; +this.descendantsCount = 0; +this.preserveBackgroundColor = null; +this.numOfHWComponents = 0; +this.numOfLWComponents = 0; +this.modalComp = null; +this.modalAppContext = null; +Clazz_instantialize (this, arguments); +}, java.awt, "Container", java.awt.Component); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.Container, []); +this.component = new java.util.ArrayList (); +}); +Clazz_defineMethod (c$, "initializeFocusTraversalKeys", +function () { +}); +Clazz_defineMethod (c$, "getComponentCount", +function () { +return this.countComponents (); +}); +Clazz_defineMethod (c$, "countComponents", +function () { +return this.component.size (); +}); +Clazz_defineMethod (c$, "getComponent", +function (n) { +if ((n < 0) || (n >= this.component.size ())) { +throw new ArrayIndexOutOfBoundsException ("No such child: " + n); +}return this.component.get (n); +}, "~N"); +Clazz_defineMethod (c$, "getComponents", +function () { +return this.getComponents_NoClientCode (); +}); +Clazz_defineMethod (c$, "getComponents_NoClientCode", +function () { +return this.component.toArray (java.awt.Container.EMPTY_ARRAY); +}); +Clazz_defineMethod (c$, "getInsets", +function () { +var peer = this.peer; +if (Clazz_instanceOf (peer, java.awt.peer.ContainerPeer)) { +var cpeer = peer; +return cpeer.getInsets ().clone (); +}return new java.awt.Insets (0, 0, 0, 0); +}); +Clazz_defineMethod (c$, "add", +function (comp) { +return this.addImpl (comp, null, -1); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "add", +function (name, comp) { +return this.addImpl (comp, name, -1); +}, "~S,java.awt.Component"); +Clazz_defineMethod (c$, "add", +function (comp, index) { +return this.addImpl (comp, null, index); +}, "java.awt.Component,~N"); +Clazz_defineMethod (c$, "checkAddToSelf", + function (comp) { +if (Clazz_instanceOf (comp, java.awt.Container)) { +for (var cn = this; cn != null; cn = cn.parent) { +if (cn === comp) { +throw new IllegalArgumentException ("adding container's parent to itself"); +}} +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "checkNotAWindow", + function (comp) { +if (Clazz_instanceOf (comp, java.awt.Window)) { +throw new IllegalArgumentException ("adding a window to a container"); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "removeDelicately", + function (comp, newParent, newIndex) { +var index = this.getComponentZOrder (comp); +var needRemoveNotify = java.awt.Container.isRemoveNotifyNeeded (comp, this, newParent); +if (needRemoveNotify) { +comp.removeNotify (); +}if (newParent !== this) { +if (this.layoutMgr != null) { +this.layoutMgr.removeLayoutComponent (comp); +}this.adjustListeningChildren (32768, -comp.numListening (32768)); +this.adjustListeningChildren (65536, -comp.numListening (65536)); +this.adjustDescendants (-(comp.countHierarchyMembers ())); +comp.parent = null; +this.component.remove (index); +this.invalidateIfValid (); +} else { +this.component.remove (index); +this.component.add (newIndex, comp); +}if (comp.parent == null) { +if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { +var e = new java.awt.event.ContainerEvent (this, 301, comp); +this.dispatchEvent (e); +}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); +if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { +this.updateCursorImmediately (); +}}return needRemoveNotify; +}, "java.awt.Component,java.awt.Container,~N"); +Clazz_defineMethod (c$, "canContainFocusOwner", +function (focusOwnerCandidate) { +if (!(this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ())) { +return false; +}{ +if (this.parent != null) { +return this.parent.canContainFocusOwner (focusOwnerCandidate); +}}return true; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "hasHeavyweightDescendants", +function () { +return this.numOfHWComponents > 0; +}); +Clazz_defineMethod (c$, "hasLightweightDescendants", +function () { +return this.numOfLWComponents > 0; +}); +Clazz_defineMethod (c$, "getHeavyweightContainer", +function () { +if (this.peer != null && !(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) { +return this; +} else { +return this.getNativeContainer (); +}}); +c$.isRemoveNotifyNeeded = Clazz_defineMethod (c$, "isRemoveNotifyNeeded", + function (comp, oldContainer, newContainer) { +return false; +}, "java.awt.Component,java.awt.Container,java.awt.Container"); +Clazz_defineMethod (c$, "setComponentZOrder", +function (comp, index) { +{ +var curParent = comp.parent; +var oldZindex = this.getComponentZOrder (comp); +if (curParent === this && index == oldZindex) { +return; +}var peerRecreated = (curParent != null) ? curParent.removeDelicately (comp, this, index) : false; +this.addDelicately (comp, curParent, index); +if (!peerRecreated && oldZindex != -1) { +comp.mixOnZOrderChanging (oldZindex, index); +}}}, "java.awt.Component,~N"); +Clazz_defineMethod (c$, "reparentTraverse", + function (parentPeer, child) { +this.checkTreeLock (); +for (var i = 0; i < child.getComponentCount (); i++) { +var comp = child.getComponent (i); +if (comp.isLightweight ()) { +if (Clazz_instanceOf (comp, java.awt.Container)) { +this.reparentTraverse (parentPeer, comp); +}} else { +comp.getPeer ().reparent (parentPeer); +}} +}, "java.awt.peer.ContainerPeer,java.awt.Container"); +Clazz_defineMethod (c$, "reparentChild", + function (comp) { +if (comp == null) { +return; +}if (comp.isLightweight ()) { +if (Clazz_instanceOf (comp, java.awt.Container)) { +this.reparentTraverse (this.getPeer (), comp); +}} else { +comp.getPeer ().reparent (this.getPeer ()); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "addDelicately", + function (comp, curParent, index) { +this.checkTreeLock (); +if (curParent !== this) { +if (index == -1) { +this.component.add (comp); +} else { +this.component.add (index, comp); +}comp.parent = this; +this.adjustListeningChildren (32768, comp.numListening (32768)); +this.adjustListeningChildren (65536, comp.numListening (65536)); +this.adjustDescendants (comp.countHierarchyMembers ()); +} else { +if (index < this.component.size ()) { +this.component.set (index, comp); +}}this.invalidateIfValid (); +if (this.peer != null) { +if (comp.peer == null) { +comp.addNotify (); +} else { +var newNativeContainer = this.getHeavyweightContainer (); +var oldNativeContainer = curParent.getHeavyweightContainer (); +if (oldNativeContainer !== newNativeContainer) { +newNativeContainer.reparentChild (comp); +}if (!comp.isLightweight () && this.isLightweight ()) { +comp.relocateComponent (); +}}}if (curParent !== this) { +if (this.layoutMgr != null) { +if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { +(this.layoutMgr).addLayoutComponent (comp, null); +} else { +this.layoutMgr.addLayoutComponent (null, comp); +}}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { +var e = new java.awt.event.ContainerEvent (this, 300, comp); +this.dispatchEvent (e); +}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); +} else { +comp.createHierarchyEvents (1400, comp, this, 1400, java.awt.Toolkit.enabledOnToolkit (32768)); +}if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { +this.updateCursorImmediately (); +}}, "java.awt.Component,java.awt.Container,~N"); +Clazz_defineMethod (c$, "checkTreeLock", + function () { +}); +Clazz_defineMethod (c$, "getComponentZOrder", +function (comp) { +if (comp == null) { +return -1; +}{ +if (comp.parent !== this) { +return -1; +}return this.component.indexOf (comp); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "add", +function (comp, constraints) { +this.addImpl (comp, constraints, -1); +}, "java.awt.Component,~O"); +Clazz_defineMethod (c$, "add", +function (comp, constraints, index) { +return this.addImpl (comp, constraints, index); +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "addImpl", +function (comp, constraints, index) { +return this.addImplSAEM (comp, constraints, index); +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "addImplSAEM", +function (comp, constraints, index) { +{ +if (index > this.component.size () || (index < 0 && index != -1)) { +throw new IllegalArgumentException ("illegal component position"); +}this.checkAddToSelf (comp); +this.checkNotAWindow (comp); +if (comp.parent != null) { +comp.parent.remove (comp); +if (index > this.component.size ()) { +throw new IllegalArgumentException ("illegal component position"); +}}if (index == -1) { +this.component.add (comp); +} else { +this.component.add (index, comp); +}comp.parent = this; +this.adjustListeningChildren (32768, comp.numListening (32768)); +this.adjustListeningChildren (65536, comp.numListening (65536)); +this.adjustDescendants (comp.countHierarchyMembers ()); +this.invalidateIfValid (); +if (this.peer != null) { +comp.addNotify (); +}if (this.layoutMgr != null) { +if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { +(this.layoutMgr).addLayoutComponent (comp, constraints); +} else if (Clazz_instanceOf (constraints, String)) { +this.layoutMgr.addLayoutComponent (constraints, comp); +}}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { +var e = new java.awt.event.ContainerEvent (this, 300, comp); +this.dispatchEvent (e); +}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); +if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { +this.updateCursorImmediately (); +}}return comp; +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "checkGD", +function (stringID) { +}, "~S"); +Clazz_defineMethod (c$, "remove", +function (index) { +this.removeInt (index); +}, "~N"); +Clazz_defineMethod (c$, "removeInt", +function (index) { +{ +if (index < 0 || index >= this.component.size ()) { +throw new ArrayIndexOutOfBoundsException (index); +}var comp = this.component.get (index); +if (this.peer != null) { +comp.removeNotify (); +}if (this.layoutMgr != null) { +this.layoutMgr.removeLayoutComponent (comp); +}this.adjustListeningChildren (32768, -comp.numListening (32768)); +this.adjustListeningChildren (65536, -comp.numListening (65536)); +this.adjustDescendants (-(comp.countHierarchyMembers ())); +comp.parent = null; +this.component.remove (index); +this.invalidateIfValid (); +if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { +var e = new java.awt.event.ContainerEvent (this, 301, comp); +this.dispatchEvent (e); +}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); +if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { +this.updateCursorImmediately (); +}}}, "~N"); +Clazz_defineMethod (c$, "remove", +function (comp) { +this.removeChild (comp); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "removeChild", +function (comp) { +{ +if (comp.parent === this) { +var index = this.component.indexOf (comp); +if (index >= 0) { +this.remove (index); +}}}}, "java.awt.Component"); +Clazz_defineMethod (c$, "removeAll", +function () { +{ +this.adjustListeningChildren (32768, -this.listeningChildren); +this.adjustListeningChildren (65536, -this.listeningBoundsChildren); +this.adjustDescendants (-this.descendantsCount); +while (!this.component.isEmpty ()) { +var comp = this.component.remove (this.component.size () - 1); +if (this.peer != null) { +comp.removeNotify (); +}if (this.layoutMgr != null) { +this.layoutMgr.removeLayoutComponent (comp); +}comp.parent = null; +if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { +var e = new java.awt.event.ContainerEvent (this, 301, comp); +this.dispatchEvent (e); +}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); +} +if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { +this.updateCursorImmediately (); +}this.invalidateIfValid (); +}}); +Clazz_defineMethod (c$, "numListening", +function (mask) { +var superListening = this.numListeningMask (mask); +if (mask == 32768) { +return this.listeningChildren + superListening; +} else if (mask == 65536) { +return this.listeningBoundsChildren + superListening; +} else { +return superListening; +}}, "~N"); +Clazz_defineMethod (c$, "adjustListeningChildren", +function (mask, num) { +if (num == 0) return; +if ((mask & 32768) != 0) { +this.listeningChildren += num; +}if ((mask & 65536) != 0) { +this.listeningBoundsChildren += num; +}this.adjustListeningChildrenOnParent (mask, num); +}, "~N,~N"); +Clazz_defineMethod (c$, "adjustDescendants", +function (num) { +if (num == 0) return; +this.descendantsCount += num; +this.adjustDecendantsOnParent (num); +}, "~N"); +Clazz_defineMethod (c$, "adjustDecendantsOnParent", +function (num) { +if (this.parent != null) { +this.parent.adjustDescendants (num); +}}, "~N"); +Clazz_defineMethod (c$, "countHierarchyMembers", +function () { +return this.descendantsCount + 1; +}); +Clazz_defineMethod (c$, "getListenersCount", + function (id, enabledOnToolkit) { +if (enabledOnToolkit) { +return this.descendantsCount; +}switch (id) { +case 1400: +return this.listeningChildren; +case 1401: +case 1402: +return this.listeningBoundsChildren; +default: +return 0; +} +}, "~N,~B"); +Clazz_defineMethod (c$, "createHierarchyEvents", +function (id, changed, changedParent, changeFlags, enabledOnToolkit) { +var listeners = this.getListenersCount (id, enabledOnToolkit); +for (var count = listeners, i = 0; count > 0; i++) { +count -= this.component.get (i).createHierarchyEvents (id, changed, changedParent, changeFlags, enabledOnToolkit); +} +return listeners + this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit); +}, "~N,java.awt.Component,java.awt.Container,~N,~B"); +Clazz_defineMethod (c$, "createChildHierarchyEvents", +function (id, changeFlags, enabledOnToolkit) { +if (this.component.isEmpty ()) { +return; +}var listeners = this.getListenersCount (id, enabledOnToolkit); +for (var count = listeners, i = 0; count > 0; i++) { +count -= this.component.get (i).createHierarchyEvents (id, this, this.parent, changeFlags, enabledOnToolkit); +} +}, "~N,~N,~B"); +Clazz_defineMethod (c$, "getLayout", +function () { +return this.layoutMgr; +}); +Clazz_defineMethod (c$, "setLayout", +function (mgr) { +this.layoutMgr = mgr; +this.invalidateIfValid (); +}, "java.awt.LayoutManager"); +Clazz_overrideMethod (c$, "doLayout", +function () { +this.layout (); +}); +Clazz_overrideMethod (c$, "layout", +function () { +var layoutMgr = this.layoutMgr; +if (layoutMgr != null) { +layoutMgr.layoutContainer (this); +}}); +Clazz_overrideMethod (c$, "invalidate", +function () { +var layoutMgr = this.layoutMgr; +if (Clazz_instanceOf (layoutMgr, java.awt.LayoutManager2)) { +var lm = layoutMgr; +lm.invalidateLayout (this); +}this.invalidateComp (); +}); +Clazz_overrideMethod (c$, "validate", +function () { +if (!this.isValid ()) { +var updateCur = false; +{ +if (!this.isValid () && this.peer != null) { +var p = null; +if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) { +p = this.peer; +}if (p != null) { +p.beginValidate (); +}this.validateTree (); +if (p != null) { +p.endValidate (); +updateCur = this.isVisible (); +}}}if (updateCur) { +this.updateCursorImmediately (); +}}}); +Clazz_defineMethod (c$, "validateTree", +function () { +if (!this.isValid ()) { +if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) { +(this.peer).beginLayout (); +}this.doLayout (); +for (var i = 0; i < this.component.size (); i++) { +var comp = this.component.get (i); +if ((Clazz_instanceOf (comp, java.awt.Container)) && !(Clazz_instanceOf (comp, java.awt.Window)) && !comp.isValid ()) { +(comp).validateTree (); +} else { +comp.validate (); +}} +if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) { +(this.peer).endLayout (); +}}this.validateComponent (); +}); +Clazz_defineMethod (c$, "invalidateTree", +function () { +{ +for (var i = 0; i < this.component.size (); i++) { +var comp = this.component.get (i); +if (Clazz_instanceOf (comp, java.awt.Container)) { +(comp).invalidateTree (); +} else { +comp.invalidateIfValid (); +}} +this.invalidateIfValid (); +}}); +Clazz_overrideMethod (c$, "setFont", +function (f) { +var oldfont = this.getFont (); +this.setFontComp (f); +var newfont = this.getFont (); +if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) { +this.invalidateTree (); +}}, "java.awt.Font"); +Clazz_overrideMethod (c$, "getPreferredSize", +function () { +return this.preferredSize (); +}); +Clazz_overrideMethod (c$, "preferredSize", +function () { +var dim = this.prefSize; +if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) { +{ +this.prefSize = (this.layoutMgr != null) ? this.layoutMgr.preferredLayoutSize (this) : this.prefSizeComp (); +dim = this.prefSize; +}}return (dim == null ? null : new java.awt.Dimension (dim)); +}); +Clazz_overrideMethod (c$, "getMinimumSize", +function () { +var dim = this.minSize; +if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) { +{ +this.minSize = (this.layoutMgr != null) ? this.layoutMgr.minimumLayoutSize (this) : this.minimumSize (); +dim = this.minSize; +}}if (dim != null) { +return new java.awt.Dimension (dim); +} else { +return dim; +}}); +Clazz_overrideMethod (c$, "getMaximumSize", +function () { +var dim = this.maxSize; +if (dim == null || !(this.isMaximumSizeSet () || this.isValid ())) { +{ +if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { +var lm = this.layoutMgr; +this.maxSize = lm.maximumLayoutSize (this); +} else { +this.maxSize = this.getMaxSizeComp (); +}dim = this.maxSize; +}}if (dim != null) { +return new java.awt.Dimension (dim); +} else { +return dim; +}}); +Clazz_overrideMethod (c$, "getAlignmentX", +function () { +var xAlign; +if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { +{ +var lm = this.layoutMgr; +xAlign = lm.getLayoutAlignmentX (this); +}} else { +xAlign = this.getAlignmentXComp (); +}return xAlign; +}); +Clazz_overrideMethod (c$, "getAlignmentY", +function () { +var yAlign; +if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { +{ +var lm = this.layoutMgr; +yAlign = lm.getLayoutAlignmentY (this); +}} else { +yAlign = this.getAlignmentYComp (); +}return yAlign; +}); +Clazz_overrideMethod (c$, "paint", +function (g) { +java.awt.GraphicsCallback.PaintCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 2); +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "update", +function (g) { +if (this.isShowing ()) { +g.clearRect (0, 0, this.width, this.height); +this.paint (g); +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintComponents", +function (g) { +if (this.isShowing ()) { +java.awt.GraphicsCallback.PaintAllCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 4); +}}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "lightweightPaint", +function (g) { +this.lwPaintComp (g); +this.paintHeavyweightComponents (g); +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "paintHeavyweightComponents", +function (g) { +if (this.isShowing ()) { +java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 3); +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "addContainerListener", +function (l) { +if (l == null) { +return; +}this.containerListener = java.awt.AWTEventMulticaster.add (this.containerListener, l); +this.newEventsOnly = true; +}, "java.awt.event.ContainerListener"); +Clazz_defineMethod (c$, "removeContainerListener", +function (l) { +if (l == null) { +return; +}this.containerListener = java.awt.AWTEventMulticaster.remove (this.containerListener, l); +}, "java.awt.event.ContainerListener"); +Clazz_defineMethod (c$, "getContainerListeners", +function () { +return (this.getListeners (java.awt.event.ContainerListener)); +}); +Clazz_overrideMethod (c$, "getListeners", +function (listenerType) { +var l = null; +if (listenerType === java.awt.event.ContainerListener) { +l = this.containerListener; +} else { +return this.getListenersComp (listenerType); +}return java.awt.AWTEventMulticaster.getListeners (l, listenerType); +}, "Class"); +Clazz_overrideMethod (c$, "eventEnabled", +function (e) { +var id = e.getID (); +if (id == 300 || id == 301) { +if ((this.eventMask & 2) != 0 || this.containerListener != null) { +return true; +}return false; +}return this.eventTypeEnabled (e.id); +}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "processEvent", +function (e) { +this.processEventCont (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "processEventCont", +function (e) { +if (Clazz_instanceOf (e, java.awt.event.ContainerEvent)) { +this.processContainerEvent (e); +return; +}this.processEventComp (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "processContainerEvent", +function (e) { +var listener = this.containerListener; +if (listener != null) { +switch (e.getID ()) { +case 300: +listener.componentAdded (e); +break; +case 301: +listener.componentRemoved (e); +break; +} +}}, "java.awt.event.ContainerEvent"); +Clazz_overrideMethod (c$, "dispatchEventImpl", +function (e) { +if ((this.dispatcher != null) && this.dispatcher.dispatchEvent (e)) { +e.consume (); +if (this.peer != null) { +this.peer.handleEvent (e); +}return; +}this.dispatchEventImplComp (e); +{ +switch (e.getID ()) { +case 101: +break; +case 100: +break; +default: +break; +} +}}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "dispatchEventToSelf", +function (e) { +this.dispatchEventImplComp (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "getMouseEventTarget", + function (x, y, includeSelf, filter, searchHeavyweights) { +{ +if (arguments.length == 3) { +filter = java.awt.Container.MouseEventTargetFilter.FILTER; +searchHeavyWeights = false; +} +}var comp = null; +if (comp == null || comp === this) { +comp = this.getMouseEventTargetImpl (x, y, includeSelf, filter, false, searchHeavyweights); +}return comp; +}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B"); +Clazz_defineMethod (c$, "getMouseEventTargetImpl", + function (x, y, includeSelf, filter, searchHeavyweightChildren, searchHeavyweightDescendants) { +{ +for (var i = 0; i < this.component.size (); i++) { +var comp = this.component.get (i); +if (comp != null && comp.visible && ((!searchHeavyweightChildren && Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer)) || (searchHeavyweightChildren && !(Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer)))) && comp.contains (x - comp.x, y - comp.y)) { +if (Clazz_instanceOf (comp, java.awt.Container)) { +var child = comp; +var deeper = child.getMouseEventTarget (x - child.x, y - child.y, includeSelf, filter, searchHeavyweightDescendants); +if (deeper != null) { +return deeper; +}} else { +if (filter.accept (comp)) { +return comp; +}}}} +var isPeerOK; +var isMouseOverMe; +isPeerOK = includeSelf; +isMouseOverMe = this.contains (x, y); +if (isMouseOverMe && isPeerOK && filter.accept (this)) { +return this; +}return null; +}}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B,~B"); +Clazz_defineMethod (c$, "proxyEnableEvents", +function (events) { +if (this.parent != null) { +this.parent.proxyEnableEvents (events); +}if (this.dispatcher != null) { +this.dispatcher.enableEvents (events); +}}, "~N"); +Clazz_defineMethod (c$, "deliverEvent", +function (e) { +var comp = this.getComponentAt (e.x, e.y); +if ((comp != null) && (comp !== this)) { +e.translate (-comp.x, -comp.y); +comp.deliverEvent (e); +} else { +this.postEvent (e); +}}, "java.awt.Event"); +Clazz_defineMethod (c$, "getComponentAt", +function (x, y) { +return this.locate (x, y); +}, "~N,~N"); +Clazz_overrideMethod (c$, "locate", +function (x, y) { +return this; +}, "~N,~N"); +Clazz_defineMethod (c$, "getComponentAt", +function (p) { +return this.getComponentAt (p.x, p.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "getMousePosition", +function (allowChildren) { +return null; +}, "~B"); +Clazz_overrideMethod (c$, "isSameOrAncestorOf", +function (comp, allowChildren) { +return this === comp || (allowChildren && this.isParentOf (comp)); +}, "java.awt.Component,~B"); +Clazz_defineMethod (c$, "findComponentAt", +function (x, y) { +{ +return this.findComponentAt (x, y, true); +}}, "~N,~N"); +Clazz_defineMethod (c$, "findComponentAt", +function (x, y, ignoreEnabled) { +return null; +}, "~N,~N,~B"); +Clazz_defineMethod (c$, "findComponentAt", +function (p) { +return this.findComponentAt (p.x, p.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "addNotify", +function () { +{ +this.addNotifyComp (); +if (!(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) { +this.setDispatcher (); +}for (var i = 0; i < this.component.size (); i++) { +this.component.get (i).addNotify (); +} +}}); +Clazz_defineMethod (c$, "setDispatcher", +function () { +this.dispatcher = new java.awt.LightweightDispatcher (this); +}); +Clazz_defineMethod (c$, "removeNotify", +function () { +for (var i = this.component.size () - 1; i >= 0; i--) { +var comp = this.component.get (i); +if (comp != null) { +comp.setAutoFocusTransferOnDisposal (false); +comp.removeNotify (); +comp.setAutoFocusTransferOnDisposal (true); +}} +if (this.dispatcher != null) { +this.dispatcher.dispose (); +this.dispatcher = null; +}this.removeNotifyComp (); +}); +Clazz_defineMethod (c$, "isAncestorOf", +function (c) { +var p; +if (c == null || ((p = c.getParent ()) == null)) { +return false; +}while (p != null) { +if (p === this) { +return true; +}p = p.getParent (); +} +return false; +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "paramString", +function () { +var str = this.paramStringComp (); +var layoutMgr = this.layoutMgr; +if (layoutMgr != null) { +str += ",layout=" + layoutMgr.getClass ().getName (); +}return str; +}); +Clazz_defineMethod (c$, "setFocusTraversalKeys", +function (id, keystrokes) { +}, "~N,java.util.Set"); +Clazz_defineMethod (c$, "getFocusTraversalKeys", +function (id) { +return null; +}, "~N"); +Clazz_defineMethod (c$, "areFocusTraversalKeysSet", +function (id) { +return false; +}, "~N"); +Clazz_defineMethod (c$, "isFocusCycleRoot", +function (container) { +if (this.isFocusCycleRoot () && container === this) { +return true; +} else { +return this.isFocusCycleRootComp (container); +}}, "java.awt.Container"); +Clazz_overrideMethod (c$, "containsFocus", +function () { +return false; +}); +Clazz_defineMethod (c$, "isParentOf", + function (comp) { +{ +while (comp != null && comp !== this && !(Clazz_instanceOf (comp, java.awt.Window))) { +comp = comp.getParent (); +} +return (comp === this); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "clearMostRecentFocusOwnerOnHide", +function () { +}); +Clazz_overrideMethod (c$, "clearCurrentFocusCycleRootOnHide", +function () { +}); +Clazz_defineMethod (c$, "getTraversalRoot", +function () { +return null; +}); +Clazz_defineMethod (c$, "isFocusCycleRoot", +function () { +return this.focusCycleRoot; +}); +Clazz_defineMethod (c$, "setFocusTraversalPolicyProvider", +function (provider) { +var oldProvider; +{ +oldProvider = this.focusTraversalPolicyProvider; +this.focusTraversalPolicyProvider = provider; +}this.firePropertyChangeBool ("focusTraversalPolicyProvider", oldProvider, provider); +}, "~B"); +Clazz_defineMethod (c$, "isFocusTraversalPolicyProvider", +function () { +return this.focusTraversalPolicyProvider; +}); +Clazz_defineMethod (c$, "transferFocusDownCycle", +function () { +}); +Clazz_defineMethod (c$, "preProcessKeyEvent", +function (e) { +var parent = this.parent; +if (parent != null) { +parent.preProcessKeyEvent (e); +}}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "postProcessKeyEvent", +function (e) { +var parent = this.parent; +if (parent != null) { +parent.postProcessKeyEvent (e); +}}, "java.awt.event.KeyEvent"); +Clazz_overrideMethod (c$, "postsOldMouseEvents", +function () { +return true; +}); +Clazz_defineMethod (c$, "applyComponentOrientation", +function (o) { +this.applyCompOrientComp (o); +{ +for (var i = 0; i < this.component.size (); i++) { +var comp = this.component.get (i); +comp.applyComponentOrientation (o); +} +}}, "java.awt.ComponentOrientation"); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (listener) { +this.addPropChangeListenerComp (listener); +}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (propertyName, listener) { +this.addPropChangeListComp (propertyName, listener); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "increaseComponentCount", +function (c) { +if (!c.isDisplayable ()) { +throw new IllegalStateException ("Peer does not exist while invoking the increaseComponentCount() method"); +}var addHW = 0; +var addLW = 0; +if (Clazz_instanceOf (c, java.awt.Container)) { +addLW = (c).numOfLWComponents; +addHW = (c).numOfHWComponents; +}if (c.isLightweight ()) { +addLW++; +} else { +addHW++; +}for (var cont = this; cont != null; cont = cont.getContainer ()) { +cont.numOfLWComponents += addLW; +cont.numOfHWComponents += addHW; +} +}, "java.awt.Component"); +Clazz_defineMethod (c$, "decreaseComponentCount", +function (c) { +if (!c.isDisplayable ()) { +throw new IllegalStateException ("Peer does not exist while invoking the decreaseComponentCount() method"); +}var subHW = 0; +var subLW = 0; +if (Clazz_instanceOf (c, java.awt.Container)) { +subLW = (c).numOfLWComponents; +subHW = (c).numOfHWComponents; +}if (c.isLightweight ()) { +subLW++; +} else { +subHW++; +}for (var cont = this; cont != null; cont = cont.getContainer ()) { +cont.numOfLWComponents -= subLW; +cont.numOfHWComponents -= subHW; +} +}, "java.awt.Component"); +Clazz_declareInterface (java.awt.Container, "EventTargetFilter"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.Container, "MouseEventTargetFilter", null, java.awt.Container.EventTargetFilter); +Clazz_makeConstructor (c$, + function () { +}); +Clazz_overrideMethod (c$, "accept", +function (a) { +return (a.eventMask & 32) != 0 || (a.eventMask & 16) != 0 || (a.eventMask & 131072) != 0 || a.mouseListener != null || a.mouseMotionListener != null || a.mouseWheelListener != null; +}, "java.awt.Component"); +c$.FILTER = c$.prototype.FILTER = new java.awt.Container.MouseEventTargetFilter (); +c$ = Clazz_p0p (); +c$.EMPTY_ARRAY = c$.prototype.EMPTY_ARRAY = new Array (0); +Clazz_defineStatics (c$, +"INCLUDE_SELF", true, +"SEARCH_HEAVYWEIGHTS", true); +c$ = Clazz_decorateAsClass (function () { +this.nativeContainer = null; +this.mouseEventTarget = null; +this.targetLastEntered = null; +this.isMouseInNativeContainer = false; +this.eventMask = 0; +Clazz_instantialize (this, arguments); +}, java.awt, "LightweightDispatcher", null, java.awt.event.AWTEventListener); +Clazz_makeConstructor (c$, +function (nativeContainer) { +this.nativeContainer = nativeContainer; +this.mouseEventTarget = null; +this.eventMask = 0; +}, "java.awt.Container"); +Clazz_defineMethod (c$, "dispose", +function () { +this.stopListeningForOtherDrags (); +this.mouseEventTarget = null; +}); +Clazz_defineMethod (c$, "enableEvents", +function (events) { +this.eventMask |= events; +}, "~N"); +Clazz_defineMethod (c$, "dispatchEvent", +function (e) { +var ret = false; +if (Clazz_instanceOf (e, java.awt.event.MouseEvent) && (this.eventMask & 131120) != 0) { +var me = e; +ret = this.processMouseEvent (me); +}return ret; +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "isMouseGrab", + function (e) { +var modifiers = e.getModifiersEx (); +if (e.getID () == 501 || e.getID () == 502) { +switch (e.getButton ()) { +case 1: +modifiers ^= 1024; +break; +case 2: +modifiers ^= 2048; +break; +case 3: +modifiers ^= 4096; +break; +} +}return ((modifiers & (7168)) != 0); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "processMouseEvent", + function (e) { +var id = e.getID (); +var mouseOver = this.nativeContainer.getMouseEventTarget (e.getX (), e.getY (), true); +this.trackMouseEnterExit (mouseOver, e); +if (!this.isMouseGrab (e) && id != 500) { +this.mouseEventTarget = (mouseOver !== this.nativeContainer) ? mouseOver : null; +}if (this.mouseEventTarget != null) { +switch (id) { +case 504: +case 505: +break; +case 501: +this.retargetMouseEvent (this.mouseEventTarget, id, e); +break; +case 502: +this.retargetMouseEvent (this.mouseEventTarget, id, e); +break; +case 500: +if (mouseOver === this.mouseEventTarget) { +this.retargetMouseEvent (mouseOver, id, e); +}break; +case 503: +this.retargetMouseEvent (this.mouseEventTarget, id, e); +break; +case 506: +if (this.isMouseGrab (e)) { +this.retargetMouseEvent (this.mouseEventTarget, id, e); +}break; +case 507: +this.retargetMouseEvent (mouseOver, id, e); +break; +} +e.consume (); +}return e.isConsumed (); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "trackMouseEnterExit", + function (targetOver, e) { +var targetEnter = null; +var id = e.getID (); +if (id != 505 && id != 506 && id != 1500 && this.isMouseInNativeContainer == false) { +this.isMouseInNativeContainer = true; +this.startListeningForOtherDrags (); +} else if (id == 505) { +this.isMouseInNativeContainer = false; +this.stopListeningForOtherDrags (); +}if (this.isMouseInNativeContainer) { +targetEnter = targetOver; +}if (this.targetLastEntered === targetEnter) { +return; +}if (this.targetLastEntered != null) { +this.retargetMouseEvent (this.targetLastEntered, 505, e); +}if (id == 505) { +e.consume (); +}if (targetEnter != null) { +this.retargetMouseEvent (targetEnter, 504, e); +}if (id == 504) { +e.consume (); +}this.targetLastEntered = targetEnter; +}, "java.awt.Component,java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "startListeningForOtherDrags", + function () { +}); +Clazz_defineMethod (c$, "stopListeningForOtherDrags", + function () { +}); +Clazz_overrideMethod (c$, "eventDispatched", +function (e) { +var isForeignDrag = (Clazz_instanceOf (e, java.awt.event.MouseEvent)) && (e.id == 506) && (e.getSource () !== this.nativeContainer); +if (!isForeignDrag) { +return; +}var srcEvent = e; +var me; +{ +var srcComponent = srcEvent.getComponent (); +if (!srcComponent.isShowing ()) { +return; +}var c = this.nativeContainer; +while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) { +c = c.getParent_NoClientCode (); +} +if ((c == null) || (c).isModalBlocked ()) { +return; +}me = new java.awt.event.MouseEvent (this.nativeContainer, 1500, srcEvent.getWhen (), srcEvent.getModifiersEx () | srcEvent.getModifiers (), srcEvent.getX (), srcEvent.getY (), srcEvent.getXOnScreen (), srcEvent.getYOnScreen (), srcEvent.getClickCount (), srcEvent.isPopupTrigger (), srcEvent.getButton ()); +(srcEvent).copyPrivateDataInto (me); +}var targetOver = this.nativeContainer.getMouseEventTarget (me.getX (), me.getY (), true); +this.trackMouseEnterExit (targetOver, me); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "retargetMouseEvent", +function (target, id, e) { +if (target == null) { +return; +}var x = e.getX (); +var y = e.getY (); +var component; +for (component = target; component != null && component !== this.nativeContainer; component = component.getParent ()) { +x -= component.x; +y -= component.y; +} +var retargeted; +if (component != null) { +if (id == 507) { +retargeted = new java.awt.event.MouseWheelEvent (target, id, e.getWhen (), e.getModifiersEx () | e.getModifiers (), x, y, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), (e).getScrollType (), (e).getScrollAmount (), (e).getWheelRotation ()); +} else { +retargeted = new java.awt.event.MouseEvent (target, id, e.getWhen (), e.getModifiersEx () | e.getModifiers (), x, y, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), e.getButton ()); +}(e).copyPrivateDataInto (retargeted); +if (target === this.nativeContainer) { +(target).dispatchEventToSelf (retargeted); +} else { +if (this.nativeContainer.modalComp != null) { +if ((this.nativeContainer.modalComp).isAncestorOf (target)) { +target.dispatchEvent (retargeted); +} else { +e.consume (); +}} else { +target.dispatchEvent (retargeted); +}}}}, "java.awt.Component,~N,java.awt.event.MouseEvent"); +Clazz_defineStatics (c$, +"LWD_MOUSE_DRAGGED_OVER", 1500, +"MOUSE_MASK", 131120); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.lang.Enum", "java.awt.image.ImageObserver", "java.util.HashMap", "java.awt.ComponentOrientation"], "java.awt.Component", ["java.lang.Boolean", "$.Character", "$.Double", "$.Float", "$.IllegalArgumentException", "$.Long", "$.NullPointerException", "$.Short", "$.Thread", "java.awt.AWTEventMulticaster", "$.Cursor", "$.Dimension", "$.EventQueue", "$.IllegalComponentStateException", "$.Point", "$.Rectangle", "$.Toolkit", "java.awt.event.ComponentEvent", "$.ComponentListener", "$.FocusEvent", "$.FocusListener", "$.HierarchyBoundsListener", "$.HierarchyEvent", "$.HierarchyListener", "$.InputEvent", "$.InputMethodEvent", "$.InputMethodListener", "$.KeyEvent", "$.KeyListener", "$.MouseEvent", "$.MouseListener", "$.MouseMotionListener", "$.MouseWheelEvent", "$.MouseWheelListener", "$.PaintEvent", "java.awt.peer.LightweightPeer", "java.beans.PropertyChangeListener", "$.PropertyChangeSupport", "jssun.awt.AppContext", "$.SunToolkit", "jssun.font.FontDesignMetrics", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.threadGroup = null; +this.myThread = null; +this.peer = null; +this.parent = null; +this.appContext = null; +this.x = 0; +this.y = 0; +this.width = 0; +this.height = 0; +this.foreground = null; +this.background = null; +this.font = null; +this.peerFont = null; +this.cursor = null; +this.locale = null; +this.visible = true; +this.enabled = true; +this.valid = false; +this.popups = null; +this.name = null; +this.nameExplicitlySet = false; +this.focusable = true; +this.$isFocusTraversableOverridden = 0; +this.focusTraversalKeysEnabled = false; +this.minSize = null; +this.minSizeSet = false; +this.prefSize = null; +this.prefSizeSet = false; +this.maxSize = null; +this.maxSizeSet = false; +this.componentOrientation = null; +this.newEventsOnly = false; +this.componentListener = null; +this.focusListener = null; +this.hierarchyListener = null; +this.hierarchyBoundsListener = null; +this.keyListener = null; +this.mouseListener = null; +this.mouseMotionListener = null; +this.mouseWheelListener = null; +this.inputMethodListener = null; +this.windowClosingException = null; +this.eventMask = 4096; +this.changeSupport = null; +this.changeSupportLock = null; +this.isPacked = false; +this.boundsOp = 3; +this.isAddNotifyComplete = false; +this.backgroundEraseDisabled = false; +this.htmlName = null; +this.num = 0; +this.graphicsConfig = null; +this.eventCache = null; +this.coalescingEnabled = false; +this.autoFocusTransferOnDisposal = true; +Clazz_instantialize (this, arguments); +}, java.awt, "Component", null, java.awt.image.ImageObserver); +Clazz_prepareFields (c$, function () { +this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN; +this.changeSupportLock = new Clazz._O (); +this.coalescingEnabled = this.checkCoalescing (); +}); +Clazz_defineMethod (c$, "getAppContext", +function () { +return this.appContext; +}); +Clazz_defineMethod (c$, "getChangeSupportLock", + function () { +return this.changeSupportLock; +}); +Clazz_defineMethod (c$, "getBoundsOp", +function () { +return this.boundsOp; +}); +Clazz_defineMethod (c$, "setBoundsOp", +function (op) { +if (op == 5) { +this.boundsOp = 3; +} else if (this.boundsOp == 3) { +this.boundsOp = op; +}}, "~N"); +Clazz_makeConstructor (c$, +function () { +this.setAppContext (); +}); +Clazz_defineMethod (c$, "setAppContext", +function () { +this.appContext = jssun.awt.AppContext.getAppContext (); +this.num = ++java.awt.Component.incr; +}); +Clazz_defineMethod (c$, "getHTMLName", +function (uid) { +return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName); +}, "~S"); +Clazz_defineMethod (c$, "constructComponentName", +function () { +return null; +}); +Clazz_defineMethod (c$, "getName", +function () { +if (this.name == null && !this.nameExplicitlySet) { +{ +if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName (); +}}return this.name; +}); +Clazz_defineMethod (c$, "setName", +function (name) { +var oldName; +{ +oldName = this.name; +this.name = name; +this.nameExplicitlySet = true; +}this.firePropertyChangeObject ("name", oldName, name); +}, "~S"); +Clazz_defineMethod (c$, "getParent", +function () { +return this.getParent_NoClientCode (); +}); +Clazz_defineMethod (c$, "getParent_NoClientCode", +function () { +return this.parent; +}); +Clazz_defineMethod (c$, "getContainer", +function () { +return this.getParent (); +}); +Clazz_defineMethod (c$, "getPeer", +function () { +return this.peer; +}); +Clazz_defineMethod (c$, "getGraphicsConfiguration", +function () { +return swingjs.JSToolkit.getGraphicsConfiguration (); +}); +Clazz_defineMethod (c$, "resetGC", +function () { +}); +Clazz_defineMethod (c$, "getToolkit", +function () { +return this.getToolkitImpl (); +}); +Clazz_defineMethod (c$, "getToolkitImpl", +function () { +var peer = this.peer; +if ((peer != null) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) { +return peer.getToolkit (); +}var parent = this.parent; +if (parent != null) { +return parent.getToolkitImpl (); +}return java.awt.Toolkit.getDefaultToolkit (); +}); +Clazz_defineMethod (c$, "isValid", +function () { +return this.valid; +}); +Clazz_defineMethod (c$, "isDisplayable", +function () { +return true; +}); +Clazz_defineMethod (c$, "isVisible", +function () { +return this.isVisible_NoClientCode (); +}); +Clazz_defineMethod (c$, "isVisible_NoClientCode", +function () { +return this.visible; +}); +Clazz_defineMethod (c$, "isRecursivelyVisible", +function () { +return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ()); +}); +Clazz_defineMethod (c$, "pointRelativeToComponent", +function (absolute) { +var compCoords = this.getLocationOnScreen (); +return new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "getMousePosition", +function () { +return null; +}); +Clazz_defineMethod (c$, "isSameOrAncestorOf", +function (comp, allowChildren) { +return comp === this; +}, "java.awt.Component,~B"); +Clazz_defineMethod (c$, "isShowing", +function () { +if (this.visible) { +var parent = this.parent; +return (parent == null) || parent.isShowing (); +}return false; +}); +Clazz_defineMethod (c$, "isEnabled", +function () { +return this.isEnabledImpl (); +}); +Clazz_defineMethod (c$, "isEnabledImpl", +function () { +return this.enabled; +}); +Clazz_defineMethod (c$, "setEnabled", +function (b) { +this.enable (b); +}, "~B"); +Clazz_defineMethod (c$, "enable", +function () { +if (!this.enabled) { +this.enabled = true; +var peer = this.peer; +if (peer != null) { +peer.setEnabled (true); +if (this.visible) { +this.updateCursorImmediately (); +}}}}); +Clazz_defineMethod (c$, "enable", +function (b) { +if (b) { +this.enable (); +} else { +this.disable (); +}}, "~B"); +Clazz_defineMethod (c$, "disable", +function () { +if (this.enabled) { +this.enabled = false; +var peer = this.peer; +if (peer != null) { +peer.setEnabled (false); +if (this.visible) { +this.updateCursorImmediately (); +}}}}); +Clazz_defineMethod (c$, "isDoubleBuffered", +function () { +return false; +}); +Clazz_defineMethod (c$, "setVisible", +function (b) { +this.show (b); +}, "~B"); +Clazz_defineMethod (c$, "show", +function () { +if (!this.visible) { +this.visible = true; +var peer = this.peer; +if (peer != null) { +peer.setVisible (true); +this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768)); +if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) { +this.repaint (); +}this.updateCursorImmediately (); +}if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) { +var e = new java.awt.event.ComponentEvent (this, 102); +java.awt.Toolkit.getEventQueue ().postEvent (e); +}}var parent = this.parent; +if (parent != null) { +parent.invalidate (); +}}); +Clazz_defineMethod (c$, "containsFocus", +function () { +return this.isFocusOwner (); +}); +Clazz_defineMethod (c$, "clearCurrentFocusCycleRootOnHide", +function () { +}); +Clazz_defineMethod (c$, "hide", +function () { +this.isPacked = false; +if (this.visible) { +this.clearCurrentFocusCycleRootOnHide (); +this.visible = false; +this.mixOnHiding (this.isLightweight ()); +var peer = this.peer; +if (peer != null) { +peer.setVisible (false); +this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768)); +if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) { +this.repaint (); +}this.updateCursorImmediately (); +}if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) { +var e = new java.awt.event.ComponentEvent (this, 103); +java.awt.Toolkit.getEventQueue ().postEvent (e); +}}var parent = this.parent; +if (parent != null) { +parent.invalidate (); +}}); +Clazz_defineMethod (c$, "getForeground", +function () { +var foreground = this.foreground; +if (foreground != null) { +return foreground; +}var parent = this.parent; +return (parent != null) ? parent.getForeground () : null; +}); +Clazz_defineMethod (c$, "setForeground", +function (c) { +var oldColor = this.foreground; +var peer = this.peer; +this.foreground = c; +if (peer != null) { +c = this.getForeground (); +if (c != null) { +peer.setForeground (c); +}}this.firePropertyChangeObject ("foreground", oldColor, c); +}, "java.awt.Color"); +Clazz_defineMethod (c$, "isForegroundSet", +function () { +return (this.foreground != null); +}); +Clazz_defineMethod (c$, "getBackground", +function () { +var background = this.background; +if (background != null) { +return background; +}var parent = this.parent; +return (parent != null) ? parent.getBackground () : null; +}); +Clazz_defineMethod (c$, "setBackground", +function (c) { +var oldColor = this.background; +var peer = this.peer; +this.background = c; +if (peer != null) { +c = this.getBackground (); +if (c != null) { +peer.setBackground (c); +}}this.firePropertyChangeObject ("background", oldColor, c); +}, "java.awt.Color"); +Clazz_defineMethod (c$, "isBackgroundSet", +function () { +return (this.background != null); +}); +Clazz_defineMethod (c$, "getFont", +function () { +return this.getFont_NoClientCode (); +}); +Clazz_defineMethod (c$, "getFont_NoClientCode", +function () { +var font = this.font; +if (font != null) { +return font; +}var parent = this.parent; +return (parent != null) ? parent.getFont_NoClientCode () : null; +}); +Clazz_defineMethod (c$, "setFont", +function (f) { +this.setFontComp (f); +}, "java.awt.Font"); +Clazz_defineMethod (c$, "setFontComp", +function (f) { +var oldFont; +var newFont; +oldFont = this.font; +newFont = this.font = f; +{ +{ +}var peer = this.peer; +if (peer != null) { +f = this.getFont (); +if (f != null) { +peer.setFont (f); +this.peerFont = f; +}}}this.firePropertyChangeObject ("font", oldFont, newFont); +if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) { +this.invalidateIfValid (); +}}, "java.awt.Font"); +Clazz_defineMethod (c$, "isFontSet", +function () { +return (this.font != null); +}); +Clazz_defineMethod (c$, "getLocale", +function () { +var locale = this.locale; +if (locale != null) { +return locale; +}var parent = this.parent; +if (parent == null) { +throw new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale"); +} else { +return parent.getLocale (); +}}); +Clazz_defineMethod (c$, "setLocale", +function (l) { +var oldValue = this.locale; +this.locale = l; +this.firePropertyChangeObject ("locale", oldValue, l); +this.invalidateIfValid (); +}, "java.util.Locale"); +Clazz_defineMethod (c$, "getLocation", +function () { +return this.location (); +}); +Clazz_defineMethod (c$, "getLocationOnScreen", +function () { +return this.getLocationOnScreen_NoTreeLock (); +}); +Clazz_defineMethod (c$, "getLocationOnScreen_NoTreeLock", +function () { +if (this.isShowing ()) { +if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { +var host = this.getNativeContainer (); +var pt = host.peer.getLocationOnScreen (); +for (var c = this; c !== host; c = c.getParent ()) { +pt.x += c.x; +pt.y += c.y; +} +return pt; +} else { +var pt = this.peer.getLocationOnScreen (); +return pt; +}} else { +throw new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location"); +}}); +Clazz_defineMethod (c$, "location", +function () { +return this.location_NoClientCode (); +}); +Clazz_defineMethod (c$, "location_NoClientCode", + function () { +return new java.awt.Point (this.x, this.y); +}); +Clazz_defineMethod (c$, "setLocation", +function (x, y) { +this.setBoundsOp (1); +this.setBounds (x, y, this.width, this.height); +}, "~N,~N"); +Clazz_defineMethod (c$, "setLocation", +function (p) { +this.setLocation (p.x, p.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "getSize", +function () { +return this.size (); +}); +Clazz_defineMethod (c$, "size", +function () { +return new java.awt.Dimension (this.width, this.height); +}); +Clazz_defineMethod (c$, "setSize", +function (width, height) { +{ +if (arguments.length == 1) { +var d = arguments[0]; +width = d.width; +height = d.height; +} +}this.resize (width, height); +}, "~N,~N"); +Clazz_defineMethod (c$, "resize", +function (width, height) { +this.setBoundsOp (2); +this.setBounds (this.x, this.y, width, height); +}, "~N,~N"); +Clazz_defineMethod (c$, "setBounds", +function (x, y, width, height) { +this.reshape (x, y, width, height); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setBounds", +function (r) { +this.setBounds (r.x, r.y, r.width, r.height); +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "reshape", +function (x, y, width, height) { +try { +this.setBoundsOp (3); +var resized = (this.width != width) || (this.height != height); +var moved = (this.x != x) || (this.y != y); +if (!resized && !moved) { +return; +}var oldX = this.x; +var oldY = this.y; +var oldWidth = this.width; +var oldHeight = this.height; +this.x = x; +this.y = y; +this.width = width; +this.height = height; +if (resized) { +this.isPacked = false; +System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ()); +}var needNotify = true; +this.mixOnReshaping (); +if (this.peer != null) { +this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ()); +resized = (oldWidth != this.width) || (oldHeight != this.height); +moved = (oldX != this.x) || (oldY != this.y); +if (Clazz_instanceOf (this, java.awt.Window)) { +needNotify = false; +}if (resized) { +this.invalidate (); +}if (this.parent != null) { +this.parent.invalidateIfValid (); +}}if (needNotify) { +this.notifyNewBounds (resized, moved); +}this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight); +} finally { +this.setBoundsOp (5); +} +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "repaintParentIfNeeded", + function (oldX, oldY, oldWidth, oldHeight) { +if (this.parent != null && Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) { +this.parent.repaint (oldX, oldY, oldWidth, oldHeight); +this.repaint (); +}}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "reshapeNativePeer", + function (x, y, width, height, op) { +var nativeX = x; +var nativeY = y; +for (var c = this.parent; (c != null) && (Clazz_instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) { +nativeX += c.x; +nativeY += c.y; +} +this.peer.setBounds (nativeX, nativeY, width, height, op); +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "notifyNewBounds", + function (resized, moved) { +if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) { +if (resized) { +var e = new java.awt.event.ComponentEvent (this, 101); +java.awt.Toolkit.getEventQueue ().postEvent (e); +}if (moved) { +var e = new java.awt.event.ComponentEvent (this, 100); +java.awt.Toolkit.getEventQueue ().postEvent (e); +}} else { +if (Clazz_instanceOf (this, java.awt.Container) && (this).countComponents () > 0) { +var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536); +if (resized) { +(this).createChildHierarchyEvents (1402, 0, enabledOnToolkit); +}if (moved) { +(this).createChildHierarchyEvents (1401, 0, enabledOnToolkit); +}}}}, "~B,~B"); +Clazz_defineMethod (c$, "getX", +function () { +return this.x; +}); +Clazz_defineMethod (c$, "getY", +function () { +return this.y; +}); +Clazz_defineMethod (c$, "getWidth", +function () { +return this.width; +}); +Clazz_defineMethod (c$, "getHeight", +function () { +return this.height; +}); +Clazz_defineMethod (c$, "getBounds", +function (rv) { +if (rv == null) return new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ()); +rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ()); +return rv; +}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "getSize", +function (rv) { +if (rv == null) { +return new java.awt.Dimension (this.getWidth (), this.getHeight ()); +} else { +rv.setSize (this.getWidth (), this.getHeight ()); +return rv; +}}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "getLocation", +function (rv) { +if (rv == null) { +return new java.awt.Point (this.getX (), this.getY ()); +} else { +rv.setLocation (this.getX (), this.getY ()); +return rv; +}}, "java.awt.Point"); +Clazz_defineMethod (c$, "isOpaque", +function () { +return true; +}); +Clazz_defineMethod (c$, "isLightweight", +function () { +return false; +}); +Clazz_defineMethod (c$, "setPreferredSize", +function (preferredSize) { +this.setPrefSizeComp (preferredSize); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "setPrefSizeComp", +function (preferredSize) { +var old = (this.prefSizeSet ? this.prefSize : null); +this.prefSize = preferredSize; +this.prefSizeSet = (preferredSize != null); +this.firePropertyChangeObject ("preferredSize", old, preferredSize); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "isPreferredSizeSet", +function () { +return this.prefSizeSet; +}); +Clazz_defineMethod (c$, "getPreferredSize", +function () { +return this.preferredSize (); +}); +Clazz_defineMethod (c$, "preferredSize", +function () { +return this.prefSizeComp (); +}); +Clazz_defineMethod (c$, "prefSizeComp", +function () { +var dim = this.prefSize; +if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) { +this.prefSize = this.getMinimumSize (); +dim = this.prefSize; +}return new java.awt.Dimension (dim); +}); +Clazz_defineMethod (c$, "setMinimumSize", +function (minimumSize) { +var old; +if (this.minSizeSet) { +old = this.minSize; +} else { +old = null; +}this.minSize = minimumSize; +this.minSizeSet = (minimumSize != null); +this.firePropertyChangeObject ("minimumSize", old, minimumSize); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "isMinimumSizeSet", +function () { +return this.minSizeSet; +}); +Clazz_defineMethod (c$, "getMinimumSize", +function () { +return this.minimumSize (); +}); +Clazz_defineMethod (c$, "minimumSize", +function () { +var dim = this.minSize; +if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) { +this.minSize = this.getSize (); +dim = this.minSize; +}return new java.awt.Dimension (dim); +}); +Clazz_defineMethod (c$, "setMaximumSize", +function (maximumSize) { +var old; +if (this.maxSizeSet) { +old = this.maxSize; +} else { +old = null; +}this.maxSize = maximumSize; +this.maxSizeSet = (maximumSize != null); +this.firePropertyChangeObject ("maximumSize", old, maximumSize); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "isMaximumSizeSet", +function () { +return this.maxSizeSet; +}); +Clazz_defineMethod (c$, "getMaximumSize", +function () { +return this.getMaxSizeComp (); +}); +Clazz_defineMethod (c$, "getMaxSizeComp", +function () { +if (this.isMaximumSizeSet ()) { +return new java.awt.Dimension (this.maxSize); +}return new java.awt.Dimension (32767, 32767); +}); +Clazz_defineMethod (c$, "getAlignmentX", +function () { +return this.getAlignmentXComp (); +}); +Clazz_defineMethod (c$, "getAlignmentXComp", +function () { +return 0.5; +}); +Clazz_defineMethod (c$, "getAlignmentY", +function () { +return this.getAlignmentYComp (); +}); +Clazz_defineMethod (c$, "getAlignmentYComp", +function () { +return 0.5; +}); +Clazz_defineMethod (c$, "getBaseline", +function (width, height) { +if (width < 0 || height < 0) { +throw new IllegalArgumentException ("Width and height must be >= 0"); +}return -1; +}, "~N,~N"); +Clazz_defineMethod (c$, "getBaselineResizeBehavior", +function () { +return java.awt.Component.BaselineResizeBehavior.OTHER; +}); +Clazz_defineMethod (c$, "doLayout", +function () { +this.layout (); +}); +Clazz_defineMethod (c$, "layout", +function () { +}); +Clazz_defineMethod (c$, "validate", +function () { +this.validateComponent (); +}); +Clazz_defineMethod (c$, "validateComponent", +function () { +{ +var peer = this.peer; +var wasValid = this.isValid (); +if (!wasValid && peer != null) { +var newfont = this.getFont (); +var oldfont = this.peerFont; +if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) { +peer.setFont (newfont); +this.peerFont = newfont; +}peer.layout (); +}this.valid = true; +if (!wasValid) { +this.mixOnValidating (); +}}}); +Clazz_defineMethod (c$, "invalidate", +function () { +this.invalidateComp (); +}); +Clazz_defineMethod (c$, "invalidateComp", +function () { +this.valid = false; +if (!this.isPreferredSizeSet ()) { +this.prefSize = null; +}if (!this.isMinimumSizeSet ()) { +this.minSize = null; +}if (!this.isMaximumSizeSet ()) { +this.maxSize = null; +}if (this.parent != null) { +this.parent.invalidateIfValid (); +}}); +Clazz_defineMethod (c$, "invalidateIfValid", +function () { +if (this.isValid ()) { +this.invalidate (); +}}); +Clazz_defineMethod (c$, "getGraphics", +function () { +if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { +if (this.parent == null) return null; +var g = this.parent.getGraphics (); +if (g == null) return null; +g.setFont (this.getFont ()); +return g; +} else { +var peer = this.peer; +return (peer != null) ? peer.getGraphics () : null; +}}); +Clazz_defineMethod (c$, "getTreeLock", +function () { +return this; +}); +Clazz_defineMethod (c$, "getFontMetrics", +function (font) { +return jssun.font.FontDesignMetrics.getMetrics (font); +}, "java.awt.Font"); +Clazz_defineMethod (c$, "setCursor", +function (cursor) { +this.cursor = cursor; +this.updateCursorImmediately (); +}, "java.awt.Cursor"); +Clazz_defineMethod (c$, "updateCursorImmediately", +function () { +}); +Clazz_defineMethod (c$, "getCursor", +function () { +return this.getCursor_NoClientCode (); +}); +Clazz_defineMethod (c$, "getCursor_NoClientCode", +function () { +var cursor = this.cursor; +if (cursor != null) { +return cursor; +}var parent = this.parent; +if (parent != null) { +return parent.getCursor_NoClientCode (); +} else { +return java.awt.Cursor.getPredefinedCursor (0); +}}); +Clazz_defineMethod (c$, "isCursorSet", +function () { +return (this.cursor != null); +}); +Clazz_defineMethod (c$, "paint", +function (g) { +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintAll", +function (g) { +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "lightweightPaint", +function (g) { +this.lwPaintComp (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "lwPaintComp", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintHeavyweightComponents", +function (g) { +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "repaint", +function () { +this.repaintImpl (0, 0, 0, this.width, this.height); +}); +Clazz_defineMethod (c$, "repaint", +function (tm) { +this.repaintImpl (tm, 0, 0, this.width, this.height); +}, "~N"); +Clazz_defineMethod (c$, "repaint", +function (x, y, width, height) { +this.repaintImpl (0, x, y, width, height); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "repaint", +function (tm, x, y, width, height) { +this.repaintImpl (tm, x, y, width, height); +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "repaintImpl", +function (tm, x, y, width, height) { +if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { +if (this.parent != null) { +var px = this.x + ((x < 0) ? 0 : x); +var py = this.y + ((y < 0) ? 0 : y); +var pwidth = (width > this.width) ? this.width : width; +var pheight = (height > this.height) ? this.height : height; +this.parent.repaint (tm, px, py, pwidth, pheight); +}} else { +if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) { +var e = new java.awt.event.PaintEvent (this, 801, new java.awt.Rectangle (x, y, width, height)); +java.awt.Toolkit.getEventQueue ().postEvent (e); +}}}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "print", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "printAll", +function (g) { +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "printHeavyweightComponents", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "imageUpdate", +function (img, infoflags, x, y, w, h) { +return false; +}, "java.awt.Image,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "createImage", +function (producer) { +return this.getToolkit ().createImage (producer); +}, "java.awt.image.ImageProducer"); +Clazz_defineMethod (c$, "createImage", +function (width, height) { +return java.awt.Toolkit.getDefaultToolkit ().createImage (null, width, height); +}, "~N,~N"); +Clazz_defineMethod (c$, "createVolatileImage", +function (width, height) { +return null; +}, "~N,~N"); +Clazz_defineMethod (c$, "createVolatileImage", +function (width, height, caps) { +return this.createVolatileImage (width, height); +}, "~N,~N,java.awt.ImageCapabilities"); +Clazz_defineMethod (c$, "prepareImage", +function (image, observer) { +return this.prepareImage (image, -1, -1, observer); +}, "java.awt.Image,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "prepareImage", +function (image, width, height, observer) { +return false; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "checkImage", +function (image, observer) { +return this.checkImage (image, -1, -1, observer); +}, "java.awt.Image,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "checkImage", +function (image, width, height, observer) { +return 0; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "setIgnoreRepaint", +function (ignoreRepaint) { +}, "~B"); +Clazz_defineMethod (c$, "getIgnoreRepaint", +function () { +return false; +}); +Clazz_defineMethod (c$, "contains", +function (x, y) { +return this.inside (x, y); +}, "~N,~N"); +Clazz_defineMethod (c$, "inside", +function (x, y) { +return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height); +}, "~N,~N"); +Clazz_defineMethod (c$, "getComponentAt", +function (x, y) { +return this.locate (x, y); +}, "~N,~N"); +Clazz_defineMethod (c$, "locate", +function (x, y) { +return this.contains (x, y) ? this : null; +}, "~N,~N"); +Clazz_defineMethod (c$, "getComponentAt", +function (p) { +return this.getComponentAt (p.x, p.y); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "deliverEvent", +function (e) { +this.postEvent (e); +}, "java.awt.Event"); +Clazz_defineMethod (c$, "dispatchEvent", +function (e) { +this.dispatchEventImpl (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "dispatchEventImpl", +function (e) { +this.dispatchEventImplComp (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "dispatchEventImplComp", +function (e) { +var id = e.getID (); +java.awt.EventQueue.setCurrentEventAndMostRecentTime (e); +if (!e.focusManagerIsDispatching) { +if (e.isPosted) { +e.isPosted = true; +}}if (!e.isConsumed ()) { +if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) { +if (e.isConsumed ()) { +return; +}}}if (this.areInputMethodsEnabled ()) { +if ((Clazz_instanceOf (e, java.awt.event.InputEvent)) || (Clazz_instanceOf (e, java.awt.event.FocusEvent))) { +}} else { +if (id == 1004) { +}}switch (id) { +case 401: +case 402: +var p = ((Clazz_instanceOf (this, java.awt.Container)) ? this : this.parent); +if (p != null) { +p.preProcessKeyEvent (e); +}break; +case 201: +break; +default: +break; +} +if (this.newEventsOnly) { +if (this.eventEnabled (e)) { +this.processEvent (e); +}} else if (id == 507) { +this.autoProcessMouseWheel (e); +} else if (!(Clazz_instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) { +}if (id == 201 && !e.isConsumed ()) { +}if (!(Clazz_instanceOf (e, java.awt.event.KeyEvent))) { +}}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "autoProcessMouseWheel", +function (e) { +}, "java.awt.event.MouseWheelEvent"); +Clazz_defineMethod (c$, "dispatchMouseWheelToAncestor", +function (e) { +var newX; +var newY; +newX = e.getX () + this.getX (); +newY = e.getY () + this.getY (); +var newMWE; +{ +var anc = this.getParent (); +while (anc != null && !anc.eventEnabled (e)) { +newX += anc.getX (); +newY += anc.getY (); +if (!(Clazz_instanceOf (anc, java.awt.Window))) { +anc = anc.getParent (); +} else { +break; +}} +if (anc != null && anc.eventEnabled (e)) { +newMWE = new java.awt.event.MouseWheelEvent (anc, e.getID (), e.getWhen (), e.getModifiers (), newX, newY, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), e.getScrollType (), e.getScrollAmount (), e.getWheelRotation ()); +(e).copyPrivateDataInto (newMWE); +anc.dispatchEventToSelf (newMWE); +}}return true; +}, "java.awt.event.MouseWheelEvent"); +Clazz_defineMethod (c$, "checkWindowClosingException", +function () { +if (this.windowClosingException != null) { +if (Clazz_instanceOf (this, java.awt.Dialog)) { +(this).interruptBlocking (); +} else { +this.windowClosingException.fillInStackTrace (); +this.windowClosingException.printStackTrace (); +this.windowClosingException = null; +}return true; +}return false; +}); +Clazz_defineMethod (c$, "areInputMethodsEnabled", +function () { +return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null); +}); +Clazz_defineMethod (c$, "eventEnabled", +function (e) { +return this.eventTypeEnabled (e.id); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "eventTypeEnabled", +function (type) { +switch (type) { +case 100: +case 101: +case 102: +case 103: +if ((this.eventMask & 1) != 0 || this.componentListener != null) { +return true; +}break; +case 1004: +case 1005: +if ((this.eventMask & 4) != 0 || this.focusListener != null) { +return true; +}break; +case 401: +case 402: +case 400: +if ((this.eventMask & 8) != 0 || this.keyListener != null) { +return true; +}break; +case 501: +case 502: +case 504: +case 505: +case 500: +if ((this.eventMask & 16) != 0 || this.mouseListener != null) { +return true; +}break; +case 503: +case 506: +if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) { +return true; +}break; +case 507: +if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) { +return true; +}break; +case 1100: +case 1101: +if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) { +return true; +}break; +case 1400: +if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) { +return true; +}break; +case 1401: +case 1402: +if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) { +return true; +}break; +case 1001: +if ((this.eventMask & 128) != 0) { +return true; +}break; +case 900: +if ((this.eventMask & 1024) != 0) { +return true; +}break; +case 701: +if ((this.eventMask & 512) != 0) { +return true; +}break; +case 601: +if ((this.eventMask & 256) != 0) { +return true; +}break; +default: +break; +} +if (type > 1999) { +return true; +}return false; +}, "~N"); +Clazz_defineMethod (c$, "postEvent", +function (e) { +if (this.handleEvent (e)) { +e.consume (); +return true; +}var parent = this.parent; +var eventx = e.x; +var eventy = e.y; +if (parent != null) { +e.translate (this.x, this.y); +if (parent.postEvent (e)) { +e.consume (); +return true; +}e.x = eventx; +e.y = eventy; +}return false; +}, "java.awt.Event"); +Clazz_defineMethod (c$, "addComponentListener", +function (l) { +if (l == null) { +return; +}this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l); +this.newEventsOnly = true; +}, "java.awt.event.ComponentListener"); +Clazz_defineMethod (c$, "removeComponentListener", +function (l) { +if (l == null) { +return; +}this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l); +}, "java.awt.event.ComponentListener"); +Clazz_defineMethod (c$, "getComponentListeners", +function () { +return (this.getListeners (java.awt.event.ComponentListener)); +}); +Clazz_defineMethod (c$, "addFocusListener", +function (l) { +if (l == null) { +return; +}this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l); +this.newEventsOnly = true; +}, "java.awt.event.FocusListener"); +Clazz_defineMethod (c$, "removeFocusListener", +function (l) { +if (l == null) { +return; +}this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l); +}, "java.awt.event.FocusListener"); +Clazz_defineMethod (c$, "getFocusListeners", +function () { +return (this.getListeners (java.awt.event.FocusListener)); +}); +Clazz_defineMethod (c$, "addHierarchyListener", +function (l) { +}, "java.awt.event.HierarchyListener"); +Clazz_defineMethod (c$, "removeHierarchyListener", +function (l) { +}, "java.awt.event.HierarchyListener"); +Clazz_defineMethod (c$, "getHierarchyListeners", +function () { +return (this.getListeners (java.awt.event.HierarchyListener)); +}); +Clazz_defineMethod (c$, "addHierarchyBoundsListener", +function (l) { +if (l == null) { +return; +}var notifyAncestors; +{ +notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0); +this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l); +notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null); +this.newEventsOnly = true; +}if (notifyAncestors) { +{ +this.adjustListeningChildrenOnParent (65536, 1); +}}}, "java.awt.event.HierarchyBoundsListener"); +Clazz_defineMethod (c$, "removeHierarchyBoundsListener", +function (l) { +if (l == null) { +return; +}var notifyAncestors; +{ +notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0); +this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l); +notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null); +}if (notifyAncestors) { +{ +this.adjustListeningChildrenOnParent (65536, -1); +}}}, "java.awt.event.HierarchyBoundsListener"); +Clazz_defineMethod (c$, "numListening", +function (mask) { +return this.numListeningMask (mask); +}, "~N"); +Clazz_defineMethod (c$, "numListeningMask", +function (mask) { +if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) { +return 1; +} else { +return 0; +}}, "~N"); +Clazz_defineMethod (c$, "countHierarchyMembers", +function () { +return 1; +}); +Clazz_defineMethod (c$, "createHierarchyEvents", +function (id, changed, changedParent, changeFlags, enabledOnToolkit) { +return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit); +}, "~N,java.awt.Component,java.awt.Container,~N,~B"); +Clazz_defineMethod (c$, "createHierEventsComp", +function (id, changed, changedParent, changeFlags, enabledOnToolkit) { +switch (id) { +case 1400: +if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) { +var e = new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags); +this.dispatchEvent (e); +return 1; +}break; +case 1401: +case 1402: +if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) { +var e = new java.awt.event.HierarchyEvent (this, id, changed, changedParent); +this.dispatchEvent (e); +return 1; +}break; +default: +break; +} +return 0; +}, "~N,java.awt.Component,java.awt.Container,~N,~B"); +Clazz_defineMethod (c$, "getHierarchyBoundsListeners", +function () { +return (this.getListeners (java.awt.event.HierarchyBoundsListener)); +}); +Clazz_defineMethod (c$, "adjustListeningChildrenOnParent", +function (mask, num) { +if (this.parent != null) { +this.parent.adjustListeningChildren (mask, num); +}}, "~N,~N"); +Clazz_defineMethod (c$, "addKeyListener", +function (l) { +if (l == null) { +return; +}this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l); +this.newEventsOnly = true; +}, "java.awt.event.KeyListener"); +Clazz_defineMethod (c$, "removeKeyListener", +function (l) { +if (l == null) { +return; +}this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l); +}, "java.awt.event.KeyListener"); +Clazz_defineMethod (c$, "getKeyListeners", +function () { +return (this.getListeners (java.awt.event.KeyListener)); +}); +Clazz_defineMethod (c$, "addMouseListener", +function (l) { +if (l == null) { +return; +}System.out.println ("C adding mouse listener " + l); +this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l); +this.newEventsOnly = true; +}, "java.awt.event.MouseListener"); +Clazz_defineMethod (c$, "removeMouseListener", +function (l) { +if (l == null) { +return; +}this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l); +}, "java.awt.event.MouseListener"); +Clazz_defineMethod (c$, "getMouseListeners", +function () { +return (this.getListeners (java.awt.event.MouseListener)); +}); +Clazz_defineMethod (c$, "addMouseMotionListener", +function (l) { +if (l == null) { +return; +}this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l); +this.newEventsOnly = true; +}, "java.awt.event.MouseMotionListener"); +Clazz_defineMethod (c$, "removeMouseMotionListener", +function (l) { +if (l == null) { +return; +}this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l); +}, "java.awt.event.MouseMotionListener"); +Clazz_defineMethod (c$, "getMouseMotionListeners", +function () { +return (this.getListeners (java.awt.event.MouseMotionListener)); +}); +Clazz_defineMethod (c$, "addMouseWheelListener", +function (l) { +if (l == null) { +return; +}this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l); +this.newEventsOnly = true; +}, "java.awt.event.MouseWheelListener"); +Clazz_defineMethod (c$, "removeMouseWheelListener", +function (l) { +if (l == null) { +return; +}this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l); +}, "java.awt.event.MouseWheelListener"); +Clazz_defineMethod (c$, "getMouseWheelListeners", +function () { +return (this.getListeners (java.awt.event.MouseWheelListener)); +}); +Clazz_defineMethod (c$, "addInputMethodListener", +function (l) { +if (l == null) { +return; +}this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l); +this.newEventsOnly = true; +}, "java.awt.event.InputMethodListener"); +Clazz_defineMethod (c$, "removeInputMethodListener", +function (l) { +if (l == null) { +return; +}this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l); +}, "java.awt.event.InputMethodListener"); +Clazz_defineMethod (c$, "getInputMethodListeners", +function () { +return (this.getListeners (java.awt.event.InputMethodListener)); +}); +Clazz_defineMethod (c$, "getListeners", +function (listenerType) { +return this.getListenersComp (listenerType); +}, "Class"); +Clazz_defineMethod (c$, "getListenersComp", +function (listenerType) { +var l = null; +if (listenerType === java.awt.event.ComponentListener) { +l = this.componentListener; +} else if (listenerType === java.awt.event.FocusListener) { +l = this.focusListener; +} else if (listenerType === java.awt.event.HierarchyListener) { +l = this.hierarchyListener; +} else if (listenerType === java.awt.event.HierarchyBoundsListener) { +l = this.hierarchyBoundsListener; +} else if (listenerType === java.awt.event.KeyListener) { +l = this.keyListener; +} else if (listenerType === java.awt.event.MouseListener) { +l = this.mouseListener; +} else if (listenerType === java.awt.event.MouseMotionListener) { +l = this.mouseMotionListener; +} else if (listenerType === java.awt.event.MouseWheelListener) { +l = this.mouseWheelListener; +} else if (listenerType === java.awt.event.InputMethodListener) { +l = this.inputMethodListener; +} else if (listenerType === java.beans.PropertyChangeListener) { +return this.getPropertyChangeListeners (); +}return java.awt.AWTEventMulticaster.getListeners (l, listenerType); +}, "Class"); +Clazz_defineMethod (c$, "enableEvents", +function (eventsToEnable) { +var notifyAncestors = 0; +{ +if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) { +notifyAncestors |= 32768; +}if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) { +notifyAncestors |= 65536; +}this.eventMask |= eventsToEnable; +this.newEventsOnly = true; +}if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { +this.parent.proxyEnableEvents (this.eventMask); +}if (notifyAncestors != 0) { +{ +this.adjustListeningChildrenOnParent (notifyAncestors, 1); +}}}, "~N"); +Clazz_defineMethod (c$, "disableEvents", +function (eventsToDisable) { +var notifyAncestors = 0; +{ +if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) { +notifyAncestors |= 32768; +}if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) { +notifyAncestors |= 65536; +}this.eventMask &= ~eventsToDisable; +}if (notifyAncestors != 0) { +{ +this.adjustListeningChildrenOnParent (notifyAncestors, -1); +}}}, "~N"); +Clazz_defineMethod (c$, "checkCoalescing", + function () { +if (this.getClass ().getClassLoader () == null) { +return false; +}var clazz = this.getClass (); +{ +var value = java.awt.Component.coalesceMap.get (clazz); +if (value != null) { +return value; +}var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent")); +java.awt.Component.coalesceMap.put (clazz, enabled); +return enabled; +}}); +Clazz_defineMethod (c$, "isCoalescingEnabled", +function () { +return this.coalescingEnabled; +}); +Clazz_defineMethod (c$, "coalesceEvents", +function (existingEvent, newEvent) { +return null; +}, "java.awt.AWTEvent,java.awt.AWTEvent"); +Clazz_defineMethod (c$, "processEvent", +function (e) { +this.processEventComp (e); +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "processEventComp", +function (e) { +if (Clazz_instanceOf (e, java.awt.event.FocusEvent)) { +this.processFocusEvent (e); +} else if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) { +switch (e.getID ()) { +case 501: +case 502: +case 500: +case 504: +case 505: +this.processMouseEvent (e); +break; +case 503: +case 506: +this.processMouseMotionEvent (e); +break; +case 507: +this.processMouseWheelEvent (e); +break; +} +} else if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) { +this.processKeyEvent (e); +} else if (Clazz_instanceOf (e, java.awt.event.ComponentEvent)) { +this.processComponentEvent (e); +} else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) { +this.processInputMethodEvent (e); +} else if (Clazz_instanceOf (e, java.awt.event.HierarchyEvent)) { +switch (e.getID ()) { +case 1400: +this.processHierarchyEvent (e); +break; +case 1401: +case 1402: +this.processHierarchyBoundsEvent (e); +break; +} +}}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "processComponentEvent", +function (e) { +var listener = this.componentListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 101: +listener.componentResized (e); +break; +case 100: +listener.componentMoved (e); +break; +case 102: +listener.componentShown (e); +break; +case 103: +listener.componentHidden (e); +break; +} +}}, "java.awt.event.ComponentEvent"); +Clazz_defineMethod (c$, "processFocusEvent", +function (e) { +var listener = this.focusListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 1004: +listener.focusGained (e); +break; +case 1005: +listener.focusLost (e); +break; +} +}}, "java.awt.event.FocusEvent"); +Clazz_defineMethod (c$, "processKeyEvent", +function (e) { +var listener = this.keyListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 400: +listener.keyTyped (e); +break; +case 401: +listener.keyPressed (e); +break; +case 402: +listener.keyReleased (e); +break; +} +}}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "processMouseEvent", +function (e) { +var listener = this.mouseListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 501: +listener.mousePressed (e); +break; +case 502: +listener.mouseReleased (e); +break; +case 500: +listener.mouseClicked (e); +break; +case 505: +listener.mouseExited (e); +break; +case 504: +listener.mouseEntered (e); +break; +} +}}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "processMouseMotionEvent", +function (e) { +var listener = this.mouseMotionListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 503: +listener.mouseMoved (e); +break; +case 506: +listener.mouseDragged (e); +break; +} +}}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "processMouseWheelEvent", +function (e) { +var listener = this.mouseWheelListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 507: +listener.mouseWheelMoved (e); +break; +} +}}, "java.awt.event.MouseWheelEvent"); +Clazz_defineMethod (c$, "postsOldMouseEvents", +function () { +return false; +}); +Clazz_defineMethod (c$, "processInputMethodEvent", +function (e) { +var listener = this.inputMethodListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 1100: +listener.inputMethodTextChanged (e); +break; +case 1101: +listener.caretPositionChanged (e); +break; +} +}}, "java.awt.event.InputMethodEvent"); +Clazz_defineMethod (c$, "processHierarchyEvent", +function (e) { +var listener = this.hierarchyListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 1400: +listener.hierarchyChanged (e); +break; +} +}}, "java.awt.event.HierarchyEvent"); +Clazz_defineMethod (c$, "processHierarchyBoundsEvent", +function (e) { +var listener = this.hierarchyBoundsListener; +if (listener != null) { +var id = e.getID (); +switch (id) { +case 1401: +listener.ancestorMoved (e); +break; +case 1402: +listener.ancestorResized (e); +break; +} +}}, "java.awt.event.HierarchyEvent"); +Clazz_defineMethod (c$, "handleEvent", +function (evt) { +switch (evt.id) { +case 504: +return this.mouseEnter (evt, evt.x, evt.y); +case 505: +return this.mouseExit (evt, evt.x, evt.y); +case 503: +return this.mouseMove (evt, evt.x, evt.y); +case 501: +return this.mouseDown (evt, evt.x, evt.y); +case 506: +return this.mouseDrag (evt, evt.x, evt.y); +case 502: +return this.mouseUp (evt, evt.x, evt.y); +case 401: +case 403: +return this.keyDown (evt, evt.key); +case 402: +case 404: +return this.keyUp (evt, evt.key); +case 1001: +return this.action (evt, evt.arg); +case 1004: +return this.gotFocus (evt, evt.arg); +case 1005: +return this.lostFocus (evt, evt.arg); +} +return false; +}, "java.awt.Event"); +Clazz_defineMethod (c$, "mouseDown", +function (evt, x, y) { +return false; +}, "java.awt.Event,~N,~N"); +Clazz_defineMethod (c$, "mouseDrag", +function (evt, x, y) { +return false; +}, "java.awt.Event,~N,~N"); +Clazz_defineMethod (c$, "mouseUp", +function (evt, x, y) { +return false; +}, "java.awt.Event,~N,~N"); +Clazz_defineMethod (c$, "mouseMove", +function (evt, x, y) { +return false; +}, "java.awt.Event,~N,~N"); +Clazz_defineMethod (c$, "mouseEnter", +function (evt, x, y) { +return false; +}, "java.awt.Event,~N,~N"); +Clazz_defineMethod (c$, "mouseExit", +function (evt, x, y) { +return false; +}, "java.awt.Event,~N,~N"); +Clazz_defineMethod (c$, "keyDown", +function (evt, key) { +return false; +}, "java.awt.Event,~N"); +Clazz_defineMethod (c$, "keyUp", +function (evt, key) { +return false; +}, "java.awt.Event,~N"); +Clazz_defineMethod (c$, "action", +function (evt, what) { +return false; +}, "java.awt.Event,~O"); +Clazz_defineMethod (c$, "addNotify", +function () { +this.addNotifyComp (); +}); +Clazz_defineMethod (c$, "addNotifyComp", +function () { +{ +var peer = this.peer; +if (peer == null || Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) { +if (peer == null) { +this.peer = peer = this.getToolkit ().createComponent (this); +}if (this.parent != null) { +var mask = 0; +if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) { +mask |= 16; +}if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) { +mask |= 32; +}if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) { +mask |= 131072; +}if (this.focusListener != null || (this.eventMask & 4) != 0) { +mask |= 4; +}if (this.keyListener != null || (this.eventMask & 8) != 0) { +mask |= 8; +}if (mask != 0) { +this.parent.proxyEnableEvents (mask); +}}} else { +var parent = this.parent; +if (parent != null && Clazz_instanceOf (parent.peer, java.awt.peer.LightweightPeer)) { +this.relocateComponent (); +}}this.invalidate (); +this.peerFont = this.getFont (); +if (this.getContainer () != null && !this.isAddNotifyComplete) { +this.getContainer ().increaseComponentCount (this); +}if (this.parent != null && this.parent.peer != null) { +var parentContPeer = this.parent.peer; +if (Clazz_instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) { +var hwParent = this.getNativeContainer (); +if (hwParent != null && hwParent.peer != null) { +parentContPeer = hwParent.peer; +}}}if (!this.isAddNotifyComplete) { +this.mixOnShowing (); +}this.isAddNotifyComplete = true; +if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) { +var e = new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0)); +this.dispatchEvent (e); +}}}); +Clazz_defineMethod (c$, "getNativeContainer", +function () { +var p = this.parent; +while (p != null && Clazz_instanceOf (p.peer, java.awt.peer.LightweightPeer)) { +p = p.getParent (); +} +return p; +}); +Clazz_defineMethod (c$, "removeNotify", +function () { +this.removeNotifyComp (); +}); +Clazz_defineMethod (c$, "removeNotifyComp", +function () { +{ +if (this.getContainer () != null && this.isAddNotifyComplete) { +this.getContainer ().decreaseComponentCount (this); +}var p = this.peer; +if (p != null) { +var isLightweight = this.isLightweight (); +this.peer = null; +this.peerFont = null; +java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false); +p.dispose (); +this.mixOnHiding (isLightweight); +this.isAddNotifyComplete = false; +}if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) { +var e = new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0)); +this.dispatchEvent (e); +}}}); +Clazz_defineMethod (c$, "gotFocus", +function (evt, what) { +return false; +}, "java.awt.Event,~O"); +Clazz_defineMethod (c$, "lostFocus", +function (evt, what) { +return false; +}, "java.awt.Event,~O"); +Clazz_defineMethod (c$, "isFocusTraversable", +function () { +if (this.$isFocusTraversableOverridden == 0) { +this.$isFocusTraversableOverridden = 1; +}return this.focusable; +}); +Clazz_defineMethod (c$, "isFocusable", +function () { +return this.isFocusTraversable (); +}); +Clazz_defineMethod (c$, "setFocusable", +function (focusable) { +var oldFocusable; +{ +oldFocusable = this.focusable; +this.focusable = focusable; +}this.$isFocusTraversableOverridden = 2; +this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable)); +}, "~B"); +Clazz_defineMethod (c$, "isFocusTraversableOverridden", +function () { +return (this.$isFocusTraversableOverridden != 1); +}); +Clazz_defineMethod (c$, "getFocusTraversalKeysEnabled", +function () { +return this.focusTraversalKeysEnabled; +}); +Clazz_defineMethod (c$, "requestFocus", +function () { +swingjs.JSToolkit.requestFocus (this); +}); +Clazz_defineMethod (c$, "requestFocus", +function (temporary) { +return swingjs.JSToolkit.requestFocus (this); +}, "~B"); +Clazz_defineMethod (c$, "requestFocusInWindow", +function () { +return swingjs.JSToolkit.requestFocus (this); +}); +Clazz_defineMethod (c$, "requestFocusInWindow", +function (temporary) { +return swingjs.JSToolkit.requestFocus (this); +}, "~B"); +Clazz_defineMethod (c$, "getFocusCycleRootAncestor", +function () { +var rootAncestor = this.parent; +while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) { +rootAncestor = rootAncestor.parent; +} +return rootAncestor; +}); +Clazz_defineMethod (c$, "isFocusCycleRoot", +function (container) { +return this.isFocusCycleRootComp (container); +}, "java.awt.Container"); +Clazz_defineMethod (c$, "isFocusCycleRootComp", +function (container) { +var rootAncestor = this.getFocusCycleRootAncestor (); +return (rootAncestor === container); +}, "java.awt.Container"); +Clazz_defineMethod (c$, "hasFocus", +function () { +return swingjs.JSToolkit.hasFocus (this); +}); +Clazz_defineMethod (c$, "isFocusOwner", +function () { +return this.hasFocus (); +}); +Clazz_defineMethod (c$, "setAutoFocusTransferOnDisposal", +function (value) { +this.autoFocusTransferOnDisposal = value; +}, "~B"); +Clazz_defineMethod (c$, "isAutoFocusTransferOnDisposal", +function () { +return this.autoFocusTransferOnDisposal; +}); +Clazz_defineMethod (c$, "paramString", +function () { +return this.paramStringComp (); +}); +Clazz_defineMethod (c$, "paramStringComp", +function () { +var thisName = this.getName (); +var str = (thisName != null ? thisName : ""); +if (!this.isValid ()) { +str += ",invalid"; +}if (!this.visible) { +str += ",hidden"; +}if (!this.enabled) { +str += ",disabled"; +}str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height; +return str; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[" + this.paramString () + "]"; +}); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (listener) { +this.addPropChangeListenerComp (listener); +}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "addPropChangeListenerComp", +function (listener) { +{ +if (listener == null) { +return; +}if (this.changeSupport == null) { +this.changeSupport = new java.beans.PropertyChangeSupport (this); +}this.changeSupport.addPropertyChangeListener1 (listener); +}}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "removePropertyChangeListener", +function (listener) { +{ +if (listener == null || this.changeSupport == null) { +return; +}this.changeSupport.removePropertyChangeListener (listener); +}}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function () { +{ +if (this.changeSupport == null) { +return new Array (0); +}return this.changeSupport.getPropertyChangeListeners (); +}}); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (propertyName, listener) { +this.addPropChangeListComp (propertyName, listener); +}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "addPropChangeListComp", +function (propertyName, listener) { +{ +if (arguments.length == 1) { +addPropertyChangeListener1(propertyName); return; } +}{ +if (listener == null) { +return; +}if (this.changeSupport == null) { +this.changeSupport = new java.beans.PropertyChangeSupport (this); +}this.changeSupport.addPropertyChangeListener2 (propertyName, listener); +}}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "removePropertyChangeListener", +function (propertyName, listener) { +{ +if (listener == null || this.changeSupport == null) { +return; +}this.changeSupport.removePropertyChangeListener (propertyName, listener); +}}, "~S,java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function (propertyName) { +{ +if (this.changeSupport == null) { +return new Array (0); +}return this.changeSupport.getPropertyChangeListeners (propertyName); +}}, "~S"); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +this.firePropertyChangeObject (propertyName, oldValue, newValue); +}, "~S,~O,~O"); +Clazz_defineMethod (c$, "firePropertyChangeObject", +function (propertyName, oldValue, newValue) { +var changeSupport; +{ +changeSupport = this.changeSupport; +}if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) { +return; +}changeSupport.firePropertyChange (propertyName, oldValue, newValue); +}, "~S,~O,~O"); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +this.firePropertyChangeBool (propertyName, oldValue, newValue); +}, "~S,~B,~B"); +Clazz_defineMethod (c$, "firePropertyChangeBool", +function (propertyName, oldValue, newValue) { +var changeSupport = this.changeSupport; +if (changeSupport == null || oldValue == newValue) { +return; +}changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); +}, "~S,~B,~B"); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +this.firePropertyChangeInt (propertyName, oldValue, newValue); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "firePropertyChangeInt", +function (propertyName, oldValue, newValue) { +var changeSupport = this.changeSupport; +if (changeSupport == null || oldValue == newValue) { +return; +}changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue)); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +this.firePropertyChangeChar (propertyName, oldValue, newValue); +}, "~S,~S,~S"); +Clazz_defineMethod (c$, "firePropertyChangeChar", +function (propertyName, oldValue, newValue) { +if (this.changeSupport == null || oldValue == newValue) { +return; +}this.firePropertyChangeObject (propertyName, new Character (oldValue), new Character (newValue)); +}, "~S,~S,~S"); +Clazz_defineMethod (c$, "firePropertyChangeShort", +function (propertyName, oldValue, newValue) { +if (this.changeSupport == null || oldValue == newValue) { +return; +}this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue)); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "firePropertyChangeLong", +function (propertyName, oldValue, newValue) { +if (this.changeSupport == null || oldValue == newValue) { +return; +}this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue)); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "firePropertyChangeFloat", +function (propertyName, oldValue, newValue) { +if (this.changeSupport == null || oldValue == newValue) { +return; +}this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue)); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "firePropertyChangeDouble", +function (propertyName, oldValue, newValue) { +if (this.changeSupport == null || oldValue == newValue) { +return; +}this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue)); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "setComponentOrientation", +function (o) { +var oldValue = this.componentOrientation; +this.componentOrientation = o; +this.firePropertyChangeObject ("componentOrientation", oldValue, o); +this.invalidateIfValid (); +}, "java.awt.ComponentOrientation"); +Clazz_defineMethod (c$, "getComponentOrientation", +function () { +return this.componentOrientation; +}); +Clazz_defineMethod (c$, "applyComponentOrientation", +function (orientation) { +this.applyCompOrientComp (orientation); +}, "java.awt.ComponentOrientation"); +Clazz_defineMethod (c$, "applyCompOrientComp", +function (orientation) { +if (orientation == null) { +throw new NullPointerException (); +}this.setComponentOrientation (orientation); +}, "java.awt.ComponentOrientation"); +Clazz_defineMethod (c$, "canBeFocusOwner", +function () { +if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) { +return true; +}return false; +}); +Clazz_defineMethod (c$, "canBeFocusOwnerRecursively", +function () { +if (!this.canBeFocusOwner ()) { +return false; +}if (this.parent != null) { +return this.parent.canContainFocusOwner (this); +}return true; +}); +Clazz_defineMethod (c$, "relocateComponent", +function () { +}); +Clazz_defineMethod (c$, "getContainingWindow", +function () { +return jssun.awt.SunToolkit.getContainingWindow (this); +}); +c$.isInstanceOf = Clazz_defineMethod (c$, "isInstanceOf", +function (obj, className) { +if (obj == null) return false; +if (className == null) return false; +var cls = obj.getClass (); +while (cls != null) { +if (cls.getName ().equals (className)) { +return true; +}cls = cls.getSuperclass (); +} +return false; +}, "~O,~S"); +Clazz_defineMethod (c$, "areBoundsValid", +function () { +var cont = this.getContainer (); +return cont == null || cont.isValid () || cont.getLayout () == null; +}); +Clazz_defineMethod (c$, "getLocationOnWindow", +function () { +var curLocation = this.getLocation (); +for (var parent = this.getContainer (); parent != null && !(Clazz_instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) { +curLocation.x += parent.getX (); +curLocation.y += parent.getY (); +} +return curLocation; +}); +Clazz_defineMethod (c$, "getSiblingIndexAbove", +function () { +var parent = this.getContainer (); +if (parent == null) { +return -1; +}var nextAbove = parent.getComponentZOrder (this) - 1; +return nextAbove < 0 ? -1 : nextAbove; +}); +Clazz_defineMethod (c$, "getSiblingIndexBelow", +function () { +var parent = this.getContainer (); +if (parent == null) { +return -1; +}var nextBelow = parent.getComponentZOrder (this) + 1; +return nextBelow >= parent.getComponentCount () ? -1 : nextBelow; +}); +Clazz_defineMethod (c$, "mixOnShowing", +function () { +}); +Clazz_defineMethod (c$, "mixOnHiding", +function (isLightweight) { +}, "~B"); +Clazz_defineMethod (c$, "mixOnReshaping", +function () { +swingjs.JSToolkit.taintUI (this); +}); +Clazz_defineMethod (c$, "mixOnZOrderChanging", +function (oldZorder, newZorder) { +}, "~N,~N"); +Clazz_defineMethod (c$, "mixOnValidating", +function () { +}); +c$.doesClassImplement = Clazz_defineMethod (c$, "doesClassImplement", + function (cls, interfaceName) { +if (cls == null) return false; +for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { +if (c.getName ().equals (interfaceName)) { +return true; +}} +return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName); +}, "Class,~S"); +c$.doesImplement = Clazz_defineMethod (c$, "doesImplement", +function (obj, interfaceName) { +if (obj == null) return false; +if (interfaceName == null) return false; +return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName); +}, "~O,~S"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.Component, "BaselineResizeBehavior", Enum); +Clazz_defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []); +Clazz_defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []); +Clazz_defineEnumConstant (c$, "CENTER_OFFSET", 2, []); +Clazz_defineEnumConstant (c$, "OTHER", 3, []); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.Component, "AWTTreeLock"); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"FOCUS_TRAVERSABLE_UNKNOWN", 0, +"FOCUS_TRAVERSABLE_DEFAULT", 1, +"FOCUS_TRAVERSABLE_SET", 2, +"actionListenerK", "actionL", +"adjustmentListenerK", "adjustmentL", +"componentListenerK", "componentL", +"containerListenerK", "containerL", +"focusListenerK", "focusL", +"itemListenerK", "itemL", +"keyListenerK", "keyL", +"mouseListenerK", "mouseL", +"mouseMotionListenerK", "mouseMotionL", +"mouseWheelListenerK", "mouseWheelL", +"textListenerK", "textL", +"ownedWindowK", "ownedL", +"windowListenerK", "windowL", +"inputMethodListenerK", "inputMethodL", +"hierarchyListenerK", "hierarchyL", +"hierarchyBoundsListenerK", "hierarchyBoundsL", +"windowStateListenerK", "windowStateL", +"windowFocusListenerK", "windowFocusL", +"isInc", false, +"incRate", 0, +"TOP_ALIGNMENT", 0.0, +"CENTER_ALIGNMENT", 0.5, +"BOTTOM_ALIGNMENT", 1.0, +"LEFT_ALIGNMENT", 0.0, +"RIGHT_ALIGNMENT", 1.0, +"incr", 0); +c$.coalesceMap = c$.prototype.coalesceMap = new java.util.HashMap (); +}); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (null, "jssun.awt.SunGraphicsCallback", ["java.awt.Container", "$.Graphics2D", "jssun.awt.ConstrainableGraphics", "$.Graphics2Delegate"], function () { +c$ = Clazz_declareType (jssun.awt, "SunGraphicsCallback"); +Clazz_defineMethod (c$, "constrainGraphics", +function (g, bounds) { +if (Clazz_instanceOf (g, jssun.awt.ConstrainableGraphics)) { +(g).constrain (bounds.x, bounds.y, bounds.width, bounds.height); +} else { +g.translate (bounds.x, bounds.y); +}g.clipRect (0, 0, bounds.width, bounds.height); +}, "java.awt.Graphics,java.awt.Rectangle"); +Clazz_defineMethod (c$, "runOneComponent", +function (comp, bounds, g, clip, weightFlags) { +if (comp == null || !comp.isLightweight () || !comp.isVisible ()) { +return; +}var lightweight = comp.isLightweight (); +if ((lightweight && (weightFlags & 2) == 0) || (!lightweight && (weightFlags & 1) == 0)) { +return; +}if (bounds == null) { +bounds = comp.getBounds (); +}if (clip == null || clip.intersects (bounds)) { +var cg = g.createSwingJS (); +try { +this.constrainGraphics (cg, bounds); +cg.setFont (comp.getFont ()); +cg.setColor (comp.getForeground ()); +if (Clazz_instanceOf (cg, java.awt.Graphics2D)) { +(cg).setBackground (comp.getBackground ()); +} else if (Clazz_instanceOf (cg, jssun.awt.Graphics2Delegate)) { +(cg).setBackground (comp.getBackground ()); +}this.run (comp, cg); +} finally { +cg.dispose (); +} +}}, "java.awt.Component,java.awt.Rectangle,java.awt.Graphics,java.awt.Shape,~N"); +Clazz_defineMethod (c$, "runComponents", +function (comps, g, weightFlags) { +var ncomponents = comps.length; +var clip = g.getClip (); +for (var i = ncomponents - 1; i >= 0; i--) { +this.runOneComponent (comps[i], null, g, clip, weightFlags); +} +}, "~A,java.awt.Graphics,~N"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (jssun.awt.SunGraphicsCallback, "PaintHeavyweightComponentsCallback", jssun.awt.SunGraphicsCallback); +Clazz_makeConstructor (c$, + function () { +Clazz_superConstructor (this, jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback, []); +}); +Clazz_overrideMethod (c$, "run", +function (a, b) { +if (!a.isLightweight ()) { +a.paintAll (b); +} else if (Clazz_instanceOf (a, java.awt.Container)) { +this.runComponents ((a).getComponents (), b, 3); +}}, "java.awt.Component,java.awt.Graphics"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function () { +return jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback.instance; +}); +c$.instance = c$.prototype.instance = new jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback (); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"HEAVYWEIGHTS", 0x1, +"LIGHTWEIGHTS", 0x2, +"TWO_PASSES", 0x4); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.util.HashMap", "java.awt.Rectangle"], "javax.swing.RepaintManager", ["java.lang.StringBuffer", "$.Thread", "java.util.ArrayList", "$.HashSet", "$.IdentityHashMap", "java.applet.Applet", "java.awt.Frame", "$.Toolkit", "$.Window", "java.awt.event.InvocationEvent", "javax.swing.CellRendererPane", "$.JComponent", "$.SwingUtilities", "jssun.awt.AWTAccessor", "$.AppContext", "$.SunToolkit", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.volatileMap = null; +this.hwDirtyComponents = null; +this.dirtyComponents = null; +this.tmpDirtyComponents = null; +this.invalidComponents = null; +this.runnableList = null; +this.paintDepth = 0; +this.painting = false; +this.repaintRoot = null; +this.paintThread = null; +this.processingRunnable = null; +this.myComponent = null; +this.tmp = null; +if (!Clazz_isClassDefined ("javax.swing.RepaintManager.ProcessingRunnable")) { +javax.swing.RepaintManager.$RepaintManager$ProcessingRunnable$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "RepaintManager"); +Clazz_prepareFields (c$, function () { +this.volatileMap = new java.util.HashMap (1); +this.tmp = new java.awt.Rectangle (); +}); +c$.currentManager = Clazz_defineMethod (c$, "currentManager", +function (c) { +var appContext = jssun.awt.AppContext.getAppContext (); +var rm = appContext.get (javax.swing.RepaintManager.repaintManagerKey); +if (rm == null) { +rm = new javax.swing.RepaintManager (); +rm.set (c); +appContext.put (javax.swing.RepaintManager.repaintManagerKey, rm); +}return rm; +}, "java.awt.Component"); +c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", +function (aRepaintManager) { +if (aRepaintManager != null) { +javax.swing.SwingUtilities.appContextPut (javax.swing.RepaintManager.repaintManagerKey, aRepaintManager); +} else { +javax.swing.SwingUtilities.appContextRemove (javax.swing.RepaintManager.repaintManagerKey); +}}, "javax.swing.RepaintManager"); +Clazz_makeConstructor (c$, + function () { +this.processingRunnable = Clazz_innerTypeInstance (javax.swing.RepaintManager.ProcessingRunnable, this, null); +}); +Clazz_defineMethod (c$, "set", + function (c) { +this.myComponent = c; +this.dirtyComponents = new java.util.IdentityHashMap (); +this.tmpDirtyComponents = new java.util.IdentityHashMap (); +this.hwDirtyComponents = new java.util.IdentityHashMap (); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "addInvalidComponent", +function (invalidComponent) { +var validateRoot = null; +for (var c = invalidComponent; c != null; c = c.getParent ()) { +if ((Clazz_instanceOf (c, javax.swing.CellRendererPane))) { +return; +}if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) { +validateRoot = c; +break; +}} +if (validateRoot == null) { +return; +}var root = null; +for (var c = validateRoot; c != null; c = c.getParent ()) { +if (!c.isVisible ()) { +return; +}if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) { +root = c; +break; +}} +if (root == null) { +return; +}if (this.invalidComponents == null) { +this.invalidComponents = new java.util.ArrayList (); +} else { +var n = this.invalidComponents.size (); +for (var i = 0; i < n; i++) { +if (validateRoot === this.invalidComponents.get (i)) { +return; +}} +}this.invalidComponents.add (validateRoot); +this.scheduleProcessingRunnable (root); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "removeInvalidComponent", +function (component) { +if (this.invalidComponents != null) { +var index = this.invalidComponents.indexOf (component); +if (index != -1) { +this.invalidComponents.remove (index); +}}}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "addDirtyRegion0", + function (c, x, y, w, h) { +{ +var g = c.getGraphics(); +if (g == null || g.gc == null)return; +}if ((w <= 0) || (h <= 0) || (c == null)) { +return; +}if ((c.getWidth () <= 0) || (c.getHeight () <= 0)) { +return; +}if (this.extendDirtyRegion (c, x, y, w, h)) { +return; +}var root = null; +for (var p = c; p != null; p = p.getParent ()) { +if (!p.isVisible () || p.getPeer () == null) { +return; +}if ((Clazz_instanceOf (p, java.awt.Window)) || (Clazz_instanceOf (p, java.applet.Applet))) { +if (Clazz_instanceOf (p, java.awt.Frame) && ((p).getExtendedState () & 1) == 1) { +return; +}root = p; +break; +}} +if (root == null) return; +{ +if (this.extendDirtyRegion (c, x, y, w, h)) { +return; +}this.dirtyComponents.put (c, new java.awt.Rectangle (x, y, w, h)); +}this.scheduleProcessingRunnable (c); +}, "java.awt.Container,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "addDirtyRegion", +function (c, x, y, w, h) { +this.addDirtyRegion0 (c, x, y, w, h); +}, "javax.swing.JComponent,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "addDirtyRegion", +function (window, x, y, w, h) { +this.addDirtyRegion0 (window, x, y, w, h); +}, "java.awt.Window,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "addDirtyRegion", +function (applet, x, y, w, h) { +this.addDirtyRegion0 (applet, x, y, w, h); +}, "java.applet.Applet,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "scheduleHeavyWeightPaints", +function () { +var hws; +{ +if (this.hwDirtyComponents.size () == 0) { +return; +}hws = this.hwDirtyComponents; +this.hwDirtyComponents = new java.util.IdentityHashMap (); +}for (var hw, $hw = hws.keySet ().iterator (); $hw.hasNext () && ((hw = $hw.next ()) || true);) { +var dirty = hws.get (hw); +if (Clazz_instanceOf (hw, java.awt.Window)) { +this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height); +} else if (Clazz_instanceOf (hw, java.applet.Applet)) { +this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height); +} else { +this.addDirtyRegion0 (hw, dirty.x, dirty.y, dirty.width, dirty.height); +}} +}); +Clazz_defineMethod (c$, "nativeAddDirtyRegion", +function (appContext, c, x, y, w, h) { +if (w > 0 && h > 0) { +{ +var dirty = this.hwDirtyComponents.get (c); +if (dirty == null) { +this.hwDirtyComponents.put (c, new java.awt.Rectangle (x, y, w, h)); +} else { +this.hwDirtyComponents.put (c, javax.swing.SwingUtilities.computeUnion (x, y, w, h, dirty)); +}}this.scheduleProcessingRunnable (appContext); +}}, "jssun.awt.AppContext,java.awt.Container,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "extendDirtyRegion", + function (c, x, y, w, h) { +var r = this.dirtyComponents.get (c); +if (r != null) { +javax.swing.SwingUtilities.computeUnion (x, y, w, h, r); +return true; +}return false; +}, "java.awt.Component,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getDirtyRegion", +function (aComponent) { +var r = null; +{ +r = this.dirtyComponents.get (aComponent); +}if (r == null) return new java.awt.Rectangle (0, 0, 0, 0); + else return new java.awt.Rectangle (r); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "markCompletelyDirty", +function (aComponent) { +this.addDirtyRegion (aComponent, 0, 0, 2147483647, 2147483647); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "markCompletelyClean", +function (aComponent) { +{ +this.dirtyComponents.remove (aComponent); +}}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "isCompletelyDirty", +function (aComponent) { +var r; +r = this.getDirtyRegion (aComponent); +if (r.width == 2147483647 && r.height == 2147483647) return true; + else return false; +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "validateInvalidComponents", +function () { +var ic; +{ +if (this.invalidComponents == null) { +return; +}ic = this.invalidComponents; +this.invalidComponents = null; +}var n = ic.size (); +for (var i = 0; i < n; i++) { +var c = ic.get (i); +c.validate (); +} +}); +Clazz_defineMethod (c$, "prePaintDirtyRegions", + function () { +var dirtyComponents; +var runnableList; +{ +dirtyComponents = this.dirtyComponents; +runnableList = this.runnableList; +this.runnableList = null; +}if (runnableList != null) { +for (var runnable, $runnable = runnableList.iterator (); $runnable.hasNext () && ((runnable = $runnable.next ()) || true);) { +runnable.run (); +} +}this.paintDirtyRegions (); +if (dirtyComponents.size () > 0) { +this.paintDirtyRegions1 (dirtyComponents); +}}); +Clazz_defineMethod (c$, "updateWindows", + function (dirtyComponents) { +var toolkit = java.awt.Toolkit.getDefaultToolkit (); +if (!(Clazz_instanceOf (toolkit, jssun.awt.SunToolkit) && (toolkit).needUpdateWindow ())) { +return dirtyComponents; +}var windows = new java.util.HashSet (); +var dirtyComps = dirtyComponents.keySet (); +for (var it = dirtyComps.iterator (); it.hasNext (); ) { +var dirty = it.next (); +var window = Clazz_instanceOf (dirty, java.awt.Window) ? dirty : javax.swing.SwingUtilities.getWindowAncestor (dirty); +if (window != null && !jssun.awt.AWTAccessor.getWindowAccessor ().isOpaque (window)) { +it.remove (); +windows.add (window); +}} +for (var window, $window = windows.iterator (); $window.hasNext () && ((window = $window.next ()) || true);) { +jssun.awt.AWTAccessor.getWindowAccessor ().updateWindow (window, null); +} +return dirtyComponents; +}, "java.util.Map"); +Clazz_defineMethod (c$, "paintDirtyRegions", +function () { +{ +var tmp = this.tmpDirtyComponents; +this.tmpDirtyComponents = this.dirtyComponents; +this.dirtyComponents = tmp; +this.dirtyComponents.clear (); +}this.paintDirtyRegions1 (this.tmpDirtyComponents); +}); +Clazz_defineMethod (c$, "paintDirtyRegions1", + function (tmpDirtyComponents) { +if (tmpDirtyComponents.isEmpty ()) { +return; +}this.updateWindows (tmpDirtyComponents); +var roots = new java.util.ArrayList (tmpDirtyComponents.size ()); +for (var dirty, $dirty = tmpDirtyComponents.keySet ().iterator (); $dirty.hasNext () && ((dirty = $dirty.next ()) || true);) { +this.collectDirtyComponents (tmpDirtyComponents, dirty, roots); +} +var count = roots.size (); +this.painting = true; +try { +for (var j = 0; j < count; j++) { +var i = j; +var dirtyComponent = roots.get (j); +var rect = tmpDirtyComponents.get (dirtyComponent); +var localBoundsH = dirtyComponent.getHeight (); +var localBoundsW = dirtyComponent.getWidth (); +javax.swing.SwingUtilities.computeIntersection (0, 0, localBoundsW, localBoundsH, rect); +if (Clazz_instanceOf (dirtyComponent, javax.swing.JComponent)) { +(dirtyComponent).paintImmediately (rect.x, rect.y, rect.width, rect.height); +} else if (dirtyComponent.isShowing ()) { +var g = javax.swing.JComponent.safelyGetGraphics (dirtyComponent, dirtyComponent); +if (g != null) { +try { +dirtyComponent.paint (g); +} finally { +g.dispose (); +} +}}if (this.repaintRoot != null) { +this.adjustRoots (this.repaintRoot, roots, i + 1); +count = roots.size (); +this.repaintRoot.paintImmediately (0, 0, this.repaintRoot.getWidth (), this.repaintRoot.getHeight ()); +this.repaintRoot = null; +}} +} finally { +this.painting = false; +} +tmpDirtyComponents.clear (); +}, "java.util.Map"); +Clazz_defineMethod (c$, "adjustRoots", + function (root, roots, index) { +for (var i = roots.size () - 1; i >= index; i--) { +var c = roots.get (i); +for (; ; ) { +if (c === root || c == null || !(Clazz_instanceOf (c, javax.swing.JComponent))) { +break; +}c = c.getParent (); +} +if (c === root) { +roots.remove (i); +}} +}, "javax.swing.JComponent,java.util.List,~N"); +Clazz_defineMethod (c$, "collectDirtyComponents", +function (dirtyComponents, dirtyComponent, roots) { +var dx; +var dy; +var rootDx; +var rootDy; +var component; +var rootDirtyComponent; +var parent; +component = rootDirtyComponent = dirtyComponent; +var x = dirtyComponent.getX (); +var y = dirtyComponent.getY (); +var w = dirtyComponent.getWidth (); +var h = dirtyComponent.getHeight (); +dx = rootDx = 0; +dy = rootDy = 0; +this.tmp.setBounds (dirtyComponents.get (dirtyComponent)); +javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp); +if (this.tmp.isEmpty ()) { +return; +}for (; ; ) { +if (!(Clazz_instanceOf (component, javax.swing.JComponent))) break; +parent = component.getParent (); +if (parent == null) break; +component = parent; +dx += x; +dy += y; +this.tmp.setLocation (this.tmp.x + x, this.tmp.y + y); +x = component.getX (); +y = component.getY (); +w = component.getWidth (); +h = component.getHeight (); +this.tmp = javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp); +if (this.tmp.isEmpty ()) { +return; +}if (dirtyComponents.get (component) != null) { +rootDirtyComponent = component; +rootDx = dx; +rootDy = dy; +}} +if (dirtyComponent !== rootDirtyComponent) { +var r; +this.tmp.setLocation (this.tmp.x + rootDx - dx, this.tmp.y + rootDy - dy); +r = dirtyComponents.get (rootDirtyComponent); +javax.swing.SwingUtilities.computeUnion (this.tmp.x, this.tmp.y, this.tmp.width, this.tmp.height, r); +}if (!roots.contains (rootDirtyComponent)) roots.add (rootDirtyComponent); +}, "java.util.Map,java.awt.Component,java.util.List"); +Clazz_overrideMethod (c$, "toString", +function () { +var sb = new StringBuffer (); +if (this.dirtyComponents != null) sb.append ("" + this.dirtyComponents); +return sb.toString (); +}); +Clazz_defineMethod (c$, "getOffscreenBuffer", +function (c, proposedWidth, proposedHeight) { +return null; +}, "java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getVolatileOffscreenBuffer", +function (c, proposedWidth, proposedHeight) { +var config = c.getGraphicsConfiguration (); +var maxSize = this.getDoubleBufferMaximumSize (); +var width = proposedWidth < 1 ? 1 : (proposedWidth > maxSize.width ? maxSize.width : proposedWidth); +var height = proposedHeight < 1 ? 1 : (proposedHeight > maxSize.height ? maxSize.height : proposedHeight); +var image = this.volatileMap.get (config); +if (image == null || image.getWidth () < width || image.getHeight () < height) { +if (image != null) { +image.flush (); +}image = config.createCompatibleVolatileImage (width, height); +this.volatileMap.put (config, image); +}return image; +}, "java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "setDoubleBufferMaximumSize", +function (d) { +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "getDoubleBufferMaximumSize", +function () { +return null; +}); +Clazz_defineMethod (c$, "setDoubleBufferingEnabled", +function (aFlag) { +}, "~B"); +Clazz_defineMethod (c$, "resetDoubleBuffer", +function () { +}); +Clazz_defineMethod (c$, "resetVolatileDoubleBuffer", +function (gc) { +var image = this.volatileMap.remove (gc); +if (image != null) { +image.flush (); +}}, "java.awt.GraphicsConfiguration"); +Clazz_defineMethod (c$, "useVolatileDoubleBuffer", +function () { +return javax.swing.RepaintManager.volatileImageBufferEnabled; +}); +Clazz_defineMethod (c$, "isPaintingThread", + function () { +return (Thread.currentThread () === this.paintThread); +}); +Clazz_defineMethod (c$, "paint", +function (paintingComponent, bufferComponent, g, x, y, w, h) { +paintingComponent.paintToOffscreen (g, x, y, w, h, x + w, y + h); +}, "javax.swing.JComponent,javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "beginPaint", +function () { +var multiThreadedPaint = false; +var paintDepth = 0; +var currentThread = Thread.currentThread (); +{ +paintDepth = this.paintDepth; +if (this.paintThread == null || currentThread === this.paintThread) { +this.paintThread = currentThread; +this.paintDepth++; +} else { +multiThreadedPaint = true; +}}}); +Clazz_defineMethod (c$, "endPaint", +function () { +if (this.isPaintingThread ()) { +}}); +Clazz_defineMethod (c$, "doubleBufferingChanged", +function (rootPane) { +}, "javax.swing.JRootPane"); +Clazz_defineMethod (c$, "scheduleProcessingRunnable", + function (c) { +this.scheduleProcessingRunnable (c.getAppContext ()); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "scheduleProcessingRunnable", + function (context) { +if (this.processingRunnable.markPending ()) { +jssun.awt.SunToolkit.getSystemEventQueueImplPP (context).postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), this.processingRunnable)); +}}, "jssun.awt.AppContext"); +c$.$RepaintManager$ProcessingRunnable$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +this.pending = false; +Clazz_instantialize (this, arguments); +}, javax.swing.RepaintManager, "ProcessingRunnable", null, Runnable); +Clazz_defineMethod (c$, "markPending", +function () { +if (!this.pending) { +this.pending = true; +return true; +}return false; +}); +Clazz_overrideMethod (c$, "run", +function () { +{ +this.pending = false; +}this.b$["javax.swing.RepaintManager"].scheduleHeavyWeightPaints (); +this.b$["javax.swing.RepaintManager"].validateInvalidComponents (); +this.b$["javax.swing.RepaintManager"].prePaintDirtyRegions (); +swingjs.JSToolkit.forceRepaint (this.b$["javax.swing.RepaintManager"].myComponent); +}); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"HANDLE_TOP_LEVEL_PAINT", false); +c$.repaintManagerKey = c$.prototype.repaintManagerKey = javax.swing.RepaintManager; +Clazz_defineStatics (c$, +"volatileImageBufferEnabled", true); +{ +javax.swing.RepaintManager.volatileImageBufferEnabled = false; +var headless = false; +if (javax.swing.RepaintManager.volatileImageBufferEnabled && headless) { +javax.swing.RepaintManager.volatileImageBufferEnabled = false; +}javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT = true; +}}); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (["java.awt.Toolkit", "jssun.awt.ComponentFactory", "$.WindowClosingListener", "$.WindowClosingSupport", "java.util.HashMap"], "jssun.awt.SunToolkit", ["java.lang.NullPointerException", "$.Thread", "java.awt.Component", "$.Dimension", "$.EventQueue", "$.Panel", "$.Window", "jssun.awt.AWTAccessor", "$.AWTAutoShutdown", "$.AppContext", "$.PeerEvent", "$.PostEventQueue", "jssun.font.FontDesignMetrics"], function () { +c$ = Clazz_decorateAsClass (function () { +this.windowClosingListener = null; +Clazz_instantialize (this, arguments); +}, jssun.awt, "SunToolkit", java.awt.Toolkit, [jssun.awt.WindowClosingSupport, jssun.awt.WindowClosingListener, jssun.awt.ComponentFactory]); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, jssun.awt.SunToolkit, []); +var eventQueue; +eventQueue = new java.awt.EventQueue (); +var appContext = jssun.awt.AppContext.getAppContext (); +if (appContext != null) { +appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue); +var postEventQueue = new jssun.awt.PostEventQueue (eventQueue); +appContext.put ("PostEventQueue", postEventQueue); +}}); +Clazz_defineMethod (c$, "useBufferPerWindow", +function () { +return false; +}); +c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", +function () { +var threadGroup = Thread.currentThread ().getThreadGroup (); +return jssun.awt.SunToolkit.createNewAppContext (threadGroup); +}); +c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", +function (threadGroup) { +var eventQueue; +var eqName = System.getProperty ("AWT.EventQueueClass", "java.awt.EventQueue"); +try { +eventQueue = Clazz._4Name (eqName).newInstance (); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +System.err.println ("Failed loading " + eqName + ": " + e); +eventQueue = new java.awt.EventQueue (); +} else { +throw e; +} +} +var appContext = new jssun.awt.AppContext (threadGroup); +appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue); +var postEventQueue = new jssun.awt.PostEventQueue (eventQueue); +appContext.put ("PostEventQueue", postEventQueue); +return appContext; +}, "ThreadGroup"); +c$.wakeupEventQueue = Clazz_defineMethod (c$, "wakeupEventQueue", +function (q, isShutdown) { +q.wakeup (isShutdown); +}, "java.awt.EventQueue,~B"); +c$.targetToPeer = Clazz_defineMethod (c$, "targetToPeer", +function (target) { +if (target != null) { +return jssun.awt.AWTAutoShutdown.getInstance ().getPeer (target); +}return null; +}, "~O"); +c$.targetCreatedPeer = Clazz_defineMethod (c$, "targetCreatedPeer", +function (target, peer) { +if (target != null && peer != null) { +jssun.awt.AWTAutoShutdown.getInstance ().registerPeer (target, peer); +}}, "~O,~O"); +c$.targetDisposedPeer = Clazz_defineMethod (c$, "targetDisposedPeer", +function (target, peer) { +if (target != null && peer != null) { +jssun.awt.AWTAutoShutdown.getInstance ().unregisterPeer (target, peer); +}}, "~O,~O"); +c$.setAppContext = Clazz_defineMethod (c$, "setAppContext", + function (target, context) { +if (Clazz_instanceOf (target, java.awt.Component)) { +jssun.awt.AWTAccessor.getComponentAccessor ().setAppContext (target, context); +} else { +return false; +}return true; +}, "~O,jssun.awt.AppContext"); +c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", + function (target) { +if (Clazz_instanceOf (target, java.awt.Component)) { +{ +return target.appContext; +}} else { +return null; +}}, "~O"); +c$.targetToAppContext = Clazz_defineMethod (c$, "targetToAppContext", +function (target) { +if (target == null) { +return null; +}var context = jssun.awt.SunToolkit.getAppContext (target); +if (context == null) { +context = jssun.awt.SunToolkit.appContextMap.get (target); +}return context; +}, "~O"); +c$.setLWRequestStatus = Clazz_defineMethod (c$, "setLWRequestStatus", +function (changed, status) { +jssun.awt.AWTAccessor.getWindowAccessor ().setLWRequestStatus (changed, status); +}, "java.awt.Window,~B"); +c$.checkAndSetPolicy = Clazz_defineMethod (c$, "checkAndSetPolicy", +function (cont, isSwingCont) { +}, "java.awt.Container,~B"); +c$.insertTargetMapping = Clazz_defineMethod (c$, "insertTargetMapping", +function (target, appContext) { +if (!jssun.awt.SunToolkit.setAppContext (target, appContext)) { +jssun.awt.SunToolkit.appContextMap.put (target, appContext); +}}, "~O,jssun.awt.AppContext"); +c$.postEvent = Clazz_defineMethod (c$, "postEvent", +function (appContext, event) { +if (event == null) { +throw new NullPointerException (); +}var postEventQueue = appContext.get ("PostEventQueue"); +if (postEventQueue != null) { +postEventQueue.postEvent (event); +}}, "jssun.awt.AppContext,java.awt.AWTEvent"); +c$.postPriorityEvent = Clazz_defineMethod (c$, "postPriorityEvent", +function (e) { +var pe = new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), ((Clazz_isClassDefined ("jssun.awt.SunToolkit$1") ? 0 : jssun.awt.SunToolkit.$SunToolkit$1$ ()), Clazz_innerTypeInstance (jssun.awt.SunToolkit$1, this, Clazz_cloneFinals ("e", e))), 2); +jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (e.getSource ()), pe); +}, "java.awt.AWTEvent"); +c$.flushPendingEvents = Clazz_defineMethod (c$, "flushPendingEvents", +function () { +var appContext = jssun.awt.AppContext.getAppContext (); +var postEventQueue = appContext.get ("PostEventQueue"); +if (postEventQueue != null) { +postEventQueue.flush (); +}}); +c$.isPostEventQueueEmpty = Clazz_defineMethod (c$, "isPostEventQueueEmpty", +function () { +var appContext = jssun.awt.AppContext.getAppContext (); +var postEventQueue = appContext.get ("PostEventQueue"); +return (postEventQueue == null || postEventQueue.noEvents ()); +}); +c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", +function (target, runnable) { +jssun.awt.SunToolkit.executeOnEventHandlerThread ( new jssun.awt.PeerEvent (target, runnable, 1)); +}, "~O,Runnable"); +c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", +function (target, runnable, when) { +jssun.awt.SunToolkit.executeOnEventHandlerThread (((Clazz_isClassDefined ("jssun.awt.SunToolkit$2") ? 0 : jssun.awt.SunToolkit.$SunToolkit$2$ ()), Clazz_innerTypeInstance (jssun.awt.SunToolkit$2, this, Clazz_cloneFinals ("when", when), target, runnable, 1))); +}, "~O,Runnable,~N"); +c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", +function (peerEvent) { +jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (peerEvent.getSource ()), peerEvent); +}, "jssun.awt.PeerEvent"); +c$.invokeLaterOnAppContext = Clazz_defineMethod (c$, "invokeLaterOnAppContext", +function (appContext, dispatcher) { +jssun.awt.SunToolkit.postEvent (appContext, new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), dispatcher, 1)); +}, "jssun.awt.AppContext,Runnable"); +c$.isDispatchThreadForAppContext = Clazz_defineMethod (c$, "isDispatchThreadForAppContext", +function (target) { +var appContext = jssun.awt.SunToolkit.targetToAppContext (target); +var eq = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY); +var next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq); +while (next != null) { +eq = next; +next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq); +} +return (Thread.currentThread () === jssun.awt.AWTAccessor.getEventQueueAccessor ().getDispatchThread (eq)); +}, "~O"); +Clazz_overrideMethod (c$, "getScreenSize", +function () { +return new java.awt.Dimension (this.getScreenWidth (), this.getScreenHeight ()); +}); +Clazz_overrideMethod (c$, "getFontMetrics", +function (font) { +return jssun.font.FontDesignMetrics.getMetrics (font); +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "getFontList", +function () { +var hardwiredFontList = Clazz_newArray (-1, ["Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"]); +return hardwiredFontList; +}); +Clazz_overrideMethod (c$, "createPanel", +function (target) { +return this.createComponent (target); +}, "java.awt.Panel"); +Clazz_defineMethod (c$, "disableBackgroundErase", +function (component) { +this.disableBackgroundEraseImpl (component); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "disableBackgroundEraseImpl", + function (component) { +jssun.awt.AWTAccessor.getComponentAccessor ().setBackgroundEraseDisabled (component, true); +}, "java.awt.Component"); +c$.getSunAwtNoerasebackground = Clazz_defineMethod (c$, "getSunAwtNoerasebackground", +function () { +return false; +}); +c$.getSunAwtErasebackgroundonresize = Clazz_defineMethod (c$, "getSunAwtErasebackgroundonresize", +function () { +return true; +}); +Clazz_defineMethod (c$, "setOverrideRedirect", +function (target) { +}, "java.awt.Window"); +c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", +function (tk, url) { +var img = jssun.awt.SunToolkit.imgCache.get (url); +if (img == null) { +try { +img = tk.createImage (url); +jssun.awt.SunToolkit.imgCache.put (url, img); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +} else { +throw e; +} +} +}return img; +}, "java.awt.Toolkit,java.net.URL"); +c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", +function (tk, filename) { +var img = jssun.awt.SunToolkit.imgCache.get (filename); +if (img == null) { +try { +tk.createImage (filename); +jssun.awt.SunToolkit.imgCache.put (filename, img); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +} else { +throw e; +} +} +}return img; +}, "java.awt.Toolkit,~S"); +Clazz_defineMethod (c$, "getImage", +function (filename) { +return jssun.awt.SunToolkit.getImageFromHash (this, filename); +}, "~S"); +Clazz_defineMethod (c$, "getImage", +function (url) { +return jssun.awt.SunToolkit.getImageFromHash (this, url); +}, "java.net.URL"); +Clazz_overrideMethod (c$, "checkImage", +function (img, w, h, o) { +return 0; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "prepareImage", +function (img, w, h, o) { +if (w == 0 || h == 0) { +return true; +}return true; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "getSystemEventQueueImpl", +function () { +return jssun.awt.SunToolkit.getSystemEventQueueImplPP (); +}); +c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", +function () { +return jssun.awt.SunToolkit.getSystemEventQueueImplPP (jssun.awt.AppContext.getAppContext ()); +}); +c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", +function (appContext) { +var theEventQueue = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY); +return theEventQueue; +}, "jssun.awt.AppContext"); +c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", +function (c) { +return java.awt.Toolkit.getNativeContainer (c); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "enableInputMethodsForTextComponent", +function () { +return false; +}); +c$.getStartupLocale = Clazz_defineMethod (c$, "getStartupLocale", +function () { +if (jssun.awt.SunToolkit.startupLocale == null) { +{ +}}return jssun.awt.SunToolkit.startupLocale; +}); +Clazz_defineMethod (c$, "getDefaultKeyboardLocale", +function () { +return jssun.awt.SunToolkit.getStartupLocale (); +}); +c$.setDataTransfererClassName = Clazz_defineMethod (c$, "setDataTransfererClassName", +function (className) { +jssun.awt.SunToolkit.dataTransfererClassName = className; +}, "~S"); +c$.getDataTransfererClassName = Clazz_defineMethod (c$, "getDataTransfererClassName", +function () { +if (jssun.awt.SunToolkit.dataTransfererClassName == null) { +java.awt.Toolkit.getDefaultToolkit (); +}return jssun.awt.SunToolkit.dataTransfererClassName; +}); +Clazz_overrideMethod (c$, "getWindowClosingListener", +function () { +return this.windowClosingListener; +}); +Clazz_overrideMethod (c$, "setWindowClosingListener", +function (wcl) { +this.windowClosingListener = wcl; +}, "jssun.awt.WindowClosingListener"); +Clazz_defineMethod (c$, "windowClosingNotify", +function (event) { +if (this.windowClosingListener != null) { +return this.windowClosingListener.windowClosingNotify (event); +} else { +return null; +}}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "windowClosingDelivered", +function (event) { +if (this.windowClosingListener != null) { +return this.windowClosingListener.windowClosingDelivered (event); +} else { +return null; +}}, "java.awt.event.WindowEvent"); +c$.isModalExcluded = Clazz_defineMethod (c$, "isModalExcluded", +function (window) { +return true; +}, "java.awt.Window"); +c$.isLightweightOrUnknown = Clazz_defineMethod (c$, "isLightweightOrUnknown", +function (comp) { +if (comp.isLightweight () || !(Clazz_instanceOf (java.awt.Toolkit.getDefaultToolkit (), jssun.awt.SunToolkit))) { +return true; +}return !(Clazz_instanceOf (comp, java.awt.Panel) || Clazz_instanceOf (comp, java.awt.Window)); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getDesktopAAHints", +function () { +return null; +}); +c$.getContainingWindow = Clazz_defineMethod (c$, "getContainingWindow", +function (comp) { +while (comp != null && !(Clazz_instanceOf (comp, java.awt.Window))) { +comp = comp.getParent (); +} +return comp; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "isNativeGTKAvailable", +function () { +return false; +}); +Clazz_defineMethod (c$, "isWindowOpacitySupported", +function () { +return false; +}); +Clazz_defineMethod (c$, "isWindowShapingSupported", +function () { +return false; +}); +Clazz_defineMethod (c$, "isWindowTranslucencySupported", +function () { +return false; +}); +Clazz_defineMethod (c$, "isTranslucencyCapable", +function (gc) { +return false; +}, "java.awt.GraphicsConfiguration"); +Clazz_defineMethod (c$, "needUpdateWindow", +function () { +return false; +}); +c$.$SunToolkit$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$1", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +jssun.awt.AWTAccessor.getAWTEventAccessor ().setPosted (this.f$.e); +(this.f$.e.getSource ()).dispatchEvent (this.f$.e); +}); +c$ = Clazz_p0p (); +}; +c$.$SunToolkit$2$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$2", jssun.awt.PeerEvent); +Clazz_overrideMethod (c$, "getWhen", +function () { +return this.f$.when; +}); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"GRAB_EVENT_MASK", 0x80000000, +"POST_EVENT_QUEUE_KEY", "PostEventQueue"); +c$.appContextMap = c$.prototype.appContextMap = new java.util.HashMap (); +c$.imgCache = c$.prototype.imgCache = new java.util.HashMap (); +Clazz_defineStatics (c$, +"startupLocale", null, +"dataTransfererClassName", null, +"DESKTOPFONTHINTS", "awt.font.desktophints"); +}); +Clazz_declarePackage ("java.awt"); +Clazz_declareInterface (java.awt, "Conditional"); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.PaintEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.updateRect = null; +Clazz_instantialize (this, arguments); +}, java.awt.event, "PaintEvent", java.awt.event.ComponentEvent); +Clazz_makeConstructor (c$, +function (source, id, updateRect) { +Clazz_superConstructor (this, java.awt.event.PaintEvent, [source, id]); +this.updateRect = updateRect; +}, "java.awt.Component,~N,java.awt.Rectangle"); +Clazz_defineMethod (c$, "getUpdateRect", +function () { +return this.updateRect; +}); +Clazz_defineMethod (c$, "setUpdateRect", +function (updateRect) { +this.updateRect = updateRect; +}, "java.awt.Rectangle"); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 800: +typeStr = "PAINT"; +break; +case 801: +typeStr = "UPDATE"; +break; +default: +typeStr = "unknown type"; +} +return typeStr + ",updateRect=" + (this.updateRect != null ? this.updateRect.toString () : "null"); +}); +Clazz_defineStatics (c$, +"PAINT_FIRST", 800, +"PAINT_LAST", 801, +"PAINT", 800, +"UPDATE", 801); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent", "$.EventFilter", "swingjs.JSThread", "java.util.Vector"], "java.awt.EventDispatchThread", ["java.lang.Error", "$.RuntimeException", "$.Thread", "java.awt.Component", "$.Container", "$.ModalEventFilter", "$.Window", "jssun.awt.AWTAutoShutdown", "$.ModalExclude", "$.SunToolkit", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.theQueue = null; +this.eventFilters = null; +this.modalFiltersCount = 0; +this.filter = null; +this.cond = null; +this.id = 0; +this.doDispatch = true; +if (!Clazz_isClassDefined ("java.awt.EventDispatchThread.StopDispatchEvent")) { +java.awt.EventDispatchThread.$EventDispatchThread$StopDispatchEvent$ (); +} +Clazz_instantialize (this, arguments); +}, java.awt, "EventDispatchThread", swingjs.JSThread); +Clazz_prepareFields (c$, function () { +this.eventFilters = new java.util.Vector (); +}); +Clazz_makeConstructor (c$, +function (group, name, queue) { +Clazz_superConstructor (this, java.awt.EventDispatchThread, [group, name]); +this.theQueue = queue; +}, "ThreadGroup,~S,java.awt.EventQueue"); +Clazz_defineMethod (c$, "stopDispatchingImpl", +function (wait) { +var stopEvent = Clazz_innerTypeInstance (java.awt.EventDispatchThread.StopDispatchEvent, this, null); +if (Thread.currentThread () !== this) { +this.theQueue.postEventPrivate (stopEvent); +if (wait) { +try { +this.join (); +} catch (e) { +if (Clazz_exceptionOf (e, InterruptedException)) { +} else { +throw e; +} +} +}} else { +stopEvent.dispatch (); +}{ +if (this.theQueue.getDispatchThread () === this) { +this.theQueue.detachDispatchThread (); +}}}, "~B"); +Clazz_defineMethod (c$, "stopDispatching", +function () { +this.stopDispatchingImpl (true); +}); +Clazz_defineMethod (c$, "stopDispatchingLater", +function () { +this.stopDispatchingImpl (false); +}); +Clazz_overrideMethod (c$, "run", +function () { +this.pumpEvents (-1, null); +}); +Clazz_defineMethod (c$, "pumpEvents", +function (id, cond) { +this.pumpEventsForHierarchy (id, cond, null); +}, "~N,java.awt.Conditional"); +Clazz_defineMethod (c$, "pumpEventsForHierarchy", +function (id, cond, modalComponent) { +this.pumpEventsForFilter (id, cond, new java.awt.EventDispatchThread.HierarchyEventFilter (modalComponent)); +}, "~N,java.awt.Conditional,java.awt.Component"); +Clazz_defineMethod (c$, "pumpEventsForFilter", +function (id, cond, filter) { +this.filter = filter; +this.cond = cond; +this.id = id; +this.run1 (0); +}, "~N,java.awt.Conditional,java.awt.EventFilter"); +Clazz_overrideMethod (c$, "run1", +function (mode) { +try { +while (true) switch (mode) { +case 0: +this.addEventFilter (this.filter); +mode = 1; +case 1: +if (!this.doDispatch || this.cond != null && !this.cond.evaluate () || this.isInterrupted ()) { +this.doDispatch = false; +return; +}var myid = this.id; +var r = ((Clazz_isClassDefined ("java.awt.EventDispatchThread$1") ? 0 : java.awt.EventDispatchThread.$EventDispatchThread$1$ ()), Clazz_innerTypeInstance (java.awt.EventDispatchThread$1, this, Clazz_cloneFinals ("myid", myid))); +this.dispatchAndReturn (r, mode); +if (this.isJS) return; +break; +case 2: +this.doDispatch = false; +return; +} + +} finally { +if (!this.doDispatch) this.finish (); +} +}, "~N"); +Clazz_defineMethod (c$, "dispatchAndReturn", +function (r, mode) { +var f = null; +var me = this; +{ +f = function() {r.run();me.run1(mode) +}; +}swingjs.JSToolkit.setTimeout (f, 0, 0); +}, "Runnable,~N"); +Clazz_defineMethod (c$, "finish", + function () { +this.doDispatch = false; +this.removeEventFilter (this.filter); +{ +if (this.theQueue.getDispatchThread () === this) { +this.theQueue.detachDispatchThread (); +}if (this.theQueue.peekEvent () != null || !jssun.awt.SunToolkit.isPostEventQueueEmpty ()) { +this.theQueue.initDispatchThread (); +}jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this); +}}); +Clazz_defineMethod (c$, "addEventFilter", +function (filter) { +{ +if (!this.eventFilters.contains (filter)) { +if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) { +var newFilter = filter; +var k = 0; +for (k = 0; k < this.eventFilters.size (); k++) { +var f = this.eventFilters.get (k); +if (Clazz_instanceOf (f, java.awt.ModalEventFilter)) { +var cf = f; +if (cf.compareTo (newFilter) > 0) { +break; +}}} +this.eventFilters.add (k, filter); +this.modalFiltersCount++; +} else { +this.eventFilters.add (filter); +}}}}, "java.awt.EventFilter"); +Clazz_defineMethod (c$, "removeEventFilter", +function (filter) { +{ +if (this.eventFilters.contains (filter)) { +if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) { +this.modalFiltersCount--; +}this.eventFilters.remove (filter); +}}}, "java.awt.EventFilter"); +Clazz_defineMethod (c$, "pumpOneEventForFilters", +function (id) { +try { +var event; +var eventOK; +do { +event = (id == -1) ? this.theQueue.getNextEvent () : this.theQueue.getNextEventForID (id); +if (event == null) return (this.doDispatch = false); +eventOK = true; +{ +for (var i = this.eventFilters.size () - 1; i >= 0; i--) { +var f = this.eventFilters.get (i); +var accept = f.acceptEvent (event); +if (accept === java.awt.EventFilter.FilterAction.REJECT) { +eventOK = false; +break; +} else if (accept === java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY) { +break; +}} +}if (!eventOK) { +event.consume (); +}} while (eventOK == false); +this.theQueue.dispatchEvent (event); +return this.doDispatch = true; +} catch (e$$) { +if (Clazz_exceptionOf (e$$, ThreadDeath)) { +var death = e$$; +{ +return this.doDispatch = false; +} +} else if (Clazz_exceptionOf (e$$, InterruptedException)) { +var interruptedException = e$$; +{ +return this.doDispatch = false; +} +} else { +var e = e$$; +{ +this.processException (e, this.modalFiltersCount > 0); +} +} +} +return this.doDispatch = true; +}, "~N"); +Clazz_defineMethod (c$, "processException", + function (e, isModal) { +if (!this.handleException (e)) { +if (isModal) { +System.err.println ("Exception occurred during event dispatching:"); +e.printStackTrace (); +} else if (Clazz_instanceOf (e, RuntimeException)) { +throw e; +} else if (Clazz_instanceOf (e, Error)) { +throw e; +}}}, "Throwable,~B"); +Clazz_defineMethod (c$, "handleException", + function (thrown) { +return false; +}, "Throwable"); +Clazz_defineMethod (c$, "isDispatching", +function (eq) { +return this.theQueue.equals (eq); +}, "java.awt.EventQueue"); +Clazz_defineMethod (c$, "getEventQueue", +function () { +return this.theQueue; +}); +c$.$EventDispatchThread$StopDispatchEvent$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +Clazz_instantialize (this, arguments); +}, java.awt.EventDispatchThread, "StopDispatchEvent", java.awt.AWTEvent, java.awt.ActiveEvent); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, java.awt.EventDispatchThread.StopDispatchEvent, [this.b$["java.awt.EventDispatchThread"], 0]); +}); +Clazz_overrideMethod (c$, "dispatch", +function () { +this.b$["java.awt.EventDispatchThread"].doDispatch = false; +}); +c$ = Clazz_p0p (); +}; +c$.$EventDispatchThread$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (java.awt, "EventDispatchThread$1", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +this.b$["java.awt.EventDispatchThread"].pumpOneEventForFilters (this.f$.myid); +}); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.modalComponent = null; +Clazz_instantialize (this, arguments); +}, java.awt.EventDispatchThread, "HierarchyEventFilter", null, java.awt.EventFilter); +Clazz_makeConstructor (c$, +function (a) { +this.modalComponent = a; +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "acceptEvent", +function (a) { +if (this.modalComponent != null) { +var b = a.getID (); +var c = (b >= 500) && (b <= 507); +var d = (b >= 1001) && (b <= 1001); +var e = (b == 201); +if (java.awt.Component.isInstanceOf (this.modalComponent, "javax.swing.JInternalFrame")) { +return e ? java.awt.EventFilter.FilterAction.REJECT : java.awt.EventFilter.FilterAction.ACCEPT; +}if (c || d || e) { +var f = a.getSource (); +if (Clazz_instanceOf (f, jssun.awt.ModalExclude)) { +return java.awt.EventFilter.FilterAction.ACCEPT; +} else if (Clazz_instanceOf (f, java.awt.Component)) { +var g = f; +var h = false; +if (Clazz_instanceOf (this.modalComponent, java.awt.Container)) { +while (g !== this.modalComponent && g != null) { +if ((Clazz_instanceOf (g, java.awt.Window)) && (jssun.awt.SunToolkit.isModalExcluded (g))) { +h = true; +break; +}g = g.getParent (); +} +}if (!h && (g !== this.modalComponent)) { +return java.awt.EventFilter.FilterAction.REJECT; +}}}}return java.awt.EventFilter.FilterAction.ACCEPT; +}, "java.awt.AWTEvent"); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"ANY_EVENT", -1); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.lang.Enum"], "java.awt.EventFilter", null, function () { +Clazz_declareInterface (java.awt, "EventFilter"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.EventFilter, "FilterAction", Enum); +Clazz_defineEnumConstant (c$, "ACCEPT", 0, []); +Clazz_defineEnumConstant (c$, "REJECT", 1, []); +Clazz_defineEnumConstant (c$, "ACCEPT_IMMEDIATELY", 2, []); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.EventFilter"], "java.awt.ModalEventFilter", ["java.awt.Component", "$.Dialog", "$.Window", "jssun.awt.ModalExclude"], function () { +c$ = Clazz_decorateAsClass (function () { +this.modalDialog = null; +this.disabled = false; +Clazz_instantialize (this, arguments); +}, java.awt, "ModalEventFilter", null, java.awt.EventFilter); +Clazz_makeConstructor (c$, +function (modalDialog) { +this.modalDialog = modalDialog; +this.disabled = false; +}, "java.awt.Dialog"); +Clazz_defineMethod (c$, "getModalDialog", +function () { +return this.modalDialog; +}); +Clazz_overrideMethod (c$, "acceptEvent", +function (event) { +if (this.disabled || !this.modalDialog.isVisible ()) { +return java.awt.EventFilter.FilterAction.ACCEPT; +}var eventID = event.getID (); +if ((eventID >= 500 && eventID <= 507) || (eventID >= 1001 && eventID <= 1001) || eventID == 201) { +var o = event.getSource (); +if (Clazz_instanceOf (o, jssun.awt.ModalExclude)) { +} else if (Clazz_instanceOf (o, java.awt.Component)) { +var c = o; +while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) { +c = c.getParent_NoClientCode (); +} +if (c != null) { +return this.acceptWindow (c); +}}}return java.awt.EventFilter.FilterAction.ACCEPT; +}, "java.awt.AWTEvent"); +Clazz_defineMethod (c$, "disable", +function () { +this.disabled = true; +}); +Clazz_defineMethod (c$, "compareTo", +function (another) { +var anotherDialog = another.getModalDialog (); +var c = this.modalDialog; +while (c != null) { +if (c === anotherDialog) { +return 1; +}c = c.getParent_NoClientCode (); +} +c = anotherDialog; +while (c != null) { +if (c === this.modalDialog) { +return -1; +}c = c.getParent_NoClientCode (); +} +var blocker = this.modalDialog.getModalBlocker (); +while (blocker != null) { +if (blocker === anotherDialog) { +return -1; +}blocker = blocker.getModalBlocker (); +} +blocker = anotherDialog.getModalBlocker (); +while (blocker != null) { +if (blocker === this.modalDialog) { +return 1; +}blocker = blocker.getModalBlocker (); +} +return this.modalDialog.getModalityType ().compareTo (anotherDialog.getModalityType ()); +}, "java.awt.ModalEventFilter"); +c$.createFilterForDialog = Clazz_defineMethod (c$, "createFilterForDialog", +function (modalDialog) { +switch (modalDialog.getModalityType ()) { +case java.awt.Dialog.ModalityType.DOCUMENT_MODAL: +return new java.awt.ModalEventFilter.DocumentModalEventFilter (modalDialog); +case java.awt.Dialog.ModalityType.APPLICATION_MODAL: +return new java.awt.ModalEventFilter.ApplicationModalEventFilter (modalDialog); +case java.awt.Dialog.ModalityType.TOOLKIT_MODAL: +return new java.awt.ModalEventFilter.ToolkitModalEventFilter (modalDialog); +} +return null; +}, "java.awt.Dialog"); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.appContext = null; +Clazz_instantialize (this, arguments); +}, java.awt.ModalEventFilter, "ToolkitModalEventFilter", java.awt.ModalEventFilter); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, java.awt.ModalEventFilter.ToolkitModalEventFilter, [a]); +this.appContext = a.appContext; +}, "java.awt.Dialog"); +Clazz_overrideMethod (c$, "acceptWindow", +function (a) { +if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) { +return java.awt.EventFilter.FilterAction.ACCEPT; +}if (a.appContext !== this.appContext) { +return java.awt.EventFilter.FilterAction.REJECT; +}while (a != null) { +if (a === this.modalDialog) { +return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY; +}a = a.getOwner (); +} +return java.awt.EventFilter.FilterAction.REJECT; +}, "java.awt.Window"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.appContext = null; +Clazz_instantialize (this, arguments); +}, java.awt.ModalEventFilter, "ApplicationModalEventFilter", java.awt.ModalEventFilter); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, java.awt.ModalEventFilter.ApplicationModalEventFilter, [a]); +this.appContext = a.appContext; +}, "java.awt.Dialog"); +Clazz_overrideMethod (c$, "acceptWindow", +function (a) { +if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) { +return java.awt.EventFilter.FilterAction.ACCEPT; +}if (a.appContext === this.appContext) { +while (a != null) { +if (a === this.modalDialog) { +return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY; +}a = a.getOwner (); +} +return java.awt.EventFilter.FilterAction.REJECT; +}return java.awt.EventFilter.FilterAction.ACCEPT; +}, "java.awt.Window"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.documentRoot = null; +Clazz_instantialize (this, arguments); +}, java.awt.ModalEventFilter, "DocumentModalEventFilter", java.awt.ModalEventFilter); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, java.awt.ModalEventFilter.DocumentModalEventFilter, [a]); +this.documentRoot = a.getDocumentRoot (); +}, "java.awt.Dialog"); +Clazz_overrideMethod (c$, "acceptWindow", +function (a) { +if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) { +var b = this.modalDialog.getOwner (); +while (b != null) { +if (b === a) { +return java.awt.EventFilter.FilterAction.REJECT; +}b = b.getOwner (); +} +return java.awt.EventFilter.FilterAction.ACCEPT; +}while (a != null) { +if (a === this.modalDialog) { +return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY; +}if (a === this.documentRoot) { +return java.awt.EventFilter.FilterAction.REJECT; +}a = a.getOwner (); +} +return java.awt.EventFilter.FilterAction.ACCEPT; +}, "java.awt.Window"); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("java.awt.peer"); +Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.CanvasPeer", null, function () { +Clazz_declareInterface (java.awt.peer, "CanvasPeer", java.awt.peer.ComponentPeer); +}); +Clazz_declarePackage ("java.awt.peer"); +c$ = Clazz_declareInterface (java.awt.peer, "ComponentPeer"); +Clazz_defineStatics (c$, +"SET_LOCATION", 1, +"SET_SIZE", 2, +"SET_BOUNDS", 3, +"SET_CLIENT_SIZE", 4, +"RESET_OPERATION", 5, +"NO_EMBEDDED_CHECK", (16384), +"DEFAULT_OPERATION", 3); +Clazz_declarePackage ("java.awt.peer"); +Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.ContainerPeer", null, function () { +Clazz_declareInterface (java.awt.peer, "ContainerPeer", java.awt.peer.ComponentPeer); +}); +Clazz_declarePackage ("java.awt.peer"); +Clazz_load (["java.awt.peer.WindowPeer"], "java.awt.peer.FramePeer", null, function () { +Clazz_declareInterface (java.awt.peer, "FramePeer", java.awt.peer.WindowPeer); +}); +Clazz_declarePackage ("java.awt.peer"); +Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.LightweightPeer", null, function () { +Clazz_declareInterface (java.awt.peer, "LightweightPeer", java.awt.peer.ComponentPeer); +}); +Clazz_declarePackage ("java.awt.peer"); +Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.PanelPeer", null, function () { +Clazz_declareInterface (java.awt.peer, "PanelPeer", java.awt.peer.ContainerPeer); +}); +Clazz_declarePackage ("java.awt.peer"); +Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.WindowPeer", null, function () { +Clazz_declareInterface (java.awt.peer, "WindowPeer", java.awt.peer.ContainerPeer); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.$dispatched = false; +this.nested = null; +this.toNotify = null; +Clazz_instantialize (this, arguments); +}, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent); +Clazz_makeConstructor (c$, +function () { +this.construct (null); +}); +Clazz_makeConstructor (c$, +function (nested) { +this.construct (nested, null); +}, "java.awt.AWTEvent"); +Clazz_makeConstructor (c$, +function (nested, toNotify) { +Clazz_superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]); +this.nested = nested; +this.toNotify = toNotify; +}, "java.awt.AWTEvent,jssun.awt.AppContext"); +Clazz_overrideMethod (c$, "dispatch", +function () { +try { +if (this.nested != null) { +java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested); +}} finally { +this.$dispatched = true; +if (this.toNotify != null) { +jssun.awt.SunToolkit.postEvent (this.toNotify, new java.awt.SentEvent ()); +}{ +this.notifyAll (); +}} +}); +Clazz_defineMethod (c$, "dispose", +function () { +this.$dispatched = true; +if (this.toNotify != null) { +jssun.awt.SunToolkit.postEvent (this.toNotify, new java.awt.SentEvent ()); +}{ +this.notifyAll (); +}}); +Clazz_defineStatics (c$, +"ID", 1007); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent", "java.util.LinkedList"], "java.awt.SequencedEvent", ["java.lang.Thread", "java.awt.Component", "$.Conditional", "$.EventQueue", "$.SentEvent", "$.Toolkit", "jssun.awt.AppContext", "$.SunToolkit", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.nested = null; +this.appContext = null; +this.disposed = false; +Clazz_instantialize (this, arguments); +}, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent); +Clazz_makeConstructor (c$, +function (nested) { +Clazz_superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]); +this.nested = nested; +{ +java.awt.SequencedEvent.list.add (this); +}}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "dispatch", +function () { +try { +this.appContext = jssun.awt.AppContext.getAppContext (); +if (java.awt.SequencedEvent.getFirst () !== this) { +if (java.awt.EventQueue.isDispatchThread ()) { +var edt = Thread.currentThread (); +edt.pumpEvents (1007, ((Clazz_isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz_innerTypeInstance (java.awt.SequencedEvent$1, this, null))); +} else { +while (!this.isFirstOrDisposed ()) { +{ +try { +swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent"); +java.awt.SequencedEvent.wait (1000); +} catch (e) { +if (Clazz_exceptionOf (e, InterruptedException)) { +break; +} else { +throw e; +} +} +}} +}}if (!this.disposed) { +java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested); +}} finally { +this.dispose (); +} +}); +c$.isOwnerAppContextDisposed = Clazz_defineMethod (c$, "isOwnerAppContextDisposed", + function (se) { +if (se != null) { +var target = se.nested.getSource (); +if (Clazz_instanceOf (target, java.awt.Component)) { +return (target).appContext.isDisposed (); +}}return false; +}, "java.awt.SequencedEvent"); +Clazz_defineMethod (c$, "isFirstOrDisposed", +function () { +if (this.disposed) { +return true; +}return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed; +}); +c$.getFirst = Clazz_defineMethod (c$, "getFirst", + function () { +return java.awt.SequencedEvent.list.getFirst (); +}); +c$.getFirstWithContext = Clazz_defineMethod (c$, "getFirstWithContext", + function () { +var first = java.awt.SequencedEvent.getFirst (); +while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) { +first.dispose (); +first = java.awt.SequencedEvent.getFirst (); +} +return first; +}); +Clazz_defineMethod (c$, "dispose", +function () { +{ +if (this.disposed) { +return; +}this.disposed = true; +}if (this.appContext != null) { +jssun.awt.SunToolkit.postEvent (this.appContext, new java.awt.SentEvent ()); +}var next = null; +{ +java.awt.SequencedEvent.notifyAll (); +if (java.awt.SequencedEvent.list.getFirst () === this) { +java.awt.SequencedEvent.list.removeFirst (); +if (!java.awt.SequencedEvent.list.isEmpty ()) { +next = java.awt.SequencedEvent.list.getFirst (); +}} else { +java.awt.SequencedEvent.list.remove (this); +}}if (next != null && next.appContext != null) { +jssun.awt.SunToolkit.postEvent (next.appContext, new java.awt.SentEvent ()); +}}); +c$.$SequencedEvent$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional); +Clazz_overrideMethod (c$, "evaluate", +function () { +return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed (); +}); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"ID", 1006); +c$.list = c$.prototype.list = new java.util.LinkedList (); +}); +Clazz_load(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){ +c$=Clazz_declareType(java.util,"AbstractSequentialList",java.util.AbstractList); +Clazz_defineMethod(c$,"add", +function(location,object){ +this.listIterator(location).add(object); +},"~N,~O"); +Clazz_defineMethod(c$,"addAll", +function(location,collection){ +var it=this.listIterator(location); +var colIt=collection.iterator(); +var next=it.nextIndex(); +while(colIt.hasNext()){ +it.add(colIt.next()); +it.previous(); +} +return next!=it.nextIndex(); +},"~N,java.util.Collection"); +Clazz_overrideMethod(c$,"get", +function(location){ +try{ +return this.listIterator(location).next(); +}catch(e){ +if(Clazz_instanceOf(e,java.util.NoSuchElementException)){ +throw new IndexOutOfBoundsException(); +}else{ +throw e; +} +} +},"~N"); +Clazz_overrideMethod(c$,"iterator", +function(){ +return this.listIterator(0); +}); +Clazz_defineMethod(c$,"remove", +function(location){ +try{ +var it=this.listIterator(location); +var result=it.next(); +it.remove(); +return result; +}catch(e){ +if(Clazz_instanceOf(e,java.util.NoSuchElementException)){ +throw new IndexOutOfBoundsException(); +}else{ +throw e; +} +} +},"~N"); +Clazz_overrideMethod(c$,"set", +function(location,object){ +var it=this.listIterator(location); +var result=it.next(); +it.set(object); +return result; +},"~N,~O"); +}); +Clazz_load(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){ +c$=Clazz_decorateAsClass(function(){ +this.$size=0; +this.voidLink=null; +Clazz_instantialize(this,arguments); +},java.util,"LinkedList",java.util.AbstractSequentialList,[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]); +Clazz_makeConstructor(c$, +function(){ +Clazz_superConstructor(this,java.util.LinkedList,[]); +this.voidLink=new java.util.LinkedList.Link(null,null,null); +this.voidLink.previous=this.voidLink; +this.voidLink.next=this.voidLink; +}); +Clazz_makeConstructor(c$, +function(collection){ +this.construct(); +this.addAll(collection); +},"java.util.Collection"); +Clazz_defineMethod(c$,"add", +function(location,object){ +if(0<=location&&location<=this.$size){ +var link=this.voidLink; +if(location<(Math.floor(this.$size/2))){ +for(var i=0;i<=location;i++){ +link=link.next; +} +}else{ +for(var i=this.$size;i>location;i--){ +link=link.previous; +} +}var previous=link.previous; +var newLink=new java.util.LinkedList.Link(object,previous,link); +previous.next=newLink; +link.previous=newLink; +this.$size++; +this.modCount++; +}else{ +throw new IndexOutOfBoundsException(); +}},"~N,~O"); +Clazz_defineMethod(c$,"add", +function(object){ +var oldLast=this.voidLink.previous; +var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink); +this.voidLink.previous=newLink; +oldLast.next=newLink; +this.$size++; +this.modCount++; +return true; +},"~O"); +Clazz_defineMethod(c$,"addAll", +function(location,collection){ +if(location<0||location>this.$size){ +throw new IndexOutOfBoundsException(); +}var adding=collection.size(); +if(adding==0){ +return false; +}var previous=this.voidLink; +if(location<(Math.floor(this.$size/2))){ +for(var i=0;i=location;i--){ +previous=previous.previous; +} +}var next=previous.next; +for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){ +var newLink=new java.util.LinkedList.Link(e,previous,null); +previous.next=newLink; +previous=newLink; +} +previous.next=next; +next.previous=previous; +this.$size+=adding; +this.modCount++; +return true; +},"~N,java.util.Collection"); +Clazz_defineMethod(c$,"addAll", +function(collection){ +var adding=collection.size(); +if(adding==0){ +return false; +}var previous=this.voidLink.previous; +for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){ +var newLink=new java.util.LinkedList.Link(e,previous,null); +previous.next=newLink; +previous=newLink; +} +previous.next=this.voidLink; +this.voidLink.previous=previous; +this.$size+=adding; +this.modCount++; +return true; +},"java.util.Collection"); +Clazz_defineMethod(c$,"addFirst", +function(object){ +var oldFirst=this.voidLink.next; +var newLink=new java.util.LinkedList.Link(object,this.voidLink,oldFirst); +this.voidLink.next=newLink; +oldFirst.previous=newLink; +this.$size++; +this.modCount++; +},"~O"); +Clazz_defineMethod(c$,"addLast", +function(object){ +var oldLast=this.voidLink.previous; +var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink); +this.voidLink.previous=newLink; +oldLast.next=newLink; +this.$size++; +this.modCount++; +},"~O"); +Clazz_overrideMethod(c$,"clear", +function(){ +if(this.$size>0){ +this.$size=0; +this.voidLink.next=this.voidLink; +this.voidLink.previous=this.voidLink; +this.modCount++; +}}); +Clazz_overrideMethod(c$,"clone", +function(){ +return new java.util.LinkedList(this); +}); +Clazz_overrideMethod(c$,"contains", +function(object){ +var link=this.voidLink.next; +if(object!=null){ +while(link!==this.voidLink){ +if(object.equals(link.data)){ +return true; +}link=link.next; +} +}else{ +while(link!==this.voidLink){ +if(link.data==null){ +return true; +}link=link.next; +} +}return false; +},"~O"); +Clazz_overrideMethod(c$,"get", +function(location){ +if(0<=location&&locationlocation;i--){ +link=link.previous; +} +}return link.data; +}throw new IndexOutOfBoundsException(); +},"~N"); +Clazz_defineMethod(c$,"getFirst", +function(){ +var first=this.voidLink.next; +if(first!==this.voidLink){ +return first.data; +}throw new java.util.NoSuchElementException(); +}); +Clazz_defineMethod(c$,"getLast", +function(){ +var last=this.voidLink.previous; +if(last!==this.voidLink){ +return last.data; +}throw new java.util.NoSuchElementException(); +}); +Clazz_overrideMethod(c$,"indexOf", +function(object){ +var pos=0; +var link=this.voidLink.next; +if(object!=null){ +while(link!==this.voidLink){ +if(object.equals(link.data)){ +return pos; +}link=link.next; +pos++; +} +}else{ +while(link!==this.voidLink){ +if(link.data==null){ +return pos; +}link=link.next; +pos++; +} +}return-1; +},"~O"); +Clazz_overrideMethod(c$,"lastIndexOf", +function(object){ +var pos=this.$size; +var link=this.voidLink.previous; +if(object!=null){ +while(link!==this.voidLink){ +pos--; +if(object.equals(link.data)){ +return pos; +}link=link.previous; +} +}else{ +while(link!==this.voidLink){ +pos--; +if(link.data==null){ +return pos; +}link=link.previous; +} +}return-1; +},"~O"); +Clazz_defineMethod(c$,"listIterator", +function(location){ +return new java.util.LinkedList.LinkIterator(this,location); +},"~N"); +Clazz_defineMethod(c$,"remove", +function(location){ +if(0<=location&&locationlocation;i--){ +link=link.previous; +} +}var previous=link.previous; +var next=link.next; +previous.next=next; +next.previous=previous; +this.$size--; +this.modCount++; +return link.data; +}throw new IndexOutOfBoundsException(); +},"~N"); +Clazz_defineMethod(c$,"remove", +function(object){ +var link=this.voidLink.next; +if(object!=null){ +while(link!==this.voidLink&&!object.equals(link.data)){ +link=link.next; +} +}else{ +while(link!==this.voidLink&&link.data!=null){ +link=link.next; +} +}if(link===this.voidLink){ +return false; +}var next=link.next; +var previous=link.previous; +previous.next=next; +next.previous=previous; +this.$size--; +this.modCount++; +return true; +},"~O"); +Clazz_defineMethod(c$,"removeFirst", +function(){ +var first=this.voidLink.next; +if(first!==this.voidLink){ +var next=first.next; +this.voidLink.next=next; +next.previous=this.voidLink; +this.$size--; +this.modCount++; +return first.data; +}throw new java.util.NoSuchElementException(); +}); +Clazz_defineMethod(c$,"removeLast", +function(){ +var last=this.voidLink.previous; +if(last!==this.voidLink){ +var previous=last.previous; +this.voidLink.previous=previous; +previous.next=this.voidLink; +this.$size--; +this.modCount++; +return last.data; +}throw new java.util.NoSuchElementException(); +}); +Clazz_overrideMethod(c$,"set", +function(location,object){ +if(0<=location&&locationlocation;i--){ +link=link.previous; +} +}var result=link.data; +link.data=object; +return result; +}throw new IndexOutOfBoundsException(); +},"~N,~O"); +Clazz_overrideMethod(c$,"size", +function(){ +return this.$size; +}); +Clazz_overrideMethod(c$,"offer", +function(o){ +this.add(o); +return true; +},"~O"); +Clazz_overrideMethod(c$,"poll", +function(){ +return this.$size==0?null:this.removeFirst(); +}); +Clazz_defineMethod(c$,"remove", +function(){ +return this.removeFirst(); +}); +Clazz_overrideMethod(c$,"peek", +function(){ +var first=this.voidLink.next; +return first===this.voidLink?null:first.data; +}); +Clazz_overrideMethod(c$,"element", +function(){ +return this.getFirst(); +}); +Clazz_defineMethod(c$,"toArray", +function(){ +var index=0; +var contents=new Array(this.$size); +var link=this.voidLink.next; +while(link!==this.voidLink){ +contents[index++]=link.data; +link=link.next; +} +return contents; +}); +Clazz_defineMethod(c$,"toArray", +function(contents){ +var index=0; +if(this.$size>contents.length){ +var ct=contents.getClass().getComponentType(); +contents=java.lang.reflect.Array.newInstance(ct,this.$size); +}var link=this.voidLink.next; +while(link!==this.voidLink){ +contents[index++]=link.data; +link=link.next; +} +if(index=b;this.pos--){ +this.link=this.link.previous; +} +}}else{ +throw new IndexOutOfBoundsException(); +}},"java.util.LinkedList,~N"); +Clazz_overrideMethod(c$,"add", +function(a){ +if(this.expectedModCount==this.list.modCount){ +var b=this.link.next; +var c=new java.util.LinkedList.Link(a,this.link,b); +this.link.next=c; +b.previous=c; +this.link=c; +this.lastLink=null; +this.pos++; +this.expectedModCount++; +this.list.$size++; +this.list.modCount++; +}else{ +throw new java.util.ConcurrentModificationException(); +}},"~O"); +Clazz_overrideMethod(c$,"hasNext", +function(){ +return this.link.next!==this.list.voidLink; +}); +Clazz_overrideMethod(c$,"hasPrevious", +function(){ +return this.link!==this.list.voidLink; +}); +Clazz_overrideMethod(c$,"next", +function(){ +if(this.expectedModCount==this.list.modCount){ +var a=this.link.next; +if(a!==this.list.voidLink){ +this.lastLink=this.link=a; +this.pos++; +return this.link.data; +}throw new java.util.NoSuchElementException(); +}throw new java.util.ConcurrentModificationException(); +}); +Clazz_overrideMethod(c$,"nextIndex", +function(){ +return this.pos+1; +}); +Clazz_overrideMethod(c$,"previous", +function(){ +if(this.expectedModCount==this.list.modCount){ +if(this.link!==this.list.voidLink){ +this.lastLink=this.link; +this.link=this.link.previous; +this.pos--; +return this.lastLink.data; +}throw new java.util.NoSuchElementException(); +}throw new java.util.ConcurrentModificationException(); +}); +Clazz_overrideMethod(c$,"previousIndex", +function(){ +return this.pos; +}); +Clazz_overrideMethod(c$,"remove", +function(){ +if(this.expectedModCount==this.list.modCount){ +if(this.lastLink!=null){ +var a=this.lastLink.next; +var b=this.lastLink.previous; +a.previous=b; +b.next=a; +if(this.lastLink===this.link){ +this.pos--; +}this.link=b; +this.lastLink=null; +this.expectedModCount++; +this.list.$size--; +this.list.modCount++; +}else{ +throw new IllegalStateException(); +}}else{ +throw new java.util.ConcurrentModificationException(); +}}); +Clazz_overrideMethod(c$,"set", +function(a){ +if(this.expectedModCount==this.list.modCount){ +if(this.lastLink!=null){ +this.lastLink.data=a; +}else{ +throw new IllegalStateException(); +}}else{ +throw new java.util.ConcurrentModificationException(); +}},"~O"); +c$=Clazz_p0p(); +}); +Clazz_declarePackage ("JU"); +Clazz_load (["JU.T3"], "JU.V3", null, function () { +c$ = Clazz_declareType (JU, "V3", JU.T3); +Clazz_makeConstructor (c$, +function () { +}); +c$.newV = Clazz_defineMethod (c$, "newV", +function (t) { +return JU.V3.new3 (t.x, t.y, t.z); +}, "JU.T3"); +c$.newVsub = Clazz_defineMethod (c$, "newVsub", +function (t1, t2) { +return JU.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z); +}, "JU.T3,JU.T3"); +c$.new3 = Clazz_defineMethod (c$, "new3", +function (x, y, z) { +var v = new JU.V3 (); +v.x = x; +v.y = y; +v.z = z; +return v; +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "angle", +function (v1) { +var xx = this.y * v1.z - this.z * v1.y; +var yy = this.z * v1.x - this.x * v1.z; +var zz = this.x * v1.y - this.y * v1.x; +var cross = Math.sqrt (xx * xx + yy * yy + zz * zz); +return Math.abs (Math.atan2 (cross, this.dot (v1))); +}, "JU.V3"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.util.Vector"], "javax.swing.ButtonGroup", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.buttons = null; +this.selection = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "ButtonGroup"); +Clazz_prepareFields (c$, function () { +this.buttons = new java.util.Vector (); +}); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "add", +function (b) { +if (b == null) { +return; +}this.buttons.addElement (b); +if (b.isSelected ()) { +if (this.selection == null) { +this.selection = b.getModel (); +} else { +b.setSelected (false); +}}b.getModel ().setGroup (this); +}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "remove", +function (b) { +if (b == null) { +return; +}this.buttons.removeElement (b); +if (b.getModel () === this.selection) { +this.selection = null; +}b.getModel ().setGroup (null); +}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "clearSelection", +function () { +if (this.selection != null) { +var oldSelection = this.selection; +this.selection = null; +oldSelection.setSelected (false); +}}); +Clazz_defineMethod (c$, "getElements", +function () { +return this.buttons.elements (); +}); +Clazz_defineMethod (c$, "getSelection", +function () { +return this.selection; +}); +Clazz_defineMethod (c$, "setSelected", +function (m, b) { +if (b && m != null && m !== this.selection) { +var oldSelection = this.selection; +this.selection = m; +if (oldSelection != null) { +oldSelection.setSelected (false); +}m.setSelected (true); +}}, "javax.swing.ButtonModel,~B"); +Clazz_defineMethod (c$, "isSelected", +function (m) { +return (m === this.selection); +}, "javax.swing.ButtonModel"); +Clazz_defineMethod (c$, "getButtonCount", +function () { +if (this.buttons == null) { +return 0; +} else { +return this.buttons.size (); +}}); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["jssun.awt.PaintEventDispatcher"], "javax.swing.SwingPaintEventDispatcher", ["javax.swing.RootPaneContainer", "jssun.awt.SunToolkit"], function () { +c$ = Clazz_declareType (javax.swing, "SwingPaintEventDispatcher", jssun.awt.PaintEventDispatcher); +Clazz_overrideMethod (c$, "shouldDoNativeBackgroundErase", +function (c) { +return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND || !(Clazz_instanceOf (c, javax.swing.RootPaneContainer)); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "queueSurfaceDataReplacing", +function (c, r) { +if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) { +var appContext = jssun.awt.SunToolkit.targetToAppContext (c); +return true; +}return Clazz_superCall (this, javax.swing.SwingPaintEventDispatcher, "queueSurfaceDataReplacing", [c, r]); +}, "java.awt.Component,Runnable"); +Clazz_defineStatics (c$, +"SHOW_FROM_DOUBLE_BUFFER", false, +"ERASE_BACKGROUND", false); +{ +javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER = false; +javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND = true; +}}); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (["java.util.HashSet", "$.IdentityHashMap"], "jssun.awt.AWTAutoShutdown", ["java.awt.AWTEvent"], function () { +c$ = Clazz_decorateAsClass (function () { +this.busyThreadSet = null; +this.toolkitThreadBusy = false; +this.peerMap = null; +Clazz_instantialize (this, arguments); +}, jssun.awt, "AWTAutoShutdown", null, Runnable); +Clazz_prepareFields (c$, function () { +this.busyThreadSet = new java.util.HashSet (7); +this.peerMap = new java.util.IdentityHashMap (); +}); +Clazz_makeConstructor (c$, + function () { +}); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function () { +return (jssun.awt.AWTAutoShutdown.theInstance == null ? (jssun.awt.AWTAutoShutdown.theInstance = new jssun.awt.AWTAutoShutdown ()) : jssun.awt.AWTAutoShutdown.theInstance); +}); +c$.notifyToolkitThreadBusy = Clazz_defineMethod (c$, "notifyToolkitThreadBusy", +function () { +jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (true); +}); +c$.notifyToolkitThreadFree = Clazz_defineMethod (c$, "notifyToolkitThreadFree", +function () { +jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (false); +}); +Clazz_defineMethod (c$, "notifyThreadBusy", +function (thread) { +this.busyThreadSet.add (thread); +}, "Thread"); +Clazz_defineMethod (c$, "notifyThreadFree", +function (thread) { +this.busyThreadSet.remove (thread); +}, "Thread"); +Clazz_defineMethod (c$, "notifyPeerMapUpdated", +function () { +if (!this.isReadyToShutdown ()) { +this.activateBlockerThread (); +}}); +Clazz_defineMethod (c$, "isReadyToShutdown", + function () { +return (!this.toolkitThreadBusy && this.peerMap.isEmpty () && this.busyThreadSet.isEmpty ()); +}); +Clazz_defineMethod (c$, "setToolkitBusy", + function (busy) { +if (busy != this.toolkitThreadBusy) { +if (busy != this.toolkitThreadBusy) { +if (busy) { +this.toolkitThreadBusy = busy; +} else { +this.toolkitThreadBusy = busy; +}}}}, "~B"); +Clazz_overrideMethod (c$, "run", +function () { +}); +c$.getShutdownEvent = Clazz_defineMethod (c$, "getShutdownEvent", +function () { +return ((Clazz_isClassDefined ("jssun.awt.AWTAutoShutdown$1") ? 0 : jssun.awt.AWTAutoShutdown.$AWTAutoShutdown$1$ ()), Clazz_innerTypeInstance (jssun.awt.AWTAutoShutdown$1, this, null, jssun.awt.AWTAutoShutdown.getInstance (), 0)); +}); +Clazz_defineMethod (c$, "activateBlockerThread", + function () { +}); +Clazz_defineMethod (c$, "registerPeer", +function (target, peer) { +this.peerMap.put (target, peer); +this.notifyPeerMapUpdated (); +}, "~O,~O"); +Clazz_defineMethod (c$, "unregisterPeer", +function (target, peer) { +if (this.peerMap.get (target) === peer) { +this.peerMap.remove (target); +}}, "~O,~O"); +Clazz_defineMethod (c$, "getPeer", +function (target) { +return this.peerMap.get (target); +}, "~O"); +Clazz_defineMethod (c$, "dumpPeers", +function (aLog) { +aLog.fine ("Mapped peers:"); +for (var key, $key = this.peerMap.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { +aLog.fine (key + "->" + this.peerMap.get (key)); +} +}, "java.util.logging.Logger"); +c$.$AWTAutoShutdown$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (jssun.awt, "AWTAutoShutdown$1", java.awt.AWTEvent); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"theInstance", null); +}); +Clazz_declarePackage ("jssun.awt"); +c$ = Clazz_decorateAsClass (function () { +this.event = null; +this.next = null; +Clazz_instantialize (this, arguments); +}, jssun.awt, "EventQueueItem"); +Clazz_makeConstructor (c$, +function (evt) { +this.event = evt; +}, "java.awt.AWTEvent"); +Clazz_declarePackage ("jssun.awt"); +Clazz_declareInterface (jssun.awt, "ModalExclude"); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (["java.awt.peer.CanvasPeer", "$.LightweightPeer", "$.PanelPeer"], "jssun.awt.NullComponentPeer", ["java.lang.IllegalStateException", "$.UnsupportedOperationException", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle"], function () { +c$ = Clazz_declareType (jssun.awt, "NullComponentPeer", null, [java.awt.peer.LightweightPeer, java.awt.peer.CanvasPeer, java.awt.peer.PanelPeer]); +Clazz_overrideMethod (c$, "isObscured", +function () { +return false; +}); +Clazz_overrideMethod (c$, "canDetermineObscurity", +function () { +return false; +}); +Clazz_overrideMethod (c$, "isFocusable", +function () { +return false; +}); +Clazz_overrideMethod (c$, "setVisible", +function (b) { +}, "~B"); +Clazz_defineMethod (c$, "show", +function () { +}); +Clazz_defineMethod (c$, "hide", +function () { +}); +Clazz_overrideMethod (c$, "setEnabled", +function (b) { +}, "~B"); +Clazz_defineMethod (c$, "enable", +function () { +}); +Clazz_defineMethod (c$, "disable", +function () { +}); +Clazz_overrideMethod (c$, "paint", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "repaint", +function (tm, x, y, width, height) { +}, "~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "print", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "setBounds", +function (x, y, width, height, op) { +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "reshape", +function (x, y, width, height) { +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "coalescePaintEvent", +function (e) { +}, "java.awt.event.PaintEvent"); +Clazz_defineMethod (c$, "handleEvent", +function (e) { +return false; +}, "java.awt.Event"); +Clazz_defineMethod (c$, "handleEvent", +function (arg0) { +}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "getPreferredSize", +function () { +return new java.awt.Dimension (1, 1); +}); +Clazz_overrideMethod (c$, "getMinimumSize", +function () { +return new java.awt.Dimension (1, 1); +}); +Clazz_overrideMethod (c$, "getToolkit", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getColorModel", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getGraphics", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getGraphicsConfiguration", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getFontMetrics", +function (font) { +return null; +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "dispose", +function () { +}); +Clazz_overrideMethod (c$, "setForeground", +function (c) { +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setBackground", +function (c) { +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setFont", +function (f) { +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "updateCursorImmediately", +function () { +}); +Clazz_defineMethod (c$, "setCursor", +function (cursor) { +}, "java.awt.Cursor"); +Clazz_overrideMethod (c$, "requestFocus", +function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { +return false; +}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); +Clazz_defineMethod (c$, "createImage", +function (producer) { +return null; +}, "java.awt.image.ImageProducer"); +Clazz_defineMethod (c$, "createImage", +function (width, height) { +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "prepareImage", +function (img, w, h, o) { +return false; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "checkImage", +function (img, w, h, o) { +return 0; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "preferredSize", +function () { +return this.getPreferredSize (); +}); +Clazz_defineMethod (c$, "minimumSize", +function () { +return this.getMinimumSize (); +}); +Clazz_overrideMethod (c$, "getLocationOnScreen", +function () { +return new java.awt.Point (0, 0); +}); +Clazz_overrideMethod (c$, "getInsets", +function () { +return this.insets (); +}); +Clazz_overrideMethod (c$, "beginValidate", +function () { +}); +Clazz_overrideMethod (c$, "endValidate", +function () { +}); +Clazz_defineMethod (c$, "insets", +function () { +return new java.awt.Insets (0, 0, 0, 0); +}); +Clazz_defineMethod (c$, "isPaintPending", +function () { +return false; +}); +Clazz_overrideMethod (c$, "handlesWheelScrolling", +function () { +return false; +}); +Clazz_overrideMethod (c$, "createVolatileImage", +function (width, height) { +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "beginLayout", +function () { +}); +Clazz_overrideMethod (c$, "endLayout", +function () { +}); +Clazz_overrideMethod (c$, "getBackBuffer", +function () { +throw new IllegalStateException ("Page-flipping is not allowed on a lightweight component"); +}); +Clazz_overrideMethod (c$, "destroyBuffers", +function () { +}); +Clazz_overrideMethod (c$, "isReparentSupported", +function () { +return false; +}); +Clazz_overrideMethod (c$, "reparent", +function (newNativeParent) { +throw new UnsupportedOperationException (); +}, "java.awt.peer.ContainerPeer"); +Clazz_defineMethod (c$, "restack", +function () { +throw new UnsupportedOperationException (); +}); +Clazz_defineMethod (c$, "isRestackSupported", +function () { +return false; +}); +Clazz_overrideMethod (c$, "layout", +function () { +}); +Clazz_overrideMethod (c$, "getBounds", +function () { +return new java.awt.Rectangle (0, 0, 0, 0); +}); +}); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (null, "jssun.awt.PaintEventDispatcher", ["java.awt.Rectangle", "java.awt.event.PaintEvent"], function () { +c$ = Clazz_declareType (jssun.awt, "PaintEventDispatcher"); +c$.setPaintEventDispatcher = Clazz_defineMethod (c$, "setPaintEventDispatcher", +function (dispatcher) { +{ +jssun.awt.PaintEventDispatcher.dispatcher = dispatcher; +}}, "jssun.awt.PaintEventDispatcher"); +c$.getPaintEventDispatcher = Clazz_defineMethod (c$, "getPaintEventDispatcher", +function () { +{ +if (jssun.awt.PaintEventDispatcher.dispatcher == null) { +jssun.awt.PaintEventDispatcher.dispatcher = new jssun.awt.PaintEventDispatcher (); +}return jssun.awt.PaintEventDispatcher.dispatcher; +}}); +Clazz_defineMethod (c$, "createPaintEvent", +function (target, x, y, w, h) { +return new java.awt.event.PaintEvent (target, 800, new java.awt.Rectangle (x, y, w, h)); +}, "java.awt.Component,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "shouldDoNativeBackgroundErase", +function (c) { +return true; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "queueSurfaceDataReplacing", +function (c, r) { +return false; +}, "java.awt.Component,Runnable"); +Clazz_defineStatics (c$, +"dispatcher", null); +}); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.queueHead = null; +this.queueTail = null; +this.eventQueue = null; +Clazz_instantialize (this, arguments); +}, jssun.awt, "PostEventQueue"); +Clazz_makeConstructor (c$, +function (eq) { +this.eventQueue = eq; +}, "java.awt.EventQueue"); +Clazz_defineMethod (c$, "noEvents", +function () { +return this.queueHead == null; +}); +Clazz_defineMethod (c$, "flush", +function () { +if (this.queueHead != null) { +var tempQueue; +{ +tempQueue = this.queueHead; +this.queueHead = this.queueTail = null; +while (tempQueue != null) { +swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event); +this.eventQueue.postEvent (tempQueue.event); +tempQueue = tempQueue.next; +} +}}}); +Clazz_defineMethod (c$, "postEvent", +function (event) { +var item = new jssun.awt.EventQueueItem (event); +{ +if (this.queueHead == null) { +this.queueHead = this.queueTail = item; +} else { +this.queueTail.next = item; +this.queueTail = item; +}}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false); +}, "java.awt.AWTEvent"); +}); +Clazz_declarePackage ("jssun.java2d"); +Clazz_load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () { +c$ = Clazz_decorateAsClass (function () { +this.transformState = 0; +this.foregroundColor = null; +this.backgroundColor = null; +this.$transform = null; +this.transX = 0; +this.transY = 0; +this.hints = null; +Clazz_instantialize (this, arguments); +}, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D); +Clazz_defineMethod (c$, "clone", +function () { +return this.clone0 (); +}); +Clazz_defineMethod (c$, "clone0", +function () { +try { +var g; +{ +g = Clazz_clone(this); +}g.$transform = new java.awt.geom.AffineTransform (this.$transform); +if (this.hints != null) { +g.hints = this.hints.clone (); +}return g; +} catch (e) { +if (Clazz_exceptionOf (e, CloneNotSupportedException)) { +} else { +throw e; +} +} +return null; +}); +Clazz_defineMethod (c$, "create", +function () { +return this.clone0 (); +}); +Clazz_defineStatics (c$, +"TRANSFORM_GENERIC", 4, +"TRANSFORM_TRANSLATESCALE", 3, +"TRANSFORM_ANY_TRANSLATE", 2, +"TRANSFORM_INT_TRANSLATE", 1, +"TRANSFORM_ISIDENT", 0); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () { +c$ = Clazz_declareType (javax.swing, "UIManager"); +c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", +function () { +return javax.swing.UIManager.uid; +}); +c$.getInstalledLookAndFeels = Clazz_defineMethod (c$, "getInstalledLookAndFeels", +function () { +return javax.swing.UIManager.installedLAFs; +}); +c$.setInstalledLookAndFeels = Clazz_defineMethod (c$, "setInstalledLookAndFeels", +function (infos) { +swingjs.JSToolkit.notImplemented (null); +}, "~A"); +c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", +function (info) { +swingjs.JSToolkit.notImplemented (null); +}, "javax.swing.UIManager.LookAndFeelInfo"); +c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", +function (name, className) { +swingjs.JSToolkit.notImplemented (null); +}, "~S,~S"); +c$.getLookAndFeel = Clazz_defineMethod (c$, "getLookAndFeel", +function () { +return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf); +}); +c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", +function (newLookAndFeel) { +}, "javax.swing.LookAndFeel"); +c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", +function (className) { +var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className); +javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ())); +}, "~S"); +c$.getSystemLookAndFeelClassName = Clazz_defineMethod (c$, "getSystemLookAndFeelClassName", +function () { +return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName (); +}); +c$.getCrossPlatformLookAndFeelClassName = Clazz_defineMethod (c$, "getCrossPlatformLookAndFeelClassName", +function () { +return "swingjs.plaf.HTML5LookAndFeel"; +}); +c$.getDefaults = Clazz_defineMethod (c$, "getDefaults", +function () { +javax.swing.UIManager.maybeInitialize (); +return javax.swing.UIManager.uid; +}); +c$.getFont = Clazz_defineMethod (c$, "getFont", +function (key) { +return javax.swing.UIManager.getDefaults ().getFont (key); +}, "~O"); +c$.getFont = Clazz_defineMethod (c$, "getFont", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getFont (key, l); +}, "~O,java.util.Locale"); +c$.getColor = Clazz_defineMethod (c$, "getColor", +function (key) { +return javax.swing.UIManager.getDefaults ().getColor (key); +}, "~O"); +c$.getColor = Clazz_defineMethod (c$, "getColor", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getColor (key, l); +}, "~O,java.util.Locale"); +c$.getIcon = Clazz_defineMethod (c$, "getIcon", +function (key) { +return javax.swing.UIManager.getDefaults ().getIcon (key); +}, "~O"); +c$.getIcon = Clazz_defineMethod (c$, "getIcon", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getIcon (key, l); +}, "~O,java.util.Locale"); +c$.getBorder = Clazz_defineMethod (c$, "getBorder", +function (key) { +return javax.swing.UIManager.getDefaults ().getBorder (key); +}, "~O"); +c$.getBorder = Clazz_defineMethod (c$, "getBorder", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getBorder (key, l); +}, "~O,java.util.Locale"); +c$.getString = Clazz_defineMethod (c$, "getString", +function (key) { +return javax.swing.UIManager.getDefaults ().getString (key); +}, "~O"); +c$.getString = Clazz_defineMethod (c$, "getString", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getString (key, l); +}, "~O,java.util.Locale"); +c$.getString = Clazz_defineMethod (c$, "getString", +function (key, c) { +var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale (); +return javax.swing.UIManager.getString (key, l); +}, "~O,java.awt.Component"); +c$.getInt = Clazz_defineMethod (c$, "getInt", +function (key) { +return javax.swing.UIManager.getDefaults ().getInt (key); +}, "~O"); +c$.getInt = Clazz_defineMethod (c$, "getInt", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getInt (key, l); +}, "~O,java.util.Locale"); +c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", +function (key) { +return javax.swing.UIManager.getDefaults ().getBoolean (key); +}, "~O"); +c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getBoolean (key, l); +}, "~O,java.util.Locale"); +c$.getInsets = Clazz_defineMethod (c$, "getInsets", +function (key) { +return javax.swing.UIManager.getDefaults ().getInsets (key); +}, "~O"); +c$.getInsets = Clazz_defineMethod (c$, "getInsets", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getInsets (key, l); +}, "~O,java.util.Locale"); +c$.getDimension = Clazz_defineMethod (c$, "getDimension", +function (key) { +return javax.swing.UIManager.getDefaults ().getDimension (key); +}, "~O"); +c$.getDimension = Clazz_defineMethod (c$, "getDimension", +function (key, l) { +return javax.swing.UIManager.getDefaults ().getDimension (key, l); +}, "~O,java.util.Locale"); +c$.get = Clazz_defineMethod (c$, "get", +function (key) { +return javax.swing.UIManager.getDefaults ().get (key); +}, "~O"); +c$.get = Clazz_defineMethod (c$, "get", +function (key, l) { +return javax.swing.UIManager.getDefaults ().get (key, l); +}, "~O,java.util.Locale"); +c$.put = Clazz_defineMethod (c$, "put", +function (key, value) { +return javax.swing.UIManager.getDefaults ().put (key, value); +}, "~O,~O"); +c$.getUI = Clazz_defineMethod (c$, "getUI", +function (target) { +javax.swing.UIManager.maybeInitialize (); +var ui = null; +ui = javax.swing.UIManager.getDefaults ().getUI (target); +if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented"); +return ui; +}, "javax.swing.JComponent"); +c$.addPropertyChangeListener = Clazz_defineMethod (c$, "addPropertyChangeListener", +function (listener) { +}, "java.beans.PropertyChangeListener"); +c$.removePropertyChangeListener = Clazz_defineMethod (c$, "removePropertyChangeListener", +function (listener) { +}, "java.beans.PropertyChangeListener"); +c$.getPropertyChangeListeners = Clazz_defineMethod (c$, "getPropertyChangeListeners", +function () { +return new Array (0); +}); +c$.maybeInitialize = Clazz_defineMethod (c$, "maybeInitialize", + function () { +if (javax.swing.UIManager.uid == null) { +javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults (); +javax.swing.UIManager.initialize (); +}}); +c$.initialize = Clazz_defineMethod (c$, "initialize", + function () { +if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { +jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ()); +}}); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.name = null; +this.className = null; +Clazz_instantialize (this, arguments); +}, javax.swing.UIManager, "LookAndFeelInfo"); +Clazz_makeConstructor (c$, +function (a, b) { +this.name = a; +this.className = b; +}, "~S,~S"); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_defineMethod (c$, "getClassName", +function () { +return this.className; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]"; +}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"installedLAFs", null); +{ +var iLAFs = new java.util.ArrayList (4); +iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel")); +javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ())); +}Clazz_defineStatics (c$, +"laf", null, +"uid", null); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.util.Hashtable", "java.util.Locale"], "javax.swing.UIDefaults", ["java.lang.Boolean", "$.Error", "java.util.HashMap", "$.Vector", "java.awt.Color", "$.Dimension", "$.Font", "$.Insets", "javax.swing.Icon", "$.SwingUtilities", "javax.swing.border.Border", "javax.swing.event.SwingPropertyChangeSupport", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.changeSupport = null; +this.resourceBundles = null; +this.defaultLocale = null; +this.resourceCache = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "UIDefaults", java.util.Hashtable); +Clazz_prepareFields (c$, function () { +this.defaultLocale = java.util.Locale.getDefault (); +}); +Clazz_makeConstructor (c$, +function () { +this.construct (700, .75); +}); +Clazz_makeConstructor (c$, +function (initialCapacity, loadFactor) { +Clazz_superConstructor (this, javax.swing.UIDefaults, [initialCapacity, loadFactor]); +this.resourceCache = new java.util.HashMap (); +}, "~N,~N"); +Clazz_makeConstructor (c$, +function (keyValueList) { +Clazz_superConstructor (this, javax.swing.UIDefaults, [Clazz_doubleToInt (keyValueList.length / 2)]); +for (var i = 0; i < keyValueList.length; i += 2) { +Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], keyValueList[i + 1]]); +} +}, "~A"); +Clazz_defineMethod (c$, "get", +function (key) { +var value = this.getFromHashtable (key); +return (value != null) ? value : this.getFromResourceBundle (key, null); +}, "~O"); +Clazz_defineMethod (c$, "getFromHashtable", + function (key) { +var value = Clazz_superCall (this, javax.swing.UIDefaults, "get", [key]); +if (value == null && (Clazz_instanceOf (key, String))) { +var skey = key; +if (skey.endsWith (".font") || skey.endsWith (".background") || skey.endsWith (".foreground")) value = Clazz_superCall (this, javax.swing.UIDefaults, "get", ["*" + skey.substring (skey.lastIndexOf ("."))]); +}if ((value !== javax.swing.UIDefaults.PENDING) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue)) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue))) { +return value; +}if (!(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue))) { +return value; +}if (Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue)) { +try { +value = (value).createValue (this); +} finally { +if (value == null) { +Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]); +} else { +Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]); +}} +} else { +value = (value).createValue (this); +}return value; +}, "~O"); +Clazz_defineMethod (c$, "get", +function (key, l) { +var value = this.getFromHashtable (key); +return (value != null) ? value : this.getFromResourceBundle (key, l); +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getFromResourceBundle", + function (key, l) { +if (this.resourceBundles == null || this.resourceBundles.isEmpty () || !(Clazz_instanceOf (key, String))) { +return null; +}if (l == null) { +if (this.defaultLocale == null) return null; + else l = this.defaultLocale; +}{ +return this.getResourceCache (l).get (key); +}}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getResourceCache", + function (l) { +return null; +}, "java.util.Locale"); +Clazz_defineMethod (c$, "put", +function (key, value) { +var oldValue = (value == null) ? Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]) : Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]); +if (Clazz_instanceOf (key, String)) { +this.firePropertyChange (key, oldValue, value); +}return oldValue; +}, "~O,~O"); +Clazz_defineMethod (c$, "putDefaults", +function (keyValueList) { +for (var i = 0, max = keyValueList.length; i < max; i += 2) { +var value = keyValueList[i + 1]; +if (value == null) { +Clazz_superCall (this, javax.swing.UIDefaults, "remove", [keyValueList[i]]); +} else { +Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], value]); +}} +this.firePropertyChange ("UIDefaults", null, null); +}, "~A"); +Clazz_defineMethod (c$, "getFont", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, java.awt.Font)) ? value : null; +}, "~O"); +Clazz_defineMethod (c$, "getFont", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, java.awt.Font)) ? value : null; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getColor", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, java.awt.Color)) ? value : null; +}, "~O"); +Clazz_defineMethod (c$, "getColor", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, java.awt.Color)) ? value : null; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getIcon", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null; +}, "~O"); +Clazz_defineMethod (c$, "getIcon", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getBorder", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null; +}, "~O"); +Clazz_defineMethod (c$, "getBorder", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getString", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, String)) ? value : null; +}, "~O"); +Clazz_defineMethod (c$, "getString", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, String)) ? value : null; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getInt", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0; +}, "~O"); +Clazz_defineMethod (c$, "getInt", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getBoolean", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false; +}, "~O"); +Clazz_defineMethod (c$, "getBoolean", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getInsets", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null; +}, "~O"); +Clazz_defineMethod (c$, "getInsets", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getDimension", +function (key) { +var value = this.get (key); +return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null; +}, "~O"); +Clazz_defineMethod (c$, "getDimension", +function (key, l) { +var value = this.get (key, l); +return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null; +}, "~O,java.util.Locale"); +Clazz_defineMethod (c$, "getUIClass", +function (uiClassID, uiClassLoader) { +try { +var className = this.get (uiClassID); +if (className != null) { +var cls = this.get (className); +if (cls == null) { +if (uiClassLoader == null) { +cls = javax.swing.SwingUtilities.loadSystemClass (className); +} else { +cls = uiClassLoader.loadClass (className); +}if (cls != null) { +this.put (className, cls); +}}return cls; +}} catch (e$$) { +if (Clazz_exceptionOf (e$$, ClassNotFoundException)) { +var e = e$$; +{ +return null; +} +} else if (Clazz_exceptionOf (e$$, ClassCastException)) { +var e = e$$; +{ +return null; +} +} else { +throw e$$; +} +} +return null; +}, "~S,ClassLoader"); +Clazz_defineMethod (c$, "getUIClass", +function (uiClassID) { +return this.getUIClass (uiClassID, null); +}, "~S"); +Clazz_defineMethod (c$, "getUIError", +function (msg) { +System.err.println ("UIDefaults.getUI() failed: " + msg); +try { +throw new Error (); +} catch (e) { +e.printStackTrace (); +} +}, "~S"); +Clazz_defineMethod (c$, "getUI", +function (target) { +return swingjs.JSToolkit.getComponentUI (target); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "addPropertyChangeListener", +function (listener) { +if (this.changeSupport == null) { +this.changeSupport = new javax.swing.event.SwingPropertyChangeSupport (this); +}this.changeSupport.addPropertyChangeListener (listener); +}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "removePropertyChangeListener", +function (listener) { +if (this.changeSupport != null) { +this.changeSupport.removePropertyChangeListener (listener); +}}, "java.beans.PropertyChangeListener"); +Clazz_defineMethod (c$, "getPropertyChangeListeners", +function () { +if (this.changeSupport == null) { +return new Array (0); +}return this.changeSupport.getPropertyChangeListeners (); +}); +Clazz_defineMethod (c$, "firePropertyChange", +function (propertyName, oldValue, newValue) { +if (this.changeSupport != null) { +this.changeSupport.firePropertyChange (propertyName, oldValue, newValue); +}}, "~S,~O,~O"); +Clazz_defineMethod (c$, "addResourceBundle", +function (bundleName) { +if (bundleName == null) { +return; +}if (this.resourceBundles == null) { +this.resourceBundles = new java.util.Vector (5); +}if (!this.resourceBundles.contains (bundleName)) { +this.resourceBundles.add (bundleName); +this.resourceCache.clear (); +}}, "~S"); +Clazz_defineMethod (c$, "removeResourceBundle", +function (bundleName) { +if (this.resourceBundles != null) { +this.resourceBundles.remove (bundleName); +}this.resourceCache.clear (); +}, "~S"); +Clazz_defineMethod (c$, "setDefaultLocale", +function (l) { +this.defaultLocale = l; +}, "java.util.Locale"); +Clazz_defineMethod (c$, "getDefaultLocale", +function () { +return this.defaultLocale; +}); +Clazz_declareInterface (javax.swing.UIDefaults, "LazyValue"); +Clazz_declareInterface (javax.swing.UIDefaults, "ActiveValue"); +c$.PENDING = c$.prototype.PENDING = String.instantialize ("Pending"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () { +c$ = Clazz_declareType (javax.swing, "LookAndFeel"); +c$.installColors = Clazz_defineMethod (c$, "installColors", +function (c, defaultBgName, defaultFgName) { +var bg = c.getBackground (); +if (bg == null || Clazz_instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName)); +var fg = c.getForeground (); +if (fg == null || Clazz_instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName)); +}, "javax.swing.JComponent,~S,~S"); +c$.installColorsAndFont = Clazz_defineMethod (c$, "installColorsAndFont", +function (c, defaultBgName, defaultFgName, defaultFontName) { +var f = c.getFont (); +if (f == null || Clazz_instanceOf (f, javax.swing.plaf.UIResource)) { +c.setFont (javax.swing.UIManager.getFont (defaultFontName)); +}javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName); +}, "javax.swing.JComponent,~S,~S,~S"); +c$.installBorder = Clazz_defineMethod (c$, "installBorder", +function (c, defaultBorderName) { +swingjs.JSToolkit.notImplemented (null); +}, "javax.swing.JComponent,~S"); +c$.uninstallBorder = Clazz_defineMethod (c$, "uninstallBorder", +function (c) { +swingjs.JSToolkit.notImplemented (null); +}, "javax.swing.JComponent"); +c$.installProperty = Clazz_defineMethod (c$, "installProperty", +function (c, propertyName, propertyValue) { +if (Clazz_instanceOf (c, javax.swing.JPasswordField)) { +if (!(c).customSetUIProperty (propertyName, propertyValue)) { +c.setUIProperty (propertyName, propertyValue); +}} else { +c.setUIProperty (propertyName, propertyValue); +}}, "javax.swing.JComponent,~S,~O"); +c$.makeKeyBindings = Clazz_defineMethod (c$, "makeKeyBindings", +function (keyBindingList) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "~A"); +c$.makeInputMap = Clazz_defineMethod (c$, "makeInputMap", +function (keys) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "~A"); +c$.makeComponentInputMap = Clazz_defineMethod (c$, "makeComponentInputMap", +function (c, keys) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "javax.swing.JComponent,~A"); +c$.loadKeyBindings = Clazz_defineMethod (c$, "loadKeyBindings", +function (retMap, keys) { +swingjs.JSToolkit.notImplemented (null); +}, "javax.swing.InputMap,~A"); +c$.makeIcon = Clazz_defineMethod (c$, "makeIcon", +function (baseClass, gifFile) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "Class,~S"); +Clazz_defineMethod (c$, "getLayoutStyle", +function () { +return jssun.swing.DefaultLayoutStyle.getInstance (); +}); +Clazz_defineMethod (c$, "provideErrorFeedback", +function (component) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.Component"); +c$.getDesktopPropertyValue = Clazz_defineMethod (c$, "getDesktopPropertyValue", +function (systemPropertyName, fallbackValue) { +swingjs.JSToolkit.notImplemented (null); +return fallbackValue; +}, "~S,~O"); +Clazz_defineMethod (c$, "getDisabledIcon", +function (component, icon) { +swingjs.JSToolkit.notImplemented (null); +return null; +}, "javax.swing.JComponent,javax.swing.Icon"); +Clazz_defineMethod (c$, "getDisabledSelectedIcon", +function (component, icon) { +return this.getDisabledIcon (component, icon); +}, "javax.swing.JComponent,javax.swing.Icon"); +Clazz_defineMethod (c$, "getSupportsWindowDecorations", +function () { +return false; +}); +Clazz_defineMethod (c$, "initialize", +function () { +}); +Clazz_defineMethod (c$, "uninitialize", +function () { +}); +Clazz_defineMethod (c$, "getDefaults", +function () { +return null; +}); +Clazz_overrideMethod (c$, "toString", +function () { +return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]"; +}); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.lang.Enum"], "javax.swing.DropMode", null, function () { +c$ = Clazz_declareType (javax.swing, "DropMode", Enum); +Clazz_defineEnumConstant (c$, "USE_SELECTION", 0, []); +Clazz_defineEnumConstant (c$, "ON", 1, []); +Clazz_defineEnumConstant (c$, "INSERT", 2, []); +Clazz_defineEnumConstant (c$, "INSERT_ROWS", 3, []); +Clazz_defineEnumConstant (c$, "INSERT_COLS", 4, []); +Clazz_defineEnumConstant (c$, "ON_OR_INSERT", 5, []); +Clazz_defineEnumConstant (c$, "ON_OR_INSERT_ROWS", 6, []); +Clazz_defineEnumConstant (c$, "ON_OR_INSERT_COLS", 7, []); +}); +Clazz_declarePackage ("java.awt.font"); +Clazz_load (null, "java.awt.font.FontRenderContext", ["java.awt.RenderingHints", "java.awt.geom.AffineTransform"], function () { +c$ = Clazz_decorateAsClass (function () { +this.tx = null; +this.aaHintValue = null; +this.fmHintValue = null; +this.defaulting = false; +Clazz_instantialize (this, arguments); +}, java.awt.font, "FontRenderContext"); +Clazz_makeConstructor (c$, +function () { +this.defaulting = true; +}); +Clazz_makeConstructor (c$, +function (tx, isAntiAliased, usesFractionalMetrics) { +if (tx != null && !tx.isIdentity ()) { +this.tx = new java.awt.geom.AffineTransform (tx); +}}, "java.awt.geom.AffineTransform,~B,~B"); +Clazz_makeConstructor (c$, +function (tx, aaHint, fmHint) { +if (tx != null && !tx.isIdentity ()) { +this.tx = new java.awt.geom.AffineTransform (tx); +}this.aaHintValue = aaHint; +this.fmHintValue = fmHint; +}, "java.awt.geom.AffineTransform,~O,~O"); +Clazz_defineMethod (c$, "isTransformed", +function () { +if (!this.defaulting) { +return this.tx != null; +} else { +return !this.getTransform ().isIdentity (); +}}); +Clazz_defineMethod (c$, "getTransformType", +function () { +if (!this.defaulting) { +if (this.tx == null) { +return 0; +} else { +return this.tx.getType (); +}} else { +return this.getTransform ().getType (); +}}); +Clazz_defineMethod (c$, "getTransform", +function () { +return (this.tx == null) ? new java.awt.geom.AffineTransform () : new java.awt.geom.AffineTransform (this.tx); +}); +Clazz_defineMethod (c$, "isAntiAliased", +function () { +return !(this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF || this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); +}); +Clazz_defineMethod (c$, "usesFractionalMetrics", +function () { +return !(this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF || this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT); +}); +Clazz_defineMethod (c$, "getAntiAliasingHint", +function () { +if (this.defaulting) { +if (this.isAntiAliased ()) { +return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON; +} else { +return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF; +}}return this.aaHintValue; +}); +Clazz_defineMethod (c$, "getFractionalMetricsHint", +function () { +if (this.defaulting) { +if (this.usesFractionalMetrics ()) { +return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON; +} else { +return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF; +}}return this.fmHintValue; +}); +Clazz_defineMethod (c$, "equals", +function (obj) { +try { +return this.equals (obj); +} catch (e) { +if (Clazz_exceptionOf (e, ClassCastException)) { +return false; +} else { +throw e; +} +} +}, "~O"); +Clazz_defineMethod (c$, "equals", +function (rhs) { +if (this === rhs) { +return true; +}if (rhs == null) { +return false; +}if (!rhs.defaulting && !this.defaulting) { +if (rhs.aaHintValue === this.aaHintValue && rhs.fmHintValue === this.fmHintValue) { +return this.tx == null ? rhs.tx == null : this.tx.equals (rhs.tx); +}return false; +} else { +return rhs.getAntiAliasingHint () === this.getAntiAliasingHint () && rhs.getFractionalMetricsHint () === this.getFractionalMetricsHint () && rhs.getTransform ().equals (this.getTransform ()); +}}, "java.awt.font.FontRenderContext"); +Clazz_defineMethod (c$, "hashCode", +function () { +var hash = this.tx == null ? 0 : this.tx.hashCode (); +if (this.defaulting) { +hash += this.getAntiAliasingHint ().hashCode (); +hash += this.getFractionalMetricsHint ().hashCode (); +} else { +hash += this.aaHintValue.hashCode (); +hash += this.fmHintValue.hashCode (); +}return hash; +}); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.AWTEvent"], "java.awt.event.InputMethodEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.when = 0; +this.text = null; +this.committedCharacterCount = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "InputMethodEvent", java.awt.AWTEvent); +Clazz_defineMethod (c$, "getText", +function () { +return this.text; +}); +Clazz_defineMethod (c$, "getCommittedCharacterCount", +function () { +return this.committedCharacterCount; +}); +Clazz_defineMethod (c$, "getWhen", +function () { +return this.when; +}); +Clazz_defineStatics (c$, +"INPUT_METHOD_FIRST", 1100, +"INPUT_METHOD_TEXT_CHANGED", 1100, +"CARET_POSITION_CHANGED", 1101, +"INPUT_METHOD_LAST", 1101); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.event.ComponentAdapter", "javax.swing.JComponent"], "javax.swing.JViewport", ["java.lang.IllegalArgumentException", "java.applet.Applet", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle", "$.Window", "javax.swing.CellRendererPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager", "$.ViewportLayout", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.isViewSizeSet = false; +this.lastPaintPosition = null; +this.backingStore = false; +this.backingStoreImage = null; +this.scrollUnderway = false; +this.viewListener = null; +this.changeEvent = null; +this.scrollMode = 1; +this.repaintAll = false; +this.waitingForRepaint = false; +this.inBlitPaint = false; +this.hasHadValidView = false; +if (!Clazz_isClassDefined ("javax.swing.JViewport.ViewListener")) { +javax.swing.JViewport.$JViewport$ViewListener$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "JViewport", javax.swing.JComponent); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JViewport); +this.setLayout (this.createLayoutManager ()); +this.setOpaque (true); +this.updateUI (); +this.setInheritsPopupMenu (true); +}); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "ViewportUI"; +}); +Clazz_overrideMethod (c$, "addImpl", +function (child, constraints, index) { +this.setView (child); +return child; +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "remove", +function (child) { +child.removeComponentListener (this.viewListener); +this.removeChild (child); +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "scrollRectToVisible", +function (contentRect) { +var view = this.getView (); +if (view == null) { +return; +} else { +if (!view.isValid ()) { +this.validateView (); +}var dx = 0; +var dy = 0; +dx = this.positionAdjustment (this.getWidth (), contentRect.width, contentRect.x); +dy = this.positionAdjustment (this.getHeight (), contentRect.height, contentRect.y); +if (dx != 0 || dy != 0) { +var viewPosition = this.getViewPosition (); +var viewSize = view.getSize (); +var startX = viewPosition.x; +var startY = viewPosition.y; +var extent = this.getExtentSize (); +viewPosition.x -= dx; +viewPosition.y -= dy; +if (view.isValid ()) { +if (this.getParent ().getComponentOrientation ().isLeftToRight ()) { +if (viewPosition.x + extent.width > viewSize.width) { +viewPosition.x = Math.max (0, viewSize.width - extent.width); +} else if (viewPosition.x < 0) { +viewPosition.x = 0; +}} else { +if (extent.width > viewSize.width) { +viewPosition.x = viewSize.width - extent.width; +} else { +viewPosition.x = Math.max (0, Math.min (viewSize.width - extent.width, viewPosition.x)); +}}if (viewPosition.y + extent.height > viewSize.height) { +viewPosition.y = Math.max (0, viewSize.height - extent.height); +} else if (viewPosition.y < 0) { +viewPosition.y = 0; +}}if (viewPosition.x != startX || viewPosition.y != startY) { +this.setViewPosition (viewPosition); +this.scrollUnderway = false; +}}}}, "java.awt.Rectangle"); +Clazz_defineMethod (c$, "validateView", + function () { +var validateRoot = null; +for (var c = this; c != null; c = c.getParent ()) { +if ((Clazz_instanceOf (c, javax.swing.CellRendererPane)) || !c.isLightweight ()) { +return; +}if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) { +validateRoot = c; +break; +}} +if (validateRoot == null) { +return; +}var root = null; +for (var c = validateRoot; c != null; c = c.getParent ()) { +if (!c.isLightweight ()) { +return; +}if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) { +root = c; +break; +}} +if (root == null) { +return; +}validateRoot.validate (); +var rm = javax.swing.RepaintManager.currentManager (this); +if (rm != null) { +rm.removeInvalidComponent (validateRoot); +}}); +Clazz_defineMethod (c$, "positionAdjustment", + function (parentWidth, childWidth, childAt) { +if (childAt >= 0 && childWidth + childAt <= parentWidth) { +return 0; +}if (childAt <= 0 && childWidth + childAt >= parentWidth) { +return 0; +}if (childAt > 0 && childWidth <= parentWidth) { +return -childAt + parentWidth - childWidth; +}if (childAt >= 0 && childWidth >= parentWidth) { +return -childAt; +}if (childAt <= 0 && childWidth <= parentWidth) { +return -childAt; +}if (childAt < 0 && childWidth >= parentWidth) { +return -childAt + parentWidth - childWidth; +}return 0; +}, "~N,~N,~N"); +Clazz_overrideMethod (c$, "setBorder", +function (border) { +if (border != null) { +throw new IllegalArgumentException ("JViewport.setBorder() not supported"); +}}, "javax.swing.border.Border"); +Clazz_defineMethod (c$, "getInsets", +function () { +return new java.awt.Insets (0, 0, 0, 0); +}); +Clazz_defineMethod (c$, "getInsets", +function (insets) { +insets.left = insets.top = insets.right = insets.bottom = 0; +return insets; +}, "java.awt.Insets"); +Clazz_defineMethod (c$, "getBackingStoreGraphics", + function (g) { +var bsg = this.backingStoreImage.getGraphics (); +bsg.setColor (g.getColor ()); +bsg.setFont (g.getFont ()); +bsg.setClip (g.getClipBounds ()); +return bsg; +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintViaBackingStore", + function (g) { +var bsg = this.getBackingStoreGraphics (g); +try { +Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]); +g.drawImage (this.backingStoreImage, 0, 0, this); +} finally { +bsg.dispose (); +} +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "paintViaBackingStore", + function (g, oClip) { +var bsg = this.getBackingStoreGraphics (g); +try { +Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]); +g.setClip (oClip); +g.drawImage (this.backingStoreImage, 0, 0, this); +} finally { +bsg.dispose (); +} +}, "java.awt.Graphics,java.awt.Rectangle"); +Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", +function () { +return false; +}); +Clazz_overrideMethod (c$, "isPaintingOrigin", +function () { +if (this.scrollMode == 2) { +return true; +}return false; +}); +Clazz_defineMethod (c$, "getViewLocation", + function () { +var view = this.getView (); +if (view != null) { +return view.getLocation (); +} else { +return new java.awt.Point (0, 0); +}}); +Clazz_defineMethod (c$, "paint", +function (g) { +var width = this.getWidth (); +var height = this.getHeight (); +if ((width <= 0) || (height <= 0)) { +return; +}if (this.inBlitPaint) { +Clazz_superCall (this, javax.swing.JViewport, "paint", [g]); +return; +}if (this.repaintAll) { +this.repaintAll = false; +var clipB = g.getClipBounds (); +} else if (this.waitingForRepaint) { +var clipB = g.getClipBounds (); +if (clipB.width >= this.getWidth () && clipB.height >= this.getHeight ()) { +this.waitingForRepaint = false; +}}if (!this.backingStore || this.isBlitting () || this.getView () == null) { +Clazz_superCall (this, javax.swing.JViewport, "paint", [g]); +this.lastPaintPosition = this.getViewLocation (); +return; +}var viewBounds = this.getView ().getBounds (); +if (!this.isOpaque ()) { +g.clipRect (0, 0, viewBounds.width, viewBounds.height); +}if (this.backingStoreImage == null) { +this.backingStoreImage = this.createImage (width, height); +var clip = g.getClipBounds (); +if (clip.width != width || clip.height != height) { +if (!this.isOpaque ()) { +g.setClip (0, 0, Math.min (viewBounds.width, width), Math.min (viewBounds.height, height)); +} else { +g.setClip (0, 0, width, height); +}this.paintViaBackingStore (g, clip); +} else { +this.paintViaBackingStore (g); +}} else { +if (!this.scrollUnderway || this.lastPaintPosition.equals (this.getViewLocation ())) { +this.paintViaBackingStore (g); +} else { +var blitFrom = new java.awt.Point (); +var blitTo = new java.awt.Point (); +var blitSize = new java.awt.Dimension (); +var blitPaint = new java.awt.Rectangle (); +var newLocation = this.getViewLocation (); +var dx = newLocation.x - this.lastPaintPosition.x; +var dy = newLocation.y - this.lastPaintPosition.y; +var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint); +if (!canBlit) { +this.paintViaBackingStore (g); +} else { +var bdx = blitTo.x - blitFrom.x; +var bdy = blitTo.y - blitFrom.y; +var clip = g.getClipBounds (); +g.setClip (0, 0, width, height); +var bsg = this.getBackingStoreGraphics (g); +try { +bsg.copyArea (blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy); +g.setClip (clip.x, clip.y, clip.width, clip.height); +var r = viewBounds.intersection (blitPaint); +bsg.setClip (r); +Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]); +g.drawImage (this.backingStoreImage, 0, 0, this); +} finally { +bsg.dispose (); +} +}}}this.lastPaintPosition = this.getViewLocation (); +this.scrollUnderway = false; +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "reshape", +function (x, y, w, h) { +var sizeChanged = (this.getWidth () != w) || (this.getHeight () != h); +if (sizeChanged) { +this.backingStoreImage = null; +}Clazz_superCall (this, javax.swing.JViewport, "reshape", [x, y, w, h]); +if (sizeChanged) { +this.fireStateChanged (); +}}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setScrollMode", +function (mode) { +this.scrollMode = mode; +if (mode == 2) { +this.backingStore = true; +} else { +this.backingStore = false; +}}, "~N"); +Clazz_defineMethod (c$, "getScrollMode", +function () { +return this.scrollMode; +}); +Clazz_defineMethod (c$, "isBackingStoreEnabled", +function () { +return this.scrollMode == 2; +}); +Clazz_defineMethod (c$, "setBackingStoreEnabled", +function (enabled) { +if (enabled) { +this.setScrollMode (2); +} else { +this.setScrollMode (1); +}}, "~B"); +Clazz_defineMethod (c$, "isBlitting", + function () { +var view = this.getView (); +return (this.scrollMode == 1) && (Clazz_instanceOf (view, javax.swing.JComponent)) && (view).isOpaque (); +}); +Clazz_defineMethod (c$, "getView", +function () { +return (this.getComponentCount () > 0) ? this.getComponent (0) : null; +}); +Clazz_defineMethod (c$, "setView", +function (view) { +var n = this.getComponentCount (); +for (var i = n - 1; i >= 0; i--) { +this.remove (this.getComponent (i)); +} +this.isViewSizeSet = false; +if (view != null) { +this.addImplSAEM (view, null, -1); +this.viewListener = this.createViewListener (); +view.addComponentListener (this.viewListener); +}if (this.hasHadValidView) { +this.fireStateChanged (); +} else if (view != null) { +this.hasHadValidView = true; +}this.revalidate (); +this.repaint (); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getViewSize", +function () { +var view = this.getView (); +if (view == null) { +return new java.awt.Dimension (0, 0); +} else if (this.isViewSizeSet) { +return view.getSize (); +} else { +return view.getPreferredSize (); +}}); +Clazz_defineMethod (c$, "setViewSize", +function (newSize) { +var view = this.getView (); +if (view != null) { +var oldSize = view.getSize (); +if (!newSize.equals (oldSize)) { +this.scrollUnderway = false; +view.setSize (newSize); +this.isViewSizeSet = true; +this.fireStateChanged (); +}}}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "getViewPosition", +function () { +var view = this.getView (); +if (view != null) { +var p = view.getLocation (); +p.x = -p.x; +p.y = -p.y; +return p; +} else { +return new java.awt.Point (0, 0); +}}); +Clazz_defineMethod (c$, "setViewPosition", +function (p) { +var view = this.getView (); +if (view == null) { +return; +}var oldX; +var oldY; +var x = p.x; +var y = p.y; +if (Clazz_instanceOf (view, javax.swing.JComponent)) { +var c = view; +oldX = c.getX (); +oldY = c.getY (); +} else { +var r = view.getBounds (); +oldX = r.x; +oldY = r.y; +}var newX = -x; +var newY = -y; +if ((oldX != newX) || (oldY != newY)) { +if (!this.waitingForRepaint && this.isBlitting () && this.canUseWindowBlitter ()) { +var rm = javax.swing.RepaintManager.currentManager (this); +var jview = view; +var dirty = rm.getDirtyRegion (jview); +if (dirty == null || !dirty.contains (jview.getVisibleRect ())) { +rm.beginPaint (); +try { +var g = javax.swing.JComponent.safelyGetGraphics (this, javax.swing.SwingUtilities.getRoot (this)); +this.flushViewDirtyRegion (g, dirty); +view.setLocation (newX, newY); +g.setClip (0, 0, this.getWidth (), Math.min (this.getHeight (), jview.getHeight ())); +this.repaintAll = (this.windowBlitPaint (g) && this.needsRepaintAfterBlit ()); +g.dispose (); +rm.markCompletelyClean (this.getParent ()); +rm.markCompletelyClean (this); +rm.markCompletelyClean (jview); +} finally { +rm.endPaint (); +} +} else { +view.setLocation (newX, newY); +this.repaintAll = false; +}} else { +this.scrollUnderway = true; +view.setLocation (newX, newY); +this.repaintAll = false; +}this.fireStateChanged (); +}}, "java.awt.Point"); +Clazz_defineMethod (c$, "getViewRect", +function () { +return new java.awt.Rectangle (this.getViewPosition (), this.getExtentSize ()); +}); +Clazz_defineMethod (c$, "computeBlit", +function (dx, dy, blitFrom, blitTo, blitSize, blitPaint) { +var dxAbs = Math.abs (dx); +var dyAbs = Math.abs (dy); +var extentSize = this.getExtentSize (); +if ((dx == 0) && (dy != 0) && (dyAbs < extentSize.height)) { +if (dy < 0) { +blitFrom.y = -dy; +blitTo.y = 0; +blitPaint.y = extentSize.height + dy; +} else { +blitFrom.y = 0; +blitTo.y = dy; +blitPaint.y = 0; +}blitPaint.x = blitFrom.x = blitTo.x = 0; +blitSize.width = extentSize.width; +blitSize.height = extentSize.height - dyAbs; +blitPaint.width = extentSize.width; +blitPaint.height = dyAbs; +return true; +} else if ((dy == 0) && (dx != 0) && (dxAbs < extentSize.width)) { +if (dx < 0) { +blitFrom.x = -dx; +blitTo.x = 0; +blitPaint.x = extentSize.width + dx; +} else { +blitFrom.x = 0; +blitTo.x = dx; +blitPaint.x = 0; +}blitPaint.y = blitFrom.y = blitTo.y = 0; +blitSize.width = extentSize.width - dxAbs; +blitSize.height = extentSize.height; +blitPaint.width = dxAbs; +blitPaint.height = extentSize.height; +return true; +} else { +return false; +}}, "~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle"); +Clazz_defineMethod (c$, "getExtentSize", +function () { +return this.getSize (); +}); +Clazz_defineMethod (c$, "toViewCoordinates", +function (size) { +return new java.awt.Dimension (size); +}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "toViewCoordinates", +function (p) { +return new java.awt.Point (p); +}, "java.awt.Point"); +Clazz_defineMethod (c$, "setExtentSize", +function (newExtent) { +var oldExtent = this.getExtentSize (); +if (!newExtent.equals (oldExtent)) { +this.setSize (newExtent); +this.fireStateChanged (); +}}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "createViewListener", +function () { +return Clazz_innerTypeInstance (javax.swing.JViewport.ViewListener, this, null); +}); +Clazz_defineMethod (c$, "createLayoutManager", +function () { +return javax.swing.ViewportLayout.SHARED_INSTANCE; +}); +Clazz_defineMethod (c$, "addChangeListener", +function (l) { +this.listenerList.add (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "removeChangeListener", +function (l) { +this.listenerList.remove (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "getChangeListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.ChangeListener); +}); +Clazz_defineMethod (c$, "fireStateChanged", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.ChangeListener) { +if (this.changeEvent == null) { +this.changeEvent = new javax.swing.event.ChangeEvent (this); +}(listeners[i + 1]).stateChanged (this.changeEvent); +}} +}); +Clazz_defineMethod (c$, "repaint", +function (tm, x, y, w, h) { +var parent = this.getParent (); +if (parent != null) parent.repaint (tm, x + this.getX (), y + this.getY (), w, h); + else Clazz_superCall (this, javax.swing.JViewport, "repaint", [tm, x, y, w, h]); +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "paramString", +function () { +var isViewSizeSetString = (this.isViewSizeSet ? "true" : "false"); +var lastPaintPositionString = (this.lastPaintPosition != null ? this.lastPaintPosition.toString () : ""); +var scrollUnderwayString = (this.scrollUnderway ? "true" : "false"); +return Clazz_superCall (this, javax.swing.JViewport, "paramString", []) + ",isViewSizeSet=" + isViewSizeSetString + ",lastPaintPosition=" + lastPaintPositionString + ",scrollUnderway=" + scrollUnderwayString; +}); +Clazz_defineMethod (c$, "firePropertyChangeObject", +function (propertyName, oldValue, newValue) { +Clazz_superCall (this, javax.swing.JViewport, "firePropertyChangeObject", [propertyName, oldValue, newValue]); +if (propertyName.equals (javax.swing.JViewport.EnableWindowBlit)) { +if (newValue != null) { +this.setScrollMode (1); +} else { +this.setScrollMode (0); +}}}, "~S,~O,~O"); +Clazz_defineMethod (c$, "needsRepaintAfterBlit", + function () { +var heavyParent = this.getParent (); +while (heavyParent != null && heavyParent.isLightweight ()) { +heavyParent = heavyParent.getParent (); +} +if (heavyParent != null) { +}return true; +}); +Clazz_defineMethod (c$, "flushViewDirtyRegion", + function (g, dirty) { +var view = this.getView (); +if (dirty != null && dirty.width > 0 && dirty.height > 0) { +dirty.x += view.getX (); +dirty.y += view.getY (); +var clip = g.getClipBounds (); +if (clip == null) { +g.setClip (0, 0, this.getWidth (), this.getHeight ()); +}g.clipRect (dirty.x, dirty.y, dirty.width, dirty.height); +clip = g.getClipBounds (); +if (clip.width > 0 && clip.height > 0) { +this.paintView (g); +}}}, "java.awt.Graphics,java.awt.Rectangle"); +Clazz_defineMethod (c$, "windowBlitPaint", + function (g) { +var width = this.getWidth (); +var height = this.getHeight (); +if ((width == 0) || (height == 0)) { +return false; +}var retValue; +var rm = javax.swing.RepaintManager.currentManager (this); +var view = this.getView (); +if (this.lastPaintPosition == null || this.lastPaintPosition.equals (this.getViewLocation ())) { +this.paintView (g); +retValue = false; +} else { +var blitFrom = new java.awt.Point (); +var blitTo = new java.awt.Point (); +var blitSize = new java.awt.Dimension (); +var blitPaint = new java.awt.Rectangle (); +var newLocation = this.getViewLocation (); +var dx = newLocation.x - this.lastPaintPosition.x; +var dy = newLocation.y - this.lastPaintPosition.y; +var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint); +if (!canBlit) { +this.paintView (g); +retValue = false; +} else { +var r = view.getBounds ().intersection (blitPaint); +r.x -= view.getX (); +r.y -= view.getY (); +this.blitDoubleBuffered (view, g, r.x, r.y, r.width, r.height, blitFrom.x, blitFrom.y, blitTo.x, blitTo.y, blitSize.width, blitSize.height); +retValue = true; +}}this.lastPaintPosition = this.getViewLocation (); +return retValue; +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "blitDoubleBuffered", + function (view, g, clipX, clipY, clipW, clipH, blitFromX, blitFromY, blitToX, blitToY, blitW, blitH) { +var rm = javax.swing.RepaintManager.currentManager (this); +var bdx = blitToX - blitFromX; +var bdy = blitToY - blitFromY; +var x = view.getX (); +var y = view.getY (); +g.translate (x, y); +g.setClip (clipX, clipY, clipW, clipH); +view.paintForceDoubleBuffered (g); +g.translate (-x, -y); +}, "javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "paintView", + function (g) { +var clip = g.getClipBounds (); +var view = this.getView (); +if (view.getWidth () >= this.getWidth ()) { +var x = view.getX (); +var y = view.getY (); +g.translate (x, y); +g.setClip (clip.x - x, clip.y - y, clip.width, clip.height); +view.paintForceDoubleBuffered (g); +g.translate (-x, -y); +g.setClip (clip.x, clip.y, clip.width, clip.height); +} else { +try { +this.inBlitPaint = true; +this.paintForceDoubleBuffered (g); +} finally { +this.inBlitPaint = false; +} +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "canUseWindowBlitter", + function () { +if (!this.isShowing () || (!(Clazz_instanceOf (this.getParent (), javax.swing.JComponent)) && !(Clazz_instanceOf (this.getView (), javax.swing.JComponent)))) { +return false; +}if (this.isPainting ()) { +return false; +}var dirtyRegion = javax.swing.RepaintManager.currentManager (this).getDirtyRegion (this.getParent ()); +if (dirtyRegion != null && dirtyRegion.width > 0 && dirtyRegion.height > 0) { +return false; +}var clip = new java.awt.Rectangle (0, 0, this.getWidth (), this.getHeight ()); +var oldClip = new java.awt.Rectangle (); +var tmp2 = null; +var parent; +var lastParent = null; +var x; +var y; +var w; +var h; +for (parent = this; parent != null && javax.swing.JComponent.isLightweightComponent (parent); parent = parent.getParent ()) { +x = parent.getX (); +y = parent.getY (); +w = parent.getWidth (); +h = parent.getHeight (); +oldClip.setBounds (clip); +javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, clip); +if (!clip.equals (oldClip)) return false; +if (lastParent != null && Clazz_instanceOf (parent, javax.swing.JComponent) && !(parent).isOptimizedDrawingEnabled ()) { +var comps = parent.getComponents (); +var index = 0; +for (var i = comps.length - 1; i >= 0; i--) { +if (comps[i] === lastParent) { +index = i - 1; +break; +}} +while (index >= 0) { +tmp2 = comps[index].getBounds (tmp2); +if (tmp2.intersects (clip)) return false; +index--; +} +}clip.x += x; +clip.y += y; +lastParent = parent; +} +if (parent == null) { +return false; +}return true; +}); +c$.$JViewport$ViewListener$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +Clazz_instantialize (this, arguments); +}, javax.swing.JViewport, "ViewListener", java.awt.event.ComponentAdapter); +Clazz_overrideMethod (c$, "componentResized", +function (a) { +this.b$["javax.swing.JViewport"].fireStateChanged (); +this.b$["javax.swing.JViewport"].revalidate (); +}, "java.awt.event.ComponentEvent"); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"$uiClassID", "ViewportUI", +"EnableWindowBlit", "EnableWindowBlit", +"BLIT_SCROLL_MODE", 1, +"BACKINGSTORE_SCROLL_MODE", 2, +"SIMPLE_SCROLL_MODE", 0); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.ComponentListener"], "java.awt.event.ComponentAdapter", null, function () { +c$ = Clazz_declareType (java.awt.event, "ComponentAdapter", null, java.awt.event.ComponentListener); +Clazz_overrideMethod (c$, "componentResized", +function (e) { +}, "java.awt.event.ComponentEvent"); +Clazz_overrideMethod (c$, "componentMoved", +function (e) { +}, "java.awt.event.ComponentEvent"); +Clazz_overrideMethod (c$, "componentShown", +function (e) { +}, "java.awt.event.ComponentEvent"); +Clazz_overrideMethod (c$, "componentHidden", +function (e) { +}, "java.awt.event.ComponentEvent"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () { +c$ = Clazz_declareType (javax.swing, "CellRendererPane", java.awt.Container); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.CellRendererPane); +this.setLayout (null); +this.setVisible (false); +}); +Clazz_overrideMethod (c$, "invalidate", +function () { +}); +Clazz_overrideMethod (c$, "paint", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "update", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "addImpl", +function (x, constraints, index) { +if (x.getParent () === this) { +return null; +} else { +return this.addImplSAEM (x, constraints, index); +}}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "paintComponent", +function (g, c, p, x, y, w, h, shouldValidate) { +if (c == null) { +if (p != null) { +var oldColor = g.getColor (); +g.setColor (p.getBackground ()); +g.fillRect (x, y, w, h); +g.setColor (oldColor); +}return; +}if (c.getParent () !== this) { +this.add (c); +}c.setBounds (x, y, w, h); +if (shouldValidate) { +c.validate (); +}var cg = g.create4 (x, y, w, h); +try { +c.paint (cg); +} finally { +cg.dispose (); +} +c.setBounds (-w, -h, 0, 0); +}, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B"); +Clazz_defineMethod (c$, "paintComponent", +function (g, c, p, x, y, w, h) { +this.paintComponent (g, c, p, x, y, w, h, false); +}, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "paintComponent", +function (g, c, p, r) { +this.paintComponent (g, c, p, r.x, r.y, r.width, r.height); +}, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle"); +}); +Clazz_declarePackage ("jssun.awt"); +c$ = Clazz_declareType (jssun.awt, "AWTAccessor"); +c$.setWindowAccessor = Clazz_defineMethod (c$, "setWindowAccessor", +function (wa) { +jssun.awt.AWTAccessor.windowAccessor = wa; +}, "jssun.awt.AWTAccessor.WindowAccessor"); +c$.getWindowAccessor = Clazz_defineMethod (c$, "getWindowAccessor", +function () { +return jssun.awt.AWTAccessor.windowAccessor; +}); +c$.setComponentAccessor = Clazz_defineMethod (c$, "setComponentAccessor", +function (ca) { +jssun.awt.AWTAccessor.componentAccessor = ca; +}, "jssun.awt.AWTAccessor.ComponentAccessor"); +c$.getComponentAccessor = Clazz_defineMethod (c$, "getComponentAccessor", +function () { +return jssun.awt.AWTAccessor.componentAccessor; +}); +c$.setAWTEventAccessor = Clazz_defineMethod (c$, "setAWTEventAccessor", +function (aea) { +jssun.awt.AWTAccessor.awtEventAccessor = aea; +}, "jssun.awt.AWTAccessor.AWTEventAccessor"); +c$.getAWTEventAccessor = Clazz_defineMethod (c$, "getAWTEventAccessor", +function () { +return jssun.awt.AWTAccessor.awtEventAccessor; +}); +c$.setEventQueueAccessor = Clazz_defineMethod (c$, "setEventQueueAccessor", +function (eqa) { +jssun.awt.AWTAccessor.eventQueueAccessor = eqa; +}, "jssun.awt.AWTAccessor.EventQueueAccessor"); +c$.getEventQueueAccessor = Clazz_defineMethod (c$, "getEventQueueAccessor", +function () { +return jssun.awt.AWTAccessor.eventQueueAccessor; +}); +Clazz_declareInterface (jssun.awt.AWTAccessor, "WindowAccessor"); +Clazz_declareInterface (jssun.awt.AWTAccessor, "ComponentAccessor"); +Clazz_declareInterface (jssun.awt.AWTAccessor, "KeyboardFocusManagerAccessor"); +Clazz_declareInterface (jssun.awt.AWTAccessor, "AWTEventAccessor"); +Clazz_declareInterface (jssun.awt.AWTAccessor, "EventQueueAccessor"); +Clazz_declareInterface (jssun.awt.AWTAccessor, "CursorAccessor"); +Clazz_declareInterface (jssun.awt.AWTAccessor, "ClientPropertyKeyAccessor"); +Clazz_defineStatics (c$, +"componentAccessor", null, +"windowAccessor", null, +"awtEventAccessor", null, +"eventQueueAccessor", null); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.LayoutManager"], "javax.swing.ViewportLayout", ["java.awt.Dimension", "javax.swing.Scrollable"], function () { +c$ = Clazz_declareType (javax.swing, "ViewportLayout", null, java.awt.LayoutManager); +Clazz_overrideMethod (c$, "addLayoutComponent", +function (name, c) { +}, "~S,java.awt.Component"); +Clazz_overrideMethod (c$, "removeLayoutComponent", +function (c) { +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "preferredLayoutSize", +function (parent) { +var view = (parent).getView (); +if (view == null) { +return new java.awt.Dimension (0, 0); +} else if (Clazz_instanceOf (view, javax.swing.Scrollable)) { +return (view).getPreferredScrollableViewportSize (); +} else { +return view.getPreferredSize (); +}}, "java.awt.Container"); +Clazz_overrideMethod (c$, "minimumLayoutSize", +function (parent) { +return new java.awt.Dimension (4, 4); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "layoutContainer", +function (parent) { +var vp = parent; +var view = vp.getView (); +var scrollableView = null; +if (view == null) { +return; +} else if (Clazz_instanceOf (view, javax.swing.Scrollable)) { +scrollableView = view; +}var insets = vp.getInsets (); +var viewPrefSize = view.getPreferredSize (); +var vpSize = vp.getSize (); +var extentSize = vp.toViewCoordinates (vpSize); +var viewSize = new java.awt.Dimension (viewPrefSize); +if (scrollableView != null) { +if (scrollableView.getScrollableTracksViewportWidth ()) { +viewSize.width = vpSize.width; +}if (scrollableView.getScrollableTracksViewportHeight ()) { +viewSize.height = vpSize.height; +}}var viewPosition = vp.getViewPosition (); +if (scrollableView == null || vp.getParent () == null || vp.getParent ().getComponentOrientation ().isLeftToRight ()) { +if ((viewPosition.x + extentSize.width) > viewSize.width) { +viewPosition.x = Math.max (0, viewSize.width - extentSize.width); +}} else { +if (extentSize.width > viewSize.width) { +viewPosition.x = viewSize.width - extentSize.width; +} else { +viewPosition.x = Math.max (0, Math.min (viewSize.width - extentSize.width, viewPosition.x)); +}}if ((viewPosition.y + extentSize.height) > viewSize.height) { +viewPosition.y = Math.max (0, viewSize.height - extentSize.height); +}if (scrollableView == null) { +if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width)) { +viewSize.width = vpSize.width; +}if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height)) { +viewSize.height = vpSize.height; +}}vp.setViewPosition (viewPosition); +vp.setViewSize (viewSize); +}, "java.awt.Container"); +c$.SHARED_INSTANCE = c$.prototype.SHARED_INSTANCE = new javax.swing.ViewportLayout (); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.CaretListener", null, function () { +Clazz_declareInterface (javax.swing.event, "CaretListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.BoundedRangeModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultBoundedRangeModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.changeEvent = null; +this.listenerList = null; +this.value = 0; +this.extent = 0; +this.min = 0; +this.max = 100; +this.isAdjusting = false; +Clazz_instantialize (this, arguments); +}, javax.swing, "DefaultBoundedRangeModel", null, javax.swing.BoundedRangeModel); +Clazz_prepareFields (c$, function () { +this.listenerList = new javax.swing.event.EventListenerList (); +}); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_makeConstructor (c$, +function (value, extent, min, max) { +if ((max >= min) && (value >= min) && ((value + extent) >= value) && ((value + extent) <= max)) { +this.value = value; +this.extent = extent; +this.min = min; +this.max = max; +} else { +throw new IllegalArgumentException ("invalid range properties"); +}}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getValue", +function () { +return this.value; +}); +Clazz_overrideMethod (c$, "getExtent", +function () { +return this.extent; +}); +Clazz_overrideMethod (c$, "getMinimum", +function () { +return this.min; +}); +Clazz_overrideMethod (c$, "getMaximum", +function () { +return this.max; +}); +Clazz_overrideMethod (c$, "setValue", +function (n) { +n = Math.min (n, 2147483647 - this.extent); +var newValue = Math.max (n, this.min); +if (newValue + this.extent > this.max) { +newValue = this.max - this.extent; +}this.setRangeProperties (newValue, this.extent, this.min, this.max, this.isAdjusting); +}, "~N"); +Clazz_overrideMethod (c$, "setExtent", +function (n) { +var newExtent = Math.max (0, n); +if (this.value + newExtent > this.max) { +newExtent = this.max - this.value; +}this.setRangeProperties (this.value, newExtent, this.min, this.max, this.isAdjusting); +}, "~N"); +Clazz_overrideMethod (c$, "setMinimum", +function (n) { +var newMax = Math.max (n, this.max); +var newValue = Math.max (n, this.value); +var newExtent = Math.min (newMax - newValue, this.extent); +this.setRangeProperties (newValue, newExtent, n, newMax, this.isAdjusting); +}, "~N"); +Clazz_overrideMethod (c$, "setMaximum", +function (n) { +var newMin = Math.min (n, this.min); +var newExtent = Math.min (n - newMin, this.extent); +var newValue = Math.min (n - newExtent, this.value); +this.setRangeProperties (newValue, newExtent, newMin, n, this.isAdjusting); +}, "~N"); +Clazz_overrideMethod (c$, "setValueIsAdjusting", +function (b) { +this.setRangeProperties (this.value, this.extent, this.min, this.max, b); +}, "~B"); +Clazz_overrideMethod (c$, "getValueIsAdjusting", +function () { +return this.isAdjusting; +}); +Clazz_overrideMethod (c$, "setRangeProperties", +function (newValue, newExtent, newMin, newMax, adjusting) { +if (newMin > newMax) { +newMin = newMax; +}if (newValue > newMax) { +newMax = newValue; +}if (newValue < newMin) { +newMin = newValue; +}if ((newExtent + newValue) > newMax) { +newExtent = newMax - newValue; +}if (newExtent < 0) { +newExtent = 0; +}var isChange = (newValue != this.value) || (newExtent != this.extent) || (newMin != this.min) || (newMax != this.max) || (adjusting != this.isAdjusting); +if (isChange) { +this.value = newValue; +this.extent = newExtent; +this.min = newMin; +this.max = newMax; +this.isAdjusting = adjusting; +this.fireStateChanged (); +}}, "~N,~N,~N,~N,~B"); +Clazz_overrideMethod (c$, "addChangeListener", +function (l) { +this.listenerList.add (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_overrideMethod (c$, "removeChangeListener", +function (l) { +this.listenerList.remove (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "getChangeListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.ChangeListener); +}); +Clazz_defineMethod (c$, "fireStateChanged", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.ChangeListener) { +if (this.changeEvent == null) { +this.changeEvent = new javax.swing.event.ChangeEvent (this); +}(listeners[i + 1]).stateChanged (this.changeEvent); +}} +}); +Clazz_overrideMethod (c$, "toString", +function () { +var modelString = "value=" + this.getValue () + ", " + "extent=" + this.getExtent () + ", " + "min=" + this.getMinimum () + ", " + "max=" + this.getMaximum () + ", " + "adj=" + this.getValueIsAdjusting (); +return this.getClass ().getName () + "[" + modelString + "]"; +}); +Clazz_defineMethod (c$, "getListeners", +function (listenerType) { +return this.listenerList.getListeners (listenerType); +}, "Class"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_declareInterface (javax.swing, "BoundedRangeModel"); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.AWTKeyStroke"], "javax.swing.KeyStroke", null, function () { +c$ = Clazz_declareType (javax.swing, "KeyStroke", java.awt.AWTKeyStroke); +c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", +function (keyChar) { +{ +java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); +return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar); +}}, "~S"); +c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", +function (keyChar, onKeyRelease) { +return new javax.swing.KeyStroke (keyChar, 0, 0, onKeyRelease); +}, "~S,~B"); +c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", +function (keyChar, modifiers) { +{ +java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); +return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar, modifiers); +}}, "Character,~N"); +c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", +function (keyCode, modifiers, onKeyRelease) { +{ +java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); +return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers, onKeyRelease); +}}, "~N,~N,~B"); +c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", +function (keyCode, modifiers) { +{ +java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); +return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers); +}}, "~N,~N"); +c$.getKeyStrokeForEvent = Clazz_defineMethod (c$, "getKeyStrokeForEvent", +function (anEvent) { +{ +java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); +return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent (anEvent); +}}, "java.awt.event.KeyEvent"); +c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", +function (s) { +if (s == null || s.length == 0) { +return null; +}{ +java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); +try { +return java.awt.AWTKeyStroke.getAWTKeyStroke (s); +} catch (e) { +if (Clazz_exceptionOf (e, IllegalArgumentException)) { +return null; +} else { +throw e; +} +} +}}, "~S"); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (null, ["java.awt.AWTKeyStroke", "$.VKCollection"], ["java.io.ObjectStreamException", "java.lang.IllegalArgumentException", "$.StringBuilder", "java.util.Collections", "$.HashMap", "$.StringTokenizer", "java.awt.event.KeyEvent", "jssun.awt.AppContext"], function () { +c$ = Clazz_decorateAsClass (function () { +this.keyChar = '\uffff'; +this.keyCode = 0; +this.modifiers = 0; +this.onKeyRelease = false; +Clazz_instantialize (this, arguments); +}, java.awt, "AWTKeyStroke"); +c$.getAWTKeyStrokeClass = Clazz_defineMethod (c$, "getAWTKeyStrokeClass", + function () { +var clazz = jssun.awt.AppContext.getAppContext ().get (java.awt.AWTKeyStroke); +if (clazz == null) { +clazz = java.awt.AWTKeyStroke; +jssun.awt.AppContext.getAppContext ().put (java.awt.AWTKeyStroke, java.awt.AWTKeyStroke); +}return clazz; +}); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_makeConstructor (c$, +function (keyChar, keyCode, modifiers, onKeyRelease) { +this.keyChar = keyChar; +this.keyCode = keyCode; +this.modifiers = modifiers; +this.onKeyRelease = onKeyRelease; +}, "~S,~N,~N,~B"); +c$.registerSubclass = Clazz_defineMethod (c$, "registerSubclass", +function (subclass) { +}, "Class"); +c$.getCachedStroke = Clazz_defineMethod (c$, "getCachedStroke", + function (keyChar, keyCode, modifiers, onKeyRelease) { +return null; +}, "~S,~N,~N,~B"); +c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", +function (keyChar) { +return java.awt.AWTKeyStroke.getCachedStroke (keyChar, 0, 0, false); +}, "~S"); +c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", +function (keyChar, modifiers) { +if (keyChar == null) { +throw new IllegalArgumentException ("keyChar cannot be null"); +}return java.awt.AWTKeyStroke.getCachedStroke (keyChar.charValue (), 0, modifiers, false); +}, "Character,~N"); +c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", +function (keyCode, modifiers, onKeyRelease) { +return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, onKeyRelease); +}, "~N,~N,~B"); +c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", +function (keyCode, modifiers) { +return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, false); +}, "~N,~N"); +c$.getAWTKeyStrokeForEvent = Clazz_defineMethod (c$, "getAWTKeyStrokeForEvent", +function (anEvent) { +var id = anEvent.getID (); +switch (id) { +case 401: +case 402: +return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', anEvent.getKeyCode (), anEvent.getModifiers (), (id == 402)); +case 400: +return java.awt.AWTKeyStroke.getCachedStroke (anEvent.getKeyChar (), 0, anEvent.getModifiers (), false); +default: +return null; +} +}, "java.awt.event.KeyEvent"); +c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", +function (s) { +if (s == null) { +throw new IllegalArgumentException ("String cannot be null"); +}var errmsg = "String formatted incorrectly"; +var st = new java.util.StringTokenizer (s, " "); +var mask = 0; +var released = false; +var typed = false; +var pressed = false; +{ +if (java.awt.AWTKeyStroke.modifierKeywords == null) { +var uninitializedMap = new java.util.HashMap (8, 1.0); +uninitializedMap.put ("shift", Integer.$valueOf (65)); +uninitializedMap.put ("control", Integer.$valueOf (130)); +uninitializedMap.put ("ctrl", Integer.$valueOf (130)); +uninitializedMap.put ("meta", Integer.$valueOf (260)); +uninitializedMap.put ("alt", Integer.$valueOf (520)); +uninitializedMap.put ("altGraph", Integer.$valueOf (8224)); +uninitializedMap.put ("button1", Integer.$valueOf (1024)); +uninitializedMap.put ("button2", Integer.$valueOf (2048)); +uninitializedMap.put ("button3", Integer.$valueOf (4096)); +java.awt.AWTKeyStroke.modifierKeywords = java.util.Collections.synchronizedMap (uninitializedMap); +}}var count = st.countTokens (); +for (var i = 1; i <= count; i++) { +var token = st.nextToken (); +if (typed) { +if (token.length != 1 || i != count) { +throw new IllegalArgumentException ("String formatted incorrectly"); +}return java.awt.AWTKeyStroke.getCachedStroke (token.charAt (0), 0, mask, false); +}if (pressed || released || i == count) { +if (i != count) { +throw new IllegalArgumentException ("String formatted incorrectly"); +}var keyCodeName = "VK_" + token; +var keyCode = java.awt.AWTKeyStroke.getVKValue (keyCodeName); +return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, mask, released); +}if (token.equals ("released")) { +released = true; +continue; +}if (token.equals ("pressed")) { +pressed = true; +continue; +}if (token.equals ("typed")) { +typed = true; +continue; +}var tokenMask = java.awt.AWTKeyStroke.modifierKeywords.get (token); +if (tokenMask != null) { +mask |= tokenMask.intValue (); +} else { +throw new IllegalArgumentException ("String formatted incorrectly"); +}} +throw new IllegalArgumentException ("String formatted incorrectly"); +}, "~S"); +c$.getVKCollection = Clazz_defineMethod (c$, "getVKCollection", + function () { +if (java.awt.AWTKeyStroke.vks == null) { +java.awt.AWTKeyStroke.vks = new java.awt.VKCollection (); +}return java.awt.AWTKeyStroke.vks; +}); +c$.getVKValue = Clazz_defineMethod (c$, "getVKValue", + function (key) { +var vkCollect = java.awt.AWTKeyStroke.getVKCollection (); +var value = vkCollect.findCode (key); +if (value == null) { +var keyCode = 0; +var errmsg = "String formatted incorrectly"; +try { +keyCode = java.awt.event.KeyEvent.getField (key).getInt (java.awt.event.KeyEvent); +} catch (e$$) { +if (Clazz_exceptionOf (e$$, NoSuchFieldException)) { +var nsfe = e$$; +{ +throw new IllegalArgumentException ("String formatted incorrectly"); +} +} else if (Clazz_exceptionOf (e$$, IllegalAccessException)) { +var iae = e$$; +{ +throw new IllegalArgumentException ("String formatted incorrectly"); +} +} else { +throw e$$; +} +} +value = Integer.$valueOf (keyCode); +vkCollect.put (key, value); +}return value.intValue (); +}, "~S"); +Clazz_defineMethod (c$, "getKeyChar", +function () { +return this.keyChar; +}); +Clazz_defineMethod (c$, "getKeyCode", +function () { +return this.keyCode; +}); +Clazz_defineMethod (c$, "getModifiers", +function () { +return this.modifiers; +}); +Clazz_defineMethod (c$, "isOnKeyRelease", +function () { +return this.onKeyRelease; +}); +Clazz_defineMethod (c$, "getKeyEventType", +function () { +if (this.keyCode == 0) { +return 400; +} else { +return (this.onKeyRelease) ? 402 : 401; +}}); +Clazz_overrideMethod (c$, "hashCode", +function () { +return (((this.keyChar).charCodeAt (0)) + 1) * (2 * (this.keyCode + 1)) * (this.modifiers + 1) + (this.onKeyRelease ? 1 : 2); +}); +Clazz_defineMethod (c$, "equals", +function (anObject) { +if (Clazz_instanceOf (anObject, java.awt.AWTKeyStroke)) { +var ks = anObject; +return (ks.keyChar == this.keyChar && ks.keyCode == this.keyCode && ks.onKeyRelease == this.onKeyRelease && ks.modifiers == this.modifiers); +}return false; +}, "~O"); +Clazz_overrideMethod (c$, "toString", +function () { +if (this.keyCode == 0) { +return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + "typed " + this.keyChar; +} else { +return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + (this.onKeyRelease ? "released" : "pressed") + " " + java.awt.AWTKeyStroke.getVKText (this.keyCode); +}}); +c$.getModifiersText = Clazz_defineMethod (c$, "getModifiersText", +function (modifiers) { +var buf = new StringBuilder (); +if ((modifiers & 64) != 0) { +buf.append ("shift "); +}if ((modifiers & 128) != 0) { +buf.append ("ctrl "); +}if ((modifiers & 256) != 0) { +buf.append ("meta "); +}if ((modifiers & 512) != 0) { +buf.append ("alt "); +}if ((modifiers & 8192) != 0) { +buf.append ("altGraph "); +}if ((modifiers & 1024) != 0) { +buf.append ("button1 "); +}if ((modifiers & 2048) != 0) { +buf.append ("button2 "); +}if ((modifiers & 4096) != 0) { +buf.append ("button3 "); +}return buf.toString (); +}, "~N"); +c$.getVKText = Clazz_defineMethod (c$, "getVKText", +function (keyCode) { +return "UNKNOWN"; +}, "~N"); +Clazz_defineMethod (c$, "readResolve", +function () { +{ +var newClass = this.getClass (); +var awtKeyStrokeClass = java.awt.AWTKeyStroke.getAWTKeyStrokeClass (); +if (!newClass.equals (awtKeyStrokeClass)) { +java.awt.AWTKeyStroke.registerSubclass (newClass); +}return java.awt.AWTKeyStroke.getCachedStroke (this.keyChar, this.keyCode, this.modifiers, this.onKeyRelease); +}}); +Clazz_defineStatics (c$, +"modifierKeywords", null, +"vks", null); +c$ = Clazz_decorateAsClass (function () { +this.code2name = null; +this.name2code = null; +Clazz_instantialize (this, arguments); +}, java.awt, "VKCollection"); +Clazz_makeConstructor (c$, +function () { +this.code2name = new java.util.HashMap (); +this.name2code = new java.util.HashMap (); +}); +Clazz_defineMethod (c$, "put", +function (name, code) { +this.code2name.put (code, name); +this.name2code.put (name, code); +}, "~S,Integer"); +Clazz_defineMethod (c$, "findCode", +function (name) { +return this.name2code.get (name); +}, "~S"); +Clazz_defineMethod (c$, "findName", +function (code) { +return this.code2name.get (code); +}, "Integer"); +}); +Clazz_load(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){ +c$=Clazz_decorateAsClass(function(){ +this.string=null; +this.delimiters=null; +this.returnDelimiters=false; +this.position=0; +Clazz_instantialize(this,arguments); +},java.util,"StringTokenizer",null,java.util.Enumeration); +Clazz_makeConstructor(c$, +function(string){ +this.construct(string," \t\n\r\f",false); +},"~S"); +Clazz_makeConstructor(c$, +function(string,delimiters){ +this.construct(string,delimiters,false); +},"~S,~S"); +Clazz_makeConstructor(c$, +function(string,delimiters,returnDelimiters){ +if(string!=null){ +this.string=string; +this.delimiters=delimiters; +this.returnDelimiters=returnDelimiters; +this.position=0; +}else throw new NullPointerException(); +},"~S,~S,~B"); +Clazz_defineMethod(c$,"countTokens", +function(){ +var count=0; +var inToken=false; +for(var i=this.position,length=this.string.length;i=0){ +if(this.returnDelimiters)count++; +if(inToken){ +count++; +inToken=false; +}}else{ +inToken=true; +}} +if(inToken)count++; +return count; +}); +Clazz_overrideMethod(c$,"hasMoreElements", +function(){ +return this.hasMoreTokens(); +}); +Clazz_defineMethod(c$,"hasMoreTokens", +function(){ +var length=this.string.length; +if(this.position=0)return String.valueOf(this.string.charAt(this.position++)); +for(this.position++;this.position=0)return this.string.substring(i,this.position); + +return this.string.substring(i); +}while(i=0)i++; + +this.position=i; +if(i=0)return this.string.substring(i,this.position); + +return this.string.substring(i); +}}throw new java.util.NoSuchElementException(); +}); +Clazz_defineMethod(c$,"nextToken", +function(delims){ +this.delimiters=delims; +return this.nextToken(); +},"~S"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.InputMap"], "javax.swing.ComponentInputMap", ["java.lang.IllegalArgumentException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.component = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "ComponentInputMap", javax.swing.InputMap); +Clazz_makeConstructor (c$, +function (component) { +Clazz_superConstructor (this, javax.swing.ComponentInputMap, []); +this.component = component; +if (component == null) { +throw new IllegalArgumentException ("ComponentInputMaps must be associated with a non-null JComponent"); +}}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "setParent", +function (map) { +if (this.getParent () === map) { +return; +}if (map != null && (!(Clazz_instanceOf (map, javax.swing.ComponentInputMap)) || (map).getComponent () !== this.getComponent ())) { +throw new IllegalArgumentException ("ComponentInputMaps must have a parent ComponentInputMap associated with the same component"); +}Clazz_superCall (this, javax.swing.ComponentInputMap, "setParent", [map]); +this.getComponent ().componentInputMapChanged (this); +}, "javax.swing.InputMap"); +Clazz_defineMethod (c$, "getComponent", +function () { +return this.component; +}); +Clazz_defineMethod (c$, "put", +function (keyStroke, actionMapKey) { +Clazz_superCall (this, javax.swing.ComponentInputMap, "put", [keyStroke, actionMapKey]); +if (this.getComponent () != null) { +this.getComponent ().componentInputMapChanged (this); +}}, "javax.swing.KeyStroke,~O"); +Clazz_defineMethod (c$, "remove", +function (key) { +Clazz_superCall (this, javax.swing.ComponentInputMap, "remove", [key]); +if (this.getComponent () != null) { +this.getComponent ().componentInputMapChanged (this); +}}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "clear", +function () { +var oldSize = this.size (); +Clazz_superCall (this, javax.swing.ComponentInputMap, "clear", []); +if (oldSize > 0 && this.getComponent () != null) { +this.getComponent ().componentInputMapChanged (this); +}}); +}); +Clazz_declarePackage ("jssun.swing"); +Clazz_load (["javax.swing.LayoutStyle"], "jssun.swing.DefaultLayoutStyle", ["java.lang.IllegalArgumentException", "$.NullPointerException", "javax.swing.Icon", "$.JCheckBox", "$.JLabel", "$.JRadioButton", "$.UIManager", "javax.swing.plaf.UIResource"], function () { +c$ = Clazz_declareType (jssun.swing, "DefaultLayoutStyle", javax.swing.LayoutStyle); +c$.getInstance = Clazz_overrideMethod (c$, "getInstance", +function () { +return jssun.swing.DefaultLayoutStyle.INSTANCE; +}); +Clazz_overrideMethod (c$, "getPreferredGap", +function (component1, component2, type, position, parent) { +if (component1 == null || component2 == null || type == null) { +throw new NullPointerException (); +}this.checkPosition (position); +if (type === javax.swing.LayoutStyle.ComponentPlacement.INDENT && (position == 3 || position == 7)) { +var indent = this.getIndent (component1, position); +if (indent > 0) { +return indent; +}}return (type === javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) ? 12 : 6; +}, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,java.awt.Container"); +Clazz_overrideMethod (c$, "getContainerGap", +function (component, position, parent) { +if (component == null) { +throw new NullPointerException (); +}this.checkPosition (position); +return 6; +}, "javax.swing.JComponent,~N,java.awt.Container"); +Clazz_defineMethod (c$, "isLabelAndNonlabel", +function (c1, c2, position) { +if (position == 3 || position == 7) { +var c1Label = (Clazz_instanceOf (c1, javax.swing.JLabel)); +var c2Label = (Clazz_instanceOf (c2, javax.swing.JLabel)); +return ((c1Label || c2Label) && (c1Label != c2Label)); +}return false; +}, "javax.swing.JComponent,javax.swing.JComponent,~N"); +Clazz_defineMethod (c$, "getButtonGap", +function (source, target, position, offset) { +offset -= this.getButtonGap (source, position); +if (offset > 0) { +offset -= this.getButtonGap (target, this.flipDirection (position)); +}if (offset < 0) { +return 0; +}return offset; +}, "javax.swing.JComponent,javax.swing.JComponent,~N,~N"); +Clazz_defineMethod (c$, "getButtonGap", +function (source, position, offset) { +offset -= this.getButtonGap (source, position); +return Math.max (offset, 0); +}, "javax.swing.JComponent,~N,~N"); +Clazz_defineMethod (c$, "getButtonGap", +function (c, position) { +var classID = c.getUIClassID (); +if ((classID === "CheckBoxUI" || classID === "RadioButtonUI") && !(c).isBorderPainted ()) { +var border = c.getBorder (); +if (Clazz_instanceOf (border, javax.swing.plaf.UIResource)) { +return this.getInset (c, position); +}}return 0; +}, "javax.swing.JComponent,~N"); +Clazz_defineMethod (c$, "checkPosition", + function (position) { +if (position != 1 && position != 5 && position != 7 && position != 3) { +throw new IllegalArgumentException (); +}}, "~N"); +Clazz_defineMethod (c$, "flipDirection", +function (position) { +switch (position) { +case 1: +return 5; +case 5: +return 1; +case 3: +return 7; +case 7: +return 3; +} +return 0; +}, "~N"); +Clazz_defineMethod (c$, "getIndent", +function (c, position) { +var classID = c.getUIClassID (); +if (classID === "CheckBoxUI" || classID === "RadioButtonUI") { +var button = c; +var insets = c.getInsets (); +var icon = this.getIcon (button); +var gap = button.getIconTextGap (); +if (this.isLeftAligned (button, position)) { +return insets.left + icon.getIconWidth () + gap; +} else if (this.isRightAligned (button, position)) { +return insets.right + icon.getIconWidth () + gap; +}}return 0; +}, "javax.swing.JComponent,~N"); +Clazz_defineMethod (c$, "getIcon", + function (button) { +var icon = button.getIcon (); +if (icon != null) { +return icon; +}var key = null; +if (Clazz_instanceOf (button, javax.swing.JCheckBox)) { +key = "CheckBox.icon"; +} else if (Clazz_instanceOf (button, javax.swing.JRadioButton)) { +key = "RadioButton.icon"; +}if (key != null) { +var oIcon = javax.swing.UIManager.get (key); +if (Clazz_instanceOf (oIcon, javax.swing.Icon)) { +return oIcon; +}}return null; +}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "isLeftAligned", + function (button, position) { +if (position == 7) { +var ltr = button.getComponentOrientation ().isLeftToRight (); +var hAlign = button.getHorizontalAlignment (); +return ((ltr && (hAlign == 2 || hAlign == 10)) || (!ltr && (hAlign == 11))); +}return false; +}, "javax.swing.AbstractButton,~N"); +Clazz_defineMethod (c$, "isRightAligned", + function (button, position) { +if (position == 3) { +var ltr = button.getComponentOrientation ().isLeftToRight (); +var hAlign = button.getHorizontalAlignment (); +return ((ltr && (hAlign == 4 || hAlign == 11)) || (!ltr && (hAlign == 10))); +}return false; +}, "javax.swing.AbstractButton,~N"); +Clazz_defineMethod (c$, "getInset", + function (c, position) { +return this.getInset (c.getInsets (), position); +}, "javax.swing.JComponent,~N"); +Clazz_defineMethod (c$, "getInset", + function (insets, position) { +if (insets == null) { +return 0; +}switch (position) { +case 1: +return insets.top; +case 5: +return insets.bottom; +case 3: +return insets.right; +case 7: +return insets.left; +} +return 0; +}, "java.awt.Insets,~N"); +c$.INSTANCE = c$.prototype.INSTANCE = new jssun.swing.DefaultLayoutStyle (); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.lang.Enum"], "javax.swing.LayoutStyle", ["javax.swing.UIManager", "jssun.awt.AppContext"], function () { +c$ = Clazz_declareType (javax.swing, "LayoutStyle"); +c$.setInstance = Clazz_defineMethod (c$, "setInstance", +function (style) { +{ +if (style == null) { +jssun.awt.AppContext.getAppContext ().remove (javax.swing.LayoutStyle); +} else { +jssun.awt.AppContext.getAppContext ().put (javax.swing.LayoutStyle, style); +}}}, "javax.swing.LayoutStyle"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function () { +var style; +{ +style = jssun.awt.AppContext.getAppContext ().get (javax.swing.LayoutStyle); +}if (style == null) { +return javax.swing.UIManager.getLookAndFeel ().getLayoutStyle (); +}return style; +}); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.LayoutStyle, "ComponentPlacement", Enum); +Clazz_defineEnumConstant (c$, "RELATED", 0, []); +Clazz_defineEnumConstant (c$, "UNRELATED", 1, []); +Clazz_defineEnumConstant (c$, "INDENT", 2, []); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this.flat = false; +Clazz_instantialize (this, arguments); +}, javax.swing, "JCheckBox", javax.swing.JToggleButton); +Clazz_makeConstructor (c$, +function () { +this.construct (null, null, false); +}); +Clazz_makeConstructor (c$, +function (icon) { +this.construct (null, icon, false); +}, "javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (icon, selected) { +this.construct (null, icon, selected); +}, "javax.swing.Icon,~B"); +Clazz_makeConstructor (c$, +function (text) { +this.construct (text, null, false); +}, "~S"); +Clazz_makeConstructor (c$, +function (a) { +this.construct (); +this.setAction (a); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function (text, selected) { +this.construct (text, null, selected); +}, "~S,~B"); +Clazz_makeConstructor (c$, +function (text, icon) { +this.construct (text, icon, false); +}, "~S,javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text, icon, selected) { +Clazz_superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]); +this.setUIProperty ("borderPainted", Boolean.FALSE); +this.setHorizontalAlignment (10); +}, "~S,javax.swing.Icon,~B"); +Clazz_defineMethod (c$, "setBorderPaintedFlat", +function (b) { +var oldValue = this.flat; +this.flat = b; +this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat); +if (b != oldValue) { +this.revalidate (); +this.repaint (); +}}, "~B"); +Clazz_defineMethod (c$, "isBorderPaintedFlat", +function () { +return this.flat; +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "CheckBoxUI"; +}); +Clazz_overrideMethod (c$, "setIconFromAction", +function (a) { +}, "javax.swing.Action"); +Clazz_defineStatics (c$, +"BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat", +"$$uiClassID", "CheckBoxUI"); +}); +Clazz_declarePackage ("java.awt"); +Clazz_declareInterface (java.awt, "ItemSelectable"); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ItemEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.item = null; +this.stateChange = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "ItemEvent", java.awt.AWTEvent); +Clazz_makeConstructor (c$, +function (source, id, item, stateChange) { +Clazz_superConstructor (this, java.awt.event.ItemEvent, [source, id]); +this.item = item; +this.stateChange = stateChange; +}, "java.awt.ItemSelectable,~N,~O,~N"); +Clazz_defineMethod (c$, "getItemSelectable", +function () { +return this.source; +}); +Clazz_defineMethod (c$, "getItem", +function () { +return this.item; +}); +Clazz_defineMethod (c$, "getStateChange", +function () { +return this.stateChange; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 701: +typeStr = "ITEM_STATE_CHANGED"; +break; +default: +typeStr = "unknown type"; +} +var stateStr; +switch (this.stateChange) { +case 1: +stateStr = "SELECTED"; +break; +case 2: +stateStr = "DESELECTED"; +break; +default: +stateStr = "unknown type"; +} +return typeStr + ",item=" + this.item + ",stateChange=" + stateStr; +}); +Clazz_defineStatics (c$, +"ITEM_FIRST", 701, +"ITEM_LAST", 701, +"ITEM_STATE_CHANGED", 701, +"SELECTED", 1, +"DESELECTED", 2); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.ButtonModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultButtonModel", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.ActionListener", "$.InputEvent", "$.ItemEvent", "$.ItemListener", "javax.swing.UIManager", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.stateMask = 0; +this.actionCommand = null; +this.group = null; +this.mnemonic = 0; +this.changeEvent = null; +this.listenerList = null; +this.menuItem = false; +Clazz_instantialize (this, arguments); +}, javax.swing, "DefaultButtonModel", null, javax.swing.ButtonModel); +Clazz_prepareFields (c$, function () { +this.listenerList = new javax.swing.event.EventListenerList (); +}); +Clazz_makeConstructor (c$, +function () { +this.stateMask = 0; +this.setEnabled (true); +}); +Clazz_overrideMethod (c$, "setActionCommand", +function (actionCommand) { +this.actionCommand = actionCommand; +}, "~S"); +Clazz_overrideMethod (c$, "getActionCommand", +function () { +return this.actionCommand; +}); +Clazz_overrideMethod (c$, "isArmed", +function () { +return (this.stateMask & 1) != 0; +}); +Clazz_overrideMethod (c$, "isSelected", +function () { +return (this.stateMask & 2) != 0; +}); +Clazz_overrideMethod (c$, "isEnabled", +function () { +return (this.stateMask & 8) != 0; +}); +Clazz_overrideMethod (c$, "isPressed", +function () { +return (this.stateMask & 4) != 0; +}); +Clazz_overrideMethod (c$, "isRollover", +function () { +return (this.stateMask & 16) != 0; +}); +Clazz_overrideMethod (c$, "setArmed", +function (b) { +if (this.isMenuItem () && javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) { +if ((this.isArmed () == b)) { +return; +}} else { +if ((this.isArmed () == b) || !this.isEnabled ()) { +return; +}}if (b) { +this.stateMask |= 1; +} else { +this.stateMask &= -2; +}this.fireStateChanged (); +}, "~B"); +Clazz_overrideMethod (c$, "setEnabled", +function (b) { +if (this.isEnabled () == b) { +return; +}if (b) { +this.stateMask |= 8; +} else { +this.stateMask &= -9; +this.stateMask &= -2; +this.stateMask &= -5; +}this.fireStateChanged (); +}, "~B"); +Clazz_overrideMethod (c$, "setSelected", +function (b) { +if (this.isSelected () == b) { +return; +}if (b) { +this.stateMask |= 2; +} else { +this.stateMask &= -3; +}this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, b ? 1 : 2)); +this.fireStateChanged (); +}, "~B"); +Clazz_overrideMethod (c$, "setPressed", +function (b) { +if ((this.isPressed () == b) || !this.isEnabled ()) { +return; +}if (b) { +this.stateMask |= 4; +} else { +this.stateMask &= -5; +}if (!this.isPressed () && this.isArmed ()) { +var modifiers = 0; +var currentEvent = java.awt.EventQueue.getCurrentEvent (); +if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) { +modifiers = (currentEvent).getModifiers (); +} else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) { +modifiers = (currentEvent).getModifiers (); +}this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), modifiers)); +}this.fireStateChanged (); +}, "~B"); +Clazz_overrideMethod (c$, "setRollover", +function (b) { +if ((this.isRollover () == b) || !this.isEnabled ()) { +return; +}if (b) { +this.stateMask |= 16; +} else { +this.stateMask &= -17; +}this.fireStateChanged (); +}, "~B"); +Clazz_overrideMethod (c$, "setMnemonic", +function (key) { +this.mnemonic = key; +this.fireStateChanged (); +}, "~N"); +Clazz_overrideMethod (c$, "getMnemonic", +function () { +return this.mnemonic; +}); +Clazz_overrideMethod (c$, "addChangeListener", +function (l) { +this.listenerList.add (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_overrideMethod (c$, "removeChangeListener", +function (l) { +this.listenerList.remove (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "getChangeListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.ChangeListener); +}); +Clazz_defineMethod (c$, "fireStateChanged", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.ChangeListener) { +if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); +(listeners[i + 1]).stateChanged (this.changeEvent); +}} +}); +Clazz_overrideMethod (c$, "addActionListener", +function (l) { +this.listenerList.add (java.awt.event.ActionListener, l); +}, "java.awt.event.ActionListener"); +Clazz_overrideMethod (c$, "removeActionListener", +function (l) { +this.listenerList.remove (java.awt.event.ActionListener, l); +}, "java.awt.event.ActionListener"); +Clazz_defineMethod (c$, "getActionListeners", +function () { +return this.listenerList.getListeners (java.awt.event.ActionListener); +}); +Clazz_defineMethod (c$, "fireActionPerformed", +function (e) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === java.awt.event.ActionListener) { +(listeners[i + 1]).actionPerformed (e); +}} +}, "java.awt.event.ActionEvent"); +Clazz_overrideMethod (c$, "addItemListener", +function (l) { +this.listenerList.add (java.awt.event.ItemListener, l); +}, "java.awt.event.ItemListener"); +Clazz_overrideMethod (c$, "removeItemListener", +function (l) { +this.listenerList.remove (java.awt.event.ItemListener, l); +}, "java.awt.event.ItemListener"); +Clazz_defineMethod (c$, "getItemListeners", +function () { +return this.listenerList.getListeners (java.awt.event.ItemListener); +}); +Clazz_defineMethod (c$, "fireItemStateChanged", +function (e) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === java.awt.event.ItemListener) { +(listeners[i + 1]).itemStateChanged (e); +}} +}, "java.awt.event.ItemEvent"); +Clazz_defineMethod (c$, "getListeners", +function (listenerType) { +return this.listenerList.getListeners (listenerType); +}, "Class"); +Clazz_overrideMethod (c$, "getSelectedObjects", +function () { +return null; +}); +Clazz_overrideMethod (c$, "setGroup", +function (group) { +this.group = group; +}, "javax.swing.ButtonGroup"); +Clazz_defineMethod (c$, "getGroup", +function () { +return this.group; +}); +Clazz_defineMethod (c$, "isMenuItem", +function () { +return this.menuItem; +}); +Clazz_defineMethod (c$, "setMenuItem", +function (menuItem) { +this.menuItem = menuItem; +}, "~B"); +Clazz_defineStatics (c$, +"ARMED", 1, +"SELECTED", 2, +"PRESSED", 4, +"ENABLED", 8, +"ROLLOVER", 16); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.LayoutManager2"], "javax.swing.OverlayLayout", ["java.awt.AWTError", "$.Dimension", "javax.swing.SizeRequirements"], function () { +c$ = Clazz_decorateAsClass (function () { +this.target = null; +this.xChildren = null; +this.yChildren = null; +this.xTotal = null; +this.yTotal = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "OverlayLayout", null, java.awt.LayoutManager2); +Clazz_makeConstructor (c$, +function (target) { +this.target = target; +}, "java.awt.Container"); +Clazz_defineMethod (c$, "getTarget", +function () { +return this.target; +}); +Clazz_overrideMethod (c$, "invalidateLayout", +function (target) { +this.checkContainer (target); +this.xChildren = null; +this.yChildren = null; +this.xTotal = null; +this.yTotal = null; +}, "java.awt.Container"); +Clazz_defineMethod (c$, "addLayoutComponent", +function (name, comp) { +this.invalidateLayout (comp.getParent ()); +}, "~S,java.awt.Component"); +Clazz_overrideMethod (c$, "removeLayoutComponent", +function (comp) { +this.invalidateLayout (comp.getParent ()); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "addLayoutComponent", +function (comp, constraints) { +this.invalidateLayout (comp.getParent ()); +}, "java.awt.Component,~O"); +Clazz_overrideMethod (c$, "preferredLayoutSize", +function (target) { +this.checkContainer (target); +this.checkRequests (); +var size = new java.awt.Dimension (this.xTotal.preferred, this.yTotal.preferred); +var insets = target.getInsets (); +size.width += insets.left + insets.right; +size.height += insets.top + insets.bottom; +return size; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "minimumLayoutSize", +function (target) { +this.checkContainer (target); +this.checkRequests (); +var size = new java.awt.Dimension (this.xTotal.minimum, this.yTotal.minimum); +var insets = target.getInsets (); +size.width += insets.left + insets.right; +size.height += insets.top + insets.bottom; +return size; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "maximumLayoutSize", +function (target) { +this.checkContainer (target); +this.checkRequests (); +var size = new java.awt.Dimension (this.xTotal.maximum, this.yTotal.maximum); +var insets = target.getInsets (); +size.width += insets.left + insets.right; +size.height += insets.top + insets.bottom; +return size; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayoutAlignmentX", +function (target) { +this.checkContainer (target); +this.checkRequests (); +return this.xTotal.alignment; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayoutAlignmentY", +function (target) { +this.checkContainer (target); +this.checkRequests (); +return this.yTotal.alignment; +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "layoutContainer", +function (target) { +this.checkContainer (target); +this.checkRequests (); +var nChildren = target.getComponentCount (); +var xOffsets = Clazz_newIntArray (nChildren, 0); +var xSpans = Clazz_newIntArray (nChildren, 0); +var yOffsets = Clazz_newIntArray (nChildren, 0); +var ySpans = Clazz_newIntArray (nChildren, 0); +var alloc = target.getSize (); +var $in = target.getInsets (); +alloc.width -= $in.left + $in.right; +alloc.height -= $in.top + $in.bottom; +javax.swing.SizeRequirements.calculateAlignedPositions (alloc.width, this.xTotal, this.xChildren, xOffsets, xSpans); +javax.swing.SizeRequirements.calculateAlignedPositions (alloc.height, this.yTotal, this.yChildren, yOffsets, ySpans); +for (var i = 0; i < nChildren; i++) { +var c = target.getComponent (i); +c.setBounds ($in.left + xOffsets[i], $in.top + yOffsets[i], xSpans[i], ySpans[i]); +} +}, "java.awt.Container"); +Clazz_defineMethod (c$, "checkContainer", +function (target) { +if (this.target !== target) { +throw new java.awt.AWTError ("OverlayLayout can't be shared"); +}}, "java.awt.Container"); +Clazz_defineMethod (c$, "checkRequests", +function () { +if (this.xChildren == null || this.yChildren == null) { +var n = this.target.getComponentCount (); +this.xChildren = new Array (n); +this.yChildren = new Array (n); +for (var i = 0; i < n; i++) { +var c = this.target.getComponent (i); +var min = c.getMinimumSize (); +var typ = c.getPreferredSize (); +var max = c.getMaximumSize (); +this.xChildren[i] = new javax.swing.SizeRequirements (min.width, typ.width, max.width, c.getAlignmentX ()); +this.yChildren[i] = new javax.swing.SizeRequirements (min.height, typ.height, max.height, c.getAlignmentY ()); +} +this.xTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.xChildren); +this.yTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.yChildren); +}}); +}); +Clazz_declarePackage ("javax.swing"); +c$ = Clazz_decorateAsClass (function () { +this.minimum = 0; +this.preferred = 0; +this.maximum = 0; +this.alignment = 0; +Clazz_instantialize (this, arguments); +}, javax.swing, "SizeRequirements"); +Clazz_makeConstructor (c$, +function () { +this.minimum = 0; +this.preferred = 0; +this.maximum = 0; +this.alignment = 0.5; +}); +Clazz_makeConstructor (c$, +function (min, pref, max, a) { +this.minimum = min; +this.preferred = pref; +this.maximum = max; +this.alignment = a > 1.0 ? 1.0 : a < 0.0 ? 0.0 : a; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "toString", +function () { +return "[" + this.minimum + "," + this.preferred + "," + this.maximum + "]@" + this.alignment; +}); +c$.getTiledSizeRequirements = Clazz_defineMethod (c$, "getTiledSizeRequirements", +function (children) { +var total = new javax.swing.SizeRequirements (); +for (var i = 0; i < children.length; i++) { +var req = children[i]; +total.minimum = Math.min (total.minimum + req.minimum, 2147483647); +total.preferred = Math.min (total.preferred + req.preferred, 2147483647); +total.maximum = Math.min (total.maximum + req.maximum, 2147483647); +} +return total; +}, "~A"); +c$.getAlignedSizeRequirements = Clazz_defineMethod (c$, "getAlignedSizeRequirements", +function (children) { +var totalAscent = new javax.swing.SizeRequirements (); +var totalDescent = new javax.swing.SizeRequirements (); +for (var i = 0; i < children.length; i++) { +var req = children[i]; +var ascent = Clazz_floatToInt (req.alignment * req.minimum); +var descent = req.minimum - ascent; +totalAscent.minimum = Math.max (ascent, totalAscent.minimum); +totalDescent.minimum = Math.max (descent, totalDescent.minimum); +ascent = Clazz_floatToInt (req.alignment * req.preferred); +descent = req.preferred - ascent; +totalAscent.preferred = Math.max (ascent, totalAscent.preferred); +totalDescent.preferred = Math.max (descent, totalDescent.preferred); +ascent = Clazz_floatToInt (req.alignment * req.maximum); +descent = req.maximum - ascent; +totalAscent.maximum = Math.max (ascent, totalAscent.maximum); +totalDescent.maximum = Math.max (descent, totalDescent.maximum); +} +var min = Math.min (totalAscent.minimum + totalDescent.minimum, 2147483647); +var pref = Math.min (totalAscent.preferred + totalDescent.preferred, 2147483647); +var max = Math.min (totalAscent.maximum + totalDescent.maximum, 2147483647); +var alignment = 0.0; +if (min > 0) { +alignment = totalAscent.minimum / min; +alignment = alignment > 1.0 ? 1.0 : alignment < 0.0 ? 0.0 : alignment; +}return new javax.swing.SizeRequirements (min, pref, max, alignment); +}, "~A"); +c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", +function (allocated, total, children, offsets, spans) { +javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, true); +}, "~N,javax.swing.SizeRequirements,~A,~A,~A"); +c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", +function (allocated, total, children, offsets, spans, forward) { +javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, forward); +}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); +c$.calcTiled = Clazz_defineMethod (c$, "calcTiled", +function (allocated, total, children, offsets, spans, forward) { +var min = 0; +var pref = 0; +var max = 0; +for (var i = 0; i < children.length; i++) { +min += children[i].minimum; +pref += children[i].preferred; +max += children[i].maximum; +} +if (allocated >= pref) { +javax.swing.SizeRequirements.expandedTile (allocated, min, pref, max, children, offsets, spans, forward); +} else { +javax.swing.SizeRequirements.compressedTile (allocated, min, pref, max, children, offsets, spans, forward); +}}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); +c$.compressedTile = Clazz_defineMethod (c$, "compressedTile", + function (allocated, min, pref, max, request, offsets, spans, forward) { +var totalPlay = Math.min (pref - allocated, pref - min); +var factor = (pref - min == 0) ? 0.0 : totalPlay / (pref - min); +var totalOffset; +if (forward) { +totalOffset = 0; +for (var i = 0; i < spans.length; i++) { +offsets[i] = totalOffset; +var req = request[i]; +var play = factor * (req.preferred - req.minimum); +spans[i] = Clazz_floatToInt (req.preferred - play); +totalOffset = Math.min (totalOffset + spans[i], 2147483647); +} +} else { +totalOffset = allocated; +for (var i = 0; i < spans.length; i++) { +var req = request[i]; +var play = factor * (req.preferred - req.minimum); +spans[i] = Clazz_floatToInt (req.preferred - play); +offsets[i] = totalOffset - spans[i]; +totalOffset = Math.max (totalOffset - spans[i], 0); +} +}}, "~N,~N,~N,~N,~A,~A,~A,~B"); +c$.expandedTile = Clazz_defineMethod (c$, "expandedTile", + function (allocated, min, pref, max, request, offsets, spans, forward) { +var totalPlay = Math.min (allocated - pref, max - pref); +var factor = (max - pref == 0) ? 0.0 : totalPlay / (max - pref); +var totalOffset; +if (forward) { +totalOffset = 0; +for (var i = 0; i < spans.length; i++) { +offsets[i] = totalOffset; +var req = request[i]; +var play = Clazz_floatToInt (factor * (req.maximum - req.preferred)); +spans[i] = Math.min (req.preferred + play, 2147483647); +totalOffset = Math.min (totalOffset + spans[i], 2147483647); +} +} else { +totalOffset = allocated; +for (var i = 0; i < spans.length; i++) { +var req = request[i]; +var play = Clazz_floatToInt (factor * (req.maximum - req.preferred)); +spans[i] = Math.min (req.preferred + play, 2147483647); +offsets[i] = totalOffset - spans[i]; +totalOffset = Math.max (totalOffset - spans[i], 0); +} +}}, "~N,~N,~N,~N,~A,~A,~A,~B"); +c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", +function (allocated, total, children, offsets, spans) { +javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, true); +}, "~N,javax.swing.SizeRequirements,~A,~A,~A"); +c$.calcAligned = Clazz_defineMethod (c$, "calcAligned", +function (allocated, total, children, offsets, spans, normal) { +var totalAlignment = normal ? total.alignment : 1.0 - total.alignment; +var totalAscent = Clazz_floatToInt (allocated * totalAlignment); +var totalDescent = allocated - totalAscent; +for (var i = 0; i < children.length; i++) { +var req = children[i]; +var alignment = normal ? req.alignment : 1.0 - req.alignment; +var maxAscent = Clazz_floatToInt (req.maximum * alignment); +var maxDescent = req.maximum - maxAscent; +var ascent = Math.min (totalAscent, maxAscent); +var descent = Math.min (totalDescent, maxDescent); +offsets[i] = totalAscent - ascent; +spans[i] = Math.min (ascent + descent, 2147483647); +} +}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); +c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", +function (allocated, total, children, offsets, spans, normal) { +javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, normal); +}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); +c$.adjustSizes = Clazz_defineMethod (c$, "adjustSizes", +function (delta, children) { +return Clazz_newIntArray (0, 0); +}, "~N,~A"); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JLabel", ["java.lang.IllegalArgumentException", "javax.swing.SwingUtilities", "$.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this.mnemonic = '\0'; +this.mnemonicIndex = -1; +this.text = ""; +this.defaultIcon = null; +this.disabledIcon = null; +this.disabledIconSet = false; +this.verticalAlignment = 0; +this.horizontalAlignment = 10; +this.verticalTextPosition = 0; +this.horizontalTextPosition = 11; +this.iconTextGap = 4; +this.labelFor = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JLabel", javax.swing.JComponent, javax.swing.SwingConstants); +Clazz_makeConstructor (c$, +function (text, icon, horizontalAlignment) { +Clazz_superConstructor (this, javax.swing.JLabel, []); +this.setText (text); +this.setIcon (icon); +this.setHorizontalAlignment (horizontalAlignment); +this.updateUI (); +this.setAlignmentX (0.0); +}, "~S,javax.swing.Icon,~N"); +Clazz_makeConstructor (c$, +function (text, horizontalAlignment) { +this.construct (text, null, horizontalAlignment); +}, "~S,~N"); +Clazz_makeConstructor (c$, +function (text) { +this.construct (text, null, 10); +}, "~S"); +Clazz_makeConstructor (c$, +function (image, horizontalAlignment) { +this.construct (null, image, horizontalAlignment); +}, "javax.swing.Icon,~N"); +Clazz_makeConstructor (c$, +function (image) { +this.construct (null, image, 0); +}, "javax.swing.Icon"); +Clazz_makeConstructor (c$, +function () { +this.construct ("", null, 10); +}); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_defineMethod (c$, "setUI", +function (ui) { +Clazz_superCall (this, javax.swing.JLabel, "setUI", [ui]); +if (!this.disabledIconSet && this.disabledIcon != null) { +this.setDisabledIcon (null); +}}, "javax.swing.plaf.LabelUI"); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "LabelUI"; +}); +Clazz_defineMethod (c$, "getText", +function () { +return this.text; +}); +Clazz_defineMethod (c$, "setText", +function (text) { +var oldValue = this.text; +this.text = text; +this.firePropertyChangeObject ("text", oldValue, text); +this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, this.getDisplayedMnemonic ())); +if (text == null || oldValue == null || !text.equals (oldValue)) { +this.revalidate (); +this.repaint (); +}}, "~S"); +Clazz_defineMethod (c$, "getIcon", +function () { +return this.defaultIcon; +}); +Clazz_defineMethod (c$, "setIcon", +function (icon) { +var oldValue = this.defaultIcon; +this.defaultIcon = icon; +if ((this.defaultIcon !== oldValue) && !this.disabledIconSet) { +this.disabledIcon = null; +}this.firePropertyChangeObject ("icon", oldValue, this.defaultIcon); +if (this.defaultIcon !== oldValue) { +if ((this.defaultIcon == null) || (oldValue == null) || (this.defaultIcon.getIconWidth () != oldValue.getIconWidth ()) || (this.defaultIcon.getIconHeight () != oldValue.getIconHeight ())) { +this.revalidate (); +}this.repaint (); +}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "getDisabledIcon", +function () { +if (!this.disabledIconSet && this.disabledIcon == null && this.defaultIcon != null) { +this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.defaultIcon); +if (this.disabledIcon != null) { +this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon); +}}return this.disabledIcon; +}); +Clazz_defineMethod (c$, "setDisabledIcon", +function (disabledIcon) { +var oldValue = this.disabledIcon; +this.disabledIcon = disabledIcon; +this.disabledIconSet = (disabledIcon != null); +this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon); +if (disabledIcon !== oldValue) { +if (disabledIcon == null || oldValue == null || disabledIcon.getIconWidth () != oldValue.getIconWidth () || disabledIcon.getIconHeight () != oldValue.getIconHeight ()) { +this.revalidate (); +}if (!this.isEnabled ()) { +this.repaint (); +}}}, "javax.swing.Icon"); +Clazz_defineMethod (c$, "setDisplayedMnemonic", +function (key) { +var oldKey = this.mnemonic; +this.mnemonic = key; +this.firePropertyChangeInt ("displayedMnemonic", oldKey, this.mnemonic); +this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (this.getText (), this.mnemonic)); +if (key != oldKey) { +this.revalidate (); +this.repaint (); +}}, "~N"); +Clazz_defineMethod (c$, "setDisplayedMnemonic", +function (aChar) { +var vk = (aChar).charCodeAt (0); +if (vk >= 97 && vk <= 122) vk -= (32); +this.setDisplayedMnemonic (vk); +}, "~S"); +Clazz_defineMethod (c$, "getDisplayedMnemonic", +function () { +return this.mnemonic; +}); +Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", +function (index) { +var oldValue = this.mnemonicIndex; +if (index == -1) { +this.mnemonicIndex = -1; +} else { +var text = this.getText (); +var textLength = (text == null) ? 0 : text.length; +if (index < -1 || index >= textLength) { +throw new IllegalArgumentException ("index == " + index); +}}this.mnemonicIndex = index; +this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index); +if (index != oldValue) { +this.revalidate (); +this.repaint (); +}}, "~N"); +Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", +function () { +return this.mnemonicIndex; +}); +Clazz_defineMethod (c$, "checkHorizontalKey", +function (key, message) { +if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) { +return key; +} else { +throw new IllegalArgumentException (message); +}}, "~N,~S"); +Clazz_defineMethod (c$, "checkVerticalKey", +function (key, message) { +if ((key == 1) || (key == 0) || (key == 3)) { +return key; +} else { +throw new IllegalArgumentException (message); +}}, "~N,~S"); +Clazz_defineMethod (c$, "getIconTextGap", +function () { +return this.iconTextGap; +}); +Clazz_defineMethod (c$, "setIconTextGap", +function (iconTextGap) { +var oldValue = this.iconTextGap; +this.iconTextGap = iconTextGap; +this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap); +if (iconTextGap != oldValue) { +this.revalidate (); +this.repaint (); +}}, "~N"); +Clazz_defineMethod (c$, "getVerticalAlignment", +function () { +return this.verticalAlignment; +}); +Clazz_defineMethod (c$, "setVerticalAlignment", +function (alignment) { +if (alignment == this.verticalAlignment) return; +var oldValue = this.verticalAlignment; +this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment"); +this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "getHorizontalAlignment", +function () { +return this.horizontalAlignment; +}); +Clazz_defineMethod (c$, "setHorizontalAlignment", +function (alignment) { +if (alignment == this.horizontalAlignment) return; +var oldValue = this.horizontalAlignment; +this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment"); +this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "getVerticalTextPosition", +function () { +return this.verticalTextPosition; +}); +Clazz_defineMethod (c$, "setVerticalTextPosition", +function (textPosition) { +if (textPosition == this.verticalTextPosition) return; +var old = this.verticalTextPosition; +this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition"); +this.firePropertyChangeInt ("verticalTextPosition", old, this.verticalTextPosition); +this.revalidate (); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "getHorizontalTextPosition", +function () { +return this.horizontalTextPosition; +}); +Clazz_defineMethod (c$, "setHorizontalTextPosition", +function (textPosition) { +var old = this.horizontalTextPosition; +this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition"); +this.firePropertyChangeInt ("horizontalTextPosition", old, this.horizontalTextPosition); +this.revalidate (); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "imageUpdate", +function (img, infoflags, x, y, w, h) { +if (!this.isShowing () || !javax.swing.SwingUtilities.doesIconReferenceImage (this.getIcon (), img) && !javax.swing.SwingUtilities.doesIconReferenceImage (this.disabledIcon, img)) { +return false; +}return Clazz_superCall (this, javax.swing.JLabel, "imageUpdate", [img, infoflags, x, y, w, h]); +}, "java.awt.Image,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "paramString", +function () { +var textString = (this.text != null ? this.text : ""); +var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : ""); +var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : ""); +var labelForString = (this.labelFor != null ? this.labelFor.toString () : ""); +var verticalAlignmentString; +if (this.verticalAlignment == 1) { +verticalAlignmentString = "TOP"; +} else if (this.verticalAlignment == 0) { +verticalAlignmentString = "CENTER"; +} else if (this.verticalAlignment == 3) { +verticalAlignmentString = "BOTTOM"; +} else verticalAlignmentString = ""; +var horizontalAlignmentString; +if (this.horizontalAlignment == 2) { +horizontalAlignmentString = "LEFT"; +} else if (this.horizontalAlignment == 0) { +horizontalAlignmentString = "CENTER"; +} else if (this.horizontalAlignment == 4) { +horizontalAlignmentString = "RIGHT"; +} else if (this.horizontalAlignment == 10) { +horizontalAlignmentString = "LEADING"; +} else if (this.horizontalAlignment == 11) { +horizontalAlignmentString = "TRAILING"; +} else horizontalAlignmentString = ""; +var verticalTextPositionString; +if (this.verticalTextPosition == 1) { +verticalTextPositionString = "TOP"; +} else if (this.verticalTextPosition == 0) { +verticalTextPositionString = "CENTER"; +} else if (this.verticalTextPosition == 3) { +verticalTextPositionString = "BOTTOM"; +} else verticalTextPositionString = ""; +var horizontalTextPositionString; +if (this.horizontalTextPosition == 2) { +horizontalTextPositionString = "LEFT"; +} else if (this.horizontalTextPosition == 0) { +horizontalTextPositionString = "CENTER"; +} else if (this.horizontalTextPosition == 4) { +horizontalTextPositionString = "RIGHT"; +} else if (this.horizontalTextPosition == 10) { +horizontalTextPositionString = "LEADING"; +} else if (this.horizontalTextPosition == 11) { +horizontalTextPositionString = "TRAILING"; +} else horizontalTextPositionString = ""; +return Clazz_superCall (this, javax.swing.JLabel, "paramString", []) + ",defaultIcon=" + defaultIconString + ",disabledIcon=" + disabledIconString + ",horizontalAlignment=" + horizontalAlignmentString + ",horizontalTextPosition=" + horizontalTextPositionString + ",iconTextGap=" + this.iconTextGap + ",labelFor=" + labelForString + ",text=" + textString + ",verticalAlignment=" + verticalAlignmentString + ",verticalTextPosition=" + verticalTextPositionString; +}); +Clazz_defineMethod (c$, "getLabelFor", +function () { +return this.labelFor; +}); +Clazz_defineMethod (c$, "setLabelFor", +function (c) { +var oldC = this.labelFor; +this.labelFor = c; +this.firePropertyChangeObject ("labelFor", oldC, c); +if (Clazz_instanceOf (oldC, javax.swing.JComponent)) { +(oldC).putClientProperty ("labeledBy", null); +}if (Clazz_instanceOf (c, javax.swing.JComponent)) { +(c).putClientProperty ("labeledBy", this); +}}, "java.awt.Component"); +Clazz_defineStatics (c$, +"$uiClassID", "LabelUI", +"LABELED_BY_PROPERTY", "labeledBy"); +}); +Clazz_declarePackage ("javax.swing.border"); +Clazz_declareInterface (javax.swing.border, "Border"); +Clazz_declarePackage ("javax.swing"); +Clazz_declareInterface (javax.swing, "RootPaneContainer"); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.awt.event.MouseEvent"], "javax.swing.event.MenuDragMouseEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.path = null; +this.manager = null; +Clazz_instantialize (this, arguments); +}, javax.swing.event, "MenuDragMouseEvent", java.awt.event.MouseEvent); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, x, y, clickCount, popupTrigger, p, m) { +Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, clickCount, popupTrigger]); +this.path = p; +this.manager = m; +}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager"); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, p, m) { +Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]); +this.path = p; +this.manager = m; +}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager"); +Clazz_defineMethod (c$, "getPath", +function () { +return this.path; +}); +Clazz_defineMethod (c$, "getMenuSelectionManager", +function () { +return this.manager; +}); +}); +Clazz_declarePackage ("jssun.swing"); +Clazz_load (["javax.swing.Action"], "jssun.swing.UIAction", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.name = null; +Clazz_instantialize (this, arguments); +}, jssun.swing, "UIAction", null, javax.swing.Action); +Clazz_makeConstructor (c$, +function (name) { +this.name = name; +}, "~S"); +Clazz_defineMethod (c$, "getName", +function () { +return this.name; +}); +Clazz_overrideMethod (c$, "getValue", +function (key) { +if (key === "Name") { +return this.name; +}return null; +}, "~S"); +Clazz_overrideMethod (c$, "putValue", +function (key, value) { +}, "~S,~O"); +Clazz_overrideMethod (c$, "setEnabled", +function (b) { +}, "~B"); +Clazz_defineMethod (c$, "isEnabled", +function () { +return this.isEnabled (null); +}); +Clazz_defineMethod (c$, "isEnabled", +function (sender) { +return true; +}, "~O"); +Clazz_overrideMethod (c$, "addPropertyChangeListener", +function (listener) { +}, "java.beans.PropertyChangeListener"); +Clazz_overrideMethod (c$, "removePropertyChangeListener", +function (listener) { +}, "java.beans.PropertyChangeListener"); +}); +Clazz_declarePackage ("jssun.awt"); +Clazz_declareInterface (jssun.awt, "RequestFocusController"); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.event.ComponentListener", "java.beans.PropertyChangeListener", "javax.swing.event.EventListenerList"], "javax.swing.AncestorNotifier", ["java.awt.Window", "javax.swing.JComponent", "javax.swing.event.AncestorEvent", "$.AncestorListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.firstInvisibleAncestor = null; +this.listenerList = null; +this.root = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "AncestorNotifier", null, [java.awt.event.ComponentListener, java.beans.PropertyChangeListener]); +Clazz_prepareFields (c$, function () { +this.listenerList = new javax.swing.event.EventListenerList (); +}); +Clazz_makeConstructor (c$, +function (root) { +this.root = root; +this.addListeners (root, true); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "addAncestorListener", +function (l) { +this.listenerList.add (javax.swing.event.AncestorListener, l); +}, "javax.swing.event.AncestorListener"); +Clazz_defineMethod (c$, "removeAncestorListener", +function (l) { +this.listenerList.remove (javax.swing.event.AncestorListener, l); +}, "javax.swing.event.AncestorListener"); +Clazz_defineMethod (c$, "getAncestorListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.AncestorListener); +}); +Clazz_defineMethod (c$, "fireAncestorAdded", +function (source, id, ancestor, ancestorParent) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.AncestorListener) { +var ancestorEvent = new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent); +(listeners[i + 1]).ancestorAdded (ancestorEvent); +}} +}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); +Clazz_defineMethod (c$, "fireAncestorRemoved", +function (source, id, ancestor, ancestorParent) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.AncestorListener) { +var ancestorEvent = new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent); +(listeners[i + 1]).ancestorRemoved (ancestorEvent); +}} +}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); +Clazz_defineMethod (c$, "fireAncestorMoved", +function (source, id, ancestor, ancestorParent) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.AncestorListener) { +var ancestorEvent = new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent); +(listeners[i + 1]).ancestorMoved (ancestorEvent); +}} +}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); +Clazz_defineMethod (c$, "removeAllListeners", +function () { +this.removeListeners (this.root); +}); +Clazz_defineMethod (c$, "addListeners", +function (ancestor, addToFirst) { +var a; +this.firstInvisibleAncestor = null; +for (a = ancestor; this.firstInvisibleAncestor == null; a = a.getParent ()) { +if (addToFirst || a !== ancestor) { +a.addComponentListener (this); +if (Clazz_instanceOf (a, javax.swing.JComponent)) { +var jAncestor = a; +jAncestor.addPropertyChangeListener (this); +}}if (!a.isVisible () || a.getParent () == null || Clazz_instanceOf (a, java.awt.Window)) { +this.firstInvisibleAncestor = a; +}} +if (Clazz_instanceOf (this.firstInvisibleAncestor, java.awt.Window) && this.firstInvisibleAncestor.isVisible ()) { +this.firstInvisibleAncestor = null; +}}, "java.awt.Component,~B"); +Clazz_defineMethod (c$, "removeListeners", +function (ancestor) { +var a; +for (a = ancestor; a != null; a = a.getParent ()) { +a.removeComponentListener (this); +if (Clazz_instanceOf (a, javax.swing.JComponent)) { +var jAncestor = a; +jAncestor.removePropertyChangeListener (this); +}if (a === this.firstInvisibleAncestor || Clazz_instanceOf (a, java.awt.Window)) { +break; +}} +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "componentResized", +function (e) { +}, "java.awt.event.ComponentEvent"); +Clazz_overrideMethod (c$, "componentMoved", +function (e) { +var source = e.getComponent (); +this.fireAncestorMoved (this.root, 3, source, source.getParent ()); +}, "java.awt.event.ComponentEvent"); +Clazz_overrideMethod (c$, "componentShown", +function (e) { +var ancestor = e.getComponent (); +if (ancestor === this.firstInvisibleAncestor) { +this.addListeners (ancestor, false); +if (this.firstInvisibleAncestor == null) { +this.fireAncestorAdded (this.root, 1, ancestor, ancestor.getParent ()); +}}}, "java.awt.event.ComponentEvent"); +Clazz_overrideMethod (c$, "componentHidden", +function (e) { +var ancestor = e.getComponent (); +var needsNotify = this.firstInvisibleAncestor == null; +if (!(Clazz_instanceOf (ancestor, java.awt.Window))) { +this.removeListeners (ancestor.getParent ()); +}this.firstInvisibleAncestor = ancestor; +if (needsNotify) { +this.fireAncestorRemoved (this.root, 2, ancestor, ancestor.getParent ()); +}}, "java.awt.event.ComponentEvent"); +Clazz_overrideMethod (c$, "propertyChange", +function (evt) { +var s = evt.getPropertyName (); +if (s != null && (s.equals ("parent") || s.equals ("ancestor"))) { +var component = evt.getSource (); +if (evt.getNewValue () != null) { +if (component === this.firstInvisibleAncestor) { +this.addListeners (component, false); +if (this.firstInvisibleAncestor == null) { +this.fireAncestorAdded (this.root, 1, component, component.getParent ()); +}}} else { +var needsNotify = this.firstInvisibleAncestor == null; +var oldParent = evt.getOldValue (); +this.removeListeners (oldParent); +this.firstInvisibleAncestor = component; +if (needsNotify) { +this.fireAncestorRemoved (this.root, 2, component, oldParent); +}}}}, "java.beans.PropertyChangeEvent"); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.awt.AWTEvent"], "javax.swing.event.AncestorEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.ancestor = null; +this.ancestorParent = null; +Clazz_instantialize (this, arguments); +}, javax.swing.event, "AncestorEvent", java.awt.AWTEvent); +Clazz_makeConstructor (c$, +function (source, id, ancestor, ancestorParent) { +Clazz_superConstructor (this, javax.swing.event.AncestorEvent, [source, id]); +this.ancestor = ancestor; +this.ancestorParent = ancestorParent; +}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); +Clazz_defineMethod (c$, "getAncestor", +function () { +return this.ancestor; +}); +Clazz_defineMethod (c$, "getAncestorParent", +function () { +return this.ancestorParent; +}); +Clazz_defineMethod (c$, "getComponent", +function () { +return this.getSource (); +}); +Clazz_defineStatics (c$, +"ANCESTOR_ADDED", 1, +"ANCESTOR_REMOVED", 2, +"ANCESTOR_MOVED", 3); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.AncestorListener", null, function () { +Clazz_declareInterface (javax.swing.event, "AncestorListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.lang.Enum"], "javax.swing.ClientPropertyKey", null, function () { +c$ = Clazz_declareType (javax.swing, "ClientPropertyKey", Enum); +Clazz_makeConstructor (c$, + function (reportValueNotSerializable) { +}, "~B"); +Clazz_defineEnumConstant (c$, "JComponent_INPUT_VERIFIER", 0, [true]); +Clazz_defineEnumConstant (c$, "JComponent_TRANSFER_HANDLER", 1, [true]); +Clazz_defineEnumConstant (c$, "JComponent_ANCESTOR_NOTIFIER", 2, [true]); +Clazz_defineEnumConstant (c$, "PopupFactory_FORCE_HEAVYWEIGHT_POPUP", 3, [true]); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Dialog", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JDialog", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this.defaultCloseOperation = 1; +this.rootPane = null; +this.rootPaneCheckingEnabled = false; +this.transferHandler = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JDialog", java.awt.Dialog, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]); +Clazz_makeConstructor (c$, +function () { +this.construct (Clazz_castNullAs ("java.awt.Frame"), false); +}); +Clazz_makeConstructor (c$, +function (owner) { +this.construct (owner, false); +}, "java.awt.Frame"); +Clazz_makeConstructor (c$, +function (owner, modal) { +this.construct (owner, null, modal); +}, "java.awt.Frame,~B"); +Clazz_makeConstructor (c$, +function (owner, title) { +this.construct (owner, title, false); +}, "java.awt.Frame,~S"); +Clazz_makeConstructor (c$, +function (owner, title, modal) { +Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal]); +if (owner == null) { +var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); +this.addWindowListener (ownerShutdownListener); +}this.dialogInit (); +}, "java.awt.Frame,~S,~B"); +Clazz_makeConstructor (c$, +function (owner, title, modal, gc) { +Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal, gc]); +if (owner == null) { +var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); +this.addWindowListener (ownerShutdownListener); +}this.dialogInit (); +}, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration"); +Clazz_makeConstructor (c$, +function (owner) { +this.construct (owner, false); +}, "java.awt.Dialog"); +Clazz_makeConstructor (c$, +function (owner, modal) { +this.construct (owner, null, modal); +}, "java.awt.Dialog,~B"); +Clazz_makeConstructor (c$, +function (owner, title) { +this.construct (owner, title, false); +}, "java.awt.Dialog,~S"); +Clazz_makeConstructor (c$, +function (owner, title, modal) { +Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal]); +this.dialogInit (); +}, "java.awt.Dialog,~S,~B"); +Clazz_makeConstructor (c$, +function (owner, title, modal, gc) { +Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal, gc]); +this.dialogInit (); +}, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration"); +Clazz_makeConstructor (c$, +function (owner) { +this.construct (owner, java.awt.Dialog.ModalityType.MODELESS); +}, "java.awt.Window"); +Clazz_makeConstructor (c$, +function (owner, modalityType) { +this.construct (owner, null, modalityType); +}, "java.awt.Window,java.awt.Dialog.ModalityType"); +Clazz_makeConstructor (c$, +function (owner, title) { +this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS); +}, "java.awt.Window,~S"); +Clazz_makeConstructor (c$, +function (owner, title, modalityType) { +Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType]); +this.dialogInit (); +}, "java.awt.Window,~S,java.awt.Dialog.ModalityType"); +Clazz_makeConstructor (c$, +function (owner, title, modalityType, gc) { +Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType, gc]); +this.dialogInit (); +}, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration"); +Clazz_defineMethod (c$, "dialogInit", +function () { +this.enableEvents (72); +this.setLocale (javax.swing.JComponent.getDefaultLocale ()); +this.setRootPane (this.createRootPane ()); +this.setRootPaneCheckingEnabled (true); +if (javax.swing.JDialog.isDefaultLookAndFeelDecorated ()) { +var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations (); +if (supportsWindowDecorations) { +this.setUndecorated (true); +this.getRootPane ().setWindowDecorationStyle (2); +}}}); +Clazz_defineMethod (c$, "createRootPane", +function () { +var rp = new javax.swing.JRootPane (); +rp.setOpaque (true); +return rp; +}); +Clazz_defineMethod (c$, "processWindowEvent", +function (e) { +Clazz_superCall (this, javax.swing.JDialog, "processWindowEvent", [e]); +if (e.getID () == 201) { +switch (this.defaultCloseOperation) { +case 1: +this.setVisible (false); +break; +case 2: +this.dispose (); +break; +case 0: +default: +break; +} +}}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "setDefaultCloseOperation", +function (operation) { +if (operation != 0 && operation != 1 && operation != 2) { +throw new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE"); +}var oldValue = this.defaultCloseOperation; +this.defaultCloseOperation = operation; +this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation); +}, "~N"); +Clazz_defineMethod (c$, "getDefaultCloseOperation", +function () { +return this.defaultCloseOperation; +}); +Clazz_defineMethod (c$, "setTransferHandler", +function (newHandler) { +var oldHandler = this.transferHandler; +this.transferHandler = newHandler; +javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); +this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); +}, "javax.swing.TransferHandler"); +Clazz_defineMethod (c$, "getTransferHandler", +function () { +return this.transferHandler; +}); +Clazz_overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "setJMenuBar", +function (menu) { +this.getRootPane ().setMenuBar (menu); +}, "javax.swing.JMenuBar"); +Clazz_defineMethod (c$, "getJMenuBar", +function () { +return this.getRootPane ().getMenuBar (); +}); +Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", +function () { +return this.rootPaneCheckingEnabled; +}); +Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", +function (enabled) { +this.rootPaneCheckingEnabled = enabled; +}, "~B"); +Clazz_overrideMethod (c$, "addImpl", +function (comp, constraints, index) { +if (this.isRootPaneCheckingEnabled ()) { +return this.getContentPane ().add (comp, constraints, index); +}return this.addImplSAEM (comp, constraints, index); +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "remove", +function (comp) { +if (comp === this.rootPane) { +this.removeChild (comp); +} else { +this.getContentPane ().removeChild (comp); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "setLayout", +function (manager) { +if (this.isRootPaneCheckingEnabled ()) { +this.getContentPane ().setLayout (manager); +} else { +Clazz_superCall (this, javax.swing.JDialog, "setLayout", [manager]); +}}, "java.awt.LayoutManager"); +Clazz_overrideMethod (c$, "getRootPane", +function () { +return this.rootPane; +}); +Clazz_defineMethod (c$, "setRootPane", +function (root) { +if (this.rootPane != null) { +this.remove (this.rootPane); +}this.rootPane = root; +if (this.rootPane != null) { +var checkingEnabled = this.isRootPaneCheckingEnabled (); +try { +this.setRootPaneCheckingEnabled (false); +this.add (this.rootPane, "Center"); +} finally { +this.setRootPaneCheckingEnabled (checkingEnabled); +} +}}, "javax.swing.JRootPane"); +Clazz_overrideMethod (c$, "getContentPane", +function () { +return this.getRootPane ().getContentPane (); +}); +Clazz_overrideMethod (c$, "setContentPane", +function (contentPane) { +this.getRootPane ().setContentPane (contentPane); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayeredPane", +function () { +return this.getRootPane ().getLayeredPane (); +}); +Clazz_overrideMethod (c$, "setLayeredPane", +function (layeredPane) { +this.getRootPane ().setLayeredPane (layeredPane); +}, "javax.swing.JLayeredPane"); +Clazz_overrideMethod (c$, "getGlassPane", +function () { +return this.getRootPane ().getGlassPane (); +}); +Clazz_overrideMethod (c$, "setGlassPane", +function (glassPane) { +this.getRootPane ().setGlassPane (glassPane); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getGraphics", +function () { +javax.swing.JComponent.getGraphicsInvoked (this); +return Clazz_superCall (this, javax.swing.JDialog, "getGraphics", []); +}); +Clazz_defineMethod (c$, "repaint", +function (time, x, y, width, height) { +if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { +javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); +} else { +Clazz_superCall (this, javax.swing.JDialog, "repaint", [time, x, y, width, height]); +}}, "~N,~N,~N,~N,~N"); +c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", +function (defaultLookAndFeelDecorated) { +if (defaultLookAndFeelDecorated) { +javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.TRUE); +} else { +javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.FALSE); +}}, "~B"); +c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", +function () { +var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JDialog.defaultLookAndFeelDecoratedKey); +if (defaultLookAndFeelDecorated == null) { +defaultLookAndFeelDecorated = Boolean.FALSE; +}return defaultLookAndFeelDecorated.booleanValue (); +}); +Clazz_defineMethod (c$, "paramString", +function () { +var defaultCloseOperationString; +if (this.defaultCloseOperation == 1) { +defaultCloseOperationString = "HIDE_ON_CLOSE"; +} else if (this.defaultCloseOperation == 2) { +defaultCloseOperationString = "DISPOSE_ON_CLOSE"; +} else if (this.defaultCloseOperation == 0) { +defaultCloseOperationString = "DO_NOTHING_ON_CLOSE"; +} else defaultCloseOperationString = ""; +var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : ""); +var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); +return Clazz_superCall (this, javax.swing.JDialog, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; +}); +c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey = new Clazz._O (); +}); +Clazz_declarePackage ("java.awt"); +Clazz_load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () { +c$ = Clazz_decorateAsClass (function () { +this.resizable = true; +this.undecorated = false; +this.modal = false; +this.modalityType = null; +this.title = null; +this.isInHide = false; +this.isInDispose = false; +Clazz_instantialize (this, arguments); +}, java.awt, "Dialog", java.awt.Window); +Clazz_makeConstructor (c$, +function (owner) { +this.construct (owner, "", false); +}, "java.awt.Frame"); +Clazz_makeConstructor (c$, +function (owner, modal) { +this.construct (owner, "", modal); +}, "java.awt.Frame,~B"); +Clazz_makeConstructor (c$, +function (owner, title) { +this.construct (owner, title, false); +}, "java.awt.Frame,~S"); +Clazz_makeConstructor (c$, +function (owner, title, modal) { +this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS); +}, "java.awt.Frame,~S,~B"); +Clazz_makeConstructor (c$, +function (owner, title, modal, gc) { +this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc); +}, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration"); +Clazz_makeConstructor (c$, +function (owner) { +this.construct (owner, "", false); +}, "java.awt.Dialog"); +Clazz_makeConstructor (c$, +function (owner, title) { +this.construct (owner, title, false); +}, "java.awt.Dialog,~S"); +Clazz_makeConstructor (c$, +function (owner, title, modal) { +this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS); +}, "java.awt.Dialog,~S,~B"); +Clazz_makeConstructor (c$, +function (owner, title, modal, gc) { +this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc); +}, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration"); +Clazz_makeConstructor (c$, +function (owner) { +this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS); +}, "java.awt.Window"); +Clazz_makeConstructor (c$, +function (owner, title) { +this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS); +}, "java.awt.Window,~S"); +Clazz_makeConstructor (c$, +function (owner, modalityType) { +this.construct (owner, null, modalityType); +}, "java.awt.Window,java.awt.Dialog.ModalityType"); +Clazz_makeConstructor (c$, +function (owner, title, modalityType) { +Clazz_superConstructor (this, java.awt.Dialog, [owner]); +if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) { +throw new IllegalArgumentException ("Wrong parent window"); +}this.title = title; +this.setModalityType (modalityType); +}, "java.awt.Window,~S,java.awt.Dialog.ModalityType"); +Clazz_makeConstructor (c$, +function (owner, title, modalityType, gc) { +Clazz_superConstructor (this, java.awt.Dialog, [owner, gc]); +if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) { +throw new IllegalArgumentException ("wrong owner window"); +}this.title = title; +this.setModalityType (modalityType); +}, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration"); +Clazz_overrideMethod (c$, "constructComponentName", +function () { +{ +return "dialog" + java.awt.Dialog.$nameCounter++; +}}); +Clazz_defineMethod (c$, "addNotify", +function () { +{ +if (this.parent != null) { +this.parent.addNotify (); +}Clazz_superCall (this, java.awt.Dialog, "addNotify", []); +}}); +Clazz_defineMethod (c$, "isModal", +function () { +return this.isModal_NoClientCode (); +}); +Clazz_defineMethod (c$, "isModal_NoClientCode", +function () { +return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS; +}); +Clazz_defineMethod (c$, "setModal", +function (modal) { +this.modal = modal; +this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS); +}, "~B"); +Clazz_defineMethod (c$, "getModalityType", +function () { +return this.modalityType; +}); +Clazz_defineMethod (c$, "setModalityType", +function (type) { +if (type == null) { +type = java.awt.Dialog.ModalityType.MODELESS; +}if (this.modalityType === type) { +return; +}this.checkModalityPermission (type); +this.modalityType = type; +this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS); +}, "java.awt.Dialog.ModalityType"); +Clazz_defineMethod (c$, "getTitle", +function () { +return this.title; +}); +Clazz_defineMethod (c$, "setTitle", +function (title) { +var oldTitle = this.title; +{ +this.title = title; +}this.firePropertyChangeObject ("title", oldTitle, title); +}, "~S"); +Clazz_defineMethod (c$, "show", +function () { +}); +Clazz_defineMethod (c$, "modalityPushed", +function () { +}); +Clazz_defineMethod (c$, "modalityPopped", +function () { +}); +Clazz_defineMethod (c$, "interruptBlocking", +function () { +if (this.isModal ()) { +this.disposeImpl (); +} else if (this.windowClosingException != null) { +this.windowClosingException.fillInStackTrace (); +this.windowClosingException.printStackTrace (); +this.windowClosingException = null; +}}); +Clazz_defineMethod (c$, "hideAndDisposePreHandler", + function () { +this.isInHide = true; +}); +Clazz_defineMethod (c$, "hideAndDisposeHandler", + function () { +this.isInHide = false; +}); +Clazz_defineMethod (c$, "hide", +function () { +this.hideAndDisposePreHandler (); +Clazz_superCall (this, java.awt.Dialog, "hide", []); +if (!this.isInDispose) { +this.hideAndDisposeHandler (); +}}); +Clazz_defineMethod (c$, "doDispose", +function () { +this.isInDispose = true; +Clazz_superCall (this, java.awt.Dialog, "doDispose", []); +this.hideAndDisposeHandler (); +this.isInDispose = false; +}); +Clazz_defineMethod (c$, "isResizable", +function () { +return this.resizable; +}); +Clazz_defineMethod (c$, "setResizable", +function (resizable) { +var testvalid = false; +{ +this.resizable = resizable; +}if (testvalid) { +this.invalidateIfValid (); +}}, "~B"); +Clazz_defineMethod (c$, "setUndecorated", +function (undecorated) { +{ +if (this.isDisplayable ()) { +throw new java.awt.IllegalComponentStateException ("The dialog is displayable."); +}this.undecorated = undecorated; +}}, "~B"); +Clazz_defineMethod (c$, "isUndecorated", +function () { +return this.undecorated; +}); +Clazz_defineMethod (c$, "paramString", +function () { +var str = Clazz_superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType; +if (this.title != null) { +str += ",title=" + this.title; +}return str; +}); +Clazz_defineMethod (c$, "modalShow", +function () { +}); +Clazz_defineMethod (c$, "modalHide", +function () { +}); +Clazz_defineMethod (c$, "shouldBlock", +function (w) { +if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) { +return false; +}if ((Clazz_instanceOf (w, java.awt.Dialog)) && (w).isInHide) { +return false; +}var blockerToCheck = this; +while (blockerToCheck != null) { +var c = w; +while ((c != null) && (c !== blockerToCheck)) { +c = c.getParent_NoClientCode (); +} +if (c === blockerToCheck) { +return false; +}blockerToCheck = blockerToCheck.getModalBlocker (); +} +switch (this.modalityType) { +case java.awt.Dialog.ModalityType.MODELESS: +return false; +case java.awt.Dialog.ModalityType.DOCUMENT_MODAL: +if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) { +var c = this; +while ((c != null) && (c !== w)) { +c = c.getParent_NoClientCode (); +} +return c === w; +} else { +return this.getDocumentRoot () === w.getDocumentRoot (); +}case java.awt.Dialog.ModalityType.APPLICATION_MODAL: +return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext); +case java.awt.Dialog.ModalityType.TOOLKIT_MODAL: +return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE); +} +return false; +}, "java.awt.Window"); +Clazz_defineMethod (c$, "checkModalityPermission", + function (mt) { +}, "java.awt.Dialog.ModalityType"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.Dialog, "ModalityType", Enum); +Clazz_defineEnumConstant (c$, "MODELESS", 0, []); +Clazz_defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []); +Clazz_defineEnumConstant (c$, "APPLICATION_MODAL", 2, []); +Clazz_defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (java.awt.Dialog, "ModalExclusionType", Enum); +Clazz_defineEnumConstant (c$, "NO_EXCLUDE", 0, []); +Clazz_defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []); +Clazz_defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []); +c$ = Clazz_p0p (); +c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL; +Clazz_defineStatics (c$, +"$base", "dialog", +"$nameCounter", 0); +}); +Clazz_declarePackage ("javax.swing"); +c$ = Clazz_declareInterface (javax.swing, "WindowConstants"); +Clazz_defineStatics (c$, +"DO_NOTHING_ON_CLOSE", 0, +"HIDE_ON_CLOSE", 1, +"DISPOSE_ON_CLOSE", 2, +"EXIT_ON_CLOSE", 3); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Frame", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JFrame", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this.defaultCloseOperation = 1; +this.transferHandler = null; +this.rootPane = null; +this.rootPaneCheckingEnabled = false; +Clazz_instantialize (this, arguments); +}, javax.swing, "JFrame", java.awt.Frame, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JFrame); +this.frameInit (); +}); +Clazz_makeConstructor (c$, +function (gc) { +Clazz_superConstructor (this, javax.swing.JFrame, [gc]); +this.frameInit (); +}, "java.awt.GraphicsConfiguration"); +Clazz_makeConstructor (c$, +function (title) { +Clazz_superConstructor (this, javax.swing.JFrame, [title]); +this.frameInit (); +}, "~S"); +Clazz_makeConstructor (c$, +function (title, gc) { +Clazz_superConstructor (this, javax.swing.JFrame, [title, gc]); +this.frameInit (); +}, "~S,java.awt.GraphicsConfiguration"); +Clazz_defineMethod (c$, "frameInit", +function () { +this.enableEvents (72); +this.setLocale (javax.swing.JComponent.getDefaultLocale ()); +this.setRootPane (this.createRootPane ()); +this.setBackground (javax.swing.UIManager.getColor ("control")); +this.setRootPaneCheckingEnabled (true); +if (javax.swing.JFrame.isDefaultLookAndFeelDecorated ()) { +var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations (); +if (supportsWindowDecorations) { +this.setUndecorated (true); +this.getRootPane ().setWindowDecorationStyle (1); +}}}); +Clazz_defineMethod (c$, "createRootPane", +function () { +var rp = new javax.swing.JRootPane (); +rp.setOpaque (true); +return rp; +}); +Clazz_defineMethod (c$, "processWindowEvent", +function (e) { +Clazz_superCall (this, javax.swing.JFrame, "processWindowEvent", [e]); +if (e.getID () == 201) { +switch (this.defaultCloseOperation) { +case 1: +this.setVisible (false); +break; +case 2: +this.dispose (); +break; +case 0: +default: +break; +case 3: +System.exit (0); +break; +} +}}, "java.awt.event.WindowEvent"); +Clazz_defineMethod (c$, "setDefaultCloseOperation", +function (operation) { +if (operation != 0 && operation != 1 && operation != 2 && operation != 3) { +throw new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE"); +}if (this.defaultCloseOperation != operation) { +if (operation == 3) { +var security = System.getSecurityManager (); +if (security != null) { +security.checkExit (0); +}}var oldValue = this.defaultCloseOperation; +this.defaultCloseOperation = operation; +this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation); +}}, "~N"); +Clazz_defineMethod (c$, "getDefaultCloseOperation", +function () { +return this.defaultCloseOperation; +}); +Clazz_defineMethod (c$, "setTransferHandler", +function (newHandler) { +var oldHandler = this.transferHandler; +this.transferHandler = newHandler; +javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); +this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); +}, "javax.swing.TransferHandler"); +Clazz_defineMethod (c$, "getTransferHandler", +function () { +return this.transferHandler; +}); +Clazz_overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "setJMenuBar", +function (menubar) { +this.getRootPane ().setMenuBar (menubar); +}, "javax.swing.JMenuBar"); +Clazz_defineMethod (c$, "getJMenuBar", +function () { +return this.getRootPane ().getMenuBar (); +}); +Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", +function () { +return this.rootPaneCheckingEnabled; +}); +Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", +function (enabled) { +this.rootPaneCheckingEnabled = enabled; +}, "~B"); +Clazz_overrideMethod (c$, "addImpl", +function (comp, constraints, index) { +if (this.isRootPaneCheckingEnabled ()) { +return this.getContentPane ().add (comp, constraints, index); +}return this.addImplSAEM (comp, constraints, index); +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "remove", +function (comp) { +if (comp === this.rootPane) { +this.removeChild (comp); +} else { +this.getContentPane ().removeChild (comp); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "setLayout", +function (manager) { +if (this.isRootPaneCheckingEnabled ()) { +this.getContentPane ().setLayout (manager); +} else { +Clazz_superCall (this, javax.swing.JFrame, "setLayout", [manager]); +}}, "java.awt.LayoutManager"); +Clazz_overrideMethod (c$, "getRootPane", +function () { +return this.rootPane; +}); +Clazz_defineMethod (c$, "setRootPane", +function (root) { +if (this.rootPane != null) { +this.remove (this.rootPane); +}this.rootPane = root; +if (this.rootPane != null) { +var checkingEnabled = this.isRootPaneCheckingEnabled (); +try { +this.setRootPaneCheckingEnabled (false); +this.add (this.rootPane, "Center"); +} finally { +this.setRootPaneCheckingEnabled (checkingEnabled); +} +}}, "javax.swing.JRootPane"); +Clazz_overrideMethod (c$, "getContentPane", +function () { +return this.getRootPane ().getContentPane (); +}); +Clazz_overrideMethod (c$, "setContentPane", +function (contentPane) { +this.getRootPane ().setContentPane (contentPane); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayeredPane", +function () { +return this.getRootPane ().getLayeredPane (); +}); +Clazz_overrideMethod (c$, "setLayeredPane", +function (layeredPane) { +this.getRootPane ().setLayeredPane (layeredPane); +}, "javax.swing.JLayeredPane"); +Clazz_overrideMethod (c$, "getGlassPane", +function () { +return this.getRootPane ().getGlassPane (); +}); +Clazz_overrideMethod (c$, "setGlassPane", +function (glassPane) { +this.getRootPane ().setGlassPane (glassPane); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getGraphics", +function () { +javax.swing.JComponent.getGraphicsInvoked (this); +return Clazz_superCall (this, javax.swing.JFrame, "getGraphics", []); +}); +Clazz_defineMethod (c$, "repaint", +function (time, x, y, width, height) { +if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { +javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); +} else { +Clazz_superCall (this, javax.swing.JFrame, "repaint", [time, x, y, width, height]); +}}, "~N,~N,~N,~N,~N"); +c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", +function (defaultLookAndFeelDecorated) { +if (defaultLookAndFeelDecorated) { +javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.TRUE); +} else { +javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.FALSE); +}}, "~B"); +c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", +function () { +var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JFrame.defaultLookAndFeelDecoratedKey); +if (defaultLookAndFeelDecorated == null) { +defaultLookAndFeelDecorated = Boolean.FALSE; +}return defaultLookAndFeelDecorated.booleanValue (); +}); +Clazz_defineMethod (c$, "paramString", +function () { +var defaultCloseOperationString; +if (this.defaultCloseOperation == 1) { +defaultCloseOperationString = "HIDE_ON_CLOSE"; +} else if (this.defaultCloseOperation == 2) { +defaultCloseOperationString = "DISPOSE_ON_CLOSE"; +} else if (this.defaultCloseOperation == 0) { +defaultCloseOperationString = "DO_NOTHING_ON_CLOSE"; +} else if (this.defaultCloseOperation == 3) { +defaultCloseOperationString = "EXIT_ON_CLOSE"; +} else defaultCloseOperationString = ""; +var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : ""); +var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); +return Clazz_superCall (this, javax.swing.JFrame, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; +}); +Clazz_defineStatics (c$, +"EXIT_ON_CLOSE", 3); +c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey = new Clazz._O (); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Window", "javax.swing.RootPaneContainer"], "javax.swing.JWindow", ["javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () { +c$ = Clazz_decorateAsClass (function () { +this.rootPane = null; +this.rootPaneCheckingEnabled = false; +this.transferHandler = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JWindow", java.awt.Window, javax.swing.RootPaneContainer); +Clazz_makeConstructor (c$, +function () { +this.construct (Clazz_castNullAs ("java.awt.Frame")); +}); +Clazz_makeConstructor (c$, +function (gc) { +this.construct (null, gc); +Clazz_superCall (this, javax.swing.JWindow, "setFocusableWindowState", [false]); +}, "java.awt.GraphicsConfiguration"); +Clazz_makeConstructor (c$, +function (owner) { +Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]); +if (owner == null) { +var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); +this.addWindowListener (ownerShutdownListener); +}this.windowInit (); +}, "java.awt.Frame"); +Clazz_makeConstructor (c$, +function (owner) { +Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]); +if (owner == null) { +var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); +this.addWindowListener (ownerShutdownListener); +}this.windowInit (); +}, "java.awt.Window"); +Clazz_makeConstructor (c$, +function (owner, gc) { +Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, gc]); +if (owner == null) { +var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); +this.addWindowListener (ownerShutdownListener); +}this.windowInit (); +}, "java.awt.Window,java.awt.GraphicsConfiguration"); +Clazz_defineMethod (c$, "windowInit", +function () { +this.setLocale (javax.swing.JComponent.getDefaultLocale ()); +this.setRootPane (this.createRootPane ()); +this.setRootPaneCheckingEnabled (true); +}); +Clazz_defineMethod (c$, "createRootPane", +function () { +var rp = new javax.swing.JRootPane (); +rp.setOpaque (true); +return rp; +}); +Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", +function () { +return this.rootPaneCheckingEnabled; +}); +Clazz_defineMethod (c$, "setTransferHandler", +function (newHandler) { +var oldHandler = this.transferHandler; +this.transferHandler = newHandler; +javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); +this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); +}, "javax.swing.TransferHandler"); +Clazz_defineMethod (c$, "getTransferHandler", +function () { +return this.transferHandler; +}); +Clazz_overrideMethod (c$, "update", +function (g) { +this.paint (g); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", +function (enabled) { +this.rootPaneCheckingEnabled = enabled; +}, "~B"); +Clazz_overrideMethod (c$, "addImpl", +function (comp, constraints, index) { +if (this.isRootPaneCheckingEnabled ()) { +return this.getContentPane ().add (comp, constraints, index); +}return this.addImplSAEM (comp, constraints, index); +}, "java.awt.Component,~O,~N"); +Clazz_defineMethod (c$, "remove", +function (comp) { +if (comp === this.rootPane) { +this.removeChild (comp); +} else { +this.getContentPane ().removeChild (comp); +}}, "java.awt.Component"); +Clazz_defineMethod (c$, "setLayout", +function (manager) { +if (this.isRootPaneCheckingEnabled ()) { +this.getContentPane ().setLayout (manager); +} else { +Clazz_superCall (this, javax.swing.JWindow, "setLayout", [manager]); +}}, "java.awt.LayoutManager"); +Clazz_overrideMethod (c$, "getRootPane", +function () { +return this.rootPane; +}); +Clazz_defineMethod (c$, "setRootPane", +function (root) { +if (this.rootPane != null) { +this.remove (this.rootPane); +}this.rootPane = root; +if (this.rootPane != null) { +var checkingEnabled = this.isRootPaneCheckingEnabled (); +try { +this.setRootPaneCheckingEnabled (false); +this.add (this.rootPane, "Center"); +} finally { +this.setRootPaneCheckingEnabled (checkingEnabled); +} +}}, "javax.swing.JRootPane"); +Clazz_overrideMethod (c$, "getContentPane", +function () { +return this.getRootPane ().getContentPane (); +}); +Clazz_overrideMethod (c$, "setContentPane", +function (contentPane) { +this.getRootPane ().setContentPane (contentPane); +}, "java.awt.Container"); +Clazz_overrideMethod (c$, "getLayeredPane", +function () { +return this.getRootPane ().getLayeredPane (); +}); +Clazz_overrideMethod (c$, "setLayeredPane", +function (layeredPane) { +this.getRootPane ().setLayeredPane (layeredPane); +}, "javax.swing.JLayeredPane"); +Clazz_overrideMethod (c$, "getGlassPane", +function () { +return this.getRootPane ().getGlassPane (); +}); +Clazz_overrideMethod (c$, "setGlassPane", +function (glassPane) { +this.getRootPane ().setGlassPane (glassPane); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getGraphics", +function () { +javax.swing.JComponent.getGraphicsInvoked (this); +return Clazz_superCall (this, javax.swing.JWindow, "getGraphics", []); +}); +Clazz_defineMethod (c$, "repaint", +function (time, x, y, width, height) { +if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { +javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); +} else { +Clazz_superCall (this, javax.swing.JWindow, "repaint", [time, x, y, width, height]); +}}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "paramString", +function () { +var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); +return Clazz_superCall (this, javax.swing.JWindow, "paramString", []) + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; +}); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.util.Hashtable"], "javax.swing.KeyboardManager", ["java.lang.Thread", "java.util.Vector", "java.applet.Applet", "java.awt.Window", "javax.swing.JComponent", "$.JMenuBar", "$.KeyStroke"], function () { +c$ = Clazz_decorateAsClass (function () { +this.containerMap = null; +this.componentKeyStrokeMap = null; +if (!Clazz_isClassDefined ("javax.swing.KeyboardManager.ComponentKeyStrokePair")) { +javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "KeyboardManager"); +Clazz_prepareFields (c$, function () { +this.containerMap = new java.util.Hashtable (); +this.componentKeyStrokeMap = new java.util.Hashtable (); +}); +c$.getCurrentManager = Clazz_defineMethod (c$, "getCurrentManager", +function () { +return javax.swing.KeyboardManager.currentManager; +}); +c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", +function (km) { +javax.swing.KeyboardManager.currentManager = km; +}, "javax.swing.KeyboardManager"); +Clazz_defineMethod (c$, "registerKeyStroke", +function (k, c) { +var topContainer = javax.swing.KeyboardManager.getTopAncestor (c); +if (topContainer == null) { +return; +}var keyMap = this.containerMap.get (topContainer); +if (keyMap == null) { +keyMap = this.registerNewTopContainer (topContainer); +}var tmp = keyMap.get (k); +if (tmp == null) { +keyMap.put (k, c); +} else if (Clazz_instanceOf (tmp, java.util.Vector)) { +var v = tmp; +if (!v.contains (c)) { +v.addElement (c); +}} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) { +if (tmp !== c) { +var v = new java.util.Vector (); +v.addElement (tmp); +v.addElement (c); +keyMap.put (k, v); +}} else { +System.out.println ("Unexpected condition in registerKeyStroke"); +Thread.dumpStack (); +}this.componentKeyStrokeMap.put (Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, k), topContainer); +}, "javax.swing.KeyStroke,javax.swing.JComponent"); +c$.getTopAncestor = Clazz_defineMethod (c$, "getTopAncestor", + function (c) { +for (var p = c.getParent (); p != null; p = p.getParent ()) { +if (Clazz_instanceOf (p, java.awt.Window) && (p).isFocusableWindow () || Clazz_instanceOf (p, java.applet.Applet)) { +return p; +}} +return null; +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "unregisterKeyStroke", +function (ks, c) { +var ckp = Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, ks); +var topContainer = this.componentKeyStrokeMap.get (ckp); +if (topContainer == null) { +return; +}var keyMap = this.containerMap.get (topContainer); +if (keyMap == null) { +Thread.dumpStack (); +return; +}var tmp = keyMap.get (ks); +if (tmp == null) { +Thread.dumpStack (); +return; +}if (Clazz_instanceOf (tmp, javax.swing.JComponent) && tmp === c) { +keyMap.remove (ks); +} else if (Clazz_instanceOf (tmp, java.util.Vector)) { +var v = tmp; +v.removeElement (c); +if (v.isEmpty ()) { +keyMap.remove (ks); +}}if (keyMap.isEmpty ()) { +this.containerMap.remove (topContainer); +}this.componentKeyStrokeMap.remove (ckp); +}, "javax.swing.KeyStroke,javax.swing.JComponent"); +Clazz_defineMethod (c$, "fireKeyboardAction", +function (e, pressed, topAncestor) { +if (e.isConsumed ()) { +System.out.println ("Aquired pre-used event!"); +Thread.dumpStack (); +}var ks; +if (e.getID () == 400) { +ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ()); +} else { +ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), !pressed); +}var keyMap = this.containerMap.get (topAncestor); +if (keyMap != null) { +var tmp = keyMap.get (ks); +if (tmp == null) { +} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) { +var c = tmp; +if (c.isShowing () && c.isEnabled ()) { +this.fireBinding (c, ks, e, pressed); +}} else if (Clazz_instanceOf (tmp, java.util.Vector)) { +var v = tmp; +for (var counter = v.size () - 1; counter >= 0; counter--) { +var c = v.elementAt (counter); +if (c.isShowing () && c.isEnabled ()) { +this.fireBinding (c, ks, e, pressed); +if (e.isConsumed ()) return true; +}} +} else { +System.out.println ("Unexpected condition in fireKeyboardAction " + tmp); +Thread.dumpStack (); +}}if (e.isConsumed ()) { +return true; +}if (keyMap != null) { +var v = keyMap.get (javax.swing.JMenuBar); +if (v != null) { +var iter = v.elements (); +while (iter.hasMoreElements ()) { +var mb = iter.nextElement (); +if (mb.isShowing () && mb.isEnabled ()) { +this.fireBinding (mb, ks, e, pressed); +if (e.isConsumed ()) { +return true; +}}} +}}return e.isConsumed (); +}, "java.awt.event.KeyEvent,~B,java.awt.Container"); +Clazz_defineMethod (c$, "fireBinding", +function (c, ks, e, pressed) { +if (c.processKeyBinding (ks, e, 2, pressed)) { +e.consume (); +}}, "javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B"); +Clazz_defineMethod (c$, "registerMenuBar", +function (mb) { +var top = javax.swing.KeyboardManager.getTopAncestor (mb); +if (top == null) { +return; +}var keyMap = this.containerMap.get (top); +if (keyMap == null) { +keyMap = this.registerNewTopContainer (top); +}var menuBars = keyMap.get (javax.swing.JMenuBar); +if (menuBars == null) { +menuBars = new java.util.Vector (); +keyMap.put (javax.swing.JMenuBar, menuBars); +}if (!menuBars.contains (mb)) { +menuBars.addElement (mb); +}}, "javax.swing.JMenuBar"); +Clazz_defineMethod (c$, "unregisterMenuBar", +function (mb) { +var topContainer = javax.swing.KeyboardManager.getTopAncestor (mb); +if (topContainer == null) { +return; +}var keyMap = this.containerMap.get (topContainer); +if (keyMap != null) { +var v = keyMap.get (javax.swing.JMenuBar); +if (v != null) { +v.removeElement (mb); +if (v.isEmpty ()) { +keyMap.remove (javax.swing.JMenuBar); +if (keyMap.isEmpty ()) { +this.containerMap.remove (topContainer); +}}}}}, "javax.swing.JMenuBar"); +Clazz_defineMethod (c$, "registerNewTopContainer", +function (topContainer) { +var keyMap = new java.util.Hashtable (); +this.containerMap.put (topContainer, keyMap); +return keyMap; +}, "java.awt.Container"); +c$.$KeyboardManager$ComponentKeyStrokePair$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +this.component = null; +this.keyStroke = null; +Clazz_instantialize (this, arguments); +}, javax.swing.KeyboardManager, "ComponentKeyStrokePair"); +Clazz_makeConstructor (c$, +function (a, b) { +this.component = a; +this.keyStroke = b; +}, "~O,~O"); +Clazz_defineMethod (c$, "equals", +function (a) { +if (!(Clazz_instanceOf (a, javax.swing.KeyboardManager.ComponentKeyStrokePair))) { +return false; +}var b = a; +return ((this.component.equals (b.component)) && (this.keyStroke.equals (b.keyStroke))); +}, "~O"); +Clazz_defineMethod (c$, "hashCode", +function () { +return this.component.hashCode () * this.keyStroke.hashCode (); +}); +c$ = Clazz_p0p (); +}; +c$.currentManager = c$.prototype.currentManager = new javax.swing.KeyboardManager (); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JComponent", "$.MenuElement"], "javax.swing.JMenuBar", ["java.lang.Error", "java.util.Vector", "java.awt.Insets", "javax.swing.DefaultSingleSelectionModel", "$.JMenu", "$.JPopupMenu", "$.KeyboardManager", "$.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this.selectionModel = null; +this.$paintBorder = true; +this.margin = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JMenuBar", javax.swing.JComponent, javax.swing.MenuElement); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JMenuBar); +this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ()); +this.updateUI (); +}); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "MenuBarUI"; +}); +Clazz_defineMethod (c$, "getSelectionModel", +function () { +return this.selectionModel; +}); +Clazz_defineMethod (c$, "setSelectionModel", +function (model) { +var oldValue = this.selectionModel; +this.selectionModel = model; +this.firePropertyChangeObject ("selectionModel", oldValue, this.selectionModel); +}, "javax.swing.SingleSelectionModel"); +Clazz_defineMethod (c$, "add", +function (c) { +Clazz_superCall (this, javax.swing.JMenuBar, "add", [c]); +return c; +}, "javax.swing.JMenu"); +Clazz_defineMethod (c$, "getMenu", +function (index) { +var c = this.getComponentAtIndex (index); +if (Clazz_instanceOf (c, javax.swing.JMenu)) return c; +return null; +}, "~N"); +Clazz_defineMethod (c$, "getMenuCount", +function () { +return this.getComponentCount (); +}); +Clazz_defineMethod (c$, "setHelpMenu", +function (menu) { +throw new Error ("setHelpMenu() not yet implemented."); +}, "javax.swing.JMenu"); +Clazz_defineMethod (c$, "getHelpMenu", +function () { +throw new Error ("getHelpMenu() not yet implemented."); +}); +Clazz_defineMethod (c$, "getComponentAtIndex", +function (i) { +if (i < 0 || i >= this.getComponentCount ()) { +return null; +}return this.getComponent (i); +}, "~N"); +Clazz_defineMethod (c$, "getComponentIndex", +function (c) { +var ncomponents = this.getComponentCount (); +var component = this.getComponents (); +for (var i = 0; i < ncomponents; i++) { +var comp = component[i]; +if (comp === c) return i; +} +return -1; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "setSelected", +function (sel) { +var model = this.getSelectionModel (); +var index = this.getComponentIndex (sel); +model.setSelectedIndex (index); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "isSelected", +function () { +return this.selectionModel.isSelected (); +}); +Clazz_defineMethod (c$, "isBorderPainted", +function () { +return this.$paintBorder; +}); +Clazz_defineMethod (c$, "setBorderPainted", +function (b) { +var oldValue = this.$paintBorder; +this.$paintBorder = b; +this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder); +if (b != oldValue) { +this.revalidate (); +this.repaint (); +}}, "~B"); +Clazz_defineMethod (c$, "paintBorder", +function (g) { +if (this.isBorderPainted ()) { +Clazz_superCall (this, javax.swing.JMenuBar, "paintBorder", [g]); +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "setMargin", +function (m) { +var old = this.margin; +this.margin = m; +this.firePropertyChangeObject ("margin", old, m); +if (old == null || !old.equals (m)) { +this.revalidate (); +this.repaint (); +}}, "java.awt.Insets"); +Clazz_defineMethod (c$, "getMargin", +function () { +if (this.margin == null) { +return new java.awt.Insets (0, 0, 0, 0); +} else { +return this.margin; +}}); +Clazz_defineMethod (c$, "processMouseEvent", +function (event, path, manager) { +}, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager"); +Clazz_defineMethod (c$, "processKeyEvent", +function (e, path, manager) { +}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager"); +Clazz_overrideMethod (c$, "menuSelectionChanged", +function (isIncluded) { +}, "~B"); +Clazz_defineMethod (c$, "getSubElements", +function () { +var result; +var tmp = new java.util.Vector (); +var c = this.getComponentCount (); +var i; +var m; +for (i = 0; i < c; i++) { +m = this.getComponent (i); +if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m); +} +result = new Array (tmp.size ()); +for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i); + +return result; +}); +Clazz_defineMethod (c$, "getComponent", +function () { +return this; +}); +Clazz_defineMethod (c$, "paramString", +function () { +var paintBorderString = (this.$paintBorder ? "true" : "false"); +var marginString = (this.margin != null ? this.margin.toString () : ""); +return Clazz_superCall (this, javax.swing.JMenuBar, "paramString", []) + ",margin=" + marginString + ",paintBorder=" + paintBorderString; +}); +Clazz_defineMethod (c$, "processKeyBinding", +function (ks, e, condition, pressed) { +var retValue = Clazz_superCall (this, javax.swing.JMenuBar, "processKeyBinding", [ks, e, condition, pressed]); +if (!retValue) { +var subElements = this.getSubElements (); +for (var i = 0; i < subElements.length; i++) { +if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) { +return true; +}} +}return retValue; +}, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B"); +c$.processBindingForKeyStrokeRecursive = Clazz_defineMethod (c$, "processBindingForKeyStrokeRecursive", +function (elem, ks, e, condition, pressed) { +if (elem == null) { +return false; +}var c = elem.getComponent (); +if (!(c.isVisible () || (Clazz_instanceOf (c, javax.swing.JPopupMenu))) || !c.isEnabled ()) { +return false; +}if (c != null && Clazz_instanceOf (c, javax.swing.JComponent) && (c).processKeyBinding (ks, e, condition, pressed)) { +return true; +}var subElements = elem.getSubElements (); +for (var i = 0; i < subElements.length; i++) { +if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) { +return true; +}} +return false; +}, "javax.swing.MenuElement,javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B"); +Clazz_defineMethod (c$, "addNotify", +function () { +Clazz_superCall (this, javax.swing.JMenuBar, "addNotify", []); +javax.swing.KeyboardManager.getCurrentManager ().registerMenuBar (this); +}); +Clazz_defineMethod (c$, "removeNotify", +function () { +Clazz_superCall (this, javax.swing.JMenuBar, "removeNotify", []); +javax.swing.KeyboardManager.getCurrentManager ().unregisterMenuBar (this); +}); +Clazz_defineStatics (c$, +"$uiClassID", "MenuBarUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_declareInterface (javax.swing, "MenuElement"); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.SingleSelectionModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultSingleSelectionModel", ["javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.changeEvent = null; +this.listenerList = null; +this.index = -1; +Clazz_instantialize (this, arguments); +}, javax.swing, "DefaultSingleSelectionModel", null, javax.swing.SingleSelectionModel); +Clazz_prepareFields (c$, function () { +this.listenerList = new javax.swing.event.EventListenerList (); +}); +Clazz_overrideMethod (c$, "getSelectedIndex", +function () { +return this.index; +}); +Clazz_overrideMethod (c$, "setSelectedIndex", +function (index) { +if (this.index != index) { +this.index = index; +this.fireStateChanged (); +}}, "~N"); +Clazz_overrideMethod (c$, "clearSelection", +function () { +this.setSelectedIndex (-1); +}); +Clazz_overrideMethod (c$, "isSelected", +function () { +var ret = false; +if (this.getSelectedIndex () != -1) { +ret = true; +}return ret; +}); +Clazz_overrideMethod (c$, "addChangeListener", +function (l) { +this.listenerList.add (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_overrideMethod (c$, "removeChangeListener", +function (l) { +this.listenerList.remove (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "getChangeListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.ChangeListener); +}); +Clazz_defineMethod (c$, "fireStateChanged", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.ChangeListener) { +if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); +(listeners[i + 1]).stateChanged (this.changeEvent); +}} +}); +Clazz_defineMethod (c$, "getListeners", +function (listenerType) { +return this.listenerList.getListeners (listenerType); +}, "Class"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_declareInterface (javax.swing, "SingleSelectionModel"); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.event.WindowAdapter", "javax.swing.JMenuItem", "$.MenuElement", "javax.swing.event.ChangeListener"], "javax.swing.JMenu", ["java.lang.Error", "$.IllegalArgumentException", "java.util.Vector", "java.awt.Point", "$.Rectangle", "$.Toolkit", "javax.swing.JMenuBar", "$.JPopupMenu", "$.MenuSelectionManager", "$.SwingUtilities", "$.UIManager", "javax.swing.event.MenuEvent", "$.MenuListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.$popupMenu = null; +this.menuChangeListener = null; +this.menuEvent = null; +this.delay = 0; +this.customMenuLocation = null; +this.popupListener = null; +if (!Clazz_isClassDefined ("javax.swing.JMenu.MenuChangeListener")) { +javax.swing.JMenu.$JMenu$MenuChangeListener$ (); +} +if (!Clazz_isClassDefined ("javax.swing.JMenu.WinListener")) { +javax.swing.JMenu.$JMenu$WinListener$ (); +} +Clazz_instantialize (this, arguments); +}, javax.swing, "JMenu", javax.swing.JMenuItem, javax.swing.MenuElement); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JMenu, []); +this.init0 ("", null, -2147483648); +}); +Clazz_makeConstructor (c$, +function (s) { +Clazz_superConstructor (this, javax.swing.JMenu, []); +this.init0 (s, null, -2147483648); +}, "~S"); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, javax.swing.JMenu, []); +this.init0 ("", null, -2147483648); +this.setAction (a); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function (s, b) { +Clazz_superConstructor (this, javax.swing.JMenu, []); +this.init0 (s, null, -2147483648); +}, "~S,~B"); +Clazz_overrideMethod (c$, "initFocusability", +function () { +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +if (this.$popupMenu != null) { +this.$popupMenu.setUI (javax.swing.UIManager.getUI (this.$popupMenu)); +}}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "MenuUI"; +}); +Clazz_defineMethod (c$, "setModel", +function (newModel) { +var oldModel = this.getModel (); +Clazz_superCall (this, javax.swing.JMenu, "setModel", [newModel]); +if (oldModel != null && this.menuChangeListener != null) { +oldModel.removeChangeListener (this.menuChangeListener); +this.menuChangeListener = null; +}this.model = newModel; +if (newModel != null) { +this.menuChangeListener = this.createMenuChangeListener (); +newModel.addChangeListener (this.menuChangeListener); +}}, "javax.swing.ButtonModel"); +Clazz_overrideMethod (c$, "isSelected", +function () { +return this.getModel ().isSelected (); +}); +Clazz_overrideMethod (c$, "setSelected", +function (b) { +var model = this.getModel (); +if (b != model.isSelected ()) { +this.getModel ().setSelected (b); +}}, "~B"); +Clazz_defineMethod (c$, "isPopupMenuVisible", +function () { +this.ensurePopupMenuCreated (); +return this.$popupMenu.isVisible (); +}); +Clazz_defineMethod (c$, "setPopupMenuVisible", +function (b) { +var isVisible = this.isPopupMenuVisible (); +if (b != isVisible && (this.isEnabled () || !b)) { +this.ensurePopupMenuCreated (); +if ((b == true) && this.isShowing ()) { +var p = this.getCustomMenuLocation (); +if (p == null) { +p = this.getPopupMenuOrigin (); +}this.getPopupMenu ().show (this, p.x, p.y); +} else { +this.getPopupMenu ().setVisible (false); +}}}, "~B"); +Clazz_defineMethod (c$, "getPopupMenuOrigin", +function () { +var x = 0; +var y = 0; +var pm = this.getPopupMenu (); +var s = this.getSize (); +var pmSize = pm.getSize (); +if (pmSize.width == 0) { +pmSize = pm.getPreferredSize (); +}var position = this.getLocationOnScreen (); +var toolkit = java.awt.Toolkit.getDefaultToolkit (); +var gc = this.getGraphicsConfiguration (); +var screenBounds = new java.awt.Rectangle (toolkit.getScreenSize ()); +if (gc != null) { +screenBounds = gc.getBounds (); +var screenInsets = toolkit.getScreenInsets (gc); +screenBounds.width -= Math.abs (screenInsets.left + screenInsets.right); +screenBounds.height -= Math.abs (screenInsets.top + screenInsets.bottom); +position.x -= Math.abs (screenInsets.left); +position.y -= Math.abs (screenInsets.top); +}var parent = this.getParent (); +if (Clazz_instanceOf (parent, javax.swing.JPopupMenu)) { +var xOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetX"); +var yOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetY"); +if (javax.swing.SwingUtilities.isLeftToRight (this)) { +x = s.width + xOffset; +if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) { +x = 0 - xOffset - pmSize.width; +}} else { +x = 0 - xOffset - pmSize.width; +if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) { +x = s.width + xOffset; +}}y = yOffset; +if (position.y + y + pmSize.height >= screenBounds.height + screenBounds.y && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) { +y = s.height - yOffset - pmSize.height; +}} else { +var xOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetX"); +var yOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetY"); +if (javax.swing.SwingUtilities.isLeftToRight (this)) { +x = xOffset; +if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) { +x = s.width - xOffset - pmSize.width; +}} else { +x = s.width - xOffset - pmSize.width; +if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) { +x = xOffset; +}}y = s.height + yOffset; +if (position.y + y + pmSize.height >= screenBounds.height && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) { +y = 0 - yOffset - pmSize.height; +}}return new java.awt.Point (x, y); +}); +Clazz_defineMethod (c$, "getDelay", +function () { +return this.delay; +}); +Clazz_defineMethod (c$, "setDelay", +function (d) { +if (d < 0) throw new IllegalArgumentException ("Delay must be a positive integer"); +this.delay = d; +}, "~N"); +Clazz_defineMethod (c$, "ensurePopupMenuCreated", + function () { +if (this.$popupMenu == null) { +this.$popupMenu = new javax.swing.JPopupMenu (); +this.$popupMenu.setInvoker (this); +this.popupListener = this.createWinListener (this.$popupMenu); +}}); +Clazz_defineMethod (c$, "getCustomMenuLocation", + function () { +return this.customMenuLocation; +}); +Clazz_defineMethod (c$, "setMenuLocation", +function (x, y) { +this.customMenuLocation = new java.awt.Point (x, y); +if (this.$popupMenu != null) this.$popupMenu.setLocation (x, y); +}, "~N,~N"); +Clazz_defineMethod (c$, "add", +function (menuItem) { +this.ensurePopupMenuCreated (); +return this.$popupMenu.add (menuItem); +}, "javax.swing.JMenuItem"); +Clazz_defineMethod (c$, "add", +function (c) { +this.ensurePopupMenuCreated (); +this.$popupMenu.add (c); +return c; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "add", +function (c, index) { +this.ensurePopupMenuCreated (); +this.$popupMenu.add (c, index); +return c; +}, "java.awt.Component,~N"); +Clazz_defineMethod (c$, "add", +function (s) { +return this.add ( new javax.swing.JMenuItem (s)); +}, "~S"); +Clazz_defineMethod (c$, "add", +function (a) { +var mi = this.createActionComponent (a); +mi.setAction (a); +this.add (mi); +return mi; +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "createActionComponent", +function (a) { +var mi = ((Clazz_isClassDefined ("javax.swing.JMenu$1") ? 0 : javax.swing.JMenu.$JMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JMenu$1, this, null)); +mi.setHorizontalTextPosition (11); +mi.setVerticalTextPosition (0); +return mi; +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "createActionChangeListener", +function (b) { +return b.createActionPropertyChangeListener0 (b.getAction ()); +}, "javax.swing.JMenuItem"); +Clazz_defineMethod (c$, "addSeparator", +function () { +this.ensurePopupMenuCreated (); +this.$popupMenu.addSeparator (); +}); +Clazz_defineMethod (c$, "insert", +function (s, pos) { +if (pos < 0) { +throw new IllegalArgumentException ("index less than zero."); +}this.ensurePopupMenuCreated (); +this.$popupMenu.insert ( new javax.swing.JMenuItem (s), pos); +}, "~S,~N"); +Clazz_defineMethod (c$, "insert", +function (mi, pos) { +if (pos < 0) { +throw new IllegalArgumentException ("index less than zero."); +}this.ensurePopupMenuCreated (); +this.$popupMenu.insert (mi, pos); +return mi; +}, "javax.swing.JMenuItem,~N"); +Clazz_defineMethod (c$, "insert", +function (a, pos) { +if (pos < 0) { +throw new IllegalArgumentException ("index less than zero."); +}this.ensurePopupMenuCreated (); +var mi = new javax.swing.JMenuItem (a); +mi.setHorizontalTextPosition (11); +mi.setVerticalTextPosition (0); +this.$popupMenu.insert (mi, pos); +return mi; +}, "javax.swing.Action,~N"); +Clazz_defineMethod (c$, "insertSeparator", +function (index) { +if (index < 0) { +throw new IllegalArgumentException ("index less than zero."); +}this.ensurePopupMenuCreated (); +this.$popupMenu.insert ( new javax.swing.JPopupMenu.Separator (), index); +}, "~N"); +Clazz_defineMethod (c$, "getItem", +function (pos) { +if (pos < 0) { +throw new IllegalArgumentException ("index less than zero."); +}var c = this.getMenuComponent (pos); +if (Clazz_instanceOf (c, javax.swing.JMenuItem)) { +var mi = c; +return mi; +}return null; +}, "~N"); +Clazz_defineMethod (c$, "getItemCount", +function () { +return this.getMenuComponentCount (); +}); +Clazz_defineMethod (c$, "isTearOff", +function () { +throw new Error ("boolean isTearOff() {} not yet implemented"); +}); +Clazz_defineMethod (c$, "remove", +function (pos) { +if (pos < 0) { +throw new IllegalArgumentException ("index less than zero."); +}if (pos > this.getItemCount ()) { +throw new IllegalArgumentException ("index greater than the number of items."); +}if (this.$popupMenu != null) this.$popupMenu.remove (pos); +}, "~N"); +Clazz_defineMethod (c$, "remove", +function (c) { +if (Clazz_instanceOf (c, javax.swing.JMenuItem)) if (this.$popupMenu != null) this.$popupMenu.remove (c); +if (this.$popupMenu != null) this.$popupMenu.remove (c); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "removeAll", +function () { +if (this.$popupMenu != null) this.$popupMenu.removeAll (); +}); +Clazz_defineMethod (c$, "getMenuComponentCount", +function () { +var componentCount = 0; +if (this.$popupMenu != null) componentCount = this.$popupMenu.getComponentCount (); +return componentCount; +}); +Clazz_defineMethod (c$, "getMenuComponent", +function (n) { +if (this.$popupMenu != null) return this.$popupMenu.getComponent (n); +return null; +}, "~N"); +Clazz_defineMethod (c$, "getMenuComponents", +function () { +if (this.$popupMenu != null) return this.$popupMenu.getComponents (); +return new Array (0); +}); +Clazz_defineMethod (c$, "isTopLevelMenu", +function () { +if (Clazz_instanceOf (this.getParent (), javax.swing.JMenuBar)) return true; +return false; +}); +Clazz_defineMethod (c$, "isMenuComponent", +function (c) { +if (c === this) return true; +if (Clazz_instanceOf (c, javax.swing.JPopupMenu)) { +var comp = c; +if (comp === this.getPopupMenu ()) return true; +}var ncomponents = this.getMenuComponentCount (); +var component = this.getMenuComponents (); +for (var i = 0; i < ncomponents; i++) { +var comp = component[i]; +if (comp === c) return true; +if (Clazz_instanceOf (comp, javax.swing.JMenu)) { +var subMenu = comp; +if (subMenu.isMenuComponent (c)) return true; +}} +return false; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getPopupMenu", +function () { +this.ensurePopupMenuCreated (); +return this.$popupMenu; +}); +Clazz_defineMethod (c$, "addMenuListener", +function (l) { +this.listenerList.add (javax.swing.event.MenuListener, l); +}, "javax.swing.event.MenuListener"); +Clazz_defineMethod (c$, "removeMenuListener", +function (l) { +this.listenerList.remove (javax.swing.event.MenuListener, l); +}, "javax.swing.event.MenuListener"); +Clazz_defineMethod (c$, "getMenuListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.MenuListener); +}); +Clazz_defineMethod (c$, "fireMenuSelected", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuListener) { +if (listeners[i + 1] == null) { +throw new Error (this.getText () + " has a NULL Listener!! " + i); +} else { +if (this.menuEvent == null) this.menuEvent = new javax.swing.event.MenuEvent (this); +(listeners[i + 1]).menuSelected (this.menuEvent); +}}} +}); +Clazz_defineMethod (c$, "fireMenuDeselected", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuListener) { +if (listeners[i + 1] == null) { +throw new Error (this.getText () + " has a NULL Listener!! " + i); +} else { +if (this.menuEvent == null) this.menuEvent = new javax.swing.event.MenuEvent (this); +(listeners[i + 1]).menuDeselected (this.menuEvent); +}}} +}); +Clazz_defineMethod (c$, "fireMenuCanceled", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuListener) { +if (listeners[i + 1] == null) { +throw new Error (this.getText () + " has a NULL Listener!! " + i); +} else { +if (this.menuEvent == null) this.menuEvent = new javax.swing.event.MenuEvent (this); +(listeners[i + 1]).menuCanceled (this.menuEvent); +}}} +}); +Clazz_overrideMethod (c$, "configureAcceleratorFromAction", +function (a) { +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "createMenuChangeListener", + function () { +return Clazz_innerTypeInstance (javax.swing.JMenu.MenuChangeListener, this, null); +}); +Clazz_defineMethod (c$, "createWinListener", +function (p) { +return Clazz_innerTypeInstance (javax.swing.JMenu.WinListener, this, null, p); +}, "javax.swing.JPopupMenu"); +Clazz_overrideMethod (c$, "menuSelectionChanged", +function (isIncluded) { +this.setSelected (isIncluded); +}, "~B"); +Clazz_overrideMethod (c$, "getSubElements", +function () { +if (this.$popupMenu == null) return new Array (0); + else { +var result = new Array (1); +result[0] = this.$popupMenu; +return result; +}}); +Clazz_defineMethod (c$, "getComponent", +function () { +return this; +}); +Clazz_defineMethod (c$, "applyComponentOrientation", +function (o) { +Clazz_superCall (this, javax.swing.JMenu, "applyComponentOrientation", [o]); +if (this.$popupMenu != null) { +var ncomponents = this.getMenuComponentCount (); +for (var i = 0; i < ncomponents; ++i) { +this.getMenuComponent (i).applyComponentOrientation (o); +} +this.$popupMenu.setComponentOrientation (o); +}}, "java.awt.ComponentOrientation"); +Clazz_defineMethod (c$, "setComponentOrientation", +function (o) { +Clazz_superCall (this, javax.swing.JMenu, "setComponentOrientation", [o]); +if (this.$popupMenu != null) { +this.$popupMenu.setComponentOrientation (o); +}}, "java.awt.ComponentOrientation"); +Clazz_overrideMethod (c$, "setAccelerator", +function (keyStroke) { +throw new Error ("setAccelerator() is not defined for JMenu. Use setMnemonic() instead."); +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "processKeyEvent", +function (evt) { +javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt); +if (evt.isConsumed ()) return; +Clazz_superCall (this, javax.swing.JMenu, "processKeyEvent", [evt]); +}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "doClick", +function (pressTime) { +var me = this.buildMenuElementArray (this); +javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me); +}, "~N"); +Clazz_defineMethod (c$, "buildMenuElementArray", + function (leaf) { +var elements = new java.util.Vector (); +var current = leaf.getPopupMenu (); +var pop; +var menu; +var bar; +while (true) { +if (Clazz_instanceOf (current, javax.swing.JPopupMenu)) { +pop = current; +elements.insertElementAt (pop, 0); +current = pop.getInvoker (); +} else if (Clazz_instanceOf (current, javax.swing.JMenu)) { +menu = current; +elements.insertElementAt (menu, 0); +current = menu.getParent (); +} else if (Clazz_instanceOf (current, javax.swing.JMenuBar)) { +bar = current; +elements.insertElementAt (bar, 0); +var me = new Array (elements.size ()); +elements.copyInto (me); +return me; +}} +}, "javax.swing.JMenu"); +c$.$JMenu$MenuChangeListener$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +this.isSelected = false; +Clazz_instantialize (this, arguments); +}, javax.swing.JMenu, "MenuChangeListener", null, javax.swing.event.ChangeListener); +Clazz_overrideMethod (c$, "stateChanged", +function (a) { +var b = a.getSource (); +var c = b.isSelected (); +if (c != this.isSelected) { +if (c == true) { +this.b$["javax.swing.JMenu"].fireMenuSelected (); +} else { +this.b$["javax.swing.JMenu"].fireMenuDeselected (); +}this.isSelected = c; +}}, "javax.swing.event.ChangeEvent"); +c$ = Clazz_p0p (); +}; +c$.$JMenu$WinListener$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +Clazz_prepareCallback (this, arguments); +this.popupMenu = null; +Clazz_instantialize (this, arguments); +}, javax.swing.JMenu, "WinListener", java.awt.event.WindowAdapter); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, javax.swing.JMenu.WinListener, []); +this.popupMenu = a; +}, "javax.swing.JPopupMenu"); +Clazz_overrideMethod (c$, "windowClosing", +function (a) { +this.b$["javax.swing.JMenu"].setSelected (false); +}, "java.awt.event.WindowEvent"); +c$ = Clazz_p0p (); +}; +c$.$JMenu$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (javax.swing, "JMenu$1", javax.swing.JMenuItem); +Clazz_defineMethod (c$, "createActionPropertyChangeListener", +function (a) { +var pcl = this.b$["javax.swing.JMenu"].createActionChangeListener (this); +if (pcl == null) { +pcl = Clazz_superCall (this, javax.swing.JMenu$1, "createActionPropertyChangeListener", [a]); +}return pcl; +}, "javax.swing.Action"); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"$$uiClassID", "MenuUI"); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.event.WindowAdapter", null, function () { +c$ = Clazz_declareType (java.awt.event, "WindowAdapter", null, [java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.awt.event.WindowFocusListener]); +Clazz_overrideMethod (c$, "windowOpened", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowClosing", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowClosed", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowIconified", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowDeiconified", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowActivated", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowDeactivated", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowStateChanged", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowGainedFocus", +function (e) { +}, "java.awt.event.WindowEvent"); +Clazz_overrideMethod (c$, "windowLostFocus", +function (e) { +}, "java.awt.event.WindowEvent"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.event.FocusListener", "javax.swing.AbstractButton", "$.MenuElement"], "javax.swing.JMenuItem", ["java.lang.Boolean", "javax.swing.DefaultButtonModel", "$.UIManager", "javax.swing.event.MenuDragMouseEvent", "$.MenuDragMouseListener", "$.MenuKeyEvent", "$.MenuKeyListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.isMouseDragged = false; +this.accelerator = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JMenuItem", javax.swing.AbstractButton, javax.swing.MenuElement); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JMenuItem, []); +this.init0 (null, null, -2147483648); +}); +Clazz_makeConstructor (c$, +function (icon) { +Clazz_superConstructor (this, javax.swing.JMenuItem, []); +this.init0 (null, icon, -2147483648); +}, "javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text) { +Clazz_superConstructor (this, javax.swing.JMenuItem, []); +this.init0 (text, null, -2147483648); +}, "~S"); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, javax.swing.JMenuItem, []); +this.init0 (null, null, -2147483648); +this.setAction (a); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function (text, icon) { +Clazz_superConstructor (this, javax.swing.JMenuItem, []); +this.init0 (text, icon, -2147483648); +}, "~S,javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text, mnemonic) { +Clazz_superConstructor (this, javax.swing.JMenuItem, []); +this.init0 (text, null, mnemonic); +}, "~S,~N"); +Clazz_defineMethod (c$, "setModel", +function (newModel) { +Clazz_superCall (this, javax.swing.JMenuItem, "setModel", [newModel]); +if (Clazz_instanceOf (newModel, javax.swing.DefaultButtonModel)) { +(newModel).setMenuItem (true); +}}, "javax.swing.ButtonModel"); +Clazz_defineMethod (c$, "initFocusability", +function () { +this.setFocusable (false); +}); +Clazz_defineMethod (c$, "init0", +function (text, icon, mnemonic) { +this.setModel ( new javax.swing.DefaultButtonModel ()); +this.init (text, icon); +if (mnemonic >= 0) this.setMnemonic (mnemonic); +this.initFocusability (); +}, "~S,javax.swing.Icon,~N"); +Clazz_overrideMethod (c$, "init", +function (text, icon) { +this.updateUI (); +if (text != null) this.setText (text); +if (icon != null) this.setIcon (icon); +this.addFocusListener ( new javax.swing.JMenuItem.MenuItemFocusListener ()); +this.setUIProperty ("borderPainted", Boolean.FALSE); +this.setFocusPainted (false); +this.setHorizontalTextPosition (11); +this.setHorizontalAlignment (10); +}, "~S,javax.swing.Icon"); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "MenuItemUI"; +}); +Clazz_defineMethod (c$, "setArmed", +function (b) { +var model = this.getModel (); +if (model.isArmed () != b) { +model.setArmed (b); +}}, "~B"); +Clazz_defineMethod (c$, "isArmed", +function () { +var model = this.getModel (); +return model.isArmed (); +}); +Clazz_defineMethod (c$, "setEnabled", +function (b) { +if (!b && !javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) { +this.setArmed (false); +}Clazz_superCall (this, javax.swing.JMenuItem, "setEnabled", [b]); +}, "~B"); +Clazz_overrideMethod (c$, "alwaysOnTop", +function () { +return true; +}); +Clazz_defineMethod (c$, "setAccelerator", +function (keyStroke) { +var oldAccelerator = this.accelerator; +this.accelerator = keyStroke; +this.repaint (); +this.revalidate (); +this.firePropertyChangeObject ("accelerator", oldAccelerator, this.accelerator); +}, "javax.swing.KeyStroke"); +Clazz_defineMethod (c$, "getAccelerator", +function () { +return this.accelerator; +}); +Clazz_defineMethod (c$, "configurePropertiesFromAction", +function (a) { +Clazz_superCall (this, javax.swing.JMenuItem, "configurePropertiesFromAction", [a]); +this.configureAcceleratorFromAction (a); +}, "javax.swing.Action"); +Clazz_overrideMethod (c$, "setIconFromAction", +function (a) { +var icon = null; +if (a != null) { +icon = a.getValue ("SmallIcon"); +}this.setIcon (icon); +}, "javax.swing.Action"); +Clazz_overrideMethod (c$, "largeIconChanged", +function (a) { +}, "javax.swing.Action"); +Clazz_overrideMethod (c$, "smallIconChanged", +function (a) { +this.setIconFromAction (a); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "configureAcceleratorFromAction", +function (a) { +var ks = (a == null) ? null : a.getValue ("AcceleratorKey"); +this.setAccelerator (ks); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "actionPropertyChanged", +function (action, propertyName) { +if (propertyName === "AcceleratorKey") { +this.configureAcceleratorFromAction (action); +} else { +Clazz_superCall (this, javax.swing.JMenuItem, "actionPropertyChanged", [action, propertyName]); +}}, "javax.swing.Action,~S"); +Clazz_defineMethod (c$, "processMouseEvent", +function (e, path, manager) { +this.processMenuDragMouseEvent ( new javax.swing.event.MenuDragMouseEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getX (), e.getY (), e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), path, manager)); +}, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager"); +Clazz_defineMethod (c$, "processKeyEvent", +function (e, path, manager) { +var mke = new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager); +this.processMenuKeyEvent (mke); +if (mke.isConsumed ()) { +e.consume (); +}}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager"); +Clazz_defineMethod (c$, "processMenuDragMouseEvent", +function (e) { +switch (e.getID ()) { +case 504: +this.isMouseDragged = false; +this.fireMenuDragMouseEntered (e); +break; +case 505: +this.isMouseDragged = false; +this.fireMenuDragMouseExited (e); +break; +case 506: +this.isMouseDragged = true; +this.fireMenuDragMouseDragged (e); +break; +case 502: +if (this.isMouseDragged) this.fireMenuDragMouseReleased (e); +break; +default: +break; +} +}, "javax.swing.event.MenuDragMouseEvent"); +Clazz_defineMethod (c$, "processMenuKeyEvent", +function (e) { +switch (e.getID ()) { +case 401: +this.fireMenuKeyPressed (e); +break; +case 402: +this.fireMenuKeyReleased (e); +break; +case 400: +this.fireMenuKeyTyped (e); +break; +default: +break; +} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_defineMethod (c$, "fireMenuDragMouseEntered", +function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuDragMouseListener) { +(listeners[i + 1]).menuDragMouseEntered (event); +}} +}, "javax.swing.event.MenuDragMouseEvent"); +Clazz_defineMethod (c$, "fireMenuDragMouseExited", +function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuDragMouseListener) { +(listeners[i + 1]).menuDragMouseExited (event); +}} +}, "javax.swing.event.MenuDragMouseEvent"); +Clazz_defineMethod (c$, "fireMenuDragMouseDragged", +function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuDragMouseListener) { +(listeners[i + 1]).menuDragMouseDragged (event); +}} +}, "javax.swing.event.MenuDragMouseEvent"); +Clazz_defineMethod (c$, "fireMenuDragMouseReleased", +function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuDragMouseListener) { +(listeners[i + 1]).menuDragMouseReleased (event); +}} +}, "javax.swing.event.MenuDragMouseEvent"); +Clazz_defineMethod (c$, "fireMenuKeyPressed", +function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuKeyListener) { +(listeners[i + 1]).menuKeyPressed (event); +}} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_defineMethod (c$, "fireMenuKeyReleased", +function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuKeyListener) { +(listeners[i + 1]).menuKeyReleased (event); +}} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_defineMethod (c$, "fireMenuKeyTyped", +function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuKeyListener) { +(listeners[i + 1]).menuKeyTyped (event); +}} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_overrideMethod (c$, "menuSelectionChanged", +function (isIncluded) { +this.setArmed (isIncluded); +}, "~B"); +Clazz_overrideMethod (c$, "getSubElements", +function () { +return new Array (0); +}); +Clazz_defineMethod (c$, "getComponent", +function () { +return this; +}); +Clazz_defineMethod (c$, "addMenuDragMouseListener", +function (l) { +this.listenerList.add (javax.swing.event.MenuDragMouseListener, l); +}, "javax.swing.event.MenuDragMouseListener"); +Clazz_defineMethod (c$, "removeMenuDragMouseListener", +function (l) { +this.listenerList.remove (javax.swing.event.MenuDragMouseListener, l); +}, "javax.swing.event.MenuDragMouseListener"); +Clazz_defineMethod (c$, "getMenuDragMouseListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.MenuDragMouseListener); +}); +Clazz_defineMethod (c$, "addMenuKeyListener", +function (l) { +this.listenerList.add (javax.swing.event.MenuKeyListener, l); +}, "javax.swing.event.MenuKeyListener"); +Clazz_defineMethod (c$, "removeMenuKeyListener", +function (l) { +this.listenerList.remove (javax.swing.event.MenuKeyListener, l); +}, "javax.swing.event.MenuKeyListener"); +Clazz_defineMethod (c$, "getMenuKeyListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.MenuKeyListener); +}); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.JMenuItem, "MenuItemFocusListener", null, java.awt.event.FocusListener); +Clazz_overrideMethod (c$, "focusGained", +function (a) { +}, "java.awt.event.FocusEvent"); +Clazz_overrideMethod (c$, "focusLost", +function (a) { +var b = a.getSource (); +if (b.isFocusPainted ()) { +b.repaint (); +}}, "java.awt.event.FocusEvent"); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"$uiClassID", "MenuItemUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JMenuItem", "$.SwingConstants"], "javax.swing.JCheckBoxMenuItem", ["javax.swing.JToggleButton"], function () { +c$ = Clazz_declareType (javax.swing, "JCheckBoxMenuItem", javax.swing.JMenuItem, javax.swing.SwingConstants); +Clazz_makeConstructor (c$, +function () { +this.construct (null, null, false); +}); +Clazz_makeConstructor (c$, +function (icon) { +this.construct (null, icon, false); +}, "javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text) { +this.construct (text, null, false); +}, "~S"); +Clazz_makeConstructor (c$, +function (a) { +this.construct (); +this.setAction (a); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function (text, icon) { +this.construct (text, icon, false); +}, "~S,javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text, b) { +this.construct (text, null, b); +}, "~S,~B"); +Clazz_makeConstructor (c$, +function (text, icon, b) { +Clazz_superConstructor (this, javax.swing.JCheckBoxMenuItem, [text, icon]); +this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ()); +this.setSelected (b); +this.setFocusable (false); +}, "~S,javax.swing.Icon,~B"); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "CheckBoxMenuItemUI"; +}); +Clazz_defineMethod (c$, "getState", +function () { +return this.isSelected (); +}); +Clazz_defineMethod (c$, "setState", +function (b) { +this.setSelected (b); +}, "~B"); +Clazz_overrideMethod (c$, "getSelectedObjects", +function () { +if (this.isSelected () == false) return null; +var selectedObjects = new Array (1); +selectedObjects[0] = this.getText (); +return selectedObjects; +}); +Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", +function () { +return true; +}); +Clazz_defineStatics (c$, +"$$uiClassID", "CheckBoxMenuItemUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JMenuItem"], "javax.swing.JRadioButtonMenuItem", ["javax.swing.JToggleButton"], function () { +c$ = Clazz_declareType (javax.swing, "JRadioButtonMenuItem", javax.swing.JMenuItem); +Clazz_makeConstructor (c$, +function () { +this.construct (null, null, false); +}); +Clazz_makeConstructor (c$, +function (icon) { +this.construct (null, icon, false); +}, "javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text) { +this.construct (text, null, false); +}, "~S"); +Clazz_makeConstructor (c$, +function (a) { +this.construct (); +this.setAction (a); +}, "javax.swing.Action"); +Clazz_makeConstructor (c$, +function (text, icon) { +this.construct (text, icon, false); +}, "~S,javax.swing.Icon"); +Clazz_makeConstructor (c$, +function (text, selected) { +this.construct (text); +this.setSelected (selected); +}, "~S,~B"); +Clazz_makeConstructor (c$, +function (icon, selected) { +this.construct (null, icon, selected); +}, "javax.swing.Icon,~B"); +Clazz_makeConstructor (c$, +function (text, icon, selected) { +Clazz_superConstructor (this, javax.swing.JRadioButtonMenuItem, [text, icon]); +this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ()); +this.setSelected (selected); +this.setFocusable (false); +}, "~S,javax.swing.Icon,~B"); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "RadioButtonMenuItemUI"; +}); +Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", +function () { +return true; +}); +Clazz_defineStatics (c$, +"$$uiClassID", "RadioButtonMenuItemUI"); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuDragMouseListener", null, function () { +Clazz_declareInterface (javax.swing.event, "MenuDragMouseListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.awt.event.KeyEvent"], "javax.swing.event.MenuKeyEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.path = null; +this.manager = null; +Clazz_instantialize (this, arguments); +}, javax.swing.event, "MenuKeyEvent", java.awt.event.KeyEvent); +Clazz_makeConstructor (c$, +function (source, id, when, modifiers, keyCode, keyChar, p, m) { +Clazz_superConstructor (this, javax.swing.event.MenuKeyEvent, [source, id, when, modifiers, keyCode, keyChar]); +this.path = p; +this.manager = m; +}, "java.awt.Component,~N,~N,~N,~N,~S,~A,javax.swing.MenuSelectionManager"); +Clazz_defineMethod (c$, "getPath", +function () { +return this.path; +}); +Clazz_defineMethod (c$, "getMenuSelectionManager", +function () { +return this.manager; +}); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuKeyListener", null, function () { +Clazz_declareInterface (javax.swing.event, "MenuKeyListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JComponent", "$.JSeparator", "$.MenuElement"], "javax.swing.JPopupMenu", ["java.lang.Boolean", "$.IllegalArgumentException", "java.util.Vector", "java.awt.Dimension", "$.Frame", "$.GraphicsEnvironment", "$.Insets", "$.Point", "javax.swing.DefaultSingleSelectionModel", "$.JMenu", "$.JMenuItem", "$.MenuSelectionManager", "$.PopupFactory", "$.SwingUtilities", "$.UIManager", "javax.swing.event.MenuKeyEvent", "$.MenuKeyListener", "$.PopupMenuEvent", "$.PopupMenuListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.invoker = null; +this.popup = null; +this.frame = null; +this.desiredLocationX = 0; +this.desiredLocationY = 0; +this.label = null; +this.$paintBorder = true; +this.margin = null; +this.lightWeightPopup = true; +this.selectionModel = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JPopupMenu", javax.swing.JComponent, javax.swing.MenuElement); +c$.setDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "setDefaultLightWeightPopupEnabled", +function (aFlag) { +javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.$valueOf (aFlag)); +}, "~B"); +c$.getDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "getDefaultLightWeightPopupEnabled", +function () { +var b = javax.swing.SwingUtilities.appContextGet (javax.swing.JPopupMenu.defaultLWPopupEnabledKey); +if (b == null) { +javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.TRUE); +return true; +}return b.booleanValue (); +}); +Clazz_makeConstructor (c$, +function () { +this.construct (null); +}); +Clazz_makeConstructor (c$, +function (label) { +Clazz_superConstructor (this, javax.swing.JPopupMenu, []); +this.label = label; +this.lightWeightPopup = javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled (); +this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ()); +this.enableEvents (16); +this.updateUI (); +}, "~S"); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "PopupMenuUI"; +}); +Clazz_defineMethod (c$, "processKeyEvent", +function (evt) { +javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt); +if (evt.isConsumed ()) { +return; +}Clazz_superCall (this, javax.swing.JPopupMenu, "processKeyEvent", [evt]); +}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "getSelectionModel", +function () { +return this.selectionModel; +}); +Clazz_defineMethod (c$, "setSelectionModel", +function (model) { +this.selectionModel = model; +}, "javax.swing.SingleSelectionModel"); +Clazz_defineMethod (c$, "add", +function (menuItem) { +Clazz_superCall (this, javax.swing.JPopupMenu, "add", [menuItem]); +return menuItem; +}, "javax.swing.JMenuItem"); +Clazz_defineMethod (c$, "add", +function (s) { +return this.add ( new javax.swing.JMenuItem (s)); +}, "~S"); +Clazz_defineMethod (c$, "add", +function (a) { +var mi = this.createActionComponent (a); +mi.setAction (a); +this.add (mi); +return mi; +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "adjustPopupLocationToFitScreen", +function (xposition, yposition) { +var p = new java.awt.Point (xposition, yposition); +if (javax.swing.JPopupMenu.popupPostionFixDisabled == true || java.awt.GraphicsEnvironment.isHeadless ()) return p; +return p; +}, "~N,~N"); +Clazz_defineMethod (c$, "createActionComponent", +function (a) { +var mi = ((Clazz_isClassDefined ("javax.swing.JPopupMenu$1") ? 0 : javax.swing.JPopupMenu.$JPopupMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JPopupMenu$1, this, null)); +mi.setHorizontalTextPosition (11); +mi.setVerticalTextPosition (0); +return mi; +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "createActionChangeListener", +function (b) { +return b.createActionPropertyChangeListener0 (b.getAction ()); +}, "javax.swing.JMenuItem"); +Clazz_defineMethod (c$, "remove", +function (pos) { +if (pos < 0) { +throw new IllegalArgumentException ("index less than zero."); +}if (pos > this.getComponentCount () - 1) { +throw new IllegalArgumentException ("index greater than the number of items."); +}Clazz_superCall (this, javax.swing.JPopupMenu, "remove", [pos]); +}, "~N"); +Clazz_defineMethod (c$, "setLightWeightPopupEnabled", +function (aFlag) { +this.lightWeightPopup = aFlag; +}, "~B"); +Clazz_defineMethod (c$, "isLightWeightPopupEnabled", +function () { +return this.lightWeightPopup; +}); +Clazz_defineMethod (c$, "getLabel", +function () { +return this.label; +}); +Clazz_defineMethod (c$, "setLabel", +function (label) { +var oldValue = this.label; +this.label = label; +this.firePropertyChangeObject ("label", oldValue, label); +this.invalidate (); +this.repaint (); +}, "~S"); +Clazz_defineMethod (c$, "addSeparator", +function () { +this.add ( new javax.swing.JPopupMenu.Separator ()); +}); +Clazz_defineMethod (c$, "insert", +function (a, index) { +var mi = this.createActionComponent (a); +mi.setAction (a); +this.insert (mi, index); +}, "javax.swing.Action,~N"); +Clazz_defineMethod (c$, "insert", +function (component, index) { +if (index < 0) { +throw new IllegalArgumentException ("index less than zero."); +}var nitems = this.getComponentCount (); +var tempItems = new java.util.Vector (); +for (var i = index; i < nitems; i++) { +tempItems.addElement (this.getComponent (index)); +this.remove (index); +} +this.add (component); +for (var i = 0; i < tempItems.size (); i++) { +this.add (tempItems.elementAt (i)); +} +}, "java.awt.Component,~N"); +Clazz_defineMethod (c$, "addPopupMenuListener", +function (l) { +this.listenerList.add (javax.swing.event.PopupMenuListener, l); +}, "javax.swing.event.PopupMenuListener"); +Clazz_defineMethod (c$, "removePopupMenuListener", +function (l) { +this.listenerList.remove (javax.swing.event.PopupMenuListener, l); +}, "javax.swing.event.PopupMenuListener"); +Clazz_defineMethod (c$, "getPopupMenuListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.PopupMenuListener); +}); +Clazz_defineMethod (c$, "addMenuKeyListener", +function (l) { +this.listenerList.add (javax.swing.event.MenuKeyListener, l); +}, "javax.swing.event.MenuKeyListener"); +Clazz_defineMethod (c$, "removeMenuKeyListener", +function (l) { +this.listenerList.remove (javax.swing.event.MenuKeyListener, l); +}, "javax.swing.event.MenuKeyListener"); +Clazz_defineMethod (c$, "getMenuKeyListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.MenuKeyListener); +}); +Clazz_defineMethod (c$, "firePopupMenuWillBecomeVisible", +function () { +var listeners = this.listenerList.getListenerList (); +var e = null; +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.PopupMenuListener) { +if (e == null) e = new javax.swing.event.PopupMenuEvent (this); +(listeners[i + 1]).popupMenuWillBecomeVisible (e); +}} +}); +Clazz_defineMethod (c$, "firePopupMenuWillBecomeInvisible", +function () { +var listeners = this.listenerList.getListenerList (); +var e = null; +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.PopupMenuListener) { +if (e == null) e = new javax.swing.event.PopupMenuEvent (this); +(listeners[i + 1]).popupMenuWillBecomeInvisible (e); +}} +}); +Clazz_defineMethod (c$, "firePopupMenuCanceled", +function () { +var listeners = this.listenerList.getListenerList (); +var e = null; +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.PopupMenuListener) { +if (e == null) e = new javax.swing.event.PopupMenuEvent (this); +(listeners[i + 1]).popupMenuCanceled (e); +}} +}); +Clazz_overrideMethod (c$, "alwaysOnTop", +function () { +return true; +}); +Clazz_defineMethod (c$, "pack", +function () { +if (this.popup != null) { +var pref = this.getPreferredSize (); +if (pref == null || pref.width != this.getWidth () || pref.height != this.getHeight ()) { +this.popup = this.getPopup (); +} else { +this.validate (); +}}}); +Clazz_overrideMethod (c$, "setVisible", +function (b) { +if (b == this.isVisible ()) return; +if (b == false) { +var doCanceled = this.getClientProperty ("JPopupMenu.firePopupMenuCanceled"); +if (doCanceled != null && doCanceled === Boolean.TRUE) { +this.putClientProperty ("JPopupMenu.firePopupMenuCanceled", Boolean.FALSE); +this.firePopupMenuCanceled (); +}this.getSelectionModel ().clearSelection (); +} else { +if (this.isPopupMenu ()) { +var me = new Array (1); +me[0] = this; +javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me); +}}if (b) { +this.firePopupMenuWillBecomeVisible (); +this.popup = this.getPopup (); +this.firePropertyChangeObject ("visible", Boolean.FALSE, Boolean.TRUE); +} else if (this.popup != null) { +this.firePopupMenuWillBecomeInvisible (); +this.popup.hide (); +this.popup = null; +this.firePropertyChangeObject ("visible", Boolean.TRUE, Boolean.FALSE); +if (this.isPopupMenu ()) { +javax.swing.MenuSelectionManager.defaultManager ().clearSelectedPath (); +}}}, "~B"); +Clazz_defineMethod (c$, "getPopup", + function () { +var oldPopup = this.popup; +if (oldPopup != null) { +oldPopup.hide (); +}var popupFactory = javax.swing.PopupFactory.getSharedInstance (); +if (this.isLightWeightPopupEnabled ()) { +popupFactory.setPopupType (0); +} else { +popupFactory.setPopupType (1); +}var p = this.adjustPopupLocationToFitScreen (this.desiredLocationX, this.desiredLocationY); +this.desiredLocationX = p.x; +this.desiredLocationY = p.y; +var newPopup = this.getUI ().getPopup (this, this.desiredLocationX, this.desiredLocationY); +popupFactory.setPopupType (0); +newPopup.show (); +return newPopup; +}); +Clazz_overrideMethod (c$, "isVisible", +function () { +if (this.popup != null) return true; + else return false; +}); +Clazz_defineMethod (c$, "setLocation", +function (x, y) { +var oldX = this.desiredLocationX; +var oldY = this.desiredLocationY; +this.desiredLocationX = x; +this.desiredLocationY = y; +if (this.popup != null && (x != oldX || y != oldY)) { +this.popup = this.getPopup (); +}}, "~N,~N"); +Clazz_defineMethod (c$, "isPopupMenu", + function () { +return ((this.invoker != null) && !(Clazz_instanceOf (this.invoker, javax.swing.JMenu))); +}); +Clazz_defineMethod (c$, "getInvoker", +function () { +return this.invoker; +}); +Clazz_defineMethod (c$, "setInvoker", +function (invoker) { +var oldInvoker = this.invoker; +this.invoker = invoker; +if ((oldInvoker !== this.invoker) && (this.ui != null)) { +this.ui.uninstallUI (this); +this.ui.installUI (this); +}this.invalidate (); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "show", +function (invoker, x, y) { +this.setInvoker (invoker); +var newFrame = javax.swing.JPopupMenu.getFrame (invoker); +if (newFrame !== this.frame) { +if (newFrame != null) { +this.frame = newFrame; +if (this.popup != null) { +this.setVisible (false); +}}}var invokerOrigin; +if (invoker != null) { +invokerOrigin = invoker.getLocationOnScreen (); +var lx; +var ly; +lx = (invokerOrigin.x) + (x); +ly = (invokerOrigin.y) + (y); +if (lx > 2147483647) lx = 2147483647; +if (lx < -2147483648) lx = -2147483648; +if (ly > 2147483647) ly = 2147483647; +if (ly < -2147483648) ly = -2147483648; +this.setLocation (lx, ly); +} else { +this.setLocation (x, y); +}this.setVisible (true); +}, "java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getRootPopupMenu", +function () { +var mp = this; +while ((mp != null) && (mp.isPopupMenu () != true) && (mp.getInvoker () != null) && (mp.getInvoker ().getParent () != null) && (Clazz_instanceOf (mp.getInvoker ().getParent (), javax.swing.JPopupMenu))) { +mp = mp.getInvoker ().getParent (); +} +return mp; +}); +Clazz_defineMethod (c$, "getComponentAtIndex", +function (i) { +return this.getComponent (i); +}, "~N"); +Clazz_defineMethod (c$, "getComponentIndex", +function (c) { +var ncomponents = this.getComponentCount (); +var component = this.getComponents (); +for (var i = 0; i < ncomponents; i++) { +var comp = component[i]; +if (comp === c) return i; +} +return -1; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "setPopupSize", +function (d) { +var oldSize = this.getPreferredSize (); +this.setPreferredSize (d); +if (this.popup != null) { +var newSize = this.getPreferredSize (); +if (!oldSize.equals (newSize)) { +this.popup = this.getPopup (); +}}}, "java.awt.Dimension"); +Clazz_defineMethod (c$, "setPopupSize", +function (width, height) { +this.setPopupSize ( new java.awt.Dimension (width, height)); +}, "~N,~N"); +Clazz_defineMethod (c$, "setSelected", +function (sel) { +var model = this.getSelectionModel (); +var index = this.getComponentIndex (sel); +model.setSelectedIndex (index); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "isBorderPainted", +function () { +return this.$paintBorder; +}); +Clazz_defineMethod (c$, "setBorderPainted", +function (b) { +this.$paintBorder = b; +this.repaint (); +}, "~B"); +Clazz_defineMethod (c$, "paintBorder", +function (g) { +if (this.isBorderPainted ()) { +Clazz_superCall (this, javax.swing.JPopupMenu, "paintBorder", [g]); +}}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "getMargin", +function () { +if (this.margin == null) { +return new java.awt.Insets (0, 0, 0, 0); +} else { +return this.margin; +}}); +Clazz_defineMethod (c$, "isSubPopupMenu", +function (popup) { +var ncomponents = this.getComponentCount (); +var component = this.getComponents (); +for (var i = 0; i < ncomponents; i++) { +var comp = component[i]; +if (Clazz_instanceOf (comp, javax.swing.JMenu)) { +var menu = comp; +var subPopup = menu.getPopupMenu (); +if (subPopup === popup) return true; +if (subPopup.isSubPopupMenu (popup)) return true; +}} +return false; +}, "javax.swing.JPopupMenu"); +c$.getFrame = Clazz_defineMethod (c$, "getFrame", + function (c) { +var w = c; +while (!(Clazz_instanceOf (w, java.awt.Frame)) && (w != null)) { +w = w.getParent (); +} +return w; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "paramString", +function () { +var labelString = (this.label != null ? this.label : ""); +var paintBorderString = (this.$paintBorder ? "true" : "false"); +var marginString = (this.margin != null ? this.margin.toString () : ""); +var lightWeightPopupEnabledString = (this.isLightWeightPopupEnabled () ? "true" : "false"); +return Clazz_superCall (this, javax.swing.JPopupMenu, "paramString", []) + ",desiredLocationX=" + this.desiredLocationX + ",desiredLocationY=" + this.desiredLocationY + ",label=" + labelString + ",lightWeightPopupEnabled=" + lightWeightPopupEnabledString + ",margin=" + marginString + ",paintBorder=" + paintBorderString; +}); +Clazz_defineMethod (c$, "processMouseEvent", +function (event, path, manager) { +}, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager"); +Clazz_defineMethod (c$, "processKeyEvent", +function (e, path, manager) { +var mke = new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager); +this.processMenuKeyEvent (mke); +if (mke.isConsumed ()) { +e.consume (); +}}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager"); +Clazz_defineMethod (c$, "processMenuKeyEvent", + function (e) { +switch (e.getID ()) { +case 401: +this.fireMenuKeyPressed (e); +break; +case 402: +this.fireMenuKeyReleased (e); +break; +case 400: +this.fireMenuKeyTyped (e); +break; +default: +break; +} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_defineMethod (c$, "fireMenuKeyPressed", + function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuKeyListener) { +(listeners[i + 1]).menuKeyPressed (event); +}} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_defineMethod (c$, "fireMenuKeyReleased", + function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuKeyListener) { +(listeners[i + 1]).menuKeyReleased (event); +}} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_defineMethod (c$, "fireMenuKeyTyped", + function (event) { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.MenuKeyListener) { +(listeners[i + 1]).menuKeyTyped (event); +}} +}, "javax.swing.event.MenuKeyEvent"); +Clazz_overrideMethod (c$, "menuSelectionChanged", +function (isIncluded) { +if (Clazz_instanceOf (this.invoker, javax.swing.JMenu)) { +var m = this.invoker; +if (isIncluded) m.setPopupMenuVisible (true); + else m.setPopupMenuVisible (false); +}if (this.isPopupMenu () && !isIncluded) this.setVisible (false); +}, "~B"); +Clazz_overrideMethod (c$, "getSubElements", +function () { +var result; +var tmp = new java.util.Vector (); +var c = this.getComponentCount (); +var i; +var m; +for (i = 0; i < c; i++) { +m = this.getComponent (i); +if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m); +} +result = new Array (tmp.size ()); +for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i); + +return result; +}); +Clazz_defineMethod (c$, "getComponent", +function () { +return this; +}); +Clazz_defineMethod (c$, "isPopupTrigger", +function (e) { +return this.getUI ().isPopupTrigger (e); +}, "java.awt.event.MouseEvent"); +c$.$JPopupMenu$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (javax.swing, "JPopupMenu$1", javax.swing.JMenuItem); +Clazz_defineMethod (c$, "createActionPropertyChangeListener", +function (a) { +var pcl = this.b$["javax.swing.JPopupMenu"].createActionChangeListener (this); +if (pcl == null) { +pcl = Clazz_superCall (this, javax.swing.JPopupMenu$1, "createActionPropertyChangeListener", [a]); +}return pcl; +}, "javax.swing.Action"); +c$ = Clazz_p0p (); +}; +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.JPopupMenu, "Separator", javax.swing.JSeparator); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JPopupMenu.Separator, [0]); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "PopupMenuSeparatorUI"; +}); +c$ = Clazz_p0p (); +Clazz_defineStatics (c$, +"$uiClassID", "PopupMenuUI"); +c$.defaultLWPopupEnabledKey = c$.prototype.defaultLWPopupEnabledKey = new Clazz._O (); +Clazz_defineStatics (c$, +"popupPostionFixDisabled", false); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this.orientation = 0; +Clazz_instantialize (this, arguments); +}, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants); +Clazz_makeConstructor (c$, +function () { +this.construct (0); +}); +Clazz_makeConstructor (c$, +function (orientation) { +Clazz_superConstructor (this, javax.swing.JSeparator, []); +this.checkOrientation (orientation); +this.orientation = orientation; +this.setFocusable (false); +this.updateUI (); +}, "~N"); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "SeparatorUI"; +}); +Clazz_defineMethod (c$, "getOrientation", +function () { +return this.orientation; +}); +Clazz_defineMethod (c$, "setOrientation", +function (orientation) { +if (this.orientation == orientation) { +return; +}var oldValue = this.orientation; +this.checkOrientation (orientation); +this.orientation = orientation; +this.firePropertyChangeInt ("orientation", oldValue, orientation); +this.revalidate (); +this.repaint (); +}, "~N"); +Clazz_defineMethod (c$, "checkOrientation", + function (orientation) { +switch (orientation) { +case 1: +case 0: +break; +default: +throw new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL"); +} +}, "~N"); +Clazz_defineMethod (c$, "paramString", +function () { +var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL"); +return Clazz_superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString; +}); +Clazz_defineStatics (c$, +"$uiClassID", "SeparatorUI"); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.util.Vector", "javax.swing.event.EventListenerList"], "javax.swing.MenuSelectionManager", ["java.awt.event.MouseEvent", "javax.swing.JComponent", "$.SwingUtilities", "javax.swing.event.ChangeEvent", "$.ChangeListener", "jssun.awt.AppContext"], function () { +c$ = Clazz_decorateAsClass (function () { +this.selection = null; +this.changeEvent = null; +this.listenerList = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "MenuSelectionManager"); +Clazz_prepareFields (c$, function () { +this.selection = new java.util.Vector (); +this.listenerList = new javax.swing.event.EventListenerList (); +}); +c$.defaultManager = Clazz_defineMethod (c$, "defaultManager", +function () { +{ +var context = jssun.awt.AppContext.getAppContext (); +var msm = context.get (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY); +if (msm == null) { +msm = new javax.swing.MenuSelectionManager (); +context.put (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY, msm); +}return msm; +}}); +Clazz_defineMethod (c$, "setSelectedPath", +function (path) { +var i; +var c; +var currentSelectionCount = this.selection.size (); +var firstDifference = 0; +if (path == null) { +path = new Array (0); +}for (i = 0, c = path.length; i < c; i++) { +if (i < currentSelectionCount && this.selection.elementAt (i) === path[i]) firstDifference++; + else break; +} +for (i = currentSelectionCount - 1; i >= firstDifference; i--) { +var me = this.selection.elementAt (i); +this.selection.removeElementAt (i); +me.menuSelectionChanged (false); +} +for (i = firstDifference, c = path.length; i < c; i++) { +if (path[i] != null) { +this.selection.addElement (path[i]); +path[i].menuSelectionChanged (true); +}} +this.fireStateChanged (); +}, "~A"); +Clazz_defineMethod (c$, "getSelectedPath", +function () { +var res = new Array (this.selection.size ()); +var i; +var c; +for (i = 0, c = this.selection.size (); i < c; i++) res[i] = this.selection.elementAt (i); + +return res; +}); +Clazz_defineMethod (c$, "clearSelectedPath", +function () { +if (this.selection.size () > 0) { +this.setSelectedPath (null); +}}); +Clazz_defineMethod (c$, "addChangeListener", +function (l) { +this.listenerList.add (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "removeChangeListener", +function (l) { +this.listenerList.remove (javax.swing.event.ChangeListener, l); +}, "javax.swing.event.ChangeListener"); +Clazz_defineMethod (c$, "getChangeListeners", +function () { +return this.listenerList.getListeners (javax.swing.event.ChangeListener); +}); +Clazz_defineMethod (c$, "fireStateChanged", +function () { +var listeners = this.listenerList.getListenerList (); +for (var i = listeners.length - 2; i >= 0; i -= 2) { +if (listeners[i] === javax.swing.event.ChangeListener) { +if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); +(listeners[i + 1]).stateChanged (this.changeEvent); +}} +}); +Clazz_defineMethod (c$, "processMouseEvent", +function (event) { +var screenX; +var screenY; +var p; +var i; +var j; +var d; +var mc; +var r2; +var cWidth; +var cHeight; +var menuElement; +var subElements; +var path; +var tmp; +var selectionSize; +p = event.getPoint (); +var source = event.getSource (); +if (!source.isShowing ()) { +return; +}var type = event.getID (); +var modifiers = event.getModifiers (); +if ((type == 504 || type == 505) && ((modifiers & (28)) != 0)) { +return; +}javax.swing.SwingUtilities.convertPointToScreen (p, source); +screenX = p.x; +screenY = p.y; +tmp = this.selection.clone (); +selectionSize = tmp.size (); +var success = false; +for (i = selectionSize - 1; i >= 0 && success == false; i--) { +menuElement = tmp.elementAt (i); +subElements = menuElement.getSubElements (); +path = null; +for (j = 0, d = subElements.length; j < d && success == false; j++) { +if (subElements[j] == null) continue; +mc = subElements[j].getComponent (); +if (!mc.isShowing ()) continue; +if (Clazz_instanceOf (mc, javax.swing.JComponent)) { +cWidth = (mc).getWidth (); +cHeight = (mc).getHeight (); +} else { +r2 = mc.getBounds (); +cWidth = r2.width; +cHeight = r2.height; +}p.x = screenX; +p.y = screenY; +javax.swing.SwingUtilities.convertPointFromScreen (p, mc); +if ((p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) { +var k; +if (path == null) { +path = new Array (i + 2); +for (k = 0; k <= i; k++) path[k] = tmp.elementAt (k); + +}path[i + 1] = subElements[j]; +var currentSelection = this.getSelectedPath (); +if (currentSelection[currentSelection.length - 1] !== path[i + 1] && (currentSelection.length < 2 || currentSelection[currentSelection.length - 2] !== path[i + 1])) { +var oldMC = currentSelection[currentSelection.length - 1].getComponent (); +var exitEvent = new java.awt.event.MouseEvent (oldMC, 505, event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0); +currentSelection[currentSelection.length - 1].processMouseEvent (exitEvent, path, this); +var enterEvent = new java.awt.event.MouseEvent (mc, 504, event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0); +subElements[j].processMouseEvent (enterEvent, path, this); +}var mouseEvent = new java.awt.event.MouseEvent (mc, event.getID (), event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0); +subElements[j].processMouseEvent (mouseEvent, path, this); +success = true; +event.consume (); +}} +} +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "componentForPoint", +function (source, sourcePoint) { +var screenX; +var screenY; +var p = sourcePoint; +var i; +var j; +var d; +var mc; +var r2; +var cWidth; +var cHeight; +var menuElement; +var subElements; +var tmp; +var selectionSize; +javax.swing.SwingUtilities.convertPointToScreen (p, source); +screenX = p.x; +screenY = p.y; +tmp = this.selection.clone (); +selectionSize = tmp.size (); +for (i = selectionSize - 1; i >= 0; i--) { +menuElement = tmp.elementAt (i); +subElements = menuElement.getSubElements (); +for (j = 0, d = subElements.length; j < d; j++) { +if (subElements[j] == null) continue; +mc = subElements[j].getComponent (); +if (!mc.isShowing ()) continue; +if (Clazz_instanceOf (mc, javax.swing.JComponent)) { +cWidth = (mc).getWidth (); +cHeight = (mc).getHeight (); +} else { +r2 = mc.getBounds (); +cWidth = r2.width; +cHeight = r2.height; +}p.x = screenX; +p.y = screenY; +javax.swing.SwingUtilities.convertPointFromScreen (p, mc); +if (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight) { +return mc; +}} +} +return null; +}, "java.awt.Component,java.awt.Point"); +Clazz_defineMethod (c$, "processKeyEvent", +function (e) { +var sel2 = new Array (0); +sel2 = this.selection.toArray (sel2); +var selSize = sel2.length; +var path; +if (selSize < 1) { +return; +}for (var i = selSize - 1; i >= 0; i--) { +var elem = sel2[i]; +var subs = elem.getSubElements (); +path = null; +for (var j = 0; j < subs.length; j++) { +if (subs[j] == null || !subs[j].getComponent ().isShowing () || !subs[j].getComponent ().isEnabled ()) { +continue; +}if (path == null) { +path = new Array (i + 2); +System.arraycopy (sel2, 0, path, 0, i + 1); +}path[i + 1] = subs[j]; +subs[j].processKeyEvent (e, path, this); +if (e.isConsumed ()) { +return; +}} +} +path = new Array (1); +path[0] = sel2[0]; +path[0].processKeyEvent (e, path, this); +if (e.isConsumed ()) { +return; +}}, "java.awt.event.KeyEvent"); +Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", +function (c) { +if (this.selection.size () > 0) { +var me = this.selection.elementAt (0); +return this.isComponentPartOfCurrentMenu (me, c); +} else return false; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", + function (root, c) { +var children; +var i; +var d; +if (root == null) return false; +if (root.getComponent () === c) return true; + else { +children = root.getSubElements (); +for (i = 0, d = children.length; i < d; i++) { +if (this.isComponentPartOfCurrentMenu (children[i], c)) return true; +} +}return false; +}, "javax.swing.MenuElement,java.awt.Component"); +c$.MENU_SELECTION_MANAGER_KEY = c$.prototype.MENU_SELECTION_MANAGER_KEY = new Clazz._O (); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Panel", "javax.swing.Popup", "$.SwingHeavyWeight", "java.awt.BorderLayout"], "javax.swing.PopupFactory", ["java.lang.Boolean", "$.IllegalArgumentException", "java.util.ArrayList", "$.HashMap", "java.applet.Applet", "java.awt.Container", "$.Insets", "$.Rectangle", "$.Toolkit", "$.Window", "java.awt.event.WindowAdapter", "javax.swing.ClientPropertyKey", "$.JApplet", "$.JComponent", "$.JDialog", "$.JFrame", "$.JLayeredPane", "$.JPanel", "$.JPopupMenu", "$.JRootPane", "$.JSeparator", "$.JToolTip", "$.JWindow", "$.MenuElement", "javax.swing.Popup.DefaultFrame", "$.HeavyWeightWindow", "javax.swing.RootPaneContainer", "$.SwingUtilities"], function () { +c$ = Clazz_decorateAsClass (function () { +this.popupType = 0; +Clazz_instantialize (this, arguments); +}, javax.swing, "PopupFactory"); +c$.setSharedInstance = Clazz_defineMethod (c$, "setSharedInstance", +function (factory) { +if (factory == null) { +throw new IllegalArgumentException ("PopupFactory can not be null"); +}javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.SharedInstanceKey, factory); +}, "javax.swing.PopupFactory"); +c$.getSharedInstance = Clazz_defineMethod (c$, "getSharedInstance", +function () { +var factory = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.SharedInstanceKey); +if (factory == null) { +factory = new javax.swing.PopupFactory (); +javax.swing.PopupFactory.setSharedInstance (factory); +}return factory; +}); +Clazz_defineMethod (c$, "setPopupType", +function (type) { +this.popupType = type; +}, "~N"); +Clazz_defineMethod (c$, "getPopupType", +function () { +return this.popupType; +}); +Clazz_defineMethod (c$, "getPopup", +function (owner, contents, x, y) { +if (contents == null) { +throw new IllegalArgumentException ("Popup.getPopup must be passed non-null contents"); +}var popupType = this.getPopupType (owner, contents, x, y); +var popup = this.getPopup (owner, contents, x, y, popupType); +if (popup == null) { +popup = this.getPopup (owner, contents, x, y, 2); +}return popup; +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getPopupType", + function (owner, contents, ownerX, ownerY) { +var popupType = this.getPopupType (); +if (owner == null || this.invokerInHeavyWeightPopup (owner)) { +popupType = 2; +} else if (popupType == 0 && !(Clazz_instanceOf (contents, javax.swing.JToolTip)) && !(Clazz_instanceOf (contents, javax.swing.JPopupMenu))) { +popupType = 1; +}var c = owner; +while (c != null) { +if (Clazz_instanceOf (c, javax.swing.JComponent)) { +if ((c).getClientProperty (javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP) === Boolean.TRUE) { +popupType = 2; +break; +}}c = c.getParent (); +} +return popupType; +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getPopup", + function (owner, contents, ownerX, ownerY, popupType) { +switch (popupType) { +case 0: +return this.getLightWeightPopup (owner, contents, ownerX, ownerY); +case 1: +return this.getMediumWeightPopup (owner, contents, ownerX, ownerY); +case 2: +return this.getHeavyWeightPopup (owner, contents, ownerX, ownerY); +} +return null; +}, "java.awt.Component,java.awt.Component,~N,~N,~N"); +Clazz_defineMethod (c$, "getLightWeightPopup", + function (owner, contents, ownerX, ownerY) { +return javax.swing.PopupFactory.LightWeightPopup.getLightWeightPopup (owner, contents, ownerX, ownerY); +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getMediumWeightPopup", + function (owner, contents, ownerX, ownerY) { +return javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopup (owner, contents, ownerX, ownerY); +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getHeavyWeightPopup", + function (owner, contents, ownerX, ownerY) { +return javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopup (owner, contents, ownerX, ownerY); +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "invokerInHeavyWeightPopup", + function (i) { +if (i != null) { +var parent; +for (parent = i.getParent (); parent != null; parent = parent.getParent ()) { +if (Clazz_instanceOf (parent, javax.swing.Popup.HeavyWeightWindow)) { +return true; +}} +}return false; +}, "java.awt.Component"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.PopupFactory, "HeavyWeightPopup", javax.swing.Popup); +c$.getHeavyWeightPopup = Clazz_defineMethod (c$, "getHeavyWeightPopup", +function (a, b, c, d) { +var e = (a != null) ? javax.swing.SwingUtilities.getWindowAncestor (a) : null; +var f = null; +if (e != null) { +f = javax.swing.PopupFactory.HeavyWeightPopup.getRecycledHeavyWeightPopup (e); +}var g = false; +if (b != null && b.isFocusable ()) { +if (Clazz_instanceOf (b, javax.swing.JPopupMenu)) { +var h = b; +var i = h.getComponents (); +for (var j = 0; j < i.length; j++) { +if (!(Clazz_instanceOf (i[j], javax.swing.MenuElement)) && !(Clazz_instanceOf (i[j], javax.swing.JSeparator))) { +g = true; +break; +}} +}}if (f == null || (f.getComponent ()).getFocusableWindowState () != g) { +if (f != null) { +f._dispose (); +}f = new javax.swing.PopupFactory.HeavyWeightPopup (); +}f.reset (a, b, c, d); +if (g) { +var h = f.getComponent (); +h.setFocusableWindowState (true); +h.setName ("###focusableSwingPopup###"); +}return f; +}, "java.awt.Component,java.awt.Component,~N,~N"); +c$.getRecycledHeavyWeightPopup = Clazz_defineMethod (c$, "getRecycledHeavyWeightPopup", + function (a) { +{ +var b; +var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache (); +if (c.containsKey (a)) { +b = c.get (a); +} else { +return null; +}var d; +if ((d = b.size ()) > 0) { +var e = b.get (0); +b.remove (0); +return e; +}return null; +}}, "java.awt.Window"); +c$.getHeavyWeightPopupCache = Clazz_defineMethod (c$, "getHeavyWeightPopupCache", + function () { +{ +var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey); +if (a == null) { +a = new java.util.HashMap (2); +javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey, a); +}return a; +}}); +c$.recycleHeavyWeightPopup = Clazz_defineMethod (c$, "recycleHeavyWeightPopup", + function (a) { +{ +var b; +var c = javax.swing.SwingUtilities.getWindowAncestor (a.getComponent ()); +var d = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache (); +if (Clazz_instanceOf (c, javax.swing.Popup.DefaultFrame) || !(c).isVisible ()) { +a._dispose (); +return; +} else if (d.containsKey (c)) { +b = d.get (c); +} else { +b = new java.util.ArrayList (); +d.put (c, b); +var e = c; +e.addWindowListener (((Clazz_isClassDefined ("javax.swing.PopupFactory$HeavyWeightPopup$1") ? 0 : javax.swing.PopupFactory.HeavyWeightPopup.$PopupFactory$HeavyWeightPopup$1$ ()), Clazz_innerTypeInstance (javax.swing.PopupFactory$HeavyWeightPopup$1, this, Clazz_cloneFinals ("e", e)))); +}if (b.size () < 5) { +b.add (a); +} else { +a._dispose (); +}}}, "javax.swing.PopupFactory.HeavyWeightPopup"); +Clazz_defineMethod (c$, "hide", +function () { +Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "hide", []); +javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup (this); +}); +Clazz_defineMethod (c$, "dispose", +function () { +}); +Clazz_defineMethod (c$, "_dispose", +function () { +Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "dispose", []); +}); +c$.$PopupFactory$HeavyWeightPopup$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (javax.swing, "PopupFactory$HeavyWeightPopup$1", java.awt.event.WindowAdapter); +Clazz_overrideMethod (c$, "windowClosed", +function (a) { +var b; +{ +var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache (); +b = c.remove (this.f$.e); +}if (b != null) { +for (var c = b.size () - 1; c >= 0; c--) { +(b.get (c))._dispose (); +} +}}, "java.awt.event.WindowEvent"); +c$ = Clazz_p0p (); +}; +c$.heavyWeightPopupCacheKey = c$.prototype.heavyWeightPopupCacheKey = new Clazz._O (); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.owner = null; +this.x = 0; +this.y = 0; +Clazz_instantialize (this, arguments); +}, javax.swing.PopupFactory, "ContainerPopup", javax.swing.Popup); +Clazz_overrideMethod (c$, "hide", +function () { +var a = this.getComponent (); +if (a != null) { +var b = a.getParent (); +if (b != null) { +var c = a.getBounds (); +b.remove (a); +b.repaint (c.x, c.y, c.width, c.height); +}}this.owner = null; +}); +Clazz_overrideMethod (c$, "pack", +function () { +var a = this.getComponent (); +if (a != null) { +a.setSize (a.getPreferredSize ()); +}}); +Clazz_defineMethod (c$, "reset", +function (a, b, c, d) { +if ((Clazz_instanceOf (a, javax.swing.JFrame)) || (Clazz_instanceOf (a, javax.swing.JDialog)) || (Clazz_instanceOf (a, javax.swing.JWindow))) { +a = (a).getLayeredPane (); +}Clazz_superCall (this, javax.swing.PopupFactory.ContainerPopup, "reset", [a, b, c, d]); +this.x = c; +this.y = d; +this.owner = a; +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "overlappedByOwnedWindow", +function () { +var a = this.getComponent (); +if (this.owner != null && a != null) { +var b = javax.swing.SwingUtilities.getWindowAncestor (this.owner); +if (b == null) { +return false; +}var c = b.getOwnedWindows (); +if (c != null) { +var d = a.getBounds (); +for (var e = 0; e < c.length; e++) { +var f = c[e]; +if (f.isVisible () && d.intersects (f.getBounds ())) { +return true; +}} +}}return false; +}); +Clazz_defineMethod (c$, "fitsOnScreen", +function () { +var a = this.getComponent (); +if (this.owner != null && a != null) { +var b; +var c = a.getWidth (); +var d = a.getHeight (); +for (b = this.owner.getParent (); b != null; b = b.getParent ()) { +if (Clazz_instanceOf (b, javax.swing.JFrame) || Clazz_instanceOf (b, javax.swing.JDialog) || Clazz_instanceOf (b, javax.swing.JWindow)) { +var e = b.getBounds (); +var f = b.getInsets (); +e.x += f.left; +e.y += f.top; +e.width -= (f.left + f.right); +e.height -= (f.top + f.bottom); +var g = b.getGraphicsConfiguration (); +var h = this.getContainerPopupArea (g); +return e.intersection (h).contains (this.x, this.y, c, d); +} else if (Clazz_instanceOf (b, javax.swing.JApplet)) { +var e = b.getBounds (); +var f = b.getLocationOnScreen (); +e.x = f.x; +e.y = f.y; +return e.contains (this.x, this.y, c, d); +} else if (Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) { +break; +}} +}return false; +}); +Clazz_defineMethod (c$, "getContainerPopupArea", +function (a) { +var b; +var c = java.awt.Toolkit.getDefaultToolkit (); +var d; +if (a != null) { +b = a.getBounds (); +d = c.getScreenInsets (a); +} else { +b = new java.awt.Rectangle (c.getScreenSize ()); +d = new java.awt.Insets (0, 0, 0, 0); +}b.x += d.left; +b.y += d.top; +b.width -= (d.left + d.right); +b.height -= (d.top + d.bottom); +return b; +}, "java.awt.GraphicsConfiguration"); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.PopupFactory, "LightWeightPopup", javax.swing.PopupFactory.ContainerPopup); +c$.getLightWeightPopup = Clazz_defineMethod (c$, "getLightWeightPopup", +function (a, b, c, d) { +var e = null; +if (e == null) { +e = new javax.swing.PopupFactory.LightWeightPopup (); +}e.reset (a, b, c, d); +if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) { +e.hide (); +return null; +}return e; +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "hide", +function () { +Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "hide", []); +var a = this.getComponent (); +a.removeAll (); +}); +Clazz_overrideMethod (c$, "show", +function () { +var a = null; +if (this.owner != null) { +a = (Clazz_instanceOf (this.owner, java.awt.Container) ? this.owner : this.owner.getParent ()); +}for (var b = a; b != null; b = b.getParent ()) { +if (Clazz_instanceOf (b, javax.swing.JRootPane)) { +a = (b).getLayeredPane (); +} else if (Clazz_instanceOf (b, java.awt.Window)) { +if (a == null) { +a = b; +}break; +} else if (Clazz_instanceOf (b, javax.swing.JApplet)) { +break; +}} +var c = javax.swing.SwingUtilities.convertScreenLocationToParent (a, this.x, this.y); +var d = this.getComponent (); +d.setLocation (c.x, c.y); +if (Clazz_instanceOf (a, javax.swing.JLayeredPane)) { +(a).add (d, javax.swing.JLayeredPane.POPUP_LAYER, 0); +} else { +a.add (d); +}}); +Clazz_overrideMethod (c$, "createComponent", +function (a) { +var b = new javax.swing.JPanel ( new java.awt.BorderLayout (), true); +b.setOpaque (true); +return b; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "reset", +function (a, b, c, d) { +Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "reset", [a, b, c, d]); +var e = this.getComponent (); +e.setOpaque (b.isOpaque ()); +e.setLocation (c, d); +e.add (b, "Center"); +b.invalidate (); +this.pack (); +}, "java.awt.Component,java.awt.Component,~N,~N"); +c$.lightWeightPopupCacheKey = c$.prototype.lightWeightPopupCacheKey = new Clazz._O (); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_decorateAsClass (function () { +this.rootPane = null; +Clazz_instantialize (this, arguments); +}, javax.swing.PopupFactory, "MediumWeightPopup", javax.swing.PopupFactory.ContainerPopup); +c$.getMediumWeightPopup = Clazz_defineMethod (c$, "getMediumWeightPopup", +function (a, b, c, d) { +var e = javax.swing.PopupFactory.MediumWeightPopup.getRecycledMediumWeightPopup (); +if (e == null) { +e = new javax.swing.PopupFactory.MediumWeightPopup (); +}e.reset (a, b, c, d); +if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) { +e.hide (); +return null; +}return e; +}, "java.awt.Component,java.awt.Component,~N,~N"); +c$.getMediumWeightPopupCache = Clazz_defineMethod (c$, "getMediumWeightPopupCache", + function () { +var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey); +if (a == null) { +a = new java.util.ArrayList (); +javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey, a); +}return a; +}); +c$.recycleMediumWeightPopup = Clazz_defineMethod (c$, "recycleMediumWeightPopup", + function (a) { +{ +var b = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache (); +if (b.size () < 5) { +b.add (a); +}}}, "javax.swing.PopupFactory.MediumWeightPopup"); +c$.getRecycledMediumWeightPopup = Clazz_defineMethod (c$, "getRecycledMediumWeightPopup", + function () { +{ +var a = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache (); +var b; +if ((b = a.size ()) > 0) { +var c = a.get (0); +a.remove (0); +return c; +}return null; +}}); +Clazz_defineMethod (c$, "hide", +function () { +Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "hide", []); +this.rootPane.getContentPane ().removeAll (); +javax.swing.PopupFactory.MediumWeightPopup.recycleMediumWeightPopup (this); +}); +Clazz_overrideMethod (c$, "show", +function () { +var a = this.getComponent (); +var b = null; +if (this.owner != null) { +b = this.owner.getParent (); +}while (!(Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) && (b != null)) { +b = b.getParent (); +} +if (Clazz_instanceOf (b, javax.swing.RootPaneContainer)) { +b = (b).getLayeredPane (); +var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y); +a.setVisible (false); +a.setLocation (c.x, c.y); +(b).add (a, javax.swing.JLayeredPane.POPUP_LAYER, 0); +} else { +var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y); +a.setLocation (c.x, c.y); +a.setVisible (false); +b.add (a); +}a.setVisible (true); +}); +Clazz_overrideMethod (c$, "createComponent", +function (a) { +var b = new javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent (); +this.rootPane = new javax.swing.JRootPane (); +this.rootPane.setOpaque (true); +b.add (this.rootPane, "Center"); +return b; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "reset", +function (a, b, c, d) { +Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "reset", [a, b, c, d]); +var e = this.getComponent (); +e.setLocation (c, d); +this.rootPane.getContentPane ().add (b, "Center"); +b.invalidate (); +e.validate (); +this.pack (); +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.PopupFactory.MediumWeightPopup, "MediumWeightComponent", java.awt.Panel, javax.swing.SwingHeavyWeight); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent, [ new java.awt.BorderLayout ()]); +}); +c$ = Clazz_p0p (); +c$.mediumWeightPopupCacheKey = c$.prototype.mediumWeightPopupCacheKey = new Clazz._O (); +c$ = Clazz_p0p (); +c$.SharedInstanceKey = c$.prototype.SharedInstanceKey = new Clazz._O (); +Clazz_defineStatics (c$, +"MAX_CACHE_SIZE", 5, +"LIGHT_WEIGHT_POPUP", 0, +"MEDIUM_WEIGHT_POPUP", 1, +"HEAVY_WEIGHT_POPUP", 2); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["java.awt.Frame", "javax.swing.JWindow"], "javax.swing.Popup", ["java.lang.IllegalArgumentException", "java.awt.Toolkit", "$.Window", "javax.swing.SwingUtilities", "jssun.awt.SunToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.component = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "Popup"); +Clazz_makeConstructor (c$, +function (owner, contents, x, y) { +this.construct (); +if (contents == null) { +throw new IllegalArgumentException ("Contents must be non-null"); +}this.reset (owner, contents, x, y); +}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "show", +function () { +var component = this.getComponent (); +if (component != null) { +component.show (); +}}); +Clazz_defineMethod (c$, "hide", +function () { +var component = this.getComponent (); +if (Clazz_instanceOf (component, javax.swing.JWindow)) { +component.hide (); +(component).getContentPane ().removeAll (); +}this.dispose (); +}); +Clazz_defineMethod (c$, "dispose", +function () { +var component = this.getComponent (); +var window = javax.swing.SwingUtilities.getWindowAncestor (component); +if (Clazz_instanceOf (component, javax.swing.JWindow)) { +(component).dispose (); +component = null; +}if (Clazz_instanceOf (window, javax.swing.Popup.DefaultFrame)) { +window.dispose (); +}}); +Clazz_defineMethod (c$, "reset", +function (owner, contents, ownerX, ownerY) { +if (this.getComponent () == null) { +this.component = this.createComponent (owner); +}var c = this.getComponent (); +if (Clazz_instanceOf (c, javax.swing.JWindow)) { +var component = this.getComponent (); +component.setLocation (ownerX, ownerY); +component.getContentPane ().add (contents, "Center"); +contents.invalidate (); +if (component.isVisible ()) { +this.pack (); +}}}, "java.awt.Component,java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "pack", +function () { +var component = this.getComponent (); +if (Clazz_instanceOf (component, java.awt.Window)) { +(component).pack (); +}}); +Clazz_defineMethod (c$, "getParentWindow", + function (owner) { +var window = null; +if (Clazz_instanceOf (owner, java.awt.Window)) { +window = owner; +} else if (owner != null) { +window = javax.swing.SwingUtilities.getWindowAncestor (owner); +}if (window == null) { +window = new javax.swing.Popup.DefaultFrame (); +}return window; +}, "java.awt.Component"); +Clazz_defineMethod (c$, "createComponent", +function (owner) { +return new javax.swing.Popup.HeavyWeightWindow (this.getParentWindow (owner)); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getComponent", +function () { +return this.component; +}); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.Popup, "HeavyWeightWindow", javax.swing.JWindow); +Clazz_makeConstructor (c$, +function (a) { +Clazz_superConstructor (this, javax.swing.Popup.HeavyWeightWindow, [a]); +this.setFocusableWindowState (false); +var b = java.awt.Toolkit.getDefaultToolkit (); +if (Clazz_instanceOf (b, jssun.awt.SunToolkit)) { +(b).setOverrideRedirect (this); +}this.getRootPane ().setUseTrueDoubleBuffering (false); +try { +this.setAlwaysOnTop (true); +} catch (se) { +if (Clazz_exceptionOf (se, SecurityException)) { +} else { +throw se; +} +} +}, "java.awt.Window"); +Clazz_overrideMethod (c$, "update", +function (a) { +this.paint (a); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "show", +function () { +this.pack (); +if (this.getWidth () > 0 && this.getHeight () > 0) { +Clazz_superCall (this, javax.swing.Popup.HeavyWeightWindow, "show", []); +}}); +c$ = Clazz_p0p (); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (javax.swing.Popup, "DefaultFrame", java.awt.Frame); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("javax.swing"); +Clazz_declareInterface (javax.swing, "SwingHeavyWeight"); +Clazz_declarePackage ("javax.swing"); +Clazz_load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this.tipText = null; +this.$component = null; +Clazz_instantialize (this, arguments); +}, javax.swing, "JToolTip", javax.swing.JComponent); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.JToolTip, []); +this.setOpaque (true); +this.updateUI (); +}); +Clazz_overrideMethod (c$, "getUI", +function () { +return this.ui; +}); +Clazz_overrideMethod (c$, "updateUI", +function () { +this.setUI (javax.swing.UIManager.getUI (this)); +}); +Clazz_overrideMethod (c$, "getUIClassID", +function () { +return "ToolTipUI"; +}); +Clazz_defineMethod (c$, "setTipText", +function (tipText) { +var oldValue = this.tipText; +this.tipText = tipText; +this.firePropertyChangeObject ("tiptext", oldValue, tipText); +}, "~S"); +Clazz_defineMethod (c$, "getTipText", +function () { +return this.tipText; +}); +Clazz_defineMethod (c$, "setComponent", +function (c) { +var oldValue = this.$component; +this.$component = c; +this.firePropertyChangeObject ("component", oldValue, c); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "getComponent", +function () { +return this.$component; +}); +Clazz_overrideMethod (c$, "alwaysOnTop", +function () { +return true; +}); +Clazz_defineMethod (c$, "paramString", +function () { +var tipTextString = (this.tipText != null ? this.tipText : ""); +return Clazz_superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString; +}); +Clazz_defineStatics (c$, +"$uiClassID", "ToolTipUI"); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventObject"], "javax.swing.event.PopupMenuEvent", null, function () { +c$ = Clazz_declareType (javax.swing.event, "PopupMenuEvent", java.util.EventObject); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.PopupMenuListener", null, function () { +Clazz_declareInterface (javax.swing.event, "PopupMenuListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventObject"], "javax.swing.event.MenuEvent", null, function () { +c$ = Clazz_declareType (javax.swing.event, "MenuEvent", java.util.EventObject); +}); +Clazz_declarePackage ("javax.swing.event"); +Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuListener", null, function () { +Clazz_declareInterface (javax.swing.event, "MenuListener", java.util.EventListener); +}); +Clazz_declarePackage ("javax.swing.border"); +Clazz_load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () { +c$ = Clazz_declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border); +Clazz_overrideMethod (c$, "paintBorder", +function (c, g, x, y, width, height) { +}, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getBorderInsets", +function (c) { +return new java.awt.Insets (0, 0, 0, 0); +}, "java.awt.Component"); +Clazz_defineMethod (c$, "getBorderInsets", +function (c, insets) { +insets.left = insets.top = insets.right = insets.bottom = 0; +return insets; +}, "java.awt.Component,java.awt.Insets"); +Clazz_overrideMethod (c$, "isBorderOpaque", +function () { +return false; +}); +Clazz_defineMethod (c$, "getInteriorRectangle", +function (c, x, y, width, height) { +return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height); +}, "java.awt.Component,~N,~N,~N,~N"); +c$.getInteriorRectangle = Clazz_defineMethod (c$, "getInteriorRectangle", +function (c, b, x, y, width, height) { +var insets; +if (b != null) insets = b.getBorderInsets (c); + else insets = new java.awt.Insets (0, 0, 0, 0); +return new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom); +}, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getBaseline", +function (c, width, height) { +if (width < 0 || height < 0) { +throw new IllegalArgumentException ("Width and height must be >= 0"); +}return -1; +}, "java.awt.Component,~N,~N"); +Clazz_defineMethod (c$, "getBaselineResizeBehavior", +function (c) { +if (c == null) { +throw new NullPointerException ("Component must be non-null"); +}return java.awt.Component.BaselineResizeBehavior.OTHER; +}, "java.awt.Component"); +c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", +function (c) { +return c.getComponentOrientation ().isLeftToRight (); +}, "java.awt.Component"); +}); +Clazz_declarePackage ("jssun.awt"); +Clazz_load (["java.awt.event.InvocationEvent"], "jssun.awt.PeerEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.flags = 0; +Clazz_instantialize (this, arguments); +}, jssun.awt, "PeerEvent", java.awt.event.InvocationEvent); +Clazz_makeConstructor (c$, +function (source, runnable, flags) { +this.construct (source, runnable, null, false, flags); +}, "~O,Runnable,~N"); +Clazz_makeConstructor (c$, +function (source, runnable, notifier, catchExceptions, flags) { +Clazz_superConstructor (this, jssun.awt.PeerEvent, [source, runnable, notifier, catchExceptions]); +this.flags = flags; +}, "~O,Runnable,~O,~B,~N"); +Clazz_defineMethod (c$, "getFlags", +function () { +return this.flags; +}); +Clazz_defineMethod (c$, "coalesceEvents", +function (newEvent) { +return null; +}, "jssun.awt.PeerEvent"); +Clazz_defineStatics (c$, +"PRIORITY_EVENT", 0x01, +"ULTIMATE_PRIORITY_EVENT", 0x02, +"LOW_PRIORITY_EVENT", 0x04); +}); +Clazz_declarePackage ("jssun.awt.image"); +Clazz_load (["jssun.awt.image.InputStreamImageSource"], "jssun.awt.image.URLImageSource", ["java.net.URL"], function () { +c$ = Clazz_decorateAsClass (function () { +this.url = null; +this.conn = null; +this.actualHost = null; +this.actualPort = 0; +Clazz_instantialize (this, arguments); +}, jssun.awt.image, "URLImageSource", jssun.awt.image.InputStreamImageSource); +Clazz_makeConstructor (c$, +function (u) { +Clazz_superConstructor (this, jssun.awt.image.URLImageSource, []); +this.url = u; +}, "java.net.URL"); +Clazz_makeConstructor (c$, +function (href) { +this.construct ( new java.net.URL (null, href)); +}, "~S"); +Clazz_makeConstructor (c$, +function (u, uc) { +this.construct (u); +this.conn = uc; +}, "java.net.URL,java.net.URLConnection"); +Clazz_makeConstructor (c$, +function (uc) { +this.construct (uc.getURL (), uc); +}, "java.net.URLConnection"); +Clazz_overrideMethod (c$, "checkSecurity", +function (context, quiet) { +if (this.actualHost != null) { +try { +var security = System.getSecurityManager (); +if (security != null) { +security.checkConnect (this.actualHost, this.actualPort, context); +}} catch (e) { +if (Clazz_exceptionOf (e, SecurityException)) { +if (!quiet) { +throw e; +}return false; +} else { +throw e; +} +} +}return true; +}, "~O,~B"); +Clazz_defineMethod (c$, "getDecoder", +function () { +return null; +}); +}); +Clazz_declarePackage ("jssun.awt.image"); +Clazz_load (["java.awt.image.ImageProducer", "jssun.awt.image.ImageFetchable"], "jssun.awt.image.InputStreamImageSource", ["java.lang.SecurityException", "$.Thread", "jssun.awt.image.ImageConsumerQueue", "$.ImageFetcher"], function () { +c$ = Clazz_decorateAsClass (function () { +this.consumers = null; +this.decoder = null; +this.decoders = null; +this.awaitingFetch = false; +Clazz_instantialize (this, arguments); +}, jssun.awt.image, "InputStreamImageSource", null, [java.awt.image.ImageProducer, jssun.awt.image.ImageFetchable]); +Clazz_defineMethod (c$, "countConsumers", +function (cq) { +var i = 0; +while (cq != null) { +i++; +cq = cq.next; +} +return i; +}, "jssun.awt.image.ImageConsumerQueue"); +Clazz_defineMethod (c$, "countConsumers", +function () { +var id = this.decoders; +var i = this.countConsumers (this.consumers); +while (id != null) { +i += this.countConsumers (id.queue); +id = id.next; +} +return i; +}); +Clazz_defineMethod (c$, "addConsumer", +function (ic) { +this.addConsumer (ic, false); +}, "java.awt.image.ImageConsumer"); +Clazz_defineMethod (c$, "printQueue", +function (cq, prefix) { +while (cq != null) { +System.out.println (prefix + cq); +cq = cq.next; +} +}, "jssun.awt.image.ImageConsumerQueue,~S"); +Clazz_defineMethod (c$, "printQueues", +function (title) { +System.out.println (title + "[ -----------"); +this.printQueue (this.consumers, " "); +for (var id = this.decoders; id != null; id = id.next) { +System.out.println (" " + id); +this.printQueue (id.queue, " "); +} +System.out.println ("----------- ]" + title); +}, "~S"); +Clazz_defineMethod (c$, "addConsumer", +function (ic, produce) { +for (var id = this.decoders; id != null; id = id.next) { +if (id.isConsumer (ic)) { +return; +}} +var cq = this.consumers; +while (cq != null && cq.consumer !== ic) { +cq = cq.next; +} +if (cq == null) { +cq = new jssun.awt.image.ImageConsumerQueue (this, ic); +cq.next = this.consumers; +this.consumers = cq; +} else { +if (!cq.secure) { +var context = null; +var security = System.getSecurityManager (); +if (security != null) { +context = security.getSecurityContext (); +}if (cq.securityContext == null) { +cq.securityContext = context; +} else if (!cq.securityContext.equals (context)) { +this.errorConsumer (cq, false); +throw new SecurityException ("Applets are trading image data!"); +}}cq.interested = true; +}if (produce && this.decoder == null) { +this.startProduction (); +}}, "java.awt.image.ImageConsumer,~B"); +Clazz_overrideMethod (c$, "isConsumer", +function (ic) { +for (var id = this.decoders; id != null; id = id.next) { +if (id.isConsumer (ic)) { +return true; +}} +return jssun.awt.image.ImageConsumerQueue.isConsumer (this.consumers, ic); +}, "java.awt.image.ImageConsumer"); +Clazz_defineMethod (c$, "errorAllConsumers", + function (cq, needReload) { +while (cq != null) { +if (cq.interested) { +this.errorConsumer (cq, needReload); +}cq = cq.next; +} +}, "jssun.awt.image.ImageConsumerQueue,~B"); +Clazz_defineMethod (c$, "errorConsumer", + function (cq, needReload) { +cq.consumer.imageComplete (1); +this.removeConsumer (cq.consumer); +}, "jssun.awt.image.ImageConsumerQueue,~B"); +Clazz_overrideMethod (c$, "removeConsumer", +function (ic) { +for (var id = this.decoders; id != null; id = id.next) { +id.removeConsumer (ic); +} +this.consumers = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.consumers, ic, false); +}, "java.awt.image.ImageConsumer"); +Clazz_defineMethod (c$, "startProduction", +function (ic) { +this.addConsumer (ic, true); +}, "java.awt.image.ImageConsumer"); +Clazz_defineMethod (c$, "startProduction", + function () { +if (!this.awaitingFetch) { +jssun.awt.image.ImageFetcher.add (this); +this.awaitingFetch = true; +}}); +Clazz_overrideMethod (c$, "requestTopDownLeftRightResend", +function (ic) { +}, "java.awt.image.ImageConsumer"); +Clazz_defineMethod (c$, "decoderForType", +function (is, content_type) { +return null; +}, "java.io.InputStream,~S"); +Clazz_defineMethod (c$, "getDecoder", +function (is) { +return null; +}, "java.io.InputStream"); +Clazz_overrideMethod (c$, "doFetch", +function () { +{ +if (this.consumers == null) { +this.awaitingFetch = false; +return; +}}var imgd = this.getDecoder (); +if (imgd == null) { +this.badDecoder (); +} else { +this.setDecoder (imgd); +try { +imgd.produceImage (); +} catch (e$$) { +if (Clazz_exceptionOf (e$$, java.io.IOException)) { +var e = e$$; +{ +e.printStackTrace (); +} +} else if (Clazz_exceptionOf (e$$, jssun.awt.image.ImageFormatException)) { +var e = e$$; +{ +e.printStackTrace (); +} +} else { +throw e$$; +} +} finally { +this.removeDecoder (imgd); +if (Thread.currentThread ().isInterrupted () || !Thread.currentThread ().isAlive ()) { +this.errorAllConsumers (imgd.queue, true); +} else { +this.errorAllConsumers (imgd.queue, false); +}} +}}); +Clazz_defineMethod (c$, "badDecoder", + function () { +var cq; +{ +cq = this.consumers; +this.consumers = null; +this.awaitingFetch = false; +}this.errorAllConsumers (cq, false); +}); +Clazz_defineMethod (c$, "setDecoder", + function (mydecoder) { +var cq; +{ +mydecoder.next = this.decoders; +this.decoders = mydecoder; +this.decoder = mydecoder; +cq = this.consumers; +mydecoder.queue = cq; +this.consumers = null; +this.awaitingFetch = false; +}}, "jssun.awt.image.ImageDecoder"); +Clazz_defineMethod (c$, "removeDecoder", + function (mydecoder) { +this.doneDecoding (mydecoder); +var idprev = null; +for (var id = this.decoders; id != null; id = id.next) { +if (id === mydecoder) { +if (idprev == null) { +this.decoders = id.next; +} else { +idprev.next = id.next; +}break; +}idprev = id; +} +}, "jssun.awt.image.ImageDecoder"); +Clazz_defineMethod (c$, "doneDecoding", +function (mydecoder) { +if (this.decoder === mydecoder) { +this.decoder = null; +if (this.consumers != null) { +this.startProduction (); +}}}, "jssun.awt.image.ImageDecoder"); +Clazz_defineMethod (c$, "latchConsumers", +function (id) { +this.doneDecoding (id); +}, "jssun.awt.image.ImageDecoder"); +Clazz_defineMethod (c$, "flush", +function () { +this.decoder = null; +}); +}); +Clazz_declarePackage ("java.awt.image"); +Clazz_declareInterface (java.awt.image, "ImageProducer"); +Clazz_declarePackage ("jssun.awt.image"); +Clazz_declareInterface (jssun.awt.image, "ImageFetchable"); +Clazz_declarePackage ("jssun.awt.image"); +c$ = Clazz_decorateAsClass (function () { +this.next = null; +this.consumer = null; +this.interested = false; +this.securityContext = null; +this.secure = false; +Clazz_instantialize (this, arguments); +}, jssun.awt.image, "ImageConsumerQueue"); +c$.removeConsumer = Clazz_defineMethod (c$, "removeConsumer", +function (cqbase, ic, stillinterested) { +var cqprev = null; +for (var cq = cqbase; cq != null; cq = cq.next) { +if (cq.consumer === ic) { +if (cqprev == null) { +cqbase = cq.next; +} else { +cqprev.next = cq.next; +}cq.interested = stillinterested; +break; +}cqprev = cq; +} +return cqbase; +}, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B"); +c$.isConsumer = Clazz_defineMethod (c$, "isConsumer", +function (cqbase, ic) { +for (var cq = cqbase; cq != null; cq = cq.next) { +if (cq.consumer === ic) { +return true; +}} +return false; +}, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer"); +Clazz_makeConstructor (c$, +function (src, ic) { +this.consumer = ic; +this.interested = true; +this.secure = true; +}, "jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer"); +Clazz_overrideMethod (c$, "toString", +function () { +return ("[" + this.consumer + ", " + (this.interested ? "" : "not ") + "interested" + (this.securityContext != null ? ", " + this.securityContext : "") + "]"); +}); +Clazz_declarePackage ("jssun.awt.image"); +Clazz_load (["java.lang.Thread", "$.StringBuffer"], ["jssun.awt.image.FetcherInfo", "$.ImageFetcher"], ["java.util.Vector", "jssun.awt.AppContext"], function () { +c$ = Clazz_declareType (jssun.awt.image, "ImageFetcher", Thread); +Clazz_makeConstructor (c$, + function (threadGroup, index) { +Clazz_superConstructor (this, jssun.awt.image.ImageFetcher, [threadGroup, "Image Fetcher " + index]); +this.setDaemon (true); +}, "ThreadGroup,~N"); +c$.add = Clazz_defineMethod (c$, "add", +function (src) { +var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); +{ +if (!info.waitList.contains (src)) { +info.waitList.addElement (src); +if (info.numWaiting == 0 && info.numFetchers < info.fetchers.length) { +jssun.awt.image.ImageFetcher.createFetchers (info); +}info.waitList.notify (); +}}}, "jssun.awt.image.ImageFetchable"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (src) { +var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); +{ +if (info.waitList.contains (src)) { +info.waitList.removeElement (src); +}}}, "jssun.awt.image.ImageFetchable"); +c$.isFetcher = Clazz_defineMethod (c$, "isFetcher", +function (t) { +var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); +{ +for (var i = 0; i < info.fetchers.length; i++) { +if (info.fetchers[i] === t) { +return true; +}} +}return false; +}, "Thread"); +c$.amFetcher = Clazz_defineMethod (c$, "amFetcher", +function () { +return jssun.awt.image.ImageFetcher.isFetcher (Thread.currentThread ()); +}); +c$.nextImage = Clazz_defineMethod (c$, "nextImage", + function () { +var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); +{ +var src = null; +var end = System.currentTimeMillis () + 5000; +while (src == null) { +while (info.waitList.size () == 0) { +var now = System.currentTimeMillis (); +if (now >= end) { +return null; +}try { +info.numWaiting++; +info.waitList.wait (end - now); +} catch (e) { +if (Clazz_exceptionOf (e, InterruptedException)) { +return null; +} else { +throw e; +} +} finally { +info.numWaiting--; +} +} +src = info.waitList.elementAt (0); +info.waitList.removeElement (src); +} +return src; +}}); +Clazz_overrideMethod (c$, "run", +function () { +var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); +try { +this.fetchloop (); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +e.printStackTrace (); +} else { +throw e; +} +} finally { +{ +var me = Thread.currentThread (); +for (var i = 0; i < info.fetchers.length; i++) { +if (info.fetchers[i] === me) { +info.fetchers[i] = null; +info.numFetchers--; +}} +}} +}); +Clazz_defineMethod (c$, "fetchloop", + function () { +var me = Thread.currentThread (); +while (jssun.awt.image.ImageFetcher.isFetcher (me)) { +Thread.interrupted (); +me.setPriority (8); +var src = jssun.awt.image.ImageFetcher.nextImage (); +if (src == null) { +return; +}try { +src.doFetch (); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +System.err.println ("Uncaught error fetching image:"); +e.printStackTrace (); +} else { +throw e; +} +} +jssun.awt.image.ImageFetcher.stoppingAnimation (me); +} +}); +c$.startingAnimation = Clazz_defineMethod (c$, "startingAnimation", +function () { +var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); +var me = Thread.currentThread (); +{ +for (var i = 0; i < info.fetchers.length; i++) { +if (info.fetchers[i] === me) { +info.fetchers[i] = null; +info.numFetchers--; +me.setName ("Image Animator " + i); +if (info.waitList.size () > info.numWaiting) { +jssun.awt.image.ImageFetcher.createFetchers (info); +}return; +}} +}me.setPriority (2); +me.setName ("Image Animator"); +}); +c$.stoppingAnimation = Clazz_defineMethod (c$, "stoppingAnimation", + function (me) { +var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); +{ +var index = -1; +for (var i = 0; i < info.fetchers.length; i++) { +if (info.fetchers[i] === me) { +return; +}if (info.fetchers[i] == null) { +index = i; +}} +if (index >= 0) { +info.fetchers[index] = me; +info.numFetchers++; +me.setName ("Image Fetcher " + index); +return; +}}}, "Thread"); +c$.createFetchers = Clazz_defineMethod (c$, "createFetchers", + function (info) { +var appContext = jssun.awt.AppContext.getAppContext (); +var threadGroup = appContext.getThreadGroup (); +var fetcherThreadGroup; +try { +if (threadGroup.getParent () != null) { +fetcherThreadGroup = threadGroup; +} else { +threadGroup = Thread.currentThread ().getThreadGroup (); +var parent = threadGroup.getParent (); +while ((parent != null) && (parent.getParent () != null)) { +threadGroup = parent; +parent = threadGroup.getParent (); +} +fetcherThreadGroup = threadGroup; +}} catch (e) { +if (Clazz_exceptionOf (e, SecurityException)) { +fetcherThreadGroup = appContext.getThreadGroup (); +} else { +throw e; +} +} +var fetcherGroup = fetcherThreadGroup; +for (var i = 0; i < info.fetchers.length; i++) { +if (info.fetchers[i] == null) { +info.fetchers[i] = new jssun.awt.image.ImageFetcher (fetcherGroup, i); +info.fetchers[i].start (); +info.numFetchers++; +break; +}} +return; +}, "jssun.awt.image.FetcherInfo"); +Clazz_defineStatics (c$, +"HIGH_PRIORITY", 8, +"LOW_PRIORITY", 3, +"ANIM_PRIORITY", 2, +"TIMEOUT", 5000); +c$ = Clazz_decorateAsClass (function () { +this.fetchers = null; +this.numFetchers = 0; +this.numWaiting = 0; +this.waitList = null; +Clazz_instantialize (this, arguments); +}, jssun.awt.image, "FetcherInfo"); +Clazz_makeConstructor (c$, + function () { +this.fetchers = new Array (4); +this.numFetchers = 0; +this.numWaiting = 0; +this.waitList = new java.util.Vector (); +}); +c$.getFetcherInfo = Clazz_defineMethod (c$, "getFetcherInfo", +function () { +var appContext = jssun.awt.AppContext.getAppContext (); +{ +var info = appContext.get (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY); +if (info == null) { +info = new jssun.awt.image.FetcherInfo (); +appContext.put (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY, info); +}return info; +}}); +Clazz_defineStatics (c$, +"MAX_NUM_FETCHERS_PER_APPCONTEXT", 4); +c$.FETCHER_INFO_KEY = c$.prototype.FETCHER_INFO_KEY = new StringBuffer ("FetcherInfo"); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.FocusEvent", ["jssun.awt.AppContext", "$.SunToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.temporary = false; +this.opposite = null; +Clazz_instantialize (this, arguments); +}, java.awt.event, "FocusEvent", java.awt.event.ComponentEvent); +Clazz_makeConstructor (c$, +function (source, id, temporary, opposite) { +Clazz_superConstructor (this, java.awt.event.FocusEvent, [source, id]); +this.temporary = temporary; +this.opposite = opposite; +}, "java.awt.Component,~N,~B,java.awt.Component"); +Clazz_makeConstructor (c$, +function (source, id, temporary) { +this.construct (source, id, temporary, null); +}, "java.awt.Component,~N,~B"); +Clazz_makeConstructor (c$, +function (source, id) { +this.construct (source, id, false); +}, "java.awt.Component,~N"); +Clazz_defineMethod (c$, "isTemporary", +function () { +return this.temporary; +}); +Clazz_defineMethod (c$, "getOppositeComponent", +function () { +if (this.opposite == null) { +return null; +}return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 1004: +typeStr = "FOCUS_GAINED"; +break; +case 1005: +typeStr = "FOCUS_LOST"; +break; +default: +typeStr = "unknown type"; +} +return typeStr + (this.temporary ? ",temporary" : ",permanent") + ",opposite=" + this.getOppositeComponent (); +}); +Clazz_defineStatics (c$, +"FOCUS_FIRST", 1004, +"FOCUS_LAST", 1005, +"FOCUS_GAINED", 1004, +"FOCUS_LOST", 1005); +}); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.AWTEvent"], "java.awt.event.HierarchyEvent", ["java.awt.Component"], function () { +c$ = Clazz_decorateAsClass (function () { +this.changed = null; +this.changedParent = null; +this.changeFlags = 0; +Clazz_instantialize (this, arguments); +}, java.awt.event, "HierarchyEvent", java.awt.AWTEvent); +Clazz_makeConstructor (c$, +function (source, id, changed, changedParent) { +Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]); +this.changed = changed; +this.changedParent = changedParent; +}, "java.awt.Component,~N,java.awt.Component,java.awt.Container"); +Clazz_makeConstructor (c$, +function (source, id, changed, changedParent, changeFlags) { +Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]); +this.changed = changed; +this.changedParent = changedParent; +this.changeFlags = changeFlags; +}, "java.awt.Component,~N,java.awt.Component,java.awt.Container,~N"); +Clazz_defineMethod (c$, "getComponent", +function () { +return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null; +}); +Clazz_defineMethod (c$, "getChanged", +function () { +return this.changed; +}); +Clazz_defineMethod (c$, "getChangedParent", +function () { +return this.changedParent; +}); +Clazz_defineMethod (c$, "getChangeFlags", +function () { +return this.changeFlags; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 1401: +typeStr = "ANCESTOR_MOVED (" + this.changed + "," + this.changedParent + ")"; +break; +case 1402: +typeStr = "ANCESTOR_RESIZED (" + this.changed + "," + this.changedParent + ")"; +break; +case 1400: +{ +typeStr = "HIERARCHY_CHANGED ("; +var first = true; +if ((this.changeFlags & 1) != 0) { +first = false; +typeStr += "PARENT_CHANGED"; +}if ((this.changeFlags & 2) != 0) { +if (first) { +first = false; +} else { +typeStr += ","; +}typeStr += "DISPLAYABILITY_CHANGED"; +}if ((this.changeFlags & 4) != 0) { +if (first) { +first = false; +} else { +typeStr += ","; +}typeStr += "SHOWING_CHANGED"; +}if (!first) { +typeStr += ","; +}typeStr += this.changed + "," + this.changedParent + ")"; +break; +}default: +typeStr = "unknown type"; +} +return typeStr; +}); +Clazz_defineStatics (c$, +"HIERARCHY_FIRST", 1400, +"HIERARCHY_CHANGED", 1400, +"ANCESTOR_MOVED", 1401, +"ANCESTOR_RESIZED", 1402, +"HIERARCHY_LAST", 1402, +"PARENT_CHANGED", 0x1, +"DISPLAYABILITY_CHANGED", 0x2, +"SHOWING_CHANGED", 0x4); +}); +Clazz_declarePackage ("jssun.awt"); +Clazz_declareInterface (jssun.awt, "ConstrainableGraphics"); +Clazz_declarePackage ("jssun.awt"); +Clazz_declareInterface (jssun.awt, "Graphics2Delegate"); +Clazz_declarePackage ("java.awt.event"); +Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.ContainerEvent", ["java.awt.Container"], function () { +c$ = Clazz_decorateAsClass (function () { +this.child = null; +Clazz_instantialize (this, arguments); +}, java.awt.event, "ContainerEvent", java.awt.event.ComponentEvent); +Clazz_makeConstructor (c$, +function (source, id, child) { +Clazz_superConstructor (this, java.awt.event.ContainerEvent, [source, id]); +this.child = child; +}, "java.awt.Component,~N,java.awt.Component"); +Clazz_defineMethod (c$, "getContainer", +function () { +return (Clazz_instanceOf (this.source, java.awt.Container)) ? this.source : null; +}); +Clazz_defineMethod (c$, "getChild", +function () { +return this.child; +}); +Clazz_overrideMethod (c$, "paramString", +function () { +var typeStr; +switch (this.id) { +case 300: +typeStr = "COMPONENT_ADDED"; +break; +case 301: +typeStr = "COMPONENT_REMOVED"; +break; +default: +typeStr = "unknown type"; +} +return typeStr + ",child=" + this.child.getName (); +}); +Clazz_defineStatics (c$, +"CONTAINER_FIRST", 300, +"CONTAINER_LAST", 301, +"COMPONENT_ADDED", 300, +"COMPONENT_REMOVED", 301); +}); +Clazz_declarePackage ("jssun.applet"); +Clazz_load (["java.util.EventObject"], "jssun.applet.AppletEvent", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.arg = null; +this.id = 0; +Clazz_instantialize (this, arguments); +}, jssun.applet, "AppletEvent", java.util.EventObject); +Clazz_makeConstructor (c$, +function (source, id, argument) { +Clazz_superConstructor (this, jssun.applet.AppletEvent, [source]); +this.arg = argument; +this.id = id; +}, "~O,~N,~O"); +Clazz_defineMethod (c$, "getID", +function () { +return this.id; +}); +Clazz_defineMethod (c$, "getArgument", +function () { +return this.arg; +}); +Clazz_overrideMethod (c$, "toString", +function () { +var str = this.getClass ().getName () + "[source=" + this.source + " + id=" + this.id; +if (this.arg != null) { +str += " + arg=" + this.arg; +}str += " ]"; +return str; +}); +}); +Clazz_declarePackage ("jssun.applet"); +Clazz_load (["jssun.applet.AppletListener"], "jssun.applet.AppletEventMulticaster", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.a = null; +this.b = null; +Clazz_instantialize (this, arguments); +}, jssun.applet, "AppletEventMulticaster", null, jssun.applet.AppletListener); +Clazz_makeConstructor (c$, +function (a, b) { +this.a = a; +this.b = b; +}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); +Clazz_defineMethod (c$, "appletStateChanged", +function (e) { +this.a.appletStateChanged (e); +this.b.appletStateChanged (e); +}, "jssun.applet.AppletEvent"); +c$.add = Clazz_defineMethod (c$, "add", +function (a, b) { +return jssun.applet.AppletEventMulticaster.addInternal (a, b); +}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (l, oldl) { +return jssun.applet.AppletEventMulticaster.removeInternal (l, oldl); +}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); +c$.addInternal = Clazz_defineMethod (c$, "addInternal", + function (a, b) { +if (a == null) return b; +if (b == null) return a; +return new jssun.applet.AppletEventMulticaster (a, b); +}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); +Clazz_defineMethod (c$, "remove", +function (oldl) { +if (oldl === this.a) return this.b; +if (oldl === this.b) return this.a; +var a2 = jssun.applet.AppletEventMulticaster.removeInternal (this.a, oldl); +var b2 = jssun.applet.AppletEventMulticaster.removeInternal (this.b, oldl); +if (a2 === this.a && b2 === this.b) { +return this; +}return jssun.applet.AppletEventMulticaster.addInternal (a2, b2); +}, "jssun.applet.AppletListener"); +c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", + function (l, oldl) { +if (l === oldl || l == null) { +return null; +} else if (Clazz_instanceOf (l, jssun.applet.AppletEventMulticaster)) { +return (l).remove (oldl); +} else { +return l; +}}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); +}); +Clazz_declarePackage ("jssun.applet"); +Clazz_load (["java.util.EventListener"], "jssun.applet.AppletListener", null, function () { +Clazz_declareInterface (jssun.applet, "AppletListener", java.util.EventListener); +}); +Clazz_declarePackage ("jssun.misc"); +Clazz_load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.length = 0; +this.head = null; +this.tail = null; +Clazz_instantialize (this, arguments); +}, jssun.misc, "Queue"); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "enqueue", +function (obj) { +var newElt = new jssun.misc.QueueElement (obj); +if (this.head == null) { +this.head = newElt; +this.tail = newElt; +this.length = 1; +} else { +newElt.next = this.head; +this.head.prev = newElt; +this.head = newElt; +this.length++; +}this.notify (); +}, "~O"); +Clazz_defineMethod (c$, "dequeue", +function () { +return this.dequeue (0); +}); +Clazz_defineMethod (c$, "dequeue", +function (timeOut) { +while (this.tail == null) { +swingjs.JSToolkit.warn ("Cannot wait in Queue.java"); +this.wait (timeOut); +} +var elt = this.tail; +this.tail = elt.prev; +if (this.tail == null) { +this.head = null; +} else { +this.tail.next = null; +}this.length--; +return elt.obj; +}, "~N"); +Clazz_defineMethod (c$, "isEmpty", +function () { +return (this.tail == null); +}); +Clazz_defineMethod (c$, "elements", +function () { +return new jssun.misc.LIFOQueueEnumerator (this); +}); +Clazz_defineMethod (c$, "reverseElements", +function () { +return new jssun.misc.FIFOQueueEnumerator (this); +}); +Clazz_defineMethod (c$, "dump", +function (msg) { +System.err.println (">> " + msg); +System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + "")); +var cursor = this.head; +var last = null; +while (cursor != null) { +System.err.println (" " + cursor); +last = cursor; +cursor = cursor.next; +} +if (last !== this.tail) { +System.err.println (" tail != last: " + this.tail + ", " + last); +}System.err.println ("]"); +}, "~S"); +c$ = Clazz_decorateAsClass (function () { +this.queue = null; +this.cursor = null; +Clazz_instantialize (this, arguments); +}, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration); +Clazz_makeConstructor (c$, +function (q) { +this.queue = q; +this.cursor = q.tail; +}, "jssun.misc.Queue"); +Clazz_overrideMethod (c$, "hasMoreElements", +function () { +return (this.cursor != null); +}); +Clazz_overrideMethod (c$, "nextElement", +function () { +{ +if (this.cursor != null) { +var result = this.cursor; +this.cursor = this.cursor.prev; +return result.obj; +}}throw new java.util.NoSuchElementException ("FIFOQueueEnumerator"); +}); +c$ = Clazz_decorateAsClass (function () { +this.queue = null; +this.cursor = null; +Clazz_instantialize (this, arguments); +}, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration); +Clazz_makeConstructor (c$, +function (q) { +this.queue = q; +this.cursor = q.head; +}, "jssun.misc.Queue"); +Clazz_overrideMethod (c$, "hasMoreElements", +function () { +return (this.cursor != null); +}); +Clazz_overrideMethod (c$, "nextElement", +function () { +{ +if (this.cursor != null) { +var result = this.cursor; +this.cursor = this.cursor.next; +return result.obj; +}}throw new java.util.NoSuchElementException ("LIFOQueueEnumerator"); +}); +c$ = Clazz_decorateAsClass (function () { +this.next = null; +this.prev = null; +this.obj = null; +Clazz_instantialize (this, arguments); +}, jssun.misc, "QueueElement"); +Clazz_makeConstructor (c$, +function (obj) { +this.obj = obj; +}, "~O"); +Clazz_overrideMethod (c$, "toString", +function () { +return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]"; +}); +}); +Clazz_declarePackage ("javax.swing.plaf"); +Clazz_declareInterface (javax.swing.plaf, "UIResource"); +Clazz_declarePackage ("javax.swing.plaf"); +Clazz_load (["javax.swing.InputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.InputMapUIResource", null, function () { +c$ = Clazz_declareType (javax.swing.plaf, "InputMapUIResource", javax.swing.InputMap, javax.swing.plaf.UIResource); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.plaf.InputMapUIResource, []); +}); +}); +Clazz_declarePackage ("javax.swing.plaf"); +Clazz_load (["javax.swing.ActionMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ActionMapUIResource", null, function () { +c$ = Clazz_declareType (javax.swing.plaf, "ActionMapUIResource", javax.swing.ActionMap, javax.swing.plaf.UIResource); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, javax.swing.plaf.ActionMapUIResource, []); +}); +}); +Clazz_declarePackage ("javax.swing.plaf"); +Clazz_load (["java.awt.peer.LightweightPeer"], "javax.swing.plaf.ComponentUI", ["java.lang.Error", "java.awt.Component"], function () { +c$ = Clazz_declareType (javax.swing.plaf, "ComponentUI", null, java.awt.peer.LightweightPeer); +Clazz_makeConstructor (c$, +function () { +}); +Clazz_defineMethod (c$, "installUI", +function (c) { +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "uninstallUI", +function (c) { +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "paint", +function (g, c) { +}, "java.awt.Graphics,javax.swing.JComponent"); +Clazz_defineMethod (c$, "update", +function (g, c) { +}, "java.awt.Graphics,javax.swing.JComponent"); +Clazz_defineMethod (c$, "getPreferredSize", +function (c) { +return null; +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "getMinimumSize", +function (c) { +return this.getPreferredSize (c); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "getMaximumSize", +function (c) { +return null; +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "contains", +function (c, x, y) { +return c.inside (x, y); +}, "javax.swing.JComponent,~N,~N"); +c$.createUI = Clazz_defineMethod (c$, "createUI", +function (c) { +throw new Error ("ComponentUI.createUI not implemented."); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "getBaseline", +function (c, width, height) { +return -1; +}, "javax.swing.JComponent,~N,~N"); +Clazz_defineMethod (c$, "getBaselineResizeBehavior", +function (c) { +return java.awt.Component.BaselineResizeBehavior.OTHER; +}, "javax.swing.JComponent"); +}); +Clazz_declarePackage ("javax.swing.plaf"); +Clazz_load (["java.awt.Font", "javax.swing.plaf.UIResource"], "javax.swing.plaf.FontUIResource", null, function () { +c$ = Clazz_declareType (javax.swing.plaf, "FontUIResource", java.awt.Font, javax.swing.plaf.UIResource); +}); +Clazz_declarePackage ("javax.swing.plaf"); +Clazz_load (["java.awt.Color", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ColorUIResource", null, function () { +c$ = Clazz_declareType (javax.swing.plaf, "ColorUIResource", java.awt.Color, javax.swing.plaf.UIResource); +}); +Clazz_declarePackage ("javax.swing.plaf"); +Clazz_load (["javax.swing.ComponentInputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ComponentInputMapUIResource", null, function () { +c$ = Clazz_declareType (javax.swing.plaf, "ComponentInputMapUIResource", javax.swing.ComponentInputMap, javax.swing.plaf.UIResource); +}); +Clazz_declarePackage ("swingjs.api"); +Clazz_declareInterface (swingjs.api, "JSFunction"); +Clazz_declarePackage ("swingjs.api"); +Clazz_declareInterface (swingjs.api, "JSInterface"); +Clazz_declarePackage ("swingjs.api"); +c$ = Clazz_declareType (swingjs.api, "Interface"); +c$.getInstanceWithParams = Clazz_defineMethod (c$, "getInstanceWithParams", +function (name, classes, params) { +try { +var cl = Clazz._4Name (name); +return cl.getConstructor (classes).newInstance (params); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +return null; +} else { +throw e; +} +} +}, "~S,~A,~A"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function (name, isQuiet) { +try { +{ +Clazz._isQuiet = isQuiet; +}System.out.println ("swingjs.api.Interface creating instance of " + name); +var x = Clazz._4Name (name); +{ +Clazz._isQuiet = false; +}return (x == null ? null : x.newInstance ()); +} catch (e) { +if (Clazz_exceptionOf (e, Exception)) { +System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e); +return null; +} else { +throw e; +} +} +}, "~S,~B"); +Clazz_declarePackage ("swingjs.api"); +c$ = Clazz_declareType (swingjs.api, "DOMNode"); +c$.createElement = Clazz_defineMethod (c$, "createElement", +function (key, id) { +var obj = null; +{ +obj = document.createElement(key); +obj.id = id; +}return obj; +}, "~S,~S"); +c$.getParent = Clazz_defineMethod (c$, "getParent", +function (obj) { +{ +return obj.parentNode; +}}, "swingjs.api.DOMNode"); +c$.remove = Clazz_defineMethod (c$, "remove", +function (obj) { +{ +try { +var p = obj.parentNode; +p.removeNode(obj); +} catch(e) {}; +return p; +}}, "swingjs.api.DOMNode"); +c$.add = Clazz_defineMethod (c$, "add", +function (parent, child) { +{ +parent && parent.appendChild(child); +}}, "swingjs.api.DOMNode,swingjs.api.DOMNode"); +c$.getAttr = Clazz_defineMethod (c$, "getAttr", +function (obj, attr) { +{ +if (obj)return obj[attr]; +}}, "swingjs.api.DOMNode,~S"); +Clazz_defineMethod (c$, "getStyle", +function (style) { +{ +if (obj)return obj.style[style]; +}}, "~S"); +c$.setAttr = Clazz_defineMethod (c$, "setAttr", +function (obj, attr, val) { +{ +obj[attr] = (val == "TRUE" ? true : val); +}return obj; +}, "swingjs.api.DOMNode,~S,~O"); +c$.setStyles = Clazz_defineMethod (c$, "setStyles", +function (obj, attr) { +{ +for (var i = 0; i < attr.length;) { +//System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]]) +; +obj.style[attr[i++]] = attr[i++]; } +}return obj; +}, "swingjs.api.DOMNode,~A"); +c$.setSize = Clazz_defineMethod (c$, "setSize", +function (obj, width, height) { +return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]); +}, "swingjs.api.DOMNode,~N,~N"); +Clazz_declarePackage ("swingjs"); +c$ = Clazz_declareType (swingjs, "JSUtil"); +c$.split = Clazz_defineMethod (c$, "split", +function (text, run) { +if (text.length == 0) return new Array (0); +var n = 1; +var i = text.indexOf (run); +var lines; +var runLen = run.length; +if (i < 0 || runLen == 0) { +lines = new Array (1); +lines[0] = text; +return lines; +}var len = text.length - runLen; +for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen); + +lines = new Array (n); +i = 0; +var ipt = 0; +var pt = 0; +for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) { +lines[pt++] = text.substring (i, ipt); +i = ipt + runLen; +} +if (text.indexOf (run, len) != len) len += runLen; +lines[pt] = text.substring (i, len); +return lines; +}, "~S,~S"); +Clazz_declarePackage ("swingjs"); +Clazz_load (["jssun.awt.SunToolkit"], "swingjs.JSToolkit", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "$.InputStream", "java.lang.Boolean", "$.Thread", "java.util.Hashtable", "JU.AU", "$.Rdr", "$.SB", "java.awt.Dimension", "java.awt.image.ColorModel", "javax.swing.UIManager", "jssun.awt.AppContext", "swingjs.JSComponentPeer", "$.JSImage", "swingjs.api.Interface"], function () { +c$ = Clazz_decorateAsClass (function () { +this.imageKit = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSToolkit", jssun.awt.SunToolkit); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, swingjs.JSToolkit); +System.out.println ("JSToolkit initialized"); +}); +c$.warn = Clazz_defineMethod (c$, "warn", +function (msg) { +swingjs.JSToolkit.alert (msg); +}, "~S"); +c$.alert = Clazz_defineMethod (c$, "alert", +function (object) { +{ +console.log("[JSToolkit] " + object); +alert("[JSToolkit] " + object); +}}, "~O"); +c$.log = Clazz_defineMethod (c$, "log", +function (msg) { +{ +System.out.println(msg); +console.log(msg); +}}, "~S"); +c$.confirm = Clazz_defineMethod (c$, "confirm", +function (msg) { +{ +return confirm(msg); +}}, "~S"); +c$.prompt = Clazz_defineMethod (c$, "prompt", +function (msg, defaultRet) { +{ +return confirm(msg, defaultRet); +}}, "~S,~S"); +c$.getPostEventQueue = Clazz_defineMethod (c$, "getPostEventQueue", +function (isPost) { +return (isPost ? jssun.awt.AppContext.getAppContext ().get ("PostEventQueue") : jssun.awt.AppContext.getAppContext ().get (jssun.awt.AppContext.EVENT_QUEUE_KEY)); +}, "~B"); +Clazz_overrideMethod (c$, "getScreenSize", +function () { +var d = new java.awt.Dimension (0, 0); +var jq = swingjs.JSToolkit.getJQuery (); +{ +d.setSize(jq.$(window).width(), jq.$(window).height()); return +d; +}}); +Clazz_overrideMethod (c$, "getScreenResolution", +function () { +return 0; +}); +Clazz_overrideMethod (c$, "getColorModel", +function () { +return java.awt.image.ColorModel.getRGBdefault (); +}); +Clazz_overrideMethod (c$, "getFontList", +function () { +var hardwiredFontList = Clazz_newArray (-1, ["SansSerif", "SansSerif", "Serif", "Monospaced", "DialogInput"]); +return hardwiredFontList; +}); +Clazz_overrideMethod (c$, "sync", +function () { +}); +Clazz_overrideMethod (c$, "isModalExclusionTypeSupported", +function (modalExclusionType) { +return true; +}, "java.awt.Dialog.ModalExclusionType"); +Clazz_overrideMethod (c$, "isModalityTypeSupported", +function (modalityType) { +return false; +}, "java.awt.Dialog.ModalityType"); +Clazz_overrideMethod (c$, "isTraySupported", +function () { +return false; +}); +Clazz_overrideMethod (c$, "getScreenWidth", +function () { +return 0; +}); +Clazz_overrideMethod (c$, "getScreenHeight", +function () { +return 0; +}); +Clazz_overrideMethod (c$, "grab", +function (w) { +}, "java.awt.Window"); +Clazz_overrideMethod (c$, "ungrab", +function (w) { +}, "java.awt.Window"); +c$.getPropertyObject = Clazz_defineMethod (c$, "getPropertyObject", +function (t, key, def) { +return def; +}, "~O,~S,~O"); +c$.getInstance = Clazz_defineMethod (c$, "getInstance", +function (className) { +return swingjs.api.Interface.getInstance (className, false); +}, "~S"); +c$.getGraphicsConfiguration = Clazz_defineMethod (c$, "getGraphicsConfiguration", +function () { +return (swingjs.JSToolkit.gc == null ? swingjs.JSToolkit.gc = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsConfiguration") : swingjs.JSToolkit.gc); +}); +c$.isFocused = Clazz_defineMethod (c$, "isFocused", +function (window) { +return false; +}, "java.awt.Window"); +c$.getCSSFont = Clazz_defineMethod (c$, "getCSSFont", +function (font) { +var css = ""; +if (font.isItalic ()) css += "font-style:italic;"; +if (font.isBold ()) css += "font-weight:bold;"; +css += "font-size:" + font.getSize () + "px;"; +css += "font-family:" + font.getFamily () + ";"; +return css; +}, "java.awt.Font"); +c$.getStringWidth = Clazz_defineMethod (c$, "getStringWidth", +function (context, font, text) { +var fontInfo = swingjs.JSToolkit.getCanvasFont (font); +if (context == null) context = swingjs.JSToolkit.getDefaultCanvasContext2d (); +var w = 0; +{ +context.font = fontInfo; +w = Math.ceil(context.measureText(text).width); +}return w; +}, "swingjs.api.HTML5CanvasContext2D,java.awt.Font,~S"); +c$.getDefaultCanvasContext2d = Clazz_defineMethod (c$, "getDefaultCanvasContext2d", +function () { +{ +if (this.defaultContext == null) this.defaultContext = +document.createElement( 'canvas' ).getContext('2d'); +}return swingjs.JSToolkit.defaultContext; +}); +c$.getCanvasFont = Clazz_defineMethod (c$, "getCanvasFont", +function (font) { +var strStyle = ""; +if (font.isItalic ()) strStyle += "italic "; +if (font.isBold ()) strStyle += "bold "; +return strStyle + font.getSize () + "px " + font.getFamily (); +}, "java.awt.Font"); +c$.getFontFamily = Clazz_defineMethod (c$, "getFontFamily", +function (font) { +return font.getName (); +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "getFontMetrics", +function (font) { +var fm = swingjs.JSToolkit.getInstance ("swingjs.JSFontMetrics"); +fm.setFont (font); +return fm; +}, "java.awt.Font"); +c$.getCSSColor = Clazz_defineMethod (c$, "getCSSColor", +function (c) { +var s = "000000" + Integer.toHexString (c.getRGB () & 0xFFFFFF); +return "#" + s.substring (s.length - 6); +}, "java.awt.Color"); +c$.notImplemented = Clazz_defineMethod (c$, "notImplemented", +function (msg) { +var s = null; +if (swingjs.JSToolkit.mapNotImpl == null) swingjs.JSToolkit.mapNotImpl = new java.util.Hashtable (); +{ +s = arguments.callee.caller; s = s.__CLASS_NAME__ || +s.claxxOwner.__CLASS_NAME__; s += "." + +arguments.callee.caller.exName; +}if (swingjs.JSToolkit.mapNotImpl.containsKey (s)) return; +swingjs.JSToolkit.mapNotImpl.put (s, Boolean.TRUE); +System.out.println (s + " has not been implemented in SwingJS. " + (msg === "" ? "" : (msg == null ? "" : msg) + swingjs.JSToolkit.getStackTrace (-5))); +}, "~S"); +c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", +function () { +{ +return Clazz_getStackTrace(); +}}); +c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", +function (n) { +{ +return Clazz_getStackTrace(n); +}}, "~N"); +c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", +function () { +if (swingjs.JSToolkit.uid == null) swingjs.JSToolkit.uid = javax.swing.UIManager.getLookAndFeel ().getDefaults (); +return swingjs.JSToolkit.uid; +}); +c$.getComponentUI = Clazz_defineMethod (c$, "getComponentUI", +function (target) { +var c = swingjs.api.Interface.getInstance ("swingjs.plaf.JS" + target.getUIClassID (), true); +if (c != null) c.set (target); +return c; +}, "javax.swing.JComponent"); +c$.getSwingDivId = Clazz_defineMethod (c$, "getSwingDivId", +function () { +return Thread.currentThread ().getName () + "_swingdiv"; +}); +c$.getJQuery = Clazz_defineMethod (c$, "getJQuery", +function () { +{ +if (!window.jQuery) alert( +"jQuery is required for SwingJS, but window.jQuery is not defined." +); jQuery.$ || (jQuery.$ = jQuery); return(jQuery); +}}); +c$.getJavaResource = Clazz_defineMethod (c$, "getJavaResource", +function (resourceName, isJavaPath) { +System.out.println ("JSToolkit getting Java resource " + resourceName); +{ +return SwingJS.getJavaResource(resourceName, isJavaPath); +}}, "~S,~B"); +c$.dispatchSystemEvent = Clazz_defineMethod (c$, "dispatchSystemEvent", +function (runnable) { +var f = null; +{ +System.out.println("JST dispatchSystemEvent " + +runnable.run.toString()); f = +function(_JSToolkit_dispatchSystemEvent) { +System.out.println("JST running " + +runnable.run.toString());runnable.run()}; +}swingjs.JSToolkit.setTimeout (f, 0, 0); +}, "Runnable"); +c$.dispatchEvent = Clazz_defineMethod (c$, "dispatchEvent", +function (event, src, andWait) { +var f = null; +var id = ++swingjs.JSToolkit.dispatchID; +{ +f = function() +{ +if +(src == null) event.dispatch(); else src.dispatchEvent(event); +}; +}if (andWait) swingjs.JSToolkit.invokeAndWait (f, id); + else swingjs.JSToolkit.setTimeout (f, 0, id); +}, "java.awt.AWTEvent,~O,~B"); +c$.setTimeout = Clazz_defineMethod (c$, "setTimeout", +function (f, msDelay, id) { +{ +var thread = java.lang.Thread.thisThread; +var thread0 = thread; +var id0 = SwingJS.eventID || 0; +setTimeout(function(_JSToolkit_setTimeout) { +SwingJS.eventID = id; +java.lang.Thread.thisThread = thread; +try { +if (f.run) +f.run(); +else +f(); +} catch (e) { +var s = "JSToolkit.setTimeout(" + id +"): " + e; +System.out.println(s); +alert(s)} +SwingJS.eventID = id0; +java.lang.Thread.thisThread = thread0; +}, msDelay); +}}, "~O,~N,~N"); +c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", + function (f, id) { +{ +var thread = java.lang.Thread.thisThread; +var thread0 = thread; +(function(_JSToolkit_setTimeout) { +var id0 = SwingJS.eventID || 0; +System.out.println("runNow " + id); SwingJS.eventID = id; +java.lang.Thread.thisThread = thread; +if (f.run) +f.run(); +else +f(); +SwingJS.eventID = id0; +java.lang.Thread.thisThread = thread0; +})(); +}}, "swingjs.api.JSFunction,~N"); +c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", +function () { +{ +return (!!SwingJS.eventID); +}}); +c$.checkClassMethod = Clazz_defineMethod (c$, "checkClassMethod", +function (component, fname, signature) { +{ +return component[fname] && component[fname][signature]; +}}, "java.awt.Component,~S,~S"); +c$.readyCallback = Clazz_defineMethod (c$, "readyCallback", +function (aname, fname, a, me) { +{ +Jmol._readyCallback(aname, fname, true,a, me); +}}, "~S,~S,~O,~O"); +c$.forceRepaint = Clazz_defineMethod (c$, "forceRepaint", +function (c) { +}, "java.awt.Component"); +c$.getHTML5Applet = Clazz_defineMethod (c$, "getHTML5Applet", +function (c) { +return (c.getAppContext ().getThreadGroup ()).getHtmlApplet (); +}, "javax.swing.JComponent"); +c$.taintUI = Clazz_defineMethod (c$, "taintUI", +function (c) { +{ +c.getUI && c.getUI() && c.getUI().setTainted(); +}}, "java.awt.Component"); +Clazz_overrideMethod (c$, "createComponent", +function (target) { +System.out.println ("JSToolkit creating LightweightPeer for " + target); +var peer = swingjs.JSToolkit.getUI (target, true); +return (peer == null ? new swingjs.JSComponentPeer (target) : peer); +}, "java.awt.Component"); +c$.getPlainDocument = Clazz_defineMethod (c$, "getPlainDocument", +function (c) { +return swingjs.JSToolkit.getInstance ("swingjs.JSPlainDocument"); +}, "javax.swing.JComponent"); +c$.getClassName = Clazz_defineMethod (c$, "getClassName", +function (c) { +{ +return c.__CLASS_NAME__; +}}, "~O"); +c$.getSignedStreamBytes = Clazz_defineMethod (c$, "getSignedStreamBytes", +function (bis) { +try { +return JU.AU.ensureSignedBytes (JU.Rdr.getStreamAsBytes (bis, null)); +} catch (e) { +if (Clazz_exceptionOf (e, java.io.IOException)) { +return null; +} else { +throw e; +} +} +}, "java.io.BufferedInputStream"); +c$.getFileContents = Clazz_defineMethod (c$, "getFileContents", +function (uri) { +{ +return Jmol._getFileData(uri); +}}, "~S"); +Clazz_defineMethod (c$, "getFileAsBytes", +function (filename) { +var data = swingjs.JSToolkit.getFileContents (filename); +var b = null; +if (JU.AU.isAB (data)) b = data; + else if (Clazz_instanceOf (data, String)) b = (data).getBytes (); + else if (Clazz_instanceOf (data, JU.SB)) b = JU.Rdr.getBytesFromSB (data); + else if (Clazz_instanceOf (data, java.io.InputStream)) try { +b = JU.Rdr.getLimitedStreamBytes (data, -1); +} catch (e) { +if (Clazz_exceptionOf (e, java.io.IOException)) { +} else { +throw e; +} +} +return JU.AU.ensureSignedBytes (b); +}, "~S"); +Clazz_defineMethod (c$, "getImagekit", + function () { +return (this.imageKit == null ? this.imageKit = swingjs.api.Interface.getInstance ("swingjs.JSImagekit", false) : this.imageKit); +}); +Clazz_defineMethod (c$, "createImage", +function (producer) { +producer.startProduction (null); +return null; +}, "java.awt.image.ImageProducer"); +Clazz_defineMethod (c$, "createImage", +function (filename) { +return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (this.getFileAsBytes (filename)))), 0, -1); +}, "~S"); +Clazz_defineMethod (c$, "createImage", +function (url) { +try { +return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream (url.openStream ())), 0, -1); +} catch (e) { +if (Clazz_exceptionOf (e, java.io.IOException)) { +return null; +} else { +throw e; +} +} +}, "java.net.URL"); +Clazz_defineMethod (c$, "createImage", +function (data, imageoffset, imagelength) { +if (data == null) { +var width = imageoffset; +var height = imagelength; +return new swingjs.JSImage (null, width, height); +}return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength); +}, "~A,~N,~N"); +Clazz_overrideMethod (c$, "checkImage", +function (image, width, height, observer) { +return 63; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "prepareImage", +function (image, width, height, observer) { +return true; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +c$.hasFocus = Clazz_defineMethod (c$, "hasFocus", +function (c) { +var ui = swingjs.JSToolkit.getUI (c, false); +return (ui != null && ui.hasFocus ()); +}, "java.awt.Component"); +c$.getUI = Clazz_defineMethod (c$, "getUI", +function (c, isQuiet) { +var ui = null; +{ +ui = c.getUI && c.getUI(); +}if (ui == null) { +var s = "[JSToolkit] Component " + c.getClass ().getName () + " has no cooresponding JSComponentUI."; +System.out.println (s); +}return ui; +}, "java.awt.Component,~B"); +c$.requestFocus = Clazz_defineMethod (c$, "requestFocus", +function (c) { +var ui = swingjs.JSToolkit.getUI (c, false); +if (ui == null || !ui.isFocusable ()) return false; +var r = ((Clazz_isClassDefined ("swingjs.JSToolkit$1") ? 0 : swingjs.JSToolkit.$JSToolkit$1$ ()), Clazz_innerTypeInstance (swingjs.JSToolkit$1, this, Clazz_cloneFinals ("ui", ui))); +swingjs.JSToolkit.setTimeout (r, 50, 0); +return true; +}, "java.awt.Component"); +c$.getCompositor = Clazz_defineMethod (c$, "getCompositor", +function () { +return (swingjs.JSToolkit.compositor == null ? swingjs.JSToolkit.compositor = swingjs.api.Interface.getInstance ("swingjs.JSGraphicsCompositor", false) : swingjs.JSToolkit.compositor); +}); +c$.setGraphicsCompositeAlpha = Clazz_defineMethod (c$, "setGraphicsCompositeAlpha", +function (g, rule) { +return swingjs.JSToolkit.getCompositor ().setGraphicsCompositeAlpha (g, rule); +}, "swingjs.JSGraphics2D,~N"); +c$.drawImageOp = Clazz_defineMethod (c$, "drawImageOp", +function (g, img, op, x, y) { +return swingjs.JSToolkit.getCompositor ().drawImageOp (g, img, op, x, y); +}, "swingjs.JSGraphics2D,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N"); +c$.filterRaster = Clazz_defineMethod (c$, "filterRaster", +function (src, dst, op) { +return swingjs.JSToolkit.getCompositor ().filterRaster (src, dst, op); +}, "java.awt.image.Raster,java.awt.image.WritableRaster,java.awt.image.RasterOp"); +c$.filterImage = Clazz_defineMethod (c$, "filterImage", +function (src, dst, op) { +return swingjs.JSToolkit.getCompositor ().filterImage (src, dst, op); +}, "java.awt.image.BufferedImage,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp"); +c$.getZIndex = Clazz_defineMethod (c$, "getZIndex", +function (ui, what) { +{ +if (what) return getHTML5Applet(ui.c)._z[what]; +var c = ui.domNode; var z; +while (c && !(z = c.style["z-index"])) { +c = c.parentNode; +} +return z || 100000; +}}, "swingjs.plaf.JSComponentUI,~S"); +Clazz_overrideMethod (c$, "createFrame", +function (target) { +return this.createWindowPeer (target, true); +}, "java.awt.Frame"); +Clazz_overrideMethod (c$, "createWindow", +function (target) { +return this.createWindowPeer (target, false); +}, "java.awt.Window"); +Clazz_defineMethod (c$, "createWindowPeer", + function (target, isFrame) { +return (swingjs.JSToolkit.getInstance ("swingjs.JSWindowPeer")).setFrame (target, true); +}, "java.awt.Window,~B"); +c$.$JSToolkit$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (swingjs, "JSToolkit$1", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +this.f$.ui.requestFocus (null, false, false, 0, null); +}); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"gc", null, +"defaultContext", null, +"mapNotImpl", null, +"uid", null, +"dispatchID", 0, +"compositor", null); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () { +c$ = Clazz_declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent); +Clazz_makeConstructor (c$, +function (t, r) { +Clazz_superConstructor (this, swingjs.JSEvent, [t, 1201, r, null, false]); +}, "swingjs.JSThread,Runnable"); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.awt.FontMetrics"], "swingjs.JSFontMetrics", ["swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.widths = null; +this.iwidths = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSFontMetrics", java.awt.FontMetrics); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, swingjs.JSFontMetrics, [null]); +}); +Clazz_defineMethod (c$, "setFont", +function (f) { +this.font = f; +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "getLeading", +function () { +return Clazz_doubleToInt (this.font.getSize () / 20) + 1; +}); +Clazz_overrideMethod (c$, "getAscent", +function () { +return this.font.getSize (); +}); +Clazz_overrideMethod (c$, "getDescent", +function () { +return Clazz_doubleToInt (this.font.getSize () / 4) + 1; +}); +Clazz_defineMethod (c$, "charWidth", +function (pt) { +return (pt.charCodeAt (0) < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt.charCodeAt (0)]) : this.stringWidth ("" + pt)); +}, "~S"); +Clazz_defineMethod (c$, "charWidth", +function (pt) { +return (pt < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt]) : this.stringWidth ("" + String.fromCharCode (pt))); +}, "~N"); +Clazz_overrideMethod (c$, "stringWidth", +function (s) { +return Clazz_floatToInt (swingjs.JSToolkit.getStringWidth (null, this.font, s)); +}, "~S"); +Clazz_overrideMethod (c$, "getWidths", +function () { +if (this.iwidths != null) return this.iwidths; +this.iwidths = Clazz_newIntArray (256, 0); +this.getWidthsFloat (); +for (var ch = 0; ch < 256; ch++) { +this.iwidths[ch] = Clazz_floatToInt (this.widths[ch]); +} +return this.iwidths; +}); +Clazz_defineMethod (c$, "getWidthsFloat", +function () { +if (this.widths != null) return this.widths; +this.widths = Clazz_newFloatArray (256, 0); +for (var ch = 0; ch < 256; ch++) { +this.widths[ch] = swingjs.JSToolkit.getStringWidth (null, this.font, "" + String.fromCharCode (ch)); +} +return this.widths; +}); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.isJS = false; +Clazz_instantialize (this, arguments); +}, swingjs, "JSThread", Thread, swingjs.api.JSFunction); +Clazz_makeConstructor (c$, +function (group, name) { +Clazz_superConstructor (this, swingjs.JSThread, [group, name]); +{ +this.isJS = true; +}}, "ThreadGroup,~S"); +Clazz_overrideMethod (c$, "run", +function () { +this.run1 (0); +}); +Clazz_defineMethod (c$, "start", +function () { +{ +swingjs.JSToolkit.setTimeout(this, 1, 0); +}}); +Clazz_defineMethod (c$, "sleepAndReturn", +function (delay, state) { +if (!this.isJS) { +Thread.sleep (delay); +return false; +}var me = this; +var r = ((Clazz_isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSThread$1, this, Clazz_cloneFinals ("me", me, "state", state))); +{ +setTimeout( +function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))}, +delay +); +}return true; +}, "~N,~N"); +c$.$JSThread$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (swingjs, "JSThread$1", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +this.f$.me.run1 (this.f$.state); +}); +c$ = Clazz_p0p (); +}; +Clazz_defineStatics (c$, +"INIT", 0, +"LOOP", 1, +"DONE", 2); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.lang.ThreadGroup"], "swingjs.JSThreadGroup", null, function () { +c$ = Clazz_decorateAsClass (function () { +this.html5Applet = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSThreadGroup", ThreadGroup); +Clazz_defineMethod (c$, "setHtmlApplet", +function (html5Applet) { +this.html5Applet = html5Applet; +}, "swingjs.api.HTML5Applet"); +Clazz_defineMethod (c$, "getHtmlApplet", +function () { +return this.html5Applet; +}); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.applet.AppletContext", "$.AppletStub", "java.awt.Panel", "swingjs.api.JSInterface", "java.awt.Dimension"], "swingjs.JSAppletPanel", ["java.lang.InstantiationException", "java.net.URL", "java.awt.BorderLayout", "$.Font", "$.Toolkit", "javax.swing.JApplet", "jssun.applet.AppletEvent", "$.AppletEventMulticaster", "swingjs.JSAppletThread", "$.JSGraphics2D", "$.JSMouse", "$.JSThreadGroup", "$.JSToolkit", "$.JSUtil", "swingjs.api.Interface"], function () { +c$ = Clazz_decorateAsClass (function () { +this.params = null; +this.html5Applet = null; +this.fullName = null; +this.appletCodeBase = null; +this.appletIdiomaBase = null; +this.appletDocumentBase = null; +this.maximumSize = 2147483647; +this.appletName = null; +this.syncId = null; +this.testAsync = false; +this.async = false; +this.strJavaVersion = null; +this.strJavaVendor = null; +this.display = null; +this.canvas = null; +this.jsgraphics = null; +this.applet = null; +this.defaultAppletSize = null; +this.currentAppletSize = null; +this.nextStatus = 0; +this.status = 0; +this.listeners = null; +this.mouse = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSAppletPanel", java.awt.Panel, [java.applet.AppletStub, java.applet.AppletContext, swingjs.api.JSInterface]); +Clazz_prepareFields (c$, function () { +this.defaultAppletSize = new java.awt.Dimension (10, 10); +this.currentAppletSize = new java.awt.Dimension (10, 10); +}); +Clazz_makeConstructor (c$, +function (params) { +Clazz_superConstructor (this, swingjs.JSAppletPanel, []); +this.setPanel (); +this.set (params); +}, "java.util.Hashtable"); +Clazz_defineMethod (c$, "set", + function (params) { +System.out.println ("JSAppletPanel initializing"); +this.params = params; +this.htmlName = swingjs.JSUtil.split ("" + this.getParameter ("name"), "_object")[0]; +this.appletName = swingjs.JSUtil.split (this.htmlName + "_", "_")[0]; +this.syncId = this.getParameter ("syncId"); +this.fullName = this.htmlName + "__" + this.syncId + "__"; +params.put ("fullName", this.fullName); +var o = params.get ("codePath"); +if (o == null) o = "../java/"; +this.appletCodeBase = o.toString (); +this.appletIdiomaBase = this.appletCodeBase.substring (0, this.appletCodeBase.lastIndexOf ("/", this.appletCodeBase.length - 2) + 1) + "idioma"; +o = params.get ("documentBase"); +this.appletDocumentBase = (o == null ? "" : o.toString ()); +if (params.containsKey ("maximumSize")) Math.max ((params.get ("maximumSize")).intValue (), 100); +this.async = (this.testAsync || params.containsKey ("async")); +var applet = null; +var javaver = "?"; +{ +if(self.Jmol) { applet = +Jmol._applets[this.htmlName.split("_object")[0]]; javaver = +Jmol._version; } +}this.html5Applet = applet; +this.strJavaVersion = javaver; +this.strJavaVendor = "Java2Script/Java 1.6 (HTML5)"; +this.display = params.get ("display"); +this.threadGroup = new swingjs.JSThreadGroup (this.appletName); +this.myThread = new swingjs.JSAppletThread (this, this.threadGroup, this.appletName); +(this.threadGroup).setHtmlApplet (this.html5Applet); +{ +Jmol._applets[this.appletName + "_thread"] = +java.lang.Thread.thisThread = this.myThread; +}this.appContext = swingjs.JSToolkit.createNewAppContext (); +java.awt.Toolkit.getDefaultToolkit (); +try { +java.net.URL.setURLStreamHandlerFactory (swingjs.api.Interface.getInstance ("JU.AjaxURLStreamHandlerFactory", false)); +} catch (e) { +} +System.out.println ("JSAppletPanel initialized"); +}, "java.util.Hashtable"); +Clazz_defineMethod (c$, "start", +function () { +if (this.status == 0) this.myThread.start (); + else this.showStatus ("already started"); +}); +Clazz_defineMethod (c$, "addAppletListener", +function (l) { +this.listeners = jssun.applet.AppletEventMulticaster.add (this.listeners, l); +}, "jssun.applet.AppletListener"); +Clazz_defineMethod (c$, "removeAppletListener", +function (l) { +this.listeners = jssun.applet.AppletEventMulticaster.remove (this.listeners, l); +}, "jssun.applet.AppletListener"); +Clazz_defineMethod (c$, "dispatchAppletEvent", +function (id, argument) { +if (this.listeners != null) { +var evt = new jssun.applet.AppletEvent (this, id, argument); +this.listeners.appletStateChanged (evt); +}}, "~N,~O"); +Clazz_defineMethod (c$, "getCode", + function () { +return this.getParameter ("code"); +}); +Clazz_defineMethod (c$, "getCanvas", + function () { +return (this.canvas == null ? (this.canvas = this.html5Applet._getHtml5Canvas ()) : this.canvas); +}); +Clazz_overrideMethod (c$, "isActive", +function () { +return true; +}); +Clazz_overrideMethod (c$, "appletResize", +function (width, height) { +var currentSize = new java.awt.Dimension (this.currentAppletSize.width, this.currentAppletSize.height); +this.currentAppletSize.width = width; +this.currentAppletSize.height = height; +this.applet.setBounds (0, 0, this.getWidth (), this.getHeight ()); +this.applet.getRootPane ().setBounds (0, 0, this.getWidth (), this.getHeight ()); +this.applet.getContentPane ().setBounds (0, 0, this.getWidth (), this.getHeight ()); +(this.applet.getContentPane ()).revalidate (); +this.dispatchAppletEvent (51234, currentSize); +}, "~N,~N"); +Clazz_overrideMethod (c$, "getDocumentBase", +function () { +try { +return new java.net.URL (this.params.get ("documentBase")); +} catch (e) { +if (Clazz_exceptionOf (e, java.net.MalformedURLException)) { +return null; +} else { +throw e; +} +} +}); +Clazz_overrideMethod (c$, "getCodeBase", +function () { +try { +return new java.net.URL (this.params.get ("codePath")); +} catch (e) { +if (Clazz_exceptionOf (e, java.net.MalformedURLException)) { +return null; +} else { +throw e; +} +} +}); +Clazz_overrideMethod (c$, "getParameter", +function (name) { +var s = this.params.get (name); +System.out.println ("get parameter: " + name + " = " + s); +return (s == null ? null : "" + s); +}, "~S"); +Clazz_overrideMethod (c$, "getAppletContext", +function () { +return this; +}); +Clazz_defineMethod (c$, "getHeight", +function () { +return this.html5Applet._getHeight (); +}); +Clazz_defineMethod (c$, "getWidth", +function () { +return this.html5Applet._getWidth (); +}); +Clazz_defineMethod (c$, "setBounds", +function (x, y, width, height) { +this.reshape (x, y, width, height); +this.currentAppletSize.width = width; +this.currentAppletSize.height = height; +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getImage", +function (url) { +return null; +}, "java.net.URL"); +Clazz_overrideMethod (c$, "getApplet", +function (name) { +var applet = null; +{ +applet = Jmol._applets[name]; applet && (applet = +applet._applet); +}return applet; +}, "~S"); +Clazz_overrideMethod (c$, "getApplets", +function () { +return null; +}); +Clazz_defineMethod (c$, "showDocument", +function (url) { +{ +window.open(url.toString()); +}}, "java.net.URL"); +Clazz_defineMethod (c$, "showDocument", +function (url, target) { +{ +window.open(url.toString(), target); +}}, "java.net.URL,~S"); +Clazz_defineMethod (c$, "showStatus", +function (status) { +swingjs.JSToolkit.log (status); +{ +Clazz._LoaderProgressMonitor.showStatus(status, true); +}}, "~S"); +Clazz_overrideMethod (c$, "cacheFileByName", +function (fileName, isAdd) { +return 0; +}, "~S,~B"); +Clazz_overrideMethod (c$, "cachePut", +function (key, data) { +}, "~S,~O"); +Clazz_overrideMethod (c$, "destroy", +function () { +}); +Clazz_overrideMethod (c$, "getFullName", +function () { +return this.fullName; +}); +Clazz_overrideMethod (c$, "openFileAsyncSpecial", +function (fileName, flags) { +}, "~S,~N"); +Clazz_defineMethod (c$, "processMouseEvent", +function (id, x, y, modifiers, time) { +this.getMouse ().processEvent (id, x, y, modifiers, time); +return false; +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "getMouse", + function () { +return (this.mouse == null ? this.mouse = new swingjs.JSMouse (this) : this.mouse); +}); +Clazz_overrideMethod (c$, "processTwoPointGesture", +function (touches) { +this.getMouse ().processTwoPointGesture (touches); +}, "~A"); +Clazz_overrideMethod (c$, "setDisplay", +function (canvas) { +this.canvas = canvas; +}, "swingjs.api.HTML5Canvas"); +Clazz_overrideMethod (c$, "setScreenDimension", +function (width, height) { +this.setGraphics (this.jsgraphics = null); +if (this.applet != null) this.applet.resize (width, height); +}, "~N,~N"); +Clazz_overrideMethod (c$, "setStatusDragDropped", +function (mode, x, y, fileName) { +return false; +}, "~N,~N,~N,~S"); +Clazz_overrideMethod (c$, "startHoverWatcher", +function (enable) { +}, "~B"); +Clazz_overrideMethod (c$, "paint", +function (g) { +this.applet.paint (this.setGraphics (g)); +}, "java.awt.Graphics"); +Clazz_defineMethod (c$, "setGraphics", + function (g) { +return (g == null ? this.getGraphics () : g); +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "getGraphics", +function () { +if (this.jsgraphics == null) { +this.jsgraphics = new swingjs.JSGraphics2D (this.getCanvas ()); +this.jsgraphics.setWindowParameters (this.getWidth (), this.getHeight ()); +}return this.jsgraphics; +}); +Clazz_defineMethod (c$, "showAppletStatus", + function (status) { +this.getAppletContext ().showStatus (this.htmlName + " " + status); +}, "~S"); +Clazz_defineMethod (c$, "showAppletException", + function (t) { +{ +this.showAppletStatus("error " + (t.getMessage ? +t.getMessage() : t)); t.printStackTrace && +t.printStackTrace(); +}this.repaint (); +}, "Throwable"); +Clazz_defineMethod (c$, "run1", +function (mode) { +var ok = false; +switch (mode) { +case 0: +this.currentAppletSize.width = this.defaultAppletSize.width = this.getWidth (); +this.currentAppletSize.height = this.defaultAppletSize.height = this.getHeight (); +this.setLayout ( new java.awt.BorderLayout ()); +this.nextStatus = 1; +ok = true; +break; +case 1: +switch (this.nextStatus) { +case 1: +if (this.status != 0) { +this.showAppletStatus ("notdisposed"); +this.status = 7; +break; +}System.out.println ("JSAppletPanel runloader"); +this.runLoader (); +this.nextStatus = 2; +ok = true; +break; +case 2: +if (this.status != 1 && this.status != 5) { +this.showAppletStatus ("notloaded"); +break; +}System.out.println ("JSAppletPanel init"); +this.setFont ( new java.awt.Font ("Dialog", 0, 12)); +this.applet.resize (this.defaultAppletSize); +this.applet.init (); +this.validate (); +this.status = 2; +this.showAppletStatus ("initialized"); +this.nextStatus = 3; +ok = true; +break; +case 3: +if (this.status != 2 && this.status != 4) { +this.showAppletStatus ("notstarted"); +this.status = 7; +break; +}this.applet.getRootPane ().addNotify (); +System.out.println ("JSAppletPanel start" + this.currentAppletSize); +this.applet.resize (this.currentAppletSize); +this.applet.start (); +this.status = 3; +this.showAppletStatus ("started"); +this.nextStatus = 35; +ok = true; +break; +case 35: +swingjs.JSToolkit.readyCallback (this.appletName, this.fullName, this.applet, this); +break; +case 4: +if (this.status == 3) { +this.status = 4; +this.applet.setVisible (false); +this.applet.stop (); +this.showAppletStatus ("stopped"); +} else { +this.showAppletStatus ("notstopped"); +this.status = 7; +}break; +case 5: +if (this.status == 4 || this.status == 2) { +this.status = 5; +this.applet.destroy (); +this.showAppletStatus ("destroyed"); +} else { +this.showAppletStatus ("notdestroyed"); +this.status = 7; +}break; +case 75: +if (this.status == 5 || this.status == 1) { +this.showAppletStatus ("notdisposed"); +this.status = 7; +} else { +this.status = 0; +this.removeChild (this.applet); +this.applet = null; +this.showAppletStatus ("disposed"); +}break; +case 6: +break; +default: +System.out.println ("unrecognized JSAppletPanel status: " + this.nextStatus); +break; +} +break; +default: +System.out.println ("unrecognized JSAppletThread mode: " + mode); +break; +} +return (ok ? 1 : 2); +}, "~N"); +Clazz_defineMethod (c$, "runLoader", + function () { +this.dispatchAppletEvent (51235, null); +this.status = 1; +var code = this.getCode (); +try { +if (code == null) { +System.err.println ("runloader.err-- \"code\" must be specified."); +throw new InstantiationException ("\"code\" must be specified."); +}this.applet = swingjs.JSToolkit.getInstance (code); +if (this.applet == null) { +System.out.println (code + " could not be launched"); +this.status = 7; +} else if (!(Clazz_instanceOf (this.applet, javax.swing.JApplet))) { +System.out.println (code + " is not a JApplet!?"); +this.status = 7; +}} catch (e$$) { +if (Clazz_exceptionOf (e$$, InstantiationException)) { +var e = e$$; +{ +this.status = 7; +this.showAppletException (e); +return; +} +} else if (Clazz_exceptionOf (e$$, Exception)) { +var e = e$$; +{ +this.status = 7; +this.showAppletException (e); +return; +} +} else if (Clazz_exceptionOf (e$$, ThreadDeath)) { +var e = e$$; +{ +this.status = 7; +this.showAppletStatus ("death"); +return; +} +} else if (Clazz_exceptionOf (e$$, Error)) { +var e = e$$; +{ +this.status = 7; +this.showAppletException (e); +return; +} +} else { +throw e$$; +} +} finally { +this.dispatchAppletEvent (51236, null); +} +if (this.applet != null) { +this.applet.setStub (this); +this.applet.setVisible (false); +this.add ("Center", this.applet); +this.applet.setDispatcher (); +this.applet.addNotify (); +this.showAppletStatus ("loaded"); +this.validate (); +}}); +Clazz_defineMethod (c$, "getUI", +function () { +return null; +}); +Clazz_overrideMethod (c$, "repaintImpl", +function (tm, x, y, width, height) { +if (this.applet.isVisible () && this.applet.getWidth () > 0 && this.applet.getHeight () > 0) { +this.applet.getContentPane ().repaint (tm, x, y, width, height); +}}, "~N,~N,~N,~N,~N"); +Clazz_defineStatics (c$, +"APPLET_UNINITIALIZED", 0, +"APPLET_LOAD", 1, +"APPLET_INIT", 2, +"APPLET_START", 3, +"APPLET_READY", 35, +"APPLET_STOP", 4, +"APPLET_DESTROY", 5, +"APPLET_QUIT", 6, +"APPLET_ERROR", 7, +"APPLET_DISPOSE", 75, +"APPLET_RESIZE", 51234, +"APPLET_LOADING", 51235, +"APPLET_LOADING_COMPLETED", 51236); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["jssun.java2d.SunGraphics2D"], "swingjs.JSGraphics2D", ["java.util.HashMap", "java.awt.BasicStroke", "$.Rectangle", "$.RenderingHints", "$.Toolkit", "java.awt.geom.AffineTransform", "swingjs.JSToolkit", "swingjs.api.HTML5CanvasContext2D"], function () { +c$ = Clazz_decorateAsClass (function () { +this.constrainX = 0; +this.constrainY = 0; +this.windowWidth = 0; +this.windowHeight = 0; +this.canvas = null; +this.ctx = null; +this.gc = null; +this.paintState = 0; +this.compositeState = -2147483648; +this.strokeState = 0; +this.$transformState = 0; +this.clipState = 0; +this.isShifted = false; +this.font = null; +this.inPath = false; +this.currentClip = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSGraphics2D", jssun.java2d.SunGraphics2D, Cloneable); +Clazz_makeConstructor (c$, +function (canvas) { +Clazz_superConstructor (this, swingjs.JSGraphics2D, []); +this.hints = new java.awt.RenderingHints ( new java.util.HashMap ()); +this.canvas = canvas; +this.ctx = this.canvas.getContext ("2d"); +this.$transform = new java.awt.geom.AffineTransform (); +{ +this.gc = SwingJS; +}}, "~O"); +Clazz_overrideMethod (c$, "getDeviceConfiguration", +function () { +return this.gc; +}); +Clazz_overrideMethod (c$, "drawLine", +function (x0, y0, x1, y1) { +var inPath = this.inPath; +if (!inPath) this.ctx.beginPath (); +this.ctx.moveTo (x0, y0); +this.ctx.lineTo (x1, y1); +if (!inPath) this.ctx.stroke (); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "drawCircle", +function (x, y, diameter) { +this.drawArc (x, y, diameter, diameter, 0, 360); +}, "~N,~N,~N"); +Clazz_overrideMethod (c$, "fillArc", +function (x, y, width, height, startAngle, arcAngle) { +this.doArc (x, y, width, height, startAngle, arcAngle, true); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "drawArc", +function (x, y, width, height, startAngle, arcAngle) { +this.doArc (x, y, width, height, startAngle, arcAngle, false); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "save", + function () { +this.ctx.save (); +}); +Clazz_defineMethod (c$, "restore", + function () { +this.ctx.restore (); +}); +Clazz_defineMethod (c$, "doArc", + function (x, y, width, height, startAngle, arcAngle, fill) { +var isCircle = (arcAngle - startAngle == 360); +this.save (); +this.ctx.translate (x, y); +this.ctx.scale (Clazz_doubleToInt (width / height), height); +this.ctx.beginPath (); +if (fill) { +}this.ctx.arc (0.5, 0.5, 0.5, this.toRad (startAngle), this.toRad (arcAngle), false); +if (isCircle) this.ctx.closePath (); +this.ctx.stroke (); +this.restore (); +}, "~N,~N,~N,~N,~N,~N,~B"); +Clazz_defineMethod (c$, "toRad", + function (a) { +return a * 3.141592653589793 / 180; +}, "~N"); +Clazz_defineMethod (c$, "drawPolygon", +function (ayPoints, axPoints, nPoints) { +this.doPoly (ayPoints, axPoints, nPoints, false); +}, "~A,~A,~N"); +Clazz_defineMethod (c$, "doPoly", + function (axPoints, ayPoints, nPoints, doFill) { +this.ctx.beginPath (); +this.ctx.moveTo (axPoints[0], ayPoints[0]); +for (var i = 1; i < nPoints; i++) this.ctx.lineTo (axPoints[i], ayPoints[i]); + +if (doFill) this.ctx.fill (); + else this.ctx.stroke (); +}, "~A,~A,~N,~B"); +Clazz_overrideMethod (c$, "drawRect", +function (x, y, width, height) { +this.ctx.beginPath (); +this.ctx.rect (x, y, width, height); +this.ctx.stroke (); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "background", +function (bgcolor) { +this.backgroundColor = bgcolor; +if (bgcolor == null) { +if (!this.isShifted) this.ctx.translate (-0.5, -0.5); +this.isShifted = true; +return; +}this.ctx.clearRect (0, 0, this.windowWidth, this.windowHeight); +this.setGraphicsColor (bgcolor); +this.fillRect (0, 0, this.windowWidth, this.windowHeight); +}, "java.awt.Color"); +Clazz_defineMethod (c$, "fillCircle", +function (x, y, diameter) { +var r = diameter / 2; +this.ctx.beginPath (); +this.ctx.arc (x + r, y + r, r, 0, 6.283185307179586, false); +this.ctx.fill (); +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "fillPolygon", +function (ayPoints, axPoints, nPoints) { +this.doPoly (ayPoints, axPoints, nPoints, true); +}, "~A,~A,~N"); +Clazz_overrideMethod (c$, "fillRect", +function (x, y, width, height) { +this.ctx.fillRect (x, y, width, height); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setGraphicsColor", +function (c) { +var s = swingjs.JSToolkit.getCSSColor (c); +{ +this.ctx.fillStyle = s; this.ctx.strokeStyle = s; +}}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setFont", +function (font) { +this.font = font; +if (this.ctx == null) return; +var s = swingjs.JSToolkit.getCanvasFont (font); +{ +this.ctx.font = s; +}}, "java.awt.Font"); +Clazz_defineMethod (c$, "setStrokeBold", +function (tf) { +this.setLineWidth (tf ? 2. : 1.); +}, "~B"); +Clazz_defineMethod (c$, "setLineWidth", + function (d) { +{ +this.ctx.lineWidth = d; +}}, "~N"); +Clazz_defineMethod (c$, "setWindowParameters", +function (width, height) { +this.windowWidth = width; +this.windowHeight = height; +}, "~N,~N"); +Clazz_defineMethod (c$, "canDoLineTo", +function () { +return true; +}); +Clazz_defineMethod (c$, "doStroke", +function (isBegin) { +this.inPath = isBegin; +if (isBegin) { +this.ctx.beginPath (); +} else { +this.ctx.stroke (); +}}, "~B"); +Clazz_defineMethod (c$, "lineTo", +function (x2, y2) { +this.ctx.lineTo (x2, y2); +}, "~N,~N"); +Clazz_overrideMethod (c$, "clip", +function (s) { +this.doShape (s); +this.ctx.clip (); +}, "java.awt.Shape"); +Clazz_overrideMethod (c$, "draw", +function (s) { +this.doShape (s); +this.ctx.stroke (); +}, "java.awt.Shape"); +Clazz_defineMethod (c$, "doShape", + function (s) { +this.ctx.beginPath (); +var pts = Clazz_newDoubleArray (6, 0); +var pi = s.getPathIterator (null); +while (!pi.isDone ()) { +switch (pi.currentSegment (pts)) { +case 0: +this.ctx.moveTo (pts[0], pts[1]); +break; +case 1: +this.ctx.lineTo (pts[0], pts[1]); +break; +case 2: +this.ctx.quadraticCurveTo (pts[0], pts[1], pts[2], pts[3]); +break; +case 3: +this.ctx.bezeierCurveTo (pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); +break; +case 4: +this.ctx.closePath (); +break; +} +pi.next (); +} +return pi.getWindingRule (); +}, "java.awt.Shape"); +Clazz_overrideMethod (c$, "fill", +function (s) { +if (this.doShape (s) == 0) { +this.ctx.fill("evenodd"); +} else this.ctx.fill (); +}, "java.awt.Shape"); +Clazz_defineMethod (c$, "drawImage", +function (img, x, y, observer) { +if (img != null) { +var imgNode = this.getImageNode (img); +if (imgNode != null) this.ctx.drawImage (imgNode, x, y, img.getWidth (observer), img.getHeight (observer)); +if (observer != null) this.observe (img, observer, imgNode != null); +}return true; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "observe", + function (img, observer, isOK) { +observer.imageUpdate (img, (isOK ? 0 : 192), -1, -1, -1, -1); +}, "java.awt.Image,java.awt.image.ImageObserver,~B"); +Clazz_defineMethod (c$, "drawImage", +function (img, x, y, width, height, observer) { +if (img != null) { +var imgNode = this.getImageNode (img); +if (imgNode != null) this.ctx.drawImage (imgNode, x, y, width, height); +if (observer != null) this.observe (img, observer, imgNode != null); +}return true; +}, "java.awt.Image,~N,~N,~N,~N,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "drawImage", +function (img, x, y, bgcolor, observer) { +swingjs.JSToolkit.notImplemented (null); +return this.drawImage (img, x, y, null); +}, "java.awt.Image,~N,~N,java.awt.Color,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "drawImage", +function (img, x, y, width, height, bgcolor, observer) { +swingjs.JSToolkit.notImplemented (null); +return this.drawImage (img, x, y, width, height, null); +}, "java.awt.Image,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "drawImage", +function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer) { +if (img != null) { +var imgNode = this.getImageNode (img); +if (imgNode != null) swingjs.api.HTML5CanvasContext2D.stretchImage (this.ctx, imgNode, sx1, sy1, sx2 - sx1, sy2 - sy1, dx1, dy1, dx2 - dx1, dy2 - dy1); +if (observer != null) this.observe (img, observer, imgNode != null); +}return true; +}, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "getImageNode", + function (img) { +var imgNode = null; +{ +imgNode = img._imgNode || img._canvas; +}if (imgNode == null) imgNode = swingjs.JSToolkit.getCompositor ().createImageNode (img); +return imgNode; +}, "java.awt.Image"); +Clazz_defineMethod (c$, "drawImage", +function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer) { +swingjs.JSToolkit.notImplemented (null); +return this.drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer); +}, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver"); +Clazz_defineMethod (c$, "drawImage", +function (img, xform, obs) { +swingjs.JSToolkit.notImplemented (null); +return false; +}, "java.awt.Image,java.awt.geom.AffineTransform,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "drawRenderedImage", +function (img, xform) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.image.RenderedImage,java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "drawRenderableImage", +function (img, xform) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.image.renderable.RenderableImage,java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "hit", +function (rect, s, onStroke) { +swingjs.JSToolkit.notImplemented (null); +return false; +}, "java.awt.Rectangle,java.awt.Shape,~B"); +Clazz_overrideMethod (c$, "setPaint", +function (paint) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.Paint"); +Clazz_overrideMethod (c$, "setStroke", +function (s) { +if (!(Clazz_instanceOf (s, java.awt.BasicStroke))) return; +var b = s; +var dash = b.getDashArray (); +var idash = Clazz_newIntArray (dash == null ? 0 : dash.length, 0); +for (var i = idash.length; --i >= 0; ) idash[i] = Clazz_floatToInt (dash[i]); + +this.ctx.setLineDash (idash); +this.setLineWidth (b.getLineWidth ()); +var lineCap; +var lineJoin; +var miterLimit = -1; +switch (b.getEndCap ()) { +case 0: +lineCap = "butt"; +break; +case 2: +lineCap = "square"; +break; +case 1: +default: +lineCap = "round"; +} +switch (b.getLineJoin ()) { +case 2: +lineJoin = "bevel"; +break; +case 0: +lineJoin = "miter"; +miterLimit = b.getMiterLimit (); +break; +case 1: +lineJoin = "round"; +} +{ +this.ctx.lineCap = lineCap; this.ctx.lineJoin = lineJoin; if +(miterLimit >= 0) this.ctx.miterLimit = miterLimit; +}}, "java.awt.Stroke"); +Clazz_overrideMethod (c$, "setRenderingHint", +function (hintKey, hintValue) { +this.hints.put (hintKey, hintValue); +}, "java.awt.RenderingHints.Key,~O"); +Clazz_overrideMethod (c$, "getRenderingHint", +function (hintKey) { +return this.hints.get (hintKey); +}, "java.awt.RenderingHints.Key"); +Clazz_overrideMethod (c$, "setRenderingHints", +function (hints) { +this.hints = new java.awt.RenderingHints (hints); +}, "java.util.Map"); +Clazz_overrideMethod (c$, "addRenderingHints", +function (hints) { +for (var e, $e = hints.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) this.hints.put (e.getKey (), e.getValue ()); + +}, "java.util.Map"); +Clazz_overrideMethod (c$, "getRenderingHints", +function () { +return this.hints; +}); +Clazz_defineMethod (c$, "translate", +function (x, y) { +this.ctx.translate (x, y); +}, "~N,~N"); +Clazz_overrideMethod (c$, "scale", +function (sx, sy) { +this.ctx.scale (sx, sy); +}, "~N,~N"); +Clazz_overrideMethod (c$, "setBackground", +function (color) { +this.background (color); +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "getBackground", +function () { +return this.backgroundColor; +}); +Clazz_overrideMethod (c$, "createSwingJS", +function () { +return this.clone (); +}); +Clazz_overrideMethod (c$, "clone", +function () { +this.save (); +return this.clone0 (); +}); +Clazz_overrideMethod (c$, "dispose", +function () { +if (this.compositeState >= 0) this.setComposite (null); +this.restore (); +}); +Clazz_overrideMethod (c$, "getColor", +function () { +return this.foregroundColor; +}); +Clazz_overrideMethod (c$, "setColor", +function (c) { +this.foregroundColor = c; +this.setGraphicsColor (c); +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "getFont", +function () { +return this.font; +}); +Clazz_defineMethod (c$, "getFontMetrics", +function (f) { +return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f); +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "clipRect", +function (x, y, width, height) { +this.ctx.beginPath (); +this.ctx.rect (x, y, width, height); +this.currentClip = new java.awt.Rectangle (x, y, width, height); +this.ctx.clip (); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setClip", +function (x, y, width, height) { +this.currentClip = new java.awt.Rectangle (x, y, width, height); +{ +if (arguments.length == 1) { setClip1(x); return; } +}this.ctx.beginPath (); +this.ctx.rect (x, y, width, height); +this.currentClip = new java.awt.Rectangle (x, y, width, height); +this.ctx.clip (); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "setClip1", +function (clip) { +this.ctx.beginPath (); +this.doShape (clip); +this.ctx.clip (); +}, "java.awt.Shape"); +Clazz_overrideMethod (c$, "clearRect", +function (x, y, width, height) { +this.ctx.clearRect (x, y, width, height); +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "drawPolyline", +function (xPoints, yPoints, nPoints) { +if (nPoints < 2) return; +this.ctx.moveTo (xPoints[0], yPoints[0]); +for (var i = 1; i < nPoints; i++) { +this.ctx.lineTo (xPoints[i], yPoints[i]); +} +}, "~A,~A,~N"); +Clazz_overrideMethod (c$, "copyArea", +function (x, y, width, height, dx, dy) { +swingjs.JSToolkit.notImplemented (null); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "drawRoundRect", +function (x, y, width, height, arcWidth, arcHeight) { +swingjs.JSToolkit.notImplemented (null); +this.drawRect (x, y, width, height); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "fillRoundRect", +function (x, y, width, height, arcWidth, arcHeight) { +swingjs.JSToolkit.notImplemented (null); +this.fillRect (x, y, width, height); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "drawOval", +function (x, y, width, height) { +swingjs.JSToolkit.notImplemented (null); +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "fillOval", +function (x, y, width, height) { +swingjs.JSToolkit.notImplemented (null); +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getClip", +function () { +swingjs.JSToolkit.notImplemented (null); +return null; +}); +Clazz_defineMethod (c$, "drawString", +function (s, x, y) { +this.ctx.fillText (s, x, y); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "drawStringUnique", +function (s, x, y) { +this.ctx.fillText (s, x, y); +}, "~S,~N,~N"); +Clazz_overrideMethod (c$, "drawStringTrans", +function (str, x, y) { +swingjs.JSToolkit.notImplemented (null); +}, "~S,~N,~N"); +Clazz_defineMethod (c$, "drawString", +function (iterator, x, y) { +swingjs.JSToolkit.notImplemented (null); +}, "java.text.AttributedCharacterIterator,~N,~N"); +Clazz_overrideMethod (c$, "drawStringAttrTrans", +function (iterator, x, y) { +swingjs.JSToolkit.notImplemented (null); +}, "java.text.AttributedCharacterIterator,~N,~N"); +Clazz_overrideMethod (c$, "translateTrans", +function (tx, ty) { +swingjs.JSToolkit.notImplemented (null); +}, "~N,~N"); +Clazz_defineMethod (c$, "rotate", +function (theta) { +swingjs.JSToolkit.notImplemented (null); +}, "~N"); +Clazz_defineMethod (c$, "rotate", +function (theta, x, y) { +swingjs.JSToolkit.notImplemented (null); +}, "~N,~N,~N"); +Clazz_overrideMethod (c$, "shear", +function (shx, shy) { +swingjs.JSToolkit.notImplemented (null); +}, "~N,~N"); +Clazz_overrideMethod (c$, "transform", +function (xform) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "setTransform", +function (Tx) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.geom.AffineTransform"); +Clazz_overrideMethod (c$, "getTransform", +function () { +swingjs.JSToolkit.notImplemented (null); +return null; +}); +Clazz_defineMethod (c$, "cloneTransform", +function () { +swingjs.JSToolkit.notImplemented (null); +return null; +}); +Clazz_overrideMethod (c$, "getPaint", +function () { +swingjs.JSToolkit.notImplemented (null); +return null; +}); +Clazz_overrideMethod (c$, "getStroke", +function () { +swingjs.JSToolkit.notImplemented (null); +return null; +}); +Clazz_overrideMethod (c$, "getFontRenderContext", +function () { +swingjs.JSToolkit.notImplemented (null); +return null; +}); +Clazz_overrideMethod (c$, "setPaintMode", +function () { +swingjs.JSToolkit.notImplemented (null); +}); +Clazz_overrideMethod (c$, "setXORMode", +function (c1) { +swingjs.JSToolkit.notImplemented (null); +}, "java.awt.Color"); +Clazz_defineMethod (c$, "getClipBounds", +function () { +var r = null; +{ +if (arguments.length == 1) r = arguments[0]; +}var clipRect = this.getClipBoundsImpl (); +if (r == null) { +r = clipRect; +} else { +r.x = clipRect.x; +r.y = clipRect.y; +r.width = clipRect.width; +r.height = clipRect.height; +}return r; +}); +Clazz_defineMethod (c$, "getClipBoundsImpl", + function () { +if (this.currentClip == null) { +this.currentClip = new java.awt.Rectangle (0, 0, this.windowWidth, this.windowHeight); +}return this.currentClip; +}); +Clazz_overrideMethod (c$, "setComposite", +function (comp) { +var newRule = 0; +var isValid = (comp == null || (Clazz_instanceOf (comp, java.awt.AlphaComposite)) && (newRule = (comp).getRule ()) != this.compositeState); +if (!isValid) return; +if (swingjs.JSToolkit.setGraphicsCompositeAlpha (this, newRule)) this.compositeState = newRule; +}, "java.awt.Composite"); +Clazz_defineMethod (c$, "drawImage", +function (img, op, x, y) { +swingjs.JSToolkit.drawImageOp (this, img, op, x, y); +}, "java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N"); +Clazz_defineMethod (c$, "setAlpha", +function (f) { +{ +this.ctx.globalAlpha = f; +}}, "~N"); +Clazz_defineStatics (c$, +"saveLevel", 0); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () { +c$ = Clazz_decorateAsClass (function () { +this.ap = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSAppletThread", swingjs.JSThread); +Clazz_makeConstructor (c$, +function (ap, group, name) { +Clazz_superConstructor (this, swingjs.JSAppletThread, [group, name]); +this.ap = ap; +}, "swingjs.JSAppletPanel,ThreadGroup,~S"); +Clazz_overrideMethod (c$, "run1", +function (mode) { +mode = this.ap.run1 (mode); +if (mode != 2) this.dispatchAndReturn (null, mode); +}, "~N"); +Clazz_defineMethod (c$, "dispatchAndReturn", +function (r, mode) { +var m = mode; +javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz_cloneFinals ("m", m)))); +}, "Runnable,~N"); +c$.$JSAppletThread$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable); +Clazz_overrideMethod (c$, "run", +function () { +this.b$["swingjs.JSAppletThread"].run1 (this.f$.m); +}); +c$ = Clazz_p0p (); +}; +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (null, "swingjs.JSMouse", ["JU.V3", "java.awt.Toolkit", "java.awt.event.MouseEvent"], function () { +c$ = Clazz_decorateAsClass (function () { +this.ap = null; +this.isMouseDown = false; +this.wheeling = false; +this.xWhenPressed = 0; +this.yWhenPressed = 0; +this.modifiersWhenPressed10 = 0; +Clazz_instantialize (this, arguments); +}, swingjs, "JSMouse"); +Clazz_makeConstructor (c$, +function (ap) { +this.ap = ap; +}, "swingjs.JSAppletPanel"); +Clazz_defineMethod (c$, "processEvent", +function (id, x, y, modifiers, time) { +if (id != -1) modifiers = swingjs.JSMouse.applyLeftMouse (modifiers); +switch (id) { +case -1: +this.wheeled (time, x, modifiers); +break; +case 501: +this.xWhenPressed = x; +this.yWhenPressed = y; +this.modifiersWhenPressed10 = modifiers; +this.pressed (time, x, y, modifiers, false); +break; +case 506: +this.dragged (time, x, y, modifiers); +break; +case 504: +this.entry (time, x, y, false); +break; +case 505: +this.entry (time, x, y, true); +break; +case 503: +this.moved (time, x, y, modifiers); +break; +case 502: +this.released (time, x, y, modifiers); +if (x == this.xWhenPressed && y == this.yWhenPressed && modifiers == this.modifiersWhenPressed10) { +this.clicked (time, x, y, modifiers, 1); +}break; +default: +return false; +} +return true; +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "processTwoPointGesture", +function (touches) { +if (touches[0].length < 2) return; +var t1 = touches[0]; +var t2 = touches[1]; +var t1first = t1[0]; +var t1last = t1[t2.length - 1]; +var x1first = t1first[0]; +var x1last = t1last[0]; +var dx1 = x1last - x1first; +var y1first = t1first[1]; +var y1last = t1last[1]; +var dy1 = y1last - y1first; +var v1 = JU.V3.new3 (dx1, dy1, 0); +var d1 = v1.length (); +var t2first = t2[0]; +var t2last = t2[t2.length - 1]; +var x2first = t2first[0]; +var x2last = t2last[0]; +var dx2 = x2last - x2first; +var y2first = t2first[1]; +var y2last = t2last[1]; +var dy2 = y2last - y2first; +var v2 = JU.V3.new3 (dx2, dy2, 0); +var d2 = v2.length (); +if (d1 < 1 || d2 < 1) return; +v1.normalize (); +v2.normalize (); +var cos12 = (v1.dot (v2)); +if (cos12 > 0.8) { +var deltaX = Clazz_floatToInt (x1last - t1[t1.length - 2][0]); +var deltaY = Clazz_floatToInt (y1last - t1[t1.length - 2][1]); +this.translateXYBy (deltaX, deltaY); +} else if (cos12 < -0.8) { +v1 = JU.V3.new3 (x2first - x1first, y2first - y1first, 0); +v2 = JU.V3.new3 (x2last - x1last, y2last - y1last, 0); +var dx = v2.length () - v1.length (); +this.wheeled (System.currentTimeMillis (), dx < 0 ? -1 : 1, 32); +}}, "~A"); +Clazz_defineMethod (c$, "translateXYBy", + function (deltaX, deltaY) { +}, "~N,~N"); +Clazz_defineMethod (c$, "mouseClicked", +function (e) { +this.clicked (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.getClickCount ()); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseEntered", +function (e) { +this.entry (e.getWhen (), e.getX (), e.getY (), false); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseExited", +function (e) { +this.entry (e.getWhen (), e.getX (), e.getY (), true); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mousePressed", +function (e) { +this.pressed (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.isPopupTrigger ()); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseReleased", +function (e) { +this.released (e.getWhen (), e.getX (), e.getY (), e.getModifiers ()); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseDragged", +function (e) { +var modifiers = e.getModifiers (); +if ((modifiers & 28) == 0) modifiers |= 16; +this.dragged (e.getWhen (), e.getX (), e.getY (), modifiers); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseMoved", +function (e) { +this.moved (e.getWhen (), e.getX (), e.getY (), e.getModifiers ()); +}, "java.awt.event.MouseEvent"); +Clazz_defineMethod (c$, "mouseWheelMoved", +function (e) { +e.consume (); +this.wheeled (e.getWhen (), e.getWheelRotation (), e.getModifiers ()); +}, "java.awt.event.MouseWheelEvent"); +Clazz_defineMethod (c$, "entry", + function (time, x, y, isExit) { +this.wheeling = false; +this.mouseEnterExit (time, x, y, isExit); +}, "~N,~N,~N,~B"); +Clazz_defineMethod (c$, "clicked", + function (time, x, y, modifiers, clickCount) { +this.mouseAction (500, time, x, y, 1, modifiers); +}, "~N,~N,~N,~N,~N"); +Clazz_defineMethod (c$, "moved", + function (time, x, y, modifiers) { +if (this.isMouseDown) this.mouseAction (506, time, x, y, 0, swingjs.JSMouse.applyLeftMouse (modifiers)); + else this.mouseAction (503, time, x, y, 0, modifiers); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "wheeled", + function (time, rotation, modifiers) { +this.wheeling = true; +this.mouseAction (507, time, 0, rotation, 0, modifiers & -29 | 32); +}, "~N,~N,~N"); +Clazz_defineMethod (c$, "pressed", + function (time, x, y, modifiers, isPopupTrigger) { +this.isMouseDown = true; +this.wheeling = false; +this.mouseAction (501, time, x, y, 0, modifiers); +}, "~N,~N,~N,~N,~B"); +Clazz_defineMethod (c$, "released", + function (time, x, y, modifiers) { +this.isMouseDown = false; +this.wheeling = false; +this.mouseAction (502, time, x, y, 0, modifiers); +}, "~N,~N,~N,~N"); +Clazz_defineMethod (c$, "dragged", + function (time, x, y, modifiers) { +if (this.wheeling) return; +if ((modifiers & 20) == 20) modifiers = modifiers & -5 | 2; +this.mouseAction (506, time, x, y, 0, modifiers); +}, "~N,~N,~N,~N"); +c$.applyLeftMouse = Clazz_defineMethod (c$, "applyLeftMouse", + function (modifiers) { +return ((modifiers & 28) == 0) ? (modifiers | 16) : modifiers; +}, "~N"); +Clazz_defineMethod (c$, "getButton", + function (modifiers) { +switch (modifiers & 28) { +case 16: +return 1; +case 8: +return 2; +case 4: +return 3; +default: +return 0; +} +}, "~N"); +Clazz_defineMethod (c$, "mouseEnterExit", + function (time, x, y, isExit) { +}, "~N,~N,~N,~B"); +Clazz_defineMethod (c$, "mouseAction", + function (id, time, x, y, count, modifiers) { +var popupTrigger = false; +var button = this.getButton (modifiers); +var source = this.ap.applet; +var e = new java.awt.event.MouseEvent (source, id, time, modifiers, x, y, x, y, count, popupTrigger, button); +java.awt.Toolkit.getEventQueue ().postEvent (e); +}, "~N,~N,~N,~N,~N,~N"); +Clazz_defineStatics (c$, +"MOUSE_LEFT", 16, +"MOUSE_MIDDLE", 8, +"MOUSE_RIGHT", 4, +"MOUSE_WHEEL", 32, +"MAC_COMMAND", 20, +"BUTTON_MASK", 28); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.awt.peer.LightweightPeer"], "swingjs.JSComponentPeer", ["swingjs.JSToolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.target = null; +this.ui = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSComponentPeer", null, java.awt.peer.LightweightPeer); +Clazz_makeConstructor (c$, +function (target) { +this.target = target; +this.ui = swingjs.JSToolkit.getUI (target, false); +}, "java.awt.Component"); +Clazz_overrideMethod (c$, "isObscured", +function () { +return false; +}); +Clazz_overrideMethod (c$, "canDetermineObscurity", +function () { +return false; +}); +Clazz_overrideMethod (c$, "setVisible", +function (b) { +}, "~B"); +Clazz_overrideMethod (c$, "setEnabled", +function (b) { +}, "~B"); +Clazz_overrideMethod (c$, "paint", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "repaint", +function (tm, x, y, width, height) { +}, "~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "print", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "setBounds", +function (x, y, width, height, op) { +}, "~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "handleEvent", +function (e) { +}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "coalescePaintEvent", +function (e) { +}, "java.awt.event.PaintEvent"); +Clazz_overrideMethod (c$, "getLocationOnScreen", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getPreferredSize", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getMinimumSize", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getColorModel", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getToolkit", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getGraphics", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getFontMetrics", +function (font) { +return null; +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "dispose", +function () { +}); +Clazz_overrideMethod (c$, "setForeground", +function (c) { +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setBackground", +function (c) { +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setFont", +function (f) { +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "updateCursorImmediately", +function () { +}); +Clazz_overrideMethod (c$, "requestFocus", +function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { +return false; +}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); +Clazz_overrideMethod (c$, "isFocusable", +function () { +return false; +}); +Clazz_defineMethod (c$, "createImage", +function (producer) { +return null; +}, "java.awt.image.ImageProducer"); +Clazz_defineMethod (c$, "createImage", +function (width, height) { +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "createVolatileImage", +function (width, height) { +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "prepareImage", +function (img, w, h, o) { +return false; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "checkImage", +function (img, w, h, o) { +return 0; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "getGraphicsConfiguration", +function () { +return null; +}); +Clazz_overrideMethod (c$, "handlesWheelScrolling", +function () { +return false; +}); +Clazz_overrideMethod (c$, "getBackBuffer", +function () { +return null; +}); +Clazz_overrideMethod (c$, "destroyBuffers", +function () { +}); +Clazz_overrideMethod (c$, "reparent", +function (newContainer) { +}, "java.awt.peer.ContainerPeer"); +Clazz_overrideMethod (c$, "isReparentSupported", +function () { +return false; +}); +Clazz_overrideMethod (c$, "layout", +function () { +}); +Clazz_overrideMethod (c$, "getBounds", +function () { +return null; +}); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () { +c$ = Clazz_decorateAsClass (function () { +this.window = null; +this.isFrame = false; +this.applet = null; +this.graphics = null; +this.font = null; +Clazz_instantialize (this, arguments); +}, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer); +Clazz_overrideMethod (c$, "setFrame", +function (target, isFrame) { +this.isFrame = isFrame; +this.window = target; +var jc = this; +jc.myThread = Thread.currentThread (); +jc.threadGroup = jc.myThread.getThreadGroup (); +this.applet = (jc.threadGroup).getHtmlApplet (); +this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300); +return this; +}, "java.awt.Window,~B"); +Clazz_overrideMethod (c$, "getGraphics", +function () { +this.graphics.setFont (this.window.getFont ()); +return this.graphics; +}); +Clazz_overrideMethod (c$, "getToolkit", +function () { +return java.awt.Toolkit.getDefaultToolkit (); +}); +Clazz_overrideMethod (c$, "getFontMetrics", +function (font) { +if (!font.equals (this.font)) this.window.setFont (this.font = font); +return this.graphics.getFontMetrics (font); +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "getInsets", +function () { +return new java.awt.Insets (0, 0, 0, 0); +}); +Clazz_overrideMethod (c$, "beginValidate", +function () { +}); +Clazz_overrideMethod (c$, "endValidate", +function () { +}); +Clazz_overrideMethod (c$, "beginLayout", +function () { +}); +Clazz_overrideMethod (c$, "endLayout", +function () { +}); +Clazz_overrideMethod (c$, "isObscured", +function () { +return false; +}); +Clazz_overrideMethod (c$, "canDetermineObscurity", +function () { +return false; +}); +Clazz_overrideMethod (c$, "setVisible", +function (b) { +}, "~B"); +Clazz_overrideMethod (c$, "setEnabled", +function (b) { +}, "~B"); +Clazz_overrideMethod (c$, "paint", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "repaint", +function (tm, x, y, width, height) { +}, "~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "print", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "setBounds", +function (x, y, width, height, op) { +}, "~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "handleEvent", +function (e) { +}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "coalescePaintEvent", +function (e) { +}, "java.awt.event.PaintEvent"); +Clazz_overrideMethod (c$, "getLocationOnScreen", +function () { +return new java.awt.Point (); +}); +Clazz_overrideMethod (c$, "getPreferredSize", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getMinimumSize", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getColorModel", +function () { +return null; +}); +Clazz_overrideMethod (c$, "dispose", +function () { +}); +Clazz_overrideMethod (c$, "setForeground", +function (c) { +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setBackground", +function (c) { +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setFont", +function (f) { +this.font = f; +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "updateCursorImmediately", +function () { +}); +Clazz_overrideMethod (c$, "requestFocus", +function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { +return false; +}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); +Clazz_overrideMethod (c$, "isFocusable", +function () { +return false; +}); +Clazz_defineMethod (c$, "createImage", +function (producer) { +return null; +}, "java.awt.image.ImageProducer"); +Clazz_defineMethod (c$, "createImage", +function (width, height) { +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "createVolatileImage", +function (width, height) { +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "prepareImage", +function (img, w, h, o) { +return false; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "checkImage", +function (img, w, h, o) { +return 0; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "getGraphicsConfiguration", +function () { +return null; +}); +Clazz_overrideMethod (c$, "handlesWheelScrolling", +function () { +return false; +}); +Clazz_overrideMethod (c$, "getBackBuffer", +function () { +return null; +}); +Clazz_overrideMethod (c$, "destroyBuffers", +function () { +}); +Clazz_overrideMethod (c$, "reparent", +function (newContainer) { +}, "java.awt.peer.ContainerPeer"); +Clazz_overrideMethod (c$, "isReparentSupported", +function () { +return false; +}); +Clazz_overrideMethod (c$, "layout", +function () { +}); +Clazz_overrideMethod (c$, "getBounds", +function () { +return null; +}); +Clazz_overrideMethod (c$, "toFront", +function () { +}); +Clazz_overrideMethod (c$, "toBack", +function () { +}); +Clazz_overrideMethod (c$, "updateAlwaysOnTopState", +function () { +}); +Clazz_overrideMethod (c$, "updateFocusableWindowState", +function () { +}); +Clazz_overrideMethod (c$, "requestWindowFocus", +function () { +return false; +}); +Clazz_overrideMethod (c$, "setModalBlocked", +function (blocker, blocked) { +}, "java.awt.Dialog,~B"); +Clazz_overrideMethod (c$, "updateMinimumSize", +function () { +}); +Clazz_overrideMethod (c$, "updateIconImages", +function () { +}); +Clazz_overrideMethod (c$, "setOpacity", +function (opacity) { +}, "~N"); +Clazz_overrideMethod (c$, "setOpaque", +function (isOpaque) { +}, "~B"); +Clazz_overrideMethod (c$, "updateWindow", +function (backBuffer) { +}, "java.awt.image.BufferedImage"); +Clazz_overrideMethod (c$, "repositionSecurityWarning", +function () { +}); +Clazz_overrideMethod (c$, "setTitle", +function (title) { +}, "~S"); +Clazz_overrideMethod (c$, "setMenuBar", +function (mb) { +}, "~O"); +Clazz_overrideMethod (c$, "setResizable", +function (resizeable) { +}, "~B"); +Clazz_overrideMethod (c$, "setState", +function (state) { +}, "~N"); +Clazz_overrideMethod (c$, "getState", +function () { +return 0; +}); +Clazz_overrideMethod (c$, "setMaximizedBounds", +function (bounds) { +}, "java.awt.Rectangle"); +Clazz_overrideMethod (c$, "setBoundsPrivate", +function (x, y, width, height) { +}, "~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "getBoundsPrivate", +function () { +return null; +}); +}); +Clazz_declarePackage ("swingjs"); +Clazz_load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () { +c$ = Clazz_declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, swingjs.JSGraphicsEnvironment, []); +System.out.println ("JSGraphicsEnvironment initialized"); +}); +Clazz_overrideMethod (c$, "createGraphics", +function (img) { +return this.createGraphicsSized (img, img.getWidth (), img.getHeight ()); +}, "java.awt.image.BufferedImage"); +Clazz_defineMethod (c$, "createGraphicsSized", +function (img, width, height) { +var g = null; +{ +g = img._g; +}if (g == null) { +var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ()); +{ +canvas.width = width; +canvas.height = height; +img._canvas = canvas; +}g = new swingjs.JSGraphics2D (canvas); +{ +img._g = g; +}}return g; +}, "~O,~N,~N"); +Clazz_overrideMethod (c$, "getAllFonts", +function () { +return null; +}); +Clazz_defineMethod (c$, "getAvailableFontFamilyNames", +function () { +return null; +}); +Clazz_defineMethod (c$, "getAvailableFontFamilyNames", +function (l) { +return null; +}, "java.util.Locale"); +Clazz_overrideMethod (c$, "getDefaultScreenDevice", +function () { +if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice"); +return swingjs.JSGraphicsEnvironment.device; +}); +Clazz_defineStatics (c$, +"device", null); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["javax.swing.LookAndFeel"], "swingjs.plaf.HTML5LookAndFeel", ["java.lang.Boolean", "$.Long", "java.awt.Color", "$.Dimension", "javax.swing.DefaultListCellRenderer", "$.UIDefaults", "javax.swing.UIDefaults.ActiveValue", "javax.swing.plaf.ColorUIResource", "$.DimensionUIResource", "$.FontUIResource", "$.InsetsUIResource"], function () { +c$ = Clazz_declareType (swingjs.plaf, "HTML5LookAndFeel", javax.swing.LookAndFeel); +Clazz_overrideMethod (c$, "getDefaults", +function () { +var table = new javax.swing.UIDefaults (610, 0.75); +this.initClassDefaults (table); +this.initSystemColorDefaults (table); +this.initComponentDefaults (table); +return table; +}); +Clazz_overrideMethod (c$, "initialize", +function () { +}); +Clazz_defineMethod (c$, "installAWTEventListener", +function () { +}); +Clazz_overrideMethod (c$, "uninitialize", +function () { +}); +Clazz_defineMethod (c$, "initClassDefaults", +function (table) { +var packageName = "swingjs.plaf."; +var uiDefaults = Clazz_newArray (-1, ["ButtonUI", "swingjs.plaf.JSButtonUI", "CheckBoxUI", "swingjs.plaf.JSCheckBoxUI", "ColorChooserUI", "swingjs.plaf.JSColorChooserUI", "FormattedTextFieldUI", "swingjs.plaf.JSFormattedTextFieldUI", "MenuBarUI", "swingjs.plaf.JSMenuBarUI", "MenuUI", "swingjs.plaf.JSMenuUI", "MenuItemUI", "swingjs.plaf.JSMenuItemUI", "CheckBoxMenuItemUI", "swingjs.plaf.JSCheckBoxMenuItemUI", "RadioButtonMenuItemUI", "swingjs.plaf.JSRadioButtonMenuItemUI", "RadioButtonUI", "swingjs.plaf.JSRadioButtonUI", "ToggleButtonUI", "swingjs.plaf.JSToggleButtonUI", "PopupMenuUI", "swingjs.plaf.JSPopupMenuUI", "ProgressBarUI", "swingjs.plaf.JSProgressBarUI", "ScrollBarUI", "swingjs.plaf.JSScrollBarUI", "ScrollPaneUI", "swingjs.plaf.JSScrollPaneUI", "SplitPaneUI", "swingjs.plaf.JSSplitPaneUI", "SliderUI", "swingjs.plaf.JSSliderUI", "SeparatorUI", "swingjs.plaf.JSSeparatorUI", "SpinnerUI", "swingjs.plaf.JSSpinnerUI", "ToolBarSeparatorUI", "swingjs.plaf.JSToolBarSeparatorUI", "PopupMenuSeparatorUI", "swingjs.plaf.JSPopupMenuSeparatorUI", "TabbedPaneUI", "swingjs.plaf.JSTabbedPaneUI", "TextAreaUI", "swingjs.plaf.JSTextAreaUI", "TextFieldUI", "swingjs.plaf.JSTextFieldUI", "PasswordFieldUI", "swingjs.plaf.JSPasswordFieldUI", "TextPaneUI", "swingjs.plaf.JSTextPaneUI", "EditorPaneUI", "swingjs.plaf.JSEditorPaneUI", "TreeUI", "swingjs.plaf.JSTreeUI", "LabelUI", "swingjs.plaf.JSLabelUI", "ListUI", "swingjs.plaf.JSListUI", "ToolBarUI", "swingjs.plaf.JSToolBarUI", "ToolTipUI", "swingjs.plaf.JSToolTipUI", "ComboBoxUI", "swingjs.plaf.JSComboBoxUI", "TableUI", "swingjs.plaf.JSTableUI", "TableHeaderUI", "swingjs.plaf.JSTableHeaderUI", "InternalFrameUI", "swingjs.plaf.JSInternalFrameUI", "DesktopPaneUI", "swingjs.plaf.JSDesktopPaneUI", "DesktopIconUI", "swingjs.plaf.JSDesktopIconUI", "OptionPaneUI", "swingjs.plaf.JSOptionPaneUI", "PanelUI", "swingjs.plaf.JSPanelUI", "ViewportUI", "swingjs.plaf.JSViewportUI", "RootPaneUI", "swingjs.plaf.JSRootPaneUI"]); +table.putDefaults (uiDefaults); +}, "javax.swing.UIDefaults"); +Clazz_defineMethod (c$, "initSystemColorDefaults", +function (table) { +var defaultSystemColors = Clazz_newArray (-1, ["window", "#FFFFFF", "windowText", "#333333", "menu", "#C0C0C0", "menuText", "#333333", "text", "#C0C0C0", "textText", "#333333", "control", "#EEEEEE", "controlText", "#333333", "scrollbar", "#E0E0E0", "info", "#FFFFE1", "infoText", "#000000"]); +this.loadSystemColors (table, defaultSystemColors, this.isNativeLookAndFeel ()); +}, "javax.swing.UIDefaults"); +Clazz_defineMethod (c$, "loadSystemColors", +function (table, systemColors, useNative) { +for (var i = 0; i < systemColors.length; i += 2) { +var color = java.awt.Color.black; +try { +color = java.awt.Color.decode (systemColors[i + 1]); +} catch (e) { +if (Clazz_exceptionOf (e, NumberFormatException)) { +e.printStackTrace (); +} else { +throw e; +} +} +table.put (systemColors[i], new javax.swing.plaf.ColorUIResource (color)); +} +}, "javax.swing.UIDefaults,~A,~B"); +Clazz_defineMethod (c$, "initResourceBundle", + function (table) { +}, "javax.swing.UIDefaults"); +Clazz_defineMethod (c$, "initComponentDefaults", +function (table) { +this.initResourceBundle (table); +var oneThousand = new Long (1000); +var twelve = new Integer (12); +var fontPlain = new Integer (0); +var serifPlain12 = new javax.swing.plaf.FontUIResource ("Serif", 0, 12); +var sansSerifPlain12 = new javax.swing.plaf.FontUIResource ("SansSerif", 0, 12); +var dialogPlain12 = new javax.swing.plaf.FontUIResource ("Dialog", 0, 12); +var monospacedPlain12 = new javax.swing.plaf.FontUIResource ("Monospaced", 0, 12); +var black = new javax.swing.plaf.ColorUIResource (java.awt.Color.black); +var white = new javax.swing.plaf.ColorUIResource (java.awt.Color.white); +var gray = new javax.swing.plaf.ColorUIResource (java.awt.Color.gray); +var darkGray = new javax.swing.plaf.ColorUIResource (java.awt.Color.darkGray); +var control = table.getColor ("control"); +var controlText = table.getColor ("controlText"); +var menu = table.getColor ("menu"); +var menuText = table.getColor ("menuText"); +var textText = table.getColor ("textText"); +var window = table.getColor ("window"); +var zeroInsets = new javax.swing.plaf.InsetsUIResource (0, 0, 0, 0); +var twoInsets = new javax.swing.plaf.InsetsUIResource (2, 2, 2, 2); +var threeInsets = new javax.swing.plaf.InsetsUIResource (3, 3, 3, 3); +var listCellRendererActiveValue = ((Clazz_isClassDefined ("swingjs.plaf.HTML5LookAndFeel$1") ? 0 : swingjs.plaf.HTML5LookAndFeel.$HTML5LookAndFeel$1$ ()), Clazz_innerTypeInstance (swingjs.plaf.HTML5LookAndFeel$1, this, null)); +var zero = new Integer (0); +var tabbedPaneTabInsets = new javax.swing.plaf.InsetsUIResource (0, 4, 1, 4); +var tabbedPaneTabPadInsets = new javax.swing.plaf.InsetsUIResource (2, 2, 2, 1); +var tabbedPaneTabAreaInsets = new javax.swing.plaf.InsetsUIResource (3, 2, 0, 2); +var tabbedPaneContentBorderInsets = new javax.swing.plaf.InsetsUIResource (2, 2, 3, 3); +var editorMargin = threeInsets; +var four = new Integer (4); +var defaults = Clazz_newArray (-1, ["*.font", dialogPlain12, "*.background", control, "*.foreground", controlText, "Button.margin", new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.margin", new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.textIconGap", four, "ToggleButton.textShiftOffset", zero, "RadioButton.margin", twoInsets, "RadioButton.textIconGap", four, "RadioButton.textShiftOffset", zero, "CheckBox.margin", twoInsets, "CheckBox.textIconGap", four, "CheckBox.textShiftOffset", zero, "ColorChooser.swatchesSwatchSize", new java.awt.Dimension (10, 10), "ColorChooser.swatchesRecentSwatchSize", new java.awt.Dimension (10, 10), "ColorChooser.swatchesDefaultRecentColor", control, "ComboBox.font", sansSerifPlain12, "ComboBox.background", window, "ComboBox.foreground", textText, "ComboBox.timeFactor", oneThousand, "ComboBox.isEnterSelectablePopup", Boolean.FALSE, "FileChooser.readOnly", Boolean.FALSE, "Label.border", null, "List.background", window, "List.foreground", textText, "List.cellRenderer", listCellRendererActiveValue, "List.timeFactor", oneThousand, "MenuBar.font", dialogPlain12, "MenuBar.background", menu, "MenuBar.foreground", menuText, "MenuItem.font", dialogPlain12, "MenuItem.background", menu, "MenuItem.foreground", menuText, "MenuItem.margin", twoInsets, "RadioButtonMenuItem.font", dialogPlain12, "RadioButtonMenuItem.background", menu, "RadioButtonMenuItem.foreground", menuText, "RadioButtonMenuItem.margin", twoInsets, "CheckBoxMenuItem.font", dialogPlain12, "CheckBoxMenuItem.background", menu, "CheckBoxMenuItem.foreground", menuText, "CheckBoxMenuItem.margin", twoInsets, "Menu.background", menu, "Menu.foreground", menuText, "Menu.margin", twoInsets, "PopupMenu.background", menu, "PopupMenu.foreground", menuText, "PopupMenu.consumeEventOnClose", Boolean.FALSE, "OptionPane.messageForeground", controlText, "Panel.font", dialogPlain12, "Panel.background", control, "Panel.foreground", textText, "ProgressBar.cellLength", new Integer (1), "ProgressBar.cellSpacing", zero, "ProgressBar.repaintInterval", new Integer (50), "ProgressBar.cycleTime", new Integer (3000), "ProgressBar.horizontalSize", new javax.swing.plaf.DimensionUIResource (146, 12), "ProgressBar.verticalSize", new javax.swing.plaf.DimensionUIResource (12, 146), "ScrollBar.foreground", control, "ScrollBar.width", new Integer (16), "Viewport.foreground", textText, "Slider.horizontalSize", new java.awt.Dimension (200, 21), "Slider.verticalSize", new java.awt.Dimension (21, 200), "Slider.minimumHorizontalSize", new java.awt.Dimension (36, 21), "Slider.minimumVerticalSize", new java.awt.Dimension (21, 36), "Spinner.font", monospacedPlain12, "Spinner.arrowButtonSize", new java.awt.Dimension (16, 5), "Spinner.editorAlignment", new Integer (11), "SplitPane.background", control, "SplitPane.dividerSize", new Integer (7), "SplitPaneDivider.draggingColor", darkGray, "TabbedPane.selected", null, "TabbedPane.textIconGap", four, "TabbedPane.tabsOverlapBorder", Boolean.FALSE, "TabbedPane.labelShift", new Integer (1), "TabbedPane.selectedLabelShift", new Integer (-1), "TabbedPane.tabInsets", tabbedPaneTabInsets, "TabbedPane.selectedTabPadInsets", tabbedPaneTabPadInsets, "TabbedPane.tabAreaInsets", tabbedPaneTabAreaInsets, "TabbedPane.contentBorderInsets", tabbedPaneContentBorderInsets, "TabbedPane.tabRunOverlay", new Integer (2), "Table.background", window, "Table.dropLineShortColor", black, "Table.gridColor", gray, "Table.focusCellBackground", window, "Table.focusCellForeground", controlText, "TextField.font", sansSerifPlain12, "TextField.background", window, "TextField.foreground", textText, "TextField.margin", zeroInsets, "FormattedTextField.font", sansSerifPlain12, "FormattedTextField.background", window, "FormattedTextField.foreground", textText, "FormattedTextField.caretForeground", textText, "FormattedTextField.margin", zeroInsets, "PasswordField.font", monospacedPlain12, "PasswordField.background", window, "PasswordField.foreground", textText, "PasswordField.margin", zeroInsets, "PasswordField.echoChar", new Character ('*'), "TextArea.font", monospacedPlain12, "TextArea.background", window, "TextArea.foreground", textText, "TextArea.margin", zeroInsets, "TextPane.font", serifPlain12, "TextPane.background", white, "TextPane.foreground", textText, "TextPane.margin", editorMargin, "EditorPane.font", serifPlain12, "EditorPane.background", white, "EditorPane.foreground", textText, "EditorPane.margin", editorMargin, "TitledBorder.titleColor", controlText, "Tree.paintLines", Boolean.TRUE, "Tree.lineTypeDashed", Boolean.FALSE, "Tree.background", window, "Tree.foreground", textText, "Tree.hash", gray, "Tree.textForeground", textText, "Tree.textBackground", table.get ("text"), "Tree.leftChildIndent", new Integer (7), "Tree.rightChildIndent", new Integer (13), "Tree.rowHeight", new Integer (16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.timeFactor", oneThousand]); +table.putDefaults (defaults); +}, "javax.swing.UIDefaults"); +Clazz_overrideMethod (c$, "getName", +function () { +return "SwingJS"; +}); +Clazz_overrideMethod (c$, "getID", +function () { +return "SwingJS"; +}); +Clazz_overrideMethod (c$, "getDescription", +function () { +return "SwingJS L&F"; +}); +Clazz_overrideMethod (c$, "isNativeLookAndFeel", +function () { +return true; +}); +Clazz_overrideMethod (c$, "isSupportedLookAndFeel", +function () { +return true; +}); +c$.$HTML5LookAndFeel$1$ = function () { +Clazz_pu$h(self.c$); +c$ = Clazz_declareAnonymous (swingjs.plaf, "HTML5LookAndFeel$1", null, javax.swing.UIDefaults.ActiveValue); +Clazz_overrideMethod (c$, "createValue", +function (table) { +return new javax.swing.DefaultListCellRenderer.UIResource (); +}, "javax.swing.UIDefaults"); +c$ = Clazz_p0p (); +}; +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["javax.swing.plaf.ComponentUI", "swingjs.plaf.JSEventHandler"], "swingjs.plaf.JSComponentUI", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Color", "$.Component", "$.Dimension", "$.Point", "$.Toolkit", "java.awt.event.FocusEvent", "swingjs.JSToolkit", "swingjs.api.DOMNode"], function () { +c$ = Clazz_decorateAsClass (function () { +this.id = null; +this.c = null; +this.outerNode = null; +this.domNode = null; +this.enableNode = null; +this.textNode = null; +this.valueNode = null; +this.scrollNode = null; +this.focusNode = null; +this.components = null; +this.num = 0; +this.isTainted = true; +this.x = 0; +this.y = 0; +this.preferredSize = null; +this.isContainer = false; +this.parent = null; +this.currentText = null; +this.scrollerNode = null; +this.classID = null; +this.document = null; +this.body = null; +this.needPreferred = false; +Clazz_instantialize (this, arguments); +}, swingjs.plaf, "JSComponentUI", javax.swing.plaf.ComponentUI, swingjs.plaf.JSEventHandler); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, swingjs.plaf.JSComponentUI, []); +this.setDoc (); +}); +Clazz_defineMethod (c$, "setDoc", +function () { +{ +this.document = document; +this.body = document.body; +}}); +Clazz_overrideMethod (c$, "installUI", +function (c) { +}, "javax.swing.JComponent"); +Clazz_overrideMethod (c$, "uninstallUI", +function (c) { +this.uninstallJSUI (); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "$", +function (node) { +return swingjs.JSToolkit.getJQuery ().$ (node); +}, "swingjs.api.DOMNode"); +Clazz_defineMethod (c$, "setTainted", +function () { +this.isTainted = true; +}); +Clazz_defineMethod (c$, "set", +function (target) { +this.c = target; +this.newID (); +if (this.needPreferred) this.getPreferredSize (this.c); +this.installJSUI (); +return this; +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "newID", +function () { +this.classID = this.c.getUIClassID (); +if (this.id == null) { +this.num = ++swingjs.plaf.JSComponentUI.incr; +this.id = this.c.getHTMLName (this.classID) + "_" + this.num; +}}); +Clazz_defineMethod (c$, "setCssFont", +function (obj, font) { +if (font != null) { +var istyle = font.getStyle (); +var name = font.getFamily (); +if (name === "Dialog") name = "Arial"; +swingjs.api.DOMNode.setStyles (obj, ["font-family", name, "font-size", font.getSize () + "px", "font-style", ((istyle & 2) == 0 ? "normal" : "italic"), "font-weight", ((istyle & 1) == 0 ? "normal" : "bold")]); +}if (this.c.isBackgroundSet ()) this.setBackground (this.c.getBackground ()); +this.setForeground (this.c.getForeground ()); +return obj; +}, "swingjs.api.DOMNode,java.awt.Font"); +Clazz_defineMethod (c$, "createDOMObject", +function (key, id, attr) { +var obj = swingjs.api.DOMNode.createElement (key, id); +for (var i = 0; i < attr.length; ) swingjs.api.DOMNode.setAttr (obj, attr[i++], attr[i++]); + +if (!this.c.isEnabled ()) this.setEnabled (false); +return obj; +}, "~S,~S,~A"); +Clazz_defineMethod (c$, "bindMouse", +function (node) { +swingjs.api.DOMNode.setAttr (node, "data-UI", this); +}, "swingjs.api.DOMNode"); +Clazz_overrideMethod (c$, "handleJSEvent", +function (target, eventType, jQueryEvent) { +return false; +}, "~O,~N,~O"); +Clazz_defineMethod (c$, "wrap", +function (type, id, elements) { +return this.append (this.createDOMObject (type, id + type, []), elements); +}, "~S,~S,~A"); +Clazz_defineMethod (c$, "append", +function (obj, elements) { +for (var i = 0; i < elements.length; i++) { +obj.appendChild (elements[i]); +} +return obj; +}, "swingjs.api.DOMNode,~A"); +Clazz_defineMethod (c$, "debugDump", +function (d) { +System.out.println (swingjs.api.DOMNode.getAttr (d, "outerHTML")); +}, "swingjs.api.DOMNode"); +c$.vCenter = Clazz_defineMethod (c$, "vCenter", +function (obj, offset) { +swingjs.api.DOMNode.setStyles (obj, ["top", "50%", "transform", "translateY(" + offset + "%)"]); +}, "swingjs.api.DOMNode,~N"); +Clazz_defineMethod (c$, "setHTMLSize", +function (obj, addCSS) { +return this.setHTMLSize1 (obj, addCSS, true); +}, "swingjs.api.DOMNode,~B"); +Clazz_defineMethod (c$, "setHTMLSize1", +function (node, addCSS, usePreferred) { +if (node == null) return null; +var h; +var w; +var w0 = null; +var h0 = null; +var parentNode = null; +if (this.scrollerNode != null) { +w = this.scrollerNode.c.getWidth (); +h = this.scrollerNode.c.getHeight (); +} else if (usePreferred && this.preferredSize != null) { +w = this.preferredSize.width; +h = this.preferredSize.height; +} else { +parentNode = swingjs.api.DOMNode.remove (node); +{ +w0 = node.style.width; +h0 = node.style.height; +}swingjs.api.DOMNode.setStyles (node, ["position", null, "width", null, "height", null]); +var div; +if (swingjs.api.DOMNode.getAttr (node, "tagName") === "DIV") div = node; + else div = this.wrap ("div", this.id + "_temp", [node]); +swingjs.api.DOMNode.setStyles (div, ["position", "absolute"]); +this.body.appendChild (div); +w = Clazz_doubleToInt (Math.ceil (this.$ (div).width () + 0.5)); +h = Clazz_doubleToInt (Math.ceil (this.$ (div).height () + 0.5)); +this.body.removeChild (div); +}var size = this.getCSSDimension (w, h); +if (addCSS) { +swingjs.api.DOMNode.setStyles (node, ["position", "absolute"]); +swingjs.api.DOMNode.setSize (node, size.width, size.height); +} else { +swingjs.api.DOMNode.setStyles (node, ["position", null]); +if (w0 != null) swingjs.api.DOMNode.setStyles (node, ["width", w0, "height", h0]); +}if (parentNode != null) parentNode.appendChild (node); +return size; +}, "swingjs.api.DOMNode,~B,~B"); +Clazz_defineMethod (c$, "getCSSDimension", +function (w, h) { +return new java.awt.Dimension (w, h); +}, "~N,~N"); +Clazz_defineMethod (c$, "setHTMLElement", +function () { +if (!this.isTainted) return this.outerNode; +var root = (this.isContainer ? this.c.getRootPane () : null); +if (this.c === root) { +this.isTainted = false; +return this.outerNode; +}this.domNode = this.getDOMObject (); +if (this.outerNode == null) { +this.outerNode = this.wrap ("div", this.id, [this.domNode]); +if (root != null && root.getContentPane () === this.c) swingjs.JSToolkit.getHTML5Applet (this.c)._getContentLayer ().appendChild (this.outerNode); +}swingjs.api.DOMNode.setStyles (this.outerNode, ["position", "absolute", "left", (this.x = this.c.getX ()) + "px", "top", (this.y = this.c.getY ()) + "px"]); +if (this.isContainer) { +System.out.println ("JSComponentUI container " + this.id + " " + this.c.getBounds ()); +swingjs.api.DOMNode.setSize (this.outerNode, this.c.getWidth (), this.c.getHeight ()); +var children = (this.components == null ? this.c.getComponents () : this.components); +for (var i = children.length; --i >= 0; ) { +var ui = swingjs.JSToolkit.getUI (children[i], false); +if (ui == null) { +continue; +}if (ui.outerNode == null) ui.setHTMLElement (); +if (ui.outerNode == null) { +System.out.println ("JSCUI could not add " + ui.c.getName () + " to " + this.c.getName ()); +} else { +this.outerNode.appendChild (ui.outerNode); +}ui.parent = this; +} +}this.isTainted = false; +return this.outerNode; +}); +Clazz_defineMethod (c$, "getPreferredSize", +function (c) { +var d = this.setHTMLSize (this.getDOMObject (), false); +return d; +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "paint", +function (g, c) { +if (c.isOpaque ()) { +g.setColor (c.getBackground ()); +g.fillRect (0, 0, c.getWidth (), c.getHeight ()); +}}, "java.awt.Graphics,javax.swing.JComponent"); +Clazz_overrideMethod (c$, "update", +function (g, c) { +var testing = false; +if (testing) { +g.setColor (java.awt.Color.red); +g.drawRect (0, 0, c.getWidth (), c.getHeight ()); +System.out.println ("drawing " + c.getWidth () + " " + c.getHeight ()); +}this.setHTMLElement (); +this.paint (g, c); +}, "java.awt.Graphics,javax.swing.JComponent"); +Clazz_defineMethod (c$, "getMinimumSize", +function (c) { +return this.getPreferredSize (c); +}, "javax.swing.JComponent"); +Clazz_overrideMethod (c$, "getMaximumSize", +function (c) { +return null; +}, "javax.swing.JComponent"); +Clazz_overrideMethod (c$, "contains", +function (c, x, y) { +return c.inside (x, y); +}, "javax.swing.JComponent,~N,~N"); +c$.createUI = Clazz_overrideMethod (c$, "createUI", +function (c) { +return null; +}, "javax.swing.JComponent"); +Clazz_overrideMethod (c$, "getBaseline", +function (c, width, height) { +if (c == null) { +throw new NullPointerException ("Component must be non-null"); +}if (width < 0 || height < 0) { +throw new IllegalArgumentException ("Width and height must be >= 0"); +}return -1; +}, "javax.swing.JComponent,~N,~N"); +Clazz_overrideMethod (c$, "getBaselineResizeBehavior", +function (c) { +if (c == null) { +throw new NullPointerException ("Component must be non-null"); +}return java.awt.Component.BaselineResizeBehavior.OTHER; +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "getJSTextValue", +function () { +return swingjs.api.DOMNode.getAttr (this.domNode, this.valueNode == null ? "innerHTML" : "value"); +}); +Clazz_defineMethod (c$, "notifyPropertyChanged", +function (prop) { +var obj = null; +var val = null; +if (prop === "text") { +val = (this.c).getText (); +if (val.equals (this.currentText)) return; +this.currentText = val; +if (this.textNode != null) { +prop = "innerHTML"; +obj = this.textNode; +} else if (this.valueNode != null) { +prop = "value"; +obj = this.valueNode; +}} else if (prop === "preferredSize") { +this.preferredSize = this.c.getPreferredSize (); +this.getPreferredSize (); +return; +}if (obj == null) { +System.out.println ("JSComponentUI: unrecognized prop: " + prop); +} else { +System.out.println ("JSComponentUI: setting " + this.id + " " + prop); +this.setProp (obj, prop, val); +}}, "~S"); +Clazz_defineMethod (c$, "setProp", +function (obj, prop, val) { +return swingjs.api.DOMNode.setAttr (obj, prop, val); +}, "swingjs.api.DOMNode,~S,~S"); +Clazz_overrideMethod (c$, "isObscured", +function () { +swingjs.JSToolkit.notImplemented (""); +return false; +}); +Clazz_overrideMethod (c$, "canDetermineObscurity", +function () { +swingjs.JSToolkit.notImplemented (""); +return false; +}); +Clazz_overrideMethod (c$, "setVisible", +function (b) { +swingjs.api.DOMNode.setStyles (this.outerNode, ["display", b ? "block" : "none"]); +}, "~B"); +Clazz_overrideMethod (c$, "setEnabled", +function (b) { +if (this.enableNode != null) swingjs.api.DOMNode.setAttr (this.enableNode, "disabled", (b ? null : "TRUE")); +}, "~B"); +Clazz_defineMethod (c$, "paint", +function (g) { +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "repaint", +function (tm, x, y, width, height) { +}, "~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "print", +function (g) { +swingjs.JSToolkit.notImplemented (""); +}, "java.awt.Graphics"); +Clazz_overrideMethod (c$, "setBounds", +function (x, y, width, height, op) { +switch (op) { +case 2: +case 3: +case 4: +if (this.scrollerNode != null) { +width = Math.min (width, this.scrollerNode.c.getWidth ()); +height = Math.min (height, this.scrollerNode.c.getHeight ()); +}System.out.println (this.id + " setBounds " + x + " " + y + " " + width + " " + height + " op=" + op); +if (this.domNode != null) swingjs.api.DOMNode.setSize (this.domNode, width, height); +break; +} +}, "~N,~N,~N,~N,~N"); +Clazz_overrideMethod (c$, "handleEvent", +function (e) { +swingjs.JSToolkit.notImplemented (""); +}, "java.awt.AWTEvent"); +Clazz_overrideMethod (c$, "coalescePaintEvent", +function (e) { +swingjs.JSToolkit.notImplemented (""); +}, "java.awt.event.PaintEvent"); +Clazz_overrideMethod (c$, "getLocationOnScreen", +function () { +var offset = this.$ (this.outerNode).offset (); +return new java.awt.Point (offset.left, offset.top); +}); +Clazz_defineMethod (c$, "getPreferredSize", +function () { +return this.getPreferredSize (this.c); +}); +Clazz_defineMethod (c$, "getMinimumSize", +function () { +swingjs.JSToolkit.notImplemented (""); +return this.getPreferredSize (this.c); +}); +Clazz_overrideMethod (c$, "getColorModel", +function () { +return java.awt.Toolkit.getDefaultToolkit ().getColorModel (); +}); +Clazz_overrideMethod (c$, "getToolkit", +function () { +return java.awt.Toolkit.getDefaultToolkit (); +}); +Clazz_overrideMethod (c$, "getGraphics", +function () { +return null; +}); +Clazz_overrideMethod (c$, "getFontMetrics", +function (font) { +return this.c.getFontMetrics (font); +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "dispose", +function () { +swingjs.JSToolkit.notImplemented (""); +}); +Clazz_overrideMethod (c$, "setForeground", +function (color) { +if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.black : color)]); +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setBackground", +function (color) { +if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["background-color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.white : color)]); +}, "java.awt.Color"); +Clazz_overrideMethod (c$, "setFont", +function (f) { +if (this.domNode != null) this.setCssFont (this.domNode, f); +}, "java.awt.Font"); +Clazz_overrideMethod (c$, "updateCursorImmediately", +function () { +swingjs.JSToolkit.notImplemented (""); +}); +Clazz_overrideMethod (c$, "requestFocus", +function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { +if (this.focusNode == null) return false; +this.$ (this.focusNode).focus (); +if (this.textNode != null) this.$ (this.textNode).select (); +return true; +}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); +Clazz_overrideMethod (c$, "isFocusable", +function () { +return (this.focusNode != null); +}); +Clazz_defineMethod (c$, "createImage", +function (producer) { +swingjs.JSToolkit.notImplemented (""); +return null; +}, "java.awt.image.ImageProducer"); +Clazz_defineMethod (c$, "createImage", +function (width, height) { +swingjs.JSToolkit.notImplemented (""); +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "createVolatileImage", +function (width, height) { +swingjs.JSToolkit.notImplemented (""); +return null; +}, "~N,~N"); +Clazz_overrideMethod (c$, "prepareImage", +function (img, w, h, o) { +swingjs.JSToolkit.notImplemented (""); +return false; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "checkImage", +function (img, w, h, o) { +swingjs.JSToolkit.notImplemented (""); +return 0; +}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); +Clazz_overrideMethod (c$, "getGraphicsConfiguration", +function () { +swingjs.JSToolkit.notImplemented (""); +return null; +}); +Clazz_overrideMethod (c$, "handlesWheelScrolling", +function () { +swingjs.JSToolkit.notImplemented (""); +return false; +}); +Clazz_overrideMethod (c$, "getBackBuffer", +function () { +swingjs.JSToolkit.notImplemented (""); +return null; +}); +Clazz_overrideMethod (c$, "destroyBuffers", +function () { +swingjs.JSToolkit.notImplemented (""); +}); +Clazz_overrideMethod (c$, "reparent", +function (newContainer) { +swingjs.JSToolkit.notImplemented (""); +}, "java.awt.peer.ContainerPeer"); +Clazz_overrideMethod (c$, "isReparentSupported", +function () { +swingjs.JSToolkit.notImplemented (""); +return false; +}); +Clazz_overrideMethod (c$, "layout", +function () { +swingjs.JSToolkit.notImplemented (""); +}); +Clazz_overrideMethod (c$, "getBounds", +function () { +swingjs.JSToolkit.notImplemented (""); +return null; +}); +Clazz_defineMethod (c$, "hasFocus", +function () { +return this.focusNode != null && this.focusNode === swingjs.api.DOMNode.getAttr (this.document, "activeElement"); +}); +Clazz_defineMethod (c$, "notifyFocus", +function (focusGained) { +java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.FocusEvent (this.c, focusGained ? 1004 : 1005)); +}, "~B"); +Clazz_defineStatics (c$, +"incr", 0); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSPanelUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () { +c$ = Clazz_declareType (swingjs.plaf, "JSPanelUI", swingjs.plaf.JSComponentUI); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, swingjs.plaf.JSPanelUI, []); +this.isContainer = true; +this.setDoc (); +}); +Clazz_overrideMethod (c$, "getDOMObject", +function () { +if (this.domNode == null) this.domNode = this.createDOMObject ("label", this.id, []); +return this.domNode; +}); +Clazz_overrideMethod (c$, "setHTMLSize", +function (obj, addCSS) { +return new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ()); +}, "swingjs.api.DOMNode,~B"); +Clazz_defineMethod (c$, "getPreferredSize", +function (c) { +return null; +}, "javax.swing.JComponent"); +Clazz_overrideMethod (c$, "installJSUI", +function () { +javax.swing.LookAndFeel.installColorsAndFont (this.c, "Panel.background", "Panel.foreground", "Panel.font"); +}); +Clazz_overrideMethod (c$, "uninstallJSUI", +function () { +}); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () { +c$ = Clazz_decorateAsClass (function () { +this.label = null; +Clazz_instantialize (this, arguments); +}, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI); +Clazz_overrideMethod (c$, "getDOMObject", +function () { +return this.getButtonObject ("radio"); +}); +Clazz_overrideMethod (c$, "getPropertyPrefix", +function () { +return "RadioButton."; +}); +Clazz_overrideMethod (c$, "setHTMLSize", +function (obj, addCSS) { +swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]); +swingjs.api.DOMNode.setStyles (this.label, ["position", null]); +var d = this.setHTMLSize1 (obj, addCSS, false); +swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]); +swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]); +return d; +}, "swingjs.api.DOMNode,~B"); +Clazz_defineMethod (c$, "getButtonObject", +function (myType) { +var b = this.c; +var isNew = false; +var doAll = false; +if (this.domNode == null) { +doAll = true; +if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames = new java.util.HashMap (); +var bg = null; +var name = this.id; +isNew = true; +if (Clazz_instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) { +bg = (b.getModel ()).getGroup (); +name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg); +if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id); + else isNew = false; +}this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]); +this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]); +}if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true"); +this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ()); +var drad = this.setHTMLSize1 (this.domBtn, false, false); +this.setHTMLSize1 (this.label, false, false); +var obj = this.wrap ("div", "", [this.domBtn, this.label]); +var dobj = this.setHTMLSize1 (obj, true, true); +swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75); +swingjs.plaf.JSComponentUI.vCenter (this.label, -50); +swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]); +swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]); +if (doAll) { +obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]); +swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]); +} else { +obj = this.domNode; +obj.appendChild (this.domBtn); +obj.appendChild (this.label); +}return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height); +}, "~S"); +Clazz_defineStatics (c$, +"groupNames", null); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSRootPaneUI", null, function () { +c$ = Clazz_declareType (swingjs.plaf, "JSRootPaneUI", swingjs.plaf.JSComponentUI); +Clazz_makeConstructor (c$, +function () { +Clazz_superConstructor (this, swingjs.plaf.JSRootPaneUI, []); +this.isContainer = true; +this.setDoc (); +}); +Clazz_overrideMethod (c$, "getDOMObject", +function () { +return null; +}); +Clazz_overrideMethod (c$, "installJSUI", +function () { +}); +Clazz_overrideMethod (c$, "uninstallJSUI", +function () { +}); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["java.awt.event.FocusListener", "$.MouseListener", "$.MouseMotionListener", "java.beans.PropertyChangeListener", "javax.swing.event.ChangeListener", "jssun.swing.UIAction"], "swingjs.plaf.JSButtonListener", ["javax.swing.AbstractButton", "$.KeyStroke", "$.SwingUtilities", "javax.swing.plaf.ComponentInputMapUIResource", "swingjs.plaf.LazyActionMap"], function () { +c$ = Clazz_decorateAsClass (function () { +this.lastPressedTimestamp = -1; +this.shouldDiscardRelease = false; +this.btn = null; +Clazz_instantialize (this, arguments); +}, swingjs.plaf, "JSButtonListener", null, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener]); +c$.loadActionMap = Clazz_defineMethod (c$, "loadActionMap", +function (map) { +map.put ( new swingjs.plaf.JSButtonListener.Actions ("pressed")); +map.put ( new swingjs.plaf.JSButtonListener.Actions ("released")); +}, "swingjs.plaf.LazyActionMap"); +Clazz_makeConstructor (c$, +function (b) { +this.btn = b; +}, "javax.swing.AbstractButton"); +Clazz_overrideMethod (c$, "propertyChange", +function (e) { +var prop = e.getPropertyName (); +if (prop === "mnemonic") { +this.updateMnemonicBinding (e.getSource ()); +} else if (prop === "contentAreaFilled") { +this.checkOpacity (e.getSource ()); +} else if (prop === "text" || "font" === prop || "foreground" === prop) { +var b = e.getSource (); +(b.getUI ()).notifyPropertyChanged (prop); +}}, "java.beans.PropertyChangeEvent"); +Clazz_defineMethod (c$, "checkOpacity", +function (b) { +b.setOpaque (b.isContentAreaFilled ()); +}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "installKeyboardActions", +function (c) { +var b = c; +this.updateMnemonicBinding (b); +swingjs.plaf.LazyActionMap.installLazyActionMap (c, swingjs.plaf.JSButtonListener, "Button.actionMap"); +var km = this.getInputMap (0, c); +javax.swing.SwingUtilities.replaceUIInputMap (c, 0, km); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "uninstallKeyboardActions", +function (c) { +javax.swing.SwingUtilities.replaceUIInputMap (c, 2, null); +javax.swing.SwingUtilities.replaceUIInputMap (c, 0, null); +javax.swing.SwingUtilities.replaceUIActionMap (c, null); +}, "javax.swing.JComponent"); +Clazz_defineMethod (c$, "getInputMap", +function (condition, c) { +return null; +}, "~N,javax.swing.JComponent"); +Clazz_defineMethod (c$, "updateMnemonicBinding", +function (b) { +var m = b.getMnemonic (); +if (m != 0) { +var map = javax.swing.SwingUtilities.getUIInputMap (b, 2); +if (map == null) { +map = new javax.swing.plaf.ComponentInputMapUIResource (b); +javax.swing.SwingUtilities.replaceUIInputMap (b, 2, map); +}map.clear (); +map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, false), "pressed"); +map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, true), "released"); +map.put (javax.swing.KeyStroke.getKeyStroke (m, 0, true), "released"); +} else { +var map = javax.swing.SwingUtilities.getUIInputMap (b, 2); +if (map != null) { +map.clear (); +}}}, "javax.swing.AbstractButton"); +Clazz_overrideMethod (c$, "stateChanged", +function (e) { +var b = e.getSource (); +b.repaint (); +}, "javax.swing.event.ChangeEvent"); +Clazz_overrideMethod (c$, "focusGained", +function (e) { +}, "java.awt.event.FocusEvent"); +Clazz_overrideMethod (c$, "focusLost", +function (e) { +var b = e.getSource (); +var model = b.getModel (); +model.setArmed (false); +model.setPressed (false); +}, "java.awt.event.FocusEvent"); +Clazz_overrideMethod (c$, "mouseMoved", +function (e) { +}, "java.awt.event.MouseEvent"); +Clazz_overrideMethod (c$, "mouseDragged", +function (e) { +}, "java.awt.event.MouseEvent"); +Clazz_overrideMethod (c$, "mouseClicked", +function (e) { +}, "java.awt.event.MouseEvent"); +Clazz_overrideMethod (c$, "mousePressed", +function (e) { +if (javax.swing.SwingUtilities.isLeftMouseButton (e)) { +var b = e.getSource (); +if (!b.contains (e.getX (), e.getY ())) return; +(b.getUI ()).verifyButtonClick (false); +var multiClickThreshhold = b.getMultiClickThreshhold (); +var lastTime = this.lastPressedTimestamp; +var currentTime = this.lastPressedTimestamp = e.getWhen (); +if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) { +this.shouldDiscardRelease = true; +return; +}var model = b.getModel (); +if (!model.isEnabled ()) { +return; +}if (!model.isArmed ()) { +model.setArmed (true); +}model.setPressed (true); +if (!b.hasFocus () && b.isRequestFocusEnabled ()) { +b.requestFocus (); +}}}, "java.awt.event.MouseEvent"); +Clazz_overrideMethod (c$, "mouseReleased", +function (e) { +if (javax.swing.SwingUtilities.isLeftMouseButton (e)) { +if (this.shouldDiscardRelease) { +this.shouldDiscardRelease = false; +return; +}var b = e.getSource (); +if (!(b.getUI ()).verifyButtonClick (true)) return; +var model = b.getModel (); +model.setPressed (false); +model.setArmed (false); +}}, "java.awt.event.MouseEvent"); +Clazz_overrideMethod (c$, "mouseEntered", +function (e) { +var b = e.getSource (); +var model = b.getModel (); +if (b.isRolloverEnabled () && !javax.swing.SwingUtilities.isLeftMouseButton (e)) { +model.setRollover (true); +}if (model.isPressed ()) model.setArmed (true); +}, "java.awt.event.MouseEvent"); +Clazz_overrideMethod (c$, "mouseExited", +function (e) { +var b = e.getSource (); +var model = b.getModel (); +if (b.isRolloverEnabled ()) { +model.setRollover (false); +}model.setArmed (false); +}, "java.awt.event.MouseEvent"); +Clazz_pu$h(self.c$); +c$ = Clazz_declareType (swingjs.plaf.JSButtonListener, "Actions", jssun.swing.UIAction); +Clazz_overrideMethod (c$, "actionPerformed", +function (a) { +var b = a.getSource (); +var c = this.getName (); +if (c === "pressed") { +var d = b.getModel (); +d.setArmed (true); +d.setPressed (true); +if (!b.hasFocus ()) { +b.requestFocus (); +}} else if (c === "released") { +var d = b.getModel (); +d.setPressed (false); +d.setArmed (false); +}}, "java.awt.event.ActionEvent"); +Clazz_defineMethod (c$, "isEnabled", +function (a) { +if (a != null && (Clazz_instanceOf (a, javax.swing.AbstractButton)) && !(a).getModel ().isEnabled ()) { +return false; +} else { +return true; +}}, "~O"); +Clazz_defineStatics (c$, +"PRESS", "pressed", +"RELEASE", "released"); +c$ = Clazz_p0p (); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () { +c$ = Clazz_decorateAsClass (function () { +this.domBtn = null; +this.shiftOffset = 0; +this.defaultTextShiftOffset = 0; +Clazz_instantialize (this, arguments); +}, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI); +Clazz_overrideMethod (c$, "getDOMObject", +function () { +if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]); +this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ()); +return this.domNode; +}); +Clazz_defineMethod (c$, "verifyButtonClick", +function (isRelease) { +return true; +}, "~B"); +Clazz_overrideMethod (c$, "installJSUI", +function () { +this.installDefaults (this.c); +this.installListeners (this.c); +this.installKeyboardActions (this.c); +}); +Clazz_overrideMethod (c$, "uninstallJSUI", +function () { +this.uninstallKeyboardActions (this.c); +this.uninstallListeners (this.c); +}); +Clazz_defineMethod (c$, "installListeners", +function (b) { +var listener = new swingjs.plaf.JSButtonListener (b); +if (listener != null) { +b.addMouseListener (listener); +b.addMouseMotionListener (listener); +b.addFocusListener (listener); +b.addPropertyChangeListener (listener); +b.addChangeListener (listener); +}}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "uninstallListeners", +function (b) { +var listener = this.getButtonListener (b); +if (listener != null) { +b.removeMouseListener (listener); +b.removeMouseMotionListener (listener); +b.removeFocusListener (listener); +b.removeChangeListener (listener); +b.removePropertyChangeListener (listener); +}}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "installKeyboardActions", +function (b) { +var listener = this.getButtonListener (b); +if (listener != null) { +listener.installKeyboardActions (b); +}}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "uninstallKeyboardActions", +function (b) { +var listener = this.getButtonListener (b); +if (listener != null) { +listener.uninstallKeyboardActions (b); +}}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "getButtonListener", +function (b) { +var listeners = b.getMouseMotionListeners (); +if (listeners != null) { +for (var counter = 0; counter < listeners.length; counter++) { +if (Clazz_instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) { +return listeners[counter]; +}} +}return null; +}, "javax.swing.AbstractButton"); +Clazz_defineMethod (c$, "getPropertyPrefix", +function () { +return "Button."; +}); +Clazz_defineMethod (c$, "installDefaults", +function (b) { +var pp = this.getPropertyPrefix (); +this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset"); +if (b.getMargin () == null || (Clazz_instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) { +b.setMargin (javax.swing.UIManager.getInsets (pp + "margin")); +}javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font"); +javax.swing.LookAndFeel.installProperty (b, "iconTextGap", new Integer (4)); +}, "javax.swing.AbstractButton"); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () { +c$ = Clazz_decorateAsClass (function () { +this.isDomChecked = false; +Clazz_instantialize (this, arguments); +}, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI); +Clazz_overrideMethod (c$, "verifyButtonClick", +function (isRelease) { +var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true); +if (isRelease && this.isDomChecked == checked) return false; +this.isDomChecked = checked; +return true; +}, "~B"); +Clazz_overrideMethod (c$, "getPropertyPrefix", +function () { +return "ToggleButton."; +}); +}); +Clazz_declarePackage ("swingjs.plaf"); +Clazz_load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () { +c$ = Clazz_decorateAsClass (function () { +this._loader = null; +Clazz_instantialize (this, arguments); +}, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource); +c$.installLazyActionMap = Clazz_defineMethod (c$, "installLazyActionMap", +function (c, loaderClass, defaultsKey) { +var map = javax.swing.UIManager.get (defaultsKey); +if (map == null) { +map = new swingjs.plaf.LazyActionMap (loaderClass); +}javax.swing.SwingUtilities.replaceUIActionMap (c, map); +}, "javax.swing.JComponent,Class,~S"); +c$.getActionMap = Clazz_defineMethod (c$, "getActionMap", +function (loaderClass, defaultsKey) { +var map = javax.swing.UIManager.get (defaultsKey); +if (map == null) { +map = new swingjs.plaf.LazyActionMap (loaderClass); +}return map; +}, "Class,~S"); +Clazz_makeConstructor (c$, + function (loader) { +Clazz_superConstructor (this, swingjs.plaf.LazyActionMap, []); +this._loader = loader; +}, "Class"); +Clazz_defineMethod (c$, "put", +function (action) { +this.put (action.getValue ("Name"), action); +}, "javax.swing.Action"); +Clazz_defineMethod (c$, "put", +function (key, action) { +this.loadIfNecessary (); +Clazz_superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]); +}, "~O,javax.swing.Action"); +Clazz_defineMethod (c$, "get", +function (key) { +this.loadIfNecessary (); +return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "get", [key]); +}, "~O"); +Clazz_defineMethod (c$, "remove", +function (key) { +this.loadIfNecessary (); +Clazz_superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]); +}, "~O"); +Clazz_defineMethod (c$, "clear", +function () { +this.loadIfNecessary (); +Clazz_superCall (this, swingjs.plaf.LazyActionMap, "clear", []); +}); +Clazz_defineMethod (c$, "keys", +function () { +this.loadIfNecessary (); +return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "keys", []); +}); +Clazz_defineMethod (c$, "size", +function () { +this.loadIfNecessary (); +return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "size", []); +}); +Clazz_defineMethod (c$, "allKeys", +function () { +this.loadIfNecessary (); +return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []); +}); +Clazz_defineMethod (c$, "setParent", +function (map) { +this.loadIfNecessary (); +Clazz_superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]); +}, "javax.swing.ActionMap"); +Clazz_defineMethod (c$, "loadIfNecessary", + function () { +if (this._loader != null) { +{ +this._loader.loadActionMap(this); +this._loader = null; +}}}); +}); +})(Clazz +,Clazz.getClassName +,Clazz.newLongArray +,Clazz.doubleToByte +,Clazz.doubleToInt +,Clazz.doubleToLong +,Clazz.declarePackage +,Clazz.instanceOf +,Clazz.load +,Clazz.instantialize +,Clazz.decorateAsClass +,Clazz.floatToInt +,Clazz.floatToLong +,Clazz.makeConstructor +,Clazz.defineEnumConstant +,Clazz.exceptionOf +,Clazz.newIntArray +,Clazz.defineStatics +,Clazz.newFloatArray +,Clazz.declareType +,Clazz.prepareFields +,Clazz.superConstructor +,Clazz.newByteArray +,Clazz.declareInterface +,Clazz.p0p +,Clazz.pu$h +,Clazz.newShortArray +,Clazz.innerTypeInstance +,Clazz.isClassDefined +,Clazz.prepareCallback +,Clazz.newArray +,Clazz.castNullAs +,Clazz.floatToShort +,Clazz.superCall +,Clazz.decorateAsType +,Clazz.newBooleanArray +,Clazz.newCharArray +,Clazz.implementOf +,Clazz.newDoubleArray +,Clazz.overrideConstructor +,Clazz.clone +,Clazz.doubleToShort +,Clazz.getInheritedLevel +,Clazz.getParamsType +,Clazz.isAF +,Clazz.isAI +,Clazz.isAS +,Clazz.isASS +,Clazz.isAP +,Clazz.isAFloat +,Clazz.isAII +,Clazz.isAFF +,Clazz.isAFFF +,Clazz.tryToSearchAndExecute +,Clazz.getStackTrace +,Clazz.inheritArgs +,Clazz.alert +,Clazz.defineMethod +,Clazz.overrideMethod +,Clazz.declareAnonymous +,Clazz.checkPrivateMethod +,Clazz.cloneFinals +); diff --git a/site/j2s/core/coreswingjs.z.js b/site/j2s/core/coreswingjs.z.js index 8acc638..033e4d8 100644 --- a/site/j2s/core/coreswingjs.z.js +++ b/site/j2s/core/coreswingjs.z.js @@ -1,52965 +1,2167 @@ -(function(Clazz -,Clazz_getClassName -,Clazz_newLongArray -,Clazz_doubleToByte -,Clazz_doubleToInt -,Clazz_doubleToLong -,Clazz_declarePackage -,Clazz_instanceOf -,Clazz_load -,Clazz_instantialize -,Clazz_decorateAsClass -,Clazz_floatToInt -,Clazz_floatToLong -,Clazz_makeConstructor -,Clazz_defineEnumConstant -,Clazz_exceptionOf -,Clazz_newIntArray -,Clazz_defineStatics -,Clazz_newFloatArray -,Clazz_declareType -,Clazz_prepareFields -,Clazz_superConstructor -,Clazz_newByteArray -,Clazz_declareInterface -,Clazz_p0p -,Clazz_pu$h -,Clazz_newShortArray -,Clazz_innerTypeInstance -,Clazz_isClassDefined -,Clazz_prepareCallback -,Clazz_newArray -,Clazz_castNullAs -,Clazz_floatToShort -,Clazz_superCall -,Clazz_decorateAsType -,Clazz_newBooleanArray -,Clazz_newCharArray -,Clazz_implementOf -,Clazz_newDoubleArray -,Clazz_overrideConstructor -,Clazz_clone -,Clazz_doubleToShort -,Clazz_getInheritedLevel -,Clazz_getParamsType -,Clazz_isAF -,Clazz_isAI -,Clazz_isAS -,Clazz_isASS -,Clazz_isAP -,Clazz_isAFloat -,Clazz_isAII -,Clazz_isAFF -,Clazz_isAFFF -,Clazz_tryToSearchAndExecute -,Clazz_getStackTrace -,Clazz_inheritArgs -,Clazz_alert -,Clazz_defineMethod -,Clazz_overrideMethod -,Clazz_declareAnonymous -,Clazz_checkPrivateMethod -,Clazz_cloneFinals -){ -var $t$; -//var c$; -// JSmolJavaExt.js - - -// This library will be wrapped by an additional anonymous function using ANT in -// build_03_tojs.xml. This task will also modify variable names. References -// to Clazz._ will not be changed, but other Clazz_xxx will be changed to -// (local scope) Clazz_xxx, allowing them to be further compressed using -// Google Closure Compiler in that same ANT task. - -// BH 5/31/2015 5:53:04 PM Number.compareTo added -// BH 5/21/2015 5:46:30 PM Number("0xFFFFFFFF") is not -1 -// BH 4/23/2015 9:08:59 AM xx.getComponentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works -// BH 4/12/2015 1:37:44 PM adding Math.rint = Math.round -// BH 1/16/2015 10:09:38 AM Chrome failure jqGrig due to new String("x").toString() not being a simple string -// BH 8/14/2014 6:49:22 PM Character class efficiencies -// BH 7/24/2014 9:02:18 AM most browsers do not support String.codePointAt() -// BH 7/11/2014 4:17:22 PM fix for Boolean.valueOf("false") not being false -// BH 5/27/2014 6:29:59 AM ensure floats and doubles have decimal point in toString -// BH 4/1/2014 12:23:41 PM Encoding moved to Clazz._Encoding; -// BH 4/1/2014 7:51:46 AM removing java.lang.B00lean -// BH 3/7/2014 9:17:10 AM removing Array.toString; moving that code here from j2sJmol.js -// BH 1/30/2014 9:04:25 AM adding Throwable.getStackTrace() as a STRING -// BH 12/4/2013 9:20:44 PM fix for reassigning Date.prototype.toString() -// BH 12/3/2013 11:43:10 AM bizarre Safari bug in reassigning Boolean (OK, I admit, we shouldn't have done that...) -// BH 12/1/2013 6:50:16 AM evit Number.prototype.toString assignment removed! -// BH 11/30/2013 1:46:31 PM fixing Byte, Short, Long, Integer, Float, Double to reflect proper bounds and error conditions -// BH 11/29/2013 8:58:49 PM removing Boolean.toString(boolean) -// BH 11/4/2013 7:34:26 AM changing "var nativeClazz" to "var nativeClass" to avoid ANT replacement of "nativeClazz_" to "nativeClazz_" -// BH 10/19/2013 1:29:27 PM fixed String.$replace() -// BH 10/18/2013 6:09:23 PM fixed (Double|Float).valueOf(NaN).valueOf(), which should return NaN, not throw an error -// BH 10/12/2013 11:18:44 AM fixed bug in Double(String) and Float(String) that was returning typeof "string" -// BH 10/10/2013 2:40:20 PM added Math.log10 -// BH 7/23/2013 7:24:01 AM fixing Number.shortValue() and Number.byteValue() for negative values -// BH 6/16/2013 1:31:30 PM adding /| in String.replace -- thank you David Koes -// BH 3/13/2013 12:49:23 PM setting Boolean.valueOf() "@" -// BH 3/2/2013 10:46:45 PM removed Double.valueOf(String) -// BH 11/6/2012 8:26:33 PM added instanceof Int32Array in String.instantialize -// BH 10/13/2012 11:38:07 PM corrected Integer.parseInt to allow only +-0123456789; created Integer.parseIntRadix -// BH 11/1/2012 added Short -// BH 9/10/2012 6:27:21 AM added java.net.URL... classes -// BH 1/7/2013 7:40:06 AM added Clazz_dateToString - -;(function(Clazz) { - -// moved here from package.js -// these classes will be created as objects prior to any others -// and are then available immediately - - Clazz._Loader.registerPackages("java", [ "io", "lang", "lang.reflect", "util" ]); - - var sJU = "java.util"; - - //var sJU = "JU"; - //Clazz._Loader.registerPackages (sJU, ["regex", "zip"]); - //var javautil = JU; - - var javautil = java.util; - - Clazz._Loader.ignore([ - "net.sf.j2s.ajax.HttpRequest", - sJU + ".MapEntry.Type", - //"java.net.UnknownServiceException", - "java.lang.Runtime", - "java.security.AccessController", - "java.security.PrivilegedExceptionAction", - "java.io.File", - "java.io.FileInputStream", - "java.io.FileWriter", - "java.io.OutputStreamWriter", -// sJU + ".Calendar", // bypassed in ModelCollection -// "java.text.SimpleDateFormat", // not used -// "java.text.DateFormat", // not used - sJU + ".concurrent.Executors" - ]) - -Math.rint = Math.round; - -Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046}); - -if(Clazz._supportsNativeObject){ - // Number and Array are special -- do not override prototype.toString -- "length - 2" here - for(var i=0;i 0 ? x - 0x10000 : x); -}); - -Clazz_defineMethod(Number,"byteValue", -function(){ -var x = Math.round(this)&0xff; -return (this < 0 && x > 0 ? x - 0x100 : x); -}); - -Clazz_defineMethod(Number,"intValue", -function(){ -return Math.round(this)&0xffffffff; -}); - -Clazz_defineMethod(Number,"longValue", -function(){ -return Math.round(this); -}); - -Clazz_defineMethod(Number,"floatValue", -function(){ -return this.valueOf(); -}); -Clazz_defineMethod(Number,"doubleValue", -function(){ -return parseFloat(this.valueOf()); -}); - -Clazz_overrideMethod(Number,"hashCode", -function(){ -return this.valueOf(); -}); - -java.lang.Integer=Integer=function(){ -Clazz_instantialize(this,arguments); -}; -Clazz_decorateAsType(Integer,"Integer",Number,Comparable,null,true); -Integer.prototype.valueOf=function(){return 0;}; -Integer.toString=Integer.prototype.toString=function(){ -if(arguments.length!=0){ -return""+arguments[0]; -} else if(this===Integer){ -return"class java.lang.Integer"; -} -return""+this.valueOf(); -}; - -/* - -Clazz_makeConstructor(Integer, -function(){ -this.valueOf=function(){ -return 0; -}; -}); -*/ - - -Clazz_overrideConstructor(Integer, function(v){ - v == null && (v = 0); - if (typeof v != "number") - v = Integer.parseIntRadix(v, 10); - this.valueOf=function(){return v;}; -}); //BH -/* -Clazz_makeConstructor(Integer, -function(s){ -var value=Integer.parseInt(s,10); -this.valueOf=function(){ -return value; -}; -},"String"); -*/ -Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000; -Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff; -Integer.TYPE=Integer.prototype.TYPE=Integer; - - -Clazz_defineMethod(Integer,"bitCount", -function(i) { - i = i - ((i >>> 1) & 0x55555555); - i = (i & 0x33333333) + ((i >>> 2) & 0x33333333); - i = (i + (i >>> 4)) & 0x0f0f0f0f; - i = i + (i >>> 8); - i = i + (i >>> 16); - return i & 0x3f; -},"Number"); -Integer.bitCount=Integer.prototype.bitCount; - -Clazz_defineMethod(Integer,"numberOfLeadingZeros", -function(i) { - if (i == 0) return 32; - var n = 1; - if (i >>> 16 == 0) { n += 16; i <<= 16; } - if (i >>> 24 == 0) { n += 8; i <<= 8; } - if (i >>> 28 == 0) { n += 4; i <<= 4; } - if (i >>> 30 == 0) { n += 2; i <<= 2; } - n -= i >>> 31; - return n; -},"Number"); -Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros; - -Clazz_defineMethod(Integer,"numberOfTrailingZeros", -function(i) { - if (i == 0) return 32; - var n = 31; - var y = i <<16; if (y != 0) { n = n -16; i = y; } - y = i << 8; if (y != 0) { n = n - 8; i = y; } - y = i << 4; if (y != 0) { n = n - 4; i = y; } - y = i << 2; if (y != 0) { n = n - 2; i = y; } - return n - ((i << 1) >>> 31); -},"Number"); -Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros; - -Clazz_defineMethod(Integer,"parseIntRadix", -function(s,radix){ -if(s==null){ -throw new NumberFormatException("null"); -}if(radix<2){ -throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX"); -}if(radix>36){ -throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX"); -} -if (radix == 10) { - for (var i = s.length; --i >= 0;) { - var c = s.charCodeAt(i); - if (c >= 48 && c <= 57) continue; - if (i > 0 || c != 43 && c != 45) - throw new NumberFormatException("Not a Number : "+s); - - } -} -var i=parseInt(s,radix); -if(isNaN(i)){ -throw new NumberFormatException("Not a Number : "+s); -} -return i; -},"String, Number"); -Integer.parseIntRadix=Integer.prototype.parseIntRadix; - -Clazz_defineMethod(Integer,"parseInt", -function(s){ -return Integer.parseIntRadix(s,10); -},"String"); -Integer.parseInt=Integer.prototype.parseInt; - -/* -Clazz_defineMethod(Integer,"$valueOf", -function(s){ -return new Integer(Integer.parseIntRadix(s,10)); -},"String"); -*/ - -Clazz_overrideMethod(Integer,"$valueOf", -function(s){ -return new Integer(s); -}); - -/* -Clazz_defineMethod(Integer,"$valueOf", -function(s,r){ -return new Integer(Integer.parseIntRadix(s,r)); -},"String, Number"); -*/ - -Integer.$valueOf=Integer.prototype.$valueOf; - - -Clazz_overrideMethod(Integer,"equals", -function(s){ -if(s==null||!Clazz_instanceOf(s,Integer)){ -return false; -} -return s.valueOf()==this.valueOf(); -},"Object"); -Integer.toHexString=Integer.prototype.toHexString=function(d){ -if(d.valueOf)d=d.valueOf(); -if (d < 0) { -var b = d & 0xFFFFFF; -var c = ((d>>24)&0xFF); -return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6); -} -return d._numberToString(16);}; -Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);}; -Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);}; - -Integer.decodeRaw=Clazz_defineMethod(Integer,"decodeRaw", function(n){ -if (n.indexOf(".") >= 0)n = ""; -var i = (n.startsWith("-") ? 1 : 0); -n = n.replace(/\#/, "0x").toLowerCase(); -var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10); -// The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10. -// Number is strict, but Number("055") does not work, though ParseInt("055", 8) does. -// need to make sure negative numbers are negative -n = Number(n) & 0xFFFFFFFF; -return (radix == 8 ? parseInt(n, 8) : n); -},"~S"); - -Integer.decode=Clazz_defineMethod(Integer,"decode", function(n){ - n = Integer.decodeRaw(n); - if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE) - throw new NumberFormatException("Invalid Integer"); - return new Integer(n); -},"~S"); - -Clazz_overrideMethod(Integer,"hashCode", -function(){ -return this.valueOf(); -}); - -// Note that Long is problematic in JavaScript - -java.lang.Long=Long=function(){ -Clazz_instantialize(this,arguments); -}; -Clazz_decorateAsType(Long,"Long",Number,Comparable,null,true); -Long.prototype.valueOf=function(){return 0;}; -Long.toString=Long.prototype.toString=function(){ -if(arguments.length!=0){ -return""+arguments[0]; -}else if(this===Long){ -return"class java.lang.Long"; -} -return""+this.valueOf(); -}; - -Clazz_overrideConstructor(Long, function(v){ - v == null && (v = 0); - v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10)); -this.valueOf=function(){return v;}; -}); - -//Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000; -//Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff; -Long.TYPE=Long.prototype.TYPE=Long; - -Clazz_defineMethod(Long,"parseLong", -function(s,radix){ - return Integer.parseInt(s, radix || 10); -}); - -Long.parseLong=Long.prototype.parseLong; - -Clazz_overrideMethod(Long,"$valueOf", -function(s){ -return new Long(s); -}); -/* -Clazz_defineMethod(Long,"$valueOf", -function(s){ -return new Long(s); -},"Number"); - -Clazz_defineMethod(Long,"$valueOf", -function(s,r){ -return new Long(Long.parseLong(s,r)); -},"String, Number"); -*/ -Long.$valueOf=Long.prototype.$valueOf; -Clazz_overrideMethod(Long,"equals", -function(s){ -if(s==null||!Clazz_instanceOf(s,Long)){ -return false; -} -return s.valueOf()==this.valueOf(); -},"Object"); -Long.toHexString=Long.prototype.toHexString=function(i){ -return i.toString(16); -}; -Long.toOctalString=Long.prototype.toOctalString=function(i){ -return i.toString(8); -}; -Long.toBinaryString=Long.prototype.toBinaryString=function(i){ -return i.toString(2); -}; - - -Long.decode=Clazz_defineMethod(Long,"decode", -function(n){ - n = Integer.decodeRaw(n); - if (isNaN(n)) - throw new NumberFormatException("Invalid Long"); - return new Long(n); -},"~S"); - -java.lang.Short = Short = function () { -Clazz_instantialize (this, arguments); -}; -Clazz_decorateAsType (Short, "Short", Number, Comparable, null, true); -Short.prototype.valueOf = function () { return 0; }; -Short.toString = Short.prototype.toString = function () { - if (arguments.length != 0) { - return "" + arguments[0]; - } else if (this === Short) { - return "class java.lang.Short"; // Short.class.toString - } - return "" + this.valueOf (); -}; - -Clazz_overrideConstructor(Short, -function (v) { - v == null && (v = 0); - if (typeof v != "number") - v = Integer.parseIntRadix(v, 10); - v = v.shortValue(); - this.valueOf = function () {return v;}; -}); - - -Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768; -Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767; -Short.TYPE = Short.prototype.TYPE = Short; - -Clazz_defineMethod(Short, "parseShortRadix", -function (s, radix) { -return Integer.parseIntRadix(s, radix).shortValue(); -}, "String, Number"); -Short.parseShortRadix = Short.prototype.parseShortRadix; - -Clazz_defineMethod(Short, "parseShort", -function (s) { -return Short.parseShortRadix (s, 10); -}, "String"); - -Short.parseShort = Short.prototype.parseShort; - -/* -Clazz_defineMethod(Short, "$valueOf", -function (s) { -return new Short(Short.parseShort (s, 10)); -}, "String"); - */ - -Clazz_overrideMethod(Short, "$valueOf", -function (s) { -return new Short(s); -}); - -/* -Clazz_defineMethod(Short, "$valueOf", -function (s, r) { -return new Short(Short.parseShort (s, r)); -}, "String, Number"); - */ - -Short.$valueOf = Short.prototype.$valueOf; -Clazz_overrideMethod(Short, "equals", -function (s) { -if(s == null || !Clazz_instanceOf(s, Short) ){ - return false; -} -return s.valueOf() == this.valueOf(); -}, "Object"); -Short.toHexString = Short.prototype.toHexString = function (i) { - return i.toString (16); -}; -Short.toOctalString = Short.prototype.toOctalString = function (i) { - return i.toString (8); -}; -Short.toBinaryString = Short.prototype.toBinaryString = function (i) { - return i.toString (2); -}; -Short.decode = Clazz_defineMethod(Short, "decode", -function(n){ - n = Integer.decodeRaw(n); - if (isNaN(n) || n < -32768|| n > 32767) - throw new NumberFormatException("Invalid Short"); - return new Short(n); -}, "~S"); - -java.lang.Byte=Byte=function(){ -Clazz_instantialize(this,arguments); -}; -Clazz_decorateAsType(Byte,"Byte",Number,Comparable,null,true); -Byte.prototype.valueOf=function(){return 0;}; -Byte.toString=Byte.prototype.toString=function(){ -if(arguments.length!=0){ -return""+arguments[0]; -}else if(this===Byte){ -return"class java.lang.Byte"; -} -return""+this.valueOf(); -}; -Clazz_makeConstructor(Byte, -function(v){ - if (typeof v != "number") - v = Integer.parseIntRadix(v, 10); - v = v.byteValue(); -this.valueOf=function(){ -return v; -}; -}); - -Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828; -Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128; -Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127; -Byte.SIZE=Byte.prototype.SIZE=8; -Byte.TYPE=Byte.prototype.TYPE=Byte; - -Clazz_defineMethod(Byte,"parseByteRadix", -function(s,radix){ - return Integer.parseIntRadix(s, radix).byteValue(); -},"String, Number"); -Byte.parseByteRadix=Byte.prototype.parseByteRadix; - -Clazz_defineMethod(Byte,"parseByte", -function(s){ -return Byte.parseByte(s,10); -},"String"); - -Byte.parseByte=Byte.prototype.parseByte; - -Clazz_overrideMethod(Byte, "$valueOf", -function (s) { -return new Byte(s); -}); - -Byte.$valueOf=Byte.prototype.$valueOf; -Clazz_overrideMethod(Byte,"equals", -function(s){ -if(s==null||!Clazz_instanceOf(s,Byte)){ -return false; -} -return s.valueOf()==this.valueOf(); -},"Object"); -Byte.toHexString=Byte.prototype.toHexString=function(i){ -return i.toString(16); -}; -Byte.toOctalString=Byte.prototype.toOctalString=function(i){ -return i.toString(8); -}; -Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){ -return i.toString(2); -}; -Byte.decode=Clazz_defineMethod(Byte,"decode", -function(n){ - n = Integer.decodeRaw(n); - if (isNaN(n) || n < -128|| n > 127) - throw new NumberFormatException("Invalid Byte"); -return new Byte(n); -},"~S"); - -Clazz._floatToString = function(f) { - var s = ""+f - if (s.indexOf(".") < 0 && s.indexOf("e") < 0) - s += ".0"; - return s; -} - -java.lang.Float=Float=function(){ -Clazz_instantialize(this,arguments); -}; -Clazz_decorateAsType(Float,"Float",Number,Comparable,null,true); -Float.prototype.valueOf=function(){return 0;}; -Float.toString=Float.prototype.toString=function(){ -if(arguments.length!=0){ -return Clazz._floatToString(arguments[0]); -}else if(this===Float){ -return"class java.lang.Float"; -} -return Clazz._floatToString(this.valueOf()); -}; - -Clazz_overrideConstructor(Float, function(v){ - v == null && (v = 0); - if (typeof v != "number") - v = Number(v); - this.valueOf=function(){return v;} -}); - -Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028; -Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38; -Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45; -Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; -Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; -Float.NaN=Number.NaN; -Float.TYPE=Float.prototype.TYPE=Float; - -Clazz_defineMethod(Float,"parseFloat", -function(s){ -if(s==null){ -throw new NumberFormatException("null"); -} -if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here -var floatVal=Number(s); -if(isNaN(floatVal)){ -throw new NumberFormatException("Not a Number : "+s); -} -return floatVal; -},"String"); -Float.parseFloat=Float.prototype.parseFloat; - -Clazz_overrideMethod(Float,"$valueOf", -function(s){ -return new Float(s); -}); - -Float.$valueOf=Float.prototype.$valueOf; - -Clazz_defineMethod(Float,"isNaN", -function(num){ -return isNaN(num); -},"Number"); -Float.isNaN=Float.prototype.isNaN; -Clazz_defineMethod(Float,"isInfinite", -function(num){ -return!isFinite(num); -},"Number"); -Float.isInfinite=Float.prototype.isInfinite; - -Clazz_overrideMethod(Float,"equals", -function(s){ -if(s==null||!Clazz_instanceOf(s,Float)){ -return false; -} -return s.valueOf()==this.valueOf(); -},"Object"); - -java.lang.Double=Double=function(){ -Clazz_instantialize(this,arguments); -}; -Clazz_decorateAsType(Double,"Double",Number,Comparable,null,true); -Double.prototype.valueOf=function(){return 0;}; -Double.toString=Double.prototype.toString=function(){ -if(arguments.length!=0){ -return Clazz._floatToString(arguments[0]); -}else if(this===Double){ -return"class java.lang.Double"; -} -return Clazz._floatToString(this.valueOf()); -}; - -Clazz_overrideConstructor(Double, function(v){ - v == null && (v = 0); - if (typeof v != "number") - v = Double.parseDouble(v); - this.valueOf=function(){return v;}; -}); // BH - -Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468; -Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324; -Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308; -Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; -Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; -Double.NaN=Number.NaN; -Double.TYPE=Double.prototype.TYPE=Double; - -Clazz_defineMethod(Double,"isNaN", -function(num){ -return isNaN(num); -},"Number"); -Double.isNaN=Double.prototype.isNaN; -Clazz_defineMethod(Double,"isInfinite", -function(num){ -return!isFinite(num); -},"Number"); -Double.isInfinite=Double.prototype.isInfinite; - -Clazz_defineMethod(Double,"parseDouble", -function(s){ -if(s==null){ -throw new NumberFormatException("null"); -} -if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here -var doubleVal=Number(s); -if(isNaN(doubleVal)){ -throw new NumberFormatException("Not a Number : "+s); -} -return doubleVal; -},"String"); -Double.parseDouble=Double.prototype.parseDouble; - -/* -Clazz_defineMethod(Double,"$valueOf", -function(s){ -return new Double(this.parseDouble(s)); -},"String"); -*/ - -Clazz_defineMethod(Double,"$valueOf", -function(v){ -return new Double(v); -},"Number"); - -Double.$valueOf=Double.prototype.$valueOf; - -Clazz_overrideMethod(Double,"equals", -function(s){ -if(s==null||!Clazz_instanceOf(s,Double)){ -return false; -} -return s.valueOf()==this.valueOf(); -},"Object"); - - -//java.lang.B00lean = Boolean; ?? BH why this? -Boolean = java.lang.Boolean = Boolean || function () {Clazz_instantialize (this, arguments);}; -if (Clazz._supportsNativeObject) { - for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) { - var p = Clazz._extendedObjectMethods[i]; - Boolean.prototype[p] = Clazz._O.prototype[p]; - } -} -Boolean.__CLASS_NAME__="Boolean"; -Clazz_implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]); -Boolean.equals=Clazz._innerFunctions.equals; -Boolean.getName=Clazz._innerFunctions.getName; -Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530; - -//Clazz_makeConstructor(Boolean, -//function(value){ -//this.valueOf=function(){ -//return value; -//}; -//},"~B"); - -Clazz_overrideConstructor(Boolean, -function(s){ - var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false); - this.valueOf=function(){return b;}; -},"~O"); - -Boolean.parseBoolean=Clazz_defineMethod(Boolean,"parseBoolean", -function(s){ -return Boolean.toBoolean(s); -},"~S"); -Clazz_defineMethod(Boolean,"booleanValue", -function(){ -return this.valueOf(); -}); -Boolean.$valueOf=Clazz_overrideMethod(Boolean,"$valueOf", -function(b){ -return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE); -}); - -/* -Boolean.toString=Clazz_defineMethod(Boolean,"toString", -function(b){ -return b?"true":"false"; -},"~B"); -*/ - -Clazz_overrideMethod(Boolean,"toString", -function(){ -return this.valueOf()?"true":"false"; -}); -Clazz_overrideMethod(Boolean,"hashCode", -function(){ -return this.valueOf()?1231:1237; -}); -Clazz_overrideMethod(Boolean,"equals", -function(obj){ -if(Clazz_instanceOf(obj,Boolean)){ -return this.booleanValue()==obj.booleanValue(); -}return false; -},"~O"); -Boolean.getBoolean=Clazz_defineMethod(Boolean,"getBoolean", -function(name){ -var result=false; -try{ -result=Boolean.toBoolean(System.getProperty(name)); -}catch(e){ -if(Clazz_instanceOf(e,IllegalArgumentException)){ -}else if(Clazz_instanceOf(e,NullPointerException)){ -}else{ -throw e; -} -} -return result; -},"~S"); -Clazz_overrideMethod(Boolean,"compareTo", -function(b){ -return(b.value==this.value?0:(this.value?1:-1)); -},"Boolean"); -Boolean.toBoolean=Clazz_defineMethod(Boolean,"toBoolean", -($fz=function(name){ -return((name!=null)&&name.equalsIgnoreCase("true")); -},$fz.isPrivate=true,$fz),"~S"); -Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true); -Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false); -Boolean.TYPE=Boolean.prototype.TYPE=Boolean; - - -Clazz._Encoding=new Object(); - -(function(Encoding) { - -Encoding.UTF8="utf-8"; -Encoding.UTF16="utf-16"; -Encoding.ASCII="ascii"; - - -Encoding.guessEncoding=function(str){ -if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){ -return Encoding.UTF8; -}else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){ -return Encoding.UTF16; -}else{ -return Encoding.ASCII; -} -}; - -Encoding.readUTF8=function(str){ -var encoding=this.guessEncoding(str); -var startIdx=0; -if(encoding==Encoding.UTF8){ -startIdx=3; -}else if(encoding==Encoding.UTF16){ -startIdx=2; -} -var arrs=new Array(); -for(var i=startIdx;i0xc0&&charCode<0xe0){ -var c1=charCode&0x1f; -i++; -var c2=str.charCodeAt(i)&0x3f; -var c=(c1<<6)+c2; -arrs[arrs.length]=String.fromCharCode(c); -}else if(charCode>=0xe0){ -var c1=charCode&0x0f; -i++; -var c2=str.charCodeAt(i)&0x3f; -i++; -var c3=str.charCodeAt(i)&0x3f; -var c=(c1<<12)+(c2<<6)+c3; -arrs[arrs.length]=String.fromCharCode(c); -} -} -return arrs.join(''); -}; - -Encoding.convert2UTF8=function(str){ -var encoding=this.guessEncoding(str); -var startIdx=0; -if(encoding==Encoding.UTF8){ -return str; -}else if(encoding==Encoding.UTF16){ -startIdx=2; -} - -var offset=0; -var arrs=new Array(offset+str.length-startIdx); - -for(var i=startIdx;i>6); -var c2=0x80+(charCode&0x003f); -arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2); -}else{ -var c1=0xe0+((charCode&0xf000)>>12); -var c2=0x80+((charCode&0x0fc0)>>6); -var c3=0x80+(charCode&0x003f); -arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3); -} -} -return arrs.join(''); -}; -Encoding.base64Chars=new Array( -'A','B','C','D','E','F','G','H', -'I','J','K','L','M','N','O','P', -'Q','R','S','T','U','V','W','X', -'Y','Z','a','b','c','d','e','f', -'g','h','i','j','k','l','m','n', -'o','p','q','r','s','t','u','v', -'w','x','y','z','0','1','2','3', -'4','5','6','7','8','9','+','/' -); -Encoding.encodeBase64=function(str){ -if(str==null||str.length==0)return str; -var b64=Encoding.base64Chars; -var length=str.length; -var index=0; -var buf=[]; -var c0,c1,c2; -while(index>2]; -if(index>4)]; -if(index>6)]; -buf[buf.length]=b64[c2&0x3F]; -}else{ -buf[buf.length]=b64[((c1<<2)&0x3c)]; -buf[buf.length]='='; -} -}else{ -buf[buf.length]=b64[(c0<<4)&0x30]; -buf[buf.length]='='; -buf[buf.length]='='; -} -} -return buf.join(''); -}; -Encoding.decodeBase64=function(str){ -if(str==null||str.length==0)return str; -var b64=Encoding.base64Chars; -var xb64=Encoding.xBase64Chars; -if(Encoding.xBase64Chars==null){ -xb64=new Object(); -for(var i=0;i>4); -if(c2!=null){ -buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2); -if(c3!=null){ -buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3); -} -} -} -return buf.join(''); -}; - -if(String.prototype.$replace==null){ -java.lang.String=String; -if(Clazz._supportsNativeObject){ -for(var i=0;i= 0) c1 = "\\" + c1; - } else { - c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;}); - } - return this.replace(new RegExp(c1,"gm"),c2); -}; -sp.$generateExpFunction=function(str){ -var arr=[]; -var orders=[]; -var idx=0; -arr[0]=""; -var i=0; -for(;ithis.length-len)|| -(ooffset>other.length-len)){ -return false; -} -var s1=this.substring(toffset,toffset+len); -var s2=other.substring(ooffset,ooffset+len); -if(ignoreCase){ -s1=s1.toLowerCase(); -s2=s2.toLowerCase(); -} -return s1==s2; -}; - - - -sp.$plit=function(regex,limit){ -if (!limit && regex == " ") - return this.split(regex); - -if(limit!=null&&limit>0){ -if(limit==1){ -return this; -} -var regExp=new RegExp("("+regex+")","gm"); -var count=1; -var s=this.replace(regExp,function($0,$1){ -count++; -if(count==limit){ -return"@@_@@"; -}else if(count>limit){ -return $0; -}else{ -return $0; -} -}); -regExp=new RegExp(regex,"gm"); -var arr=this.split(regExp); -if(arr.length>limit){ -arr[limit-1]=s.substring(s.indexOf("@@_@@")+5); -arr.length=limit; -} -return arr; -}else{ -var regExp=new RegExp(regex,"gm"); -return this.split(regExp); -} -}; -/* -sp.trim=function(){ -var len=this.length; -var st=0; - -while((st0)||(lens.length-pc)){ -return false; -} -while(--pc>=0){ -if(s.charAt(to++)!=prefix.charAt(po++)){ -return false; -} -} -return true; -}; - -sp.startsWith=function(prefix){ -if(arguments.length==1){ -return sn(this,arguments[0],0); -}else if(arguments.length==2){ -return sn(this,arguments[0],arguments[1]); -}else{ -return false; -} -}; - -sp.endsWith=function(suffix){ -return sn(this, suffix,this.length-suffix.length); -}; - -} - -sp.equals=function(anObject){ -return this.valueOf()==anObject; -}; - -sp.equalsIgnoreCase=function(anotherString){ -return(anotherString==null)?false:(this==anotherString -||this.toLowerCase()==anotherString.toLowerCase()); -}; - - -sp.hash=0; - -sp.hashCode=function(){ -var h=this.hash; -if(h==0){ -var off=0; -var len=this.length; -for(var i=0;i255){ -arrs[ii]=0x1a; -arrs[ii+1]=c&0xff; -arrs[ii+2]=(c&0xff00)>>8; -ii+=2; -}else{ -arrs[ii]=c; -} -ii++; -} -return arrs; -}; - -/* -sp.compareTo=function(anotherString){ -if(anotherString==null){ -throw new java.lang.NullPointerException(); -} -var len1=this.length; -var len2=anotherString.length; -var n=Math.min(len1,len2); -var k=0; -while(k= 0} // bh added -sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added - - - -sp.toCharArray=function(){ -var result=new Array(this.length); -for(var i=0;is2){ -return 1; -}else{ -return-1; -} -} -}; - -sp.contentEquals=function(sb){ -if(this.length!=sb.length()){ -return false; -} -var v=sb.getValue(); -var i=0; -var j=0; -var n=this.length; -while(n--!=0){ -if(this.charCodeAt(i++)!=v[j++]){ -return false; -} -} -return true; -}; - -sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){ -if(srcBegin<0){ -throw new StringIndexOutOfBoundsException(srcBegin); -} -if(srcEnd>this.length){ -throw new StringIndexOutOfBoundsException(srcEnd); -} -if(srcBegin>srcEnd){ -throw new StringIndexOutOfBoundsException(srcEnd-srcBegin); -} -if(dst==null){ -throw new NullPointerException(); -} -for(var i=0;i=sourceCount){ -return(targetCount==0?sourceCount:-1); -} -if(fromIndex<0){ -fromIndex=0; -} -if(targetCount==0){ -return fromIndex; -} - -var first=target[targetOffset]; -var i=sourceOffset+fromIndex; -var max=sourceOffset+(sourceCount-targetCount); - -startSearchForFirstChar: -while(true){ - -while(i<=max&&source[i]!=first){ -i++; -} -if(i>max){ -return-1; -} - - -var j=i+1; -var end=j+targetCount-1; -var k=targetOffset+1; -while(j0&&typeof x[0]=="number"){ -var arr=new Array(x.length); -for(var i=0;ibytes.length){ -throw new IndexOutOfBoundsException(); -} -if(length>0){ -var isChar=(bytes[offset].length!=null); -if(isChar){ -for(var i=0;i0;){ -value[i]=String.fromCharCode(bytes[i+offset]&0xff); -} -}else{ -hibyte<<=8; -for(var i=count;i-->0;){ -value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); -} -} -return value.join(''); -} -}else{ -var s=""; -for(var i=0;ibytes.length){ - throw new IndexOutOfBoundsException(); - } - if(length>0){ - var isChar=(bytes[offset].length!=null); - if(isChar){ - for(var i=0;i0;){ - value[i]=String.fromCharCode(bytes[i+offset]&0xff); - } - }else{ - hibyte<<=8; - for(var i=count;i-->0;){ - value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); - } - } - return value.join(''); -default: - var s=""; - for(var i=0;i= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680 - || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000)); -},"~N"); -c$.isLetter=Clazz_defineMethod(c$,"isLetter", -function(c){ -c = c.charCodeAt(0); -return (65 <= c && c <= 90 || 97 <= c && c <= 122); -},"~N"); -c$.isLetterOrDigit=Clazz_defineMethod(c$,"isLetterOrDigit", -function(c){ -c = c.charCodeAt(0); -return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); -},"~N"); -c$.isSpaceChar=Clazz_defineMethod(c$,"isSpaceChar", -function(c){ - var i = c.charCodeAt(0); -if(i==0x20||i==0xa0||i==0x1680)return true; -if(i<0x2000)return false; -return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000; -},"~N"); -c$.digit=Clazz_defineMethod(c$,"digit", -function(c,radix){ -var i = c.charCodeAt(0); -if(radix >= 2 && radix <= 36){ - if(i < 128){ - var result = -1; - if(48 <= i && i <= 57){ - result = i - 48; - }else if(97 <= i && i <= 122){ - result = i - 87; - }else if(65 <= i && i <= 90){ - result=i-(55); - } - return (result < radix ? result : -1); - } -} -return -1; -},"~N,~N"); -Clazz_overrideMethod(c$,"toString", -function(){ -var buf=[this.value]; -return String.valueOf(buf); -}); -c$.toString=Clazz_overrideMethod(c$,"toString", -function(c){ -{ -if(this===Character){ -return"class java.lang.Character"; -} -}return String.valueOf(c); -},"~N"); -Clazz_defineStatics(c$, -"MIN_VALUE",'\u0000', -"MAX_VALUE",'\uffff', -"MIN_RADIX",2, -"MAX_RADIX",36, -"TYPE",null); - -java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character; - - - -Clazz._ArrayWrapper = function(a, type) { - return { - a: a, - __CLASS_NAME__:"Array", - superClazz: Array, - getComponentType: function() {return type}, - instanceOf: function(o) { return Clazz_instanceOf(type, o) }, - getName: function() { return this.__CLASS_NAME__ } - }; -} -c$=Clazz_declareType(java.lang.reflect,"Array"); -c$.newInstance=Clazz_defineMethod(c$,"newInstance", -function(componentType,size){ -var a = Clazz_newArray(size); - a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);}; -return a; -},"Class,~N"); - -javautil.Date=Date; -Date.TYPE="javautil.Date"; -Date.__CLASS_NAME__="Date"; -Clazz_implementOf(Date,[java.io.Serializable,java.lang.Comparable]); - -Clazz_defineMethod(javautil.Date,"clone", -function(){ -return new Date(this.getTime()); -}); - -Clazz_defineMethod(javautil.Date,"before", -function(when){ -return this.getTime()when.getTime(); -},"javautil.Date"); -Clazz_defineMethod(javautil.Date,"equals", -function(obj){ -return Clazz_instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime(); -},"Object"); -Clazz_defineMethod(javautil.Date,"compareTo", -function(anotherDate){ -var thisTime=this.getTime(); -var anotherTime=anotherDate.getTime(); -return(thisTime>32)); -}); - -c$=Clazz_decorateAsClass(function(){ -this.source=null; -Clazz_instantialize(this,arguments); -},javautil,"EventObject",null,java.io.Serializable); -Clazz_makeConstructor(c$, -function(source){ -if(source!=null)this.source=source; -else throw new IllegalArgumentException(); -},"~O"); -Clazz_defineMethod(c$,"getSource", -function(){ -return this.source; -}); -Clazz_overrideMethod(c$,"toString", -function(){ -return this.getClass().getName()+"[source="+String.valueOf(this.source)+']'; -}); -Clazz_declareInterface(javautil,"EventListener"); - -c$=Clazz_decorateAsClass(function(){ -this.listener=null; -Clazz_instantialize(this,arguments); -},javautil,"EventListenerProxy",null,javautil.EventListener); -Clazz_makeConstructor(c$, -function(listener){ -this.listener=listener; -},"javautil.EventListener"); -Clazz_defineMethod(c$,"getListener", -function(){ -return this.listener; -}); -Clazz_declareInterface(javautil,"Iterator"); - -Clazz_declareInterface(javautil,"ListIterator",javautil.Iterator); -Clazz_declareInterface(javautil,"Enumeration"); -Clazz_declareInterface(javautil,"Collection",Iterable); - -Clazz_declareInterface(javautil,"Set",javautil.Collection); -Clazz_declareInterface(javautil,"Map"); -Clazz_declareInterface(javautil.Map,"Entry"); - -Clazz_declareInterface(javautil,"List",javautil.Collection); - -Clazz_declareInterface(javautil,"Queue",javautil.Collection); -Clazz_declareInterface(javautil,"RandomAccess"); -c$=Clazz_decorateAsClass(function(){ -this.detailMessage=null; -this.cause=null; -this.stackTrace=null; -Clazz_instantialize(this,arguments); -},java.lang,"Throwable",null,java.io.Serializable); -Clazz_prepareFields(c$,function(){ -this.cause=this; -//alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller) -}); -Clazz_makeConstructor(c$, -function(){ -this.fillInStackTrace(); -}); -Clazz_makeConstructor(c$, -function(message){ -this.fillInStackTrace(); -this.detailMessage=message; -},"~S"); -Clazz_makeConstructor(c$, -function(message,cause){ -this.fillInStackTrace(); -this.detailMessage=message; -this.cause=cause; -},"~S,Throwable"); -Clazz_makeConstructor(c$, -function(cause){ -this.fillInStackTrace(); -this.detailMessage=(cause==null?null:cause.toString()); -this.cause=cause; -},"Throwable"); -Clazz_defineMethod(c$,"getMessage", -function(){ -return (this.message || this.detailMessage || this.toString()); -}); -Clazz_defineMethod(c$,"getLocalizedMessage", -function(){ -return this.getMessage(); -}); -Clazz_defineMethod(c$,"getCause", -function(){ -return(this.cause===this?null:this.cause); -}); -Clazz_defineMethod(c$,"initCause", -function(cause){ -if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause"); -if(cause===this)throw new IllegalArgumentException("Self-causation not permitted"); -this.cause=cause; -return this; -},"Throwable"); -Clazz_overrideMethod(c$,"toString", -function(){ -var s=this.getClass().getName(); -var message=this.message || this.detailMessage; -return(message ? s+": "+message : s); -}); -Clazz_defineMethod(c$,"printStackTrace", -function(){ -System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz_getStackTrace()); -}); - -Clazz_defineMethod(c$,"getStackTrace", -function(){ -var s = "" + this + "\n"; -for(var i=0;i-1||caller!=null){ -var clazzName=null; -var nativeClass=null; -if(!noLooping||caller==Clazz_tryToSearchAndExecute||caller==Clazz_superCall||caller==null){ -if(index<0){ -break; -} -noLooping=true; -superCaller=Clazz._callingStackTraces[index].caller; -nativeClass=Clazz._callingStackTraces[index].owner; -index--; -}else{ -superCaller=caller; -if(superCaller.claxxOwner!=null){ -nativeClass=superCaller.claxxOwner; -}else if(superCaller.exClazz!=null){ -nativeClass=superCaller.exClazz; -} -} -var st=new StackTraceElement( -((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)? -nativeClass.__CLASS_NAME__:"anonymous"), -((superCaller.exName==null)?"anonymous":superCaller.exName) -+" ("+Clazz_getParamsType(superCaller.arguments)+")", -null,-1); -st.nativeClazz=nativeClass; -this.stackTrace[this.stackTrace.length]=st; -for(var i=0;i":this.declaringClass; -}); -Clazz_defineMethod(c$,"getFileName", -function(){ -return this.fileName; -}); -Clazz_defineMethod(c$,"getLineNumber", -function(){ -return this.lineNumber; -}); -Clazz_defineMethod(c$,"getMethodName", -function(){ -return(this.methodName==null)?"":this.methodName; -}); -Clazz_overrideMethod(c$,"hashCode", -function(){ -if(this.methodName==null){ -return 0; -}return this.methodName.hashCode()^this.declaringClass.hashCode(); -}); -Clazz_defineMethod(c$,"isNativeMethod", -function(){ -return this.lineNumber==-2; -}); -Clazz_overrideMethod(c$,"toString", -function(){ -var buf=new StringBuilder(80); -buf.append(this.getClassName()); -buf.append('.'); -buf.append(this.getMethodName()); -if(this.isNativeMethod()){ -buf.append("(Native Method)"); -}else{ -var fName=this.getFileName(); -if(fName==null){ -buf.append("(Unknown Source)"); -}else{ -var lineNum=this.getLineNumber(); -buf.append('('); -buf.append(fName); -if(lineNum>=0){ -buf.append(':'); -buf.append(lineNum); -}buf.append(')'); -}}return buf.toString(); -}); -TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz_getStackTrace())}); -c$=Clazz_declareType(java.lang,"Error",Throwable); - -c$=Clazz_declareType(java.lang,"LinkageError",Error); - -c$=Clazz_declareType(java.lang,"IncompatibleClassChangeError",LinkageError); - -c$=Clazz_declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError); - -c$=Clazz_declareType(java.lang,"AssertionError",Error); -Clazz_makeConstructor(c$, -function(detailMessage){ -Clazz_superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz_instanceOf(detailMessage,Throwable)?detailMessage:null)]); -},"~O"); -Clazz_makeConstructor(c$, -function(detailMessage){ -this.construct("" + detailMessage); -},"~B"); -Clazz_makeConstructor(c$, -function(detailMessage){ -this.construct("" + detailMessage); -},"~N"); - -c$=Clazz_declareType(java.lang,"ClassCircularityError",LinkageError); - -c$=Clazz_declareType(java.lang,"ClassFormatError",LinkageError); - -c$=Clazz_decorateAsClass(function(){ -this.exception=null; -Clazz_instantialize(this,arguments); -},java.lang,"ExceptionInInitializerError",LinkageError); -Clazz_makeConstructor(c$, -function(){ -Clazz_superConstructor(this,ExceptionInInitializerError); -this.initCause(null); -}); -Clazz_makeConstructor(c$, -function(detailMessage){ -Clazz_superConstructor(this,ExceptionInInitializerError,[detailMessage]); -this.initCause(null); -},"~S"); -Clazz_makeConstructor(c$, -function(exception){ -Clazz_superConstructor(this,ExceptionInInitializerError); -this.exception=exception; -this.initCause(exception); -},"Throwable"); -Clazz_defineMethod(c$,"getException", -function(){ -return this.exception; -}); -Clazz_overrideMethod(c$,"getCause", -function(){ -return this.exception; -}); - -c$=Clazz_declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError); - -c$=Clazz_declareType(java.lang,"InstantiationError",IncompatibleClassChangeError); - -c$=Clazz_declareType(java.lang,"VirtualMachineError",Error); - -c$=Clazz_declareType(java.lang,"InternalError",VirtualMachineError); - -c$=Clazz_declareType(java.lang,"NoClassDefFoundError",LinkageError); - -c$=Clazz_declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError); - -c$=Clazz_declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError); - -c$=Clazz_declareType(java.lang,"OutOfMemoryError",VirtualMachineError); - -c$=Clazz_declareType(java.lang,"StackOverflowError",VirtualMachineError); - -c$=Clazz_declareType(java.lang,"UnknownError",VirtualMachineError); - -c$=Clazz_declareType(java.lang,"UnsatisfiedLinkError",LinkageError); - -c$=Clazz_declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError); - -c$=Clazz_declareType(java.lang,"VerifyError",LinkageError); - -c$=Clazz_declareType(java.lang,"ThreadDeath",Error); -Clazz_makeConstructor(c$, -function(){ -Clazz_superConstructor(this,ThreadDeath,[]); -}); - -c$=Clazz_declareType(java.lang,"Exception",Throwable); - -c$=Clazz_declareType(java.lang,"RuntimeException",Exception); - -c$=Clazz_declareType(java.lang,"ArithmeticException",RuntimeException); - -c$=Clazz_declareType(java.lang,"IndexOutOfBoundsException",RuntimeException); - -c$=Clazz_declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException); -Clazz_makeConstructor(c$, -function(index){ -Clazz_superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]); -},"~N"); - -c$=Clazz_declareType(java.lang,"ArrayStoreException",RuntimeException); - -c$=Clazz_declareType(java.lang,"ClassCastException",RuntimeException); - -c$=Clazz_decorateAsClass(function(){ -this.ex=null; -Clazz_instantialize(this,arguments); -},java.lang,"ClassNotFoundException",Exception); -Clazz_makeConstructor(c$, -function(){ -Clazz_superConstructor(this,ClassNotFoundException,[Clazz_castNullAs("Throwable")]); -}); -Clazz_makeConstructor(c$, -function(detailMessage){ -Clazz_superConstructor(this,ClassNotFoundException,[detailMessage,null]); -},"~S"); -Clazz_makeConstructor(c$, -function(detailMessage,exception){ -Clazz_superConstructor(this,ClassNotFoundException,[detailMessage]); -this.ex=exception; -},"~S,Throwable"); -Clazz_defineMethod(c$,"getException", -function(){ -return this.ex; -}); -Clazz_overrideMethod(c$,"getCause", -function(){ -return this.ex; -}); - -c$=Clazz_declareType(java.lang,"CloneNotSupportedException",Exception); - -c$=Clazz_declareType(java.lang,"IllegalAccessException",Exception); - -c$=Clazz_declareType(java.lang,"IllegalArgumentException",RuntimeException); -Clazz_makeConstructor(c$, -function(cause){ -Clazz_superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]); -},"Throwable"); - -c$=Clazz_declareType(java.lang,"IllegalMonitorStateException",RuntimeException); - -c$=Clazz_declareType(java.lang,"IllegalStateException",RuntimeException); -Clazz_makeConstructor(c$, -function(cause){ -Clazz_superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]); -},"Throwable"); - -c$=Clazz_declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException); - -c$=Clazz_declareType(java.lang,"InstantiationException",Exception); - -c$=Clazz_declareType(java.lang,"InterruptedException",Exception); - -c$=Clazz_declareType(java.lang,"NegativeArraySizeException",RuntimeException); - -c$=Clazz_declareType(java.lang,"NoSuchFieldException",Exception); - -c$=Clazz_declareType(java.lang,"NoSuchMethodException",Exception); - -c$=Clazz_declareType(java.lang,"NullPointerException",RuntimeException); - -c$=Clazz_declareType(java.lang,"NumberFormatException",IllegalArgumentException); - -c$=Clazz_declareType(java.lang,"SecurityException",RuntimeException); -Clazz_makeConstructor(c$, -function(cause){ -Clazz_superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]); -},"Throwable"); - -c$=Clazz_declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException); -Clazz_makeConstructor(c$, -function(index){ -Clazz_superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]); -},"~N"); - -c$=Clazz_declareType(java.lang,"UnsupportedOperationException",RuntimeException); -Clazz_makeConstructor(c$, -function(){ -Clazz_superConstructor(this,UnsupportedOperationException,[]); -}); -Clazz_makeConstructor(c$, -function(cause){ -Clazz_superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]); -},"Throwable"); - -c$=Clazz_decorateAsClass(function(){ -this.target=null; -Clazz_instantialize(this,arguments); -},java.lang.reflect,"InvocationTargetException",Exception); -Clazz_makeConstructor(c$, -function(){ -Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz_castNullAs("Throwable")]); -}); -Clazz_makeConstructor(c$, -function(exception){ -Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]); -this.target=exception; -},"Throwable"); -Clazz_makeConstructor(c$, -function(exception,detailMessage){ -Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]); -this.target=exception; -},"Throwable,~S"); -Clazz_defineMethod(c$,"getTargetException", -function(){ -return this.target; -}); -Clazz_overrideMethod(c$,"getCause", -function(){ -return this.target; -}); - -c$=Clazz_decorateAsClass(function(){ -this.undeclaredThrowable=null; -Clazz_instantialize(this,arguments); -},java.lang.reflect,"UndeclaredThrowableException",RuntimeException); -Clazz_makeConstructor(c$, -function(exception){ -Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException); -this.undeclaredThrowable=exception; -this.initCause(exception); -},"Throwable"); -Clazz_makeConstructor(c$, -function(exception,detailMessage){ -Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]); -this.undeclaredThrowable=exception; -this.initCause(exception); -},"Throwable,~S"); -Clazz_defineMethod(c$,"getUndeclaredThrowable", -function(){ -return this.undeclaredThrowable; -}); -Clazz_overrideMethod(c$,"getCause", -function(){ -return this.undeclaredThrowable; -}); - -c$=Clazz_declareType(java.io,"IOException",Exception); - - -c$=Clazz_declareType(java.io,"CharConversionException",java.io.IOException); - -c$=Clazz_declareType(java.io,"EOFException",java.io.IOException); - -c$=Clazz_declareType(java.io,"FileNotFoundException",java.io.IOException); - -c$=Clazz_decorateAsClass(function(){ -this.bytesTransferred=0; -Clazz_instantialize(this,arguments); -},java.io,"InterruptedIOException",java.io.IOException); - -c$=Clazz_declareType(java.io,"ObjectStreamException",java.io.IOException); - -c$=Clazz_decorateAsClass(function(){ -this.classname=null; -Clazz_instantialize(this,arguments); -},java.io,"InvalidClassException",java.io.ObjectStreamException); -Clazz_makeConstructor(c$, -function(className,detailMessage){ -Clazz_superConstructor(this,java.io.InvalidClassException,[detailMessage]); -this.classname=className; -},"~S,~S"); -Clazz_defineMethod(c$,"getMessage", -function(){ -var msg=Clazz_superCall(this,java.io.InvalidClassException,"getMessage",[]); -if(this.classname!=null){ -msg=this.classname+';' + ' '+msg; -}return msg; -}); - -c$=Clazz_declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException); - -c$=Clazz_declareType(java.io,"NotActiveException",java.io.ObjectStreamException); - -c$=Clazz_declareType(java.io,"NotSerializableException",java.io.ObjectStreamException); - -c$=Clazz_decorateAsClass(function(){ -this.eof=false; -this.length=0; -Clazz_instantialize(this,arguments); -},java.io,"OptionalDataException",java.io.ObjectStreamException); - -c$=Clazz_declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException); - -c$=Clazz_declareType(java.io,"SyncFailedException",java.io.IOException); - -c$=Clazz_declareType(java.io,"UnsupportedEncodingException",java.io.IOException); - -c$=Clazz_declareType(java.io,"UTFDataFormatException",java.io.IOException); - -c$=Clazz_decorateAsClass(function(){ -this.detail=null; -Clazz_instantialize(this,arguments); -},java.io,"WriteAbortedException",java.io.ObjectStreamException); -Clazz_makeConstructor(c$, -function(detailMessage,rootCause){ -Clazz_superConstructor(this,java.io.WriteAbortedException,[detailMessage]); -this.detail=rootCause; -this.initCause(rootCause); -},"~S,Exception"); -Clazz_defineMethod(c$,"getMessage", -function(){ -var msg=Clazz_superCall(this,java.io.WriteAbortedException,"getMessage",[]); -return (this.detail ? msg + "; "+this.detail.toString() : msg); -}); -Clazz_overrideMethod(c$,"getCause", -function(){ -return this.detail; -}); - -c$=Clazz_declareType(javautil,"ConcurrentModificationException",RuntimeException); -Clazz_makeConstructor(c$, -function(){ -Clazz_superConstructor(this,javautil.ConcurrentModificationException,[]); -}); - -c$=Clazz_declareType(javautil,"EmptyStackException",RuntimeException); - -c$=Clazz_decorateAsClass(function(){ -this.className=null; -this.key=null; -Clazz_instantialize(this,arguments); -},javautil,"MissingResourceException",RuntimeException); -Clazz_makeConstructor(c$, -function(detailMessage,className,resourceName){ -Clazz_superConstructor(this,javautil.MissingResourceException,[detailMessage]); -this.className=className; -this.key=resourceName; -},"~S,~S,~S"); -Clazz_defineMethod(c$,"getClassName", -function(){ -return this.className; -}); -Clazz_defineMethod(c$,"getKey", -function(){ -return this.key; -}); - -c$=Clazz_declareType(javautil,"NoSuchElementException",RuntimeException); - -c$=Clazz_declareType(javautil,"TooManyListenersException",Exception); - -c$=Clazz_declareType(java.lang,"Void"); -Clazz_defineStatics(c$, -"TYPE",null); -{ -java.lang.Void.TYPE=java.lang.Void; -}Clazz_declareInterface(java.lang.reflect,"GenericDeclaration"); -Clazz_declareInterface(java.lang.reflect,"AnnotatedElement"); - -c$=Clazz_declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement); -Clazz_makeConstructor(c$, -function(){ -}); -Clazz_defineMethod(c$,"isAccessible", -function(){ -return false; -}); -c$.setAccessible=Clazz_defineMethod(c$,"setAccessible", -function(objects,flag){ -return; -},"~A,~B"); -Clazz_defineMethod(c$,"setAccessible", -function(flag){ -return; -},"~B"); -Clazz_overrideMethod(c$,"isAnnotationPresent", -function(annotationType){ -return false; -},"Class"); -Clazz_overrideMethod(c$,"getDeclaredAnnotations", -function(){ -return new Array(0); -}); -Clazz_overrideMethod(c$,"getAnnotations", -function(){ -return new Array(0); -}); -Clazz_overrideMethod(c$,"getAnnotation", -function(annotationType){ -return null; -},"Class"); -c$.marshallArguments=Clazz_defineMethod(c$,"marshallArguments", -function(parameterTypes,args){ -return null; -},"~A,~A"); -Clazz_defineMethod(c$,"invokeV", -function(receiver,args){ -return; -},"~O,~A"); -Clazz_defineMethod(c$,"invokeL", -function(receiver,args){ -return null; -},"~O,~A"); -Clazz_defineMethod(c$,"invokeI", -function(receiver,args){ -return 0; -},"~O,~A"); -Clazz_defineMethod(c$,"invokeJ", -function(receiver,args){ -return 0; -},"~O,~A"); -Clazz_defineMethod(c$,"invokeF", -function(receiver,args){ -return 0.0; -},"~O,~A"); -Clazz_defineMethod(c$,"invokeD", -function(receiver,args){ -return 0.0; -},"~O,~A"); -c$.emptyArgs=c$.prototype.emptyArgs=new Array(0); -Clazz_declareInterface(java.lang.reflect,"InvocationHandler"); -c$=Clazz_declareInterface(java.lang.reflect,"Member"); -Clazz_defineStatics(c$, -"PUBLIC",0, -"DECLARED",1); - -c$=Clazz_declareType(java.lang.reflect,"Modifier"); -Clazz_makeConstructor(c$, -function(){ -}); -c$.isAbstract=Clazz_defineMethod(c$,"isAbstract", -function(modifiers){ -return((modifiers&1024)!=0); -},"~N"); -c$.isFinal=Clazz_defineMethod(c$,"isFinal", -function(modifiers){ -return((modifiers&16)!=0); -},"~N"); -c$.isInterface=Clazz_defineMethod(c$,"isInterface", -function(modifiers){ -return((modifiers&512)!=0); -},"~N"); -c$.isNative=Clazz_defineMethod(c$,"isNative", -function(modifiers){ -return((modifiers&256)!=0); -},"~N"); -c$.isPrivate=Clazz_defineMethod(c$,"isPrivate", -function(modifiers){ -return((modifiers&2)!=0); -},"~N"); -c$.isProtected=Clazz_defineMethod(c$,"isProtected", -function(modifiers){ -return((modifiers&4)!=0); -},"~N"); -c$.isPublic=Clazz_defineMethod(c$,"isPublic", -function(modifiers){ -return((modifiers&1)!=0); -},"~N"); -c$.isStatic=Clazz_defineMethod(c$,"isStatic", -function(modifiers){ -return((modifiers&8)!=0); -},"~N"); -c$.isStrict=Clazz_defineMethod(c$,"isStrict", -function(modifiers){ -return((modifiers&2048)!=0); -},"~N"); -c$.isSynchronized=Clazz_defineMethod(c$,"isSynchronized", -function(modifiers){ -return((modifiers&32)!=0); -},"~N"); -c$.isTransient=Clazz_defineMethod(c$,"isTransient", -function(modifiers){ -return((modifiers&128)!=0); -},"~N"); -c$.isVolatile=Clazz_defineMethod(c$,"isVolatile", -function(modifiers){ -return((modifiers&64)!=0); -},"~N"); -c$.toString=Clazz_defineMethod(c$,"toString", -function(modifiers){ -var sb=new Array(0); -if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public"; -if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected"; -if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private"; -if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract"; -if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static"; -if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final"; -if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient"; -if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile"; -if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized"; -if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native"; -if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp"; -if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface"; -if(sb.length>0){ -return sb.join(" "); -}return""; -},"~N"); -Clazz_defineStatics(c$, -"PUBLIC",0x1, -"PRIVATE",0x2, -"PROTECTED",0x4, -"STATIC",0x8, -"FINAL",0x10, -"SYNCHRONIZED",0x20, -"VOLATILE",0x40, -"TRANSIENT",0x80, -"NATIVE",0x100, -"INTERFACE",0x200, -"ABSTRACT",0x400, -"STRICT",0x800, -"BRIDGE",0x40, -"VARARGS",0x80, -"SYNTHETIC",0x1000, -"ANNOTATION",0x2000, -"ENUM",0x4000); - -c$=Clazz_decorateAsClass(function(){ -this.clazz=null; -this.parameterTypes=null; -this.exceptionTypes=null; -this.modifiers=0; -Clazz_instantialize(this,arguments); -},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]); -Clazz_makeConstructor(c$, -function(declaringClass,parameterTypes,checkedExceptions,modifiers){ -Clazz_superConstructor(this,java.lang.reflect.Constructor,[]); -this.clazz=declaringClass; -this.parameterTypes=parameterTypes; -this.exceptionTypes=checkedExceptions; -this.modifiers=modifiers; -},"Class,~A,~A,~N"); -Clazz_overrideMethod(c$,"getTypeParameters", -function(){ -return null; -}); -Clazz_defineMethod(c$,"toGenericString", -function(){ -return null; -}); -Clazz_defineMethod(c$,"getGenericParameterTypes", -function(){ -return null; -}); -Clazz_defineMethod(c$,"getGenericExceptionTypes", -function(){ -return null; -}); -Clazz_defineMethod(c$,"getParameterAnnotations", -function(){ -return null; -}); -Clazz_defineMethod(c$,"isVarArgs", -function(){ -return false; -}); -Clazz_overrideMethod(c$,"isSynthetic", -function(){ -return false; -}); -Clazz_overrideMethod(c$,"equals", -function(object){ -if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Constructor)){ -var other=object; -if(this.getDeclaringClass()===other.getDeclaringClass()){ -var params1=this.parameterTypes; -var params2=other.parameterTypes; -if(params1.length==params2.length){ -for(var i=0;i 0.0) { -allzero = false; -} else if (d < 0.0) { -throw new IllegalArgumentException ("negative dash length"); -}} -if (allzero) { -throw new IllegalArgumentException ("dash lengths all zero"); -}}this.width = width; -this.cap = cap; -this.join = join; -this.miterlimit = miterlimit; -if (dash != null) { -this.dash = dash.clone (); -}this.dash_phase = dash_phase; -}, "~N,~N,~N,~N,~A,~N"); -Clazz_makeConstructor (c$, -function (width, cap, join, miterlimit) { -this.construct (width, cap, join, miterlimit, null, 0.0); -}, "~N,~N,~N,~N"); -Clazz_makeConstructor (c$, -function (width, cap, join) { -this.construct (width, cap, join, 10.0, null, 0.0); -}, "~N,~N,~N"); -Clazz_makeConstructor (c$, -function (width) { -this.construct (width, 2, 0, 10.0, null, 0.0); -}, "~N"); -Clazz_makeConstructor (c$, -function () { -this.construct (1.0, 2, 0, 10.0, null, 0.0); -}); -Clazz_overrideMethod (c$, "createStrokedShape", -function (s) { -return s; -}, "java.awt.Shape"); -Clazz_defineMethod (c$, "getLineWidth", -function () { -return this.width; -}); -Clazz_defineMethod (c$, "getEndCap", -function () { -return this.cap; -}); -Clazz_defineMethod (c$, "getLineJoin", -function () { -return this.join; -}); -Clazz_defineMethod (c$, "getMiterLimit", -function () { -return this.miterlimit; -}); -Clazz_defineMethod (c$, "getDashArray", -function () { -if (this.dash == null) { -return null; -}return this.dash.clone (); -}); -Clazz_defineMethod (c$, "getDashPhase", -function () { -return this.dash_phase; -}); -Clazz_overrideMethod (c$, "hashCode", -function () { -var hash = Float.floatToIntBits (this.width); -hash = hash * 31 + this.join; -hash = hash * 31 + this.cap; -hash = hash * 31 + Float.floatToIntBits (this.miterlimit); -if (this.dash != null) { -hash = hash * 31 + Float.floatToIntBits (this.dash_phase); -for (var i = 0; i < this.dash.length; i++) { -hash = hash * 31 + Float.floatToIntBits (this.dash[i]); -} -}return hash; -}); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (!(Clazz_instanceOf (obj, java.awt.BasicStroke))) { -return false; -}var bs = obj; -if (this.width != bs.width) { -return false; -}if (this.join != bs.join) { -return false; -}if (this.cap != bs.cap) { -return false; -}if (this.miterlimit != bs.miterlimit) { -return false; -}if (this.dash != null) { -if (this.dash_phase != bs.dash_phase) { -return false; -}if (!java.util.Arrays.equals (this.dash, bs.dash)) { -return false; -}} else if (bs.dash != null) { -return false; -}return true; -}, "~O"); -Clazz_defineStatics (c$, -"JOIN_MITER", 0, -"JOIN_ROUND", 1, -"JOIN_BEVEL", 2, -"CAP_BUTT", 0, -"CAP_ROUND", 1, -"CAP_SQUARE", 2); -}); -Clazz_declarePackage ("java.awt"); -Clazz_declareInterface (java.awt, "Stroke"); -Clazz_declarePackage ("java.util"); -Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () { -c$ = Clazz_decorateAsClass (function () { -this.language = null; -this.country = null; -this.variant = null; -this.hashCodeValue = 0; -Clazz_instantialize (this, arguments); -}, java.util, "Locale", null, [Cloneable, java.io.Serializable]); -Clazz_makeConstructor (c$, -function (language, country, variant) { -this.language = language.intern (); -this.country = country.intern (); -this.variant = variant.intern (); -}, "~S,~S,~S"); -Clazz_makeConstructor (c$, -function (language, country) { -this.construct (language, country, ""); -}, "~S,~S"); -Clazz_makeConstructor (c$, -function (language) { -this.construct (language, "", ""); -}, "~S"); -Clazz_makeConstructor (c$, - function (language, country, flag) { -this.language = language; -this.country = country; -this.variant = ""; -}, "~S,~S,~B"); -c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", - function (key, language, country) { -var locale = new java.util.Locale (language, country, false); -java.util.Locale.cache.put (key, locale); -return locale; -}, "~S,~S,~S"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function (language, country, variant) { -if (language == null || country == null || variant == null) { -throw new NullPointerException (); -}var sb = new StringBuilder (); -sb.append (language).append ('_').append (country).append ('_').append (variant); -var key = sb.toString (); -var locale = java.util.Locale.cache.get (key); -if (locale == null) { -locale = new java.util.Locale (language, country, variant); -var l = java.util.Locale.cache.put (key, locale); -if (l != null) { -locale = l; -}}return locale; -}, "~S,~S,~S"); -c$.getDefault = Clazz_defineMethod (c$, "getDefault", -function () { -if (java.util.Locale.defaultLocale == null) { -var language; -var country; -var variant; -language = "en"; -country = ""; -variant = ""; -java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant); -}return java.util.Locale.defaultLocale; -}); -c$.setDefault = Clazz_defineMethod (c$, "setDefault", -function (newLocale) { -if (newLocale == null) throw new NullPointerException ("Can't set default locale to NULL"); -java.util.Locale.defaultLocale = newLocale; -}, "java.util.Locale"); -Clazz_defineMethod (c$, "getLanguage", -function () { -return this.language; -}); -Clazz_defineMethod (c$, "getCountry", -function () { -return this.country; -}); -Clazz_defineMethod (c$, "getVariant", -function () { -return this.variant; -}); -Clazz_overrideMethod (c$, "toString", -function () { -var l = this.language.length != 0; -var c = this.country.length != 0; -var v = this.variant.length != 0; -var result = new StringBuilder (this.language); -if (c || (l && v)) { -result.append ('_').append (this.country); -}if (v && (l || c)) { -result.append ('_').append (this.variant); -}return result.toString (); -}); -Clazz_defineMethod (c$, "getDisplayLanguage", -function () { -return this.getDisplayLanguage (java.util.Locale.getDefault ()); -}); -Clazz_defineMethod (c$, "getDisplayLanguage", -function (inLocale) { -return this.getDisplayString (this.language, inLocale, 0); -}, "java.util.Locale"); -Clazz_defineMethod (c$, "getDisplayCountry", -function () { -return this.getDisplayCountry (java.util.Locale.getDefault ()); -}); -Clazz_defineMethod (c$, "getDisplayCountry", -function (inLocale) { -return this.getDisplayString (this.country, inLocale, 1); -}, "java.util.Locale"); -Clazz_defineMethod (c$, "getDisplayString", - function (code, inLocale, type) { -if (code.length == 0) { -return ""; -}if (inLocale == null) { -throw new NullPointerException (); -}return inLocale.toString (); -}, "~S,java.util.Locale,~N"); -Clazz_defineMethod (c$, "getDisplayVariant", -function () { -return this.getDisplayVariant (java.util.Locale.getDefault ()); -}); -Clazz_defineMethod (c$, "getDisplayVariant", -function (inLocale) { -if (this.variant.length == 0) return ""; -return this.variant; -}, "java.util.Locale"); -Clazz_defineMethod (c$, "getDisplayName", -function () { -return this.getDisplayName (java.util.Locale.getDefault ()); -}); -Clazz_defineMethod (c$, "getDisplayName", -function (inLocale) { -return inLocale.toString (); -}, "java.util.Locale"); -Clazz_defineMethod (c$, "clone", -function () { -try { -var that = Clazz_superCall (this, java.util.Locale, "clone", []); -return that; -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_overrideMethod (c$, "hashCode", -function () { -var hc = this.hashCodeValue; -if (hc == 0) { -hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4); -this.hashCodeValue = hc; -}return hc; -}); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (this === obj) return true; -if (!(Clazz_instanceOf (obj, java.util.Locale))) return false; -var other = obj; -return this.language === other.language && this.country === other.country && this.variant === other.variant; -}, "~O"); -c$.cache = c$.prototype.cache = new java.util.HashMap (32); -c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", ""); -c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", ""); -Clazz_defineStatics (c$, -"DISPLAY_LANGUAGE", 0, -"DISPLAY_COUNTRY", 1, -"defaultLocale", null); -}); -Clazz_declarePackage ("java.util"); -Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () { -c$ = Clazz_decorateAsClass (function () { -this.parent = null; -this.locale = null; -this.expired = false; -this.$keySet = null; -Clazz_instantialize (this, arguments); -}, java.util, "ResourceBundle"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "getString", -function (key) { -return this.getObject (key); -}, "~S"); -Clazz_defineMethod (c$, "getStringArray", -function (key) { -return this.getObject (key); -}, "~S"); -Clazz_defineMethod (c$, "getObject", -function (key) { -var obj = this.handleGetObject (key); -if (obj == null) { -if (this.parent != null) { -obj = this.parent.getObject (key); -}if (obj == null) throw new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key); -}return obj; -}, "~S"); -Clazz_defineMethod (c$, "getLocale", -function () { -return this.locale; -}); -Clazz_defineMethod (c$, "setParent", -function (parent) { -this.parent = parent; -}, "java.util.ResourceBundle"); -c$.getBundle = Clazz_defineMethod (c$, "getBundle", -function (baseName, targetLocale, loader, control) { -var n = 4; -{ -n = arguments.length; -}switch (n) { -case 2: -if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) { -control = targetLocale; -targetLocale = null; -}break; -case 3: -if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) { -control = loader; -loader = null; -}break; -} -if (targetLocale == null) targetLocale = java.util.Locale.getDefault (); -if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); -return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control); -}, "~S,~O,~O,java.util.ResourceBundle.Control"); -c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", - function (baseName, locale, loader, control) { -if (control == null) { -throw new NullPointerException ("ResourceBundle locale or control is null"); -}var cacheKey = new java.util.ResourceBundle.CacheKey (baseName, locale, loader); -var bundle = null; -var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); -if (bundleRef != null) { -bundle = bundleRef; -bundleRef = null; -}if (java.util.ResourceBundle.isValidBundle (bundle)) { -return bundle; -}var formats = control.getFormats (baseName); -var baseBundle = null; -for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) { -var candidateLocales = control.getCandidateLocales (baseName, targetLocale); -bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle); -if (java.util.ResourceBundle.isValidBundle (bundle)) { -var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale); -if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) { -break; -}if (isBaseBundle && baseBundle == null) { -baseBundle = bundle; -}}} -if (bundle == null) { -if (baseBundle == null) { -java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ()); -}bundle = baseBundle; -}return bundle; -}, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control"); -c$.findBundle = Clazz_defineMethod (c$, "findBundle", - function (cacheKey, candidateLocales, formats, index, control, baseBundle) { -var targetLocale = candidateLocales.get (index); -var parent = null; -if (index != candidateLocales.size () - 1) { -parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle); -} else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) { -return baseBundle; -}var expiredBundle = false; -cacheKey.setLocale (targetLocale); -var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control); -if (java.util.ResourceBundle.isValidBundle (bundle)) { -expiredBundle = bundle.expired; -if (!expiredBundle) { -if (bundle.parent === parent) { -return bundle; -}var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); -if (bundleRef != null && bundleRef === bundle) { -java.util.ResourceBundle.cacheList.remove (cacheKey); -}}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) { -var constKey = cacheKey.clone (); -try { -try { -bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle); -if (bundle != null) { -if (bundle.parent == null) { -bundle.setParent (parent); -}bundle.locale = targetLocale; -bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control); -return bundle; -}java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control); -} finally { -} -} finally { -if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) { -Thread.currentThread ().interrupt (); -}} -}return parent; -}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle"); -c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", - function (cacheKey, formats, control, reload) { -var targetLocale = cacheKey.getLocale (); -var bundle = null; -var size = formats.size (); -for (var i = 0; i < size; i++) { -var format = formats.get (i); -try { -bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload); -} catch (e$$) { -if (Clazz_exceptionOf (e$$, LinkageError)) { -var error = e$$; -{ -cacheKey.setCause (error); -} -} else if (Clazz_exceptionOf (e$$, Exception)) { -var cause = e$$; -{ -cacheKey.setCause (cause); -} -} else { -throw e$$; -} -} -if (bundle != null) { -cacheKey.setFormat (format); -bundle.locale = targetLocale; -bundle.expired = false; -break; -}} -return bundle; -}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B"); -c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", - function (bundle) { -return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE; -}, "java.util.ResourceBundle"); -c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", - function (baseName, locale, cause) { -if (Clazz_instanceOf (cause, java.util.MissingResourceException)) { -cause = null; -}throw new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause); -}, "~S,java.util.Locale,Throwable"); -c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", - function (cacheKey, control) { -var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); -if (bundleRef == null) { -return null; -}var bundle = bundleRef; -return bundle; -}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control"); -c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", - function (cacheKey, bundle, control) { -var key = cacheKey.clone (); -java.util.ResourceBundle.cacheList.put (key, bundle); -return bundle; -}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control"); -c$.clearCache = Clazz_defineMethod (c$, "clearCache", -function () { -java.util.ResourceBundle.cacheList.clear (); -}); -Clazz_defineMethod (c$, "containsKey", -function (key) { -if (key == null) { -throw new NullPointerException (); -}for (var rb = this; rb != null; rb = rb.parent) { -if (rb.handleKeySet ().contains (key)) { -return true; -}} -return false; -}, "~S"); -Clazz_defineMethod (c$, "keySet", -function () { -var keys = new java.util.HashSet (); -for (var rb = this; rb != null; rb = rb.parent) { -keys.addAll (rb.handleKeySet ()); -} -return keys; -}); -Clazz_defineMethod (c$, "handleKeySet", -function () { -if (this.$keySet == null) { -{ -if (this.$keySet == null) { -var keys = new java.util.HashSet (); -var enumKeys = this.getKeys (); -while (enumKeys.hasMoreElements ()) { -var key = enumKeys.nextElement (); -if (this.handleGetObject (key) != null) { -keys.add (key); -}} -this.$keySet = keys; -}}}return this.$keySet; -}); -c$.$ResourceBundle$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle); -Clazz_defineMethod (c$, "getKeys", -function () { -return null; -}); -Clazz_defineMethod (c$, "handleGetObject", -function (key) { -return null; -}, "~S"); -Clazz_overrideMethod (c$, "toString", -function () { -return "NONEXISTENT_BUNDLE"; -}); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.name = null; -this.locale = null; -this.format = null; -this.cause = null; -this.hashCodeCache = 0; -Clazz_instantialize (this, arguments); -}, java.util.ResourceBundle, "CacheKey", null, Cloneable); -Clazz_makeConstructor (c$, -function (a, b, c) { -this.name = a; -this.locale = b; -if (this.name != null) this.calculateHashCode (); -}, "~S,java.util.Locale,~O"); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "getLocale", -function () { -return this.locale; -}); -Clazz_defineMethod (c$, "setLocale", -function (a) { -if (!this.locale.equals (a)) { -this.locale = a; -this.calculateHashCode (); -}return this; -}, "java.util.Locale"); -Clazz_overrideMethod (c$, "equals", -function (a) { -if (this === a) { -return true; -}try { -var b = a; -if (this.hashCodeCache != b.hashCodeCache) { -return false; -}if (!this.name.equals (b.name)) { -return false; -}if (!this.locale.equals (b.locale)) { -return false; -}return true; -} catch (e$$) { -if (Clazz_exceptionOf (e$$, NullPointerException)) { -var e = e$$; -{ -} -} else if (Clazz_exceptionOf (e$$, ClassCastException)) { -var e = e$$; -{ -} -} else { -throw e$$; -} -} -return false; -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -return this.hashCodeCache; -}); -Clazz_defineMethod (c$, "calculateHashCode", - function () { -this.hashCodeCache = this.name.hashCode () << 3; -this.hashCodeCache ^= this.locale.hashCode (); -}); -Clazz_defineMethod (c$, "clone", -function () { -try { -var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []); -a.cause = null; -return a; -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_defineMethod (c$, "setFormat", -function (a) { -this.format = a; -}, "~S"); -Clazz_defineMethod (c$, "setCause", - function (a) { -if (this.cause == null) { -this.cause = a; -} else { -if (Clazz_instanceOf (this.cause, ClassNotFoundException)) { -this.cause = a; -}}}, "Throwable"); -Clazz_defineMethod (c$, "getCause", - function () { -return this.cause; -}); -Clazz_overrideMethod (c$, "toString", -function () { -var a = this.locale.toString (); -if (a.length == 0) { -if (this.locale.getVariant ().length != 0) { -a = "__" + this.locale.getVariant (); -} else { -a = "\"\""; -}}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]"; -}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.util.ResourceBundle, "Control"); -Clazz_makeConstructor (c$, -function () { -}); -c$.getControl = Clazz_defineMethod (c$, "getControl", -function (a) { -if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { -return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { -return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { -return java.util.ResourceBundle.Control.INSTANCE; -}throw new IllegalArgumentException (); -}, "java.util.List"); -c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", -function (a) { -if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { -return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { -return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { -return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK; -}throw new IllegalArgumentException (); -}, "java.util.List"); -Clazz_defineMethod (c$, "getFormats", -function (a) { -if (a == null) { -throw new NullPointerException (); -}return java.util.ResourceBundle.Control.FORMAT_DEFAULT; -}, "~S"); -Clazz_defineMethod (c$, "getCandidateLocales", -function (a, b) { -if (a == null) { -throw new NullPointerException (); -}var c = b.getLanguage (); -var d = b.getCountry (); -var e = b.getVariant (); -var f = new java.util.ArrayList (4); -if (e.length > 0) { -f.add (b); -}if (d.length > 0) { -f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, "")); -}if (c.length > 0) { -f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", "")); -}f.add (java.util.Locale.ROOT); -return f; -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "getFallbackLocale", -function (a, b) { -if (a == null) { -throw new NullPointerException (); -}var c = java.util.Locale.getDefault (); -return b.equals (c) ? null : c; -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "newBundle", -function (a, b, c, d, e) { -var f = this.toBundleName (a, b); -var g = null; -if (c.equals ("java.class")) { -g = swingjs.api.Interface.getInstance (f, false); -} else if (c.equals ("java.properties")) { -var h = this.toResourceName0 (f, "properties"); -if (h == null) { -return null; -}var i = swingjs.JSToolkit.getJavaResource (h); -var j = null; -j = (i == null ? null : new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ()))); -if (j != null) { -try { -g = this.newPropertyBundle (j); -} finally { -j.close (); -} -}} else { -throw new IllegalArgumentException ("unknown format: " + c); -}return g; -}, "~S,java.util.Locale,~S,~O,~B"); -Clazz_defineMethod (c$, "newPropertyBundle", - function (a) { -return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a); -}, "java.io.InputStream"); -Clazz_defineMethod (c$, "getTimeToLive", -function (a, b) { -if (a == null || b == null) { -throw new NullPointerException (); -}return -2; -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "toBundleName", -function (a, b) { -if (b === java.util.Locale.ROOT) { -return a; -}var c = b.getLanguage (); -var d = b.getCountry (); -var e = b.getVariant (); -if (c === "" && d === "" && e === "") { -return a; -}var f = new StringBuilder (a); -f.append ('_'); -if (e !== "") { -f.append (c).append ('_').append (d).append ('_').append (e); -} else if (d !== "") { -f.append (c).append ('_').append (d); -} else { -f.append (c); -}return f.toString (); -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "toResourceName", -function (a, b) { -var c = new StringBuilder (a.length + 1 + b.length); -c.append (a.$replace ('.', '/')).append ('.').append (b); -return c.toString (); -}, "~S,~S"); -Clazz_defineMethod (c$, "toResourceName0", - function (a, b) { -if (a.contains ("://")) { -return null; -} else { -return this.toResourceName (a, b); -}}, "~S,~S"); -c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"])); -c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"])); -c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"])); -Clazz_defineStatics (c$, -"TTL_DONT_CACHE", -1, -"TTL_NO_EXPIRATION_CONTROL", -2); -c$.INSTANCE = c$.prototype.INSTANCE = new java.util.ResourceBundle.Control (); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.formats = null; -Clazz_instantialize (this, arguments); -}, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []); -this.formats = a; -}, "java.util.List"); -Clazz_overrideMethod (c$, "getFormats", -function (a) { -if (a == null) { -throw new NullPointerException (); -}return this.formats; -}, "~S"); -c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); -c$.CLASS_ONLY = c$.prototype.CLASS_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl); -Clazz_overrideMethod (c$, "getFallbackLocale", -function (a, b) { -if (a == null || b == null) { -throw new NullPointerException (); -}return null; -}, "~S,java.util.Locale"); -c$.NO_FALLBACK = c$.prototype.NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT); -c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); -c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"INITIAL_CACHE_SIZE", 32); -c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null)); -c$.cacheList = c$.prototype.cacheList = new java.util.HashMap (32); -}); -Clazz_declarePackage ("JU"); -Clazz_load (["javajs.api.GenericLineReader"], "JU.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "JU.AU", "$.Base64", "$.Encoding", "$.SB"], function () { -c$ = Clazz_decorateAsClass (function () { -this.reader = null; -Clazz_instantialize (this, arguments); -}, JU, "Rdr", null, javajs.api.GenericLineReader); -Clazz_makeConstructor (c$, -function (reader) { -this.reader = reader; -}, "java.io.BufferedReader"); -Clazz_overrideMethod (c$, "readNextLine", -function () { -return this.reader.readLine (); -}); -c$.readCifData = Clazz_defineMethod (c$, "readCifData", -function (parser, br) { -return parser.set (null, br).getAllCifData (); -}, "javajs.api.GenericCifDataParser,java.io.BufferedReader"); -c$.fixUTF = Clazz_defineMethod (c$, "fixUTF", -function (bytes) { -var encoding = JU.Rdr.getUTFEncoding (bytes); -if (encoding !== JU.Encoding.NONE) try { -var s = String.instantialize (bytes, encoding.name ().$replace ('_', '-')); -switch (encoding) { -case JU.Encoding.UTF8: -case JU.Encoding.UTF_16BE: -case JU.Encoding.UTF_16LE: -s = s.substring (1); -break; -default: -break; -} -return s; -} catch (e) { -if (Clazz_exceptionOf (e, java.io.UnsupportedEncodingException)) { -System.out.println (e); -} else { -throw e; -} -} -return String.instantialize (bytes); -}, "~A"); -c$.getUTFEncoding = Clazz_defineMethod (c$, "getUTFEncoding", - function (bytes) { -if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return JU.Encoding.UTF8; -if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return JU.Encoding.UTF_32BE; -if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return JU.Encoding.UTF_32LE; -if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return JU.Encoding.UTF_16LE; -if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return JU.Encoding.UTF_16BE; -return JU.Encoding.NONE; -}, "~A"); -c$.getUTFEncodingForStream = Clazz_defineMethod (c$, "getUTFEncodingForStream", - function (is) { -{ -is.resetStream(); -}var abMagic = Clazz_newByteArray (4, 0); -abMagic[3] = 1; -try { -is.mark (5); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -return JU.Encoding.NONE; -} else { -throw e; -} -} -is.read (abMagic, 0, 4); -is.reset (); -return JU.Rdr.getUTFEncoding (abMagic); -}, "java.io.BufferedInputStream"); -c$.isBase64 = Clazz_defineMethod (c$, "isBase64", -function (sb) { -return (sb.indexOf (";base64,") == 0); -}, "JU.SB"); -c$.isCompoundDocumentS = Clazz_defineMethod (c$, "isCompoundDocumentS", -function (is) { -return JU.Rdr.isCompoundDocumentB (JU.Rdr.getMagic (is, 8)); -}, "java.io.InputStream"); -c$.isCompoundDocumentB = Clazz_defineMethod (c$, "isCompoundDocumentB", -function (bytes) { -return (bytes.length >= 8 && bytes[0] == 0xD0 && bytes[1] == 0xCF && bytes[2] == 0x11 && bytes[3] == 0xE0 && bytes[4] == 0xA1 && bytes[5] == 0xB1 && bytes[6] == 0x1A && bytes[7] == 0xE1); -}, "~A"); -c$.isGzipS = Clazz_defineMethod (c$, "isGzipS", -function (is) { -return JU.Rdr.isGzipB (JU.Rdr.getMagic (is, 2)); -}, "java.io.InputStream"); -c$.isGzipB = Clazz_defineMethod (c$, "isGzipB", -function (bytes) { -return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B); -}, "~A"); -c$.isPickleS = Clazz_defineMethod (c$, "isPickleS", -function (is) { -return JU.Rdr.isPickleB (JU.Rdr.getMagic (is, 2)); -}, "java.io.InputStream"); -c$.isPickleB = Clazz_defineMethod (c$, "isPickleB", -function (bytes) { -return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71); -}, "~A"); -c$.isPngZipStream = Clazz_defineMethod (c$, "isPngZipStream", -function (is) { -return JU.Rdr.isPngZipB (JU.Rdr.getMagic (is, 55)); -}, "java.io.InputStream"); -c$.isPngZipB = Clazz_defineMethod (c$, "isPngZipB", -function (bytes) { -return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A); -}, "~A"); -c$.isZipS = Clazz_defineMethod (c$, "isZipS", -function (is) { -return JU.Rdr.isZipB (JU.Rdr.getMagic (is, 4)); -}, "java.io.InputStream"); -c$.isZipB = Clazz_defineMethod (c$, "isZipB", -function (bytes) { -return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04); -}, "~A"); -c$.getMagic = Clazz_defineMethod (c$, "getMagic", - function (is, n) { -var abMagic = Clazz_newByteArray (n, 0); -{ -is.resetStream(); -}try { -is.mark (n + 1); -is.read (abMagic, 0, n); -} catch (e) { -if (Clazz_exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -try { -is.reset (); -} catch (e) { -if (Clazz_exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -return abMagic; -}, "java.io.InputStream,~N"); -c$.getBIS = Clazz_defineMethod (c$, "getBIS", -function (bytes) { -return new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes)); -}, "~A"); -c$.getBR = Clazz_defineMethod (c$, "getBR", -function (string) { -return new java.io.BufferedReader ( new java.io.StringReader (string)); -}, "~S"); -c$.getUnzippedInputStream = Clazz_defineMethod (c$, "getUnzippedInputStream", -function (jzt, bis) { -while (JU.Rdr.isGzipS (bis)) bis = new java.io.BufferedInputStream (JU.Rdr.newGZIPInputStream (jzt, bis)); - -return bis; -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); -c$.getBytesFromSB = Clazz_defineMethod (c$, "getBytesFromSB", -function (sb) { -return (JU.Rdr.isBase64 (sb) ? JU.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1)); -}, "JU.SB"); -c$.getStreamAsBytes = Clazz_defineMethod (c$, "getStreamAsBytes", -function (bis, out) { -var buf = Clazz_newByteArray (1024, 0); -var bytes = (out == null ? Clazz_newByteArray (4096, 0) : null); -var len = 0; -var totalLen = 0; -while ((len = bis.read (buf, 0, 1024)) > 0) { -totalLen += len; -if (out == null) { -if (totalLen >= bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2); -System.arraycopy (buf, 0, bytes, totalLen - len, len); -} else { -out.write (buf, 0, len); -}} -bis.close (); -if (out == null) { -return JU.AU.arrayCopyByte (bytes, totalLen); -}return totalLen + " bytes"; -}, "java.io.BufferedInputStream,JU.OC"); -c$.getBufferedReader = Clazz_defineMethod (c$, "getBufferedReader", -function (bis, charSet) { -if (JU.Rdr.getUTFEncodingForStream (bis) === JU.Encoding.NONE) return new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet))); -var bytes = JU.Rdr.getLimitedStreamBytes (bis, -1); -bis.close (); -return JU.Rdr.getBR (charSet == null ? JU.Rdr.fixUTF (bytes) : String.instantialize (bytes, charSet)); -}, "java.io.BufferedInputStream,~S"); -c$.getLimitedStreamBytes = Clazz_defineMethod (c$, "getLimitedStreamBytes", -function (is, n) { -var buflen = (n > 0 && n < 1024 ? n : 1024); -var buf = Clazz_newByteArray (buflen, 0); -var bytes = Clazz_newByteArray (n < 0 ? 4096 : n, 0); -var len = 0; -var totalLen = 0; -if (n < 0) n = 2147483647; -while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) { -totalLen += len; -if (totalLen > bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2); -System.arraycopy (buf, 0, bytes, totalLen - len, len); -if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen; -} -if (totalLen == bytes.length) return bytes; -buf = Clazz_newByteArray (totalLen, 0); -System.arraycopy (bytes, 0, buf, 0, totalLen); -return buf; -}, "java.io.InputStream,~N"); -c$.StreamToUTF8String = Clazz_defineMethod (c$, "StreamToUTF8String", -function (bis) { -var data = new Array (1); -try { -JU.Rdr.readAllAsString (JU.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0); -} catch (e) { -if (Clazz_exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -return data[0]; -}, "java.io.BufferedInputStream"); -c$.readAllAsString = Clazz_defineMethod (c$, "readAllAsString", -function (br, nBytesMax, allowBinary, data, i) { -try { -var sb = JU.SB.newN (8192); -var line; -if (nBytesMax < 0) { -line = br.readLine (); -if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) { -sb.append (line).appendC ('\n'); -while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n'); - -}} else { -var n = 0; -var len; -while (n < nBytesMax && (line = br.readLine ()) != null) { -if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1); -sb.append (line).appendC ('\n'); -n += len + 1; -} -}br.close (); -data[i] = sb.toString (); -return true; -} catch (ioe) { -if (Clazz_exceptionOf (ioe, Exception)) { -data[i] = ioe.toString (); -return false; -} else { -throw ioe; -} -} -}, "java.io.BufferedReader,~N,~B,~A,~N"); -c$.getPngZipPointAndCount = Clazz_defineMethod (c$, "getPngZipPointAndCount", -function (bis, pt_count) { -bis.mark (75); -try { -var data = JU.Rdr.getLimitedStreamBytes (bis, 74); -bis.reset (); -var pt = 0; -for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f; - -var n = 0; -for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f; - -pt_count[0] = pt; -pt_count[1] = n; -} catch (e) { -pt_count[1] = 0; -} -}, "java.io.BufferedInputStream,~A"); -c$.getPngZipStream = Clazz_defineMethod (c$, "getPngZipStream", -function (bis, asNewStream) { -if (!JU.Rdr.isPngZipStream (bis)) return bis; -var data = Clazz_newByteArray (0, 0); -bis.mark (75); -try { -var pt_count = Clazz_newIntArray (2, 0); -JU.Rdr.getPngZipPointAndCount (bis, pt_count); -if (pt_count[1] != 0) { -var pt = pt_count[0]; -while (pt > 0) pt -= bis.skip (pt); - -if (!asNewStream) return bis; -data = JU.Rdr.getLimitedStreamBytes (bis, pt_count[1]); -}} catch (e) { -} finally { -try { -if (asNewStream) bis.close (); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -} else { -throw e; -} -} -} -return JU.Rdr.getBIS (data); -}, "java.io.BufferedInputStream,~B"); -c$.readFileAsMap = Clazz_defineMethod (c$, "readFileAsMap", -function (jzt, is, bdata, name) { -jzt.readFileAsMap (is, bdata, name); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,java.util.Map,~S"); -c$.getZipDirectoryAsStringAndClose = Clazz_defineMethod (c$, "getZipDirectoryAsStringAndClose", -function (jzt, t) { -return jzt.getZipDirectoryAsStringAndClose (t); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); -c$.newGZIPInputStream = Clazz_defineMethod (c$, "newGZIPInputStream", -function (jzt, bis) { -return jzt.newGZIPInputStream (bis); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream"); -c$.newZipInputStream = Clazz_defineMethod (c$, "newZipInputStream", -function (jzt, $in) { -return jzt.newZipInputStream ($in); -}, "javajs.api.GenericZipTools,java.io.InputStream"); -c$.getZipFileDirectory = Clazz_defineMethod (c$, "getZipFileDirectory", -function (jzt, bis, subFileList, listPtr, asBufferedInputStream) { -return jzt.getZipFileDirectory (jzt, bis, subFileList, listPtr, asBufferedInputStream); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N,~B"); -c$.getZipDirectoryAndClose = Clazz_defineMethod (c$, "getZipDirectoryAndClose", -function (jzt, t, manifestID) { -return jzt.getZipDirectoryAndClose (t, manifestID); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~S"); -c$.getAllZipData = Clazz_defineMethod (c$, "getAllZipData", -function (jzt, bis, subFileList, replace, string, fileData) { -jzt.getAllZipData (bis, subFileList, replace, string, fileData); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~S,~S,java.util.Map"); -c$.getZipFileContentsAsBytes = Clazz_defineMethod (c$, "getZipFileContentsAsBytes", -function (jzt, bis, subFileList, i) { -return jzt.getZipFileContentsAsBytes (bis, subFileList, i); -}, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N"); -c$.addZipEntry = Clazz_defineMethod (c$, "addZipEntry", -function (jzt, zos, fileName) { -jzt.addZipEntry (zos, fileName); -}, "javajs.api.GenericZipTools,~O,~S"); -c$.closeZipEntry = Clazz_defineMethod (c$, "closeZipEntry", -function (jzt, zos) { -jzt.closeZipEntry (zos); -}, "javajs.api.GenericZipTools,~O"); -c$.getZipOutputStream = Clazz_defineMethod (c$, "getZipOutputStream", -function (jzt, bos) { -return jzt.getZipOutputStream (bos); -}, "javajs.api.GenericZipTools,~O"); -c$.getCrcValue = Clazz_defineMethod (c$, "getCrcValue", -function (jzt, bytes) { -return jzt.getCrcValue (bytes); -}, "javajs.api.GenericZipTools,~A"); -c$.getZipRoot = Clazz_defineMethod (c$, "getZipRoot", -function (fileName) { -var pt = fileName.indexOf ("|"); -return (pt < 0 ? fileName : fileName.substring (0, pt)); -}, "~S"); -}); -Clazz_declarePackage ("javajs.api"); -Clazz_declareInterface (javajs.api, "GenericLineReader"); -Clazz_load (["java.io.FilterInputStream"], "java.io.BufferedInputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.buf = null; -this.count = 0; -this.pos = 0; -this.markpos = -1; -this.marklimit = 0; -Clazz_instantialize (this, arguments); -}, java.io, "BufferedInputStream", java.io.FilterInputStream); -Clazz_defineMethod (c$, "getInIfOpen", - function () { -var input = this.$in; -if (input == null) throw new java.io.IOException ("Stream closed"); -return input; -}); -Clazz_defineMethod (c$, "getBufIfOpen", - function () { -var buffer = this.buf; -if (buffer == null) throw new java.io.IOException ("Stream closed"); -return buffer; -}); -Clazz_overrideMethod (c$, "resetStream", -function () { -}); -Clazz_makeConstructor (c$, -function ($in) { -Clazz_superConstructor (this, java.io.BufferedInputStream, [$in]); -this.buf = Clazz_newByteArray (8192, 0); -}, "java.io.InputStream"); -Clazz_defineMethod (c$, "fill", - function () { -var buffer = this.getBufIfOpen (); -if (this.markpos < 0) this.pos = 0; - else if (this.pos >= buffer.length) if (this.markpos > 0) { -var sz = this.pos - this.markpos; -System.arraycopy (buffer, this.markpos, buffer, 0, sz); -this.pos = sz; -this.markpos = 0; -} else if (buffer.length >= this.marklimit) { -this.markpos = -1; -this.pos = 0; -} else { -var nsz = this.pos * 2; -if (nsz > this.marklimit) nsz = this.marklimit; -var nbuf = Clazz_newByteArray (nsz, 0); -System.arraycopy (buffer, 0, nbuf, 0, this.pos); -buffer = this.buf = nbuf; -}this.count = this.pos; -var n = this.getInIfOpen ().read (buffer, this.pos, buffer.length - this.pos); -if (n > 0) this.count = n + this.pos; -}); -Clazz_overrideMethod (c$, "readByteAsInt", -function () { -if (this.pos >= this.count) { -this.fill (); -if (this.pos >= this.count) return -1; -}return this.getBufIfOpen ()[this.pos++] & 0xff; -}); -Clazz_defineMethod (c$, "read1", - function (b, off, len) { -var avail = this.count - this.pos; -if (avail <= 0) { -if (len >= this.getBufIfOpen ().length && this.markpos < 0) { -return this.getInIfOpen ().read (b, off, len); -}this.fill (); -avail = this.count - this.pos; -if (avail <= 0) return -1; -}var cnt = (avail < len) ? avail : len; -System.arraycopy (this.getBufIfOpen (), this.pos, b, off, cnt); -this.pos += cnt; -return cnt; -}, "~A,~N,~N"); -Clazz_overrideMethod (c$, "read", -function (b, off, len) { -if (arguments.length == 1) { - off = 0; - len = b.length; -} -this.getBufIfOpen (); -if ((off | len | (off + len) | (b.length - (off + len))) < 0) { -throw new IndexOutOfBoundsException (); -} else if (len == 0) { -return 0; -}var n = 0; -for (; ; ) { -var nread = this.read1 (b, off + n, len - n); -if (nread <= 0) return (n == 0) ? nread : n; -n += nread; -if (n >= len) return n; -var input = this.$in; -if (input != null && input.available () <= 0) return n; -} -}, "~A,~N,~N"); -Clazz_overrideMethod (c$, "skip", -function (n) { -this.getBufIfOpen (); -if (n <= 0) { -return 0; -}var avail = this.count - this.pos; -if (avail <= 0) { -if (this.markpos < 0) return this.getInIfOpen ().skip (n); -this.fill (); -avail = this.count - this.pos; -if (avail <= 0) return 0; -}var skipped = (avail < n) ? avail : n; -this.pos += skipped; -return skipped; -}, "~N"); -Clazz_overrideMethod (c$, "available", -function () { -var n = this.count - this.pos; -var avail = this.getInIfOpen ().available (); -return n > (2147483647 - avail) ? 2147483647 : n + avail; -}); -Clazz_overrideMethod (c$, "mark", -function (readlimit) { -this.marklimit = readlimit; -this.markpos = this.pos; -}, "~N"); -Clazz_overrideMethod (c$, "reset", -function () { -this.getBufIfOpen (); -if (this.markpos < 0) throw new java.io.IOException ("Resetting to invalid mark"); -this.pos = this.markpos; -}); -Clazz_overrideMethod (c$, "markSupported", -function () { -return true; -}); -Clazz_overrideMethod (c$, "close", -function () { -var input = this.$in; -this.$in = null; -if (input != null) input.close (); -return; -}); -Clazz_defineStatics (c$, -"DEFAULT_BUFFER_SIZE", 8192); -}); -Clazz_load (["java.io.InputStream"], "java.io.FilterInputStream", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.$in = null; -Clazz_instantialize (this, arguments); -}, java.io, "FilterInputStream", java.io.InputStream); -Clazz_makeConstructor (c$, -function ($in) { -Clazz_superConstructor (this, java.io.FilterInputStream, []); -this.$in = $in; -}, "java.io.InputStream"); -Clazz_defineMethod (c$, "readByteAsInt", -function () { -return this.$in.readByteAsInt (); -}); -Clazz_defineMethod (c$, "read", -function (b, off, len) { - if (arguments.length == 1) { off = 0; len = b.length; } -return this.$in.read (b, off, len); -}, "~A,~N,~N"); -Clazz_defineMethod (c$, "skip", -function (n) { -return this.$in.skip (n); -}, "~N"); -Clazz_defineMethod (c$, "available", -function () { -return this.$in.available (); -}); -Clazz_defineMethod (c$, "close", -function () { -this.$in.close (); -}); -Clazz_defineMethod (c$, "mark", -function (readlimit) { -this.$in.mark (readlimit); -}, "~N"); -Clazz_defineMethod (c$, "reset", -function () { -this.$in.reset (); -}); -Clazz_defineMethod (c$, "markSupported", -function () { -return this.$in.markSupported (); -}); -}); -Clazz_load (null, "java.io.InputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () { -c$ = Clazz_declareType (java.io, "InputStream"); -Clazz_defineMethod (c$, "read", -function (b, off, len) { -if (b == null) { -throw new NullPointerException (); -} - if (arguments.length == 1) { off = 0; len = b.length; } - -if (off < 0 || len < 0 || len > b.length - off) { -throw new IndexOutOfBoundsException (); -} else if (len == 0) { -return 0; -}var c = this.readByteAsInt (); -if (c == -1) { -return -1; -}b[off] = c; -var i = 1; -try { -for (; i < len; i++) { -c = this.readByteAsInt (); -if (c == -1) { -break; -}b[off + i] = c; -} -} catch (ee) { -if (Clazz_exceptionOf (ee, java.io.IOException)) { -} else { -throw ee; -} -} -return i; -}, "~A,~N,~N"); -Clazz_defineMethod (c$, "skip", -function (n) { -var remaining = n; -var nr; -if (java.io.InputStream.skipBuffer == null) java.io.InputStream.skipBuffer = Clazz_newByteArray (2048, 0); -var localSkipBuffer = java.io.InputStream.skipBuffer; -if (n <= 0) { -return 0; -}while (remaining > 0) { -nr = this.read (localSkipBuffer, 0, Math.min (2048, remaining)); -if (nr < 0) { -break; -}remaining -= nr; -} -return n - remaining; -}, "~N"); -Clazz_defineMethod (c$, "available", -function () { -return 0; -}); -Clazz_defineMethod (c$, "close", -function () { -}); -Clazz_defineMethod (c$, "mark", -function (readlimit) { -}, "~N"); -Clazz_defineMethod (c$, "reset", -function () { -throw new java.io.IOException ("mark/reset not supported"); -}); -Clazz_defineMethod (c$, "markSupported", -function () { -return false; -}); -Clazz_defineMethod (c$, "resetStream", -function () { -}); -Clazz_defineStatics (c$, -"SKIP_BUFFER_SIZE", 2048, -"skipBuffer", null); -}); -Clazz_load (["java.io.Reader"], "java.io.BufferedReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException", "JU.SB"], function () { -c$ = Clazz_decorateAsClass (function () { -this.$in = null; -this.cb = null; -this.nChars = 0; -this.nextChar = 0; -this.markedChar = -1; -this.readAheadLimit = 0; -this.skipLF = false; -this.markedSkipLF = false; -Clazz_instantialize (this, arguments); -}, java.io, "BufferedReader", java.io.Reader); -Clazz_defineMethod (c$, "setSize", - function (sz) { -if (sz <= 0) throw new IllegalArgumentException ("Buffer size <= 0"); -this.cb = Clazz_newCharArray (sz, '\0'); -this.nextChar = this.nChars = 0; -}, "~N"); -Clazz_makeConstructor (c$, -function ($in) { -Clazz_superConstructor (this, java.io.BufferedReader, [$in]); -this.$in = $in; -this.setSize (8192); -}, "java.io.Reader"); -Clazz_defineMethod (c$, "ensureOpen", - function () { -if (this.$in == null) throw new java.io.IOException ("Stream closed"); -}); -Clazz_defineMethod (c$, "fill", - function () { -var dst; -if (this.markedChar <= -1) { -dst = 0; -} else { -var delta = this.nextChar - this.markedChar; -if (delta >= this.readAheadLimit) { -this.markedChar = -2; -this.readAheadLimit = 0; -dst = 0; -} else { -if (this.readAheadLimit <= this.cb.length) { -System.arraycopy (this.cb, this.markedChar, this.cb, 0, delta); -this.markedChar = 0; -dst = delta; -} else { -var ncb = Clazz_newCharArray (this.readAheadLimit, '\0'); -System.arraycopy (this.cb, this.markedChar, ncb, 0, delta); -this.cb = ncb; -this.markedChar = 0; -dst = delta; -}this.nextChar = this.nChars = delta; -}}var n; -do { -n = this.$in.read (this.cb, dst, this.cb.length - dst); -} while (n == 0); -if (n > 0) { -this.nChars = dst + n; -this.nextChar = dst; -}}); -Clazz_defineMethod (c$, "read1", - function (cbuf, off, len) { -if (this.nextChar >= this.nChars) { -if (len >= this.cb.length && this.markedChar <= -1 && !this.skipLF) { -return this.$in.read (cbuf, off, len); -}this.fill (); -}if (this.nextChar >= this.nChars) return -1; -if (this.skipLF) { -this.skipLF = false; -if (this.cb[this.nextChar] == '\n') { -this.nextChar++; -if (this.nextChar >= this.nChars) this.fill (); -if (this.nextChar >= this.nChars) return -1; -}}var n = Math.min (len, this.nChars - this.nextChar); -System.arraycopy (this.cb, this.nextChar, cbuf, off, n); -this.nextChar += n; -return n; -}, "~A,~N,~N"); -Clazz_defineMethod (c$, "read", -function (cbuf, off, len) { -{ -this.ensureOpen (); -if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) { -throw new IndexOutOfBoundsException (); -} else if (len == 0) { -return 0; -}var n = this.read1 (cbuf, off, len); -if (n <= 0) return n; -while ((n < len) && this.$in.ready ()) { -var n1 = this.read1 (cbuf, off + n, len - n); -if (n1 <= 0) break; -n += n1; -} -return n; -}}, "~A,~N,~N"); -Clazz_defineMethod (c$, "readLine1", - function (ignoreLF) { -var s = null; -var startChar; -{ -this.ensureOpen (); -var omitLF = ignoreLF || this.skipLF; -for (; ; ) { -if (this.nextChar >= this.nChars) this.fill (); -if (this.nextChar >= this.nChars) { -if (s != null && s.length () > 0) return s.toString (); -return null; -}var eol = false; -var c = String.fromCharCode (0); -var i; -if (omitLF && (this.cb[this.nextChar] == '\n')) this.nextChar++; -this.skipLF = false; -omitLF = false; -charLoop : for (i = this.nextChar; i < this.nChars; i++) { -c = this.cb[i]; -if ((c == '\n') || (c == '\r')) { -eol = true; -break charLoop; -}} -startChar = this.nextChar; -this.nextChar = i; -if (eol) { -var str; -if (s == null) { -str = String.instantialize (this.cb, startChar, i - startChar); -} else { -s.appendCB (this.cb, startChar, i - startChar); -str = s.toString (); -}this.nextChar++; -if (c == '\r') { -this.skipLF = true; -}return str; -}if (s == null) s = JU.SB.newN (80); -s.appendCB (this.cb, startChar, i - startChar); -} -}}, "~B"); -Clazz_defineMethod (c$, "readLine", -function () { -return this.readLine1 (false); -}); -Clazz_overrideMethod (c$, "skip", -function (n) { -if (n < 0) { -throw new IllegalArgumentException ("skip value is negative"); -}{ -this.ensureOpen (); -var r = n; -while (r > 0) { -if (this.nextChar >= this.nChars) this.fill (); -if (this.nextChar >= this.nChars) break; -if (this.skipLF) { -this.skipLF = false; -if (this.cb[this.nextChar] == '\n') { -this.nextChar++; -}}var d = this.nChars - this.nextChar; -if (r <= d) { -this.nextChar += r; -r = 0; -break; -}r -= d; -this.nextChar = this.nChars; -} -return n - r; -}}, "~N"); -Clazz_defineMethod (c$, "ready", -function () { -{ -this.ensureOpen (); -if (this.skipLF) { -if (this.nextChar >= this.nChars && this.$in.ready ()) { -this.fill (); -}if (this.nextChar < this.nChars) { -if (this.cb[this.nextChar] == '\n') this.nextChar++; -this.skipLF = false; -}}return (this.nextChar < this.nChars) || this.$in.ready (); -}}); -Clazz_overrideMethod (c$, "markSupported", -function () { -return true; -}); -Clazz_overrideMethod (c$, "mark", -function (readAheadLimit) { -if (readAheadLimit < 0) { -throw new IllegalArgumentException ("Read-ahead limit < 0"); -}{ -this.ensureOpen (); -this.readAheadLimit = readAheadLimit; -this.markedChar = this.nextChar; -this.markedSkipLF = this.skipLF; -}}, "~N"); -Clazz_overrideMethod (c$, "reset", -function () { -{ -this.ensureOpen (); -if (this.markedChar < 0) throw new java.io.IOException ((this.markedChar == -2) ? "Mark invalid" : "Stream not marked"); -this.nextChar = this.markedChar; -this.skipLF = this.markedSkipLF; -}}); -Clazz_defineMethod (c$, "close", -function () { -{ -if (this.$in == null) return; -this.$in.close (); -this.$in = null; -this.cb = null; -}}); -Clazz_defineStatics (c$, -"INVALIDATED", -2, -"UNMARKED", -1, -"DEFAULT_CHAR_BUFFER_SIZE", 8192, -"DEFAULT_EXPECTED_LINE_LENGTH", 80); -}); -Clazz_load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.buf = null; -this.pos = 0; -this.$mark = 0; -this.count = 0; -Clazz_instantialize (this, arguments); -}, java.io, "ByteArrayInputStream", java.io.InputStream); -Clazz_makeConstructor (c$, -function (buf) { -Clazz_superConstructor (this, java.io.ByteArrayInputStream, []); -this.buf = buf; -this.pos = 0; -this.count = buf.length; -}, "~A"); -Clazz_overrideMethod (c$, "readByteAsInt", -function () { -return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1; -}); -Clazz_overrideMethod (c$, "read", -function (b, off, len) { -if (b == null) { -throw new NullPointerException (); -} - if (arguments.length == 1) { off = 0; len = b.length; } - -if (off < 0 || len < 0 || len > b.length - off) { -throw new IndexOutOfBoundsException (); -}if (this.pos >= this.count) { -return -1; -}var avail = this.count - this.pos; -if (len > avail) { -len = avail; -}if (len <= 0) { -return 0; -}System.arraycopy (this.buf, this.pos, b, off, len); -this.pos += len; -return len; -}, "~A,~N,~N"); -Clazz_overrideMethod (c$, "skip", -function (n) { -var k = this.count - this.pos; -if (n < k) { -k = n < 0 ? 0 : n; -}this.pos += k; -return k; -}, "~N"); -Clazz_overrideMethod (c$, "available", -function () { -return this.count - this.pos; -}); -Clazz_overrideMethod (c$, "markSupported", -function () { -return true; -}); -Clazz_overrideMethod (c$, "mark", -function (readAheadLimit) { -this.$mark = this.pos; -}, "~N"); -Clazz_overrideMethod (c$, "resetStream", -function () { -}); -Clazz_overrideMethod (c$, "reset", -function () { -this.pos = this.$mark; -}); -Clazz_overrideMethod (c$, "close", -function () { -}); -}); -Clazz_load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.lock = null; -this.skipBuffer = null; -Clazz_instantialize (this, arguments); -}, java.io, "Reader", null, java.io.Closeable); -Clazz_makeConstructor (c$, -function (lock) { -if (lock == null) { -throw new NullPointerException (); -}this.lock = lock; -}, "~O"); -Clazz_defineMethod (c$, "skip", -function (n) { -if (n < 0) throw new IllegalArgumentException ("skip value is negative"); -var nn = Math.min (n, 8192); -{ -if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer = Clazz_newCharArray (nn, '\0'); -var r = n; -while (r > 0) { -var nc = this.read (this.skipBuffer, 0, Math.min (r, nn)); -if (nc == -1) break; -r -= nc; -} -return n - r; -}}, "~N"); -Clazz_defineMethod (c$, "ready", -function () { -return false; -}); -Clazz_defineMethod (c$, "markSupported", -function () { -return false; -}); -Clazz_defineMethod (c$, "mark", -function (readAheadLimit) { -throw new java.io.IOException ("mark() not supported"); -}, "~N"); -Clazz_defineMethod (c$, "reset", -function () { -throw new java.io.IOException ("reset() not supported"); -}); -Clazz_defineStatics (c$, -"MAX_SKIP_BUFFE_SIZE", 8192); -}); -Clazz_load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.str = null; -this.length = 0; -this.next = 0; -this.$mark = 0; -Clazz_instantialize (this, arguments); -}, java.io, "StringReader", java.io.Reader); -Clazz_makeConstructor (c$, -function (s) { -Clazz_superConstructor (this, java.io.StringReader, [s]); -this.str = s; -this.length = s.length; -}, "~S"); -Clazz_defineMethod (c$, "ensureOpen", - function () { -if (this.str == null) throw new java.io.IOException ("Stream closed"); -}); -Clazz_overrideMethod (c$, "read", -function (cbuf, off, len) { -{ -this.ensureOpen (); -if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) { -throw new IndexOutOfBoundsException (); -} else if (len == 0) { -return 0; -}if (this.next >= this.length) return -1; -var n = Math.min (this.length - this.next, len); -this.str.getChars (this.next, this.next + n, cbuf, off); -this.next += n; -return n; -}}, "~A,~N,~N"); -Clazz_overrideMethod (c$, "skip", -function (ns) { -{ -this.ensureOpen (); -if (this.next >= this.length) return 0; -var n = Math.min (this.length - this.next, ns); -n = Math.max (-this.next, n); -this.next += n; -return n; -}}, "~N"); -Clazz_overrideMethod (c$, "ready", -function () { -{ -this.ensureOpen (); -return true; -}}); -Clazz_overrideMethod (c$, "markSupported", -function () { -return true; -}); -Clazz_overrideMethod (c$, "mark", -function (readAheadLimit) { -if (readAheadLimit < 0) { -throw new IllegalArgumentException ("Read-ahead limit < 0"); -}{ -this.ensureOpen (); -this.$mark = this.next; -}}, "~N"); -Clazz_overrideMethod (c$, "reset", -function () { -{ -this.ensureOpen (); -this.next = this.$mark; -}}); -Clazz_overrideMethod (c$, "close", -function () { -this.str = null; -}); -}); -Clazz_declarePackage ("JU"); -Clazz_load (null, "JU.Base64", ["JU.SB"], function () { -c$ = Clazz_declareType (JU, "Base64"); -c$.getBytes64 = Clazz_defineMethod (c$, "getBytes64", -function (bytes) { -return JU.Base64.getBase64 (bytes).toBytes (0, -1); -}, "~A"); -c$.getBase64 = Clazz_defineMethod (c$, "getBase64", -function (bytes) { -var nBytes = bytes.length; -var sout = new JU.SB (); -if (nBytes == 0) return sout; -for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) { -if (i % 75 == 0 && i != 0) sout.append ("\r\n"); -nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0); -var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF); -sout.appendC (JU.Base64.base64.charAt ((outbytes >> 18) & 0x3F)); -sout.appendC (JU.Base64.base64.charAt ((outbytes >> 12) & 0x3F)); -sout.appendC (nPad == 2 ? '=' : JU.Base64.base64.charAt ((outbytes >> 6) & 0x3F)); -sout.appendC (nPad >= 1 ? '=' : JU.Base64.base64.charAt (outbytes & 0x3F)); -} -return sout; -}, "~A"); -c$.decodeBase64 = Clazz_defineMethod (c$, "decodeBase64", -function (strBase64) { -var nBytes = 0; -var ch; -var pt0 = strBase64.indexOf (";base64,") + 1; -if (pt0 > 0) pt0 += 7; -var chars64 = strBase64.toCharArray (); -var len64 = chars64.length; -if (len64 == 0) return Clazz_newByteArray (0, 0); -for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || JU.Base64.decode64[ch] > 0 ? 3 : 0); - -nBytes = nBytes >> 2; -var bytes = Clazz_newByteArray (nBytes, 0); -var offset = 18; -for (var i = pt0, pt = 0, b = 0; i < len64; i++) { -if (JU.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) { -b |= JU.Base64.decode64[ch] << offset; -offset -= 6; -if (offset < 0) { -bytes[pt++] = ((b & 0xFF0000) >> 16); -if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8); -if (pt < nBytes) bytes[pt++] = (b & 0xFF); -offset = 18; -b = 0; -}}} -return bytes; -}, "~S"); -Clazz_defineStatics (c$, -"base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", -"decode64", Clazz_newIntArray (-1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 62, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0])); -}); -Clazz_declarePackage ("JU"); -Clazz_load (["java.lang.Enum"], "JU.Encoding", null, function () { -c$ = Clazz_declareType (JU, "Encoding", Enum); -Clazz_defineEnumConstant (c$, "NONE", 0, []); -Clazz_defineEnumConstant (c$, "UTF8", 1, []); -Clazz_defineEnumConstant (c$, "UTF_16BE", 2, []); -Clazz_defineEnumConstant (c$, "UTF_16LE", 3, []); -Clazz_defineEnumConstant (c$, "UTF_32BE", 4, []); -Clazz_defineEnumConstant (c$, "UTF_32LE", 5, []); -}); -Clazz_declarePackage ("java.util"); -Clazz_load (["java.lang.RuntimeException"], "java.util.MissingResourceException", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.className = null; -this.key = null; -Clazz_instantialize (this, arguments); -}, java.util, "MissingResourceException", RuntimeException); -Clazz_makeConstructor (c$, -function (s, className, key) { -Clazz_superConstructor (this, java.util.MissingResourceException, [s]); -this.className = className; -this.key = key; -}, "~S,~S,~S"); -Clazz_makeConstructor (c$, -function (message, className, key, cause) { -Clazz_superConstructor (this, java.util.MissingResourceException, [message, cause]); -this.className = className; -this.key = key; -}, "~S,~S,~S,Throwable"); -Clazz_defineMethod (c$, "getClassName", -function () { -return this.className; -}); -Clazz_defineMethod (c$, "getKey", -function () { -return this.key; -}); -}); -Clazz_declarePackage ("jssun.misc"); -Clazz_load (null, "jssun.misc.MessageUtils", ["java.lang.Character", "$.StringBuffer"], function () { -c$ = Clazz_declareType (jssun.misc, "MessageUtils"); -Clazz_makeConstructor (c$, -function () { -}); -c$.subst = Clazz_defineMethod (c$, "subst", -function (patt, arg) { -var args = Clazz_newArray (-1, [arg]); -return jssun.misc.MessageUtils.subst (patt, args); -}, "~S,~S"); -c$.subst = Clazz_defineMethod (c$, "subst", -function (patt, arg1, arg2) { -var args = Clazz_newArray (-1, [arg1, arg2]); -return jssun.misc.MessageUtils.subst (patt, args); -}, "~S,~S,~S"); -c$.subst = Clazz_defineMethod (c$, "subst", -function (patt, arg1, arg2, arg3) { -var args = Clazz_newArray (-1, [arg1, arg2, arg3]); -return jssun.misc.MessageUtils.subst (patt, args); -}, "~S,~S,~S,~S"); -c$.subst = Clazz_defineMethod (c$, "subst", -function (patt, args) { -var result = new StringBuffer (); -var len = patt.length; -for (var i = 0; i >= 0 && i < len; i++) { -var ch = patt.charAt (i); -if (ch == '%') { -if (i != len) { -var index = Character.digit (patt.charAt (i + 1), 10); -if (index == -1) { -result.append (patt.charAt (i + 1)); -i++; -} else if (index < args.length) { -result.append (args[index]); -i++; -}}} else { -result.append (ch); -}} -return result.toString (); -}, "~S,~A"); -c$.substProp = Clazz_defineMethod (c$, "substProp", -function (propName, arg) { -return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg); -}, "~S,~S"); -c$.substProp = Clazz_defineMethod (c$, "substProp", -function (propName, arg1, arg2) { -return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2); -}, "~S,~S,~S"); -c$.substProp = Clazz_defineMethod (c$, "substProp", -function (propName, arg1, arg2, arg3) { -return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2, arg3); -}, "~S,~S,~S,~S"); -c$.toStderr = Clazz_defineMethod (c$, "toStderr", -function (msg) { -{ -System.out.println(msg); -}}, "~S"); -c$.toStdout = Clazz_defineMethod (c$, "toStdout", -function (msg) { -{ -System.out.println(msg); -}}, "~S"); -c$.err = Clazz_defineMethod (c$, "err", -function (s) { -jssun.misc.MessageUtils.toStderr (s + "\n"); -}, "~S"); -c$.out = Clazz_defineMethod (c$, "out", -function (s) { -jssun.misc.MessageUtils.toStdout (s + "\n"); -}, "~S"); -c$.where = Clazz_defineMethod (c$, "where", -function () { -{ -System.out.println(Clazz_getStackTrace()); -}}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.geom.Dimension2D"], "java.awt.Dimension", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.width = 0; -this.height = 0; -Clazz_instantialize (this, arguments); -}, java.awt, "Dimension", java.awt.geom.Dimension2D); -Clazz_makeConstructor (c$, -function () { -this.construct (0, 0); -}); -Clazz_makeConstructor (c$, -function (d) { -this.construct (d.width, d.height); -}, "java.awt.Dimension"); -Clazz_makeConstructor (c$, -function (width, height) { -Clazz_superConstructor (this, java.awt.Dimension, []); -this.width = width; -this.height = height; -}, "~N,~N"); -Clazz_overrideMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz_overrideMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz_defineMethod (c$, "setSize", -function (width, height) { -this.width = Clazz_doubleToInt (Math.ceil (width)); -this.height = Clazz_doubleToInt (Math.ceil (height)); -}, "~N,~N"); -Clazz_defineMethod (c$, "getSize", -function () { -return new java.awt.Dimension (this.width, this.height); -}); -Clazz_defineMethod (c$, "setSize", -function (d) { -this.setSize (d.width, d.height); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "setSize", -function (width, height) { -this.width = width; -this.height = height; -}, "~N,~N"); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (Clazz_instanceOf (obj, java.awt.Dimension)) { -var d = obj; -return (this.width == d.width) && (this.height == d.height); -}return false; -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -var sum = this.width + this.height; -return Clazz_doubleToInt (sum * (sum + 1) / 2) + this.width; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[width=" + this.width + ",height=" + this.height + "]"; -}); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (null, "java.awt.geom.Dimension2D", ["java.lang.InternalError"], function () { -c$ = Clazz_declareType (java.awt.geom, "Dimension2D", null, Cloneable); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "setSize", -function (d) { -this.setSize (d.getWidth (), d.getHeight ()); -}, "java.awt.geom.Dimension2D"); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.geom.Dimension2D, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.Container"], "java.awt.Panel", ["java.awt.FlowLayout"], function () { -c$ = Clazz_declareType (java.awt, "Panel", java.awt.Container); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.Panel, []); -this.setPanel (); -}); -Clazz_defineMethod (c$, "setPanel", -function () { -this.setAppContext (); -this.setLayout ( new java.awt.FlowLayout ()); -}); -Clazz_makeConstructor (c$, -function (layout) { -Clazz_superConstructor (this, java.awt.Panel, []); -if (layout == null) layout = new java.awt.FlowLayout (); -this.setAppContext (); -this.setLayout (layout); -}, "java.awt.LayoutManager"); -Clazz_overrideMethod (c$, "constructComponentName", -function () { -{ -return "panel" + java.awt.Panel.nameCounter++; -}}); -Clazz_defineMethod (c$, "addNotify", -function () { -if (this.peer == null) this.peer = this.getToolkit ().createPanel (this); -Clazz_superCall (this, java.awt.Panel, "addNotify", []); -}); -Clazz_defineStatics (c$, -"base", "panel", -"nameCounter", 0); -}); -Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){ -c$=Clazz_decorateAsClass(function(){ -this.firstIndex=0; -this.lastIndex=0; -this.array=null; -Clazz_instantialize(this,arguments); -},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]); - -Clazz_overrideConstructor(c$, -function(){ -this.setup(0); -}); - -Clazz_defineMethod(c$, "setup", -function(capacity){ -//Clazz_superConstructor(this,java.util.ArrayList,[]); -this.firstIndex=this.lastIndex=0; -try{ -this.array=this.newElementArray(capacity); -}catch(e){ -if(Clazz_instanceOf(e,NegativeArraySizeException)){ -throw new IllegalArgumentException(); -}else{ -throw e; -} -} -},"~N"); -/* -Clazz_makeConstructor(c$, -function(collection){ -Clazz_superConstructor(this,java.util.ArrayList,[]); -var size=collection.size(); -this.firstIndex=this.lastIndex=0; -this.array=this.newElementArray(size+(Math.floor(size/10))); -this.addAll(collection); -},"java.util.Collection"); - -*/ - -Clazz_defineMethod(c$,"newElementArray", -($fz=function(size){ -return new Array(size); -},$fz.isPrivate=true,$fz),"~N"); - -Clazz_overrideMethod(c$,"add", -function(location,object){ - -if (arguments.length == 1) { - // coming from Java methods, e.g. Collections.list() - // location is actually the object - return this.add1(location); -} -var size=this.size(); -if(00)||this.lastIndex==this.array.length){ -System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,location); -}else{ -var index=location+this.firstIndex; -System.arraycopy(this.array,index,this.array,index+1,size-location); -this.lastIndex++; -}this.array[location+this.firstIndex]=object; -}else if(location==0){ -if(this.firstIndex==0){ -this.growAtFront(1); -}this.array[--this.firstIndex]=object; -}else if(location==size){ -if(this.lastIndex==this.array.length){ -this.growAtEnd(1); -}this.array[this.lastIndex++]=object; -}else{ -throw new IndexOutOfBoundsException(); -}this.modCount++; -},"~N,~O"); - -Clazz_overrideMethod(c$,"add1", -function(object){ -if(this.lastIndex==this.array.length){ -this.growAtEnd(1); -}this.array[this.lastIndex++]=object; -this.modCount++; -return true; -},"~O"); - -/* BH disallow addAll(int,List) - * -Clazz_defineMethod(c$,"addAll", -function(location,collection){ -var size=this.size(); -if(location<0||location>size){ -throw new IndexOutOfBoundsException(); -}var growSize=collection.size(); -if(00)||this.lastIndex>this.array.length-growSize){ -var newFirst=this.firstIndex-growSize; -if(newFirst<0){ -var index=location+this.firstIndex; -System.arraycopy(this.array,index,this.array,index-newFirst,size-location); -this.lastIndex-=newFirst; -newFirst=0; -}System.arraycopy(this.array,this.firstIndex,this.array,newFirst,location); -this.firstIndex=newFirst; -}else{ -var index=location+this.firstIndex; -System.arraycopy(this.array,index,this.array,index+growSize,size-location); -this.lastIndex+=growSize; -}}else if(location==0){ -this.growAtFront(growSize); -this.firstIndex-=growSize; -}else if(location==size){ -if(this.lastIndex>this.array.length-growSize){ -this.growAtEnd(growSize); -}this.lastIndex+=growSize; -}if(growSize>0){ -var it=collection.iterator(); -var index=location+this.firstIndex; -var end=index+growSize; -while(index0){ - if(this.lastIndex>this.array.length-growSize){ - this.growAtEnd(growSize); -} -var it=collection.iterator(); -var end=this.lastIndex+growSize; -while(this.lastIndex= i1;) -this.array[i] = null; -},"~N,~N"); - -Clazz_defineMethod(c$,"clone", -function(){ -try{ -var newList=Clazz_superCall(this,java.util.ArrayList,"clone",[]); -newList.array=this.array.clone(); -return newList; -}catch(e){ -if(Clazz_instanceOf(e,CloneNotSupportedException)){ -return null; -}else{ -throw e; -} -} -}); -Clazz_overrideMethod(c$,"contains", -function(object){ -if(object!=null){ -for(var i=this.firstIndex;i0){ -this.growAtFront(minimumCapacity-this.array.length); -}else{ -this.growAtEnd(minimumCapacity-this.array.length); -}}},"~N"); -Clazz_overrideMethod(c$,"get", -function(location){ -if(0<=location&&location=required-(this.array.length-this.lastIndex)){ - var newLast=this.lastIndex-this.firstIndex; - if(size>0){ - System.arraycopy(this.array,this.firstIndex,this.array,0,size); - var start=newLastincrement){ - increment=required; - } - if(increment<12){ - increment=12; - } - var newArray=this.newElementArray(size+increment); - if(size>0){ - System.arraycopy(this.array,this.firstIndex,newArray,this.firstIndex,size); - } - this.array=newArray; -} - -},$fz.isPrivate=true,$fz),"~N"); -Clazz_defineMethod(c$,"growAtFront", -($fz=function(required){ -var size=this.size(); -if(this.array.length-this.lastIndex>=required){ -var newFirst=this.array.length-size; -if(size>0){ -System.arraycopy(this.array,this.firstIndex,this.array,newFirst,size); -var length=this.firstIndex+size>newFirst?newFirst:this.firstIndex+size; -this.fill(this.firstIndex,length); -}this.firstIndex=newFirst; -this.lastIndex=this.array.length; -}else{ -var increment=Math.floor(size/2); -if(required>increment){ -increment=required; -}if(increment<12){ -increment=12; -}var newArray=this.newElementArray(size+increment); -if(size>0){ -System.arraycopy(this.array,this.firstIndex,newArray,newArray.length-size,size); -}this.firstIndex=newArray.length-size; -this.lastIndex=newArray.length; -this.array=newArray; -}},$fz.isPrivate=true,$fz),"~N"); -Clazz_defineMethod(c$,"growForInsert", -($fz=function(location,required){ -var size=this.size(); -var increment=Math.floor(size/2); -if(required>increment){ -increment=required; -}if(increment<12){ -increment=12; -}var newArray=this.newElementArray(size+increment); -if(location=this.firstIndex;i--){ -if(object.equals(this.array[i])){ -return i-this.firstIndex; -}} -}else{ -for(var i=this.lastIndex-1;i>=this.firstIndex;i--){ -if(this.array[i]==null){ -return i-this.firstIndex; -}} -}return-1; -},"~O"); -Clazz_overrideMethod(c$,"remove", -function(location){ -if (0 + location != location)return this.removeObject(location) -var result; -var size=this.size(); -if(0<=location&&location=0&&start<=end&&end<=this.size()){ -if(start==end){ -return; -}var size=this.size(); -if(end==size){ - this.fill(this.firstIndex+start,this.lastIndex); -this.lastIndex=this.firstIndex+start; -}else if(start==0){ - this.fill(this.firstIndex,this.firstIndex+end); -this.firstIndex+=end; -}else{ -System.arraycopy(this.array,this.firstIndex+end,this.array,this.firstIndex+start,size-end); -var newLast=this.lastIndex+start-end; -this.fill(newLast,this.lastIndex); -this.lastIndex=newLast; -}this.modCount++; -}else{ -throw new IndexOutOfBoundsException(); -}},"~N,~N"); -Clazz_overrideMethod(c$,"set", -function(location,object){ -if(0<=location&&locationcontents.length) - contents= new Array(size); -System.arraycopy(this.array,this.firstIndex,contents,0,size); -if(size=0; -}); -Clazz_overrideMethod(c$,"nextIndex", -function(){ -return this.pos+1; -}); -Clazz_overrideMethod(c$,"previous", -function(){ -if(this.expectedModCount==this._list.modCount){ -try{ -var a=this._list.get(this.pos); -this.lastPosition=this.pos; -this.pos--; -return a; -}catch(e){ -if(Clazz_instanceOf(e,IndexOutOfBoundsException)){ -throw new java.util.NoSuchElementException(); -}else{ -throw e; -} -} -}throw new java.util.ConcurrentModificationException(); -}); -Clazz_overrideMethod(c$,"previousIndex", -function(){ -return this.pos; -}); -Clazz_overrideMethod(c$,"set", -function(a){ -if(this.expectedModCount==this._list.modCount){ -try{ -this._list.set(this.lastPosition,a); -}catch(e){ -if(Clazz_instanceOf(e,IndexOutOfBoundsException)){ -throw new IllegalStateException(); -}else{ -throw e; -} -} -}else{ -throw new java.util.ConcurrentModificationException(); -}},"~O"); -c$=Clazz_p0p(); -//}; - - - - -Clazz_pu$h(self.c$); -c$=Clazz_declareType(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess); -c$=Clazz_p0p(); - - - - -Clazz_pu$h(self.c$); -c$=Clazz_decorateAsClass(function(){ -this.fullList=null; -this.offset=0; -this.$size=0; -Clazz_instantialize(this,arguments); -},java.util.AbstractList,"SubAbstractList",java.util.AbstractList); -Clazz_makeConstructor(c$, -function(a,b,c){ -Clazz_superConstructor(this,java.util.AbstractList.SubAbstractList); -this.fullList=a; -this.modCount=this.fullList.modCount; -this.offset=b; -this.$size=c-b; -},"java.util.AbstractList,~N,~N"); -Clazz_defineMethod(c$,"add", -function(a,b){ -if(this.modCount==this.fullList.modCount){ -if(0<=a&&a<=this.$size){ -this.fullList.add(a+this.offset,b); -this.$size++; -this.modCount=this.fullList.modCount; -}else{ -throw new IndexOutOfBoundsException(); -}}else{ -throw new java.util.ConcurrentModificationException(); -}},"~N,~O"); -Clazz_defineMethod(c$,"addAll", -function(a,b){ -if(this.modCount==this.fullList.modCount){ -if(0<=a&&a<=this.$size){ -var c=this.fullList.addAll(a+this.offset,b); -if(c){ -this.$size+=b.size(); -this.modCount=this.fullList.modCount; -}return c; -}throw new IndexOutOfBoundsException(); -}throw new java.util.ConcurrentModificationException(); -},"~N,java.util.Collection"); -Clazz_defineMethod(c$,"addAll", -function(a){ -if(this.modCount==this.fullList.modCount){ -var b=this.fullList.addAll(this.offset+this.$size,a); -if(b){ -this.$size+=a.size(); -this.modCount=this.fullList.modCount; -}return b; -}throw new java.util.ConcurrentModificationException(); -},"java.util.Collection"); -Clazz_defineMethod(c$,"get", -function(a){ -if(this.modCount==this.fullList.modCount){ -if(0<=a&&a=this.start; -}); -Clazz_defineMethod(c$,"next", -function(){ -if(this.iterator.nextIndex()=this.start){ -return this.iterator.previous(); -}throw new java.util.NoSuchElementException(); -}); -Clazz_defineMethod(c$,"previousIndex", -function(){ -var a=this.iterator.previousIndex(); -if(a>=this.start){ -return a-this.start; -}return-1; -}); -Clazz_defineMethod(c$,"remove", -function(){ -this.iterator.remove(); -this.subList.sizeChanged(false); -this.end--; -}); -Clazz_defineMethod(c$,"set", -function(a){ -this.iterator.set(a); -},"~O"); -c$=Clazz_p0p(); -c$=Clazz_p0p(); -}); -// 4/23/2015 1:20:24 PM BH removing need for array.getClass().getComponentType() - -Clazz_load(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){ -c$=Clazz_declareType(java.util,"AbstractCollection",null,java.util.Collection); -Clazz_makeConstructor(c$, -function(){ -}); -Clazz_overrideMethod(c$,"add", -function(object){ -throw new UnsupportedOperationException(); -},"~O"); -Clazz_overrideMethod(c$,"addAll", -function(collection){ -var result=false; -var it=collection.iterator(); -while(it.hasNext()){ -if(this.add(it.next())){ -result=true; -}} -return result; -},"java.util.Collection"); -Clazz_overrideMethod(c$,"clear", -function(){ -var it=this.iterator(); -while(it.hasNext()){ -it.next(); -it.remove(); -} -}); -Clazz_overrideMethod(c$,"contains", -function(object){ -var it=this.iterator(); -if(object!=null){ -while(it.hasNext()){ -if(object.equals(it.next())){ -return true; -}} -}else{ -while(it.hasNext()){ -if(it.next()==null){ -return true; -}} -}return false; -},"~O"); -Clazz_overrideMethod(c$,"containsAll", -function(collection){ -var it=collection.iterator(); -while(it.hasNext()){ -if(!this.contains(it.next())){ -return false; -}} -return true; -},"java.util.Collection"); -Clazz_overrideMethod(c$,"isEmpty", -function(){ -return this.size()==0; -}); -Clazz_overrideMethod(c$,"remove", -function(object){ -var it=this.iterator(); -if(object!=null){ -while(it.hasNext()){ -if(object.equals(it.next())){ -it.remove(); -return true; -}} -}else{ -while(it.hasNext()){ -if(it.next()==null){ -it.remove(); -return true; -}} -}return false; -},"~O"); -Clazz_overrideMethod(c$,"removeAll", -function(collection){ -var result=false; -var it=this.iterator(); -while(it.hasNext()){ -if(collection.contains(it.next())){ -it.remove(); -result=true; -}} -return result; -},"java.util.Collection"); -Clazz_overrideMethod(c$,"retainAll", -function(collection){ -var result=false; -var it=this.iterator(); -while(it.hasNext()){ -if(!collection.contains(it.next())){ -it.remove(); -result=true; -}} -return result; -},"java.util.Collection"); -Clazz_defineMethod(c$,"toArray", -function(){ -var size=this.size(); -var index=0; -var it=this.iterator(); -var array=new Array(size); -while(indexcontents.length){ // BH unnec -//var ct=contents.getClass().getComponentType(); -//contents=java.lang.reflect.Array.newInstance(ct,size); -//} -for(var entry,$entry=this.iterator();$entry.hasNext()&&((entry=$entry.next())||true);){ -contents[index++]=entry; -} -if(index=0){ -//this.elementCount=0; -//this.elementData=this.newElementArray(capacity==0?1:capacity); -//this.loadFactor=0.75; -//this.computeMaxSize(); -//}else{ -//throw new IllegalArgumentException(); -//}},"~N"); -Clazz_makeConstructor(c$, -function(){ -this.construct(16); -}); -Clazz_makeConstructor(c$, -function(capacity){ -Clazz_superConstructor(this,java.util.HashMap,[]); -if(capacity>=0){ -this.elementCount=0; -this.elementData=this.newElementArray(capacity==0?1:capacity); -this.loadFactor=0.75; -this.computeMaxSize(); -}else{ -throw new IllegalArgumentException(); -}},"~N"); -Clazz_makeConstructor(c$, -function(capacity,loadFactor){ -Clazz_superConstructor(this,java.util.HashMap,[]); -if(capacity>=0&&loadFactor>0){ -this.elementCount=0; -this.elementData=this.newElementArray(capacity==0?1:capacity); -this.loadFactor=loadFactor; -this.computeMaxSize(); -}else{ -throw new IllegalArgumentException(); -}},"~N,~N"); -Clazz_makeConstructor(c$, -function(map){ -this.construct(map.size()<6?11:map.size()*2); -Clazz_superCall(this,java.util.HashMap,"putAll",[map]); -},"java.util.Map"); - - -/* -Clazz_makeConstructor(c$, -function(capacity,loadFactor){ -this.doConstruct(capacity,loadFactor); -},"~N,~N"); - -Clazz_defineMethod(c$, "doConstruct", -function(capacity,loadFactor) { -capacity || (capacity = 16); -loadFactor || (loadFactor = 0.75); -if (typeof capacity != "number") { - var map = capacity; - this.loadFactor=loadFactor; - this.elementData=this.newElementArray(map.size()<6?11:map.size()*2); - this.computeMaxSize(); - this.putAllHM(map); - return; -} - -//Clazz_superConstructor(this,java.util.HashMap,[]); -if(capacity>=0&&loadFactor>0){ -this.elementData=this.newElementArray(capacity==0?1:capacity); -this.loadFactor=loadFactor; -this.computeMaxSize(); -}else{ -throw new IllegalArgumentException(); -} -},"~N,~N"); - -//Clazz_makeConstructor(c$, -//function(map){ -//this.construct(map.size()<6?11:map.size()*2); -//Clazz_superCall(this,java.util.HashMap,"putAll",[map]); -//},"java.util.Map"); - -*/ -Clazz_overrideMethod(c$,"clear", -function(){ -if(this.elementCount>0){ -this.elementCount=0; -java.util.Arrays.fill(this.elementData,null); -this.modCount++; -}}); -Clazz_defineMethod(c$,"clone", -function(){ - return this.cloneHM(); -}); - -Clazz_defineMethod(c$,"cloneHM", -function(){ -try{ -var map=this.cloneAM();//Clazz_superCall(this,java.util.HashMap,"clone",[]); -map.elementData=this.newElementArray(this.elementData.length); -var entry; -for(var i=0;i=0;){ -var entry=this.elementData[i]; -while(entry!=null){ -if(value.equals(entry.value)){ -return true; -}entry=entry.next; -} -} -}else{ -for(var i=this.elementData.length;--i>=0;){ -var entry=this.elementData[i]; -while(entry!=null){ -if(entry.value==null){ -return true; -}entry=entry.next; -} -} -}return false; -},"~O"); -Clazz_overrideMethod(c$,"entrySet", -function(){ -return new java.util.HashMap.HashMapEntrySet(this); -}); -Clazz_overrideMethod(c$,"get", -function(key){ -var m=this.getEntry(key); -if(m!=null){ -return m.value; -}return null; -},"~O"); -Clazz_defineMethod(c$,"getEntry", -function(key){ -var index=this.getModuloHash(key); -return this.findEntry(key,index); -},"~O"); -Clazz_defineMethod(c$,"getModuloHash", -function(key){ -if(key==null){ -return 0; -}return(key.hashCode()&0x7FFFFFFF)%this.elementData.length; -},"~O"); -Clazz_defineMethod(c$,"findEntry", -function(key,index){ -var m; -m=this.elementData[index]; -if(key!=null){ -while(m!=null&&!this.keysEqual(key,m)){ -m=m.next; -} -}else{ -while(m!=null&&m.key!=null){ -m=m.next; -} -}return m; -},"~O,~N"); -Clazz_overrideMethod(c$,"isEmpty", -function(){ -return this.elementCount==0; -}); -Clazz_overrideMethod(c$,"keySet", -function(){ -if(this.$keySet==null){ -this.$keySet=((Clazz_isClassDefined("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$()),Clazz_innerTypeInstance(java.util.HashMap$1,this,null)); -}return this.$keySet; -}); -Clazz_overrideMethod(c$,"put", -function(key,value){ -var index=this.getModuloHash(key); -var entry=this.findEntry(key,index); -if(entry==null){ -this.modCount++; -if(++this.elementCount>this.threshold){ -this.rehash(); -index=key==null?0:(key.hashCode()&0x7FFFFFFF)%this.elementData.length; -}entry=this.createEntry(key,index,value); -return null; -}var result=entry.value; -entry.value=value; -return result; -},"~O,~O"); -Clazz_defineMethod(c$,"createEntry", -function(key,index,value){ -var entry=new java.util.HashMap.Entry(key,value); -entry.next=this.elementData[index]; -this.elementData[index]=entry; -return entry; -},"~O,~N,~O"); -Clazz_defineMethod(c$,"putAll", -function(map){ -if(!map.isEmpty()){ -var capacity=this.elementCount+map.size(); -if(capacity>this.threshold){ -this.rehash(capacity); -} -this.putAllHM(map); - -}},"java.util.Map"); -Clazz_defineMethod(c$,"rehash", -function(capacity){ -var length=(capacity==0?1:capacity<<1); -var newData=this.newElementArray(length); -for(var i=0;itwice?min:twice,'\0'); -System.arraycopy(this.value,0,newData,0,this.count); -this.value=newData; -this.shared=false; -},$fz.isPrivate=true,$fz),"~N"); -Clazz_defineMethod(c$,"appendNull", -function(){ -var newSize=this.count+4; -if(newSize>this.value.length){ -this.enlargeBuffer(newSize); -}else if(this.shared){ -this.value=this.value.clone(); -this.shared=false; -}this.value[this.count++]='n'; -this.value[this.count++]='u'; -this.value[this.count++]='l'; -this.value[this.count++]='l'; -}); -Clazz_defineMethod(c$,"append0", -function(chars){ -var newSize=this.count+chars.length; -if(newSize>this.value.length){ -this.enlargeBuffer(newSize); -}else if(this.shared){ -this.value=this.value.clone(); -this.shared=false; -}System.arraycopy(chars,0,this.value,this.count,chars.length); -this.count=newSize; -},"~A"); -Clazz_defineMethod(c$,"append0", -function(chars,start,length){ -if(chars==null){ -throw new NullPointerException(); -}if(start>=0&&0<=length&&length<=chars.length-start){ -var newSize=this.count+length; -if(newSize>this.value.length){ -this.enlargeBuffer(newSize); -}else if(this.shared){ -this.value=this.value.clone(); -this.shared=false; -}System.arraycopy(chars,start,this.value,this.count,length); -this.count=newSize; -}else{ -throw new ArrayIndexOutOfBoundsException(); -}},"~A,~N,~N"); -Clazz_defineMethod(c$,"append0", -function(ch){ -if(this.count==this.value.length){ -this.enlargeBuffer(this.count+1); -}if(this.shared){ -this.value=this.value.clone(); -this.shared=false; -}this.value[this.count++]=ch; -},"~N"); -Clazz_defineMethod(c$,"append0", -function(string){ -if(string==null){ -this.appendNull(); -return; -}var adding=string.length; -var newSize=this.count+adding; -if(newSize>this.value.length){ -this.enlargeBuffer(newSize); -}else if(this.shared){ -this.value=this.value.clone(); -this.shared=false; -}string.getChars(0,adding,this.value,this.count); -this.count=newSize; -},"~S"); -Clazz_defineMethod(c$,"append0", -function(s,start,end){ -if(s==null)s="null"; -if(start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException(); -this.append0(s.subSequence(start,end).toString()); -},"CharSequence,~N,~N"); -Clazz_defineMethod(c$,"capacity", -function(){ -return this.value.length; -}); -Clazz_defineMethod(c$,"charAt", -function(index){ -if(index<0||index>=this.count)throw new StringIndexOutOfBoundsException(index); -return this.value[index]; -},"~N"); -Clazz_defineMethod(c$,"delete0", -function(start,end){ -if(start>=0){ -if(end>this.count){ -end=this.count; -}if(end==start){ -return; -}if(end>start){ -var length=this.count-end; -if(length>0){ -if(!this.shared){ -System.arraycopy(this.value,end,this.value,start,length); -}else{ -var newData=Clazz_newArray(this.value.length,'\0'); -System.arraycopy(this.value,0,newData,0,start); -System.arraycopy(this.value,end,newData,start,length); -this.value=newData; -this.shared=false; -}}this.count-=end-start; -return; -}}throw new StringIndexOutOfBoundsException(); -},"~N,~N"); -Clazz_defineMethod(c$,"deleteCharAt0", -function(location){ -if(0>location||location>=this.count)throw new StringIndexOutOfBoundsException(location); -var length=this.count-location-1; -if(length>0){ -if(!this.shared){ -System.arraycopy(this.value,location+1,this.value,location,length); -}else{ -var newData=Clazz_newArray(this.value.length,'\0'); -System.arraycopy(this.value,0,newData,0,location); -System.arraycopy(this.value,location+1,newData,location,length); -this.value=newData; -this.shared=false; -}}this.count--; -},"~N"); -Clazz_defineMethod(c$,"ensureCapacity", -function(min){ -if(min>this.value.length){ -this.enlargeBuffer(min); -}},"~N"); -Clazz_defineMethod(c$,"getChars", -function(start,end,dest,destStart){ -if(start>this.count||end>this.count||start>end){ -throw new StringIndexOutOfBoundsException(); -}System.arraycopy(this.value,start,dest,destStart,end-start); -},"~N,~N,~A,~N"); -Clazz_defineMethod(c$,"insert0", -function(index,chars){ -if(0>index||index>this.count){ -throw new StringIndexOutOfBoundsException(index); -}if(chars.length!=0){ -this.move(chars.length,index); -System.arraycopy(chars,0,this.value,index,chars.length); -this.count+=chars.length; -}},"~N,~A"); -Clazz_defineMethod(c$,"insert0", -function(index,chars,start,length){ -if(0<=index&&index<=this.count){ -if(start>=0&&0<=length&&length<=chars.length-start){ -if(length!=0){ -this.move(length,index); -System.arraycopy(chars,start,this.value,index,length); -this.count+=length; -}return; -}throw new StringIndexOutOfBoundsException("offset "+start+", len "+length+", array.length "+chars.length); -}throw new StringIndexOutOfBoundsException(index); -},"~N,~A,~N,~N"); -Clazz_defineMethod(c$,"insert0", -function(index,ch){ -if(0>index||index>this.count){ -throw new ArrayIndexOutOfBoundsException(index); -}this.move(1,index); -this.value[index]=ch; -this.count++; -},"~N,~N"); -Clazz_defineMethod(c$,"insert0", -function(index,string){ -if(0<=index&&index<=this.count){ -if(string==null)string="null"; -var min=string.length; -if(min!=0){ -this.move(min,index); -string.getChars(0,min,this.value,index); -this.count+=min; -}}else{ -throw new StringIndexOutOfBoundsException(index); -}},"~N,~S"); -Clazz_defineMethod(c$,"insert0", -function(index,s,start,end){ -if(s==null)s="null"; -if(index<0||index>this.count||start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException(); -this.insert0(index,s.subSequence(start,end).toString()); -},"~N,CharSequence,~N,~N"); -Clazz_defineMethod(c$,"length", -function(){ -return this.count; -}); -Clazz_defineMethod(c$,"move", -($fz=function(size,index){ -var newSize; -if(this.value.length-this.count>=size){ -if(!this.shared){ -System.arraycopy(this.value,index,this.value,index+size,this.count-index); -return; -}newSize=this.value.length; -}else{ -var a=this.count+size; -var b=(this.value.length<<1)+2; -newSize=a>b?a:b; -}var newData=Clazz_newArray(newSize,'\0'); -System.arraycopy(this.value,0,newData,0,index); -System.arraycopy(this.value,index,newData,index+size,this.count-index); -this.value=newData; -this.shared=false; -},$fz.isPrivate=true,$fz),"~N,~N"); -Clazz_defineMethod(c$,"replace0", -function(start,end,string){ -if(start>=0){ -if(end>this.count)end=this.count; -if(end>start){ -var stringLength=string.length; -var diff=end-start-stringLength; -if(diff>0){ -if(!this.shared){ -System.arraycopy(this.value,end,this.value,start+stringLength,this.count-end); -}else{ -var newData=Clazz_newArray(this.value.length,'\0'); -System.arraycopy(this.value,0,newData,0,start); -System.arraycopy(this.value,end,newData,start+stringLength,this.count-end); -this.value=newData; -this.shared=false; -}}else if(diff<0){ -this.move(-diff,end); -}else if(this.shared){ -this.value=this.value.clone(); -this.shared=false; -}string.getChars(0,stringLength,this.value,start); -this.count-=diff; -return; -}if(start==end){ -if(string==null)throw new NullPointerException(); -this.insert0(start,string); -return; -}}throw new StringIndexOutOfBoundsException(); -},"~N,~N,~S"); -Clazz_defineMethod(c$,"reverse0", -function(){ -if(this.count<2){ -return; -}if(!this.shared){ -for(var i=0,end=this.count,mid=Math.floor(this.count/2);iindex||index>=this.count){ -throw new StringIndexOutOfBoundsException(index); -}if(this.shared){ -this.value=this.value.clone(); -this.shared=false; -}this.value[index]=ch; -},"~N,~N"); -Clazz_defineMethod(c$,"setLength", -function(length){ -if(length<0)throw new StringIndexOutOfBoundsException(length); -if(this.countthis.value.length){ -this.enlargeBuffer(length); -}else{ -if(this.shared){ -var newData=Clazz_newArray(this.value.length,'\0'); -System.arraycopy(this.value,0,newData,0,this.count); -this.value=newData; -this.shared=false; -}else{ -for(var i=this.count;i=256&&this.count<=(this.value.length>>1))return String.instantialize(this.value,0,this.count); -this.shared=true; -return String.instantialize(0,this.count,this.value); -}); -Clazz_defineMethod(c$,"subSequence", -function(start,end){ -return this.substring(start,end); -},"~N,~N"); -Clazz_defineMethod(c$,"indexOf", -function(string){ -return this.indexOf(string,0); -},"~S"); -Clazz_defineMethod(c$,"indexOf", -function(subString,start){ -if(start<0)start=0; -var subCount=subString.length; -if(subCount>0){ -if(subCount+start>this.count)return-1; -var firstChar=subString.charAt(0); -while(true){ -var i=start; -var found=false; -for(;ithis.count)return-1; -var o1=i; -var o2=0; -while(++o2=0){ -if(subCount>0){ -if(start>this.count-subCount)start=this.count-subCount; -var firstChar=subString.charAt(0); -while(true){ -var i=start; -var found=false; -for(;i>=0;--i)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){ -found=true; -break; -} -if(!found)return-1; -var o1=i; -var o2=0; -while(++o2 " + to); -if (original.slice) - return original.slice(from, to); - // MSIE and Chrome do not have Int32Array.slice() -var c = Clazz_newIntArray(newLength, 0); -for (var i = 0; i < newLength; i++) - c[i] = original[from++]; -return c; -}, "~A,~N,~N"); - -c$.sort=Clazz_overrideMethod(c$,"sort", -function(a,c,d,e){ - switch (arguments.length) { - case 1: - var aux=a.sort(function(o1,o2){ - if(typeof o1=="string"||o1 instanceof Comparable){ - return o1.compareTo(o2); - } - return o1-o2; - }); - for(var i=0;itoIndex)throw new IllegalArgumentException("fromIndex("+fromIndex+") > toIndex("+toIndex+")"); -if(fromIndex<0)throw new ArrayIndexOutOfBoundsException(fromIndex); -if(toIndex>arrayLen)throw new ArrayIndexOutOfBoundsException(toIndex); -},$fz.isPrivate=true,$fz),"~N,~N,~N"); -c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", -function(a,key){ -var low=0; -var high=a.length-1; -while(low<=high){ -var mid=(low+high)>>1; -var midVal=a[mid]; -if(midValkey)high=mid-1; -else return mid; -} -return-(low+1); -},"~A,~N"); -c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", -function(a,key){ -var low=0; -var high=a.length-1; -while(low<=high){ -var mid=(low+high)>>1; -var midVal=a[mid]; -var cmp=(midVal).compareTo(key); -if(cmp<0)low=mid+1; -else if(cmp>0)high=mid-1; -else return mid; -} -return-(low+1); -},"~A,~O"); -c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", -function(a,key,c){ -if(c==null)return java.util.Arrays.binarySearch(a,key); -var low=0; -var high=a.length-1; -while(low<=high){ -var mid=(low+high)>>1; -var midVal=a[mid]; -var cmp=c.compare(midVal,key); -if(cmp<0)low=mid+1; -else if(cmp>0)high=mid-1; -else return mid; -} -return-(low+1); -},"~A,~O,java.util.Comparator"); -c$.equals=Clazz_defineMethod(c$,"equals", -function(a,a2){ -if(a===a2)return true; -if(a==null||a2==null)return false; -var length=a.length; -if(a2.length!=length)return false; -for(var i=0;i 13) { -throw new IllegalArgumentException ("illegal cursor type"); -}var c = java.awt.Cursor.predefinedPrivate[type]; -if (c == null) { -java.awt.Cursor.predefinedPrivate[type] = c = new java.awt.Cursor (type); -}if (java.awt.Cursor.predefined[type] == null) { -java.awt.Cursor.predefined[type] = c; -}return c; -}, "~N"); -c$.getSystemCustomCursor = Clazz_defineMethod (c$, "getSystemCustomCursor", -function (name) { -return null; -}, "~S"); -c$.getDefaultCursor = Clazz_defineMethod (c$, "getDefaultCursor", -function () { -return java.awt.Cursor.getPredefinedCursor (0); -}); -Clazz_makeConstructor (c$, -function (type) { -if (type < 0 || type > 13) { -throw new IllegalArgumentException ("illegal cursor type"); -}this.type = type; -this.name = "TODO_CURSOR"; -}, "~N"); -Clazz_makeConstructor (c$, -function (name) { -this.type = -1; -this.name = name; -}, "~S"); -Clazz_defineMethod (c$, "getType", -function () { -return this.type; -}); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[" + this.getName () + "]"; -}); -Clazz_defineStatics (c$, -"DEFAULT_CURSOR", 0, -"CROSSHAIR_CURSOR", 1, -"TEXT_CURSOR", 2, -"WAIT_CURSOR", 3, -"SW_RESIZE_CURSOR", 4, -"SE_RESIZE_CURSOR", 5, -"NW_RESIZE_CURSOR", 6, -"NE_RESIZE_CURSOR", 7, -"N_RESIZE_CURSOR", 8, -"S_RESIZE_CURSOR", 9, -"W_RESIZE_CURSOR", 10, -"E_RESIZE_CURSOR", 11, -"HAND_CURSOR", 12, -"MOVE_CURSOR", 13); -c$.predefined = c$.prototype.predefined = new Array (14); -c$.predefinedPrivate = c$.prototype.predefinedPrivate = new Array (14); -Clazz_defineStatics (c$, -"cursorProperties", Clazz_newArray (-1, [ Clazz_newArray (-1, ["AWT.DefaultCursor", "Default Cursor"]), Clazz_newArray (-1, ["AWT.CrosshairCursor", "Crosshair Cursor"]), Clazz_newArray (-1, ["AWT.TextCursor", "Text Cursor"]), Clazz_newArray (-1, ["AWT.WaitCursor", "Wait Cursor"]), Clazz_newArray (-1, ["AWT.SWResizeCursor", "Southwest Resize Cursor"]), Clazz_newArray (-1, ["AWT.SEResizeCursor", "Southeast Resize Cursor"]), Clazz_newArray (-1, ["AWT.NWResizeCursor", "Northwest Resize Cursor"]), Clazz_newArray (-1, ["AWT.NEResizeCursor", "Northeast Resize Cursor"]), Clazz_newArray (-1, ["AWT.NResizeCursor", "North Resize Cursor"]), Clazz_newArray (-1, ["AWT.SResizeCursor", "South Resize Cursor"]), Clazz_newArray (-1, ["AWT.WResizeCursor", "West Resize Cursor"]), Clazz_newArray (-1, ["AWT.EResizeCursor", "East Resize Cursor"]), Clazz_newArray (-1, ["AWT.HandCursor", "Hand Cursor"]), Clazz_newArray (-1, ["AWT.MoveCursor", "Move Cursor"])]), -"CUSTOM_CURSOR", -1); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.lang.Error"], "java.awt.AWTError", null, function () { -c$ = Clazz_declareType (java.awt, "AWTError", Error); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (null, "java.awt.Insets", ["java.lang.InternalError"], function () { -c$ = Clazz_decorateAsClass (function () { -this.top = 0; -this.left = 0; -this.bottom = 0; -this.right = 0; -Clazz_instantialize (this, arguments); -}, java.awt, "Insets", null, [Cloneable, java.io.Serializable]); -Clazz_makeConstructor (c$, -function (top, left, bottom, right) { -this.top = top; -this.left = left; -this.bottom = bottom; -this.right = right; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "set", -function (top, left, bottom, right) { -this.top = top; -this.left = left; -this.bottom = bottom; -this.right = right; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (Clazz_instanceOf (obj, java.awt.Insets)) { -var insets = obj; -return ((this.top == insets.top) && (this.left == insets.left) && (this.bottom == insets.bottom) && (this.right == insets.right)); -}return false; -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -var sum1 = this.left + this.bottom; -var sum2 = this.right + this.top; -var val1 = Clazz_doubleToInt (sum1 * (sum1 + 1) / 2) + this.left; -var val2 = Clazz_doubleToInt (sum2 * (sum2 + 1) / 2) + this.top; -var sum3 = val1 + val2; -return Clazz_doubleToInt (sum3 * (sum3 + 1) / 2) + val2; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]"; -}); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.Insets, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.util.Map", "$.HashMap"], "java.awt.RenderingHints", ["java.lang.IllegalArgumentException", "$.InternalError", "java.util.Collections"], function () { -c$ = Clazz_decorateAsClass (function () { -this.hintmap = null; -Clazz_instantialize (this, arguments); -}, java.awt, "RenderingHints", null, [java.util.Map, Cloneable]); -Clazz_prepareFields (c$, function () { -this.hintmap = new java.util.HashMap (7); -}); -Clazz_overrideMethod (c$, "size", -function () { -return this.hintmap.size (); -}); -Clazz_overrideMethod (c$, "isEmpty", -function () { -return this.hintmap.isEmpty (); -}); -Clazz_overrideMethod (c$, "containsKey", -function (key) { -return this.hintmap.containsKey (key); -}, "~O"); -Clazz_overrideMethod (c$, "containsValue", -function (value) { -return this.hintmap.containsValue (value); -}, "~O"); -Clazz_overrideMethod (c$, "get", -function (key) { -return this.hintmap.get (key); -}, "~O"); -Clazz_overrideMethod (c$, "put", -function (key, value) { -if (!(key).isCompatibleValue (value)) { -throw new IllegalArgumentException (value + " incompatible with " + key); -}return this.hintmap.put (key, value); -}, "~O,~O"); -Clazz_defineMethod (c$, "add", -function (hints) { -this.hintmap.putAll (hints.hintmap); -}, "java.awt.RenderingHints"); -Clazz_overrideMethod (c$, "clear", -function () { -this.hintmap.clear (); -}); -Clazz_overrideMethod (c$, "remove", -function (key) { -return this.hintmap.remove (key); -}, "~O"); -Clazz_overrideMethod (c$, "putAll", -function (m) { -if (java.awt.RenderingHints.isInstance (m)) { -for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.hintmap.put (entry.getKey (), entry.getValue ()); - -} else { -for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.put (entry.getKey (), entry.getValue ()); - -}}, "java.util.Map"); -Clazz_overrideMethod (c$, "keySet", -function () { -return this.hintmap.keySet (); -}); -Clazz_overrideMethod (c$, "values", -function () { -return this.hintmap.values (); -}); -Clazz_overrideMethod (c$, "entrySet", -function () { -return java.util.Collections.unmodifiableMap (this.hintmap).entrySet (); -}); -Clazz_overrideMethod (c$, "equals", -function (o) { -if (Clazz_instanceOf (o, java.awt.RenderingHints)) { -return this.hintmap.equals ((o).hintmap); -} else if (Clazz_instanceOf (o, java.util.Map)) { -return this.hintmap.equals (o); -}return false; -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -return this.hintmap.hashCode (); -}); -Clazz_overrideMethod (c$, "clone", -function () { -var rh; -try { -{ -rh = Clazz_clone(this); -if (this.hintmap != null) { rh.hintmap = -this.hintmap.cloneHM(); } -}} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -return rh; -}); -Clazz_overrideMethod (c$, "toString", -function () { -if (this.hintmap == null) { -return this.getClass ().getName () + "@" + Integer.toHexString (this.hashCode ()) + " (0 hints)"; -}return this.hintmap.toString (); -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.privatekey = 0; -Clazz_instantialize (this, arguments); -}, java.awt.RenderingHints, "Key"); -Clazz_defineMethod (c$, "getIdentity", - function () { -return this.getClass ().getName () + "@" + Integer.toHexString (System.identityHashCode (this.getClass ())) + ":" + Integer.toHexString (this.privatekey); -}); -Clazz_defineMethod (c$, "recordIdentity", - function (a) { -var b = a.getIdentity (); -var c = java.awt.RenderingHints.Key.identitymap.get (b); -if (c != null) { -var d = c; -if (d != null && d.getClass () === a.getClass ()) { -throw new IllegalArgumentException (b + " already registered"); -}}java.awt.RenderingHints.Key.identitymap.put (b, a); -}, "java.awt.RenderingHints.Key"); -Clazz_makeConstructor (c$, -function (a) { -this.privatekey = a; -this.recordIdentity (this); -}, "~N"); -Clazz_defineMethod (c$, "intKey", -function () { -return this.privatekey; -}); -Clazz_overrideMethod (c$, "equals", -function (a) { -return this === a; -}, "~O"); -c$.identitymap = c$.prototype.identitymap = new java.util.HashMap (17); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.description = null; -Clazz_instantialize (this, arguments); -}, java.awt.RenderingHints, "SunKey", java.awt.RenderingHints.Key); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.RenderingHints.SunKey, [a]); -this.description = b; -}, "~N,~S"); -Clazz_defineMethod (c$, "getIndex", -function () { -return this.privatekey; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.description; -}); -Clazz_overrideMethod (c$, "isCompatibleValue", -function (a) { -if (Clazz_instanceOf (a, java.awt.RenderingHints.Value)) { -return (a).isCompatibleKey (this); -}return false; -}, "~O"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.myKey = null; -this.index = 0; -this.description = null; -Clazz_instantialize (this, arguments); -}, java.awt.RenderingHints, "Value"); -c$.register = Clazz_defineMethod (c$, "register", - function (a, b) { -var c = a.getIndex (); -var d = b.getIndex (); -if (java.awt.RenderingHints.Value.ValueObjects[c][d] != null) { -throw new InternalError ("duplicate index: " + d); -}java.awt.RenderingHints.Value.ValueObjects[c][d] = b; -}, "java.awt.RenderingHints.SunKey,java.awt.RenderingHints.Value"); -c$.get = Clazz_defineMethod (c$, "get", -function (a, b) { -return java.awt.RenderingHints.Value.ValueObjects[a][b]; -}, "~N,~N"); -Clazz_makeConstructor (c$, -function (a, b, c) { -this.myKey = a; -this.index = b; -this.description = c; -java.awt.RenderingHints.Value.register (a, this); -}, "java.awt.RenderingHints.SunKey,~N,~S"); -Clazz_defineMethod (c$, "getIndex", -function () { -return this.index; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.description; -}); -Clazz_defineMethod (c$, "isCompatibleKey", -function (a) { -return this.myKey === a; -}, "java.awt.RenderingHints.SunKey"); -Clazz_overrideMethod (c$, "hashCode", -function () { -return this.description.hashCode (); -}); -Clazz_overrideMethod (c$, "equals", -function (a) { -return this === a; -}, "~O"); -c$.ValueObjects = c$.prototype.ValueObjects = Clazz_newArray (9, 8, null); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.RenderingHints, "LCDContrastKey", java.awt.RenderingHints.SunKey); -Clazz_overrideMethod (c$, "isCompatibleValue", -function (a) { -if (Clazz_instanceOf (a, Integer)) { -var b = (a).intValue (); -return b >= 100 && b <= 250; -}return false; -}, "~O"); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"NUM_KEYS", 9, -"VALS_PER_KEY", 8, -"INTKEY_RENDERING", 0, -"INTVAL_RENDER_DEFAULT", 0, -"INTVAL_RENDER_SPEED", 1, -"INTVAL_RENDER_QUALITY", 2, -"INTKEY_ANTIALIASING", 1, -"INTVAL_ANTIALIAS_DEFAULT", 0, -"INTVAL_ANTIALIAS_OFF", 1, -"INTVAL_ANTIALIAS_ON", 2, -"INTKEY_TEXT_ANTIALIASING", 2, -"INTVAL_TEXT_ANTIALIAS_DEFAULT", 0, -"INTVAL_TEXT_ANTIALIAS_OFF", 1, -"INTVAL_TEXT_ANTIALIAS_ON", 2, -"INTVAL_TEXT_ANTIALIAS_GASP", 3, -"INTVAL_TEXT_ANTIALIAS_LCD_HRGB", 4, -"INTVAL_TEXT_ANTIALIAS_LCD_HBGR", 5, -"INTVAL_TEXT_ANTIALIAS_LCD_VRGB", 6, -"INTVAL_TEXT_ANTIALIAS_LCD_VBGR", 7, -"INTKEY_FRACTIONALMETRICS", 3, -"INTVAL_FRACTIONALMETRICS_DEFAULT", 0, -"INTVAL_FRACTIONALMETRICS_OFF", 1, -"INTVAL_FRACTIONALMETRICS_ON", 2, -"INTKEY_DITHERING", 4, -"INTVAL_DITHER_DEFAULT", 0, -"INTVAL_DITHER_DISABLE", 1, -"INTVAL_DITHER_ENABLE", 2, -"INTKEY_INTERPOLATION", 5, -"INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", 0, -"INTVAL_INTERPOLATION_BILINEAR", 1, -"INTVAL_INTERPOLATION_BICUBIC", 2, -"INTKEY_ALPHA_INTERPOLATION", 6, -"INTVAL_ALPHA_INTERPOLATION_DEFAULT", 0, -"INTVAL_ALPHA_INTERPOLATION_SPEED", 1, -"INTVAL_ALPHA_INTERPOLATION_QUALITY", 2, -"INTKEY_COLOR_RENDERING", 7, -"INTVAL_COLOR_RENDER_DEFAULT", 0, -"INTVAL_COLOR_RENDER_SPEED", 1, -"INTVAL_COLOR_RENDER_QUALITY", 2, -"INTKEY_STROKE_CONTROL", 8, -"INTVAL_STROKE_DEFAULT", 0, -"INTVAL_STROKE_NORMALIZE", 1, -"INTVAL_STROKE_PURE", 2, -"INTKEY_AATEXT_LCD_CONTRAST", 100); -c$.KEY_RENDERING = c$.prototype.KEY_RENDERING = new java.awt.RenderingHints.SunKey (0, "Global rendering quality key"); -c$.VALUE_RENDER_SPEED = c$.prototype.VALUE_RENDER_SPEED = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 1, "Fastest rendering methods"); -c$.VALUE_RENDER_QUALITY = c$.prototype.VALUE_RENDER_QUALITY = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 2, "Highest quality rendering methods"); -c$.VALUE_RENDER_DEFAULT = c$.prototype.VALUE_RENDER_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 0, "Default rendering methods"); -c$.KEY_ANTIALIASING = c$.prototype.KEY_ANTIALIASING = new java.awt.RenderingHints.SunKey (1, "Global antialiasing enable key"); -c$.VALUE_ANTIALIAS_ON = c$.prototype.VALUE_ANTIALIAS_ON = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 2, "Antialiased rendering mode"); -c$.VALUE_ANTIALIAS_OFF = c$.prototype.VALUE_ANTIALIAS_OFF = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 1, "Nonantialiased rendering mode"); -c$.VALUE_ANTIALIAS_DEFAULT = c$.prototype.VALUE_ANTIALIAS_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 0, "Default antialiasing rendering mode"); -c$.KEY_FRACTIONALMETRICS = c$.prototype.KEY_FRACTIONALMETRICS = new java.awt.RenderingHints.SunKey (3, "Fractional metrics enable key"); -c$.VALUE_FRACTIONALMETRICS_ON = c$.prototype.VALUE_FRACTIONALMETRICS_ON = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 2, "Fractional text metrics mode"); -c$.VALUE_FRACTIONALMETRICS_OFF = c$.prototype.VALUE_FRACTIONALMETRICS_OFF = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 1, "Integer text metrics mode"); -c$.VALUE_FRACTIONALMETRICS_DEFAULT = c$.prototype.VALUE_FRACTIONALMETRICS_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 0, "Default fractional text metrics mode"); -c$.KEY_DITHERING = c$.prototype.KEY_DITHERING = new java.awt.RenderingHints.SunKey (4, "Dithering quality key"); -c$.VALUE_DITHER_ENABLE = c$.prototype.VALUE_DITHER_ENABLE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 2, "Dithered rendering mode"); -c$.VALUE_DITHER_DISABLE = c$.prototype.VALUE_DITHER_DISABLE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 1, "Nondithered rendering mode"); -c$.VALUE_DITHER_DEFAULT = c$.prototype.VALUE_DITHER_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 0, "Default dithering mode"); -c$.KEY_INTERPOLATION = c$.prototype.KEY_INTERPOLATION = new java.awt.RenderingHints.SunKey (5, "Image interpolation method key"); -c$.VALUE_INTERPOLATION_NEAREST_NEIGHBOR = c$.prototype.VALUE_INTERPOLATION_NEAREST_NEIGHBOR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 0, "Nearest Neighbor image interpolation mode"); -c$.VALUE_INTERPOLATION_BILINEAR = c$.prototype.VALUE_INTERPOLATION_BILINEAR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 1, "Bilinear image interpolation mode"); -c$.VALUE_INTERPOLATION_BICUBIC = c$.prototype.VALUE_INTERPOLATION_BICUBIC = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 2, "Bicubic image interpolation mode"); -c$.KEY_ALPHA_INTERPOLATION = c$.prototype.KEY_ALPHA_INTERPOLATION = new java.awt.RenderingHints.SunKey (6, "Alpha blending interpolation method key"); -c$.VALUE_ALPHA_INTERPOLATION_SPEED = c$.prototype.VALUE_ALPHA_INTERPOLATION_SPEED = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 1, "Fastest alpha blending methods"); -c$.VALUE_ALPHA_INTERPOLATION_QUALITY = c$.prototype.VALUE_ALPHA_INTERPOLATION_QUALITY = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 2, "Highest quality alpha blending methods"); -c$.VALUE_ALPHA_INTERPOLATION_DEFAULT = c$.prototype.VALUE_ALPHA_INTERPOLATION_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 0, "Default alpha blending methods"); -c$.KEY_COLOR_RENDERING = c$.prototype.KEY_COLOR_RENDERING = new java.awt.RenderingHints.SunKey (7, "Color rendering quality key"); -c$.VALUE_COLOR_RENDER_SPEED = c$.prototype.VALUE_COLOR_RENDER_SPEED = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 1, "Fastest color rendering mode"); -c$.VALUE_COLOR_RENDER_QUALITY = c$.prototype.VALUE_COLOR_RENDER_QUALITY = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 2, "Highest quality color rendering mode"); -c$.VALUE_COLOR_RENDER_DEFAULT = c$.prototype.VALUE_COLOR_RENDER_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 0, "Default color rendering mode"); -c$.KEY_STROKE_CONTROL = c$.prototype.KEY_STROKE_CONTROL = new java.awt.RenderingHints.SunKey (8, "Stroke normalization control key"); -c$.VALUE_STROKE_DEFAULT = c$.prototype.VALUE_STROKE_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 0, "Default stroke normalization"); -c$.VALUE_STROKE_NORMALIZE = c$.prototype.VALUE_STROKE_NORMALIZE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 1, "Normalize strokes for consistent rendering"); -c$.VALUE_STROKE_PURE = c$.prototype.VALUE_STROKE_PURE = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 2, "Pure stroke conversion for accurate paths"); -c$.KEY_TEXT_ANTIALIASING = c$.prototype.KEY_TEXT_ANTIALIASING = new java.awt.RenderingHints.SunKey (2, "Text-specific antialiasing enable key"); -c$.VALUE_TEXT_ANTIALIAS_ON = c$.prototype.VALUE_TEXT_ANTIALIAS_ON = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 2, "Antialiased text mode"); -c$.VALUE_TEXT_ANTIALIAS_OFF = c$.prototype.VALUE_TEXT_ANTIALIAS_OFF = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 1, "Nonantialiased text mode"); -c$.VALUE_TEXT_ANTIALIAS_DEFAULT = c$.prototype.VALUE_TEXT_ANTIALIAS_DEFAULT = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 0, "Default antialiasing text mode"); -c$.VALUE_TEXT_ANTIALIAS_GASP = c$.prototype.VALUE_TEXT_ANTIALIAS_GASP = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 3, "gasp antialiasing text mode"); -c$.VALUE_TEXT_ANTIALIAS_LCD_HRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HRGB = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 4, "LCD HRGB antialiasing text mode"); -c$.VALUE_TEXT_ANTIALIAS_LCD_HBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HBGR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 5, "LCD HBGR antialiasing text mode"); -c$.VALUE_TEXT_ANTIALIAS_LCD_VRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VRGB = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 6, "LCD VRGB antialiasing text mode"); -c$.VALUE_TEXT_ANTIALIAS_LCD_VBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VBGR = new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 7, "LCD VBGR antialiasing text mode"); -c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = new java.awt.RenderingHints.LCDContrastKey (100, "Text-specific LCD contrast key"); -c$.KEY_TEXT_LCD_CONTRAST = c$.prototype.KEY_TEXT_LCD_CONTRAST = java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST; -}); -//BH note: a declared static superclass must come before a static class referencing it - -Clazz_load(["java.util.AbstractList","$.AbstractMap","$.AbstractSet","$.Collection","$.Iterator","$.List","$.ListIterator","$.Map","$.RandomAccess","$.Set","$.SortedMap","$.SortedSet","java.lang.NullPointerException","$.UnsupportedOperationException","java.lang.reflect.Array"],"java.util.Collections",["java.lang.ArrayIndexOutOfBoundsException","$.ClassCastException","$.IllegalArgumentException","$.IndexOutOfBoundsException","java.util.ArrayList","$.Arrays","$.Enumeration","java.util.Map.Entry","java.util.NoSuchElementException","$.Random"],function(){ -c$=Clazz_declareType(java.util,"Collections"); -c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", -function(list,object){ -if(list==null){ -throw new NullPointerException(); -}if(list.isEmpty()){ -return-1; -}var key=object; -if(!(Clazz_instanceOf(list,java.util.RandomAccess))){ -var it=list.listIterator(); -while(it.hasNext()){ -var result; -if((result=key.compareTo(it.next()))<=0){ -if(result==0){ -return it.previousIndex(); -}return-it.previousIndex()-1; -}} -return-list.size()-1; -}var low=0; -var mid=list.size(); -var high=mid-1; -var result=-1; -while(low<=high){ -mid=(low+high)>>1; -if((result=key.compareTo(list.get(mid)))>0){ -low=mid+1; -}else if(result==0){ -return mid; -}else{ -high=mid-1; -}} -return-mid-(result<0?1:2); -},"java.util.List,~O"); -c$.binarySearch=Clazz_defineMethod(c$,"binarySearch", -function(list,object,comparator){ -if(comparator==null){ -return java.util.Collections.binarySearch(list,object); -}if(!(Clazz_instanceOf(list,java.util.RandomAccess))){ -var it=list.listIterator(); -while(it.hasNext()){ -var result; -if((result=comparator.compare(object,it.next()))<=0){ -if(result==0){ -return it.previousIndex(); -}return-it.previousIndex()-1; -}} -return-list.size()-1; -}var low=0; -var mid=list.size(); -var high=mid-1; -var result=-1; -while(low<=high){ -mid=(low+high)>>1; -if((result=comparator.compare(object,list.get(mid)))>0){ -low=mid+1; -}else if(result==0){ -return mid; -}else{ -high=mid-1; -}} -return-mid-(result<0?1:2); -},"java.util.List,~O,java.util.Comparator"); -c$.copy=Clazz_defineMethod(c$,"copy", -function(destination,source){ -if(destination.size()0){ -min=next; -}} -return min; -},"java.util.Collection"); -c$.min=Clazz_defineMethod(c$,"min", -function(collection,comparator){ -var it=collection.iterator(); -var min=it.next(); -while(it.hasNext()){ -var next=it.next(); -if(comparator.compare(min,next)>0){ -min=next; -}} -return min; -},"java.util.Collection,java.util.Comparator"); -c$.nCopies=Clazz_defineMethod(c$,"nCopies", -function(length,object){ -return new java.util.Collections.CopiesList(length,object); -},"~N,~O"); -c$.reverse=Clazz_defineMethod(c$,"reverse", -function(list){ -var size=list.size(); -var front=list.listIterator(); -var back=list.listIterator(size); -for(var i=0;i0;i--){ -var index=random.nextInt()%(i+1); -if(index<0){ -index=-index; -}var temp=array[i]; -array[i]=array[index]; -array[index]=temp; -} -var i=0; -var it=list.listIterator(); -while(it.hasNext()){ -it.next(); -it.set(array[i++]); -} -}else{ -var rawList=list; -for(var i=rawList.size()-1;i>0;i--){ -var index=random.nextInt()%(i+1); -if(index<0){ -index=-index; -}rawList.set(index,rawList.set(i,rawList.get(index))); -} -}},"java.util.List,java.util.Random"); -c$.singleton=Clazz_defineMethod(c$,"singleton", -function(object){ -return new java.util.Collections.SingletonSet(object); -},"~O"); -c$.singletonList=Clazz_defineMethod(c$,"singletonList", -function(object){ -return new java.util.Collections.SingletonList(object); -},"~O"); -c$.singletonMap=Clazz_defineMethod(c$,"singletonMap", -function(key,value){ -return new java.util.Collections.SingletonMap(key,value); -},"~O,~O"); -c$.sort=Clazz_defineMethod(c$,"sort", -function(list){ -var array=list.toArray(); -java.util.Arrays.sort(array); -var i=0; -var it=list.listIterator(); -while(it.hasNext()){ -it.next(); -it.set(array[i++]); -} -},"java.util.List"); -c$.sort=Clazz_defineMethod(c$,"sort", -function(list,comparator){ -var array=list.toArray(new Array(list.size())); -java.util.Arrays.sort(array,comparator); -var i=0; -var it=list.listIterator(); -while(it.hasNext()){ -it.next(); -it.set(array[i++]); -} -},"java.util.List,java.util.Comparator"); -c$.swap=Clazz_defineMethod(c$,"swap", -function(list,index1,index2){ -if(list==null){ -throw new NullPointerException(); -}if(index1==index2){ -return; -}var rawList=list; -rawList.set(index2,rawList.set(index1,rawList.get(index2))); -},"java.util.List,~N,~N"); -c$.replaceAll=Clazz_defineMethod(c$,"replaceAll", -function(list,obj,obj2){ -var index; -var found=false; -while((index=list.indexOf(obj))>-1){ -found=true; -list.set(index,obj2); -} -return found; -},"java.util.List,~O,~O"); -c$.rotate=Clazz_defineMethod(c$,"rotate", -function(lst,dist){ -var list=lst; -var size=list.size(); -if(size==0){ -return; -}var normdist; -if(dist>0){ -normdist=dist%size; -}else{ -normdist=size-((dist%size)*(-1)); -}if(normdist==0||normdist==size){ -return; -}if(Clazz_instanceOf(list,java.util.RandomAccess)){ -var temp=list.get(0); -var index=0; -var beginIndex=0; -for(var i=0;isize){ -return-1; -}if(sublistSize==0){ -return 0; -}var firstObj=sublist.get(0); -var index=list.indexOf(firstObj); -if(index==-1){ -return-1; -}while(index=sublistSize)){ -var listIt=list.listIterator(index); -if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){ -var sublistIt=sublist.listIterator(1); -var difFound=false; -while(sublistIt.hasNext()){ -var element=sublistIt.next(); -if(!listIt.hasNext()){ -return-1; -}if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){ -difFound=true; -break; -}} -if(!difFound){ -return index; -}}index++; -} -return-1; -},"java.util.List,java.util.List"); -c$.lastIndexOfSubList=Clazz_defineMethod(c$,"lastIndexOfSubList", -function(list,sublist){ -var sublistSize=sublist.size(); -var size=list.size(); -if(sublistSize>size){ -return-1; -}if(sublistSize==0){ -return size; -}var lastObj=sublist.get(sublistSize-1); -var index=list.lastIndexOf(lastObj); -while((index>-1)&&(index+1>=sublistSize)){ -var listIt=list.listIterator(index+1); -if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){ -var sublistIt=sublist.listIterator(sublistSize-1); -var difFound=false; -while(sublistIt.hasPrevious()){ -var element=sublistIt.previous(); -if(!listIt.hasPrevious()){ -return-1; -}if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){ -difFound=true; -break; -}} -if(!difFound){ -return listIt.nextIndex(); -}}index--; -} -return-1; -},"java.util.List,java.util.List"); -c$.list=Clazz_defineMethod(c$,"list", -function(enumeration){ -var list=new java.util.ArrayList(); -while(enumeration.hasMoreElements()){ -list.add(enumeration.nextElement()); -} -return list; -},"java.util.Enumeration"); -c$.synchronizedCollection=Clazz_defineMethod(c$,"synchronizedCollection", -function(collection){ -if(collection==null){ -throw new NullPointerException(); -}return new java.util.Collections.SynchronizedCollection(collection); -},"java.util.Collection"); -c$.synchronizedList=Clazz_defineMethod(c$,"synchronizedList", -function(list){ -if(list==null){ -throw new NullPointerException(); -}if(Clazz_instanceOf(list,java.util.RandomAccess)){ -return new java.util.Collections.SynchronizedRandomAccessList(list); -}return new java.util.Collections.SynchronizedList(list); -},"java.util.List"); -c$.synchronizedMap=Clazz_defineMethod(c$,"synchronizedMap", -function(map){ -if(map==null){ -throw new NullPointerException(); -}return new java.util.Collections.SynchronizedMap(map); -},"java.util.Map"); -c$.synchronizedSet=Clazz_defineMethod(c$,"synchronizedSet", -function(set){ -if(set==null){ -throw new NullPointerException(); -}return new java.util.Collections.SynchronizedSet(set); -},"java.util.Set"); -c$.synchronizedSortedMap=Clazz_defineMethod(c$,"synchronizedSortedMap", -function(map){ -if(map==null){ -throw new NullPointerException(); -}return new java.util.Collections.SynchronizedSortedMap(map); -},"java.util.SortedMap"); -c$.synchronizedSortedSet=Clazz_defineMethod(c$,"synchronizedSortedSet", -function(set){ -if(set==null){ -throw new NullPointerException(); -}return new java.util.Collections.SynchronizedSortedSet(set); -},"java.util.SortedSet"); -c$.unmodifiableCollection=Clazz_defineMethod(c$,"unmodifiableCollection", -function(collection){ -if(collection==null){ -throw new NullPointerException(); -}return new java.util.Collections.UnmodifiableCollection(collection); -},"java.util.Collection"); -c$.unmodifiableList=Clazz_defineMethod(c$,"unmodifiableList", -function(list){ -if(list==null){ -throw new NullPointerException(); -}if(Clazz_instanceOf(list,java.util.RandomAccess)){ -return new java.util.Collections.UnmodifiableRandomAccessList(list); -}return new java.util.Collections.UnmodifiableList(list); -},"java.util.List"); -c$.unmodifiableMap=Clazz_defineMethod(c$,"unmodifiableMap", -function(map){ -if(map==null){ -throw new NullPointerException(); -}return new java.util.Collections.UnmodifiableMap(map); -},"java.util.Map"); -c$.unmodifiableSet=Clazz_defineMethod(c$,"unmodifiableSet", -function(set){ -if(set==null){ -throw new NullPointerException(); -}return new java.util.Collections.UnmodifiableSet(set); -},"java.util.Set"); -c$.unmodifiableSortedMap=Clazz_defineMethod(c$,"unmodifiableSortedMap", -function(map){ -if(map==null){ -throw new NullPointerException(); -}return new java.util.Collections.UnmodifiableSortedMap(map); -},"java.util.SortedMap"); -c$.unmodifiableSortedSet=Clazz_defineMethod(c$,"unmodifiableSortedSet", -function(set){ -if(set==null){ -throw new NullPointerException(); -}return new java.util.Collections.UnmodifiableSortedSet(set); -},"java.util.SortedSet"); -c$.frequency=Clazz_defineMethod(c$,"frequency", -function(c,o){ -if(c==null){ -throw new NullPointerException(); -}if(c.isEmpty()){ -return 0; -} -var result=0; -var itr=c.iterator(); -while(itr.hasNext()){ -var e=itr.next(); -if(o==null?e==null:o.equals(e)){ -result++; -}} -return result; -},"java.util.Collection,~O"); - -c$.emptyList=Clazz_defineMethod(c$,"emptyList", -function(){ -return java.util.Collections.EMPTY_LIST; -}); -c$.emptySet=Clazz_defineMethod(c$,"emptySet", -function(){ -return java.util.Collections.EMPTY_SET; -}); -c$.emptyMap=Clazz_defineMethod(c$,"emptyMap", -function(){ -return java.util.Collections.EMPTY_MAP; -}); -c$.checkedCollection=Clazz_defineMethod(c$,"checkedCollection", -function(c,type){ -return new java.util.Collections.CheckedCollection(c,type); -},"java.util.Collection,Class"); -c$.checkedMap=Clazz_defineMethod(c$,"checkedMap", -function(m,keyType,valueType){ -return new java.util.Collections.CheckedMap(m,keyType,valueType); -},"java.util.Map,Class,Class"); -c$.checkedList=Clazz_defineMethod(c$,"checkedList", -function(list,type){ -if(Clazz_instanceOf(list,java.util.RandomAccess)){ -return new java.util.Collections.CheckedRandomAccessList(list,type); -}return new java.util.Collections.CheckedList(list,type); -},"java.util.List,Class"); -c$.checkedSet=Clazz_defineMethod(c$,"checkedSet", -function(s,type){ -return new java.util.Collections.CheckedSet(s,type); -},"java.util.Set,Class"); -c$.checkedSortedMap=Clazz_defineMethod(c$,"checkedSortedMap", -function(m,keyType,valueType){ -return new java.util.Collections.CheckedSortedMap(m,keyType,valueType); -},"java.util.SortedMap,Class,Class"); -c$.checkedSortedSet=Clazz_defineMethod(c$,"checkedSortedSet", -function(s,type){ -return new java.util.Collections.CheckedSortedSet(s,type); -},"java.util.SortedSet,Class"); -c$.addAll=Clazz_defineMethod(c$,"addAll", -function(c,a){ -var modified=false; -for(var i=0;ic1.size()){ -var tmp=c1; -c1=c2; -c2=tmp; -}var it=c1.iterator(); -while(it.hasNext()){ -if(c2.contains(it.next())){ -return false; -}} -return true; -},"java.util.Collection,java.util.Collection"); -c$.checkType=Clazz_defineMethod(c$,"checkType", -function(obj,type){ -if(!type.isInstance(obj)){ -throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type); -}return obj; -},"~O,Class"); - -c$.$Collections$1$=function(c){ -Clazz_pu$h(self.c$); -c$=Clazz_decorateAsClass(function(){ -Clazz_prepareCallback(this,arguments); -this.it=null; -Clazz_instantialize(this,arguments); -},java.util,"Collections$1",null,java.util.Enumeration); - -Clazz_prepareFields(c$,function(){ -this.it=c.iterator(); -}); - -Clazz_defineMethod(c$,"hasMoreElements", -function(){ -return this.it.hasNext(); -}); -Clazz_defineMethod(c$,"nextElement", -function(){ -return this.it.next(); -}); -c$=Clazz_p0p(); -}; - -Clazz_pu$h(self.c$); -c$=Clazz_decorateAsClass(function(){ -this.n=0; -this.element=null; -Clazz_instantialize(this,arguments); -},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable); -Clazz_makeConstructor(c$, -function(a,b){ -Clazz_superConstructor(this,java.util.Collections.CopiesList,[]); -if(a<0){ -throw new IllegalArgumentException(); -}this.n=a; -this.element=b; -},"~N,~O"); -Clazz_overrideMethod(c$,"contains", -function(a){ -return this.element==null?a==null:this.element.equals(a); -},"~O"); -Clazz_overrideMethod(c$,"size", -function(){ -return this.n; -}); -Clazz_overrideMethod(c$,"get", -function(a){ -if(0<=a&&a=0;){ -b[d]=c.next(); -} -return b; -}); -Clazz_defineMethod(c$,"toArray", -function(a){ -var b=this.c.size(); -var c=0; -var d=this.iterator(); -if(b>a.length){ -var e=a.getClass().getComponentType(); -a=java.lang.reflect.Array.newInstance(e,b); -}while(c>>(48-bits)); -},"~N"); -Clazz_defineMethod(c$,"nextBoolean", -function(){ -return Math.random()>0.5; -}); -Clazz_defineMethod(c$,"nextBytes", -function(buf){ -for(var i=0;i=1); -var norm=Math.sqrt(-2*Math.log(s)/s); -this.nextNextGaussian=v2*norm; -this.haveNextNextGaussian=true; -return v1*norm; -}); -Clazz_defineMethod(c$,"nextInt", -function(){ -return Math.ceil(0xffff*Math.random())-0x8000; -}); -Clazz_defineMethod(c$,"nextInt", -function(n){ -if(n>0){ -n = Math.min(n, 31); -return Math.floor((2 << (n - 1)) * Math.random()) - -/* -if((n&-n)==n){ -return((n*this.next(31))>>31); -}var bits; -var val; -do{ -bits=this.next(31); -val=bits%n; -}while(bits-val+(n-1)<0); - - -return val; - -*/ -} -throw new IllegalArgumentException(); -},"~N"); -Clazz_defineMethod(c$,"nextLong", -function(){ -return Math.ceil(0xffffffff*Math.random())-0x80000000; -}); -Clazz_defineMethod(c$,"setSeed", -function(seed){ -Math.seedrandom(seed); -//this.seed=(seed^25214903917)&(281474976710655); -//this.haveNextNextGaussian=false; -},"~N"); -Clazz_defineStatics(c$, -"multiplier",0x5deece66d); -}); - -// seedrandom.js -// Author: David Bau 3/11/2010 -// -// Defines a method Math.seedrandom() that, when called, substitutes -// an explicitly seeded RC4-based algorithm for Math.random(). Also -// supports automatic seeding from local or network sources of entropy. -// -// Usage: -// -// -// -// Math.seedrandom('yipee'); Sets Math.random to a function that is -// initialized using the given explicit seed. -// -// Math.seedrandom(); Sets Math.random to a function that is -// seeded using the current time, dom state, -// and other accumulated local entropy. -// The generated seed string is returned. -// -// Math.seedrandom('yowza', true); -// Seeds using the given explicit seed mixed -// together with accumulated entropy. -// -// -// Seeds using physical random bits downloaded -// from random.org. -// -// Examples: -// -// Math.seedrandom("hello"); // Use "hello" as the seed. -// document.write(Math.random()); // Always 0.5463663768140734 -// document.write(Math.random()); // Always 0.43973793770592234 -// var rng1 = Math.random; // Remember the current prng. -// -// var autoseed = Math.seedrandom(); // New prng with an automatic seed. -// document.write(Math.random()); // Pretty much unpredictable. -// -// Math.random = rng1; // Continue "hello" prng sequence. -// document.write(Math.random()); // Always 0.554769432473455 -// -// Math.seedrandom(autoseed); // Restart at the previous seed. -// document.write(Math.random()); // Repeat the 'unpredictable' value. -// -// Notes: -// -// Each time seedrandom('arg') is called, entropy from the passed seed -// is accumulated in a pool to help generate future seeds for the -// zero-argument form of Math.seedrandom, so entropy can be injected over -// time by calling seedrandom with explicit data repeatedly. -// -// On speed - This javascript implementation of Math.random() is about -// 3-10x slower than the built-in Math.random() because it is not native -// code, but this is typically fast enough anyway. Seeding is more expensive, -// especially if you use auto-seeding. Some details (timings on Chrome 4): -// -// Our Math.random() - avg less than 0.002 milliseconds per call -// seedrandom('explicit') - avg less than 0.5 milliseconds per call -// seedrandom('explicit', true) - avg less than 2 milliseconds per call -// seedrandom() - avg about 38 milliseconds per call -// -// LICENSE (BSD): -// -// Copyright 2010 David Bau, all rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of this module nor the names of its contributors may -// be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/** - * All code is in an anonymous closure to keep the global namespace clean. - * - * @param {number=} overflow - * @param {number=} startdenom - */ -(function (pool, math, width, chunks, significance, overflow, startdenom) { - -var copyright = "Copyright 2010 David Bau, all rights reserved. (BSD)" -// -// seedrandom() -// This is the seedrandom function described above. -// -math['seedrandom'] = function seedrandom(seed, use_entropy) { - var key = []; - var arc4; - - // Flatten the seed string or build one from local entropy if needed. - seed = mixkey(flatten( - use_entropy ? [seed, pool] : - arguments.length ? seed : - [new Date().getTime(), pool, window], 3), key); - - // Use the seed to initialize an ARC4 generator. - arc4 = new ARC4(key); - - // Mix the randomness into accumulated entropy. - mixkey(arc4.S, pool); - - // Override Math.random - - // This function returns a random double in [0, 1) that contains - // randomness in every bit of the mantissa of the IEEE 754 value. - - math['random'] = function random() { // Closure to return a random double: - var n = arc4.g(chunks); // Start with a numerator n < 2 ^ 48 - var d = startdenom; // and denominator d = 2 ^ 48. - var x = 0; // and no 'extra last byte'. - while (n < significance) { // Fill up all significant digits by - n = (n + x) * width; // shifting numerator and - d *= width; // denominator and generating a - x = arc4.g(1); // new least-significant-byte. - } - while (n >= overflow) { // To avoid rounding up, before adding - n /= 2; // last byte, shift everything - d /= 2; // right using integer math until - x >>>= 1; // we have exactly the desired bits. - } - return (n + x) / d; // Form the number within [0, 1). - }; - - // Return the seed that was used - return seed; -}; - -// -// ARC4 -// -// An ARC4 implementation. The constructor takes a key in the form of -// an array of at most (width) integers that should be 0 <= x < (width). -// -// The g(count) method returns a pseudorandom integer that concatenates -// the next (count) outputs from ARC4. Its return value is a number x -// that is in the range 0 <= x < (width ^ count). -// -/** @constructor */ -function ARC4(key) { - var t, u, me = this, keylen = key.length; - var i = 0, j = me.i = me.j = me.m = 0; - me.S = []; - me.c = []; - - // The empty key [] is treated as [0]. - if (!keylen) { key = [keylen++]; } - - // Set up S using the standard key scheduling algorithm. - while (i < width) { me.S[i] = i++; } - for (i = 0; i < width; i++) { - t = me.S[i]; - j = lowbits(j + t + key[i % keylen]); - u = me.S[j]; - me.S[i] = u; - me.S[j] = t; - } - - // The "g" method returns the next (count) outputs as one number. - me.g = function getnext(count) { - var s = me.S; - var i = lowbits(me.i + 1); var t = s[i]; - var j = lowbits(me.j + t); var u = s[j]; - s[i] = u; - s[j] = t; - var r = s[lowbits(t + u)]; - while (--count) { - i = lowbits(i + 1); t = s[i]; - j = lowbits(j + t); u = s[j]; - s[i] = u; - s[j] = t; - r = r * width + s[lowbits(t + u)]; - } - me.i = i; - me.j = j; - return r; - }; - // For robust unpredictability discard an initial batch of values. - // See http://www.rsa.com/rsalabs/node.asp?id=2009 - me.g(width); -} - -// -// flatten() -// Converts an object tree to nested arrays of strings. -// -/** @param {Object=} result - * @param {string=} prop */ -function flatten(obj, depth, result, prop) { - result = []; - if (depth && typeof(obj) == 'object') { - for (prop in obj) { - if (prop.indexOf('S') < 5) { // Avoid FF3 bug (local/sessionStorage) - try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {} - } - } - } - return result.length ? result : '' + obj; -} - -// -// mixkey() -// Mixes a string seed into a key that is an array of integers, and -// returns a shortened string seed that is equivalent to the result key. -// -/** @param {number=} smear - * @param {number=} j */ -function mixkey(seed, key, smear, j) { - seed += ''; // Ensure the seed is a string - smear = 0; - for (j = 0; j < seed.length; j++) { - key[lowbits(j)] = - lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j)); - } - seed = ''; - for (j in key) { seed += String.fromCharCode(key[j]); } - return seed; -} - -// -// lowbits() -// A quick "n mod width" for width a power of 2. -// -function lowbits(n) { return n & (width - 1); } - -// -// The following constants are related to IEEE 754 limits. -// -startdenom = math.pow(width, chunks); -significance = math.pow(2, significance); -overflow = significance * 2; - -// -// When seedrandom.js is loaded, we immediately mix a few bits -// from the built-in RNG into the entropy pool. Because we do -// not want to intefere with determinstic PRNG state later, -// seedrandom will not call math.random on its own again after -// initialization. -// -mixkey(math.random(), pool); - -// End anonymous scope, and pass initial values. -})( - [], // pool: entropy pool starts empty - Math, // math: package containing random, pow, and seedrandom - 256, // width: each RC4 output is 0 <= x < 256 - 6, // chunks: at least six RC4 outputs for each double - 52 // significance: there are 52 significant digits in a double -); - -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.util.EventListenerProxy", "java.awt.event.AWTEventListener"], "java.awt.event.AWTEventListenerProxy", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.eventMask = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "AWTEventListenerProxy", java.util.EventListenerProxy, java.awt.event.AWTEventListener); -Clazz_makeConstructor (c$, -function (eventMask, listener) { -Clazz_superConstructor (this, java.awt.event.AWTEventListenerProxy, [listener]); -this.eventMask = eventMask; -}, "~N,java.awt.event.AWTEventListener"); -Clazz_defineMethod (c$, "eventDispatched", -function (evt) { -(this.getListener ()).eventDispatched (evt); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "getEventMask", -function () { -return this.eventMask; -}); -}); -Clazz_declarePackage ("java.beans"); -Clazz_load (["java.beans.ChangeListenerMap"], "java.beans.PropertyChangeSupport", ["java.lang.Boolean", "$.NullPointerException", "java.beans.IndexedPropertyChangeEvent", "$.PropertyChangeEvent", "$.PropertyChangeListenerProxy"], function () { -c$ = Clazz_decorateAsClass (function () { -this.map = null; -this.source = null; -Clazz_instantialize (this, arguments); -}, java.beans, "PropertyChangeSupport"); -Clazz_prepareFields (c$, function () { -this.map = new java.beans.PropertyChangeSupport.PropertyChangeListenerMap (); -}); -Clazz_makeConstructor (c$, -function (sourceBean) { -if (sourceBean == null) { -throw new NullPointerException (); -}this.source = sourceBean; -}, "~O"); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (listener) { -this.addPropertyChangeListener1 (listener); -}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "addPropertyChangeListener1", -function (listener) { -if (listener == null) { -return; -}if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) { -var proxy = listener; -this.addPropertyChangeListener (proxy.getPropertyName (), proxy.getListener ()); -} else { -this.map.add (null, listener); -}}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "removePropertyChangeListener", -function (listener) { -if (listener == null) { -return; -}if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) { -var proxy = listener; -this.removePropertyChangeListener (proxy.getPropertyName (), proxy.getListener ()); -} else { -this.map.remove (null, listener); -}}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function () { -return this.map.getListeners (); -}); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (propertyName, listener) { -{ -if (arguments.length == 1) { -this.addPropertyChangeListener1(propertyName); -return; -} -}this.addPropertyChangeListener2 (propertyName, listener); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "addPropertyChangeListener2", -function (propertyName, listener) { -if (listener == null || propertyName == null) { -return; -}listener = this.map.extract (listener); -if (listener != null) { -this.map.add (propertyName, listener); -}}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "removePropertyChangeListener", -function (propertyName, listener) { -if (listener == null || propertyName == null) { -return; -}listener = this.map.extract (listener); -if (listener != null) { -this.map.remove (propertyName, listener); -}}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function (propertyName) { -return this.map.getListeners (propertyName); -}, "~S"); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -if (oldValue != null && newValue != null && oldValue.equals (newValue)) { -return; -}this.firePropertyChangeEvt ( new java.beans.PropertyChangeEvent (this.source, propertyName, oldValue, newValue)); -}, "~S,~O,~O"); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -if (oldValue == newValue) { -return; -}this.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue)); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -if (oldValue == newValue) { -return; -}this.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); -}, "~S,~B,~B"); -Clazz_defineMethod (c$, "firePropertyChangeEvt", -function (evt) { -var oldValue = evt.getOldValue (); -var newValue = evt.getNewValue (); -var propertyName = evt.getPropertyName (); -if (oldValue != null && newValue != null && oldValue.equals (newValue)) { -return; -}var common = this.map.get (null); -var named = (propertyName != null) ? this.map.get (propertyName) : null; -this.fire (common, evt); -this.fire (named, evt); -}, "java.beans.PropertyChangeEvent"); -Clazz_defineMethod (c$, "fire", - function (listeners, event) { -if (listeners != null) { -for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) { -listener.propertyChange (event); -} -}}, "~A,java.beans.PropertyChangeEvent"); -Clazz_defineMethod (c$, "fireIndexedPropertyChange", -function (propertyName, index, oldValue, newValue) { -this.firePropertyChangeEvt ( new java.beans.IndexedPropertyChangeEvent (this.source, propertyName, oldValue, newValue, index)); -}, "~S,~N,~O,~O"); -Clazz_defineMethod (c$, "fireIndexedPropertyChange", -function (propertyName, index, oldValue, newValue) { -if (oldValue == newValue) { -return; -}this.fireIndexedPropertyChange (propertyName, index, Integer.$valueOf (oldValue), Integer.$valueOf (newValue)); -}, "~S,~N,~N,~N"); -Clazz_defineMethod (c$, "fireIndexedPropertyChange", -function (propertyName, index, oldValue, newValue) { -if (oldValue == newValue) { -return; -}this.fireIndexedPropertyChange (propertyName, index, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); -}, "~S,~N,~B,~B"); -Clazz_defineMethod (c$, "hasListeners", -function (propertyName) { -return this.map.hasListeners (propertyName); -}, "~S"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.beans.PropertyChangeSupport, "PropertyChangeListenerMap", java.beans.ChangeListenerMap); -Clazz_overrideMethod (c$, "newArray", -function (a) { -return (0 < a) ? new Array (a) : java.beans.PropertyChangeSupport.PropertyChangeListenerMap.EMPTY; -}, "~N"); -Clazz_overrideMethod (c$, "newProxy", -function (a, b) { -return new java.beans.PropertyChangeListenerProxy (a, b); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineStatics (c$, -"EMPTY", Clazz_newArray (-1, [])); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.beans"); -Clazz_load (null, "java.beans.ChangeListenerMap", ["java.util.ArrayList", "$.Collections", "$.EventListenerProxy", "$.HashMap"], function () { -c$ = Clazz_decorateAsClass (function () { -this.map = null; -Clazz_instantialize (this, arguments); -}, java.beans, "ChangeListenerMap"); -Clazz_defineMethod (c$, "add", -function (name, listener) { -if (this.map == null) { -this.map = new java.util.HashMap (); -}var array = this.map.get (name); -var size = (array != null) ? array.length : 0; -var clone = this.newArray (size + 1); -clone[size] = listener; -if (array != null) { -System.arraycopy (array, 0, clone, 0, size); -}this.map.put (name, clone); -}, "~S,~O"); -Clazz_defineMethod (c$, "remove", -function (name, listener) { -if (this.map != null) { -var array = this.map.get (name); -if (array != null) { -for (var i = 0; i < array.length; i++) { -if (listener.equals (array[i])) { -var size = array.length - 1; -if (size > 0) { -var clone = this.newArray (size); -System.arraycopy (array, 0, clone, 0, i); -System.arraycopy (array, i + 1, clone, i, size - i); -this.map.put (name, clone); -} else { -this.map.remove (name); -if (this.map.isEmpty ()) { -this.map = null; -}}break; -}} -}}}, "~S,~O"); -Clazz_defineMethod (c$, "get", -function (name) { -return (this.map != null) ? this.map.get (name) : null; -}, "~S"); -Clazz_defineMethod (c$, "set", -function (name, listeners) { -if (listeners != null) { -if (this.map == null) { -this.map = new java.util.HashMap (); -}this.map.put (name, listeners); -} else if (this.map != null) { -this.map.remove (name); -if (this.map.isEmpty ()) { -this.map = null; -}}}, "~S,~A"); -Clazz_defineMethod (c$, "getListeners", -function () { -if (this.map == null) { -return this.newArray (0); -}var list = new java.util.ArrayList (); -var listeners = this.map.get (null); -if (listeners != null) { -for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) { -list.add (listener); -} -}for (var entry, $entry = this.map.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) { -var name = entry.getKey (); -if (name != null) { -for (var listener, $listener = 0, $$listener = entry.getValue (); $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) { -list.add (this.newProxy (name, listener)); -} -}} -return list.toArray (this.newArray (list.size ())); -}); -Clazz_defineMethod (c$, "getListeners", -function (name) { -if (name != null) { -var listeners = this.get (name); -if (listeners != null) { -return listeners.clone (); -}}return this.newArray (0); -}, "~S"); -Clazz_defineMethod (c$, "hasListeners", -function (name) { -if (this.map == null) { -return false; -}var array = this.map.get (null); -return (array != null) || ((name != null) && (null != this.map.get (name))); -}, "~S"); -Clazz_defineMethod (c$, "getEntries", -function () { -return (this.map != null) ? this.map.entrySet () : java.util.Collections.emptySet (); -}); -Clazz_defineMethod (c$, "extract", -function (listener) { -while (Clazz_instanceOf (listener, java.util.EventListenerProxy)) { -var proxy = listener; -listener = proxy.getListener (); -} -return listener; -}, "~O"); -}); -Clazz_declarePackage ("java.beans"); -Clazz_load (["java.beans.PropertyChangeEvent"], "java.beans.IndexedPropertyChangeEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.index = 0; -Clazz_instantialize (this, arguments); -}, java.beans, "IndexedPropertyChangeEvent", java.beans.PropertyChangeEvent); -Clazz_makeConstructor (c$, -function (source, propertyName, oldValue, newValue, index) { -Clazz_superConstructor (this, java.beans.IndexedPropertyChangeEvent, [source, propertyName, oldValue, newValue]); -this.index = index; -}, "~O,~S,~O,~O,~N"); -Clazz_defineMethod (c$, "getIndex", -function () { -return this.index; -}); -}); -Clazz_declarePackage ("java.beans"); -Clazz_load (["java.util.EventObject"], "java.beans.PropertyChangeEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.propertyName = null; -this.newValue = null; -this.oldValue = null; -this.propagationId = null; -Clazz_instantialize (this, arguments); -}, java.beans, "PropertyChangeEvent", java.util.EventObject); -Clazz_makeConstructor (c$, -function (source, propertyName, oldValue, newValue) { -Clazz_superConstructor (this, java.beans.PropertyChangeEvent, [source]); -this.propertyName = propertyName; -this.newValue = newValue; -this.oldValue = oldValue; -}, "~O,~S,~O,~O"); -Clazz_defineMethod (c$, "getPropertyName", -function () { -return this.propertyName; -}); -Clazz_defineMethod (c$, "getNewValue", -function () { -return this.newValue; -}); -Clazz_defineMethod (c$, "getOldValue", -function () { -return this.oldValue; -}); -Clazz_defineMethod (c$, "setPropagationId", -function (propagationId) { -this.propagationId = propagationId; -}, "~O"); -Clazz_defineMethod (c$, "getPropagationId", -function () { -return this.propagationId; -}); -}); -Clazz_declarePackage ("java.beans"); -Clazz_load (["java.util.EventListenerProxy", "java.beans.PropertyChangeListener"], "java.beans.PropertyChangeListenerProxy", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.propertyName = null; -Clazz_instantialize (this, arguments); -}, java.beans, "PropertyChangeListenerProxy", java.util.EventListenerProxy, java.beans.PropertyChangeListener); -Clazz_makeConstructor (c$, -function (propertyName, listener) { -Clazz_superConstructor (this, java.beans.PropertyChangeListenerProxy, [listener]); -this.propertyName = propertyName; -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "propertyChange", -function (evt) { -(this.getListener ()).propertyChange (evt); -}, "java.beans.PropertyChangeEvent"); -Clazz_defineMethod (c$, "getPropertyName", -function () { -return this.propertyName; -}); -}); -Clazz_declarePackage ("java.beans"); -Clazz_load (["java.util.EventListener"], "java.beans.PropertyChangeListener", null, function () { -Clazz_declareInterface (java.beans, "PropertyChangeListener", java.util.EventListener); -}); -Clazz_declarePackage ("java.security"); -Clazz_declareInterface (java.security, "PrivilegedAction"); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -Clazz_instantialize (this, arguments); -}, java.awt, "Point", java.awt.geom.Point2D); -Clazz_makeConstructor (c$, -function () { -this.construct (0, 0); -}); -Clazz_makeConstructor (c$, -function (p) { -this.construct (p.x, p.y); -}, "java.awt.Point"); -Clazz_makeConstructor (c$, -function (x, y) { -Clazz_superConstructor (this, java.awt.Point, []); -this.x = x; -this.y = y; -}, "~N,~N"); -Clazz_overrideMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_overrideMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_defineMethod (c$, "getLocation", -function () { -return new java.awt.Point (this.x, this.y); -}); -Clazz_defineMethod (c$, "setLocation", -function (p) { -this.setLocation (p.x, p.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "setLocation", -function (x, y) { -this.x = Clazz_doubleToInt (Math.floor (x + 0.5)); -this.y = Clazz_doubleToInt (Math.floor (y + 0.5)); -}, "~N,~N"); -Clazz_defineMethod (c$, "move", -function (x, y) { -this.x = x; -this.y = y; -}, "~N,~N"); -Clazz_defineMethod (c$, "translate", -function (dx, dy) { -this.x += dx; -this.y += dy; -}, "~N,~N"); -Clazz_defineMethod (c$, "equals", -function (obj) { -if (Clazz_instanceOf (obj, java.awt.Point)) { -var pt = obj; -return (this.x == pt.x) && (this.y == pt.y); -}return Clazz_superCall (this, java.awt.Point, "equals", [obj]); -}, "~O"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]"; -}); -}); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (["java.lang.StringBuffer", "java.util.Collections", "$.HashMap", "$.IdentityHashMap"], ["jssun.awt.AppContext", "$.MostRecentThreadAppContext", "$.MostRecentKeyValue"], ["java.lang.Thread", "java.util.HashSet", "java.beans.PropertyChangeSupport"], function () { -c$ = Clazz_decorateAsClass (function () { -this.table = null; -this.threadGroup = null; -this.changeSupport = null; -this.$isDisposed = false; -this.mostRecentKeyValue = null; -this.shadowMostRecentKeyValue = null; -Clazz_instantialize (this, arguments); -}, jssun.awt, "AppContext"); -Clazz_prepareFields (c$, function () { -this.table = new java.util.HashMap (); -}); -c$.getAppContexts = Clazz_defineMethod (c$, "getAppContexts", -function () { -return new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ()); -}); -Clazz_defineMethod (c$, "isDisposed", -function () { -return this.$isDisposed; -}); -Clazz_makeConstructor (c$, -function (threadGroup) { -jssun.awt.AppContext.numAppContexts++; -this.threadGroup = threadGroup; -jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this); -}, "ThreadGroup"); -c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", -function () { -var currentThread = Thread.currentThread (); -var appContext = null; -var recent = jssun.awt.AppContext.mostRecentThreadAppContext; -if ((recent != null) && (recent.thread === currentThread)) { -appContext = recent.appContext; -} else { -var currentThreadGroup = currentThread.getThreadGroup (); -var threadGroup = currentThreadGroup; -appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup); -while (appContext == null) { -threadGroup = threadGroup.getParent (); -if (threadGroup == null) { -return null; -}appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup); -} -for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) { -jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext); -} -jssun.awt.AppContext.mostRecentThreadAppContext = new jssun.awt.MostRecentThreadAppContext (currentThread, appContext); -}return appContext; -}); -c$.isMainContext = Clazz_defineMethod (c$, "isMainContext", -function (ctx) { -return false; -}, "jssun.awt.AppContext"); -Clazz_defineMethod (c$, "dispose", -function () { -}); -Clazz_defineMethod (c$, "get", -function (key) { -{ -var recent = this.mostRecentKeyValue; -if ((recent != null) && (recent.key === key)) { -return recent.value; -}var value = this.table.get (key); -if (this.mostRecentKeyValue == null) { -this.mostRecentKeyValue = new jssun.awt.MostRecentKeyValue (key, value); -this.shadowMostRecentKeyValue = new jssun.awt.MostRecentKeyValue (key, value); -} else { -var auxKeyValue = this.mostRecentKeyValue; -this.shadowMostRecentKeyValue.setPair (key, value); -this.mostRecentKeyValue = this.shadowMostRecentKeyValue; -this.shadowMostRecentKeyValue = auxKeyValue; -}return value; -}}, "~O"); -Clazz_defineMethod (c$, "put", -function (key, value) { -{ -var recent = this.mostRecentKeyValue; -if ((recent != null) && (recent.key === key)) recent.value = value; -return this.table.put (key, value); -}}, "~O,~O"); -Clazz_defineMethod (c$, "remove", -function (key) { -{ -var recent = this.mostRecentKeyValue; -if ((recent != null) && (recent.key === key)) recent.value = null; -return this.table.remove (key); -}}, "~O"); -Clazz_defineMethod (c$, "getThreadGroup", -function () { -return this.threadGroup; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]"; -}); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function () { -if (this.changeSupport == null) { -return new Array (0); -}return this.changeSupport.getPropertyChangeListeners (); -}); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (propertyName, listener) { -if (listener == null) { -return; -}if (this.changeSupport == null) { -this.changeSupport = new java.beans.PropertyChangeSupport (this); -}this.changeSupport.addPropertyChangeListener (propertyName, listener); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "removePropertyChangeListener", -function (propertyName, listener) { -if (listener == null || this.changeSupport == null) { -return; -}this.changeSupport.removePropertyChangeListener (propertyName, listener); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function (propertyName) { -if (this.changeSupport == null) { -return new Array (0); -}return this.changeSupport.getPropertyChangeListeners (propertyName); -}, "~S"); -c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY = new StringBuffer ("EventQueue"); -c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ()); -Clazz_defineStatics (c$, -"DISPOSED_PROPERTY_NAME", "disposed", -"GUI_DISPOSED", "guidisposed", -"numAppContexts", 0, -"mostRecentThreadAppContext", null); -c$ = Clazz_decorateAsClass (function () { -this.thread = null; -this.appContext = null; -Clazz_instantialize (this, arguments); -}, jssun.awt, "MostRecentThreadAppContext"); -Clazz_makeConstructor (c$, -function (key, value) { -this.thread = key; -this.appContext = value; -}, "Thread,jssun.awt.AppContext"); -c$ = Clazz_decorateAsClass (function () { -this.key = null; -this.value = null; -Clazz_instantialize (this, arguments); -}, jssun.awt, "MostRecentKeyValue"); -Clazz_makeConstructor (c$, -function (k, v) { -this.key = k; -this.value = v; -}, "~O,~O"); -Clazz_defineMethod (c$, "setPair", -function (k, v) { -this.key = k; -this.value = v; -}, "~O,~O"); -}); -Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){ -c$=Clazz_declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]); -Clazz_makeConstructor(c$, -function(cs){ -if(cs==null){ -throw new NullPointerException(); -} -Clazz_superConstructor(this,StringBuffer,[cs.toString()]); -},"CharSequence"); -Clazz_defineMethod(c$,"append", -function(b){ -return this.append(b?"true":"false"); -},"~B"); -Clazz_defineMethod(c$,"append", -function(ch){ -this.append0(ch); -return this; -},"~N"); -Clazz_defineMethod(c$,"append", -function(d){ -return this.append(Double.toString(d)); -},"~N"); -Clazz_defineMethod(c$,"append", -function(obj){ -if(obj==null){ -this.appendNull(); -}else{ -this.append0(obj.toString()); -}return this; -},"~O"); -Clazz_defineMethod(c$,"append", -function(string){ -this.append0(string); -return this; -},"~S"); -Clazz_defineMethod(c$,"append", -function(sb){ -if(sb==null){ -this.appendNull(); -}else{ -{ -this.append0(sb.getValue(),0,sb.length()); -}}return this; -},"StringBuffer"); -Clazz_defineMethod(c$,"append", -function(chars){ -this.append0(chars); -return this; -},"~A"); -Clazz_defineMethod(c$,"append", -function(chars,start,length){ -this.append0(chars,start,length); -return this; -},"~A,~N,~N"); -Clazz_defineMethod(c$,"append", -function(s){ -if(s==null){ -this.appendNull(); -}else{ -this.append0(s.toString()); -}return this; -},"CharSequence"); -Clazz_defineMethod(c$,"append", -function(s,start,end){ -this.append0(s,start,end); -return this; -},"CharSequence,~N,~N"); -Clazz_defineMethod(c$,"appendCodePoint", -function(codePoint){ -return this.append(Character.toChars(codePoint)); -},"~N"); -Clazz_defineMethod(c$,"$delete", -function(start,end){ -this.delete0(start,end); -return this; -},"~N,~N"); -Clazz_defineMethod(c$,"deleteCharAt", -function(location){ -this.deleteCharAt0(location); -return this; -},"~N"); -Clazz_defineMethod(c$,"insert", -function(index,ch){ -this.insert0(index,ch); -return this; -},"~N,~N"); -Clazz_defineMethod(c$,"insert", -function(index,b){ -return this.insert(index,b?"true":"false"); -},"~N,~B"); -Clazz_defineMethod(c$,"insert", -function(index,i){ -return this.insert(index,Integer.toString(i)); -},"~N,~N"); -Clazz_defineMethod(c$,"insert", -function(index,l){ -return this.insert(index,Long.toString(l)); -},"~N,~N"); -Clazz_defineMethod(c$,"insert", -function(index,d){ -return this.insert(index,Double.toString(d)); -},"~N,~N"); -Clazz_defineMethod(c$,"insert", -function(index,f){ -return this.insert(index,Float.toString(f)); -},"~N,~N"); -Clazz_defineMethod(c$,"insert", -function(index,obj){ -return this.insert(index,obj==null?"null":obj.toString()); -},"~N,~O"); -Clazz_defineMethod(c$,"insert", -function(index,string){ -this.insert0(index,string); -return this; -},"~N,~S"); -Clazz_defineMethod(c$,"insert", -function(index,chars){ -this.insert0(index,chars); -return this; -},"~N,~A"); -Clazz_defineMethod(c$,"insert", -function(index,chars,start,length){ -this.insert0(index,chars,start,length); -return this; -},"~N,~A,~N,~N"); -Clazz_defineMethod(c$,"insert", -function(index,s){ -this.insert0(index,s==null?"null":s.toString()); -return this; -},"~N,CharSequence"); -Clazz_defineMethod(c$,"insert", -function(index,s,start,end){ -this.insert0(index,s,start,end); -return this; -},"~N,CharSequence,~N,~N"); -Clazz_defineMethod(c$,"replace", -function(start,end,string){ -this.replace0(start,end,string); -return this; -},"~N,~N,~S"); -Clazz_defineMethod(c$,"reverse", -function(){ -this.reverse0(); -return this; -}); -Clazz_overrideMethod(c$,"subSequence", -function(start,end){ -return Clazz_superCall(this,StringBuffer,"substring",[start,end]); -},"~N,~N"); -}); -Clazz_load(["java.util.AbstractMap","$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.IdentityHashMap",["java.lang.IllegalArgumentException","$.IllegalStateException","java.util.AbstractCollection","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.NoSuchElementException"],function(){ -c$=Clazz_decorateAsClass(function(){ -this.elementData=null; -this.$size=0; -this.threshold=0; -this.modCount=0; -Clazz_instantialize(this,arguments); -},java.util,"IdentityHashMap",java.util.AbstractMap,[java.util.Map,java.io.Serializable,Cloneable]); -Clazz_makeConstructor(c$, -function(){ -this.construct(21); -}); -Clazz_makeConstructor(c$, -function(maxSize){ -Clazz_superConstructor(this,java.util.IdentityHashMap,[]); -if(maxSize>=0){ -this.$size=0; -this.threshold=this.getThreshold(maxSize); -this.elementData=this.newElementArray(this.computeElementArraySize()); -}else{ -throw new IllegalArgumentException(); -}},"~N"); -Clazz_defineMethod(c$,"getThreshold", -($fz=function(maxSize){ -return maxSize>3?maxSize:3; -},$fz.isPrivate=true,$fz),"~N"); -Clazz_defineMethod(c$,"computeElementArraySize", -($fz=function(){ -return(Math.floor((this.threshold*10000)/7500))*2; -},$fz.isPrivate=true,$fz)); -Clazz_defineMethod(c$,"newElementArray", -($fz=function(s){ -return new Array(s); -},$fz.isPrivate=true,$fz),"~N"); -Clazz_makeConstructor(c$, -function(map){ -this.construct(map.size()<6?11:map.size()*2); -this.putAllImpl(map); -},"java.util.Map"); -Clazz_defineMethod(c$,"massageValue", -($fz=function(value){ -return((value===java.util.IdentityHashMap.NULL_OBJECT)?null:value); -},$fz.isPrivate=true,$fz),"~O"); -Clazz_overrideMethod(c$,"clear", -function(){ -this.$size=0; -for(var i=0;ithis.threshold){ -this.rehash(); -index=this.findIndex(_key,this.elementData); -}this.elementData[index]=_key; -this.elementData[index+1]=null; -}var result=this.elementData[index+1]; -this.elementData[index+1]=_value; -return this.massageValue(result); -},"~O,~O"); -Clazz_overrideMethod(c$,"putAll", -function(map){ -this.putAllImpl(map); -},"java.util.Map"); -Clazz_defineMethod(c$,"rehash", -($fz=function(){ -var newlength=this.elementData.length<<1; -if(newlength==0){ -newlength=1; -}var newData=this.newElementArray(newlength); -for(var i=0;iindex; -if(next= 0) { -return true; -}var owner = this.getOwner_NoClientCode (); -return (owner != null) && owner.isModalExcluded (exclusionType); -}, "java.awt.Dialog.ModalExclusionType"); -Clazz_defineMethod (c$, "updateChildrenBlocking", -function () { -}); -Clazz_defineMethod (c$, "addWindowListener", -function (l) { -if (l == null) { -return; -}this.newEventsOnly = true; -this.windowListener = java.awt.AWTEventMulticaster.add (this.windowListener, l); -}, "java.awt.event.WindowListener"); -Clazz_defineMethod (c$, "addWindowStateListener", -function (l) { -if (l == null) { -return; -}this.windowStateListener = java.awt.AWTEventMulticaster.add (this.windowStateListener, l); -this.newEventsOnly = true; -}, "java.awt.event.WindowStateListener"); -Clazz_defineMethod (c$, "addWindowFocusListener", -function (l) { -if (l == null) { -return; -}this.windowFocusListener = java.awt.AWTEventMulticaster.add (this.windowFocusListener, l); -this.newEventsOnly = true; -}, "java.awt.event.WindowFocusListener"); -Clazz_defineMethod (c$, "removeWindowListener", -function (l) { -if (l == null) { -return; -}this.windowListener = java.awt.AWTEventMulticaster.remove (this.windowListener, l); -}, "java.awt.event.WindowListener"); -Clazz_defineMethod (c$, "removeWindowStateListener", -function (l) { -if (l == null) { -return; -}this.windowStateListener = java.awt.AWTEventMulticaster.remove (this.windowStateListener, l); -}, "java.awt.event.WindowStateListener"); -Clazz_defineMethod (c$, "removeWindowFocusListener", -function (l) { -if (l == null) { -return; -}this.windowFocusListener = java.awt.AWTEventMulticaster.remove (this.windowFocusListener, l); -}, "java.awt.event.WindowFocusListener"); -Clazz_defineMethod (c$, "getWindowListeners", -function () { -return (this.getListeners (java.awt.event.WindowListener)); -}); -Clazz_defineMethod (c$, "getWindowFocusListeners", -function () { -return (this.getListeners (java.awt.event.WindowFocusListener)); -}); -Clazz_defineMethod (c$, "getWindowStateListeners", -function () { -return (this.getListeners (java.awt.event.WindowStateListener)); -}); -Clazz_defineMethod (c$, "getListeners", -function (listenerType) { -var l = null; -if (listenerType === java.awt.event.WindowFocusListener) { -l = this.windowFocusListener; -} else if (listenerType === java.awt.event.WindowStateListener) { -l = this.windowStateListener; -} else if (listenerType === java.awt.event.WindowListener) { -l = this.windowListener; -} else { -return Clazz_superCall (this, java.awt.Window, "getListeners", [listenerType]); -}return java.awt.AWTEventMulticaster.getListeners (l, listenerType); -}, "Class"); -Clazz_defineMethod (c$, "eventEnabled", -function (e) { -switch (e.id) { -case 200: -case 201: -case 202: -case 203: -case 204: -case 205: -case 206: -if ((this.eventMask & 64) != 0 || this.windowListener != null) { -return true; -}return false; -case 207: -case 208: -if ((this.eventMask & 524288) != 0 || this.windowFocusListener != null) { -return true; -}return false; -case 209: -if ((this.eventMask & 262144) != 0 || this.windowStateListener != null) { -return true; -}return false; -default: -break; -} -return Clazz_superCall (this, java.awt.Window, "eventEnabled", [e]); -}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "processEvent", -function (e) { -if (Clazz_instanceOf (e, java.awt.event.WindowEvent)) { -switch (e.getID ()) { -case 200: -case 201: -case 202: -case 203: -case 204: -case 205: -case 206: -this.processWindowEvent (e); -break; -case 207: -case 208: -this.processWindowFocusEvent (e); -break; -case 209: -this.processWindowStateEvent (e); -default: -break; -} -return; -}this.processEventCont (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "processWindowEvent", -function (e) { -var listener = this.windowListener; -if (listener != null) { -switch (e.getID ()) { -case 200: -listener.windowOpened (e); -break; -case 201: -listener.windowClosing (e); -break; -case 202: -listener.windowClosed (e); -break; -case 203: -listener.windowIconified (e); -break; -case 204: -listener.windowDeiconified (e); -break; -case 205: -listener.windowActivated (e); -break; -case 206: -listener.windowDeactivated (e); -break; -default: -break; -} -}}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "processWindowFocusEvent", -function (e) { -var listener = this.windowFocusListener; -if (listener != null) { -switch (e.getID ()) { -case 207: -listener.windowGainedFocus (e); -break; -case 208: -listener.windowLostFocus (e); -break; -default: -break; -} -}}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "processWindowStateEvent", -function (e) { -var listener = this.windowStateListener; -if (listener != null) { -switch (e.getID ()) { -case 209: -listener.windowStateChanged (e); -break; -default: -break; -} -}}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "preProcessKeyEvent", -function (e) { -}, "java.awt.event.KeyEvent"); -Clazz_overrideMethod (c$, "postProcessKeyEvent", -function (e) { -}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "setAlwaysOnTop", -function (alwaysOnTop) { -var oldAlwaysOnTop; -{ -oldAlwaysOnTop = this.alwaysOnTop; -this.alwaysOnTop = alwaysOnTop; -}if (oldAlwaysOnTop != alwaysOnTop) { -if (this.isAlwaysOnTopSupported ()) { -}this.firePropertyChangeBool ("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop); -}}, "~B"); -Clazz_defineMethod (c$, "isAlwaysOnTopSupported", -function () { -return java.awt.Toolkit.getDefaultToolkit ().isAlwaysOnTopSupported (); -}); -Clazz_defineMethod (c$, "isAlwaysOnTop", -function () { -return this.alwaysOnTop; -}); -Clazz_defineMethod (c$, "isActive", -function () { -return false; -}); -Clazz_defineMethod (c$, "isFocused", -function () { -return swingjs.JSToolkit.isFocused (this); -}); -Clazz_overrideMethod (c$, "getFocusTraversalKeys", -function (id) { -return null; -}, "~N"); -Clazz_defineMethod (c$, "setFocusCycleRoot", -function (focusCycleRoot) { -}, "~B"); -Clazz_defineMethod (c$, "isFocusCycleRoot", -function () { -return true; -}); -Clazz_overrideMethod (c$, "getFocusCycleRootAncestor", -function () { -return null; -}); -Clazz_defineMethod (c$, "isFocusableWindow", -function () { -if (!this.getFocusableWindowState ()) { -return false; -}if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) { -return true; -}for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) { -if (Clazz_instanceOf (owner, java.awt.Frame) || Clazz_instanceOf (owner, java.awt.Dialog)) { -return owner.isShowing (); -}} -return false; -}); -Clazz_defineMethod (c$, "getFocusableWindowState", -function () { -return this.focusableWindowState; -}); -Clazz_defineMethod (c$, "setFocusableWindowState", -function (focusableWindowState) { -var oldFocusableWindowState; -{ -oldFocusableWindowState = this.focusableWindowState; -this.focusableWindowState = focusableWindowState; -}this.firePropertyChangeBool ("focusableWindowState", oldFocusableWindowState, focusableWindowState); -if (oldFocusableWindowState && !focusableWindowState && this.isFocused ()) { -for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) { -} -}}, "~B"); -Clazz_defineMethod (c$, "dispatchEventImpl", -function (e) { -if (e.getID () == 101) { -this.invalidate (); -this.validate (); -}Clazz_superCall (this, java.awt.Window, "dispatchEventImpl", [e]); -}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "postEvent", -function (e) { -if (this.handleEvent (e)) { -e.consume (); -return true; -}return false; -}, "java.awt.Event"); -Clazz_defineMethod (c$, "isShowing", -function () { -return this.visible; -}); -Clazz_defineMethod (c$, "applyResourceBundle", -function (rb) { -this.applyComponentOrientation (java.awt.ComponentOrientation.getOrientation (rb)); -}, "java.util.ResourceBundle"); -Clazz_defineMethod (c$, "applyResourceBundle", -function (rbName) { -this.applyResourceBundle (java.util.ResourceBundle.getBundle (rbName)); -}, "~S"); -Clazz_defineMethod (c$, "addOwnedWindow", -function (weakWindow) { -if (weakWindow != null) { -{ -if (!this.ownedWindowList.contains (weakWindow)) { -this.ownedWindowList.addElement (weakWindow); -}}}}, "java.awt.Window"); -Clazz_defineMethod (c$, "removeOwnedWindow", -function (weakWindow) { -if (weakWindow != null) { -this.ownedWindowList.removeElement (weakWindow); -}}, "java.awt.Window"); -Clazz_defineMethod (c$, "connectOwnedWindow", -function (child) { -child.parent = this; -this.addOwnedWindow (child); -}, "java.awt.Window"); -Clazz_defineMethod (c$, "addToWindowList", - function () { -var windowList = this.appContext.get (java.awt.Window); -if (windowList == null) { -windowList = new java.util.Vector (); -this.appContext.put (java.awt.Window, windowList); -}windowList.add (this); -}); -c$.removeFromWindowList = Clazz_defineMethod (c$, "removeFromWindowList", - function (context, w) { -{ -var windowList = context.get (java.awt.Window); -if (windowList != null) { -windowList.remove (w); -}}}, "jssun.awt.AppContext,java.awt.Window"); -Clazz_defineMethod (c$, "getGraphicsConfiguration", -function () { -if (this.graphicsConfig == null) this.graphicsConfig = swingjs.JSToolkit.getGraphicsConfiguration (); -return this.graphicsConfig; -}); -Clazz_overrideMethod (c$, "resetGC", -function () { -}); -Clazz_defineMethod (c$, "setLocationRelativeTo", -function (c) { -var root = null; -if (c != null) { -if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) { -root = c; -} else { -var parent; -for (parent = c.getParent (); parent != null; parent = parent.getParent ()) { -if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) { -root = parent; -break; -}} -}}if ((c != null && !c.isShowing ()) || root == null || !root.isShowing ()) { -var paneSize = this.getSize (); -var centerPoint = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getCenterPoint (); -this.setLocation (centerPoint.x - Clazz_doubleToInt (paneSize.width / 2), centerPoint.y - Clazz_doubleToInt (paneSize.height / 2)); -} else { -var invokerSize = c.getSize (); -var invokerScreenLocation = c.getLocationOnScreen (); -var windowBounds = this.getBounds (); -var dx = invokerScreenLocation.x + ((invokerSize.width - windowBounds.width) >> 1); -var dy = invokerScreenLocation.y + ((invokerSize.height - windowBounds.height) >> 1); -var ss = root.getGraphicsConfiguration ().getBounds (); -if (dy + windowBounds.height > ss.y + ss.height) { -dy = ss.y + ss.height - windowBounds.height; -if (invokerScreenLocation.x - ss.x + Clazz_doubleToInt (invokerSize.width / 2) < Clazz_doubleToInt (ss.width / 2)) { -dx = invokerScreenLocation.x + invokerSize.width; -} else { -dx = invokerScreenLocation.x - windowBounds.width; -}}if (dx + windowBounds.width > ss.x + ss.width) { -dx = ss.x + ss.width - windowBounds.width; -}if (dx < ss.x) dx = ss.x; -if (dy < ss.y) dy = ss.y; -this.setLocation (dx, dy); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "deliverMouseWheelToAncestor", -function (e) { -}, "java.awt.event.MouseWheelEvent"); -Clazz_overrideMethod (c$, "dispatchMouseWheelToAncestor", -function (e) { -return false; -}, "java.awt.event.MouseWheelEvent"); -Clazz_defineMethod (c$, "getTemporaryLostComponent", -function () { -return this.temporaryLostComponent; -}); -Clazz_defineMethod (c$, "setTemporaryLostComponent", -function (component) { -var previousComp = this.temporaryLostComponent; -if (component == null || component.canBeFocusOwner ()) { -this.temporaryLostComponent = component; -} else { -this.temporaryLostComponent = null; -}return previousComp; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "canContainFocusOwner", -function (focusOwnerCandidate) { -return Clazz_superCall (this, java.awt.Window, "canContainFocusOwner", [focusOwnerCandidate]) && this.isFocusableWindow (); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "setBounds", -function (r) { -this.setBounds (r.x, r.y, r.width, r.height); -}, "java.awt.Rectangle"); -Clazz_overrideMethod (c$, "isRecursivelyVisible", -function () { -return this.visible; -}); -Clazz_defineMethod (c$, "getOpacity", -function () { -{ -return this.opacity; -}}); -Clazz_defineMethod (c$, "setOpacity", -function (opacity) { -{ -if (opacity < 0.0 || opacity > 1.0) { -throw new IllegalArgumentException ("The value of opacity should be in the range [0.0f .. 1.0f]."); -}this.opacity = opacity; -}}, "~N"); -Clazz_defineMethod (c$, "getShape", -function () { -{ -return this.shape; -}}); -Clazz_defineMethod (c$, "setShape", -function (shape) { -{ -this.shape = shape; -}}, "java.awt.Shape"); -Clazz_defineMethod (c$, "setOpaque", -function (opaque) { -{ -java.awt.Window.setLayersOpaque (this, opaque); -this.opaque = opaque; -var peer = this.getPeer (); -if (peer != null) { -peer.setOpaque (opaque); -}}}, "~B"); -c$.setLayersOpaque = Clazz_defineMethod (c$, "setLayersOpaque", - function (component, isOpaque) { -if (Clazz_instanceOf (component, javax.swing.RootPaneContainer)) { -var rpc = component; -var root = rpc.getRootPane (); -var lp = root.getLayeredPane (); -var c = root.getContentPane (); -var content = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null; -lp.setOpaque (isOpaque); -root.setOpaque (isOpaque); -root.setDoubleBuffered (isOpaque); -if (content != null) { -content.setOpaque (isOpaque); -content.setDoubleBuffered (isOpaque); -var numChildren = content.getComponentCount (); -if (numChildren > 0) { -var child = content.getComponent (0); -if (Clazz_instanceOf (child, javax.swing.RootPaneContainer)) { -java.awt.Window.setLayersOpaque (child, isOpaque); -}}}}var bg = component.getBackground (); -var hasTransparentBg = java.awt.Window.TRANSPARENT_BACKGROUND_COLOR.equals (bg); -var container = null; -if (Clazz_instanceOf (component, java.awt.Container)) { -container = component; -}if (isOpaque) { -if (hasTransparentBg) { -var newColor = null; -if (container != null && container.preserveBackgroundColor != null) { -newColor = container.preserveBackgroundColor; -} else { -newColor = new java.awt.Color (255, 255, 255); -}component.setBackground (newColor); -}} else { -if (!hasTransparentBg && container != null) { -container.preserveBackgroundColor = bg; -}component.setBackground (java.awt.Window.TRANSPARENT_BACKGROUND_COLOR); -}}, "java.awt.Component,~B"); -Clazz_overrideMethod (c$, "getContainer", -function () { -return null; -}); -Clazz_overrideMethod (c$, "mixOnReshaping", -function () { -}); -Clazz_overrideMethod (c$, "getLocationOnWindow", -function () { -return new java.awt.Point (0, 0); -}); -c$.$Window$1DisposeAction$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -Clazz_instantialize (this, arguments); -}, java.awt, "Window$1DisposeAction", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -var a; -{ -a = new Array (this.b$["java.awt.Window"].ownedWindowList.size ()); -this.b$["java.awt.Window"].ownedWindowList.copyInto (a); -}for (var b = 0; b < a.length; b++) { -var c = (((a[b]))); -if (c != null) { -c.disposeImpl (); -}} -this.b$["java.awt.Window"].hide (); -this.b$["java.awt.Window"].beforeFirstShow = true; -this.b$["java.awt.Window"].removeNotify (); -this.b$["java.awt.Window"].clearCurrentFocusCycleRootOnHide (); -}); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"systemSyncLWRequests", false, -"OPENED", 0x01, -"base", "win", -"nameCounter", 0); -c$.allWindows = c$.prototype.allWindows = new java.util.ArrayList (); -c$.TRANSPARENT_BACKGROUND_COLOR = c$.prototype.TRANSPARENT_BACKGROUND_COLOR = new java.awt.Color (0, 0, 0, 0); -c$ = Clazz_decorateAsClass (function () { -this.focusRoot = null; -this.focusOwner = null; -Clazz_instantialize (this, arguments); -}, java.awt, "FocusManager"); -}); -Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.Vector",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringBuffer","java.lang.reflect.Array","java.util.Arrays","$.Collections","$.Enumeration","$.NoSuchElementException"],function(){ -c$=Clazz_decorateAsClass(function(){ -this.elementCount=0; -this.elementData=null; -this.capacityIncrement=0; -Clazz_instantialize(this,arguments); -},java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]); -Clazz_makeConstructor(c$, -function(){ -this.construct(10,0); -}); -Clazz_makeConstructor(c$, -function(capacity){ -this.construct(capacity,0); -},"~N"); -Clazz_makeConstructor(c$, -function(capacity,capacityIncrement){ -Clazz_superConstructor(this,java.util.Vector,[]); -this.elementCount=0; -try{ -this.elementData=this.newElementArray(capacity); -}catch(e){ -if(Clazz_instanceOf(e,NegativeArraySizeException)){ -throw new IllegalArgumentException(); -}else{ -throw e; -} -} -this.capacityIncrement=capacityIncrement; -},"~N,~N"); -Clazz_makeConstructor(c$, -function(collection){ -this.construct(collection.size(),0); -var it=collection.iterator(); -while(it.hasNext()){ -this.elementData[this.elementCount++]=it.next(); -} -},"java.util.Collection"); -Clazz_defineMethod(c$,"newElementArray", -($fz=function(size){ -return new Array(size); -},$fz.isPrivate=true,$fz),"~N"); -Clazz_defineMethod(c$,"add", -function(location,object){ -this.insertElementAt(object,location); -},"~N,~O"); -Clazz_defineMethod(c$,"add", -function(object){ -this.addElement(object); -return true; -},"~O"); -Clazz_defineMethod(c$,"addAll", -function(location,collection){ -if(0<=location&&location<=this.elementCount){ -var size=collection.size(); -if(size==0){ -return false; -}var required=size-(this.elementData.length-this.elementCount); -if(required>0){ -this.growBy(required); -}var count=this.elementCount-location; -if(count>0){ -System.arraycopy(this.elementData,location,this.elementData,location+size,count); -}var it=collection.iterator(); -while(it.hasNext()){ -this.elementData[location++]=it.next(); -} -this.elementCount+=size; -this.modCount++; -return true; -}throw new ArrayIndexOutOfBoundsException(location); -},"~N,java.util.Collection"); -Clazz_defineMethod(c$,"addAll", -function(collection){ -return this.addAll(this.elementCount,collection); -},"java.util.Collection"); -Clazz_defineMethod(c$,"addElement", -function(object){ -if(this.elementCount==this.elementData.length){ -this.growByOne(); -}this.elementData[this.elementCount++]=object; -this.modCount++; -},"~O"); -Clazz_defineMethod(c$,"capacity", -function(){ -return this.elementData.length; -}); -Clazz_overrideMethod(c$,"clear", -function(){ -this.removeAllElements(); -}); -Clazz_defineMethod(c$,"clone", -function(){ -try{ -var vector=Clazz_superCall(this,java.util.Vector,"clone",[]); -vector.elementData=this.elementData.clone(); -return vector; -}catch(e){ -if(Clazz_instanceOf(e,CloneNotSupportedException)){ -return null; -}else{ -throw e; -} -} -}); -Clazz_overrideMethod(c$,"contains", -function(object){ -return this.indexOf(object,0)!=-1; -},"~O"); -Clazz_defineMethod(c$,"copyInto", -function(elements){ -System.arraycopy(this.elementData,0,elements,0,this.elementCount); -},"~A"); -Clazz_defineMethod(c$,"elementAt", -function(location){ -if(locationnext?minimumCapacity:next); -}},"~N"); -Clazz_overrideMethod(c$,"equals", -function(object){ -if(this===object){ -return true; -}if(Clazz_instanceOf(object,java.util.List)){ -var list=object; -if(list.size()!=this.size()){ -return false; -}var index=0; -var it=list.iterator(); -while(it.hasNext()){ -var e1=this.elementData[index++]; -var e2=it.next(); -if(!(e1==null?e2==null:e1.equals(e2))){ -return false; -}} -return true; -}return false; -},"~O"); -Clazz_defineMethod(c$,"firstElement", -function(){ -if(this.elementCount>0){ -return this.elementData[0]; -}throw new java.util.NoSuchElementException(); -}); -Clazz_overrideMethod(c$,"get", -function(location){ -return this.elementAt(location); -},"~N"); -Clazz_defineMethod(c$,"grow", -($fz=function(newCapacity){ -var newData=this.newElementArray(newCapacity); -System.arraycopy(this.elementData,0,newData,0,this.elementCount); -this.elementData=newData; -},$fz.isPrivate=true,$fz),"~N"); -Clazz_defineMethod(c$,"growByOne", -($fz=function(){ -var adding=0; -if(this.capacityIncrement<=0){ -if((adding=this.elementData.length)==0){ -adding=1; -}}else{ -adding=this.capacityIncrement; -}var newData=this.newElementArray(this.elementData.length+adding); -System.arraycopy(this.elementData,0,newData,0,this.elementCount); -this.elementData=newData; -},$fz.isPrivate=true,$fz)); -Clazz_defineMethod(c$,"growBy", -($fz=function(required){ -var adding=0; -if(this.capacityIncrement<=0){ -if((adding=this.elementData.length)==0){ -adding=required; -}while(adding0){ -System.arraycopy(this.elementData,location,this.elementData,location+1,count); -}this.elementData[location]=object; -this.elementCount++; -this.modCount++; -}else{ -throw new ArrayIndexOutOfBoundsException(location); -}},"~O,~N"); -Clazz_overrideMethod(c$,"isEmpty", -function(){ -return this.elementCount==0; -}); -Clazz_defineMethod(c$,"lastElement", -function(){ -try{ -return this.elementData[this.elementCount-1]; -}catch(e){ -if(Clazz_instanceOf(e,IndexOutOfBoundsException)){ -throw new java.util.NoSuchElementException(); -}else{ -throw e; -} -} -}); -Clazz_defineMethod(c$,"lastIndexOf", -function(object){ -return this.lastIndexOf(object,this.elementCount-1); -},"~O"); -Clazz_defineMethod(c$,"lastIndexOf", -function(object,location){ -if(location=0;i--){ -if(object.equals(this.elementData[i])){ -return i; -}} -}else{ -for(var i=location;i>=0;i--){ -if(this.elementData[i]==null){ -return i; -}} -}return-1; -}throw new ArrayIndexOutOfBoundsException(location); -},"~O,~N"); -Clazz_defineMethod(c$,"remove", -function(location){ -if(location0){ -System.arraycopy(this.elementData,location+1,this.elementData,location,size); -}this.elementData[this.elementCount]=null; -this.modCount++; -return result; -}throw new ArrayIndexOutOfBoundsException(location); -},"~N"); -Clazz_defineMethod(c$,"remove", -function(object){ -return this.removeElement(object); -},"~O"); -Clazz_defineMethod(c$,"removeAllElements", -function(){ -java.util.Arrays.fill(this.elementData,0,this.elementCount,null); -this.modCount++; -this.elementCount=0; -}); -Clazz_defineMethod(c$,"removeElement", -function(object){ -var index; -if((index=this.indexOf(object,0))==-1){ -return false; -}this.removeElementAt(index); -return true; -},"~O"); -Clazz_defineMethod(c$,"removeElementAt", -function(location){ -if(0<=location&&location0){ -System.arraycopy(this.elementData,location+1,this.elementData,location,size); -}this.elementData[this.elementCount]=null; -this.modCount++; -}else{ -throw new ArrayIndexOutOfBoundsException(location); -}},"~N"); -Clazz_overrideMethod(c$,"removeRange", -function(start,end){ -if(start>=0&&start<=end&&end<=this.size()){ -if(start==end){ -return; -}if(end!=this.elementCount){ -System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end); -var newCount=this.elementCount-(end-start); -java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null); -this.elementCount=newCount; -}else{ -java.util.Arrays.fill(this.elementData,start,this.elementCount,null); -this.elementCount=start; -}this.modCount++; -}else{ -throw new IndexOutOfBoundsException(); -}},"~N,~N"); -Clazz_overrideMethod(c$,"set", -function(location,object){ -if(locationlength){ -java.util.Arrays.fill(this.elementData,length,this.elementCount,null); -}this.elementCount=length; -this.modCount++; -},"~N"); -Clazz_overrideMethod(c$,"size", -function(){ -return this.elementCount; -}); -Clazz_overrideMethod(c$,"subList", -function(start,end){ -return new java.util.Collections.SynchronizedRandomAccessList(Clazz_superCall(this,java.util.Vector,"subList",[start,end]),this); -},"~N,~N"); -Clazz_defineMethod(c$,"toArray", -function(){ -var result=new Array(this.elementCount); -System.arraycopy(this.elementData,0,result,0,this.elementCount); -return result; -}); -Clazz_defineMethod(c$,"toArray", -function(contents){ -if(this.elementCount>contents.length){ -var ct=contents.getClass().getComponentType(); -contents=java.lang.reflect.Array.newInstance(ct,this.elementCount); -}System.arraycopy(this.elementData,0,contents,0,this.elementCount); -if(this.elementCount 255) { -rangeError = true; -badComponentString = badComponentString + " Alpha"; -}if (r < 0 || r > 255) { -rangeError = true; -badComponentString = badComponentString + " Red"; -}if (g < 0 || g > 255) { -rangeError = true; -badComponentString = badComponentString + " Green"; -}if (b < 0 || b > 255) { -rangeError = true; -badComponentString = badComponentString + " Blue"; -}if (rangeError == true) { -throw new IllegalArgumentException ("Color parameter outside of expected range:" + badComponentString); -}}, "~N,~N,~N,~N"); -Clazz_makeConstructor (c$, -function () { -{ -var a = arguments; -switch(a.length) { -case 0: -break; -case 1: -this.value = (a[0].value ? a[0].value : 0xff000000 | a[0]); -break; -case 2: -this.value = (a[1] ? a[0] : 0xff000000 | a[0]); -break; -case 3: -var n = a[0] + a[1] + a[2]; -if (n > 0 && n < 3.01) -this.setFloat(a[0], a[1], a[2], 1); -else -this.setColor4(a[0], a[1], a[2], 255); -break; -case 4: -var n = a[0] + a[1] + a[2] + a[3]; -if (n > 0 && n < 3.01) -this.setFloat(a[0], a[1], a[2], a[3]); -else -this.setColor4(a[0], a[1], a[2], a[3]); -break; -} -return this; -}}); -Clazz_defineMethod (c$, "setColor4", - function (r, g, b, a) { -this.value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0); -java.awt.Color.testColorValueRange (r, g, b, a); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setFloat", - function (r, g, b, f) { -this.setColor4 (Clazz_doubleToInt (r * 255 + 0.5), Clazz_doubleToInt (g * 255 + 0.5), Clazz_doubleToInt (b * 255 + 0.5), Clazz_doubleToInt (f * 255 + 0.5)); -this.frgbvalue = Clazz_newFloatArray (3, 0); -this.frgbvalue[0] = r; -this.frgbvalue[1] = g; -this.frgbvalue[2] = b; -this.falpha = f; -}, "~N,~N,~N,~N"); -c$.getColorF4 = Clazz_defineMethod (c$, "getColorF4", -function (r, g, b, a) { -var c = new java.awt.Color (); -c.setFloat (r, g, b, a); -return c; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getRed", -function () { -return (this.getRGB () >> 16) & 0xFF; -}); -Clazz_defineMethod (c$, "getGreen", -function () { -return (this.getRGB () >> 8) & 0xFF; -}); -Clazz_defineMethod (c$, "getBlue", -function () { -return (this.getRGB () >> 0) & 0xFF; -}); -Clazz_defineMethod (c$, "getAlpha", -function () { -return (this.getRGB () >> 24) & 0xff; -}); -Clazz_defineMethod (c$, "getRGB", -function () { -return this.value; -}); -Clazz_defineMethod (c$, "brighter", -function () { -var r = this.getRed (); -var g = this.getGreen (); -var b = this.getBlue (); -var i = Clazz_doubleToInt (3.333333333333333); -if (r == 0 && g == 0 && b == 0) { -return new java.awt.Color (i, i, i); -}if (r > 0 && r < i) r = i; -if (g > 0 && g < i) g = i; -if (b > 0 && b < i) b = i; -return new java.awt.Color (Math.min (Clazz_doubleToInt (r / 0.7), 255), Math.min (Clazz_doubleToInt (g / 0.7), 255), Math.min (Clazz_doubleToInt (b / 0.7), 255)); -}); -Clazz_defineMethod (c$, "darker", -function () { -return new java.awt.Color (Math.max (Clazz_doubleToInt (this.getRed () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getGreen () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getBlue () * 0.7), 0)); -}); -Clazz_overrideMethod (c$, "hashCode", -function () { -return this.value; -}); -Clazz_overrideMethod (c$, "equals", -function (obj) { -return Clazz_instanceOf (obj, java.awt.Color) && (obj).getRGB () == this.getRGB (); -}, "~O"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[r=" + this.getRed () + ",g=" + this.getGreen () + ",b=" + this.getBlue () + "]"; -}); -c$.decode = Clazz_defineMethod (c$, "decode", -function (nm) { -var intval = Integer.decode (nm); -var i = intval.intValue (); -return new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); -}, "~S"); -c$.getColor = Clazz_defineMethod (c$, "getColor", -function (nm) { -return java.awt.Color.getColor (nm, null); -}, "~S"); -c$.getColor = Clazz_defineMethod (c$, "getColor", -function (nm, v) { -var intval = Integer.getInteger (nm); -if (intval == null) { -return v; -}var i = intval.intValue (); -return new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); -}, "~S,java.awt.Color"); -c$.getColor = Clazz_defineMethod (c$, "getColor", -function (nm, v) { -var intval = Integer.getInteger (nm); -var i = (intval != null) ? intval.intValue () : v; -return new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, (i >> 0) & 0xFF); -}, "~S,~N"); -c$.HSBtoRGB = Clazz_defineMethod (c$, "HSBtoRGB", -function (hue, saturation, brightness) { -var r = 0; -var g = 0; -var b = 0; -if (saturation == 0) { -r = g = b = Clazz_floatToInt (brightness * 255.0 + 0.5); -} else { -var h = (hue - Math.floor (hue)) * 6.0; -var f = h - java.lang.Math.floor (h); -var p = brightness * (1.0 - saturation); -var q = brightness * (1.0 - saturation * f); -var t = brightness * (1.0 - (saturation * (1.0 - f))); -switch (Clazz_floatToInt (h)) { -case 0: -r = Clazz_floatToInt (brightness * 255.0 + 0.5); -g = Clazz_floatToInt (t * 255.0 + 0.5); -b = Clazz_floatToInt (p * 255.0 + 0.5); -break; -case 1: -r = Clazz_floatToInt (q * 255.0 + 0.5); -g = Clazz_floatToInt (brightness * 255.0 + 0.5); -b = Clazz_floatToInt (p * 255.0 + 0.5); -break; -case 2: -r = Clazz_floatToInt (p * 255.0 + 0.5); -g = Clazz_floatToInt (brightness * 255.0 + 0.5); -b = Clazz_floatToInt (t * 255.0 + 0.5); -break; -case 3: -r = Clazz_floatToInt (p * 255.0 + 0.5); -g = Clazz_floatToInt (q * 255.0 + 0.5); -b = Clazz_floatToInt (brightness * 255.0 + 0.5); -break; -case 4: -r = Clazz_floatToInt (t * 255.0 + 0.5); -g = Clazz_floatToInt (p * 255.0 + 0.5); -b = Clazz_floatToInt (brightness * 255.0 + 0.5); -break; -case 5: -r = Clazz_floatToInt (brightness * 255.0 + 0.5); -g = Clazz_floatToInt (p * 255.0 + 0.5); -b = Clazz_floatToInt (q * 255.0 + 0.5); -break; -} -}return 0xff000000 | (r << 16) | (g << 8) | (b << 0); -}, "~N,~N,~N"); -c$.RGBtoHSB = Clazz_defineMethod (c$, "RGBtoHSB", -function (r, g, b, hsbvals) { -var hue; -var saturation; -var brightness; -if (hsbvals == null) { -hsbvals = Clazz_newFloatArray (3, 0); -}var cmax = (r > g) ? r : g; -if (b > cmax) cmax = b; -var cmin = (r < g) ? r : g; -if (b < cmin) cmin = b; -brightness = (cmax) / 255.0; -if (cmax != 0) saturation = ((cmax - cmin)) / (cmax); - else saturation = 0; -if (saturation == 0) hue = 0; - else { -var redc = ((cmax - r)) / ((cmax - cmin)); -var greenc = ((cmax - g)) / ((cmax - cmin)); -var bluec = ((cmax - b)) / ((cmax - cmin)); -if (r == cmax) hue = bluec - greenc; - else if (g == cmax) hue = 2.0 + redc - bluec; - else hue = 4.0 + greenc - redc; -hue = hue / 6.0; -if (hue < 0) hue = hue + 1.0; -}hsbvals[0] = hue; -hsbvals[1] = saturation; -hsbvals[2] = brightness; -return hsbvals; -}, "~N,~N,~N,~A"); -c$.getHSBColor = Clazz_defineMethod (c$, "getHSBColor", -function (h, s, b) { -return new java.awt.Color (java.awt.Color.HSBtoRGB (h, s, b)); -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "getRGBComponents", -function (compArray) { -var f; -if (compArray == null) { -f = Clazz_newFloatArray (4, 0); -} else { -f = compArray; -}if (this.frgbvalue == null) { -f[0] = (this.getRed ()) / 255; -f[1] = (this.getGreen ()) / 255; -f[2] = (this.getBlue ()) / 255; -f[3] = (this.getAlpha ()) / 255; -} else { -f[0] = this.frgbvalue[0]; -f[1] = this.frgbvalue[1]; -f[2] = this.frgbvalue[2]; -f[3] = this.falpha; -}return f; -}, "~A"); -Clazz_defineMethod (c$, "getRGBColorComponents", -function (compArray) { -var f; -if (compArray == null) { -f = Clazz_newFloatArray (3, 0); -} else { -f = compArray; -}if (this.frgbvalue == null) { -f[0] = (this.getRed ()) / 255; -f[1] = (this.getGreen ()) / 255; -f[2] = (this.getBlue ()) / 255; -} else { -f[0] = this.frgbvalue[0]; -f[1] = this.frgbvalue[1]; -f[2] = this.frgbvalue[2]; -}return f; -}, "~A"); -Clazz_overrideMethod (c$, "createContext", -function (cm, r, r2d, xform, hints) { -if (this.context == null || this.context.getRGB () != this.getRGB ()) { -this.context = new java.awt.ColorPaintContext (this.getRGB (), cm); -}return this.context; -}, "java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints"); -Clazz_overrideMethod (c$, "getTransparency", -function () { -var alpha = this.getAlpha (); -if (alpha == 0xff) { -return 1; -} else if (alpha == 0) { -return 2; -} else { -return 3; -}}); -c$.white = c$.prototype.white = new java.awt.Color (255, 255, 255); -c$.WHITE = c$.prototype.WHITE = java.awt.Color.white; -c$.lightGray = c$.prototype.lightGray = new java.awt.Color (192, 192, 192); -c$.LIGHT_GRAY = c$.prototype.LIGHT_GRAY = java.awt.Color.lightGray; -c$.gray = c$.prototype.gray = new java.awt.Color (128, 128, 128); -c$.GRAY = c$.prototype.GRAY = java.awt.Color.gray; -c$.darkGray = c$.prototype.darkGray = new java.awt.Color (64, 64, 64); -c$.DARK_GRAY = c$.prototype.DARK_GRAY = java.awt.Color.darkGray; -c$.black = c$.prototype.black = new java.awt.Color (0, 0, 0); -c$.BLACK = c$.prototype.BLACK = java.awt.Color.black; -c$.red = c$.prototype.red = new java.awt.Color (255, 0, 0); -c$.RED = c$.prototype.RED = java.awt.Color.red; -c$.pink = c$.prototype.pink = new java.awt.Color (255, 175, 175); -c$.PINK = c$.prototype.PINK = java.awt.Color.pink; -c$.orange = c$.prototype.orange = new java.awt.Color (255, 200, 0); -c$.ORANGE = c$.prototype.ORANGE = java.awt.Color.orange; -c$.yellow = c$.prototype.yellow = new java.awt.Color (255, 255, 0); -c$.YELLOW = c$.prototype.YELLOW = java.awt.Color.yellow; -c$.green = c$.prototype.green = new java.awt.Color (0, 255, 0); -c$.GREEN = c$.prototype.GREEN = java.awt.Color.green; -c$.magenta = c$.prototype.magenta = new java.awt.Color (255, 0, 255); -c$.MAGENTA = c$.prototype.MAGENTA = java.awt.Color.magenta; -c$.cyan = c$.prototype.cyan = new java.awt.Color (0, 255, 255); -c$.CYAN = c$.prototype.CYAN = java.awt.Color.cyan; -c$.blue = c$.prototype.blue = new java.awt.Color (0, 0, 255); -c$.BLUE = c$.prototype.BLUE = java.awt.Color.blue; -Clazz_defineStatics (c$, -"FACTOR", 0.7); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.Transparency"], "java.awt.Paint", null, function () { -Clazz_declareInterface (java.awt, "Paint", java.awt.Transparency); -}); -Clazz_declarePackage ("java.awt"); -c$ = Clazz_declareInterface (java.awt, "Transparency"); -Clazz_defineStatics (c$, -"OPAQUE", 1, -"BITMASK", 2, -"TRANSLUCENT", 3); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.PaintContext"], "java.awt.ColorPaintContext", ["java.awt.image.ColorModel"], function () { -c$ = Clazz_decorateAsClass (function () { -this.color = 0; -Clazz_instantialize (this, arguments); -}, java.awt, "ColorPaintContext", null, java.awt.PaintContext); -Clazz_makeConstructor (c$, -function (color, cm) { -this.color = color; -}, "~N,java.awt.image.ColorModel"); -Clazz_overrideMethod (c$, "dispose", -function () { -}); -Clazz_defineMethod (c$, "getRGB", -function () { -return this.color; -}); -Clazz_overrideMethod (c$, "getColorModel", -function () { -return java.awt.image.ColorModel.getRGBdefault (); -}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_declareInterface (java.awt, "PaintContext"); -Clazz_declarePackage ("java.awt.image"); -Clazz_load (["java.awt.Transparency", "java.awt.color.ColorSpace"], "java.awt.image.ColorModel", ["java.lang.IllegalArgumentException", "$.NullPointerException", "$.UnsupportedOperationException", "JU.AU"], function () { -c$ = Clazz_decorateAsClass (function () { -this.pixel_bits = 0; -this.nBits = null; -this.transparency = 3; -this.supportsAlpha = true; -this.$isAlphaPremultiplied = false; -this.numComponents = -1; -this.numColorComponents = -1; -this.colorSpace = null; -this.colorSpaceType = 5; -this.maxBits = 0; -this.is_sRGB = true; -this.transferType = 0; -Clazz_instantialize (this, arguments); -}, java.awt.image, "ColorModel", null, java.awt.Transparency); -Clazz_prepareFields (c$, function () { -this.colorSpace = java.awt.color.ColorSpace.getInstance (1000); -}); -c$.getRGBdefault = Clazz_defineMethod (c$, "getRGBdefault", -function () { -if (java.awt.image.ColorModel.RGBdefault == null) { -java.awt.image.ColorModel.RGBdefault = new java.awt.image.DirectColorModel (32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000); -}return java.awt.image.ColorModel.RGBdefault; -}); -Clazz_makeConstructor (c$, -function (bits) { -this.pixel_bits = bits; -if (bits < 1) { -throw new IllegalArgumentException ("Number of bits must be > 0"); -}this.numComponents = 4; -this.numColorComponents = 3; -this.maxBits = bits; -this.transferType = java.awt.image.ColorModel.getDefaultTransferType (bits); -}, "~N"); -Clazz_makeConstructor (c$, -function (pixel_bits, bits, cspace, hasAlpha, isAlphaPremultiplied, transparency, transferType) { -this.colorSpace = cspace; -this.colorSpaceType = cspace.getType (); -this.numColorComponents = cspace.getNumComponents (); -this.numComponents = this.numColorComponents + (hasAlpha ? 1 : 0); -this.supportsAlpha = hasAlpha; -if (bits.length < this.numComponents) { -throw new IllegalArgumentException ("Number of color/alpha components should be " + this.numComponents + " but length of bits array is " + bits.length); -}if (transparency < 1 || transparency > 3) { -throw new IllegalArgumentException ("Unknown transparency: " + transparency); -}if (this.supportsAlpha == false) { -this.$isAlphaPremultiplied = false; -this.transparency = 1; -} else { -this.$isAlphaPremultiplied = isAlphaPremultiplied; -this.transparency = transparency; -}this.nBits = bits.clone (); -this.pixel_bits = pixel_bits; -if (pixel_bits <= 0) { -throw new IllegalArgumentException ("Number of pixel bits must be > 0"); -}this.maxBits = 0; -for (var i = 0; i < bits.length; i++) { -if (bits[i] < 0) { -throw new IllegalArgumentException ("Number of bits must be >= 0"); -}if (this.maxBits < bits[i]) { -this.maxBits = bits[i]; -}} -if (this.maxBits == 0) { -throw new IllegalArgumentException ("There must be at least one component with > 0 pixel bits."); -}if (cspace !== java.awt.color.ColorSpace.getInstance (1000)) { -this.is_sRGB = false; -}this.transferType = transferType; -}, "~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N"); -Clazz_defineMethod (c$, "hasAlpha", -function () { -return this.supportsAlpha; -}); -Clazz_defineMethod (c$, "isAlphaPremultiplied", -function () { -return this.$isAlphaPremultiplied; -}); -Clazz_defineMethod (c$, "getTransferType", -function () { -return this.transferType; -}); -Clazz_defineMethod (c$, "getPixelSize", -function () { -return this.pixel_bits; -}); -Clazz_defineMethod (c$, "getComponentSize", -function (componentIdx) { -if (this.nBits == null) { -throw new NullPointerException ("Number of bits array is null."); -}return this.nBits[componentIdx]; -}, "~N"); -Clazz_defineMethod (c$, "getComponentSize", -function () { -if (this.nBits != null) { -return this.nBits.clone (); -}return null; -}); -Clazz_overrideMethod (c$, "getTransparency", -function () { -return this.transparency; -}); -Clazz_defineMethod (c$, "getNumComponents", -function () { -return this.numComponents; -}); -Clazz_defineMethod (c$, "getNumColorComponents", -function () { -return this.numColorComponents; -}); -Clazz_defineMethod (c$, "getRGB", -function (pixel) { -return (this.getAlpha (pixel) << 24) | (this.getRed (pixel) << 16) | (this.getGreen (pixel) << 8) | (this.getBlue (pixel) << 0); -}, "~N"); -Clazz_defineMethod (c$, "getRed", -function (inData) { -var pixel = 0; -var length = 0; -var idata = inData; -pixel = idata[0]; -length = idata.length; -if (length == 1) { -return this.getRed (pixel); -} else { -throw new UnsupportedOperationException ("This method is not supported by this color model"); -}}, "~O"); -Clazz_defineMethod (c$, "getGreen", -function (inData) { -var pixel = 0; -var length = 0; -var idata = inData; -pixel = idata[0]; -length = idata.length; -if (length == 1) { -return this.getGreen (pixel); -} else { -throw new UnsupportedOperationException ("This method is not supported by this color model"); -}}, "~O"); -Clazz_defineMethod (c$, "getBlue", -function (inData) { -var pixel = 0; -var length = 0; -var idata = inData; -pixel = idata[0]; -length = idata.length; -if (length == 1) { -return this.getBlue (pixel); -} else { -throw new UnsupportedOperationException ("This method is not supported by this color model"); -}}, "~O"); -Clazz_defineMethod (c$, "getAlpha", -function (inData) { -var pixel = 0; -var length = 0; -var idata = inData; -pixel = idata[0]; -length = idata.length; -if (length == 1) { -return this.getAlpha (pixel); -} else { -throw new UnsupportedOperationException ("This method is not supported by this color model"); -}}, "~O"); -Clazz_defineMethod (c$, "getRGB", -function (inData) { -return (this.getAlpha (inData) << 24) | (this.getRed (inData) << 16) | (this.getGreen (inData) << 8) | (this.getBlue (inData) << 0); -}, "~O"); -Clazz_defineMethod (c$, "getDataElements", -function (rgb, pixel) { -throw new UnsupportedOperationException ("This method is not supported by this color model."); -}, "~N,~O"); -Clazz_defineMethod (c$, "getComponents", -function (pixel, components, offset) { -throw new UnsupportedOperationException ("This method is not supported by this color model."); -}, "~N,~A,~N"); -Clazz_defineMethod (c$, "getComponents", -function (pixel, components, offset) { -throw new UnsupportedOperationException ("This method is not supported by this color model."); -}, "~O,~A,~N"); -Clazz_defineMethod (c$, "getUnnormalizedComponents", -function (normComponents, normOffset, components, offset) { -if (this.colorSpace == null) { -throw new UnsupportedOperationException ("This method is not supported by this color model."); -}if (this.nBits == null) { -throw new UnsupportedOperationException ("This method is not supported. Unable to determine #bits per component."); -}if ((normComponents.length - normOffset) < this.numComponents) { -throw new IllegalArgumentException ("Incorrect number of components. Expecting " + this.numComponents); -}if (components == null) { -components = Clazz_newIntArray (offset + this.numComponents, 0); -}if (this.supportsAlpha && this.$isAlphaPremultiplied) { -var normAlpha = normComponents[normOffset + this.numColorComponents]; -for (var i = 0; i < this.numColorComponents; i++) { -components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) * normAlpha + 0.5); -} -components[offset + this.numColorComponents] = Clazz_floatToInt (normAlpha * ((1 << this.nBits[this.numColorComponents]) - 1) + 0.5); -} else { -for (var i = 0; i < this.numComponents; i++) { -components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) + 0.5); -} -}return components; -}, "~A,~N,~A,~N"); -Clazz_defineMethod (c$, "getNormalizedComponents", -function (components, offset, normComponents, normOffset) { -if (this.colorSpace == null) { -throw new UnsupportedOperationException ("This method is not supported by this color model."); -}if (this.nBits == null) { -throw new UnsupportedOperationException ("This method is not supported. Unable to determine #bits per component."); -}if ((components.length - offset) < this.numComponents) { -throw new IllegalArgumentException ("Incorrect number of components. Expecting " + this.numComponents); -}if (normComponents == null) { -normComponents = Clazz_newFloatArray (this.numComponents + normOffset, 0); -}if (this.supportsAlpha && this.$isAlphaPremultiplied) { -var normAlpha = components[offset + this.numColorComponents]; -normAlpha /= ((1 << this.nBits[this.numColorComponents]) - 1); -if (normAlpha != 0.0) { -for (var i = 0; i < this.numColorComponents; i++) { -normComponents[normOffset + i] = (components[offset + i]) / (normAlpha * (((1 << this.nBits[i]) - 1))); -} -} else { -for (var i = 0; i < this.numColorComponents; i++) { -normComponents[normOffset + i] = 0.0; -} -}normComponents[normOffset + this.numColorComponents] = normAlpha; -} else { -for (var i = 0; i < this.numComponents; i++) { -normComponents[normOffset + i] = (components[offset + i]) / (((1 << this.nBits[i]) - 1)); -} -}return normComponents; -}, "~A,~N,~A,~N"); -Clazz_defineMethod (c$, "getDataElement", -function (components, offset) { -return this.getDataElementInt (components, offset); -}, "~A,~N"); -Clazz_defineMethod (c$, "getDataElementInt", -function (components, offset) { -throw new UnsupportedOperationException ("This method is not supported by this color model."); -}, "~A,~N"); -Clazz_defineMethod (c$, "getDataElement", -function (normComponents, normOffset) { -if (JU.AU.isAI (normComponents)) { -var ints = normComponents; -return this.getDataElementInt (ints, normOffset); -}var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0); -return this.getDataElement (components, 0); -}, "~A,~N"); -Clazz_defineMethod (c$, "getDataElements", -function (normComponents, normOffset, obj) { -var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0); -return this.getDataElements (components, 0, obj); -}, "~A,~N,~O"); -Clazz_defineMethod (c$, "getNormalizedComponents", -function (pixel, normComponents, normOffset) { -var components = this.getComponents (pixel, null, 0); -return this.getNormalizedComponents (components, 0, normComponents, normOffset); -}, "~O,~A,~N"); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (!(Clazz_instanceOf (obj, java.awt.image.ColorModel))) { -return false; -}var cm = obj; -if (this === cm) { -return true; -}if (this.supportsAlpha != cm.hasAlpha () || this.$isAlphaPremultiplied != cm.isAlphaPremultiplied () || this.pixel_bits != cm.getPixelSize () || this.transparency != cm.getTransparency () || this.numComponents != cm.getNumComponents ()) { -return false; -}var nb = cm.getComponentSize (); -if ((this.nBits != null) && (nb != null)) { -for (var i = 0; i < this.numComponents; i++) { -if (this.nBits[i] != nb[i]) { -return false; -}} -} else { -return ((this.nBits == null) && (nb == null)); -}return true; -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -var result = 0; -result = (this.supportsAlpha ? 2 : 3) + (this.$isAlphaPremultiplied ? 4 : 5) + this.pixel_bits * 6 + this.transparency * 7 + this.numComponents * 8; -if (this.nBits != null) { -for (var i = 0; i < this.numComponents; i++) { -result = result + this.nBits[i] * (i + 9); -} -}return result; -}); -Clazz_defineMethod (c$, "getColorSpace", -function () { -return this.colorSpace; -}); -Clazz_defineMethod (c$, "isCompatibleRaster", -function (raster) { -throw new UnsupportedOperationException ("This method has not been implemented for this ColorModel."); -}, "java.awt.image.Raster"); -Clazz_defineMethod (c$, "createCompatibleWritableRaster", -function (w, h) { -throw new UnsupportedOperationException ("This method is not supported by this color model"); -}, "~N,~N"); -Clazz_defineMethod (c$, "createCompatibleSampleModel", -function (w, h) { -throw new UnsupportedOperationException ("This method is not supported by this color model"); -}, "~N,~N"); -Clazz_defineMethod (c$, "isCompatibleSampleModel", -function (sm) { -throw new UnsupportedOperationException ("This method is not supported by this color model"); -}, "java.awt.image.SampleModel"); -Clazz_overrideMethod (c$, "finalize", -function () { -}); -Clazz_defineMethod (c$, "getAlphaRaster", -function (raster) { -return null; -}, "java.awt.image.WritableRaster"); -Clazz_overrideMethod (c$, "toString", -function () { -return String.instantialize ("ColorModel: #pixelBits = " + this.pixel_bits + " numComponents = " + this.numComponents + " color space = " + this.colorSpace + " transparency = " + this.transparency + " has alpha = " + this.supportsAlpha + " isAlphaPre = " + this.$isAlphaPremultiplied); -}); -c$.getDefaultTransferType = Clazz_defineMethod (c$, "getDefaultTransferType", -function (pixel_bits) { -if (pixel_bits <= 8) { -return 0; -}return 3; -}, "~N"); -c$.isLinearRGBspace = Clazz_defineMethod (c$, "isLinearRGBspace", -function (cs) { -return false; -}, "java.awt.color.ColorSpace"); -c$.isLinearGRAYspace = Clazz_defineMethod (c$, "isLinearGRAYspace", -function (cs) { -return false; -}, "java.awt.color.ColorSpace"); -Clazz_defineStatics (c$, -"RGBdefault", null, -"l8Tos8", null, -"s8Tol8", null, -"l16Tos8", null, -"s8Tol16", null, -"g8Tos8Map", null, -"lg16Toog8Map", null, -"g16Tos8Map", null, -"lg16Toog16Map", null); -}); -Clazz_declarePackage ("java.awt.color"); -Clazz_load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.type = 0; -this.numComponents = 0; -this.compName = null; -Clazz_instantialize (this, arguments); -}, java.awt.color, "ColorSpace"); -Clazz_makeConstructor (c$, -function (type, numcomponents) { -this.type = type; -this.numComponents = numcomponents; -}, "~N,~N"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function (colorspace) { -var theColorSpace; -switch (colorspace) { -default: -case 1000: -if (java.awt.color.ColorSpace.sRGBspace == null) { -java.awt.color.ColorSpace.sRGBspace = new java.awt.color.ColorSpace (5, 3); -}theColorSpace = java.awt.color.ColorSpace.sRGBspace; -break; -} -return theColorSpace; -}, "~N"); -Clazz_defineMethod (c$, "isCS_sRGB", -function () { -return (this === java.awt.color.ColorSpace.sRGBspace); -}); -Clazz_defineMethod (c$, "toRGB", -function (colorvalue) { -return colorvalue; -}, "~A"); -Clazz_defineMethod (c$, "fromRGB", -function (rgbvalue) { -return rgbvalue; -}, "~A"); -Clazz_defineMethod (c$, "getType", -function () { -return this.type; -}); -Clazz_defineMethod (c$, "getNumComponents", -function () { -return this.numComponents; -}); -Clazz_defineMethod (c$, "getName", -function (idx) { -if ((idx < 0) || (idx > this.numComponents - 1)) { -throw new IllegalArgumentException ("Component index out of range: " + idx); -}if (this.compName == null) { -switch (this.type) { -case 0: -this.compName = Clazz_newArray (-1, ["X", "Y", "Z"]); -break; -case 1: -this.compName = Clazz_newArray (-1, ["L", "a", "b"]); -break; -case 2: -this.compName = Clazz_newArray (-1, ["L", "u", "v"]); -break; -case 3: -this.compName = Clazz_newArray (-1, ["Y", "Cb", "Cr"]); -break; -case 4: -this.compName = Clazz_newArray (-1, ["Y", "x", "y"]); -break; -case 5: -this.compName = Clazz_newArray (-1, ["Red", "Green", "Blue"]); -break; -case 6: -this.compName = Clazz_newArray (-1, ["Gray"]); -break; -case 7: -this.compName = Clazz_newArray (-1, ["Hue", "Saturation", "Value"]); -break; -case 8: -this.compName = Clazz_newArray (-1, ["Hue", "Lightness", "Saturation"]); -break; -case 9: -this.compName = Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]); -break; -case 11: -this.compName = Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow"]); -break; -default: -var tmp = new Array (this.numComponents); -for (var i = 0; i < tmp.length; i++) { -tmp[i] = "Unnamed color component(" + i + ")"; -} -this.compName = tmp; -} -}return this.compName[idx]; -}, "~N"); -Clazz_defineMethod (c$, "getMinValue", -function (component) { -if ((component < 0) || (component > this.numComponents - 1)) { -throw new IllegalArgumentException ("Component index out of range: " + component); -}return 0.0; -}, "~N"); -Clazz_defineMethod (c$, "getMaxValue", -function (component) { -if ((component < 0) || (component > this.numComponents - 1)) { -throw new IllegalArgumentException ("Component index out of range: " + component); -}return 1.0; -}, "~N"); -Clazz_defineStatics (c$, -"sRGBspace", null, -"TYPE_XYZ", 0, -"TYPE_Lab", 1, -"TYPE_Luv", 2, -"TYPE_YCbCr", 3, -"TYPE_Yxy", 4, -"TYPE_RGB", 5, -"TYPE_GRAY", 6, -"TYPE_HSV", 7, -"TYPE_HLS", 8, -"TYPE_CMYK", 9, -"TYPE_CMY", 11, -"TYPE_2CLR", 12, -"TYPE_3CLR", 13, -"TYPE_4CLR", 14, -"TYPE_5CLR", 15, -"TYPE_6CLR", 16, -"TYPE_7CLR", 17, -"TYPE_8CLR", 18, -"TYPE_9CLR", 19, -"TYPE_ACLR", 20, -"TYPE_BCLR", 21, -"TYPE_CCLR", 22, -"TYPE_DCLR", 23, -"TYPE_ECLR", 24, -"TYPE_FCLR", 25, -"CS_sRGB", 1000, -"CS_LINEAR_RGB", 1004, -"CS_CIEXYZ", 1001, -"CS_PYCC", 1002, -"CS_GRAY", 1003); -}); -Clazz_declarePackage ("java.util"); -Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () { -c$ = Clazz_decorateAsClass (function () { -this.parent = null; -this.locale = null; -this.expired = false; -this.$keySet = null; -Clazz_instantialize (this, arguments); -}, java.util, "ResourceBundle"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "getString", -function (key) { -return this.getObject (key); -}, "~S"); -Clazz_defineMethod (c$, "getStringArray", -function (key) { -return this.getObject (key); -}, "~S"); -Clazz_defineMethod (c$, "getObject", -function (key) { -var obj = this.handleGetObject (key); -if (obj == null) { -if (this.parent != null) { -obj = this.parent.getObject (key); -}if (obj == null) throw new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key); -}return obj; -}, "~S"); -Clazz_defineMethod (c$, "getLocale", -function () { -return this.locale; -}); -Clazz_defineMethod (c$, "setParent", -function (parent) { -this.parent = parent; -}, "java.util.ResourceBundle"); -c$.getBundle = Clazz_defineMethod (c$, "getBundle", -function (baseName, targetLocale, loader, control) { -var n = 4; -{ -n = arguments.length; -}switch (n) { -case 2: -if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) { -control = targetLocale; -targetLocale = null; -}break; -case 3: -if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) { -control = loader; -loader = null; -}break; -} -if (targetLocale == null) targetLocale = java.util.Locale.getDefault (); -if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); -return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control); -}, "~S,~O,~O,java.util.ResourceBundle.Control"); -c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", - function (baseName, locale, loader, control) { -if (control == null) { -throw new NullPointerException ("ResourceBundle locale or control is null"); -}var cacheKey = new java.util.ResourceBundle.CacheKey (baseName, locale, loader); -var bundle = null; -var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); -if (bundleRef != null) { -bundle = bundleRef; -bundleRef = null; -}if (java.util.ResourceBundle.isValidBundle (bundle)) { -return bundle; -}var formats = control.getFormats (baseName); -var baseBundle = null; -for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) { -var candidateLocales = control.getCandidateLocales (baseName, targetLocale); -bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle); -if (java.util.ResourceBundle.isValidBundle (bundle)) { -var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale); -if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) { -break; -}if (isBaseBundle && baseBundle == null) { -baseBundle = bundle; -}}} -if (bundle == null) { -if (baseBundle == null) { -java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ()); -}bundle = baseBundle; -}return bundle; -}, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control"); -c$.findBundle = Clazz_defineMethod (c$, "findBundle", - function (cacheKey, candidateLocales, formats, index, control, baseBundle) { -var targetLocale = candidateLocales.get (index); -var parent = null; -if (index != candidateLocales.size () - 1) { -parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle); -} else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) { -return baseBundle; -}var expiredBundle = false; -cacheKey.setLocale (targetLocale); -var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control); -if (java.util.ResourceBundle.isValidBundle (bundle)) { -expiredBundle = bundle.expired; -if (!expiredBundle) { -if (bundle.parent === parent) { -return bundle; -}var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); -if (bundleRef != null && bundleRef === bundle) { -java.util.ResourceBundle.cacheList.remove (cacheKey); -}}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) { -var constKey = cacheKey.clone (); -try { -try { -bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle); -if (bundle != null) { -if (bundle.parent == null) { -bundle.setParent (parent); -}bundle.locale = targetLocale; -bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control); -return bundle; -}java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control); -} finally { -} -} finally { -if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) { -Thread.currentThread ().interrupt (); -}} -}return parent; -}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle"); -c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", - function (cacheKey, formats, control, reload) { -var targetLocale = cacheKey.getLocale (); -var bundle = null; -var size = formats.size (); -for (var i = 0; i < size; i++) { -var format = formats.get (i); -try { -bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload); -} catch (e$$) { -if (Clazz_exceptionOf (e$$, LinkageError)) { -var error = e$$; -{ -cacheKey.setCause (error); -} -} else if (Clazz_exceptionOf (e$$, Exception)) { -var cause = e$$; -{ -cacheKey.setCause (cause); -} -} else { -throw e$$; -} -} -if (bundle != null) { -cacheKey.setFormat (format); -bundle.locale = targetLocale; -bundle.expired = false; -break; -}} -return bundle; -}, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B"); -c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", - function (bundle) { -return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE; -}, "java.util.ResourceBundle"); -c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", - function (baseName, locale, cause) { -if (Clazz_instanceOf (cause, java.util.MissingResourceException)) { -cause = null; -}throw new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause); -}, "~S,java.util.Locale,Throwable"); -c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", - function (cacheKey, control) { -var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey); -if (bundleRef == null) { -return null; -}var bundle = bundleRef; -return bundle; -}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control"); -c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", - function (cacheKey, bundle, control) { -var key = cacheKey.clone (); -java.util.ResourceBundle.cacheList.put (key, bundle); -return bundle; -}, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control"); -c$.clearCache = Clazz_defineMethod (c$, "clearCache", -function () { -java.util.ResourceBundle.cacheList.clear (); -}); -Clazz_defineMethod (c$, "containsKey", -function (key) { -if (key == null) { -throw new NullPointerException (); -}for (var rb = this; rb != null; rb = rb.parent) { -if (rb.handleKeySet ().contains (key)) { -return true; -}} -return false; -}, "~S"); -Clazz_defineMethod (c$, "keySet", -function () { -var keys = new java.util.HashSet (); -for (var rb = this; rb != null; rb = rb.parent) { -keys.addAll (rb.handleKeySet ()); -} -return keys; -}); -Clazz_defineMethod (c$, "handleKeySet", -function () { -if (this.$keySet == null) { -{ -if (this.$keySet == null) { -var keys = new java.util.HashSet (); -var enumKeys = this.getKeys (); -while (enumKeys.hasMoreElements ()) { -var key = enumKeys.nextElement (); -if (this.handleGetObject (key) != null) { -keys.add (key); -}} -this.$keySet = keys; -}}}return this.$keySet; -}); -c$.$ResourceBundle$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle); -Clazz_defineMethod (c$, "getKeys", -function () { -return null; -}); -Clazz_defineMethod (c$, "handleGetObject", -function (key) { -return null; -}, "~S"); -Clazz_overrideMethod (c$, "toString", -function () { -return "NONEXISTENT_BUNDLE"; -}); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.name = null; -this.locale = null; -this.format = null; -this.cause = null; -this.hashCodeCache = 0; -Clazz_instantialize (this, arguments); -}, java.util.ResourceBundle, "CacheKey", null, Cloneable); -Clazz_makeConstructor (c$, -function (a, b, c) { -this.name = a; -this.locale = b; -if (this.name != null) this.calculateHashCode (); -}, "~S,java.util.Locale,~O"); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "getLocale", -function () { -return this.locale; -}); -Clazz_defineMethod (c$, "setLocale", -function (a) { -if (!this.locale.equals (a)) { -this.locale = a; -this.calculateHashCode (); -}return this; -}, "java.util.Locale"); -Clazz_overrideMethod (c$, "equals", -function (a) { -if (this === a) { -return true; -}try { -var b = a; -if (this.hashCodeCache != b.hashCodeCache) { -return false; -}if (!this.name.equals (b.name)) { -return false; -}if (!this.locale.equals (b.locale)) { -return false; -}return true; -} catch (e$$) { -if (Clazz_exceptionOf (e$$, NullPointerException)) { -var e = e$$; -{ -} -} else if (Clazz_exceptionOf (e$$, ClassCastException)) { -var e = e$$; -{ -} -} else { -throw e$$; -} -} -return false; -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -return this.hashCodeCache; -}); -Clazz_defineMethod (c$, "calculateHashCode", - function () { -this.hashCodeCache = this.name.hashCode () << 3; -this.hashCodeCache ^= this.locale.hashCode (); -}); -Clazz_defineMethod (c$, "clone", -function () { -try { -var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []); -a.cause = null; -return a; -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_defineMethod (c$, "setFormat", -function (a) { -this.format = a; -}, "~S"); -Clazz_defineMethod (c$, "setCause", - function (a) { -if (this.cause == null) { -this.cause = a; -} else { -if (Clazz_instanceOf (this.cause, ClassNotFoundException)) { -this.cause = a; -}}}, "Throwable"); -Clazz_defineMethod (c$, "getCause", - function () { -return this.cause; -}); -Clazz_overrideMethod (c$, "toString", -function () { -var a = this.locale.toString (); -if (a.length == 0) { -if (this.locale.getVariant ().length != 0) { -a = "__" + this.locale.getVariant (); -} else { -a = "\"\""; -}}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]"; -}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.util.ResourceBundle, "Control"); -Clazz_makeConstructor (c$, -function () { -}); -c$.getControl = Clazz_defineMethod (c$, "getControl", -function (a) { -if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { -return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { -return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { -return java.util.ResourceBundle.Control.INSTANCE; -}throw new IllegalArgumentException (); -}, "java.util.List"); -c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", -function (a) { -if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) { -return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) { -return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK; -}if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) { -return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK; -}throw new IllegalArgumentException (); -}, "java.util.List"); -Clazz_defineMethod (c$, "getFormats", -function (a) { -if (a == null) { -throw new NullPointerException (); -}return java.util.ResourceBundle.Control.FORMAT_DEFAULT; -}, "~S"); -Clazz_defineMethod (c$, "getCandidateLocales", -function (a, b) { -if (a == null) { -throw new NullPointerException (); -}var c = b.getLanguage (); -var d = b.getCountry (); -var e = b.getVariant (); -var f = new java.util.ArrayList (4); -if (e.length > 0) { -f.add (b); -}if (d.length > 0) { -f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, "")); -}if (c.length > 0) { -f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", "")); -}f.add (java.util.Locale.ROOT); -return f; -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "getFallbackLocale", -function (a, b) { -if (a == null) { -throw new NullPointerException (); -}var c = java.util.Locale.getDefault (); -return b.equals (c) ? null : c; -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "newBundle", -function (a, b, c, d, e) { -var f = this.toBundleName (a, b); -var g = null; -if (c.equals ("java.class")) { -g = swingjs.api.Interface.getInstance (f, false); -} else if (c.equals ("java.properties")) { -var h = this.toResourceName0 (f, "properties"); -if (h == null) { -return null; -}var i = swingjs.JSToolkit.getJavaResource (h); -var j = null; -j = (i == null ? null : new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ()))); -if (j != null) { -try { -g = this.newPropertyBundle (j); -} finally { -j.close (); -} -}} else { -throw new IllegalArgumentException ("unknown format: " + c); -}return g; -}, "~S,java.util.Locale,~S,~O,~B"); -Clazz_defineMethod (c$, "newPropertyBundle", - function (a) { -return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a); -}, "java.io.InputStream"); -Clazz_defineMethod (c$, "getTimeToLive", -function (a, b) { -if (a == null || b == null) { -throw new NullPointerException (); -}return -2; -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "toBundleName", -function (a, b) { -if (b === java.util.Locale.ROOT) { -return a; -}var c = b.getLanguage (); -var d = b.getCountry (); -var e = b.getVariant (); -if (c === "" && d === "" && e === "") { -return a; -}var f = new StringBuilder (a); -f.append ('_'); -if (e !== "") { -f.append (c).append ('_').append (d).append ('_').append (e); -} else if (d !== "") { -f.append (c).append ('_').append (d); -} else { -f.append (c); -}return f.toString (); -}, "~S,java.util.Locale"); -Clazz_defineMethod (c$, "toResourceName", -function (a, b) { -var c = new StringBuilder (a.length + 1 + b.length); -c.append (a.$replace ('.', '/')).append ('.').append (b); -return c.toString (); -}, "~S,~S"); -Clazz_defineMethod (c$, "toResourceName0", - function (a, b) { -if (a.contains ("://")) { -return null; -} else { -return this.toResourceName (a, b); -}}, "~S,~S"); -c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"])); -c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"])); -c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"])); -Clazz_defineStatics (c$, -"TTL_DONT_CACHE", -1, -"TTL_NO_EXPIRATION_CONTROL", -2); -c$.INSTANCE = c$.prototype.INSTANCE = new java.util.ResourceBundle.Control (); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.formats = null; -Clazz_instantialize (this, arguments); -}, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []); -this.formats = a; -}, "java.util.List"); -Clazz_overrideMethod (c$, "getFormats", -function (a) { -if (a == null) { -throw new NullPointerException (); -}return this.formats; -}, "~S"); -c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); -c$.CLASS_ONLY = c$.prototype.CLASS_ONLY = new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl); -Clazz_overrideMethod (c$, "getFallbackLocale", -function (a, b) { -if (a == null || b == null) { -throw new NullPointerException (); -}return null; -}, "~S,java.util.Locale"); -c$.NO_FALLBACK = c$.prototype.NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT); -c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES); -c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK = new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"INITIAL_CACHE_SIZE", 32); -c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null)); -c$.cacheList = c$.prototype.cacheList = new java.util.HashMap (32); -}); -Clazz_declarePackage ("java.applet"); -Clazz_load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () { -c$ = Clazz_decorateAsClass (function () { -this.stub = null; -Clazz_instantialize (this, arguments); -}, java.applet, "Applet", java.awt.Panel); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.applet.Applet, []); -this.setPanel (); -}); -Clazz_defineMethod (c$, "setStub", -function (stub) { -this.stub = stub; -}, "java.applet.AppletStub"); -Clazz_defineMethod (c$, "isActive", -function () { -if (this.stub != null) { -return this.stub.isActive (); -} else { -return false; -}}); -Clazz_defineMethod (c$, "getDocumentBase", -function () { -return this.stub.getDocumentBase (); -}); -Clazz_defineMethod (c$, "getCodeBase", -function () { -return this.stub.getCodeBase (); -}); -Clazz_defineMethod (c$, "getParameter", -function (name) { -return this.stub.getParameter (name); -}, "~S"); -Clazz_defineMethod (c$, "getAppletContext", -function () { -return this.stub.getAppletContext (); -}); -Clazz_defineMethod (c$, "resize", -function (width, height) { -var d = this.size (); -if ((d.width != width) || (d.height != height)) { -Clazz_superCall (this, java.applet.Applet, "resize", [width, height]); -if (this.stub != null) { -this.stub.appletResize (width, height); -}}}, "~N,~N"); -Clazz_defineMethod (c$, "resize", -function (d) { -this.resize (d.width, d.height); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "showStatus", -function (msg) { -this.getAppletContext ().showStatus (msg); -}, "~S"); -Clazz_defineMethod (c$, "getImage", -function (url) { -return this.getAppletContext ().getImage (url); -}, "java.net.URL"); -Clazz_defineMethod (c$, "getImage", -function (url, name) { -try { -return this.getImage ( new java.net.URL (url, name)); -} catch (e) { -if (Clazz_exceptionOf (e, java.net.MalformedURLException)) { -return null; -} else { -throw e; -} -} -}, "java.net.URL,~S"); -Clazz_defineMethod (c$, "getAppletInfo", -function () { -return null; -}); -Clazz_defineMethod (c$, "getLocale", -function () { -var locale = Clazz_superCall (this, java.applet.Applet, "getLocale", []); -if (locale == null) { -return java.util.Locale.getDefault (); -}return locale; -}); -Clazz_defineMethod (c$, "getParameterInfo", -function () { -return null; -}); -Clazz_defineMethod (c$, "init", -function () { -}); -Clazz_defineMethod (c$, "start", -function () { -}); -Clazz_defineMethod (c$, "stop", -function () { -}); -Clazz_defineMethod (c$, "destroy", -function () { -}); -}); -Clazz_declarePackage ("java.net"); -Clazz_load (["java.util.Hashtable"], "java.net.URL", ["java.io.IOException", "java.lang.Character", "$.Error", "java.net.MalformedURLException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.protocol = null; -this.host = null; -this.port = -1; -this.file = null; -this.query = null; -this.authority = null; -this.path = null; -this.userInfo = null; -this.ref = null; -this.handler = null; -this.$hashCode = -1; -Clazz_instantialize (this, arguments); -}, java.net, "URL", null, java.io.Serializable); -Clazz_makeConstructor (c$, -function (context, spec, handler) { -{ -switch (arguments.length) { -case 1: -spec = context;context = handler = null; -break; -case 2: -handler = null; -break; -case 3: -if (context == null || Clazz_instanceOf(context, java.net.URL)) -break; -default: -alert("java.net.URL constructor format not supported"); -break; -} -context && context.valueOf && context.valueOf() == null && (context = null); -}var original = spec; -var i; -var limit; -var c; -var start = 0; -var newProtocol = null; -var aRef = false; -var isRelative = false; -try { -limit = spec.length; -while ((limit > 0) && (spec.charAt (limit - 1) <= ' ')) { -limit--; -} -while ((start < limit) && (spec.charAt (start) <= ' ')) { -start++; -} -if (spec.regionMatches (true, start, "url:", 0, 4)) { -start += 4; -}if (start < spec.length && spec.charAt (start) == '#') { -aRef = true; -}for (i = start; !aRef && (i < limit) && ((c = spec.charCodeAt (i)) != 47); i++) { -if (c == 58) { -var s = spec.substring (start, i).toLowerCase (); -if (this.isValidProtocol (s)) { -newProtocol = s; -start = i + 1; -}break; -}} -this.protocol = newProtocol; -if ((context != null) && ((newProtocol == null) || newProtocol.equalsIgnoreCase (context.protocol))) { -if (handler == null) { -handler = context.handler; -}if (context.path != null && context.path.startsWith ("/")) newProtocol = null; -if (newProtocol == null) { -this.protocol = context.protocol; -this.authority = context.authority; -this.userInfo = context.userInfo; -this.host = context.host; -this.port = context.port; -this.file = context.file; -this.path = context.path; -isRelative = true; -}}if (this.protocol == null) { -throw new java.net.MalformedURLException ("no protocol: " + original); -}if (handler == null && (handler = java.net.URL.getURLStreamHandler (this.protocol)) == null) { -throw new java.net.MalformedURLException ("unknown protocol: " + this.protocol); -}this.handler = handler; -i = spec.indexOf ('#', start); -if (i >= 0) { -this.ref = spec.substring (i + 1, limit); -limit = i; -}if (isRelative && start == limit) { -this.query = context.query; -if (this.ref == null) { -this.ref = context.ref; -}}handler.parseURL (this, spec, start, limit); -} catch (e$$) { -if (Clazz_exceptionOf (e$$, java.net.MalformedURLException)) { -var e = e$$; -{ -throw e; -} -} else if (Clazz_exceptionOf (e$$, Exception)) { -var e = e$$; -{ -var exception = new java.net.MalformedURLException (e.getMessage ()); -exception.initCause (e); -throw exception; -} -} else { -throw e$$; -} -} -}, "java.net.URL,~S,java.net.URLStreamHandler"); -Clazz_defineMethod (c$, "isValidProtocol", - function (protocol) { -var len = protocol.length; -if (len < 1) return false; -var c = protocol.charAt (0); -if (!Character.isLetter (c)) return false; -for (var i = 1; i < len; i++) { -c = protocol.charAt (i); -if (!Character.isLetterOrDigit (c) && c != '.' && c != '+' && c != '-') { -return false; -}} -return true; -}, "~S"); -Clazz_defineMethod (c$, "set5", -function (protocol, host, port, file, ref) { -{ -this.protocol = protocol; -this.host = host; -this.authority = port == -1 ? host : host + ":" + port; -this.port = port; -this.file = file; -this.ref = ref; -this.$hashCode = -1; -var q = file.lastIndexOf ('?'); -if (q != -1) { -this.query = file.substring (q + 1); -this.path = file.substring (0, q); -} else this.path = file; -}}, "~S,~S,~N,~S,~S"); -Clazz_defineMethod (c$, "set", -function (protocol, host, port, authority, userInfo, path, query, ref) { -{ -this.protocol = protocol; -this.host = host; -this.port = port; -this.file = query == null ? path : path + "?" + query; -this.userInfo = userInfo; -this.path = path; -this.ref = ref; -this.$hashCode = -1; -this.query = query; -this.authority = authority; -}}, "~S,~S,~N,~S,~S,~S,~S,~S"); -Clazz_defineMethod (c$, "getQuery", -function () { -return this.query; -}); -Clazz_defineMethod (c$, "getPath", -function () { -return this.path; -}); -Clazz_defineMethod (c$, "getUserInfo", -function () { -return this.userInfo; -}); -Clazz_defineMethod (c$, "getAuthority", -function () { -return this.authority; -}); -Clazz_defineMethod (c$, "getPort", -function () { -return this.port; -}); -Clazz_defineMethod (c$, "getDefaultPort", -function () { -return this.handler.getDefaultPort (); -}); -Clazz_defineMethod (c$, "getProtocol", -function () { -return this.protocol; -}); -Clazz_defineMethod (c$, "getHost", -function () { -return this.host; -}); -Clazz_defineMethod (c$, "getFile", -function () { -return this.file; -}); -Clazz_defineMethod (c$, "getRef", -function () { -return this.ref; -}); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (!(Clazz_instanceOf (obj, java.net.URL))) return false; -var u2 = obj; -return this.handler.equals2 (this, u2); -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -if (this.$hashCode != -1) return this.$hashCode; -this.$hashCode = this.handler.hashCode (this); -return this.$hashCode; -}); -Clazz_defineMethod (c$, "sameFile", -function (other) { -return this.handler.sameFile (this, other); -}, "java.net.URL"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.toExternalForm (); -}); -Clazz_defineMethod (c$, "toExternalForm", -function () { -return this.handler.toExternalForm (this); -}); -Clazz_defineMethod (c$, "openConnection", -function () { -return this.handler.openConnection (this); -}); -Clazz_defineMethod (c$, "openStream", -function () { -return this.openConnection ().getInputStream (); -}); -Clazz_defineMethod (c$, "getContent", -function () { -return this.openConnection ().getInputStream (); -}); -c$.setURLStreamHandlerFactory = Clazz_defineMethod (c$, "setURLStreamHandlerFactory", -function (fac) { -{ -if (java.net.URL.factory != null) { -throw new Error ("factory already defined"); -}var security = System.getSecurityManager (); -if (security != null) { -security.checkSetFactory (); -}java.net.URL.handlers.clear (); -java.net.URL.factory = fac; -}}, "java.net.URLStreamHandlerFactory"); -c$.getURLStreamHandler = Clazz_defineMethod (c$, "getURLStreamHandler", -function (protocol) { -var handler = java.net.URL.handlers.get (protocol); -if (handler == null) { -if (java.net.URL.factory != null) { -handler = java.net.URL.factory.createURLStreamHandler (protocol); -}}return handler; -}, "~S"); -Clazz_defineStatics (c$, -"factory", null); -c$.handlers = c$.prototype.handlers = new java.util.Hashtable (); -c$.streamHandlerLock = c$.prototype.streamHandlerLock = new Clazz._O (); -}); - -// modified by Bob Hanson 3/21/2014 6:44:21 AM to reduce this.b$[....] phrases to simply this.h$ -// BH added ability to use a non-Java key for HTML elements, for example. -// BH 8/24/2014 8:48:58 PM all synchronization and inner classes removed - - -Clazz_load([],"java.util.HashtableIterator",[],function(){ -c$=Clazz_decorateAsClass(function(){ -this.position=0; -this.expectedModCount=0; -this.type=null; -this.lastEntry=null; -this.lastPosition=0; -this.canRemove=false; -Clazz_instantialize(this,arguments); -},java.util,"HashtableIterator",null,java.util.Iterator); -Clazz_makeConstructor(c$, -function(a){ -this.type=a; -this.h$ = a.h$; -this.position=this.h$.lastSlot; -this.expectedModCount=this.h$.modCount; -},"java.util.AbstractSet"); -Clazz_overrideMethod(c$,"hasNext", -function(){ -if(this.lastEntry&&this.lastEntry.next){ -return true; -}while(this.position>=this.h$.firstSlot){ -if(this.h$.elementData[this.position]==null){ -this.position--; -}else{ -return true; -}} -return false; -}); -Clazz_overrideMethod(c$,"next", -function(){ -if(this.expectedModCount==this.h$.modCount){ -if(this.lastEntry){ -this.lastEntry=this.lastEntry.next; -}if(this.lastEntry==null){ -while(this.position>=this.h$.firstSlot&&(this.lastEntry=this.h$.elementData[this.position])==null){ -this.position--; -} -if(this.lastEntry){ -this.lastPosition=this.position; -this.position--; -}}if(this.lastEntry){ -this.canRemove=true; -return this.type.get(this.lastEntry); -}throw new java.util.NoSuchElementException(); -}throw new java.util.ConcurrentModificationException(); -}); -Clazz_overrideMethod(c$,"remove", -function(){ -if(this.expectedModCount==this.h$.modCount){ -if(this.canRemove){ -this.canRemove=false; -{ -var a=false; -var b=this.h$.elementData[this.lastPosition]; -if(b===this.lastEntry){ -this.h$.elementData[this.lastPosition]=b.next; -a=true; -}else{ -while(b&&b.next!==this.lastEntry){ -b=b.next; -} -if(b){ -b.next=this.lastEntry.next; -a=true; -}}if(a){ -this.h$.modCount++; -this.h$.elementCount--; -this.expectedModCount++; -return; -}}}else{ -throw new IllegalStateException(); -}}throw new java.util.ConcurrentModificationException(); -}); -}); - - - -//////////////////////////// - - -Clazz_load([],"java.util.HashtableEnumerator",[],function(){ -c$=Clazz_decorateAsClass(function(){ -this.key=false; -this.start=0; -this.entry=null; -Clazz_instantialize(this,arguments); -},java.util,"HashtableEnumerator",null,java.util.Enumeration); - -Clazz_makeConstructor(c$, -function(a, b){ -this.key = a; -this.h$ = b; -if (this.h$)this.start=this.h$.lastSlot+1; -},"~B,java.util.Hashtable"); -Clazz_overrideMethod(c$,"hasMoreElements", -function(){ -if (!this.h$)return false; -if(this.entry)return true; - -while(--this.start>=this.h$.firstSlot){ -if(this.h$.elementData[this.start]){ -this.entry=this.h$.elementData[this.start]; -return true; -}} -return false; -}); -Clazz_overrideMethod(c$,"nextElement", -function(){ -if(this.hasMoreElements()){ -var a=this.key?this.entry.key:this.entry.value; -this.entry=this.entry.next; -return a; -} -throw new java.util.NoSuchElementException(); -}); -}); - -//////////////////////////// - -Clazz_load([],"java.util.HashtableEntrySet",[],function(){ -c$=Clazz_decorateAsClass(function(){ -Clazz_instantialize(this,arguments); -},java.util,"HashtableEntrySet",java.util.AbstractSet); - -Clazz_makeConstructor(c$, -function(a){ -this.h$ = a; -},"java.util.Hashtable"); -Clazz_overrideMethod(c$,"size", -function(){ -return this.h$.elementCount; -}); -Clazz_overrideMethod(c$,"clear", -function(){ -this.h$.clear(); -}); -Clazz_overrideMethod(c$,"remove", -function(object){ -if(this.contains(object)){ -this.h$.remove((object).getKey()); -return true; -}return false; -},"~O"); -Clazz_defineMethod(c$,"contains", -function(object){ -var entry=this.h$.getEntry((object).getKey()); -return object.equals(entry); -},"~O"); - -Clazz_overrideMethod(c$,"get", -function(entry){ -return entry; -},"java.util.MapEntry"); - -Clazz_defineMethod(c$,"iterator", -function(){ -return new java.util.HashtableIterator(this); -}); -}); - - -//////////////////////////// - -Clazz_load([],"java.util.HashtableKeySet",[],function(){ -c$=Clazz_decorateAsClass(function(){ -Clazz_instantialize(this,arguments); -},java.util,"HashtableKeySet",java.util.AbstractSet); - -Clazz_makeConstructor(c$, -function(a){ -this.h$ = a; -},"java.util.Hashtable"); - -Clazz_overrideMethod(c$,"contains", -function(object){ -return this.h$.containsKey(object); -},"~O"); -Clazz_overrideMethod(c$,"size", -function(){ -return this.h$.elementCount; -}); -Clazz_overrideMethod(c$,"clear", -function(){ -this.h$.clear(); -}); -Clazz_overrideMethod(c$,"remove", -function(key){ -if(this.h$.containsKey(key)){ -this.h$.remove(key); -return true; -}return false; -},"~O"); - -Clazz_overrideMethod(c$,"get", -function(entry){ -return entry.key; -},"java.util.MapEntry"); - -Clazz_overrideMethod(c$,"iterator", -function(){ -return new java.util.HashtableIterator(this); -}); -}); - -//////////////////////////// - -Clazz_load([],"java.util.HashtableValueCollection",[],function(){ -c$=Clazz_decorateAsClass(function(){ -Clazz_instantialize(this,arguments); -},java.util,"HashtableValueCollection",null,java.util.AbstractCollection); - -Clazz_makeConstructor(c$, -function(a){ -this.h$ = a; -},"java.util.Hashtable"); -Clazz_overrideMethod(c$,"contains", -function(object){ -return this.h$.contains(object); -},"~O"); -Clazz_overrideMethod(c$,"size", -function(){ -return this.h$.elementCount; -}); -Clazz_overrideMethod(c$,"clear", -function(){ -this.h$.clear(); -}); - -Clazz_overrideMethod(c$,"get", -function(entry){ -return entry.value; -},"java.util.MapEntry"); - -Clazz_overrideMethod(c$,"iterator", -function(){ -return new java.util.HashtableIterator(this); -}); -}); -//////////////////////////// - - -Clazz_load(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){ -c$=Clazz_decorateAsClass(function(){ -this.next=null; -this.hashcode=0; -Clazz_instantialize(this,arguments); -},java.util,"HashtableEntry",java.util.MapEntry); -Clazz_overrideConstructor(c$, -function(a,b){ -this.key = a; -this.value = b; -this.hashcode=a.hashCode(); -}); -Clazz_defineMethod(c$,"clone", -function(){ -var a=Clazz_superCall(this,java.util.HashtableEntry,"clone",[]); -if(this.next!=null){ -a.next=this.next.clone(); -} -return a; -}); -Clazz_overrideMethod(c$,"setValue", -function(a){ -if(a==null){ -throw new NullPointerException(); -}var b=this.value; -this.value=a; -return b; -},"~O"); -Clazz_defineMethod(c$,"getKeyHash", -function(){ -return this.key.hashCode(); -}); -Clazz_defineMethod(c$,"equalsKey", -function(a,b){ -return this.hashcode==(!a.hashCode || a.hashCode())&&this.key.equals(a); -},"~O,~N"); -Clazz_overrideMethod(c$,"toString", -function(){ -return this.key+"="+this.value; -}); -}); - - - -//////////////////////////// - - -Clazz_load(["java.util.Dictionary","$.Enumeration","$.HashtableEnumerator","$.Iterator","$.Map","$.MapEntry","$.NoSuchElementException"],"java.util.Hashtable",["java.lang.IllegalArgumentException","$.IllegalStateException","$.NullPointerException","$.StringBuilder","java.util.AbstractCollection","$.AbstractSet","$.Arrays","$.Collections","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.HashtableEntry"],function(){ -c$=Clazz_decorateAsClass(function(){ -this.elementCount=0; -this.elementData=null; -this.loadFactor=0; -this.threshold=0; -this.firstSlot=0; -this.lastSlot=-1; -this.modCount=0; -Clazz_instantialize(this,arguments); -},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]); -c$.newEntry=Clazz_defineMethod(c$,"newEntry", -($fz=function(key,value,hash){ -return new java.util.HashtableEntry(key,value); -},$fz.isPrivate=true,$fz),"~O,~O,~N"); -Clazz_overrideConstructor(c$, -function(){ -this.elementCount=0; -this.elementData=this.newElementArray(11); -this.firstSlot=this.elementData.length; -this.loadFactor=0.75; -this.computeMaxSize(); -}); -Clazz_defineMethod(c$,"newElementArray", -($fz=function(size){ -return new Array(size); -},$fz.isPrivate=true,$fz),"~N"); -Clazz_overrideMethod(c$,"clear", -function(){ -this.elementCount=0; -for (var i = this.elementData.length; --i >= 0;) - this.elementData[i] = null; -this.modCount++; -}); -Clazz_defineMethod(c$,"clone", -function(){ -try{ -var hashtable=Clazz_superCall(this,java.util.Hashtable,"clone",[]); -hashtable.elementData=this.elementData.clone(); -var entry; -for(var i=this.elementData.length;--i>=0;){ -if((entry=this.elementData[i])){ -hashtable.elementData[i]=entry.clone(); -}} -return hashtable; -}catch(e){ -if(Clazz_instanceOf(e,CloneNotSupportedException)){ -return null; -}else{ -throw e; -} -} -}); -Clazz_defineMethod(c$,"computeMaxSize", -($fz=function(){ -this.threshold=Math.round((this.elementData.length*this.loadFactor)); -},$fz.isPrivate=true,$fz)); -Clazz_defineMethod(c$,"contains", -function(value){ -if(value==null){ -throw new NullPointerException(); -}for(var i=this.elementData.length;--i>=0;){ -var entry=this.elementData[i]; -while(entry){ -if(value.equals(entry.value)){ -return true; -}entry=entry.next; -} -} -return false; -},"~O"); -Clazz_overrideMethod(c$,"containsKey", -function(key){ - if(!key.hashCode) { - key.hashCode = function(){return 1}; - if (!key.equals) - key.equals = function(a) {return this == a}; - } -return this.getEntry(key)!=null ; -},"~O"); -Clazz_overrideMethod(c$,"containsValue", -function(value){ -return this.contains(value); -},"~O"); -Clazz_overrideMethod(c$,"elements", -function(){ -if(this.elementCount==0){ -return java.util.Hashtable.EMPTY_ENUMERATION; -} -return new java.util.HashtableEnumerator(false, this); -}); -Clazz_overrideMethod(c$,"entrySet", -function(){ -return new java.util.HashtableEntrySet(this); -}); -Clazz_overrideMethod(c$,"equals", -function(object){ -if(this===object){ -return true; -}if(Clazz_instanceOf(object,java.util.Map)){ -var map=object; -if(this.size()!=map.size()){ -return false; -}var entries=this.entrySet(); -for(var e,$e=map.entrySet().iterator();$e.hasNext()&&((e=$e.next())||true);){ -if(!entries.contains(e)){ -return false; -}} -return true; -}return false; -},"~O"); -Clazz_overrideMethod(c$,"get", -function(key){ - if(!key.hashCode) { - key.hashCode = function(){return 1}; - if (!key.equals) - key.equals = function(a) {return this == a}; - } -var hash=key.hashCode(); -var index=(hash&0x7FFFFFFF)%this.elementData.length; -var entry=this.elementData[index]; -while(entry){ -if(entry.equalsKey(key,hash)){ -return entry.value; -}entry=entry.next; -} -return null; -},"~O"); -Clazz_defineMethod(c$,"getEntry", -function(key){ -var hash=key.hashCode(); -var index=(hash&0x7FFFFFFF)%this.elementData.length; -var entry=this.elementData[index]; -while(entry){ -if(entry.equalsKey(key,hash)){ -return entry; -}entry=entry.next; -} -return null; -},"~O"); -Clazz_overrideMethod(c$,"hashCode", -function(){ -var result=0; -var it=this.entrySet().iterator(); -while(it.hasNext()){ -var entry=it.next(); -var key=entry.getKey(); -var value=entry.getValue(); -var hash=(key!==this?key.hashCode():0)^(value!==this?(value!=null?value.hashCode():0):0); -result+=hash; -} -return result; -}); -Clazz_overrideMethod(c$,"isEmpty", -function(){ -return this.elementCount==0; -}); -Clazz_overrideMethod(c$,"keys", -function(){ -if(this.elementCount==0){ -return java.util.Hashtable.EMPTY_ENUMERATION; -} -return new java.util.HashtableEnumerator(true, this); -}); -Clazz_overrideMethod(c$,"keySet", -function(){ -return new java.util.HashtableKeySet(this); -}); -Clazz_overrideMethod(c$,"put", -function(key,value){ -if(key!=null&&value!=null){ - if(!key.hashCode) { - key.hashCode = function(){return 1}; - if (!key.equals) - key.equals = function(a) {return this == a}; - } - var hash=key.hashCode(); - var index=(hash&0x7FFFFFFF)%this.elementData.length; - var entry=this.elementData[index]; - while(entry!=null&&!entry.equalsKey(key,hash)){ - entry=entry.next; -} -if(entry==null){ -this.modCount++; -if(++this.elementCount>this.threshold){ -this.rehash(); -index=(hash&0x7FFFFFFF)%this.elementData.length; -}if(indexthis.lastSlot){ -this.lastSlot=index; -} - -entry=java.util.Hashtable.newEntry(key,value,hash); -entry.next=this.elementData[index]; -this.elementData[index]=entry; -return null; -}var result=entry.value; -entry.value=value; -return result; -}throw new NullPointerException(); -},"~O,~O"); -Clazz_overrideMethod(c$,"putAll", -function(map){ -for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){ -this.put(entry.getKey(),entry.getValue()); -} -},"java.util.Map"); - -Clazz_defineMethod(c$,"rehash", -function(){ -var length=(this.elementData.length<<1)+1; -if(length==0){ -length=1; -}var newFirst=length; -var newLast=-1; -var newData=this.newElementArray(length); -for(var i=this.lastSlot+1;--i>=this.firstSlot;){ -var entry=this.elementData[i]; -while(entry!=null){ -var index=(entry.getKeyHash()&0x7FFFFFFF)%length; -if(indexnewLast){ -newLast=index; -}var next=entry.next; -entry.next=newData[index]; -newData[index]=entry; -entry=next; -} -} -this.firstSlot=newFirst; -this.lastSlot=newLast; -this.elementData=newData; -this.computeMaxSize(); -}); -Clazz_overrideMethod(c$,"remove", -function(key){ -var hash=key.hashCode(); -var index=(hash&0x7FFFFFFF)%this.elementData.length; -var last=null; -var entry=this.elementData[index]; -while(entry!=null&&!entry.equalsKey(key,hash)){ -last=entry; -entry=entry.next; -} -if(entry!=null){ -this.modCount++; -if(last==null){ -this.elementData[index]=entry.next; -}else{ -last.next=entry.next; -}this.elementCount--; -var result=entry.value; -entry.value=null; -return result; -}return null; -},"~O"); -Clazz_overrideMethod(c$,"size", -function(){ -return this.elementCount; -}); -Clazz_overrideMethod(c$,"toString", -function(){ -if(this.isEmpty()){ -return"{}"; -}var buffer=new StringBuilder(this.size()*28); -buffer.append('{'); -for(var i=this.lastSlot;i>=this.firstSlot;i--){ -var entry=this.elementData[i]; -while(entry!=null){ -if(entry.key!==this){ -buffer.append(entry.key); -}else{ -buffer.append("(this Map)"); -}buffer.append('='); -if(entry.value!==this){ -buffer.append(entry.value); -}else{ -buffer.append("(this Map)"); -}buffer.append(", "); -entry=entry.next; -} -} -if(this.elementCount>0){ -buffer.setLength(buffer.length()-2); -}buffer.append('}'); -return buffer.toString(); -}); -Clazz_overrideMethod(c$,"values", -function(){ -return new java.util.HashtableValueCollection(this); -}); -java.util.Hashtable.EMPTY_ENUMERATION = new java.util.HashtableEnumerator(); -}); -c$=Clazz_declareType(java.util,"Dictionary"); -Clazz_makeConstructor(c$, -function(){ -}); -Clazz_declarePackage ("java.net"); -Clazz_load (["java.io.IOException"], "java.net.MalformedURLException", null, function () { -c$ = Clazz_declareType (java.net, "MalformedURLException", java.io.IOException); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.net.MalformedURLException, []); -}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (null, "java.awt.GraphicsEnvironment", ["swingjs.JSToolkit"], function () { -c$ = Clazz_declareType (java.awt, "GraphicsEnvironment"); -Clazz_makeConstructor (c$, -function () { -}); -c$.getLocalGraphicsEnvironment = Clazz_defineMethod (c$, "getLocalGraphicsEnvironment", -function () { -if (java.awt.GraphicsEnvironment.localEnv == null) { -java.awt.GraphicsEnvironment.localEnv = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsEnvironment"); -}return java.awt.GraphicsEnvironment.localEnv; -}); -c$.isHeadless = Clazz_defineMethod (c$, "isHeadless", -function () { -return false; -}); -c$.getHeadlessProperty = Clazz_defineMethod (c$, "getHeadlessProperty", - function () { -return false; -}); -c$.checkHeadless = Clazz_defineMethod (c$, "checkHeadless", -function () { -}); -Clazz_defineMethod (c$, "isHeadlessInstance", -function () { -return java.awt.GraphicsEnvironment.getHeadlessProperty (); -}); -Clazz_defineMethod (c$, "registerFont", -function (font) { -return true; -}, "java.awt.Font"); -Clazz_defineMethod (c$, "preferLocaleFonts", -function () { -}); -Clazz_defineMethod (c$, "preferProportionalFonts", -function () { -}); -Clazz_defineMethod (c$, "getCenterPoint", -function () { -return null; -}); -Clazz_defineStatics (c$, -"localEnv", null); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.WindowEvent", ["java.awt.Window", "jssun.awt.AppContext", "$.SunToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.opposite = null; -this.oldState = 0; -this.newState = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "WindowEvent", java.awt.event.ComponentEvent); -Clazz_makeConstructor (c$, -function (source, id, opposite, oldState, newState) { -Clazz_superConstructor (this, java.awt.event.WindowEvent, [source, id]); -this.opposite = opposite; -this.oldState = oldState; -this.newState = newState; -}, "java.awt.Window,~N,java.awt.Window,~N,~N"); -Clazz_makeConstructor (c$, -function (source, id, opposite) { -this.construct (source, id, opposite, 0, 0); -}, "java.awt.Window,~N,java.awt.Window"); -Clazz_makeConstructor (c$, -function (source, id, oldState, newState) { -this.construct (source, id, null, oldState, newState); -}, "java.awt.Window,~N,~N,~N"); -Clazz_makeConstructor (c$, -function (source, id) { -this.construct (source, id, null, 0, 0); -}, "java.awt.Window,~N"); -Clazz_defineMethod (c$, "getWindow", -function () { -return (Clazz_instanceOf (this.source, java.awt.Window)) ? this.source : null; -}); -Clazz_defineMethod (c$, "getOppositeWindow", -function () { -if (this.opposite == null) { -return null; -}return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null; -}); -Clazz_defineMethod (c$, "getOldState", -function () { -return this.oldState; -}); -Clazz_defineMethod (c$, "getNewState", -function () { -return this.newState; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 200: -typeStr = "WINDOW_OPENED"; -break; -case 201: -typeStr = "WINDOW_CLOSING"; -break; -case 202: -typeStr = "WINDOW_CLOSED"; -break; -case 203: -typeStr = "WINDOW_ICONIFIED"; -break; -case 204: -typeStr = "WINDOW_DEICONIFIED"; -break; -case 205: -typeStr = "WINDOW_ACTIVATED"; -break; -case 206: -typeStr = "WINDOW_DEACTIVATED"; -break; -case 207: -typeStr = "WINDOW_GAINED_FOCUS"; -break; -case 208: -typeStr = "WINDOW_LOST_FOCUS"; -break; -case 209: -typeStr = "WINDOW_STATE_CHANGED"; -break; -default: -typeStr = "unknown type"; -} -typeStr += ",opposite=" + this.getOppositeWindow () + ",oldState=" + this.oldState + ",newState=" + this.newState; -return typeStr; -}); -Clazz_defineStatics (c$, -"WINDOW_FIRST", 200, -"WINDOW_OPENED", 200, -"WINDOW_CLOSING", 201, -"WINDOW_CLOSED", 202, -"WINDOW_ICONIFIED", 203, -"WINDOW_DEICONIFIED", 204, -"WINDOW_ACTIVATED", 205, -"WINDOW_DEACTIVATED", 206, -"WINDOW_GAINED_FOCUS", 207, -"WINDOW_LOST_FOCUS", 208, -"WINDOW_STATE_CHANGED", 209, -"WINDOW_LAST", 209); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Container", "javax.swing.Action", "java.util.ArrayList", "javax.swing.SwingUtilities", "javax.swing.event.EventListenerList", "jssun.awt.RequestFocusController"], "javax.swing.JComponent", ["java.lang.IllegalArgumentException", "java.util.HashSet", "$.Hashtable", "java.applet.Applet", "java.awt.Component", "$.Insets", "$.Rectangle", "$.Window", "java.beans.PropertyChangeListener", "java.util.Locale", "javax.swing.ActionMap", "$.AncestorNotifier", "$.ArrayTable", "$.CellRendererPane", "$.ClientPropertyKey", "$.ComponentInputMap", "$.InputMap", "$.JApplet", "$.JDialog", "$.JFrame", "$.JWindow", "$.KeyStroke", "$.KeyboardManager", "javax.swing.Popup.HeavyWeightWindow", "javax.swing.RepaintManager", "javax.swing.border.AbstractBorder", "javax.swing.event.AncestorListener", "jssun.font.FontDesignMetrics", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.isAlignmentXSet = false; -this.alignmentX = 0; -this.isAlignmentYSet = false; -this.alignmentY = 0; -this.ui = null; -this.listenerList = null; -this.clientProperties = null; -this.autoscrolls = false; -this.border = null; -this.flags = 0; -this.verifyInputWhenFocusTarget = true; -this.paintingChild = null; -this.popupMenu = null; -this.focusInputMap = null; -this.ancestorInputMap = null; -this.windowInputMap = null; -this.actionMap = null; -if (!Clazz_isClassDefined ("javax.swing.JComponent.ActionStandin")) { -javax.swing.JComponent.$JComponent$ActionStandin$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "JComponent", java.awt.Container); -Clazz_prepareFields (c$, function () { -this.listenerList = new javax.swing.event.EventListenerList (); -}); -c$.safelyGetGraphics = Clazz_defineMethod (c$, "safelyGetGraphics", -function (c, root) { -{ -javax.swing.JComponent.componentObtainingGraphicsFrom = root; -var g = c.getGraphics (); -javax.swing.JComponent.componentObtainingGraphicsFrom = null; -return g; -}}, "java.awt.Component,java.awt.Component"); -c$.getGraphicsInvoked = Clazz_defineMethod (c$, "getGraphicsInvoked", -function (root) { -if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) { -var rootPane = (root).getRootPane (); -if (rootPane != null) { -rootPane.disableTrueDoubleBuffering (); -}}}, "java.awt.Component"); -c$.isComponentObtainingGraphicsFrom = Clazz_defineMethod (c$, "isComponentObtainingGraphicsFrom", - function (c) { -{ -return (javax.swing.JComponent.componentObtainingGraphicsFrom === c); -}}, "java.awt.Component"); -c$.getManagingFocusForwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusForwardTraversalKeys", -function () { -{ -if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) { -javax.swing.JComponent.managingFocusForwardTraversalKeys = new java.util.HashSet (1); -javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2)); -}}return javax.swing.JComponent.managingFocusForwardTraversalKeys; -}); -c$.getManagingFocusBackwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusBackwardTraversalKeys", -function () { -{ -if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) { -javax.swing.JComponent.managingFocusBackwardTraversalKeys = new java.util.HashSet (1); -javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3)); -}}return javax.swing.JComponent.managingFocusBackwardTraversalKeys; -}); -c$.fetchRectangle = Clazz_defineMethod (c$, "fetchRectangle", - function () { -{ -var rect; -var size = javax.swing.JComponent.tempRectangles.size (); -if (size > 0) { -rect = javax.swing.JComponent.tempRectangles.remove (size - 1); -} else { -rect = new java.awt.Rectangle (0, 0, 0, 0); -}return rect; -}}); -c$.recycleRectangle = Clazz_defineMethod (c$, "recycleRectangle", - function (rect) { -{ -javax.swing.JComponent.tempRectangles.add (rect); -}}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "setInheritsPopupMenu", -function (value) { -var oldValue = this.getFlag (23); -this.setFlag (23, value); -this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value); -}, "~B"); -Clazz_defineMethod (c$, "getInheritsPopupMenu", -function () { -return this.getFlag (23); -}); -Clazz_defineMethod (c$, "setComponentPopupMenu", -function (popup) { -if (popup != null) { -this.enableEvents (16); -}var oldPopup = this.popupMenu; -this.popupMenu = popup; -this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup); -}, "javax.swing.JPopupMenu"); -Clazz_defineMethod (c$, "getComponentPopupMenu", -function () { -if (!this.getInheritsPopupMenu ()) { -return this.popupMenu; -}if (this.popupMenu == null) { -var parent = this.getParent (); -while (parent != null) { -if (Clazz_instanceOf (parent, javax.swing.JComponent)) { -return (parent).getComponentPopupMenu (); -}if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) { -break; -}parent = parent.getParent (); -} -return null; -}return this.popupMenu; -}); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JComponent); -this.enableEvents (8); -Clazz_superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]); -}); -Clazz_defineMethod (c$, "updateUI", -function () { -}); -Clazz_defineMethod (c$, "setUI", -function (newUI) { -this.uninstallUIAndProperties (); -this.ui = newUI; -if (this.ui != null) { -this.ui.installUI (this); -}this.revalidate (); -this.repaint (); -}, "javax.swing.plaf.ComponentUI"); -Clazz_defineMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_defineMethod (c$, "uninstallUIAndProperties", - function () { -if (this.ui != null) { -this.ui.uninstallUI (this); -}}); -Clazz_defineMethod (c$, "getUIClassID", -function () { -return "ComponentUI"; -}); -Clazz_defineMethod (c$, "getComponentGraphics", -function (g) { -var componentGraphics = g; -componentGraphics.setColor (this.getForeground ()); -componentGraphics.setFont (this.getFont ()); -return componentGraphics; -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintComponent", -function (g) { -if (this.ui != null) { -var scratchGraphics = (g == null) ? null : g.createSwingJS (); -try { -this.ui.update (scratchGraphics, this); -} finally { -scratchGraphics.dispose (); -} -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintChildren", -function (g) { -var isJComponent; -var sg = g; -{ -var i = this.getComponentCount () - 1; -if (i < 0) { -return; -}if (this.paintingChild != null && (Clazz_instanceOf (this.paintingChild, javax.swing.JComponent))) { -for (; i >= 0; i--) { -if (this.getComponent (i) === this.paintingChild) { -break; -}} -}var tmpRect = javax.swing.JComponent.fetchRectangle (); -for (; i >= 0; i--) { -var comp = this.getComponent (i); -isJComponent = (Clazz_instanceOf (comp, javax.swing.JComponent)); -if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) { -var cr = comp.getBounds (tmpRect); -var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height); -cg.setColor (comp.getForeground ()); -cg.setFont (comp.getFont ()); -var shouldSetFlagBack = false; -try { -if (isJComponent) { -(comp).paint (cg); -} else { -comp.paint (cg); -}} finally { -cg.dispose (); -if (shouldSetFlagBack) { -(comp).setFlag (1, false); -(comp).setFlag (2, false); -}} -}} -javax.swing.JComponent.recycleRectangle (tmpRect); -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintBorder", -function (g) { -var border = this.getBorder (); -if (border != null) { -border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ()); -}}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "paint", -function (g) { -var shouldClearPaintFlags = false; -if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) { -return; -}var componentGraphics = this.getComponentGraphics (g); -var co = componentGraphics.createSwingJS (); -try { -if (this.getParent () != null && !(Clazz_instanceOf (this.getParent (), javax.swing.JComponent))) { -this.adjustPaintFlags (); -shouldClearPaintFlags = true; -}this.paintComponent (co); -this.paintBorder (co); -this.paintChildren (co); -} finally { -co.dispose (); -if (shouldClearPaintFlags) { -this.setFlag (1, false); -this.setFlag (2, false); -this.setFlag (11, false); -this.setFlag (12, false); -}} -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintForceDoubleBuffered", -function (g) { -var rm = javax.swing.RepaintManager.currentManager (this); -var clip = g.getClipBounds (); -rm.beginPaint (); -this.setFlag (13, true); -try { -rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height); -} finally { -rm.endPaint (); -this.setFlag (13, false); -} -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "isPainting", -function () { -var component = this; -while (component != null) { -if (Clazz_instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) { -return true; -}component = component.getParent (); -} -return false; -}); -Clazz_defineMethod (c$, "adjustPaintFlags", - function () { -var jparent = null; -var parent; -for (parent = this.getParent (); parent != null; parent = parent.getParent ()) { -if (Clazz_instanceOf (parent, javax.swing.JComponent)) { -jparent = parent; -if (jparent.getFlag (1)) this.setFlag (1, true); -if (jparent.getFlag (2)) this.setFlag (2, true); -if (jparent.getFlag (11)) this.setFlag (11, true); -if (jparent.getFlag (12)) this.setFlag (12, true); -break; -}} -}); -Clazz_overrideMethod (c$, "printAll", -function (g) { -this.setFlag (12, true); -try { -this.print (g); -} finally { -this.setFlag (12, false); -} -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "print", -function (g) { -this.setFlag (11, true); -this.firePropertyChangeBool ("paintingForPrint", false, true); -try { -this.paint (g); -} finally { -this.setFlag (11, false); -this.firePropertyChangeBool ("paintingForPrint", true, false); -} -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "printComponent", -function (g) { -this.paintComponent (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "printChildren", -function (g) { -this.paintChildren (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "printBorder", -function (g) { -this.paintBorder (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "isPaintingTile", -function () { -return this.getFlag (2); -}); -Clazz_defineMethod (c$, "isPaintingForPrint", -function () { -return this.getFlag (11); -}); -Clazz_defineMethod (c$, "isManagingFocus", -function () { -return false; -}); -Clazz_defineMethod (c$, "registerNextFocusableComponent", - function () { -this.registerNextFocusableComponent (this.getNextFocusableComponent ()); -}); -Clazz_defineMethod (c$, "registerNextFocusableComponent", - function (nextFocusableComponent) { -if (nextFocusableComponent == null) { -return; -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "deregisterNextFocusableComponent", - function () { -var nextFocusableComponent = this.getNextFocusableComponent (); -if (nextFocusableComponent == null) { -return; -}var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor (); -if (nearestRoot == null) { -return; -}}); -Clazz_defineMethod (c$, "setNextFocusableComponent", -function (aComponent) { -var displayable = this.isDisplayable (); -if (displayable) { -this.deregisterNextFocusableComponent (); -}this.putClientProperty ("nextFocus", aComponent); -if (displayable) { -this.registerNextFocusableComponent (aComponent); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "getNextFocusableComponent", -function () { -return this.getClientProperty ("nextFocus"); -}); -Clazz_defineMethod (c$, "setRequestFocusEnabled", -function (requestFocusEnabled) { -this.setFlag (22, !requestFocusEnabled); -}, "~B"); -Clazz_defineMethod (c$, "isRequestFocusEnabled", -function () { -return !this.getFlag (22); -}); -Clazz_defineMethod (c$, "requestFocus", -function (temporary) { -Clazz_superCall (this, javax.swing.JComponent, "requestFocus", []); -return true; -}, "~B"); -Clazz_defineMethod (c$, "requestFocusInWindow", -function (temporary) { -return Clazz_superCall (this, javax.swing.JComponent, "requestFocusInWindow", []); -}, "~B"); -Clazz_defineMethod (c$, "grabFocus", -function () { -this.requestFocus (); -}); -Clazz_defineMethod (c$, "setVerifyInputWhenFocusTarget", -function (verifyInputWhenFocusTarget) { -var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget; -this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget; -this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget); -}, "~B"); -Clazz_defineMethod (c$, "getVerifyInputWhenFocusTarget", -function () { -return this.verifyInputWhenFocusTarget; -}); -Clazz_overrideMethod (c$, "getFontMetrics", -function (font) { -return jssun.font.FontDesignMetrics.getMetrics (font); -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "getPreferredSize", -function () { -return this.getPrefSizeJComp (); -}); -Clazz_defineMethod (c$, "getPrefSizeJComp", -function () { -var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this)); -return (size == null ? this.preferredSize () : size); -}); -Clazz_defineMethod (c$, "getMaximumSize", -function () { -if (this.isMaximumSizeSet ()) { -return Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []); -}var size = null; -if (this.ui != null) { -size = this.ui.getMaximumSize (this); -}return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []); -}); -Clazz_defineMethod (c$, "getMinimumSize", -function () { -if (this.isMinimumSizeSet ()) { -return Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []); -}var size = null; -if (this.ui != null) { -size = this.ui.getMinimumSize (this); -}return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []); -}); -Clazz_overrideMethod (c$, "contains", -function (x, y) { -return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y); -}, "~N,~N"); -Clazz_defineMethod (c$, "setBorder", -function (border) { -var oldBorder = this.border; -this.border = border; -this.firePropertyChangeObject ("border", oldBorder, border); -if (border !== oldBorder) { -if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) { -this.revalidate (); -}this.repaint (); -}}, "javax.swing.border.Border"); -Clazz_defineMethod (c$, "getBorder", -function () { -return this.border; -}); -Clazz_defineMethod (c$, "getInsets", -function () { -if (this.border != null) { -return this.border.getBorderInsets (this); -}return Clazz_superCall (this, javax.swing.JComponent, "getInsets", []); -}); -Clazz_defineMethod (c$, "getInsets", -function (insets) { -if (insets == null) { -insets = new java.awt.Insets (0, 0, 0, 0); -}if (this.border != null) { -if (Clazz_instanceOf (this.border, javax.swing.border.AbstractBorder)) { -return (this.border).getBorderInsets (this, insets); -} else { -return this.border.getBorderInsets (this); -}} else { -insets.left = insets.top = insets.right = insets.bottom = 0; -return insets; -}}, "java.awt.Insets"); -Clazz_defineMethod (c$, "getAlignmentY", -function () { -if (this.isAlignmentYSet) { -return this.alignmentY; -}return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentY", []); -}); -Clazz_defineMethod (c$, "setAlignmentY", -function (alignmentY) { -this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY; -this.isAlignmentYSet = true; -}, "~N"); -Clazz_defineMethod (c$, "getAlignmentX", -function () { -if (this.isAlignmentXSet) { -return this.alignmentX; -}return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentX", []); -}); -Clazz_defineMethod (c$, "setAlignmentX", -function (alignmentX) { -this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX; -this.isAlignmentXSet = true; -}, "~N"); -Clazz_defineMethod (c$, "setInputVerifier", -function (inputVerifier) { -var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER); -this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier); -this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier); -}, "javax.swing.InputVerifier"); -Clazz_defineMethod (c$, "getInputVerifier", -function () { -return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER); -}); -Clazz_defineMethod (c$, "registerKeyboardAction", -function (anAction, aCommand, aKeyStroke, aCondition) { -var inputMap = this.getInputMap (aCondition, true); -if (inputMap != null) { -var actionMap = this.getActionMap (true); -var action = Clazz_innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand); -inputMap.put (aKeyStroke, action); -if (actionMap != null) { -actionMap.put (action, action); -}}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N"); -Clazz_defineMethod (c$, "registerWithKeyboardManager", - function (onlyIfNew) { -var inputMap = this.getInputMap (2, false); -var strokes; -var registered = this.getClientProperty ("_WhenInFocusedWindow"); -if (inputMap != null) { -strokes = inputMap.allKeys (); -if (strokes != null) { -for (var counter = strokes.length - 1; counter >= 0; counter--) { -if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) { -this.registerWithKeyboardManager (strokes[counter]); -}if (registered != null) { -registered.remove (strokes[counter]); -}} -}} else { -strokes = null; -}if (registered != null && registered.size () > 0) { -var keys = registered.keys (); -while (keys.hasMoreElements ()) { -var ks = keys.nextElement (); -this.unregisterWithKeyboardManager (ks); -} -registered.clear (); -}if (strokes != null && strokes.length > 0) { -if (registered == null) { -registered = new java.util.Hashtable (strokes.length); -this.putClientProperty ("_WhenInFocusedWindow", registered); -}for (var counter = strokes.length - 1; counter >= 0; counter--) { -registered.put (strokes[counter], strokes[counter]); -} -} else { -this.putClientProperty ("_WhenInFocusedWindow", null); -}}, "~B"); -Clazz_defineMethod (c$, "unregisterWithKeyboardManager", - function () { -var registered = this.getClientProperty ("_WhenInFocusedWindow"); -if (registered != null && registered.size () > 0) { -var keys = registered.keys (); -while (keys.hasMoreElements ()) { -var ks = keys.nextElement (); -this.unregisterWithKeyboardManager (ks); -} -}this.putClientProperty ("_WhenInFocusedWindow", null); -}); -Clazz_defineMethod (c$, "componentInputMapChanged", -function (inputMap) { -var km = this.getInputMap (2, false); -while (km !== inputMap && km != null) { -km = km.getParent (); -} -if (km != null) { -this.registerWithKeyboardManager (false); -}}, "javax.swing.ComponentInputMap"); -Clazz_defineMethod (c$, "registerWithKeyboardManager", - function (aKeyStroke) { -javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this); -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "unregisterWithKeyboardManager", - function (aKeyStroke) { -javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this); -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "registerKeyboardAction", -function (anAction, aKeyStroke, aCondition) { -this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition); -}, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N"); -Clazz_defineMethod (c$, "unregisterKeyboardAction", -function (aKeyStroke) { -var am = this.getActionMap (false); -for (var counter = 0; counter < 3; counter++) { -var km = this.getInputMap (counter, false); -if (km != null) { -var actionID = km.get (aKeyStroke); -if (am != null && actionID != null) { -am.remove (actionID); -}km.remove (aKeyStroke); -}} -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "getRegisteredKeyStrokes", -function () { -var counts = Clazz_newIntArray (3, 0); -var strokes = new Array (3); -for (var counter = 0; counter < 3; counter++) { -var km = this.getInputMap (counter, false); -strokes[counter] = (km != null) ? km.allKeys () : null; -counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0; -} -var retValue = new Array (counts[0] + counts[1] + counts[2]); -for (var counter = 0, last = 0; counter < 3; counter++) { -if (counts[counter] > 0) { -System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]); -last += counts[counter]; -}} -return retValue; -}); -Clazz_defineMethod (c$, "getConditionForKeyStroke", -function (aKeyStroke) { -for (var counter = 0; counter < 3; counter++) { -var inputMap = this.getInputMap (counter, false); -if (inputMap != null && inputMap.get (aKeyStroke) != null) { -return counter; -}} -return -1; -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "getActionForKeyStroke", -function (aKeyStroke) { -var am = this.getActionMap (false); -if (am == null) { -return null; -}for (var counter = 0; counter < 3; counter++) { -var inputMap = this.getInputMap (counter, false); -if (inputMap != null) { -var actionBinding = inputMap.get (aKeyStroke); -if (actionBinding != null) { -var action = am.get (actionBinding); -if (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin)) { -return (action).actionListener; -}return action; -}}} -return null; -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "resetKeyboardActions", -function () { -for (var counter = 0; counter < 3; counter++) { -var inputMap = this.getInputMap (counter, false); -if (inputMap != null) { -inputMap.clear (); -}} -var am = this.getActionMap (false); -if (am != null) { -am.clear (); -}}); -Clazz_defineMethod (c$, "setInputMap", -function (condition, map) { -switch (condition) { -case 2: -if (map != null && !(Clazz_instanceOf (map, javax.swing.ComponentInputMap))) { -throw new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap"); -}this.windowInputMap = map; -this.setFlag (7, true); -this.registerWithKeyboardManager (false); -break; -case 1: -this.ancestorInputMap = map; -this.setFlag (6, true); -break; -case 0: -this.focusInputMap = map; -this.setFlag (5, true); -break; -default: -throw new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT"); -} -}, "~N,javax.swing.InputMap"); -Clazz_defineMethod (c$, "getInputMap", -function (condition) { -return this.getInputMap (condition, true); -}, "~N"); -Clazz_defineMethod (c$, "getInputMap", -function () { -return this.getInputMap (0, true); -}); -Clazz_defineMethod (c$, "setActionMap", -function (am) { -this.actionMap = am; -this.setFlag (8, true); -}, "javax.swing.ActionMap"); -Clazz_defineMethod (c$, "getActionMap", -function () { -return this.getActionMap (true); -}); -Clazz_defineMethod (c$, "getInputMap", -function (condition, create) { -switch (condition) { -case 0: -if (this.getFlag (5)) { -return this.focusInputMap; -}if (create) { -var km = new javax.swing.InputMap (); -this.setInputMap (condition, km); -return km; -}break; -case 1: -if (this.getFlag (6)) { -return this.ancestorInputMap; -}if (create) { -var km = new javax.swing.InputMap (); -this.setInputMap (condition, km); -return km; -}break; -case 2: -if (this.getFlag (7)) { -return this.windowInputMap; -}if (create) { -var km = new javax.swing.ComponentInputMap (this); -this.setInputMap (condition, km); -return km; -}break; -default: -throw new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT"); -} -return null; -}, "~N,~B"); -Clazz_defineMethod (c$, "getActionMap", -function (create) { -{ -(arguments.length == 0) && (create = true); -}if (this.getFlag (8)) { -return this.actionMap; -}if (create) { -var am = new javax.swing.ActionMap (); -this.setActionMap (am); -return am; -}return null; -}, "~B"); -Clazz_defineMethod (c$, "getBaseline", -function (width, height) { -Clazz_superCall (this, javax.swing.JComponent, "getBaseline", [width, height]); -if (this.ui != null) { -return this.ui.getBaseline (this, width, height); -}return -1; -}, "~N,~N"); -Clazz_overrideMethod (c$, "getBaselineResizeBehavior", -function () { -if (this.ui != null) { -return this.ui.getBaselineResizeBehavior (this); -}return java.awt.Component.BaselineResizeBehavior.OTHER; -}); -Clazz_defineMethod (c$, "requestDefaultFocus", -function () { -var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor (); -if (nearestRoot == null) { -return false; -}return false; -}); -Clazz_defineMethod (c$, "setVisible", -function (aFlag) { -if (aFlag != this.isVisible ()) { -Clazz_superCall (this, javax.swing.JComponent, "setVisible", [aFlag]); -var parent = this.getParent (); -if (parent != null) { -var r = this.getBounds (); -parent.repaint (r.x, r.y, r.width, r.height); -}this.revalidate (); -}}, "~B"); -Clazz_defineMethod (c$, "setEnabled", -function (enabled) { -var oldEnabled = this.isEnabled (); -Clazz_superCall (this, javax.swing.JComponent, "setEnabled", [enabled]); -this.firePropertyChangeBool ("enabled", oldEnabled, enabled); -if (enabled != oldEnabled) { -this.repaint (); -}}, "~B"); -Clazz_defineMethod (c$, "setForeground", -function (fg) { -var oldFg = this.getForeground (); -Clazz_superCall (this, javax.swing.JComponent, "setForeground", [fg]); -if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) { -this.repaint (); -}}, "java.awt.Color"); -Clazz_defineMethod (c$, "setBackground", -function (bg) { -var oldBg = this.getBackground (); -Clazz_superCall (this, javax.swing.JComponent, "setBackground", [bg]); -if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) { -this.repaint (); -}}, "java.awt.Color"); -Clazz_defineMethod (c$, "setFont", -function (font) { -var oldFont = this.getFont (); -Clazz_superCall (this, javax.swing.JComponent, "setFont", [font]); -if (font !== oldFont) { -this.revalidate (); -this.repaint (); -}}, "java.awt.Font"); -c$.getDefaultLocale = Clazz_defineMethod (c$, "getDefaultLocale", -function () { -var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale"); -if (l == null) { -l = java.util.Locale.getDefault (); -javax.swing.JComponent.setDefaultLocale (l); -}return l; -}); -c$.setDefaultLocale = Clazz_defineMethod (c$, "setDefaultLocale", -function (l) { -javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l); -}, "java.util.Locale"); -Clazz_defineMethod (c$, "processComponentKeyEvent", -function (e) { -}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "processKeyEvent", -function (e) { -var shouldProcessKey; -Clazz_superCall (this, javax.swing.JComponent, "processKeyEvent", [e]); -if (!e.isConsumed ()) { -this.processComponentKeyEvent (e); -}shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e); -if (e.isConsumed ()) { -return; -}if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) { -e.consume (); -}}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "processKeyBinding", -function (ks, e, condition, pressed) { -var map = this.getInputMap (condition, false); -var am = this.getActionMap (false); -if (map != null && am != null && this.isEnabled ()) { -var binding = map.get (ks); -var action = (binding == null) ? null : am.get (binding); -if (action != null) { -return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ()); -}}return false; -}, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B"); -Clazz_defineMethod (c$, "processKeyBindings", -function (e, pressed) { -if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) { -return false; -}var ks; -if (e.getID () == 400) { -ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ()); -} else { -ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true)); -}if (this.processKeyBinding (ks, e, 0, pressed)) return true; -var parent = this; -while (parent != null && !(Clazz_instanceOf (parent, java.awt.Window)) && !(Clazz_instanceOf (parent, java.applet.Applet))) { -if (Clazz_instanceOf (parent, javax.swing.JComponent)) { -if ((parent).processKeyBinding (ks, e, 1, pressed)) return true; -}parent = parent.getParent (); -} -if (parent != null) { -return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed); -}return false; -}, "java.awt.event.KeyEvent,~B"); -c$.processKeyBindingsForAllComponents = Clazz_defineMethod (c$, "processKeyBindingsForAllComponents", -function (e, container, pressed) { -while (true) { -if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) { -return true; -}if (Clazz_instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) { -container = (container).getOwner (); -} else { -return false; -}} -}, "java.awt.event.KeyEvent,java.awt.Container,~B"); -Clazz_defineMethod (c$, "setToolTipText", -function (text) { -this.putClientProperty ("ToolTipText", text); -}, "~S"); -Clazz_defineMethod (c$, "getToolTipText", -function () { -return this.getClientProperty ("ToolTipText"); -}); -Clazz_defineMethod (c$, "getToolTipText", -function (event) { -return this.getToolTipText (); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "getToolTipLocation", -function (event) { -return null; -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "getPopupLocation", -function (event) { -return null; -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "createToolTip", -function () { -var tip = new javax.swing.JToolTip (); -tip.setComponent (this); -return tip; -}); -Clazz_defineMethod (c$, "scrollRectToVisible", -function (aRect) { -var parent; -var dx = this.getX (); -var dy = this.getY (); -for (parent = this.getParent (); !(parent == null) && !(Clazz_instanceOf (parent, javax.swing.JComponent)) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) { -var bounds = parent.getBounds (); -dx += bounds.x; -dy += bounds.y; -} -if (!(parent == null) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane))) { -aRect.x += dx; -aRect.y += dy; -(parent).scrollRectToVisible (aRect); -aRect.x -= dx; -aRect.y -= dy; -}}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "setAutoscrolls", -function (autoscrolls) { -}, "~B"); -Clazz_defineMethod (c$, "getAutoscrolls", -function () { -return this.autoscrolls; -}); -Clazz_defineMethod (c$, "superProcessMouseMotionEvent", -function (e) { -Clazz_superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "setCreatedDoubleBuffer", -function (newValue) { -this.setFlag (9, newValue); -}, "~B"); -Clazz_defineMethod (c$, "getCreatedDoubleBuffer", -function () { -return this.getFlag (9); -}); -Clazz_defineMethod (c$, "getClientProperties", - function () { -if (this.clientProperties == null) { -this.clientProperties = new javax.swing.ArrayTable (); -}return this.clientProperties; -}); -Clazz_defineMethod (c$, "getClientProperty", -function (key) { -if (this.clientProperties == null) { -return null; -} else { -{ -return this.clientProperties.get (key); -}}}, "~O"); -Clazz_defineMethod (c$, "putClientProperty", -function (key, value) { -if (value == null && this.clientProperties == null) { -return; -}var clientProperties = this.getClientProperties (); -var oldValue; -{ -oldValue = clientProperties.get (key); -if (value != null) { -clientProperties.put (key, value); -} else if (oldValue != null) { -clientProperties.remove (key); -} else { -return; -}}this.clientPropertyChanged (key, oldValue, value); -this.firePropertyChangeObject (key.toString (), oldValue, value); -}, "~O,~O"); -Clazz_defineMethod (c$, "clientPropertyChanged", -function (key, oldValue, newValue) { -}, "~O,~O,~O"); -Clazz_defineMethod (c$, "setUIProperty", -function (propertyName, value) { -if (propertyName === "opaque") { -if (!this.getFlag (24)) { -this.setOpaque ((value).booleanValue ()); -this.setFlag (24, false); -}} else if (propertyName === "autoscrolls") { -if (!this.getFlag (25)) { -this.setAutoscrolls ((value).booleanValue ()); -this.setFlag (25, false); -}} else if (propertyName === "focusTraversalKeysForward") { -} else if (propertyName === "focusTraversalKeysBackward") { -} else { -System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5)); -}}, "~S,~O"); -c$.isLightweightComponent = Clazz_defineMethod (c$, "isLightweightComponent", -function (c) { -return !(Clazz_instanceOf (c, javax.swing.JApplet) || Clazz_instanceOf (c, javax.swing.JFrame) || Clazz_instanceOf (c, javax.swing.JWindow) || Clazz_instanceOf (c, javax.swing.JDialog)); -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "isOpaque", -function () { -return this.getFlag (3); -}); -Clazz_defineMethod (c$, "setOpaque", -function (isOpaque) { -var oldValue = this.getFlag (3); -this.setFlag (3, isOpaque); -this.setFlag (24, true); -this.firePropertyChangeBool ("opaque", oldValue, isOpaque); -}, "~B"); -Clazz_defineMethod (c$, "rectangleIsObscured", -function (x, y, width, height) { -var numChildren = this.getComponentCount (); -for (var i = 0; i < numChildren; i++) { -var child = this.getComponent (i); -var cx; -var cy; -var cw; -var ch; -cx = child.getX (); -cy = child.getY (); -cw = child.getWidth (); -ch = child.getHeight (); -if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) { -if (Clazz_instanceOf (child, javax.swing.JComponent)) { -return (child).isOpaque (); -} else { -return false; -}}} -return false; -}, "~N,~N,~N,~N"); -c$.computeVisibleRect = Clazz_defineMethod (c$, "computeVisibleRect", -function (c, visibleRect) { -var p = c.getParent (); -var bounds = c.getBounds (); -if (p == null || Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) { -visibleRect.reshape (0, 0, bounds.width, bounds.height); -} else { -javax.swing.JComponent.computeVisibleRect (p, visibleRect); -visibleRect.x -= bounds.x; -visibleRect.y -= bounds.y; -javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect); -}}, "java.awt.Component,java.awt.Rectangle"); -Clazz_defineMethod (c$, "computeVisibleRect", -function (visibleRect) { -javax.swing.JComponent.computeVisibleRect (this, visibleRect); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "getVisibleRect", -function () { -var visibleRect = new java.awt.Rectangle (); -this.computeVisibleRect (visibleRect); -return visibleRect; -}); -Clazz_defineMethod (c$, "getTopLevelAncestor", -function () { -for (var p = this; p != null; p = p.getParent ()) { -if (Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) { -return p; -}} -return null; -}); -Clazz_defineMethod (c$, "getAncestorNotifier", - function () { -return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER); -}); -Clazz_defineMethod (c$, "addAncestorListener", -function (listener) { -var ancestorNotifier = this.getAncestorNotifier (); -if (ancestorNotifier == null) { -ancestorNotifier = new javax.swing.AncestorNotifier (this); -this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier); -}ancestorNotifier.addAncestorListener (listener); -}, "javax.swing.event.AncestorListener"); -Clazz_defineMethod (c$, "removeAncestorListener", -function (listener) { -var ancestorNotifier = this.getAncestorNotifier (); -if (ancestorNotifier == null) { -return; -}ancestorNotifier.removeAncestorListener (listener); -if (ancestorNotifier.listenerList.getListenerList ().length == 0) { -ancestorNotifier.removeAllListeners (); -this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null); -}}, "javax.swing.event.AncestorListener"); -Clazz_defineMethod (c$, "getAncestorListeners", -function () { -var ancestorNotifier = this.getAncestorNotifier (); -if (ancestorNotifier == null) { -return new Array (0); -}return ancestorNotifier.getAncestorListeners (); -}); -Clazz_defineMethod (c$, "getListeners", -function (listenerType) { -var result; -if (listenerType === javax.swing.event.AncestorListener) { -result = this.getAncestorListeners (); -} else if (listenerType === java.beans.PropertyChangeListener) { -result = this.getPropertyChangeListeners (); -} else { -result = this.listenerList.getListeners (listenerType); -}if (result.length == 0) { -return Clazz_superCall (this, javax.swing.JComponent, "getListeners", [listenerType]); -}return result; -}, "Class"); -Clazz_defineMethod (c$, "addNotify", -function () { -Clazz_superCall (this, javax.swing.JComponent, "addNotify", []); -this.firePropertyChangeObject ("ancestor", null, this.getParent ()); -this.registerWithKeyboardManager (false); -this.registerNextFocusableComponent (); -}); -Clazz_defineMethod (c$, "removeNotify", -function () { -Clazz_superCall (this, javax.swing.JComponent, "removeNotify", []); -this.firePropertyChangeObject ("ancestor", this.getParent (), null); -this.unregisterWithKeyboardManager (); -this.deregisterNextFocusableComponent (); -if (this.getCreatedDoubleBuffer ()) { -javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer (); -this.setCreatedDoubleBuffer (false); -}}); -Clazz_defineMethod (c$, "repaint", -function (tm, x, y, width, height) { -javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "repaint", -function (r) { -this.repaint (0, r.x, r.y, r.width, r.height); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "revalidate", -function () { -if (this.getParent () == null) { -return; -}if (javax.swing.SwingUtilities.isEventDispatchThread ()) { -this.invalidate (); -javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this); -} else { -{ -if (this.getFlag (28)) { -return; -}this.setFlag (28, true); -}var callRevalidate = ((Clazz_isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$2, this, null)); -javax.swing.SwingUtilities.invokeLater (callRevalidate); -}}); -Clazz_defineMethod (c$, "isValidateRoot", -function () { -return false; -}); -Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", -function () { -return true; -}); -Clazz_defineMethod (c$, "isPaintingOrigin", -function () { -return false; -}); -Clazz_defineMethod (c$, "paintImmediately", -function (x, y, w, h) { -{ -if (arguments.length == 1) { -var r = x; -x = r.x; -y = r.y; -w = r.width; -h = r.height; -} -}var c = this; -var parent; -if (!this.isShowing ()) { -return; -}while (!(c).isOpaque ()) { -parent = c.getParent (); -if (parent != null) { -x += c.getX (); -y += c.getY (); -c = parent; -} else { -break; -}if (!(Clazz_instanceOf (c, javax.swing.JComponent))) { -break; -}} -if (Clazz_instanceOf (c, javax.swing.JComponent)) { -(c)._paintImmediately (x, y, w, h); -} else { -c.repaint (x, y, w, h); -}}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "paintImmediately", -function (r) { -this.paintImmediately (r.x, r.y, r.width, r.height); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "alwaysOnTop", -function () { -return false; -}); -Clazz_defineMethod (c$, "setPaintingChild", -function (paintingChild) { -this.paintingChild = paintingChild; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "_paintImmediately", -function (x, y, w, h) { -var g; -var c; -var tmpX; -var tmpY; -var tmpWidth; -var tmpHeight; -var offsetX = 0; -var offsetY = 0; -var hasBuffer = false; -var bufferedComponent = null; -var paintingComponent = this; -var path = new java.util.ArrayList (7); -var pIndex = -1; -var pCount = 0; -tmpX = tmpY = tmpWidth = tmpHeight = 0; -var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle (); -paintImmediatelyClip.x = x; -paintImmediatelyClip.y = y; -paintImmediatelyClip.width = w; -paintImmediatelyClip.height = h; -var ontop = this.alwaysOnTop () && this.isOpaque (); -if (ontop) { -javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip); -if (paintImmediatelyClip.width == 0) { -javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); -return; -}}var child; -for (c = this, child = null; c != null && !(Clazz_instanceOf (c, java.awt.Window)) && !(Clazz_instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) { -var jc = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null; -path.add (c); -if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) { -var resetPC; -if (c !== this) { -if (jc.isPaintingOrigin ()) { -resetPC = true; -} else { -var children = c.getComponents (); -var i = 0; -for (; i < children.length; i++) { -if (children[i] === child) break; -} -switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) { -case 0: -resetPC = false; -break; -case 2: -javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); -return; -default: -resetPC = true; -break; -} -}} else { -resetPC = false; -}if (resetPC) { -paintingComponent = jc; -pIndex = pCount; -offsetX = offsetY = 0; -hasBuffer = false; -}}pCount++; -if (!ontop) { -var bx = c.getX (); -var by = c.getY (); -tmpWidth = c.getWidth (); -tmpHeight = c.getHeight (); -javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip); -paintImmediatelyClip.x += bx; -paintImmediatelyClip.y += by; -offsetX += bx; -offsetY += by; -}} -if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) { -javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); -return; -}paintingComponent.setFlag (13, true); -paintImmediatelyClip.x -= offsetX; -paintImmediatelyClip.y -= offsetY; -if (paintingComponent !== this) { -var comp; -var i = pIndex; -for (; i > 0; i--) { -comp = path.get (i); -if (Clazz_instanceOf (comp, javax.swing.JComponent)) { -(comp).setPaintingChild (path.get (i - 1)); -}} -}try { -g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS (); -try { -if (hasBuffer) { -var rm = javax.swing.RepaintManager.currentManager (bufferedComponent); -rm.beginPaint (); -try { -rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height); -} finally { -rm.endPaint (); -} -} else { -paintingComponent.paint (g); -}} finally { -g.dispose (); -} -} finally { -if (paintingComponent !== this) { -var comp; -var i = pIndex; -for (; i > 0; i--) { -comp = path.get (i); -if (Clazz_instanceOf (comp, javax.swing.JComponent)) { -(comp).setPaintingChild (null); -}} -}paintingComponent.setFlag (13, false); -} -javax.swing.JComponent.recycleRectangle (paintImmediatelyClip); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "paintToOffscreen", -function (g, x, y, w, h, maxX, maxY) { -try { -this.setFlag (1, true); -if ((y + h) < maxY || (x + w) < maxX) { -this.setFlag (2, true); -}if (this.getFlag (13)) { -this.paint (g); -} else { -if (!this.rectangleIsObscured (x, y, w, h)) { -this.paintComponent (g); -this.paintBorder (g); -}this.paintChildren (g); -}} finally { -this.setFlag (1, false); -this.setFlag (2, false); -} -}, "java.awt.Graphics,~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getObscuredState", - function (compIndex, x, y, width, height) { -var retValue = 0; -var tmpRect = javax.swing.JComponent.fetchRectangle (); -for (var i = compIndex - 1; i >= 0; i--) { -var sibling = this.getComponent (i); -if (!sibling.isVisible ()) { -continue; -}var siblingRect; -var opaque; -if (Clazz_instanceOf (sibling, javax.swing.JComponent)) { -opaque = (sibling).isOpaque (); -if (!opaque) { -if (retValue == 1) { -continue; -}}} else { -opaque = true; -}siblingRect = sibling.getBounds (tmpRect); -if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) { -javax.swing.JComponent.recycleRectangle (tmpRect); -return 2; -} else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) { -retValue = 1; -}} -javax.swing.JComponent.recycleRectangle (tmpRect); -return retValue; -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "checkIfChildObscuredBySibling", -function () { -return true; -}); -Clazz_defineMethod (c$, "setFlag", - function (aFlag, aValue) { -if (aValue) { -this.flags |= (1 << aFlag); -} else { -this.flags &= ~(1 << aFlag); -}}, "~N,~B"); -Clazz_defineMethod (c$, "getFlag", - function (aFlag) { -var mask = (1 << aFlag); -return ((this.flags & mask) == mask); -}, "~N"); -Clazz_defineMethod (c$, "setDoubleBuffered", -function (aFlag) { -}, "~B"); -Clazz_overrideMethod (c$, "isDoubleBuffered", -function () { -return this.getFlag (0); -}); -Clazz_defineMethod (c$, "getRootPane", -function () { -return javax.swing.SwingUtilities.getRootPane (this); -}); -Clazz_defineMethod (c$, "paramString", -function () { -var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : ""); -var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : ""); -var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : ""); -var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ())); -return Clazz_superCall (this, javax.swing.JComponent, "paramString", []) + ",alignmentX=" + this.alignmentX + ",alignmentY=" + this.alignmentY + ",border=" + borderString + ",flags=" + this.flags + ",maximumSize=" + maximumSizeString + ",minimumSize=" + minimumSizeString + ",preferredSize=" + preferredSizeString; -}); -c$.$JComponent$ActionStandin$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -this.actionListener = null; -this.command = null; -this.action = null; -Clazz_instantialize (this, arguments); -}, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action); -Clazz_makeConstructor (c$, -function (a, b) { -this.actionListener = a; -if (Clazz_instanceOf (a, javax.swing.Action)) { -this.action = a; -} else { -this.action = null; -}this.command = b; -}, "java.awt.event.ActionListener,~S"); -Clazz_defineMethod (c$, "getValue", -function (a) { -if (a != null) { -if (a.equals ("ActionCommandKey")) { -return this.command; -}if (this.action != null) { -return this.action.getValue (a); -}if (a.equals ("Name")) { -return "ActionStandin"; -}}return null; -}, "~S"); -Clazz_defineMethod (c$, "isEnabled", -function () { -if (this.actionListener == null) { -return false; -}if (this.action == null) { -return true; -}return this.action.isEnabled (); -}); -Clazz_defineMethod (c$, "actionPerformed", -function (a) { -if (this.actionListener != null) { -this.actionListener.actionPerformed (a); -}}, "java.awt.event.ActionEvent"); -Clazz_overrideMethod (c$, "putValue", -function (a, b) { -}, "~S,~O"); -Clazz_overrideMethod (c$, "setEnabled", -function (a) { -}, "~B"); -Clazz_overrideMethod (c$, "addPropertyChangeListener", -function (a) { -}, "java.beans.PropertyChangeListener"); -Clazz_overrideMethod (c$, "removePropertyChangeListener", -function (a) { -}, "java.beans.PropertyChangeListener"); -c$ = Clazz_p0p (); -}; -c$.$JComponent$2$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (javax.swing, "JComponent$2", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -{ -this.b$["javax.swing.JComponent"].setFlag (28, false); -}this.b$["javax.swing.JComponent"].revalidate (); -}); -c$ = Clazz_p0p (); -}; -c$.$JComponent$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController); -Clazz_overrideMethod (c$, "acceptRequestFocus", -function (from, to, temporary, focusedWindowChangeAllowed, cause) { -if ((to == null) || !(Clazz_instanceOf (to, javax.swing.JComponent))) { -return true; -}if ((from == null) || !(Clazz_instanceOf (from, javax.swing.JComponent))) { -return true; -}var target = to; -if (!target.getVerifyInputWhenFocusTarget ()) { -return true; -}var jFocusOwner = from; -var iv = jFocusOwner.getInputVerifier (); -if (iv == null) { -return true; -} else { -var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY); -if (currentSource === jFocusOwner) { -return true; -}javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner); -try { -return iv.shouldYieldFocus (jFocusOwner); -} finally { -if (currentSource != null) { -javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource); -} else { -javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY); -}} -}}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause"); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.array = null; -this.count = 0; -this.capacity = 0; -Clazz_instantialize (this, arguments); -}, javax.swing.JComponent, "IntVector"); -Clazz_defineMethod (c$, "size", -function () { -return this.count; -}); -Clazz_defineMethod (c$, "elementAt", -function (a) { -return this.array[a]; -}, "~N"); -Clazz_defineMethod (c$, "addElement", -function (a) { -if (this.count == this.capacity) { -this.capacity = (this.capacity + 2) * 2; -var b = Clazz_newIntArray (this.capacity, 0); -if (this.count > 0) { -System.arraycopy (this.array, 0, b, 0, this.count); -}this.array = b; -}this.array[this.count++] = a; -}, "~N"); -Clazz_defineMethod (c$, "setElementAt", -function (a, b) { -this.array[b] = a; -}, "~N,~N"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.JComponent, "KeyboardState"); -c$.getKeyCodeArray = Clazz_defineMethod (c$, "getKeyCodeArray", -function () { -var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey); -if (a == null) { -a = new javax.swing.JComponent.IntVector (); -javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a); -}return a; -}); -c$.registerKeyPressed = Clazz_defineMethod (c$, "registerKeyPressed", -function (a) { -var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray (); -var c = b.size (); -var d; -for (d = 0; d < c; d++) { -if (b.elementAt (d) == -1) { -b.setElementAt (a, d); -return; -}} -b.addElement (a); -}, "~N"); -c$.registerKeyReleased = Clazz_defineMethod (c$, "registerKeyReleased", -function (a) { -var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray (); -var c = b.size (); -var d; -for (d = 0; d < c; d++) { -if (b.elementAt (d) == a) { -b.setElementAt (-1, d); -return; -}} -}, "~N"); -c$.keyIsPressed = Clazz_defineMethod (c$, "keyIsPressed", -function (a) { -var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray (); -var c = b.size (); -var d; -for (d = 0; d < c; d++) { -if (b.elementAt (d) == a) { -return true; -}} -return false; -}, "~N"); -c$.shouldProcess = Clazz_defineMethod (c$, "shouldProcess", -function (a) { -switch (a.getID ()) { -case 401: -if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) { -javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ()); -}return true; -case 402: -if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) { -javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ()); -return true; -}return false; -case 400: -return true; -default: -return false; -} -}, "java.awt.event.KeyEvent"); -c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState; -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"uiClassID", "ComponentUI", -"managingFocusForwardTraversalKeys", null, -"managingFocusBackwardTraversalKeys", null, -"NOT_OBSCURED", 0, -"PARTIALLY_OBSCURED", 1, -"COMPLETELY_OBSCURED", 2, -"DEBUG_GRAPHICS_LOADED", false); -c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY = new Clazz._O (); -Clazz_defineStatics (c$, -"WHEN_FOCUSED", 0, -"WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1, -"WHEN_IN_FOCUSED_WINDOW", 2, -"UNDEFINED_CONDITION", -1, -"WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow", -"TOOL_TIP_TEXT_KEY", "ToolTipText", -"NEXT_FOCUS", "nextFocus", -"IS_DOUBLE_BUFFERED", 0, -"ANCESTOR_USING_BUFFER", 1, -"IS_PAINTING_TILE", 2, -"IS_OPAQUE", 3, -"FOCUS_INPUTMAP_CREATED", 5, -"ANCESTOR_INPUTMAP_CREATED", 6, -"WIF_INPUTMAP_CREATED", 7, -"ACTIONMAP_CREATED", 8, -"CREATED_DOUBLE_BUFFER", 9, -"IS_PRINTING", 11, -"IS_PRINTING_ALL", 12, -"IS_REPAINTING", 13, -"REQUEST_FOCUS_DISABLED", 22, -"INHERITS_POPUP_MENU", 23, -"OPAQUE_SET", 24, -"AUTOSCROLLS_SET", 25, -"REVALIDATE_RUNNABLE_SCHEDULED", 28); -c$.tempRectangles = c$.prototype.tempRectangles = new java.util.ArrayList (11); -Clazz_defineStatics (c$, -"defaultLocale", "JComponent.defaultLocale", -"componentObtainingGraphicsFrom", null); -c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock = new Clazz._O (); -c$.focusController = c$.prototype.focusController = ((Clazz_isClassDefined ("javax.swing.JComponent$1") ? 0 : javax.swing.JComponent.$JComponent$1$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$1, this, null)); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.event.ActionListener"], "javax.swing.Action", null, function () { -c$ = Clazz_declareInterface (javax.swing, "Action", java.awt.event.ActionListener); -Clazz_defineStatics (c$, -"DEFAULT", "Default", -"NAME", "Name", -"SHORT_DESCRIPTION", "ShortDescription", -"LONG_DESCRIPTION", "LongDescription", -"SMALL_ICON", "SmallIcon", -"ACTION_COMMAND_KEY", "ActionCommandKey", -"ACCELERATOR_KEY", "AcceleratorKey", -"MNEMONIC_KEY", "MnemonicKey", -"SELECTED_KEY", "SwingSelectedKey", -"DISPLAYED_MNEMONIC_INDEX_KEY", "SwingDisplayedMnemonicIndexKey", -"LARGE_ICON_KEY", "SwingLargeIconKey"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Frame", "java.awt.event.WindowListener", "javax.swing.SwingConstants"], "javax.swing.SwingUtilities", ["java.lang.Character", "$.Error", "$.Thread", "java.applet.Applet", "java.awt.Component", "$.Container", "$.EventQueue", "$.Point", "$.Rectangle", "$.Window", "java.awt.event.ActionEvent", "$.MouseEvent", "$.MouseWheelEvent", "javax.swing.JComponent", "javax.swing.JComponent.ActionStandin", "javax.swing.JRootPane", "$.RootPaneContainer", "javax.swing.event.MenuDragMouseEvent", "javax.swing.plaf.UIResource", "jssun.awt.AppContext", "jssun.swing.UIAction", "swingjs.api.Interface"], function () { -c$ = Clazz_declareType (javax.swing, "SwingUtilities", null, javax.swing.SwingConstants); -c$.installSwingDropTargetAsNecessary = Clazz_defineMethod (c$, "installSwingDropTargetAsNecessary", -function (c, t) { -}, "java.awt.Component,javax.swing.TransferHandler"); -c$.isRectangleContainingRectangle = Clazz_defineMethod (c$, "isRectangleContainingRectangle", -function (a, b) { -if (b.x >= a.x && (b.x + b.width) <= (a.x + a.width) && b.y >= a.y && (b.y + b.height) <= (a.y + a.height)) { -return true; -}return false; -}, "java.awt.Rectangle,java.awt.Rectangle"); -c$.getLocalBounds = Clazz_defineMethod (c$, "getLocalBounds", -function (aComponent) { -var b = new java.awt.Rectangle (aComponent.getBounds ()); -b.x = b.y = 0; -return b; -}, "java.awt.Component"); -c$.getWindowAncestor = Clazz_defineMethod (c$, "getWindowAncestor", -function (c) { -for (var p = c.getParent (); p != null; p = p.getParent ()) { -if (Clazz_instanceOf (p, java.awt.Window)) { -return p; -}} -return null; -}, "java.awt.Component"); -c$.convertScreenLocationToParent = Clazz_defineMethod (c$, "convertScreenLocationToParent", -function (parent, x, y) { -for (var p = parent; p != null; p = p.getParent ()) { -if (Clazz_instanceOf (p, java.awt.Window)) { -var point = new java.awt.Point (x, y); -javax.swing.SwingUtilities.convertPointFromScreen (point, parent); -return point; -}} -throw new Error ("convertScreenLocationToParent: no window ancestor"); -}, "java.awt.Container,~N,~N"); -c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", -function (source, aPoint, destination) { -var p; -if (source == null && destination == null) return aPoint; -if (source == null) { -source = javax.swing.SwingUtilities.getWindowAncestor (destination); -if (source == null) throw new Error ("Source component not connected to component tree hierarchy"); -}p = new java.awt.Point (aPoint); -javax.swing.SwingUtilities.convertPointToScreen (p, source); -if (destination == null) { -destination = javax.swing.SwingUtilities.getWindowAncestor (source); -if (destination == null) throw new Error ("Destination component not connected to component tree hierarchy"); -}javax.swing.SwingUtilities.convertPointFromScreen (p, destination); -return p; -}, "java.awt.Component,java.awt.Point,java.awt.Component"); -c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", -function (source, x, y, destination) { -var point = new java.awt.Point (x, y); -return javax.swing.SwingUtilities.convertPoint (source, point, destination); -}, "java.awt.Component,~N,~N,java.awt.Component"); -c$.convertRectangle = Clazz_defineMethod (c$, "convertRectangle", -function (source, aRectangle, destination) { -var point = new java.awt.Point (aRectangle.x, aRectangle.y); -point = javax.swing.SwingUtilities.convertPoint (source, point, destination); -return new java.awt.Rectangle (point.x, point.y, aRectangle.width, aRectangle.height); -}, "java.awt.Component,java.awt.Rectangle,java.awt.Component"); -c$.getAncestorOfClass = Clazz_defineMethod (c$, "getAncestorOfClass", -function (c, comp) { -if (comp == null || c == null) return null; -var parent = comp.getParent (); -while (parent != null && !(c.isInstance (parent))) parent = parent.getParent (); - -return parent; -}, "Class,java.awt.Component"); -c$.getAncestorNamed = Clazz_defineMethod (c$, "getAncestorNamed", -function (name, comp) { -if (comp == null || name == null) return null; -var parent = comp.getParent (); -while (parent != null && !(name.equals (parent.getName ()))) parent = parent.getParent (); - -return parent; -}, "~S,java.awt.Component"); -c$.getDeepestComponentAt = Clazz_defineMethod (c$, "getDeepestComponentAt", -function (parent, x, y) { -if (!parent.contains (x, y)) { -return null; -}if (Clazz_instanceOf (parent, java.awt.Container)) { -var components = (parent).getComponents (); -for (var i = 0; i < components.length; i++) { -var comp = components[i]; -if (comp != null && comp.isVisible ()) { -var loc = comp.getLocation (); -if (Clazz_instanceOf (comp, java.awt.Container)) { -comp = javax.swing.SwingUtilities.getDeepestComponentAt (comp, x - loc.x, y - loc.y); -} else { -comp = comp.getComponentAt (x - loc.x, y - loc.y); -}if (comp != null && comp.isVisible ()) { -return comp; -}}} -}return parent; -}, "java.awt.Component,~N,~N"); -c$.convertMouseEvent = Clazz_defineMethod (c$, "convertMouseEvent", -function (source, sourceEvent, destination) { -var p = javax.swing.SwingUtilities.convertPoint (source, new java.awt.Point (sourceEvent.getX (), sourceEvent.getY ()), destination); -var newSource; -if (destination != null) newSource = destination; - else newSource = source; -var newEvent; -if (Clazz_instanceOf (sourceEvent, java.awt.event.MouseWheelEvent)) { -var sourceWheelEvent = sourceEvent; -newEvent = new java.awt.event.MouseWheelEvent (newSource, sourceWheelEvent.getID (), sourceWheelEvent.getWhen (), sourceWheelEvent.getModifiers (), p.x, p.y, sourceWheelEvent.getXOnScreen (), sourceWheelEvent.getYOnScreen (), sourceWheelEvent.getClickCount (), sourceWheelEvent.isPopupTrigger (), sourceWheelEvent.getScrollType (), sourceWheelEvent.getScrollAmount (), sourceWheelEvent.getWheelRotation ()); -} else if (Clazz_instanceOf (sourceEvent, javax.swing.event.MenuDragMouseEvent)) { -var sourceMenuDragEvent = sourceEvent; -newEvent = new javax.swing.event.MenuDragMouseEvent (newSource, sourceMenuDragEvent.getID (), sourceMenuDragEvent.getWhen (), sourceMenuDragEvent.getModifiers (), p.x, p.y, sourceMenuDragEvent.getXOnScreen (), sourceMenuDragEvent.getYOnScreen (), sourceMenuDragEvent.getClickCount (), sourceMenuDragEvent.isPopupTrigger (), sourceMenuDragEvent.getPath (), sourceMenuDragEvent.getMenuSelectionManager ()); -} else { -newEvent = new java.awt.event.MouseEvent (newSource, sourceEvent.getID (), sourceEvent.getWhen (), sourceEvent.getModifiers (), p.x, p.y, sourceEvent.getXOnScreen (), sourceEvent.getYOnScreen (), sourceEvent.getClickCount (), sourceEvent.isPopupTrigger (), 0); -}return newEvent; -}, "java.awt.Component,java.awt.event.MouseEvent,java.awt.Component"); -c$.convertPointToScreen = Clazz_defineMethod (c$, "convertPointToScreen", -function (p, c) { -var x; -var y; -do { -if (Clazz_instanceOf (c, javax.swing.JComponent)) { -x = (c).getX (); -y = (c).getY (); -} else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) { -try { -var pp = c.getLocationOnScreen (); -x = pp.x; -y = pp.y; -} catch (icse) { -if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) { -x = c.getX (); -y = c.getY (); -} else { -throw icse; -} -} -} else { -x = c.getX (); -y = c.getY (); -}p.x += x; -p.y += y; -if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break; -c = c.getParent (); -} while (c != null); -}, "java.awt.Point,java.awt.Component"); -c$.convertPointFromScreen = Clazz_defineMethod (c$, "convertPointFromScreen", -function (p, c) { -var x; -var y; -do { -if (Clazz_instanceOf (c, javax.swing.JComponent)) { -x = (c).getX (); -y = (c).getY (); -} else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) { -try { -var pp = c.getLocationOnScreen (); -x = pp.x; -y = pp.y; -} catch (icse) { -if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) { -x = c.getX (); -y = c.getY (); -} else { -throw icse; -} -} -} else { -x = c.getX (); -y = c.getY (); -}p.x -= x; -p.y -= y; -if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break; -c = c.getParent (); -} while (c != null); -}, "java.awt.Point,java.awt.Component"); -c$.windowForComponent = Clazz_defineMethod (c$, "windowForComponent", -function (c) { -return javax.swing.SwingUtilities.getWindowAncestor (c); -}, "java.awt.Component"); -c$.isDescendingFrom = Clazz_defineMethod (c$, "isDescendingFrom", -function (a, b) { -if (a === b) return true; -for (var p = a.getParent (); p != null; p = p.getParent ()) if (p === b) return true; - -return false; -}, "java.awt.Component,java.awt.Component"); -c$.computeIntersection = Clazz_defineMethod (c$, "computeIntersection", -function (x, y, width, height, dest) { -var x1 = (x > dest.x) ? x : dest.x; -var x2 = ((x + width) < (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width); -var y1 = (y > dest.y) ? y : dest.y; -var y2 = ((y + height) < (dest.y + dest.height) ? (y + height) : (dest.y + dest.height)); -dest.x = x1; -dest.y = y1; -dest.width = x2 - x1; -dest.height = y2 - y1; -if (dest.width < 0 || dest.height < 0) { -dest.x = dest.y = dest.width = dest.height = 0; -}return dest; -}, "~N,~N,~N,~N,java.awt.Rectangle"); -c$.computeUnion = Clazz_defineMethod (c$, "computeUnion", -function (x, y, width, height, dest) { -var x1 = (x < dest.x) ? x : dest.x; -var x2 = ((x + width) > (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width); -var y1 = (y < dest.y) ? y : dest.y; -var y2 = ((y + height) > (dest.y + dest.height)) ? (y + height) : (dest.y + dest.height); -dest.x = x1; -dest.y = y1; -dest.width = (x2 - x1); -dest.height = (y2 - y1); -return dest; -}, "~N,~N,~N,~N,java.awt.Rectangle"); -c$.computeDifference = Clazz_defineMethod (c$, "computeDifference", -function (rectA, rectB) { -if (rectB == null || !rectA.intersects (rectB) || javax.swing.SwingUtilities.isRectangleContainingRectangle (rectB, rectA)) { -return new Array (0); -}var t = new java.awt.Rectangle (); -var a = null; -var b = null; -var c = null; -var d = null; -var result; -var rectCount = 0; -if (javax.swing.SwingUtilities.isRectangleContainingRectangle (rectA, rectB)) { -t.x = rectA.x; -t.y = rectA.y; -t.width = rectB.x - rectA.x; -t.height = rectA.height; -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.x = rectB.x; -t.y = rectA.y; -t.width = rectB.width; -t.height = rectB.y - rectA.y; -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}t.x = rectB.x; -t.y = rectB.y + rectB.height; -t.width = rectB.width; -t.height = rectA.y + rectA.height - (rectB.y + rectB.height); -if (t.width > 0 && t.height > 0) { -c = new java.awt.Rectangle (t); -rectCount++; -}t.x = rectB.x + rectB.width; -t.y = rectA.y; -t.width = rectA.x + rectA.width - (rectB.x + rectB.width); -t.height = rectA.height; -if (t.width > 0 && t.height > 0) { -d = new java.awt.Rectangle (t); -rectCount++; -}} else { -if (rectB.x <= rectA.x && rectB.y <= rectA.y) { -if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) { -t.x = rectA.x; -t.y = rectB.y + rectB.height; -t.width = rectA.width; -t.height = rectA.y + rectA.height - (rectB.y + rectB.height); -if (t.width > 0 && t.height > 0) { -a = t; -rectCount++; -}} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) { -t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); -if (t.width > 0 && t.height > 0) { -a = t; -rectCount++; -}} else { -t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectB.y + rectB.height) - rectA.y); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}}} else if (rectB.x <= rectA.x && (rectB.y + rectB.height) >= (rectA.y + rectA.height)) { -if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) { -t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); -if (t.width > 0 && t.height > 0) { -a = t; -rectCount++; -}} else { -t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectA.y + rectA.height) - rectB.y); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}}} else if (rectB.x <= rectA.x) { -if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) { -t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}} else { -t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectB.height); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); -if (t.width > 0 && t.height > 0) { -c = new java.awt.Rectangle (t); -rectCount++; -}}} else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) { -if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) { -t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); -if (t.width > 0 && t.height > 0) { -a = t; -rectCount++; -}} else if (rectB.y <= rectA.y) { -t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, (rectB.y + rectB.height) - rectA.y); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) { -t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, (rectA.y + rectA.height) - rectB.y); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}} else { -t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, rectB.height); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); -if (t.width > 0 && t.height > 0) { -c = new java.awt.Rectangle (t); -rectCount++; -}}} else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) { -if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) { -t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}} else if (rectB.y <= rectA.y) { -t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectB.x, (rectB.y + rectB.height), rectB.width, (rectA.y + rectA.height) - (rectB.y + rectB.height)); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); -if (t.width > 0 && t.height > 0) { -c = new java.awt.Rectangle (t); -rectCount++; -}} else { -t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height); -if (t.width > 0 && t.height > 0) { -a = new java.awt.Rectangle (t); -rectCount++; -}t.reshape (rectB.x, rectA.y, rectB.width, rectB.y - rectA.y); -if (t.width > 0 && t.height > 0) { -b = new java.awt.Rectangle (t); -rectCount++; -}t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height); -if (t.width > 0 && t.height > 0) { -c = new java.awt.Rectangle (t); -rectCount++; -}}}}result = new Array (rectCount); -rectCount = 0; -if (a != null) result[rectCount++] = a; -if (b != null) result[rectCount++] = b; -if (c != null) result[rectCount++] = c; -if (d != null) result[rectCount++] = d; -return result; -}, "java.awt.Rectangle,java.awt.Rectangle"); -c$.isLeftMouseButton = Clazz_defineMethod (c$, "isLeftMouseButton", -function (anEvent) { -return ((anEvent.getModifiers () & 16) != 0); -}, "java.awt.event.MouseEvent"); -c$.isMiddleMouseButton = Clazz_defineMethod (c$, "isMiddleMouseButton", -function (anEvent) { -return ((anEvent.getModifiers () & 8) == 8); -}, "java.awt.event.MouseEvent"); -c$.isRightMouseButton = Clazz_defineMethod (c$, "isRightMouseButton", -function (anEvent) { -return ((anEvent.getModifiers () & 4) == 4); -}, "java.awt.event.MouseEvent"); -c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", -function (g, c, p, x, y, w, h) { -javax.swing.SwingUtilities.getCellRendererPane (c, p).paintComponent (g, c, p, x, y, w, h, false); -}, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N"); -c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", -function (g, c, p, r) { -javax.swing.SwingUtilities.paintComponent (g, c, p, r.x, r.y, r.width, r.height); -}, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle"); -c$.getCellRendererPane = Clazz_defineMethod (c$, "getCellRendererPane", - function (c, p) { -var shell = c.getParent (); -if (Clazz_instanceOf (shell, javax.swing.CellRendererPane)) { -if (shell.getParent () !== p) { -p.add (shell); -}} else { -shell = swingjs.api.Interface.getInstance ("javax.swing.CellRendererPane", false); -shell.add (c); -p.add (shell); -}return shell; -}, "java.awt.Component,java.awt.Container"); -c$.updateComponentTreeUI = Clazz_defineMethod (c$, "updateComponentTreeUI", -function (c) { -javax.swing.SwingUtilities.updateComponentTreeUI0 (c); -c.invalidate (); -c.validate (); -c.repaint (); -}, "java.awt.Component"); -c$.updateComponentTreeUI0 = Clazz_defineMethod (c$, "updateComponentTreeUI0", - function (c) { -if (Clazz_instanceOf (c, javax.swing.JComponent)) { -var jc = c; -jc.updateUI (); -var jpm = jc.getComponentPopupMenu (); -if (jpm != null) { -javax.swing.SwingUtilities.updateComponentTreeUI (jpm); -}}var children = null; -if (Clazz_instanceOf (c, javax.swing.JMenu)) { -children = (c).getMenuComponents (); -} else if (Clazz_instanceOf (c, java.awt.Container)) { -children = (c).getComponents (); -}if (children != null) { -for (var i = 0; i < children.length; i++) { -javax.swing.SwingUtilities.updateComponentTreeUI0 (children[i]); -} -}}, "java.awt.Component"); -c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", -function (doRun) { -java.awt.EventQueue.invokeLater (doRun); -}, "Runnable"); -c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", -function (doRun) { -java.awt.EventQueue.invokeAndWait (doRun); -}, "Runnable"); -c$.isEventDispatchThread = Clazz_defineMethod (c$, "isEventDispatchThread", -function () { -return java.awt.EventQueue.isDispatchThread (); -}); -c$.getRootPane = Clazz_defineMethod (c$, "getRootPane", -function (c) { -if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) { -return (c).getRootPane (); -}for (; c != null; c = c.getParent ()) { -if (Clazz_instanceOf (c, javax.swing.JRootPane)) { -return c; -}} -return null; -}, "java.awt.Component"); -c$.getRoot = Clazz_defineMethod (c$, "getRoot", -function (c) { -var applet = null; -for (var p = c; p != null; p = p.getParent ()) { -if (Clazz_instanceOf (p, java.awt.Window)) { -return p; -}if (Clazz_instanceOf (p, java.applet.Applet)) { -applet = p; -}} -return applet; -}, "java.awt.Component"); -c$.processKeyBindings = Clazz_defineMethod (c$, "processKeyBindings", -function (event) { -if (event != null) { -if (event.isConsumed ()) { -return false; -}var component = event.getComponent (); -var pressed = (event.getID () == 401); -if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (event)) { -return false; -}while (component != null) { -if (Clazz_instanceOf (component, javax.swing.JComponent)) { -return (component).processKeyBindings (event, pressed); -}if ((Clazz_instanceOf (component, java.applet.Applet)) || (Clazz_instanceOf (component, java.awt.Window))) { -return javax.swing.JComponent.processKeyBindingsForAllComponents (event, component, pressed); -}component = component.getParent (); -} -}return false; -}, "java.awt.event.KeyEvent"); -c$.isValidKeyEventForKeyBindings = Clazz_defineMethod (c$, "isValidKeyEventForKeyBindings", -function (e) { -if (e.getID () == 400) { -var mod = e.getModifiers (); -if (((mod & 8) != 0) && ((mod & 2) == 0)) { -return false; -}}return true; -}, "java.awt.event.KeyEvent"); -c$.notifyAction = Clazz_defineMethod (c$, "notifyAction", -function (action, ks, event, sender, modifiers) { -if (action == null) { -return false; -}if (Clazz_instanceOf (action, jssun.swing.UIAction)) { -if (!(action).isEnabled (sender)) { -return false; -}} else if (!action.isEnabled ()) { -return false; -}var commandO; -var stayNull; -commandO = action.getValue ("ActionCommandKey"); -if (commandO == null && (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin))) { -stayNull = true; -} else { -stayNull = false; -}var command; -if (commandO != null) { -command = commandO.toString (); -} else if (!stayNull && event.getKeyChar () != '\uffff') { -command = String.valueOf (event.getKeyChar ()); -} else { -command = null; -}action.actionPerformed ( new java.awt.event.ActionEvent (sender, 1001, command, event.getWhen (), modifiers)); -return true; -}, "javax.swing.Action,javax.swing.KeyStroke,java.awt.event.KeyEvent,~O,~N"); -c$.replaceUIInputMap = Clazz_defineMethod (c$, "replaceUIInputMap", -function (component, type, uiInputMap) { -var map = component.getInputMap (type, (uiInputMap != null)); -while (map != null) { -var parent = map.getParent (); -if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) { -map.setParent (uiInputMap); -return; -}map = parent; -} -}, "javax.swing.JComponent,~N,javax.swing.InputMap"); -c$.replaceUIActionMap = Clazz_defineMethod (c$, "replaceUIActionMap", -function (component, uiActionMap) { -var map = component.getActionMap ((uiActionMap != null)); -;while (map != null) { -var parent = map.getParent (); -if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) { -map.setParent (uiActionMap); -return; -}map = parent; -} -}, "javax.swing.JComponent,javax.swing.ActionMap"); -c$.getUIInputMap = Clazz_defineMethod (c$, "getUIInputMap", -function (component, condition) { -var map = component.getInputMap (condition, false); -while (map != null) { -var parent = map.getParent (); -if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) { -return parent; -}map = parent; -} -return null; -}, "javax.swing.JComponent,~N"); -c$.getUIActionMap = Clazz_defineMethod (c$, "getUIActionMap", -function (component) { -var map = component.getActionMap (false); -while (map != null) { -var parent = map.getParent (); -if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) { -return parent; -}map = parent; -} -return null; -}, "javax.swing.JComponent"); -c$.getSharedOwnerFrame = Clazz_defineMethod (c$, "getSharedOwnerFrame", -function () { -var sharedOwnerFrame = javax.swing.SwingUtilities.appContextGet (javax.swing.SwingUtilities.sharedOwnerFrameKey); -if (sharedOwnerFrame == null) { -sharedOwnerFrame = new javax.swing.SwingUtilities.SharedOwnerFrame (); -javax.swing.SwingUtilities.appContextPut (javax.swing.SwingUtilities.sharedOwnerFrameKey, sharedOwnerFrame); -}return sharedOwnerFrame; -}); -c$.getSharedOwnerFrameShutdownListener = Clazz_defineMethod (c$, "getSharedOwnerFrameShutdownListener", -function () { -var sharedOwnerFrame = javax.swing.SwingUtilities.getSharedOwnerFrame (); -return sharedOwnerFrame; -}); -c$.appContextGet = Clazz_defineMethod (c$, "appContextGet", -function (key) { -return jssun.awt.AppContext.getAppContext ().get (key); -}, "~O"); -c$.appContextPut = Clazz_defineMethod (c$, "appContextPut", -function (key, value) { -jssun.awt.AppContext.getAppContext ().put (key, value); -}, "~O,~O"); -c$.appContextRemove = Clazz_defineMethod (c$, "appContextRemove", -function (key) { -jssun.awt.AppContext.getAppContext ().remove (key); -}, "~O"); -c$.loadSystemClass = Clazz_defineMethod (c$, "loadSystemClass", -function (className) { -return Clazz._4Name (className, true, Thread.currentThread ().getContextClassLoader ()); -}, "~S"); -c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", -function (c) { -return c.getComponentOrientation ().isLeftToRight (); -}, "java.awt.Component"); -c$.doesIconReferenceImage = Clazz_defineMethod (c$, "doesIconReferenceImage", -function (icon, image) { -var iconImage = (icon != null && (Clazz_instanceOf (icon, javax.swing.ImageIcon))) ? (icon).getImage () : null; -return (iconImage === image); -}, "javax.swing.Icon,java.awt.Image"); -c$.findDisplayedMnemonicIndex = Clazz_defineMethod (c$, "findDisplayedMnemonicIndex", -function (text, mnemonic) { -if (text == null || mnemonic == 0) { -return -1; -}var uc = Character.toUpperCase (String.fromCharCode (mnemonic)); -var lc = Character.toLowerCase (String.fromCharCode (mnemonic)); -var uci = text.indexOf (uc); -var lci = text.indexOf (lc); -if (uci == -1) { -return lci; -} else if (lci == -1) { -return uci; -} else { -return (lci < uci) ? lci : uci; -}}, "~S,~N"); -c$.calculateInnerArea = Clazz_defineMethod (c$, "calculateInnerArea", -function (c, r) { -if (c == null) { -return null; -}var rect = r; -var insets = c.getInsets (); -if (rect == null) { -rect = new java.awt.Rectangle (); -}rect.x = insets.left; -rect.y = insets.top; -rect.width = c.getWidth () - insets.left - insets.right; -rect.height = c.getHeight () - insets.top - insets.bottom; -return rect; -}, "javax.swing.JComponent,java.awt.Rectangle"); -c$.updateRendererOrEditorUI = Clazz_defineMethod (c$, "updateRendererOrEditorUI", -function (rendererOrEditor) { -if (rendererOrEditor == null) { -return; -}var component = null; -if (Clazz_instanceOf (rendererOrEditor, java.awt.Component)) { -component = rendererOrEditor; -}if (Clazz_instanceOf (rendererOrEditor, javax.swing.DefaultCellEditor)) { -component = (rendererOrEditor).getComponent (); -}if (component != null) { -javax.swing.SwingUtilities.updateComponentTreeUI (component); -}}, "~O"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.SwingUtilities, "SharedOwnerFrame", java.awt.Frame, java.awt.event.WindowListener); -Clazz_defineMethod (c$, "addNotify", -function () { -Clazz_superCall (this, javax.swing.SwingUtilities.SharedOwnerFrame, "addNotify", []); -this.installListeners (); -}); -Clazz_defineMethod (c$, "installListeners", -function () { -var a = this.getOwnedWindows (); -for (var b = 0; b < a.length; b++) { -var c = a[b]; -if (c != null) { -c.removeWindowListener (this); -c.addWindowListener (this); -}} -}); -Clazz_overrideMethod (c$, "windowClosed", -function (a) { -var b = this.getOwnedWindows (); -for (var c = 0; c < b.length; c++) { -var d = b[c]; -if (d != null) { -if (d.isDisplayable ()) { -return; -}d.removeWindowListener (this); -}this.dispose (); -} -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowOpened", -function (a) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowClosing", -function (a) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowIconified", -function (a) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowDeiconified", -function (a) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowActivated", -function (a) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowDeactivated", -function (a) { -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "show", -function () { -}); -Clazz_overrideMethod (c$, "dispose", -function () { -}); -c$ = Clazz_p0p (); -c$.sharedOwnerFrameKey = c$.prototype.sharedOwnerFrameKey = new Clazz._O (); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.Window"], "java.awt.Frame", ["java.lang.IllegalArgumentException", "java.awt.Cursor", "$.IllegalComponentStateException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.maximizedBounds = null; -this.title = "Untitled"; -this.resizable = true; -this.undecorated = false; -this.mbManagement = false; -this.$state = 0; -this.ownedWindows = null; -this.menuBar = null; -Clazz_instantialize (this, arguments); -}, java.awt, "Frame", java.awt.Window); -Clazz_makeConstructor (c$, -function () { -this.construct (""); -}); -Clazz_makeConstructor (c$, -function (gc) { -this.construct ("", gc); -}, "java.awt.GraphicsConfiguration"); -Clazz_makeConstructor (c$, -function (title) { -Clazz_superConstructor (this, java.awt.Frame, []); -this.initFrame (title, null); -}, "~S"); -Clazz_makeConstructor (c$, -function (title, gc) { -Clazz_superConstructor (this, java.awt.Frame, [gc]); -this.initFrame (title, gc); -}, "~S,java.awt.GraphicsConfiguration"); -Clazz_defineMethod (c$, "initFrame", - function (title, gc) { -this.title = title; -}, "~S,java.awt.GraphicsConfiguration"); -Clazz_overrideMethod (c$, "constructComponentName", -function () { -{ -return "frame" + java.awt.Frame.$nameCounter++; -}}); -Clazz_defineMethod (c$, "addNotify", -function () { -if (this.peer == null) { -this.peer = this.getToolkit ().createFrame (this); -}var p = this.peer; -p.setMaximizedBounds (this.maximizedBounds); -Clazz_superCall (this, java.awt.Frame, "addNotify", []); -}); -Clazz_defineMethod (c$, "getTitle", -function () { -return this.title; -}); -Clazz_defineMethod (c$, "setTitle", -function (title) { -var oldTitle = this.title; -if (title == null) { -title = ""; -}{ -this.title = title; -}this.firePropertyChangeObject ("title", oldTitle, title); -}, "~S"); -Clazz_defineMethod (c$, "getIconImage", -function () { -var icons = this.icons; -if (icons != null) { -if (icons.size () > 0) { -return icons.get (0); -}}return null; -}); -Clazz_defineMethod (c$, "isResizable", -function () { -return this.resizable; -}); -Clazz_defineMethod (c$, "setResizable", -function (resizable) { -var oldResizable = this.resizable; -{ -this.resizable = resizable; -}this.firePropertyChangeBool ("resizable", oldResizable, resizable); -}, "~B"); -Clazz_defineMethod (c$, "setState", -function (state) { -var current = this.getExtendedState (); -if (state == 1 && (current & 1) == 0) { -this.setExtendedState (current | 1); -} else if (state == 0 && (current & 1) != 0) { -this.setExtendedState (current & -2); -}}, "~N"); -Clazz_defineMethod (c$, "setExtendedState", -function (state) { -if (!this.isFrameStateSupported (state)) { -return; -}this.$state = state; -}, "~N"); -Clazz_defineMethod (c$, "isFrameStateSupported", - function (state) { -if (!this.getToolkit ().isFrameStateSupported (state)) { -if (((state & 1) != 0) && !this.getToolkit ().isFrameStateSupported (1)) { -return false; -} else { -state &= -2; -}return this.getToolkit ().isFrameStateSupported (state); -}return true; -}, "~N"); -Clazz_defineMethod (c$, "getState", -function () { -return (this.getExtendedState () & 1) != 0 ? 1 : 0; -}); -Clazz_defineMethod (c$, "getExtendedState", -function () { -return this.$state; -}); -Clazz_defineMethod (c$, "setMaximizedBounds", -function (bounds) { -this.maximizedBounds = bounds; -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "getMaximizedBounds", -function () { -return this.maximizedBounds; -}); -Clazz_defineMethod (c$, "setUndecorated", -function (undecorated) { -{ -if (this.isDisplayable ()) { -throw new java.awt.IllegalComponentStateException ("The frame is displayable."); -}this.undecorated = undecorated; -}}, "~B"); -Clazz_defineMethod (c$, "isUndecorated", -function () { -return this.undecorated; -}); -Clazz_overrideMethod (c$, "removeNotify", -function () { -}); -Clazz_defineMethod (c$, "paramString", -function () { -var str = Clazz_superCall (this, java.awt.Frame, "paramString", []); -if (this.title != null) { -str += ",title=" + this.title; -}if (this.resizable) { -str += ",resizable"; -}this.getExtendedState (); -if (this.$state == 0) { -str += ",normal"; -} else { -if ((this.$state & 1) != 0) { -str += ",iconified"; -}if ((this.$state & 6) == 6) { -str += ",maximized"; -} else if ((this.$state & 2) != 0) { -str += ",maximized_horiz"; -} else if ((this.$state & 4) != 0) { -str += ",maximized_vert"; -}}return str; -}); -Clazz_defineMethod (c$, "setCursor", -function (cursorType) { -if (cursorType < 0 || cursorType > 13) { -throw new IllegalArgumentException ("illegal cursor type"); -}this.setCursor (java.awt.Cursor.getPredefinedCursor (cursorType)); -}, "~N"); -Clazz_defineMethod (c$, "getCursorType", -function () { -return (this.getCursor ().getType ()); -}); -c$.getFrames = Clazz_defineMethod (c$, "getFrames", -function () { -var allWindows = java.awt.Window.getWindows (); -var frameCount = 0; -for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) { -if (Clazz_instanceOf (w, java.awt.Frame)) { -frameCount++; -}} -var frames = new Array (frameCount); -var c = 0; -for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) { -if (Clazz_instanceOf (w, java.awt.Frame)) { -frames[c++] = w; -}} -return frames; -}); -Clazz_defineStatics (c$, -"DEFAULT_CURSOR", 0, -"CROSSHAIR_CURSOR", 1, -"TEXT_CURSOR", 2, -"WAIT_CURSOR", 3, -"SW_RESIZE_CURSOR", 4, -"SE_RESIZE_CURSOR", 5, -"NW_RESIZE_CURSOR", 6, -"NE_RESIZE_CURSOR", 7, -"N_RESIZE_CURSOR", 8, -"S_RESIZE_CURSOR", 9, -"W_RESIZE_CURSOR", 10, -"E_RESIZE_CURSOR", 11, -"HAND_CURSOR", 12, -"MOVE_CURSOR", 13, -"NORMAL", 0, -"ICONIFIED", 1, -"MAXIMIZED_HORIZ", 2, -"MAXIMIZED_VERT", 4, -"MAXIMIZED_BOTH", 6, -"$base", "frame", -"$nameCounter", 0); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.lang.IllegalStateException"], "java.awt.IllegalComponentStateException", null, function () { -c$ = Clazz_declareType (java.awt, "IllegalComponentStateException", IllegalStateException); -}); -Clazz_declarePackage ("javax.swing"); -c$ = Clazz_declareInterface (javax.swing, "SwingConstants"); -Clazz_defineStatics (c$, -"CENTER", 0, -"TOP", 1, -"LEFT", 2, -"BOTTOM", 3, -"RIGHT", 4, -"NORTH", 1, -"NORTH_EAST", 2, -"EAST", 3, -"SOUTH_EAST", 4, -"SOUTH", 5, -"SOUTH_WEST", 6, -"WEST", 7, -"NORTH_WEST", 8, -"HORIZONTAL", 0, -"VERTICAL", 1, -"LEADING", 10, -"TRAILING", 11, -"NEXT", 12, -"PREVIOUS", 13); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.Shape", "java.awt.geom.Rectangle2D"], "java.awt.Rectangle", ["java.awt.Dimension", "$.Point"], function () { -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.width = 0; -this.height = 0; -Clazz_instantialize (this, arguments); -}, java.awt, "Rectangle", java.awt.geom.Rectangle2D, java.awt.Shape); -Clazz_makeConstructor (c$, -function () { -this.construct (0, 0, 0, 0); -}); -Clazz_makeConstructor (c$, -function (r) { -this.construct (r.x, r.y, r.width, r.height); -}, "java.awt.Rectangle"); -Clazz_makeConstructor (c$, -function (x, y, width, height) { -Clazz_superConstructor (this, java.awt.Rectangle, []); -this.x = x; -this.y = y; -this.width = width; -this.height = height; -}, "~N,~N,~N,~N"); -Clazz_makeConstructor (c$, -function (width, height) { -this.construct (0, 0, width, height); -}, "~N,~N"); -Clazz_makeConstructor (c$, -function (p, d) { -this.construct (p.x, p.y, d.width, d.height); -}, "java.awt.Point,java.awt.Dimension"); -Clazz_makeConstructor (c$, -function (p) { -this.construct (p.x, p.y, 0, 0); -}, "java.awt.Point"); -Clazz_makeConstructor (c$, -function (d) { -this.construct (0, 0, d.width, d.height); -}, "java.awt.Dimension"); -Clazz_overrideMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_overrideMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_overrideMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz_overrideMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz_overrideMethod (c$, "getBounds", -function () { -return new java.awt.Rectangle (this.x, this.y, this.width, this.height); -}); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -return new java.awt.Rectangle (this.x, this.y, this.width, this.height); -}); -Clazz_defineMethod (c$, "setBounds", -function (r) { -this.reshape (r.x, r.y, r.width, r.height); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "setBounds", -function (x, y, width, height) { -this.reshape (x, y, width, height); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setRect", -function (x, y, width, height) { -var newx; -var newy; -var neww; -var newh; -if (x > 4.294967294E9) { -newx = 2147483647; -neww = -1; -} else { -newx = java.awt.Rectangle.clip (x, false); -if (width >= 0) width += x - newx; -neww = java.awt.Rectangle.clip (width, width >= 0); -}if (y > 4.294967294E9) { -newy = 2147483647; -newh = -1; -} else { -newy = java.awt.Rectangle.clip (y, false); -if (height >= 0) height += y - newy; -newh = java.awt.Rectangle.clip (height, height >= 0); -}this.reshape (newx, newy, neww, newh); -}, "~N,~N,~N,~N"); -c$.clip = Clazz_defineMethod (c$, "clip", - function (v, doceil) { -if (v <= -2147483648) { -return -2147483648; -}if (v >= 2147483647) { -return 2147483647; -}return Clazz_doubleToInt (doceil ? Math.ceil (v) : Math.floor (v)); -}, "~N,~B"); -Clazz_defineMethod (c$, "reshape", -function (x, y, width, height) { -this.x = x; -this.y = y; -this.width = width; -this.height = height; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getLocation", -function () { -return new java.awt.Point (this.x, this.y); -}); -Clazz_defineMethod (c$, "setLocation", -function (p) { -this.setLocation (p.x, p.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "setLocation", -function (x, y) { -this.move (x, y); -}, "~N,~N"); -Clazz_defineMethod (c$, "move", -function (x, y) { -this.x = x; -this.y = y; -}, "~N,~N"); -Clazz_defineMethod (c$, "translate", -function (dx, dy) { -var oldv = this.x; -var newv = oldv + dx; -if (dx < 0) { -if (newv > oldv) { -if (this.width >= 0) { -this.width += newv - -2147483648; -}newv = -2147483648; -}} else { -if (newv < oldv) { -if (this.width >= 0) { -this.width += newv - 2147483647; -if (this.width < 0) this.width = 2147483647; -}newv = 2147483647; -}}this.x = newv; -oldv = this.y; -newv = oldv + dy; -if (dy < 0) { -if (newv > oldv) { -if (this.height >= 0) { -this.height += newv - -2147483648; -}newv = -2147483648; -}} else { -if (newv < oldv) { -if (this.height >= 0) { -this.height += newv - 2147483647; -if (this.height < 0) this.height = 2147483647; -}newv = 2147483647; -}}this.y = newv; -}, "~N,~N"); -Clazz_defineMethod (c$, "getSize", -function () { -return new java.awt.Dimension (this.width, this.height); -}); -Clazz_defineMethod (c$, "setSize", -function (d) { -this.setSize (d.width, d.height); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "setSize", -function (width, height) { -this.resize (width, height); -}, "~N,~N"); -Clazz_defineMethod (c$, "resize", -function (width, height) { -this.width = width; -this.height = height; -}, "~N,~N"); -Clazz_defineMethod (c$, "contains", -function (p) { -return this.contains (p.x, p.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "contains", -function (x, y) { -return this.inside (x, y); -}, "~N,~N"); -Clazz_defineMethod (c$, "contains", -function (r) { -return this.contains (r.x, r.y, r.width, r.height); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "contains", -function (X, Y, W, H) { -var w = this.width; -var h = this.height; -if ((w | h | W | H) < 0) { -return false; -}var x = this.x; -var y = this.y; -if (X < x || Y < y) { -return false; -}w += x; -W += X; -if (W <= X) { -if (w >= x || W > w) return false; -} else { -if (w >= x && W > w) return false; -}h += y; -H += Y; -if (H <= Y) { -if (h >= y || H > h) return false; -} else { -if (h >= y && H > h) return false; -}return true; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "inside", -function (X, Y) { -var w = this.width; -var h = this.height; -if ((w | h) < 0) { -return false; -}var x = this.x; -var y = this.y; -if (X < x || Y < y) { -return false; -}w += x; -h += y; -return ((w < x || w > X) && (h < y || h > Y)); -}, "~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (r) { -var tw = this.width; -var th = this.height; -var rw = r.width; -var rh = r.height; -if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) { -return false; -}var tx = this.x; -var ty = this.y; -var rx = r.x; -var ry = r.y; -rw += rx; -rh += ry; -tw += tx; -th += ty; -return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry)); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "intersection", -function (r) { -var tx1 = this.x; -var ty1 = this.y; -var rx1 = r.x; -var ry1 = r.y; -var tx2 = tx1; -tx2 += this.width; -var ty2 = ty1; -ty2 += this.height; -var rx2 = rx1; -rx2 += r.width; -var ry2 = ry1; -ry2 += r.height; -if (tx1 < rx1) tx1 = rx1; -if (ty1 < ry1) ty1 = ry1; -if (tx2 > rx2) tx2 = rx2; -if (ty2 > ry2) ty2 = ry2; -tx2 -= tx1; -ty2 -= ty1; -if (tx2 < -2147483648) tx2 = -2147483648; -if (ty2 < -2147483648) ty2 = -2147483648; -return new java.awt.Rectangle (tx1, ty1, tx2, ty2); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "union", -function (r) { -var tx2 = this.width; -var ty2 = this.height; -if ((tx2 | ty2) < 0) { -return new java.awt.Rectangle (r); -}var rx2 = r.width; -var ry2 = r.height; -if ((rx2 | ry2) < 0) { -return new java.awt.Rectangle (this); -}var tx1 = this.x; -var ty1 = this.y; -tx2 += tx1; -ty2 += ty1; -var rx1 = r.x; -var ry1 = r.y; -rx2 += rx1; -ry2 += ry1; -if (tx1 > rx1) tx1 = rx1; -if (ty1 > ry1) ty1 = ry1; -if (tx2 < rx2) tx2 = rx2; -if (ty2 < ry2) ty2 = ry2; -tx2 -= tx1; -ty2 -= ty1; -if (tx2 > 2147483647) tx2 = 2147483647; -if (ty2 > 2147483647) ty2 = 2147483647; -return new java.awt.Rectangle (tx1, ty1, tx2, ty2); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "add", -function (newx, newy) { -if ((this.width | this.height) < 0) { -this.x = newx; -this.y = newy; -this.width = this.height = 0; -return; -}var x1 = this.x; -var y1 = this.y; -var x2 = this.width; -var y2 = this.height; -x2 += x1; -y2 += y1; -if (x1 > newx) x1 = newx; -if (y1 > newy) y1 = newy; -if (x2 < newx) x2 = newx; -if (y2 < newy) y2 = newy; -x2 -= x1; -y2 -= y1; -if (x2 > 2147483647) x2 = 2147483647; -if (y2 > 2147483647) y2 = 2147483647; -this.reshape (x1, y1, x2, y2); -}, "~N,~N"); -Clazz_defineMethod (c$, "add", -function (pt) { -this.add (pt.x, pt.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "add", -function (r) { -var tx2 = this.width; -var ty2 = this.height; -if ((tx2 | ty2) < 0) { -this.reshape (r.x, r.y, r.width, r.height); -}var rx2 = r.width; -var ry2 = r.height; -if ((rx2 | ry2) < 0) { -return; -}var tx1 = this.x; -var ty1 = this.y; -tx2 += tx1; -ty2 += ty1; -var rx1 = r.x; -var ry1 = r.y; -rx2 += rx1; -ry2 += ry1; -if (tx1 > rx1) tx1 = rx1; -if (ty1 > ry1) ty1 = ry1; -if (tx2 < rx2) tx2 = rx2; -if (ty2 < ry2) ty2 = ry2; -tx2 -= tx1; -ty2 -= ty1; -if (tx2 > 2147483647) tx2 = 2147483647; -if (ty2 > 2147483647) ty2 = 2147483647; -this.reshape (tx1, ty1, tx2, ty2); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "grow", -function (h, v) { -var x0 = this.x; -var y0 = this.y; -var x1 = this.width; -var y1 = this.height; -x1 += x0; -y1 += y0; -x0 -= h; -y0 -= v; -x1 += h; -y1 += v; -if (x1 < x0) { -x1 -= x0; -if (x1 < -2147483648) x1 = -2147483648; -if (x0 < -2147483648) x0 = -2147483648; - else if (x0 > 2147483647) x0 = 2147483647; -} else { -if (x0 < -2147483648) x0 = -2147483648; - else if (x0 > 2147483647) x0 = 2147483647; -x1 -= x0; -if (x1 < -2147483648) x1 = -2147483648; - else if (x1 > 2147483647) x1 = 2147483647; -}if (y1 < y0) { -y1 -= y0; -if (y1 < -2147483648) y1 = -2147483648; -if (y0 < -2147483648) y0 = -2147483648; - else if (y0 > 2147483647) y0 = 2147483647; -} else { -if (y0 < -2147483648) y0 = -2147483648; - else if (y0 > 2147483647) y0 = 2147483647; -y1 -= y0; -if (y1 < -2147483648) y1 = -2147483648; - else if (y1 > 2147483647) y1 = 2147483647; -}this.reshape (x0, y0, x1, y1); -}, "~N,~N"); -Clazz_overrideMethod (c$, "isEmpty", -function () { -return (this.width <= 0) || (this.height <= 0); -}); -Clazz_defineMethod (c$, "outcode", -function (x, y) { -var out = 0; -if (this.width <= 0) { -out |= 5; -} else if (x < this.x) { -out |= 1; -} else if (x > this.x + this.width) { -out |= 4; -}if (this.height <= 0) { -out |= 10; -} else if (y < this.y) { -out |= 2; -} else if (y > this.y + this.height) { -out |= 8; -}return out; -}, "~N,~N"); -Clazz_overrideMethod (c$, "createIntersection", -function (r) { -if (Clazz_instanceOf (r, java.awt.Rectangle)) { -return this.intersection (r); -}var dest = new java.awt.geom.Rectangle2D.Double (); -java.awt.geom.Rectangle2D.intersect (this, r, dest); -return dest; -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "createUnion", -function (r) { -if (Clazz_instanceOf (r, java.awt.Rectangle)) { -return this.union (r); -}var dest = new java.awt.geom.Rectangle2D.Double (); -java.awt.geom.Rectangle2D.union (this, r, dest); -return dest; -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "equals", -function (obj) { -if (Clazz_instanceOf (obj, java.awt.Rectangle)) { -var r = obj; -return ((this.x == r.x) && (this.y == r.y) && (this.width == r.width) && (this.height == r.height)); -}return Clazz_superCall (this, java.awt.Rectangle, "equals", [obj]); -}, "~O"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",width=" + this.width + ",height=" + this.height + "]"; -}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_declareInterface (java.awt, "Shape"); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () { -c$ = Clazz_declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.Rectangle2D, []); -}); -Clazz_defineMethod (c$, "setRect", -function (r) { -this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "intersectsLine", -function (x1, y1, x2, y2) { -var out1; -var out2; -if ((out2 = this.outcode (x2, y2)) == 0) { -return true; -}while ((out1 = this.outcode (x1, y1)) != 0) { -if ((out1 & out2) != 0) { -return false; -}if ((out1 & (5)) != 0) { -var x = this.getX (); -if ((out1 & 4) != 0) { -x += this.getWidth (); -}y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1); -x1 = x; -} else { -var y = this.getY (); -if ((out1 & 8) != 0) { -y += this.getHeight (); -}x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1); -y1 = y; -}} -return true; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "intersectsLine", -function (l) { -return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ()); -}, "java.awt.geom.Line2D"); -Clazz_defineMethod (c$, "outcode", -function (p) { -return this.outcode (p.getX (), p.getY ()); -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "setFrame", -function (x, y, w, h) { -this.setRect (x, y, w, h); -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -return this.clone (); -}); -Clazz_defineMethod (c$, "contains", -function (x, y) { -var x0 = this.getX (); -var y0 = this.getY (); -return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ()); -}, "~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (x, y, w, h) { -if (this.isEmpty () || w <= 0 || h <= 0) { -return false; -}var x0 = this.getX (); -var y0 = this.getY (); -return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ()); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "contains", -function (x, y, w, h) { -if (this.isEmpty () || w <= 0 || h <= 0) { -return false; -}var x0 = this.getX (); -var y0 = this.getY (); -return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ()); -}, "~N,~N,~N,~N"); -c$.intersect = Clazz_defineMethod (c$, "intersect", -function (src1, src2, dest) { -var x1 = Math.max (src1.getMinX (), src2.getMinX ()); -var y1 = Math.max (src1.getMinY (), src2.getMinY ()); -var x2 = Math.min (src1.getMaxX (), src2.getMaxX ()); -var y2 = Math.min (src1.getMaxY (), src2.getMaxY ()); -dest.setFrame (x1, y1, x2 - x1, y2 - y1); -}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D"); -c$.union = Clazz_defineMethod (c$, "union", -function (src1, src2, dest) { -var x1 = Math.min (src1.getMinX (), src2.getMinX ()); -var y1 = Math.min (src1.getMinY (), src2.getMinY ()); -var x2 = Math.max (src1.getMaxX (), src2.getMaxX ()); -var y2 = Math.max (src1.getMaxY (), src2.getMaxY ()); -dest.setFrameFromDiagonal (x1, y1, x2, y2); -}, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "add", -function (newx, newy) { -var x1 = Math.min (this.getMinX (), newx); -var x2 = Math.max (this.getMaxX (), newx); -var y1 = Math.min (this.getMinY (), newy); -var y2 = Math.max (this.getMaxY (), newy); -this.setRect (x1, y1, x2 - x1, y2 - y1); -}, "~N,~N"); -Clazz_defineMethod (c$, "add", -function (pt) { -this.add (pt.getX (), pt.getY ()); -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "add", -function (r) { -var x1 = Math.min (this.getMinX (), r.getMinX ()); -var x2 = Math.max (this.getMaxX (), r.getMaxX ()); -var y1 = Math.min (this.getMinY (), r.getMinY ()); -var y2 = Math.max (this.getMaxY (), r.getMaxY ()); -this.setRect (x1, y1, x2 - x1, y2 - y1); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "getPathIterator", -function (at) { -return new java.awt.geom.RectIterator (this, at); -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "getPathIterator", -function (at, flatness) { -return new java.awt.geom.RectIterator (this, at); -}, "java.awt.geom.AffineTransform,~N"); -Clazz_overrideMethod (c$, "hashCode", -function () { -var bits = java.lang.Double.doubleToLongBits (this.getX ()); -bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37; -bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43; -bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47; -return ((bits) ^ ((bits >> 32))); -}); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (obj === this) { -return true; -}if (Clazz_instanceOf (obj, java.awt.geom.Rectangle2D)) { -var r2d = obj; -return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ())); -}return false; -}, "~O"); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.width = 0; -this.height = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D); -Clazz_makeConstructor (c$, -function (a, b, c, d) { -Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Float, []); -{ -if (arguments.length == 0) -return; -}this.setRect (a, b, c, d); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_defineMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_defineMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz_defineMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz_overrideMethod (c$, "isEmpty", -function () { -return (this.width <= 0.0) || (this.height <= 0.0); -}); -Clazz_defineMethod (c$, "setRect", -function (a, b, c, d) { -this.x = a; -this.y = b; -this.width = c; -this.height = d; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setRect", -function (a, b, c, d) { -this.x = a; -this.y = b; -this.width = c; -this.height = d; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setRect", -function (a) { -this.x = a.getX (); -this.y = a.getY (); -this.width = a.getWidth (); -this.height = a.getHeight (); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "outcode", -function (a, b) { -var c = 0; -if (this.width <= 0) { -c |= 5; -} else if (a < this.x) { -c |= 1; -} else if (a > this.x + this.width) { -c |= 4; -}if (this.height <= 0) { -c |= 10; -} else if (b < this.y) { -c |= 2; -} else if (b > this.y + this.height) { -c |= 8; -}return c; -}, "~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -return new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height); -}); -Clazz_overrideMethod (c$, "createIntersection", -function (a) { -var b; -if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) { -b = new java.awt.geom.Rectangle2D.Float (); -} else { -b = new java.awt.geom.Rectangle2D.Double (); -}java.awt.geom.Rectangle2D.intersect (this, a, b); -return b; -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "createUnion", -function (a) { -var b; -if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) { -b = new java.awt.geom.Rectangle2D.Float (); -} else { -b = new java.awt.geom.Rectangle2D.Double (); -}java.awt.geom.Rectangle2D.union (this, a, b); -return b; -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]"; -}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.width = 0; -this.height = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []); -}); -Clazz_makeConstructor (c$, -function (a, b, c, d) { -Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []); -this.setRect (a, b, c, d); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_defineMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_defineMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz_defineMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz_overrideMethod (c$, "isEmpty", -function () { -return (this.width <= 0.0) || (this.height <= 0.0); -}); -Clazz_defineMethod (c$, "setRect", -function (a, b, c, d) { -this.x = a; -this.y = b; -this.width = c; -this.height = d; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setRect", -function (a) { -this.x = a.getX (); -this.y = a.getY (); -this.width = a.getWidth (); -this.height = a.getHeight (); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "outcode", -function (a, b) { -var c = 0; -if (this.width <= 0) { -c |= 5; -} else if (a < this.x) { -c |= 1; -} else if (a > this.x + this.width) { -c |= 4; -}if (this.height <= 0) { -c |= 10; -} else if (b < this.y) { -c |= 2; -} else if (b > this.y + this.height) { -c |= 8; -}return c; -}, "~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -return new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height); -}); -Clazz_overrideMethod (c$, "createIntersection", -function (a) { -var b = new java.awt.geom.Rectangle2D.Double (); -java.awt.geom.Rectangle2D.intersect (this, a, b); -return b; -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "createUnion", -function (a) { -var b = new java.awt.geom.Rectangle2D.Double (); -java.awt.geom.Rectangle2D.union (this, a, b); -return b; -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]"; -}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"OUT_LEFT", 1, -"OUT_TOP", 2, -"OUT_RIGHT", 4, -"OUT_BOTTOM", 8); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.Shape"], "java.awt.geom.RectangularShape", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator"], function () { -c$ = Clazz_declareType (java.awt.geom, "RectangularShape", null, [java.awt.Shape, Cloneable]); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "getMinX", -function () { -return this.getX (); -}); -Clazz_defineMethod (c$, "getMinY", -function () { -return this.getY (); -}); -Clazz_defineMethod (c$, "getMaxX", -function () { -return this.getX () + this.getWidth (); -}); -Clazz_defineMethod (c$, "getMaxY", -function () { -return this.getY () + this.getHeight (); -}); -Clazz_defineMethod (c$, "getCenterX", -function () { -return this.getX () + this.getWidth () / 2.0; -}); -Clazz_defineMethod (c$, "getCenterY", -function () { -return this.getY () + this.getHeight () / 2.0; -}); -Clazz_defineMethod (c$, "getFrame", -function () { -return new java.awt.geom.Rectangle2D.Double (this.getX (), this.getY (), this.getWidth (), this.getHeight ()); -}); -Clazz_defineMethod (c$, "setFrame", -function (loc, size) { -this.setFrame (loc.getX (), loc.getY (), size.getWidth (), size.getHeight ()); -}, "java.awt.geom.Point2D,java.awt.geom.Dimension2D"); -Clazz_defineMethod (c$, "setFrame", -function (r) { -this.setFrame (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "setFrameFromDiagonal", -function (x1, y1, x2, y2) { -if (x2 < x1) { -var t = x1; -x1 = x2; -x2 = t; -}if (y2 < y1) { -var t = y1; -y1 = y2; -y2 = t; -}this.setFrame (x1, y1, x2 - x1, y2 - y1); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setFrameFromDiagonal", -function (p1, p2) { -this.setFrameFromDiagonal (p1.getX (), p1.getY (), p2.getX (), p2.getY ()); -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "setFrameFromCenter", -function (centerX, centerY, cornerX, cornerY) { -var halfW = Math.abs (cornerX - centerX); -var halfH = Math.abs (cornerY - centerY); -this.setFrame (centerX - halfW, centerY - halfH, halfW * 2.0, halfH * 2.0); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setFrameFromCenter", -function (center, corner) { -this.setFrameFromCenter (center.getX (), center.getY (), corner.getX (), corner.getY ()); -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "contains", -function (p) { -return this.contains (p.getX (), p.getY ()); -}, "java.awt.geom.Point2D"); -Clazz_overrideMethod (c$, "intersects", -function (r) { -return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "contains", -function (r) { -return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "getBounds", -function () { -var width = this.getWidth (); -var height = this.getHeight (); -if (width < 0 || height < 0) { -return new java.awt.Rectangle (); -}var x = this.getX (); -var y = this.getY (); -var x1 = Math.floor (x); -var y1 = Math.floor (y); -var x2 = Math.ceil (x + width); -var y2 = Math.ceil (y + height); -return new java.awt.Rectangle (Clazz_doubleToInt (x1), Clazz_doubleToInt (y1), Clazz_doubleToInt (x2 - x1), Clazz_doubleToInt (y2 - y1)); -}); -Clazz_overrideMethod (c$, "getPathIterator", -function (at, flatness) { -return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); -}, "java.awt.geom.AffineTransform,~N"); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.geom.RectangularShape, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.FlatteningPathIterator", ["java.lang.IllegalArgumentException", "java.util.NoSuchElementException", "java.awt.geom.CubicCurve2D", "$.QuadCurve2D"], function () { -c$ = Clazz_decorateAsClass (function () { -this.src = null; -this.squareflat = 0; -this.limit = 0; -this.hold = null; -this.curx = 0; -this.cury = 0; -this.movx = 0; -this.movy = 0; -this.holdType = 0; -this.holdEnd = 0; -this.holdIndex = 0; -this.levels = null; -this.levelIndex = 0; -this.done = false; -Clazz_instantialize (this, arguments); -}, java.awt.geom, "FlatteningPathIterator", null, java.awt.geom.PathIterator); -Clazz_prepareFields (c$, function () { -this.hold = Clazz_newDoubleArray (14, 0); -}); -Clazz_makeConstructor (c$, -function (src, flatness) { -this.construct (src, flatness, 10); -}, "java.awt.geom.PathIterator,~N"); -Clazz_makeConstructor (c$, -function (src, flatness, limit) { -if (flatness < 0.0) { -throw new IllegalArgumentException ("flatness must be >= 0"); -}if (limit < 0) { -throw new IllegalArgumentException ("limit must be >= 0"); -}this.src = src; -this.squareflat = flatness * flatness; -this.limit = limit; -this.levels = Clazz_newIntArray (limit + 1, 0); -this.next (false); -}, "java.awt.geom.PathIterator,~N,~N"); -Clazz_defineMethod (c$, "getFlatness", -function () { -return Math.sqrt (this.squareflat); -}); -Clazz_defineMethod (c$, "getRecursionLimit", -function () { -return this.limit; -}); -Clazz_defineMethod (c$, "getWindingRule", -function () { -return this.src.getWindingRule (); -}); -Clazz_defineMethod (c$, "isDone", -function () { -return this.done; -}); -Clazz_defineMethod (c$, "ensureHoldCapacity", -function (want) { -if (this.holdIndex - want < 0) { -var have = this.hold.length - this.holdIndex; -var newsize = this.hold.length + 24; -var newhold = Clazz_newDoubleArray (newsize, 0); -System.arraycopy (this.hold, this.holdIndex, newhold, this.holdIndex + 24, have); -this.hold = newhold; -this.holdIndex += 24; -this.holdEnd += 24; -}}, "~N"); -Clazz_defineMethod (c$, "next", -function () { -this.next (true); -}); -Clazz_defineMethod (c$, "next", - function (doNext) { -var level; -if (this.holdIndex >= this.holdEnd) { -if (doNext) { -this.src.next (); -}if (this.src.isDone ()) { -this.done = true; -return; -}this.holdType = this.src.currentSegment (this.hold); -this.levelIndex = 0; -this.levels[0] = 0; -}switch (this.holdType) { -case 0: -case 1: -this.curx = this.hold[0]; -this.cury = this.hold[1]; -if (this.holdType == 0) { -this.movx = this.curx; -this.movy = this.cury; -}this.holdIndex = 0; -this.holdEnd = 0; -break; -case 4: -this.curx = this.movx; -this.cury = this.movy; -this.holdIndex = 0; -this.holdEnd = 0; -break; -case 2: -if (this.holdIndex >= this.holdEnd) { -this.holdIndex = this.hold.length - 6; -this.holdEnd = this.hold.length - 2; -this.hold[this.holdIndex + 0] = this.curx; -this.hold[this.holdIndex + 1] = this.cury; -this.hold[this.holdIndex + 2] = this.hold[0]; -this.hold[this.holdIndex + 3] = this.hold[1]; -this.hold[this.holdIndex + 4] = this.curx = this.hold[2]; -this.hold[this.holdIndex + 5] = this.cury = this.hold[3]; -}level = this.levels[this.levelIndex]; -while (level < this.limit) { -if (java.awt.geom.QuadCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) { -break; -}this.ensureHoldCapacity (4); -java.awt.geom.QuadCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 4, this.hold, this.holdIndex); -this.holdIndex -= 4; -level++; -this.levels[this.levelIndex] = level; -this.levelIndex++; -this.levels[this.levelIndex] = level; -} -this.holdIndex += 4; -this.levelIndex--; -break; -case 3: -if (this.holdIndex >= this.holdEnd) { -this.holdIndex = this.hold.length - 8; -this.holdEnd = this.hold.length - 2; -this.hold[this.holdIndex + 0] = this.curx; -this.hold[this.holdIndex + 1] = this.cury; -this.hold[this.holdIndex + 2] = this.hold[0]; -this.hold[this.holdIndex + 3] = this.hold[1]; -this.hold[this.holdIndex + 4] = this.hold[2]; -this.hold[this.holdIndex + 5] = this.hold[3]; -this.hold[this.holdIndex + 6] = this.curx = this.hold[4]; -this.hold[this.holdIndex + 7] = this.cury = this.hold[5]; -}level = this.levels[this.levelIndex]; -while (level < this.limit) { -if (java.awt.geom.CubicCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) { -break; -}this.ensureHoldCapacity (6); -java.awt.geom.CubicCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 6, this.hold, this.holdIndex); -this.holdIndex -= 6; -level++; -this.levels[this.levelIndex] = level; -this.levelIndex++; -this.levels[this.levelIndex] = level; -} -this.holdIndex += 6; -this.levelIndex--; -break; -} -}, "~B"); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("flattening iterator out of bounds"); -}var type = this.holdType; -if (type != 4) { -coords[0] = this.hold[this.holdIndex + 0]; -coords[1] = this.hold[this.holdIndex + 1]; -if (type != 0) { -type = 1; -}}return type; -}, "~A"); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("flattening iterator out of bounds"); -}var type = this.holdType; -if (type != 4) { -coords[0] = this.hold[this.holdIndex + 0]; -coords[1] = this.hold[this.holdIndex + 1]; -if (type != 0) { -type = 1; -}}return type; -}, "~A"); -Clazz_defineStatics (c$, -"GROW_SIZE", 24); -}); -Clazz_declarePackage ("java.awt.geom"); -c$ = Clazz_declareInterface (java.awt.geom, "PathIterator"); -Clazz_defineStatics (c$, -"WIND_EVEN_ODD", 0, -"WIND_NON_ZERO", 1, -"SEG_MOVETO", 0, -"SEG_LINETO", 1, -"SEG_QUADTO", 2, -"SEG_CUBICTO", 3, -"SEG_CLOSE", 4); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.Shape"], "java.awt.geom.CubicCurve2D", ["java.lang.InternalError", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadCurve2D", "$.Rectangle2D", "jssun.awt.geom.Curve", "swingjs.api.Interface"], function () { -c$ = Clazz_declareType (java.awt.geom, "CubicCurve2D", null, [java.awt.Shape, Cloneable]); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "setCurve", -function (coords, offset) { -this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]); -}, "~A,~N"); -Clazz_defineMethod (c$, "setCurve", -function (p1, cp1, cp2, p2) { -this.setCurve (p1.getX (), p1.getY (), cp1.getX (), cp1.getY (), cp2.getX (), cp2.getY (), p2.getX (), p2.getY ()); -}, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "setCurve", -function (pts, offset) { -this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY (), pts[offset + 3].getX (), pts[offset + 3].getY ()); -}, "~A,~N"); -Clazz_defineMethod (c$, "setCurve", -function (c) { -this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX1 (), c.getCtrlY1 (), c.getCtrlX2 (), c.getCtrlY2 (), c.getX2 (), c.getY2 ()); -}, "java.awt.geom.CubicCurve2D"); -c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", -function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) { -return Math.max (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx1, ctrly1), java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx2, ctrly2)); -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", -function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) { -return Math.sqrt (java.awt.geom.CubicCurve2D.getFlatnessSq (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2)); -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", -function (coords, offset) { -return java.awt.geom.CubicCurve2D.getFlatnessSq (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]); -}, "~A,~N"); -c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", -function (coords, offset) { -return java.awt.geom.CubicCurve2D.getFlatness (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]); -}, "~A,~N"); -Clazz_defineMethod (c$, "getFlatnessSq", -function () { -return java.awt.geom.CubicCurve2D.getFlatnessSq (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ()); -}); -Clazz_defineMethod (c$, "getFlatness", -function () { -return java.awt.geom.CubicCurve2D.getFlatness (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ()); -}); -Clazz_defineMethod (c$, "subdivide", -function (left, right) { -java.awt.geom.CubicCurve2D.subdivide (this, left, right); -}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D"); -c$.subdivide = Clazz_defineMethod (c$, "subdivide", -function (src, left, right) { -var x1 = src.getX1 (); -var y1 = src.getY1 (); -var ctrlx1 = src.getCtrlX1 (); -var ctrly1 = src.getCtrlY1 (); -var ctrlx2 = src.getCtrlX2 (); -var ctrly2 = src.getCtrlY2 (); -var x2 = src.getX2 (); -var y2 = src.getY2 (); -var centerx = (ctrlx1 + ctrlx2) / 2.0; -var centery = (ctrly1 + ctrly2) / 2.0; -ctrlx1 = (x1 + ctrlx1) / 2.0; -ctrly1 = (y1 + ctrly1) / 2.0; -ctrlx2 = (x2 + ctrlx2) / 2.0; -ctrly2 = (y2 + ctrly2) / 2.0; -var ctrlx12 = (ctrlx1 + centerx) / 2.0; -var ctrly12 = (ctrly1 + centery) / 2.0; -var ctrlx21 = (ctrlx2 + centerx) / 2.0; -var ctrly21 = (ctrly2 + centery) / 2.0; -centerx = (ctrlx12 + ctrlx21) / 2.0; -centery = (ctrly12 + ctrly21) / 2.0; -if (left != null) { -left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx12, ctrly12, centerx, centery); -}if (right != null) { -right.setCurve (centerx, centery, ctrlx21, ctrly21, ctrlx2, ctrly2, x2, y2); -}}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D"); -c$.subdivide = Clazz_defineMethod (c$, "subdivide", -function (src, srcoff, left, leftoff, right, rightoff) { -var x1 = src[srcoff + 0]; -var y1 = src[srcoff + 1]; -var ctrlx1 = src[srcoff + 2]; -var ctrly1 = src[srcoff + 3]; -var ctrlx2 = src[srcoff + 4]; -var ctrly2 = src[srcoff + 5]; -var x2 = src[srcoff + 6]; -var y2 = src[srcoff + 7]; -if (left != null) { -left[leftoff + 0] = x1; -left[leftoff + 1] = y1; -}if (right != null) { -right[rightoff + 6] = x2; -right[rightoff + 7] = y2; -}x1 = (x1 + ctrlx1) / 2.0; -y1 = (y1 + ctrly1) / 2.0; -x2 = (x2 + ctrlx2) / 2.0; -y2 = (y2 + ctrly2) / 2.0; -var centerx = (ctrlx1 + ctrlx2) / 2.0; -var centery = (ctrly1 + ctrly2) / 2.0; -ctrlx1 = (x1 + centerx) / 2.0; -ctrly1 = (y1 + centery) / 2.0; -ctrlx2 = (x2 + centerx) / 2.0; -ctrly2 = (y2 + centery) / 2.0; -centerx = (ctrlx1 + ctrlx2) / 2.0; -centery = (ctrly1 + ctrly2) / 2.0; -if (left != null) { -left[leftoff + 2] = x1; -left[leftoff + 3] = y1; -left[leftoff + 4] = ctrlx1; -left[leftoff + 5] = ctrly1; -left[leftoff + 6] = centerx; -left[leftoff + 7] = centery; -}if (right != null) { -right[rightoff + 0] = centerx; -right[rightoff + 1] = centery; -right[rightoff + 2] = ctrlx2; -right[rightoff + 3] = ctrly2; -right[rightoff + 4] = x2; -right[rightoff + 5] = y2; -}}, "~A,~N,~A,~N,~A,~N"); -c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", -function (eqn) { -return java.awt.geom.CubicCurve2D.solveCubic (eqn, eqn); -}, "~A"); -c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", -function (eqn, res) { -var d = eqn[3]; -if (d == 0.0) { -return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res); -}var a = eqn[2] / d; -var b = eqn[1] / d; -var c = eqn[0] / d; -var roots = 0; -var Q = (a * a - 3.0 * b) / 9.0; -var R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0; -var R2 = R * R; -var Q3 = Q * Q * Q; -a = a / 3.0; -if (R2 < Q3) { -var theta = Math.acos (R / Math.sqrt (Q3)); -Q = -2.0 * Math.sqrt (Q); -if (res === eqn) { -eqn = Clazz_newDoubleArray (4, 0); -System.arraycopy (res, 0, eqn, 0, 4); -}res[roots++] = Q * Math.cos (theta / 3.0) - a; -res[roots++] = Q * Math.cos ((theta + 6.283185307179586) / 3.0) - a; -res[roots++] = Q * Math.cos ((theta - 6.283185307179586) / 3.0) - a; -java.awt.geom.CubicCurve2D.fixRoots (res, eqn); -} else { -var neg = (R < 0.0); -var S = Math.sqrt (R2 - Q3); -if (neg) { -R = -R; -}var A = Math.pow (R + S, 0.3333333333333333); -if (!neg) { -A = -A; -}var B = (A == 0.0) ? 0.0 : (Q / A); -res[roots++] = (A + B) - a; -}return roots; -}, "~A,~A"); -c$.fixRoots = Clazz_defineMethod (c$, "fixRoots", - function (res, eqn) { -var EPSILON = 1E-5; -for (var i = 0; i < 3; i++) { -var t = res[i]; -if (Math.abs (t) < 1.0E-5) { -res[i] = java.awt.geom.CubicCurve2D.findZero (t, 0, eqn); -} else if (Math.abs (t - 1) < 1.0E-5) { -res[i] = java.awt.geom.CubicCurve2D.findZero (t, 1, eqn); -}} -}, "~A,~A"); -c$.solveEqn = Clazz_defineMethod (c$, "solveEqn", - function (eqn, order, t) { -var v = eqn[order]; -while (--order >= 0) { -v = v * t + eqn[order]; -} -return v; -}, "~A,~N,~N"); -c$.findZero = Clazz_defineMethod (c$, "findZero", - function (t, target, eqn) { -var slopeqn = Clazz_newDoubleArray (-1, [eqn[1], 2 * eqn[2], 3 * eqn[3]]); -var slope; -var origdelta = 0; -var origt = t; -while (true) { -slope = java.awt.geom.CubicCurve2D.solveEqn (slopeqn, 2, t); -if (slope == 0) { -return t; -}var y = java.awt.geom.CubicCurve2D.solveEqn (eqn, 3, t); -if (y == 0) { -return t; -}var delta = -(y / slope); -if (origdelta == 0) { -origdelta = delta; -}if (t < target) { -if (delta < 0) return t; -} else if (t > target) { -if (delta > 0) return t; -} else { -return (delta > 0 ? (target + 4.9E-324) : (target - 4.9E-324)); -}var newt = t + delta; -if (t == newt) { -return t; -}if (delta * origdelta < 0) { -var tag = (origt < t ? java.awt.geom.CubicCurve2D.getTag (target, origt, t) : java.awt.geom.CubicCurve2D.getTag (target, t, origt)); -if (tag != 0) { -return (origt + t) / 2; -}t = target; -} else { -t = newt; -}} -}, "~N,~N,~A"); -Clazz_defineMethod (c$, "contains", -function (x, y) { -if (!(x * 0.0 + y * 0.0 == 0.0)) { -return false; -}var x1 = this.getX1 (); -var y1 = this.getY1 (); -var x2 = this.getX2 (); -var y2 = this.getY2 (); -var crossings = (jssun.awt.geom.Curve.pointCrossingsForLine (x, y, x1, y1, x2, y2) + jssun.awt.geom.Curve.pointCrossingsForCubic (x, y, x1, y1, this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), x2, y2, 0)); -return ((crossings & 1) == 1); -}, "~N,~N"); -Clazz_defineMethod (c$, "contains", -function (p) { -return this.contains (p.getX (), p.getY ()); -}, "java.awt.geom.Point2D"); -c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", - function (eqn, val, c1, cp1, cp2, c2) { -eqn[0] = c1 - val; -eqn[1] = (cp1 - c1) * 3.0; -eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0; -eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1; -return; -}, "~A,~N,~N,~N,~N,~N"); -c$.evalCubic = Clazz_defineMethod (c$, "evalCubic", - function (vals, num, include0, include1, inflect, c1, cp1, cp2, c2) { -var j = 0; -for (var i = 0; i < num; i++) { -var t = vals[i]; -if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + (2 * inflect[2] + 3 * inflect[3] * t) * t != 0)) { -var u = 1 - t; -vals[j++] = c1 * u * u * u + 3 * cp1 * t * u * u + 3 * cp2 * t * t * u + c2 * t * t * t; -}} -return j; -}, "~A,~N,~B,~B,~A,~N,~N,~N,~N"); -c$.getTag = Clazz_defineMethod (c$, "getTag", - function (coord, low, high) { -if (coord <= low) { -return (coord < low ? -2 : -1); -}if (coord >= high) { -return (coord > high ? 2 : 1); -}return 0; -}, "~N,~N,~N"); -c$.inwards = Clazz_defineMethod (c$, "inwards", - function (pttag, opt1tag, opt2tag) { -switch (pttag) { -case -2: -case 2: -default: -return false; -case -1: -return (opt1tag >= 0 || opt2tag >= 0); -case 0: -return true; -case 1: -return (opt1tag <= 0 || opt2tag <= 0); -} -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (x, y, w, h) { -if (w <= 0 || h <= 0) { -return false; -}var x1 = this.getX1 (); -var y1 = this.getY1 (); -var x1tag = java.awt.geom.CubicCurve2D.getTag (x1, x, x + w); -var y1tag = java.awt.geom.CubicCurve2D.getTag (y1, y, y + h); -if (x1tag == 0 && y1tag == 0) { -return true; -}var x2 = this.getX2 (); -var y2 = this.getY2 (); -var x2tag = java.awt.geom.CubicCurve2D.getTag (x2, x, x + w); -var y2tag = java.awt.geom.CubicCurve2D.getTag (y2, y, y + h); -if (x2tag == 0 && y2tag == 0) { -return true; -}var ctrlx1 = this.getCtrlX1 (); -var ctrly1 = this.getCtrlY1 (); -var ctrlx2 = this.getCtrlX2 (); -var ctrly2 = this.getCtrlY2 (); -var ctrlx1tag = java.awt.geom.CubicCurve2D.getTag (ctrlx1, x, x + w); -var ctrly1tag = java.awt.geom.CubicCurve2D.getTag (ctrly1, y, y + h); -var ctrlx2tag = java.awt.geom.CubicCurve2D.getTag (ctrlx2, x, x + w); -var ctrly2tag = java.awt.geom.CubicCurve2D.getTag (ctrly2, y, y + h); -if (x1tag < 0 && x2tag < 0 && ctrlx1tag < 0 && ctrlx2tag < 0) { -return false; -}if (y1tag < 0 && y2tag < 0 && ctrly1tag < 0 && ctrly2tag < 0) { -return false; -}if (x1tag > 0 && x2tag > 0 && ctrlx1tag > 0 && ctrlx2tag > 0) { -return false; -}if (y1tag > 0 && y2tag > 0 && ctrly1tag > 0 && ctrly2tag > 0) { -return false; -}if (java.awt.geom.CubicCurve2D.inwards (x1tag, x2tag, ctrlx1tag) && java.awt.geom.CubicCurve2D.inwards (y1tag, y2tag, ctrly1tag)) { -return true; -}if (java.awt.geom.CubicCurve2D.inwards (x2tag, x1tag, ctrlx2tag) && java.awt.geom.CubicCurve2D.inwards (y2tag, y1tag, ctrly2tag)) { -return true; -}var xoverlap = (x1tag * x2tag <= 0); -var yoverlap = (y1tag * y2tag <= 0); -if (x1tag == 0 && x2tag == 0 && yoverlap) { -return true; -}if (y1tag == 0 && y2tag == 0 && xoverlap) { -return true; -}var eqn = Clazz_newDoubleArray (4, 0); -var res = Clazz_newDoubleArray (4, 0); -if (!yoverlap) { -java.awt.geom.CubicCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly1, ctrly2, y2); -var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res); -num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, x1, ctrlx1, ctrlx2, x2); -return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], x, x + w) * java.awt.geom.CubicCurve2D.getTag (res[1], x, x + w) <= 0); -}if (!xoverlap) { -java.awt.geom.CubicCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2); -var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res); -num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2); -return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], y, y + h) * java.awt.geom.CubicCurve2D.getTag (res[1], y, y + h) <= 0); -}var dx = x2 - x1; -var dy = y2 - y1; -var k = y2 * x1 - x2 * y1; -var c1tag; -var c2tag; -if (y1tag == 0) { -c1tag = x1tag; -} else { -c1tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w); -}if (y2tag == 0) { -c2tag = x2tag; -} else { -c2tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w); -}if (c1tag * c2tag <= 0) { -return true; -}c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); -java.awt.geom.CubicCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2); -var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res); -num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2); -var tags = Clazz_newIntArray (num + 1, 0); -for (var i = 0; i < num; i++) { -tags[i] = java.awt.geom.CubicCurve2D.getTag (res[i], y, y + h); -} -tags[num] = c1tag; -java.util.Arrays.sort (tags); -return ((num >= 1 && tags[0] * tags[1] <= 0) || (num >= 3 && tags[2] * tags[3] <= 0)); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (r) { -return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "contains", -function (x, y, w, h) { -if (w <= 0 || h <= 0) { -return false; -}if (!(this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h))) { -return false; -}var rect = new java.awt.geom.Rectangle2D.Double (x, y, w, h); -return !rect.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "contains", -function (r) { -return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "getBounds", -function () { -return this.getBounds2D ().getBounds (); -}); -Clazz_defineMethod (c$, "getPathIterator", -function (at) { -return (swingjs.api.Interface.getInstance ("java.awt.geom.CubicInterator", false)).set (this, at); -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "getPathIterator", -function (at, flatness) { -return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); -}, "java.awt.geom.AffineTransform,~N"); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.geom.CubicCurve2D, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x1 = 0; -this.y1 = 0; -this.ctrlx1 = 0; -this.ctrly1 = 0; -this.ctrlx2 = 0; -this.ctrly2 = 0; -this.x2 = 0; -this.y2 = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.CubicCurve2D, "Float", java.awt.geom.CubicCurve2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []); -}); -Clazz_makeConstructor (c$, -function (a, b, c, d, e, f, g, h) { -Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []); -this.setCurve (a, b, c, d, e, f, g, h); -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getX1", -function () { -return this.x1; -}); -Clazz_overrideMethod (c$, "getY1", -function () { -return this.y1; -}); -Clazz_overrideMethod (c$, "getP1", -function () { -return new java.awt.geom.Point2D.Float (this.x1, this.y1); -}); -Clazz_overrideMethod (c$, "getCtrlX1", -function () { -return this.ctrlx1; -}); -Clazz_overrideMethod (c$, "getCtrlY1", -function () { -return this.ctrly1; -}); -Clazz_overrideMethod (c$, "getCtrlP1", -function () { -return new java.awt.geom.Point2D.Float (this.ctrlx1, this.ctrly1); -}); -Clazz_overrideMethod (c$, "getCtrlX2", -function () { -return this.ctrlx2; -}); -Clazz_overrideMethod (c$, "getCtrlY2", -function () { -return this.ctrly2; -}); -Clazz_overrideMethod (c$, "getCtrlP2", -function () { -return new java.awt.geom.Point2D.Float (this.ctrlx2, this.ctrly2); -}); -Clazz_overrideMethod (c$, "getX2", -function () { -return this.x2; -}); -Clazz_overrideMethod (c$, "getY2", -function () { -return this.y2; -}); -Clazz_overrideMethod (c$, "getP2", -function () { -return new java.awt.geom.Point2D.Float (this.x2, this.y2); -}); -Clazz_defineMethod (c$, "setCurve", -function (a, b, c, d, e, f, g, h) { -this.x1 = a; -this.y1 = b; -this.ctrlx1 = c; -this.ctrly1 = d; -this.ctrlx2 = e; -this.ctrly2 = f; -this.x2 = g; -this.y2 = h; -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setCurve", -function (a, b, c, d, e, f, g, h) { -this.x1 = a; -this.y1 = b; -this.ctrlx1 = c; -this.ctrly1 = d; -this.ctrlx2 = e; -this.ctrly2 = f; -this.x2 = g; -this.y2 = h; -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2)); -var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2)); -var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2)); -var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2)); -return new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b); -}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x1 = 0; -this.y1 = 0; -this.ctrlx1 = 0; -this.ctrly1 = 0; -this.ctrlx2 = 0; -this.ctrly2 = 0; -this.x2 = 0; -this.y2 = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.CubicCurve2D, "Double", java.awt.geom.CubicCurve2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []); -}); -Clazz_makeConstructor (c$, -function (a, b, c, d, e, f, g, h) { -Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []); -this.setCurve (a, b, c, d, e, f, g, h); -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getX1", -function () { -return this.x1; -}); -Clazz_overrideMethod (c$, "getY1", -function () { -return this.y1; -}); -Clazz_overrideMethod (c$, "getP1", -function () { -return new java.awt.geom.Point2D.Double (this.x1, this.y1); -}); -Clazz_overrideMethod (c$, "getCtrlX1", -function () { -return this.ctrlx1; -}); -Clazz_overrideMethod (c$, "getCtrlY1", -function () { -return this.ctrly1; -}); -Clazz_overrideMethod (c$, "getCtrlP1", -function () { -return new java.awt.geom.Point2D.Double (this.ctrlx1, this.ctrly1); -}); -Clazz_overrideMethod (c$, "getCtrlX2", -function () { -return this.ctrlx2; -}); -Clazz_overrideMethod (c$, "getCtrlY2", -function () { -return this.ctrly2; -}); -Clazz_overrideMethod (c$, "getCtrlP2", -function () { -return new java.awt.geom.Point2D.Double (this.ctrlx2, this.ctrly2); -}); -Clazz_overrideMethod (c$, "getX2", -function () { -return this.x2; -}); -Clazz_overrideMethod (c$, "getY2", -function () { -return this.y2; -}); -Clazz_overrideMethod (c$, "getP2", -function () { -return new java.awt.geom.Point2D.Double (this.x2, this.y2); -}); -Clazz_defineMethod (c$, "setCurve", -function (a, b, c, d, e, f, g, h) { -this.x1 = a; -this.y1 = b; -this.ctrlx1 = c; -this.ctrly1 = d; -this.ctrlx2 = e; -this.ctrly2 = f; -this.x2 = g; -this.y2 = h; -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2)); -var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2)); -var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2)); -var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2)); -return new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b); -}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"BELOW", -2, -"LOWEDGE", -1, -"INSIDE", 0, -"HIGHEDGE", 1, -"ABOVE", 2); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.cubic = null; -this.affine = null; -this.index = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_makeConstructor (c$, -function (q, at) { -this.set (q, at); -}, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "set", -function (q, at) { -this.cubic = q; -this.affine = at; -return this; -}, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getWindingRule", -function () { -return 1; -}); -Clazz_overrideMethod (c$, "isDone", -function () { -return (this.index > 1); -}); -Clazz_overrideMethod (c$, "next", -function () { -this.index++; -}); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("cubic iterator iterator out of bounds"); -}var type; -if (this.index == 0) { -coords[0] = this.cubic.getX1 (); -coords[1] = this.cubic.getY1 (); -type = 0; -} else { -coords[0] = this.cubic.getCtrlX1 (); -coords[1] = this.cubic.getCtrlY1 (); -coords[2] = this.cubic.getCtrlX2 (); -coords[3] = this.cubic.getCtrlY2 (); -coords[4] = this.cubic.getX2 (); -coords[5] = this.cubic.getY2 (); -type = 3; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3); -}return type; -}, "~A"); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("cubic iterator iterator out of bounds"); -}var type; -if (this.index == 0) { -coords[0] = this.cubic.getX1 (); -coords[1] = this.cubic.getY1 (); -type = 0; -} else { -coords[0] = this.cubic.getCtrlX1 (); -coords[1] = this.cubic.getCtrlY1 (); -coords[2] = this.cubic.getCtrlX2 (); -coords[3] = this.cubic.getCtrlY2 (); -coords[4] = this.cubic.getX2 (); -coords[5] = this.cubic.getY2 (); -type = 3; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3); -}return type; -}, "~A"); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.Shape"], "java.awt.geom.Line2D", ["java.lang.InternalError", "java.awt.geom.LineIterator", "$.Point2D", "$.Rectangle2D"], function () { -c$ = Clazz_declareType (java.awt.geom, "Line2D", null, [java.awt.Shape, Cloneable]); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "setLine", -function (p1, p2) { -this.setLine (p1.getX (), p1.getY (), p2.getX (), p2.getY ()); -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "setLine", -function (l) { -this.setLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ()); -}, "java.awt.geom.Line2D"); -c$.relativeCCW = Clazz_defineMethod (c$, "relativeCCW", -function (x1, y1, x2, y2, px, py) { -x2 -= x1; -y2 -= y1; -px -= x1; -py -= y1; -var ccw = px * y2 - py * x2; -if (ccw == 0.0) { -ccw = px * x2 + py * y2; -if (ccw > 0.0) { -px -= x2; -py -= y2; -ccw = px * x2 + py * y2; -if (ccw < 0.0) { -ccw = 0.0; -}}}return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "relativeCCW", -function (px, py) { -return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); -}, "~N,~N"); -Clazz_defineMethod (c$, "relativeCCW", -function (p) { -return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), p.getX (), p.getY ()); -}, "java.awt.geom.Point2D"); -c$.linesIntersect = Clazz_defineMethod (c$, "linesIntersect", -function (x1, y1, x2, y2, x3, y3, x4, y4) { -return ((java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x3, y3) * java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x4, y4) <= 0) && (java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x1, y1) * java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x2, y2) <= 0)); -}, "~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "intersectsLine", -function (x1, y1, x2, y2) { -return java.awt.geom.Line2D.linesIntersect (x1, y1, x2, y2, this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "intersectsLine", -function (l) { -return java.awt.geom.Line2D.linesIntersect (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 (), this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); -}, "java.awt.geom.Line2D"); -c$.ptSegDistSq = Clazz_defineMethod (c$, "ptSegDistSq", -function (x1, y1, x2, y2, px, py) { -x2 -= x1; -y2 -= y1; -px -= x1; -py -= y1; -var dotprod = px * x2 + py * y2; -var projlenSq; -if (dotprod <= 0.0) { -projlenSq = 0.0; -} else { -px = x2 - px; -py = y2 - py; -dotprod = px * x2 + py * y2; -if (dotprod <= 0.0) { -projlenSq = 0.0; -} else { -projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2); -}}var lenSq = px * px + py * py - projlenSq; -if (lenSq < 0) { -lenSq = 0; -}return lenSq; -}, "~N,~N,~N,~N,~N,~N"); -c$.ptSegDist = Clazz_defineMethod (c$, "ptSegDist", -function (x1, y1, x2, y2, px, py) { -return Math.sqrt (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, px, py)); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "ptSegDistSq", -function (px, py) { -return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); -}, "~N,~N"); -Clazz_defineMethod (c$, "ptSegDistSq", -function (pt) { -return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "ptSegDist", -function (px, py) { -return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); -}, "~N,~N"); -Clazz_defineMethod (c$, "ptSegDist", -function (pt) { -return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); -}, "java.awt.geom.Point2D"); -c$.ptLineDistSq = Clazz_defineMethod (c$, "ptLineDistSq", -function (x1, y1, x2, y2, px, py) { -x2 -= x1; -y2 -= y1; -px -= x1; -py -= y1; -var dotprod = px * x2 + py * y2; -var projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2); -var lenSq = px * px + py * py - projlenSq; -if (lenSq < 0) { -lenSq = 0; -}return lenSq; -}, "~N,~N,~N,~N,~N,~N"); -c$.ptLineDist = Clazz_defineMethod (c$, "ptLineDist", -function (x1, y1, x2, y2, px, py) { -return Math.sqrt (java.awt.geom.Line2D.ptLineDistSq (x1, y1, x2, y2, px, py)); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "ptLineDistSq", -function (px, py) { -return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); -}, "~N,~N"); -Clazz_defineMethod (c$, "ptLineDistSq", -function (pt) { -return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "ptLineDist", -function (px, py) { -return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py); -}, "~N,~N"); -Clazz_defineMethod (c$, "ptLineDist", -function (pt) { -return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ()); -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "contains", -function (x, y) { -return false; -}, "~N,~N"); -Clazz_defineMethod (c$, "contains", -function (p) { -return false; -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "intersects", -function (x, y, w, h) { -return this.intersects ( new java.awt.geom.Rectangle2D.Double (x, y, w, h)); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (r) { -return r.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "contains", -function (x, y, w, h) { -return false; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "contains", -function (r) { -return false; -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "getBounds", -function () { -return this.getBounds2D ().getBounds (); -}); -Clazz_defineMethod (c$, "getPathIterator", -function (at) { -return new java.awt.geom.LineIterator (this, at); -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "getPathIterator", -function (at, flatness) { -return new java.awt.geom.LineIterator (this, at); -}, "java.awt.geom.AffineTransform,~N"); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.geom.Line2D, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x1 = 0; -this.y1 = 0; -this.x2 = 0; -this.y2 = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Line2D, "Float", java.awt.geom.Line2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []); -}); -Clazz_makeConstructor (c$, -function (a, b, c, d) { -Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []); -this.setLine (a, b, c, d); -}, "~N,~N,~N,~N"); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []); -this.setLine (a, b); -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_overrideMethod (c$, "getX1", -function () { -return this.x1; -}); -Clazz_overrideMethod (c$, "getY1", -function () { -return this.y1; -}); -Clazz_overrideMethod (c$, "getP1", -function () { -return new java.awt.geom.Point2D.Float (this.x1, this.y1); -}); -Clazz_overrideMethod (c$, "getX2", -function () { -return this.x2; -}); -Clazz_overrideMethod (c$, "getY2", -function () { -return this.y2; -}); -Clazz_overrideMethod (c$, "getP2", -function () { -return new java.awt.geom.Point2D.Float (this.x2, this.y2); -}); -Clazz_defineMethod (c$, "setLine", -function (a, b, c, d) { -this.x1 = a; -this.y1 = b; -this.x2 = c; -this.y2 = d; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setLine", -function (a, b, c, d) { -this.x1 = a; -this.y1 = b; -this.x2 = c; -this.y2 = d; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a; -var b; -var c; -var d; -if (this.x1 < this.x2) { -a = this.x1; -c = this.x2 - this.x1; -} else { -a = this.x2; -c = this.x1 - this.x2; -}if (this.y1 < this.y2) { -b = this.y1; -d = this.y2 - this.y1; -} else { -b = this.y2; -d = this.y1 - this.y2; -}return new java.awt.geom.Rectangle2D.Float (a, b, c, d); -}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x1 = 0; -this.y1 = 0; -this.x2 = 0; -this.y2 = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Line2D, "Double", java.awt.geom.Line2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []); -}); -Clazz_makeConstructor (c$, -function (a, b, c, d) { -Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []); -this.setLine (a, b, c, d); -}, "~N,~N,~N,~N"); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []); -this.setLine (a, b); -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_overrideMethod (c$, "getX1", -function () { -return this.x1; -}); -Clazz_overrideMethod (c$, "getY1", -function () { -return this.y1; -}); -Clazz_overrideMethod (c$, "getP1", -function () { -return new java.awt.geom.Point2D.Double (this.x1, this.y1); -}); -Clazz_overrideMethod (c$, "getX2", -function () { -return this.x2; -}); -Clazz_overrideMethod (c$, "getY2", -function () { -return this.y2; -}); -Clazz_overrideMethod (c$, "getP2", -function () { -return new java.awt.geom.Point2D.Double (this.x2, this.y2); -}); -Clazz_defineMethod (c$, "setLine", -function (a, b, c, d) { -this.x1 = a; -this.y1 = b; -this.x2 = c; -this.y2 = d; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a; -var b; -var c; -var d; -if (this.x1 < this.x2) { -a = this.x1; -c = this.x2 - this.x1; -} else { -a = this.x2; -c = this.x1 - this.x2; -}if (this.y1 < this.y2) { -b = this.y1; -d = this.y2 - this.y1; -} else { -b = this.y2; -d = this.y1 - this.y2; -}return new java.awt.geom.Rectangle2D.Double (a, b, c, d); -}); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.line = null; -this.affine = null; -this.index = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator); -Clazz_makeConstructor (c$, -function (l, at) { -this.line = l; -this.affine = at; -}, "java.awt.geom.Line2D,java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getWindingRule", -function () { -return 1; -}); -Clazz_overrideMethod (c$, "isDone", -function () { -return (this.index > 1); -}); -Clazz_overrideMethod (c$, "next", -function () { -this.index++; -}); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("line iterator out of bounds"); -}var type; -if (this.index == 0) { -coords[0] = this.line.getX1 (); -coords[1] = this.line.getY1 (); -type = 0; -} else { -coords[0] = this.line.getX2 (); -coords[1] = this.line.getY2 (); -type = 1; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, 1); -}return type; -}, "~A"); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("line iterator out of bounds"); -}var type; -if (this.index == 0) { -coords[0] = this.line.getX1 (); -coords[1] = this.line.getY1 (); -type = 0; -} else { -coords[0] = this.line.getX2 (); -coords[1] = this.line.getY2 (); -type = 1; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, 1); -}return type; -}, "~A"); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.Shape"], "java.awt.geom.QuadCurve2D", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadIterator", "$.Rectangle2D"], function () { -c$ = Clazz_declareType (java.awt.geom, "QuadCurve2D", null, [java.awt.Shape, Cloneable]); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "setCurve", -function (coords, offset) { -this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5]); -}, "~A,~N"); -Clazz_defineMethod (c$, "setCurve", -function (p1, cp, p2) { -this.setCurve (p1.getX (), p1.getY (), cp.getX (), cp.getY (), p2.getX (), p2.getY ()); -}, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "setCurve", -function (pts, offset) { -this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY ()); -}, "~A,~N"); -Clazz_defineMethod (c$, "setCurve", -function (c) { -this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX (), c.getCtrlY (), c.getX2 (), c.getY2 ()); -}, "java.awt.geom.QuadCurve2D"); -c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", -function (x1, y1, ctrlx, ctrly, x2, y2) { -return java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx, ctrly); -}, "~N,~N,~N,~N,~N,~N"); -c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", -function (x1, y1, ctrlx, ctrly, x2, y2) { -return java.awt.geom.Line2D.ptSegDist (x1, y1, x2, y2, ctrlx, ctrly); -}, "~N,~N,~N,~N,~N,~N"); -c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", -function (coords, offset) { -return java.awt.geom.Line2D.ptSegDistSq (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]); -}, "~A,~N"); -c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", -function (coords, offset) { -return java.awt.geom.Line2D.ptSegDist (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]); -}, "~A,~N"); -Clazz_defineMethod (c$, "getFlatnessSq", -function () { -return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ()); -}); -Clazz_defineMethod (c$, "getFlatness", -function () { -return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ()); -}); -Clazz_defineMethod (c$, "subdivide", -function (left, right) { -java.awt.geom.QuadCurve2D.subdivide (this, left, right); -}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D"); -c$.subdivide = Clazz_defineMethod (c$, "subdivide", -function (src, left, right) { -var x1 = src.getX1 (); -var y1 = src.getY1 (); -var ctrlx = src.getCtrlX (); -var ctrly = src.getCtrlY (); -var x2 = src.getX2 (); -var y2 = src.getY2 (); -var ctrlx1 = (x1 + ctrlx) / 2.0; -var ctrly1 = (y1 + ctrly) / 2.0; -var ctrlx2 = (x2 + ctrlx) / 2.0; -var ctrly2 = (y2 + ctrly) / 2.0; -ctrlx = (ctrlx1 + ctrlx2) / 2.0; -ctrly = (ctrly1 + ctrly2) / 2.0; -if (left != null) { -left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx, ctrly); -}if (right != null) { -right.setCurve (ctrlx, ctrly, ctrlx2, ctrly2, x2, y2); -}}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D"); -c$.subdivide = Clazz_defineMethod (c$, "subdivide", -function (src, srcoff, left, leftoff, right, rightoff) { -var x1 = src[srcoff + 0]; -var y1 = src[srcoff + 1]; -var ctrlx = src[srcoff + 2]; -var ctrly = src[srcoff + 3]; -var x2 = src[srcoff + 4]; -var y2 = src[srcoff + 5]; -if (left != null) { -left[leftoff + 0] = x1; -left[leftoff + 1] = y1; -}if (right != null) { -right[rightoff + 4] = x2; -right[rightoff + 5] = y2; -}x1 = (x1 + ctrlx) / 2.0; -y1 = (y1 + ctrly) / 2.0; -x2 = (x2 + ctrlx) / 2.0; -y2 = (y2 + ctrly) / 2.0; -ctrlx = (x1 + x2) / 2.0; -ctrly = (y1 + y2) / 2.0; -if (left != null) { -left[leftoff + 2] = x1; -left[leftoff + 3] = y1; -left[leftoff + 4] = ctrlx; -left[leftoff + 5] = ctrly; -}if (right != null) { -right[rightoff + 0] = ctrlx; -right[rightoff + 1] = ctrly; -right[rightoff + 2] = x2; -right[rightoff + 3] = y2; -}}, "~A,~N,~A,~N,~A,~N"); -c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", -function (eqn) { -return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, eqn); -}, "~A"); -c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", -function (eqn, res) { -var a = eqn[2]; -var b = eqn[1]; -var c = eqn[0]; -var roots = 0; -if (a == 0.0) { -if (b == 0.0) { -return -1; -}res[roots++] = -c / b; -} else { -var d = b * b - 4.0 * a * c; -if (d < 0.0) { -return 0; -}d = Math.sqrt (d); -if (b < 0.0) { -d = -d; -}var q = (b + d) / -2.0; -res[roots++] = q / a; -if (q != 0.0) { -res[roots++] = c / q; -}}return roots; -}, "~A,~A"); -Clazz_defineMethod (c$, "contains", -function (x, y) { -var x1 = this.getX1 (); -var y1 = this.getY1 (); -var xc = this.getCtrlX (); -var yc = this.getCtrlY (); -var x2 = this.getX2 (); -var y2 = this.getY2 (); -var kx = x1 - 2 * xc + x2; -var ky = y1 - 2 * yc + y2; -var dx = x - x1; -var dy = y - y1; -var dxl = x2 - x1; -var dyl = y2 - y1; -var t0 = (dx * ky - dy * kx) / (dxl * ky - dyl * kx); -if (t0 < 0 || t0 > 1 || t0 != t0) { -return false; -}var xb = kx * t0 * t0 + 2 * (xc - x1) * t0 + x1; -var yb = ky * t0 * t0 + 2 * (yc - y1) * t0 + y1; -var xl = dxl * t0 + x1; -var yl = dyl * t0 + y1; -return (x >= xb && x < xl) || (x >= xl && x < xb) || (y >= yb && y < yl) || (y >= yl && y < yb); -}, "~N,~N"); -Clazz_defineMethod (c$, "contains", -function (p) { -return this.contains (p.getX (), p.getY ()); -}, "java.awt.geom.Point2D"); -c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", - function (eqn, val, c1, cp, c2) { -eqn[0] = c1 - val; -eqn[1] = cp + cp - c1 - c1; -eqn[2] = c1 - cp - cp + c2; -return; -}, "~A,~N,~N,~N,~N"); -c$.evalQuadratic = Clazz_defineMethod (c$, "evalQuadratic", - function (vals, num, include0, include1, inflect, c1, ctrl, c2) { -var j = 0; -for (var i = 0; i < num; i++) { -var t = vals[i]; -if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + 2 * inflect[2] * t != 0)) { -var u = 1 - t; -vals[j++] = c1 * u * u + 2 * ctrl * t * u + c2 * t * t; -}} -return j; -}, "~A,~N,~B,~B,~A,~N,~N,~N"); -c$.getTag = Clazz_defineMethod (c$, "getTag", - function (coord, low, high) { -if (coord <= low) { -return (coord < low ? -2 : -1); -}if (coord >= high) { -return (coord > high ? 2 : 1); -}return 0; -}, "~N,~N,~N"); -c$.inwards = Clazz_defineMethod (c$, "inwards", - function (pttag, opt1tag, opt2tag) { -switch (pttag) { -case -2: -case 2: -default: -return false; -case -1: -return (opt1tag >= 0 || opt2tag >= 0); -case 0: -return true; -case 1: -return (opt1tag <= 0 || opt2tag <= 0); -} -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (x, y, w, h) { -if (w <= 0 || h <= 0) { -return false; -}var x1 = this.getX1 (); -var y1 = this.getY1 (); -var x1tag = java.awt.geom.QuadCurve2D.getTag (x1, x, x + w); -var y1tag = java.awt.geom.QuadCurve2D.getTag (y1, y, y + h); -if (x1tag == 0 && y1tag == 0) { -return true; -}var x2 = this.getX2 (); -var y2 = this.getY2 (); -var x2tag = java.awt.geom.QuadCurve2D.getTag (x2, x, x + w); -var y2tag = java.awt.geom.QuadCurve2D.getTag (y2, y, y + h); -if (x2tag == 0 && y2tag == 0) { -return true; -}var ctrlx = this.getCtrlX (); -var ctrly = this.getCtrlY (); -var ctrlxtag = java.awt.geom.QuadCurve2D.getTag (ctrlx, x, x + w); -var ctrlytag = java.awt.geom.QuadCurve2D.getTag (ctrly, y, y + h); -if (x1tag < 0 && x2tag < 0 && ctrlxtag < 0) { -return false; -}if (y1tag < 0 && y2tag < 0 && ctrlytag < 0) { -return false; -}if (x1tag > 0 && x2tag > 0 && ctrlxtag > 0) { -return false; -}if (y1tag > 0 && y2tag > 0 && ctrlytag > 0) { -return false; -}if (java.awt.geom.QuadCurve2D.inwards (x1tag, x2tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y1tag, y2tag, ctrlytag)) { -return true; -}if (java.awt.geom.QuadCurve2D.inwards (x2tag, x1tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y2tag, y1tag, ctrlytag)) { -return true; -}var xoverlap = (x1tag * x2tag <= 0); -var yoverlap = (y1tag * y2tag <= 0); -if (x1tag == 0 && x2tag == 0 && yoverlap) { -return true; -}if (y1tag == 0 && y2tag == 0 && xoverlap) { -return true; -}var eqn = Clazz_newDoubleArray (3, 0); -var res = Clazz_newDoubleArray (3, 0); -if (!yoverlap) { -java.awt.geom.QuadCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly, y2); -return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, x1, ctrlx, x2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], x, x + w) * java.awt.geom.QuadCurve2D.getTag (res[1], x, x + w) <= 0); -}if (!xoverlap) { -java.awt.geom.QuadCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx, x2); -return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, y1, ctrly, y2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h) * java.awt.geom.QuadCurve2D.getTag (res[1], y, y + h) <= 0); -}var dx = x2 - x1; -var dy = y2 - y1; -var k = y2 * x1 - x2 * y1; -var c1tag; -var c2tag; -if (y1tag == 0) { -c1tag = x1tag; -} else { -c1tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w); -}if (y2tag == 0) { -c2tag = x2tag; -} else { -c2tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w); -}if (c1tag * c2tag <= 0) { -return true; -}c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); -java.awt.geom.QuadCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx, x2); -var num = java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res); -java.awt.geom.QuadCurve2D.evalQuadratic (res, num, true, true, null, y1, ctrly, y2); -c2tag = java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h); -return (c1tag * c2tag <= 0); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (r) { -return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "contains", -function (x, y, w, h) { -if (w <= 0 || h <= 0) { -return false; -}return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h)); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "contains", -function (r) { -return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "getBounds", -function () { -return this.getBounds2D ().getBounds (); -}); -Clazz_defineMethod (c$, "getPathIterator", -function (at) { -return new java.awt.geom.QuadIterator (this, at); -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "getPathIterator", -function (at, flatness) { -return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); -}, "java.awt.geom.AffineTransform,~N"); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.geom.QuadCurve2D, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x1 = 0; -this.y1 = 0; -this.ctrlx = 0; -this.ctrly = 0; -this.x2 = 0; -this.y2 = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.QuadCurve2D, "Float", java.awt.geom.QuadCurve2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []); -}); -Clazz_makeConstructor (c$, -function (a, b, c, d, e, f) { -Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []); -this.setCurve (a, b, c, d, e, f); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getX1", -function () { -return this.x1; -}); -Clazz_overrideMethod (c$, "getY1", -function () { -return this.y1; -}); -Clazz_overrideMethod (c$, "getP1", -function () { -return new java.awt.geom.Point2D.Float (this.x1, this.y1); -}); -Clazz_overrideMethod (c$, "getCtrlX", -function () { -return this.ctrlx; -}); -Clazz_overrideMethod (c$, "getCtrlY", -function () { -return this.ctrly; -}); -Clazz_overrideMethod (c$, "getCtrlPt", -function () { -return new java.awt.geom.Point2D.Float (this.ctrlx, this.ctrly); -}); -Clazz_overrideMethod (c$, "getX2", -function () { -return this.x2; -}); -Clazz_overrideMethod (c$, "getY2", -function () { -return this.y2; -}); -Clazz_overrideMethod (c$, "getP2", -function () { -return new java.awt.geom.Point2D.Float (this.x2, this.y2); -}); -Clazz_defineMethod (c$, "setCurve", -function (a, b, c, d, e, f) { -this.x1 = a; -this.y1 = b; -this.ctrlx = c; -this.ctrly = d; -this.x2 = e; -this.y2 = f; -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setCurve", -function (a, b, c, d, e, f) { -this.x1 = a; -this.y1 = b; -this.ctrlx = c; -this.ctrly = d; -this.x2 = e; -this.y2 = f; -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx); -var b = Math.min (Math.min (this.y1, this.y2), this.ctrly); -var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx); -var d = Math.max (Math.max (this.y1, this.y2), this.ctrly); -return new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b); -}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x1 = 0; -this.y1 = 0; -this.ctrlx = 0; -this.ctrly = 0; -this.x2 = 0; -this.y2 = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.QuadCurve2D, "Double", java.awt.geom.QuadCurve2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []); -}); -Clazz_makeConstructor (c$, -function (a, b, c, d, e, f) { -Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []); -this.setCurve (a, b, c, d, e, f); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getX1", -function () { -return this.x1; -}); -Clazz_overrideMethod (c$, "getY1", -function () { -return this.y1; -}); -Clazz_overrideMethod (c$, "getP1", -function () { -return new java.awt.geom.Point2D.Double (this.x1, this.y1); -}); -Clazz_overrideMethod (c$, "getCtrlX", -function () { -return this.ctrlx; -}); -Clazz_overrideMethod (c$, "getCtrlY", -function () { -return this.ctrly; -}); -Clazz_overrideMethod (c$, "getCtrlPt", -function () { -return new java.awt.geom.Point2D.Double (this.ctrlx, this.ctrly); -}); -Clazz_overrideMethod (c$, "getX2", -function () { -return this.x2; -}); -Clazz_overrideMethod (c$, "getY2", -function () { -return this.y2; -}); -Clazz_overrideMethod (c$, "getP2", -function () { -return new java.awt.geom.Point2D.Double (this.x2, this.y2); -}); -Clazz_defineMethod (c$, "setCurve", -function (a, b, c, d, e, f) { -this.x1 = a; -this.y1 = b; -this.ctrlx = c; -this.ctrly = d; -this.x2 = e; -this.y2 = f; -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx); -var b = Math.min (Math.min (this.y1, this.y2), this.ctrly); -var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx); -var d = Math.max (Math.max (this.y1, this.y2), this.ctrly); -return new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b); -}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"BELOW", -2, -"LOWEDGE", -1, -"INSIDE", 0, -"HIGHEDGE", 1, -"ABOVE", 2); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.QuadIterator", ["java.util.NoSuchElementException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.quad = null; -this.affine = null; -this.index = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom, "QuadIterator", null, java.awt.geom.PathIterator); -Clazz_makeConstructor (c$, -function (q, at) { -this.quad = q; -this.affine = at; -}, "java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getWindingRule", -function () { -return 1; -}); -Clazz_overrideMethod (c$, "isDone", -function () { -return (this.index > 1); -}); -Clazz_overrideMethod (c$, "next", -function () { -this.index++; -}); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("quad iterator iterator out of bounds"); -}var type; -if (this.index == 0) { -coords[0] = this.quad.getX1 (); -coords[1] = this.quad.getY1 (); -type = 0; -} else { -coords[0] = this.quad.getCtrlX (); -coords[1] = this.quad.getCtrlY (); -coords[2] = this.quad.getX2 (); -coords[3] = this.quad.getY2 (); -type = 2; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2); -}return type; -}, "~A"); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("quad iterator iterator out of bounds"); -}var type; -if (this.index == 0) { -coords[0] = this.quad.getX1 (); -coords[1] = this.quad.getY1 (); -type = 0; -} else { -coords[0] = this.quad.getCtrlX (); -coords[1] = this.quad.getCtrlY (); -coords[2] = this.quad.getX2 (); -coords[3] = this.quad.getY2 (); -type = 2; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2); -}return type; -}, "~A"); -}); -Clazz_declarePackage ("jssun.awt.geom"); -Clazz_load (null, "jssun.awt.geom.Curve", ["java.lang.Double", "$.InternalError", "java.awt.geom.IllegalPathStateException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.direction = 0; -Clazz_instantialize (this, arguments); -}, jssun.awt.geom, "Curve"); -c$.insertMove = Clazz_defineMethod (c$, "insertMove", -function (curves, x, y) { -curves.add ( new jssun.awt.geom.Order0 (x, y)); -}, "java.util.Vector,~N,~N"); -c$.insertLine = Clazz_defineMethod (c$, "insertLine", -function (curves, x0, y0, x1, y1) { -if (y0 < y1) { -curves.add ( new jssun.awt.geom.Order1 (x0, y0, x1, y1, 1)); -} else if (y0 > y1) { -curves.add ( new jssun.awt.geom.Order1 (x1, y1, x0, y0, -1)); -} else { -}}, "java.util.Vector,~N,~N,~N,~N"); -c$.insertQuad = Clazz_defineMethod (c$, "insertQuad", -function (curves, x0, y0, coords) { -var y1 = coords[3]; -if (y0 > y1) { -jssun.awt.geom.Order2.insert (curves, coords, coords[2], y1, coords[0], coords[1], x0, y0, -1); -} else if (y0 == y1 && y0 == coords[1]) { -return; -} else { -jssun.awt.geom.Order2.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], y1, 1); -}}, "java.util.Vector,~N,~N,~A"); -c$.insertCubic = Clazz_defineMethod (c$, "insertCubic", -function (curves, x0, y0, coords) { -var y1 = coords[5]; -if (y0 > y1) { -jssun.awt.geom.Order3.insert (curves, coords, coords[4], y1, coords[2], coords[3], coords[0], coords[1], x0, y0, -1); -} else if (y0 == y1 && y0 == coords[1] && y0 == coords[3]) { -return; -} else { -jssun.awt.geom.Order3.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], coords[3], coords[4], y1, 1); -}}, "java.util.Vector,~N,~N,~A"); -c$.pointCrossingsForPath = Clazz_defineMethod (c$, "pointCrossingsForPath", -function (pi, px, py) { -if (pi.isDone ()) { -return 0; -}var coords = Clazz_newDoubleArray (6, 0); -if (pi.currentSegment (coords) != 0) { -throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); -}pi.next (); -var movx = coords[0]; -var movy = coords[1]; -var curx = movx; -var cury = movy; -var endx; -var endy; -var crossings = 0; -while (!pi.isDone ()) { -switch (pi.currentSegment (coords)) { -case 0: -if (cury != movy) { -crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy); -}movx = curx = coords[0]; -movy = cury = coords[1]; -break; -case 1: -endx = coords[0]; -endy = coords[1]; -crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, endx, endy); -curx = endx; -cury = endy; -break; -case 2: -endx = coords[2]; -endy = coords[3]; -crossings += jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, curx, cury, coords[0], coords[1], endx, endy, 0); -curx = endx; -cury = endy; -break; -case 3: -endx = coords[4]; -endy = coords[5]; -crossings += jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0); -curx = endx; -cury = endy; -break; -case 4: -if (cury != movy) { -crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy); -}curx = movx; -cury = movy; -break; -} -pi.next (); -} -if (cury != movy) { -crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy); -}return crossings; -}, "java.awt.geom.PathIterator,~N,~N"); -c$.pointCrossingsForLine = Clazz_defineMethod (c$, "pointCrossingsForLine", -function (px, py, x0, y0, x1, y1) { -if (py < y0 && py < y1) return 0; -if (py >= y0 && py >= y1) return 0; -if (px >= x0 && px >= x1) return 0; -if (px < x0 && px < x1) return (y0 < y1) ? 1 : -1; -var xintercept = x0 + (py - y0) * (x1 - x0) / (y1 - y0); -if (px >= xintercept) return 0; -return (y0 < y1) ? 1 : -1; -}, "~N,~N,~N,~N,~N,~N"); -c$.pointCrossingsForQuad = Clazz_defineMethod (c$, "pointCrossingsForQuad", -function (px, py, x0, y0, xc, yc, x1, y1, level) { -if (py < y0 && py < yc && py < y1) return 0; -if (py >= y0 && py >= yc && py >= y1) return 0; -if (px >= x0 && px >= xc && px >= x1) return 0; -if (px < x0 && px < xc && px < x1) { -if (py >= y0) { -if (py < y1) return 1; -} else { -if (py >= y1) return -1; -}return 0; -}if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1); -var x0c = (x0 + xc) / 2; -var y0c = (y0 + yc) / 2; -var xc1 = (xc + x1) / 2; -var yc1 = (yc + y1) / 2; -xc = (x0c + xc1) / 2; -yc = (y0c + yc1) / 2; -if (Double.isNaN (xc) || Double.isNaN (yc)) { -return 0; -}return (jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, x0, y0, x0c, y0c, xc, yc, level + 1) + jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, xc, yc, xc1, yc1, x1, y1, level + 1)); -}, "~N,~N,~N,~N,~N,~N,~N,~N,~N"); -c$.pointCrossingsForCubic = Clazz_defineMethod (c$, "pointCrossingsForCubic", -function (px, py, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) { -if (py < y0 && py < yc0 && py < yc1 && py < y1) return 0; -if (py >= y0 && py >= yc0 && py >= yc1 && py >= y1) return 0; -if (px >= x0 && px >= xc0 && px >= xc1 && px >= x1) return 0; -if (px < x0 && px < xc0 && px < xc1 && px < x1) { -if (py >= y0) { -if (py < y1) return 1; -} else { -if (py >= y1) return -1; -}return 0; -}if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1); -var xmid = (xc0 + xc1) / 2; -var ymid = (yc0 + yc1) / 2; -xc0 = (x0 + xc0) / 2; -yc0 = (y0 + yc0) / 2; -xc1 = (xc1 + x1) / 2; -yc1 = (yc1 + y1) / 2; -var xc0m = (xc0 + xmid) / 2; -var yc0m = (yc0 + ymid) / 2; -var xmc1 = (xmid + xc1) / 2; -var ymc1 = (ymid + yc1) / 2; -xmid = (xc0m + xmc1) / 2; -ymid = (yc0m + ymc1) / 2; -if (Double.isNaN (xmid) || Double.isNaN (ymid)) { -return 0; -}return (jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1) + jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1)); -}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); -c$.rectCrossingsForPath = Clazz_defineMethod (c$, "rectCrossingsForPath", -function (pi, rxmin, rymin, rxmax, rymax) { -if (rxmax <= rxmin || rymax <= rymin) { -return 0; -}if (pi.isDone ()) { -return 0; -}var coords = Clazz_newDoubleArray (6, 0); -if (pi.currentSegment (coords) != 0) { -throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); -}pi.next (); -var curx; -var cury; -var movx; -var movy; -var endx; -var endy; -curx = movx = coords[0]; -cury = movy = coords[1]; -var crossings = 0; -while (crossings != -2147483648 && !pi.isDone ()) { -switch (pi.currentSegment (coords)) { -case 0: -if (curx != movx || cury != movy) { -crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy); -}movx = curx = coords[0]; -movy = cury = coords[1]; -break; -case 1: -endx = coords[0]; -endy = coords[1]; -crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, endx, endy); -curx = endx; -cury = endy; -break; -case 2: -endx = coords[2]; -endy = coords[3]; -crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], endx, endy, 0); -curx = endx; -cury = endy; -break; -case 3: -endx = coords[4]; -endy = coords[5]; -crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0); -curx = endx; -cury = endy; -break; -case 4: -if (curx != movx || cury != movy) { -crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy); -}curx = movx; -cury = movy; -break; -} -pi.next (); -} -if (crossings != -2147483648 && (curx != movx || cury != movy)) { -crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy); -}return crossings; -}, "java.awt.geom.PathIterator,~N,~N,~N,~N"); -c$.rectCrossingsForLine = Clazz_defineMethod (c$, "rectCrossingsForLine", -function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1) { -if (y0 >= rymax && y1 >= rymax) return crossings; -if (y0 <= rymin && y1 <= rymin) return crossings; -if (x0 <= rxmin && x1 <= rxmin) return crossings; -if (x0 >= rxmax && x1 >= rxmax) { -if (y0 < y1) { -if (y0 <= rymin) crossings++; -if (y1 >= rymax) crossings++; -} else if (y1 < y0) { -if (y1 <= rymin) crossings--; -if (y0 >= rymax) crossings--; -}return crossings; -}if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) { -return -2147483648; -}var xi0 = x0; -if (y0 < rymin) { -xi0 += ((rymin - y0) * (x1 - x0) / (y1 - y0)); -} else if (y0 > rymax) { -xi0 += ((rymax - y0) * (x1 - x0) / (y1 - y0)); -}var xi1 = x1; -if (y1 < rymin) { -xi1 += ((rymin - y1) * (x0 - x1) / (y0 - y1)); -} else if (y1 > rymax) { -xi1 += ((rymax - y1) * (x0 - x1) / (y0 - y1)); -}if (xi0 <= rxmin && xi1 <= rxmin) return crossings; -if (xi0 >= rxmax && xi1 >= rxmax) { -if (y0 < y1) { -if (y0 <= rymin) crossings++; -if (y1 >= rymax) crossings++; -} else if (y1 < y0) { -if (y1 <= rymin) crossings--; -if (y0 >= rymax) crossings--; -}return crossings; -}return -2147483648; -}, "~N,~N,~N,~N,~N,~N,~N,~N,~N"); -c$.rectCrossingsForQuad = Clazz_defineMethod (c$, "rectCrossingsForQuad", -function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc, yc, x1, y1, level) { -if (y0 >= rymax && yc >= rymax && y1 >= rymax) return crossings; -if (y0 <= rymin && yc <= rymin && y1 <= rymin) return crossings; -if (x0 <= rxmin && xc <= rxmin && x1 <= rxmin) return crossings; -if (x0 >= rxmax && xc >= rxmax && x1 >= rxmax) { -if (y0 < y1) { -if (y0 <= rymin && y1 > rymin) crossings++; -if (y0 < rymax && y1 >= rymax) crossings++; -} else if (y1 < y0) { -if (y1 <= rymin && y0 > rymin) crossings--; -if (y1 < rymax && y0 >= rymax) crossings--; -}return crossings; -}if ((x0 < rxmax && x0 > rxmin && y0 < rymax && y0 > rymin) || (x1 < rxmax && x1 > rxmin && y1 < rymax && y1 > rymin)) { -return -2147483648; -}if (level > 52) { -return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1); -}var x0c = (x0 + xc) / 2; -var y0c = (y0 + yc) / 2; -var xc1 = (xc + x1) / 2; -var yc1 = (yc + y1) / 2; -xc = (x0c + xc1) / 2; -yc = (y0c + yc1) / 2; -if (Double.isNaN (xc) || Double.isNaN (yc)) { -return 0; -}crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x0c, y0c, xc, yc, level + 1); -if (crossings != -2147483648) { -crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, xc, yc, xc1, yc1, x1, y1, level + 1); -}return crossings; -}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); -c$.rectCrossingsForCubic = Clazz_defineMethod (c$, "rectCrossingsForCubic", -function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) { -if (y0 >= rymax && yc0 >= rymax && yc1 >= rymax && y1 >= rymax) { -return crossings; -}if (y0 <= rymin && yc0 <= rymin && yc1 <= rymin && y1 <= rymin) { -return crossings; -}if (x0 <= rxmin && xc0 <= rxmin && xc1 <= rxmin && x1 <= rxmin) { -return crossings; -}if (x0 >= rxmax && xc0 >= rxmax && xc1 >= rxmax && x1 >= rxmax) { -if (y0 < y1) { -if (y0 <= rymin && y1 > rymin) crossings++; -if (y0 < rymax && y1 >= rymax) crossings++; -} else if (y1 < y0) { -if (y1 <= rymin && y0 > rymin) crossings--; -if (y1 < rymax && y0 >= rymax) crossings--; -}return crossings; -}if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) { -return -2147483648; -}if (level > 52) { -return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1); -}var xmid = (xc0 + xc1) / 2; -var ymid = (yc0 + yc1) / 2; -xc0 = (x0 + xc0) / 2; -yc0 = (y0 + yc0) / 2; -xc1 = (xc1 + x1) / 2; -yc1 = (yc1 + y1) / 2; -var xc0m = (xc0 + xmid) / 2; -var yc0m = (yc0 + ymid) / 2; -var xmc1 = (xmid + xc1) / 2; -var ymc1 = (ymid + yc1) / 2; -xmid = (xc0m + xmc1) / 2; -ymid = (yc0m + ymc1) / 2; -if (Double.isNaN (xmid) || Double.isNaN (ymid)) { -return 0; -}crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1); -if (crossings != -2147483648) { -crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1); -}return crossings; -}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_makeConstructor (c$, -function (direction) { -this.direction = direction; -}, "~N"); -Clazz_defineMethod (c$, "getDirection", -function () { -return this.direction; -}); -Clazz_defineMethod (c$, "getWithDirection", -function (direction) { -return (this.direction == direction ? this : this.getReversedCurve ()); -}, "~N"); -c$.round = Clazz_defineMethod (c$, "round", -function (v) { -return v; -}, "~N"); -c$.orderof = Clazz_defineMethod (c$, "orderof", -function (x1, x2) { -if (x1 < x2) { -return -1; -}if (x1 > x2) { -return 1; -}return 0; -}, "~N,~N"); -c$.signeddiffbits = Clazz_defineMethod (c$, "signeddiffbits", -function (y1, y2) { -return (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2)); -}, "~N,~N"); -c$.diffbits = Clazz_defineMethod (c$, "diffbits", -function (y1, y2) { -return Math.abs (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2)); -}, "~N,~N"); -c$.prev = Clazz_defineMethod (c$, "prev", -function (v) { -return Double.longBitsToDouble (Double.doubleToLongBits (v) - 1); -}, "~N"); -c$.next = Clazz_defineMethod (c$, "next", -function (v) { -return Double.longBitsToDouble (Double.doubleToLongBits (v) + 1); -}, "~N"); -Clazz_overrideMethod (c$, "toString", -function () { -return ("Curve[" + this.getOrder () + ", " + ("(" + jssun.awt.geom.Curve.round (this.getX0 ()) + ", " + jssun.awt.geom.Curve.round (this.getY0 ()) + "), ") + this.controlPointString () + ("(" + jssun.awt.geom.Curve.round (this.getX1 ()) + ", " + jssun.awt.geom.Curve.round (this.getY1 ()) + "), ") + (this.direction == 1 ? "D" : "U") + "]"); -}); -Clazz_defineMethod (c$, "controlPointString", -function () { -return ""; -}); -Clazz_defineMethod (c$, "crossingsFor", -function (x, y) { -if (y >= this.getYTop () && y < this.getYBot ()) { -if (x < this.getXMax () && (x < this.getXMin () || x < this.XforY (y))) { -return 1; -}}return 0; -}, "~N,~N"); -Clazz_defineMethod (c$, "accumulateCrossings", -function (c) { -var xhi = c.getXHi (); -if (this.getXMin () >= xhi) { -return false; -}var xlo = c.getXLo (); -var ylo = c.getYLo (); -var yhi = c.getYHi (); -var y0 = this.getYTop (); -var y1 = this.getYBot (); -var tstart; -var ystart; -var tend; -var yend; -if (y0 < ylo) { -if (y1 <= ylo) { -return false; -}ystart = ylo; -tstart = this.TforY (ylo); -} else { -if (y0 >= yhi) { -return false; -}ystart = y0; -tstart = 0; -}if (y1 > yhi) { -yend = yhi; -tend = this.TforY (yhi); -} else { -yend = y1; -tend = 1; -}var hitLo = false; -var hitHi = false; -while (true) { -var x = this.XforT (tstart); -if (x < xhi) { -if (hitHi || x > xlo) { -return true; -}hitLo = true; -} else { -if (hitLo) { -return true; -}hitHi = true; -}if (tstart >= tend) { -break; -}tstart = this.nextVertical (tstart, tend); -} -if (hitLo) { -c.record (ystart, yend, this.direction); -}return false; -}, "jssun.awt.geom.Crossings"); -Clazz_defineMethod (c$, "getSubCurve", -function (ystart, yend) { -return this.getSubCurve (ystart, yend, this.direction); -}, "~N,~N"); -Clazz_defineMethod (c$, "compareTo", -function (that, yrange) { -var y0 = yrange[0]; -var y1 = yrange[1]; -y1 = Math.min (Math.min (y1, this.getYBot ()), that.getYBot ()); -if (y1 <= yrange[0]) { -System.err.println ("this == " + this); -System.err.println ("that == " + that); -System.out.println ("target range = " + yrange[0] + "=>" + yrange[1]); -throw new InternalError ("backstepping from " + yrange[0] + " to " + y1); -}yrange[1] = y1; -if (this.getXMax () <= that.getXMin ()) { -if (this.getXMin () == that.getXMax ()) { -return 0; -}return -1; -}if (this.getXMin () >= that.getXMax ()) { -return 1; -}var s0 = this.TforY (y0); -var ys0 = this.YforT (s0); -if (ys0 < y0) { -s0 = this.refineTforY (s0, ys0, y0); -ys0 = this.YforT (s0); -}var s1 = this.TforY (y1); -if (this.YforT (s1) < y0) { -s1 = this.refineTforY (s1, this.YforT (s1), y0); -}var t0 = that.TforY (y0); -var yt0 = that.YforT (t0); -if (yt0 < y0) { -t0 = that.refineTforY (t0, yt0, y0); -yt0 = that.YforT (t0); -}var t1 = that.TforY (y1); -if (that.YforT (t1) < y0) { -t1 = that.refineTforY (t1, that.YforT (t1), y0); -}var xs0 = this.XforT (s0); -var xt0 = that.XforT (t0); -var scale = Math.max (Math.abs (y0), Math.abs (y1)); -var ymin = Math.max (scale * 1E-14, 1E-300); -if (this.fairlyClose (xs0, xt0)) { -var bump = ymin; -var maxbump = Math.min (ymin * 1E13, (y1 - y0) * .1); -var y = y0 + bump; -while (y <= y1) { -if (this.fairlyClose (this.XforY (y), that.XforY (y))) { -if ((bump *= 2) > maxbump) { -bump = maxbump; -}} else { -y -= bump; -while (true) { -bump /= 2; -var newy = y + bump; -if (newy <= y) { -break; -}if (this.fairlyClose (this.XforY (newy), that.XforY (newy))) { -y = newy; -}} -break; -}y += bump; -} -if (y > y0) { -if (y < y1) { -yrange[1] = y; -}return 0; -}}if (ymin <= 0) { -System.out.println ("ymin = " + ymin); -}while (s0 < s1 && t0 < t1) { -var sh = this.nextVertical (s0, s1); -var xsh = this.XforT (sh); -var ysh = this.YforT (sh); -var th = that.nextVertical (t0, t1); -var xth = that.XforT (th); -var yth = that.YforT (th); -try { -if (this.findIntersect (that, yrange, ymin, 0, 0, s0, xs0, ys0, sh, xsh, ysh, t0, xt0, yt0, th, xth, yth)) { -break; -}} catch (t) { -System.err.println ("Error: " + t); -System.err.println ("y range was " + yrange[0] + "=>" + yrange[1]); -System.err.println ("s y range is " + ys0 + "=>" + ysh); -System.err.println ("t y range is " + yt0 + "=>" + yth); -System.err.println ("ymin is " + ymin); -return 0; -} -if (ysh < yth) { -if (ysh > yrange[0]) { -if (ysh < yrange[1]) { -yrange[1] = ysh; -}break; -}s0 = sh; -xs0 = xsh; -ys0 = ysh; -} else { -if (yth > yrange[0]) { -if (yth < yrange[1]) { -yrange[1] = yth; -}break; -}t0 = th; -xt0 = xth; -yt0 = yth; -}} -var ymid = (yrange[0] + yrange[1]) / 2; -return jssun.awt.geom.Curve.orderof (this.XforY (ymid), that.XforY (ymid)); -}, "jssun.awt.geom.Curve,~A"); -Clazz_defineMethod (c$, "findIntersect", -function (that, yrange, ymin, slevel, tlevel, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1) { -if (ys0 > yt1 || yt0 > ys1) { -return false; -}if (Math.min (xs0, xs1) > Math.max (xt0, xt1) || Math.max (xs0, xs1) < Math.min (xt0, xt1)) { -return false; -}if (s1 - s0 > 0.001) { -var s = (s0 + s1) / 2; -var xs = this.XforT (s); -var ys = this.YforT (s); -if (s == s0 || s == s1) { -System.out.println ("s0 = " + s0); -System.out.println ("s1 = " + s1); -throw new InternalError ("no s progress!"); -}if (t1 - t0 > 0.001) { -var t = (t0 + t1) / 2; -var xt = that.XforT (t); -var yt = that.YforT (t); -if (t == t0 || t == t1) { -System.out.println ("t0 = " + t0); -System.out.println ("t1 = " + t1); -throw new InternalError ("no t progress!"); -}if (ys >= yt0 && yt >= ys0) { -if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t, xt, yt)) { -return true; -}}if (ys >= yt) { -if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t, xt, yt, t1, xt1, yt1)) { -return true; -}}if (yt >= ys) { -if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) { -return true; -}}if (ys1 >= yt && yt1 >= ys) { -if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) { -return true; -}}} else { -if (ys >= yt0) { -if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t1, xt1, yt1)) { -return true; -}}if (yt1 >= ys) { -if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1)) { -return true; -}}}} else if (t1 - t0 > 0.001) { -var t = (t0 + t1) / 2; -var xt = that.XforT (t); -var yt = that.YforT (t); -if (t == t0 || t == t1) { -System.out.println ("t0 = " + t0); -System.out.println ("t1 = " + t1); -throw new InternalError ("no t progress!"); -}if (yt >= ys0) { -if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) { -return true; -}}if (ys1 >= yt) { -if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) { -return true; -}}} else { -var xlk = xs1 - xs0; -var ylk = ys1 - ys0; -var xnm = xt1 - xt0; -var ynm = yt1 - yt0; -var xmk = xt0 - xs0; -var ymk = yt0 - ys0; -var det = xnm * ylk - ynm * xlk; -if (det != 0) { -var detinv = 1 / det; -var s = (xnm * ymk - ynm * xmk) * detinv; -var t = (xlk * ymk - ylk * xmk) * detinv; -if (s >= 0 && s <= 1 && t >= 0 && t <= 1) { -s = s0 + s * (s1 - s0); -t = t0 + t * (t1 - t0); -if (s < 0 || s > 1 || t < 0 || t > 1) { -System.out.println ("Uh oh!"); -}var y = (this.YforT (s) + that.YforT (t)) / 2; -if (y <= yrange[1] && y > yrange[0]) { -yrange[1] = y; -return true; -}}}}return false; -}, "jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "refineTforY", -function (t0, yt0, y0) { -var t1 = 1; -while (true) { -var th = (t0 + t1) / 2; -if (th == t0 || th == t1) { -return t1; -}var y = this.YforT (th); -if (y < y0) { -t0 = th; -yt0 = y; -} else if (y > y0) { -t1 = th; -} else { -return t1; -}} -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "fairlyClose", -function (v1, v2) { -return (Math.abs (v1 - v2) < Math.max (Math.abs (v1), Math.abs (v2)) * 1E-10); -}, "~N,~N"); -Clazz_defineStatics (c$, -"INCREASING", 1, -"DECREASING", -1, -"RECT_INTERSECTS", 0x80000000, -"TMIN", 1E-3); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.lang.RuntimeException"], "java.awt.geom.IllegalPathStateException", null, function () { -c$ = Clazz_declareType (java.awt.geom, "IllegalPathStateException", RuntimeException); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.IllegalPathStateException, []); -}); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.w = 0; -this.h = 0; -this.affine = null; -this.index = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator); -Clazz_makeConstructor (c$, -function (r, at) { -this.x = r.getX (); -this.y = r.getY (); -this.w = r.getWidth (); -this.h = r.getHeight (); -this.affine = at; -if (this.w < 0 || this.h < 0) { -this.index = 6; -}}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getWindingRule", -function () { -return 1; -}); -Clazz_overrideMethod (c$, "isDone", -function () { -return this.index > 5; -}); -Clazz_overrideMethod (c$, "next", -function () { -this.index++; -}); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("rect iterator out of bounds"); -}if (this.index == 5) { -return 4; -}coords[0] = this.x; -coords[1] = this.y; -if (this.index == 1 || this.index == 2) { -coords[0] += this.w; -}if (this.index == 2 || this.index == 3) { -coords[1] += this.h; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, 1); -}return (this.index == 0 ? 0 : 1); -}, "~A"); -Clazz_defineMethod (c$, "currentSegment", -function (coords) { -if (this.isDone ()) { -throw new java.util.NoSuchElementException ("rect iterator out of bounds"); -}if (this.index == 5) { -return 4; -}coords[0] = this.x; -coords[1] = this.y; -if (this.index == 1 || this.index == 2) { -coords[0] += this.w; -}if (this.index == 2 || this.index == 3) { -coords[1] += this.h; -}if (this.affine != null) { -this.affine.transform (coords, 0, coords, 0, 1); -}return (this.index == 0 ? 0 : 1); -}, "~A"); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ActionEvent", ["java.awt.event.KeyEvent"], function () { -c$ = Clazz_decorateAsClass (function () { -this.actionCommand = null; -this.when = 0; -this.modifiers = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "ActionEvent", java.awt.AWTEvent); -Clazz_makeConstructor (c$, -function (source, id, command) { -this.construct (source, id, command, 0); -}, "~O,~N,~S"); -Clazz_makeConstructor (c$, -function (source, id, command, modifiers) { -this.construct (source, id, command, 0, modifiers); -}, "~O,~N,~S,~N"); -Clazz_makeConstructor (c$, -function (source, id, command, when, modifiers) { -Clazz_superConstructor (this, java.awt.event.ActionEvent, [source, id]); -this.actionCommand = command; -this.when = when; -this.modifiers = modifiers; -}, "~O,~N,~S,~N,~N"); -Clazz_defineMethod (c$, "getActionCommand", -function () { -return this.actionCommand; -}); -Clazz_defineMethod (c$, "getWhen", -function () { -return this.when; -}); -Clazz_defineMethod (c$, "getModifiers", -function () { -return this.modifiers; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 1001: -typeStr = "ACTION_PERFORMED"; -break; -default: -typeStr = "unknown type"; -} -return typeStr + ",cmd=" + this.actionCommand + ",when=" + this.when + ",modifiers=" + java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers); -}); -Clazz_defineStatics (c$, -"SHIFT_MASK", 1, -"CTRL_MASK", 2, -"META_MASK", 4, -"ALT_MASK", 8, -"ACTION_FIRST", 1001, -"ACTION_LAST", 1001, -"ACTION_PERFORMED", 1001); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.KeyEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Toolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.isProxyActive = false; -this.keyCode = 0; -this.keyChar = '\0'; -this.keyLocation = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "KeyEvent", java.awt.event.InputEvent); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, keyCode, keyChar, keyLocation) { -Clazz_superConstructor (this, java.awt.event.KeyEvent, [source, id, when, modifiers]); -if (id == 400) { -if (keyChar == '\uffff') { -throw new IllegalArgumentException ("invalid keyChar"); -}if (keyCode != 0) { -throw new IllegalArgumentException ("invalid keyCode"); -}if (keyLocation != 0) { -throw new IllegalArgumentException ("invalid keyLocation"); -}}this.keyCode = keyCode; -this.keyChar = keyChar; -if ((keyLocation < 0) || (keyLocation > 4)) { -throw new IllegalArgumentException ("invalid keyLocation"); -}this.keyLocation = keyLocation; -if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) { -this.setNewModifiers (); -} else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) { -this.setOldModifiers (); -}}, "java.awt.Component,~N,~N,~N,~N,~S,~N"); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, keyCode, keyChar) { -this.construct (source, id, when, modifiers, keyCode, keyChar, 0); -}, "java.awt.Component,~N,~N,~N,~N,~S"); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, keyCode) { -this.construct (source, id, when, modifiers, keyCode, String.fromCharCode (keyCode)); -}, "java.awt.Component,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getKeyCode", -function () { -return this.keyCode; -}); -Clazz_defineMethod (c$, "setKeyCode", -function (keyCode) { -this.keyCode = keyCode; -}, "~N"); -Clazz_defineMethod (c$, "getKeyChar", -function () { -return this.keyChar; -}); -Clazz_defineMethod (c$, "setKeyChar", -function (keyChar) { -this.keyChar = keyChar; -}, "~S"); -Clazz_defineMethod (c$, "setModifiers", -function (modifiers) { -this.modifiers = modifiers; -if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) { -this.setNewModifiers (); -} else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) { -this.setOldModifiers (); -}}, "~N"); -Clazz_defineMethod (c$, "getKeyLocation", -function () { -return this.keyLocation; -}); -c$.getKeyText = Clazz_defineMethod (c$, "getKeyText", -function (keyCode) { -if (keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90) { -return String.valueOf (String.fromCharCode (keyCode)); -}switch (keyCode) { -case 10: -return java.awt.Toolkit.getProperty ("AWT.enter", "Enter"); -case 8: -return java.awt.Toolkit.getProperty ("AWT.backSpace", "Backspace"); -case 9: -return java.awt.Toolkit.getProperty ("AWT.tab", "Tab"); -case 3: -return java.awt.Toolkit.getProperty ("AWT.cancel", "Cancel"); -case 12: -return java.awt.Toolkit.getProperty ("AWT.clear", "Clear"); -case 65312: -return java.awt.Toolkit.getProperty ("AWT.compose", "Compose"); -case 19: -return java.awt.Toolkit.getProperty ("AWT.pause", "Pause"); -case 20: -return java.awt.Toolkit.getProperty ("AWT.capsLock", "Caps Lock"); -case 27: -return java.awt.Toolkit.getProperty ("AWT.escape", "Escape"); -case 32: -return java.awt.Toolkit.getProperty ("AWT.space", "Space"); -case 33: -return java.awt.Toolkit.getProperty ("AWT.pgup", "Page Up"); -case 34: -return java.awt.Toolkit.getProperty ("AWT.pgdn", "Page Down"); -case 35: -return java.awt.Toolkit.getProperty ("AWT.end", "End"); -case 36: -return java.awt.Toolkit.getProperty ("AWT.home", "Home"); -case 37: -return java.awt.Toolkit.getProperty ("AWT.left", "Left"); -case 38: -return java.awt.Toolkit.getProperty ("AWT.up", "Up"); -case 39: -return java.awt.Toolkit.getProperty ("AWT.right", "Right"); -case 40: -return java.awt.Toolkit.getProperty ("AWT.down", "Down"); -case 65368: -return java.awt.Toolkit.getProperty ("AWT.begin", "Begin"); -case 16: -return java.awt.Toolkit.getProperty ("AWT.shift", "Shift"); -case 17: -return java.awt.Toolkit.getProperty ("AWT.control", "Control"); -case 18: -return java.awt.Toolkit.getProperty ("AWT.alt", "Alt"); -case 157: -return java.awt.Toolkit.getProperty ("AWT.meta", "Meta"); -case 65406: -return java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"); -case 44: -return java.awt.Toolkit.getProperty ("AWT.comma", "Comma"); -case 46: -return java.awt.Toolkit.getProperty ("AWT.period", "Period"); -case 47: -return java.awt.Toolkit.getProperty ("AWT.slash", "Slash"); -case 59: -return java.awt.Toolkit.getProperty ("AWT.semicolon", "Semicolon"); -case 61: -return java.awt.Toolkit.getProperty ("AWT.equals", "Equals"); -case 91: -return java.awt.Toolkit.getProperty ("AWT.openBracket", "Open Bracket"); -case 92: -return java.awt.Toolkit.getProperty ("AWT.backSlash", "Back Slash"); -case 93: -return java.awt.Toolkit.getProperty ("AWT.closeBracket", "Close Bracket"); -case 106: -return java.awt.Toolkit.getProperty ("AWT.multiply", "NumPad *"); -case 107: -return java.awt.Toolkit.getProperty ("AWT.add", "NumPad +"); -case 108: -return java.awt.Toolkit.getProperty ("AWT.separator", "NumPad ,"); -case 109: -return java.awt.Toolkit.getProperty ("AWT.subtract", "NumPad -"); -case 110: -return java.awt.Toolkit.getProperty ("AWT.decimal", "NumPad ."); -case 111: -return java.awt.Toolkit.getProperty ("AWT.divide", "NumPad /"); -case 127: -return java.awt.Toolkit.getProperty ("AWT.delete", "Delete"); -case 144: -return java.awt.Toolkit.getProperty ("AWT.numLock", "Num Lock"); -case 145: -return java.awt.Toolkit.getProperty ("AWT.scrollLock", "Scroll Lock"); -case 524: -return java.awt.Toolkit.getProperty ("AWT.windows", "Windows"); -case 525: -return java.awt.Toolkit.getProperty ("AWT.context", "Context Menu"); -case 112: -return java.awt.Toolkit.getProperty ("AWT.f1", "F1"); -case 113: -return java.awt.Toolkit.getProperty ("AWT.f2", "F2"); -case 114: -return java.awt.Toolkit.getProperty ("AWT.f3", "F3"); -case 115: -return java.awt.Toolkit.getProperty ("AWT.f4", "F4"); -case 116: -return java.awt.Toolkit.getProperty ("AWT.f5", "F5"); -case 117: -return java.awt.Toolkit.getProperty ("AWT.f6", "F6"); -case 118: -return java.awt.Toolkit.getProperty ("AWT.f7", "F7"); -case 119: -return java.awt.Toolkit.getProperty ("AWT.f8", "F8"); -case 120: -return java.awt.Toolkit.getProperty ("AWT.f9", "F9"); -case 121: -return java.awt.Toolkit.getProperty ("AWT.f10", "F10"); -case 122: -return java.awt.Toolkit.getProperty ("AWT.f11", "F11"); -case 123: -return java.awt.Toolkit.getProperty ("AWT.f12", "F12"); -case 61440: -return java.awt.Toolkit.getProperty ("AWT.f13", "F13"); -case 61441: -return java.awt.Toolkit.getProperty ("AWT.f14", "F14"); -case 61442: -return java.awt.Toolkit.getProperty ("AWT.f15", "F15"); -case 61443: -return java.awt.Toolkit.getProperty ("AWT.f16", "F16"); -case 61444: -return java.awt.Toolkit.getProperty ("AWT.f17", "F17"); -case 61445: -return java.awt.Toolkit.getProperty ("AWT.f18", "F18"); -case 61446: -return java.awt.Toolkit.getProperty ("AWT.f19", "F19"); -case 61447: -return java.awt.Toolkit.getProperty ("AWT.f20", "F20"); -case 61448: -return java.awt.Toolkit.getProperty ("AWT.f21", "F21"); -case 61449: -return java.awt.Toolkit.getProperty ("AWT.f22", "F22"); -case 61450: -return java.awt.Toolkit.getProperty ("AWT.f23", "F23"); -case 61451: -return java.awt.Toolkit.getProperty ("AWT.f24", "F24"); -case 154: -return java.awt.Toolkit.getProperty ("AWT.printScreen", "Print Screen"); -case 155: -return java.awt.Toolkit.getProperty ("AWT.insert", "Insert"); -case 156: -return java.awt.Toolkit.getProperty ("AWT.help", "Help"); -case 192: -return java.awt.Toolkit.getProperty ("AWT.backQuote", "Back Quote"); -case 222: -return java.awt.Toolkit.getProperty ("AWT.quote", "Quote"); -case 224: -return java.awt.Toolkit.getProperty ("AWT.up", "Up"); -case 225: -return java.awt.Toolkit.getProperty ("AWT.down", "Down"); -case 226: -return java.awt.Toolkit.getProperty ("AWT.left", "Left"); -case 227: -return java.awt.Toolkit.getProperty ("AWT.right", "Right"); -case 128: -return java.awt.Toolkit.getProperty ("AWT.deadGrave", "Dead Grave"); -case 129: -return java.awt.Toolkit.getProperty ("AWT.deadAcute", "Dead Acute"); -case 130: -return java.awt.Toolkit.getProperty ("AWT.deadCircumflex", "Dead Circumflex"); -case 131: -return java.awt.Toolkit.getProperty ("AWT.deadTilde", "Dead Tilde"); -case 132: -return java.awt.Toolkit.getProperty ("AWT.deadMacron", "Dead Macron"); -case 133: -return java.awt.Toolkit.getProperty ("AWT.deadBreve", "Dead Breve"); -case 134: -return java.awt.Toolkit.getProperty ("AWT.deadAboveDot", "Dead Above Dot"); -case 135: -return java.awt.Toolkit.getProperty ("AWT.deadDiaeresis", "Dead Diaeresis"); -case 136: -return java.awt.Toolkit.getProperty ("AWT.deadAboveRing", "Dead Above Ring"); -case 137: -return java.awt.Toolkit.getProperty ("AWT.deadDoubleAcute", "Dead Double Acute"); -case 138: -return java.awt.Toolkit.getProperty ("AWT.deadCaron", "Dead Caron"); -case 139: -return java.awt.Toolkit.getProperty ("AWT.deadCedilla", "Dead Cedilla"); -case 140: -return java.awt.Toolkit.getProperty ("AWT.deadOgonek", "Dead Ogonek"); -case 141: -return java.awt.Toolkit.getProperty ("AWT.deadIota", "Dead Iota"); -case 142: -return java.awt.Toolkit.getProperty ("AWT.deadVoicedSound", "Dead Voiced Sound"); -case 143: -return java.awt.Toolkit.getProperty ("AWT.deadSemivoicedSound", "Dead Semivoiced Sound"); -case 150: -return java.awt.Toolkit.getProperty ("AWT.ampersand", "Ampersand"); -case 151: -return java.awt.Toolkit.getProperty ("AWT.asterisk", "Asterisk"); -case 152: -return java.awt.Toolkit.getProperty ("AWT.quoteDbl", "Double Quote"); -case 153: -return java.awt.Toolkit.getProperty ("AWT.Less", "Less"); -case 160: -return java.awt.Toolkit.getProperty ("AWT.greater", "Greater"); -case 161: -return java.awt.Toolkit.getProperty ("AWT.braceLeft", "Left Brace"); -case 162: -return java.awt.Toolkit.getProperty ("AWT.braceRight", "Right Brace"); -case 512: -return java.awt.Toolkit.getProperty ("AWT.at", "At"); -case 513: -return java.awt.Toolkit.getProperty ("AWT.colon", "Colon"); -case 514: -return java.awt.Toolkit.getProperty ("AWT.circumflex", "Circumflex"); -case 515: -return java.awt.Toolkit.getProperty ("AWT.dollar", "Dollar"); -case 516: -return java.awt.Toolkit.getProperty ("AWT.euro", "Euro"); -case 517: -return java.awt.Toolkit.getProperty ("AWT.exclamationMark", "Exclamation Mark"); -case 518: -return java.awt.Toolkit.getProperty ("AWT.invertedExclamationMark", "Inverted Exclamation Mark"); -case 519: -return java.awt.Toolkit.getProperty ("AWT.leftParenthesis", "Left Parenthesis"); -case 520: -return java.awt.Toolkit.getProperty ("AWT.numberSign", "Number Sign"); -case 45: -return java.awt.Toolkit.getProperty ("AWT.minus", "Minus"); -case 521: -return java.awt.Toolkit.getProperty ("AWT.plus", "Plus"); -case 522: -return java.awt.Toolkit.getProperty ("AWT.rightParenthesis", "Right Parenthesis"); -case 523: -return java.awt.Toolkit.getProperty ("AWT.underscore", "Underscore"); -case 24: -return java.awt.Toolkit.getProperty ("AWT.final", "Final"); -case 28: -return java.awt.Toolkit.getProperty ("AWT.convert", "Convert"); -case 29: -return java.awt.Toolkit.getProperty ("AWT.noconvert", "No Convert"); -case 30: -return java.awt.Toolkit.getProperty ("AWT.accept", "Accept"); -case 31: -return java.awt.Toolkit.getProperty ("AWT.modechange", "Mode Change"); -case 21: -return java.awt.Toolkit.getProperty ("AWT.kana", "Kana"); -case 25: -return java.awt.Toolkit.getProperty ("AWT.kanji", "Kanji"); -case 240: -return java.awt.Toolkit.getProperty ("AWT.alphanumeric", "Alphanumeric"); -case 241: -return java.awt.Toolkit.getProperty ("AWT.katakana", "Katakana"); -case 242: -return java.awt.Toolkit.getProperty ("AWT.hiragana", "Hiragana"); -case 243: -return java.awt.Toolkit.getProperty ("AWT.fullWidth", "Full-Width"); -case 244: -return java.awt.Toolkit.getProperty ("AWT.halfWidth", "Half-Width"); -case 245: -return java.awt.Toolkit.getProperty ("AWT.romanCharacters", "Roman Characters"); -case 256: -return java.awt.Toolkit.getProperty ("AWT.allCandidates", "All Candidates"); -case 257: -return java.awt.Toolkit.getProperty ("AWT.previousCandidate", "Previous Candidate"); -case 258: -return java.awt.Toolkit.getProperty ("AWT.codeInput", "Code Input"); -case 259: -return java.awt.Toolkit.getProperty ("AWT.japaneseKatakana", "Japanese Katakana"); -case 260: -return java.awt.Toolkit.getProperty ("AWT.japaneseHiragana", "Japanese Hiragana"); -case 261: -return java.awt.Toolkit.getProperty ("AWT.japaneseRoman", "Japanese Roman"); -case 262: -return java.awt.Toolkit.getProperty ("AWT.kanaLock", "Kana Lock"); -case 263: -return java.awt.Toolkit.getProperty ("AWT.inputMethodOnOff", "Input Method On/Off"); -case 65481: -return java.awt.Toolkit.getProperty ("AWT.again", "Again"); -case 65483: -return java.awt.Toolkit.getProperty ("AWT.undo", "Undo"); -case 65485: -return java.awt.Toolkit.getProperty ("AWT.copy", "Copy"); -case 65487: -return java.awt.Toolkit.getProperty ("AWT.paste", "Paste"); -case 65489: -return java.awt.Toolkit.getProperty ("AWT.cut", "Cut"); -case 65488: -return java.awt.Toolkit.getProperty ("AWT.find", "Find"); -case 65482: -return java.awt.Toolkit.getProperty ("AWT.props", "Props"); -case 65480: -return java.awt.Toolkit.getProperty ("AWT.stop", "Stop"); -} -if (keyCode >= 96 && keyCode <= 105) { -var numpad = java.awt.Toolkit.getProperty ("AWT.numpad", "NumPad"); -var c = String.fromCharCode (keyCode - 96 + 48); -return numpad + "-" + c; -}var unknown = java.awt.Toolkit.getProperty ("AWT.unknown", "Unknown"); -return unknown + " keyCode: 0x" + Integer.toString (keyCode, 16); -}, "~N"); -c$.getKeyModifiersText = Clazz_defineMethod (c$, "getKeyModifiersText", -function (modifiers) { -var buf = new StringBuilder (); -if ((modifiers & 4) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta")); -buf.append ("+"); -}if ((modifiers & 2) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl")); -buf.append ("+"); -}if ((modifiers & 8) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt")); -buf.append ("+"); -}if ((modifiers & 1) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift")); -buf.append ("+"); -}if ((modifiers & 32) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph")); -buf.append ("+"); -}if ((modifiers & 16) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1")); -buf.append ("+"); -}if (buf.length () > 0) { -buf.setLength (buf.length () - 1); -}return buf.toString (); -}, "~N"); -Clazz_defineMethod (c$, "isActionKey", -function () { -switch (this.keyCode) { -case 36: -case 35: -case 33: -case 34: -case 38: -case 40: -case 37: -case 39: -case 65368: -case 226: -case 224: -case 227: -case 225: -case 112: -case 113: -case 114: -case 115: -case 116: -case 117: -case 118: -case 119: -case 120: -case 121: -case 122: -case 123: -case 61440: -case 61441: -case 61442: -case 61443: -case 61444: -case 61445: -case 61446: -case 61447: -case 61448: -case 61449: -case 61450: -case 61451: -case 154: -case 145: -case 20: -case 144: -case 19: -case 155: -case 24: -case 28: -case 29: -case 30: -case 31: -case 21: -case 25: -case 240: -case 241: -case 242: -case 243: -case 244: -case 245: -case 256: -case 257: -case 258: -case 259: -case 260: -case 261: -case 262: -case 263: -case 65481: -case 65483: -case 65485: -case 65487: -case 65489: -case 65488: -case 65482: -case 65480: -case 156: -case 524: -case 525: -return true; -} -return false; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var str = new StringBuilder (100); -switch (this.id) { -case 401: -str.append ("KEY_PRESSED"); -break; -case 402: -str.append ("KEY_RELEASED"); -break; -case 400: -str.append ("KEY_TYPED"); -break; -default: -str.append ("unknown type"); -break; -} -str.append (",keyCode=").append ("" + this.keyCode); -str.append (",keyText=").append (java.awt.event.KeyEvent.getKeyText (this.keyCode)); -str.append (",keyChar="); -switch (this.keyChar) { -case '\b': -str.append (java.awt.event.KeyEvent.getKeyText (8)); -break; -case '\t': -str.append (java.awt.event.KeyEvent.getKeyText (9)); -break; -case '\n': -str.append (java.awt.event.KeyEvent.getKeyText (10)); -break; -case '\u0018': -str.append (java.awt.event.KeyEvent.getKeyText (3)); -break; -case '\u001b': -str.append (java.awt.event.KeyEvent.getKeyText (27)); -break; -case '\u007f': -str.append (java.awt.event.KeyEvent.getKeyText (127)); -break; -case '\uffff': -str.append (java.awt.Toolkit.getProperty ("AWT.undefined", "Undefined")); -str.append (" keyChar"); -break; -default: -str.append ("'").append (this.keyChar).append ("'"); -break; -} -if (this.getModifiers () != 0) { -str.append (",modifiers=").append (java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers)); -}if (this.getModifiersEx () != 0) { -str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers)); -}str.append (",keyLocation="); -switch (this.keyLocation) { -case 0: -str.append ("KEY_LOCATION_UNKNOWN"); -break; -case 1: -str.append ("KEY_LOCATION_STANDARD"); -break; -case 2: -str.append ("KEY_LOCATION_LEFT"); -break; -case 3: -str.append ("KEY_LOCATION_RIGHT"); -break; -case 4: -str.append ("KEY_LOCATION_NUMPAD"); -break; -default: -str.append ("KEY_LOCATION_UNKNOWN"); -break; -} -return str.toString (); -}); -Clazz_defineMethod (c$, "setNewModifiers", - function () { -if ((this.modifiers & 1) != 0) { -this.modifiers |= 64; -}if ((this.modifiers & 8) != 0) { -this.modifiers |= 512; -}if ((this.modifiers & 2) != 0) { -this.modifiers |= 128; -}if ((this.modifiers & 4) != 0) { -this.modifiers |= 256; -}if ((this.modifiers & 32) != 0) { -this.modifiers |= 8192; -}if ((this.modifiers & 16) != 0) { -this.modifiers |= 1024; -}}); -Clazz_defineMethod (c$, "setOldModifiers", - function () { -if ((this.modifiers & 64) != 0) { -this.modifiers |= 1; -}if ((this.modifiers & 512) != 0) { -this.modifiers |= 8; -}if ((this.modifiers & 128) != 0) { -this.modifiers |= 2; -}if ((this.modifiers & 256) != 0) { -this.modifiers |= 4; -}if ((this.modifiers & 8192) != 0) { -this.modifiers |= 32; -}if ((this.modifiers & 1024) != 0) { -this.modifiers |= 16; -}}); -Clazz_defineStatics (c$, -"KEY_FIRST", 400, -"KEY_LAST", 402, -"KEY_TYPED", 400, -"KEY_PRESSED", 401, -"KEY_RELEASED", 402, -"VK_ENTER", '\n', -"VK_BACK_SPACE", '\b', -"VK_TAB", '\t', -"VK_CANCEL", 0x03, -"VK_CLEAR", 0x0C, -"VK_SHIFT", 0x10, -"VK_CONTROL", 0x11, -"VK_ALT", 0x12, -"VK_PAUSE", 0x13, -"VK_CAPS_LOCK", 0x14, -"VK_ESCAPE", 0x1B, -"VK_SPACE", 0x20, -"VK_PAGE_UP", 0x21, -"VK_PAGE_DOWN", 0x22, -"VK_END", 0x23, -"VK_HOME", 0x24, -"VK_LEFT", 0x25, -"VK_UP", 0x26, -"VK_RIGHT", 0x27, -"VK_DOWN", 0x28, -"VK_COMMA", 0x2C, -"VK_MINUS", 0x2D, -"VK_PERIOD", 0x2E, -"VK_SLASH", 0x2F, -"VK_0", 0x30, -"VK_1", 0x31, -"VK_2", 0x32, -"VK_3", 0x33, -"VK_4", 0x34, -"VK_5", 0x35, -"VK_6", 0x36, -"VK_7", 0x37, -"VK_8", 0x38, -"VK_9", 0x39, -"VK_SEMICOLON", 0x3B, -"VK_EQUALS", 0x3D, -"VK_A", 0x41, -"VK_B", 0x42, -"VK_C", 0x43, -"VK_D", 0x44, -"VK_E", 0x45, -"VK_F", 0x46, -"VK_G", 0x47, -"VK_H", 0x48, -"VK_I", 0x49, -"VK_J", 0x4A, -"VK_K", 0x4B, -"VK_L", 0x4C, -"VK_M", 0x4D, -"VK_N", 0x4E, -"VK_O", 0x4F, -"VK_P", 0x50, -"VK_Q", 0x51, -"VK_R", 0x52, -"VK_S", 0x53, -"VK_T", 0x54, -"VK_U", 0x55, -"VK_V", 0x56, -"VK_W", 0x57, -"VK_X", 0x58, -"VK_Y", 0x59, -"VK_Z", 0x5A, -"VK_OPEN_BRACKET", 0x5B, -"VK_BACK_SLASH", 0x5C, -"VK_CLOSE_BRACKET", 0x5D, -"VK_NUMPAD0", 0x60, -"VK_NUMPAD1", 0x61, -"VK_NUMPAD2", 0x62, -"VK_NUMPAD3", 0x63, -"VK_NUMPAD4", 0x64, -"VK_NUMPAD5", 0x65, -"VK_NUMPAD6", 0x66, -"VK_NUMPAD7", 0x67, -"VK_NUMPAD8", 0x68, -"VK_NUMPAD9", 0x69, -"VK_MULTIPLY", 0x6A, -"VK_ADD", 0x6B, -"VK_SEPARATER", 0x6C, -"VK_SEPARATOR", 108, -"VK_SUBTRACT", 0x6D, -"VK_DECIMAL", 0x6E, -"VK_DIVIDE", 0x6F, -"VK_DELETE", 0x7F, -"VK_NUM_LOCK", 0x90, -"VK_SCROLL_LOCK", 0x91, -"VK_F1", 0x70, -"VK_F2", 0x71, -"VK_F3", 0x72, -"VK_F4", 0x73, -"VK_F5", 0x74, -"VK_F6", 0x75, -"VK_F7", 0x76, -"VK_F8", 0x77, -"VK_F9", 0x78, -"VK_F10", 0x79, -"VK_F11", 0x7A, -"VK_F12", 0x7B, -"VK_F13", 0xF000, -"VK_F14", 0xF001, -"VK_F15", 0xF002, -"VK_F16", 0xF003, -"VK_F17", 0xF004, -"VK_F18", 0xF005, -"VK_F19", 0xF006, -"VK_F20", 0xF007, -"VK_F21", 0xF008, -"VK_F22", 0xF009, -"VK_F23", 0xF00A, -"VK_F24", 0xF00B, -"VK_PRINTSCREEN", 0x9A, -"VK_INSERT", 0x9B, -"VK_HELP", 0x9C, -"VK_META", 0x9D, -"VK_BACK_QUOTE", 0xC0, -"VK_QUOTE", 0xDE, -"VK_KP_UP", 0xE0, -"VK_KP_DOWN", 0xE1, -"VK_KP_LEFT", 0xE2, -"VK_KP_RIGHT", 0xE3, -"VK_DEAD_GRAVE", 0x80, -"VK_DEAD_ACUTE", 0x81, -"VK_DEAD_CIRCUMFLEX", 0x82, -"VK_DEAD_TILDE", 0x83, -"VK_DEAD_MACRON", 0x84, -"VK_DEAD_BREVE", 0x85, -"VK_DEAD_ABOVEDOT", 0x86, -"VK_DEAD_DIAERESIS", 0x87, -"VK_DEAD_ABOVERING", 0x88, -"VK_DEAD_DOUBLEACUTE", 0x89, -"VK_DEAD_CARON", 0x8a, -"VK_DEAD_CEDILLA", 0x8b, -"VK_DEAD_OGONEK", 0x8c, -"VK_DEAD_IOTA", 0x8d, -"VK_DEAD_VOICED_SOUND", 0x8e, -"VK_DEAD_SEMIVOICED_SOUND", 0x8f, -"VK_AMPERSAND", 0x96, -"VK_ASTERISK", 0x97, -"VK_QUOTEDBL", 0x98, -"VK_LESS", 0x99, -"VK_GREATER", 0xa0, -"VK_BRACELEFT", 0xa1, -"VK_BRACERIGHT", 0xa2, -"VK_AT", 0x0200, -"VK_COLON", 0x0201, -"VK_CIRCUMFLEX", 0x0202, -"VK_DOLLAR", 0x0203, -"VK_EURO_SIGN", 0x0204, -"VK_EXCLAMATION_MARK", 0x0205, -"VK_INVERTED_EXCLAMATION_MARK", 0x0206, -"VK_LEFT_PARENTHESIS", 0x0207, -"VK_NUMBER_SIGN", 0x0208, -"VK_PLUS", 0x0209, -"VK_RIGHT_PARENTHESIS", 0x020A, -"VK_UNDERSCORE", 0x020B, -"VK_WINDOWS", 0x020C, -"VK_CONTEXT_MENU", 0x020D, -"VK_FINAL", 0x0018, -"VK_CONVERT", 0x001C, -"VK_NONCONVERT", 0x001D, -"VK_ACCEPT", 0x001E, -"VK_MODECHANGE", 0x001F, -"VK_KANA", 0x0015, -"VK_KANJI", 0x0019, -"VK_ALPHANUMERIC", 0x00F0, -"VK_KATAKANA", 0x00F1, -"VK_HIRAGANA", 0x00F2, -"VK_FULL_WIDTH", 0x00F3, -"VK_HALF_WIDTH", 0x00F4, -"VK_ROMAN_CHARACTERS", 0x00F5, -"VK_ALL_CANDIDATES", 0x0100, -"VK_PREVIOUS_CANDIDATE", 0x0101, -"VK_CODE_INPUT", 0x0102, -"VK_JAPANESE_KATAKANA", 0x0103, -"VK_JAPANESE_HIRAGANA", 0x0104, -"VK_JAPANESE_ROMAN", 0x0105, -"VK_KANA_LOCK", 0x0106, -"VK_INPUT_METHOD_ON_OFF", 0x0107, -"VK_CUT", 0xFFD1, -"VK_COPY", 0xFFCD, -"VK_PASTE", 0xFFCF, -"VK_UNDO", 0xFFCB, -"VK_AGAIN", 0xFFC9, -"VK_FIND", 0xFFD0, -"VK_PROPS", 0xFFCA, -"VK_STOP", 0xFFC8, -"VK_COMPOSE", 0xFF20, -"VK_ALT_GRAPH", 0xFF7E, -"VK_BEGIN", 0xFF58, -"VK_UNDEFINED", 0x0, -"CHAR_UNDEFINED", String.fromCharCode (0xFFFF), -"KEY_LOCATION_UNKNOWN", 0, -"KEY_LOCATION_STANDARD", 1, -"KEY_LOCATION_LEFT", 2, -"KEY_LOCATION_RIGHT", 3, -"KEY_LOCATION_NUMPAD", 4); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.scrollType = 0; -this.scrollAmount = 0; -this.wheelRotation = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) { -this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation); -}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N"); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) { -Clazz_superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]); -this.scrollType = scrollType; -this.scrollAmount = scrollAmount; -this.wheelRotation = wheelRotation; -}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N"); -Clazz_defineMethod (c$, "getScrollType", -function () { -return this.scrollType; -}); -Clazz_defineMethod (c$, "getScrollAmount", -function () { -return this.scrollAmount; -}); -Clazz_defineMethod (c$, "getWheelRotation", -function () { -return this.wheelRotation; -}); -Clazz_defineMethod (c$, "getUnitsToScroll", -function () { -return this.scrollAmount * this.wheelRotation; -}); -Clazz_defineMethod (c$, "paramString", -function () { -var scrollTypeStr = null; -if (this.getScrollType () == 0) { -scrollTypeStr = "WHEEL_UNIT_SCROLL"; -} else if (this.getScrollType () == 1) { -scrollTypeStr = "WHEEL_BLOCK_SCROLL"; -} else { -scrollTypeStr = "unknown scroll type"; -}return Clazz_superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation (); -}); -Clazz_defineStatics (c$, -"WHEEL_UNIT_SCROLL", 0, -"WHEEL_BLOCK_SCROLL", 1); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () { -c$ = Clazz_decorateAsClass (function () { -this.enabled = true; -this.arrayTable = null; -this.changeSupport = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]); -c$.shouldReconfigure = Clazz_defineMethod (c$, "shouldReconfigure", -function (e) { -if (e.getPropertyName () == null) { -javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false); -}return false; -}, "java.beans.PropertyChangeEvent"); -c$.setEnabledFromAction = Clazz_defineMethod (c$, "setEnabledFromAction", -function (c, a) { -c.setEnabled ((a != null) ? a.isEnabled () : true); -}, "javax.swing.JComponent,javax.swing.Action"); -c$.setToolTipTextFromAction = Clazz_defineMethod (c$, "setToolTipTextFromAction", -function (c, a) { -c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null); -}, "javax.swing.JComponent,javax.swing.Action"); -c$.hasSelectedKey = Clazz_defineMethod (c$, "hasSelectedKey", -function (a) { -return (a != null && a.getValue ("SwingSelectedKey") != null); -}, "javax.swing.Action"); -c$.isSelected = Clazz_defineMethod (c$, "isSelected", -function (a) { -return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey")); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_makeConstructor (c$, -function (name) { -this.putValue ("Name", name); -}, "~S"); -Clazz_makeConstructor (c$, -function (name, icon) { -this.construct (name); -this.putValue ("SmallIcon", icon); -}, "~S,javax.swing.Icon"); -Clazz_defineMethod (c$, "getValue", -function (key) { -if (key === "enabled") { -return this.enabled; -}if (this.arrayTable == null) { -return null; -}return this.arrayTable.get (key); -}, "~S"); -Clazz_overrideMethod (c$, "putValue", -function (key, newValue) { -var oldValue = null; -if (key === "enabled") { -if (newValue == null || !(Clazz_instanceOf (newValue, Boolean))) { -newValue = new Boolean (false); -}oldValue = new Boolean (this.enabled); -this.enabled = (newValue).booleanValue (); -} else { -if (this.arrayTable == null) { -this.arrayTable = new javax.swing.ArrayTable (); -}if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key); -if (newValue == null) { -this.arrayTable.remove (key); -} else { -this.arrayTable.put (key, newValue); -}}this.firePropertyChange (key, oldValue, newValue); -}, "~S,~O"); -Clazz_defineMethod (c$, "isEnabled", -function () { -return this.enabled; -}); -Clazz_overrideMethod (c$, "setEnabled", -function (newValue) { -var oldValue = this.enabled; -if (oldValue != newValue) { -this.enabled = newValue; -this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); -}}, "~B"); -Clazz_defineMethod (c$, "getKeys", -function () { -if (this.arrayTable == null) { -return null; -}var keys = new Array (this.arrayTable.size ()); -this.arrayTable.getKeys (keys); -return keys; -}); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) { -return; -}this.changeSupport.firePropertyChange (propertyName, oldValue, newValue); -}, "~S,~O,~O"); -Clazz_overrideMethod (c$, "addPropertyChangeListener", -function (listener) { -if (this.changeSupport == null) { -this.changeSupport = new javax.swing.event.SwingPropertyChangeSupport (this); -}this.changeSupport.addPropertyChangeListener (listener); -}, "java.beans.PropertyChangeListener"); -Clazz_overrideMethod (c$, "removePropertyChangeListener", -function (listener) { -if (this.changeSupport == null) { -return; -}this.changeSupport.removePropertyChangeListener (listener); -}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function () { -if (this.changeSupport == null) { -return new Array (0); -}return this.changeSupport.getPropertyChangeListeners (); -}); -Clazz_defineMethod (c$, "clone", -function () { -var newAction = Clazz_superCall (this, javax.swing.AbstractAction, "clone", []); -{ -if (this.arrayTable != null) { -newAction.arrayTable = this.arrayTable.clone (); -}}return newAction; -}); -Clazz_defineStatics (c$, -"RECONFIGURE_ON_NULL", null); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.ItemSelectable", "java.awt.event.ActionListener", "$.ItemListener", "javax.swing.ActionPropertyChangeListener", "$.JComponent", "$.SwingConstants", "javax.swing.event.ChangeListener"], "javax.swing.AbstractButton", ["java.lang.Boolean", "$.IllegalArgumentException", "java.awt.event.ActionEvent", "$.ItemEvent", "javax.swing.AbstractAction", "$.DefaultButtonModel", "$.OverlayLayout", "$.SwingUtilities", "$.UIManager", "javax.swing.event.ChangeEvent", "javax.swing.plaf.UIResource"], function () { -c$ = Clazz_decorateAsClass (function () { -this.model = null; -this.text = ""; -this.margin = null; -this.defaultMargin = null; -this.defaultIcon = null; -this.pressedIcon = null; -this.disabledIcon = null; -this.selectedIcon = null; -this.disabledSelectedIcon = null; -this.rolloverIcon = null; -this.rolloverSelectedIcon = null; -this.$paintBorder = true; -this.paintFocus = true; -this.rolloverEnabled = false; -this.contentAreaFilled = true; -this.verticalAlignment = 0; -this.horizontalAlignment = 0; -this.verticalTextPosition = 0; -this.horizontalTextPosition = 11; -this.iconTextGap = 4; -this.mnemonic = 0; -this.mnemonicIndex = -1; -this.multiClickThreshhold = 0; -this.borderPaintedSet = false; -this.rolloverEnabledSet = false; -this.iconTextGapSet = false; -this.contentAreaFilledSet = false; -this.$setLayout = false; -this.defaultCapable = true; -this.handler = null; -this.changeListener = null; -this.actionListener = null; -this.itemListener = null; -this.changeEvent = null; -this.hideActionText = false; -this.$action = null; -this.actionPropertyChangeListener = null; -if (!Clazz_isClassDefined ("javax.swing.AbstractButton.ButtonChangeListener")) { -javax.swing.AbstractButton.$AbstractButton$ButtonChangeListener$ (); -} -if (!Clazz_isClassDefined ("javax.swing.AbstractButton.Handler")) { -javax.swing.AbstractButton.$AbstractButton$Handler$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "AbstractButton", javax.swing.JComponent, [java.awt.ItemSelectable, javax.swing.SwingConstants]); -Clazz_defineMethod (c$, "setHideActionText", -function (hideActionText) { -if (hideActionText != this.hideActionText) { -this.hideActionText = hideActionText; -if (this.getAction () != null) { -this.setTextFromAction (this.getAction (), false); -}this.firePropertyChangeBool ("hideActionText", !hideActionText, hideActionText); -}}, "~B"); -Clazz_defineMethod (c$, "getHideActionText", -function () { -return this.hideActionText; -}); -Clazz_defineMethod (c$, "getText", -function () { -return this.text; -}); -Clazz_defineMethod (c$, "setText", -function (text) { -var oldValue = this.text; -this.text = text; -this.firePropertyChangeObject ("text", oldValue, text); -this.updateDisplayedMnemonicIndex (text, this.getMnemonic ()); -if (text == null || oldValue == null || !text.equals (oldValue)) { -this.revalidate (); -this.repaint (); -}}, "~S"); -Clazz_defineMethod (c$, "isSelected", -function () { -return this.model.isSelected (); -}); -Clazz_defineMethod (c$, "setSelected", -function (b) { -this.model.setSelected (b); -}, "~B"); -Clazz_defineMethod (c$, "doClick", -function () { -this.doClick (68); -}); -Clazz_defineMethod (c$, "doClick", -function (pressTime) { -}, "~N"); -Clazz_defineMethod (c$, "setMargin", -function (m) { -if (Clazz_instanceOf (m, javax.swing.plaf.UIResource)) { -this.defaultMargin = m; -} else if (Clazz_instanceOf (this.margin, javax.swing.plaf.UIResource)) { -this.defaultMargin = this.margin; -}if (m == null && this.defaultMargin != null) { -m = this.defaultMargin; -}var old = this.margin; -this.margin = m; -this.firePropertyChangeObject ("margin", old, m); -if (old == null || !old.equals (m)) { -this.revalidate (); -this.repaint (); -}}, "java.awt.Insets"); -Clazz_defineMethod (c$, "getMargin", -function () { -return (this.margin == null) ? null : this.margin.clone (); -}); -Clazz_defineMethod (c$, "getIcon", -function () { -return this.defaultIcon; -}); -Clazz_defineMethod (c$, "setIcon", -function (defaultIcon) { -var oldValue = this.defaultIcon; -this.defaultIcon = defaultIcon; -if (defaultIcon !== oldValue && (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource))) { -this.disabledIcon = null; -}this.firePropertyChangeObject ("icon", oldValue, defaultIcon); -if (defaultIcon !== oldValue) { -if (defaultIcon == null || oldValue == null || defaultIcon.getIconWidth () != oldValue.getIconWidth () || defaultIcon.getIconHeight () != oldValue.getIconHeight ()) { -this.revalidate (); -}this.repaint (); -}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getPressedIcon", -function () { -return this.pressedIcon; -}); -Clazz_defineMethod (c$, "setPressedIcon", -function (pressedIcon) { -var oldValue = this.pressedIcon; -this.pressedIcon = pressedIcon; -this.firePropertyChangeObject ("pressedIcon", oldValue, pressedIcon); -if (pressedIcon !== oldValue) { -if (this.getModel ().isPressed ()) { -this.repaint (); -}}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getSelectedIcon", -function () { -return this.selectedIcon; -}); -Clazz_defineMethod (c$, "setSelectedIcon", -function (selectedIcon) { -var oldValue = this.selectedIcon; -this.selectedIcon = selectedIcon; -if (selectedIcon !== oldValue && Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) { -this.disabledSelectedIcon = null; -}this.firePropertyChangeObject ("selectedIcon", oldValue, selectedIcon); -if (selectedIcon !== oldValue) { -if (this.isSelected ()) { -this.repaint (); -}}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getRolloverIcon", -function () { -return this.rolloverIcon; -}); -Clazz_defineMethod (c$, "setRolloverIcon", -function (rolloverIcon) { -var oldValue = this.rolloverIcon; -this.rolloverIcon = rolloverIcon; -this.firePropertyChangeObject ("rolloverIcon", oldValue, rolloverIcon); -this.setRolloverEnabled (true); -if (rolloverIcon !== oldValue) { -this.repaint (); -}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getRolloverSelectedIcon", -function () { -return this.rolloverSelectedIcon; -}); -Clazz_defineMethod (c$, "setRolloverSelectedIcon", -function (rolloverSelectedIcon) { -var oldValue = this.rolloverSelectedIcon; -this.rolloverSelectedIcon = rolloverSelectedIcon; -this.firePropertyChangeObject ("rolloverSelectedIcon", oldValue, rolloverSelectedIcon); -this.setRolloverEnabled (true); -if (rolloverSelectedIcon !== oldValue) { -if (this.isSelected ()) { -this.repaint (); -}}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getDisabledIcon", -function () { -if (this.disabledIcon == null) { -this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.getIcon ()); -if (this.disabledIcon != null) { -this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon); -}}return this.disabledIcon; -}); -Clazz_defineMethod (c$, "setDisabledIcon", -function (disabledIcon) { -var oldValue = this.disabledIcon; -this.disabledIcon = disabledIcon; -this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon); -if (disabledIcon !== oldValue) { -if (!this.isEnabled ()) { -this.repaint (); -}}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getDisabledSelectedIcon", -function () { -if (this.disabledSelectedIcon == null) { -if (this.selectedIcon != null) { -this.disabledSelectedIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledSelectedIcon (this, this.getSelectedIcon ()); -} else { -return this.getDisabledIcon (); -}}return this.disabledSelectedIcon; -}); -Clazz_defineMethod (c$, "setDisabledSelectedIcon", -function (disabledSelectedIcon) { -var oldValue = this.disabledSelectedIcon; -this.disabledSelectedIcon = disabledSelectedIcon; -this.firePropertyChangeObject ("disabledSelectedIcon", oldValue, disabledSelectedIcon); -if (disabledSelectedIcon !== oldValue) { -if (disabledSelectedIcon == null || oldValue == null || disabledSelectedIcon.getIconWidth () != oldValue.getIconWidth () || disabledSelectedIcon.getIconHeight () != oldValue.getIconHeight ()) { -this.revalidate (); -}if (!this.isEnabled () && this.isSelected ()) { -this.repaint (); -}}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getVerticalAlignment", -function () { -return this.verticalAlignment; -}); -Clazz_defineMethod (c$, "setVerticalAlignment", -function (alignment) { -if (alignment == this.verticalAlignment) return; -var oldValue = this.verticalAlignment; -this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment"); -this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "getHorizontalAlignment", -function () { -return this.horizontalAlignment; -}); -Clazz_defineMethod (c$, "setHorizontalAlignment", -function (alignment) { -if (alignment == this.horizontalAlignment) return; -var oldValue = this.horizontalAlignment; -this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment"); -this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "getVerticalTextPosition", -function () { -return this.verticalTextPosition; -}); -Clazz_defineMethod (c$, "setVerticalTextPosition", -function (textPosition) { -if (textPosition == this.verticalTextPosition) return; -var oldValue = this.verticalTextPosition; -this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition"); -this.firePropertyChangeInt ("verticalTextPosition", oldValue, this.verticalTextPosition); -this.revalidate (); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "getHorizontalTextPosition", -function () { -return this.horizontalTextPosition; -}); -Clazz_defineMethod (c$, "setHorizontalTextPosition", -function (textPosition) { -if (textPosition == this.horizontalTextPosition) return; -var oldValue = this.horizontalTextPosition; -this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition"); -this.firePropertyChangeInt ("horizontalTextPosition", oldValue, this.horizontalTextPosition); -this.revalidate (); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "getIconTextGap", -function () { -return this.iconTextGap; -}); -Clazz_defineMethod (c$, "setIconTextGap", -function (iconTextGap) { -var oldValue = this.iconTextGap; -this.iconTextGap = iconTextGap; -this.iconTextGapSet = true; -this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap); -if (iconTextGap != oldValue) { -this.revalidate (); -this.repaint (); -}}, "~N"); -Clazz_defineMethod (c$, "checkHorizontalKey", -function (key, exception) { -if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) { -return key; -} else { -throw new IllegalArgumentException (exception); -}}, "~N,~S"); -Clazz_defineMethod (c$, "checkVerticalKey", -function (key, exception) { -if ((key == 1) || (key == 0) || (key == 3)) { -return key; -} else { -throw new IllegalArgumentException (exception); -}}, "~N,~S"); -Clazz_defineMethod (c$, "removeNotify", -function () { -Clazz_superCall (this, javax.swing.AbstractButton, "removeNotify", []); -if (this.isRolloverEnabled ()) { -this.getModel ().setRollover (false); -}}); -Clazz_defineMethod (c$, "setActionCommand", -function (actionCommand) { -this.getModel ().setActionCommand (actionCommand); -}, "~S"); -Clazz_defineMethod (c$, "getActionCommand", -function () { -var ac = this.getModel ().getActionCommand (); -if (ac == null) { -ac = this.getText (); -}return ac; -}); -Clazz_defineMethod (c$, "setAction", -function (a) { -var oldValue = this.getAction (); -if (this.$action == null || !this.$action.equals (a)) { -this.$action = a; -if (oldValue != null) { -this.removeActionListener (oldValue); -oldValue.removePropertyChangeListener (this.actionPropertyChangeListener); -this.actionPropertyChangeListener = null; -}this.configurePropertiesFromAction (this.$action); -if (this.$action != null) { -if (!this.isListener (java.awt.event.ActionListener, this.$action)) { -this.addActionListener (this.$action); -}this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action); -this.$action.addPropertyChangeListener (this.actionPropertyChangeListener); -}this.firePropertyChangeObject ("action", oldValue, this.$action); -}}, "javax.swing.Action"); -Clazz_defineMethod (c$, "isListener", - function (c, a) { -var isListener = false; -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === c && listeners[i + 1] === a) { -isListener = true; -}} -return isListener; -}, "Class,java.awt.event.ActionListener"); -Clazz_defineMethod (c$, "getAction", -function () { -return this.$action; -}); -Clazz_defineMethod (c$, "configurePropertiesFromAction", -function (a) { -this.setMnemonicFromAction (a); -this.setTextFromAction (a, false); -javax.swing.AbstractAction.setToolTipTextFromAction (this, a); -this.setIconFromAction (a); -this.setActionCommandFromAction (a); -javax.swing.AbstractAction.setEnabledFromAction (this, a); -if (javax.swing.AbstractAction.hasSelectedKey (a) && this.shouldUpdateSelectedStateFromAction ()) { -this.setSelectedFromAction (a); -}this.setDisplayedMnemonicIndexFromAction (a, false); -}, "javax.swing.Action"); -Clazz_overrideMethod (c$, "clientPropertyChanged", -function (key, oldValue, newValue) { -if (key === "hideActionText") { -var current = (Clazz_instanceOf (newValue, Boolean)) ? newValue : false; -if (this.getHideActionText () != current) { -this.setHideActionText (current); -}}}, "~O,~O,~O"); -Clazz_defineMethod (c$, "shouldUpdateSelectedStateFromAction", -function () { -return false; -}); -Clazz_defineMethod (c$, "actionPropertyChanged", -function (action, propertyName) { -if (propertyName === "Name") { -this.setTextFromAction (action, true); -} else if (propertyName === "enabled") { -javax.swing.AbstractAction.setEnabledFromAction (this, action); -} else if (propertyName === "ShortDescription") { -javax.swing.AbstractAction.setToolTipTextFromAction (this, action); -} else if (propertyName === "SmallIcon") { -this.smallIconChanged (action); -} else if (propertyName === "MnemonicKey") { -this.setMnemonicFromAction (action); -} else if (propertyName === "ActionCommandKey") { -this.setActionCommandFromAction (action); -} else if (propertyName === "SwingSelectedKey" && javax.swing.AbstractAction.hasSelectedKey (action) && this.shouldUpdateSelectedStateFromAction ()) { -this.setSelectedFromAction (action); -} else if (propertyName === "SwingDisplayedMnemonicIndexKey") { -this.setDisplayedMnemonicIndexFromAction (action, true); -} else if (propertyName === "SwingLargeIconKey") { -this.largeIconChanged (action); -}}, "javax.swing.Action,~S"); -Clazz_defineMethod (c$, "setDisplayedMnemonicIndexFromAction", - function (a, fromPropertyChange) { -var iValue = (a == null) ? null : a.getValue ("SwingDisplayedMnemonicIndexKey"); -if (fromPropertyChange || iValue != null) { -var value; -if (iValue == null) { -value = -1; -} else { -value = (iValue).intValue (); -var text = this.getText (); -if (text == null || value >= text.length) { -value = -1; -}}this.setDisplayedMnemonicIndex (value); -}}, "javax.swing.Action,~B"); -Clazz_defineMethod (c$, "setMnemonicFromAction", - function (a) { -var n = (a == null) ? null : a.getValue ("MnemonicKey"); -this.setMnemonic ((n == null) ? '\0' : n); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "setTextFromAction", - function (a, propertyChange) { -var hideText = this.getHideActionText (); -if (!propertyChange) { -this.setText ((a != null && !hideText) ? a.getValue ("Name") : null); -} else if (!hideText) { -this.setText (a.getValue ("Name")); -}}, "javax.swing.Action,~B"); -Clazz_defineMethod (c$, "setIconFromAction", -function (a) { -var icon = null; -if (a != null) { -icon = a.getValue ("SwingLargeIconKey"); -if (icon == null) { -icon = a.getValue ("SmallIcon"); -}}this.setIcon (icon); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "smallIconChanged", -function (a) { -if (a.getValue ("SwingLargeIconKey") == null) { -this.setIconFromAction (a); -}}, "javax.swing.Action"); -Clazz_defineMethod (c$, "largeIconChanged", -function (a) { -this.setIconFromAction (a); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "setActionCommandFromAction", - function (a) { -this.setActionCommand ((a != null) ? a.getValue ("ActionCommandKey") : null); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "setSelectedFromAction", - function (a) { -var selected = false; -if (a != null) { -selected = javax.swing.AbstractAction.isSelected (a); -}if (selected != this.isSelected ()) { -this.setSelected (selected); -if (!selected && this.isSelected ()) { -if (Clazz_instanceOf (this.getModel (), javax.swing.DefaultButtonModel)) { -var group = (this.getModel ()).getGroup (); -if (group != null) { -group.clearSelection (); -}}}}}, "javax.swing.Action"); -Clazz_defineMethod (c$, "createActionPropertyChangeListener", -function (a) { -return this.createActionPropertyChangeListener0 (a); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "createActionPropertyChangeListener0", -function (a) { -return new javax.swing.AbstractButton.ButtonActionPropertyChangeListener (this, a); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "isBorderPainted", -function () { -return this.$paintBorder; -}); -Clazz_defineMethod (c$, "setBorderPainted", -function (b) { -var oldValue = this.$paintBorder; -this.$paintBorder = b; -this.borderPaintedSet = true; -this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder); -if (b != oldValue) { -this.revalidate (); -this.repaint (); -}}, "~B"); -Clazz_defineMethod (c$, "paintBorder", -function (g) { -if (this.isBorderPainted ()) { -Clazz_superCall (this, javax.swing.AbstractButton, "paintBorder", [g]); -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "isFocusPainted", -function () { -return this.paintFocus; -}); -Clazz_defineMethod (c$, "setFocusPainted", -function (b) { -var oldValue = this.paintFocus; -this.paintFocus = b; -this.firePropertyChangeBool ("focusPainted", oldValue, this.paintFocus); -if (b != oldValue && this.isFocusOwner ()) { -this.revalidate (); -this.repaint (); -}}, "~B"); -Clazz_defineMethod (c$, "isContentAreaFilled", -function () { -return this.contentAreaFilled; -}); -Clazz_defineMethod (c$, "setContentAreaFilled", -function (b) { -var oldValue = this.contentAreaFilled; -this.contentAreaFilled = b; -this.contentAreaFilledSet = true; -this.firePropertyChangeBool ("contentAreaFilled", oldValue, this.contentAreaFilled); -if (b != oldValue) { -this.repaint (); -}}, "~B"); -Clazz_defineMethod (c$, "isRolloverEnabled", -function () { -return this.rolloverEnabled; -}); -Clazz_defineMethod (c$, "setRolloverEnabled", -function (b) { -var oldValue = this.rolloverEnabled; -this.rolloverEnabled = b; -this.rolloverEnabledSet = true; -this.firePropertyChangeBool ("rolloverEnabled", oldValue, this.rolloverEnabled); -if (b != oldValue) { -this.repaint (); -}}, "~B"); -Clazz_defineMethod (c$, "getMnemonic", -function () { -return this.mnemonic; -}); -Clazz_defineMethod (c$, "setMnemonic", -function (mnemonic) { -this.model.setMnemonic (mnemonic); -this.updateMnemonicProperties (); -}, "~N"); -Clazz_defineMethod (c$, "setMnemonic", -function (mnemonic) { -var vk = (mnemonic).charCodeAt (0); -if (vk >= 97 && vk <= 122) vk -= (32); -this.setMnemonic (vk); -}, "~S"); -Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", -function (index) { -var oldValue = this.mnemonicIndex; -if (index == -1) { -this.mnemonicIndex = -1; -} else { -var text = this.getText (); -var textLength = (text == null) ? 0 : text.length; -if (index < -1 || index >= textLength) { -throw new IllegalArgumentException ("index == " + index); -}}this.mnemonicIndex = index; -this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index); -if (index != oldValue) { -this.revalidate (); -this.repaint (); -}}, "~N"); -Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", -function () { -return this.mnemonicIndex; -}); -Clazz_defineMethod (c$, "updateDisplayedMnemonicIndex", - function (text, mnemonic) { -this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, mnemonic)); -}, "~S,~N"); -Clazz_defineMethod (c$, "updateMnemonicProperties", - function () { -var newMnemonic = this.model.getMnemonic (); -if (this.mnemonic != newMnemonic) { -var oldValue = this.mnemonic; -this.mnemonic = newMnemonic; -this.firePropertyChangeInt ("mnemonic", oldValue, this.mnemonic); -this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic); -this.revalidate (); -this.repaint (); -}}); -Clazz_defineMethod (c$, "setMultiClickThreshhold", -function (threshhold) { -if (threshhold < 0) { -throw new IllegalArgumentException ("threshhold must be >= 0"); -}this.multiClickThreshhold = threshhold; -}, "~N"); -Clazz_defineMethod (c$, "getMultiClickThreshhold", -function () { -return this.multiClickThreshhold; -}); -Clazz_defineMethod (c$, "getModel", -function () { -return this.model; -}); -Clazz_defineMethod (c$, "setModel", -function (newModel) { -var oldModel = this.getModel (); -if (oldModel != null) { -oldModel.removeChangeListener (this.changeListener); -oldModel.removeActionListener (this.actionListener); -oldModel.removeItemListener (this.itemListener); -this.changeListener = null; -this.actionListener = null; -this.itemListener = null; -}this.model = newModel; -if (newModel != null) { -this.changeListener = this.createChangeListener (); -this.actionListener = this.createActionListener (); -this.itemListener = this.createItemListener (); -newModel.addChangeListener (this.changeListener); -newModel.addActionListener (this.actionListener); -newModel.addItemListener (this.itemListener); -this.updateMnemonicProperties (); -Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [newModel.isEnabled ()]); -} else { -this.mnemonic = 0; -}this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic); -this.firePropertyChangeObject ("model", oldModel, newModel); -if (newModel !== oldModel) { -this.revalidate (); -this.repaint (); -}}, "javax.swing.ButtonModel"); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_defineMethod (c$, "setUI", -function (ui) { -Clazz_superCall (this, javax.swing.AbstractButton, "setUI", [ui]); -if (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource)) { -this.setDisabledIcon (null); -}if (Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) { -this.setDisabledSelectedIcon (null); -}}, "javax.swing.plaf.ButtonUI"); -Clazz_overrideMethod (c$, "updateUI", -function () { -}); -Clazz_overrideMethod (c$, "addImpl", -function (comp, constraints, index) { -if (!this.$setLayout) { -this.setLayout ( new javax.swing.OverlayLayout (this)); -}return this.addImplSAEM (comp, constraints, index); -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "setLayout", -function (mgr) { -this.$setLayout = true; -Clazz_superCall (this, javax.swing.AbstractButton, "setLayout", [mgr]); -}, "java.awt.LayoutManager"); -Clazz_defineMethod (c$, "addChangeListener", -function (l) { -this.listenerList.add (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "removeChangeListener", -function (l) { -this.listenerList.remove (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "getChangeListeners", -function () { -return (this.listenerList.getListeners (javax.swing.event.ChangeListener)); -}); -Clazz_defineMethod (c$, "fireStateChanged", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.ChangeListener) { -if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); -(listeners[i + 1]).stateChanged (this.changeEvent); -}} -}); -Clazz_defineMethod (c$, "addActionListener", -function (l) { -this.listenerList.add (java.awt.event.ActionListener, l); -}, "java.awt.event.ActionListener"); -Clazz_defineMethod (c$, "removeActionListener", -function (l) { -if ((l != null) && (this.getAction () === l)) { -this.setAction (null); -} else { -this.listenerList.remove (java.awt.event.ActionListener, l); -}}, "java.awt.event.ActionListener"); -Clazz_defineMethod (c$, "getActionListeners", -function () { -return (this.listenerList.getListeners (java.awt.event.ActionListener)); -}); -Clazz_defineMethod (c$, "createChangeListener", -function () { -return this.getHandler (); -}); -Clazz_defineMethod (c$, "fireActionPerformed", -function (event) { -var listeners = this.listenerList.getListenerList (); -var e = null; -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === java.awt.event.ActionListener) { -if (e == null) { -var actionCommand = event.getActionCommand (); -if (actionCommand == null) { -actionCommand = this.getActionCommand (); -}e = new java.awt.event.ActionEvent (this, 1001, actionCommand, event.getWhen (), event.getModifiers ()); -}(listeners[i + 1]).actionPerformed (e); -}} -}, "java.awt.event.ActionEvent"); -Clazz_defineMethod (c$, "fireItemStateChanged", -function (event) { -var listeners = this.listenerList.getListenerList (); -var e = null; -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === java.awt.event.ItemListener) { -if (e == null) { -e = new java.awt.event.ItemEvent (this, 701, this, event.getStateChange ()); -}(listeners[i + 1]).itemStateChanged (e); -}} -}, "java.awt.event.ItemEvent"); -Clazz_defineMethod (c$, "createActionListener", -function () { -return this.getHandler (); -}); -Clazz_defineMethod (c$, "createItemListener", -function () { -return this.getHandler (); -}); -Clazz_defineMethod (c$, "setEnabled", -function (b) { -if (!b && this.model.isRollover ()) { -this.model.setRollover (false); -}Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [b]); -this.model.setEnabled (b); -}, "~B"); -Clazz_defineMethod (c$, "getLabel", -function () { -return this.getText (); -}); -Clazz_defineMethod (c$, "setLabel", -function (label) { -this.setText (label); -}, "~S"); -Clazz_overrideMethod (c$, "addItemListener", -function (l) { -this.listenerList.add (java.awt.event.ItemListener, l); -}, "java.awt.event.ItemListener"); -Clazz_overrideMethod (c$, "removeItemListener", -function (l) { -this.listenerList.remove (java.awt.event.ItemListener, l); -}, "java.awt.event.ItemListener"); -Clazz_defineMethod (c$, "getItemListeners", -function () { -return this.listenerList.getListeners (java.awt.event.ItemListener); -}); -Clazz_overrideMethod (c$, "getSelectedObjects", -function () { -if (this.isSelected () == false) { -return null; -}var selectedObjects = new Array (1); -selectedObjects[0] = this.getText (); -return selectedObjects; -}); -Clazz_defineMethod (c$, "init", -function (text, icon) { -if (text != null) { -this.setText (text); -}if (icon != null) { -this.setIcon (icon); -}this.updateUI (); -this.setAlignmentX (0.0); -this.setAlignmentY (0.5); -}, "~S,javax.swing.Icon"); -Clazz_defineMethod (c$, "imageUpdate", -function (img, infoflags, x, y, w, h) { -var iconDisplayed = this.getIcon (); -if (iconDisplayed == null) { -return false; -}if (!this.model.isEnabled ()) { -if (this.model.isSelected ()) { -iconDisplayed = this.getDisabledSelectedIcon (); -} else { -iconDisplayed = this.getDisabledIcon (); -}} else if (this.model.isPressed () && this.model.isArmed ()) { -iconDisplayed = this.getPressedIcon (); -} else if (this.isRolloverEnabled () && this.model.isRollover ()) { -if (this.model.isSelected ()) { -iconDisplayed = this.getRolloverSelectedIcon (); -} else { -iconDisplayed = this.getRolloverIcon (); -}} else if (this.model.isSelected ()) { -iconDisplayed = this.getSelectedIcon (); -}if (!javax.swing.SwingUtilities.doesIconReferenceImage (iconDisplayed, img)) { -return false; -}return Clazz_superCall (this, javax.swing.AbstractButton, "imageUpdate", [img, infoflags, x, y, w, h]); -}, "java.awt.Image,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setUIProperty", -function (propertyName, value) { -if (propertyName === "borderPainted") { -if (!this.borderPaintedSet) { -this.setBorderPainted ((value).booleanValue ()); -this.borderPaintedSet = false; -}} else if (propertyName === "rolloverEnabled") { -if (!this.rolloverEnabledSet) { -this.setRolloverEnabled ((value).booleanValue ()); -this.rolloverEnabledSet = false; -}} else if (propertyName === "iconTextGap") { -if (!this.iconTextGapSet) { -this.setIconTextGap ((value).intValue ()); -this.iconTextGapSet = false; -}} else if (propertyName === "contentAreaFilled") { -if (!this.contentAreaFilledSet) { -this.setContentAreaFilled ((value).booleanValue ()); -this.contentAreaFilledSet = false; -}} else { -Clazz_superCall (this, javax.swing.AbstractButton, "setUIProperty", [propertyName, value]); -}}, "~S,~O"); -Clazz_defineMethod (c$, "paramString", -function () { -var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : ""); -var pressedIconString = ((this.pressedIcon != null) && (this.pressedIcon !== this) ? this.pressedIcon.toString () : ""); -var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : ""); -var selectedIconString = ((this.selectedIcon != null) && (this.selectedIcon !== this) ? this.selectedIcon.toString () : ""); -var disabledSelectedIconString = ((this.disabledSelectedIcon != null) && (this.disabledSelectedIcon !== this) ? this.disabledSelectedIcon.toString () : ""); -var rolloverIconString = ((this.rolloverIcon != null) && (this.rolloverIcon !== this) ? this.rolloverIcon.toString () : ""); -var rolloverSelectedIconString = ((this.rolloverSelectedIcon != null) && (this.rolloverSelectedIcon !== this) ? this.rolloverSelectedIcon.toString () : ""); -var paintBorderString = (this.$paintBorder ? "true" : "false"); -var paintFocusString = (this.paintFocus ? "true" : "false"); -var rolloverEnabledString = (this.rolloverEnabled ? "true" : "false"); -return Clazz_superCall (this, javax.swing.AbstractButton, "paramString", []) + ",defaultIcon=" + defaultIconString + ",disabledIcon=" + disabledIconString + ",disabledSelectedIcon=" + disabledSelectedIconString + ",margin=" + this.margin + ",paintBorder=" + paintBorderString + ",paintFocus=" + paintFocusString + ",pressedIcon=" + pressedIconString + ",rolloverEnabled=" + rolloverEnabledString + ",rolloverIcon=" + rolloverIconString + ",rolloverSelectedIcon=" + rolloverSelectedIconString + ",selectedIcon=" + selectedIconString + ",text=" + this.text; -}); -Clazz_defineMethod (c$, "getHandler", - function () { -if (this.handler == null) { -this.handler = Clazz_innerTypeInstance (javax.swing.AbstractButton.Handler, this, null); -}return this.handler; -}); -c$.$AbstractButton$ButtonChangeListener$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -Clazz_instantialize (this, arguments); -}, javax.swing.AbstractButton, "ButtonChangeListener", null, javax.swing.event.ChangeListener); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_overrideMethod (c$, "stateChanged", -function (a) { -this.b$["javax.swing.AbstractButton"].getHandler ().stateChanged (a); -}, "javax.swing.event.ChangeEvent"); -c$ = Clazz_p0p (); -}; -c$.$AbstractButton$Handler$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -Clazz_instantialize (this, arguments); -}, javax.swing.AbstractButton, "Handler", null, [java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener]); -Clazz_overrideMethod (c$, "stateChanged", -function (a) { -this.b$["javax.swing.AbstractButton"].updateMnemonicProperties (); -if (this.b$["javax.swing.AbstractButton"].isEnabled () != this.b$["javax.swing.AbstractButton"].model.isEnabled ()) { -this.b$["javax.swing.AbstractButton"].setEnabled (this.b$["javax.swing.AbstractButton"].model.isEnabled ()); -}this.b$["javax.swing.AbstractButton"].fireStateChanged (); -this.b$["javax.swing.AbstractButton"].repaint (); -}, "javax.swing.event.ChangeEvent"); -Clazz_overrideMethod (c$, "actionPerformed", -function (a) { -this.b$["javax.swing.AbstractButton"].fireActionPerformed (a); -}, "java.awt.event.ActionEvent"); -Clazz_overrideMethod (c$, "itemStateChanged", -function (a) { -this.b$["javax.swing.AbstractButton"].fireItemStateChanged (a); -if (this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction ()) { -var b = this.b$["javax.swing.AbstractButton"].getAction (); -if (b != null && javax.swing.AbstractAction.hasSelectedKey (b)) { -var c = this.b$["javax.swing.AbstractButton"].isSelected (); -var d = javax.swing.AbstractAction.isSelected (b); -if (d != c) { -b.putValue ("SwingSelectedKey", new Boolean (c)); -}}}}, "java.awt.event.ItemEvent"); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.AbstractButton, "ButtonActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener); -Clazz_overrideMethod (c$, "actionPropertyChanged", -function (a, b, c) { -if (javax.swing.AbstractAction.shouldReconfigure (c)) { -a.configurePropertiesFromAction (b); -} else { -a.actionPropertyChanged (b, c.getPropertyName ()); -}}, "javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent"); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"MODEL_CHANGED_PROPERTY", "model", -"TEXT_CHANGED_PROPERTY", "text", -"MNEMONIC_CHANGED_PROPERTY", "mnemonic", -"MARGIN_CHANGED_PROPERTY", "margin", -"VERTICAL_ALIGNMENT_CHANGED_PROPERTY", "verticalAlignment", -"HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY", "horizontalAlignment", -"VERTICAL_TEXT_POSITION_CHANGED_PROPERTY", "verticalTextPosition", -"HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY", "horizontalTextPosition", -"BORDER_PAINTED_CHANGED_PROPERTY", "borderPainted", -"FOCUS_PAINTED_CHANGED_PROPERTY", "focusPainted", -"ROLLOVER_ENABLED_CHANGED_PROPERTY", "rolloverEnabled", -"CONTENT_AREA_FILLED_CHANGED_PROPERTY", "contentAreaFilled", -"ICON_CHANGED_PROPERTY", "icon", -"PRESSED_ICON_CHANGED_PROPERTY", "pressedIcon", -"SELECTED_ICON_CHANGED_PROPERTY", "selectedIcon", -"ROLLOVER_ICON_CHANGED_PROPERTY", "rolloverIcon", -"ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY", "rolloverSelectedIcon", -"DISABLED_ICON_CHANGED_PROPERTY", "disabledIcon", -"DISABLED_SELECTED_ICON_CHANGED_PROPERTY", "disabledSelectedIcon"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (null, "javax.swing.ArrayTable", ["java.util.Hashtable"], function () { -c$ = Clazz_decorateAsClass (function () { -this.table = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "ArrayTable", null, Cloneable); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "put", -function (key, value) { -if (this.table == null) { -this.table = Clazz_newArray (-1, [key, value]); -} else { -var size = this.size (); -if (size < 8) { -if (this.containsKey (key)) { -var tmp = this.table; -for (var i = 0; i < tmp.length - 1; i += 2) { -if (tmp[i].equals (key)) { -tmp[i + 1] = value; -break; -}} -} else { -var array = this.table; -var i = array.length; -var tmp = new Array (i + 2); -System.arraycopy (array, 0, tmp, 0, i); -tmp[i] = key; -tmp[i + 1] = value; -this.table = tmp; -}} else { -if ((size == 8) && this.isArray ()) { -this.grow (); -}(this.table).put (key, value); -}}}, "~O,~O"); -Clazz_defineMethod (c$, "get", -function (key) { -var value = null; -if (this.table != null) { -if (this.isArray ()) { -var array = this.table; -for (var i = 0; i < array.length - 1; i += 2) { -if (array[i].equals (key)) { -value = array[i + 1]; -break; -}} -} else { -value = (this.table).get (key); -}}return value; -}, "~O"); -Clazz_defineMethod (c$, "size", -function () { -var size; -if (this.table == null) return 0; -if (this.isArray ()) { -size = Clazz_doubleToInt ((this.table).length / 2); -} else { -size = (this.table).size (); -}return size; -}); -Clazz_defineMethod (c$, "containsKey", -function (key) { -var contains = false; -if (this.table != null) { -if (this.isArray ()) { -var array = this.table; -for (var i = 0; i < array.length - 1; i += 2) { -if (array[i].equals (key)) { -contains = true; -break; -}} -} else { -contains = (this.table).containsKey (key); -}}return contains; -}, "~O"); -Clazz_defineMethod (c$, "remove", -function (key) { -var value = null; -if (key == null) { -return null; -}if (this.table != null) { -if (this.isArray ()) { -var index = -1; -var array = this.table; -for (var i = array.length - 2; i >= 0; i -= 2) { -if (array[i].equals (key)) { -index = i; -value = array[i + 1]; -break; -}} -if (index != -1) { -var tmp = new Array (array.length - 2); -System.arraycopy (array, 0, tmp, 0, index); -if (index < tmp.length) System.arraycopy (array, index + 2, tmp, index, tmp.length - index); -this.table = (tmp.length == 0) ? null : tmp; -}} else { -value = (this.table).remove (key); -}if (this.size () == 7 && !this.isArray ()) { -this.shrink (); -}}return value; -}, "~O"); -Clazz_defineMethod (c$, "clear", -function () { -this.table = null; -}); -Clazz_overrideMethod (c$, "clone", -function () { -var newArrayTable = new javax.swing.ArrayTable (); -if (this.isArray ()) { -var array = this.table; -for (var i = 0; i < array.length - 1; i += 2) { -newArrayTable.put (array[i], array[i + 1]); -} -} else { -var tmp = this.table; -var keys = tmp.keys (); -while (keys.hasMoreElements ()) { -var o = keys.nextElement (); -newArrayTable.put (o, tmp.get (o)); -} -}return newArrayTable; -}); -Clazz_defineMethod (c$, "getKeys", -function (keys) { -if (this.table == null) { -return null; -}if (this.isArray ()) { -var array = this.table; -if (keys == null) { -keys = new Array (Clazz_doubleToInt (array.length / 2)); -}for (var i = 0, index = 0; i < array.length - 1; i += 2, index++) { -keys[index] = array[i]; -} -} else { -var tmp = this.table; -var enum_ = tmp.keys (); -var counter = tmp.size (); -if (keys == null) { -keys = new Array (counter); -}while (counter > 0) { -keys[--counter] = enum_.nextElement (); -} -}return keys; -}, "~A"); -Clazz_defineMethod (c$, "isArray", - function () { -return (Clazz_instanceOf (this.table, Array)); -}); -Clazz_defineMethod (c$, "grow", - function () { -var array = this.table; -var tmp = new java.util.Hashtable (Clazz_doubleToInt (array.length / 2)); -for (var i = 0; i < array.length; i += 2) { -tmp.put (array[i], array[i + 1]); -} -this.table = tmp; -}); -Clazz_defineMethod (c$, "shrink", - function () { -var tmp = this.table; -var array = new Array (tmp.size () * 2); -var keys = tmp.keys (); -var j = 0; -while (keys.hasMoreElements ()) { -var o = keys.nextElement (); -array[j] = o; -array[j + 1] = tmp.get (o); -j += 2; -} -this.table = array; -}); -Clazz_defineStatics (c$, -"ARRAY_BOUNDARY", 8); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () { -c$ = Clazz_decorateAsClass (function () { -this.notifyOnEDT = false; -Clazz_instantialize (this, arguments); -}, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport); -Clazz_makeConstructor (c$, -function (sourceBean) { -this.construct (sourceBean, false); -}, "~O"); -Clazz_makeConstructor (c$, -function (sourceBean, notifyOnEDT) { -Clazz_superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]); -this.notifyOnEDT = notifyOnEDT; -}, "~O,~B"); -Clazz_defineMethod (c$, "firePropertyChangeEvt", -function (evt) { -if (evt == null) { -throw new NullPointerException (); -}if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) { -Clazz_superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]); -} else { -javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("javax.swing.event.SwingPropertyChangeSupport$1") ? 0 : javax.swing.event.SwingPropertyChangeSupport.$SwingPropertyChangeSupport$1$ ()), Clazz_innerTypeInstance (javax.swing.event.SwingPropertyChangeSupport$1, this, Clazz_cloneFinals ("evt", evt)))); -}}, "java.beans.PropertyChangeEvent"); -Clazz_defineMethod (c$, "isNotifyOnEDT", -function () { -return this.notifyOnEDT; -}); -c$.$SwingPropertyChangeSupport$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt); -}); -c$ = Clazz_p0p (); -}; -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JComponent"], "javax.swing.JLayeredPane", ["java.util.ArrayList", "$.Hashtable", "java.awt.Color"], function () { -c$ = Clazz_decorateAsClass (function () { -this.componentToLayer = null; -this.optimizedDrawingPossible = true; -Clazz_instantialize (this, arguments); -}, javax.swing, "JLayeredPane", javax.swing.JComponent); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JLayeredPane, []); -this.setLayout (null); -}); -Clazz_defineMethod (c$, "validateOptimizedDrawing", - function () { -var layeredComponentFound = false; -{ -var layer = null; -for (var c, $c = 0, $$c = this.getComponents (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { -layer = null; -if ((Clazz_instanceOf (c, javax.swing.JComponent) && (layer = (c).getClientProperty ("layeredContainerLayer")) != null)) { -if (layer != null && layer.equals (javax.swing.JLayeredPane.FRAME_CONTENT_LAYER)) continue; -layeredComponentFound = true; -break; -}} -}if (layeredComponentFound) this.optimizedDrawingPossible = false; - else this.optimizedDrawingPossible = true; -}); -Clazz_overrideMethod (c$, "addImpl", -function (comp, constraints, index) { -var layer = javax.swing.JLayeredPane.DEFAULT_LAYER.intValue (); -var pos; -if (Clazz_instanceOf (constraints, Integer)) { -layer = (constraints).intValue (); -this.setLayer (comp, layer); -} else layer = this.getLayer (comp); -pos = this.insertIndexForLayer (layer, index); -this.addImplSAEM (comp, constraints, pos); -comp.validate (); -comp.repaint (); -this.validateOptimizedDrawing (); -return comp; -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "remove", -function (index) { -var c = this.getComponent (index); -Clazz_superCall (this, javax.swing.JLayeredPane, "remove", [index]); -if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) { -this.getComponentToLayer ().remove (c); -}this.validateOptimizedDrawing (); -}, "~N"); -Clazz_defineMethod (c$, "removeAll", -function () { -var children = this.getComponents (); -var cToL = this.getComponentToLayer (); -for (var counter = children.length - 1; counter >= 0; counter--) { -var c = children[counter]; -if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) { -cToL.remove (c); -}} -Clazz_superCall (this, javax.swing.JLayeredPane, "removeAll", []); -}); -Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", -function () { -return this.optimizedDrawingPossible; -}); -c$.putLayer = Clazz_defineMethod (c$, "putLayer", -function (c, layer) { -var layerObj; -layerObj = new Integer (layer); -c.putClientProperty ("layeredContainerLayer", layerObj); -}, "javax.swing.JComponent,~N"); -c$.getLayer = Clazz_defineMethod (c$, "getLayer", -function (c) { -var i; -if ((i = c.getClientProperty ("layeredContainerLayer")) != null) return i.intValue (); -return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue (); -}, "javax.swing.JComponent"); -c$.getLayeredPaneAbove = Clazz_defineMethod (c$, "getLayeredPaneAbove", -function (c) { -if (c == null) return null; -var parent = c.getParent (); -while (parent != null && !(Clazz_instanceOf (parent, javax.swing.JLayeredPane))) parent = parent.getParent (); - -return parent; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "setLayer", -function (c, layer) { -this.setLayer (c, layer, -1); -}, "java.awt.Component,~N"); -Clazz_defineMethod (c$, "setLayer", -function (c, layer, position) { -var layerObj; -layerObj = this.getObjectForLayer (layer); -if (layer == this.getLayer (c) && position == this.getPosition (c)) { -this.repaint (c.getBounds ()); -return; -}if (Clazz_instanceOf (c, javax.swing.JComponent)) (c).putClientProperty ("layeredContainerLayer", layerObj); - else this.getComponentToLayer ().put (c, layerObj); -if (c.getParent () == null || c.getParent () !== this) { -this.repaint (c.getBounds ()); -return; -}var index = this.insertIndexForLayer (c, layer, position); -this.setComponentZOrder (c, index); -this.repaint (c.getBounds ()); -}, "java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getLayer", -function (c) { -var i; -if (Clazz_instanceOf (c, javax.swing.JComponent)) i = (c).getClientProperty ("layeredContainerLayer"); - else i = this.getComponentToLayer ().get (c); -if (i == null) return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue (); -return i.intValue (); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getIndexOf", -function (c) { -var i; -var count; -count = this.getComponentCount (); -for (i = 0; i < count; i++) { -if (c === this.getComponent (i)) return i; -} -return -1; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "moveToFront", -function (c) { -this.setPosition (c, 0); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "moveToBack", -function (c) { -this.setPosition (c, -1); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "setPosition", -function (c, position) { -this.setLayer (c, this.getLayer (c), position); -}, "java.awt.Component,~N"); -Clazz_defineMethod (c$, "getPosition", -function (c) { -var i; -var count; -var startLayer; -var curLayer; -var startLocation; -var pos = 0; -count = this.getComponentCount (); -startLocation = this.getIndexOf (c); -if (startLocation == -1) return -1; -startLayer = this.getLayer (c); -for (i = startLocation - 1; i >= 0; i--) { -curLayer = this.getLayer (this.getComponent (i)); -if (curLayer == startLayer) pos++; - else return pos; -} -return pos; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "highestLayer", -function () { -if (this.getComponentCount () > 0) return this.getLayer (this.getComponent (0)); -return 0; -}); -Clazz_defineMethod (c$, "lowestLayer", -function () { -var count = this.getComponentCount (); -if (count > 0) return this.getLayer (this.getComponent (count - 1)); -return 0; -}); -Clazz_defineMethod (c$, "getComponentCountInLayer", -function (layer) { -var i; -var count; -var curLayer; -var layerCount = 0; -count = this.getComponentCount (); -for (i = 0; i < count; i++) { -curLayer = this.getLayer (this.getComponent (i)); -if (curLayer == layer) { -layerCount++; -} else if (layerCount > 0 || curLayer < layer) { -break; -}} -return layerCount; -}, "~N"); -Clazz_defineMethod (c$, "getComponentsInLayer", -function (layer) { -var i; -var count; -var curLayer; -var layerCount = 0; -var results; -results = new Array (this.getComponentCountInLayer (layer)); -count = this.getComponentCount (); -for (i = 0; i < count; i++) { -curLayer = this.getLayer (this.getComponent (i)); -if (curLayer == layer) { -results[layerCount++] = this.getComponent (i); -} else if (layerCount > 0 || curLayer < layer) { -break; -}} -return results; -}, "~N"); -Clazz_defineMethod (c$, "paint", -function (g) { -if (this.isOpaque ()) { -var r = g.getClipBounds (); -var c = this.getBackground (); -if (c == null) c = java.awt.Color.lightGray; -g.setColor (c); -if (r != null) { -g.fillRect (r.x, r.y, r.width, r.height); -} else { -g.fillRect (0, 0, this.getWidth (), this.getHeight ()); -}}Clazz_superCall (this, javax.swing.JLayeredPane, "paint", [g]); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "getComponentToLayer", -function () { -if (this.componentToLayer == null) this.componentToLayer = new java.util.Hashtable (4); -return this.componentToLayer; -}); -Clazz_defineMethod (c$, "getObjectForLayer", -function (layer) { -var layerObj; -switch (layer) { -case 0: -layerObj = javax.swing.JLayeredPane.DEFAULT_LAYER; -break; -case 100: -layerObj = javax.swing.JLayeredPane.PALETTE_LAYER; -break; -case 200: -layerObj = javax.swing.JLayeredPane.MODAL_LAYER; -break; -case 300: -layerObj = javax.swing.JLayeredPane.POPUP_LAYER; -break; -case 400: -layerObj = javax.swing.JLayeredPane.DRAG_LAYER; -break; -default: -layerObj = new Integer (layer); -} -return layerObj; -}, "~N"); -Clazz_defineMethod (c$, "insertIndexForLayer", -function (layer, position) { -return this.insertIndexForLayer (null, layer, position); -}, "~N,~N"); -Clazz_defineMethod (c$, "insertIndexForLayer", - function (comp, layer, position) { -var i; -var count; -var curLayer; -var layerStart = -1; -var layerEnd = -1; -var componentCount = this.getComponentCount (); -var compList = new java.util.ArrayList (componentCount); -for (var index = 0; index < componentCount; index++) { -if (this.getComponent (index) !== comp) { -compList.add (this.getComponent (index)); -}} -count = compList.size (); -for (i = 0; i < count; i++) { -curLayer = this.getLayer (compList.get (i)); -if (layerStart == -1 && curLayer == layer) { -layerStart = i; -}if (curLayer < layer) { -if (i == 0) { -layerStart = 0; -layerEnd = 0; -} else { -layerEnd = i; -}break; -}} -if (layerStart == -1 && layerEnd == -1) return count; -if (layerStart != -1 && layerEnd == -1) layerEnd = count; -if (layerEnd != -1 && layerStart == -1) layerStart = layerEnd; -if (position == -1) return layerEnd; -if (position > -1 && layerStart + position <= layerEnd) return layerStart + position; -return layerEnd; -}, "java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "paramString", -function () { -var optimizedDrawingPossibleString = (this.optimizedDrawingPossible ? "true" : "false"); -return Clazz_superCall (this, javax.swing.JLayeredPane, "paramString", []) + ",optimizedDrawingPossible=" + optimizedDrawingPossibleString; -}); -c$.DEFAULT_LAYER = c$.prototype.DEFAULT_LAYER = new Integer (0); -c$.PALETTE_LAYER = c$.prototype.PALETTE_LAYER = new Integer (100); -c$.MODAL_LAYER = c$.prototype.MODAL_LAYER = new Integer (200); -c$.POPUP_LAYER = c$.prototype.POPUP_LAYER = new Integer (300); -c$.DRAG_LAYER = c$.prototype.DRAG_LAYER = new Integer (400); -c$.FRAME_CONTENT_LAYER = c$.prototype.FRAME_CONTENT_LAYER = new Integer (-30000); -Clazz_defineStatics (c$, -"LAYER_PROPERTY", "layeredContainerLayer"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JComponent"], "javax.swing.JPanel", ["java.lang.Boolean", "java.awt.FlowLayout", "javax.swing.UIManager"], function () { -c$ = Clazz_declareType (javax.swing, "JPanel", javax.swing.JComponent); -Clazz_makeConstructor (c$, -function (layout, isDoubleBuffered) { -Clazz_superConstructor (this, javax.swing.JPanel, []); -this.setLayout (layout); -this.setUIProperty ("opaque", Boolean.TRUE); -this.updateUI (); -}, "java.awt.LayoutManager,~B"); -Clazz_makeConstructor (c$, -function (layout) { -this.construct (layout, true); -}, "java.awt.LayoutManager"); -Clazz_makeConstructor (c$, -function (isDoubleBuffered) { -this.construct ( new java.awt.FlowLayout (), isDoubleBuffered); -}, "~B"); -Clazz_makeConstructor (c$, -function () { -this.construct (true); -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "PanelUI"; -}); -Clazz_defineStatics (c$, -"$uiClassID", "PanelUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.lang.Enum", "java.util.Enumeration", "javax.swing.UIDefaults"], "javax.swing.MultiUIDefaults", ["java.lang.StringBuffer", "java.util.HashSet"], function () { -c$ = Clazz_decorateAsClass (function () { -this.tables = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "MultiUIDefaults", javax.swing.UIDefaults); -Clazz_makeConstructor (c$, -function (defaults) { -Clazz_superConstructor (this, javax.swing.MultiUIDefaults); -this.tables = defaults; -}, "~A"); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.MultiUIDefaults); -this.tables = new Array (0); -}); -Clazz_defineMethod (c$, "get", -function (key) { -var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key]); -if (value != null) { -return value; -}for (var i = 0; i < this.tables.length; i++) { -var table = this.tables[i]; -value = (table != null) ? table.get (key) : null; -if (value != null) { -return value; -}} -return null; -}, "~O"); -Clazz_defineMethod (c$, "get", -function (key, l) { -var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key, l]); -if (value != null) { -return value; -}for (var i = 0; i < this.tables.length; i++) { -var table = this.tables[i]; -value = (table != null) ? table.get (key, l) : null; -if (value != null) { -return value; -}} -return null; -}, "~O,java.util.Locale"); -Clazz_overrideMethod (c$, "size", -function () { -return this.entrySet ().size (); -}); -Clazz_overrideMethod (c$, "isEmpty", -function () { -return this.size () == 0; -}); -Clazz_overrideMethod (c$, "keys", -function () { -return new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS, this.entrySet ()); -}); -Clazz_overrideMethod (c$, "elements", -function () { -return new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS, this.entrySet ()); -}); -Clazz_defineMethod (c$, "entrySet", -function () { -var set = new java.util.HashSet (); -for (var i = this.tables.length - 1; i >= 0; i--) { -if (this.tables[i] != null) { -set.addAll (this.tables[i].entrySet ()); -}} -set.addAll (Clazz_superCall (this, javax.swing.MultiUIDefaults, "entrySet", [])); -return set; -}); -Clazz_defineMethod (c$, "getUIError", -function (msg) { -if (this.tables.length > 0) { -this.tables[0].getUIError (msg); -} else { -Clazz_superCall (this, javax.swing.MultiUIDefaults, "getUIError", [msg]); -}}, "~S"); -Clazz_defineMethod (c$, "remove", -function (key) { -var value = null; -for (var i = this.tables.length - 1; i >= 0; i--) { -if (this.tables[i] != null) { -var v = this.tables[i].remove (key); -if (v != null) { -value = v; -}}} -var v = Clazz_superCall (this, javax.swing.MultiUIDefaults, "remove", [key]); -if (v != null) { -value = v; -}return value; -}, "~O"); -Clazz_defineMethod (c$, "clear", -function () { -Clazz_superCall (this, javax.swing.MultiUIDefaults, "clear", []); -for (var i = 0; i < this.tables.length; i++) { -var table = this.tables[i]; -if (table != null) { -table.clear (); -}} -}); -Clazz_overrideMethod (c$, "toString", -function () { -var buf = new StringBuffer (); -buf.append ("{"); -var keys = this.keys (); -while (keys.hasMoreElements ()) { -var key = keys.nextElement (); -buf.append (key + "=" + this.get (key) + ", "); -} -var length = buf.length (); -if (length > 1) { -buf.$delete (length - 2, length); -}buf.append ("}"); -return buf.toString (); -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.iterator = null; -this.type = null; -Clazz_instantialize (this, arguments); -}, javax.swing.MultiUIDefaults, "MultiUIDefaultsEnumerator", null, java.util.Enumeration); -Clazz_makeConstructor (c$, -function (a, b) { -this.type = a; -this.iterator = b.iterator (); -}, "javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type,java.util.Set"); -Clazz_overrideMethod (c$, "hasMoreElements", -function () { -return this.iterator.hasNext (); -}); -Clazz_overrideMethod (c$, "nextElement", -function () { -switch (this.type) { -case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS: -return this.iterator.next ().getKey (); -case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS: -return this.iterator.next ().getValue (); -default: -return null; -} -}); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator, "Type", Enum); -Clazz_defineEnumConstant (c$, "KEYS", 0, []); -Clazz_defineEnumConstant (c$, "ELEMENTS", 1, []); -c$ = Clazz_p0p (); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (null, "java.awt.Font", ["java.awt.font.TextAttribute", "java.awt.geom.AffineTransform", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.family = null; -this.name = null; -this.style = 0; -this.size = 0; -this.pointSize = 0; -this.$hasLayoutAttributes = false; -this.nonIdentityTx = false; -this.hash = 0; -Clazz_instantialize (this, arguments); -}, java.awt, "Font"); -Clazz_makeConstructor (c$, -function (name, style, size) { -this.name = (name != null) ? name : "Default"; -this.style = (style & -4) == 0 ? style : 0; -this.size = size; -this.pointSize = size; -}, "~S,~N,~N"); -Clazz_makeConstructor (c$, - function (name, style, sizePts) { -this.name = (name != null) ? name : "Default"; -this.style = (style & -4) == 0 ? style : 0; -this.size = Clazz_doubleToInt (sizePts + 0.5); -this.pointSize = sizePts; -}, "~S,~N,~N"); -Clazz_makeConstructor (c$, -function (font) { -this.name = font.name; -this.style = font.style; -this.size = font.size; -this.pointSize = font.pointSize; -}, "java.awt.Font"); -Clazz_defineMethod (c$, "getTransform", -function () { -return new java.awt.geom.AffineTransform (); -}); -Clazz_defineMethod (c$, "getFamily", -function () { -return (this.family == null ? this.family = swingjs.JSToolkit.getFontFamily (this) : this.family); -}); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "getFontName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "getStyle", -function () { -return this.style; -}); -Clazz_defineMethod (c$, "getSize", -function () { -return this.size; -}); -Clazz_defineMethod (c$, "getSize2D", -function () { -return this.pointSize; -}); -Clazz_defineMethod (c$, "isPlain", -function () { -return this.style == 0; -}); -Clazz_defineMethod (c$, "isBold", -function () { -return (this.style & 1) != 0; -}); -Clazz_defineMethod (c$, "isItalic", -function () { -return (this.style & 2) != 0; -}); -Clazz_defineMethod (c$, "isTransformed", -function () { -return this.nonIdentityTx; -}); -Clazz_defineMethod (c$, "hasLayoutAttributes", -function () { -return this.$hasLayoutAttributes; -}); -c$.getFont = Clazz_defineMethod (c$, "getFont", -function (nm) { -return java.awt.Font.getFont (nm, null); -}, "~S"); -c$.decode = Clazz_defineMethod (c$, "decode", -function (str) { -var fontName = str; -var styleName = ""; -var fontSize = 12; -var fontStyle = 0; -if (str == null) { -return new java.awt.Font ("Dialog", fontStyle, fontSize); -}var lastHyphen = str.lastIndexOf ('-'); -var lastSpace = str.lastIndexOf (' '); -var sepChar = (lastHyphen > lastSpace) ? '-' : ' '; -var sizeIndex = str.lastIndexOf (sepChar); -var styleIndex = str.lastIndexOf (sepChar, sizeIndex - 1); -var strlen = str.length; -if (sizeIndex > 0 && sizeIndex + 1 < strlen) { -try { -fontSize = Integer.$valueOf (str.substring (sizeIndex + 1)).intValue (); -if (fontSize <= 0) { -fontSize = 12; -}} catch (e) { -if (Clazz_exceptionOf (e, NumberFormatException)) { -styleIndex = sizeIndex; -sizeIndex = strlen; -if (str.charAt (sizeIndex - 1) == sepChar) { -sizeIndex--; -}} else { -throw e; -} -} -}if (styleIndex >= 0 && styleIndex + 1 < strlen) { -styleName = str.substring (styleIndex + 1, sizeIndex); -styleName = styleName.toLowerCase (); -if (styleName.equals ("bolditalic")) { -fontStyle = 3; -} else if (styleName.equals ("italic")) { -fontStyle = 2; -} else if (styleName.equals ("bold")) { -fontStyle = 1; -} else if (styleName.equals ("plain")) { -fontStyle = 0; -} else { -styleIndex = sizeIndex; -if (str.charAt (styleIndex - 1) == sepChar) { -styleIndex--; -}}fontName = str.substring (0, styleIndex); -} else { -var fontEnd = strlen; -if (styleIndex > 0) { -fontEnd = styleIndex; -} else if (sizeIndex > 0) { -fontEnd = sizeIndex; -}if (fontEnd > 0 && str.charAt (fontEnd - 1) == sepChar) { -fontEnd--; -}fontName = str.substring (0, fontEnd); -}return new java.awt.Font (fontName, fontStyle, fontSize); -}, "~S"); -c$.getFont = Clazz_defineMethod (c$, "getFont", -function (nm, font) { -var str = null; -try { -str = System.getProperty (nm); -} catch (e) { -if (Clazz_exceptionOf (e, SecurityException)) { -} else { -throw e; -} -} -if (str == null) { -return font; -}return java.awt.Font.decode (str); -}, "~S,java.awt.Font"); -Clazz_overrideMethod (c$, "hashCode", -function () { -if (this.hash == 0) { -this.hash = this.name.hashCode () ^ this.style ^ this.size; -}return this.hash; -}); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (obj === this) { -return true; -}if (obj != null) { -try { -var font = obj; -if (this.size == font.size && this.style == font.style && this.nonIdentityTx == font.nonIdentityTx && this.$hasLayoutAttributes == font.$hasLayoutAttributes && this.pointSize == font.pointSize && this.name.equals (font.name)) { -return true; -}} catch (e) { -if (Clazz_exceptionOf (e, ClassCastException)) { -} else { -throw e; -} -} -}return false; -}, "~O"); -Clazz_overrideMethod (c$, "toString", -function () { -var strStyle; -if (this.isBold ()) { -strStyle = this.isItalic () ? "bolditalic" : "bold"; -} else { -strStyle = this.isItalic () ? "italic" : "plain"; -}return this.getClass ().getName () + "[family=" + this.getFamily () + ",name=" + this.name + ",style=" + strStyle + ",size=" + this.size + "]"; -}); -Clazz_defineMethod (c$, "getAvailableAttributes", -function () { -var attributes = Clazz_newArray (-1, [java.awt.font.TextAttribute.FAMILY, java.awt.font.TextAttribute.WEIGHT, java.awt.font.TextAttribute.WIDTH, java.awt.font.TextAttribute.SIZE, java.awt.font.TextAttribute.UNDERLINE, java.awt.font.TextAttribute.STRIKETHROUGH]); -return attributes; -}); -Clazz_defineMethod (c$, "deriveFont", -function (style, size) { -return new java.awt.Font (this.name, style, size); -}, "~N,~N"); -Clazz_defineMethod (c$, "deriveFont", -function (size) { -return new java.awt.Font (this.name, this.style, size); -}, "~N"); -Clazz_defineMethod (c$, "deriveFont", -function (style) { -return new java.awt.Font (this.name, style, this.size); -}, "~N"); -Clazz_defineMethod (c$, "hasUniformLineMetrics", -function () { -return false; -}); -Clazz_overrideMethod (c$, "finalize", -function () { -}); -Clazz_defineStatics (c$, -"DIALOG", "Dialog", -"DIALOG_INPUT", "DialogInput", -"SANS_SERIF", "SansSerif", -"SERIF", "Serif", -"MONOSPACED", "Monospaced", -"PLAIN", 0, -"BOLD", 1, -"ITALIC", 2, -"ROMAN_BASELINE", 0, -"CENTER_BASELINE", 1, -"HANGING_BASELINE", 2, -"TRUETYPE_FONT", 0, -"TYPE1_FONT", 1, -"LAYOUT_LEFT_TO_RIGHT", 0, -"LAYOUT_RIGHT_TO_LEFT", 1, -"LAYOUT_NO_START_CONTEXT", 2, -"LAYOUT_NO_LIMIT_CONTEXT", 4); -}); -Clazz_declarePackage ("java.awt.font"); -Clazz_load (["java.text.AttributedCharacterIterator", "java.lang.Boolean", "$.Float", "java.util.HashMap"], "java.awt.font.TextAttribute", ["java.io.InvalidObjectException"], function () { -c$ = Clazz_declareType (java.awt.font, "TextAttribute", java.text.AttributedCharacterIterator.Attribute); -Clazz_makeConstructor (c$, -function (name) { -Clazz_superConstructor (this, java.awt.font.TextAttribute, [name]); -if (this.getClass () === java.awt.font.TextAttribute) { -java.awt.font.TextAttribute.$instanceMap.put (name, this); -}}, "~S"); -Clazz_overrideMethod (c$, "readResolve", -function () { -if (this.getClass () !== java.awt.font.TextAttribute) { -throw new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve"); -}var instance = java.awt.font.TextAttribute.$instanceMap.get (this.getName ()); -if (instance != null) { -return instance; -} else { -throw new java.io.InvalidObjectException ("unknown attribute name"); -}}); -c$.$instanceMap = c$.prototype.$instanceMap = new java.util.HashMap (29); -c$.FAMILY = c$.prototype.FAMILY = new java.awt.font.TextAttribute ("family"); -c$.WEIGHT = c$.prototype.WEIGHT = new java.awt.font.TextAttribute ("weight"); -c$.WEIGHT_EXTRA_LIGHT = c$.prototype.WEIGHT_EXTRA_LIGHT = Float.$valueOf (0.5); -c$.WEIGHT_LIGHT = c$.prototype.WEIGHT_LIGHT = Float.$valueOf (0.75); -c$.WEIGHT_DEMILIGHT = c$.prototype.WEIGHT_DEMILIGHT = Float.$valueOf (0.875); -c$.WEIGHT_REGULAR = c$.prototype.WEIGHT_REGULAR = Float.$valueOf (1.0); -c$.WEIGHT_SEMIBOLD = c$.prototype.WEIGHT_SEMIBOLD = Float.$valueOf (1.25); -c$.WEIGHT_MEDIUM = c$.prototype.WEIGHT_MEDIUM = Float.$valueOf (1.5); -c$.WEIGHT_DEMIBOLD = c$.prototype.WEIGHT_DEMIBOLD = Float.$valueOf (1.75); -c$.WEIGHT_BOLD = c$.prototype.WEIGHT_BOLD = Float.$valueOf (2.0); -c$.WEIGHT_HEAVY = c$.prototype.WEIGHT_HEAVY = Float.$valueOf (2.25); -c$.WEIGHT_EXTRABOLD = c$.prototype.WEIGHT_EXTRABOLD = Float.$valueOf (2.5); -c$.WEIGHT_ULTRABOLD = c$.prototype.WEIGHT_ULTRABOLD = Float.$valueOf (2.75); -c$.WIDTH = c$.prototype.WIDTH = new java.awt.font.TextAttribute ("width"); -c$.WIDTH_CONDENSED = c$.prototype.WIDTH_CONDENSED = Float.$valueOf (0.75); -c$.WIDTH_SEMI_CONDENSED = c$.prototype.WIDTH_SEMI_CONDENSED = Float.$valueOf (0.875); -c$.WIDTH_REGULAR = c$.prototype.WIDTH_REGULAR = Float.$valueOf (1.0); -c$.WIDTH_SEMI_EXTENDED = c$.prototype.WIDTH_SEMI_EXTENDED = Float.$valueOf (1.25); -c$.WIDTH_EXTENDED = c$.prototype.WIDTH_EXTENDED = Float.$valueOf (1.5); -c$.POSTURE = c$.prototype.POSTURE = new java.awt.font.TextAttribute ("posture"); -c$.POSTURE_REGULAR = c$.prototype.POSTURE_REGULAR = Float.$valueOf (0.0); -c$.POSTURE_OBLIQUE = c$.prototype.POSTURE_OBLIQUE = Float.$valueOf (0.20); -c$.SIZE = c$.prototype.SIZE = new java.awt.font.TextAttribute ("size"); -c$.TRANSFORM = c$.prototype.TRANSFORM = new java.awt.font.TextAttribute ("transform"); -c$.SUPERSCRIPT = c$.prototype.SUPERSCRIPT = new java.awt.font.TextAttribute ("superscript"); -c$.SUPERSCRIPT_SUPER = c$.prototype.SUPERSCRIPT_SUPER = Integer.$valueOf (1); -c$.SUPERSCRIPT_SUB = c$.prototype.SUPERSCRIPT_SUB = Integer.$valueOf (-1); -c$.FONT = c$.prototype.FONT = new java.awt.font.TextAttribute ("font"); -c$.CHAR_REPLACEMENT = c$.prototype.CHAR_REPLACEMENT = new java.awt.font.TextAttribute ("char_replacement"); -c$.FOREGROUND = c$.prototype.FOREGROUND = new java.awt.font.TextAttribute ("foreground"); -c$.BACKGROUND = c$.prototype.BACKGROUND = new java.awt.font.TextAttribute ("background"); -c$.UNDERLINE = c$.prototype.UNDERLINE = new java.awt.font.TextAttribute ("underline"); -c$.UNDERLINE_ON = c$.prototype.UNDERLINE_ON = Integer.$valueOf (0); -c$.STRIKETHROUGH = c$.prototype.STRIKETHROUGH = new java.awt.font.TextAttribute ("strikethrough"); -c$.STRIKETHROUGH_ON = c$.prototype.STRIKETHROUGH_ON = Boolean.TRUE; -c$.RUN_DIRECTION = c$.prototype.RUN_DIRECTION = new java.awt.font.TextAttribute ("run_direction"); -c$.RUN_DIRECTION_LTR = c$.prototype.RUN_DIRECTION_LTR = Boolean.FALSE; -c$.RUN_DIRECTION_RTL = c$.prototype.RUN_DIRECTION_RTL = Boolean.TRUE; -c$.BIDI_EMBEDDING = c$.prototype.BIDI_EMBEDDING = new java.awt.font.TextAttribute ("bidi_embedding"); -c$.JUSTIFICATION = c$.prototype.JUSTIFICATION = new java.awt.font.TextAttribute ("justification"); -c$.JUSTIFICATION_FULL = c$.prototype.JUSTIFICATION_FULL = Float.$valueOf (1.0); -c$.JUSTIFICATION_NONE = c$.prototype.JUSTIFICATION_NONE = Float.$valueOf (0.0); -c$.INPUT_METHOD_HIGHLIGHT = c$.prototype.INPUT_METHOD_HIGHLIGHT = new java.awt.font.TextAttribute ("input method highlight"); -c$.INPUT_METHOD_UNDERLINE = c$.prototype.INPUT_METHOD_UNDERLINE = new java.awt.font.TextAttribute ("input method underline"); -c$.UNDERLINE_LOW_ONE_PIXEL = c$.prototype.UNDERLINE_LOW_ONE_PIXEL = Integer.$valueOf (1); -c$.UNDERLINE_LOW_TWO_PIXEL = c$.prototype.UNDERLINE_LOW_TWO_PIXEL = Integer.$valueOf (2); -c$.UNDERLINE_LOW_DOTTED = c$.prototype.UNDERLINE_LOW_DOTTED = Integer.$valueOf (3); -c$.UNDERLINE_LOW_GRAY = c$.prototype.UNDERLINE_LOW_GRAY = Integer.$valueOf (4); -c$.UNDERLINE_LOW_DASHED = c$.prototype.UNDERLINE_LOW_DASHED = Integer.$valueOf (5); -c$.SWAP_COLORS = c$.prototype.SWAP_COLORS = new java.awt.font.TextAttribute ("swap_colors"); -c$.SWAP_COLORS_ON = c$.prototype.SWAP_COLORS_ON = Boolean.TRUE; -c$.NUMERIC_SHAPING = c$.prototype.NUMERIC_SHAPING = new java.awt.font.TextAttribute ("numeric_shaping"); -c$.KERNING = c$.prototype.KERNING = new java.awt.font.TextAttribute ("kerning"); -c$.KERNING_ON = c$.prototype.KERNING_ON = Integer.$valueOf (1); -c$.LIGATURES = c$.prototype.LIGATURES = new java.awt.font.TextAttribute ("ligatures"); -c$.LIGATURES_ON = c$.prototype.LIGATURES_ON = Integer.$valueOf (1); -c$.TRACKING = c$.prototype.TRACKING = new java.awt.font.TextAttribute ("tracking"); -c$.TRACKING_TIGHT = c$.prototype.TRACKING_TIGHT = Float.$valueOf (-0.04); -c$.TRACKING_LOOSE = c$.prototype.TRACKING_LOOSE = Float.$valueOf (.04); -}); -Clazz_declarePackage ("java.text"); -Clazz_load (["java.text.CharacterIterator", "java.io.InvalidObjectException", "java.util.HashMap"], "java.text.AttributedCharacterIterator", null, function () { -Clazz_declareInterface (java.text, "AttributedCharacterIterator", java.text.CharacterIterator); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.name = null; -Clazz_instantialize (this, arguments); -}, java.text.AttributedCharacterIterator, "Attribute", null, java.io.Serializable); -Clazz_makeConstructor (c$, -function (a) { -this.name = a; -if (this.getClass () === java.text.AttributedCharacterIterator.Attribute) { -java.text.AttributedCharacterIterator.Attribute.instanceMap.put (a, this); -}}, "~S"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "(" + this.name + ")"; -}); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "readResolve", -function () { -if (this.getClass () !== java.text.AttributedCharacterIterator.Attribute) { -throw new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve"); -}var a = java.text.AttributedCharacterIterator.Attribute.instanceMap.get (this.getName ()); -if (a != null) { -return a; -} else { -throw new java.io.InvalidObjectException ("unknown attribute name"); -}}); -c$.instanceMap = c$.prototype.instanceMap = new java.util.HashMap (7); -c$.LANGUAGE = c$.prototype.LANGUAGE = new java.text.AttributedCharacterIterator.Attribute ("language"); -c$.READING = c$.prototype.READING = new java.text.AttributedCharacterIterator.Attribute ("reading"); -c$.INPUT_METHOD_SEGMENT = c$.prototype.INPUT_METHOD_SEGMENT = new java.text.AttributedCharacterIterator.Attribute ("input_method_segment"); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.text"); -c$ = Clazz_declareInterface (java.text, "CharacterIterator", Cloneable); -Clazz_defineStatics (c$, -"DONE", '\uFFFF'); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (null, "java.awt.geom.Point2D", ["java.lang.Double", "$.InternalError"], function () { -c$ = Clazz_declareType (java.awt.geom, "Point2D", null, Cloneable); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "setLocation", -function (p) { -this.setLocation (p.getX (), p.getY ()); -}, "java.awt.geom.Point2D"); -c$.distanceSq = Clazz_defineMethod (c$, "distanceSq", -function (x1, y1, x2, y2) { -x1 -= x2; -y1 -= y2; -return (x1 * x1 + y1 * y1); -}, "~N,~N,~N,~N"); -c$.distance = Clazz_defineMethod (c$, "distance", -function (x1, y1, x2, y2) { -x1 -= x2; -y1 -= y2; -return Math.sqrt (x1 * x1 + y1 * y1); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "distanceSq", -function (px, py) { -px -= this.getX (); -py -= this.getY (); -return (px * px + py * py); -}, "~N,~N"); -Clazz_defineMethod (c$, "distanceSq", -function (pt) { -var px = pt.getX () - this.getX (); -var py = pt.getY () - this.getY (); -return (px * px + py * py); -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "distance", -function (px, py) { -px -= this.getX (); -py -= this.getY (); -return Math.sqrt (px * px + py * py); -}, "~N,~N"); -Clazz_defineMethod (c$, "distance", -function (pt) { -var px = pt.getX () - this.getX (); -var py = pt.getY () - this.getY (); -return Math.sqrt (px * px + py * py); -}, "java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.geom.Point2D, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_overrideMethod (c$, "hashCode", -function () { -var bits = java.lang.Double.doubleToLongBits (this.getX ()); -bits ^= java.lang.Double.doubleToLongBits (this.getY ()) * 31; -return ((bits) ^ ((bits >> 32))); -}); -Clazz_defineMethod (c$, "equals", -function (obj) { -if (Clazz_instanceOf (obj, java.awt.geom.Point2D)) { -var p2d = obj; -return (this.getX () == p2d.getX ()) && (this.getY () == p2d.getY ()); -}return Clazz_superCall (this, java.awt.geom.Point2D, "equals", [obj]); -}, "~O"); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Point2D, "Float", java.awt.geom.Point2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []); -}); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []); -this.x = a; -this.y = b; -}, "~N,~N"); -Clazz_overrideMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_overrideMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_defineMethod (c$, "setLocation", -function (a, b) { -this.x = a; -this.y = b; -}, "~N,~N"); -Clazz_defineMethod (c$, "setLocation", -function (a, b) { -this.x = a; -this.y = b; -}, "~N,~N"); -Clazz_overrideMethod (c$, "toString", -function () { -return "Point2D.Float[" + this.x + ", " + this.y + "]"; -}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Point2D, "Double", java.awt.geom.Point2D); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []); -}); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []); -this.x = a; -this.y = b; -}, "~N,~N"); -Clazz_overrideMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_overrideMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_defineMethod (c$, "setLocation", -function (a, b) { -this.x = a; -this.y = b; -}, "~N,~N"); -Clazz_overrideMethod (c$, "toString", -function () { -return "Point2D.Double[" + this.x + ", " + this.y + "]"; -}); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (null, "java.awt.geom.AffineTransform", ["java.lang.Double", "$.InternalError", "JU.AU", "java.awt.geom.NoninvertibleTransformException", "$.Path2D", "$.Point2D", "java.awt.geom.Point2D.Double"], function () { -c$ = Clazz_decorateAsClass (function () { -this.m00 = 0; -this.m10 = 0; -this.m01 = 0; -this.m11 = 0; -this.m02 = 0; -this.m12 = 0; -this.state = 0; -this.type = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom, "AffineTransform", null, [Cloneable, java.io.Serializable]); -Clazz_makeConstructor (c$, - function (m00, m10, m01, m11, m02, m12, state) { -{ -switch (arguments.length) { case 0: this.m00 = this.m11 = 1.0; -return; -case 1: -if (Clazz_instanceOf(m00, java.awt.geom.AffineTransform)) { -var Tx = m00; this.m00 = -Tx.m00; this.m10 = Tx.m10; this.m01 = Tx.m01; this.m11 = -Tx.m11; this.m02 = Tx.m02; this.m12 = Tx.m12; this.state = -Tx.state; this.type = Tx.type; -} else { -var flatmatrix = m00; -this.m00 = flatmatrix[0]; -this.m10 = flatmatrix[1]; -this.m01 = flatmatrix[2]; -this.m11 = flatmatrix[3]; -if (flatmatrix.length > 5) { -this.m02 = flatmatrix[4]; -this.m12 = flatmatrix[5]; -} -this.updateState(); -} -return; -case 6: -this.m00 = m00; -this.m10 = m10; -this.m01 = m01; -this.m11 = m11; -this.m02 = m02; -this.m12 = m12; -this.updateState(); -return; -} -}this.m00 = m00; -this.m10 = m10; -this.m01 = m01; -this.m11 = m11; -this.m02 = m02; -this.m12 = m12; -this.state = state; -this.type = -1; -}, "~N,~N,~N,~N,~N,~N,~N"); -c$.getTranslateInstance = Clazz_defineMethod (c$, "getTranslateInstance", -function (tx, ty) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToTranslation (tx, ty); -return Tx; -}, "~N,~N"); -c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", -function (theta) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToRotation (theta); -return Tx; -}, "~N"); -c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", -function (theta, anchorx, anchory) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToRotation (theta, anchorx, anchory); -return Tx; -}, "~N,~N,~N"); -c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", -function (vecx, vecy) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToRotation (vecx, vecy); -return Tx; -}, "~N,~N"); -c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", -function (vecx, vecy, anchorx, anchory) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToRotation (vecx, vecy, anchorx, anchory); -return Tx; -}, "~N,~N,~N,~N"); -c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", -function (numquadrants) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToQuadrantRotation (numquadrants); -return Tx; -}, "~N"); -c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", -function (numquadrants, anchorx, anchory) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToQuadrantRotation (numquadrants, anchorx, anchory); -return Tx; -}, "~N,~N,~N"); -c$.getScaleInstance = Clazz_defineMethod (c$, "getScaleInstance", -function (sx, sy) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToScale (sx, sy); -return Tx; -}, "~N,~N"); -c$.getShearInstance = Clazz_defineMethod (c$, "getShearInstance", -function (shx, shy) { -var Tx = new java.awt.geom.AffineTransform (); -Tx.setToShear (shx, shy); -return Tx; -}, "~N,~N"); -Clazz_defineMethod (c$, "getType", -function () { -if (this.type == -1) { -this.calculateType (); -}return this.type; -}); -Clazz_defineMethod (c$, "calculateType", - function () { -var ret = 0; -var sgn0; -var sgn1; -var M0; -var M1; -var M2; -var M3; -this.updateState (); -switch (this.state) { -default: -this.stateError (); -case (7): -ret = 1; -case (6): -if ((M0 = this.m00) * (M2 = this.m01) + (M3 = this.m10) * (M1 = this.m11) != 0) { -this.type = 32; -return; -}sgn0 = (M0 >= 0.0); -sgn1 = (M1 >= 0.0); -if (sgn0 == sgn1) { -if (M0 != M1 || M2 != -M3) { -ret |= (20); -} else if (M0 * M1 - M2 * M3 != 1.0) { -ret |= (18); -} else { -ret |= 16; -}} else { -if (M0 != -M1 || M2 != M3) { -ret |= (84); -} else if (M0 * M1 - M2 * M3 != 1.0) { -ret |= (82); -} else { -ret |= (80); -}}break; -case (5): -ret = 1; -case (4): -sgn0 = ((M0 = this.m01) >= 0.0); -sgn1 = ((M1 = this.m10) >= 0.0); -if (sgn0 != sgn1) { -if (M0 != -M1) { -ret |= (12); -} else if (M0 != 1.0 && M0 != -1.0) { -ret |= (10); -} else { -ret |= 8; -}} else { -if (M0 == M1) { -ret |= (74); -} else { -ret |= (76); -}}break; -case (3): -ret = 1; -case (2): -sgn0 = ((M0 = this.m00) >= 0.0); -sgn1 = ((M1 = this.m11) >= 0.0); -if (sgn0 == sgn1) { -if (sgn0) { -if (M0 == M1) { -ret |= 2; -} else { -ret |= 4; -}} else { -if (M0 != M1) { -ret |= (12); -} else if (M0 != -1.0) { -ret |= (10); -} else { -ret |= 8; -}}} else { -if (M0 == -M1) { -if (M0 == 1.0 || M0 == -1.0) { -ret |= 64; -} else { -ret |= (66); -}} else { -ret |= (68); -}}break; -case (1): -ret = 1; -break; -case (0): -break; -} -this.type = ret; -}); -Clazz_defineMethod (c$, "getDeterminant", -function () { -switch (this.state) { -default: -this.stateError (); -case (7): -case (6): -return this.m00 * this.m11 - this.m01 * this.m10; -case (5): -case (4): -return -(this.m01 * this.m10); -case (3): -case (2): -return this.m00 * this.m11; -case (1): -case (0): -return 1.0; -} -}); -Clazz_defineMethod (c$, "updateState", -function () { -if (this.m01 == 0.0 && this.m10 == 0.0) { -if (this.m00 == 1.0 && this.m11 == 1.0) { -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 0; -this.type = 0; -} else { -this.state = 1; -this.type = 1; -}} else { -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 2; -this.type = -1; -} else { -this.state = (3); -this.type = -1; -}}} else { -if (this.m00 == 0.0 && this.m11 == 0.0) { -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 4; -this.type = -1; -} else { -this.state = (5); -this.type = -1; -}} else { -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = (6); -this.type = -1; -} else { -this.state = (7); -this.type = -1; -}}}}); -Clazz_defineMethod (c$, "stateError", - function () { -throw new InternalError ("missing case in transform state switch"); -}); -Clazz_defineMethod (c$, "getMatrix", -function (flatmatrix) { -flatmatrix[0] = this.m00; -flatmatrix[1] = this.m10; -flatmatrix[2] = this.m01; -flatmatrix[3] = this.m11; -if (flatmatrix.length > 5) { -flatmatrix[4] = this.m02; -flatmatrix[5] = this.m12; -}}, "~A"); -Clazz_defineMethod (c$, "getScaleX", -function () { -return this.m00; -}); -Clazz_defineMethod (c$, "getScaleY", -function () { -return this.m11; -}); -Clazz_defineMethod (c$, "getShearX", -function () { -return this.m01; -}); -Clazz_defineMethod (c$, "getShearY", -function () { -return this.m10; -}); -Clazz_defineMethod (c$, "getTranslateX", -function () { -return this.m02; -}); -Clazz_defineMethod (c$, "getTranslateY", -function () { -return this.m12; -}); -Clazz_defineMethod (c$, "translate", -function (tx, ty) { -switch (this.state) { -default: -this.stateError (); -case (7): -this.m02 = tx * this.m00 + ty * this.m01 + this.m02; -this.m12 = tx * this.m10 + ty * this.m11 + this.m12; -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 6; -if (this.type != -1) { -this.type -= 1; -}}return; -case (6): -this.m02 = tx * this.m00 + ty * this.m01; -this.m12 = tx * this.m10 + ty * this.m11; -if (this.m02 != 0.0 || this.m12 != 0.0) { -this.state = 7; -this.type |= 1; -}return; -case (5): -this.m02 = ty * this.m01 + this.m02; -this.m12 = tx * this.m10 + this.m12; -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 4; -if (this.type != -1) { -this.type -= 1; -}}return; -case (4): -this.m02 = ty * this.m01; -this.m12 = tx * this.m10; -if (this.m02 != 0.0 || this.m12 != 0.0) { -this.state = 5; -this.type |= 1; -}return; -case (3): -this.m02 = tx * this.m00 + this.m02; -this.m12 = ty * this.m11 + this.m12; -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 2; -if (this.type != -1) { -this.type -= 1; -}}return; -case (2): -this.m02 = tx * this.m00; -this.m12 = ty * this.m11; -if (this.m02 != 0.0 || this.m12 != 0.0) { -this.state = 3; -this.type |= 1; -}return; -case (1): -this.m02 = tx + this.m02; -this.m12 = ty + this.m12; -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 0; -this.type = 0; -}return; -case (0): -this.m02 = tx; -this.m12 = ty; -if (tx != 0.0 || ty != 0.0) { -this.state = 1; -this.type = 1; -}return; -} -}, "~N,~N"); -Clazz_defineMethod (c$, "rotate90", - function () { -var M0 = this.m00; -this.m00 = this.m01; -this.m01 = -M0; -M0 = this.m10; -this.m10 = this.m11; -this.m11 = -M0; -var state = java.awt.geom.AffineTransform.rot90conversion[this.state]; -if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) { -state -= 2; -}this.state = state; -this.type = -1; -}); -Clazz_defineMethod (c$, "rotate180", - function () { -this.m00 = -this.m00; -this.m11 = -this.m11; -var state = this.state; -if ((state & (4)) != 0) { -this.m01 = -this.m01; -this.m10 = -this.m10; -} else { -if (this.m00 == 1.0 && this.m11 == 1.0) { -this.state = state & -3; -} else { -this.state = state | 2; -}}this.type = -1; -}); -Clazz_defineMethod (c$, "rotate270", - function () { -var M0 = this.m00; -this.m00 = -this.m01; -this.m01 = M0; -M0 = this.m10; -this.m10 = -this.m11; -this.m11 = M0; -var state = java.awt.geom.AffineTransform.rot90conversion[this.state]; -if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) { -state -= 2; -}this.state = state; -this.type = -1; -}); -Clazz_defineMethod (c$, "rotate", -function (theta) { -var sin = Math.sin (theta); -if (sin == 1.0) { -this.rotate90 (); -} else if (sin == -1.0) { -this.rotate270 (); -} else { -var cos = Math.cos (theta); -if (cos == -1.0) { -this.rotate180 (); -} else if (cos != 1.0) { -var M0; -var M1; -M0 = this.m00; -M1 = this.m01; -this.m00 = cos * M0 + sin * M1; -this.m01 = -sin * M0 + cos * M1; -M0 = this.m10; -M1 = this.m11; -this.m10 = cos * M0 + sin * M1; -this.m11 = -sin * M0 + cos * M1; -this.updateState (); -}}}, "~N"); -Clazz_defineMethod (c$, "rotate", -function (theta, anchorx, anchory) { -this.translate (anchorx, anchory); -this.rotate (theta); -this.translate (-anchorx, -anchory); -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "rotate", -function (vecx, vecy) { -if (vecy == 0.0) { -if (vecx < 0.0) { -this.rotate180 (); -}} else if (vecx == 0.0) { -if (vecy > 0.0) { -this.rotate90 (); -} else { -this.rotate270 (); -}} else { -var len = Math.sqrt (vecx * vecx + vecy * vecy); -var sin = vecy / len; -var cos = vecx / len; -var M0; -var M1; -M0 = this.m00; -M1 = this.m01; -this.m00 = cos * M0 + sin * M1; -this.m01 = -sin * M0 + cos * M1; -M0 = this.m10; -M1 = this.m11; -this.m10 = cos * M0 + sin * M1; -this.m11 = -sin * M0 + cos * M1; -this.updateState (); -}}, "~N,~N"); -Clazz_defineMethod (c$, "rotate", -function (vecx, vecy, anchorx, anchory) { -this.translate (anchorx, anchory); -this.rotate (vecx, vecy); -this.translate (-anchorx, -anchory); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "quadrantRotate", -function (numquadrants) { -switch (numquadrants & 3) { -case 0: -break; -case 1: -this.rotate90 (); -break; -case 2: -this.rotate180 (); -break; -case 3: -this.rotate270 (); -break; -} -}, "~N"); -Clazz_defineMethod (c$, "quadrantRotate", -function (numquadrants, anchorx, anchory) { -switch (numquadrants & 3) { -case 0: -return; -case 1: -this.m02 += anchorx * (this.m00 - this.m01) + anchory * (this.m01 + this.m00); -this.m12 += anchorx * (this.m10 - this.m11) + anchory * (this.m11 + this.m10); -this.rotate90 (); -break; -case 2: -this.m02 += anchorx * (this.m00 + this.m00) + anchory * (this.m01 + this.m01); -this.m12 += anchorx * (this.m10 + this.m10) + anchory * (this.m11 + this.m11); -this.rotate180 (); -break; -case 3: -this.m02 += anchorx * (this.m00 + this.m01) + anchory * (this.m01 - this.m00); -this.m12 += anchorx * (this.m10 + this.m11) + anchory * (this.m11 - this.m10); -this.rotate270 (); -break; -} -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state &= -2; -} else { -this.state |= 1; -}}, "~N,~N,~N"); -Clazz_defineMethod (c$, "scale", -function (sx, sy) { -var state = this.state; -switch (state) { -default: -this.stateError (); -case (7): -case (6): -this.m00 *= sx; -this.m11 *= sy; -case (5): -case (4): -this.m01 *= sy; -this.m10 *= sx; -if (this.m01 == 0 && this.m10 == 0) { -state &= 1; -if (this.m00 == 1.0 && this.m11 == 1.0) { -this.type = (state == 0 ? 0 : 1); -} else { -state |= 2; -this.type = -1; -}this.state = state; -}return; -case (3): -case (2): -this.m00 *= sx; -this.m11 *= sy; -if (this.m00 == 1.0 && this.m11 == 1.0) { -this.state = (state &= 1); -this.type = (state == 0 ? 0 : 1); -} else { -this.type = -1; -}return; -case (1): -case (0): -this.m00 = sx; -this.m11 = sy; -if (sx != 1.0 || sy != 1.0) { -this.state = state | 2; -this.type = -1; -}return; -} -}, "~N,~N"); -Clazz_defineMethod (c$, "shear", -function (shx, shy) { -var state = this.state; -switch (state) { -default: -this.stateError (); -case (7): -case (6): -var M0; -var M1; -M0 = this.m00; -M1 = this.m01; -this.m00 = M0 + M1 * shy; -this.m01 = M0 * shx + M1; -M0 = this.m10; -M1 = this.m11; -this.m10 = M0 + M1 * shy; -this.m11 = M0 * shx + M1; -this.updateState (); -return; -case (5): -case (4): -this.m00 = this.m01 * shy; -this.m11 = this.m10 * shx; -if (this.m00 != 0.0 || this.m11 != 0.0) { -this.state = state | 2; -}this.type = -1; -return; -case (3): -case (2): -this.m01 = this.m00 * shx; -this.m10 = this.m11 * shy; -if (this.m01 != 0.0 || this.m10 != 0.0) { -this.state = state | 4; -}this.type = -1; -return; -case (1): -case (0): -this.m01 = shx; -this.m10 = shy; -if (this.m01 != 0.0 || this.m10 != 0.0) { -this.state = state | 2 | 4; -this.type = -1; -}return; -} -}, "~N,~N"); -Clazz_defineMethod (c$, "setToIdentity", -function () { -this.m00 = this.m11 = 1.0; -this.m10 = this.m01 = this.m02 = this.m12 = 0.0; -this.state = 0; -this.type = 0; -}); -Clazz_defineMethod (c$, "setToTranslation", -function (tx, ty) { -this.m00 = 1.0; -this.m10 = 0.0; -this.m01 = 0.0; -this.m11 = 1.0; -this.m02 = tx; -this.m12 = ty; -if (tx != 0.0 || ty != 0.0) { -this.state = 1; -this.type = 1; -} else { -this.state = 0; -this.type = 0; -}}, "~N,~N"); -Clazz_defineMethod (c$, "setToRotation", -function (theta) { -var sin = Math.sin (theta); -var cos; -if (sin == 1.0 || sin == -1.0) { -cos = 0.0; -this.state = 4; -this.type = 8; -} else { -cos = Math.cos (theta); -if (cos == -1.0) { -sin = 0.0; -this.state = 2; -this.type = 8; -} else if (cos == 1.0) { -sin = 0.0; -this.state = 0; -this.type = 0; -} else { -this.state = 6; -this.type = 16; -}}this.m00 = cos; -this.m10 = sin; -this.m01 = -sin; -this.m11 = cos; -this.m02 = 0.0; -this.m12 = 0.0; -}, "~N"); -Clazz_defineMethod (c$, "setToRotation", -function (theta, anchorx, anchory) { -this.setToRotation (theta); -var sin = this.m10; -var oneMinusCos = 1.0 - this.m00; -this.m02 = anchorx * oneMinusCos + anchory * sin; -this.m12 = anchory * oneMinusCos - anchorx * sin; -if (this.m02 != 0.0 || this.m12 != 0.0) { -this.state |= 1; -this.type |= 1; -}}, "~N,~N,~N"); -Clazz_defineMethod (c$, "setToRotation", -function (vecx, vecy) { -var sin; -var cos; -if (vecy == 0) { -sin = 0.0; -if (vecx < 0.0) { -cos = -1.0; -this.state = 2; -this.type = 8; -} else { -cos = 1.0; -this.state = 0; -this.type = 0; -}} else if (vecx == 0) { -cos = 0.0; -sin = (vecy > 0.0) ? 1.0 : -1.0; -this.state = 4; -this.type = 8; -} else { -var len = Math.sqrt (vecx * vecx + vecy * vecy); -cos = vecx / len; -sin = vecy / len; -this.state = 6; -this.type = 16; -}this.m00 = cos; -this.m10 = sin; -this.m01 = -sin; -this.m11 = cos; -this.m02 = 0.0; -this.m12 = 0.0; -}, "~N,~N"); -Clazz_defineMethod (c$, "setToRotation", -function (vecx, vecy, anchorx, anchory) { -this.setToRotation (vecx, vecy); -var sin = this.m10; -var oneMinusCos = 1.0 - this.m00; -this.m02 = anchorx * oneMinusCos + anchory * sin; -this.m12 = anchory * oneMinusCos - anchorx * sin; -if (this.m02 != 0.0 || this.m12 != 0.0) { -this.state |= 1; -this.type |= 1; -}}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setToQuadrantRotation", -function (numquadrants) { -switch (numquadrants & 3) { -case 0: -this.m00 = 1.0; -this.m10 = 0.0; -this.m01 = 0.0; -this.m11 = 1.0; -this.m02 = 0.0; -this.m12 = 0.0; -this.state = 0; -this.type = 0; -break; -case 1: -this.m00 = 0.0; -this.m10 = 1.0; -this.m01 = -1.0; -this.m11 = 0.0; -this.m02 = 0.0; -this.m12 = 0.0; -this.state = 4; -this.type = 8; -break; -case 2: -this.m00 = -1.0; -this.m10 = 0.0; -this.m01 = 0.0; -this.m11 = -1.0; -this.m02 = 0.0; -this.m12 = 0.0; -this.state = 2; -this.type = 8; -break; -case 3: -this.m00 = 0.0; -this.m10 = -1.0; -this.m01 = 1.0; -this.m11 = 0.0; -this.m02 = 0.0; -this.m12 = 0.0; -this.state = 4; -this.type = 8; -break; -} -}, "~N"); -Clazz_defineMethod (c$, "setToQuadrantRotation", -function (numquadrants, anchorx, anchory) { -switch (numquadrants & 3) { -case 0: -this.m00 = 1.0; -this.m10 = 0.0; -this.m01 = 0.0; -this.m11 = 1.0; -this.m02 = 0.0; -this.m12 = 0.0; -this.state = 0; -this.type = 0; -break; -case 1: -this.m00 = 0.0; -this.m10 = 1.0; -this.m01 = -1.0; -this.m11 = 0.0; -this.m02 = anchorx + anchory; -this.m12 = anchory - anchorx; -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 4; -this.type = 8; -} else { -this.state = 5; -this.type = 9; -}break; -case 2: -this.m00 = -1.0; -this.m10 = 0.0; -this.m01 = 0.0; -this.m11 = -1.0; -this.m02 = anchorx + anchorx; -this.m12 = anchory + anchory; -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 2; -this.type = 8; -} else { -this.state = 3; -this.type = 9; -}break; -case 3: -this.m00 = 0.0; -this.m10 = -1.0; -this.m01 = 1.0; -this.m11 = 0.0; -this.m02 = anchorx - anchory; -this.m12 = anchory + anchorx; -if (this.m02 == 0.0 && this.m12 == 0.0) { -this.state = 4; -this.type = 8; -} else { -this.state = 5; -this.type = 9; -}break; -} -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "setToScale", -function (sx, sy) { -this.m00 = sx; -this.m10 = 0.0; -this.m01 = 0.0; -this.m11 = sy; -this.m02 = 0.0; -this.m12 = 0.0; -if (sx != 1.0 || sy != 1.0) { -this.state = 2; -this.type = -1; -} else { -this.state = 0; -this.type = 0; -}}, "~N,~N"); -Clazz_defineMethod (c$, "setToShear", -function (shx, shy) { -this.m00 = 1.0; -this.m01 = shx; -this.m10 = shy; -this.m11 = 1.0; -this.m02 = 0.0; -this.m12 = 0.0; -if (shx != 0.0 || shy != 0.0) { -this.state = (6); -this.type = -1; -} else { -this.state = 0; -this.type = 0; -}}, "~N,~N"); -Clazz_defineMethod (c$, "setTransform", -function (Tx) { -this.m00 = Tx.m00; -this.m10 = Tx.m10; -this.m01 = Tx.m01; -this.m11 = Tx.m11; -this.m02 = Tx.m02; -this.m12 = Tx.m12; -this.state = Tx.state; -this.type = Tx.type; -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "setTransform", -function (m00, m10, m01, m11, m02, m12) { -this.m00 = m00; -this.m10 = m10; -this.m01 = m01; -this.m11 = m11; -this.m02 = m02; -this.m12 = m12; -this.updateState (); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "concatenate", -function (Tx) { -var M0; -var M1; -var T00; -var T01; -var T10; -var T11; -var T02; -var T12; -var mystate = this.state; -var txstate = Tx.state; -switch ((txstate << 3) | mystate) { -case (0): -case (1): -case (2): -case (3): -case (4): -case (5): -case (6): -case (7): -return; -case (56): -this.m01 = Tx.m01; -this.m10 = Tx.m10; -case (24): -this.m00 = Tx.m00; -this.m11 = Tx.m11; -case (8): -this.m02 = Tx.m02; -this.m12 = Tx.m12; -this.state = txstate; -this.type = Tx.type; -return; -case (48): -this.m01 = Tx.m01; -this.m10 = Tx.m10; -case (16): -this.m00 = Tx.m00; -this.m11 = Tx.m11; -this.state = txstate; -this.type = Tx.type; -return; -case (40): -this.m02 = Tx.m02; -this.m12 = Tx.m12; -case (32): -this.m01 = Tx.m01; -this.m10 = Tx.m10; -this.m00 = this.m11 = 0.0; -this.state = txstate; -this.type = Tx.type; -return; -case (15): -case (14): -case (13): -case (12): -case (11): -case (10): -case (9): -this.translate (Tx.m02, Tx.m12); -return; -case (23): -case (22): -case (21): -case (20): -case (19): -case (18): -case (17): -this.scale (Tx.m00, Tx.m11); -return; -case (39): -case (38): -T01 = Tx.m01; -T10 = Tx.m10; -M0 = this.m00; -this.m00 = this.m01 * T10; -this.m01 = M0 * T01; -M0 = this.m10; -this.m10 = this.m11 * T10; -this.m11 = M0 * T01; -this.type = -1; -return; -case (37): -case (36): -this.m00 = this.m01 * Tx.m10; -this.m01 = 0.0; -this.m11 = this.m10 * Tx.m01; -this.m10 = 0.0; -this.state = mystate ^ (6); -this.type = -1; -return; -case (35): -case (34): -this.m01 = this.m00 * Tx.m01; -this.m00 = 0.0; -this.m10 = this.m11 * Tx.m10; -this.m11 = 0.0; -this.state = mystate ^ (6); -this.type = -1; -return; -case (33): -this.m00 = 0.0; -this.m01 = Tx.m01; -this.m10 = Tx.m10; -this.m11 = 0.0; -this.state = 5; -this.type = -1; -return; -} -T00 = Tx.m00; -T01 = Tx.m01; -T02 = Tx.m02; -T10 = Tx.m10; -T11 = Tx.m11; -T12 = Tx.m12; -switch (mystate) { -default: -this.stateError (); -case (6): -this.state = mystate | txstate; -case (7): -M0 = this.m00; -M1 = this.m01; -this.m00 = T00 * M0 + T10 * M1; -this.m01 = T01 * M0 + T11 * M1; -this.m02 += T02 * M0 + T12 * M1; -M0 = this.m10; -M1 = this.m11; -this.m10 = T00 * M0 + T10 * M1; -this.m11 = T01 * M0 + T11 * M1; -this.m12 += T02 * M0 + T12 * M1; -this.type = -1; -return; -case (5): -case (4): -M0 = this.m01; -this.m00 = T10 * M0; -this.m01 = T11 * M0; -this.m02 += T12 * M0; -M0 = this.m10; -this.m10 = T00 * M0; -this.m11 = T01 * M0; -this.m12 += T02 * M0; -break; -case (3): -case (2): -M0 = this.m00; -this.m00 = T00 * M0; -this.m01 = T01 * M0; -this.m02 += T02 * M0; -M0 = this.m11; -this.m10 = T10 * M0; -this.m11 = T11 * M0; -this.m12 += T12 * M0; -break; -case (1): -this.m00 = T00; -this.m01 = T01; -this.m02 += T02; -this.m10 = T10; -this.m11 = T11; -this.m12 += T12; -this.state = txstate | 1; -this.type = -1; -return; -} -this.updateState (); -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "preConcatenate", -function (Tx) { -var M0; -var M1; -var T00; -var T01; -var T10; -var T11; -var T02; -var T12; -var mystate = this.state; -var txstate = Tx.state; -switch ((txstate << 3) | mystate) { -case (0): -case (1): -case (2): -case (3): -case (4): -case (5): -case (6): -case (7): -return; -case (8): -case (10): -case (12): -case (14): -this.m02 = Tx.m02; -this.m12 = Tx.m12; -this.state = mystate | 1; -this.type |= 1; -return; -case (9): -case (11): -case (13): -case (15): -this.m02 = this.m02 + Tx.m02; -this.m12 = this.m12 + Tx.m12; -return; -case (17): -case (16): -this.state = mystate | 2; -case (23): -case (22): -case (21): -case (20): -case (19): -case (18): -T00 = Tx.m00; -T11 = Tx.m11; -if ((mystate & 4) != 0) { -this.m01 = this.m01 * T00; -this.m10 = this.m10 * T11; -if ((mystate & 2) != 0) { -this.m00 = this.m00 * T00; -this.m11 = this.m11 * T11; -}} else { -this.m00 = this.m00 * T00; -this.m11 = this.m11 * T11; -}if ((mystate & 1) != 0) { -this.m02 = this.m02 * T00; -this.m12 = this.m12 * T11; -}this.type = -1; -return; -case (37): -case (36): -mystate = mystate | 2; -case (33): -case (32): -case (35): -case (34): -this.state = mystate ^ 4; -case (39): -case (38): -T01 = Tx.m01; -T10 = Tx.m10; -M0 = this.m00; -this.m00 = this.m10 * T01; -this.m10 = M0 * T10; -M0 = this.m01; -this.m01 = this.m11 * T01; -this.m11 = M0 * T10; -M0 = this.m02; -this.m02 = this.m12 * T01; -this.m12 = M0 * T10; -this.type = -1; -return; -} -T00 = Tx.m00; -T01 = Tx.m01; -T02 = Tx.m02; -T10 = Tx.m10; -T11 = Tx.m11; -T12 = Tx.m12; -switch (mystate) { -default: -this.stateError (); -case (7): -M0 = this.m02; -M1 = this.m12; -T02 += M0 * T00 + M1 * T01; -T12 += M0 * T10 + M1 * T11; -case (6): -this.m02 = T02; -this.m12 = T12; -M0 = this.m00; -M1 = this.m10; -this.m00 = M0 * T00 + M1 * T01; -this.m10 = M0 * T10 + M1 * T11; -M0 = this.m01; -M1 = this.m11; -this.m01 = M0 * T00 + M1 * T01; -this.m11 = M0 * T10 + M1 * T11; -break; -case (5): -M0 = this.m02; -M1 = this.m12; -T02 += M0 * T00 + M1 * T01; -T12 += M0 * T10 + M1 * T11; -case (4): -this.m02 = T02; -this.m12 = T12; -M0 = this.m10; -this.m00 = M0 * T01; -this.m10 = M0 * T11; -M0 = this.m01; -this.m01 = M0 * T00; -this.m11 = M0 * T10; -break; -case (3): -M0 = this.m02; -M1 = this.m12; -T02 += M0 * T00 + M1 * T01; -T12 += M0 * T10 + M1 * T11; -case (2): -this.m02 = T02; -this.m12 = T12; -M0 = this.m00; -this.m00 = M0 * T00; -this.m10 = M0 * T10; -M0 = this.m11; -this.m01 = M0 * T01; -this.m11 = M0 * T11; -break; -case (1): -M0 = this.m02; -M1 = this.m12; -T02 += M0 * T00 + M1 * T01; -T12 += M0 * T10 + M1 * T11; -case (0): -this.m02 = T02; -this.m12 = T12; -this.m00 = T00; -this.m10 = T10; -this.m01 = T01; -this.m11 = T11; -this.state = mystate | txstate; -this.type = -1; -return; -} -this.updateState (); -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "createInverse", -function () { -var det; -switch (this.state) { -default: -this.stateError (); -case (7): -det = this.m00 * this.m11 - this.m01 * this.m10; -if (Math.abs (det) <= 4.9E-324) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); -}return new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, (this.m01 * this.m12 - this.m11 * this.m02) / det, (this.m10 * this.m02 - this.m00 * this.m12) / det, (7)); -case (6): -det = this.m00 * this.m11 - this.m01 * this.m10; -if (Math.abs (det) <= 4.9E-324) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); -}return new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, 0.0, 0.0, (6)); -case (5): -if (this.m01 == 0.0 || this.m10 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}return new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, -this.m12 / this.m10, -this.m02 / this.m01, (5)); -case (4): -if (this.m01 == 0.0 || this.m10 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}return new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, 0.0, 0.0, (4)); -case (3): -if (this.m00 == 0.0 || this.m11 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}return new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, -this.m02 / this.m00, -this.m12 / this.m11, (3)); -case (2): -if (this.m00 == 0.0 || this.m11 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}return new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, 0.0, 0.0, (2)); -case (1): -return new java.awt.geom.AffineTransform (1.0, 0.0, 0.0, 1.0, -this.m02, -this.m12, (1)); -case (0): -return new java.awt.geom.AffineTransform (); -} -}); -Clazz_defineMethod (c$, "invert", -function () { -var M00; -var M01; -var M02; -var M10; -var M11; -var M12; -var det; -switch (this.state) { -default: -this.stateError (); -case (7): -M00 = this.m00; -M01 = this.m01; -M02 = this.m02; -M10 = this.m10; -M11 = this.m11; -M12 = this.m12; -det = M00 * M11 - M01 * M10; -if (Math.abs (det) <= 4.9E-324) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); -}this.m00 = M11 / det; -this.m10 = -M10 / det; -this.m01 = -M01 / det; -this.m11 = M00 / det; -this.m02 = (M01 * M12 - M11 * M02) / det; -this.m12 = (M10 * M02 - M00 * M12) / det; -break; -case (6): -M00 = this.m00; -M01 = this.m01; -M10 = this.m10; -M11 = this.m11; -det = M00 * M11 - M01 * M10; -if (Math.abs (det) <= 4.9E-324) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); -}this.m00 = M11 / det; -this.m10 = -M10 / det; -this.m01 = -M01 / det; -this.m11 = M00 / det; -break; -case (5): -M01 = this.m01; -M02 = this.m02; -M10 = this.m10; -M12 = this.m12; -if (M01 == 0.0 || M10 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}this.m10 = 1.0 / M01; -this.m01 = 1.0 / M10; -this.m02 = -M12 / M10; -this.m12 = -M02 / M01; -break; -case (4): -M01 = this.m01; -M10 = this.m10; -if (M01 == 0.0 || M10 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}this.m10 = 1.0 / M01; -this.m01 = 1.0 / M10; -break; -case (3): -M00 = this.m00; -M02 = this.m02; -M11 = this.m11; -M12 = this.m12; -if (M00 == 0.0 || M11 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}this.m00 = 1.0 / M00; -this.m11 = 1.0 / M11; -this.m02 = -M02 / M00; -this.m12 = -M12 / M11; -break; -case (2): -M00 = this.m00; -M11 = this.m11; -if (M00 == 0.0 || M11 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}this.m00 = 1.0 / M00; -this.m11 = 1.0 / M11; -break; -case (1): -this.m02 = -this.m02; -this.m12 = -this.m12; -break; -case (0): -break; -} -}); -Clazz_defineMethod (c$, "transform", -function (ptSrc, ptDst) { -if (ptDst == null) { -if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) { -ptDst = new java.awt.geom.Point2D.Double (); -} else { -ptDst = new java.awt.geom.Point2D.Float (); -}}var x = ptSrc.getX (); -var y = ptSrc.getY (); -switch (this.state) { -default: -this.stateError (); -case (7): -ptDst.setLocation (x * this.m00 + y * this.m01 + this.m02, x * this.m10 + y * this.m11 + this.m12); -return ptDst; -case (6): -ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11); -return ptDst; -case (5): -ptDst.setLocation (y * this.m01 + this.m02, x * this.m10 + this.m12); -return ptDst; -case (4): -ptDst.setLocation (y * this.m01, x * this.m10); -return ptDst; -case (3): -ptDst.setLocation (x * this.m00 + this.m02, y * this.m11 + this.m12); -return ptDst; -case (2): -ptDst.setLocation (x * this.m00, y * this.m11); -return ptDst; -case (1): -ptDst.setLocation (x + this.m02, y + this.m12); -return ptDst; -case (0): -ptDst.setLocation (x, y); -return ptDst; -} -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "transform", -function (srcPts, srcOff, dstPts, dstOff, numPts) { -if (numPts == 0) return; -if (!JU.AU.isAD (srcPts)) { -var src = srcPts; -var dst = dstPts; -this.transform (src, srcOff, dst, dstOff, numPts); -return; -}var M00; -var M01; -var M02; -var M10; -var M11; -var M12; -if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) { -System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); -srcOff = dstOff; -}switch (this.state) { -default: -this.stateError (); -case (7): -M00 = this.m00; -M01 = this.m01; -M02 = this.m02; -M10 = this.m10; -M11 = this.m11; -M12 = this.m12; -while (--numPts >= 0) { -var x = srcPts[srcOff++]; -var y = srcPts[srcOff++]; -dstPts[dstOff++] = M00 * x + M01 * y + M02; -dstPts[dstOff++] = M10 * x + M11 * y + M12; -} -return; -case (6): -M00 = this.m00; -M01 = this.m01; -M10 = this.m10; -M11 = this.m11; -while (--numPts >= 0) { -var x = srcPts[srcOff++]; -var y = srcPts[srcOff++]; -dstPts[dstOff++] = M00 * x + M01 * y; -dstPts[dstOff++] = M10 * x + M11 * y; -} -return; -case (5): -M01 = this.m01; -M02 = this.m02; -M10 = this.m10; -M12 = this.m12; -while (--numPts >= 0) { -var x = srcPts[srcOff++]; -dstPts[dstOff++] = M01 * srcPts[srcOff++] + M02; -dstPts[dstOff++] = M10 * x + M12; -} -return; -case (4): -M01 = this.m01; -M10 = this.m10; -while (--numPts >= 0) { -var x = srcPts[srcOff++]; -dstPts[dstOff++] = M01 * srcPts[srcOff++]; -dstPts[dstOff++] = M10 * x; -} -return; -case (3): -M00 = this.m00; -M02 = this.m02; -M11 = this.m11; -M12 = this.m12; -while (--numPts >= 0) { -dstPts[dstOff++] = M00 * srcPts[srcOff++] + M02; -dstPts[dstOff++] = M11 * srcPts[srcOff++] + M12; -} -return; -case (2): -M00 = this.m00; -M11 = this.m11; -while (--numPts >= 0) { -dstPts[dstOff++] = M00 * srcPts[srcOff++]; -dstPts[dstOff++] = M11 * srcPts[srcOff++]; -} -return; -case (1): -M02 = this.m02; -M12 = this.m12; -while (--numPts >= 0) { -dstPts[dstOff++] = srcPts[srcOff++] + M02; -dstPts[dstOff++] = srcPts[srcOff++] + M12; -} -return; -case (0): -if (srcPts !== dstPts || srcOff != dstOff) { -System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); -}return; -} -}, "~A,~N,~A,~N,~N"); -Clazz_defineMethod (c$, "inverseTransform", -function (ptSrc, ptDst) { -if (ptDst == null) { -if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) { -ptDst = new java.awt.geom.Point2D.Double (); -} else { -ptDst = new java.awt.geom.Point2D.Float (); -}}var x = ptSrc.getX (); -var y = ptSrc.getY (); -switch (this.state) { -default: -this.stateError (); -case (7): -x -= this.m02; -y -= this.m12; -case (6): -var det = this.m00 * this.m11 - this.m01 * this.m10; -if (Math.abs (det) <= 4.9E-324) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); -}ptDst.setLocation ((x * this.m11 - y * this.m01) / det, (y * this.m00 - x * this.m10) / det); -return ptDst; -case (5): -x -= this.m02; -y -= this.m12; -case (4): -if (this.m01 == 0.0 || this.m10 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}ptDst.setLocation (y / this.m10, x / this.m01); -return ptDst; -case (3): -x -= this.m02; -y -= this.m12; -case (2): -if (this.m00 == 0.0 || this.m11 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}ptDst.setLocation (x / this.m00, y / this.m11); -return ptDst; -case (1): -ptDst.setLocation (x - this.m02, y - this.m12); -return ptDst; -case (0): -ptDst.setLocation (x, y); -return ptDst; -} -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "inverseTransform", -function (srcPts, srcOff, dstPts, dstOff, numPts) { -var M00; -var M01; -var M02; -var M10; -var M11; -var M12; -var det; -if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) { -System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); -srcOff = dstOff; -}switch (this.state) { -default: -this.stateError (); -case (7): -M00 = this.m00; -M01 = this.m01; -M02 = this.m02; -M10 = this.m10; -M11 = this.m11; -M12 = this.m12; -det = M00 * M11 - M01 * M10; -if (Math.abs (det) <= 4.9E-324) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); -}while (--numPts >= 0) { -var x = srcPts[srcOff++] - M02; -var y = srcPts[srcOff++] - M12; -dstPts[dstOff++] = (x * M11 - y * M01) / det; -dstPts[dstOff++] = (y * M00 - x * M10) / det; -} -return; -case (6): -M00 = this.m00; -M01 = this.m01; -M10 = this.m10; -M11 = this.m11; -det = M00 * M11 - M01 * M10; -if (Math.abs (det) <= 4.9E-324) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det); -}while (--numPts >= 0) { -var x = srcPts[srcOff++]; -var y = srcPts[srcOff++]; -dstPts[dstOff++] = (x * M11 - y * M01) / det; -dstPts[dstOff++] = (y * M00 - x * M10) / det; -} -return; -case (5): -M01 = this.m01; -M02 = this.m02; -M10 = this.m10; -M12 = this.m12; -if (M01 == 0.0 || M10 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}while (--numPts >= 0) { -var x = srcPts[srcOff++] - M02; -dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M10; -dstPts[dstOff++] = x / M01; -} -return; -case (4): -M01 = this.m01; -M10 = this.m10; -if (M01 == 0.0 || M10 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}while (--numPts >= 0) { -var x = srcPts[srcOff++]; -dstPts[dstOff++] = srcPts[srcOff++] / M10; -dstPts[dstOff++] = x / M01; -} -return; -case (3): -M00 = this.m00; -M02 = this.m02; -M11 = this.m11; -M12 = this.m12; -if (M00 == 0.0 || M11 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}while (--numPts >= 0) { -dstPts[dstOff++] = (srcPts[srcOff++] - M02) / M00; -dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M11; -} -return; -case (2): -M00 = this.m00; -M11 = this.m11; -if (M00 == 0.0 || M11 == 0.0) { -throw new java.awt.geom.NoninvertibleTransformException ("Determinant is 0"); -}while (--numPts >= 0) { -dstPts[dstOff++] = srcPts[srcOff++] / M00; -dstPts[dstOff++] = srcPts[srcOff++] / M11; -} -return; -case (1): -M02 = this.m02; -M12 = this.m12; -while (--numPts >= 0) { -dstPts[dstOff++] = srcPts[srcOff++] - M02; -dstPts[dstOff++] = srcPts[srcOff++] - M12; -} -return; -case (0): -if (srcPts !== dstPts || srcOff != dstOff) { -System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); -}return; -} -}, "~A,~N,~A,~N,~N"); -Clazz_defineMethod (c$, "deltaTransform", -function (ptSrc, ptDst) { -if (ptDst == null) { -if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) { -ptDst = new java.awt.geom.Point2D.Double (); -} else { -ptDst = new java.awt.geom.Point2D.Float (); -}}var x = ptSrc.getX (); -var y = ptSrc.getY (); -switch (this.state) { -default: -this.stateError (); -case (7): -case (6): -ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11); -return ptDst; -case (5): -case (4): -ptDst.setLocation (y * this.m01, x * this.m10); -return ptDst; -case (3): -case (2): -ptDst.setLocation (x * this.m00, y * this.m11); -return ptDst; -case (1): -case (0): -ptDst.setLocation (x, y); -return ptDst; -} -}, "java.awt.geom.Point2D,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "deltaTransform", -function (srcPts, srcOff, dstPts, dstOff, numPts) { -var M00; -var M01; -var M10; -var M11; -if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) { -System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); -srcOff = dstOff; -}switch (this.state) { -default: -this.stateError (); -case (7): -case (6): -M00 = this.m00; -M01 = this.m01; -M10 = this.m10; -M11 = this.m11; -while (--numPts >= 0) { -var x = srcPts[srcOff++]; -var y = srcPts[srcOff++]; -dstPts[dstOff++] = x * M00 + y * M01; -dstPts[dstOff++] = x * M10 + y * M11; -} -return; -case (5): -case (4): -M01 = this.m01; -M10 = this.m10; -while (--numPts >= 0) { -var x = srcPts[srcOff++]; -dstPts[dstOff++] = srcPts[srcOff++] * M01; -dstPts[dstOff++] = x * M10; -} -return; -case (3): -case (2): -M00 = this.m00; -M11 = this.m11; -while (--numPts >= 0) { -dstPts[dstOff++] = srcPts[srcOff++] * M00; -dstPts[dstOff++] = srcPts[srcOff++] * M11; -} -return; -case (1): -case (0): -if (srcPts !== dstPts || srcOff != dstOff) { -System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2); -}return; -} -}, "~A,~N,~A,~N,~N"); -Clazz_defineMethod (c$, "createTransformedShape", -function (pSrc) { -if (pSrc == null) { -return null; -}return new java.awt.geom.Path2D.Double (pSrc, this); -}, "java.awt.Shape"); -c$._matround = Clazz_defineMethod (c$, "_matround", - function (matval) { -return Math.rint (matval * 1E15) / 1E15; -}, "~N"); -Clazz_overrideMethod (c$, "toString", -function () { -return ("AffineTransform[[" + java.awt.geom.AffineTransform._matround (this.m00) + ", " + java.awt.geom.AffineTransform._matround (this.m01) + ", " + java.awt.geom.AffineTransform._matround (this.m02) + "], [" + java.awt.geom.AffineTransform._matround (this.m10) + ", " + java.awt.geom.AffineTransform._matround (this.m11) + ", " + java.awt.geom.AffineTransform._matround (this.m12) + "]]"); -}); -Clazz_defineMethod (c$, "isIdentity", -function () { -return (this.state == 0 || (this.getType () == 0)); -}); -Clazz_defineMethod (c$, "clone", -function () { -try { -return Clazz_superCall (this, java.awt.geom.AffineTransform, "clone", []); -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -throw new InternalError (); -} else { -throw e; -} -} -}); -Clazz_overrideMethod (c$, "hashCode", -function () { -var bits = Double.doubleToLongBits (this.m00); -bits = bits * 31 + Double.doubleToLongBits (this.m01); -bits = bits * 31 + Double.doubleToLongBits (this.m02); -bits = bits * 31 + Double.doubleToLongBits (this.m10); -bits = bits * 31 + Double.doubleToLongBits (this.m11); -bits = bits * 31 + Double.doubleToLongBits (this.m12); -return ((bits) ^ ((bits >> 32))); -}); -Clazz_overrideMethod (c$, "equals", -function (obj) { -if (!(Clazz_instanceOf (obj, java.awt.geom.AffineTransform))) { -return false; -}var a = obj; -return ((this.m00 == a.m00) && (this.m01 == a.m01) && (this.m02 == a.m02) && (this.m10 == a.m10) && (this.m11 == a.m11) && (this.m12 == a.m12)); -}, "~O"); -Clazz_defineStatics (c$, -"TYPE_UNKNOWN", -1, -"TYPE_IDENTITY", 0, -"TYPE_TRANSLATION", 1, -"TYPE_UNIFORM_SCALE", 2, -"TYPE_GENERAL_SCALE", 4, -"TYPE_MASK_SCALE", (6), -"TYPE_FLIP", 64, -"TYPE_QUADRANT_ROTATION", 8, -"TYPE_GENERAL_ROTATION", 16, -"TYPE_MASK_ROTATION", (24), -"TYPE_GENERAL_TRANSFORM", 32, -"APPLY_IDENTITY", 0, -"APPLY_TRANSLATE", 1, -"APPLY_SCALE", 2, -"APPLY_SHEAR", 4, -"HI_SHIFT", 3, -"HI_IDENTITY", 0, -"HI_TRANSLATE", 8, -"HI_SCALE", 16, -"HI_SHEAR", 32, -"rot90conversion", Clazz_newIntArray (-1, [4, 5, 4, 5, 2, 3, 6, 7])); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.lang.Exception"], "java.awt.geom.NoninvertibleTransformException", null, function () { -c$ = Clazz_declareType (java.awt.geom, "NoninvertibleTransformException", Exception); -}); -Clazz_declarePackage ("java.awt.geom"); -Clazz_load (["java.awt.Shape", "java.awt.geom.PathIterator"], "java.awt.geom.Path2D", ["java.lang.Double", "$.IllegalArgumentException", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.IllegalPathStateException", "$.Point2D", "$.Rectangle2D", "jssun.awt.geom.Curve"], function () { -c$ = Clazz_decorateAsClass (function () { -this.pointTypes = null; -this.numTypes = 0; -this.numCoords = 0; -this.windingRule = 0; -Clazz_instantialize (this, arguments); -}, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_makeConstructor (c$, -function (rule, initialTypes) { -this.setWindingRule (rule); -this.pointTypes = Clazz_newByteArray (initialTypes, 0); -}, "~N,~N"); -Clazz_defineMethod (c$, "closePath", -function () { -if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) { -this.needRoom (true, 0); -this.pointTypes[this.numTypes++] = 4; -}}); -Clazz_defineMethod (c$, "append", -function (s, connect) { -this.append (s.getPathIterator (null), connect); -}, "java.awt.Shape,~B"); -Clazz_defineMethod (c$, "getWindingRule", -function () { -return this.windingRule; -}); -Clazz_defineMethod (c$, "setWindingRule", -function (rule) { -if (rule != 0 && rule != 1) { -throw new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO"); -}this.windingRule = rule; -}, "~N"); -Clazz_defineMethod (c$, "getCurrentPoint", -function () { -var index = this.numCoords; -if (this.numTypes < 1 || index < 1) { -return null; -}if (this.pointTypes[this.numTypes - 1] == 4) { -loop : for (var i = this.numTypes - 2; i > 0; i--) { -switch (this.pointTypes[i]) { -case 0: -break loop; -case 1: -index -= 2; -break; -case 2: -index -= 4; -break; -case 3: -index -= 6; -break; -case 4: -break; -} -} -}return this.getPoint (index - 2); -}); -Clazz_defineMethod (c$, "reset", -function () { -this.numTypes = this.numCoords = 0; -}); -Clazz_defineMethod (c$, "createTransformedShape", -function (at) { -var p2d = this.clone (); -if (at != null) { -p2d.transform (at); -}return p2d; -}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getBounds", -function () { -return this.getBounds2D ().getBounds (); -}); -c$.contains = Clazz_defineMethod (c$, "contains", -function (pi, x, y) { -if (x * 0.0 + y * 0.0 == 0.0) { -var mask = (pi.getWindingRule () == 1 ? -1 : 1); -var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y); -return ((cross & mask) != 0); -} else { -return false; -}}, "java.awt.geom.PathIterator,~N,~N"); -c$.contains = Clazz_defineMethod (c$, "contains", -function (pi, p) { -return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ()); -}, "java.awt.geom.PathIterator,java.awt.geom.Point2D"); -Clazz_defineMethod (c$, "contains", -function (x, y) { -if (x * 0.0 + y * 0.0 == 0.0) { -if (this.numTypes < 2) { -return false; -}var mask = (this.windingRule == 1 ? -1 : 1); -return ((this.pointCrossings (x, y) & mask) != 0); -} else { -return false; -}}, "~N,~N"); -Clazz_defineMethod (c$, "contains", -function (p) { -return this.contains (p.getX (), p.getY ()); -}, "java.awt.geom.Point2D"); -c$.contains = Clazz_defineMethod (c$, "contains", -function (pi, x, y, w, h) { -if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { -return false; -}if (w <= 0 || h <= 0) { -return false; -}var mask = (pi.getWindingRule () == 1 ? -1 : 2); -var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h); -return (crossings != -2147483648 && (crossings & mask) != 0); -}, "java.awt.geom.PathIterator,~N,~N,~N,~N"); -c$.contains = Clazz_defineMethod (c$, "contains", -function (pi, r) { -return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "contains", -function (x, y, w, h) { -if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { -return false; -}if (w <= 0 || h <= 0) { -return false; -}var mask = (this.windingRule == 1 ? -1 : 2); -var crossings = this.rectCrossings (x, y, x + w, y + h); -return (crossings != -2147483648 && (crossings & mask) != 0); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "contains", -function (r) { -return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -c$.intersects = Clazz_defineMethod (c$, "intersects", -function (pi, x, y, w, h) { -if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { -return false; -}if (w <= 0 || h <= 0) { -return false; -}var mask = (pi.getWindingRule () == 1 ? -1 : 2); -var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h); -return (crossings == -2147483648 || (crossings & mask) != 0); -}, "java.awt.geom.PathIterator,~N,~N,~N,~N"); -c$.intersects = Clazz_defineMethod (c$, "intersects", -function (pi, r) { -return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D"); -Clazz_defineMethod (c$, "intersects", -function (x, y, w, h) { -if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) { -return false; -}if (w <= 0 || h <= 0) { -return false; -}var mask = (this.windingRule == 1 ? -1 : 2); -var crossings = this.rectCrossings (x, y, x + w, y + h); -return (crossings == -2147483648 || (crossings & mask) != 0); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "intersects", -function (r) { -return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); -}, "java.awt.geom.Rectangle2D"); -Clazz_overrideMethod (c$, "getPathIterator", -function (at, flatness) { -return new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness); -}, "java.awt.geom.AffineTransform,~N"); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.typeIdx = 0; -this.pointIdx = 0; -this.path = null; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator); -Clazz_makeConstructor (c$, -function (a) { -this.path = a; -}, "java.awt.geom.Path2D"); -Clazz_overrideMethod (c$, "getWindingRule", -function () { -return this.path.getWindingRule (); -}); -Clazz_overrideMethod (c$, "isDone", -function () { -return (this.typeIdx >= this.path.numTypes); -}); -Clazz_overrideMethod (c$, "next", -function () { -var a = this.path.pointTypes[this.typeIdx++]; -this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a]; -}); -Clazz_defineStatics (c$, -"curvecoords", Clazz_newIntArray (-1, [2, 2, 4, 6, 0])); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.floatCoords = null; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D); -Clazz_makeConstructor (c$, -function () { -this.construct (1, 20); -}); -Clazz_makeConstructor (c$, -function (a) { -this.construct (a, 20); -}, "~N"); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []); -this.setWindingRule (a); -this.pointTypes = Clazz_newByteArray (b, 0); -this.floatCoords = Clazz_newFloatArray (b * 2, 0); -}, "~N,~N"); -Clazz_makeConstructor (c$, -function (a) { -this.construct (a, null); -}, "java.awt.Shape"); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []); -this.setPath (a, b); -}, "java.awt.Shape,java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "setPath", - function (a, b) { -if (Clazz_instanceOf (a, java.awt.geom.Path2D)) { -var c = a; -this.setWindingRule (c.windingRule); -this.numTypes = c.numTypes; -this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length); -this.numCoords = c.numCoords; -this.floatCoords = c.cloneCoordsFloat (b); -} else { -var c = a.getPathIterator (b); -this.setWindingRule (c.getWindingRule ()); -this.pointTypes = Clazz_newByteArray (20, 0); -this.floatCoords = Clazz_newFloatArray (40, 0); -this.append (c, false); -}}, "java.awt.Shape,java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "cloneCoordsFloat", -function (a) { -var b; -if (a == null) { -b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length); -} else { -b = Clazz_newFloatArray (this.floatCoords.length, 0); -a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); -}return b; -}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "cloneCoordsDouble", -function (a) { -var b = Clazz_newDoubleArray (this.floatCoords.length, 0); -if (a == null) { -for (var c = 0; c < this.numCoords; c++) { -b[c] = this.floatCoords[c]; -} -} else { -a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); -}return b; -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "append", -function (a, b) { -{ -if (typeof pi == "number") { -this.floatCoords[this.numCoords++] = pi; -this.floatCoords[this.numCoords++] = connect; -return; -} -}var c = Clazz_newFloatArray (6, 0); -while (!a.isDone ()) { -switch (a.currentSegment (c)) { -case 0: -if (!b || this.numTypes < 1 || this.numCoords < 1) { -this.moveTo (c[0], c[1]); -break; -}if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) { -break; -}case 1: -this.lineTo (c[0], c[1]); -break; -case 2: -this.quadTo (c[0], c[1], c[2], c[3]); -break; -case 3: -this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]); -break; -case 4: -this.closePath (); -break; -} -a.next (); -b = false; -} -}, "java.awt.geom.PathIterator,~B"); -Clazz_overrideMethod (c$, "getPoint", -function (a) { -return new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]); -}, "~N"); -Clazz_overrideMethod (c$, "needRoom", -function (a, b) { -if (a && this.numTypes == 0) { -throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); -}var c = this.pointTypes.length; -if (this.numTypes >= c) { -var d = c; -if (d > 500) { -d = 500; -}this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d); -}c = this.floatCoords.length; -if (this.numCoords + b > c) { -var d = c; -if (d > 1000) { -d = 1000; -}if (d < b) { -d = b; -}this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d); -}}, "~B,~N"); -Clazz_defineMethod (c$, "moveTo", -function (a, b) { -if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) { -this.floatCoords[this.numCoords - 2] = a; -this.floatCoords[this.numCoords - 1] = b; -} else { -this.needRoom (false, 2); -this.pointTypes[this.numTypes++] = 0; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -}}, "~N,~N"); -Clazz_defineMethod (c$, "moveTo", -function (a, b) { -if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) { -this.floatCoords[this.numCoords - 2] = a; -this.floatCoords[this.numCoords - 1] = b; -} else { -this.needRoom (false, 2); -this.pointTypes[this.numTypes++] = 0; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -}}, "~N,~N"); -Clazz_defineMethod (c$, "lineTo", -function (a, b) { -this.needRoom (true, 2); -this.pointTypes[this.numTypes++] = 1; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -}, "~N,~N"); -Clazz_defineMethod (c$, "lineTo", -function (a, b) { -this.needRoom (true, 2); -this.pointTypes[this.numTypes++] = 1; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -}, "~N,~N"); -Clazz_defineMethod (c$, "quadTo", -function (a, b, c, d) { -this.needRoom (true, 4); -this.pointTypes[this.numTypes++] = 2; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -this.floatCoords[this.numCoords++] = c; -this.floatCoords[this.numCoords++] = d; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "quadTo", -function (a, b, c, d) { -this.needRoom (true, 4); -this.pointTypes[this.numTypes++] = 2; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -this.floatCoords[this.numCoords++] = c; -this.floatCoords[this.numCoords++] = d; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "curveTo", -function (a, b, c, d, e, f) { -this.needRoom (true, 6); -this.pointTypes[this.numTypes++] = 3; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -this.floatCoords[this.numCoords++] = c; -this.floatCoords[this.numCoords++] = d; -this.floatCoords[this.numCoords++] = e; -this.floatCoords[this.numCoords++] = f; -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "curveTo", -function (a, b, c, d, e, f) { -this.needRoom (true, 6); -this.pointTypes[this.numTypes++] = 3; -this.floatCoords[this.numCoords++] = a; -this.floatCoords[this.numCoords++] = b; -this.floatCoords[this.numCoords++] = c; -this.floatCoords[this.numCoords++] = d; -this.floatCoords[this.numCoords++] = e; -this.floatCoords[this.numCoords++] = f; -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "pointCrossings", -function (a, b) { -var c; -var d; -var e; -var f; -var g; -var h; -var i = this.floatCoords; -e = c = i[0]; -f = d = i[1]; -var j = 0; -var k = 2; -for (var l = 1; l < this.numTypes; l++) { -switch (this.pointTypes[l]) { -case 0: -if (f != d) { -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); -}c = e = i[k++]; -d = f = i[k++]; -break; -case 1: -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]); -e = g; -f = h; -break; -case 2: -j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0); -e = g; -f = h; -break; -case 3: -j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0); -e = g; -f = h; -break; -case 4: -if (f != d) { -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); -}e = c; -f = d; -break; -} -} -if (f != d) { -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); -}return j; -}, "~N,~N"); -Clazz_overrideMethod (c$, "rectCrossings", -function (a, b, c, d) { -var e = this.floatCoords; -var f; -var g; -var h; -var i; -var j; -var k; -f = h = e[0]; -g = i = e[1]; -var l = 0; -var m = 2; -for (var n = 1; l != -2147483648 && n < this.numTypes; n++) { -switch (this.pointTypes[n]) { -case 0: -if (f != h || g != i) { -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); -}h = f = e[m++]; -i = g = e[m++]; -break; -case 1: -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]); -f = j; -g = k; -break; -case 2: -l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0); -f = j; -g = k; -break; -case 3: -l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0); -f = j; -g = k; -break; -case 4: -if (f != h || g != i) { -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); -}f = h; -g = i; -break; -} -} -if (l != -2147483648 && (f != h || g != i)) { -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); -}return l; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "transform", -function (a) { -a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz_doubleToInt (this.numCoords / 2)); -}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a; -var b; -var c; -var d; -var e = this.numCoords; -if (e > 0) { -b = d = this.floatCoords[--e]; -a = c = this.floatCoords[--e]; -while (e > 0) { -var f = this.floatCoords[--e]; -var g = this.floatCoords[--e]; -if (g < a) a = g; -if (f < b) b = f; -if (g > c) c = g; -if (f > d) d = f; -} -} else { -a = b = c = d = 0.0; -}return new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b); -}); -Clazz_defineMethod (c$, "getPathIterator", -function (a) { -if (a == null) { -return new java.awt.geom.Path2D.Float.CopyIterator (this); -} else { -return new java.awt.geom.Path2D.Float.TxIterator (this, a); -}}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "clone", -function () { -return new java.awt.geom.Path2D.Float (this); -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.floatCoords = null; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]); -this.floatCoords = a.floatCoords; -}, "java.awt.geom.Path2D.Float"); -Clazz_defineMethod (c$, "currentSegment", -function (a) { -var b = this.path.pointTypes[this.typeIdx]; -var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; -if (c > 0) { -for (var d = 0; d < c; d++) { -a[d] = this.floatCoords[this.pointIdx + d]; -} -}return b; -}, "~A"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.floatCoords = null; -this.affine = null; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]); -this.floatCoords = a.floatCoords; -this.affine = b; -}, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "currentSegment", -function (a) { -var b = this.path.pointTypes[this.typeIdx]; -var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; -if (c > 0) { -this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2)); -}return b; -}, "~A"); -c$ = Clazz_p0p (); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.doubleCoords = null; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D); -Clazz_makeConstructor (c$, -function () { -this.construct (1, 20); -}); -Clazz_makeConstructor (c$, -function (a) { -this.construct (a, 20); -}, "~N"); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Double, [a, b]); -this.doubleCoords = Clazz_newDoubleArray (b * 2, 0); -}, "~N,~N"); -Clazz_makeConstructor (c$, -function (a) { -this.construct (a, null); -}, "java.awt.Shape"); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Double, []); -if (Clazz_instanceOf (a, java.awt.geom.Path2D)) { -var c = a; -this.setWindingRule (c.windingRule); -this.numTypes = c.numTypes; -this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length); -this.numCoords = c.numCoords; -this.doubleCoords = c.cloneCoordsDouble (b); -} else { -var c = a.getPathIterator (b); -this.setWindingRule (c.getWindingRule ()); -this.pointTypes = Clazz_newByteArray (20, 0); -this.doubleCoords = Clazz_newDoubleArray (40, 0); -this.append (c, false); -}}, "java.awt.Shape,java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "cloneCoordsFloat", -function (a) { -var b = Clazz_newFloatArray (this.doubleCoords.length, 0); -if (a == null) { -for (var c = 0; c < this.numCoords; c++) { -b[c] = this.doubleCoords[c]; -} -} else { -a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); -}return b; -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "cloneCoordsDouble", -function (a) { -var b; -if (a == null) { -b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length); -} else { -b = Clazz_newDoubleArray (this.doubleCoords.length, 0); -a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2)); -}return b; -}, "java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "append", -function (a, b) { -{ -if (typeof pi == "number") { -this.floatCoords[this.numCoords++] = pi; -this.floatCoords[this.numCoords++] = connect; -return; -} -}var c = Clazz_newDoubleArray (6, 0); -while (!a.isDone ()) { -switch (a.currentSegment (c)) { -case 0: -if (!b || this.numTypes < 1 || this.numCoords < 1) { -this.moveTo (c[0], c[1]); -break; -}if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) { -break; -}case 1: -this.lineTo (c[0], c[1]); -break; -case 2: -this.quadTo (c[0], c[1], c[2], c[3]); -break; -case 3: -this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]); -break; -case 4: -this.closePath (); -break; -} -a.next (); -b = false; -} -}, "java.awt.geom.PathIterator,~B"); -Clazz_overrideMethod (c$, "getPoint", -function (a) { -return new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]); -}, "~N"); -Clazz_overrideMethod (c$, "needRoom", -function (a, b) { -if (a && this.numTypes == 0) { -throw new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition"); -}var c = this.pointTypes.length; -if (this.numTypes >= c) { -var d = c; -if (d > 500) { -d = 500; -}this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d); -}c = this.doubleCoords.length; -if (this.numCoords + b > c) { -var d = c; -if (d > 1000) { -d = 1000; -}if (d < b) { -d = b; -}this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d); -}}, "~B,~N"); -Clazz_overrideMethod (c$, "moveTo", -function (a, b) { -if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) { -this.doubleCoords[this.numCoords - 2] = a; -this.doubleCoords[this.numCoords - 1] = b; -} else { -this.needRoom (false, 2); -this.pointTypes[this.numTypes++] = 0; -this.doubleCoords[this.numCoords++] = a; -this.doubleCoords[this.numCoords++] = b; -}}, "~N,~N"); -Clazz_overrideMethod (c$, "lineTo", -function (a, b) { -this.needRoom (true, 2); -this.pointTypes[this.numTypes++] = 1; -this.doubleCoords[this.numCoords++] = a; -this.doubleCoords[this.numCoords++] = b; -}, "~N,~N"); -Clazz_overrideMethod (c$, "quadTo", -function (a, b, c, d) { -this.needRoom (true, 4); -this.pointTypes[this.numTypes++] = 2; -this.doubleCoords[this.numCoords++] = a; -this.doubleCoords[this.numCoords++] = b; -this.doubleCoords[this.numCoords++] = c; -this.doubleCoords[this.numCoords++] = d; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "curveTo", -function (a, b, c, d, e, f) { -this.needRoom (true, 6); -this.pointTypes[this.numTypes++] = 3; -this.doubleCoords[this.numCoords++] = a; -this.doubleCoords[this.numCoords++] = b; -this.doubleCoords[this.numCoords++] = c; -this.doubleCoords[this.numCoords++] = d; -this.doubleCoords[this.numCoords++] = e; -this.doubleCoords[this.numCoords++] = f; -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "pointCrossings", -function (a, b) { -var c; -var d; -var e; -var f; -var g; -var h; -var i = this.doubleCoords; -e = c = i[0]; -f = d = i[1]; -var j = 0; -var k = 2; -for (var l = 1; l < this.numTypes; l++) { -switch (this.pointTypes[l]) { -case 0: -if (f != d) { -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); -}c = e = i[k++]; -d = f = i[k++]; -break; -case 1: -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]); -e = g; -f = h; -break; -case 2: -j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0); -e = g; -f = h; -break; -case 3: -j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0); -e = g; -f = h; -break; -case 4: -if (f != d) { -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); -}e = c; -f = d; -break; -} -} -if (f != d) { -j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d); -}return j; -}, "~N,~N"); -Clazz_overrideMethod (c$, "rectCrossings", -function (a, b, c, d) { -var e = this.doubleCoords; -var f; -var g; -var h; -var i; -var j; -var k; -f = h = e[0]; -g = i = e[1]; -var l = 0; -var m = 2; -for (var n = 1; l != -2147483648 && n < this.numTypes; n++) { -switch (this.pointTypes[n]) { -case 0: -if (f != h || g != i) { -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); -}h = f = e[m++]; -i = g = e[m++]; -break; -case 1: -j = e[m++]; -k = e[m++]; -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k); -f = j; -g = k; -break; -case 2: -l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0); -f = j; -g = k; -break; -case 3: -l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0); -f = j; -g = k; -break; -case 4: -if (f != h || g != i) { -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); -}f = h; -g = i; -break; -} -} -if (l != -2147483648 && (f != h || g != i)) { -l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i); -}return l; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "transform", -function (a) { -a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz_doubleToInt (this.numCoords / 2)); -}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getBounds2D", -function () { -var a; -var b; -var c; -var d; -var e = this.numCoords; -if (e > 0) { -b = d = this.doubleCoords[--e]; -a = c = this.doubleCoords[--e]; -while (e > 0) { -var f = this.doubleCoords[--e]; -var g = this.doubleCoords[--e]; -if (g < a) a = g; -if (f < b) b = f; -if (g > c) c = g; -if (f > d) d = f; -} -} else { -a = b = c = d = 0.0; -}return new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b); -}); -Clazz_defineMethod (c$, "getPathIterator", -function (a) { -if (a == null) { -return new java.awt.geom.Path2D.Double.CopyIterator (this); -} else { -return new java.awt.geom.Path2D.Double.TxIterator (this, a); -}}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "clone", -function () { -return new java.awt.geom.Path2D.Double (this); -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.doubleCoords = null; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]); -this.doubleCoords = a.doubleCoords; -}, "java.awt.geom.Path2D.Double"); -Clazz_defineMethod (c$, "currentSegment", -function (a) { -var b = this.path.pointTypes[this.typeIdx]; -var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; -if (c > 0) { -for (var d = 0; d < c; d++) { -a[d] = this.doubleCoords[this.pointIdx + d]; -} -}return b; -}, "~A"); -Clazz_defineMethod (c$, "currentSegment", -function (a) { -var b = this.path.pointTypes[this.typeIdx]; -var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; -if (c > 0) { -System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c); -}return b; -}, "~A"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.doubleCoords = null; -this.affine = null; -Clazz_instantialize (this, arguments); -}, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]); -this.doubleCoords = a.doubleCoords; -this.affine = b; -}, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform"); -Clazz_defineMethod (c$, "currentSegment", -function (a) { -var b = this.path.pointTypes[this.typeIdx]; -var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; -if (c > 0) { -this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2)); -}return b; -}, "~A"); -Clazz_defineMethod (c$, "currentSegment", -function (a) { -var b = this.path.pointTypes[this.typeIdx]; -var c = java.awt.geom.Path2D.Iterator.curvecoords[b]; -if (c > 0) { -this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2)); -}return b; -}, "~A"); -c$ = Clazz_p0p (); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"WIND_EVEN_ODD", 0, -"WIND_NON_ZERO", 1, -"SEG_MOVETO", 0, -"SEG_LINETO", 1, -"SEG_QUADTO", 2, -"SEG_CUBICTO", 3, -"SEG_CLOSE", 4, -"INIT_SIZE", 20, -"EXPAND_MAX", 500); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_declareInterface (javax.swing, "Icon"); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JTextField"], "javax.swing.JPasswordField", ["javax.swing.text.Segment"], function () { -c$ = Clazz_decorateAsClass (function () { -this.echoChar = '\0'; -this.echoCharSet = false; -Clazz_instantialize (this, arguments); -}, javax.swing, "JPasswordField", javax.swing.JTextField); -Clazz_makeConstructor (c$, -function () { -this.construct (null, null, 0); -}); -Clazz_makeConstructor (c$, -function (text) { -this.construct (null, text, 0); -}, "~S"); -Clazz_makeConstructor (c$, -function (columns) { -this.construct (null, null, columns); -}, "~N"); -Clazz_makeConstructor (c$, -function (text, columns) { -this.construct (null, text, columns); -}, "~S,~N"); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "PasswordFieldUI"; -}); -Clazz_defineMethod (c$, "updateUI", -function () { -if (!this.echoCharSet) { -this.echoChar = '*'; -}Clazz_superCall (this, javax.swing.JPasswordField, "updateUI", []); -}); -Clazz_defineMethod (c$, "getEchoChar", -function () { -return this.echoChar; -}); -Clazz_defineMethod (c$, "setEchoChar", -function (c) { -this.echoChar = c; -this.echoCharSet = true; -this.repaint (); -this.revalidate (); -}, "~S"); -Clazz_defineMethod (c$, "echoCharIsSet", -function () { -return this.echoChar.charCodeAt (0) != 0; -}); -Clazz_overrideMethod (c$, "cut", -function () { -}); -Clazz_overrideMethod (c$, "copy", -function () { -}); -Clazz_defineMethod (c$, "getPassword", -function () { -var doc = this.getDocument (); -var txt = new javax.swing.text.Segment (); -try { -doc.getText (0, doc.getLength (), txt); -} catch (e) { -if (Clazz_exceptionOf (e, javax.swing.text.BadLocationException)) { -return null; -} else { -throw e; -} -} -var retValue = Clazz_newCharArray (txt.count, '\0'); -System.arraycopy (txt.array, txt.offset, retValue, 0, txt.count); -return retValue; -}); -Clazz_defineMethod (c$, "paramString", -function () { -return Clazz_superCall (this, javax.swing.JPasswordField, "paramString", []) + ",echoChar=" + this.echoChar; -}); -Clazz_defineMethod (c$, "customSetUIProperty", -function (propertyName, value) { -if (propertyName === "echoChar") { -if (!this.echoCharSet) { -this.setEchoChar ((value).charValue ()); -this.echoCharSet = false; -}return true; -}return false; -}, "~S,~O"); -Clazz_defineStatics (c$, -"$$uiClassID", "PasswordFieldUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.ActionPropertyChangeListener", "$.SwingConstants", "javax.swing.event.ChangeListener", "javax.swing.text.JTextComponent", "$.TextAction"], "javax.swing.JTextField", ["java.lang.Boolean", "$.IllegalArgumentException", "java.awt.EventQueue", "java.awt.event.ActionEvent", "$.ActionListener", "$.InputEvent", "javax.swing.AbstractAction", "$.JViewport", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.$action = null; -this.actionPropertyChangeListener = null; -this.horizontalAlignment = 10; -this.columns = 0; -this.columnWidth = 0; -this.command = null; -if (!Clazz_isClassDefined ("javax.swing.JTextField.ScrollRepainter")) { -javax.swing.JTextField.$JTextField$ScrollRepainter$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "JTextField", javax.swing.text.JTextComponent, javax.swing.SwingConstants); -Clazz_makeConstructor (c$, -function () { -this.construct (null, null, 0); -}); -Clazz_makeConstructor (c$, -function (text) { -this.construct (null, text, 0); -}, "~S"); -Clazz_makeConstructor (c$, -function (columns) { -this.construct (null, null, columns); -}, "~N"); -Clazz_makeConstructor (c$, -function (text, columns) { -this.construct (null, text, columns); -}, "~S,~N"); -Clazz_makeConstructor (c$, -function (doc, text, columns) { -Clazz_superConstructor (this, javax.swing.JTextField); -if (columns < 0) { -throw new IllegalArgumentException ("columns less than zero."); -}this.columns = columns; -if (doc == null) { -doc = this.createDefaultModel (); -}this.setDocument (doc); -if (text != null) { -this.setText (text); -}}, "javax.swing.text.Document,~S,~N"); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "TextFieldUI"; -}); -Clazz_defineMethod (c$, "setDocument", -function (doc) { -if (doc != null) { -doc.putProperty ("filterNewlines", Boolean.TRUE); -}Clazz_superCall (this, javax.swing.JTextField, "setDocument", [doc]); -}, "javax.swing.text.Document"); -Clazz_overrideMethod (c$, "isValidateRoot", -function () { -var parent = this.getParent (); -if (Clazz_instanceOf (parent, javax.swing.JViewport)) { -return false; -}return true; -}); -Clazz_defineMethod (c$, "getHorizontalAlignment", -function () { -return this.horizontalAlignment; -}); -Clazz_defineMethod (c$, "setHorizontalAlignment", -function (alignment) { -if (alignment == this.horizontalAlignment) return; -var oldValue = this.horizontalAlignment; -if ((alignment == 2) || (alignment == 0) || (alignment == 4) || (alignment == 10) || (alignment == 11)) { -this.horizontalAlignment = alignment; -} else { -throw new IllegalArgumentException ("horizontalAlignment"); -}this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment); -this.invalidate (); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "createDefaultModel", -function () { -return swingjs.JSToolkit.getPlainDocument (this); -}); -Clazz_defineMethod (c$, "getColumns", -function () { -return this.columns; -}); -Clazz_defineMethod (c$, "setColumns", -function (columns) { -var oldVal = this.columns; -if (columns < 0) { -throw new IllegalArgumentException ("columns less than zero."); -}if (columns != oldVal) { -this.columns = columns; -this.invalidate (); -}}, "~N"); -Clazz_defineMethod (c$, "getColumnWidth", -function () { -if (this.columnWidth == 0) { -var metrics = this.getFontMetrics (this.getFont ()); -this.columnWidth = metrics.charWidth ('m'); -}return this.columnWidth; -}); -Clazz_overrideMethod (c$, "getPreferredSize", -function () { -return this.getPrefSizeJTF (); -}); -Clazz_defineMethod (c$, "getPrefSizeJTF", -function () { -var size = this.getPrefSizeJComp (); -if (this.columns != 0) { -var insets = this.getInsets (); -size.width = this.columns * this.getColumnWidth () + insets.left + insets.right; -}return size; -}); -Clazz_defineMethod (c$, "setFont", -function (f) { -Clazz_superCall (this, javax.swing.JTextField, "setFont", [f]); -this.columnWidth = 0; -}, "java.awt.Font"); -Clazz_defineMethod (c$, "addActionListener", -function (l) { -this.listenerList.add (java.awt.event.ActionListener, l); -}, "java.awt.event.ActionListener"); -Clazz_defineMethod (c$, "removeActionListener", -function (l) { -if ((l != null) && (this.getAction () === l)) { -this.setAction (null); -} else { -this.listenerList.remove (java.awt.event.ActionListener, l); -}}, "java.awt.event.ActionListener"); -Clazz_defineMethod (c$, "getActionListeners", -function () { -return this.listenerList.getListeners (java.awt.event.ActionListener); -}); -Clazz_defineMethod (c$, "fireActionPerformed", -function () { -var listeners = this.listenerList.getListenerList (); -var modifiers = 0; -var currentEvent = java.awt.EventQueue.getCurrentEvent (); -if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) { -modifiers = (currentEvent).getModifiers (); -} else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) { -modifiers = (currentEvent).getModifiers (); -}var e = new java.awt.event.ActionEvent (this, 1001, (this.command != null) ? this.command : this.getText (), java.awt.EventQueue.getMostRecentEventTime (), modifiers); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === java.awt.event.ActionListener) { -(listeners[i + 1]).actionPerformed (e); -}} -}); -Clazz_defineMethod (c$, "setActionCommand", -function (command) { -this.command = command; -}, "~S"); -Clazz_defineMethod (c$, "setAction", -function (a) { -var oldValue = this.getAction (); -if (this.$action == null || !this.$action.equals (a)) { -this.$action = a; -if (oldValue != null) { -this.removeActionListener (oldValue); -oldValue.removePropertyChangeListener (this.actionPropertyChangeListener); -this.actionPropertyChangeListener = null; -}this.configurePropertiesFromAction (this.$action); -if (this.$action != null) { -if (!this.isListener (java.awt.event.ActionListener, this.$action)) { -this.addActionListener (this.$action); -}this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action); -this.$action.addPropertyChangeListener (this.actionPropertyChangeListener); -}this.firePropertyChangeObject ("action", oldValue, this.$action); -}}, "javax.swing.Action"); -Clazz_defineMethod (c$, "isListener", - function (c, a) { -var isListener = false; -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === c && listeners[i + 1] === a) { -isListener = true; -}} -return isListener; -}, "Class,java.awt.event.ActionListener"); -Clazz_defineMethod (c$, "getAction", -function () { -return this.$action; -}); -Clazz_defineMethod (c$, "configurePropertiesFromAction", -function (a) { -javax.swing.AbstractAction.setEnabledFromAction (this, a); -javax.swing.AbstractAction.setToolTipTextFromAction (this, a); -this.setActionCommandFromAction (a); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "actionPropertyChanged", -function (action, propertyName) { -if (propertyName === "ActionCommandKey") { -this.setActionCommandFromAction (action); -} else if (propertyName === "enabled") { -javax.swing.AbstractAction.setEnabledFromAction (this, action); -} else if (propertyName === "ShortDescription") { -javax.swing.AbstractAction.setToolTipTextFromAction (this, action); -}}, "javax.swing.Action,~S"); -Clazz_defineMethod (c$, "setActionCommandFromAction", - function (action) { -this.setActionCommand ((action == null) ? null : action.getValue ("ActionCommandKey")); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "createActionPropertyChangeListener", -function (a) { -return new javax.swing.JTextField.TextFieldActionPropertyChangeListener (this, a); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "getActions", -function () { -return javax.swing.text.TextAction.augmentList (Clazz_superCall (this, javax.swing.JTextField, "getActions", []), javax.swing.JTextField.defaultActions); -}); -Clazz_defineMethod (c$, "postActionEvent", -function () { -this.fireActionPerformed (); -}); -Clazz_defineMethod (c$, "hasActionListener", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === java.awt.event.ActionListener) { -return true; -}} -return false; -}); -Clazz_defineMethod (c$, "paramString", -function () { -var horizontalAlignmentString; -if (this.horizontalAlignment == 2) { -horizontalAlignmentString = "LEFT"; -} else if (this.horizontalAlignment == 0) { -horizontalAlignmentString = "CENTER"; -} else if (this.horizontalAlignment == 4) { -horizontalAlignmentString = "RIGHT"; -} else if (this.horizontalAlignment == 10) { -horizontalAlignmentString = "LEADING"; -} else if (this.horizontalAlignment == 11) { -horizontalAlignmentString = "TRAILING"; -} else horizontalAlignmentString = ""; -var commandString = (this.command != null ? this.command : ""); -return Clazz_superCall (this, javax.swing.JTextField, "paramString", []) + ",columns=" + this.columns + ",columnWidth=" + this.columnWidth + ",command=" + commandString + ",horizontalAlignment=" + horizontalAlignmentString; -}); -c$.$JTextField$ScrollRepainter$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -Clazz_instantialize (this, arguments); -}, javax.swing.JTextField, "ScrollRepainter", null, javax.swing.event.ChangeListener); -Clazz_overrideMethod (c$, "stateChanged", -function (a) { -this.b$["javax.swing.JTextField"].repaint (); -}, "javax.swing.event.ChangeEvent"); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.JTextField, "TextFieldActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener); -Clazz_overrideMethod (c$, "actionPropertyChanged", -function (a, b, c) { -if (javax.swing.AbstractAction.shouldReconfigure (c)) { -a.configurePropertiesFromAction (b); -} else { -a.actionPropertyChanged (b, c.getPropertyName ()); -}}, "javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.JTextField, "NotifyAction", javax.swing.text.TextAction); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JTextField.NotifyAction, ["notify-field-accept"]); -}); -Clazz_overrideMethod (c$, "actionPerformed", -function (a) { -var b = this.getFocusedComponent (); -if (Clazz_instanceOf (b, javax.swing.JTextField)) { -var c = b; -c.postActionEvent (); -}}, "java.awt.event.ActionEvent"); -Clazz_overrideMethod (c$, "isEnabled", -function () { -var a = this.getFocusedComponent (); -if (Clazz_instanceOf (a, javax.swing.JTextField)) { -return (a).hasActionListener (); -}return false; -}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"notifyAction", "notify-field-accept"); -c$.defaultActions = c$.prototype.defaultActions = Clazz_newArray (-1, [ new javax.swing.JTextField.NotifyAction ()]); -Clazz_defineStatics (c$, -"$uiClassID", "TextFieldUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.action = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener); -Clazz_makeConstructor (c$, -function (c, a) { -this.setTarget (c); -this.action = a; -}, "~O,javax.swing.Action"); -Clazz_overrideMethod (c$, "propertyChange", -function (e) { -var target = this.getTarget (); -if (target == null) { -this.getAction ().removePropertyChangeListener (this); -} else { -this.actionPropertyChanged (target, this.getAction (), e); -}}, "java.beans.PropertyChangeEvent"); -Clazz_defineMethod (c$, "setTarget", - function (c) { -}, "~O"); -Clazz_defineMethod (c$, "getTarget", -function () { -return null; -}); -Clazz_defineMethod (c$, "getAction", -function () { -return this.action; -}); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.ChangeListener", null, function () { -Clazz_declareInterface (javax.swing.event, "ChangeListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (null, "javax.swing.ActionMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () { -c$ = Clazz_decorateAsClass (function () { -this.arrayTable = null; -this.parent = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "ActionMap"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "setParent", -function (map) { -this.parent = map; -}, "javax.swing.ActionMap"); -Clazz_defineMethod (c$, "getParent", -function () { -return this.parent; -}); -Clazz_defineMethod (c$, "put", -function (key, action) { -if (key == null) { -return; -}if (action == null) { -this.remove (key); -} else { -if (this.arrayTable == null) { -this.arrayTable = new javax.swing.ArrayTable (); -}this.arrayTable.put (key, action); -}}, "~O,javax.swing.Action"); -Clazz_defineMethod (c$, "get", -function (key) { -var value = (this.arrayTable == null) ? null : this.arrayTable.get (key); -if (value == null) { -var parent = this.getParent (); -if (parent != null) { -return parent.get (key); -}}return value; -}, "~O"); -Clazz_defineMethod (c$, "remove", -function (key) { -if (this.arrayTable != null) { -this.arrayTable.remove (key); -}}, "~O"); -Clazz_defineMethod (c$, "clear", -function () { -if (this.arrayTable != null) { -this.arrayTable.clear (); -}}); -Clazz_defineMethod (c$, "keys", -function () { -if (this.arrayTable == null) { -return null; -}return this.arrayTable.getKeys (null); -}); -Clazz_defineMethod (c$, "size", -function () { -if (this.arrayTable == null) { -return 0; -}return this.arrayTable.size (); -}); -Clazz_defineMethod (c$, "allKeys", -function () { -var count = this.size (); -var parent = this.getParent (); -if (count == 0) { -if (parent != null) { -return parent.allKeys (); -}return this.keys (); -}if (parent == null) { -return this.keys (); -}var keys = this.keys (); -var pKeys = parent.allKeys (); -if (pKeys == null) { -return keys; -}if (keys == null) { -return pKeys; -}var keyMap = new java.util.HashMap (); -var counter; -for (counter = keys.length - 1; counter >= 0; counter--) { -keyMap.put (keys[counter], keys[counter]); -} -for (counter = pKeys.length - 1; counter >= 0; counter--) { -keyMap.put (pKeys[counter], pKeys[counter]); -} -return keyMap.keySet ().toArray (); -}); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (null, "javax.swing.InputMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () { -c$ = Clazz_decorateAsClass (function () { -this.arrayTable = null; -this.parent = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "InputMap"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "setParent", -function (map) { -this.parent = map; -}, "javax.swing.InputMap"); -Clazz_defineMethod (c$, "getParent", -function () { -return this.parent; -}); -Clazz_defineMethod (c$, "put", -function (keyStroke, actionMapKey) { -if (keyStroke == null) { -return; -}if (actionMapKey == null) { -this.remove (keyStroke); -} else { -if (this.arrayTable == null) { -this.arrayTable = new javax.swing.ArrayTable (); -}this.arrayTable.put (keyStroke, actionMapKey); -}}, "javax.swing.KeyStroke,~O"); -Clazz_defineMethod (c$, "get", -function (keyStroke) { -if (this.arrayTable == null) { -var parent = this.getParent (); -if (parent != null) { -return parent.get (keyStroke); -}return null; -}var value = this.arrayTable.get (keyStroke); -if (value == null) { -var parent = this.getParent (); -if (parent != null) { -return parent.get (keyStroke); -}}return value; -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "remove", -function (key) { -if (this.arrayTable != null) { -this.arrayTable.remove (key); -}}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "clear", -function () { -if (this.arrayTable != null) { -this.arrayTable.clear (); -}}); -Clazz_defineMethod (c$, "keys", -function () { -if (this.arrayTable == null) { -return null; -}var keys = new Array (this.arrayTable.size ()); -this.arrayTable.getKeys (keys); -return keys; -}); -Clazz_defineMethod (c$, "size", -function () { -if (this.arrayTable == null) { -return 0; -}return this.arrayTable.size (); -}); -Clazz_defineMethod (c$, "allKeys", -function () { -var count = this.size (); -var parent = this.getParent (); -if (count == 0) { -if (parent != null) { -return parent.allKeys (); -}return this.keys (); -}if (parent == null) { -return this.keys (); -}var keys = this.keys (); -var pKeys = parent.allKeys (); -if (pKeys == null) { -return keys; -}if (keys == null) { -return pKeys; -}var keyMap = new java.util.HashMap (); -var counter; -for (counter = keys.length - 1; counter >= 0; counter--) { -keyMap.put (keys[counter], keys[counter]); -} -for (counter = pKeys.length - 1; counter >= 0; counter--) { -keyMap.put (pKeys[counter], pKeys[counter]); -} -var allKeys = new Array (keyMap.size ()); -return keyMap.keySet ().toArray (allKeys); -}); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_declareInterface (javax.swing, "Scrollable"); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventObject"], "javax.swing.event.CaretEvent", null, function () { -c$ = Clazz_declareType (javax.swing.event, "CaretEvent", java.util.EventObject); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.DocumentListener", null, function () { -Clazz_declareInterface (javax.swing.event, "DocumentListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (null, "javax.swing.event.EventListenerList", ["java.lang.reflect.Array"], function () { -c$ = Clazz_decorateAsClass (function () { -this.listenerList = null; -Clazz_instantialize (this, arguments); -}, javax.swing.event, "EventListenerList"); -Clazz_prepareFields (c$, function () { -this.listenerList = javax.swing.event.EventListenerList.NULL_ARRAY; -}); -Clazz_defineMethod (c$, "getListenerList", -function () { -return this.listenerList; -}); -Clazz_defineMethod (c$, "getListeners", -function (t) { -var lList = this.listenerList; -var n = this.getListenerCount (lList, t); -var result = java.lang.reflect.Array.newInstance (t, n); -var j = 0; -for (var i = lList.length - 2; i >= 0; i -= 2) { -if (lList[i] === t) { -result[j++] = lList[i + 1]; -}} -return result; -}, "Class"); -Clazz_defineMethod (c$, "getListenerCount", -function () { -return Clazz_doubleToInt (this.listenerList.length / 2); -}); -Clazz_defineMethod (c$, "getListenerCount", -function (t) { -var lList = this.listenerList; -return this.getListenerCount (lList, t); -}, "Class"); -Clazz_defineMethod (c$, "getListenerCount", - function (list, t) { -var count = 0; -for (var i = 0; i < list.length; i += 2) { -if (t === list[i]) count++; -} -return count; -}, "~A,Class"); -Clazz_defineMethod (c$, "add", -function (t, l) { -if (l == null) { -return; -}if (this.listenerList === javax.swing.event.EventListenerList.NULL_ARRAY) { -this.listenerList = Clazz_newArray (-1, [t, l]); -} else { -var i = this.listenerList.length; -var tmp = new Array (i + 2); -System.arraycopy (this.listenerList, 0, tmp, 0, i); -tmp[i] = t; -tmp[i + 1] = l; -this.listenerList = tmp; -}}, "Class,~O"); -Clazz_defineMethod (c$, "remove", -function (t, l) { -if (l == null) { -return; -}var index = -1; -for (var i = this.listenerList.length - 2; i >= 0; i -= 2) { -if ((this.listenerList[i] === t) && (this.listenerList[i + 1].equals (l) == true)) { -index = i; -break; -}} -if (index != -1) { -var tmp = new Array (this.listenerList.length - 2); -System.arraycopy (this.listenerList, 0, tmp, 0, index); -if (index < tmp.length) System.arraycopy (this.listenerList, index + 2, tmp, index, tmp.length - index); -this.listenerList = (tmp.length == 0) ? javax.swing.event.EventListenerList.NULL_ARRAY : tmp; -}}, "Class,~O"); -Clazz_overrideMethod (c$, "toString", -function () { -var lList = this.listenerList; -var s = "EventListenerList: "; -s += Clazz_doubleToInt (lList.length / 2) + " listeners: "; -for (var i = 0; i <= lList.length - 2; i += 2) { -s += " type " + (lList[i]).getName (); -s += " listener " + lList[i + 1]; -} -return s; -}); -c$.NULL_ARRAY = c$.prototype.NULL_ARRAY = new Array (0); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventObject"], "javax.swing.event.ChangeEvent", null, function () { -c$ = Clazz_declareType (javax.swing.event, "ChangeEvent", java.util.EventObject); -}); -Clazz_declarePackage ("jssun.swing"); -Clazz_load (["jssun.swing.UIClientPropertyKey"], "jssun.swing.StringUIClientPropertyKey", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.key = null; -Clazz_instantialize (this, arguments); -}, jssun.swing, "StringUIClientPropertyKey", null, jssun.swing.UIClientPropertyKey); -Clazz_makeConstructor (c$, -function (key) { -this.key = key; -}, "~S"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.key; -}); -}); -Clazz_declarePackage ("jssun.swing"); -Clazz_declareInterface (jssun.swing, "UIClientPropertyKey"); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () { -c$ = Clazz_declareType (java.awt, "Graphics2D", java.awt.Graphics); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.Graphics2D, []); -}); -Clazz_overrideMethod (c$, "draw3DRect", -function (x, y, width, height, raised) { -var p = this.getPaint (); -var c = this.getColor (); -var brighter = c.brighter (); -var darker = c.darker (); -this.setColor (raised ? brighter : darker); -this.fillRect (x, y, 1, height + 1); -this.fillRect (x + 1, y, width - 1, 1); -this.setColor (raised ? darker : brighter); -this.fillRect (x + 1, y + height, width, 1); -this.fillRect (x + width, y, 1, height); -this.setPaint (p); -}, "~N,~N,~N,~N,~B"); -Clazz_overrideMethod (c$, "fill3DRect", -function (x, y, width, height, raised) { -var p = this.getPaint (); -var c = this.getColor (); -var brighter = c.brighter (); -var darker = c.darker (); -if (!raised) { -this.setColor (darker); -} else if (p !== c) { -this.setColor (c); -}this.fillRect (x + 1, y + 1, width - 2, height - 2); -this.setColor (raised ? brighter : darker); -this.fillRect (x, y, 1, height); -this.fillRect (x + 1, y, width - 2, 1); -this.setColor (raised ? darker : brighter); -this.fillRect (x + 1, y + height - 1, width - 1, 1); -this.fillRect (x + width - 1, y, 1, height - 1); -this.setPaint (p); -}, "~N,~N,~N,~N,~B"); -}); -Clazz_declarePackage ("java.awt"); -c$ = Clazz_declareType (java.awt, "Graphics"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "create", -function () { -return this.createSwingJS (); -}); -Clazz_defineMethod (c$, "create", -function (x, y, width, height) { -return this.create4 (x, y, width, height); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "create4", -function (x, y, width, height) { -var g = this.createSwingJS (); -if (g == null) return null; -g.translate (x, y); -g.clipRect (0, 0, width, height); -return g; -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getFontMetrics", -function () { -return this.getFontMetrics (this.getFont ()); -}); -Clazz_defineMethod (c$, "drawRect", -function (x, y, width, height) { -if ((width < 0) || (height < 0)) { -return; -}if (height == 0 || width == 0) { -this.drawLine (x, y, x + width, y + height); -} else { -this.drawLine (x, y, x + width - 1, y); -this.drawLine (x + width, y, x + width, y + height - 1); -this.drawLine (x + width, y + height, x + 1, y + height); -this.drawLine (x, y + height, x, y + 1); -}}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "draw3DRect", -function (x, y, width, height, raised) { -var c = this.getColor (); -var brighter = c.brighter (); -var darker = c.darker (); -this.setColor (raised ? brighter : darker); -this.drawLine (x, y, x, y + height); -this.drawLine (x + 1, y, x + width - 1, y); -this.setColor (raised ? darker : brighter); -this.drawLine (x + 1, y + height, x + width, y + height); -this.drawLine (x + width, y, x + width, y + height - 1); -this.setColor (c); -}, "~N,~N,~N,~N,~B"); -Clazz_defineMethod (c$, "fill3DRect", -function (x, y, width, height, raised) { -var c = this.getColor (); -var brighter = c.brighter (); -var darker = c.darker (); -if (!raised) { -this.setColor (darker); -}this.fillRect (x + 1, y + 1, width - 2, height - 2); -this.setColor (raised ? brighter : darker); -this.drawLine (x, y, x, y + height - 1); -this.drawLine (x + 1, y, x + width - 2, y); -this.setColor (raised ? darker : brighter); -this.drawLine (x + 1, y + height - 1, x + width - 1, y + height - 1); -this.drawLine (x + width - 1, y, x + width - 1, y + height - 2); -this.setColor (c); -}, "~N,~N,~N,~N,~B"); -Clazz_defineMethod (c$, "drawPolygon", -function (p) { -this.drawPolygon (p.xpoints, p.ypoints, p.npoints); -}, "java.awt.Polygon"); -Clazz_defineMethod (c$, "fillPolygon", -function (p) { -this.fillPolygon (p.xpoints, p.ypoints, p.npoints); -}, "java.awt.Polygon"); -Clazz_defineMethod (c$, "drawChars", -function (data, offset, length, x, y) { -this.drawString ( String.instantialize (data, offset, length), x, y); -}, "~A,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "drawBytes", -function (data, offset, length, x, y) { -this.drawString ( String.instantialize (data, 0, offset, length), x, y); -}, "~A,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "finalize", -function () { -this.dispose (); -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[font=" + this.getFont () + ",color=" + this.getColor () + "]"; -}); -Clazz_defineMethod (c$, "getClipRect", -function () { -return this.getClipBounds (); -}); -Clazz_defineMethod (c$, "hitClip", -function (x, y, width, height) { -var clipRect = this.getClipBounds (); -if (clipRect == null) { -return true; -}return clipRect.intersects (x, y, width, height); -}, "~N,~N,~N,~N"); -Clazz_declarePackage ("jssun.font"); -Clazz_load (["java.awt.FontMetrics", "java.util.Hashtable"], "jssun.font.FontDesignMetrics", ["java.lang.IndexOutOfBoundsException", "java.awt.Toolkit", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.ascent = 0; -this.descent = 0; -this.leading = 0; -this.height = -1; -Clazz_instantialize (this, arguments); -}, jssun.font, "FontDesignMetrics", java.awt.FontMetrics); -c$.getMetrics = Clazz_defineMethod (c$, "getMetrics", -function (font) { -var m = null; -var r; -r = jssun.font.FontDesignMetrics.metricsCache.get (font); -if (r != null) { -m = r.get (); -}if (m == null) { -m = new jssun.font.FontDesignMetrics (font); -jssun.font.FontDesignMetrics.metricsCache.put (font, new jssun.font.FontDesignMetrics.KeyReference (font, m)); -}for (var i = 0; i < jssun.font.FontDesignMetrics.recentMetrics.length; i++) { -if (jssun.font.FontDesignMetrics.recentMetrics[i] === m) { -return m; -}} -{ -jssun.font.FontDesignMetrics.recentMetrics[jssun.font.FontDesignMetrics.recentIndex++] = m; -if (jssun.font.FontDesignMetrics.recentIndex == 5) { -jssun.font.FontDesignMetrics.recentIndex = 0; -}}return m; -}, "java.awt.Font"); -Clazz_makeConstructor (c$, - function (font) { -Clazz_superConstructor (this, jssun.font.FontDesignMetrics, [font]); -this.font = font; -this.initMatrixAndMetrics (); -}, "java.awt.Font"); -Clazz_defineMethod (c$, "initMatrixAndMetrics", - function () { -{ -//need to calculate ascent, descent, leading, and maxAdvance -}}); -Clazz_defineMethod (c$, "charWidth", -function (ch) { -var s = ""; -{ -s = "" + ch; -}return this.stringWidth (s); -}, "~S"); -Clazz_overrideMethod (c$, "stringWidth", -function (str) { -return Clazz_doubleToInt (0.5 + this.getWidth (str)); -}, "~S"); -Clazz_defineMethod (c$, "getWidth", - function (str) { -return swingjs.JSToolkit.getStringWidth (null, this.font, str); -}, "~S"); -Clazz_overrideMethod (c$, "charsWidth", -function (data, off, len) { -var width = 0; -if (len < 0) { -throw new IndexOutOfBoundsException ("len=" + len); -}var limit = off + len; -for (var i = off; i < limit; i++) { -var ch = data[i]; -width += this.stringWidth ("" + ch); -} -return Clazz_doubleToInt (0.5 + width); -}, "~A,~N,~N"); -Clazz_overrideMethod (c$, "getWidths", -function () { -var widths = Clazz_newIntArray (256, 0); -return widths; -}); -Clazz_defineMethod (c$, "getAscent", -function () { -if (this.ascent == 0) this.ascent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getAscent (); -return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.ascent); -}); -Clazz_defineMethod (c$, "getDescent", -function () { -if (this.descent == 0) this.descent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getDescent (); -return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent); -}); -Clazz_overrideMethod (c$, "getLeading", -function () { -return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading) - Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent); -}); -Clazz_overrideMethod (c$, "getHeight", -function () { -if (this.height < 0) { -this.height = this.getAscent () + Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading); -}return this.height; -}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.key = null; -this.val = null; -Clazz_instantialize (this, arguments); -}, jssun.font.FontDesignMetrics, "KeyReference"); -Clazz_makeConstructor (c$, -function (a, b) { -this.key = a; -this.val = b; -}, "~O,~O"); -Clazz_defineMethod (c$, "get", -function () { -return this.val; -}); -Clazz_defineMethod (c$, "dispose", -function () { -if (jssun.font.FontDesignMetrics.metricsCache.get (this.key) === this) { -jssun.font.FontDesignMetrics.metricsCache.remove (this.key); -}}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"roundingUpValue", 0.95); -c$.metricsCache = c$.prototype.metricsCache = new java.util.Hashtable (); -Clazz_defineStatics (c$, -"MAXRECENT", 5); -c$.recentMetrics = c$.prototype.recentMetrics = new Array (5); -Clazz_defineStatics (c$, -"recentIndex", 0); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.font.FontRenderContext"], "java.awt.FontMetrics", ["java.lang.Character"], function () { -c$ = Clazz_decorateAsClass (function () { -this.font = null; -Clazz_instantialize (this, arguments); -}, java.awt, "FontMetrics"); -Clazz_makeConstructor (c$, -function (font) { -this.font = font; -}, "java.awt.Font"); -Clazz_defineMethod (c$, "getFont", -function () { -return this.font; -}); -Clazz_defineMethod (c$, "getFontRenderContext", -function () { -return java.awt.FontMetrics.DEFAULT_FRC; -}); -Clazz_defineMethod (c$, "getLeading", -function () { -return 0; -}); -Clazz_defineMethod (c$, "getAscent", -function () { -return this.font.getSize (); -}); -Clazz_defineMethod (c$, "getDescent", -function () { -return 0; -}); -Clazz_defineMethod (c$, "getHeight", -function () { -return this.getLeading () + this.getAscent () + this.getDescent (); -}); -Clazz_defineMethod (c$, "getMaxAscent", -function () { -return this.getAscent (); -}); -Clazz_defineMethod (c$, "getMaxDescent", -function () { -return this.getDescent (); -}); -Clazz_defineMethod (c$, "getMaxDecent", -function () { -return this.getMaxDescent (); -}); -Clazz_defineMethod (c$, "getMaxAdvance", -function () { -return -1; -}); -Clazz_defineMethod (c$, "charWidth", -function (codePoint) { -if (!Character.isValidCodePoint (codePoint)) { -codePoint = 0xffff; -}if (codePoint < 256) { -return this.getWidths ()[codePoint]; -} else { -var buffer = Clazz_newCharArray (2, '\0'); -var len = Character.toChars (codePoint, buffer, 0); -return this.charsWidth (buffer, 0, len); -}}, "~N"); -Clazz_defineMethod (c$, "charWidth", -function (ch) { -if (ch.charCodeAt (0) < 256) { -return this.getWidths ()[ch.charCodeAt (0)]; -}var data = Clazz_newCharArray (-1, [ch]); -return this.charsWidth (data, 0, 1); -}, "~S"); -Clazz_defineMethod (c$, "stringWidth", -function (str) { -var len = str.length; -var data = Clazz_newCharArray (len, '\0'); -str.getChars (0, len, data, 0); -return this.charsWidth (data, 0, len); -}, "~S"); -Clazz_defineMethod (c$, "charsWidth", -function (data, off, len) { -return this.stringWidth ( String.instantialize (data, off, len)); -}, "~A,~N,~N"); -Clazz_defineMethod (c$, "bytesWidth", -function (data, off, len) { -return this.stringWidth ( String.instantialize (data, 0, off, len)); -}, "~A,~N,~N"); -Clazz_defineMethod (c$, "getWidths", -function () { -var widths = Clazz_newIntArray (256, 0); -for (var ch = String.fromCharCode (0); ch.charCodeAt (0) < 256; ch = String.fromCharCode (ch.charCodeAt (0) + 1)) { -widths[ch.charCodeAt (0)] = this.charWidth (ch); -} -return widths; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[font=" + this.getFont () + "ascent=" + this.getAscent () + ", descent=" + this.getDescent () + ", height=" + this.getHeight () + "]"; -}); -c$.DEFAULT_FRC = c$.prototype.DEFAULT_FRC = new java.awt.font.FontRenderContext (null, false, false); -}); -Clazz_declarePackage ("JU"); -Clazz_load (null, "JU.PT", ["java.lang.Boolean", "$.Double", "$.Float", "$.Number", "java.util.Map", "javajs.api.JSONEncodable", "JU.AU", "$.DF", "$.Lst", "$.M34", "$.M4", "$.SB"], function () { -c$ = Clazz_declareType (JU, "PT"); -c$.parseInt = Clazz_defineMethod (c$, "parseInt", -function (str) { -return JU.PT.parseIntNext (str, Clazz_newIntArray (-1, [0])); -}, "~S"); -c$.parseIntNext = Clazz_defineMethod (c$, "parseIntNext", -function (str, next) { -var cch = str.length; -if (next[0] < 0 || next[0] >= cch) return -2147483648; -return JU.PT.parseIntChecked (str, cch, next); -}, "~S,~A"); -c$.parseIntChecked = Clazz_defineMethod (c$, "parseIntChecked", -function (str, ichMax, next) { -var digitSeen = false; -var value = 0; -var ich = next[0]; -if (ich < 0) return -2147483648; -var ch; -while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; - -var negative = false; -if (ich < ichMax && str.charCodeAt (ich) == 45) { -negative = true; -++ich; -}while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { -value = value * 10 + (ch - 48); -digitSeen = true; -++ich; -} -if (!digitSeen) value = -2147483648; - else if (negative) value = -value; -next[0] = ich; -return value; -}, "~S,~N,~A"); -c$.isWhiteSpace = Clazz_defineMethod (c$, "isWhiteSpace", -function (str, ich) { -var ch; -return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n')); -}, "~S,~N"); -c$.parseFloatChecked = Clazz_defineMethod (c$, "parseFloatChecked", -function (str, ichMax, next, isStrict) { -var digitSeen = false; -var ich = next[0]; -if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN; -while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; - -var negative = false; -if (ich < ichMax && str.charAt (ich) == '-') { -++ich; -negative = true; -}var ch = 0; -var ival = 0; -var ival2 = 0; -while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { -ival = (ival * 10) + (ch - 48) * 1; -++ich; -digitSeen = true; -} -var isDecimal = false; -var iscale = 0; -var nzero = (ival == 0 ? -1 : 0); -if (ch == 46) { -isDecimal = true; -while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) { -digitSeen = true; -if (nzero < 0) { -if (ch == 48) { -nzero--; -continue; -}nzero = -nzero; -}if (iscale < JU.PT.decimalScale.length) { -ival2 = (ival2 * 10) + (ch - 48) * 1; -iscale++; -}} -}var value; -if (!digitSeen) { -value = NaN; -} else if (ival2 > 0) { -value = ival2 * JU.PT.decimalScale[iscale - 1]; -if (nzero > 1) { -if (nzero - 2 < JU.PT.decimalScale.length) { -value *= JU.PT.decimalScale[nzero - 2]; -} else { -value *= Math.pow (10, 1 - nzero); -}} else { -value += ival; -}} else { -value = ival; -}var isExponent = false; -if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) { -isExponent = true; -if (++ich >= ichMax) return NaN; -ch = str.charCodeAt (ich); -if ((ch == 43) && (++ich >= ichMax)) return NaN; -next[0] = ich; -var exponent = JU.PT.parseIntChecked (str, ichMax, next); -if (exponent == -2147483648) return NaN; -if (exponent > 0 && exponent <= JU.PT.tensScale.length) value *= JU.PT.tensScale[exponent - 1]; - else if (exponent < 0 && -exponent <= JU.PT.decimalScale.length) value *= JU.PT.decimalScale[-exponent - 1]; - else if (exponent != 0) value *= Math.pow (10, exponent); -} else { -next[0] = ich; -}if (negative) value = -value; -if (value == Infinity) value = 3.4028235E38; -return (!isStrict || (!isExponent || isDecimal) && JU.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN); -}, "~S,~N,~A,~B"); -c$.checkTrailingText = Clazz_defineMethod (c$, "checkTrailingText", -function (str, ich, ichMax) { -var ch; -while (ich < ichMax && (JU.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich; - -return (ich == ichMax); -}, "~S,~N,~N"); -c$.parseFloatArray = Clazz_defineMethod (c$, "parseFloatArray", -function (str) { -return JU.PT.parseFloatArrayNext (str, Clazz_newIntArray (1, 0), null, null, null); -}, "~S"); -c$.parseFloatArrayInfested = Clazz_defineMethod (c$, "parseFloatArrayInfested", -function (tokens, data) { -var len = data.length; -var nTokens = tokens.length; -var n = 0; -var max = 0; -for (var i = 0; i >= 0 && i < len && n < nTokens; i++) { -var f; -while (Float.isNaN (f = JU.PT.parseFloat (tokens[n++])) && n < nTokens) { -} -if (!Float.isNaN (f)) data[(max = i)] = f; -if (n == nTokens) break; -} -return max + 1; -}, "~A,~A"); -c$.parseFloatArrayNext = Clazz_defineMethod (c$, "parseFloatArrayNext", -function (str, next, f, strStart, strEnd) { -var n = 0; -var pt = next[0]; -if (pt >= 0) { -if (strStart != null) { -var p = str.indexOf (strStart, pt); -if (p >= 0) next[0] = p + strStart.length; -}str = str.substring (next[0]); -pt = (strEnd == null ? -1 : str.indexOf (strEnd)); -if (pt < 0) pt = str.length; - else str = str.substring (0, pt); -next[0] += pt + 1; -var tokens = JU.PT.getTokens (str); -if (f == null) f = Clazz_newFloatArray (tokens.length, 0); -n = JU.PT.parseFloatArrayInfested (tokens, f); -}if (f == null) return Clazz_newFloatArray (0, 0); -for (var i = n; i < f.length; i++) f[i] = NaN; - -return f; -}, "~S,~A,~A,~S,~S"); -c$.parseFloatRange = Clazz_defineMethod (c$, "parseFloatRange", -function (str, ichMax, next) { -var cch = str.length; -if (ichMax > cch) ichMax = cch; -if (next[0] < 0 || next[0] >= ichMax) return NaN; -return JU.PT.parseFloatChecked (str, ichMax, next, false); -}, "~S,~N,~A"); -c$.parseFloatNext = Clazz_defineMethod (c$, "parseFloatNext", -function (str, next) { -var cch = (str == null ? -1 : str.length); -return (next[0] < 0 || next[0] >= cch ? NaN : JU.PT.parseFloatChecked (str, cch, next, false)); -}, "~S,~A"); -c$.parseFloatStrict = Clazz_defineMethod (c$, "parseFloatStrict", -function (str) { -var cch = str.length; -if (cch == 0) return NaN; -return JU.PT.parseFloatChecked (str, cch, Clazz_newIntArray (-1, [0]), true); -}, "~S"); -c$.parseFloat = Clazz_defineMethod (c$, "parseFloat", -function (str) { -return JU.PT.parseFloatNext (str, Clazz_newIntArray (-1, [0])); -}, "~S"); -c$.parseIntRadix = Clazz_defineMethod (c$, "parseIntRadix", -function (s, i) { -{ -return Integer.parseIntRadix(s, i); -}}, "~S,~N"); -c$.getTokens = Clazz_defineMethod (c$, "getTokens", -function (line) { -return JU.PT.getTokensAt (line, 0); -}, "~S"); -c$.parseToken = Clazz_defineMethod (c$, "parseToken", -function (str) { -return JU.PT.parseTokenNext (str, Clazz_newIntArray (-1, [0])); -}, "~S"); -c$.parseTrimmed = Clazz_defineMethod (c$, "parseTrimmed", -function (str) { -return JU.PT.parseTrimmedRange (str, 0, str.length); -}, "~S"); -c$.parseTrimmedAt = Clazz_defineMethod (c$, "parseTrimmedAt", -function (str, ichStart) { -return JU.PT.parseTrimmedRange (str, ichStart, str.length); -}, "~S,~N"); -c$.parseTrimmedRange = Clazz_defineMethod (c$, "parseTrimmedRange", -function (str, ichStart, ichMax) { -var cch = str.length; -if (ichMax < cch) cch = ichMax; -if (cch < ichStart) return ""; -return JU.PT.parseTrimmedChecked (str, ichStart, cch); -}, "~S,~N,~N"); -c$.getTokensAt = Clazz_defineMethod (c$, "getTokensAt", -function (line, ich) { -if (line == null) return null; -var cchLine = line.length; -if (ich < 0 || ich > cchLine) return null; -var tokenCount = JU.PT.countTokens (line, ich); -var tokens = new Array (tokenCount); -var next = Clazz_newIntArray (1, 0); -next[0] = ich; -for (var i = 0; i < tokenCount; ++i) tokens[i] = JU.PT.parseTokenChecked (line, cchLine, next); - -return tokens; -}, "~S,~N"); -c$.countTokens = Clazz_defineMethod (c$, "countTokens", -function (line, ich) { -var tokenCount = 0; -if (line != null) { -var ichMax = line.length; -while (true) { -while (ich < ichMax && JU.PT.isWhiteSpace (line, ich)) ++ich; - -if (ich == ichMax) break; -++tokenCount; -do { -++ich; -} while (ich < ichMax && !JU.PT.isWhiteSpace (line, ich)); -} -}return tokenCount; -}, "~S,~N"); -c$.parseTokenNext = Clazz_defineMethod (c$, "parseTokenNext", -function (str, next) { -var cch = str.length; -return (next[0] < 0 || next[0] >= cch ? null : JU.PT.parseTokenChecked (str, cch, next)); -}, "~S,~A"); -c$.parseTokenRange = Clazz_defineMethod (c$, "parseTokenRange", -function (str, ichMax, next) { -var cch = str.length; -if (ichMax > cch) ichMax = cch; -return (next[0] < 0 || next[0] >= ichMax ? null : JU.PT.parseTokenChecked (str, ichMax, next)); -}, "~S,~N,~A"); -c$.parseTokenChecked = Clazz_defineMethod (c$, "parseTokenChecked", -function (str, ichMax, next) { -var ich = next[0]; -while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; - -var ichNonWhite = ich; -while (ich < ichMax && !JU.PT.isWhiteSpace (str, ich)) ++ich; - -next[0] = ich; -return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich)); -}, "~S,~N,~A"); -c$.parseTrimmedChecked = Clazz_defineMethod (c$, "parseTrimmedChecked", -function (str, ich, ichMax) { -while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich; - -var ichLast = ichMax - 1; -while (ichLast >= ich && JU.PT.isWhiteSpace (str, ichLast)) --ichLast; - -return (ichLast < ich ? "" : str.substring (ich, ichLast + 1)); -}, "~S,~N,~N"); -c$.dVal = Clazz_defineMethod (c$, "dVal", -function (s) { -{ -if(s==null) -throw new NumberFormatException("null"); -var d=parseFloat(s); -if(isNaN(d)) -throw new NumberFormatException("Not a Number : "+s); -return d -}}, "~S"); -c$.fVal = Clazz_defineMethod (c$, "fVal", -function (s) { -{ -return this.dVal(s); -}}, "~S"); -c$.parseIntRange = Clazz_defineMethod (c$, "parseIntRange", -function (str, ichMax, next) { -var cch = str.length; -if (ichMax > cch) ichMax = cch; -return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : JU.PT.parseIntChecked (str, ichMax, next)); -}, "~S,~N,~A"); -c$.parseFloatArrayData = Clazz_defineMethod (c$, "parseFloatArrayData", -function (tokens, data) { -JU.PT.parseFloatArrayDataN (tokens, data, data.length); -}, "~A,~A"); -c$.parseFloatArrayDataN = Clazz_defineMethod (c$, "parseFloatArrayDataN", -function (tokens, data, nData) { -for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : JU.PT.parseFloat (tokens[i])); - -}, "~A,~A,~N"); -c$.split = Clazz_defineMethod (c$, "split", -function (text, run) { -if (text.length == 0) return new Array (0); -var n = 1; -var i = text.indexOf (run); -var lines; -var runLen = run.length; -if (i < 0 || runLen == 0) { -lines = new Array (1); -lines[0] = text; -return lines; -}var len = text.length - runLen; -for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen); - -lines = new Array (n); -i = 0; -var ipt = 0; -var pt = 0; -for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) { -lines[pt++] = text.substring (i, ipt); -i = ipt + runLen; -} -if (text.indexOf (run, len) != len) len += runLen; -lines[pt] = text.substring (i, len); -return lines; -}, "~S,~S"); -c$.getQuotedStringAt = Clazz_defineMethod (c$, "getQuotedStringAt", -function (line, ipt0) { -var next = Clazz_newIntArray (-1, [ipt0]); -return JU.PT.getQuotedStringNext (line, next); -}, "~S,~N"); -c$.getQuotedStringNext = Clazz_defineMethod (c$, "getQuotedStringNext", -function (line, next) { -var i = next[0]; -if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return ""; -var pt = i + 1; -var len = line.length; -while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++; - -next[0] = i + 1; -return line.substring (pt, i); -}, "~S,~A"); -c$.getCSVString = Clazz_defineMethod (c$, "getCSVString", -function (line, next) { -var i = next[1]; -if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null; -var pt = next[0] = i; -var len = line.length; -var escaped = false; -var haveEscape = false; -while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) { -escaped = false; -haveEscape = true; -i++; -} -if (i >= len) { -next[1] = -1; -return null; -}next[1] = i + 1; -var s = line.substring (pt + 1, i); -return (haveEscape ? JU.PT.rep (JU.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s); -}, "~S,~A"); -c$.isOneOf = Clazz_defineMethod (c$, "isOneOf", -function (key, semiList) { -if (semiList.length == 0) return false; -if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";"; -return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0; -}, "~S,~S"); -c$.getQuotedAttribute = Clazz_defineMethod (c$, "getQuotedAttribute", -function (info, name) { -var i = info.indexOf (name + "="); -return (i < 0 ? null : JU.PT.getQuotedStringAt (info, i)); -}, "~S,~S"); -c$.approx = Clazz_defineMethod (c$, "approx", -function (f, n) { -return Math.round (f * n) / n; -}, "~N,~N"); -c$.rep = Clazz_defineMethod (c$, "rep", -function (str, strFrom, strTo) { -if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str; -var isOnce = (strTo.indexOf (strFrom) >= 0); -do { -str = str.$replace (strFrom, strTo); -} while (!isOnce && str.indexOf (strFrom) >= 0); -return str; -}, "~S,~S,~S"); -c$.formatF = Clazz_defineMethod (c$, "formatF", -function (value, width, precision, alignLeft, zeroPad) { -return JU.PT.formatS (JU.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad); -}, "~N,~N,~N,~B,~B"); -c$.formatD = Clazz_defineMethod (c$, "formatD", -function (value, width, precision, alignLeft, zeroPad, allowOverflow) { -return JU.PT.formatS (JU.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad); -}, "~N,~N,~N,~B,~B,~B"); -c$.formatS = Clazz_defineMethod (c$, "formatS", -function (value, width, precision, alignLeft, zeroPad) { -if (value == null) return ""; -var len = value.length; -if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision); - else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1); -var padLength = width - value.length; -if (padLength <= 0) return value; -var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-'); -var padChar = (zeroPad ? '0' : ' '); -var padChar0 = (isNeg ? '-' : padChar); -var sb = new JU.SB (); -if (alignLeft) sb.append (value); -sb.appendC (padChar0); -for (var i = padLength; --i > 0; ) sb.appendC (padChar); - -if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value); -return sb.toString (); -}, "~S,~N,~N,~B,~B"); -c$.replaceWithCharacter = Clazz_defineMethod (c$, "replaceWithCharacter", -function (str, strFrom, chTo) { -if (str == null) return null; -for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo); - -return str; -}, "~S,~S,~S"); -c$.replaceAllCharacters = Clazz_defineMethod (c$, "replaceAllCharacters", -function (str, strFrom, strTo) { -for (var i = strFrom.length; --i >= 0; ) { -var chFrom = strFrom.substring (i, i + 1); -str = JU.PT.rep (str, chFrom, strTo); -} -return str; -}, "~S,~S,~S"); -c$.trim = Clazz_defineMethod (c$, "trim", -function (str, chars) { -if (chars.length == 0) return str.trim (); -var len = str.length; -var k = 0; -while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++; - -var m = str.length - 1; -while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--; - -return str.substring (k, m + 1); -}, "~S,~S"); -c$.trimQuotes = Clazz_defineMethod (c$, "trimQuotes", -function (value) { -return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value); -}, "~S"); -c$.isNonStringPrimitive = Clazz_defineMethod (c$, "isNonStringPrimitive", -function (info) { -return Clazz_instanceOf (info, Number) || Clazz_instanceOf (info, Boolean); -}, "~O"); -c$.arrayGet = Clazz_defineMethod (c$, "arrayGet", - function (info, i) { -{ -return info[i]; -}}, "~O,~N"); -c$.toJSON = Clazz_defineMethod (c$, "toJSON", -function (infoType, info) { -if (info == null) return JU.PT.packageJSON (infoType, null); -if (JU.PT.isNonStringPrimitive (info)) return JU.PT.packageJSON (infoType, info.toString ()); -var s = null; -var sb = null; -while (true) { -if (Clazz_instanceOf (info, String)) { -s = info; -{ -if (typeof s == "undefined") s = "null" -}if (s.indexOf ("{\"") != 0) { -s = JU.PT.rep (s, "\"", "\\\""); -s = JU.PT.rep (s, "\n", "\\n"); -s = "\"" + s + "\""; -}break; -}if (Clazz_instanceOf (info, javajs.api.JSONEncodable)) { -if ((s = (info).toJSON ()) == null) s = "null"; -break; -}sb = new JU.SB (); -if (Clazz_instanceOf (info, java.util.Map)) { -sb.append ("{ "); -var sep = ""; -for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { -sb.append (sep).append (JU.PT.packageJSON (key, JU.PT.toJSON (null, (info).get (key)))); -sep = ","; -} -sb.append (" }"); -break; -}if (Clazz_instanceOf (info, JU.Lst)) { -sb.append ("[ "); -var n = (info).size (); -for (var i = 0; i < n; i++) { -if (i > 0) sb.appendC (','); -sb.append (JU.PT.toJSON (null, (info).get (i))); -} -sb.append (" ]"); -break; -}if (Clazz_instanceOf (info, JU.M34)) { -var len = (Clazz_instanceOf (info, JU.M4) ? 4 : 3); -var x = Clazz_newFloatArray (len, 0); -var m = info; -sb.appendC ('['); -for (var i = 0; i < len; i++) { -if (i > 0) sb.appendC (','); -m.getRow (i, x); -sb.append (JU.PT.toJSON (null, x)); -} -sb.appendC (']'); -break; -}s = JU.PT.nonArrayString (info); -if (s == null) { -sb.append ("["); -var n = JU.AU.getLength (info); -for (var i = 0; i < n; i++) { -if (i > 0) sb.appendC (','); -sb.append (JU.PT.toJSON (null, JU.PT.arrayGet (info, i))); -} -sb.append ("]"); -break; -}info = info.toString (); -} -return JU.PT.packageJSON (infoType, (s == null ? sb.toString () : s)); -}, "~S,~O"); -c$.nonArrayString = Clazz_defineMethod (c$, "nonArrayString", -function (x) { -{ -var s = x.toString(); return (s.startsWith("[object") && -s.endsWith("Array]") ? null : s); -}}, "~O"); -c$.byteArrayToJSON = Clazz_defineMethod (c$, "byteArrayToJSON", -function (data) { -var sb = new JU.SB (); -sb.append ("["); -var n = data.length; -for (var i = 0; i < n; i++) { -if (i > 0) sb.appendC (','); -sb.appendI (data[i] & 0xFF); -} -sb.append ("]"); -return sb.toString (); -}, "~A"); -c$.packageJSON = Clazz_defineMethod (c$, "packageJSON", -function (infoType, info) { -return (infoType == null ? info : "\"" + infoType + "\": " + info); -}, "~S,~S"); -c$.isAS = Clazz_defineMethod (c$, "isAS", -function (x) { -{ -return Clazz_isAS(x); -}}, "~O"); -c$.isASS = Clazz_defineMethod (c$, "isASS", -function (x) { -{ -return Clazz_isASS(x); -}}, "~O"); -c$.isAP = Clazz_defineMethod (c$, "isAP", -function (x) { -{ -return Clazz_isAP(x); -}}, "~O"); -c$.isAF = Clazz_defineMethod (c$, "isAF", -function (x) { -{ -return Clazz_isAF(x); -}}, "~O"); -c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", -function (x) { -{ -return Clazz_isAFloat(x); -}}, "~O"); -c$.isAD = Clazz_defineMethod (c$, "isAD", -function (x) { -{ -return Clazz_isAF(x); -}}, "~O"); -c$.isADD = Clazz_defineMethod (c$, "isADD", -function (x) { -{ -return Clazz_isAFF(x); -}}, "~O"); -c$.isAB = Clazz_defineMethod (c$, "isAB", -function (x) { -{ -return Clazz_isAI(x); -}}, "~O"); -c$.isAI = Clazz_defineMethod (c$, "isAI", -function (x) { -{ -return Clazz_isAI(x); -}}, "~O"); -c$.isAII = Clazz_defineMethod (c$, "isAII", -function (x) { -{ -return Clazz_isAII(x); -}}, "~O"); -c$.isAFF = Clazz_defineMethod (c$, "isAFF", -function (x) { -{ -return Clazz_isAFF(x); -}}, "~O"); -c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", -function (x) { -{ -return Clazz_isAFFF(x); -}}, "~O"); -c$.escapeUrl = Clazz_defineMethod (c$, "escapeUrl", -function (url) { -url = JU.PT.rep (url, "\n", ""); -url = JU.PT.rep (url, "%", "%25"); -url = JU.PT.rep (url, "#", "%23"); -url = JU.PT.rep (url, "[", "%5B"); -url = JU.PT.rep (url, "]", "%5D"); -url = JU.PT.rep (url, " ", "%20"); -return url; -}, "~S"); -c$.esc = Clazz_defineMethod (c$, "esc", -function (str) { -if (str == null || str.length == 0) return "\"\""; -var haveEscape = false; -var i = 0; -for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) { -haveEscape = true; -break; -} -if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) { -var pt = -1; -var ch = "\\\\\tt\rr\nn\"\"".charAt (i++); -var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++); -var sb = new JU.SB (); -var pt0 = 0; -while ((pt = str.indexOf (ch, pt + 1)) >= 0) { -sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2); -pt0 = pt + 1; -} -sb.append (str.substring (pt0, str.length)); -str = sb.toString (); -} -return "\"" + JU.PT.escUnicode (str) + "\""; -}, "~S"); -c$.escUnicode = Clazz_defineMethod (c$, "escUnicode", -function (str) { -for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) { -var s = "0000" + Integer.toHexString (str.charCodeAt (i)); -str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1); -} -return str; -}, "~S"); -c$.escF = Clazz_defineMethod (c$, "escF", -function (f) { -var sf = "" + f; -{ -if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) -sf += ".0"; -}return sf; -}, "~N"); -c$.join = Clazz_defineMethod (c$, "join", -function (s, c, i0) { -if (s.length < i0) return null; -var sb = new JU.SB (); -sb.append (s[i0++]); -for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]); - -return sb.toString (); -}, "~A,~S,~N"); -c$.isLike = Clazz_defineMethod (c$, "isLike", -function (a, b) { -var areEqual = a.equals (b); -if (areEqual) return true; -var isStart = b.startsWith ("*"); -var isEnd = b.endsWith ("*"); -return (!isStart && !isEnd) ? areEqual : isStart && isEnd ? b.length == 1 || a.contains (b.substring (1, b.length - 1)) : isStart ? a.endsWith (b.substring (1)) : a.startsWith (b.substring (0, b.length - 1)); -}, "~S,~S"); -c$.getMapValueNoCase = Clazz_defineMethod (c$, "getMapValueNoCase", -function (h, key) { -if ("this".equals (key)) return h; -var val = h.get (key); -if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue (); - -return val; -}, "java.util.Map,~S"); -c$.getMapSubset = Clazz_defineMethod (c$, "getMapSubset", -function (h, key, h2) { -var val = h.get (key); -if (val != null) { -h2.put (key, val); -return; -}for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) { -var k = e.getKey (); -if (JU.PT.isLike (k, key)) h2.put (k, e.getValue ()); -} -}, "java.util.Map,~S,java.util.Map"); -c$.clean = Clazz_defineMethod (c$, "clean", -function (s) { -return JU.PT.rep (JU.PT.replaceAllCharacters (s, " \t\n\r", " "), " ", " ").trim (); -}, "~S"); -c$.fdup = Clazz_defineMethod (c$, "fdup", -function (f, pt, n) { -var ch; -var count = 0; -for (var i = pt; --i >= 1; ) { -if (JU.PT.isDigit (ch = f.charAt (i))) continue; -switch (ch) { -case '.': -if (count++ != 0) return f; -continue; -case '-': -if (i != 1 && f.charAt (i - 1) != '.') return f; -continue; -default: -return f; -} -} -var s = f.substring (0, pt + 1); -var sb = new JU.SB (); -for (var i = 0; i < n; i++) sb.append (s); - -sb.append (f.substring (pt + 1)); -return sb.toString (); -}, "~S,~N,~N"); -c$.formatString = Clazz_defineMethod (c$, "formatString", -function (strFormat, key, strT, floatT, doubleT, doOne) { -if (strFormat == null) return null; -if ("".equals (strFormat)) return ""; -var len = key.length; -if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat; -var strLabel = ""; -var ich; -var ichPercent; -var ichKey; -for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) { -if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent); -ich = ichPercent + 1; -if (ichKey > ichPercent + 6) { -strLabel += '%'; -continue; -}try { -var alignLeft = false; -if (strFormat.charAt (ich) == '-') { -alignLeft = true; -++ich; -}var zeroPad = false; -if (strFormat.charAt (ich) == '0') { -zeroPad = true; -++ich; -}var ch; -var width = 0; -while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) { -width = (10 * width) + (ch.charCodeAt (0) - 48); -++ich; -} -var precision = 2147483647; -var isExponential = false; -if (strFormat.charAt (ich) == '.') { -++ich; -if ((ch = strFormat.charAt (ich)) == '-') { -isExponential = true; -++ich; -}if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') { -precision = ch.charCodeAt (0) - 48; -++ich; -}if (isExponential) precision = -precision - (strT == null ? 1 : 0); -}var st = strFormat.substring (ich, ich + len); -if (!st.equals (key)) { -ich = ichPercent + 1; -strLabel += '%'; -continue; -}ich += len; -if (!Float.isNaN (floatT)) strLabel += JU.PT.formatF (floatT, width, precision, alignLeft, zeroPad); - else if (strT != null) strLabel += JU.PT.formatS (strT, width, precision, alignLeft, zeroPad); - else if (!Double.isNaN (doubleT)) strLabel += JU.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true); -if (doOne) break; -} catch (ioobe) { -if (Clazz_exceptionOf (ioobe, IndexOutOfBoundsException)) { -ich = ichPercent; -break; -} else { -throw ioobe; -} -} -} -strLabel += strFormat.substring (ich); -return strLabel; -}, "~S,~S,~S,~N,~N,~B"); -c$.formatStringS = Clazz_defineMethod (c$, "formatStringS", -function (strFormat, key, strT) { -return JU.PT.formatString (strFormat, key, strT, NaN, NaN, false); -}, "~S,~S,~S"); -c$.formatStringF = Clazz_defineMethod (c$, "formatStringF", -function (strFormat, key, floatT) { -return JU.PT.formatString (strFormat, key, null, floatT, NaN, false); -}, "~S,~S,~N"); -c$.formatStringI = Clazz_defineMethod (c$, "formatStringI", -function (strFormat, key, intT) { -return JU.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false); -}, "~S,~S,~N"); -c$.sprintf = Clazz_defineMethod (c$, "sprintf", -function (strFormat, list, values) { -if (values == null) return strFormat; -var n = list.length; -if (n == values.length) try { -for (var o = 0; o < n; o++) { -if (values[o] == null) continue; -switch (list.charAt (o)) { -case 's': -strFormat = JU.PT.formatString (strFormat, "s", values[o], NaN, NaN, true); -break; -case 'f': -strFormat = JU.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true); -break; -case 'i': -strFormat = JU.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true); -strFormat = JU.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true); -break; -case 'd': -strFormat = JU.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true); -break; -case 'p': -var pVal = values[o]; -strFormat = JU.PT.formatString (strFormat, "p", null, pVal.x, NaN, true); -strFormat = JU.PT.formatString (strFormat, "p", null, pVal.y, NaN, true); -strFormat = JU.PT.formatString (strFormat, "p", null, pVal.z, NaN, true); -break; -case 'q': -var qVal = values[o]; -strFormat = JU.PT.formatString (strFormat, "q", null, qVal.x, NaN, true); -strFormat = JU.PT.formatString (strFormat, "q", null, qVal.y, NaN, true); -strFormat = JU.PT.formatString (strFormat, "q", null, qVal.z, NaN, true); -strFormat = JU.PT.formatString (strFormat, "q", null, qVal.w, NaN, true); -break; -case 'S': -var sVal = values[o]; -for (var i = 0; i < sVal.length; i++) strFormat = JU.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true); - -break; -case 'F': -var fVal = values[o]; -for (var i = 0; i < fVal.length; i++) strFormat = JU.PT.formatString (strFormat, "f", null, fVal[i], NaN, true); - -break; -case 'I': -var iVal = values[o]; -for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true); - -for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true); - -break; -case 'D': -var dVal = values[o]; -for (var i = 0; i < dVal.length; i++) strFormat = JU.PT.formatString (strFormat, "e", null, NaN, dVal[i], true); - -} -} -return JU.PT.rep (strFormat, "%%", "%"); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -} else { -throw e; -} -} -System.out.println ("TextFormat.sprintf error " + list + " " + strFormat); -return JU.PT.rep (strFormat, "%", "?"); -}, "~S,~S,~A"); -c$.formatCheck = Clazz_defineMethod (c$, "formatCheck", -function (strFormat) { -if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat; -strFormat = JU.PT.rep (strFormat, "%%", "\1"); -strFormat = JU.PT.rep (strFormat, "%p", "%6.2p"); -strFormat = JU.PT.rep (strFormat, "%q", "%6.2q"); -var format = JU.PT.split (strFormat, "%"); -var sb = new JU.SB (); -sb.append (format[0]); -for (var i = 1; i < format.length; i++) { -var f = "%" + format[i]; -var pt; -if (f.length >= 3) { -if ((pt = f.indexOf ('p')) >= 0) f = JU.PT.fdup (f, pt, 3); -if ((pt = f.indexOf ('q')) >= 0) f = JU.PT.fdup (f, pt, 4); -}sb.append (f); -} -return sb.toString ().$replace ('\1', '%'); -}, "~S"); -c$.leftJustify = Clazz_defineMethod (c$, "leftJustify", -function (s, s1, s2) { -s.append (s2); -var n = s1.length - s2.length; -if (n > 0) s.append (s1.substring (0, n)); -}, "JU.SB,~S,~S"); -c$.rightJustify = Clazz_defineMethod (c$, "rightJustify", -function (s, s1, s2) { -var n = s1.length - s2.length; -if (n > 0) s.append (s1.substring (0, n)); -s.append (s2); -}, "JU.SB,~S,~S"); -c$.safeTruncate = Clazz_defineMethod (c$, "safeTruncate", -function (f, n) { -if (f > -0.001 && f < 0.001) f = 0; -return (f + " ").substring (0, n); -}, "~N,~N"); -c$.isWild = Clazz_defineMethod (c$, "isWild", -function (s) { -return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0); -}, "~S"); -c$.isMatch = Clazz_defineMethod (c$, "isMatch", -function (search, match, checkStar, allowInitialStar) { -if (search.equals (match)) return true; -var mLen = match.length; -if (mLen == 0) return false; -var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false); -if (mLen == 1 && isStar0) return true; -var isStar1 = (checkStar && match.endsWith ("*")); -var haveQ = (match.indexOf ('?') >= 0); -if (!haveQ) { -if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1))); - else if (isStar1) return search.startsWith (match.substring (0, mLen - 1)); -}var sLen = search.length; -var qqqq = "????"; -var nq = 4; -while (nq < sLen) { -qqqq += qqqq; -nq += 4; -} -if (checkStar) { -if (isStar0) { -match = qqqq + match.substring (1); -mLen += nq - 1; -}if (isStar1) { -match = match.substring (0, mLen - 1) + qqqq; -mLen += nq - 1; -}}if (mLen < sLen) return false; -var ich = 0; -while (mLen > sLen) { -if (allowInitialStar && match.charAt (ich) == '?') { -++ich; -} else if (match.charAt (ich + mLen - 1) != '?') { -return false; -}--mLen; -} -for (var i = sLen; --i >= 0; ) { -var chm = match.charAt (ich + i); -if (chm == '?') continue; -var chs = search.charAt (i); -if (chm != chs && (chm != '\1' || chs != '?')) return false; -} -return true; -}, "~S,~S,~B,~B"); -c$.replaceQuotedStrings = Clazz_defineMethod (c$, "replaceQuotedStrings", -function (s, list, newList) { -var n = list.size (); -for (var i = 0; i < n; i++) { -var name = list.get (i); -var newName = newList.get (i); -if (!newName.equals (name)) s = JU.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\""); -} -return s; -}, "~S,JU.Lst,JU.Lst"); -c$.replaceStrings = Clazz_defineMethod (c$, "replaceStrings", -function (s, list, newList) { -var n = list.size (); -for (var i = 0; i < n; i++) { -var name = list.get (i); -var newName = newList.get (i); -if (!newName.equals (name)) s = JU.PT.rep (s, name, newName); -} -return s; -}, "~S,JU.Lst,JU.Lst"); -c$.isDigit = Clazz_defineMethod (c$, "isDigit", -function (ch) { -var c = (ch).charCodeAt (0); -return (48 <= c && c <= 57); -}, "~S"); -c$.isUpperCase = Clazz_defineMethod (c$, "isUpperCase", -function (ch) { -var c = (ch).charCodeAt (0); -return (65 <= c && c <= 90); -}, "~S"); -c$.isLowerCase = Clazz_defineMethod (c$, "isLowerCase", -function (ch) { -var c = (ch).charCodeAt (0); -return (97 <= c && c <= 122); -}, "~S"); -c$.isLetter = Clazz_defineMethod (c$, "isLetter", -function (ch) { -var c = (ch).charCodeAt (0); -return (65 <= c && c <= 90 || 97 <= c && c <= 122); -}, "~S"); -c$.isLetterOrDigit = Clazz_defineMethod (c$, "isLetterOrDigit", -function (ch) { -var c = (ch).charCodeAt (0); -return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); -}, "~S"); -c$.isWhitespace = Clazz_defineMethod (c$, "isWhitespace", -function (ch) { -var c = (ch).charCodeAt (0); -return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd); -}, "~S"); -c$.fixPtFloats = Clazz_defineMethod (c$, "fixPtFloats", -function (pt, f) { -pt.x = Math.round (pt.x * f) / f; -pt.y = Math.round (pt.y * f) / f; -pt.z = Math.round (pt.z * f) / f; -}, "JU.T3,~N"); -c$.fixDouble = Clazz_defineMethod (c$, "fixDouble", -function (d, f) { -return Math.round (d * f) / f; -}, "~N,~N"); -c$.parseFloatFraction = Clazz_defineMethod (c$, "parseFloatFraction", -function (s) { -var pt = s.indexOf ("/"); -return (pt < 0 ? JU.PT.parseFloat (s) : JU.PT.parseFloat (s.substring (0, pt)) / JU.PT.parseFloat (s.substring (pt + 1))); -}, "~S"); -Clazz_defineStatics (c$, -"tensScale", Clazz_newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]), -"decimalScale", Clazz_newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]), -"FLOAT_MIN_SAFE", 2E-45, -"escapable", "\\\\\tt\rr\nn\"\"", -"FRACTIONAL_PRECISION", 100000, -"CARTESIAN_PRECISION", 10000); -}); -Clazz_declarePackage ("javajs.api"); -Clazz_declareInterface (javajs.api, "JSONEncodable"); -Clazz_declarePackage ("JU"); -Clazz_load (null, "JU.AU", ["java.util.Arrays", "JU.Lst"], function () { -c$ = Clazz_declareType (JU, "AU"); -c$.ensureLength = Clazz_defineMethod (c$, "ensureLength", -function (array, minimumLength) { -if (array != null && JU.AU.getLength (array) >= minimumLength) return array; -return JU.AU.arrayCopyObject (array, minimumLength); -}, "~O,~N"); -c$.ensureLengthS = Clazz_defineMethod (c$, "ensureLengthS", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return JU.AU.arrayCopyS (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthA = Clazz_defineMethod (c$, "ensureLengthA", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return JU.AU.arrayCopyF (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthI = Clazz_defineMethod (c$, "ensureLengthI", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return JU.AU.arrayCopyI (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthShort = Clazz_defineMethod (c$, "ensureLengthShort", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return JU.AU.arrayCopyShort (array, minimumLength); -}, "~A,~N"); -c$.ensureLengthByte = Clazz_defineMethod (c$, "ensureLengthByte", -function (array, minimumLength) { -if (array != null && array.length >= minimumLength) return array; -return JU.AU.arrayCopyByte (array, minimumLength); -}, "~A,~N"); -c$.doubleLength = Clazz_defineMethod (c$, "doubleLength", -function (array) { -return JU.AU.arrayCopyObject (array, (array == null ? 16 : 2 * JU.AU.getLength (array))); -}, "~O"); -c$.doubleLengthS = Clazz_defineMethod (c$, "doubleLengthS", -function (array) { -return JU.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthF = Clazz_defineMethod (c$, "doubleLengthF", -function (array) { -return JU.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthI = Clazz_defineMethod (c$, "doubleLengthI", -function (array) { -return JU.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthShort = Clazz_defineMethod (c$, "doubleLengthShort", -function (array) { -return JU.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthByte = Clazz_defineMethod (c$, "doubleLengthByte", -function (array) { -return JU.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.doubleLengthBool = Clazz_defineMethod (c$, "doubleLengthBool", -function (array) { -return JU.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length)); -}, "~A"); -c$.deleteElements = Clazz_defineMethod (c$, "deleteElements", -function (array, firstElement, nElements) { -if (nElements == 0 || array == null) return array; -var oldLength = JU.AU.getLength (array); -if (firstElement >= oldLength) return array; -var n = oldLength - (firstElement + nElements); -if (n < 0) n = 0; -var t = JU.AU.newInstanceO (array, firstElement + n); -if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement); -if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n); -return t; -}, "~O,~N,~N"); -c$.arrayCopyObject = Clazz_defineMethod (c$, "arrayCopyObject", -function (array, newLength) { -if (array == null) { -return null; -}var oldLength = JU.AU.getLength (array); -if (newLength == oldLength) return array; -var t = JU.AU.newInstanceO (array, newLength); -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -return t; -}, "~O,~N"); -c$.newInstanceO = Clazz_defineMethod (c$, "newInstanceO", - function (array, n) { -{ -if (!array.getClass().getComponentType) -return new Array(n); -}}, "~O,~N"); -c$.getLength = Clazz_defineMethod (c$, "getLength", -function (array) { -{ -return array.length -}}, "~O"); -c$.arrayCopyS = Clazz_defineMethod (c$, "arrayCopyS", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = new Array (newLength); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyII = Clazz_defineMethod (c$, "arrayCopyII", -function (array, newLength) { -var t = JU.AU.newInt2 (newLength); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyPt = Clazz_defineMethod (c$, "arrayCopyPt", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = new Array (newLength); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyF = Clazz_defineMethod (c$, "arrayCopyF", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz_newFloatArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyI = Clazz_defineMethod (c$, "arrayCopyI", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz_newIntArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyRangeI = Clazz_defineMethod (c$, "arrayCopyRangeI", -function (array, i0, n) { -if (array == null) return null; -var oldLength = array.length; -if (n == -1) n = oldLength; -if (n == -2) n = Clazz_doubleToInt (oldLength / 2); -n = n - i0; -var t = Clazz_newIntArray (n, 0); -System.arraycopy (array, i0, t, 0, n); -return t; -}, "~A,~N,~N"); -c$.arrayCopyRangeRevI = Clazz_defineMethod (c$, "arrayCopyRangeRevI", -function (array, i0, n) { -if (array == null) return null; -var t = JU.AU.arrayCopyRangeI (array, i0, n); -if (n < 0) n = array.length; -for (var i = Clazz_doubleToInt (n / 2); --i >= 0; ) JU.AU.swapInt (t, i, n - 1 - i); - -return t; -}, "~A,~N,~N"); -c$.arrayCopyShort = Clazz_defineMethod (c$, "arrayCopyShort", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz_newShortArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyByte = Clazz_defineMethod (c$, "arrayCopyByte", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz_newByteArray (newLength, 0); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.arrayCopyBool = Clazz_defineMethod (c$, "arrayCopyBool", -function (array, newLength) { -if (newLength < 0) newLength = array.length; -var t = Clazz_newBooleanArray (newLength, false); -if (array != null) { -var oldLength = array.length; -System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength); -}return t; -}, "~A,~N"); -c$.swapInt = Clazz_defineMethod (c$, "swapInt", -function (array, indexA, indexB) { -var t = array[indexA]; -array[indexA] = array[indexB]; -array[indexB] = t; -}, "~A,~N,~N"); -c$.dumpArray = Clazz_defineMethod (c$, "dumpArray", -function (msg, A, x1, x2, y1, y2) { -var s = "dumpArray: " + msg + "\n"; -for (var x = x1; x <= x2; x++) s += "\t*" + x + "*"; - -for (var y = y2; y >= y1; y--) { -s += "\n*" + y + "*"; -for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN); - -} -return s; -}, "~S,~A,~N,~N,~N,~N"); -c$.dumpIntArray = Clazz_defineMethod (c$, "dumpIntArray", -function (A, n) { -var str = ""; -for (var i = 0; i < n; i++) str += " " + A[i]; - -return str; -}, "~A,~N"); -c$.sortedItem = Clazz_defineMethod (c$, "sortedItem", -function (v, n) { -if (v.size () == 0) return null; -if (v.size () == 1) return v.get (0); -var keys = v.toArray ( new Array (v.size ())); -java.util.Arrays.sort (keys); -return keys[n % keys.length]; -}, "JU.Lst,~N"); -c$.createArrayOfArrayList = Clazz_defineMethod (c$, "createArrayOfArrayList", -function (size) { -return new Array (size); -}, "~N"); -c$.createArrayOfHashtable = Clazz_defineMethod (c$, "createArrayOfHashtable", -function (size) { -return new Array (size); -}, "~N"); -c$.swap = Clazz_defineMethod (c$, "swap", -function (o, i, j) { -var oi = o[i]; -o[i] = o[j]; -o[j] = oi; -}, "~A,~N,~N"); -c$.newFloat2 = Clazz_defineMethod (c$, "newFloat2", -function (n) { -{ -return Clazz_newArray(n, null); -}}, "~N"); -c$.newInt2 = Clazz_defineMethod (c$, "newInt2", -function (n) { -{ -return Clazz_newArray(n, null); -}}, "~N"); -c$.newInt3 = Clazz_defineMethod (c$, "newInt3", -function (nx, ny) { -{ -return Clazz_newArray(nx, null); -}}, "~N,~N"); -c$.newFloat3 = Clazz_defineMethod (c$, "newFloat3", -function (nx, ny) { -{ -return Clazz_newArray(nx, null); -}}, "~N,~N"); -c$.newInt4 = Clazz_defineMethod (c$, "newInt4", -function (n) { -{ -return Clazz_newArray(n, null); -}}, "~N"); -c$.newShort2 = Clazz_defineMethod (c$, "newShort2", -function (n) { -{ -return Clazz_newArray(n, null); -}}, "~N"); -c$.newByte2 = Clazz_defineMethod (c$, "newByte2", -function (n) { -{ -return Clazz_newArray(n, null); -}}, "~N"); -c$.newDouble2 = Clazz_defineMethod (c$, "newDouble2", -function (n) { -{ -return Clazz_newArray(n, null); -}}, "~N"); -c$.removeMapKeys = Clazz_defineMethod (c$, "removeMapKeys", -function (map, root) { -var list = new JU.Lst (); -for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key); - -for (var i = list.size (); --i >= 0; ) map.remove (list.get (i)); - -return list.size (); -}, "java.util.Map,~S"); -c$.isAS = Clazz_defineMethod (c$, "isAS", -function (x) { -{ -return Clazz_isAS(x); -}}, "~O"); -c$.isASS = Clazz_defineMethod (c$, "isASS", -function (x) { -{ -return Clazz_isASS(x); -}}, "~O"); -c$.isAP = Clazz_defineMethod (c$, "isAP", -function (x) { -{ -return Clazz_isAP(x); -}}, "~O"); -c$.isAF = Clazz_defineMethod (c$, "isAF", -function (x) { -{ -return Clazz_isAF(x); -}}, "~O"); -c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", -function (x) { -{ -return Clazz_isAFloat(x); -}}, "~O"); -c$.isAD = Clazz_defineMethod (c$, "isAD", -function (x) { -{ -return Clazz_isAF(x); -}}, "~O"); -c$.isADD = Clazz_defineMethod (c$, "isADD", -function (x) { -{ -return Clazz_isAFF(x); -}}, "~O"); -c$.isAB = Clazz_defineMethod (c$, "isAB", -function (x) { -{ -return Clazz_isAI(x); -}}, "~O"); -c$.isAI = Clazz_defineMethod (c$, "isAI", -function (x) { -{ -return Clazz_isAI(x); -}}, "~O"); -c$.isAII = Clazz_defineMethod (c$, "isAII", -function (x) { -{ -return Clazz_isAII(x); -}}, "~O"); -c$.isAFF = Clazz_defineMethod (c$, "isAFF", -function (x) { -{ -return Clazz_isAFF(x); -}}, "~O"); -c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", -function (x) { -{ -return Clazz_isAFFF(x); -}}, "~O"); -c$.ensureSignedBytes = Clazz_defineMethod (c$, "ensureSignedBytes", -function (b) { -if (b != null) { -{ -for (var i = b.length; --i >= 0;) { var j = b[i] & 0xFF; if -(j >= 0x80) j -= 0x100; b[i] = j; } -}}return b; -}, "~A"); -}); -Clazz_declarePackage ("JU"); -Clazz_load (["java.util.ArrayList"], "JU.Lst", null, function () { -c$ = Clazz_declareType (JU, "Lst", java.util.ArrayList); -Clazz_defineMethod (c$, "addLast", -function (v) { -{ -return this.add1(v); -}}, "~O"); -Clazz_defineMethod (c$, "removeObj", -function (v) { -{ -return this.removeObject(v); -}}, "~O"); -}); -Clazz_declarePackage ("JU"); -Clazz_load (["java.lang.Boolean"], "JU.DF", ["java.lang.Double", "$.Float", "JU.PT", "$.SB"], function () { -c$ = Clazz_declareType (JU, "DF"); -c$.setUseNumberLocalization = Clazz_defineMethod (c$, "setUseNumberLocalization", -function (TF) { -JU.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE); -}, "~B"); -c$.formatDecimalDbl = Clazz_defineMethod (c$, "formatDecimalDbl", -function (value, decimalDigits) { -if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value; -return JU.DF.formatDecimal (value, decimalDigits); -}, "~N,~N"); -c$.formatDecimal = Clazz_defineMethod (c$, "formatDecimal", -function (value, decimalDigits) { -if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value; -var n; -if (decimalDigits < 0) { -decimalDigits = -decimalDigits; -if (decimalDigits > JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length; -if (value == 0) return JU.DF.formattingStrings[decimalDigits] + "E+0"; -n = 0; -var d; -if (Math.abs (value) < 1) { -n = 10; -d = value * 1e-10; -} else { -n = -10; -d = value * 1e10; -}var s = ("" + d).toUpperCase (); -var i = s.indexOf ("E"); -n = JU.PT.parseInt (s.substring (i + 1)) + n; -return (i < 0 ? "" + value : JU.DF.formatDecimal (JU.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n); -}if (decimalDigits >= JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length - 1; -var s1 = ("" + value).toUpperCase (); -var pt = s1.indexOf ("."); -if (pt < 0) return s1 + JU.DF.formattingStrings[decimalDigits].substring (1); -var isNeg = s1.startsWith ("-"); -if (isNeg) { -s1 = s1.substring (1); -pt--; -}var pt1 = s1.indexOf ("E-"); -if (pt1 > 0) { -n = JU.PT.parseInt (s1.substring (pt1 + 1)); -s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1); -pt = 1; -}pt1 = s1.indexOf ("E"); -if (pt1 > 0) { -n = JU.PT.parseInt (s1.substring (pt1 + 1)); -s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000"; -s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1); -pt = s1.indexOf ("."); -}var len = s1.length; -var pt2 = decimalDigits + pt + 1; -if (pt2 < len && s1.charAt (pt2) >= '5') { -return JU.DF.formatDecimal (value + (isNeg ? -1 : 1) * JU.DF.formatAdds[decimalDigits], decimalDigits); -}var sb = JU.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt))); -for (var i = 0; i < decimalDigits; i++, pt++) { -if (pt < len) sb.appendC (s1.charAt (pt)); - else sb.appendC ('0'); -} -s1 = (isNeg ? "-" : "") + sb; -return (Boolean.TRUE.equals (JU.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.')); -}, "~N,~N"); -c$.formatDecimalTrimmed = Clazz_defineMethod (c$, "formatDecimalTrimmed", -function (x, precision) { -var str = JU.DF.formatDecimalDbl (x, precision); -var m = str.length - 1; -var zero = '0'; -while (m >= 0 && str.charAt (m) == zero) m--; - -return str.substring (0, m + 1); -}, "~N,~N"); -Clazz_defineStatics (c$, -"formattingStrings", Clazz_newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]), -"zeros", "0000000000000000000000000000000000000000", -"formatAdds", Clazz_newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005])); -c$.useNumberLocalization = c$.prototype.useNumberLocalization = Clazz_newArray (-1, [Boolean.TRUE]); -}); -Clazz_declarePackage ("JU"); -c$ = Clazz_decorateAsClass (function () { -this.sb = null; -this.s = null; -Clazz_instantialize (this, arguments); -}, JU, "SB"); -Clazz_makeConstructor (c$, -function () { -{ -this.s = ""; -}}); -c$.newN = Clazz_defineMethod (c$, "newN", -function (n) { -{ -return new JU.SB(); -}}, "~N"); -c$.newS = Clazz_defineMethod (c$, "newS", -function (s) { -{ -var sb = new JU.SB(); -sb.s = s; -return sb; -}}, "~S"); -Clazz_defineMethod (c$, "append", -function (s) { -{ -this.s += s -}return this; -}, "~S"); -Clazz_defineMethod (c$, "appendC", -function (c) { -{ -this.s += c; -}return this; -}, "~S"); -Clazz_defineMethod (c$, "appendI", -function (i) { -{ -this.s += i -}return this; -}, "~N"); -Clazz_defineMethod (c$, "appendB", -function (b) { -{ -this.s += b -}return this; -}, "~B"); -Clazz_defineMethod (c$, "appendF", -function (f) { -{ -var sf = "" + f; -if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) -sf += ".0" ; -this.s += sf; -}return this; -}, "~N"); -Clazz_defineMethod (c$, "appendD", -function (d) { -{ -var sf = "" + d; -if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0) -sf += ".0" ; -this.s += sf; -}return this; -}, "~N"); -Clazz_defineMethod (c$, "appendSB", -function (buf) { -{ -this.s += buf.s; -}return this; -}, "JU.SB"); -Clazz_defineMethod (c$, "appendO", -function (data) { -if (data != null) { -{ -this.s += data.toString(); -}}return this; -}, "~O"); -Clazz_defineMethod (c$, "appendCB", -function (cb, off, len) { -{ -for (var i = len,j=off; --i >= 0;) -this.s += cb[j++]; -}}, "~A,~N,~N"); -Clazz_overrideMethod (c$, "toString", -function () { -{ -return this.s; -}}); -Clazz_defineMethod (c$, "length", -function () { -{ -return this.s.length; -}}); -Clazz_defineMethod (c$, "indexOf", -function (s) { -{ -return this.s.indexOf(s); -}}, "~S"); -Clazz_defineMethod (c$, "charAt", -function (i) { -{ -return this.s.charAt(i); -}}, "~N"); -Clazz_defineMethod (c$, "charCodeAt", -function (i) { -{ -return this.s.charCodeAt(i); -}}, "~N"); -Clazz_defineMethod (c$, "setLength", -function (n) { -{ -this.s = this.s.substring(0, n); -}}, "~N"); -Clazz_defineMethod (c$, "lastIndexOf", -function (s) { -{ -return this.s.lastIndexOf(s); -}}, "~S"); -Clazz_defineMethod (c$, "indexOf2", -function (s, i) { -{ -return this.s.indexOf(s, i); -}}, "~S,~N"); -Clazz_defineMethod (c$, "substring", -function (i) { -{ -return this.s.substring(i); -}}, "~N"); -Clazz_defineMethod (c$, "substring2", -function (i, j) { -{ -return this.s.substring(i, j); -}}, "~N,~N"); -Clazz_defineMethod (c$, "toBytes", -function (off, len) { -if (len < 0) len = this.length () - off; -var b = Clazz_newByteArray (len, 0); -for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0); - -return b; -}, "~N,~N"); -Clazz_defineMethod (c$, "replace", -function (start, end, str) { -{ -this.s = this.s.substring(0, start) + str + this.s.substring(end); -}}, "~N,~N,~S"); -Clazz_defineMethod (c$, "insert", -function (offset, str) { -this.replace (offset, offset, str); -}, "~N,~S"); -Clazz_declarePackage ("JU"); -Clazz_load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.m00 = 0; -this.m01 = 0; -this.m02 = 0; -this.m10 = 0; -this.m11 = 0; -this.m12 = 0; -this.m20 = 0; -this.m21 = 0; -this.m22 = 0; -Clazz_instantialize (this, arguments); -}, JU, "M34"); -Clazz_defineMethod (c$, "setAA33", -function (a) { -var x = a.x; -var y = a.y; -var z = a.z; -var angle = a.angle; -var n = Math.sqrt (x * x + y * y + z * z); -n = 1 / n; -x *= n; -y *= n; -z *= n; -var c = Math.cos (angle); -var s = Math.sin (angle); -var omc = 1.0 - c; -this.m00 = (c + x * x * omc); -this.m11 = (c + y * y * omc); -this.m22 = (c + z * z * omc); -var tmp1 = x * y * omc; -var tmp2 = z * s; -this.m01 = (tmp1 - tmp2); -this.m10 = (tmp1 + tmp2); -tmp1 = x * z * omc; -tmp2 = y * s; -this.m02 = (tmp1 + tmp2); -this.m20 = (tmp1 - tmp2); -tmp1 = y * z * omc; -tmp2 = x * s; -this.m12 = (tmp1 - tmp2); -this.m21 = (tmp1 + tmp2); -}, "JU.A4"); -Clazz_defineMethod (c$, "rotate", -function (t) { -this.rotate2 (t, t); -}, "JU.T3"); -Clazz_defineMethod (c$, "rotate2", -function (t, result) { -result.set (this.m00 * t.x + this.m01 * t.y + this.m02 * t.z, this.m10 * t.x + this.m11 * t.y + this.m12 * t.z, this.m20 * t.x + this.m21 * t.y + this.m22 * t.z); -}, "JU.T3,JU.T3"); -Clazz_defineMethod (c$, "setM33", -function (m1) { -this.m00 = m1.m00; -this.m01 = m1.m01; -this.m02 = m1.m02; -this.m10 = m1.m10; -this.m11 = m1.m11; -this.m12 = m1.m12; -this.m20 = m1.m20; -this.m21 = m1.m21; -this.m22 = m1.m22; -}, "JU.M34"); -Clazz_defineMethod (c$, "clear33", -function () { -this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0; -}); -Clazz_defineMethod (c$, "set33", -function (row, col, v) { -switch (row) { -case 0: -switch (col) { -case 0: -this.m00 = v; -return; -case 1: -this.m01 = v; -return; -case 2: -this.m02 = v; -return; -} -break; -case 1: -switch (col) { -case 0: -this.m10 = v; -return; -case 1: -this.m11 = v; -return; -case 2: -this.m12 = v; -return; -} -break; -case 2: -switch (col) { -case 0: -this.m20 = v; -return; -case 1: -this.m21 = v; -return; -case 2: -this.m22 = v; -return; -} -break; -} -this.err (); -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "get33", -function (row, col) { -switch (row) { -case 0: -switch (col) { -case 0: -return this.m00; -case 1: -return this.m01; -case 2: -return this.m02; -} -break; -case 1: -switch (col) { -case 0: -return this.m10; -case 1: -return this.m11; -case 2: -return this.m12; -} -break; -case 2: -switch (col) { -case 0: -return this.m20; -case 1: -return this.m21; -case 2: -return this.m22; -} -break; -} -this.err (); -return 0; -}, "~N,~N"); -Clazz_defineMethod (c$, "setRow33", -function (row, v) { -switch (row) { -case 0: -this.m00 = v[0]; -this.m01 = v[1]; -this.m02 = v[2]; -return; -case 1: -this.m10 = v[0]; -this.m11 = v[1]; -this.m12 = v[2]; -return; -case 2: -this.m20 = v[0]; -this.m21 = v[1]; -this.m22 = v[2]; -return; -default: -this.err (); -} -}, "~N,~A"); -Clazz_defineMethod (c$, "getRow33", -function (row, v) { -switch (row) { -case 0: -v[0] = this.m00; -v[1] = this.m01; -v[2] = this.m02; -return; -case 1: -v[0] = this.m10; -v[1] = this.m11; -v[2] = this.m12; -return; -case 2: -v[0] = this.m20; -v[1] = this.m21; -v[2] = this.m22; -return; -} -this.err (); -}, "~N,~A"); -Clazz_defineMethod (c$, "setColumn33", -function (column, v) { -switch (column) { -case 0: -this.m00 = v[0]; -this.m10 = v[1]; -this.m20 = v[2]; -break; -case 1: -this.m01 = v[0]; -this.m11 = v[1]; -this.m21 = v[2]; -break; -case 2: -this.m02 = v[0]; -this.m12 = v[1]; -this.m22 = v[2]; -break; -default: -this.err (); -} -}, "~N,~A"); -Clazz_defineMethod (c$, "getColumn33", -function (column, v) { -switch (column) { -case 0: -v[0] = this.m00; -v[1] = this.m10; -v[2] = this.m20; -break; -case 1: -v[0] = this.m01; -v[1] = this.m11; -v[2] = this.m21; -break; -case 2: -v[0] = this.m02; -v[1] = this.m12; -v[2] = this.m22; -break; -default: -this.err (); -} -}, "~N,~A"); -Clazz_defineMethod (c$, "add33", -function (m1) { -this.m00 += m1.m00; -this.m01 += m1.m01; -this.m02 += m1.m02; -this.m10 += m1.m10; -this.m11 += m1.m11; -this.m12 += m1.m12; -this.m20 += m1.m20; -this.m21 += m1.m21; -this.m22 += m1.m22; -}, "JU.M34"); -Clazz_defineMethod (c$, "sub33", -function (m1) { -this.m00 -= m1.m00; -this.m01 -= m1.m01; -this.m02 -= m1.m02; -this.m10 -= m1.m10; -this.m11 -= m1.m11; -this.m12 -= m1.m12; -this.m20 -= m1.m20; -this.m21 -= m1.m21; -this.m22 -= m1.m22; -}, "JU.M34"); -Clazz_defineMethod (c$, "mul33", -function (x) { -this.m00 *= x; -this.m01 *= x; -this.m02 *= x; -this.m10 *= x; -this.m11 *= x; -this.m12 *= x; -this.m20 *= x; -this.m21 *= x; -this.m22 *= x; -}, "~N"); -Clazz_defineMethod (c$, "transpose33", -function () { -var tmp = this.m01; -this.m01 = this.m10; -this.m10 = tmp; -tmp = this.m02; -this.m02 = this.m20; -this.m20 = tmp; -tmp = this.m12; -this.m12 = this.m21; -this.m21 = tmp; -}); -Clazz_defineMethod (c$, "setXRot", -function (angle) { -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = 1.0; -this.m01 = 0.0; -this.m02 = 0.0; -this.m10 = 0.0; -this.m11 = c; -this.m12 = -s; -this.m20 = 0.0; -this.m21 = s; -this.m22 = c; -}, "~N"); -Clazz_defineMethod (c$, "setYRot", -function (angle) { -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = c; -this.m01 = 0.0; -this.m02 = s; -this.m10 = 0.0; -this.m11 = 1.0; -this.m12 = 0.0; -this.m20 = -s; -this.m21 = 0.0; -this.m22 = c; -}, "~N"); -Clazz_defineMethod (c$, "setZRot", -function (angle) { -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = c; -this.m01 = -s; -this.m02 = 0.0; -this.m10 = s; -this.m11 = c; -this.m12 = 0.0; -this.m20 = 0.0; -this.m21 = 0.0; -this.m22 = 1.0; -}, "~N"); -Clazz_defineMethod (c$, "determinant3", -function () { -return this.m00 * (this.m11 * this.m22 - this.m21 * this.m12) - this.m01 * (this.m10 * this.m22 - this.m20 * this.m12) + this.m02 * (this.m10 * this.m21 - this.m20 * this.m11); -}); -Clazz_defineMethod (c$, "err", -function () { -throw new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds"); -}); -}); -Clazz_declarePackage ("JU"); -Clazz_load (["JU.M34"], "JU.M4", ["JU.T3"], function () { -c$ = Clazz_decorateAsClass (function () { -this.m03 = 0; -this.m13 = 0; -this.m23 = 0; -this.m30 = 0; -this.m31 = 0; -this.m32 = 0; -this.m33 = 0; -Clazz_instantialize (this, arguments); -}, JU, "M4", JU.M34); -c$.newA16 = Clazz_defineMethod (c$, "newA16", -function (v) { -var m = new JU.M4 (); -m.m00 = v[0]; -m.m01 = v[1]; -m.m02 = v[2]; -m.m03 = v[3]; -m.m10 = v[4]; -m.m11 = v[5]; -m.m12 = v[6]; -m.m13 = v[7]; -m.m20 = v[8]; -m.m21 = v[9]; -m.m22 = v[10]; -m.m23 = v[11]; -m.m30 = v[12]; -m.m31 = v[13]; -m.m32 = v[14]; -m.m33 = v[15]; -return m; -}, "~A"); -c$.newM4 = Clazz_defineMethod (c$, "newM4", -function (m1) { -var m = new JU.M4 (); -if (m1 == null) { -m.setIdentity (); -return m; -}m.setToM3 (m1); -m.m03 = m1.m03; -m.m13 = m1.m13; -m.m23 = m1.m23; -m.m30 = m1.m30; -m.m31 = m1.m31; -m.m32 = m1.m32; -m.m33 = m1.m33; -return m; -}, "JU.M4"); -c$.newMV = Clazz_defineMethod (c$, "newMV", -function (m1, t) { -var m = new JU.M4 (); -m.setMV (m1, t); -return m; -}, "JU.M3,JU.T3"); -Clazz_defineMethod (c$, "setZero", -function () { -this.clear33 (); -this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0; -}); -Clazz_defineMethod (c$, "setIdentity", -function () { -this.setZero (); -this.m00 = this.m11 = this.m22 = this.m33 = 1.0; -}); -Clazz_defineMethod (c$, "setM4", -function (m1) { -this.setM33 (m1); -this.m03 = m1.m03; -this.m13 = m1.m13; -this.m23 = m1.m23; -this.m30 = m1.m30; -this.m31 = m1.m31; -this.m32 = m1.m32; -this.m33 = m1.m33; -return this; -}, "JU.M4"); -Clazz_defineMethod (c$, "setMV", -function (m1, t) { -this.setM33 (m1); -this.setTranslation (t); -this.m33 = 1; -}, "JU.M3,JU.T3"); -Clazz_defineMethod (c$, "setToM3", -function (m1) { -this.setM33 (m1); -this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0; -this.m33 = 1.0; -}, "JU.M34"); -Clazz_defineMethod (c$, "setToAA", -function (a) { -this.setIdentity (); -this.setAA33 (a); -}, "JU.A4"); -Clazz_defineMethod (c$, "setA", -function (m) { -this.m00 = m[0]; -this.m01 = m[1]; -this.m02 = m[2]; -this.m03 = m[3]; -this.m10 = m[4]; -this.m11 = m[5]; -this.m12 = m[6]; -this.m13 = m[7]; -this.m20 = m[8]; -this.m21 = m[9]; -this.m22 = m[10]; -this.m23 = m[11]; -this.m30 = m[12]; -this.m31 = m[13]; -this.m32 = m[14]; -this.m33 = m[15]; -}, "~A"); -Clazz_defineMethod (c$, "setTranslation", -function (trans) { -this.m03 = trans.x; -this.m13 = trans.y; -this.m23 = trans.z; -}, "JU.T3"); -Clazz_defineMethod (c$, "setElement", -function (row, col, v) { -if (row < 3 && col < 3) { -this.set33 (row, col, v); -return; -}if (row > 3 || col > 3) this.err (); -switch (row) { -case 0: -this.m03 = v; -return; -case 1: -this.m13 = v; -return; -case 2: -this.m23 = v; -return; -} -switch (col) { -case 0: -this.m30 = v; -return; -case 1: -this.m31 = v; -return; -case 2: -this.m32 = v; -return; -case 3: -this.m33 = v; -return; -} -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "getElement", -function (row, col) { -if (row < 3 && col < 3) return this.get33 (row, col); -if (row > 3 || col > 3) { -this.err (); -return 0; -}switch (row) { -case 0: -return this.m03; -case 1: -return this.m13; -case 2: -return this.m23; -default: -switch (col) { -case 0: -return this.m30; -case 1: -return this.m31; -case 2: -return this.m32; -default: -return this.m33; -} -} -}, "~N,~N"); -Clazz_defineMethod (c$, "getTranslation", -function (trans) { -trans.x = this.m03; -trans.y = this.m13; -trans.z = this.m23; -}, "JU.T3"); -Clazz_defineMethod (c$, "getRotationScale", -function (m1) { -m1.m00 = this.m00; -m1.m01 = this.m01; -m1.m02 = this.m02; -m1.m10 = this.m10; -m1.m11 = this.m11; -m1.m12 = this.m12; -m1.m20 = this.m20; -m1.m21 = this.m21; -m1.m22 = this.m22; -}, "JU.M3"); -Clazz_defineMethod (c$, "setRotationScale", -function (m1) { -this.m00 = m1.m00; -this.m01 = m1.m01; -this.m02 = m1.m02; -this.m10 = m1.m10; -this.m11 = m1.m11; -this.m12 = m1.m12; -this.m20 = m1.m20; -this.m21 = m1.m21; -this.m22 = m1.m22; -}, "JU.M3"); -Clazz_defineMethod (c$, "setRowA", -function (row, v) { -if (row < 3) this.setRow33 (row, v); -switch (row) { -case 0: -this.m03 = v[3]; -return; -case 1: -this.m13 = v[3]; -return; -case 2: -this.m23 = v[3]; -return; -case 3: -this.m30 = v[0]; -this.m31 = v[1]; -this.m32 = v[2]; -this.m33 = v[3]; -return; -} -this.err (); -}, "~N,~A"); -Clazz_overrideMethod (c$, "getRow", -function (row, v) { -if (row < 3) this.getRow33 (row, v); -switch (row) { -case 0: -v[3] = this.m03; -return; -case 1: -v[3] = this.m13; -return; -case 2: -v[3] = this.m23; -return; -case 3: -v[0] = this.m30; -v[1] = this.m31; -v[2] = this.m32; -v[3] = this.m33; -return; -} -this.err (); -}, "~N,~A"); -Clazz_defineMethod (c$, "setColumn4", -function (column, x, y, z, w) { -if (column == 0) { -this.m00 = x; -this.m10 = y; -this.m20 = z; -this.m30 = w; -} else if (column == 1) { -this.m01 = x; -this.m11 = y; -this.m21 = z; -this.m31 = w; -} else if (column == 2) { -this.m02 = x; -this.m12 = y; -this.m22 = z; -this.m32 = w; -} else if (column == 3) { -this.m03 = x; -this.m13 = y; -this.m23 = z; -this.m33 = w; -} else { -this.err (); -}}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setColumnA", -function (column, v) { -if (column < 3) this.setColumn33 (column, v); -switch (column) { -case 0: -this.m30 = v[3]; -return; -case 1: -this.m31 = v[3]; -return; -case 2: -this.m32 = v[3]; -return; -case 3: -this.m03 = v[0]; -this.m13 = v[1]; -this.m23 = v[2]; -this.m33 = v[3]; -return; -default: -this.err (); -} -}, "~N,~A"); -Clazz_defineMethod (c$, "getColumn", -function (column, v) { -if (column < 3) this.getColumn33 (column, v); -switch (column) { -case 0: -v[3] = this.m30; -return; -case 1: -v[3] = this.m31; -return; -case 2: -v[3] = this.m32; -return; -case 3: -v[0] = this.m03; -v[1] = this.m13; -v[2] = this.m23; -v[3] = this.m33; -return; -default: -this.err (); -} -}, "~N,~A"); -Clazz_defineMethod (c$, "sub", -function (m1) { -this.sub33 (m1); -this.m03 -= m1.m03; -this.m13 -= m1.m13; -this.m23 -= m1.m23; -this.m30 -= m1.m30; -this.m31 -= m1.m31; -this.m32 -= m1.m32; -this.m33 -= m1.m33; -}, "JU.M4"); -Clazz_defineMethod (c$, "transpose", -function () { -this.transpose33 (); -var tmp = this.m03; -this.m03 = this.m30; -this.m30 = tmp; -tmp = this.m13; -this.m13 = this.m31; -this.m31 = tmp; -tmp = this.m23; -this.m23 = this.m32; -this.m32 = tmp; -}); -Clazz_defineMethod (c$, "invert", -function () { -var s = this.determinant4 (); -if (s == 0.0) return this; -s = 1 / s; -this.set (this.m11 * (this.m22 * this.m33 - this.m23 * this.m32) + this.m12 * (this.m23 * this.m31 - this.m21 * this.m33) + this.m13 * (this.m21 * this.m32 - this.m22 * this.m31), this.m21 * (this.m02 * this.m33 - this.m03 * this.m32) + this.m22 * (this.m03 * this.m31 - this.m01 * this.m33) + this.m23 * (this.m01 * this.m32 - this.m02 * this.m31), this.m31 * (this.m02 * this.m13 - this.m03 * this.m12) + this.m32 * (this.m03 * this.m11 - this.m01 * this.m13) + this.m33 * (this.m01 * this.m12 - this.m02 * this.m11), this.m01 * (this.m13 * this.m22 - this.m12 * this.m23) + this.m02 * (this.m11 * this.m23 - this.m13 * this.m21) + this.m03 * (this.m12 * this.m21 - this.m11 * this.m22), this.m12 * (this.m20 * this.m33 - this.m23 * this.m30) + this.m13 * (this.m22 * this.m30 - this.m20 * this.m32) + this.m10 * (this.m23 * this.m32 - this.m22 * this.m33), this.m22 * (this.m00 * this.m33 - this.m03 * this.m30) + this.m23 * (this.m02 * this.m30 - this.m00 * this.m32) + this.m20 * (this.m03 * this.m32 - this.m02 * this.m33), this.m32 * (this.m00 * this.m13 - this.m03 * this.m10) + this.m33 * (this.m02 * this.m10 - this.m00 * this.m12) + this.m30 * (this.m03 * this.m12 - this.m02 * this.m13), this.m02 * (this.m13 * this.m20 - this.m10 * this.m23) + this.m03 * (this.m10 * this.m22 - this.m12 * this.m20) + this.m00 * (this.m12 * this.m23 - this.m13 * this.m22), this.m13 * (this.m20 * this.m31 - this.m21 * this.m30) + this.m10 * (this.m21 * this.m33 - this.m23 * this.m31) + this.m11 * (this.m23 * this.m30 - this.m20 * this.m33), this.m23 * (this.m00 * this.m31 - this.m01 * this.m30) + this.m20 * (this.m01 * this.m33 - this.m03 * this.m31) + this.m21 * (this.m03 * this.m30 - this.m00 * this.m33), this.m33 * (this.m00 * this.m11 - this.m01 * this.m10) + this.m30 * (this.m01 * this.m13 - this.m03 * this.m11) + this.m31 * (this.m03 * this.m10 - this.m00 * this.m13), this.m03 * (this.m11 * this.m20 - this.m10 * this.m21) + this.m00 * (this.m13 * this.m21 - this.m11 * this.m23) + this.m01 * (this.m10 * this.m23 - this.m13 * this.m20), this.m10 * (this.m22 * this.m31 - this.m21 * this.m32) + this.m11 * (this.m20 * this.m32 - this.m22 * this.m30) + this.m12 * (this.m21 * this.m30 - this.m20 * this.m31), this.m20 * (this.m02 * this.m31 - this.m01 * this.m32) + this.m21 * (this.m00 * this.m32 - this.m02 * this.m30) + this.m22 * (this.m01 * this.m30 - this.m00 * this.m31), this.m30 * (this.m02 * this.m11 - this.m01 * this.m12) + this.m31 * (this.m00 * this.m12 - this.m02 * this.m10) + this.m32 * (this.m01 * this.m10 - this.m00 * this.m11), this.m00 * (this.m11 * this.m22 - this.m12 * this.m21) + this.m01 * (this.m12 * this.m20 - this.m10 * this.m22) + this.m02 * (this.m10 * this.m21 - this.m11 * this.m20)); -this.scale (s); -return this; -}); -Clazz_defineMethod (c$, "set", - function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { -this.m00 = m00; -this.m01 = m01; -this.m02 = m02; -this.m03 = m03; -this.m10 = m10; -this.m11 = m11; -this.m12 = m12; -this.m13 = m13; -this.m20 = m20; -this.m21 = m21; -this.m22 = m22; -this.m23 = m23; -this.m30 = m30; -this.m31 = m31; -this.m32 = m32; -this.m33 = m33; -}, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "determinant4", -function () { -return (this.m00 * this.m11 - this.m01 * this.m10) * (this.m22 * this.m33 - this.m23 * this.m32) - (this.m00 * this.m12 - this.m02 * this.m10) * (this.m21 * this.m33 - this.m23 * this.m31) + (this.m00 * this.m13 - this.m03 * this.m10) * (this.m21 * this.m32 - this.m22 * this.m31) + (this.m01 * this.m12 - this.m02 * this.m11) * (this.m20 * this.m33 - this.m23 * this.m30) - (this.m01 * this.m13 - this.m03 * this.m11) * (this.m20 * this.m32 - this.m22 * this.m30) + (this.m02 * this.m13 - this.m03 * this.m12) * (this.m20 * this.m31 - this.m21 * this.m30); -}); -Clazz_defineMethod (c$, "scale", - function (scalar) { -this.mul33 (scalar); -this.m03 *= scalar; -this.m13 *= scalar; -this.m23 *= scalar; -this.m30 *= scalar; -this.m31 *= scalar; -this.m32 *= scalar; -this.m33 *= scalar; -}, "~N"); -Clazz_defineMethod (c$, "mul", -function (m1) { -this.mul2 (this, m1); -}, "JU.M4"); -Clazz_defineMethod (c$, "mul2", -function (m1, m2) { -this.set (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20 + m1.m03 * m2.m30, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21 + m1.m03 * m2.m31, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22 + m1.m03 * m2.m32, m1.m00 * m2.m03 + m1.m01 * m2.m13 + m1.m02 * m2.m23 + m1.m03 * m2.m33, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20 + m1.m13 * m2.m30, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21 + m1.m13 * m2.m31, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22 + m1.m13 * m2.m32, m1.m10 * m2.m03 + m1.m11 * m2.m13 + m1.m12 * m2.m23 + m1.m13 * m2.m33, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20 + m1.m23 * m2.m30, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21 + m1.m23 * m2.m31, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22 + m1.m23 * m2.m32, m1.m20 * m2.m03 + m1.m21 * m2.m13 + m1.m22 * m2.m23 + m1.m23 * m2.m33, m1.m30 * m2.m00 + m1.m31 * m2.m10 + m1.m32 * m2.m20 + m1.m33 * m2.m30, m1.m30 * m2.m01 + m1.m31 * m2.m11 + m1.m32 * m2.m21 + m1.m33 * m2.m31, m1.m30 * m2.m02 + m1.m31 * m2.m12 + m1.m32 * m2.m22 + m1.m33 * m2.m32, m1.m30 * m2.m03 + m1.m31 * m2.m13 + m1.m32 * m2.m23 + m1.m33 * m2.m33); -}, "JU.M4,JU.M4"); -Clazz_defineMethod (c$, "transform", -function (vec) { -this.transform2 (vec, vec); -}, "JU.T4"); -Clazz_defineMethod (c$, "transform2", -function (vec, vecOut) { -vecOut.set4 (this.m00 * vec.x + this.m01 * vec.y + this.m02 * vec.z + this.m03 * vec.w, this.m10 * vec.x + this.m11 * vec.y + this.m12 * vec.z + this.m13 * vec.w, this.m20 * vec.x + this.m21 * vec.y + this.m22 * vec.z + this.m23 * vec.w, this.m30 * vec.x + this.m31 * vec.y + this.m32 * vec.z + this.m33 * vec.w); -}, "JU.T4,JU.T4"); -Clazz_defineMethod (c$, "rotTrans", -function (point) { -this.rotTrans2 (point, point); -}, "JU.T3"); -Clazz_defineMethod (c$, "rotTrans2", -function (point, pointOut) { -pointOut.set (this.m00 * point.x + this.m01 * point.y + this.m02 * point.z + this.m03, this.m10 * point.x + this.m11 * point.y + this.m12 * point.z + this.m13, this.m20 * point.x + this.m21 * point.y + this.m22 * point.z + this.m23); -return pointOut; -}, "JU.T3,JU.T3"); -Clazz_defineMethod (c$, "setAsXYRotation", -function (angle) { -this.setIdentity (); -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m22 = c; -this.m23 = -s; -this.m32 = s; -this.m33 = c; -return this; -}, "~N"); -Clazz_defineMethod (c$, "setAsYZRotation", -function (angle) { -this.setIdentity (); -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m00 = c; -this.m03 = -s; -this.m30 = s; -this.m33 = c; -return this; -}, "~N"); -Clazz_defineMethod (c$, "setAsXZRotation", -function (angle) { -this.setIdentity (); -var c = Math.cos (angle); -var s = Math.sin (angle); -this.m11 = c; -this.m13 = -s; -this.m31 = s; -this.m33 = c; -return this; -}, "~N"); -Clazz_overrideMethod (c$, "equals", -function (o) { -if (!(Clazz_instanceOf (o, JU.M4))) return false; -var m = o; -return (this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m03 == m.m03 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m13 == m.m13 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22 && this.m23 == m.m23 && this.m30 == m.m30 && this.m31 == m.m31 && this.m32 == m.m32 && this.m33 == m.m33); -}, "~O"); -Clazz_overrideMethod (c$, "hashCode", -function () { -return JU.T3.floatToIntBits0 (this.m00) ^ JU.T3.floatToIntBits0 (this.m01) ^ JU.T3.floatToIntBits0 (this.m02) ^ JU.T3.floatToIntBits0 (this.m03) ^ JU.T3.floatToIntBits0 (this.m10) ^ JU.T3.floatToIntBits0 (this.m11) ^ JU.T3.floatToIntBits0 (this.m12) ^ JU.T3.floatToIntBits0 (this.m13) ^ JU.T3.floatToIntBits0 (this.m20) ^ JU.T3.floatToIntBits0 (this.m21) ^ JU.T3.floatToIntBits0 (this.m22) ^ JU.T3.floatToIntBits0 (this.m23) ^ JU.T3.floatToIntBits0 (this.m30) ^ JU.T3.floatToIntBits0 (this.m31) ^ JU.T3.floatToIntBits0 (this.m32) ^ JU.T3.floatToIntBits0 (this.m33); -}); -Clazz_overrideMethod (c$, "toString", -function () { -return "[\n [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "\t" + this.m03 + "]" + "\n [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "\t" + this.m13 + "]" + "\n [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "\t" + this.m23 + "]" + "\n [" + this.m30 + "\t" + this.m31 + "\t" + this.m32 + "\t" + this.m33 + "] ]"; -}); -}); -Clazz_declarePackage ("JU"); -Clazz_load (["javajs.api.JSONEncodable"], "JU.T3", ["java.lang.Float"], function () { -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.z = 0; -Clazz_instantialize (this, arguments); -}, JU, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]); -Clazz_defineMethod (c$, "set", -function (x, y, z) { -this.x = x; -this.y = y; -this.z = z; -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "setA", -function (t) { -this.x = t[0]; -this.y = t[1]; -this.z = t[2]; -}, "~A"); -Clazz_defineMethod (c$, "setT", -function (t1) { -this.x = t1.x; -this.y = t1.y; -this.z = t1.z; -}, "JU.T3"); -Clazz_defineMethod (c$, "add2", -function (t1, t2) { -this.x = t1.x + t2.x; -this.y = t1.y + t2.y; -this.z = t1.z + t2.z; -}, "JU.T3,JU.T3"); -Clazz_defineMethod (c$, "add", -function (t1) { -this.x += t1.x; -this.y += t1.y; -this.z += t1.z; -}, "JU.T3"); -Clazz_defineMethod (c$, "distanceSquared", -function (p1) { -var dx = this.x - p1.x; -var dy = this.y - p1.y; -var dz = this.z - p1.z; -return (dx * dx + dy * dy + dz * dz); -}, "JU.T3"); -Clazz_defineMethod (c$, "distance", -function (p1) { -return Math.sqrt (this.distanceSquared (p1)); -}, "JU.T3"); -Clazz_defineMethod (c$, "sub2", -function (t1, t2) { -this.x = t1.x - t2.x; -this.y = t1.y - t2.y; -this.z = t1.z - t2.z; -}, "JU.T3,JU.T3"); -Clazz_defineMethod (c$, "sub", -function (t1) { -this.x -= t1.x; -this.y -= t1.y; -this.z -= t1.z; -}, "JU.T3"); -Clazz_defineMethod (c$, "scale", -function (s) { -this.x *= s; -this.y *= s; -this.z *= s; -}, "~N"); -Clazz_defineMethod (c$, "add3", -function (a, b, c) { -this.x += a; -this.y += b; -this.z += c; -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "scaleT", -function (p) { -this.x *= p.x; -this.y *= p.y; -this.z *= p.z; -}, "JU.T3"); -Clazz_defineMethod (c$, "scaleAdd2", -function (s, t1, t2) { -this.x = s * t1.x + t2.x; -this.y = s * t1.y + t2.y; -this.z = s * t1.z + t2.z; -}, "~N,JU.T3,JU.T3"); -Clazz_defineMethod (c$, "ave", -function (a, b) { -this.x = (a.x + b.x) / 2; -this.y = (a.y + b.y) / 2; -this.z = (a.z + b.z) / 2; -}, "JU.T3,JU.T3"); -Clazz_defineMethod (c$, "dot", -function (v) { -return this.x * v.x + this.y * v.y + this.z * v.z; -}, "JU.T3"); -Clazz_defineMethod (c$, "lengthSquared", -function () { -return this.x * this.x + this.y * this.y + this.z * this.z; -}); -Clazz_defineMethod (c$, "length", -function () { -return Math.sqrt (this.lengthSquared ()); -}); -Clazz_defineMethod (c$, "normalize", -function () { -var d = this.length (); -this.x /= d; -this.y /= d; -this.z /= d; -}); -Clazz_defineMethod (c$, "cross", -function (v1, v2) { -this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); -}, "JU.T3,JU.T3"); -Clazz_overrideMethod (c$, "hashCode", -function () { -var bits = 1; -bits = 31 * bits + JU.T3.floatToIntBits0 (this.x); -bits = 31 * bits + JU.T3.floatToIntBits0 (this.y); -bits = 31 * bits + JU.T3.floatToIntBits0 (this.z); -return (bits ^ (bits >> 32)); -}); -c$.floatToIntBits0 = Clazz_defineMethod (c$, "floatToIntBits0", -function (f) { -return (f == 0 ? 0 : Float.floatToIntBits (f)); -}, "~N"); -Clazz_overrideMethod (c$, "equals", -function (t1) { -if (!(Clazz_instanceOf (t1, JU.T3))) return false; -var t2 = t1; -return (this.x == t2.x && this.y == t2.y && this.z == t2.z); -}, "~O"); -Clazz_overrideMethod (c$, "toString", -function () { -return "{" + this.x + ", " + this.y + ", " + this.z + "}"; -}); -Clazz_overrideMethod (c$, "toJSON", -function () { -return "[" + this.x + "," + this.y + "," + this.z + "]"; -}); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.LayoutManager2", "javax.swing.AbstractAction", "$.JComponent"], "javax.swing.JRootPane", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.BorderLayout", "$.Dimension", "$.IllegalComponentStateException", "javax.swing.JLayeredPane", "$.JPanel", "$.SwingUtilities", "$.UIManager", "jssun.awt.AppContext"], function () { -c$ = Clazz_decorateAsClass (function () { -this.windowDecorationStyle = 0; -this.menuBar = null; -this.contentPane = null; -this.layeredPane = null; -this.glassPane = null; -this.defaultButton = null; -this.defaultPressAction = null; -this.defaultReleaseAction = null; -this.useTrueDoubleBuffering = true; -if (!Clazz_isClassDefined ("javax.swing.JRootPane.RootLayout")) { -javax.swing.JRootPane.$JRootPane$RootLayout$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "JRootPane", javax.swing.JComponent); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JRootPane, []); -var appletName = jssun.awt.AppContext.getAppContext ().getThreadGroup ().getName (); -this.setName (appletName + ".JRootPane"); -this.setGlassPane (this.createGlassPane ()); -this.setLayeredPane (this.createLayeredPane ()); -this.setContentPane (this.createContentPane ()); -this.setLayout (this.createRootLayout ()); -this.updateUI (); -}); -Clazz_overrideMethod (c$, "setDoubleBuffered", -function (aFlag) { -}, "~B"); -Clazz_defineMethod (c$, "getWindowDecorationStyle", -function () { -return this.windowDecorationStyle; -}); -Clazz_defineMethod (c$, "setWindowDecorationStyle", -function (windowDecorationStyle) { -if (windowDecorationStyle < 0 || windowDecorationStyle > 8) { -throw new IllegalArgumentException ("Invalid decoration style"); -}var oldWindowDecorationStyle = this.getWindowDecorationStyle (); -this.windowDecorationStyle = windowDecorationStyle; -this.firePropertyChangeInt ("windowDecorationStyle", oldWindowDecorationStyle, windowDecorationStyle); -}, "~N"); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "RootPaneUI"; -}); -Clazz_defineMethod (c$, "createLayeredPane", -function () { -var p = new javax.swing.JLayeredPane (); -p.setName (this.getName () + ".layeredPane"); -return p; -}); -Clazz_defineMethod (c$, "createContentPane", -function () { -var c = new javax.swing.JPanel (); -c.setName (this.getName () + ".contentPane"); -c.setLayout (((Clazz_isClassDefined ("javax.swing.JRootPane$1") ? 0 : javax.swing.JRootPane.$JRootPane$1$ ()), Clazz_innerTypeInstance (javax.swing.JRootPane$1, this, null))); -return c; -}); -Clazz_defineMethod (c$, "createGlassPane", -function () { -var c = new javax.swing.JPanel (); -c.setName (this.getName () + ".glassPane"); -c.setVisible (false); -(c).setOpaque (false); -return c; -}); -Clazz_defineMethod (c$, "createRootLayout", -function () { -return Clazz_innerTypeInstance (javax.swing.JRootPane.RootLayout, this, null); -}); -Clazz_defineMethod (c$, "setJMenuBar", -function (menu) { -if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar); -this.menuBar = menu; -if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER); -}, "javax.swing.JMenuBar"); -Clazz_defineMethod (c$, "setMenuBar", -function (menu) { -if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar); -this.menuBar = menu; -if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER); -}, "javax.swing.JMenuBar"); -Clazz_defineMethod (c$, "getJMenuBar", -function () { -return this.menuBar; -}); -Clazz_defineMethod (c$, "getMenuBar", -function () { -return this.menuBar; -}); -Clazz_defineMethod (c$, "setContentPane", -function (content) { -if (content == null) throw new java.awt.IllegalComponentStateException ("contentPane cannot be set to null."); -if (this.contentPane != null && this.contentPane.getParent () === this.layeredPane) this.layeredPane.remove (this.contentPane); -this.contentPane = content; -this.layeredPane.add (this.contentPane, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER); -}, "java.awt.Container"); -Clazz_defineMethod (c$, "getContentPane", -function () { -return this.contentPane; -}); -Clazz_defineMethod (c$, "setLayeredPane", -function (layered) { -if (layered == null) throw new java.awt.IllegalComponentStateException ("layeredPane cannot be set to null."); -if (this.layeredPane != null && this.layeredPane.getParent () === this) this.remove (this.layeredPane); -this.layeredPane = layered; -this.add (this.layeredPane, -1); -}, "javax.swing.JLayeredPane"); -Clazz_defineMethod (c$, "getLayeredPane", -function () { -return this.layeredPane; -}); -Clazz_defineMethod (c$, "setGlassPane", -function (glass) { -if (glass == null) { -throw new NullPointerException ("glassPane cannot be set to null."); -}var visible = false; -if (this.glassPane != null && this.glassPane.getParent () === this) { -this.remove (this.glassPane); -visible = this.glassPane.isVisible (); -}glass.setVisible (visible); -this.glassPane = glass; -this.add (this.glassPane, 0); -if (visible) { -this.repaint (); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "getGlassPane", -function () { -return this.glassPane; -}); -Clazz_overrideMethod (c$, "isValidateRoot", -function () { -return true; -}); -Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", -function () { -return !this.glassPane.isVisible (); -}); -Clazz_defineMethod (c$, "addNotify", -function () { -Clazz_superCall (this, javax.swing.JRootPane, "addNotify", []); -this.enableEvents (8); -}); -Clazz_defineMethod (c$, "setDefaultButton", -function (defaultButton) { -var oldDefault = this.defaultButton; -if (oldDefault !== defaultButton) { -this.defaultButton = defaultButton; -if (oldDefault != null) { -oldDefault.repaint (); -}if (defaultButton != null) { -defaultButton.repaint (); -}}this.firePropertyChangeObject ("defaultButton", oldDefault, defaultButton); -}, "javax.swing.JButton"); -Clazz_defineMethod (c$, "getDefaultButton", -function () { -return this.defaultButton; -}); -Clazz_defineMethod (c$, "setUseTrueDoubleBuffering", -function (useTrueDoubleBuffering) { -this.useTrueDoubleBuffering = useTrueDoubleBuffering; -}, "~B"); -Clazz_defineMethod (c$, "getUseTrueDoubleBuffering", -function () { -return this.useTrueDoubleBuffering; -}); -Clazz_defineMethod (c$, "disableTrueDoubleBuffering", -function () { -}); -Clazz_overrideMethod (c$, "addImpl", -function (comp, constraints, index) { -this.addImplSAEM (comp, constraints, index); -if (this.glassPane != null && this.glassPane.getParent () === this && this.getComponent (0) !== this.glassPane) { -this.add (this.glassPane, 0); -}return comp; -}, "java.awt.Component,~O,~N"); -c$.$JRootPane$RootLayout$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -Clazz_instantialize (this, arguments); -}, javax.swing.JRootPane, "RootLayout", null, java.awt.LayoutManager2); -Clazz_overrideMethod (c$, "preferredLayoutSize", -function (a) { -var b; -var c; -var d = this.b$["javax.swing.JRootPane"].getInsets (); -if (this.b$["javax.swing.JRootPane"].contentPane != null) { -b = this.b$["javax.swing.JRootPane"].contentPane.getPreferredSize (); -} else { -b = a.getSize (); -}if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { -c = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize (); -} else { -c = new java.awt.Dimension (0, 0); -}return new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "minimumLayoutSize", -function (a) { -var b; -var c; -var d = this.b$["javax.swing.JRootPane"].getInsets (); -if (this.b$["javax.swing.JRootPane"].contentPane != null) { -b = this.b$["javax.swing.JRootPane"].contentPane.getMinimumSize (); -} else { -b = a.getSize (); -}if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { -c = this.b$["javax.swing.JRootPane"].menuBar.getMinimumSize (); -} else { -c = new java.awt.Dimension (0, 0); -}return new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "maximumLayoutSize", -function (a) { -var b; -var c; -var d = this.b$["javax.swing.JRootPane"].getInsets (); -if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { -c = this.b$["javax.swing.JRootPane"].menuBar.getMaximumSize (); -} else { -c = new java.awt.Dimension (0, 0); -}if (this.b$["javax.swing.JRootPane"].contentPane != null) { -b = this.b$["javax.swing.JRootPane"].contentPane.getMaximumSize (); -} else { -b = new java.awt.Dimension (2147483647, 2147483647 - d.top - d.bottom - c.height - 1); -}return new java.awt.Dimension (Math.min (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "layoutContainer", -function (a) { -var b = a.getBounds (); -var c = this.b$["javax.swing.JRootPane"].getInsets (); -var d = 0; -var e = b.width - c.right - c.left; -var f = b.height - c.top - c.bottom; -if (this.b$["javax.swing.JRootPane"].layeredPane != null) { -this.b$["javax.swing.JRootPane"].layeredPane.setBounds (c.left, c.top, e, f); -}if (this.b$["javax.swing.JRootPane"].glassPane != null) { -this.b$["javax.swing.JRootPane"].glassPane.setBounds (c.left, c.top, e, f); -}if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) { -var g = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize (); -this.b$["javax.swing.JRootPane"].menuBar.setBounds (0, 0, e, g.height); -d += g.height; -}if (this.b$["javax.swing.JRootPane"].contentPane != null) { -this.b$["javax.swing.JRootPane"].contentPane.setBounds (0, d, e, f - d); -}}, "java.awt.Container"); -Clazz_defineMethod (c$, "addLayoutComponent", -function (a, b) { -}, "~S,java.awt.Component"); -Clazz_overrideMethod (c$, "removeLayoutComponent", -function (a) { -}, "java.awt.Component"); -Clazz_defineMethod (c$, "addLayoutComponent", -function (a, b) { -}, "java.awt.Component,~O"); -Clazz_overrideMethod (c$, "getLayoutAlignmentX", -function (a) { -return 0.0; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayoutAlignmentY", -function (a) { -return 0.0; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "invalidateLayout", -function (a) { -}, "java.awt.Container"); -c$ = Clazz_p0p (); -}; -c$.$JRootPane$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (javax.swing, "JRootPane$1", java.awt.BorderLayout); -Clazz_defineMethod (c$, "addLayoutComponent", -function (comp, constraints) { -if (constraints == null) { -constraints = "Center"; -}Clazz_superCall (this, javax.swing.JRootPane$1, "addLayoutComponent", [comp, constraints]); -}, "java.awt.Component,~O"); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.owner = null; -this.root = null; -this.press = false; -Clazz_instantialize (this, arguments); -}, javax.swing.JRootPane, "DefaultAction", javax.swing.AbstractAction); -Clazz_makeConstructor (c$, -function (a, b) { -Clazz_superConstructor (this, javax.swing.JRootPane.DefaultAction, []); -this.root = a; -this.press = b; -}, "javax.swing.JRootPane,~B"); -Clazz_defineMethod (c$, "setOwner", -function (a) { -this.owner = a; -}, "javax.swing.JButton"); -Clazz_overrideMethod (c$, "actionPerformed", -function (a) { -if (this.owner != null && javax.swing.SwingUtilities.getRootPane (this.owner) === this.root) { -var b = this.owner.getModel (); -if (this.press) { -b.setArmed (true); -b.setPressed (true); -} else { -b.setPressed (false); -}}}, "java.awt.event.ActionEvent"); -Clazz_overrideMethod (c$, "isEnabled", -function () { -return this.owner.getModel ().isEnabled (); -}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"$uiClassID", "RootPaneUI", -"NONE", 0, -"FRAME", 1, -"PLAIN_DIALOG", 2, -"INFORMATION_DIALOG", 3, -"ERROR_DIALOG", 4, -"COLOR_CHOOSER_DIALOG", 5, -"FILE_CHOOSER_DIALOG", 6, -"QUESTION_DIALOG", 7, -"WARNING_DIALOG", 8); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.AbstractButton", "$.DefaultButtonModel"], "javax.swing.JToggleButton", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.InputEvent", "$.ItemEvent", "javax.swing.UIManager"], function () { -c$ = Clazz_declareType (javax.swing, "JToggleButton", javax.swing.AbstractButton); -Clazz_makeConstructor (c$, -function () { -this.construct (null, null, false); -}); -Clazz_makeConstructor (c$, -function (icon) { -this.construct (null, icon, false); -}, "javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (icon, selected) { -this.construct (null, icon, selected); -}, "javax.swing.Icon,~B"); -Clazz_makeConstructor (c$, -function (text) { -this.construct (text, null, false); -}, "~S"); -Clazz_makeConstructor (c$, -function (text, selected) { -this.construct (text, null, selected); -}, "~S,~B"); -Clazz_makeConstructor (c$, -function (a) { -this.construct (); -this.setAction (a); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function (text, icon) { -this.construct (text, icon, false); -}, "~S,javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text, icon, selected) { -Clazz_superConstructor (this, javax.swing.JToggleButton, []); -this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ()); -this.model.setSelected (selected); -this.init (text, icon); -}, "~S,javax.swing.Icon,~B"); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "ToggleButtonUI"; -}); -Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", -function () { -return true; -}); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.JToggleButton, "ToggleButtonModel", javax.swing.DefaultButtonModel); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JToggleButton.ToggleButtonModel, []); -}); -Clazz_overrideMethod (c$, "isSelected", -function () { -return (this.stateMask & 2) != 0; -}); -Clazz_overrideMethod (c$, "setSelected", -function (a) { -var b = this.getGroup (); -if (b != null) { -b.setSelected (this, a); -a = b.isSelected (this); -}if (this.isSelected () == a) { -return; -}if (a) { -this.stateMask |= 2; -} else { -this.stateMask &= -3; -}this.fireStateChanged (); -this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, this.isSelected () ? 1 : 2)); -}, "~B"); -Clazz_overrideMethod (c$, "setPressed", -function (a) { -if ((this.isPressed () == a) || !this.isEnabled ()) { -return; -}if (a == false && this.isArmed ()) { -this.setSelected (!this.isSelected ()); -}if (a) { -this.stateMask |= 4; -} else { -this.stateMask &= -5; -}this.fireStateChanged (); -if (!this.isPressed () && this.isArmed ()) { -var b = 0; -var c = java.awt.EventQueue.getCurrentEvent (); -if (Clazz_instanceOf (c, java.awt.event.InputEvent)) { -b = (c).getModifiers (); -} else if (Clazz_instanceOf (c, java.awt.event.ActionEvent)) { -b = (c).getModifiers (); -}this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), b)); -}}, "~B"); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"$uiClassID", "ToggleButtonUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.ItemSelectable"], "javax.swing.ButtonModel", null, function () { -Clazz_declareInterface (javax.swing, "ButtonModel", java.awt.ItemSelectable); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JRadioButton", ["javax.swing.UIManager"], function () { -c$ = Clazz_declareType (javax.swing, "JRadioButton", javax.swing.JToggleButton); -Clazz_makeConstructor (c$, -function () { -this.construct (null, null, false); -}); -Clazz_makeConstructor (c$, -function (icon) { -this.construct (null, icon, false); -}, "javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (a) { -this.construct (); -this.setAction (a); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function (icon, selected) { -this.construct (null, icon, selected); -}, "javax.swing.Icon,~B"); -Clazz_makeConstructor (c$, -function (text) { -this.construct (text, null, false); -}, "~S"); -Clazz_makeConstructor (c$, -function (text, selected) { -this.construct (text, null, selected); -}, "~S,~B"); -Clazz_makeConstructor (c$, -function (text, icon) { -this.construct (text, icon, false); -}, "~S,javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text, icon, selected) { -Clazz_superConstructor (this, javax.swing.JRadioButton, [text, icon, selected]); -this.setBorderPainted (false); -this.setHorizontalAlignment (10); -}, "~S,javax.swing.Icon,~B"); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "RadioButtonUI"; -}); -Clazz_overrideMethod (c$, "setIconFromAction", -function (a) { -}, "javax.swing.Action"); -Clazz_defineStatics (c$, -"$$uiClassID", "RadioButtonUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.applet.Applet", "javax.swing.RootPaneContainer"], "javax.swing.JApplet", ["java.awt.BorderLayout", "$.Color", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () { -c$ = Clazz_decorateAsClass (function () { -this.rootPane = null; -this.rootPaneCheckingEnabled = false; -this.transferHandler = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JApplet", java.applet.Applet, javax.swing.RootPaneContainer); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JApplet, []); -this.setJApplet (); -}); -Clazz_defineMethod (c$, "setJApplet", - function () { -this.setPanel (); -this.setForeground (java.awt.Color.black); -this.setBackground (java.awt.Color.white); -this.setLocale (javax.swing.JComponent.getDefaultLocale ()); -this.setLayout ( new java.awt.BorderLayout ()); -this.setRootPane (this.createRootPane ()); -this.setRootPaneCheckingEnabled (true); -this.setFocusTraversalPolicyProvider (true); -this.enableEvents (8); -}); -Clazz_defineMethod (c$, "createRootPane", -function () { -var rp = new javax.swing.JRootPane (); -rp.setOpaque (true); -return rp; -}); -Clazz_defineMethod (c$, "setTransferHandler", -function (newHandler) { -var oldHandler = this.transferHandler; -this.transferHandler = newHandler; -javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); -this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); -}, "javax.swing.TransferHandler"); -Clazz_defineMethod (c$, "getTransferHandler", -function () { -return this.transferHandler; -}); -Clazz_defineMethod (c$, "paint", -function (g) { -this.getContentPane ().paint (g); -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "setJMenuBar", -function (menuBar) { -this.getRootPane ().setMenuBar (menuBar); -}, "javax.swing.JMenuBar"); -Clazz_defineMethod (c$, "getJMenuBar", -function () { -return this.getRootPane ().getMenuBar (); -}); -Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", -function () { -return this.rootPaneCheckingEnabled; -}); -Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", -function (enabled) { -this.rootPaneCheckingEnabled = enabled; -}, "~B"); -Clazz_overrideMethod (c$, "addImpl", -function (comp, constraints, index) { -if (this.isRootPaneCheckingEnabled ()) { -return this.getContentPane ().add (comp, constraints, index); -}return this.addImplSAEM (comp, constraints, index); -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "remove", -function (comp) { -if (comp === this.rootPane) { -this.removeChild (comp); -} else { -this.getContentPane ().removeChild (comp); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "setLayout", -function (manager) { -if (this.isRootPaneCheckingEnabled ()) { -this.getContentPane ().setLayout (manager); -} else { -Clazz_superCall (this, javax.swing.JApplet, "setLayout", [manager]); -}}, "java.awt.LayoutManager"); -Clazz_overrideMethod (c$, "getRootPane", -function () { -return this.rootPane; -}); -Clazz_defineMethod (c$, "setRootPane", -function (root) { -if (this.rootPane != null) { -this.remove (this.rootPane); -}this.rootPane = root; -if (this.rootPane != null) { -var checkingEnabled = this.isRootPaneCheckingEnabled (); -try { -this.setRootPaneCheckingEnabled (false); -this.add (this.rootPane, "Center"); -} finally { -this.setRootPaneCheckingEnabled (checkingEnabled); -} -}}, "javax.swing.JRootPane"); -Clazz_overrideMethod (c$, "getContentPane", -function () { -return this.getRootPane ().getContentPane (); -}); -Clazz_overrideMethod (c$, "setContentPane", -function (contentPane) { -this.getRootPane ().setContentPane (contentPane); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayeredPane", -function () { -return this.getRootPane ().getLayeredPane (); -}); -Clazz_overrideMethod (c$, "setLayeredPane", -function (layeredPane) { -this.getRootPane ().setLayeredPane (layeredPane); -}, "javax.swing.JLayeredPane"); -Clazz_overrideMethod (c$, "getGlassPane", -function () { -return this.getRootPane ().getGlassPane (); -}); -Clazz_overrideMethod (c$, "setGlassPane", -function (glassPane) { -this.getRootPane ().setGlassPane (glassPane); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getGraphics", -function () { -javax.swing.JComponent.getGraphicsInvoked (this); -return Clazz_superCall (this, javax.swing.JApplet, "getGraphics", []); -}); -Clazz_defineMethod (c$, "repaint", -function (time, x, y, width, height) { -if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { -System.out.println ("repaintNow " + this); -javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); -} else { -Clazz_superCall (this, javax.swing.JApplet, "repaint", [time, x, y, width, height]); -}}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "repaintNow", -function () { -this.repaint (100, 0, 0, this.getWidth (), this.getHeight ()); -}); -Clazz_defineMethod (c$, "paramString", -function () { -var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : ""); -var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); -return Clazz_superCall (this, javax.swing.JApplet, "paramString", []) + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; -}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.lang.Thread"], ["java.awt.EventQueueItem", "$.EventQueue", "$.Queue"], ["java.lang.Error", "java.lang.reflect.InvocationTargetException", "java.util.EmptyStackException", "java.awt.ActiveEvent", "$.Component", "$.EventDispatchThread", "$.SentEvent", "$.SequencedEvent", "$.Toolkit", "java.awt.event.ActionEvent", "$.FocusEvent", "$.InputEvent", "$.InputMethodEvent", "$.InvocationEvent", "$.KeyEvent", "$.MouseEvent", "$.PaintEvent", "$.WindowEvent", "jssun.awt.AWTAutoShutdown", "$.AppContext", "$.PeerEvent", "$.SunToolkit", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.queues = null; -this.nextQueue = null; -this.previousQueue = null; -this.dispatchThread = null; -this.threadGroup = null; -this.mostRecentEventTime = 0; -this.currentEvent = null; -this.waitForID = 0; -this.name = null; -Clazz_instantialize (this, arguments); -}, java.awt, "EventQueue"); -Clazz_prepareFields (c$, function () { -this.queues = new Array (4); -this.threadGroup = Thread.currentThread ().getThreadGroup (); -this.mostRecentEventTime = System.currentTimeMillis (); -this.name = "AWT-EventQueue-" + java.awt.EventQueue.nextThreadNum (); -}); -c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", - function () { -return java.awt.EventQueue.threadInitNumber++; -}); -c$.noEvents = Clazz_defineMethod (c$, "noEvents", -function (eventQueue) { -return eventQueue.noEvents (); -}, "java.awt.EventQueue"); -c$.getNextQueue = Clazz_defineMethod (c$, "getNextQueue", -function (eventQueue) { -return eventQueue.nextQueue; -}, "java.awt.EventQueue"); -c$.removeSourceEvents = Clazz_defineMethod (c$, "removeSourceEvents", -function (eventQueue, source, removeAllEvents) { -eventQueue.removeSourceEvents (source, removeAllEvents); -}, "java.awt.EventQueue,~O,~B"); -Clazz_makeConstructor (c$, -function () { -for (var i = 0; i < 4; i++) { -this.queues[i] = new java.awt.Queue (); -} -}); -Clazz_defineMethod (c$, "postEvent", -function (event) { -jssun.awt.SunToolkit.flushPendingEvents (); -this.postEventPrivate (event); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "postEventPrivate", -function (theEvent) { -theEvent.isPosted = true; -{ -if (this.dispatchThread == null && this.nextQueue == null) { -if (theEvent.getSource () === jssun.awt.AWTAutoShutdown.getInstance ()) { -return; -} else { -this.initDispatchThread (); -}}if (this.nextQueue != null) { -this.nextQueue.postEventPrivate (theEvent); -return; -}this.postEventNow (theEvent, java.awt.EventQueue.getPriority (theEvent)); -}}, "java.awt.AWTEvent"); -c$.getPriority = Clazz_defineMethod (c$, "getPriority", - function (theEvent) { -if (Clazz_instanceOf (theEvent, jssun.awt.PeerEvent)) { -var flags = (theEvent).getFlags (); -if ((flags & 2) != 0) return 3; -if ((flags & 1) != 0) return 2; -if ((flags & 4) != 0) return 0; -}switch (theEvent.getID ()) { -case 1201: -case 800: -case 801: -return 0; -default: -return 1; -} -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "postEventNow", - function (theEvent, priority) { -if (this.coalesceEvent (theEvent, priority)) { -return; -}var newItem = new java.awt.EventQueueItem (theEvent); -this.cacheEQItem (newItem); -if (this.queues[priority].head == null) { -var shouldNotify = this.noEvents (); -this.queues[priority].head = this.queues[priority].tail = newItem; -if (shouldNotify) { -if (theEvent.getSource () !== jssun.awt.AWTAutoShutdown.getInstance ()) { -jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (this.dispatchThread); -}}} else { -this.queues[priority].tail.next = newItem; -this.queues[priority].tail = newItem; -}}, "java.awt.AWTEvent,~N"); -Clazz_defineMethod (c$, "coalescePaintEvent", - function (e) { -var sourcePeer = (e.getSource ()).peer; -if (sourcePeer != null) { -sourcePeer.coalescePaintEvent (e); -}var cache = (e.getSource ()).eventCache; -if (cache == null) { -return false; -}var index = java.awt.EventQueue.eventToCacheIndex (e); -if (index != -1 && cache[index] != null) { -var merged = this.mergePaintEvents (e, cache[index].event); -if (merged != null) { -cache[index].event = merged; -return true; -}}return false; -}, "java.awt.event.PaintEvent"); -Clazz_defineMethod (c$, "mergePaintEvents", - function (a, b) { -var aRect = a.getUpdateRect (); -var bRect = b.getUpdateRect (); -if (bRect.contains (aRect)) { -return b; -}if (aRect.contains (bRect)) { -return a; -}return null; -}, "java.awt.event.PaintEvent,java.awt.event.PaintEvent"); -Clazz_defineMethod (c$, "coalesceMouseEvent", - function (e) { -var cache = (e.getSource ()).eventCache; -if (cache == null) { -return false; -}var index = java.awt.EventQueue.eventToCacheIndex (e); -if (index != -1 && cache[index] != null) { -cache[index].event = e; -return true; -}return false; -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "coalescePeerEvent", - function (e) { -var cache = (e.getSource ()).eventCache; -if (cache == null) { -return false; -}var index = java.awt.EventQueue.eventToCacheIndex (e); -if (index != -1 && cache[index] != null) { -e = e.coalesceEvents (cache[index].event); -if (e != null) { -cache[index].event = e; -return true; -} else { -cache[index] = null; -}}return false; -}, "jssun.awt.PeerEvent"); -Clazz_defineMethod (c$, "coalesceOtherEvent", - function (e, priority) { -var id = e.getID (); -var source = e.getSource (); -for (var entry = this.queues[priority].head; entry != null; entry = entry.next) { -if (entry.event.getSource () === source && entry.id == id) { -var coalescedEvent = source.coalesceEvents (entry.event, e); -if (coalescedEvent != null) { -entry.event = coalescedEvent; -return true; -}}} -return false; -}, "java.awt.AWTEvent,~N"); -Clazz_defineMethod (c$, "coalesceEvent", - function (e, priority) { -if (!(Clazz_instanceOf (e.getSource (), java.awt.Component))) { -return false; -}if (Clazz_instanceOf (e, jssun.awt.PeerEvent)) { -return this.coalescePeerEvent (e); -}if ((e.getSource ()).isCoalescingEnabled () && this.coalesceOtherEvent (e, priority)) { -return true; -}if (Clazz_instanceOf (e, java.awt.event.PaintEvent)) { -return this.coalescePaintEvent (e); -}if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) { -return this.coalesceMouseEvent (e); -}return false; -}, "java.awt.AWTEvent,~N"); -Clazz_defineMethod (c$, "cacheEQItem", - function (entry) { -var index = java.awt.EventQueue.eventToCacheIndex (entry.event); -if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) { -var source = entry.event.getSource (); -if (source.eventCache == null) { -source.eventCache = new Array (5); -}source.eventCache[index] = entry; -}}, "java.awt.EventQueueItem"); -Clazz_defineMethod (c$, "uncacheEQItem", - function (entry) { -var index = java.awt.EventQueue.eventToCacheIndex (entry.event); -if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) { -var source = entry.event.getSource (); -if (source.eventCache == null) { -return; -}source.eventCache[index] = null; -}}, "java.awt.EventQueueItem"); -c$.eventToCacheIndex = Clazz_defineMethod (c$, "eventToCacheIndex", - function (e) { -switch (e.getID ()) { -case 800: -return 0; -case 801: -return 1; -case 503: -return 2; -case 506: -return 3; -default: -return -1; -} -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "noEvents", - function () { -for (var i = 0; i < 4; i++) { -if (this.queues[i].head != null) { -return false; -}} -return true; -}); -Clazz_defineMethod (c$, "getNextEvent", -function () { -jssun.awt.SunToolkit.flushPendingEvents (); -{ -for (var i = 3; i >= 0; i--) { -if (this.queues[i].head != null) { -var entry = this.queues[i].head; -this.queues[i].head = entry.next; -if (entry.next == null) { -this.queues[i].tail = null; -}this.uncacheEQItem (entry); -return entry.event; -}} -jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this.dispatchThread); -}return null; -}); -Clazz_defineMethod (c$, "getNextEventForID", -function (id) { -jssun.awt.SunToolkit.flushPendingEvents (); -{ -for (var i = 0; i < 4; i++) { -for (var entry = this.queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) { -if (entry.id == id) { -if (prev == null) { -this.queues[i].head = entry.next; -} else { -prev.next = entry.next; -}if (this.queues[i].tail === entry) { -this.queues[i].tail = prev; -}this.uncacheEQItem (entry); -return entry.event; -}} -} -this.waitForID = id; -this.waitForID = 0; -}return null; -}, "~N"); -Clazz_defineMethod (c$, "peekEvent", -function () { -for (var i = 3; i >= 0; i--) { -if (this.queues[i].head != null) { -return this.queues[i].head.event; -}} -return null; -}); -Clazz_defineMethod (c$, "peekEvent", -function (id) { -for (var i = 3; i >= 0; i--) { -var q = this.queues[i].head; -for (; q != null; q = q.next) { -if (q.id == id) { -return q.event; -}} -} -return null; -}, "~N"); -Clazz_defineMethod (c$, "dispatchEvent", -function (event) { -var src = event.getSource (); -this.dispatchEventImpl (event, src, false); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "dispatchEventAndWait", -function (event, src) { -this.dispatchEventImpl (event, src, true); -}, "java.awt.AWTEvent,~O"); -Clazz_defineMethod (c$, "dispatchEventImpl", - function (event, src, andWait) { -event.isPosted = true; -if (Clazz_instanceOf (event, java.awt.ActiveEvent)) { -this.setCurrentEventAndMostRecentTimeImpl (event); -swingjs.JSToolkit.dispatchEvent (event, null, andWait); -} else if (Clazz_instanceOf (src, java.awt.Component)) { -swingjs.JSToolkit.dispatchEvent (event, src, andWait); -event.dispatched (); -} else if (Clazz_instanceOf (src, jssun.awt.AWTAutoShutdown)) { -if (this.noEvents ()) { -this.dispatchThread.stopDispatching (); -}} else { -System.err.println ("unable to dispatch event: " + event); -}}, "java.awt.AWTEvent,~O,~B"); -c$.getMostRecentEventTime = Clazz_defineMethod (c$, "getMostRecentEventTime", -function () { -return 0; -}); -Clazz_defineMethod (c$, "getMostRecentEventTimeEx", -function () { -return this.mostRecentEventTime; -}); -c$.getCurrentEvent = Clazz_defineMethod (c$, "getCurrentEvent", -function () { -return java.awt.Toolkit.getEventQueue ().getCurrentEventImpl (); -}); -Clazz_defineMethod (c$, "getCurrentEventImpl", - function () { -return (swingjs.JSToolkit.isDispatchThread () ? (this.currentEvent) : null); -}); -Clazz_defineMethod (c$, "push", -function (newEventQueue) { -if (this.nextQueue != null) { -this.nextQueue.push (newEventQueue); -return; -}{ -while (this.peekEvent () != null) { -try { -newEventQueue.postEventPrivate (this.getNextEvent ()); -} catch (ie) { -if (Clazz_exceptionOf (ie, InterruptedException)) { -} else { -throw ie; -} -} -} -newEventQueue.previousQueue = this; -}if (this.dispatchThread != null) { -this.dispatchThread.stopDispatchingLater (); -}this.nextQueue = newEventQueue; -var appContext = jssun.awt.AppContext.getAppContext (); -if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) { -appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, newEventQueue); -}}, "java.awt.EventQueue"); -Clazz_defineMethod (c$, "pop", -function () { -var prev = this.previousQueue; -{ -{ -if (this.nextQueue != null) { -this.nextQueue.pop (); -return; -}if (this.previousQueue == null) { -throw new java.util.EmptyStackException (); -}this.previousQueue.nextQueue = null; -while (this.peekEvent () != null) { -try { -this.previousQueue.postEventPrivate (this.getNextEvent ()); -} catch (ie) { -if (Clazz_exceptionOf (ie, InterruptedException)) { -} else { -throw ie; -} -} -} -var appContext = jssun.awt.AppContext.getAppContext (); -if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) { -appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, this.previousQueue); -}this.previousQueue = null; -}}var dt = this.dispatchThread; -if (dt != null) { -dt.stopDispatching (); -}}); -c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", -function () { -return swingjs.JSToolkit.isDispatchThread (); -}); -Clazz_defineMethod (c$, "initDispatchThread", -function () { -{ -if (this.dispatchThread == null) { -var t = new java.awt.EventDispatchThread (this.threadGroup, this.name, this); -jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (t); -this.dispatchThread = t; -this.dispatchThread.start (); -}}}); -Clazz_defineMethod (c$, "detachDispatchThread", -function () { -this.dispatchThread = null; -}); -Clazz_defineMethod (c$, "getDispatchThread", -function () { -return this.dispatchThread; -}); -Clazz_defineMethod (c$, "removeSourceEvents", -function (source, removeAllEvents) { -jssun.awt.SunToolkit.flushPendingEvents (); -{ -for (var i = 0; i < 4; i++) { -var entry = this.queues[i].head; -var prev = null; -while (entry != null) { -if ((entry.event.getSource () === source) && (removeAllEvents || !(Clazz_instanceOf (entry.event, java.awt.SequencedEvent) || Clazz_instanceOf (entry.event, java.awt.SentEvent) || Clazz_instanceOf (entry.event, java.awt.event.FocusEvent) || Clazz_instanceOf (entry.event, java.awt.event.WindowEvent) || Clazz_instanceOf (entry.event, java.awt.event.KeyEvent) || Clazz_instanceOf (entry.event, java.awt.event.InputMethodEvent)))) { -if (Clazz_instanceOf (entry.event, java.awt.SequencedEvent)) { -(entry.event).dispose (); -}if (Clazz_instanceOf (entry.event, java.awt.SentEvent)) { -(entry.event).dispose (); -}if (prev == null) { -this.queues[i].head = entry.next; -} else { -prev.next = entry.next; -}this.uncacheEQItem (entry); -} else { -prev = entry; -}entry = entry.next; -} -this.queues[i].tail = prev; -} -}}, "~O,~B"); -c$.setCurrentEventAndMostRecentTime = Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTime", -function (e) { -java.awt.Toolkit.getEventQueue ().setCurrentEventAndMostRecentTimeImpl (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTimeImpl", - function (e) { -if (swingjs.JSToolkit.isDispatchThread ()) { -return; -}this.currentEvent = e; -var mostRecentEventTime2 = -9223372036854775808; -if (Clazz_instanceOf (e, java.awt.event.InputEvent)) { -var ie = e; -mostRecentEventTime2 = ie.getWhen (); -} else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) { -var ime = e; -mostRecentEventTime2 = ime.getWhen (); -} else if (Clazz_instanceOf (e, java.awt.event.ActionEvent)) { -var ae = e; -mostRecentEventTime2 = ae.getWhen (); -} else if (Clazz_instanceOf (e, java.awt.event.InvocationEvent)) { -var ie = e; -mostRecentEventTime2 = ie.getWhen (); -}this.mostRecentEventTime = Math.max (this.mostRecentEventTime, mostRecentEventTime2); -}, "java.awt.AWTEvent"); -c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", -function (runnable) { -java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), runnable)); -}, "Runnable"); -c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", -function (runnable) { -java.awt.EventQueue.invokeAndWaitStatic (java.awt.Toolkit.getDefaultToolkit (), runnable); -}, "Runnable"); -c$.invokeAndWaitStatic = Clazz_defineMethod (c$, "invokeAndWaitStatic", - function (source, runnable) { -if (java.awt.EventQueue.isDispatchThread ()) { -throw new Error ("Cannot call invokeAndWait from the event dispatcher thread"); -}var event = new java.awt.event.InvocationEvent (source, runnable, null, true); -swingjs.JSToolkit.dispatchEvent (event, null, true); -var eventThrowable = event.getThrowable (); -if (eventThrowable != null) { -throw new java.lang.reflect.InvocationTargetException (eventThrowable); -}}, "~O,Runnable"); -Clazz_defineMethod (c$, "wakeup", -function (isShutdown) { -{ -if (this.nextQueue != null) { -this.nextQueue.wakeup (isShutdown); -} else if (this.dispatchThread != null) { -try { -this.dispatchThread.start (); -} catch (e) { -if (Clazz_exceptionOf (e, IllegalThreadStateException)) { -this.dispatchThread.run (); -} else { -throw e; -} -} -} else if (!isShutdown) { -this.initDispatchThread (); -}}}, "~B"); -Clazz_defineStatics (c$, -"threadInitNumber", 0, -"LOW_PRIORITY", 0, -"NORM_PRIORITY", 1, -"HIGH_PRIORITY", 2, -"ULTIMATE_PRIORITY", 3, -"NUM_PRIORITIES", 4, -"PAINT", 0, -"UPDATE", 1, -"MOVE", 2, -"DRAG", 3, -"PEER", 4, -"CACHE_LENGTH", 5); -c$ = Clazz_decorateAsClass (function () { -this.head = null; -this.tail = null; -Clazz_instantialize (this, arguments); -}, java.awt, "Queue"); -c$ = Clazz_decorateAsClass (function () { -this.event = null; -this.id = 0; -this.next = null; -Clazz_instantialize (this, arguments); -}, java.awt, "EventQueueItem"); -Clazz_makeConstructor (c$, -function (evt) { -this.event = evt; -this.id = evt.getID (); -}, "java.awt.AWTEvent"); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.event.ActionListener", "$.AdjustmentListener", "$.ComponentListener", "$.ContainerListener", "$.FocusListener", "$.HierarchyBoundsListener", "$.HierarchyListener", "$.InputMethodListener", "$.ItemListener", "$.KeyListener", "$.MouseListener", "$.MouseMotionListener", "$.MouseWheelListener", "$.TextListener", "$.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.AWTEventMulticaster", ["java.lang.NullPointerException", "java.lang.reflect.Array"], function () { -c$ = Clazz_decorateAsClass (function () { -this.a = null; -this.b = null; -Clazz_instantialize (this, arguments); -}, java.awt, "AWTEventMulticaster", null, [java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.WindowListener, java.awt.event.WindowFocusListener, java.awt.event.WindowStateListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.AdjustmentListener, java.awt.event.TextListener, java.awt.event.InputMethodListener, java.awt.event.HierarchyListener, java.awt.event.HierarchyBoundsListener, java.awt.event.MouseWheelListener]); -Clazz_makeConstructor (c$, -function (a, b) { -this.a = a; -this.b = b; -}, "java.util.EventListener,java.util.EventListener"); -Clazz_defineMethod (c$, "remove", -function (oldl) { -if (oldl === this.a) return this.b; -if (oldl === this.b) return this.a; -var a2 = java.awt.AWTEventMulticaster.removeInternal (this.a, oldl); -var b2 = java.awt.AWTEventMulticaster.removeInternal (this.b, oldl); -if (a2 === this.a && b2 === this.b) { -return this; -}return java.awt.AWTEventMulticaster.addInternal (a2, b2); -}, "java.util.EventListener"); -Clazz_defineMethod (c$, "componentResized", -function (e) { -(this.a).componentResized (e); -(this.b).componentResized (e); -}, "java.awt.event.ComponentEvent"); -Clazz_defineMethod (c$, "componentMoved", -function (e) { -(this.a).componentMoved (e); -(this.b).componentMoved (e); -}, "java.awt.event.ComponentEvent"); -Clazz_defineMethod (c$, "componentShown", -function (e) { -(this.a).componentShown (e); -(this.b).componentShown (e); -}, "java.awt.event.ComponentEvent"); -Clazz_defineMethod (c$, "componentHidden", -function (e) { -(this.a).componentHidden (e); -(this.b).componentHidden (e); -}, "java.awt.event.ComponentEvent"); -Clazz_defineMethod (c$, "componentAdded", -function (e) { -(this.a).componentAdded (e); -(this.b).componentAdded (e); -}, "java.awt.event.ContainerEvent"); -Clazz_defineMethod (c$, "componentRemoved", -function (e) { -(this.a).componentRemoved (e); -(this.b).componentRemoved (e); -}, "java.awt.event.ContainerEvent"); -Clazz_defineMethod (c$, "focusGained", -function (e) { -(this.a).focusGained (e); -(this.b).focusGained (e); -}, "java.awt.event.FocusEvent"); -Clazz_defineMethod (c$, "focusLost", -function (e) { -(this.a).focusLost (e); -(this.b).focusLost (e); -}, "java.awt.event.FocusEvent"); -Clazz_defineMethod (c$, "keyTyped", -function (e) { -(this.a).keyTyped (e); -(this.b).keyTyped (e); -}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "keyPressed", -function (e) { -(this.a).keyPressed (e); -(this.b).keyPressed (e); -}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "keyReleased", -function (e) { -(this.a).keyReleased (e); -(this.b).keyReleased (e); -}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "mouseClicked", -function (e) { -(this.a).mouseClicked (e); -(this.b).mouseClicked (e); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mousePressed", -function (e) { -(this.a).mousePressed (e); -(this.b).mousePressed (e); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseReleased", -function (e) { -(this.a).mouseReleased (e); -(this.b).mouseReleased (e); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseEntered", -function (e) { -(this.a).mouseEntered (e); -(this.b).mouseEntered (e); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseExited", -function (e) { -(this.a).mouseExited (e); -(this.b).mouseExited (e); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseDragged", -function (e) { -(this.a).mouseDragged (e); -(this.b).mouseDragged (e); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseMoved", -function (e) { -(this.a).mouseMoved (e); -(this.b).mouseMoved (e); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "windowOpened", -function (e) { -(this.a).windowOpened (e); -(this.b).windowOpened (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowClosing", -function (e) { -(this.a).windowClosing (e); -(this.b).windowClosing (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowClosed", -function (e) { -(this.a).windowClosed (e); -(this.b).windowClosed (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowIconified", -function (e) { -(this.a).windowIconified (e); -(this.b).windowIconified (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowDeiconified", -function (e) { -(this.a).windowDeiconified (e); -(this.b).windowDeiconified (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowActivated", -function (e) { -(this.a).windowActivated (e); -(this.b).windowActivated (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowDeactivated", -function (e) { -(this.a).windowDeactivated (e); -(this.b).windowDeactivated (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowStateChanged", -function (e) { -(this.a).windowStateChanged (e); -(this.b).windowStateChanged (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowGainedFocus", -function (e) { -(this.a).windowGainedFocus (e); -(this.b).windowGainedFocus (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowLostFocus", -function (e) { -(this.a).windowLostFocus (e); -(this.b).windowLostFocus (e); -}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "actionPerformed", -function (e) { -(this.a).actionPerformed (e); -(this.b).actionPerformed (e); -}, "java.awt.event.ActionEvent"); -Clazz_defineMethod (c$, "itemStateChanged", -function (e) { -(this.a).itemStateChanged (e); -(this.b).itemStateChanged (e); -}, "java.awt.event.ItemEvent"); -Clazz_defineMethod (c$, "adjustmentValueChanged", -function (e) { -(this.a).adjustmentValueChanged (e); -(this.b).adjustmentValueChanged (e); -}, "java.awt.event.AdjustmentEvent"); -Clazz_defineMethod (c$, "textValueChanged", -function (e) { -(this.a).textValueChanged (e); -(this.b).textValueChanged (e); -}, "java.awt.event.TextEvent"); -Clazz_defineMethod (c$, "inputMethodTextChanged", -function (e) { -(this.a).inputMethodTextChanged (e); -(this.b).inputMethodTextChanged (e); -}, "java.awt.event.InputMethodEvent"); -Clazz_defineMethod (c$, "caretPositionChanged", -function (e) { -(this.a).caretPositionChanged (e); -(this.b).caretPositionChanged (e); -}, "java.awt.event.InputMethodEvent"); -Clazz_defineMethod (c$, "hierarchyChanged", -function (e) { -(this.a).hierarchyChanged (e); -(this.b).hierarchyChanged (e); -}, "java.awt.event.HierarchyEvent"); -Clazz_defineMethod (c$, "ancestorMoved", -function (e) { -(this.a).ancestorMoved (e); -(this.b).ancestorMoved (e); -}, "java.awt.event.HierarchyEvent"); -Clazz_defineMethod (c$, "ancestorResized", -function (e) { -(this.a).ancestorResized (e); -(this.b).ancestorResized (e); -}, "java.awt.event.HierarchyEvent"); -Clazz_defineMethod (c$, "mouseWheelMoved", -function (e) { -(this.a).mouseWheelMoved (e); -(this.b).mouseWheelMoved (e); -}, "java.awt.event.MouseWheelEvent"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.ComponentListener,java.awt.event.ComponentListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.ContainerListener,java.awt.event.ContainerListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.FocusListener,java.awt.event.FocusListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.KeyListener,java.awt.event.KeyListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.MouseListener,java.awt.event.MouseListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.WindowListener,java.awt.event.WindowListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.ActionListener,java.awt.event.ActionListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.ItemListener,java.awt.event.ItemListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.TextListener,java.awt.event.TextListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return java.awt.AWTEventMulticaster.addInternal (a, b); -}, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.ComponentListener,java.awt.event.ComponentListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.ContainerListener,java.awt.event.ContainerListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.FocusListener,java.awt.event.FocusListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.KeyListener,java.awt.event.KeyListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.MouseListener,java.awt.event.MouseListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.WindowListener,java.awt.event.WindowListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.ActionListener,java.awt.event.ActionListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.ItemListener,java.awt.event.ItemListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.TextListener,java.awt.event.TextListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return java.awt.AWTEventMulticaster.removeInternal (l, oldl); -}, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener"); -c$.addInternal = Clazz_defineMethod (c$, "addInternal", -function (a, b) { -if (a == null) return b; -if (b == null) return a; -return new java.awt.AWTEventMulticaster (a, b); -}, "java.util.EventListener,java.util.EventListener"); -c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", -function (l, oldl) { -if (l === oldl || l == null) { -return null; -} else if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) { -return (l).remove (oldl); -} else { -return l; -}}, "java.util.EventListener,java.util.EventListener"); -c$.getListenerCount = Clazz_defineMethod (c$, "getListenerCount", - function (l, listenerType) { -if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) { -var mc = l; -return java.awt.AWTEventMulticaster.getListenerCount (mc.a, listenerType) + java.awt.AWTEventMulticaster.getListenerCount (mc.b, listenerType); -} else { -return listenerType.isInstance (l) ? 1 : 0; -}}, "java.util.EventListener,Class"); -c$.populateListenerArray = Clazz_defineMethod (c$, "populateListenerArray", - function (a, l, index) { -if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) { -var mc = l; -var lhs = java.awt.AWTEventMulticaster.populateListenerArray (a, mc.a, index); -return java.awt.AWTEventMulticaster.populateListenerArray (a, mc.b, lhs); -} else if (a.getClass ().getComponentType ().isInstance (l)) { -a[index] = l; -return index + 1; -} else { -return index; -}}, "~A,java.util.EventListener,~N"); -c$.getListeners = Clazz_defineMethod (c$, "getListeners", -function (l, listenerType) { -if (listenerType == null) { -throw new NullPointerException ("Listener type should not be null"); -}var n = java.awt.AWTEventMulticaster.getListenerCount (l, listenerType); -var result = java.lang.reflect.Array.newInstance (listenerType, n); -java.awt.AWTEventMulticaster.populateListenerArray (result, l, 0); -return result; -}, "java.util.EventListener,Class"); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.util.EventObject"], "java.awt.AWTEvent", ["java.awt.Component", "java.awt.peer.LightweightPeer"], function () { -c$ = Clazz_decorateAsClass (function () { -this.bdata = null; -this.id = 0; -this.num = 0; -this.consumed = false; -this.focusManagerIsDispatching = false; -this.isPosted = false; -Clazz_instantialize (this, arguments); -}, java.awt, "AWTEvent", java.util.EventObject); -Clazz_makeConstructor (c$, -function (event) { -this.construct (event.target, event.id); -}, "java.awt.Event"); -Clazz_makeConstructor (c$, -function (source, id) { -Clazz_superConstructor (this, java.awt.AWTEvent, [source]); -this.id = id; -this.num = ++java.awt.AWTEvent.idnum; -switch (id) { -case 1001: -case 701: -case 601: -case 900: -this.consumed = true; -break; -default: -} -}, "~O,~N"); -Clazz_defineMethod (c$, "setSource", -function (newSource) { -if (this.source === newSource) { -return; -}var comp = null; -if (Clazz_instanceOf (newSource, java.awt.Component)) { -comp = newSource; -while (comp != null && comp.peer != null && (Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer))) { -comp = comp.parent; -} -}this.source = newSource; -}, "~O"); -Clazz_defineMethod (c$, "getID", -function () { -return this.id; -}); -Clazz_overrideMethod (c$, "toString", -function () { -var srcName = null; -if (Clazz_instanceOf (this.source, java.awt.Component)) { -srcName = (this.source).getName (); -}return this.getClass ().getName () + "[" + this.paramString () + "] on " + (srcName != null ? srcName : this.source); -}); -Clazz_defineMethod (c$, "paramString", -function () { -return ""; -}); -Clazz_defineMethod (c$, "consume", -function () { -switch (this.id) { -case 401: -case 402: -case 501: -case 502: -case 503: -case 506: -case 504: -case 505: -case 507: -case 1100: -case 1101: -this.consumed = true; -break; -default: -} -}); -Clazz_defineMethod (c$, "isConsumed", -function () { -return this.consumed; -}); -Clazz_defineMethod (c$, "copyPrivateDataInto", -function (that) { -that.bdata = this.bdata; -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "dispatched", -function () { -}); -Clazz_defineStatics (c$, -"idnum", 0, -"COMPONENT_EVENT_MASK", 0x01, -"CONTAINER_EVENT_MASK", 0x02, -"FOCUS_EVENT_MASK", 0x04, -"KEY_EVENT_MASK", 0x08, -"MOUSE_EVENT_MASK", 0x10, -"MOUSE_MOTION_EVENT_MASK", 0x20, -"WINDOW_EVENT_MASK", 0x40, -"ACTION_EVENT_MASK", 0x80, -"ADJUSTMENT_EVENT_MASK", 0x100, -"ITEM_EVENT_MASK", 0x200, -"TEXT_EVENT_MASK", 0x400, -"INPUT_METHOD_EVENT_MASK", 0x800, -"INPUT_METHODS_ENABLED_MASK", 0x1000, -"PAINT_EVENT_MASK", 0x2000, -"INVOCATION_EVENT_MASK", 0x4000, -"HIERARCHY_EVENT_MASK", 0x8000, -"HIERARCHY_BOUNDS_EVENT_MASK", 0x10000, -"MOUSE_WHEEL_EVENT_MASK", 0x20000, -"WINDOW_STATE_EVENT_MASK", 0x40000, -"WINDOW_FOCUS_EVENT_MASK", 0x80000, -"RESERVED_ID_MAX", 1999); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.util.EventListener"], "java.awt.event.AWTEventListener", null, function () { -Clazz_declareInterface (java.awt.event, "AWTEventListener", java.util.EventListener); -}); -Clazz_declarePackage ("java.awt"); -Clazz_declareInterface (java.awt, "ActiveEvent"); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () { -c$ = Clazz_decorateAsClass (function () { -this.runnable = null; -this.notifier = null; -this.catchExceptions = false; -this.exception = null; -this.throwable = null; -this.when = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent); -Clazz_makeConstructor (c$, -function (source, runnable) { -this.construct (source, runnable, null, false); -}, "~O,Runnable"); -Clazz_makeConstructor (c$, -function (source, runnable, notifier, catchThrowables) { -this.construct (source, 1200, runnable, notifier, catchThrowables); -}, "~O,Runnable,~O,~B"); -Clazz_makeConstructor (c$, -function (source, id, runnable, notifier, catchThrowables) { -Clazz_superConstructor (this, java.awt.event.InvocationEvent, [source, id]); -this.runnable = runnable; -this.notifier = notifier; -this.catchExceptions = catchThrowables; -this.when = System.currentTimeMillis (); -}, "~O,~N,Runnable,~O,~B"); -Clazz_overrideMethod (c$, "dispatch", -function () { -if (this.catchExceptions) { -try { -this.runnable.run (); -} catch (t) { -if (Clazz_instanceOf (t, Exception)) { -this.exception = t; -}this.throwable = t; -} -} else { -this.runnable.run (); -}if (this.notifier != null) { -{ -this.notifier.notifyAll (); -}}}); -Clazz_defineMethod (c$, "getException", -function () { -return (this.catchExceptions) ? this.exception : null; -}); -Clazz_defineMethod (c$, "getThrowable", -function () { -return (this.catchExceptions) ? this.throwable : null; -}); -Clazz_defineMethod (c$, "getWhen", -function () { -return this.when; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 1200: -typeStr = "INVOCATION_DEFAULT"; -break; -default: -typeStr = "unknown type"; -} -return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when; -}); -Clazz_defineStatics (c$, -"SWINGJS_INVOCATION_LOW", 1201, -"INVOCATION_FIRST", 1200, -"INVOCATION_DEFAULT", 1200, -"INVOCATION_LAST", 1201); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ComponentEvent", ["java.awt.Component"], function () { -c$ = Clazz_declareType (java.awt.event, "ComponentEvent", java.awt.AWTEvent); -Clazz_defineMethod (c$, "getComponent", -function () { -return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -var b = (this.source != null ? (this.source).getBounds () : null); -switch (this.id) { -case 102: -typeStr = "COMPONENT_SHOWN"; -break; -case 103: -typeStr = "COMPONENT_HIDDEN"; -break; -case 100: -typeStr = "COMPONENT_MOVED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")"; -break; -case 101: -typeStr = "COMPONENT_RESIZED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")"; -break; -default: -typeStr = "unknown type"; -} -return typeStr; -}); -Clazz_defineStatics (c$, -"COMPONENT_FIRST", 100, -"COMPONENT_LAST", 103, -"COMPONENT_MOVED", 100, -"COMPONENT_RESIZED", 101, -"COMPONENT_SHOWN", 102, -"COMPONENT_HIDDEN", 103); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.MouseEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Point", "$.Toolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.x = 0; -this.y = 0; -this.xAbs = 0; -this.yAbs = 0; -this.clickCount = 0; -this.button = 0; -this.popupTrigger = false; -Clazz_instantialize (this, arguments); -}, java.awt.event, "MouseEvent", java.awt.event.InputEvent); -Clazz_defineMethod (c$, "getLocationOnScreen", -function () { -return new java.awt.Point (this.xAbs, this.yAbs); -}); -Clazz_defineMethod (c$, "getXOnScreen", -function () { -return this.xAbs; -}); -Clazz_defineMethod (c$, "getYOnScreen", -function () { -return this.yAbs; -}); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, x, y, clickCount, popupTrigger, button) { -this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, button); -var eventLocationOnScreen = new java.awt.Point (0, 0); -try { -eventLocationOnScreen = source.getLocationOnScreen (); -this.xAbs = eventLocationOnScreen.x + x; -this.yAbs = eventLocationOnScreen.y + y; -} catch (e) { -if (Clazz_exceptionOf (e, java.awt.IllegalComponentStateException)) { -this.xAbs = 0; -this.yAbs = 0; -} else { -throw e; -} -} -}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N"); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, x, y, clickCount, popupTrigger) { -this.construct (source, id, when, modifiers, x, y, clickCount, popupTrigger, 0); -}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B"); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, button) { -Clazz_superConstructor (this, java.awt.event.MouseEvent, [source, id, when, modifiers]); -this.x = x; -this.y = y; -this.xAbs = xAbs; -this.yAbs = yAbs; -this.clickCount = clickCount; -this.popupTrigger = popupTrigger; -if (button < 0 || button > 3) { -throw new IllegalArgumentException ("Invalid button value"); -}this.button = button; -if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) { -this.setNewModifiers (); -} else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0 || button != 0)) { -this.setOldModifiers (); -}}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N"); -Clazz_defineMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_defineMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_defineMethod (c$, "getPoint", -function () { -var x; -var y; -{ -x = this.x; -y = this.y; -}return new java.awt.Point (x, y); -}); -Clazz_defineMethod (c$, "translatePoint", -function (x, y) { -this.x += x; -this.y += y; -}, "~N,~N"); -Clazz_defineMethod (c$, "getClickCount", -function () { -return this.clickCount; -}); -Clazz_defineMethod (c$, "getButton", -function () { -return this.button; -}); -Clazz_defineMethod (c$, "isPopupTrigger", -function () { -return this.popupTrigger; -}); -c$.getMouseModifiersText = Clazz_defineMethod (c$, "getMouseModifiersText", -function (modifiers) { -var buf = new StringBuilder (); -if ((modifiers & 8) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt")); -buf.append ("+"); -}if ((modifiers & 4) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta")); -buf.append ("+"); -}if ((modifiers & 2) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl")); -buf.append ("+"); -}if ((modifiers & 1) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift")); -buf.append ("+"); -}if ((modifiers & 32) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph")); -buf.append ("+"); -}if ((modifiers & 16) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1")); -buf.append ("+"); -}if ((modifiers & 8) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2")); -buf.append ("+"); -}if ((modifiers & 4) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3")); -buf.append ("+"); -}if (buf.length () > 0) { -buf.setLength (buf.length () - 1); -}return buf.toString (); -}, "~N"); -Clazz_overrideMethod (c$, "paramString", -function () { -var str = new StringBuilder (80); -str.append (java.awt.event.MouseEvent.getIdString (this.id)); -str.append (",(" + this.x).append ("," + this.y).append ("," + this.when).append (")"); -str.append (",absolute(").append ("" + this.xAbs).append (",").append ("" + this.yAbs).append (")"); -str.append (",button=").append ("" + this.getButton ()); -if (this.getModifiers () != 0) { -str.append (",modifiers=").append (java.awt.event.MouseEvent.getMouseModifiersText (this.modifiers)); -}if (this.getModifiersEx () != 0) { -str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers)); -}str.append (",clickCount=").append ("" + this.clickCount); -return str.toString (); -}); -c$.getIdString = Clazz_defineMethod (c$, "getIdString", -function (id) { -switch (id) { -case 501: -return "MOUSE_PRESSED"; -case 502: -return "MOUSE_RELEASED"; -case 500: -return "MOUSE_CLICKED"; -case 504: -return "MOUSE_ENTERED"; -case 505: -return "MOUSE_EXITED"; -case 503: -return "MOUSE_MOVED"; -case 506: -return "MOUSE_DRAGGED"; -case 507: -return "MOUSE_WHEEL"; -default: -return "unknown type"; -} -}, "~N"); -Clazz_defineMethod (c$, "setNewModifiers", - function () { -if ((this.modifiers & 16) != 0) { -this.modifiers |= 1024; -}if ((this.modifiers & 8) != 0) { -this.modifiers |= 2048; -}if ((this.modifiers & 4) != 0) { -this.modifiers |= 4096; -}if (this.id == 501 || this.id == 502 || this.id == 500) { -if ((this.modifiers & 16) != 0) { -this.button = 1; -this.modifiers &= -13; -if (this.id != 501) { -this.modifiers &= -1025; -}} else if ((this.modifiers & 8) != 0) { -this.button = 2; -this.modifiers &= -21; -if (this.id != 501) { -this.modifiers &= -2049; -}} else if ((this.modifiers & 4) != 0) { -this.button = 3; -this.modifiers &= -25; -if (this.id != 501) { -this.modifiers &= -4097; -}}}if ((this.modifiers & 8) != 0) { -this.modifiers |= 512; -}if ((this.modifiers & 4) != 0) { -this.modifiers |= 256; -}if ((this.modifiers & 1) != 0) { -this.modifiers |= 64; -}if ((this.modifiers & 2) != 0) { -this.modifiers |= 128; -}if ((this.modifiers & 32) != 0) { -this.modifiers |= 8192; -}}); -Clazz_defineMethod (c$, "setOldModifiers", - function () { -if (this.id == 501 || this.id == 502 || this.id == 500) { -switch (this.button) { -case 1: -this.modifiers |= 16; -break; -case 2: -this.modifiers |= 8; -break; -case 3: -this.modifiers |= 4; -break; -} -} else { -if ((this.modifiers & 1024) != 0) { -this.modifiers |= 16; -}if ((this.modifiers & 2048) != 0) { -this.modifiers |= 8; -}if ((this.modifiers & 4096) != 0) { -this.modifiers |= 4; -}}if ((this.modifiers & 512) != 0) { -this.modifiers |= 8; -}if ((this.modifiers & 256) != 0) { -this.modifiers |= 4; -}if ((this.modifiers & 64) != 0) { -this.modifiers |= 1; -}if ((this.modifiers & 128) != 0) { -this.modifiers |= 2; -}if ((this.modifiers & 8192) != 0) { -this.modifiers |= 32; -}}); -Clazz_defineStatics (c$, -"MOUSE_FIRST", 500, -"MOUSE_LAST", 507, -"MOUSE_CLICKED", 500, -"MOUSE_PRESSED", 501, -"MOUSE_RELEASED", 502, -"MOUSE_MOVED", 503, -"MOUSE_ENTERED", 504, -"MOUSE_EXITED", 505, -"MOUSE_DRAGGED", 506, -"MOUSE_WHEEL", 507, -"NOBUTTON", 0, -"BUTTON1", 1, -"BUTTON2", 2, -"BUTTON3", 3); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.InputEvent", ["java.lang.StringBuilder", "java.awt.Toolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.when = 0; -this.modifiers = 0; -this.canAccessSystemClipboard = false; -Clazz_instantialize (this, arguments); -}, java.awt.event, "InputEvent", java.awt.event.ComponentEvent); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers) { -Clazz_superConstructor (this, java.awt.event.InputEvent, [source, id]); -this.when = when; -this.modifiers = modifiers; -this.canAccessSystemClipboard = false; -}, "java.awt.Component,~N,~N,~N"); -Clazz_defineMethod (c$, "isShiftDown", -function () { -return (this.modifiers & 1) != 0; -}); -Clazz_defineMethod (c$, "isControlDown", -function () { -return (this.modifiers & 2) != 0; -}); -Clazz_defineMethod (c$, "isMetaDown", -function () { -return (this.modifiers & 4) != 0; -}); -Clazz_defineMethod (c$, "isAltDown", -function () { -return (this.modifiers & 8) != 0; -}); -Clazz_defineMethod (c$, "isAltGraphDown", -function () { -return (this.modifiers & 32) != 0; -}); -Clazz_defineMethod (c$, "getWhen", -function () { -return this.when; -}); -Clazz_defineMethod (c$, "getModifiers", -function () { -return this.modifiers & (-16321); -}); -Clazz_defineMethod (c$, "getModifiersEx", -function () { -return this.modifiers & -64; -}); -Clazz_overrideMethod (c$, "consume", -function () { -this.consumed = true; -}); -Clazz_overrideMethod (c$, "isConsumed", -function () { -return this.consumed; -}); -c$.getModifiersExText = Clazz_defineMethod (c$, "getModifiersExText", -function (modifiers) { -var buf = new StringBuilder (); -if ((modifiers & 256) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta")); -buf.append ("+"); -}if ((modifiers & 128) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl")); -buf.append ("+"); -}if ((modifiers & 512) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt")); -buf.append ("+"); -}if ((modifiers & 64) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift")); -buf.append ("+"); -}if ((modifiers & 8192) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph")); -buf.append ("+"); -}if ((modifiers & 1024) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1")); -buf.append ("+"); -}if ((modifiers & 2048) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2")); -buf.append ("+"); -}if ((modifiers & 4096) != 0) { -buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3")); -buf.append ("+"); -}if (buf.length () > 0) { -buf.setLength (buf.length () - 1); -}return buf.toString (); -}, "~N"); -Clazz_defineStatics (c$, -"SHIFT_MASK", 1, -"CTRL_MASK", 2, -"META_MASK", 4, -"ALT_MASK", 8, -"ALT_GRAPH_MASK", 32, -"BUTTON1_MASK", 16, -"BUTTON2_MASK", 8, -"BUTTON3_MASK", 4, -"SHIFT_DOWN_MASK", 64, -"CTRL_DOWN_MASK", 128, -"META_DOWN_MASK", 256, -"ALT_DOWN_MASK", 512, -"BUTTON1_DOWN_MASK", 1024, -"BUTTON2_DOWN_MASK", 2048, -"BUTTON3_DOWN_MASK", 4096, -"ALT_GRAPH_DOWN_MASK", 8192, -"FIRST_HIGH_BIT", 16384, -"JDK_1_3_MODIFIERS", 63, -"HIGH_MODIFIERS", -16384); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.AWTEventMulticaster", "java.awt.event.AWTEventListener", "java.util.HashMap"], "java.awt.Toolkit", ["java.util.ArrayList", "java.awt.Cursor", "$.Insets", "$.RenderingHints", "java.awt.event.AWTEventListenerProxy", "java.beans.PropertyChangeSupport", "jssun.awt.NullComponentPeer"], function () { -c$ = Clazz_decorateAsClass (function () { -this.desktopProperties = null; -this.desktopPropsSupport = null; -this.calls = null; -this.eventListener = null; -this.listener2SelectiveListener = null; -if (!Clazz_isClassDefined ("java.awt.Toolkit.SelectiveAWTEventListener")) { -java.awt.Toolkit.$Toolkit$SelectiveAWTEventListener$ (); -} -Clazz_instantialize (this, arguments); -}, java.awt, "Toolkit"); -Clazz_prepareFields (c$, function () { -this.desktopProperties = new java.util.HashMap (); -this.desktopPropsSupport = java.awt.Toolkit.createPropertyChangeSupport (this); -this.calls = Clazz_newIntArray (32, 0); -this.listener2SelectiveListener = new java.util.HashMap (); -}); -Clazz_defineMethod (c$, "createComponent", -function (target) { -if (java.awt.Toolkit.lightweightMarker == null) { -java.awt.Toolkit.lightweightMarker = new jssun.awt.NullComponentPeer (); -}return java.awt.Toolkit.lightweightMarker; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "loadSystemColors", -function (systemColors) { -}, "~A"); -Clazz_defineMethod (c$, "setDynamicLayout", -function (dynamic) { -}, "~B"); -Clazz_defineMethod (c$, "isDynamicLayoutSet", -function () { -if (this !== java.awt.Toolkit.getDefaultToolkit ()) { -return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutSet (); -} else { -return false; -}}); -Clazz_defineMethod (c$, "isDynamicLayoutActive", -function () { -if (this !== java.awt.Toolkit.getDefaultToolkit ()) { -return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutActive (); -} else { -return false; -}}); -Clazz_defineMethod (c$, "getScreenInsets", -function (gc) { -if (this !== java.awt.Toolkit.getDefaultToolkit ()) { -return java.awt.Toolkit.getDefaultToolkit ().getScreenInsets (gc); -} else { -return new java.awt.Insets (0, 0, 0, 0); -}}, "java.awt.GraphicsConfiguration"); -c$.getDefaultToolkit = Clazz_defineMethod (c$, "getDefaultToolkit", -function () { -return (java.awt.Toolkit.toolkit == null ? java.awt.Toolkit.toolkit = new swingjs.JSToolkit () : java.awt.Toolkit.toolkit); -}); -Clazz_defineMethod (c$, "createImage", -function (imagedata) { -return this.createImage (imagedata, 0, imagedata.length); -}, "~A"); -Clazz_defineMethod (c$, "getMenuShortcutKeyMask", -function () { -return 2; -}); -c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", -function (c) { -return null; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "createCustomCursor", -function (cursor, hotSpot, name) { -return new java.awt.Cursor (0); -}, "java.awt.Image,java.awt.Point,~S"); -Clazz_defineMethod (c$, "isFrameStateSupported", -function (state) { -return (state == 0); -}, "~N"); -c$.getProperty = Clazz_defineMethod (c$, "getProperty", -function (key, defaultValue) { -if (java.awt.Toolkit.resources != null) { -try { -return java.awt.Toolkit.resources.getString (key); -} catch (e) { -if (Clazz_exceptionOf (e, java.util.MissingResourceException)) { -} else { -throw e; -} -} -}return defaultValue; -}, "~S,~S"); -Clazz_defineMethod (c$, "getSystemEventQueue", -function () { -return this.getSystemEventQueueImpl (); -}); -c$.getEventQueue = Clazz_defineMethod (c$, "getEventQueue", -function () { -return java.awt.Toolkit.getDefaultToolkit ().getSystemEventQueueImpl (); -}); -Clazz_defineMethod (c$, "getDesktopProperty", -function (propertyName) { -if (this.desktopProperties.isEmpty ()) { -this.initializeDesktopProperties (); -}var value; -if (propertyName.equals ("awt.dynamicLayoutSupported")) { -value = this.lazilyLoadDesktopProperty (propertyName); -return value; -}value = this.desktopProperties.get (propertyName); -if (value == null) { -value = this.lazilyLoadDesktopProperty (propertyName); -if (value != null) { -this.setDesktopProperty (propertyName, value); -}}if (Clazz_instanceOf (value, java.awt.RenderingHints)) { -value = (value).clone (); -}return value; -}, "~S"); -Clazz_defineMethod (c$, "setDesktopProperty", -function (name, newValue) { -var oldValue; -{ -oldValue = this.desktopProperties.get (name); -this.desktopProperties.put (name, newValue); -}this.desktopPropsSupport.firePropertyChange (name, oldValue, newValue); -}, "~S,~O"); -Clazz_defineMethod (c$, "lazilyLoadDesktopProperty", -function (name) { -return null; -}, "~S"); -Clazz_defineMethod (c$, "initializeDesktopProperties", -function () { -}); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (name, pcl) { -this.desktopPropsSupport.addPropertyChangeListener (name, pcl); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "removePropertyChangeListener", -function (name, pcl) { -this.desktopPropsSupport.removePropertyChangeListener (name, pcl); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function () { -return this.desktopPropsSupport.getPropertyChangeListeners (); -}); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function (propertyName) { -return this.desktopPropsSupport.getPropertyChangeListeners (propertyName); -}, "~S"); -Clazz_defineMethod (c$, "isAlwaysOnTopSupported", -function () { -return true; -}); -c$.deProxyAWTEventListener = Clazz_defineMethod (c$, "deProxyAWTEventListener", - function (l) { -var localL = l; -if (localL == null) { -return null; -}if (Clazz_instanceOf (l, java.awt.event.AWTEventListenerProxy)) { -localL = (l).getListener (); -}return localL; -}, "java.awt.event.AWTEventListener"); -Clazz_defineMethod (c$, "addAWTEventListener", -function (listener, eventMask) { -var localL = java.awt.Toolkit.deProxyAWTEventListener (listener); -if (localL == null) { -return; -}{ -var selectiveListener = this.listener2SelectiveListener.get (localL); -if (selectiveListener == null) { -selectiveListener = Clazz_innerTypeInstance (java.awt.Toolkit.SelectiveAWTEventListener, this, null, localL, eventMask); -this.listener2SelectiveListener.put (localL, selectiveListener); -this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.add (this.eventListener, selectiveListener); -}selectiveListener.orEventMasks (eventMask); -java.awt.Toolkit.enabledOnToolkitMask |= eventMask; -var mask = eventMask; -for (var i = 0; i < 32; i++) { -if (mask == 0) { -break; -}if ((mask & 1) != 0) { -this.calls[i]++; -}mask >>>= 1; -} -}}, "java.awt.event.AWTEventListener,~N"); -Clazz_defineMethod (c$, "removeAWTEventListener", -function (listener) { -var localL = java.awt.Toolkit.deProxyAWTEventListener (listener); -if (listener == null) { -return; -}{ -var selectiveListener = this.listener2SelectiveListener.get (localL); -if (selectiveListener != null) { -this.listener2SelectiveListener.remove (localL); -var listenerCalls = selectiveListener.getCalls (); -for (var i = 0; i < 32; i++) { -this.calls[i] -= listenerCalls[i]; -if (this.calls[i] == 0) { -java.awt.Toolkit.enabledOnToolkitMask &= ~(1 << i); -}} -}this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.remove (this.eventListener, (selectiveListener == null) ? localL : selectiveListener); -}}, "java.awt.event.AWTEventListener"); -c$.enabledOnToolkit = Clazz_defineMethod (c$, "enabledOnToolkit", -function (eventMask) { -return (java.awt.Toolkit.enabledOnToolkitMask & eventMask) != 0; -}, "~N"); -Clazz_defineMethod (c$, "countAWTEventListeners", -function (eventMask) { -var ci = 0; -for (; eventMask != 0; eventMask >>>= 1, ci++) { -} -ci--; -return this.calls[ci]; -}, "~N"); -Clazz_defineMethod (c$, "getAWTEventListeners", -function () { -{ -var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener); -var ret = new Array (la.length); -for (var i = 0; i < la.length; i++) { -var sael = la[i]; -var tempL = sael.getListener (); -ret[i] = new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), tempL); -} -return ret; -}}); -Clazz_defineMethod (c$, "getAWTEventListeners", -function (eventMask) { -{ -var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener); -var list = new java.util.ArrayList (la.length); -for (var i = 0; i < la.length; i++) { -var sael = la[i]; -if ((sael.getEventMask () & eventMask) == eventMask) { -list.add ( new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), sael.getListener ())); -}} -return list.toArray ( new Array (0)); -}}, "~N"); -Clazz_defineMethod (c$, "notifyAWTEventListeners", -function (theEvent) { -var eventListener = this.eventListener; -if (eventListener != null) { -eventListener.eventDispatched (theEvent); -}}, "java.awt.AWTEvent"); -c$.createPropertyChangeSupport = Clazz_defineMethod (c$, "createPropertyChangeSupport", - function (toolkit) { -return new java.beans.PropertyChangeSupport (toolkit); -}, "java.awt.Toolkit"); -c$.$Toolkit$SelectiveAWTEventListener$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -this.listener = null; -this.eventMask = 0; -this.calls = null; -Clazz_instantialize (this, arguments); -}, java.awt.Toolkit, "SelectiveAWTEventListener", null, java.awt.event.AWTEventListener); -Clazz_prepareFields (c$, function () { -this.calls = Clazz_newIntArray (32, 0); -}); -Clazz_defineMethod (c$, "getListener", -function () { -return this.listener; -}); -Clazz_defineMethod (c$, "getEventMask", -function () { -return this.eventMask; -}); -Clazz_defineMethod (c$, "getCalls", -function () { -return this.calls; -}); -Clazz_defineMethod (c$, "orEventMasks", -function (a) { -this.eventMask |= a; -for (var b = 0; b < 32; b++) { -if (a == 0) { -break; -}if ((a & 1) != 0) { -this.calls[b]++; -}a >>>= 1; -} -}, "~N"); -Clazz_makeConstructor (c$, -function (a, b) { -this.listener = a; -this.eventMask = b; -}, "java.awt.event.AWTEventListener,~N"); -Clazz_defineMethod (c$, "eventDispatched", -function (a) { -var b = 0; -if (((b = this.eventMask & 1) != 0 && a.id >= 100 && a.id <= 103) || ((b = this.eventMask & 2) != 0 && a.id >= 300 && a.id <= 301) || ((b = this.eventMask & 4) != 0 && a.id >= 1004 && a.id <= 1005) || ((b = this.eventMask & 8) != 0 && a.id >= 400 && a.id <= 402) || ((b = this.eventMask & 131072) != 0 && a.id == 507) || ((b = this.eventMask & 32) != 0 && (a.id == 503 || a.id == 506)) || ((b = this.eventMask & 16) != 0 && a.id != 503 && a.id != 506 && a.id != 507 && a.id >= 500 && a.id <= 507) || ((b = this.eventMask & 64) != 0 && (a.id >= 200 && a.id <= 209)) || ((b = this.eventMask & 128) != 0 && a.id >= 1001 && a.id <= 1001) || ((b = this.eventMask & 256) != 0 && a.id >= 601 && a.id <= 601) || ((b = this.eventMask & 512) != 0 && a.id >= 701 && a.id <= 701) || ((b = this.eventMask & 1024) != 0 && a.id >= 900 && a.id <= 900) || ((b = this.eventMask & 2048) != 0 && a.id >= 1100 && a.id <= 1101) || ((b = this.eventMask & 8192) != 0 && a.id >= 800 && a.id <= 801) || ((b = this.eventMask & 16384) != 0 && a.id >= 1200 && a.id <= 1201) || ((b = this.eventMask & 32768) != 0 && a.id == 1400) || ((b = this.eventMask & 65536) != 0 && (a.id == 1401 || a.id == 1402)) || ((b = this.eventMask & 262144) != 0 && a.id == 209) || ((b = this.eventMask & 524288) != 0 && (a.id == 207 || a.id == 208))) { -var c = 0; -for (var d = b; d != 0; d >>>= 1, c++) { -} -c--; -for (var e = 0; e < this.calls[c]; e++) { -this.listener.eventDispatched (a); -} -}}, "java.awt.AWTEvent"); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.Toolkit, "ToolkitEventMulticaster", java.awt.AWTEventMulticaster, java.awt.event.AWTEventListener); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -if (a == null) return b; -if (b == null) return a; -return new java.awt.Toolkit.ToolkitEventMulticaster (a, b); -}, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (a, b) { -return java.awt.AWTEventMulticaster.removeInternal (a, b); -}, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener"); -Clazz_defineMethod (c$, "remove", -function (a) { -if (a === this.a) return this.b; -if (a === this.b) return this.a; -var b = java.awt.AWTEventMulticaster.removeInternal (this.a, a); -var c = java.awt.AWTEventMulticaster.removeInternal (this.b, a); -if (b === this.a && c === this.b) { -return this; -}return java.awt.Toolkit.ToolkitEventMulticaster.add (b, c); -}, "java.util.EventListener"); -Clazz_defineMethod (c$, "eventDispatched", -function (a) { -(this.a).eventDispatched (a); -(this.b).eventDispatched (a); -}, "java.awt.AWTEvent"); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"lightweightMarker", null, -"toolkit", null, -"resources", null, -"LONG_BITS", 32, -"enabledOnToolkitMask", 0); -}); -Clazz_declarePackage ("java.lang"); -Clazz_load (["java.lang.Enum"], "java.lang.Thread", ["java.lang.Exception", "$.IllegalArgumentException", "$.IllegalThreadStateException", "$.NoSuchMethodError", "$.NullPointerException", "$.ThreadDeath", "java.util.HashMap", "java.lang.ThreadGroup", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.name = null; -this.priority = 5; -this.daemon = false; -this.target = null; -this.group = null; -this.tid = 0; -this.threadStatus = 0; -this.parkBlocker = null; -this.stopBeforeStart = false; -this.throwableFromStop = null; -this.me = null; -this.uncaughtExceptionHandler = null; -this.$interrupted = false; -this.stopped = false; -Clazz_instantialize (this, arguments); -}, java.lang, "Thread", null, Runnable); -c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", - function () { -return java.lang.Thread.threadInitNumber++; -}); -c$.nextThreadID = Clazz_defineMethod (c$, "nextThreadID", - function () { -return ++java.lang.Thread.threadSeqNumber; -}); -c$.currentThread = Clazz_defineMethod (c$, "currentThread", -function () { -if (java.lang.Thread.thisThread == null) { -java.lang.Thread.thisThread = new java.lang.Thread ("master"); -java.lang.Thread.thisThread.setPriority (5); -}return java.lang.Thread.thisThread; -}); -c$.yield = Clazz_defineMethod (c$, "yield", -function () { -}); -c$.sleep = Clazz_defineMethod (c$, "sleep", -function (millis) { -}, "~N"); -c$.sleep = Clazz_defineMethod (c$, "sleep", -function (millis, nanos) { -if (millis < 0) { -throw new IllegalArgumentException ("timeout value is negative"); -}if (nanos < 0 || nanos > 999999) { -throw new IllegalArgumentException ("nanosecond timeout value out of range"); -}if (nanos >= 500000 || (nanos != 0 && millis == 0)) { -millis++; -}java.lang.Thread.sleep (millis); -}, "~N,~N"); -Clazz_defineMethod (c$, "init", - function (g, target, name, stackSize) { -this.init (g, target, name, stackSize, null); -}, "java.lang.ThreadGroup,Runnable,~S,~N"); -Clazz_defineMethod (c$, "init", - function (g, target, name, stackSize, acc) { -var parent = (java.lang.Thread.thisThread == null ? null : java.lang.Thread.thisThread); -if (g == null) { -if (g == null && parent != null) { -g = parent.getThreadGroup (); -}}if (g == null) { -g = this.newThreadGroup (null, name); -parent = this; -}g.checkAccess (); -g.addUnstarted (); -this.group = g; -this.priority = parent.getPriority (); -this.name = name; -this.target = target; -this.setPriority (this.priority); -this.tid = java.lang.Thread.nextThreadID (); -this.me = this; -}, "java.lang.ThreadGroup,Runnable,~S,~N,~O"); -Clazz_defineMethod (c$, "newThreadGroup", -function (group, name) { -return new java.lang.ThreadGroup (group, name); -}, "java.lang.ThreadGroup,~S"); -Clazz_makeConstructor (c$, -function () { -this.init (null, null, "Thread-" + java.lang.Thread.nextThreadNum (), 0); -}); -Clazz_makeConstructor (c$, -function (target) { -this.init (null, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0); -}, "Runnable"); -Clazz_makeConstructor (c$, -function (group, target) { -this.init (group, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0); -}, "java.lang.ThreadGroup,Runnable"); -Clazz_makeConstructor (c$, -function (name) { -this.init (null, null, name, 0); -}, "~S"); -Clazz_makeConstructor (c$, -function (group, name) { -this.init (group, null, name, 0); -}, "java.lang.ThreadGroup,~S"); -Clazz_makeConstructor (c$, -function (target, name) { -this.init (null, target, name, 0); -}, "Runnable,~S"); -Clazz_makeConstructor (c$, -function (group, target, name) { -this.init (group, target, name, 0); -}, "java.lang.ThreadGroup,Runnable,~S"); -Clazz_makeConstructor (c$, -function (group, target, name, stackSize) { -this.init (group, target, name, stackSize); -}, "java.lang.ThreadGroup,Runnable,~S,~N"); -Clazz_defineMethod (c$, "start", -function () { -if (this.threadStatus != 0 || this !== this.me) throw new IllegalThreadStateException (); -this.group.add (this); -this.start0 (); -if (this.stopBeforeStart) { -this.stop0 (this.throwableFromStop); -}}); -Clazz_defineMethod (c$, "start0", - function () { -}); -Clazz_defineMethod (c$, "run", -function () { -if (this.target != null) { -this.target.run (); -}}); -Clazz_defineMethod (c$, "stop", -function () { -if ((this.threadStatus != 0) && !this.isAlive ()) { -return; -}this.stop1 ( new ThreadDeath ()); -}); -Clazz_defineMethod (c$, "stop", -function (obj) { -this.stop1 (obj); -}, "Throwable"); -Clazz_defineMethod (c$, "stop1", - function (th) { -if (this.threadStatus != 0) { -this.resume (); -this.stop0 (th); -} else { -if (th == null) { -throw new NullPointerException (); -}this.stopBeforeStart = true; -this.throwableFromStop = th; -}}, "Throwable"); -Clazz_defineMethod (c$, "interrupt", -function () { -this.interrupt0 (); -}); -c$.interrupted = Clazz_defineMethod (c$, "interrupted", -function () { -return java.lang.Thread.currentThread ().isInterruptedB (true); -}); -Clazz_defineMethod (c$, "isInterrupted", -function () { -return this.isInterruptedB (false); -}); -Clazz_defineMethod (c$, "isInterruptedB", - function (clearInterrupted) { -var wasInt = this.$interrupted; -if (clearInterrupted) this.$interrupted = false; -return wasInt; -}, "~B"); -Clazz_defineMethod (c$, "destroy", -function () { -throw new NoSuchMethodError (); -}); -Clazz_defineMethod (c$, "isAlive", -function () { -return true; -}); -Clazz_defineMethod (c$, "suspend", -function () { -this.checkAccess (); -this.suspend0 (); -}); -Clazz_defineMethod (c$, "resume", -function () { -this.checkAccess (); -this.resume0 (); -}); -Clazz_defineMethod (c$, "setPriority", -function (newPriority) { -var g; -this.checkAccess (); -if (newPriority > 10 || newPriority < 1) { -throw new IllegalArgumentException (); -}if ((g = this.getThreadGroup ()) != null) { -if (newPriority > g.getMaxPriority ()) { -newPriority = g.getMaxPriority (); -}this.setPriority0 (this.priority = newPriority); -}}, "~N"); -Clazz_defineMethod (c$, "getPriority", -function () { -return this.priority; -}); -Clazz_defineMethod (c$, "setName", -function (name) { -this.checkAccess (); -this.name = name; -}, "~S"); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "getThreadGroup", -function () { -return this.group; -}); -c$.activeCount = Clazz_defineMethod (c$, "activeCount", -function () { -return java.lang.Thread.currentThread ().getThreadGroup ().activeCount (); -}); -c$.enumerate = Clazz_defineMethod (c$, "enumerate", -function (tarray) { -return java.lang.Thread.currentThread ().getThreadGroup ().enumerate (tarray); -}, "~A"); -Clazz_defineMethod (c$, "countStackFrames", -function () { -return 0; -}); -Clazz_defineMethod (c$, "join", -function (millis) { -var base = System.currentTimeMillis (); -var now = 0; -if (millis < 0) { -throw new IllegalArgumentException ("timeout value is negative"); -}swingjs.JSToolkit.warn ("Cannot wait in Thread"); -if (millis == 0) { -while (this.isAlive ()) { -this.wait (0); -} -} else { -while (this.isAlive ()) { -var delay = millis - now; -if (delay <= 0) { -break; -}this.wait (delay); -now = System.currentTimeMillis () - base; -} -}}, "~N"); -Clazz_defineMethod (c$, "join", -function (millis, nanos) { -if (millis < 0) { -throw new IllegalArgumentException ("timeout value is negative"); -}if (nanos < 0 || nanos > 999999) { -throw new IllegalArgumentException ("nanosecond timeout value out of range"); -}if (nanos >= 500000 || (nanos != 0 && millis == 0)) { -millis++; -}this.join (millis); -}, "~N,~N"); -Clazz_defineMethod (c$, "join", -function () { -this.join (0); -}); -c$.dumpStack = Clazz_defineMethod (c$, "dumpStack", -function () { - new Exception ("Stack trace").printStackTrace (); -}); -Clazz_defineMethod (c$, "setDaemon", -function (on) { -this.checkAccess (); -if (this.isAlive ()) { -throw new IllegalThreadStateException (); -}this.daemon = on; -}, "~B"); -Clazz_defineMethod (c$, "isDaemon", -function () { -return this.daemon; -}); -Clazz_defineMethod (c$, "checkAccess", -function () { -}); -Clazz_overrideMethod (c$, "toString", -function () { -var group = this.getThreadGroup (); -if (group != null) { -return "Thread[" + this.getName () + "," + this.getPriority () + "," + group.getName () + "]"; -} else { -return "Thread[" + this.getName () + "," + this.getPriority () + "," + "" + "]"; -}}); -Clazz_defineMethod (c$, "getContextClassLoader", -function () { -return null; -}); -Clazz_defineMethod (c$, "setContextClassLoader", -function (cl) { -}, "ClassLoader"); -c$.holdsLock = Clazz_defineMethod (c$, "holdsLock", -function (obj) { -return false; -}, "~O"); -Clazz_defineMethod (c$, "getStackTrace", -function () { -return ( new Exception ()).getStackTrace (); -}); -c$.getAllStackTraces = Clazz_defineMethod (c$, "getAllStackTraces", -function () { -var threads = java.lang.Thread.getThreads (); -var traces = java.lang.Thread.dumpThreads (threads); -var m = new java.util.HashMap (threads.length); -for (var i = 0; i < threads.length; i++) { -var stackTrace = traces[i]; -if (stackTrace != null) { -m.put (threads[i], stackTrace); -}} -return m; -}); -c$.dumpThreads = Clazz_defineMethod (c$, "dumpThreads", - function (threads) { -return null; -}, "~A"); -c$.getThreads = Clazz_defineMethod (c$, "getThreads", - function () { -return null; -}); -Clazz_defineMethod (c$, "getId", -function () { -return this.tid; -}); -Clazz_defineMethod (c$, "getState", -function () { -switch (this.threadStatus) { -case 0: -return java.lang.Thread.State.NEW; -case 1: -return java.lang.Thread.State.RUNNABLE; -case 2: -default: -return java.lang.Thread.State.TERMINATED; -case 3: -return java.lang.Thread.State.TIMED_WAITING; -case 4: -return java.lang.Thread.State.WAITING; -} -}); -c$.setDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "setDefaultUncaughtExceptionHandler", -function (eh) { -java.lang.Thread.defaultUncaughtExceptionHandler = eh; -}, "java.lang.Thread.UncaughtExceptionHandler"); -c$.getDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "getDefaultUncaughtExceptionHandler", -function () { -return java.lang.Thread.defaultUncaughtExceptionHandler; -}); -Clazz_defineMethod (c$, "getUncaughtExceptionHandler", -function () { -return this.uncaughtExceptionHandler != null ? this.uncaughtExceptionHandler : this.group; -}); -Clazz_defineMethod (c$, "setUncaughtExceptionHandler", -function (eh) { -this.checkAccess (); -this.uncaughtExceptionHandler = eh; -}, "java.lang.Thread.UncaughtExceptionHandler"); -Clazz_defineMethod (c$, "setPriority0", - function (newPriority) { -}, "~N"); -Clazz_defineMethod (c$, "stop0", - function (o) { -this.stopped = true; -}, "~O"); -Clazz_defineMethod (c$, "suspend0", - function () { -}); -Clazz_defineMethod (c$, "resume0", - function () { -}); -Clazz_defineMethod (c$, "interrupt0", - function () { -this.$interrupted = true; -}); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.lang.Thread, "State", Enum); -Clazz_defineEnumConstant (c$, "NEW", 0, []); -Clazz_defineEnumConstant (c$, "RUNNABLE", 1, []); -Clazz_defineEnumConstant (c$, "BLOCKED", 2, []); -Clazz_defineEnumConstant (c$, "WAITING", 3, []); -Clazz_defineEnumConstant (c$, "TIMED_WAITING", 4, []); -Clazz_defineEnumConstant (c$, "TERMINATED", 5, []); -c$ = Clazz_p0p (); -Clazz_declareInterface (java.lang.Thread, "UncaughtExceptionHandler"); -Clazz_defineStatics (c$, -"threadInitNumber", 0, -"threadSeqNumber", 0, -"thisThread", null, -"MIN_PRIORITY", 1, -"NORM_PRIORITY", 5, -"MAX_PRIORITY", 10, -"defaultUncaughtExceptionHandler", null); -}); -Clazz_declarePackage ("java.lang"); -Clazz_load (["java.lang.Thread"], "java.lang.ThreadGroup", ["java.lang.IllegalThreadStateException", "$.ThreadDeath", "java.util.Arrays"], function () { -c$ = Clazz_decorateAsClass (function () { -this.parent = null; -this.name = null; -this.maxPriority = 10; -this.destroyed = false; -this.daemon = false; -this.vmAllowSuspension = false; -this.nUnstartedThreads = 0; -this.nthreads = 0; -this.threads = null; -this.ngroups = 0; -this.groups = null; -this.html5Applet = null; -Clazz_instantialize (this, arguments); -}, java.lang, "ThreadGroup", null, java.lang.Thread.UncaughtExceptionHandler); -Clazz_makeConstructor (c$, -function (name) { -this.construct (java.lang.Thread.currentThread ().getThreadGroup (), name); -}, "~S"); -Clazz_makeConstructor (c$, -function (parent, name) { -this.name = name; -this.parent = parent; -if (parent != null) { -this.maxPriority = parent.maxPriority; -this.daemon = parent.daemon; -this.vmAllowSuspension = parent.vmAllowSuspension; -parent.add (this); -}}, "java.lang.ThreadGroup,~S"); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "getParent", -function () { -if (this.parent != null) this.parent.checkAccess (); -return this.parent; -}); -Clazz_defineMethod (c$, "getMaxPriority", -function () { -return this.maxPriority; -}); -Clazz_defineMethod (c$, "isDaemon", -function () { -return this.daemon; -}); -Clazz_defineMethod (c$, "isDestroyed", -function () { -return this.destroyed; -}); -Clazz_defineMethod (c$, "setDaemon", -function (daemon) { -this.checkAccess (); -this.daemon = daemon; -}, "~B"); -Clazz_defineMethod (c$, "setMaxPriority", -function (pri) { -var ngroupsSnapshot; -var groupsSnapshot; -{ -this.checkAccess (); -if (pri < 1 || pri > 10) { -return; -}this.maxPriority = (this.parent != null) ? Math.min (pri, this.parent.maxPriority) : pri; -ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}}for (var i = 0; i < ngroupsSnapshot; i++) { -groupsSnapshot[i].setMaxPriority (pri); -} -}, "~N"); -Clazz_defineMethod (c$, "parentOf", -function (g) { -for (; g != null; g = g.parent) { -if (g === this) { -return true; -}} -return false; -}, "java.lang.ThreadGroup"); -Clazz_defineMethod (c$, "checkAccess", -function () { -}); -Clazz_defineMethod (c$, "activeCount", -function () { -var result; -var ngroupsSnapshot; -var groupsSnapshot; -{ -if (this.destroyed) { -return 0; -}result = this.nthreads; -ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}}for (var i = 0; i < ngroupsSnapshot; i++) { -result += groupsSnapshot[i].activeCount (); -} -return result; -}); -Clazz_defineMethod (c$, "enumerate", -function (list) { -this.checkAccess (); -return this.enumerate (list, 0, true); -}, "~A"); -Clazz_defineMethod (c$, "enumerate", -function (list, recurse) { -this.checkAccess (); -return this.enumerate (list, 0, recurse); -}, "~A,~B"); -Clazz_defineMethod (c$, "enumerate", - function (list, n, recurse) { -var ngroupsSnapshot = 0; -var groupsSnapshot = null; -{ -if (this.destroyed) { -return 0; -}var nt = this.nthreads; -if (nt > list.length - n) { -nt = list.length - n; -}for (var i = 0; i < nt; i++) { -if (this.threads[i].isAlive ()) { -list[n++] = this.threads[i]; -}} -if (recurse) { -ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}}}if (recurse) { -for (var i = 0; i < ngroupsSnapshot; i++) { -n = groupsSnapshot[i].enumerate (list, n, true); -} -}return n; -}, "~A,~N,~B"); -Clazz_defineMethod (c$, "activeGroupCount", -function () { -var ngroupsSnapshot; -var groupsSnapshot; -{ -if (this.destroyed) { -return 0; -}ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}}var n = ngroupsSnapshot; -for (var i = 0; i < ngroupsSnapshot; i++) { -n += groupsSnapshot[i].activeGroupCount (); -} -return n; -}); -Clazz_defineMethod (c$, "enumerate", -function (list) { -this.checkAccess (); -return this.enumerate (list, 0, true); -}, "~A"); -Clazz_defineMethod (c$, "enumerate", -function (list, recurse) { -this.checkAccess (); -return this.enumerate (list, 0, recurse); -}, "~A,~B"); -Clazz_defineMethod (c$, "enumerate", - function (list, n, recurse) { -var ngroupsSnapshot = 0; -var groupsSnapshot = null; -{ -if (this.destroyed) { -return 0; -}var ng = this.ngroups; -if (ng > list.length - n) { -ng = list.length - n; -}if (ng > 0) { -System.arraycopy (this.groups, 0, list, n, ng); -n += ng; -}if (recurse) { -ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}}}if (recurse) { -for (var i = 0; i < ngroupsSnapshot; i++) { -n = groupsSnapshot[i].enumerate (list, n, true); -} -}return n; -}, "~A,~N,~B"); -Clazz_defineMethod (c$, "stop", -function () { -if (this.stopOrSuspend (false)) java.lang.Thread.currentThread ().stop (); -}); -Clazz_defineMethod (c$, "interrupt", -function () { -var ngroupsSnapshot; -var groupsSnapshot; -{ -this.checkAccess (); -for (var i = 0; i < this.nthreads; i++) { -this.threads[i].interrupt (); -} -ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}}for (var i = 0; i < ngroupsSnapshot; i++) { -groupsSnapshot[i].interrupt (); -} -}); -Clazz_defineMethod (c$, "suspend", -function () { -if (this.stopOrSuspend (true)) java.lang.Thread.currentThread ().suspend (); -}); -Clazz_defineMethod (c$, "stopOrSuspend", - function (suspend) { -var suicide = false; -var us = java.lang.Thread.currentThread (); -var ngroupsSnapshot; -var groupsSnapshot = null; -{ -this.checkAccess (); -for (var i = 0; i < this.nthreads; i++) { -if (this.threads[i] === us) suicide = true; - else if (suspend) this.threads[i].suspend (); - else this.threads[i].stop (); -} -ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -}}for (var i = 0; i < ngroupsSnapshot; i++) suicide = groupsSnapshot[i].stopOrSuspend (suspend) || suicide; - -return suicide; -}, "~B"); -Clazz_defineMethod (c$, "resume", -function () { -var ngroupsSnapshot; -var groupsSnapshot; -{ -this.checkAccess (); -for (var i = 0; i < this.nthreads; i++) { -this.threads[i].resume (); -} -ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}}for (var i = 0; i < ngroupsSnapshot; i++) { -groupsSnapshot[i].resume (); -} -}); -Clazz_defineMethod (c$, "destroy", -function () { -var ngroupsSnapshot; -var groupsSnapshot; -{ -this.checkAccess (); -if (this.destroyed || (this.nthreads > 0)) { -throw new IllegalThreadStateException (); -}ngroupsSnapshot = this.ngroups; -if (this.groups != null) { -groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot); -} else { -groupsSnapshot = null; -}if (this.parent != null) { -this.destroyed = true; -this.ngroups = 0; -this.groups = null; -this.nthreads = 0; -this.threads = null; -}}for (var i = 0; i < ngroupsSnapshot; i += 1) { -groupsSnapshot[i].destroy (); -} -if (this.parent != null) { -this.parent.remove (this); -}}); -Clazz_defineMethod (c$, "add", - function (g) { -{ -if (this.destroyed) { -throw new IllegalThreadStateException (); -}if (this.groups == null) { -this.groups = new Array (4); -} else if (this.ngroups == this.groups.length) { -this.groups = java.util.Arrays.copyOf (this.groups, this.ngroups * 2); -}this.groups[this.ngroups] = g; -this.ngroups++; -}}, "java.lang.ThreadGroup"); -Clazz_defineMethod (c$, "remove", - function (g) { -{ -if (this.destroyed) { -return; -}for (var i = 0; i < this.ngroups; i++) { -if (this.groups[i] === g) { -this.ngroups -= 1; -System.arraycopy (this.groups, i + 1, this.groups, i, this.ngroups - i); -this.groups[this.ngroups] = null; -break; -}} -if (this.nthreads == 0) { -this.notifyAll (); -}if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) { -this.destroy (); -}}}, "java.lang.ThreadGroup"); -Clazz_defineMethod (c$, "addUnstarted", -function () { -{ -if (this.destroyed) { -throw new IllegalThreadStateException (); -}this.nUnstartedThreads++; -}}); -Clazz_defineMethod (c$, "add", -function (t) { -{ -if (this.destroyed) { -throw new IllegalThreadStateException (); -}if (this.threads == null) { -this.threads = new Array (4); -} else if (this.nthreads == this.threads.length) { -this.threads = java.util.Arrays.copyOf (this.threads, this.nthreads * 2); -}this.threads[this.nthreads] = t; -this.nthreads++; -this.nUnstartedThreads--; -}}, "java.lang.Thread"); -Clazz_defineMethod (c$, "remove", -function (t) { -{ -if (this.destroyed) { -return; -}for (var i = 0; i < this.nthreads; i++) { -if (this.threads[i] === t) { -System.arraycopy (this.threads, i + 1, this.threads, i, --this.nthreads - i); -this.threads[this.nthreads] = null; -break; -}} -if (this.nthreads == 0) { -this.notifyAll (); -}if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) { -this.destroy (); -}}}, "java.lang.Thread"); -Clazz_defineMethod (c$, "uncaughtException", -function (t, e) { -if (this.parent != null) { -this.parent.uncaughtException (t, e); -} else { -var ueh = java.lang.Thread.getDefaultUncaughtExceptionHandler (); -if (ueh != null) { -ueh.uncaughtException (t, e); -} else if (!(Clazz_instanceOf (e, ThreadDeath))) { -System.err.print ("Exception in thread \"" + t.getName () + "\" "); -e.printStackTrace (System.err); -}}}, "java.lang.Thread,Throwable"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[name=" + this.getName () + ",maxpri=" + this.maxPriority + ",html5Applet=" + this.html5Applet + "]"; -}); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.LayoutManager"], "java.awt.FlowLayout", ["java.awt.Dimension"], function () { -c$ = Clazz_decorateAsClass (function () { -this.align = 0; -this.newAlign = 0; -this.hgap = 0; -this.vgap = 0; -this.alignOnBaseline = false; -Clazz_instantialize (this, arguments); -}, java.awt, "FlowLayout", null, [java.awt.LayoutManager, java.io.Serializable]); -Clazz_makeConstructor (c$, -function () { -this.construct (1, 5, 5); -}); -Clazz_makeConstructor (c$, -function (align) { -this.construct (align, 5, 5); -}, "~N"); -Clazz_makeConstructor (c$, -function (align, hgap, vgap) { -this.hgap = hgap; -this.vgap = vgap; -this.setAlignment (align); -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "getAlignment", -function () { -return this.newAlign; -}); -Clazz_defineMethod (c$, "setAlignment", -function (align) { -this.newAlign = align; -switch (align) { -case 3: -this.align = 0; -break; -case 4: -this.align = 2; -break; -default: -this.align = align; -break; -} -}, "~N"); -Clazz_defineMethod (c$, "getHgap", -function () { -return this.hgap; -}); -Clazz_defineMethod (c$, "setHgap", -function (hgap) { -this.hgap = hgap; -}, "~N"); -Clazz_defineMethod (c$, "getVgap", -function () { -return this.vgap; -}); -Clazz_defineMethod (c$, "setVgap", -function (vgap) { -this.vgap = vgap; -}, "~N"); -Clazz_defineMethod (c$, "setAlignOnBaseline", -function (alignOnBaseline) { -this.alignOnBaseline = alignOnBaseline; -}, "~B"); -Clazz_defineMethod (c$, "getAlignOnBaseline", -function () { -return this.alignOnBaseline; -}); -Clazz_overrideMethod (c$, "addLayoutComponent", -function (name, comp) { -}, "~S,java.awt.Component"); -Clazz_overrideMethod (c$, "removeLayoutComponent", -function (comp) { -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "preferredLayoutSize", -function (target) { -{ -var dim = new java.awt.Dimension (0, 0); -var nmembers = target.getComponentCount (); -var firstVisibleComponent = true; -var useBaseline = this.getAlignOnBaseline (); -var maxAscent = 0; -var maxDescent = 0; -for (var i = 0; i < nmembers; i++) { -var m = target.getComponent (i); -if (m.isVisible ()) { -var d = m.getPreferredSize (); -dim.height = Math.max (dim.height, d.height); -if (firstVisibleComponent) { -firstVisibleComponent = false; -} else { -dim.width += this.hgap; -}dim.width += d.width; -if (useBaseline) { -var baseline = m.getBaseline (d.width, d.height); -if (baseline >= 0) { -maxAscent = Math.max (maxAscent, baseline); -maxDescent = Math.max (maxDescent, d.height - baseline); -}}}} -if (useBaseline) { -dim.height = Math.max (maxAscent + maxDescent, dim.height); -}var insets = target.getInsets (); -dim.width += insets.left + insets.right + this.hgap * 2; -dim.height += insets.top + insets.bottom + this.vgap * 2; -return dim; -}}, "java.awt.Container"); -Clazz_overrideMethod (c$, "minimumLayoutSize", -function (target) { -{ -var useBaseline = this.getAlignOnBaseline (); -var dim = new java.awt.Dimension (0, 0); -var nmembers = target.getComponentCount (); -var maxAscent = 0; -var maxDescent = 0; -var firstVisibleComponent = true; -for (var i = 0; i < nmembers; i++) { -var m = target.getComponent (i); -if (m.visible) { -var d = m.getMinimumSize (); -dim.height = Math.max (dim.height, d.height); -if (firstVisibleComponent) { -firstVisibleComponent = false; -} else { -dim.width += this.hgap; -}dim.width += d.width; -if (useBaseline) { -var baseline = m.getBaseline (d.width, d.height); -if (baseline >= 0) { -maxAscent = Math.max (maxAscent, baseline); -maxDescent = Math.max (maxDescent, dim.height - baseline); -}}}} -if (useBaseline) { -dim.height = Math.max (maxAscent + maxDescent, dim.height); -}var insets = target.getInsets (); -dim.width += insets.left + insets.right + this.hgap * 2; -dim.height += insets.top + insets.bottom + this.vgap * 2; -return dim; -}}, "java.awt.Container"); -Clazz_defineMethod (c$, "moveComponents", - function (target, x, y, width, height, rowStart, rowEnd, ltr, useBaseline, ascent, descent) { -switch (this.newAlign) { -case 0: -x += ltr ? 0 : width; -break; -case 1: -x += Clazz_doubleToInt (width / 2); -break; -case 2: -x += ltr ? width : 0; -break; -case 3: -break; -case 4: -x += width; -break; -} -var maxAscent = 0; -var nonbaselineHeight = 0; -var baselineOffset = 0; -if (useBaseline) { -var maxDescent = 0; -for (var i = rowStart; i < rowEnd; i++) { -var m = target.getComponent (i); -if (m.visible) { -if (ascent[i] >= 0) { -maxAscent = Math.max (maxAscent, ascent[i]); -maxDescent = Math.max (maxDescent, descent[i]); -} else { -nonbaselineHeight = Math.max (m.getHeight (), nonbaselineHeight); -}}} -height = Math.max (maxAscent + maxDescent, nonbaselineHeight); -baselineOffset = Clazz_doubleToInt ((height - maxAscent - maxDescent) / 2); -}for (var i = rowStart; i < rowEnd; i++) { -var m = target.getComponent (i); -if (m.isVisible ()) { -var cy; -if (useBaseline && ascent[i] >= 0) { -cy = y + baselineOffset + maxAscent - ascent[i]; -} else { -cy = y + Clazz_doubleToInt ((height - m.height) / 2); -}if (ltr) { -m.setLocation (x, cy); -} else { -m.setLocation (target.width - x - m.width, cy); -}x += m.width + this.hgap; -}} -return height; -}, "java.awt.Container,~N,~N,~N,~N,~N,~N,~B,~B,~A,~A"); -Clazz_overrideMethod (c$, "layoutContainer", -function (target) { -System.out.println ("FlowLayout laying out " + target); -{ -var insets = target.getInsets (); -var maxwidth = target.width - (insets.left + insets.right + this.hgap * 2); -var nmembers = target.getComponentCount (); -var x = 0; -var y = insets.top + this.vgap; -var rowh = 0; -var start = 0; -var ltr = target.getComponentOrientation ().isLeftToRight (); -var useBaseline = this.getAlignOnBaseline (); -var ascent = null; -var descent = null; -if (useBaseline) { -ascent = Clazz_newIntArray (nmembers, 0); -descent = Clazz_newIntArray (nmembers, 0); -}for (var i = 0; i < nmembers; i++) { -var m = target.getComponent (i); -if (m.isVisible ()) { -var d = m.getPreferredSize (); -m.setSize (d.width, d.height); -if (useBaseline) { -var baseline = m.getBaseline (d.width, d.height); -if (baseline >= 0) { -ascent[i] = baseline; -descent[i] = d.height - baseline; -} else { -ascent[i] = -1; -}}if ((x == 0) || ((x + d.width) <= maxwidth)) { -if (x > 0) { -x += this.hgap; -}x += d.width; -rowh = Math.max (rowh, d.height); -} else { -rowh = this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, i, ltr, useBaseline, ascent, descent); -x = d.width; -y += this.vgap + rowh; -rowh = d.height; -start = i; -}}} -this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, nmembers, ltr, useBaseline, ascent, descent); -}}, "java.awt.Container"); -Clazz_overrideMethod (c$, "toString", -function () { -var str = ""; -switch (this.align) { -case 0: -str = ",align=left"; -break; -case 1: -str = ",align=center"; -break; -case 2: -str = ",align=right"; -break; -case 3: -str = ",align=leading"; -break; -case 4: -str = ",align=trailing"; -break; -} -return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + str + "]"; -}); -Clazz_defineStatics (c$, -"LEFT", 0, -"CENTER", 1, -"RIGHT", 2, -"LEADING", 3, -"TRAILING", 4); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.LayoutManager2"], "java.awt.BorderLayout", ["java.lang.IllegalArgumentException", "java.awt.Dimension"], function () { -c$ = Clazz_decorateAsClass (function () { -this.hgap = 0; -this.vgap = 0; -this.north = null; -this.west = null; -this.east = null; -this.south = null; -this.center = null; -this.firstLine = null; -this.lastLine = null; -this.firstItem = null; -this.lastItem = null; -Clazz_instantialize (this, arguments); -}, java.awt, "BorderLayout", null, [java.awt.LayoutManager2, java.io.Serializable]); -Clazz_makeConstructor (c$, -function () { -this.construct (0, 0); -}); -Clazz_makeConstructor (c$, -function (hgap, vgap) { -this.hgap = hgap; -this.vgap = vgap; -}, "~N,~N"); -Clazz_defineMethod (c$, "getHgap", -function () { -return this.hgap; -}); -Clazz_defineMethod (c$, "setHgap", -function (hgap) { -this.hgap = hgap; -}, "~N"); -Clazz_defineMethod (c$, "getVgap", -function () { -return this.vgap; -}); -Clazz_defineMethod (c$, "setVgap", -function (vgap) { -this.vgap = vgap; -}, "~N"); -Clazz_defineMethod (c$, "addLayoutComponent", -function (comp, constraints) { -{ -if ((constraints == null) || (Clazz_instanceOf (constraints, String))) { -this.addLayoutComponent (constraints, comp); -} else { -throw new IllegalArgumentException ("cannot add to layout: constraint must be a string (or null)"); -}}}, "java.awt.Component,~O"); -Clazz_defineMethod (c$, "addLayoutComponent", -function (name, comp) { -{ -if (name == null) { -name = "Center"; -}System.out.println ("BorderLayout adding " + name + " " + comp); -if ("Center".equals (name)) { -this.center = comp; -} else if ("North".equals (name)) { -this.north = comp; -} else if ("South".equals (name)) { -this.south = comp; -} else if ("East".equals (name)) { -this.east = comp; -} else if ("West".equals (name)) { -this.west = comp; -} else if ("First".equals (name)) { -this.firstLine = comp; -} else if ("Last".equals (name)) { -this.lastLine = comp; -} else if ("Before".equals (name)) { -this.firstItem = comp; -} else if ("After".equals (name)) { -this.lastItem = comp; -} else { -throw new IllegalArgumentException ("cannot add to layout: unknown constraint: " + name); -}}}, "~S,java.awt.Component"); -Clazz_overrideMethod (c$, "removeLayoutComponent", -function (comp) { -{ -if (comp === this.center) { -this.center = null; -} else if (comp === this.north) { -this.north = null; -} else if (comp === this.south) { -this.south = null; -} else if (comp === this.east) { -this.east = null; -} else if (comp === this.west) { -this.west = null; -}if (comp === this.firstLine) { -this.firstLine = null; -} else if (comp === this.lastLine) { -this.lastLine = null; -} else if (comp === this.firstItem) { -this.firstItem = null; -} else if (comp === this.lastItem) { -this.lastItem = null; -}}}, "java.awt.Component"); -Clazz_defineMethod (c$, "getLayoutComponent", -function (constraints) { -if ("Center".equals (constraints)) { -return this.center; -} else if ("North".equals (constraints)) { -return this.north; -} else if ("South".equals (constraints)) { -return this.south; -} else if ("West".equals (constraints)) { -return this.west; -} else if ("East".equals (constraints)) { -return this.east; -} else if ("First".equals (constraints)) { -return this.firstLine; -} else if ("Last".equals (constraints)) { -return this.lastLine; -} else if ("Before".equals (constraints)) { -return this.firstItem; -} else if ("After".equals (constraints)) { -return this.lastItem; -} else { -throw new IllegalArgumentException ("cannot get component: unknown constraint: " + constraints); -}}, "~O"); -Clazz_defineMethod (c$, "getLayoutComponent", -function (target, constraints) { -var ltr = target.getComponentOrientation ().isLeftToRight (); -var result = null; -if ("North".equals (constraints)) { -result = (this.firstLine != null) ? this.firstLine : this.north; -} else if ("South".equals (constraints)) { -result = (this.lastLine != null) ? this.lastLine : this.south; -} else if ("West".equals (constraints)) { -result = ltr ? this.firstItem : this.lastItem; -if (result == null) { -result = this.west; -}} else if ("East".equals (constraints)) { -result = ltr ? this.lastItem : this.firstItem; -if (result == null) { -result = this.east; -}} else if ("Center".equals (constraints)) { -result = this.center; -} else { -throw new IllegalArgumentException ("cannot get component: invalid constraint: " + constraints); -}return result; -}, "java.awt.Container,~O"); -Clazz_defineMethod (c$, "getConstraints", -function (comp) { -if (comp == null) { -return null; -}if (comp === this.center) { -return "Center"; -} else if (comp === this.north) { -return "North"; -} else if (comp === this.south) { -return "South"; -} else if (comp === this.west) { -return "West"; -} else if (comp === this.east) { -return "East"; -} else if (comp === this.firstLine) { -return "First"; -} else if (comp === this.lastLine) { -return "Last"; -} else if (comp === this.firstItem) { -return "Before"; -} else if (comp === this.lastItem) { -return "After"; -}return null; -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "minimumLayoutSize", -function (target) { -{ -var dim = new java.awt.Dimension (0, 0); -var ltr = target.getComponentOrientation ().isLeftToRight (); -var c = null; -if ((c = this.getChild ("East", ltr)) != null) { -var d = c.getMinimumSize (); -dim.width += d.width + this.hgap; -dim.height = Math.max (d.height, dim.height); -}if ((c = this.getChild ("West", ltr)) != null) { -var d = c.getMinimumSize (); -dim.width += d.width + this.hgap; -dim.height = Math.max (d.height, dim.height); -}if ((c = this.getChild ("Center", ltr)) != null) { -var d = c.getMinimumSize (); -dim.width += d.width; -dim.height = Math.max (d.height, dim.height); -}if ((c = this.getChild ("North", ltr)) != null) { -var d = c.getMinimumSize (); -dim.width = Math.max (d.width, dim.width); -dim.height += d.height + this.vgap; -}if ((c = this.getChild ("South", ltr)) != null) { -var d = c.getMinimumSize (); -dim.width = Math.max (d.width, dim.width); -dim.height += d.height + this.vgap; -}var insets = target.getInsets (); -dim.width += insets.left + insets.right; -dim.height += insets.top + insets.bottom; -return dim; -}}, "java.awt.Container"); -Clazz_overrideMethod (c$, "preferredLayoutSize", -function (target) { -{ -var dim = new java.awt.Dimension (0, 0); -var ltr = target.getComponentOrientation ().isLeftToRight (); -var c = null; -if ((c = this.getChild ("East", ltr)) != null) { -var d = c.getPreferredSize (); -dim.width += d.width + this.hgap; -dim.height = Math.max (d.height, dim.height); -}if ((c = this.getChild ("West", ltr)) != null) { -var d = c.getPreferredSize (); -dim.width += d.width + this.hgap; -dim.height = Math.max (d.height, dim.height); -}if ((c = this.getChild ("Center", ltr)) != null) { -var d = c.getPreferredSize (); -dim.width += d.width; -dim.height = Math.max (d.height, dim.height); -}if ((c = this.getChild ("North", ltr)) != null) { -var d = c.getPreferredSize (); -dim.width = Math.max (d.width, dim.width); -dim.height += d.height + this.vgap; -}if ((c = this.getChild ("South", ltr)) != null) { -var d = c.getPreferredSize (); -dim.width = Math.max (d.width, dim.width); -dim.height += d.height + this.vgap; -}var insets = target.getInsets (); -dim.width += insets.left + insets.right; -dim.height += insets.top + insets.bottom; -return dim; -}}, "java.awt.Container"); -Clazz_overrideMethod (c$, "maximumLayoutSize", -function (target) { -return new java.awt.Dimension (2147483647, 2147483647); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayoutAlignmentX", -function (parent) { -return 0.5; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayoutAlignmentY", -function (parent) { -return 0.5; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "invalidateLayout", -function (target) { -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "layoutContainer", -function (target) { -System.out.println ("BorderLayout laying out " + target); -{ -var insets = target.getInsets (); -var top = insets.top; -var bottom = target.height - insets.bottom; -var left = insets.left; -var right = target.width - insets.right; -var ltr = target.getComponentOrientation ().isLeftToRight (); -var c = null; -if ((c = this.getChild ("North", ltr)) != null) { -c.setSize (right - left, c.height); -var d = c.getPreferredSize (); -c.setBounds (left, top, right - left, d.height); -top += d.height + this.vgap; -}if ((c = this.getChild ("South", ltr)) != null) { -c.setSize (right - left, c.height); -var d = c.getPreferredSize (); -c.setBounds (left, bottom - d.height, right - left, d.height); -bottom -= d.height + this.vgap; -}if ((c = this.getChild ("East", ltr)) != null) { -c.setSize (c.width, bottom - top); -var d = c.getPreferredSize (); -c.setBounds (right - d.width, top, d.width, bottom - top); -right -= d.width + this.hgap; -}if ((c = this.getChild ("West", ltr)) != null) { -c.setSize (c.width, bottom - top); -var d = c.getPreferredSize (); -c.setBounds (left, top, d.width, bottom - top); -left += d.width + this.hgap; -}if ((c = this.getChild ("Center", ltr)) != null) { -c.setBounds (left, top, right - left, bottom - top); -}}}, "java.awt.Container"); -Clazz_defineMethod (c$, "getChild", - function (key, ltr) { -var result = null; -if (key === "North") { -result = (this.firstLine != null) ? this.firstLine : this.north; -} else if (key === "South") { -result = (this.lastLine != null) ? this.lastLine : this.south; -} else if (key === "West") { -result = ltr ? this.firstItem : this.lastItem; -if (result == null) { -result = this.west; -}} else if (key === "East") { -result = ltr ? this.lastItem : this.firstItem; -if (result == null) { -result = this.east; -}} else if (key === "Center") { -result = this.center; -}if (result != null && !result.visible) { -result = null; -}return result; -}, "~S,~B"); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + "]"; -}); -Clazz_defineStatics (c$, -"NORTH", "North", -"SOUTH", "South", -"EAST", "East", -"WEST", "West", -"CENTER", "Center", -"BEFORE_FIRST_LINE", "First", -"AFTER_LAST_LINE", "Last", -"BEFORE_LINE_BEGINS", "Before", -"AFTER_LINE_ENDS", "After"); -c$.PAGE_START = c$.prototype.PAGE_START = "First"; -c$.PAGE_END = c$.prototype.PAGE_END = "Last"; -c$.LINE_START = c$.prototype.LINE_START = "Before"; -c$.LINE_END = c$.prototype.LINE_END = "After"; -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.LayoutManager"], "java.awt.LayoutManager2", null, function () { -Clazz_declareInterface (java.awt, "LayoutManager2", java.awt.LayoutManager); -}); -Clazz_declarePackage ("java.awt"); -Clazz_declareInterface (java.awt, "LayoutManager"); -Clazz_declarePackage ("java.awt"); -Clazz_load (["jssun.awt.SunGraphicsCallback"], "java.awt.GraphicsCallback", null, function () { -c$ = Clazz_declareType (java.awt, "GraphicsCallback", jssun.awt.SunGraphicsCallback); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintCallback", java.awt.GraphicsCallback); -Clazz_makeConstructor (c$, - function () { -Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintCallback, []); -}); -Clazz_overrideMethod (c$, "run", -function (a, b) { -a.paint (b); -}, "java.awt.Component,java.awt.Graphics"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function () { -return java.awt.GraphicsCallback.PaintCallback.instance; -}); -c$.instance = c$.prototype.instance = new java.awt.GraphicsCallback.PaintCallback (); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintAllCallback", java.awt.GraphicsCallback); -Clazz_makeConstructor (c$, - function () { -Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintAllCallback, []); -}); -Clazz_overrideMethod (c$, "run", -function (a, b) { -a.paintAll (b); -}, "java.awt.Component,java.awt.Graphics"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function () { -return java.awt.GraphicsCallback.PaintAllCallback.instance; -}); -c$.instance = c$.prototype.instance = new java.awt.GraphicsCallback.PaintAllCallback (); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintHeavyweightComponentsCallback", java.awt.GraphicsCallback); -Clazz_makeConstructor (c$, - function () { -Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback, []); -}); -Clazz_overrideMethod (c$, "run", -function (a, b) { -if (a.isLightweight ()) { -a.paintHeavyweightComponents (b); -} else { -a.paintAll (b); -}}, "java.awt.Component,java.awt.Graphics"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function () { -return java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.instance; -}); -c$.instance = c$.prototype.instance = new java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback (); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.Component", "java.awt.event.AWTEventListener"], ["java.awt.LightweightDispatcher", "$.Container"], ["java.lang.ArrayIndexOutOfBoundsException", "$.IllegalArgumentException", "$.IllegalStateException", "java.util.ArrayList", "java.awt.AWTEventMulticaster", "$.Dimension", "$.GraphicsCallback", "$.Insets", "$.LayoutManager2", "$.Toolkit", "java.awt.event.ContainerEvent", "$.ContainerListener", "$.MouseEvent", "$.MouseWheelEvent", "java.awt.peer.ContainerPeer", "$.LightweightPeer"], function () { -c$ = Clazz_decorateAsClass (function () { -this.component = null; -this.layoutMgr = null; -this.dispatcher = null; -this.focusCycleRoot = false; -this.focusTraversalPolicyProvider = false; -this.containerListener = null; -this.listeningChildren = 0; -this.listeningBoundsChildren = 0; -this.descendantsCount = 0; -this.preserveBackgroundColor = null; -this.numOfHWComponents = 0; -this.numOfLWComponents = 0; -this.modalComp = null; -this.modalAppContext = null; -Clazz_instantialize (this, arguments); -}, java.awt, "Container", java.awt.Component); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.Container, []); -this.component = new java.util.ArrayList (); -}); -Clazz_defineMethod (c$, "initializeFocusTraversalKeys", -function () { -}); -Clazz_defineMethod (c$, "getComponentCount", -function () { -return this.countComponents (); -}); -Clazz_defineMethod (c$, "countComponents", -function () { -return this.component.size (); -}); -Clazz_defineMethod (c$, "getComponent", -function (n) { -if ((n < 0) || (n >= this.component.size ())) { -throw new ArrayIndexOutOfBoundsException ("No such child: " + n); -}return this.component.get (n); -}, "~N"); -Clazz_defineMethod (c$, "getComponents", -function () { -return this.getComponents_NoClientCode (); -}); -Clazz_defineMethod (c$, "getComponents_NoClientCode", -function () { -return this.component.toArray (java.awt.Container.EMPTY_ARRAY); -}); -Clazz_defineMethod (c$, "getInsets", -function () { -var peer = this.peer; -if (Clazz_instanceOf (peer, java.awt.peer.ContainerPeer)) { -var cpeer = peer; -return cpeer.getInsets ().clone (); -}return new java.awt.Insets (0, 0, 0, 0); -}); -Clazz_defineMethod (c$, "add", -function (comp) { -return this.addImpl (comp, null, -1); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "add", -function (name, comp) { -return this.addImpl (comp, name, -1); -}, "~S,java.awt.Component"); -Clazz_defineMethod (c$, "add", -function (comp, index) { -return this.addImpl (comp, null, index); -}, "java.awt.Component,~N"); -Clazz_defineMethod (c$, "checkAddToSelf", - function (comp) { -if (Clazz_instanceOf (comp, java.awt.Container)) { -for (var cn = this; cn != null; cn = cn.parent) { -if (cn === comp) { -throw new IllegalArgumentException ("adding container's parent to itself"); -}} -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "checkNotAWindow", - function (comp) { -if (Clazz_instanceOf (comp, java.awt.Window)) { -throw new IllegalArgumentException ("adding a window to a container"); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "removeDelicately", - function (comp, newParent, newIndex) { -var index = this.getComponentZOrder (comp); -var needRemoveNotify = java.awt.Container.isRemoveNotifyNeeded (comp, this, newParent); -if (needRemoveNotify) { -comp.removeNotify (); -}if (newParent !== this) { -if (this.layoutMgr != null) { -this.layoutMgr.removeLayoutComponent (comp); -}this.adjustListeningChildren (32768, -comp.numListening (32768)); -this.adjustListeningChildren (65536, -comp.numListening (65536)); -this.adjustDescendants (-(comp.countHierarchyMembers ())); -comp.parent = null; -this.component.remove (index); -this.invalidateIfValid (); -} else { -this.component.remove (index); -this.component.add (newIndex, comp); -}if (comp.parent == null) { -if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { -var e = new java.awt.event.ContainerEvent (this, 301, comp); -this.dispatchEvent (e); -}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); -if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { -this.updateCursorImmediately (); -}}return needRemoveNotify; -}, "java.awt.Component,java.awt.Container,~N"); -Clazz_defineMethod (c$, "canContainFocusOwner", -function (focusOwnerCandidate) { -if (!(this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ())) { -return false; -}{ -if (this.parent != null) { -return this.parent.canContainFocusOwner (focusOwnerCandidate); -}}return true; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "hasHeavyweightDescendants", -function () { -return this.numOfHWComponents > 0; -}); -Clazz_defineMethod (c$, "hasLightweightDescendants", -function () { -return this.numOfLWComponents > 0; -}); -Clazz_defineMethod (c$, "getHeavyweightContainer", -function () { -if (this.peer != null && !(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) { -return this; -} else { -return this.getNativeContainer (); -}}); -c$.isRemoveNotifyNeeded = Clazz_defineMethod (c$, "isRemoveNotifyNeeded", - function (comp, oldContainer, newContainer) { -return false; -}, "java.awt.Component,java.awt.Container,java.awt.Container"); -Clazz_defineMethod (c$, "setComponentZOrder", -function (comp, index) { -{ -var curParent = comp.parent; -var oldZindex = this.getComponentZOrder (comp); -if (curParent === this && index == oldZindex) { -return; -}var peerRecreated = (curParent != null) ? curParent.removeDelicately (comp, this, index) : false; -this.addDelicately (comp, curParent, index); -if (!peerRecreated && oldZindex != -1) { -comp.mixOnZOrderChanging (oldZindex, index); -}}}, "java.awt.Component,~N"); -Clazz_defineMethod (c$, "reparentTraverse", - function (parentPeer, child) { -this.checkTreeLock (); -for (var i = 0; i < child.getComponentCount (); i++) { -var comp = child.getComponent (i); -if (comp.isLightweight ()) { -if (Clazz_instanceOf (comp, java.awt.Container)) { -this.reparentTraverse (parentPeer, comp); -}} else { -comp.getPeer ().reparent (parentPeer); -}} -}, "java.awt.peer.ContainerPeer,java.awt.Container"); -Clazz_defineMethod (c$, "reparentChild", - function (comp) { -if (comp == null) { -return; -}if (comp.isLightweight ()) { -if (Clazz_instanceOf (comp, java.awt.Container)) { -this.reparentTraverse (this.getPeer (), comp); -}} else { -comp.getPeer ().reparent (this.getPeer ()); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "addDelicately", - function (comp, curParent, index) { -this.checkTreeLock (); -if (curParent !== this) { -if (index == -1) { -this.component.add (comp); -} else { -this.component.add (index, comp); -}comp.parent = this; -this.adjustListeningChildren (32768, comp.numListening (32768)); -this.adjustListeningChildren (65536, comp.numListening (65536)); -this.adjustDescendants (comp.countHierarchyMembers ()); -} else { -if (index < this.component.size ()) { -this.component.set (index, comp); -}}this.invalidateIfValid (); -if (this.peer != null) { -if (comp.peer == null) { -comp.addNotify (); -} else { -var newNativeContainer = this.getHeavyweightContainer (); -var oldNativeContainer = curParent.getHeavyweightContainer (); -if (oldNativeContainer !== newNativeContainer) { -newNativeContainer.reparentChild (comp); -}if (!comp.isLightweight () && this.isLightweight ()) { -comp.relocateComponent (); -}}}if (curParent !== this) { -if (this.layoutMgr != null) { -if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { -(this.layoutMgr).addLayoutComponent (comp, null); -} else { -this.layoutMgr.addLayoutComponent (null, comp); -}}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { -var e = new java.awt.event.ContainerEvent (this, 300, comp); -this.dispatchEvent (e); -}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); -} else { -comp.createHierarchyEvents (1400, comp, this, 1400, java.awt.Toolkit.enabledOnToolkit (32768)); -}if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { -this.updateCursorImmediately (); -}}, "java.awt.Component,java.awt.Container,~N"); -Clazz_defineMethod (c$, "checkTreeLock", - function () { -}); -Clazz_defineMethod (c$, "getComponentZOrder", -function (comp) { -if (comp == null) { -return -1; -}{ -if (comp.parent !== this) { -return -1; -}return this.component.indexOf (comp); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "add", -function (comp, constraints) { -this.addImpl (comp, constraints, -1); -}, "java.awt.Component,~O"); -Clazz_defineMethod (c$, "add", -function (comp, constraints, index) { -return this.addImpl (comp, constraints, index); -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "addImpl", -function (comp, constraints, index) { -return this.addImplSAEM (comp, constraints, index); -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "addImplSAEM", -function (comp, constraints, index) { -{ -if (index > this.component.size () || (index < 0 && index != -1)) { -throw new IllegalArgumentException ("illegal component position"); -}this.checkAddToSelf (comp); -this.checkNotAWindow (comp); -if (comp.parent != null) { -comp.parent.remove (comp); -if (index > this.component.size ()) { -throw new IllegalArgumentException ("illegal component position"); -}}if (index == -1) { -this.component.add (comp); -} else { -this.component.add (index, comp); -}comp.parent = this; -this.adjustListeningChildren (32768, comp.numListening (32768)); -this.adjustListeningChildren (65536, comp.numListening (65536)); -this.adjustDescendants (comp.countHierarchyMembers ()); -this.invalidateIfValid (); -if (this.peer != null) { -comp.addNotify (); -}if (this.layoutMgr != null) { -if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { -(this.layoutMgr).addLayoutComponent (comp, constraints); -} else if (Clazz_instanceOf (constraints, String)) { -this.layoutMgr.addLayoutComponent (constraints, comp); -}}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { -var e = new java.awt.event.ContainerEvent (this, 300, comp); -this.dispatchEvent (e); -}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); -if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { -this.updateCursorImmediately (); -}}return comp; -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "checkGD", -function (stringID) { -}, "~S"); -Clazz_defineMethod (c$, "remove", -function (index) { -this.removeInt (index); -}, "~N"); -Clazz_defineMethod (c$, "removeInt", -function (index) { -{ -if (index < 0 || index >= this.component.size ()) { -throw new ArrayIndexOutOfBoundsException (index); -}var comp = this.component.get (index); -if (this.peer != null) { -comp.removeNotify (); -}if (this.layoutMgr != null) { -this.layoutMgr.removeLayoutComponent (comp); -}this.adjustListeningChildren (32768, -comp.numListening (32768)); -this.adjustListeningChildren (65536, -comp.numListening (65536)); -this.adjustDescendants (-(comp.countHierarchyMembers ())); -comp.parent = null; -this.component.remove (index); -this.invalidateIfValid (); -if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { -var e = new java.awt.event.ContainerEvent (this, 301, comp); -this.dispatchEvent (e); -}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); -if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { -this.updateCursorImmediately (); -}}}, "~N"); -Clazz_defineMethod (c$, "remove", -function (comp) { -this.removeChild (comp); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "removeChild", -function (comp) { -{ -if (comp.parent === this) { -var index = this.component.indexOf (comp); -if (index >= 0) { -this.remove (index); -}}}}, "java.awt.Component"); -Clazz_defineMethod (c$, "removeAll", -function () { -{ -this.adjustListeningChildren (32768, -this.listeningChildren); -this.adjustListeningChildren (65536, -this.listeningBoundsChildren); -this.adjustDescendants (-this.descendantsCount); -while (!this.component.isEmpty ()) { -var comp = this.component.remove (this.component.size () - 1); -if (this.peer != null) { -comp.removeNotify (); -}if (this.layoutMgr != null) { -this.layoutMgr.removeLayoutComponent (comp); -}comp.parent = null; -if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) { -var e = new java.awt.event.ContainerEvent (this, 301, comp); -this.dispatchEvent (e); -}comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768)); -} -if (this.peer != null && this.layoutMgr == null && this.isVisible ()) { -this.updateCursorImmediately (); -}this.invalidateIfValid (); -}}); -Clazz_defineMethod (c$, "numListening", -function (mask) { -var superListening = this.numListeningMask (mask); -if (mask == 32768) { -return this.listeningChildren + superListening; -} else if (mask == 65536) { -return this.listeningBoundsChildren + superListening; -} else { -return superListening; -}}, "~N"); -Clazz_defineMethod (c$, "adjustListeningChildren", -function (mask, num) { -if (num == 0) return; -if ((mask & 32768) != 0) { -this.listeningChildren += num; -}if ((mask & 65536) != 0) { -this.listeningBoundsChildren += num; -}this.adjustListeningChildrenOnParent (mask, num); -}, "~N,~N"); -Clazz_defineMethod (c$, "adjustDescendants", -function (num) { -if (num == 0) return; -this.descendantsCount += num; -this.adjustDecendantsOnParent (num); -}, "~N"); -Clazz_defineMethod (c$, "adjustDecendantsOnParent", -function (num) { -if (this.parent != null) { -this.parent.adjustDescendants (num); -}}, "~N"); -Clazz_defineMethod (c$, "countHierarchyMembers", -function () { -return this.descendantsCount + 1; -}); -Clazz_defineMethod (c$, "getListenersCount", - function (id, enabledOnToolkit) { -if (enabledOnToolkit) { -return this.descendantsCount; -}switch (id) { -case 1400: -return this.listeningChildren; -case 1401: -case 1402: -return this.listeningBoundsChildren; -default: -return 0; -} -}, "~N,~B"); -Clazz_defineMethod (c$, "createHierarchyEvents", -function (id, changed, changedParent, changeFlags, enabledOnToolkit) { -var listeners = this.getListenersCount (id, enabledOnToolkit); -for (var count = listeners, i = 0; count > 0; i++) { -count -= this.component.get (i).createHierarchyEvents (id, changed, changedParent, changeFlags, enabledOnToolkit); -} -return listeners + this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit); -}, "~N,java.awt.Component,java.awt.Container,~N,~B"); -Clazz_defineMethod (c$, "createChildHierarchyEvents", -function (id, changeFlags, enabledOnToolkit) { -if (this.component.isEmpty ()) { -return; -}var listeners = this.getListenersCount (id, enabledOnToolkit); -for (var count = listeners, i = 0; count > 0; i++) { -count -= this.component.get (i).createHierarchyEvents (id, this, this.parent, changeFlags, enabledOnToolkit); -} -}, "~N,~N,~B"); -Clazz_defineMethod (c$, "getLayout", -function () { -return this.layoutMgr; -}); -Clazz_defineMethod (c$, "setLayout", -function (mgr) { -this.layoutMgr = mgr; -this.invalidateIfValid (); -}, "java.awt.LayoutManager"); -Clazz_overrideMethod (c$, "doLayout", -function () { -this.layout (); -}); -Clazz_overrideMethod (c$, "layout", -function () { -var layoutMgr = this.layoutMgr; -if (layoutMgr != null) { -layoutMgr.layoutContainer (this); -}}); -Clazz_overrideMethod (c$, "invalidate", -function () { -var layoutMgr = this.layoutMgr; -if (Clazz_instanceOf (layoutMgr, java.awt.LayoutManager2)) { -var lm = layoutMgr; -lm.invalidateLayout (this); -}this.invalidateComp (); -}); -Clazz_overrideMethod (c$, "validate", -function () { -if (!this.isValid ()) { -var updateCur = false; -{ -if (!this.isValid () && this.peer != null) { -var p = null; -if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) { -p = this.peer; -}if (p != null) { -p.beginValidate (); -}this.validateTree (); -if (p != null) { -p.endValidate (); -updateCur = this.isVisible (); -}}}if (updateCur) { -this.updateCursorImmediately (); -}}}); -Clazz_defineMethod (c$, "validateTree", -function () { -if (!this.isValid ()) { -if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) { -(this.peer).beginLayout (); -}this.doLayout (); -for (var i = 0; i < this.component.size (); i++) { -var comp = this.component.get (i); -if ((Clazz_instanceOf (comp, java.awt.Container)) && !(Clazz_instanceOf (comp, java.awt.Window)) && !comp.isValid ()) { -(comp).validateTree (); -} else { -comp.validate (); -}} -if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) { -(this.peer).endLayout (); -}}this.validateComponent (); -}); -Clazz_defineMethod (c$, "invalidateTree", -function () { -{ -for (var i = 0; i < this.component.size (); i++) { -var comp = this.component.get (i); -if (Clazz_instanceOf (comp, java.awt.Container)) { -(comp).invalidateTree (); -} else { -comp.invalidateIfValid (); -}} -this.invalidateIfValid (); -}}); -Clazz_overrideMethod (c$, "setFont", -function (f) { -var oldfont = this.getFont (); -this.setFontComp (f); -var newfont = this.getFont (); -if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) { -this.invalidateTree (); -}}, "java.awt.Font"); -Clazz_overrideMethod (c$, "getPreferredSize", -function () { -return this.preferredSize (); -}); -Clazz_overrideMethod (c$, "preferredSize", -function () { -var dim = this.prefSize; -if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) { -{ -this.prefSize = (this.layoutMgr != null) ? this.layoutMgr.preferredLayoutSize (this) : this.prefSizeComp (); -dim = this.prefSize; -}}return (dim == null ? null : new java.awt.Dimension (dim)); -}); -Clazz_overrideMethod (c$, "getMinimumSize", -function () { -var dim = this.minSize; -if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) { -{ -this.minSize = (this.layoutMgr != null) ? this.layoutMgr.minimumLayoutSize (this) : this.minimumSize (); -dim = this.minSize; -}}if (dim != null) { -return new java.awt.Dimension (dim); -} else { -return dim; -}}); -Clazz_overrideMethod (c$, "getMaximumSize", -function () { -var dim = this.maxSize; -if (dim == null || !(this.isMaximumSizeSet () || this.isValid ())) { -{ -if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { -var lm = this.layoutMgr; -this.maxSize = lm.maximumLayoutSize (this); -} else { -this.maxSize = this.getMaxSizeComp (); -}dim = this.maxSize; -}}if (dim != null) { -return new java.awt.Dimension (dim); -} else { -return dim; -}}); -Clazz_overrideMethod (c$, "getAlignmentX", -function () { -var xAlign; -if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { -{ -var lm = this.layoutMgr; -xAlign = lm.getLayoutAlignmentX (this); -}} else { -xAlign = this.getAlignmentXComp (); -}return xAlign; -}); -Clazz_overrideMethod (c$, "getAlignmentY", -function () { -var yAlign; -if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) { -{ -var lm = this.layoutMgr; -yAlign = lm.getLayoutAlignmentY (this); -}} else { -yAlign = this.getAlignmentYComp (); -}return yAlign; -}); -Clazz_overrideMethod (c$, "paint", -function (g) { -java.awt.GraphicsCallback.PaintCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 2); -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "update", -function (g) { -if (this.isShowing ()) { -g.clearRect (0, 0, this.width, this.height); -this.paint (g); -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintComponents", -function (g) { -if (this.isShowing ()) { -java.awt.GraphicsCallback.PaintAllCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 4); -}}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "lightweightPaint", -function (g) { -this.lwPaintComp (g); -this.paintHeavyweightComponents (g); -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "paintHeavyweightComponents", -function (g) { -if (this.isShowing ()) { -java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 3); -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "addContainerListener", -function (l) { -if (l == null) { -return; -}this.containerListener = java.awt.AWTEventMulticaster.add (this.containerListener, l); -this.newEventsOnly = true; -}, "java.awt.event.ContainerListener"); -Clazz_defineMethod (c$, "removeContainerListener", -function (l) { -if (l == null) { -return; -}this.containerListener = java.awt.AWTEventMulticaster.remove (this.containerListener, l); -}, "java.awt.event.ContainerListener"); -Clazz_defineMethod (c$, "getContainerListeners", -function () { -return (this.getListeners (java.awt.event.ContainerListener)); -}); -Clazz_overrideMethod (c$, "getListeners", -function (listenerType) { -var l = null; -if (listenerType === java.awt.event.ContainerListener) { -l = this.containerListener; -} else { -return this.getListenersComp (listenerType); -}return java.awt.AWTEventMulticaster.getListeners (l, listenerType); -}, "Class"); -Clazz_overrideMethod (c$, "eventEnabled", -function (e) { -var id = e.getID (); -if (id == 300 || id == 301) { -if ((this.eventMask & 2) != 0 || this.containerListener != null) { -return true; -}return false; -}return this.eventTypeEnabled (e.id); -}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "processEvent", -function (e) { -this.processEventCont (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "processEventCont", -function (e) { -if (Clazz_instanceOf (e, java.awt.event.ContainerEvent)) { -this.processContainerEvent (e); -return; -}this.processEventComp (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "processContainerEvent", -function (e) { -var listener = this.containerListener; -if (listener != null) { -switch (e.getID ()) { -case 300: -listener.componentAdded (e); -break; -case 301: -listener.componentRemoved (e); -break; -} -}}, "java.awt.event.ContainerEvent"); -Clazz_overrideMethod (c$, "dispatchEventImpl", -function (e) { -if ((this.dispatcher != null) && this.dispatcher.dispatchEvent (e)) { -e.consume (); -if (this.peer != null) { -this.peer.handleEvent (e); -}return; -}this.dispatchEventImplComp (e); -{ -switch (e.getID ()) { -case 101: -break; -case 100: -break; -default: -break; -} -}}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "dispatchEventToSelf", -function (e) { -this.dispatchEventImplComp (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "getMouseEventTarget", - function (x, y, includeSelf, filter, searchHeavyweights) { -{ -if (arguments.length == 3) { -filter = java.awt.Container.MouseEventTargetFilter.FILTER; -searchHeavyWeights = false; -} -}var comp = null; -if (comp == null || comp === this) { -comp = this.getMouseEventTargetImpl (x, y, includeSelf, filter, false, searchHeavyweights); -}return comp; -}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B"); -Clazz_defineMethod (c$, "getMouseEventTargetImpl", - function (x, y, includeSelf, filter, searchHeavyweightChildren, searchHeavyweightDescendants) { -{ -for (var i = 0; i < this.component.size (); i++) { -var comp = this.component.get (i); -if (comp != null && comp.visible && ((!searchHeavyweightChildren && Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer)) || (searchHeavyweightChildren && !(Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer)))) && comp.contains (x - comp.x, y - comp.y)) { -if (Clazz_instanceOf (comp, java.awt.Container)) { -var child = comp; -var deeper = child.getMouseEventTarget (x - child.x, y - child.y, includeSelf, filter, searchHeavyweightDescendants); -if (deeper != null) { -return deeper; -}} else { -if (filter.accept (comp)) { -return comp; -}}}} -var isPeerOK; -var isMouseOverMe; -isPeerOK = includeSelf; -isMouseOverMe = this.contains (x, y); -if (isMouseOverMe && isPeerOK && filter.accept (this)) { -return this; -}return null; -}}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B,~B"); -Clazz_defineMethod (c$, "proxyEnableEvents", -function (events) { -if (this.parent != null) { -this.parent.proxyEnableEvents (events); -}if (this.dispatcher != null) { -this.dispatcher.enableEvents (events); -}}, "~N"); -Clazz_defineMethod (c$, "deliverEvent", -function (e) { -var comp = this.getComponentAt (e.x, e.y); -if ((comp != null) && (comp !== this)) { -e.translate (-comp.x, -comp.y); -comp.deliverEvent (e); -} else { -this.postEvent (e); -}}, "java.awt.Event"); -Clazz_defineMethod (c$, "getComponentAt", -function (x, y) { -return this.locate (x, y); -}, "~N,~N"); -Clazz_overrideMethod (c$, "locate", -function (x, y) { -return this; -}, "~N,~N"); -Clazz_defineMethod (c$, "getComponentAt", -function (p) { -return this.getComponentAt (p.x, p.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "getMousePosition", -function (allowChildren) { -return null; -}, "~B"); -Clazz_overrideMethod (c$, "isSameOrAncestorOf", -function (comp, allowChildren) { -return this === comp || (allowChildren && this.isParentOf (comp)); -}, "java.awt.Component,~B"); -Clazz_defineMethod (c$, "findComponentAt", -function (x, y) { -{ -return this.findComponentAt (x, y, true); -}}, "~N,~N"); -Clazz_defineMethod (c$, "findComponentAt", -function (x, y, ignoreEnabled) { -return null; -}, "~N,~N,~B"); -Clazz_defineMethod (c$, "findComponentAt", -function (p) { -return this.findComponentAt (p.x, p.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "addNotify", -function () { -{ -this.addNotifyComp (); -if (!(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) { -this.setDispatcher (); -}for (var i = 0; i < this.component.size (); i++) { -this.component.get (i).addNotify (); -} -}}); -Clazz_defineMethod (c$, "setDispatcher", -function () { -this.dispatcher = new java.awt.LightweightDispatcher (this); -}); -Clazz_defineMethod (c$, "removeNotify", -function () { -for (var i = this.component.size () - 1; i >= 0; i--) { -var comp = this.component.get (i); -if (comp != null) { -comp.setAutoFocusTransferOnDisposal (false); -comp.removeNotify (); -comp.setAutoFocusTransferOnDisposal (true); -}} -if (this.dispatcher != null) { -this.dispatcher.dispose (); -this.dispatcher = null; -}this.removeNotifyComp (); -}); -Clazz_defineMethod (c$, "isAncestorOf", -function (c) { -var p; -if (c == null || ((p = c.getParent ()) == null)) { -return false; -}while (p != null) { -if (p === this) { -return true; -}p = p.getParent (); -} -return false; -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "paramString", -function () { -var str = this.paramStringComp (); -var layoutMgr = this.layoutMgr; -if (layoutMgr != null) { -str += ",layout=" + layoutMgr.getClass ().getName (); -}return str; -}); -Clazz_defineMethod (c$, "setFocusTraversalKeys", -function (id, keystrokes) { -}, "~N,java.util.Set"); -Clazz_defineMethod (c$, "getFocusTraversalKeys", -function (id) { -return null; -}, "~N"); -Clazz_defineMethod (c$, "areFocusTraversalKeysSet", -function (id) { -return false; -}, "~N"); -Clazz_defineMethod (c$, "isFocusCycleRoot", -function (container) { -if (this.isFocusCycleRoot () && container === this) { -return true; -} else { -return this.isFocusCycleRootComp (container); -}}, "java.awt.Container"); -Clazz_overrideMethod (c$, "containsFocus", -function () { -return false; -}); -Clazz_defineMethod (c$, "isParentOf", - function (comp) { -{ -while (comp != null && comp !== this && !(Clazz_instanceOf (comp, java.awt.Window))) { -comp = comp.getParent (); -} -return (comp === this); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "clearMostRecentFocusOwnerOnHide", -function () { -}); -Clazz_overrideMethod (c$, "clearCurrentFocusCycleRootOnHide", -function () { -}); -Clazz_defineMethod (c$, "getTraversalRoot", -function () { -return null; -}); -Clazz_defineMethod (c$, "isFocusCycleRoot", -function () { -return this.focusCycleRoot; -}); -Clazz_defineMethod (c$, "setFocusTraversalPolicyProvider", -function (provider) { -var oldProvider; -{ -oldProvider = this.focusTraversalPolicyProvider; -this.focusTraversalPolicyProvider = provider; -}this.firePropertyChangeBool ("focusTraversalPolicyProvider", oldProvider, provider); -}, "~B"); -Clazz_defineMethod (c$, "isFocusTraversalPolicyProvider", -function () { -return this.focusTraversalPolicyProvider; -}); -Clazz_defineMethod (c$, "transferFocusDownCycle", -function () { -}); -Clazz_defineMethod (c$, "preProcessKeyEvent", -function (e) { -var parent = this.parent; -if (parent != null) { -parent.preProcessKeyEvent (e); -}}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "postProcessKeyEvent", -function (e) { -var parent = this.parent; -if (parent != null) { -parent.postProcessKeyEvent (e); -}}, "java.awt.event.KeyEvent"); -Clazz_overrideMethod (c$, "postsOldMouseEvents", -function () { -return true; -}); -Clazz_defineMethod (c$, "applyComponentOrientation", -function (o) { -this.applyCompOrientComp (o); -{ -for (var i = 0; i < this.component.size (); i++) { -var comp = this.component.get (i); -comp.applyComponentOrientation (o); -} -}}, "java.awt.ComponentOrientation"); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (listener) { -this.addPropChangeListenerComp (listener); -}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (propertyName, listener) { -this.addPropChangeListComp (propertyName, listener); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "increaseComponentCount", -function (c) { -if (!c.isDisplayable ()) { -throw new IllegalStateException ("Peer does not exist while invoking the increaseComponentCount() method"); -}var addHW = 0; -var addLW = 0; -if (Clazz_instanceOf (c, java.awt.Container)) { -addLW = (c).numOfLWComponents; -addHW = (c).numOfHWComponents; -}if (c.isLightweight ()) { -addLW++; -} else { -addHW++; -}for (var cont = this; cont != null; cont = cont.getContainer ()) { -cont.numOfLWComponents += addLW; -cont.numOfHWComponents += addHW; -} -}, "java.awt.Component"); -Clazz_defineMethod (c$, "decreaseComponentCount", -function (c) { -if (!c.isDisplayable ()) { -throw new IllegalStateException ("Peer does not exist while invoking the decreaseComponentCount() method"); -}var subHW = 0; -var subLW = 0; -if (Clazz_instanceOf (c, java.awt.Container)) { -subLW = (c).numOfLWComponents; -subHW = (c).numOfHWComponents; -}if (c.isLightweight ()) { -subLW++; -} else { -subHW++; -}for (var cont = this; cont != null; cont = cont.getContainer ()) { -cont.numOfLWComponents -= subLW; -cont.numOfHWComponents -= subHW; -} -}, "java.awt.Component"); -Clazz_declareInterface (java.awt.Container, "EventTargetFilter"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.Container, "MouseEventTargetFilter", null, java.awt.Container.EventTargetFilter); -Clazz_makeConstructor (c$, - function () { -}); -Clazz_overrideMethod (c$, "accept", -function (a) { -return (a.eventMask & 32) != 0 || (a.eventMask & 16) != 0 || (a.eventMask & 131072) != 0 || a.mouseListener != null || a.mouseMotionListener != null || a.mouseWheelListener != null; -}, "java.awt.Component"); -c$.FILTER = c$.prototype.FILTER = new java.awt.Container.MouseEventTargetFilter (); -c$ = Clazz_p0p (); -c$.EMPTY_ARRAY = c$.prototype.EMPTY_ARRAY = new Array (0); -Clazz_defineStatics (c$, -"INCLUDE_SELF", true, -"SEARCH_HEAVYWEIGHTS", true); -c$ = Clazz_decorateAsClass (function () { -this.nativeContainer = null; -this.mouseEventTarget = null; -this.targetLastEntered = null; -this.isMouseInNativeContainer = false; -this.eventMask = 0; -Clazz_instantialize (this, arguments); -}, java.awt, "LightweightDispatcher", null, java.awt.event.AWTEventListener); -Clazz_makeConstructor (c$, -function (nativeContainer) { -this.nativeContainer = nativeContainer; -this.mouseEventTarget = null; -this.eventMask = 0; -}, "java.awt.Container"); -Clazz_defineMethod (c$, "dispose", -function () { -this.stopListeningForOtherDrags (); -this.mouseEventTarget = null; -}); -Clazz_defineMethod (c$, "enableEvents", -function (events) { -this.eventMask |= events; -}, "~N"); -Clazz_defineMethod (c$, "dispatchEvent", -function (e) { -var ret = false; -if (Clazz_instanceOf (e, java.awt.event.MouseEvent) && (this.eventMask & 131120) != 0) { -var me = e; -ret = this.processMouseEvent (me); -}return ret; -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "isMouseGrab", - function (e) { -var modifiers = e.getModifiersEx (); -if (e.getID () == 501 || e.getID () == 502) { -switch (e.getButton ()) { -case 1: -modifiers ^= 1024; -break; -case 2: -modifiers ^= 2048; -break; -case 3: -modifiers ^= 4096; -break; -} -}return ((modifiers & (7168)) != 0); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "processMouseEvent", - function (e) { -var id = e.getID (); -var mouseOver = this.nativeContainer.getMouseEventTarget (e.getX (), e.getY (), true); -this.trackMouseEnterExit (mouseOver, e); -if (!this.isMouseGrab (e) && id != 500) { -this.mouseEventTarget = (mouseOver !== this.nativeContainer) ? mouseOver : null; -}if (this.mouseEventTarget != null) { -switch (id) { -case 504: -case 505: -break; -case 501: -this.retargetMouseEvent (this.mouseEventTarget, id, e); -break; -case 502: -this.retargetMouseEvent (this.mouseEventTarget, id, e); -break; -case 500: -if (mouseOver === this.mouseEventTarget) { -this.retargetMouseEvent (mouseOver, id, e); -}break; -case 503: -this.retargetMouseEvent (this.mouseEventTarget, id, e); -break; -case 506: -if (this.isMouseGrab (e)) { -this.retargetMouseEvent (this.mouseEventTarget, id, e); -}break; -case 507: -this.retargetMouseEvent (mouseOver, id, e); -break; -} -e.consume (); -}return e.isConsumed (); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "trackMouseEnterExit", - function (targetOver, e) { -var targetEnter = null; -var id = e.getID (); -if (id != 505 && id != 506 && id != 1500 && this.isMouseInNativeContainer == false) { -this.isMouseInNativeContainer = true; -this.startListeningForOtherDrags (); -} else if (id == 505) { -this.isMouseInNativeContainer = false; -this.stopListeningForOtherDrags (); -}if (this.isMouseInNativeContainer) { -targetEnter = targetOver; -}if (this.targetLastEntered === targetEnter) { -return; -}if (this.targetLastEntered != null) { -this.retargetMouseEvent (this.targetLastEntered, 505, e); -}if (id == 505) { -e.consume (); -}if (targetEnter != null) { -this.retargetMouseEvent (targetEnter, 504, e); -}if (id == 504) { -e.consume (); -}this.targetLastEntered = targetEnter; -}, "java.awt.Component,java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "startListeningForOtherDrags", - function () { -}); -Clazz_defineMethod (c$, "stopListeningForOtherDrags", - function () { -}); -Clazz_overrideMethod (c$, "eventDispatched", -function (e) { -var isForeignDrag = (Clazz_instanceOf (e, java.awt.event.MouseEvent)) && (e.id == 506) && (e.getSource () !== this.nativeContainer); -if (!isForeignDrag) { -return; -}var srcEvent = e; -var me; -{ -var srcComponent = srcEvent.getComponent (); -if (!srcComponent.isShowing ()) { -return; -}var c = this.nativeContainer; -while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) { -c = c.getParent_NoClientCode (); -} -if ((c == null) || (c).isModalBlocked ()) { -return; -}me = new java.awt.event.MouseEvent (this.nativeContainer, 1500, srcEvent.getWhen (), srcEvent.getModifiersEx () | srcEvent.getModifiers (), srcEvent.getX (), srcEvent.getY (), srcEvent.getXOnScreen (), srcEvent.getYOnScreen (), srcEvent.getClickCount (), srcEvent.isPopupTrigger (), srcEvent.getButton ()); -(srcEvent).copyPrivateDataInto (me); -}var targetOver = this.nativeContainer.getMouseEventTarget (me.getX (), me.getY (), true); -this.trackMouseEnterExit (targetOver, me); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "retargetMouseEvent", -function (target, id, e) { -if (target == null) { -return; -}var x = e.getX (); -var y = e.getY (); -var component; -for (component = target; component != null && component !== this.nativeContainer; component = component.getParent ()) { -x -= component.x; -y -= component.y; -} -var retargeted; -if (component != null) { -if (id == 507) { -retargeted = new java.awt.event.MouseWheelEvent (target, id, e.getWhen (), e.getModifiersEx () | e.getModifiers (), x, y, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), (e).getScrollType (), (e).getScrollAmount (), (e).getWheelRotation ()); -} else { -retargeted = new java.awt.event.MouseEvent (target, id, e.getWhen (), e.getModifiersEx () | e.getModifiers (), x, y, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), e.getButton ()); -}(e).copyPrivateDataInto (retargeted); -if (target === this.nativeContainer) { -(target).dispatchEventToSelf (retargeted); -} else { -if (this.nativeContainer.modalComp != null) { -if ((this.nativeContainer.modalComp).isAncestorOf (target)) { -target.dispatchEvent (retargeted); -} else { -e.consume (); -}} else { -target.dispatchEvent (retargeted); -}}}}, "java.awt.Component,~N,java.awt.event.MouseEvent"); -Clazz_defineStatics (c$, -"LWD_MOUSE_DRAGGED_OVER", 1500, -"MOUSE_MASK", 131120); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.lang.Enum", "java.awt.image.ImageObserver", "java.util.HashMap", "java.awt.ComponentOrientation"], "java.awt.Component", ["java.lang.Boolean", "$.Character", "$.Double", "$.Float", "$.IllegalArgumentException", "$.Long", "$.NullPointerException", "$.Short", "$.Thread", "java.awt.AWTEventMulticaster", "$.Cursor", "$.Dimension", "$.EventQueue", "$.IllegalComponentStateException", "$.Point", "$.Rectangle", "$.Toolkit", "java.awt.event.ComponentEvent", "$.ComponentListener", "$.FocusEvent", "$.FocusListener", "$.HierarchyBoundsListener", "$.HierarchyEvent", "$.HierarchyListener", "$.InputEvent", "$.InputMethodEvent", "$.InputMethodListener", "$.KeyEvent", "$.KeyListener", "$.MouseEvent", "$.MouseListener", "$.MouseMotionListener", "$.MouseWheelEvent", "$.MouseWheelListener", "$.PaintEvent", "java.awt.peer.LightweightPeer", "java.beans.PropertyChangeListener", "$.PropertyChangeSupport", "jssun.awt.AppContext", "$.SunToolkit", "jssun.font.FontDesignMetrics", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.threadGroup = null; -this.myThread = null; -this.peer = null; -this.parent = null; -this.appContext = null; -this.x = 0; -this.y = 0; -this.width = 0; -this.height = 0; -this.foreground = null; -this.background = null; -this.font = null; -this.peerFont = null; -this.cursor = null; -this.locale = null; -this.visible = true; -this.enabled = true; -this.valid = false; -this.popups = null; -this.name = null; -this.nameExplicitlySet = false; -this.focusable = true; -this.$isFocusTraversableOverridden = 0; -this.focusTraversalKeysEnabled = false; -this.minSize = null; -this.minSizeSet = false; -this.prefSize = null; -this.prefSizeSet = false; -this.maxSize = null; -this.maxSizeSet = false; -this.componentOrientation = null; -this.newEventsOnly = false; -this.componentListener = null; -this.focusListener = null; -this.hierarchyListener = null; -this.hierarchyBoundsListener = null; -this.keyListener = null; -this.mouseListener = null; -this.mouseMotionListener = null; -this.mouseWheelListener = null; -this.inputMethodListener = null; -this.windowClosingException = null; -this.eventMask = 4096; -this.changeSupport = null; -this.changeSupportLock = null; -this.isPacked = false; -this.boundsOp = 3; -this.isAddNotifyComplete = false; -this.backgroundEraseDisabled = false; -this.htmlName = null; -this.num = 0; -this.graphicsConfig = null; -this.eventCache = null; -this.coalescingEnabled = false; -this.autoFocusTransferOnDisposal = true; -Clazz_instantialize (this, arguments); -}, java.awt, "Component", null, java.awt.image.ImageObserver); -Clazz_prepareFields (c$, function () { -this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN; -this.changeSupportLock = new Clazz._O (); -this.coalescingEnabled = this.checkCoalescing (); -}); -Clazz_defineMethod (c$, "getAppContext", -function () { -return this.appContext; -}); -Clazz_defineMethod (c$, "getChangeSupportLock", - function () { -return this.changeSupportLock; -}); -Clazz_defineMethod (c$, "getBoundsOp", -function () { -return this.boundsOp; -}); -Clazz_defineMethod (c$, "setBoundsOp", -function (op) { -if (op == 5) { -this.boundsOp = 3; -} else if (this.boundsOp == 3) { -this.boundsOp = op; -}}, "~N"); -Clazz_makeConstructor (c$, -function () { -this.setAppContext (); -}); -Clazz_defineMethod (c$, "setAppContext", -function () { -this.appContext = jssun.awt.AppContext.getAppContext (); -this.num = ++java.awt.Component.incr; -}); -Clazz_defineMethod (c$, "getHTMLName", -function (uid) { -return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName); -}, "~S"); -Clazz_defineMethod (c$, "constructComponentName", -function () { -return null; -}); -Clazz_defineMethod (c$, "getName", -function () { -if (this.name == null && !this.nameExplicitlySet) { -{ -if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName (); -}}return this.name; -}); -Clazz_defineMethod (c$, "setName", -function (name) { -var oldName; -{ -oldName = this.name; -this.name = name; -this.nameExplicitlySet = true; -}this.firePropertyChangeObject ("name", oldName, name); -}, "~S"); -Clazz_defineMethod (c$, "getParent", -function () { -return this.getParent_NoClientCode (); -}); -Clazz_defineMethod (c$, "getParent_NoClientCode", -function () { -return this.parent; -}); -Clazz_defineMethod (c$, "getContainer", -function () { -return this.getParent (); -}); -Clazz_defineMethod (c$, "getPeer", -function () { -return this.peer; -}); -Clazz_defineMethod (c$, "getGraphicsConfiguration", -function () { -return swingjs.JSToolkit.getGraphicsConfiguration (); -}); -Clazz_defineMethod (c$, "resetGC", -function () { -}); -Clazz_defineMethod (c$, "getToolkit", -function () { -return this.getToolkitImpl (); -}); -Clazz_defineMethod (c$, "getToolkitImpl", -function () { -var peer = this.peer; -if ((peer != null) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) { -return peer.getToolkit (); -}var parent = this.parent; -if (parent != null) { -return parent.getToolkitImpl (); -}return java.awt.Toolkit.getDefaultToolkit (); -}); -Clazz_defineMethod (c$, "isValid", -function () { -return this.valid; -}); -Clazz_defineMethod (c$, "isDisplayable", -function () { -return true; -}); -Clazz_defineMethod (c$, "isVisible", -function () { -return this.isVisible_NoClientCode (); -}); -Clazz_defineMethod (c$, "isVisible_NoClientCode", -function () { -return this.visible; -}); -Clazz_defineMethod (c$, "isRecursivelyVisible", -function () { -return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ()); -}); -Clazz_defineMethod (c$, "pointRelativeToComponent", -function (absolute) { -var compCoords = this.getLocationOnScreen (); -return new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "getMousePosition", -function () { -return null; -}); -Clazz_defineMethod (c$, "isSameOrAncestorOf", -function (comp, allowChildren) { -return comp === this; -}, "java.awt.Component,~B"); -Clazz_defineMethod (c$, "isShowing", -function () { -if (this.visible) { -var parent = this.parent; -return (parent == null) || parent.isShowing (); -}return false; -}); -Clazz_defineMethod (c$, "isEnabled", -function () { -return this.isEnabledImpl (); -}); -Clazz_defineMethod (c$, "isEnabledImpl", -function () { -return this.enabled; -}); -Clazz_defineMethod (c$, "setEnabled", -function (b) { -this.enable (b); -}, "~B"); -Clazz_defineMethod (c$, "enable", -function () { -if (!this.enabled) { -this.enabled = true; -var peer = this.peer; -if (peer != null) { -peer.setEnabled (true); -if (this.visible) { -this.updateCursorImmediately (); -}}}}); -Clazz_defineMethod (c$, "enable", -function (b) { -if (b) { -this.enable (); -} else { -this.disable (); -}}, "~B"); -Clazz_defineMethod (c$, "disable", -function () { -if (this.enabled) { -this.enabled = false; -var peer = this.peer; -if (peer != null) { -peer.setEnabled (false); -if (this.visible) { -this.updateCursorImmediately (); -}}}}); -Clazz_defineMethod (c$, "isDoubleBuffered", -function () { -return false; -}); -Clazz_defineMethod (c$, "setVisible", -function (b) { -this.show (b); -}, "~B"); -Clazz_defineMethod (c$, "show", -function () { -if (!this.visible) { -this.visible = true; -var peer = this.peer; -if (peer != null) { -peer.setVisible (true); -this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768)); -if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) { -this.repaint (); -}this.updateCursorImmediately (); -}if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) { -var e = new java.awt.event.ComponentEvent (this, 102); -java.awt.Toolkit.getEventQueue ().postEvent (e); -}}var parent = this.parent; -if (parent != null) { -parent.invalidate (); -}}); -Clazz_defineMethod (c$, "containsFocus", -function () { -return this.isFocusOwner (); -}); -Clazz_defineMethod (c$, "clearCurrentFocusCycleRootOnHide", -function () { -}); -Clazz_defineMethod (c$, "hide", -function () { -this.isPacked = false; -if (this.visible) { -this.clearCurrentFocusCycleRootOnHide (); -this.visible = false; -this.mixOnHiding (this.isLightweight ()); -var peer = this.peer; -if (peer != null) { -peer.setVisible (false); -this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768)); -if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) { -this.repaint (); -}this.updateCursorImmediately (); -}if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) { -var e = new java.awt.event.ComponentEvent (this, 103); -java.awt.Toolkit.getEventQueue ().postEvent (e); -}}var parent = this.parent; -if (parent != null) { -parent.invalidate (); -}}); -Clazz_defineMethod (c$, "getForeground", -function () { -var foreground = this.foreground; -if (foreground != null) { -return foreground; -}var parent = this.parent; -return (parent != null) ? parent.getForeground () : null; -}); -Clazz_defineMethod (c$, "setForeground", -function (c) { -var oldColor = this.foreground; -var peer = this.peer; -this.foreground = c; -if (peer != null) { -c = this.getForeground (); -if (c != null) { -peer.setForeground (c); -}}this.firePropertyChangeObject ("foreground", oldColor, c); -}, "java.awt.Color"); -Clazz_defineMethod (c$, "isForegroundSet", -function () { -return (this.foreground != null); -}); -Clazz_defineMethod (c$, "getBackground", -function () { -var background = this.background; -if (background != null) { -return background; -}var parent = this.parent; -return (parent != null) ? parent.getBackground () : null; -}); -Clazz_defineMethod (c$, "setBackground", -function (c) { -var oldColor = this.background; -var peer = this.peer; -this.background = c; -if (peer != null) { -c = this.getBackground (); -if (c != null) { -peer.setBackground (c); -}}this.firePropertyChangeObject ("background", oldColor, c); -}, "java.awt.Color"); -Clazz_defineMethod (c$, "isBackgroundSet", -function () { -return (this.background != null); -}); -Clazz_defineMethod (c$, "getFont", -function () { -return this.getFont_NoClientCode (); -}); -Clazz_defineMethod (c$, "getFont_NoClientCode", -function () { -var font = this.font; -if (font != null) { -return font; -}var parent = this.parent; -return (parent != null) ? parent.getFont_NoClientCode () : null; -}); -Clazz_defineMethod (c$, "setFont", -function (f) { -this.setFontComp (f); -}, "java.awt.Font"); -Clazz_defineMethod (c$, "setFontComp", -function (f) { -var oldFont; -var newFont; -oldFont = this.font; -newFont = this.font = f; -{ -{ -}var peer = this.peer; -if (peer != null) { -f = this.getFont (); -if (f != null) { -peer.setFont (f); -this.peerFont = f; -}}}this.firePropertyChangeObject ("font", oldFont, newFont); -if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) { -this.invalidateIfValid (); -}}, "java.awt.Font"); -Clazz_defineMethod (c$, "isFontSet", -function () { -return (this.font != null); -}); -Clazz_defineMethod (c$, "getLocale", -function () { -var locale = this.locale; -if (locale != null) { -return locale; -}var parent = this.parent; -if (parent == null) { -throw new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale"); -} else { -return parent.getLocale (); -}}); -Clazz_defineMethod (c$, "setLocale", -function (l) { -var oldValue = this.locale; -this.locale = l; -this.firePropertyChangeObject ("locale", oldValue, l); -this.invalidateIfValid (); -}, "java.util.Locale"); -Clazz_defineMethod (c$, "getLocation", -function () { -return this.location (); -}); -Clazz_defineMethod (c$, "getLocationOnScreen", -function () { -return this.getLocationOnScreen_NoTreeLock (); -}); -Clazz_defineMethod (c$, "getLocationOnScreen_NoTreeLock", -function () { -if (this.isShowing ()) { -if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { -var host = this.getNativeContainer (); -var pt = host.peer.getLocationOnScreen (); -for (var c = this; c !== host; c = c.getParent ()) { -pt.x += c.x; -pt.y += c.y; -} -return pt; -} else { -var pt = this.peer.getLocationOnScreen (); -return pt; -}} else { -throw new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location"); -}}); -Clazz_defineMethod (c$, "location", -function () { -return this.location_NoClientCode (); -}); -Clazz_defineMethod (c$, "location_NoClientCode", - function () { -return new java.awt.Point (this.x, this.y); -}); -Clazz_defineMethod (c$, "setLocation", -function (x, y) { -this.setBoundsOp (1); -this.setBounds (x, y, this.width, this.height); -}, "~N,~N"); -Clazz_defineMethod (c$, "setLocation", -function (p) { -this.setLocation (p.x, p.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "getSize", -function () { -return this.size (); -}); -Clazz_defineMethod (c$, "size", -function () { -return new java.awt.Dimension (this.width, this.height); -}); -Clazz_defineMethod (c$, "setSize", -function (width, height) { -{ -if (arguments.length == 1) { -var d = arguments[0]; -width = d.width; -height = d.height; -} -}this.resize (width, height); -}, "~N,~N"); -Clazz_defineMethod (c$, "resize", -function (width, height) { -this.setBoundsOp (2); -this.setBounds (this.x, this.y, width, height); -}, "~N,~N"); -Clazz_defineMethod (c$, "setBounds", -function (x, y, width, height) { -this.reshape (x, y, width, height); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setBounds", -function (r) { -this.setBounds (r.x, r.y, r.width, r.height); -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "reshape", -function (x, y, width, height) { -try { -this.setBoundsOp (3); -var resized = (this.width != width) || (this.height != height); -var moved = (this.x != x) || (this.y != y); -if (!resized && !moved) { -return; -}var oldX = this.x; -var oldY = this.y; -var oldWidth = this.width; -var oldHeight = this.height; -this.x = x; -this.y = y; -this.width = width; -this.height = height; -if (resized) { -this.isPacked = false; -System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ()); -}var needNotify = true; -this.mixOnReshaping (); -if (this.peer != null) { -this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ()); -resized = (oldWidth != this.width) || (oldHeight != this.height); -moved = (oldX != this.x) || (oldY != this.y); -if (Clazz_instanceOf (this, java.awt.Window)) { -needNotify = false; -}if (resized) { -this.invalidate (); -}if (this.parent != null) { -this.parent.invalidateIfValid (); -}}if (needNotify) { -this.notifyNewBounds (resized, moved); -}this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight); -} finally { -this.setBoundsOp (5); -} -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "repaintParentIfNeeded", - function (oldX, oldY, oldWidth, oldHeight) { -if (this.parent != null && Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) { -this.parent.repaint (oldX, oldY, oldWidth, oldHeight); -this.repaint (); -}}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "reshapeNativePeer", - function (x, y, width, height, op) { -var nativeX = x; -var nativeY = y; -for (var c = this.parent; (c != null) && (Clazz_instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) { -nativeX += c.x; -nativeY += c.y; -} -this.peer.setBounds (nativeX, nativeY, width, height, op); -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "notifyNewBounds", - function (resized, moved) { -if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) { -if (resized) { -var e = new java.awt.event.ComponentEvent (this, 101); -java.awt.Toolkit.getEventQueue ().postEvent (e); -}if (moved) { -var e = new java.awt.event.ComponentEvent (this, 100); -java.awt.Toolkit.getEventQueue ().postEvent (e); -}} else { -if (Clazz_instanceOf (this, java.awt.Container) && (this).countComponents () > 0) { -var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536); -if (resized) { -(this).createChildHierarchyEvents (1402, 0, enabledOnToolkit); -}if (moved) { -(this).createChildHierarchyEvents (1401, 0, enabledOnToolkit); -}}}}, "~B,~B"); -Clazz_defineMethod (c$, "getX", -function () { -return this.x; -}); -Clazz_defineMethod (c$, "getY", -function () { -return this.y; -}); -Clazz_defineMethod (c$, "getWidth", -function () { -return this.width; -}); -Clazz_defineMethod (c$, "getHeight", -function () { -return this.height; -}); -Clazz_defineMethod (c$, "getBounds", -function (rv) { -if (rv == null) return new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ()); -rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ()); -return rv; -}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "getSize", -function (rv) { -if (rv == null) { -return new java.awt.Dimension (this.getWidth (), this.getHeight ()); -} else { -rv.setSize (this.getWidth (), this.getHeight ()); -return rv; -}}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "getLocation", -function (rv) { -if (rv == null) { -return new java.awt.Point (this.getX (), this.getY ()); -} else { -rv.setLocation (this.getX (), this.getY ()); -return rv; -}}, "java.awt.Point"); -Clazz_defineMethod (c$, "isOpaque", -function () { -return true; -}); -Clazz_defineMethod (c$, "isLightweight", -function () { -return false; -}); -Clazz_defineMethod (c$, "setPreferredSize", -function (preferredSize) { -this.setPrefSizeComp (preferredSize); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "setPrefSizeComp", -function (preferredSize) { -var old = (this.prefSizeSet ? this.prefSize : null); -this.prefSize = preferredSize; -this.prefSizeSet = (preferredSize != null); -this.firePropertyChangeObject ("preferredSize", old, preferredSize); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "isPreferredSizeSet", -function () { -return this.prefSizeSet; -}); -Clazz_defineMethod (c$, "getPreferredSize", -function () { -return this.preferredSize (); -}); -Clazz_defineMethod (c$, "preferredSize", -function () { -return this.prefSizeComp (); -}); -Clazz_defineMethod (c$, "prefSizeComp", -function () { -var dim = this.prefSize; -if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) { -this.prefSize = this.getMinimumSize (); -dim = this.prefSize; -}return new java.awt.Dimension (dim); -}); -Clazz_defineMethod (c$, "setMinimumSize", -function (minimumSize) { -var old; -if (this.minSizeSet) { -old = this.minSize; -} else { -old = null; -}this.minSize = minimumSize; -this.minSizeSet = (minimumSize != null); -this.firePropertyChangeObject ("minimumSize", old, minimumSize); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "isMinimumSizeSet", -function () { -return this.minSizeSet; -}); -Clazz_defineMethod (c$, "getMinimumSize", -function () { -return this.minimumSize (); -}); -Clazz_defineMethod (c$, "minimumSize", -function () { -var dim = this.minSize; -if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) { -this.minSize = this.getSize (); -dim = this.minSize; -}return new java.awt.Dimension (dim); -}); -Clazz_defineMethod (c$, "setMaximumSize", -function (maximumSize) { -var old; -if (this.maxSizeSet) { -old = this.maxSize; -} else { -old = null; -}this.maxSize = maximumSize; -this.maxSizeSet = (maximumSize != null); -this.firePropertyChangeObject ("maximumSize", old, maximumSize); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "isMaximumSizeSet", -function () { -return this.maxSizeSet; -}); -Clazz_defineMethod (c$, "getMaximumSize", -function () { -return this.getMaxSizeComp (); -}); -Clazz_defineMethod (c$, "getMaxSizeComp", -function () { -if (this.isMaximumSizeSet ()) { -return new java.awt.Dimension (this.maxSize); -}return new java.awt.Dimension (32767, 32767); -}); -Clazz_defineMethod (c$, "getAlignmentX", -function () { -return this.getAlignmentXComp (); -}); -Clazz_defineMethod (c$, "getAlignmentXComp", -function () { -return 0.5; -}); -Clazz_defineMethod (c$, "getAlignmentY", -function () { -return this.getAlignmentYComp (); -}); -Clazz_defineMethod (c$, "getAlignmentYComp", -function () { -return 0.5; -}); -Clazz_defineMethod (c$, "getBaseline", -function (width, height) { -if (width < 0 || height < 0) { -throw new IllegalArgumentException ("Width and height must be >= 0"); -}return -1; -}, "~N,~N"); -Clazz_defineMethod (c$, "getBaselineResizeBehavior", -function () { -return java.awt.Component.BaselineResizeBehavior.OTHER; -}); -Clazz_defineMethod (c$, "doLayout", -function () { -this.layout (); -}); -Clazz_defineMethod (c$, "layout", -function () { -}); -Clazz_defineMethod (c$, "validate", -function () { -this.validateComponent (); -}); -Clazz_defineMethod (c$, "validateComponent", -function () { -{ -var peer = this.peer; -var wasValid = this.isValid (); -if (!wasValid && peer != null) { -var newfont = this.getFont (); -var oldfont = this.peerFont; -if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) { -peer.setFont (newfont); -this.peerFont = newfont; -}peer.layout (); -}this.valid = true; -if (!wasValid) { -this.mixOnValidating (); -}}}); -Clazz_defineMethod (c$, "invalidate", -function () { -this.invalidateComp (); -}); -Clazz_defineMethod (c$, "invalidateComp", -function () { -this.valid = false; -if (!this.isPreferredSizeSet ()) { -this.prefSize = null; -}if (!this.isMinimumSizeSet ()) { -this.minSize = null; -}if (!this.isMaximumSizeSet ()) { -this.maxSize = null; -}if (this.parent != null) { -this.parent.invalidateIfValid (); -}}); -Clazz_defineMethod (c$, "invalidateIfValid", -function () { -if (this.isValid ()) { -this.invalidate (); -}}); -Clazz_defineMethod (c$, "getGraphics", -function () { -if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { -if (this.parent == null) return null; -var g = this.parent.getGraphics (); -if (g == null) return null; -g.setFont (this.getFont ()); -return g; -} else { -var peer = this.peer; -return (peer != null) ? peer.getGraphics () : null; -}}); -Clazz_defineMethod (c$, "getTreeLock", -function () { -return this; -}); -Clazz_defineMethod (c$, "getFontMetrics", -function (font) { -return jssun.font.FontDesignMetrics.getMetrics (font); -}, "java.awt.Font"); -Clazz_defineMethod (c$, "setCursor", -function (cursor) { -this.cursor = cursor; -this.updateCursorImmediately (); -}, "java.awt.Cursor"); -Clazz_defineMethod (c$, "updateCursorImmediately", -function () { -}); -Clazz_defineMethod (c$, "getCursor", -function () { -return this.getCursor_NoClientCode (); -}); -Clazz_defineMethod (c$, "getCursor_NoClientCode", -function () { -var cursor = this.cursor; -if (cursor != null) { -return cursor; -}var parent = this.parent; -if (parent != null) { -return parent.getCursor_NoClientCode (); -} else { -return java.awt.Cursor.getPredefinedCursor (0); -}}); -Clazz_defineMethod (c$, "isCursorSet", -function () { -return (this.cursor != null); -}); -Clazz_defineMethod (c$, "paint", -function (g) { -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintAll", -function (g) { -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "lightweightPaint", -function (g) { -this.lwPaintComp (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "lwPaintComp", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintHeavyweightComponents", -function (g) { -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "repaint", -function () { -this.repaintImpl (0, 0, 0, this.width, this.height); -}); -Clazz_defineMethod (c$, "repaint", -function (tm) { -this.repaintImpl (tm, 0, 0, this.width, this.height); -}, "~N"); -Clazz_defineMethod (c$, "repaint", -function (x, y, width, height) { -this.repaintImpl (0, x, y, width, height); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "repaint", -function (tm, x, y, width, height) { -this.repaintImpl (tm, x, y, width, height); -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "repaintImpl", -function (tm, x, y, width, height) { -if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { -if (this.parent != null) { -var px = this.x + ((x < 0) ? 0 : x); -var py = this.y + ((y < 0) ? 0 : y); -var pwidth = (width > this.width) ? this.width : width; -var pheight = (height > this.height) ? this.height : height; -this.parent.repaint (tm, px, py, pwidth, pheight); -}} else { -if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) { -var e = new java.awt.event.PaintEvent (this, 801, new java.awt.Rectangle (x, y, width, height)); -java.awt.Toolkit.getEventQueue ().postEvent (e); -}}}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "print", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "printAll", -function (g) { -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "printHeavyweightComponents", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "imageUpdate", -function (img, infoflags, x, y, w, h) { -return false; -}, "java.awt.Image,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "createImage", -function (producer) { -return this.getToolkit ().createImage (producer); -}, "java.awt.image.ImageProducer"); -Clazz_defineMethod (c$, "createImage", -function (width, height) { -return java.awt.Toolkit.getDefaultToolkit ().createImage (null, width, height); -}, "~N,~N"); -Clazz_defineMethod (c$, "createVolatileImage", -function (width, height) { -return null; -}, "~N,~N"); -Clazz_defineMethod (c$, "createVolatileImage", -function (width, height, caps) { -return this.createVolatileImage (width, height); -}, "~N,~N,java.awt.ImageCapabilities"); -Clazz_defineMethod (c$, "prepareImage", -function (image, observer) { -return this.prepareImage (image, -1, -1, observer); -}, "java.awt.Image,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "prepareImage", -function (image, width, height, observer) { -return false; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "checkImage", -function (image, observer) { -return this.checkImage (image, -1, -1, observer); -}, "java.awt.Image,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "checkImage", -function (image, width, height, observer) { -return 0; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "setIgnoreRepaint", -function (ignoreRepaint) { -}, "~B"); -Clazz_defineMethod (c$, "getIgnoreRepaint", -function () { -return false; -}); -Clazz_defineMethod (c$, "contains", -function (x, y) { -return this.inside (x, y); -}, "~N,~N"); -Clazz_defineMethod (c$, "inside", -function (x, y) { -return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height); -}, "~N,~N"); -Clazz_defineMethod (c$, "getComponentAt", -function (x, y) { -return this.locate (x, y); -}, "~N,~N"); -Clazz_defineMethod (c$, "locate", -function (x, y) { -return this.contains (x, y) ? this : null; -}, "~N,~N"); -Clazz_defineMethod (c$, "getComponentAt", -function (p) { -return this.getComponentAt (p.x, p.y); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "deliverEvent", -function (e) { -this.postEvent (e); -}, "java.awt.Event"); -Clazz_defineMethod (c$, "dispatchEvent", -function (e) { -this.dispatchEventImpl (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "dispatchEventImpl", -function (e) { -this.dispatchEventImplComp (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "dispatchEventImplComp", -function (e) { -var id = e.getID (); -java.awt.EventQueue.setCurrentEventAndMostRecentTime (e); -if (!e.focusManagerIsDispatching) { -if (e.isPosted) { -e.isPosted = true; -}}if (!e.isConsumed ()) { -if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) { -if (e.isConsumed ()) { -return; -}}}if (this.areInputMethodsEnabled ()) { -if ((Clazz_instanceOf (e, java.awt.event.InputEvent)) || (Clazz_instanceOf (e, java.awt.event.FocusEvent))) { -}} else { -if (id == 1004) { -}}switch (id) { -case 401: -case 402: -var p = ((Clazz_instanceOf (this, java.awt.Container)) ? this : this.parent); -if (p != null) { -p.preProcessKeyEvent (e); -}break; -case 201: -break; -default: -break; -} -if (this.newEventsOnly) { -if (this.eventEnabled (e)) { -this.processEvent (e); -}} else if (id == 507) { -this.autoProcessMouseWheel (e); -} else if (!(Clazz_instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) { -}if (id == 201 && !e.isConsumed ()) { -}if (!(Clazz_instanceOf (e, java.awt.event.KeyEvent))) { -}}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "autoProcessMouseWheel", -function (e) { -}, "java.awt.event.MouseWheelEvent"); -Clazz_defineMethod (c$, "dispatchMouseWheelToAncestor", -function (e) { -var newX; -var newY; -newX = e.getX () + this.getX (); -newY = e.getY () + this.getY (); -var newMWE; -{ -var anc = this.getParent (); -while (anc != null && !anc.eventEnabled (e)) { -newX += anc.getX (); -newY += anc.getY (); -if (!(Clazz_instanceOf (anc, java.awt.Window))) { -anc = anc.getParent (); -} else { -break; -}} -if (anc != null && anc.eventEnabled (e)) { -newMWE = new java.awt.event.MouseWheelEvent (anc, e.getID (), e.getWhen (), e.getModifiers (), newX, newY, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), e.getScrollType (), e.getScrollAmount (), e.getWheelRotation ()); -(e).copyPrivateDataInto (newMWE); -anc.dispatchEventToSelf (newMWE); -}}return true; -}, "java.awt.event.MouseWheelEvent"); -Clazz_defineMethod (c$, "checkWindowClosingException", -function () { -if (this.windowClosingException != null) { -if (Clazz_instanceOf (this, java.awt.Dialog)) { -(this).interruptBlocking (); -} else { -this.windowClosingException.fillInStackTrace (); -this.windowClosingException.printStackTrace (); -this.windowClosingException = null; -}return true; -}return false; -}); -Clazz_defineMethod (c$, "areInputMethodsEnabled", -function () { -return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null); -}); -Clazz_defineMethod (c$, "eventEnabled", -function (e) { -return this.eventTypeEnabled (e.id); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "eventTypeEnabled", -function (type) { -switch (type) { -case 100: -case 101: -case 102: -case 103: -if ((this.eventMask & 1) != 0 || this.componentListener != null) { -return true; -}break; -case 1004: -case 1005: -if ((this.eventMask & 4) != 0 || this.focusListener != null) { -return true; -}break; -case 401: -case 402: -case 400: -if ((this.eventMask & 8) != 0 || this.keyListener != null) { -return true; -}break; -case 501: -case 502: -case 504: -case 505: -case 500: -if ((this.eventMask & 16) != 0 || this.mouseListener != null) { -return true; -}break; -case 503: -case 506: -if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) { -return true; -}break; -case 507: -if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) { -return true; -}break; -case 1100: -case 1101: -if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) { -return true; -}break; -case 1400: -if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) { -return true; -}break; -case 1401: -case 1402: -if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) { -return true; -}break; -case 1001: -if ((this.eventMask & 128) != 0) { -return true; -}break; -case 900: -if ((this.eventMask & 1024) != 0) { -return true; -}break; -case 701: -if ((this.eventMask & 512) != 0) { -return true; -}break; -case 601: -if ((this.eventMask & 256) != 0) { -return true; -}break; -default: -break; -} -if (type > 1999) { -return true; -}return false; -}, "~N"); -Clazz_defineMethod (c$, "postEvent", -function (e) { -if (this.handleEvent (e)) { -e.consume (); -return true; -}var parent = this.parent; -var eventx = e.x; -var eventy = e.y; -if (parent != null) { -e.translate (this.x, this.y); -if (parent.postEvent (e)) { -e.consume (); -return true; -}e.x = eventx; -e.y = eventy; -}return false; -}, "java.awt.Event"); -Clazz_defineMethod (c$, "addComponentListener", -function (l) { -if (l == null) { -return; -}this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l); -this.newEventsOnly = true; -}, "java.awt.event.ComponentListener"); -Clazz_defineMethod (c$, "removeComponentListener", -function (l) { -if (l == null) { -return; -}this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l); -}, "java.awt.event.ComponentListener"); -Clazz_defineMethod (c$, "getComponentListeners", -function () { -return (this.getListeners (java.awt.event.ComponentListener)); -}); -Clazz_defineMethod (c$, "addFocusListener", -function (l) { -if (l == null) { -return; -}this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l); -this.newEventsOnly = true; -}, "java.awt.event.FocusListener"); -Clazz_defineMethod (c$, "removeFocusListener", -function (l) { -if (l == null) { -return; -}this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l); -}, "java.awt.event.FocusListener"); -Clazz_defineMethod (c$, "getFocusListeners", -function () { -return (this.getListeners (java.awt.event.FocusListener)); -}); -Clazz_defineMethod (c$, "addHierarchyListener", -function (l) { -}, "java.awt.event.HierarchyListener"); -Clazz_defineMethod (c$, "removeHierarchyListener", -function (l) { -}, "java.awt.event.HierarchyListener"); -Clazz_defineMethod (c$, "getHierarchyListeners", -function () { -return (this.getListeners (java.awt.event.HierarchyListener)); -}); -Clazz_defineMethod (c$, "addHierarchyBoundsListener", -function (l) { -if (l == null) { -return; -}var notifyAncestors; -{ -notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0); -this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l); -notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null); -this.newEventsOnly = true; -}if (notifyAncestors) { -{ -this.adjustListeningChildrenOnParent (65536, 1); -}}}, "java.awt.event.HierarchyBoundsListener"); -Clazz_defineMethod (c$, "removeHierarchyBoundsListener", -function (l) { -if (l == null) { -return; -}var notifyAncestors; -{ -notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0); -this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l); -notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null); -}if (notifyAncestors) { -{ -this.adjustListeningChildrenOnParent (65536, -1); -}}}, "java.awt.event.HierarchyBoundsListener"); -Clazz_defineMethod (c$, "numListening", -function (mask) { -return this.numListeningMask (mask); -}, "~N"); -Clazz_defineMethod (c$, "numListeningMask", -function (mask) { -if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) { -return 1; -} else { -return 0; -}}, "~N"); -Clazz_defineMethod (c$, "countHierarchyMembers", -function () { -return 1; -}); -Clazz_defineMethod (c$, "createHierarchyEvents", -function (id, changed, changedParent, changeFlags, enabledOnToolkit) { -return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit); -}, "~N,java.awt.Component,java.awt.Container,~N,~B"); -Clazz_defineMethod (c$, "createHierEventsComp", -function (id, changed, changedParent, changeFlags, enabledOnToolkit) { -switch (id) { -case 1400: -if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) { -var e = new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags); -this.dispatchEvent (e); -return 1; -}break; -case 1401: -case 1402: -if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) { -var e = new java.awt.event.HierarchyEvent (this, id, changed, changedParent); -this.dispatchEvent (e); -return 1; -}break; -default: -break; -} -return 0; -}, "~N,java.awt.Component,java.awt.Container,~N,~B"); -Clazz_defineMethod (c$, "getHierarchyBoundsListeners", -function () { -return (this.getListeners (java.awt.event.HierarchyBoundsListener)); -}); -Clazz_defineMethod (c$, "adjustListeningChildrenOnParent", -function (mask, num) { -if (this.parent != null) { -this.parent.adjustListeningChildren (mask, num); -}}, "~N,~N"); -Clazz_defineMethod (c$, "addKeyListener", -function (l) { -if (l == null) { -return; -}this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l); -this.newEventsOnly = true; -}, "java.awt.event.KeyListener"); -Clazz_defineMethod (c$, "removeKeyListener", -function (l) { -if (l == null) { -return; -}this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l); -}, "java.awt.event.KeyListener"); -Clazz_defineMethod (c$, "getKeyListeners", -function () { -return (this.getListeners (java.awt.event.KeyListener)); -}); -Clazz_defineMethod (c$, "addMouseListener", -function (l) { -if (l == null) { -return; -}System.out.println ("C adding mouse listener " + l); -this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l); -this.newEventsOnly = true; -}, "java.awt.event.MouseListener"); -Clazz_defineMethod (c$, "removeMouseListener", -function (l) { -if (l == null) { -return; -}this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l); -}, "java.awt.event.MouseListener"); -Clazz_defineMethod (c$, "getMouseListeners", -function () { -return (this.getListeners (java.awt.event.MouseListener)); -}); -Clazz_defineMethod (c$, "addMouseMotionListener", -function (l) { -if (l == null) { -return; -}this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l); -this.newEventsOnly = true; -}, "java.awt.event.MouseMotionListener"); -Clazz_defineMethod (c$, "removeMouseMotionListener", -function (l) { -if (l == null) { -return; -}this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l); -}, "java.awt.event.MouseMotionListener"); -Clazz_defineMethod (c$, "getMouseMotionListeners", -function () { -return (this.getListeners (java.awt.event.MouseMotionListener)); -}); -Clazz_defineMethod (c$, "addMouseWheelListener", -function (l) { -if (l == null) { -return; -}this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l); -this.newEventsOnly = true; -}, "java.awt.event.MouseWheelListener"); -Clazz_defineMethod (c$, "removeMouseWheelListener", -function (l) { -if (l == null) { -return; -}this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l); -}, "java.awt.event.MouseWheelListener"); -Clazz_defineMethod (c$, "getMouseWheelListeners", -function () { -return (this.getListeners (java.awt.event.MouseWheelListener)); -}); -Clazz_defineMethod (c$, "addInputMethodListener", -function (l) { -if (l == null) { -return; -}this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l); -this.newEventsOnly = true; -}, "java.awt.event.InputMethodListener"); -Clazz_defineMethod (c$, "removeInputMethodListener", -function (l) { -if (l == null) { -return; -}this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l); -}, "java.awt.event.InputMethodListener"); -Clazz_defineMethod (c$, "getInputMethodListeners", -function () { -return (this.getListeners (java.awt.event.InputMethodListener)); -}); -Clazz_defineMethod (c$, "getListeners", -function (listenerType) { -return this.getListenersComp (listenerType); -}, "Class"); -Clazz_defineMethod (c$, "getListenersComp", -function (listenerType) { -var l = null; -if (listenerType === java.awt.event.ComponentListener) { -l = this.componentListener; -} else if (listenerType === java.awt.event.FocusListener) { -l = this.focusListener; -} else if (listenerType === java.awt.event.HierarchyListener) { -l = this.hierarchyListener; -} else if (listenerType === java.awt.event.HierarchyBoundsListener) { -l = this.hierarchyBoundsListener; -} else if (listenerType === java.awt.event.KeyListener) { -l = this.keyListener; -} else if (listenerType === java.awt.event.MouseListener) { -l = this.mouseListener; -} else if (listenerType === java.awt.event.MouseMotionListener) { -l = this.mouseMotionListener; -} else if (listenerType === java.awt.event.MouseWheelListener) { -l = this.mouseWheelListener; -} else if (listenerType === java.awt.event.InputMethodListener) { -l = this.inputMethodListener; -} else if (listenerType === java.beans.PropertyChangeListener) { -return this.getPropertyChangeListeners (); -}return java.awt.AWTEventMulticaster.getListeners (l, listenerType); -}, "Class"); -Clazz_defineMethod (c$, "enableEvents", -function (eventsToEnable) { -var notifyAncestors = 0; -{ -if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) { -notifyAncestors |= 32768; -}if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) { -notifyAncestors |= 65536; -}this.eventMask |= eventsToEnable; -this.newEventsOnly = true; -}if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) { -this.parent.proxyEnableEvents (this.eventMask); -}if (notifyAncestors != 0) { -{ -this.adjustListeningChildrenOnParent (notifyAncestors, 1); -}}}, "~N"); -Clazz_defineMethod (c$, "disableEvents", -function (eventsToDisable) { -var notifyAncestors = 0; -{ -if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) { -notifyAncestors |= 32768; -}if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) { -notifyAncestors |= 65536; -}this.eventMask &= ~eventsToDisable; -}if (notifyAncestors != 0) { -{ -this.adjustListeningChildrenOnParent (notifyAncestors, -1); -}}}, "~N"); -Clazz_defineMethod (c$, "checkCoalescing", - function () { -if (this.getClass ().getClassLoader () == null) { -return false; -}var clazz = this.getClass (); -{ -var value = java.awt.Component.coalesceMap.get (clazz); -if (value != null) { -return value; -}var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent")); -java.awt.Component.coalesceMap.put (clazz, enabled); -return enabled; -}}); -Clazz_defineMethod (c$, "isCoalescingEnabled", -function () { -return this.coalescingEnabled; -}); -Clazz_defineMethod (c$, "coalesceEvents", -function (existingEvent, newEvent) { -return null; -}, "java.awt.AWTEvent,java.awt.AWTEvent"); -Clazz_defineMethod (c$, "processEvent", -function (e) { -this.processEventComp (e); -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "processEventComp", -function (e) { -if (Clazz_instanceOf (e, java.awt.event.FocusEvent)) { -this.processFocusEvent (e); -} else if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) { -switch (e.getID ()) { -case 501: -case 502: -case 500: -case 504: -case 505: -this.processMouseEvent (e); -break; -case 503: -case 506: -this.processMouseMotionEvent (e); -break; -case 507: -this.processMouseWheelEvent (e); -break; -} -} else if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) { -this.processKeyEvent (e); -} else if (Clazz_instanceOf (e, java.awt.event.ComponentEvent)) { -this.processComponentEvent (e); -} else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) { -this.processInputMethodEvent (e); -} else if (Clazz_instanceOf (e, java.awt.event.HierarchyEvent)) { -switch (e.getID ()) { -case 1400: -this.processHierarchyEvent (e); -break; -case 1401: -case 1402: -this.processHierarchyBoundsEvent (e); -break; -} -}}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "processComponentEvent", -function (e) { -var listener = this.componentListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 101: -listener.componentResized (e); -break; -case 100: -listener.componentMoved (e); -break; -case 102: -listener.componentShown (e); -break; -case 103: -listener.componentHidden (e); -break; -} -}}, "java.awt.event.ComponentEvent"); -Clazz_defineMethod (c$, "processFocusEvent", -function (e) { -var listener = this.focusListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 1004: -listener.focusGained (e); -break; -case 1005: -listener.focusLost (e); -break; -} -}}, "java.awt.event.FocusEvent"); -Clazz_defineMethod (c$, "processKeyEvent", -function (e) { -var listener = this.keyListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 400: -listener.keyTyped (e); -break; -case 401: -listener.keyPressed (e); -break; -case 402: -listener.keyReleased (e); -break; -} -}}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "processMouseEvent", -function (e) { -var listener = this.mouseListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 501: -listener.mousePressed (e); -break; -case 502: -listener.mouseReleased (e); -break; -case 500: -listener.mouseClicked (e); -break; -case 505: -listener.mouseExited (e); -break; -case 504: -listener.mouseEntered (e); -break; -} -}}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "processMouseMotionEvent", -function (e) { -var listener = this.mouseMotionListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 503: -listener.mouseMoved (e); -break; -case 506: -listener.mouseDragged (e); -break; -} -}}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "processMouseWheelEvent", -function (e) { -var listener = this.mouseWheelListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 507: -listener.mouseWheelMoved (e); -break; -} -}}, "java.awt.event.MouseWheelEvent"); -Clazz_defineMethod (c$, "postsOldMouseEvents", -function () { -return false; -}); -Clazz_defineMethod (c$, "processInputMethodEvent", -function (e) { -var listener = this.inputMethodListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 1100: -listener.inputMethodTextChanged (e); -break; -case 1101: -listener.caretPositionChanged (e); -break; -} -}}, "java.awt.event.InputMethodEvent"); -Clazz_defineMethod (c$, "processHierarchyEvent", -function (e) { -var listener = this.hierarchyListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 1400: -listener.hierarchyChanged (e); -break; -} -}}, "java.awt.event.HierarchyEvent"); -Clazz_defineMethod (c$, "processHierarchyBoundsEvent", -function (e) { -var listener = this.hierarchyBoundsListener; -if (listener != null) { -var id = e.getID (); -switch (id) { -case 1401: -listener.ancestorMoved (e); -break; -case 1402: -listener.ancestorResized (e); -break; -} -}}, "java.awt.event.HierarchyEvent"); -Clazz_defineMethod (c$, "handleEvent", -function (evt) { -switch (evt.id) { -case 504: -return this.mouseEnter (evt, evt.x, evt.y); -case 505: -return this.mouseExit (evt, evt.x, evt.y); -case 503: -return this.mouseMove (evt, evt.x, evt.y); -case 501: -return this.mouseDown (evt, evt.x, evt.y); -case 506: -return this.mouseDrag (evt, evt.x, evt.y); -case 502: -return this.mouseUp (evt, evt.x, evt.y); -case 401: -case 403: -return this.keyDown (evt, evt.key); -case 402: -case 404: -return this.keyUp (evt, evt.key); -case 1001: -return this.action (evt, evt.arg); -case 1004: -return this.gotFocus (evt, evt.arg); -case 1005: -return this.lostFocus (evt, evt.arg); -} -return false; -}, "java.awt.Event"); -Clazz_defineMethod (c$, "mouseDown", -function (evt, x, y) { -return false; -}, "java.awt.Event,~N,~N"); -Clazz_defineMethod (c$, "mouseDrag", -function (evt, x, y) { -return false; -}, "java.awt.Event,~N,~N"); -Clazz_defineMethod (c$, "mouseUp", -function (evt, x, y) { -return false; -}, "java.awt.Event,~N,~N"); -Clazz_defineMethod (c$, "mouseMove", -function (evt, x, y) { -return false; -}, "java.awt.Event,~N,~N"); -Clazz_defineMethod (c$, "mouseEnter", -function (evt, x, y) { -return false; -}, "java.awt.Event,~N,~N"); -Clazz_defineMethod (c$, "mouseExit", -function (evt, x, y) { -return false; -}, "java.awt.Event,~N,~N"); -Clazz_defineMethod (c$, "keyDown", -function (evt, key) { -return false; -}, "java.awt.Event,~N"); -Clazz_defineMethod (c$, "keyUp", -function (evt, key) { -return false; -}, "java.awt.Event,~N"); -Clazz_defineMethod (c$, "action", -function (evt, what) { -return false; -}, "java.awt.Event,~O"); -Clazz_defineMethod (c$, "addNotify", -function () { -this.addNotifyComp (); -}); -Clazz_defineMethod (c$, "addNotifyComp", -function () { -{ -var peer = this.peer; -if (peer == null || Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) { -if (peer == null) { -this.peer = peer = this.getToolkit ().createComponent (this); -}if (this.parent != null) { -var mask = 0; -if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) { -mask |= 16; -}if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) { -mask |= 32; -}if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) { -mask |= 131072; -}if (this.focusListener != null || (this.eventMask & 4) != 0) { -mask |= 4; -}if (this.keyListener != null || (this.eventMask & 8) != 0) { -mask |= 8; -}if (mask != 0) { -this.parent.proxyEnableEvents (mask); -}}} else { -var parent = this.parent; -if (parent != null && Clazz_instanceOf (parent.peer, java.awt.peer.LightweightPeer)) { -this.relocateComponent (); -}}this.invalidate (); -this.peerFont = this.getFont (); -if (this.getContainer () != null && !this.isAddNotifyComplete) { -this.getContainer ().increaseComponentCount (this); -}if (this.parent != null && this.parent.peer != null) { -var parentContPeer = this.parent.peer; -if (Clazz_instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) { -var hwParent = this.getNativeContainer (); -if (hwParent != null && hwParent.peer != null) { -parentContPeer = hwParent.peer; -}}}if (!this.isAddNotifyComplete) { -this.mixOnShowing (); -}this.isAddNotifyComplete = true; -if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) { -var e = new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0)); -this.dispatchEvent (e); -}}}); -Clazz_defineMethod (c$, "getNativeContainer", -function () { -var p = this.parent; -while (p != null && Clazz_instanceOf (p.peer, java.awt.peer.LightweightPeer)) { -p = p.getParent (); -} -return p; -}); -Clazz_defineMethod (c$, "removeNotify", -function () { -this.removeNotifyComp (); -}); -Clazz_defineMethod (c$, "removeNotifyComp", -function () { -{ -if (this.getContainer () != null && this.isAddNotifyComplete) { -this.getContainer ().decreaseComponentCount (this); -}var p = this.peer; -if (p != null) { -var isLightweight = this.isLightweight (); -this.peer = null; -this.peerFont = null; -java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false); -p.dispose (); -this.mixOnHiding (isLightweight); -this.isAddNotifyComplete = false; -}if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) { -var e = new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0)); -this.dispatchEvent (e); -}}}); -Clazz_defineMethod (c$, "gotFocus", -function (evt, what) { -return false; -}, "java.awt.Event,~O"); -Clazz_defineMethod (c$, "lostFocus", -function (evt, what) { -return false; -}, "java.awt.Event,~O"); -Clazz_defineMethod (c$, "isFocusTraversable", -function () { -if (this.$isFocusTraversableOverridden == 0) { -this.$isFocusTraversableOverridden = 1; -}return this.focusable; -}); -Clazz_defineMethod (c$, "isFocusable", -function () { -return this.isFocusTraversable (); -}); -Clazz_defineMethod (c$, "setFocusable", -function (focusable) { -var oldFocusable; -{ -oldFocusable = this.focusable; -this.focusable = focusable; -}this.$isFocusTraversableOverridden = 2; -this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable)); -}, "~B"); -Clazz_defineMethod (c$, "isFocusTraversableOverridden", -function () { -return (this.$isFocusTraversableOverridden != 1); -}); -Clazz_defineMethod (c$, "getFocusTraversalKeysEnabled", -function () { -return this.focusTraversalKeysEnabled; -}); -Clazz_defineMethod (c$, "requestFocus", -function () { -swingjs.JSToolkit.requestFocus (this); -}); -Clazz_defineMethod (c$, "requestFocus", -function (temporary) { -return swingjs.JSToolkit.requestFocus (this); -}, "~B"); -Clazz_defineMethod (c$, "requestFocusInWindow", -function () { -return swingjs.JSToolkit.requestFocus (this); -}); -Clazz_defineMethod (c$, "requestFocusInWindow", -function (temporary) { -return swingjs.JSToolkit.requestFocus (this); -}, "~B"); -Clazz_defineMethod (c$, "getFocusCycleRootAncestor", -function () { -var rootAncestor = this.parent; -while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) { -rootAncestor = rootAncestor.parent; -} -return rootAncestor; -}); -Clazz_defineMethod (c$, "isFocusCycleRoot", -function (container) { -return this.isFocusCycleRootComp (container); -}, "java.awt.Container"); -Clazz_defineMethod (c$, "isFocusCycleRootComp", -function (container) { -var rootAncestor = this.getFocusCycleRootAncestor (); -return (rootAncestor === container); -}, "java.awt.Container"); -Clazz_defineMethod (c$, "hasFocus", -function () { -return swingjs.JSToolkit.hasFocus (this); -}); -Clazz_defineMethod (c$, "isFocusOwner", -function () { -return this.hasFocus (); -}); -Clazz_defineMethod (c$, "setAutoFocusTransferOnDisposal", -function (value) { -this.autoFocusTransferOnDisposal = value; -}, "~B"); -Clazz_defineMethod (c$, "isAutoFocusTransferOnDisposal", -function () { -return this.autoFocusTransferOnDisposal; -}); -Clazz_defineMethod (c$, "paramString", -function () { -return this.paramStringComp (); -}); -Clazz_defineMethod (c$, "paramStringComp", -function () { -var thisName = this.getName (); -var str = (thisName != null ? thisName : ""); -if (!this.isValid ()) { -str += ",invalid"; -}if (!this.visible) { -str += ",hidden"; -}if (!this.enabled) { -str += ",disabled"; -}str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height; -return str; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[" + this.paramString () + "]"; -}); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (listener) { -this.addPropChangeListenerComp (listener); -}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "addPropChangeListenerComp", -function (listener) { -{ -if (listener == null) { -return; -}if (this.changeSupport == null) { -this.changeSupport = new java.beans.PropertyChangeSupport (this); -}this.changeSupport.addPropertyChangeListener1 (listener); -}}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "removePropertyChangeListener", -function (listener) { -{ -if (listener == null || this.changeSupport == null) { -return; -}this.changeSupport.removePropertyChangeListener (listener); -}}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function () { -{ -if (this.changeSupport == null) { -return new Array (0); -}return this.changeSupport.getPropertyChangeListeners (); -}}); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (propertyName, listener) { -this.addPropChangeListComp (propertyName, listener); -}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "addPropChangeListComp", -function (propertyName, listener) { -{ -if (arguments.length == 1) { -addPropertyChangeListener1(propertyName); return; } -}{ -if (listener == null) { -return; -}if (this.changeSupport == null) { -this.changeSupport = new java.beans.PropertyChangeSupport (this); -}this.changeSupport.addPropertyChangeListener2 (propertyName, listener); -}}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "removePropertyChangeListener", -function (propertyName, listener) { -{ -if (listener == null || this.changeSupport == null) { -return; -}this.changeSupport.removePropertyChangeListener (propertyName, listener); -}}, "~S,java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function (propertyName) { -{ -if (this.changeSupport == null) { -return new Array (0); -}return this.changeSupport.getPropertyChangeListeners (propertyName); -}}, "~S"); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -this.firePropertyChangeObject (propertyName, oldValue, newValue); -}, "~S,~O,~O"); -Clazz_defineMethod (c$, "firePropertyChangeObject", -function (propertyName, oldValue, newValue) { -var changeSupport; -{ -changeSupport = this.changeSupport; -}if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) { -return; -}changeSupport.firePropertyChange (propertyName, oldValue, newValue); -}, "~S,~O,~O"); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -this.firePropertyChangeBool (propertyName, oldValue, newValue); -}, "~S,~B,~B"); -Clazz_defineMethod (c$, "firePropertyChangeBool", -function (propertyName, oldValue, newValue) { -var changeSupport = this.changeSupport; -if (changeSupport == null || oldValue == newValue) { -return; -}changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue)); -}, "~S,~B,~B"); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -this.firePropertyChangeInt (propertyName, oldValue, newValue); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "firePropertyChangeInt", -function (propertyName, oldValue, newValue) { -var changeSupport = this.changeSupport; -if (changeSupport == null || oldValue == newValue) { -return; -}changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue)); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -this.firePropertyChangeChar (propertyName, oldValue, newValue); -}, "~S,~S,~S"); -Clazz_defineMethod (c$, "firePropertyChangeChar", -function (propertyName, oldValue, newValue) { -if (this.changeSupport == null || oldValue == newValue) { -return; -}this.firePropertyChangeObject (propertyName, new Character (oldValue), new Character (newValue)); -}, "~S,~S,~S"); -Clazz_defineMethod (c$, "firePropertyChangeShort", -function (propertyName, oldValue, newValue) { -if (this.changeSupport == null || oldValue == newValue) { -return; -}this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue)); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "firePropertyChangeLong", -function (propertyName, oldValue, newValue) { -if (this.changeSupport == null || oldValue == newValue) { -return; -}this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue)); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "firePropertyChangeFloat", -function (propertyName, oldValue, newValue) { -if (this.changeSupport == null || oldValue == newValue) { -return; -}this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue)); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "firePropertyChangeDouble", -function (propertyName, oldValue, newValue) { -if (this.changeSupport == null || oldValue == newValue) { -return; -}this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue)); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "setComponentOrientation", -function (o) { -var oldValue = this.componentOrientation; -this.componentOrientation = o; -this.firePropertyChangeObject ("componentOrientation", oldValue, o); -this.invalidateIfValid (); -}, "java.awt.ComponentOrientation"); -Clazz_defineMethod (c$, "getComponentOrientation", -function () { -return this.componentOrientation; -}); -Clazz_defineMethod (c$, "applyComponentOrientation", -function (orientation) { -this.applyCompOrientComp (orientation); -}, "java.awt.ComponentOrientation"); -Clazz_defineMethod (c$, "applyCompOrientComp", -function (orientation) { -if (orientation == null) { -throw new NullPointerException (); -}this.setComponentOrientation (orientation); -}, "java.awt.ComponentOrientation"); -Clazz_defineMethod (c$, "canBeFocusOwner", -function () { -if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) { -return true; -}return false; -}); -Clazz_defineMethod (c$, "canBeFocusOwnerRecursively", -function () { -if (!this.canBeFocusOwner ()) { -return false; -}if (this.parent != null) { -return this.parent.canContainFocusOwner (this); -}return true; -}); -Clazz_defineMethod (c$, "relocateComponent", -function () { -}); -Clazz_defineMethod (c$, "getContainingWindow", -function () { -return jssun.awt.SunToolkit.getContainingWindow (this); -}); -c$.isInstanceOf = Clazz_defineMethod (c$, "isInstanceOf", -function (obj, className) { -if (obj == null) return false; -if (className == null) return false; -var cls = obj.getClass (); -while (cls != null) { -if (cls.getName ().equals (className)) { -return true; -}cls = cls.getSuperclass (); -} -return false; -}, "~O,~S"); -Clazz_defineMethod (c$, "areBoundsValid", -function () { -var cont = this.getContainer (); -return cont == null || cont.isValid () || cont.getLayout () == null; -}); -Clazz_defineMethod (c$, "getLocationOnWindow", -function () { -var curLocation = this.getLocation (); -for (var parent = this.getContainer (); parent != null && !(Clazz_instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) { -curLocation.x += parent.getX (); -curLocation.y += parent.getY (); -} -return curLocation; -}); -Clazz_defineMethod (c$, "getSiblingIndexAbove", -function () { -var parent = this.getContainer (); -if (parent == null) { -return -1; -}var nextAbove = parent.getComponentZOrder (this) - 1; -return nextAbove < 0 ? -1 : nextAbove; -}); -Clazz_defineMethod (c$, "getSiblingIndexBelow", -function () { -var parent = this.getContainer (); -if (parent == null) { -return -1; -}var nextBelow = parent.getComponentZOrder (this) + 1; -return nextBelow >= parent.getComponentCount () ? -1 : nextBelow; -}); -Clazz_defineMethod (c$, "mixOnShowing", -function () { -}); -Clazz_defineMethod (c$, "mixOnHiding", -function (isLightweight) { -}, "~B"); -Clazz_defineMethod (c$, "mixOnReshaping", -function () { -swingjs.JSToolkit.taintUI (this); -}); -Clazz_defineMethod (c$, "mixOnZOrderChanging", -function (oldZorder, newZorder) { -}, "~N,~N"); -Clazz_defineMethod (c$, "mixOnValidating", -function () { -}); -c$.doesClassImplement = Clazz_defineMethod (c$, "doesClassImplement", - function (cls, interfaceName) { -if (cls == null) return false; -for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) { -if (c.getName ().equals (interfaceName)) { -return true; -}} -return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName); -}, "Class,~S"); -c$.doesImplement = Clazz_defineMethod (c$, "doesImplement", -function (obj, interfaceName) { -if (obj == null) return false; -if (interfaceName == null) return false; -return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName); -}, "~O,~S"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.Component, "BaselineResizeBehavior", Enum); -Clazz_defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []); -Clazz_defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []); -Clazz_defineEnumConstant (c$, "CENTER_OFFSET", 2, []); -Clazz_defineEnumConstant (c$, "OTHER", 3, []); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.Component, "AWTTreeLock"); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"FOCUS_TRAVERSABLE_UNKNOWN", 0, -"FOCUS_TRAVERSABLE_DEFAULT", 1, -"FOCUS_TRAVERSABLE_SET", 2, -"actionListenerK", "actionL", -"adjustmentListenerK", "adjustmentL", -"componentListenerK", "componentL", -"containerListenerK", "containerL", -"focusListenerK", "focusL", -"itemListenerK", "itemL", -"keyListenerK", "keyL", -"mouseListenerK", "mouseL", -"mouseMotionListenerK", "mouseMotionL", -"mouseWheelListenerK", "mouseWheelL", -"textListenerK", "textL", -"ownedWindowK", "ownedL", -"windowListenerK", "windowL", -"inputMethodListenerK", "inputMethodL", -"hierarchyListenerK", "hierarchyL", -"hierarchyBoundsListenerK", "hierarchyBoundsL", -"windowStateListenerK", "windowStateL", -"windowFocusListenerK", "windowFocusL", -"isInc", false, -"incRate", 0, -"TOP_ALIGNMENT", 0.0, -"CENTER_ALIGNMENT", 0.5, -"BOTTOM_ALIGNMENT", 1.0, -"LEFT_ALIGNMENT", 0.0, -"RIGHT_ALIGNMENT", 1.0, -"incr", 0); -c$.coalesceMap = c$.prototype.coalesceMap = new java.util.HashMap (); -}); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (null, "jssun.awt.SunGraphicsCallback", ["java.awt.Container", "$.Graphics2D", "jssun.awt.ConstrainableGraphics", "$.Graphics2Delegate"], function () { -c$ = Clazz_declareType (jssun.awt, "SunGraphicsCallback"); -Clazz_defineMethod (c$, "constrainGraphics", -function (g, bounds) { -if (Clazz_instanceOf (g, jssun.awt.ConstrainableGraphics)) { -(g).constrain (bounds.x, bounds.y, bounds.width, bounds.height); -} else { -g.translate (bounds.x, bounds.y); -}g.clipRect (0, 0, bounds.width, bounds.height); -}, "java.awt.Graphics,java.awt.Rectangle"); -Clazz_defineMethod (c$, "runOneComponent", -function (comp, bounds, g, clip, weightFlags) { -if (comp == null || !comp.isLightweight () || !comp.isVisible ()) { -return; -}var lightweight = comp.isLightweight (); -if ((lightweight && (weightFlags & 2) == 0) || (!lightweight && (weightFlags & 1) == 0)) { -return; -}if (bounds == null) { -bounds = comp.getBounds (); -}if (clip == null || clip.intersects (bounds)) { -var cg = g.createSwingJS (); -try { -this.constrainGraphics (cg, bounds); -cg.setFont (comp.getFont ()); -cg.setColor (comp.getForeground ()); -if (Clazz_instanceOf (cg, java.awt.Graphics2D)) { -(cg).setBackground (comp.getBackground ()); -} else if (Clazz_instanceOf (cg, jssun.awt.Graphics2Delegate)) { -(cg).setBackground (comp.getBackground ()); -}this.run (comp, cg); -} finally { -cg.dispose (); -} -}}, "java.awt.Component,java.awt.Rectangle,java.awt.Graphics,java.awt.Shape,~N"); -Clazz_defineMethod (c$, "runComponents", -function (comps, g, weightFlags) { -var ncomponents = comps.length; -var clip = g.getClip (); -for (var i = ncomponents - 1; i >= 0; i--) { -this.runOneComponent (comps[i], null, g, clip, weightFlags); -} -}, "~A,java.awt.Graphics,~N"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (jssun.awt.SunGraphicsCallback, "PaintHeavyweightComponentsCallback", jssun.awt.SunGraphicsCallback); -Clazz_makeConstructor (c$, - function () { -Clazz_superConstructor (this, jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback, []); -}); -Clazz_overrideMethod (c$, "run", -function (a, b) { -if (!a.isLightweight ()) { -a.paintAll (b); -} else if (Clazz_instanceOf (a, java.awt.Container)) { -this.runComponents ((a).getComponents (), b, 3); -}}, "java.awt.Component,java.awt.Graphics"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function () { -return jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback.instance; -}); -c$.instance = c$.prototype.instance = new jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback (); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"HEAVYWEIGHTS", 0x1, -"LIGHTWEIGHTS", 0x2, -"TWO_PASSES", 0x4); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.util.HashMap", "java.awt.Rectangle"], "javax.swing.RepaintManager", ["java.lang.StringBuffer", "$.Thread", "java.util.ArrayList", "$.HashSet", "$.IdentityHashMap", "java.applet.Applet", "java.awt.Frame", "$.Toolkit", "$.Window", "java.awt.event.InvocationEvent", "javax.swing.CellRendererPane", "$.JComponent", "$.SwingUtilities", "jssun.awt.AWTAccessor", "$.AppContext", "$.SunToolkit", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.volatileMap = null; -this.hwDirtyComponents = null; -this.dirtyComponents = null; -this.tmpDirtyComponents = null; -this.invalidComponents = null; -this.runnableList = null; -this.paintDepth = 0; -this.painting = false; -this.repaintRoot = null; -this.paintThread = null; -this.processingRunnable = null; -this.myComponent = null; -this.tmp = null; -if (!Clazz_isClassDefined ("javax.swing.RepaintManager.ProcessingRunnable")) { -javax.swing.RepaintManager.$RepaintManager$ProcessingRunnable$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "RepaintManager"); -Clazz_prepareFields (c$, function () { -this.volatileMap = new java.util.HashMap (1); -this.tmp = new java.awt.Rectangle (); -}); -c$.currentManager = Clazz_defineMethod (c$, "currentManager", -function (c) { -var appContext = jssun.awt.AppContext.getAppContext (); -var rm = appContext.get (javax.swing.RepaintManager.repaintManagerKey); -if (rm == null) { -rm = new javax.swing.RepaintManager (); -rm.set (c); -appContext.put (javax.swing.RepaintManager.repaintManagerKey, rm); -}return rm; -}, "java.awt.Component"); -c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", -function (aRepaintManager) { -if (aRepaintManager != null) { -javax.swing.SwingUtilities.appContextPut (javax.swing.RepaintManager.repaintManagerKey, aRepaintManager); -} else { -javax.swing.SwingUtilities.appContextRemove (javax.swing.RepaintManager.repaintManagerKey); -}}, "javax.swing.RepaintManager"); -Clazz_makeConstructor (c$, - function () { -this.processingRunnable = Clazz_innerTypeInstance (javax.swing.RepaintManager.ProcessingRunnable, this, null); -}); -Clazz_defineMethod (c$, "set", - function (c) { -this.myComponent = c; -this.dirtyComponents = new java.util.IdentityHashMap (); -this.tmpDirtyComponents = new java.util.IdentityHashMap (); -this.hwDirtyComponents = new java.util.IdentityHashMap (); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "addInvalidComponent", -function (invalidComponent) { -var validateRoot = null; -for (var c = invalidComponent; c != null; c = c.getParent ()) { -if ((Clazz_instanceOf (c, javax.swing.CellRendererPane))) { -return; -}if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) { -validateRoot = c; -break; -}} -if (validateRoot == null) { -return; -}var root = null; -for (var c = validateRoot; c != null; c = c.getParent ()) { -if (!c.isVisible ()) { -return; -}if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) { -root = c; -break; -}} -if (root == null) { -return; -}if (this.invalidComponents == null) { -this.invalidComponents = new java.util.ArrayList (); -} else { -var n = this.invalidComponents.size (); -for (var i = 0; i < n; i++) { -if (validateRoot === this.invalidComponents.get (i)) { -return; -}} -}this.invalidComponents.add (validateRoot); -this.scheduleProcessingRunnable (root); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "removeInvalidComponent", -function (component) { -if (this.invalidComponents != null) { -var index = this.invalidComponents.indexOf (component); -if (index != -1) { -this.invalidComponents.remove (index); -}}}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "addDirtyRegion0", - function (c, x, y, w, h) { -{ -var g = c.getGraphics(); -if (g == null || g.gc == null)return; -}if ((w <= 0) || (h <= 0) || (c == null)) { -return; -}if ((c.getWidth () <= 0) || (c.getHeight () <= 0)) { -return; -}if (this.extendDirtyRegion (c, x, y, w, h)) { -return; -}var root = null; -for (var p = c; p != null; p = p.getParent ()) { -if (!p.isVisible () || p.getPeer () == null) { -return; -}if ((Clazz_instanceOf (p, java.awt.Window)) || (Clazz_instanceOf (p, java.applet.Applet))) { -if (Clazz_instanceOf (p, java.awt.Frame) && ((p).getExtendedState () & 1) == 1) { -return; -}root = p; -break; -}} -if (root == null) return; -{ -if (this.extendDirtyRegion (c, x, y, w, h)) { -return; -}this.dirtyComponents.put (c, new java.awt.Rectangle (x, y, w, h)); -}this.scheduleProcessingRunnable (c); -}, "java.awt.Container,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "addDirtyRegion", -function (c, x, y, w, h) { -this.addDirtyRegion0 (c, x, y, w, h); -}, "javax.swing.JComponent,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "addDirtyRegion", -function (window, x, y, w, h) { -this.addDirtyRegion0 (window, x, y, w, h); -}, "java.awt.Window,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "addDirtyRegion", -function (applet, x, y, w, h) { -this.addDirtyRegion0 (applet, x, y, w, h); -}, "java.applet.Applet,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "scheduleHeavyWeightPaints", -function () { -var hws; -{ -if (this.hwDirtyComponents.size () == 0) { -return; -}hws = this.hwDirtyComponents; -this.hwDirtyComponents = new java.util.IdentityHashMap (); -}for (var hw, $hw = hws.keySet ().iterator (); $hw.hasNext () && ((hw = $hw.next ()) || true);) { -var dirty = hws.get (hw); -if (Clazz_instanceOf (hw, java.awt.Window)) { -this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height); -} else if (Clazz_instanceOf (hw, java.applet.Applet)) { -this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height); -} else { -this.addDirtyRegion0 (hw, dirty.x, dirty.y, dirty.width, dirty.height); -}} -}); -Clazz_defineMethod (c$, "nativeAddDirtyRegion", -function (appContext, c, x, y, w, h) { -if (w > 0 && h > 0) { -{ -var dirty = this.hwDirtyComponents.get (c); -if (dirty == null) { -this.hwDirtyComponents.put (c, new java.awt.Rectangle (x, y, w, h)); -} else { -this.hwDirtyComponents.put (c, javax.swing.SwingUtilities.computeUnion (x, y, w, h, dirty)); -}}this.scheduleProcessingRunnable (appContext); -}}, "jssun.awt.AppContext,java.awt.Container,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "extendDirtyRegion", - function (c, x, y, w, h) { -var r = this.dirtyComponents.get (c); -if (r != null) { -javax.swing.SwingUtilities.computeUnion (x, y, w, h, r); -return true; -}return false; -}, "java.awt.Component,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getDirtyRegion", -function (aComponent) { -var r = null; -{ -r = this.dirtyComponents.get (aComponent); -}if (r == null) return new java.awt.Rectangle (0, 0, 0, 0); - else return new java.awt.Rectangle (r); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "markCompletelyDirty", -function (aComponent) { -this.addDirtyRegion (aComponent, 0, 0, 2147483647, 2147483647); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "markCompletelyClean", -function (aComponent) { -{ -this.dirtyComponents.remove (aComponent); -}}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "isCompletelyDirty", -function (aComponent) { -var r; -r = this.getDirtyRegion (aComponent); -if (r.width == 2147483647 && r.height == 2147483647) return true; - else return false; -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "validateInvalidComponents", -function () { -var ic; -{ -if (this.invalidComponents == null) { -return; -}ic = this.invalidComponents; -this.invalidComponents = null; -}var n = ic.size (); -for (var i = 0; i < n; i++) { -var c = ic.get (i); -c.validate (); -} -}); -Clazz_defineMethod (c$, "prePaintDirtyRegions", - function () { -var dirtyComponents; -var runnableList; -{ -dirtyComponents = this.dirtyComponents; -runnableList = this.runnableList; -this.runnableList = null; -}if (runnableList != null) { -for (var runnable, $runnable = runnableList.iterator (); $runnable.hasNext () && ((runnable = $runnable.next ()) || true);) { -runnable.run (); -} -}this.paintDirtyRegions (); -if (dirtyComponents.size () > 0) { -this.paintDirtyRegions1 (dirtyComponents); -}}); -Clazz_defineMethod (c$, "updateWindows", - function (dirtyComponents) { -var toolkit = java.awt.Toolkit.getDefaultToolkit (); -if (!(Clazz_instanceOf (toolkit, jssun.awt.SunToolkit) && (toolkit).needUpdateWindow ())) { -return dirtyComponents; -}var windows = new java.util.HashSet (); -var dirtyComps = dirtyComponents.keySet (); -for (var it = dirtyComps.iterator (); it.hasNext (); ) { -var dirty = it.next (); -var window = Clazz_instanceOf (dirty, java.awt.Window) ? dirty : javax.swing.SwingUtilities.getWindowAncestor (dirty); -if (window != null && !jssun.awt.AWTAccessor.getWindowAccessor ().isOpaque (window)) { -it.remove (); -windows.add (window); -}} -for (var window, $window = windows.iterator (); $window.hasNext () && ((window = $window.next ()) || true);) { -jssun.awt.AWTAccessor.getWindowAccessor ().updateWindow (window, null); -} -return dirtyComponents; -}, "java.util.Map"); -Clazz_defineMethod (c$, "paintDirtyRegions", -function () { -{ -var tmp = this.tmpDirtyComponents; -this.tmpDirtyComponents = this.dirtyComponents; -this.dirtyComponents = tmp; -this.dirtyComponents.clear (); -}this.paintDirtyRegions1 (this.tmpDirtyComponents); -}); -Clazz_defineMethod (c$, "paintDirtyRegions1", - function (tmpDirtyComponents) { -if (tmpDirtyComponents.isEmpty ()) { -return; -}this.updateWindows (tmpDirtyComponents); -var roots = new java.util.ArrayList (tmpDirtyComponents.size ()); -for (var dirty, $dirty = tmpDirtyComponents.keySet ().iterator (); $dirty.hasNext () && ((dirty = $dirty.next ()) || true);) { -this.collectDirtyComponents (tmpDirtyComponents, dirty, roots); -} -var count = roots.size (); -this.painting = true; -try { -for (var j = 0; j < count; j++) { -var i = j; -var dirtyComponent = roots.get (j); -var rect = tmpDirtyComponents.get (dirtyComponent); -var localBoundsH = dirtyComponent.getHeight (); -var localBoundsW = dirtyComponent.getWidth (); -javax.swing.SwingUtilities.computeIntersection (0, 0, localBoundsW, localBoundsH, rect); -if (Clazz_instanceOf (dirtyComponent, javax.swing.JComponent)) { -(dirtyComponent).paintImmediately (rect.x, rect.y, rect.width, rect.height); -} else if (dirtyComponent.isShowing ()) { -var g = javax.swing.JComponent.safelyGetGraphics (dirtyComponent, dirtyComponent); -if (g != null) { -try { -dirtyComponent.paint (g); -} finally { -g.dispose (); -} -}}if (this.repaintRoot != null) { -this.adjustRoots (this.repaintRoot, roots, i + 1); -count = roots.size (); -this.repaintRoot.paintImmediately (0, 0, this.repaintRoot.getWidth (), this.repaintRoot.getHeight ()); -this.repaintRoot = null; -}} -} finally { -this.painting = false; -} -tmpDirtyComponents.clear (); -}, "java.util.Map"); -Clazz_defineMethod (c$, "adjustRoots", - function (root, roots, index) { -for (var i = roots.size () - 1; i >= index; i--) { -var c = roots.get (i); -for (; ; ) { -if (c === root || c == null || !(Clazz_instanceOf (c, javax.swing.JComponent))) { -break; -}c = c.getParent (); -} -if (c === root) { -roots.remove (i); -}} -}, "javax.swing.JComponent,java.util.List,~N"); -Clazz_defineMethod (c$, "collectDirtyComponents", -function (dirtyComponents, dirtyComponent, roots) { -var dx; -var dy; -var rootDx; -var rootDy; -var component; -var rootDirtyComponent; -var parent; -component = rootDirtyComponent = dirtyComponent; -var x = dirtyComponent.getX (); -var y = dirtyComponent.getY (); -var w = dirtyComponent.getWidth (); -var h = dirtyComponent.getHeight (); -dx = rootDx = 0; -dy = rootDy = 0; -this.tmp.setBounds (dirtyComponents.get (dirtyComponent)); -javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp); -if (this.tmp.isEmpty ()) { -return; -}for (; ; ) { -if (!(Clazz_instanceOf (component, javax.swing.JComponent))) break; -parent = component.getParent (); -if (parent == null) break; -component = parent; -dx += x; -dy += y; -this.tmp.setLocation (this.tmp.x + x, this.tmp.y + y); -x = component.getX (); -y = component.getY (); -w = component.getWidth (); -h = component.getHeight (); -this.tmp = javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp); -if (this.tmp.isEmpty ()) { -return; -}if (dirtyComponents.get (component) != null) { -rootDirtyComponent = component; -rootDx = dx; -rootDy = dy; -}} -if (dirtyComponent !== rootDirtyComponent) { -var r; -this.tmp.setLocation (this.tmp.x + rootDx - dx, this.tmp.y + rootDy - dy); -r = dirtyComponents.get (rootDirtyComponent); -javax.swing.SwingUtilities.computeUnion (this.tmp.x, this.tmp.y, this.tmp.width, this.tmp.height, r); -}if (!roots.contains (rootDirtyComponent)) roots.add (rootDirtyComponent); -}, "java.util.Map,java.awt.Component,java.util.List"); -Clazz_overrideMethod (c$, "toString", -function () { -var sb = new StringBuffer (); -if (this.dirtyComponents != null) sb.append ("" + this.dirtyComponents); -return sb.toString (); -}); -Clazz_defineMethod (c$, "getOffscreenBuffer", -function (c, proposedWidth, proposedHeight) { -return null; -}, "java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getVolatileOffscreenBuffer", -function (c, proposedWidth, proposedHeight) { -var config = c.getGraphicsConfiguration (); -var maxSize = this.getDoubleBufferMaximumSize (); -var width = proposedWidth < 1 ? 1 : (proposedWidth > maxSize.width ? maxSize.width : proposedWidth); -var height = proposedHeight < 1 ? 1 : (proposedHeight > maxSize.height ? maxSize.height : proposedHeight); -var image = this.volatileMap.get (config); -if (image == null || image.getWidth () < width || image.getHeight () < height) { -if (image != null) { -image.flush (); -}image = config.createCompatibleVolatileImage (width, height); -this.volatileMap.put (config, image); -}return image; -}, "java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "setDoubleBufferMaximumSize", -function (d) { -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "getDoubleBufferMaximumSize", -function () { -return null; -}); -Clazz_defineMethod (c$, "setDoubleBufferingEnabled", -function (aFlag) { -}, "~B"); -Clazz_defineMethod (c$, "resetDoubleBuffer", -function () { -}); -Clazz_defineMethod (c$, "resetVolatileDoubleBuffer", -function (gc) { -var image = this.volatileMap.remove (gc); -if (image != null) { -image.flush (); -}}, "java.awt.GraphicsConfiguration"); -Clazz_defineMethod (c$, "useVolatileDoubleBuffer", -function () { -return javax.swing.RepaintManager.volatileImageBufferEnabled; -}); -Clazz_defineMethod (c$, "isPaintingThread", - function () { -return (Thread.currentThread () === this.paintThread); -}); -Clazz_defineMethod (c$, "paint", -function (paintingComponent, bufferComponent, g, x, y, w, h) { -paintingComponent.paintToOffscreen (g, x, y, w, h, x + w, y + h); -}, "javax.swing.JComponent,javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "beginPaint", -function () { -var multiThreadedPaint = false; -var paintDepth = 0; -var currentThread = Thread.currentThread (); -{ -paintDepth = this.paintDepth; -if (this.paintThread == null || currentThread === this.paintThread) { -this.paintThread = currentThread; -this.paintDepth++; -} else { -multiThreadedPaint = true; -}}}); -Clazz_defineMethod (c$, "endPaint", -function () { -if (this.isPaintingThread ()) { -}}); -Clazz_defineMethod (c$, "doubleBufferingChanged", -function (rootPane) { -}, "javax.swing.JRootPane"); -Clazz_defineMethod (c$, "scheduleProcessingRunnable", - function (c) { -this.scheduleProcessingRunnable (c.getAppContext ()); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "scheduleProcessingRunnable", - function (context) { -if (this.processingRunnable.markPending ()) { -jssun.awt.SunToolkit.getSystemEventQueueImplPP (context).postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), this.processingRunnable)); -}}, "jssun.awt.AppContext"); -c$.$RepaintManager$ProcessingRunnable$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -this.pending = false; -Clazz_instantialize (this, arguments); -}, javax.swing.RepaintManager, "ProcessingRunnable", null, Runnable); -Clazz_defineMethod (c$, "markPending", -function () { -if (!this.pending) { -this.pending = true; -return true; -}return false; -}); -Clazz_overrideMethod (c$, "run", -function () { -{ -this.pending = false; -}this.b$["javax.swing.RepaintManager"].scheduleHeavyWeightPaints (); -this.b$["javax.swing.RepaintManager"].validateInvalidComponents (); -this.b$["javax.swing.RepaintManager"].prePaintDirtyRegions (); -swingjs.JSToolkit.forceRepaint (this.b$["javax.swing.RepaintManager"].myComponent); -}); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"HANDLE_TOP_LEVEL_PAINT", false); -c$.repaintManagerKey = c$.prototype.repaintManagerKey = javax.swing.RepaintManager; -Clazz_defineStatics (c$, -"volatileImageBufferEnabled", true); -{ -javax.swing.RepaintManager.volatileImageBufferEnabled = false; -var headless = false; -if (javax.swing.RepaintManager.volatileImageBufferEnabled && headless) { -javax.swing.RepaintManager.volatileImageBufferEnabled = false; -}javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT = true; -}}); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (["java.awt.Toolkit", "jssun.awt.ComponentFactory", "$.WindowClosingListener", "$.WindowClosingSupport", "java.util.HashMap"], "jssun.awt.SunToolkit", ["java.lang.NullPointerException", "$.Thread", "java.awt.Component", "$.Dimension", "$.EventQueue", "$.Panel", "$.Window", "jssun.awt.AWTAccessor", "$.AWTAutoShutdown", "$.AppContext", "$.PeerEvent", "$.PostEventQueue", "jssun.font.FontDesignMetrics"], function () { -c$ = Clazz_decorateAsClass (function () { -this.windowClosingListener = null; -Clazz_instantialize (this, arguments); -}, jssun.awt, "SunToolkit", java.awt.Toolkit, [jssun.awt.WindowClosingSupport, jssun.awt.WindowClosingListener, jssun.awt.ComponentFactory]); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, jssun.awt.SunToolkit, []); -var eventQueue; -eventQueue = new java.awt.EventQueue (); -var appContext = jssun.awt.AppContext.getAppContext (); -if (appContext != null) { -appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue); -var postEventQueue = new jssun.awt.PostEventQueue (eventQueue); -appContext.put ("PostEventQueue", postEventQueue); -}}); -Clazz_defineMethod (c$, "useBufferPerWindow", -function () { -return false; -}); -c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", -function () { -var threadGroup = Thread.currentThread ().getThreadGroup (); -return jssun.awt.SunToolkit.createNewAppContext (threadGroup); -}); -c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", -function (threadGroup) { -var eventQueue; -var eqName = System.getProperty ("AWT.EventQueueClass", "java.awt.EventQueue"); -try { -eventQueue = Clazz._4Name (eqName).newInstance (); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -System.err.println ("Failed loading " + eqName + ": " + e); -eventQueue = new java.awt.EventQueue (); -} else { -throw e; -} -} -var appContext = new jssun.awt.AppContext (threadGroup); -appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue); -var postEventQueue = new jssun.awt.PostEventQueue (eventQueue); -appContext.put ("PostEventQueue", postEventQueue); -return appContext; -}, "ThreadGroup"); -c$.wakeupEventQueue = Clazz_defineMethod (c$, "wakeupEventQueue", -function (q, isShutdown) { -q.wakeup (isShutdown); -}, "java.awt.EventQueue,~B"); -c$.targetToPeer = Clazz_defineMethod (c$, "targetToPeer", -function (target) { -if (target != null) { -return jssun.awt.AWTAutoShutdown.getInstance ().getPeer (target); -}return null; -}, "~O"); -c$.targetCreatedPeer = Clazz_defineMethod (c$, "targetCreatedPeer", -function (target, peer) { -if (target != null && peer != null) { -jssun.awt.AWTAutoShutdown.getInstance ().registerPeer (target, peer); -}}, "~O,~O"); -c$.targetDisposedPeer = Clazz_defineMethod (c$, "targetDisposedPeer", -function (target, peer) { -if (target != null && peer != null) { -jssun.awt.AWTAutoShutdown.getInstance ().unregisterPeer (target, peer); -}}, "~O,~O"); -c$.setAppContext = Clazz_defineMethod (c$, "setAppContext", - function (target, context) { -if (Clazz_instanceOf (target, java.awt.Component)) { -jssun.awt.AWTAccessor.getComponentAccessor ().setAppContext (target, context); -} else { -return false; -}return true; -}, "~O,jssun.awt.AppContext"); -c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", - function (target) { -if (Clazz_instanceOf (target, java.awt.Component)) { -{ -return target.appContext; -}} else { -return null; -}}, "~O"); -c$.targetToAppContext = Clazz_defineMethod (c$, "targetToAppContext", -function (target) { -if (target == null) { -return null; -}var context = jssun.awt.SunToolkit.getAppContext (target); -if (context == null) { -context = jssun.awt.SunToolkit.appContextMap.get (target); -}return context; -}, "~O"); -c$.setLWRequestStatus = Clazz_defineMethod (c$, "setLWRequestStatus", -function (changed, status) { -jssun.awt.AWTAccessor.getWindowAccessor ().setLWRequestStatus (changed, status); -}, "java.awt.Window,~B"); -c$.checkAndSetPolicy = Clazz_defineMethod (c$, "checkAndSetPolicy", -function (cont, isSwingCont) { -}, "java.awt.Container,~B"); -c$.insertTargetMapping = Clazz_defineMethod (c$, "insertTargetMapping", -function (target, appContext) { -if (!jssun.awt.SunToolkit.setAppContext (target, appContext)) { -jssun.awt.SunToolkit.appContextMap.put (target, appContext); -}}, "~O,jssun.awt.AppContext"); -c$.postEvent = Clazz_defineMethod (c$, "postEvent", -function (appContext, event) { -if (event == null) { -throw new NullPointerException (); -}var postEventQueue = appContext.get ("PostEventQueue"); -if (postEventQueue != null) { -postEventQueue.postEvent (event); -}}, "jssun.awt.AppContext,java.awt.AWTEvent"); -c$.postPriorityEvent = Clazz_defineMethod (c$, "postPriorityEvent", -function (e) { -var pe = new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), ((Clazz_isClassDefined ("jssun.awt.SunToolkit$1") ? 0 : jssun.awt.SunToolkit.$SunToolkit$1$ ()), Clazz_innerTypeInstance (jssun.awt.SunToolkit$1, this, Clazz_cloneFinals ("e", e))), 2); -jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (e.getSource ()), pe); -}, "java.awt.AWTEvent"); -c$.flushPendingEvents = Clazz_defineMethod (c$, "flushPendingEvents", -function () { -var appContext = jssun.awt.AppContext.getAppContext (); -var postEventQueue = appContext.get ("PostEventQueue"); -if (postEventQueue != null) { -postEventQueue.flush (); -}}); -c$.isPostEventQueueEmpty = Clazz_defineMethod (c$, "isPostEventQueueEmpty", -function () { -var appContext = jssun.awt.AppContext.getAppContext (); -var postEventQueue = appContext.get ("PostEventQueue"); -return (postEventQueue == null || postEventQueue.noEvents ()); -}); -c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", -function (target, runnable) { -jssun.awt.SunToolkit.executeOnEventHandlerThread ( new jssun.awt.PeerEvent (target, runnable, 1)); -}, "~O,Runnable"); -c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", -function (target, runnable, when) { -jssun.awt.SunToolkit.executeOnEventHandlerThread (((Clazz_isClassDefined ("jssun.awt.SunToolkit$2") ? 0 : jssun.awt.SunToolkit.$SunToolkit$2$ ()), Clazz_innerTypeInstance (jssun.awt.SunToolkit$2, this, Clazz_cloneFinals ("when", when), target, runnable, 1))); -}, "~O,Runnable,~N"); -c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", -function (peerEvent) { -jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (peerEvent.getSource ()), peerEvent); -}, "jssun.awt.PeerEvent"); -c$.invokeLaterOnAppContext = Clazz_defineMethod (c$, "invokeLaterOnAppContext", -function (appContext, dispatcher) { -jssun.awt.SunToolkit.postEvent (appContext, new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), dispatcher, 1)); -}, "jssun.awt.AppContext,Runnable"); -c$.isDispatchThreadForAppContext = Clazz_defineMethod (c$, "isDispatchThreadForAppContext", -function (target) { -var appContext = jssun.awt.SunToolkit.targetToAppContext (target); -var eq = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY); -var next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq); -while (next != null) { -eq = next; -next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq); -} -return (Thread.currentThread () === jssun.awt.AWTAccessor.getEventQueueAccessor ().getDispatchThread (eq)); -}, "~O"); -Clazz_overrideMethod (c$, "getScreenSize", -function () { -return new java.awt.Dimension (this.getScreenWidth (), this.getScreenHeight ()); -}); -Clazz_overrideMethod (c$, "getFontMetrics", -function (font) { -return jssun.font.FontDesignMetrics.getMetrics (font); -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "getFontList", -function () { -var hardwiredFontList = Clazz_newArray (-1, ["Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"]); -return hardwiredFontList; -}); -Clazz_overrideMethod (c$, "createPanel", -function (target) { -return this.createComponent (target); -}, "java.awt.Panel"); -Clazz_defineMethod (c$, "disableBackgroundErase", -function (component) { -this.disableBackgroundEraseImpl (component); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "disableBackgroundEraseImpl", - function (component) { -jssun.awt.AWTAccessor.getComponentAccessor ().setBackgroundEraseDisabled (component, true); -}, "java.awt.Component"); -c$.getSunAwtNoerasebackground = Clazz_defineMethod (c$, "getSunAwtNoerasebackground", -function () { -return false; -}); -c$.getSunAwtErasebackgroundonresize = Clazz_defineMethod (c$, "getSunAwtErasebackgroundonresize", -function () { -return true; -}); -Clazz_defineMethod (c$, "setOverrideRedirect", -function (target) { -}, "java.awt.Window"); -c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", -function (tk, url) { -var img = jssun.awt.SunToolkit.imgCache.get (url); -if (img == null) { -try { -img = tk.createImage (url); -jssun.awt.SunToolkit.imgCache.put (url, img); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -} else { -throw e; -} -} -}return img; -}, "java.awt.Toolkit,java.net.URL"); -c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", -function (tk, filename) { -var img = jssun.awt.SunToolkit.imgCache.get (filename); -if (img == null) { -try { -tk.createImage (filename); -jssun.awt.SunToolkit.imgCache.put (filename, img); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -} else { -throw e; -} -} -}return img; -}, "java.awt.Toolkit,~S"); -Clazz_defineMethod (c$, "getImage", -function (filename) { -return jssun.awt.SunToolkit.getImageFromHash (this, filename); -}, "~S"); -Clazz_defineMethod (c$, "getImage", -function (url) { -return jssun.awt.SunToolkit.getImageFromHash (this, url); -}, "java.net.URL"); -Clazz_overrideMethod (c$, "checkImage", -function (img, w, h, o) { -return 0; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "prepareImage", -function (img, w, h, o) { -if (w == 0 || h == 0) { -return true; -}return true; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "getSystemEventQueueImpl", -function () { -return jssun.awt.SunToolkit.getSystemEventQueueImplPP (); -}); -c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", -function () { -return jssun.awt.SunToolkit.getSystemEventQueueImplPP (jssun.awt.AppContext.getAppContext ()); -}); -c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", -function (appContext) { -var theEventQueue = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY); -return theEventQueue; -}, "jssun.awt.AppContext"); -c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", -function (c) { -return java.awt.Toolkit.getNativeContainer (c); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "enableInputMethodsForTextComponent", -function () { -return false; -}); -c$.getStartupLocale = Clazz_defineMethod (c$, "getStartupLocale", -function () { -if (jssun.awt.SunToolkit.startupLocale == null) { -{ -}}return jssun.awt.SunToolkit.startupLocale; -}); -Clazz_defineMethod (c$, "getDefaultKeyboardLocale", -function () { -return jssun.awt.SunToolkit.getStartupLocale (); -}); -c$.setDataTransfererClassName = Clazz_defineMethod (c$, "setDataTransfererClassName", -function (className) { -jssun.awt.SunToolkit.dataTransfererClassName = className; -}, "~S"); -c$.getDataTransfererClassName = Clazz_defineMethod (c$, "getDataTransfererClassName", -function () { -if (jssun.awt.SunToolkit.dataTransfererClassName == null) { -java.awt.Toolkit.getDefaultToolkit (); -}return jssun.awt.SunToolkit.dataTransfererClassName; -}); -Clazz_overrideMethod (c$, "getWindowClosingListener", -function () { -return this.windowClosingListener; -}); -Clazz_overrideMethod (c$, "setWindowClosingListener", -function (wcl) { -this.windowClosingListener = wcl; -}, "jssun.awt.WindowClosingListener"); -Clazz_defineMethod (c$, "windowClosingNotify", -function (event) { -if (this.windowClosingListener != null) { -return this.windowClosingListener.windowClosingNotify (event); -} else { -return null; -}}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "windowClosingDelivered", -function (event) { -if (this.windowClosingListener != null) { -return this.windowClosingListener.windowClosingDelivered (event); -} else { -return null; -}}, "java.awt.event.WindowEvent"); -c$.isModalExcluded = Clazz_defineMethod (c$, "isModalExcluded", -function (window) { -return true; -}, "java.awt.Window"); -c$.isLightweightOrUnknown = Clazz_defineMethod (c$, "isLightweightOrUnknown", -function (comp) { -if (comp.isLightweight () || !(Clazz_instanceOf (java.awt.Toolkit.getDefaultToolkit (), jssun.awt.SunToolkit))) { -return true; -}return !(Clazz_instanceOf (comp, java.awt.Panel) || Clazz_instanceOf (comp, java.awt.Window)); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getDesktopAAHints", -function () { -return null; -}); -c$.getContainingWindow = Clazz_defineMethod (c$, "getContainingWindow", -function (comp) { -while (comp != null && !(Clazz_instanceOf (comp, java.awt.Window))) { -comp = comp.getParent (); -} -return comp; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "isNativeGTKAvailable", -function () { -return false; -}); -Clazz_defineMethod (c$, "isWindowOpacitySupported", -function () { -return false; -}); -Clazz_defineMethod (c$, "isWindowShapingSupported", -function () { -return false; -}); -Clazz_defineMethod (c$, "isWindowTranslucencySupported", -function () { -return false; -}); -Clazz_defineMethod (c$, "isTranslucencyCapable", -function (gc) { -return false; -}, "java.awt.GraphicsConfiguration"); -Clazz_defineMethod (c$, "needUpdateWindow", -function () { -return false; -}); -c$.$SunToolkit$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$1", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -jssun.awt.AWTAccessor.getAWTEventAccessor ().setPosted (this.f$.e); -(this.f$.e.getSource ()).dispatchEvent (this.f$.e); -}); -c$ = Clazz_p0p (); -}; -c$.$SunToolkit$2$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$2", jssun.awt.PeerEvent); -Clazz_overrideMethod (c$, "getWhen", -function () { -return this.f$.when; -}); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"GRAB_EVENT_MASK", 0x80000000, -"POST_EVENT_QUEUE_KEY", "PostEventQueue"); -c$.appContextMap = c$.prototype.appContextMap = new java.util.HashMap (); -c$.imgCache = c$.prototype.imgCache = new java.util.HashMap (); -Clazz_defineStatics (c$, -"startupLocale", null, -"dataTransfererClassName", null, -"DESKTOPFONTHINTS", "awt.font.desktophints"); -}); -Clazz_declarePackage ("java.awt"); -Clazz_declareInterface (java.awt, "Conditional"); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.PaintEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.updateRect = null; -Clazz_instantialize (this, arguments); -}, java.awt.event, "PaintEvent", java.awt.event.ComponentEvent); -Clazz_makeConstructor (c$, -function (source, id, updateRect) { -Clazz_superConstructor (this, java.awt.event.PaintEvent, [source, id]); -this.updateRect = updateRect; -}, "java.awt.Component,~N,java.awt.Rectangle"); -Clazz_defineMethod (c$, "getUpdateRect", -function () { -return this.updateRect; -}); -Clazz_defineMethod (c$, "setUpdateRect", -function (updateRect) { -this.updateRect = updateRect; -}, "java.awt.Rectangle"); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 800: -typeStr = "PAINT"; -break; -case 801: -typeStr = "UPDATE"; -break; -default: -typeStr = "unknown type"; -} -return typeStr + ",updateRect=" + (this.updateRect != null ? this.updateRect.toString () : "null"); -}); -Clazz_defineStatics (c$, -"PAINT_FIRST", 800, -"PAINT_LAST", 801, -"PAINT", 800, -"UPDATE", 801); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent", "$.EventFilter", "swingjs.JSThread", "java.util.Vector"], "java.awt.EventDispatchThread", ["java.lang.Error", "$.RuntimeException", "$.Thread", "java.awt.Component", "$.Container", "$.ModalEventFilter", "$.Window", "jssun.awt.AWTAutoShutdown", "$.ModalExclude", "$.SunToolkit", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.theQueue = null; -this.eventFilters = null; -this.modalFiltersCount = 0; -this.filter = null; -this.cond = null; -this.id = 0; -this.doDispatch = true; -if (!Clazz_isClassDefined ("java.awt.EventDispatchThread.StopDispatchEvent")) { -java.awt.EventDispatchThread.$EventDispatchThread$StopDispatchEvent$ (); -} -Clazz_instantialize (this, arguments); -}, java.awt, "EventDispatchThread", swingjs.JSThread); -Clazz_prepareFields (c$, function () { -this.eventFilters = new java.util.Vector (); -}); -Clazz_makeConstructor (c$, -function (group, name, queue) { -Clazz_superConstructor (this, java.awt.EventDispatchThread, [group, name]); -this.theQueue = queue; -}, "ThreadGroup,~S,java.awt.EventQueue"); -Clazz_defineMethod (c$, "stopDispatchingImpl", -function (wait) { -var stopEvent = Clazz_innerTypeInstance (java.awt.EventDispatchThread.StopDispatchEvent, this, null); -if (Thread.currentThread () !== this) { -this.theQueue.postEventPrivate (stopEvent); -if (wait) { -try { -this.join (); -} catch (e) { -if (Clazz_exceptionOf (e, InterruptedException)) { -} else { -throw e; -} -} -}} else { -stopEvent.dispatch (); -}{ -if (this.theQueue.getDispatchThread () === this) { -this.theQueue.detachDispatchThread (); -}}}, "~B"); -Clazz_defineMethod (c$, "stopDispatching", -function () { -this.stopDispatchingImpl (true); -}); -Clazz_defineMethod (c$, "stopDispatchingLater", -function () { -this.stopDispatchingImpl (false); -}); -Clazz_overrideMethod (c$, "run", -function () { -this.pumpEvents (-1, null); -}); -Clazz_defineMethod (c$, "pumpEvents", -function (id, cond) { -this.pumpEventsForHierarchy (id, cond, null); -}, "~N,java.awt.Conditional"); -Clazz_defineMethod (c$, "pumpEventsForHierarchy", -function (id, cond, modalComponent) { -this.pumpEventsForFilter (id, cond, new java.awt.EventDispatchThread.HierarchyEventFilter (modalComponent)); -}, "~N,java.awt.Conditional,java.awt.Component"); -Clazz_defineMethod (c$, "pumpEventsForFilter", -function (id, cond, filter) { -this.filter = filter; -this.cond = cond; -this.id = id; -this.run1 (0); -}, "~N,java.awt.Conditional,java.awt.EventFilter"); -Clazz_overrideMethod (c$, "run1", -function (mode) { -try { -while (true) switch (mode) { -case 0: -this.addEventFilter (this.filter); -mode = 1; -case 1: -if (!this.doDispatch || this.cond != null && !this.cond.evaluate () || this.isInterrupted ()) { -this.doDispatch = false; -return; -}var myid = this.id; -var r = ((Clazz_isClassDefined ("java.awt.EventDispatchThread$1") ? 0 : java.awt.EventDispatchThread.$EventDispatchThread$1$ ()), Clazz_innerTypeInstance (java.awt.EventDispatchThread$1, this, Clazz_cloneFinals ("myid", myid))); -this.dispatchAndReturn (r, mode); -if (this.isJS) return; -break; -case 2: -this.doDispatch = false; -return; -} - -} finally { -if (!this.doDispatch) this.finish (); -} -}, "~N"); -Clazz_defineMethod (c$, "dispatchAndReturn", -function (r, mode) { -var f = null; -var me = this; -{ -f = function() {r.run();me.run1(mode) -}; -}swingjs.JSToolkit.setTimeout (f, 0, 0); -}, "Runnable,~N"); -Clazz_defineMethod (c$, "finish", - function () { -this.doDispatch = false; -this.removeEventFilter (this.filter); -{ -if (this.theQueue.getDispatchThread () === this) { -this.theQueue.detachDispatchThread (); -}if (this.theQueue.peekEvent () != null || !jssun.awt.SunToolkit.isPostEventQueueEmpty ()) { -this.theQueue.initDispatchThread (); -}jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this); -}}); -Clazz_defineMethod (c$, "addEventFilter", -function (filter) { -{ -if (!this.eventFilters.contains (filter)) { -if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) { -var newFilter = filter; -var k = 0; -for (k = 0; k < this.eventFilters.size (); k++) { -var f = this.eventFilters.get (k); -if (Clazz_instanceOf (f, java.awt.ModalEventFilter)) { -var cf = f; -if (cf.compareTo (newFilter) > 0) { -break; -}}} -this.eventFilters.add (k, filter); -this.modalFiltersCount++; -} else { -this.eventFilters.add (filter); -}}}}, "java.awt.EventFilter"); -Clazz_defineMethod (c$, "removeEventFilter", -function (filter) { -{ -if (this.eventFilters.contains (filter)) { -if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) { -this.modalFiltersCount--; -}this.eventFilters.remove (filter); -}}}, "java.awt.EventFilter"); -Clazz_defineMethod (c$, "pumpOneEventForFilters", -function (id) { -try { -var event; -var eventOK; -do { -event = (id == -1) ? this.theQueue.getNextEvent () : this.theQueue.getNextEventForID (id); -if (event == null) return (this.doDispatch = false); -eventOK = true; -{ -for (var i = this.eventFilters.size () - 1; i >= 0; i--) { -var f = this.eventFilters.get (i); -var accept = f.acceptEvent (event); -if (accept === java.awt.EventFilter.FilterAction.REJECT) { -eventOK = false; -break; -} else if (accept === java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY) { -break; -}} -}if (!eventOK) { -event.consume (); -}} while (eventOK == false); -this.theQueue.dispatchEvent (event); -return this.doDispatch = true; -} catch (e$$) { -if (Clazz_exceptionOf (e$$, ThreadDeath)) { -var death = e$$; -{ -return this.doDispatch = false; -} -} else if (Clazz_exceptionOf (e$$, InterruptedException)) { -var interruptedException = e$$; -{ -return this.doDispatch = false; -} -} else { -var e = e$$; -{ -this.processException (e, this.modalFiltersCount > 0); -} -} -} -return this.doDispatch = true; -}, "~N"); -Clazz_defineMethod (c$, "processException", - function (e, isModal) { -if (!this.handleException (e)) { -if (isModal) { -System.err.println ("Exception occurred during event dispatching:"); -e.printStackTrace (); -} else if (Clazz_instanceOf (e, RuntimeException)) { -throw e; -} else if (Clazz_instanceOf (e, Error)) { -throw e; -}}}, "Throwable,~B"); -Clazz_defineMethod (c$, "handleException", - function (thrown) { -return false; -}, "Throwable"); -Clazz_defineMethod (c$, "isDispatching", -function (eq) { -return this.theQueue.equals (eq); -}, "java.awt.EventQueue"); -Clazz_defineMethod (c$, "getEventQueue", -function () { -return this.theQueue; -}); -c$.$EventDispatchThread$StopDispatchEvent$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -Clazz_instantialize (this, arguments); -}, java.awt.EventDispatchThread, "StopDispatchEvent", java.awt.AWTEvent, java.awt.ActiveEvent); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, java.awt.EventDispatchThread.StopDispatchEvent, [this.b$["java.awt.EventDispatchThread"], 0]); -}); -Clazz_overrideMethod (c$, "dispatch", -function () { -this.b$["java.awt.EventDispatchThread"].doDispatch = false; -}); -c$ = Clazz_p0p (); -}; -c$.$EventDispatchThread$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (java.awt, "EventDispatchThread$1", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -this.b$["java.awt.EventDispatchThread"].pumpOneEventForFilters (this.f$.myid); -}); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.modalComponent = null; -Clazz_instantialize (this, arguments); -}, java.awt.EventDispatchThread, "HierarchyEventFilter", null, java.awt.EventFilter); -Clazz_makeConstructor (c$, -function (a) { -this.modalComponent = a; -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "acceptEvent", -function (a) { -if (this.modalComponent != null) { -var b = a.getID (); -var c = (b >= 500) && (b <= 507); -var d = (b >= 1001) && (b <= 1001); -var e = (b == 201); -if (java.awt.Component.isInstanceOf (this.modalComponent, "javax.swing.JInternalFrame")) { -return e ? java.awt.EventFilter.FilterAction.REJECT : java.awt.EventFilter.FilterAction.ACCEPT; -}if (c || d || e) { -var f = a.getSource (); -if (Clazz_instanceOf (f, jssun.awt.ModalExclude)) { -return java.awt.EventFilter.FilterAction.ACCEPT; -} else if (Clazz_instanceOf (f, java.awt.Component)) { -var g = f; -var h = false; -if (Clazz_instanceOf (this.modalComponent, java.awt.Container)) { -while (g !== this.modalComponent && g != null) { -if ((Clazz_instanceOf (g, java.awt.Window)) && (jssun.awt.SunToolkit.isModalExcluded (g))) { -h = true; -break; -}g = g.getParent (); -} -}if (!h && (g !== this.modalComponent)) { -return java.awt.EventFilter.FilterAction.REJECT; -}}}}return java.awt.EventFilter.FilterAction.ACCEPT; -}, "java.awt.AWTEvent"); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"ANY_EVENT", -1); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.lang.Enum"], "java.awt.EventFilter", null, function () { -Clazz_declareInterface (java.awt, "EventFilter"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.EventFilter, "FilterAction", Enum); -Clazz_defineEnumConstant (c$, "ACCEPT", 0, []); -Clazz_defineEnumConstant (c$, "REJECT", 1, []); -Clazz_defineEnumConstant (c$, "ACCEPT_IMMEDIATELY", 2, []); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.EventFilter"], "java.awt.ModalEventFilter", ["java.awt.Component", "$.Dialog", "$.Window", "jssun.awt.ModalExclude"], function () { -c$ = Clazz_decorateAsClass (function () { -this.modalDialog = null; -this.disabled = false; -Clazz_instantialize (this, arguments); -}, java.awt, "ModalEventFilter", null, java.awt.EventFilter); -Clazz_makeConstructor (c$, -function (modalDialog) { -this.modalDialog = modalDialog; -this.disabled = false; -}, "java.awt.Dialog"); -Clazz_defineMethod (c$, "getModalDialog", -function () { -return this.modalDialog; -}); -Clazz_overrideMethod (c$, "acceptEvent", -function (event) { -if (this.disabled || !this.modalDialog.isVisible ()) { -return java.awt.EventFilter.FilterAction.ACCEPT; -}var eventID = event.getID (); -if ((eventID >= 500 && eventID <= 507) || (eventID >= 1001 && eventID <= 1001) || eventID == 201) { -var o = event.getSource (); -if (Clazz_instanceOf (o, jssun.awt.ModalExclude)) { -} else if (Clazz_instanceOf (o, java.awt.Component)) { -var c = o; -while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) { -c = c.getParent_NoClientCode (); -} -if (c != null) { -return this.acceptWindow (c); -}}}return java.awt.EventFilter.FilterAction.ACCEPT; -}, "java.awt.AWTEvent"); -Clazz_defineMethod (c$, "disable", -function () { -this.disabled = true; -}); -Clazz_defineMethod (c$, "compareTo", -function (another) { -var anotherDialog = another.getModalDialog (); -var c = this.modalDialog; -while (c != null) { -if (c === anotherDialog) { -return 1; -}c = c.getParent_NoClientCode (); -} -c = anotherDialog; -while (c != null) { -if (c === this.modalDialog) { -return -1; -}c = c.getParent_NoClientCode (); -} -var blocker = this.modalDialog.getModalBlocker (); -while (blocker != null) { -if (blocker === anotherDialog) { -return -1; -}blocker = blocker.getModalBlocker (); -} -blocker = anotherDialog.getModalBlocker (); -while (blocker != null) { -if (blocker === this.modalDialog) { -return 1; -}blocker = blocker.getModalBlocker (); -} -return this.modalDialog.getModalityType ().compareTo (anotherDialog.getModalityType ()); -}, "java.awt.ModalEventFilter"); -c$.createFilterForDialog = Clazz_defineMethod (c$, "createFilterForDialog", -function (modalDialog) { -switch (modalDialog.getModalityType ()) { -case java.awt.Dialog.ModalityType.DOCUMENT_MODAL: -return new java.awt.ModalEventFilter.DocumentModalEventFilter (modalDialog); -case java.awt.Dialog.ModalityType.APPLICATION_MODAL: -return new java.awt.ModalEventFilter.ApplicationModalEventFilter (modalDialog); -case java.awt.Dialog.ModalityType.TOOLKIT_MODAL: -return new java.awt.ModalEventFilter.ToolkitModalEventFilter (modalDialog); -} -return null; -}, "java.awt.Dialog"); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.appContext = null; -Clazz_instantialize (this, arguments); -}, java.awt.ModalEventFilter, "ToolkitModalEventFilter", java.awt.ModalEventFilter); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, java.awt.ModalEventFilter.ToolkitModalEventFilter, [a]); -this.appContext = a.appContext; -}, "java.awt.Dialog"); -Clazz_overrideMethod (c$, "acceptWindow", -function (a) { -if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) { -return java.awt.EventFilter.FilterAction.ACCEPT; -}if (a.appContext !== this.appContext) { -return java.awt.EventFilter.FilterAction.REJECT; -}while (a != null) { -if (a === this.modalDialog) { -return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY; -}a = a.getOwner (); -} -return java.awt.EventFilter.FilterAction.REJECT; -}, "java.awt.Window"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.appContext = null; -Clazz_instantialize (this, arguments); -}, java.awt.ModalEventFilter, "ApplicationModalEventFilter", java.awt.ModalEventFilter); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, java.awt.ModalEventFilter.ApplicationModalEventFilter, [a]); -this.appContext = a.appContext; -}, "java.awt.Dialog"); -Clazz_overrideMethod (c$, "acceptWindow", -function (a) { -if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) { -return java.awt.EventFilter.FilterAction.ACCEPT; -}if (a.appContext === this.appContext) { -while (a != null) { -if (a === this.modalDialog) { -return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY; -}a = a.getOwner (); -} -return java.awt.EventFilter.FilterAction.REJECT; -}return java.awt.EventFilter.FilterAction.ACCEPT; -}, "java.awt.Window"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.documentRoot = null; -Clazz_instantialize (this, arguments); -}, java.awt.ModalEventFilter, "DocumentModalEventFilter", java.awt.ModalEventFilter); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, java.awt.ModalEventFilter.DocumentModalEventFilter, [a]); -this.documentRoot = a.getDocumentRoot (); -}, "java.awt.Dialog"); -Clazz_overrideMethod (c$, "acceptWindow", -function (a) { -if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) { -var b = this.modalDialog.getOwner (); -while (b != null) { -if (b === a) { -return java.awt.EventFilter.FilterAction.REJECT; -}b = b.getOwner (); -} -return java.awt.EventFilter.FilterAction.ACCEPT; -}while (a != null) { -if (a === this.modalDialog) { -return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY; -}if (a === this.documentRoot) { -return java.awt.EventFilter.FilterAction.REJECT; -}a = a.getOwner (); -} -return java.awt.EventFilter.FilterAction.ACCEPT; -}, "java.awt.Window"); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("java.awt.peer"); -Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.CanvasPeer", null, function () { -Clazz_declareInterface (java.awt.peer, "CanvasPeer", java.awt.peer.ComponentPeer); -}); -Clazz_declarePackage ("java.awt.peer"); -c$ = Clazz_declareInterface (java.awt.peer, "ComponentPeer"); -Clazz_defineStatics (c$, -"SET_LOCATION", 1, -"SET_SIZE", 2, -"SET_BOUNDS", 3, -"SET_CLIENT_SIZE", 4, -"RESET_OPERATION", 5, -"NO_EMBEDDED_CHECK", (16384), -"DEFAULT_OPERATION", 3); -Clazz_declarePackage ("java.awt.peer"); -Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.ContainerPeer", null, function () { -Clazz_declareInterface (java.awt.peer, "ContainerPeer", java.awt.peer.ComponentPeer); -}); -Clazz_declarePackage ("java.awt.peer"); -Clazz_load (["java.awt.peer.WindowPeer"], "java.awt.peer.FramePeer", null, function () { -Clazz_declareInterface (java.awt.peer, "FramePeer", java.awt.peer.WindowPeer); -}); -Clazz_declarePackage ("java.awt.peer"); -Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.LightweightPeer", null, function () { -Clazz_declareInterface (java.awt.peer, "LightweightPeer", java.awt.peer.ComponentPeer); -}); -Clazz_declarePackage ("java.awt.peer"); -Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.PanelPeer", null, function () { -Clazz_declareInterface (java.awt.peer, "PanelPeer", java.awt.peer.ContainerPeer); -}); -Clazz_declarePackage ("java.awt.peer"); -Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.WindowPeer", null, function () { -Clazz_declareInterface (java.awt.peer, "WindowPeer", java.awt.peer.ContainerPeer); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.$dispatched = false; -this.nested = null; -this.toNotify = null; -Clazz_instantialize (this, arguments); -}, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent); -Clazz_makeConstructor (c$, -function () { -this.construct (null); -}); -Clazz_makeConstructor (c$, -function (nested) { -this.construct (nested, null); -}, "java.awt.AWTEvent"); -Clazz_makeConstructor (c$, -function (nested, toNotify) { -Clazz_superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]); -this.nested = nested; -this.toNotify = toNotify; -}, "java.awt.AWTEvent,jssun.awt.AppContext"); -Clazz_overrideMethod (c$, "dispatch", -function () { -try { -if (this.nested != null) { -java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested); -}} finally { -this.$dispatched = true; -if (this.toNotify != null) { -jssun.awt.SunToolkit.postEvent (this.toNotify, new java.awt.SentEvent ()); -}{ -this.notifyAll (); -}} -}); -Clazz_defineMethod (c$, "dispose", -function () { -this.$dispatched = true; -if (this.toNotify != null) { -jssun.awt.SunToolkit.postEvent (this.toNotify, new java.awt.SentEvent ()); -}{ -this.notifyAll (); -}}); -Clazz_defineStatics (c$, -"ID", 1007); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent", "java.util.LinkedList"], "java.awt.SequencedEvent", ["java.lang.Thread", "java.awt.Component", "$.Conditional", "$.EventQueue", "$.SentEvent", "$.Toolkit", "jssun.awt.AppContext", "$.SunToolkit", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.nested = null; -this.appContext = null; -this.disposed = false; -Clazz_instantialize (this, arguments); -}, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent); -Clazz_makeConstructor (c$, -function (nested) { -Clazz_superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]); -this.nested = nested; -{ -java.awt.SequencedEvent.list.add (this); -}}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "dispatch", -function () { -try { -this.appContext = jssun.awt.AppContext.getAppContext (); -if (java.awt.SequencedEvent.getFirst () !== this) { -if (java.awt.EventQueue.isDispatchThread ()) { -var edt = Thread.currentThread (); -edt.pumpEvents (1007, ((Clazz_isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz_innerTypeInstance (java.awt.SequencedEvent$1, this, null))); -} else { -while (!this.isFirstOrDisposed ()) { -{ -try { -swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent"); -java.awt.SequencedEvent.wait (1000); -} catch (e) { -if (Clazz_exceptionOf (e, InterruptedException)) { -break; -} else { -throw e; -} -} -}} -}}if (!this.disposed) { -java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested); -}} finally { -this.dispose (); -} -}); -c$.isOwnerAppContextDisposed = Clazz_defineMethod (c$, "isOwnerAppContextDisposed", - function (se) { -if (se != null) { -var target = se.nested.getSource (); -if (Clazz_instanceOf (target, java.awt.Component)) { -return (target).appContext.isDisposed (); -}}return false; -}, "java.awt.SequencedEvent"); -Clazz_defineMethod (c$, "isFirstOrDisposed", -function () { -if (this.disposed) { -return true; -}return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed; -}); -c$.getFirst = Clazz_defineMethod (c$, "getFirst", - function () { -return java.awt.SequencedEvent.list.getFirst (); -}); -c$.getFirstWithContext = Clazz_defineMethod (c$, "getFirstWithContext", - function () { -var first = java.awt.SequencedEvent.getFirst (); -while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) { -first.dispose (); -first = java.awt.SequencedEvent.getFirst (); -} -return first; -}); -Clazz_defineMethod (c$, "dispose", -function () { -{ -if (this.disposed) { -return; -}this.disposed = true; -}if (this.appContext != null) { -jssun.awt.SunToolkit.postEvent (this.appContext, new java.awt.SentEvent ()); -}var next = null; -{ -java.awt.SequencedEvent.notifyAll (); -if (java.awt.SequencedEvent.list.getFirst () === this) { -java.awt.SequencedEvent.list.removeFirst (); -if (!java.awt.SequencedEvent.list.isEmpty ()) { -next = java.awt.SequencedEvent.list.getFirst (); -}} else { -java.awt.SequencedEvent.list.remove (this); -}}if (next != null && next.appContext != null) { -jssun.awt.SunToolkit.postEvent (next.appContext, new java.awt.SentEvent ()); -}}); -c$.$SequencedEvent$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional); -Clazz_overrideMethod (c$, "evaluate", -function () { -return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed (); -}); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"ID", 1006); -c$.list = c$.prototype.list = new java.util.LinkedList (); -}); -Clazz_load(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){ -c$=Clazz_declareType(java.util,"AbstractSequentialList",java.util.AbstractList); -Clazz_defineMethod(c$,"add", -function(location,object){ -this.listIterator(location).add(object); -},"~N,~O"); -Clazz_defineMethod(c$,"addAll", -function(location,collection){ -var it=this.listIterator(location); -var colIt=collection.iterator(); -var next=it.nextIndex(); -while(colIt.hasNext()){ -it.add(colIt.next()); -it.previous(); -} -return next!=it.nextIndex(); -},"~N,java.util.Collection"); -Clazz_overrideMethod(c$,"get", -function(location){ -try{ -return this.listIterator(location).next(); -}catch(e){ -if(Clazz_instanceOf(e,java.util.NoSuchElementException)){ -throw new IndexOutOfBoundsException(); -}else{ -throw e; -} -} -},"~N"); -Clazz_overrideMethod(c$,"iterator", -function(){ -return this.listIterator(0); -}); -Clazz_defineMethod(c$,"remove", -function(location){ -try{ -var it=this.listIterator(location); -var result=it.next(); -it.remove(); -return result; -}catch(e){ -if(Clazz_instanceOf(e,java.util.NoSuchElementException)){ -throw new IndexOutOfBoundsException(); -}else{ -throw e; -} -} -},"~N"); -Clazz_overrideMethod(c$,"set", -function(location,object){ -var it=this.listIterator(location); -var result=it.next(); -it.set(object); -return result; -},"~N,~O"); -}); -Clazz_load(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){ -c$=Clazz_decorateAsClass(function(){ -this.$size=0; -this.voidLink=null; -Clazz_instantialize(this,arguments); -},java.util,"LinkedList",java.util.AbstractSequentialList,[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]); -Clazz_makeConstructor(c$, -function(){ -Clazz_superConstructor(this,java.util.LinkedList,[]); -this.voidLink=new java.util.LinkedList.Link(null,null,null); -this.voidLink.previous=this.voidLink; -this.voidLink.next=this.voidLink; -}); -Clazz_makeConstructor(c$, -function(collection){ -this.construct(); -this.addAll(collection); -},"java.util.Collection"); -Clazz_defineMethod(c$,"add", -function(location,object){ -if(0<=location&&location<=this.$size){ -var link=this.voidLink; -if(location<(Math.floor(this.$size/2))){ -for(var i=0;i<=location;i++){ -link=link.next; -} -}else{ -for(var i=this.$size;i>location;i--){ -link=link.previous; -} -}var previous=link.previous; -var newLink=new java.util.LinkedList.Link(object,previous,link); -previous.next=newLink; -link.previous=newLink; -this.$size++; -this.modCount++; -}else{ -throw new IndexOutOfBoundsException(); -}},"~N,~O"); -Clazz_defineMethod(c$,"add", -function(object){ -var oldLast=this.voidLink.previous; -var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink); -this.voidLink.previous=newLink; -oldLast.next=newLink; -this.$size++; -this.modCount++; -return true; -},"~O"); -Clazz_defineMethod(c$,"addAll", -function(location,collection){ -if(location<0||location>this.$size){ -throw new IndexOutOfBoundsException(); -}var adding=collection.size(); -if(adding==0){ -return false; -}var previous=this.voidLink; -if(location<(Math.floor(this.$size/2))){ -for(var i=0;i=location;i--){ -previous=previous.previous; -} -}var next=previous.next; -for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){ -var newLink=new java.util.LinkedList.Link(e,previous,null); -previous.next=newLink; -previous=newLink; -} -previous.next=next; -next.previous=previous; -this.$size+=adding; -this.modCount++; -return true; -},"~N,java.util.Collection"); -Clazz_defineMethod(c$,"addAll", -function(collection){ -var adding=collection.size(); -if(adding==0){ -return false; -}var previous=this.voidLink.previous; -for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){ -var newLink=new java.util.LinkedList.Link(e,previous,null); -previous.next=newLink; -previous=newLink; -} -previous.next=this.voidLink; -this.voidLink.previous=previous; -this.$size+=adding; -this.modCount++; -return true; -},"java.util.Collection"); -Clazz_defineMethod(c$,"addFirst", -function(object){ -var oldFirst=this.voidLink.next; -var newLink=new java.util.LinkedList.Link(object,this.voidLink,oldFirst); -this.voidLink.next=newLink; -oldFirst.previous=newLink; -this.$size++; -this.modCount++; -},"~O"); -Clazz_defineMethod(c$,"addLast", -function(object){ -var oldLast=this.voidLink.previous; -var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink); -this.voidLink.previous=newLink; -oldLast.next=newLink; -this.$size++; -this.modCount++; -},"~O"); -Clazz_overrideMethod(c$,"clear", -function(){ -if(this.$size>0){ -this.$size=0; -this.voidLink.next=this.voidLink; -this.voidLink.previous=this.voidLink; -this.modCount++; -}}); -Clazz_overrideMethod(c$,"clone", -function(){ -return new java.util.LinkedList(this); -}); -Clazz_overrideMethod(c$,"contains", -function(object){ -var link=this.voidLink.next; -if(object!=null){ -while(link!==this.voidLink){ -if(object.equals(link.data)){ -return true; -}link=link.next; -} -}else{ -while(link!==this.voidLink){ -if(link.data==null){ -return true; -}link=link.next; -} -}return false; -},"~O"); -Clazz_overrideMethod(c$,"get", -function(location){ -if(0<=location&&locationlocation;i--){ -link=link.previous; -} -}return link.data; -}throw new IndexOutOfBoundsException(); -},"~N"); -Clazz_defineMethod(c$,"getFirst", -function(){ -var first=this.voidLink.next; -if(first!==this.voidLink){ -return first.data; -}throw new java.util.NoSuchElementException(); -}); -Clazz_defineMethod(c$,"getLast", -function(){ -var last=this.voidLink.previous; -if(last!==this.voidLink){ -return last.data; -}throw new java.util.NoSuchElementException(); -}); -Clazz_overrideMethod(c$,"indexOf", -function(object){ -var pos=0; -var link=this.voidLink.next; -if(object!=null){ -while(link!==this.voidLink){ -if(object.equals(link.data)){ -return pos; -}link=link.next; -pos++; -} -}else{ -while(link!==this.voidLink){ -if(link.data==null){ -return pos; -}link=link.next; -pos++; -} -}return-1; -},"~O"); -Clazz_overrideMethod(c$,"lastIndexOf", -function(object){ -var pos=this.$size; -var link=this.voidLink.previous; -if(object!=null){ -while(link!==this.voidLink){ -pos--; -if(object.equals(link.data)){ -return pos; -}link=link.previous; -} -}else{ -while(link!==this.voidLink){ -pos--; -if(link.data==null){ -return pos; -}link=link.previous; -} -}return-1; -},"~O"); -Clazz_defineMethod(c$,"listIterator", -function(location){ -return new java.util.LinkedList.LinkIterator(this,location); -},"~N"); -Clazz_defineMethod(c$,"remove", -function(location){ -if(0<=location&&locationlocation;i--){ -link=link.previous; -} -}var previous=link.previous; -var next=link.next; -previous.next=next; -next.previous=previous; -this.$size--; -this.modCount++; -return link.data; -}throw new IndexOutOfBoundsException(); -},"~N"); -Clazz_defineMethod(c$,"remove", -function(object){ -var link=this.voidLink.next; -if(object!=null){ -while(link!==this.voidLink&&!object.equals(link.data)){ -link=link.next; -} -}else{ -while(link!==this.voidLink&&link.data!=null){ -link=link.next; -} -}if(link===this.voidLink){ -return false; -}var next=link.next; -var previous=link.previous; -previous.next=next; -next.previous=previous; -this.$size--; -this.modCount++; -return true; -},"~O"); -Clazz_defineMethod(c$,"removeFirst", -function(){ -var first=this.voidLink.next; -if(first!==this.voidLink){ -var next=first.next; -this.voidLink.next=next; -next.previous=this.voidLink; -this.$size--; -this.modCount++; -return first.data; -}throw new java.util.NoSuchElementException(); -}); -Clazz_defineMethod(c$,"removeLast", -function(){ -var last=this.voidLink.previous; -if(last!==this.voidLink){ -var previous=last.previous; -this.voidLink.previous=previous; -previous.next=this.voidLink; -this.$size--; -this.modCount++; -return last.data; -}throw new java.util.NoSuchElementException(); -}); -Clazz_overrideMethod(c$,"set", -function(location,object){ -if(0<=location&&locationlocation;i--){ -link=link.previous; -} -}var result=link.data; -link.data=object; -return result; -}throw new IndexOutOfBoundsException(); -},"~N,~O"); -Clazz_overrideMethod(c$,"size", -function(){ -return this.$size; -}); -Clazz_overrideMethod(c$,"offer", -function(o){ -this.add(o); -return true; -},"~O"); -Clazz_overrideMethod(c$,"poll", -function(){ -return this.$size==0?null:this.removeFirst(); -}); -Clazz_defineMethod(c$,"remove", -function(){ -return this.removeFirst(); -}); -Clazz_overrideMethod(c$,"peek", -function(){ -var first=this.voidLink.next; -return first===this.voidLink?null:first.data; -}); -Clazz_overrideMethod(c$,"element", -function(){ -return this.getFirst(); -}); -Clazz_defineMethod(c$,"toArray", -function(){ -var index=0; -var contents=new Array(this.$size); -var link=this.voidLink.next; -while(link!==this.voidLink){ -contents[index++]=link.data; -link=link.next; -} -return contents; -}); -Clazz_defineMethod(c$,"toArray", -function(contents){ -var index=0; -if(this.$size>contents.length){ -var ct=contents.getClass().getComponentType(); -contents=java.lang.reflect.Array.newInstance(ct,this.$size); -}var link=this.voidLink.next; -while(link!==this.voidLink){ -contents[index++]=link.data; -link=link.next; -} -if(index=b;this.pos--){ -this.link=this.link.previous; -} -}}else{ -throw new IndexOutOfBoundsException(); -}},"java.util.LinkedList,~N"); -Clazz_overrideMethod(c$,"add", -function(a){ -if(this.expectedModCount==this.list.modCount){ -var b=this.link.next; -var c=new java.util.LinkedList.Link(a,this.link,b); -this.link.next=c; -b.previous=c; -this.link=c; -this.lastLink=null; -this.pos++; -this.expectedModCount++; -this.list.$size++; -this.list.modCount++; -}else{ -throw new java.util.ConcurrentModificationException(); -}},"~O"); -Clazz_overrideMethod(c$,"hasNext", -function(){ -return this.link.next!==this.list.voidLink; -}); -Clazz_overrideMethod(c$,"hasPrevious", -function(){ -return this.link!==this.list.voidLink; -}); -Clazz_overrideMethod(c$,"next", -function(){ -if(this.expectedModCount==this.list.modCount){ -var a=this.link.next; -if(a!==this.list.voidLink){ -this.lastLink=this.link=a; -this.pos++; -return this.link.data; -}throw new java.util.NoSuchElementException(); -}throw new java.util.ConcurrentModificationException(); -}); -Clazz_overrideMethod(c$,"nextIndex", -function(){ -return this.pos+1; -}); -Clazz_overrideMethod(c$,"previous", -function(){ -if(this.expectedModCount==this.list.modCount){ -if(this.link!==this.list.voidLink){ -this.lastLink=this.link; -this.link=this.link.previous; -this.pos--; -return this.lastLink.data; -}throw new java.util.NoSuchElementException(); -}throw new java.util.ConcurrentModificationException(); -}); -Clazz_overrideMethod(c$,"previousIndex", -function(){ -return this.pos; -}); -Clazz_overrideMethod(c$,"remove", -function(){ -if(this.expectedModCount==this.list.modCount){ -if(this.lastLink!=null){ -var a=this.lastLink.next; -var b=this.lastLink.previous; -a.previous=b; -b.next=a; -if(this.lastLink===this.link){ -this.pos--; -}this.link=b; -this.lastLink=null; -this.expectedModCount++; -this.list.$size--; -this.list.modCount++; -}else{ -throw new IllegalStateException(); -}}else{ -throw new java.util.ConcurrentModificationException(); -}}); -Clazz_overrideMethod(c$,"set", -function(a){ -if(this.expectedModCount==this.list.modCount){ -if(this.lastLink!=null){ -this.lastLink.data=a; -}else{ -throw new IllegalStateException(); -}}else{ -throw new java.util.ConcurrentModificationException(); -}},"~O"); -c$=Clazz_p0p(); -}); -Clazz_declarePackage ("JU"); -Clazz_load (["JU.T3"], "JU.V3", null, function () { -c$ = Clazz_declareType (JU, "V3", JU.T3); -Clazz_makeConstructor (c$, -function () { -}); -c$.newV = Clazz_defineMethod (c$, "newV", -function (t) { -return JU.V3.new3 (t.x, t.y, t.z); -}, "JU.T3"); -c$.newVsub = Clazz_defineMethod (c$, "newVsub", -function (t1, t2) { -return JU.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z); -}, "JU.T3,JU.T3"); -c$.new3 = Clazz_defineMethod (c$, "new3", -function (x, y, z) { -var v = new JU.V3 (); -v.x = x; -v.y = y; -v.z = z; -return v; -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "angle", -function (v1) { -var xx = this.y * v1.z - this.z * v1.y; -var yy = this.z * v1.x - this.x * v1.z; -var zz = this.x * v1.y - this.y * v1.x; -var cross = Math.sqrt (xx * xx + yy * yy + zz * zz); -return Math.abs (Math.atan2 (cross, this.dot (v1))); -}, "JU.V3"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.util.Vector"], "javax.swing.ButtonGroup", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.buttons = null; -this.selection = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "ButtonGroup"); -Clazz_prepareFields (c$, function () { -this.buttons = new java.util.Vector (); -}); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "add", -function (b) { -if (b == null) { -return; -}this.buttons.addElement (b); -if (b.isSelected ()) { -if (this.selection == null) { -this.selection = b.getModel (); -} else { -b.setSelected (false); -}}b.getModel ().setGroup (this); -}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "remove", -function (b) { -if (b == null) { -return; -}this.buttons.removeElement (b); -if (b.getModel () === this.selection) { -this.selection = null; -}b.getModel ().setGroup (null); -}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "clearSelection", -function () { -if (this.selection != null) { -var oldSelection = this.selection; -this.selection = null; -oldSelection.setSelected (false); -}}); -Clazz_defineMethod (c$, "getElements", -function () { -return this.buttons.elements (); -}); -Clazz_defineMethod (c$, "getSelection", -function () { -return this.selection; -}); -Clazz_defineMethod (c$, "setSelected", -function (m, b) { -if (b && m != null && m !== this.selection) { -var oldSelection = this.selection; -this.selection = m; -if (oldSelection != null) { -oldSelection.setSelected (false); -}m.setSelected (true); -}}, "javax.swing.ButtonModel,~B"); -Clazz_defineMethod (c$, "isSelected", -function (m) { -return (m === this.selection); -}, "javax.swing.ButtonModel"); -Clazz_defineMethod (c$, "getButtonCount", -function () { -if (this.buttons == null) { -return 0; -} else { -return this.buttons.size (); -}}); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["jssun.awt.PaintEventDispatcher"], "javax.swing.SwingPaintEventDispatcher", ["javax.swing.RootPaneContainer", "jssun.awt.SunToolkit"], function () { -c$ = Clazz_declareType (javax.swing, "SwingPaintEventDispatcher", jssun.awt.PaintEventDispatcher); -Clazz_overrideMethod (c$, "shouldDoNativeBackgroundErase", -function (c) { -return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND || !(Clazz_instanceOf (c, javax.swing.RootPaneContainer)); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "queueSurfaceDataReplacing", -function (c, r) { -if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) { -var appContext = jssun.awt.SunToolkit.targetToAppContext (c); -return true; -}return Clazz_superCall (this, javax.swing.SwingPaintEventDispatcher, "queueSurfaceDataReplacing", [c, r]); -}, "java.awt.Component,Runnable"); -Clazz_defineStatics (c$, -"SHOW_FROM_DOUBLE_BUFFER", false, -"ERASE_BACKGROUND", false); -{ -javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER = false; -javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND = true; -}}); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (["java.util.HashSet", "$.IdentityHashMap"], "jssun.awt.AWTAutoShutdown", ["java.awt.AWTEvent"], function () { -c$ = Clazz_decorateAsClass (function () { -this.busyThreadSet = null; -this.toolkitThreadBusy = false; -this.peerMap = null; -Clazz_instantialize (this, arguments); -}, jssun.awt, "AWTAutoShutdown", null, Runnable); -Clazz_prepareFields (c$, function () { -this.busyThreadSet = new java.util.HashSet (7); -this.peerMap = new java.util.IdentityHashMap (); -}); -Clazz_makeConstructor (c$, - function () { -}); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function () { -return (jssun.awt.AWTAutoShutdown.theInstance == null ? (jssun.awt.AWTAutoShutdown.theInstance = new jssun.awt.AWTAutoShutdown ()) : jssun.awt.AWTAutoShutdown.theInstance); -}); -c$.notifyToolkitThreadBusy = Clazz_defineMethod (c$, "notifyToolkitThreadBusy", -function () { -jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (true); -}); -c$.notifyToolkitThreadFree = Clazz_defineMethod (c$, "notifyToolkitThreadFree", -function () { -jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (false); -}); -Clazz_defineMethod (c$, "notifyThreadBusy", -function (thread) { -this.busyThreadSet.add (thread); -}, "Thread"); -Clazz_defineMethod (c$, "notifyThreadFree", -function (thread) { -this.busyThreadSet.remove (thread); -}, "Thread"); -Clazz_defineMethod (c$, "notifyPeerMapUpdated", -function () { -if (!this.isReadyToShutdown ()) { -this.activateBlockerThread (); -}}); -Clazz_defineMethod (c$, "isReadyToShutdown", - function () { -return (!this.toolkitThreadBusy && this.peerMap.isEmpty () && this.busyThreadSet.isEmpty ()); -}); -Clazz_defineMethod (c$, "setToolkitBusy", - function (busy) { -if (busy != this.toolkitThreadBusy) { -if (busy != this.toolkitThreadBusy) { -if (busy) { -this.toolkitThreadBusy = busy; -} else { -this.toolkitThreadBusy = busy; -}}}}, "~B"); -Clazz_overrideMethod (c$, "run", -function () { -}); -c$.getShutdownEvent = Clazz_defineMethod (c$, "getShutdownEvent", -function () { -return ((Clazz_isClassDefined ("jssun.awt.AWTAutoShutdown$1") ? 0 : jssun.awt.AWTAutoShutdown.$AWTAutoShutdown$1$ ()), Clazz_innerTypeInstance (jssun.awt.AWTAutoShutdown$1, this, null, jssun.awt.AWTAutoShutdown.getInstance (), 0)); -}); -Clazz_defineMethod (c$, "activateBlockerThread", - function () { -}); -Clazz_defineMethod (c$, "registerPeer", -function (target, peer) { -this.peerMap.put (target, peer); -this.notifyPeerMapUpdated (); -}, "~O,~O"); -Clazz_defineMethod (c$, "unregisterPeer", -function (target, peer) { -if (this.peerMap.get (target) === peer) { -this.peerMap.remove (target); -}}, "~O,~O"); -Clazz_defineMethod (c$, "getPeer", -function (target) { -return this.peerMap.get (target); -}, "~O"); -Clazz_defineMethod (c$, "dumpPeers", -function (aLog) { -aLog.fine ("Mapped peers:"); -for (var key, $key = this.peerMap.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) { -aLog.fine (key + "->" + this.peerMap.get (key)); -} -}, "java.util.logging.Logger"); -c$.$AWTAutoShutdown$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (jssun.awt, "AWTAutoShutdown$1", java.awt.AWTEvent); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"theInstance", null); -}); -Clazz_declarePackage ("jssun.awt"); -c$ = Clazz_decorateAsClass (function () { -this.event = null; -this.next = null; -Clazz_instantialize (this, arguments); -}, jssun.awt, "EventQueueItem"); -Clazz_makeConstructor (c$, -function (evt) { -this.event = evt; -}, "java.awt.AWTEvent"); -Clazz_declarePackage ("jssun.awt"); -Clazz_declareInterface (jssun.awt, "ModalExclude"); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (["java.awt.peer.CanvasPeer", "$.LightweightPeer", "$.PanelPeer"], "jssun.awt.NullComponentPeer", ["java.lang.IllegalStateException", "$.UnsupportedOperationException", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle"], function () { -c$ = Clazz_declareType (jssun.awt, "NullComponentPeer", null, [java.awt.peer.LightweightPeer, java.awt.peer.CanvasPeer, java.awt.peer.PanelPeer]); -Clazz_overrideMethod (c$, "isObscured", -function () { -return false; -}); -Clazz_overrideMethod (c$, "canDetermineObscurity", -function () { -return false; -}); -Clazz_overrideMethod (c$, "isFocusable", -function () { -return false; -}); -Clazz_overrideMethod (c$, "setVisible", -function (b) { -}, "~B"); -Clazz_defineMethod (c$, "show", -function () { -}); -Clazz_defineMethod (c$, "hide", -function () { -}); -Clazz_overrideMethod (c$, "setEnabled", -function (b) { -}, "~B"); -Clazz_defineMethod (c$, "enable", -function () { -}); -Clazz_defineMethod (c$, "disable", -function () { -}); -Clazz_overrideMethod (c$, "paint", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "repaint", -function (tm, x, y, width, height) { -}, "~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "print", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "setBounds", -function (x, y, width, height, op) { -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "reshape", -function (x, y, width, height) { -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "coalescePaintEvent", -function (e) { -}, "java.awt.event.PaintEvent"); -Clazz_defineMethod (c$, "handleEvent", -function (e) { -return false; -}, "java.awt.Event"); -Clazz_defineMethod (c$, "handleEvent", -function (arg0) { -}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "getPreferredSize", -function () { -return new java.awt.Dimension (1, 1); -}); -Clazz_overrideMethod (c$, "getMinimumSize", -function () { -return new java.awt.Dimension (1, 1); -}); -Clazz_overrideMethod (c$, "getToolkit", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getColorModel", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getGraphics", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getGraphicsConfiguration", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getFontMetrics", -function (font) { -return null; -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "dispose", -function () { -}); -Clazz_overrideMethod (c$, "setForeground", -function (c) { -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setBackground", -function (c) { -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setFont", -function (f) { -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "updateCursorImmediately", -function () { -}); -Clazz_defineMethod (c$, "setCursor", -function (cursor) { -}, "java.awt.Cursor"); -Clazz_overrideMethod (c$, "requestFocus", -function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { -return false; -}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); -Clazz_defineMethod (c$, "createImage", -function (producer) { -return null; -}, "java.awt.image.ImageProducer"); -Clazz_defineMethod (c$, "createImage", -function (width, height) { -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "prepareImage", -function (img, w, h, o) { -return false; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "checkImage", -function (img, w, h, o) { -return 0; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "preferredSize", -function () { -return this.getPreferredSize (); -}); -Clazz_defineMethod (c$, "minimumSize", -function () { -return this.getMinimumSize (); -}); -Clazz_overrideMethod (c$, "getLocationOnScreen", -function () { -return new java.awt.Point (0, 0); -}); -Clazz_overrideMethod (c$, "getInsets", -function () { -return this.insets (); -}); -Clazz_overrideMethod (c$, "beginValidate", -function () { -}); -Clazz_overrideMethod (c$, "endValidate", -function () { -}); -Clazz_defineMethod (c$, "insets", -function () { -return new java.awt.Insets (0, 0, 0, 0); -}); -Clazz_defineMethod (c$, "isPaintPending", -function () { -return false; -}); -Clazz_overrideMethod (c$, "handlesWheelScrolling", -function () { -return false; -}); -Clazz_overrideMethod (c$, "createVolatileImage", -function (width, height) { -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "beginLayout", -function () { -}); -Clazz_overrideMethod (c$, "endLayout", -function () { -}); -Clazz_overrideMethod (c$, "getBackBuffer", -function () { -throw new IllegalStateException ("Page-flipping is not allowed on a lightweight component"); -}); -Clazz_overrideMethod (c$, "destroyBuffers", -function () { -}); -Clazz_overrideMethod (c$, "isReparentSupported", -function () { -return false; -}); -Clazz_overrideMethod (c$, "reparent", -function (newNativeParent) { -throw new UnsupportedOperationException (); -}, "java.awt.peer.ContainerPeer"); -Clazz_defineMethod (c$, "restack", -function () { -throw new UnsupportedOperationException (); -}); -Clazz_defineMethod (c$, "isRestackSupported", -function () { -return false; -}); -Clazz_overrideMethod (c$, "layout", -function () { -}); -Clazz_overrideMethod (c$, "getBounds", -function () { -return new java.awt.Rectangle (0, 0, 0, 0); -}); -}); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (null, "jssun.awt.PaintEventDispatcher", ["java.awt.Rectangle", "java.awt.event.PaintEvent"], function () { -c$ = Clazz_declareType (jssun.awt, "PaintEventDispatcher"); -c$.setPaintEventDispatcher = Clazz_defineMethod (c$, "setPaintEventDispatcher", -function (dispatcher) { -{ -jssun.awt.PaintEventDispatcher.dispatcher = dispatcher; -}}, "jssun.awt.PaintEventDispatcher"); -c$.getPaintEventDispatcher = Clazz_defineMethod (c$, "getPaintEventDispatcher", -function () { -{ -if (jssun.awt.PaintEventDispatcher.dispatcher == null) { -jssun.awt.PaintEventDispatcher.dispatcher = new jssun.awt.PaintEventDispatcher (); -}return jssun.awt.PaintEventDispatcher.dispatcher; -}}); -Clazz_defineMethod (c$, "createPaintEvent", -function (target, x, y, w, h) { -return new java.awt.event.PaintEvent (target, 800, new java.awt.Rectangle (x, y, w, h)); -}, "java.awt.Component,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "shouldDoNativeBackgroundErase", -function (c) { -return true; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "queueSurfaceDataReplacing", -function (c, r) { -return false; -}, "java.awt.Component,Runnable"); -Clazz_defineStatics (c$, -"dispatcher", null); -}); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.queueHead = null; -this.queueTail = null; -this.eventQueue = null; -Clazz_instantialize (this, arguments); -}, jssun.awt, "PostEventQueue"); -Clazz_makeConstructor (c$, -function (eq) { -this.eventQueue = eq; -}, "java.awt.EventQueue"); -Clazz_defineMethod (c$, "noEvents", -function () { -return this.queueHead == null; -}); -Clazz_defineMethod (c$, "flush", -function () { -if (this.queueHead != null) { -var tempQueue; -{ -tempQueue = this.queueHead; -this.queueHead = this.queueTail = null; -while (tempQueue != null) { -swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event); -this.eventQueue.postEvent (tempQueue.event); -tempQueue = tempQueue.next; -} -}}}); -Clazz_defineMethod (c$, "postEvent", -function (event) { -var item = new jssun.awt.EventQueueItem (event); -{ -if (this.queueHead == null) { -this.queueHead = this.queueTail = item; -} else { -this.queueTail.next = item; -this.queueTail = item; -}}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false); -}, "java.awt.AWTEvent"); -}); -Clazz_declarePackage ("jssun.java2d"); -Clazz_load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () { -c$ = Clazz_decorateAsClass (function () { -this.transformState = 0; -this.foregroundColor = null; -this.backgroundColor = null; -this.$transform = null; -this.transX = 0; -this.transY = 0; -this.hints = null; -Clazz_instantialize (this, arguments); -}, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D); -Clazz_defineMethod (c$, "clone", -function () { -return this.clone0 (); -}); -Clazz_defineMethod (c$, "clone0", -function () { -try { -var g; -{ -g = Clazz_clone(this); -}g.$transform = new java.awt.geom.AffineTransform (this.$transform); -if (this.hints != null) { -g.hints = this.hints.clone (); -}return g; -} catch (e) { -if (Clazz_exceptionOf (e, CloneNotSupportedException)) { -} else { -throw e; -} -} -return null; -}); -Clazz_defineMethod (c$, "create", -function () { -return this.clone0 (); -}); -Clazz_defineStatics (c$, -"TRANSFORM_GENERIC", 4, -"TRANSFORM_TRANSLATESCALE", 3, -"TRANSFORM_ANY_TRANSLATE", 2, -"TRANSFORM_INT_TRANSLATE", 1, -"TRANSFORM_ISIDENT", 0); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () { -c$ = Clazz_declareType (javax.swing, "UIManager"); -c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", -function () { -return javax.swing.UIManager.uid; -}); -c$.getInstalledLookAndFeels = Clazz_defineMethod (c$, "getInstalledLookAndFeels", -function () { -return javax.swing.UIManager.installedLAFs; -}); -c$.setInstalledLookAndFeels = Clazz_defineMethod (c$, "setInstalledLookAndFeels", -function (infos) { -swingjs.JSToolkit.notImplemented (null); -}, "~A"); -c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", -function (info) { -swingjs.JSToolkit.notImplemented (null); -}, "javax.swing.UIManager.LookAndFeelInfo"); -c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", -function (name, className) { -swingjs.JSToolkit.notImplemented (null); -}, "~S,~S"); -c$.getLookAndFeel = Clazz_defineMethod (c$, "getLookAndFeel", -function () { -return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf); -}); -c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", -function (newLookAndFeel) { -}, "javax.swing.LookAndFeel"); -c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", -function (className) { -var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className); -javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ())); -}, "~S"); -c$.getSystemLookAndFeelClassName = Clazz_defineMethod (c$, "getSystemLookAndFeelClassName", -function () { -return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName (); -}); -c$.getCrossPlatformLookAndFeelClassName = Clazz_defineMethod (c$, "getCrossPlatformLookAndFeelClassName", -function () { -return "swingjs.plaf.HTML5LookAndFeel"; -}); -c$.getDefaults = Clazz_defineMethod (c$, "getDefaults", -function () { -javax.swing.UIManager.maybeInitialize (); -return javax.swing.UIManager.uid; -}); -c$.getFont = Clazz_defineMethod (c$, "getFont", -function (key) { -return javax.swing.UIManager.getDefaults ().getFont (key); -}, "~O"); -c$.getFont = Clazz_defineMethod (c$, "getFont", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getFont (key, l); -}, "~O,java.util.Locale"); -c$.getColor = Clazz_defineMethod (c$, "getColor", -function (key) { -return javax.swing.UIManager.getDefaults ().getColor (key); -}, "~O"); -c$.getColor = Clazz_defineMethod (c$, "getColor", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getColor (key, l); -}, "~O,java.util.Locale"); -c$.getIcon = Clazz_defineMethod (c$, "getIcon", -function (key) { -return javax.swing.UIManager.getDefaults ().getIcon (key); -}, "~O"); -c$.getIcon = Clazz_defineMethod (c$, "getIcon", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getIcon (key, l); -}, "~O,java.util.Locale"); -c$.getBorder = Clazz_defineMethod (c$, "getBorder", -function (key) { -return javax.swing.UIManager.getDefaults ().getBorder (key); -}, "~O"); -c$.getBorder = Clazz_defineMethod (c$, "getBorder", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getBorder (key, l); -}, "~O,java.util.Locale"); -c$.getString = Clazz_defineMethod (c$, "getString", -function (key) { -return javax.swing.UIManager.getDefaults ().getString (key); -}, "~O"); -c$.getString = Clazz_defineMethod (c$, "getString", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getString (key, l); -}, "~O,java.util.Locale"); -c$.getString = Clazz_defineMethod (c$, "getString", -function (key, c) { -var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale (); -return javax.swing.UIManager.getString (key, l); -}, "~O,java.awt.Component"); -c$.getInt = Clazz_defineMethod (c$, "getInt", -function (key) { -return javax.swing.UIManager.getDefaults ().getInt (key); -}, "~O"); -c$.getInt = Clazz_defineMethod (c$, "getInt", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getInt (key, l); -}, "~O,java.util.Locale"); -c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", -function (key) { -return javax.swing.UIManager.getDefaults ().getBoolean (key); -}, "~O"); -c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getBoolean (key, l); -}, "~O,java.util.Locale"); -c$.getInsets = Clazz_defineMethod (c$, "getInsets", -function (key) { -return javax.swing.UIManager.getDefaults ().getInsets (key); -}, "~O"); -c$.getInsets = Clazz_defineMethod (c$, "getInsets", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getInsets (key, l); -}, "~O,java.util.Locale"); -c$.getDimension = Clazz_defineMethod (c$, "getDimension", -function (key) { -return javax.swing.UIManager.getDefaults ().getDimension (key); -}, "~O"); -c$.getDimension = Clazz_defineMethod (c$, "getDimension", -function (key, l) { -return javax.swing.UIManager.getDefaults ().getDimension (key, l); -}, "~O,java.util.Locale"); -c$.get = Clazz_defineMethod (c$, "get", -function (key) { -return javax.swing.UIManager.getDefaults ().get (key); -}, "~O"); -c$.get = Clazz_defineMethod (c$, "get", -function (key, l) { -return javax.swing.UIManager.getDefaults ().get (key, l); -}, "~O,java.util.Locale"); -c$.put = Clazz_defineMethod (c$, "put", -function (key, value) { -return javax.swing.UIManager.getDefaults ().put (key, value); -}, "~O,~O"); -c$.getUI = Clazz_defineMethod (c$, "getUI", -function (target) { -javax.swing.UIManager.maybeInitialize (); -var ui = null; -ui = javax.swing.UIManager.getDefaults ().getUI (target); -if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented"); -return ui; -}, "javax.swing.JComponent"); -c$.addPropertyChangeListener = Clazz_defineMethod (c$, "addPropertyChangeListener", -function (listener) { -}, "java.beans.PropertyChangeListener"); -c$.removePropertyChangeListener = Clazz_defineMethod (c$, "removePropertyChangeListener", -function (listener) { -}, "java.beans.PropertyChangeListener"); -c$.getPropertyChangeListeners = Clazz_defineMethod (c$, "getPropertyChangeListeners", -function () { -return new Array (0); -}); -c$.maybeInitialize = Clazz_defineMethod (c$, "maybeInitialize", - function () { -if (javax.swing.UIManager.uid == null) { -javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults (); -javax.swing.UIManager.initialize (); -}}); -c$.initialize = Clazz_defineMethod (c$, "initialize", - function () { -if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { -jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ()); -}}); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.name = null; -this.className = null; -Clazz_instantialize (this, arguments); -}, javax.swing.UIManager, "LookAndFeelInfo"); -Clazz_makeConstructor (c$, -function (a, b) { -this.name = a; -this.className = b; -}, "~S,~S"); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_defineMethod (c$, "getClassName", -function () { -return this.className; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]"; -}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"installedLAFs", null); -{ -var iLAFs = new java.util.ArrayList (4); -iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel")); -javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ())); -}Clazz_defineStatics (c$, -"laf", null, -"uid", null); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.util.Hashtable", "java.util.Locale"], "javax.swing.UIDefaults", ["java.lang.Boolean", "$.Error", "java.util.HashMap", "$.Vector", "java.awt.Color", "$.Dimension", "$.Font", "$.Insets", "javax.swing.Icon", "$.SwingUtilities", "javax.swing.border.Border", "javax.swing.event.SwingPropertyChangeSupport", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.changeSupport = null; -this.resourceBundles = null; -this.defaultLocale = null; -this.resourceCache = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "UIDefaults", java.util.Hashtable); -Clazz_prepareFields (c$, function () { -this.defaultLocale = java.util.Locale.getDefault (); -}); -Clazz_makeConstructor (c$, -function () { -this.construct (700, .75); -}); -Clazz_makeConstructor (c$, -function (initialCapacity, loadFactor) { -Clazz_superConstructor (this, javax.swing.UIDefaults, [initialCapacity, loadFactor]); -this.resourceCache = new java.util.HashMap (); -}, "~N,~N"); -Clazz_makeConstructor (c$, -function (keyValueList) { -Clazz_superConstructor (this, javax.swing.UIDefaults, [Clazz_doubleToInt (keyValueList.length / 2)]); -for (var i = 0; i < keyValueList.length; i += 2) { -Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], keyValueList[i + 1]]); -} -}, "~A"); -Clazz_defineMethod (c$, "get", -function (key) { -var value = this.getFromHashtable (key); -return (value != null) ? value : this.getFromResourceBundle (key, null); -}, "~O"); -Clazz_defineMethod (c$, "getFromHashtable", - function (key) { -var value = Clazz_superCall (this, javax.swing.UIDefaults, "get", [key]); -if (value == null && (Clazz_instanceOf (key, String))) { -var skey = key; -if (skey.endsWith (".font") || skey.endsWith (".background") || skey.endsWith (".foreground")) value = Clazz_superCall (this, javax.swing.UIDefaults, "get", ["*" + skey.substring (skey.lastIndexOf ("."))]); -}if ((value !== javax.swing.UIDefaults.PENDING) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue)) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue))) { -return value; -}if (!(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue))) { -return value; -}if (Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue)) { -try { -value = (value).createValue (this); -} finally { -if (value == null) { -Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]); -} else { -Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]); -}} -} else { -value = (value).createValue (this); -}return value; -}, "~O"); -Clazz_defineMethod (c$, "get", -function (key, l) { -var value = this.getFromHashtable (key); -return (value != null) ? value : this.getFromResourceBundle (key, l); -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getFromResourceBundle", - function (key, l) { -if (this.resourceBundles == null || this.resourceBundles.isEmpty () || !(Clazz_instanceOf (key, String))) { -return null; -}if (l == null) { -if (this.defaultLocale == null) return null; - else l = this.defaultLocale; -}{ -return this.getResourceCache (l).get (key); -}}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getResourceCache", - function (l) { -return null; -}, "java.util.Locale"); -Clazz_defineMethod (c$, "put", -function (key, value) { -var oldValue = (value == null) ? Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]) : Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]); -if (Clazz_instanceOf (key, String)) { -this.firePropertyChange (key, oldValue, value); -}return oldValue; -}, "~O,~O"); -Clazz_defineMethod (c$, "putDefaults", -function (keyValueList) { -for (var i = 0, max = keyValueList.length; i < max; i += 2) { -var value = keyValueList[i + 1]; -if (value == null) { -Clazz_superCall (this, javax.swing.UIDefaults, "remove", [keyValueList[i]]); -} else { -Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], value]); -}} -this.firePropertyChange ("UIDefaults", null, null); -}, "~A"); -Clazz_defineMethod (c$, "getFont", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, java.awt.Font)) ? value : null; -}, "~O"); -Clazz_defineMethod (c$, "getFont", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, java.awt.Font)) ? value : null; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getColor", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, java.awt.Color)) ? value : null; -}, "~O"); -Clazz_defineMethod (c$, "getColor", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, java.awt.Color)) ? value : null; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getIcon", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null; -}, "~O"); -Clazz_defineMethod (c$, "getIcon", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getBorder", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null; -}, "~O"); -Clazz_defineMethod (c$, "getBorder", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getString", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, String)) ? value : null; -}, "~O"); -Clazz_defineMethod (c$, "getString", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, String)) ? value : null; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getInt", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0; -}, "~O"); -Clazz_defineMethod (c$, "getInt", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getBoolean", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false; -}, "~O"); -Clazz_defineMethod (c$, "getBoolean", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getInsets", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null; -}, "~O"); -Clazz_defineMethod (c$, "getInsets", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getDimension", -function (key) { -var value = this.get (key); -return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null; -}, "~O"); -Clazz_defineMethod (c$, "getDimension", -function (key, l) { -var value = this.get (key, l); -return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null; -}, "~O,java.util.Locale"); -Clazz_defineMethod (c$, "getUIClass", -function (uiClassID, uiClassLoader) { -try { -var className = this.get (uiClassID); -if (className != null) { -var cls = this.get (className); -if (cls == null) { -if (uiClassLoader == null) { -cls = javax.swing.SwingUtilities.loadSystemClass (className); -} else { -cls = uiClassLoader.loadClass (className); -}if (cls != null) { -this.put (className, cls); -}}return cls; -}} catch (e$$) { -if (Clazz_exceptionOf (e$$, ClassNotFoundException)) { -var e = e$$; -{ -return null; -} -} else if (Clazz_exceptionOf (e$$, ClassCastException)) { -var e = e$$; -{ -return null; -} -} else { -throw e$$; -} -} -return null; -}, "~S,ClassLoader"); -Clazz_defineMethod (c$, "getUIClass", -function (uiClassID) { -return this.getUIClass (uiClassID, null); -}, "~S"); -Clazz_defineMethod (c$, "getUIError", -function (msg) { -System.err.println ("UIDefaults.getUI() failed: " + msg); -try { -throw new Error (); -} catch (e) { -e.printStackTrace (); -} -}, "~S"); -Clazz_defineMethod (c$, "getUI", -function (target) { -return swingjs.JSToolkit.getComponentUI (target); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "addPropertyChangeListener", -function (listener) { -if (this.changeSupport == null) { -this.changeSupport = new javax.swing.event.SwingPropertyChangeSupport (this); -}this.changeSupport.addPropertyChangeListener (listener); -}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "removePropertyChangeListener", -function (listener) { -if (this.changeSupport != null) { -this.changeSupport.removePropertyChangeListener (listener); -}}, "java.beans.PropertyChangeListener"); -Clazz_defineMethod (c$, "getPropertyChangeListeners", -function () { -if (this.changeSupport == null) { -return new Array (0); -}return this.changeSupport.getPropertyChangeListeners (); -}); -Clazz_defineMethod (c$, "firePropertyChange", -function (propertyName, oldValue, newValue) { -if (this.changeSupport != null) { -this.changeSupport.firePropertyChange (propertyName, oldValue, newValue); -}}, "~S,~O,~O"); -Clazz_defineMethod (c$, "addResourceBundle", -function (bundleName) { -if (bundleName == null) { -return; -}if (this.resourceBundles == null) { -this.resourceBundles = new java.util.Vector (5); -}if (!this.resourceBundles.contains (bundleName)) { -this.resourceBundles.add (bundleName); -this.resourceCache.clear (); -}}, "~S"); -Clazz_defineMethod (c$, "removeResourceBundle", -function (bundleName) { -if (this.resourceBundles != null) { -this.resourceBundles.remove (bundleName); -}this.resourceCache.clear (); -}, "~S"); -Clazz_defineMethod (c$, "setDefaultLocale", -function (l) { -this.defaultLocale = l; -}, "java.util.Locale"); -Clazz_defineMethod (c$, "getDefaultLocale", -function () { -return this.defaultLocale; -}); -Clazz_declareInterface (javax.swing.UIDefaults, "LazyValue"); -Clazz_declareInterface (javax.swing.UIDefaults, "ActiveValue"); -c$.PENDING = c$.prototype.PENDING = String.instantialize ("Pending"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () { -c$ = Clazz_declareType (javax.swing, "LookAndFeel"); -c$.installColors = Clazz_defineMethod (c$, "installColors", -function (c, defaultBgName, defaultFgName) { -var bg = c.getBackground (); -if (bg == null || Clazz_instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName)); -var fg = c.getForeground (); -if (fg == null || Clazz_instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName)); -}, "javax.swing.JComponent,~S,~S"); -c$.installColorsAndFont = Clazz_defineMethod (c$, "installColorsAndFont", -function (c, defaultBgName, defaultFgName, defaultFontName) { -var f = c.getFont (); -if (f == null || Clazz_instanceOf (f, javax.swing.plaf.UIResource)) { -c.setFont (javax.swing.UIManager.getFont (defaultFontName)); -}javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName); -}, "javax.swing.JComponent,~S,~S,~S"); -c$.installBorder = Clazz_defineMethod (c$, "installBorder", -function (c, defaultBorderName) { -swingjs.JSToolkit.notImplemented (null); -}, "javax.swing.JComponent,~S"); -c$.uninstallBorder = Clazz_defineMethod (c$, "uninstallBorder", -function (c) { -swingjs.JSToolkit.notImplemented (null); -}, "javax.swing.JComponent"); -c$.installProperty = Clazz_defineMethod (c$, "installProperty", -function (c, propertyName, propertyValue) { -if (Clazz_instanceOf (c, javax.swing.JPasswordField)) { -if (!(c).customSetUIProperty (propertyName, propertyValue)) { -c.setUIProperty (propertyName, propertyValue); -}} else { -c.setUIProperty (propertyName, propertyValue); -}}, "javax.swing.JComponent,~S,~O"); -c$.makeKeyBindings = Clazz_defineMethod (c$, "makeKeyBindings", -function (keyBindingList) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "~A"); -c$.makeInputMap = Clazz_defineMethod (c$, "makeInputMap", -function (keys) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "~A"); -c$.makeComponentInputMap = Clazz_defineMethod (c$, "makeComponentInputMap", -function (c, keys) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "javax.swing.JComponent,~A"); -c$.loadKeyBindings = Clazz_defineMethod (c$, "loadKeyBindings", -function (retMap, keys) { -swingjs.JSToolkit.notImplemented (null); -}, "javax.swing.InputMap,~A"); -c$.makeIcon = Clazz_defineMethod (c$, "makeIcon", -function (baseClass, gifFile) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "Class,~S"); -Clazz_defineMethod (c$, "getLayoutStyle", -function () { -return jssun.swing.DefaultLayoutStyle.getInstance (); -}); -Clazz_defineMethod (c$, "provideErrorFeedback", -function (component) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.Component"); -c$.getDesktopPropertyValue = Clazz_defineMethod (c$, "getDesktopPropertyValue", -function (systemPropertyName, fallbackValue) { -swingjs.JSToolkit.notImplemented (null); -return fallbackValue; -}, "~S,~O"); -Clazz_defineMethod (c$, "getDisabledIcon", -function (component, icon) { -swingjs.JSToolkit.notImplemented (null); -return null; -}, "javax.swing.JComponent,javax.swing.Icon"); -Clazz_defineMethod (c$, "getDisabledSelectedIcon", -function (component, icon) { -return this.getDisabledIcon (component, icon); -}, "javax.swing.JComponent,javax.swing.Icon"); -Clazz_defineMethod (c$, "getSupportsWindowDecorations", -function () { -return false; -}); -Clazz_defineMethod (c$, "initialize", -function () { -}); -Clazz_defineMethod (c$, "uninitialize", -function () { -}); -Clazz_defineMethod (c$, "getDefaults", -function () { -return null; -}); -Clazz_overrideMethod (c$, "toString", -function () { -return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]"; -}); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.lang.Enum"], "javax.swing.DropMode", null, function () { -c$ = Clazz_declareType (javax.swing, "DropMode", Enum); -Clazz_defineEnumConstant (c$, "USE_SELECTION", 0, []); -Clazz_defineEnumConstant (c$, "ON", 1, []); -Clazz_defineEnumConstant (c$, "INSERT", 2, []); -Clazz_defineEnumConstant (c$, "INSERT_ROWS", 3, []); -Clazz_defineEnumConstant (c$, "INSERT_COLS", 4, []); -Clazz_defineEnumConstant (c$, "ON_OR_INSERT", 5, []); -Clazz_defineEnumConstant (c$, "ON_OR_INSERT_ROWS", 6, []); -Clazz_defineEnumConstant (c$, "ON_OR_INSERT_COLS", 7, []); -}); -Clazz_declarePackage ("java.awt.font"); -Clazz_load (null, "java.awt.font.FontRenderContext", ["java.awt.RenderingHints", "java.awt.geom.AffineTransform"], function () { -c$ = Clazz_decorateAsClass (function () { -this.tx = null; -this.aaHintValue = null; -this.fmHintValue = null; -this.defaulting = false; -Clazz_instantialize (this, arguments); -}, java.awt.font, "FontRenderContext"); -Clazz_makeConstructor (c$, -function () { -this.defaulting = true; -}); -Clazz_makeConstructor (c$, -function (tx, isAntiAliased, usesFractionalMetrics) { -if (tx != null && !tx.isIdentity ()) { -this.tx = new java.awt.geom.AffineTransform (tx); -}}, "java.awt.geom.AffineTransform,~B,~B"); -Clazz_makeConstructor (c$, -function (tx, aaHint, fmHint) { -if (tx != null && !tx.isIdentity ()) { -this.tx = new java.awt.geom.AffineTransform (tx); -}this.aaHintValue = aaHint; -this.fmHintValue = fmHint; -}, "java.awt.geom.AffineTransform,~O,~O"); -Clazz_defineMethod (c$, "isTransformed", -function () { -if (!this.defaulting) { -return this.tx != null; -} else { -return !this.getTransform ().isIdentity (); -}}); -Clazz_defineMethod (c$, "getTransformType", -function () { -if (!this.defaulting) { -if (this.tx == null) { -return 0; -} else { -return this.tx.getType (); -}} else { -return this.getTransform ().getType (); -}}); -Clazz_defineMethod (c$, "getTransform", -function () { -return (this.tx == null) ? new java.awt.geom.AffineTransform () : new java.awt.geom.AffineTransform (this.tx); -}); -Clazz_defineMethod (c$, "isAntiAliased", -function () { -return !(this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF || this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); -}); -Clazz_defineMethod (c$, "usesFractionalMetrics", -function () { -return !(this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF || this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT); -}); -Clazz_defineMethod (c$, "getAntiAliasingHint", -function () { -if (this.defaulting) { -if (this.isAntiAliased ()) { -return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON; -} else { -return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF; -}}return this.aaHintValue; -}); -Clazz_defineMethod (c$, "getFractionalMetricsHint", -function () { -if (this.defaulting) { -if (this.usesFractionalMetrics ()) { -return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON; -} else { -return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF; -}}return this.fmHintValue; -}); -Clazz_defineMethod (c$, "equals", -function (obj) { -try { -return this.equals (obj); -} catch (e) { -if (Clazz_exceptionOf (e, ClassCastException)) { -return false; -} else { -throw e; -} -} -}, "~O"); -Clazz_defineMethod (c$, "equals", -function (rhs) { -if (this === rhs) { -return true; -}if (rhs == null) { -return false; -}if (!rhs.defaulting && !this.defaulting) { -if (rhs.aaHintValue === this.aaHintValue && rhs.fmHintValue === this.fmHintValue) { -return this.tx == null ? rhs.tx == null : this.tx.equals (rhs.tx); -}return false; -} else { -return rhs.getAntiAliasingHint () === this.getAntiAliasingHint () && rhs.getFractionalMetricsHint () === this.getFractionalMetricsHint () && rhs.getTransform ().equals (this.getTransform ()); -}}, "java.awt.font.FontRenderContext"); -Clazz_defineMethod (c$, "hashCode", -function () { -var hash = this.tx == null ? 0 : this.tx.hashCode (); -if (this.defaulting) { -hash += this.getAntiAliasingHint ().hashCode (); -hash += this.getFractionalMetricsHint ().hashCode (); -} else { -hash += this.aaHintValue.hashCode (); -hash += this.fmHintValue.hashCode (); -}return hash; -}); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.AWTEvent"], "java.awt.event.InputMethodEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.when = 0; -this.text = null; -this.committedCharacterCount = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "InputMethodEvent", java.awt.AWTEvent); -Clazz_defineMethod (c$, "getText", -function () { -return this.text; -}); -Clazz_defineMethod (c$, "getCommittedCharacterCount", -function () { -return this.committedCharacterCount; -}); -Clazz_defineMethod (c$, "getWhen", -function () { -return this.when; -}); -Clazz_defineStatics (c$, -"INPUT_METHOD_FIRST", 1100, -"INPUT_METHOD_TEXT_CHANGED", 1100, -"CARET_POSITION_CHANGED", 1101, -"INPUT_METHOD_LAST", 1101); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.event.ComponentAdapter", "javax.swing.JComponent"], "javax.swing.JViewport", ["java.lang.IllegalArgumentException", "java.applet.Applet", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle", "$.Window", "javax.swing.CellRendererPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager", "$.ViewportLayout", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.isViewSizeSet = false; -this.lastPaintPosition = null; -this.backingStore = false; -this.backingStoreImage = null; -this.scrollUnderway = false; -this.viewListener = null; -this.changeEvent = null; -this.scrollMode = 1; -this.repaintAll = false; -this.waitingForRepaint = false; -this.inBlitPaint = false; -this.hasHadValidView = false; -if (!Clazz_isClassDefined ("javax.swing.JViewport.ViewListener")) { -javax.swing.JViewport.$JViewport$ViewListener$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "JViewport", javax.swing.JComponent); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JViewport); -this.setLayout (this.createLayoutManager ()); -this.setOpaque (true); -this.updateUI (); -this.setInheritsPopupMenu (true); -}); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "ViewportUI"; -}); -Clazz_overrideMethod (c$, "addImpl", -function (child, constraints, index) { -this.setView (child); -return child; -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "remove", -function (child) { -child.removeComponentListener (this.viewListener); -this.removeChild (child); -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "scrollRectToVisible", -function (contentRect) { -var view = this.getView (); -if (view == null) { -return; -} else { -if (!view.isValid ()) { -this.validateView (); -}var dx = 0; -var dy = 0; -dx = this.positionAdjustment (this.getWidth (), contentRect.width, contentRect.x); -dy = this.positionAdjustment (this.getHeight (), contentRect.height, contentRect.y); -if (dx != 0 || dy != 0) { -var viewPosition = this.getViewPosition (); -var viewSize = view.getSize (); -var startX = viewPosition.x; -var startY = viewPosition.y; -var extent = this.getExtentSize (); -viewPosition.x -= dx; -viewPosition.y -= dy; -if (view.isValid ()) { -if (this.getParent ().getComponentOrientation ().isLeftToRight ()) { -if (viewPosition.x + extent.width > viewSize.width) { -viewPosition.x = Math.max (0, viewSize.width - extent.width); -} else if (viewPosition.x < 0) { -viewPosition.x = 0; -}} else { -if (extent.width > viewSize.width) { -viewPosition.x = viewSize.width - extent.width; -} else { -viewPosition.x = Math.max (0, Math.min (viewSize.width - extent.width, viewPosition.x)); -}}if (viewPosition.y + extent.height > viewSize.height) { -viewPosition.y = Math.max (0, viewSize.height - extent.height); -} else if (viewPosition.y < 0) { -viewPosition.y = 0; -}}if (viewPosition.x != startX || viewPosition.y != startY) { -this.setViewPosition (viewPosition); -this.scrollUnderway = false; -}}}}, "java.awt.Rectangle"); -Clazz_defineMethod (c$, "validateView", - function () { -var validateRoot = null; -for (var c = this; c != null; c = c.getParent ()) { -if ((Clazz_instanceOf (c, javax.swing.CellRendererPane)) || !c.isLightweight ()) { -return; -}if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) { -validateRoot = c; -break; -}} -if (validateRoot == null) { -return; -}var root = null; -for (var c = validateRoot; c != null; c = c.getParent ()) { -if (!c.isLightweight ()) { -return; -}if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) { -root = c; -break; -}} -if (root == null) { -return; -}validateRoot.validate (); -var rm = javax.swing.RepaintManager.currentManager (this); -if (rm != null) { -rm.removeInvalidComponent (validateRoot); -}}); -Clazz_defineMethod (c$, "positionAdjustment", - function (parentWidth, childWidth, childAt) { -if (childAt >= 0 && childWidth + childAt <= parentWidth) { -return 0; -}if (childAt <= 0 && childWidth + childAt >= parentWidth) { -return 0; -}if (childAt > 0 && childWidth <= parentWidth) { -return -childAt + parentWidth - childWidth; -}if (childAt >= 0 && childWidth >= parentWidth) { -return -childAt; -}if (childAt <= 0 && childWidth <= parentWidth) { -return -childAt; -}if (childAt < 0 && childWidth >= parentWidth) { -return -childAt + parentWidth - childWidth; -}return 0; -}, "~N,~N,~N"); -Clazz_overrideMethod (c$, "setBorder", -function (border) { -if (border != null) { -throw new IllegalArgumentException ("JViewport.setBorder() not supported"); -}}, "javax.swing.border.Border"); -Clazz_defineMethod (c$, "getInsets", -function () { -return new java.awt.Insets (0, 0, 0, 0); -}); -Clazz_defineMethod (c$, "getInsets", -function (insets) { -insets.left = insets.top = insets.right = insets.bottom = 0; -return insets; -}, "java.awt.Insets"); -Clazz_defineMethod (c$, "getBackingStoreGraphics", - function (g) { -var bsg = this.backingStoreImage.getGraphics (); -bsg.setColor (g.getColor ()); -bsg.setFont (g.getFont ()); -bsg.setClip (g.getClipBounds ()); -return bsg; -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintViaBackingStore", - function (g) { -var bsg = this.getBackingStoreGraphics (g); -try { -Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]); -g.drawImage (this.backingStoreImage, 0, 0, this); -} finally { -bsg.dispose (); -} -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "paintViaBackingStore", - function (g, oClip) { -var bsg = this.getBackingStoreGraphics (g); -try { -Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]); -g.setClip (oClip); -g.drawImage (this.backingStoreImage, 0, 0, this); -} finally { -bsg.dispose (); -} -}, "java.awt.Graphics,java.awt.Rectangle"); -Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", -function () { -return false; -}); -Clazz_overrideMethod (c$, "isPaintingOrigin", -function () { -if (this.scrollMode == 2) { -return true; -}return false; -}); -Clazz_defineMethod (c$, "getViewLocation", - function () { -var view = this.getView (); -if (view != null) { -return view.getLocation (); -} else { -return new java.awt.Point (0, 0); -}}); -Clazz_defineMethod (c$, "paint", -function (g) { -var width = this.getWidth (); -var height = this.getHeight (); -if ((width <= 0) || (height <= 0)) { -return; -}if (this.inBlitPaint) { -Clazz_superCall (this, javax.swing.JViewport, "paint", [g]); -return; -}if (this.repaintAll) { -this.repaintAll = false; -var clipB = g.getClipBounds (); -} else if (this.waitingForRepaint) { -var clipB = g.getClipBounds (); -if (clipB.width >= this.getWidth () && clipB.height >= this.getHeight ()) { -this.waitingForRepaint = false; -}}if (!this.backingStore || this.isBlitting () || this.getView () == null) { -Clazz_superCall (this, javax.swing.JViewport, "paint", [g]); -this.lastPaintPosition = this.getViewLocation (); -return; -}var viewBounds = this.getView ().getBounds (); -if (!this.isOpaque ()) { -g.clipRect (0, 0, viewBounds.width, viewBounds.height); -}if (this.backingStoreImage == null) { -this.backingStoreImage = this.createImage (width, height); -var clip = g.getClipBounds (); -if (clip.width != width || clip.height != height) { -if (!this.isOpaque ()) { -g.setClip (0, 0, Math.min (viewBounds.width, width), Math.min (viewBounds.height, height)); -} else { -g.setClip (0, 0, width, height); -}this.paintViaBackingStore (g, clip); -} else { -this.paintViaBackingStore (g); -}} else { -if (!this.scrollUnderway || this.lastPaintPosition.equals (this.getViewLocation ())) { -this.paintViaBackingStore (g); -} else { -var blitFrom = new java.awt.Point (); -var blitTo = new java.awt.Point (); -var blitSize = new java.awt.Dimension (); -var blitPaint = new java.awt.Rectangle (); -var newLocation = this.getViewLocation (); -var dx = newLocation.x - this.lastPaintPosition.x; -var dy = newLocation.y - this.lastPaintPosition.y; -var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint); -if (!canBlit) { -this.paintViaBackingStore (g); -} else { -var bdx = blitTo.x - blitFrom.x; -var bdy = blitTo.y - blitFrom.y; -var clip = g.getClipBounds (); -g.setClip (0, 0, width, height); -var bsg = this.getBackingStoreGraphics (g); -try { -bsg.copyArea (blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy); -g.setClip (clip.x, clip.y, clip.width, clip.height); -var r = viewBounds.intersection (blitPaint); -bsg.setClip (r); -Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]); -g.drawImage (this.backingStoreImage, 0, 0, this); -} finally { -bsg.dispose (); -} -}}}this.lastPaintPosition = this.getViewLocation (); -this.scrollUnderway = false; -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "reshape", -function (x, y, w, h) { -var sizeChanged = (this.getWidth () != w) || (this.getHeight () != h); -if (sizeChanged) { -this.backingStoreImage = null; -}Clazz_superCall (this, javax.swing.JViewport, "reshape", [x, y, w, h]); -if (sizeChanged) { -this.fireStateChanged (); -}}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setScrollMode", -function (mode) { -this.scrollMode = mode; -if (mode == 2) { -this.backingStore = true; -} else { -this.backingStore = false; -}}, "~N"); -Clazz_defineMethod (c$, "getScrollMode", -function () { -return this.scrollMode; -}); -Clazz_defineMethod (c$, "isBackingStoreEnabled", -function () { -return this.scrollMode == 2; -}); -Clazz_defineMethod (c$, "setBackingStoreEnabled", -function (enabled) { -if (enabled) { -this.setScrollMode (2); -} else { -this.setScrollMode (1); -}}, "~B"); -Clazz_defineMethod (c$, "isBlitting", - function () { -var view = this.getView (); -return (this.scrollMode == 1) && (Clazz_instanceOf (view, javax.swing.JComponent)) && (view).isOpaque (); -}); -Clazz_defineMethod (c$, "getView", -function () { -return (this.getComponentCount () > 0) ? this.getComponent (0) : null; -}); -Clazz_defineMethod (c$, "setView", -function (view) { -var n = this.getComponentCount (); -for (var i = n - 1; i >= 0; i--) { -this.remove (this.getComponent (i)); -} -this.isViewSizeSet = false; -if (view != null) { -this.addImplSAEM (view, null, -1); -this.viewListener = this.createViewListener (); -view.addComponentListener (this.viewListener); -}if (this.hasHadValidView) { -this.fireStateChanged (); -} else if (view != null) { -this.hasHadValidView = true; -}this.revalidate (); -this.repaint (); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getViewSize", -function () { -var view = this.getView (); -if (view == null) { -return new java.awt.Dimension (0, 0); -} else if (this.isViewSizeSet) { -return view.getSize (); -} else { -return view.getPreferredSize (); -}}); -Clazz_defineMethod (c$, "setViewSize", -function (newSize) { -var view = this.getView (); -if (view != null) { -var oldSize = view.getSize (); -if (!newSize.equals (oldSize)) { -this.scrollUnderway = false; -view.setSize (newSize); -this.isViewSizeSet = true; -this.fireStateChanged (); -}}}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "getViewPosition", -function () { -var view = this.getView (); -if (view != null) { -var p = view.getLocation (); -p.x = -p.x; -p.y = -p.y; -return p; -} else { -return new java.awt.Point (0, 0); -}}); -Clazz_defineMethod (c$, "setViewPosition", -function (p) { -var view = this.getView (); -if (view == null) { -return; -}var oldX; -var oldY; -var x = p.x; -var y = p.y; -if (Clazz_instanceOf (view, javax.swing.JComponent)) { -var c = view; -oldX = c.getX (); -oldY = c.getY (); -} else { -var r = view.getBounds (); -oldX = r.x; -oldY = r.y; -}var newX = -x; -var newY = -y; -if ((oldX != newX) || (oldY != newY)) { -if (!this.waitingForRepaint && this.isBlitting () && this.canUseWindowBlitter ()) { -var rm = javax.swing.RepaintManager.currentManager (this); -var jview = view; -var dirty = rm.getDirtyRegion (jview); -if (dirty == null || !dirty.contains (jview.getVisibleRect ())) { -rm.beginPaint (); -try { -var g = javax.swing.JComponent.safelyGetGraphics (this, javax.swing.SwingUtilities.getRoot (this)); -this.flushViewDirtyRegion (g, dirty); -view.setLocation (newX, newY); -g.setClip (0, 0, this.getWidth (), Math.min (this.getHeight (), jview.getHeight ())); -this.repaintAll = (this.windowBlitPaint (g) && this.needsRepaintAfterBlit ()); -g.dispose (); -rm.markCompletelyClean (this.getParent ()); -rm.markCompletelyClean (this); -rm.markCompletelyClean (jview); -} finally { -rm.endPaint (); -} -} else { -view.setLocation (newX, newY); -this.repaintAll = false; -}} else { -this.scrollUnderway = true; -view.setLocation (newX, newY); -this.repaintAll = false; -}this.fireStateChanged (); -}}, "java.awt.Point"); -Clazz_defineMethod (c$, "getViewRect", -function () { -return new java.awt.Rectangle (this.getViewPosition (), this.getExtentSize ()); -}); -Clazz_defineMethod (c$, "computeBlit", -function (dx, dy, blitFrom, blitTo, blitSize, blitPaint) { -var dxAbs = Math.abs (dx); -var dyAbs = Math.abs (dy); -var extentSize = this.getExtentSize (); -if ((dx == 0) && (dy != 0) && (dyAbs < extentSize.height)) { -if (dy < 0) { -blitFrom.y = -dy; -blitTo.y = 0; -blitPaint.y = extentSize.height + dy; -} else { -blitFrom.y = 0; -blitTo.y = dy; -blitPaint.y = 0; -}blitPaint.x = blitFrom.x = blitTo.x = 0; -blitSize.width = extentSize.width; -blitSize.height = extentSize.height - dyAbs; -blitPaint.width = extentSize.width; -blitPaint.height = dyAbs; -return true; -} else if ((dy == 0) && (dx != 0) && (dxAbs < extentSize.width)) { -if (dx < 0) { -blitFrom.x = -dx; -blitTo.x = 0; -blitPaint.x = extentSize.width + dx; -} else { -blitFrom.x = 0; -blitTo.x = dx; -blitPaint.x = 0; -}blitPaint.y = blitFrom.y = blitTo.y = 0; -blitSize.width = extentSize.width - dxAbs; -blitSize.height = extentSize.height; -blitPaint.width = dxAbs; -blitPaint.height = extentSize.height; -return true; -} else { -return false; -}}, "~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle"); -Clazz_defineMethod (c$, "getExtentSize", -function () { -return this.getSize (); -}); -Clazz_defineMethod (c$, "toViewCoordinates", -function (size) { -return new java.awt.Dimension (size); -}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "toViewCoordinates", -function (p) { -return new java.awt.Point (p); -}, "java.awt.Point"); -Clazz_defineMethod (c$, "setExtentSize", -function (newExtent) { -var oldExtent = this.getExtentSize (); -if (!newExtent.equals (oldExtent)) { -this.setSize (newExtent); -this.fireStateChanged (); -}}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "createViewListener", -function () { -return Clazz_innerTypeInstance (javax.swing.JViewport.ViewListener, this, null); -}); -Clazz_defineMethod (c$, "createLayoutManager", -function () { -return javax.swing.ViewportLayout.SHARED_INSTANCE; -}); -Clazz_defineMethod (c$, "addChangeListener", -function (l) { -this.listenerList.add (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "removeChangeListener", -function (l) { -this.listenerList.remove (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "getChangeListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.ChangeListener); -}); -Clazz_defineMethod (c$, "fireStateChanged", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.ChangeListener) { -if (this.changeEvent == null) { -this.changeEvent = new javax.swing.event.ChangeEvent (this); -}(listeners[i + 1]).stateChanged (this.changeEvent); -}} -}); -Clazz_defineMethod (c$, "repaint", -function (tm, x, y, w, h) { -var parent = this.getParent (); -if (parent != null) parent.repaint (tm, x + this.getX (), y + this.getY (), w, h); - else Clazz_superCall (this, javax.swing.JViewport, "repaint", [tm, x, y, w, h]); -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "paramString", -function () { -var isViewSizeSetString = (this.isViewSizeSet ? "true" : "false"); -var lastPaintPositionString = (this.lastPaintPosition != null ? this.lastPaintPosition.toString () : ""); -var scrollUnderwayString = (this.scrollUnderway ? "true" : "false"); -return Clazz_superCall (this, javax.swing.JViewport, "paramString", []) + ",isViewSizeSet=" + isViewSizeSetString + ",lastPaintPosition=" + lastPaintPositionString + ",scrollUnderway=" + scrollUnderwayString; -}); -Clazz_defineMethod (c$, "firePropertyChangeObject", -function (propertyName, oldValue, newValue) { -Clazz_superCall (this, javax.swing.JViewport, "firePropertyChangeObject", [propertyName, oldValue, newValue]); -if (propertyName.equals (javax.swing.JViewport.EnableWindowBlit)) { -if (newValue != null) { -this.setScrollMode (1); -} else { -this.setScrollMode (0); -}}}, "~S,~O,~O"); -Clazz_defineMethod (c$, "needsRepaintAfterBlit", - function () { -var heavyParent = this.getParent (); -while (heavyParent != null && heavyParent.isLightweight ()) { -heavyParent = heavyParent.getParent (); -} -if (heavyParent != null) { -}return true; -}); -Clazz_defineMethod (c$, "flushViewDirtyRegion", - function (g, dirty) { -var view = this.getView (); -if (dirty != null && dirty.width > 0 && dirty.height > 0) { -dirty.x += view.getX (); -dirty.y += view.getY (); -var clip = g.getClipBounds (); -if (clip == null) { -g.setClip (0, 0, this.getWidth (), this.getHeight ()); -}g.clipRect (dirty.x, dirty.y, dirty.width, dirty.height); -clip = g.getClipBounds (); -if (clip.width > 0 && clip.height > 0) { -this.paintView (g); -}}}, "java.awt.Graphics,java.awt.Rectangle"); -Clazz_defineMethod (c$, "windowBlitPaint", - function (g) { -var width = this.getWidth (); -var height = this.getHeight (); -if ((width == 0) || (height == 0)) { -return false; -}var retValue; -var rm = javax.swing.RepaintManager.currentManager (this); -var view = this.getView (); -if (this.lastPaintPosition == null || this.lastPaintPosition.equals (this.getViewLocation ())) { -this.paintView (g); -retValue = false; -} else { -var blitFrom = new java.awt.Point (); -var blitTo = new java.awt.Point (); -var blitSize = new java.awt.Dimension (); -var blitPaint = new java.awt.Rectangle (); -var newLocation = this.getViewLocation (); -var dx = newLocation.x - this.lastPaintPosition.x; -var dy = newLocation.y - this.lastPaintPosition.y; -var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint); -if (!canBlit) { -this.paintView (g); -retValue = false; -} else { -var r = view.getBounds ().intersection (blitPaint); -r.x -= view.getX (); -r.y -= view.getY (); -this.blitDoubleBuffered (view, g, r.x, r.y, r.width, r.height, blitFrom.x, blitFrom.y, blitTo.x, blitTo.y, blitSize.width, blitSize.height); -retValue = true; -}}this.lastPaintPosition = this.getViewLocation (); -return retValue; -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "blitDoubleBuffered", - function (view, g, clipX, clipY, clipW, clipH, blitFromX, blitFromY, blitToX, blitToY, blitW, blitH) { -var rm = javax.swing.RepaintManager.currentManager (this); -var bdx = blitToX - blitFromX; -var bdy = blitToY - blitFromY; -var x = view.getX (); -var y = view.getY (); -g.translate (x, y); -g.setClip (clipX, clipY, clipW, clipH); -view.paintForceDoubleBuffered (g); -g.translate (-x, -y); -}, "javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "paintView", - function (g) { -var clip = g.getClipBounds (); -var view = this.getView (); -if (view.getWidth () >= this.getWidth ()) { -var x = view.getX (); -var y = view.getY (); -g.translate (x, y); -g.setClip (clip.x - x, clip.y - y, clip.width, clip.height); -view.paintForceDoubleBuffered (g); -g.translate (-x, -y); -g.setClip (clip.x, clip.y, clip.width, clip.height); -} else { -try { -this.inBlitPaint = true; -this.paintForceDoubleBuffered (g); -} finally { -this.inBlitPaint = false; -} -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "canUseWindowBlitter", - function () { -if (!this.isShowing () || (!(Clazz_instanceOf (this.getParent (), javax.swing.JComponent)) && !(Clazz_instanceOf (this.getView (), javax.swing.JComponent)))) { -return false; -}if (this.isPainting ()) { -return false; -}var dirtyRegion = javax.swing.RepaintManager.currentManager (this).getDirtyRegion (this.getParent ()); -if (dirtyRegion != null && dirtyRegion.width > 0 && dirtyRegion.height > 0) { -return false; -}var clip = new java.awt.Rectangle (0, 0, this.getWidth (), this.getHeight ()); -var oldClip = new java.awt.Rectangle (); -var tmp2 = null; -var parent; -var lastParent = null; -var x; -var y; -var w; -var h; -for (parent = this; parent != null && javax.swing.JComponent.isLightweightComponent (parent); parent = parent.getParent ()) { -x = parent.getX (); -y = parent.getY (); -w = parent.getWidth (); -h = parent.getHeight (); -oldClip.setBounds (clip); -javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, clip); -if (!clip.equals (oldClip)) return false; -if (lastParent != null && Clazz_instanceOf (parent, javax.swing.JComponent) && !(parent).isOptimizedDrawingEnabled ()) { -var comps = parent.getComponents (); -var index = 0; -for (var i = comps.length - 1; i >= 0; i--) { -if (comps[i] === lastParent) { -index = i - 1; -break; -}} -while (index >= 0) { -tmp2 = comps[index].getBounds (tmp2); -if (tmp2.intersects (clip)) return false; -index--; -} -}clip.x += x; -clip.y += y; -lastParent = parent; -} -if (parent == null) { -return false; -}return true; -}); -c$.$JViewport$ViewListener$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -Clazz_instantialize (this, arguments); -}, javax.swing.JViewport, "ViewListener", java.awt.event.ComponentAdapter); -Clazz_overrideMethod (c$, "componentResized", -function (a) { -this.b$["javax.swing.JViewport"].fireStateChanged (); -this.b$["javax.swing.JViewport"].revalidate (); -}, "java.awt.event.ComponentEvent"); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"$uiClassID", "ViewportUI", -"EnableWindowBlit", "EnableWindowBlit", -"BLIT_SCROLL_MODE", 1, -"BACKINGSTORE_SCROLL_MODE", 2, -"SIMPLE_SCROLL_MODE", 0); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.ComponentListener"], "java.awt.event.ComponentAdapter", null, function () { -c$ = Clazz_declareType (java.awt.event, "ComponentAdapter", null, java.awt.event.ComponentListener); -Clazz_overrideMethod (c$, "componentResized", -function (e) { -}, "java.awt.event.ComponentEvent"); -Clazz_overrideMethod (c$, "componentMoved", -function (e) { -}, "java.awt.event.ComponentEvent"); -Clazz_overrideMethod (c$, "componentShown", -function (e) { -}, "java.awt.event.ComponentEvent"); -Clazz_overrideMethod (c$, "componentHidden", -function (e) { -}, "java.awt.event.ComponentEvent"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () { -c$ = Clazz_declareType (javax.swing, "CellRendererPane", java.awt.Container); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.CellRendererPane); -this.setLayout (null); -this.setVisible (false); -}); -Clazz_overrideMethod (c$, "invalidate", -function () { -}); -Clazz_overrideMethod (c$, "paint", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "update", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "addImpl", -function (x, constraints, index) { -if (x.getParent () === this) { -return null; -} else { -return this.addImplSAEM (x, constraints, index); -}}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "paintComponent", -function (g, c, p, x, y, w, h, shouldValidate) { -if (c == null) { -if (p != null) { -var oldColor = g.getColor (); -g.setColor (p.getBackground ()); -g.fillRect (x, y, w, h); -g.setColor (oldColor); -}return; -}if (c.getParent () !== this) { -this.add (c); -}c.setBounds (x, y, w, h); -if (shouldValidate) { -c.validate (); -}var cg = g.create4 (x, y, w, h); -try { -c.paint (cg); -} finally { -cg.dispose (); -} -c.setBounds (-w, -h, 0, 0); -}, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B"); -Clazz_defineMethod (c$, "paintComponent", -function (g, c, p, x, y, w, h) { -this.paintComponent (g, c, p, x, y, w, h, false); -}, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "paintComponent", -function (g, c, p, r) { -this.paintComponent (g, c, p, r.x, r.y, r.width, r.height); -}, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle"); -}); -Clazz_declarePackage ("jssun.awt"); -c$ = Clazz_declareType (jssun.awt, "AWTAccessor"); -c$.setWindowAccessor = Clazz_defineMethod (c$, "setWindowAccessor", -function (wa) { -jssun.awt.AWTAccessor.windowAccessor = wa; -}, "jssun.awt.AWTAccessor.WindowAccessor"); -c$.getWindowAccessor = Clazz_defineMethod (c$, "getWindowAccessor", -function () { -return jssun.awt.AWTAccessor.windowAccessor; -}); -c$.setComponentAccessor = Clazz_defineMethod (c$, "setComponentAccessor", -function (ca) { -jssun.awt.AWTAccessor.componentAccessor = ca; -}, "jssun.awt.AWTAccessor.ComponentAccessor"); -c$.getComponentAccessor = Clazz_defineMethod (c$, "getComponentAccessor", -function () { -return jssun.awt.AWTAccessor.componentAccessor; -}); -c$.setAWTEventAccessor = Clazz_defineMethod (c$, "setAWTEventAccessor", -function (aea) { -jssun.awt.AWTAccessor.awtEventAccessor = aea; -}, "jssun.awt.AWTAccessor.AWTEventAccessor"); -c$.getAWTEventAccessor = Clazz_defineMethod (c$, "getAWTEventAccessor", -function () { -return jssun.awt.AWTAccessor.awtEventAccessor; -}); -c$.setEventQueueAccessor = Clazz_defineMethod (c$, "setEventQueueAccessor", -function (eqa) { -jssun.awt.AWTAccessor.eventQueueAccessor = eqa; -}, "jssun.awt.AWTAccessor.EventQueueAccessor"); -c$.getEventQueueAccessor = Clazz_defineMethod (c$, "getEventQueueAccessor", -function () { -return jssun.awt.AWTAccessor.eventQueueAccessor; -}); -Clazz_declareInterface (jssun.awt.AWTAccessor, "WindowAccessor"); -Clazz_declareInterface (jssun.awt.AWTAccessor, "ComponentAccessor"); -Clazz_declareInterface (jssun.awt.AWTAccessor, "KeyboardFocusManagerAccessor"); -Clazz_declareInterface (jssun.awt.AWTAccessor, "AWTEventAccessor"); -Clazz_declareInterface (jssun.awt.AWTAccessor, "EventQueueAccessor"); -Clazz_declareInterface (jssun.awt.AWTAccessor, "CursorAccessor"); -Clazz_declareInterface (jssun.awt.AWTAccessor, "ClientPropertyKeyAccessor"); -Clazz_defineStatics (c$, -"componentAccessor", null, -"windowAccessor", null, -"awtEventAccessor", null, -"eventQueueAccessor", null); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.LayoutManager"], "javax.swing.ViewportLayout", ["java.awt.Dimension", "javax.swing.Scrollable"], function () { -c$ = Clazz_declareType (javax.swing, "ViewportLayout", null, java.awt.LayoutManager); -Clazz_overrideMethod (c$, "addLayoutComponent", -function (name, c) { -}, "~S,java.awt.Component"); -Clazz_overrideMethod (c$, "removeLayoutComponent", -function (c) { -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "preferredLayoutSize", -function (parent) { -var view = (parent).getView (); -if (view == null) { -return new java.awt.Dimension (0, 0); -} else if (Clazz_instanceOf (view, javax.swing.Scrollable)) { -return (view).getPreferredScrollableViewportSize (); -} else { -return view.getPreferredSize (); -}}, "java.awt.Container"); -Clazz_overrideMethod (c$, "minimumLayoutSize", -function (parent) { -return new java.awt.Dimension (4, 4); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "layoutContainer", -function (parent) { -var vp = parent; -var view = vp.getView (); -var scrollableView = null; -if (view == null) { -return; -} else if (Clazz_instanceOf (view, javax.swing.Scrollable)) { -scrollableView = view; -}var insets = vp.getInsets (); -var viewPrefSize = view.getPreferredSize (); -var vpSize = vp.getSize (); -var extentSize = vp.toViewCoordinates (vpSize); -var viewSize = new java.awt.Dimension (viewPrefSize); -if (scrollableView != null) { -if (scrollableView.getScrollableTracksViewportWidth ()) { -viewSize.width = vpSize.width; -}if (scrollableView.getScrollableTracksViewportHeight ()) { -viewSize.height = vpSize.height; -}}var viewPosition = vp.getViewPosition (); -if (scrollableView == null || vp.getParent () == null || vp.getParent ().getComponentOrientation ().isLeftToRight ()) { -if ((viewPosition.x + extentSize.width) > viewSize.width) { -viewPosition.x = Math.max (0, viewSize.width - extentSize.width); -}} else { -if (extentSize.width > viewSize.width) { -viewPosition.x = viewSize.width - extentSize.width; -} else { -viewPosition.x = Math.max (0, Math.min (viewSize.width - extentSize.width, viewPosition.x)); -}}if ((viewPosition.y + extentSize.height) > viewSize.height) { -viewPosition.y = Math.max (0, viewSize.height - extentSize.height); -}if (scrollableView == null) { -if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width)) { -viewSize.width = vpSize.width; -}if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height)) { -viewSize.height = vpSize.height; -}}vp.setViewPosition (viewPosition); -vp.setViewSize (viewSize); -}, "java.awt.Container"); -c$.SHARED_INSTANCE = c$.prototype.SHARED_INSTANCE = new javax.swing.ViewportLayout (); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.CaretListener", null, function () { -Clazz_declareInterface (javax.swing.event, "CaretListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.BoundedRangeModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultBoundedRangeModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.changeEvent = null; -this.listenerList = null; -this.value = 0; -this.extent = 0; -this.min = 0; -this.max = 100; -this.isAdjusting = false; -Clazz_instantialize (this, arguments); -}, javax.swing, "DefaultBoundedRangeModel", null, javax.swing.BoundedRangeModel); -Clazz_prepareFields (c$, function () { -this.listenerList = new javax.swing.event.EventListenerList (); -}); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_makeConstructor (c$, -function (value, extent, min, max) { -if ((max >= min) && (value >= min) && ((value + extent) >= value) && ((value + extent) <= max)) { -this.value = value; -this.extent = extent; -this.min = min; -this.max = max; -} else { -throw new IllegalArgumentException ("invalid range properties"); -}}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getValue", -function () { -return this.value; -}); -Clazz_overrideMethod (c$, "getExtent", -function () { -return this.extent; -}); -Clazz_overrideMethod (c$, "getMinimum", -function () { -return this.min; -}); -Clazz_overrideMethod (c$, "getMaximum", -function () { -return this.max; -}); -Clazz_overrideMethod (c$, "setValue", -function (n) { -n = Math.min (n, 2147483647 - this.extent); -var newValue = Math.max (n, this.min); -if (newValue + this.extent > this.max) { -newValue = this.max - this.extent; -}this.setRangeProperties (newValue, this.extent, this.min, this.max, this.isAdjusting); -}, "~N"); -Clazz_overrideMethod (c$, "setExtent", -function (n) { -var newExtent = Math.max (0, n); -if (this.value + newExtent > this.max) { -newExtent = this.max - this.value; -}this.setRangeProperties (this.value, newExtent, this.min, this.max, this.isAdjusting); -}, "~N"); -Clazz_overrideMethod (c$, "setMinimum", -function (n) { -var newMax = Math.max (n, this.max); -var newValue = Math.max (n, this.value); -var newExtent = Math.min (newMax - newValue, this.extent); -this.setRangeProperties (newValue, newExtent, n, newMax, this.isAdjusting); -}, "~N"); -Clazz_overrideMethod (c$, "setMaximum", -function (n) { -var newMin = Math.min (n, this.min); -var newExtent = Math.min (n - newMin, this.extent); -var newValue = Math.min (n - newExtent, this.value); -this.setRangeProperties (newValue, newExtent, newMin, n, this.isAdjusting); -}, "~N"); -Clazz_overrideMethod (c$, "setValueIsAdjusting", -function (b) { -this.setRangeProperties (this.value, this.extent, this.min, this.max, b); -}, "~B"); -Clazz_overrideMethod (c$, "getValueIsAdjusting", -function () { -return this.isAdjusting; -}); -Clazz_overrideMethod (c$, "setRangeProperties", -function (newValue, newExtent, newMin, newMax, adjusting) { -if (newMin > newMax) { -newMin = newMax; -}if (newValue > newMax) { -newMax = newValue; -}if (newValue < newMin) { -newMin = newValue; -}if ((newExtent + newValue) > newMax) { -newExtent = newMax - newValue; -}if (newExtent < 0) { -newExtent = 0; -}var isChange = (newValue != this.value) || (newExtent != this.extent) || (newMin != this.min) || (newMax != this.max) || (adjusting != this.isAdjusting); -if (isChange) { -this.value = newValue; -this.extent = newExtent; -this.min = newMin; -this.max = newMax; -this.isAdjusting = adjusting; -this.fireStateChanged (); -}}, "~N,~N,~N,~N,~B"); -Clazz_overrideMethod (c$, "addChangeListener", -function (l) { -this.listenerList.add (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_overrideMethod (c$, "removeChangeListener", -function (l) { -this.listenerList.remove (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "getChangeListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.ChangeListener); -}); -Clazz_defineMethod (c$, "fireStateChanged", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.ChangeListener) { -if (this.changeEvent == null) { -this.changeEvent = new javax.swing.event.ChangeEvent (this); -}(listeners[i + 1]).stateChanged (this.changeEvent); -}} -}); -Clazz_overrideMethod (c$, "toString", -function () { -var modelString = "value=" + this.getValue () + ", " + "extent=" + this.getExtent () + ", " + "min=" + this.getMinimum () + ", " + "max=" + this.getMaximum () + ", " + "adj=" + this.getValueIsAdjusting (); -return this.getClass ().getName () + "[" + modelString + "]"; -}); -Clazz_defineMethod (c$, "getListeners", -function (listenerType) { -return this.listenerList.getListeners (listenerType); -}, "Class"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_declareInterface (javax.swing, "BoundedRangeModel"); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.AWTKeyStroke"], "javax.swing.KeyStroke", null, function () { -c$ = Clazz_declareType (javax.swing, "KeyStroke", java.awt.AWTKeyStroke); -c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", -function (keyChar) { -{ -java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); -return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar); -}}, "~S"); -c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", -function (keyChar, onKeyRelease) { -return new javax.swing.KeyStroke (keyChar, 0, 0, onKeyRelease); -}, "~S,~B"); -c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", -function (keyChar, modifiers) { -{ -java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); -return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar, modifiers); -}}, "Character,~N"); -c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", -function (keyCode, modifiers, onKeyRelease) { -{ -java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); -return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers, onKeyRelease); -}}, "~N,~N,~B"); -c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", -function (keyCode, modifiers) { -{ -java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); -return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers); -}}, "~N,~N"); -c$.getKeyStrokeForEvent = Clazz_defineMethod (c$, "getKeyStrokeForEvent", -function (anEvent) { -{ -java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); -return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent (anEvent); -}}, "java.awt.event.KeyEvent"); -c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", -function (s) { -if (s == null || s.length == 0) { -return null; -}{ -java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke); -try { -return java.awt.AWTKeyStroke.getAWTKeyStroke (s); -} catch (e) { -if (Clazz_exceptionOf (e, IllegalArgumentException)) { -return null; -} else { -throw e; -} -} -}}, "~S"); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (null, ["java.awt.AWTKeyStroke", "$.VKCollection"], ["java.io.ObjectStreamException", "java.lang.IllegalArgumentException", "$.StringBuilder", "java.util.Collections", "$.HashMap", "$.StringTokenizer", "java.awt.event.KeyEvent", "jssun.awt.AppContext"], function () { -c$ = Clazz_decorateAsClass (function () { -this.keyChar = '\uffff'; -this.keyCode = 0; -this.modifiers = 0; -this.onKeyRelease = false; -Clazz_instantialize (this, arguments); -}, java.awt, "AWTKeyStroke"); -c$.getAWTKeyStrokeClass = Clazz_defineMethod (c$, "getAWTKeyStrokeClass", - function () { -var clazz = jssun.awt.AppContext.getAppContext ().get (java.awt.AWTKeyStroke); -if (clazz == null) { -clazz = java.awt.AWTKeyStroke; -jssun.awt.AppContext.getAppContext ().put (java.awt.AWTKeyStroke, java.awt.AWTKeyStroke); -}return clazz; -}); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_makeConstructor (c$, -function (keyChar, keyCode, modifiers, onKeyRelease) { -this.keyChar = keyChar; -this.keyCode = keyCode; -this.modifiers = modifiers; -this.onKeyRelease = onKeyRelease; -}, "~S,~N,~N,~B"); -c$.registerSubclass = Clazz_defineMethod (c$, "registerSubclass", -function (subclass) { -}, "Class"); -c$.getCachedStroke = Clazz_defineMethod (c$, "getCachedStroke", - function (keyChar, keyCode, modifiers, onKeyRelease) { -return null; -}, "~S,~N,~N,~B"); -c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", -function (keyChar) { -return java.awt.AWTKeyStroke.getCachedStroke (keyChar, 0, 0, false); -}, "~S"); -c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", -function (keyChar, modifiers) { -if (keyChar == null) { -throw new IllegalArgumentException ("keyChar cannot be null"); -}return java.awt.AWTKeyStroke.getCachedStroke (keyChar.charValue (), 0, modifiers, false); -}, "Character,~N"); -c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", -function (keyCode, modifiers, onKeyRelease) { -return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, onKeyRelease); -}, "~N,~N,~B"); -c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", -function (keyCode, modifiers) { -return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, false); -}, "~N,~N"); -c$.getAWTKeyStrokeForEvent = Clazz_defineMethod (c$, "getAWTKeyStrokeForEvent", -function (anEvent) { -var id = anEvent.getID (); -switch (id) { -case 401: -case 402: -return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', anEvent.getKeyCode (), anEvent.getModifiers (), (id == 402)); -case 400: -return java.awt.AWTKeyStroke.getCachedStroke (anEvent.getKeyChar (), 0, anEvent.getModifiers (), false); -default: -return null; -} -}, "java.awt.event.KeyEvent"); -c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", -function (s) { -if (s == null) { -throw new IllegalArgumentException ("String cannot be null"); -}var errmsg = "String formatted incorrectly"; -var st = new java.util.StringTokenizer (s, " "); -var mask = 0; -var released = false; -var typed = false; -var pressed = false; -{ -if (java.awt.AWTKeyStroke.modifierKeywords == null) { -var uninitializedMap = new java.util.HashMap (8, 1.0); -uninitializedMap.put ("shift", Integer.$valueOf (65)); -uninitializedMap.put ("control", Integer.$valueOf (130)); -uninitializedMap.put ("ctrl", Integer.$valueOf (130)); -uninitializedMap.put ("meta", Integer.$valueOf (260)); -uninitializedMap.put ("alt", Integer.$valueOf (520)); -uninitializedMap.put ("altGraph", Integer.$valueOf (8224)); -uninitializedMap.put ("button1", Integer.$valueOf (1024)); -uninitializedMap.put ("button2", Integer.$valueOf (2048)); -uninitializedMap.put ("button3", Integer.$valueOf (4096)); -java.awt.AWTKeyStroke.modifierKeywords = java.util.Collections.synchronizedMap (uninitializedMap); -}}var count = st.countTokens (); -for (var i = 1; i <= count; i++) { -var token = st.nextToken (); -if (typed) { -if (token.length != 1 || i != count) { -throw new IllegalArgumentException ("String formatted incorrectly"); -}return java.awt.AWTKeyStroke.getCachedStroke (token.charAt (0), 0, mask, false); -}if (pressed || released || i == count) { -if (i != count) { -throw new IllegalArgumentException ("String formatted incorrectly"); -}var keyCodeName = "VK_" + token; -var keyCode = java.awt.AWTKeyStroke.getVKValue (keyCodeName); -return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, mask, released); -}if (token.equals ("released")) { -released = true; -continue; -}if (token.equals ("pressed")) { -pressed = true; -continue; -}if (token.equals ("typed")) { -typed = true; -continue; -}var tokenMask = java.awt.AWTKeyStroke.modifierKeywords.get (token); -if (tokenMask != null) { -mask |= tokenMask.intValue (); -} else { -throw new IllegalArgumentException ("String formatted incorrectly"); -}} -throw new IllegalArgumentException ("String formatted incorrectly"); -}, "~S"); -c$.getVKCollection = Clazz_defineMethod (c$, "getVKCollection", - function () { -if (java.awt.AWTKeyStroke.vks == null) { -java.awt.AWTKeyStroke.vks = new java.awt.VKCollection (); -}return java.awt.AWTKeyStroke.vks; -}); -c$.getVKValue = Clazz_defineMethod (c$, "getVKValue", - function (key) { -var vkCollect = java.awt.AWTKeyStroke.getVKCollection (); -var value = vkCollect.findCode (key); -if (value == null) { -var keyCode = 0; -var errmsg = "String formatted incorrectly"; -try { -keyCode = java.awt.event.KeyEvent.getField (key).getInt (java.awt.event.KeyEvent); -} catch (e$$) { -if (Clazz_exceptionOf (e$$, NoSuchFieldException)) { -var nsfe = e$$; -{ -throw new IllegalArgumentException ("String formatted incorrectly"); -} -} else if (Clazz_exceptionOf (e$$, IllegalAccessException)) { -var iae = e$$; -{ -throw new IllegalArgumentException ("String formatted incorrectly"); -} -} else { -throw e$$; -} -} -value = Integer.$valueOf (keyCode); -vkCollect.put (key, value); -}return value.intValue (); -}, "~S"); -Clazz_defineMethod (c$, "getKeyChar", -function () { -return this.keyChar; -}); -Clazz_defineMethod (c$, "getKeyCode", -function () { -return this.keyCode; -}); -Clazz_defineMethod (c$, "getModifiers", -function () { -return this.modifiers; -}); -Clazz_defineMethod (c$, "isOnKeyRelease", -function () { -return this.onKeyRelease; -}); -Clazz_defineMethod (c$, "getKeyEventType", -function () { -if (this.keyCode == 0) { -return 400; -} else { -return (this.onKeyRelease) ? 402 : 401; -}}); -Clazz_overrideMethod (c$, "hashCode", -function () { -return (((this.keyChar).charCodeAt (0)) + 1) * (2 * (this.keyCode + 1)) * (this.modifiers + 1) + (this.onKeyRelease ? 1 : 2); -}); -Clazz_defineMethod (c$, "equals", -function (anObject) { -if (Clazz_instanceOf (anObject, java.awt.AWTKeyStroke)) { -var ks = anObject; -return (ks.keyChar == this.keyChar && ks.keyCode == this.keyCode && ks.onKeyRelease == this.onKeyRelease && ks.modifiers == this.modifiers); -}return false; -}, "~O"); -Clazz_overrideMethod (c$, "toString", -function () { -if (this.keyCode == 0) { -return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + "typed " + this.keyChar; -} else { -return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + (this.onKeyRelease ? "released" : "pressed") + " " + java.awt.AWTKeyStroke.getVKText (this.keyCode); -}}); -c$.getModifiersText = Clazz_defineMethod (c$, "getModifiersText", -function (modifiers) { -var buf = new StringBuilder (); -if ((modifiers & 64) != 0) { -buf.append ("shift "); -}if ((modifiers & 128) != 0) { -buf.append ("ctrl "); -}if ((modifiers & 256) != 0) { -buf.append ("meta "); -}if ((modifiers & 512) != 0) { -buf.append ("alt "); -}if ((modifiers & 8192) != 0) { -buf.append ("altGraph "); -}if ((modifiers & 1024) != 0) { -buf.append ("button1 "); -}if ((modifiers & 2048) != 0) { -buf.append ("button2 "); -}if ((modifiers & 4096) != 0) { -buf.append ("button3 "); -}return buf.toString (); -}, "~N"); -c$.getVKText = Clazz_defineMethod (c$, "getVKText", -function (keyCode) { -return "UNKNOWN"; -}, "~N"); -Clazz_defineMethod (c$, "readResolve", -function () { -{ -var newClass = this.getClass (); -var awtKeyStrokeClass = java.awt.AWTKeyStroke.getAWTKeyStrokeClass (); -if (!newClass.equals (awtKeyStrokeClass)) { -java.awt.AWTKeyStroke.registerSubclass (newClass); -}return java.awt.AWTKeyStroke.getCachedStroke (this.keyChar, this.keyCode, this.modifiers, this.onKeyRelease); -}}); -Clazz_defineStatics (c$, -"modifierKeywords", null, -"vks", null); -c$ = Clazz_decorateAsClass (function () { -this.code2name = null; -this.name2code = null; -Clazz_instantialize (this, arguments); -}, java.awt, "VKCollection"); -Clazz_makeConstructor (c$, -function () { -this.code2name = new java.util.HashMap (); -this.name2code = new java.util.HashMap (); -}); -Clazz_defineMethod (c$, "put", -function (name, code) { -this.code2name.put (code, name); -this.name2code.put (name, code); -}, "~S,Integer"); -Clazz_defineMethod (c$, "findCode", -function (name) { -return this.name2code.get (name); -}, "~S"); -Clazz_defineMethod (c$, "findName", -function (code) { -return this.code2name.get (code); -}, "Integer"); -}); -Clazz_load(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){ -c$=Clazz_decorateAsClass(function(){ -this.string=null; -this.delimiters=null; -this.returnDelimiters=false; -this.position=0; -Clazz_instantialize(this,arguments); -},java.util,"StringTokenizer",null,java.util.Enumeration); -Clazz_makeConstructor(c$, -function(string){ -this.construct(string," \t\n\r\f",false); -},"~S"); -Clazz_makeConstructor(c$, -function(string,delimiters){ -this.construct(string,delimiters,false); -},"~S,~S"); -Clazz_makeConstructor(c$, -function(string,delimiters,returnDelimiters){ -if(string!=null){ -this.string=string; -this.delimiters=delimiters; -this.returnDelimiters=returnDelimiters; -this.position=0; -}else throw new NullPointerException(); -},"~S,~S,~B"); -Clazz_defineMethod(c$,"countTokens", -function(){ -var count=0; -var inToken=false; -for(var i=this.position,length=this.string.length;i=0){ -if(this.returnDelimiters)count++; -if(inToken){ -count++; -inToken=false; -}}else{ -inToken=true; -}} -if(inToken)count++; -return count; -}); -Clazz_overrideMethod(c$,"hasMoreElements", -function(){ -return this.hasMoreTokens(); -}); -Clazz_defineMethod(c$,"hasMoreTokens", -function(){ -var length=this.string.length; -if(this.position=0)return String.valueOf(this.string.charAt(this.position++)); -for(this.position++;this.position=0)return this.string.substring(i,this.position); - -return this.string.substring(i); -}while(i=0)i++; - -this.position=i; -if(i=0)return this.string.substring(i,this.position); - -return this.string.substring(i); -}}throw new java.util.NoSuchElementException(); -}); -Clazz_defineMethod(c$,"nextToken", -function(delims){ -this.delimiters=delims; -return this.nextToken(); -},"~S"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.InputMap"], "javax.swing.ComponentInputMap", ["java.lang.IllegalArgumentException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.component = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "ComponentInputMap", javax.swing.InputMap); -Clazz_makeConstructor (c$, -function (component) { -Clazz_superConstructor (this, javax.swing.ComponentInputMap, []); -this.component = component; -if (component == null) { -throw new IllegalArgumentException ("ComponentInputMaps must be associated with a non-null JComponent"); -}}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "setParent", -function (map) { -if (this.getParent () === map) { -return; -}if (map != null && (!(Clazz_instanceOf (map, javax.swing.ComponentInputMap)) || (map).getComponent () !== this.getComponent ())) { -throw new IllegalArgumentException ("ComponentInputMaps must have a parent ComponentInputMap associated with the same component"); -}Clazz_superCall (this, javax.swing.ComponentInputMap, "setParent", [map]); -this.getComponent ().componentInputMapChanged (this); -}, "javax.swing.InputMap"); -Clazz_defineMethod (c$, "getComponent", -function () { -return this.component; -}); -Clazz_defineMethod (c$, "put", -function (keyStroke, actionMapKey) { -Clazz_superCall (this, javax.swing.ComponentInputMap, "put", [keyStroke, actionMapKey]); -if (this.getComponent () != null) { -this.getComponent ().componentInputMapChanged (this); -}}, "javax.swing.KeyStroke,~O"); -Clazz_defineMethod (c$, "remove", -function (key) { -Clazz_superCall (this, javax.swing.ComponentInputMap, "remove", [key]); -if (this.getComponent () != null) { -this.getComponent ().componentInputMapChanged (this); -}}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "clear", -function () { -var oldSize = this.size (); -Clazz_superCall (this, javax.swing.ComponentInputMap, "clear", []); -if (oldSize > 0 && this.getComponent () != null) { -this.getComponent ().componentInputMapChanged (this); -}}); -}); -Clazz_declarePackage ("jssun.swing"); -Clazz_load (["javax.swing.LayoutStyle"], "jssun.swing.DefaultLayoutStyle", ["java.lang.IllegalArgumentException", "$.NullPointerException", "javax.swing.Icon", "$.JCheckBox", "$.JLabel", "$.JRadioButton", "$.UIManager", "javax.swing.plaf.UIResource"], function () { -c$ = Clazz_declareType (jssun.swing, "DefaultLayoutStyle", javax.swing.LayoutStyle); -c$.getInstance = Clazz_overrideMethod (c$, "getInstance", -function () { -return jssun.swing.DefaultLayoutStyle.INSTANCE; -}); -Clazz_overrideMethod (c$, "getPreferredGap", -function (component1, component2, type, position, parent) { -if (component1 == null || component2 == null || type == null) { -throw new NullPointerException (); -}this.checkPosition (position); -if (type === javax.swing.LayoutStyle.ComponentPlacement.INDENT && (position == 3 || position == 7)) { -var indent = this.getIndent (component1, position); -if (indent > 0) { -return indent; -}}return (type === javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) ? 12 : 6; -}, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,java.awt.Container"); -Clazz_overrideMethod (c$, "getContainerGap", -function (component, position, parent) { -if (component == null) { -throw new NullPointerException (); -}this.checkPosition (position); -return 6; -}, "javax.swing.JComponent,~N,java.awt.Container"); -Clazz_defineMethod (c$, "isLabelAndNonlabel", -function (c1, c2, position) { -if (position == 3 || position == 7) { -var c1Label = (Clazz_instanceOf (c1, javax.swing.JLabel)); -var c2Label = (Clazz_instanceOf (c2, javax.swing.JLabel)); -return ((c1Label || c2Label) && (c1Label != c2Label)); -}return false; -}, "javax.swing.JComponent,javax.swing.JComponent,~N"); -Clazz_defineMethod (c$, "getButtonGap", -function (source, target, position, offset) { -offset -= this.getButtonGap (source, position); -if (offset > 0) { -offset -= this.getButtonGap (target, this.flipDirection (position)); -}if (offset < 0) { -return 0; -}return offset; -}, "javax.swing.JComponent,javax.swing.JComponent,~N,~N"); -Clazz_defineMethod (c$, "getButtonGap", -function (source, position, offset) { -offset -= this.getButtonGap (source, position); -return Math.max (offset, 0); -}, "javax.swing.JComponent,~N,~N"); -Clazz_defineMethod (c$, "getButtonGap", -function (c, position) { -var classID = c.getUIClassID (); -if ((classID === "CheckBoxUI" || classID === "RadioButtonUI") && !(c).isBorderPainted ()) { -var border = c.getBorder (); -if (Clazz_instanceOf (border, javax.swing.plaf.UIResource)) { -return this.getInset (c, position); -}}return 0; -}, "javax.swing.JComponent,~N"); -Clazz_defineMethod (c$, "checkPosition", - function (position) { -if (position != 1 && position != 5 && position != 7 && position != 3) { -throw new IllegalArgumentException (); -}}, "~N"); -Clazz_defineMethod (c$, "flipDirection", -function (position) { -switch (position) { -case 1: -return 5; -case 5: -return 1; -case 3: -return 7; -case 7: -return 3; -} -return 0; -}, "~N"); -Clazz_defineMethod (c$, "getIndent", -function (c, position) { -var classID = c.getUIClassID (); -if (classID === "CheckBoxUI" || classID === "RadioButtonUI") { -var button = c; -var insets = c.getInsets (); -var icon = this.getIcon (button); -var gap = button.getIconTextGap (); -if (this.isLeftAligned (button, position)) { -return insets.left + icon.getIconWidth () + gap; -} else if (this.isRightAligned (button, position)) { -return insets.right + icon.getIconWidth () + gap; -}}return 0; -}, "javax.swing.JComponent,~N"); -Clazz_defineMethod (c$, "getIcon", - function (button) { -var icon = button.getIcon (); -if (icon != null) { -return icon; -}var key = null; -if (Clazz_instanceOf (button, javax.swing.JCheckBox)) { -key = "CheckBox.icon"; -} else if (Clazz_instanceOf (button, javax.swing.JRadioButton)) { -key = "RadioButton.icon"; -}if (key != null) { -var oIcon = javax.swing.UIManager.get (key); -if (Clazz_instanceOf (oIcon, javax.swing.Icon)) { -return oIcon; -}}return null; -}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "isLeftAligned", - function (button, position) { -if (position == 7) { -var ltr = button.getComponentOrientation ().isLeftToRight (); -var hAlign = button.getHorizontalAlignment (); -return ((ltr && (hAlign == 2 || hAlign == 10)) || (!ltr && (hAlign == 11))); -}return false; -}, "javax.swing.AbstractButton,~N"); -Clazz_defineMethod (c$, "isRightAligned", - function (button, position) { -if (position == 3) { -var ltr = button.getComponentOrientation ().isLeftToRight (); -var hAlign = button.getHorizontalAlignment (); -return ((ltr && (hAlign == 4 || hAlign == 11)) || (!ltr && (hAlign == 10))); -}return false; -}, "javax.swing.AbstractButton,~N"); -Clazz_defineMethod (c$, "getInset", - function (c, position) { -return this.getInset (c.getInsets (), position); -}, "javax.swing.JComponent,~N"); -Clazz_defineMethod (c$, "getInset", - function (insets, position) { -if (insets == null) { -return 0; -}switch (position) { -case 1: -return insets.top; -case 5: -return insets.bottom; -case 3: -return insets.right; -case 7: -return insets.left; -} -return 0; -}, "java.awt.Insets,~N"); -c$.INSTANCE = c$.prototype.INSTANCE = new jssun.swing.DefaultLayoutStyle (); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.lang.Enum"], "javax.swing.LayoutStyle", ["javax.swing.UIManager", "jssun.awt.AppContext"], function () { -c$ = Clazz_declareType (javax.swing, "LayoutStyle"); -c$.setInstance = Clazz_defineMethod (c$, "setInstance", -function (style) { -{ -if (style == null) { -jssun.awt.AppContext.getAppContext ().remove (javax.swing.LayoutStyle); -} else { -jssun.awt.AppContext.getAppContext ().put (javax.swing.LayoutStyle, style); -}}}, "javax.swing.LayoutStyle"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function () { -var style; -{ -style = jssun.awt.AppContext.getAppContext ().get (javax.swing.LayoutStyle); -}if (style == null) { -return javax.swing.UIManager.getLookAndFeel ().getLayoutStyle (); -}return style; -}); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.LayoutStyle, "ComponentPlacement", Enum); -Clazz_defineEnumConstant (c$, "RELATED", 0, []); -Clazz_defineEnumConstant (c$, "UNRELATED", 1, []); -Clazz_defineEnumConstant (c$, "INDENT", 2, []); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this.flat = false; -Clazz_instantialize (this, arguments); -}, javax.swing, "JCheckBox", javax.swing.JToggleButton); -Clazz_makeConstructor (c$, -function () { -this.construct (null, null, false); -}); -Clazz_makeConstructor (c$, -function (icon) { -this.construct (null, icon, false); -}, "javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (icon, selected) { -this.construct (null, icon, selected); -}, "javax.swing.Icon,~B"); -Clazz_makeConstructor (c$, -function (text) { -this.construct (text, null, false); -}, "~S"); -Clazz_makeConstructor (c$, -function (a) { -this.construct (); -this.setAction (a); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function (text, selected) { -this.construct (text, null, selected); -}, "~S,~B"); -Clazz_makeConstructor (c$, -function (text, icon) { -this.construct (text, icon, false); -}, "~S,javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text, icon, selected) { -Clazz_superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]); -this.setUIProperty ("borderPainted", Boolean.FALSE); -this.setHorizontalAlignment (10); -}, "~S,javax.swing.Icon,~B"); -Clazz_defineMethod (c$, "setBorderPaintedFlat", -function (b) { -var oldValue = this.flat; -this.flat = b; -this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat); -if (b != oldValue) { -this.revalidate (); -this.repaint (); -}}, "~B"); -Clazz_defineMethod (c$, "isBorderPaintedFlat", -function () { -return this.flat; -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "CheckBoxUI"; -}); -Clazz_overrideMethod (c$, "setIconFromAction", -function (a) { -}, "javax.swing.Action"); -Clazz_defineStatics (c$, -"BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat", -"$$uiClassID", "CheckBoxUI"); -}); -Clazz_declarePackage ("java.awt"); -Clazz_declareInterface (java.awt, "ItemSelectable"); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ItemEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.item = null; -this.stateChange = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "ItemEvent", java.awt.AWTEvent); -Clazz_makeConstructor (c$, -function (source, id, item, stateChange) { -Clazz_superConstructor (this, java.awt.event.ItemEvent, [source, id]); -this.item = item; -this.stateChange = stateChange; -}, "java.awt.ItemSelectable,~N,~O,~N"); -Clazz_defineMethod (c$, "getItemSelectable", -function () { -return this.source; -}); -Clazz_defineMethod (c$, "getItem", -function () { -return this.item; -}); -Clazz_defineMethod (c$, "getStateChange", -function () { -return this.stateChange; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 701: -typeStr = "ITEM_STATE_CHANGED"; -break; -default: -typeStr = "unknown type"; -} -var stateStr; -switch (this.stateChange) { -case 1: -stateStr = "SELECTED"; -break; -case 2: -stateStr = "DESELECTED"; -break; -default: -stateStr = "unknown type"; -} -return typeStr + ",item=" + this.item + ",stateChange=" + stateStr; -}); -Clazz_defineStatics (c$, -"ITEM_FIRST", 701, -"ITEM_LAST", 701, -"ITEM_STATE_CHANGED", 701, -"SELECTED", 1, -"DESELECTED", 2); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.ButtonModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultButtonModel", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.ActionListener", "$.InputEvent", "$.ItemEvent", "$.ItemListener", "javax.swing.UIManager", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.stateMask = 0; -this.actionCommand = null; -this.group = null; -this.mnemonic = 0; -this.changeEvent = null; -this.listenerList = null; -this.menuItem = false; -Clazz_instantialize (this, arguments); -}, javax.swing, "DefaultButtonModel", null, javax.swing.ButtonModel); -Clazz_prepareFields (c$, function () { -this.listenerList = new javax.swing.event.EventListenerList (); -}); -Clazz_makeConstructor (c$, -function () { -this.stateMask = 0; -this.setEnabled (true); -}); -Clazz_overrideMethod (c$, "setActionCommand", -function (actionCommand) { -this.actionCommand = actionCommand; -}, "~S"); -Clazz_overrideMethod (c$, "getActionCommand", -function () { -return this.actionCommand; -}); -Clazz_overrideMethod (c$, "isArmed", -function () { -return (this.stateMask & 1) != 0; -}); -Clazz_overrideMethod (c$, "isSelected", -function () { -return (this.stateMask & 2) != 0; -}); -Clazz_overrideMethod (c$, "isEnabled", -function () { -return (this.stateMask & 8) != 0; -}); -Clazz_overrideMethod (c$, "isPressed", -function () { -return (this.stateMask & 4) != 0; -}); -Clazz_overrideMethod (c$, "isRollover", -function () { -return (this.stateMask & 16) != 0; -}); -Clazz_overrideMethod (c$, "setArmed", -function (b) { -if (this.isMenuItem () && javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) { -if ((this.isArmed () == b)) { -return; -}} else { -if ((this.isArmed () == b) || !this.isEnabled ()) { -return; -}}if (b) { -this.stateMask |= 1; -} else { -this.stateMask &= -2; -}this.fireStateChanged (); -}, "~B"); -Clazz_overrideMethod (c$, "setEnabled", -function (b) { -if (this.isEnabled () == b) { -return; -}if (b) { -this.stateMask |= 8; -} else { -this.stateMask &= -9; -this.stateMask &= -2; -this.stateMask &= -5; -}this.fireStateChanged (); -}, "~B"); -Clazz_overrideMethod (c$, "setSelected", -function (b) { -if (this.isSelected () == b) { -return; -}if (b) { -this.stateMask |= 2; -} else { -this.stateMask &= -3; -}this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, b ? 1 : 2)); -this.fireStateChanged (); -}, "~B"); -Clazz_overrideMethod (c$, "setPressed", -function (b) { -if ((this.isPressed () == b) || !this.isEnabled ()) { -return; -}if (b) { -this.stateMask |= 4; -} else { -this.stateMask &= -5; -}if (!this.isPressed () && this.isArmed ()) { -var modifiers = 0; -var currentEvent = java.awt.EventQueue.getCurrentEvent (); -if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) { -modifiers = (currentEvent).getModifiers (); -} else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) { -modifiers = (currentEvent).getModifiers (); -}this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), modifiers)); -}this.fireStateChanged (); -}, "~B"); -Clazz_overrideMethod (c$, "setRollover", -function (b) { -if ((this.isRollover () == b) || !this.isEnabled ()) { -return; -}if (b) { -this.stateMask |= 16; -} else { -this.stateMask &= -17; -}this.fireStateChanged (); -}, "~B"); -Clazz_overrideMethod (c$, "setMnemonic", -function (key) { -this.mnemonic = key; -this.fireStateChanged (); -}, "~N"); -Clazz_overrideMethod (c$, "getMnemonic", -function () { -return this.mnemonic; -}); -Clazz_overrideMethod (c$, "addChangeListener", -function (l) { -this.listenerList.add (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_overrideMethod (c$, "removeChangeListener", -function (l) { -this.listenerList.remove (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "getChangeListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.ChangeListener); -}); -Clazz_defineMethod (c$, "fireStateChanged", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.ChangeListener) { -if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); -(listeners[i + 1]).stateChanged (this.changeEvent); -}} -}); -Clazz_overrideMethod (c$, "addActionListener", -function (l) { -this.listenerList.add (java.awt.event.ActionListener, l); -}, "java.awt.event.ActionListener"); -Clazz_overrideMethod (c$, "removeActionListener", -function (l) { -this.listenerList.remove (java.awt.event.ActionListener, l); -}, "java.awt.event.ActionListener"); -Clazz_defineMethod (c$, "getActionListeners", -function () { -return this.listenerList.getListeners (java.awt.event.ActionListener); -}); -Clazz_defineMethod (c$, "fireActionPerformed", -function (e) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === java.awt.event.ActionListener) { -(listeners[i + 1]).actionPerformed (e); -}} -}, "java.awt.event.ActionEvent"); -Clazz_overrideMethod (c$, "addItemListener", -function (l) { -this.listenerList.add (java.awt.event.ItemListener, l); -}, "java.awt.event.ItemListener"); -Clazz_overrideMethod (c$, "removeItemListener", -function (l) { -this.listenerList.remove (java.awt.event.ItemListener, l); -}, "java.awt.event.ItemListener"); -Clazz_defineMethod (c$, "getItemListeners", -function () { -return this.listenerList.getListeners (java.awt.event.ItemListener); -}); -Clazz_defineMethod (c$, "fireItemStateChanged", -function (e) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === java.awt.event.ItemListener) { -(listeners[i + 1]).itemStateChanged (e); -}} -}, "java.awt.event.ItemEvent"); -Clazz_defineMethod (c$, "getListeners", -function (listenerType) { -return this.listenerList.getListeners (listenerType); -}, "Class"); -Clazz_overrideMethod (c$, "getSelectedObjects", -function () { -return null; -}); -Clazz_overrideMethod (c$, "setGroup", -function (group) { -this.group = group; -}, "javax.swing.ButtonGroup"); -Clazz_defineMethod (c$, "getGroup", -function () { -return this.group; -}); -Clazz_defineMethod (c$, "isMenuItem", -function () { -return this.menuItem; -}); -Clazz_defineMethod (c$, "setMenuItem", -function (menuItem) { -this.menuItem = menuItem; -}, "~B"); -Clazz_defineStatics (c$, -"ARMED", 1, -"SELECTED", 2, -"PRESSED", 4, -"ENABLED", 8, -"ROLLOVER", 16); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.LayoutManager2"], "javax.swing.OverlayLayout", ["java.awt.AWTError", "$.Dimension", "javax.swing.SizeRequirements"], function () { -c$ = Clazz_decorateAsClass (function () { -this.target = null; -this.xChildren = null; -this.yChildren = null; -this.xTotal = null; -this.yTotal = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "OverlayLayout", null, java.awt.LayoutManager2); -Clazz_makeConstructor (c$, -function (target) { -this.target = target; -}, "java.awt.Container"); -Clazz_defineMethod (c$, "getTarget", -function () { -return this.target; -}); -Clazz_overrideMethod (c$, "invalidateLayout", -function (target) { -this.checkContainer (target); -this.xChildren = null; -this.yChildren = null; -this.xTotal = null; -this.yTotal = null; -}, "java.awt.Container"); -Clazz_defineMethod (c$, "addLayoutComponent", -function (name, comp) { -this.invalidateLayout (comp.getParent ()); -}, "~S,java.awt.Component"); -Clazz_overrideMethod (c$, "removeLayoutComponent", -function (comp) { -this.invalidateLayout (comp.getParent ()); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "addLayoutComponent", -function (comp, constraints) { -this.invalidateLayout (comp.getParent ()); -}, "java.awt.Component,~O"); -Clazz_overrideMethod (c$, "preferredLayoutSize", -function (target) { -this.checkContainer (target); -this.checkRequests (); -var size = new java.awt.Dimension (this.xTotal.preferred, this.yTotal.preferred); -var insets = target.getInsets (); -size.width += insets.left + insets.right; -size.height += insets.top + insets.bottom; -return size; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "minimumLayoutSize", -function (target) { -this.checkContainer (target); -this.checkRequests (); -var size = new java.awt.Dimension (this.xTotal.minimum, this.yTotal.minimum); -var insets = target.getInsets (); -size.width += insets.left + insets.right; -size.height += insets.top + insets.bottom; -return size; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "maximumLayoutSize", -function (target) { -this.checkContainer (target); -this.checkRequests (); -var size = new java.awt.Dimension (this.xTotal.maximum, this.yTotal.maximum); -var insets = target.getInsets (); -size.width += insets.left + insets.right; -size.height += insets.top + insets.bottom; -return size; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayoutAlignmentX", -function (target) { -this.checkContainer (target); -this.checkRequests (); -return this.xTotal.alignment; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayoutAlignmentY", -function (target) { -this.checkContainer (target); -this.checkRequests (); -return this.yTotal.alignment; -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "layoutContainer", -function (target) { -this.checkContainer (target); -this.checkRequests (); -var nChildren = target.getComponentCount (); -var xOffsets = Clazz_newIntArray (nChildren, 0); -var xSpans = Clazz_newIntArray (nChildren, 0); -var yOffsets = Clazz_newIntArray (nChildren, 0); -var ySpans = Clazz_newIntArray (nChildren, 0); -var alloc = target.getSize (); -var $in = target.getInsets (); -alloc.width -= $in.left + $in.right; -alloc.height -= $in.top + $in.bottom; -javax.swing.SizeRequirements.calculateAlignedPositions (alloc.width, this.xTotal, this.xChildren, xOffsets, xSpans); -javax.swing.SizeRequirements.calculateAlignedPositions (alloc.height, this.yTotal, this.yChildren, yOffsets, ySpans); -for (var i = 0; i < nChildren; i++) { -var c = target.getComponent (i); -c.setBounds ($in.left + xOffsets[i], $in.top + yOffsets[i], xSpans[i], ySpans[i]); -} -}, "java.awt.Container"); -Clazz_defineMethod (c$, "checkContainer", -function (target) { -if (this.target !== target) { -throw new java.awt.AWTError ("OverlayLayout can't be shared"); -}}, "java.awt.Container"); -Clazz_defineMethod (c$, "checkRequests", -function () { -if (this.xChildren == null || this.yChildren == null) { -var n = this.target.getComponentCount (); -this.xChildren = new Array (n); -this.yChildren = new Array (n); -for (var i = 0; i < n; i++) { -var c = this.target.getComponent (i); -var min = c.getMinimumSize (); -var typ = c.getPreferredSize (); -var max = c.getMaximumSize (); -this.xChildren[i] = new javax.swing.SizeRequirements (min.width, typ.width, max.width, c.getAlignmentX ()); -this.yChildren[i] = new javax.swing.SizeRequirements (min.height, typ.height, max.height, c.getAlignmentY ()); -} -this.xTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.xChildren); -this.yTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.yChildren); -}}); -}); -Clazz_declarePackage ("javax.swing"); -c$ = Clazz_decorateAsClass (function () { -this.minimum = 0; -this.preferred = 0; -this.maximum = 0; -this.alignment = 0; -Clazz_instantialize (this, arguments); -}, javax.swing, "SizeRequirements"); -Clazz_makeConstructor (c$, -function () { -this.minimum = 0; -this.preferred = 0; -this.maximum = 0; -this.alignment = 0.5; -}); -Clazz_makeConstructor (c$, -function (min, pref, max, a) { -this.minimum = min; -this.preferred = pref; -this.maximum = max; -this.alignment = a > 1.0 ? 1.0 : a < 0.0 ? 0.0 : a; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "toString", -function () { -return "[" + this.minimum + "," + this.preferred + "," + this.maximum + "]@" + this.alignment; -}); -c$.getTiledSizeRequirements = Clazz_defineMethod (c$, "getTiledSizeRequirements", -function (children) { -var total = new javax.swing.SizeRequirements (); -for (var i = 0; i < children.length; i++) { -var req = children[i]; -total.minimum = Math.min (total.minimum + req.minimum, 2147483647); -total.preferred = Math.min (total.preferred + req.preferred, 2147483647); -total.maximum = Math.min (total.maximum + req.maximum, 2147483647); -} -return total; -}, "~A"); -c$.getAlignedSizeRequirements = Clazz_defineMethod (c$, "getAlignedSizeRequirements", -function (children) { -var totalAscent = new javax.swing.SizeRequirements (); -var totalDescent = new javax.swing.SizeRequirements (); -for (var i = 0; i < children.length; i++) { -var req = children[i]; -var ascent = Clazz_floatToInt (req.alignment * req.minimum); -var descent = req.minimum - ascent; -totalAscent.minimum = Math.max (ascent, totalAscent.minimum); -totalDescent.minimum = Math.max (descent, totalDescent.minimum); -ascent = Clazz_floatToInt (req.alignment * req.preferred); -descent = req.preferred - ascent; -totalAscent.preferred = Math.max (ascent, totalAscent.preferred); -totalDescent.preferred = Math.max (descent, totalDescent.preferred); -ascent = Clazz_floatToInt (req.alignment * req.maximum); -descent = req.maximum - ascent; -totalAscent.maximum = Math.max (ascent, totalAscent.maximum); -totalDescent.maximum = Math.max (descent, totalDescent.maximum); -} -var min = Math.min (totalAscent.minimum + totalDescent.minimum, 2147483647); -var pref = Math.min (totalAscent.preferred + totalDescent.preferred, 2147483647); -var max = Math.min (totalAscent.maximum + totalDescent.maximum, 2147483647); -var alignment = 0.0; -if (min > 0) { -alignment = totalAscent.minimum / min; -alignment = alignment > 1.0 ? 1.0 : alignment < 0.0 ? 0.0 : alignment; -}return new javax.swing.SizeRequirements (min, pref, max, alignment); -}, "~A"); -c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", -function (allocated, total, children, offsets, spans) { -javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, true); -}, "~N,javax.swing.SizeRequirements,~A,~A,~A"); -c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", -function (allocated, total, children, offsets, spans, forward) { -javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, forward); -}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); -c$.calcTiled = Clazz_defineMethod (c$, "calcTiled", -function (allocated, total, children, offsets, spans, forward) { -var min = 0; -var pref = 0; -var max = 0; -for (var i = 0; i < children.length; i++) { -min += children[i].minimum; -pref += children[i].preferred; -max += children[i].maximum; -} -if (allocated >= pref) { -javax.swing.SizeRequirements.expandedTile (allocated, min, pref, max, children, offsets, spans, forward); -} else { -javax.swing.SizeRequirements.compressedTile (allocated, min, pref, max, children, offsets, spans, forward); -}}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); -c$.compressedTile = Clazz_defineMethod (c$, "compressedTile", - function (allocated, min, pref, max, request, offsets, spans, forward) { -var totalPlay = Math.min (pref - allocated, pref - min); -var factor = (pref - min == 0) ? 0.0 : totalPlay / (pref - min); -var totalOffset; -if (forward) { -totalOffset = 0; -for (var i = 0; i < spans.length; i++) { -offsets[i] = totalOffset; -var req = request[i]; -var play = factor * (req.preferred - req.minimum); -spans[i] = Clazz_floatToInt (req.preferred - play); -totalOffset = Math.min (totalOffset + spans[i], 2147483647); -} -} else { -totalOffset = allocated; -for (var i = 0; i < spans.length; i++) { -var req = request[i]; -var play = factor * (req.preferred - req.minimum); -spans[i] = Clazz_floatToInt (req.preferred - play); -offsets[i] = totalOffset - spans[i]; -totalOffset = Math.max (totalOffset - spans[i], 0); -} -}}, "~N,~N,~N,~N,~A,~A,~A,~B"); -c$.expandedTile = Clazz_defineMethod (c$, "expandedTile", - function (allocated, min, pref, max, request, offsets, spans, forward) { -var totalPlay = Math.min (allocated - pref, max - pref); -var factor = (max - pref == 0) ? 0.0 : totalPlay / (max - pref); -var totalOffset; -if (forward) { -totalOffset = 0; -for (var i = 0; i < spans.length; i++) { -offsets[i] = totalOffset; -var req = request[i]; -var play = Clazz_floatToInt (factor * (req.maximum - req.preferred)); -spans[i] = Math.min (req.preferred + play, 2147483647); -totalOffset = Math.min (totalOffset + spans[i], 2147483647); -} -} else { -totalOffset = allocated; -for (var i = 0; i < spans.length; i++) { -var req = request[i]; -var play = Clazz_floatToInt (factor * (req.maximum - req.preferred)); -spans[i] = Math.min (req.preferred + play, 2147483647); -offsets[i] = totalOffset - spans[i]; -totalOffset = Math.max (totalOffset - spans[i], 0); -} -}}, "~N,~N,~N,~N,~A,~A,~A,~B"); -c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", -function (allocated, total, children, offsets, spans) { -javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, true); -}, "~N,javax.swing.SizeRequirements,~A,~A,~A"); -c$.calcAligned = Clazz_defineMethod (c$, "calcAligned", -function (allocated, total, children, offsets, spans, normal) { -var totalAlignment = normal ? total.alignment : 1.0 - total.alignment; -var totalAscent = Clazz_floatToInt (allocated * totalAlignment); -var totalDescent = allocated - totalAscent; -for (var i = 0; i < children.length; i++) { -var req = children[i]; -var alignment = normal ? req.alignment : 1.0 - req.alignment; -var maxAscent = Clazz_floatToInt (req.maximum * alignment); -var maxDescent = req.maximum - maxAscent; -var ascent = Math.min (totalAscent, maxAscent); -var descent = Math.min (totalDescent, maxDescent); -offsets[i] = totalAscent - ascent; -spans[i] = Math.min (ascent + descent, 2147483647); -} -}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); -c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", -function (allocated, total, children, offsets, spans, normal) { -javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, normal); -}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B"); -c$.adjustSizes = Clazz_defineMethod (c$, "adjustSizes", -function (delta, children) { -return Clazz_newIntArray (0, 0); -}, "~N,~A"); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JLabel", ["java.lang.IllegalArgumentException", "javax.swing.SwingUtilities", "$.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this.mnemonic = '\0'; -this.mnemonicIndex = -1; -this.text = ""; -this.defaultIcon = null; -this.disabledIcon = null; -this.disabledIconSet = false; -this.verticalAlignment = 0; -this.horizontalAlignment = 10; -this.verticalTextPosition = 0; -this.horizontalTextPosition = 11; -this.iconTextGap = 4; -this.labelFor = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JLabel", javax.swing.JComponent, javax.swing.SwingConstants); -Clazz_makeConstructor (c$, -function (text, icon, horizontalAlignment) { -Clazz_superConstructor (this, javax.swing.JLabel, []); -this.setText (text); -this.setIcon (icon); -this.setHorizontalAlignment (horizontalAlignment); -this.updateUI (); -this.setAlignmentX (0.0); -}, "~S,javax.swing.Icon,~N"); -Clazz_makeConstructor (c$, -function (text, horizontalAlignment) { -this.construct (text, null, horizontalAlignment); -}, "~S,~N"); -Clazz_makeConstructor (c$, -function (text) { -this.construct (text, null, 10); -}, "~S"); -Clazz_makeConstructor (c$, -function (image, horizontalAlignment) { -this.construct (null, image, horizontalAlignment); -}, "javax.swing.Icon,~N"); -Clazz_makeConstructor (c$, -function (image) { -this.construct (null, image, 0); -}, "javax.swing.Icon"); -Clazz_makeConstructor (c$, -function () { -this.construct ("", null, 10); -}); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_defineMethod (c$, "setUI", -function (ui) { -Clazz_superCall (this, javax.swing.JLabel, "setUI", [ui]); -if (!this.disabledIconSet && this.disabledIcon != null) { -this.setDisabledIcon (null); -}}, "javax.swing.plaf.LabelUI"); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "LabelUI"; -}); -Clazz_defineMethod (c$, "getText", -function () { -return this.text; -}); -Clazz_defineMethod (c$, "setText", -function (text) { -var oldValue = this.text; -this.text = text; -this.firePropertyChangeObject ("text", oldValue, text); -this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, this.getDisplayedMnemonic ())); -if (text == null || oldValue == null || !text.equals (oldValue)) { -this.revalidate (); -this.repaint (); -}}, "~S"); -Clazz_defineMethod (c$, "getIcon", -function () { -return this.defaultIcon; -}); -Clazz_defineMethod (c$, "setIcon", -function (icon) { -var oldValue = this.defaultIcon; -this.defaultIcon = icon; -if ((this.defaultIcon !== oldValue) && !this.disabledIconSet) { -this.disabledIcon = null; -}this.firePropertyChangeObject ("icon", oldValue, this.defaultIcon); -if (this.defaultIcon !== oldValue) { -if ((this.defaultIcon == null) || (oldValue == null) || (this.defaultIcon.getIconWidth () != oldValue.getIconWidth ()) || (this.defaultIcon.getIconHeight () != oldValue.getIconHeight ())) { -this.revalidate (); -}this.repaint (); -}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "getDisabledIcon", -function () { -if (!this.disabledIconSet && this.disabledIcon == null && this.defaultIcon != null) { -this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.defaultIcon); -if (this.disabledIcon != null) { -this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon); -}}return this.disabledIcon; -}); -Clazz_defineMethod (c$, "setDisabledIcon", -function (disabledIcon) { -var oldValue = this.disabledIcon; -this.disabledIcon = disabledIcon; -this.disabledIconSet = (disabledIcon != null); -this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon); -if (disabledIcon !== oldValue) { -if (disabledIcon == null || oldValue == null || disabledIcon.getIconWidth () != oldValue.getIconWidth () || disabledIcon.getIconHeight () != oldValue.getIconHeight ()) { -this.revalidate (); -}if (!this.isEnabled ()) { -this.repaint (); -}}}, "javax.swing.Icon"); -Clazz_defineMethod (c$, "setDisplayedMnemonic", -function (key) { -var oldKey = this.mnemonic; -this.mnemonic = key; -this.firePropertyChangeInt ("displayedMnemonic", oldKey, this.mnemonic); -this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (this.getText (), this.mnemonic)); -if (key != oldKey) { -this.revalidate (); -this.repaint (); -}}, "~N"); -Clazz_defineMethod (c$, "setDisplayedMnemonic", -function (aChar) { -var vk = (aChar).charCodeAt (0); -if (vk >= 97 && vk <= 122) vk -= (32); -this.setDisplayedMnemonic (vk); -}, "~S"); -Clazz_defineMethod (c$, "getDisplayedMnemonic", -function () { -return this.mnemonic; -}); -Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", -function (index) { -var oldValue = this.mnemonicIndex; -if (index == -1) { -this.mnemonicIndex = -1; -} else { -var text = this.getText (); -var textLength = (text == null) ? 0 : text.length; -if (index < -1 || index >= textLength) { -throw new IllegalArgumentException ("index == " + index); -}}this.mnemonicIndex = index; -this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index); -if (index != oldValue) { -this.revalidate (); -this.repaint (); -}}, "~N"); -Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", -function () { -return this.mnemonicIndex; -}); -Clazz_defineMethod (c$, "checkHorizontalKey", -function (key, message) { -if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) { -return key; -} else { -throw new IllegalArgumentException (message); -}}, "~N,~S"); -Clazz_defineMethod (c$, "checkVerticalKey", -function (key, message) { -if ((key == 1) || (key == 0) || (key == 3)) { -return key; -} else { -throw new IllegalArgumentException (message); -}}, "~N,~S"); -Clazz_defineMethod (c$, "getIconTextGap", -function () { -return this.iconTextGap; -}); -Clazz_defineMethod (c$, "setIconTextGap", -function (iconTextGap) { -var oldValue = this.iconTextGap; -this.iconTextGap = iconTextGap; -this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap); -if (iconTextGap != oldValue) { -this.revalidate (); -this.repaint (); -}}, "~N"); -Clazz_defineMethod (c$, "getVerticalAlignment", -function () { -return this.verticalAlignment; -}); -Clazz_defineMethod (c$, "setVerticalAlignment", -function (alignment) { -if (alignment == this.verticalAlignment) return; -var oldValue = this.verticalAlignment; -this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment"); -this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "getHorizontalAlignment", -function () { -return this.horizontalAlignment; -}); -Clazz_defineMethod (c$, "setHorizontalAlignment", -function (alignment) { -if (alignment == this.horizontalAlignment) return; -var oldValue = this.horizontalAlignment; -this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment"); -this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "getVerticalTextPosition", -function () { -return this.verticalTextPosition; -}); -Clazz_defineMethod (c$, "setVerticalTextPosition", -function (textPosition) { -if (textPosition == this.verticalTextPosition) return; -var old = this.verticalTextPosition; -this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition"); -this.firePropertyChangeInt ("verticalTextPosition", old, this.verticalTextPosition); -this.revalidate (); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "getHorizontalTextPosition", -function () { -return this.horizontalTextPosition; -}); -Clazz_defineMethod (c$, "setHorizontalTextPosition", -function (textPosition) { -var old = this.horizontalTextPosition; -this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition"); -this.firePropertyChangeInt ("horizontalTextPosition", old, this.horizontalTextPosition); -this.revalidate (); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "imageUpdate", -function (img, infoflags, x, y, w, h) { -if (!this.isShowing () || !javax.swing.SwingUtilities.doesIconReferenceImage (this.getIcon (), img) && !javax.swing.SwingUtilities.doesIconReferenceImage (this.disabledIcon, img)) { -return false; -}return Clazz_superCall (this, javax.swing.JLabel, "imageUpdate", [img, infoflags, x, y, w, h]); -}, "java.awt.Image,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "paramString", -function () { -var textString = (this.text != null ? this.text : ""); -var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : ""); -var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : ""); -var labelForString = (this.labelFor != null ? this.labelFor.toString () : ""); -var verticalAlignmentString; -if (this.verticalAlignment == 1) { -verticalAlignmentString = "TOP"; -} else if (this.verticalAlignment == 0) { -verticalAlignmentString = "CENTER"; -} else if (this.verticalAlignment == 3) { -verticalAlignmentString = "BOTTOM"; -} else verticalAlignmentString = ""; -var horizontalAlignmentString; -if (this.horizontalAlignment == 2) { -horizontalAlignmentString = "LEFT"; -} else if (this.horizontalAlignment == 0) { -horizontalAlignmentString = "CENTER"; -} else if (this.horizontalAlignment == 4) { -horizontalAlignmentString = "RIGHT"; -} else if (this.horizontalAlignment == 10) { -horizontalAlignmentString = "LEADING"; -} else if (this.horizontalAlignment == 11) { -horizontalAlignmentString = "TRAILING"; -} else horizontalAlignmentString = ""; -var verticalTextPositionString; -if (this.verticalTextPosition == 1) { -verticalTextPositionString = "TOP"; -} else if (this.verticalTextPosition == 0) { -verticalTextPositionString = "CENTER"; -} else if (this.verticalTextPosition == 3) { -verticalTextPositionString = "BOTTOM"; -} else verticalTextPositionString = ""; -var horizontalTextPositionString; -if (this.horizontalTextPosition == 2) { -horizontalTextPositionString = "LEFT"; -} else if (this.horizontalTextPosition == 0) { -horizontalTextPositionString = "CENTER"; -} else if (this.horizontalTextPosition == 4) { -horizontalTextPositionString = "RIGHT"; -} else if (this.horizontalTextPosition == 10) { -horizontalTextPositionString = "LEADING"; -} else if (this.horizontalTextPosition == 11) { -horizontalTextPositionString = "TRAILING"; -} else horizontalTextPositionString = ""; -return Clazz_superCall (this, javax.swing.JLabel, "paramString", []) + ",defaultIcon=" + defaultIconString + ",disabledIcon=" + disabledIconString + ",horizontalAlignment=" + horizontalAlignmentString + ",horizontalTextPosition=" + horizontalTextPositionString + ",iconTextGap=" + this.iconTextGap + ",labelFor=" + labelForString + ",text=" + textString + ",verticalAlignment=" + verticalAlignmentString + ",verticalTextPosition=" + verticalTextPositionString; -}); -Clazz_defineMethod (c$, "getLabelFor", -function () { -return this.labelFor; -}); -Clazz_defineMethod (c$, "setLabelFor", -function (c) { -var oldC = this.labelFor; -this.labelFor = c; -this.firePropertyChangeObject ("labelFor", oldC, c); -if (Clazz_instanceOf (oldC, javax.swing.JComponent)) { -(oldC).putClientProperty ("labeledBy", null); -}if (Clazz_instanceOf (c, javax.swing.JComponent)) { -(c).putClientProperty ("labeledBy", this); -}}, "java.awt.Component"); -Clazz_defineStatics (c$, -"$uiClassID", "LabelUI", -"LABELED_BY_PROPERTY", "labeledBy"); -}); -Clazz_declarePackage ("javax.swing.border"); -Clazz_declareInterface (javax.swing.border, "Border"); -Clazz_declarePackage ("javax.swing"); -Clazz_declareInterface (javax.swing, "RootPaneContainer"); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.awt.event.MouseEvent"], "javax.swing.event.MenuDragMouseEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.path = null; -this.manager = null; -Clazz_instantialize (this, arguments); -}, javax.swing.event, "MenuDragMouseEvent", java.awt.event.MouseEvent); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, x, y, clickCount, popupTrigger, p, m) { -Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, clickCount, popupTrigger]); -this.path = p; -this.manager = m; -}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager"); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, p, m) { -Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]); -this.path = p; -this.manager = m; -}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager"); -Clazz_defineMethod (c$, "getPath", -function () { -return this.path; -}); -Clazz_defineMethod (c$, "getMenuSelectionManager", -function () { -return this.manager; -}); -}); -Clazz_declarePackage ("jssun.swing"); -Clazz_load (["javax.swing.Action"], "jssun.swing.UIAction", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.name = null; -Clazz_instantialize (this, arguments); -}, jssun.swing, "UIAction", null, javax.swing.Action); -Clazz_makeConstructor (c$, -function (name) { -this.name = name; -}, "~S"); -Clazz_defineMethod (c$, "getName", -function () { -return this.name; -}); -Clazz_overrideMethod (c$, "getValue", -function (key) { -if (key === "Name") { -return this.name; -}return null; -}, "~S"); -Clazz_overrideMethod (c$, "putValue", -function (key, value) { -}, "~S,~O"); -Clazz_overrideMethod (c$, "setEnabled", -function (b) { -}, "~B"); -Clazz_defineMethod (c$, "isEnabled", -function () { -return this.isEnabled (null); -}); -Clazz_defineMethod (c$, "isEnabled", -function (sender) { -return true; -}, "~O"); -Clazz_overrideMethod (c$, "addPropertyChangeListener", -function (listener) { -}, "java.beans.PropertyChangeListener"); -Clazz_overrideMethod (c$, "removePropertyChangeListener", -function (listener) { -}, "java.beans.PropertyChangeListener"); -}); -Clazz_declarePackage ("jssun.awt"); -Clazz_declareInterface (jssun.awt, "RequestFocusController"); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.event.ComponentListener", "java.beans.PropertyChangeListener", "javax.swing.event.EventListenerList"], "javax.swing.AncestorNotifier", ["java.awt.Window", "javax.swing.JComponent", "javax.swing.event.AncestorEvent", "$.AncestorListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.firstInvisibleAncestor = null; -this.listenerList = null; -this.root = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "AncestorNotifier", null, [java.awt.event.ComponentListener, java.beans.PropertyChangeListener]); -Clazz_prepareFields (c$, function () { -this.listenerList = new javax.swing.event.EventListenerList (); -}); -Clazz_makeConstructor (c$, -function (root) { -this.root = root; -this.addListeners (root, true); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "addAncestorListener", -function (l) { -this.listenerList.add (javax.swing.event.AncestorListener, l); -}, "javax.swing.event.AncestorListener"); -Clazz_defineMethod (c$, "removeAncestorListener", -function (l) { -this.listenerList.remove (javax.swing.event.AncestorListener, l); -}, "javax.swing.event.AncestorListener"); -Clazz_defineMethod (c$, "getAncestorListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.AncestorListener); -}); -Clazz_defineMethod (c$, "fireAncestorAdded", -function (source, id, ancestor, ancestorParent) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.AncestorListener) { -var ancestorEvent = new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent); -(listeners[i + 1]).ancestorAdded (ancestorEvent); -}} -}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); -Clazz_defineMethod (c$, "fireAncestorRemoved", -function (source, id, ancestor, ancestorParent) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.AncestorListener) { -var ancestorEvent = new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent); -(listeners[i + 1]).ancestorRemoved (ancestorEvent); -}} -}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); -Clazz_defineMethod (c$, "fireAncestorMoved", -function (source, id, ancestor, ancestorParent) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.AncestorListener) { -var ancestorEvent = new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent); -(listeners[i + 1]).ancestorMoved (ancestorEvent); -}} -}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); -Clazz_defineMethod (c$, "removeAllListeners", -function () { -this.removeListeners (this.root); -}); -Clazz_defineMethod (c$, "addListeners", -function (ancestor, addToFirst) { -var a; -this.firstInvisibleAncestor = null; -for (a = ancestor; this.firstInvisibleAncestor == null; a = a.getParent ()) { -if (addToFirst || a !== ancestor) { -a.addComponentListener (this); -if (Clazz_instanceOf (a, javax.swing.JComponent)) { -var jAncestor = a; -jAncestor.addPropertyChangeListener (this); -}}if (!a.isVisible () || a.getParent () == null || Clazz_instanceOf (a, java.awt.Window)) { -this.firstInvisibleAncestor = a; -}} -if (Clazz_instanceOf (this.firstInvisibleAncestor, java.awt.Window) && this.firstInvisibleAncestor.isVisible ()) { -this.firstInvisibleAncestor = null; -}}, "java.awt.Component,~B"); -Clazz_defineMethod (c$, "removeListeners", -function (ancestor) { -var a; -for (a = ancestor; a != null; a = a.getParent ()) { -a.removeComponentListener (this); -if (Clazz_instanceOf (a, javax.swing.JComponent)) { -var jAncestor = a; -jAncestor.removePropertyChangeListener (this); -}if (a === this.firstInvisibleAncestor || Clazz_instanceOf (a, java.awt.Window)) { -break; -}} -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "componentResized", -function (e) { -}, "java.awt.event.ComponentEvent"); -Clazz_overrideMethod (c$, "componentMoved", -function (e) { -var source = e.getComponent (); -this.fireAncestorMoved (this.root, 3, source, source.getParent ()); -}, "java.awt.event.ComponentEvent"); -Clazz_overrideMethod (c$, "componentShown", -function (e) { -var ancestor = e.getComponent (); -if (ancestor === this.firstInvisibleAncestor) { -this.addListeners (ancestor, false); -if (this.firstInvisibleAncestor == null) { -this.fireAncestorAdded (this.root, 1, ancestor, ancestor.getParent ()); -}}}, "java.awt.event.ComponentEvent"); -Clazz_overrideMethod (c$, "componentHidden", -function (e) { -var ancestor = e.getComponent (); -var needsNotify = this.firstInvisibleAncestor == null; -if (!(Clazz_instanceOf (ancestor, java.awt.Window))) { -this.removeListeners (ancestor.getParent ()); -}this.firstInvisibleAncestor = ancestor; -if (needsNotify) { -this.fireAncestorRemoved (this.root, 2, ancestor, ancestor.getParent ()); -}}, "java.awt.event.ComponentEvent"); -Clazz_overrideMethod (c$, "propertyChange", -function (evt) { -var s = evt.getPropertyName (); -if (s != null && (s.equals ("parent") || s.equals ("ancestor"))) { -var component = evt.getSource (); -if (evt.getNewValue () != null) { -if (component === this.firstInvisibleAncestor) { -this.addListeners (component, false); -if (this.firstInvisibleAncestor == null) { -this.fireAncestorAdded (this.root, 1, component, component.getParent ()); -}}} else { -var needsNotify = this.firstInvisibleAncestor == null; -var oldParent = evt.getOldValue (); -this.removeListeners (oldParent); -this.firstInvisibleAncestor = component; -if (needsNotify) { -this.fireAncestorRemoved (this.root, 2, component, oldParent); -}}}}, "java.beans.PropertyChangeEvent"); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.awt.AWTEvent"], "javax.swing.event.AncestorEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.ancestor = null; -this.ancestorParent = null; -Clazz_instantialize (this, arguments); -}, javax.swing.event, "AncestorEvent", java.awt.AWTEvent); -Clazz_makeConstructor (c$, -function (source, id, ancestor, ancestorParent) { -Clazz_superConstructor (this, javax.swing.event.AncestorEvent, [source, id]); -this.ancestor = ancestor; -this.ancestorParent = ancestorParent; -}, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); -Clazz_defineMethod (c$, "getAncestor", -function () { -return this.ancestor; -}); -Clazz_defineMethod (c$, "getAncestorParent", -function () { -return this.ancestorParent; -}); -Clazz_defineMethod (c$, "getComponent", -function () { -return this.getSource (); -}); -Clazz_defineStatics (c$, -"ANCESTOR_ADDED", 1, -"ANCESTOR_REMOVED", 2, -"ANCESTOR_MOVED", 3); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.AncestorListener", null, function () { -Clazz_declareInterface (javax.swing.event, "AncestorListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.lang.Enum"], "javax.swing.ClientPropertyKey", null, function () { -c$ = Clazz_declareType (javax.swing, "ClientPropertyKey", Enum); -Clazz_makeConstructor (c$, - function (reportValueNotSerializable) { -}, "~B"); -Clazz_defineEnumConstant (c$, "JComponent_INPUT_VERIFIER", 0, [true]); -Clazz_defineEnumConstant (c$, "JComponent_TRANSFER_HANDLER", 1, [true]); -Clazz_defineEnumConstant (c$, "JComponent_ANCESTOR_NOTIFIER", 2, [true]); -Clazz_defineEnumConstant (c$, "PopupFactory_FORCE_HEAVYWEIGHT_POPUP", 3, [true]); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Dialog", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JDialog", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this.defaultCloseOperation = 1; -this.rootPane = null; -this.rootPaneCheckingEnabled = false; -this.transferHandler = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JDialog", java.awt.Dialog, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]); -Clazz_makeConstructor (c$, -function () { -this.construct (Clazz_castNullAs ("java.awt.Frame"), false); -}); -Clazz_makeConstructor (c$, -function (owner) { -this.construct (owner, false); -}, "java.awt.Frame"); -Clazz_makeConstructor (c$, -function (owner, modal) { -this.construct (owner, null, modal); -}, "java.awt.Frame,~B"); -Clazz_makeConstructor (c$, -function (owner, title) { -this.construct (owner, title, false); -}, "java.awt.Frame,~S"); -Clazz_makeConstructor (c$, -function (owner, title, modal) { -Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal]); -if (owner == null) { -var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); -this.addWindowListener (ownerShutdownListener); -}this.dialogInit (); -}, "java.awt.Frame,~S,~B"); -Clazz_makeConstructor (c$, -function (owner, title, modal, gc) { -Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal, gc]); -if (owner == null) { -var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); -this.addWindowListener (ownerShutdownListener); -}this.dialogInit (); -}, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration"); -Clazz_makeConstructor (c$, -function (owner) { -this.construct (owner, false); -}, "java.awt.Dialog"); -Clazz_makeConstructor (c$, -function (owner, modal) { -this.construct (owner, null, modal); -}, "java.awt.Dialog,~B"); -Clazz_makeConstructor (c$, -function (owner, title) { -this.construct (owner, title, false); -}, "java.awt.Dialog,~S"); -Clazz_makeConstructor (c$, -function (owner, title, modal) { -Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal]); -this.dialogInit (); -}, "java.awt.Dialog,~S,~B"); -Clazz_makeConstructor (c$, -function (owner, title, modal, gc) { -Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal, gc]); -this.dialogInit (); -}, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration"); -Clazz_makeConstructor (c$, -function (owner) { -this.construct (owner, java.awt.Dialog.ModalityType.MODELESS); -}, "java.awt.Window"); -Clazz_makeConstructor (c$, -function (owner, modalityType) { -this.construct (owner, null, modalityType); -}, "java.awt.Window,java.awt.Dialog.ModalityType"); -Clazz_makeConstructor (c$, -function (owner, title) { -this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS); -}, "java.awt.Window,~S"); -Clazz_makeConstructor (c$, -function (owner, title, modalityType) { -Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType]); -this.dialogInit (); -}, "java.awt.Window,~S,java.awt.Dialog.ModalityType"); -Clazz_makeConstructor (c$, -function (owner, title, modalityType, gc) { -Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType, gc]); -this.dialogInit (); -}, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration"); -Clazz_defineMethod (c$, "dialogInit", -function () { -this.enableEvents (72); -this.setLocale (javax.swing.JComponent.getDefaultLocale ()); -this.setRootPane (this.createRootPane ()); -this.setRootPaneCheckingEnabled (true); -if (javax.swing.JDialog.isDefaultLookAndFeelDecorated ()) { -var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations (); -if (supportsWindowDecorations) { -this.setUndecorated (true); -this.getRootPane ().setWindowDecorationStyle (2); -}}}); -Clazz_defineMethod (c$, "createRootPane", -function () { -var rp = new javax.swing.JRootPane (); -rp.setOpaque (true); -return rp; -}); -Clazz_defineMethod (c$, "processWindowEvent", -function (e) { -Clazz_superCall (this, javax.swing.JDialog, "processWindowEvent", [e]); -if (e.getID () == 201) { -switch (this.defaultCloseOperation) { -case 1: -this.setVisible (false); -break; -case 2: -this.dispose (); -break; -case 0: -default: -break; -} -}}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "setDefaultCloseOperation", -function (operation) { -if (operation != 0 && operation != 1 && operation != 2) { -throw new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE"); -}var oldValue = this.defaultCloseOperation; -this.defaultCloseOperation = operation; -this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation); -}, "~N"); -Clazz_defineMethod (c$, "getDefaultCloseOperation", -function () { -return this.defaultCloseOperation; -}); -Clazz_defineMethod (c$, "setTransferHandler", -function (newHandler) { -var oldHandler = this.transferHandler; -this.transferHandler = newHandler; -javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); -this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); -}, "javax.swing.TransferHandler"); -Clazz_defineMethod (c$, "getTransferHandler", -function () { -return this.transferHandler; -}); -Clazz_overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "setJMenuBar", -function (menu) { -this.getRootPane ().setMenuBar (menu); -}, "javax.swing.JMenuBar"); -Clazz_defineMethod (c$, "getJMenuBar", -function () { -return this.getRootPane ().getMenuBar (); -}); -Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", -function () { -return this.rootPaneCheckingEnabled; -}); -Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", -function (enabled) { -this.rootPaneCheckingEnabled = enabled; -}, "~B"); -Clazz_overrideMethod (c$, "addImpl", -function (comp, constraints, index) { -if (this.isRootPaneCheckingEnabled ()) { -return this.getContentPane ().add (comp, constraints, index); -}return this.addImplSAEM (comp, constraints, index); -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "remove", -function (comp) { -if (comp === this.rootPane) { -this.removeChild (comp); -} else { -this.getContentPane ().removeChild (comp); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "setLayout", -function (manager) { -if (this.isRootPaneCheckingEnabled ()) { -this.getContentPane ().setLayout (manager); -} else { -Clazz_superCall (this, javax.swing.JDialog, "setLayout", [manager]); -}}, "java.awt.LayoutManager"); -Clazz_overrideMethod (c$, "getRootPane", -function () { -return this.rootPane; -}); -Clazz_defineMethod (c$, "setRootPane", -function (root) { -if (this.rootPane != null) { -this.remove (this.rootPane); -}this.rootPane = root; -if (this.rootPane != null) { -var checkingEnabled = this.isRootPaneCheckingEnabled (); -try { -this.setRootPaneCheckingEnabled (false); -this.add (this.rootPane, "Center"); -} finally { -this.setRootPaneCheckingEnabled (checkingEnabled); -} -}}, "javax.swing.JRootPane"); -Clazz_overrideMethod (c$, "getContentPane", -function () { -return this.getRootPane ().getContentPane (); -}); -Clazz_overrideMethod (c$, "setContentPane", -function (contentPane) { -this.getRootPane ().setContentPane (contentPane); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayeredPane", -function () { -return this.getRootPane ().getLayeredPane (); -}); -Clazz_overrideMethod (c$, "setLayeredPane", -function (layeredPane) { -this.getRootPane ().setLayeredPane (layeredPane); -}, "javax.swing.JLayeredPane"); -Clazz_overrideMethod (c$, "getGlassPane", -function () { -return this.getRootPane ().getGlassPane (); -}); -Clazz_overrideMethod (c$, "setGlassPane", -function (glassPane) { -this.getRootPane ().setGlassPane (glassPane); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getGraphics", -function () { -javax.swing.JComponent.getGraphicsInvoked (this); -return Clazz_superCall (this, javax.swing.JDialog, "getGraphics", []); -}); -Clazz_defineMethod (c$, "repaint", -function (time, x, y, width, height) { -if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { -javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); -} else { -Clazz_superCall (this, javax.swing.JDialog, "repaint", [time, x, y, width, height]); -}}, "~N,~N,~N,~N,~N"); -c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", -function (defaultLookAndFeelDecorated) { -if (defaultLookAndFeelDecorated) { -javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.TRUE); -} else { -javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.FALSE); -}}, "~B"); -c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", -function () { -var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JDialog.defaultLookAndFeelDecoratedKey); -if (defaultLookAndFeelDecorated == null) { -defaultLookAndFeelDecorated = Boolean.FALSE; -}return defaultLookAndFeelDecorated.booleanValue (); -}); -Clazz_defineMethod (c$, "paramString", -function () { -var defaultCloseOperationString; -if (this.defaultCloseOperation == 1) { -defaultCloseOperationString = "HIDE_ON_CLOSE"; -} else if (this.defaultCloseOperation == 2) { -defaultCloseOperationString = "DISPOSE_ON_CLOSE"; -} else if (this.defaultCloseOperation == 0) { -defaultCloseOperationString = "DO_NOTHING_ON_CLOSE"; -} else defaultCloseOperationString = ""; -var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : ""); -var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); -return Clazz_superCall (this, javax.swing.JDialog, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; -}); -c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey = new Clazz._O (); -}); -Clazz_declarePackage ("java.awt"); -Clazz_load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () { -c$ = Clazz_decorateAsClass (function () { -this.resizable = true; -this.undecorated = false; -this.modal = false; -this.modalityType = null; -this.title = null; -this.isInHide = false; -this.isInDispose = false; -Clazz_instantialize (this, arguments); -}, java.awt, "Dialog", java.awt.Window); -Clazz_makeConstructor (c$, -function (owner) { -this.construct (owner, "", false); -}, "java.awt.Frame"); -Clazz_makeConstructor (c$, -function (owner, modal) { -this.construct (owner, "", modal); -}, "java.awt.Frame,~B"); -Clazz_makeConstructor (c$, -function (owner, title) { -this.construct (owner, title, false); -}, "java.awt.Frame,~S"); -Clazz_makeConstructor (c$, -function (owner, title, modal) { -this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS); -}, "java.awt.Frame,~S,~B"); -Clazz_makeConstructor (c$, -function (owner, title, modal, gc) { -this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc); -}, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration"); -Clazz_makeConstructor (c$, -function (owner) { -this.construct (owner, "", false); -}, "java.awt.Dialog"); -Clazz_makeConstructor (c$, -function (owner, title) { -this.construct (owner, title, false); -}, "java.awt.Dialog,~S"); -Clazz_makeConstructor (c$, -function (owner, title, modal) { -this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS); -}, "java.awt.Dialog,~S,~B"); -Clazz_makeConstructor (c$, -function (owner, title, modal, gc) { -this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc); -}, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration"); -Clazz_makeConstructor (c$, -function (owner) { -this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS); -}, "java.awt.Window"); -Clazz_makeConstructor (c$, -function (owner, title) { -this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS); -}, "java.awt.Window,~S"); -Clazz_makeConstructor (c$, -function (owner, modalityType) { -this.construct (owner, null, modalityType); -}, "java.awt.Window,java.awt.Dialog.ModalityType"); -Clazz_makeConstructor (c$, -function (owner, title, modalityType) { -Clazz_superConstructor (this, java.awt.Dialog, [owner]); -if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) { -throw new IllegalArgumentException ("Wrong parent window"); -}this.title = title; -this.setModalityType (modalityType); -}, "java.awt.Window,~S,java.awt.Dialog.ModalityType"); -Clazz_makeConstructor (c$, -function (owner, title, modalityType, gc) { -Clazz_superConstructor (this, java.awt.Dialog, [owner, gc]); -if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) { -throw new IllegalArgumentException ("wrong owner window"); -}this.title = title; -this.setModalityType (modalityType); -}, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration"); -Clazz_overrideMethod (c$, "constructComponentName", -function () { -{ -return "dialog" + java.awt.Dialog.$nameCounter++; -}}); -Clazz_defineMethod (c$, "addNotify", -function () { -{ -if (this.parent != null) { -this.parent.addNotify (); -}Clazz_superCall (this, java.awt.Dialog, "addNotify", []); -}}); -Clazz_defineMethod (c$, "isModal", -function () { -return this.isModal_NoClientCode (); -}); -Clazz_defineMethod (c$, "isModal_NoClientCode", -function () { -return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS; -}); -Clazz_defineMethod (c$, "setModal", -function (modal) { -this.modal = modal; -this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS); -}, "~B"); -Clazz_defineMethod (c$, "getModalityType", -function () { -return this.modalityType; -}); -Clazz_defineMethod (c$, "setModalityType", -function (type) { -if (type == null) { -type = java.awt.Dialog.ModalityType.MODELESS; -}if (this.modalityType === type) { -return; -}this.checkModalityPermission (type); -this.modalityType = type; -this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS); -}, "java.awt.Dialog.ModalityType"); -Clazz_defineMethod (c$, "getTitle", -function () { -return this.title; -}); -Clazz_defineMethod (c$, "setTitle", -function (title) { -var oldTitle = this.title; -{ -this.title = title; -}this.firePropertyChangeObject ("title", oldTitle, title); -}, "~S"); -Clazz_defineMethod (c$, "show", -function () { -}); -Clazz_defineMethod (c$, "modalityPushed", -function () { -}); -Clazz_defineMethod (c$, "modalityPopped", -function () { -}); -Clazz_defineMethod (c$, "interruptBlocking", -function () { -if (this.isModal ()) { -this.disposeImpl (); -} else if (this.windowClosingException != null) { -this.windowClosingException.fillInStackTrace (); -this.windowClosingException.printStackTrace (); -this.windowClosingException = null; -}}); -Clazz_defineMethod (c$, "hideAndDisposePreHandler", - function () { -this.isInHide = true; -}); -Clazz_defineMethod (c$, "hideAndDisposeHandler", - function () { -this.isInHide = false; -}); -Clazz_defineMethod (c$, "hide", -function () { -this.hideAndDisposePreHandler (); -Clazz_superCall (this, java.awt.Dialog, "hide", []); -if (!this.isInDispose) { -this.hideAndDisposeHandler (); -}}); -Clazz_defineMethod (c$, "doDispose", -function () { -this.isInDispose = true; -Clazz_superCall (this, java.awt.Dialog, "doDispose", []); -this.hideAndDisposeHandler (); -this.isInDispose = false; -}); -Clazz_defineMethod (c$, "isResizable", -function () { -return this.resizable; -}); -Clazz_defineMethod (c$, "setResizable", -function (resizable) { -var testvalid = false; -{ -this.resizable = resizable; -}if (testvalid) { -this.invalidateIfValid (); -}}, "~B"); -Clazz_defineMethod (c$, "setUndecorated", -function (undecorated) { -{ -if (this.isDisplayable ()) { -throw new java.awt.IllegalComponentStateException ("The dialog is displayable."); -}this.undecorated = undecorated; -}}, "~B"); -Clazz_defineMethod (c$, "isUndecorated", -function () { -return this.undecorated; -}); -Clazz_defineMethod (c$, "paramString", -function () { -var str = Clazz_superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType; -if (this.title != null) { -str += ",title=" + this.title; -}return str; -}); -Clazz_defineMethod (c$, "modalShow", -function () { -}); -Clazz_defineMethod (c$, "modalHide", -function () { -}); -Clazz_defineMethod (c$, "shouldBlock", -function (w) { -if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) { -return false; -}if ((Clazz_instanceOf (w, java.awt.Dialog)) && (w).isInHide) { -return false; -}var blockerToCheck = this; -while (blockerToCheck != null) { -var c = w; -while ((c != null) && (c !== blockerToCheck)) { -c = c.getParent_NoClientCode (); -} -if (c === blockerToCheck) { -return false; -}blockerToCheck = blockerToCheck.getModalBlocker (); -} -switch (this.modalityType) { -case java.awt.Dialog.ModalityType.MODELESS: -return false; -case java.awt.Dialog.ModalityType.DOCUMENT_MODAL: -if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) { -var c = this; -while ((c != null) && (c !== w)) { -c = c.getParent_NoClientCode (); -} -return c === w; -} else { -return this.getDocumentRoot () === w.getDocumentRoot (); -}case java.awt.Dialog.ModalityType.APPLICATION_MODAL: -return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext); -case java.awt.Dialog.ModalityType.TOOLKIT_MODAL: -return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE); -} -return false; -}, "java.awt.Window"); -Clazz_defineMethod (c$, "checkModalityPermission", - function (mt) { -}, "java.awt.Dialog.ModalityType"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.Dialog, "ModalityType", Enum); -Clazz_defineEnumConstant (c$, "MODELESS", 0, []); -Clazz_defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []); -Clazz_defineEnumConstant (c$, "APPLICATION_MODAL", 2, []); -Clazz_defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (java.awt.Dialog, "ModalExclusionType", Enum); -Clazz_defineEnumConstant (c$, "NO_EXCLUDE", 0, []); -Clazz_defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []); -Clazz_defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []); -c$ = Clazz_p0p (); -c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL; -Clazz_defineStatics (c$, -"$base", "dialog", -"$nameCounter", 0); -}); -Clazz_declarePackage ("javax.swing"); -c$ = Clazz_declareInterface (javax.swing, "WindowConstants"); -Clazz_defineStatics (c$, -"DO_NOTHING_ON_CLOSE", 0, -"HIDE_ON_CLOSE", 1, -"DISPOSE_ON_CLOSE", 2, -"EXIT_ON_CLOSE", 3); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Frame", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JFrame", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this.defaultCloseOperation = 1; -this.transferHandler = null; -this.rootPane = null; -this.rootPaneCheckingEnabled = false; -Clazz_instantialize (this, arguments); -}, javax.swing, "JFrame", java.awt.Frame, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JFrame); -this.frameInit (); -}); -Clazz_makeConstructor (c$, -function (gc) { -Clazz_superConstructor (this, javax.swing.JFrame, [gc]); -this.frameInit (); -}, "java.awt.GraphicsConfiguration"); -Clazz_makeConstructor (c$, -function (title) { -Clazz_superConstructor (this, javax.swing.JFrame, [title]); -this.frameInit (); -}, "~S"); -Clazz_makeConstructor (c$, -function (title, gc) { -Clazz_superConstructor (this, javax.swing.JFrame, [title, gc]); -this.frameInit (); -}, "~S,java.awt.GraphicsConfiguration"); -Clazz_defineMethod (c$, "frameInit", -function () { -this.enableEvents (72); -this.setLocale (javax.swing.JComponent.getDefaultLocale ()); -this.setRootPane (this.createRootPane ()); -this.setBackground (javax.swing.UIManager.getColor ("control")); -this.setRootPaneCheckingEnabled (true); -if (javax.swing.JFrame.isDefaultLookAndFeelDecorated ()) { -var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations (); -if (supportsWindowDecorations) { -this.setUndecorated (true); -this.getRootPane ().setWindowDecorationStyle (1); -}}}); -Clazz_defineMethod (c$, "createRootPane", -function () { -var rp = new javax.swing.JRootPane (); -rp.setOpaque (true); -return rp; -}); -Clazz_defineMethod (c$, "processWindowEvent", -function (e) { -Clazz_superCall (this, javax.swing.JFrame, "processWindowEvent", [e]); -if (e.getID () == 201) { -switch (this.defaultCloseOperation) { -case 1: -this.setVisible (false); -break; -case 2: -this.dispose (); -break; -case 0: -default: -break; -case 3: -System.exit (0); -break; -} -}}, "java.awt.event.WindowEvent"); -Clazz_defineMethod (c$, "setDefaultCloseOperation", -function (operation) { -if (operation != 0 && operation != 1 && operation != 2 && operation != 3) { -throw new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE"); -}if (this.defaultCloseOperation != operation) { -if (operation == 3) { -var security = System.getSecurityManager (); -if (security != null) { -security.checkExit (0); -}}var oldValue = this.defaultCloseOperation; -this.defaultCloseOperation = operation; -this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation); -}}, "~N"); -Clazz_defineMethod (c$, "getDefaultCloseOperation", -function () { -return this.defaultCloseOperation; -}); -Clazz_defineMethod (c$, "setTransferHandler", -function (newHandler) { -var oldHandler = this.transferHandler; -this.transferHandler = newHandler; -javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); -this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); -}, "javax.swing.TransferHandler"); -Clazz_defineMethod (c$, "getTransferHandler", -function () { -return this.transferHandler; -}); -Clazz_overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "setJMenuBar", -function (menubar) { -this.getRootPane ().setMenuBar (menubar); -}, "javax.swing.JMenuBar"); -Clazz_defineMethod (c$, "getJMenuBar", -function () { -return this.getRootPane ().getMenuBar (); -}); -Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", -function () { -return this.rootPaneCheckingEnabled; -}); -Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", -function (enabled) { -this.rootPaneCheckingEnabled = enabled; -}, "~B"); -Clazz_overrideMethod (c$, "addImpl", -function (comp, constraints, index) { -if (this.isRootPaneCheckingEnabled ()) { -return this.getContentPane ().add (comp, constraints, index); -}return this.addImplSAEM (comp, constraints, index); -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "remove", -function (comp) { -if (comp === this.rootPane) { -this.removeChild (comp); -} else { -this.getContentPane ().removeChild (comp); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "setLayout", -function (manager) { -if (this.isRootPaneCheckingEnabled ()) { -this.getContentPane ().setLayout (manager); -} else { -Clazz_superCall (this, javax.swing.JFrame, "setLayout", [manager]); -}}, "java.awt.LayoutManager"); -Clazz_overrideMethod (c$, "getRootPane", -function () { -return this.rootPane; -}); -Clazz_defineMethod (c$, "setRootPane", -function (root) { -if (this.rootPane != null) { -this.remove (this.rootPane); -}this.rootPane = root; -if (this.rootPane != null) { -var checkingEnabled = this.isRootPaneCheckingEnabled (); -try { -this.setRootPaneCheckingEnabled (false); -this.add (this.rootPane, "Center"); -} finally { -this.setRootPaneCheckingEnabled (checkingEnabled); -} -}}, "javax.swing.JRootPane"); -Clazz_overrideMethod (c$, "getContentPane", -function () { -return this.getRootPane ().getContentPane (); -}); -Clazz_overrideMethod (c$, "setContentPane", -function (contentPane) { -this.getRootPane ().setContentPane (contentPane); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayeredPane", -function () { -return this.getRootPane ().getLayeredPane (); -}); -Clazz_overrideMethod (c$, "setLayeredPane", -function (layeredPane) { -this.getRootPane ().setLayeredPane (layeredPane); -}, "javax.swing.JLayeredPane"); -Clazz_overrideMethod (c$, "getGlassPane", -function () { -return this.getRootPane ().getGlassPane (); -}); -Clazz_overrideMethod (c$, "setGlassPane", -function (glassPane) { -this.getRootPane ().setGlassPane (glassPane); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getGraphics", -function () { -javax.swing.JComponent.getGraphicsInvoked (this); -return Clazz_superCall (this, javax.swing.JFrame, "getGraphics", []); -}); -Clazz_defineMethod (c$, "repaint", -function (time, x, y, width, height) { -if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { -javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); -} else { -Clazz_superCall (this, javax.swing.JFrame, "repaint", [time, x, y, width, height]); -}}, "~N,~N,~N,~N,~N"); -c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", -function (defaultLookAndFeelDecorated) { -if (defaultLookAndFeelDecorated) { -javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.TRUE); -} else { -javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.FALSE); -}}, "~B"); -c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", -function () { -var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JFrame.defaultLookAndFeelDecoratedKey); -if (defaultLookAndFeelDecorated == null) { -defaultLookAndFeelDecorated = Boolean.FALSE; -}return defaultLookAndFeelDecorated.booleanValue (); -}); -Clazz_defineMethod (c$, "paramString", -function () { -var defaultCloseOperationString; -if (this.defaultCloseOperation == 1) { -defaultCloseOperationString = "HIDE_ON_CLOSE"; -} else if (this.defaultCloseOperation == 2) { -defaultCloseOperationString = "DISPOSE_ON_CLOSE"; -} else if (this.defaultCloseOperation == 0) { -defaultCloseOperationString = "DO_NOTHING_ON_CLOSE"; -} else if (this.defaultCloseOperation == 3) { -defaultCloseOperationString = "EXIT_ON_CLOSE"; -} else defaultCloseOperationString = ""; -var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : ""); -var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); -return Clazz_superCall (this, javax.swing.JFrame, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; -}); -Clazz_defineStatics (c$, -"EXIT_ON_CLOSE", 3); -c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey = new Clazz._O (); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Window", "javax.swing.RootPaneContainer"], "javax.swing.JWindow", ["javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () { -c$ = Clazz_decorateAsClass (function () { -this.rootPane = null; -this.rootPaneCheckingEnabled = false; -this.transferHandler = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JWindow", java.awt.Window, javax.swing.RootPaneContainer); -Clazz_makeConstructor (c$, -function () { -this.construct (Clazz_castNullAs ("java.awt.Frame")); -}); -Clazz_makeConstructor (c$, -function (gc) { -this.construct (null, gc); -Clazz_superCall (this, javax.swing.JWindow, "setFocusableWindowState", [false]); -}, "java.awt.GraphicsConfiguration"); -Clazz_makeConstructor (c$, -function (owner) { -Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]); -if (owner == null) { -var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); -this.addWindowListener (ownerShutdownListener); -}this.windowInit (); -}, "java.awt.Frame"); -Clazz_makeConstructor (c$, -function (owner) { -Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]); -if (owner == null) { -var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); -this.addWindowListener (ownerShutdownListener); -}this.windowInit (); -}, "java.awt.Window"); -Clazz_makeConstructor (c$, -function (owner, gc) { -Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, gc]); -if (owner == null) { -var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener (); -this.addWindowListener (ownerShutdownListener); -}this.windowInit (); -}, "java.awt.Window,java.awt.GraphicsConfiguration"); -Clazz_defineMethod (c$, "windowInit", -function () { -this.setLocale (javax.swing.JComponent.getDefaultLocale ()); -this.setRootPane (this.createRootPane ()); -this.setRootPaneCheckingEnabled (true); -}); -Clazz_defineMethod (c$, "createRootPane", -function () { -var rp = new javax.swing.JRootPane (); -rp.setOpaque (true); -return rp; -}); -Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", -function () { -return this.rootPaneCheckingEnabled; -}); -Clazz_defineMethod (c$, "setTransferHandler", -function (newHandler) { -var oldHandler = this.transferHandler; -this.transferHandler = newHandler; -javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler); -this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler); -}, "javax.swing.TransferHandler"); -Clazz_defineMethod (c$, "getTransferHandler", -function () { -return this.transferHandler; -}); -Clazz_overrideMethod (c$, "update", -function (g) { -this.paint (g); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", -function (enabled) { -this.rootPaneCheckingEnabled = enabled; -}, "~B"); -Clazz_overrideMethod (c$, "addImpl", -function (comp, constraints, index) { -if (this.isRootPaneCheckingEnabled ()) { -return this.getContentPane ().add (comp, constraints, index); -}return this.addImplSAEM (comp, constraints, index); -}, "java.awt.Component,~O,~N"); -Clazz_defineMethod (c$, "remove", -function (comp) { -if (comp === this.rootPane) { -this.removeChild (comp); -} else { -this.getContentPane ().removeChild (comp); -}}, "java.awt.Component"); -Clazz_defineMethod (c$, "setLayout", -function (manager) { -if (this.isRootPaneCheckingEnabled ()) { -this.getContentPane ().setLayout (manager); -} else { -Clazz_superCall (this, javax.swing.JWindow, "setLayout", [manager]); -}}, "java.awt.LayoutManager"); -Clazz_overrideMethod (c$, "getRootPane", -function () { -return this.rootPane; -}); -Clazz_defineMethod (c$, "setRootPane", -function (root) { -if (this.rootPane != null) { -this.remove (this.rootPane); -}this.rootPane = root; -if (this.rootPane != null) { -var checkingEnabled = this.isRootPaneCheckingEnabled (); -try { -this.setRootPaneCheckingEnabled (false); -this.add (this.rootPane, "Center"); -} finally { -this.setRootPaneCheckingEnabled (checkingEnabled); -} -}}, "javax.swing.JRootPane"); -Clazz_overrideMethod (c$, "getContentPane", -function () { -return this.getRootPane ().getContentPane (); -}); -Clazz_overrideMethod (c$, "setContentPane", -function (contentPane) { -this.getRootPane ().setContentPane (contentPane); -}, "java.awt.Container"); -Clazz_overrideMethod (c$, "getLayeredPane", -function () { -return this.getRootPane ().getLayeredPane (); -}); -Clazz_overrideMethod (c$, "setLayeredPane", -function (layeredPane) { -this.getRootPane ().setLayeredPane (layeredPane); -}, "javax.swing.JLayeredPane"); -Clazz_overrideMethod (c$, "getGlassPane", -function () { -return this.getRootPane ().getGlassPane (); -}); -Clazz_overrideMethod (c$, "setGlassPane", -function (glassPane) { -this.getRootPane ().setGlassPane (glassPane); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getGraphics", -function () { -javax.swing.JComponent.getGraphicsInvoked (this); -return Clazz_superCall (this, javax.swing.JWindow, "getGraphics", []); -}); -Clazz_defineMethod (c$, "repaint", -function (time, x, y, width, height) { -if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) { -javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height); -} else { -Clazz_superCall (this, javax.swing.JWindow, "repaint", [time, x, y, width, height]); -}}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "paramString", -function () { -var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false"); -return Clazz_superCall (this, javax.swing.JWindow, "paramString", []) + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; -}); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.util.Hashtable"], "javax.swing.KeyboardManager", ["java.lang.Thread", "java.util.Vector", "java.applet.Applet", "java.awt.Window", "javax.swing.JComponent", "$.JMenuBar", "$.KeyStroke"], function () { -c$ = Clazz_decorateAsClass (function () { -this.containerMap = null; -this.componentKeyStrokeMap = null; -if (!Clazz_isClassDefined ("javax.swing.KeyboardManager.ComponentKeyStrokePair")) { -javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "KeyboardManager"); -Clazz_prepareFields (c$, function () { -this.containerMap = new java.util.Hashtable (); -this.componentKeyStrokeMap = new java.util.Hashtable (); -}); -c$.getCurrentManager = Clazz_defineMethod (c$, "getCurrentManager", -function () { -return javax.swing.KeyboardManager.currentManager; -}); -c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", -function (km) { -javax.swing.KeyboardManager.currentManager = km; -}, "javax.swing.KeyboardManager"); -Clazz_defineMethod (c$, "registerKeyStroke", -function (k, c) { -var topContainer = javax.swing.KeyboardManager.getTopAncestor (c); -if (topContainer == null) { -return; -}var keyMap = this.containerMap.get (topContainer); -if (keyMap == null) { -keyMap = this.registerNewTopContainer (topContainer); -}var tmp = keyMap.get (k); -if (tmp == null) { -keyMap.put (k, c); -} else if (Clazz_instanceOf (tmp, java.util.Vector)) { -var v = tmp; -if (!v.contains (c)) { -v.addElement (c); -}} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) { -if (tmp !== c) { -var v = new java.util.Vector (); -v.addElement (tmp); -v.addElement (c); -keyMap.put (k, v); -}} else { -System.out.println ("Unexpected condition in registerKeyStroke"); -Thread.dumpStack (); -}this.componentKeyStrokeMap.put (Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, k), topContainer); -}, "javax.swing.KeyStroke,javax.swing.JComponent"); -c$.getTopAncestor = Clazz_defineMethod (c$, "getTopAncestor", - function (c) { -for (var p = c.getParent (); p != null; p = p.getParent ()) { -if (Clazz_instanceOf (p, java.awt.Window) && (p).isFocusableWindow () || Clazz_instanceOf (p, java.applet.Applet)) { -return p; -}} -return null; -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "unregisterKeyStroke", -function (ks, c) { -var ckp = Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, ks); -var topContainer = this.componentKeyStrokeMap.get (ckp); -if (topContainer == null) { -return; -}var keyMap = this.containerMap.get (topContainer); -if (keyMap == null) { -Thread.dumpStack (); -return; -}var tmp = keyMap.get (ks); -if (tmp == null) { -Thread.dumpStack (); -return; -}if (Clazz_instanceOf (tmp, javax.swing.JComponent) && tmp === c) { -keyMap.remove (ks); -} else if (Clazz_instanceOf (tmp, java.util.Vector)) { -var v = tmp; -v.removeElement (c); -if (v.isEmpty ()) { -keyMap.remove (ks); -}}if (keyMap.isEmpty ()) { -this.containerMap.remove (topContainer); -}this.componentKeyStrokeMap.remove (ckp); -}, "javax.swing.KeyStroke,javax.swing.JComponent"); -Clazz_defineMethod (c$, "fireKeyboardAction", -function (e, pressed, topAncestor) { -if (e.isConsumed ()) { -System.out.println ("Aquired pre-used event!"); -Thread.dumpStack (); -}var ks; -if (e.getID () == 400) { -ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ()); -} else { -ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), !pressed); -}var keyMap = this.containerMap.get (topAncestor); -if (keyMap != null) { -var tmp = keyMap.get (ks); -if (tmp == null) { -} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) { -var c = tmp; -if (c.isShowing () && c.isEnabled ()) { -this.fireBinding (c, ks, e, pressed); -}} else if (Clazz_instanceOf (tmp, java.util.Vector)) { -var v = tmp; -for (var counter = v.size () - 1; counter >= 0; counter--) { -var c = v.elementAt (counter); -if (c.isShowing () && c.isEnabled ()) { -this.fireBinding (c, ks, e, pressed); -if (e.isConsumed ()) return true; -}} -} else { -System.out.println ("Unexpected condition in fireKeyboardAction " + tmp); -Thread.dumpStack (); -}}if (e.isConsumed ()) { -return true; -}if (keyMap != null) { -var v = keyMap.get (javax.swing.JMenuBar); -if (v != null) { -var iter = v.elements (); -while (iter.hasMoreElements ()) { -var mb = iter.nextElement (); -if (mb.isShowing () && mb.isEnabled ()) { -this.fireBinding (mb, ks, e, pressed); -if (e.isConsumed ()) { -return true; -}}} -}}return e.isConsumed (); -}, "java.awt.event.KeyEvent,~B,java.awt.Container"); -Clazz_defineMethod (c$, "fireBinding", -function (c, ks, e, pressed) { -if (c.processKeyBinding (ks, e, 2, pressed)) { -e.consume (); -}}, "javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B"); -Clazz_defineMethod (c$, "registerMenuBar", -function (mb) { -var top = javax.swing.KeyboardManager.getTopAncestor (mb); -if (top == null) { -return; -}var keyMap = this.containerMap.get (top); -if (keyMap == null) { -keyMap = this.registerNewTopContainer (top); -}var menuBars = keyMap.get (javax.swing.JMenuBar); -if (menuBars == null) { -menuBars = new java.util.Vector (); -keyMap.put (javax.swing.JMenuBar, menuBars); -}if (!menuBars.contains (mb)) { -menuBars.addElement (mb); -}}, "javax.swing.JMenuBar"); -Clazz_defineMethod (c$, "unregisterMenuBar", -function (mb) { -var topContainer = javax.swing.KeyboardManager.getTopAncestor (mb); -if (topContainer == null) { -return; -}var keyMap = this.containerMap.get (topContainer); -if (keyMap != null) { -var v = keyMap.get (javax.swing.JMenuBar); -if (v != null) { -v.removeElement (mb); -if (v.isEmpty ()) { -keyMap.remove (javax.swing.JMenuBar); -if (keyMap.isEmpty ()) { -this.containerMap.remove (topContainer); -}}}}}, "javax.swing.JMenuBar"); -Clazz_defineMethod (c$, "registerNewTopContainer", -function (topContainer) { -var keyMap = new java.util.Hashtable (); -this.containerMap.put (topContainer, keyMap); -return keyMap; -}, "java.awt.Container"); -c$.$KeyboardManager$ComponentKeyStrokePair$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -this.component = null; -this.keyStroke = null; -Clazz_instantialize (this, arguments); -}, javax.swing.KeyboardManager, "ComponentKeyStrokePair"); -Clazz_makeConstructor (c$, -function (a, b) { -this.component = a; -this.keyStroke = b; -}, "~O,~O"); -Clazz_defineMethod (c$, "equals", -function (a) { -if (!(Clazz_instanceOf (a, javax.swing.KeyboardManager.ComponentKeyStrokePair))) { -return false; -}var b = a; -return ((this.component.equals (b.component)) && (this.keyStroke.equals (b.keyStroke))); -}, "~O"); -Clazz_defineMethod (c$, "hashCode", -function () { -return this.component.hashCode () * this.keyStroke.hashCode (); -}); -c$ = Clazz_p0p (); -}; -c$.currentManager = c$.prototype.currentManager = new javax.swing.KeyboardManager (); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JComponent", "$.MenuElement"], "javax.swing.JMenuBar", ["java.lang.Error", "java.util.Vector", "java.awt.Insets", "javax.swing.DefaultSingleSelectionModel", "$.JMenu", "$.JPopupMenu", "$.KeyboardManager", "$.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this.selectionModel = null; -this.$paintBorder = true; -this.margin = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JMenuBar", javax.swing.JComponent, javax.swing.MenuElement); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JMenuBar); -this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ()); -this.updateUI (); -}); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "MenuBarUI"; -}); -Clazz_defineMethod (c$, "getSelectionModel", -function () { -return this.selectionModel; -}); -Clazz_defineMethod (c$, "setSelectionModel", -function (model) { -var oldValue = this.selectionModel; -this.selectionModel = model; -this.firePropertyChangeObject ("selectionModel", oldValue, this.selectionModel); -}, "javax.swing.SingleSelectionModel"); -Clazz_defineMethod (c$, "add", -function (c) { -Clazz_superCall (this, javax.swing.JMenuBar, "add", [c]); -return c; -}, "javax.swing.JMenu"); -Clazz_defineMethod (c$, "getMenu", -function (index) { -var c = this.getComponentAtIndex (index); -if (Clazz_instanceOf (c, javax.swing.JMenu)) return c; -return null; -}, "~N"); -Clazz_defineMethod (c$, "getMenuCount", -function () { -return this.getComponentCount (); -}); -Clazz_defineMethod (c$, "setHelpMenu", -function (menu) { -throw new Error ("setHelpMenu() not yet implemented."); -}, "javax.swing.JMenu"); -Clazz_defineMethod (c$, "getHelpMenu", -function () { -throw new Error ("getHelpMenu() not yet implemented."); -}); -Clazz_defineMethod (c$, "getComponentAtIndex", -function (i) { -if (i < 0 || i >= this.getComponentCount ()) { -return null; -}return this.getComponent (i); -}, "~N"); -Clazz_defineMethod (c$, "getComponentIndex", -function (c) { -var ncomponents = this.getComponentCount (); -var component = this.getComponents (); -for (var i = 0; i < ncomponents; i++) { -var comp = component[i]; -if (comp === c) return i; -} -return -1; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "setSelected", -function (sel) { -var model = this.getSelectionModel (); -var index = this.getComponentIndex (sel); -model.setSelectedIndex (index); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "isSelected", -function () { -return this.selectionModel.isSelected (); -}); -Clazz_defineMethod (c$, "isBorderPainted", -function () { -return this.$paintBorder; -}); -Clazz_defineMethod (c$, "setBorderPainted", -function (b) { -var oldValue = this.$paintBorder; -this.$paintBorder = b; -this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder); -if (b != oldValue) { -this.revalidate (); -this.repaint (); -}}, "~B"); -Clazz_defineMethod (c$, "paintBorder", -function (g) { -if (this.isBorderPainted ()) { -Clazz_superCall (this, javax.swing.JMenuBar, "paintBorder", [g]); -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "setMargin", -function (m) { -var old = this.margin; -this.margin = m; -this.firePropertyChangeObject ("margin", old, m); -if (old == null || !old.equals (m)) { -this.revalidate (); -this.repaint (); -}}, "java.awt.Insets"); -Clazz_defineMethod (c$, "getMargin", -function () { -if (this.margin == null) { -return new java.awt.Insets (0, 0, 0, 0); -} else { -return this.margin; -}}); -Clazz_defineMethod (c$, "processMouseEvent", -function (event, path, manager) { -}, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager"); -Clazz_defineMethod (c$, "processKeyEvent", -function (e, path, manager) { -}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager"); -Clazz_overrideMethod (c$, "menuSelectionChanged", -function (isIncluded) { -}, "~B"); -Clazz_defineMethod (c$, "getSubElements", -function () { -var result; -var tmp = new java.util.Vector (); -var c = this.getComponentCount (); -var i; -var m; -for (i = 0; i < c; i++) { -m = this.getComponent (i); -if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m); -} -result = new Array (tmp.size ()); -for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i); - -return result; -}); -Clazz_defineMethod (c$, "getComponent", -function () { -return this; -}); -Clazz_defineMethod (c$, "paramString", -function () { -var paintBorderString = (this.$paintBorder ? "true" : "false"); -var marginString = (this.margin != null ? this.margin.toString () : ""); -return Clazz_superCall (this, javax.swing.JMenuBar, "paramString", []) + ",margin=" + marginString + ",paintBorder=" + paintBorderString; -}); -Clazz_defineMethod (c$, "processKeyBinding", -function (ks, e, condition, pressed) { -var retValue = Clazz_superCall (this, javax.swing.JMenuBar, "processKeyBinding", [ks, e, condition, pressed]); -if (!retValue) { -var subElements = this.getSubElements (); -for (var i = 0; i < subElements.length; i++) { -if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) { -return true; -}} -}return retValue; -}, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B"); -c$.processBindingForKeyStrokeRecursive = Clazz_defineMethod (c$, "processBindingForKeyStrokeRecursive", -function (elem, ks, e, condition, pressed) { -if (elem == null) { -return false; -}var c = elem.getComponent (); -if (!(c.isVisible () || (Clazz_instanceOf (c, javax.swing.JPopupMenu))) || !c.isEnabled ()) { -return false; -}if (c != null && Clazz_instanceOf (c, javax.swing.JComponent) && (c).processKeyBinding (ks, e, condition, pressed)) { -return true; -}var subElements = elem.getSubElements (); -for (var i = 0; i < subElements.length; i++) { -if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) { -return true; -}} -return false; -}, "javax.swing.MenuElement,javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B"); -Clazz_defineMethod (c$, "addNotify", -function () { -Clazz_superCall (this, javax.swing.JMenuBar, "addNotify", []); -javax.swing.KeyboardManager.getCurrentManager ().registerMenuBar (this); -}); -Clazz_defineMethod (c$, "removeNotify", -function () { -Clazz_superCall (this, javax.swing.JMenuBar, "removeNotify", []); -javax.swing.KeyboardManager.getCurrentManager ().unregisterMenuBar (this); -}); -Clazz_defineStatics (c$, -"$uiClassID", "MenuBarUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_declareInterface (javax.swing, "MenuElement"); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.SingleSelectionModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultSingleSelectionModel", ["javax.swing.event.ChangeEvent", "$.ChangeListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.changeEvent = null; -this.listenerList = null; -this.index = -1; -Clazz_instantialize (this, arguments); -}, javax.swing, "DefaultSingleSelectionModel", null, javax.swing.SingleSelectionModel); -Clazz_prepareFields (c$, function () { -this.listenerList = new javax.swing.event.EventListenerList (); -}); -Clazz_overrideMethod (c$, "getSelectedIndex", -function () { -return this.index; -}); -Clazz_overrideMethod (c$, "setSelectedIndex", -function (index) { -if (this.index != index) { -this.index = index; -this.fireStateChanged (); -}}, "~N"); -Clazz_overrideMethod (c$, "clearSelection", -function () { -this.setSelectedIndex (-1); -}); -Clazz_overrideMethod (c$, "isSelected", -function () { -var ret = false; -if (this.getSelectedIndex () != -1) { -ret = true; -}return ret; -}); -Clazz_overrideMethod (c$, "addChangeListener", -function (l) { -this.listenerList.add (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_overrideMethod (c$, "removeChangeListener", -function (l) { -this.listenerList.remove (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "getChangeListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.ChangeListener); -}); -Clazz_defineMethod (c$, "fireStateChanged", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.ChangeListener) { -if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); -(listeners[i + 1]).stateChanged (this.changeEvent); -}} -}); -Clazz_defineMethod (c$, "getListeners", -function (listenerType) { -return this.listenerList.getListeners (listenerType); -}, "Class"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_declareInterface (javax.swing, "SingleSelectionModel"); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.event.WindowAdapter", "javax.swing.JMenuItem", "$.MenuElement", "javax.swing.event.ChangeListener"], "javax.swing.JMenu", ["java.lang.Error", "$.IllegalArgumentException", "java.util.Vector", "java.awt.Point", "$.Rectangle", "$.Toolkit", "javax.swing.JMenuBar", "$.JPopupMenu", "$.MenuSelectionManager", "$.SwingUtilities", "$.UIManager", "javax.swing.event.MenuEvent", "$.MenuListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.$popupMenu = null; -this.menuChangeListener = null; -this.menuEvent = null; -this.delay = 0; -this.customMenuLocation = null; -this.popupListener = null; -if (!Clazz_isClassDefined ("javax.swing.JMenu.MenuChangeListener")) { -javax.swing.JMenu.$JMenu$MenuChangeListener$ (); -} -if (!Clazz_isClassDefined ("javax.swing.JMenu.WinListener")) { -javax.swing.JMenu.$JMenu$WinListener$ (); -} -Clazz_instantialize (this, arguments); -}, javax.swing, "JMenu", javax.swing.JMenuItem, javax.swing.MenuElement); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JMenu, []); -this.init0 ("", null, -2147483648); -}); -Clazz_makeConstructor (c$, -function (s) { -Clazz_superConstructor (this, javax.swing.JMenu, []); -this.init0 (s, null, -2147483648); -}, "~S"); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, javax.swing.JMenu, []); -this.init0 ("", null, -2147483648); -this.setAction (a); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function (s, b) { -Clazz_superConstructor (this, javax.swing.JMenu, []); -this.init0 (s, null, -2147483648); -}, "~S,~B"); -Clazz_overrideMethod (c$, "initFocusability", -function () { -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -if (this.$popupMenu != null) { -this.$popupMenu.setUI (javax.swing.UIManager.getUI (this.$popupMenu)); -}}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "MenuUI"; -}); -Clazz_defineMethod (c$, "setModel", -function (newModel) { -var oldModel = this.getModel (); -Clazz_superCall (this, javax.swing.JMenu, "setModel", [newModel]); -if (oldModel != null && this.menuChangeListener != null) { -oldModel.removeChangeListener (this.menuChangeListener); -this.menuChangeListener = null; -}this.model = newModel; -if (newModel != null) { -this.menuChangeListener = this.createMenuChangeListener (); -newModel.addChangeListener (this.menuChangeListener); -}}, "javax.swing.ButtonModel"); -Clazz_overrideMethod (c$, "isSelected", -function () { -return this.getModel ().isSelected (); -}); -Clazz_overrideMethod (c$, "setSelected", -function (b) { -var model = this.getModel (); -if (b != model.isSelected ()) { -this.getModel ().setSelected (b); -}}, "~B"); -Clazz_defineMethod (c$, "isPopupMenuVisible", -function () { -this.ensurePopupMenuCreated (); -return this.$popupMenu.isVisible (); -}); -Clazz_defineMethod (c$, "setPopupMenuVisible", -function (b) { -var isVisible = this.isPopupMenuVisible (); -if (b != isVisible && (this.isEnabled () || !b)) { -this.ensurePopupMenuCreated (); -if ((b == true) && this.isShowing ()) { -var p = this.getCustomMenuLocation (); -if (p == null) { -p = this.getPopupMenuOrigin (); -}this.getPopupMenu ().show (this, p.x, p.y); -} else { -this.getPopupMenu ().setVisible (false); -}}}, "~B"); -Clazz_defineMethod (c$, "getPopupMenuOrigin", -function () { -var x = 0; -var y = 0; -var pm = this.getPopupMenu (); -var s = this.getSize (); -var pmSize = pm.getSize (); -if (pmSize.width == 0) { -pmSize = pm.getPreferredSize (); -}var position = this.getLocationOnScreen (); -var toolkit = java.awt.Toolkit.getDefaultToolkit (); -var gc = this.getGraphicsConfiguration (); -var screenBounds = new java.awt.Rectangle (toolkit.getScreenSize ()); -if (gc != null) { -screenBounds = gc.getBounds (); -var screenInsets = toolkit.getScreenInsets (gc); -screenBounds.width -= Math.abs (screenInsets.left + screenInsets.right); -screenBounds.height -= Math.abs (screenInsets.top + screenInsets.bottom); -position.x -= Math.abs (screenInsets.left); -position.y -= Math.abs (screenInsets.top); -}var parent = this.getParent (); -if (Clazz_instanceOf (parent, javax.swing.JPopupMenu)) { -var xOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetX"); -var yOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetY"); -if (javax.swing.SwingUtilities.isLeftToRight (this)) { -x = s.width + xOffset; -if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) { -x = 0 - xOffset - pmSize.width; -}} else { -x = 0 - xOffset - pmSize.width; -if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) { -x = s.width + xOffset; -}}y = yOffset; -if (position.y + y + pmSize.height >= screenBounds.height + screenBounds.y && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) { -y = s.height - yOffset - pmSize.height; -}} else { -var xOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetX"); -var yOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetY"); -if (javax.swing.SwingUtilities.isLeftToRight (this)) { -x = xOffset; -if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) { -x = s.width - xOffset - pmSize.width; -}} else { -x = s.width - xOffset - pmSize.width; -if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) { -x = xOffset; -}}y = s.height + yOffset; -if (position.y + y + pmSize.height >= screenBounds.height && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) { -y = 0 - yOffset - pmSize.height; -}}return new java.awt.Point (x, y); -}); -Clazz_defineMethod (c$, "getDelay", -function () { -return this.delay; -}); -Clazz_defineMethod (c$, "setDelay", -function (d) { -if (d < 0) throw new IllegalArgumentException ("Delay must be a positive integer"); -this.delay = d; -}, "~N"); -Clazz_defineMethod (c$, "ensurePopupMenuCreated", - function () { -if (this.$popupMenu == null) { -this.$popupMenu = new javax.swing.JPopupMenu (); -this.$popupMenu.setInvoker (this); -this.popupListener = this.createWinListener (this.$popupMenu); -}}); -Clazz_defineMethod (c$, "getCustomMenuLocation", - function () { -return this.customMenuLocation; -}); -Clazz_defineMethod (c$, "setMenuLocation", -function (x, y) { -this.customMenuLocation = new java.awt.Point (x, y); -if (this.$popupMenu != null) this.$popupMenu.setLocation (x, y); -}, "~N,~N"); -Clazz_defineMethod (c$, "add", -function (menuItem) { -this.ensurePopupMenuCreated (); -return this.$popupMenu.add (menuItem); -}, "javax.swing.JMenuItem"); -Clazz_defineMethod (c$, "add", -function (c) { -this.ensurePopupMenuCreated (); -this.$popupMenu.add (c); -return c; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "add", -function (c, index) { -this.ensurePopupMenuCreated (); -this.$popupMenu.add (c, index); -return c; -}, "java.awt.Component,~N"); -Clazz_defineMethod (c$, "add", -function (s) { -return this.add ( new javax.swing.JMenuItem (s)); -}, "~S"); -Clazz_defineMethod (c$, "add", -function (a) { -var mi = this.createActionComponent (a); -mi.setAction (a); -this.add (mi); -return mi; -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "createActionComponent", -function (a) { -var mi = ((Clazz_isClassDefined ("javax.swing.JMenu$1") ? 0 : javax.swing.JMenu.$JMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JMenu$1, this, null)); -mi.setHorizontalTextPosition (11); -mi.setVerticalTextPosition (0); -return mi; -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "createActionChangeListener", -function (b) { -return b.createActionPropertyChangeListener0 (b.getAction ()); -}, "javax.swing.JMenuItem"); -Clazz_defineMethod (c$, "addSeparator", -function () { -this.ensurePopupMenuCreated (); -this.$popupMenu.addSeparator (); -}); -Clazz_defineMethod (c$, "insert", -function (s, pos) { -if (pos < 0) { -throw new IllegalArgumentException ("index less than zero."); -}this.ensurePopupMenuCreated (); -this.$popupMenu.insert ( new javax.swing.JMenuItem (s), pos); -}, "~S,~N"); -Clazz_defineMethod (c$, "insert", -function (mi, pos) { -if (pos < 0) { -throw new IllegalArgumentException ("index less than zero."); -}this.ensurePopupMenuCreated (); -this.$popupMenu.insert (mi, pos); -return mi; -}, "javax.swing.JMenuItem,~N"); -Clazz_defineMethod (c$, "insert", -function (a, pos) { -if (pos < 0) { -throw new IllegalArgumentException ("index less than zero."); -}this.ensurePopupMenuCreated (); -var mi = new javax.swing.JMenuItem (a); -mi.setHorizontalTextPosition (11); -mi.setVerticalTextPosition (0); -this.$popupMenu.insert (mi, pos); -return mi; -}, "javax.swing.Action,~N"); -Clazz_defineMethod (c$, "insertSeparator", -function (index) { -if (index < 0) { -throw new IllegalArgumentException ("index less than zero."); -}this.ensurePopupMenuCreated (); -this.$popupMenu.insert ( new javax.swing.JPopupMenu.Separator (), index); -}, "~N"); -Clazz_defineMethod (c$, "getItem", -function (pos) { -if (pos < 0) { -throw new IllegalArgumentException ("index less than zero."); -}var c = this.getMenuComponent (pos); -if (Clazz_instanceOf (c, javax.swing.JMenuItem)) { -var mi = c; -return mi; -}return null; -}, "~N"); -Clazz_defineMethod (c$, "getItemCount", -function () { -return this.getMenuComponentCount (); -}); -Clazz_defineMethod (c$, "isTearOff", -function () { -throw new Error ("boolean isTearOff() {} not yet implemented"); -}); -Clazz_defineMethod (c$, "remove", -function (pos) { -if (pos < 0) { -throw new IllegalArgumentException ("index less than zero."); -}if (pos > this.getItemCount ()) { -throw new IllegalArgumentException ("index greater than the number of items."); -}if (this.$popupMenu != null) this.$popupMenu.remove (pos); -}, "~N"); -Clazz_defineMethod (c$, "remove", -function (c) { -if (Clazz_instanceOf (c, javax.swing.JMenuItem)) if (this.$popupMenu != null) this.$popupMenu.remove (c); -if (this.$popupMenu != null) this.$popupMenu.remove (c); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "removeAll", -function () { -if (this.$popupMenu != null) this.$popupMenu.removeAll (); -}); -Clazz_defineMethod (c$, "getMenuComponentCount", -function () { -var componentCount = 0; -if (this.$popupMenu != null) componentCount = this.$popupMenu.getComponentCount (); -return componentCount; -}); -Clazz_defineMethod (c$, "getMenuComponent", -function (n) { -if (this.$popupMenu != null) return this.$popupMenu.getComponent (n); -return null; -}, "~N"); -Clazz_defineMethod (c$, "getMenuComponents", -function () { -if (this.$popupMenu != null) return this.$popupMenu.getComponents (); -return new Array (0); -}); -Clazz_defineMethod (c$, "isTopLevelMenu", -function () { -if (Clazz_instanceOf (this.getParent (), javax.swing.JMenuBar)) return true; -return false; -}); -Clazz_defineMethod (c$, "isMenuComponent", -function (c) { -if (c === this) return true; -if (Clazz_instanceOf (c, javax.swing.JPopupMenu)) { -var comp = c; -if (comp === this.getPopupMenu ()) return true; -}var ncomponents = this.getMenuComponentCount (); -var component = this.getMenuComponents (); -for (var i = 0; i < ncomponents; i++) { -var comp = component[i]; -if (comp === c) return true; -if (Clazz_instanceOf (comp, javax.swing.JMenu)) { -var subMenu = comp; -if (subMenu.isMenuComponent (c)) return true; -}} -return false; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getPopupMenu", -function () { -this.ensurePopupMenuCreated (); -return this.$popupMenu; -}); -Clazz_defineMethod (c$, "addMenuListener", -function (l) { -this.listenerList.add (javax.swing.event.MenuListener, l); -}, "javax.swing.event.MenuListener"); -Clazz_defineMethod (c$, "removeMenuListener", -function (l) { -this.listenerList.remove (javax.swing.event.MenuListener, l); -}, "javax.swing.event.MenuListener"); -Clazz_defineMethod (c$, "getMenuListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.MenuListener); -}); -Clazz_defineMethod (c$, "fireMenuSelected", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuListener) { -if (listeners[i + 1] == null) { -throw new Error (this.getText () + " has a NULL Listener!! " + i); -} else { -if (this.menuEvent == null) this.menuEvent = new javax.swing.event.MenuEvent (this); -(listeners[i + 1]).menuSelected (this.menuEvent); -}}} -}); -Clazz_defineMethod (c$, "fireMenuDeselected", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuListener) { -if (listeners[i + 1] == null) { -throw new Error (this.getText () + " has a NULL Listener!! " + i); -} else { -if (this.menuEvent == null) this.menuEvent = new javax.swing.event.MenuEvent (this); -(listeners[i + 1]).menuDeselected (this.menuEvent); -}}} -}); -Clazz_defineMethod (c$, "fireMenuCanceled", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuListener) { -if (listeners[i + 1] == null) { -throw new Error (this.getText () + " has a NULL Listener!! " + i); -} else { -if (this.menuEvent == null) this.menuEvent = new javax.swing.event.MenuEvent (this); -(listeners[i + 1]).menuCanceled (this.menuEvent); -}}} -}); -Clazz_overrideMethod (c$, "configureAcceleratorFromAction", -function (a) { -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "createMenuChangeListener", - function () { -return Clazz_innerTypeInstance (javax.swing.JMenu.MenuChangeListener, this, null); -}); -Clazz_defineMethod (c$, "createWinListener", -function (p) { -return Clazz_innerTypeInstance (javax.swing.JMenu.WinListener, this, null, p); -}, "javax.swing.JPopupMenu"); -Clazz_overrideMethod (c$, "menuSelectionChanged", -function (isIncluded) { -this.setSelected (isIncluded); -}, "~B"); -Clazz_overrideMethod (c$, "getSubElements", -function () { -if (this.$popupMenu == null) return new Array (0); - else { -var result = new Array (1); -result[0] = this.$popupMenu; -return result; -}}); -Clazz_defineMethod (c$, "getComponent", -function () { -return this; -}); -Clazz_defineMethod (c$, "applyComponentOrientation", -function (o) { -Clazz_superCall (this, javax.swing.JMenu, "applyComponentOrientation", [o]); -if (this.$popupMenu != null) { -var ncomponents = this.getMenuComponentCount (); -for (var i = 0; i < ncomponents; ++i) { -this.getMenuComponent (i).applyComponentOrientation (o); -} -this.$popupMenu.setComponentOrientation (o); -}}, "java.awt.ComponentOrientation"); -Clazz_defineMethod (c$, "setComponentOrientation", -function (o) { -Clazz_superCall (this, javax.swing.JMenu, "setComponentOrientation", [o]); -if (this.$popupMenu != null) { -this.$popupMenu.setComponentOrientation (o); -}}, "java.awt.ComponentOrientation"); -Clazz_overrideMethod (c$, "setAccelerator", -function (keyStroke) { -throw new Error ("setAccelerator() is not defined for JMenu. Use setMnemonic() instead."); -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "processKeyEvent", -function (evt) { -javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt); -if (evt.isConsumed ()) return; -Clazz_superCall (this, javax.swing.JMenu, "processKeyEvent", [evt]); -}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "doClick", -function (pressTime) { -var me = this.buildMenuElementArray (this); -javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me); -}, "~N"); -Clazz_defineMethod (c$, "buildMenuElementArray", - function (leaf) { -var elements = new java.util.Vector (); -var current = leaf.getPopupMenu (); -var pop; -var menu; -var bar; -while (true) { -if (Clazz_instanceOf (current, javax.swing.JPopupMenu)) { -pop = current; -elements.insertElementAt (pop, 0); -current = pop.getInvoker (); -} else if (Clazz_instanceOf (current, javax.swing.JMenu)) { -menu = current; -elements.insertElementAt (menu, 0); -current = menu.getParent (); -} else if (Clazz_instanceOf (current, javax.swing.JMenuBar)) { -bar = current; -elements.insertElementAt (bar, 0); -var me = new Array (elements.size ()); -elements.copyInto (me); -return me; -}} -}, "javax.swing.JMenu"); -c$.$JMenu$MenuChangeListener$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -this.isSelected = false; -Clazz_instantialize (this, arguments); -}, javax.swing.JMenu, "MenuChangeListener", null, javax.swing.event.ChangeListener); -Clazz_overrideMethod (c$, "stateChanged", -function (a) { -var b = a.getSource (); -var c = b.isSelected (); -if (c != this.isSelected) { -if (c == true) { -this.b$["javax.swing.JMenu"].fireMenuSelected (); -} else { -this.b$["javax.swing.JMenu"].fireMenuDeselected (); -}this.isSelected = c; -}}, "javax.swing.event.ChangeEvent"); -c$ = Clazz_p0p (); -}; -c$.$JMenu$WinListener$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -Clazz_prepareCallback (this, arguments); -this.popupMenu = null; -Clazz_instantialize (this, arguments); -}, javax.swing.JMenu, "WinListener", java.awt.event.WindowAdapter); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, javax.swing.JMenu.WinListener, []); -this.popupMenu = a; -}, "javax.swing.JPopupMenu"); -Clazz_overrideMethod (c$, "windowClosing", -function (a) { -this.b$["javax.swing.JMenu"].setSelected (false); -}, "java.awt.event.WindowEvent"); -c$ = Clazz_p0p (); -}; -c$.$JMenu$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (javax.swing, "JMenu$1", javax.swing.JMenuItem); -Clazz_defineMethod (c$, "createActionPropertyChangeListener", -function (a) { -var pcl = this.b$["javax.swing.JMenu"].createActionChangeListener (this); -if (pcl == null) { -pcl = Clazz_superCall (this, javax.swing.JMenu$1, "createActionPropertyChangeListener", [a]); -}return pcl; -}, "javax.swing.Action"); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"$$uiClassID", "MenuUI"); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.event.WindowAdapter", null, function () { -c$ = Clazz_declareType (java.awt.event, "WindowAdapter", null, [java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.awt.event.WindowFocusListener]); -Clazz_overrideMethod (c$, "windowOpened", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowClosing", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowClosed", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowIconified", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowDeiconified", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowActivated", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowDeactivated", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowStateChanged", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowGainedFocus", -function (e) { -}, "java.awt.event.WindowEvent"); -Clazz_overrideMethod (c$, "windowLostFocus", -function (e) { -}, "java.awt.event.WindowEvent"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.event.FocusListener", "javax.swing.AbstractButton", "$.MenuElement"], "javax.swing.JMenuItem", ["java.lang.Boolean", "javax.swing.DefaultButtonModel", "$.UIManager", "javax.swing.event.MenuDragMouseEvent", "$.MenuDragMouseListener", "$.MenuKeyEvent", "$.MenuKeyListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.isMouseDragged = false; -this.accelerator = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JMenuItem", javax.swing.AbstractButton, javax.swing.MenuElement); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JMenuItem, []); -this.init0 (null, null, -2147483648); -}); -Clazz_makeConstructor (c$, -function (icon) { -Clazz_superConstructor (this, javax.swing.JMenuItem, []); -this.init0 (null, icon, -2147483648); -}, "javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text) { -Clazz_superConstructor (this, javax.swing.JMenuItem, []); -this.init0 (text, null, -2147483648); -}, "~S"); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, javax.swing.JMenuItem, []); -this.init0 (null, null, -2147483648); -this.setAction (a); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function (text, icon) { -Clazz_superConstructor (this, javax.swing.JMenuItem, []); -this.init0 (text, icon, -2147483648); -}, "~S,javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text, mnemonic) { -Clazz_superConstructor (this, javax.swing.JMenuItem, []); -this.init0 (text, null, mnemonic); -}, "~S,~N"); -Clazz_defineMethod (c$, "setModel", -function (newModel) { -Clazz_superCall (this, javax.swing.JMenuItem, "setModel", [newModel]); -if (Clazz_instanceOf (newModel, javax.swing.DefaultButtonModel)) { -(newModel).setMenuItem (true); -}}, "javax.swing.ButtonModel"); -Clazz_defineMethod (c$, "initFocusability", -function () { -this.setFocusable (false); -}); -Clazz_defineMethod (c$, "init0", -function (text, icon, mnemonic) { -this.setModel ( new javax.swing.DefaultButtonModel ()); -this.init (text, icon); -if (mnemonic >= 0) this.setMnemonic (mnemonic); -this.initFocusability (); -}, "~S,javax.swing.Icon,~N"); -Clazz_overrideMethod (c$, "init", -function (text, icon) { -this.updateUI (); -if (text != null) this.setText (text); -if (icon != null) this.setIcon (icon); -this.addFocusListener ( new javax.swing.JMenuItem.MenuItemFocusListener ()); -this.setUIProperty ("borderPainted", Boolean.FALSE); -this.setFocusPainted (false); -this.setHorizontalTextPosition (11); -this.setHorizontalAlignment (10); -}, "~S,javax.swing.Icon"); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "MenuItemUI"; -}); -Clazz_defineMethod (c$, "setArmed", -function (b) { -var model = this.getModel (); -if (model.isArmed () != b) { -model.setArmed (b); -}}, "~B"); -Clazz_defineMethod (c$, "isArmed", -function () { -var model = this.getModel (); -return model.isArmed (); -}); -Clazz_defineMethod (c$, "setEnabled", -function (b) { -if (!b && !javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) { -this.setArmed (false); -}Clazz_superCall (this, javax.swing.JMenuItem, "setEnabled", [b]); -}, "~B"); -Clazz_overrideMethod (c$, "alwaysOnTop", -function () { -return true; -}); -Clazz_defineMethod (c$, "setAccelerator", -function (keyStroke) { -var oldAccelerator = this.accelerator; -this.accelerator = keyStroke; -this.repaint (); -this.revalidate (); -this.firePropertyChangeObject ("accelerator", oldAccelerator, this.accelerator); -}, "javax.swing.KeyStroke"); -Clazz_defineMethod (c$, "getAccelerator", -function () { -return this.accelerator; -}); -Clazz_defineMethod (c$, "configurePropertiesFromAction", -function (a) { -Clazz_superCall (this, javax.swing.JMenuItem, "configurePropertiesFromAction", [a]); -this.configureAcceleratorFromAction (a); -}, "javax.swing.Action"); -Clazz_overrideMethod (c$, "setIconFromAction", -function (a) { -var icon = null; -if (a != null) { -icon = a.getValue ("SmallIcon"); -}this.setIcon (icon); -}, "javax.swing.Action"); -Clazz_overrideMethod (c$, "largeIconChanged", -function (a) { -}, "javax.swing.Action"); -Clazz_overrideMethod (c$, "smallIconChanged", -function (a) { -this.setIconFromAction (a); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "configureAcceleratorFromAction", -function (a) { -var ks = (a == null) ? null : a.getValue ("AcceleratorKey"); -this.setAccelerator (ks); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "actionPropertyChanged", -function (action, propertyName) { -if (propertyName === "AcceleratorKey") { -this.configureAcceleratorFromAction (action); -} else { -Clazz_superCall (this, javax.swing.JMenuItem, "actionPropertyChanged", [action, propertyName]); -}}, "javax.swing.Action,~S"); -Clazz_defineMethod (c$, "processMouseEvent", -function (e, path, manager) { -this.processMenuDragMouseEvent ( new javax.swing.event.MenuDragMouseEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getX (), e.getY (), e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), path, manager)); -}, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager"); -Clazz_defineMethod (c$, "processKeyEvent", -function (e, path, manager) { -var mke = new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager); -this.processMenuKeyEvent (mke); -if (mke.isConsumed ()) { -e.consume (); -}}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager"); -Clazz_defineMethod (c$, "processMenuDragMouseEvent", -function (e) { -switch (e.getID ()) { -case 504: -this.isMouseDragged = false; -this.fireMenuDragMouseEntered (e); -break; -case 505: -this.isMouseDragged = false; -this.fireMenuDragMouseExited (e); -break; -case 506: -this.isMouseDragged = true; -this.fireMenuDragMouseDragged (e); -break; -case 502: -if (this.isMouseDragged) this.fireMenuDragMouseReleased (e); -break; -default: -break; -} -}, "javax.swing.event.MenuDragMouseEvent"); -Clazz_defineMethod (c$, "processMenuKeyEvent", -function (e) { -switch (e.getID ()) { -case 401: -this.fireMenuKeyPressed (e); -break; -case 402: -this.fireMenuKeyReleased (e); -break; -case 400: -this.fireMenuKeyTyped (e); -break; -default: -break; -} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_defineMethod (c$, "fireMenuDragMouseEntered", -function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuDragMouseListener) { -(listeners[i + 1]).menuDragMouseEntered (event); -}} -}, "javax.swing.event.MenuDragMouseEvent"); -Clazz_defineMethod (c$, "fireMenuDragMouseExited", -function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuDragMouseListener) { -(listeners[i + 1]).menuDragMouseExited (event); -}} -}, "javax.swing.event.MenuDragMouseEvent"); -Clazz_defineMethod (c$, "fireMenuDragMouseDragged", -function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuDragMouseListener) { -(listeners[i + 1]).menuDragMouseDragged (event); -}} -}, "javax.swing.event.MenuDragMouseEvent"); -Clazz_defineMethod (c$, "fireMenuDragMouseReleased", -function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuDragMouseListener) { -(listeners[i + 1]).menuDragMouseReleased (event); -}} -}, "javax.swing.event.MenuDragMouseEvent"); -Clazz_defineMethod (c$, "fireMenuKeyPressed", -function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuKeyListener) { -(listeners[i + 1]).menuKeyPressed (event); -}} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_defineMethod (c$, "fireMenuKeyReleased", -function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuKeyListener) { -(listeners[i + 1]).menuKeyReleased (event); -}} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_defineMethod (c$, "fireMenuKeyTyped", -function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuKeyListener) { -(listeners[i + 1]).menuKeyTyped (event); -}} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_overrideMethod (c$, "menuSelectionChanged", -function (isIncluded) { -this.setArmed (isIncluded); -}, "~B"); -Clazz_overrideMethod (c$, "getSubElements", -function () { -return new Array (0); -}); -Clazz_defineMethod (c$, "getComponent", -function () { -return this; -}); -Clazz_defineMethod (c$, "addMenuDragMouseListener", -function (l) { -this.listenerList.add (javax.swing.event.MenuDragMouseListener, l); -}, "javax.swing.event.MenuDragMouseListener"); -Clazz_defineMethod (c$, "removeMenuDragMouseListener", -function (l) { -this.listenerList.remove (javax.swing.event.MenuDragMouseListener, l); -}, "javax.swing.event.MenuDragMouseListener"); -Clazz_defineMethod (c$, "getMenuDragMouseListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.MenuDragMouseListener); -}); -Clazz_defineMethod (c$, "addMenuKeyListener", -function (l) { -this.listenerList.add (javax.swing.event.MenuKeyListener, l); -}, "javax.swing.event.MenuKeyListener"); -Clazz_defineMethod (c$, "removeMenuKeyListener", -function (l) { -this.listenerList.remove (javax.swing.event.MenuKeyListener, l); -}, "javax.swing.event.MenuKeyListener"); -Clazz_defineMethod (c$, "getMenuKeyListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.MenuKeyListener); -}); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.JMenuItem, "MenuItemFocusListener", null, java.awt.event.FocusListener); -Clazz_overrideMethod (c$, "focusGained", -function (a) { -}, "java.awt.event.FocusEvent"); -Clazz_overrideMethod (c$, "focusLost", -function (a) { -var b = a.getSource (); -if (b.isFocusPainted ()) { -b.repaint (); -}}, "java.awt.event.FocusEvent"); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"$uiClassID", "MenuItemUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JMenuItem", "$.SwingConstants"], "javax.swing.JCheckBoxMenuItem", ["javax.swing.JToggleButton"], function () { -c$ = Clazz_declareType (javax.swing, "JCheckBoxMenuItem", javax.swing.JMenuItem, javax.swing.SwingConstants); -Clazz_makeConstructor (c$, -function () { -this.construct (null, null, false); -}); -Clazz_makeConstructor (c$, -function (icon) { -this.construct (null, icon, false); -}, "javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text) { -this.construct (text, null, false); -}, "~S"); -Clazz_makeConstructor (c$, -function (a) { -this.construct (); -this.setAction (a); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function (text, icon) { -this.construct (text, icon, false); -}, "~S,javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text, b) { -this.construct (text, null, b); -}, "~S,~B"); -Clazz_makeConstructor (c$, -function (text, icon, b) { -Clazz_superConstructor (this, javax.swing.JCheckBoxMenuItem, [text, icon]); -this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ()); -this.setSelected (b); -this.setFocusable (false); -}, "~S,javax.swing.Icon,~B"); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "CheckBoxMenuItemUI"; -}); -Clazz_defineMethod (c$, "getState", -function () { -return this.isSelected (); -}); -Clazz_defineMethod (c$, "setState", -function (b) { -this.setSelected (b); -}, "~B"); -Clazz_overrideMethod (c$, "getSelectedObjects", -function () { -if (this.isSelected () == false) return null; -var selectedObjects = new Array (1); -selectedObjects[0] = this.getText (); -return selectedObjects; -}); -Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", -function () { -return true; -}); -Clazz_defineStatics (c$, -"$$uiClassID", "CheckBoxMenuItemUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JMenuItem"], "javax.swing.JRadioButtonMenuItem", ["javax.swing.JToggleButton"], function () { -c$ = Clazz_declareType (javax.swing, "JRadioButtonMenuItem", javax.swing.JMenuItem); -Clazz_makeConstructor (c$, -function () { -this.construct (null, null, false); -}); -Clazz_makeConstructor (c$, -function (icon) { -this.construct (null, icon, false); -}, "javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text) { -this.construct (text, null, false); -}, "~S"); -Clazz_makeConstructor (c$, -function (a) { -this.construct (); -this.setAction (a); -}, "javax.swing.Action"); -Clazz_makeConstructor (c$, -function (text, icon) { -this.construct (text, icon, false); -}, "~S,javax.swing.Icon"); -Clazz_makeConstructor (c$, -function (text, selected) { -this.construct (text); -this.setSelected (selected); -}, "~S,~B"); -Clazz_makeConstructor (c$, -function (icon, selected) { -this.construct (null, icon, selected); -}, "javax.swing.Icon,~B"); -Clazz_makeConstructor (c$, -function (text, icon, selected) { -Clazz_superConstructor (this, javax.swing.JRadioButtonMenuItem, [text, icon]); -this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ()); -this.setSelected (selected); -this.setFocusable (false); -}, "~S,javax.swing.Icon,~B"); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "RadioButtonMenuItemUI"; -}); -Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", -function () { -return true; -}); -Clazz_defineStatics (c$, -"$$uiClassID", "RadioButtonMenuItemUI"); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuDragMouseListener", null, function () { -Clazz_declareInterface (javax.swing.event, "MenuDragMouseListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.awt.event.KeyEvent"], "javax.swing.event.MenuKeyEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.path = null; -this.manager = null; -Clazz_instantialize (this, arguments); -}, javax.swing.event, "MenuKeyEvent", java.awt.event.KeyEvent); -Clazz_makeConstructor (c$, -function (source, id, when, modifiers, keyCode, keyChar, p, m) { -Clazz_superConstructor (this, javax.swing.event.MenuKeyEvent, [source, id, when, modifiers, keyCode, keyChar]); -this.path = p; -this.manager = m; -}, "java.awt.Component,~N,~N,~N,~N,~S,~A,javax.swing.MenuSelectionManager"); -Clazz_defineMethod (c$, "getPath", -function () { -return this.path; -}); -Clazz_defineMethod (c$, "getMenuSelectionManager", -function () { -return this.manager; -}); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuKeyListener", null, function () { -Clazz_declareInterface (javax.swing.event, "MenuKeyListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JComponent", "$.JSeparator", "$.MenuElement"], "javax.swing.JPopupMenu", ["java.lang.Boolean", "$.IllegalArgumentException", "java.util.Vector", "java.awt.Dimension", "$.Frame", "$.GraphicsEnvironment", "$.Insets", "$.Point", "javax.swing.DefaultSingleSelectionModel", "$.JMenu", "$.JMenuItem", "$.MenuSelectionManager", "$.PopupFactory", "$.SwingUtilities", "$.UIManager", "javax.swing.event.MenuKeyEvent", "$.MenuKeyListener", "$.PopupMenuEvent", "$.PopupMenuListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.invoker = null; -this.popup = null; -this.frame = null; -this.desiredLocationX = 0; -this.desiredLocationY = 0; -this.label = null; -this.$paintBorder = true; -this.margin = null; -this.lightWeightPopup = true; -this.selectionModel = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JPopupMenu", javax.swing.JComponent, javax.swing.MenuElement); -c$.setDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "setDefaultLightWeightPopupEnabled", -function (aFlag) { -javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.$valueOf (aFlag)); -}, "~B"); -c$.getDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "getDefaultLightWeightPopupEnabled", -function () { -var b = javax.swing.SwingUtilities.appContextGet (javax.swing.JPopupMenu.defaultLWPopupEnabledKey); -if (b == null) { -javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.TRUE); -return true; -}return b.booleanValue (); -}); -Clazz_makeConstructor (c$, -function () { -this.construct (null); -}); -Clazz_makeConstructor (c$, -function (label) { -Clazz_superConstructor (this, javax.swing.JPopupMenu, []); -this.label = label; -this.lightWeightPopup = javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled (); -this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ()); -this.enableEvents (16); -this.updateUI (); -}, "~S"); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "PopupMenuUI"; -}); -Clazz_defineMethod (c$, "processKeyEvent", -function (evt) { -javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt); -if (evt.isConsumed ()) { -return; -}Clazz_superCall (this, javax.swing.JPopupMenu, "processKeyEvent", [evt]); -}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "getSelectionModel", -function () { -return this.selectionModel; -}); -Clazz_defineMethod (c$, "setSelectionModel", -function (model) { -this.selectionModel = model; -}, "javax.swing.SingleSelectionModel"); -Clazz_defineMethod (c$, "add", -function (menuItem) { -Clazz_superCall (this, javax.swing.JPopupMenu, "add", [menuItem]); -return menuItem; -}, "javax.swing.JMenuItem"); -Clazz_defineMethod (c$, "add", -function (s) { -return this.add ( new javax.swing.JMenuItem (s)); -}, "~S"); -Clazz_defineMethod (c$, "add", -function (a) { -var mi = this.createActionComponent (a); -mi.setAction (a); -this.add (mi); -return mi; -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "adjustPopupLocationToFitScreen", -function (xposition, yposition) { -var p = new java.awt.Point (xposition, yposition); -if (javax.swing.JPopupMenu.popupPostionFixDisabled == true || java.awt.GraphicsEnvironment.isHeadless ()) return p; -return p; -}, "~N,~N"); -Clazz_defineMethod (c$, "createActionComponent", -function (a) { -var mi = ((Clazz_isClassDefined ("javax.swing.JPopupMenu$1") ? 0 : javax.swing.JPopupMenu.$JPopupMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JPopupMenu$1, this, null)); -mi.setHorizontalTextPosition (11); -mi.setVerticalTextPosition (0); -return mi; -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "createActionChangeListener", -function (b) { -return b.createActionPropertyChangeListener0 (b.getAction ()); -}, "javax.swing.JMenuItem"); -Clazz_defineMethod (c$, "remove", -function (pos) { -if (pos < 0) { -throw new IllegalArgumentException ("index less than zero."); -}if (pos > this.getComponentCount () - 1) { -throw new IllegalArgumentException ("index greater than the number of items."); -}Clazz_superCall (this, javax.swing.JPopupMenu, "remove", [pos]); -}, "~N"); -Clazz_defineMethod (c$, "setLightWeightPopupEnabled", -function (aFlag) { -this.lightWeightPopup = aFlag; -}, "~B"); -Clazz_defineMethod (c$, "isLightWeightPopupEnabled", -function () { -return this.lightWeightPopup; -}); -Clazz_defineMethod (c$, "getLabel", -function () { -return this.label; -}); -Clazz_defineMethod (c$, "setLabel", -function (label) { -var oldValue = this.label; -this.label = label; -this.firePropertyChangeObject ("label", oldValue, label); -this.invalidate (); -this.repaint (); -}, "~S"); -Clazz_defineMethod (c$, "addSeparator", -function () { -this.add ( new javax.swing.JPopupMenu.Separator ()); -}); -Clazz_defineMethod (c$, "insert", -function (a, index) { -var mi = this.createActionComponent (a); -mi.setAction (a); -this.insert (mi, index); -}, "javax.swing.Action,~N"); -Clazz_defineMethod (c$, "insert", -function (component, index) { -if (index < 0) { -throw new IllegalArgumentException ("index less than zero."); -}var nitems = this.getComponentCount (); -var tempItems = new java.util.Vector (); -for (var i = index; i < nitems; i++) { -tempItems.addElement (this.getComponent (index)); -this.remove (index); -} -this.add (component); -for (var i = 0; i < tempItems.size (); i++) { -this.add (tempItems.elementAt (i)); -} -}, "java.awt.Component,~N"); -Clazz_defineMethod (c$, "addPopupMenuListener", -function (l) { -this.listenerList.add (javax.swing.event.PopupMenuListener, l); -}, "javax.swing.event.PopupMenuListener"); -Clazz_defineMethod (c$, "removePopupMenuListener", -function (l) { -this.listenerList.remove (javax.swing.event.PopupMenuListener, l); -}, "javax.swing.event.PopupMenuListener"); -Clazz_defineMethod (c$, "getPopupMenuListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.PopupMenuListener); -}); -Clazz_defineMethod (c$, "addMenuKeyListener", -function (l) { -this.listenerList.add (javax.swing.event.MenuKeyListener, l); -}, "javax.swing.event.MenuKeyListener"); -Clazz_defineMethod (c$, "removeMenuKeyListener", -function (l) { -this.listenerList.remove (javax.swing.event.MenuKeyListener, l); -}, "javax.swing.event.MenuKeyListener"); -Clazz_defineMethod (c$, "getMenuKeyListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.MenuKeyListener); -}); -Clazz_defineMethod (c$, "firePopupMenuWillBecomeVisible", -function () { -var listeners = this.listenerList.getListenerList (); -var e = null; -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.PopupMenuListener) { -if (e == null) e = new javax.swing.event.PopupMenuEvent (this); -(listeners[i + 1]).popupMenuWillBecomeVisible (e); -}} -}); -Clazz_defineMethod (c$, "firePopupMenuWillBecomeInvisible", -function () { -var listeners = this.listenerList.getListenerList (); -var e = null; -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.PopupMenuListener) { -if (e == null) e = new javax.swing.event.PopupMenuEvent (this); -(listeners[i + 1]).popupMenuWillBecomeInvisible (e); -}} -}); -Clazz_defineMethod (c$, "firePopupMenuCanceled", -function () { -var listeners = this.listenerList.getListenerList (); -var e = null; -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.PopupMenuListener) { -if (e == null) e = new javax.swing.event.PopupMenuEvent (this); -(listeners[i + 1]).popupMenuCanceled (e); -}} -}); -Clazz_overrideMethod (c$, "alwaysOnTop", -function () { -return true; -}); -Clazz_defineMethod (c$, "pack", -function () { -if (this.popup != null) { -var pref = this.getPreferredSize (); -if (pref == null || pref.width != this.getWidth () || pref.height != this.getHeight ()) { -this.popup = this.getPopup (); -} else { -this.validate (); -}}}); -Clazz_overrideMethod (c$, "setVisible", -function (b) { -if (b == this.isVisible ()) return; -if (b == false) { -var doCanceled = this.getClientProperty ("JPopupMenu.firePopupMenuCanceled"); -if (doCanceled != null && doCanceled === Boolean.TRUE) { -this.putClientProperty ("JPopupMenu.firePopupMenuCanceled", Boolean.FALSE); -this.firePopupMenuCanceled (); -}this.getSelectionModel ().clearSelection (); -} else { -if (this.isPopupMenu ()) { -var me = new Array (1); -me[0] = this; -javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me); -}}if (b) { -this.firePopupMenuWillBecomeVisible (); -this.popup = this.getPopup (); -this.firePropertyChangeObject ("visible", Boolean.FALSE, Boolean.TRUE); -} else if (this.popup != null) { -this.firePopupMenuWillBecomeInvisible (); -this.popup.hide (); -this.popup = null; -this.firePropertyChangeObject ("visible", Boolean.TRUE, Boolean.FALSE); -if (this.isPopupMenu ()) { -javax.swing.MenuSelectionManager.defaultManager ().clearSelectedPath (); -}}}, "~B"); -Clazz_defineMethod (c$, "getPopup", - function () { -var oldPopup = this.popup; -if (oldPopup != null) { -oldPopup.hide (); -}var popupFactory = javax.swing.PopupFactory.getSharedInstance (); -if (this.isLightWeightPopupEnabled ()) { -popupFactory.setPopupType (0); -} else { -popupFactory.setPopupType (1); -}var p = this.adjustPopupLocationToFitScreen (this.desiredLocationX, this.desiredLocationY); -this.desiredLocationX = p.x; -this.desiredLocationY = p.y; -var newPopup = this.getUI ().getPopup (this, this.desiredLocationX, this.desiredLocationY); -popupFactory.setPopupType (0); -newPopup.show (); -return newPopup; -}); -Clazz_overrideMethod (c$, "isVisible", -function () { -if (this.popup != null) return true; - else return false; -}); -Clazz_defineMethod (c$, "setLocation", -function (x, y) { -var oldX = this.desiredLocationX; -var oldY = this.desiredLocationY; -this.desiredLocationX = x; -this.desiredLocationY = y; -if (this.popup != null && (x != oldX || y != oldY)) { -this.popup = this.getPopup (); -}}, "~N,~N"); -Clazz_defineMethod (c$, "isPopupMenu", - function () { -return ((this.invoker != null) && !(Clazz_instanceOf (this.invoker, javax.swing.JMenu))); -}); -Clazz_defineMethod (c$, "getInvoker", -function () { -return this.invoker; -}); -Clazz_defineMethod (c$, "setInvoker", -function (invoker) { -var oldInvoker = this.invoker; -this.invoker = invoker; -if ((oldInvoker !== this.invoker) && (this.ui != null)) { -this.ui.uninstallUI (this); -this.ui.installUI (this); -}this.invalidate (); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "show", -function (invoker, x, y) { -this.setInvoker (invoker); -var newFrame = javax.swing.JPopupMenu.getFrame (invoker); -if (newFrame !== this.frame) { -if (newFrame != null) { -this.frame = newFrame; -if (this.popup != null) { -this.setVisible (false); -}}}var invokerOrigin; -if (invoker != null) { -invokerOrigin = invoker.getLocationOnScreen (); -var lx; -var ly; -lx = (invokerOrigin.x) + (x); -ly = (invokerOrigin.y) + (y); -if (lx > 2147483647) lx = 2147483647; -if (lx < -2147483648) lx = -2147483648; -if (ly > 2147483647) ly = 2147483647; -if (ly < -2147483648) ly = -2147483648; -this.setLocation (lx, ly); -} else { -this.setLocation (x, y); -}this.setVisible (true); -}, "java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getRootPopupMenu", -function () { -var mp = this; -while ((mp != null) && (mp.isPopupMenu () != true) && (mp.getInvoker () != null) && (mp.getInvoker ().getParent () != null) && (Clazz_instanceOf (mp.getInvoker ().getParent (), javax.swing.JPopupMenu))) { -mp = mp.getInvoker ().getParent (); -} -return mp; -}); -Clazz_defineMethod (c$, "getComponentAtIndex", -function (i) { -return this.getComponent (i); -}, "~N"); -Clazz_defineMethod (c$, "getComponentIndex", -function (c) { -var ncomponents = this.getComponentCount (); -var component = this.getComponents (); -for (var i = 0; i < ncomponents; i++) { -var comp = component[i]; -if (comp === c) return i; -} -return -1; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "setPopupSize", -function (d) { -var oldSize = this.getPreferredSize (); -this.setPreferredSize (d); -if (this.popup != null) { -var newSize = this.getPreferredSize (); -if (!oldSize.equals (newSize)) { -this.popup = this.getPopup (); -}}}, "java.awt.Dimension"); -Clazz_defineMethod (c$, "setPopupSize", -function (width, height) { -this.setPopupSize ( new java.awt.Dimension (width, height)); -}, "~N,~N"); -Clazz_defineMethod (c$, "setSelected", -function (sel) { -var model = this.getSelectionModel (); -var index = this.getComponentIndex (sel); -model.setSelectedIndex (index); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "isBorderPainted", -function () { -return this.$paintBorder; -}); -Clazz_defineMethod (c$, "setBorderPainted", -function (b) { -this.$paintBorder = b; -this.repaint (); -}, "~B"); -Clazz_defineMethod (c$, "paintBorder", -function (g) { -if (this.isBorderPainted ()) { -Clazz_superCall (this, javax.swing.JPopupMenu, "paintBorder", [g]); -}}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "getMargin", -function () { -if (this.margin == null) { -return new java.awt.Insets (0, 0, 0, 0); -} else { -return this.margin; -}}); -Clazz_defineMethod (c$, "isSubPopupMenu", -function (popup) { -var ncomponents = this.getComponentCount (); -var component = this.getComponents (); -for (var i = 0; i < ncomponents; i++) { -var comp = component[i]; -if (Clazz_instanceOf (comp, javax.swing.JMenu)) { -var menu = comp; -var subPopup = menu.getPopupMenu (); -if (subPopup === popup) return true; -if (subPopup.isSubPopupMenu (popup)) return true; -}} -return false; -}, "javax.swing.JPopupMenu"); -c$.getFrame = Clazz_defineMethod (c$, "getFrame", - function (c) { -var w = c; -while (!(Clazz_instanceOf (w, java.awt.Frame)) && (w != null)) { -w = w.getParent (); -} -return w; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "paramString", -function () { -var labelString = (this.label != null ? this.label : ""); -var paintBorderString = (this.$paintBorder ? "true" : "false"); -var marginString = (this.margin != null ? this.margin.toString () : ""); -var lightWeightPopupEnabledString = (this.isLightWeightPopupEnabled () ? "true" : "false"); -return Clazz_superCall (this, javax.swing.JPopupMenu, "paramString", []) + ",desiredLocationX=" + this.desiredLocationX + ",desiredLocationY=" + this.desiredLocationY + ",label=" + labelString + ",lightWeightPopupEnabled=" + lightWeightPopupEnabledString + ",margin=" + marginString + ",paintBorder=" + paintBorderString; -}); -Clazz_defineMethod (c$, "processMouseEvent", -function (event, path, manager) { -}, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager"); -Clazz_defineMethod (c$, "processKeyEvent", -function (e, path, manager) { -var mke = new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager); -this.processMenuKeyEvent (mke); -if (mke.isConsumed ()) { -e.consume (); -}}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager"); -Clazz_defineMethod (c$, "processMenuKeyEvent", - function (e) { -switch (e.getID ()) { -case 401: -this.fireMenuKeyPressed (e); -break; -case 402: -this.fireMenuKeyReleased (e); -break; -case 400: -this.fireMenuKeyTyped (e); -break; -default: -break; -} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_defineMethod (c$, "fireMenuKeyPressed", - function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuKeyListener) { -(listeners[i + 1]).menuKeyPressed (event); -}} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_defineMethod (c$, "fireMenuKeyReleased", - function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuKeyListener) { -(listeners[i + 1]).menuKeyReleased (event); -}} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_defineMethod (c$, "fireMenuKeyTyped", - function (event) { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.MenuKeyListener) { -(listeners[i + 1]).menuKeyTyped (event); -}} -}, "javax.swing.event.MenuKeyEvent"); -Clazz_overrideMethod (c$, "menuSelectionChanged", -function (isIncluded) { -if (Clazz_instanceOf (this.invoker, javax.swing.JMenu)) { -var m = this.invoker; -if (isIncluded) m.setPopupMenuVisible (true); - else m.setPopupMenuVisible (false); -}if (this.isPopupMenu () && !isIncluded) this.setVisible (false); -}, "~B"); -Clazz_overrideMethod (c$, "getSubElements", -function () { -var result; -var tmp = new java.util.Vector (); -var c = this.getComponentCount (); -var i; -var m; -for (i = 0; i < c; i++) { -m = this.getComponent (i); -if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m); -} -result = new Array (tmp.size ()); -for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i); - -return result; -}); -Clazz_defineMethod (c$, "getComponent", -function () { -return this; -}); -Clazz_defineMethod (c$, "isPopupTrigger", -function (e) { -return this.getUI ().isPopupTrigger (e); -}, "java.awt.event.MouseEvent"); -c$.$JPopupMenu$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (javax.swing, "JPopupMenu$1", javax.swing.JMenuItem); -Clazz_defineMethod (c$, "createActionPropertyChangeListener", -function (a) { -var pcl = this.b$["javax.swing.JPopupMenu"].createActionChangeListener (this); -if (pcl == null) { -pcl = Clazz_superCall (this, javax.swing.JPopupMenu$1, "createActionPropertyChangeListener", [a]); -}return pcl; -}, "javax.swing.Action"); -c$ = Clazz_p0p (); -}; -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.JPopupMenu, "Separator", javax.swing.JSeparator); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JPopupMenu.Separator, [0]); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "PopupMenuSeparatorUI"; -}); -c$ = Clazz_p0p (); -Clazz_defineStatics (c$, -"$uiClassID", "PopupMenuUI"); -c$.defaultLWPopupEnabledKey = c$.prototype.defaultLWPopupEnabledKey = new Clazz._O (); -Clazz_defineStatics (c$, -"popupPostionFixDisabled", false); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this.orientation = 0; -Clazz_instantialize (this, arguments); -}, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants); -Clazz_makeConstructor (c$, -function () { -this.construct (0); -}); -Clazz_makeConstructor (c$, -function (orientation) { -Clazz_superConstructor (this, javax.swing.JSeparator, []); -this.checkOrientation (orientation); -this.orientation = orientation; -this.setFocusable (false); -this.updateUI (); -}, "~N"); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "SeparatorUI"; -}); -Clazz_defineMethod (c$, "getOrientation", -function () { -return this.orientation; -}); -Clazz_defineMethod (c$, "setOrientation", -function (orientation) { -if (this.orientation == orientation) { -return; -}var oldValue = this.orientation; -this.checkOrientation (orientation); -this.orientation = orientation; -this.firePropertyChangeInt ("orientation", oldValue, orientation); -this.revalidate (); -this.repaint (); -}, "~N"); -Clazz_defineMethod (c$, "checkOrientation", - function (orientation) { -switch (orientation) { -case 1: -case 0: -break; -default: -throw new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL"); -} -}, "~N"); -Clazz_defineMethod (c$, "paramString", -function () { -var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL"); -return Clazz_superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString; -}); -Clazz_defineStatics (c$, -"$uiClassID", "SeparatorUI"); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.util.Vector", "javax.swing.event.EventListenerList"], "javax.swing.MenuSelectionManager", ["java.awt.event.MouseEvent", "javax.swing.JComponent", "$.SwingUtilities", "javax.swing.event.ChangeEvent", "$.ChangeListener", "jssun.awt.AppContext"], function () { -c$ = Clazz_decorateAsClass (function () { -this.selection = null; -this.changeEvent = null; -this.listenerList = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "MenuSelectionManager"); -Clazz_prepareFields (c$, function () { -this.selection = new java.util.Vector (); -this.listenerList = new javax.swing.event.EventListenerList (); -}); -c$.defaultManager = Clazz_defineMethod (c$, "defaultManager", -function () { -{ -var context = jssun.awt.AppContext.getAppContext (); -var msm = context.get (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY); -if (msm == null) { -msm = new javax.swing.MenuSelectionManager (); -context.put (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY, msm); -}return msm; -}}); -Clazz_defineMethod (c$, "setSelectedPath", -function (path) { -var i; -var c; -var currentSelectionCount = this.selection.size (); -var firstDifference = 0; -if (path == null) { -path = new Array (0); -}for (i = 0, c = path.length; i < c; i++) { -if (i < currentSelectionCount && this.selection.elementAt (i) === path[i]) firstDifference++; - else break; -} -for (i = currentSelectionCount - 1; i >= firstDifference; i--) { -var me = this.selection.elementAt (i); -this.selection.removeElementAt (i); -me.menuSelectionChanged (false); -} -for (i = firstDifference, c = path.length; i < c; i++) { -if (path[i] != null) { -this.selection.addElement (path[i]); -path[i].menuSelectionChanged (true); -}} -this.fireStateChanged (); -}, "~A"); -Clazz_defineMethod (c$, "getSelectedPath", -function () { -var res = new Array (this.selection.size ()); -var i; -var c; -for (i = 0, c = this.selection.size (); i < c; i++) res[i] = this.selection.elementAt (i); - -return res; -}); -Clazz_defineMethod (c$, "clearSelectedPath", -function () { -if (this.selection.size () > 0) { -this.setSelectedPath (null); -}}); -Clazz_defineMethod (c$, "addChangeListener", -function (l) { -this.listenerList.add (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "removeChangeListener", -function (l) { -this.listenerList.remove (javax.swing.event.ChangeListener, l); -}, "javax.swing.event.ChangeListener"); -Clazz_defineMethod (c$, "getChangeListeners", -function () { -return this.listenerList.getListeners (javax.swing.event.ChangeListener); -}); -Clazz_defineMethod (c$, "fireStateChanged", -function () { -var listeners = this.listenerList.getListenerList (); -for (var i = listeners.length - 2; i >= 0; i -= 2) { -if (listeners[i] === javax.swing.event.ChangeListener) { -if (this.changeEvent == null) this.changeEvent = new javax.swing.event.ChangeEvent (this); -(listeners[i + 1]).stateChanged (this.changeEvent); -}} -}); -Clazz_defineMethod (c$, "processMouseEvent", -function (event) { -var screenX; -var screenY; -var p; -var i; -var j; -var d; -var mc; -var r2; -var cWidth; -var cHeight; -var menuElement; -var subElements; -var path; -var tmp; -var selectionSize; -p = event.getPoint (); -var source = event.getSource (); -if (!source.isShowing ()) { -return; -}var type = event.getID (); -var modifiers = event.getModifiers (); -if ((type == 504 || type == 505) && ((modifiers & (28)) != 0)) { -return; -}javax.swing.SwingUtilities.convertPointToScreen (p, source); -screenX = p.x; -screenY = p.y; -tmp = this.selection.clone (); -selectionSize = tmp.size (); -var success = false; -for (i = selectionSize - 1; i >= 0 && success == false; i--) { -menuElement = tmp.elementAt (i); -subElements = menuElement.getSubElements (); -path = null; -for (j = 0, d = subElements.length; j < d && success == false; j++) { -if (subElements[j] == null) continue; -mc = subElements[j].getComponent (); -if (!mc.isShowing ()) continue; -if (Clazz_instanceOf (mc, javax.swing.JComponent)) { -cWidth = (mc).getWidth (); -cHeight = (mc).getHeight (); -} else { -r2 = mc.getBounds (); -cWidth = r2.width; -cHeight = r2.height; -}p.x = screenX; -p.y = screenY; -javax.swing.SwingUtilities.convertPointFromScreen (p, mc); -if ((p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) { -var k; -if (path == null) { -path = new Array (i + 2); -for (k = 0; k <= i; k++) path[k] = tmp.elementAt (k); - -}path[i + 1] = subElements[j]; -var currentSelection = this.getSelectedPath (); -if (currentSelection[currentSelection.length - 1] !== path[i + 1] && (currentSelection.length < 2 || currentSelection[currentSelection.length - 2] !== path[i + 1])) { -var oldMC = currentSelection[currentSelection.length - 1].getComponent (); -var exitEvent = new java.awt.event.MouseEvent (oldMC, 505, event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0); -currentSelection[currentSelection.length - 1].processMouseEvent (exitEvent, path, this); -var enterEvent = new java.awt.event.MouseEvent (mc, 504, event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0); -subElements[j].processMouseEvent (enterEvent, path, this); -}var mouseEvent = new java.awt.event.MouseEvent (mc, event.getID (), event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0); -subElements[j].processMouseEvent (mouseEvent, path, this); -success = true; -event.consume (); -}} -} -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "componentForPoint", -function (source, sourcePoint) { -var screenX; -var screenY; -var p = sourcePoint; -var i; -var j; -var d; -var mc; -var r2; -var cWidth; -var cHeight; -var menuElement; -var subElements; -var tmp; -var selectionSize; -javax.swing.SwingUtilities.convertPointToScreen (p, source); -screenX = p.x; -screenY = p.y; -tmp = this.selection.clone (); -selectionSize = tmp.size (); -for (i = selectionSize - 1; i >= 0; i--) { -menuElement = tmp.elementAt (i); -subElements = menuElement.getSubElements (); -for (j = 0, d = subElements.length; j < d; j++) { -if (subElements[j] == null) continue; -mc = subElements[j].getComponent (); -if (!mc.isShowing ()) continue; -if (Clazz_instanceOf (mc, javax.swing.JComponent)) { -cWidth = (mc).getWidth (); -cHeight = (mc).getHeight (); -} else { -r2 = mc.getBounds (); -cWidth = r2.width; -cHeight = r2.height; -}p.x = screenX; -p.y = screenY; -javax.swing.SwingUtilities.convertPointFromScreen (p, mc); -if (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight) { -return mc; -}} -} -return null; -}, "java.awt.Component,java.awt.Point"); -Clazz_defineMethod (c$, "processKeyEvent", -function (e) { -var sel2 = new Array (0); -sel2 = this.selection.toArray (sel2); -var selSize = sel2.length; -var path; -if (selSize < 1) { -return; -}for (var i = selSize - 1; i >= 0; i--) { -var elem = sel2[i]; -var subs = elem.getSubElements (); -path = null; -for (var j = 0; j < subs.length; j++) { -if (subs[j] == null || !subs[j].getComponent ().isShowing () || !subs[j].getComponent ().isEnabled ()) { -continue; -}if (path == null) { -path = new Array (i + 2); -System.arraycopy (sel2, 0, path, 0, i + 1); -}path[i + 1] = subs[j]; -subs[j].processKeyEvent (e, path, this); -if (e.isConsumed ()) { -return; -}} -} -path = new Array (1); -path[0] = sel2[0]; -path[0].processKeyEvent (e, path, this); -if (e.isConsumed ()) { -return; -}}, "java.awt.event.KeyEvent"); -Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", -function (c) { -if (this.selection.size () > 0) { -var me = this.selection.elementAt (0); -return this.isComponentPartOfCurrentMenu (me, c); -} else return false; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", - function (root, c) { -var children; -var i; -var d; -if (root == null) return false; -if (root.getComponent () === c) return true; - else { -children = root.getSubElements (); -for (i = 0, d = children.length; i < d; i++) { -if (this.isComponentPartOfCurrentMenu (children[i], c)) return true; -} -}return false; -}, "javax.swing.MenuElement,java.awt.Component"); -c$.MENU_SELECTION_MANAGER_KEY = c$.prototype.MENU_SELECTION_MANAGER_KEY = new Clazz._O (); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Panel", "javax.swing.Popup", "$.SwingHeavyWeight", "java.awt.BorderLayout"], "javax.swing.PopupFactory", ["java.lang.Boolean", "$.IllegalArgumentException", "java.util.ArrayList", "$.HashMap", "java.applet.Applet", "java.awt.Container", "$.Insets", "$.Rectangle", "$.Toolkit", "$.Window", "java.awt.event.WindowAdapter", "javax.swing.ClientPropertyKey", "$.JApplet", "$.JComponent", "$.JDialog", "$.JFrame", "$.JLayeredPane", "$.JPanel", "$.JPopupMenu", "$.JRootPane", "$.JSeparator", "$.JToolTip", "$.JWindow", "$.MenuElement", "javax.swing.Popup.DefaultFrame", "$.HeavyWeightWindow", "javax.swing.RootPaneContainer", "$.SwingUtilities"], function () { -c$ = Clazz_decorateAsClass (function () { -this.popupType = 0; -Clazz_instantialize (this, arguments); -}, javax.swing, "PopupFactory"); -c$.setSharedInstance = Clazz_defineMethod (c$, "setSharedInstance", -function (factory) { -if (factory == null) { -throw new IllegalArgumentException ("PopupFactory can not be null"); -}javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.SharedInstanceKey, factory); -}, "javax.swing.PopupFactory"); -c$.getSharedInstance = Clazz_defineMethod (c$, "getSharedInstance", -function () { -var factory = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.SharedInstanceKey); -if (factory == null) { -factory = new javax.swing.PopupFactory (); -javax.swing.PopupFactory.setSharedInstance (factory); -}return factory; -}); -Clazz_defineMethod (c$, "setPopupType", -function (type) { -this.popupType = type; -}, "~N"); -Clazz_defineMethod (c$, "getPopupType", -function () { -return this.popupType; -}); -Clazz_defineMethod (c$, "getPopup", -function (owner, contents, x, y) { -if (contents == null) { -throw new IllegalArgumentException ("Popup.getPopup must be passed non-null contents"); -}var popupType = this.getPopupType (owner, contents, x, y); -var popup = this.getPopup (owner, contents, x, y, popupType); -if (popup == null) { -popup = this.getPopup (owner, contents, x, y, 2); -}return popup; -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getPopupType", - function (owner, contents, ownerX, ownerY) { -var popupType = this.getPopupType (); -if (owner == null || this.invokerInHeavyWeightPopup (owner)) { -popupType = 2; -} else if (popupType == 0 && !(Clazz_instanceOf (contents, javax.swing.JToolTip)) && !(Clazz_instanceOf (contents, javax.swing.JPopupMenu))) { -popupType = 1; -}var c = owner; -while (c != null) { -if (Clazz_instanceOf (c, javax.swing.JComponent)) { -if ((c).getClientProperty (javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP) === Boolean.TRUE) { -popupType = 2; -break; -}}c = c.getParent (); -} -return popupType; -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getPopup", - function (owner, contents, ownerX, ownerY, popupType) { -switch (popupType) { -case 0: -return this.getLightWeightPopup (owner, contents, ownerX, ownerY); -case 1: -return this.getMediumWeightPopup (owner, contents, ownerX, ownerY); -case 2: -return this.getHeavyWeightPopup (owner, contents, ownerX, ownerY); -} -return null; -}, "java.awt.Component,java.awt.Component,~N,~N,~N"); -Clazz_defineMethod (c$, "getLightWeightPopup", - function (owner, contents, ownerX, ownerY) { -return javax.swing.PopupFactory.LightWeightPopup.getLightWeightPopup (owner, contents, ownerX, ownerY); -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getMediumWeightPopup", - function (owner, contents, ownerX, ownerY) { -return javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopup (owner, contents, ownerX, ownerY); -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getHeavyWeightPopup", - function (owner, contents, ownerX, ownerY) { -return javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopup (owner, contents, ownerX, ownerY); -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "invokerInHeavyWeightPopup", - function (i) { -if (i != null) { -var parent; -for (parent = i.getParent (); parent != null; parent = parent.getParent ()) { -if (Clazz_instanceOf (parent, javax.swing.Popup.HeavyWeightWindow)) { -return true; -}} -}return false; -}, "java.awt.Component"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.PopupFactory, "HeavyWeightPopup", javax.swing.Popup); -c$.getHeavyWeightPopup = Clazz_defineMethod (c$, "getHeavyWeightPopup", -function (a, b, c, d) { -var e = (a != null) ? javax.swing.SwingUtilities.getWindowAncestor (a) : null; -var f = null; -if (e != null) { -f = javax.swing.PopupFactory.HeavyWeightPopup.getRecycledHeavyWeightPopup (e); -}var g = false; -if (b != null && b.isFocusable ()) { -if (Clazz_instanceOf (b, javax.swing.JPopupMenu)) { -var h = b; -var i = h.getComponents (); -for (var j = 0; j < i.length; j++) { -if (!(Clazz_instanceOf (i[j], javax.swing.MenuElement)) && !(Clazz_instanceOf (i[j], javax.swing.JSeparator))) { -g = true; -break; -}} -}}if (f == null || (f.getComponent ()).getFocusableWindowState () != g) { -if (f != null) { -f._dispose (); -}f = new javax.swing.PopupFactory.HeavyWeightPopup (); -}f.reset (a, b, c, d); -if (g) { -var h = f.getComponent (); -h.setFocusableWindowState (true); -h.setName ("###focusableSwingPopup###"); -}return f; -}, "java.awt.Component,java.awt.Component,~N,~N"); -c$.getRecycledHeavyWeightPopup = Clazz_defineMethod (c$, "getRecycledHeavyWeightPopup", - function (a) { -{ -var b; -var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache (); -if (c.containsKey (a)) { -b = c.get (a); -} else { -return null; -}var d; -if ((d = b.size ()) > 0) { -var e = b.get (0); -b.remove (0); -return e; -}return null; -}}, "java.awt.Window"); -c$.getHeavyWeightPopupCache = Clazz_defineMethod (c$, "getHeavyWeightPopupCache", - function () { -{ -var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey); -if (a == null) { -a = new java.util.HashMap (2); -javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey, a); -}return a; -}}); -c$.recycleHeavyWeightPopup = Clazz_defineMethod (c$, "recycleHeavyWeightPopup", - function (a) { -{ -var b; -var c = javax.swing.SwingUtilities.getWindowAncestor (a.getComponent ()); -var d = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache (); -if (Clazz_instanceOf (c, javax.swing.Popup.DefaultFrame) || !(c).isVisible ()) { -a._dispose (); -return; -} else if (d.containsKey (c)) { -b = d.get (c); -} else { -b = new java.util.ArrayList (); -d.put (c, b); -var e = c; -e.addWindowListener (((Clazz_isClassDefined ("javax.swing.PopupFactory$HeavyWeightPopup$1") ? 0 : javax.swing.PopupFactory.HeavyWeightPopup.$PopupFactory$HeavyWeightPopup$1$ ()), Clazz_innerTypeInstance (javax.swing.PopupFactory$HeavyWeightPopup$1, this, Clazz_cloneFinals ("e", e)))); -}if (b.size () < 5) { -b.add (a); -} else { -a._dispose (); -}}}, "javax.swing.PopupFactory.HeavyWeightPopup"); -Clazz_defineMethod (c$, "hide", -function () { -Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "hide", []); -javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup (this); -}); -Clazz_defineMethod (c$, "dispose", -function () { -}); -Clazz_defineMethod (c$, "_dispose", -function () { -Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "dispose", []); -}); -c$.$PopupFactory$HeavyWeightPopup$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (javax.swing, "PopupFactory$HeavyWeightPopup$1", java.awt.event.WindowAdapter); -Clazz_overrideMethod (c$, "windowClosed", -function (a) { -var b; -{ -var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache (); -b = c.remove (this.f$.e); -}if (b != null) { -for (var c = b.size () - 1; c >= 0; c--) { -(b.get (c))._dispose (); -} -}}, "java.awt.event.WindowEvent"); -c$ = Clazz_p0p (); -}; -c$.heavyWeightPopupCacheKey = c$.prototype.heavyWeightPopupCacheKey = new Clazz._O (); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.owner = null; -this.x = 0; -this.y = 0; -Clazz_instantialize (this, arguments); -}, javax.swing.PopupFactory, "ContainerPopup", javax.swing.Popup); -Clazz_overrideMethod (c$, "hide", -function () { -var a = this.getComponent (); -if (a != null) { -var b = a.getParent (); -if (b != null) { -var c = a.getBounds (); -b.remove (a); -b.repaint (c.x, c.y, c.width, c.height); -}}this.owner = null; -}); -Clazz_overrideMethod (c$, "pack", -function () { -var a = this.getComponent (); -if (a != null) { -a.setSize (a.getPreferredSize ()); -}}); -Clazz_defineMethod (c$, "reset", -function (a, b, c, d) { -if ((Clazz_instanceOf (a, javax.swing.JFrame)) || (Clazz_instanceOf (a, javax.swing.JDialog)) || (Clazz_instanceOf (a, javax.swing.JWindow))) { -a = (a).getLayeredPane (); -}Clazz_superCall (this, javax.swing.PopupFactory.ContainerPopup, "reset", [a, b, c, d]); -this.x = c; -this.y = d; -this.owner = a; -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "overlappedByOwnedWindow", -function () { -var a = this.getComponent (); -if (this.owner != null && a != null) { -var b = javax.swing.SwingUtilities.getWindowAncestor (this.owner); -if (b == null) { -return false; -}var c = b.getOwnedWindows (); -if (c != null) { -var d = a.getBounds (); -for (var e = 0; e < c.length; e++) { -var f = c[e]; -if (f.isVisible () && d.intersects (f.getBounds ())) { -return true; -}} -}}return false; -}); -Clazz_defineMethod (c$, "fitsOnScreen", -function () { -var a = this.getComponent (); -if (this.owner != null && a != null) { -var b; -var c = a.getWidth (); -var d = a.getHeight (); -for (b = this.owner.getParent (); b != null; b = b.getParent ()) { -if (Clazz_instanceOf (b, javax.swing.JFrame) || Clazz_instanceOf (b, javax.swing.JDialog) || Clazz_instanceOf (b, javax.swing.JWindow)) { -var e = b.getBounds (); -var f = b.getInsets (); -e.x += f.left; -e.y += f.top; -e.width -= (f.left + f.right); -e.height -= (f.top + f.bottom); -var g = b.getGraphicsConfiguration (); -var h = this.getContainerPopupArea (g); -return e.intersection (h).contains (this.x, this.y, c, d); -} else if (Clazz_instanceOf (b, javax.swing.JApplet)) { -var e = b.getBounds (); -var f = b.getLocationOnScreen (); -e.x = f.x; -e.y = f.y; -return e.contains (this.x, this.y, c, d); -} else if (Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) { -break; -}} -}return false; -}); -Clazz_defineMethod (c$, "getContainerPopupArea", -function (a) { -var b; -var c = java.awt.Toolkit.getDefaultToolkit (); -var d; -if (a != null) { -b = a.getBounds (); -d = c.getScreenInsets (a); -} else { -b = new java.awt.Rectangle (c.getScreenSize ()); -d = new java.awt.Insets (0, 0, 0, 0); -}b.x += d.left; -b.y += d.top; -b.width -= (d.left + d.right); -b.height -= (d.top + d.bottom); -return b; -}, "java.awt.GraphicsConfiguration"); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.PopupFactory, "LightWeightPopup", javax.swing.PopupFactory.ContainerPopup); -c$.getLightWeightPopup = Clazz_defineMethod (c$, "getLightWeightPopup", -function (a, b, c, d) { -var e = null; -if (e == null) { -e = new javax.swing.PopupFactory.LightWeightPopup (); -}e.reset (a, b, c, d); -if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) { -e.hide (); -return null; -}return e; -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "hide", -function () { -Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "hide", []); -var a = this.getComponent (); -a.removeAll (); -}); -Clazz_overrideMethod (c$, "show", -function () { -var a = null; -if (this.owner != null) { -a = (Clazz_instanceOf (this.owner, java.awt.Container) ? this.owner : this.owner.getParent ()); -}for (var b = a; b != null; b = b.getParent ()) { -if (Clazz_instanceOf (b, javax.swing.JRootPane)) { -a = (b).getLayeredPane (); -} else if (Clazz_instanceOf (b, java.awt.Window)) { -if (a == null) { -a = b; -}break; -} else if (Clazz_instanceOf (b, javax.swing.JApplet)) { -break; -}} -var c = javax.swing.SwingUtilities.convertScreenLocationToParent (a, this.x, this.y); -var d = this.getComponent (); -d.setLocation (c.x, c.y); -if (Clazz_instanceOf (a, javax.swing.JLayeredPane)) { -(a).add (d, javax.swing.JLayeredPane.POPUP_LAYER, 0); -} else { -a.add (d); -}}); -Clazz_overrideMethod (c$, "createComponent", -function (a) { -var b = new javax.swing.JPanel ( new java.awt.BorderLayout (), true); -b.setOpaque (true); -return b; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "reset", -function (a, b, c, d) { -Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "reset", [a, b, c, d]); -var e = this.getComponent (); -e.setOpaque (b.isOpaque ()); -e.setLocation (c, d); -e.add (b, "Center"); -b.invalidate (); -this.pack (); -}, "java.awt.Component,java.awt.Component,~N,~N"); -c$.lightWeightPopupCacheKey = c$.prototype.lightWeightPopupCacheKey = new Clazz._O (); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_decorateAsClass (function () { -this.rootPane = null; -Clazz_instantialize (this, arguments); -}, javax.swing.PopupFactory, "MediumWeightPopup", javax.swing.PopupFactory.ContainerPopup); -c$.getMediumWeightPopup = Clazz_defineMethod (c$, "getMediumWeightPopup", -function (a, b, c, d) { -var e = javax.swing.PopupFactory.MediumWeightPopup.getRecycledMediumWeightPopup (); -if (e == null) { -e = new javax.swing.PopupFactory.MediumWeightPopup (); -}e.reset (a, b, c, d); -if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) { -e.hide (); -return null; -}return e; -}, "java.awt.Component,java.awt.Component,~N,~N"); -c$.getMediumWeightPopupCache = Clazz_defineMethod (c$, "getMediumWeightPopupCache", - function () { -var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey); -if (a == null) { -a = new java.util.ArrayList (); -javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey, a); -}return a; -}); -c$.recycleMediumWeightPopup = Clazz_defineMethod (c$, "recycleMediumWeightPopup", - function (a) { -{ -var b = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache (); -if (b.size () < 5) { -b.add (a); -}}}, "javax.swing.PopupFactory.MediumWeightPopup"); -c$.getRecycledMediumWeightPopup = Clazz_defineMethod (c$, "getRecycledMediumWeightPopup", - function () { -{ -var a = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache (); -var b; -if ((b = a.size ()) > 0) { -var c = a.get (0); -a.remove (0); -return c; -}return null; -}}); -Clazz_defineMethod (c$, "hide", -function () { -Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "hide", []); -this.rootPane.getContentPane ().removeAll (); -javax.swing.PopupFactory.MediumWeightPopup.recycleMediumWeightPopup (this); -}); -Clazz_overrideMethod (c$, "show", -function () { -var a = this.getComponent (); -var b = null; -if (this.owner != null) { -b = this.owner.getParent (); -}while (!(Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) && (b != null)) { -b = b.getParent (); -} -if (Clazz_instanceOf (b, javax.swing.RootPaneContainer)) { -b = (b).getLayeredPane (); -var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y); -a.setVisible (false); -a.setLocation (c.x, c.y); -(b).add (a, javax.swing.JLayeredPane.POPUP_LAYER, 0); -} else { -var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y); -a.setLocation (c.x, c.y); -a.setVisible (false); -b.add (a); -}a.setVisible (true); -}); -Clazz_overrideMethod (c$, "createComponent", -function (a) { -var b = new javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent (); -this.rootPane = new javax.swing.JRootPane (); -this.rootPane.setOpaque (true); -b.add (this.rootPane, "Center"); -return b; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "reset", -function (a, b, c, d) { -Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "reset", [a, b, c, d]); -var e = this.getComponent (); -e.setLocation (c, d); -this.rootPane.getContentPane ().add (b, "Center"); -b.invalidate (); -e.validate (); -this.pack (); -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.PopupFactory.MediumWeightPopup, "MediumWeightComponent", java.awt.Panel, javax.swing.SwingHeavyWeight); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent, [ new java.awt.BorderLayout ()]); -}); -c$ = Clazz_p0p (); -c$.mediumWeightPopupCacheKey = c$.prototype.mediumWeightPopupCacheKey = new Clazz._O (); -c$ = Clazz_p0p (); -c$.SharedInstanceKey = c$.prototype.SharedInstanceKey = new Clazz._O (); -Clazz_defineStatics (c$, -"MAX_CACHE_SIZE", 5, -"LIGHT_WEIGHT_POPUP", 0, -"MEDIUM_WEIGHT_POPUP", 1, -"HEAVY_WEIGHT_POPUP", 2); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["java.awt.Frame", "javax.swing.JWindow"], "javax.swing.Popup", ["java.lang.IllegalArgumentException", "java.awt.Toolkit", "$.Window", "javax.swing.SwingUtilities", "jssun.awt.SunToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.component = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "Popup"); -Clazz_makeConstructor (c$, -function (owner, contents, x, y) { -this.construct (); -if (contents == null) { -throw new IllegalArgumentException ("Contents must be non-null"); -}this.reset (owner, contents, x, y); -}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "show", -function () { -var component = this.getComponent (); -if (component != null) { -component.show (); -}}); -Clazz_defineMethod (c$, "hide", -function () { -var component = this.getComponent (); -if (Clazz_instanceOf (component, javax.swing.JWindow)) { -component.hide (); -(component).getContentPane ().removeAll (); -}this.dispose (); -}); -Clazz_defineMethod (c$, "dispose", -function () { -var component = this.getComponent (); -var window = javax.swing.SwingUtilities.getWindowAncestor (component); -if (Clazz_instanceOf (component, javax.swing.JWindow)) { -(component).dispose (); -component = null; -}if (Clazz_instanceOf (window, javax.swing.Popup.DefaultFrame)) { -window.dispose (); -}}); -Clazz_defineMethod (c$, "reset", -function (owner, contents, ownerX, ownerY) { -if (this.getComponent () == null) { -this.component = this.createComponent (owner); -}var c = this.getComponent (); -if (Clazz_instanceOf (c, javax.swing.JWindow)) { -var component = this.getComponent (); -component.setLocation (ownerX, ownerY); -component.getContentPane ().add (contents, "Center"); -contents.invalidate (); -if (component.isVisible ()) { -this.pack (); -}}}, "java.awt.Component,java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "pack", -function () { -var component = this.getComponent (); -if (Clazz_instanceOf (component, java.awt.Window)) { -(component).pack (); -}}); -Clazz_defineMethod (c$, "getParentWindow", - function (owner) { -var window = null; -if (Clazz_instanceOf (owner, java.awt.Window)) { -window = owner; -} else if (owner != null) { -window = javax.swing.SwingUtilities.getWindowAncestor (owner); -}if (window == null) { -window = new javax.swing.Popup.DefaultFrame (); -}return window; -}, "java.awt.Component"); -Clazz_defineMethod (c$, "createComponent", -function (owner) { -return new javax.swing.Popup.HeavyWeightWindow (this.getParentWindow (owner)); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getComponent", -function () { -return this.component; -}); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.Popup, "HeavyWeightWindow", javax.swing.JWindow); -Clazz_makeConstructor (c$, -function (a) { -Clazz_superConstructor (this, javax.swing.Popup.HeavyWeightWindow, [a]); -this.setFocusableWindowState (false); -var b = java.awt.Toolkit.getDefaultToolkit (); -if (Clazz_instanceOf (b, jssun.awt.SunToolkit)) { -(b).setOverrideRedirect (this); -}this.getRootPane ().setUseTrueDoubleBuffering (false); -try { -this.setAlwaysOnTop (true); -} catch (se) { -if (Clazz_exceptionOf (se, SecurityException)) { -} else { -throw se; -} -} -}, "java.awt.Window"); -Clazz_overrideMethod (c$, "update", -function (a) { -this.paint (a); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "show", -function () { -this.pack (); -if (this.getWidth () > 0 && this.getHeight () > 0) { -Clazz_superCall (this, javax.swing.Popup.HeavyWeightWindow, "show", []); -}}); -c$ = Clazz_p0p (); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (javax.swing.Popup, "DefaultFrame", java.awt.Frame); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("javax.swing"); -Clazz_declareInterface (javax.swing, "SwingHeavyWeight"); -Clazz_declarePackage ("javax.swing"); -Clazz_load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this.tipText = null; -this.$component = null; -Clazz_instantialize (this, arguments); -}, javax.swing, "JToolTip", javax.swing.JComponent); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.JToolTip, []); -this.setOpaque (true); -this.updateUI (); -}); -Clazz_overrideMethod (c$, "getUI", -function () { -return this.ui; -}); -Clazz_overrideMethod (c$, "updateUI", -function () { -this.setUI (javax.swing.UIManager.getUI (this)); -}); -Clazz_overrideMethod (c$, "getUIClassID", -function () { -return "ToolTipUI"; -}); -Clazz_defineMethod (c$, "setTipText", -function (tipText) { -var oldValue = this.tipText; -this.tipText = tipText; -this.firePropertyChangeObject ("tiptext", oldValue, tipText); -}, "~S"); -Clazz_defineMethod (c$, "getTipText", -function () { -return this.tipText; -}); -Clazz_defineMethod (c$, "setComponent", -function (c) { -var oldValue = this.$component; -this.$component = c; -this.firePropertyChangeObject ("component", oldValue, c); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "getComponent", -function () { -return this.$component; -}); -Clazz_overrideMethod (c$, "alwaysOnTop", -function () { -return true; -}); -Clazz_defineMethod (c$, "paramString", -function () { -var tipTextString = (this.tipText != null ? this.tipText : ""); -return Clazz_superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString; -}); -Clazz_defineStatics (c$, -"$uiClassID", "ToolTipUI"); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventObject"], "javax.swing.event.PopupMenuEvent", null, function () { -c$ = Clazz_declareType (javax.swing.event, "PopupMenuEvent", java.util.EventObject); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.PopupMenuListener", null, function () { -Clazz_declareInterface (javax.swing.event, "PopupMenuListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventObject"], "javax.swing.event.MenuEvent", null, function () { -c$ = Clazz_declareType (javax.swing.event, "MenuEvent", java.util.EventObject); -}); -Clazz_declarePackage ("javax.swing.event"); -Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuListener", null, function () { -Clazz_declareInterface (javax.swing.event, "MenuListener", java.util.EventListener); -}); -Clazz_declarePackage ("javax.swing.border"); -Clazz_load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () { -c$ = Clazz_declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border); -Clazz_overrideMethod (c$, "paintBorder", -function (c, g, x, y, width, height) { -}, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getBorderInsets", -function (c) { -return new java.awt.Insets (0, 0, 0, 0); -}, "java.awt.Component"); -Clazz_defineMethod (c$, "getBorderInsets", -function (c, insets) { -insets.left = insets.top = insets.right = insets.bottom = 0; -return insets; -}, "java.awt.Component,java.awt.Insets"); -Clazz_overrideMethod (c$, "isBorderOpaque", -function () { -return false; -}); -Clazz_defineMethod (c$, "getInteriorRectangle", -function (c, x, y, width, height) { -return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height); -}, "java.awt.Component,~N,~N,~N,~N"); -c$.getInteriorRectangle = Clazz_defineMethod (c$, "getInteriorRectangle", -function (c, b, x, y, width, height) { -var insets; -if (b != null) insets = b.getBorderInsets (c); - else insets = new java.awt.Insets (0, 0, 0, 0); -return new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom); -}, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getBaseline", -function (c, width, height) { -if (width < 0 || height < 0) { -throw new IllegalArgumentException ("Width and height must be >= 0"); -}return -1; -}, "java.awt.Component,~N,~N"); -Clazz_defineMethod (c$, "getBaselineResizeBehavior", -function (c) { -if (c == null) { -throw new NullPointerException ("Component must be non-null"); -}return java.awt.Component.BaselineResizeBehavior.OTHER; -}, "java.awt.Component"); -c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", -function (c) { -return c.getComponentOrientation ().isLeftToRight (); -}, "java.awt.Component"); -}); -Clazz_declarePackage ("jssun.awt"); -Clazz_load (["java.awt.event.InvocationEvent"], "jssun.awt.PeerEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.flags = 0; -Clazz_instantialize (this, arguments); -}, jssun.awt, "PeerEvent", java.awt.event.InvocationEvent); -Clazz_makeConstructor (c$, -function (source, runnable, flags) { -this.construct (source, runnable, null, false, flags); -}, "~O,Runnable,~N"); -Clazz_makeConstructor (c$, -function (source, runnable, notifier, catchExceptions, flags) { -Clazz_superConstructor (this, jssun.awt.PeerEvent, [source, runnable, notifier, catchExceptions]); -this.flags = flags; -}, "~O,Runnable,~O,~B,~N"); -Clazz_defineMethod (c$, "getFlags", -function () { -return this.flags; -}); -Clazz_defineMethod (c$, "coalesceEvents", -function (newEvent) { -return null; -}, "jssun.awt.PeerEvent"); -Clazz_defineStatics (c$, -"PRIORITY_EVENT", 0x01, -"ULTIMATE_PRIORITY_EVENT", 0x02, -"LOW_PRIORITY_EVENT", 0x04); -}); -Clazz_declarePackage ("jssun.awt.image"); -Clazz_load (["jssun.awt.image.InputStreamImageSource"], "jssun.awt.image.URLImageSource", ["java.net.URL"], function () { -c$ = Clazz_decorateAsClass (function () { -this.url = null; -this.conn = null; -this.actualHost = null; -this.actualPort = 0; -Clazz_instantialize (this, arguments); -}, jssun.awt.image, "URLImageSource", jssun.awt.image.InputStreamImageSource); -Clazz_makeConstructor (c$, -function (u) { -Clazz_superConstructor (this, jssun.awt.image.URLImageSource, []); -this.url = u; -}, "java.net.URL"); -Clazz_makeConstructor (c$, -function (href) { -this.construct ( new java.net.URL (null, href)); -}, "~S"); -Clazz_makeConstructor (c$, -function (u, uc) { -this.construct (u); -this.conn = uc; -}, "java.net.URL,java.net.URLConnection"); -Clazz_makeConstructor (c$, -function (uc) { -this.construct (uc.getURL (), uc); -}, "java.net.URLConnection"); -Clazz_overrideMethod (c$, "checkSecurity", -function (context, quiet) { -if (this.actualHost != null) { -try { -var security = System.getSecurityManager (); -if (security != null) { -security.checkConnect (this.actualHost, this.actualPort, context); -}} catch (e) { -if (Clazz_exceptionOf (e, SecurityException)) { -if (!quiet) { -throw e; -}return false; -} else { -throw e; -} -} -}return true; -}, "~O,~B"); -Clazz_defineMethod (c$, "getDecoder", -function () { -return null; -}); -}); -Clazz_declarePackage ("jssun.awt.image"); -Clazz_load (["java.awt.image.ImageProducer", "jssun.awt.image.ImageFetchable"], "jssun.awt.image.InputStreamImageSource", ["java.lang.SecurityException", "$.Thread", "jssun.awt.image.ImageConsumerQueue", "$.ImageFetcher"], function () { -c$ = Clazz_decorateAsClass (function () { -this.consumers = null; -this.decoder = null; -this.decoders = null; -this.awaitingFetch = false; -Clazz_instantialize (this, arguments); -}, jssun.awt.image, "InputStreamImageSource", null, [java.awt.image.ImageProducer, jssun.awt.image.ImageFetchable]); -Clazz_defineMethod (c$, "countConsumers", -function (cq) { -var i = 0; -while (cq != null) { -i++; -cq = cq.next; -} -return i; -}, "jssun.awt.image.ImageConsumerQueue"); -Clazz_defineMethod (c$, "countConsumers", -function () { -var id = this.decoders; -var i = this.countConsumers (this.consumers); -while (id != null) { -i += this.countConsumers (id.queue); -id = id.next; -} -return i; -}); -Clazz_defineMethod (c$, "addConsumer", -function (ic) { -this.addConsumer (ic, false); -}, "java.awt.image.ImageConsumer"); -Clazz_defineMethod (c$, "printQueue", -function (cq, prefix) { -while (cq != null) { -System.out.println (prefix + cq); -cq = cq.next; -} -}, "jssun.awt.image.ImageConsumerQueue,~S"); -Clazz_defineMethod (c$, "printQueues", -function (title) { -System.out.println (title + "[ -----------"); -this.printQueue (this.consumers, " "); -for (var id = this.decoders; id != null; id = id.next) { -System.out.println (" " + id); -this.printQueue (id.queue, " "); -} -System.out.println ("----------- ]" + title); -}, "~S"); -Clazz_defineMethod (c$, "addConsumer", -function (ic, produce) { -for (var id = this.decoders; id != null; id = id.next) { -if (id.isConsumer (ic)) { -return; -}} -var cq = this.consumers; -while (cq != null && cq.consumer !== ic) { -cq = cq.next; -} -if (cq == null) { -cq = new jssun.awt.image.ImageConsumerQueue (this, ic); -cq.next = this.consumers; -this.consumers = cq; -} else { -if (!cq.secure) { -var context = null; -var security = System.getSecurityManager (); -if (security != null) { -context = security.getSecurityContext (); -}if (cq.securityContext == null) { -cq.securityContext = context; -} else if (!cq.securityContext.equals (context)) { -this.errorConsumer (cq, false); -throw new SecurityException ("Applets are trading image data!"); -}}cq.interested = true; -}if (produce && this.decoder == null) { -this.startProduction (); -}}, "java.awt.image.ImageConsumer,~B"); -Clazz_overrideMethod (c$, "isConsumer", -function (ic) { -for (var id = this.decoders; id != null; id = id.next) { -if (id.isConsumer (ic)) { -return true; -}} -return jssun.awt.image.ImageConsumerQueue.isConsumer (this.consumers, ic); -}, "java.awt.image.ImageConsumer"); -Clazz_defineMethod (c$, "errorAllConsumers", - function (cq, needReload) { -while (cq != null) { -if (cq.interested) { -this.errorConsumer (cq, needReload); -}cq = cq.next; -} -}, "jssun.awt.image.ImageConsumerQueue,~B"); -Clazz_defineMethod (c$, "errorConsumer", - function (cq, needReload) { -cq.consumer.imageComplete (1); -this.removeConsumer (cq.consumer); -}, "jssun.awt.image.ImageConsumerQueue,~B"); -Clazz_overrideMethod (c$, "removeConsumer", -function (ic) { -for (var id = this.decoders; id != null; id = id.next) { -id.removeConsumer (ic); -} -this.consumers = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.consumers, ic, false); -}, "java.awt.image.ImageConsumer"); -Clazz_defineMethod (c$, "startProduction", -function (ic) { -this.addConsumer (ic, true); -}, "java.awt.image.ImageConsumer"); -Clazz_defineMethod (c$, "startProduction", - function () { -if (!this.awaitingFetch) { -jssun.awt.image.ImageFetcher.add (this); -this.awaitingFetch = true; -}}); -Clazz_overrideMethod (c$, "requestTopDownLeftRightResend", -function (ic) { -}, "java.awt.image.ImageConsumer"); -Clazz_defineMethod (c$, "decoderForType", -function (is, content_type) { -return null; -}, "java.io.InputStream,~S"); -Clazz_defineMethod (c$, "getDecoder", -function (is) { -return null; -}, "java.io.InputStream"); -Clazz_overrideMethod (c$, "doFetch", -function () { -{ -if (this.consumers == null) { -this.awaitingFetch = false; -return; -}}var imgd = this.getDecoder (); -if (imgd == null) { -this.badDecoder (); -} else { -this.setDecoder (imgd); -try { -imgd.produceImage (); -} catch (e$$) { -if (Clazz_exceptionOf (e$$, java.io.IOException)) { -var e = e$$; -{ -e.printStackTrace (); -} -} else if (Clazz_exceptionOf (e$$, jssun.awt.image.ImageFormatException)) { -var e = e$$; -{ -e.printStackTrace (); -} -} else { -throw e$$; -} -} finally { -this.removeDecoder (imgd); -if (Thread.currentThread ().isInterrupted () || !Thread.currentThread ().isAlive ()) { -this.errorAllConsumers (imgd.queue, true); -} else { -this.errorAllConsumers (imgd.queue, false); -}} -}}); -Clazz_defineMethod (c$, "badDecoder", - function () { -var cq; -{ -cq = this.consumers; -this.consumers = null; -this.awaitingFetch = false; -}this.errorAllConsumers (cq, false); -}); -Clazz_defineMethod (c$, "setDecoder", - function (mydecoder) { -var cq; -{ -mydecoder.next = this.decoders; -this.decoders = mydecoder; -this.decoder = mydecoder; -cq = this.consumers; -mydecoder.queue = cq; -this.consumers = null; -this.awaitingFetch = false; -}}, "jssun.awt.image.ImageDecoder"); -Clazz_defineMethod (c$, "removeDecoder", - function (mydecoder) { -this.doneDecoding (mydecoder); -var idprev = null; -for (var id = this.decoders; id != null; id = id.next) { -if (id === mydecoder) { -if (idprev == null) { -this.decoders = id.next; -} else { -idprev.next = id.next; -}break; -}idprev = id; -} -}, "jssun.awt.image.ImageDecoder"); -Clazz_defineMethod (c$, "doneDecoding", -function (mydecoder) { -if (this.decoder === mydecoder) { -this.decoder = null; -if (this.consumers != null) { -this.startProduction (); -}}}, "jssun.awt.image.ImageDecoder"); -Clazz_defineMethod (c$, "latchConsumers", -function (id) { -this.doneDecoding (id); -}, "jssun.awt.image.ImageDecoder"); -Clazz_defineMethod (c$, "flush", -function () { -this.decoder = null; -}); -}); -Clazz_declarePackage ("java.awt.image"); -Clazz_declareInterface (java.awt.image, "ImageProducer"); -Clazz_declarePackage ("jssun.awt.image"); -Clazz_declareInterface (jssun.awt.image, "ImageFetchable"); -Clazz_declarePackage ("jssun.awt.image"); -c$ = Clazz_decorateAsClass (function () { -this.next = null; -this.consumer = null; -this.interested = false; -this.securityContext = null; -this.secure = false; -Clazz_instantialize (this, arguments); -}, jssun.awt.image, "ImageConsumerQueue"); -c$.removeConsumer = Clazz_defineMethod (c$, "removeConsumer", -function (cqbase, ic, stillinterested) { -var cqprev = null; -for (var cq = cqbase; cq != null; cq = cq.next) { -if (cq.consumer === ic) { -if (cqprev == null) { -cqbase = cq.next; -} else { -cqprev.next = cq.next; -}cq.interested = stillinterested; -break; -}cqprev = cq; -} -return cqbase; -}, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B"); -c$.isConsumer = Clazz_defineMethod (c$, "isConsumer", -function (cqbase, ic) { -for (var cq = cqbase; cq != null; cq = cq.next) { -if (cq.consumer === ic) { -return true; -}} -return false; -}, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer"); -Clazz_makeConstructor (c$, -function (src, ic) { -this.consumer = ic; -this.interested = true; -this.secure = true; -}, "jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer"); -Clazz_overrideMethod (c$, "toString", -function () { -return ("[" + this.consumer + ", " + (this.interested ? "" : "not ") + "interested" + (this.securityContext != null ? ", " + this.securityContext : "") + "]"); -}); -Clazz_declarePackage ("jssun.awt.image"); -Clazz_load (["java.lang.Thread", "$.StringBuffer"], ["jssun.awt.image.FetcherInfo", "$.ImageFetcher"], ["java.util.Vector", "jssun.awt.AppContext"], function () { -c$ = Clazz_declareType (jssun.awt.image, "ImageFetcher", Thread); -Clazz_makeConstructor (c$, - function (threadGroup, index) { -Clazz_superConstructor (this, jssun.awt.image.ImageFetcher, [threadGroup, "Image Fetcher " + index]); -this.setDaemon (true); -}, "ThreadGroup,~N"); -c$.add = Clazz_defineMethod (c$, "add", -function (src) { -var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); -{ -if (!info.waitList.contains (src)) { -info.waitList.addElement (src); -if (info.numWaiting == 0 && info.numFetchers < info.fetchers.length) { -jssun.awt.image.ImageFetcher.createFetchers (info); -}info.waitList.notify (); -}}}, "jssun.awt.image.ImageFetchable"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (src) { -var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); -{ -if (info.waitList.contains (src)) { -info.waitList.removeElement (src); -}}}, "jssun.awt.image.ImageFetchable"); -c$.isFetcher = Clazz_defineMethod (c$, "isFetcher", -function (t) { -var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); -{ -for (var i = 0; i < info.fetchers.length; i++) { -if (info.fetchers[i] === t) { -return true; -}} -}return false; -}, "Thread"); -c$.amFetcher = Clazz_defineMethod (c$, "amFetcher", -function () { -return jssun.awt.image.ImageFetcher.isFetcher (Thread.currentThread ()); -}); -c$.nextImage = Clazz_defineMethod (c$, "nextImage", - function () { -var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); -{ -var src = null; -var end = System.currentTimeMillis () + 5000; -while (src == null) { -while (info.waitList.size () == 0) { -var now = System.currentTimeMillis (); -if (now >= end) { -return null; -}try { -info.numWaiting++; -info.waitList.wait (end - now); -} catch (e) { -if (Clazz_exceptionOf (e, InterruptedException)) { -return null; -} else { -throw e; -} -} finally { -info.numWaiting--; -} -} -src = info.waitList.elementAt (0); -info.waitList.removeElement (src); -} -return src; -}}); -Clazz_overrideMethod (c$, "run", -function () { -var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); -try { -this.fetchloop (); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -e.printStackTrace (); -} else { -throw e; -} -} finally { -{ -var me = Thread.currentThread (); -for (var i = 0; i < info.fetchers.length; i++) { -if (info.fetchers[i] === me) { -info.fetchers[i] = null; -info.numFetchers--; -}} -}} -}); -Clazz_defineMethod (c$, "fetchloop", - function () { -var me = Thread.currentThread (); -while (jssun.awt.image.ImageFetcher.isFetcher (me)) { -Thread.interrupted (); -me.setPriority (8); -var src = jssun.awt.image.ImageFetcher.nextImage (); -if (src == null) { -return; -}try { -src.doFetch (); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -System.err.println ("Uncaught error fetching image:"); -e.printStackTrace (); -} else { -throw e; -} -} -jssun.awt.image.ImageFetcher.stoppingAnimation (me); -} -}); -c$.startingAnimation = Clazz_defineMethod (c$, "startingAnimation", -function () { -var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); -var me = Thread.currentThread (); -{ -for (var i = 0; i < info.fetchers.length; i++) { -if (info.fetchers[i] === me) { -info.fetchers[i] = null; -info.numFetchers--; -me.setName ("Image Animator " + i); -if (info.waitList.size () > info.numWaiting) { -jssun.awt.image.ImageFetcher.createFetchers (info); -}return; -}} -}me.setPriority (2); -me.setName ("Image Animator"); -}); -c$.stoppingAnimation = Clazz_defineMethod (c$, "stoppingAnimation", - function (me) { -var info = jssun.awt.image.FetcherInfo.getFetcherInfo (); -{ -var index = -1; -for (var i = 0; i < info.fetchers.length; i++) { -if (info.fetchers[i] === me) { -return; -}if (info.fetchers[i] == null) { -index = i; -}} -if (index >= 0) { -info.fetchers[index] = me; -info.numFetchers++; -me.setName ("Image Fetcher " + index); -return; -}}}, "Thread"); -c$.createFetchers = Clazz_defineMethod (c$, "createFetchers", - function (info) { -var appContext = jssun.awt.AppContext.getAppContext (); -var threadGroup = appContext.getThreadGroup (); -var fetcherThreadGroup; -try { -if (threadGroup.getParent () != null) { -fetcherThreadGroup = threadGroup; -} else { -threadGroup = Thread.currentThread ().getThreadGroup (); -var parent = threadGroup.getParent (); -while ((parent != null) && (parent.getParent () != null)) { -threadGroup = parent; -parent = threadGroup.getParent (); -} -fetcherThreadGroup = threadGroup; -}} catch (e) { -if (Clazz_exceptionOf (e, SecurityException)) { -fetcherThreadGroup = appContext.getThreadGroup (); -} else { -throw e; -} -} -var fetcherGroup = fetcherThreadGroup; -for (var i = 0; i < info.fetchers.length; i++) { -if (info.fetchers[i] == null) { -info.fetchers[i] = new jssun.awt.image.ImageFetcher (fetcherGroup, i); -info.fetchers[i].start (); -info.numFetchers++; -break; -}} -return; -}, "jssun.awt.image.FetcherInfo"); -Clazz_defineStatics (c$, -"HIGH_PRIORITY", 8, -"LOW_PRIORITY", 3, -"ANIM_PRIORITY", 2, -"TIMEOUT", 5000); -c$ = Clazz_decorateAsClass (function () { -this.fetchers = null; -this.numFetchers = 0; -this.numWaiting = 0; -this.waitList = null; -Clazz_instantialize (this, arguments); -}, jssun.awt.image, "FetcherInfo"); -Clazz_makeConstructor (c$, - function () { -this.fetchers = new Array (4); -this.numFetchers = 0; -this.numWaiting = 0; -this.waitList = new java.util.Vector (); -}); -c$.getFetcherInfo = Clazz_defineMethod (c$, "getFetcherInfo", -function () { -var appContext = jssun.awt.AppContext.getAppContext (); -{ -var info = appContext.get (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY); -if (info == null) { -info = new jssun.awt.image.FetcherInfo (); -appContext.put (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY, info); -}return info; -}}); -Clazz_defineStatics (c$, -"MAX_NUM_FETCHERS_PER_APPCONTEXT", 4); -c$.FETCHER_INFO_KEY = c$.prototype.FETCHER_INFO_KEY = new StringBuffer ("FetcherInfo"); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.FocusEvent", ["jssun.awt.AppContext", "$.SunToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.temporary = false; -this.opposite = null; -Clazz_instantialize (this, arguments); -}, java.awt.event, "FocusEvent", java.awt.event.ComponentEvent); -Clazz_makeConstructor (c$, -function (source, id, temporary, opposite) { -Clazz_superConstructor (this, java.awt.event.FocusEvent, [source, id]); -this.temporary = temporary; -this.opposite = opposite; -}, "java.awt.Component,~N,~B,java.awt.Component"); -Clazz_makeConstructor (c$, -function (source, id, temporary) { -this.construct (source, id, temporary, null); -}, "java.awt.Component,~N,~B"); -Clazz_makeConstructor (c$, -function (source, id) { -this.construct (source, id, false); -}, "java.awt.Component,~N"); -Clazz_defineMethod (c$, "isTemporary", -function () { -return this.temporary; -}); -Clazz_defineMethod (c$, "getOppositeComponent", -function () { -if (this.opposite == null) { -return null; -}return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 1004: -typeStr = "FOCUS_GAINED"; -break; -case 1005: -typeStr = "FOCUS_LOST"; -break; -default: -typeStr = "unknown type"; -} -return typeStr + (this.temporary ? ",temporary" : ",permanent") + ",opposite=" + this.getOppositeComponent (); -}); -Clazz_defineStatics (c$, -"FOCUS_FIRST", 1004, -"FOCUS_LAST", 1005, -"FOCUS_GAINED", 1004, -"FOCUS_LOST", 1005); -}); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.AWTEvent"], "java.awt.event.HierarchyEvent", ["java.awt.Component"], function () { -c$ = Clazz_decorateAsClass (function () { -this.changed = null; -this.changedParent = null; -this.changeFlags = 0; -Clazz_instantialize (this, arguments); -}, java.awt.event, "HierarchyEvent", java.awt.AWTEvent); -Clazz_makeConstructor (c$, -function (source, id, changed, changedParent) { -Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]); -this.changed = changed; -this.changedParent = changedParent; -}, "java.awt.Component,~N,java.awt.Component,java.awt.Container"); -Clazz_makeConstructor (c$, -function (source, id, changed, changedParent, changeFlags) { -Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]); -this.changed = changed; -this.changedParent = changedParent; -this.changeFlags = changeFlags; -}, "java.awt.Component,~N,java.awt.Component,java.awt.Container,~N"); -Clazz_defineMethod (c$, "getComponent", -function () { -return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null; -}); -Clazz_defineMethod (c$, "getChanged", -function () { -return this.changed; -}); -Clazz_defineMethod (c$, "getChangedParent", -function () { -return this.changedParent; -}); -Clazz_defineMethod (c$, "getChangeFlags", -function () { -return this.changeFlags; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 1401: -typeStr = "ANCESTOR_MOVED (" + this.changed + "," + this.changedParent + ")"; -break; -case 1402: -typeStr = "ANCESTOR_RESIZED (" + this.changed + "," + this.changedParent + ")"; -break; -case 1400: -{ -typeStr = "HIERARCHY_CHANGED ("; -var first = true; -if ((this.changeFlags & 1) != 0) { -first = false; -typeStr += "PARENT_CHANGED"; -}if ((this.changeFlags & 2) != 0) { -if (first) { -first = false; -} else { -typeStr += ","; -}typeStr += "DISPLAYABILITY_CHANGED"; -}if ((this.changeFlags & 4) != 0) { -if (first) { -first = false; -} else { -typeStr += ","; -}typeStr += "SHOWING_CHANGED"; -}if (!first) { -typeStr += ","; -}typeStr += this.changed + "," + this.changedParent + ")"; -break; -}default: -typeStr = "unknown type"; -} -return typeStr; -}); -Clazz_defineStatics (c$, -"HIERARCHY_FIRST", 1400, -"HIERARCHY_CHANGED", 1400, -"ANCESTOR_MOVED", 1401, -"ANCESTOR_RESIZED", 1402, -"HIERARCHY_LAST", 1402, -"PARENT_CHANGED", 0x1, -"DISPLAYABILITY_CHANGED", 0x2, -"SHOWING_CHANGED", 0x4); -}); -Clazz_declarePackage ("jssun.awt"); -Clazz_declareInterface (jssun.awt, "ConstrainableGraphics"); -Clazz_declarePackage ("jssun.awt"); -Clazz_declareInterface (jssun.awt, "Graphics2Delegate"); -Clazz_declarePackage ("java.awt.event"); -Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.ContainerEvent", ["java.awt.Container"], function () { -c$ = Clazz_decorateAsClass (function () { -this.child = null; -Clazz_instantialize (this, arguments); -}, java.awt.event, "ContainerEvent", java.awt.event.ComponentEvent); -Clazz_makeConstructor (c$, -function (source, id, child) { -Clazz_superConstructor (this, java.awt.event.ContainerEvent, [source, id]); -this.child = child; -}, "java.awt.Component,~N,java.awt.Component"); -Clazz_defineMethod (c$, "getContainer", -function () { -return (Clazz_instanceOf (this.source, java.awt.Container)) ? this.source : null; -}); -Clazz_defineMethod (c$, "getChild", -function () { -return this.child; -}); -Clazz_overrideMethod (c$, "paramString", -function () { -var typeStr; -switch (this.id) { -case 300: -typeStr = "COMPONENT_ADDED"; -break; -case 301: -typeStr = "COMPONENT_REMOVED"; -break; -default: -typeStr = "unknown type"; -} -return typeStr + ",child=" + this.child.getName (); -}); -Clazz_defineStatics (c$, -"CONTAINER_FIRST", 300, -"CONTAINER_LAST", 301, -"COMPONENT_ADDED", 300, -"COMPONENT_REMOVED", 301); -}); -Clazz_declarePackage ("jssun.applet"); -Clazz_load (["java.util.EventObject"], "jssun.applet.AppletEvent", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.arg = null; -this.id = 0; -Clazz_instantialize (this, arguments); -}, jssun.applet, "AppletEvent", java.util.EventObject); -Clazz_makeConstructor (c$, -function (source, id, argument) { -Clazz_superConstructor (this, jssun.applet.AppletEvent, [source]); -this.arg = argument; -this.id = id; -}, "~O,~N,~O"); -Clazz_defineMethod (c$, "getID", -function () { -return this.id; -}); -Clazz_defineMethod (c$, "getArgument", -function () { -return this.arg; -}); -Clazz_overrideMethod (c$, "toString", -function () { -var str = this.getClass ().getName () + "[source=" + this.source + " + id=" + this.id; -if (this.arg != null) { -str += " + arg=" + this.arg; -}str += " ]"; -return str; -}); -}); -Clazz_declarePackage ("jssun.applet"); -Clazz_load (["jssun.applet.AppletListener"], "jssun.applet.AppletEventMulticaster", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.a = null; -this.b = null; -Clazz_instantialize (this, arguments); -}, jssun.applet, "AppletEventMulticaster", null, jssun.applet.AppletListener); -Clazz_makeConstructor (c$, -function (a, b) { -this.a = a; -this.b = b; -}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); -Clazz_defineMethod (c$, "appletStateChanged", -function (e) { -this.a.appletStateChanged (e); -this.b.appletStateChanged (e); -}, "jssun.applet.AppletEvent"); -c$.add = Clazz_defineMethod (c$, "add", -function (a, b) { -return jssun.applet.AppletEventMulticaster.addInternal (a, b); -}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (l, oldl) { -return jssun.applet.AppletEventMulticaster.removeInternal (l, oldl); -}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); -c$.addInternal = Clazz_defineMethod (c$, "addInternal", - function (a, b) { -if (a == null) return b; -if (b == null) return a; -return new jssun.applet.AppletEventMulticaster (a, b); -}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); -Clazz_defineMethod (c$, "remove", -function (oldl) { -if (oldl === this.a) return this.b; -if (oldl === this.b) return this.a; -var a2 = jssun.applet.AppletEventMulticaster.removeInternal (this.a, oldl); -var b2 = jssun.applet.AppletEventMulticaster.removeInternal (this.b, oldl); -if (a2 === this.a && b2 === this.b) { -return this; -}return jssun.applet.AppletEventMulticaster.addInternal (a2, b2); -}, "jssun.applet.AppletListener"); -c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", - function (l, oldl) { -if (l === oldl || l == null) { -return null; -} else if (Clazz_instanceOf (l, jssun.applet.AppletEventMulticaster)) { -return (l).remove (oldl); -} else { -return l; -}}, "jssun.applet.AppletListener,jssun.applet.AppletListener"); -}); -Clazz_declarePackage ("jssun.applet"); -Clazz_load (["java.util.EventListener"], "jssun.applet.AppletListener", null, function () { -Clazz_declareInterface (jssun.applet, "AppletListener", java.util.EventListener); -}); -Clazz_declarePackage ("jssun.misc"); -Clazz_load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.length = 0; -this.head = null; -this.tail = null; -Clazz_instantialize (this, arguments); -}, jssun.misc, "Queue"); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "enqueue", -function (obj) { -var newElt = new jssun.misc.QueueElement (obj); -if (this.head == null) { -this.head = newElt; -this.tail = newElt; -this.length = 1; -} else { -newElt.next = this.head; -this.head.prev = newElt; -this.head = newElt; -this.length++; -}this.notify (); -}, "~O"); -Clazz_defineMethod (c$, "dequeue", -function () { -return this.dequeue (0); -}); -Clazz_defineMethod (c$, "dequeue", -function (timeOut) { -while (this.tail == null) { -swingjs.JSToolkit.warn ("Cannot wait in Queue.java"); -this.wait (timeOut); -} -var elt = this.tail; -this.tail = elt.prev; -if (this.tail == null) { -this.head = null; -} else { -this.tail.next = null; -}this.length--; -return elt.obj; -}, "~N"); -Clazz_defineMethod (c$, "isEmpty", -function () { -return (this.tail == null); -}); -Clazz_defineMethod (c$, "elements", -function () { -return new jssun.misc.LIFOQueueEnumerator (this); -}); -Clazz_defineMethod (c$, "reverseElements", -function () { -return new jssun.misc.FIFOQueueEnumerator (this); -}); -Clazz_defineMethod (c$, "dump", -function (msg) { -System.err.println (">> " + msg); -System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + "")); -var cursor = this.head; -var last = null; -while (cursor != null) { -System.err.println (" " + cursor); -last = cursor; -cursor = cursor.next; -} -if (last !== this.tail) { -System.err.println (" tail != last: " + this.tail + ", " + last); -}System.err.println ("]"); -}, "~S"); -c$ = Clazz_decorateAsClass (function () { -this.queue = null; -this.cursor = null; -Clazz_instantialize (this, arguments); -}, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration); -Clazz_makeConstructor (c$, -function (q) { -this.queue = q; -this.cursor = q.tail; -}, "jssun.misc.Queue"); -Clazz_overrideMethod (c$, "hasMoreElements", -function () { -return (this.cursor != null); -}); -Clazz_overrideMethod (c$, "nextElement", -function () { -{ -if (this.cursor != null) { -var result = this.cursor; -this.cursor = this.cursor.prev; -return result.obj; -}}throw new java.util.NoSuchElementException ("FIFOQueueEnumerator"); -}); -c$ = Clazz_decorateAsClass (function () { -this.queue = null; -this.cursor = null; -Clazz_instantialize (this, arguments); -}, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration); -Clazz_makeConstructor (c$, -function (q) { -this.queue = q; -this.cursor = q.head; -}, "jssun.misc.Queue"); -Clazz_overrideMethod (c$, "hasMoreElements", -function () { -return (this.cursor != null); -}); -Clazz_overrideMethod (c$, "nextElement", -function () { -{ -if (this.cursor != null) { -var result = this.cursor; -this.cursor = this.cursor.next; -return result.obj; -}}throw new java.util.NoSuchElementException ("LIFOQueueEnumerator"); -}); -c$ = Clazz_decorateAsClass (function () { -this.next = null; -this.prev = null; -this.obj = null; -Clazz_instantialize (this, arguments); -}, jssun.misc, "QueueElement"); -Clazz_makeConstructor (c$, -function (obj) { -this.obj = obj; -}, "~O"); -Clazz_overrideMethod (c$, "toString", -function () { -return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]"; -}); -}); -Clazz_declarePackage ("javax.swing.plaf"); -Clazz_declareInterface (javax.swing.plaf, "UIResource"); -Clazz_declarePackage ("javax.swing.plaf"); -Clazz_load (["javax.swing.InputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.InputMapUIResource", null, function () { -c$ = Clazz_declareType (javax.swing.plaf, "InputMapUIResource", javax.swing.InputMap, javax.swing.plaf.UIResource); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.plaf.InputMapUIResource, []); -}); -}); -Clazz_declarePackage ("javax.swing.plaf"); -Clazz_load (["javax.swing.ActionMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ActionMapUIResource", null, function () { -c$ = Clazz_declareType (javax.swing.plaf, "ActionMapUIResource", javax.swing.ActionMap, javax.swing.plaf.UIResource); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, javax.swing.plaf.ActionMapUIResource, []); -}); -}); -Clazz_declarePackage ("javax.swing.plaf"); -Clazz_load (["java.awt.peer.LightweightPeer"], "javax.swing.plaf.ComponentUI", ["java.lang.Error", "java.awt.Component"], function () { -c$ = Clazz_declareType (javax.swing.plaf, "ComponentUI", null, java.awt.peer.LightweightPeer); -Clazz_makeConstructor (c$, -function () { -}); -Clazz_defineMethod (c$, "installUI", -function (c) { -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "uninstallUI", -function (c) { -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "paint", -function (g, c) { -}, "java.awt.Graphics,javax.swing.JComponent"); -Clazz_defineMethod (c$, "update", -function (g, c) { -}, "java.awt.Graphics,javax.swing.JComponent"); -Clazz_defineMethod (c$, "getPreferredSize", -function (c) { -return null; -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "getMinimumSize", -function (c) { -return this.getPreferredSize (c); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "getMaximumSize", -function (c) { -return null; -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "contains", -function (c, x, y) { -return c.inside (x, y); -}, "javax.swing.JComponent,~N,~N"); -c$.createUI = Clazz_defineMethod (c$, "createUI", -function (c) { -throw new Error ("ComponentUI.createUI not implemented."); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "getBaseline", -function (c, width, height) { -return -1; -}, "javax.swing.JComponent,~N,~N"); -Clazz_defineMethod (c$, "getBaselineResizeBehavior", -function (c) { -return java.awt.Component.BaselineResizeBehavior.OTHER; -}, "javax.swing.JComponent"); -}); -Clazz_declarePackage ("javax.swing.plaf"); -Clazz_load (["java.awt.Font", "javax.swing.plaf.UIResource"], "javax.swing.plaf.FontUIResource", null, function () { -c$ = Clazz_declareType (javax.swing.plaf, "FontUIResource", java.awt.Font, javax.swing.plaf.UIResource); -}); -Clazz_declarePackage ("javax.swing.plaf"); -Clazz_load (["java.awt.Color", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ColorUIResource", null, function () { -c$ = Clazz_declareType (javax.swing.plaf, "ColorUIResource", java.awt.Color, javax.swing.plaf.UIResource); -}); -Clazz_declarePackage ("javax.swing.plaf"); -Clazz_load (["javax.swing.ComponentInputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ComponentInputMapUIResource", null, function () { -c$ = Clazz_declareType (javax.swing.plaf, "ComponentInputMapUIResource", javax.swing.ComponentInputMap, javax.swing.plaf.UIResource); -}); -Clazz_declarePackage ("swingjs.api"); -Clazz_declareInterface (swingjs.api, "JSFunction"); -Clazz_declarePackage ("swingjs.api"); -Clazz_declareInterface (swingjs.api, "JSInterface"); -Clazz_declarePackage ("swingjs.api"); -c$ = Clazz_declareType (swingjs.api, "Interface"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function (name, isQuiet) { -try { -{ -Clazz._isQuiet = isQuiet; -}System.out.println ("swingjs.api.Interface creating instance of " + name); -var x = Clazz._4Name (name); -{ -Clazz._isQuiet = false; -}return (x == null ? null : x.newInstance ()); -} catch (e) { -if (Clazz_exceptionOf (e, Exception)) { -System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e); -return null; -} else { -throw e; -} -} -}, "~S,~B"); -Clazz_declarePackage ("swingjs.api"); -c$ = Clazz_declareType (swingjs.api, "DOMNode"); -c$.createElement = Clazz_defineMethod (c$, "createElement", -function (key, id) { -var obj = null; -{ -obj = document.createElement(key); -obj.id = id; -}return obj; -}, "~S,~S"); -c$.getParent = Clazz_defineMethod (c$, "getParent", -function (obj) { -{ -return obj.parentNode; -}}, "swingjs.api.DOMNode"); -c$.remove = Clazz_defineMethod (c$, "remove", -function (obj) { -{ -try { -var p = obj.parentNode; -p.removeNode(obj); -} catch(e) {}; -return p; -}}, "swingjs.api.DOMNode"); -c$.add = Clazz_defineMethod (c$, "add", -function (parent, child) { -{ -parent && parent.appendChild(child); -}}, "swingjs.api.DOMNode,swingjs.api.DOMNode"); -c$.getAttr = Clazz_defineMethod (c$, "getAttr", -function (obj, attr) { -{ -if (obj)return obj[attr]; -}}, "swingjs.api.DOMNode,~S"); -Clazz_defineMethod (c$, "getStyle", -function (style) { -{ -if (obj)return obj.style[style]; -}}, "~S"); -c$.setAttr = Clazz_defineMethod (c$, "setAttr", -function (obj, attr, val) { -{ -obj[attr] = (val == "TRUE" ? true : val); -}return obj; -}, "swingjs.api.DOMNode,~S,~O"); -c$.setStyles = Clazz_defineMethod (c$, "setStyles", -function (obj, attr) { -{ -for (var i = 0; i < attr.length;) { -//System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]]) -; -obj.style[attr[i++]] = attr[i++]; } -}return obj; -}, "swingjs.api.DOMNode,~A"); -c$.setSize = Clazz_defineMethod (c$, "setSize", -function (obj, width, height) { -return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]); -}, "swingjs.api.DOMNode,~N,~N"); -Clazz_declarePackage ("swingjs"); -c$ = Clazz_declareType (swingjs, "JSUtil"); -c$.split = Clazz_defineMethod (c$, "split", -function (text, run) { -if (text.length == 0) return new Array (0); -var n = 1; -var i = text.indexOf (run); -var lines; -var runLen = run.length; -if (i < 0 || runLen == 0) { -lines = new Array (1); -lines[0] = text; -return lines; -}var len = text.length - runLen; -for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen); - -lines = new Array (n); -i = 0; -var ipt = 0; -var pt = 0; -for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) { -lines[pt++] = text.substring (i, ipt); -i = ipt + runLen; -} -if (text.indexOf (run, len) != len) len += runLen; -lines[pt] = text.substring (i, len); -return lines; -}, "~S,~S"); -Clazz_declarePackage ("swingjs"); -Clazz_load (["jssun.awt.SunToolkit"], "swingjs.JSToolkit", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "$.InputStream", "java.lang.Boolean", "$.Thread", "java.util.Hashtable", "JU.AU", "$.Rdr", "$.SB", "java.awt.Dimension", "java.awt.image.ColorModel", "javax.swing.UIManager", "jssun.awt.AppContext", "swingjs.JSComponentPeer", "$.JSImage", "swingjs.api.Interface"], function () { -c$ = Clazz_decorateAsClass (function () { -this.imageKit = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSToolkit", jssun.awt.SunToolkit); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, swingjs.JSToolkit); -System.out.println ("JSToolkit initialized"); -}); -c$.warn = Clazz_defineMethod (c$, "warn", -function (msg) { -swingjs.JSToolkit.alert (msg); -}, "~S"); -c$.alert = Clazz_defineMethod (c$, "alert", -function (object) { -{ -console.log("[JSToolkit] " + object); -alert("[JSToolkit] " + object); -}}, "~O"); -c$.log = Clazz_defineMethod (c$, "log", -function (msg) { -{ -System.out.println(msg); -console.log(msg); -}}, "~S"); -c$.confirm = Clazz_defineMethod (c$, "confirm", -function (msg) { -{ -return confirm(msg); -}}, "~S"); -c$.prompt = Clazz_defineMethod (c$, "prompt", -function (msg, defaultRet) { -{ -return confirm(msg, defaultRet); -}}, "~S,~S"); -c$.getPostEventQueue = Clazz_defineMethod (c$, "getPostEventQueue", -function (isPost) { -return (isPost ? jssun.awt.AppContext.getAppContext ().get ("PostEventQueue") : jssun.awt.AppContext.getAppContext ().get (jssun.awt.AppContext.EVENT_QUEUE_KEY)); -}, "~B"); -Clazz_overrideMethod (c$, "getScreenSize", -function () { -var d = new java.awt.Dimension (0, 0); -var jq = swingjs.JSToolkit.getJQuery (); -{ -d.setSize(jq.$(window).width(), jq.$(window).height()); return -d; -}}); -Clazz_overrideMethod (c$, "getScreenResolution", -function () { -return 0; -}); -Clazz_overrideMethod (c$, "getColorModel", -function () { -return java.awt.image.ColorModel.getRGBdefault (); -}); -Clazz_overrideMethod (c$, "getFontList", -function () { -var hardwiredFontList = Clazz_newArray (-1, ["SansSerif", "SansSerif", "Serif", "Monospaced", "DialogInput"]); -return hardwiredFontList; -}); -Clazz_overrideMethod (c$, "sync", -function () { -}); -Clazz_overrideMethod (c$, "isModalExclusionTypeSupported", -function (modalExclusionType) { -return true; -}, "java.awt.Dialog.ModalExclusionType"); -Clazz_overrideMethod (c$, "isModalityTypeSupported", -function (modalityType) { -return false; -}, "java.awt.Dialog.ModalityType"); -Clazz_overrideMethod (c$, "isTraySupported", -function () { -return false; -}); -Clazz_overrideMethod (c$, "getScreenWidth", -function () { -return 0; -}); -Clazz_overrideMethod (c$, "getScreenHeight", -function () { -return 0; -}); -Clazz_overrideMethod (c$, "grab", -function (w) { -}, "java.awt.Window"); -Clazz_overrideMethod (c$, "ungrab", -function (w) { -}, "java.awt.Window"); -c$.getPropertyObject = Clazz_defineMethod (c$, "getPropertyObject", -function (t, key, def) { -return def; -}, "~O,~S,~O"); -c$.getInstance = Clazz_defineMethod (c$, "getInstance", -function (className) { -return swingjs.api.Interface.getInstance (className, false); -}, "~S"); -c$.getGraphicsConfiguration = Clazz_defineMethod (c$, "getGraphicsConfiguration", -function () { -return (swingjs.JSToolkit.gc == null ? swingjs.JSToolkit.gc = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsConfiguration") : swingjs.JSToolkit.gc); -}); -c$.isFocused = Clazz_defineMethod (c$, "isFocused", -function (window) { -return false; -}, "java.awt.Window"); -c$.getCSSFont = Clazz_defineMethod (c$, "getCSSFont", -function (font) { -var css = ""; -if (font.isItalic ()) css += "font-style:italic;"; -if (font.isBold ()) css += "font-weight:bold;"; -css += "font-size:" + font.getSize () + "px;"; -css += "font-family:" + font.getFamily () + ";"; -return css; -}, "java.awt.Font"); -c$.getStringWidth = Clazz_defineMethod (c$, "getStringWidth", -function (context, font, text) { -var fontInfo = swingjs.JSToolkit.getCanvasFont (font); -if (context == null) context = swingjs.JSToolkit.getDefaultCanvasContext2d (); -var w = 0; -{ -context.font = fontInfo; -w = Math.ceil(context.measureText(text).width); -}return w; -}, "swingjs.api.HTML5CanvasContext2D,java.awt.Font,~S"); -c$.getDefaultCanvasContext2d = Clazz_defineMethod (c$, "getDefaultCanvasContext2d", -function () { -{ -if (this.defaultContext == null) this.defaultContext = -document.createElement( 'canvas' ).getContext('2d'); -}return swingjs.JSToolkit.defaultContext; -}); -c$.getCanvasFont = Clazz_defineMethod (c$, "getCanvasFont", -function (font) { -var strStyle = ""; -if (font.isItalic ()) strStyle += "italic "; -if (font.isBold ()) strStyle += "bold "; -return strStyle + font.getSize () + "px " + font.getFamily (); -}, "java.awt.Font"); -c$.getFontFamily = Clazz_defineMethod (c$, "getFontFamily", -function (font) { -return font.getName (); -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "getFontMetrics", -function (font) { -var fm = swingjs.JSToolkit.getInstance ("swingjs.JSFontMetrics"); -fm.setFont (font); -return fm; -}, "java.awt.Font"); -c$.getCSSColor = Clazz_defineMethod (c$, "getCSSColor", -function (c) { -var s = "000000" + Integer.toHexString (c.getRGB () & 0xFFFFFF); -return "#" + s.substring (s.length - 6); -}, "java.awt.Color"); -c$.notImplemented = Clazz_defineMethod (c$, "notImplemented", -function (msg) { -var s = null; -if (swingjs.JSToolkit.mapNotImpl == null) swingjs.JSToolkit.mapNotImpl = new java.util.Hashtable (); -{ -s = arguments.callee.caller; s = s.__CLASS_NAME__ || -s.claxxOwner.__CLASS_NAME__; s += "." + -arguments.callee.caller.exName; -}if (swingjs.JSToolkit.mapNotImpl.containsKey (s)) return; -swingjs.JSToolkit.mapNotImpl.put (s, Boolean.TRUE); -System.out.println (s + " has not been implemented in SwingJS. " + (msg === "" ? "" : (msg == null ? "" : msg) + swingjs.JSToolkit.getStackTrace (-5))); -}, "~S"); -c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", -function () { -{ -return Clazz_getStackTrace(); -}}); -c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", -function (n) { -{ -return Clazz_getStackTrace(n); -}}, "~N"); -c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", -function () { -if (swingjs.JSToolkit.uid == null) swingjs.JSToolkit.uid = javax.swing.UIManager.getLookAndFeel ().getDefaults (); -return swingjs.JSToolkit.uid; -}); -c$.getComponentUI = Clazz_defineMethod (c$, "getComponentUI", -function (target) { -var c = swingjs.api.Interface.getInstance ("swingjs.plaf.JS" + target.getUIClassID (), true); -if (c != null) c.set (target); -return c; -}, "javax.swing.JComponent"); -c$.getSwingDivId = Clazz_defineMethod (c$, "getSwingDivId", -function () { -return Thread.currentThread ().getName () + "_swingdiv"; -}); -c$.getJQuery = Clazz_defineMethod (c$, "getJQuery", -function () { -{ -if (!window.jQuery) alert( -"jQuery is required for SwingJS, but window.jQuery is not defined." -); jQuery.$ || (jQuery.$ = jQuery); return(jQuery); -}}); -c$.getJavaResource = Clazz_defineMethod (c$, "getJavaResource", -function (resourceName) { -System.out.println ("JSToolkit getting Java resource " + resourceName); -{ -return SwingJS.getJavaResource(resourceName); -}}, "~S"); -c$.dispatchSystemEvent = Clazz_defineMethod (c$, "dispatchSystemEvent", -function (runnable) { -var f = null; -{ -System.out.println("JST dispatchSystemEvent " + -runnable.run.toString()); f = -function(_JSToolkit_dispatchSystemEvent) { -System.out.println("JST running " + -runnable.run.toString());runnable.run()}; -}swingjs.JSToolkit.setTimeout (f, 0, 0); -}, "Runnable"); -c$.dispatchEvent = Clazz_defineMethod (c$, "dispatchEvent", -function (event, src, andWait) { -var f = null; -var id = ++swingjs.JSToolkit.dispatchID; -{ -f = function() -{ -if -(src == null) event.dispatch(); else src.dispatchEvent(event); -}; -}if (andWait) swingjs.JSToolkit.invokeAndWait (f, id); - else swingjs.JSToolkit.setTimeout (f, 0, id); -}, "java.awt.AWTEvent,~O,~B"); -c$.setTimeout = Clazz_defineMethod (c$, "setTimeout", -function (f, msDelay, id) { -{ -var thread = java.lang.Thread.thisThread; -var thread0 = thread; -var id0 = SwingJS.eventID || 0; -setTimeout(function(_JSToolkit_setTimeout) { -SwingJS.eventID = id; -java.lang.Thread.thisThread = thread; -try { -if (f.run) -f.run(); -else -f(); -} catch (e) { -var s = "JSToolkit.setTimeout(" + id +"): " + e; -System.out.println(s); -alert(s)} -SwingJS.eventID = id0; -java.lang.Thread.thisThread = thread0; -}, msDelay); -}}, "~O,~N,~N"); -c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", - function (f, id) { -{ -var thread = java.lang.Thread.thisThread; -var thread0 = thread; -(function(_JSToolkit_setTimeout) { -var id0 = SwingJS.eventID || 0; -System.out.println("runNow " + id); SwingJS.eventID = id; -java.lang.Thread.thisThread = thread; -if (f.run) -f.run(); -else -f(); -SwingJS.eventID = id0; -java.lang.Thread.thisThread = thread0; -})(); -}}, "swingjs.api.JSFunction,~N"); -c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", -function () { -{ -return (!!SwingJS.eventID); -}}); -c$.checkClassMethod = Clazz_defineMethod (c$, "checkClassMethod", -function (component, fname, signature) { -{ -return component[fname] && component[fname][signature]; -}}, "java.awt.Component,~S,~S"); -c$.readyCallback = Clazz_defineMethod (c$, "readyCallback", -function (aname, fname, a, me) { -{ -Jmol._readyCallback(aname, fname, true,a, me); -}}, "~S,~S,~O,~O"); -c$.forceRepaint = Clazz_defineMethod (c$, "forceRepaint", -function (c) { -}, "java.awt.Component"); -c$.getHTML5Applet = Clazz_defineMethod (c$, "getHTML5Applet", -function (c) { -return (c.getAppContext ().getThreadGroup ()).getHtmlApplet (); -}, "javax.swing.JComponent"); -c$.taintUI = Clazz_defineMethod (c$, "taintUI", -function (c) { -{ -c.getUI && c.getUI() && c.getUI().setTainted(); -}}, "java.awt.Component"); -Clazz_overrideMethod (c$, "createComponent", -function (target) { -System.out.println ("JSToolkit creating LightweightPeer for " + target); -var peer = swingjs.JSToolkit.getUI (target, true); -return (peer == null ? new swingjs.JSComponentPeer (target) : peer); -}, "java.awt.Component"); -c$.getPlainDocument = Clazz_defineMethod (c$, "getPlainDocument", -function (c) { -return swingjs.JSToolkit.getInstance ("swingjs.JSPlainDocument"); -}, "javax.swing.JComponent"); -c$.getClassName = Clazz_defineMethod (c$, "getClassName", -function (c) { -{ -return c.__CLASS_NAME__; -}}, "~O"); -c$.getSignedStreamBytes = Clazz_defineMethod (c$, "getSignedStreamBytes", -function (bis) { -try { -return JU.AU.ensureSignedBytes (JU.Rdr.getStreamAsBytes (bis, null)); -} catch (e) { -if (Clazz_exceptionOf (e, java.io.IOException)) { -return null; -} else { -throw e; -} -} -}, "java.io.BufferedInputStream"); -c$.getFileContents = Clazz_defineMethod (c$, "getFileContents", -function (uri) { -{ -return Jmol._getFileData(uri); -}}, "~S"); -Clazz_defineMethod (c$, "getFileAsBytes", -function (filename) { -var data = swingjs.JSToolkit.getFileContents (filename); -var b = null; -if (JU.AU.isAB (data)) b = data; - else if (Clazz_instanceOf (data, String)) b = (data).getBytes (); - else if (Clazz_instanceOf (data, JU.SB)) b = JU.Rdr.getBytesFromSB (data); - else if (Clazz_instanceOf (data, java.io.InputStream)) try { -b = JU.Rdr.getLimitedStreamBytes (data, -1); -} catch (e) { -if (Clazz_exceptionOf (e, java.io.IOException)) { -} else { -throw e; -} -} -return JU.AU.ensureSignedBytes (b); -}, "~S"); -Clazz_defineMethod (c$, "getImagekit", - function () { -return (this.imageKit == null ? this.imageKit = swingjs.api.Interface.getInstance ("swingjs.JSImagekit", false) : this.imageKit); -}); -Clazz_defineMethod (c$, "createImage", -function (producer) { -producer.startProduction (null); -return null; -}, "java.awt.image.ImageProducer"); -Clazz_defineMethod (c$, "createImage", -function (filename) { -return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (this.getFileAsBytes (filename)))), 0, -1); -}, "~S"); -Clazz_defineMethod (c$, "createImage", -function (url) { -try { -return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream (url.openStream ())), 0, -1); -} catch (e) { -if (Clazz_exceptionOf (e, java.io.IOException)) { -return null; -} else { -throw e; -} -} -}, "java.net.URL"); -Clazz_defineMethod (c$, "createImage", -function (data, imageoffset, imagelength) { -if (data == null) { -var width = imageoffset; -var height = imagelength; -return new swingjs.JSImage (null, width, height); -}return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength); -}, "~A,~N,~N"); -Clazz_overrideMethod (c$, "checkImage", -function (image, width, height, observer) { -return 63; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "prepareImage", -function (image, width, height, observer) { -return true; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -c$.hasFocus = Clazz_defineMethod (c$, "hasFocus", -function (c) { -var ui = swingjs.JSToolkit.getUI (c, false); -return (ui != null && ui.hasFocus ()); -}, "java.awt.Component"); -c$.getUI = Clazz_defineMethod (c$, "getUI", -function (c, isQuiet) { -var ui = null; -{ -ui = c.getUI && c.getUI(); -}if (ui == null) { -var s = "[JSToolkit] Component " + c.getClass ().getName () + " has no cooresponding JSComponentUI."; -System.out.println (s); -}return ui; -}, "java.awt.Component,~B"); -c$.requestFocus = Clazz_defineMethod (c$, "requestFocus", -function (c) { -var ui = swingjs.JSToolkit.getUI (c, false); -if (ui == null || !ui.isFocusable ()) return false; -var r = ((Clazz_isClassDefined ("swingjs.JSToolkit$1") ? 0 : swingjs.JSToolkit.$JSToolkit$1$ ()), Clazz_innerTypeInstance (swingjs.JSToolkit$1, this, Clazz_cloneFinals ("ui", ui))); -swingjs.JSToolkit.setTimeout (r, 50, 0); -return true; -}, "java.awt.Component"); -c$.getCompositor = Clazz_defineMethod (c$, "getCompositor", -function () { -return (swingjs.JSToolkit.compositor == null ? swingjs.JSToolkit.compositor = swingjs.api.Interface.getInstance ("swingjs.JSGraphicsCompositor", false) : swingjs.JSToolkit.compositor); -}); -c$.setGraphicsCompositeAlpha = Clazz_defineMethod (c$, "setGraphicsCompositeAlpha", -function (g, rule) { -return swingjs.JSToolkit.getCompositor ().setGraphicsCompositeAlpha (g, rule); -}, "swingjs.JSGraphics2D,~N"); -c$.drawImageOp = Clazz_defineMethod (c$, "drawImageOp", -function (g, img, op, x, y) { -return swingjs.JSToolkit.getCompositor ().drawImageOp (g, img, op, x, y); -}, "swingjs.JSGraphics2D,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N"); -c$.filterRaster = Clazz_defineMethod (c$, "filterRaster", -function (src, dst, op) { -return swingjs.JSToolkit.getCompositor ().filterRaster (src, dst, op); -}, "java.awt.image.Raster,java.awt.image.WritableRaster,java.awt.image.RasterOp"); -c$.filterImage = Clazz_defineMethod (c$, "filterImage", -function (src, dst, op) { -return swingjs.JSToolkit.getCompositor ().filterImage (src, dst, op); -}, "java.awt.image.BufferedImage,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp"); -c$.getZIndex = Clazz_defineMethod (c$, "getZIndex", -function (ui, what) { -{ -if (what) return getHTML5Applet(ui.c)._z[what]; -var c = ui.domNode; var z; -while (c && !(z = c.style["z-index"])) { -c = c.parentNode; -} -return z || 100000; -}}, "swingjs.plaf.JSComponentUI,~S"); -Clazz_overrideMethod (c$, "createFrame", -function (target) { -return this.createWindowPeer (target, true); -}, "java.awt.Frame"); -Clazz_overrideMethod (c$, "createWindow", -function (target) { -return this.createWindowPeer (target, false); -}, "java.awt.Window"); -Clazz_defineMethod (c$, "createWindowPeer", - function (target, isFrame) { -return (swingjs.JSToolkit.getInstance ("swingjs.JSWindowPeer")).setFrame (target, true); -}, "java.awt.Window,~B"); -c$.$JSToolkit$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (swingjs, "JSToolkit$1", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -this.f$.ui.requestFocus (null, false, false, 0, null); -}); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"gc", null, -"defaultContext", null, -"mapNotImpl", null, -"uid", null, -"dispatchID", 0, -"compositor", null); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () { -c$ = Clazz_declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent); -Clazz_makeConstructor (c$, -function (t, r) { -Clazz_superConstructor (this, swingjs.JSEvent, [t, 1201, r, null, false]); -}, "swingjs.JSThread,Runnable"); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.awt.FontMetrics"], "swingjs.JSFontMetrics", ["swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.widths = null; -this.iwidths = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSFontMetrics", java.awt.FontMetrics); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, swingjs.JSFontMetrics, [null]); -}); -Clazz_defineMethod (c$, "setFont", -function (f) { -this.font = f; -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "getLeading", -function () { -return Clazz_doubleToInt (this.font.getSize () / 20) + 1; -}); -Clazz_overrideMethod (c$, "getAscent", -function () { -return this.font.getSize (); -}); -Clazz_overrideMethod (c$, "getDescent", -function () { -return Clazz_doubleToInt (this.font.getSize () / 4) + 1; -}); -Clazz_defineMethod (c$, "charWidth", -function (pt) { -return (pt.charCodeAt (0) < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt.charCodeAt (0)]) : this.stringWidth ("" + pt)); -}, "~S"); -Clazz_defineMethod (c$, "charWidth", -function (pt) { -return (pt < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt]) : this.stringWidth ("" + String.fromCharCode (pt))); -}, "~N"); -Clazz_overrideMethod (c$, "stringWidth", -function (s) { -return Clazz_floatToInt (swingjs.JSToolkit.getStringWidth (null, this.font, s)); -}, "~S"); -Clazz_overrideMethod (c$, "getWidths", -function () { -if (this.iwidths != null) return this.iwidths; -this.iwidths = Clazz_newIntArray (256, 0); -this.getWidthsFloat (); -for (var ch = 0; ch < 256; ch++) { -this.iwidths[ch] = Clazz_floatToInt (this.widths[ch]); -} -return this.iwidths; -}); -Clazz_defineMethod (c$, "getWidthsFloat", -function () { -if (this.widths != null) return this.widths; -this.widths = Clazz_newFloatArray (256, 0); -for (var ch = 0; ch < 256; ch++) { -this.widths[ch] = swingjs.JSToolkit.getStringWidth (null, this.font, "" + String.fromCharCode (ch)); -} -return this.widths; -}); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.isJS = false; -Clazz_instantialize (this, arguments); -}, swingjs, "JSThread", Thread, swingjs.api.JSFunction); -Clazz_makeConstructor (c$, -function (group, name) { -Clazz_superConstructor (this, swingjs.JSThread, [group, name]); -{ -this.isJS = true; -}}, "ThreadGroup,~S"); -Clazz_overrideMethod (c$, "run", -function () { -this.run1 (0); -}); -Clazz_defineMethod (c$, "start", -function () { -{ -swingjs.JSToolkit.setTimeout(this, 1, 0); -}}); -Clazz_defineMethod (c$, "sleepAndReturn", -function (delay, state) { -if (!this.isJS) { -Thread.sleep (delay); -return false; -}var me = this; -var r = ((Clazz_isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSThread$1, this, Clazz_cloneFinals ("me", me, "state", state))); -{ -setTimeout( -function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))}, -delay -); -}return true; -}, "~N,~N"); -c$.$JSThread$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (swingjs, "JSThread$1", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -this.f$.me.run1 (this.f$.state); -}); -c$ = Clazz_p0p (); -}; -Clazz_defineStatics (c$, -"INIT", 0, -"LOOP", 1, -"DONE", 2); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.lang.ThreadGroup"], "swingjs.JSThreadGroup", null, function () { -c$ = Clazz_decorateAsClass (function () { -this.html5Applet = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSThreadGroup", ThreadGroup); -Clazz_defineMethod (c$, "setHtmlApplet", -function (html5Applet) { -this.html5Applet = html5Applet; -}, "swingjs.api.HTML5Applet"); -Clazz_defineMethod (c$, "getHtmlApplet", -function () { -return this.html5Applet; -}); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.applet.AppletContext", "$.AppletStub", "java.awt.Panel", "swingjs.api.JSInterface", "java.awt.Dimension"], "swingjs.JSAppletPanel", ["java.lang.InstantiationException", "java.net.URL", "java.awt.BorderLayout", "$.Font", "$.Toolkit", "javax.swing.JApplet", "jssun.applet.AppletEvent", "$.AppletEventMulticaster", "swingjs.JSAppletThread", "$.JSGraphics2D", "$.JSMouse", "$.JSThreadGroup", "$.JSToolkit", "$.JSUtil", "swingjs.api.Interface"], function () { -c$ = Clazz_decorateAsClass (function () { -this.params = null; -this.html5Applet = null; -this.fullName = null; -this.appletCodeBase = null; -this.appletIdiomaBase = null; -this.appletDocumentBase = null; -this.maximumSize = 2147483647; -this.appletName = null; -this.syncId = null; -this.testAsync = false; -this.async = false; -this.strJavaVersion = null; -this.strJavaVendor = null; -this.display = null; -this.canvas = null; -this.jsgraphics = null; -this.applet = null; -this.defaultAppletSize = null; -this.currentAppletSize = null; -this.nextStatus = 0; -this.status = 0; -this.listeners = null; -this.mouse = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSAppletPanel", java.awt.Panel, [java.applet.AppletStub, java.applet.AppletContext, swingjs.api.JSInterface]); -Clazz_prepareFields (c$, function () { -this.defaultAppletSize = new java.awt.Dimension (10, 10); -this.currentAppletSize = new java.awt.Dimension (10, 10); -}); -Clazz_makeConstructor (c$, -function (params) { -Clazz_superConstructor (this, swingjs.JSAppletPanel, []); -this.setPanel (); -this.set (params); -}, "java.util.Hashtable"); -Clazz_defineMethod (c$, "set", - function (params) { -System.out.println ("JSAppletPanel initializing"); -this.params = params; -this.htmlName = swingjs.JSUtil.split ("" + this.getParameter ("name"), "_object")[0]; -this.appletName = swingjs.JSUtil.split (this.htmlName + "_", "_")[0]; -this.syncId = this.getParameter ("syncId"); -this.fullName = this.htmlName + "__" + this.syncId + "__"; -params.put ("fullName", this.fullName); -var o = params.get ("codePath"); -if (o == null) o = "../java/"; -this.appletCodeBase = o.toString (); -this.appletIdiomaBase = this.appletCodeBase.substring (0, this.appletCodeBase.lastIndexOf ("/", this.appletCodeBase.length - 2) + 1) + "idioma"; -o = params.get ("documentBase"); -this.appletDocumentBase = (o == null ? "" : o.toString ()); -if (params.containsKey ("maximumSize")) Math.max ((params.get ("maximumSize")).intValue (), 100); -this.async = (this.testAsync || params.containsKey ("async")); -var applet = null; -var javaver = "?"; -{ -if(self.Jmol) { applet = -Jmol._applets[this.htmlName.split("_object")[0]]; javaver = -Jmol._version; } -}this.html5Applet = applet; -this.strJavaVersion = javaver; -this.strJavaVendor = "Java2Script/Java 1.6 (HTML5)"; -this.display = params.get ("display"); -this.threadGroup = new swingjs.JSThreadGroup (this.appletName); -this.myThread = new swingjs.JSAppletThread (this, this.threadGroup, this.appletName); -(this.threadGroup).setHtmlApplet (this.html5Applet); -{ -Jmol._applets[this.appletName + "_thread"] = -java.lang.Thread.thisThread = this.myThread; -}this.appContext = swingjs.JSToolkit.createNewAppContext (); -java.awt.Toolkit.getDefaultToolkit (); -try { -java.net.URL.setURLStreamHandlerFactory (swingjs.api.Interface.getInstance ("JU.AjaxURLStreamHandlerFactory", false)); -} catch (e) { -} -System.out.println ("JSAppletPanel initialized"); -}, "java.util.Hashtable"); -Clazz_defineMethod (c$, "start", -function () { -if (this.status == 0) this.myThread.start (); - else this.showStatus ("already started"); -}); -Clazz_defineMethod (c$, "addAppletListener", -function (l) { -this.listeners = jssun.applet.AppletEventMulticaster.add (this.listeners, l); -}, "jssun.applet.AppletListener"); -Clazz_defineMethod (c$, "removeAppletListener", -function (l) { -this.listeners = jssun.applet.AppletEventMulticaster.remove (this.listeners, l); -}, "jssun.applet.AppletListener"); -Clazz_defineMethod (c$, "dispatchAppletEvent", -function (id, argument) { -if (this.listeners != null) { -var evt = new jssun.applet.AppletEvent (this, id, argument); -this.listeners.appletStateChanged (evt); -}}, "~N,~O"); -Clazz_defineMethod (c$, "getCode", - function () { -return this.getParameter ("code"); -}); -Clazz_defineMethod (c$, "getCanvas", - function () { -return (this.canvas == null ? (this.canvas = this.html5Applet._getHtml5Canvas ()) : this.canvas); -}); -Clazz_overrideMethod (c$, "isActive", -function () { -return true; -}); -Clazz_overrideMethod (c$, "appletResize", -function (width, height) { -var currentSize = new java.awt.Dimension (this.currentAppletSize.width, this.currentAppletSize.height); -this.currentAppletSize.width = width; -this.currentAppletSize.height = height; -this.applet.setBounds (0, 0, this.getWidth (), this.getHeight ()); -this.applet.getRootPane ().setBounds (0, 0, this.getWidth (), this.getHeight ()); -this.applet.getContentPane ().setBounds (0, 0, this.getWidth (), this.getHeight ()); -(this.applet.getContentPane ()).revalidate (); -this.dispatchAppletEvent (51234, currentSize); -}, "~N,~N"); -Clazz_overrideMethod (c$, "getDocumentBase", -function () { -try { -return new java.net.URL (this.params.get ("documentBase")); -} catch (e) { -if (Clazz_exceptionOf (e, java.net.MalformedURLException)) { -return null; -} else { -throw e; -} -} -}); -Clazz_overrideMethod (c$, "getCodeBase", -function () { -try { -return new java.net.URL (this.params.get ("codePath")); -} catch (e) { -if (Clazz_exceptionOf (e, java.net.MalformedURLException)) { -return null; -} else { -throw e; -} -} -}); -Clazz_overrideMethod (c$, "getParameter", -function (name) { -var s = this.params.get (name); -System.out.println ("get parameter: " + name + " = " + s); -return (s == null ? null : "" + s); -}, "~S"); -Clazz_overrideMethod (c$, "getAppletContext", -function () { -return this; -}); -Clazz_defineMethod (c$, "getHeight", -function () { -return this.html5Applet._getHeight (); -}); -Clazz_defineMethod (c$, "getWidth", -function () { -return this.html5Applet._getWidth (); -}); -Clazz_defineMethod (c$, "setBounds", -function (x, y, width, height) { -this.reshape (x, y, width, height); -this.currentAppletSize.width = width; -this.currentAppletSize.height = height; -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getImage", -function (url) { -return null; -}, "java.net.URL"); -Clazz_overrideMethod (c$, "getApplet", -function (name) { -var applet = null; -{ -applet = Jmol._applets[name]; applet && (applet = -applet._applet); -}return applet; -}, "~S"); -Clazz_overrideMethod (c$, "getApplets", -function () { -return null; -}); -Clazz_defineMethod (c$, "showDocument", -function (url) { -{ -window.open(url.toString()); -}}, "java.net.URL"); -Clazz_defineMethod (c$, "showDocument", -function (url, target) { -{ -window.open(url.toString(), target); -}}, "java.net.URL,~S"); -Clazz_defineMethod (c$, "showStatus", -function (status) { -swingjs.JSToolkit.log (status); -{ -Clazz._LoaderProgressMonitor.showStatus(status, true); -}}, "~S"); -Clazz_overrideMethod (c$, "cacheFileByName", -function (fileName, isAdd) { -return 0; -}, "~S,~B"); -Clazz_overrideMethod (c$, "cachePut", -function (key, data) { -}, "~S,~O"); -Clazz_overrideMethod (c$, "destroy", -function () { -}); -Clazz_overrideMethod (c$, "getFullName", -function () { -return this.fullName; -}); -Clazz_overrideMethod (c$, "openFileAsyncSpecial", -function (fileName, flags) { -}, "~S,~N"); -Clazz_defineMethod (c$, "processMouseEvent", -function (id, x, y, modifiers, time) { -this.getMouse ().processEvent (id, x, y, modifiers, time); -return false; -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "getMouse", - function () { -return (this.mouse == null ? this.mouse = new swingjs.JSMouse (this) : this.mouse); -}); -Clazz_overrideMethod (c$, "processTwoPointGesture", -function (touches) { -this.getMouse ().processTwoPointGesture (touches); -}, "~A"); -Clazz_overrideMethod (c$, "setDisplay", -function (canvas) { -this.canvas = canvas; -}, "swingjs.api.HTML5Canvas"); -Clazz_overrideMethod (c$, "setScreenDimension", -function (width, height) { -this.setGraphics (this.jsgraphics = null); -if (this.applet != null) this.applet.resize (width, height); -}, "~N,~N"); -Clazz_overrideMethod (c$, "setStatusDragDropped", -function (mode, x, y, fileName) { -return false; -}, "~N,~N,~N,~S"); -Clazz_overrideMethod (c$, "startHoverWatcher", -function (enable) { -}, "~B"); -Clazz_overrideMethod (c$, "paint", -function (g) { -this.applet.paint (this.setGraphics (g)); -}, "java.awt.Graphics"); -Clazz_defineMethod (c$, "setGraphics", - function (g) { -return (g == null ? this.getGraphics () : g); -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "getGraphics", -function () { -if (this.jsgraphics == null) { -this.jsgraphics = new swingjs.JSGraphics2D (this.getCanvas ()); -this.jsgraphics.setWindowParameters (this.getWidth (), this.getHeight ()); -}return this.jsgraphics; -}); -Clazz_defineMethod (c$, "showAppletStatus", - function (status) { -this.getAppletContext ().showStatus (this.htmlName + " " + status); -}, "~S"); -Clazz_defineMethod (c$, "showAppletException", - function (t) { -{ -this.showAppletStatus("error " + (t.getMessage ? -t.getMessage() : t)); t.printStackTrace && -t.printStackTrace(); -}this.repaint (); -}, "Throwable"); -Clazz_defineMethod (c$, "run1", -function (mode) { -var ok = false; -switch (mode) { -case 0: -this.currentAppletSize.width = this.defaultAppletSize.width = this.getWidth (); -this.currentAppletSize.height = this.defaultAppletSize.height = this.getHeight (); -this.setLayout ( new java.awt.BorderLayout ()); -this.nextStatus = 1; -ok = true; -break; -case 1: -switch (this.nextStatus) { -case 1: -if (this.status != 0) { -this.showAppletStatus ("notdisposed"); -this.status = 7; -break; -}System.out.println ("JSAppletPanel runloader"); -this.runLoader (); -this.nextStatus = 2; -ok = true; -break; -case 2: -if (this.status != 1 && this.status != 5) { -this.showAppletStatus ("notloaded"); -break; -}System.out.println ("JSAppletPanel init"); -this.setFont ( new java.awt.Font ("Dialog", 0, 12)); -this.applet.resize (this.defaultAppletSize); -this.applet.init (); -this.validate (); -this.status = 2; -this.showAppletStatus ("initialized"); -this.nextStatus = 3; -ok = true; -break; -case 3: -if (this.status != 2 && this.status != 4) { -this.showAppletStatus ("notstarted"); -this.status = 7; -break; -}this.applet.getRootPane ().addNotify (); -System.out.println ("JSAppletPanel start" + this.currentAppletSize); -this.applet.resize (this.currentAppletSize); -this.applet.start (); -this.status = 3; -this.showAppletStatus ("started"); -this.nextStatus = 35; -ok = true; -break; -case 35: -swingjs.JSToolkit.readyCallback (this.appletName, this.fullName, this.applet, this); -break; -case 4: -if (this.status == 3) { -this.status = 4; -this.applet.setVisible (false); -this.applet.stop (); -this.showAppletStatus ("stopped"); -} else { -this.showAppletStatus ("notstopped"); -this.status = 7; -}break; -case 5: -if (this.status == 4 || this.status == 2) { -this.status = 5; -this.applet.destroy (); -this.showAppletStatus ("destroyed"); -} else { -this.showAppletStatus ("notdestroyed"); -this.status = 7; -}break; -case 75: -if (this.status == 5 || this.status == 1) { -this.showAppletStatus ("notdisposed"); -this.status = 7; -} else { -this.status = 0; -this.removeChild (this.applet); -this.applet = null; -this.showAppletStatus ("disposed"); -}break; -case 6: -break; -default: -System.out.println ("unrecognized JSAppletPanel status: " + this.nextStatus); -break; -} -break; -default: -System.out.println ("unrecognized JSAppletThread mode: " + mode); -break; -} -return (ok ? 1 : 2); -}, "~N"); -Clazz_defineMethod (c$, "runLoader", - function () { -this.dispatchAppletEvent (51235, null); -this.status = 1; -var code = this.getCode (); -try { -if (code == null) { -System.err.println ("runloader.err-- \"code\" must be specified."); -throw new InstantiationException ("\"code\" must be specified."); -}this.applet = swingjs.JSToolkit.getInstance (code); -if (this.applet == null) { -System.out.println (code + " could not be launched"); -this.status = 7; -} else if (!(Clazz_instanceOf (this.applet, javax.swing.JApplet))) { -System.out.println (code + " is not a JApplet!?"); -this.status = 7; -}} catch (e$$) { -if (Clazz_exceptionOf (e$$, InstantiationException)) { -var e = e$$; -{ -this.status = 7; -this.showAppletException (e); -return; -} -} else if (Clazz_exceptionOf (e$$, Exception)) { -var e = e$$; -{ -this.status = 7; -this.showAppletException (e); -return; -} -} else if (Clazz_exceptionOf (e$$, ThreadDeath)) { -var e = e$$; -{ -this.status = 7; -this.showAppletStatus ("death"); -return; -} -} else if (Clazz_exceptionOf (e$$, Error)) { -var e = e$$; -{ -this.status = 7; -this.showAppletException (e); -return; -} -} else { -throw e$$; -} -} finally { -this.dispatchAppletEvent (51236, null); -} -if (this.applet != null) { -this.applet.setStub (this); -this.applet.setVisible (false); -this.add ("Center", this.applet); -this.applet.setDispatcher (); -this.applet.addNotify (); -this.showAppletStatus ("loaded"); -this.validate (); -}}); -Clazz_defineMethod (c$, "getUI", -function () { -return null; -}); -Clazz_overrideMethod (c$, "repaintImpl", -function (tm, x, y, width, height) { -if (this.applet.isVisible () && this.applet.getWidth () > 0 && this.applet.getHeight () > 0) { -this.applet.getContentPane ().repaint (tm, x, y, width, height); -}}, "~N,~N,~N,~N,~N"); -Clazz_defineStatics (c$, -"APPLET_UNINITIALIZED", 0, -"APPLET_LOAD", 1, -"APPLET_INIT", 2, -"APPLET_START", 3, -"APPLET_READY", 35, -"APPLET_STOP", 4, -"APPLET_DESTROY", 5, -"APPLET_QUIT", 6, -"APPLET_ERROR", 7, -"APPLET_DISPOSE", 75, -"APPLET_RESIZE", 51234, -"APPLET_LOADING", 51235, -"APPLET_LOADING_COMPLETED", 51236); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["jssun.java2d.SunGraphics2D"], "swingjs.JSGraphics2D", ["java.util.HashMap", "java.awt.BasicStroke", "$.Rectangle", "$.RenderingHints", "$.Toolkit", "java.awt.geom.AffineTransform", "swingjs.JSToolkit", "swingjs.api.HTML5CanvasContext2D"], function () { -c$ = Clazz_decorateAsClass (function () { -this.constrainX = 0; -this.constrainY = 0; -this.windowWidth = 0; -this.windowHeight = 0; -this.canvas = null; -this.ctx = null; -this.gc = null; -this.paintState = 0; -this.compositeState = -2147483648; -this.strokeState = 0; -this.$transformState = 0; -this.clipState = 0; -this.isShifted = false; -this.font = null; -this.inPath = false; -this.currentClip = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSGraphics2D", jssun.java2d.SunGraphics2D, Cloneable); -Clazz_makeConstructor (c$, -function (canvas) { -Clazz_superConstructor (this, swingjs.JSGraphics2D, []); -this.hints = new java.awt.RenderingHints ( new java.util.HashMap ()); -this.canvas = canvas; -this.ctx = this.canvas.getContext ("2d"); -this.$transform = new java.awt.geom.AffineTransform (); -{ -this.gc = SwingJS; -}}, "~O"); -Clazz_overrideMethod (c$, "getDeviceConfiguration", -function () { -return this.gc; -}); -Clazz_overrideMethod (c$, "drawLine", -function (x0, y0, x1, y1) { -var inPath = this.inPath; -if (!inPath) this.ctx.beginPath (); -this.ctx.moveTo (x0, y0); -this.ctx.lineTo (x1, y1); -if (!inPath) this.ctx.stroke (); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "drawCircle", -function (x, y, diameter) { -this.drawArc (x, y, diameter, diameter, 0, 360); -}, "~N,~N,~N"); -Clazz_overrideMethod (c$, "fillArc", -function (x, y, width, height, startAngle, arcAngle) { -this.doArc (x, y, width, height, startAngle, arcAngle, true); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "drawArc", -function (x, y, width, height, startAngle, arcAngle) { -this.doArc (x, y, width, height, startAngle, arcAngle, false); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "save", - function () { -this.ctx.save (); -}); -Clazz_defineMethod (c$, "restore", - function () { -this.ctx.restore (); -}); -Clazz_defineMethod (c$, "doArc", - function (x, y, width, height, startAngle, arcAngle, fill) { -var isCircle = (arcAngle - startAngle == 360); -this.save (); -this.ctx.translate (x, y); -this.ctx.scale (Clazz_doubleToInt (width / height), height); -this.ctx.beginPath (); -if (fill) { -}this.ctx.arc (0.5, 0.5, 0.5, this.toRad (startAngle), this.toRad (arcAngle), false); -if (isCircle) this.ctx.closePath (); -this.ctx.stroke (); -this.restore (); -}, "~N,~N,~N,~N,~N,~N,~B"); -Clazz_defineMethod (c$, "toRad", - function (a) { -return a * 3.141592653589793 / 180; -}, "~N"); -Clazz_defineMethod (c$, "drawPolygon", -function (ayPoints, axPoints, nPoints) { -this.doPoly (ayPoints, axPoints, nPoints, false); -}, "~A,~A,~N"); -Clazz_defineMethod (c$, "doPoly", - function (axPoints, ayPoints, nPoints, doFill) { -this.ctx.beginPath (); -this.ctx.moveTo (axPoints[0], ayPoints[0]); -for (var i = 1; i < nPoints; i++) this.ctx.lineTo (axPoints[i], ayPoints[i]); - -if (doFill) this.ctx.fill (); - else this.ctx.stroke (); -}, "~A,~A,~N,~B"); -Clazz_overrideMethod (c$, "drawRect", -function (x, y, width, height) { -this.ctx.beginPath (); -this.ctx.rect (x, y, width, height); -this.ctx.stroke (); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "background", -function (bgcolor) { -this.backgroundColor = bgcolor; -if (bgcolor == null) { -if (!this.isShifted) this.ctx.translate (-0.5, -0.5); -this.isShifted = true; -return; -}this.ctx.clearRect (0, 0, this.windowWidth, this.windowHeight); -this.setGraphicsColor (bgcolor); -this.fillRect (0, 0, this.windowWidth, this.windowHeight); -}, "java.awt.Color"); -Clazz_defineMethod (c$, "fillCircle", -function (x, y, diameter) { -var r = diameter / 2; -this.ctx.beginPath (); -this.ctx.arc (x + r, y + r, r, 0, 6.283185307179586, false); -this.ctx.fill (); -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "fillPolygon", -function (ayPoints, axPoints, nPoints) { -this.doPoly (ayPoints, axPoints, nPoints, true); -}, "~A,~A,~N"); -Clazz_overrideMethod (c$, "fillRect", -function (x, y, width, height) { -this.ctx.fillRect (x, y, width, height); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setGraphicsColor", -function (c) { -var s = swingjs.JSToolkit.getCSSColor (c); -{ -this.ctx.fillStyle = s; this.ctx.strokeStyle = s; -}}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setFont", -function (font) { -this.font = font; -if (this.ctx == null) return; -var s = swingjs.JSToolkit.getCanvasFont (font); -{ -this.ctx.font = s; -}}, "java.awt.Font"); -Clazz_defineMethod (c$, "setStrokeBold", -function (tf) { -this.setLineWidth (tf ? 2. : 1.); -}, "~B"); -Clazz_defineMethod (c$, "setLineWidth", - function (d) { -{ -this.ctx.lineWidth = d; -}}, "~N"); -Clazz_defineMethod (c$, "setWindowParameters", -function (width, height) { -this.windowWidth = width; -this.windowHeight = height; -}, "~N,~N"); -Clazz_defineMethod (c$, "canDoLineTo", -function () { -return true; -}); -Clazz_defineMethod (c$, "doStroke", -function (isBegin) { -this.inPath = isBegin; -if (isBegin) { -this.ctx.beginPath (); -} else { -this.ctx.stroke (); -}}, "~B"); -Clazz_defineMethod (c$, "lineTo", -function (x2, y2) { -this.ctx.lineTo (x2, y2); -}, "~N,~N"); -Clazz_overrideMethod (c$, "clip", -function (s) { -this.doShape (s); -this.ctx.clip (); -}, "java.awt.Shape"); -Clazz_overrideMethod (c$, "draw", -function (s) { -this.doShape (s); -this.ctx.stroke (); -}, "java.awt.Shape"); -Clazz_defineMethod (c$, "doShape", - function (s) { -this.ctx.beginPath (); -var pts = Clazz_newDoubleArray (6, 0); -var pi = s.getPathIterator (null); -while (!pi.isDone ()) { -switch (pi.currentSegment (pts)) { -case 0: -this.ctx.moveTo (pts[0], pts[1]); -break; -case 1: -this.ctx.lineTo (pts[0], pts[1]); -break; -case 2: -this.ctx.quadraticCurveTo (pts[0], pts[1], pts[2], pts[3]); -break; -case 3: -this.ctx.bezeierCurveTo (pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); -break; -case 4: -this.ctx.closePath (); -break; -} -pi.next (); -} -return pi.getWindingRule (); -}, "java.awt.Shape"); -Clazz_overrideMethod (c$, "fill", -function (s) { -if (this.doShape (s) == 0) { -this.ctx.fill("evenodd"); -} else this.ctx.fill (); -}, "java.awt.Shape"); -Clazz_defineMethod (c$, "drawImage", -function (img, x, y, observer) { -if (img != null) { -var imgNode = this.getImageNode (img); -if (imgNode != null) this.ctx.drawImage (imgNode, x, y, img.getWidth (observer), img.getHeight (observer)); -if (observer != null) this.observe (img, observer, imgNode != null); -}return true; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "observe", - function (img, observer, isOK) { -observer.imageUpdate (img, (isOK ? 0 : 192), -1, -1, -1, -1); -}, "java.awt.Image,java.awt.image.ImageObserver,~B"); -Clazz_defineMethod (c$, "drawImage", -function (img, x, y, width, height, observer) { -if (img != null) { -var imgNode = this.getImageNode (img); -if (imgNode != null) this.ctx.drawImage (imgNode, x, y, width, height); -if (observer != null) this.observe (img, observer, imgNode != null); -}return true; -}, "java.awt.Image,~N,~N,~N,~N,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "drawImage", -function (img, x, y, bgcolor, observer) { -swingjs.JSToolkit.notImplemented (null); -return this.drawImage (img, x, y, null); -}, "java.awt.Image,~N,~N,java.awt.Color,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "drawImage", -function (img, x, y, width, height, bgcolor, observer) { -swingjs.JSToolkit.notImplemented (null); -return this.drawImage (img, x, y, width, height, null); -}, "java.awt.Image,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "drawImage", -function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer) { -if (img != null) { -var imgNode = this.getImageNode (img); -if (imgNode != null) swingjs.api.HTML5CanvasContext2D.stretchImage (this.ctx, imgNode, sx1, sy1, sx2 - sx1, sy2 - sy1, dx1, dy1, dx2 - dx1, dy2 - dy1); -if (observer != null) this.observe (img, observer, imgNode != null); -}return true; -}, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "getImageNode", - function (img) { -var imgNode = null; -{ -imgNode = img._imgNode || img._canvas; -}if (imgNode == null) imgNode = swingjs.JSToolkit.getCompositor ().createImageNode (img); -return imgNode; -}, "java.awt.Image"); -Clazz_defineMethod (c$, "drawImage", -function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer) { -swingjs.JSToolkit.notImplemented (null); -return this.drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer); -}, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver"); -Clazz_defineMethod (c$, "drawImage", -function (img, xform, obs) { -swingjs.JSToolkit.notImplemented (null); -return false; -}, "java.awt.Image,java.awt.geom.AffineTransform,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "drawRenderedImage", -function (img, xform) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.image.RenderedImage,java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "drawRenderableImage", -function (img, xform) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.image.renderable.RenderableImage,java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "hit", -function (rect, s, onStroke) { -swingjs.JSToolkit.notImplemented (null); -return false; -}, "java.awt.Rectangle,java.awt.Shape,~B"); -Clazz_overrideMethod (c$, "setPaint", -function (paint) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.Paint"); -Clazz_overrideMethod (c$, "setStroke", -function (s) { -if (!(Clazz_instanceOf (s, java.awt.BasicStroke))) return; -var b = s; -var dash = b.getDashArray (); -var idash = Clazz_newIntArray (dash == null ? 0 : dash.length, 0); -for (var i = idash.length; --i >= 0; ) idash[i] = Clazz_floatToInt (dash[i]); - -this.ctx.setLineDash (idash); -this.setLineWidth (b.getLineWidth ()); -var lineCap; -var lineJoin; -var miterLimit = -1; -switch (b.getEndCap ()) { -case 0: -lineCap = "butt"; -break; -case 2: -lineCap = "square"; -break; -case 1: -default: -lineCap = "round"; -} -switch (b.getLineJoin ()) { -case 2: -lineJoin = "bevel"; -break; -case 0: -lineJoin = "miter"; -miterLimit = b.getMiterLimit (); -break; -case 1: -lineJoin = "round"; -} -{ -this.ctx.lineCap = lineCap; this.ctx.lineJoin = lineJoin; if -(miterLimit >= 0) this.ctx.miterLimit = miterLimit; -}}, "java.awt.Stroke"); -Clazz_overrideMethod (c$, "setRenderingHint", -function (hintKey, hintValue) { -this.hints.put (hintKey, hintValue); -}, "java.awt.RenderingHints.Key,~O"); -Clazz_overrideMethod (c$, "getRenderingHint", -function (hintKey) { -return this.hints.get (hintKey); -}, "java.awt.RenderingHints.Key"); -Clazz_overrideMethod (c$, "setRenderingHints", -function (hints) { -this.hints = new java.awt.RenderingHints (hints); -}, "java.util.Map"); -Clazz_overrideMethod (c$, "addRenderingHints", -function (hints) { -for (var e, $e = hints.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) this.hints.put (e.getKey (), e.getValue ()); - -}, "java.util.Map"); -Clazz_overrideMethod (c$, "getRenderingHints", -function () { -return this.hints; -}); -Clazz_defineMethod (c$, "translate", -function (x, y) { -this.ctx.translate (x, y); -}, "~N,~N"); -Clazz_overrideMethod (c$, "scale", -function (sx, sy) { -this.ctx.scale (sx, sy); -}, "~N,~N"); -Clazz_overrideMethod (c$, "setBackground", -function (color) { -this.background (color); -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "getBackground", -function () { -return this.backgroundColor; -}); -Clazz_overrideMethod (c$, "createSwingJS", -function () { -return this.clone (); -}); -Clazz_overrideMethod (c$, "clone", -function () { -this.save (); -return this.clone0 (); -}); -Clazz_overrideMethod (c$, "dispose", -function () { -if (this.compositeState >= 0) this.setComposite (null); -this.restore (); -}); -Clazz_overrideMethod (c$, "getColor", -function () { -return this.foregroundColor; -}); -Clazz_overrideMethod (c$, "setColor", -function (c) { -this.foregroundColor = c; -this.setGraphicsColor (c); -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "getFont", -function () { -return this.font; -}); -Clazz_defineMethod (c$, "getFontMetrics", -function (f) { -return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f); -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "clipRect", -function (x, y, width, height) { -this.ctx.beginPath (); -this.ctx.rect (x, y, width, height); -this.currentClip = new java.awt.Rectangle (x, y, width, height); -this.ctx.clip (); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setClip", -function (x, y, width, height) { -this.currentClip = new java.awt.Rectangle (x, y, width, height); -{ -if (arguments.length == 1) { setClip1(x); return; } -}this.ctx.beginPath (); -this.ctx.rect (x, y, width, height); -this.currentClip = new java.awt.Rectangle (x, y, width, height); -this.ctx.clip (); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "setClip1", -function (clip) { -this.ctx.beginPath (); -this.doShape (clip); -this.ctx.clip (); -}, "java.awt.Shape"); -Clazz_overrideMethod (c$, "clearRect", -function (x, y, width, height) { -this.ctx.clearRect (x, y, width, height); -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "drawPolyline", -function (xPoints, yPoints, nPoints) { -if (nPoints < 2) return; -this.ctx.moveTo (xPoints[0], yPoints[0]); -for (var i = 1; i < nPoints; i++) { -this.ctx.lineTo (xPoints[i], yPoints[i]); -} -}, "~A,~A,~N"); -Clazz_overrideMethod (c$, "copyArea", -function (x, y, width, height, dx, dy) { -swingjs.JSToolkit.notImplemented (null); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "drawRoundRect", -function (x, y, width, height, arcWidth, arcHeight) { -swingjs.JSToolkit.notImplemented (null); -this.drawRect (x, y, width, height); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "fillRoundRect", -function (x, y, width, height, arcWidth, arcHeight) { -swingjs.JSToolkit.notImplemented (null); -this.fillRect (x, y, width, height); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "drawOval", -function (x, y, width, height) { -swingjs.JSToolkit.notImplemented (null); -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "fillOval", -function (x, y, width, height) { -swingjs.JSToolkit.notImplemented (null); -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getClip", -function () { -swingjs.JSToolkit.notImplemented (null); -return null; -}); -Clazz_defineMethod (c$, "drawString", -function (s, x, y) { -this.ctx.fillText (s, x, y); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "drawStringUnique", -function (s, x, y) { -this.ctx.fillText (s, x, y); -}, "~S,~N,~N"); -Clazz_overrideMethod (c$, "drawStringTrans", -function (str, x, y) { -swingjs.JSToolkit.notImplemented (null); -}, "~S,~N,~N"); -Clazz_defineMethod (c$, "drawString", -function (iterator, x, y) { -swingjs.JSToolkit.notImplemented (null); -}, "java.text.AttributedCharacterIterator,~N,~N"); -Clazz_overrideMethod (c$, "drawStringAttrTrans", -function (iterator, x, y) { -swingjs.JSToolkit.notImplemented (null); -}, "java.text.AttributedCharacterIterator,~N,~N"); -Clazz_overrideMethod (c$, "translateTrans", -function (tx, ty) { -swingjs.JSToolkit.notImplemented (null); -}, "~N,~N"); -Clazz_defineMethod (c$, "rotate", -function (theta) { -swingjs.JSToolkit.notImplemented (null); -}, "~N"); -Clazz_defineMethod (c$, "rotate", -function (theta, x, y) { -swingjs.JSToolkit.notImplemented (null); -}, "~N,~N,~N"); -Clazz_overrideMethod (c$, "shear", -function (shx, shy) { -swingjs.JSToolkit.notImplemented (null); -}, "~N,~N"); -Clazz_overrideMethod (c$, "transform", -function (xform) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "setTransform", -function (Tx) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.geom.AffineTransform"); -Clazz_overrideMethod (c$, "getTransform", -function () { -swingjs.JSToolkit.notImplemented (null); -return null; -}); -Clazz_defineMethod (c$, "cloneTransform", -function () { -swingjs.JSToolkit.notImplemented (null); -return null; -}); -Clazz_overrideMethod (c$, "getPaint", -function () { -swingjs.JSToolkit.notImplemented (null); -return null; -}); -Clazz_overrideMethod (c$, "getStroke", -function () { -swingjs.JSToolkit.notImplemented (null); -return null; -}); -Clazz_overrideMethod (c$, "getFontRenderContext", -function () { -swingjs.JSToolkit.notImplemented (null); -return null; -}); -Clazz_overrideMethod (c$, "setPaintMode", -function () { -swingjs.JSToolkit.notImplemented (null); -}); -Clazz_overrideMethod (c$, "setXORMode", -function (c1) { -swingjs.JSToolkit.notImplemented (null); -}, "java.awt.Color"); -Clazz_defineMethod (c$, "getClipBounds", -function () { -var r = null; -{ -if (arguments.length == 1) r = arguments[0]; -}var clipRect = this.getClipBoundsImpl (); -if (r == null) { -r = clipRect; -} else { -r.x = clipRect.x; -r.y = clipRect.y; -r.width = clipRect.width; -r.height = clipRect.height; -}return r; -}); -Clazz_defineMethod (c$, "getClipBoundsImpl", - function () { -if (this.currentClip == null) { -this.currentClip = new java.awt.Rectangle (0, 0, this.windowWidth, this.windowHeight); -}return this.currentClip; -}); -Clazz_overrideMethod (c$, "setComposite", -function (comp) { -var newRule = 0; -var isValid = (comp == null || (Clazz_instanceOf (comp, java.awt.AlphaComposite)) && (newRule = (comp).getRule ()) != this.compositeState); -if (!isValid) return; -if (swingjs.JSToolkit.setGraphicsCompositeAlpha (this, newRule)) this.compositeState = newRule; -}, "java.awt.Composite"); -Clazz_defineMethod (c$, "drawImage", -function (img, op, x, y) { -swingjs.JSToolkit.drawImageOp (this, img, op, x, y); -}, "java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N"); -Clazz_defineMethod (c$, "setAlpha", -function (f) { -{ -this.ctx.globalAlpha = f; -}}, "~N"); -Clazz_defineStatics (c$, -"saveLevel", 0); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () { -c$ = Clazz_decorateAsClass (function () { -this.ap = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSAppletThread", swingjs.JSThread); -Clazz_makeConstructor (c$, -function (ap, group, name) { -Clazz_superConstructor (this, swingjs.JSAppletThread, [group, name]); -this.ap = ap; -}, "swingjs.JSAppletPanel,ThreadGroup,~S"); -Clazz_overrideMethod (c$, "run1", -function (mode) { -mode = this.ap.run1 (mode); -if (mode != 2) this.dispatchAndReturn (null, mode); -}, "~N"); -Clazz_defineMethod (c$, "dispatchAndReturn", -function (r, mode) { -var m = mode; -javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz_cloneFinals ("m", m)))); -}, "Runnable,~N"); -c$.$JSAppletThread$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable); -Clazz_overrideMethod (c$, "run", -function () { -this.b$["swingjs.JSAppletThread"].run1 (this.f$.m); -}); -c$ = Clazz_p0p (); -}; -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (null, "swingjs.JSMouse", ["JU.V3", "java.awt.Toolkit", "java.awt.event.MouseEvent"], function () { -c$ = Clazz_decorateAsClass (function () { -this.ap = null; -this.isMouseDown = false; -this.wheeling = false; -this.xWhenPressed = 0; -this.yWhenPressed = 0; -this.modifiersWhenPressed10 = 0; -Clazz_instantialize (this, arguments); -}, swingjs, "JSMouse"); -Clazz_makeConstructor (c$, -function (ap) { -this.ap = ap; -}, "swingjs.JSAppletPanel"); -Clazz_defineMethod (c$, "processEvent", -function (id, x, y, modifiers, time) { -if (id != -1) modifiers = swingjs.JSMouse.applyLeftMouse (modifiers); -switch (id) { -case -1: -this.wheeled (time, x, modifiers); -break; -case 501: -this.xWhenPressed = x; -this.yWhenPressed = y; -this.modifiersWhenPressed10 = modifiers; -this.pressed (time, x, y, modifiers, false); -break; -case 506: -this.dragged (time, x, y, modifiers); -break; -case 504: -this.entry (time, x, y, false); -break; -case 505: -this.entry (time, x, y, true); -break; -case 503: -this.moved (time, x, y, modifiers); -break; -case 502: -this.released (time, x, y, modifiers); -if (x == this.xWhenPressed && y == this.yWhenPressed && modifiers == this.modifiersWhenPressed10) { -this.clicked (time, x, y, modifiers, 1); -}break; -default: -return false; -} -return true; -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "processTwoPointGesture", -function (touches) { -if (touches[0].length < 2) return; -var t1 = touches[0]; -var t2 = touches[1]; -var t1first = t1[0]; -var t1last = t1[t2.length - 1]; -var x1first = t1first[0]; -var x1last = t1last[0]; -var dx1 = x1last - x1first; -var y1first = t1first[1]; -var y1last = t1last[1]; -var dy1 = y1last - y1first; -var v1 = JU.V3.new3 (dx1, dy1, 0); -var d1 = v1.length (); -var t2first = t2[0]; -var t2last = t2[t2.length - 1]; -var x2first = t2first[0]; -var x2last = t2last[0]; -var dx2 = x2last - x2first; -var y2first = t2first[1]; -var y2last = t2last[1]; -var dy2 = y2last - y2first; -var v2 = JU.V3.new3 (dx2, dy2, 0); -var d2 = v2.length (); -if (d1 < 1 || d2 < 1) return; -v1.normalize (); -v2.normalize (); -var cos12 = (v1.dot (v2)); -if (cos12 > 0.8) { -var deltaX = Clazz_floatToInt (x1last - t1[t1.length - 2][0]); -var deltaY = Clazz_floatToInt (y1last - t1[t1.length - 2][1]); -this.translateXYBy (deltaX, deltaY); -} else if (cos12 < -0.8) { -v1 = JU.V3.new3 (x2first - x1first, y2first - y1first, 0); -v2 = JU.V3.new3 (x2last - x1last, y2last - y1last, 0); -var dx = v2.length () - v1.length (); -this.wheeled (System.currentTimeMillis (), dx < 0 ? -1 : 1, 32); -}}, "~A"); -Clazz_defineMethod (c$, "translateXYBy", - function (deltaX, deltaY) { -}, "~N,~N"); -Clazz_defineMethod (c$, "mouseClicked", -function (e) { -this.clicked (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.getClickCount ()); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseEntered", -function (e) { -this.entry (e.getWhen (), e.getX (), e.getY (), false); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseExited", -function (e) { -this.entry (e.getWhen (), e.getX (), e.getY (), true); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mousePressed", -function (e) { -this.pressed (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.isPopupTrigger ()); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseReleased", -function (e) { -this.released (e.getWhen (), e.getX (), e.getY (), e.getModifiers ()); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseDragged", -function (e) { -var modifiers = e.getModifiers (); -if ((modifiers & 28) == 0) modifiers |= 16; -this.dragged (e.getWhen (), e.getX (), e.getY (), modifiers); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseMoved", -function (e) { -this.moved (e.getWhen (), e.getX (), e.getY (), e.getModifiers ()); -}, "java.awt.event.MouseEvent"); -Clazz_defineMethod (c$, "mouseWheelMoved", -function (e) { -e.consume (); -this.wheeled (e.getWhen (), e.getWheelRotation (), e.getModifiers ()); -}, "java.awt.event.MouseWheelEvent"); -Clazz_defineMethod (c$, "entry", - function (time, x, y, isExit) { -this.wheeling = false; -this.mouseEnterExit (time, x, y, isExit); -}, "~N,~N,~N,~B"); -Clazz_defineMethod (c$, "clicked", - function (time, x, y, modifiers, clickCount) { -this.mouseAction (500, time, x, y, 1, modifiers); -}, "~N,~N,~N,~N,~N"); -Clazz_defineMethod (c$, "moved", - function (time, x, y, modifiers) { -if (this.isMouseDown) this.mouseAction (506, time, x, y, 0, swingjs.JSMouse.applyLeftMouse (modifiers)); - else this.mouseAction (503, time, x, y, 0, modifiers); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "wheeled", - function (time, rotation, modifiers) { -this.wheeling = true; -this.mouseAction (507, time, 0, rotation, 0, modifiers & -29 | 32); -}, "~N,~N,~N"); -Clazz_defineMethod (c$, "pressed", - function (time, x, y, modifiers, isPopupTrigger) { -this.isMouseDown = true; -this.wheeling = false; -this.mouseAction (501, time, x, y, 0, modifiers); -}, "~N,~N,~N,~N,~B"); -Clazz_defineMethod (c$, "released", - function (time, x, y, modifiers) { -this.isMouseDown = false; -this.wheeling = false; -this.mouseAction (502, time, x, y, 0, modifiers); -}, "~N,~N,~N,~N"); -Clazz_defineMethod (c$, "dragged", - function (time, x, y, modifiers) { -if (this.wheeling) return; -if ((modifiers & 20) == 20) modifiers = modifiers & -5 | 2; -this.mouseAction (506, time, x, y, 0, modifiers); -}, "~N,~N,~N,~N"); -c$.applyLeftMouse = Clazz_defineMethod (c$, "applyLeftMouse", - function (modifiers) { -return ((modifiers & 28) == 0) ? (modifiers | 16) : modifiers; -}, "~N"); -Clazz_defineMethod (c$, "getButton", - function (modifiers) { -switch (modifiers & 28) { -case 16: -return 1; -case 8: -return 2; -case 4: -return 3; -default: -return 0; -} -}, "~N"); -Clazz_defineMethod (c$, "mouseEnterExit", - function (time, x, y, isExit) { -}, "~N,~N,~N,~B"); -Clazz_defineMethod (c$, "mouseAction", - function (id, time, x, y, count, modifiers) { -var popupTrigger = false; -var button = this.getButton (modifiers); -var source = this.ap.applet; -var e = new java.awt.event.MouseEvent (source, id, time, modifiers, x, y, x, y, count, popupTrigger, button); -java.awt.Toolkit.getEventQueue ().postEvent (e); -}, "~N,~N,~N,~N,~N,~N"); -Clazz_defineStatics (c$, -"MOUSE_LEFT", 16, -"MOUSE_MIDDLE", 8, -"MOUSE_RIGHT", 4, -"MOUSE_WHEEL", 32, -"MAC_COMMAND", 20, -"BUTTON_MASK", 28); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.awt.peer.LightweightPeer"], "swingjs.JSComponentPeer", ["swingjs.JSToolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.target = null; -this.ui = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSComponentPeer", null, java.awt.peer.LightweightPeer); -Clazz_makeConstructor (c$, -function (target) { -this.target = target; -this.ui = swingjs.JSToolkit.getUI (target, false); -}, "java.awt.Component"); -Clazz_overrideMethod (c$, "isObscured", -function () { -return false; -}); -Clazz_overrideMethod (c$, "canDetermineObscurity", -function () { -return false; -}); -Clazz_overrideMethod (c$, "setVisible", -function (b) { -}, "~B"); -Clazz_overrideMethod (c$, "setEnabled", -function (b) { -}, "~B"); -Clazz_overrideMethod (c$, "paint", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "repaint", -function (tm, x, y, width, height) { -}, "~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "print", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "setBounds", -function (x, y, width, height, op) { -}, "~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "handleEvent", -function (e) { -}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "coalescePaintEvent", -function (e) { -}, "java.awt.event.PaintEvent"); -Clazz_overrideMethod (c$, "getLocationOnScreen", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getPreferredSize", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getMinimumSize", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getColorModel", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getToolkit", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getGraphics", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getFontMetrics", -function (font) { -return null; -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "dispose", -function () { -}); -Clazz_overrideMethod (c$, "setForeground", -function (c) { -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setBackground", -function (c) { -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setFont", -function (f) { -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "updateCursorImmediately", -function () { -}); -Clazz_overrideMethod (c$, "requestFocus", -function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { -return false; -}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); -Clazz_overrideMethod (c$, "isFocusable", -function () { -return false; -}); -Clazz_defineMethod (c$, "createImage", -function (producer) { -return null; -}, "java.awt.image.ImageProducer"); -Clazz_defineMethod (c$, "createImage", -function (width, height) { -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "createVolatileImage", -function (width, height) { -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "prepareImage", -function (img, w, h, o) { -return false; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "checkImage", -function (img, w, h, o) { -return 0; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "getGraphicsConfiguration", -function () { -return null; -}); -Clazz_overrideMethod (c$, "handlesWheelScrolling", -function () { -return false; -}); -Clazz_overrideMethod (c$, "getBackBuffer", -function () { -return null; -}); -Clazz_overrideMethod (c$, "destroyBuffers", -function () { -}); -Clazz_overrideMethod (c$, "reparent", -function (newContainer) { -}, "java.awt.peer.ContainerPeer"); -Clazz_overrideMethod (c$, "isReparentSupported", -function () { -return false; -}); -Clazz_overrideMethod (c$, "layout", -function () { -}); -Clazz_overrideMethod (c$, "getBounds", -function () { -return null; -}); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () { -c$ = Clazz_decorateAsClass (function () { -this.window = null; -this.isFrame = false; -this.applet = null; -this.graphics = null; -this.font = null; -Clazz_instantialize (this, arguments); -}, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer); -Clazz_overrideMethod (c$, "setFrame", -function (target, isFrame) { -this.isFrame = isFrame; -this.window = target; -var jc = this; -jc.myThread = Thread.currentThread (); -jc.threadGroup = jc.myThread.getThreadGroup (); -this.applet = (jc.threadGroup).getHtmlApplet (); -this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300); -return this; -}, "java.awt.Window,~B"); -Clazz_overrideMethod (c$, "getGraphics", -function () { -this.graphics.setFont (this.window.getFont ()); -return this.graphics; -}); -Clazz_overrideMethod (c$, "getToolkit", -function () { -return java.awt.Toolkit.getDefaultToolkit (); -}); -Clazz_overrideMethod (c$, "getFontMetrics", -function (font) { -if (!font.equals (this.font)) this.window.setFont (this.font = font); -return this.graphics.getFontMetrics (font); -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "getInsets", -function () { -return new java.awt.Insets (0, 0, 0, 0); -}); -Clazz_overrideMethod (c$, "beginValidate", -function () { -}); -Clazz_overrideMethod (c$, "endValidate", -function () { -}); -Clazz_overrideMethod (c$, "beginLayout", -function () { -}); -Clazz_overrideMethod (c$, "endLayout", -function () { -}); -Clazz_overrideMethod (c$, "isObscured", -function () { -return false; -}); -Clazz_overrideMethod (c$, "canDetermineObscurity", -function () { -return false; -}); -Clazz_overrideMethod (c$, "setVisible", -function (b) { -}, "~B"); -Clazz_overrideMethod (c$, "setEnabled", -function (b) { -}, "~B"); -Clazz_overrideMethod (c$, "paint", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "repaint", -function (tm, x, y, width, height) { -}, "~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "print", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "setBounds", -function (x, y, width, height, op) { -}, "~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "handleEvent", -function (e) { -}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "coalescePaintEvent", -function (e) { -}, "java.awt.event.PaintEvent"); -Clazz_overrideMethod (c$, "getLocationOnScreen", -function () { -return new java.awt.Point (); -}); -Clazz_overrideMethod (c$, "getPreferredSize", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getMinimumSize", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getColorModel", -function () { -return null; -}); -Clazz_overrideMethod (c$, "dispose", -function () { -}); -Clazz_overrideMethod (c$, "setForeground", -function (c) { -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setBackground", -function (c) { -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setFont", -function (f) { -this.font = f; -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "updateCursorImmediately", -function () { -}); -Clazz_overrideMethod (c$, "requestFocus", -function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { -return false; -}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); -Clazz_overrideMethod (c$, "isFocusable", -function () { -return false; -}); -Clazz_defineMethod (c$, "createImage", -function (producer) { -return null; -}, "java.awt.image.ImageProducer"); -Clazz_defineMethod (c$, "createImage", -function (width, height) { -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "createVolatileImage", -function (width, height) { -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "prepareImage", -function (img, w, h, o) { -return false; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "checkImage", -function (img, w, h, o) { -return 0; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "getGraphicsConfiguration", -function () { -return null; -}); -Clazz_overrideMethod (c$, "handlesWheelScrolling", -function () { -return false; -}); -Clazz_overrideMethod (c$, "getBackBuffer", -function () { -return null; -}); -Clazz_overrideMethod (c$, "destroyBuffers", -function () { -}); -Clazz_overrideMethod (c$, "reparent", -function (newContainer) { -}, "java.awt.peer.ContainerPeer"); -Clazz_overrideMethod (c$, "isReparentSupported", -function () { -return false; -}); -Clazz_overrideMethod (c$, "layout", -function () { -}); -Clazz_overrideMethod (c$, "getBounds", -function () { -return null; -}); -Clazz_overrideMethod (c$, "toFront", -function () { -}); -Clazz_overrideMethod (c$, "toBack", -function () { -}); -Clazz_overrideMethod (c$, "updateAlwaysOnTopState", -function () { -}); -Clazz_overrideMethod (c$, "updateFocusableWindowState", -function () { -}); -Clazz_overrideMethod (c$, "requestWindowFocus", -function () { -return false; -}); -Clazz_overrideMethod (c$, "setModalBlocked", -function (blocker, blocked) { -}, "java.awt.Dialog,~B"); -Clazz_overrideMethod (c$, "updateMinimumSize", -function () { -}); -Clazz_overrideMethod (c$, "updateIconImages", -function () { -}); -Clazz_overrideMethod (c$, "setOpacity", -function (opacity) { -}, "~N"); -Clazz_overrideMethod (c$, "setOpaque", -function (isOpaque) { -}, "~B"); -Clazz_overrideMethod (c$, "updateWindow", -function (backBuffer) { -}, "java.awt.image.BufferedImage"); -Clazz_overrideMethod (c$, "repositionSecurityWarning", -function () { -}); -Clazz_overrideMethod (c$, "setTitle", -function (title) { -}, "~S"); -Clazz_overrideMethod (c$, "setMenuBar", -function (mb) { -}, "~O"); -Clazz_overrideMethod (c$, "setResizable", -function (resizeable) { -}, "~B"); -Clazz_overrideMethod (c$, "setState", -function (state) { -}, "~N"); -Clazz_overrideMethod (c$, "getState", -function () { -return 0; -}); -Clazz_overrideMethod (c$, "setMaximizedBounds", -function (bounds) { -}, "java.awt.Rectangle"); -Clazz_overrideMethod (c$, "setBoundsPrivate", -function (x, y, width, height) { -}, "~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "getBoundsPrivate", -function () { -return null; -}); -}); -Clazz_declarePackage ("swingjs"); -Clazz_load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () { -c$ = Clazz_declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, swingjs.JSGraphicsEnvironment, []); -System.out.println ("JSGraphicsEnvironment initialized"); -}); -Clazz_overrideMethod (c$, "createGraphics", -function (img) { -return this.createGraphicsSized (img, img.getWidth (), img.getHeight ()); -}, "java.awt.image.BufferedImage"); -Clazz_defineMethod (c$, "createGraphicsSized", -function (img, width, height) { -var g = null; -{ -g = img._g; -}if (g == null) { -var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ()); -{ -canvas.width = width; -canvas.height = height; -img._canvas = canvas; -}g = new swingjs.JSGraphics2D (canvas); -{ -img._g = g; -}}return g; -}, "~O,~N,~N"); -Clazz_overrideMethod (c$, "getAllFonts", -function () { -return null; -}); -Clazz_defineMethod (c$, "getAvailableFontFamilyNames", -function () { -return null; -}); -Clazz_defineMethod (c$, "getAvailableFontFamilyNames", -function (l) { -return null; -}, "java.util.Locale"); -Clazz_overrideMethod (c$, "getDefaultScreenDevice", -function () { -if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice"); -return swingjs.JSGraphicsEnvironment.device; -}); -Clazz_defineStatics (c$, -"device", null); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["javax.swing.LookAndFeel"], "swingjs.plaf.HTML5LookAndFeel", ["java.lang.Boolean", "$.Long", "java.awt.Color", "$.Dimension", "javax.swing.DefaultListCellRenderer", "$.UIDefaults", "javax.swing.UIDefaults.ActiveValue", "javax.swing.plaf.ColorUIResource", "$.DimensionUIResource", "$.FontUIResource", "$.InsetsUIResource"], function () { -c$ = Clazz_declareType (swingjs.plaf, "HTML5LookAndFeel", javax.swing.LookAndFeel); -Clazz_overrideMethod (c$, "getDefaults", -function () { -var table = new javax.swing.UIDefaults (610, 0.75); -this.initClassDefaults (table); -this.initSystemColorDefaults (table); -this.initComponentDefaults (table); -return table; -}); -Clazz_overrideMethod (c$, "initialize", -function () { -}); -Clazz_defineMethod (c$, "installAWTEventListener", -function () { -}); -Clazz_overrideMethod (c$, "uninitialize", -function () { -}); -Clazz_defineMethod (c$, "initClassDefaults", -function (table) { -var packageName = "swingjs.plaf."; -var uiDefaults = Clazz_newArray (-1, ["ButtonUI", "swingjs.plaf.JSButtonUI", "CheckBoxUI", "swingjs.plaf.JSCheckBoxUI", "ColorChooserUI", "swingjs.plaf.JSColorChooserUI", "FormattedTextFieldUI", "swingjs.plaf.JSFormattedTextFieldUI", "MenuBarUI", "swingjs.plaf.JSMenuBarUI", "MenuUI", "swingjs.plaf.JSMenuUI", "MenuItemUI", "swingjs.plaf.JSMenuItemUI", "CheckBoxMenuItemUI", "swingjs.plaf.JSCheckBoxMenuItemUI", "RadioButtonMenuItemUI", "swingjs.plaf.JSRadioButtonMenuItemUI", "RadioButtonUI", "swingjs.plaf.JSRadioButtonUI", "ToggleButtonUI", "swingjs.plaf.JSToggleButtonUI", "PopupMenuUI", "swingjs.plaf.JSPopupMenuUI", "ProgressBarUI", "swingjs.plaf.JSProgressBarUI", "ScrollBarUI", "swingjs.plaf.JSScrollBarUI", "ScrollPaneUI", "swingjs.plaf.JSScrollPaneUI", "SplitPaneUI", "swingjs.plaf.JSSplitPaneUI", "SliderUI", "swingjs.plaf.JSSliderUI", "SeparatorUI", "swingjs.plaf.JSSeparatorUI", "SpinnerUI", "swingjs.plaf.JSSpinnerUI", "ToolBarSeparatorUI", "swingjs.plaf.JSToolBarSeparatorUI", "PopupMenuSeparatorUI", "swingjs.plaf.JSPopupMenuSeparatorUI", "TabbedPaneUI", "swingjs.plaf.JSTabbedPaneUI", "TextAreaUI", "swingjs.plaf.JSTextAreaUI", "TextFieldUI", "swingjs.plaf.JSTextFieldUI", "PasswordFieldUI", "swingjs.plaf.JSPasswordFieldUI", "TextPaneUI", "swingjs.plaf.JSTextPaneUI", "EditorPaneUI", "swingjs.plaf.JSEditorPaneUI", "TreeUI", "swingjs.plaf.JSTreeUI", "LabelUI", "swingjs.plaf.JSLabelUI", "ListUI", "swingjs.plaf.JSListUI", "ToolBarUI", "swingjs.plaf.JSToolBarUI", "ToolTipUI", "swingjs.plaf.JSToolTipUI", "ComboBoxUI", "swingjs.plaf.JSComboBoxUI", "TableUI", "swingjs.plaf.JSTableUI", "TableHeaderUI", "swingjs.plaf.JSTableHeaderUI", "InternalFrameUI", "swingjs.plaf.JSInternalFrameUI", "DesktopPaneUI", "swingjs.plaf.JSDesktopPaneUI", "DesktopIconUI", "swingjs.plaf.JSDesktopIconUI", "OptionPaneUI", "swingjs.plaf.JSOptionPaneUI", "PanelUI", "swingjs.plaf.JSPanelUI", "ViewportUI", "swingjs.plaf.JSViewportUI", "RootPaneUI", "swingjs.plaf.JSRootPaneUI"]); -table.putDefaults (uiDefaults); -}, "javax.swing.UIDefaults"); -Clazz_defineMethod (c$, "initSystemColorDefaults", -function (table) { -var defaultSystemColors = Clazz_newArray (-1, ["window", "#FFFFFF", "windowText", "#333333", "menu", "#C0C0C0", "menuText", "#333333", "text", "#C0C0C0", "textText", "#333333", "control", "#EEEEEE", "controlText", "#333333", "scrollbar", "#E0E0E0", "info", "#FFFFE1", "infoText", "#000000"]); -this.loadSystemColors (table, defaultSystemColors, this.isNativeLookAndFeel ()); -}, "javax.swing.UIDefaults"); -Clazz_defineMethod (c$, "loadSystemColors", -function (table, systemColors, useNative) { -for (var i = 0; i < systemColors.length; i += 2) { -var color = java.awt.Color.black; -try { -color = java.awt.Color.decode (systemColors[i + 1]); -} catch (e) { -if (Clazz_exceptionOf (e, NumberFormatException)) { -e.printStackTrace (); -} else { -throw e; -} -} -table.put (systemColors[i], new javax.swing.plaf.ColorUIResource (color)); -} -}, "javax.swing.UIDefaults,~A,~B"); -Clazz_defineMethod (c$, "initResourceBundle", - function (table) { -}, "javax.swing.UIDefaults"); -Clazz_defineMethod (c$, "initComponentDefaults", -function (table) { -this.initResourceBundle (table); -var oneThousand = new Long (1000); -var twelve = new Integer (12); -var fontPlain = new Integer (0); -var serifPlain12 = new javax.swing.plaf.FontUIResource ("Serif", 0, 12); -var sansSerifPlain12 = new javax.swing.plaf.FontUIResource ("SansSerif", 0, 12); -var dialogPlain12 = new javax.swing.plaf.FontUIResource ("Dialog", 0, 12); -var monospacedPlain12 = new javax.swing.plaf.FontUIResource ("Monospaced", 0, 12); -var black = new javax.swing.plaf.ColorUIResource (java.awt.Color.black); -var white = new javax.swing.plaf.ColorUIResource (java.awt.Color.white); -var gray = new javax.swing.plaf.ColorUIResource (java.awt.Color.gray); -var darkGray = new javax.swing.plaf.ColorUIResource (java.awt.Color.darkGray); -var control = table.getColor ("control"); -var controlText = table.getColor ("controlText"); -var menu = table.getColor ("menu"); -var menuText = table.getColor ("menuText"); -var textText = table.getColor ("textText"); -var window = table.getColor ("window"); -var zeroInsets = new javax.swing.plaf.InsetsUIResource (0, 0, 0, 0); -var twoInsets = new javax.swing.plaf.InsetsUIResource (2, 2, 2, 2); -var threeInsets = new javax.swing.plaf.InsetsUIResource (3, 3, 3, 3); -var listCellRendererActiveValue = ((Clazz_isClassDefined ("swingjs.plaf.HTML5LookAndFeel$1") ? 0 : swingjs.plaf.HTML5LookAndFeel.$HTML5LookAndFeel$1$ ()), Clazz_innerTypeInstance (swingjs.plaf.HTML5LookAndFeel$1, this, null)); -var zero = new Integer (0); -var tabbedPaneTabInsets = new javax.swing.plaf.InsetsUIResource (0, 4, 1, 4); -var tabbedPaneTabPadInsets = new javax.swing.plaf.InsetsUIResource (2, 2, 2, 1); -var tabbedPaneTabAreaInsets = new javax.swing.plaf.InsetsUIResource (3, 2, 0, 2); -var tabbedPaneContentBorderInsets = new javax.swing.plaf.InsetsUIResource (2, 2, 3, 3); -var editorMargin = threeInsets; -var four = new Integer (4); -var defaults = Clazz_newArray (-1, ["*.font", dialogPlain12, "*.background", control, "*.foreground", controlText, "Button.margin", new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.margin", new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.textIconGap", four, "ToggleButton.textShiftOffset", zero, "RadioButton.margin", twoInsets, "RadioButton.textIconGap", four, "RadioButton.textShiftOffset", zero, "CheckBox.margin", twoInsets, "CheckBox.textIconGap", four, "CheckBox.textShiftOffset", zero, "ColorChooser.swatchesSwatchSize", new java.awt.Dimension (10, 10), "ColorChooser.swatchesRecentSwatchSize", new java.awt.Dimension (10, 10), "ColorChooser.swatchesDefaultRecentColor", control, "ComboBox.font", sansSerifPlain12, "ComboBox.background", window, "ComboBox.foreground", textText, "ComboBox.timeFactor", oneThousand, "ComboBox.isEnterSelectablePopup", Boolean.FALSE, "FileChooser.readOnly", Boolean.FALSE, "Label.border", null, "List.background", window, "List.foreground", textText, "List.cellRenderer", listCellRendererActiveValue, "List.timeFactor", oneThousand, "MenuBar.font", dialogPlain12, "MenuBar.background", menu, "MenuBar.foreground", menuText, "MenuItem.font", dialogPlain12, "MenuItem.background", menu, "MenuItem.foreground", menuText, "MenuItem.margin", twoInsets, "RadioButtonMenuItem.font", dialogPlain12, "RadioButtonMenuItem.background", menu, "RadioButtonMenuItem.foreground", menuText, "RadioButtonMenuItem.margin", twoInsets, "CheckBoxMenuItem.font", dialogPlain12, "CheckBoxMenuItem.background", menu, "CheckBoxMenuItem.foreground", menuText, "CheckBoxMenuItem.margin", twoInsets, "Menu.background", menu, "Menu.foreground", menuText, "Menu.margin", twoInsets, "PopupMenu.background", menu, "PopupMenu.foreground", menuText, "PopupMenu.consumeEventOnClose", Boolean.FALSE, "OptionPane.messageForeground", controlText, "Panel.font", dialogPlain12, "Panel.background", control, "Panel.foreground", textText, "ProgressBar.cellLength", new Integer (1), "ProgressBar.cellSpacing", zero, "ProgressBar.repaintInterval", new Integer (50), "ProgressBar.cycleTime", new Integer (3000), "ProgressBar.horizontalSize", new javax.swing.plaf.DimensionUIResource (146, 12), "ProgressBar.verticalSize", new javax.swing.plaf.DimensionUIResource (12, 146), "ScrollBar.foreground", control, "ScrollBar.width", new Integer (16), "Viewport.foreground", textText, "Slider.horizontalSize", new java.awt.Dimension (200, 21), "Slider.verticalSize", new java.awt.Dimension (21, 200), "Slider.minimumHorizontalSize", new java.awt.Dimension (36, 21), "Slider.minimumVerticalSize", new java.awt.Dimension (21, 36), "Spinner.font", monospacedPlain12, "Spinner.arrowButtonSize", new java.awt.Dimension (16, 5), "Spinner.editorAlignment", new Integer (11), "SplitPane.background", control, "SplitPane.dividerSize", new Integer (7), "SplitPaneDivider.draggingColor", darkGray, "TabbedPane.selected", null, "TabbedPane.textIconGap", four, "TabbedPane.tabsOverlapBorder", Boolean.FALSE, "TabbedPane.labelShift", new Integer (1), "TabbedPane.selectedLabelShift", new Integer (-1), "TabbedPane.tabInsets", tabbedPaneTabInsets, "TabbedPane.selectedTabPadInsets", tabbedPaneTabPadInsets, "TabbedPane.tabAreaInsets", tabbedPaneTabAreaInsets, "TabbedPane.contentBorderInsets", tabbedPaneContentBorderInsets, "TabbedPane.tabRunOverlay", new Integer (2), "Table.background", window, "Table.dropLineShortColor", black, "Table.gridColor", gray, "Table.focusCellBackground", window, "Table.focusCellForeground", controlText, "TextField.font", sansSerifPlain12, "TextField.background", window, "TextField.foreground", textText, "TextField.margin", zeroInsets, "FormattedTextField.font", sansSerifPlain12, "FormattedTextField.background", window, "FormattedTextField.foreground", textText, "FormattedTextField.caretForeground", textText, "FormattedTextField.margin", zeroInsets, "PasswordField.font", monospacedPlain12, "PasswordField.background", window, "PasswordField.foreground", textText, "PasswordField.margin", zeroInsets, "PasswordField.echoChar", new Character ('*'), "TextArea.font", monospacedPlain12, "TextArea.background", window, "TextArea.foreground", textText, "TextArea.margin", zeroInsets, "TextPane.font", serifPlain12, "TextPane.background", white, "TextPane.foreground", textText, "TextPane.margin", editorMargin, "EditorPane.font", serifPlain12, "EditorPane.background", white, "EditorPane.foreground", textText, "EditorPane.margin", editorMargin, "TitledBorder.titleColor", controlText, "Tree.paintLines", Boolean.TRUE, "Tree.lineTypeDashed", Boolean.FALSE, "Tree.background", window, "Tree.foreground", textText, "Tree.hash", gray, "Tree.textForeground", textText, "Tree.textBackground", table.get ("text"), "Tree.leftChildIndent", new Integer (7), "Tree.rightChildIndent", new Integer (13), "Tree.rowHeight", new Integer (16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.timeFactor", oneThousand]); -table.putDefaults (defaults); -}, "javax.swing.UIDefaults"); -Clazz_overrideMethod (c$, "getName", -function () { -return "SwingJS"; -}); -Clazz_overrideMethod (c$, "getID", -function () { -return "SwingJS"; -}); -Clazz_overrideMethod (c$, "getDescription", -function () { -return "SwingJS L&F"; -}); -Clazz_overrideMethod (c$, "isNativeLookAndFeel", -function () { -return true; -}); -Clazz_overrideMethod (c$, "isSupportedLookAndFeel", -function () { -return true; -}); -c$.$HTML5LookAndFeel$1$ = function () { -Clazz_pu$h(self.c$); -c$ = Clazz_declareAnonymous (swingjs.plaf, "HTML5LookAndFeel$1", null, javax.swing.UIDefaults.ActiveValue); -Clazz_overrideMethod (c$, "createValue", -function (table) { -return new javax.swing.DefaultListCellRenderer.UIResource (); -}, "javax.swing.UIDefaults"); -c$ = Clazz_p0p (); -}; -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["javax.swing.plaf.ComponentUI", "swingjs.plaf.JSEventHandler"], "swingjs.plaf.JSComponentUI", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Color", "$.Component", "$.Dimension", "$.Point", "$.Toolkit", "java.awt.event.FocusEvent", "swingjs.JSToolkit", "swingjs.api.DOMNode"], function () { -c$ = Clazz_decorateAsClass (function () { -this.id = null; -this.c = null; -this.outerNode = null; -this.domNode = null; -this.enableNode = null; -this.textNode = null; -this.valueNode = null; -this.scrollNode = null; -this.focusNode = null; -this.components = null; -this.num = 0; -this.isTainted = true; -this.x = 0; -this.y = 0; -this.preferredSize = null; -this.isContainer = false; -this.parent = null; -this.currentText = null; -this.scrollerNode = null; -this.classID = null; -this.document = null; -this.body = null; -this.needPreferred = false; -Clazz_instantialize (this, arguments); -}, swingjs.plaf, "JSComponentUI", javax.swing.plaf.ComponentUI, swingjs.plaf.JSEventHandler); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, swingjs.plaf.JSComponentUI, []); -this.setDoc (); -}); -Clazz_defineMethod (c$, "setDoc", -function () { -{ -this.document = document; -this.body = document.body; -}}); -Clazz_overrideMethod (c$, "installUI", -function (c) { -}, "javax.swing.JComponent"); -Clazz_overrideMethod (c$, "uninstallUI", -function (c) { -this.uninstallJSUI (); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "$", -function (node) { -return swingjs.JSToolkit.getJQuery ().$ (node); -}, "swingjs.api.DOMNode"); -Clazz_defineMethod (c$, "setTainted", -function () { -this.isTainted = true; -}); -Clazz_defineMethod (c$, "set", -function (target) { -this.c = target; -this.newID (); -if (this.needPreferred) this.getPreferredSize (this.c); -this.installJSUI (); -return this; -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "newID", -function () { -this.classID = this.c.getUIClassID (); -if (this.id == null) { -this.num = ++swingjs.plaf.JSComponentUI.incr; -this.id = this.c.getHTMLName (this.classID) + "_" + this.num; -}}); -Clazz_defineMethod (c$, "setCssFont", -function (obj, font) { -if (font != null) { -var istyle = font.getStyle (); -var name = font.getFamily (); -if (name === "Dialog") name = "Arial"; -swingjs.api.DOMNode.setStyles (obj, ["font-family", name, "font-size", font.getSize () + "px", "font-style", ((istyle & 2) == 0 ? "normal" : "italic"), "font-weight", ((istyle & 1) == 0 ? "normal" : "bold")]); -}if (this.c.isBackgroundSet ()) this.setBackground (this.c.getBackground ()); -this.setForeground (this.c.getForeground ()); -return obj; -}, "swingjs.api.DOMNode,java.awt.Font"); -Clazz_defineMethod (c$, "createDOMObject", -function (key, id, attr) { -var obj = swingjs.api.DOMNode.createElement (key, id); -for (var i = 0; i < attr.length; ) swingjs.api.DOMNode.setAttr (obj, attr[i++], attr[i++]); - -if (!this.c.isEnabled ()) this.setEnabled (false); -return obj; -}, "~S,~S,~A"); -Clazz_defineMethod (c$, "bindMouse", -function (node) { -swingjs.api.DOMNode.setAttr (node, "data-UI", this); -}, "swingjs.api.DOMNode"); -Clazz_overrideMethod (c$, "handleJSEvent", -function (target, eventType, jQueryEvent) { -return false; -}, "~O,~N,~O"); -Clazz_defineMethod (c$, "wrap", -function (type, id, elements) { -return this.append (this.createDOMObject (type, id + type, []), elements); -}, "~S,~S,~A"); -Clazz_defineMethod (c$, "append", -function (obj, elements) { -for (var i = 0; i < elements.length; i++) { -obj.appendChild (elements[i]); -} -return obj; -}, "swingjs.api.DOMNode,~A"); -Clazz_defineMethod (c$, "debugDump", -function (d) { -System.out.println (swingjs.api.DOMNode.getAttr (d, "outerHTML")); -}, "swingjs.api.DOMNode"); -c$.vCenter = Clazz_defineMethod (c$, "vCenter", -function (obj, offset) { -swingjs.api.DOMNode.setStyles (obj, ["top", "50%", "transform", "translateY(" + offset + "%)"]); -}, "swingjs.api.DOMNode,~N"); -Clazz_defineMethod (c$, "setHTMLSize", -function (obj, addCSS) { -return this.setHTMLSize1 (obj, addCSS, true); -}, "swingjs.api.DOMNode,~B"); -Clazz_defineMethod (c$, "setHTMLSize1", -function (node, addCSS, usePreferred) { -if (node == null) return null; -var h; -var w; -var w0 = null; -var h0 = null; -var parentNode = null; -if (this.scrollerNode != null) { -w = this.scrollerNode.c.getWidth (); -h = this.scrollerNode.c.getHeight (); -} else if (usePreferred && this.preferredSize != null) { -w = this.preferredSize.width; -h = this.preferredSize.height; -} else { -parentNode = swingjs.api.DOMNode.remove (node); -{ -w0 = node.style.width; -h0 = node.style.height; -}swingjs.api.DOMNode.setStyles (node, ["position", null, "width", null, "height", null]); -var div; -if (swingjs.api.DOMNode.getAttr (node, "tagName") === "DIV") div = node; - else div = this.wrap ("div", this.id + "_temp", [node]); -swingjs.api.DOMNode.setStyles (div, ["position", "absolute"]); -this.body.appendChild (div); -w = Clazz_doubleToInt (Math.ceil (this.$ (div).width () + 0.5)); -h = Clazz_doubleToInt (Math.ceil (this.$ (div).height () + 0.5)); -this.body.removeChild (div); -}var size = this.getCSSDimension (w, h); -if (addCSS) { -swingjs.api.DOMNode.setStyles (node, ["position", "absolute"]); -swingjs.api.DOMNode.setSize (node, size.width, size.height); -} else { -swingjs.api.DOMNode.setStyles (node, ["position", null]); -if (w0 != null) swingjs.api.DOMNode.setStyles (node, ["width", w0, "height", h0]); -}if (parentNode != null) parentNode.appendChild (node); -return size; -}, "swingjs.api.DOMNode,~B,~B"); -Clazz_defineMethod (c$, "getCSSDimension", -function (w, h) { -return new java.awt.Dimension (w, h); -}, "~N,~N"); -Clazz_defineMethod (c$, "setHTMLElement", -function () { -if (!this.isTainted) return this.outerNode; -var root = (this.isContainer ? this.c.getRootPane () : null); -if (this.c === root) { -this.isTainted = false; -return this.outerNode; -}this.domNode = this.getDOMObject (); -if (this.outerNode == null) { -this.outerNode = this.wrap ("div", this.id, [this.domNode]); -if (root != null && root.getContentPane () === this.c) swingjs.JSToolkit.getHTML5Applet (this.c)._getContentLayer ().appendChild (this.outerNode); -}swingjs.api.DOMNode.setStyles (this.outerNode, ["position", "absolute", "left", (this.x = this.c.getX ()) + "px", "top", (this.y = this.c.getY ()) + "px"]); -if (this.isContainer) { -System.out.println ("JSComponentUI container " + this.id + " " + this.c.getBounds ()); -swingjs.api.DOMNode.setSize (this.outerNode, this.c.getWidth (), this.c.getHeight ()); -var children = (this.components == null ? this.c.getComponents () : this.components); -for (var i = children.length; --i >= 0; ) { -var ui = swingjs.JSToolkit.getUI (children[i], false); -if (ui == null) { -continue; -}if (ui.outerNode == null) ui.setHTMLElement (); -if (ui.outerNode == null) { -System.out.println ("JSCUI could not add " + ui.c.getName () + " to " + this.c.getName ()); -} else { -this.outerNode.appendChild (ui.outerNode); -}ui.parent = this; -} -}this.isTainted = false; -return this.outerNode; -}); -Clazz_defineMethod (c$, "getPreferredSize", -function (c) { -var d = this.setHTMLSize (this.getDOMObject (), false); -return d; -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "paint", -function (g, c) { -if (c.isOpaque ()) { -g.setColor (c.getBackground ()); -g.fillRect (0, 0, c.getWidth (), c.getHeight ()); -}}, "java.awt.Graphics,javax.swing.JComponent"); -Clazz_overrideMethod (c$, "update", -function (g, c) { -var testing = false; -if (testing) { -g.setColor (java.awt.Color.red); -g.drawRect (0, 0, c.getWidth (), c.getHeight ()); -System.out.println ("drawing " + c.getWidth () + " " + c.getHeight ()); -}this.setHTMLElement (); -this.paint (g, c); -}, "java.awt.Graphics,javax.swing.JComponent"); -Clazz_defineMethod (c$, "getMinimumSize", -function (c) { -return this.getPreferredSize (c); -}, "javax.swing.JComponent"); -Clazz_overrideMethod (c$, "getMaximumSize", -function (c) { -return null; -}, "javax.swing.JComponent"); -Clazz_overrideMethod (c$, "contains", -function (c, x, y) { -return c.inside (x, y); -}, "javax.swing.JComponent,~N,~N"); -c$.createUI = Clazz_overrideMethod (c$, "createUI", -function (c) { -return null; -}, "javax.swing.JComponent"); -Clazz_overrideMethod (c$, "getBaseline", -function (c, width, height) { -if (c == null) { -throw new NullPointerException ("Component must be non-null"); -}if (width < 0 || height < 0) { -throw new IllegalArgumentException ("Width and height must be >= 0"); -}return -1; -}, "javax.swing.JComponent,~N,~N"); -Clazz_overrideMethod (c$, "getBaselineResizeBehavior", -function (c) { -if (c == null) { -throw new NullPointerException ("Component must be non-null"); -}return java.awt.Component.BaselineResizeBehavior.OTHER; -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "getJSTextValue", -function () { -return swingjs.api.DOMNode.getAttr (this.domNode, this.valueNode == null ? "innerHTML" : "value"); -}); -Clazz_defineMethod (c$, "notifyPropertyChanged", -function (prop) { -var obj = null; -var val = null; -if (prop === "text") { -val = (this.c).getText (); -if (val.equals (this.currentText)) return; -this.currentText = val; -if (this.textNode != null) { -prop = "innerHTML"; -obj = this.textNode; -} else if (this.valueNode != null) { -prop = "value"; -obj = this.valueNode; -}} else if (prop === "preferredSize") { -this.preferredSize = this.c.getPreferredSize (); -this.getPreferredSize (); -return; -}if (obj == null) { -System.out.println ("JSComponentUI: unrecognized prop: " + prop); -} else { -System.out.println ("JSComponentUI: setting " + this.id + " " + prop); -this.setProp (obj, prop, val); -}}, "~S"); -Clazz_defineMethod (c$, "setProp", -function (obj, prop, val) { -return swingjs.api.DOMNode.setAttr (obj, prop, val); -}, "swingjs.api.DOMNode,~S,~S"); -Clazz_overrideMethod (c$, "isObscured", -function () { -swingjs.JSToolkit.notImplemented (""); -return false; -}); -Clazz_overrideMethod (c$, "canDetermineObscurity", -function () { -swingjs.JSToolkit.notImplemented (""); -return false; -}); -Clazz_overrideMethod (c$, "setVisible", -function (b) { -swingjs.api.DOMNode.setStyles (this.outerNode, ["display", b ? "block" : "none"]); -}, "~B"); -Clazz_overrideMethod (c$, "setEnabled", -function (b) { -if (this.enableNode != null) swingjs.api.DOMNode.setAttr (this.enableNode, "disabled", (b ? null : "TRUE")); -}, "~B"); -Clazz_defineMethod (c$, "paint", -function (g) { -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "repaint", -function (tm, x, y, width, height) { -}, "~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "print", -function (g) { -swingjs.JSToolkit.notImplemented (""); -}, "java.awt.Graphics"); -Clazz_overrideMethod (c$, "setBounds", -function (x, y, width, height, op) { -switch (op) { -case 2: -case 3: -case 4: -if (this.scrollerNode != null) { -width = Math.min (width, this.scrollerNode.c.getWidth ()); -height = Math.min (height, this.scrollerNode.c.getHeight ()); -}System.out.println (this.id + " setBounds " + x + " " + y + " " + width + " " + height + " op=" + op); -if (this.domNode != null) swingjs.api.DOMNode.setSize (this.domNode, width, height); -break; -} -}, "~N,~N,~N,~N,~N"); -Clazz_overrideMethod (c$, "handleEvent", -function (e) { -swingjs.JSToolkit.notImplemented (""); -}, "java.awt.AWTEvent"); -Clazz_overrideMethod (c$, "coalescePaintEvent", -function (e) { -swingjs.JSToolkit.notImplemented (""); -}, "java.awt.event.PaintEvent"); -Clazz_overrideMethod (c$, "getLocationOnScreen", -function () { -var offset = this.$ (this.outerNode).offset (); -return new java.awt.Point (offset.left, offset.top); -}); -Clazz_defineMethod (c$, "getPreferredSize", -function () { -return this.getPreferredSize (this.c); -}); -Clazz_defineMethod (c$, "getMinimumSize", -function () { -swingjs.JSToolkit.notImplemented (""); -return this.getPreferredSize (this.c); -}); -Clazz_overrideMethod (c$, "getColorModel", -function () { -return java.awt.Toolkit.getDefaultToolkit ().getColorModel (); -}); -Clazz_overrideMethod (c$, "getToolkit", -function () { -return java.awt.Toolkit.getDefaultToolkit (); -}); -Clazz_overrideMethod (c$, "getGraphics", -function () { -return null; -}); -Clazz_overrideMethod (c$, "getFontMetrics", -function (font) { -return this.c.getFontMetrics (font); -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "dispose", -function () { -swingjs.JSToolkit.notImplemented (""); -}); -Clazz_overrideMethod (c$, "setForeground", -function (color) { -if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.black : color)]); -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setBackground", -function (color) { -if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["background-color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.white : color)]); -}, "java.awt.Color"); -Clazz_overrideMethod (c$, "setFont", -function (f) { -if (this.domNode != null) this.setCssFont (this.domNode, f); -}, "java.awt.Font"); -Clazz_overrideMethod (c$, "updateCursorImmediately", -function () { -swingjs.JSToolkit.notImplemented (""); -}); -Clazz_overrideMethod (c$, "requestFocus", -function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) { -if (this.focusNode == null) return false; -this.$ (this.focusNode).focus (); -if (this.textNode != null) this.$ (this.textNode).select (); -return true; -}, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); -Clazz_overrideMethod (c$, "isFocusable", -function () { -return (this.focusNode != null); -}); -Clazz_defineMethod (c$, "createImage", -function (producer) { -swingjs.JSToolkit.notImplemented (""); -return null; -}, "java.awt.image.ImageProducer"); -Clazz_defineMethod (c$, "createImage", -function (width, height) { -swingjs.JSToolkit.notImplemented (""); -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "createVolatileImage", -function (width, height) { -swingjs.JSToolkit.notImplemented (""); -return null; -}, "~N,~N"); -Clazz_overrideMethod (c$, "prepareImage", -function (img, w, h, o) { -swingjs.JSToolkit.notImplemented (""); -return false; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "checkImage", -function (img, w, h, o) { -swingjs.JSToolkit.notImplemented (""); -return 0; -}, "java.awt.Image,~N,~N,java.awt.image.ImageObserver"); -Clazz_overrideMethod (c$, "getGraphicsConfiguration", -function () { -swingjs.JSToolkit.notImplemented (""); -return null; -}); -Clazz_overrideMethod (c$, "handlesWheelScrolling", -function () { -swingjs.JSToolkit.notImplemented (""); -return false; -}); -Clazz_overrideMethod (c$, "getBackBuffer", -function () { -swingjs.JSToolkit.notImplemented (""); -return null; -}); -Clazz_overrideMethod (c$, "destroyBuffers", -function () { -swingjs.JSToolkit.notImplemented (""); -}); -Clazz_overrideMethod (c$, "reparent", -function (newContainer) { -swingjs.JSToolkit.notImplemented (""); -}, "java.awt.peer.ContainerPeer"); -Clazz_overrideMethod (c$, "isReparentSupported", -function () { -swingjs.JSToolkit.notImplemented (""); -return false; -}); -Clazz_overrideMethod (c$, "layout", -function () { -swingjs.JSToolkit.notImplemented (""); -}); -Clazz_overrideMethod (c$, "getBounds", -function () { -swingjs.JSToolkit.notImplemented (""); -return null; -}); -Clazz_defineMethod (c$, "hasFocus", -function () { -return this.focusNode != null && this.focusNode === swingjs.api.DOMNode.getAttr (this.document, "activeElement"); -}); -Clazz_defineMethod (c$, "notifyFocus", -function (focusGained) { -java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.FocusEvent (this.c, focusGained ? 1004 : 1005)); -}, "~B"); -Clazz_defineStatics (c$, -"incr", 0); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSPanelUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () { -c$ = Clazz_declareType (swingjs.plaf, "JSPanelUI", swingjs.plaf.JSComponentUI); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, swingjs.plaf.JSPanelUI, []); -this.isContainer = true; -this.setDoc (); -}); -Clazz_overrideMethod (c$, "getDOMObject", -function () { -if (this.domNode == null) this.domNode = this.createDOMObject ("label", this.id, []); -return this.domNode; -}); -Clazz_overrideMethod (c$, "setHTMLSize", -function (obj, addCSS) { -return new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ()); -}, "swingjs.api.DOMNode,~B"); -Clazz_defineMethod (c$, "getPreferredSize", -function (c) { -return null; -}, "javax.swing.JComponent"); -Clazz_overrideMethod (c$, "installJSUI", -function () { -javax.swing.LookAndFeel.installColorsAndFont (this.c, "Panel.background", "Panel.foreground", "Panel.font"); -}); -Clazz_overrideMethod (c$, "uninstallJSUI", -function () { -}); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () { -c$ = Clazz_decorateAsClass (function () { -this.label = null; -Clazz_instantialize (this, arguments); -}, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI); -Clazz_overrideMethod (c$, "getDOMObject", -function () { -return this.getButtonObject ("radio"); -}); -Clazz_overrideMethod (c$, "getPropertyPrefix", -function () { -return "RadioButton."; -}); -Clazz_overrideMethod (c$, "setHTMLSize", -function (obj, addCSS) { -swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]); -swingjs.api.DOMNode.setStyles (this.label, ["position", null]); -var d = this.setHTMLSize1 (obj, addCSS, false); -swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]); -swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]); -return d; -}, "swingjs.api.DOMNode,~B"); -Clazz_defineMethod (c$, "getButtonObject", -function (myType) { -var b = this.c; -var isNew = false; -var doAll = false; -if (this.domNode == null) { -doAll = true; -if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames = new java.util.HashMap (); -var bg = null; -var name = this.id; -isNew = true; -if (Clazz_instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) { -bg = (b.getModel ()).getGroup (); -name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg); -if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id); - else isNew = false; -}this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]); -this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]); -}if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true"); -this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ()); -var drad = this.setHTMLSize1 (this.domBtn, false, false); -this.setHTMLSize1 (this.label, false, false); -var obj = this.wrap ("div", "", [this.domBtn, this.label]); -var dobj = this.setHTMLSize1 (obj, true, true); -swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75); -swingjs.plaf.JSComponentUI.vCenter (this.label, -50); -swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]); -swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]); -if (doAll) { -obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]); -swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]); -} else { -obj = this.domNode; -obj.appendChild (this.domBtn); -obj.appendChild (this.label); -}return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height); -}, "~S"); -Clazz_defineStatics (c$, -"groupNames", null); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSRootPaneUI", null, function () { -c$ = Clazz_declareType (swingjs.plaf, "JSRootPaneUI", swingjs.plaf.JSComponentUI); -Clazz_makeConstructor (c$, -function () { -Clazz_superConstructor (this, swingjs.plaf.JSRootPaneUI, []); -this.isContainer = true; -this.setDoc (); -}); -Clazz_overrideMethod (c$, "getDOMObject", -function () { -return null; -}); -Clazz_overrideMethod (c$, "installJSUI", -function () { -}); -Clazz_overrideMethod (c$, "uninstallJSUI", -function () { -}); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["java.awt.event.FocusListener", "$.MouseListener", "$.MouseMotionListener", "java.beans.PropertyChangeListener", "javax.swing.event.ChangeListener", "jssun.swing.UIAction"], "swingjs.plaf.JSButtonListener", ["javax.swing.AbstractButton", "$.KeyStroke", "$.SwingUtilities", "javax.swing.plaf.ComponentInputMapUIResource", "swingjs.plaf.LazyActionMap"], function () { -c$ = Clazz_decorateAsClass (function () { -this.lastPressedTimestamp = -1; -this.shouldDiscardRelease = false; -this.btn = null; -Clazz_instantialize (this, arguments); -}, swingjs.plaf, "JSButtonListener", null, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener]); -c$.loadActionMap = Clazz_defineMethod (c$, "loadActionMap", -function (map) { -map.put ( new swingjs.plaf.JSButtonListener.Actions ("pressed")); -map.put ( new swingjs.plaf.JSButtonListener.Actions ("released")); -}, "swingjs.plaf.LazyActionMap"); -Clazz_makeConstructor (c$, -function (b) { -this.btn = b; -}, "javax.swing.AbstractButton"); -Clazz_overrideMethod (c$, "propertyChange", -function (e) { -var prop = e.getPropertyName (); -if (prop === "mnemonic") { -this.updateMnemonicBinding (e.getSource ()); -} else if (prop === "contentAreaFilled") { -this.checkOpacity (e.getSource ()); -} else if (prop === "text" || "font" === prop || "foreground" === prop) { -var b = e.getSource (); -(b.getUI ()).notifyPropertyChanged (prop); -}}, "java.beans.PropertyChangeEvent"); -Clazz_defineMethod (c$, "checkOpacity", -function (b) { -b.setOpaque (b.isContentAreaFilled ()); -}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "installKeyboardActions", -function (c) { -var b = c; -this.updateMnemonicBinding (b); -swingjs.plaf.LazyActionMap.installLazyActionMap (c, swingjs.plaf.JSButtonListener, "Button.actionMap"); -var km = this.getInputMap (0, c); -javax.swing.SwingUtilities.replaceUIInputMap (c, 0, km); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "uninstallKeyboardActions", -function (c) { -javax.swing.SwingUtilities.replaceUIInputMap (c, 2, null); -javax.swing.SwingUtilities.replaceUIInputMap (c, 0, null); -javax.swing.SwingUtilities.replaceUIActionMap (c, null); -}, "javax.swing.JComponent"); -Clazz_defineMethod (c$, "getInputMap", -function (condition, c) { -return null; -}, "~N,javax.swing.JComponent"); -Clazz_defineMethod (c$, "updateMnemonicBinding", -function (b) { -var m = b.getMnemonic (); -if (m != 0) { -var map = javax.swing.SwingUtilities.getUIInputMap (b, 2); -if (map == null) { -map = new javax.swing.plaf.ComponentInputMapUIResource (b); -javax.swing.SwingUtilities.replaceUIInputMap (b, 2, map); -}map.clear (); -map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, false), "pressed"); -map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, true), "released"); -map.put (javax.swing.KeyStroke.getKeyStroke (m, 0, true), "released"); -} else { -var map = javax.swing.SwingUtilities.getUIInputMap (b, 2); -if (map != null) { -map.clear (); -}}}, "javax.swing.AbstractButton"); -Clazz_overrideMethod (c$, "stateChanged", -function (e) { -var b = e.getSource (); -b.repaint (); -}, "javax.swing.event.ChangeEvent"); -Clazz_overrideMethod (c$, "focusGained", -function (e) { -}, "java.awt.event.FocusEvent"); -Clazz_overrideMethod (c$, "focusLost", -function (e) { -var b = e.getSource (); -var model = b.getModel (); -model.setArmed (false); -model.setPressed (false); -}, "java.awt.event.FocusEvent"); -Clazz_overrideMethod (c$, "mouseMoved", -function (e) { -}, "java.awt.event.MouseEvent"); -Clazz_overrideMethod (c$, "mouseDragged", -function (e) { -}, "java.awt.event.MouseEvent"); -Clazz_overrideMethod (c$, "mouseClicked", -function (e) { -}, "java.awt.event.MouseEvent"); -Clazz_overrideMethod (c$, "mousePressed", -function (e) { -if (javax.swing.SwingUtilities.isLeftMouseButton (e)) { -var b = e.getSource (); -if (!b.contains (e.getX (), e.getY ())) return; -(b.getUI ()).verifyButtonClick (false); -var multiClickThreshhold = b.getMultiClickThreshhold (); -var lastTime = this.lastPressedTimestamp; -var currentTime = this.lastPressedTimestamp = e.getWhen (); -if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) { -this.shouldDiscardRelease = true; -return; -}var model = b.getModel (); -if (!model.isEnabled ()) { -return; -}if (!model.isArmed ()) { -model.setArmed (true); -}model.setPressed (true); -if (!b.hasFocus () && b.isRequestFocusEnabled ()) { -b.requestFocus (); -}}}, "java.awt.event.MouseEvent"); -Clazz_overrideMethod (c$, "mouseReleased", -function (e) { -if (javax.swing.SwingUtilities.isLeftMouseButton (e)) { -if (this.shouldDiscardRelease) { -this.shouldDiscardRelease = false; -return; -}var b = e.getSource (); -if (!(b.getUI ()).verifyButtonClick (true)) return; -var model = b.getModel (); -model.setPressed (false); -model.setArmed (false); -}}, "java.awt.event.MouseEvent"); -Clazz_overrideMethod (c$, "mouseEntered", -function (e) { -var b = e.getSource (); -var model = b.getModel (); -if (b.isRolloverEnabled () && !javax.swing.SwingUtilities.isLeftMouseButton (e)) { -model.setRollover (true); -}if (model.isPressed ()) model.setArmed (true); -}, "java.awt.event.MouseEvent"); -Clazz_overrideMethod (c$, "mouseExited", -function (e) { -var b = e.getSource (); -var model = b.getModel (); -if (b.isRolloverEnabled ()) { -model.setRollover (false); -}model.setArmed (false); -}, "java.awt.event.MouseEvent"); -Clazz_pu$h(self.c$); -c$ = Clazz_declareType (swingjs.plaf.JSButtonListener, "Actions", jssun.swing.UIAction); -Clazz_overrideMethod (c$, "actionPerformed", -function (a) { -var b = a.getSource (); -var c = this.getName (); -if (c === "pressed") { -var d = b.getModel (); -d.setArmed (true); -d.setPressed (true); -if (!b.hasFocus ()) { -b.requestFocus (); -}} else if (c === "released") { -var d = b.getModel (); -d.setPressed (false); -d.setArmed (false); -}}, "java.awt.event.ActionEvent"); -Clazz_defineMethod (c$, "isEnabled", -function (a) { -if (a != null && (Clazz_instanceOf (a, javax.swing.AbstractButton)) && !(a).getModel ().isEnabled ()) { -return false; -} else { -return true; -}}, "~O"); -Clazz_defineStatics (c$, -"PRESS", "pressed", -"RELEASE", "released"); -c$ = Clazz_p0p (); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () { -c$ = Clazz_decorateAsClass (function () { -this.domBtn = null; -this.shiftOffset = 0; -this.defaultTextShiftOffset = 0; -Clazz_instantialize (this, arguments); -}, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI); -Clazz_overrideMethod (c$, "getDOMObject", -function () { -if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]); -this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ()); -return this.domNode; -}); -Clazz_defineMethod (c$, "verifyButtonClick", -function (isRelease) { -return true; -}, "~B"); -Clazz_overrideMethod (c$, "installJSUI", -function () { -this.installDefaults (this.c); -this.installListeners (this.c); -this.installKeyboardActions (this.c); -}); -Clazz_overrideMethod (c$, "uninstallJSUI", -function () { -this.uninstallKeyboardActions (this.c); -this.uninstallListeners (this.c); -}); -Clazz_defineMethod (c$, "installListeners", -function (b) { -var listener = new swingjs.plaf.JSButtonListener (b); -if (listener != null) { -b.addMouseListener (listener); -b.addMouseMotionListener (listener); -b.addFocusListener (listener); -b.addPropertyChangeListener (listener); -b.addChangeListener (listener); -}}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "uninstallListeners", -function (b) { -var listener = this.getButtonListener (b); -if (listener != null) { -b.removeMouseListener (listener); -b.removeMouseMotionListener (listener); -b.removeFocusListener (listener); -b.removeChangeListener (listener); -b.removePropertyChangeListener (listener); -}}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "installKeyboardActions", -function (b) { -var listener = this.getButtonListener (b); -if (listener != null) { -listener.installKeyboardActions (b); -}}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "uninstallKeyboardActions", -function (b) { -var listener = this.getButtonListener (b); -if (listener != null) { -listener.uninstallKeyboardActions (b); -}}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "getButtonListener", -function (b) { -var listeners = b.getMouseMotionListeners (); -if (listeners != null) { -for (var counter = 0; counter < listeners.length; counter++) { -if (Clazz_instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) { -return listeners[counter]; -}} -}return null; -}, "javax.swing.AbstractButton"); -Clazz_defineMethod (c$, "getPropertyPrefix", -function () { -return "Button."; -}); -Clazz_defineMethod (c$, "installDefaults", -function (b) { -var pp = this.getPropertyPrefix (); -this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset"); -if (b.getMargin () == null || (Clazz_instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) { -b.setMargin (javax.swing.UIManager.getInsets (pp + "margin")); -}javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font"); -javax.swing.LookAndFeel.installProperty (b, "iconTextGap", new Integer (4)); -}, "javax.swing.AbstractButton"); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () { -c$ = Clazz_decorateAsClass (function () { -this.isDomChecked = false; -Clazz_instantialize (this, arguments); -}, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI); -Clazz_overrideMethod (c$, "verifyButtonClick", -function (isRelease) { -var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true); -if (isRelease && this.isDomChecked == checked) return false; -this.isDomChecked = checked; -return true; -}, "~B"); -Clazz_overrideMethod (c$, "getPropertyPrefix", -function () { -return "ToggleButton."; -}); -}); -Clazz_declarePackage ("swingjs.plaf"); -Clazz_load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () { -c$ = Clazz_decorateAsClass (function () { -this._loader = null; -Clazz_instantialize (this, arguments); -}, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource); -c$.installLazyActionMap = Clazz_defineMethod (c$, "installLazyActionMap", -function (c, loaderClass, defaultsKey) { -var map = javax.swing.UIManager.get (defaultsKey); -if (map == null) { -map = new swingjs.plaf.LazyActionMap (loaderClass); -}javax.swing.SwingUtilities.replaceUIActionMap (c, map); -}, "javax.swing.JComponent,Class,~S"); -c$.getActionMap = Clazz_defineMethod (c$, "getActionMap", -function (loaderClass, defaultsKey) { -var map = javax.swing.UIManager.get (defaultsKey); -if (map == null) { -map = new swingjs.plaf.LazyActionMap (loaderClass); -}return map; -}, "Class,~S"); -Clazz_makeConstructor (c$, - function (loader) { -Clazz_superConstructor (this, swingjs.plaf.LazyActionMap, []); -this._loader = loader; -}, "Class"); -Clazz_defineMethod (c$, "put", -function (action) { -this.put (action.getValue ("Name"), action); -}, "javax.swing.Action"); -Clazz_defineMethod (c$, "put", -function (key, action) { -this.loadIfNecessary (); -Clazz_superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]); -}, "~O,javax.swing.Action"); -Clazz_defineMethod (c$, "get", -function (key) { -this.loadIfNecessary (); -return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "get", [key]); -}, "~O"); -Clazz_defineMethod (c$, "remove", -function (key) { -this.loadIfNecessary (); -Clazz_superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]); -}, "~O"); -Clazz_defineMethod (c$, "clear", -function () { -this.loadIfNecessary (); -Clazz_superCall (this, swingjs.plaf.LazyActionMap, "clear", []); -}); -Clazz_defineMethod (c$, "keys", -function () { -this.loadIfNecessary (); -return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "keys", []); -}); -Clazz_defineMethod (c$, "size", -function () { -this.loadIfNecessary (); -return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "size", []); -}); -Clazz_defineMethod (c$, "allKeys", -function () { -this.loadIfNecessary (); -return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []); -}); -Clazz_defineMethod (c$, "setParent", -function (map) { -this.loadIfNecessary (); -Clazz_superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]); -}, "javax.swing.ActionMap"); -Clazz_defineMethod (c$, "loadIfNecessary", - function () { -if (this._loader != null) { -{ -this._loader.loadActionMap(this); -this._loader = null; -}}}); -}); -})(Clazz -,Clazz.getClassName -,Clazz.newLongArray -,Clazz.doubleToByte -,Clazz.doubleToInt -,Clazz.doubleToLong -,Clazz.declarePackage -,Clazz.instanceOf -,Clazz.load -,Clazz.instantialize -,Clazz.decorateAsClass -,Clazz.floatToInt -,Clazz.floatToLong -,Clazz.makeConstructor -,Clazz.defineEnumConstant -,Clazz.exceptionOf -,Clazz.newIntArray -,Clazz.defineStatics -,Clazz.newFloatArray -,Clazz.declareType -,Clazz.prepareFields -,Clazz.superConstructor -,Clazz.newByteArray -,Clazz.declareInterface -,Clazz.p0p -,Clazz.pu$h -,Clazz.newShortArray -,Clazz.innerTypeInstance -,Clazz.isClassDefined -,Clazz.prepareCallback -,Clazz.newArray -,Clazz.castNullAs -,Clazz.floatToShort -,Clazz.superCall -,Clazz.decorateAsType -,Clazz.newBooleanArray -,Clazz.newCharArray -,Clazz.implementOf -,Clazz.newDoubleArray -,Clazz.overrideConstructor -,Clazz.clone -,Clazz.doubleToShort -,Clazz.getInheritedLevel -,Clazz.getParamsType -,Clazz.isAF -,Clazz.isAI -,Clazz.isAS -,Clazz.isASS -,Clazz.isAP -,Clazz.isAFloat -,Clazz.isAII -,Clazz.isAFF -,Clazz.isAFFF -,Clazz.tryToSearchAndExecute -,Clazz.getStackTrace -,Clazz.inheritArgs -,Clazz.alert -,Clazz.defineMethod -,Clazz.overrideMethod -,Clazz.declareAnonymous -,Clazz.checkPrivateMethod -,Clazz.cloneFinals -); +(function(J,la,ta,ua,A,va,p,j,n,k,q,E,wa,g,F,z,H,x,M,t,I,r,L,y,v,w,ma,D,C,K,B,U,xa,u,R,na,Q,V,N,O,aa,ya,oa,pa,W,X,ca,da,ea,fa,ga,Y,ha,qa,S,ra,za,c,d,G,Aa,P){(function(a){a._Loader.registerPackages("java",["io","lang","lang.reflect","util"]);var b=java.util;a._Loader.ignore("net.sf.j2s.ajax.HttpRequest java.util.MapEntry.Type java.lang.Runtime java.security.AccessController java.security.PrivilegedExceptionAction java.io.File java.io.FileInputStream java.io.FileWriter java.io.OutputStreamWriter java.util.concurrent.Executors".split(" ")); +Math.rint=Math.round;Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});if(a._supportsNativeObject)for(var e=0;ethis&&0this&&0>>1&1431655765;a=(a&858993459)+(a>>>2&858993459);a=a+(a>>>4)&252645135;a+=a>>>8;return a+(a>>>16)&63},"Number");Integer.bitCount=Integer.prototype.bitCount;c(Integer,"numberOfLeadingZeros",function(a){if(0==a)return 32;var b=1;0==a>>>16&&(b+=16,a<<=16);0==a>>>24&&(b+=8,a<<=8);0==a>>>28&&(b+=4,a<<=4);0==a>>>30&&(b+=2,a<<=2);return b-(a>>>31)},"Number");Integer.numberOfLeadingZeros= +Integer.prototype.numberOfLeadingZeros;c(Integer,"numberOfTrailingZeros",function(a){if(0==a)return 32;var b=31,e=a<<16;0!=e&&(b-=16,a=e);e=a<<8;0!=e&&(b-=8,a=e);e=a<<4;0!=e&&(b-=4,a=e);e=a<<2;0!=e&&(b-=2,a=e);return b-(a<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;c(Integer,"parseIntRadix",function(a,b){if(null==a)throw new NumberFormatException("null");if(2>b)throw new NumberFormatException("radix "+b+" less than Character.MIN_RADIX");if(36=c)&&(0a){var b=a&16777215;return(a>>24&255)._numberToString(16)+(b="000000"+b._numberToString(16)).substring(b.length-6)}return a._numberToString(16)};Integer.toOctalString=Integer.prototype.toOctalString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(8)}; +Integer.toBinaryString=Integer.prototype.toBinaryString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(2)};Integer.decodeRaw=c(Integer,"decodeRaw",function(a){0<=a.indexOf(".")&&(a="");var b=a.startsWith("-")?1:0;a=a.replace(/\#/,"0x").toLowerCase();b=a.startsWith("0x",b)?16:a.startsWith("0",b)?8:10;a=Number(a)&4294967295;return 8==b?parseInt(a,8):a},"~S");Integer.decode=c(Integer,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||aInteger.MAX_VALUE)throw new NumberFormatException("Invalid Integer"); +return new Integer(a)},"~S");d(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){k(this,arguments)};R(Long,"Long",Number,Comparable,null,!0);Long.prototype.valueOf=function(){return 0};Long.toString=Long.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Long?"class java.lang.Long":""+this.valueOf()};O(Long,function(a){null==a&&(a=0);a="number"==typeof a?Math.round(a):Integer.parseIntRadix(a,10);this.valueOf=function(){return a}});Long.TYPE= +Long.prototype.TYPE=Long;c(Long,"parseLong",function(a,b){return Integer.parseInt(a,b||10)});Long.parseLong=Long.prototype.parseLong;d(Long,"$valueOf",function(a){return new Long(a)});Long.$valueOf=Long.prototype.$valueOf;d(Long,"equals",function(a){return null==a||!j(a,Long)?!1:a.valueOf()==this.valueOf()},"Object");Long.toHexString=Long.prototype.toHexString=function(a){return a.toString(16)};Long.toOctalString=Long.prototype.toOctalString=function(a){return a.toString(8)};Long.toBinaryString=Long.prototype.toBinaryString= +function(a){return a.toString(2)};Long.decode=c(Long,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a))throw new NumberFormatException("Invalid Long");return new Long(a)},"~S");java.lang.Short=Short=function(){k(this,arguments)};R(Short,"Short",Number,Comparable,null,!0);Short.prototype.valueOf=function(){return 0};Short.toString=Short.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Short?"class java.lang.Short":""+this.valueOf()};O(Short,function(a){null==a&& +(a=0);"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));a=a.shortValue();this.valueOf=function(){return a}});Short.MIN_VALUE=Short.prototype.MIN_VALUE=-32768;Short.MAX_VALUE=Short.prototype.MAX_VALUE=32767;Short.TYPE=Short.prototype.TYPE=Short;c(Short,"parseShortRadix",function(a,b){return Integer.parseIntRadix(a,b).shortValue()},"String, Number");Short.parseShortRadix=Short.prototype.parseShortRadix;c(Short,"parseShort",function(a){return Short.parseShortRadix(a,10)},"String");Short.parseShort= +Short.prototype.parseShort;d(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;d(Short,"equals",function(a){return null==a||!j(a,Short)?!1:a.valueOf()==this.valueOf()},"Object");Short.toHexString=Short.prototype.toHexString=function(a){return a.toString(16)};Short.toOctalString=Short.prototype.toOctalString=function(a){return a.toString(8)};Short.toBinaryString=Short.prototype.toBinaryString=function(a){return a.toString(2)};Short.decode=c(Short,"decode",function(a){a= +Integer.decodeRaw(a);if(isNaN(a)||-32768>a||32767a||127a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");return a};java.lang.Float=Float=function(){k(this,arguments)};R(Float,"Float",Number,Comparable,null,!0);Float.prototype.valueOf=function(){return 0};Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?a._floatToString(arguments[0]):this===Float?"class java.lang.Float":a._floatToString(this.valueOf())};O(Float, +function(a){null==a&&(a=0);"number"!=typeof a&&(a=Number(a));this.valueOf=function(){return a}});Float.serialVersionUID=Float.prototype.serialVersionUID=-0x2512365d24c31000;Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235E38;Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4E-45;Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Float.NaN=Number.NaN;Float.TYPE=Float.prototype.TYPE=Float;c(Float,"parseFloat",function(a){if(null==a)throw new NumberFormatException("null"); +if("number"==typeof a)return a;var b=Number(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"String");Float.parseFloat=Float.prototype.parseFloat;d(Float,"$valueOf",function(a){return new Float(a)});Float.$valueOf=Float.prototype.$valueOf;c(Float,"isNaN",function(a){return isNaN(a)},"Number");Float.isNaN=Float.prototype.isNaN;c(Float,"isInfinite",function(a){return!isFinite(a)},"Number");Float.isInfinite=Float.prototype.isInfinite;d(Float,"equals",function(a){return null== +a||!j(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){k(this,arguments)};R(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?a._floatToString(arguments[0]):this===Double?"class java.lang.Double":a._floatToString(this.valueOf())};O(Double,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Double.parseDouble(a));this.valueOf=function(){return a}}); +Double.serialVersionUID=Double.prototype.serialVersionUID=-0x7f4c3db5d6940400;Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9E-324;Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157E308;Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Double.NaN=Number.NaN;Double.TYPE=Double.prototype.TYPE=Double;c(Double,"isNaN",function(a){return isNaN(a)},"Number");Double.isNaN=Double.prototype.isNaN;c(Double,"isInfinite",function(a){return!isFinite(a)}, +"Number");Double.isInfinite=Double.prototype.isInfinite;c(Double,"parseDouble",function(a){if(null==a)throw new NumberFormatException("null");if("number"==typeof a)return a;var b=Number(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"String");Double.parseDouble=Double.prototype.parseDouble;c(Double,"$valueOf",function(a){return new Double(a)},"Number");Double.$valueOf=Double.prototype.$valueOf;d(Double,"equals",function(a){return null==a||!j(a,Double)?!1:a.valueOf()== +this.valueOf()},"Object");Boolean=java.lang.Boolean=Boolean||function(){k(this,arguments)};if(a._supportsNativeObject)for(e=0;eh)e[e.length]=a.charAt(c);else if(192h){h&=31;c++;var l=a.charCodeAt(c)&63,h=(h<<6)+l;e[e.length]=String.fromCharCode(h)}else if(224<=h){h&=15;c++;l=a.charCodeAt(c)&63;c++;var d=a.charCodeAt(c)&63,h=(h<<12)+(l<<6)+d;e[e.length]=String.fromCharCode(h)}}return e.join("")};b.convert2UTF8=function(a){var e=this.guessEncoding(a),c=0;if(e==b.UTF8)return a;e==b.UTF16&&(c=2);for(var e=Array(0+a.length-c),h=c;hl)e[0+h-c]=a.charAt(h);else if(2047>=l){var d=192+((l&1984)>>6),m=128+(l&63);e[0+h-c]=String.fromCharCode(d)+String.fromCharCode(m)}else d=224+((l&61440)>>12),m=128+((l&4032)>>6),l=128+(l&63),e[0+h-c]=String.fromCharCode(d)+String.fromCharCode(m)+String.fromCharCode(l)}return e.join("")};b.base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");b.encodeBase64=function(a){if(null==a||0==a.length)return a;for(var e=b.base64Chars,c=a.length,h=0,l=[],d,m;h>2],h>4],h>6],l[l.length]=e[d&63]):(l[l.length]=e[m<<2&60],l[l.length]="=")):(l[l.length]=e[d<<4&48],l[l.length]="=",l[l.length]="=");return l.join("")};b.decodeBase64=function(a){if(null==a||0==a.length)return a;var e=b.base64Chars,c=b.xBase64Chars;if(null==b.xBase64Chars){for(var c={},h=0;hk++;)d=c[a.charAt(h++)],m=c[a.charAt(h++)],g=c[a.charAt(h++)],j=c[a.charAt(h++)],l[l.length]=String.fromCharCode(d<<2&255|m>>4),null!=g&&(l[l.length]=String.fromCharCode(m<<4&255|g>>2),null!=j&&(l[l.length]=String.fromCharCode(g<<6&255|j)));return l.join("")};if(null==String.prototype.$replace){java.lang.String=String;if(a._supportsNativeObject)for(var e=0;ethis.indexOf(a))return""+this;1==a.length?0<="\\$.*+|?^{}()[]".indexOf(a)&&(a="\\"+a):a=a.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(a,b){return"\\"+b});return this.replace(RegExp(a,"gm"),b)};a.$generateExpFunction=function(a){var b= +[],e=[],c=0;b[0]="";for(var h=0;hc||0>b||b>this.length-h||c>e.length-h)return!1;b=this.substring(b,b+h);e=e.substring(c,c+h);a&&(b=b.toLowerCase(),e=e.toLowerCase()); +return b==e};a.$plit=function(a,b){if(!b&&" "==a)return this.split(a);if(null!=b&&0b&&(e[b-1]=h.substring(h.indexOf("@@_@@")+5),e.length=b);return e}e=RegExp(a,"gm");return this.split(e)};a.trim||(a.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")});if(!a.startsWith||!a.endsWith){var e=function(a,b,e){var c=e,h=0,f=b.length; +if(0>e||e>a.length-f)return!1;for(;0<=--f;)if(a.charAt(c++)!=b.charAt(h++))return!1;return!0};a.startsWith=function(a){return 1==arguments.length?e(this,arguments[0],0):2==arguments.length?e(this,arguments[0],arguments[1]):!1};a.endsWith=function(a){return e(this,a,this.length-a.length)}}a.equals=function(a){return this.valueOf()==a};a.equalsIgnoreCase=function(a){return null==a?!1:this==a||this.toLowerCase()==a.toLowerCase()};a.hash=0;a.hashCode=function(){var a=this.hash;if(0==a){for(var b=0,e= +this.length,c=0;c>8,h+=2):e[h]=c,h++;return e};a.contains=function(a){return 0<=this.indexOf(a)};a.compareTo=function(a){return this>a?1:thise?1:-1};a.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var b=0,e=0,c=this.length;0!=c--;)if(this.charCodeAt(b++)!=a[e++])return!1; +return!0};a.getChars=function(a,b,e,c){if(0>a)throw new StringIndexOutOfBoundsException(a);if(b>this.length)throw new StringIndexOutOfBoundsException(b);if(a>b)throw new StringIndexOutOfBoundsException(b-a);if(null==e)throw new NullPointerException;for(var h=0;h=b+this.length?-1:null!= +b?this.$lastIndexOf(a,b):this.$lastIndexOf(a)};a.intern=function(){return this.valueOf()};String.copyValueOf=a.copyValueOf=function(){return 1==arguments.length?String.instantialize(arguments[0]):String.instantialize(arguments[0],arguments[1],arguments[2])};a.codePointAt||(a.codePointAt=a.charCodeAt)})(String.prototype);String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var a=arguments[0];if("string"==typeof a||a instanceof String)return new String(a);if(a instanceof +Array||a instanceof Int32Array){if(0==a.length)return"";if("number"!=typeof a[0])return a.join("");for(var e=Array(a.length),c=0;cl||h+l>a.length)throw new IndexOutOfBoundsException;if(0=a},"~N");c$.isUpperCase=c(c$,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~N");c$.isLowerCase=c(c$,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~N");c$.isWhitespace=c(c$,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a||5760==a||8192<= +a&&8199!=a&&(8203>=a||8232==a||8233==a||12288==a)},"~N");c$.isLetter=c(c$,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~N");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~N");c$.isSpaceChar=c(c$,"isSpaceChar",function(a){a=a.charCodeAt(0);return 32==a||160==a||5760==a?!0:8192>a?!1:8203>=a||8232==a||8233==a||8239==a||12288==a},"~N");c$.digit=c(c$,"digit",function(a,b){var e=a.charCodeAt(0); +if(2<=b&&36>=b&&128>e){var c=-1;48<=e&&57>=e?c=e-48:97<=e&&122>=e?c=e-87:65<=e&&90>=e&&(c=e-55);return ca.getTime()},"javautil.Date");c(b.Date,"equals",function(a){return j(a,b.Date)&&this.getTime()==a.getTime()},"Object");c(b.Date,"compareTo",function(a){var b=this.getTime();a=a.getTime();return b>32)});c$=q(function(){this.source=null;k(this,arguments)},b,"EventObject",null,java.io.Serializable);g(c$,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");c(c$,"getSource",function(){return this.source});d(c$,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});y(b,"EventListener");c$=q(function(){this.listener=null;k(this,arguments)},b,"EventListenerProxy",null,b.EventListener);g(c$,function(a){this.listener= +a},"javautil.EventListener");c(c$,"getListener",function(){return this.listener});y(b,"Iterator");y(b,"ListIterator",b.Iterator);y(b,"Enumeration");y(b,"Collection",Iterable);y(b,"Set",b.Collection);y(b,"Map");y(b.Map,"Entry");y(b,"List",b.Collection);y(b,"Queue",b.Collection);y(b,"RandomAccess");c$=q(function(){this.stackTrace=this.cause=this.detailMessage=null;k(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);I(c$,function(){this.cause=this});g(c$,function(){this.fillInStackTrace()}); +g(c$,function(a){this.fillInStackTrace();this.detailMessage=a},"~S");g(c$,function(a,b){this.fillInStackTrace();this.detailMessage=a;this.cause=b},"~S,Throwable");g(c$,function(a){this.fillInStackTrace();this.detailMessage=null==a?null:a.toString();this.cause=a},"Throwable");c(c$,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(c$,"getLocalizedMessage",function(){return this.getMessage()});c(c$,"getCause",function(){return this.cause===this?null:this.cause});c(c$, +"initCause",function(a){if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");if(a===this)throw new IllegalArgumentException("Self-causation not permitted");this.cause=a;return this},"Throwable");d(c$,"toString",function(){var a=this.getClass().getName(),b=this.message||this.detailMessage;return b?a+": "+b:a});c(c$,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+S())});c(c$,"getStackTrace",function(){for(var a=""+this+ +"\n",b=0;boa(e.nativeClazz,Throwable))a+=e+"\n"}return a});c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(c$,"fillInStackTrace",function(){this.stackTrace=[];for(var b=arguments.callee.caller,e=null,c=[],h=a._callingStackTraces.length- +1,d=!0;-1h)break;d=!0;e=a._callingStackTraces[h].caller;g=a._callingStackTraces[h].owner;h--}else e=b,null!=e.claxxOwner?g=e.claxxOwner:null!=e.exClazz&&(g=e.exClazz);b=new StackTraceElement(null!=g&&0!=g.__CLASS_NAME__.length?g.__CLASS_NAME__:"anonymous",(null==e.exName?"anonymous":e.exName)+" ("+pa(e.arguments)+")",null,-1);b.nativeClazz=g;this.stackTrace[this.stackTrace.length]=b;for(g=0;g":this.declaringClass});c(c$,"getFileName",function(){return this.fileName});c(c$,"getLineNumber",function(){return this.lineNumber});c(c$,"getMethodName",function(){return null==this.methodName?"":this.methodName});d(c$,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(c$,"isNativeMethod",function(){return-2== +this.lineNumber});d(c$,"toString",function(){var a=new StringBuilder(80);a.append(this.getClassName());a.append(".");a.append(this.getMethodName());if(this.isNativeMethod())a.append("(Native Method)");else{var b=this.getFileName();if(null==b)a.append("(Unknown Source)");else{var e=this.getLineNumber();a.append("(");a.append(b);0<=e&&(a.append(":"),a.append(e));a.append(")")}}return a.toString()});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+ +(this.getStackTrace?this.getStackTrace():S())});c$=t(java.lang,"Error",Throwable);c$=t(java.lang,"LinkageError",Error);c$=t(java.lang,"IncompatibleClassChangeError",LinkageError);c$=t(java.lang,"AbstractMethodError",IncompatibleClassChangeError);c$=t(java.lang,"AssertionError",Error);g(c$,function(a){r(this,AssertionError,[String.valueOf(a),j(a,Throwable)?a:null])},"~O");g(c$,function(a){this.construct(""+a)},"~B");g(c$,function(a){this.construct(""+a)},"~N");c$=t(java.lang,"ClassCircularityError", +LinkageError);c$=t(java.lang,"ClassFormatError",LinkageError);c$=q(function(){this.exception=null;k(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);g(c$,function(){r(this,ExceptionInInitializerError);this.initCause(null)});g(c$,function(a){r(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");g(c$,function(a){r(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(c$,"getException",function(){return this.exception});d(c$,"getCause", +function(){return this.exception});c$=t(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=t(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=t(java.lang,"VirtualMachineError",Error);c$=t(java.lang,"InternalError",VirtualMachineError);c$=t(java.lang,"NoClassDefFoundError",LinkageError);c$=t(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);c$=t(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);c$=t(java.lang,"OutOfMemoryError",VirtualMachineError);c$= +t(java.lang,"StackOverflowError",VirtualMachineError);c$=t(java.lang,"UnknownError",VirtualMachineError);c$=t(java.lang,"UnsatisfiedLinkError",LinkageError);c$=t(java.lang,"UnsupportedClassVersionError",ClassFormatError);c$=t(java.lang,"VerifyError",LinkageError);c$=t(java.lang,"ThreadDeath",Error);g(c$,function(){r(this,ThreadDeath,[])});c$=t(java.lang,"Exception",Throwable);c$=t(java.lang,"RuntimeException",Exception);c$=t(java.lang,"ArithmeticException",RuntimeException);c$=t(java.lang,"IndexOutOfBoundsException", +RuntimeException);c$=t(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);g(c$,function(a){r(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");c$=t(java.lang,"ArrayStoreException",RuntimeException);c$=t(java.lang,"ClassCastException",RuntimeException);c$=q(function(){this.ex=null;k(this,arguments)},java.lang,"ClassNotFoundException",Exception);g(c$,function(){r(this,ClassNotFoundException,[U("Throwable")])});g(c$,function(a){r(this,ClassNotFoundException, +[a,null])},"~S");g(c$,function(a,b){r(this,ClassNotFoundException,[a]);this.ex=b},"~S,Throwable");c(c$,"getException",function(){return this.ex});d(c$,"getCause",function(){return this.ex});c$=t(java.lang,"CloneNotSupportedException",Exception);c$=t(java.lang,"IllegalAccessException",Exception);c$=t(java.lang,"IllegalArgumentException",RuntimeException);g(c$,function(a){r(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"IllegalMonitorStateException",RuntimeException); +c$=t(java.lang,"IllegalStateException",RuntimeException);g(c$,function(a){r(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"IllegalThreadStateException",IllegalArgumentException);c$=t(java.lang,"InstantiationException",Exception);c$=t(java.lang,"InterruptedException",Exception);c$=t(java.lang,"NegativeArraySizeException",RuntimeException);c$=t(java.lang,"NoSuchFieldException",Exception);c$=t(java.lang,"NoSuchMethodException",Exception);c$=t(java.lang,"NullPointerException", +RuntimeException);c$=t(java.lang,"NumberFormatException",IllegalArgumentException);c$=t(java.lang,"SecurityException",RuntimeException);g(c$,function(a){r(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);g(c$,function(a){r(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");c$=t(java.lang,"UnsupportedOperationException",RuntimeException);g(c$,function(){r(this,UnsupportedOperationException, +[])});g(c$,function(a){r(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");c$=q(function(){this.target=null;k(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);g(c$,function(){r(this,java.lang.reflect.InvocationTargetException,[U("Throwable")])});g(c$,function(a){r(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");g(c$,function(a,b){r(this,java.lang.reflect.InvocationTargetException,[b,a]);this.target=a},"Throwable,~S"); +c(c$,"getTargetException",function(){return this.target});d(c$,"getCause",function(){return this.target});c$=q(function(){this.undeclaredThrowable=null;k(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",RuntimeException);g(c$,function(a){r(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");g(c$,function(a,b){r(this,java.lang.reflect.UndeclaredThrowableException,[b]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S"); +c(c$,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});d(c$,"getCause",function(){return this.undeclaredThrowable});c$=t(java.io,"IOException",Exception);c$=t(java.io,"CharConversionException",java.io.IOException);c$=t(java.io,"EOFException",java.io.IOException);c$=t(java.io,"FileNotFoundException",java.io.IOException);c$=q(function(){this.bytesTransferred=0;k(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=t(java.io,"ObjectStreamException",java.io.IOException); +c$=q(function(){this.classname=null;k(this,arguments)},java.io,"InvalidClassException",java.io.ObjectStreamException);g(c$,function(a,b){r(this,java.io.InvalidClassException,[b]);this.classname=a},"~S,~S");c(c$,"getMessage",function(){var a=u(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(a=this.classname+"; "+a);return a});c$=t(java.io,"InvalidObjectException",java.io.ObjectStreamException);c$=t(java.io,"NotActiveException",java.io.ObjectStreamException);c$=t(java.io, +"NotSerializableException",java.io.ObjectStreamException);c$=q(function(){this.eof=!1;this.length=0;k(this,arguments)},java.io,"OptionalDataException",java.io.ObjectStreamException);c$=t(java.io,"StreamCorruptedException",java.io.ObjectStreamException);c$=t(java.io,"SyncFailedException",java.io.IOException);c$=t(java.io,"UnsupportedEncodingException",java.io.IOException);c$=t(java.io,"UTFDataFormatException",java.io.IOException);c$=q(function(){this.detail=null;k(this,arguments)},java.io,"WriteAbortedException", +java.io.ObjectStreamException);g(c$,function(a,b){r(this,java.io.WriteAbortedException,[a]);this.detail=b;this.initCause(b)},"~S,Exception");c(c$,"getMessage",function(){var a=u(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?a+"; "+this.detail.toString():a});d(c$,"getCause",function(){return this.detail});c$=t(b,"ConcurrentModificationException",RuntimeException);g(c$,function(){r(this,b.ConcurrentModificationException,[])});c$=t(b,"EmptyStackException",RuntimeException);c$= +q(function(){this.key=this.className=null;k(this,arguments)},b,"MissingResourceException",RuntimeException);g(c$,function(a,e,c){r(this,b.MissingResourceException,[a]);this.className=e;this.key=c},"~S,~S,~S");c(c$,"getClassName",function(){return this.className});c(c$,"getKey",function(){return this.key});c$=t(b,"NoSuchElementException",RuntimeException);c$=t(b,"TooManyListenersException",Exception);c$=t(java.lang,"Void");x(c$,"TYPE",null);java.lang.Void.TYPE=java.lang.Void;y(java.lang.reflect,"GenericDeclaration"); +y(java.lang.reflect,"AnnotatedElement");c$=t(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);g(c$,function(){});c(c$,"isAccessible",function(){return!1});c$.setAccessible=c(c$,"setAccessible",function(){},"~A,~B");c(c$,"setAccessible",function(){},"~B");d(c$,"isAnnotationPresent",function(){return!1},"Class");d(c$,"getDeclaredAnnotations",function(){return[]});d(c$,"getAnnotations",function(){return[]});d(c$,"getAnnotation",function(){return null},"Class");c$.marshallArguments= +c(c$,"marshallArguments",function(){return null},"~A,~A");c(c$,"invokeV",function(){},"~O,~A");c(c$,"invokeL",function(){return null},"~O,~A");c(c$,"invokeI",function(){return 0},"~O,~A");c(c$,"invokeJ",function(){return 0},"~O,~A");c(c$,"invokeF",function(){return 0},"~O,~A");c(c$,"invokeD",function(){return 0},"~O,~A");c$.emptyArgs=c$.prototype.emptyArgs=[];y(java.lang.reflect,"InvocationHandler");c$=y(java.lang.reflect,"Member");x(c$,"PUBLIC",0,"DECLARED",1);c$=t(java.lang.reflect,"Modifier"); +g(c$,function(){});c$.isAbstract=c(c$,"isAbstract",function(a){return 0!=(a&1024)},"~N");c$.isFinal=c(c$,"isFinal",function(a){return 0!=(a&16)},"~N");c$.isInterface=c(c$,"isInterface",function(a){return 0!=(a&512)},"~N");c$.isNative=c(c$,"isNative",function(a){return 0!=(a&256)},"~N");c$.isPrivate=c(c$,"isPrivate",function(a){return 0!=(a&2)},"~N");c$.isProtected=c(c$,"isProtected",function(a){return 0!=(a&4)},"~N");c$.isPublic=c(c$,"isPublic",function(a){return 0!=(a&1)},"~N");c$.isStatic=c(c$, +"isStatic",function(a){return 0!=(a&8)},"~N");c$.isStrict=c(c$,"isStrict",function(a){return 0!=(a&2048)},"~N");c$.isSynchronized=c(c$,"isSynchronized",function(a){return 0!=(a&32)},"~N");c$.isTransient=c(c$,"isTransient",function(a){return 0!=(a&128)},"~N");c$.isVolatile=c(c$,"isVolatile",function(a){return 0!=(a&64)},"~N");c$.toString=c(c$,"toString",function(a){var b=[];java.lang.reflect.Modifier.isPublic(a)&&(b[b.length]="public");java.lang.reflect.Modifier.isProtected(a)&&(b[b.length]="protected"); +java.lang.reflect.Modifier.isPrivate(a)&&(b[b.length]="private");java.lang.reflect.Modifier.isAbstract(a)&&(b[b.length]="abstract");java.lang.reflect.Modifier.isStatic(a)&&(b[b.length]="static");java.lang.reflect.Modifier.isFinal(a)&&(b[b.length]="final");java.lang.reflect.Modifier.isTransient(a)&&(b[b.length]="transient");java.lang.reflect.Modifier.isVolatile(a)&&(b[b.length]="volatile");java.lang.reflect.Modifier.isSynchronized(a)&&(b[b.length]="synchronized");java.lang.reflect.Modifier.isNative(a)&& +(b[b.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(b[b.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(b[b.length]="interface");return 0a)throw new IllegalArgumentException("negative width");if(0!=b&&1!=b&&2!=b)throw new IllegalArgumentException("illegal end cap value");if(0==e){if(1>c)throw new IllegalArgumentException("miter limit < 1");}else if(1!=e&&2!=e)throw new IllegalArgumentException("illegal line join value");if(null!=f){if(0>l)throw new IllegalArgumentException("negative dash phase");for(var d= +!0,s=0;sg)throw new IllegalArgumentException("negative dash length");}if(d)throw new IllegalArgumentException("dash lengths all zero");}this.width=a;this.cap=b;this.join=e;this.miterlimit=c;null!=f&&(this.dash=f.clone());this.dash_phase=l},"~N,~N,~N,~N,~A,~N");g(c$,function(a,b,e,c){this.construct(a,b,e,c,null,0)},"~N,~N,~N,~N");g(c$,function(a,b,e){this.construct(a,b,e,10,null,0)},"~N,~N,~N");g(c$,function(a){this.construct(a,2,0,10,null,0)},"~N"); +g(c$,function(){this.construct(1,2,0,10,null,0)});d(c$,"createStrokedShape",function(a){return a},"java.awt.Shape");c(c$,"getLineWidth",function(){return this.width});c(c$,"getEndCap",function(){return this.cap});c(c$,"getLineJoin",function(){return this.join});c(c$,"getMiterLimit",function(){return this.miterlimit});c(c$,"getDashArray",function(){return null==this.dash?null:this.dash.clone()});c(c$,"getDashPhase",function(){return this.dash_phase});d(c$,"hashCode",function(){var a=Float.floatToIntBits(this.width), +a=31*a+this.join,a=31*a+this.cap,a=31*a+Float.floatToIntBits(this.miterlimit);if(null!=this.dash)for(var a=31*a+Float.floatToIntBits(this.dash_phase),b=0;b=c.length&&(c=JU.AU.ensureLengthByte(c,2*l)),System.arraycopy(e,0,c,l-f,f)):b.write(e,0,f);a.close();return null==b?JU.AU.arrayCopyByte(c,l):l+" bytes"},"java.io.BufferedInputStream,JU.OC");c$.getBufferedReader=c(c$,"getBufferedReader",function(a,b){if(JU.Rdr.getUTFEncodingForStream(a)===JU.Encoding.NONE)return new java.io.BufferedReader(new java.io.InputStreamReader(a,null==b?"UTF-8":b));var e= +JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return JU.Rdr.getBR(null==b?JU.Rdr.fixUTF(e):String.instantialize(e,b))},"java.io.BufferedInputStream,~S");c$.getLimitedStreamBytes=c(c$,"getLimitedStreamBytes",function(a,b){var e=0b?b:1024,c=L(e,0),f=L(0>b?4096:b,0),l=0,d=0;for(0>b&&(b=2147483647);df.length&&(f=JU.AU.ensureLengthByte(f,2*d)),System.arraycopy(c,0,f,d-l,l),2147483647!=b&&d+e>f.length&&(e=f.length-d);if(d==f.length)return f;c=L(d,0);System.arraycopy(f, +0,c,0,d);return c},"java.io.InputStream,~N");c$.StreamToUTF8String=c(c$,"StreamToUTF8String",function(a){var b=Array(1);try{JU.Rdr.readAllAsString(JU.Rdr.getBufferedReader(a,"UTF-8"),-1,!0,b,0)}catch(e){if(!z(e,java.io.IOException))throw e;}return b[0]},"java.io.BufferedInputStream");c$.readAllAsString=c(c$,"readAllAsString",function(a,b,e,c,f){try{var l=JU.SB.newN(8192),d;if(0>b){if(d=a.readLine(),e||null!=d&&0>d.indexOf("\x00")&&(4!=d.length||65533!=d.charCodeAt(0)||1!=d.indexOf("PNG")))for(l.append(d).appendC("\n");null!= +(d=a.readLine());)l.append(d).appendC("\n")}else{e=0;for(var s;eb?a:a.substring(0,b)},"~S")});p("javajs.api");y(javajs.api,"GenericLineReader");n(["java.io.FilterInputStream"],"java.io.BufferedInputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException"], +function(){c$=q(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=0;k(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);c(c$,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");return a});c(c$,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a});d(c$,"resetStream",function(){});g(c$,function(a){r(this,java.io.BufferedInputStream,[a]);this.buf=L(8192, +0)},"java.io.InputStream");c(c$,"fill",function(){var a=this.getBufIfOpen();if(0>this.markpos)this.pos=0;else if(this.pos>=a.length)if(0=this.marklimit?(this.markpos=-1,this.pos=0):(b=2*this.pos,b>this.marklimit&&(b=this.marklimit),b=L(b,0),System.arraycopy(a,0,b,0,this.pos),a=this.buf=b);this.count=this.pos;a=this.getInIfOpen().read(a,this.pos,a.length-this.pos);0=this.count&&(this.fill(),this.pos>=this.count)?-1:this.getBufIfOpen()[this.pos++]&255});c(c$,"read1",function(a,b,e){var c=this.count-this.pos;if(0>=c){if(e>=this.getBufIfOpen().length&&0>this.markpos)return this.getInIfOpen().read(a,b,e);this.fill();c=this.count-this.pos;if(0>=c)return-1}e=c(b|e|b+e|a.length-(b+e)))throw new IndexOutOfBoundsException;if(0==e)return 0;for(var c=0;;){var f=this.read1(a,b+c,e-c);if(0>=f)return 0==c?f:c;c+=f;if(c>=e)return c;f=this.$in;if(null!=f&&0>=f.available())return c}},"~A,~N,~N");d(c$,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var b=this.count-this.pos;if(0>=b){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();b=this.count-this.pos;if(0>=b)return 0}a=b2147483647-b?2147483647:a+b});d(c$,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");d(c$,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});d(c$,"markSupported",function(){return!0});d(c$,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()});x(c$,"DEFAULT_BUFFER_SIZE",8192)});n(["java.io.InputStream"], +"java.io.FilterInputStream",null,function(){c$=q(function(){this.$in=null;k(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);g(c$,function(a){r(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");c(c$,"readByteAsInt",function(){return this.$in.readByteAsInt()});c(c$,"read",function(a,b,e){1==arguments.length&&(b=0,e=a.length);return this.$in.read(a,b,e)},"~A,~N,~N");c(c$,"skip",function(a){return this.$in.skip(a)},"~N");c(c$,"available",function(){return this.$in.available()}); +c(c$,"close",function(){this.$in.close()});c(c$,"mark",function(a){this.$in.mark(a)},"~N");c(c$,"reset",function(){this.$in.reset()});c(c$,"markSupported",function(){return this.$in.markSupported()})});n(null,"java.io.InputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=t(java.io,"InputStream");c(c$,"read",function(a,b,e){if(null==a)throw new NullPointerException;1==arguments.length&&(b=0,e=a.length);if(0>b||0>e||e>a.length-b)throw new IndexOutOfBoundsException; +if(0==e)return 0;var c=this.readByteAsInt();if(-1==c)return-1;a[b]=c;var f=1;try{for(;f=a)return 0;for(;0e)break;b-=e}return a-b},"~N");c(c$,"available",function(){return 0}); +c(c$,"close",function(){});c(c$,"mark",function(){},"~N");c(c$,"reset",function(){throw new java.io.IOException("mark/reset not supported");});c(c$,"markSupported",function(){return!1});c(c$,"resetStream",function(){});x(c$,"SKIP_BUFFER_SIZE",2048,"skipBuffer",null)});n(["java.io.Reader"],"java.io.BufferedReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","JU.SB"],function(){c$=q(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar= +-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;k(this,arguments)},java.io,"BufferedReader",java.io.Reader);c(c$,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=Q(a,"\x00");this.nextChar=this.nChars=0},"~N");g(c$,function(a){r(this,java.io.BufferedReader,[a]);this.$in=a;this.setSize(8192)},"java.io.Reader");c(c$,"ensureOpen",function(){if(null==this.$in)throw new java.io.IOException("Stream closed");});c(c$,"fill",function(){var a;if(-1>=this.markedChar)a= +0;else{var b=this.nextChar-this.markedChar;b>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,b):(a=Q(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,b),this.cb=a),this.markedChar=0,this.nextChar=this.nChars=a=b)}do b=this.$in.read(this.cb,a,this.cb.length-a);while(0==b);0=this.nChars){if(e>= +this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,b,e);this.fill()}if(this.nextChar>=this.nChars||this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&(this.nextChar++,this.nextChar>=this.nChars&&this.fill(),this.nextChar>=this.nChars)))return-1;e=Math.min(e,this.nChars-this.nextChar);System.arraycopy(this.cb,this.nextChar,a,b,e);this.nextChar+=e;return e},"~A,~N,~N");c(c$,"read",function(a,b,e){this.ensureOpen();if(0>b||b>a.length||0>e||b+e>a.length||0>b+e)throw new IndexOutOfBoundsException; +if(0==e)return 0;var c=this.read1(a,b,e);if(0>=c)return c;for(;c=f)break;c+=f}return c},"~A,~N,~N");c(c$,"readLine1",function(a){var b=null,e;this.ensureOpen();for(var c=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)return null!=b&&0a)throw new IllegalArgumentException("skip value is negative");this.ensureOpen();for(var b=a;0=this.nChars&&this.fill(); +if(this.nextChar>=this.nChars)break;this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&this.nextChar++);var e=this.nChars-this.nextChar;if(b<=e){this.nextChar+=b;b=0;break}b-=e;this.nextChar=this.nChars}return a-b},"~N");c(c$,"ready",function(){this.ensureOpen();this.skipLF&&(this.nextChar>=this.nChars&&this.$in.ready()&&this.fill(),this.nextChara)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.readAheadLimit=a;this.markedChar=this.nextChar;this.markedSkipLF=this.skipLF},"~N");d(c$,"reset",function(){this.ensureOpen();if(0>this.markedChar)throw new java.io.IOException(-2==this.markedChar?"Mark invalid":"Stream not marked");this.nextChar=this.markedChar;this.skipLF=this.markedSkipLF});c(c$,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in= +null)});x(c$,"INVALIDATED",-2,"UNMARKED",-1,"DEFAULT_CHAR_BUFFER_SIZE",8192,"DEFAULT_EXPECTED_LINE_LENGTH",80)});n(["java.io.InputStream"],"java.io.ByteArrayInputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=q(function(){this.buf=null;this.count=this.$mark=this.pos=0;k(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);g(c$,function(a){r(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},"~A");d(c$,"readByteAsInt", +function(){return this.posb||0>e||e>a.length-b)throw new IndexOutOfBoundsException;if(this.pos>=this.count)return-1;var c=this.count-this.pos;e>c&&(e=c);if(0>=e)return 0;System.arraycopy(this.buf,this.pos,a,b,e);this.pos+=e;return e},"~A,~N,~N");d(c$,"skip",function(a){var b=this.count-this.pos;aa?0:a);this.pos+=b;return b},"~N");d(c$, +"available",function(){return this.count-this.pos});d(c$,"markSupported",function(){return!0});d(c$,"mark",function(){this.$mark=this.pos},"~N");d(c$,"resetStream",function(){});d(c$,"reset",function(){this.pos=this.$mark});d(c$,"close",function(){})});n(["java.io.Closeable"],"java.io.Reader",["java.io.IOException","java.lang.IllegalArgumentException","$.NullPointerException"],function(){c$=q(function(){this.skipBuffer=this.lock=null;k(this,arguments)},java.io,"Reader",null,java.io.Closeable);g(c$, +function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");c(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");var b=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.lengthb||b>a.length||0>e||b+e>a.length||0>b+e)throw new IndexOutOfBoundsException;if(0==e)return 0;if(this.next>=this.length)return-1;e=Math.min(this.length-this.next,e);this.str.getChars(this.next,this.next+e,a,b);this.next+=e;return e},"~A,~N,~N");d(c$,"skip",function(a){this.ensureOpen();if(this.next>=this.length)return 0;a=Math.min(this.length-this.next,a);a=Math.max(-this.next, +a);this.next+=a;return a},"~N");d(c$,"ready",function(){this.ensureOpen();return!0});d(c$,"markSupported",function(){return!0});d(c$,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.$mark=this.next},"~N");d(c$,"reset",function(){this.ensureOpen();this.next=this.$mark});d(c$,"close",function(){this.str=null})});p("JU");n(null,"JU.Base64",["JU.SB"],function(){c$=t(JU,"Base64");c$.getBytes64=c(c$,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0, +-1)},"~A");c$.getBase64=c(c$,"getBase64",function(a){var b=a.length,e=new JU.SB;if(0==b)return e;for(var c=0,f=0;c>18&63));e.appendC(JU.Base64.base64.charAt(l>>12&63));e.appendC(2==f?"=":JU.Base64.base64.charAt(l>>6&63));e.appendC(1<=f?"=":JU.Base64.base64.charAt(l&63))}return e},"~A");c$.decodeBase64=c(c$,"decodeBase64",function(a){var b= +0,e,c=a.indexOf(";base64,")+1;0=c;)b+=65==(e=a[l].charCodeAt(0)&127)||0>2,d=L(b,0),s=18,l=c,g=c=0;ls&&(d[c++]=(g&16711680)>>16,c>8),cthis.array.length-b&&this.growAtEnd(b);a=a.iterator();for(b=this.lastIndex+b;this.lastIndex=a;)this.array[e]=null},"~N,~N");c(c$,"clone",function(){try{var a=u(this,java.util.ArrayList,"clone",[]);a.array=this.array.clone();return a}catch(b){if(j(b,CloneNotSupportedException))return null;throw b;}});d(c$,"contains",function(a){if(null!=a)for(var b=this.firstIndex;b=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,0e&&(e=a);12>e&&(e=12);a=this.newElementArray(b+e);0=a)a=this.array.length-b,0a?a:this.firstIndex+b)),this.firstIndex=a,this.lastIndex=this.array.length;else{var e=Math.floor(b/2);a>e&&(e=a);12>e&&(e=12);a=this.newElementArray(b+e);0c&&(c=b);12>c&&(c=12);var f=this.newElementArray(e+c);if(a=this.firstIndex;b--){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=this.lastIndex-1;b>=this.firstIndex;b--)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");d(c$,"remove",function(a){if(0+a!=a)return this.removeObject(a);var b,e=this.size();if(0<=a&& +aa?null:this.remove(a)},"~O");d(c$,"removeRange",function(a,b){if(0<=a&&a<=b&&b<=this.size()){if(a!=b){var e=this.size();b==e?(this.fill(this.firstIndex+a,this.lastIndex),this.lastIndex=this.firstIndex+a):0==a?(this.fill(this.firstIndex,this.firstIndex+b),this.firstIndex+=b):(System.arraycopy(this.array,this.firstIndex+b,this.array,this.firstIndex+a,e-b),e=this.lastIndex+a-b,this.fill(e,this.lastIndex),this.lastIndex=e);this.modCount++}}else throw new IndexOutOfBoundsException; +},"~N,~N");d(c$,"set",function(a,b){if(0<=a&&aa.length)a=Array(b);System.arraycopy(this.array,this.firstIndex,a,0,b);b=this.start});c(c$,"next",function(){if(this.iterator.nextIndex()=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});c(c$,"previousIndex",function(){var a=this.iterator.previousIndex(); +return a>=this.start?a-this.start:-1});c(c$,"remove",function(){this.iterator.remove();this.subList.sizeChanged(!1);this.end--});c(c$,"set",function(a){this.iterator.set(a)},"~O");c$=v();c$=v()});n(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){c$=t(java.util,"AbstractCollection",null,java.util.Collection);g(c$,function(){});d(c$,"add",function(){throw new UnsupportedOperationException;},"~O"); +d(c$,"addAll",function(a){var b=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(b=!0);return b},"java.util.Collection");d(c$,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});d(c$,"contains",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return!0}else for(;b.hasNext();)if(null==b.next())return!0;return!1},"~O");d(c$,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection"); +d(c$,"isEmpty",function(){return 0==this.size()});d(c$,"remove",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.remove(),!0}else for(;b.hasNext();)if(null==b.next())return b.remove(),!0;return!1},"~O");d(c$,"removeAll",function(a){for(var b=!1,e=this.iterator();e.hasNext();)a.contains(e.next())&&(e.remove(),b=!0);return b},"java.util.Collection");d(c$,"retainAll",function(a){for(var b=!1,e=this.iterator();e.hasNext();)a.contains(e.next())||(e.remove(), +b=!0);return b},"java.util.Collection");c(c$,"toArray",function(){for(var a=this.size(),b=0,e=this.iterator(),c=Array(a);ba.size()?11:2*a.size());u(this,java.util.HashMap,"putAll",[a])},"java.util.Map");d(c$,"clear",function(){0this.threshold&&(this.rehash(),e=null==a?0:(a.hashCode()&2147483647)%this.elementData.length),this.createEntry(a,e,b),null;e=c.value;c.value=b;return e},"~O,~O");c(c$,"createEntry",function(a,b,e){a= +new java.util.HashMap.Entry(a,e);a.next=this.elementData[b];return this.elementData[b]=a},"~O,~N,~O");c(c$,"putAll",function(a){if(!a.isEmpty()){var b=this.elementCount+a.size();b>this.threshold&&this.rehash(b);this.putAllHM(a)}},"java.util.Map");c(c$,"rehash",function(a){a=0==a?1:a<<1;for(var b=this.newElementArray(a),e=0;ea)throw new NegativeArraySizeException; +this.value=B(a,"\x00")},"~N");g(c$,function(a){this.count=a.length;this.shared=!1;this.value=B(this.count+16,"\x00");a.getChars(0,this.count,this.value,0)},"~S");c(c$,"enlargeBuffer",($fz=function(a){var b=(this.value.length<<1)+2;a=B(a>b?a:b,"\x00");System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1},$fz.isPrivate=!0,$fz),"~N");c(c$,"appendNull",function(){var a=this.count+4;a>this.value.length?this.enlargeBuffer(a):this.shared&&(this.value=this.value.clone(),this.shared=!1); +this.value[this.count++]="n";this.value[this.count++]="u";this.value[this.count++]="l";this.value[this.count++]="l"});c(c$,"append0",function(a){var b=this.count+a.length;b>this.value.length?this.enlargeBuffer(b):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,0,this.value,this.count,a.length);this.count=b},"~A");c(c$,"append0",function(a,b,e){if(null==a)throw new NullPointerException;if(0<=b&&0<=e&&e<=a.length-b){var c=this.count+e;c>this.value.length?this.enlargeBuffer(c): +this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,b,this.value,this.count,e);this.count=c}else throw new ArrayIndexOutOfBoundsException;},"~A,~N,~N");c(c$,"append0",function(a){this.count==this.value.length&&this.enlargeBuffer(this.count+1);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[this.count++]=a},"~N");c(c$,"append0",function(a){if(null==a)this.appendNull();else{var b=a.length,e=this.count+b;e>this.value.length?this.enlargeBuffer(e):this.shared&& +(this.value=this.value.clone(),this.shared=!1);a.getChars(0,b,this.value,this.count);this.count=e}},"~S");c(c$,"append0",function(a,b,e){null==a&&(a="null");if(0>b||0>e||b>e||e>a.length())throw new IndexOutOfBoundsException;this.append0(a.subSequence(b,e).toString())},"CharSequence,~N,~N");c(c$,"capacity",function(){return this.value.length});c(c$,"charAt",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);return this.value[a]},"~N");c(c$,"delete0",function(a,b){if(0<= +a){b>this.count&&(b=this.count);if(b==a)return;if(b>a){var e=this.count-b;if(0a||a>=this.count)throw new StringIndexOutOfBoundsException(a);var b=this.count-a-1;if(0this.value.length&&this.enlargeBuffer(a)},"~N");c(c$,"getChars",function(a,b,e,c){if(a>this.count||b>this.count||a>b)throw new StringIndexOutOfBoundsException;System.arraycopy(this.value,a,e,c,b-a)},"~N,~N,~A,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new StringIndexOutOfBoundsException(a); +0!=b.length&&(this.move(b.length,a),System.arraycopy(b,0,this.value,a,b.length),this.count+=b.length)},"~N,~A");c(c$,"insert0",function(a,b,e,c){if(0<=a&&a<=this.count){if(0<=e&&0<=c&&c<=b.length-e){0!=c&&(this.move(c,a),System.arraycopy(b,e,this.value,a,c),this.count+=c);return}throw new StringIndexOutOfBoundsException("offset "+e+", len "+c+", array.length "+b.length);}throw new StringIndexOutOfBoundsException(a);},"~N,~A,~N,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new ArrayIndexOutOfBoundsException(a); +this.move(1,a);this.value[a]=b;this.count++},"~N,~N");c(c$,"insert0",function(a,b){if(0<=a&&a<=this.count){null==b&&(b="null");var e=b.length;0!=e&&(this.move(e,a),b.getChars(0,e,this.value,a),this.count+=e)}else throw new StringIndexOutOfBoundsException(a);},"~N,~S");c(c$,"insert0",function(a,b,e,c){null==b&&(b="null");if(0>a||a>this.count||0>e||0>c||e>c||c>b.length())throw new IndexOutOfBoundsException;this.insert0(a,b.subSequence(e,c).toString())},"~N,CharSequence,~N,~N");c(c$,"length",function(){return this.count}); +c(c$,"move",($fz=function(a,b){var e;if(this.value.length-this.count>=a){if(!this.shared){System.arraycopy(this.value,b,this.value,b+a,this.count-b);return}e=this.value.length}else{e=this.count+a;var c=(this.value.length<<1)+2;e=e>c?e:c}e=B(e,"\x00");System.arraycopy(this.value,0,e,0,b);System.arraycopy(this.value,b,e,b+a,this.count-b);this.value=e;this.shared=!1},$fz.isPrivate=!0,$fz),"~N,~N");c(c$,"replace0",function(a,b,e){if(0<=a){b>this.count&&(b=this.count);if(b>a){var c=e.length,f=b-a-c;if(0< +f)if(this.shared){var l=B(this.value.length,"\x00");System.arraycopy(this.value,0,l,0,a);System.arraycopy(this.value,b,l,a+c,this.count-b);this.value=l;this.shared=!1}else System.arraycopy(this.value,b,this.value,a+c,this.count-b);else 0>f?this.move(-f,b):this.shared&&(this.value=this.value.clone(),this.shared=!1);e.getChars(0,c,this.value,a);this.count-=f;return}if(a==b){if(null==e)throw new NullPointerException;this.insert0(a,e);return}}throw new StringIndexOutOfBoundsException;},"~N,~N,~S");c(c$, +"reverse0",function(){if(!(2>this.count))if(this.shared){for(var a=B(this.value.length,"\x00"),b=0,e=this.count;ba||a>=this.count)throw new StringIndexOutOfBoundsException(a);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[a]=b},"~N,~N");c(c$, +"setLength",function(a){if(0>a)throw new StringIndexOutOfBoundsException(a);if(this.countthis.value.length)this.enlargeBuffer(a);else if(this.shared){var b=B(this.value.length,"\x00");System.arraycopy(this.value,0,b,0,this.count);this.value=b;this.shared=!1}else for(b=this.count;b>1)return String.instantialize(this.value,0,this.count);this.shared=!0;return String.instantialize(0,this.count,this.value)});c(c$,"subSequence",function(a,b){return this.substring(a,b)},"~N,~N");c(c$, +"indexOf",function(a){return this.indexOf(a,0)},"~S");c(c$,"indexOf",function(a,b){0>b&&(b=0);var e=a.length;if(0this.count)return-1;for(var c=a.charAt(0);;){for(var f=b,l=!1;fthis.count)return-1;for(var l=f,d=0;++dthis.count-e&&(b=this.count-e);for(var c=a.charAt(0);;){for(var f=b,l=!1;0<=f;--f)if(this.value[f].charCodeAt(0)==c.charCodeAt(0)){l=!0;break}if(!l)return-1;for(var l=f,d=0;++dc)throw new IllegalArgumentException(b+" > "+e);if(a.slice)return a.slice(b,e);e=H(c,0);for(var f=0;fe)throw new IllegalArgumentException("fromIndex("+b+") > toIndex("+e+")");if(0>b)throw new ArrayIndexOutOfBoundsException(b); +if(e>a)throw new ArrayIndexOutOfBoundsException(e);},$fz.isPrivate=!0,$fz),"~N,~N,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var e=0,c=a.length-1;e<=c;){var f=e+c>>1,l=a[f];if(lb)c=f-1;else return f}return-(e+1)},"~A,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var e=0,c=a.length-1;e<=c;){var f=e+c>>1,l=a[f].compareTo(b);if(0>l)e=f+1;else if(0>1,d=e.compare(a[l],b);if(0>d)c=l+1;else if(0a||13a||13=a):!1},"~O");c$=v();x(c$,"NUM_KEYS",9,"VALS_PER_KEY",8,"INTKEY_RENDERING",0,"INTVAL_RENDER_DEFAULT",0,"INTVAL_RENDER_SPEED",1,"INTVAL_RENDER_QUALITY",2,"INTKEY_ANTIALIASING",1,"INTVAL_ANTIALIAS_DEFAULT",0,"INTVAL_ANTIALIAS_OFF",1,"INTVAL_ANTIALIAS_ON",2,"INTKEY_TEXT_ANTIALIASING",2,"INTVAL_TEXT_ANTIALIAS_DEFAULT", +0,"INTVAL_TEXT_ANTIALIAS_OFF",1,"INTVAL_TEXT_ANTIALIAS_ON",2,"INTVAL_TEXT_ANTIALIAS_GASP",3,"INTVAL_TEXT_ANTIALIAS_LCD_HRGB",4,"INTVAL_TEXT_ANTIALIAS_LCD_HBGR",5,"INTVAL_TEXT_ANTIALIAS_LCD_VRGB",6,"INTVAL_TEXT_ANTIALIAS_LCD_VBGR",7,"INTKEY_FRACTIONALMETRICS",3,"INTVAL_FRACTIONALMETRICS_DEFAULT",0,"INTVAL_FRACTIONALMETRICS_OFF",1,"INTVAL_FRACTIONALMETRICS_ON",2,"INTKEY_DITHERING",4,"INTVAL_DITHER_DEFAULT",0,"INTVAL_DITHER_DISABLE",1,"INTVAL_DITHER_ENABLE",2,"INTKEY_INTERPOLATION",5,"INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", +0,"INTVAL_INTERPOLATION_BILINEAR",1,"INTVAL_INTERPOLATION_BICUBIC",2,"INTKEY_ALPHA_INTERPOLATION",6,"INTVAL_ALPHA_INTERPOLATION_DEFAULT",0,"INTVAL_ALPHA_INTERPOLATION_SPEED",1,"INTVAL_ALPHA_INTERPOLATION_QUALITY",2,"INTKEY_COLOR_RENDERING",7,"INTVAL_COLOR_RENDER_DEFAULT",0,"INTVAL_COLOR_RENDER_SPEED",1,"INTVAL_COLOR_RENDER_QUALITY",2,"INTKEY_STROKE_CONTROL",8,"INTVAL_STROKE_DEFAULT",0,"INTVAL_STROKE_NORMALIZE",1,"INTVAL_STROKE_PURE",2,"INTKEY_AATEXT_LCD_CONTRAST",100);c$.KEY_RENDERING=c$.prototype.KEY_RENDERING= +new java.awt.RenderingHints.SunKey(0,"Global rendering quality key");c$.VALUE_RENDER_SPEED=c$.prototype.VALUE_RENDER_SPEED=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_RENDERING,1,"Fastest rendering methods");c$.VALUE_RENDER_QUALITY=c$.prototype.VALUE_RENDER_QUALITY=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_RENDERING,2,"Highest quality rendering methods");c$.VALUE_RENDER_DEFAULT=c$.prototype.VALUE_RENDER_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_RENDERING, +0,"Default rendering methods");c$.KEY_ANTIALIASING=c$.prototype.KEY_ANTIALIASING=new java.awt.RenderingHints.SunKey(1,"Global antialiasing enable key");c$.VALUE_ANTIALIAS_ON=c$.prototype.VALUE_ANTIALIAS_ON=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_ANTIALIASING,2,"Antialiased rendering mode");c$.VALUE_ANTIALIAS_OFF=c$.prototype.VALUE_ANTIALIAS_OFF=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_ANTIALIASING,1,"Nonantialiased rendering mode");c$.VALUE_ANTIALIAS_DEFAULT= +c$.prototype.VALUE_ANTIALIAS_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_ANTIALIASING,0,"Default antialiasing rendering mode");c$.KEY_FRACTIONALMETRICS=c$.prototype.KEY_FRACTIONALMETRICS=new java.awt.RenderingHints.SunKey(3,"Fractional metrics enable key");c$.VALUE_FRACTIONALMETRICS_ON=c$.prototype.VALUE_FRACTIONALMETRICS_ON=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_FRACTIONALMETRICS,2,"Fractional text metrics mode");c$.VALUE_FRACTIONALMETRICS_OFF=c$.prototype.VALUE_FRACTIONALMETRICS_OFF= +new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_FRACTIONALMETRICS,1,"Integer text metrics mode");c$.VALUE_FRACTIONALMETRICS_DEFAULT=c$.prototype.VALUE_FRACTIONALMETRICS_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_FRACTIONALMETRICS,0,"Default fractional text metrics mode");c$.KEY_DITHERING=c$.prototype.KEY_DITHERING=new java.awt.RenderingHints.SunKey(4,"Dithering quality key");c$.VALUE_DITHER_ENABLE=c$.prototype.VALUE_DITHER_ENABLE=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_DITHERING, +2,"Dithered rendering mode");c$.VALUE_DITHER_DISABLE=c$.prototype.VALUE_DITHER_DISABLE=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_DITHERING,1,"Nondithered rendering mode");c$.VALUE_DITHER_DEFAULT=c$.prototype.VALUE_DITHER_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_DITHERING,0,"Default dithering mode");c$.KEY_INTERPOLATION=c$.prototype.KEY_INTERPOLATION=new java.awt.RenderingHints.SunKey(5,"Image interpolation method key");c$.VALUE_INTERPOLATION_NEAREST_NEIGHBOR= +c$.prototype.VALUE_INTERPOLATION_NEAREST_NEIGHBOR=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_INTERPOLATION,0,"Nearest Neighbor image interpolation mode");c$.VALUE_INTERPOLATION_BILINEAR=c$.prototype.VALUE_INTERPOLATION_BILINEAR=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_INTERPOLATION,1,"Bilinear image interpolation mode");c$.VALUE_INTERPOLATION_BICUBIC=c$.prototype.VALUE_INTERPOLATION_BICUBIC=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_INTERPOLATION, +2,"Bicubic image interpolation mode");c$.KEY_ALPHA_INTERPOLATION=c$.prototype.KEY_ALPHA_INTERPOLATION=new java.awt.RenderingHints.SunKey(6,"Alpha blending interpolation method key");c$.VALUE_ALPHA_INTERPOLATION_SPEED=c$.prototype.VALUE_ALPHA_INTERPOLATION_SPEED=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION,1,"Fastest alpha blending methods");c$.VALUE_ALPHA_INTERPOLATION_QUALITY=c$.prototype.VALUE_ALPHA_INTERPOLATION_QUALITY=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, +2,"Highest quality alpha blending methods");c$.VALUE_ALPHA_INTERPOLATION_DEFAULT=c$.prototype.VALUE_ALPHA_INTERPOLATION_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION,0,"Default alpha blending methods");c$.KEY_COLOR_RENDERING=c$.prototype.KEY_COLOR_RENDERING=new java.awt.RenderingHints.SunKey(7,"Color rendering quality key");c$.VALUE_COLOR_RENDER_SPEED=c$.prototype.VALUE_COLOR_RENDER_SPEED=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_COLOR_RENDERING, +1,"Fastest color rendering mode");c$.VALUE_COLOR_RENDER_QUALITY=c$.prototype.VALUE_COLOR_RENDER_QUALITY=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_COLOR_RENDERING,2,"Highest quality color rendering mode");c$.VALUE_COLOR_RENDER_DEFAULT=c$.prototype.VALUE_COLOR_RENDER_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_COLOR_RENDERING,0,"Default color rendering mode");c$.KEY_STROKE_CONTROL=c$.prototype.KEY_STROKE_CONTROL=new java.awt.RenderingHints.SunKey(8,"Stroke normalization control key"); +c$.VALUE_STROKE_DEFAULT=c$.prototype.VALUE_STROKE_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_STROKE_CONTROL,0,"Default stroke normalization");c$.VALUE_STROKE_NORMALIZE=c$.prototype.VALUE_STROKE_NORMALIZE=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_STROKE_CONTROL,1,"Normalize strokes for consistent rendering");c$.VALUE_STROKE_PURE=c$.prototype.VALUE_STROKE_PURE=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_STROKE_CONTROL,2,"Pure stroke conversion for accurate paths"); +c$.KEY_TEXT_ANTIALIASING=c$.prototype.KEY_TEXT_ANTIALIASING=new java.awt.RenderingHints.SunKey(2,"Text-specific antialiasing enable key");c$.VALUE_TEXT_ANTIALIAS_ON=c$.prototype.VALUE_TEXT_ANTIALIAS_ON=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,2,"Antialiased text mode");c$.VALUE_TEXT_ANTIALIAS_OFF=c$.prototype.VALUE_TEXT_ANTIALIAS_OFF=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,1,"Nonantialiased text mode");c$.VALUE_TEXT_ANTIALIAS_DEFAULT= +c$.prototype.VALUE_TEXT_ANTIALIAS_DEFAULT=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,0,"Default antialiasing text mode");c$.VALUE_TEXT_ANTIALIAS_GASP=c$.prototype.VALUE_TEXT_ANTIALIAS_GASP=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,3,"gasp antialiasing text mode");c$.VALUE_TEXT_ANTIALIAS_LCD_HRGB=c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HRGB=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,4,"LCD HRGB antialiasing text mode"); +c$.VALUE_TEXT_ANTIALIAS_LCD_HBGR=c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HBGR=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,5,"LCD HBGR antialiasing text mode");c$.VALUE_TEXT_ANTIALIAS_LCD_VRGB=c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VRGB=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING,6,"LCD VRGB antialiasing text mode");c$.VALUE_TEXT_ANTIALIAS_LCD_VBGR=c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VBGR=new java.awt.RenderingHints.Value(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, +7,"LCD VBGR antialiasing text mode");c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST=c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST=new java.awt.RenderingHints.LCDContrastKey(100,"Text-specific LCD contrast key");c$.KEY_TEXT_LCD_CONTRAST=c$.prototype.KEY_TEXT_LCD_CONTRAST=java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST});n("java.util.AbstractList $.AbstractMap $.AbstractSet $.Collection $.Iterator $.List $.ListIterator $.Map $.RandomAccess $.Set $.SortedMap $.SortedSet java.lang.NullPointerException $.UnsupportedOperationException java.lang.reflect.Array".split(" "), +"java.util.Collections","java.lang.ArrayIndexOutOfBoundsException $.ClassCastException $.IllegalArgumentException $.IndexOutOfBoundsException java.util.ArrayList $.Arrays $.Enumeration java.util.Map.Entry java.util.NoSuchElementException $.Random".split(" "),function(){c$=t(java.util,"Collections");c$.binarySearch=c(c$,"binarySearch",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!j(a,java.util.RandomAccess)){for(var e=a.listIterator();e.hasNext();){var c;if(0>= +(c=b.compareTo(e.next())))return 0==c?e.previousIndex():-e.previousIndex()-1}return-a.size()-1}var e=0,f=a.size(),l=f-1;for(c=-1;e<=l;)if(f=e+l>>1,0<(c=b.compareTo(a.get(f))))e=f+1;else{if(0==c)return f;l=f-1}return-f-(0>c?1:2)},"java.util.List,~O");c$.binarySearch=c(c$,"binarySearch",function(a,b,e){if(null==e)return java.util.Collections.binarySearch(a,b);if(!j(a,java.util.RandomAccess)){for(var c=a.listIterator();c.hasNext();){var f;if(0>=(f=e.compare(b,c.next())))return 0==f?c.previousIndex(): +-c.previousIndex()-1}return-a.size()-1}var c=0,l=a.size(),d=l-1;for(f=-1;c<=d;)if(l=c+d>>1,0<(f=e.compare(b,a.get(l))))c=l+1;else{if(0==f)return l;d=l-1}return-l-(0>f?1:2)},"java.util.List,~O,java.util.Comparator");c$.copy=c(c$,"copy",function(a,b){if(a.size()b.compareTo(e)&&(b=e)}return b},"java.util.Collection");c$.max=c(c$,"max",function(a,b){for(var e=a.iterator(), +c=e.next();e.hasNext();){var f=e.next();0>b.compare(c,f)&&(c=f)}return c},"java.util.Collection,java.util.Comparator");c$.min=c(c$,"min",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var e=a.next();0f&&(f=-f),a.set(f,a.set(c,a.get(f)));else{for(var e=a.toArray(),c=e.length-1;0f&&(f=-f);var l=e[c];e[c]=e[f];e[f]=l}c=0;for(f=a.listIterator();f.hasNext();)f.next(),f.set(e[c++])}},"java.util.List,java.util.Random");c$.singleton=c(c$,"singleton",function(a){return new java.util.Collections.SingletonSet(a)}, +"~O");c$.singletonList=c(c$,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");c$.singletonMap=c(c$,"singletonMap",function(a,b){return new java.util.Collections.SingletonMap(a,b)},"~O,~O");c$.sort=c(c$,"sort",function(a){var b=a.toArray();java.util.Arrays.sort(b);var e=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(b[e++])},"java.util.List");c$.sort=c(c$,"sort",function(a,b){var e=a.toArray(Array(a.size()));java.util.Arrays.sort(e,b);for(var c=0,f=a.listIterator();f.hasNext();)f.next(), +f.set(e[c++])},"java.util.List,java.util.Comparator");c$.swap=c(c$,"swap",function(a,b,e){if(null==a)throw new NullPointerException;b!=e&&a.set(e,a.set(b,a.get(e)))},"java.util.List,~N,~N");c$.replaceAll=c(c$,"replaceAll",function(a,b,e){for(var c,f=!1;-1<(c=a.indexOf(b));)f=!0,a.set(c,e);return f},"java.util.List,~O,~O");c$.rotate=c(c$,"rotate",function(a,b){var e=a.size();if(0!=e){var c;c=0e)return-1;if(0==c)return 0;var f=b.get(0),l=a.indexOf(f);if(-1==l)return-1;for(;l=c;){var d=a.listIterator(l);if(null==f?null==d.next():f.equals(d.next())){for(var s=b.listIterator(1),g=!1;s.hasNext();){var j= +s.next();if(!d.hasNext())return-1;if(null==j?null!=d.next():!j.equals(d.next())){g=!0;break}}if(!g)return l}l++}return-1},"java.util.List,java.util.List");c$.lastIndexOfSubList=c(c$,"lastIndexOfSubList",function(a,b){var e=b.size(),c=a.size();if(e>c)return-1;if(0==e)return c;for(var c=b.get(e-1),f=a.lastIndexOf(c);-1=e;){var l=a.listIterator(f+1);if(null==c?null==l.previous():c.equals(l.previous())){for(var d=b.listIterator(e-1),s=!1;d.hasPrevious();){var g=d.previous();if(!l.hasPrevious())return-1; +if(null==g?null!=l.previous():!g.equals(l.previous())){s=!0;break}}if(!s)return l.nextIndex()}f--}return-1},"java.util.List,java.util.List");c$.list=c(c$,"list",function(a){for(var b=new java.util.ArrayList;a.hasMoreElements();)b.add(a.nextElement());return b},"java.util.Enumeration");c$.synchronizedCollection=c(c$,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");c$.synchronizedList=c(c$, +"synchronizedList",function(a){if(null==a)throw new NullPointerException;return j(a,java.util.RandomAccess)?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");c$.synchronizedMap=c(c$,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");c$.synchronizedSet=c(c$,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)}, +"java.util.Set");c$.synchronizedSortedMap=c(c$,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");c$.synchronizedSortedSet=c(c$,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},"java.util.SortedSet");c$.unmodifiableCollection=c(c$,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException; +return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");c$.unmodifiableList=c(c$,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return j(a,java.util.RandomAccess)?new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");c$.unmodifiableMap=c(c$,"unmodifiableMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map"); +c$.unmodifiableSet=c(c$,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");c$.unmodifiableSortedMap=c(c$,"unmodifiableSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");c$.unmodifiableSortedSet=c(c$,"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)}, +"java.util.SortedSet");c$.frequency=c(c$,"frequency",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var e=0,c=a.iterator();c.hasNext();){var f=c.next();(null==b?null==f:b.equals(f))&&e++}return e},"java.util.Collection,~O");c$.emptyList=c(c$,"emptyList",function(){return java.util.Collections.EMPTY_LIST});c$.emptySet=c(c$,"emptySet",function(){return java.util.Collections.EMPTY_SET});c$.emptyMap=c(c$,"emptyMap",function(){return java.util.Collections.EMPTY_MAP}); +c$.checkedCollection=c(c$,"checkedCollection",function(a,b){return new java.util.Collections.CheckedCollection(a,b)},"java.util.Collection,Class");c$.checkedMap=c(c$,"checkedMap",function(a,b,e){return new java.util.Collections.CheckedMap(a,b,e)},"java.util.Map,Class,Class");c$.checkedList=c(c$,"checkedList",function(a,b){return j(a,java.util.RandomAccess)?new java.util.Collections.CheckedRandomAccessList(a,b):new java.util.Collections.CheckedList(a,b)},"java.util.List,Class");c$.checkedSet=c(c$, +"checkedSet",function(a,b){return new java.util.Collections.CheckedSet(a,b)},"java.util.Set,Class");c$.checkedSortedMap=c(c$,"checkedSortedMap",function(a,b,e){return new java.util.Collections.CheckedSortedMap(a,b,e)},"java.util.SortedMap,Class,Class");c$.checkedSortedSet=c(c$,"checkedSortedSet",function(a,b){return new java.util.Collections.CheckedSortedSet(a,b)},"java.util.SortedSet,Class");c$.addAll=c(c$,"addAll",function(a,b){for(var e=!1,c=0;ca.size()){var e=a;a=b;b=e}for(e=a.iterator();e.hasNext();)if(b.contains(e.next()))return!1;return!0},"java.util.Collection,java.util.Collection");c$.checkType=c(c$,"checkType",function(a,b){if(!b.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+b);return a},"~O,Class");c$.$Collections$1$=function(a){w(self.c$); +c$=q(function(){K(this,arguments);this.it=null;k(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);I(c$,function(){this.it=a.iterator()});c(c$,"hasMoreElements",function(){return this.it.hasNext()});c(c$,"nextElement",function(){return this.it.next()});c$=v()};w(self.c$);c$=q(function(){this.n=0;this.element=null;k(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);g(c$,function(a,b){r(this,java.util.Collections.CopiesList,[]);if(0> +a)throw new IllegalArgumentException;this.n=a;this.element=b},"~N,~O");d(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");d(c$,"size",function(){return this.n});d(c$,"get",function(a){if(0<=a&&aa.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(;e>>48-a},"~N");c(c$,"nextBoolean",function(){return 0.5l;)c.S[l]=l++;for(l=0;256>l;l++)b=c.S[l],d=d+b+a[l%f]&255,e=c.S[d],c.S[l]=e,c.S[d]=b;c.g=function(a){var b=c.S,e=c.i+1&255,f=b[e],l=c.j+f&255,d=b[l];b[e]=d;b[l]=f;for(var m=b[f+d&255];--a;)e= +e+1&255,f=b[e],l=l+f&255,d=b[l],b[e]=d,b[l]=f,m=256*m+b[f+d&255];c.i=e;c.j=l;return m};c.g(256)},ka=function(a,b,e,c){e=[];if(b&&"object"==typeof a)for(c in a)if(5>c.indexOf("S"))try{e.push(ka(a[c],b-1))}catch(f){}return e.length?e:""+a},ba=function(a,b,e,c){a+="";for(c=e=0;c=ia;)a/=2,b/=2,e>>>=1;return(a+e)/b};return a};ja=T.pow(256,6);$=T.pow(2,$);ia=2*$;ba(T.random(),Z);p("java.awt.event");n(["java.util.EventListenerProxy","java.awt.event.AWTEventListener"],"java.awt.event.AWTEventListenerProxy",null,function(){c$=q(function(){this.eventMask=0;k(this,arguments)},java.awt.event,"AWTEventListenerProxy",java.util.EventListenerProxy,java.awt.event.AWTEventListener); +g(c$,function(a,b){r(this,java.awt.event.AWTEventListenerProxy,[b]);this.eventMask=a},"~N,java.awt.event.AWTEventListener");c(c$,"eventDispatched",function(a){this.getListener().eventDispatched(a)},"java.awt.AWTEvent");c(c$,"getEventMask",function(){return this.eventMask})});p("java.beans");n(["java.beans.ChangeListenerMap"],"java.beans.PropertyChangeSupport",["java.lang.Boolean","$.NullPointerException","java.beans.IndexedPropertyChangeEvent","$.PropertyChangeEvent","$.PropertyChangeListenerProxy"], +function(){c$=q(function(){this.source=this.map=null;k(this,arguments)},java.beans,"PropertyChangeSupport");I(c$,function(){this.map=new java.beans.PropertyChangeSupport.PropertyChangeListenerMap});g(c$,function(a){if(null==a)throw new NullPointerException;this.source=a},"~O");c(c$,"addPropertyChangeListener",function(a){this.addPropertyChangeListener1(a)},"java.beans.PropertyChangeListener");c(c$,"addPropertyChangeListener1",function(a){null!=a&&(j(a,java.beans.PropertyChangeListenerProxy)?this.addPropertyChangeListener(a.getPropertyName(), +a.getListener()):this.map.add(null,a))},"java.beans.PropertyChangeListener");c(c$,"removePropertyChangeListener",function(a){null!=a&&(j(a,java.beans.PropertyChangeListenerProxy)?this.removePropertyChangeListener(a.getPropertyName(),a.getListener()):this.map.remove(null,a))},"java.beans.PropertyChangeListener");c(c$,"getPropertyChangeListeners",function(){return this.map.getListeners()});c(c$,"addPropertyChangeListener",function(a,b){1==arguments.length?this.addPropertyChangeListener1(a):this.addPropertyChangeListener2(a, +b)},"~S,java.beans.PropertyChangeListener");c(c$,"addPropertyChangeListener2",function(a,b){null==b||null==a||(b=this.map.extract(b),null!=b&&this.map.add(a,b))},"~S,java.beans.PropertyChangeListener");c(c$,"removePropertyChangeListener",function(a,b){null==b||null==a||(b=this.map.extract(b),null!=b&&this.map.remove(a,b))},"~S,java.beans.PropertyChangeListener");c(c$,"getPropertyChangeListeners",function(a){return this.map.getListeners(a)},"~S");c(c$,"firePropertyChange",function(a,b,e){null!=b&& +null!=e&&b.equals(e)||this.firePropertyChangeEvt(new java.beans.PropertyChangeEvent(this.source,a,b,e))},"~S,~O,~O");c(c$,"firePropertyChange",function(a,b,e){b!=e&&this.firePropertyChange(a,Integer.$valueOf(b),Integer.$valueOf(e))},"~S,~N,~N");c(c$,"firePropertyChange",function(a,b,e){b!=e&&this.firePropertyChange(a,Boolean.$valueOf(b),Boolean.$valueOf(e))},"~S,~B,~B");c(c$,"firePropertyChangeEvt",function(a){var b=a.getOldValue(),e=a.getNewValue(),c=a.getPropertyName();null!=b&&null!=e&&b.equals(e)|| +(b=this.map.get(null),c=null!=c?this.map.get(c):null,this.fire(b,a),this.fire(c,a))},"java.beans.PropertyChangeEvent");c(c$,"fire",function(a,b){if(null!=a)for(var e,c=0;ca.size()?11:2*a.size());this.putAllImpl(a)},"java.util.Map");c(c$,"massageValue",($fz=function(a){return a===java.util.IdentityHashMap.NULL_OBJECT?null:a},$fz.isPrivate=!0,$fz),"~O");d(c$,"clear",function(){for(var a=this.$size=0;athis.threshold&&(this.rehash(),f=this.findIndex(e,this.elementData)),this.elementData[f]=e,this.elementData[f+ +1]=null);e=this.elementData[f+1];this.elementData[f+1]=c;return this.massageValue(e)},"~O,~O");d(c$,"putAll",function(a){this.putAllImpl(a)},"java.util.Map");c(c$,"rehash",($fz=function(){var a=this.elementData.length<<1;0==a&&(a=1);for(var a=this.newElementArray(a),b=0;bb;a=ea.size()?11:2*a.size()));var b;for(a=a.iterator();a.hasNext()&&((b=a.next())||1);)this.add(b)},"java.util.Collection");g(c$,function(a){r(this,java.util.HashSet,[]);this.backingMap=a},"java.util.HashMap");d(c$,"add",function(a){return null==this.backingMap.put(a, +this)},"~O");d(c$,"clear",function(){this.backingMap.clear()});c(c$,"clone",function(){try{var a=this.cloneHM();a.backingMap=this.backingMap.clone();return a}catch(b){if(j(b,CloneNotSupportedException))return null;throw b;}});d(c$,"contains",function(a){return this.backingMap.containsKey(a)},"~O");d(c$,"isEmpty",function(){return this.backingMap.isEmpty()});c(c$,"iterator",function(){return this.backingMap.keySet().iterator()});d(c$,"remove",function(a){return null!=this.backingMap.remove(a)},"~O"); +d(c$,"size",function(){return this.backingMap.size()});c(c$,"createBackingMap",function(a,b){return new java.util.HashMap(a,b)},"~N,~N")});p("jssun.awt");y(jssun.awt,"ComponentFactory");p("jssun.awt");y(jssun.awt,"WindowClosingListener");p("jssun.awt");y(jssun.awt,"WindowClosingSupport");p("java.awt");n(["java.awt.Container","java.util.ArrayList","$.Vector","java.awt.Color"],["java.awt.Window","$.FocusManager"],"java.lang.IllegalArgumentException java.util.Arrays java.applet.Applet java.awt.AWTEventMulticaster $.BorderLayout $.ComponentOrientation $.Cursor $.GraphicsEnvironment $.Point $.Toolkit java.awt.event.WindowEvent $.WindowFocusListener $.WindowListener $.WindowStateListener java.util.Locale $.ResourceBundle javax.swing.JComponent $.RootPaneContainer jssun.awt.AppContext swingjs.JSToolkit".split(" "), +function(){c$=q(function(){this.temporaryLostComponent=this.icons=this.warningString=null;this.syncLWRequests=!1;this.beforeFirstShow=!0;this.state=0;this.alwaysOnTop=!1;this.ownedWindowList=null;this.showWithParent=!1;this.windowFocusListener=this.windowStateListener=this.windowListener=this.modalExclusionType=this.modalBlocker=null;this.focusableWindowState=!0;this.isInShow=!1;this.opacity=1;this.shape=null;this.isTrayIconWindow=!1;this.opaque=!0;k(this,arguments)},java.awt,"Window",java.awt.Container); +I(c$,function(){this.ownedWindowList=new java.util.Vector});g(c$,function(a){r(this,java.awt.Window,[]);this.init(a)},"java.awt.GraphicsConfiguration");c(c$,"init",function(){this.syncLWRequests=java.awt.Window.systemSyncLWRequests;this.addToWindowList();this.cursor=java.awt.Cursor.getPredefinedCursor(0);this.visible=!1;this.setLayout(new java.awt.BorderLayout);this.modalExclusionType=java.awt.Dialog.ModalExclusionType.NO_EXCLUDE},"java.awt.GraphicsConfiguration");g(c$,function(){r(this,java.awt.Window, +[]);this.init(null)});g(c$,function(a){r(this,java.awt.Window,[]);this.init(null==a?null:a.getGraphicsConfiguration());this.ownedInit(a)},"java.awt.Frame");g(c$,function(a){r(this,java.awt.Window,[]);this.init(null==a?null:a.getGraphicsConfiguration());this.ownedInit(a)},"java.awt.Window");g(c$,function(a,b){this.construct(b);this.ownedInit(a)},"java.awt.Window,java.awt.GraphicsConfiguration");c(c$,"ownedInit",function(a){this.parent=a;null!=a&&a.addOwnedWindow(this)},"java.awt.Window");d(c$,"constructComponentName", +function(){return"win"+java.awt.Window.nameCounter++});c(c$,"getIconImages",function(){var a=this.icons;return null==a||0==a.size()?new java.util.ArrayList:new java.util.ArrayList(a)});c(c$,"setIconImages",function(a){this.icons=null==a?new java.util.ArrayList:new java.util.ArrayList(a);this.firePropertyChangeObject("iconImage",null,null)},"java.util.List");c(c$,"setIconImage",function(a){var b=new java.util.ArrayList;null!=a&&b.add(a);this.setIconImages(b)},"java.awt.Image");c(c$,"addNotify",function(){var a= +this.parent;null!=a&&null==a.getPeer()&&a.addNotify();null==this.peer&&(this.peer=this.getToolkit().createWindow(this));java.awt.Window.allWindows.add(this);u(this,java.awt.Window,"addNotify",[])});c(c$,"removeNotify",function(){java.awt.Window.allWindows.remove(this);u(this,java.awt.Window,"removeNotify",[])});c(c$,"pack",function(){var a=this.parent;null!=a&&null==a.getPeer()&&a.addNotify();null==this.peer&&this.addNotify();a=this.getPreferredSize();null!=this.peer&&this.setClientSize(a.width,a.height); +this.beforeFirstShow&&(this.isPacked=!0);this.validate()});c(c$,"setMinimumSize",function(a){u(this,java.awt.Window,"setMinimumSize",[a]);var b=this.getSize();if(this.isMinimumSizeSet()&&(b.width>1),l=a.y+(e.height-c.height>>1),b=b.getGraphicsConfiguration().getBounds();l+c.height>b.y+b.height&&(l=b.y+b.height-c.height,f=a.x-b.x+A(e.width/2)b.x+b.width&&(f=b.x+b.width- +c.width);fa||1=this.capacityIncrement?this.elementData.length:this.capacityIncrement)+this.elementData.length;this.grow(a>b?a:b)}},"~N");d(c$,"equals",function(a){if(this===a)return!0;if(j(a,java.util.List)){if(a.size()!=this.size())return!1;var b=0;for(a=a.iterator();a.hasNext();){var e=this.elementData[b++],c=a.next();if(!(null==e?null==c:e.equals(c)))return!1}return!0}return!1},"~O");c(c$,"firstElement", +function(){if(0=this.capacityIncrement){if(0==(a=this.elementData.length))a=1}else a=this.capacityIncrement;a=this.newElementArray(this.elementData.length+ +a);System.arraycopy(this.elementData,0,a,0,this.elementCount);this.elementData=a},$fz.isPrivate=!0,$fz));c(c$,"growBy",($fz=function(a){var b=0;if(0>=this.capacityIncrement){if(0==(b=this.elementData.length))b=a;for(;ba&&java.util.Arrays.fill(this.elementData, +a,this.elementCount,null),this.elementCount=a,this.modCount++)},"~N");d(c$,"size",function(){return this.elementCount});d(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedRandomAccessList(u(this,java.util.Vector,"subList",[a,b]),this)},"~N,~N");c(c$,"toArray",function(){var a=Array(this.elementCount);System.arraycopy(this.elementData,0,a,0,this.elementCount);return a});c(c$,"toArray",function(a){this.elementCount>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a, +this.elementCount));System.arraycopy(this.elementData,0,a,0,this.elementCount);this.elementCountc||255a||255b||255< +b)f=!0,l+=" Green";if(0>e||255b?this.setFloat(a[0],a[1],a[2],1):this.setColor4(a[0],a[1],a[2],255);break;case 4:b=a[0]+a[1]+a[2]+a[3],0b?this.setFloat(a[0],a[1],a[2], +a[3]):this.setColor4(a[0],a[1],a[2],a[3])}return this});c(c$,"setColor4",function(a,b,e,c){this.value=(c&255)<<24|(a&255)<<16|(b&255)<<8|(e&255)<<0;java.awt.Color.testColorValueRange(a,b,e,c)},"~N,~N,~N,~N");c(c$,"setFloat",function(a,b,e,c){this.setColor4(A(255*a+0.5),A(255*b+0.5),A(255*e+0.5),A(255*c+0.5));this.frgbvalue=M(3,0);this.frgbvalue[0]=a;this.frgbvalue[1]=b;this.frgbvalue[2]=e;this.falpha=c},"~N,~N,~N,~N");c$.getColorF4=c(c$,"getColorF4",function(a,b,e,c){var f=new java.awt.Color;f.setFloat(a, +b,e,c);return f},"~N,~N,~N,~N");c(c$,"getRed",function(){return this.getRGB()>>16&255});c(c$,"getGreen",function(){return this.getRGB()>>8&255});c(c$,"getBlue",function(){return this.getRGB()>>0&255});c(c$,"getAlpha",function(){return this.getRGB()>>24&255});c(c$,"getRGB",function(){return this.value});c(c$,"brighter",function(){var a=this.getRed(),b=this.getGreen(),e=this.getBlue(),c=A(3.333333333333333);if(0==a&&0==b&&0==e)return new java.awt.Color(c,c,c);0>16&255,a>>8&255,a&255)},"~S");c$.getColor=c(c$,"getColor",function(a){return java.awt.Color.getColor(a,null)},"~S");c$.getColor=c(c$,"getColor",function(a,b){var e=Integer.getInteger(a);if(null==e)return b;e=e.intValue();return new java.awt.Color(e>>16&255,e>>8&255,e&255)},"~S,java.awt.Color");c$.getColor=c(c$,"getColor",function(a,b){var e=Integer.getInteger(a),e=null!=e?e.intValue(): +b;return new java.awt.Color(e>>16&255,e>>8&255,e>>0&255)},"~S,~N");c$.HSBtoRGB=c(c$,"HSBtoRGB",function(a,b,e){var c=0,f=0,l=0;if(0==b)c=f=l=E(255*e+0.5);else{a=6*(a-Math.floor(a));var d=a-java.lang.Math.floor(a),s=e*(1-b),g=e*(1-b*d);b=e*(1-b*(1-d));switch(E(a)){case 0:c=E(255*e+0.5);f=E(255*b+0.5);l=E(255*s+0.5);break;case 1:c=E(255*g+0.5);f=E(255*e+0.5);l=E(255*s+0.5);break;case 2:c=E(255*s+0.5);f=E(255*e+0.5);l=E(255*b+0.5);break;case 3:c=E(255*s+0.5);f=E(255*g+0.5);l=E(255*e+0.5);break;case 4:c= +E(255*b+0.5);f=E(255*s+0.5);l=E(255*e+0.5);break;case 5:c=E(255*e+0.5),f=E(255*s+0.5),l=E(255*g+0.5)}}return 4278190080|c<<16|f<<8|l<<0},"~N,~N,~N");c$.RGBtoHSB=c(c$,"RGBtoHSB",function(a,b,e,c){var f;null==c&&(c=M(3,0));var l=a>b?a:b;e>l&&(l=e);var d=aa&&(a+=1)}c[0]=a;c[1]=f;c[2]=l/255;return c},"~N,~N,~N,~A");c$.getHSBColor=c(c$,"getHSBColor",function(a,b,e){return new java.awt.Color(java.awt.Color.HSBtoRGB(a, +b,e))},"~N,~N,~N");c(c$,"getRGBComponents",function(a){a=null==a?M(4,0):a;null==this.frgbvalue?(a[0]=this.getRed()/255,a[1]=this.getGreen()/255,a[2]=this.getBlue()/255,a[3]=this.getAlpha()/255):(a[0]=this.frgbvalue[0],a[1]=this.frgbvalue[1],a[2]=this.frgbvalue[2],a[3]=this.falpha);return a},"~A");c(c$,"getRGBColorComponents",function(a){a=null==a?M(3,0):a;null==this.frgbvalue?(a[0]=this.getRed()/255,a[1]=this.getGreen()/255,a[2]=this.getBlue()/255):(a[0]=this.frgbvalue[0],a[1]=this.frgbvalue[1],a[2]= +this.frgbvalue[2]);return a},"~A");d(c$,"createContext",function(a){if(null==this.context||this.context.getRGB()!=this.getRGB())this.context=new java.awt.ColorPaintContext(this.getRGB(),a);return this.context},"java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints");d(c$,"getTransparency",function(){var a=this.getAlpha();return 255==a?1:0==a?2:3});c$.white=c$.prototype.white=new java.awt.Color(255,255,255);c$.WHITE=c$.prototype.WHITE= +java.awt.Color.white;c$.lightGray=c$.prototype.lightGray=new java.awt.Color(192,192,192);c$.LIGHT_GRAY=c$.prototype.LIGHT_GRAY=java.awt.Color.lightGray;c$.gray=c$.prototype.gray=new java.awt.Color(128,128,128);c$.GRAY=c$.prototype.GRAY=java.awt.Color.gray;c$.darkGray=c$.prototype.darkGray=new java.awt.Color(64,64,64);c$.DARK_GRAY=c$.prototype.DARK_GRAY=java.awt.Color.darkGray;c$.black=c$.prototype.black=new java.awt.Color(0,0,0);c$.BLACK=c$.prototype.BLACK=java.awt.Color.black;c$.red=c$.prototype.red= +new java.awt.Color(255,0,0);c$.RED=c$.prototype.RED=java.awt.Color.red;c$.pink=c$.prototype.pink=new java.awt.Color(255,175,175);c$.PINK=c$.prototype.PINK=java.awt.Color.pink;c$.orange=c$.prototype.orange=new java.awt.Color(255,200,0);c$.ORANGE=c$.prototype.ORANGE=java.awt.Color.orange;c$.yellow=c$.prototype.yellow=new java.awt.Color(255,255,0);c$.YELLOW=c$.prototype.YELLOW=java.awt.Color.yellow;c$.green=c$.prototype.green=new java.awt.Color(0,255,0);c$.GREEN=c$.prototype.GREEN=java.awt.Color.green; +c$.magenta=c$.prototype.magenta=new java.awt.Color(255,0,255);c$.MAGENTA=c$.prototype.MAGENTA=java.awt.Color.magenta;c$.cyan=c$.prototype.cyan=new java.awt.Color(0,255,255);c$.CYAN=c$.prototype.CYAN=java.awt.Color.cyan;c$.blue=c$.prototype.blue=new java.awt.Color(0,0,255);c$.BLUE=c$.prototype.BLUE=java.awt.Color.blue;x(c$,"FACTOR",0.7)});p("java.awt");n(["java.awt.Transparency"],"java.awt.Paint",null,function(){y(java.awt,"Paint",java.awt.Transparency)});p("java.awt");c$=y(java.awt,"Transparency"); +x(c$,"OPAQUE",1,"BITMASK",2,"TRANSLUCENT",3);p("java.awt");n(["java.awt.PaintContext"],"java.awt.ColorPaintContext",["java.awt.image.ColorModel"],function(){c$=q(function(){this.color=0;k(this,arguments)},java.awt,"ColorPaintContext",null,java.awt.PaintContext);g(c$,function(a){this.color=a},"~N,java.awt.image.ColorModel");d(c$,"dispose",function(){});c(c$,"getRGB",function(){return this.color});d(c$,"getColorModel",function(){return java.awt.image.ColorModel.getRGBdefault()})});p("java.awt");y(java.awt, +"PaintContext");p("java.awt.image");n(["java.awt.Transparency","java.awt.color.ColorSpace"],"java.awt.image.ColorModel",["java.lang.IllegalArgumentException","$.NullPointerException","$.UnsupportedOperationException","JU.AU"],function(){c$=q(function(){this.pixel_bits=0;this.nBits=null;this.transparency=3;this.supportsAlpha=!0;this.$isAlphaPremultiplied=!1;this.numColorComponents=this.numComponents=-1;this.colorSpace=null;this.colorSpaceType=5;this.maxBits=0;this.is_sRGB=!0;this.transferType=0;k(this, +arguments)},java.awt.image,"ColorModel",null,java.awt.Transparency);I(c$,function(){this.colorSpace=java.awt.color.ColorSpace.getInstance(1E3)});c$.getRGBdefault=c(c$,"getRGBdefault",function(){null==java.awt.image.ColorModel.RGBdefault&&(java.awt.image.ColorModel.RGBdefault=new java.awt.image.DirectColorModel(32,16711680,65280,255,4278190080));return java.awt.image.ColorModel.RGBdefault});g(c$,function(a){this.pixel_bits=a;if(1>a)throw new IllegalArgumentException("Number of bits must be > 0");this.numComponents= +4;this.numColorComponents=3;this.maxBits=a;this.transferType=java.awt.image.ColorModel.getDefaultTransferType(a)},"~N");g(c$,function(a,b,e,c,f,l,d){this.colorSpace=e;this.colorSpaceType=e.getType();this.numColorComponents=e.getNumComponents();this.numComponents=this.numColorComponents+(c?1:0);this.supportsAlpha=c;if(b.lengthl||3=a)throw new IllegalArgumentException("Number of pixel bits must be > 0");for(a=this.maxBits=0;ab[a])throw new IllegalArgumentException("Number of bits must be >= 0");this.maxBits 0 pixel bits."); +e!==java.awt.color.ColorSpace.getInstance(1E3)&&(this.is_sRGB=!1);this.transferType=d},"~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N");c(c$,"hasAlpha",function(){return this.supportsAlpha});c(c$,"isAlphaPremultiplied",function(){return this.$isAlphaPremultiplied});c(c$,"getTransferType",function(){return this.transferType});c(c$,"getPixelSize",function(){return this.pixel_bits});c(c$,"getComponentSize",function(a){if(null==this.nBits)throw new NullPointerException("Number of bits array is null."); +return this.nBits[a]},"~N");c(c$,"getComponentSize",function(){return null!=this.nBits?this.nBits.clone():null});d(c$,"getTransparency",function(){return this.transparency});c(c$,"getNumComponents",function(){return this.numComponents});c(c$,"getNumColorComponents",function(){return this.numColorComponents});c(c$,"getRGB",function(a){return this.getAlpha(a)<<24|this.getRed(a)<<16|this.getGreen(a)<<8|this.getBlue(a)<<0},"~N");c(c$,"getRed",function(a){var b=0,e=0,b=a[0],e=a.length;if(1==e)return this.getRed(b); +throw new UnsupportedOperationException("This method is not supported by this color model");},"~O");c(c$,"getGreen",function(a){var b=0,e=0,b=a[0],e=a.length;if(1==e)return this.getGreen(b);throw new UnsupportedOperationException("This method is not supported by this color model");},"~O");c(c$,"getBlue",function(a){var b=0,e=0,b=a[0],e=a.length;if(1==e)return this.getBlue(b);throw new UnsupportedOperationException("This method is not supported by this color model");},"~O");c(c$,"getAlpha",function(a){var b= +0,e=0,b=a[0],e=a.length;if(1==e)return this.getAlpha(b);throw new UnsupportedOperationException("This method is not supported by this color model");},"~O");c(c$,"getRGB",function(a){return this.getAlpha(a)<<24|this.getRed(a)<<16|this.getGreen(a)<<8|this.getBlue(a)<<0},"~O");c(c$,"getDataElements",function(){throw new UnsupportedOperationException("This method is not supported by this color model.");},"~N,~O");c(c$,"getComponents",function(){throw new UnsupportedOperationException("This method is not supported by this color model."); +},"~N,~A,~N");c(c$,"getComponents",function(){throw new UnsupportedOperationException("This method is not supported by this color model.");},"~O,~A,~N");c(c$,"getUnnormalizedComponents",function(a,b,e,c){if(null==this.colorSpace)throw new UnsupportedOperationException("This method is not supported by this color model.");if(null==this.nBits)throw new UnsupportedOperationException("This method is not supported. Unable to determine #bits per component.");if(a.length-b=a?0:3},"~N");c$.isLinearRGBspace=c(c$,"isLinearRGBspace",function(){return!1},"java.awt.color.ColorSpace");c$.isLinearGRAYspace=c(c$,"isLinearGRAYspace",function(){return!1},"java.awt.color.ColorSpace");x(c$,"RGBdefault",null,"l8Tos8",null,"s8Tol8",null,"l16Tos8",null,"s8Tol16",null,"g8Tos8Map",null,"lg16Toog8Map",null,"g16Tos8Map",null,"lg16Toog16Map",null)}); +p("java.awt.color");n(null,"java.awt.color.ColorSpace",["java.lang.IllegalArgumentException"],function(){c$=q(function(){this.numComponents=this.type=0;this.compName=null;k(this,arguments)},java.awt.color,"ColorSpace");g(c$,function(a,b){this.type=a;this.numComponents=b},"~N,~N");c$.getInstance=c(c$,"getInstance",function(a){switch(a){default:case 1E3:null==java.awt.color.ColorSpace.sRGBspace&&(java.awt.color.ColorSpace.sRGBspace=new java.awt.color.ColorSpace(5,3)),a=java.awt.color.ColorSpace.sRGBspace}return a}, +"~N");c(c$,"isCS_sRGB",function(){return this===java.awt.color.ColorSpace.sRGBspace});c(c$,"toRGB",function(a){return a},"~A");c(c$,"fromRGB",function(a){return a},"~A");c(c$,"getType",function(){return this.type});c(c$,"getNumComponents",function(){return this.numComponents});c(c$,"getName",function(a){if(0>a||a>this.numComponents-1)throw new IllegalArgumentException("Component index out of range: "+a);if(null==this.compName)switch(this.type){case 0:this.compName=B(-1,["X","Y","Z"]);break;case 1:this.compName= +B(-1,["L","a","b"]);break;case 2:this.compName=B(-1,["L","u","v"]);break;case 3:this.compName=B(-1,["Y","Cb","Cr"]);break;case 4:this.compName=B(-1,["Y","x","y"]);break;case 5:this.compName=B(-1,["Red","Green","Blue"]);break;case 6:this.compName=B(-1,["Gray"]);break;case 7:this.compName=B(-1,["Hue","Saturation","Value"]);break;case 8:this.compName=B(-1,["Hue","Lightness","Saturation"]);break;case 9:this.compName=B(-1,["Cyan","Magenta","Yellow","Black"]);break;case 11:this.compName=B(-1,["Cyan","Magenta", +"Yellow"]);break;default:for(var b=Array(this.numComponents),e=0;ea||a>this.numComponents-1)throw new IllegalArgumentException("Component index out of range: "+a);return 0},"~N");c(c$,"getMaxValue",function(a){if(0>a||a>this.numComponents-1)throw new IllegalArgumentException("Component index out of range: "+a);return 1},"~N");x(c$,"sRGBspace",null,"TYPE_XYZ",0,"TYPE_Lab", +1,"TYPE_Luv",2,"TYPE_YCbCr",3,"TYPE_Yxy",4,"TYPE_RGB",5,"TYPE_GRAY",6,"TYPE_HSV",7,"TYPE_HLS",8,"TYPE_CMYK",9,"TYPE_CMY",11,"TYPE_2CLR",12,"TYPE_3CLR",13,"TYPE_4CLR",14,"TYPE_5CLR",15,"TYPE_6CLR",16,"TYPE_7CLR",17,"TYPE_8CLR",18,"TYPE_9CLR",19,"TYPE_ACLR",20,"TYPE_BCLR",21,"TYPE_CCLR",22,"TYPE_DCLR",23,"TYPE_ECLR",24,"TYPE_FCLR",25,"CS_sRGB",1E3,"CS_LINEAR_RGB",1004,"CS_CIEXYZ",1001,"CS_PYCC",1002,"CS_GRAY",1003)});p("java.util");n(["java.util.Arrays","$.Collections","$.HashMap"],"java.util.ResourceBundle", +"java.io.BufferedInputStream $.ByteArrayInputStream java.lang.ClassNotFoundException $.IllegalArgumentException $.InternalError $.InterruptedException $.NullPointerException $.StringBuilder $.Thread java.util.ArrayList $.HashSet java.util.Locale $.MissingResourceException swingjs.JSToolkit swingjs.api.Interface".split(" "),function(){c$=q(function(){this.locale=this.parent=null;this.expired=!1;this.$keySet=null;k(this,arguments)},java.util,"ResourceBundle");g(c$,function(){});c(c$,"getString",function(a){return this.getObject(a)}, +"~S");c(c$,"getStringArray",function(a){return this.getObject(a)},"~S");c(c$,"getObject",function(a){var b=this.handleGetObject(a);if(null==b&&(null!=this.parent&&(b=this.parent.getObject(a)),null==b))throw new java.util.MissingResourceException("Can't find resource for bundle "+this.getClass().getName()+", key "+a,this.getClass().getName(),a);return b},"~S");c(c$,"getLocale",function(){return this.locale});c(c$,"setParent",function(a){this.parent=a},"java.util.ResourceBundle");c$.getBundle=c(c$, +"getBundle",function(a,b,e,c){var f=4,f=arguments.length;switch(f){case 2:j(b,java.util.ResourceBundle.Control)&&(c=b,b=null);break;case 3:j(e,java.util.ResourceBundle.Control)&&(c=e,e=null)}null==b&&(b=java.util.Locale.getDefault());null==c&&(c=java.util.ResourceBundle.Control.getControl(java.util.ResourceBundle.Control.FORMAT_PROPERTIES));return java.util.ResourceBundle.getBundleImpl(a,b,e,c)},"~S,~O,~O,java.util.ResourceBundle.Control");c$.getBundleImpl=c(c$,"getBundleImpl",function(a,b,e,c){if(null== +c)throw new NullPointerException("ResourceBundle locale or control is null");e=new java.util.ResourceBundle.CacheKey(a,b,e);var f=null,d=java.util.ResourceBundle.cacheList.get(e);null!=d&&(f=d);if(java.util.ResourceBundle.isValidBundle(f))return f;for(var d=c.getFormats(a),m=null,s=b;null!=s;s=c.getFallbackLocale(a,s)){var g=c.getCandidateLocales(a,s),f=java.util.ResourceBundle.findBundle(e,g,d,0,c,m);if(java.util.ResourceBundle.isValidBundle(f)){var j=java.util.Locale.ROOT.equals(f.locale);if(!j|| +f.locale.equals(b)||1==g.size()&&f.locale.equals(g.get(0)))break;j&&null==m&&(m=f)}}null==f&&(null==m&&java.util.ResourceBundle.throwMissingResourceException(a,b,e.getCause()),f=m);return f},"~S,java.util.Locale,~O,java.util.ResourceBundle.Control");c$.findBundle=c(c$,"findBundle",function(a,b,e,c,f,d){var m=b.get(c),s=null;if(c!=b.size()-1)s=java.util.ResourceBundle.findBundle(a,b,e,c+1,f,d);else if(null!=d&&java.util.Locale.ROOT.equals(m))return d;b=!1;a.setLocale(m);c=java.util.ResourceBundle.findBundleInCache(a, +f);if(java.util.ResourceBundle.isValidBundle(c)&&(b=c.expired,!b)){if(c.parent===s)return c;d=java.util.ResourceBundle.cacheList.get(a);null!=d&&d===c&&java.util.ResourceBundle.cacheList.remove(a)}if(c!==java.util.ResourceBundle.NONEXISTENT_BUNDLE){d=a.clone();try{c=java.util.ResourceBundle.loadBundle(a,e,f,b);if(null!=c)return null==c.parent&&c.setParent(s),c.locale=m,c=java.util.ResourceBundle.putBundleInCache(a,c,f);java.util.ResourceBundle.putBundleInCache(a,java.util.ResourceBundle.NONEXISTENT_BUNDLE, +f)}finally{j(d.getCause(),InterruptedException)&&Thread.currentThread().interrupt()}}return s},"java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");c$.loadBundle=c(c$,"loadBundle",function(a,b,e,c){for(var f=a.getLocale(),d=null,m=b.size(),s=0;s=b.charAt(d-1);)d--;for(;s=b.charAt(s);)s++;b.regionMatches(!0,s,"url:",0,4)&&(s+=4);sb)return!1;var e=a.charAt(0);if(!Character.isLetter(e))return!1;for(var c=1;c=this.h$.firstSlot;)if(null==this.h$.elementData[this.position])this.position--;else return!0;return!1});d(c$,"next",function(){if(this.expectedModCount==this.h$.modCount){this.lastEntry&&(this.lastEntry=this.lastEntry.next);if(null==this.lastEntry){for(;this.position>=this.h$.firstSlot&&null==(this.lastEntry=this.h$.elementData[this.position]);)this.position--;this.lastEntry&&(this.lastPosition=this.position,this.position--)}if(this.lastEntry)return this.canRemove= +!0,this.type.get(this.lastEntry);throw new java.util.NoSuchElementException;}throw new java.util.ConcurrentModificationException;});d(c$,"remove",function(){if(this.expectedModCount==this.h$.modCount)if(this.canRemove){var a=this.canRemove=!1,b=this.h$.elementData[this.lastPosition];if(b===this.lastEntry)this.h$.elementData[this.lastPosition]=b.next,a=!0;else{for(;b&&b.next!==this.lastEntry;)b=b.next;b&&(b.next=this.lastEntry.next,a=!0)}if(a){this.h$.modCount++;this.h$.elementCount--;this.expectedModCount++; +return}}else throw new IllegalStateException;throw new java.util.ConcurrentModificationException;})});n([],"java.util.HashtableEnumerator",[],function(){c$=q(function(){this.key=!1;this.start=0;this.entry=null;k(this,arguments)},java.util,"HashtableEnumerator",null,java.util.Enumeration);g(c$,function(a,b){this.key=a;if(this.h$=b)this.start=this.h$.lastSlot+1},"~B,java.util.Hashtable");d(c$,"hasMoreElements",function(){if(!this.h$)return!1;if(this.entry)return!0;for(;--this.start>=this.h$.firstSlot;)if(this.h$.elementData[this.start])return this.entry= +this.h$.elementData[this.start],!0;return!1});d(c$,"nextElement",function(){if(this.hasMoreElements()){var a=this.key?this.entry.key:this.entry.value;this.entry=this.entry.next;return a}throw new java.util.NoSuchElementException;})});n([],"java.util.HashtableEntrySet",[],function(){c$=q(function(){k(this,arguments)},java.util,"HashtableEntrySet",java.util.AbstractSet);g(c$,function(a){this.h$=a},"java.util.Hashtable");d(c$,"size",function(){return this.h$.elementCount});d(c$,"clear",function(){this.h$.clear()}); +d(c$,"remove",function(a){return this.contains(a)?(this.h$.remove(a.getKey()),!0):!1},"~O");c(c$,"contains",function(a){var b=this.h$.getEntry(a.getKey());return a.equals(b)},"~O");d(c$,"get",function(a){return a},"java.util.MapEntry");c(c$,"iterator",function(){return new java.util.HashtableIterator(this)})});n([],"java.util.HashtableKeySet",[],function(){c$=q(function(){k(this,arguments)},java.util,"HashtableKeySet",java.util.AbstractSet);g(c$,function(a){this.h$=a},"java.util.Hashtable");d(c$, +"contains",function(a){return this.h$.containsKey(a)},"~O");d(c$,"size",function(){return this.h$.elementCount});d(c$,"clear",function(){this.h$.clear()});d(c$,"remove",function(a){return this.h$.containsKey(a)?(this.h$.remove(a),!0):!1},"~O");d(c$,"get",function(a){return a.key},"java.util.MapEntry");d(c$,"iterator",function(){return new java.util.HashtableIterator(this)})});n([],"java.util.HashtableValueCollection",[],function(){c$=q(function(){k(this,arguments)},java.util,"HashtableValueCollection", +null,java.util.AbstractCollection);g(c$,function(a){this.h$=a},"java.util.Hashtable");d(c$,"contains",function(a){return this.h$.contains(a)},"~O");d(c$,"size",function(){return this.h$.elementCount});d(c$,"clear",function(){this.h$.clear()});d(c$,"get",function(a){return a.value},"java.util.MapEntry");d(c$,"iterator",function(){return new java.util.HashtableIterator(this)})});n(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){c$=q(function(){this.next=null;this.hashcode=0;k(this,arguments)}, +java.util,"HashtableEntry",java.util.MapEntry);O(c$,function(a,b){this.key=a;this.value=b;this.hashcode=a.hashCode()});c(c$,"clone",function(){var a=u(this,java.util.HashtableEntry,"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});d(c$,"setValue",function(a){if(null==a)throw new NullPointerException;var b=this.value;this.value=a;return b},"~O");c(c$,"getKeyHash",function(){return this.key.hashCode()});c(c$,"equalsKey",function(a){return this.hashcode==(!a.hashCode||a.hashCode())&& +this.key.equals(a)},"~O,~N");d(c$,"toString",function(){return this.key+"="+this.value})});n("java.util.Dictionary $.Enumeration $.HashtableEnumerator $.Iterator $.Map $.MapEntry $.NoSuchElementException".split(" "),"java.util.Hashtable","java.lang.IllegalArgumentException $.IllegalStateException $.NullPointerException $.StringBuilder java.util.AbstractCollection $.AbstractSet $.Arrays $.Collections $.ConcurrentModificationException java.util.MapEntry.Type java.util.HashtableEntry".split(" "),function(){c$= +q(function(){this.elementCount=0;this.elementData=null;this.firstSlot=this.threshold=this.loadFactor=0;this.lastSlot=-1;this.modCount=0;k(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);c$.newEntry=c(c$,"newEntry",($fz=function(a,b){return new java.util.HashtableEntry(a,b)},$fz.isPrivate=!0,$fz),"~O,~O,~N");O(c$,function(){this.elementCount=0;this.elementData=this.newElementArray(11);this.firstSlot=this.elementData.length;this.loadFactor= +0.75;this.computeMaxSize()});c(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");d(c$,"clear",function(){this.elementCount=0;for(var a=this.elementData.length;0<=--a;)this.elementData[a]=null;this.modCount++});c(c$,"clone",function(){try{var a=u(this,java.util.Hashtable,"clone",[]);a.elementData=this.elementData.clone();for(var b,e=this.elementData.length;0<=--e;)if(b=this.elementData[e])a.elementData[e]=b.clone();return a}catch(c){if(j(c,CloneNotSupportedException))return null; +throw c;}});c(c$,"computeMaxSize",($fz=function(){this.threshold=Math.round(this.elementData.length*this.loadFactor)},$fz.isPrivate=!0,$fz));c(c$,"contains",function(a){if(null==a)throw new NullPointerException;for(var b=this.elementData.length;0<=--b;)for(var e=this.elementData[b];e;){if(a.equals(e.value))return!0;e=e.next}return!1},"~O");d(c$,"containsKey",function(a){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==a}));return null!=this.getEntry(a)},"~O"); +d(c$,"containsValue",function(a){return this.contains(a)},"~O");d(c$,"elements",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:new java.util.HashtableEnumerator(!1,this)});d(c$,"entrySet",function(){return new java.util.HashtableEntrySet(this)});d(c$,"equals",function(a){if(this===a)return!0;if(j(a,java.util.Map)){if(this.size()!=a.size())return!1;var b=this.entrySet(),e;for(a=a.entrySet().iterator();a.hasNext()&&((e=a.next())||1);)if(!b.contains(e))return!1;return!0}return!1}, +"~O");d(c$,"get",function(a){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==a}));for(var b=a.hashCode(),e=this.elementData[(b&2147483647)%this.elementData.length];e;){if(e.equalsKey(a,b))return e.value;e=e.next}return null},"~O");c(c$,"getEntry",function(a){for(var b=a.hashCode(),e=this.elementData[(b&2147483647)%this.elementData.length];e;){if(e.equalsKey(a,b))return e;e=e.next}return null},"~O");d(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)var e= +b.next(),c=e.getKey(),e=e.getValue(),c=(c!==this?c.hashCode():0)^(e!==this?null!=e?e.hashCode():0:0),a=a+c;return a});d(c$,"isEmpty",function(){return 0==this.elementCount});d(c$,"keys",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:new java.util.HashtableEnumerator(!0,this)});d(c$,"keySet",function(){return new java.util.HashtableKeySet(this)});d(c$,"put",function(a,b){if(null!=a&&null!=b){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this== +a}));for(var e=a.hashCode(),c=(e&2147483647)%this.elementData.length,f=this.elementData[c];null!=f&&!f.equalsKey(a,e);)f=f.next;if(null==f)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),c=(e&2147483647)%this.elementData.length),cthis.lastSlot&&(this.lastSlot=c),f=java.util.Hashtable.newEntry(a,b,e),f.next=this.elementData[c],this.elementData[c]=f,null;e=f.value;f.value=b;return e}throw new NullPointerException;},"~O,~O");d(c$,"putAll", +function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())},"java.util.Map");c(c$,"rehash",function(){var a=(this.elementData.length<<1)+1;0==a&&(a=1);for(var b=a,e=-1,c=this.newElementArray(a),f=this.lastSlot+1;--f>=this.firstSlot;)for(var d=this.elementData[f];null!=d;){var m=(d.getKeyHash()&2147483647)%a;me&&(e=m);var s=d.next;d.next=c[m];c[m]=d;d=s}this.firstSlot=b;this.lastSlot=e;this.elementData=c;this.computeMaxSize()});d(c$, +"remove",function(a){for(var b=a.hashCode(),e=(b&2147483647)%this.elementData.length,c=null,f=this.elementData[e];null!=f&&!f.equalsKey(a,b);)c=f,f=f.next;return null!=f?(this.modCount++,null==c?this.elementData[e]=f.next:c.next=f.next,this.elementCount--,a=f.value,f.value=null,a):null},"~O");d(c$,"size",function(){return this.elementCount});d(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.lastSlot;b>=this.firstSlot;b--)for(var e= +this.elementData[b];null!=e;)e.key!==this?a.append(e.key):a.append("(this Map)"),a.append("="),e.value!==this?a.append(e.value):a.append("(this Map)"),a.append(", "),e=e.next;0e)){if(null!=this.paintingChild&&j(this.paintingChild,javax.swing.JComponent))for(;0<=e&&this.getComponent(e)!== +this.paintingChild;e--);for(var c=javax.swing.JComponent.fetchRectangle();0<=e;e--){var f=this.getComponent(e);b=j(f,javax.swing.JComponent);if(null!=f&&(b||javax.swing.JComponent.isLightweightComponent(f))&&!0==f.isVisible()){b=f.getBounds(c);b=a.create4(b.x,b.y,b.width,b.height);b.setColor(f.getForeground());b.setFont(f.getFont());try{f.paint(b)}finally{b.dispose()}}}javax.swing.JComponent.recycleRectangle(c)}},"java.awt.Graphics");c(c$,"paintBorder",function(a){var b=this.getBorder();null!=b&& +b.paintBorder(this,a,0,0,this.getWidth(),this.getHeight())},"java.awt.Graphics");d(c$,"update",function(a){this.paint(a)},"java.awt.Graphics");d(c$,"paint",function(a){var b=!1;if(!(0>=this.getWidth()||0>=this.getHeight())){a=this.getComponentGraphics(a).createSwingJS();try{null!=this.getParent()&&!j(this.getParent(),javax.swing.JComponent)&&(this.adjustPaintFlags(),b=!0),this.paintComponent(a),this.paintBorder(a),this.paintChildren(a)}finally{a.dispose(),b&&(this.setFlag(1,!1),this.setFlag(2,!1), +this.setFlag(11,!1),this.setFlag(12,!1))}}},"java.awt.Graphics");c(c$,"paintForceDoubleBuffered",function(a){var b=javax.swing.RepaintManager.currentManager(this),e=a.getClipBounds();b.beginPaint();this.setFlag(13,!0);try{b.paint(this,this,a,e.x,e.y,e.width,e.height)}finally{b.endPaint(),this.setFlag(13,!1)}},"java.awt.Graphics");c(c$,"isPainting",function(){for(var a=this;null!=a;){if(j(a,javax.swing.JComponent)&&a.getFlag(1))return!0;a=a.getParent()}return!1});c(c$,"adjustPaintFlags",function(){for(var a= +null,a=this.getParent();null!=a;a=a.getParent())if(j(a,javax.swing.JComponent)){a.getFlag(1)&&this.setFlag(1,!0);a.getFlag(2)&&this.setFlag(2,!0);a.getFlag(11)&&this.setFlag(11,!0);a.getFlag(12)&&this.setFlag(12,!0);break}});d(c$,"printAll",function(a){this.setFlag(12,!0);try{this.print(a)}finally{this.setFlag(12,!1)}},"java.awt.Graphics");d(c$,"print",function(a){this.setFlag(11,!0);this.firePropertyChangeBool("paintingForPrint",!1,!0);try{this.paint(a)}finally{this.setFlag(11,!1),this.firePropertyChangeBool("paintingForPrint", +!0,!1)}},"java.awt.Graphics");c(c$,"printComponent",function(a){this.paintComponent(a)},"java.awt.Graphics");c(c$,"printChildren",function(a){this.paintChildren(a)},"java.awt.Graphics");c(c$,"printBorder",function(a){this.paintBorder(a)},"java.awt.Graphics");c(c$,"isPaintingTile",function(){return this.getFlag(2)});c(c$,"isPaintingForPrint",function(){return this.getFlag(11)});c(c$,"isManagingFocus",function(){return!1});c(c$,"registerNextFocusableComponent",function(){this.registerNextFocusableComponent(this.getNextFocusableComponent())}); +c(c$,"registerNextFocusableComponent",function(){},"java.awt.Component");c(c$,"deregisterNextFocusableComponent",function(){null!=this.getNextFocusableComponent()&&(this.isFocusCycleRoot()||this.getFocusCycleRootAncestor())});c(c$,"setNextFocusableComponent",function(a){var b=this.isDisplayable();b&&this.deregisterNextFocusableComponent();this.putClientProperty("nextFocus",a);b&&this.registerNextFocusableComponent(a)},"java.awt.Component");c(c$,"getNextFocusableComponent",function(){return this.getClientProperty("nextFocus")}); +c(c$,"setRequestFocusEnabled",function(a){this.setFlag(22,!a)},"~B");c(c$,"isRequestFocusEnabled",function(){return!this.getFlag(22)});c(c$,"requestFocus",function(){u(this,javax.swing.JComponent,"requestFocus",[]);return!0},"~B");c(c$,"requestFocusInWindow",function(){return u(this,javax.swing.JComponent,"requestFocusInWindow",[])},"~B");c(c$,"grabFocus",function(){this.requestFocus()});c(c$,"setVerifyInputWhenFocusTarget",function(a){var b=this.verifyInputWhenFocusTarget;this.verifyInputWhenFocusTarget= +a;this.firePropertyChangeBool("verifyInputWhenFocusTarget",b,a)},"~B");c(c$,"getVerifyInputWhenFocusTarget",function(){return this.verifyInputWhenFocusTarget});d(c$,"getFontMetrics",function(a){return jssun.font.FontDesignMetrics.getMetrics(a)},"java.awt.Font");d(c$,"getPreferredSize",function(){return this.getPrefSizeJComp()});c(c$,"getPrefSizeJComp",function(){var a=this.isPreferredSizeSet()||null==this.ui?null:this.ui.getPreferredSize(this);return null==a?this.preferredSize():a});c(c$,"getMaximumSize", +function(){if(this.isMaximumSizeSet())return u(this,javax.swing.JComponent,"getMaximumSize",[]);var a=null;null!=this.ui&&(a=this.ui.getMaximumSize(this));return null!=a?a:u(this,javax.swing.JComponent,"getMaximumSize",[])});c(c$,"getMinimumSize",function(){if(this.isMinimumSizeSet())return u(this,javax.swing.JComponent,"getMinimumSize",[]);var a=null;null!=this.ui&&(a=this.ui.getMinimumSize(this));return null!=a?a:u(this,javax.swing.JComponent,"getMinimumSize",[])});d(c$,"contains",function(a,b){return null!= +this.ui?this.ui.contains(this,a,b):this.inside(a,b)},"~N,~N");c(c$,"setBorder",function(a){var b=this.border;this.border=a;this.firePropertyChangeObject("border",b,a);a!==b&&((null==a||null==b||!a.getBorderInsets(this).equals(b.getBorderInsets(this)))&&this.revalidate(),this.repaint())},"javax.swing.border.Border");c(c$,"getBorder",function(){return this.border});c(c$,"getInsets",function(){return null!=this.border?this.border.getBorderInsets(this):u(this,javax.swing.JComponent,"getInsets",[])}); +c(c$,"getInsets",function(a){null==a&&(a=new java.awt.Insets(0,0,0,0));if(null!=this.border)return j(this.border,javax.swing.border.AbstractBorder)?this.border.getBorderInsets(this,a):this.border.getBorderInsets(this);a.left=a.top=a.right=a.bottom=0;return a},"java.awt.Insets");c(c$,"getAlignmentY",function(){return this.isAlignmentYSet?this.alignmentY:u(this,javax.swing.JComponent,"getAlignmentY",[])});c(c$,"setAlignmentY",function(a){this.alignmentY=1a?0:a;this.isAlignmentYSet=!0},"~N"); +c(c$,"getAlignmentX",function(){return this.isAlignmentXSet?this.alignmentX:u(this,javax.swing.JComponent,"getAlignmentX",[])});c(c$,"setAlignmentX",function(a){this.alignmentX=1a?0:a;this.isAlignmentXSet=!0},"~N");c(c$,"setInputVerifier",function(a){var b=this.getClientProperty(javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);this.putClientProperty(javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER,a);this.firePropertyChangeObject("inputVerifier",b,a)},"javax.swing.InputVerifier"); +c(c$,"getInputVerifier",function(){return this.getClientProperty(javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER)});c(c$,"registerKeyboardAction",function(a,b,e,c){c=this.getInputMap(c,!0);if(null!=c){var f=this.getActionMap(!0);a=D(javax.swing.JComponent.ActionStandin,this,null,a,b);c.put(e,a);null!=f&&f.put(a,a)}},"java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N");c(c$,"registerWithKeyboardManager",function(a){var b=this.getInputMap(2,!1),e=this.getClientProperty("_WhenInFocusedWindow"); +if(null!=b){if(b=b.allKeys(),null!=b)for(var c=b.length-1;0<=c;c--)(!a||null==e||null==e.get(b[c]))&&this.registerWithKeyboardManager(b[c]),null!=e&&e.remove(b[c])}else b=null;if(null!=e&&0e;e++){var c= +this.getInputMap(e,!1);if(null!=c){var f=c.get(a);null!=b&&null!=f&&b.remove(f);c.remove(a)}}},"javax.swing.KeyStroke");c(c$,"getRegisteredKeyStrokes",function(){for(var a=H(3,0),b=Array(3),e=0;3>e;e++){var c=this.getInputMap(e,!1);b[e]=null!=c?c.allKeys():null;a[e]=null!=b[e]?b[e].length:0}for(var c=Array(a[0]+a[1]+a[2]),f=e=0;3>e;e++)0b;b++){var e=this.getInputMap(b,!1);if(null!= +e&&null!=e.get(a))return b}return-1},"javax.swing.KeyStroke");c(c$,"getActionForKeyStroke",function(a){var b=this.getActionMap(!1);if(null==b)return null;for(var e=0;3>e;e++){var c=this.getInputMap(e,!1);if(null!=c&&(c=c.get(a),null!=c))return a=b.get(c),j(a,javax.swing.JComponent.ActionStandin)?a.actionListener:a}return null},"javax.swing.KeyStroke");c(c$,"resetKeyboardActions",function(){for(var a=0;3>a;a++){var b=this.getInputMap(a,!1);null!=b&&b.clear()}a=this.getActionMap(!1);null!=a&&a.clear()}); +c(c$,"setInputMap",function(a,b){switch(a){case 2:if(null!=b&&!j(b,javax.swing.ComponentInputMap))throw new IllegalArgumentException("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap");this.windowInputMap=b;this.setFlag(7,!0);this.registerWithKeyboardManager(!1);break;case 1:this.ancestorInputMap=b;this.setFlag(6,!0);break;case 0:this.focusInputMap=b;this.setFlag(5,!0);break;default:throw new IllegalArgumentException("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT"); +}},"~N,javax.swing.InputMap");c(c$,"getInputMap",function(a){return this.getInputMap(a,!0)},"~N");c(c$,"getInputMap",function(){return this.getInputMap(0,!0)});c(c$,"setActionMap",function(a){this.actionMap=a;this.setFlag(8,!0)},"javax.swing.ActionMap");c(c$,"getActionMap",function(){return this.getActionMap(!0)});c(c$,"getInputMap",function(a,b){switch(a){case 0:if(this.getFlag(5))return this.focusInputMap;if(b){var e=new javax.swing.InputMap;this.setInputMap(a,e);return e}break;case 1:if(this.getFlag(6))return this.ancestorInputMap; +if(b)return e=new javax.swing.InputMap,this.setInputMap(a,e),e;break;case 2:if(this.getFlag(7))return this.windowInputMap;if(b)return e=new javax.swing.ComponentInputMap(this),this.setInputMap(a,e),e;break;default:throw new IllegalArgumentException("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");}return null},"~N,~B");c(c$,"getActionMap",function(a){0==arguments.length&&(a=!0);if(this.getFlag(8))return this.actionMap; +if(a){var b=new javax.swing.ActionMap;this.setActionMap(b);return b}return null},"~B");c(c$,"getBaseline",function(a,b){u(this,javax.swing.JComponent,"getBaseline",[a,b]);return null!=this.ui?this.ui.getBaseline(this,a,b):-1},"~N,~N");d(c$,"getBaselineResizeBehavior",function(){return null!=this.ui?this.ui.getBaselineResizeBehavior(this):java.awt.Component.BaselineResizeBehavior.OTHER});c(c$,"requestDefaultFocus",function(){this.isFocusCycleRoot()||this.getFocusCycleRootAncestor();return!1});c(c$, +"setVisible",function(a){if(a!=this.isVisible()){u(this,javax.swing.JComponent,"setVisible",[a]);a=this.getParent();if(null!=a){var b=this.getBounds();a.repaint(b.x,b.y,b.width,b.height)}this.revalidate()}},"~B");c(c$,"setEnabled",function(a){var b=this.isEnabled();u(this,javax.swing.JComponent,"setEnabled",[a]);this.firePropertyChangeBool("enabled",b,a);a!=b&&this.repaint()},"~B");c(c$,"setForeground",function(a){var b=this.getForeground();u(this,javax.swing.JComponent,"setForeground",[a]);(null!= +b?!b.equals(a):null!=a&&!a.equals(b))&&this.repaint()},"java.awt.Color");c(c$,"setBackground",function(a){var b=this.getBackground();u(this,javax.swing.JComponent,"setBackground",[a]);(null!=b?!b.equals(a):null!=a&&!a.equals(b))&&this.repaint()},"java.awt.Color");c(c$,"setFont",function(a){var b=this.getFont();u(this,javax.swing.JComponent,"setFont",[a]);a!==b&&(this.revalidate(),this.repaint())},"java.awt.Font");c$.getDefaultLocale=c(c$,"getDefaultLocale",function(){var a=javax.swing.SwingUtilities.appContextGet("JComponent.defaultLocale"); +null==a&&(a=java.util.Locale.getDefault(),javax.swing.JComponent.setDefaultLocale(a));return a});c$.setDefaultLocale=c(c$,"setDefaultLocale",function(a){javax.swing.SwingUtilities.appContextPut("JComponent.defaultLocale",a)},"java.util.Locale");c(c$,"processComponentKeyEvent",function(){},"java.awt.event.KeyEvent");c(c$,"processKeyEvent",function(a){var b;u(this,javax.swing.JComponent,"processKeyEvent",[a]);a.isConsumed()||this.processComponentKeyEvent(a);b=javax.swing.JComponent.KeyboardState.shouldProcess(a); +a.isConsumed()||b&&this.processKeyBindings(a,401==a.getID())&&a.consume()},"java.awt.event.KeyEvent");c(c$,"processKeyBinding",function(a,b,e){var c=this.getInputMap(e,!1);e=this.getActionMap(!1);return null!=c&&(null!=e&&this.isEnabled())&&(c=c.get(a),e=null==c?null:e.get(c),null!=e)?javax.swing.SwingUtilities.notifyAction(e,a,b,this,b.getModifiers()):!1},"javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");c(c$,"processKeyBindings",function(a,b){if(!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings(a))return!1; +var e;e=400==a.getID()?javax.swing.KeyStroke.getKeyStroke(a.getKeyChar()):javax.swing.KeyStroke.getKeyStroke(a.getKeyCode(),a.getModifiers(),b?!1:!0);if(this.processKeyBinding(e,a,0,b))return!0;for(var c=this;null!=c&&!j(c,java.awt.Window)&&!j(c,java.applet.Applet);){if(j(c,javax.swing.JComponent)&&c.processKeyBinding(e,a,1,b))return!0;c=c.getParent()}return null!=c?javax.swing.JComponent.processKeyBindingsForAllComponents(a,c,b):!1},"java.awt.event.KeyEvent,~B");c$.processKeyBindingsForAllComponents= +c(c$,"processKeyBindingsForAllComponents",function(a,b,e){for(;;){if(javax.swing.KeyboardManager.getCurrentManager().fireKeyboardAction(a,e,b))return!0;if(j(b,javax.swing.Popup.HeavyWeightWindow))b=b.getOwner();else return!1}},"java.awt.event.KeyEvent,java.awt.Container,~B");c(c$,"setToolTipText",function(a){this.putClientProperty("ToolTipText",a)},"~S");c(c$,"getToolTipText",function(){return this.getClientProperty("ToolTipText")});c(c$,"getToolTipText",function(){return this.getToolTipText()},"java.awt.event.MouseEvent"); +c(c$,"getToolTipLocation",function(){return null},"java.awt.event.MouseEvent");c(c$,"getPopupLocation",function(){return null},"java.awt.event.MouseEvent");c(c$,"createToolTip",function(){var a=new javax.swing.JToolTip;a.setComponent(this);return a});c(c$,"scrollRectToVisible",function(a){var b,e=this.getX(),c=this.getY();for(b=this.getParent();null!=b&&!j(b,javax.swing.JComponent)&&!j(b,javax.swing.CellRendererPane);b=b.getParent())var f=b.getBounds(),e=e+f.x,c=c+f.y;null!=b&&!j(b,javax.swing.CellRendererPane)&& +(a.x+=e,a.y+=c,b.scrollRectToVisible(a),a.x-=e,a.y-=c)},"java.awt.Rectangle");c(c$,"setAutoscrolls",function(){},"~B");c(c$,"getAutoscrolls",function(){return this.autoscrolls});c(c$,"superProcessMouseMotionEvent",function(a){u(this,javax.swing.JComponent,"processMouseMotionEvent",[a])},"java.awt.event.MouseEvent");c(c$,"setCreatedDoubleBuffer",function(a){this.setFlag(9,a)},"~B");c(c$,"getCreatedDoubleBuffer",function(){return this.getFlag(9)});c(c$,"getClientProperties",function(){null==this.clientProperties&& +(this.clientProperties=new javax.swing.ArrayTable);return this.clientProperties});c(c$,"getClientProperty",function(a){return null==this.clientProperties?null:this.clientProperties.get(a)},"~O");c(c$,"putClientProperty",function(a,b){if(!(null==b&&null==this.clientProperties)){var e=this.getClientProperties(),c;c=e.get(a);if(null!=b)e.put(a,b);else if(null!=c)e.remove(a);else return;this.clientPropertyChanged(a,c,b);this.firePropertyChangeObject(a.toString(),c,b)}},"~O,~O");c(c$,"clientPropertyChanged", +function(){},"~O,~O,~O");c(c$,"setUIProperty",function(a,b){"opaque"===a?this.getFlag(24)||(this.setOpaque(b.booleanValue()),this.setFlag(24,!1)):"autoscrolls"===a?this.getFlag(25)||(this.setAutoscrolls(b.booleanValue()),this.setFlag(25,!1)):"focusTraversalKeysForward"!==a&&"focusTraversalKeysBackward"!==a&&System.out.println(swingjs.JSToolkit.getClassName(this)+' property "'+a+'" cannot be set using this method'+swingjs.JSToolkit.getStackTrace(5))},"~S,~O");c$.isLightweightComponent=c(c$,"isLightweightComponent", +function(a){return!(j(a,javax.swing.JApplet)||j(a,javax.swing.JFrame)||j(a,javax.swing.JWindow)||j(a,javax.swing.JDialog))},"java.awt.Component");d(c$,"isOpaque",function(){return this.getFlag(3)});c(c$,"setOpaque",function(a){var b=this.getFlag(3);this.setFlag(3,a);this.setFlag(24,!0);this.firePropertyChangeBool("opaque",b,a)},"~B");c(c$,"rectangleIsObscured",function(a,b,e,c){for(var f=this.getComponentCount(),d=0;d=s&&a+e<=s+k&&b>=g&&b+c<=g+p&&m.isVisible()){if(j(m,javax.swing.JComponent))return m.isOpaque();break}}return!1},"~N,~N,~N,~N");c$.computeVisibleRect=c(c$,"computeVisibleRect",function(a,b){var e=a.getParent(),c=a.getBounds();null==e||j(e,java.awt.Window)||j(e,java.applet.Applet)?b.reshape(0,0,c.width,c.height):(javax.swing.JComponent.computeVisibleRect(e,b),b.x-=c.x,b.y-=c.y,javax.swing.SwingUtilities.computeIntersection(0,0,c.width,c.height,b))},"java.awt.Component,java.awt.Rectangle"); +c(c$,"computeVisibleRect",function(a){javax.swing.JComponent.computeVisibleRect(this,a)},"java.awt.Rectangle");c(c$,"getVisibleRect",function(){var a=new java.awt.Rectangle;this.computeVisibleRect(a);return a});c(c$,"getTopLevelAncestor",function(){for(var a=this;null!=a;a=a.getParent())if(j(a,java.awt.Window)||j(a,java.applet.Applet))return a;return null});c(c$,"getAncestorNotifier",function(){return this.getClientProperty(javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER)});c(c$,"addAncestorListener", +function(a){var b=this.getAncestorNotifier();null==b&&(b=new javax.swing.AncestorNotifier(this),this.putClientProperty(javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER,b));b.addAncestorListener(a)},"javax.swing.event.AncestorListener");c(c$,"removeAncestorListener",function(a){var b=this.getAncestorNotifier();null!=b&&(b.removeAncestorListener(a),0==b.listenerList.getListenerList().length&&(b.removeAllListeners(),this.putClientProperty(javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, +null)))},"javax.swing.event.AncestorListener");c(c$,"getAncestorListeners",function(){var a=this.getAncestorNotifier();return null==a?[]:a.getAncestorListeners()});c(c$,"getListeners",function(a){var b;b=a===javax.swing.event.AncestorListener?this.getAncestorListeners():a===java.beans.PropertyChangeListener?this.getPropertyChangeListeners():this.listenerList.getListeners(a);return 0==b.length?u(this,javax.swing.JComponent,"getListeners",[a]):b},"Class");c(c$,"addNotify",function(){u(this,javax.swing.JComponent, +"addNotify",[]);this.firePropertyChangeObject("ancestor",null,this.getParent());this.registerWithKeyboardManager(!1);this.registerNextFocusableComponent()});c(c$,"removeNotify",function(){u(this,javax.swing.JComponent,"removeNotify",[]);this.firePropertyChangeObject("ancestor",this.getParent(),null);this.unregisterWithKeyboardManager();this.deregisterNextFocusableComponent();this.getCreatedDoubleBuffer()&&(javax.swing.RepaintManager.currentManager(this).resetDoubleBuffer(),this.setCreatedDoubleBuffer(!1))}); +c(c$,"repaint",function(a,b,e,c,f){javax.swing.RepaintManager.currentManager(this).addDirtyRegion(this,b,e,c,f)},"~N,~N,~N,~N,~N");c(c$,"repaint",function(a){this.repaint(0,a.x,a.y,a.width,a.height)},"java.awt.Rectangle");c(c$,"revalidate",function(){if(null!=this.getParent())if(javax.swing.SwingUtilities.isEventDispatchThread())this.invalidate(),javax.swing.RepaintManager.currentManager(this).addInvalidComponent(this);else if(!this.getFlag(28)){this.setFlag(28,!0);var a=(C("javax.swing.JComponent$2")? +0:javax.swing.JComponent.$JComponent$2$(),D(javax.swing.JComponent$2,this,null));javax.swing.SwingUtilities.invokeLater(a)}});c(c$,"isValidateRoot",function(){return!1});c(c$,"isOptimizedDrawingEnabled",function(){return!0});c(c$,"isPaintingOrigin",function(){return!1});c(c$,"paintImmediately",function(a,b,e,c){if(1==arguments.length){var f=a;a=f.x;b=f.y;e=f.width;c=f.height}var f=this,d;if(this.isShowing()){for(;!f.isOpaque();){d=f.getParent();if(null!=d)a+=f.getX(),b+=f.getY(),f=d;else break;if(!j(f, +javax.swing.JComponent))break}j(f,javax.swing.JComponent)?f._paintImmediately(a,b,e,c):f.repaint(a,b,e,c)}},"~N,~N,~N,~N");c(c$,"paintImmediately",function(a){this.paintImmediately(a.x,a.y,a.width,a.height)},"java.awt.Rectangle");c(c$,"alwaysOnTop",function(){return!1});c(c$,"setPaintingChild",function(a){this.paintingChild=a},"java.awt.Component");c(c$,"_paintImmediately",function(a,b,e,c){var f,d=0,m=0,s=!1,g=this,k=new java.util.ArrayList(7),p=-1,q=0,n=javax.swing.JComponent.fetchRectangle();n.x= +a;n.y=b;n.width=e;n.height=c;if(b=this.alwaysOnTop()&&this.isOpaque())if(javax.swing.SwingUtilities.computeIntersection(0,0,this.getWidth(),this.getHeight(),n),0==n.width){javax.swing.JComponent.recycleRectangle(n);return}var r;a=this;for(r=null;null!=a&&!j(a,java.awt.Window)&&!j(a,java.applet.Applet);r=a,a=a.getParent()){e=j(a,javax.swing.JComponent)?a:null;k.add(a);if(!b&&null!=e&&!e.isOptimizedDrawingEnabled()){if(a!==this)if(e.isPaintingOrigin())c=!0;else{var t=a.getComponents();for(c=0;c=n.width||0>=n.height)){g.setFlag(13,!0);n.x-=d;n.y-=m;if(g!==this)for(c=p;0=s.x&&b+c<=s.x+s.width&&e>=s.y&&e+f<=s.y+s.height)return javax.swing.JComponent.recycleRectangle(m),2;if(0==d&&!(b+c<=s.x||e+f<=s.y||b>=s.x+s.width||e>=s.y+s.height))d=1}}javax.swing.JComponent.recycleRectangle(m);return d},"~N,~N,~N,~N,~N");c(c$,"checkIfChildObscuredBySibling",function(){return!0});c(c$,"setFlag",function(a,b){this.flags=b?this.flags|1<=a.x&&b.x+b.width<=a.x+a.width&&b.y>=a.y&&b.y+b.height<=a.y+a.height?!0:!1},"java.awt.Rectangle,java.awt.Rectangle");c$.getLocalBounds=c(c$,"getLocalBounds",function(a){a=new java.awt.Rectangle(a.getBounds()); +a.x=a.y=0;return a},"java.awt.Component");c$.getWindowAncestor=c(c$,"getWindowAncestor",function(a){for(a=a.getParent();null!=a;a=a.getParent())if(j(a,java.awt.Window))return a;return null},"java.awt.Component");c$.convertScreenLocationToParent=c(c$,"convertScreenLocationToParent",function(a,b,e){for(var c=a;null!=c;c=c.getParent())if(j(c,java.awt.Window))return b=new java.awt.Point(b,e),javax.swing.SwingUtilities.convertPointFromScreen(b,a),b;throw Error("convertScreenLocationToParent: no window ancestor"); +},"java.awt.Container,~N,~N");c$.convertPoint=c(c$,"convertPoint",function(a,b,e){if(null==a&&null==e)return b;if(null==a&&(a=javax.swing.SwingUtilities.getWindowAncestor(e),null==a))throw Error("Source component not connected to component tree hierarchy");b=new java.awt.Point(b);javax.swing.SwingUtilities.convertPointToScreen(b,a);if(null==e&&(e=javax.swing.SwingUtilities.getWindowAncestor(a),null==e))throw Error("Destination component not connected to component tree hierarchy");javax.swing.SwingUtilities.convertPointFromScreen(b, +e);return b},"java.awt.Component,java.awt.Point,java.awt.Component");c$.convertPoint=c(c$,"convertPoint",function(a,b,e,c){b=new java.awt.Point(b,e);return javax.swing.SwingUtilities.convertPoint(a,b,c)},"java.awt.Component,~N,~N,java.awt.Component");c$.convertRectangle=c(c$,"convertRectangle",function(a,b,e){var c=new java.awt.Point(b.x,b.y),c=javax.swing.SwingUtilities.convertPoint(a,c,e);return new java.awt.Rectangle(c.x,c.y,b.width,b.height)},"java.awt.Component,java.awt.Rectangle,java.awt.Component"); +c$.getAncestorOfClass=c(c$,"getAncestorOfClass",function(a,b){if(null==b||null==a)return null;for(var e=b.getParent();null!=e&&!a.isInstance(e);)e=e.getParent();return e},"Class,java.awt.Component");c$.getAncestorNamed=c(c$,"getAncestorNamed",function(a,b){if(null==b||null==a)return null;for(var e=b.getParent();null!=e&&!a.equals(e.getName());)e=e.getParent();return e},"~S,java.awt.Component");c$.getDeepestComponentAt=c(c$,"getDeepestComponentAt",function(a,b,e){if(!a.contains(b,e))return null;if(j(a, +java.awt.Container))for(var c=a.getComponents(),f=0;ff.x?a:f.x;a=a+ef.y?b:f.y;b=b+cf.width||0>f.height)f.x=f.y=f.width=f.height=0;return f},"~N,~N,~N,~N,java.awt.Rectangle");c$.computeUnion=c(c$,"computeUnion",function(a,b,e,c,f){var d=af.x+f.width?a+e:f.x+f.width;e=bf.y+f.height?b+c:f.y+f.height;f.x=d;f.y=e;f.width=a-d;f.height=b-e;return f},"~N,~N,~N,~N,java.awt.Rectangle"); +c$.computeDifference=c(c$,"computeDifference",function(a,b){if(null==b||!a.intersects(b)||javax.swing.SwingUtilities.isRectangleContainingRectangle(b,a))return[];var e=new java.awt.Rectangle,c=null,f=null,d=null,m=null,s=0;javax.swing.SwingUtilities.isRectangleContainingRectangle(a,b)?(e.x=a.x,e.y=a.y,e.width=b.x-a.x,e.height=a.height,0a.x+a.width?(e.x=a.x,e.y=b.y+b.height,e.width=a.width,e.height=a.y+a.height-(b.y+b.height),0a.y+a.height?(e.reshape(b.x+b.width,a.y,a.x+a.width-(b.x+b.width),a.height), +0=a.y+a.height?b.x+b.width>a.x+a.width?(e.reshape(a.x,a.y,a.width,b.y-a.y),0=a.x+a.width?(e.reshape(a.x,a.y,a.width,b.y-a.y),0a.x+a.width?b.y<=a.y&&b.y+b.height>a.y+a.height?(e.reshape(a.x,a.y,b.x-a.x,a.height),0a.y+a.height?(e.reshape(a.x,a.y,a.width,b.y-a.y),0=a.x&&b.x+b.width<=a.x+a.width&&(b.y<=a.y&&b.y+b.height>a.y+a.height?(e.reshape(a.x,a.y,b.x-a.x,a.height),0a||13=a?-2147483648:2147483647<=a?2147483647:A(b?Math.ceil(a):Math.floor(a))},"~N,~B");c(c$,"reshape",function(a,b,e,c){this.x=a;this.y=b;this.width=e;this.height=c},"~N,~N,~N,~N");c(c$,"getLocation",function(){return new java.awt.Point(this.x,this.y)});c(c$,"setLocation",function(a){this.setLocation(a.x,a.y)},"java.awt.Point");c(c$,"setLocation",function(a,b){this.move(a,b)},"~N,~N");c(c$,"move",function(a,b){this.x=a;this.y=b},"~N,~N");c(c$,"translate", +function(a,b){var e=this.x,c=e+a;0>a?c>e&&(0<=this.width&&(this.width+=c- -2147483648),c=-2147483648):cthis.width&&(this.width=2147483647)),c=2147483647);this.x=c;e=this.y;c=e+b;0>b?c>e&&(0<=this.height&&(this.height+=c- -2147483648),c=-2147483648):cthis.height&&(this.height=2147483647)),c=2147483647);this.y=c},"~N,~N");c(c$,"getSize",function(){return new java.awt.Dimension(this.width,this.height)}); +c(c$,"setSize",function(a){this.setSize(a.width,a.height)},"java.awt.Dimension");c(c$,"setSize",function(a,b){this.resize(a,b)},"~N,~N");c(c$,"resize",function(a,b){this.width=a;this.height=b},"~N,~N");c(c$,"contains",function(a){return this.contains(a.x,a.y)},"java.awt.Point");c(c$,"contains",function(a,b){return this.inside(a,b)},"~N,~N");c(c$,"contains",function(a){return this.contains(a.x,a.y,a.width,a.height)},"java.awt.Rectangle");c(c$,"contains",function(a,b,e,c){var f=this.width,d=this.height; +if(0>(f|d|e|c))return!1;var m=this.x,s=this.y;if(a=m||e>f)return!1}else if(f>=m&&e>f)return!1;d+=s;c+=b;if(c<=b){if(d>=s||c>d)return!1}else if(d>=s&&c>d)return!1;return!0},"~N,~N,~N,~N");c(c$,"inside",function(a,b){var e=this.width,c=this.height;if(0>(e|c))return!1;var f=this.x,d=this.y;if(aa)&&(cb)},"~N,~N");c(c$,"intersects",function(a){var b=this.width,e=this.height,c=a.width,f=a.height;if(0>=c||0>=f||0>=b|| +0>=e)return!1;var d=this.x,m=this.y,s=a.x;a=a.y;c+=s;f+=a;b+=d;e+=m;return(cd)&&(fm)&&(bs)&&(ea)},"java.awt.Rectangle");c(c$,"intersection",function(a){var b=this.x,e=this.y,c=a.x,f=a.y,d;d=b+this.width;var m;m=e+this.height;var s;s=c+a.width;a=f+a.height;bs&&(d=s);m>a&&(m=a);d-=b;m-=e;-2147483648>d&&(d=-2147483648);-2147483648>m&&(m=-2147483648);return new java.awt.Rectangle(b,e,d,m)},"java.awt.Rectangle");c(c$,"union",function(a){var b=this.width,e= +this.height;if(0>(b|e))return new java.awt.Rectangle(a);var c=a.width,f=a.height;if(0>(c|f))return new java.awt.Rectangle(this);var d=this.x,m=this.y,b=b+d,e=e+m,s=a.x;a=a.y;c+=s;f+=a;d>s&&(d=s);m>a&&(m=a);b(this.width|this.height))this.x=a,this.y=b,this.width=this.height=0;else{var e=this.x,c=this.y,f=this.width,d=this.height, +f=f+e,d=d+c;e>a&&(e=a);c>b&&(c=b);f(b|e)&&this.reshape(a.x,a.y,a.width,a.height);var c=a.width,f=a.height;if(!(0>(c|f))){var d=this.x,m=this.y,b=b+d,e=e+m,s=a.x;a=a.y;c+=s;f+=a;d>s&&(d=s);m>a&&(m=a);bf&&(f=-2147483648),-2147483648>e?e=-2147483648:2147483647e?e=-2147483648:2147483647f?f=-2147483648:2147483647d&&(d=-2147483648),-2147483648>c?c=-2147483648:2147483647 +c?c=-2147483648:2147483647d?d=-2147483648:2147483647=this.width||0>=this.height});c(c$,"outcode",function(a,b){var e=0;0>=this.width?e|=5:athis.x+this.width&&(e|=4);0>=this.height?e|=10:bthis.y+this.height&&(e|=8);return e},"~N,~N");d(c$,"createIntersection",function(a){if(j(a,java.awt.Rectangle))return this.intersection(a);var b=new java.awt.geom.Rectangle2D.Double; +java.awt.geom.Rectangle2D.intersect(this,a,b);return b},"java.awt.geom.Rectangle2D");d(c$,"createUnion",function(a){if(j(a,java.awt.Rectangle))return this.union(a);var b=new java.awt.geom.Rectangle2D.Double;java.awt.geom.Rectangle2D.union(this,a,b);return b},"java.awt.geom.Rectangle2D");c(c$,"equals",function(a){return j(a,java.awt.Rectangle)?this.x==a.x&&this.y==a.y&&this.width==a.width&&this.height==a.height:u(this,java.awt.Rectangle,"equals",[a])},"~O");d(c$,"toString",function(){return this.getClass().getName()+ +"[x="+this.x+",y="+this.y+",width="+this.width+",height="+this.height+"]"})});p("java.awt");y(java.awt,"Shape");p("java.awt.geom");n(["java.awt.geom.RectangularShape"],"java.awt.geom.Rectangle2D",["java.lang.Double","java.awt.geom.RectIterator"],function(){c$=t(java.awt.geom,"Rectangle2D",java.awt.geom.RectangularShape);g(c$,function(){r(this,java.awt.geom.Rectangle2D,[])});c(c$,"setRect",function(a){this.setRect(a.getX(),a.getY(),a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");c(c$,"intersectsLine", +function(a,b,e,c){var f,d;if(0==(d=this.outcode(e,c)))return!0;for(;0!=(f=this.outcode(a,b));){if(0!=(f&d))return!1;if(0!=(f&5)){var m=this.getX();0!=(f&4)&&(m+=this.getWidth());b+=(m-a)*(c-b)/(e-a);a=m}else m=this.getY(),0!=(f&8)&&(m+=this.getHeight()),a+=(m-b)*(e-a)/(c-b),b=m}return!0},"~N,~N,~N,~N");c(c$,"intersectsLine",function(a){return this.intersectsLine(a.getX1(),a.getY1(),a.getX2(),a.getY2())},"java.awt.geom.Line2D");c(c$,"outcode",function(a){return this.outcode(a.getX(),a.getY())},"java.awt.geom.Point2D"); +c(c$,"setFrame",function(a,b,e,c){this.setRect(a,b,e,c)},"~N,~N,~N,~N");d(c$,"getBounds2D",function(){return this.clone()});c(c$,"contains",function(a,b){var e=this.getX(),c=this.getY();return a>=e&&b>=c&&a=e||0>=c)return!1;var f=this.getX(),d=this.getY();return a+e>f&&b+c>d&&a=e|| +0>=c)return!1;var f=this.getX(),d=this.getY();return a>=f&&b>=d&&a+e<=f+this.getWidth()&&b+c<=d+this.getHeight()},"~N,~N,~N,~N");c$.intersect=c(c$,"intersect",function(a,b,e){var c=Math.max(a.getMinX(),b.getMinX()),f=Math.max(a.getMinY(),b.getMinY()),d=Math.min(a.getMaxX(),b.getMaxX());a=Math.min(a.getMaxY(),b.getMaxY());e.setFrame(c,f,d-c,a-f)},"java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");c$.union=c(c$,"union",function(a,b,e){var c=Math.min(a.getMinX(),b.getMinX()), +f=Math.min(a.getMinY(),b.getMinY()),d=Math.max(a.getMaxX(),b.getMaxX());a=Math.max(a.getMaxY(),b.getMaxY());e.setFrameFromDiagonal(c,f,d,a)},"java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");c(c$,"add",function(a,b){var e=Math.min(this.getMinX(),a),c=Math.max(this.getMaxX(),a),f=Math.min(this.getMinY(),b),d=Math.max(this.getMaxY(),b);this.setRect(e,f,c-e,d-f)},"~N,~N");c(c$,"add",function(a){this.add(a.getX(),a.getY())},"java.awt.geom.Point2D");c(c$,"add",function(a){var b= +Math.min(this.getMinX(),a.getMinX()),e=Math.max(this.getMaxX(),a.getMaxX()),c=Math.min(this.getMinY(),a.getMinY());a=Math.max(this.getMaxY(),a.getMaxY());this.setRect(b,c,e-b,a-c)},"java.awt.geom.Rectangle2D");c(c$,"getPathIterator",function(a){return new java.awt.geom.RectIterator(this,a)},"java.awt.geom.AffineTransform");c(c$,"getPathIterator",function(a){return new java.awt.geom.RectIterator(this,a)},"java.awt.geom.AffineTransform,~N");d(c$,"hashCode",function(){var a=java.lang.Double.doubleToLongBits(this.getX()), +a=a+37*java.lang.Double.doubleToLongBits(this.getY()),a=a+43*java.lang.Double.doubleToLongBits(this.getWidth()),a=a+47*java.lang.Double.doubleToLongBits(this.getHeight());return a^a>>32});d(c$,"equals",function(a){return a===this?!0:j(a,java.awt.geom.Rectangle2D)?this.getX()==a.getX()&&this.getY()==a.getY()&&this.getWidth()==a.getWidth()&&this.getHeight()==a.getHeight():!1},"~O");w(self.c$);c$=q(function(){this.height=this.width=this.y=this.x=0;k(this,arguments)},java.awt.geom.Rectangle2D,"Float", +java.awt.geom.Rectangle2D);g(c$,function(a,b,e,c){r(this,java.awt.geom.Rectangle2D.Float,[]);0!=arguments.length&&this.setRect(a,b,e,c)},"~N,~N,~N,~N");c(c$,"getX",function(){return this.x});c(c$,"getY",function(){return this.y});c(c$,"getWidth",function(){return this.width});c(c$,"getHeight",function(){return this.height});d(c$,"isEmpty",function(){return 0>=this.width||0>=this.height});c(c$,"setRect",function(a,b,e,c){this.x=a;this.y=b;this.width=e;this.height=c},"~N,~N,~N,~N");c(c$,"setRect",function(a, +b,e,c){this.x=a;this.y=b;this.width=e;this.height=c},"~N,~N,~N,~N");c(c$,"setRect",function(a){this.x=a.getX();this.y=a.getY();this.width=a.getWidth();this.height=a.getHeight()},"java.awt.geom.Rectangle2D");c(c$,"outcode",function(a,b){var e=0;0>=this.width?e|=5:athis.x+this.width&&(e|=4);0>=this.height?e|=10:bthis.y+this.height&&(e|=8);return e},"~N,~N");d(c$,"getBounds2D",function(){return new java.awt.geom.Rectangle2D.Float(this.x,this.y,this.width,this.height)}); +d(c$,"createIntersection",function(a){var b;b=j(a,java.awt.geom.Rectangle2D.Float)?new java.awt.geom.Rectangle2D.Float:new java.awt.geom.Rectangle2D.Double;java.awt.geom.Rectangle2D.intersect(this,a,b);return b},"java.awt.geom.Rectangle2D");d(c$,"createUnion",function(a){var b;b=j(a,java.awt.geom.Rectangle2D.Float)?new java.awt.geom.Rectangle2D.Float:new java.awt.geom.Rectangle2D.Double;java.awt.geom.Rectangle2D.union(this,a,b);return b},"java.awt.geom.Rectangle2D");d(c$,"toString",function(){return this.getClass().getName()+ +"[x="+this.x+",y="+this.y+",w="+this.width+",h="+this.height+"]"});c$=v();w(self.c$);c$=q(function(){this.height=this.width=this.y=this.x=0;k(this,arguments)},java.awt.geom.Rectangle2D,"Double",java.awt.geom.Rectangle2D);g(c$,function(){r(this,java.awt.geom.Rectangle2D.Double,[])});g(c$,function(a,b,e,c){r(this,java.awt.geom.Rectangle2D.Double,[]);this.setRect(a,b,e,c)},"~N,~N,~N,~N");c(c$,"getX",function(){return this.x});c(c$,"getY",function(){return this.y});c(c$,"getWidth",function(){return this.width}); +c(c$,"getHeight",function(){return this.height});d(c$,"isEmpty",function(){return 0>=this.width||0>=this.height});c(c$,"setRect",function(a,b,e,c){this.x=a;this.y=b;this.width=e;this.height=c},"~N,~N,~N,~N");c(c$,"setRect",function(a){this.x=a.getX();this.y=a.getY();this.width=a.getWidth();this.height=a.getHeight()},"java.awt.geom.Rectangle2D");c(c$,"outcode",function(a,b){var e=0;0>=this.width?e|=5:athis.x+this.width&&(e|=4);0>=this.height?e|=10:bthis.y+this.height&& +(e|=8);return e},"~N,~N");d(c$,"getBounds2D",function(){return new java.awt.geom.Rectangle2D.Double(this.x,this.y,this.width,this.height)});d(c$,"createIntersection",function(a){var b=new java.awt.geom.Rectangle2D.Double;java.awt.geom.Rectangle2D.intersect(this,a,b);return b},"java.awt.geom.Rectangle2D");d(c$,"createUnion",function(a){var b=new java.awt.geom.Rectangle2D.Double;java.awt.geom.Rectangle2D.union(this,a,b);return b},"java.awt.geom.Rectangle2D");d(c$,"toString",function(){return this.getClass().getName()+ +"[x="+this.x+",y="+this.y+",w="+this.width+",h="+this.height+"]"});c$=v();x(c$,"OUT_LEFT",1,"OUT_TOP",2,"OUT_RIGHT",4,"OUT_BOTTOM",8)});p("java.awt.geom");n(["java.awt.Shape"],"java.awt.geom.RectangularShape",["java.lang.InternalError","java.awt.geom.FlatteningPathIterator"],function(){c$=t(java.awt.geom,"RectangularShape",null,[java.awt.Shape,Cloneable]);g(c$,function(){});c(c$,"getMinX",function(){return this.getX()});c(c$,"getMinY",function(){return this.getY()});c(c$,"getMaxX",function(){return this.getX()+ +this.getWidth()});c(c$,"getMaxY",function(){return this.getY()+this.getHeight()});c(c$,"getCenterX",function(){return this.getX()+this.getWidth()/2});c(c$,"getCenterY",function(){return this.getY()+this.getHeight()/2});c(c$,"getFrame",function(){return new java.awt.geom.Rectangle2D.Double(this.getX(),this.getY(),this.getWidth(),this.getHeight())});c(c$,"setFrame",function(a,b){this.setFrame(a.getX(),a.getY(),b.getWidth(),b.getHeight())},"java.awt.geom.Point2D,java.awt.geom.Dimension2D");c(c$,"setFrame", +function(a){this.setFrame(a.getX(),a.getY(),a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");c(c$,"setFrameFromDiagonal",function(a,b,e,c){if(ea||0>b)return new java.awt.Rectangle;var e=this.getX(),c=this.getY(),f=Math.floor(e),d=Math.floor(c),a=Math.ceil(e+a),b=Math.ceil(c+b);return new java.awt.Rectangle(A(f),A(d),A(a-f),A(b-d))});d(c$,"getPathIterator",function(a,b){return new java.awt.geom.FlatteningPathIterator(this.getPathIterator(a),b)},"java.awt.geom.AffineTransform,~N");c(c$,"clone",function(){try{return u(this,java.awt.geom.RectangularShape,"clone",[])}catch(a){if(z(a, +CloneNotSupportedException))throw new InternalError;throw a;}})});p("java.awt.geom");n(["java.awt.geom.PathIterator"],"java.awt.geom.FlatteningPathIterator",["java.lang.IllegalArgumentException","java.util.NoSuchElementException","java.awt.geom.CubicCurve2D","$.QuadCurve2D"],function(){c$=q(function(){this.src=null;this.limit=this.squareflat=0;this.hold=null;this.holdIndex=this.holdEnd=this.holdType=this.movy=this.movx=this.cury=this.curx=0;this.levels=null;this.levelIndex=0;this.done=!1;k(this,arguments)}, +java.awt.geom,"FlatteningPathIterator",null,java.awt.geom.PathIterator);I(c$,function(){this.hold=N(14,0)});g(c$,function(a,b){this.construct(a,b,10)},"java.awt.geom.PathIterator,~N");g(c$,function(a,b,e){if(0>b)throw new IllegalArgumentException("flatness must be >= 0");if(0>e)throw new IllegalArgumentException("limit must be >= 0");this.src=a;this.squareflat=b*b;this.limit=e;this.levels=H(e+1,0);this.next(!1)},"java.awt.geom.PathIterator,~N,~N");c(c$,"getFlatness",function(){return Math.sqrt(this.squareflat)}); +c(c$,"getRecursionLimit",function(){return this.limit});c(c$,"getWindingRule",function(){return this.src.getWindingRule()});c(c$,"isDone",function(){return this.done});c(c$,"ensureHoldCapacity",function(a){if(0>this.holdIndex-a){a=this.hold.length-this.holdIndex;var b=N(this.hold.length+24,0);System.arraycopy(this.hold,this.holdIndex,b,this.holdIndex+24,a);this.hold=b;this.holdIndex+=24;this.holdEnd+=24}},"~N");c(c$,"next",function(){this.next(!0)});c(c$,"next",function(a){if(this.holdIndex>=this.holdEnd){a&& +this.src.next();if(this.src.isDone()){this.done=!0;return}this.holdType=this.src.currentSegment(this.hold);this.levelIndex=0;this.levels[0]=0}switch(this.holdType){case 0:case 1:this.curx=this.hold[0];this.cury=this.hold[1];0==this.holdType&&(this.movx=this.curx,this.movy=this.cury);this.holdEnd=this.holdIndex=0;break;case 4:this.curx=this.movx;this.cury=this.movy;this.holdEnd=this.holdIndex=0;break;case 2:this.holdIndex>=this.holdEnd&&(this.holdIndex=this.hold.length-6,this.holdEnd=this.hold.length- +2,this.hold[this.holdIndex+0]=this.curx,this.hold[this.holdIndex+1]=this.cury,this.hold[this.holdIndex+2]=this.hold[0],this.hold[this.holdIndex+3]=this.hold[1],this.hold[this.holdIndex+4]=this.curx=this.hold[2],this.hold[this.holdIndex+5]=this.cury=this.hold[3]);for(a=this.levels[this.levelIndex];a=this.holdEnd&&(this.holdIndex=this.hold.length-8,this.holdEnd=this.hold.length-2,this.hold[this.holdIndex+0]=this.curx,this.hold[this.holdIndex+1]=this.cury,this.hold[this.holdIndex+2]=this.hold[0],this.hold[this.holdIndex+3]=this.hold[1],this.hold[this.holdIndex+4]=this.hold[2],this.hold[this.holdIndex+5]= +this.hold[3],this.hold[this.holdIndex+6]=this.curx=this.hold[4],this.hold[this.holdIndex+7]=this.cury=this.hold[5]);for(a=this.levels[this.levelIndex];af,s=Math.sqrt(s-g),e&&(f=-f),f=Math.pow(f+s,0.3333333333333333),e||(f=-f),b[d++]=f+(0==f?0:m/f)-c);return d},"~A,~A");c$.fixRoots=c(c$,"fixRoots", +function(a,b){for(var e=0;3>e;e++){var c=a[e];1E-5>Math.abs(c)?a[e]=java.awt.geom.CubicCurve2D.findZero(c,0,b):1E-5>Math.abs(c-1)&&(a[e]=java.awt.geom.CubicCurve2D.findZero(c,1,b))}},"~A,~A");c$.solveEqn=c(c$,"solveEqn",function(a,b,c){for(var h=a[b];0<=--b;)h=h*c+a[b];return h},"~A,~N,~N");c$.findZero=c(c$,"findZero",function(a,b,c){for(var h=N(-1,[c[1],2*c[2],3*c[3]]),f,d=0,m=a;;){f=java.awt.geom.CubicCurve2D.solveEqn(h,2,a);if(0==f)return a;var s=java.awt.geom.CubicCurve2D.solveEqn(c,3,a);if(0== +s)return a;f=-(s/f);0==d&&(d=f);if(af)return a}else if(a>b){if(0f*d){if(0!=(m=k:1>k)&&(null==f||0!=f[1]+(2*f[2]+3*f[3]*k)*k)){var p=1-k;a[j++]=d*p*p* +p+3*m*k*p*p+3*s*k*k*p+g*k*k*k}}return j},"~A,~N,~B,~B,~A,~N,~N,~N,~N");c$.getTag=c(c$,"getTag",function(a,b,c){return a<=b?a=c?a>c?2:1:0},"~N,~N,~N");c$.inwards=c(c$,"inwards",function(a,b,c){switch(a){default:return!1;case -1:return 0<=b||0<=c;case 0:return!0;case 1:return 0>=b||0>=c}},"~N,~N,~N");c(c$,"intersects",function(a,b,c,h){if(0>=c||0>=h)return!1;var f=this.getX1(),d=this.getY1(),m=java.awt.geom.CubicCurve2D.getTag(f,a,a+c),s=java.awt.geom.CubicCurve2D.getTag(d,b,b+h);if(0==m&& +0==s)return!0;var g=this.getX2(),j=this.getY2(),k=java.awt.geom.CubicCurve2D.getTag(g,a,a+c),n=java.awt.geom.CubicCurve2D.getTag(j,b,b+h);if(0==k&&0==n)return!0;var p=this.getCtrlX1(),q=this.getCtrlY1(),r=this.getCtrlX2(),t=this.getCtrlY2(),u=java.awt.geom.CubicCurve2D.getTag(p,a,a+c),v=java.awt.geom.CubicCurve2D.getTag(q,b,b+h),w=java.awt.geom.CubicCurve2D.getTag(r,a,a+c),x=java.awt.geom.CubicCurve2D.getTag(t,b,b+h);if(0>m&&0>k&&0>u&&0>w||0>s&&0>n&&0>v&&0>x||0=m*k;x=0>=s*n;if(0==m&&0==k&&x||0==s&&0==n&&v)return!0;w=N(4,0);u=N(4,0);if(!x)return java.awt.geom.CubicCurve2D.fillEqn(w,0>s?b:b+h,d,q,t,j),m=java.awt.geom.CubicCurve2D.solveCubic(w,u),m=java.awt.geom.CubicCurve2D.evalCubic(u,m,!0,!0,null,f,p,r,g),2==m&&0>=java.awt.geom.CubicCurve2D.getTag(u[0],a,a+c)* +java.awt.geom.CubicCurve2D.getTag(u[1],a,a+c);if(!v)return java.awt.geom.CubicCurve2D.fillEqn(w,0>m?a:a+c,f,p,r,g),m=java.awt.geom.CubicCurve2D.solveCubic(w,u),m=java.awt.geom.CubicCurve2D.evalCubic(u,m,!0,!0,null,d,q,t,j),2==m&&0>=java.awt.geom.CubicCurve2D.getTag(u[0],b,b+h)*java.awt.geom.CubicCurve2D.getTag(u[1],b,b+h);var x=g-f,y=j-d,z=j*f-g*d,v=0==s?m:java.awt.geom.CubicCurve2D.getTag((z+x*(0>s?b:b+h))/y,a,a+c),k=0==n?k:java.awt.geom.CubicCurve2D.getTag((z+x*(0>n?b:b+h))/y,a,a+c);if(0>=v*k)return!0; +v=0>=v*m?s:n;java.awt.geom.CubicCurve2D.fillEqn(w,0>k?a:a+c,f,p,r,g);m=java.awt.geom.CubicCurve2D.solveCubic(w,u);m=java.awt.geom.CubicCurve2D.evalCubic(u,m,!0,!0,null,d,q,t,j);a=H(m+1,0);for(c=0;c=a[0]*a[1]||3<=m&&0>=a[2]*a[3]},"~N,~N,~N,~N");c(c$,"intersects",function(a){return this.intersects(a.getX(),a.getY(),a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");c(c$,"contains",function(a, +b,c,h){return 0>=c||0>=h||!this.contains(a,b)||!this.contains(a+c,b)||!this.contains(a+c,b+h)||!this.contains(a,b+h)?!1:!(new java.awt.geom.Rectangle2D.Double(a,b,c,h)).intersectsLine(this.getX1(),this.getY1(),this.getX2(),this.getY2())},"~N,~N,~N,~N");c(c$,"contains",function(a){return this.contains(a.getX(),a.getY(),a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");d(c$,"getBounds",function(){return this.getBounds2D().getBounds()});c(c$,"getPathIterator",function(a){return swingjs.api.Interface.getInstance("java.awt.geom.CubicInterator", +!1).set(this,a)},"java.awt.geom.AffineTransform");c(c$,"getPathIterator",function(a,b){return new java.awt.geom.FlatteningPathIterator(this.getPathIterator(a),b)},"java.awt.geom.AffineTransform,~N");c(c$,"clone",function(){try{return u(this,java.awt.geom.CubicCurve2D,"clone",[])}catch(a){if(z(a,CloneNotSupportedException))throw new InternalError;throw a;}});w(self.c$);c$=q(function(){this.y2=this.x2=this.ctrly2=this.ctrlx2=this.ctrly1=this.ctrlx1=this.y1=this.x1=0;k(this,arguments)},java.awt.geom.CubicCurve2D, +"Float",java.awt.geom.CubicCurve2D);g(c$,function(){r(this,java.awt.geom.CubicCurve2D.Float,[])});g(c$,function(a,b,c,h,f,d,m,s){r(this,java.awt.geom.CubicCurve2D.Float,[]);this.setCurve(a,b,c,h,f,d,m,s)},"~N,~N,~N,~N,~N,~N,~N,~N");d(c$,"getX1",function(){return this.x1});d(c$,"getY1",function(){return this.y1});d(c$,"getP1",function(){return new java.awt.geom.Point2D.Float(this.x1,this.y1)});d(c$,"getCtrlX1",function(){return this.ctrlx1});d(c$,"getCtrlY1",function(){return this.ctrly1});d(c$,"getCtrlP1", +function(){return new java.awt.geom.Point2D.Float(this.ctrlx1,this.ctrly1)});d(c$,"getCtrlX2",function(){return this.ctrlx2});d(c$,"getCtrlY2",function(){return this.ctrly2});d(c$,"getCtrlP2",function(){return new java.awt.geom.Point2D.Float(this.ctrlx2,this.ctrly2)});d(c$,"getX2",function(){return this.x2});d(c$,"getY2",function(){return this.y2});d(c$,"getP2",function(){return new java.awt.geom.Point2D.Float(this.x2,this.y2)});c(c$,"setCurve",function(a,b,c,h,f,d,m,s){this.x1=a;this.y1=b;this.ctrlx1= +c;this.ctrly1=h;this.ctrlx2=f;this.ctrly2=d;this.x2=m;this.y2=s},"~N,~N,~N,~N,~N,~N,~N,~N");c(c$,"setCurve",function(a,b,c,h,f,d,m,s){this.x1=a;this.y1=b;this.ctrlx1=c;this.ctrly1=h;this.ctrlx2=f;this.ctrly2=d;this.x2=m;this.y2=s},"~N,~N,~N,~N,~N,~N,~N,~N");d(c$,"getBounds2D",function(){var a=Math.min(Math.min(this.x1,this.x2),Math.min(this.ctrlx1,this.ctrlx2)),b=Math.min(Math.min(this.y1,this.y2),Math.min(this.ctrly1,this.ctrly2)),c=Math.max(Math.max(this.x1,this.x2),Math.max(this.ctrlx1,this.ctrlx2)), +h=Math.max(Math.max(this.y1,this.y2),Math.max(this.ctrly1,this.ctrly2));return new java.awt.geom.Rectangle2D.Float(a,b,c-a,h-b)});c$=v();w(self.c$);c$=q(function(){this.y2=this.x2=this.ctrly2=this.ctrlx2=this.ctrly1=this.ctrlx1=this.y1=this.x1=0;k(this,arguments)},java.awt.geom.CubicCurve2D,"Double",java.awt.geom.CubicCurve2D);g(c$,function(){r(this,java.awt.geom.CubicCurve2D.Double,[])});g(c$,function(a,b,c,h,f,d,m,s){r(this,java.awt.geom.CubicCurve2D.Double,[]);this.setCurve(a,b,c,h,f,d,m,s)},"~N,~N,~N,~N,~N,~N,~N,~N"); +d(c$,"getX1",function(){return this.x1});d(c$,"getY1",function(){return this.y1});d(c$,"getP1",function(){return new java.awt.geom.Point2D.Double(this.x1,this.y1)});d(c$,"getCtrlX1",function(){return this.ctrlx1});d(c$,"getCtrlY1",function(){return this.ctrly1});d(c$,"getCtrlP1",function(){return new java.awt.geom.Point2D.Double(this.ctrlx1,this.ctrly1)});d(c$,"getCtrlX2",function(){return this.ctrlx2});d(c$,"getCtrlY2",function(){return this.ctrly2});d(c$,"getCtrlP2",function(){return new java.awt.geom.Point2D.Double(this.ctrlx2, +this.ctrly2)});d(c$,"getX2",function(){return this.x2});d(c$,"getY2",function(){return this.y2});d(c$,"getP2",function(){return new java.awt.geom.Point2D.Double(this.x2,this.y2)});c(c$,"setCurve",function(a,b,c,h,f,d,m,s){this.x1=a;this.y1=b;this.ctrlx1=c;this.ctrly1=h;this.ctrlx2=f;this.ctrly2=d;this.x2=m;this.y2=s},"~N,~N,~N,~N,~N,~N,~N,~N");d(c$,"getBounds2D",function(){var a=Math.min(Math.min(this.x1,this.x2),Math.min(this.ctrlx1,this.ctrlx2)),b=Math.min(Math.min(this.y1,this.y2),Math.min(this.ctrly1, +this.ctrly2)),c=Math.max(Math.max(this.x1,this.x2),Math.max(this.ctrlx1,this.ctrlx2)),h=Math.max(Math.max(this.y1,this.y2),Math.max(this.ctrly1,this.ctrly2));return new java.awt.geom.Rectangle2D.Double(a,b,c-a,h-b)});c$=v();x(c$,"BELOW",-2,"LOWEDGE",-1,"INSIDE",0,"HIGHEDGE",1,"ABOVE",2)});p("java.awt.geom");n(["java.awt.geom.PathIterator"],"java.awt.geom.CubicIterator",["java.util.NoSuchElementException"],function(){c$=q(function(){this.affine=this.cubic=null;this.index=0;k(this,arguments)},java.awt.geom, +"CubicIterator",null,java.awt.geom.PathIterator);g(c$,function(){});g(c$,function(a,b){this.set(a,b)},"java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");c(c$,"set",function(a,b){this.cubic=a;this.affine=b;return this},"java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");d(c$,"getWindingRule",function(){return 1});d(c$,"isDone",function(){return 1a&&(a=0)));return 0>a?-1:0=java.awt.geom.Line2D.relativeCCW(a,b,c,h,f,d)*java.awt.geom.Line2D.relativeCCW(a,b,c,h,m,s)&&0>=java.awt.geom.Line2D.relativeCCW(f,d,m,s,a,b)*java.awt.geom.Line2D.relativeCCW(f,d,m,s,c,h)},"~N,~N,~N,~N,~N,~N,~N,~N"); +c(c$,"intersectsLine",function(a,b,c,h){return java.awt.geom.Line2D.linesIntersect(a,b,c,h,this.getX1(),this.getY1(),this.getX2(),this.getY2())},"~N,~N,~N,~N");c(c$,"intersectsLine",function(a){return java.awt.geom.Line2D.linesIntersect(a.getX1(),a.getY1(),a.getX2(),a.getY2(),this.getX1(),this.getY1(),this.getX2(),this.getY2())},"java.awt.geom.Line2D");c$.ptSegDistSq=c(c$,"ptSegDistSq",function(a,b,c,h,f,d){c-=a;h-=b;f-=a;d-=b;0>=f*c+d*h?c=0:(f=c-f,d=h-d,a=f*c+d*h,c=0>=a?0:a*a/(c*c+h*h));f=f*f+d* +d-c;0>f&&(f=0);return f},"~N,~N,~N,~N,~N,~N");c$.ptSegDist=c(c$,"ptSegDist",function(a,b,c,h,f,d){return Math.sqrt(java.awt.geom.Line2D.ptSegDistSq(a,b,c,h,f,d))},"~N,~N,~N,~N,~N,~N");c(c$,"ptSegDistSq",function(a,b){return java.awt.geom.Line2D.ptSegDistSq(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a,b)},"~N,~N");c(c$,"ptSegDistSq",function(a){return java.awt.geom.Line2D.ptSegDistSq(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a.getX(),a.getY())},"java.awt.geom.Point2D");c(c$,"ptSegDist", +function(a,b){return java.awt.geom.Line2D.ptSegDist(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a,b)},"~N,~N");c(c$,"ptSegDist",function(a){return java.awt.geom.Line2D.ptSegDist(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a.getX(),a.getY())},"java.awt.geom.Point2D");c$.ptLineDistSq=c(c$,"ptLineDistSq",function(a,b,c,h,f,d){c-=a;h-=b;f-=a;d-=b;a=f*c+d*h;c=f*f+d*d-a*a/(c*c+h*h);0>c&&(c=0);return c},"~N,~N,~N,~N,~N,~N");c$.ptLineDist=c(c$,"ptLineDist",function(a,b,c,h,f,d){return Math.sqrt(java.awt.geom.Line2D.ptLineDistSq(a, +b,c,h,f,d))},"~N,~N,~N,~N,~N,~N");c(c$,"ptLineDistSq",function(a,b){return java.awt.geom.Line2D.ptLineDistSq(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a,b)},"~N,~N");c(c$,"ptLineDistSq",function(a){return java.awt.geom.Line2D.ptLineDistSq(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a.getX(),a.getY())},"java.awt.geom.Point2D");c(c$,"ptLineDist",function(a,b){return java.awt.geom.Line2D.ptLineDist(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a,b)},"~N,~N");c(c$,"ptLineDist", +function(a){return java.awt.geom.Line2D.ptLineDist(this.getX1(),this.getY1(),this.getX2(),this.getY2(),a.getX(),a.getY())},"java.awt.geom.Point2D");c(c$,"contains",function(){return!1},"~N,~N");c(c$,"contains",function(){return!1},"java.awt.geom.Point2D");c(c$,"intersects",function(a,b,c,h){return this.intersects(new java.awt.geom.Rectangle2D.Double(a,b,c,h))},"~N,~N,~N,~N");c(c$,"intersects",function(a){return a.intersectsLine(this.getX1(),this.getY1(),this.getX2(),this.getY2())},"java.awt.geom.Rectangle2D"); +c(c$,"contains",function(){return!1},"~N,~N,~N,~N");c(c$,"contains",function(){return!1},"java.awt.geom.Rectangle2D");d(c$,"getBounds",function(){return this.getBounds2D().getBounds()});c(c$,"getPathIterator",function(a){return new java.awt.geom.LineIterator(this,a)},"java.awt.geom.AffineTransform");c(c$,"getPathIterator",function(a){return new java.awt.geom.LineIterator(this,a)},"java.awt.geom.AffineTransform,~N");c(c$,"clone",function(){try{return u(this,java.awt.geom.Line2D,"clone",[])}catch(a){if(z(a, +CloneNotSupportedException))throw new InternalError;throw a;}});w(self.c$);c$=q(function(){this.y2=this.x2=this.y1=this.x1=0;k(this,arguments)},java.awt.geom.Line2D,"Float",java.awt.geom.Line2D);g(c$,function(){r(this,java.awt.geom.Line2D.Float,[])});g(c$,function(a,b,c,h){r(this,java.awt.geom.Line2D.Float,[]);this.setLine(a,b,c,h)},"~N,~N,~N,~N");g(c$,function(a,b){r(this,java.awt.geom.Line2D.Float,[]);this.setLine(a,b)},"java.awt.geom.Point2D,java.awt.geom.Point2D");d(c$,"getX1",function(){return this.x1}); +d(c$,"getY1",function(){return this.y1});d(c$,"getP1",function(){return new java.awt.geom.Point2D.Float(this.x1,this.y1)});d(c$,"getX2",function(){return this.x2});d(c$,"getY2",function(){return this.y2});d(c$,"getP2",function(){return new java.awt.geom.Point2D.Float(this.x2,this.y2)});c(c$,"setLine",function(a,b,c,h){this.x1=a;this.y1=b;this.x2=c;this.y2=h},"~N,~N,~N,~N");c(c$,"setLine",function(a,b,c,h){this.x1=a;this.y1=b;this.x2=c;this.y2=h},"~N,~N,~N,~N");d(c$,"getBounds2D",function(){var a, +b,c,h;this.x1m)return 0;m=Math.sqrt(m);0>h&&(m=-m);h=(h+m)/-2;b[d++]=h/c;0!=h&&(b[d++]=f/h)}return d},"~A,~A");c(c$,"contains",function(a,b){var c=this.getX1(),h=this.getY1(),f=this.getCtrlX(),d=this.getCtrlY(),m=this.getX2(),s=this.getY2(),g=c-2*f+m,j=h-2*d+s,m=m-c,s=s-h,k=((a-c)*j-(b-h)*g)/(m*j-s*g);if(0>k||1=f&&a=c&&a=d&&b=h&&b=k:1>k)&&(null==f||0!=f[1]+2*f[2]*k)){var n=1-k;a[g++]=d*n*n+2*m*k*n+s*k*k}}return g},"~A,~N,~B,~B,~A,~N,~N,~N");c$.getTag=c(c$,"getTag",function(a,b,c){return a<=b?a=c?a>c?2:1:0},"~N,~N,~N"); +c$.inwards=c(c$,"inwards",function(a,b,c){switch(a){default:return!1;case -1:return 0<=b||0<=c;case 0:return!0;case 1:return 0>=b||0>=c}},"~N,~N,~N");c(c$,"intersects",function(a,b,c,h){if(0>=c||0>=h)return!1;var f=this.getX1(),d=this.getY1(),m=java.awt.geom.QuadCurve2D.getTag(f,a,a+c),s=java.awt.geom.QuadCurve2D.getTag(d,b,b+h);if(0==m&&0==s)return!0;var g=this.getX2(),j=this.getY2(),k=java.awt.geom.QuadCurve2D.getTag(g,a,a+c),n=java.awt.geom.QuadCurve2D.getTag(j,b,b+h);if(0==k&&0==n)return!0;var p= +this.getCtrlX(),q=this.getCtrlY(),r=java.awt.geom.QuadCurve2D.getTag(p,a,a+c),t=java.awt.geom.QuadCurve2D.getTag(q,b,b+h);if(0>m&&0>k&&0>r||0>s&&0>n&&0>t||0=m*k,v=0>=s*n;if(0==m&&0==k&&v||0==s&&0==n&&u)return!0;t=N(3,0);r=N(3,0);if(!v)return java.awt.geom.QuadCurve2D.fillEqn(t, +0>s?b:b+h,d,q,j),2==java.awt.geom.QuadCurve2D.solveQuadratic(t,r)&&2==java.awt.geom.QuadCurve2D.evalQuadratic(r,2,!0,!0,null,f,p,g)&&0>=java.awt.geom.QuadCurve2D.getTag(r[0],a,a+c)*java.awt.geom.QuadCurve2D.getTag(r[1],a,a+c);if(!u)return java.awt.geom.QuadCurve2D.fillEqn(t,0>m?a:a+c,f,p,g),2==java.awt.geom.QuadCurve2D.solveQuadratic(t,r)&&2==java.awt.geom.QuadCurve2D.evalQuadratic(r,2,!0,!0,null,d,q,j)&&0>=java.awt.geom.QuadCurve2D.getTag(r[0],b,b+h)*java.awt.geom.QuadCurve2D.getTag(r[1],b,b+h); +var v=g-f,w=j-d,x=j*f-g*d,u=0==s?m:java.awt.geom.QuadCurve2D.getTag((x+v*(0>s?b:b+h))/w,a,a+c),k=0==n?k:java.awt.geom.QuadCurve2D.getTag((x+v*(0>n?b:b+h))/w,a,a+c);if(0>=u*k)return!0;u=0>=u*m?s:n;java.awt.geom.QuadCurve2D.fillEqn(t,0>k?a:a+c,f,p,g);a=java.awt.geom.QuadCurve2D.solveQuadratic(t,r);java.awt.geom.QuadCurve2D.evalQuadratic(r,a,!0,!0,null,d,q,j);k=java.awt.geom.QuadCurve2D.getTag(r[0],b,b+h);return 0>=u*k},"~N,~N,~N,~N");c(c$,"intersects",function(a){return this.intersects(a.getX(),a.getY(), +a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");c(c$,"contains",function(a,b,c,h){return 0>=c||0>=h?!1:this.contains(a,b)&&this.contains(a+c,b)&&this.contains(a+c,b+h)&&this.contains(a,b+h)},"~N,~N,~N,~N");c(c$,"contains",function(a){return this.contains(a.getX(),a.getY(),a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");d(c$,"getBounds",function(){return this.getBounds2D().getBounds()});c(c$,"getPathIterator",function(a){return new java.awt.geom.QuadIterator(this,a)},"java.awt.geom.AffineTransform"); +c(c$,"getPathIterator",function(a,b){return new java.awt.geom.FlatteningPathIterator(this.getPathIterator(a),b)},"java.awt.geom.AffineTransform,~N");c(c$,"clone",function(){try{return u(this,java.awt.geom.QuadCurve2D,"clone",[])}catch(a){if(z(a,CloneNotSupportedException))throw new InternalError;throw a;}});w(self.c$);c$=q(function(){this.y2=this.x2=this.ctrly=this.ctrlx=this.y1=this.x1=0;k(this,arguments)},java.awt.geom.QuadCurve2D,"Float",java.awt.geom.QuadCurve2D);g(c$,function(){r(this,java.awt.geom.QuadCurve2D.Float, +[])});g(c$,function(a,b,c,h,f,d){r(this,java.awt.geom.QuadCurve2D.Float,[]);this.setCurve(a,b,c,h,f,d)},"~N,~N,~N,~N,~N,~N");d(c$,"getX1",function(){return this.x1});d(c$,"getY1",function(){return this.y1});d(c$,"getP1",function(){return new java.awt.geom.Point2D.Float(this.x1,this.y1)});d(c$,"getCtrlX",function(){return this.ctrlx});d(c$,"getCtrlY",function(){return this.ctrly});d(c$,"getCtrlPt",function(){return new java.awt.geom.Point2D.Float(this.ctrlx,this.ctrly)});d(c$,"getX2",function(){return this.x2}); +d(c$,"getY2",function(){return this.y2});d(c$,"getP2",function(){return new java.awt.geom.Point2D.Float(this.x2,this.y2)});c(c$,"setCurve",function(a,b,c,h,f,d){this.x1=a;this.y1=b;this.ctrlx=c;this.ctrly=h;this.x2=f;this.y2=d},"~N,~N,~N,~N,~N,~N");c(c$,"setCurve",function(a,b,c,h,f,d){this.x1=a;this.y1=b;this.ctrlx=c;this.ctrly=h;this.x2=f;this.y2=d},"~N,~N,~N,~N,~N,~N");d(c$,"getBounds2D",function(){var a=Math.min(Math.min(this.x1,this.x2),this.ctrlx),b=Math.min(Math.min(this.y1,this.y2),this.ctrly), +c=Math.max(Math.max(this.x1,this.x2),this.ctrlx),h=Math.max(Math.max(this.y1,this.y2),this.ctrly);return new java.awt.geom.Rectangle2D.Float(a,b,c-a,h-b)});c$=v();w(self.c$);c$=q(function(){this.y2=this.x2=this.ctrly=this.ctrlx=this.y1=this.x1=0;k(this,arguments)},java.awt.geom.QuadCurve2D,"Double",java.awt.geom.QuadCurve2D);g(c$,function(){r(this,java.awt.geom.QuadCurve2D.Double,[])});g(c$,function(a,b,c,h,f,d){r(this,java.awt.geom.QuadCurve2D.Double,[]);this.setCurve(a,b,c,h,f,d)},"~N,~N,~N,~N,~N,~N"); +d(c$,"getX1",function(){return this.x1});d(c$,"getY1",function(){return this.y1});d(c$,"getP1",function(){return new java.awt.geom.Point2D.Double(this.x1,this.y1)});d(c$,"getCtrlX",function(){return this.ctrlx});d(c$,"getCtrlY",function(){return this.ctrly});d(c$,"getCtrlPt",function(){return new java.awt.geom.Point2D.Double(this.ctrlx,this.ctrly)});d(c$,"getX2",function(){return this.x2});d(c$,"getY2",function(){return this.y2});d(c$,"getP2",function(){return new java.awt.geom.Point2D.Double(this.x2, +this.y2)});c(c$,"setCurve",function(a,b,c,h,f,d){this.x1=a;this.y1=b;this.ctrlx=c;this.ctrly=h;this.x2=f;this.y2=d},"~N,~N,~N,~N,~N,~N");d(c$,"getBounds2D",function(){var a=Math.min(Math.min(this.x1,this.x2),this.ctrlx),b=Math.min(Math.min(this.y1,this.y2),this.ctrly),c=Math.max(Math.max(this.x1,this.x2),this.ctrlx),h=Math.max(Math.max(this.y1,this.y2),this.ctrly);return new java.awt.geom.Rectangle2D.Double(a,b,c-a,h-b)});c$=v();x(c$,"BELOW",-2,"LOWEDGE",-1,"INSIDE",0,"HIGHEDGE",1,"ABOVE",2)});p("java.awt.geom"); +n(["java.awt.geom.PathIterator"],"java.awt.geom.QuadIterator",["java.util.NoSuchElementException"],function(){c$=q(function(){this.affine=this.quad=null;this.index=0;k(this,arguments)},java.awt.geom,"QuadIterator",null,java.awt.geom.PathIterator);g(c$,function(a,b){this.quad=a;this.affine=b},"java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform");d(c$,"getWindingRule",function(){return 1});d(c$,"isDone",function(){return 1f&&a.add(new jssun.awt.geom.Order1(h,f,b,c,-1))},"java.util.Vector,~N,~N,~N,~N");c$.insertQuad=c(c$,"insertQuad",function(a,b,c,h){var f=h[3];c>f?jssun.awt.geom.Order2.insert(a,h,h[2],f,h[0],h[1],b,c,-1):c==f&&c==h[1]||jssun.awt.geom.Order2.insert(a,h,b,c,h[0],h[1],h[2],f,1)},"java.util.Vector,~N,~N,~A");c$.insertCubic= +c(c$,"insertCubic",function(a,b,c,h){var f=h[5];c>f?jssun.awt.geom.Order3.insert(a,h,h[4],f,h[2],h[3],h[0],h[1],b,c,-1):c==f&&c==h[1]&&c==h[3]||jssun.awt.geom.Order3.insert(a,h,b,c,h[0],h[1],h[2],h[3],h[4],f,1)},"java.util.Vector,~N,~N,~A");c$.pointCrossingsForPath=c(c$,"pointCrossingsForPath",function(a,b,c){if(a.isDone())return 0;var h=N(6,0);if(0!=a.currentSegment(h))throw new java.awt.geom.IllegalPathStateException("missing initial moveto in path definition");a.next();for(var f=h[0],d=h[1],m= +f,s=d,g,j,k=0;!a.isDone();){switch(a.currentSegment(h)){case 0:s!=d&&(k+=jssun.awt.geom.Curve.pointCrossingsForLine(b,c,m,s,f,d));f=m=h[0];d=s=h[1];break;case 1:g=h[0];j=h[1];k+=jssun.awt.geom.Curve.pointCrossingsForLine(b,c,m,s,g,j);m=g;s=j;break;case 2:g=h[2];j=h[3];k+=jssun.awt.geom.Curve.pointCrossingsForQuad(b,c,m,s,h[0],h[1],g,j,0);m=g;s=j;break;case 3:g=h[4];j=h[5];k+=jssun.awt.geom.Curve.pointCrossingsForCubic(b,c,m,s,h[0],h[1],h[2],h[3],g,j,0);m=g;s=j;break;case 4:s!=d&&(k+=jssun.awt.geom.Curve.pointCrossingsForLine(b, +c,m,s,f,d)),m=f,s=d}a.next()}s!=d&&(k+=jssun.awt.geom.Curve.pointCrossingsForLine(b,c,m,s,f,d));return k},"java.awt.geom.PathIterator,~N,~N");c$.pointCrossingsForLine=c(c$,"pointCrossingsForLine",function(a,b,c,h,f,d){return b=h&&b>=d||a>=c&&a>=f?0:a=c+(b-h)*(f-c)/(d-h)?0:h=h&&b>=d&&b>=s||a>=c&&a>=f&&a>=m)return 0;if(a= +h){if(b=s)return-1;return 0}if(52=h&& +b>=d&&b>=s&&b>=j||a>=c&&a>=f&&a>=m&&a>=g)return 0;if(a=h){if(b=j)return-1;return 0}if(52=f&&g>=f||m<=c&&g<=c||d<=b&&s<=b)return a;if(d>=h&&s>=h)return m=f&&a++):g=f&&a--),a;if(d>b&&dc&&mb&&sc&&gf&&(j+=(f-m)*(s-d)/(g-m));var k=s;gf&&(k+=(f-g)*(d-s)/(m-g));return j<=b&&k<=b?a:j>=h&&k>=h?(m=f&&a++):g=f&&a--),a):-2147483648},"~N,~N,~N,~N,~N,~N,~N,~N,~N");c$.rectCrossingsForQuad=c(c$,"rectCrossingsForQuad",function(a,b,c,h,f,d,m,s,g,j,k,n){if(m>=f&&g>=f&&k>=f||m<=c&&g<=c&&k<=c||d<=b&&s<=b&&j<=b)return a;if(d>=h&&s>=h&&j>=h)return mc&&a++,m=f&&a++):kc&&a--,k=f&&a--),a;if(db&&mc||jb&&kc)return-2147483648;if(52=f&&g>=f&&k>=f&&p>=f||m<=c&&g<=c&&k<=c&&p<=c||d<=b&&s<=b&&j<=b&&n<=b)return a;if(d>=h&&s>=h&&j>=h&&n>=h)return mc&&a++,m=f&&a++):pc&&a--,p=f&&a--),a;if(d>b&&dc&&mb&&nc&&pb?1:0},"~N,~N");c$.signeddiffbits=c(c$,"signeddiffbits",function(a,b){return Double.doubleToLongBits(a)-Double.doubleToLongBits(b)}, +"~N,~N");c$.diffbits=c(c$,"diffbits",function(a,b){return Math.abs(Double.doubleToLongBits(a)-Double.doubleToLongBits(b))},"~N,~N");c$.prev=c(c$,"prev",function(a){return Double.longBitsToDouble(Double.doubleToLongBits(a)-1)},"~N");c$.next=c(c$,"next",function(a){return Double.longBitsToDouble(Double.doubleToLongBits(a)+1)},"~N");d(c$,"toString",function(){return"Curve["+this.getOrder()+", "+("("+jssun.awt.geom.Curve.round(this.getX0())+", "+jssun.awt.geom.Curve.round(this.getY0())+"), ")+this.controlPointString()+ +("("+jssun.awt.geom.Curve.round(this.getX1())+", "+jssun.awt.geom.Curve.round(this.getY1())+"), ")+(1==this.direction?"D":"U")+"]"});c(c$,"controlPointString",function(){return""});c(c$,"crossingsFor",function(a,b){return b>=this.getYTop()&&b=b)return!1;var c=a.getXLo(),h=a.getYLo(),f=a.getYHi(),d=this.getYTop(),m=this.getYBot();if(d=f)return!1;h=0}m>f?(m=f,f=this.TforY(f)):f=1;for(var s=!1,g=!1;;){var j=this.XforT(h);if(jc)return!0;s=!0}else{if(s)return!0;g=!0}if(h>=f)break;h=this.nextVertical(h,f)}s&&a.record(d,m,this.direction);return!1},"jssun.awt.geom.Crossings");c(c$,"getSubCurve",function(a,b){return this.getSubCurve(a,b,this.direction)},"~N,~N");c(c$,"compareTo",function(a,b){var c=b[0],h=b[1],h=Math.min(Math.min(h,this.getYBot()),a.getYBot());if(h<=b[0])throw System.err.println("this == "+ +this),System.err.println("that == "+a),System.out.println("target range = "+b[0]+"=>"+b[1]),new InternalError("backstepping from "+b[0]+" to "+h);b[1]=h;if(this.getXMax()<=a.getXMin())return this.getXMin()==a.getXMax()?0:-1;if(this.getXMin()>=a.getXMax())return 1;var f=this.TforY(c),d=this.YforT(f);dt)r=t}else{for(u-=r;;){r/=2;t=u+r;if(t<=u)break;this.fairlyClose(this.XforY(t),a.XforY(t))&&(u=t)}break}u+=r}if(u>c)return u=q&&System.out.println("ymin = "+q);f"+b[1]),System.err.println("s y range is "+d+"=>"+r),System.err.println("t y range is "+j+"=>"+v),System.err.println("ymin is "+q),0}if(rb[0]){rb[0]){vv||r>n||Math.min(m,k)>Math.max(q,u)||Math.max(m,k)=r&&A>=g&&this.findIntersect(a,b,c,h+1,f+1,d,m,g,w,x,y,p,q,r,z,B,A)||y>=A&&this.findIntersect(a,b,c,h+1,f+1,d,m,g,w,x,y,z,B,A,t,u,v)||A>=y&&this.findIntersect(a,b,c,h+1,f+1,w,x,y,j,k,n,p,q,r,z,B,A)||n>=A&&v>=y&&this.findIntersect(a,b,c,h+1,f+1,w,x,y,j,k,n,z,B,A,t,u,v))return!0}else if(y>=r&&this.findIntersect(a,b,c,h+1,f,d,m,g,w,x,y,p,q,r,t,u,v)||v>=y&&this.findIntersect(a,b,c,h+1,f,w,x,y,j,k,n,p,q,r,t,u,v))return!0}else if(0.001=g&&this.findIntersect(a,b,c,h,f+1,d,m,g,j,k,n,p,q,r,z,B,A)||n>=A&&this.findIntersect(a,b,c,h,f+1,d,m,g,j,k,n,z,B,A,t,u,v))return!0}else if(c=k-m,n-=g,w=u-q,v-=r,m=q-m,g=r-g,r=w*n-v*c,0!=r&&(r=1/r,w=(w*g-v*m)*r,z=(c*g-n*m)*r,0<=w&&(1>=w&&0<=z&&1>=z)&&(w=d+w*(j-d),z=p+z*(t-p),(0>w||1z||1b[0])))return b[1]=a,!0;return!1},"jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N"); +c(c$,"refineTforY",function(a,b,c){for(b=1;;){var h=(a+b)/2;if(h==a||h==b)return b;var f=this.YforT(h);if(fc)b=h;else return b}},"~N,~N,~N");c(c$,"fairlyClose",function(a,b){return Math.abs(a-b)<1E-10*Math.max(Math.abs(a),Math.abs(b))},"~N,~N");x(c$,"INCREASING",1,"DECREASING",-1,"RECT_INTERSECTS",2147483648,"TMIN",0.001)});p("java.awt.geom");n(["java.lang.RuntimeException"],"java.awt.geom.IllegalPathStateException",null,function(){c$=t(java.awt.geom,"IllegalPathStateException",RuntimeException); +g(c$,function(){r(this,java.awt.geom.IllegalPathStateException,[])})});p("java.awt.geom");n(["java.awt.geom.PathIterator"],"java.awt.geom.RectIterator",["java.util.NoSuchElementException"],function(){c$=q(function(){this.h=this.w=this.y=this.x=0;this.affine=null;this.index=0;k(this,arguments)},java.awt.geom,"RectIterator",null,java.awt.geom.PathIterator);g(c$,function(a,b){this.x=a.getX();this.y=a.getY();this.w=a.getWidth();this.h=a.getHeight();this.affine=b;if(0>this.w||0>this.h)this.index=6},"java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform"); +d(c$,"getWindingRule",function(){return 1});d(c$,"isDone",function(){return 5m||4=a||65<=a&&90>=a)return String.valueOf(String.fromCharCode(a));switch(a){case 10:return java.awt.Toolkit.getProperty("AWT.enter","Enter");case 8:return java.awt.Toolkit.getProperty("AWT.backSpace", +"Backspace");case 9:return java.awt.Toolkit.getProperty("AWT.tab","Tab");case 3:return java.awt.Toolkit.getProperty("AWT.cancel","Cancel");case 12:return java.awt.Toolkit.getProperty("AWT.clear","Clear");case 65312:return java.awt.Toolkit.getProperty("AWT.compose","Compose");case 19:return java.awt.Toolkit.getProperty("AWT.pause","Pause");case 20:return java.awt.Toolkit.getProperty("AWT.capsLock","Caps Lock");case 27:return java.awt.Toolkit.getProperty("AWT.escape","Escape");case 32:return java.awt.Toolkit.getProperty("AWT.space", +"Space");case 33:return java.awt.Toolkit.getProperty("AWT.pgup","Page Up");case 34:return java.awt.Toolkit.getProperty("AWT.pgdn","Page Down");case 35:return java.awt.Toolkit.getProperty("AWT.end","End");case 36:return java.awt.Toolkit.getProperty("AWT.home","Home");case 37:return java.awt.Toolkit.getProperty("AWT.left","Left");case 38:return java.awt.Toolkit.getProperty("AWT.up","Up");case 39:return java.awt.Toolkit.getProperty("AWT.right","Right");case 40:return java.awt.Toolkit.getProperty("AWT.down", +"Down");case 65368:return java.awt.Toolkit.getProperty("AWT.begin","Begin");case 16:return java.awt.Toolkit.getProperty("AWT.shift","Shift");case 17:return java.awt.Toolkit.getProperty("AWT.control","Control");case 18:return java.awt.Toolkit.getProperty("AWT.alt","Alt");case 157:return java.awt.Toolkit.getProperty("AWT.meta","Meta");case 65406:return java.awt.Toolkit.getProperty("AWT.altGraph","Alt Graph");case 44:return java.awt.Toolkit.getProperty("AWT.comma","Comma");case 46:return java.awt.Toolkit.getProperty("AWT.period", +"Period");case 47:return java.awt.Toolkit.getProperty("AWT.slash","Slash");case 59:return java.awt.Toolkit.getProperty("AWT.semicolon","Semicolon");case 61:return java.awt.Toolkit.getProperty("AWT.equals","Equals");case 91:return java.awt.Toolkit.getProperty("AWT.openBracket","Open Bracket");case 92:return java.awt.Toolkit.getProperty("AWT.backSlash","Back Slash");case 93:return java.awt.Toolkit.getProperty("AWT.closeBracket","Close Bracket");case 106:return java.awt.Toolkit.getProperty("AWT.multiply", +"NumPad *");case 107:return java.awt.Toolkit.getProperty("AWT.add","NumPad +");case 108:return java.awt.Toolkit.getProperty("AWT.separator","NumPad ,");case 109:return java.awt.Toolkit.getProperty("AWT.subtract","NumPad -");case 110:return java.awt.Toolkit.getProperty("AWT.decimal","NumPad .");case 111:return java.awt.Toolkit.getProperty("AWT.divide","NumPad /");case 127:return java.awt.Toolkit.getProperty("AWT.delete","Delete");case 144:return java.awt.Toolkit.getProperty("AWT.numLock","Num Lock"); +case 145:return java.awt.Toolkit.getProperty("AWT.scrollLock","Scroll Lock");case 524:return java.awt.Toolkit.getProperty("AWT.windows","Windows");case 525:return java.awt.Toolkit.getProperty("AWT.context","Context Menu");case 112:return java.awt.Toolkit.getProperty("AWT.f1","F1");case 113:return java.awt.Toolkit.getProperty("AWT.f2","F2");case 114:return java.awt.Toolkit.getProperty("AWT.f3","F3");case 115:return java.awt.Toolkit.getProperty("AWT.f4","F4");case 116:return java.awt.Toolkit.getProperty("AWT.f5", +"F5");case 117:return java.awt.Toolkit.getProperty("AWT.f6","F6");case 118:return java.awt.Toolkit.getProperty("AWT.f7","F7");case 119:return java.awt.Toolkit.getProperty("AWT.f8","F8");case 120:return java.awt.Toolkit.getProperty("AWT.f9","F9");case 121:return java.awt.Toolkit.getProperty("AWT.f10","F10");case 122:return java.awt.Toolkit.getProperty("AWT.f11","F11");case 123:return java.awt.Toolkit.getProperty("AWT.f12","F12");case 61440:return java.awt.Toolkit.getProperty("AWT.f13","F13");case 61441:return java.awt.Toolkit.getProperty("AWT.f14", +"F14");case 61442:return java.awt.Toolkit.getProperty("AWT.f15","F15");case 61443:return java.awt.Toolkit.getProperty("AWT.f16","F16");case 61444:return java.awt.Toolkit.getProperty("AWT.f17","F17");case 61445:return java.awt.Toolkit.getProperty("AWT.f18","F18");case 61446:return java.awt.Toolkit.getProperty("AWT.f19","F19");case 61447:return java.awt.Toolkit.getProperty("AWT.f20","F20");case 61448:return java.awt.Toolkit.getProperty("AWT.f21","F21");case 61449:return java.awt.Toolkit.getProperty("AWT.f22", +"F22");case 61450:return java.awt.Toolkit.getProperty("AWT.f23","F23");case 61451:return java.awt.Toolkit.getProperty("AWT.f24","F24");case 154:return java.awt.Toolkit.getProperty("AWT.printScreen","Print Screen");case 155:return java.awt.Toolkit.getProperty("AWT.insert","Insert");case 156:return java.awt.Toolkit.getProperty("AWT.help","Help");case 192:return java.awt.Toolkit.getProperty("AWT.backQuote","Back Quote");case 222:return java.awt.Toolkit.getProperty("AWT.quote","Quote");case 224:return java.awt.Toolkit.getProperty("AWT.up", +"Up");case 225:return java.awt.Toolkit.getProperty("AWT.down","Down");case 226:return java.awt.Toolkit.getProperty("AWT.left","Left");case 227:return java.awt.Toolkit.getProperty("AWT.right","Right");case 128:return java.awt.Toolkit.getProperty("AWT.deadGrave","Dead Grave");case 129:return java.awt.Toolkit.getProperty("AWT.deadAcute","Dead Acute");case 130:return java.awt.Toolkit.getProperty("AWT.deadCircumflex","Dead Circumflex");case 131:return java.awt.Toolkit.getProperty("AWT.deadTilde","Dead Tilde"); +case 132:return java.awt.Toolkit.getProperty("AWT.deadMacron","Dead Macron");case 133:return java.awt.Toolkit.getProperty("AWT.deadBreve","Dead Breve");case 134:return java.awt.Toolkit.getProperty("AWT.deadAboveDot","Dead Above Dot");case 135:return java.awt.Toolkit.getProperty("AWT.deadDiaeresis","Dead Diaeresis");case 136:return java.awt.Toolkit.getProperty("AWT.deadAboveRing","Dead Above Ring");case 137:return java.awt.Toolkit.getProperty("AWT.deadDoubleAcute","Dead Double Acute");case 138:return java.awt.Toolkit.getProperty("AWT.deadCaron", +"Dead Caron");case 139:return java.awt.Toolkit.getProperty("AWT.deadCedilla","Dead Cedilla");case 140:return java.awt.Toolkit.getProperty("AWT.deadOgonek","Dead Ogonek");case 141:return java.awt.Toolkit.getProperty("AWT.deadIota","Dead Iota");case 142:return java.awt.Toolkit.getProperty("AWT.deadVoicedSound","Dead Voiced Sound");case 143:return java.awt.Toolkit.getProperty("AWT.deadSemivoicedSound","Dead Semivoiced Sound");case 150:return java.awt.Toolkit.getProperty("AWT.ampersand","Ampersand"); +case 151:return java.awt.Toolkit.getProperty("AWT.asterisk","Asterisk");case 152:return java.awt.Toolkit.getProperty("AWT.quoteDbl","Double Quote");case 153:return java.awt.Toolkit.getProperty("AWT.Less","Less");case 160:return java.awt.Toolkit.getProperty("AWT.greater","Greater");case 161:return java.awt.Toolkit.getProperty("AWT.braceLeft","Left Brace");case 162:return java.awt.Toolkit.getProperty("AWT.braceRight","Right Brace");case 512:return java.awt.Toolkit.getProperty("AWT.at","At");case 513:return java.awt.Toolkit.getProperty("AWT.colon", +"Colon");case 514:return java.awt.Toolkit.getProperty("AWT.circumflex","Circumflex");case 515:return java.awt.Toolkit.getProperty("AWT.dollar","Dollar");case 516:return java.awt.Toolkit.getProperty("AWT.euro","Euro");case 517:return java.awt.Toolkit.getProperty("AWT.exclamationMark","Exclamation Mark");case 518:return java.awt.Toolkit.getProperty("AWT.invertedExclamationMark","Inverted Exclamation Mark");case 519:return java.awt.Toolkit.getProperty("AWT.leftParenthesis","Left Parenthesis");case 520:return java.awt.Toolkit.getProperty("AWT.numberSign", +"Number Sign");case 45:return java.awt.Toolkit.getProperty("AWT.minus","Minus");case 521:return java.awt.Toolkit.getProperty("AWT.plus","Plus");case 522:return java.awt.Toolkit.getProperty("AWT.rightParenthesis","Right Parenthesis");case 523:return java.awt.Toolkit.getProperty("AWT.underscore","Underscore");case 24:return java.awt.Toolkit.getProperty("AWT.final","Final");case 28:return java.awt.Toolkit.getProperty("AWT.convert","Convert");case 29:return java.awt.Toolkit.getProperty("AWT.noconvert", +"No Convert");case 30:return java.awt.Toolkit.getProperty("AWT.accept","Accept");case 31:return java.awt.Toolkit.getProperty("AWT.modechange","Mode Change");case 21:return java.awt.Toolkit.getProperty("AWT.kana","Kana");case 25:return java.awt.Toolkit.getProperty("AWT.kanji","Kanji");case 240:return java.awt.Toolkit.getProperty("AWT.alphanumeric","Alphanumeric");case 241:return java.awt.Toolkit.getProperty("AWT.katakana","Katakana");case 242:return java.awt.Toolkit.getProperty("AWT.hiragana","Hiragana"); +case 243:return java.awt.Toolkit.getProperty("AWT.fullWidth","Full-Width");case 244:return java.awt.Toolkit.getProperty("AWT.halfWidth","Half-Width");case 245:return java.awt.Toolkit.getProperty("AWT.romanCharacters","Roman Characters");case 256:return java.awt.Toolkit.getProperty("AWT.allCandidates","All Candidates");case 257:return java.awt.Toolkit.getProperty("AWT.previousCandidate","Previous Candidate");case 258:return java.awt.Toolkit.getProperty("AWT.codeInput","Code Input");case 259:return java.awt.Toolkit.getProperty("AWT.japaneseKatakana", +"Japanese Katakana");case 260:return java.awt.Toolkit.getProperty("AWT.japaneseHiragana","Japanese Hiragana");case 261:return java.awt.Toolkit.getProperty("AWT.japaneseRoman","Japanese Roman");case 262:return java.awt.Toolkit.getProperty("AWT.kanaLock","Kana Lock");case 263:return java.awt.Toolkit.getProperty("AWT.inputMethodOnOff","Input Method On/Off");case 65481:return java.awt.Toolkit.getProperty("AWT.again","Again");case 65483:return java.awt.Toolkit.getProperty("AWT.undo","Undo");case 65485:return java.awt.Toolkit.getProperty("AWT.copy", +"Copy");case 65487:return java.awt.Toolkit.getProperty("AWT.paste","Paste");case 65489:return java.awt.Toolkit.getProperty("AWT.cut","Cut");case 65488:return java.awt.Toolkit.getProperty("AWT.find","Find");case 65482:return java.awt.Toolkit.getProperty("AWT.props","Props");case 65480:return java.awt.Toolkit.getProperty("AWT.stop","Stop")}if(96<=a&&105>=a){var b=java.awt.Toolkit.getProperty("AWT.numpad","NumPad");a=String.fromCharCode(a-96+48);return b+"-"+a}return java.awt.Toolkit.getProperty("AWT.unknown", +"Unknown")+" keyCode: 0x"+Integer.toString(a,16)},"~N");c$.getKeyModifiersText=c(c$,"getKeyModifiersText",function(a){var b=new StringBuilder;0!=(a&4)&&(b.append(java.awt.Toolkit.getProperty("AWT.meta","Meta")),b.append("+"));0!=(a&2)&&(b.append(java.awt.Toolkit.getProperty("AWT.control","Ctrl")),b.append("+"));0!=(a&8)&&(b.append(java.awt.Toolkit.getProperty("AWT.alt","Alt")),b.append("+"));0!=(a&1)&&(b.append(java.awt.Toolkit.getProperty("AWT.shift","Shift")),b.append("+"));0!=(a&32)&&(b.append(java.awt.Toolkit.getProperty("AWT.altGraph", +"Alt Graph")),b.append("+"));0!=(a&16)&&(b.append(java.awt.Toolkit.getProperty("AWT.button1","Button1")),b.append("+"));0=h.length)c=-1}this.setDisplayedMnemonicIndex(c)}},"javax.swing.Action,~B");c(c$,"setMnemonicFromAction",function(a){a=null==a?null:a.getValue("MnemonicKey"); +this.setMnemonic(null==a?"\x00":a)},"javax.swing.Action");c(c$,"setTextFromAction",function(a,b){var c=this.getHideActionText();b?c||this.setText(a.getValue("Name")):this.setText(null!=a&&!c?a.getValue("Name"):null)},"javax.swing.Action,~B");c(c$,"setIconFromAction",function(a){var b=null;null!=a&&(b=a.getValue("SwingLargeIconKey"),null==b&&(b=a.getValue("SmallIcon")));this.setIcon(b)},"javax.swing.Action");c(c$,"smallIconChanged",function(a){null==a.getValue("SwingLargeIconKey")&&this.setIconFromAction(a)}, +"javax.swing.Action");c(c$,"largeIconChanged",function(a){this.setIconFromAction(a)},"javax.swing.Action");c(c$,"setActionCommandFromAction",function(a){this.setActionCommand(null!=a?a.getValue("ActionCommandKey"):null)},"javax.swing.Action");c(c$,"setSelectedFromAction",function(a){var b=!1;null!=a&&(b=javax.swing.AbstractAction.isSelected(a));b!=this.isSelected()&&(this.setSelected(b),!b&&this.isSelected()&&j(this.getModel(),javax.swing.DefaultButtonModel)&&(a=this.getModel().getGroup(),null!=a&& +a.clearSelection()))},"javax.swing.Action");c(c$,"createActionPropertyChangeListener",function(a){return this.createActionPropertyChangeListener0(a)},"javax.swing.Action");c(c$,"createActionPropertyChangeListener0",function(a){return new javax.swing.AbstractButton.ButtonActionPropertyChangeListener(this,a)},"javax.swing.Action");c(c$,"isBorderPainted",function(){return this.$paintBorder});c(c$,"setBorderPainted",function(a){var b=this.$paintBorder;this.$paintBorder=a;this.borderPaintedSet=!0;this.firePropertyChangeBool("borderPainted", +b,this.$paintBorder);a!=b&&(this.revalidate(),this.repaint())},"~B");c(c$,"paintBorder",function(a){this.isBorderPainted()&&u(this,javax.swing.AbstractButton,"paintBorder",[a])},"java.awt.Graphics");c(c$,"isFocusPainted",function(){return this.paintFocus});c(c$,"setFocusPainted",function(a){var b=this.paintFocus;this.paintFocus=a;this.firePropertyChangeBool("focusPainted",b,this.paintFocus);a!=b&&this.isFocusOwner()&&(this.revalidate(),this.repaint())},"~B");c(c$,"isContentAreaFilled",function(){return this.contentAreaFilled}); +c(c$,"setContentAreaFilled",function(a){var b=this.contentAreaFilled;this.contentAreaFilled=a;this.contentAreaFilledSet=!0;this.firePropertyChangeBool("contentAreaFilled",b,this.contentAreaFilled);a!=b&&this.repaint()},"~B");c(c$,"isRolloverEnabled",function(){return this.rolloverEnabled});c(c$,"setRolloverEnabled",function(a){var b=this.rolloverEnabled;this.rolloverEnabled=a;this.rolloverEnabledSet=!0;this.firePropertyChangeBool("rolloverEnabled",b,this.rolloverEnabled);a!=b&&this.repaint()},"~B"); +c(c$,"getMnemonic",function(){return this.mnemonic});c(c$,"setMnemonic",function(a){this.model.setMnemonic(a);this.updateMnemonicProperties()},"~N");c(c$,"setMnemonic",function(a){a=a.charCodeAt(0);97<=a&&122>=a&&(a-=32);this.setMnemonic(a)},"~S");c(c$,"setDisplayedMnemonicIndex",function(a){var b=this.mnemonicIndex;if(-1==a)this.mnemonicIndex=-1;else{var c=this.getText(),c=null==c?0:c.length;if(-1>a||a>=c)throw new IllegalArgumentException("index == "+a);}this.mnemonicIndex=a;this.firePropertyChangeInt("displayedMnemonicIndex", +b,a);a!=b&&(this.revalidate(),this.repaint())},"~N");c(c$,"getDisplayedMnemonicIndex",function(){return this.mnemonicIndex});c(c$,"updateDisplayedMnemonicIndex",function(a,b){this.setDisplayedMnemonicIndex(javax.swing.SwingUtilities.findDisplayedMnemonicIndex(a,b))},"~S,~N");c(c$,"updateMnemonicProperties",function(){var a=this.model.getMnemonic();if(this.mnemonic!=a){var b=this.mnemonic;this.mnemonic=a;this.firePropertyChangeInt("mnemonic",b,this.mnemonic);this.updateDisplayedMnemonicIndex(this.getText(), +this.mnemonic);this.revalidate();this.repaint()}});c(c$,"setMultiClickThreshhold",function(a){if(0>a)throw new IllegalArgumentException("threshhold must be >= 0");this.multiClickThreshhold=a},"~N");c(c$,"getMultiClickThreshhold",function(){return this.multiClickThreshhold});c(c$,"getModel",function(){return this.model});c(c$,"setModel",function(a){var b=this.getModel();null!=b&&(b.removeChangeListener(this.changeListener),b.removeActionListener(this.actionListener),b.removeItemListener(this.itemListener), +this.itemListener=this.actionListener=this.changeListener=null);this.model=a;null!=a?(this.changeListener=this.createChangeListener(),this.actionListener=this.createActionListener(),this.itemListener=this.createItemListener(),a.addChangeListener(this.changeListener),a.addActionListener(this.actionListener),a.addItemListener(this.itemListener),this.updateMnemonicProperties(),u(this,javax.swing.AbstractButton,"setEnabled",[a.isEnabled()])):this.mnemonic=0;this.updateDisplayedMnemonicIndex(this.getText(), +this.mnemonic);this.firePropertyChangeObject("model",b,a);a!==b&&(this.revalidate(),this.repaint())},"javax.swing.ButtonModel");d(c$,"getUI",function(){return this.ui});c(c$,"setUI",function(a){u(this,javax.swing.AbstractButton,"setUI",[a]);j(this.disabledIcon,javax.swing.plaf.UIResource)&&this.setDisabledIcon(null);j(this.disabledSelectedIcon,javax.swing.plaf.UIResource)&&this.setDisabledSelectedIcon(null)},"javax.swing.plaf.ButtonUI");d(c$,"updateUI",function(){});d(c$,"addImpl",function(a,b,c){this.$setLayout|| +this.setLayout(new javax.swing.OverlayLayout(this));return this.addImplSAEM(a,b,c)},"java.awt.Component,~O,~N");c(c$,"setLayout",function(a){this.$setLayout=!0;u(this,javax.swing.AbstractButton,"setLayout",[a])},"java.awt.LayoutManager");c(c$,"addChangeListener",function(a){this.listenerList.add(javax.swing.event.ChangeListener,a)},"javax.swing.event.ChangeListener");c(c$,"removeChangeListener",function(a){this.listenerList.remove(javax.swing.event.ChangeListener,a)},"javax.swing.event.ChangeListener"); +c(c$,"getChangeListeners",function(){return this.listenerList.getListeners(javax.swing.event.ChangeListener)});c(c$,"fireStateChanged",function(){for(var a=this.listenerList.getListenerList(),b=a.length-2;0<=b;b-=2)a[b]===javax.swing.event.ChangeListener&&(null==this.changeEvent&&(this.changeEvent=new javax.swing.event.ChangeEvent(this)),a[b+1].stateChanged(this.changeEvent))});c(c$,"addActionListener",function(a){this.listenerList.add(java.awt.event.ActionListener,a)},"java.awt.event.ActionListener"); +c(c$,"removeActionListener",function(a){null!=a&&this.getAction()===a?this.setAction(null):this.listenerList.remove(java.awt.event.ActionListener,a)},"java.awt.event.ActionListener");c(c$,"getActionListeners",function(){return this.listenerList.getListeners(java.awt.event.ActionListener)});c(c$,"createChangeListener",function(){return this.getHandler()});c(c$,"fireActionPerformed",function(a){for(var b=this.listenerList.getListenerList(),c=null,h=b.length-2;0<=h;h-=2)b[h]===java.awt.event.ActionListener&& +(null==c&&(c=a.getActionCommand(),null==c&&(c=this.getActionCommand()),c=new java.awt.event.ActionEvent(this,1001,c,a.getWhen(),a.getModifiers())),b[h+1].actionPerformed(c))},"java.awt.event.ActionEvent");c(c$,"fireItemStateChanged",function(a){for(var b=this.listenerList.getListenerList(),c=null,h=b.length-2;0<=h;h-=2)b[h]===java.awt.event.ItemListener&&(null==c&&(c=new java.awt.event.ItemEvent(this,701,this,a.getStateChange())),b[h+1].itemStateChanged(c))},"java.awt.event.ItemEvent");c(c$,"createActionListener", +function(){return this.getHandler()});c(c$,"createItemListener",function(){return this.getHandler()});c(c$,"setEnabled",function(a){!a&&this.model.isRollover()&&this.model.setRollover(!1);u(this,javax.swing.AbstractButton,"setEnabled",[a]);this.model.setEnabled(a)},"~B");c(c$,"getLabel",function(){return this.getText()});c(c$,"setLabel",function(a){this.setText(a)},"~S");d(c$,"addItemListener",function(a){this.listenerList.add(java.awt.event.ItemListener,a)},"java.awt.event.ItemListener");d(c$,"removeItemListener", +function(a){this.listenerList.remove(java.awt.event.ItemListener,a)},"java.awt.event.ItemListener");c(c$,"getItemListeners",function(){return this.listenerList.getListeners(java.awt.event.ItemListener)});d(c$,"getSelectedObjects",function(){if(!1==this.isSelected())return null;var a=Array(1);a[0]=this.getText();return a});c(c$,"init",function(a,b){null!=a&&this.setText(a);null!=b&&this.setIcon(b);this.updateUI();this.setAlignmentX(0);this.setAlignmentY(0.5)},"~S,javax.swing.Icon");c(c$,"imageUpdate", +function(a,b,c,h,f,d){var m=this.getIcon();if(null==m)return!1;this.model.isEnabled()?this.model.isPressed()&&this.model.isArmed()?m=this.getPressedIcon():this.isRolloverEnabled()&&this.model.isRollover()?m=this.model.isSelected()?this.getRolloverSelectedIcon():this.getRolloverIcon():this.model.isSelected()&&(m=this.getSelectedIcon()):m=this.model.isSelected()?this.getDisabledSelectedIcon():this.getDisabledIcon();return!javax.swing.SwingUtilities.doesIconReferenceImage(m,a)?!1:u(this,javax.swing.AbstractButton, +"imageUpdate",[a,b,c,h,f,d])},"java.awt.Image,~N,~N,~N,~N,~N");c(c$,"setUIProperty",function(a,b){"borderPainted"===a?this.borderPaintedSet||(this.setBorderPainted(b.booleanValue()),this.borderPaintedSet=!1):"rolloverEnabled"===a?this.rolloverEnabledSet||(this.setRolloverEnabled(b.booleanValue()),this.rolloverEnabledSet=!1):"iconTextGap"===a?this.iconTextGapSet||(this.setIconTextGap(b.intValue()),this.iconTextGapSet=!1):"contentAreaFilled"===a?this.contentAreaFilledSet||(this.setContentAreaFilled(b.booleanValue()), +this.contentAreaFilledSet=!1):u(this,javax.swing.AbstractButton,"setUIProperty",[a,b])},"~S,~O");c(c$,"paramString",function(){var a=null!=this.defaultIcon&&this.defaultIcon!==this?this.defaultIcon.toString():"",b=null!=this.pressedIcon&&this.pressedIcon!==this?this.pressedIcon.toString():"",c=null!=this.disabledIcon&&this.disabledIcon!==this?this.disabledIcon.toString():"",h=null!=this.selectedIcon&&this.selectedIcon!==this?this.selectedIcon.toString():"",f=null!=this.disabledSelectedIcon&&this.disabledSelectedIcon!== +this?this.disabledSelectedIcon.toString():"",d=null!=this.rolloverIcon&&this.rolloverIcon!==this?this.rolloverIcon.toString():"",m=null!=this.rolloverSelectedIcon&&this.rolloverSelectedIcon!==this?this.rolloverSelectedIcon.toString():"",g=this.$paintBorder?"true":"false",j=this.paintFocus?"true":"false",k=this.rolloverEnabled?"true":"false";return u(this,javax.swing.AbstractButton,"paramString",[])+",defaultIcon="+a+",disabledIcon="+c+",disabledSelectedIcon="+f+",margin="+this.margin+",paintBorder="+ +g+",paintFocus="+j+",pressedIcon="+b+",rolloverEnabled="+k+",rolloverIcon="+d+",rolloverSelectedIcon="+m+",selectedIcon="+h+",text="+this.text});c(c$,"getHandler",function(){null==this.handler&&(this.handler=D(javax.swing.AbstractButton.Handler,this,null));return this.handler});c$.$AbstractButton$ButtonChangeListener$=function(){w(self.c$);c$=q(function(){K(this,arguments);k(this,arguments)},javax.swing.AbstractButton,"ButtonChangeListener",null,javax.swing.event.ChangeListener);g(c$,function(){}); +d(c$,"stateChanged",function(a){this.b$["javax.swing.AbstractButton"].getHandler().stateChanged(a)},"javax.swing.event.ChangeEvent");c$=v()};c$.$AbstractButton$Handler$=function(){w(self.c$);c$=q(function(){K(this,arguments);k(this,arguments)},javax.swing.AbstractButton,"Handler",null,[java.awt.event.ActionListener,javax.swing.event.ChangeListener,java.awt.event.ItemListener]);d(c$,"stateChanged",function(){this.b$["javax.swing.AbstractButton"].updateMnemonicProperties();this.b$["javax.swing.AbstractButton"].isEnabled()!= +this.b$["javax.swing.AbstractButton"].model.isEnabled()&&this.b$["javax.swing.AbstractButton"].setEnabled(this.b$["javax.swing.AbstractButton"].model.isEnabled());this.b$["javax.swing.AbstractButton"].fireStateChanged();this.b$["javax.swing.AbstractButton"].repaint()},"javax.swing.event.ChangeEvent");d(c$,"actionPerformed",function(a){this.b$["javax.swing.AbstractButton"].fireActionPerformed(a)},"java.awt.event.ActionEvent");d(c$,"itemStateChanged",function(a){this.b$["javax.swing.AbstractButton"].fireItemStateChanged(a); +if(this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction()&&(a=this.b$["javax.swing.AbstractButton"].getAction(),null!=a&&javax.swing.AbstractAction.hasSelectedKey(a))){var b=this.b$["javax.swing.AbstractButton"].isSelected();javax.swing.AbstractAction.isSelected(a)!=b&&a.putValue("SwingSelectedKey",new Boolean(b))}},"java.awt.event.ItemEvent");c$=v()};w(self.c$);c$=t(javax.swing.AbstractButton,"ButtonActionPropertyChangeListener",javax.swing.ActionPropertyChangeListener);d(c$, +"actionPropertyChanged",function(a,b,c){javax.swing.AbstractAction.shouldReconfigure(c)?a.configurePropertiesFromAction(b):a.actionPropertyChanged(b,c.getPropertyName())},"javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent");c$=v();x(c$,"MODEL_CHANGED_PROPERTY","model","TEXT_CHANGED_PROPERTY","text","MNEMONIC_CHANGED_PROPERTY","mnemonic","MARGIN_CHANGED_PROPERTY","margin","VERTICAL_ALIGNMENT_CHANGED_PROPERTY","verticalAlignment","HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY","horizontalAlignment", +"VERTICAL_TEXT_POSITION_CHANGED_PROPERTY","verticalTextPosition","HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY","horizontalTextPosition","BORDER_PAINTED_CHANGED_PROPERTY","borderPainted","FOCUS_PAINTED_CHANGED_PROPERTY","focusPainted","ROLLOVER_ENABLED_CHANGED_PROPERTY","rolloverEnabled","CONTENT_AREA_FILLED_CHANGED_PROPERTY","contentAreaFilled","ICON_CHANGED_PROPERTY","icon","PRESSED_ICON_CHANGED_PROPERTY","pressedIcon","SELECTED_ICON_CHANGED_PROPERTY","selectedIcon","ROLLOVER_ICON_CHANGED_PROPERTY", +"rolloverIcon","ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY","rolloverSelectedIcon","DISABLED_ICON_CHANGED_PROPERTY","disabledIcon","DISABLED_SELECTED_ICON_CHANGED_PROPERTY","disabledSelectedIcon")});p("javax.swing");n(null,"javax.swing.ArrayTable",["java.util.Hashtable"],function(){c$=q(function(){this.table=null;k(this,arguments)},javax.swing,"ArrayTable",null,Cloneable);g(c$,function(){});c(c$,"put",function(a,b){if(null==this.table)this.table=B(-1,[a,b]);else{var c=this.size();if(8>c)if(this.containsKey(a))for(var c= +this.table,h=0;hd?"-":" ",d=a.lastIndexOf(b),m=a.lastIndexOf(b,d-1),c=a.length;if(0=h&&(h=12)}catch(g){if(z(g,NumberFormatException))m=d,d=c,a.charAt(d-1)==b&&d--;else throw g;}0<=m&&m+1>32});c(c$,"equals",function(a){return j(a,java.awt.geom.Point2D)?this.getX()==a.getX()&&this.getY()==a.getY():u(this,java.awt.geom.Point2D,"equals",[a])},"~O");w(self.c$);c$=q(function(){this.y=this.x=0;k(this,arguments)},java.awt.geom.Point2D,"Float",java.awt.geom.Point2D); +g(c$,function(){r(this,java.awt.geom.Point2D.Float,[])});g(c$,function(a,b){r(this,java.awt.geom.Point2D.Float,[]);this.x=a;this.y=b},"~N,~N");d(c$,"getX",function(){return this.x});d(c$,"getY",function(){return this.y});c(c$,"setLocation",function(a,b){this.x=a;this.y=b},"~N,~N");c(c$,"setLocation",function(a,b){this.x=a;this.y=b},"~N,~N");d(c$,"toString",function(){return"Point2D.Float["+this.x+", "+this.y+"]"});c$=v();w(self.c$);c$=q(function(){this.y=this.x=0;k(this,arguments)},java.awt.geom.Point2D, +"Double",java.awt.geom.Point2D);g(c$,function(){r(this,java.awt.geom.Point2D.Double,[])});g(c$,function(a,b){r(this,java.awt.geom.Point2D.Double,[]);this.x=a;this.y=b},"~N,~N");d(c$,"getX",function(){return this.x});d(c$,"getY",function(){return this.y});c(c$,"setLocation",function(a,b){this.x=a;this.y=b},"~N,~N");d(c$,"toString",function(){return"Point2D.Double["+this.x+", "+this.y+"]"});c$=v()});p("java.awt.geom");n(null,"java.awt.geom.AffineTransform","java.lang.Double $.InternalError JU.AU java.awt.geom.NoninvertibleTransformException $.Path2D $.Point2D java.awt.geom.Point2D.Double".split(" "), +function(){c$=q(function(){this.type=this.state=this.m12=this.m02=this.m11=this.m01=this.m10=this.m00=0;k(this,arguments)},java.awt.geom,"AffineTransform",null,[Cloneable,java.io.Serializable]);g(c$,function(a,b,c,h,f,d,m){switch(arguments.length){case 0:this.m00=this.m11=1;return;case 1:j(a,java.awt.geom.AffineTransform)?(this.m00=a.m00,this.m10=a.m10,this.m01=a.m01,this.m11=a.m11,this.m02=a.m02,this.m12=a.m12,this.state=a.state,this.type=a.type):(this.m00=a[0],this.m10=a[1],this.m01=a[2],this.m11= +a[3],5a&&this.rotate180();else if(0==a)0a?(h=-1,this.state=2,this.type=8):(h=1,this.type=this.state=0)):0==a?(h=0,c=0=Math.abs(a))throw new java.awt.geom.NoninvertibleTransformException("Determinant is "+a);return new java.awt.geom.AffineTransform(this.m11/a,-this.m10/a,-this.m01/a,this.m00/a,(this.m01*this.m12-this.m11*this.m02)/a,(this.m10*this.m02-this.m00*this.m12)/a,7);case 6:a=this.m00*this.m11-this.m01*this.m10;if(4.9E-324>=Math.abs(a))throw new java.awt.geom.NoninvertibleTransformException("Determinant is "+a);return new java.awt.geom.AffineTransform(this.m11/ +a,-this.m10/a,-this.m01/a,this.m00/a,0,0,6);case 5:if(0==this.m01||0==this.m10)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");return new java.awt.geom.AffineTransform(0,1/this.m01,1/this.m10,0,-this.m12/this.m10,-this.m02/this.m01,5);case 4:if(0==this.m01||0==this.m10)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");return new java.awt.geom.AffineTransform(0,1/this.m01,1/this.m10,0,0,0,4);case 3:if(0==this.m00||0==this.m11)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0"); +return new java.awt.geom.AffineTransform(1/this.m00,0,0,1/this.m11,-this.m02/this.m00,-this.m12/this.m11,3);case 2:if(0==this.m00||0==this.m11)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");return new java.awt.geom.AffineTransform(1/this.m00,0,0,1/this.m11,0,0,2);case 1:return new java.awt.geom.AffineTransform(1,0,0,1,-this.m02,-this.m12,1);case 0:return new java.awt.geom.AffineTransform}});c(c$,"invert",function(){var a,b,c,h,d,l,m;switch(this.state){default:this.stateError(); +case 7:a=this.m00;b=this.m01;c=this.m02;h=this.m10;d=this.m11;l=this.m12;m=a*d-b*h;if(4.9E-324>=Math.abs(m))throw new java.awt.geom.NoninvertibleTransformException("Determinant is "+m);this.m00=d/m;this.m10=-h/m;this.m01=-b/m;this.m11=a/m;this.m02=(b*l-d*c)/m;this.m12=(h*c-a*l)/m;break;case 6:a=this.m00;b=this.m01;h=this.m10;d=this.m11;m=a*d-b*h;if(4.9E-324>=Math.abs(m))throw new java.awt.geom.NoninvertibleTransformException("Determinant is "+m);this.m00=d/m;this.m10=-h/m;this.m01=-b/m;this.m11=a/ +m;break;case 5:b=this.m01;c=this.m02;h=this.m10;l=this.m12;if(0==b||0==h)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");this.m10=1/b;this.m01=1/h;this.m02=-l/h;this.m12=-c/b;break;case 4:b=this.m01;h=this.m10;if(0==b||0==h)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");this.m10=1/b;this.m01=1/h;break;case 3:a=this.m00;c=this.m02;d=this.m11;l=this.m12;if(0==a||0==d)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0"); +this.m00=1/a;this.m11=1/d;this.m02=-c/a;this.m12=-l/d;break;case 2:a=this.m00;d=this.m11;if(0==a||0==d)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");this.m00=1/a;this.m11=1/d;break;case 1:this.m02=-this.m02,this.m12=-this.m12;case 0:}});c(c$,"transform",function(a,b){null==b&&(b=j(a,java.awt.geom.Point2D.Double)?new java.awt.geom.Point2D.Double:new java.awt.geom.Point2D.Float);var c=a.getX(),h=a.getY();switch(this.state){default:this.stateError();case 7:return b.setLocation(c* +this.m00+h*this.m01+this.m02,c*this.m10+h*this.m11+this.m12),b;case 6:return b.setLocation(c*this.m00+h*this.m01,c*this.m10+h*this.m11),b;case 5:return b.setLocation(h*this.m01+this.m02,c*this.m10+this.m12),b;case 4:return b.setLocation(h*this.m01,c*this.m10),b;case 3:return b.setLocation(c*this.m00+this.m02,h*this.m11+this.m12),b;case 2:return b.setLocation(c*this.m00,h*this.m11),b;case 1:return b.setLocation(c+this.m02,h+this.m12),b;case 0:return b.setLocation(c,h),b}},"java.awt.geom.Point2D,java.awt.geom.Point2D"); +c(c$,"transform",function(a,b,c,h,d){if(0!=d)if(JU.AU.isAD(a)){var l,m,g,j,k,n;c===a&&(h>b&&h=Math.abs(d))throw new java.awt.geom.NoninvertibleTransformException("Determinant is "+d);b.setLocation((c*this.m11-h*this.m01)/d,(h*this.m00-c*this.m10)/d);return b;case 5:c-=this.m02,h-=this.m12; +case 4:if(0==this.m01||0==this.m10)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");b.setLocation(h/this.m10,c/this.m01);return b;case 3:c-=this.m02,h-=this.m12;case 2:if(0==this.m00||0==this.m11)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");b.setLocation(c/this.m00,h/this.m11);return b;case 1:return b.setLocation(c-this.m02,h-this.m12),b;case 0:return b.setLocation(c,h),b}},"java.awt.geom.Point2D,java.awt.geom.Point2D");c(c$,"inverseTransform", +function(a,b,c,h,d){var l,m,g,j,k,n,p;c===a&&(h>b&&h=Math.abs(p))throw new java.awt.geom.NoninvertibleTransformException("Determinant is "+p);for(;0<=--d;){var q=a[b++]-g,r=a[b++]-n;c[h++]=(q*k-r*m)/p;c[h++]=(r*l-q*j)/p}break;case 6:l=this.m00;m=this.m01;j=this.m10;k=this.m11;p=l*k-m*j;if(4.9E-324>=Math.abs(p))throw new java.awt.geom.NoninvertibleTransformException("Determinant is "+ +p);for(;0<=--d;)q=a[b++],r=a[b++],c[h++]=(q*k-r*m)/p,c[h++]=(r*l-q*j)/p;break;case 5:m=this.m01;g=this.m02;j=this.m10;n=this.m12;if(0==m||0==j)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");for(;0<=--d;)q=a[b++]-g,c[h++]=(a[b++]-n)/j,c[h++]=q/m;break;case 4:m=this.m01;j=this.m10;if(0==m||0==j)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");for(;0<=--d;)q=a[b++],c[h++]=a[b++]/j,c[h++]=q/m;break;case 3:l=this.m00;g=this.m02;k=this.m11;n=this.m12; +if(0==l||0==k)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");for(;0<=--d;)c[h++]=(a[b++]-g)/l,c[h++]=(a[b++]-n)/k;break;case 2:l=this.m00;k=this.m11;if(0==l||0==k)throw new java.awt.geom.NoninvertibleTransformException("Determinant is 0");for(;0<=--d;)c[h++]=a[b++]/l,c[h++]=a[b++]/k;break;case 1:g=this.m02;for(n=this.m12;0<=--d;)c[h++]=a[b++]-g,c[h++]=a[b++]-n;break;case 0:(a!==c||b!=h)&&System.arraycopy(a,b,c,h,2*d)}},"~A,~N,~A,~N,~N");c(c$,"deltaTransform",function(a, +b){null==b&&(b=j(a,java.awt.geom.Point2D.Double)?new java.awt.geom.Point2D.Double:new java.awt.geom.Point2D.Float);var c=a.getX(),h=a.getY();switch(this.state){default:this.stateError();case 7:case 6:return b.setLocation(c*this.m00+h*this.m01,c*this.m10+h*this.m11),b;case 5:case 4:return b.setLocation(h*this.m01,c*this.m10),b;case 3:case 2:return b.setLocation(c*this.m00,h*this.m11),b;case 1:case 0:return b.setLocation(c,h),b}},"java.awt.geom.Point2D,java.awt.geom.Point2D");c(c$,"deltaTransform", +function(a,b,c,h,d){var l,m,g,j;c===a&&(h>b&&h>32});d(c$,"equals",function(a){return!j(a,java.awt.geom.AffineTransform)?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m10==a.m10&&this.m11==a.m11&&this.m12==a.m12},"~O");x(c$,"TYPE_UNKNOWN",-1,"TYPE_IDENTITY",0,"TYPE_TRANSLATION",1,"TYPE_UNIFORM_SCALE",2,"TYPE_GENERAL_SCALE",4,"TYPE_MASK_SCALE",6,"TYPE_FLIP",64,"TYPE_QUADRANT_ROTATION",8,"TYPE_GENERAL_ROTATION",16,"TYPE_MASK_ROTATION",24,"TYPE_GENERAL_TRANSFORM",32,"APPLY_IDENTITY", +0,"APPLY_TRANSLATE",1,"APPLY_SCALE",2,"APPLY_SHEAR",4,"HI_SHIFT",3,"HI_IDENTITY",0,"HI_TRANSLATE",8,"HI_SCALE",16,"HI_SHEAR",32,"rot90conversion",H(-1,[4,5,4,5,2,3,6,7]))});p("java.awt.geom");n(["java.lang.Exception"],"java.awt.geom.NoninvertibleTransformException",null,function(){c$=t(java.awt.geom,"NoninvertibleTransformException",Exception)});p("java.awt.geom");n(["java.awt.Shape","java.awt.geom.PathIterator"],"java.awt.geom.Path2D","java.lang.Double $.IllegalArgumentException java.util.Arrays java.awt.geom.FlatteningPathIterator $.IllegalPathStateException $.Point2D $.Rectangle2D jssun.awt.geom.Curve".split(" "), +function(){c$=q(function(){this.pointTypes=null;this.windingRule=this.numCoords=this.numTypes=0;k(this,arguments)},java.awt.geom,"Path2D",null,[java.awt.Shape,Cloneable]);g(c$,function(){});g(c$,function(a,b){this.setWindingRule(a);this.pointTypes=L(b,0)},"~N,~N");c(c$,"closePath",function(){if(0==this.numTypes||4!=this.pointTypes[this.numTypes-1])this.needRoom(!0,0),this.pointTypes[this.numTypes++]=4});c(c$,"append",function(a,b){this.append(a.getPathIterator(null),b)},"java.awt.Shape,~B");c(c$, +"getWindingRule",function(){return this.windingRule});c(c$,"setWindingRule",function(a){if(0!=a&&1!=a)throw new IllegalArgumentException("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");this.windingRule=a},"~N");c(c$,"getCurrentPoint",function(){var a=this.numCoords;if(1>this.numTypes||1>a)return null;if(4==this.pointTypes[this.numTypes-1]){var b=this.numTypes-2;a:for(;0this.numTypes)return!1;var c=1==this.windingRule?-1:1;return 0!=(this.pointCrossings(a,b)&c)}return!1},"~N,~N");c(c$,"contains",function(a){return this.contains(a.getX(),a.getY())},"java.awt.geom.Point2D");c$.contains=c(c$,"contains",function(a,b,c,h,d){if(java.lang.Double.isNaN(b+h)||java.lang.Double.isNaN(c+d)||0>=h||0>=d)return!1;var l=1==a.getWindingRule()?-1:2;a=jssun.awt.geom.Curve.rectCrossingsForPath(a, +b,c,b+h,c+d);return-2147483648!=a&&0!=(a&l)},"java.awt.geom.PathIterator,~N,~N,~N,~N");c$.contains=c(c$,"contains",function(a,b){return java.awt.geom.Path2D.contains(a,b.getX(),b.getY(),b.getWidth(),b.getHeight())},"java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");c(c$,"contains",function(a,b,c,h){if(java.lang.Double.isNaN(a+c)||java.lang.Double.isNaN(b+h)||0>=c||0>=h)return!1;var d=1==this.windingRule?-1:2;a=this.rectCrossings(a,b,a+c,b+h);return-2147483648!=a&&0!=(a&d)},"~N,~N,~N,~N");c(c$, +"contains",function(a){return this.contains(a.getX(),a.getY(),a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");c$.intersects=c(c$,"intersects",function(a,b,c,h,d){if(java.lang.Double.isNaN(b+h)||java.lang.Double.isNaN(c+d)||0>=h||0>=d)return!1;var l=1==a.getWindingRule()?-1:2;a=jssun.awt.geom.Curve.rectCrossingsForPath(a,b,c,b+h,c+d);return-2147483648==a||0!=(a&l)},"java.awt.geom.PathIterator,~N,~N,~N,~N");c$.intersects=c(c$,"intersects",function(a,b){return java.awt.geom.Path2D.intersects(a, +b.getX(),b.getY(),b.getWidth(),b.getHeight())},"java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");c(c$,"intersects",function(a,b,c,h){if(java.lang.Double.isNaN(a+c)||java.lang.Double.isNaN(b+h)||0>=c||0>=h)return!1;var d=1==this.windingRule?-1:2;a=this.rectCrossings(a,b,a+c,b+h);return-2147483648==a||0!=(a&d)},"~N,~N,~N,~N");c(c$,"intersects",function(a){return this.intersects(a.getX(),a.getY(),a.getWidth(),a.getHeight())},"java.awt.geom.Rectangle2D");d(c$,"getPathIterator",function(a,b){return new java.awt.geom.FlatteningPathIterator(this.getPathIterator(a), +b)},"java.awt.geom.AffineTransform,~N");w(self.c$);c$=q(function(){this.pointIdx=this.typeIdx=0;this.path=null;k(this,arguments)},java.awt.geom.Path2D,"Iterator",null,java.awt.geom.PathIterator);g(c$,function(a){this.path=a},"java.awt.geom.Path2D");d(c$,"getWindingRule",function(){return this.path.getWindingRule()});d(c$,"isDone",function(){return this.typeIdx>=this.path.numTypes});d(c$,"next",function(){var a=this.path.pointTypes[this.typeIdx++];this.pointIdx+=java.awt.geom.Path2D.Iterator.curvecoords[a]}); +x(c$,"curvecoords",H(-1,[2,2,4,6,0]));c$=v();w(self.c$);c$=q(function(){this.floatCoords=null;k(this,arguments)},java.awt.geom.Path2D,"Float",java.awt.geom.Path2D);g(c$,function(){this.construct(1,20)});g(c$,function(a){this.construct(a,20)},"~N");g(c$,function(a,b){r(this,java.awt.geom.Path2D.Float,[]);this.setWindingRule(a);this.pointTypes=L(b,0);this.floatCoords=M(2*b,0)},"~N,~N");g(c$,function(a){this.construct(a,null)},"java.awt.Shape");g(c$,function(a,b){r(this,java.awt.geom.Path2D.Float,[]); +this.setPath(a,b)},"java.awt.Shape,java.awt.geom.AffineTransform");c(c$,"setPath",function(a,b){if(j(a,java.awt.geom.Path2D)){var c=a;this.setWindingRule(c.windingRule);this.numTypes=c.numTypes;this.pointTypes=java.util.Arrays.copyOf(c.pointTypes,c.pointTypes.length);this.numCoords=c.numCoords;this.floatCoords=c.cloneCoordsFloat(b)}else c=a.getPathIterator(b),this.setWindingRule(c.getWindingRule()),this.pointTypes=L(20,0),this.floatCoords=M(40,0),this.append(c,!1)},"java.awt.Shape,java.awt.geom.AffineTransform"); +c(c$,"cloneCoordsFloat",function(a){var b;null==a?b=java.util.Arrays.copyOf(this.floatCoords,this.floatCoords.length):(b=M(this.floatCoords.length,0),a.transform(this.floatCoords,0,b,0,A(this.numCoords/2)));return b},"java.awt.geom.AffineTransform");d(c$,"cloneCoordsDouble",function(a){var b=N(this.floatCoords.length,0);if(null==a)for(a=0;athis.numTypes||1>this.numCoords){this.moveTo(c[0],c[1]);break}if(4!=this.pointTypes[this.numTypes-1]&&this.floatCoords[this.numCoords-2]==c[0]&&this.floatCoords[this.numCoords-1]==c[1])break;case 1:this.lineTo(c[0],c[1]);break;case 2:this.quadTo(c[0],c[1],c[2],c[3]);break;case 3:this.curveTo(c[0],c[1], +c[2],c[3],c[4],c[5]);break;case 4:this.closePath()}a.next();b=!1}},"java.awt.geom.PathIterator,~B");d(c$,"getPoint",function(a){return new java.awt.geom.Point2D.Float(this.floatCoords[a],this.floatCoords[a+1])},"~N");d(c$,"needRoom",function(a,b){if(a&&0==this.numTypes)throw new java.awt.geom.IllegalPathStateException("missing initial moveto in path definition");var c=this.pointTypes.length;if(this.numTypes>=c){var h=c;500c&&(h=c,1E3c&&(c=m);l>h&&(h=l)}}else a=b=c=h=0;return new java.awt.geom.Rectangle2D.Float(a,b,c-a,h-b)});c(c$,"getPathIterator",function(a){return null==a?new java.awt.geom.Path2D.Float.CopyIterator(this):new java.awt.geom.Path2D.Float.TxIterator(this,a)},"java.awt.geom.AffineTransform");d(c$,"clone",function(){return new java.awt.geom.Path2D.Float(this)});w(self.c$);c$=q(function(){this.floatCoords=null;k(this,arguments)},java.awt.geom.Path2D.Float,"CopyIterator",java.awt.geom.Path2D.Iterator); +g(c$,function(a){r(this,java.awt.geom.Path2D.Float.CopyIterator,[a]);this.floatCoords=a.floatCoords},"java.awt.geom.Path2D.Float");c(c$,"currentSegment",function(a){var b=this.path.pointTypes[this.typeIdx],c=java.awt.geom.Path2D.Iterator.curvecoords[b];if(0this.numTypes||1>this.numCoords){this.moveTo(c[0],c[1]);break}if(4!=this.pointTypes[this.numTypes- +1]&&this.doubleCoords[this.numCoords-2]==c[0]&&this.doubleCoords[this.numCoords-1]==c[1])break;case 1:this.lineTo(c[0],c[1]);break;case 2:this.quadTo(c[0],c[1],c[2],c[3]);break;case 3:this.curveTo(c[0],c[1],c[2],c[3],c[4],c[5]);break;case 4:this.closePath()}a.next();b=!1}},"java.awt.geom.PathIterator,~B");d(c$,"getPoint",function(a){return new java.awt.geom.Point2D.Double(this.doubleCoords[a],this.doubleCoords[a+1])},"~N");d(c$,"needRoom",function(a,b){if(a&&0==this.numTypes)throw new java.awt.geom.IllegalPathStateException("missing initial moveto in path definition"); +var c=this.pointTypes.length;if(this.numTypes>=c){var h=c;500c&&(h=c,1E3c&&(c=m);l>h&&(h=l)}}else a=b=c=h=0;return new java.awt.geom.Rectangle2D.Double(a,b,c-a,h-b)});c(c$,"getPathIterator",function(a){return null==a?new java.awt.geom.Path2D.Double.CopyIterator(this):new java.awt.geom.Path2D.Double.TxIterator(this,a)},"java.awt.geom.AffineTransform");d(c$,"clone", +function(){return new java.awt.geom.Path2D.Double(this)});w(self.c$);c$=q(function(){this.doubleCoords=null;k(this,arguments)},java.awt.geom.Path2D.Double,"CopyIterator",java.awt.geom.Path2D.Iterator);g(c$,function(a){r(this,java.awt.geom.Path2D.Double.CopyIterator,[a]);this.doubleCoords=a.doubleCoords},"java.awt.geom.Path2D.Double");c(c$,"currentSegment",function(a){var b=this.path.pointTypes[this.typeIdx],c=java.awt.geom.Path2D.Iterator.curvecoords[b];if(0c)throw new IllegalArgumentException("columns less than zero.");this.columns=c;null==a&&(a=this.createDefaultModel());this.setDocument(a);null!=b&&this.setText(b)},"javax.swing.text.Document,~S,~N");d(c$,"getUIClassID",function(){return"TextFieldUI"});c(c$,"setDocument",function(a){null!=a&&a.putProperty("filterNewlines",Boolean.TRUE);u(this,javax.swing.JTextField,"setDocument",[a])},"javax.swing.text.Document");d(c$,"isValidateRoot",function(){var a= +this.getParent();return j(a,javax.swing.JViewport)?!1:!0});c(c$,"getHorizontalAlignment",function(){return this.horizontalAlignment});c(c$,"setHorizontalAlignment",function(a){if(a!=this.horizontalAlignment){var b=this.horizontalAlignment;if(2==a||0==a||4==a||10==a||11==a)this.horizontalAlignment=a;else throw new IllegalArgumentException("horizontalAlignment");this.firePropertyChangeInt("horizontalAlignment",b,this.horizontalAlignment);this.invalidate();this.repaint()}},"~N");c(c$,"createDefaultModel", +function(){return swingjs.JSToolkit.getPlainDocument(this)});c(c$,"getColumns",function(){return this.columns});c(c$,"setColumns",function(a){var b=this.columns;if(0>a)throw new IllegalArgumentException("columns less than zero.");a!=b&&(this.columns=a,this.invalidate())},"~N");c(c$,"getColumnWidth",function(){0==this.columnWidth&&(this.columnWidth=this.getFontMetrics(this.getFont()).charWidth("m"));return this.columnWidth});d(c$,"getPreferredSize",function(){return this.getPrefSizeJTF()});c(c$,"getPrefSizeJTF", +function(){var a=this.getPrefSizeJComp();if(0!=this.columns){var b=this.getInsets();a.width=this.columns*this.getColumnWidth()+b.left+b.right}return a});c(c$,"setFont",function(a){u(this,javax.swing.JTextField,"setFont",[a]);this.columnWidth=0},"java.awt.Font");c(c$,"addActionListener",function(a){this.listenerList.add(java.awt.event.ActionListener,a)},"java.awt.event.ActionListener");c(c$,"removeActionListener",function(a){null!=a&&this.getAction()===a?this.setAction(null):this.listenerList.remove(java.awt.event.ActionListener, +a)},"java.awt.event.ActionListener");c(c$,"getActionListeners",function(){return this.listenerList.getListeners(java.awt.event.ActionListener)});c(c$,"fireActionPerformed",function(){var a=this.listenerList.getListenerList(),b=0,c=java.awt.EventQueue.getCurrentEvent();j(c,java.awt.event.InputEvent)?b=c.getModifiers():j(c,java.awt.event.ActionEvent)&&(b=c.getModifiers());b=new java.awt.event.ActionEvent(this,1001,null!=this.command?this.command:this.getText(),java.awt.EventQueue.getMostRecentEventTime(), +b);for(c=a.length-2;0<=c;c-=2)a[c]===java.awt.event.ActionListener&&a[c+1].actionPerformed(b)});c(c$,"setActionCommand",function(a){this.command=a},"~S");c(c$,"setAction",function(a){var b=this.getAction();if(null==this.$action||!this.$action.equals(a))this.$action=a,null!=b&&(this.removeActionListener(b),b.removePropertyChangeListener(this.actionPropertyChangeListener),this.actionPropertyChangeListener=null),this.configurePropertiesFromAction(this.$action),null!=this.$action&&(this.isListener(java.awt.event.ActionListener, +this.$action)||this.addActionListener(this.$action),this.actionPropertyChangeListener=this.createActionPropertyChangeListener(this.$action),this.$action.addPropertyChangeListener(this.actionPropertyChangeListener)),this.firePropertyChangeObject("action",b,this.$action)},"javax.swing.Action");c(c$,"isListener",function(a,b){for(var c=!1,h=this.listenerList.getListenerList(),d=h.length-2;0<=d;d-=2)h[d]===a&&h[d+1]===b&&(c=!0);return c},"Class,java.awt.event.ActionListener");c(c$,"getAction",function(){return this.$action}); +c(c$,"configurePropertiesFromAction",function(a){javax.swing.AbstractAction.setEnabledFromAction(this,a);javax.swing.AbstractAction.setToolTipTextFromAction(this,a);this.setActionCommandFromAction(a)},"javax.swing.Action");c(c$,"actionPropertyChanged",function(a,b){"ActionCommandKey"===b?this.setActionCommandFromAction(a):"enabled"===b?javax.swing.AbstractAction.setEnabledFromAction(this,a):"ShortDescription"===b&&javax.swing.AbstractAction.setToolTipTextFromAction(this,a)},"javax.swing.Action,~S"); +c(c$,"setActionCommandFromAction",function(a){this.setActionCommand(null==a?null:a.getValue("ActionCommandKey"))},"javax.swing.Action");c(c$,"createActionPropertyChangeListener",function(a){return new javax.swing.JTextField.TextFieldActionPropertyChangeListener(this,a)},"javax.swing.Action");c(c$,"getActions",function(){return javax.swing.text.TextAction.augmentList(u(this,javax.swing.JTextField,"getActions",[]),javax.swing.JTextField.defaultActions)});c(c$,"postActionEvent",function(){this.fireActionPerformed()}); +c(c$,"hasActionListener",function(){for(var a=this.listenerList.getListenerList(),b=a.length-2;0<=b;b-=2)if(a[b]===java.awt.event.ActionListener)return!0;return!1});c(c$,"paramString",function(){var a;a=2==this.horizontalAlignment?"LEFT":0==this.horizontalAlignment?"CENTER":4==this.horizontalAlignment?"RIGHT":10==this.horizontalAlignment?"LEADING":11==this.horizontalAlignment?"TRAILING":"";var b=null!=this.command?this.command:"";return u(this,javax.swing.JTextField,"paramString",[])+",columns="+ +this.columns+",columnWidth="+this.columnWidth+",command="+b+",horizontalAlignment="+a});c$.$JTextField$ScrollRepainter$=function(){w(self.c$);c$=q(function(){K(this,arguments);k(this,arguments)},javax.swing.JTextField,"ScrollRepainter",null,javax.swing.event.ChangeListener);d(c$,"stateChanged",function(){this.b$["javax.swing.JTextField"].repaint()},"javax.swing.event.ChangeEvent");c$=v()};w(self.c$);c$=t(javax.swing.JTextField,"TextFieldActionPropertyChangeListener",javax.swing.ActionPropertyChangeListener); +d(c$,"actionPropertyChanged",function(a,b,c){javax.swing.AbstractAction.shouldReconfigure(c)?a.configurePropertiesFromAction(b):a.actionPropertyChanged(b,c.getPropertyName())},"javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent");c$=v();w(self.c$);c$=t(javax.swing.JTextField,"NotifyAction",javax.swing.text.TextAction);g(c$,function(){r(this,javax.swing.JTextField.NotifyAction,["notify-field-accept"])});d(c$,"actionPerformed",function(){var a=this.getFocusedComponent();j(a,javax.swing.JTextField)&& +a.postActionEvent()},"java.awt.event.ActionEvent");d(c$,"isEnabled",function(){var a=this.getFocusedComponent();return j(a,javax.swing.JTextField)?a.hasActionListener():!1});c$=v();x(c$,"notifyAction","notify-field-accept");c$.defaultActions=c$.prototype.defaultActions=B(-1,[new javax.swing.JTextField.NotifyAction]);x(c$,"$uiClassID","TextFieldUI")});p("javax.swing");n(["java.beans.PropertyChangeListener"],"javax.swing.ActionPropertyChangeListener",null,function(){c$=q(function(){this.action=null; +k(this,arguments)},javax.swing,"ActionPropertyChangeListener",null,java.beans.PropertyChangeListener);g(c$,function(a,b){this.setTarget(a);this.action=b},"~O,javax.swing.Action");d(c$,"propertyChange",function(a){var b=this.getTarget();null==b?this.getAction().removePropertyChangeListener(this):this.actionPropertyChanged(b,this.getAction(),a)},"java.beans.PropertyChangeEvent");c(c$,"setTarget",function(){},"~O");c(c$,"getTarget",function(){return null});c(c$,"getAction",function(){return this.action})}); +p("javax.swing.event");n(["java.util.EventListener"],"javax.swing.event.ChangeListener",null,function(){y(javax.swing.event,"ChangeListener",java.util.EventListener)});p("javax.swing");n(null,"javax.swing.ActionMap",["java.util.HashMap","javax.swing.ArrayTable"],function(){c$=q(function(){this.parent=this.arrayTable=null;k(this,arguments)},javax.swing,"ActionMap");g(c$,function(){});c(c$,"setParent",function(a){this.parent=a},"javax.swing.ActionMap");c(c$,"getParent",function(){return this.parent}); +c(c$,"put",function(a,b){null!=a&&(null==b?this.remove(a):(null==this.arrayTable&&(this.arrayTable=new javax.swing.ArrayTable),this.arrayTable.put(a,b)))},"~O,javax.swing.Action");c(c$,"get",function(a){var b=null==this.arrayTable?null:this.arrayTable.get(a);if(null==b){var c=this.getParent();if(null!=c)return c.get(a)}return b},"~O");c(c$,"remove",function(a){null!=this.arrayTable&&this.arrayTable.remove(a)},"~O");c(c$,"clear",function(){null!=this.arrayTable&&this.arrayTable.clear()});c(c$,"keys", +function(){return null==this.arrayTable?null:this.arrayTable.getKeys(null)});c(c$,"size",function(){return null==this.arrayTable?0:this.arrayTable.size()});c(c$,"allKeys",function(){var a=this.size(),b=this.getParent();if(0==a)return null!=b?b.allKeys():this.keys();if(null==b)return this.keys();a=this.keys();b=b.allKeys();if(null==b)return a;if(null==a)return b;var c=new java.util.HashMap,h;for(h=a.length-1;0<=h;h--)c.put(a[h],a[h]);for(h=b.length-1;0<=h;h--)c.put(b[h],b[h]);return c.keySet().toArray()})}); +p("javax.swing");n(null,"javax.swing.InputMap",["java.util.HashMap","javax.swing.ArrayTable"],function(){c$=q(function(){this.parent=this.arrayTable=null;k(this,arguments)},javax.swing,"InputMap");g(c$,function(){});c(c$,"setParent",function(a){this.parent=a},"javax.swing.InputMap");c(c$,"getParent",function(){return this.parent});c(c$,"put",function(a,b){null!=a&&(null==b?this.remove(a):(null==this.arrayTable&&(this.arrayTable=new javax.swing.ArrayTable),this.arrayTable.put(a,b)))},"javax.swing.KeyStroke,~O"); +c(c$,"get",function(a){if(null==this.arrayTable){var b=this.getParent();return null!=b?b.get(a):null}var c=this.arrayTable.get(a);return null==c&&(b=this.getParent(),null!=b)?b.get(a):c},"javax.swing.KeyStroke");c(c$,"remove",function(a){null!=this.arrayTable&&this.arrayTable.remove(a)},"javax.swing.KeyStroke");c(c$,"clear",function(){null!=this.arrayTable&&this.arrayTable.clear()});c(c$,"keys",function(){if(null==this.arrayTable)return null;var a=Array(this.arrayTable.size());this.arrayTable.getKeys(a); +return a});c(c$,"size",function(){return null==this.arrayTable?0:this.arrayTable.size()});c(c$,"allKeys",function(){var a=this.size(),b=this.getParent();if(0==a)return null!=b?b.allKeys():this.keys();if(null==b)return this.keys();var a=this.keys(),c=b.allKeys();if(null==c)return a;if(null==a)return c;var b=new java.util.HashMap,h;for(h=a.length-1;0<=h;h--)b.put(a[h],a[h]);for(h=c.length-1;0<=h;h--)b.put(c[h],c[h]);a=Array(b.size());return b.keySet().toArray(a)})});p("javax.swing");y(javax.swing,"Scrollable"); +p("javax.swing.event");n(["java.util.EventObject"],"javax.swing.event.CaretEvent",null,function(){c$=t(javax.swing.event,"CaretEvent",java.util.EventObject)});p("javax.swing.event");n(["java.util.EventListener"],"javax.swing.event.DocumentListener",null,function(){y(javax.swing.event,"DocumentListener",java.util.EventListener)});p("javax.swing.event");n(null,"javax.swing.event.EventListenerList",["java.lang.reflect.Array"],function(){c$=q(function(){this.listenerList=null;k(this,arguments)},javax.swing.event, +"EventListenerList");I(c$,function(){this.listenerList=javax.swing.event.EventListenerList.NULL_ARRAY});c(c$,"getListenerList",function(){return this.listenerList});c(c$,"getListeners",function(a){for(var b=this.listenerList,c=this.getListenerCount(b,a),c=java.lang.reflect.Array.newInstance(a,c),h=0,d=b.length-2;0<=d;d-=2)b[d]===a&&(c[h++]=b[d+1]);return c},"Class");c(c$,"getListenerCount",function(){return A(this.listenerList.length/2)});c(c$,"getListenerCount",function(a){return this.getListenerCount(this.listenerList, +a)},"Class");c(c$,"getListenerCount",function(a,b){for(var c=0,h=0;hc||0>h||(0==h||0==c?this.drawLine(a,b,a+c,b+h):(this.drawLine(a,b,a+c-1,b),this.drawLine(a+c,b,a+c,b+h-1),this.drawLine(a+c,b+h,a+1,b+h),this.drawLine(a,b+h,a,b+1)))},"~N,~N,~N,~N");c(c$,"draw3DRect", +function(a,b,c,h,d){var l=this.getColor(),m=l.brighter(),g=l.darker();this.setColor(d?m:g);this.drawLine(a,b,a,b+h);this.drawLine(a+1,b,a+c-1,b);this.setColor(d?g:m);this.drawLine(a+1,b+h,a+c,b+h);this.drawLine(a+c,b,a+c,b+h-1);this.setColor(l)},"~N,~N,~N,~N,~B");c(c$,"fill3DRect",function(a,b,c,h,d){var l=this.getColor(),m=l.brighter(),g=l.darker();d||this.setColor(g);this.fillRect(a+1,b+1,c-2,h-2);this.setColor(d?m:g);this.drawLine(a,b,a,b+h-1);this.drawLine(a+1,b,a+c-2,b);this.setColor(d?g:m); +this.drawLine(a+1,b+h-1,a+c-1,b+h-1);this.drawLine(a+c-1,b,a+c-1,b+h-2);this.setColor(l)},"~N,~N,~N,~N,~B");c(c$,"drawPolygon",function(a){this.drawPolygon(a.xpoints,a.ypoints,a.npoints)},"java.awt.Polygon");c(c$,"fillPolygon",function(a){this.fillPolygon(a.xpoints,a.ypoints,a.npoints)},"java.awt.Polygon");c(c$,"drawChars",function(a,b,c,h,d){this.drawString(String.instantialize(a,b,c),h,d)},"~A,~N,~N,~N,~N");c(c$,"drawBytes",function(a,b,c,h,d){this.drawString(String.instantialize(a,0,b,c),h,d)}, +"~A,~N,~N,~N,~N");d(c$,"finalize",function(){this.dispose()});d(c$,"toString",function(){return this.getClass().getName()+"[font="+this.getFont()+",color="+this.getColor()+"]"});c(c$,"getClipRect",function(){return this.getClipBounds()});c(c$,"hitClip",function(a,b,c,h){var d=this.getClipBounds();return null==d?!0:d.intersects(a,b,c,h)},"~N,~N,~N,~N");p("jssun.font");n(["java.awt.FontMetrics","java.util.Hashtable"],"jssun.font.FontDesignMetrics",["java.lang.IndexOutOfBoundsException","java.awt.Toolkit", +"swingjs.JSToolkit"],function(){c$=q(function(){this.leading=this.descent=this.ascent=0;this.height=-1;k(this,arguments)},jssun.font,"FontDesignMetrics",java.awt.FontMetrics);c$.getMetrics=c(c$,"getMetrics",function(a){var b=null,c;c=jssun.font.FontDesignMetrics.metricsCache.get(a);null!=c&&(b=c.get());null==b&&(b=new jssun.font.FontDesignMetrics(a),jssun.font.FontDesignMetrics.metricsCache.put(a,new jssun.font.FontDesignMetrics.KeyReference(a,b)));for(a=0;ac)throw new IndexOutOfBoundsException("len="+c);for(c=b+c;bthis.height&&(this.height=this.getAscent()+E(jssun.font.FontDesignMetrics.roundingUpValue+ +this.descent+this.leading));return this.height});w(self.c$);c$=q(function(){this.val=this.key=null;k(this,arguments)},jssun.font.FontDesignMetrics,"KeyReference");g(c$,function(a,b){this.key=a;this.val=b},"~O,~O");c(c$,"get",function(){return this.val});c(c$,"dispose",function(){jssun.font.FontDesignMetrics.metricsCache.get(this.key)===this&&jssun.font.FontDesignMetrics.metricsCache.remove(this.key)});c$=v();x(c$,"roundingUpValue",0.95);c$.metricsCache=c$.prototype.metricsCache=new java.util.Hashtable; +x(c$,"MAXRECENT",5);c$.recentMetrics=c$.prototype.recentMetrics=Array(5);x(c$,"recentIndex",0)});p("java.awt");n(["java.awt.font.FontRenderContext"],"java.awt.FontMetrics",["java.lang.Character"],function(){c$=q(function(){this.font=null;k(this,arguments)},java.awt,"FontMetrics");g(c$,function(a){this.font=a},"java.awt.Font");c(c$,"getFont",function(){return this.font});c(c$,"getFontRenderContext",function(){return java.awt.FontMetrics.DEFAULT_FRC});c(c$,"getLeading",function(){return 0});c(c$,"getAscent", +function(){return this.font.getSize()});c(c$,"getDescent",function(){return 0});c(c$,"getHeight",function(){return this.getLeading()+this.getAscent()+this.getDescent()});c(c$,"getMaxAscent",function(){return this.getAscent()});c(c$,"getMaxDescent",function(){return this.getDescent()});c(c$,"getMaxDecent",function(){return this.getMaxDescent()});c(c$,"getMaxAdvance",function(){return-1});c(c$,"charWidth",function(a){Character.isValidCodePoint(a)||(a=65535);if(256>a)return this.getWidths()[a];var b= +Q(2,"\x00");a=Character.toChars(a,b,0);return this.charsWidth(b,0,a)},"~N");c(c$,"charWidth",function(a){if(256>a.charCodeAt(0))return this.getWidths()[a.charCodeAt(0)];a=Q(-1,[a]);return this.charsWidth(a,0,1)},"~S");c(c$,"stringWidth",function(a){var b=a.length,c=Q(b,"\x00");a.getChars(0,b,c,0);return this.charsWidth(c,0,b)},"~S");c(c$,"charsWidth",function(a,b,c){return this.stringWidth(String.instantialize(a,b,c))},"~A,~N,~N");c(c$,"bytesWidth",function(a,b,c){return this.stringWidth(String.instantialize(a, +0,b,c))},"~A,~N,~N");c(c$,"getWidths",function(){for(var a=H(256,0),b=String.fromCharCode(0);256>b.charCodeAt(0);b=String.fromCharCode(b.charCodeAt(0)+1))a[b.charCodeAt(0)]=this.charWidth(b);return a});d(c$,"toString",function(){return this.getClass().getName()+"[font="+this.getFont()+"ascent="+this.getAscent()+", descent="+this.getDescent()+", height="+this.getHeight()+"]"});c$.DEFAULT_FRC=c$.prototype.DEFAULT_FRC=new java.awt.font.FontRenderContext(null,!1,!1)});p("JU");n(null,"JU.PT","java.lang.Boolean $.Double $.Float $.Number java.util.Map javajs.api.JSONEncodable JU.AU $.DF $.Lst $.M34 $.M4 $.SB".split(" "), +function(){c$=t(JU,"PT");c$.parseInt=c(c$,"parseInt",function(a){return JU.PT.parseIntNext(a,H(-1,[0]))},"~S");c$.parseIntNext=c(c$,"parseIntNext",function(a,b){var c=a.length;return 0>b[0]||b[0]>=c?-2147483648:JU.PT.parseIntChecked(a,c,b)},"~S,~A");c$.parseIntChecked=c(c$,"parseIntChecked",function(a,b,c){var h=!1,d=0,l=c[0];if(0>l)return-2147483648;for(var m;l=m;)d=10*d+(m-48),h= +!0,++l;h?g&&(d=-d):d=-2147483648;c[0]=l;return d},"~S,~N,~A");c$.isWhiteSpace=c(c$,"isWhiteSpace",function(a,b){var c;return 0<=b&&(" "==(c=a.charAt(b))||"\t"==c||"\n"==c)},"~S,~N");c$.parseFloatChecked=c(c$,"parseFloatChecked",function(a,b,c,h){var d=!1,l=c[0];if(h&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;l=g;)j=10*j+1*(g-48),++l,d=!0;var n=!1,p=0,q=0==j?-1: +0;if(46==g)for(n=!0;++l=g;){d=!0;if(0>q){if(48==g){q--;continue}q=-q}p=b)return NaN;g=a.charCodeAt(l);if(43==g&&++l>=b)return NaN;c[0]=l;l=JU.PT.parseIntChecked(a,b,c);if(-2147483648==l)return NaN;0l&&-l<=JU.PT.decimalScale.length?d*=JU.PT.decimalScale[-l-1]:0!=l&&(d*=Math.pow(10,l))}else c[0]=l;m&&(d=-d);Infinity==d&&(d=3.4028235E38);return!h||(!j||n)&&JU.PT.checkTrailingText(a,c[0],b)?d:NaN},"~S,~N,~A,~B");c$.checkTrailingText=c(c$,"checkTrailingText",function(a,b,c){for(var h;bm?m=a.length:a=a.substring(0,m),b[0]+=m+1,a=JU.PT.getTokens(a),null==c&&(c=M(a.length, +0)),l=JU.PT.parseFloatArrayInfested(a,c));if(null==c)return M(0,0);for(a=l;ah&&(b=h);return 0>c[0]||c[0]>=b?NaN:JU.PT.parseFloatChecked(a,b,c,!1)},"~S,~N,~A");c$.parseFloatNext=c(c$,"parseFloatNext",function(a,b){var c=null==a?-1:a.length;return 0>b[0]||b[0]>=c?NaN:JU.PT.parseFloatChecked(a,c,b,!1)},"~S,~A");c$.parseFloatStrict=c(c$,"parseFloatStrict",function(a){var b=a.length; +return 0==b?NaN:JU.PT.parseFloatChecked(a,b,H(-1,[0]),!0)},"~S");c$.parseFloat=c(c$,"parseFloat",function(a){return JU.PT.parseFloatNext(a,H(-1,[0]))},"~S");c$.parseIntRadix=c(c$,"parseIntRadix",function(a,b){return Integer.parseIntRadix(a,b)},"~S,~N");c$.getTokens=c(c$,"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");c$.parseToken=c(c$,"parseToken",function(a){return JU.PT.parseTokenNext(a,H(-1,[0]))},"~S");c$.parseTrimmed=c(c$,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a, +0,a.length)},"~S");c$.parseTrimmedAt=c(c$,"parseTrimmedAt",function(a,b){return JU.PT.parseTrimmedRange(a,b,a.length)},"~S,~N");c$.parseTrimmedRange=c(c$,"parseTrimmedRange",function(a,b,c){var h=a.length;cb||b>c)return null;var h=JU.PT.countTokens(a,b),d=Array(h),l=H(1,0);l[0]=b;for(var m=0;mb[0]||b[0]>=c?null:JU.PT.parseTokenChecked(a,c,b)},"~S,~A");c$.parseTokenRange=c(c$,"parseTokenRange",function(a,b,c){var h=a.length;b>h&&(b=h);return 0>c[0]||c[0]>=b?null:JU.PT.parseTokenChecked(a,b,c)},"~S,~N,~A"); +c$.parseTokenChecked=c(c$,"parseTokenChecked",function(a,b,c){for(var h=c[0];h=b&&JU.PT.isWhiteSpace(a,c);)--c;return ch&&(b=h);return 0>c[0]||c[0]>=b?-2147483648:JU.PT.parseIntChecked(a,b,c)},"~S,~N,~A");c$.parseFloatArrayData=c(c$,"parseFloatArrayData",function(a,b){JU.PT.parseFloatArrayDataN(a,b,b.length)},"~A,~A");c$.parseFloatArrayDataN=c(c$,"parseFloatArrayDataN",function(a,b,c){for(;0<=--c;)b[c]=c>= +a.length?NaN:JU.PT.parseFloat(a[c])},"~A,~A,~N");c$.split=c(c$,"split",function(a,b){if(0==a.length)return[];var c=1,h=a.indexOf(b),d,l=b.length;if(0>h||0==l)return d=Array(1),d[0]=a,d;for(var m=a.length-l;0<=h&&hc||0>(c=a.indexOf('"',c)))return"";for(var h=c+1,d=a.length;++cc||0>(c=a.indexOf('"',c)))return null;for(var h=b[0]=c,d=a.length,l=!1,g=!1;++c=d)return b[1]=-1,null;b[1]=c+1;c= +a.substring(h+1,c);return g?JU.PT.rep(JU.PT.rep(c,'""',"\x00"),"\x00",'"'):c},"~S,~A");c$.isOneOf=c(c$,"isOneOf",function(a,b){if(0==b.length)return!1;";"!=b.charAt(0)&&(b=";"+b+";");return 0>a.indexOf(";")&&0<=b.indexOf(";"+a+";")},"~S,~S");c$.getQuotedAttribute=c(c$,"getQuotedAttribute",function(a,b){var c=a.indexOf(b+"=");return 0>c?null:JU.PT.getQuotedStringAt(a,c)},"~S,~S");c$.approx=c(c$,"approx",function(a,b){return Math.round(a*b)/b},"~N,~N");c$.rep=c(c$,"rep",function(a,b,c){if(null==a|| +0==b.length||0>a.indexOf(b))return a;var h=0<=c.indexOf(b);do a=a.$replace(b,c);while(!h&&0<=a.indexOf(b));return a},"~S,~S,~S");c$.formatF=c(c$,"formatF",function(a,b,c,h,d){return JU.PT.formatS(JU.DF.formatDecimal(a,c),b,0,h,d)},"~N,~N,~N,~B,~B");c$.formatD=c(c$,"formatD",function(a,b,c,h,d){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-c),b,0,h,d)},"~N,~N,~N,~B,~B,~B");c$.formatS=c(c$,"formatS",function(a,b,c,h,d){if(null==a)return"";var l=a.length;2147483647!=c&&0 +c&&0<=l+c&&(a=a.substring(l+c+1));c=b-a.length;if(0>=c)return a;b=d&&!h&&"-"==a.charAt(0);d=d?"0":" ";var g=b?"-":d,l=new JU.SB;h&&l.append(a);for(l.appendC(g);0<--c;)l.appendC(d);h||l.append(b?d+a.substring(1):a);return l.toString()},"~S,~N,~N,~B,~B");c$.replaceWithCharacter=c(c$,"replaceWithCharacter",function(a,b,c){if(null==a)return null;for(var h=b.length;0<=--h;)a=a.$replace(b.charAt(h),c);return a},"~S,~S,~S");c$.replaceAllCharacters=c(c$,"replaceAllCharacters",function(a,b,c){for(var h=b.length;0<= +--h;){var d=b.substring(h,h+1);a=JU.PT.rep(a,d,c)}return a},"~S,~S,~S");c$.trim=c(c$,"trim",function(a,b){if(0==b.length)return a.trim();for(var c=a.length,h=0;hh&&0<=b.indexOf(a.charAt(c));)c--;return a.substring(h,c+1)},"~S,~S");c$.trimQuotes=c(c$,"trimQuotes",function(a){return null!=a&&1c;c+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(c))){b=!0;break}if(b)for(;10>c;){for(var b=-1,d='\\\\\tt\rr\nn""'.charAt(c++),f='\\\\\tt\rr\nn""'.charAt(c++),l=new JU.SB,g=0;0<=(b=a.indexOf(d,b+1));)l.append(a.substring(g,b)).appendC("\\").appendC(f),g=b+1;l.append(a.substring(g,a.length));a=l.toString()}return'"'+JU.PT.escUnicode(a)+'"'},"~S");c$.escUnicode=c(c$,"escUnicode",function(a){for(var b=a.length;0<= +--b;)if(127a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");return a},"~N");c$.join=c(c$,"join",function(a,b,c){if(a.lengtha.indexOf("%")||0==g||0>a.indexOf(b))return a;var j="",k,n,p;for(k=0;0<=(n=a.indexOf("%",k))&&0<=(p=a.indexOf(b,n+1));)if(k!=n&&(j+=a.substring(k,n)),k=n+1,p>n+6)j+="%";else try{var q=!1;"-"==a.charAt(k)&&(q=!0,++k);var r=!1;"0"== +a.charAt(k)&&(r=!0,++k);for(var t,u=0;"0"<=(t=a.charAt(k))&&"9">=t;)u=10*u+(t.charCodeAt(0)-48),++k;var v=2147483647,w=!1;if("."==a.charAt(k)){++k;if("-"==(t=a.charAt(k)))w=!0,++k;if("0"<=(t=a.charAt(k))&&"9">=t)v=t.charCodeAt(0)-48,++k;w&&(v=-v-(null==c?1:0))}if(a.substring(k,k+g).equals(b)){if(k+=g,Float.isNaN(d)?null!=c?j+=JU.PT.formatS(c,u,v,q,r):Double.isNaN(f)||(j+=JU.PT.formatD(f,u,v,q,r,!0)):j+=JU.PT.formatF(d,u,v,q,r),l)break}else k=n+1,j+="%"}catch(x){if(z(x,IndexOutOfBoundsException)){k= +n;break}else throw x;}return j+=a.substring(k)},"~S,~S,~S,~N,~N,~B");c$.formatStringS=c(c$,"formatStringS",function(a,b,c){return JU.PT.formatString(a,b,c,NaN,NaN,!1)},"~S,~S,~S");c$.formatStringF=c(c$,"formatStringF",function(a,b,c){return JU.PT.formatString(a,b,null,c,NaN,!1)},"~S,~S,~N");c$.formatStringI=c(c$,"formatStringI",function(a,b,c){return JU.PT.formatString(a,b,""+c,NaN,NaN,!1)},"~S,~S,~N");c$.sprintf=c(c$,"sprintf",function(a,b,c){if(null==c)return a;var d=b.length;if(d==c.length)try{for(var f= +0;fa.indexOf("p")&&0>a.indexOf("q"))return a;a=JU.PT.rep(a,"%%","\u0001");a=JU.PT.rep(a,"%p","%6.2p");a=JU.PT.rep(a,"%q","%6.2q"); +a=JU.PT.split(a,"%");var b=new JU.SB;b.append(a[0]);for(var c=1;ca&&(a=0);return(a+" ").substring(0,b)},"~N,~N");c$.isWild=c(c$,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");c$.isMatch=c(c$,"isMatch",function(a,b,c,d){if(a.equals(b))return!0;var f=b.length;if(0==f)return!1;var l=c&&d?"*"==b.charAt(0):!1;if(1==f&&l)return!0;var g=c&&b.endsWith("*");if(!(0<=b.indexOf("?"))){if(l)return g?3>f||0<=a.indexOf(b.substring(1,f-1)): +a.endsWith(b.substring(1));if(g)return a.startsWith(b.substring(0,f-1))}for(var j=a.length,k="????",n=4;nj;){if(d&&"?"==b.charAt(c))++c;else if("?"!=b.charAt(c+f-1))return!1;--f}for(d=j;0<=--d;)if(f=b.charAt(c+d),"?"!=f&&(j=a.charAt(d),f!=j&&("\u0001"!=f||"?"!=j)))return!1;return!0},"~S,~S,~B,~B");c$.replaceQuotedStrings=c(c$,"replaceQuotedStrings",function(a,b,c){for(var d=b.size(),f=0;f< +d;f++){var l=b.get(f),g=c.get(f);g.equals(l)||(a=JU.PT.rep(a,'"'+l+'"','"'+g+'"'))}return a},"~S,JU.Lst,JU.Lst");c$.replaceStrings=c(c$,"replaceStrings",function(a,b,c){for(var d=b.size(),f=0;f=a},"~S");c$.isUpperCase=c(c$,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~S");c$.isLowerCase=c(c$,"isLowerCase",function(a){a= +a.charCodeAt(0);return 97<=a&&122>=a},"~S");c$.isLetter=c(c$,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~S");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~S");c$.isWhitespace=c(c$,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a},"~S");c$.fixPtFloats=c(c$,"fixPtFloats",function(a,b){a.x=Math.round(a.x*b)/b;a.y=Math.round(a.y*b)/b;a.z=Math.round(a.z*b)/b},"JU.T3,~N"); +c$.fixDouble=c(c$,"fixDouble",function(a,b){return Math.round(a*b)/b},"~N,~N");c$.parseFloatFraction=c(c$,"parseFloatFraction",function(a){var b=a.indexOf("/");return 0>b?JU.PT.parseFloat(a):JU.PT.parseFloat(a.substring(0,b))/JU.PT.parseFloat(a.substring(b+1))},"~S");x(c$,"tensScale",M(-1,[10,100,1E3,1E4,1E5,1E6]),"decimalScale",M(-1,[0.1,0.01,0.001,1E-4,1E-5,1E-6,1E-7,1E-8,1E-9]),"FLOAT_MIN_SAFE",2E-45,"escapable",'\\\\\tt\rr\nn""',"FRACTIONAL_PRECISION",1E5,"CARTESIAN_PRECISION",1E4)});p("javajs.api"); +y(javajs.api,"JSONEncodable");p("JU");n(null,"JU.AU",["java.util.Arrays","JU.Lst"],function(){c$=t(JU,"AU");c$.ensureLength=c(c$,"ensureLength",function(a,b){return null!=a&&JU.AU.getLength(a)>=b?a:JU.AU.arrayCopyObject(a,b)},"~O,~N");c$.ensureLengthS=c(c$,"ensureLengthS",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyS(a,b)},"~A,~N");c$.ensureLengthA=c(c$,"ensureLengthA",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyF(a,b)},"~A,~N");c$.ensureLengthI=c(c$,"ensureLengthI", +function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyI(a,b)},"~A,~N");c$.ensureLengthShort=c(c$,"ensureLengthShort",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyShort(a,b)},"~A,~N");c$.ensureLengthByte=c(c$,"ensureLengthByte",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyByte(a,b)},"~A,~N");c$.doubleLength=c(c$,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,null==a?16:2*JU.AU.getLength(a))},"~O");c$.doubleLengthS=c(c$,"doubleLengthS",function(a){return JU.AU.arrayCopyS(a, +null==a?16:2*a.length)},"~A");c$.doubleLengthF=c(c$,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,null==a?16:2*a.length)},"~A");c$.doubleLengthI=c(c$,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,null==a?16:2*a.length)},"~A");c$.doubleLengthShort=c(c$,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");c$.doubleLengthByte=c(c$,"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,null==a?16:2*a.length)},"~A");c$.doubleLengthBool=c(c$,"doubleLengthBool", +function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");c$.deleteElements=c(c$,"deleteElements",function(a,b,c){if(0==c||null==a)return a;var d=JU.AU.getLength(a);if(b>=d)return a;d-=b+c;0>d&&(d=0);var f=JU.AU.newInstanceO(a,b+d);0b&&(b=a.length);var c=Array(b);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,db&&(b=a.length);var c=Array(b);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,db&&(b=a.length);var c=M(b,0);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,db&&(b=a.length);var c=H(b,0);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,dc&&(c=a.length);for(a=A(c/2);0<=--a;)JU.AU.swapInt(b,a,c-1-a);return b},"~A,~N,~N");c$.arrayCopyShort=c(c$,"arrayCopyShort",function(a,b){0>b&&(b=a.length);var c=ma(b,0);if(null!=a){var d=a.length;System.arraycopy(a, +0,c,0,db&&(b=a.length);var c=L(b,0);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,db&&(b=a.length);var c=na(b,!1);if(null!=a){var d=a.length;System.arraycopy(a,0,c,0,d=f;l--){a+="\n*"+l+"*";for(g=c;g<=d;g++)a+="\t"+(gb){b=-b;b>JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[b]+"E+0";var d;1>Math.abs(a)?(c=10,d=1E-10*a):(c=-10,d=1E10*a);d=(""+d).toUpperCase();var f=d.indexOf("E");c=JU.PT.parseInt(d.substring(f+1))+c;return 0>f?""+a:JU.DF.formatDecimal(JU.PT.parseFloat(d.substring(0,f)),b-1)+"E"+(0<=c?"+":"")+c}b>=JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length-1);d=(""+a).toUpperCase();c=d.indexOf(".");if(0>c)return d+JU.DF.formattingStrings[b].substring(1); +var l=d.startsWith("-");l&&(d=d.substring(1),c--);f=d.indexOf("E-");0a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");c(c$,"appendD",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");c(c$,"appendSB",function(a){this.s+=a.s;return this},"JU.SB");c(c$,"appendO",function(a){null!=a&&(this.s+=a.toString());return this}, +"~O");c(c$,"appendCB",function(a,b,c){for(;0<=--c;)this.s+=a[b++]},"~A,~N,~N");d(c$,"toString",function(){return this.s});c(c$,"length",function(){return this.s.length});c(c$,"indexOf",function(a){return this.s.indexOf(a)},"~S");c(c$,"charAt",function(a){return this.s.charAt(a)},"~N");c(c$,"charCodeAt",function(a){return this.s.charCodeAt(a)},"~N");c(c$,"setLength",function(a){this.s=this.s.substring(0,a)},"~N");c(c$,"lastIndexOf",function(a){return this.s.lastIndexOf(a)},"~S");c(c$,"indexOf2",function(a, +b){return this.s.indexOf(a,b)},"~S,~N");c(c$,"substring",function(a){return this.s.substring(a)},"~N");c(c$,"substring2",function(a,b){return this.s.substring(a,b)},"~N,~N");c(c$,"toBytes",function(a,b){0>b&&(b=this.length()-a);for(var c=L(b,0),d=a+b,f=d-a;--d>=a;)c[--f]=this.charAt(d).charCodeAt(0);return c},"~N,~N");c(c$,"replace",function(a,b,c){this.s=this.s.substring(0,a)+c+this.s.substring(b)},"~N,~N,~S");c(c$,"insert",function(a,b){this.replace(a,a,b)},"~N,~S");p("JU");n(null,"JU.M34",["java.lang.ArrayIndexOutOfBoundsException"], +function(){c$=q(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;k(this,arguments)},JU,"M34");c(c$,"setAA33",function(a){var b=a.x,c=a.y,d=a.z;a=a.angle;var f=Math.sqrt(b*b+c*c+d*d),f=1/f,b=b*f,c=c*f,d=d*f,l=Math.cos(a);a=Math.sin(a);f=1-l;this.m00=l+b*b*f;this.m11=l+c*c*f;this.m22=l+d*d*f;var l=b*c*f,g=d*a;this.m01=l-g;this.m10=l+g;l=b*d*f;g=c*a;this.m02=l+g;this.m20=l-g;l=c*d*f;g=b*a;this.m12=l-g;this.m21=l+g},"JU.A4");c(c$,"rotate",function(a){this.rotate2(a, +a)},"JU.T3");c(c$,"rotate2",function(a,b){b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z,this.m10*a.x+this.m11*a.y+this.m12*a.z,this.m20*a.x+this.m21*a.y+this.m22*a.z)},"JU.T3,JU.T3");c(c$,"setM33",function(a){this.m00=a.m00;this.m01=a.m01;this.m02=a.m02;this.m10=a.m10;this.m11=a.m11;this.m12=a.m12;this.m20=a.m20;this.m21=a.m21;this.m22=a.m22},"JU.M34");c(c$,"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(c$,"set33",function(a,b,c){switch(a){case 0:switch(b){case 0:this.m00= +c;return;case 1:this.m01=c;return;case 2:this.m02=c;return}break;case 1:switch(b){case 0:this.m10=c;return;case 1:this.m11=c;return;case 2:this.m12=c;return}break;case 2:switch(b){case 0:this.m20=c;return;case 1:this.m21=c;return;case 2:this.m22=c;return}}this.err()},"~N,~N,~N");c(c$,"get33",function(a,b){switch(a){case 0:switch(b){case 0:return this.m00;case 1:return this.m01;case 2:return this.m02}break;case 1:switch(b){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12}break; +case 2:switch(b){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}this.err();return 0},"~N,~N");c(c$,"setRow33",function(a,b){switch(a){case 0:this.m00=b[0];this.m01=b[1];this.m02=b[2];break;case 1:this.m10=b[0];this.m11=b[1];this.m12=b[2];break;case 2:this.m20=b[0];this.m21=b[1];this.m22=b[2];break;default:this.err()}},"~N,~A");c(c$,"getRow33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m01;b[2]=this.m02;return;case 1:b[0]=this.m10;b[1]=this.m11;b[2]=this.m12;return; +case 2:b[0]=this.m20;b[1]=this.m21;b[2]=this.m22;return}this.err()},"~N,~A");c(c$,"setColumn33",function(a,b){switch(a){case 0:this.m00=b[0];this.m10=b[1];this.m20=b[2];break;case 1:this.m01=b[0];this.m11=b[1];this.m21=b[2];break;case 2:this.m02=b[0];this.m12=b[1];this.m22=b[2];break;default:this.err()}},"~N,~A");c(c$,"getColumn33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m10;b[2]=this.m20;break;case 1:b[0]=this.m01;b[1]=this.m11;b[2]=this.m21;break;case 2:b[0]=this.m02;b[1]=this.m12; +b[2]=this.m22;break;default:this.err()}},"~N,~A");c(c$,"add33",function(a){this.m00+=a.m00;this.m01+=a.m01;this.m02+=a.m02;this.m10+=a.m10;this.m11+=a.m11;this.m12+=a.m12;this.m20+=a.m20;this.m21+=a.m21;this.m22+=a.m22},"JU.M34");c(c$,"sub33",function(a){this.m00-=a.m00;this.m01-=a.m01;this.m02-=a.m02;this.m10-=a.m10;this.m11-=a.m11;this.m12-=a.m12;this.m20-=a.m20;this.m21-=a.m21;this.m22-=a.m22},"JU.M34");c(c$,"mul33",function(a){this.m00*=a;this.m01*=a;this.m02*=a;this.m10*=a;this.m11*=a;this.m12*= +a;this.m20*=a;this.m21*=a;this.m22*=a},"~N");c(c$,"transpose33",function(){var a=this.m01;this.m01=this.m10;this.m10=a;a=this.m02;this.m02=this.m20;this.m20=a;a=this.m12;this.m12=this.m21;this.m21=a});c(c$,"setXRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=b;this.m12=-a;this.m20=0;this.m21=a;this.m22=b},"~N");c(c$,"setYRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=0;this.m02=a;this.m10=0;this.m11=1;this.m12=0;this.m20=-a;this.m21= +0;this.m22=b},"~N");c(c$,"setZRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=-a;this.m02=0;this.m10=a;this.m11=b;this.m21=this.m20=this.m12=0;this.m22=1},"~N");c(c$,"determinant3",function(){return this.m00*(this.m11*this.m22-this.m21*this.m12)-this.m01*(this.m10*this.m22-this.m20*this.m12)+this.m02*(this.m10*this.m21-this.m20*this.m11)});c(c$,"err",function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");})});p("JU");n(["JU.M34"],"JU.M4",["JU.T3"], +function(){c$=q(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=this.m03=0;k(this,arguments)},JU,"M4",JU.M34);c$.newA16=c(c$,"newA16",function(a){var b=new JU.M4;b.m00=a[0];b.m01=a[1];b.m02=a[2];b.m03=a[3];b.m10=a[4];b.m11=a[5];b.m12=a[6];b.m13=a[7];b.m20=a[8];b.m21=a[9];b.m22=a[10];b.m23=a[11];b.m30=a[12];b.m31=a[13];b.m32=a[14];b.m33=a[15];return b},"~A");c$.newM4=c(c$,"newM4",function(a){var b=new JU.M4;if(null==a)return b.setIdentity(),b;b.setToM3(a);b.m03=a.m03;b.m13=a.m13;b.m23= +a.m23;b.m30=a.m30;b.m31=a.m31;b.m32=a.m32;b.m33=a.m33;return b},"JU.M4");c$.newMV=c(c$,"newMV",function(a,b){var c=new JU.M4;c.setMV(a,b);return c},"JU.M3,JU.T3");c(c$,"setZero",function(){this.clear33();this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=this.m33=0});c(c$,"setIdentity",function(){this.setZero();this.m00=this.m11=this.m22=this.m33=1});c(c$,"setM4",function(a){this.setM33(a);this.m03=a.m03;this.m13=a.m13;this.m23=a.m23;this.m30=a.m30;this.m31=a.m31;this.m32=a.m32;this.m33=a.m33; +return this},"JU.M4");c(c$,"setMV",function(a,b){this.setM33(a);this.setTranslation(b);this.m33=1},"JU.M3,JU.T3");c(c$,"setToM3",function(a){this.setM33(a);this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=0;this.m33=1},"JU.M34");c(c$,"setToAA",function(a){this.setIdentity();this.setAA33(a)},"JU.A4");c(c$,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m03=a[3];this.m10=a[4];this.m11=a[5];this.m12=a[6];this.m13=a[7];this.m20=a[8];this.m21=a[9];this.m22=a[10];this.m23=a[11];this.m30= +a[12];this.m31=a[13];this.m32=a[14];this.m33=a[15]},"~A");c(c$,"setTranslation",function(a){this.m03=a.x;this.m13=a.y;this.m23=a.z},"JU.T3");c(c$,"setElement",function(a,b,c){if(3>a&&3>b)this.set33(a,b,c);else{(3a&&3>b)return this.get33(a,b);if(3< +a||3a&&this.setRow33(a,b);switch(a){case 0:this.m03=b[3];return;case 1:this.m13=b[3];return;case 2:this.m23=b[3];return;case 3:this.m30=b[0];this.m31=b[1];this.m32=b[2];this.m33=b[3];return}this.err()},"~N,~A");d(c$,"getRow",function(a,b){3>a&&this.getRow33(a,b);switch(a){case 0:b[3]=this.m03;return;case 1:b[3]=this.m13; +return;case 2:b[3]=this.m23;return;case 3:b[0]=this.m30;b[1]=this.m31;b[2]=this.m32;b[3]=this.m33;return}this.err()},"~N,~A");c(c$,"setColumn4",function(a,b,c,d,f){0==a?(this.m00=b,this.m10=c,this.m20=d,this.m30=f):1==a?(this.m01=b,this.m11=c,this.m21=d,this.m31=f):2==a?(this.m02=b,this.m12=c,this.m22=d,this.m32=f):3==a?(this.m03=b,this.m13=c,this.m23=d,this.m33=f):this.err()},"~N,~N,~N,~N,~N");c(c$,"setColumnA",function(a,b){3>a&&this.setColumn33(a,b);switch(a){case 0:this.m30=b[3];break;case 1:this.m31= +b[3];break;case 2:this.m32=b[3];break;case 3:this.m03=b[0];this.m13=b[1];this.m23=b[2];this.m33=b[3];break;default:this.err()}},"~N,~A");c(c$,"getColumn",function(a,b){3>a&&this.getColumn33(a,b);switch(a){case 0:b[3]=this.m30;break;case 1:b[3]=this.m31;break;case 2:b[3]=this.m32;break;case 3:b[0]=this.m03;b[1]=this.m13;b[2]=this.m23;b[3]=this.m33;break;default:this.err()}},"~N,~A");c(c$,"sub",function(a){this.sub33(a);this.m03-=a.m03;this.m13-=a.m13;this.m23-=a.m23;this.m30-=a.m30;this.m31-=a.m31; +this.m32-=a.m32;this.m33-=a.m33},"JU.M4");c(c$,"transpose",function(){this.transpose33();var a=this.m03;this.m03=this.m30;this.m30=a;a=this.m13;this.m13=this.m31;this.m31=a;a=this.m23;this.m23=this.m32;this.m32=a});c(c$,"invert",function(){var a=this.determinant4();if(0==a)return this;a=1/a;this.set(this.m11*(this.m22*this.m33-this.m23*this.m32)+this.m12*(this.m23*this.m31-this.m21*this.m33)+this.m13*(this.m21*this.m32-this.m22*this.m31),this.m21*(this.m02*this.m33-this.m03*this.m32)+this.m22*(this.m03* +this.m31-this.m01*this.m33)+this.m23*(this.m01*this.m32-this.m02*this.m31),this.m31*(this.m02*this.m13-this.m03*this.m12)+this.m32*(this.m03*this.m11-this.m01*this.m13)+this.m33*(this.m01*this.m12-this.m02*this.m11),this.m01*(this.m13*this.m22-this.m12*this.m23)+this.m02*(this.m11*this.m23-this.m13*this.m21)+this.m03*(this.m12*this.m21-this.m11*this.m22),this.m12*(this.m20*this.m33-this.m23*this.m30)+this.m13*(this.m22*this.m30-this.m20*this.m32)+this.m10*(this.m23*this.m32-this.m22*this.m33),this.m22* +(this.m00*this.m33-this.m03*this.m30)+this.m23*(this.m02*this.m30-this.m00*this.m32)+this.m20*(this.m03*this.m32-this.m02*this.m33),this.m32*(this.m00*this.m13-this.m03*this.m10)+this.m33*(this.m02*this.m10-this.m00*this.m12)+this.m30*(this.m03*this.m12-this.m02*this.m13),this.m02*(this.m13*this.m20-this.m10*this.m23)+this.m03*(this.m10*this.m22-this.m12*this.m20)+this.m00*(this.m12*this.m23-this.m13*this.m22),this.m13*(this.m20*this.m31-this.m21*this.m30)+this.m10*(this.m21*this.m33-this.m23*this.m31)+ +this.m11*(this.m23*this.m30-this.m20*this.m33),this.m23*(this.m00*this.m31-this.m01*this.m30)+this.m20*(this.m01*this.m33-this.m03*this.m31)+this.m21*(this.m03*this.m30-this.m00*this.m33),this.m33*(this.m00*this.m11-this.m01*this.m10)+this.m30*(this.m01*this.m13-this.m03*this.m11)+this.m31*(this.m03*this.m10-this.m00*this.m13),this.m03*(this.m11*this.m20-this.m10*this.m21)+this.m00*(this.m13*this.m21-this.m11*this.m23)+this.m01*(this.m10*this.m23-this.m13*this.m20),this.m10*(this.m22*this.m31-this.m21* +this.m32)+this.m11*(this.m20*this.m32-this.m22*this.m30)+this.m12*(this.m21*this.m30-this.m20*this.m31),this.m20*(this.m02*this.m31-this.m01*this.m32)+this.m21*(this.m00*this.m32-this.m02*this.m30)+this.m22*(this.m01*this.m30-this.m00*this.m31),this.m30*(this.m02*this.m11-this.m01*this.m12)+this.m31*(this.m00*this.m12-this.m02*this.m10)+this.m32*(this.m01*this.m10-this.m00*this.m11),this.m00*(this.m11*this.m22-this.m12*this.m21)+this.m01*(this.m12*this.m20-this.m10*this.m22)+this.m02*(this.m10*this.m21- +this.m11*this.m20));this.scale(a);return this});c(c$,"set",function(a,b,c,d,f,l,g,j,k,n,p,q,r,t,u,v){this.m00=a;this.m01=b;this.m02=c;this.m03=d;this.m10=f;this.m11=l;this.m12=g;this.m13=j;this.m20=k;this.m21=n;this.m22=p;this.m23=q;this.m30=r;this.m31=t;this.m32=u;this.m33=v},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(c$,"determinant4",function(){return(this.m00*this.m11-this.m01*this.m10)*(this.m22*this.m33-this.m23*this.m32)-(this.m00*this.m12-this.m02*this.m10)*(this.m21*this.m33-this.m23* +this.m31)+(this.m00*this.m13-this.m03*this.m10)*(this.m21*this.m32-this.m22*this.m31)+(this.m01*this.m12-this.m02*this.m11)*(this.m20*this.m33-this.m23*this.m30)-(this.m01*this.m13-this.m03*this.m11)*(this.m20*this.m32-this.m22*this.m30)+(this.m02*this.m13-this.m03*this.m12)*(this.m20*this.m31-this.m21*this.m30)});c(c$,"scale",function(a){this.mul33(a);this.m03*=a;this.m13*=a;this.m23*=a;this.m30*=a;this.m31*=a;this.m32*=a;this.m33*=a},"~N");c(c$,"mul",function(a){this.mul2(this,a)},"JU.M4");c(c$, +"mul2",function(a,b){this.set(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20+a.m03*b.m30,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21+a.m03*b.m31,a.m00*b.m02+a.m01*b.m12+a.m02*b.m22+a.m03*b.m32,a.m00*b.m03+a.m01*b.m13+a.m02*b.m23+a.m03*b.m33,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20+a.m13*b.m30,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21+a.m13*b.m31,a.m10*b.m02+a.m11*b.m12+a.m12*b.m22+a.m13*b.m32,a.m10*b.m03+a.m11*b.m13+a.m12*b.m23+a.m13*b.m33,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20+a.m23*b.m30,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21+a.m23* +b.m31,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22+a.m23*b.m32,a.m20*b.m03+a.m21*b.m13+a.m22*b.m23+a.m23*b.m33,a.m30*b.m00+a.m31*b.m10+a.m32*b.m20+a.m33*b.m30,a.m30*b.m01+a.m31*b.m11+a.m32*b.m21+a.m33*b.m31,a.m30*b.m02+a.m31*b.m12+a.m32*b.m22+a.m33*b.m32,a.m30*b.m03+a.m31*b.m13+a.m32*b.m23+a.m33*b.m33)},"JU.M4,JU.M4");c(c$,"transform",function(a){this.transform2(a,a)},"JU.T4");c(c$,"transform2",function(a,b){b.set4(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03*a.w,this.m10*a.x+this.m11*a.y+this.m12*a.z+ +this.m13*a.w,this.m20*a.x+this.m21*a.y+this.m22*a.z+this.m23*a.w,this.m30*a.x+this.m31*a.y+this.m32*a.z+this.m33*a.w)},"JU.T4,JU.T4");c(c$,"rotTrans",function(a){this.rotTrans2(a,a)},"JU.T3");c(c$,"rotTrans2",function(a,b){b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13,this.m20*a.x+this.m21*a.y+this.m22*a.z+this.m23);return b},"JU.T3,JU.T3");c(c$,"setAsXYRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m22=b;this.m23= +-a;this.m32=a;this.m33=b;return this},"~N");c(c$,"setAsYZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m03=-a;this.m30=a;this.m33=b;return this},"~N");c(c$,"setAsXZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m11=b;this.m13=-a;this.m31=a;this.m33=b;return this},"~N");d(c$,"equals",function(a){return!j(a,JU.M4)?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m03==a.m03&&this.m10==a.m10&&this.m11==a.m11&&this.m12== +a.m12&&this.m13==a.m13&&this.m20==a.m20&&this.m21==a.m21&&this.m22==a.m22&&this.m23==a.m23&&this.m30==a.m30&&this.m31==a.m31&&this.m32==a.m32&&this.m33==a.m33},"~O");d(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.m00)^JU.T3.floatToIntBits0(this.m01)^JU.T3.floatToIntBits0(this.m02)^JU.T3.floatToIntBits0(this.m03)^JU.T3.floatToIntBits0(this.m10)^JU.T3.floatToIntBits0(this.m11)^JU.T3.floatToIntBits0(this.m12)^JU.T3.floatToIntBits0(this.m13)^JU.T3.floatToIntBits0(this.m20)^JU.T3.floatToIntBits0(this.m21)^ +JU.T3.floatToIntBits0(this.m22)^JU.T3.floatToIntBits0(this.m23)^JU.T3.floatToIntBits0(this.m30)^JU.T3.floatToIntBits0(this.m31)^JU.T3.floatToIntBits0(this.m32)^JU.T3.floatToIntBits0(this.m33)});d(c$,"toString",function(){return"[\n ["+this.m00+"\t"+this.m01+"\t"+this.m02+"\t"+this.m03+"]\n ["+this.m10+"\t"+this.m11+"\t"+this.m12+"\t"+this.m13+"]\n ["+this.m20+"\t"+this.m21+"\t"+this.m22+"\t"+this.m23+"]\n ["+this.m30+"\t"+this.m31+"\t"+this.m32+"\t"+this.m33+"] ]"})});p("JU");n(["javajs.api.JSONEncodable"], +"JU.T3",["java.lang.Float"],function(){c$=q(function(){this.z=this.y=this.x=0;k(this,arguments)},JU,"T3",null,[javajs.api.JSONEncodable,java.io.Serializable]);c(c$,"set",function(a,b,c){this.x=a;this.y=b;this.z=c},"~N,~N,~N");c(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");c(c$,"add2",function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z},"JU.T3,JU.T3");c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+= +a.z},"JU.T3");c(c$,"distanceSquared",function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},"JU.T3");c(c$,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},"JU.T3");c(c$,"sub2",function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z},"JU.T3,JU.T3");c(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");c(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(c$,"add3",function(a,b,c){this.x+=a;this.y+=b;this.z+=c},"~N,~N,~N");c(c$,"scaleT", +function(a){this.x*=a.x;this.y*=a.y;this.z*=a.z},"JU.T3");c(c$,"scaleAdd2",function(a,b,c){this.x=a*b.x+c.x;this.y=a*b.y+c.y;this.z=a*b.z+c.z},"~N,JU.T3,JU.T3");c(c$,"ave",function(a,b){this.x=(a.x+b.x)/2;this.y=(a.y+b.y)/2;this.z=(a.z+b.z)/2},"JU.T3,JU.T3");c(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");c(c$,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(c$,"length",function(){return Math.sqrt(this.lengthSquared())});c(c$,"normalize",function(){var a= +this.length();this.x/=a;this.y/=a;this.z/=a});c(c$,"cross",function(a,b){this.set(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},"JU.T3,JU.T3");d(c$,"hashCode",function(){var a;a=31+JU.T3.floatToIntBits0(this.x);a=31*a+JU.T3.floatToIntBits0(this.y);a=31*a+JU.T3.floatToIntBits0(this.z);return a^a>>32});c$.floatToIntBits0=c(c$,"floatToIntBits0",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");d(c$,"equals",function(a){return!j(a,JU.T3)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");d(c$, +"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});d(c$,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+"]"})});p("javax.swing");n(["java.awt.LayoutManager2","javax.swing.AbstractAction","$.JComponent"],"javax.swing.JRootPane","java.lang.IllegalArgumentException $.NullPointerException java.awt.BorderLayout $.Dimension $.IllegalComponentStateException javax.swing.JLayeredPane $.JPanel $.SwingUtilities $.UIManager jssun.awt.AppContext".split(" "),function(){c$=q(function(){this.windowDecorationStyle= +0;this.defaultReleaseAction=this.defaultPressAction=this.defaultButton=this.glassPane=this.layeredPane=this.contentPane=this.menuBar=null;this.useTrueDoubleBuffering=!0;C("javax.swing.JRootPane.RootLayout")||javax.swing.JRootPane.$JRootPane$RootLayout$();k(this,arguments)},javax.swing,"JRootPane",javax.swing.JComponent);g(c$,function(){r(this,javax.swing.JRootPane,[]);var a=jssun.awt.AppContext.getAppContext().getThreadGroup().getName();this.setName(a+".JRootPane");this.setGlassPane(this.createGlassPane()); +this.setLayeredPane(this.createLayeredPane());this.setContentPane(this.createContentPane());this.setLayout(this.createRootLayout());this.updateUI()});d(c$,"setDoubleBuffered",function(){},"~B");c(c$,"getWindowDecorationStyle",function(){return this.windowDecorationStyle});c(c$,"setWindowDecorationStyle",function(a){if(0>a||8a;a++)this.queues[a]=new java.awt.Queue});c(c$,"postEvent",function(a){jssun.awt.SunToolkit.flushPendingEvents();this.postEventPrivate(a)},"java.awt.AWTEvent");c(c$,"postEventPrivate", +function(a){a.isPosted=!0;if(null==this.dispatchThread&&null==this.nextQueue){if(a.getSource()===jssun.awt.AWTAutoShutdown.getInstance())return;this.initDispatchThread()}null!=this.nextQueue?this.nextQueue.postEventPrivate(a):this.postEventNow(a,java.awt.EventQueue.getPriority(a))},"java.awt.AWTEvent");c$.getPriority=c(c$,"getPriority",function(a){if(j(a,jssun.awt.PeerEvent)){var b=a.getFlags();if(0!=(b&2))return 3;if(0!=(b&1))return 2;if(0!=(b&4))return 0}switch(a.getID()){case 1201:case 800:case 801:return 0; +default:return 1}},"java.awt.AWTEvent");c(c$,"postEventNow",function(a,b){if(!this.coalesceEvent(a,b)){var c=new java.awt.EventQueueItem(a);this.cacheEQItem(c);if(null==this.queues[b].head){var d=this.noEvents();this.queues[b].head=this.queues[b].tail=c;d&&a.getSource()!==jssun.awt.AWTAutoShutdown.getInstance()&&jssun.awt.AWTAutoShutdown.getInstance().notifyThreadBusy(this.dispatchThread)}else this.queues[b].tail.next=c,this.queues[b].tail=c}},"java.awt.AWTEvent,~N");c(c$,"coalescePaintEvent",function(a){var b= +a.getSource().peer;null!=b&&b.coalescePaintEvent(a);b=a.getSource().eventCache;if(null==b)return!1;var c=java.awt.EventQueue.eventToCacheIndex(a);return-1!=c&&null!=b[c]&&(a=this.mergePaintEvents(a,b[c].event),null!=a)?(b[c].event=a,!0):!1},"java.awt.event.PaintEvent");c(c$,"mergePaintEvents",function(a,b){var c=a.getUpdateRect(),d=b.getUpdateRect();return d.contains(c)?b:c.contains(d)?a:null},"java.awt.event.PaintEvent,java.awt.event.PaintEvent");c(c$,"coalesceMouseEvent",function(a){var b=a.getSource().eventCache; +if(null==b)return!1;var c=java.awt.EventQueue.eventToCacheIndex(a);return-1!=c&&null!=b[c]?(b[c].event=a,!0):!1},"java.awt.event.MouseEvent");c(c$,"coalescePeerEvent",function(a){var b=a.getSource().eventCache;if(null==b)return!1;var c=java.awt.EventQueue.eventToCacheIndex(a);if(-1!=c&&null!=b[c]){a=a.coalesceEvents(b[c].event);if(null!=a)return b[c].event=a,!0;b[c]=null}return!1},"jssun.awt.PeerEvent");c(c$,"coalesceOtherEvent",function(a,b){for(var c=a.getID(),d=a.getSource(),f=this.queues[b].head;null!= +f;f=f.next)if(f.event.getSource()===d&&f.id==c){var l=d.coalesceEvents(f.event,a);if(null!=l)return f.event=l,!0}return!1},"java.awt.AWTEvent,~N");c(c$,"coalesceEvent",function(a,b){return!j(a.getSource(),java.awt.Component)?!1:j(a,jssun.awt.PeerEvent)?this.coalescePeerEvent(a):a.getSource().isCoalescingEnabled()&&this.coalesceOtherEvent(a,b)?!0:j(a,java.awt.event.PaintEvent)?this.coalescePaintEvent(a):j(a,java.awt.event.MouseEvent)?this.coalesceMouseEvent(a):!1},"java.awt.AWTEvent,~N");c(c$,"cacheEQItem", +function(a){var b=java.awt.EventQueue.eventToCacheIndex(a.event);if(-1!=b&&j(a.event.getSource(),java.awt.Component)){var c=a.event.getSource();null==c.eventCache&&(c.eventCache=Array(5));c.eventCache[b]=a}},"java.awt.EventQueueItem");c(c$,"uncacheEQItem",function(a){var b=java.awt.EventQueue.eventToCacheIndex(a.event);-1!=b&&j(a.event.getSource(),java.awt.Component)&&(a=a.event.getSource(),null!=a.eventCache&&(a.eventCache[b]=null))},"java.awt.EventQueueItem");c$.eventToCacheIndex=c(c$,"eventToCacheIndex", +function(a){switch(a.getID()){case 800:return 0;case 801:return 1;case 503:return 2;case 506:return 3;default:return-1}},"java.awt.AWTEvent");c(c$,"noEvents",function(){for(var a=0;4>a;a++)if(null!=this.queues[a].head)return!1;return!0});c(c$,"getNextEvent",function(){jssun.awt.SunToolkit.flushPendingEvents();for(var a=3;0<=a;a--)if(null!=this.queues[a].head){var b=this.queues[a].head;this.queues[a].head=b.next;null==b.next&&(this.queues[a].tail=null);this.uncacheEQItem(b);return b.event}jssun.awt.AWTAutoShutdown.getInstance().notifyThreadFree(this.dispatchThread); +return null});c(c$,"getNextEventForID",function(a){jssun.awt.SunToolkit.flushPendingEvents();for(var b=0;4>b;b++)for(var c=this.queues[b].head,d=null;null!=c;d=c,c=c.next)if(c.id==a)return null==d?this.queues[b].head=c.next:d.next=c.next,this.queues[b].tail===c&&(this.queues[b].tail=d),this.uncacheEQItem(c),c.event;this.waitForID=a;this.waitForID=0;return null},"~N");c(c$,"peekEvent",function(){for(var a=3;0<=a;a--)if(null!=this.queues[a].head)return this.queues[a].head.event;return null});c(c$,"peekEvent", +function(a){for(var b=3;0<=b;b--)for(var c=this.queues[b].head;null!=c;c=c.next)if(c.id==a)return c.event;return null},"~N");c(c$,"dispatchEvent",function(a){var b=a.getSource();this.dispatchEventImpl(a,b,!1)},"java.awt.AWTEvent");c(c$,"dispatchEventAndWait",function(a,b){this.dispatchEventImpl(a,b,!0)},"java.awt.AWTEvent,~O");c(c$,"dispatchEventImpl",function(a,b,c){a.isPosted=!0;j(a,java.awt.ActiveEvent)?(this.setCurrentEventAndMostRecentTimeImpl(a),swingjs.JSToolkit.dispatchEvent(a,null,c)):j(b, +java.awt.Component)?(swingjs.JSToolkit.dispatchEvent(a,b,c),a.dispatched()):j(b,jssun.awt.AWTAutoShutdown)?this.noEvents()&&this.dispatchThread.stopDispatching():System.err.println("unable to dispatch event: "+a)},"java.awt.AWTEvent,~O,~B");c$.getMostRecentEventTime=c(c$,"getMostRecentEventTime",function(){return 0});c(c$,"getMostRecentEventTimeEx",function(){return this.mostRecentEventTime});c$.getCurrentEvent=c(c$,"getCurrentEvent",function(){return java.awt.Toolkit.getEventQueue().getCurrentEventImpl()}); +c(c$,"getCurrentEventImpl",function(){return swingjs.JSToolkit.isDispatchThread()?this.currentEvent:null});c(c$,"push",function(a){if(null!=this.nextQueue)this.nextQueue.push(a);else{for(;null!=this.peekEvent();)try{a.postEventPrivate(this.getNextEvent())}catch(b){if(!z(b,InterruptedException))throw b;}a.previousQueue=this;null!=this.dispatchThread&&this.dispatchThread.stopDispatchingLater();this.nextQueue=a;var c=jssun.awt.AppContext.getAppContext();c.get(jssun.awt.AppContext.EVENT_QUEUE_KEY)=== +this&&c.put(jssun.awt.AppContext.EVENT_QUEUE_KEY,a)}},"java.awt.EventQueue");c(c$,"pop",function(){if(null!=this.nextQueue)this.nextQueue.pop();else{if(null==this.previousQueue)throw new java.util.EmptyStackException;for(this.previousQueue.nextQueue=null;null!=this.peekEvent();)try{this.previousQueue.postEventPrivate(this.getNextEvent())}catch(a){if(!z(a,InterruptedException))throw a;}var b=jssun.awt.AppContext.getAppContext();b.get(jssun.awt.AppContext.EVENT_QUEUE_KEY)===this&&b.put(jssun.awt.AppContext.EVENT_QUEUE_KEY, +this.previousQueue);this.previousQueue=null;b=this.dispatchThread;null!=b&&b.stopDispatching()}});c$.isDispatchThread=c(c$,"isDispatchThread",function(){return swingjs.JSToolkit.isDispatchThread()});c(c$,"initDispatchThread",function(){if(null==this.dispatchThread){var a=new java.awt.EventDispatchThread(this.threadGroup,this.name,this);jssun.awt.AWTAutoShutdown.getInstance().notifyThreadBusy(a);this.dispatchThread=a;this.dispatchThread.start()}});c(c$,"detachDispatchThread",function(){this.dispatchThread= +null});c(c$,"getDispatchThread",function(){return this.dispatchThread});c(c$,"removeSourceEvents",function(a,b){jssun.awt.SunToolkit.flushPendingEvents();for(var c=0;4>c;c++){for(var d=this.queues[c].head,f=null;null!=d;)d.event.getSource()===a&&(b||!j(d.event,java.awt.SequencedEvent)&&!j(d.event,java.awt.SentEvent)&&!j(d.event,java.awt.event.FocusEvent)&&!j(d.event,java.awt.event.WindowEvent)&&!j(d.event,java.awt.event.KeyEvent)&&!j(d.event,java.awt.event.InputMethodEvent))?(j(d.event,java.awt.SequencedEvent)&& +d.event.dispose(),j(d.event,java.awt.SentEvent)&&d.event.dispose(),null==f?this.queues[c].head=d.next:f.next=d.next,this.uncacheEQItem(d)):f=d,d=d.next;this.queues[c].tail=f}},"~O,~B");c$.setCurrentEventAndMostRecentTime=c(c$,"setCurrentEventAndMostRecentTime",function(a){java.awt.Toolkit.getEventQueue().setCurrentEventAndMostRecentTimeImpl(a)},"java.awt.AWTEvent");c(c$,"setCurrentEventAndMostRecentTimeImpl",function(a){if(!swingjs.JSToolkit.isDispatchThread()){this.currentEvent=a;var b=-9223372036854775E3; +j(a,java.awt.event.InputEvent)?b=a.getWhen():j(a,java.awt.event.InputMethodEvent)?b=a.getWhen():j(a,java.awt.event.ActionEvent)?b=a.getWhen():j(a,java.awt.event.InvocationEvent)&&(b=a.getWhen());this.mostRecentEventTime=Math.max(this.mostRecentEventTime,b)}},"java.awt.AWTEvent");c$.invokeLater=c(c$,"invokeLater",function(a){java.awt.Toolkit.getEventQueue().postEvent(new java.awt.event.InvocationEvent(java.awt.Toolkit.getDefaultToolkit(),a))},"Runnable");c$.invokeAndWait=c(c$,"invokeAndWait",function(a){java.awt.EventQueue.invokeAndWaitStatic(java.awt.Toolkit.getDefaultToolkit(), +a)},"Runnable");c$.invokeAndWaitStatic=c(c$,"invokeAndWaitStatic",function(a,b){if(java.awt.EventQueue.isDispatchThread())throw Error("Cannot call invokeAndWait from the event dispatcher thread");var c=new java.awt.event.InvocationEvent(a,b,null,!0);swingjs.JSToolkit.dispatchEvent(c,null,!0);c=c.getThrowable();if(null!=c)throw new java.lang.reflect.InvocationTargetException(c);},"~O,Runnable");c(c$,"wakeup",function(a){if(null!=this.nextQueue)this.nextQueue.wakeup(a);else if(null!=this.dispatchThread)try{this.dispatchThread.start()}catch(b){if(z(b, +IllegalThreadStateException))this.dispatchThread.run();else throw b;}else a||this.initDispatchThread()},"~B");x(c$,"threadInitNumber",0,"LOW_PRIORITY",0,"NORM_PRIORITY",1,"HIGH_PRIORITY",2,"ULTIMATE_PRIORITY",3,"NUM_PRIORITIES",4,"PAINT",0,"UPDATE",1,"MOVE",2,"DRAG",3,"PEER",4,"CACHE_LENGTH",5);c$=q(function(){this.tail=this.head=null;k(this,arguments)},java.awt,"Queue");c$=q(function(){this.event=null;this.id=0;this.next=null;k(this,arguments)},java.awt,"EventQueueItem");g(c$,function(a){this.event= +a;this.id=a.getID()},"java.awt.AWTEvent")});p("java.awt");n("java.awt.event.ActionListener $.AdjustmentListener $.ComponentListener $.ContainerListener $.FocusListener $.HierarchyBoundsListener $.HierarchyListener $.InputMethodListener $.ItemListener $.KeyListener $.MouseListener $.MouseMotionListener $.MouseWheelListener $.TextListener $.WindowFocusListener $.WindowListener $.WindowStateListener".split(" "),"java.awt.AWTEventMulticaster",["java.lang.NullPointerException","java.lang.reflect.Array"], +function(){c$=q(function(){this.b=this.a=null;k(this,arguments)},java.awt,"AWTEventMulticaster",null,[java.awt.event.ComponentListener,java.awt.event.ContainerListener,java.awt.event.FocusListener,java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.WindowListener,java.awt.event.WindowFocusListener,java.awt.event.WindowStateListener,java.awt.event.ActionListener,java.awt.event.ItemListener,java.awt.event.AdjustmentListener,java.awt.event.TextListener, +java.awt.event.InputMethodListener,java.awt.event.HierarchyListener,java.awt.event.HierarchyBoundsListener,java.awt.event.MouseWheelListener]);g(c$,function(a,b){this.a=a;this.b=b},"java.util.EventListener,java.util.EventListener");c(c$,"remove",function(a){if(a===this.a)return this.b;if(a===this.b)return this.a;var b=java.awt.AWTEventMulticaster.removeInternal(this.a,a);a=java.awt.AWTEventMulticaster.removeInternal(this.b,a);return b===this.a&&a===this.b?this:java.awt.AWTEventMulticaster.addInternal(b, +a)},"java.util.EventListener");c(c$,"componentResized",function(a){this.a.componentResized(a);this.b.componentResized(a)},"java.awt.event.ComponentEvent");c(c$,"componentMoved",function(a){this.a.componentMoved(a);this.b.componentMoved(a)},"java.awt.event.ComponentEvent");c(c$,"componentShown",function(a){this.a.componentShown(a);this.b.componentShown(a)},"java.awt.event.ComponentEvent");c(c$,"componentHidden",function(a){this.a.componentHidden(a);this.b.componentHidden(a)},"java.awt.event.ComponentEvent"); +c(c$,"componentAdded",function(a){this.a.componentAdded(a);this.b.componentAdded(a)},"java.awt.event.ContainerEvent");c(c$,"componentRemoved",function(a){this.a.componentRemoved(a);this.b.componentRemoved(a)},"java.awt.event.ContainerEvent");c(c$,"focusGained",function(a){this.a.focusGained(a);this.b.focusGained(a)},"java.awt.event.FocusEvent");c(c$,"focusLost",function(a){this.a.focusLost(a);this.b.focusLost(a)},"java.awt.event.FocusEvent");c(c$,"keyTyped",function(a){this.a.keyTyped(a);this.b.keyTyped(a)}, +"java.awt.event.KeyEvent");c(c$,"keyPressed",function(a){this.a.keyPressed(a);this.b.keyPressed(a)},"java.awt.event.KeyEvent");c(c$,"keyReleased",function(a){this.a.keyReleased(a);this.b.keyReleased(a)},"java.awt.event.KeyEvent");c(c$,"mouseClicked",function(a){this.a.mouseClicked(a);this.b.mouseClicked(a)},"java.awt.event.MouseEvent");c(c$,"mousePressed",function(a){this.a.mousePressed(a);this.b.mousePressed(a)},"java.awt.event.MouseEvent");c(c$,"mouseReleased",function(a){this.a.mouseReleased(a); +this.b.mouseReleased(a)},"java.awt.event.MouseEvent");c(c$,"mouseEntered",function(a){this.a.mouseEntered(a);this.b.mouseEntered(a)},"java.awt.event.MouseEvent");c(c$,"mouseExited",function(a){this.a.mouseExited(a);this.b.mouseExited(a)},"java.awt.event.MouseEvent");c(c$,"mouseDragged",function(a){this.a.mouseDragged(a);this.b.mouseDragged(a)},"java.awt.event.MouseEvent");c(c$,"mouseMoved",function(a){this.a.mouseMoved(a);this.b.mouseMoved(a)},"java.awt.event.MouseEvent");c(c$,"windowOpened",function(a){this.a.windowOpened(a); +this.b.windowOpened(a)},"java.awt.event.WindowEvent");c(c$,"windowClosing",function(a){this.a.windowClosing(a);this.b.windowClosing(a)},"java.awt.event.WindowEvent");c(c$,"windowClosed",function(a){this.a.windowClosed(a);this.b.windowClosed(a)},"java.awt.event.WindowEvent");c(c$,"windowIconified",function(a){this.a.windowIconified(a);this.b.windowIconified(a)},"java.awt.event.WindowEvent");c(c$,"windowDeiconified",function(a){this.a.windowDeiconified(a);this.b.windowDeiconified(a)},"java.awt.event.WindowEvent"); +c(c$,"windowActivated",function(a){this.a.windowActivated(a);this.b.windowActivated(a)},"java.awt.event.WindowEvent");c(c$,"windowDeactivated",function(a){this.a.windowDeactivated(a);this.b.windowDeactivated(a)},"java.awt.event.WindowEvent");c(c$,"windowStateChanged",function(a){this.a.windowStateChanged(a);this.b.windowStateChanged(a)},"java.awt.event.WindowEvent");c(c$,"windowGainedFocus",function(a){this.a.windowGainedFocus(a);this.b.windowGainedFocus(a)},"java.awt.event.WindowEvent");c(c$,"windowLostFocus", +function(a){this.a.windowLostFocus(a);this.b.windowLostFocus(a)},"java.awt.event.WindowEvent");c(c$,"actionPerformed",function(a){this.a.actionPerformed(a);this.b.actionPerformed(a)},"java.awt.event.ActionEvent");c(c$,"itemStateChanged",function(a){this.a.itemStateChanged(a);this.b.itemStateChanged(a)},"java.awt.event.ItemEvent");c(c$,"adjustmentValueChanged",function(a){this.a.adjustmentValueChanged(a);this.b.adjustmentValueChanged(a)},"java.awt.event.AdjustmentEvent");c(c$,"textValueChanged",function(a){this.a.textValueChanged(a); +this.b.textValueChanged(a)},"java.awt.event.TextEvent");c(c$,"inputMethodTextChanged",function(a){this.a.inputMethodTextChanged(a);this.b.inputMethodTextChanged(a)},"java.awt.event.InputMethodEvent");c(c$,"caretPositionChanged",function(a){this.a.caretPositionChanged(a);this.b.caretPositionChanged(a)},"java.awt.event.InputMethodEvent");c(c$,"hierarchyChanged",function(a){this.a.hierarchyChanged(a);this.b.hierarchyChanged(a)},"java.awt.event.HierarchyEvent");c(c$,"ancestorMoved",function(a){this.a.ancestorMoved(a); +this.b.ancestorMoved(a)},"java.awt.event.HierarchyEvent");c(c$,"ancestorResized",function(a){this.a.ancestorResized(a);this.b.ancestorResized(a)},"java.awt.event.HierarchyEvent");c(c$,"mouseWheelMoved",function(a){this.a.mouseWheelMoved(a);this.b.mouseWheelMoved(a)},"java.awt.event.MouseWheelEvent");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.ComponentListener,java.awt.event.ComponentListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a, +b)},"java.awt.event.ContainerListener,java.awt.event.ContainerListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.FocusListener,java.awt.event.FocusListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.KeyListener,java.awt.event.KeyListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.MouseListener,java.awt.event.MouseListener"); +c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.WindowListener,java.awt.event.WindowListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a, +b)},"java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.ActionListener,java.awt.event.ActionListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.ItemListener,java.awt.event.ItemListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener"); +c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.TextListener,java.awt.event.TextListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a, +b)},"java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");c$.add=c(c$,"add",function(a,b){return java.awt.AWTEventMulticaster.addInternal(a,b)},"java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.ComponentListener,java.awt.event.ComponentListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)}, +"java.awt.event.ContainerListener,java.awt.event.ContainerListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.FocusListener,java.awt.event.FocusListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.KeyListener,java.awt.event.KeyListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.MouseListener,java.awt.event.MouseListener"); +c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.WindowListener,java.awt.event.WindowListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");c$.remove= +c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.ActionListener,java.awt.event.ActionListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.ItemListener,java.awt.event.ItemListener");c$.remove=c(c$,"remove",function(a, +b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.TextListener,java.awt.event.TextListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a, +b)},"java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");c$.remove=c(c$,"remove",function(a,b){return java.awt.AWTEventMulticaster.removeInternal(a,b)},"java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");c$.addInternal=c(c$,"addInternal",function(a,b){return null==a?b:null==b?a:new java.awt.AWTEventMulticaster(a, +b)},"java.util.EventListener,java.util.EventListener");c$.removeInternal=c(c$,"removeInternal",function(a,b){return a===b||null==a?null:j(a,java.awt.AWTEventMulticaster)?a.remove(b):a},"java.util.EventListener,java.util.EventListener");c$.getListenerCount=c(c$,"getListenerCount",function(a,b){return j(a,java.awt.AWTEventMulticaster)?java.awt.AWTEventMulticaster.getListenerCount(a.a,b)+java.awt.AWTEventMulticaster.getListenerCount(a.b,b):b.isInstance(a)?1:0},"java.util.EventListener,Class");c$.populateListenerArray= +c(c$,"populateListenerArray",function(a,b,c){return j(b,java.awt.AWTEventMulticaster)?(c=java.awt.AWTEventMulticaster.populateListenerArray(a,b.a,c),java.awt.AWTEventMulticaster.populateListenerArray(a,b.b,c)):a.getClass().getComponentType().isInstance(b)?(a[c]=b,c+1):c},"~A,java.util.EventListener,~N");c$.getListeners=c(c$,"getListeners",function(a,b){if(null==b)throw new NullPointerException("Listener type should not be null");var c=java.awt.AWTEventMulticaster.getListenerCount(a,b),c=java.lang.reflect.Array.newInstance(b, +c);java.awt.AWTEventMulticaster.populateListenerArray(c,a,0);return c},"java.util.EventListener,Class")});p("java.awt");n(["java.util.EventObject"],"java.awt.AWTEvent",["java.awt.Component","java.awt.peer.LightweightPeer"],function(){c$=q(function(){this.bdata=null;this.num=this.id=0;this.isPosted=this.focusManagerIsDispatching=this.consumed=!1;k(this,arguments)},java.awt,"AWTEvent",java.util.EventObject);g(c$,function(a){this.construct(a.target,a.id)},"java.awt.Event");g(c$,function(a,b){r(this, +java.awt.AWTEvent,[a]);this.id=b;this.num=++java.awt.AWTEvent.idnum;switch(b){case 1001:case 701:case 601:case 900:this.consumed=!0}},"~O,~N");c(c$,"setSource",function(a){if(this.source!==a){var b=null;if(j(a,java.awt.Component))for(b=a;null!=b&&null!=b.peer&&j(b.peer,java.awt.peer.LightweightPeer);)b=b.parent;this.source=a}},"~O");c(c$,"getID",function(){return this.id});d(c$,"toString",function(){var a=null;j(this.source,java.awt.Component)&&(a=this.source.getName());return this.getClass().getName()+ +"["+this.paramString()+"] on "+(null!=a?a:this.source)});c(c$,"paramString",function(){return""});c(c$,"consume",function(){switch(this.id){case 401:case 402:case 501:case 502:case 503:case 506:case 504:case 505:case 507:case 1100:case 1101:this.consumed=!0}});c(c$,"isConsumed",function(){return this.consumed});c(c$,"copyPrivateDataInto",function(a){a.bdata=this.bdata},"java.awt.AWTEvent");c(c$,"dispatched",function(){});x(c$,"idnum",0,"COMPONENT_EVENT_MASK",1,"CONTAINER_EVENT_MASK",2,"FOCUS_EVENT_MASK", +4,"KEY_EVENT_MASK",8,"MOUSE_EVENT_MASK",16,"MOUSE_MOTION_EVENT_MASK",32,"WINDOW_EVENT_MASK",64,"ACTION_EVENT_MASK",128,"ADJUSTMENT_EVENT_MASK",256,"ITEM_EVENT_MASK",512,"TEXT_EVENT_MASK",1024,"INPUT_METHOD_EVENT_MASK",2048,"INPUT_METHODS_ENABLED_MASK",4096,"PAINT_EVENT_MASK",8192,"INVOCATION_EVENT_MASK",16384,"HIERARCHY_EVENT_MASK",32768,"HIERARCHY_BOUNDS_EVENT_MASK",65536,"MOUSE_WHEEL_EVENT_MASK",131072,"WINDOW_STATE_EVENT_MASK",262144,"WINDOW_FOCUS_EVENT_MASK",524288,"RESERVED_ID_MAX",1999)});p("java.awt.event"); +n(["java.util.EventListener"],"java.awt.event.AWTEventListener",null,function(){y(java.awt.event,"AWTEventListener",java.util.EventListener)});p("java.awt");y(java.awt,"ActiveEvent");p("java.awt.event");n(["java.awt.AWTEvent","$.ActiveEvent"],"java.awt.event.InvocationEvent",["java.lang.Exception"],function(){c$=q(function(){this.notifier=this.runnable=null;this.catchExceptions=!1;this.throwable=this.exception=null;this.when=0;k(this,arguments)},java.awt.event,"InvocationEvent",java.awt.AWTEvent, +java.awt.ActiveEvent);g(c$,function(a,b){this.construct(a,b,null,!1)},"~O,Runnable");g(c$,function(a,b,c,d){this.construct(a,1200,b,c,d)},"~O,Runnable,~O,~B");g(c$,function(a,b,c,d,f){r(this,java.awt.event.InvocationEvent,[a,b]);this.runnable=c;this.notifier=d;this.catchExceptions=f;this.when=System.currentTimeMillis()},"~O,~N,Runnable,~O,~B");d(c$,"dispatch",function(){if(this.catchExceptions)try{this.runnable.run()}catch(a){j(a,Exception)&&(this.exception=a),this.throwable=a}else this.runnable.run(); +null!=this.notifier&&this.notifier.notifyAll()});c(c$,"getException",function(){return this.catchExceptions?this.exception:null});c(c$,"getThrowable",function(){return this.catchExceptions?this.throwable:null});c(c$,"getWhen",function(){return this.when});d(c$,"paramString",function(){var a;switch(this.id){case 1200:a="INVOCATION_DEFAULT";break;default:a="unknown type"}return a+",runnable="+this.runnable+",notifier="+this.notifier+",catchExceptions="+this.catchExceptions+",when="+this.when});x(c$, +"SWINGJS_INVOCATION_LOW",1201,"INVOCATION_FIRST",1200,"INVOCATION_DEFAULT",1200,"INVOCATION_LAST",1201)});p("java.awt.event");n(["java.awt.AWTEvent"],"java.awt.event.ComponentEvent",["java.awt.Component"],function(){c$=t(java.awt.event,"ComponentEvent",java.awt.AWTEvent);c(c$,"getComponent",function(){return j(this.source,java.awt.Component)?this.source:null});d(c$,"paramString",function(){var a;a=null!=this.source?this.source.getBounds():null;switch(this.id){case 102:a="COMPONENT_SHOWN";break;case 103:a= +"COMPONENT_HIDDEN";break;case 100:a="COMPONENT_MOVED ("+a.x+","+a.y+" "+a.width+"x"+a.height+")";break;case 101:a="COMPONENT_RESIZED ("+a.x+","+a.y+" "+a.width+"x"+a.height+")";break;default:a="unknown type"}return a});x(c$,"COMPONENT_FIRST",100,"COMPONENT_LAST",103,"COMPONENT_MOVED",100,"COMPONENT_RESIZED",101,"COMPONENT_SHOWN",102,"COMPONENT_HIDDEN",103)});p("java.awt.event");n(["java.awt.event.InputEvent"],"java.awt.event.MouseEvent",["java.lang.IllegalArgumentException","$.StringBuilder","java.awt.Point", +"$.Toolkit"],function(){c$=q(function(){this.button=this.clickCount=this.yAbs=this.xAbs=this.y=this.x=0;this.popupTrigger=!1;k(this,arguments)},java.awt.event,"MouseEvent",java.awt.event.InputEvent);c(c$,"getLocationOnScreen",function(){return new java.awt.Point(this.xAbs,this.yAbs)});c(c$,"getXOnScreen",function(){return this.xAbs});c(c$,"getYOnScreen",function(){return this.yAbs});g(c$,function(a,b,c,d,f,l,g,j,k){this.construct(a,b,c,d,f,l,0,0,g,j,k);b=new java.awt.Point(0,0);try{b=a.getLocationOnScreen(), +this.xAbs=b.x+f,this.yAbs=b.y+l}catch(n){if(z(n,java.awt.IllegalComponentStateException))this.yAbs=this.xAbs=0;else throw n;}},"java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N");g(c$,function(a,b,c,d,f,l,g,j){this.construct(a,b,c,d,f,l,g,j,0)},"java.awt.Component,~N,~N,~N,~N,~N,~N,~B");g(c$,function(a,b,c,d,f,l,g,j,k,n,p){r(this,java.awt.event.MouseEvent,[a,b,c,d]);this.x=f;this.y=l;this.xAbs=g;this.yAbs=j;this.clickCount=k;this.popupTrigger=n;if(0>p||3d&&0!=c;d++)0!= +(c&1)&&this.calls[d]++,c>>>=1}},"java.awt.event.AWTEventListener,~N");c(c$,"removeAWTEventListener",function(a){var b=java.awt.Toolkit.deProxyAWTEventListener(a);if(null!=a){a=this.listener2SelectiveListener.get(b);if(null!=a){this.listener2SelectiveListener.remove(b);for(var c=a.getCalls(),d=0;32>d;d++)this.calls[d]-=c[d],0==this.calls[d]&&(java.awt.Toolkit.enabledOnToolkitMask&=~(1<>>=1,b++);b--;return this.calls[b]},"~N");c(c$,"getAWTEventListeners",function(){for(var a=java.awt.Toolkit.ToolkitEventMulticaster.getListeners(this.eventListener,java.awt.event.AWTEventListener),b=Array(a.length),c=0;cb&&0!=a;b++)0!=(a&1)&&this.calls[b]++,a>>>=1},"~N");g(c$,function(a,b){this.listener=a;this.eventMask=b},"java.awt.event.AWTEventListener,~N");c(c$,"eventDispatched",function(a){var b=0;if(0!=(b=this.eventMask&1)&&100<=a.id&&103>=a.id||0!=(b=this.eventMask&2)&&300<=a.id&&301>=a.id||0!=(b=this.eventMask&4)&&1004<=a.id&&1005>=a.id||0!=(b=this.eventMask&8)&&400<=a.id&&402>=a.id||0!=(b=this.eventMask& +131072)&&507==a.id||0!=(b=this.eventMask&32)&&(503==a.id||506==a.id)||0!=(b=this.eventMask&16)&&503!=a.id&&506!=a.id&&507!=a.id&&500<=a.id&&507>=a.id||0!=(b=this.eventMask&64)&&200<=a.id&&209>=a.id||0!=(b=this.eventMask&128)&&1001<=a.id&&1001>=a.id||0!=(b=this.eventMask&256)&&601<=a.id&&601>=a.id||0!=(b=this.eventMask&512)&&701<=a.id&&701>=a.id||0!=(b=this.eventMask&1024)&&900<=a.id&&900>=a.id||0!=(b=this.eventMask&2048)&&1100<=a.id&&1101>=a.id||0!=(b=this.eventMask&8192)&&800<=a.id&&801>=a.id||0!= +(b=this.eventMask&16384)&&1200<=a.id&&1201>=a.id||0!=(b=this.eventMask&32768)&&1400==a.id||0!=(b=this.eventMask&65536)&&(1401==a.id||1402==a.id)||0!=(b=this.eventMask&262144)&&209==a.id||0!=(b=this.eventMask&524288)&&(207==a.id||208==a.id)){for(var c=0;0!=b;b>>>=1,c++);c--;for(b=0;ba)throw new IllegalArgumentException("timeout value is negative");if(0>b||999999a)throw new IllegalArgumentException;if(null!=(b=this.getThreadGroup()))a> +b.getMaxPriority()&&(a=b.getMaxPriority()),this.setPriority0(this.priority=a)},"~N");c(c$,"getPriority",function(){return this.priority});c(c$,"setName",function(a){this.checkAccess();this.name=a},"~S");c(c$,"getName",function(){return this.name});c(c$,"getThreadGroup",function(){return this.group});c$.activeCount=c(c$,"activeCount",function(){return java.lang.Thread.currentThread().getThreadGroup().activeCount()});c$.enumerate=c(c$,"enumerate",function(a){return java.lang.Thread.currentThread().getThreadGroup().enumerate(a)}, +"~A");c(c$,"countStackFrames",function(){return 0});c(c$,"join",function(a){var b=System.currentTimeMillis(),c=0;if(0>a)throw new IllegalArgumentException("timeout value is negative");swingjs.JSToolkit.warn("Cannot wait in Thread");if(0==a)for(;this.isAlive();)this.wait(0);else for(;this.isAlive();){c=a-c;if(0>=c)break;this.wait(c);c=System.currentTimeMillis()-b}},"~N");c(c$,"join",function(a,b){if(0>a)throw new IllegalArgumentException("timeout value is negative");if(0>b||999999a||10a.length-b&&(l=a.length-b);for(var g=0;ga.length-b&&(l=a.length-b);0a||a>=this.component.size())throw new ArrayIndexOutOfBoundsException("No such child: "+a);return this.component.get(a)},"~N");c(c$,"getComponents",function(){return this.getComponents_NoClientCode()});c(c$,"getComponents_NoClientCode",function(){return this.component.toArray(java.awt.Container.EMPTY_ARRAY)});c(c$,"getInsets", +function(){var a=this.peer;return j(a,java.awt.peer.ContainerPeer)?a.getInsets().clone():new java.awt.Insets(0,0,0,0)});c(c$,"add",function(a){return this.addImpl(a,null,-1)},"java.awt.Component");c(c$,"add",function(a,b){return this.addImpl(b,a,-1)},"~S,java.awt.Component");c(c$,"add",function(a,b){return this.addImpl(a,null,b)},"java.awt.Component,~N");c(c$,"checkAddToSelf",function(a){if(j(a,java.awt.Container))for(var b=this;null!=b;b=b.parent)if(b===a)throw new IllegalArgumentException("adding container's parent to itself"); +},"java.awt.Component");c(c$,"checkNotAWindow",function(a){if(j(a,java.awt.Window))throw new IllegalArgumentException("adding a window to a container");},"java.awt.Component");c(c$,"removeDelicately",function(a,b,c){var d=this.getComponentZOrder(a),f=java.awt.Container.isRemoveNotifyNeeded(a,this,b);f&&a.removeNotify();b!==this?(null!=this.layoutMgr&&this.layoutMgr.removeLayoutComponent(a),this.adjustListeningChildren(32768,-a.numListening(32768)),this.adjustListeningChildren(65536,-a.numListening(65536)), +this.adjustDescendants(-a.countHierarchyMembers()),a.parent=null,this.component.remove(d),this.invalidateIfValid()):(this.component.remove(d),this.component.add(c,a));if(null==a.parent){if(null!=this.containerListener||0!=(this.eventMask&2)||java.awt.Toolkit.enabledOnToolkit(2))b=new java.awt.event.ContainerEvent(this,301,a),this.dispatchEvent(b);a.createHierarchyEvents(1400,a,this,1,java.awt.Toolkit.enabledOnToolkit(32768));null!=this.peer&&(null==this.layoutMgr&&this.isVisible())&&this.updateCursorImmediately()}return f}, +"java.awt.Component,java.awt.Container,~N");c(c$,"canContainFocusOwner",function(a){return!this.isEnabled()||!this.isDisplayable()||!this.isVisible()||!this.isFocusable()?!1:null!=this.parent?this.parent.canContainFocusOwner(a):!0},"java.awt.Component");c(c$,"hasHeavyweightDescendants",function(){return 0this.component.size()||0>c&&-1!=c)throw new IllegalArgumentException("illegal component position"); +this.checkAddToSelf(a);this.checkNotAWindow(a);if(null!=a.parent&&(a.parent.remove(a),c>this.component.size()))throw new IllegalArgumentException("illegal component position");-1==c?this.component.add(a):this.component.add(c,a);a.parent=this;this.adjustListeningChildren(32768,a.numListening(32768));this.adjustListeningChildren(65536,a.numListening(65536));this.adjustDescendants(a.countHierarchyMembers());this.invalidateIfValid();null!=this.peer&&a.addNotify();null!=this.layoutMgr&&(j(this.layoutMgr, +java.awt.LayoutManager2)?this.layoutMgr.addLayoutComponent(a,b):j(b,String)&&this.layoutMgr.addLayoutComponent(b,a));if(null!=this.containerListener||0!=(this.eventMask&2)||java.awt.Toolkit.enabledOnToolkit(2))b=new java.awt.event.ContainerEvent(this,300,a),this.dispatchEvent(b);a.createHierarchyEvents(1400,a,this,1,java.awt.Toolkit.enabledOnToolkit(32768));null!=this.peer&&(null==this.layoutMgr&&this.isVisible())&&this.updateCursorImmediately();return a},"java.awt.Component,~O,~N");c(c$,"checkGD", +function(){},"~S");c(c$,"remove",function(a){this.removeInt(a)},"~N");c(c$,"removeInt",function(a){if(0>a||a>=this.component.size())throw new ArrayIndexOutOfBoundsException(a);var b=this.component.get(a);null!=this.peer&&b.removeNotify();null!=this.layoutMgr&&this.layoutMgr.removeLayoutComponent(b);this.adjustListeningChildren(32768,-b.numListening(32768));this.adjustListeningChildren(65536,-b.numListening(65536));this.adjustDescendants(-b.countHierarchyMembers());b.parent=null;this.component.remove(a); +this.invalidateIfValid();if(null!=this.containerListener||0!=(this.eventMask&2)||java.awt.Toolkit.enabledOnToolkit(2))a=new java.awt.event.ContainerEvent(this,301,b),this.dispatchEvent(a);b.createHierarchyEvents(1400,b,this,1,java.awt.Toolkit.enabledOnToolkit(32768));null!=this.peer&&(null==this.layoutMgr&&this.isVisible())&&this.updateCursorImmediately()},"~N");c(c$,"remove",function(a){this.removeChild(a)},"java.awt.Component");c(c$,"removeChild",function(a){a.parent===this&&(a=this.component.indexOf(a), +0<=a&&this.remove(a))},"java.awt.Component");c(c$,"removeAll",function(){this.adjustListeningChildren(32768,-this.listeningChildren);this.adjustListeningChildren(65536,-this.listeningBoundsChildren);for(this.adjustDescendants(-this.descendantsCount);!this.component.isEmpty();){var a=this.component.remove(this.component.size()-1);null!=this.peer&&a.removeNotify();null!=this.layoutMgr&&this.layoutMgr.removeLayoutComponent(a);a.parent=null;if(null!=this.containerListener||0!=(this.eventMask&2)||java.awt.Toolkit.enabledOnToolkit(2)){var b= +new java.awt.event.ContainerEvent(this,301,a);this.dispatchEvent(b)}a.createHierarchyEvents(1400,a,this,1,java.awt.Toolkit.enabledOnToolkit(32768))}null!=this.peer&&(null==this.layoutMgr&&this.isVisible())&&this.updateCursorImmediately();this.invalidateIfValid()});c(c$,"numListening",function(a){var b=this.numListeningMask(a);return 32768==a?this.listeningChildren+b:65536==a?this.listeningBoundsChildren+b:b},"~N");c(c$,"adjustListeningChildren",function(a,b){0!=b&&(0!=(a&32768)&&(this.listeningChildren+= +b),0!=(a&65536)&&(this.listeningBoundsChildren+=b),this.adjustListeningChildrenOnParent(a,b))},"~N,~N");c(c$,"adjustDescendants",function(a){0!=a&&(this.descendantsCount+=a,this.adjustDecendantsOnParent(a))},"~N");c(c$,"adjustDecendantsOnParent",function(a){null!=this.parent&&this.parent.adjustDescendants(a)},"~N");c(c$,"countHierarchyMembers",function(){return this.descendantsCount+1});c(c$,"getListenersCount",function(a,b){if(b)return this.descendantsCount;switch(a){case 1400:return this.listeningChildren; +case 1401:case 1402:return this.listeningBoundsChildren;default:return 0}},"~N,~B");c(c$,"createHierarchyEvents",function(a,b,c,d,f){for(var g=this.getListenersCount(a,f),j=g,k=0;0a||0>b)throw new IllegalArgumentException("Width and height must be >= 0"); +return-1},"~N,~N");c(c$,"getBaselineResizeBehavior",function(){return java.awt.Component.BaselineResizeBehavior.OTHER});c(c$,"doLayout",function(){this.layout()});c(c$,"layout",function(){});c(c$,"validate",function(){this.validateComponent()});c(c$,"validateComponent",function(){var a=this.peer,b=this.isValid();if(!b&&null!=a){var c=this.getFont(),d=this.peerFont;if(c!==d&&(null==d||!d.equals(c)))a.setFont(c),this.peerFont=c;a.layout()}this.valid=!0;b||this.mixOnValidating()});c(c$,"invalidate", +function(){this.invalidateComp()});c(c$,"invalidateComp",function(){this.valid=!1;this.isPreferredSizeSet()||(this.prefSize=null);this.isMinimumSizeSet()||(this.minSize=null);this.isMaximumSizeSet()||(this.maxSize=null);null!=this.parent&&this.parent.invalidateIfValid()});c(c$,"invalidateIfValid",function(){this.isValid()&&this.invalidate()});c(c$,"getGraphics",function(){if(j(this.peer,java.awt.peer.LightweightPeer)){if(null==this.parent)return null;var a=this.parent.getGraphics();if(null==a)return null; +a.setFont(this.getFont());return a}a=this.peer;return null!=a?a.getGraphics():null});c(c$,"getTreeLock",function(){return this});c(c$,"getFontMetrics",function(a){return jssun.font.FontDesignMetrics.getMetrics(a)},"java.awt.Font");c(c$,"setCursor",function(a){this.cursor=a;this.updateCursorImmediately()},"java.awt.Cursor");c(c$,"updateCursorImmediately",function(){});c(c$,"getCursor",function(){return this.getCursor_NoClientCode()});c(c$,"getCursor_NoClientCode",function(){var a=this.cursor;if(null!= +a)return a;a=this.parent;return null!=a?a.getCursor_NoClientCode():java.awt.Cursor.getPredefinedCursor(0)});c(c$,"isCursorSet",function(){return null!=this.cursor});c(c$,"paint",function(){},"java.awt.Graphics");c(c$,"update",function(a){this.paint(a)},"java.awt.Graphics");c(c$,"paintAll",function(){},"java.awt.Graphics");c(c$,"lightweightPaint",function(a){this.lwPaintComp(a)},"java.awt.Graphics");c(c$,"lwPaintComp",function(a){this.paint(a)},"java.awt.Graphics");c(c$,"paintHeavyweightComponents", +function(){},"java.awt.Graphics");c(c$,"repaint",function(){this.repaintImpl(0,0,0,this.width,this.height)});c(c$,"repaint",function(a){this.repaintImpl(a,0,0,this.width,this.height)},"~N");c(c$,"repaint",function(a,b,c,d){this.repaintImpl(0,a,b,c,d)},"~N,~N,~N,~N");c(c$,"repaint",function(a,b,c,d,f){this.repaintImpl(a,b,c,d,f)},"~N,~N,~N,~N,~N");c(c$,"repaintImpl",function(a,b,c,d,f){j(this.peer,java.awt.peer.LightweightPeer)?null!=this.parent&&this.parent.repaint(a,this.x+(0>b?0:b),this.y+(0>c? +0:c),d>this.width?this.width:d,f>this.height?this.height:f):this.isVisible()&&(null!=this.peer&&0a?-1:a});c(c$,"getSiblingIndexBelow",function(){var a=this.getContainer();if(null==a)return-1;var b=a.getComponentZOrder(this)+ +1;return b>=a.getComponentCount()?-1:b});c(c$,"mixOnShowing",function(){});c(c$,"mixOnHiding",function(){},"~B");c(c$,"mixOnReshaping",function(){swingjs.JSToolkit.taintUI(this)});c(c$,"mixOnZOrderChanging",function(){},"~N,~N");c(c$,"mixOnValidating",function(){});c$.doesClassImplement=c(c$,"doesClassImplement",function(a,b){if(null==a)return!1;for(var c,d=0,f=a.getInterfaces();d=d||0>=f||null==a))if(!(0>=a.getWidth()||0>=a.getHeight())&&!this.extendDirtyRegion(a,b,c,d,f)){for(var g=null,m=a;null!=m;m=m.getParent()){if(!m.isVisible()||null==m.getPeer())return;if(j(m,java.awt.Window)||j(m,java.applet.Applet)){if(j(m,java.awt.Frame)&&1==(m.getExtendedState()&1))return;g=m;break}}null!=g&&!this.extendDirtyRegion(a,b,c,d,f)&&(this.dirtyComponents.put(a,new java.awt.Rectangle(b,c, +d,f)),this.scheduleProcessingRunnable(a))}},"java.awt.Container,~N,~N,~N,~N");c(c$,"addDirtyRegion",function(a,b,c,d,f){this.addDirtyRegion0(a,b,c,d,f)},"javax.swing.JComponent,~N,~N,~N,~N");c(c$,"addDirtyRegion",function(a,b,c,d,f){this.addDirtyRegion0(a,b,c,d,f)},"java.awt.Window,~N,~N,~N,~N");c(c$,"addDirtyRegion",function(a,b,c,d,f){this.addDirtyRegion0(a,b,c,d,f)},"java.applet.Applet,~N,~N,~N,~N");c(c$,"scheduleHeavyWeightPaints",function(){var a;if(0!=this.hwDirtyComponents.size()){a=this.hwDirtyComponents; +this.hwDirtyComponents=new java.util.IdentityHashMap;for(var b,c=a.keySet().iterator();c.hasNext()&&((b=c.next())||1);){var d=a.get(b);j(b,java.awt.Window)?this.addDirtyRegion(b,d.x,d.y,d.width,d.height):j(b,java.applet.Applet)?this.addDirtyRegion(b,d.x,d.y,d.width,d.height):this.addDirtyRegion0(b,d.x,d.y,d.width,d.height)}}});c(c$,"nativeAddDirtyRegion",function(a,b,c,d,f,g){if(0=c;d--){for(var f=b.get(d);!(f===a||null==f||!j(f,javax.swing.JComponent));)f=f.getParent();f===a&&b.remove(d)}},"javax.swing.JComponent,java.util.List,~N"); +c(c$,"collectDirtyComponents",function(a,b,c){var d,f,g,m,k,n;k=n=b;var p=b.getX(),q=b.getY(),r=b.getWidth(),t=b.getHeight();f=m=d=g=0;this.tmp.setBounds(a.get(b));javax.swing.SwingUtilities.computeIntersection(0,0,r,t,this.tmp);if(!this.tmp.isEmpty()){for(;j(k,javax.swing.JComponent);){k=k.getParent();if(null==k)break;d+=p;f+=q;this.tmp.setLocation(this.tmp.x+p,this.tmp.y+q);p=k.getX();q=k.getY();r=k.getWidth();t=k.getHeight();this.tmp=javax.swing.SwingUtilities.computeIntersection(0,0,r,t,this.tmp); +if(this.tmp.isEmpty())return;null!=a.get(k)&&(n=k,g=d,m=f)}b!==n&&(this.tmp.setLocation(this.tmp.x+g-d,this.tmp.y+m-f),a=a.get(n),javax.swing.SwingUtilities.computeUnion(this.tmp.x,this.tmp.y,this.tmp.width,this.tmp.height,a));c.contains(n)||c.add(n)}},"java.util.Map,java.awt.Component,java.util.List");d(c$,"toString",function(){var a=new StringBuffer;null!=this.dirtyComponents&&a.append(""+this.dirtyComponents);return a.toString()});c(c$,"getOffscreenBuffer",function(){return null},"java.awt.Component,~N,~N"); +c(c$,"getVolatileOffscreenBuffer",function(a,b,c){a=a.getGraphicsConfiguration();var d=this.getDoubleBufferMaximumSize();b=1>b?1:b>d.width?d.width:b;c=1>c?1:c>d.height?d.height:c;d=this.volatileMap.get(a);if(null==d||d.getWidth()=b,d=1001<=b&&1001>=b,b=201==b;if(java.awt.Component.isInstanceOf(this.modalComponent,"javax.swing.JInternalFrame"))return b?java.awt.EventFilter.FilterAction.REJECT:java.awt.EventFilter.FilterAction.ACCEPT; +if(c||d||b)if(a=a.getSource(),!j(a,jssun.awt.ModalExclude)&&j(a,java.awt.Component)){c=!1;if(j(this.modalComponent,java.awt.Container))for(;a!==this.modalComponent&&null!=a;){if(j(a,java.awt.Window)&&jssun.awt.SunToolkit.isModalExcluded(a)){c=!0;break}a=a.getParent()}if(!c&&a!==this.modalComponent)return java.awt.EventFilter.FilterAction.REJECT}}return java.awt.EventFilter.FilterAction.ACCEPT},"java.awt.AWTEvent");c$=v();x(c$,"ANY_EVENT",-1)});p("java.awt");n(["java.lang.Enum"],"java.awt.EventFilter", +null,function(){y(java.awt,"EventFilter");w(self.c$);c$=t(java.awt.EventFilter,"FilterAction",Enum);F(c$,"ACCEPT",0,[]);F(c$,"REJECT",1,[]);F(c$,"ACCEPT_IMMEDIATELY",2,[]);c$=v()});p("java.awt");n(["java.awt.EventFilter"],"java.awt.ModalEventFilter",["java.awt.Component","$.Dialog","$.Window","jssun.awt.ModalExclude"],function(){c$=q(function(){this.modalDialog=null;this.disabled=!1;k(this,arguments)},java.awt,"ModalEventFilter",null,java.awt.EventFilter);g(c$,function(a){this.modalDialog=a;this.disabled= +!1},"java.awt.Dialog");c(c$,"getModalDialog",function(){return this.modalDialog});d(c$,"acceptEvent",function(a){if(this.disabled||!this.modalDialog.isVisible())return java.awt.EventFilter.FilterAction.ACCEPT;var b=a.getID();if(500<=b&&507>=b||1001<=b&&1001>=b||201==b)if(a=a.getSource(),!j(a,jssun.awt.ModalExclude)&&j(a,java.awt.Component)){for(;null!=a&&!j(a,java.awt.Window);)a=a.getParent_NoClientCode();if(null!=a)return this.acceptWindow(a)}return java.awt.EventFilter.FilterAction.ACCEPT},"java.awt.AWTEvent"); +c(c$,"disable",function(){this.disabled=!0});c(c$,"compareTo",function(a){a=a.getModalDialog();for(var b=this.modalDialog;null!=b;){if(b===a)return 1;b=b.getParent_NoClientCode()}for(b=a;null!=b;){if(b===this.modalDialog)return-1;b=b.getParent_NoClientCode()}for(b=this.modalDialog.getModalBlocker();null!=b;){if(b===a)return-1;b=b.getModalBlocker()}for(b=a.getModalBlocker();null!=b;){if(b===this.modalDialog)return 1;b=b.getModalBlocker()}return this.modalDialog.getModalityType().compareTo(a.getModalityType())}, +"java.awt.ModalEventFilter");c$.createFilterForDialog=c(c$,"createFilterForDialog",function(a){switch(a.getModalityType()){case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:return new java.awt.ModalEventFilter.DocumentModalEventFilter(a);case java.awt.Dialog.ModalityType.APPLICATION_MODAL:return new java.awt.ModalEventFilter.ApplicationModalEventFilter(a);case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:return new java.awt.ModalEventFilter.ToolkitModalEventFilter(a)}return null},"java.awt.Dialog"); +w(self.c$);c$=q(function(){this.appContext=null;k(this,arguments)},java.awt.ModalEventFilter,"ToolkitModalEventFilter",java.awt.ModalEventFilter);g(c$,function(a){r(this,java.awt.ModalEventFilter.ToolkitModalEventFilter,[a]);this.appContext=a.appContext},"java.awt.Dialog");d(c$,"acceptWindow",function(a){if(a.isModalExcluded(java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE))return java.awt.EventFilter.FilterAction.ACCEPT;if(a.appContext!==this.appContext)return java.awt.EventFilter.FilterAction.REJECT; +for(;null!=a;){if(a===this.modalDialog)return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;a=a.getOwner()}return java.awt.EventFilter.FilterAction.REJECT},"java.awt.Window");c$=v();w(self.c$);c$=q(function(){this.appContext=null;k(this,arguments)},java.awt.ModalEventFilter,"ApplicationModalEventFilter",java.awt.ModalEventFilter);g(c$,function(a){r(this,java.awt.ModalEventFilter.ApplicationModalEventFilter,[a]);this.appContext=a.appContext},"java.awt.Dialog");d(c$,"acceptWindow",function(a){if(a.isModalExcluded(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE))return java.awt.EventFilter.FilterAction.ACCEPT; +if(a.appContext===this.appContext){for(;null!=a;){if(a===this.modalDialog)return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;a=a.getOwner()}return java.awt.EventFilter.FilterAction.REJECT}return java.awt.EventFilter.FilterAction.ACCEPT},"java.awt.Window");c$=v();w(self.c$);c$=q(function(){this.documentRoot=null;k(this,arguments)},java.awt.ModalEventFilter,"DocumentModalEventFilter",java.awt.ModalEventFilter);g(c$,function(a){r(this,java.awt.ModalEventFilter.DocumentModalEventFilter,[a]); +this.documentRoot=a.getDocumentRoot()},"java.awt.Dialog");d(c$,"acceptWindow",function(a){if(a.isModalExcluded(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)){for(var b=this.modalDialog.getOwner();null!=b;){if(b===a)return java.awt.EventFilter.FilterAction.REJECT;b=b.getOwner()}return java.awt.EventFilter.FilterAction.ACCEPT}for(;null!=a;){if(a===this.modalDialog)return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;if(a===this.documentRoot)return java.awt.EventFilter.FilterAction.REJECT; +a=a.getOwner()}return java.awt.EventFilter.FilterAction.ACCEPT},"java.awt.Window");c$=v()});p("java.awt.peer");n(["java.awt.peer.ComponentPeer"],"java.awt.peer.CanvasPeer",null,function(){y(java.awt.peer,"CanvasPeer",java.awt.peer.ComponentPeer)});p("java.awt.peer");c$=y(java.awt.peer,"ComponentPeer");x(c$,"SET_LOCATION",1,"SET_SIZE",2,"SET_BOUNDS",3,"SET_CLIENT_SIZE",4,"RESET_OPERATION",5,"NO_EMBEDDED_CHECK",16384,"DEFAULT_OPERATION",3);p("java.awt.peer");n(["java.awt.peer.ComponentPeer"],"java.awt.peer.ContainerPeer", +null,function(){y(java.awt.peer,"ContainerPeer",java.awt.peer.ComponentPeer)});p("java.awt.peer");n(["java.awt.peer.WindowPeer"],"java.awt.peer.FramePeer",null,function(){y(java.awt.peer,"FramePeer",java.awt.peer.WindowPeer)});p("java.awt.peer");n(["java.awt.peer.ComponentPeer"],"java.awt.peer.LightweightPeer",null,function(){y(java.awt.peer,"LightweightPeer",java.awt.peer.ComponentPeer)});p("java.awt.peer");n(["java.awt.peer.ContainerPeer"],"java.awt.peer.PanelPeer",null,function(){y(java.awt.peer, +"PanelPeer",java.awt.peer.ContainerPeer)});p("java.awt.peer");n(["java.awt.peer.ContainerPeer"],"java.awt.peer.WindowPeer",null,function(){y(java.awt.peer,"WindowPeer",java.awt.peer.ContainerPeer)});p("java.awt");n(["java.awt.AWTEvent","$.ActiveEvent"],"java.awt.SentEvent",["java.awt.Toolkit","jssun.awt.SunToolkit"],function(){c$=q(function(){this.$dispatched=!1;this.toNotify=this.nested=null;k(this,arguments)},java.awt,"SentEvent",java.awt.AWTEvent,java.awt.ActiveEvent);g(c$,function(){this.construct(null)}); +g(c$,function(a){this.construct(a,null)},"java.awt.AWTEvent");g(c$,function(a,b){r(this,java.awt.SentEvent,[null!=a?a.getSource():java.awt.Toolkit.getDefaultToolkit(),1007]);this.nested=a;this.toNotify=b},"java.awt.AWTEvent,jssun.awt.AppContext");d(c$,"dispatch",function(){try{null!=this.nested&&java.awt.Toolkit.getEventQueue().dispatchEvent(this.nested)}finally{this.$dispatched=!0,null!=this.toNotify&&jssun.awt.SunToolkit.postEvent(this.toNotify,new java.awt.SentEvent),this.notifyAll()}});c(c$,"dispose", +function(){this.$dispatched=!0;null!=this.toNotify&&jssun.awt.SunToolkit.postEvent(this.toNotify,new java.awt.SentEvent);this.notifyAll()});x(c$,"ID",1007)});p("java.awt");n(["java.awt.AWTEvent","$.ActiveEvent","java.util.LinkedList"],"java.awt.SequencedEvent","java.lang.Thread java.awt.Component $.Conditional $.EventQueue $.SentEvent $.Toolkit jssun.awt.AppContext $.SunToolkit swingjs.JSToolkit".split(" "),function(){c$=q(function(){this.appContext=this.nested=null;this.disposed=!1;k(this,arguments)}, +java.awt,"SequencedEvent",java.awt.AWTEvent,java.awt.ActiveEvent);g(c$,function(a){r(this,java.awt.SequencedEvent,[a.getSource(),1006]);this.nested=a;java.awt.SequencedEvent.list.add(this)},"java.awt.AWTEvent");d(c$,"dispatch",function(){try{this.appContext=jssun.awt.AppContext.getAppContext();if(java.awt.SequencedEvent.getFirst()!==this)if(java.awt.EventQueue.isDispatchThread())Thread.currentThread().pumpEvents(1007,(C("java.awt.SequencedEvent$1")?0:java.awt.SequencedEvent.$SequencedEvent$1$(),D(java.awt.SequencedEvent$1, +this,null)));else for(;!this.isFirstOrDisposed();)try{swingjs.JSToolkit.warn("Cannot wait in SequenceEvent"),java.awt.SequencedEvent.wait(1E3)}catch(a){if(z(a,InterruptedException))break;else throw a;}this.disposed||java.awt.Toolkit.getEventQueue().dispatchEvent(this.nested)}finally{this.dispose()}});c$.isOwnerAppContextDisposed=c(c$,"isOwnerAppContextDisposed",function(a){return null!=a&&(a=a.nested.getSource(),j(a,java.awt.Component))?a.appContext.isDisposed():!1},"java.awt.SequencedEvent");c(c$, +"isFirstOrDisposed",function(){return this.disposed?!0:this===java.awt.SequencedEvent.getFirstWithContext()||this.disposed});c$.getFirst=c(c$,"getFirst",function(){return java.awt.SequencedEvent.list.getFirst()});c$.getFirstWithContext=c(c$,"getFirstWithContext",function(){for(var a=java.awt.SequencedEvent.getFirst();java.awt.SequencedEvent.isOwnerAppContextDisposed(a);)a.dispose(),a=java.awt.SequencedEvent.getFirst();return a});c(c$,"dispose",function(){if(!this.disposed){this.disposed=!0;null!= +this.appContext&&jssun.awt.SunToolkit.postEvent(this.appContext,new java.awt.SentEvent);var a=null;java.awt.SequencedEvent.notifyAll();java.awt.SequencedEvent.list.getFirst()===this?(java.awt.SequencedEvent.list.removeFirst(),java.awt.SequencedEvent.list.isEmpty()||(a=java.awt.SequencedEvent.list.getFirst())):java.awt.SequencedEvent.list.remove(this);null!=a&&null!=a.appContext&&jssun.awt.SunToolkit.postEvent(a.appContext,new java.awt.SentEvent)}});c$.$SequencedEvent$1$=function(){w(self.c$);c$=G(java.awt, +"SequencedEvent$1",null,java.awt.Conditional);d(c$,"evaluate",function(){return!this.b$["java.awt.SequencedEvent"].isFirstOrDisposed()});c$=v()};x(c$,"ID",1006);c$.list=c$.prototype.list=new java.util.LinkedList});n(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){c$=t(java.util,"AbstractSequentialList",java.util.AbstractList);c(c$,"add",function(a,b){this.listIterator(a).add(b)},"~N,~O");c(c$,"addAll",function(a,b){for(var c=this.listIterator(a), +d=b.iterator(),f=c.nextIndex();d.hasNext();)c.add(d.next()),c.previous();return f!=c.nextIndex()},"~N,java.util.Collection");d(c$,"get",function(a){try{return this.listIterator(a).next()}catch(b){if(j(b,java.util.NoSuchElementException))throw new IndexOutOfBoundsException;throw b;}},"~N");d(c$,"iterator",function(){return this.listIterator(0)});c(c$,"remove",function(a){try{var b=this.listIterator(a),c=b.next();b.remove();return c}catch(d){if(j(d,java.util.NoSuchElementException))throw new IndexOutOfBoundsException; +throw d;}},"~N");d(c$,"set",function(a,b){var c=this.listIterator(a),d=c.next();c.set(b);return d},"~N,~O")});n(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){c$=q(function(){this.$size=0;this.voidLink=null;k(this,arguments)},java.util,"LinkedList",java.util.AbstractSequentialList, +[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]);g(c$,function(){r(this,java.util.LinkedList,[]);this.voidLink=new java.util.LinkedList.Link(null,null,null);this.voidLink.previous=this.voidLink;this.voidLink.next=this.voidLink});g(c$,function(a){this.construct();this.addAll(a)},"java.util.Collection");c(c$,"add",function(a,b){if(0<=a&&a<=this.$size){var c=this.voidLink;if(aa;d--)c=c.previous;var d=c.previous, +f=new java.util.LinkedList.Link(b,d,c);d.next=f;c.previous=f;this.$size++;this.modCount++}else throw new IndexOutOfBoundsException;},"~N,~O");c(c$,"add",function(a){var b=this.voidLink.previous;a=new java.util.LinkedList.Link(a,b,this.voidLink);this.voidLink.previous=a;b.next=a;this.$size++;this.modCount++;return!0},"~O");c(c$,"addAll",function(a,b){if(0>a||a>this.$size)throw new IndexOutOfBoundsException;var c=b.size();if(0==c)return!1;var d=this.voidLink;if(a=a;f--)d=d.previous;for(var f=d.next,g,j=b.iterator();j.hasNext()&&((g=j.next())||1);)var k=new java.util.LinkedList.Link(g,d,null),d=d.next=k;d.next=f;f.previous=d;this.$size+=c;this.modCount++;return!0},"~N,java.util.Collection");c(c$,"addAll",function(a){var b=a.size();if(0==b)return!1;var c=this.voidLink.previous,d;for(a=a.iterator();a.hasNext()&&((d=a.next())||1);)var f=new java.util.LinkedList.Link(d,c,null),c=c.next=f;c.next=this.voidLink;this.voidLink.previous= +c;this.$size+=b;this.modCount++;return!0},"java.util.Collection");c(c$,"addFirst",function(a){var b=this.voidLink.next;a=new java.util.LinkedList.Link(a,this.voidLink,b);this.voidLink.next=a;b.previous=a;this.$size++;this.modCount++},"~O");c(c$,"addLast",function(a){var b=this.voidLink.previous;a=new java.util.LinkedList.Link(a,b,this.voidLink);this.voidLink.previous=a;b.next=a;this.$size++;this.modCount++},"~O");d(c$,"clear",function(){0a;c--)b=b.previous;return b.data}throw new IndexOutOfBoundsException; +},"~N");c(c$,"getFirst",function(){var a=this.voidLink.next;if(a!==this.voidLink)return a.data;throw new java.util.NoSuchElementException;});c(c$,"getLast",function(){var a=this.voidLink.previous;if(a!==this.voidLink)return a.data;throw new java.util.NoSuchElementException;});d(c$,"indexOf",function(a){var b=0,c=this.voidLink.next;if(null!=a)for(;c!==this.voidLink;){if(a.equals(c.data))return b;c=c.next;b++}else for(;c!==this.voidLink;){if(null==c.data)return b;c=c.next;b++}return-1},"~O");d(c$,"lastIndexOf", +function(a){var b=this.$size,c=this.voidLink.previous;if(null!=a)for(;c!==this.voidLink;){b--;if(a.equals(c.data))return b;c=c.previous}else for(;c!==this.voidLink;){b--;if(null==c.data)return b;c=c.previous}return-1},"~O");c(c$,"listIterator",function(a){return new java.util.LinkedList.LinkIterator(this,a)},"~N");c(c$,"remove",function(a){if(0<=a&&aa;c--)b=b.previous;a=b.previous; +c=b.next;a.next=c;c.previous=a;this.$size--;this.modCount++;return b.data}throw new IndexOutOfBoundsException;},"~N");c(c$,"remove",function(a){var b=this.voidLink.next;if(null!=a)for(;b!==this.voidLink&&!a.equals(b.data);)b=b.next;else for(;b!==this.voidLink&&null!=b.data;)b=b.next;if(b===this.voidLink)return!1;a=b.next;b=b.previous;b.next=a;a.previous=b;this.$size--;this.modCount++;return!0},"~O");c(c$,"removeFirst",function(){var a=this.voidLink.next;if(a!==this.voidLink){var b=a.next;this.voidLink.next= +b;b.previous=this.voidLink;this.$size--;this.modCount++;return a.data}throw new java.util.NoSuchElementException;});c(c$,"removeLast",function(){var a=this.voidLink.previous;if(a!==this.voidLink){var b=a.previous;this.voidLink.previous=b;b.next=this.voidLink;this.$size--;this.modCount++;return a.data}throw new java.util.NoSuchElementException;});d(c$,"set",function(a,b){if(0<=a&&aa;d--)c= +c.previous;d=c.data;c.data=b;return d}throw new IndexOutOfBoundsException;},"~N,~O");d(c$,"size",function(){return this.$size});d(c$,"offer",function(a){this.add(a);return!0},"~O");d(c$,"poll",function(){return 0==this.$size?null:this.removeFirst()});c(c$,"remove",function(){return this.removeFirst()});d(c$,"peek",function(){var a=this.voidLink.next;return a===this.voidLink?null:a.data});d(c$,"element",function(){return this.getFirst()});c(c$,"toArray",function(){for(var a=0,b=Array(this.$size),c= +this.voidLink.next;c!==this.voidLink;)b[a++]=c.data,c=c.next;return b});c(c$,"toArray",function(a){var b=0;this.$size>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,this.$size));for(var c=this.voidLink.next;c!==this.voidLink;)a[b++]=c.data,c=c.next;b= +b;this.pos--)this.link=this.link.previous;else throw new IndexOutOfBoundsException;},"java.util.LinkedList,~N");d(c$,"add",function(a){if(this.expectedModCount==this.list.modCount){var b=this.link.next;a=new java.util.LinkedList.Link(a,this.link,b);this.link.next=a;this.link=b.previous=a;this.lastLink=null;this.pos++;this.expectedModCount++;this.list.$size++;this.list.modCount++}else throw new java.util.ConcurrentModificationException;},"~O");d(c$,"hasNext",function(){return this.link.next!==this.list.voidLink}); +d(c$,"hasPrevious",function(){return this.link!==this.list.voidLink});d(c$,"next",function(){if(this.expectedModCount==this.list.modCount){var a=this.link.next;if(a!==this.list.voidLink)return this.lastLink=this.link=a,this.pos++,this.link.data;throw new java.util.NoSuchElementException;}throw new java.util.ConcurrentModificationException;});d(c$,"nextIndex",function(){return this.pos+1});d(c$,"previous",function(){if(this.expectedModCount==this.list.modCount){if(this.link!==this.list.voidLink)return this.lastLink= +this.link,this.link=this.link.previous,this.pos--,this.lastLink.data;throw new java.util.NoSuchElementException;}throw new java.util.ConcurrentModificationException;});d(c$,"previousIndex",function(){return this.pos});d(c$,"remove",function(){if(this.expectedModCount==this.list.modCount)if(null!=this.lastLink){var a=this.lastLink.next,b=this.lastLink.previous;a.previous=b;b.next=a;this.lastLink===this.link&&this.pos--;this.link=b;this.lastLink=null;this.expectedModCount++;this.list.$size--;this.list.modCount++}else throw new IllegalStateException; +else throw new java.util.ConcurrentModificationException;});d(c$,"set",function(a){if(this.expectedModCount==this.list.modCount)if(null!=this.lastLink)this.lastLink.data=a;else throw new IllegalStateException;else throw new java.util.ConcurrentModificationException;},"~O");c$=v()});p("JU");n(["JU.T3"],"JU.V3",null,function(){c$=t(JU,"V3",JU.T3);g(c$,function(){});c$.newV=c(c$,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");c$.newVsub=c(c$,"newVsub",function(a,b){return JU.V3.new3(a.x- +b.x,a.y-b.y,a.z-b.z)},"JU.T3,JU.T3");c$.new3=c(c$,"new3",function(a,b,c){var d=new JU.V3;d.x=a;d.y=b;d.z=c;return d},"~N,~N,~N");c(c$,"angle",function(a){var b=this.y*a.z-this.z*a.y,c=this.z*a.x-this.x*a.z,d=this.x*a.y-this.y*a.x,b=Math.sqrt(b*b+c*c+d*d);return Math.abs(Math.atan2(b,this.dot(a)))},"JU.V3")});p("javax.swing");n(["java.util.Vector"],"javax.swing.ButtonGroup",null,function(){c$=q(function(){this.selection=this.buttons=null;k(this,arguments)},javax.swing,"ButtonGroup");I(c$,function(){this.buttons= +new java.util.Vector});g(c$,function(){});c(c$,"add",function(a){null!=a&&(this.buttons.addElement(a),a.isSelected()&&(null==this.selection?this.selection=a.getModel():a.setSelected(!1)),a.getModel().setGroup(this))},"javax.swing.AbstractButton");c(c$,"remove",function(a){null!=a&&(this.buttons.removeElement(a),a.getModel()===this.selection&&(this.selection=null),a.getModel().setGroup(null))},"javax.swing.AbstractButton");c(c$,"clearSelection",function(){if(null!=this.selection){var a=this.selection; +this.selection=null;a.setSelected(!1)}});c(c$,"getElements",function(){return this.buttons.elements()});c(c$,"getSelection",function(){return this.selection});c(c$,"setSelected",function(a,b){if(b&&null!=a&&a!==this.selection){var c=this.selection;this.selection=a;null!=c&&c.setSelected(!1);a.setSelected(!0)}},"javax.swing.ButtonModel,~B");c(c$,"isSelected",function(a){return a===this.selection},"javax.swing.ButtonModel");c(c$,"getButtonCount",function(){return null==this.buttons?0:this.buttons.size()})}); +p("javax.swing");n(["jssun.awt.PaintEventDispatcher"],"javax.swing.SwingPaintEventDispatcher",["javax.swing.RootPaneContainer","jssun.awt.SunToolkit"],function(){c$=t(javax.swing,"SwingPaintEventDispatcher",jssun.awt.PaintEventDispatcher);d(c$,"shouldDoNativeBackgroundErase",function(a){return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND||!j(a,javax.swing.RootPaneContainer)},"java.awt.Component");c(c$,"queueSurfaceDataReplacing",function(a,b){return j(a,javax.swing.RootPaneContainer)?(jssun.awt.SunToolkit.targetToAppContext(a), +!0):u(this,javax.swing.SwingPaintEventDispatcher,"queueSurfaceDataReplacing",[a,b])},"java.awt.Component,Runnable");x(c$,"SHOW_FROM_DOUBLE_BUFFER",!1,"ERASE_BACKGROUND",!1);javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER=!1;javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND=!0});p("jssun.awt");n(["java.util.HashSet","$.IdentityHashMap"],"jssun.awt.AWTAutoShutdown",["java.awt.AWTEvent"],function(){c$=q(function(){this.busyThreadSet=null;this.toolkitThreadBusy=!1;this.peerMap=null; +k(this,arguments)},jssun.awt,"AWTAutoShutdown",null,Runnable);I(c$,function(){this.busyThreadSet=new java.util.HashSet(7);this.peerMap=new java.util.IdentityHashMap});g(c$,function(){});c$.getInstance=c(c$,"getInstance",function(){return null==jssun.awt.AWTAutoShutdown.theInstance?jssun.awt.AWTAutoShutdown.theInstance=new jssun.awt.AWTAutoShutdown:jssun.awt.AWTAutoShutdown.theInstance});c$.notifyToolkitThreadBusy=c(c$,"notifyToolkitThreadBusy",function(){jssun.awt.AWTAutoShutdown.getInstance().setToolkitBusy(!0)}); +c$.notifyToolkitThreadFree=c(c$,"notifyToolkitThreadFree",function(){jssun.awt.AWTAutoShutdown.getInstance().setToolkitBusy(!1)});c(c$,"notifyThreadBusy",function(a){this.busyThreadSet.add(a)},"Thread");c(c$,"notifyThreadFree",function(a){this.busyThreadSet.remove(a)},"Thread");c(c$,"notifyPeerMapUpdated",function(){this.isReadyToShutdown()||this.activateBlockerThread()});c(c$,"isReadyToShutdown",function(){return!this.toolkitThreadBusy&&this.peerMap.isEmpty()&&this.busyThreadSet.isEmpty()});c(c$, +"setToolkitBusy",function(a){a!=this.toolkitThreadBusy&&a!=this.toolkitThreadBusy&&(this.toolkitThreadBusy=a)},"~B");d(c$,"run",function(){});c$.getShutdownEvent=c(c$,"getShutdownEvent",function(){return C("jssun.awt.AWTAutoShutdown$1")?0:jssun.awt.AWTAutoShutdown.$AWTAutoShutdown$1$(),D(jssun.awt.AWTAutoShutdown$1,this,null,jssun.awt.AWTAutoShutdown.getInstance(),0)});c(c$,"activateBlockerThread",function(){});c(c$,"registerPeer",function(a,b){this.peerMap.put(a,b);this.notifyPeerMapUpdated()},"~O,~O"); +c(c$,"unregisterPeer",function(a,b){this.peerMap.get(a)===b&&this.peerMap.remove(a)},"~O,~O");c(c$,"getPeer",function(a){return this.peerMap.get(a)},"~O");c(c$,"dumpPeers",function(a){a.fine("Mapped peers:");for(var b,c=this.peerMap.keySet().iterator();c.hasNext()&&((b=c.next())||1);)a.fine(b+"->"+this.peerMap.get(b))},"java.util.logging.Logger");c$.$AWTAutoShutdown$1$=function(){w(self.c$);c$=G(jssun.awt,"AWTAutoShutdown$1",java.awt.AWTEvent);c$=v()};x(c$,"theInstance",null)});p("jssun.awt");c$= +q(function(){this.next=this.event=null;k(this,arguments)},jssun.awt,"EventQueueItem");g(c$,function(a){this.event=a},"java.awt.AWTEvent");p("jssun.awt");y(jssun.awt,"ModalExclude");p("jssun.awt");n(["java.awt.peer.CanvasPeer","$.LightweightPeer","$.PanelPeer"],"jssun.awt.NullComponentPeer","java.lang.IllegalStateException $.UnsupportedOperationException java.awt.Dimension $.Insets $.Point $.Rectangle".split(" "),function(){c$=t(jssun.awt,"NullComponentPeer",null,[java.awt.peer.LightweightPeer,java.awt.peer.CanvasPeer, +java.awt.peer.PanelPeer]);d(c$,"isObscured",function(){return!1});d(c$,"canDetermineObscurity",function(){return!1});d(c$,"isFocusable",function(){return!1});d(c$,"setVisible",function(){},"~B");c(c$,"show",function(){});c(c$,"hide",function(){});d(c$,"setEnabled",function(){},"~B");c(c$,"enable",function(){});c(c$,"disable",function(){});d(c$,"paint",function(){},"java.awt.Graphics");d(c$,"repaint",function(){},"~N,~N,~N,~N,~N");d(c$,"print",function(){},"java.awt.Graphics");d(c$,"setBounds",function(){}, +"~N,~N,~N,~N,~N");c(c$,"reshape",function(){},"~N,~N,~N,~N");d(c$,"coalescePaintEvent",function(){},"java.awt.event.PaintEvent");c(c$,"handleEvent",function(){return!1},"java.awt.Event");c(c$,"handleEvent",function(){},"java.awt.AWTEvent");d(c$,"getPreferredSize",function(){return new java.awt.Dimension(1,1)});d(c$,"getMinimumSize",function(){return new java.awt.Dimension(1,1)});d(c$,"getToolkit",function(){return null});d(c$,"getColorModel",function(){return null});d(c$,"getGraphics",function(){return null}); +d(c$,"getGraphicsConfiguration",function(){return null});d(c$,"getFontMetrics",function(){return null},"java.awt.Font");d(c$,"dispose",function(){});d(c$,"setForeground",function(){},"java.awt.Color");d(c$,"setBackground",function(){},"java.awt.Color");d(c$,"setFont",function(){},"java.awt.Font");d(c$,"updateCursorImmediately",function(){});c(c$,"setCursor",function(){},"java.awt.Cursor");d(c$,"requestFocus",function(){return!1},"java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");c(c$, +"createImage",function(){return null},"java.awt.image.ImageProducer");c(c$,"createImage",function(){return null},"~N,~N");d(c$,"prepareImage",function(){return!1},"java.awt.Image,~N,~N,java.awt.image.ImageObserver");d(c$,"checkImage",function(){return 0},"java.awt.Image,~N,~N,java.awt.image.ImageObserver");c(c$,"preferredSize",function(){return this.getPreferredSize()});c(c$,"minimumSize",function(){return this.getMinimumSize()});d(c$,"getLocationOnScreen",function(){return new java.awt.Point(0,0)}); +d(c$,"getInsets",function(){return this.insets()});d(c$,"beginValidate",function(){});d(c$,"endValidate",function(){});c(c$,"insets",function(){return new java.awt.Insets(0,0,0,0)});c(c$,"isPaintPending",function(){return!1});d(c$,"handlesWheelScrolling",function(){return!1});d(c$,"createVolatileImage",function(){return null},"~N,~N");d(c$,"beginLayout",function(){});d(c$,"endLayout",function(){});d(c$,"getBackBuffer",function(){throw new IllegalStateException("Page-flipping is not allowed on a lightweight component"); +});d(c$,"destroyBuffers",function(){});d(c$,"isReparentSupported",function(){return!1});d(c$,"reparent",function(){throw new UnsupportedOperationException;},"java.awt.peer.ContainerPeer");c(c$,"restack",function(){throw new UnsupportedOperationException;});c(c$,"isRestackSupported",function(){return!1});d(c$,"layout",function(){});d(c$,"getBounds",function(){return new java.awt.Rectangle(0,0,0,0)})});p("jssun.awt");n(null,"jssun.awt.PaintEventDispatcher",["java.awt.Rectangle","java.awt.event.PaintEvent"], +function(){c$=t(jssun.awt,"PaintEventDispatcher");c$.setPaintEventDispatcher=c(c$,"setPaintEventDispatcher",function(a){jssun.awt.PaintEventDispatcher.dispatcher=a},"jssun.awt.PaintEventDispatcher");c$.getPaintEventDispatcher=c(c$,"getPaintEventDispatcher",function(){null==jssun.awt.PaintEventDispatcher.dispatcher&&(jssun.awt.PaintEventDispatcher.dispatcher=new jssun.awt.PaintEventDispatcher);return jssun.awt.PaintEventDispatcher.dispatcher});c(c$,"createPaintEvent",function(a,b,c,d,f){return new java.awt.event.PaintEvent(a, +800,new java.awt.Rectangle(b,c,d,f))},"java.awt.Component,~N,~N,~N,~N");c(c$,"shouldDoNativeBackgroundErase",function(){return!0},"java.awt.Component");c(c$,"queueSurfaceDataReplacing",function(){return!1},"java.awt.Component,Runnable");x(c$,"dispatcher",null)});p("jssun.awt");n(null,"jssun.awt.PostEventQueue",["jssun.awt.EventQueueItem","$.SunToolkit","swingjs.JSToolkit"],function(){c$=q(function(){this.eventQueue=this.queueTail=this.queueHead=null;k(this,arguments)},jssun.awt,"PostEventQueue"); +g(c$,function(a){this.eventQueue=a},"java.awt.EventQueue");c(c$,"noEvents",function(){return null==this.queueHead});c(c$,"flush",function(){if(null!=this.queueHead){var a;a=this.queueHead;for(this.queueHead=this.queueTail=null;null!=a;)swingjs.JSToolkit.alert("postevent IS NOT IMPLEMENTED "+a.event),this.eventQueue.postEvent(a.event),a=a.next}});c(c$,"postEvent",function(a){a=new jssun.awt.EventQueueItem(a);null==this.queueHead?this.queueHead=this.queueTail=a:this.queueTail=this.queueTail.next=a; +jssun.awt.SunToolkit.wakeupEventQueue(this.eventQueue,!1)},"java.awt.AWTEvent")});p("jssun.java2d");n(["java.awt.Graphics2D"],"jssun.java2d.SunGraphics2D",["java.awt.geom.AffineTransform"],function(){c$=q(function(){this.transformState=0;this.$transform=this.backgroundColor=this.foregroundColor=null;this.transY=this.transX=0;this.hints=null;k(this,arguments)},jssun.java2d,"SunGraphics2D",java.awt.Graphics2D);c(c$,"clone",function(){return this.clone0()});c(c$,"clone0",function(){try{var a;a=aa(this); +a.$transform=new java.awt.geom.AffineTransform(this.$transform);null!=this.hints&&(a.hints=this.hints.clone());return a}catch(b){if(!z(b,CloneNotSupportedException))throw b;}return null});c(c$,"create",function(){return this.clone0()});x(c$,"TRANSFORM_GENERIC",4,"TRANSFORM_TRANSLATESCALE",3,"TRANSFORM_ANY_TRANSLATE",2,"TRANSFORM_INT_TRANSLATE",1,"TRANSFORM_ISIDENT",0)});p("javax.swing");n(null,"javax.swing.UIManager","java.util.ArrayList java.util.Locale javax.swing.RepaintManager $.SwingPaintEventDispatcher $.SwingUtilities jssun.awt.PaintEventDispatcher swingjs.JSToolkit".split(" "), +function(){c$=t(javax.swing,"UIManager");c$.getLookAndFeelDefaults=c(c$,"getLookAndFeelDefaults",function(){return javax.swing.UIManager.uid});c$.getInstalledLookAndFeels=c(c$,"getInstalledLookAndFeels",function(){return javax.swing.UIManager.installedLAFs});c$.setInstalledLookAndFeels=c(c$,"setInstalledLookAndFeels",function(){swingjs.JSToolkit.notImplemented(null)},"~A");c$.installLookAndFeel=c(c$,"installLookAndFeel",function(){swingjs.JSToolkit.notImplemented(null)},"javax.swing.UIManager.LookAndFeelInfo"); +c$.installLookAndFeel=c(c$,"installLookAndFeel",function(){swingjs.JSToolkit.notImplemented(null)},"~S,~S");c$.getLookAndFeel=c(c$,"getLookAndFeel",function(){return null==javax.swing.UIManager.laf?javax.swing.UIManager.laf=swingjs.JSToolkit.getInstance("swingjs.plaf.HTML5LookAndFeel"):javax.swing.UIManager.laf});c$.setLookAndFeel=c(c$,"setLookAndFeel",function(){},"javax.swing.LookAndFeel");c$.setLookAndFeel=c(c$,"setLookAndFeel",function(a){a=javax.swing.SwingUtilities.loadSystemClass(a);javax.swing.UIManager.setLookAndFeel(a.newInstance())}, +"~S");c$.getSystemLookAndFeelClassName=c(c$,"getSystemLookAndFeelClassName",function(){return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName()});c$.getCrossPlatformLookAndFeelClassName=c(c$,"getCrossPlatformLookAndFeelClassName",function(){return"swingjs.plaf.HTML5LookAndFeel"});c$.getDefaults=c(c$,"getDefaults",function(){javax.swing.UIManager.maybeInitialize();return javax.swing.UIManager.uid});c$.getFont=c(c$,"getFont",function(a){return javax.swing.UIManager.getDefaults().getFont(a)}, +"~O");c$.getFont=c(c$,"getFont",function(a,c){return javax.swing.UIManager.getDefaults().getFont(a,c)},"~O,java.util.Locale");c$.getColor=c(c$,"getColor",function(a){return javax.swing.UIManager.getDefaults().getColor(a)},"~O");c$.getColor=c(c$,"getColor",function(a,c){return javax.swing.UIManager.getDefaults().getColor(a,c)},"~O,java.util.Locale");c$.getIcon=c(c$,"getIcon",function(a){return javax.swing.UIManager.getDefaults().getIcon(a)},"~O");c$.getIcon=c(c$,"getIcon",function(a,c){return javax.swing.UIManager.getDefaults().getIcon(a, +c)},"~O,java.util.Locale");c$.getBorder=c(c$,"getBorder",function(a){return javax.swing.UIManager.getDefaults().getBorder(a)},"~O");c$.getBorder=c(c$,"getBorder",function(a,c){return javax.swing.UIManager.getDefaults().getBorder(a,c)},"~O,java.util.Locale");c$.getString=c(c$,"getString",function(a){return javax.swing.UIManager.getDefaults().getString(a)},"~O");c$.getString=c(c$,"getString",function(a,c){return javax.swing.UIManager.getDefaults().getString(a,c)},"~O,java.util.Locale");c$.getString= +c(c$,"getString",function(a,c){var d=null==c?java.util.Locale.getDefault():c.getLocale();return javax.swing.UIManager.getString(a,d)},"~O,java.awt.Component");c$.getInt=c(c$,"getInt",function(a){return javax.swing.UIManager.getDefaults().getInt(a)},"~O");c$.getInt=c(c$,"getInt",function(a,c){return javax.swing.UIManager.getDefaults().getInt(a,c)},"~O,java.util.Locale");c$.getBoolean=c(c$,"getBoolean",function(a){return javax.swing.UIManager.getDefaults().getBoolean(a)},"~O");c$.getBoolean=c(c$,"getBoolean", +function(a,c){return javax.swing.UIManager.getDefaults().getBoolean(a,c)},"~O,java.util.Locale");c$.getInsets=c(c$,"getInsets",function(a){return javax.swing.UIManager.getDefaults().getInsets(a)},"~O");c$.getInsets=c(c$,"getInsets",function(a,c){return javax.swing.UIManager.getDefaults().getInsets(a,c)},"~O,java.util.Locale");c$.getDimension=c(c$,"getDimension",function(a){return javax.swing.UIManager.getDefaults().getDimension(a)},"~O");c$.getDimension=c(c$,"getDimension",function(a,c){return javax.swing.UIManager.getDefaults().getDimension(a, +c)},"~O,java.util.Locale");c$.get=c(c$,"get",function(a){return javax.swing.UIManager.getDefaults().get(a)},"~O");c$.get=c(c$,"get",function(a,c){return javax.swing.UIManager.getDefaults().get(a,c)},"~O,java.util.Locale");c$.put=c(c$,"put",function(a,c){return javax.swing.UIManager.getDefaults().put(a,c)},"~O,~O");c$.getUI=c(c$,"getUI",function(a){javax.swing.UIManager.maybeInitialize();var c=null,c=javax.swing.UIManager.getDefaults().getUI(a);null==c&&System.out.println(a.getUIClassID()+" has not been implemented"); +return c},"javax.swing.JComponent");c$.addPropertyChangeListener=c(c$,"addPropertyChangeListener",function(){},"java.beans.PropertyChangeListener");c$.removePropertyChangeListener=c(c$,"removePropertyChangeListener",function(){},"java.beans.PropertyChangeListener");c$.getPropertyChangeListeners=c(c$,"getPropertyChangeListeners",function(){return[]});c$.maybeInitialize=c(c$,"maybeInitialize",function(){null==javax.swing.UIManager.uid&&(javax.swing.UIManager.uid=swingjs.JSToolkit.getLookAndFeelDefaults(), +javax.swing.UIManager.initialize())});c$.initialize=c(c$,"initialize",function(){javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT&&jssun.awt.PaintEventDispatcher.setPaintEventDispatcher(new javax.swing.SwingPaintEventDispatcher)});w(self.c$);c$=q(function(){this.className=this.name=null;k(this,arguments)},javax.swing.UIManager,"LookAndFeelInfo");g(c$,function(a,c){this.name=a;this.className=c},"~S,~S");c(c$,"getName",function(){return this.name});c(c$,"getClassName",function(){return this.className}); +d(c$,"toString",function(){return this.getClass().getName()+"["+this.getName()+" "+this.getClassName()+"]"});c$=v();x(c$,"installedLAFs",null);var a=new java.util.ArrayList(4);a.add(new javax.swing.UIManager.LookAndFeelInfo("HTML5","swingjs.plaf.HTML5LookAndFeel"));javax.swing.UIManager.installedLAFs=a.toArray(Array(a.size()));x(c$,"laf",null,"uid",null)});p("javax.swing");n(["java.util.Hashtable","java.util.Locale"],"javax.swing.UIDefaults","java.lang.Boolean $.Error java.util.HashMap $.Vector java.awt.Color $.Dimension $.Font $.Insets javax.swing.Icon $.SwingUtilities javax.swing.border.Border javax.swing.event.SwingPropertyChangeSupport swingjs.JSToolkit".split(" "), +function(){c$=q(function(){this.resourceCache=this.defaultLocale=this.resourceBundles=this.changeSupport=null;k(this,arguments)},javax.swing,"UIDefaults",java.util.Hashtable);I(c$,function(){this.defaultLocale=java.util.Locale.getDefault()});g(c$,function(){this.construct(700,0.75)});g(c$,function(a,b){r(this,javax.swing.UIDefaults,[a,b]);this.resourceCache=new java.util.HashMap},"~N,~N");g(c$,function(a){r(this,javax.swing.UIDefaults,[A(a.length/2)]);for(var b=0;bf.width?a.x=Math.max(0,f.width-k.width):0>a.x&&(a.x=0):a.x=k.width>f.width?f.width-k.width:Math.max(0,Math.min(f.width-k.width,a.x)),a.y+k.height>f.height?a.y=Math.max(0,f.height-k.height): +0>a.y&&(a.y=0));if(a.x!=g||a.y!=j)this.setViewPosition(a),this.scrollUnderway=!1}}},"java.awt.Rectangle");c(c$,"validateView",function(){for(var a=null,b=this;null!=b;b=b.getParent()){if(j(b,javax.swing.CellRendererPane)||!b.isLightweight())return;if(j(b,javax.swing.JComponent)&&b.isValidateRoot()){a=b;break}}if(null!=a){for(var c=null,b=a;null!=b;b=b.getParent()){if(!b.isLightweight())return;if(j(b,java.awt.Window)||j(b,java.applet.Applet)){c=b;break}}null!=c&&(a.validate(),b=javax.swing.RepaintManager.currentManager(this), +null!=b&&b.removeInvalidComponent(a))}});c(c$,"positionAdjustment",function(a,b,c){return 0<=c&&b+c<=a||0>=c&&b+c>=a?0:0=a||0>=c&&b<=a?-c:0>c&&b>=a?-c+a-b:0},"~N,~N,~N");d(c$,"setBorder",function(a){if(null!=a)throw new IllegalArgumentException("JViewport.setBorder() not supported");},"javax.swing.border.Border");c(c$,"getInsets",function(){return new java.awt.Insets(0,0,0,0)});c(c$,"getInsets",function(a){a.left=a.top=a.right=a.bottom=0;return a},"java.awt.Insets");c(c$,"getBackingStoreGraphics", +function(a){var b=this.backingStoreImage.getGraphics();b.setColor(a.getColor());b.setFont(a.getFont());b.setClip(a.getClipBounds());return b},"java.awt.Graphics");c(c$,"paintViaBackingStore",function(a){var b=this.getBackingStoreGraphics(a);try{u(this,javax.swing.JViewport,"paint",[b]),a.drawImage(this.backingStoreImage,0,0,this)}finally{b.dispose()}},"java.awt.Graphics");c(c$,"paintViaBackingStore",function(a,b){var c=this.getBackingStoreGraphics(a);try{u(this,javax.swing.JViewport,"paint",[c]), +a.setClip(b),a.drawImage(this.backingStoreImage,0,0,this)}finally{c.dispose()}},"java.awt.Graphics,java.awt.Rectangle");c(c$,"isOptimizedDrawingEnabled",function(){return!1});d(c$,"isPaintingOrigin",function(){return 2==this.scrollMode?!0:!1});c(c$,"getViewLocation",function(){var a=this.getView();return null!=a?a.getLocation():new java.awt.Point(0,0)});c(c$,"paint",function(a){var b=this.getWidth(),c=this.getHeight();if(!(0>=b||0>=c))if(this.inBlitPaint)u(this,javax.swing.JViewport,"paint",[a]); +else{if(this.repaintAll){this.repaintAll=!1;var d=a.getClipBounds()}else this.waitingForRepaint&&(d=a.getClipBounds(),d.width>=this.getWidth()&&d.height>=this.getHeight()&&(this.waitingForRepaint=!1));if(!this.backingStore||this.isBlitting()||null==this.getView())u(this,javax.swing.JViewport,"paint",[a]),this.lastPaintPosition=this.getViewLocation();else{d=this.getView().getBounds();this.isOpaque()||a.clipRect(0,0,d.width,d.height);if(null==this.backingStoreImage){this.backingStoreImage=this.createImage(b, +c);var f=a.getClipBounds();f.width!=b||f.height!=c?(this.isOpaque()?a.setClip(0,0,b,c):a.setClip(0,0,Math.min(d.width,b),Math.min(d.height,c)),this.paintViaBackingStore(a,f)):this.paintViaBackingStore(a)}else if(!this.scrollUnderway||this.lastPaintPosition.equals(this.getViewLocation()))this.paintViaBackingStore(a);else{var g=new java.awt.Point,f=new java.awt.Point,j=new java.awt.Dimension,k=new java.awt.Rectangle,n=this.getViewLocation();if(this.computeBlit(n.x-this.lastPaintPosition.x,n.y-this.lastPaintPosition.y, +g,f,j,k)){var n=f.x-g.x,p=f.y-g.y,f=a.getClipBounds();a.setClip(0,0,b,c);b=this.getBackingStoreGraphics(a);try{b.copyArea(g.x,g.y,j.width,j.height,n,p);a.setClip(f.x,f.y,f.width,f.height);var q=d.intersection(k);b.setClip(q);u(this,javax.swing.JViewport,"paint",[b]);a.drawImage(this.backingStoreImage,0,0,this)}finally{b.dispose()}}else this.paintViaBackingStore(a)}this.lastPaintPosition=this.getViewLocation();this.scrollUnderway=!1}}},"java.awt.Graphics");c(c$,"reshape",function(a,b,c,d){var f=this.getWidth()!= +c||this.getHeight()!=d;f&&(this.backingStoreImage=null);u(this,javax.swing.JViewport,"reshape",[a,b,c,d]);f&&this.fireStateChanged()},"~N,~N,~N,~N");c(c$,"setScrollMode",function(a){this.scrollMode=a;this.backingStore=2==a?!0:!1},"~N");c(c$,"getScrollMode",function(){return this.scrollMode});c(c$,"isBackingStoreEnabled",function(){return 2==this.scrollMode});c(c$,"setBackingStoreEnabled",function(a){a?this.setScrollMode(2):this.setScrollMode(1)},"~B");c(c$,"isBlitting",function(){var a=this.getView(); +return 1==this.scrollMode&&j(a,javax.swing.JComponent)&&a.isOpaque()});c(c$,"getView",function(){return 0b?(c.y=-b,d.y=0,g.y=n.height+b):(c.y=0,d.y=b,g.y=0),g.x=c.x=d.x=0,f.width=n.width,f.height=n.height-k,g.width=n.width,g.height=k,!0):0==b&&0!=a&&ja?(c.x=-a,d.x=0,g.x=n.width+a):(c.x=0,d.x=a,g.x=0),g.y=c.y=d.y=0,f.width=n.width-j,f.height=n.height,g.width=j,g.height=n.height,!0):!1},"~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle"); +c(c$,"getExtentSize",function(){return this.getSize()});c(c$,"toViewCoordinates",function(a){return new java.awt.Dimension(a)},"java.awt.Dimension");c(c$,"toViewCoordinates",function(a){return new java.awt.Point(a)},"java.awt.Point");c(c$,"setExtentSize",function(a){var b=this.getExtentSize();a.equals(b)||(this.setSize(a),this.fireStateChanged())},"java.awt.Dimension");c(c$,"createViewListener",function(){return D(javax.swing.JViewport.ViewListener,this,null)});c(c$,"createLayoutManager",function(){return javax.swing.ViewportLayout.SHARED_INSTANCE}); +c(c$,"addChangeListener",function(a){this.listenerList.add(javax.swing.event.ChangeListener,a)},"javax.swing.event.ChangeListener");c(c$,"removeChangeListener",function(a){this.listenerList.remove(javax.swing.event.ChangeListener,a)},"javax.swing.event.ChangeListener");c(c$,"getChangeListeners",function(){return this.listenerList.getListeners(javax.swing.event.ChangeListener)});c(c$,"fireStateChanged",function(){for(var a=this.listenerList.getListenerList(),b=a.length-2;0<=b;b-=2)a[b]===javax.swing.event.ChangeListener&& +(null==this.changeEvent&&(this.changeEvent=new javax.swing.event.ChangeEvent(this)),a[b+1].stateChanged(this.changeEvent))});c(c$,"repaint",function(a,b,c,d,f){var g=this.getParent();null!=g?g.repaint(a,b+this.getX(),c+this.getY(),d,f):u(this,javax.swing.JViewport,"repaint",[a,b,c,d,f])},"~N,~N,~N,~N,~N");c(c$,"paramString",function(){var a=this.isViewSizeSet?"true":"false",b=null!=this.lastPaintPosition?this.lastPaintPosition.toString():"",c=this.scrollUnderway?"true":"false";return u(this,javax.swing.JViewport, +"paramString",[])+",isViewSizeSet="+a+",lastPaintPosition="+b+",scrollUnderway="+c});c(c$,"firePropertyChangeObject",function(a,b,c){u(this,javax.swing.JViewport,"firePropertyChangeObject",[a,b,c]);a.equals(javax.swing.JViewport.EnableWindowBlit)&&(null!=c?this.setScrollMode(1):this.setScrollMode(0))},"~S,~O,~O");c(c$,"needsRepaintAfterBlit",function(){for(var a=this.getParent();null!=a&&a.isLightweight();)a=a.getParent();return!0});c(c$,"flushViewDirtyRegion",function(a,b){var c=this.getView();null!= +b&&(0=this.getWidth()){var d=c.getX(),f=c.getY();a.translate(d,f);a.setClip(b.x-d,b.y-f,b.width,b.height);c.paintForceDoubleBuffered(a);a.translate(-d,-f);a.setClip(b.x,b.y,b.width, +b.height)}else try{this.inBlitPaint=!0,this.paintForceDoubleBuffered(a)}finally{this.inBlitPaint=!1}},"java.awt.Graphics");c(c$,"canUseWindowBlitter",function(){if(!this.isShowing()||!j(this.getParent(),javax.swing.JComponent)&&!j(this.getView(),javax.swing.JComponent)||this.isPainting())return!1;var a=javax.swing.RepaintManager.currentManager(this).getDirtyRegion(this.getParent());if(null!=a&&0g.width&&(m.x=Math.max(0,g.width-f.width)):m.x=f.width>g.width?g.width-f.width:Math.max(0,Math.min(g.width-f.width,m.x));m.y+f.height>g.height&&(m.y=Math.max(0,g.height-f.height));null==c&&(0==m.x&&d.width>b.width&&(g.width=d.width),0==m.y&&d.height>b.height&&(g.height=d.height));a.setViewPosition(m);a.setViewSize(g)}},"java.awt.Container");c$.SHARED_INSTANCE= +c$.prototype.SHARED_INSTANCE=new javax.swing.ViewportLayout});p("javax.swing.event");n(["java.util.EventListener"],"javax.swing.event.CaretListener",null,function(){y(javax.swing.event,"CaretListener",java.util.EventListener)});p("javax.swing");n(["javax.swing.BoundedRangeModel","javax.swing.event.EventListenerList"],"javax.swing.DefaultBoundedRangeModel",["java.lang.IllegalArgumentException","javax.swing.event.ChangeEvent","$.ChangeListener"],function(){c$=q(function(){this.listenerList=this.changeEvent= +null;this.min=this.extent=this.value=0;this.max=100;this.isAdjusting=!1;k(this,arguments)},javax.swing,"DefaultBoundedRangeModel",null,javax.swing.BoundedRangeModel);I(c$,function(){this.listenerList=new javax.swing.event.EventListenerList});g(c$,function(){});g(c$,function(a,b,c,d){if(d>=c&&a>=c&&a+b>=a&&a+b<=d)this.value=a,this.extent=b,this.min=c,this.max=d;else throw new IllegalArgumentException("invalid range properties");},"~N,~N,~N,~N");d(c$,"getValue",function(){return this.value});d(c$,"getExtent", +function(){return this.extent});d(c$,"getMinimum",function(){return this.min});d(c$,"getMaximum",function(){return this.max});d(c$,"setValue",function(a){a=Math.min(a,2147483647-this.extent);a=Math.max(a,this.min);a+this.extent>this.max&&(a=this.max-this.extent);this.setRangeProperties(a,this.extent,this.min,this.max,this.isAdjusting)},"~N");d(c$,"setExtent",function(a){a=Math.max(0,a);this.value+a>this.max&&(a=this.max-this.value);this.setRangeProperties(this.value,a,this.min,this.max,this.isAdjusting)}, +"~N");d(c$,"setMinimum",function(a){var b=Math.max(a,this.max),c=Math.max(a,this.value),d=Math.min(b-c,this.extent);this.setRangeProperties(c,d,a,b,this.isAdjusting)},"~N");d(c$,"setMaximum",function(a){var b=Math.min(a,this.min),c=Math.min(a-b,this.extent),d=Math.min(a-c,this.value);this.setRangeProperties(d,c,b,a,this.isAdjusting)},"~N");d(c$,"setValueIsAdjusting",function(a){this.setRangeProperties(this.value,this.extent,this.min,this.max,a)},"~B");d(c$,"getValueIsAdjusting",function(){return this.isAdjusting}); +d(c$,"setRangeProperties",function(a,b,c,d,f){c>d&&(c=d);a>d&&(d=a);ad&&(b=d-a);0>b&&(b=0);if(a!=this.value||b!=this.extent||c!=this.min||d!=this.max||f!=this.isAdjusting)this.value=a,this.extent=b,this.min=c,this.max=d,this.isAdjusting=f,this.fireStateChanged()},"~N,~N,~N,~N,~B");d(c$,"addChangeListener",function(a){this.listenerList.add(javax.swing.event.ChangeListener,a)},"javax.swing.event.ChangeListener");d(c$,"removeChangeListener",function(a){this.listenerList.remove(javax.swing.event.ChangeListener, +a)},"javax.swing.event.ChangeListener");c(c$,"getChangeListeners",function(){return this.listenerList.getListeners(javax.swing.event.ChangeListener)});c(c$,"fireStateChanged",function(){for(var a=this.listenerList.getListenerList(),b=a.length-2;0<=b;b-=2)a[b]===javax.swing.event.ChangeListener&&(null==this.changeEvent&&(this.changeEvent=new javax.swing.event.ChangeEvent(this)),a[b+1].stateChanged(this.changeEvent))});d(c$,"toString",function(){var a="value="+this.getValue()+", extent="+this.getExtent()+ +", min="+this.getMinimum()+", max="+this.getMaximum()+", adj="+this.getValueIsAdjusting();return this.getClass().getName()+"["+a+"]"});c(c$,"getListeners",function(a){return this.listenerList.getListeners(a)},"Class")});p("javax.swing");y(javax.swing,"BoundedRangeModel");p("javax.swing");n(["java.awt.AWTKeyStroke"],"javax.swing.KeyStroke",null,function(){c$=t(javax.swing,"KeyStroke",java.awt.AWTKeyStroke);c$.getKeyStroke=c(c$,"getKeyStroke",function(a){java.awt.AWTKeyStroke.registerSubclass(javax.swing.KeyStroke); +return java.awt.AWTKeyStroke.getAWTKeyStroke(a)},"~S");c$.getKeyStroke=c(c$,"getKeyStroke",function(a,b){return new javax.swing.KeyStroke(a,0,0,b)},"~S,~B");c$.getKeyStroke=c(c$,"getKeyStroke",function(a,b){java.awt.AWTKeyStroke.registerSubclass(javax.swing.KeyStroke);return java.awt.AWTKeyStroke.getAWTKeyStroke(a,b)},"Character,~N");c$.getKeyStroke=c(c$,"getKeyStroke",function(a,b,c){java.awt.AWTKeyStroke.registerSubclass(javax.swing.KeyStroke);return java.awt.AWTKeyStroke.getAWTKeyStroke(a,b,c)}, +"~N,~N,~B");c$.getKeyStroke=c(c$,"getKeyStroke",function(a,b){java.awt.AWTKeyStroke.registerSubclass(javax.swing.KeyStroke);return java.awt.AWTKeyStroke.getAWTKeyStroke(a,b)},"~N,~N");c$.getKeyStrokeForEvent=c(c$,"getKeyStrokeForEvent",function(a){java.awt.AWTKeyStroke.registerSubclass(javax.swing.KeyStroke);return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent(a)},"java.awt.event.KeyEvent");c$.getKeyStroke=c(c$,"getKeyStroke",function(a){if(null==a||0==a.length)return null;java.awt.AWTKeyStroke.registerSubclass(javax.swing.KeyStroke); +try{return java.awt.AWTKeyStroke.getAWTKeyStroke(a)}catch(b){if(z(b,IllegalArgumentException))return null;throw b;}},"~S")});p("java.awt");n(null,["java.awt.AWTKeyStroke","$.VKCollection"],"java.io.ObjectStreamException java.lang.IllegalArgumentException $.StringBuilder java.util.Collections $.HashMap $.StringTokenizer java.awt.event.KeyEvent jssun.awt.AppContext".split(" "),function(){c$=q(function(){this.keyChar="\uffff";this.modifiers=this.keyCode=0;this.onKeyRelease=!1;k(this,arguments)},java.awt, +"AWTKeyStroke");c$.getAWTKeyStrokeClass=c(c$,"getAWTKeyStrokeClass",function(){var a=jssun.awt.AppContext.getAppContext().get(java.awt.AWTKeyStroke);null==a&&(a=java.awt.AWTKeyStroke,jssun.awt.AppContext.getAppContext().put(java.awt.AWTKeyStroke,java.awt.AWTKeyStroke));return a});g(c$,function(){});g(c$,function(a,b,c,d){this.keyChar=a;this.keyCode=b;this.modifiers=c;this.onKeyRelease=d},"~S,~N,~N,~B");c$.registerSubclass=c(c$,"registerSubclass",function(){},"Class");c$.getCachedStroke=c(c$,"getCachedStroke", +function(){return null},"~S,~N,~N,~B");c$.getAWTKeyStroke=c(c$,"getAWTKeyStroke",function(a){return java.awt.AWTKeyStroke.getCachedStroke(a,0,0,!1)},"~S");c$.getAWTKeyStroke=c(c$,"getAWTKeyStroke",function(a,b){if(null==a)throw new IllegalArgumentException("keyChar cannot be null");return java.awt.AWTKeyStroke.getCachedStroke(a.charValue(),0,b,!1)},"Character,~N");c$.getAWTKeyStroke=c(c$,"getAWTKeyStroke",function(a,b,c){return java.awt.AWTKeyStroke.getCachedStroke("\uffff",a,b,c)},"~N,~N,~B");c$.getAWTKeyStroke= +c(c$,"getAWTKeyStroke",function(a,b){return java.awt.AWTKeyStroke.getCachedStroke("\uffff",a,b,!1)},"~N,~N");c$.getAWTKeyStrokeForEvent=c(c$,"getAWTKeyStrokeForEvent",function(a){var b=a.getID();switch(b){case 401:case 402:return java.awt.AWTKeyStroke.getCachedStroke("\uffff",a.getKeyCode(),a.getModifiers(),402==b);case 400:return java.awt.AWTKeyStroke.getCachedStroke(a.getKeyChar(),0,a.getModifiers(),!1);default:return null}},"java.awt.event.KeyEvent");c$.getAWTKeyStroke=c(c$,"getAWTKeyStroke",function(a){if(null== +a)throw new IllegalArgumentException("String cannot be null");var b=new java.util.StringTokenizer(a," ");a=0;var c=!1,d=!1,f=!1;if(null==java.awt.AWTKeyStroke.modifierKeywords){var g=new java.util.HashMap(8,1);g.put("shift",Integer.$valueOf(65));g.put("control",Integer.$valueOf(130));g.put("ctrl",Integer.$valueOf(130));g.put("meta",Integer.$valueOf(260));g.put("alt",Integer.$valueOf(520));g.put("altGraph",Integer.$valueOf(8224));g.put("button1",Integer.$valueOf(1024));g.put("button2",Integer.$valueOf(2048)); +g.put("button3",Integer.$valueOf(4096));java.awt.AWTKeyStroke.modifierKeywords=java.util.Collections.synchronizedMap(g)}for(var g=b.countTokens(),j=1;j<=g;j++){var k=b.nextToken();if(d){if(1!=k.length||j!=g)break;return java.awt.AWTKeyStroke.getCachedStroke(k.charAt(0),0,a,!1)}if(f||c||j==g){if(j!=g)break;b=java.awt.AWTKeyStroke.getVKValue("VK_"+k);return java.awt.AWTKeyStroke.getCachedStroke("\uffff",b,a,c)}if(k.equals("released"))c=!0;else if(k.equals("pressed"))f=!0;else if(k.equals("typed"))d= +!0;else if(k=java.awt.AWTKeyStroke.modifierKeywords.get(k),null!=k)a|=k.intValue();else break}throw new IllegalArgumentException("String formatted incorrectly");},"~S");c$.getVKCollection=c(c$,"getVKCollection",function(){null==java.awt.AWTKeyStroke.vks&&(java.awt.AWTKeyStroke.vks=new java.awt.VKCollection);return java.awt.AWTKeyStroke.vks});c$.getVKValue=c(c$,"getVKValue",function(a){var b=java.awt.AWTKeyStroke.getVKCollection(),c=b.findCode(a);if(null==c){c=0;try{c=java.awt.event.KeyEvent.getField(a).getInt(java.awt.event.KeyEvent)}catch(d){if(z(d, +NoSuchFieldException))throw new IllegalArgumentException("String formatted incorrectly");if(z(d,IllegalAccessException))throw new IllegalArgumentException("String formatted incorrectly");throw d;}c=Integer.$valueOf(c);b.put(a,c)}return c.intValue()},"~S");c(c$,"getKeyChar",function(){return this.keyChar});c(c$,"getKeyCode",function(){return this.keyCode});c(c$,"getModifiers",function(){return this.modifiers});c(c$,"isOnKeyRelease",function(){return this.onKeyRelease});c(c$,"getKeyEventType",function(){return 0== +this.keyCode?400:this.onKeyRelease?402:401});d(c$,"hashCode",function(){return(this.keyChar.charCodeAt(0)+1)*(2*(this.keyCode+1))*(this.modifiers+1)+(this.onKeyRelease?1:2)});c(c$,"equals",function(a){return j(a,java.awt.AWTKeyStroke)?a.keyChar==this.keyChar&&a.keyCode==this.keyCode&&a.onKeyRelease==this.onKeyRelease&&a.modifiers==this.modifiers:!1},"~O");d(c$,"toString",function(){return 0==this.keyCode?java.awt.AWTKeyStroke.getModifiersText(this.modifiers)+"typed "+this.keyChar:java.awt.AWTKeyStroke.getModifiersText(this.modifiers)+ +(this.onKeyRelease?"released":"pressed")+" "+java.awt.AWTKeyStroke.getVKText(this.keyCode)});c$.getModifiersText=c(c$,"getModifiersText",function(a){var b=new StringBuilder;0!=(a&64)&&b.append("shift ");0!=(a&128)&&b.append("ctrl ");0!=(a&256)&&b.append("meta ");0!=(a&512)&&b.append("alt ");0!=(a&8192)&&b.append("altGraph ");0!=(a&1024)&&b.append("button1 ");0!=(a&2048)&&b.append("button2 ");0!=(a&4096)&&b.append("button3 ");return b.toString()},"~N");c$.getVKText=c(c$,"getVKText",function(){return"UNKNOWN"}, +"~N");c(c$,"readResolve",function(){var a=this.getClass(),b=java.awt.AWTKeyStroke.getAWTKeyStrokeClass();a.equals(b)||java.awt.AWTKeyStroke.registerSubclass(a);return java.awt.AWTKeyStroke.getCachedStroke(this.keyChar,this.keyCode,this.modifiers,this.onKeyRelease)});x(c$,"modifierKeywords",null,"vks",null);c$=q(function(){this.name2code=this.code2name=null;k(this,arguments)},java.awt,"VKCollection");g(c$,function(){this.code2name=new java.util.HashMap;this.name2code=new java.util.HashMap});c(c$,"put", +function(a,b){this.code2name.put(b,a);this.name2code.put(a,b)},"~S,Integer");c(c$,"findCode",function(a){return this.name2code.get(a)},"~S");c(c$,"findName",function(a){return this.code2name.get(a)},"Integer")});n(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){c$=q(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;k(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration); +g(c$,function(a){this.construct(a," \t\n\r\f",!1)},"~S");g(c$,function(a,b){this.construct(a,b,!1)},"~S,~S");g(c$,function(a,b,c){if(null!=a)this.string=a,this.delimiters=b,this.returnDelimiters=c,this.position=0;else throw new NullPointerException;},"~S,~S,~B");c(c$,"countTokens",function(){for(var a=0,b=!1,c=this.position,d=this.string.length;cd?0:d},"javax.swing.JComponent,javax.swing.JComponent,~N,~N");c(c$,"getButtonGap",function(a,b,c){c-=this.getButtonGap(a,b);return Math.max(c,0)},"javax.swing.JComponent,~N,~N");c(c$,"getButtonGap",function(a,b){var c=a.getUIClassID(); +if(("CheckBoxUI"===c||"RadioButtonUI"===c)&&!a.isBorderPainted())if(c=a.getBorder(),j(c,javax.swing.plaf.UIResource))return this.getInset(a,b);return 0},"javax.swing.JComponent,~N");c(c$,"checkPosition",function(a){if(1!=a&&5!=a&&7!=a&&3!=a)throw new IllegalArgumentException;},"~N");c(c$,"flipDirection",function(a){switch(a){case 1:return 5;case 5:return 1;case 3:return 7;case 7:return 3}return 0},"~N");c(c$,"getIndent",function(a,b){var c=a.getUIClassID();if("CheckBoxUI"===c||"RadioButtonUI"===c){var c= +a.getInsets(),d=this.getIcon(a),f=a.getIconTextGap();if(this.isLeftAligned(a,b))return c.left+d.getIconWidth()+f;if(this.isRightAligned(a,b))return c.right+d.getIconWidth()+f}return 0},"javax.swing.JComponent,~N");c(c$,"getIcon",function(a){var b=a.getIcon();if(null!=b)return b;b=null;j(a,javax.swing.JCheckBox)?b="CheckBox.icon":j(a,javax.swing.JRadioButton)&&(b="RadioButton.icon");return null!=b&&(a=javax.swing.UIManager.get(b),j(a,javax.swing.Icon))?a:null},"javax.swing.AbstractButton");c(c$,"isLeftAligned", +function(a,b){if(7==b){var c=a.getComponentOrientation().isLeftToRight(),d=a.getHorizontalAlignment();return c&&(2==d||10==d)||!c&&11==d}return!1},"javax.swing.AbstractButton,~N");c(c$,"isRightAligned",function(a,b){if(3==b){var c=a.getComponentOrientation().isLeftToRight(),d=a.getHorizontalAlignment();return c&&(4==d||11==d)||!c&&10==d}return!1},"javax.swing.AbstractButton,~N");c(c$,"getInset",function(a,b){return this.getInset(a.getInsets(),b)},"javax.swing.JComponent,~N");c(c$,"getInset",function(a, +b){if(null==a)return 0;switch(b){case 1:return a.top;case 5:return a.bottom;case 3:return a.right;case 7:return a.left}return 0},"java.awt.Insets,~N");c$.INSTANCE=c$.prototype.INSTANCE=new jssun.swing.DefaultLayoutStyle});p("javax.swing");n(["java.lang.Enum"],"javax.swing.LayoutStyle",["javax.swing.UIManager","jssun.awt.AppContext"],function(){c$=t(javax.swing,"LayoutStyle");c$.setInstance=c(c$,"setInstance",function(a){null==a?jssun.awt.AppContext.getAppContext().remove(javax.swing.LayoutStyle): +jssun.awt.AppContext.getAppContext().put(javax.swing.LayoutStyle,a)},"javax.swing.LayoutStyle");c$.getInstance=c(c$,"getInstance",function(){var a;a=jssun.awt.AppContext.getAppContext().get(javax.swing.LayoutStyle);return null==a?javax.swing.UIManager.getLookAndFeel().getLayoutStyle():a});g(c$,function(){});w(self.c$);c$=t(javax.swing.LayoutStyle,"ComponentPlacement",Enum);F(c$,"RELATED",0,[]);F(c$,"UNRELATED",1,[]);F(c$,"INDENT",2,[]);c$=v()});p("javax.swing");n(["javax.swing.JToggleButton"],"javax.swing.JCheckBox", +["java.lang.Boolean","javax.swing.UIManager"],function(){c$=q(function(){this.flat=!1;k(this,arguments)},javax.swing,"JCheckBox",javax.swing.JToggleButton);g(c$,function(){this.construct(null,null,!1)});g(c$,function(a){this.construct(null,a,!1)},"javax.swing.Icon");g(c$,function(a,b){this.construct(null,a,b)},"javax.swing.Icon,~B");g(c$,function(a){this.construct(a,null,!1)},"~S");g(c$,function(a){this.construct();this.setAction(a)},"javax.swing.Action");g(c$,function(a,b){this.construct(a,null, +b)},"~S,~B");g(c$,function(a,b){this.construct(a,b,!1)},"~S,javax.swing.Icon");g(c$,function(a,b,c){r(this,javax.swing.JCheckBox,[a,b,c]);this.setUIProperty("borderPainted",Boolean.FALSE);this.setHorizontalAlignment(10)},"~S,javax.swing.Icon,~B");c(c$,"setBorderPaintedFlat",function(a){var b=this.flat;this.flat=a;this.firePropertyChangeBool("borderPaintedFlat",b,this.flat);a!=b&&(this.revalidate(),this.repaint())},"~B");c(c$,"isBorderPaintedFlat",function(){return this.flat});d(c$,"updateUI",function(){this.setUI(javax.swing.UIManager.getUI(this))}); +d(c$,"getUIClassID",function(){return"CheckBoxUI"});d(c$,"setIconFromAction",function(){},"javax.swing.Action");x(c$,"BORDER_PAINTED_FLAT_CHANGED_PROPERTY","borderPaintedFlat","$$uiClassID","CheckBoxUI")});p("java.awt");y(java.awt,"ItemSelectable");p("java.awt.event");n(["java.awt.AWTEvent"],"java.awt.event.ItemEvent",null,function(){c$=q(function(){this.item=null;this.stateChange=0;k(this,arguments)},java.awt.event,"ItemEvent",java.awt.AWTEvent);g(c$,function(a,b,c,d){r(this,java.awt.event.ItemEvent, +[a,b]);this.item=c;this.stateChange=d},"java.awt.ItemSelectable,~N,~O,~N");c(c$,"getItemSelectable",function(){return this.source});c(c$,"getItem",function(){return this.item});c(c$,"getStateChange",function(){return this.stateChange});d(c$,"paramString",function(){var a;switch(this.id){case 701:a="ITEM_STATE_CHANGED";break;default:a="unknown type"}var b;switch(this.stateChange){case 1:b="SELECTED";break;case 2:b="DESELECTED";break;default:b="unknown type"}return a+",item="+this.item+",stateChange="+ +b});x(c$,"ITEM_FIRST",701,"ITEM_LAST",701,"ITEM_STATE_CHANGED",701,"SELECTED",1,"DESELECTED",2)});p("javax.swing");n(["javax.swing.ButtonModel","javax.swing.event.EventListenerList"],"javax.swing.DefaultButtonModel","java.awt.EventQueue java.awt.event.ActionEvent $.ActionListener $.InputEvent $.ItemEvent $.ItemListener javax.swing.UIManager javax.swing.event.ChangeEvent $.ChangeListener".split(" "),function(){c$=q(function(){this.stateMask=0;this.group=this.actionCommand=null;this.mnemonic=0;this.listenerList= +this.changeEvent=null;this.menuItem=!1;k(this,arguments)},javax.swing,"DefaultButtonModel",null,javax.swing.ButtonModel);I(c$,function(){this.listenerList=new javax.swing.event.EventListenerList});g(c$,function(){this.stateMask=0;this.setEnabled(!0)});d(c$,"setActionCommand",function(a){this.actionCommand=a},"~S");d(c$,"getActionCommand",function(){return this.actionCommand});d(c$,"isArmed",function(){return 0!=(this.stateMask&1)});d(c$,"isSelected",function(){return 0!=(this.stateMask&2)});d(c$, +"isEnabled",function(){return 0!=(this.stateMask&8)});d(c$,"isPressed",function(){return 0!=(this.stateMask&4)});d(c$,"isRollover",function(){return 0!=(this.stateMask&16)});d(c$,"setArmed",function(a){if(this.isMenuItem()&&javax.swing.UIManager.getBoolean("MenuItem.disabledAreNavigable")){if(this.isArmed()==a)return}else if(this.isArmed()==a||!this.isEnabled())return;this.stateMask=a?this.stateMask|1:this.stateMask&-2;this.fireStateChanged()},"~B");d(c$,"setEnabled",function(a){this.isEnabled()!= +a&&(a?this.stateMask|=8:(this.stateMask&=-9,this.stateMask&=-2,this.stateMask&=-5),this.fireStateChanged())},"~B");d(c$,"setSelected",function(a){this.isSelected()!=a&&(this.stateMask=a?this.stateMask|2:this.stateMask&-3,this.fireItemStateChanged(new java.awt.event.ItemEvent(this,701,this,a?1:2)),this.fireStateChanged())},"~B");d(c$,"setPressed",function(a){if(this.isPressed()!=a&&this.isEnabled()){this.stateMask=a?this.stateMask|4:this.stateMask&-5;if(!this.isPressed()&&this.isArmed()){a=0;var b= +java.awt.EventQueue.getCurrentEvent();j(b,java.awt.event.InputEvent)?a=b.getModifiers():j(b,java.awt.event.ActionEvent)&&(a=b.getModifiers());this.fireActionPerformed(new java.awt.event.ActionEvent(this,1001,this.getActionCommand(),java.awt.EventQueue.getMostRecentEventTime(),a))}this.fireStateChanged()}},"~B");d(c$,"setRollover",function(a){this.isRollover()!=a&&this.isEnabled()&&(this.stateMask=a?this.stateMask|16:this.stateMask&-17,this.fireStateChanged())},"~B");d(c$,"setMnemonic",function(a){this.mnemonic= +a;this.fireStateChanged()},"~N");d(c$,"getMnemonic",function(){return this.mnemonic});d(c$,"addChangeListener",function(a){this.listenerList.add(javax.swing.event.ChangeListener,a)},"javax.swing.event.ChangeListener");d(c$,"removeChangeListener",function(a){this.listenerList.remove(javax.swing.event.ChangeListener,a)},"javax.swing.event.ChangeListener");c(c$,"getChangeListeners",function(){return this.listenerList.getListeners(javax.swing.event.ChangeListener)});c(c$,"fireStateChanged",function(){for(var a= +this.listenerList.getListenerList(),b=a.length-2;0<=b;b-=2)a[b]===javax.swing.event.ChangeListener&&(null==this.changeEvent&&(this.changeEvent=new javax.swing.event.ChangeEvent(this)),a[b+1].stateChanged(this.changeEvent))});d(c$,"addActionListener",function(a){this.listenerList.add(java.awt.event.ActionListener,a)},"java.awt.event.ActionListener");d(c$,"removeActionListener",function(a){this.listenerList.remove(java.awt.event.ActionListener,a)},"java.awt.event.ActionListener");c(c$,"getActionListeners", +function(){return this.listenerList.getListeners(java.awt.event.ActionListener)});c(c$,"fireActionPerformed",function(a){for(var b=this.listenerList.getListenerList(),c=b.length-2;0<=c;c-=2)b[c]===java.awt.event.ActionListener&&b[c+1].actionPerformed(a)},"java.awt.event.ActionEvent");d(c$,"addItemListener",function(a){this.listenerList.add(java.awt.event.ItemListener,a)},"java.awt.event.ItemListener");d(c$,"removeItemListener",function(a){this.listenerList.remove(java.awt.event.ItemListener,a)},"java.awt.event.ItemListener"); +c(c$,"getItemListeners",function(){return this.listenerList.getListeners(java.awt.event.ItemListener)});c(c$,"fireItemStateChanged",function(a){for(var b=this.listenerList.getListenerList(),c=b.length-2;0<=c;c-=2)b[c]===java.awt.event.ItemListener&&b[c+1].itemStateChanged(a)},"java.awt.event.ItemEvent");c(c$,"getListeners",function(a){return this.listenerList.getListeners(a)},"Class");d(c$,"getSelectedObjects",function(){return null});d(c$,"setGroup",function(a){this.group=a},"javax.swing.ButtonGroup"); +c(c$,"getGroup",function(){return this.group});c(c$,"isMenuItem",function(){return this.menuItem});c(c$,"setMenuItem",function(a){this.menuItem=a},"~B");x(c$,"ARMED",1,"SELECTED",2,"PRESSED",4,"ENABLED",8,"ROLLOVER",16)});p("javax.swing");n(["java.awt.LayoutManager2"],"javax.swing.OverlayLayout",["java.awt.AWTError","$.Dimension","javax.swing.SizeRequirements"],function(){c$=q(function(){this.yTotal=this.xTotal=this.yChildren=this.xChildren=this.target=null;k(this,arguments)},javax.swing,"OverlayLayout", +null,java.awt.LayoutManager2);g(c$,function(a){this.target=a},"java.awt.Container");c(c$,"getTarget",function(){return this.target});d(c$,"invalidateLayout",function(a){this.checkContainer(a);this.yTotal=this.xTotal=this.yChildren=this.xChildren=null},"java.awt.Container");c(c$,"addLayoutComponent",function(a,b){this.invalidateLayout(b.getParent())},"~S,java.awt.Component");d(c$,"removeLayoutComponent",function(a){this.invalidateLayout(a.getParent())},"java.awt.Component");c(c$,"addLayoutComponent", +function(a){this.invalidateLayout(a.getParent())},"java.awt.Component,~O");d(c$,"preferredLayoutSize",function(a){this.checkContainer(a);this.checkRequests();var b=new java.awt.Dimension(this.xTotal.preferred,this.yTotal.preferred);a=a.getInsets();b.width+=a.left+a.right;b.height+=a.top+a.bottom;return b},"java.awt.Container");d(c$,"minimumLayoutSize",function(a){this.checkContainer(a);this.checkRequests();var b=new java.awt.Dimension(this.xTotal.minimum,this.yTotal.minimum);a=a.getInsets();b.width+= +a.left+a.right;b.height+=a.top+a.bottom;return b},"java.awt.Container");d(c$,"maximumLayoutSize",function(a){this.checkContainer(a);this.checkRequests();var b=new java.awt.Dimension(this.xTotal.maximum,this.yTotal.maximum);a=a.getInsets();b.width+=a.left+a.right;b.height+=a.top+a.bottom;return b},"java.awt.Container");d(c$,"getLayoutAlignmentX",function(a){this.checkContainer(a);this.checkRequests();return this.xTotal.alignment},"java.awt.Container");d(c$,"getLayoutAlignmentY",function(a){this.checkContainer(a); +this.checkRequests();return this.yTotal.alignment},"java.awt.Container");d(c$,"layoutContainer",function(a){this.checkContainer(a);this.checkRequests();var b=a.getComponentCount(),c=H(b,0),d=H(b,0),f=H(b,0),g=H(b,0),j=a.getSize(),k=a.getInsets();j.width-=k.left+k.right;j.height-=k.top+k.bottom;javax.swing.SizeRequirements.calculateAlignedPositions(j.width,this.xTotal,this.xChildren,c,d);javax.swing.SizeRequirements.calculateAlignedPositions(j.height,this.yTotal,this.yChildren,f,g);for(j=0;jd?0:d},"~N,~N,~N,~N");d(c$,"toString",function(){return"["+this.minimum+","+this.preferred+","+this.maximum+"]@"+this.alignment});c$.getTiledSizeRequirements=c(c$,"getTiledSizeRequirements",function(a){for(var b=new javax.swing.SizeRequirements,c=0;cf?0:f);return new javax.swing.SizeRequirements(a,d,c,f)},"~A");c$.calculateTiledPositions=c(c$,"calculateTiledPositions",function(a,b,c,d,f){javax.swing.SizeRequirements.calcTiled(a,b,c,d,f,!0)},"~N,javax.swing.SizeRequirements,~A,~A,~A");c$.calculateTiledPositions=c(c$, +"calculateTiledPositions",function(a,b,c,d,f,g){javax.swing.SizeRequirements.calcTiled(a,b,c,d,f,g)},"~N,javax.swing.SizeRequirements,~A,~A,~A,~B");c$.calcTiled=c(c$,"calcTiled",function(a,b,c,d,f,g){for(var j=b=0,k=0,n=0;n=j?javax.swing.SizeRequirements.expandedTile(a,b,j,k,c,d,f,g):javax.swing.SizeRequirements.compressedTile(a,b,j,k,c,d,f,g)},"~N,javax.swing.SizeRequirements,~A,~A,~A,~B");c$.compressedTile=c(c$,"compressedTile",function(a, +b,c,d,f,g,j,k){d=Math.min(c-a,c-b);b=0==c-b?0:d/(c-b);if(k)for(k=a=0;k=a&&(a-=32);this.setDisplayedMnemonic(a)},"~S");c(c$,"getDisplayedMnemonic",function(){return this.mnemonic});c(c$,"setDisplayedMnemonicIndex",function(a){var b=this.mnemonicIndex;if(-1==a)this.mnemonicIndex=-1;else{var c=this.getText(),c=null==c?0:c.length;if(-1>a||a>=c)throw new IllegalArgumentException("index == "+a);}this.mnemonicIndex=a;this.firePropertyChangeInt("displayedMnemonicIndex",b,a);a!=b&&(this.revalidate(),this.repaint())},"~N");c(c$,"getDisplayedMnemonicIndex", +function(){return this.mnemonicIndex});c(c$,"checkHorizontalKey",function(a,b){if(2==a||0==a||4==a||10==a||11==a)return a;throw new IllegalArgumentException(b);},"~N,~S");c(c$,"checkVerticalKey",function(a,b){if(1==a||0==a||3==a)return a;throw new IllegalArgumentException(b);},"~N,~S");c(c$,"getIconTextGap",function(){return this.iconTextGap});c(c$,"setIconTextGap",function(a){var b=this.iconTextGap;this.iconTextGap=a;this.firePropertyChangeInt("iconTextGap",b,a);a!=b&&(this.revalidate(),this.repaint())}, +"~N");c(c$,"getVerticalAlignment",function(){return this.verticalAlignment});c(c$,"setVerticalAlignment",function(a){if(a!=this.verticalAlignment){var b=this.verticalAlignment;this.verticalAlignment=this.checkVerticalKey(a,"verticalAlignment");this.firePropertyChangeInt("verticalAlignment",b,this.verticalAlignment);this.repaint()}},"~N");c(c$,"getHorizontalAlignment",function(){return this.horizontalAlignment});c(c$,"setHorizontalAlignment",function(a){if(a!=this.horizontalAlignment){var b=this.horizontalAlignment; +this.horizontalAlignment=this.checkHorizontalKey(a,"horizontalAlignment");this.firePropertyChangeInt("horizontalAlignment",b,this.horizontalAlignment);this.repaint()}},"~N");c(c$,"getVerticalTextPosition",function(){return this.verticalTextPosition});c(c$,"setVerticalTextPosition",function(a){if(a!=this.verticalTextPosition){var b=this.verticalTextPosition;this.verticalTextPosition=this.checkVerticalKey(a,"verticalTextPosition");this.firePropertyChangeInt("verticalTextPosition",b,this.verticalTextPosition); +this.revalidate();this.repaint()}},"~N");c(c$,"getHorizontalTextPosition",function(){return this.horizontalTextPosition});c(c$,"setHorizontalTextPosition",function(a){var b=this.horizontalTextPosition;this.horizontalTextPosition=this.checkHorizontalKey(a,"horizontalTextPosition");this.firePropertyChangeInt("horizontalTextPosition",b,this.horizontalTextPosition);this.revalidate();this.repaint()},"~N");c(c$,"imageUpdate",function(a,b,c,d,f,g){return!this.isShowing()||!javax.swing.SwingUtilities.doesIconReferenceImage(this.getIcon(), +a)&&!javax.swing.SwingUtilities.doesIconReferenceImage(this.disabledIcon,a)?!1:u(this,javax.swing.JLabel,"imageUpdate",[a,b,c,d,f,g])},"java.awt.Image,~N,~N,~N,~N,~N");c(c$,"paramString",function(){var a=null!=this.text?this.text:"",b=null!=this.defaultIcon&&this.defaultIcon!==this?this.defaultIcon.toString():"",c=null!=this.disabledIcon&&this.disabledIcon!==this?this.disabledIcon.toString():"",d=null!=this.labelFor?this.labelFor.toString():"",f;f=1==this.verticalAlignment?"TOP":0==this.verticalAlignment? +"CENTER":3==this.verticalAlignment?"BOTTOM":"";var g;g=2==this.horizontalAlignment?"LEFT":0==this.horizontalAlignment?"CENTER":4==this.horizontalAlignment?"RIGHT":10==this.horizontalAlignment?"LEADING":11==this.horizontalAlignment?"TRAILING":"";var j;j=1==this.verticalTextPosition?"TOP":0==this.verticalTextPosition?"CENTER":3==this.verticalTextPosition?"BOTTOM":"";var k;k=2==this.horizontalTextPosition?"LEFT":0==this.horizontalTextPosition?"CENTER":4==this.horizontalTextPosition?"RIGHT":10==this.horizontalTextPosition? +"LEADING":11==this.horizontalTextPosition?"TRAILING":"";return u(this,javax.swing.JLabel,"paramString",[])+",defaultIcon="+b+",disabledIcon="+c+",horizontalAlignment="+g+",horizontalTextPosition="+k+",iconTextGap="+this.iconTextGap+",labelFor="+d+",text="+a+",verticalAlignment="+f+",verticalTextPosition="+j});c(c$,"getLabelFor",function(){return this.labelFor});c(c$,"setLabelFor",function(a){var b=this.labelFor;this.labelFor=a;this.firePropertyChangeObject("labelFor",b,a);j(b,javax.swing.JComponent)&& +b.putClientProperty("labeledBy",null);j(a,javax.swing.JComponent)&&a.putClientProperty("labeledBy",this)},"java.awt.Component");x(c$,"$uiClassID","LabelUI","LABELED_BY_PROPERTY","labeledBy")});p("javax.swing.border");y(javax.swing.border,"Border");p("javax.swing");y(javax.swing,"RootPaneContainer");p("javax.swing.event");n(["java.awt.event.MouseEvent"],"javax.swing.event.MenuDragMouseEvent",null,function(){c$=q(function(){this.manager=this.path=null;k(this,arguments)},javax.swing.event,"MenuDragMouseEvent", +java.awt.event.MouseEvent);g(c$,function(a,b,c,d,f,g,j,k,n,p){r(this,javax.swing.event.MenuDragMouseEvent,[a,b,c,d,f,g,j,k]);this.path=n;this.manager=p},"java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");g(c$,function(a,b,c,d,f,g,j,k,n,p,q,t){r(this,javax.swing.event.MenuDragMouseEvent,[a,b,c,d,f,g,j,k,n,p,0]);this.path=q;this.manager=t},"java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");c(c$,"getPath",function(){return this.path});c(c$, +"getMenuSelectionManager",function(){return this.manager})});p("jssun.swing");n(["javax.swing.Action"],"jssun.swing.UIAction",null,function(){c$=q(function(){this.name=null;k(this,arguments)},jssun.swing,"UIAction",null,javax.swing.Action);g(c$,function(a){this.name=a},"~S");c(c$,"getName",function(){return this.name});d(c$,"getValue",function(a){return"Name"===a?this.name:null},"~S");d(c$,"putValue",function(){},"~S,~O");d(c$,"setEnabled",function(){},"~B");c(c$,"isEnabled",function(){return this.isEnabled(null)}); +c(c$,"isEnabled",function(){return!0},"~O");d(c$,"addPropertyChangeListener",function(){},"java.beans.PropertyChangeListener");d(c$,"removePropertyChangeListener",function(){},"java.beans.PropertyChangeListener")});p("jssun.awt");y(jssun.awt,"RequestFocusController");p("javax.swing");n(["java.awt.event.ComponentListener","java.beans.PropertyChangeListener","javax.swing.event.EventListenerList"],"javax.swing.AncestorNotifier",["java.awt.Window","javax.swing.JComponent","javax.swing.event.AncestorEvent", +"$.AncestorListener"],function(){c$=q(function(){this.root=this.listenerList=this.firstInvisibleAncestor=null;k(this,arguments)},javax.swing,"AncestorNotifier",null,[java.awt.event.ComponentListener,java.beans.PropertyChangeListener]);I(c$,function(){this.listenerList=new javax.swing.event.EventListenerList});g(c$,function(a){this.root=a;this.addListeners(a,!0)},"javax.swing.JComponent");c(c$,"addAncestorListener",function(a){this.listenerList.add(javax.swing.event.AncestorListener,a)},"javax.swing.event.AncestorListener"); +c(c$,"removeAncestorListener",function(a){this.listenerList.remove(javax.swing.event.AncestorListener,a)},"javax.swing.event.AncestorListener");c(c$,"getAncestorListeners",function(){return this.listenerList.getListeners(javax.swing.event.AncestorListener)});c(c$,"fireAncestorAdded",function(a,b,c,d){for(var f=this.listenerList.getListenerList(),g=f.length-2;0<=g;g-=2)if(f[g]===javax.swing.event.AncestorListener){var j=new javax.swing.event.AncestorEvent(a,b,c,d);f[g+1].ancestorAdded(j)}},"javax.swing.JComponent,~N,java.awt.Container,java.awt.Container"); +c(c$,"fireAncestorRemoved",function(a,b,c,d){for(var f=this.listenerList.getListenerList(),g=f.length-2;0<=g;g-=2)if(f[g]===javax.swing.event.AncestorListener){var j=new javax.swing.event.AncestorEvent(a,b,c,d);f[g+1].ancestorRemoved(j)}},"javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");c(c$,"fireAncestorMoved",function(a,b,c,d){for(var f=this.listenerList.getListenerList(),g=f.length-2;0<=g;g-=2)if(f[g]===javax.swing.event.AncestorListener){var j=new javax.swing.event.AncestorEvent(a, +b,c,d);f[g+1].ancestorMoved(j)}},"javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");c(c$,"removeAllListeners",function(){this.removeListeners(this.root)});c(c$,"addListeners",function(a,b){var c;this.firstInvisibleAncestor=null;for(c=a;null==this.firstInvisibleAncestor;c=c.getParent()){if(b||c!==a)c.addComponentListener(this),j(c,javax.swing.JComponent)&&c.addPropertyChangeListener(this);if(!c.isVisible()||null==c.getParent()||j(c,java.awt.Window))this.firstInvisibleAncestor=c}j(this.firstInvisibleAncestor, +java.awt.Window)&&this.firstInvisibleAncestor.isVisible()&&(this.firstInvisibleAncestor=null)},"java.awt.Component,~B");c(c$,"removeListeners",function(a){for(;null!=a&&!(a.removeComponentListener(this),j(a,javax.swing.JComponent)&&a.removePropertyChangeListener(this),a===this.firstInvisibleAncestor||j(a,java.awt.Window));a=a.getParent());},"java.awt.Component");d(c$,"componentResized",function(){},"java.awt.event.ComponentEvent");d(c$,"componentMoved",function(a){a=a.getComponent();this.fireAncestorMoved(this.root, +3,a,a.getParent())},"java.awt.event.ComponentEvent");d(c$,"componentShown",function(a){a=a.getComponent();a===this.firstInvisibleAncestor&&(this.addListeners(a,!1),null==this.firstInvisibleAncestor&&this.fireAncestorAdded(this.root,1,a,a.getParent()))},"java.awt.event.ComponentEvent");d(c$,"componentHidden",function(a){a=a.getComponent();var b=null==this.firstInvisibleAncestor;j(a,java.awt.Window)||this.removeListeners(a.getParent());this.firstInvisibleAncestor=a;b&&this.fireAncestorRemoved(this.root, +2,a,a.getParent())},"java.awt.event.ComponentEvent");d(c$,"propertyChange",function(a){var b=a.getPropertyName();if(null!=b&&(b.equals("parent")||b.equals("ancestor")))if(b=a.getSource(),null!=a.getNewValue())b===this.firstInvisibleAncestor&&(this.addListeners(b,!1),null==this.firstInvisibleAncestor&&this.fireAncestorAdded(this.root,1,b,b.getParent()));else{var c=null==this.firstInvisibleAncestor;a=a.getOldValue();this.removeListeners(a);this.firstInvisibleAncestor=b;c&&this.fireAncestorRemoved(this.root, +2,b,a)}},"java.beans.PropertyChangeEvent")});p("javax.swing.event");n(["java.awt.AWTEvent"],"javax.swing.event.AncestorEvent",null,function(){c$=q(function(){this.ancestorParent=this.ancestor=null;k(this,arguments)},javax.swing.event,"AncestorEvent",java.awt.AWTEvent);g(c$,function(a,b,c,d){r(this,javax.swing.event.AncestorEvent,[a,b]);this.ancestor=c;this.ancestorParent=d},"javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");c(c$,"getAncestor",function(){return this.ancestor});c(c$, +"getAncestorParent",function(){return this.ancestorParent});c(c$,"getComponent",function(){return this.getSource()});x(c$,"ANCESTOR_ADDED",1,"ANCESTOR_REMOVED",2,"ANCESTOR_MOVED",3)});p("javax.swing.event");n(["java.util.EventListener"],"javax.swing.event.AncestorListener",null,function(){y(javax.swing.event,"AncestorListener",java.util.EventListener)});p("javax.swing");n(["java.lang.Enum"],"javax.swing.ClientPropertyKey",null,function(){c$=t(javax.swing,"ClientPropertyKey",Enum);g(c$,function(){}, +"~B");F(c$,"JComponent_INPUT_VERIFIER",0,[!0]);F(c$,"JComponent_TRANSFER_HANDLER",1,[!0]);F(c$,"JComponent_ANCESTOR_NOTIFIER",2,[!0]);F(c$,"PopupFactory_FORCE_HEAVYWEIGHT_POPUP",3,[!0])});p("javax.swing");n(["java.awt.Dialog","javax.swing.RootPaneContainer","$.WindowConstants"],"javax.swing.JDialog","java.lang.Boolean $.IllegalArgumentException javax.swing.JComponent $.JRootPane $.RepaintManager $.SwingUtilities $.UIManager".split(" "),function(){c$=q(function(){this.defaultCloseOperation=1;this.rootPane= +null;this.rootPaneCheckingEnabled=!1;this.transferHandler=null;k(this,arguments)},javax.swing,"JDialog",java.awt.Dialog,[javax.swing.WindowConstants,javax.swing.RootPaneContainer]);g(c$,function(){this.construct(U("java.awt.Frame"),!1)});g(c$,function(a){this.construct(a,!1)},"java.awt.Frame");g(c$,function(a,b){this.construct(a,null,b)},"java.awt.Frame,~B");g(c$,function(a,b){this.construct(a,b,!1)},"java.awt.Frame,~S");g(c$,function(a,b,c){r(this,javax.swing.JDialog,[null==a?javax.swing.SwingUtilities.getSharedOwnerFrame(): +a,b,c]);null==a&&(a=javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener(),this.addWindowListener(a));this.dialogInit()},"java.awt.Frame,~S,~B");g(c$,function(a,b,c,d){r(this,javax.swing.JDialog,[null==a?javax.swing.SwingUtilities.getSharedOwnerFrame():a,b,c,d]);null==a&&(a=javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener(),this.addWindowListener(a));this.dialogInit()},"java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");g(c$,function(a){this.construct(a,!1)},"java.awt.Dialog"); +g(c$,function(a,b){this.construct(a,null,b)},"java.awt.Dialog,~B");g(c$,function(a,b){this.construct(a,b,!1)},"java.awt.Dialog,~S");g(c$,function(a,b,c){r(this,javax.swing.JDialog,[a,b,c]);this.dialogInit()},"java.awt.Dialog,~S,~B");g(c$,function(a,b,c,d){r(this,javax.swing.JDialog,[a,b,c,d]);this.dialogInit()},"java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");g(c$,function(a){this.construct(a,java.awt.Dialog.ModalityType.MODELESS)},"java.awt.Window");g(c$,function(a,b){this.construct(a,null, +b)},"java.awt.Window,java.awt.Dialog.ModalityType");g(c$,function(a,b){this.construct(a,b,java.awt.Dialog.ModalityType.MODELESS)},"java.awt.Window,~S");g(c$,function(a,b,c){r(this,javax.swing.JDialog,[a,b,c]);this.dialogInit()},"java.awt.Window,~S,java.awt.Dialog.ModalityType");g(c$,function(a,b,c,d){r(this,javax.swing.JDialog,[a,b,c,d]);this.dialogInit()},"java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");c(c$,"dialogInit",function(){this.enableEvents(72);this.setLocale(javax.swing.JComponent.getDefaultLocale()); +this.setRootPane(this.createRootPane());this.setRootPaneCheckingEnabled(!0);javax.swing.JDialog.isDefaultLookAndFeelDecorated()&&javax.swing.UIManager.getLookAndFeel().getSupportsWindowDecorations()&&(this.setUndecorated(!0),this.getRootPane().setWindowDecorationStyle(2))});c(c$,"createRootPane",function(){var a=new javax.swing.JRootPane;a.setOpaque(!0);return a});c(c$,"processWindowEvent",function(a){u(this,javax.swing.JDialog,"processWindowEvent",[a]);if(201==a.getID())switch(this.defaultCloseOperation){case 1:this.setVisible(!1); +break;case 2:this.dispose()}},"java.awt.event.WindowEvent");c(c$,"setDefaultCloseOperation",function(a){if(0!=a&&1!=a&&2!=a)throw new IllegalArgumentException("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");var b=this.defaultCloseOperation;this.defaultCloseOperation=a;this.firePropertyChangeInt("defaultCloseOperation",b,a)},"~N");c(c$,"getDefaultCloseOperation",function(){return this.defaultCloseOperation});c(c$,"setTransferHandler",function(a){var b= +this.transferHandler;this.transferHandler=a;javax.swing.SwingUtilities.installSwingDropTargetAsNecessary(this,this.transferHandler);this.firePropertyChangeObject("transferHandler",b,a)},"javax.swing.TransferHandler");c(c$,"getTransferHandler",function(){return this.transferHandler});d(c$,"update",function(a){this.paint(a)},"java.awt.Graphics");c(c$,"setJMenuBar",function(a){this.getRootPane().setMenuBar(a)},"javax.swing.JMenuBar");c(c$,"getJMenuBar",function(){return this.getRootPane().getMenuBar()}); +c(c$,"isRootPaneCheckingEnabled",function(){return this.rootPaneCheckingEnabled});c(c$,"setRootPaneCheckingEnabled",function(a){this.rootPaneCheckingEnabled=a},"~B");d(c$,"addImpl",function(a,b,c){return this.isRootPaneCheckingEnabled()?this.getContentPane().add(a,b,c):this.addImplSAEM(a,b,c)},"java.awt.Component,~O,~N");c(c$,"remove",function(a){a===this.rootPane?this.removeChild(a):this.getContentPane().removeChild(a)},"java.awt.Component");c(c$,"setLayout",function(a){this.isRootPaneCheckingEnabled()? +this.getContentPane().setLayout(a):u(this,javax.swing.JDialog,"setLayout",[a])},"java.awt.LayoutManager");d(c$,"getRootPane",function(){return this.rootPane});c(c$,"setRootPane",function(a){null!=this.rootPane&&this.remove(this.rootPane);this.rootPane=a;if(null!=this.rootPane){a=this.isRootPaneCheckingEnabled();try{this.setRootPaneCheckingEnabled(!1),this.add(this.rootPane,"Center")}finally{this.setRootPaneCheckingEnabled(a)}}},"javax.swing.JRootPane");d(c$,"getContentPane",function(){return this.getRootPane().getContentPane()}); +d(c$,"setContentPane",function(a){this.getRootPane().setContentPane(a)},"java.awt.Container");d(c$,"getLayeredPane",function(){return this.getRootPane().getLayeredPane()});d(c$,"setLayeredPane",function(a){this.getRootPane().setLayeredPane(a)},"javax.swing.JLayeredPane");d(c$,"getGlassPane",function(){return this.getRootPane().getGlassPane()});d(c$,"setGlassPane",function(a){this.getRootPane().setGlassPane(a)},"java.awt.Component");c(c$,"getGraphics",function(){javax.swing.JComponent.getGraphicsInvoked(this); +return u(this,javax.swing.JDialog,"getGraphics",[])});c(c$,"repaint",function(a,b,c,d,f){javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT?javax.swing.RepaintManager.currentManager(this).addDirtyRegion(this,b,c,d,f):u(this,javax.swing.JDialog,"repaint",[a,b,c,d,f])},"~N,~N,~N,~N,~N");c$.setDefaultLookAndFeelDecorated=c(c$,"setDefaultLookAndFeelDecorated",function(a){a?javax.swing.SwingUtilities.appContextPut(javax.swing.JDialog.defaultLookAndFeelDecoratedKey,Boolean.TRUE):javax.swing.SwingUtilities.appContextPut(javax.swing.JDialog.defaultLookAndFeelDecoratedKey, +Boolean.FALSE)},"~B");c$.isDefaultLookAndFeelDecorated=c(c$,"isDefaultLookAndFeelDecorated",function(){var a=javax.swing.SwingUtilities.appContextGet(javax.swing.JDialog.defaultLookAndFeelDecoratedKey);null==a&&(a=Boolean.FALSE);return a.booleanValue()});c(c$,"paramString",function(){var a;a=1==this.defaultCloseOperation?"HIDE_ON_CLOSE":2==this.defaultCloseOperation?"DISPOSE_ON_CLOSE":0==this.defaultCloseOperation?"DO_NOTHING_ON_CLOSE":"";var b=null!=this.rootPane?this.rootPane.toString():"",c=this.rootPaneCheckingEnabled? +"true":"false";return u(this,javax.swing.JDialog,"paramString",[])+",defaultCloseOperation="+a+",rootPane="+b+",rootPaneCheckingEnabled="+c});c$.defaultLookAndFeelDecoratedKey=c$.prototype.defaultLookAndFeelDecoratedKey=new J._O});p("java.awt");n(["java.lang.Enum","java.awt.Window"],"java.awt.Dialog",["java.lang.IllegalArgumentException","java.awt.Frame","$.IllegalComponentStateException"],function(){c$=q(function(){this.resizable=!0;this.modal=this.undecorated=!1;this.title=this.modalityType=null; +this.isInDispose=this.isInHide=!1;k(this,arguments)},java.awt,"Dialog",java.awt.Window);g(c$,function(a){this.construct(a,"",!1)},"java.awt.Frame");g(c$,function(a,b){this.construct(a,"",b)},"java.awt.Frame,~B");g(c$,function(a,b){this.construct(a,b,!1)},"java.awt.Frame,~S");g(c$,function(a,b,c){this.construct(a,b,c?java.awt.Dialog.DEFAULT_MODALITY_TYPE:java.awt.Dialog.ModalityType.MODELESS)},"java.awt.Frame,~S,~B");g(c$,function(a,b,c,d){this.construct(a,b,c?java.awt.Dialog.DEFAULT_MODALITY_TYPE: +java.awt.Dialog.ModalityType.MODELESS,d)},"java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");g(c$,function(a){this.construct(a,"",!1)},"java.awt.Dialog");g(c$,function(a,b){this.construct(a,b,!1)},"java.awt.Dialog,~S");g(c$,function(a,b,c){this.construct(a,b,c?java.awt.Dialog.DEFAULT_MODALITY_TYPE:java.awt.Dialog.ModalityType.MODELESS)},"java.awt.Dialog,~S,~B");g(c$,function(a,b,c,d){this.construct(a,b,c?java.awt.Dialog.DEFAULT_MODALITY_TYPE:java.awt.Dialog.ModalityType.MODELESS,d)},"java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration"); +g(c$,function(a){this.construct(a,null,java.awt.Dialog.ModalityType.MODELESS)},"java.awt.Window");g(c$,function(a,b){this.construct(a,b,java.awt.Dialog.ModalityType.MODELESS)},"java.awt.Window,~S");g(c$,function(a,b){this.construct(a,null,b)},"java.awt.Window,java.awt.Dialog.ModalityType");g(c$,function(a,b,c){r(this,java.awt.Dialog,[a]);if(null!=a&&!j(a,java.awt.Frame)&&!j(a,java.awt.Dialog))throw new IllegalArgumentException("Wrong parent window");this.title=b;this.setModalityType(c)},"java.awt.Window,~S,java.awt.Dialog.ModalityType"); +g(c$,function(a,b,c,d){r(this,java.awt.Dialog,[a,d]);if(null!=a&&!j(a,java.awt.Frame)&&!j(a,java.awt.Dialog))throw new IllegalArgumentException("wrong owner window");this.title=b;this.setModalityType(c)},"java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");d(c$,"constructComponentName",function(){return"dialog"+java.awt.Dialog.$nameCounter++});c(c$,"addNotify",function(){null!=this.parent&&this.parent.addNotify();u(this,java.awt.Dialog,"addNotify",[])});c(c$,"isModal", +function(){return this.isModal_NoClientCode()});c(c$,"isModal_NoClientCode",function(){return this.modalityType!==java.awt.Dialog.ModalityType.MODELESS});c(c$,"setModal",function(a){this.modal=a;this.setModalityType(a?java.awt.Dialog.DEFAULT_MODALITY_TYPE:java.awt.Dialog.ModalityType.MODELESS)},"~B");c(c$,"getModalityType",function(){return this.modalityType});c(c$,"setModalityType",function(a){null==a&&(a=java.awt.Dialog.ModalityType.MODELESS);this.modalityType!==a&&(this.checkModalityPermission(a), +this.modalityType=a,this.modal=this.modalityType!==java.awt.Dialog.ModalityType.MODELESS)},"java.awt.Dialog.ModalityType");c(c$,"getTitle",function(){return this.title});c(c$,"setTitle",function(a){var b=this.title;this.title=a;this.firePropertyChangeObject("title",b,a)},"~S");c(c$,"show",function(){});c(c$,"modalityPushed",function(){});c(c$,"modalityPopped",function(){});c(c$,"interruptBlocking",function(){this.isModal()?this.disposeImpl():null!=this.windowClosingException&&(this.windowClosingException.fillInStackTrace(), +this.windowClosingException.printStackTrace(),this.windowClosingException=null)});c(c$,"hideAndDisposePreHandler",function(){this.isInHide=!0});c(c$,"hideAndDisposeHandler",function(){this.isInHide=!1});c(c$,"hide",function(){this.hideAndDisposePreHandler();u(this,java.awt.Dialog,"hide",[]);this.isInDispose||this.hideAndDisposeHandler()});c(c$,"doDispose",function(){this.isInDispose=!0;u(this,java.awt.Dialog,"doDispose",[]);this.hideAndDisposeHandler();this.isInDispose=!1});c(c$,"isResizable",function(){return this.resizable}); +c(c$,"setResizable",function(a){this.resizable=a},"~B");c(c$,"setUndecorated",function(a){if(this.isDisplayable())throw new java.awt.IllegalComponentStateException("The dialog is displayable.");this.undecorated=a},"~B");c(c$,"isUndecorated",function(){return this.undecorated});c(c$,"paramString",function(){var a=u(this,java.awt.Dialog,"paramString",[])+","+this.modalityType;null!=this.title&&(a+=",title="+this.title);return a});c(c$,"modalShow",function(){});c(c$,"modalHide",function(){});c(c$,"shouldBlock", +function(a){if(!this.isVisible_NoClientCode()||(!a.isVisible_NoClientCode()&&!a.isInShow||this.isInHide||a===this||!this.isModal_NoClientCode())||j(a,java.awt.Dialog)&&a.isInHide)return!1;for(var b=this;null!=b;){for(var c=a;null!=c&&c!==b;)c=c.getParent_NoClientCode();if(c===b)return!1;b=b.getModalBlocker()}switch(this.modalityType){case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:if(a.isModalExcluded(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)){for(c=this;null!=c&&c!==a;)c=c.getParent_NoClientCode(); +return c===a}return this.getDocumentRoot()===a.getDocumentRoot();case java.awt.Dialog.ModalityType.APPLICATION_MODAL:return!a.isModalExcluded(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)&&this.appContext===a.appContext;case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:return!a.isModalExcluded(java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)}return!1},"java.awt.Window");c(c$,"checkModalityPermission",function(){},"java.awt.Dialog.ModalityType");w(self.c$);c$=t(java.awt.Dialog,"ModalityType", +Enum);F(c$,"MODELESS",0,[]);F(c$,"DOCUMENT_MODAL",1,[]);F(c$,"APPLICATION_MODAL",2,[]);F(c$,"TOOLKIT_MODAL",3,[]);c$=v();w(self.c$);c$=t(java.awt.Dialog,"ModalExclusionType",Enum);F(c$,"NO_EXCLUDE",0,[]);F(c$,"APPLICATION_EXCLUDE",1,[]);F(c$,"TOOLKIT_EXCLUDE",2,[]);c$=v();c$.DEFAULT_MODALITY_TYPE=c$.prototype.DEFAULT_MODALITY_TYPE=java.awt.Dialog.ModalityType.APPLICATION_MODAL;x(c$,"$base","dialog","$nameCounter",0)});p("javax.swing");c$=y(javax.swing,"WindowConstants");x(c$,"DO_NOTHING_ON_CLOSE", +0,"HIDE_ON_CLOSE",1,"DISPOSE_ON_CLOSE",2,"EXIT_ON_CLOSE",3);p("javax.swing");n(["java.awt.Frame","javax.swing.RootPaneContainer","$.WindowConstants"],"javax.swing.JFrame","java.lang.Boolean $.IllegalArgumentException javax.swing.JComponent $.JRootPane $.RepaintManager $.SwingUtilities $.UIManager".split(" "),function(){c$=q(function(){this.defaultCloseOperation=1;this.rootPane=this.transferHandler=null;this.rootPaneCheckingEnabled=!1;k(this,arguments)},javax.swing,"JFrame",java.awt.Frame,[javax.swing.WindowConstants, +javax.swing.RootPaneContainer]);g(c$,function(){r(this,javax.swing.JFrame);this.frameInit()});g(c$,function(a){r(this,javax.swing.JFrame,[a]);this.frameInit()},"java.awt.GraphicsConfiguration");g(c$,function(a){r(this,javax.swing.JFrame,[a]);this.frameInit()},"~S");g(c$,function(a,b){r(this,javax.swing.JFrame,[a,b]);this.frameInit()},"~S,java.awt.GraphicsConfiguration");c(c$,"frameInit",function(){this.enableEvents(72);this.setLocale(javax.swing.JComponent.getDefaultLocale());this.setRootPane(this.createRootPane()); +this.setBackground(javax.swing.UIManager.getColor("control"));this.setRootPaneCheckingEnabled(!0);javax.swing.JFrame.isDefaultLookAndFeelDecorated()&&javax.swing.UIManager.getLookAndFeel().getSupportsWindowDecorations()&&(this.setUndecorated(!0),this.getRootPane().setWindowDecorationStyle(1))});c(c$,"createRootPane",function(){var a=new javax.swing.JRootPane;a.setOpaque(!0);return a});c(c$,"processWindowEvent",function(a){u(this,javax.swing.JFrame,"processWindowEvent",[a]);if(201==a.getID())switch(this.defaultCloseOperation){case 1:this.setVisible(!1); +break;case 2:this.dispose();break;case 3:System.exit(0)}},"java.awt.event.WindowEvent");c(c$,"setDefaultCloseOperation",function(a){if(0!=a&&1!=a&&2!=a&&3!=a)throw new IllegalArgumentException("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");if(this.defaultCloseOperation!=a){if(3==a){var b=System.getSecurityManager();null!=b&&b.checkExit(0)}b=this.defaultCloseOperation;this.defaultCloseOperation=a;this.firePropertyChangeInt("defaultCloseOperation", +b,a)}},"~N");c(c$,"getDefaultCloseOperation",function(){return this.defaultCloseOperation});c(c$,"setTransferHandler",function(a){var b=this.transferHandler;this.transferHandler=a;javax.swing.SwingUtilities.installSwingDropTargetAsNecessary(this,this.transferHandler);this.firePropertyChangeObject("transferHandler",b,a)},"javax.swing.TransferHandler");c(c$,"getTransferHandler",function(){return this.transferHandler});d(c$,"update",function(a){this.paint(a)},"java.awt.Graphics");c(c$,"setJMenuBar", +function(a){this.getRootPane().setMenuBar(a)},"javax.swing.JMenuBar");c(c$,"getJMenuBar",function(){return this.getRootPane().getMenuBar()});c(c$,"isRootPaneCheckingEnabled",function(){return this.rootPaneCheckingEnabled});c(c$,"setRootPaneCheckingEnabled",function(a){this.rootPaneCheckingEnabled=a},"~B");d(c$,"addImpl",function(a,b,c){return this.isRootPaneCheckingEnabled()?this.getContentPane().add(a,b,c):this.addImplSAEM(a,b,c)},"java.awt.Component,~O,~N");c(c$,"remove",function(a){a===this.rootPane? +this.removeChild(a):this.getContentPane().removeChild(a)},"java.awt.Component");c(c$,"setLayout",function(a){this.isRootPaneCheckingEnabled()?this.getContentPane().setLayout(a):u(this,javax.swing.JFrame,"setLayout",[a])},"java.awt.LayoutManager");d(c$,"getRootPane",function(){return this.rootPane});c(c$,"setRootPane",function(a){null!=this.rootPane&&this.remove(this.rootPane);this.rootPane=a;if(null!=this.rootPane){a=this.isRootPaneCheckingEnabled();try{this.setRootPaneCheckingEnabled(!1),this.add(this.rootPane, +"Center")}finally{this.setRootPaneCheckingEnabled(a)}}},"javax.swing.JRootPane");d(c$,"getContentPane",function(){return this.getRootPane().getContentPane()});d(c$,"setContentPane",function(a){this.getRootPane().setContentPane(a)},"java.awt.Container");d(c$,"getLayeredPane",function(){return this.getRootPane().getLayeredPane()});d(c$,"setLayeredPane",function(a){this.getRootPane().setLayeredPane(a)},"javax.swing.JLayeredPane");d(c$,"getGlassPane",function(){return this.getRootPane().getGlassPane()}); +d(c$,"setGlassPane",function(a){this.getRootPane().setGlassPane(a)},"java.awt.Component");c(c$,"getGraphics",function(){javax.swing.JComponent.getGraphicsInvoked(this);return u(this,javax.swing.JFrame,"getGraphics",[])});c(c$,"repaint",function(a,b,c,d,f){javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT?javax.swing.RepaintManager.currentManager(this).addDirtyRegion(this,b,c,d,f):u(this,javax.swing.JFrame,"repaint",[a,b,c,d,f])},"~N,~N,~N,~N,~N");c$.setDefaultLookAndFeelDecorated=c(c$,"setDefaultLookAndFeelDecorated", +function(a){a?javax.swing.SwingUtilities.appContextPut(javax.swing.JFrame.defaultLookAndFeelDecoratedKey,Boolean.TRUE):javax.swing.SwingUtilities.appContextPut(javax.swing.JFrame.defaultLookAndFeelDecoratedKey,Boolean.FALSE)},"~B");c$.isDefaultLookAndFeelDecorated=c(c$,"isDefaultLookAndFeelDecorated",function(){var a=javax.swing.SwingUtilities.appContextGet(javax.swing.JFrame.defaultLookAndFeelDecoratedKey);null==a&&(a=Boolean.FALSE);return a.booleanValue()});c(c$,"paramString",function(){var a;a= +1==this.defaultCloseOperation?"HIDE_ON_CLOSE":2==this.defaultCloseOperation?"DISPOSE_ON_CLOSE":0==this.defaultCloseOperation?"DO_NOTHING_ON_CLOSE":3==this.defaultCloseOperation?"EXIT_ON_CLOSE":"";var b=null!=this.rootPane?this.rootPane.toString():"",c=this.rootPaneCheckingEnabled?"true":"false";return u(this,javax.swing.JFrame,"paramString",[])+",defaultCloseOperation="+a+",rootPane="+b+",rootPaneCheckingEnabled="+c});x(c$,"EXIT_ON_CLOSE",3);c$.defaultLookAndFeelDecoratedKey=c$.prototype.defaultLookAndFeelDecoratedKey= +new J._O});p("javax.swing");n(["java.awt.Window","javax.swing.RootPaneContainer"],"javax.swing.JWindow",["javax.swing.JComponent","$.JRootPane","$.RepaintManager","$.SwingUtilities"],function(){c$=q(function(){this.rootPane=null;this.rootPaneCheckingEnabled=!1;this.transferHandler=null;k(this,arguments)},javax.swing,"JWindow",java.awt.Window,javax.swing.RootPaneContainer);g(c$,function(){this.construct(U("java.awt.Frame"))});g(c$,function(a){this.construct(null,a);u(this,javax.swing.JWindow,"setFocusableWindowState", +[!1])},"java.awt.GraphicsConfiguration");g(c$,function(a){r(this,javax.swing.JWindow,[null==a?javax.swing.SwingUtilities.getSharedOwnerFrame():a]);null==a&&(a=javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener(),this.addWindowListener(a));this.windowInit()},"java.awt.Frame");g(c$,function(a){r(this,javax.swing.JWindow,[null==a?javax.swing.SwingUtilities.getSharedOwnerFrame():a]);null==a&&(a=javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener(),this.addWindowListener(a));this.windowInit()}, +"java.awt.Window");g(c$,function(a,b){r(this,javax.swing.JWindow,[null==a?javax.swing.SwingUtilities.getSharedOwnerFrame():a,b]);if(null==a){var c=javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener();this.addWindowListener(c)}this.windowInit()},"java.awt.Window,java.awt.GraphicsConfiguration");c(c$,"windowInit",function(){this.setLocale(javax.swing.JComponent.getDefaultLocale());this.setRootPane(this.createRootPane());this.setRootPaneCheckingEnabled(!0)});c(c$,"createRootPane",function(){var a= +new javax.swing.JRootPane;a.setOpaque(!0);return a});c(c$,"isRootPaneCheckingEnabled",function(){return this.rootPaneCheckingEnabled});c(c$,"setTransferHandler",function(a){var b=this.transferHandler;this.transferHandler=a;javax.swing.SwingUtilities.installSwingDropTargetAsNecessary(this,this.transferHandler);this.firePropertyChangeObject("transferHandler",b,a)},"javax.swing.TransferHandler");c(c$,"getTransferHandler",function(){return this.transferHandler});d(c$,"update",function(a){this.paint(a)}, +"java.awt.Graphics");c(c$,"setRootPaneCheckingEnabled",function(a){this.rootPaneCheckingEnabled=a},"~B");d(c$,"addImpl",function(a,b,c){return this.isRootPaneCheckingEnabled()?this.getContentPane().add(a,b,c):this.addImplSAEM(a,b,c)},"java.awt.Component,~O,~N");c(c$,"remove",function(a){a===this.rootPane?this.removeChild(a):this.getContentPane().removeChild(a)},"java.awt.Component");c(c$,"setLayout",function(a){this.isRootPaneCheckingEnabled()?this.getContentPane().setLayout(a):u(this,javax.swing.JWindow, +"setLayout",[a])},"java.awt.LayoutManager");d(c$,"getRootPane",function(){return this.rootPane});c(c$,"setRootPane",function(a){null!=this.rootPane&&this.remove(this.rootPane);this.rootPane=a;if(null!=this.rootPane){a=this.isRootPaneCheckingEnabled();try{this.setRootPaneCheckingEnabled(!1),this.add(this.rootPane,"Center")}finally{this.setRootPaneCheckingEnabled(a)}}},"javax.swing.JRootPane");d(c$,"getContentPane",function(){return this.getRootPane().getContentPane()});d(c$,"setContentPane",function(a){this.getRootPane().setContentPane(a)}, +"java.awt.Container");d(c$,"getLayeredPane",function(){return this.getRootPane().getLayeredPane()});d(c$,"setLayeredPane",function(a){this.getRootPane().setLayeredPane(a)},"javax.swing.JLayeredPane");d(c$,"getGlassPane",function(){return this.getRootPane().getGlassPane()});d(c$,"setGlassPane",function(a){this.getRootPane().setGlassPane(a)},"java.awt.Component");c(c$,"getGraphics",function(){javax.swing.JComponent.getGraphicsInvoked(this);return u(this,javax.swing.JWindow,"getGraphics",[])});c(c$, +"repaint",function(a,b,c,d,f){javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT?javax.swing.RepaintManager.currentManager(this).addDirtyRegion(this,b,c,d,f):u(this,javax.swing.JWindow,"repaint",[a,b,c,d,f])},"~N,~N,~N,~N,~N");c(c$,"paramString",function(){var a=this.rootPaneCheckingEnabled?"true":"false";return u(this,javax.swing.JWindow,"paramString",[])+",rootPaneCheckingEnabled="+a})});p("javax.swing");n(["java.util.Hashtable"],"javax.swing.KeyboardManager","java.lang.Thread java.util.Vector java.applet.Applet java.awt.Window javax.swing.JComponent $.JMenuBar $.KeyStroke".split(" "), +function(){c$=q(function(){this.componentKeyStrokeMap=this.containerMap=null;C("javax.swing.KeyboardManager.ComponentKeyStrokePair")||javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$();k(this,arguments)},javax.swing,"KeyboardManager");I(c$,function(){this.containerMap=new java.util.Hashtable;this.componentKeyStrokeMap=new java.util.Hashtable});c$.getCurrentManager=c(c$,"getCurrentManager",function(){return javax.swing.KeyboardManager.currentManager});c$.setCurrentManager=c(c$, +"setCurrentManager",function(a){javax.swing.KeyboardManager.currentManager=a},"javax.swing.KeyboardManager");c(c$,"registerKeyStroke",function(a,b){var c=javax.swing.KeyboardManager.getTopAncestor(b);if(null!=c){var d=this.containerMap.get(c);null==d&&(d=this.registerNewTopContainer(c));var f=d.get(a);if(null==f)d.put(a,b);else if(j(f,java.util.Vector)){var g=f;g.contains(b)||g.addElement(b)}else j(f,javax.swing.JComponent)?f!==b&&(g=new java.util.Vector,g.addElement(f),g.addElement(b),d.put(a,g)): +(System.out.println("Unexpected condition in registerKeyStroke"),Thread.dumpStack());this.componentKeyStrokeMap.put(D(javax.swing.KeyboardManager.ComponentKeyStrokePair,this,null,b,a),c)}},"javax.swing.KeyStroke,javax.swing.JComponent");c$.getTopAncestor=c(c$,"getTopAncestor",function(a){for(a=a.getParent();null!=a;a=a.getParent())if(j(a,java.awt.Window)&&a.isFocusableWindow()||j(a,java.applet.Applet))return a;return null},"javax.swing.JComponent");c(c$,"unregisterKeyStroke",function(a,b){var c=D(javax.swing.KeyboardManager.ComponentKeyStrokePair, +this,null,b,a),d=this.componentKeyStrokeMap.get(c);if(null!=d){var f=this.containerMap.get(d);if(null==f)Thread.dumpStack();else{var g=f.get(a);null==g?Thread.dumpStack():(j(g,javax.swing.JComponent)&&g===b?f.remove(a):j(g,java.util.Vector)&&(g.removeElement(b),g.isEmpty()&&f.remove(a)),f.isEmpty()&&this.containerMap.remove(d),this.componentKeyStrokeMap.remove(c))}}},"javax.swing.KeyStroke,javax.swing.JComponent");c(c$,"fireKeyboardAction",function(a,b,c){a.isConsumed()&&(System.out.println("Aquired pre-used event!"), +Thread.dumpStack());var d;d=400==a.getID()?javax.swing.KeyStroke.getKeyStroke(a.getKeyChar()):javax.swing.KeyStroke.getKeyStroke(a.getKeyCode(),a.getModifiers(),!b);c=this.containerMap.get(c);if(null!=c){var f=c.get(d);if(null!=f)if(j(f,javax.swing.JComponent))f.isShowing()&&f.isEnabled()&&this.fireBinding(f,d,a,b);else if(j(f,java.util.Vector))for(var g=f,k=g.size()-1;0<=k;k--){if(f=g.elementAt(k),f.isShowing()&&f.isEnabled()&&(this.fireBinding(f,d,a,b),a.isConsumed()))return!0}else System.out.println("Unexpected condition in fireKeyboardAction "+ +f),Thread.dumpStack()}if(a.isConsumed())return!0;if(null!=c&&(g=c.get(javax.swing.JMenuBar),null!=g))for(c=g.elements();c.hasMoreElements();)if(f=c.nextElement(),f.isShowing()&&f.isEnabled()&&(this.fireBinding(f,d,a,b),a.isConsumed()))return!0;return a.isConsumed()},"java.awt.event.KeyEvent,~B,java.awt.Container");c(c$,"fireBinding",function(a,b,c,d){a.processKeyBinding(b,c,2,d)&&c.consume()},"javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B");c(c$,"registerMenuBar",function(a){var b= +javax.swing.KeyboardManager.getTopAncestor(a);if(null!=b){var c=this.containerMap.get(b);null==c&&(c=this.registerNewTopContainer(b));b=c.get(javax.swing.JMenuBar);null==b&&(b=new java.util.Vector,c.put(javax.swing.JMenuBar,b));b.contains(a)||b.addElement(a)}},"javax.swing.JMenuBar");c(c$,"unregisterMenuBar",function(a){var b=javax.swing.KeyboardManager.getTopAncestor(a);if(null!=b){var c=this.containerMap.get(b);if(null!=c){var d=c.get(javax.swing.JMenuBar);null!=d&&(d.removeElement(a),d.isEmpty()&& +(c.remove(javax.swing.JMenuBar),c.isEmpty()&&this.containerMap.remove(b)))}}},"javax.swing.JMenuBar");c(c$,"registerNewTopContainer",function(a){var b=new java.util.Hashtable;this.containerMap.put(a,b);return b},"java.awt.Container");c$.$KeyboardManager$ComponentKeyStrokePair$=function(){w(self.c$);c$=q(function(){K(this,arguments);this.keyStroke=this.component=null;k(this,arguments)},javax.swing.KeyboardManager,"ComponentKeyStrokePair");g(c$,function(a,b){this.component=a;this.keyStroke=b},"~O,~O"); +c(c$,"equals",function(a){return!j(a,javax.swing.KeyboardManager.ComponentKeyStrokePair)?!1:this.component.equals(a.component)&&this.keyStroke.equals(a.keyStroke)},"~O");c(c$,"hashCode",function(){return this.component.hashCode()*this.keyStroke.hashCode()});c$=v()};c$.currentManager=c$.prototype.currentManager=new javax.swing.KeyboardManager});p("javax.swing");n(["javax.swing.JComponent","$.MenuElement"],"javax.swing.JMenuBar","java.lang.Error java.util.Vector java.awt.Insets javax.swing.DefaultSingleSelectionModel $.JMenu $.JPopupMenu $.KeyboardManager $.UIManager".split(" "), +function(){c$=q(function(){this.selectionModel=null;this.$paintBorder=!0;this.margin=null;k(this,arguments)},javax.swing,"JMenuBar",javax.swing.JComponent,javax.swing.MenuElement);g(c$,function(){r(this,javax.swing.JMenuBar);this.setSelectionModel(new javax.swing.DefaultSingleSelectionModel);this.updateUI()});d(c$,"getUI",function(){return this.ui});d(c$,"updateUI",function(){this.setUI(javax.swing.UIManager.getUI(this))});d(c$,"getUIClassID",function(){return"MenuBarUI"});c(c$,"getSelectionModel", +function(){return this.selectionModel});c(c$,"setSelectionModel",function(a){var b=this.selectionModel;this.selectionModel=a;this.firePropertyChangeObject("selectionModel",b,this.selectionModel)},"javax.swing.SingleSelectionModel");c(c$,"add",function(a){u(this,javax.swing.JMenuBar,"add",[a]);return a},"javax.swing.JMenu");c(c$,"getMenu",function(a){a=this.getComponentAtIndex(a);return j(a,javax.swing.JMenu)?a:null},"~N");c(c$,"getMenuCount",function(){return this.getComponentCount()});c(c$,"setHelpMenu", +function(){throw Error("setHelpMenu() not yet implemented.");},"javax.swing.JMenu");c(c$,"getHelpMenu",function(){throw Error("getHelpMenu() not yet implemented.");});c(c$,"getComponentAtIndex",function(a){return 0>a||a>=this.getComponentCount()?null:this.getComponent(a)},"~N");c(c$,"getComponentIndex",function(a){for(var b=this.getComponentCount(),c=this.getComponents(),d=0;d=k.width+k.x&&k.width-d.width<2*(c.x-k.x)&&(a=0-b-f.width)):(a=0-b-f.width,c.x+a2*(c.x-k.x)&&(a=d.width+b)),b=g,c.y+b+f.height>=k.height+k.y&&k.height-d.height<2*(c.y-k.y)&&(b=d.height-g-f.height)):(b=javax.swing.UIManager.getInt("Menu.menuPopupOffsetX"),g=javax.swing.UIManager.getInt("Menu.menuPopupOffsetY"),javax.swing.SwingUtilities.isLeftToRight(this)? +(a=b,c.x+a+f.width>=k.width+k.x&&k.width-d.width<2*(c.x-k.x)&&(a=d.width-b-f.width)):(a=d.width-b-f.width,c.x+a2*(c.x-k.x)&&(a=b)),b=d.height+g,c.y+b+f.height>=k.height&&k.height-d.height<2*(c.y-k.y)&&(b=0-g-f.height));return new java.awt.Point(a,b)});c(c$,"getDelay",function(){return this.delay});c(c$,"setDelay",function(a){if(0>a)throw new IllegalArgumentException("Delay must be a positive integer");this.delay=a},"~N");c(c$,"ensurePopupMenuCreated",function(){null==this.$popupMenu&& +(this.$popupMenu=new javax.swing.JPopupMenu,this.$popupMenu.setInvoker(this),this.popupListener=this.createWinListener(this.$popupMenu))});c(c$,"getCustomMenuLocation",function(){return this.customMenuLocation});c(c$,"setMenuLocation",function(a,b){this.customMenuLocation=new java.awt.Point(a,b);null!=this.$popupMenu&&this.$popupMenu.setLocation(a,b)},"~N,~N");c(c$,"add",function(a){this.ensurePopupMenuCreated();return this.$popupMenu.add(a)},"javax.swing.JMenuItem");c(c$,"add",function(a){this.ensurePopupMenuCreated(); +this.$popupMenu.add(a);return a},"java.awt.Component");c(c$,"add",function(a,b){this.ensurePopupMenuCreated();this.$popupMenu.add(a,b);return a},"java.awt.Component,~N");c(c$,"add",function(a){return this.add(new javax.swing.JMenuItem(a))},"~S");c(c$,"add",function(a){var b=this.createActionComponent(a);b.setAction(a);this.add(b);return b},"javax.swing.Action");c(c$,"createActionComponent",function(){var a=(C("javax.swing.JMenu$1")?0:javax.swing.JMenu.$JMenu$1$(),D(javax.swing.JMenu$1,this,null)); +a.setHorizontalTextPosition(11);a.setVerticalTextPosition(0);return a},"javax.swing.Action");c(c$,"createActionChangeListener",function(a){return a.createActionPropertyChangeListener0(a.getAction())},"javax.swing.JMenuItem");c(c$,"addSeparator",function(){this.ensurePopupMenuCreated();this.$popupMenu.addSeparator()});c(c$,"insert",function(a,b){if(0>b)throw new IllegalArgumentException("index less than zero.");this.ensurePopupMenuCreated();this.$popupMenu.insert(new javax.swing.JMenuItem(a),b)},"~S,~N"); +c(c$,"insert",function(a,b){if(0>b)throw new IllegalArgumentException("index less than zero.");this.ensurePopupMenuCreated();this.$popupMenu.insert(a,b);return a},"javax.swing.JMenuItem,~N");c(c$,"insert",function(a,b){if(0>b)throw new IllegalArgumentException("index less than zero.");this.ensurePopupMenuCreated();var c=new javax.swing.JMenuItem(a);c.setHorizontalTextPosition(11);c.setVerticalTextPosition(0);this.$popupMenu.insert(c,b);return c},"javax.swing.Action,~N");c(c$,"insertSeparator",function(a){if(0> +a)throw new IllegalArgumentException("index less than zero.");this.ensurePopupMenuCreated();this.$popupMenu.insert(new javax.swing.JPopupMenu.Separator,a)},"~N");c(c$,"getItem",function(a){if(0>a)throw new IllegalArgumentException("index less than zero.");a=this.getMenuComponent(a);return j(a,javax.swing.JMenuItem)?a:null},"~N");c(c$,"getItemCount",function(){return this.getMenuComponentCount()});c(c$,"isTearOff",function(){throw Error("boolean isTearOff() {} not yet implemented");});c(c$,"remove", +function(a){if(0>a)throw new IllegalArgumentException("index less than zero.");if(a>this.getItemCount())throw new IllegalArgumentException("index greater than the number of items.");null!=this.$popupMenu&&this.$popupMenu.remove(a)},"~N");c(c$,"remove",function(a){j(a,javax.swing.JMenuItem)&&null!=this.$popupMenu&&this.$popupMenu.remove(a);null!=this.$popupMenu&&this.$popupMenu.remove(a)},"java.awt.Component");c(c$,"removeAll",function(){null!=this.$popupMenu&&this.$popupMenu.removeAll()});c(c$,"getMenuComponentCount", +function(){var a=0;null!=this.$popupMenu&&(a=this.$popupMenu.getComponentCount());return a});c(c$,"getMenuComponent",function(a){return null!=this.$popupMenu?this.$popupMenu.getComponent(a):null},"~N");c(c$,"getMenuComponents",function(){return null!=this.$popupMenu?this.$popupMenu.getComponents():[]});c(c$,"isTopLevelMenu",function(){return j(this.getParent(),javax.swing.JMenuBar)?!0:!1});c(c$,"isMenuComponent",function(a){if(a===this)return!0;if(j(a,javax.swing.JPopupMenu)){var b;if(a===this.getPopupMenu())return!0}for(var c= +this.getMenuComponentCount(),d=this.getMenuComponents(),f=0;fa)throw new IllegalArgumentException("index less than zero.");if(a>this.getComponentCount()-1)throw new IllegalArgumentException("index greater than the number of items.");u(this,javax.swing.JPopupMenu,"remove",[a])},"~N");c(c$,"setLightWeightPopupEnabled",function(a){this.lightWeightPopup=a},"~B");c(c$,"isLightWeightPopupEnabled",function(){return this.lightWeightPopup});c(c$,"getLabel",function(){return this.label});c(c$,"setLabel",function(a){var b=this.label;this.label= +a;this.firePropertyChangeObject("label",b,a);this.invalidate();this.repaint()},"~S");c(c$,"addSeparator",function(){this.add(new javax.swing.JPopupMenu.Separator)});c(c$,"insert",function(a,b){var c=this.createActionComponent(a);c.setAction(a);this.insert(c,b)},"javax.swing.Action,~N");c(c$,"insert",function(a,b){if(0>b)throw new IllegalArgumentException("index less than zero.");for(var c=this.getComponentCount(),d=new java.util.Vector,f=b;fb&&(b=-2147483648),2147483647c&&(c=-2147483648));this.setLocation(b,c);this.setVisible(!0)},"java.awt.Component,~N,~N"); +c(c$,"getRootPopupMenu",function(){for(var a=this;null!=a&&!0!=a.isPopupMenu()&&null!=a.getInvoker()&&null!=a.getInvoker().getParent()&&j(a.getInvoker().getParent(),javax.swing.JPopupMenu);)a=a.getInvoker().getParent();return a});c(c$,"getComponentAtIndex",function(a){return this.getComponent(a)},"~N");c(c$,"getComponentIndex",function(a){for(var b=this.getComponentCount(),c=this.getComponents(),d=0;d=f;b--)c=this.selection.elementAt(b),this.selection.removeElementAt(b),c.menuSelectionChanged(!1);b=f;for(c=a.length;bv.length||v[v.length-2]!==t[f+1]))q=v[v.length-1].getComponent(),q=new java.awt.event.MouseEvent(q,505,a.getWhen(),a.getModifiers(),d.x,d.y,a.getXOnScreen(),a.getYOnScreen(),a.getClickCount(),a.isPopupTrigger(),0),v[v.length-1].processMouseEvent(q,t,this),v=new java.awt.event.MouseEvent(n,504,a.getWhen(),a.getModifiers(),d.x,d.y,a.getXOnScreen(),a.getYOnScreen(),a.getClickCount(),a.isPopupTrigger(),0),r[g].processMouseEvent(v,t,this);n=new java.awt.event.MouseEvent(n,a.getID(),a.getWhen(),a.getModifiers(), +d.x,d.y,a.getXOnScreen(),a.getYOnScreen(),a.getClickCount(),a.isPopupTrigger(),0);r[g].processMouseEvent(n,t,this);v=!0;a.consume()}}}},"java.awt.event.MouseEvent");c(c$,"componentForPoint",function(a,b){var c,d,f,g,k,n,p,q,r,t;javax.swing.SwingUtilities.convertPointToScreen(b,a);c=b.x;d=b.y;t=this.selection.clone();for(f=t.size()-1;0<=f;f--){g=t.elementAt(f);r=g.getSubElements();g=0;for(k=r.length;gc)){for(var d=c-1;0<=d;d--)for(var f=b[d].getSubElements(),c=null,g=0;gb.size()?b.add(a):a._dispose())},"javax.swing.PopupFactory.HeavyWeightPopup");c(c$,"hide",function(){u(this,javax.swing.PopupFactory.HeavyWeightPopup,"hide",[]);javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup(this)});c(c$,"dispose",function(){});c(c$,"_dispose",function(){u(this, +javax.swing.PopupFactory.HeavyWeightPopup,"dispose",[])});c$.$PopupFactory$HeavyWeightPopup$1$=function(){w(self.c$);c$=G(javax.swing,"PopupFactory$HeavyWeightPopup$1",java.awt.event.WindowAdapter);d(c$,"windowClosed",function(){var a,b=javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache();a=b.remove(this.f$.e);if(null!=a)for(b=a.size()-1;0<=b;b--)a.get(b)._dispose()},"java.awt.event.WindowEvent");c$=v()};c$.heavyWeightPopupCacheKey=c$.prototype.heavyWeightPopupCacheKey=new J._O;c$= +v();w(self.c$);c$=q(function(){this.owner=null;this.y=this.x=0;k(this,arguments)},javax.swing.PopupFactory,"ContainerPopup",javax.swing.Popup);d(c$,"hide",function(){var a=this.getComponent();if(null!=a){var b=a.getParent();if(null!=b){var c=a.getBounds();b.remove(a);b.repaint(c.x,c.y,c.width,c.height)}}this.owner=null});d(c$,"pack",function(){var a=this.getComponent();null!=a&&a.setSize(a.getPreferredSize())});c(c$,"reset",function(a,b,c,d){if(j(a,javax.swing.JFrame)||j(a,javax.swing.JDialog)||j(a, +javax.swing.JWindow))a=a.getLayeredPane();u(this,javax.swing.PopupFactory.ContainerPopup,"reset",[a,b,c,d]);this.x=c;this.y=d;this.owner=a},"java.awt.Component,java.awt.Component,~N,~N");c(c$,"overlappedByOwnedWindow",function(){var a=this.getComponent();if(null!=this.owner&&null!=a){var b=javax.swing.SwingUtilities.getWindowAncestor(this.owner);if(null==b)return!1;b=b.getOwnedWindows();if(null!=b)for(var a=a.getBounds(),c=0;cb.size()&&b.add(a)},"javax.swing.PopupFactory.MediumWeightPopup"); +c$.getRecycledMediumWeightPopup=c(c$,"getRecycledMediumWeightPopup",function(){var a=javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache();if(0b||0>c)throw new IllegalArgumentException("Width and height must be >= 0");return-1},"java.awt.Component,~N,~N");c(c$,"getBaselineResizeBehavior",function(a){if(null==a)throw new NullPointerException("Component must be non-null");return java.awt.Component.BaselineResizeBehavior.OTHER},"java.awt.Component");c$.isLeftToRight=c(c$,"isLeftToRight",function(a){return a.getComponentOrientation().isLeftToRight()},"java.awt.Component")});p("jssun.awt");n(["java.awt.event.InvocationEvent"], +"jssun.awt.PeerEvent",null,function(){c$=q(function(){this.flags=0;k(this,arguments)},jssun.awt,"PeerEvent",java.awt.event.InvocationEvent);g(c$,function(a,b,c){this.construct(a,b,null,!1,c)},"~O,Runnable,~N");g(c$,function(a,b,c,d,f){r(this,jssun.awt.PeerEvent,[a,b,c,d]);this.flags=f},"~O,Runnable,~O,~B,~N");c(c$,"getFlags",function(){return this.flags});c(c$,"coalesceEvents",function(){return null},"jssun.awt.PeerEvent");x(c$,"PRIORITY_EVENT",1,"ULTIMATE_PRIORITY_EVENT",2,"LOW_PRIORITY_EVENT",4)}); +p("jssun.awt.image");n(["jssun.awt.image.InputStreamImageSource"],"jssun.awt.image.URLImageSource",["java.net.URL"],function(){c$=q(function(){this.actualHost=this.conn=this.url=null;this.actualPort=0;k(this,arguments)},jssun.awt.image,"URLImageSource",jssun.awt.image.InputStreamImageSource);g(c$,function(a){r(this,jssun.awt.image.URLImageSource,[]);this.url=a},"java.net.URL");g(c$,function(a){this.construct(new java.net.URL(null,a))},"~S");g(c$,function(a,b){this.construct(a);this.conn=b},"java.net.URL,java.net.URLConnection"); +g(c$,function(a){this.construct(a.getURL(),a)},"java.net.URLConnection");d(c$,"checkSecurity",function(a,b){if(null!=this.actualHost)try{var c=System.getSecurityManager();null!=c&&c.checkConnect(this.actualHost,this.actualPort,a)}catch(d){if(z(d,SecurityException)){if(!b)throw d;return!1}throw d;}return!0},"~O,~B");c(c$,"getDecoder",function(){return null})});p("jssun.awt.image");n(["java.awt.image.ImageProducer","jssun.awt.image.ImageFetchable"],"jssun.awt.image.InputStreamImageSource",["java.lang.SecurityException", +"$.Thread","jssun.awt.image.ImageConsumerQueue","$.ImageFetcher"],function(){c$=q(function(){this.decoders=this.decoder=this.consumers=null;this.awaitingFetch=!1;k(this,arguments)},jssun.awt.image,"InputStreamImageSource",null,[java.awt.image.ImageProducer,jssun.awt.image.ImageFetchable]);c(c$,"countConsumers",function(a){for(var b=0;null!=a;)b++,a=a.next;return b},"jssun.awt.image.ImageConsumerQueue");c(c$,"countConsumers",function(){for(var a=this.decoders,b=this.countConsumers(this.consumers);null!= +a;)b+=this.countConsumers(a.queue),a=a.next;return b});c(c$,"addConsumer",function(a){this.addConsumer(a,!1)},"java.awt.image.ImageConsumer");c(c$,"printQueue",function(a,b){for(;null!=a;)System.out.println(b+a),a=a.next},"jssun.awt.image.ImageConsumerQueue,~S");c(c$,"printQueues",function(a){System.out.println(a+"[ -----------");this.printQueue(this.consumers," ");for(var b=this.decoders;null!=b;b=b.next)System.out.println(" "+b),this.printQueue(b.queue," ");System.out.println("----------- ]"+ +a)},"~S");c(c$,"addConsumer",function(a,b){for(var c=this.decoders;null!=c;c=c.next)if(c.isConsumer(a))return;for(c=this.consumers;null!=c&&c.consumer!==a;)c=c.next;if(null==c)c=new jssun.awt.image.ImageConsumerQueue(this,a),c.next=this.consumers,this.consumers=c;else{if(!c.secure){var d=null,f=System.getSecurityManager();null!=f&&(d=f.getSecurityContext());if(null==c.securityContext)c.securityContext=d;else if(!c.securityContext.equals(d))throw this.errorConsumer(c,!1),new SecurityException("Applets are trading image data!"); +}c.interested=!0}b&&null==this.decoder&&this.startProduction()},"java.awt.image.ImageConsumer,~B");d(c$,"isConsumer",function(a){for(var b=this.decoders;null!=b;b=b.next)if(b.isConsumer(a))return!0;return jssun.awt.image.ImageConsumerQueue.isConsumer(this.consumers,a)},"java.awt.image.ImageConsumer");c(c$,"errorAllConsumers",function(a,b){for(;null!=a;)a.interested&&this.errorConsumer(a,b),a=a.next},"jssun.awt.image.ImageConsumerQueue,~B");c(c$,"errorConsumer",function(a){a.consumer.imageComplete(1); +this.removeConsumer(a.consumer)},"jssun.awt.image.ImageConsumerQueue,~B");d(c$,"removeConsumer",function(a){for(var b=this.decoders;null!=b;b=b.next)b.removeConsumer(a);this.consumers=jssun.awt.image.ImageConsumerQueue.removeConsumer(this.consumers,a,!1)},"java.awt.image.ImageConsumer");c(c$,"startProduction",function(a){this.addConsumer(a,!0)},"java.awt.image.ImageConsumer");c(c$,"startProduction",function(){this.awaitingFetch||(jssun.awt.image.ImageFetcher.add(this),this.awaitingFetch=!0)});d(c$, +"requestTopDownLeftRightResend",function(){},"java.awt.image.ImageConsumer");c(c$,"decoderForType",function(){return null},"java.io.InputStream,~S");c(c$,"getDecoder",function(){return null},"java.io.InputStream");d(c$,"doFetch",function(){if(null==this.consumers)this.awaitingFetch=!1;else{var a=this.getDecoder();if(null==a)this.badDecoder();else{this.setDecoder(a);try{a.produceImage()}catch(b){if(z(b,java.io.IOException))b.printStackTrace();else if(z(b,jssun.awt.image.ImageFormatException))b.printStackTrace(); +else throw b;}finally{this.removeDecoder(a),Thread.currentThread().isInterrupted()||!Thread.currentThread().isAlive()?this.errorAllConsumers(a.queue,!0):this.errorAllConsumers(a.queue,!1)}}}});c(c$,"badDecoder",function(){var a;a=this.consumers;this.consumers=null;this.awaitingFetch=!1;this.errorAllConsumers(a,!1)});c(c$,"setDecoder",function(a){a.next=this.decoders;this.decoder=this.decoders=a;a.queue=this.consumers;this.consumers=null;this.awaitingFetch=!1},"jssun.awt.image.ImageDecoder");c(c$, +"removeDecoder",function(a){this.doneDecoding(a);for(var b=null,c=this.decoders;null!=c;c=c.next){if(c===a){null==b?this.decoders=c.next:b.next=c.next;break}b=c}},"jssun.awt.image.ImageDecoder");c(c$,"doneDecoding",function(a){this.decoder===a&&(this.decoder=null,null!=this.consumers&&this.startProduction())},"jssun.awt.image.ImageDecoder");c(c$,"latchConsumers",function(a){this.doneDecoding(a)},"jssun.awt.image.ImageDecoder");c(c$,"flush",function(){this.decoder=null})});p("java.awt.image");y(java.awt.image, +"ImageProducer");p("jssun.awt.image");y(jssun.awt.image,"ImageFetchable");p("jssun.awt.image");c$=q(function(){this.consumer=this.next=null;this.interested=!1;this.securityContext=null;this.secure=!1;k(this,arguments)},jssun.awt.image,"ImageConsumerQueue");c$.removeConsumer=c(c$,"removeConsumer",function(a,b,c){for(var d=null,f=a;null!=f;f=f.next){if(f.consumer===b){null==d?a=f.next:d.next=f.next;f.interested=c;break}d=f}return a},"jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B"); +c$.isConsumer=c(c$,"isConsumer",function(a,b){for(var c=a;null!=c;c=c.next)if(c.consumer===b)return!0;return!1},"jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer");g(c$,function(a,b){this.consumer=b;this.secure=this.interested=!0},"jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer");d(c$,"toString",function(){return"["+this.consumer+", "+(this.interested?"":"not ")+"interested"+(null!=this.securityContext?", "+this.securityContext:"")+"]"});p("jssun.awt.image");n(["java.lang.Thread", +"$.StringBuffer"],["jssun.awt.image.FetcherInfo","$.ImageFetcher"],["java.util.Vector","jssun.awt.AppContext"],function(){c$=t(jssun.awt.image,"ImageFetcher",Thread);g(c$,function(a,b){r(this,jssun.awt.image.ImageFetcher,[a,"Image Fetcher "+b]);this.setDaemon(!0)},"ThreadGroup,~N");c$.add=c(c$,"add",function(a){var b=jssun.awt.image.FetcherInfo.getFetcherInfo();b.waitList.contains(a)||(b.waitList.addElement(a),0==b.numWaiting&&b.numFetchers=c)return null;try{a.numWaiting++,a.waitList.wait(c-b)}catch(d){if(z(d,InterruptedException))return null;throw d;}finally{a.numWaiting--}}b=a.waitList.elementAt(0);a.waitList.removeElement(b)}return b});d(c$,"run",function(){var a=jssun.awt.image.FetcherInfo.getFetcherInfo();try{this.fetchloop()}catch(b){if(z(b, +Exception))b.printStackTrace();else throw b;}finally{for(var c=Thread.currentThread(),d=0;da.numWaiting&&jssun.awt.image.ImageFetcher.createFetchers(a);return}b.setPriority(2);b.setName("Image Animator")});c$.stoppingAnimation=c(c$,"stoppingAnimation",function(a){for(var b= +jssun.awt.image.FetcherInfo.getFetcherInfo(),c=-1,d=0;d> "+a);System.err.println("["+this.length+" elt(s); head = "+(null==this.head?"null":this.head.obj+"")+" tail = "+(null==this.tail?"null":this.tail.obj+""));a=this.head;for(var b=null;null!=a;)System.err.println(" "+a),b=a,a=a.next;b!==this.tail&&System.err.println(" tail != last: "+this.tail+", "+b);System.err.println("]")},"~S");c$=q(function(){this.cursor=this.queue=null;k(this,arguments)},jssun.misc,"FIFOQueueEnumerator",null,java.util.Enumeration); +g(c$,function(a){this.queue=a;this.cursor=a.tail},"jssun.misc.Queue");d(c$,"hasMoreElements",function(){return null!=this.cursor});d(c$,"nextElement",function(){if(null!=this.cursor){var a=this.cursor;this.cursor=this.cursor.prev;return a.obj}throw new java.util.NoSuchElementException("FIFOQueueEnumerator");});c$=q(function(){this.cursor=this.queue=null;k(this,arguments)},jssun.misc,"LIFOQueueEnumerator",null,java.util.Enumeration);g(c$,function(a){this.queue=a;this.cursor=a.head},"jssun.misc.Queue"); +d(c$,"hasMoreElements",function(){return null!=this.cursor});d(c$,"nextElement",function(){if(null!=this.cursor){var a=this.cursor;this.cursor=this.cursor.next;return a.obj}throw new java.util.NoSuchElementException("LIFOQueueEnumerator");});c$=q(function(){this.obj=this.prev=this.next=null;k(this,arguments)},jssun.misc,"QueueElement");g(c$,function(a){this.obj=a},"~O");d(c$,"toString",function(){return"QueueElement[obj="+this.obj+(null==this.prev?" null":" prev")+(null==this.next?" null":" next")+ +"]"})});p("javax.swing.plaf");y(javax.swing.plaf,"UIResource");p("javax.swing.plaf");n(["javax.swing.InputMap","javax.swing.plaf.UIResource"],"javax.swing.plaf.InputMapUIResource",null,function(){c$=t(javax.swing.plaf,"InputMapUIResource",javax.swing.InputMap,javax.swing.plaf.UIResource);g(c$,function(){r(this,javax.swing.plaf.InputMapUIResource,[])})});p("javax.swing.plaf");n(["javax.swing.ActionMap","javax.swing.plaf.UIResource"],"javax.swing.plaf.ActionMapUIResource",null,function(){c$=t(javax.swing.plaf, +"ActionMapUIResource",javax.swing.ActionMap,javax.swing.plaf.UIResource);g(c$,function(){r(this,javax.swing.plaf.ActionMapUIResource,[])})});p("javax.swing.plaf");n(["java.awt.peer.LightweightPeer"],"javax.swing.plaf.ComponentUI",["java.lang.Error","java.awt.Component"],function(){c$=t(javax.swing.plaf,"ComponentUI",null,java.awt.peer.LightweightPeer);g(c$,function(){});c(c$,"installUI",function(){},"javax.swing.JComponent");c(c$,"uninstallUI",function(){},"javax.swing.JComponent");c(c$,"paint",function(){}, +"java.awt.Graphics,javax.swing.JComponent");c(c$,"update",function(){},"java.awt.Graphics,javax.swing.JComponent");c(c$,"getPreferredSize",function(){return null},"javax.swing.JComponent");c(c$,"getMinimumSize",function(a){return this.getPreferredSize(a)},"javax.swing.JComponent");c(c$,"getMaximumSize",function(){return null},"javax.swing.JComponent");c(c$,"contains",function(a,b,c){return a.inside(b,c)},"javax.swing.JComponent,~N,~N");c$.createUI=c(c$,"createUI",function(){throw Error("ComponentUI.createUI not implemented."); +},"javax.swing.JComponent");c(c$,"getBaseline",function(){return-1},"javax.swing.JComponent,~N,~N");c(c$,"getBaselineResizeBehavior",function(){return java.awt.Component.BaselineResizeBehavior.OTHER},"javax.swing.JComponent")});p("javax.swing.plaf");n(["java.awt.Font","javax.swing.plaf.UIResource"],"javax.swing.plaf.FontUIResource",null,function(){c$=t(javax.swing.plaf,"FontUIResource",java.awt.Font,javax.swing.plaf.UIResource)});p("javax.swing.plaf");n(["java.awt.Color","javax.swing.plaf.UIResource"], +"javax.swing.plaf.ColorUIResource",null,function(){c$=t(javax.swing.plaf,"ColorUIResource",java.awt.Color,javax.swing.plaf.UIResource)});p("javax.swing.plaf");n(["javax.swing.ComponentInputMap","javax.swing.plaf.UIResource"],"javax.swing.plaf.ComponentInputMapUIResource",null,function(){c$=t(javax.swing.plaf,"ComponentInputMapUIResource",javax.swing.ComponentInputMap,javax.swing.plaf.UIResource)});p("swingjs.api");y(swingjs.api,"JSFunction");p("swingjs.api");y(swingjs.api,"JSInterface");p("swingjs.api"); +c$=t(swingjs.api,"Interface");c$.getInstanceWithParams=c(c$,"getInstanceWithParams",function(a,b,c){try{return J._4Name(a).getConstructor(b).newInstance(c)}catch(d){if(z(d,Exception))return null;throw d;}},"~S,~A,~A");c$.getInstance=c(c$,"getInstance",function(a,b){try{J._isQuiet=b;System.out.println("swingjs.api.Interface creating instance of "+a);var c=J._4Name(a);J._isQuiet=!1;return null==c?null:c.newInstance()}catch(d){if(z(d,Exception))return System.out.println("Interface.java Error creating instance for "+ +a+": \n"+d),null;throw d;}},"~S,~B");p("swingjs.api");c$=t(swingjs.api,"DOMNode");c$.createElement=c(c$,"createElement",function(a,b){var c=null,c=document.createElement(a);c.id=b;return c},"~S,~S");c$.getParent=c(c$,"getParent",function(a){return a.parentNode},"swingjs.api.DOMNode");c$.remove=c(c$,"remove",function(a){try{var b=a.parentNode;b.removeNode(a)}catch(c){}return b},"swingjs.api.DOMNode");c$.add=c(c$,"add",function(a,b){a&&a.appendChild(b)},"swingjs.api.DOMNode,swingjs.api.DOMNode");c$.getAttr= +c(c$,"getAttr",function(a,b){if(a)return a[b]},"swingjs.api.DOMNode,~S");c(c$,"getStyle",function(a){if(obj)return obj.style[a]},"~S");c$.setAttr=c(c$,"setAttr",function(a,b,c){a[b]="TRUE"==c?!0:c;return a},"swingjs.api.DOMNode,~S,~O");c$.setStyles=c(c$,"setStyles",function(a,b){for(var c=0;cd||0==g)return f=Array(1),f[0]=a,f;for(var j=a.length-g;0<=d&&d +a.charCodeAt(0)?E(this.getWidthsFloat()[a.charCodeAt(0)]):this.stringWidth(""+a)},"~S");c(c$,"charWidth",function(a){return 256>a?E(this.getWidthsFloat()[a]):this.stringWidth(""+String.fromCharCode(a))},"~N");d(c$,"stringWidth",function(a){return E(swingjs.JSToolkit.getStringWidth(null,this.font,a))},"~S");d(c$,"getWidths",function(){if(null!=this.iwidths)return this.iwidths;this.iwidths=H(256,0);this.getWidthsFloat();for(var a=0;256>a;a++)this.iwidths[a]=E(this.widths[a]);return this.iwidths});c(c$, +"getWidthsFloat",function(){if(null!=this.widths)return this.widths;this.widths=M(256,0);for(var a=0;256>a;a++)this.widths[a]=swingjs.JSToolkit.getStringWidth(null,this.font,""+String.fromCharCode(a));return this.widths})});p("swingjs");n(["java.lang.Thread","swingjs.api.JSFunction"],"swingjs.JSThread",null,function(){c$=q(function(){this.isJS=!1;k(this,arguments)},swingjs,"JSThread",Thread,swingjs.api.JSFunction);g(c$,function(a,b){r(this,swingjs.JSThread,[a,b]);this.isJS=!0},"ThreadGroup,~S");d(c$, +"run",function(){this.run1(0)});c(c$,"start",function(){swingjs.JSToolkit.setTimeout(this,1,0)});c(c$,"sleepAndReturn",function(a,b){if(!this.isJS)return Thread.sleep(a),!1;var c=this,d=(C("swingjs.JSThread$1")?0:swingjs.JSThread.$JSThread$1$(),D(swingjs.JSThread$1,this,P("me",c,"state",b)));setTimeout(function(){java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(c,d))},a);return!0},"~N,~N");c$.$JSThread$1$=function(){w(self.c$);c$=G(swingjs,"JSThread$1", +null,Runnable);d(c$,"run",function(){this.f$.me.run1(this.f$.state)});c$=v()};x(c$,"INIT",0,"LOOP",1,"DONE",2)});p("swingjs");n(["java.lang.ThreadGroup"],"swingjs.JSThreadGroup",null,function(){c$=q(function(){this.html5Applet=null;k(this,arguments)},swingjs,"JSThreadGroup",ThreadGroup);c(c$,"setHtmlApplet",function(a){this.html5Applet=a},"swingjs.api.HTML5Applet");c(c$,"getHtmlApplet",function(){return this.html5Applet})});p("swingjs");n(["java.applet.AppletContext","$.AppletStub","java.awt.Panel", +"swingjs.api.JSInterface","java.awt.Dimension"],"swingjs.JSAppletPanel","java.lang.InstantiationException java.net.URL java.awt.BorderLayout $.Font $.Toolkit javax.swing.JApplet jssun.applet.AppletEvent $.AppletEventMulticaster swingjs.JSAppletThread $.JSGraphics2D $.JSMouse $.JSThreadGroup $.JSToolkit $.JSUtil swingjs.api.Interface".split(" "),function(){c$=q(function(){this.appletDocumentBase=this.appletIdiomaBase=this.appletCodeBase=this.fullName=this.html5Applet=this.params=null;this.maximumSize= +2147483647;this.syncId=this.appletName=null;this.async=this.testAsync=!1;this.currentAppletSize=this.defaultAppletSize=this.applet=this.jsgraphics=this.canvas=this.display=this.strJavaVendor=this.strJavaVersion=null;this.status=this.nextStatus=0;this.mouse=this.listeners=null;k(this,arguments)},swingjs,"JSAppletPanel",java.awt.Panel,[java.applet.AppletStub,java.applet.AppletContext,swingjs.api.JSInterface]);I(c$,function(){this.defaultAppletSize=new java.awt.Dimension(10,10);this.currentAppletSize= +new java.awt.Dimension(10,10)});g(c$,function(a){r(this,swingjs.JSAppletPanel,[]);this.setPanel();this.set(a)},"java.util.Hashtable");c(c$,"set",function(a){System.out.println("JSAppletPanel initializing");this.params=a;this.htmlName=swingjs.JSUtil.split(""+this.getParameter("name"),"_object")[0];this.appletName=swingjs.JSUtil.split(this.htmlName+"_","_")[0];this.syncId=this.getParameter("syncId");this.fullName=this.htmlName+"__"+this.syncId+"__";a.put("fullName",this.fullName);var b=a.get("codePath"); +null==b&&(b="../java/");this.appletCodeBase=b.toString();this.appletIdiomaBase=this.appletCodeBase.substring(0,this.appletCodeBase.lastIndexOf("/",this.appletCodeBase.length-2)+1)+"idioma";b=a.get("documentBase");this.appletDocumentBase=null==b?"":b.toString();a.containsKey("maximumSize")&&Math.max(a.get("maximumSize").intValue(),100);this.async=this.testAsync||a.containsKey("async");var b=null,c="?";self.Jmol&&(b=Jmol._applets[this.htmlName.split("_object")[0]],c=Jmol._version);this.html5Applet= +b;this.strJavaVersion=c;this.strJavaVendor="Java2Script/Java 1.6 (HTML5)";this.display=a.get("display");this.threadGroup=new swingjs.JSThreadGroup(this.appletName);this.myThread=new swingjs.JSAppletThread(this,this.threadGroup,this.appletName);this.threadGroup.setHtmlApplet(this.html5Applet);Jmol._applets[this.appletName+"_thread"]=java.lang.Thread.thisThread=this.myThread;this.appContext=swingjs.JSToolkit.createNewAppContext();java.awt.Toolkit.getDefaultToolkit();try{java.net.URL.setURLStreamHandlerFactory(swingjs.api.Interface.getInstance("JU.AjaxURLStreamHandlerFactory", +!1))}catch(d){}System.out.println("JSAppletPanel initialized")},"java.util.Hashtable");c(c$,"start",function(){0==this.status?this.myThread.start():this.showStatus("already started")});c(c$,"addAppletListener",function(a){this.listeners=jssun.applet.AppletEventMulticaster.add(this.listeners,a)},"jssun.applet.AppletListener");c(c$,"removeAppletListener",function(a){this.listeners=jssun.applet.AppletEventMulticaster.remove(this.listeners,a)},"jssun.applet.AppletListener");c(c$,"dispatchAppletEvent", +function(a,b){if(null!=this.listeners){var c=new jssun.applet.AppletEvent(this,a,b);this.listeners.appletStateChanged(c)}},"~N,~O");c(c$,"getCode",function(){return this.getParameter("code")});c(c$,"getCanvas",function(){return null==this.canvas?this.canvas=this.html5Applet._getHtml5Canvas():this.canvas});d(c$,"isActive",function(){return!0});d(c$,"appletResize",function(a,b){var c=new java.awt.Dimension(this.currentAppletSize.width,this.currentAppletSize.height);this.currentAppletSize.width=a;this.currentAppletSize.height= +b;this.applet.setBounds(0,0,this.getWidth(),this.getHeight());this.applet.getRootPane().setBounds(0,0,this.getWidth(),this.getHeight());this.applet.getContentPane().setBounds(0,0,this.getWidth(),this.getHeight());this.applet.getContentPane().revalidate();this.dispatchAppletEvent(51234,c)},"~N,~N");d(c$,"getDocumentBase",function(){try{return new java.net.URL(this.params.get("documentBase"))}catch(a){if(z(a,java.net.MalformedURLException))return null;throw a;}});d(c$,"getCodeBase",function(){try{return new java.net.URL(this.params.get("codePath"))}catch(a){if(z(a, +java.net.MalformedURLException))return null;throw a;}});d(c$,"getParameter",function(a){var b=this.params.get(a);System.out.println("get parameter: "+a+" = "+b);return null==b?null:""+b},"~S");d(c$,"getAppletContext",function(){return this});c(c$,"getHeight",function(){return this.html5Applet._getHeight()});c(c$,"getWidth",function(){return this.html5Applet._getWidth()});c(c$,"setBounds",function(a,b,c,d){this.reshape(a,b,c,d);this.currentAppletSize.width=c;this.currentAppletSize.height=d},"~N,~N,~N,~N"); +d(c$,"getImage",function(){return null},"java.net.URL");d(c$,"getApplet",function(a){var b=null;(b=Jmol._applets[a])&&(b=b._applet);return b},"~S");d(c$,"getApplets",function(){return null});c(c$,"showDocument",function(a){window.open(a.toString())},"java.net.URL");c(c$,"showDocument",function(a,b){window.open(a.toString(),b)},"java.net.URL,~S");c(c$,"showStatus",function(a){swingjs.JSToolkit.log(a);J._LoaderProgressMonitor.showStatus(a,!0)},"~S");d(c$,"cacheFileByName",function(){return 0},"~S,~B"); +d(c$,"cachePut",function(){},"~S,~O");d(c$,"destroy",function(){});d(c$,"getFullName",function(){return this.fullName});d(c$,"openFileAsyncSpecial",function(){},"~S,~N");c(c$,"processMouseEvent",function(a,b,c,d,f){this.getMouse().processEvent(a,b,c,d,f);return!1},"~N,~N,~N,~N,~N");c(c$,"getMouse",function(){return null==this.mouse?this.mouse=new swingjs.JSMouse(this):this.mouse});d(c$,"processTwoPointGesture",function(a){this.getMouse().processTwoPointGesture(a)},"~A");d(c$,"setDisplay",function(a){this.canvas= +a},"swingjs.api.HTML5Canvas");d(c$,"setScreenDimension",function(a,b){this.setGraphics(this.jsgraphics=null);null!=this.applet&&this.applet.resize(a,b)},"~N,~N");d(c$,"setStatusDragDropped",function(){return!1},"~N,~N,~N,~S");d(c$,"startHoverWatcher",function(){},"~B");d(c$,"paint",function(a){this.applet.paint(this.setGraphics(a))},"java.awt.Graphics");c(c$,"setGraphics",function(a){return null==a?this.getGraphics():a},"java.awt.Graphics");d(c$,"getGraphics",function(){null==this.jsgraphics&&(this.jsgraphics= +new swingjs.JSGraphics2D(this.getCanvas()),this.jsgraphics.setWindowParameters(this.getWidth(),this.getHeight()));return this.jsgraphics});c(c$,"showAppletStatus",function(a){this.getAppletContext().showStatus(this.htmlName+" "+a)},"~S");c(c$,"showAppletException",function(a){this.showAppletStatus("error "+(a.getMessage?a.getMessage():a));a.printStackTrace&&a.printStackTrace();this.repaint()},"Throwable");c(c$,"run1",function(a){var b=!1;switch(a){case 0:this.currentAppletSize.width=this.defaultAppletSize.width= +this.getWidth();this.currentAppletSize.height=this.defaultAppletSize.height=this.getHeight();this.setLayout(new java.awt.BorderLayout);this.nextStatus=1;b=!0;break;case 1:switch(this.nextStatus){case 1:if(0!=this.status){this.showAppletStatus("notdisposed");this.status=7;break}System.out.println("JSAppletPanel runloader");this.runLoader();this.nextStatus=2;b=!0;break;case 2:if(1!=this.status&&5!=this.status){this.showAppletStatus("notloaded");break}System.out.println("JSAppletPanel init");this.setFont(new java.awt.Font("Dialog", +0,12));this.applet.resize(this.defaultAppletSize);this.applet.init();this.validate();this.status=2;this.showAppletStatus("initialized");this.nextStatus=3;b=!0;break;case 3:if(2!=this.status&&4!=this.status){this.showAppletStatus("notstarted");this.status=7;break}this.applet.getRootPane().addNotify();System.out.println("JSAppletPanel start"+this.currentAppletSize);this.applet.resize(this.currentAppletSize);this.applet.start();this.status=3;this.showAppletStatus("started");this.nextStatus=35;b=!0;break; +case 35:swingjs.JSToolkit.readyCallback(this.appletName,this.fullName,this.applet,this);break;case 4:3==this.status?(this.status=4,this.applet.setVisible(!1),this.applet.stop(),this.showAppletStatus("stopped")):(this.showAppletStatus("notstopped"),this.status=7);break;case 5:4==this.status||2==this.status?(this.status=5,this.applet.destroy(),this.showAppletStatus("destroyed")):(this.showAppletStatus("notdestroyed"),this.status=7);break;case 75:5==this.status||1==this.status?(this.showAppletStatus("notdisposed"), +this.status=7):(this.status=0,this.removeChild(this.applet),this.applet=null,this.showAppletStatus("disposed"));break;case 6:break;default:System.out.println("unrecognized JSAppletPanel status: "+this.nextStatus)}break;default:System.out.println("unrecognized JSAppletThread mode: "+a)}return b?1:2},"~N");c(c$,"runLoader",function(){this.dispatchAppletEvent(51235,null);this.status=1;var a=this.getCode();try{if(null==a)throw System.err.println('runloader.err-- "code" must be specified.'),new InstantiationException('"code" must be specified.'); +this.applet=swingjs.JSToolkit.getInstance(a);null==this.applet?(System.out.println(a+" could not be launched"),this.status=7):j(this.applet,javax.swing.JApplet)||(System.out.println(a+" is not a JApplet!?"),this.status=7)}catch(b){if(z(b,InstantiationException)){this.status=7;this.showAppletException(b);return}if(z(b,Exception)){this.status=7;this.showAppletException(b);return}if(z(b,ThreadDeath)){this.status=7;this.showAppletStatus("death");return}if(z(b,Error)){this.status=7;this.showAppletException(b); +return}throw b;}finally{this.dispatchAppletEvent(51236,null)}null!=this.applet&&(this.applet.setStub(this),this.applet.setVisible(!1),this.add("Center",this.applet),this.applet.setDispatcher(),this.applet.addNotify(),this.showAppletStatus("loaded"),this.validate())});c(c$,"getUI",function(){return null});d(c$,"repaintImpl",function(a,b,c,d,f){this.applet.isVisible()&&(0c)){this.ctx.moveTo(a[0],b[0]);for(var d=1;da[0].length)){var b=a[0],c=a[1],d=b[0],f=b[c.length-1];a=d[0];var g=f[0],d=d[1],f=f[1],j=JU.V3.new3(g-a,f-d,0),k=j.length(),n=c[0],p=c[c.length-1],c=n[0],q=p[0],n=n[1],p=p[1],r=JU.V3.new3(q-c,p-n,0),t=r.length();1>k||1>t||(j.normalize(),r.normalize(),j=j.dot(r),0.8j&&(j=JU.V3.new3(c-a,n-d,0),r=JU.V3.new3(q-g,p-f,0),b=r.length()-j.length(),this.wheeled(System.currentTimeMillis(),0>b?-1:1,32)))}},"~A");c(c$,"translateXYBy",function(){},"~N,~N");c(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(c$,"mouseEntered",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!1)},"java.awt.event.MouseEvent");c(c$,"mouseExited", +function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!0)},"java.awt.event.MouseEvent");c(c$,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(c$,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mouseDragged",function(a){var b=a.getModifiers();0==(b&28)&&(b|=16);this.dragged(a.getWhen(),a.getX(),a.getY(),b)},"java.awt.event.MouseEvent"); +c(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers())},"java.awt.event.MouseWheelEvent");c(c$,"entry",function(a,b,c,d){this.wheeling=!1;this.mouseEnterExit(a,b,c,d)},"~N,~N,~N,~B");c(c$,"clicked",function(a,b,c,d){this.mouseAction(500,a,b,c,1,d)},"~N,~N,~N,~N,~N");c(c$,"moved",function(a,b,c,d){this.isMouseDown?this.mouseAction(506, +a,b,c,0,swingjs.JSMouse.applyLeftMouse(d)):this.mouseAction(503,a,b,c,0,d)},"~N,~N,~N,~N");c(c$,"wheeled",function(a,b,c){this.wheeling=!0;this.mouseAction(507,a,0,b,0,c&-29|32)},"~N,~N,~N");c(c$,"pressed",function(a,b,c,d){this.isMouseDown=!0;this.wheeling=!1;this.mouseAction(501,a,b,c,0,d)},"~N,~N,~N,~N,~B");c(c$,"released",function(a,b,c,d){this.wheeling=this.isMouseDown=!1;this.mouseAction(502,a,b,c,0,d)},"~N,~N,~N,~N");c(c$,"dragged",function(a,b,c,d){this.wheeling||(20==(d&20)&&(d=d&-5|2),this.mouseAction(506, +a,b,c,0,d))},"~N,~N,~N,~N");c$.applyLeftMouse=c(c$,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");c(c$,"getButton",function(a){switch(a&28){case 16:return 1;case 8:return 2;case 4:return 3;default:return 0}},"~N");c(c$,"mouseEnterExit",function(){},"~N,~N,~N,~B");c(c$,"mouseAction",function(a,b,c,d,f,g){var j=this.getButton(g);a=new java.awt.event.MouseEvent(this.ap.applet,a,b,g,c,d,c,d,f,!1,j);java.awt.Toolkit.getEventQueue().postEvent(a)},"~N,~N,~N,~N,~N,~N");x(c$,"MOUSE_LEFT",16,"MOUSE_MIDDLE", +8,"MOUSE_RIGHT",4,"MOUSE_WHEEL",32,"MAC_COMMAND",20,"BUTTON_MASK",28)});p("swingjs");n(["java.awt.peer.LightweightPeer"],"swingjs.JSComponentPeer",["swingjs.JSToolkit"],function(){c$=q(function(){this.ui=this.target=null;k(this,arguments)},swingjs,"JSComponentPeer",null,java.awt.peer.LightweightPeer);g(c$,function(a){this.target=a;this.ui=swingjs.JSToolkit.getUI(a,!1)},"java.awt.Component");d(c$,"isObscured",function(){return!1});d(c$,"canDetermineObscurity",function(){return!1});d(c$,"setVisible", +function(){},"~B");d(c$,"setEnabled",function(){},"~B");d(c$,"paint",function(){},"java.awt.Graphics");d(c$,"repaint",function(){},"~N,~N,~N,~N,~N");d(c$,"print",function(){},"java.awt.Graphics");d(c$,"setBounds",function(){},"~N,~N,~N,~N,~N");d(c$,"handleEvent",function(){},"java.awt.AWTEvent");d(c$,"coalescePaintEvent",function(){},"java.awt.event.PaintEvent");d(c$,"getLocationOnScreen",function(){return null});d(c$,"getPreferredSize",function(){return null});d(c$,"getMinimumSize",function(){return null}); +d(c$,"getColorModel",function(){return null});d(c$,"getToolkit",function(){return null});d(c$,"getGraphics",function(){return null});d(c$,"getFontMetrics",function(){return null},"java.awt.Font");d(c$,"dispose",function(){});d(c$,"setForeground",function(){},"java.awt.Color");d(c$,"setBackground",function(){},"java.awt.Color");d(c$,"setFont",function(){},"java.awt.Font");d(c$,"updateCursorImmediately",function(){});d(c$,"requestFocus",function(){return!1},"java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause"); +d(c$,"isFocusable",function(){return!1});c(c$,"createImage",function(){return null},"java.awt.image.ImageProducer");c(c$,"createImage",function(){return null},"~N,~N");d(c$,"createVolatileImage",function(){return null},"~N,~N");d(c$,"prepareImage",function(){return!1},"java.awt.Image,~N,~N,java.awt.image.ImageObserver");d(c$,"checkImage",function(){return 0},"java.awt.Image,~N,~N,java.awt.image.ImageObserver");d(c$,"getGraphicsConfiguration",function(){return null});d(c$,"handlesWheelScrolling",function(){return!1}); +d(c$,"getBackBuffer",function(){return null});d(c$,"destroyBuffers",function(){});d(c$,"reparent",function(){},"java.awt.peer.ContainerPeer");d(c$,"isReparentSupported",function(){return!1});d(c$,"layout",function(){});d(c$,"getBounds",function(){return null})});p("swingjs");n(["java.awt.peer.FramePeer"],"swingjs.JSWindowPeer",["java.lang.Thread","java.awt.GraphicsEnvironment","$.Insets","$.Point","$.Toolkit"],function(){c$=q(function(){this.window=null;this.isFrame=!1;this.font=this.graphics=this.applet= +null;k(this,arguments)},swingjs,"JSWindowPeer",null,java.awt.peer.FramePeer);d(c$,"setFrame",function(a,b){this.isFrame=b;this.window=a;this.myThread=Thread.currentThread();this.threadGroup=this.myThread.getThreadGroup();this.applet=this.threadGroup.getHtmlApplet();this.graphics=java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().createGraphicsSized(a,500,300);return this},"java.awt.Window,~B");d(c$,"getGraphics",function(){this.graphics.setFont(this.window.getFont());return this.graphics}); +d(c$,"getToolkit",function(){return java.awt.Toolkit.getDefaultToolkit()});d(c$,"getFontMetrics",function(a){a.equals(this.font)||this.window.setFont(this.font=a);return this.graphics.getFontMetrics(a)},"java.awt.Font");d(c$,"getInsets",function(){return new java.awt.Insets(0,0,0,0)});d(c$,"beginValidate",function(){});d(c$,"endValidate",function(){});d(c$,"beginLayout",function(){});d(c$,"endLayout",function(){});d(c$,"isObscured",function(){return!1});d(c$,"canDetermineObscurity",function(){return!1}); +d(c$,"setVisible",function(){},"~B");d(c$,"setEnabled",function(){},"~B");d(c$,"paint",function(){},"java.awt.Graphics");d(c$,"repaint",function(){},"~N,~N,~N,~N,~N");d(c$,"print",function(){},"java.awt.Graphics");d(c$,"setBounds",function(){},"~N,~N,~N,~N,~N");d(c$,"handleEvent",function(){},"java.awt.AWTEvent");d(c$,"coalescePaintEvent",function(){},"java.awt.event.PaintEvent");d(c$,"getLocationOnScreen",function(){return new java.awt.Point});d(c$,"getPreferredSize",function(){return null});d(c$, +"getMinimumSize",function(){return null});d(c$,"getColorModel",function(){return null});d(c$,"dispose",function(){});d(c$,"setForeground",function(){},"java.awt.Color");d(c$,"setBackground",function(){},"java.awt.Color");d(c$,"setFont",function(a){this.font=a},"java.awt.Font");d(c$,"updateCursorImmediately",function(){});d(c$,"requestFocus",function(){return!1},"java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");d(c$,"isFocusable",function(){return!1});c(c$,"createImage",function(){return null}, +"java.awt.image.ImageProducer");c(c$,"createImage",function(){return null},"~N,~N");d(c$,"createVolatileImage",function(){return null},"~N,~N");d(c$,"prepareImage",function(){return!1},"java.awt.Image,~N,~N,java.awt.image.ImageObserver");d(c$,"checkImage",function(){return 0},"java.awt.Image,~N,~N,java.awt.image.ImageObserver");d(c$,"getGraphicsConfiguration",function(){return null});d(c$,"handlesWheelScrolling",function(){return!1});d(c$,"getBackBuffer",function(){return null});d(c$,"destroyBuffers", +function(){});d(c$,"reparent",function(){},"java.awt.peer.ContainerPeer");d(c$,"isReparentSupported",function(){return!1});d(c$,"layout",function(){});d(c$,"getBounds",function(){return null});d(c$,"toFront",function(){});d(c$,"toBack",function(){});d(c$,"updateAlwaysOnTopState",function(){});d(c$,"updateFocusableWindowState",function(){});d(c$,"requestWindowFocus",function(){return!1});d(c$,"setModalBlocked",function(){},"java.awt.Dialog,~B");d(c$,"updateMinimumSize",function(){});d(c$,"updateIconImages", +function(){});d(c$,"setOpacity",function(){},"~N");d(c$,"setOpaque",function(){},"~B");d(c$,"updateWindow",function(){},"java.awt.image.BufferedImage");d(c$,"repositionSecurityWarning",function(){});d(c$,"setTitle",function(){},"~S");d(c$,"setMenuBar",function(){},"~O");d(c$,"setResizable",function(){},"~B");d(c$,"setState",function(){},"~N");d(c$,"getState",function(){return 0});d(c$,"setMaximizedBounds",function(){},"java.awt.Rectangle");d(c$,"setBoundsPrivate",function(){},"~N,~N,~N,~N");d(c$, +"getBoundsPrivate",function(){return null})});p("swingjs");n(["java.awt.GraphicsEnvironment"],"swingjs.JSGraphicsEnvironment",["swingjs.JSGraphics2D","$.JSToolkit","swingjs.api.DOMNode"],function(){c$=t(swingjs,"JSGraphicsEnvironment",java.awt.GraphicsEnvironment);g(c$,function(){r(this,swingjs.JSGraphicsEnvironment,[]);System.out.println("JSGraphicsEnvironment initialized")});d(c$,"createGraphics",function(a){return this.createGraphicsSized(a,a.getWidth(),a.getHeight())},"java.awt.image.BufferedImage"); +c(c$,"createGraphicsSized",function(a,b,c){var d=null,d=a._g;null==d&&(d=swingjs.api.DOMNode.createElement("canvas","img"+System.currentTimeMillis()),d.width=b,d.height=c,a._canvas=d,d=new swingjs.JSGraphics2D(d),a._g=d);return d},"~O,~N,~N");d(c$,"getAllFonts",function(){return null});c(c$,"getAvailableFontFamilyNames",function(){return null});c(c$,"getAvailableFontFamilyNames",function(){return null},"java.util.Locale");d(c$,"getDefaultScreenDevice",function(){null==swingjs.JSGraphicsEnvironment.device&& +(swingjs.JSGraphicsEnvironment.device=swingjs.JSToolkit.getInstance("swingjs.JSScreenDevice"));return swingjs.JSGraphicsEnvironment.device});x(c$,"device",null)});p("swingjs.plaf");n(["javax.swing.LookAndFeel"],"swingjs.plaf.HTML5LookAndFeel","java.lang.Boolean $.Long java.awt.Color $.Dimension javax.swing.DefaultListCellRenderer $.UIDefaults javax.swing.UIDefaults.ActiveValue javax.swing.plaf.ColorUIResource $.DimensionUIResource $.FontUIResource $.InsetsUIResource".split(" "),function(){c$=t(swingjs.plaf, +"HTML5LookAndFeel",javax.swing.LookAndFeel);d(c$,"getDefaults",function(){var a=new javax.swing.UIDefaults(610,0.75);this.initClassDefaults(a);this.initSystemColorDefaults(a);this.initComponentDefaults(a);return a});d(c$,"initialize",function(){});c(c$,"installAWTEventListener",function(){});d(c$,"uninitialize",function(){});c(c$,"initClassDefaults",function(a){var b=B(-1,"ButtonUI swingjs.plaf.JSButtonUI CheckBoxUI swingjs.plaf.JSCheckBoxUI ColorChooserUI swingjs.plaf.JSColorChooserUI FormattedTextFieldUI swingjs.plaf.JSFormattedTextFieldUI MenuBarUI swingjs.plaf.JSMenuBarUI MenuUI swingjs.plaf.JSMenuUI MenuItemUI swingjs.plaf.JSMenuItemUI CheckBoxMenuItemUI swingjs.plaf.JSCheckBoxMenuItemUI RadioButtonMenuItemUI swingjs.plaf.JSRadioButtonMenuItemUI RadioButtonUI swingjs.plaf.JSRadioButtonUI ToggleButtonUI swingjs.plaf.JSToggleButtonUI PopupMenuUI swingjs.plaf.JSPopupMenuUI ProgressBarUI swingjs.plaf.JSProgressBarUI ScrollBarUI swingjs.plaf.JSScrollBarUI ScrollPaneUI swingjs.plaf.JSScrollPaneUI SplitPaneUI swingjs.plaf.JSSplitPaneUI SliderUI swingjs.plaf.JSSliderUI SeparatorUI swingjs.plaf.JSSeparatorUI SpinnerUI swingjs.plaf.JSSpinnerUI ToolBarSeparatorUI swingjs.plaf.JSToolBarSeparatorUI PopupMenuSeparatorUI swingjs.plaf.JSPopupMenuSeparatorUI TabbedPaneUI swingjs.plaf.JSTabbedPaneUI TextAreaUI swingjs.plaf.JSTextAreaUI TextFieldUI swingjs.plaf.JSTextFieldUI PasswordFieldUI swingjs.plaf.JSPasswordFieldUI TextPaneUI swingjs.plaf.JSTextPaneUI EditorPaneUI swingjs.plaf.JSEditorPaneUI TreeUI swingjs.plaf.JSTreeUI LabelUI swingjs.plaf.JSLabelUI ListUI swingjs.plaf.JSListUI ToolBarUI swingjs.plaf.JSToolBarUI ToolTipUI swingjs.plaf.JSToolTipUI ComboBoxUI swingjs.plaf.JSComboBoxUI TableUI swingjs.plaf.JSTableUI TableHeaderUI swingjs.plaf.JSTableHeaderUI InternalFrameUI swingjs.plaf.JSInternalFrameUI DesktopPaneUI swingjs.plaf.JSDesktopPaneUI DesktopIconUI swingjs.plaf.JSDesktopIconUI OptionPaneUI swingjs.plaf.JSOptionPaneUI PanelUI swingjs.plaf.JSPanelUI ViewportUI swingjs.plaf.JSViewportUI RootPaneUI swingjs.plaf.JSRootPaneUI".split(" ")); +a.putDefaults(b)},"javax.swing.UIDefaults");c(c$,"initSystemColorDefaults",function(a){var b=B(-1,"window #FFFFFF windowText #333333 menu #C0C0C0 menuText #333333 text #C0C0C0 textText #333333 control #EEEEEE controlText #333333 scrollbar #E0E0E0 info #FFFFE1 infoText #000000".split(" "));this.loadSystemColors(a,b,this.isNativeLookAndFeel())},"javax.swing.UIDefaults");c(c$,"loadSystemColors",function(a,b){for(var c=0;cb||0>c)throw new IllegalArgumentException("Width and height must be >= 0"); +return-1},"javax.swing.JComponent,~N,~N");d(c$,"getBaselineResizeBehavior",function(a){if(null==a)throw new NullPointerException("Component must be non-null");return java.awt.Component.BaselineResizeBehavior.OTHER},"javax.swing.JComponent");c(c$,"getJSTextValue",function(){return swingjs.api.DOMNode.getAttr(this.domNode,null==this.valueNode?"innerHTML":"value")});c(c$,"notifyPropertyChanged",function(a){var b=null,c=null;if("text"===a){c=this.c.getText();if(c.equals(this.currentText))return;this.currentText= +c;null!=this.textNode?(a="innerHTML",b=this.textNode):null!=this.valueNode&&(a="value",b=this.valueNode)}else if("preferredSize"===a){this.preferredSize=this.c.getPreferredSize();this.getPreferredSize();return}null==b?System.out.println("JSComponentUI: unrecognized prop: "+a):(System.out.println("JSComponentUI: setting "+this.id+" "+a),this.setProp(b,a,c))},"~S");c(c$,"setProp",function(a,b,c){return swingjs.api.DOMNode.setAttr(a,b,c)},"swingjs.api.DOMNode,~S,~S");d(c$,"isObscured",function(){swingjs.JSToolkit.notImplemented(""); +return!1});d(c$,"canDetermineObscurity",function(){swingjs.JSToolkit.notImplemented("");return!1});d(c$,"setVisible",function(a){swingjs.api.DOMNode.setStyles(this.outerNode,["display",a?"block":"none"])},"~B");d(c$,"setEnabled",function(a){null!=this.enableNode&&swingjs.api.DOMNode.setAttr(this.enableNode,"disabled",a?null:"TRUE")},"~B");c(c$,"paint",function(){},"java.awt.Graphics");d(c$,"repaint",function(){},"~N,~N,~N,~N,~N");d(c$,"print",function(){swingjs.JSToolkit.notImplemented("")},"java.awt.Graphics"); +d(c$,"setBounds",function(a,b,c,d,f){switch(f){case 2:case 3:case 4:null!=this.scrollerNode&&(c=Math.min(c,this.scrollerNode.c.getWidth()),d=Math.min(d,this.scrollerNode.c.getHeight())),System.out.println(this.id+" setBounds "+a+" "+b+" "+c+" "+d+" op="+f),null!=this.domNode&&swingjs.api.DOMNode.setSize(this.domNode,c,d)}},"~N,~N,~N,~N,~N");d(c$,"handleEvent",function(){swingjs.JSToolkit.notImplemented("")},"java.awt.AWTEvent");d(c$,"coalescePaintEvent",function(){swingjs.JSToolkit.notImplemented("")}, +"java.awt.event.PaintEvent");d(c$,"getLocationOnScreen",function(){var a=this.$(this.outerNode).offset();return new java.awt.Point(a.left,a.top)});c(c$,"getPreferredSize",function(){return this.getPreferredSize(this.c)});c(c$,"getMinimumSize",function(){swingjs.JSToolkit.notImplemented("");return this.getPreferredSize(this.c)});d(c$,"getColorModel",function(){return java.awt.Toolkit.getDefaultToolkit().getColorModel()});d(c$,"getToolkit",function(){return java.awt.Toolkit.getDefaultToolkit()});d(c$, +"getGraphics",function(){return null});d(c$,"getFontMetrics",function(a){return this.c.getFontMetrics(a)},"java.awt.Font");d(c$,"dispose",function(){swingjs.JSToolkit.notImplemented("")});d(c$,"setForeground",function(a){null!=this.domNode&&swingjs.api.DOMNode.setStyles(this.domNode,["color",swingjs.JSToolkit.getCSSColor(null==a?java.awt.Color.black:a)])},"java.awt.Color");d(c$,"setBackground",function(a){null!=this.domNode&&swingjs.api.DOMNode.setStyles(this.domNode,["background-color",swingjs.JSToolkit.getCSSColor(null== +a?java.awt.Color.white:a)])},"java.awt.Color");d(c$,"setFont",function(a){null!=this.domNode&&this.setCssFont(this.domNode,a)},"java.awt.Font");d(c$,"updateCursorImmediately",function(){swingjs.JSToolkit.notImplemented("")});d(c$,"requestFocus",function(){if(null==this.focusNode)return!1;this.$(this.focusNode).focus();null!=this.textNode&&this.$(this.textNode).select();return!0},"java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");d(c$,"isFocusable",function(){return null!=this.focusNode}); +c(c$,"createImage",function(){swingjs.JSToolkit.notImplemented("");return null},"java.awt.image.ImageProducer");c(c$,"createImage",function(){swingjs.JSToolkit.notImplemented("");return null},"~N,~N");d(c$,"createVolatileImage",function(){swingjs.JSToolkit.notImplemented("");return null},"~N,~N");d(c$,"prepareImage",function(){swingjs.JSToolkit.notImplemented("");return!1},"java.awt.Image,~N,~N,java.awt.image.ImageObserver");d(c$,"checkImage",function(){swingjs.JSToolkit.notImplemented("");return 0}, +"java.awt.Image,~N,~N,java.awt.image.ImageObserver");d(c$,"getGraphicsConfiguration",function(){swingjs.JSToolkit.notImplemented("");return null});d(c$,"handlesWheelScrolling",function(){swingjs.JSToolkit.notImplemented("");return!1});d(c$,"getBackBuffer",function(){swingjs.JSToolkit.notImplemented("");return null});d(c$,"destroyBuffers",function(){swingjs.JSToolkit.notImplemented("")});d(c$,"reparent",function(){swingjs.JSToolkit.notImplemented("")},"java.awt.peer.ContainerPeer");d(c$,"isReparentSupported", +function(){swingjs.JSToolkit.notImplemented("");return!1});d(c$,"layout",function(){swingjs.JSToolkit.notImplemented("")});d(c$,"getBounds",function(){swingjs.JSToolkit.notImplemented("");return null});c(c$,"hasFocus",function(){return null!=this.focusNode&&this.focusNode===swingjs.api.DOMNode.getAttr(this.document,"activeElement")});c(c$,"notifyFocus",function(a){java.awt.Toolkit.getEventQueue().postEvent(new java.awt.event.FocusEvent(this.c,a?1004:1005))},"~B");x(c$,"incr",0)});p("swingjs.plaf"); +n(["swingjs.plaf.JSComponentUI"],"swingjs.plaf.JSPanelUI",["java.awt.Dimension","javax.swing.LookAndFeel"],function(){c$=t(swingjs.plaf,"JSPanelUI",swingjs.plaf.JSComponentUI);g(c$,function(){r(this,swingjs.plaf.JSPanelUI,[]);this.isContainer=!0;this.setDoc()});d(c$,"getDOMObject",function(){null==this.domNode&&(this.domNode=this.createDOMObject("label",this.id,[]));return this.domNode});d(c$,"setHTMLSize",function(){return new java.awt.Dimension(this.c.getWidth(),this.c.getHeight())},"swingjs.api.DOMNode,~B"); +c(c$,"getPreferredSize",function(){return null},"javax.swing.JComponent");d(c$,"installJSUI",function(){javax.swing.LookAndFeel.installColorsAndFont(this.c,"Panel.background","Panel.foreground","Panel.font")});d(c$,"uninstallJSUI",function(){})});p("swingjs.plaf");n(["swingjs.plaf.JSButtonUI"],"swingjs.plaf.JSRadioButtonUI",["java.util.HashMap","javax.swing.DefaultButtonModel","swingjs.api.DOMNode"],function(){c$=q(function(){this.label=null;k(this,arguments)},swingjs.plaf,"JSRadioButtonUI",swingjs.plaf.JSButtonUI); +d(c$,"getDOMObject",function(){return this.getButtonObject("radio")});d(c$,"getPropertyPrefix",function(){return"RadioButton."});d(c$,"setHTMLSize",function(a,b){swingjs.api.DOMNode.setStyles(this.domBtn,["position",null]);swingjs.api.DOMNode.setStyles(this.label,["position",null]);var c=this.setHTMLSize1(a,b,!1);swingjs.api.DOMNode.setStyles(this.domBtn,["position","absolute"]);swingjs.api.DOMNode.setStyles(this.label,["position","absolute"]);return c},"swingjs.api.DOMNode,~B");c(c$,"getButtonObject", +function(a){var b=this.c,c=!1,d=!1;if(null==this.domNode){d=!0;null==swingjs.plaf.JSRadioButtonUI.groupNames&&(swingjs.plaf.JSRadioButtonUI.groupNames=new java.util.HashMap);var f=null,g=this.id,c=!0;j(b.getModel(),javax.swing.DefaultButtonModel)&&(f=b.getModel().getGroup(),g=swingjs.plaf.JSRadioButtonUI.groupNames.get(f),null==g?swingjs.plaf.JSRadioButtonUI.groupNames.put(f,g=this.id):c=!1);this.domBtn=this.enableNode=this.createDOMObject("input",this.id,["type",a,"name",g]);this.label=this.textNode= +this.createDOMObject("label",this.id+"l",["htmlFor",this.id])}(b.isSelected()||c)&&swingjs.api.DOMNode.setAttr(this.domBtn,"checked","true");this.setCssFont(swingjs.api.DOMNode.setAttr(this.label,"innerHTML",this.c.getText()),this.c.getFont());a=this.setHTMLSize1(this.domBtn,!1,!1);this.setHTMLSize1(this.label,!1,!1);b=this.wrap("div","",[this.domBtn,this.label]);c=this.setHTMLSize1(b,!0,!0);swingjs.plaf.JSComponentUI.vCenter(this.domBtn,-75);swingjs.plaf.JSComponentUI.vCenter(this.label,-50);swingjs.api.DOMNode.setStyles(this.label, +["position","absolute","left",a.width+"px"]);swingjs.api.DOMNode.setStyles(this.domBtn,["position","absolute"]);d?(b=this.wrap("div",this.id+"_0",[this.domBtn,this.label]),swingjs.api.DOMNode.setStyles(b,["position","absolute"])):(b=this.domNode,b.appendChild(this.domBtn),b.appendChild(this.label));return swingjs.api.DOMNode.setSize(b,c.width,c.height)},"~S");x(c$,"groupNames",null)});p("swingjs.plaf");n(["swingjs.plaf.JSComponentUI"],"swingjs.plaf.JSRootPaneUI",null,function(){c$=t(swingjs.plaf, +"JSRootPaneUI",swingjs.plaf.JSComponentUI);g(c$,function(){r(this,swingjs.plaf.JSRootPaneUI,[]);this.isContainer=!0;this.setDoc()});d(c$,"getDOMObject",function(){return null});d(c$,"installJSUI",function(){});d(c$,"uninstallJSUI",function(){})});p("swingjs.plaf");n("java.awt.event.FocusListener $.MouseListener $.MouseMotionListener java.beans.PropertyChangeListener javax.swing.event.ChangeListener jssun.swing.UIAction".split(" "),"swingjs.plaf.JSButtonListener",["javax.swing.AbstractButton","$.KeyStroke", +"$.SwingUtilities","javax.swing.plaf.ComponentInputMapUIResource","swingjs.plaf.LazyActionMap"],function(){c$=q(function(){this.lastPressedTimestamp=-1;this.shouldDiscardRelease=!1;this.btn=null;k(this,arguments)},swingjs.plaf,"JSButtonListener",null,[java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.FocusListener,javax.swing.event.ChangeListener,java.beans.PropertyChangeListener]);c$.loadActionMap=c(c$,"loadActionMap",function(a){a.put(new swingjs.plaf.JSButtonListener.Actions("pressed")); +a.put(new swingjs.plaf.JSButtonListener.Actions("released"))},"swingjs.plaf.LazyActionMap");g(c$,function(a){this.btn=a},"javax.swing.AbstractButton");d(c$,"propertyChange",function(a){var b=a.getPropertyName();"mnemonic"===b?this.updateMnemonicBinding(a.getSource()):"contentAreaFilled"===b?this.checkOpacity(a.getSource()):("text"===b||"font"===b||"foreground"===b)&&a.getSource().getUI().notifyPropertyChanged(b)},"java.beans.PropertyChangeEvent");c(c$,"checkOpacity",function(a){a.setOpaque(a.isContentAreaFilled())}, +"javax.swing.AbstractButton");c(c$,"installKeyboardActions",function(a){this.updateMnemonicBinding(a);swingjs.plaf.LazyActionMap.installLazyActionMap(a,swingjs.plaf.JSButtonListener,"Button.actionMap");var b=this.getInputMap(0,a);javax.swing.SwingUtilities.replaceUIInputMap(a,0,b)},"javax.swing.JComponent");c(c$,"uninstallKeyboardActions",function(a){javax.swing.SwingUtilities.replaceUIInputMap(a,2,null);javax.swing.SwingUtilities.replaceUIInputMap(a,0,null);javax.swing.SwingUtilities.replaceUIActionMap(a, +null)},"javax.swing.JComponent");c(c$,"getInputMap",function(){return null},"~N,javax.swing.JComponent");c(c$,"updateMnemonicBinding",function(a){var b=a.getMnemonic();if(0!=b){var c=javax.swing.SwingUtilities.getUIInputMap(a,2);null==c&&(c=new javax.swing.plaf.ComponentInputMapUIResource(a),javax.swing.SwingUtilities.replaceUIInputMap(a,2,c));c.clear();c.put(javax.swing.KeyStroke.getKeyStroke(b,8,!1),"pressed");c.put(javax.swing.KeyStroke.getKeyStroke(b,8,!0),"released");c.put(javax.swing.KeyStroke.getKeyStroke(b, +0,!0),"released")}else c=javax.swing.SwingUtilities.getUIInputMap(a,2),null!=c&&c.clear()},"javax.swing.AbstractButton");d(c$,"stateChanged",function(a){a.getSource().repaint()},"javax.swing.event.ChangeEvent");d(c$,"focusGained",function(){},"java.awt.event.FocusEvent");d(c$,"focusLost",function(a){a=a.getSource().getModel();a.setArmed(!1);a.setPressed(!1)},"java.awt.event.FocusEvent");d(c$,"mouseMoved",function(){},"java.awt.event.MouseEvent");d(c$,"mouseDragged",function(){},"java.awt.event.MouseEvent"); +d(c$,"mouseClicked",function(){},"java.awt.event.MouseEvent");d(c$,"mousePressed",function(a){if(javax.swing.SwingUtilities.isLeftMouseButton(a)){var b=a.getSource();if(b.contains(a.getX(),a.getY())){b.getUI().verifyButtonClick(!1);var c=b.getMultiClickThreshhold(),d=this.lastPressedTimestamp;a=this.lastPressedTimestamp=a.getWhen();-1!=d&&a-d 0) { sb.append (","); }sb.append ("["); -sb.append (this.colour.getRed ()); +sb.append ("" + this.colour.getRed ()); sb.append (","); -sb.append (this.colour.getGreen ()); +sb.append ("" + this.colour.getGreen ()); sb.append (","); -sb.append (this.colour.getBlue ()); +sb.append ("" + this.colour.getBlue ()); sb.append ("]"); }return sb.toString (); }); diff --git a/site/j2s/jalview/io/AnnotationFile.js b/site/j2s/jalview/io/AnnotationFile.js index 59a4df5..9ff8e6b 100644 --- a/site/j2s/jalview/io/AnnotationFile.js +++ b/site/j2s/jalview/io/AnnotationFile.js @@ -59,9 +59,9 @@ if (!comma) { comma = true; } else { this.text.append (","); -}this.text.append (r[0]); +}this.text.append ("" + r[0]); this.text.append ("-"); -this.text.append (r[1]); +this.text.append ("" + r[1]); } this.text.append ("\n"); }if (annotations != null) { @@ -272,7 +272,7 @@ this.text.append (this.newline); this.text.append ("SEQUENCE_GROUP\t"); this.text.append (sg.getName ()); this.text.append ("\t"); -this.text.append ((seqrep.findPosition (sg.getStartRes ()))); +this.text.append ("" + (seqrep.findPosition (sg.getStartRes ()))); this.text.append ("\t"); this.text.append ((seqrep.findPosition (sg.getEndRes ()))); this.text.append ("\t"); diff --git a/site/j2s/jalview/io/FeaturesFile.js b/site/j2s/jalview/io/FeaturesFile.js index 7402c4c..f1f497c 100644 --- a/site/j2s/jalview/io/FeaturesFile.js +++ b/site/j2s/jalview/io/FeaturesFile.js @@ -653,9 +653,9 @@ out.append (""); }}out.append ("\t"); }out.append (seqs[i].getName ()); out.append ("\t-1\t"); -out.append (next[j].begin); +out.append ("" + next[j].begin); out.append ("\t"); -out.append (next[j].end); +out.append ("" + next[j].end); out.append ("\t"); out.append (next[j].type); if (!Float.isNaN (next[j].score)) { @@ -702,9 +702,9 @@ out.append (source); out.append ("\t"); out.append (next[j].type); out.append ("\t"); -out.append (next[j].begin); +out.append ("" + next[j].begin); out.append ("\t"); -out.append (next[j].end); +out.append ("" + next[j].end); out.append ("\t"); out.append (next[j].score); out.append ("\t"); diff --git a/site/j2s/jalview/io/SequenceAnnotationReport.js b/site/j2s/jalview/io/SequenceAnnotationReport.js index 4ab2aa6..15fa2dd 100644 --- a/site/j2s/jalview/io/SequenceAnnotationReport.js +++ b/site/j2s/jalview/io/SequenceAnnotationReport.js @@ -29,7 +29,7 @@ tooltipText2.append ("
    "); if (!linkOnly) { tooltipText2.append (feature.getType () + " "); if (rpos != 0) { -tooltipText2.append (feature.begin); +tooltipText2.append ("" + feature.begin); }if (feature.begin != feature.end) { tooltipText2.append (" " + feature.end); }if (feature.getDescription () != null && !feature.description.equals (feature.getType ())) { diff --git a/site/j2s/jalview/viewmodel/PCAModel.js b/site/j2s/jalview/viewmodel/PCAModel.js index cdb9868..83a1162 100644 --- a/site/j2s/jalview/viewmodel/PCAModel.js +++ b/site/j2s/jalview/viewmodel/PCAModel.js @@ -81,11 +81,11 @@ var csv = new StringBuffer (); csv.append ("\"Sequence\""); if (transformed) { csv.append (","); -csv.append (xdim); +csv.append ("" + xdim); csv.append (","); -csv.append (ydim); +csv.append ("" + ydim); csv.append (","); -csv.append (zdim); +csv.append ("" + zdim); } else { for (var d = 1, dmax = this.pca.component (1).length; d <= dmax; d++) { csv.append ("," + d); diff --git a/site/j2s/jalview/workers/StrucConsensusThread.js b/site/j2s/jalview/workers/StrucConsensusThread.js index 4010f84..7908c3f 100644 --- a/site/j2s/jalview/workers/StrucConsensusThread.js +++ b/site/j2s/jalview/workers/StrucConsensusThread.js @@ -1,85 +1,107 @@ Clazz.declarePackage ("jalview.workers"); -Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.StrucConsensusThread", ["jalview.analysis.StructureFrequency", "java.lang.Thread"], function () { +Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.StrucConsensusThread", ["jalview.analysis.StructureFrequency"], function () { c$ = Clazz.decorateAsClass (function () { +this.rnaStruc = null; this.strucConsensus = null; this.hStrucConsensus = null; this.nseq = -1; +this.aa = null; +this.arr = null; Clazz.instantialize (this, arguments); }, jalview.workers, "StrucConsensusThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI); Clazz.overrideMethod (c$, "getNewWorker", function () { return new jalview.workers.StrucConsensusThread (this.alignViewport, this.ap); }); -Clazz.overrideMethod (c$, "run", -function () { -try { -if (this.calcMan.isPending (this)) { +Clazz.overrideMethod (c$, "run1", +function (state) { +if (this.alignViewport.isClosed ()) { +this.abortAndDestroy (); return; -}this.calcMan.notifyStart (this); -while (!this.calcMan.notifyWorking (this)) { +}while (!Thread.interrupted ()) { try { +switch (state) { +case 0: +if (this.calcMan.isPending (this)) return; +this.calcMan.notifyStart (this); +state = 3; +break; +case 3: +while (!this.calcMan.notifyWorking (this)) { if (this.ap != null) { -}Thread.sleep (200); -} catch (ex) { -if (Clazz.exceptionOf (ex, Exception)) { -ex.printStackTrace (); +this.ap.paintAlignment (false); +}try { +if (this.sleepAndReturn (200, state)) return; +} catch (e) { +if (Clazz.exceptionOf (e, InterruptedException)) { +state = 2; +break; } else { -throw ex; +throw e; } } } if (this.alignViewport.isClosed ()) { this.abortAndDestroy (); -return; -}var alignment = this.alignViewport.getAlignment (); -var aWidth = -1; -if (alignment == null || (aWidth = alignment.getWidth ()) < 0) { -this.calcMan.workerComplete (this); -return; +state = 2; +break; +}this.alignment = this.alignViewport.getAlignment (); +this.aWidth = -1; +if (this.alignment == null || (this.aWidth = this.alignment.getWidth ()) < 0) { +state = 2; }this.strucConsensus = this.alignViewport.getAlignmentStrucConsensusAnnotation (); this.hStrucConsensus = this.alignViewport.getRnaStructureConsensusHash (); this.strucConsensus.annotations = null; -this.strucConsensus.annotations = new Array (aWidth); -this.hStrucConsensus = new Array (aWidth); -var aa = this.alignViewport.getAlignment ().getAlignmentAnnotation (); -var rnaStruc = null; -for (var i = 0; i < aa.length; i++) { -if (aa[i].getRNAStruc () != null && aa[i].isValidStruc ()) { -rnaStruc = aa[i]; +this.strucConsensus.annotations = new Array (this.aWidth); +this.hStrucConsensus = new Array (this.aWidth); +this.aa = this.alignViewport.getAlignment ().getAlignmentAnnotation (); +for (var i = 0; i < this.aa.length; i++) { +if (this.aa[i].getRNAStruc () != null && this.aa[i].isValidStruc ()) { +this.rnaStruc = this.aa[i]; break; }} -if (rnaStruc == null || !rnaStruc.isValidStruc ()) { -this.calcMan.workerComplete (this); -return; -}try { -var arr = alignment.getSequencesArray (); -this.nseq = arr.length; -jalview.analysis.StructureFrequency.calculate (arr, 0, alignment.getWidth (), this.hStrucConsensus, true, rnaStruc); -} catch (x) { -if (Clazz.exceptionOf (x, ArrayIndexOutOfBoundsException)) { +if (this.rnaStruc == null || !this.rnaStruc.isValidStruc ()) { this.calcMan.workerComplete (this); return; +}this.arr = this.alignment.getSequencesArray (); +this.nseq = this.arr.length; +state = 4; +break; +case 4: +this.iFirst = this.iLast; +this.iLast = Math.min (this.iLast + this.nPer, this.aWidth); +if (this.iLast == this.iFirst) { +state = 2; } else { -throw x; -} -} +jalview.analysis.StructureFrequency.calculate (this.arr, 0, this.alignment.getWidth (), this.hStrucConsensus, true, this.rnaStruc); +if (this.sleepAndReturn (0, state)) return; +}break; +case 2: this.alignViewport.setRnaStructureConsensusHash (this.hStrucConsensus); this.updateResultAnnotation (true); if (this.alignViewport.getGlobalColourScheme () != null) { this.alignViewport.getGlobalColourScheme ().setConsensus (this.hStrucConsensus); -}} catch (error) { -if (Clazz.exceptionOf (error, OutOfMemoryError)) { +}this.notifyDone (); +return; +} +} catch (e$$) { +if (Clazz.exceptionOf (e$$, OutOfMemoryError)) { +var error = e$$; +{ this.calcMan.workerCannotRun (this); this.ap.raiseOOMWarning ("calculating RNA structure consensus", error); -} else { -throw error; } -} finally { +} else { +var e = e$$; +{ +System.out.println ("Error in ConsensusThread: " + e); +e.printStackTrace (); this.calcMan.workerComplete (this); -if (this.ap != null) { -this.ap.paintAlignment (true); -}} -}); +} +} +} +} +}, "~N"); Clazz.overrideMethod (c$, "updateAnnotation", function () { this.updateResultAnnotation (false); @@ -89,7 +111,4 @@ function (immediate) { if (immediate || !this.calcMan.isWorking (this) && this.strucConsensus != null && this.hStrucConsensus != null) { jalview.analysis.StructureFrequency.completeConsensus (this.strucConsensus, this.hStrucConsensus, 0, this.hStrucConsensus.length, this.alignViewport.isIgnoreGapsConsensus (), this.alignViewport.isShowSequenceLogo (), this.nseq); }}, "~B"); -Clazz.overrideMethod (c$, "run1", -function (state) { -}, "~N"); }); diff --git a/site/j2s/swingjs/JSImage.js b/site/j2s/swingjs/JSImage.js index bca7fa6..db7a9a8 100644 --- a/site/j2s/swingjs/JSImage.js +++ b/site/j2s/swingjs/JSImage.js @@ -11,9 +11,8 @@ Clazz.instantialize (this, arguments); Clazz.makeConstructor (c$, function (argb, width, height) { Clazz.superConstructor (this, swingjs.JSImage, [width, height, 2]); -this.width = width -this.height = height - +this.width = width; +this.height = height; this.pix = argb; }, "~A,~N,~N"); Clazz.defineMethod (c$, "toIntARGB", diff --git a/site/j2s/swingjs/JSToolkit.js b/site/j2s/swingjs/JSToolkit.js index a41205b..14b814c 100644 --- a/site/j2s/swingjs/JSToolkit.js +++ b/site/j2s/swingjs/JSToolkit.js @@ -1,5 +1,5 @@ Clazz.declarePackage ("swingjs"); -Clazz.load (["jssun.awt.SunToolkit"], "swingjs.JSToolkit", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "$.InputStream", "java.lang.Boolean", "$.Thread", "java.util.Hashtable", "JU.AU", "$.Rdr", "$.SB", "java.awt.Dimension", "java.awt.image.ColorModel", "javax.swing.UIManager", "jssun.awt.AppContext", "swingjs.JSComponentPeer", "swingjs.api.Interface"], function () { +Clazz.load (["jssun.awt.SunToolkit"], "swingjs.JSToolkit", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "$.InputStream", "java.lang.Boolean", "$.Thread", "java.util.Hashtable", "JU.AU", "$.Rdr", "$.SB", "java.awt.Dimension", "java.awt.image.ColorModel", "javax.swing.UIManager", "jssun.awt.AppContext", "swingjs.JSComponentPeer", "$.JSImage", "swingjs.api.Interface"], function () { c$ = Clazz.decorateAsClass (function () { this.imageKit = null; Clazz.instantialize (this, arguments); @@ -198,11 +198,11 @@ if (!window.jQuery) alert( ); jQuery.$ || (jQuery.$ = jQuery); return(jQuery); }}); c$.getJavaResource = Clazz.defineMethod (c$, "getJavaResource", -function (resourceName) { +function (resourceName, isJavaPath) { System.out.println ("JSToolkit getting Java resource " + resourceName); { -return SwingJS.getJavaResource(resourceName); -}}, "~S"); +return SwingJS.getJavaResource(resourceName, isJavaPath); +}}, "~S,~B"); c$.dispatchSystemEvent = Clazz.defineMethod (c$, "dispatchSystemEvent", function (runnable) { var f = null; @@ -369,7 +369,11 @@ throw e; }, "java.net.URL"); Clazz.defineMethod (c$, "createImage", function (data, imageoffset, imagelength) { -return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength); +if (data == null) { +var width = imageoffset; +var height = imagelength; +return new swingjs.JSImage (null, width, height); +}return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength); }, "~A,~N,~N"); Clazz.overrideMethod (c$, "checkImage", function (image, width, height, observer) { diff --git a/site/j2s/swingjs/plaf/HTML5LookAndFeel.java b/site/j2s/swingjs/plaf/HTML5LookAndFeel.java index b4fb2b3..fd87de8 100644 --- a/site/j2s/swingjs/plaf/HTML5LookAndFeel.java +++ b/site/j2s/swingjs/plaf/HTML5LookAndFeel.java @@ -1,2494 +1,2494 @@ -/* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package swingjs.plaf; - -//import jsjava.awt.AWTEvent; -import jsjava.awt.Color; -import jsjava.awt.Dimension; -import jsjava.awt.Font; -import jsjavax.swing.DefaultListCellRenderer; -import jsjavax.swing.JTextField; -//import jsjava.awt.Component; -//import jsjava.awt.Dimension; -//import jsjava.awt.Font; -//import jsjava.awt.Point; -//import jsjava.awt.Toolkit; -//import jsjava.awt.Window; -//import jsjava.awt.event.AWTEventListener; -//import jsjava.awt.event.ActionEvent; -//import jsjava.awt.event.KeyEvent; -//import jsjava.awt.event.MouseEvent; -//import jsjava.beans.PropertyChangeEvent; -//import jsjava.beans.PropertyChangeListener; -//import jsjava.beans.PropertyVetoException; -//import java.io.BufferedInputStream; -//import java.io.ByteArrayInputStream; -//import java.io.ByteArrayOutputStream; -//import java.io.IOException; -//import java.io.InputStream; -////import java.io.Serializable; -//import jsjava.security.AccessController; -//import jsjava.security.PrivilegedAction; -//import java.util.HashSet; -//import jsjava.util.Locale; -// -////import jsjavax.sound.sampled.AudioInputStream; -////import jsjavax.sound.sampled.AudioSystem; -////import jsjavax.sound.sampled.Clip; -////import jsjavax.sound.sampled.DataLine; -////import jsjavax.sound.sampled.LineEvent; -////import jsjavax.sound.sampled.LineListener; -//import jsjavax.swing.AbstractAction; -//import jsjavax.swing.Action; -//import jsjavax.swing.ActionMap; -//import jsjavax.swing.DefaultListCellRenderer; -//import jsjavax.swing.JComponent; -////import jsjavax.swing.JInternalFrame; -//import jsjavax.swing.JTextField; -//import jsjavax.swing.LookAndFeel; -//import jsjavax.swing.MenuElement; -//import jsjavax.swing.MenuSelectionManager; -//import jsjavax.swing.SwingUtilities; -import jsjavax.swing.LookAndFeel; -import jsjavax.swing.UIDefaults; -//import jsjavax.swing.UIManager; -//import jsjavax.swing.border.BevelBorder; -//import jsjavax.swing.plaf.ActionMapUIResource; -//import jsjavax.swing.plaf.BorderUIResource; -import jsjavax.swing.plaf.ColorUIResource; -import jsjavax.swing.plaf.FontUIResource; -//import jsjavax.swing.plaf.ComponentUI; -import jsjavax.swing.plaf.DimensionUIResource; -//import jsjavax.swing.plaf.DimensionUIResource; -//import jsjavax.swing.plaf.InsetsUIResource; -////import jsjavax.swing.plaf.basic.popupMenuUI; -////import jsjavax.swing.plaf.basic.BasicSplitPaneDivider; -//import jsjavax.swing.text.DefaultEditorKit; -// -//import jssun.awt.AppContext; -//import jssun.swing.SwingUtilities2; -////import jssun.swing.SwingLazyValue; -// -import jsjavax.swing.plaf.InsetsUIResource; -import jssun.swing.SwingLazyValue; - -/** - * A base class to use in creating a look and feel for Swing. - *

    - * Each of the {@code ComponentUI}s provided by {@code BasicLookAndFeel} derives - * its behavior from the defaults table. Unless otherwise noted each of the - * {@code ComponentUI} implementations in this package document the set of - * defaults they use. Unless otherwise noted the defaults are installed at the - * time {@code installUI} is invoked, and follow the recommendations outlined in - * {@code LookAndFeel} for installing defaults. - *

    - * Warning: Serialized objects of this class will not be - * compatible with future Swing releases. The current serialization support is - * appropriate for short term storage or RMI between applications running the - * same version of Swing. As of 1.4, support for long term storage of all - * JavaBeansTM has been added to the - * java.beans package. Please see {@link java.beans.XMLEncoder}. - * - * @author unattributed - */ -public class HTML5LookAndFeel extends LookAndFeel { - // /** - // * Whether or not the developer has created a JPopupMenu. - // */ - // static boolean needsEventHelper; - // - // /** - // * Lock used when manipulating clipPlaying. - // */ - // private transient Object audioLock = new Object(); - // /** - // * The Clip that is currently playing (set in AudioAction). - // */ - // private Clip clipPlaying; - // - // AWTEventHelper invocator = null; - // - // /* - // * Listen for our AppContext being disposed - // */ - // private PropertyChangeListener disposer = null; - // - /** - * Returns the look and feel defaults. The returned {@code UIDefaults} is - * populated by invoking, in order, {@code initClassDefaults}, - * {@code initSystemColorDefaults} and {@code initComponentDefaults}. - *

    - * While this method is public, it should only be invoked by the - * {@code UIManager} when the look and feel is set as the current look and - * feel and after {@code initialize} has been invoked. - * - * @return the look and feel defaults - * - * @see #initClassDefaults - * @see #initSystemColorDefaults - * @see #initComponentDefaults - */ - public UIDefaults getDefaults() { - UIDefaults table = new UIDefaults(610, 0.75f); - - initClassDefaults(table); - initSystemColorDefaults(table); - initComponentDefaults(table); - - return table; - } - - /** - * {@inheritDoc} - */ - public void initialize() { - // if (needsEventHelper) { - // installAWTEventListener(); - // } - } - - void installAWTEventListener() { - // if (invocator == null) { - // invocator = new AWTEventHelper(); - // needsEventHelper = true; - // - // // Add a PropertyChangeListener to our AppContext so we're alerted - // // when the AppContext is disposed(), at which time this laf should - // // be uninitialize()d. - // disposer = new PropertyChangeListener() { - // public void propertyChange(PropertyChangeEvent prpChg) { - // uninitialize(); - // } - // }; - // AppContext.getAppContext().addPropertyChangeListener( - // AppContext.GUI_DISPOSED, - // disposer); - // } - } - - /** - * {@inheritDoc} - */ - public void uninitialize() { - // AppContext context = AppContext.getAppContext(); - // synchronized (popupMenuUI.MOUSE_GRABBER_KEY) { - // Object grabber = context.get(popupMenuUI.MOUSE_GRABBER_KEY); - // if (grabber != null) { - // ((popupMenuUI.MouseGrabber)grabber).uninstall(); - // } - // } - // synchronized (popupMenuUI.MENU_KEYBOARD_HELPER_KEY) { - // Object helper = - // context.get(popupMenuUI.MENU_KEYBOARD_HELPER_KEY); - // if (helper != null) { - // ((popupMenuUI.MenuKeyboardHelper)helper).uninstall(); - // } - // } - // - // if(invocator != null) { - // AccessController.doPrivileged(invocator); - // invocator = null; - // } - // - // if (disposer != null) { - // // Note that we're likely calling removePropertyChangeListener() - // // during the course of AppContext.firePropertyChange(). - // // However, EventListenerAggreggate has code to safely modify - // // the list under such circumstances. - // context.removePropertyChangeListener(AppContext.GUI_DISPOSED, - // disposer); - // disposer = null; - // } - } - - /** - * Populates {@code table} with mappings from {@code uiClassID} to the fully - * qualified name of the ui class. The value for a particular - * {@code uiClassID} is {@code "jsjavax.swing.plaf.basic.Basic + uiClassID"}. - * For example, the value for the {@code uiClassID} {@code TreeUI} is - * {@code "jsjavax.swing.plaf.basic.BasicTreeUI"}. - * - * @param table - * the {@code UIDefaults} instance the entries are added to - * @throws NullPointerException - * if {@code table} is {@code null} - * - * @see jsjavax.swing.LookAndFeel - * @see #getDefaults - */ - protected void initClassDefaults(UIDefaults table) { - final String packageName = "swingjs.plaf."; - Object[] uiDefaults = { - /**/ "ButtonUI", packageName + "JSButtonUI", - /**/ "CheckBoxUI", packageName + "JSCheckBoxUI", - "ColorChooserUI", packageName + "JSColorChooserUI", - /**/ "FormattedTextFieldUI", packageName + "JSFormattedTextFieldUI", - /**/ "MenuBarUI", packageName + "JSMenuBarUI", - /**/ "MenuUI", packageName + "JSMenuUI", - /**/ "MenuItemUI", packageName + "JSMenuItemUI", - /**/ "CheckBoxMenuItemUI", packageName + "JSCheckBoxMenuItemUI", - /**/ "RadioButtonMenuItemUI", packageName + "JSRadioButtonMenuItemUI", - /**/ "RadioButtonUI", packageName + "JSRadioButtonUI", - /**/ "ToggleButtonUI", packageName + "JSToggleButtonUI", - /**/ "PopupMenuUI", packageName + "JSPopupMenuUI", - "ProgressBarUI", packageName + "JSProgressBarUI", - /**/ "ScrollBarUI", packageName + "JSScrollBarUI", - /**/ "ScrollPaneUI", packageName + "JSScrollPaneUI", - "SplitPaneUI", packageName + "JSSplitPaneUI", - /**/ "SliderUI", packageName + "JSSliderUI", - /**/ "SeparatorUI", packageName + "JSSeparatorUI", - "SpinnerUI", packageName + "JSSpinnerUI", - /**/ "ToolBarSeparatorUI", packageName + "JSToolBarSeparatorUI", - /**/ "PopupMenuSeparatorUI", packageName + "JSPopupMenuSeparatorUI", - "TabbedPaneUI", packageName + "JSTabbedPaneUI", - /**/ "TextAreaUI", packageName + "JSTextAreaUI", - /**/ "TextFieldUI", packageName + "JSTextFieldUI", - /**/ "PasswordFieldUI", packageName + "JSPasswordFieldUI", - "TextPaneUI", packageName + "JSTextPaneUI", - "EditorPaneUI", packageName + "JSEditorPaneUI", - "TreeUI", packageName + "JSTreeUI", - /**/ "LabelUI", packageName + "JSLabelUI", - "ListUI", packageName + "JSListUI", - "ToolBarUI", packageName + "JSToolBarUI", - "ToolTipUI", packageName + "JSToolTipUI", - /**/ "ComboBoxUI", packageName + "JSComboBoxUI", - "TableUI", packageName + "JSTableUI", - "TableHeaderUI", packageName + "JSTableHeaderUI", - "InternalFrameUI", packageName + "JSInternalFrameUI", - "DesktopPaneUI", packageName + "JSDesktopPaneUI", - "DesktopIconUI", packageName + "JSDesktopIconUI", - "OptionPaneUI", packageName + "JSOptionPaneUI", - /**/ "PanelUI", packageName + "JSPanelUI", - /**/ "ViewportUI", packageName + "JSViewportUI", - /**/ "RootPaneUI", packageName + "JSRootPaneUI" - }; - - table.putDefaults(uiDefaults); - } - - /** - * Populates {@code table} with system colors. This creates an array of - * {@code name-color} pairs and invokes {@code loadSystemColors}. - *

    - * The name is a {@code String} that corresponds to the name of one of the - * static {@code SystemColor} fields in the {@code SystemColor} class. A - * name-color pair is created for every such {@code SystemColor} field. - *

    - * The {@code color} corresponds to a hex {@code String} as understood by - * {@code Color.decode}. For example, one of the {@code name-color} pairs is - * {@code "desktop"-"#005C5C"}. This corresponds to the {@code SystemColor} - * field {@code desktop}, with a color value of {@code new Color(0x005C5C)}. - *

    - * The following shows two of the {@code name-color} pairs: - * - *

    -	 * String[] nameColorPairs = new String[] { "desktop", "#005C5C", "activeCaption",
    -	 * 		"#000080" };
    -	 * loadSystemColors(table, nameColorPairs, isNativeLookAndFeel());
    -	 * 
    - * - * As previously stated, this invokes {@code loadSystemColors} with the - * supplied {@code table} and {@code name-color} pair array. The last argument - * to {@code loadSystemColors} indicates whether the value of the field in - * {@code SystemColor} should be used. This method passes the value of - * {@code isNativeLookAndFeel()} as the last argument to - * {@code loadSystemColors}. - * - * @param table - * the {@code UIDefaults} object the values are added to - * @throws NullPointerException - * if {@code table} is {@code null} - * - * @see jsjava.awt.SystemColor - * @see #getDefaults - * @see #loadSystemColors - */ - protected void initSystemColorDefaults(UIDefaults table) { - String[] defaultSystemColors = { - - -// "desktop", "#005C5C", /* -// * Color of the -// * desktop -// * background -// */ -// "activeCaption", "#000080", /* -// * Color for captions (title bars) when they are -// * active. -// */ -// "activeCaptionText", "#FFFFFF", /* -// * Text color for text in captions (title -// * bars). -// */ -// "activeCaptionBorder", "#C0C0C0", /* -// * Border color for caption (title bar) -// * window borders. -// */ -// "inactiveCaption", "#808080", /* -// * Color for captions (title bars) when not -// * active. -// */ -// "inactiveCaptionText", "#C0C0C0", /* -// * Text color for text in inactive -// * captions (title bars). -// */ -// "inactiveCaptionBorder", "#C0C0C0", /* -// * Border color for inactive caption -// * (title bar) window borders. -// */ - // plaf.metal.OceanTheme - "window", "#FFFFFF", /* Default color for the interior of windows */ -// "windowBorder", "#000000", /* ??? */ - "windowText", "#333333", /* ??? */ - "menu", "#C0C0C0", /* Background color for menus */ - "menuText", "#333333", /* Text color for menus */ - "text", "#C0C0C0", /* Text background color */ - "textText", "#333333", /* Text foreground color */ -// "textHighlight", "#000080", /* Text background color when selected */ -// "textHighlightText", "#FFFFFF", /* Text color when selected */ -// "textInactiveText", "#808080", /* Text color when disabled */ - "control", "#EEEEEE", // SECONDARY3 Default color for controls (buttons, sliders, etc) - "controlText", "#333333", // Default color for text in controls -// "controlHighlight", "#C0C0C0", /* -// * Specular highlight (opposite of the -// * shadow) -// */ -// "controlLtHighlight", "#FFFFFF", /* Highlight color for controls */ -// "controlShadow", "#808080", /* Shadow color for controls */ -// "controlDkShadow", "#000000", /* Dark shadow color for controls */ - "scrollbar", "#E0E0E0", /* Scrollbar background (usually the "track") */ - "info", "#FFFFE1", /* ??? */ - "infoText", "#000000" /* ??? */ - }; - - loadSystemColors(table, defaultSystemColors, isNativeLookAndFeel()); - } - - /** - * Populates {@code table} with the {@code name-color} pairs in - * {@code systemColors}. Refer to {@link #initSystemColorDefaults(UIDefaults)} - * for details on the format of {@code systemColors}. - *

    - * An entry is added to {@code table} for each of the {@code name-color} pairs - * in {@code systemColors}. The entry key is the {@code name} of the - * {@code name-color} pair. - *

    - * The value of the entry corresponds to the {@code color} of the - * {@code name-color} pair. The value of the entry is calculated in one of two - * ways. With either approach the value is always a {@code ColorUIResource}. - *

    - * If {@code useNative} is {@code false}, the {@code color} is created by - * using {@code Color.decode} to convert the {@code String} into a - * {@code Color}. If {@code decode} can not convert the {@code String} into a - * {@code Color} ({@code NumberFormatException} is thrown) then a - * {@code ColorUIResource} of black is used. - *

    - * If {@code useNative} is {@code true}, the {@code color} is the value of the - * field in {@code SystemColor} with the same name as the {@code name} of the - * {@code name-color} pair. If the field is not valid, a - * {@code ColorUIResource} of black is used. - * - * @param table - * the {@code UIDefaults} object the values are added to - * @param systemColors - * array of {@code name-color} pairs as described in - * {@link #initSystemColorDefaults(UIDefaults)} - * @param useNative - * whether the color is obtained from {@code SystemColor} or - * {@code Color.decode} - * @throws NullPointerException - * if {@code systemColors} is {@code null}; or {@code systemColors} - * is not empty, and {@code table} is {@code null}; or one of the - * names of the {@code name-color} pairs is {@code null}; or - * {@code useNative} is {@code false} and one of the {@code colors} - * of the {@code name-color} pairs is {@code null} - * @throws ArrayIndexOutOfBoundsException - * if {@code useNative} is {@code false} and - * {@code systemColors.length} is odd - * - * @see #initSystemColorDefaults(jsjavax.swing.UIDefaults) - * @see jsjava.awt.SystemColor - * @see jsjava.awt.Color#decode(String) - */ - protected void loadSystemColors(UIDefaults table, String[] systemColors, - boolean useNative) { - /* - * PENDING(hmuller) We don't load the system colors below because they're - * not reliable. Hopefully we'll be able to do better in a future version of - * AWT. - */ -// if (useNative) { -// for (int i = 0; i < systemColors.length; i += 2) { -// Color color = Color.black; -// // try { -// // String name = systemColors[i]; -// // color = (Color)(SystemColor.class.getField(name).get(null)); -// // } catch (Exception e) { -// // } -// table.put(systemColors[i], new ColorUIResource(color)); -// } -// } else { - for (int i = 0; i < systemColors.length; i += 2) { - Color color = Color.black; - try { - color = Color.decode(systemColors[i + 1]); - } catch (NumberFormatException e) { - e.printStackTrace(); - } - table.put(systemColors[i], new ColorUIResource(color)); - } -// } - } - - /** - * Initialize the defaults table with the name of the ResourceBundle used for - * getting localized defaults. Also initialize the default locale used when no - * locale is passed into UIDefaults.get(). The default locale should generally - * not be relied upon. It is here for compatability with releases prior to - * 1.4. - */ - private void initResourceBundle(UIDefaults table) { - // table.setDefaultLocale( Locale.getDefault() ); - // table.addResourceBundle( - // "com.sun.swing.internal.plaf.basic.resources.basic" ); - } - - /** - * Populates {@code table} with the defaults for the basic look and feel. - * - * @param table - * the {@code UIDefaults} to add the values to - * @throws NullPointerException - * if {@code table} is {@code null} - */ - protected void initComponentDefaults(UIDefaults table) { - - initResourceBundle(table); - - // // *** Shared Integers - // Integer fiveHundred = new Integer(500); - - // *** Shared Longs - Long oneThousand = new Long(1000); - - // *** Shared Fonts - Integer twelve = new Integer(12); - Integer fontPlain = new Integer(Font.PLAIN); - // Integer fontBold = new Integer(Font.BOLD); - // Object dialogPlain12 = new SwingLazyValue( - // "jsjavax.swing.plaf.FontUIResource", - // null, - // new Object[] {Font.DIALOG, fontPlain, twelve}); - Object serifPlain12 = new FontUIResource(Font.SERIF, Font.PLAIN, 12); - Object sansSerifPlain12 = new FontUIResource(Font.SANS_SERIF, Font.PLAIN, - 12); - Object dialogPlain12 = new FontUIResource(Font.DIALOG, Font.PLAIN, 12); - Object monospacedPlain12 = new FontUIResource(Font.MONOSPACED, Font.PLAIN, 12); - // Object dialogBold12 = new SwingLazyValue( - // "jsjavax.swing.plaf.FontUIResource", - // null, - // new Object[] {Font.DIALOG, fontBold, twelve}); - // - - // *** Shared Colors - // ColorUIResource red = new ColorUIResource(Color.red); - ColorUIResource black = new ColorUIResource(Color.black); - ColorUIResource white = new ColorUIResource(Color.white); - // ColorUIResource yellow = new ColorUIResource(Color.yellow); - ColorUIResource gray = new ColorUIResource(Color.gray); - // ColorUIResource lightGray = new ColorUIResource(Color.lightGray); - ColorUIResource darkGray = new ColorUIResource(Color.darkGray); - // ColorUIResource scrollBarTrack = new ColorUIResource(224, 224, 224); - - Color control = table.getColor("control"); - // Color controlDkShadow = table.getColor("controlDkShadow"); - // Color controlHighlight = table.getColor("controlHighlight"); - // Color controlLtHighlight = table.getColor("controlLtHighlight"); - // Color controlShadow = table.getColor("controlShadow"); - Color controlText = table.getColor("controlText"); - Color menu = table.getColor("menu"); - Color menuText = table.getColor("menuText"); - // Color textHighlight = table.getColor("textHighlight"); - // Color textHighlightText = table.getColor("textHighlightText"); - // Color textInactiveText = table.getColor("textInactiveText"); - Color textText = table.getColor("textText"); - Color window = table.getColor("window"); - - // *** Shared Insets - InsetsUIResource zeroInsets = new InsetsUIResource(0, 0, 0, 0); - InsetsUIResource twoInsets = new InsetsUIResource(2, 2, 2, 2); - InsetsUIResource threeInsets = new InsetsUIResource(3, 3, 3, 3); - - // // *** Shared Borders - // Object marginBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders$MarginBorder"); - // Object etchedBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource", - // "getEtchedBorderUIResource"); - // Object loweredBevelBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource", - // "getLoweredBevelBorderUIResource"); - // - // Object popupMenuBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getInternalFrameBorder"); - // - // Object blackLineBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource", - // "getBlackLineBorderUIResource"); - // Object focusCellHighlightBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource$LineBorderUIResource", - // null, - // new Object[] {yellow}); - // - // Object noFocusBorder = new - // BorderUIResource.EmptyBorderUIResource(1,1,1,1); - // - // Object tableHeaderBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource$BevelBorderUIResource", - // null, - // new Object[] { new Integer(BevelBorder.RAISED), - // controlLtHighlight, - // control, - // controlDkShadow, - // controlShadow }); - // - // - // // *** Button value objects - // - // Object buttonBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getButtonBorder"); - // - // Object buttonToggleBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getToggleButtonBorder"); - // - // Object radioButtonBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getRadioButtonBorder"); - // - // // *** FileChooser / FileView value objects - // - // Object newFolderIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/NewFolder.gif"); - // Object upFolderIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/UpFolder.gif"); - // Object homeFolderIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/HomeFolder.gif"); - // Object detailsViewIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/DetailsView.gif"); - // Object listViewIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/ListView.gif"); - // Object directoryIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/Directory.gif"); - // Object fileIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/File.gif"); - // Object computerIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/Computer.gif"); - // Object hardDriveIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/HardDrive.gif"); - // Object floppyDriveIcon = SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/FloppyDrive.gif"); - // - // - // // *** InternalFrame value objects - // - // Object internalFrameBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getInternalFrameBorder"); - // - // // *** List value objects - // - Object listCellRendererActiveValue = new UIDefaults.ActiveValue() { - public Object createValue(UIDefaults table) { - return new DefaultListCellRenderer.UIResource(); - } - }; - - // - // // *** Menus value objects - // - // Object menuBarBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getMenuBarBorder"); - // - // Object menuItemCheckIcon = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "getMenuItemCheckIcon"); - // - // Object menuItemArrowIcon = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "getMenuItemArrowIcon"); - // - // - // Object menuArrowIcon = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "getMenuArrowIcon"); - // - // Object checkBoxIcon = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "getCheckBoxIcon"); - // - // Object radioButtonIcon = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "getRadioButtonIcon"); - // - // Object checkBoxMenuItemIcon = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "getCheckBoxMenuItemIcon"); - // - // Object radioButtonMenuItemIcon = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "getRadioButtonMenuItemIcon"); - // - // Object menuItemAcceleratorDelimiter = new String("+"); - // - // // *** OptionPane value objects - // - // Object optionPaneMinimumSize = new DimensionUIResource(262, 90); - // - Integer zero = new Integer(0); - // Object zeroBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource", - // new Object[] {zero, zero, zero, zero}); - // - // Integer ten = new Integer(10); - // Object optionPaneBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource", - // new Object[] {ten, ten, twelve, ten}); - // - // Object optionPaneButtonAreaBorder = new SwingLazyValue( - // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource", - // new Object[] {new Integer(6), zero, zero, zero}); - // - // - // // *** ProgessBar value objects - // - // Object progressBarBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getProgressBarBorder"); - // - // // ** ScrollBar value objects - // - // Object minimumThumbSize = new DimensionUIResource(8,8); - // Object maximumThumbSize = new DimensionUIResource(4096,4096); - // - // // ** Slider value objects - // - // Object sliderFocusInsets = twoInsets; - // - // Object toolBarSeparatorSize = new DimensionUIResource( 10, 10 ); - // - // - // // *** SplitPane value objects - // - // Object splitPaneBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getSplitPaneBorder"); - // Object splitPaneDividerBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getSplitPaneDividerBorder"); - // - // ** TabbedBane value objects - - Object tabbedPaneTabInsets = new InsetsUIResource(0, 4, 1, 4); - - Object tabbedPaneTabPadInsets = new InsetsUIResource(2, 2, 2, 1); - - Object tabbedPaneTabAreaInsets = new InsetsUIResource(3, 2, 0, 2); - - Object tabbedPaneContentBorderInsets = new InsetsUIResource(2, 2, 3, 3); - - // *** Text value objects - - // Object textFieldBorder = - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicBorders", - // "getTextFieldBorder"); - // - Object editorMargin = threeInsets; - - // Object caretBlinkRate = fiveHundred; - Integer four = new Integer(4); - // - // Object[] allAuditoryCues = new Object[] { - // "CheckBoxMenuItem.commandSound", - // "InternalFrame.closeSound", - // "InternalFrame.maximizeSound", - // "InternalFrame.minimizeSound", - // "InternalFrame.restoreDownSound", - // "InternalFrame.restoreUpSound", - // "MenuItem.commandSound", - // "OptionPane.errorSound", - // "OptionPane.informationSound", - // "OptionPane.questionSound", - // "OptionPane.warningSound", - // "PopupMenu.popupSound", - // "RadioButtonMenuItem.commandSound"}; - // - // Object[] noAuditoryCues = new Object[] {"mute"}; - // - // // *** Component Defaults - // - Object[] defaults = { - "*.font", - dialogPlain12, - "*.background", - control, - "*.foreground", - controlText, - // *** Auditory Feedback - // "AuditoryCues.cueList", allAuditoryCues, - // "AuditoryCues.allAuditoryCues", allAuditoryCues, - // "AuditoryCues.noAuditoryCues", noAuditoryCues, - // // this key defines which of the various cues to render. - // // L&Fs that want auditory feedback NEED to override playList. - // "AuditoryCues.playList", null, - - // *** Buttons - // "Button.defaultButtonFollowsFocus", Boolean.TRUE, - // "Button.font", dialogPlain12, - // "Button.background", control, - // "Button.foreground", controlText, - // "Button.shadow", controlShadow, - // "Button.darkShadow", controlDkShadow, - // "Button.light", controlHighlight, - // "Button.highlight", controlLtHighlight, - // "Button.border", buttonBorder, - "Button.margin", - new InsetsUIResource(2, 14, 2, 14), - // "Button.textIconGap", four, - // "Button.textShiftOffset", zero, - // "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { - // "SPACE", "pressed", - // "released SPACE", "released", - // "ENTER", "pressed", - // "released ENTER", "released" - // }), - // - // "ToggleButton.font", dialogPlain12, - // "ToggleButton.background", control, - // "ToggleButton.foreground", controlText, - // "ToggleButton.shadow", controlShadow, - // "ToggleButton.darkShadow", controlDkShadow, - // "ToggleButton.light", controlHighlight, - // "ToggleButton.highlight", controlLtHighlight, - // "ToggleButton.border", buttonToggleBorder, - "ToggleButton.margin", - new InsetsUIResource(2, 14, 2, 14), - "ToggleButton.textIconGap", - four, - "ToggleButton.textShiftOffset", - zero, - // "ToggleButton.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "SPACE", "pressed", - // "released SPACE", "released" - // }), - // - // "RadioButton.font", dialogPlain12, - // "RadioButton.background", control, - // "RadioButton.foreground", controlText, - // "RadioButton.shadow", controlShadow, - // "RadioButton.darkShadow", controlDkShadow, - // "RadioButton.light", controlHighlight, - // "RadioButton.highlight", controlLtHighlight, - // "RadioButton.border", radioButtonBorder, - "RadioButton.margin", - twoInsets, - "RadioButton.textIconGap", - four, - "RadioButton.textShiftOffset", - zero, - // "RadioButton.icon", radioButtonIcon, - // "RadioButton.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "SPACE", "pressed", - // "released SPACE", "released", - // "RETURN", "pressed" - // }), - // - // "CheckBox.font", dialogPlain12, - // "CheckBox.background", control, - // "CheckBox.foreground", controlText, - // "CheckBox.border", radioButtonBorder, - "CheckBox.margin", - twoInsets, - "CheckBox.textIconGap", - four, - "CheckBox.textShiftOffset", - zero, - // "CheckBox.icon", checkBoxIcon, - // "CheckBox.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "SPACE", "pressed", - // "released SPACE", "released" - // }), - // "FileChooser.useSystemExtensionHiding", Boolean.FALSE, - - // *** ColorChooser - // "ColorChooser.font", dialogPlain12, - // "ColorChooser.background", control, - // "ColorChooser.foreground", controlText, - // - "ColorChooser.swatchesSwatchSize", - new Dimension(10, 10), - "ColorChooser.swatchesRecentSwatchSize", - new Dimension(10, 10), - "ColorChooser.swatchesDefaultRecentColor", - control, - - // *** ComboBox - "ComboBox.font", - sansSerifPlain12, - "ComboBox.background", - window, - "ComboBox.foreground", - textText, - // "ComboBox.buttonBackground", control, - // "ComboBox.buttonShadow", controlShadow, - // "ComboBox.buttonDarkShadow", controlDkShadow, - // "ComboBox.buttonHighlight", controlLtHighlight, - // "ComboBox.selectionBackground", textHighlight, - // "ComboBox.selectionForeground", textHighlightText, - // "ComboBox.disabledBackground", control, - // "ComboBox.disabledForeground", textInactiveText, - "ComboBox.timeFactor", - oneThousand, - "ComboBox.isEnterSelectablePopup", - Boolean.FALSE, - // "ComboBox.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ESCAPE", "hidePopup", - // "PAGE_UP", "pageUpPassThrough", - // "PAGE_DOWN", "pageDownPassThrough", - // "HOME", "homePassThrough", - // "END", "endPassThrough", - // "ENTER", "enterPressed" - // }), - // - // *** FileChooser - - // "FileChooser.newFolderIcon", newFolderIcon, - // "FileChooser.upFolderIcon", upFolderIcon, - // "FileChooser.homeFolderIcon", homeFolderIcon, - // "FileChooser.detailsViewIcon", detailsViewIcon, - // "FileChooser.listViewIcon", listViewIcon, - "FileChooser.readOnly", - Boolean.FALSE, - // "FileChooser.usesSingleFilePane", Boolean.FALSE, - // "FileChooser.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ESCAPE", "cancelSelection", - // "F5", "refresh", - // }), - // - // "FileView.directoryIcon", directoryIcon, - // "FileView.fileIcon", fileIcon, - // "FileView.computerIcon", computerIcon, - // "FileView.hardDriveIcon", hardDriveIcon, - // "FileView.floppyDriveIcon", floppyDriveIcon, - - // *** InternalFrame - // "InternalFrame.titleFont", dialogBold12, - // "InternalFrame.borderColor", control, - // "InternalFrame.borderShadow", controlShadow, - // "InternalFrame.borderDarkShadow", controlDkShadow, - // "InternalFrame.borderHighlight", controlLtHighlight, - // "InternalFrame.borderLight", controlHighlight, - // "InternalFrame.border", internalFrameBorder, - // "InternalFrame.icon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/JavaCup16.png"), - // - // /* Default frame icons are undefined for Basic. */ - // "InternalFrame.maximizeIcon", - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "createEmptyFrameIcon"), - // "InternalFrame.minimizeIcon", - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "createEmptyFrameIcon"), - // "InternalFrame.iconifyIcon", - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "createEmptyFrameIcon"), - // "InternalFrame.closeIcon", - // new SwingLazyValue( - // "jsjavax.swing.plaf.basic.BasicIconFactory", - // "createEmptyFrameIcon"), - // // InternalFrame Auditory Cue Mappings - // "InternalFrame.closeSound", null, - // "InternalFrame.maximizeSound", null, - // "InternalFrame.minimizeSound", null, - // "InternalFrame.restoreDownSound", null, - // "InternalFrame.restoreUpSound", null, - // - // "InternalFrame.activeTitleBackground", table.get("activeCaption"), - // "InternalFrame.activeTitleForeground", - // table.get("activeCaptionText"), - // "InternalFrame.inactiveTitleBackground", - // table.get("inactiveCaption"), - // "InternalFrame.inactiveTitleForeground", - // table.get("inactiveCaptionText"), - // "InternalFrame.windowBindings", new Object[] { - // "shift ESCAPE", "showSystemMenu", - // "ctrl SPACE", "showSystemMenu", - // "ESCAPE", "hideSystemMenu"}, - // - // "InternalFrameTitlePane.iconifyButtonOpacity", Boolean.TRUE, - // "InternalFrameTitlePane.maximizeButtonOpacity", Boolean.TRUE, - // "InternalFrameTitlePane.closeButtonOpacity", Boolean.TRUE, - - // "DesktopIcon.border", internalFrameBorder, - // - // "Desktop.minOnScreenInsets", threeInsets, - // "Desktop.background", table.get("desktop"), - // "Desktop.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ctrl F5", "restore", - // "ctrl F4", "close", - // "ctrl F7", "move", - // "ctrl F8", "resize", - // "RIGHT", "right", - // "KP_RIGHT", "right", - // "shift RIGHT", "shrinkRight", - // "shift KP_RIGHT", "shrinkRight", - // "LEFT", "left", - // "KP_LEFT", "left", - // "shift LEFT", "shrinkLeft", - // "shift KP_LEFT", "shrinkLeft", - // "UP", "up", - // "KP_UP", "up", - // "shift UP", "shrinkUp", - // "shift KP_UP", "shrinkUp", - // "DOWN", "down", - // "KP_DOWN", "down", - // "shift DOWN", "shrinkDown", - // "shift KP_DOWN", "shrinkDown", - // "ESCAPE", "escape", - // "ctrl F9", "minimize", - // "ctrl F10", "maximize", - // "ctrl F6", "selectNextFrame", - // "ctrl TAB", "selectNextFrame", - // "ctrl alt F6", "selectNextFrame", - // "shift ctrl alt F6", "selectPreviousFrame", - // "ctrl F12", "navigateNext", - // "shift ctrl F12", "navigatePrevious" - // }), - - // *** Label - // "Label.font", dialogPlain12, - // "Label.background", control, - // "Label.foreground", controlText, - // "Label.disabledForeground", white, - // "Label.disabledShadow", controlShadow, - "Label.border", - null, - - // *** List - // "List.font", dialogPlain12, - "List.background", - window, - "List.foreground", - textText, - // "List.selectionBackground", textHighlight, - // "List.selectionForeground", textHighlightText, - // "List.noFocusBorder", noFocusBorder, - // "List.focusCellHighlightBorder", focusCellHighlightBorder, - // "List.dropLineColor", controlShadow, - // "List.border", null, - "List.cellRenderer", - listCellRendererActiveValue, - "List.timeFactor", - oneThousand, - // "List.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ctrl C", "copy", - // "ctrl V", "paste", - // "ctrl X", "cut", - // "COPY", "copy", - // "PASTE", "paste", - // "CUT", "cut", - // "control INSERT", "copy", - // "shift INSERT", "paste", - // "shift DELETE", "cut", - // "UP", "selectPreviousRow", - // "KP_UP", "selectPreviousRow", - // "shift UP", "selectPreviousRowExtendSelection", - // "shift KP_UP", "selectPreviousRowExtendSelection", - // "ctrl shift UP", "selectPreviousRowExtendSelection", - // "ctrl shift KP_UP", "selectPreviousRowExtendSelection", - // "ctrl UP", "selectPreviousRowChangeLead", - // "ctrl KP_UP", "selectPreviousRowChangeLead", - // "DOWN", "selectNextRow", - // "KP_DOWN", "selectNextRow", - // "shift DOWN", "selectNextRowExtendSelection", - // "shift KP_DOWN", "selectNextRowExtendSelection", - // "ctrl shift DOWN", "selectNextRowExtendSelection", - // "ctrl shift KP_DOWN", "selectNextRowExtendSelection", - // "ctrl DOWN", "selectNextRowChangeLead", - // "ctrl KP_DOWN", "selectNextRowChangeLead", - // "LEFT", "selectPreviousColumn", - // "KP_LEFT", "selectPreviousColumn", - // "shift LEFT", "selectPreviousColumnExtendSelection", - // "shift KP_LEFT", "selectPreviousColumnExtendSelection", - // "ctrl shift LEFT", "selectPreviousColumnExtendSelection", - // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection", - // "ctrl LEFT", "selectPreviousColumnChangeLead", - // "ctrl KP_LEFT", "selectPreviousColumnChangeLead", - // "RIGHT", "selectNextColumn", - // "KP_RIGHT", "selectNextColumn", - // "shift RIGHT", "selectNextColumnExtendSelection", - // "shift KP_RIGHT", "selectNextColumnExtendSelection", - // "ctrl shift RIGHT", "selectNextColumnExtendSelection", - // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection", - // "ctrl RIGHT", "selectNextColumnChangeLead", - // "ctrl KP_RIGHT", "selectNextColumnChangeLead", - // "HOME", "selectFirstRow", - // "shift HOME", "selectFirstRowExtendSelection", - // "ctrl shift HOME", "selectFirstRowExtendSelection", - // "ctrl HOME", "selectFirstRowChangeLead", - // "END", "selectLastRow", - // "shift END", "selectLastRowExtendSelection", - // "ctrl shift END", "selectLastRowExtendSelection", - // "ctrl END", "selectLastRowChangeLead", - // "PAGE_UP", "scrollUp", - // "shift PAGE_UP", "scrollUpExtendSelection", - // "ctrl shift PAGE_UP", "scrollUpExtendSelection", - // "ctrl PAGE_UP", "scrollUpChangeLead", - // "PAGE_DOWN", "scrollDown", - // "shift PAGE_DOWN", "scrollDownExtendSelection", - // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", - // "ctrl PAGE_DOWN", "scrollDownChangeLead", - // "ctrl A", "selectAll", - // "ctrl SLASH", "selectAll", - // "ctrl BACK_SLASH", "clearSelection", - // "SPACE", "addToSelection", - // "ctrl SPACE", "toggleAndAnchor", - // "shift SPACE", "extendTo", - // "ctrl shift SPACE", "moveSelectionTo" - // }), - // "List.focusInputMap.RightToLeft", - // new UIDefaults.LazyInputMap(new Object[] { - // "LEFT", "selectNextColumn", - // "KP_LEFT", "selectNextColumn", - // "shift LEFT", "selectNextColumnExtendSelection", - // "shift KP_LEFT", "selectNextColumnExtendSelection", - // "ctrl shift LEFT", "selectNextColumnExtendSelection", - // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection", - // "ctrl LEFT", "selectNextColumnChangeLead", - // "ctrl KP_LEFT", "selectNextColumnChangeLead", - // "RIGHT", "selectPreviousColumn", - // "KP_RIGHT", "selectPreviousColumn", - // "shift RIGHT", "selectPreviousColumnExtendSelection", - // "shift KP_RIGHT", "selectPreviousColumnExtendSelection", - // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection", - // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection", - // "ctrl RIGHT", "selectPreviousColumnChangeLead", - // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead", - // }), - // - // *** Menus - "MenuBar.font", - dialogPlain12, - "MenuBar.background", - menu, - "MenuBar.foreground", - menuText, - // "MenuBar.shadow", controlShadow, - // "MenuBar.highlight", controlLtHighlight, - // "MenuBar.border", menuBarBorder, - // "MenuBar.windowBindings", new Object[] { - // "F10", "takeFocus" }, - // - "MenuItem.font", dialogPlain12, - //"MenuItem.acceleratorFont", dialogPlain12, - "MenuItem.background", - menu, - "MenuItem.foreground", - menuText, - // "MenuItem.selectionForeground", textHighlightText, - // "MenuItem.selectionBackground", textHighlight, - // "MenuItem.disabledForeground", null, - // "MenuItem.acceleratorForeground", menuText, - // "MenuItem.acceleratorSelectionForeground", textHighlightText, - // "MenuItem.acceleratorDelimiter", menuItemAcceleratorDelimiter, - // "MenuItem.border", marginBorder, - // "MenuItem.borderPainted", Boolean.FALSE, - "MenuItem.margin", - twoInsets, - // "MenuItem.checkIcon", menuItemCheckIcon, - // "MenuItem.arrowIcon", menuItemArrowIcon, - // "MenuItem.commandSound", null, - // - "RadioButtonMenuItem.font", dialogPlain12, - // "RadioButtonMenuItem.acceleratorFont", dialogPlain12, - "RadioButtonMenuItem.background", - menu, - "RadioButtonMenuItem.foreground", - menuText, - // "RadioButtonMenuItem.selectionForeground", textHighlightText, - // "RadioButtonMenuItem.selectionBackground", textHighlight, - // "RadioButtonMenuItem.disabledForeground", null, - // "RadioButtonMenuItem.acceleratorForeground", menuText, - // "RadioButtonMenuItem.acceleratorSelectionForeground", - // textHighlightText, - // "RadioButtonMenuItem.border", marginBorder, - // "RadioButtonMenuItem.borderPainted", Boolean.FALSE, - "RadioButtonMenuItem.margin", - twoInsets, - // "RadioButtonMenuItem.checkIcon", radioButtonMenuItemIcon, - // "RadioButtonMenuItem.arrowIcon", menuItemArrowIcon, - // "RadioButtonMenuItem.commandSound", null, - - "CheckBoxMenuItem.font", dialogPlain12, - // "CheckBoxMenuItem.acceleratorFont", dialogPlain12, - "CheckBoxMenuItem.background", - menu, - "CheckBoxMenuItem.foreground", - menuText, - // "CheckBoxMenuItem.selectionForeground", textHighlightText, - // "CheckBoxMenuItem.selectionBackground", textHighlight, - // "CheckBoxMenuItem.disabledForeground", null, - // "CheckBoxMenuItem.acceleratorForeground", menuText, - // "CheckBoxMenuItem.acceleratorSelectionForeground", textHighlightText, - // "CheckBoxMenuItem.border", marginBorder, - // "CheckBoxMenuItem.borderPainted", Boolean.FALSE, - "CheckBoxMenuItem.margin", - twoInsets, - // "CheckBoxMenuItem.checkIcon", checkBoxMenuItemIcon, - // "CheckBoxMenuItem.arrowIcon", menuItemArrowIcon, - // "CheckBoxMenuItem.commandSound", null, - - // "Menu.font", dialogPlain12, - // "Menu.acceleratorFont", dialogPlain12, - "Menu.background", - menu, - "Menu.foreground", - menuText, - // "Menu.selectionForeground", textHighlightText, - // "Menu.selectionBackground", textHighlight, - // "Menu.disabledForeground", null, - // "Menu.acceleratorForeground", menuText, - // "Menu.acceleratorSelectionForeground", textHighlightText, - // "Menu.border", marginBorder, - // "Menu.borderPainted", Boolean.FALSE, - "Menu.margin", - twoInsets, - // "Menu.checkIcon", menuItemCheckIcon, - // "Menu.arrowIcon", menuArrowIcon, - // "Menu.menuPopupOffsetX", new Integer(0), - // "Menu.menuPopupOffsetY", new Integer(0), - // "Menu.submenuPopupOffsetX", new Integer(0), - // "Menu.submenuPopupOffsetY", new Integer(0), - // "Menu.shortcutKeys", new int[] {KeyEvent.ALT_MASK}, - // "Menu.crossMenuMnemonic", Boolean.TRUE, - // Menu.cancelMode affects the cancel menu action behaviour; - // currently supports: - // "hideLastSubmenu" (default) - // hides the last open submenu, - // and move selection one step back - // "hideMenuTree" - // resets selection and - // hide the entire structure of open menu and its submenus - // "Menu.cancelMode", "hideLastSubmenu", - - // Menu.preserveTopLevelSelection affects - // the cancel menu action behaviour - // if set to true then top level menu selection - // will be preserved when the last popup was cancelled; - // the menu itself will be unselect with the next cancel action - // "Menu.preserveTopLevelSelection", Boolean.FALSE, - - // PopupMenu - // "PopupMenu.font", dialogPlain12, - "PopupMenu.background", - menu, - "PopupMenu.foreground", - menuText, - // "PopupMenu.border", popupMenuBorder, - // Internal Frame Auditory Cue Mappings - // "PopupMenu.popupSound", null, - // // These window InputMap bindings are used when the Menu is - // // selected. - // "PopupMenu.selectedWindowInputMapBindings", new Object[] { - // "ESCAPE", "cancel", - // "DOWN", "selectNext", - // "KP_DOWN", "selectNext", - // "UP", "selectPrevious", - // "KP_UP", "selectPrevious", - // "LEFT", "selectParent", - // "KP_LEFT", "selectParent", - // "RIGHT", "selectChild", - // "KP_RIGHT", "selectChild", - // "ENTER", "return", - // "ctrl ENTER", "return", - // "SPACE", "return" - // }, - // "PopupMenu.selectedWindowInputMapBindings.RightToLeft", new Object[] - // { - // "LEFT", "selectChild", - // "KP_LEFT", "selectChild", - // "RIGHT", "selectParent", - // "KP_RIGHT", "selectParent", - // }, - "PopupMenu.consumeEventOnClose", - Boolean.FALSE, - - // *** OptionPane - // You can additionaly define OptionPane.messageFont which will - // dictate the fonts used for the message, and - // OptionPane.buttonFont, which defines the font for the buttons. - // "OptionPane.font", dialogPlain12, - // "OptionPane.background", control, - // "OptionPane.foreground", controlText, - "OptionPane.messageForeground", - controlText, - // "OptionPane.border", optionPaneBorder, - // "OptionPane.messageAreaBorder", zeroBorder, - // "OptionPane.buttonAreaBorder", optionPaneButtonAreaBorder, - // "OptionPane.minimumSize", optionPaneMinimumSize, - // "OptionPane.errorIcon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/Error.gif"), - // "OptionPane.informationIcon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/Inform.gif"), - // "OptionPane.warningIcon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/Warn.gif"), - // "OptionPane.questionIcon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/Question.gif"), - // "OptionPane.windowBindings", new Object[] { - // "ESCAPE", "close" }, - // // OptionPane Auditory Cue Mappings - // "OptionPane.errorSound", null, - // "OptionPane.informationSound", null, // Info and Plain - // "OptionPane.questionSound", null, - // "OptionPane.warningSound", null, - // "OptionPane.buttonClickThreshhold", fiveHundred, - - // *** Panel - "Panel.font", - dialogPlain12, - "Panel.background", - control, - "Panel.foreground", - textText, - - // *** ProgressBar - // "ProgressBar.font", dialogPlain12, - // "ProgressBar.foreground", textHighlight, - // "ProgressBar.background", control, - // "ProgressBar.selectionForeground", control, - // "ProgressBar.selectionBackground", textHighlight, - // "ProgressBar.border", progressBarBorder, - "ProgressBar.cellLength", - new Integer(1), - "ProgressBar.cellSpacing", - zero, - "ProgressBar.repaintInterval", - new Integer(50), - "ProgressBar.cycleTime", - new Integer(3000), - "ProgressBar.horizontalSize", - new DimensionUIResource(146, 12), - "ProgressBar.verticalSize", - new DimensionUIResource(12, 146), - - // *** Separator - // "Separator.shadow", controlShadow, // DEPRECATED - DO NOT USE! - // "Separator.highlight", controlLtHighlight, // DEPRECATED - DO NOT - // USE! - // - // "Separator.background", controlLtHighlight, - // "Separator.foreground", controlShadow, - - // *** ScrollBar/ScrollPane/Viewport - // "ScrollBar.background", scrollBarTrack, - "ScrollBar.foreground", - control, - // "ScrollBar.track", table.get("scrollbar"), - // "ScrollBar.trackHighlight", controlDkShadow, - // "ScrollBar.thumb", control, - // "ScrollBar.thumbHighlight", controlLtHighlight, - // "ScrollBar.thumbDarkShadow", controlDkShadow, - // "ScrollBar.thumbShadow", controlShadow, - // "ScrollBar.border", null, - // "ScrollBar.minimumThumbSize", minimumThumbSize, - // "ScrollBar.maximumThumbSize", maximumThumbSize, - // "ScrollBar.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "positiveUnitIncrement", - // "KP_RIGHT", "positiveUnitIncrement", - // "DOWN", "positiveUnitIncrement", - // "KP_DOWN", "positiveUnitIncrement", - // "PAGE_DOWN", "positiveBlockIncrement", - // "LEFT", "negativeUnitIncrement", - // "KP_LEFT", "negativeUnitIncrement", - // "UP", "negativeUnitIncrement", - // "KP_UP", "negativeUnitIncrement", - // "PAGE_UP", "negativeBlockIncrement", - // "HOME", "minScroll", - // "END", "maxScroll" - // }), - // "ScrollBar.ancestorInputMap.RightToLeft", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "negativeUnitIncrement", - // "KP_RIGHT", "negativeUnitIncrement", - // "LEFT", "positiveUnitIncrement", - // "KP_LEFT", "positiveUnitIncrement", - // }), - "ScrollBar.width", - new Integer(16), - - // "ScrollPane.font", dialogPlain12, - // "ScrollPane.background", control, - // "ScrollPane.foreground", controlText, - // "ScrollPane.border", textFieldBorder, - // "ScrollPane.viewportBorder", null, - // "ScrollPane.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "unitScrollRight", - // "KP_RIGHT", "unitScrollRight", - // "DOWN", "unitScrollDown", - // "KP_DOWN", "unitScrollDown", - // "LEFT", "unitScrollLeft", - // "KP_LEFT", "unitScrollLeft", - // "UP", "unitScrollUp", - // "KP_UP", "unitScrollUp", - // "PAGE_UP", "scrollUp", - // "PAGE_DOWN", "scrollDown", - // "ctrl PAGE_UP", "scrollLeft", - // "ctrl PAGE_DOWN", "scrollRight", - // "ctrl HOME", "scrollHome", - // "ctrl END", "scrollEnd" - // }), - // "ScrollPane.ancestorInputMap.RightToLeft", - // new UIDefaults.LazyInputMap(new Object[] { - // "ctrl PAGE_UP", "scrollRight", - // "ctrl PAGE_DOWN", "scrollLeft", - // }), - // - // "Viewport.font", dialogPlain12, - // "Viewport.background", control, - "Viewport.foreground", - textText, - - // *** Slider - // "Slider.font", dialogPlain12, - // "Slider.foreground", control, - // "Slider.background", control, - // "Slider.highlight", controlLtHighlight, - // "Slider.tickColor", Color.black, - // "Slider.shadow", controlShadow, - // "Slider.focus", controlDkShadow, - // "Slider.border", null, - "Slider.horizontalSize", - new Dimension(200, 21), - "Slider.verticalSize", - new Dimension(21, 200), - "Slider.minimumHorizontalSize", - new Dimension(36, 21), - "Slider.minimumVerticalSize", - new Dimension(21, 36), - // "Slider.focusInsets", sliderFocusInsets, - // "Slider.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "positiveUnitIncrement", - // "KP_RIGHT", "positiveUnitIncrement", - // "DOWN", "negativeUnitIncrement", - // "KP_DOWN", "negativeUnitIncrement", - // "PAGE_DOWN", "negativeBlockIncrement", - // "LEFT", "negativeUnitIncrement", - // "KP_LEFT", "negativeUnitIncrement", - // "UP", "positiveUnitIncrement", - // "KP_UP", "positiveUnitIncrement", - // "PAGE_UP", "positiveBlockIncrement", - // "HOME", "minScroll", - // "END", "maxScroll" - // }), - // "Slider.focusInputMap.RightToLeft", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "negativeUnitIncrement", - // "KP_RIGHT", "negativeUnitIncrement", - // "LEFT", "positiveUnitIncrement", - // "KP_LEFT", "positiveUnitIncrement", - // }), - // - // *** Spinner - "Spinner.font", - monospacedPlain12, - // "Spinner.background", control, - // "Spinner.foreground", control, - // "Spinner.border", textFieldBorder, - // "Spinner.arrowButtonBorder", null, - // "Spinner.arrowButtonInsets", null, - "Spinner.arrowButtonSize", - new Dimension(16, 5), - // "Spinner.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "UP", "increment", - // "KP_UP", "increment", - // "DOWN", "decrement", - // "KP_DOWN", "decrement", - // }), - // "Spinner.editorBorderPainted", Boolean.FALSE, - "Spinner.editorAlignment", - JTextField.TRAILING, - - // *** SplitPane - "SplitPane.background", - control, - // "SplitPane.highlight", controlLtHighlight, - // "SplitPane.shadow", controlShadow, - // "SplitPane.darkShadow", controlDkShadow, - // "SplitPane.border", splitPaneBorder, - "SplitPane.dividerSize", - new Integer(7), - // "SplitPaneDivider.border", splitPaneDividerBorder, - "SplitPaneDivider.draggingColor", - darkGray, - // "SplitPane.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "UP", "negativeIncrement", - // "DOWN", "positiveIncrement", - // "LEFT", "negativeIncrement", - // "RIGHT", "positiveIncrement", - // "KP_UP", "negativeIncrement", - // "KP_DOWN", "positiveIncrement", - // "KP_LEFT", "negativeIncrement", - // "KP_RIGHT", "positiveIncrement", - // "HOME", "selectMin", - // "END", "selectMax", - // "F8", "startResize", - // "F6", "toggleFocus", - // "ctrl TAB", "focusOutForward", - // "ctrl shift TAB", "focusOutBackward" - // }), - // - // *** TabbedPane - // "TabbedPane.font", dialogPlain12, - // "TabbedPane.background", control, - // "TabbedPane.foreground", controlText, - // "TabbedPane.highlight", controlLtHighlight, - // "TabbedPane.light", controlHighlight, - // "TabbedPane.shadow", controlShadow, - // "TabbedPane.darkShadow", controlDkShadow, - "TabbedPane.selected", - null, - // "TabbedPane.focus", controlText, - "TabbedPane.textIconGap", - four, - - // Causes tabs to be painted on top of the content area border. - // The amount of overlap is then controlled by tabAreaInsets.bottom, - // which is zero by default - "TabbedPane.tabsOverlapBorder", - Boolean.FALSE, - // "TabbedPane.selectionFollowsFocus", Boolean.TRUE, - - "TabbedPane.labelShift", - 1, - "TabbedPane.selectedLabelShift", - -1, - "TabbedPane.tabInsets", - tabbedPaneTabInsets, - "TabbedPane.selectedTabPadInsets", - tabbedPaneTabPadInsets, - "TabbedPane.tabAreaInsets", - tabbedPaneTabAreaInsets, - "TabbedPane.contentBorderInsets", - tabbedPaneContentBorderInsets, - "TabbedPane.tabRunOverlay", - new Integer(2), - // "TabbedPane.tabsOpaque", Boolean.TRUE, - // "TabbedPane.contentOpaque", Boolean.TRUE, - // "TabbedPane.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "navigateRight", - // "KP_RIGHT", "navigateRight", - // "LEFT", "navigateLeft", - // "KP_LEFT", "navigateLeft", - // "UP", "navigateUp", - // "KP_UP", "navigateUp", - // "DOWN", "navigateDown", - // "KP_DOWN", "navigateDown", - // "ctrl DOWN", "requestFocusForVisibleComponent", - // "ctrl KP_DOWN", "requestFocusForVisibleComponent", - // }), - // "TabbedPane.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ctrl PAGE_DOWN", "navigatePageDown", - // "ctrl PAGE_UP", "navigatePageUp", - // "ctrl UP", "requestFocus", - // "ctrl KP_UP", "requestFocus", - // }), - // - // - // *** Table - // "Table.font", dialogPlain12, - // "Table.foreground", controlText, // cell text color - "Table.background", - window, // cell background color - // "Table.selectionForeground", textHighlightText, - // "Table.selectionBackground", textHighlight, - // "Table.dropLineColor", controlShadow, - "Table.dropLineShortColor", - black, - "Table.gridColor", - gray, // grid line color - "Table.focusCellBackground", - window, - "Table.focusCellForeground", - controlText, - // "Table.focusCellHighlightBorder", focusCellHighlightBorder, - // "Table.scrollPaneBorder", loweredBevelBorder, - // "Table.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ctrl C", "copy", - // "ctrl V", "paste", - // "ctrl X", "cut", - // "COPY", "copy", - // "PASTE", "paste", - // "CUT", "cut", - // "control INSERT", "copy", - // "shift INSERT", "paste", - // "shift DELETE", "cut", - // "RIGHT", "selectNextColumn", - // "KP_RIGHT", "selectNextColumn", - // "shift RIGHT", "selectNextColumnExtendSelection", - // "shift KP_RIGHT", "selectNextColumnExtendSelection", - // "ctrl shift RIGHT", "selectNextColumnExtendSelection", - // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection", - // "ctrl RIGHT", "selectNextColumnChangeLead", - // "ctrl KP_RIGHT", "selectNextColumnChangeLead", - // "LEFT", "selectPreviousColumn", - // "KP_LEFT", "selectPreviousColumn", - // "shift LEFT", "selectPreviousColumnExtendSelection", - // "shift KP_LEFT", "selectPreviousColumnExtendSelection", - // "ctrl shift LEFT", "selectPreviousColumnExtendSelection", - // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection", - // "ctrl LEFT", "selectPreviousColumnChangeLead", - // "ctrl KP_LEFT", "selectPreviousColumnChangeLead", - // "DOWN", "selectNextRow", - // "KP_DOWN", "selectNextRow", - // "shift DOWN", "selectNextRowExtendSelection", - // "shift KP_DOWN", "selectNextRowExtendSelection", - // "ctrl shift DOWN", "selectNextRowExtendSelection", - // "ctrl shift KP_DOWN", "selectNextRowExtendSelection", - // "ctrl DOWN", "selectNextRowChangeLead", - // "ctrl KP_DOWN", "selectNextRowChangeLead", - // "UP", "selectPreviousRow", - // "KP_UP", "selectPreviousRow", - // "shift UP", "selectPreviousRowExtendSelection", - // "shift KP_UP", "selectPreviousRowExtendSelection", - // "ctrl shift UP", "selectPreviousRowExtendSelection", - // "ctrl shift KP_UP", "selectPreviousRowExtendSelection", - // "ctrl UP", "selectPreviousRowChangeLead", - // "ctrl KP_UP", "selectPreviousRowChangeLead", - // "HOME", "selectFirstColumn", - // "shift HOME", "selectFirstColumnExtendSelection", - // "ctrl shift HOME", "selectFirstRowExtendSelection", - // "ctrl HOME", "selectFirstRow", - // "END", "selectLastColumn", - // "shift END", "selectLastColumnExtendSelection", - // "ctrl shift END", "selectLastRowExtendSelection", - // "ctrl END", "selectLastRow", - // "PAGE_UP", "scrollUpChangeSelection", - // "shift PAGE_UP", "scrollUpExtendSelection", - // "ctrl shift PAGE_UP", "scrollLeftExtendSelection", - // "ctrl PAGE_UP", "scrollLeftChangeSelection", - // "PAGE_DOWN", "scrollDownChangeSelection", - // "shift PAGE_DOWN", "scrollDownExtendSelection", - // "ctrl shift PAGE_DOWN", "scrollRightExtendSelection", - // "ctrl PAGE_DOWN", "scrollRightChangeSelection", - // "TAB", "selectNextColumnCell", - // "shift TAB", "selectPreviousColumnCell", - // "ENTER", "selectNextRowCell", - // "shift ENTER", "selectPreviousRowCell", - // "ctrl A", "selectAll", - // "ctrl SLASH", "selectAll", - // "ctrl BACK_SLASH", "clearSelection", - // "ESCAPE", "cancel", - // "F2", "startEditing", - // "SPACE", "addToSelection", - // "ctrl SPACE", "toggleAndAnchor", - // "shift SPACE", "extendTo", - // "ctrl shift SPACE", "moveSelectionTo", - // "F8", "focusHeader" - // }), - // "Table.ancestorInputMap.RightToLeft", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "selectPreviousColumn", - // "KP_RIGHT", "selectPreviousColumn", - // "shift RIGHT", "selectPreviousColumnExtendSelection", - // "shift KP_RIGHT", "selectPreviousColumnExtendSelection", - // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection", - // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection", - // "ctrl RIGHT", "selectPreviousColumnChangeLead", - // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead", - // "LEFT", "selectNextColumn", - // "KP_LEFT", "selectNextColumn", - // "shift LEFT", "selectNextColumnExtendSelection", - // "shift KP_LEFT", "selectNextColumnExtendSelection", - // "ctrl shift LEFT", "selectNextColumnExtendSelection", - // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection", - // "ctrl LEFT", "selectNextColumnChangeLead", - // "ctrl KP_LEFT", "selectNextColumnChangeLead", - // "ctrl PAGE_UP", "scrollRightChangeSelection", - // "ctrl PAGE_DOWN", "scrollLeftChangeSelection", - // "ctrl shift PAGE_UP", "scrollRightExtendSelection", - // "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", - // }), - // "Table.ascendingSortIcon", new SwingLazyValue( - // "sun.swing.icon.SortArrowIcon", - // null, new Object[] { Boolean.TRUE, - // "Table.sortIconColor" }), - // "Table.descendingSortIcon", new SwingLazyValue( - // "sun.swing.icon.SortArrowIcon", - // null, new Object[] { Boolean.FALSE, - // "Table.sortIconColor" }), - // "Table.sortIconColor", controlShadow, - // - // "TableHeader.font", dialogPlain12, - // "TableHeader.foreground", controlText, // header text color - // "TableHeader.background", control, // header background - // "TableHeader.cellBorder", tableHeaderBorder, - - // Support for changing the background/border of the currently - // selected header column when the header has the keyboard focus. - // "TableHeader.focusCellBackground", table.getColor("text"), // like - // text component bg - // "TableHeader.focusCellForeground", null, - // "TableHeader.focusCellBorder", null, - // "TableHeader.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "SPACE", "toggleSortOrder", - // "LEFT", "selectColumnToLeft", - // "KP_LEFT", "selectColumnToLeft", - // "RIGHT", "selectColumnToRight", - // "KP_RIGHT", "selectColumnToRight", - // "alt LEFT", "moveColumnLeft", - // "alt KP_LEFT", "moveColumnLeft", - // "alt RIGHT", "moveColumnRight", - // "alt KP_RIGHT", "moveColumnRight", - // "alt shift LEFT", "resizeLeft", - // "alt shift KP_LEFT", "resizeLeft", - // "alt shift RIGHT", "resizeRight", - // "alt shift KP_RIGHT", "resizeRight", - // "ESCAPE", "focusTable", - // }), - // - // *** Text - "TextField.font", - sansSerifPlain12, - "TextField.background", - window, - "TextField.foreground", - textText, - // "TextField.shadow", controlShadow, - // "TextField.darkShadow", controlDkShadow, - // "TextField.light", controlHighlight, - // "TextField.highlight", controlLtHighlight, - // "TextField.inactiveForeground", textInactiveText, - // "TextField.inactiveBackground", control, - // "TextField.selectionBackground", textHighlight, - // "TextField.selectionForeground", textHighlightText, - // "TextField.caretForeground", textText, - // "TextField.caretBlinkRate", caretBlinkRate, - // "TextField.border", textFieldBorder, - "TextField.margin", - zeroInsets, - - "FormattedTextField.font", - sansSerifPlain12, - "FormattedTextField.background", - window, - "FormattedTextField.foreground", - textText, - // "FormattedTextField.inactiveForeground", textInactiveText, - // "FormattedTextField.inactiveBackground", control, - // "FormattedTextField.selectionBackground", textHighlight, - // "FormattedTextField.selectionForeground", textHighlightText, - "FormattedTextField.caretForeground", - textText, - // "FormattedTextField.caretBlinkRate", caretBlinkRate, - // "FormattedTextField.border", textFieldBorder, - "FormattedTextField.margin", - zeroInsets, - // "FormattedTextField.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ctrl C", DefaultEditorKit.copyAction, - // "ctrl V", DefaultEditorKit.pasteAction, - // "ctrl X", DefaultEditorKit.cutAction, - // "COPY", DefaultEditorKit.copyAction, - // "PASTE", DefaultEditorKit.pasteAction, - // "CUT", DefaultEditorKit.cutAction, - // "control INSERT", DefaultEditorKit.copyAction, - // "shift INSERT", DefaultEditorKit.pasteAction, - // "shift DELETE", DefaultEditorKit.cutAction, - // "shift LEFT", DefaultEditorKit.selectionBackwardAction, - // "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction, - // "shift RIGHT", DefaultEditorKit.selectionForwardAction, - // "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction, - // "ctrl LEFT", DefaultEditorKit.previousWordAction, - // "ctrl KP_LEFT", DefaultEditorKit.previousWordAction, - // "ctrl RIGHT", DefaultEditorKit.nextWordAction, - // "ctrl KP_RIGHT", DefaultEditorKit.nextWordAction, - // "ctrl shift LEFT", DefaultEditorKit.selectionPreviousWordAction, - // "ctrl shift KP_LEFT", DefaultEditorKit.selectionPreviousWordAction, - // "ctrl shift RIGHT", DefaultEditorKit.selectionNextWordAction, - // "ctrl shift KP_RIGHT", DefaultEditorKit.selectionNextWordAction, - // "ctrl A", DefaultEditorKit.selectAllAction, - // "HOME", DefaultEditorKit.beginLineAction, - // "END", DefaultEditorKit.endLineAction, - // "shift HOME", DefaultEditorKit.selectionBeginLineAction, - // "shift END", DefaultEditorKit.selectionEndLineAction, - // "BACK_SPACE", DefaultEditorKit.deletePrevCharAction, - // "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction, - // "ctrl H", DefaultEditorKit.deletePrevCharAction, - // "DELETE", DefaultEditorKit.deleteNextCharAction, - // "ctrl DELETE", DefaultEditorKit.deleteNextWordAction, - // "ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction, - // "RIGHT", DefaultEditorKit.forwardAction, - // "LEFT", DefaultEditorKit.backwardAction, - // "KP_RIGHT", DefaultEditorKit.forwardAction, - // "KP_LEFT", DefaultEditorKit.backwardAction, - // "ENTER", JTextField.notifyAction, - // "ctrl BACK_SLASH", "unselect", - // "control shift O", "toggle-componentOrientation", - // "ESCAPE", "reset-field-edit", - // "UP", "increment", - // "KP_UP", "increment", - // "DOWN", "decrement", - // "KP_DOWN", "decrement", - // }), - // - "PasswordField.font", - monospacedPlain12, - "PasswordField.background", - window, - "PasswordField.foreground", - textText, - // "PasswordField.inactiveForeground", textInactiveText, - // "PasswordField.inactiveBackground", control, - // "PasswordField.selectionBackground", textHighlight, - // "PasswordField.selectionForeground", textHighlightText, - // "PasswordField.caretForeground", textText, - // "PasswordField.caretBlinkRate", caretBlinkRate, - // "PasswordField.border", textFieldBorder, - "PasswordField.margin", - zeroInsets, - "PasswordField.echoChar", - '*', - - "TextArea.font", - monospacedPlain12, - "TextArea.background", - window, - "TextArea.foreground", - textText, - // "TextArea.inactiveForeground", textInactiveText, - // "TextArea.selectionBackground", textHighlight, - // "TextArea.selectionForeground", textHighlightText, - // "TextArea.caretForeground", textText, - // "TextArea.caretBlinkRate", caretBlinkRate, - // "TextArea.border", marginBorder, - "TextArea.margin", - zeroInsets, - - "TextPane.font", - serifPlain12, - "TextPane.background", - white, - "TextPane.foreground", - textText, - // "TextPane.selectionBackground", textHighlight, - // "TextPane.selectionForeground", textHighlightText, - // "TextPane.caretForeground", textText, - // "TextPane.caretBlinkRate", caretBlinkRate, - // "TextPane.inactiveForeground", textInactiveText, - // "TextPane.border", marginBorder, - "TextPane.margin", - editorMargin, - - "EditorPane.font", - serifPlain12, - "EditorPane.background", - white, - "EditorPane.foreground", - textText, - // "EditorPane.selectionBackground", textHighlight, - // "EditorPane.selectionForeground", textHighlightText, - // "EditorPane.caretForeground", textText, - // "EditorPane.caretBlinkRate", caretBlinkRate, - // "EditorPane.inactiveForeground", textInactiveText, - // "EditorPane.border", marginBorder, - "EditorPane.margin", - editorMargin, - // - // "html.pendingImage", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/image-delayed.png"), - // "html.missingImage", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/image-failed.png"), - // *** TitledBorder - // "TitledBorder.font", dialogPlain12, - "TitledBorder.titleColor", - controlText, - // "TitledBorder.border", etchedBorder, - - // *** ToolBar - // "ToolBar.font", dialogPlain12, - // "ToolBar.background", control, - // "ToolBar.foreground", controlText, - // "ToolBar.shadow", controlShadow, - // "ToolBar.darkShadow", controlDkShadow, - // "ToolBar.light", controlHighlight, - // "ToolBar.highlight", controlLtHighlight, - // "ToolBar.dockingBackground", control, - // "ToolBar.dockingForeground", red, - // "ToolBar.floatingBackground", control, - // "ToolBar.floatingForeground", darkGray, - // "ToolBar.border", etchedBorder, - // "ToolBar.separatorSize", toolBarSeparatorSize, - // "ToolBar.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "UP", "navigateUp", - // "KP_UP", "navigateUp", - // "DOWN", "navigateDown", - // "KP_DOWN", "navigateDown", - // "LEFT", "navigateLeft", - // "KP_LEFT", "navigateLeft", - // "RIGHT", "navigateRight", - // "KP_RIGHT", "navigateRight" - // }), - - // *** ToolTips - // "ToolTip.font", sansSerifPlain12, - // "ToolTip.background", table.get("info"), - // "ToolTip.foreground", table.get("infoText"), - // "ToolTip.border", blackLineBorder, - // ToolTips also support backgroundInactive, borderInactive, - // and foregroundInactive - - // *** ToolTipManager - // ToolTipManager.enableToolTipMode currently supports: - // "allWindows" (default): - // enables tool tips for all windows of all java applications, - // whether the windows are active or inactive - // "activeApplication" - // enables tool tips for windows of an application only when - // the application has an active window - // "ToolTipManager.enableToolTipMode", "allWindows", - - // *** Tree - "Tree.paintLines", - Boolean.TRUE, - "Tree.lineTypeDashed", - Boolean.FALSE, - // "Tree.font", dialogPlain12, - "Tree.background", - window, - "Tree.foreground", - textText, - "Tree.hash", - gray, - "Tree.textForeground", - textText, - "Tree.textBackground", - table.get("text"), - // "Tree.selectionForeground", textHighlightText, - // "Tree.selectionBackground", textHighlight, - // "Tree.selectionBorderColor", black, - // "Tree.dropLineColor", controlShadow, - // "Tree.editorBorder", blackLineBorder, - "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", - new Integer(13), "Tree.rowHeight", new Integer(16), - "Tree.scrollsOnExpand", Boolean.TRUE, - // "Tree.openIcon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/TreeOpen.gif"), - // "Tree.closedIcon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/TreeClosed.gif"), - // "Tree.leafIcon", SwingUtilities2.makeIcon(getClass(), - // BasicLookAndFeel.class, - // "icons/TreeLeaf.gif"), - // "Tree.expandedIcon", null, - // "Tree.collapsedIcon", null, - // "Tree.changeSelectionWithFocus", Boolean.TRUE, - // "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, - "Tree.timeFactor", oneThousand, - // "Tree.focusInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ctrl C", "copy", - // "ctrl V", "paste", - // "ctrl X", "cut", - // "COPY", "copy", - // "PASTE", "paste", - // "CUT", "cut", - // "control INSERT", "copy", - // "shift INSERT", "paste", - // "shift DELETE", "cut", - // "UP", "selectPrevious", - // "KP_UP", "selectPrevious", - // "shift UP", "selectPreviousExtendSelection", - // "shift KP_UP", "selectPreviousExtendSelection", - // "ctrl shift UP", "selectPreviousExtendSelection", - // "ctrl shift KP_UP", "selectPreviousExtendSelection", - // "ctrl UP", "selectPreviousChangeLead", - // "ctrl KP_UP", "selectPreviousChangeLead", - // "DOWN", "selectNext", - // "KP_DOWN", "selectNext", - // "shift DOWN", "selectNextExtendSelection", - // "shift KP_DOWN", "selectNextExtendSelection", - // "ctrl shift DOWN", "selectNextExtendSelection", - // "ctrl shift KP_DOWN", "selectNextExtendSelection", - // "ctrl DOWN", "selectNextChangeLead", - // "ctrl KP_DOWN", "selectNextChangeLead", - // "RIGHT", "selectChild", - // "KP_RIGHT", "selectChild", - // "LEFT", "selectParent", - // "KP_LEFT", "selectParent", - // "PAGE_UP", "scrollUpChangeSelection", - // "shift PAGE_UP", "scrollUpExtendSelection", - // "ctrl shift PAGE_UP", "scrollUpExtendSelection", - // "ctrl PAGE_UP", "scrollUpChangeLead", - // "PAGE_DOWN", "scrollDownChangeSelection", - // "shift PAGE_DOWN", "scrollDownExtendSelection", - // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", - // "ctrl PAGE_DOWN", "scrollDownChangeLead", - // "HOME", "selectFirst", - // "shift HOME", "selectFirstExtendSelection", - // "ctrl shift HOME", "selectFirstExtendSelection", - // "ctrl HOME", "selectFirstChangeLead", - // "END", "selectLast", - // "shift END", "selectLastExtendSelection", - // "ctrl shift END", "selectLastExtendSelection", - // "ctrl END", "selectLastChangeLead", - // "F2", "startEditing", - // "ctrl A", "selectAll", - // "ctrl SLASH", "selectAll", - // "ctrl BACK_SLASH", "clearSelection", - // "ctrl LEFT", "scrollLeft", - // "ctrl KP_LEFT", "scrollLeft", - // "ctrl RIGHT", "scrollRight", - // "ctrl KP_RIGHT", "scrollRight", - // "SPACE", "addToSelection", - // "ctrl SPACE", "toggleAndAnchor", - // "shift SPACE", "extendTo", - // "ctrl shift SPACE", "moveSelectionTo" - // }), - // "Tree.focusInputMap.RightToLeft", - // new UIDefaults.LazyInputMap(new Object[] { - // "RIGHT", "selectParent", - // "KP_RIGHT", "selectParent", - // "LEFT", "selectChild", - // "KP_LEFT", "selectChild", - // }), - // "Tree.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "ESCAPE", "cancel" - // }), - // // Bind specific keys that can invoke popup on currently - // // focused JComponent - // "RootPane.ancestorInputMap", - // new UIDefaults.LazyInputMap(new Object[] { - // "shift F10", "postPopup", - // "CONTEXT_MENU", "postPopup" - // }), - // - // // These bindings are only enabled when there is a default - // // button set on the rootpane. - // "RootPane.defaultButtonWindowKeyBindings", new Object[] { - // "ENTER", "press", - // "released ENTER", "release", - // "ctrl ENTER", "press", - // "ctrl released ENTER", "release" - // }, - }; - - table.putDefaults(defaults); - } - - // /** - // * Returns the ui that is of type klass, or null if - // * one can not be found. - // */ - // static Object getUIOfType(ComponentUI ui, Class klass) { - // if (klass.isInstance(ui)) { - // return ui; - // } - // return null; - // } - // - // // ********* Auditory Cue support methods and objects ********* - // // also see the "AuditoryCues" section of the defaults table - // - // /** - // * Returns an ActionMap containing the audio actions - // * for this look and feel. - // *

    - // * The returned ActionMap contains Actions that - // * embody the ability to render an auditory cue. These auditory - // * cues map onto user and system activities that may be useful - // * for an end user to know about (such as a dialog box appearing). - // *

    - // * At the appropriate time, - // * the {@code ComponentUI} is responsible for obtaining an - // * Action out of the ActionMap and passing - // * it to playSound. - // *

    - // * This method first looks up the {@code ActionMap} from the - // * defaults using the key {@code "AuditoryCues.actionMap"}. - // *

    - // * If the value is {@code non-null}, it is returned. If the value - // * of the default {@code "AuditoryCues.actionMap"} is {@code null} - // * and the value of the default {@code "AuditoryCues.cueList"} is - // * {@code non-null}, an {@code ActionMapUIResource} is created and - // * populated. Population is done by iterating over each of the - // * elements of the {@code "AuditoryCues.cueList"} array, and - // * invoking {@code createAudioAction()} to create an {@code - // * Action} for each element. The resulting {@code Action} is - // * placed in the {@code ActionMapUIResource}, using the array - // * element as the key. For example, if the {@code - // * "AuditoryCues.cueList"} array contains a single-element, {@code - // * "audioKey"}, the {@code ActionMapUIResource} is created, then - // * populated by way of {@code actionMap.put(cueList[0], - // * createAudioAction(cueList[0]))}. - // *

    - // * If the value of the default {@code "AuditoryCues.actionMap"} is - // * {@code null} and the value of the default - // * {@code "AuditoryCues.cueList"} is {@code null}, an empty - // * {@code ActionMapUIResource} is created. - // * - // * - // * @return an ActionMap containing {@code Actions} - // * responsible for playing auditory cues - // * @throws ClassCastException if the value of the - // * default {@code "AuditoryCues.actionMap"} is not an - // * {@code ActionMap}, or the value of the default - // * {@code "AuditoryCues.cueList"} is not an {@code Object[]} - // * @see #createAudioAction - // * @see #playSound(Action) - // * @since 1.4 - // */ - // protected ActionMap getAudioActionMap() { - // ActionMap audioActionMap = (ActionMap)UIManager.get( - // "AuditoryCues.actionMap"); - // if (audioActionMap == null) { - // Object[] acList = (Object[])UIManager.get("AuditoryCues.cueList"); - // if (acList != null) { - // audioActionMap = new ActionMapUIResource(); - // for(int counter = acList.length-1; counter >= 0; counter--) { - // audioActionMap.put(acList[counter], - // createAudioAction(acList[counter])); - // } - // } - // UIManager.getLookAndFeelDefaults().put("AuditoryCues.actionMap", - // audioActionMap); - // } - // return audioActionMap; - // } - // - // /** - // * Creates and returns an {@code Action} used to play a sound. - // *

    - // * If {@code key} is {@code non-null}, an {@code Action} is created - // * using the value from the defaults with key {@code key}. The value - // * identifies the sound resource to load when - // * {@code actionPerformed} is invoked on the {@code Action}. The - // * sound resource is loaded into a {@code byte[]} by way of - // * {@code getClass().getResourceAsStream()}. - // * - // * @param key the key identifying the audio action - // * @return an {@code Action} used to play the source, or {@code null} - // * if {@code key} is {@code null} - // * @see #playSound(Action) - // * @since 1.4 - // */ - // protected Action createAudioAction(Object key) { - // if (key != null) { - // String audioKey = (String)key; - // String audioValue = (String)UIManager.get(key); - // return new AudioAction(audioKey, audioValue); - // } else { - // return null; - // } - // } - // - // /** - // * Pass the name String to the super constructor. This is used - // * later to identify the Action and decide whether to play it or - // * not. Store the resource String. I is used to get the audio - // * resource. In this case, the resource is an audio file. - // * - // * @since 1.4 - // */ - // private class AudioAction extends AbstractAction implements LineListener { - // // We strive to only play one sound at a time (other platforms - // // appear to do this). This is done by maintaining the field - // // clipPlaying. Every time a sound is to be played, - // // cancelCurrentSound is invoked to cancel any sound that may be - // // playing. - // private String audioResource; - // private byte[] audioBuffer; - // - // /** - // * The String is the name of the Action and - // * points to the audio resource. - // * The byte[] is a buffer of the audio bits. - // */ - // public AudioAction(String name, String resource) { - // super(name); - // audioResource = resource; - // } - // - // public void actionPerformed(ActionEvent e) { - // if (audioBuffer == null) { - // audioBuffer = loadAudioData(audioResource); - // } - // if (audioBuffer != null) { - // cancelCurrentSound(null); - // try { - // AudioInputStream soundStream = - // AudioSystem.getAudioInputStream( - // new ByteArrayInputStream(audioBuffer)); - // DataLine.Info info = - // new DataLine.Info(Clip.class, soundStream.getFormat()); - // Clip clip = (Clip) AudioSystem.getLine(info); - // clip.open(soundStream); - // clip.addLineListener(this); - // - // synchronized(audioLock) { - // clipPlaying = clip; - // } - // - // clip.start(); - // } catch (Exception ex) {} - // } - // } - // - // public void update(LineEvent event) { - // if (event.getType() == LineEvent.Type.STOP) { - // cancelCurrentSound((Clip)event.getLine()); - // } - // } - // - // /** - // * If the parameter is null, or equal to the currently - // * playing sound, then cancel the currently playing sound. - // */ - // private void cancelCurrentSound(Clip clip) { - // Clip lastClip = null; - // - // synchronized(audioLock) { - // if (clip == null || clip == clipPlaying) { - // lastClip = clipPlaying; - // clipPlaying = null; - // } - // } - // - // if (lastClip != null) { - // lastClip.removeLineListener(this); - // lastClip.close(); - // } - // } - // } - // - // /** - // * Utility method that loads audio bits for the specified - // * soundFile filename. If this method is unable to - // * build a viable path name from the baseClass and - // * soundFile passed into this method, it will - // * return null. - // * - // * @param baseClass used as the root class/location to get the - // * soundFile from - // * @param soundFile the name of the audio file to be retrieved - // * from disk - // * @return A byte[] with audio data or null - // * @since 1.4 - // */ - // private byte[] loadAudioData(final String soundFile){ - // if (soundFile == null) { - // return null; - // } - // /* Copy resource into a byte array. This is - // * necessary because several browsers consider - // * Class.getResource a security risk since it - // * can be used to load additional classes. - // * Class.getResourceAsStream just returns raw - // * bytes, which we can convert to a sound. - // */ - // byte[] buffer = (byte[])AccessController.doPrivileged( - // new PrivilegedAction() { - // public Object run() { - // try { - // InputStream resource = BasicLookAndFeel.this. - // getClass().getResourceAsStream(soundFile); - // if (resource == null) { - // return null; - // } - // BufferedInputStream in = - // new BufferedInputStream(resource); - // ByteArrayOutputStream out = - // new ByteArrayOutputStream(1024); - // byte[] buffer = new byte[1024]; - // int n; - // while ((n = in.read(buffer)) > 0) { - // out.write(buffer, 0, n); - // } - // in.close(); - // out.flush(); - // buffer = out.toByteArray(); - // return buffer; - // } catch (IOException ioe) { - // System.err.println(ioe.toString()); - // return null; - // } - // } - // }); - // if (buffer == null) { - // System.err.println(getClass().getName() + "/" + - // soundFile + " not found."); - // return null; - // } - // if (buffer.length == 0) { - // System.err.println("warning: " + soundFile + - // " is zero-length"); - // return null; - // } - // return buffer; - // } - // - // /** - // * If necessary, invokes {@code actionPerformed} on - // * {@code audioAction} to play a sound. - // * The {@code actionPerformed} method is invoked if the value of - // * the {@code "AuditoryCues.playList"} default is a {@code - // * non-null} {@code Object[]} containing a {@code String} entry - // * equal to the name of the {@code audioAction}. - // * - // * @param audioAction an Action that knows how to render the audio - // * associated with the system or user activity - // * that is occurring; a value of {@code null}, is - // * ignored - // * @throws ClassCastException if {@code audioAction} is {@code non-null} - // * and the value of the default {@code "AuditoryCues.playList"} - // * is not an {@code Object[]} - // * @since 1.4 - // */ - // protected void playSound(Action audioAction) { - // if (audioAction != null) { - // Object[] audioStrings = (Object[]) - // UIManager.get("AuditoryCues.playList"); - // if (audioStrings != null) { - // // create a HashSet to help us decide to play or not - // HashSet audioCues = new HashSet(); - // for (int i = 0; i < audioStrings.length; i++) { - // audioCues.add(audioStrings[i]); - // } - // // get the name of the Action - // String actionName = (String)audioAction.getValue(Action.NAME); - // // if the actionName is in the audioCues HashSet, play it. - // if (audioCues.contains(actionName)) { - // audioAction.actionPerformed(new - // ActionEvent(this, ActionEvent.ACTION_PERFORMED, - // actionName)); - // } - // } - // } - // } - // - // - // /** - // * Sets the parent of the passed in ActionMap to be the audio action - // * map. - // */ - // static void installAudioActionMap(ActionMap map) { - // LookAndFeel laf = UIManager.getLookAndFeel(); - // if (laf instanceof BasicLookAndFeel) { - // map.setParent(((BasicLookAndFeel)laf).getAudioActionMap()); - // } - // } - // - // - // /** - // * Helper method to play a named sound. - // * - // * @param c JComponent to play the sound for. - // * @param actionKey Key for the sound. - // */ - // static void playSound(JComponent c, Object actionKey) { - // LookAndFeel laf = UIManager.getLookAndFeel(); - // if (laf instanceof BasicLookAndFeel) { - // ActionMap map = c.getActionMap(); - // if (map != null) { - // Action audioAction = map.get(actionKey); - // if (audioAction != null) { - // // pass off firing the Action to a utility method - // ((BasicLookAndFeel)laf).playSound(audioAction); - // } - // } - // } - // } - // - // /** - // * This class contains listener that watches for all the mouse - // * events that can possibly invoke popup on the component - // */ - // class AWTEventHelper implements AWTEventListener,PrivilegedAction { - // AWTEventHelper() { - // super(); - // AccessController.doPrivileged(this); - // } - // - // public Object run() { - // Toolkit tk = Toolkit.getDefaultToolkit(); - // if(invocator == null) { - // tk.addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK); - // } else { - // tk.removeAWTEventListener(invocator); - // } - // // Return value not used. - // return null; - // } - // - // public void eventDispatched(AWTEvent ev) { - // int eventID = ev.getID(); - // if((eventID & AWTEvent.MOUSE_EVENT_MASK) != 0) { - // MouseEvent me = (MouseEvent) ev; - // if(me.isPopupTrigger()) { - // MenuElement[] elems = MenuSelectionManager - // .defaultManager() - // .getSelectedPath(); - // if(elems != null && elems.length != 0) { - // return; - // // We shall not interfere with already opened menu - // } - // Object c = me.getSource(); - // JComponent src = null; - // if(c instanceof JComponent) { - // src = (JComponent) c; - // } else if(c instanceof BasicSplitPaneDivider) { - // // Special case - if user clicks on divider we must - // // invoke popup from the SplitPane - // src = (JComponent) - // ((BasicSplitPaneDivider)c).getParent(); - // } - // if(src != null) { - // if(src.getComponentPopupMenu() != null) { - // Point pt = src.getPopupLocation(me); - // if(pt == null) { - // pt = me.getPoint(); - // pt = SwingUtilities.convertPoint((Component)c, - // pt, src); - // } - // src.getComponentPopupMenu().show(src, pt.x, pt.y); - // me.consume(); - // } - // } - // } - // } - // /* Activate a JInternalFrame if necessary. */ - // if (eventID == MouseEvent.MOUSE_PRESSED) { - // Object object = ev.getSource(); - // if (!(object instanceof Component)) { - // return; - // } - // Component component = (Component)object; - // if (component != null) { - // Component parent = component; - // while (parent != null && !(parent instanceof Window)) { - // if (parent instanceof JInternalFrame) { - // // Activate the frame. - // try { ((JInternalFrame)parent).setSelected(true); } - // catch (PropertyVetoException e1) { } - // } - // parent = parent.getParent(); - // } - // } - // } - // } - // } - // - @Override - public String getName() { - return "SwingJS"; - } - - @Override - public String getID() { - return "SwingJS"; - } - - @Override - public String getDescription() { - return "SwingJS L&F"; - } - - @Override - public boolean isNativeLookAndFeel() { - return true; - } - - @Override - public boolean isSupportedLookAndFeel() { - return true; - } -} +/* + * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package swingjs.plaf; + +//import jsjava.awt.AWTEvent; +import jsjava.awt.Color; +import jsjava.awt.Dimension; +import jsjava.awt.Font; +import jsjavax.swing.DefaultListCellRenderer; +import jsjavax.swing.JTextField; +//import jsjava.awt.Component; +//import jsjava.awt.Dimension; +//import jsjava.awt.Font; +//import jsjava.awt.Point; +//import jsjava.awt.Toolkit; +//import jsjava.awt.Window; +//import jsjava.awt.event.AWTEventListener; +//import jsjava.awt.event.ActionEvent; +//import jsjava.awt.event.KeyEvent; +//import jsjava.awt.event.MouseEvent; +//import jsjava.beans.PropertyChangeEvent; +//import jsjava.beans.PropertyChangeListener; +//import jsjava.beans.PropertyVetoException; +//import java.io.BufferedInputStream; +//import java.io.ByteArrayInputStream; +//import java.io.ByteArrayOutputStream; +//import java.io.IOException; +//import java.io.InputStream; +////import java.io.Serializable; +//import jsjava.security.AccessController; +//import jsjava.security.PrivilegedAction; +//import java.util.HashSet; +//import jsjava.util.Locale; +// +////import jsjavax.sound.sampled.AudioInputStream; +////import jsjavax.sound.sampled.AudioSystem; +////import jsjavax.sound.sampled.Clip; +////import jsjavax.sound.sampled.DataLine; +////import jsjavax.sound.sampled.LineEvent; +////import jsjavax.sound.sampled.LineListener; +//import jsjavax.swing.AbstractAction; +//import jsjavax.swing.Action; +//import jsjavax.swing.ActionMap; +//import jsjavax.swing.DefaultListCellRenderer; +//import jsjavax.swing.JComponent; +////import jsjavax.swing.JInternalFrame; +//import jsjavax.swing.JTextField; +//import jsjavax.swing.LookAndFeel; +//import jsjavax.swing.MenuElement; +//import jsjavax.swing.MenuSelectionManager; +//import jsjavax.swing.SwingUtilities; +import jsjavax.swing.LookAndFeel; +import jsjavax.swing.UIDefaults; +//import jsjavax.swing.UIManager; +//import jsjavax.swing.border.BevelBorder; +//import jsjavax.swing.plaf.ActionMapUIResource; +//import jsjavax.swing.plaf.BorderUIResource; +import jsjavax.swing.plaf.ColorUIResource; +import jsjavax.swing.plaf.FontUIResource; +//import jsjavax.swing.plaf.ComponentUI; +import jsjavax.swing.plaf.DimensionUIResource; +//import jsjavax.swing.plaf.DimensionUIResource; +//import jsjavax.swing.plaf.InsetsUIResource; +////import jsjavax.swing.plaf.basic.popupMenuUI; +////import jsjavax.swing.plaf.basic.BasicSplitPaneDivider; +//import jsjavax.swing.text.DefaultEditorKit; +// +//import jssun.awt.AppContext; +//import jssun.swing.SwingUtilities2; +////import jssun.swing.SwingLazyValue; +// +import jsjavax.swing.plaf.InsetsUIResource; +import jssun.swing.SwingLazyValue; + +/** + * A base class to use in creating a look and feel for Swing. + *

    + * Each of the {@code ComponentUI}s provided by {@code BasicLookAndFeel} derives + * its behavior from the defaults table. Unless otherwise noted each of the + * {@code ComponentUI} implementations in this package document the set of + * defaults they use. Unless otherwise noted the defaults are installed at the + * time {@code installUI} is invoked, and follow the recommendations outlined in + * {@code LookAndFeel} for installing defaults. + *

    + * Warning: Serialized objects of this class will not be + * compatible with future Swing releases. The current serialization support is + * appropriate for short term storage or RMI between applications running the + * same version of Swing. As of 1.4, support for long term storage of all + * JavaBeansTM has been added to the + * java.beans package. Please see {@link java.beans.XMLEncoder}. + * + * @author unattributed + */ +public class HTML5LookAndFeel extends LookAndFeel { + // /** + // * Whether or not the developer has created a JPopupMenu. + // */ + // static boolean needsEventHelper; + // + // /** + // * Lock used when manipulating clipPlaying. + // */ + // private transient Object audioLock = new Object(); + // /** + // * The Clip that is currently playing (set in AudioAction). + // */ + // private Clip clipPlaying; + // + // AWTEventHelper invocator = null; + // + // /* + // * Listen for our AppContext being disposed + // */ + // private PropertyChangeListener disposer = null; + // + /** + * Returns the look and feel defaults. The returned {@code UIDefaults} is + * populated by invoking, in order, {@code initClassDefaults}, + * {@code initSystemColorDefaults} and {@code initComponentDefaults}. + *

    + * While this method is public, it should only be invoked by the + * {@code UIManager} when the look and feel is set as the current look and + * feel and after {@code initialize} has been invoked. + * + * @return the look and feel defaults + * + * @see #initClassDefaults + * @see #initSystemColorDefaults + * @see #initComponentDefaults + */ + public UIDefaults getDefaults() { + UIDefaults table = new UIDefaults(610, 0.75f); + + initClassDefaults(table); + initSystemColorDefaults(table); + initComponentDefaults(table); + + return table; + } + + /** + * {@inheritDoc} + */ + public void initialize() { + // if (needsEventHelper) { + // installAWTEventListener(); + // } + } + + void installAWTEventListener() { + // if (invocator == null) { + // invocator = new AWTEventHelper(); + // needsEventHelper = true; + // + // // Add a PropertyChangeListener to our AppContext so we're alerted + // // when the AppContext is disposed(), at which time this laf should + // // be uninitialize()d. + // disposer = new PropertyChangeListener() { + // public void propertyChange(PropertyChangeEvent prpChg) { + // uninitialize(); + // } + // }; + // AppContext.getAppContext().addPropertyChangeListener( + // AppContext.GUI_DISPOSED, + // disposer); + // } + } + + /** + * {@inheritDoc} + */ + public void uninitialize() { + // AppContext context = AppContext.getAppContext(); + // synchronized (popupMenuUI.MOUSE_GRABBER_KEY) { + // Object grabber = context.get(popupMenuUI.MOUSE_GRABBER_KEY); + // if (grabber != null) { + // ((popupMenuUI.MouseGrabber)grabber).uninstall(); + // } + // } + // synchronized (popupMenuUI.MENU_KEYBOARD_HELPER_KEY) { + // Object helper = + // context.get(popupMenuUI.MENU_KEYBOARD_HELPER_KEY); + // if (helper != null) { + // ((popupMenuUI.MenuKeyboardHelper)helper).uninstall(); + // } + // } + // + // if(invocator != null) { + // AccessController.doPrivileged(invocator); + // invocator = null; + // } + // + // if (disposer != null) { + // // Note that we're likely calling removePropertyChangeListener() + // // during the course of AppContext.firePropertyChange(). + // // However, EventListenerAggreggate has code to safely modify + // // the list under such circumstances. + // context.removePropertyChangeListener(AppContext.GUI_DISPOSED, + // disposer); + // disposer = null; + // } + } + + /** + * Populates {@code table} with mappings from {@code uiClassID} to the fully + * qualified name of the ui class. The value for a particular + * {@code uiClassID} is {@code "jsjavax.swing.plaf.basic.Basic + uiClassID"}. + * For example, the value for the {@code uiClassID} {@code TreeUI} is + * {@code "jsjavax.swing.plaf.basic.BasicTreeUI"}. + * + * @param table + * the {@code UIDefaults} instance the entries are added to + * @throws NullPointerException + * if {@code table} is {@code null} + * + * @see jsjavax.swing.LookAndFeel + * @see #getDefaults + */ + protected void initClassDefaults(UIDefaults table) { + final String packageName = "swingjs.plaf."; + Object[] uiDefaults = { + /**/ "ButtonUI", packageName + "JSButtonUI", + /**/ "CheckBoxUI", packageName + "JSCheckBoxUI", + "ColorChooserUI", packageName + "JSColorChooserUI", + /**/ "FormattedTextFieldUI", packageName + "JSFormattedTextFieldUI", + /**/ "MenuBarUI", packageName + "JSMenuBarUI", + /**/ "MenuUI", packageName + "JSMenuUI", + /**/ "MenuItemUI", packageName + "JSMenuItemUI", + /**/ "CheckBoxMenuItemUI", packageName + "JSCheckBoxMenuItemUI", + /**/ "RadioButtonMenuItemUI", packageName + "JSRadioButtonMenuItemUI", + /**/ "RadioButtonUI", packageName + "JSRadioButtonUI", + /**/ "ToggleButtonUI", packageName + "JSToggleButtonUI", + /**/ "PopupMenuUI", packageName + "JSPopupMenuUI", + "ProgressBarUI", packageName + "JSProgressBarUI", + /**/ "ScrollBarUI", packageName + "JSScrollBarUI", + /**/ "ScrollPaneUI", packageName + "JSScrollPaneUI", + "SplitPaneUI", packageName + "JSSplitPaneUI", + /**/ "SliderUI", packageName + "JSSliderUI", + /**/ "SeparatorUI", packageName + "JSSeparatorUI", + "SpinnerUI", packageName + "JSSpinnerUI", + /**/ "ToolBarSeparatorUI", packageName + "JSToolBarSeparatorUI", + /**/ "PopupMenuSeparatorUI", packageName + "JSPopupMenuSeparatorUI", + "TabbedPaneUI", packageName + "JSTabbedPaneUI", + /**/ "TextAreaUI", packageName + "JSTextAreaUI", + /**/ "TextFieldUI", packageName + "JSTextFieldUI", + /**/ "PasswordFieldUI", packageName + "JSPasswordFieldUI", + "TextPaneUI", packageName + "JSTextPaneUI", + "EditorPaneUI", packageName + "JSEditorPaneUI", + "TreeUI", packageName + "JSTreeUI", + /**/ "LabelUI", packageName + "JSLabelUI", + "ListUI", packageName + "JSListUI", + "ToolBarUI", packageName + "JSToolBarUI", + "ToolTipUI", packageName + "JSToolTipUI", + /**/ "ComboBoxUI", packageName + "JSComboBoxUI", + "TableUI", packageName + "JSTableUI", + "TableHeaderUI", packageName + "JSTableHeaderUI", + "InternalFrameUI", packageName + "JSInternalFrameUI", + "DesktopPaneUI", packageName + "JSDesktopPaneUI", + "DesktopIconUI", packageName + "JSDesktopIconUI", + "OptionPaneUI", packageName + "JSOptionPaneUI", + /**/ "PanelUI", packageName + "JSPanelUI", + /**/ "ViewportUI", packageName + "JSViewportUI", + /**/ "RootPaneUI", packageName + "JSRootPaneUI" + }; + + table.putDefaults(uiDefaults); + } + + /** + * Populates {@code table} with system colors. This creates an array of + * {@code name-color} pairs and invokes {@code loadSystemColors}. + *

    + * The name is a {@code String} that corresponds to the name of one of the + * static {@code SystemColor} fields in the {@code SystemColor} class. A + * name-color pair is created for every such {@code SystemColor} field. + *

    + * The {@code color} corresponds to a hex {@code String} as understood by + * {@code Color.decode}. For example, one of the {@code name-color} pairs is + * {@code "desktop"-"#005C5C"}. This corresponds to the {@code SystemColor} + * field {@code desktop}, with a color value of {@code new Color(0x005C5C)}. + *

    + * The following shows two of the {@code name-color} pairs: + * + *

    +	 * String[] nameColorPairs = new String[] { "desktop", "#005C5C", "activeCaption",
    +	 * 		"#000080" };
    +	 * loadSystemColors(table, nameColorPairs, isNativeLookAndFeel());
    +	 * 
    + * + * As previously stated, this invokes {@code loadSystemColors} with the + * supplied {@code table} and {@code name-color} pair array. The last argument + * to {@code loadSystemColors} indicates whether the value of the field in + * {@code SystemColor} should be used. This method passes the value of + * {@code isNativeLookAndFeel()} as the last argument to + * {@code loadSystemColors}. + * + * @param table + * the {@code UIDefaults} object the values are added to + * @throws NullPointerException + * if {@code table} is {@code null} + * + * @see jsjava.awt.SystemColor + * @see #getDefaults + * @see #loadSystemColors + */ + protected void initSystemColorDefaults(UIDefaults table) { + String[] defaultSystemColors = { + + +// "desktop", "#005C5C", /* +// * Color of the +// * desktop +// * background +// */ +// "activeCaption", "#000080", /* +// * Color for captions (title bars) when they are +// * active. +// */ +// "activeCaptionText", "#FFFFFF", /* +// * Text color for text in captions (title +// * bars). +// */ +// "activeCaptionBorder", "#C0C0C0", /* +// * Border color for caption (title bar) +// * window borders. +// */ +// "inactiveCaption", "#808080", /* +// * Color for captions (title bars) when not +// * active. +// */ +// "inactiveCaptionText", "#C0C0C0", /* +// * Text color for text in inactive +// * captions (title bars). +// */ +// "inactiveCaptionBorder", "#C0C0C0", /* +// * Border color for inactive caption +// * (title bar) window borders. +// */ + // plaf.metal.OceanTheme + "window", "#FFFFFF", /* Default color for the interior of windows */ +// "windowBorder", "#000000", /* ??? */ + "windowText", "#333333", /* ??? */ + "menu", "#C0C0C0", /* Background color for menus */ + "menuText", "#333333", /* Text color for menus */ + "text", "#C0C0C0", /* Text background color */ + "textText", "#333333", /* Text foreground color */ +// "textHighlight", "#000080", /* Text background color when selected */ +// "textHighlightText", "#FFFFFF", /* Text color when selected */ +// "textInactiveText", "#808080", /* Text color when disabled */ + "control", "#EEEEEE", // SECONDARY3 Default color for controls (buttons, sliders, etc) + "controlText", "#333333", // Default color for text in controls +// "controlHighlight", "#C0C0C0", /* +// * Specular highlight (opposite of the +// * shadow) +// */ +// "controlLtHighlight", "#FFFFFF", /* Highlight color for controls */ +// "controlShadow", "#808080", /* Shadow color for controls */ +// "controlDkShadow", "#000000", /* Dark shadow color for controls */ + "scrollbar", "#E0E0E0", /* Scrollbar background (usually the "track") */ + "info", "#FFFFE1", /* ??? */ + "infoText", "#000000" /* ??? */ + }; + + loadSystemColors(table, defaultSystemColors, isNativeLookAndFeel()); + } + + /** + * Populates {@code table} with the {@code name-color} pairs in + * {@code systemColors}. Refer to {@link #initSystemColorDefaults(UIDefaults)} + * for details on the format of {@code systemColors}. + *

    + * An entry is added to {@code table} for each of the {@code name-color} pairs + * in {@code systemColors}. The entry key is the {@code name} of the + * {@code name-color} pair. + *

    + * The value of the entry corresponds to the {@code color} of the + * {@code name-color} pair. The value of the entry is calculated in one of two + * ways. With either approach the value is always a {@code ColorUIResource}. + *

    + * If {@code useNative} is {@code false}, the {@code color} is created by + * using {@code Color.decode} to convert the {@code String} into a + * {@code Color}. If {@code decode} can not convert the {@code String} into a + * {@code Color} ({@code NumberFormatException} is thrown) then a + * {@code ColorUIResource} of black is used. + *

    + * If {@code useNative} is {@code true}, the {@code color} is the value of the + * field in {@code SystemColor} with the same name as the {@code name} of the + * {@code name-color} pair. If the field is not valid, a + * {@code ColorUIResource} of black is used. + * + * @param table + * the {@code UIDefaults} object the values are added to + * @param systemColors + * array of {@code name-color} pairs as described in + * {@link #initSystemColorDefaults(UIDefaults)} + * @param useNative + * whether the color is obtained from {@code SystemColor} or + * {@code Color.decode} + * @throws NullPointerException + * if {@code systemColors} is {@code null}; or {@code systemColors} + * is not empty, and {@code table} is {@code null}; or one of the + * names of the {@code name-color} pairs is {@code null}; or + * {@code useNative} is {@code false} and one of the {@code colors} + * of the {@code name-color} pairs is {@code null} + * @throws ArrayIndexOutOfBoundsException + * if {@code useNative} is {@code false} and + * {@code systemColors.length} is odd + * + * @see #initSystemColorDefaults(jsjavax.swing.UIDefaults) + * @see jsjava.awt.SystemColor + * @see jsjava.awt.Color#decode(String) + */ + protected void loadSystemColors(UIDefaults table, String[] systemColors, + boolean useNative) { + /* + * PENDING(hmuller) We don't load the system colors below because they're + * not reliable. Hopefully we'll be able to do better in a future version of + * AWT. + */ +// if (useNative) { +// for (int i = 0; i < systemColors.length; i += 2) { +// Color color = Color.black; +// // try { +// // String name = systemColors[i]; +// // color = (Color)(SystemColor.class.getField(name).get(null)); +// // } catch (Exception e) { +// // } +// table.put(systemColors[i], new ColorUIResource(color)); +// } +// } else { + for (int i = 0; i < systemColors.length; i += 2) { + Color color = Color.black; + try { + color = Color.decode(systemColors[i + 1]); + } catch (NumberFormatException e) { + e.printStackTrace(); + } + table.put(systemColors[i], new ColorUIResource(color)); + } +// } + } + + /** + * Initialize the defaults table with the name of the ResourceBundle used for + * getting localized defaults. Also initialize the default locale used when no + * locale is passed into UIDefaults.get(). The default locale should generally + * not be relied upon. It is here for compatability with releases prior to + * 1.4. + */ + private void initResourceBundle(UIDefaults table) { + // table.setDefaultLocale( Locale.getDefault() ); + // table.addResourceBundle( + // "com.sun.swing.internal.plaf.basic.resources.basic" ); + } + + /** + * Populates {@code table} with the defaults for the basic look and feel. + * + * @param table + * the {@code UIDefaults} to add the values to + * @throws NullPointerException + * if {@code table} is {@code null} + */ + protected void initComponentDefaults(UIDefaults table) { + + initResourceBundle(table); + + // // *** Shared Integers + // Integer fiveHundred = new Integer(500); + + // *** Shared Longs + Long oneThousand = new Long(1000); + + // *** Shared Fonts + Integer twelve = new Integer(12); + Integer fontPlain = new Integer(Font.PLAIN); + // Integer fontBold = new Integer(Font.BOLD); + // Object dialogPlain12 = new SwingLazyValue( + // "jsjavax.swing.plaf.FontUIResource", + // null, + // new Object[] {Font.DIALOG, fontPlain, twelve}); + Object serifPlain12 = new FontUIResource(Font.SERIF, Font.PLAIN, 12); + Object sansSerifPlain12 = new FontUIResource(Font.SANS_SERIF, Font.PLAIN, + 12); + Object dialogPlain12 = new FontUIResource(Font.DIALOG, Font.PLAIN, 12); + Object monospacedPlain12 = new FontUIResource(Font.MONOSPACED, Font.PLAIN, 12); + // Object dialogBold12 = new SwingLazyValue( + // "jsjavax.swing.plaf.FontUIResource", + // null, + // new Object[] {Font.DIALOG, fontBold, twelve}); + // + + // *** Shared Colors + // ColorUIResource red = new ColorUIResource(Color.red); + ColorUIResource black = new ColorUIResource(Color.black); + ColorUIResource white = new ColorUIResource(Color.white); + // ColorUIResource yellow = new ColorUIResource(Color.yellow); + ColorUIResource gray = new ColorUIResource(Color.gray); + // ColorUIResource lightGray = new ColorUIResource(Color.lightGray); + ColorUIResource darkGray = new ColorUIResource(Color.darkGray); + // ColorUIResource scrollBarTrack = new ColorUIResource(224, 224, 224); + + Color control = table.getColor("control"); + // Color controlDkShadow = table.getColor("controlDkShadow"); + // Color controlHighlight = table.getColor("controlHighlight"); + // Color controlLtHighlight = table.getColor("controlLtHighlight"); + // Color controlShadow = table.getColor("controlShadow"); + Color controlText = table.getColor("controlText"); + Color menu = table.getColor("menu"); + Color menuText = table.getColor("menuText"); + // Color textHighlight = table.getColor("textHighlight"); + // Color textHighlightText = table.getColor("textHighlightText"); + // Color textInactiveText = table.getColor("textInactiveText"); + Color textText = table.getColor("textText"); + Color window = table.getColor("window"); + + // *** Shared Insets + InsetsUIResource zeroInsets = new InsetsUIResource(0, 0, 0, 0); + InsetsUIResource twoInsets = new InsetsUIResource(2, 2, 2, 2); + InsetsUIResource threeInsets = new InsetsUIResource(3, 3, 3, 3); + + // // *** Shared Borders + // Object marginBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders$MarginBorder"); + // Object etchedBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource", + // "getEtchedBorderUIResource"); + // Object loweredBevelBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource", + // "getLoweredBevelBorderUIResource"); + // + // Object popupMenuBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getInternalFrameBorder"); + // + // Object blackLineBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource", + // "getBlackLineBorderUIResource"); + // Object focusCellHighlightBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource$LineBorderUIResource", + // null, + // new Object[] {yellow}); + // + // Object noFocusBorder = new + // BorderUIResource.EmptyBorderUIResource(1,1,1,1); + // + // Object tableHeaderBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource$BevelBorderUIResource", + // null, + // new Object[] { new Integer(BevelBorder.RAISED), + // controlLtHighlight, + // control, + // controlDkShadow, + // controlShadow }); + // + // + // // *** Button value objects + // + // Object buttonBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getButtonBorder"); + // + // Object buttonToggleBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getToggleButtonBorder"); + // + // Object radioButtonBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getRadioButtonBorder"); + // + // // *** FileChooser / FileView value objects + // + // Object newFolderIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/NewFolder.gif"); + // Object upFolderIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/UpFolder.gif"); + // Object homeFolderIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/HomeFolder.gif"); + // Object detailsViewIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/DetailsView.gif"); + // Object listViewIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/ListView.gif"); + // Object directoryIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/Directory.gif"); + // Object fileIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/File.gif"); + // Object computerIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/Computer.gif"); + // Object hardDriveIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/HardDrive.gif"); + // Object floppyDriveIcon = SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/FloppyDrive.gif"); + // + // + // // *** InternalFrame value objects + // + // Object internalFrameBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getInternalFrameBorder"); + // + // // *** List value objects + // + Object listCellRendererActiveValue = new UIDefaults.ActiveValue() { + public Object createValue(UIDefaults table) { + return new DefaultListCellRenderer.UIResource(); + } + }; + + // + // // *** Menus value objects + // + // Object menuBarBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getMenuBarBorder"); + // + // Object menuItemCheckIcon = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "getMenuItemCheckIcon"); + // + // Object menuItemArrowIcon = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "getMenuItemArrowIcon"); + // + // + // Object menuArrowIcon = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "getMenuArrowIcon"); + // + // Object checkBoxIcon = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "getCheckBoxIcon"); + // + // Object radioButtonIcon = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "getRadioButtonIcon"); + // + // Object checkBoxMenuItemIcon = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "getCheckBoxMenuItemIcon"); + // + // Object radioButtonMenuItemIcon = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "getRadioButtonMenuItemIcon"); + // + // Object menuItemAcceleratorDelimiter = new String("+"); + // + // // *** OptionPane value objects + // + // Object optionPaneMinimumSize = new DimensionUIResource(262, 90); + // + Integer zero = new Integer(0); + // Object zeroBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource", + // new Object[] {zero, zero, zero, zero}); + // + // Integer ten = new Integer(10); + // Object optionPaneBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource", + // new Object[] {ten, ten, twelve, ten}); + // + // Object optionPaneButtonAreaBorder = new SwingLazyValue( + // "jsjavax.swing.plaf.BorderUIResource$EmptyBorderUIResource", + // new Object[] {new Integer(6), zero, zero, zero}); + // + // + // // *** ProgessBar value objects + // + // Object progressBarBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getProgressBarBorder"); + // + // // ** ScrollBar value objects + // + // Object minimumThumbSize = new DimensionUIResource(8,8); + // Object maximumThumbSize = new DimensionUIResource(4096,4096); + // + // // ** Slider value objects + // + // Object sliderFocusInsets = twoInsets; + // + // Object toolBarSeparatorSize = new DimensionUIResource( 10, 10 ); + // + // + // // *** SplitPane value objects + // + // Object splitPaneBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getSplitPaneBorder"); + // Object splitPaneDividerBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getSplitPaneDividerBorder"); + // + // ** TabbedBane value objects + + Object tabbedPaneTabInsets = new InsetsUIResource(0, 4, 1, 4); + + Object tabbedPaneTabPadInsets = new InsetsUIResource(2, 2, 2, 1); + + Object tabbedPaneTabAreaInsets = new InsetsUIResource(3, 2, 0, 2); + + Object tabbedPaneContentBorderInsets = new InsetsUIResource(2, 2, 3, 3); + + // *** Text value objects + + // Object textFieldBorder = + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicBorders", + // "getTextFieldBorder"); + // + Object editorMargin = threeInsets; + + // Object caretBlinkRate = fiveHundred; + Integer four = new Integer(4); + // + // Object[] allAuditoryCues = new Object[] { + // "CheckBoxMenuItem.commandSound", + // "InternalFrame.closeSound", + // "InternalFrame.maximizeSound", + // "InternalFrame.minimizeSound", + // "InternalFrame.restoreDownSound", + // "InternalFrame.restoreUpSound", + // "MenuItem.commandSound", + // "OptionPane.errorSound", + // "OptionPane.informationSound", + // "OptionPane.questionSound", + // "OptionPane.warningSound", + // "PopupMenu.popupSound", + // "RadioButtonMenuItem.commandSound"}; + // + // Object[] noAuditoryCues = new Object[] {"mute"}; + // + // // *** Component Defaults + // + Object[] defaults = { + "*.font", + dialogPlain12, + "*.background", + control, + "*.foreground", + controlText, + // *** Auditory Feedback + // "AuditoryCues.cueList", allAuditoryCues, + // "AuditoryCues.allAuditoryCues", allAuditoryCues, + // "AuditoryCues.noAuditoryCues", noAuditoryCues, + // // this key defines which of the various cues to render. + // // L&Fs that want auditory feedback NEED to override playList. + // "AuditoryCues.playList", null, + + // *** Buttons + // "Button.defaultButtonFollowsFocus", Boolean.TRUE, + // "Button.font", dialogPlain12, + // "Button.background", control, + // "Button.foreground", controlText, + // "Button.shadow", controlShadow, + // "Button.darkShadow", controlDkShadow, + // "Button.light", controlHighlight, + // "Button.highlight", controlLtHighlight, + // "Button.border", buttonBorder, + "Button.margin", + new InsetsUIResource(2, 14, 2, 14), + // "Button.textIconGap", four, + // "Button.textShiftOffset", zero, + // "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { + // "SPACE", "pressed", + // "released SPACE", "released", + // "ENTER", "pressed", + // "released ENTER", "released" + // }), + // + // "ToggleButton.font", dialogPlain12, + // "ToggleButton.background", control, + // "ToggleButton.foreground", controlText, + // "ToggleButton.shadow", controlShadow, + // "ToggleButton.darkShadow", controlDkShadow, + // "ToggleButton.light", controlHighlight, + // "ToggleButton.highlight", controlLtHighlight, + // "ToggleButton.border", buttonToggleBorder, + "ToggleButton.margin", + new InsetsUIResource(2, 14, 2, 14), + "ToggleButton.textIconGap", + four, + "ToggleButton.textShiftOffset", + zero, + // "ToggleButton.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "SPACE", "pressed", + // "released SPACE", "released" + // }), + // + // "RadioButton.font", dialogPlain12, + // "RadioButton.background", control, + // "RadioButton.foreground", controlText, + // "RadioButton.shadow", controlShadow, + // "RadioButton.darkShadow", controlDkShadow, + // "RadioButton.light", controlHighlight, + // "RadioButton.highlight", controlLtHighlight, + // "RadioButton.border", radioButtonBorder, + "RadioButton.margin", + twoInsets, + "RadioButton.textIconGap", + four, + "RadioButton.textShiftOffset", + zero, + // "RadioButton.icon", radioButtonIcon, + // "RadioButton.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "SPACE", "pressed", + // "released SPACE", "released", + // "RETURN", "pressed" + // }), + // + // "CheckBox.font", dialogPlain12, + // "CheckBox.background", control, + // "CheckBox.foreground", controlText, + // "CheckBox.border", radioButtonBorder, + "CheckBox.margin", + twoInsets, + "CheckBox.textIconGap", + four, + "CheckBox.textShiftOffset", + zero, + // "CheckBox.icon", checkBoxIcon, + // "CheckBox.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "SPACE", "pressed", + // "released SPACE", "released" + // }), + // "FileChooser.useSystemExtensionHiding", Boolean.FALSE, + + // *** ColorChooser + // "ColorChooser.font", dialogPlain12, + // "ColorChooser.background", control, + // "ColorChooser.foreground", controlText, + // + "ColorChooser.swatchesSwatchSize", + new Dimension(10, 10), + "ColorChooser.swatchesRecentSwatchSize", + new Dimension(10, 10), + "ColorChooser.swatchesDefaultRecentColor", + control, + + // *** ComboBox + "ComboBox.font", + sansSerifPlain12, + "ComboBox.background", + window, + "ComboBox.foreground", + textText, + // "ComboBox.buttonBackground", control, + // "ComboBox.buttonShadow", controlShadow, + // "ComboBox.buttonDarkShadow", controlDkShadow, + // "ComboBox.buttonHighlight", controlLtHighlight, + // "ComboBox.selectionBackground", textHighlight, + // "ComboBox.selectionForeground", textHighlightText, + // "ComboBox.disabledBackground", control, + // "ComboBox.disabledForeground", textInactiveText, + "ComboBox.timeFactor", + oneThousand, + "ComboBox.isEnterSelectablePopup", + Boolean.FALSE, + // "ComboBox.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ESCAPE", "hidePopup", + // "PAGE_UP", "pageUpPassThrough", + // "PAGE_DOWN", "pageDownPassThrough", + // "HOME", "homePassThrough", + // "END", "endPassThrough", + // "ENTER", "enterPressed" + // }), + // + // *** FileChooser + + // "FileChooser.newFolderIcon", newFolderIcon, + // "FileChooser.upFolderIcon", upFolderIcon, + // "FileChooser.homeFolderIcon", homeFolderIcon, + // "FileChooser.detailsViewIcon", detailsViewIcon, + // "FileChooser.listViewIcon", listViewIcon, + "FileChooser.readOnly", + Boolean.FALSE, + // "FileChooser.usesSingleFilePane", Boolean.FALSE, + // "FileChooser.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ESCAPE", "cancelSelection", + // "F5", "refresh", + // }), + // + // "FileView.directoryIcon", directoryIcon, + // "FileView.fileIcon", fileIcon, + // "FileView.computerIcon", computerIcon, + // "FileView.hardDriveIcon", hardDriveIcon, + // "FileView.floppyDriveIcon", floppyDriveIcon, + + // *** InternalFrame + // "InternalFrame.titleFont", dialogBold12, + // "InternalFrame.borderColor", control, + // "InternalFrame.borderShadow", controlShadow, + // "InternalFrame.borderDarkShadow", controlDkShadow, + // "InternalFrame.borderHighlight", controlLtHighlight, + // "InternalFrame.borderLight", controlHighlight, + // "InternalFrame.border", internalFrameBorder, + // "InternalFrame.icon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/JavaCup16.png"), + // + // /* Default frame icons are undefined for Basic. */ + // "InternalFrame.maximizeIcon", + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "createEmptyFrameIcon"), + // "InternalFrame.minimizeIcon", + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "createEmptyFrameIcon"), + // "InternalFrame.iconifyIcon", + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "createEmptyFrameIcon"), + // "InternalFrame.closeIcon", + // new SwingLazyValue( + // "jsjavax.swing.plaf.basic.BasicIconFactory", + // "createEmptyFrameIcon"), + // // InternalFrame Auditory Cue Mappings + // "InternalFrame.closeSound", null, + // "InternalFrame.maximizeSound", null, + // "InternalFrame.minimizeSound", null, + // "InternalFrame.restoreDownSound", null, + // "InternalFrame.restoreUpSound", null, + // + // "InternalFrame.activeTitleBackground", table.get("activeCaption"), + // "InternalFrame.activeTitleForeground", + // table.get("activeCaptionText"), + // "InternalFrame.inactiveTitleBackground", + // table.get("inactiveCaption"), + // "InternalFrame.inactiveTitleForeground", + // table.get("inactiveCaptionText"), + // "InternalFrame.windowBindings", new Object[] { + // "shift ESCAPE", "showSystemMenu", + // "ctrl SPACE", "showSystemMenu", + // "ESCAPE", "hideSystemMenu"}, + // + // "InternalFrameTitlePane.iconifyButtonOpacity", Boolean.TRUE, + // "InternalFrameTitlePane.maximizeButtonOpacity", Boolean.TRUE, + // "InternalFrameTitlePane.closeButtonOpacity", Boolean.TRUE, + + // "DesktopIcon.border", internalFrameBorder, + // + // "Desktop.minOnScreenInsets", threeInsets, + // "Desktop.background", table.get("desktop"), + // "Desktop.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ctrl F5", "restore", + // "ctrl F4", "close", + // "ctrl F7", "move", + // "ctrl F8", "resize", + // "RIGHT", "right", + // "KP_RIGHT", "right", + // "shift RIGHT", "shrinkRight", + // "shift KP_RIGHT", "shrinkRight", + // "LEFT", "left", + // "KP_LEFT", "left", + // "shift LEFT", "shrinkLeft", + // "shift KP_LEFT", "shrinkLeft", + // "UP", "up", + // "KP_UP", "up", + // "shift UP", "shrinkUp", + // "shift KP_UP", "shrinkUp", + // "DOWN", "down", + // "KP_DOWN", "down", + // "shift DOWN", "shrinkDown", + // "shift KP_DOWN", "shrinkDown", + // "ESCAPE", "escape", + // "ctrl F9", "minimize", + // "ctrl F10", "maximize", + // "ctrl F6", "selectNextFrame", + // "ctrl TAB", "selectNextFrame", + // "ctrl alt F6", "selectNextFrame", + // "shift ctrl alt F6", "selectPreviousFrame", + // "ctrl F12", "navigateNext", + // "shift ctrl F12", "navigatePrevious" + // }), + + // *** Label + // "Label.font", dialogPlain12, + // "Label.background", control, + // "Label.foreground", controlText, + // "Label.disabledForeground", white, + // "Label.disabledShadow", controlShadow, + "Label.border", + null, + + // *** List + // "List.font", dialogPlain12, + "List.background", + window, + "List.foreground", + textText, + // "List.selectionBackground", textHighlight, + // "List.selectionForeground", textHighlightText, + // "List.noFocusBorder", noFocusBorder, + // "List.focusCellHighlightBorder", focusCellHighlightBorder, + // "List.dropLineColor", controlShadow, + // "List.border", null, + "List.cellRenderer", + listCellRendererActiveValue, + "List.timeFactor", + oneThousand, + // "List.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ctrl C", "copy", + // "ctrl V", "paste", + // "ctrl X", "cut", + // "COPY", "copy", + // "PASTE", "paste", + // "CUT", "cut", + // "control INSERT", "copy", + // "shift INSERT", "paste", + // "shift DELETE", "cut", + // "UP", "selectPreviousRow", + // "KP_UP", "selectPreviousRow", + // "shift UP", "selectPreviousRowExtendSelection", + // "shift KP_UP", "selectPreviousRowExtendSelection", + // "ctrl shift UP", "selectPreviousRowExtendSelection", + // "ctrl shift KP_UP", "selectPreviousRowExtendSelection", + // "ctrl UP", "selectPreviousRowChangeLead", + // "ctrl KP_UP", "selectPreviousRowChangeLead", + // "DOWN", "selectNextRow", + // "KP_DOWN", "selectNextRow", + // "shift DOWN", "selectNextRowExtendSelection", + // "shift KP_DOWN", "selectNextRowExtendSelection", + // "ctrl shift DOWN", "selectNextRowExtendSelection", + // "ctrl shift KP_DOWN", "selectNextRowExtendSelection", + // "ctrl DOWN", "selectNextRowChangeLead", + // "ctrl KP_DOWN", "selectNextRowChangeLead", + // "LEFT", "selectPreviousColumn", + // "KP_LEFT", "selectPreviousColumn", + // "shift LEFT", "selectPreviousColumnExtendSelection", + // "shift KP_LEFT", "selectPreviousColumnExtendSelection", + // "ctrl shift LEFT", "selectPreviousColumnExtendSelection", + // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection", + // "ctrl LEFT", "selectPreviousColumnChangeLead", + // "ctrl KP_LEFT", "selectPreviousColumnChangeLead", + // "RIGHT", "selectNextColumn", + // "KP_RIGHT", "selectNextColumn", + // "shift RIGHT", "selectNextColumnExtendSelection", + // "shift KP_RIGHT", "selectNextColumnExtendSelection", + // "ctrl shift RIGHT", "selectNextColumnExtendSelection", + // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection", + // "ctrl RIGHT", "selectNextColumnChangeLead", + // "ctrl KP_RIGHT", "selectNextColumnChangeLead", + // "HOME", "selectFirstRow", + // "shift HOME", "selectFirstRowExtendSelection", + // "ctrl shift HOME", "selectFirstRowExtendSelection", + // "ctrl HOME", "selectFirstRowChangeLead", + // "END", "selectLastRow", + // "shift END", "selectLastRowExtendSelection", + // "ctrl shift END", "selectLastRowExtendSelection", + // "ctrl END", "selectLastRowChangeLead", + // "PAGE_UP", "scrollUp", + // "shift PAGE_UP", "scrollUpExtendSelection", + // "ctrl shift PAGE_UP", "scrollUpExtendSelection", + // "ctrl PAGE_UP", "scrollUpChangeLead", + // "PAGE_DOWN", "scrollDown", + // "shift PAGE_DOWN", "scrollDownExtendSelection", + // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", + // "ctrl PAGE_DOWN", "scrollDownChangeLead", + // "ctrl A", "selectAll", + // "ctrl SLASH", "selectAll", + // "ctrl BACK_SLASH", "clearSelection", + // "SPACE", "addToSelection", + // "ctrl SPACE", "toggleAndAnchor", + // "shift SPACE", "extendTo", + // "ctrl shift SPACE", "moveSelectionTo" + // }), + // "List.focusInputMap.RightToLeft", + // new UIDefaults.LazyInputMap(new Object[] { + // "LEFT", "selectNextColumn", + // "KP_LEFT", "selectNextColumn", + // "shift LEFT", "selectNextColumnExtendSelection", + // "shift KP_LEFT", "selectNextColumnExtendSelection", + // "ctrl shift LEFT", "selectNextColumnExtendSelection", + // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection", + // "ctrl LEFT", "selectNextColumnChangeLead", + // "ctrl KP_LEFT", "selectNextColumnChangeLead", + // "RIGHT", "selectPreviousColumn", + // "KP_RIGHT", "selectPreviousColumn", + // "shift RIGHT", "selectPreviousColumnExtendSelection", + // "shift KP_RIGHT", "selectPreviousColumnExtendSelection", + // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection", + // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection", + // "ctrl RIGHT", "selectPreviousColumnChangeLead", + // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead", + // }), + // + // *** Menus + "MenuBar.font", + dialogPlain12, + "MenuBar.background", + menu, + "MenuBar.foreground", + menuText, + // "MenuBar.shadow", controlShadow, + // "MenuBar.highlight", controlLtHighlight, + // "MenuBar.border", menuBarBorder, + // "MenuBar.windowBindings", new Object[] { + // "F10", "takeFocus" }, + // + "MenuItem.font", dialogPlain12, + //"MenuItem.acceleratorFont", dialogPlain12, + "MenuItem.background", + menu, + "MenuItem.foreground", + menuText, + // "MenuItem.selectionForeground", textHighlightText, + // "MenuItem.selectionBackground", textHighlight, + // "MenuItem.disabledForeground", null, + // "MenuItem.acceleratorForeground", menuText, + // "MenuItem.acceleratorSelectionForeground", textHighlightText, + // "MenuItem.acceleratorDelimiter", menuItemAcceleratorDelimiter, + // "MenuItem.border", marginBorder, + // "MenuItem.borderPainted", Boolean.FALSE, + "MenuItem.margin", + twoInsets, + // "MenuItem.checkIcon", menuItemCheckIcon, + // "MenuItem.arrowIcon", menuItemArrowIcon, + // "MenuItem.commandSound", null, + // + "RadioButtonMenuItem.font", dialogPlain12, + // "RadioButtonMenuItem.acceleratorFont", dialogPlain12, + "RadioButtonMenuItem.background", + menu, + "RadioButtonMenuItem.foreground", + menuText, + // "RadioButtonMenuItem.selectionForeground", textHighlightText, + // "RadioButtonMenuItem.selectionBackground", textHighlight, + // "RadioButtonMenuItem.disabledForeground", null, + // "RadioButtonMenuItem.acceleratorForeground", menuText, + // "RadioButtonMenuItem.acceleratorSelectionForeground", + // textHighlightText, + // "RadioButtonMenuItem.border", marginBorder, + // "RadioButtonMenuItem.borderPainted", Boolean.FALSE, + "RadioButtonMenuItem.margin", + twoInsets, + // "RadioButtonMenuItem.checkIcon", radioButtonMenuItemIcon, + // "RadioButtonMenuItem.arrowIcon", menuItemArrowIcon, + // "RadioButtonMenuItem.commandSound", null, + + "CheckBoxMenuItem.font", dialogPlain12, + // "CheckBoxMenuItem.acceleratorFont", dialogPlain12, + "CheckBoxMenuItem.background", + menu, + "CheckBoxMenuItem.foreground", + menuText, + // "CheckBoxMenuItem.selectionForeground", textHighlightText, + // "CheckBoxMenuItem.selectionBackground", textHighlight, + // "CheckBoxMenuItem.disabledForeground", null, + // "CheckBoxMenuItem.acceleratorForeground", menuText, + // "CheckBoxMenuItem.acceleratorSelectionForeground", textHighlightText, + // "CheckBoxMenuItem.border", marginBorder, + // "CheckBoxMenuItem.borderPainted", Boolean.FALSE, + "CheckBoxMenuItem.margin", + twoInsets, + // "CheckBoxMenuItem.checkIcon", checkBoxMenuItemIcon, + // "CheckBoxMenuItem.arrowIcon", menuItemArrowIcon, + // "CheckBoxMenuItem.commandSound", null, + + // "Menu.font", dialogPlain12, + // "Menu.acceleratorFont", dialogPlain12, + "Menu.background", + menu, + "Menu.foreground", + menuText, + // "Menu.selectionForeground", textHighlightText, + // "Menu.selectionBackground", textHighlight, + // "Menu.disabledForeground", null, + // "Menu.acceleratorForeground", menuText, + // "Menu.acceleratorSelectionForeground", textHighlightText, + // "Menu.border", marginBorder, + // "Menu.borderPainted", Boolean.FALSE, + "Menu.margin", + twoInsets, + // "Menu.checkIcon", menuItemCheckIcon, + // "Menu.arrowIcon", menuArrowIcon, + // "Menu.menuPopupOffsetX", new Integer(0), + // "Menu.menuPopupOffsetY", new Integer(0), + // "Menu.submenuPopupOffsetX", new Integer(0), + // "Menu.submenuPopupOffsetY", new Integer(0), + // "Menu.shortcutKeys", new int[] {KeyEvent.ALT_MASK}, + // "Menu.crossMenuMnemonic", Boolean.TRUE, + // Menu.cancelMode affects the cancel menu action behaviour; + // currently supports: + // "hideLastSubmenu" (default) + // hides the last open submenu, + // and move selection one step back + // "hideMenuTree" + // resets selection and + // hide the entire structure of open menu and its submenus + // "Menu.cancelMode", "hideLastSubmenu", + + // Menu.preserveTopLevelSelection affects + // the cancel menu action behaviour + // if set to true then top level menu selection + // will be preserved when the last popup was cancelled; + // the menu itself will be unselect with the next cancel action + // "Menu.preserveTopLevelSelection", Boolean.FALSE, + + // PopupMenu + // "PopupMenu.font", dialogPlain12, + "PopupMenu.background", + menu, + "PopupMenu.foreground", + menuText, + // "PopupMenu.border", popupMenuBorder, + // Internal Frame Auditory Cue Mappings + // "PopupMenu.popupSound", null, + // // These window InputMap bindings are used when the Menu is + // // selected. + // "PopupMenu.selectedWindowInputMapBindings", new Object[] { + // "ESCAPE", "cancel", + // "DOWN", "selectNext", + // "KP_DOWN", "selectNext", + // "UP", "selectPrevious", + // "KP_UP", "selectPrevious", + // "LEFT", "selectParent", + // "KP_LEFT", "selectParent", + // "RIGHT", "selectChild", + // "KP_RIGHT", "selectChild", + // "ENTER", "return", + // "ctrl ENTER", "return", + // "SPACE", "return" + // }, + // "PopupMenu.selectedWindowInputMapBindings.RightToLeft", new Object[] + // { + // "LEFT", "selectChild", + // "KP_LEFT", "selectChild", + // "RIGHT", "selectParent", + // "KP_RIGHT", "selectParent", + // }, + "PopupMenu.consumeEventOnClose", + Boolean.FALSE, + + // *** OptionPane + // You can additionaly define OptionPane.messageFont which will + // dictate the fonts used for the message, and + // OptionPane.buttonFont, which defines the font for the buttons. + // "OptionPane.font", dialogPlain12, + // "OptionPane.background", control, + // "OptionPane.foreground", controlText, + "OptionPane.messageForeground", + controlText, + // "OptionPane.border", optionPaneBorder, + // "OptionPane.messageAreaBorder", zeroBorder, + // "OptionPane.buttonAreaBorder", optionPaneButtonAreaBorder, + // "OptionPane.minimumSize", optionPaneMinimumSize, + // "OptionPane.errorIcon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/Error.gif"), + // "OptionPane.informationIcon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/Inform.gif"), + // "OptionPane.warningIcon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/Warn.gif"), + // "OptionPane.questionIcon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/Question.gif"), + // "OptionPane.windowBindings", new Object[] { + // "ESCAPE", "close" }, + // // OptionPane Auditory Cue Mappings + // "OptionPane.errorSound", null, + // "OptionPane.informationSound", null, // Info and Plain + // "OptionPane.questionSound", null, + // "OptionPane.warningSound", null, + // "OptionPane.buttonClickThreshhold", fiveHundred, + + // *** Panel + "Panel.font", + dialogPlain12, + "Panel.background", + control, + "Panel.foreground", + textText, + + // *** ProgressBar + // "ProgressBar.font", dialogPlain12, + // "ProgressBar.foreground", textHighlight, + // "ProgressBar.background", control, + // "ProgressBar.selectionForeground", control, + // "ProgressBar.selectionBackground", textHighlight, + // "ProgressBar.border", progressBarBorder, + "ProgressBar.cellLength", + new Integer(1), + "ProgressBar.cellSpacing", + zero, + "ProgressBar.repaintInterval", + new Integer(50), + "ProgressBar.cycleTime", + new Integer(3000), + "ProgressBar.horizontalSize", + new DimensionUIResource(146, 12), + "ProgressBar.verticalSize", + new DimensionUIResource(12, 146), + + // *** Separator + // "Separator.shadow", controlShadow, // DEPRECATED - DO NOT USE! + // "Separator.highlight", controlLtHighlight, // DEPRECATED - DO NOT + // USE! + // + // "Separator.background", controlLtHighlight, + // "Separator.foreground", controlShadow, + + // *** ScrollBar/ScrollPane/Viewport + // "ScrollBar.background", scrollBarTrack, + "ScrollBar.foreground", + control, + // "ScrollBar.track", table.get("scrollbar"), + // "ScrollBar.trackHighlight", controlDkShadow, + // "ScrollBar.thumb", control, + // "ScrollBar.thumbHighlight", controlLtHighlight, + // "ScrollBar.thumbDarkShadow", controlDkShadow, + // "ScrollBar.thumbShadow", controlShadow, + // "ScrollBar.border", null, + // "ScrollBar.minimumThumbSize", minimumThumbSize, + // "ScrollBar.maximumThumbSize", maximumThumbSize, + // "ScrollBar.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "positiveUnitIncrement", + // "KP_RIGHT", "positiveUnitIncrement", + // "DOWN", "positiveUnitIncrement", + // "KP_DOWN", "positiveUnitIncrement", + // "PAGE_DOWN", "positiveBlockIncrement", + // "LEFT", "negativeUnitIncrement", + // "KP_LEFT", "negativeUnitIncrement", + // "UP", "negativeUnitIncrement", + // "KP_UP", "negativeUnitIncrement", + // "PAGE_UP", "negativeBlockIncrement", + // "HOME", "minScroll", + // "END", "maxScroll" + // }), + // "ScrollBar.ancestorInputMap.RightToLeft", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "negativeUnitIncrement", + // "KP_RIGHT", "negativeUnitIncrement", + // "LEFT", "positiveUnitIncrement", + // "KP_LEFT", "positiveUnitIncrement", + // }), + "ScrollBar.width", + new Integer(16), + + // "ScrollPane.font", dialogPlain12, + // "ScrollPane.background", control, + // "ScrollPane.foreground", controlText, + // "ScrollPane.border", textFieldBorder, + // "ScrollPane.viewportBorder", null, + // "ScrollPane.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "unitScrollRight", + // "KP_RIGHT", "unitScrollRight", + // "DOWN", "unitScrollDown", + // "KP_DOWN", "unitScrollDown", + // "LEFT", "unitScrollLeft", + // "KP_LEFT", "unitScrollLeft", + // "UP", "unitScrollUp", + // "KP_UP", "unitScrollUp", + // "PAGE_UP", "scrollUp", + // "PAGE_DOWN", "scrollDown", + // "ctrl PAGE_UP", "scrollLeft", + // "ctrl PAGE_DOWN", "scrollRight", + // "ctrl HOME", "scrollHome", + // "ctrl END", "scrollEnd" + // }), + // "ScrollPane.ancestorInputMap.RightToLeft", + // new UIDefaults.LazyInputMap(new Object[] { + // "ctrl PAGE_UP", "scrollRight", + // "ctrl PAGE_DOWN", "scrollLeft", + // }), + // + // "Viewport.font", dialogPlain12, + // "Viewport.background", control, + "Viewport.foreground", + textText, + + // *** Slider + // "Slider.font", dialogPlain12, + // "Slider.foreground", control, + // "Slider.background", control, + // "Slider.highlight", controlLtHighlight, + // "Slider.tickColor", Color.black, + // "Slider.shadow", controlShadow, + // "Slider.focus", controlDkShadow, + // "Slider.border", null, + "Slider.horizontalSize", + new Dimension(200, 21), + "Slider.verticalSize", + new Dimension(21, 200), + "Slider.minimumHorizontalSize", + new Dimension(36, 21), + "Slider.minimumVerticalSize", + new Dimension(21, 36), + // "Slider.focusInsets", sliderFocusInsets, + // "Slider.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "positiveUnitIncrement", + // "KP_RIGHT", "positiveUnitIncrement", + // "DOWN", "negativeUnitIncrement", + // "KP_DOWN", "negativeUnitIncrement", + // "PAGE_DOWN", "negativeBlockIncrement", + // "LEFT", "negativeUnitIncrement", + // "KP_LEFT", "negativeUnitIncrement", + // "UP", "positiveUnitIncrement", + // "KP_UP", "positiveUnitIncrement", + // "PAGE_UP", "positiveBlockIncrement", + // "HOME", "minScroll", + // "END", "maxScroll" + // }), + // "Slider.focusInputMap.RightToLeft", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "negativeUnitIncrement", + // "KP_RIGHT", "negativeUnitIncrement", + // "LEFT", "positiveUnitIncrement", + // "KP_LEFT", "positiveUnitIncrement", + // }), + // + // *** Spinner + "Spinner.font", + monospacedPlain12, + // "Spinner.background", control, + // "Spinner.foreground", control, + // "Spinner.border", textFieldBorder, + // "Spinner.arrowButtonBorder", null, + // "Spinner.arrowButtonInsets", null, + "Spinner.arrowButtonSize", + new Dimension(16, 5), + // "Spinner.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "UP", "increment", + // "KP_UP", "increment", + // "DOWN", "decrement", + // "KP_DOWN", "decrement", + // }), + // "Spinner.editorBorderPainted", Boolean.FALSE, + "Spinner.editorAlignment", + JTextField.TRAILING, + + // *** SplitPane + "SplitPane.background", + control, + // "SplitPane.highlight", controlLtHighlight, + // "SplitPane.shadow", controlShadow, + // "SplitPane.darkShadow", controlDkShadow, + // "SplitPane.border", splitPaneBorder, + "SplitPane.dividerSize", + new Integer(7), + // "SplitPaneDivider.border", splitPaneDividerBorder, + "SplitPaneDivider.draggingColor", + darkGray, + // "SplitPane.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "UP", "negativeIncrement", + // "DOWN", "positiveIncrement", + // "LEFT", "negativeIncrement", + // "RIGHT", "positiveIncrement", + // "KP_UP", "negativeIncrement", + // "KP_DOWN", "positiveIncrement", + // "KP_LEFT", "negativeIncrement", + // "KP_RIGHT", "positiveIncrement", + // "HOME", "selectMin", + // "END", "selectMax", + // "F8", "startResize", + // "F6", "toggleFocus", + // "ctrl TAB", "focusOutForward", + // "ctrl shift TAB", "focusOutBackward" + // }), + // + // *** TabbedPane + // "TabbedPane.font", dialogPlain12, + // "TabbedPane.background", control, + // "TabbedPane.foreground", controlText, + // "TabbedPane.highlight", controlLtHighlight, + // "TabbedPane.light", controlHighlight, + // "TabbedPane.shadow", controlShadow, + // "TabbedPane.darkShadow", controlDkShadow, + "TabbedPane.selected", + null, + // "TabbedPane.focus", controlText, + "TabbedPane.textIconGap", + four, + + // Causes tabs to be painted on top of the content area border. + // The amount of overlap is then controlled by tabAreaInsets.bottom, + // which is zero by default + "TabbedPane.tabsOverlapBorder", + Boolean.FALSE, + // "TabbedPane.selectionFollowsFocus", Boolean.TRUE, + + "TabbedPane.labelShift", + 1, + "TabbedPane.selectedLabelShift", + -1, + "TabbedPane.tabInsets", + tabbedPaneTabInsets, + "TabbedPane.selectedTabPadInsets", + tabbedPaneTabPadInsets, + "TabbedPane.tabAreaInsets", + tabbedPaneTabAreaInsets, + "TabbedPane.contentBorderInsets", + tabbedPaneContentBorderInsets, + "TabbedPane.tabRunOverlay", + new Integer(2), + // "TabbedPane.tabsOpaque", Boolean.TRUE, + // "TabbedPane.contentOpaque", Boolean.TRUE, + // "TabbedPane.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "navigateRight", + // "KP_RIGHT", "navigateRight", + // "LEFT", "navigateLeft", + // "KP_LEFT", "navigateLeft", + // "UP", "navigateUp", + // "KP_UP", "navigateUp", + // "DOWN", "navigateDown", + // "KP_DOWN", "navigateDown", + // "ctrl DOWN", "requestFocusForVisibleComponent", + // "ctrl KP_DOWN", "requestFocusForVisibleComponent", + // }), + // "TabbedPane.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ctrl PAGE_DOWN", "navigatePageDown", + // "ctrl PAGE_UP", "navigatePageUp", + // "ctrl UP", "requestFocus", + // "ctrl KP_UP", "requestFocus", + // }), + // + // + // *** Table + // "Table.font", dialogPlain12, + // "Table.foreground", controlText, // cell text color + "Table.background", + window, // cell background color + // "Table.selectionForeground", textHighlightText, + // "Table.selectionBackground", textHighlight, + // "Table.dropLineColor", controlShadow, + "Table.dropLineShortColor", + black, + "Table.gridColor", + gray, // grid line color + "Table.focusCellBackground", + window, + "Table.focusCellForeground", + controlText, + // "Table.focusCellHighlightBorder", focusCellHighlightBorder, + // "Table.scrollPaneBorder", loweredBevelBorder, + // "Table.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ctrl C", "copy", + // "ctrl V", "paste", + // "ctrl X", "cut", + // "COPY", "copy", + // "PASTE", "paste", + // "CUT", "cut", + // "control INSERT", "copy", + // "shift INSERT", "paste", + // "shift DELETE", "cut", + // "RIGHT", "selectNextColumn", + // "KP_RIGHT", "selectNextColumn", + // "shift RIGHT", "selectNextColumnExtendSelection", + // "shift KP_RIGHT", "selectNextColumnExtendSelection", + // "ctrl shift RIGHT", "selectNextColumnExtendSelection", + // "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection", + // "ctrl RIGHT", "selectNextColumnChangeLead", + // "ctrl KP_RIGHT", "selectNextColumnChangeLead", + // "LEFT", "selectPreviousColumn", + // "KP_LEFT", "selectPreviousColumn", + // "shift LEFT", "selectPreviousColumnExtendSelection", + // "shift KP_LEFT", "selectPreviousColumnExtendSelection", + // "ctrl shift LEFT", "selectPreviousColumnExtendSelection", + // "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection", + // "ctrl LEFT", "selectPreviousColumnChangeLead", + // "ctrl KP_LEFT", "selectPreviousColumnChangeLead", + // "DOWN", "selectNextRow", + // "KP_DOWN", "selectNextRow", + // "shift DOWN", "selectNextRowExtendSelection", + // "shift KP_DOWN", "selectNextRowExtendSelection", + // "ctrl shift DOWN", "selectNextRowExtendSelection", + // "ctrl shift KP_DOWN", "selectNextRowExtendSelection", + // "ctrl DOWN", "selectNextRowChangeLead", + // "ctrl KP_DOWN", "selectNextRowChangeLead", + // "UP", "selectPreviousRow", + // "KP_UP", "selectPreviousRow", + // "shift UP", "selectPreviousRowExtendSelection", + // "shift KP_UP", "selectPreviousRowExtendSelection", + // "ctrl shift UP", "selectPreviousRowExtendSelection", + // "ctrl shift KP_UP", "selectPreviousRowExtendSelection", + // "ctrl UP", "selectPreviousRowChangeLead", + // "ctrl KP_UP", "selectPreviousRowChangeLead", + // "HOME", "selectFirstColumn", + // "shift HOME", "selectFirstColumnExtendSelection", + // "ctrl shift HOME", "selectFirstRowExtendSelection", + // "ctrl HOME", "selectFirstRow", + // "END", "selectLastColumn", + // "shift END", "selectLastColumnExtendSelection", + // "ctrl shift END", "selectLastRowExtendSelection", + // "ctrl END", "selectLastRow", + // "PAGE_UP", "scrollUpChangeSelection", + // "shift PAGE_UP", "scrollUpExtendSelection", + // "ctrl shift PAGE_UP", "scrollLeftExtendSelection", + // "ctrl PAGE_UP", "scrollLeftChangeSelection", + // "PAGE_DOWN", "scrollDownChangeSelection", + // "shift PAGE_DOWN", "scrollDownExtendSelection", + // "ctrl shift PAGE_DOWN", "scrollRightExtendSelection", + // "ctrl PAGE_DOWN", "scrollRightChangeSelection", + // "TAB", "selectNextColumnCell", + // "shift TAB", "selectPreviousColumnCell", + // "ENTER", "selectNextRowCell", + // "shift ENTER", "selectPreviousRowCell", + // "ctrl A", "selectAll", + // "ctrl SLASH", "selectAll", + // "ctrl BACK_SLASH", "clearSelection", + // "ESCAPE", "cancel", + // "F2", "startEditing", + // "SPACE", "addToSelection", + // "ctrl SPACE", "toggleAndAnchor", + // "shift SPACE", "extendTo", + // "ctrl shift SPACE", "moveSelectionTo", + // "F8", "focusHeader" + // }), + // "Table.ancestorInputMap.RightToLeft", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "selectPreviousColumn", + // "KP_RIGHT", "selectPreviousColumn", + // "shift RIGHT", "selectPreviousColumnExtendSelection", + // "shift KP_RIGHT", "selectPreviousColumnExtendSelection", + // "ctrl shift RIGHT", "selectPreviousColumnExtendSelection", + // "ctrl shift KP_RIGHT", "selectPreviousColumnExtendSelection", + // "ctrl RIGHT", "selectPreviousColumnChangeLead", + // "ctrl KP_RIGHT", "selectPreviousColumnChangeLead", + // "LEFT", "selectNextColumn", + // "KP_LEFT", "selectNextColumn", + // "shift LEFT", "selectNextColumnExtendSelection", + // "shift KP_LEFT", "selectNextColumnExtendSelection", + // "ctrl shift LEFT", "selectNextColumnExtendSelection", + // "ctrl shift KP_LEFT", "selectNextColumnExtendSelection", + // "ctrl LEFT", "selectNextColumnChangeLead", + // "ctrl KP_LEFT", "selectNextColumnChangeLead", + // "ctrl PAGE_UP", "scrollRightChangeSelection", + // "ctrl PAGE_DOWN", "scrollLeftChangeSelection", + // "ctrl shift PAGE_UP", "scrollRightExtendSelection", + // "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", + // }), + // "Table.ascendingSortIcon", new SwingLazyValue( + // "sun.swing.icon.SortArrowIcon", + // null, new Object[] { Boolean.TRUE, + // "Table.sortIconColor" }), + // "Table.descendingSortIcon", new SwingLazyValue( + // "sun.swing.icon.SortArrowIcon", + // null, new Object[] { Boolean.FALSE, + // "Table.sortIconColor" }), + // "Table.sortIconColor", controlShadow, + // + // "TableHeader.font", dialogPlain12, + // "TableHeader.foreground", controlText, // header text color + // "TableHeader.background", control, // header background + // "TableHeader.cellBorder", tableHeaderBorder, + + // Support for changing the background/border of the currently + // selected header column when the header has the keyboard focus. + // "TableHeader.focusCellBackground", table.getColor("text"), // like + // text component bg + // "TableHeader.focusCellForeground", null, + // "TableHeader.focusCellBorder", null, + // "TableHeader.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "SPACE", "toggleSortOrder", + // "LEFT", "selectColumnToLeft", + // "KP_LEFT", "selectColumnToLeft", + // "RIGHT", "selectColumnToRight", + // "KP_RIGHT", "selectColumnToRight", + // "alt LEFT", "moveColumnLeft", + // "alt KP_LEFT", "moveColumnLeft", + // "alt RIGHT", "moveColumnRight", + // "alt KP_RIGHT", "moveColumnRight", + // "alt shift LEFT", "resizeLeft", + // "alt shift KP_LEFT", "resizeLeft", + // "alt shift RIGHT", "resizeRight", + // "alt shift KP_RIGHT", "resizeRight", + // "ESCAPE", "focusTable", + // }), + // + // *** Text + "TextField.font", + sansSerifPlain12, + "TextField.background", + window, + "TextField.foreground", + textText, + // "TextField.shadow", controlShadow, + // "TextField.darkShadow", controlDkShadow, + // "TextField.light", controlHighlight, + // "TextField.highlight", controlLtHighlight, + // "TextField.inactiveForeground", textInactiveText, + // "TextField.inactiveBackground", control, + // "TextField.selectionBackground", textHighlight, + // "TextField.selectionForeground", textHighlightText, + // "TextField.caretForeground", textText, + // "TextField.caretBlinkRate", caretBlinkRate, + // "TextField.border", textFieldBorder, + "TextField.margin", + zeroInsets, + + "FormattedTextField.font", + sansSerifPlain12, + "FormattedTextField.background", + window, + "FormattedTextField.foreground", + textText, + // "FormattedTextField.inactiveForeground", textInactiveText, + // "FormattedTextField.inactiveBackground", control, + // "FormattedTextField.selectionBackground", textHighlight, + // "FormattedTextField.selectionForeground", textHighlightText, + "FormattedTextField.caretForeground", + textText, + // "FormattedTextField.caretBlinkRate", caretBlinkRate, + // "FormattedTextField.border", textFieldBorder, + "FormattedTextField.margin", + zeroInsets, + // "FormattedTextField.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ctrl C", DefaultEditorKit.copyAction, + // "ctrl V", DefaultEditorKit.pasteAction, + // "ctrl X", DefaultEditorKit.cutAction, + // "COPY", DefaultEditorKit.copyAction, + // "PASTE", DefaultEditorKit.pasteAction, + // "CUT", DefaultEditorKit.cutAction, + // "control INSERT", DefaultEditorKit.copyAction, + // "shift INSERT", DefaultEditorKit.pasteAction, + // "shift DELETE", DefaultEditorKit.cutAction, + // "shift LEFT", DefaultEditorKit.selectionBackwardAction, + // "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction, + // "shift RIGHT", DefaultEditorKit.selectionForwardAction, + // "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction, + // "ctrl LEFT", DefaultEditorKit.previousWordAction, + // "ctrl KP_LEFT", DefaultEditorKit.previousWordAction, + // "ctrl RIGHT", DefaultEditorKit.nextWordAction, + // "ctrl KP_RIGHT", DefaultEditorKit.nextWordAction, + // "ctrl shift LEFT", DefaultEditorKit.selectionPreviousWordAction, + // "ctrl shift KP_LEFT", DefaultEditorKit.selectionPreviousWordAction, + // "ctrl shift RIGHT", DefaultEditorKit.selectionNextWordAction, + // "ctrl shift KP_RIGHT", DefaultEditorKit.selectionNextWordAction, + // "ctrl A", DefaultEditorKit.selectAllAction, + // "HOME", DefaultEditorKit.beginLineAction, + // "END", DefaultEditorKit.endLineAction, + // "shift HOME", DefaultEditorKit.selectionBeginLineAction, + // "shift END", DefaultEditorKit.selectionEndLineAction, + // "BACK_SPACE", DefaultEditorKit.deletePrevCharAction, + // "shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction, + // "ctrl H", DefaultEditorKit.deletePrevCharAction, + // "DELETE", DefaultEditorKit.deleteNextCharAction, + // "ctrl DELETE", DefaultEditorKit.deleteNextWordAction, + // "ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction, + // "RIGHT", DefaultEditorKit.forwardAction, + // "LEFT", DefaultEditorKit.backwardAction, + // "KP_RIGHT", DefaultEditorKit.forwardAction, + // "KP_LEFT", DefaultEditorKit.backwardAction, + // "ENTER", JTextField.notifyAction, + // "ctrl BACK_SLASH", "unselect", + // "control shift O", "toggle-componentOrientation", + // "ESCAPE", "reset-field-edit", + // "UP", "increment", + // "KP_UP", "increment", + // "DOWN", "decrement", + // "KP_DOWN", "decrement", + // }), + // + "PasswordField.font", + monospacedPlain12, + "PasswordField.background", + window, + "PasswordField.foreground", + textText, + // "PasswordField.inactiveForeground", textInactiveText, + // "PasswordField.inactiveBackground", control, + // "PasswordField.selectionBackground", textHighlight, + // "PasswordField.selectionForeground", textHighlightText, + // "PasswordField.caretForeground", textText, + // "PasswordField.caretBlinkRate", caretBlinkRate, + // "PasswordField.border", textFieldBorder, + "PasswordField.margin", + zeroInsets, + "PasswordField.echoChar", + '*', + + "TextArea.font", + monospacedPlain12, + "TextArea.background", + window, + "TextArea.foreground", + textText, + // "TextArea.inactiveForeground", textInactiveText, + // "TextArea.selectionBackground", textHighlight, + // "TextArea.selectionForeground", textHighlightText, + // "TextArea.caretForeground", textText, + // "TextArea.caretBlinkRate", caretBlinkRate, + // "TextArea.border", marginBorder, + "TextArea.margin", + zeroInsets, + + "TextPane.font", + serifPlain12, + "TextPane.background", + white, + "TextPane.foreground", + textText, + // "TextPane.selectionBackground", textHighlight, + // "TextPane.selectionForeground", textHighlightText, + // "TextPane.caretForeground", textText, + // "TextPane.caretBlinkRate", caretBlinkRate, + // "TextPane.inactiveForeground", textInactiveText, + // "TextPane.border", marginBorder, + "TextPane.margin", + editorMargin, + + "EditorPane.font", + serifPlain12, + "EditorPane.background", + white, + "EditorPane.foreground", + textText, + // "EditorPane.selectionBackground", textHighlight, + // "EditorPane.selectionForeground", textHighlightText, + // "EditorPane.caretForeground", textText, + // "EditorPane.caretBlinkRate", caretBlinkRate, + // "EditorPane.inactiveForeground", textInactiveText, + // "EditorPane.border", marginBorder, + "EditorPane.margin", + editorMargin, + // + // "html.pendingImage", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/image-delayed.png"), + // "html.missingImage", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/image-failed.png"), + // *** TitledBorder + // "TitledBorder.font", dialogPlain12, + "TitledBorder.titleColor", + controlText, + // "TitledBorder.border", etchedBorder, + + // *** ToolBar + // "ToolBar.font", dialogPlain12, + // "ToolBar.background", control, + // "ToolBar.foreground", controlText, + // "ToolBar.shadow", controlShadow, + // "ToolBar.darkShadow", controlDkShadow, + // "ToolBar.light", controlHighlight, + // "ToolBar.highlight", controlLtHighlight, + // "ToolBar.dockingBackground", control, + // "ToolBar.dockingForeground", red, + // "ToolBar.floatingBackground", control, + // "ToolBar.floatingForeground", darkGray, + // "ToolBar.border", etchedBorder, + // "ToolBar.separatorSize", toolBarSeparatorSize, + // "ToolBar.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "UP", "navigateUp", + // "KP_UP", "navigateUp", + // "DOWN", "navigateDown", + // "KP_DOWN", "navigateDown", + // "LEFT", "navigateLeft", + // "KP_LEFT", "navigateLeft", + // "RIGHT", "navigateRight", + // "KP_RIGHT", "navigateRight" + // }), + + // *** ToolTips + // "ToolTip.font", sansSerifPlain12, + // "ToolTip.background", table.get("info"), + // "ToolTip.foreground", table.get("infoText"), + // "ToolTip.border", blackLineBorder, + // ToolTips also support backgroundInactive, borderInactive, + // and foregroundInactive + + // *** ToolTipManager + // ToolTipManager.enableToolTipMode currently supports: + // "allWindows" (default): + // enables tool tips for all windows of all java applications, + // whether the windows are active or inactive + // "activeApplication" + // enables tool tips for windows of an application only when + // the application has an active window + // "ToolTipManager.enableToolTipMode", "allWindows", + + // *** Tree + "Tree.paintLines", + Boolean.TRUE, + "Tree.lineTypeDashed", + Boolean.FALSE, + // "Tree.font", dialogPlain12, + "Tree.background", + window, + "Tree.foreground", + textText, + "Tree.hash", + gray, + "Tree.textForeground", + textText, + "Tree.textBackground", + table.get("text"), + // "Tree.selectionForeground", textHighlightText, + // "Tree.selectionBackground", textHighlight, + // "Tree.selectionBorderColor", black, + // "Tree.dropLineColor", controlShadow, + // "Tree.editorBorder", blackLineBorder, + "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", + new Integer(13), "Tree.rowHeight", new Integer(16), + "Tree.scrollsOnExpand", Boolean.TRUE, + // "Tree.openIcon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/TreeOpen.gif"), + // "Tree.closedIcon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/TreeClosed.gif"), + // "Tree.leafIcon", SwingUtilities2.makeIcon(getClass(), + // BasicLookAndFeel.class, + // "icons/TreeLeaf.gif"), + // "Tree.expandedIcon", null, + // "Tree.collapsedIcon", null, + // "Tree.changeSelectionWithFocus", Boolean.TRUE, + // "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, + "Tree.timeFactor", oneThousand, + // "Tree.focusInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ctrl C", "copy", + // "ctrl V", "paste", + // "ctrl X", "cut", + // "COPY", "copy", + // "PASTE", "paste", + // "CUT", "cut", + // "control INSERT", "copy", + // "shift INSERT", "paste", + // "shift DELETE", "cut", + // "UP", "selectPrevious", + // "KP_UP", "selectPrevious", + // "shift UP", "selectPreviousExtendSelection", + // "shift KP_UP", "selectPreviousExtendSelection", + // "ctrl shift UP", "selectPreviousExtendSelection", + // "ctrl shift KP_UP", "selectPreviousExtendSelection", + // "ctrl UP", "selectPreviousChangeLead", + // "ctrl KP_UP", "selectPreviousChangeLead", + // "DOWN", "selectNext", + // "KP_DOWN", "selectNext", + // "shift DOWN", "selectNextExtendSelection", + // "shift KP_DOWN", "selectNextExtendSelection", + // "ctrl shift DOWN", "selectNextExtendSelection", + // "ctrl shift KP_DOWN", "selectNextExtendSelection", + // "ctrl DOWN", "selectNextChangeLead", + // "ctrl KP_DOWN", "selectNextChangeLead", + // "RIGHT", "selectChild", + // "KP_RIGHT", "selectChild", + // "LEFT", "selectParent", + // "KP_LEFT", "selectParent", + // "PAGE_UP", "scrollUpChangeSelection", + // "shift PAGE_UP", "scrollUpExtendSelection", + // "ctrl shift PAGE_UP", "scrollUpExtendSelection", + // "ctrl PAGE_UP", "scrollUpChangeLead", + // "PAGE_DOWN", "scrollDownChangeSelection", + // "shift PAGE_DOWN", "scrollDownExtendSelection", + // "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", + // "ctrl PAGE_DOWN", "scrollDownChangeLead", + // "HOME", "selectFirst", + // "shift HOME", "selectFirstExtendSelection", + // "ctrl shift HOME", "selectFirstExtendSelection", + // "ctrl HOME", "selectFirstChangeLead", + // "END", "selectLast", + // "shift END", "selectLastExtendSelection", + // "ctrl shift END", "selectLastExtendSelection", + // "ctrl END", "selectLastChangeLead", + // "F2", "startEditing", + // "ctrl A", "selectAll", + // "ctrl SLASH", "selectAll", + // "ctrl BACK_SLASH", "clearSelection", + // "ctrl LEFT", "scrollLeft", + // "ctrl KP_LEFT", "scrollLeft", + // "ctrl RIGHT", "scrollRight", + // "ctrl KP_RIGHT", "scrollRight", + // "SPACE", "addToSelection", + // "ctrl SPACE", "toggleAndAnchor", + // "shift SPACE", "extendTo", + // "ctrl shift SPACE", "moveSelectionTo" + // }), + // "Tree.focusInputMap.RightToLeft", + // new UIDefaults.LazyInputMap(new Object[] { + // "RIGHT", "selectParent", + // "KP_RIGHT", "selectParent", + // "LEFT", "selectChild", + // "KP_LEFT", "selectChild", + // }), + // "Tree.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "ESCAPE", "cancel" + // }), + // // Bind specific keys that can invoke popup on currently + // // focused JComponent + // "RootPane.ancestorInputMap", + // new UIDefaults.LazyInputMap(new Object[] { + // "shift F10", "postPopup", + // "CONTEXT_MENU", "postPopup" + // }), + // + // // These bindings are only enabled when there is a default + // // button set on the rootpane. + // "RootPane.defaultButtonWindowKeyBindings", new Object[] { + // "ENTER", "press", + // "released ENTER", "release", + // "ctrl ENTER", "press", + // "ctrl released ENTER", "release" + // }, + }; + + table.putDefaults(defaults); + } + + // /** + // * Returns the ui that is of type klass, or null if + // * one can not be found. + // */ + // static Object getUIOfType(ComponentUI ui, Class klass) { + // if (klass.isInstance(ui)) { + // return ui; + // } + // return null; + // } + // + // // ********* Auditory Cue support methods and objects ********* + // // also see the "AuditoryCues" section of the defaults table + // + // /** + // * Returns an ActionMap containing the audio actions + // * for this look and feel. + // *

    + // * The returned ActionMap contains Actions that + // * embody the ability to render an auditory cue. These auditory + // * cues map onto user and system activities that may be useful + // * for an end user to know about (such as a dialog box appearing). + // *

    + // * At the appropriate time, + // * the {@code ComponentUI} is responsible for obtaining an + // * Action out of the ActionMap and passing + // * it to playSound. + // *

    + // * This method first looks up the {@code ActionMap} from the + // * defaults using the key {@code "AuditoryCues.actionMap"}. + // *

    + // * If the value is {@code non-null}, it is returned. If the value + // * of the default {@code "AuditoryCues.actionMap"} is {@code null} + // * and the value of the default {@code "AuditoryCues.cueList"} is + // * {@code non-null}, an {@code ActionMapUIResource} is created and + // * populated. Population is done by iterating over each of the + // * elements of the {@code "AuditoryCues.cueList"} array, and + // * invoking {@code createAudioAction()} to create an {@code + // * Action} for each element. The resulting {@code Action} is + // * placed in the {@code ActionMapUIResource}, using the array + // * element as the key. For example, if the {@code + // * "AuditoryCues.cueList"} array contains a single-element, {@code + // * "audioKey"}, the {@code ActionMapUIResource} is created, then + // * populated by way of {@code actionMap.put(cueList[0], + // * createAudioAction(cueList[0]))}. + // *

    + // * If the value of the default {@code "AuditoryCues.actionMap"} is + // * {@code null} and the value of the default + // * {@code "AuditoryCues.cueList"} is {@code null}, an empty + // * {@code ActionMapUIResource} is created. + // * + // * + // * @return an ActionMap containing {@code Actions} + // * responsible for playing auditory cues + // * @throws ClassCastException if the value of the + // * default {@code "AuditoryCues.actionMap"} is not an + // * {@code ActionMap}, or the value of the default + // * {@code "AuditoryCues.cueList"} is not an {@code Object[]} + // * @see #createAudioAction + // * @see #playSound(Action) + // * @since 1.4 + // */ + // protected ActionMap getAudioActionMap() { + // ActionMap audioActionMap = (ActionMap)UIManager.get( + // "AuditoryCues.actionMap"); + // if (audioActionMap == null) { + // Object[] acList = (Object[])UIManager.get("AuditoryCues.cueList"); + // if (acList != null) { + // audioActionMap = new ActionMapUIResource(); + // for(int counter = acList.length-1; counter >= 0; counter--) { + // audioActionMap.put(acList[counter], + // createAudioAction(acList[counter])); + // } + // } + // UIManager.getLookAndFeelDefaults().put("AuditoryCues.actionMap", + // audioActionMap); + // } + // return audioActionMap; + // } + // + // /** + // * Creates and returns an {@code Action} used to play a sound. + // *

    + // * If {@code key} is {@code non-null}, an {@code Action} is created + // * using the value from the defaults with key {@code key}. The value + // * identifies the sound resource to load when + // * {@code actionPerformed} is invoked on the {@code Action}. The + // * sound resource is loaded into a {@code byte[]} by way of + // * {@code getClass().getResourceAsStream()}. + // * + // * @param key the key identifying the audio action + // * @return an {@code Action} used to play the source, or {@code null} + // * if {@code key} is {@code null} + // * @see #playSound(Action) + // * @since 1.4 + // */ + // protected Action createAudioAction(Object key) { + // if (key != null) { + // String audioKey = (String)key; + // String audioValue = (String)UIManager.get(key); + // return new AudioAction(audioKey, audioValue); + // } else { + // return null; + // } + // } + // + // /** + // * Pass the name String to the super constructor. This is used + // * later to identify the Action and decide whether to play it or + // * not. Store the resource String. I is used to get the audio + // * resource. In this case, the resource is an audio file. + // * + // * @since 1.4 + // */ + // private class AudioAction extends AbstractAction implements LineListener { + // // We strive to only play one sound at a time (other platforms + // // appear to do this). This is done by maintaining the field + // // clipPlaying. Every time a sound is to be played, + // // cancelCurrentSound is invoked to cancel any sound that may be + // // playing. + // private String audioResource; + // private byte[] audioBuffer; + // + // /** + // * The String is the name of the Action and + // * points to the audio resource. + // * The byte[] is a buffer of the audio bits. + // */ + // public AudioAction(String name, String resource) { + // super(name); + // audioResource = resource; + // } + // + // public void actionPerformed(ActionEvent e) { + // if (audioBuffer == null) { + // audioBuffer = loadAudioData(audioResource); + // } + // if (audioBuffer != null) { + // cancelCurrentSound(null); + // try { + // AudioInputStream soundStream = + // AudioSystem.getAudioInputStream( + // new ByteArrayInputStream(audioBuffer)); + // DataLine.Info info = + // new DataLine.Info(Clip.class, soundStream.getFormat()); + // Clip clip = (Clip) AudioSystem.getLine(info); + // clip.open(soundStream); + // clip.addLineListener(this); + // + // synchronized(audioLock) { + // clipPlaying = clip; + // } + // + // clip.start(); + // } catch (Exception ex) {} + // } + // } + // + // public void update(LineEvent event) { + // if (event.getType() == LineEvent.Type.STOP) { + // cancelCurrentSound((Clip)event.getLine()); + // } + // } + // + // /** + // * If the parameter is null, or equal to the currently + // * playing sound, then cancel the currently playing sound. + // */ + // private void cancelCurrentSound(Clip clip) { + // Clip lastClip = null; + // + // synchronized(audioLock) { + // if (clip == null || clip == clipPlaying) { + // lastClip = clipPlaying; + // clipPlaying = null; + // } + // } + // + // if (lastClip != null) { + // lastClip.removeLineListener(this); + // lastClip.close(); + // } + // } + // } + // + // /** + // * Utility method that loads audio bits for the specified + // * soundFile filename. If this method is unable to + // * build a viable path name from the baseClass and + // * soundFile passed into this method, it will + // * return null. + // * + // * @param baseClass used as the root class/location to get the + // * soundFile from + // * @param soundFile the name of the audio file to be retrieved + // * from disk + // * @return A byte[] with audio data or null + // * @since 1.4 + // */ + // private byte[] loadAudioData(final String soundFile){ + // if (soundFile == null) { + // return null; + // } + // /* Copy resource into a byte array. This is + // * necessary because several browsers consider + // * Class.getResource a security risk since it + // * can be used to load additional classes. + // * Class.getResourceAsStream just returns raw + // * bytes, which we can convert to a sound. + // */ + // byte[] buffer = (byte[])AccessController.doPrivileged( + // new PrivilegedAction() { + // public Object run() { + // try { + // InputStream resource = BasicLookAndFeel.this. + // getClass().getResourceAsStream(soundFile); + // if (resource == null) { + // return null; + // } + // BufferedInputStream in = + // new BufferedInputStream(resource); + // ByteArrayOutputStream out = + // new ByteArrayOutputStream(1024); + // byte[] buffer = new byte[1024]; + // int n; + // while ((n = in.read(buffer)) > 0) { + // out.write(buffer, 0, n); + // } + // in.close(); + // out.flush(); + // buffer = out.toByteArray(); + // return buffer; + // } catch (IOException ioe) { + // System.err.println(ioe.toString()); + // return null; + // } + // } + // }); + // if (buffer == null) { + // System.err.println(getClass().getName() + "/" + + // soundFile + " not found."); + // return null; + // } + // if (buffer.length == 0) { + // System.err.println("warning: " + soundFile + + // " is zero-length"); + // return null; + // } + // return buffer; + // } + // + // /** + // * If necessary, invokes {@code actionPerformed} on + // * {@code audioAction} to play a sound. + // * The {@code actionPerformed} method is invoked if the value of + // * the {@code "AuditoryCues.playList"} default is a {@code + // * non-null} {@code Object[]} containing a {@code String} entry + // * equal to the name of the {@code audioAction}. + // * + // * @param audioAction an Action that knows how to render the audio + // * associated with the system or user activity + // * that is occurring; a value of {@code null}, is + // * ignored + // * @throws ClassCastException if {@code audioAction} is {@code non-null} + // * and the value of the default {@code "AuditoryCues.playList"} + // * is not an {@code Object[]} + // * @since 1.4 + // */ + // protected void playSound(Action audioAction) { + // if (audioAction != null) { + // Object[] audioStrings = (Object[]) + // UIManager.get("AuditoryCues.playList"); + // if (audioStrings != null) { + // // create a HashSet to help us decide to play or not + // HashSet audioCues = new HashSet(); + // for (int i = 0; i < audioStrings.length; i++) { + // audioCues.add(audioStrings[i]); + // } + // // get the name of the Action + // String actionName = (String)audioAction.getValue(Action.NAME); + // // if the actionName is in the audioCues HashSet, play it. + // if (audioCues.contains(actionName)) { + // audioAction.actionPerformed(new + // ActionEvent(this, ActionEvent.ACTION_PERFORMED, + // actionName)); + // } + // } + // } + // } + // + // + // /** + // * Sets the parent of the passed in ActionMap to be the audio action + // * map. + // */ + // static void installAudioActionMap(ActionMap map) { + // LookAndFeel laf = UIManager.getLookAndFeel(); + // if (laf instanceof BasicLookAndFeel) { + // map.setParent(((BasicLookAndFeel)laf).getAudioActionMap()); + // } + // } + // + // + // /** + // * Helper method to play a named sound. + // * + // * @param c JComponent to play the sound for. + // * @param actionKey Key for the sound. + // */ + // static void playSound(JComponent c, Object actionKey) { + // LookAndFeel laf = UIManager.getLookAndFeel(); + // if (laf instanceof BasicLookAndFeel) { + // ActionMap map = c.getActionMap(); + // if (map != null) { + // Action audioAction = map.get(actionKey); + // if (audioAction != null) { + // // pass off firing the Action to a utility method + // ((BasicLookAndFeel)laf).playSound(audioAction); + // } + // } + // } + // } + // + // /** + // * This class contains listener that watches for all the mouse + // * events that can possibly invoke popup on the component + // */ + // class AWTEventHelper implements AWTEventListener,PrivilegedAction { + // AWTEventHelper() { + // super(); + // AccessController.doPrivileged(this); + // } + // + // public Object run() { + // Toolkit tk = Toolkit.getDefaultToolkit(); + // if(invocator == null) { + // tk.addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK); + // } else { + // tk.removeAWTEventListener(invocator); + // } + // // Return value not used. + // return null; + // } + // + // public void eventDispatched(AWTEvent ev) { + // int eventID = ev.getID(); + // if((eventID & AWTEvent.MOUSE_EVENT_MASK) != 0) { + // MouseEvent me = (MouseEvent) ev; + // if(me.isPopupTrigger()) { + // MenuElement[] elems = MenuSelectionManager + // .defaultManager() + // .getSelectedPath(); + // if(elems != null && elems.length != 0) { + // return; + // // We shall not interfere with already opened menu + // } + // Object c = me.getSource(); + // JComponent src = null; + // if(c instanceof JComponent) { + // src = (JComponent) c; + // } else if(c instanceof BasicSplitPaneDivider) { + // // Special case - if user clicks on divider we must + // // invoke popup from the SplitPane + // src = (JComponent) + // ((BasicSplitPaneDivider)c).getParent(); + // } + // if(src != null) { + // if(src.getComponentPopupMenu() != null) { + // Point pt = src.getPopupLocation(me); + // if(pt == null) { + // pt = me.getPoint(); + // pt = SwingUtilities.convertPoint((Component)c, + // pt, src); + // } + // src.getComponentPopupMenu().show(src, pt.x, pt.y); + // me.consume(); + // } + // } + // } + // } + // /* Activate a JInternalFrame if necessary. */ + // if (eventID == MouseEvent.MOUSE_PRESSED) { + // Object object = ev.getSource(); + // if (!(object instanceof Component)) { + // return; + // } + // Component component = (Component)object; + // if (component != null) { + // Component parent = component; + // while (parent != null && !(parent instanceof Window)) { + // if (parent instanceof JInternalFrame) { + // // Activate the frame. + // try { ((JInternalFrame)parent).setSelected(true); } + // catch (PropertyVetoException e1) { } + // } + // parent = parent.getParent(); + // } + // } + // } + // } + // } + // + @Override + public String getName() { + return "SwingJS"; + } + + @Override + public String getID() { + return "SwingJS"; + } + + @Override + public String getDescription() { + return "SwingJS L&F"; + } + + @Override + public boolean isNativeLookAndFeel() { + return true; + } + + @Override + public boolean isSupportedLookAndFeel() { + return true; + } +} diff --git a/site/j2s/swingjs/plaf/JSButtonListener.java b/site/j2s/swingjs/plaf/JSButtonListener.java index 31a3ff6..65b29a7 100644 --- a/site/j2s/swingjs/plaf/JSButtonListener.java +++ b/site/j2s/swingjs/plaf/JSButtonListener.java @@ -1,341 +1,341 @@ -/* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package swingjs.plaf; - -import jsjava.awt.event.ActionEvent; -import jsjava.awt.event.FocusEvent; -import jsjava.awt.event.FocusListener; -import jsjava.awt.event.InputEvent; -import jsjava.awt.event.MouseEvent; -import jsjava.awt.event.MouseListener; -import jsjava.awt.event.MouseMotionListener; -import jsjava.beans.PropertyChangeEvent; -import jsjava.beans.PropertyChangeListener; -import jsjavax.swing.AbstractButton; -import jsjavax.swing.ButtonModel; -import jsjavax.swing.InputMap; -import jsjavax.swing.JComponent; -import jsjavax.swing.KeyStroke; -import jsjavax.swing.SwingUtilities; -import jsjavax.swing.event.ChangeEvent; -import jsjavax.swing.event.ChangeListener; -import jsjavax.swing.plaf.ComponentInputMapUIResource; -import jsjavax.swing.plaf.ComponentUI; -import jssun.swing.UIAction; - -/** - * Button Listener - * - * @author Jeff Dinkins - * @author Arnaud Weber (keyboard UI support) - */ - -public class JSButtonListener implements MouseListener, MouseMotionListener, - FocusListener, ChangeListener, PropertyChangeListener -{ - private long lastPressedTimestamp = -1; - private boolean shouldDiscardRelease = false; - private AbstractButton btn; - - /** - * Populates Buttons actions. - */ - static void loadActionMap(LazyActionMap map) { - map.put(new Actions(Actions.PRESS)); - map.put(new Actions(Actions.RELEASE)); - } - - - public JSButtonListener(AbstractButton b) { - btn = b; - } - - public void propertyChange(PropertyChangeEvent e) { - String prop = e.getPropertyName(); - //System.out.println("JSButtonListener property change: " + prop + " " + e.getSource()); - if (prop == AbstractButton.MNEMONIC_CHANGED_PROPERTY) { - updateMnemonicBinding((AbstractButton) e.getSource()); - } else if (prop == AbstractButton.CONTENT_AREA_FILLED_CHANGED_PROPERTY) { - checkOpacity((AbstractButton) e.getSource()); - } else if (prop == AbstractButton.TEXT_CHANGED_PROPERTY || "font" == prop - || "foreground" == prop) { - AbstractButton b = (AbstractButton) e.getSource(); - ((JSComponentUI) (Object) b.getUI()).notifyPropertyChanged(prop); - } - } - - protected void checkOpacity(AbstractButton b) { - b.setOpaque( b.isContentAreaFilled() ); - } - - /** - * Register default key actions: pressing space to "click" a - * button and registring the keyboard mnemonic (if any). - */ - public void installKeyboardActions(JComponent c) { - AbstractButton b = (AbstractButton)c; - // Update the mnemonic binding. - updateMnemonicBinding(b); - - LazyActionMap.installLazyActionMap(c, JSButtonListener.class, - "Button.actionMap"); - - InputMap km = getInputMap(JComponent.WHEN_FOCUSED, c); - - SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED, km); - } - - /** - * Unregister's default key actions - */ - public void uninstallKeyboardActions(JComponent c) { - SwingUtilities.replaceUIInputMap(c, JComponent. - WHEN_IN_FOCUSED_WINDOW, null); - SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED, null); - SwingUtilities.replaceUIActionMap(c, null); - } - - /** - * Returns the InputMap for condition condition. Called as - * part of installKeyboardActions. - */ - InputMap getInputMap(int condition, JComponent c) { -// if (condition == JComponent.WHEN_FOCUSED) { -// BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( -// ((AbstractButton)c).getUI(), BasicButtonUI.class); -// if (ui != null) { -// return (InputMap)DefaultLookup.get( -// c, ui, ui.getPropertyPrefix() + "focusInputMap"); -// } -// } - return null; - } - - /** - * Resets the binding for the mnemonic in the WHEN_IN_FOCUSED_WINDOW - * UI InputMap. - */ - void updateMnemonicBinding(AbstractButton b) { - int m = b.getMnemonic(); - if(m != 0) { - InputMap map = SwingUtilities.getUIInputMap( - b, JComponent.WHEN_IN_FOCUSED_WINDOW); - - if (map == null) { - map = new ComponentInputMapUIResource(b); - SwingUtilities.replaceUIInputMap(b, - JComponent.WHEN_IN_FOCUSED_WINDOW, map); - } - map.clear(); - map.put(KeyStroke.getKeyStroke(m, InputEvent.ALT_MASK, false), - "pressed"); - map.put(KeyStroke.getKeyStroke(m, InputEvent.ALT_MASK, true), - "released"); - map.put(KeyStroke.getKeyStroke(m, 0, true), "released"); - } - else { - InputMap map = SwingUtilities.getUIInputMap(b, JComponent. - WHEN_IN_FOCUSED_WINDOW); - if (map != null) { - map.clear(); - } - } - } - - public void stateChanged(ChangeEvent e) { - AbstractButton b = (AbstractButton) e.getSource(); - b.repaint(); - } - - public void focusGained(FocusEvent e) { -// AbstractButton b = (AbstractButton) e.getSource(); -// if (b instanceof JButton && ((JButton)b).isDefaultCapable()) { -// JRootPane root = b.getRootPane(); -// if (root != null) { -// BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( -// ((AbstractButton)b).getUI(), BasicButtonUI.class); -// if (ui != null && DefaultLookup.getBoolean(b, ui, -// ui.getPropertyPrefix() + -// "defaultButtonFollowsFocus", true)) { -// root.putClientProperty("temporaryDefaultButton", b); -// root.setDefaultButton((JButton)b); -// root.putClientProperty("temporaryDefaultButton", null); -// } -// } -// } -// b.repaint(); - } - - public void focusLost(FocusEvent e) { - AbstractButton b = (AbstractButton) e.getSource(); -// JRootPane root = b.getRootPane(); -// if (root != null) { -// JButton initialDefault = (JButton)root.getClientProperty("initialDefaultButton"); -// if (b != initialDefault) { -// BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( -// ((AbstractButton)b).getUI(), BasicButtonUI.class); -// if (ui != null && DefaultLookup.getBoolean(b, ui, -// ui.getPropertyPrefix() + -// "defaultButtonFollowsFocus", true)) { -// root.setDefaultButton(initialDefault); -// } -// } -// } -// - ButtonModel model = b.getModel(); - model.setArmed(false); - model.setPressed(false); -// -// b.repaint(); - } - - public void mouseMoved(MouseEvent e) { - } - - - public void mouseDragged(MouseEvent e) { - } - - public void mouseClicked(MouseEvent e) { - } - - public void mousePressed(MouseEvent e) { - if (SwingUtilities.isLeftMouseButton(e)) { - AbstractButton b = (AbstractButton) e.getSource(); - if (!b.contains(e.getX(), e.getY())) - return; - // We need to check the state before and after the button click - // for radio and checkboxes to make sure the DOM button actually got hit. - // mousePress is an "arm"; mouseRelease is a "click" - - ((JSButtonUI) (ComponentUI) b.getUI()).verifyButtonClick(false); - long multiClickThreshhold = b.getMultiClickThreshhold(); - long lastTime = lastPressedTimestamp; - long currentTime = lastPressedTimestamp = e.getWhen(); - if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) { - shouldDiscardRelease = true; - return; - } - - //System.out.println("JSButtonListener press " + b.getName() + " " + e); - - ButtonModel model = b.getModel(); - if (!model.isEnabled()) { - // Disabled buttons ignore all input... - return; - } - if (!model.isArmed()) { - // button not armed, should be - model.setArmed(true); - } - model.setPressed(true); - if (!b.hasFocus() && b.isRequestFocusEnabled()) { - b.requestFocus(); - } - } - }; - - public void mouseReleased(MouseEvent e) { - if (SwingUtilities.isLeftMouseButton(e)) { - // Support for multiClickThreshhold - if (shouldDiscardRelease) { - shouldDiscardRelease = false; - return; - } - AbstractButton b = (AbstractButton) e.getSource(); - if (!((JSButtonUI) (ComponentUI) b.getUI()).verifyButtonClick(true)) - return; - - //System.out.println("JSButtonListener released " + b.getName() + " " + e); - - ButtonModel model = b.getModel(); - model.setPressed(false); - model.setArmed(false); - } - }; - - public void mouseEntered(MouseEvent e) { - AbstractButton b = (AbstractButton) e.getSource(); - ButtonModel model = b.getModel(); - if (b.isRolloverEnabled() && !SwingUtilities.isLeftMouseButton(e)) { - model.setRollover(true); - } - if (model.isPressed()) - model.setArmed(true); - }; - - public void mouseExited(MouseEvent e) { - AbstractButton b = (AbstractButton) e.getSource(); - ButtonModel model = b.getModel(); - if(b.isRolloverEnabled()) { - model.setRollover(false); - } - model.setArmed(false); - }; - - - /** - * Actions for Buttons. Two types of action are supported: - * pressed: Moves the button to a pressed state - * released: Disarms the button. - */ - private static class Actions extends UIAction { - private static final String PRESS = "pressed"; - private static final String RELEASE = "released"; - - Actions(String name) { - super(name); - } - - public void actionPerformed(ActionEvent e) { - AbstractButton b = (AbstractButton)e.getSource(); - String key = getName(); - if (key == PRESS) { - ButtonModel model = b.getModel(); - model.setArmed(true); - model.setPressed(true); - if(!b.hasFocus()) { - b.requestFocus(); - } - } - else if (key == RELEASE) { - ButtonModel model = b.getModel(); - model.setPressed(false); - model.setArmed(false); - } - } - - public boolean isEnabled(Object sender) { - if(sender != null && (sender instanceof AbstractButton) && - !((AbstractButton)sender).getModel().isEnabled()) { - return false; - } else { - return true; - } - } - } -} +/* + * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package swingjs.plaf; + +import jsjava.awt.event.ActionEvent; +import jsjava.awt.event.FocusEvent; +import jsjava.awt.event.FocusListener; +import jsjava.awt.event.InputEvent; +import jsjava.awt.event.MouseEvent; +import jsjava.awt.event.MouseListener; +import jsjava.awt.event.MouseMotionListener; +import jsjava.beans.PropertyChangeEvent; +import jsjava.beans.PropertyChangeListener; +import jsjavax.swing.AbstractButton; +import jsjavax.swing.ButtonModel; +import jsjavax.swing.InputMap; +import jsjavax.swing.JComponent; +import jsjavax.swing.KeyStroke; +import jsjavax.swing.SwingUtilities; +import jsjavax.swing.event.ChangeEvent; +import jsjavax.swing.event.ChangeListener; +import jsjavax.swing.plaf.ComponentInputMapUIResource; +import jsjavax.swing.plaf.ComponentUI; +import jssun.swing.UIAction; + +/** + * Button Listener + * + * @author Jeff Dinkins + * @author Arnaud Weber (keyboard UI support) + */ + +public class JSButtonListener implements MouseListener, MouseMotionListener, + FocusListener, ChangeListener, PropertyChangeListener +{ + private long lastPressedTimestamp = -1; + private boolean shouldDiscardRelease = false; + private AbstractButton btn; + + /** + * Populates Buttons actions. + */ + static void loadActionMap(LazyActionMap map) { + map.put(new Actions(Actions.PRESS)); + map.put(new Actions(Actions.RELEASE)); + } + + + public JSButtonListener(AbstractButton b) { + btn = b; + } + + public void propertyChange(PropertyChangeEvent e) { + String prop = e.getPropertyName(); + //System.out.println("JSButtonListener property change: " + prop + " " + e.getSource()); + if (prop == AbstractButton.MNEMONIC_CHANGED_PROPERTY) { + updateMnemonicBinding((AbstractButton) e.getSource()); + } else if (prop == AbstractButton.CONTENT_AREA_FILLED_CHANGED_PROPERTY) { + checkOpacity((AbstractButton) e.getSource()); + } else if (prop == AbstractButton.TEXT_CHANGED_PROPERTY || "font" == prop + || "foreground" == prop) { + AbstractButton b = (AbstractButton) e.getSource(); + ((JSComponentUI) (Object) b.getUI()).notifyPropertyChanged(prop); + } + } + + protected void checkOpacity(AbstractButton b) { + b.setOpaque( b.isContentAreaFilled() ); + } + + /** + * Register default key actions: pressing space to "click" a + * button and registring the keyboard mnemonic (if any). + */ + public void installKeyboardActions(JComponent c) { + AbstractButton b = (AbstractButton)c; + // Update the mnemonic binding. + updateMnemonicBinding(b); + + LazyActionMap.installLazyActionMap(c, JSButtonListener.class, + "Button.actionMap"); + + InputMap km = getInputMap(JComponent.WHEN_FOCUSED, c); + + SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED, km); + } + + /** + * Unregister's default key actions + */ + public void uninstallKeyboardActions(JComponent c) { + SwingUtilities.replaceUIInputMap(c, JComponent. + WHEN_IN_FOCUSED_WINDOW, null); + SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED, null); + SwingUtilities.replaceUIActionMap(c, null); + } + + /** + * Returns the InputMap for condition condition. Called as + * part of installKeyboardActions. + */ + InputMap getInputMap(int condition, JComponent c) { +// if (condition == JComponent.WHEN_FOCUSED) { +// BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( +// ((AbstractButton)c).getUI(), BasicButtonUI.class); +// if (ui != null) { +// return (InputMap)DefaultLookup.get( +// c, ui, ui.getPropertyPrefix() + "focusInputMap"); +// } +// } + return null; + } + + /** + * Resets the binding for the mnemonic in the WHEN_IN_FOCUSED_WINDOW + * UI InputMap. + */ + void updateMnemonicBinding(AbstractButton b) { + int m = b.getMnemonic(); + if(m != 0) { + InputMap map = SwingUtilities.getUIInputMap( + b, JComponent.WHEN_IN_FOCUSED_WINDOW); + + if (map == null) { + map = new ComponentInputMapUIResource(b); + SwingUtilities.replaceUIInputMap(b, + JComponent.WHEN_IN_FOCUSED_WINDOW, map); + } + map.clear(); + map.put(KeyStroke.getKeyStroke(m, InputEvent.ALT_MASK, false), + "pressed"); + map.put(KeyStroke.getKeyStroke(m, InputEvent.ALT_MASK, true), + "released"); + map.put(KeyStroke.getKeyStroke(m, 0, true), "released"); + } + else { + InputMap map = SwingUtilities.getUIInputMap(b, JComponent. + WHEN_IN_FOCUSED_WINDOW); + if (map != null) { + map.clear(); + } + } + } + + public void stateChanged(ChangeEvent e) { + AbstractButton b = (AbstractButton) e.getSource(); + b.repaint(); + } + + public void focusGained(FocusEvent e) { +// AbstractButton b = (AbstractButton) e.getSource(); +// if (b instanceof JButton && ((JButton)b).isDefaultCapable()) { +// JRootPane root = b.getRootPane(); +// if (root != null) { +// BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( +// ((AbstractButton)b).getUI(), BasicButtonUI.class); +// if (ui != null && DefaultLookup.getBoolean(b, ui, +// ui.getPropertyPrefix() + +// "defaultButtonFollowsFocus", true)) { +// root.putClientProperty("temporaryDefaultButton", b); +// root.setDefaultButton((JButton)b); +// root.putClientProperty("temporaryDefaultButton", null); +// } +// } +// } +// b.repaint(); + } + + public void focusLost(FocusEvent e) { + AbstractButton b = (AbstractButton) e.getSource(); +// JRootPane root = b.getRootPane(); +// if (root != null) { +// JButton initialDefault = (JButton)root.getClientProperty("initialDefaultButton"); +// if (b != initialDefault) { +// BasicButtonUI ui = (BasicButtonUI)BasicLookAndFeel.getUIOfType( +// ((AbstractButton)b).getUI(), BasicButtonUI.class); +// if (ui != null && DefaultLookup.getBoolean(b, ui, +// ui.getPropertyPrefix() + +// "defaultButtonFollowsFocus", true)) { +// root.setDefaultButton(initialDefault); +// } +// } +// } +// + ButtonModel model = b.getModel(); + model.setArmed(false); + model.setPressed(false); +// +// b.repaint(); + } + + public void mouseMoved(MouseEvent e) { + } + + + public void mouseDragged(MouseEvent e) { + } + + public void mouseClicked(MouseEvent e) { + } + + public void mousePressed(MouseEvent e) { + if (SwingUtilities.isLeftMouseButton(e)) { + AbstractButton b = (AbstractButton) e.getSource(); + if (!b.contains(e.getX(), e.getY())) + return; + // We need to check the state before and after the button click + // for radio and checkboxes to make sure the DOM button actually got hit. + // mousePress is an "arm"; mouseRelease is a "click" + + ((JSButtonUI) (ComponentUI) b.getUI()).verifyButtonClick(false); + long multiClickThreshhold = b.getMultiClickThreshhold(); + long lastTime = lastPressedTimestamp; + long currentTime = lastPressedTimestamp = e.getWhen(); + if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) { + shouldDiscardRelease = true; + return; + } + + //System.out.println("JSButtonListener press " + b.getName() + " " + e); + + ButtonModel model = b.getModel(); + if (!model.isEnabled()) { + // Disabled buttons ignore all input... + return; + } + if (!model.isArmed()) { + // button not armed, should be + model.setArmed(true); + } + model.setPressed(true); + if (!b.hasFocus() && b.isRequestFocusEnabled()) { + b.requestFocus(); + } + } + }; + + public void mouseReleased(MouseEvent e) { + if (SwingUtilities.isLeftMouseButton(e)) { + // Support for multiClickThreshhold + if (shouldDiscardRelease) { + shouldDiscardRelease = false; + return; + } + AbstractButton b = (AbstractButton) e.getSource(); + if (!((JSButtonUI) (ComponentUI) b.getUI()).verifyButtonClick(true)) + return; + + //System.out.println("JSButtonListener released " + b.getName() + " " + e); + + ButtonModel model = b.getModel(); + model.setPressed(false); + model.setArmed(false); + } + }; + + public void mouseEntered(MouseEvent e) { + AbstractButton b = (AbstractButton) e.getSource(); + ButtonModel model = b.getModel(); + if (b.isRolloverEnabled() && !SwingUtilities.isLeftMouseButton(e)) { + model.setRollover(true); + } + if (model.isPressed()) + model.setArmed(true); + }; + + public void mouseExited(MouseEvent e) { + AbstractButton b = (AbstractButton) e.getSource(); + ButtonModel model = b.getModel(); + if(b.isRolloverEnabled()) { + model.setRollover(false); + } + model.setArmed(false); + }; + + + /** + * Actions for Buttons. Two types of action are supported: + * pressed: Moves the button to a pressed state + * released: Disarms the button. + */ + private static class Actions extends UIAction { + private static final String PRESS = "pressed"; + private static final String RELEASE = "released"; + + Actions(String name) { + super(name); + } + + public void actionPerformed(ActionEvent e) { + AbstractButton b = (AbstractButton)e.getSource(); + String key = getName(); + if (key == PRESS) { + ButtonModel model = b.getModel(); + model.setArmed(true); + model.setPressed(true); + if(!b.hasFocus()) { + b.requestFocus(); + } + } + else if (key == RELEASE) { + ButtonModel model = b.getModel(); + model.setPressed(false); + model.setArmed(false); + } + } + + public boolean isEnabled(Object sender) { + if(sender != null && (sender instanceof AbstractButton) && + !((AbstractButton)sender).getModel().isEnabled()) { + return false; + } else { + return true; + } + } + } +} \ No newline at end of file diff --git a/site/j2s/swingjs/plaf/JSButtonUI.java b/site/j2s/swingjs/plaf/JSButtonUI.java index 2c7b94a..38a2406 100644 --- a/site/j2s/swingjs/plaf/JSButtonUI.java +++ b/site/j2s/swingjs/plaf/JSButtonUI.java @@ -1,565 +1,565 @@ -package swingjs.plaf; - -//import jsjava.awt.FontMetrics; -import jsjava.awt.event.MouseMotionListener; -import jsjavax.swing.AbstractButton; -import jsjavax.swing.LookAndFeel; -import jsjavax.swing.UIManager; -import swingjs.api.DOMNode; -import jsjavax.swing.plaf.UIResource; -/** - * SWingJS implementation of stateful user interface for buttons. - * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). - * - * @author Bob Hanson - * - */ -public class JSButtonUI extends JSComponentUI { - - - /** - * the radio or check-box or simple button - * - */ - protected DOMNode domBtn; - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domBtn = enableNode = valueNode = domNode = createDOMObject("input", id, - "type", "button"); - setCssFont(DOMNode.setAttr(domNode, "value", ((AbstractButton) c).getText()), - c.getFont()); - return domNode; - } - - /** - * validate a button press -- with a simple button, this is just TRUE. - * This is needed because sometimes the area near the button is pressed - * but not the actual button. - * @param isRelease TODO - * - * @return true if the HTML5 button was actually pressed - */ - boolean verifyButtonClick(boolean isRelease) { - return true; - } - - - // from BasicButtonUI - - protected void installJSUI() { - installDefaults((AbstractButton) c); - installListeners((AbstractButton) c); - installKeyboardActions((AbstractButton) c); - } - - protected void uninstallJSUI() { - uninstallKeyboardActions((AbstractButton) c); - uninstallListeners((AbstractButton) c); - //uninstallDefaults((AbstractButton) c); - } - - protected void installListeners(AbstractButton b) { - JSButtonListener listener = new JSButtonListener(b); - if (listener != null) { - b.addMouseListener(listener); - b.addMouseMotionListener(listener); - b.addFocusListener(listener); - b.addPropertyChangeListener(listener); - b.addChangeListener(listener); - } - } - - protected void uninstallListeners(AbstractButton b) { - JSButtonListener listener = getButtonListener(b); - if (listener != null) { - b.removeMouseListener(listener); - b.removeMouseMotionListener(listener); - b.removeFocusListener(listener); - b.removeChangeListener(listener); - b.removePropertyChangeListener(listener); - } - } - - protected void installKeyboardActions(AbstractButton b) { - JSButtonListener listener = getButtonListener(b); - if (listener != null) { - listener.installKeyboardActions(b); - } - } - - protected void uninstallKeyboardActions(AbstractButton b) { - JSButtonListener listener = getButtonListener(b); - if(listener != null) { - listener.uninstallKeyboardActions(b); - } - } - - /** - * Returns the ButtonListener for the passed in Button, or null if one - * could not be found. - */ - protected JSButtonListener getButtonListener(AbstractButton b) { - MouseMotionListener[] listeners = b.getMouseMotionListeners(); - - if (listeners != null) { - for (int counter = 0; counter < listeners.length; counter++) { - if (listeners[counter] instanceof JSButtonListener) { - return (JSButtonListener)listeners[counter]; - } - } - } - return null; - } - - // SwingJS -- this is interesting, as it summarizes everything we will need - // to implement, ultimately. SwingUtilities.layoutCompoundLabel - // details what we are going to have to do somewhere. - -// private String layout(AbstractButton b, FontMetrics fm, int width, int height) { -// Insets i = b.getInsets(); -// viewRect.x = i.left; -// viewRect.y = i.top; -// viewRect.width = width - (i.right + viewRect.x); -// viewRect.height = height - (i.bottom + viewRect.y); -// -// textRect.x = textRect.y = textRect.width = textRect.height = 0; -// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; -// -// // layout the text and icon -// return SwingUtilities.layoutCompoundLabel(b, fm, b.getText(), b.getIcon(), -// b.getVerticalAlignment(), b.getHorizontalAlignment(), -// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), viewRect, -// iconRect, textRect, b.getText() == null ? 0 : b.getIconTextGap()); -// return null; -// } - - -// // Visual constants -// // NOTE: This is not used or set any where. Were we allowed to remove -// // fields, this would be removed. -// protected int defaultTextIconGap; -// - /** Amount to offset text, the value of this comes from - defaultTextShiftOffset once setTextShiftOffset has been invoked. - */ - protected int shiftOffset = 0; - - /** Value that is set in shiftOffset once setTextShiftOffset has been - invoked. The value of this comes from the defaults table. - */ - protected int defaultTextShiftOffset; -// -//protected String propertyPrefix = "Button."; -// -// private static final Object BASIC_BUTTON_UI_KEY = new Object(); -// -// // ******************************** -// // Create PLAF -// // ******************************** -// public static ComponentUI createUI(JComponent c) { -// AppContext appContext = AppContext.getAppContext(); -// BasicButtonUI buttonUI = -// (BasicButtonUI) appContext.get(BASIC_BUTTON_UI_KEY); -// if (buttonUI == null) { -// buttonUI = new BasicButtonUI(); -// appContext.put(BASIC_BUTTON_UI_KEY, buttonUI); -// } -// return buttonUI; -// } -// - protected String getPropertyPrefix() { - return "Button."; - } -// -// -// // ******************************** -// // Install PLAF -// // ******************************** -// public void installUI(JComponent c) { -// installDefaults((AbstractButton) c); -// installListeners((AbstractButton) c); -// installKeyboardActions((AbstractButton) c); -// BasicHTML.updateRenderer(c, ((AbstractButton) c).getText()); -// } -// - protected void installDefaults(AbstractButton b) { - // load shared instance defaults - String pp = getPropertyPrefix(); - - defaultTextShiftOffset = UIManager.getInt(pp + "textShiftOffset"); - -// // set the following defaults on the button -// if (b.isContentAreaFilled()) { -// LookAndFeel.installProperty(b, "opaque", Boolean.TRUE); -// } else { -// LookAndFeel.installProperty(b, "opaque", Boolean.FALSE); -// } - - if(b.getMargin() == null || (b.getMargin() instanceof UIResource)) { - b.setMargin(UIManager.getInsets(pp + "margin")); - } - - LookAndFeel.installColorsAndFont(b, pp + "background", - pp + "foreground", pp + "font"); -// LookAndFeel.installBorder(b, pp + "border"); -// -// Object rollover = UIManager.get(pp + "rollover"); -// if (rollover != null) { -// LookAndFeel.installProperty(b, "rolloverEnabled", rollover); -// } - LookAndFeel.installProperty(b, "iconTextGap", new Integer(4)); - } -// -// protected void installListeners(AbstractButton b) { -// JSButtonListener listener = createButtonListener(b); -// if(listener != null) { -// b.addMouseListener(listener); -// b.addMouseMotionListener(listener); -// b.addFocusListener(listener); -// b.addPropertyChangeListener(listener); -// b.addChangeListener(listener); -// } -// } -// -// protected void installKeyboardActions(AbstractButton b){ -// JSButtonListener listener = getButtonListener(b); -// -// if(listener != null) { -// listener.installKeyboardActions(b); -// } -// } -// -// -// // ******************************** -// // Uninstall PLAF -// // ******************************** -// public void uninstallUI(JComponent c) { -// uninstallKeyboardActions((AbstractButton) c); -// uninstallListeners((AbstractButton) c); -// uninstallDefaults((AbstractButton) c); -// BasicHTML.updateRenderer(c, ""); -// } -// -// protected void uninstallKeyboardActions(AbstractButton b) { -// JSButtonListener listener = getButtonListener(b); -// if(listener != null) { -// listener.uninstallKeyboardActions(b); -// } -// } -// -// protected void uninstallListeners(AbstractButton b) { -// JSButtonListener listener = getButtonListener(b); -// if(listener != null) { -// b.removeMouseListener(listener); -// b.removeMouseMotionListener(listener); -// b.removeFocusListener(listener); -// b.removeChangeListener(listener); -// b.removePropertyChangeListener(listener); -// } -// } -// -// protected void uninstallDefaults(AbstractButton b) { -// LookAndFeel.uninstallBorder(b); -// } -// -// // ******************************** -// // Create Listeners -// // ******************************** -// protected JSButtonListener createButtonListener(AbstractButton b) { -// return new JSButtonListener(b); -// } -// -// public int getDefaultTextIconGap(AbstractButton b) { -// return defaultTextIconGap; -// } -// -// /* These rectangles/insets are allocated once for all -// * ButtonUI.paint() calls. Re-using rectangles rather than -// * allocating them in each paint call substantially reduced the time -// * it took paint to run. Obviously, this method can't be re-entered. -// */ -// private static Rectangle viewRect = new Rectangle(); -// private static Rectangle textRect = new Rectangle(); -// private static Rectangle iconRect = new Rectangle(); -// -// // ******************************** -// // Paint Methods -// // ******************************** -// -// public void paint(Graphics g, JComponent c) -// { -// AbstractButton b = (AbstractButton) c; -// ButtonModel model = b.getModel(); -// -// String text = layout(b, SwingUtilities2.getFontMetrics(b, g), -// b.getWidth(), b.getHeight()); -// -// clearTextShiftOffset(); -// -// // perform UI specific press action, e.g. Windows L&F shifts text -// if (model.isArmed() && model.isPressed()) { -// paintButtonPressed(g,b); -// } -// -// // Paint the Icon -// if(b.getIcon() != null) { -// paintIcon(g,c,iconRect); -// } -// -// if (text != null && !text.equals("")){ -// View v = (View) c.getClientProperty(BasicHTML.propertyKey); -// if (v != null) { -// v.paint(g, textRect); -// } else { -// paintText(g, b, textRect, text); -// } -// } -// -// if (b.isFocusPainted() && b.hasFocus()) { -// // paint UI specific focus -// paintFocus(g,b,viewRect,textRect,iconRect); -// } -// } -// -// protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect){ -// AbstractButton b = (AbstractButton) c; -// ButtonModel model = b.getModel(); -// Icon icon = b.getIcon(); -// Icon tmpIcon = null; -// -// if(icon == null) { -// return; -// } -// -// Icon selectedIcon = null; -// -// /* the fallback icon should be based on the selected state */ -// if (model.isSelected()) { -// selectedIcon = (Icon) b.getSelectedIcon(); -// if (selectedIcon != null) { -// icon = selectedIcon; -// } -// } -// -// if(!model.isEnabled()) { -// if(model.isSelected()) { -// tmpIcon = (Icon) b.getDisabledSelectedIcon(); -// if (tmpIcon == null) { -// tmpIcon = selectedIcon; -// } -// } -// -// if (tmpIcon == null) { -// tmpIcon = (Icon) b.getDisabledIcon(); -// } -// } else if(model.isPressed() && model.isArmed()) { -// tmpIcon = (Icon) b.getPressedIcon(); -// if(tmpIcon != null) { -// // revert back to 0 offset -// clearTextShiftOffset(); -// } -// } else if(b.isRolloverEnabled() && model.isRollover()) { -// if(model.isSelected()) { -// tmpIcon = (Icon) b.getRolloverSelectedIcon(); -// if (tmpIcon == null) { -// tmpIcon = selectedIcon; -// } -// } -// -// if (tmpIcon == null) { -// tmpIcon = (Icon) b.getRolloverIcon(); -// } -// } -// -// if(tmpIcon != null) { -// icon = tmpIcon; -// } -// -// if(model.isPressed() && model.isArmed()) { -// icon.paintIcon(c, g, iconRect.x + getTextShiftOffset(), -// iconRect.y + getTextShiftOffset()); -// } else { -// icon.paintIcon(c, g, iconRect.x, iconRect.y); -// } -// -// } -// -// /** -// * As of Java 2 platform v 1.4 this method should not be used or overriden. -// * Use the paintText method which takes the AbstractButton argument. -// */ -// protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text) { -// AbstractButton b = (AbstractButton) c; -// ButtonModel model = b.getModel(); -// FontMetrics fm = SwingUtilities2.getFontMetrics(c, g); -// int mnemonicIndex = b.getDisplayedMnemonicIndex(); -// -// /* Draw the Text */ -// if(model.isEnabled()) { -// /*** paint the text normally */ -// g.setColor(b.getForeground()); -// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, -// textRect.x + getTextShiftOffset(), -// textRect.y + fm.getAscent() + getTextShiftOffset()); -// } -// else { -// /*** paint the text disabled ***/ -// g.setColor(b.getBackground().brighter()); -// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, -// textRect.x, textRect.y + fm.getAscent()); -// g.setColor(b.getBackground().darker()); -// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, -// textRect.x - 1, textRect.y + fm.getAscent() - 1); -// } -// } -// -// /** -// * Method which renders the text of the current button. -// *

    -// * @param g Graphics context -// * @param b Current button to render -// * @param textRect Bounding rectangle to render the text. -// * @param text String to render -// * @since 1.4 -// */ -// protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) { -// paintText(g, (JComponent)b, textRect, text); -// } -// -// // Method signature defined here overriden in subclasses. -// // Perhaps this class should be abstract? -// protected void paintFocus(Graphics g, AbstractButton b, -// Rectangle viewRect, Rectangle textRect, Rectangle iconRect){ -// } -// -// -// -// protected void paintButtonPressed(Graphics g, AbstractButton b){ -// } -// -// protected void clearTextShiftOffset(){ -// this.shiftOffset = 0; -// } -// -// protected void setTextShiftOffset(){ -// this.shiftOffset = defaultTextShiftOffset; -// } -// -// protected int getTextShiftOffset() { -// return shiftOffset; -// } -// -// // ******************************** -// // Layout Methods -// // ******************************** -// public Dimension getMinimumSize(JComponent c) { -// Dimension d = getPreferredSize(c); -// View v = (View) c.getClientProperty(BasicHTML.propertyKey); -// if (v != null) { -// d.width -= v.getPreferredSpan(View.X_AXIS) - v.getMinimumSpan(View.X_AXIS); -// } -// return d; -// } -// -// public Dimension getPreferredSize(JComponent c) { -// AbstractButton b = (AbstractButton)c; -// return BasicGraphicsUtils.getPreferredButtonSize(b, b.getIconTextGap()); -// } -// -// public Dimension getMaximumSize(JComponent c) { -// Dimension d = getPreferredSize(c); -// View v = (View) c.getClientProperty(BasicHTML.propertyKey); -// if (v != null) { -// d.width += v.getMaximumSpan(View.X_AXIS) - v.getPreferredSpan(View.X_AXIS); -// } -// return d; -// } -// -// /** -// * Returns the baseline. -// * -// * @throws NullPointerException {@inheritDoc} -// * @throws IllegalArgumentException {@inheritDoc} -// * @see javax.swing.JComponent#getBaseline(int, int) -// * @since 1.6 -// */ -// public int getBaseline(JComponent c, int width, int height) { -// super.getBaseline(c, width, height); -// AbstractButton b = (AbstractButton)c; -// String text = b.getText(); -// if (text == null || "".equals(text)) { -// return -1; -// } -// FontMetrics fm = b.getFontMetrics(b.getFont()); -// layout(b, fm, width, height); -// return BasicHTML.getBaseline(b, textRect.y, fm.getAscent(), -// textRect.width, textRect.height); -// } -// -// /** -// * Returns an enum indicating how the baseline of the component -// * changes as the size changes. -// * -// * @throws NullPointerException {@inheritDoc} -// * @see javax.swing.JComponent#getBaseline(int, int) -// * @since 1.6 -// */ -// public Component.BaselineResizeBehavior getBaselineResizeBehavior( -// JComponent c) { -// super.getBaselineResizeBehavior(c); -// if (c.getClientProperty(BasicHTML.propertyKey) != null) { -// return Component.BaselineResizeBehavior.OTHER; -// } -// switch(((AbstractButton)c).getVerticalAlignment()) { -// case AbstractButton.TOP: -// return Component.BaselineResizeBehavior.CONSTANT_ASCENT; -// case AbstractButton.BOTTOM: -// return Component.BaselineResizeBehavior.CONSTANT_DESCENT; -// case AbstractButton.CENTER: -// return Component.BaselineResizeBehavior.CENTER_OFFSET; -// } -// return Component.BaselineResizeBehavior.OTHER; -// } -// -// private String layout(AbstractButton b, FontMetrics fm, -// int width, int height) { -// Insets i = b.getInsets(); -// viewRect.x = i.left; -// viewRect.y = i.top; -// viewRect.width = width - (i.right + viewRect.x); -// viewRect.height = height - (i.bottom + viewRect.y); -// -// textRect.x = textRect.y = textRect.width = textRect.height = 0; -// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; -// -// // layout the text and icon -// return SwingUtilities.layoutCompoundLabel( -// b, fm, b.getText(), b.getIcon(), -// b.getVerticalAlignment(), b.getHorizontalAlignment(), -// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), -// viewRect, iconRect, textRect, -// b.getText() == null ? 0 : b.getIconTextGap()); -// } -// -// /** -// * Returns the ButtonListener for the passed in Button, or null if one -// * could not be found. -// */ -// private JSButtonListener getButtonListener(AbstractButton b) { -// MouseMotionListener[] listeners = b.getMouseMotionListeners(); -// -// if (listeners != null) { -// for (int counter = 0; counter < listeners.length; counter++) { -// if (listeners[counter] instanceof JSButtonListener) { -// return (JSButtonListener)listeners[counter]; -// } -// } -// } -// return null; -// } -// -// - -} +package swingjs.plaf; + +//import jsjava.awt.FontMetrics; +import jsjava.awt.event.MouseMotionListener; +import jsjavax.swing.AbstractButton; +import jsjavax.swing.LookAndFeel; +import jsjavax.swing.UIManager; +import swingjs.api.DOMNode; +import jsjavax.swing.plaf.UIResource; +/** + * SWingJS implementation of stateful user interface for buttons. + * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). + * + * @author Bob Hanson + * + */ +public class JSButtonUI extends JSComponentUI { + + + /** + * the radio or check-box or simple button + * + */ + protected DOMNode domBtn; + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domBtn = enableNode = valueNode = domNode = createDOMObject("input", id, + "type", "button"); + setCssFont(DOMNode.setAttr(domNode, "value", ((AbstractButton) c).getText()), + c.getFont()); + return domNode; + } + + /** + * validate a button press -- with a simple button, this is just TRUE. + * This is needed because sometimes the area near the button is pressed + * but not the actual button. + * @param isRelease TODO + * + * @return true if the HTML5 button was actually pressed + */ + boolean verifyButtonClick(boolean isRelease) { + return true; + } + + + // from BasicButtonUI + + protected void installJSUI() { + installDefaults((AbstractButton) c); + installListeners((AbstractButton) c); + installKeyboardActions((AbstractButton) c); + } + + protected void uninstallJSUI() { + uninstallKeyboardActions((AbstractButton) c); + uninstallListeners((AbstractButton) c); + //uninstallDefaults((AbstractButton) c); + } + + protected void installListeners(AbstractButton b) { + JSButtonListener listener = new JSButtonListener(b); + if (listener != null) { + b.addMouseListener(listener); + b.addMouseMotionListener(listener); + b.addFocusListener(listener); + b.addPropertyChangeListener(listener); + b.addChangeListener(listener); + } + } + + protected void uninstallListeners(AbstractButton b) { + JSButtonListener listener = getButtonListener(b); + if (listener != null) { + b.removeMouseListener(listener); + b.removeMouseMotionListener(listener); + b.removeFocusListener(listener); + b.removeChangeListener(listener); + b.removePropertyChangeListener(listener); + } + } + + protected void installKeyboardActions(AbstractButton b) { + JSButtonListener listener = getButtonListener(b); + if (listener != null) { + listener.installKeyboardActions(b); + } + } + + protected void uninstallKeyboardActions(AbstractButton b) { + JSButtonListener listener = getButtonListener(b); + if(listener != null) { + listener.uninstallKeyboardActions(b); + } + } + + /** + * Returns the ButtonListener for the passed in Button, or null if one + * could not be found. + */ + protected JSButtonListener getButtonListener(AbstractButton b) { + MouseMotionListener[] listeners = b.getMouseMotionListeners(); + + if (listeners != null) { + for (int counter = 0; counter < listeners.length; counter++) { + if (listeners[counter] instanceof JSButtonListener) { + return (JSButtonListener)listeners[counter]; + } + } + } + return null; + } + + // SwingJS -- this is interesting, as it summarizes everything we will need + // to implement, ultimately. SwingUtilities.layoutCompoundLabel + // details what we are going to have to do somewhere. + +// private String layout(AbstractButton b, FontMetrics fm, int width, int height) { +// Insets i = b.getInsets(); +// viewRect.x = i.left; +// viewRect.y = i.top; +// viewRect.width = width - (i.right + viewRect.x); +// viewRect.height = height - (i.bottom + viewRect.y); +// +// textRect.x = textRect.y = textRect.width = textRect.height = 0; +// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; +// +// // layout the text and icon +// return SwingUtilities.layoutCompoundLabel(b, fm, b.getText(), b.getIcon(), +// b.getVerticalAlignment(), b.getHorizontalAlignment(), +// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), viewRect, +// iconRect, textRect, b.getText() == null ? 0 : b.getIconTextGap()); +// return null; +// } + + +// // Visual constants +// // NOTE: This is not used or set any where. Were we allowed to remove +// // fields, this would be removed. +// protected int defaultTextIconGap; +// + /** Amount to offset text, the value of this comes from + defaultTextShiftOffset once setTextShiftOffset has been invoked. + */ + protected int shiftOffset = 0; + + /** Value that is set in shiftOffset once setTextShiftOffset has been + invoked. The value of this comes from the defaults table. + */ + protected int defaultTextShiftOffset; +// +//protected String propertyPrefix = "Button."; +// +// private static final Object BASIC_BUTTON_UI_KEY = new Object(); +// +// // ******************************** +// // Create PLAF +// // ******************************** +// public static ComponentUI createUI(JComponent c) { +// AppContext appContext = AppContext.getAppContext(); +// BasicButtonUI buttonUI = +// (BasicButtonUI) appContext.get(BASIC_BUTTON_UI_KEY); +// if (buttonUI == null) { +// buttonUI = new BasicButtonUI(); +// appContext.put(BASIC_BUTTON_UI_KEY, buttonUI); +// } +// return buttonUI; +// } +// + protected String getPropertyPrefix() { + return "Button."; + } +// +// +// // ******************************** +// // Install PLAF +// // ******************************** +// public void installUI(JComponent c) { +// installDefaults((AbstractButton) c); +// installListeners((AbstractButton) c); +// installKeyboardActions((AbstractButton) c); +// BasicHTML.updateRenderer(c, ((AbstractButton) c).getText()); +// } +// + protected void installDefaults(AbstractButton b) { + // load shared instance defaults + String pp = getPropertyPrefix(); + + defaultTextShiftOffset = UIManager.getInt(pp + "textShiftOffset"); + +// // set the following defaults on the button +// if (b.isContentAreaFilled()) { +// LookAndFeel.installProperty(b, "opaque", Boolean.TRUE); +// } else { +// LookAndFeel.installProperty(b, "opaque", Boolean.FALSE); +// } + + if(b.getMargin() == null || (b.getMargin() instanceof UIResource)) { + b.setMargin(UIManager.getInsets(pp + "margin")); + } + + LookAndFeel.installColorsAndFont(b, pp + "background", + pp + "foreground", pp + "font"); +// LookAndFeel.installBorder(b, pp + "border"); +// +// Object rollover = UIManager.get(pp + "rollover"); +// if (rollover != null) { +// LookAndFeel.installProperty(b, "rolloverEnabled", rollover); +// } + LookAndFeel.installProperty(b, "iconTextGap", new Integer(4)); + } +// +// protected void installListeners(AbstractButton b) { +// JSButtonListener listener = createButtonListener(b); +// if(listener != null) { +// b.addMouseListener(listener); +// b.addMouseMotionListener(listener); +// b.addFocusListener(listener); +// b.addPropertyChangeListener(listener); +// b.addChangeListener(listener); +// } +// } +// +// protected void installKeyboardActions(AbstractButton b){ +// JSButtonListener listener = getButtonListener(b); +// +// if(listener != null) { +// listener.installKeyboardActions(b); +// } +// } +// +// +// // ******************************** +// // Uninstall PLAF +// // ******************************** +// public void uninstallUI(JComponent c) { +// uninstallKeyboardActions((AbstractButton) c); +// uninstallListeners((AbstractButton) c); +// uninstallDefaults((AbstractButton) c); +// BasicHTML.updateRenderer(c, ""); +// } +// +// protected void uninstallKeyboardActions(AbstractButton b) { +// JSButtonListener listener = getButtonListener(b); +// if(listener != null) { +// listener.uninstallKeyboardActions(b); +// } +// } +// +// protected void uninstallListeners(AbstractButton b) { +// JSButtonListener listener = getButtonListener(b); +// if(listener != null) { +// b.removeMouseListener(listener); +// b.removeMouseMotionListener(listener); +// b.removeFocusListener(listener); +// b.removeChangeListener(listener); +// b.removePropertyChangeListener(listener); +// } +// } +// +// protected void uninstallDefaults(AbstractButton b) { +// LookAndFeel.uninstallBorder(b); +// } +// +// // ******************************** +// // Create Listeners +// // ******************************** +// protected JSButtonListener createButtonListener(AbstractButton b) { +// return new JSButtonListener(b); +// } +// +// public int getDefaultTextIconGap(AbstractButton b) { +// return defaultTextIconGap; +// } +// +// /* These rectangles/insets are allocated once for all +// * ButtonUI.paint() calls. Re-using rectangles rather than +// * allocating them in each paint call substantially reduced the time +// * it took paint to run. Obviously, this method can't be re-entered. +// */ +// private static Rectangle viewRect = new Rectangle(); +// private static Rectangle textRect = new Rectangle(); +// private static Rectangle iconRect = new Rectangle(); +// +// // ******************************** +// // Paint Methods +// // ******************************** +// +// public void paint(Graphics g, JComponent c) +// { +// AbstractButton b = (AbstractButton) c; +// ButtonModel model = b.getModel(); +// +// String text = layout(b, SwingUtilities2.getFontMetrics(b, g), +// b.getWidth(), b.getHeight()); +// +// clearTextShiftOffset(); +// +// // perform UI specific press action, e.g. Windows L&F shifts text +// if (model.isArmed() && model.isPressed()) { +// paintButtonPressed(g,b); +// } +// +// // Paint the Icon +// if(b.getIcon() != null) { +// paintIcon(g,c,iconRect); +// } +// +// if (text != null && !text.equals("")){ +// View v = (View) c.getClientProperty(BasicHTML.propertyKey); +// if (v != null) { +// v.paint(g, textRect); +// } else { +// paintText(g, b, textRect, text); +// } +// } +// +// if (b.isFocusPainted() && b.hasFocus()) { +// // paint UI specific focus +// paintFocus(g,b,viewRect,textRect,iconRect); +// } +// } +// +// protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect){ +// AbstractButton b = (AbstractButton) c; +// ButtonModel model = b.getModel(); +// Icon icon = b.getIcon(); +// Icon tmpIcon = null; +// +// if(icon == null) { +// return; +// } +// +// Icon selectedIcon = null; +// +// /* the fallback icon should be based on the selected state */ +// if (model.isSelected()) { +// selectedIcon = (Icon) b.getSelectedIcon(); +// if (selectedIcon != null) { +// icon = selectedIcon; +// } +// } +// +// if(!model.isEnabled()) { +// if(model.isSelected()) { +// tmpIcon = (Icon) b.getDisabledSelectedIcon(); +// if (tmpIcon == null) { +// tmpIcon = selectedIcon; +// } +// } +// +// if (tmpIcon == null) { +// tmpIcon = (Icon) b.getDisabledIcon(); +// } +// } else if(model.isPressed() && model.isArmed()) { +// tmpIcon = (Icon) b.getPressedIcon(); +// if(tmpIcon != null) { +// // revert back to 0 offset +// clearTextShiftOffset(); +// } +// } else if(b.isRolloverEnabled() && model.isRollover()) { +// if(model.isSelected()) { +// tmpIcon = (Icon) b.getRolloverSelectedIcon(); +// if (tmpIcon == null) { +// tmpIcon = selectedIcon; +// } +// } +// +// if (tmpIcon == null) { +// tmpIcon = (Icon) b.getRolloverIcon(); +// } +// } +// +// if(tmpIcon != null) { +// icon = tmpIcon; +// } +// +// if(model.isPressed() && model.isArmed()) { +// icon.paintIcon(c, g, iconRect.x + getTextShiftOffset(), +// iconRect.y + getTextShiftOffset()); +// } else { +// icon.paintIcon(c, g, iconRect.x, iconRect.y); +// } +// +// } +// +// /** +// * As of Java 2 platform v 1.4 this method should not be used or overriden. +// * Use the paintText method which takes the AbstractButton argument. +// */ +// protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text) { +// AbstractButton b = (AbstractButton) c; +// ButtonModel model = b.getModel(); +// FontMetrics fm = SwingUtilities2.getFontMetrics(c, g); +// int mnemonicIndex = b.getDisplayedMnemonicIndex(); +// +// /* Draw the Text */ +// if(model.isEnabled()) { +// /*** paint the text normally */ +// g.setColor(b.getForeground()); +// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, +// textRect.x + getTextShiftOffset(), +// textRect.y + fm.getAscent() + getTextShiftOffset()); +// } +// else { +// /*** paint the text disabled ***/ +// g.setColor(b.getBackground().brighter()); +// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, +// textRect.x, textRect.y + fm.getAscent()); +// g.setColor(b.getBackground().darker()); +// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, +// textRect.x - 1, textRect.y + fm.getAscent() - 1); +// } +// } +// +// /** +// * Method which renders the text of the current button. +// *

    +// * @param g Graphics context +// * @param b Current button to render +// * @param textRect Bounding rectangle to render the text. +// * @param text String to render +// * @since 1.4 +// */ +// protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) { +// paintText(g, (JComponent)b, textRect, text); +// } +// +// // Method signature defined here overriden in subclasses. +// // Perhaps this class should be abstract? +// protected void paintFocus(Graphics g, AbstractButton b, +// Rectangle viewRect, Rectangle textRect, Rectangle iconRect){ +// } +// +// +// +// protected void paintButtonPressed(Graphics g, AbstractButton b){ +// } +// +// protected void clearTextShiftOffset(){ +// this.shiftOffset = 0; +// } +// +// protected void setTextShiftOffset(){ +// this.shiftOffset = defaultTextShiftOffset; +// } +// +// protected int getTextShiftOffset() { +// return shiftOffset; +// } +// +// // ******************************** +// // Layout Methods +// // ******************************** +// public Dimension getMinimumSize(JComponent c) { +// Dimension d = getPreferredSize(c); +// View v = (View) c.getClientProperty(BasicHTML.propertyKey); +// if (v != null) { +// d.width -= v.getPreferredSpan(View.X_AXIS) - v.getMinimumSpan(View.X_AXIS); +// } +// return d; +// } +// +// public Dimension getPreferredSize(JComponent c) { +// AbstractButton b = (AbstractButton)c; +// return BasicGraphicsUtils.getPreferredButtonSize(b, b.getIconTextGap()); +// } +// +// public Dimension getMaximumSize(JComponent c) { +// Dimension d = getPreferredSize(c); +// View v = (View) c.getClientProperty(BasicHTML.propertyKey); +// if (v != null) { +// d.width += v.getMaximumSpan(View.X_AXIS) - v.getPreferredSpan(View.X_AXIS); +// } +// return d; +// } +// +// /** +// * Returns the baseline. +// * +// * @throws NullPointerException {@inheritDoc} +// * @throws IllegalArgumentException {@inheritDoc} +// * @see javax.swing.JComponent#getBaseline(int, int) +// * @since 1.6 +// */ +// public int getBaseline(JComponent c, int width, int height) { +// super.getBaseline(c, width, height); +// AbstractButton b = (AbstractButton)c; +// String text = b.getText(); +// if (text == null || "".equals(text)) { +// return -1; +// } +// FontMetrics fm = b.getFontMetrics(b.getFont()); +// layout(b, fm, width, height); +// return BasicHTML.getBaseline(b, textRect.y, fm.getAscent(), +// textRect.width, textRect.height); +// } +// +// /** +// * Returns an enum indicating how the baseline of the component +// * changes as the size changes. +// * +// * @throws NullPointerException {@inheritDoc} +// * @see javax.swing.JComponent#getBaseline(int, int) +// * @since 1.6 +// */ +// public Component.BaselineResizeBehavior getBaselineResizeBehavior( +// JComponent c) { +// super.getBaselineResizeBehavior(c); +// if (c.getClientProperty(BasicHTML.propertyKey) != null) { +// return Component.BaselineResizeBehavior.OTHER; +// } +// switch(((AbstractButton)c).getVerticalAlignment()) { +// case AbstractButton.TOP: +// return Component.BaselineResizeBehavior.CONSTANT_ASCENT; +// case AbstractButton.BOTTOM: +// return Component.BaselineResizeBehavior.CONSTANT_DESCENT; +// case AbstractButton.CENTER: +// return Component.BaselineResizeBehavior.CENTER_OFFSET; +// } +// return Component.BaselineResizeBehavior.OTHER; +// } +// +// private String layout(AbstractButton b, FontMetrics fm, +// int width, int height) { +// Insets i = b.getInsets(); +// viewRect.x = i.left; +// viewRect.y = i.top; +// viewRect.width = width - (i.right + viewRect.x); +// viewRect.height = height - (i.bottom + viewRect.y); +// +// textRect.x = textRect.y = textRect.width = textRect.height = 0; +// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; +// +// // layout the text and icon +// return SwingUtilities.layoutCompoundLabel( +// b, fm, b.getText(), b.getIcon(), +// b.getVerticalAlignment(), b.getHorizontalAlignment(), +// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), +// viewRect, iconRect, textRect, +// b.getText() == null ? 0 : b.getIconTextGap()); +// } +// +// /** +// * Returns the ButtonListener for the passed in Button, or null if one +// * could not be found. +// */ +// private JSButtonListener getButtonListener(AbstractButton b) { +// MouseMotionListener[] listeners = b.getMouseMotionListeners(); +// +// if (listeners != null) { +// for (int counter = 0; counter < listeners.length; counter++) { +// if (listeners[counter] instanceof JSButtonListener) { +// return (JSButtonListener)listeners[counter]; +// } +// } +// } +// return null; +// } +// +// + +} diff --git a/site/j2s/swingjs/plaf/JSCheckBoxMenuItemUI.java b/site/j2s/swingjs/plaf/JSCheckBoxMenuItemUI.java index 5a6f28e..0300321 100644 --- a/site/j2s/swingjs/plaf/JSCheckBoxMenuItemUI.java +++ b/site/j2s/swingjs/plaf/JSCheckBoxMenuItemUI.java @@ -1,29 +1,29 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; - -/** - * CheckboxUI implementation for BasicCheckboxUI - *

    - * Warning: Serialized objects of this class will not be - * compatible with future Swing releases. The current serialization support is - * appropriate for short term storage or RMI between applications running the - * same version of Swing. As of 1.4, support for long term storage of all - * JavaBeansTM has been added to the - * java.beans package. Please see {@link java.beans.XMLEncoder}. - * - * @author Jeff Dinkins - */ -public class JSCheckBoxMenuItemUI extends JSCheckBoxUI { - - @Override - public DOMNode getDOMObject() { - return getButtonObject("checkBox"); - } - - @Override - protected String getPropertyPrefix() { - return "CheckBoxMenuItem."; - } - -} +package swingjs.plaf; + +import swingjs.api.DOMNode; + +/** + * CheckboxUI implementation for BasicCheckboxUI + *

    + * Warning: Serialized objects of this class will not be + * compatible with future Swing releases. The current serialization support is + * appropriate for short term storage or RMI between applications running the + * same version of Swing. As of 1.4, support for long term storage of all + * JavaBeansTM has been added to the + * java.beans package. Please see {@link java.beans.XMLEncoder}. + * + * @author Jeff Dinkins + */ +public class JSCheckBoxMenuItemUI extends JSCheckBoxUI { + + @Override + public DOMNode getDOMObject() { + return getButtonObject("checkBox"); + } + + @Override + protected String getPropertyPrefix() { + return "CheckBoxMenuItem."; + } + +} diff --git a/site/j2s/swingjs/plaf/JSCheckBoxUI.java b/site/j2s/swingjs/plaf/JSCheckBoxUI.java index df47730..7dcc3c3 100644 --- a/site/j2s/swingjs/plaf/JSCheckBoxUI.java +++ b/site/j2s/swingjs/plaf/JSCheckBoxUI.java @@ -1,29 +1,29 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; - -/** - * CheckboxUI implementation for BasicCheckboxUI - *

    - * Warning: Serialized objects of this class will not be - * compatible with future Swing releases. The current serialization support is - * appropriate for short term storage or RMI between applications running the - * same version of Swing. As of 1.4, support for long term storage of all - * JavaBeansTM has been added to the - * java.beans package. Please see {@link java.beans.XMLEncoder}. - * - * @author Jeff Dinkins - */ -public class JSCheckBoxUI extends JSRadioButtonUI { - - @Override - public DOMNode getDOMObject() { - return getButtonObject("checkBox"); - } - - @Override - protected String getPropertyPrefix() { - return "CheckBox."; - } - -} +package swingjs.plaf; + +import swingjs.api.DOMNode; + +/** + * CheckboxUI implementation for BasicCheckboxUI + *

    + * Warning: Serialized objects of this class will not be + * compatible with future Swing releases. The current serialization support is + * appropriate for short term storage or RMI between applications running the + * same version of Swing. As of 1.4, support for long term storage of all + * JavaBeansTM has been added to the + * java.beans package. Please see {@link java.beans.XMLEncoder}. + * + * @author Jeff Dinkins + */ +public class JSCheckBoxUI extends JSRadioButtonUI { + + @Override + public DOMNode getDOMObject() { + return getButtonObject("checkBox"); + } + + @Override + protected String getPropertyPrefix() { + return "CheckBox."; + } + +} diff --git a/site/j2s/swingjs/plaf/JSComboBoxUI.java b/site/j2s/swingjs/plaf/JSComboBoxUI.java index 04e97c3..3f88f4d 100644 --- a/site/j2s/swingjs/plaf/JSComboBoxUI.java +++ b/site/j2s/swingjs/plaf/JSComboBoxUI.java @@ -1,51 +1,51 @@ -package swingjs.plaf; - - -import jsjava.awt.Dimension; - -import jsjavax.swing.JComponent; -import jsjavax.swing.LookAndFeel; - -import swingjs.api.DOMNode; - -public class JSComboBoxUI extends JSComponentUI { - - public JSComboBoxUI() { - isContainer = true; - setDoc(); - } - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domNode = createDOMObject("select", id); - return domNode; - } - - @Override - protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { - // SwingJS for now: just designated container width/height - return new Dimension(c.getWidth(), c.getHeight()); - } - - @Override - public Dimension getPreferredSize(JComponent c) { - // SwingJS should defer to containing panel - return null; - } - - @Override - protected void installJSUI() { - LookAndFeel.installColorsAndFont(c, - "ComboBox.background", - "ComboBox.foreground", - "ComboBox.font"); - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +package swingjs.plaf; + + +import jsjava.awt.Dimension; + +import jsjavax.swing.JComponent; +import jsjavax.swing.LookAndFeel; + +import swingjs.api.DOMNode; + +public class JSComboBoxUI extends JSComponentUI { + + public JSComboBoxUI() { + isContainer = true; + setDoc(); + } + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domNode = createDOMObject("select", id); + return domNode; + } + + @Override + protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { + // SwingJS for now: just designated container width/height + return new Dimension(c.getWidth(), c.getHeight()); + } + + @Override + public Dimension getPreferredSize(JComponent c) { + // SwingJS should defer to containing panel + return null; + } + + @Override + protected void installJSUI() { + LookAndFeel.installColorsAndFont(c, + "ComboBox.background", + "ComboBox.foreground", + "ComboBox.font"); + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSFormattedTextFieldUI.java b/site/j2s/swingjs/plaf/JSFormattedTextFieldUI.java index 784ef47..bebecb7 100644 --- a/site/j2s/swingjs/plaf/JSFormattedTextFieldUI.java +++ b/site/j2s/swingjs/plaf/JSFormattedTextFieldUI.java @@ -1,27 +1,27 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; - -/** - * SWingJS implementation of stateful user interface for buttons. - * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). - * - * @author Bob Hanson - * - */ -public class JSFormattedTextFieldUI extends JSTextFieldUI { - - /** - * override JSComponentUI; check for currency and implied ( ) - */ - protected DOMNode setProp(DOMNode obj, String prop, String val) { - if(prop == "value" && val.length() >= 2) { - if (val.charAt(0) == 164) - val = "$" + val.substring(1); - else if (val.charAt(0) == '-' && val.charAt(1) == 164) - val = "($" + val.substring(2) + ")"; - } - return DOMNode.setAttr(obj, prop, val); - } - -} +package swingjs.plaf; + +import swingjs.api.DOMNode; + +/** + * SWingJS implementation of stateful user interface for buttons. + * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). + * + * @author Bob Hanson + * + */ +public class JSFormattedTextFieldUI extends JSTextFieldUI { + + /** + * override JSComponentUI; check for currency and implied ( ) + */ + protected DOMNode setProp(DOMNode obj, String prop, String val) { + if(prop == "value" && val.length() >= 2) { + if (val.charAt(0) == 164) + val = "$" + val.substring(1); + else if (val.charAt(0) == '-' && val.charAt(1) == 164) + val = "($" + val.substring(2) + ")"; + } + return DOMNode.setAttr(obj, prop, val); + } + +} diff --git a/site/j2s/swingjs/plaf/JSLabelUI.java b/site/j2s/swingjs/plaf/JSLabelUI.java index 8ed279e..951253b 100644 --- a/site/j2s/swingjs/plaf/JSLabelUI.java +++ b/site/j2s/swingjs/plaf/JSLabelUI.java @@ -1,28 +1,28 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; -import jsjavax.swing.JLabel; - -public class JSLabelUI extends JSComponentUI { - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - textNode = domNode = createDOMObject("label", id); - vCenter(domNode, 10); - return setCssFont(DOMNode.setAttr(domNode, "innerHTML",((JLabel) c).getText()), c.getFont()); - } - - @Override - protected void installJSUI() { - // TODO Auto-generated method stub - - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +package swingjs.plaf; + +import swingjs.api.DOMNode; +import jsjavax.swing.JLabel; + +public class JSLabelUI extends JSComponentUI { + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + textNode = domNode = createDOMObject("label", id); + vCenter(domNode, 10); + return setCssFont(DOMNode.setAttr(domNode, "innerHTML",((JLabel) c).getText()), c.getFont()); + } + + @Override + protected void installJSUI() { + // TODO Auto-generated method stub + + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSMenuBarUI.java b/site/j2s/swingjs/plaf/JSMenuBarUI.java index 2f0de24..26ab7a5 100644 --- a/site/j2s/swingjs/plaf/JSMenuBarUI.java +++ b/site/j2s/swingjs/plaf/JSMenuBarUI.java @@ -1,76 +1,76 @@ -/* - * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package swingjs.plaf; - - -import jsjava.awt.Dimension; - -import jsjavax.swing.JComponent; -import jsjavax.swing.LookAndFeel; - -import swingjs.api.DOMNode; - -public class JSMenuBarUI extends JSPanelUI { - - public JSMenuBarUI() { - isContainer = true; - setDoc(); - } - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domNode = createDOMObject("div", id); - return domNode; - } - - @Override - protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { - // SwingJS for now: just designated container width/height - return new Dimension(c.getWidth(), c.getHeight()); - } - - @Override - public Dimension getPreferredSize(JComponent c) { - // SwingJS should defer to containing panel - return null; - } - - @Override - protected void installJSUI() { - LookAndFeel.installColorsAndFont(c, - "MenuBar.background", - "MenuBar.foreground", - "MenuBar.font"); - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +/* + * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package swingjs.plaf; + + +import jsjava.awt.Dimension; + +import jsjavax.swing.JComponent; +import jsjavax.swing.LookAndFeel; + +import swingjs.api.DOMNode; + +public class JSMenuBarUI extends JSPanelUI { + + public JSMenuBarUI() { + isContainer = true; + setDoc(); + } + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domNode = createDOMObject("div", id); + return domNode; + } + + @Override + protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { + // SwingJS for now: just designated container width/height + return new Dimension(c.getWidth(), c.getHeight()); + } + + @Override + public Dimension getPreferredSize(JComponent c) { + // SwingJS should defer to containing panel + return null; + } + + @Override + protected void installJSUI() { + LookAndFeel.installColorsAndFont(c, + "MenuBar.background", + "MenuBar.foreground", + "MenuBar.font"); + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSMenuItemUI.java b/site/j2s/swingjs/plaf/JSMenuItemUI.java index 29f2fb6..cab1076 100644 --- a/site/j2s/swingjs/plaf/JSMenuItemUI.java +++ b/site/j2s/swingjs/plaf/JSMenuItemUI.java @@ -1,548 +1,548 @@ -package swingjs.plaf; - -//import jsjava.awt.FontMetrics; -import jsjava.awt.event.MouseMotionListener; -import jsjavax.swing.AbstractButton; -import jsjavax.swing.LookAndFeel; -import jsjavax.swing.UIManager; -import swingjs.api.DOMNode; -import jsjavax.swing.plaf.UIResource; -/** - * SWingJS implementation of stateful user interface for buttons. - * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). - * - * @author Bob Hanson - * - */ -public class JSMenuItemUI extends JSButtonUI { - - - /** - * the radio or check-box or simple button - * - */ - protected DOMNode domBtn; - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domBtn = enableNode = valueNode = domNode = createDOMObject("input", id, - "type", "button"); - setCssFont(DOMNode.setAttr(domNode, "value", ((AbstractButton) c).getText()), - c.getFont()); - return domNode; - } - - /** - * validate a button press -- with a simple button, this is just TRUE. - * This is needed because sometimes the area near the button is pressed - * but not the actual button. - * @param isRelease TODO - * - * @return true if the HTML5 button was actually pressed - */ - boolean verifyButtonClick(boolean isRelease) { - return true; - } - - - // from BasicButtonUI - - protected void installJSUI() { - installDefaults((AbstractButton) c); - installListeners((AbstractButton) c); - installKeyboardActions((AbstractButton) c); - } - - protected void uninstallJSUI() { - uninstallKeyboardActions((AbstractButton) c); - uninstallListeners((AbstractButton) c); - //uninstallDefaults((AbstractButton) c); - } - - protected void installListeners(AbstractButton b) { - JSButtonListener listener = new JSButtonListener(b); - if (listener != null) { - b.addMouseListener(listener); - b.addMouseMotionListener(listener); - b.addFocusListener(listener); - b.addPropertyChangeListener(listener); - b.addChangeListener(listener); - } - } - - protected void uninstallListeners(AbstractButton b) { - JSButtonListener listener = getButtonListener(b); - if (listener != null) { - b.removeMouseListener(listener); - b.removeMouseMotionListener(listener); - b.removeFocusListener(listener); - b.removeChangeListener(listener); - b.removePropertyChangeListener(listener); - } - } - - protected void installKeyboardActions(AbstractButton b) { - JSButtonListener listener = getButtonListener(b); - if (listener != null) { - listener.installKeyboardActions(b); - } - } - - protected void uninstallKeyboardActions(AbstractButton b) { - JSButtonListener listener = getButtonListener(b); - if(listener != null) { - listener.uninstallKeyboardActions(b); - } - } - - // SwingJS -- this is interesting, as it summarizes everything we will need - // to implement, ultimately. SwingUtilities.layoutCompoundLabel - // details what we are going to have to do somewhere. - -// private String layout(AbstractButton b, FontMetrics fm, int width, int height) { -// Insets i = b.getInsets(); -// viewRect.x = i.left; -// viewRect.y = i.top; -// viewRect.width = width - (i.right + viewRect.x); -// viewRect.height = height - (i.bottom + viewRect.y); -// -// textRect.x = textRect.y = textRect.width = textRect.height = 0; -// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; -// -// // layout the text and icon -// return SwingUtilities.layoutCompoundLabel(b, fm, b.getText(), b.getIcon(), -// b.getVerticalAlignment(), b.getHorizontalAlignment(), -// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), viewRect, -// iconRect, textRect, b.getText() == null ? 0 : b.getIconTextGap()); -// return null; -// } - - -// // Visual constants -// // NOTE: This is not used or set any where. Were we allowed to remove -// // fields, this would be removed. -// protected int defaultTextIconGap; -// - /** Amount to offset text, the value of this comes from - defaultTextShiftOffset once setTextShiftOffset has been invoked. - */ - protected int shiftOffset = 0; - - /** Value that is set in shiftOffset once setTextShiftOffset has been - invoked. The value of this comes from the defaults table. - */ - protected int defaultTextShiftOffset; -// -//protected String propertyPrefix = "Button."; -// -// private static final Object BASIC_BUTTON_UI_KEY = new Object(); -// -// // ******************************** -// // Create PLAF -// // ******************************** -// public static ComponentUI createUI(JComponent c) { -// AppContext appContext = AppContext.getAppContext(); -// BasicButtonUI buttonUI = -// (BasicButtonUI) appContext.get(BASIC_BUTTON_UI_KEY); -// if (buttonUI == null) { -// buttonUI = new BasicButtonUI(); -// appContext.put(BASIC_BUTTON_UI_KEY, buttonUI); -// } -// return buttonUI; -// } -// - protected String getPropertyPrefix() { - return "Button."; - } -// -// -// // ******************************** -// // Install PLAF -// // ******************************** -// public void installUI(JComponent c) { -// installDefaults((AbstractButton) c); -// installListeners((AbstractButton) c); -// installKeyboardActions((AbstractButton) c); -// BasicHTML.updateRenderer(c, ((AbstractButton) c).getText()); -// } -// - protected void installDefaults(AbstractButton b) { - // load shared instance defaults - String pp = getPropertyPrefix(); - - defaultTextShiftOffset = UIManager.getInt(pp + "textShiftOffset"); - -// // set the following defaults on the button -// if (b.isContentAreaFilled()) { -// LookAndFeel.installProperty(b, "opaque", Boolean.TRUE); -// } else { -// LookAndFeel.installProperty(b, "opaque", Boolean.FALSE); -// } - - if(b.getMargin() == null || (b.getMargin() instanceof UIResource)) { - b.setMargin(UIManager.getInsets(pp + "margin")); - } - - LookAndFeel.installColorsAndFont(b, pp + "background", - pp + "foreground", pp + "font"); -// LookAndFeel.installBorder(b, pp + "border"); -// -// Object rollover = UIManager.get(pp + "rollover"); -// if (rollover != null) { -// LookAndFeel.installProperty(b, "rolloverEnabled", rollover); -// } - LookAndFeel.installProperty(b, "iconTextGap", new Integer(4)); - } -// -// protected void installListeners(AbstractButton b) { -// JSButtonListener listener = createButtonListener(b); -// if(listener != null) { -// b.addMouseListener(listener); -// b.addMouseMotionListener(listener); -// b.addFocusListener(listener); -// b.addPropertyChangeListener(listener); -// b.addChangeListener(listener); -// } -// } -// -// protected void installKeyboardActions(AbstractButton b){ -// JSButtonListener listener = getButtonListener(b); -// -// if(listener != null) { -// listener.installKeyboardActions(b); -// } -// } -// -// -// // ******************************** -// // Uninstall PLAF -// // ******************************** -// public void uninstallUI(JComponent c) { -// uninstallKeyboardActions((AbstractButton) c); -// uninstallListeners((AbstractButton) c); -// uninstallDefaults((AbstractButton) c); -// BasicHTML.updateRenderer(c, ""); -// } -// -// protected void uninstallKeyboardActions(AbstractButton b) { -// JSButtonListener listener = getButtonListener(b); -// if(listener != null) { -// listener.uninstallKeyboardActions(b); -// } -// } -// -// protected void uninstallListeners(AbstractButton b) { -// JSButtonListener listener = getButtonListener(b); -// if(listener != null) { -// b.removeMouseListener(listener); -// b.removeMouseMotionListener(listener); -// b.removeFocusListener(listener); -// b.removeChangeListener(listener); -// b.removePropertyChangeListener(listener); -// } -// } -// -// protected void uninstallDefaults(AbstractButton b) { -// LookAndFeel.uninstallBorder(b); -// } -// -// // ******************************** -// // Create Listeners -// // ******************************** -// protected JSButtonListener createButtonListener(AbstractButton b) { -// return new JSButtonListener(b); -// } -// -// public int getDefaultTextIconGap(AbstractButton b) { -// return defaultTextIconGap; -// } -// -// /* These rectangles/insets are allocated once for all -// * ButtonUI.paint() calls. Re-using rectangles rather than -// * allocating them in each paint call substantially reduced the time -// * it took paint to run. Obviously, this method can't be re-entered. -// */ -// private static Rectangle viewRect = new Rectangle(); -// private static Rectangle textRect = new Rectangle(); -// private static Rectangle iconRect = new Rectangle(); -// -// // ******************************** -// // Paint Methods -// // ******************************** -// -// public void paint(Graphics g, JComponent c) -// { -// AbstractButton b = (AbstractButton) c; -// ButtonModel model = b.getModel(); -// -// String text = layout(b, SwingUtilities2.getFontMetrics(b, g), -// b.getWidth(), b.getHeight()); -// -// clearTextShiftOffset(); -// -// // perform UI specific press action, e.g. Windows L&F shifts text -// if (model.isArmed() && model.isPressed()) { -// paintButtonPressed(g,b); -// } -// -// // Paint the Icon -// if(b.getIcon() != null) { -// paintIcon(g,c,iconRect); -// } -// -// if (text != null && !text.equals("")){ -// View v = (View) c.getClientProperty(BasicHTML.propertyKey); -// if (v != null) { -// v.paint(g, textRect); -// } else { -// paintText(g, b, textRect, text); -// } -// } -// -// if (b.isFocusPainted() && b.hasFocus()) { -// // paint UI specific focus -// paintFocus(g,b,viewRect,textRect,iconRect); -// } -// } -// -// protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect){ -// AbstractButton b = (AbstractButton) c; -// ButtonModel model = b.getModel(); -// Icon icon = b.getIcon(); -// Icon tmpIcon = null; -// -// if(icon == null) { -// return; -// } -// -// Icon selectedIcon = null; -// -// /* the fallback icon should be based on the selected state */ -// if (model.isSelected()) { -// selectedIcon = (Icon) b.getSelectedIcon(); -// if (selectedIcon != null) { -// icon = selectedIcon; -// } -// } -// -// if(!model.isEnabled()) { -// if(model.isSelected()) { -// tmpIcon = (Icon) b.getDisabledSelectedIcon(); -// if (tmpIcon == null) { -// tmpIcon = selectedIcon; -// } -// } -// -// if (tmpIcon == null) { -// tmpIcon = (Icon) b.getDisabledIcon(); -// } -// } else if(model.isPressed() && model.isArmed()) { -// tmpIcon = (Icon) b.getPressedIcon(); -// if(tmpIcon != null) { -// // revert back to 0 offset -// clearTextShiftOffset(); -// } -// } else if(b.isRolloverEnabled() && model.isRollover()) { -// if(model.isSelected()) { -// tmpIcon = (Icon) b.getRolloverSelectedIcon(); -// if (tmpIcon == null) { -// tmpIcon = selectedIcon; -// } -// } -// -// if (tmpIcon == null) { -// tmpIcon = (Icon) b.getRolloverIcon(); -// } -// } -// -// if(tmpIcon != null) { -// icon = tmpIcon; -// } -// -// if(model.isPressed() && model.isArmed()) { -// icon.paintIcon(c, g, iconRect.x + getTextShiftOffset(), -// iconRect.y + getTextShiftOffset()); -// } else { -// icon.paintIcon(c, g, iconRect.x, iconRect.y); -// } -// -// } -// -// /** -// * As of Java 2 platform v 1.4 this method should not be used or overriden. -// * Use the paintText method which takes the AbstractButton argument. -// */ -// protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text) { -// AbstractButton b = (AbstractButton) c; -// ButtonModel model = b.getModel(); -// FontMetrics fm = SwingUtilities2.getFontMetrics(c, g); -// int mnemonicIndex = b.getDisplayedMnemonicIndex(); -// -// /* Draw the Text */ -// if(model.isEnabled()) { -// /*** paint the text normally */ -// g.setColor(b.getForeground()); -// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, -// textRect.x + getTextShiftOffset(), -// textRect.y + fm.getAscent() + getTextShiftOffset()); -// } -// else { -// /*** paint the text disabled ***/ -// g.setColor(b.getBackground().brighter()); -// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, -// textRect.x, textRect.y + fm.getAscent()); -// g.setColor(b.getBackground().darker()); -// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, -// textRect.x - 1, textRect.y + fm.getAscent() - 1); -// } -// } -// -// /** -// * Method which renders the text of the current button. -// *

    -// * @param g Graphics context -// * @param b Current button to render -// * @param textRect Bounding rectangle to render the text. -// * @param text String to render -// * @since 1.4 -// */ -// protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) { -// paintText(g, (JComponent)b, textRect, text); -// } -// -// // Method signature defined here overriden in subclasses. -// // Perhaps this class should be abstract? -// protected void paintFocus(Graphics g, AbstractButton b, -// Rectangle viewRect, Rectangle textRect, Rectangle iconRect){ -// } -// -// -// -// protected void paintButtonPressed(Graphics g, AbstractButton b){ -// } -// -// protected void clearTextShiftOffset(){ -// this.shiftOffset = 0; -// } -// -// protected void setTextShiftOffset(){ -// this.shiftOffset = defaultTextShiftOffset; -// } -// -// protected int getTextShiftOffset() { -// return shiftOffset; -// } -// -// // ******************************** -// // Layout Methods -// // ******************************** -// public Dimension getMinimumSize(JComponent c) { -// Dimension d = getPreferredSize(c); -// View v = (View) c.getClientProperty(BasicHTML.propertyKey); -// if (v != null) { -// d.width -= v.getPreferredSpan(View.X_AXIS) - v.getMinimumSpan(View.X_AXIS); -// } -// return d; -// } -// -// public Dimension getPreferredSize(JComponent c) { -// AbstractButton b = (AbstractButton)c; -// return BasicGraphicsUtils.getPreferredButtonSize(b, b.getIconTextGap()); -// } -// -// public Dimension getMaximumSize(JComponent c) { -// Dimension d = getPreferredSize(c); -// View v = (View) c.getClientProperty(BasicHTML.propertyKey); -// if (v != null) { -// d.width += v.getMaximumSpan(View.X_AXIS) - v.getPreferredSpan(View.X_AXIS); -// } -// return d; -// } -// -// /** -// * Returns the baseline. -// * -// * @throws NullPointerException {@inheritDoc} -// * @throws IllegalArgumentException {@inheritDoc} -// * @see javax.swing.JComponent#getBaseline(int, int) -// * @since 1.6 -// */ -// public int getBaseline(JComponent c, int width, int height) { -// super.getBaseline(c, width, height); -// AbstractButton b = (AbstractButton)c; -// String text = b.getText(); -// if (text == null || "".equals(text)) { -// return -1; -// } -// FontMetrics fm = b.getFontMetrics(b.getFont()); -// layout(b, fm, width, height); -// return BasicHTML.getBaseline(b, textRect.y, fm.getAscent(), -// textRect.width, textRect.height); -// } -// -// /** -// * Returns an enum indicating how the baseline of the component -// * changes as the size changes. -// * -// * @throws NullPointerException {@inheritDoc} -// * @see javax.swing.JComponent#getBaseline(int, int) -// * @since 1.6 -// */ -// public Component.BaselineResizeBehavior getBaselineResizeBehavior( -// JComponent c) { -// super.getBaselineResizeBehavior(c); -// if (c.getClientProperty(BasicHTML.propertyKey) != null) { -// return Component.BaselineResizeBehavior.OTHER; -// } -// switch(((AbstractButton)c).getVerticalAlignment()) { -// case AbstractButton.TOP: -// return Component.BaselineResizeBehavior.CONSTANT_ASCENT; -// case AbstractButton.BOTTOM: -// return Component.BaselineResizeBehavior.CONSTANT_DESCENT; -// case AbstractButton.CENTER: -// return Component.BaselineResizeBehavior.CENTER_OFFSET; -// } -// return Component.BaselineResizeBehavior.OTHER; -// } -// -// private String layout(AbstractButton b, FontMetrics fm, -// int width, int height) { -// Insets i = b.getInsets(); -// viewRect.x = i.left; -// viewRect.y = i.top; -// viewRect.width = width - (i.right + viewRect.x); -// viewRect.height = height - (i.bottom + viewRect.y); -// -// textRect.x = textRect.y = textRect.width = textRect.height = 0; -// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; -// -// // layout the text and icon -// return SwingUtilities.layoutCompoundLabel( -// b, fm, b.getText(), b.getIcon(), -// b.getVerticalAlignment(), b.getHorizontalAlignment(), -// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), -// viewRect, iconRect, textRect, -// b.getText() == null ? 0 : b.getIconTextGap()); -// } -// -// /** -// * Returns the ButtonListener for the passed in Button, or null if one -// * could not be found. -// */ -// private JSButtonListener getButtonListener(AbstractButton b) { -// MouseMotionListener[] listeners = b.getMouseMotionListeners(); -// -// if (listeners != null) { -// for (int counter = 0; counter < listeners.length; counter++) { -// if (listeners[counter] instanceof JSButtonListener) { -// return (JSButtonListener)listeners[counter]; -// } -// } -// } -// return null; -// } -// -// - -} +package swingjs.plaf; + +//import jsjava.awt.FontMetrics; +import jsjava.awt.event.MouseMotionListener; +import jsjavax.swing.AbstractButton; +import jsjavax.swing.LookAndFeel; +import jsjavax.swing.UIManager; +import swingjs.api.DOMNode; +import jsjavax.swing.plaf.UIResource; +/** + * SWingJS implementation of stateful user interface for buttons. + * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). + * + * @author Bob Hanson + * + */ +public class JSMenuItemUI extends JSButtonUI { + + + /** + * the radio or check-box or simple button + * + */ + protected DOMNode domBtn; + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domBtn = enableNode = valueNode = domNode = createDOMObject("input", id, + "type", "button"); + setCssFont(DOMNode.setAttr(domNode, "value", ((AbstractButton) c).getText()), + c.getFont()); + return domNode; + } + + /** + * validate a button press -- with a simple button, this is just TRUE. + * This is needed because sometimes the area near the button is pressed + * but not the actual button. + * @param isRelease TODO + * + * @return true if the HTML5 button was actually pressed + */ + boolean verifyButtonClick(boolean isRelease) { + return true; + } + + + // from BasicButtonUI + + protected void installJSUI() { + installDefaults((AbstractButton) c); + installListeners((AbstractButton) c); + installKeyboardActions((AbstractButton) c); + } + + protected void uninstallJSUI() { + uninstallKeyboardActions((AbstractButton) c); + uninstallListeners((AbstractButton) c); + //uninstallDefaults((AbstractButton) c); + } + + protected void installListeners(AbstractButton b) { + JSButtonListener listener = new JSButtonListener(b); + if (listener != null) { + b.addMouseListener(listener); + b.addMouseMotionListener(listener); + b.addFocusListener(listener); + b.addPropertyChangeListener(listener); + b.addChangeListener(listener); + } + } + + protected void uninstallListeners(AbstractButton b) { + JSButtonListener listener = getButtonListener(b); + if (listener != null) { + b.removeMouseListener(listener); + b.removeMouseMotionListener(listener); + b.removeFocusListener(listener); + b.removeChangeListener(listener); + b.removePropertyChangeListener(listener); + } + } + + protected void installKeyboardActions(AbstractButton b) { + JSButtonListener listener = getButtonListener(b); + if (listener != null) { + listener.installKeyboardActions(b); + } + } + + protected void uninstallKeyboardActions(AbstractButton b) { + JSButtonListener listener = getButtonListener(b); + if(listener != null) { + listener.uninstallKeyboardActions(b); + } + } + + // SwingJS -- this is interesting, as it summarizes everything we will need + // to implement, ultimately. SwingUtilities.layoutCompoundLabel + // details what we are going to have to do somewhere. + +// private String layout(AbstractButton b, FontMetrics fm, int width, int height) { +// Insets i = b.getInsets(); +// viewRect.x = i.left; +// viewRect.y = i.top; +// viewRect.width = width - (i.right + viewRect.x); +// viewRect.height = height - (i.bottom + viewRect.y); +// +// textRect.x = textRect.y = textRect.width = textRect.height = 0; +// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; +// +// // layout the text and icon +// return SwingUtilities.layoutCompoundLabel(b, fm, b.getText(), b.getIcon(), +// b.getVerticalAlignment(), b.getHorizontalAlignment(), +// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), viewRect, +// iconRect, textRect, b.getText() == null ? 0 : b.getIconTextGap()); +// return null; +// } + + +// // Visual constants +// // NOTE: This is not used or set any where. Were we allowed to remove +// // fields, this would be removed. +// protected int defaultTextIconGap; +// + /** Amount to offset text, the value of this comes from + defaultTextShiftOffset once setTextShiftOffset has been invoked. + */ + protected int shiftOffset = 0; + + /** Value that is set in shiftOffset once setTextShiftOffset has been + invoked. The value of this comes from the defaults table. + */ + protected int defaultTextShiftOffset; +// +//protected String propertyPrefix = "Button."; +// +// private static final Object BASIC_BUTTON_UI_KEY = new Object(); +// +// // ******************************** +// // Create PLAF +// // ******************************** +// public static ComponentUI createUI(JComponent c) { +// AppContext appContext = AppContext.getAppContext(); +// BasicButtonUI buttonUI = +// (BasicButtonUI) appContext.get(BASIC_BUTTON_UI_KEY); +// if (buttonUI == null) { +// buttonUI = new BasicButtonUI(); +// appContext.put(BASIC_BUTTON_UI_KEY, buttonUI); +// } +// return buttonUI; +// } +// + protected String getPropertyPrefix() { + return "Button."; + } +// +// +// // ******************************** +// // Install PLAF +// // ******************************** +// public void installUI(JComponent c) { +// installDefaults((AbstractButton) c); +// installListeners((AbstractButton) c); +// installKeyboardActions((AbstractButton) c); +// BasicHTML.updateRenderer(c, ((AbstractButton) c).getText()); +// } +// + protected void installDefaults(AbstractButton b) { + // load shared instance defaults + String pp = getPropertyPrefix(); + + defaultTextShiftOffset = UIManager.getInt(pp + "textShiftOffset"); + +// // set the following defaults on the button +// if (b.isContentAreaFilled()) { +// LookAndFeel.installProperty(b, "opaque", Boolean.TRUE); +// } else { +// LookAndFeel.installProperty(b, "opaque", Boolean.FALSE); +// } + + if(b.getMargin() == null || (b.getMargin() instanceof UIResource)) { + b.setMargin(UIManager.getInsets(pp + "margin")); + } + + LookAndFeel.installColorsAndFont(b, pp + "background", + pp + "foreground", pp + "font"); +// LookAndFeel.installBorder(b, pp + "border"); +// +// Object rollover = UIManager.get(pp + "rollover"); +// if (rollover != null) { +// LookAndFeel.installProperty(b, "rolloverEnabled", rollover); +// } + LookAndFeel.installProperty(b, "iconTextGap", new Integer(4)); + } +// +// protected void installListeners(AbstractButton b) { +// JSButtonListener listener = createButtonListener(b); +// if(listener != null) { +// b.addMouseListener(listener); +// b.addMouseMotionListener(listener); +// b.addFocusListener(listener); +// b.addPropertyChangeListener(listener); +// b.addChangeListener(listener); +// } +// } +// +// protected void installKeyboardActions(AbstractButton b){ +// JSButtonListener listener = getButtonListener(b); +// +// if(listener != null) { +// listener.installKeyboardActions(b); +// } +// } +// +// +// // ******************************** +// // Uninstall PLAF +// // ******************************** +// public void uninstallUI(JComponent c) { +// uninstallKeyboardActions((AbstractButton) c); +// uninstallListeners((AbstractButton) c); +// uninstallDefaults((AbstractButton) c); +// BasicHTML.updateRenderer(c, ""); +// } +// +// protected void uninstallKeyboardActions(AbstractButton b) { +// JSButtonListener listener = getButtonListener(b); +// if(listener != null) { +// listener.uninstallKeyboardActions(b); +// } +// } +// +// protected void uninstallListeners(AbstractButton b) { +// JSButtonListener listener = getButtonListener(b); +// if(listener != null) { +// b.removeMouseListener(listener); +// b.removeMouseMotionListener(listener); +// b.removeFocusListener(listener); +// b.removeChangeListener(listener); +// b.removePropertyChangeListener(listener); +// } +// } +// +// protected void uninstallDefaults(AbstractButton b) { +// LookAndFeel.uninstallBorder(b); +// } +// +// // ******************************** +// // Create Listeners +// // ******************************** +// protected JSButtonListener createButtonListener(AbstractButton b) { +// return new JSButtonListener(b); +// } +// +// public int getDefaultTextIconGap(AbstractButton b) { +// return defaultTextIconGap; +// } +// +// /* These rectangles/insets are allocated once for all +// * ButtonUI.paint() calls. Re-using rectangles rather than +// * allocating them in each paint call substantially reduced the time +// * it took paint to run. Obviously, this method can't be re-entered. +// */ +// private static Rectangle viewRect = new Rectangle(); +// private static Rectangle textRect = new Rectangle(); +// private static Rectangle iconRect = new Rectangle(); +// +// // ******************************** +// // Paint Methods +// // ******************************** +// +// public void paint(Graphics g, JComponent c) +// { +// AbstractButton b = (AbstractButton) c; +// ButtonModel model = b.getModel(); +// +// String text = layout(b, SwingUtilities2.getFontMetrics(b, g), +// b.getWidth(), b.getHeight()); +// +// clearTextShiftOffset(); +// +// // perform UI specific press action, e.g. Windows L&F shifts text +// if (model.isArmed() && model.isPressed()) { +// paintButtonPressed(g,b); +// } +// +// // Paint the Icon +// if(b.getIcon() != null) { +// paintIcon(g,c,iconRect); +// } +// +// if (text != null && !text.equals("")){ +// View v = (View) c.getClientProperty(BasicHTML.propertyKey); +// if (v != null) { +// v.paint(g, textRect); +// } else { +// paintText(g, b, textRect, text); +// } +// } +// +// if (b.isFocusPainted() && b.hasFocus()) { +// // paint UI specific focus +// paintFocus(g,b,viewRect,textRect,iconRect); +// } +// } +// +// protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect){ +// AbstractButton b = (AbstractButton) c; +// ButtonModel model = b.getModel(); +// Icon icon = b.getIcon(); +// Icon tmpIcon = null; +// +// if(icon == null) { +// return; +// } +// +// Icon selectedIcon = null; +// +// /* the fallback icon should be based on the selected state */ +// if (model.isSelected()) { +// selectedIcon = (Icon) b.getSelectedIcon(); +// if (selectedIcon != null) { +// icon = selectedIcon; +// } +// } +// +// if(!model.isEnabled()) { +// if(model.isSelected()) { +// tmpIcon = (Icon) b.getDisabledSelectedIcon(); +// if (tmpIcon == null) { +// tmpIcon = selectedIcon; +// } +// } +// +// if (tmpIcon == null) { +// tmpIcon = (Icon) b.getDisabledIcon(); +// } +// } else if(model.isPressed() && model.isArmed()) { +// tmpIcon = (Icon) b.getPressedIcon(); +// if(tmpIcon != null) { +// // revert back to 0 offset +// clearTextShiftOffset(); +// } +// } else if(b.isRolloverEnabled() && model.isRollover()) { +// if(model.isSelected()) { +// tmpIcon = (Icon) b.getRolloverSelectedIcon(); +// if (tmpIcon == null) { +// tmpIcon = selectedIcon; +// } +// } +// +// if (tmpIcon == null) { +// tmpIcon = (Icon) b.getRolloverIcon(); +// } +// } +// +// if(tmpIcon != null) { +// icon = tmpIcon; +// } +// +// if(model.isPressed() && model.isArmed()) { +// icon.paintIcon(c, g, iconRect.x + getTextShiftOffset(), +// iconRect.y + getTextShiftOffset()); +// } else { +// icon.paintIcon(c, g, iconRect.x, iconRect.y); +// } +// +// } +// +// /** +// * As of Java 2 platform v 1.4 this method should not be used or overriden. +// * Use the paintText method which takes the AbstractButton argument. +// */ +// protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text) { +// AbstractButton b = (AbstractButton) c; +// ButtonModel model = b.getModel(); +// FontMetrics fm = SwingUtilities2.getFontMetrics(c, g); +// int mnemonicIndex = b.getDisplayedMnemonicIndex(); +// +// /* Draw the Text */ +// if(model.isEnabled()) { +// /*** paint the text normally */ +// g.setColor(b.getForeground()); +// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, +// textRect.x + getTextShiftOffset(), +// textRect.y + fm.getAscent() + getTextShiftOffset()); +// } +// else { +// /*** paint the text disabled ***/ +// g.setColor(b.getBackground().brighter()); +// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, +// textRect.x, textRect.y + fm.getAscent()); +// g.setColor(b.getBackground().darker()); +// SwingUtilities2.drawStringUnderlineCharAt(c, g,text, mnemonicIndex, +// textRect.x - 1, textRect.y + fm.getAscent() - 1); +// } +// } +// +// /** +// * Method which renders the text of the current button. +// *

    +// * @param g Graphics context +// * @param b Current button to render +// * @param textRect Bounding rectangle to render the text. +// * @param text String to render +// * @since 1.4 +// */ +// protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) { +// paintText(g, (JComponent)b, textRect, text); +// } +// +// // Method signature defined here overriden in subclasses. +// // Perhaps this class should be abstract? +// protected void paintFocus(Graphics g, AbstractButton b, +// Rectangle viewRect, Rectangle textRect, Rectangle iconRect){ +// } +// +// +// +// protected void paintButtonPressed(Graphics g, AbstractButton b){ +// } +// +// protected void clearTextShiftOffset(){ +// this.shiftOffset = 0; +// } +// +// protected void setTextShiftOffset(){ +// this.shiftOffset = defaultTextShiftOffset; +// } +// +// protected int getTextShiftOffset() { +// return shiftOffset; +// } +// +// // ******************************** +// // Layout Methods +// // ******************************** +// public Dimension getMinimumSize(JComponent c) { +// Dimension d = getPreferredSize(c); +// View v = (View) c.getClientProperty(BasicHTML.propertyKey); +// if (v != null) { +// d.width -= v.getPreferredSpan(View.X_AXIS) - v.getMinimumSpan(View.X_AXIS); +// } +// return d; +// } +// +// public Dimension getPreferredSize(JComponent c) { +// AbstractButton b = (AbstractButton)c; +// return BasicGraphicsUtils.getPreferredButtonSize(b, b.getIconTextGap()); +// } +// +// public Dimension getMaximumSize(JComponent c) { +// Dimension d = getPreferredSize(c); +// View v = (View) c.getClientProperty(BasicHTML.propertyKey); +// if (v != null) { +// d.width += v.getMaximumSpan(View.X_AXIS) - v.getPreferredSpan(View.X_AXIS); +// } +// return d; +// } +// +// /** +// * Returns the baseline. +// * +// * @throws NullPointerException {@inheritDoc} +// * @throws IllegalArgumentException {@inheritDoc} +// * @see javax.swing.JComponent#getBaseline(int, int) +// * @since 1.6 +// */ +// public int getBaseline(JComponent c, int width, int height) { +// super.getBaseline(c, width, height); +// AbstractButton b = (AbstractButton)c; +// String text = b.getText(); +// if (text == null || "".equals(text)) { +// return -1; +// } +// FontMetrics fm = b.getFontMetrics(b.getFont()); +// layout(b, fm, width, height); +// return BasicHTML.getBaseline(b, textRect.y, fm.getAscent(), +// textRect.width, textRect.height); +// } +// +// /** +// * Returns an enum indicating how the baseline of the component +// * changes as the size changes. +// * +// * @throws NullPointerException {@inheritDoc} +// * @see javax.swing.JComponent#getBaseline(int, int) +// * @since 1.6 +// */ +// public Component.BaselineResizeBehavior getBaselineResizeBehavior( +// JComponent c) { +// super.getBaselineResizeBehavior(c); +// if (c.getClientProperty(BasicHTML.propertyKey) != null) { +// return Component.BaselineResizeBehavior.OTHER; +// } +// switch(((AbstractButton)c).getVerticalAlignment()) { +// case AbstractButton.TOP: +// return Component.BaselineResizeBehavior.CONSTANT_ASCENT; +// case AbstractButton.BOTTOM: +// return Component.BaselineResizeBehavior.CONSTANT_DESCENT; +// case AbstractButton.CENTER: +// return Component.BaselineResizeBehavior.CENTER_OFFSET; +// } +// return Component.BaselineResizeBehavior.OTHER; +// } +// +// private String layout(AbstractButton b, FontMetrics fm, +// int width, int height) { +// Insets i = b.getInsets(); +// viewRect.x = i.left; +// viewRect.y = i.top; +// viewRect.width = width - (i.right + viewRect.x); +// viewRect.height = height - (i.bottom + viewRect.y); +// +// textRect.x = textRect.y = textRect.width = textRect.height = 0; +// iconRect.x = iconRect.y = iconRect.width = iconRect.height = 0; +// +// // layout the text and icon +// return SwingUtilities.layoutCompoundLabel( +// b, fm, b.getText(), b.getIcon(), +// b.getVerticalAlignment(), b.getHorizontalAlignment(), +// b.getVerticalTextPosition(), b.getHorizontalTextPosition(), +// viewRect, iconRect, textRect, +// b.getText() == null ? 0 : b.getIconTextGap()); +// } +// +// /** +// * Returns the ButtonListener for the passed in Button, or null if one +// * could not be found. +// */ +// private JSButtonListener getButtonListener(AbstractButton b) { +// MouseMotionListener[] listeners = b.getMouseMotionListeners(); +// +// if (listeners != null) { +// for (int counter = 0; counter < listeners.length; counter++) { +// if (listeners[counter] instanceof JSButtonListener) { +// return (JSButtonListener)listeners[counter]; +// } +// } +// } +// return null; +// } +// +// + +} diff --git a/site/j2s/swingjs/plaf/JSMenuUI.java b/site/j2s/swingjs/plaf/JSMenuUI.java index 66992bf..15a0354 100644 --- a/site/j2s/swingjs/plaf/JSMenuUI.java +++ b/site/j2s/swingjs/plaf/JSMenuUI.java @@ -1,51 +1,51 @@ -package swingjs.plaf; - - -import jsjava.awt.Dimension; - -import jsjavax.swing.JComponent; -import jsjavax.swing.LookAndFeel; - -import swingjs.api.DOMNode; - -public class JSMenuUI extends JSComponentUI { - - public JSMenuUI() { - isContainer = true; - setDoc(); - } - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domNode = createDOMObject("select", id); - return domNode; - } - - @Override - protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { - // SwingJS for now: just designated container width/height - return new Dimension(c.getWidth(), c.getHeight()); - } - - @Override - public Dimension getPreferredSize(JComponent c) { - // SwingJS should defer to containing panel - return null; - } - - @Override - protected void installJSUI() { - LookAndFeel.installColorsAndFont(c, - "Menu.background", - "Menu.foreground", - "Menu.font"); - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +package swingjs.plaf; + + +import jsjava.awt.Dimension; + +import jsjavax.swing.JComponent; +import jsjavax.swing.LookAndFeel; + +import swingjs.api.DOMNode; + +public class JSMenuUI extends JSComponentUI { + + public JSMenuUI() { + isContainer = true; + setDoc(); + } + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domNode = createDOMObject("select", id); + return domNode; + } + + @Override + protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { + // SwingJS for now: just designated container width/height + return new Dimension(c.getWidth(), c.getHeight()); + } + + @Override + public Dimension getPreferredSize(JComponent c) { + // SwingJS should defer to containing panel + return null; + } + + @Override + protected void installJSUI() { + LookAndFeel.installColorsAndFont(c, + "Menu.background", + "Menu.foreground", + "Menu.font"); + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSPanelUI.java b/site/j2s/swingjs/plaf/JSPanelUI.java index 46835dd..19123e8 100644 --- a/site/j2s/swingjs/plaf/JSPanelUI.java +++ b/site/j2s/swingjs/plaf/JSPanelUI.java @@ -1,51 +1,51 @@ -package swingjs.plaf; - - -import jsjava.awt.Dimension; - -import jsjavax.swing.JComponent; -import jsjavax.swing.LookAndFeel; - -import swingjs.api.DOMNode; - -public class JSPanelUI extends JSComponentUI { - - public JSPanelUI() { - isContainer = true; - setDoc(); - } - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domNode = createDOMObject("label", id); - return domNode; - } - - @Override - protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { - // SwingJS for now: just designated container width/height - return new Dimension(c.getWidth(), c.getHeight()); - } - - @Override - public Dimension getPreferredSize(JComponent c) { - // SwingJS must defer to Panel or JPanel to set its own dimensions - return null; - } - - @Override - protected void installJSUI() { - LookAndFeel.installColorsAndFont(c, - "Panel.background", - "Panel.foreground", - "Panel.font"); - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +package swingjs.plaf; + + +import jsjava.awt.Dimension; + +import jsjavax.swing.JComponent; +import jsjavax.swing.LookAndFeel; + +import swingjs.api.DOMNode; + +public class JSPanelUI extends JSComponentUI { + + public JSPanelUI() { + isContainer = true; + setDoc(); + } + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domNode = createDOMObject("label", id); + return domNode; + } + + @Override + protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { + // SwingJS for now: just designated container width/height + return new Dimension(c.getWidth(), c.getHeight()); + } + + @Override + public Dimension getPreferredSize(JComponent c) { + // SwingJS must defer to Panel or JPanel to set its own dimensions + return null; + } + + @Override + protected void installJSUI() { + LookAndFeel.installColorsAndFont(c, + "Panel.background", + "Panel.foreground", + "Panel.font"); + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSPasswordFieldUI.java b/site/j2s/swingjs/plaf/JSPasswordFieldUI.java index 568ba97..e1334b8 100644 --- a/site/j2s/swingjs/plaf/JSPasswordFieldUI.java +++ b/site/j2s/swingjs/plaf/JSPasswordFieldUI.java @@ -1,16 +1,16 @@ -package swingjs.plaf; - -/** - * HTML5 will handle all aspects of obscuring the password - * - * @author Bob Hanson - * - */ -public class JSPasswordFieldUI extends JSTextFieldUI { - - public JSPasswordFieldUI() { - inputType = "password"; - setDoc(); - } - -} +package swingjs.plaf; + +/** + * HTML5 will handle all aspects of obscuring the password + * + * @author Bob Hanson + * + */ +public class JSPasswordFieldUI extends JSTextFieldUI { + + public JSPasswordFieldUI() { + inputType = "password"; + setDoc(); + } + +} diff --git a/site/j2s/swingjs/plaf/JSPopupMenuUI.java b/site/j2s/swingjs/plaf/JSPopupMenuUI.java index e0b8b28..bb5182a 100644 --- a/site/j2s/swingjs/plaf/JSPopupMenuUI.java +++ b/site/j2s/swingjs/plaf/JSPopupMenuUI.java @@ -1,51 +1,51 @@ -package swingjs.plaf; - - -import jsjava.awt.Dimension; - -import jsjavax.swing.JComponent; -import jsjavax.swing.LookAndFeel; - -import swingjs.api.DOMNode; - -public class JSPopupMenuUI extends JSMenuUI { - - public JSPopupMenuUI() { - isContainer = true; - setDoc(); - } - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domNode = createDOMObject("select", id); - return domNode; - } - - @Override - protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { - // SwingJS for now: just designated container width/height - return new Dimension(c.getWidth(), c.getHeight()); - } - - @Override - public Dimension getPreferredSize(JComponent c) { - // SwingJS should defer to containing panel - return null; - } - - @Override - protected void installJSUI() { - LookAndFeel.installColorsAndFont(c, - "PopupMenu.background", - "PopupMenu.foreground", - "PopupMenu.font"); - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +package swingjs.plaf; + + +import jsjava.awt.Dimension; + +import jsjavax.swing.JComponent; +import jsjavax.swing.LookAndFeel; + +import swingjs.api.DOMNode; + +public class JSPopupMenuUI extends JSMenuUI { + + public JSPopupMenuUI() { + isContainer = true; + setDoc(); + } + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domNode = createDOMObject("select", id); + return domNode; + } + + @Override + protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { + // SwingJS for now: just designated container width/height + return new Dimension(c.getWidth(), c.getHeight()); + } + + @Override + public Dimension getPreferredSize(JComponent c) { + // SwingJS should defer to containing panel + return null; + } + + @Override + protected void installJSUI() { + LookAndFeel.installColorsAndFont(c, + "PopupMenu.background", + "PopupMenu.foreground", + "PopupMenu.font"); + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSRadioButtonMenuItemUI.java b/site/j2s/swingjs/plaf/JSRadioButtonMenuItemUI.java index fffcec0..91e8835 100644 --- a/site/j2s/swingjs/plaf/JSRadioButtonMenuItemUI.java +++ b/site/j2s/swingjs/plaf/JSRadioButtonMenuItemUI.java @@ -1,19 +1,19 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; - -public class JSRadioButtonMenuItemUI extends JSRadioButtonUI { - - @Override - public DOMNode getDOMObject() { - return getButtonObject("radio"); - } - - @Override - protected String getPropertyPrefix() { - return "RadioButtonMenuItem."; - } - - - -} +package swingjs.plaf; + +import swingjs.api.DOMNode; + +public class JSRadioButtonMenuItemUI extends JSRadioButtonUI { + + @Override + public DOMNode getDOMObject() { + return getButtonObject("radio"); + } + + @Override + protected String getPropertyPrefix() { + return "RadioButtonMenuItem."; + } + + + +} diff --git a/site/j2s/swingjs/plaf/JSRadioButtonUI.java b/site/j2s/swingjs/plaf/JSRadioButtonUI.java index 793a8ae..01ad791 100644 --- a/site/j2s/swingjs/plaf/JSRadioButtonUI.java +++ b/site/j2s/swingjs/plaf/JSRadioButtonUI.java @@ -1,94 +1,94 @@ -package swingjs.plaf; - -import java.util.HashMap; -import java.util.Map; - -import swingjs.api.DOMNode; -import jsjava.awt.Dimension; -import jsjavax.swing.AbstractButton; -import jsjavax.swing.ButtonGroup; -import jsjavax.swing.DefaultButtonModel; -import jsjavax.swing.JRadioButton; - -public class JSRadioButtonUI extends JSButtonUI { - - private DOMNode label; - private static Map groupNames; - - - @Override - public DOMNode getDOMObject() { - return getButtonObject("radio"); - } - - @Override - protected String getPropertyPrefix() { - return "RadioButton."; - } - - protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { - // "absolute" is required for positioning of button, but must not be there for setting the size. - DOMNode.setStyles(domBtn, "position", null); - DOMNode.setStyles(label, "position", null); - Dimension d = setHTMLSize1(obj, addCSS, false); - DOMNode.setStyles(domBtn, "position", "absolute"); - DOMNode.setStyles(label, "position", "absolute"); - return d; - } - - protected DOMNode getButtonObject(String myType) { - JRadioButton b = (JRadioButton) c; - boolean isNew = false; - boolean doAll = false; - if (domNode == null) { - doAll = true; - if (groupNames == null) - groupNames = new HashMap(); - ButtonGroup bg = null; - String name = id; - isNew = true; - if (b.getModel() instanceof DefaultButtonModel) { - bg = ((DefaultButtonModel) b.getModel()).getGroup(); - name = groupNames.get(bg); - if (name == null) - groupNames.put(bg, name = id); - else - isNew = false; - } - domBtn = enableNode = createDOMObject("input", id, "type", myType, "name", - name); - label = textNode = createDOMObject("label", id + "l", "htmlFor", id); - } - if (b.isSelected() || isNew) - DOMNode.setAttr(domBtn, "checked", "true"); - setCssFont( - DOMNode.setAttr(label, "innerHTML", ((AbstractButton) c).getText()), - c.getFont()); - // now wrap the two with a span and get its dimensions - // along with the dimensions of the radio button by itself. - // This is a hack, for sure. - - Dimension drad = setHTMLSize1(domBtn, false, false); - /*Dimension dlab = */ setHTMLSize1(label, false, false); - - DOMNode obj = wrap("div", "", domBtn, label); - Dimension dobj = setHTMLSize1(obj, true, true); - vCenter(domBtn, -75); - vCenter(label, -50); - DOMNode.setStyles(label, "position", "absolute", "left", drad.width + "px"); - DOMNode.setStyles(domBtn, "position", "absolute"); - if (doAll) { - // now wrap these in a div - obj = wrap("div", id + "_0", domBtn, label); - DOMNode.setStyles(obj, "position", "absolute"); - } else { - // must re-introduce these to the original object - obj = domNode; - obj.appendChild(domBtn); - obj.appendChild(label); - } - return DOMNode.setSize(obj, dobj.width, dobj.height); - } - - -} +package swingjs.plaf; + +import java.util.HashMap; +import java.util.Map; + +import swingjs.api.DOMNode; +import jsjava.awt.Dimension; +import jsjavax.swing.AbstractButton; +import jsjavax.swing.ButtonGroup; +import jsjavax.swing.DefaultButtonModel; +import jsjavax.swing.JRadioButton; + +public class JSRadioButtonUI extends JSButtonUI { + + private DOMNode label; + private static Map groupNames; + + + @Override + public DOMNode getDOMObject() { + return getButtonObject("radio"); + } + + @Override + protected String getPropertyPrefix() { + return "RadioButton."; + } + + protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { + // "absolute" is required for positioning of button, but must not be there for setting the size. + DOMNode.setStyles(domBtn, "position", null); + DOMNode.setStyles(label, "position", null); + Dimension d = setHTMLSize1(obj, addCSS, false); + DOMNode.setStyles(domBtn, "position", "absolute"); + DOMNode.setStyles(label, "position", "absolute"); + return d; + } + + protected DOMNode getButtonObject(String myType) { + JRadioButton b = (JRadioButton) c; + boolean isNew = false; + boolean doAll = false; + if (domNode == null) { + doAll = true; + if (groupNames == null) + groupNames = new HashMap(); + ButtonGroup bg = null; + String name = id; + isNew = true; + if (b.getModel() instanceof DefaultButtonModel) { + bg = ((DefaultButtonModel) b.getModel()).getGroup(); + name = groupNames.get(bg); + if (name == null) + groupNames.put(bg, name = id); + else + isNew = false; + } + domBtn = enableNode = createDOMObject("input", id, "type", myType, "name", + name); + label = textNode = createDOMObject("label", id + "l", "htmlFor", id); + } + if (b.isSelected() || isNew) + DOMNode.setAttr(domBtn, "checked", "true"); + setCssFont( + DOMNode.setAttr(label, "innerHTML", ((AbstractButton) c).getText()), + c.getFont()); + // now wrap the two with a span and get its dimensions + // along with the dimensions of the radio button by itself. + // This is a hack, for sure. + + Dimension drad = setHTMLSize1(domBtn, false, false); + /*Dimension dlab = */ setHTMLSize1(label, false, false); + + DOMNode obj = wrap("div", "", domBtn, label); + Dimension dobj = setHTMLSize1(obj, true, true); + vCenter(domBtn, -75); + vCenter(label, -50); + DOMNode.setStyles(label, "position", "absolute", "left", drad.width + "px"); + DOMNode.setStyles(domBtn, "position", "absolute"); + if (doAll) { + // now wrap these in a div + obj = wrap("div", id + "_0", domBtn, label); + DOMNode.setStyles(obj, "position", "absolute"); + } else { + // must re-introduce these to the original object + obj = domNode; + obj.appendChild(domBtn); + obj.appendChild(label); + } + return DOMNode.setSize(obj, dobj.width, dobj.height); + } + + +} diff --git a/site/j2s/swingjs/plaf/JSRootPaneUI.java b/site/j2s/swingjs/plaf/JSRootPaneUI.java index 05a2f29..0987ab1 100644 --- a/site/j2s/swingjs/plaf/JSRootPaneUI.java +++ b/site/j2s/swingjs/plaf/JSRootPaneUI.java @@ -1,30 +1,30 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; - -/** - * Pluggable look and feel interface for JRootPane. - * - * @author Scott Violet - * @since 1.3 - */ -public class JSRootPaneUI extends JSComponentUI { - - public JSRootPaneUI() { - isContainer = true; - setDoc(); - } - - @Override - public DOMNode getDOMObject() { - return null; - } - - @Override - protected void installJSUI() { - } - - @Override - protected void uninstallJSUI() { - } -} +package swingjs.plaf; + +import swingjs.api.DOMNode; + +/** + * Pluggable look and feel interface for JRootPane. + * + * @author Scott Violet + * @since 1.3 + */ +public class JSRootPaneUI extends JSComponentUI { + + public JSRootPaneUI() { + isContainer = true; + setDoc(); + } + + @Override + public DOMNode getDOMObject() { + return null; + } + + @Override + protected void installJSUI() { + } + + @Override + protected void uninstallJSUI() { + } +} diff --git a/site/j2s/swingjs/plaf/JSScrollBarUI.java b/site/j2s/swingjs/plaf/JSScrollBarUI.java index 84d1d65..3bc9ee3 100644 --- a/site/j2s/swingjs/plaf/JSScrollBarUI.java +++ b/site/j2s/swingjs/plaf/JSScrollBarUI.java @@ -1,26 +1,26 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; - -public class JSScrollBarUI extends JSComponentUI { - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domNode = createDOMObject("div", id); - return domNode; - } - - @Override - protected void installJSUI() { - // TODO Auto-generated method stub - - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +package swingjs.plaf; + +import swingjs.api.DOMNode; + +public class JSScrollBarUI extends JSComponentUI { + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domNode = createDOMObject("div", id); + return domNode; + } + + @Override + protected void installJSUI() { + // TODO Auto-generated method stub + + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSScrollBarUI.js b/site/j2s/swingjs/plaf/JSScrollBarUI.js index 332ac51..1feb990 100644 --- a/site/j2s/swingjs/plaf/JSScrollBarUI.js +++ b/site/j2s/swingjs/plaf/JSScrollBarUI.js @@ -1,3 +1,9 @@ +//Clazz.declarePackage ("swingjs.plaf"); +//Clazz.load (["swingjs.plaf.JSSliderUI"], "swingjs.plaf.JSScrollBarUI", null, function () { +//c$ = Clazz.declareType (swingjs.plaf, "JSScrollBarUI", swingjs.plaf.JSSliderUI); +//}); + + Clazz.declarePackage ("swingjs.plaf"); Clazz.load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSScrollBarUI", null, function () { c$ = Clazz.declareType (swingjs.plaf, "JSScrollBarUI", swingjs.plaf.JSComponentUI); diff --git a/site/j2s/swingjs/plaf/JSScrollPaneUI.java b/site/j2s/swingjs/plaf/JSScrollPaneUI.java index 25d96ad..4d41bf9 100644 --- a/site/j2s/swingjs/plaf/JSScrollPaneUI.java +++ b/site/j2s/swingjs/plaf/JSScrollPaneUI.java @@ -1,62 +1,62 @@ -package swingjs.plaf; - -import jsjava.awt.Component; -import jsjavax.swing.JComponent; -import jsjavax.swing.JScrollPane; -import jsjavax.swing.JViewport; - -import swingjs.JSToolkit; -import swingjs.api.DOMNode; - -public class JSScrollPaneUI extends JSComponentUI { - - private JComponent scrolledComponent; - private JScrollPane scrollpane; - private JViewport viewport; - private JSComponentUI scrolledUI; - - @Override - public DOMNode getDOMObject() { - isContainer = true; - scrollpane = (JScrollPane) c; - if (domNode == null) { - domNode = createDOMObject("div", id); - } - JViewport v = scrollpane.getViewport(); - - if (v != null) { - viewport = v; - System.out.println("JSScrollPaneUI v=" + v); - JComponent sc = null; - try { - sc = (JComponent) v.getComponent(0); - } catch (Exception e) { - // unusable - } - if (sc != null && sc != scrolledComponent) { - scrolledComponent = sc; - scrolledUI = JSToolkit.getUI(sc, false); - scrollNode = scrolledUI.outerNode; - if (scrollNode == null) - scrollNode = scrolledUI.setHTMLElement(); - DOMNode.setSize(scrollNode, c.getWidth(), c.getHeight()); - scrolledUI.scrollerNode = this; - components = new Component[] { scrolledComponent }; - } - } - return domNode; - } - - @Override - protected void installJSUI() { - // TODO Auto-generated method stub - - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +package swingjs.plaf; + +import jsjava.awt.Component; +import jsjavax.swing.JComponent; +import jsjavax.swing.JScrollPane; +import jsjavax.swing.JViewport; + +import swingjs.JSToolkit; +import swingjs.api.DOMNode; + +public class JSScrollPaneUI extends JSComponentUI { + + private JComponent scrolledComponent; + private JScrollPane scrollpane; + private JViewport viewport; + private JSComponentUI scrolledUI; + + @Override + public DOMNode getDOMObject() { + isContainer = true; + scrollpane = (JScrollPane) c; + if (domNode == null) { + domNode = createDOMObject("div", id); + } + JViewport v = scrollpane.getViewport(); + + if (v != null) { + viewport = v; + System.out.println("JSScrollPaneUI v=" + v); + JComponent sc = null; + try { + sc = (JComponent) v.getComponent(0); + } catch (Exception e) { + // unusable + } + if (sc != null && sc != scrolledComponent) { + scrolledComponent = sc; + scrolledUI = JSToolkit.getUI(sc, false); + scrollNode = scrolledUI.outerNode; + if (scrollNode == null) + scrollNode = scrolledUI.setHTMLElement(); + DOMNode.setSize(scrollNode, c.getWidth(), c.getHeight()); + scrolledUI.scrollerNode = this; + components = new Component[] { scrolledComponent }; + } + } + return domNode; + } + + @Override + protected void installJSUI() { + // TODO Auto-generated method stub + + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSSeparatorUI.java b/site/j2s/swingjs/plaf/JSSeparatorUI.java index 3407e0a..330814b 100644 --- a/site/j2s/swingjs/plaf/JSSeparatorUI.java +++ b/site/j2s/swingjs/plaf/JSSeparatorUI.java @@ -1,53 +1,53 @@ -/* - * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package swingjs.plaf; - -import swingjs.api.DOMNode; -import jsjavax.swing.JLabel; - -public class JSSeparatorUI extends JSLabelUI { - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - textNode = domNode = createDOMObject("label", id); - vCenter(domNode, 10); - return setCssFont(DOMNode.setAttr(domNode, "innerHTML",((JLabel) c).getText()), c.getFont()); - } - - @Override - protected void installJSUI() { - // TODO Auto-generated method stub - - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +/* + * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package swingjs.plaf; + +import swingjs.api.DOMNode; +import jsjavax.swing.JLabel; + +public class JSSeparatorUI extends JSLabelUI { + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + textNode = domNode = createDOMObject("label", id); + vCenter(domNode, 10); + return setCssFont(DOMNode.setAttr(domNode, "innerHTML",((JLabel) c).getText()), c.getFont()); + } + + @Override + protected void installJSUI() { + // TODO Auto-generated method stub + + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSSliderUI.java b/site/j2s/swingjs/plaf/JSSliderUI.java index 9e9ec7e..e6a882c 100644 --- a/site/j2s/swingjs/plaf/JSSliderUI.java +++ b/site/j2s/swingjs/plaf/JSSliderUI.java @@ -1,173 +1,173 @@ -package swingjs.plaf; - - -import javax.swing.SwingConstants; - -import jsjava.awt.Dimension; -import jsjava.beans.PropertyChangeEvent; -import jsjava.beans.PropertyChangeListener; -import jsjavax.swing.JSlider; -import jsjavax.swing.event.ChangeEvent; -import jsjavax.swing.event.ChangeListener; -import swingjs.J2SRequireImport; -import swingjs.JSToolkit; -import swingjs.api.DOMNode; - -@J2SRequireImport(swingjs.jquery.JQueryUI.class) -public class JSSliderUI extends JSComponentUI implements PropertyChangeListener, ChangeListener { - - private JSlider jSlider; - private int min, max, val; - private String orientation; - - protected DOMNode jqSlider; - private int z0 = Integer.MIN_VALUE; - - public JSSliderUI() { - needPreferred = true; - setDoc(); - } - - static { - JSToolkit.getJavaResource("swingjs/jquery/jquery-ui-slider.css"); - JSToolkit.getJavaResource("swingjs/jquery/jquery-ui-slider.js"); - } - @Override - public DOMNode getDOMObject() { - JSlider js = jSlider = (JSlider) c; - boolean isNew = (domNode == null); - if (isNew) { - domNode = wrap("div", id + "_wrap", jqSlider = DOMNode.createElement("div", id)); - DOMNode.setAttr(domNode, "className", "swingjs"); - orientation = (js.getOrientation() == SwingConstants.VERTICAL ? "vertical" : "horizontal"); - min = js.getMinimum(); - max = js.getMaximum(); - val = js.getValue(); - - - /** - * @j2sNative - * - var me = this; - me.$(me.jqSlider).slider({ - orientation: me.orientation, - range: false, - min: me.min, - max: me.max, - value: me.val, - change: function( event, handle ) { - me.jqueryCallback(event, handle); - }, - slide: function( event, handle ) { - me.jqueryCallback(event, handle); - } - }); - - */ - {} - - } - setZ(isNew); - return domNode; - } - - /** - * - * @param isNew - */ - private void setZ(boolean isNew) { - int z = JSToolkit.getZIndex(this, null); - if (z == z0) - return; - z0 = z; - System.out.println("JSSliderUI setting z to " + z); - DOMNode sliderTrack = null; - DOMNode sliderHandle = null; - /** - * @j2sNative - * - * sliderTrack = this.domNode.firstChild; - * sliderHandle = sliderTrack.firstChild; - * sliderTrack.style["z-index"] = z++; - * sliderHandle.style["z-index"] = z++; - */ - {} - // mark the handle and track with the "swingjs-ui" class - // so as to ignore all mouse/touch events from Jmol._jsSetMouse(); - if (isNew) { - $(sliderHandle).addClass("swingjs-ui"); - $(sliderTrack).addClass("swingjs-ui"); - } - } - - /** - * called from JavaScript via the hook added in getDOMObject - * - * @param event - * @param ui - */ - public void jqueryCallback(Object event, DOMNode ui) { - // from JavaScript - int value = 0; - - /** - * @j2sNative - * - * value = ui.value; - * - */ - {} - - jSlider.setValue(val = value); - } - - protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { - return (orientation == "horizontal" ? new Dimension(100, 20) : new Dimension(20, 100)); - } - - @Override - protected void installJSUI() { - jSlider.addChangeListener(this); - jSlider.addPropertyChangeListener(this); - } - - @Override - protected void uninstallJSUI() { - jSlider.removeChangeListener(this); - jSlider.removePropertyChangeListener(this); - } - - @Override - public void propertyChange(PropertyChangeEvent e) { - String prop = e.getPropertyName(); - System.out.println(id + " propertyChange " + prop); - if (prop == "ancestor") - setZ(false); - } - - @Override - public void stateChanged(ChangeEvent e) { - // from Java - int v; - if ((v = jSlider.getMinimum()) != min) - setSliderAttr("min", min = v); - if ((v = jSlider.getMaximum()) != max) - setSliderAttr("max", max = v); - if ((v = jSlider.getValue()) != val) - setSliderAttr("value", val = v); - setZ(false); - } - - private void setSliderAttr(String key, int val) { - System.out.println(id + " setting " + key + " = " + val); - /** - * @j2sNative - * - * var a = {}; - * a[key]= val; - * this.$(this.jqSlider).slider(a); - */ - {} - } - -} +package swingjs.plaf; + + +import javax.swing.SwingConstants; + +import jsjava.awt.Dimension; +import jsjava.beans.PropertyChangeEvent; +import jsjava.beans.PropertyChangeListener; +import jsjavax.swing.JSlider; +import jsjavax.swing.event.ChangeEvent; +import jsjavax.swing.event.ChangeListener; +import swingjs.J2SRequireImport; +import swingjs.JSToolkit; +import swingjs.api.DOMNode; + +@J2SRequireImport(swingjs.jquery.JQueryUI.class) +public class JSSliderUI extends JSComponentUI implements PropertyChangeListener, ChangeListener { + + private JSlider jSlider; + private int min, max, val; + private String orientation; + + protected DOMNode jqSlider; + private int z0 = Integer.MIN_VALUE; + + public JSSliderUI() { + needPreferred = true; + setDoc(); + } + + static { + JSToolkit.getJavaResource("swingjs/jquery/jquery-ui-slider.css"); + JSToolkit.getJavaResource("swingjs/jquery/jquery-ui-slider.js"); + } + @Override + public DOMNode getDOMObject() { + JSlider js = jSlider = (JSlider) c; + boolean isNew = (domNode == null); + if (isNew) { + domNode = wrap("div", id + "_wrap", jqSlider = DOMNode.createElement("div", id)); + DOMNode.setAttr(domNode, "className", "swingjs"); + orientation = (js.getOrientation() == SwingConstants.VERTICAL ? "vertical" : "horizontal"); + min = js.getMinimum(); + max = js.getMaximum(); + val = js.getValue(); + + + /** + * @j2sNative + * + var me = this; + me.$(me.jqSlider).slider({ + orientation: me.orientation, + range: false, + min: me.min, + max: me.max, + value: me.val, + change: function( event, handle ) { + me.jqueryCallback(event, handle); + }, + slide: function( event, handle ) { + me.jqueryCallback(event, handle); + } + }); + + */ + {} + + } + setZ(isNew); + return domNode; + } + + /** + * + * @param isNew + */ + private void setZ(boolean isNew) { + int z = JSToolkit.getZIndex(this, null); + if (z == z0) + return; + z0 = z; + System.out.println("JSSliderUI setting z to " + z); + DOMNode sliderTrack = null; + DOMNode sliderHandle = null; + /** + * @j2sNative + * + * sliderTrack = this.domNode.firstChild; + * sliderHandle = sliderTrack.firstChild; + * sliderTrack.style["z-index"] = z++; + * sliderHandle.style["z-index"] = z++; + */ + {} + // mark the handle and track with the "swingjs-ui" class + // so as to ignore all mouse/touch events from Jmol._jsSetMouse(); + if (isNew) { + $(sliderHandle).addClass("swingjs-ui"); + $(sliderTrack).addClass("swingjs-ui"); + } + } + + /** + * called from JavaScript via the hook added in getDOMObject + * + * @param event + * @param ui + */ + public void jqueryCallback(Object event, DOMNode ui) { + // from JavaScript + int value = 0; + + /** + * @j2sNative + * + * value = ui.value; + * + */ + {} + + jSlider.setValue(val = value); + } + + protected Dimension setHTMLSize(DOMNode obj, boolean addCSS) { + return (orientation == "horizontal" ? new Dimension(100, 20) : new Dimension(20, 100)); + } + + @Override + protected void installJSUI() { + jSlider.addChangeListener(this); + jSlider.addPropertyChangeListener(this); + } + + @Override + protected void uninstallJSUI() { + jSlider.removeChangeListener(this); + jSlider.removePropertyChangeListener(this); + } + + @Override + public void propertyChange(PropertyChangeEvent e) { + String prop = e.getPropertyName(); + System.out.println(id + " propertyChange " + prop); + if (prop == "ancestor") + setZ(false); + } + + @Override + public void stateChanged(ChangeEvent e) { + // from Java + int v; + if ((v = jSlider.getMinimum()) != min) + setSliderAttr("min", min = v); + if ((v = jSlider.getMaximum()) != max) + setSliderAttr("max", max = v); + if ((v = jSlider.getValue()) != val) + setSliderAttr("value", val = v); + setZ(false); + } + + private void setSliderAttr(String key, int val) { + System.out.println(id + " setting " + key + " = " + val); + /** + * @j2sNative + * + * var a = {}; + * a[key]= val; + * this.$(this.jqSlider).slider(a); + */ + {} + } + +} diff --git a/site/j2s/swingjs/plaf/JSSliderUI.js b/site/j2s/swingjs/plaf/JSSliderUI.js index ae0ccf2..f4edea4 100644 --- a/site/j2s/swingjs/plaf/JSSliderUI.js +++ b/site/j2s/swingjs/plaf/JSSliderUI.js @@ -106,6 +106,6 @@ a[key]= val; this.$(this.jqSlider).slider(a); }}, "~S,~N"); { -swingjs.JSToolkit.getJavaResource ("swingjs/jquery/jquery-ui-slider.css"); -swingjs.JSToolkit.getJavaResource ("swingjs/jquery/jquery-ui-slider.js"); +swingjs.JSToolkit.getJavaResource ("swingjs/jquery/jquery-ui-slider.css", true); +swingjs.JSToolkit.getJavaResource ("swingjs/jquery/jquery-ui-slider.js", true); }}); diff --git a/site/j2s/swingjs/plaf/JSTextAreaUI.java b/site/j2s/swingjs/plaf/JSTextAreaUI.java index 2d45875..b613c28 100644 --- a/site/j2s/swingjs/plaf/JSTextAreaUI.java +++ b/site/j2s/swingjs/plaf/JSTextAreaUI.java @@ -1,37 +1,37 @@ -package swingjs.plaf; - -import swingjs.api.DOMNode; - -/** - * SWingJS implementation of stateful user interface for buttons. - * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). - * - * @author Bob Hanson - * - */ -public class JSTextAreaUI extends JSTextUI { - - /** - * the radio or check-box or simple button - * - */ - protected DOMNode domBtn; - - @Override - public DOMNode getDOMObject() { - if (domNode == null) { - updateHandler.checkDocument(); - domBtn = focusNode = enableNode = textNode = domNode = createDOMObject("textarea", id); - bindMouse(domNode); - bindKeys(domNode); - setFocusable(); - } - setCssFont( - DOMNode.setAttr(domNode, "innerHTML", getComponentText()), - c.getFont()); - if (!editable) - DOMNode.setAttr(domNode, "readOnly", "true"); - return domNode; - } - -} +package swingjs.plaf; + +import swingjs.api.DOMNode; + +/** + * SWingJS implementation of stateful user interface for buttons. + * Modeled after javax.swing.plaf.basic.BasicButtonUI.java (commented out below). + * + * @author Bob Hanson + * + */ +public class JSTextAreaUI extends JSTextUI { + + /** + * the radio or check-box or simple button + * + */ + protected DOMNode domBtn; + + @Override + public DOMNode getDOMObject() { + if (domNode == null) { + updateHandler.checkDocument(); + domBtn = focusNode = enableNode = textNode = domNode = createDOMObject("textarea", id); + bindMouse(domNode); + bindKeys(domNode); + setFocusable(); + } + setCssFont( + DOMNode.setAttr(domNode, "innerHTML", getComponentText()), + c.getFont()); + if (!editable) + DOMNode.setAttr(domNode, "readOnly", "true"); + return domNode; + } + +} diff --git a/site/j2s/swingjs/plaf/JSTextFieldUI.java b/site/j2s/swingjs/plaf/JSTextFieldUI.java index bab8716..668ebed 100644 --- a/site/j2s/swingjs/plaf/JSTextFieldUI.java +++ b/site/j2s/swingjs/plaf/JSTextFieldUI.java @@ -1,57 +1,57 @@ -package swingjs.plaf; - -//import jsjava.awt.FontMetrics; -import java.awt.event.KeyEvent; - -import jsjava.awt.Dimension; -import jsjava.awt.event.ActionEvent; -import jsjavax.swing.Action; -import jsjavax.swing.JTextField; -import swingjs.api.DOMNode; - -/** - * A minimal implementation of a test field ui/peer - * - * @author Bob Hanson - * - */ -public class JSTextFieldUI extends JSTextUI { - - protected String inputType = "text"; - - @Override - public DOMNode getDOMObject() { - if (domNode == null) { - updateHandler.checkDocument(); - focusNode = enableNode = valueNode = domNode = DOMNode - .setStyles(createDOMObject("input", id, "type", inputType), - "padding", "0px 1px"); - vCenter(domNode, -10); - bindMouse(domNode); - bindKeys(domNode); - setFocusable(); - } - setCssFont(setProp(domNode, "value", getComponentText()), - c.getFont()); - if (!editable) - DOMNode.setAttr(domNode, "readOnly", "true"); - return domNode; - } - - @Override - protected Dimension getCSSDimension(int w, int h) { - return new Dimension(w, h - 2); - } - - @Override - boolean handleEnter(int eventType) { - if (eventType == KeyEvent.KEY_PRESSED) { - Action a = getActionMap().get(JTextField.notifyAction); - if (a != null) - a.actionPerformed(new ActionEvent(c, ActionEvent.ACTION_PERFORMED, JTextField.notifyAction, System.currentTimeMillis(), 0)); - } - return true; - } - - -} +package swingjs.plaf; + +//import jsjava.awt.FontMetrics; +import java.awt.event.KeyEvent; + +import jsjava.awt.Dimension; +import jsjava.awt.event.ActionEvent; +import jsjavax.swing.Action; +import jsjavax.swing.JTextField; +import swingjs.api.DOMNode; + +/** + * A minimal implementation of a test field ui/peer + * + * @author Bob Hanson + * + */ +public class JSTextFieldUI extends JSTextUI { + + protected String inputType = "text"; + + @Override + public DOMNode getDOMObject() { + if (domNode == null) { + updateHandler.checkDocument(); + focusNode = enableNode = valueNode = domNode = DOMNode + .setStyles(createDOMObject("input", id, "type", inputType), + "padding", "0px 1px"); + vCenter(domNode, -10); + bindMouse(domNode); + bindKeys(domNode); + setFocusable(); + } + setCssFont(setProp(domNode, "value", getComponentText()), + c.getFont()); + if (!editable) + DOMNode.setAttr(domNode, "readOnly", "true"); + return domNode; + } + + @Override + protected Dimension getCSSDimension(int w, int h) { + return new Dimension(w, h - 2); + } + + @Override + boolean handleEnter(int eventType) { + if (eventType == KeyEvent.KEY_PRESSED) { + Action a = getActionMap().get(JTextField.notifyAction); + if (a != null) + a.actionPerformed(new ActionEvent(c, ActionEvent.ACTION_PERFORMED, JTextField.notifyAction, System.currentTimeMillis(), 0)); + } + return true; + } + + +} diff --git a/site/j2s/swingjs/plaf/JSTextUI.java b/site/j2s/swingjs/plaf/JSTextUI.java index 2cff100..4049f26 100644 --- a/site/j2s/swingjs/plaf/JSTextUI.java +++ b/site/j2s/swingjs/plaf/JSTextUI.java @@ -1,2795 +1,2795 @@ -/* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package swingjs.plaf; - -import swingjs.JSToolkit; -import swingjs.api.DOMNode; -import swingjs.api.JQueryObject; -import swingjs.api.JSFunction; -import jsjava.awt.Dimension; -import jsjava.awt.Insets; -import jsjava.awt.LayoutManager; -import jsjava.awt.event.ActionEvent; -import jsjavax.swing.AbstractAction; -import jsjavax.swing.Action; -import jsjavax.swing.ActionMap; -import jsjavax.swing.InputMap; -import jsjavax.swing.JComponent; -import jsjavax.swing.SwingUtilities; -import jsjavax.swing.UIManager; -import jsjavax.swing.plaf.ActionMapUIResource; -import jsjavax.swing.plaf.ComponentUI; -import jsjavax.swing.plaf.InputMapUIResource; -import jsjavax.swing.plaf.TextUI; -import jsjavax.swing.plaf.UIResource; -import jsjavax.swing.text.Caret; -import jsjavax.swing.text.DefaultEditorKit; -import jsjavax.swing.text.EditorKit; -import jsjavax.swing.text.JTextComponent; -import jsjavax.swing.text.TextAction; -//import jsjava.awt.KeyboardFocusManager; -//import jsjava.awt.datatransfer.DataFlavor; -//import jsjava.awt.datatransfer.Transferable; -//import jsjava.awt.datatransfer.UnsupportedFlavorException; -//import jsjava.awt.im.InputContext; -//import jsjava.io.IOException; -//import jsjava.io.InputStream; -//import jsjava.io.Reader; -//import jsjava.io.StringBufferInputStream; -//import jsjava.io.StringReader; -//import jsjava.io.StringWriter; -//import jsjavax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag; - -/** - *

    - * Basis of a text components look-and-feel. This provides the basic editor view - * and controller services that may be useful when creating a look-and-feel for - * an extension of JTextComponent. - *

    - * Most state is held in the associated JTextComponent as bound - * properties, and the UI installs default values for the various properties. - * This default will install something for all of the properties. Typically, a - * LAF implementation will do more however. At a minimum, a LAF would generally - * install key bindings. - *

    - * This class also provides some concurrency support if the - * Document associated with the JTextComponent is a subclass of - * AbstractDocument. Access to the View (or View hierarchy) is - * serialized between any thread mutating the model and the Swing event thread - * (which is expected to render, do model/view coordinate translation, etc). - * Any access to the root view should first - * acquire a read-lock on the AbstractDocument and release that lock - * in a finally block. - *

    - * An important method to define is the {@link #getPropertyPrefix} method which - * is used as the basis of the keys used to fetch defaults from the UIManager. - * The string should reflect the type of TextUI (eg. TextField, TextArea, etc) - * without the particular LAF part of the name (eg Metal, Motif, etc). - *

    - * To build a view of the model, one of the following strategies can be - * employed. - *

      - *
    1. - * One strategy is to simply redefine the ViewFactory interface in the UI. By - * default, this UI itself acts as the factory for View implementations. This is - * useful for simple factories. To do this reimplement the {@link #create} - * method. - *
    2. - * A common strategy for creating more complex types of documents is to have the - * EditorKit implementation return a factory. Since the EditorKit ties all of - * the pieces necessary to maintain a type of document, the factory is typically - * an important part of that and should be produced by the EditorKit - * implementation. - *
    - *

    - * Warning: Serialized objects of this class will not be - * compatible with future Swing releases. The current serialization support is - * appropriate for short term storage or RMI between applications running the - * same version of Swing. As of 1.4, support for long term storage of all - * JavaBeansTM has been added to the - * java.beans package. Please see {@link jsjava.beans.XMLEncoder}. - * - * @author Timothy Prinzing - * @author Shannon Hickey (drag and drop) - */ -public abstract class JSTextUI extends JSComponentUI {// implements {ViewFactory - // { - @SuppressWarnings("unused") - protected void setFocusable() { - JQueryObject node = $(focusNode); - Object me = this; - - /** - * @j2sNative - * - * node.focus(function() {me.notifyFocus(true)}); - * node.blur(function() {me.notifyFocus(false)}); - */ - {} - } - - - protected String getComponentText() { - return currentText = ((JTextComponent) c).getText(); - } - - protected void bindKeys(DOMNode domNode) { - JSFunction f = null; - JSEventHandler me = this; - if (!((JTextComponent) c).isEditable()) - return; - /** - * @j2sNative - * - * f = function(event) { me.handleJSEvent(me.domNode, 401, event) - * } - */ - { - System.out.println(me); - } - $(domNode).bind("keydown keypress keyup", f); - - // TODO Auto-generated method stub - - } - - /** - * Initializes component properties, e.g. font, foreground, background, caret - * color, selection color, selected text color, disabled text color, and - * border color. The font, foreground, and background properties are only set - * if their current value is either null or a UIResource, other properties are - * set if the current value is null. - * - * @see #uninstallDefaults - * @see #installUI - */ - protected void installDefaults() { - // String prefix = getPropertyPrefix(); - // Font f = editor.getFont(); - // if ((f == null) || (f instanceof UIResource)) { - // editor.setFont(UIManager.getFont(prefix + ".font")); - // } - // - // Color bg = editor.getBackground(); - // if ((bg == null) || (bg instanceof UIResource)) { - // editor.setBackground(UIManager.getColor(prefix + ".background")); - // } - // - // Color fg = editor.getForeground(); - // if ((fg == null) || (fg instanceof UIResource)) { - // editor.setForeground(UIManager.getColor(prefix + ".foreground")); - // } - // - // Color color = editor.getCaretColor(); - // if ((color == null) || (color instanceof UIResource)) { - // editor.setCaretColor(UIManager.getColor(prefix + ".caretForeground")); - // } - // - // Color s = editor.getSelectionColor(); - // if ((s == null) || (s instanceof UIResource)) { - // editor.setSelectionColor(UIManager.getColor(prefix + - // ".selectionBackground")); - // } - // - // Color sfg = editor.getSelectedTextColor(); - // if ((sfg == null) || (sfg instanceof UIResource)) { - // editor.setSelectedTextColor(UIManager.getColor(prefix + - // ".selectionForeground")); - // } - // - // Color dfg = editor.getDisabledTextColor(); - // if ((dfg == null) || (dfg instanceof UIResource)) { - // editor.setDisabledTextColor(UIManager.getColor(prefix + - // ".inactiveForeground")); - // } - // - // Border b = editor.getBorder(); - // if ((b == null) || (b instanceof UIResource)) { - // editor.setBorder(UIManager.getBorder(prefix + ".border")); - // } - // - // Insets margin = editor.getMargin(); - // if (margin == null || margin instanceof UIResource) { - // editor.setMargin(UIManager.getInsets(prefix + ".margin")); - // } - // - // updateCursor(); - } - - private void installDefaults2() { - // editor.addMouseListener(dragListener); - // editor.addMouseMotionListener(dragListener); - // - // String prefix = getPropertyPrefix(); - - Caret caret = editor.getCaret(); - if (caret == null || caret instanceof UIResource) { - editor.setCaret(new JSCaret()); - } - // - // Highlighter highlighter = editor.getHighlighter(); - // if (highlighter == null || highlighter instanceof UIResource) { - // editor.setHighlighter(createHighlighter()); - // } - // - // TransferHandler th = editor.getTransferHandler(); - // if (th == null || th instanceof UIResource) { - // editor.setTransferHandler(getTransferHandler()); - // } - } - - /** - * called by JmolCore.js - * - * @return handled - */ - public boolean handleJSEvent(Object target, int eventType, Object jQueryEvent) { - System.out.println("Handling for " + id + " " + eventType + " " - + jQueryEvent); - return updateHandler.handleJSEvent(this, eventType, jQueryEvent); - } - - /** - * Sets the component properties that haven't been explicitly overridden to - * null. A property is considered overridden if its current value is not a - * UIResource. - * - * @see #installDefaults - * @see #uninstallUI - */ - protected void uninstallDefaults() { - // editor.removeMouseListener(dragListener); - // editor.removeMouseMotionListener(dragListener); - // - if (editor.getCaretColor() instanceof UIResource) { - editor.setCaretColor(null); - } - - if (editor.getSelectionColor() instanceof UIResource) { - editor.setSelectionColor(null); - } - - if (editor.getDisabledTextColor() instanceof UIResource) { - editor.setDisabledTextColor(null); - } - - if (editor.getSelectedTextColor() instanceof UIResource) { - editor.setSelectedTextColor(null); - } - - if (editor.getBorder() instanceof UIResource) { - editor.setBorder(null); - } - - if (editor.getMargin() instanceof UIResource) { - editor.setMargin(null); - } - - // if (editor.getCaret() instanceof UIResource) { - // editor.setCaret(null); - // } - // - // if (editor.getHighlighter() instanceof UIResource) { - // editor.setHighlighter(null); - // } - // - // if (editor.getTransferHandler() instanceof UIResource) { - // editor.setTransferHandler(null); - // } - // - // if (editor.getCursor() instanceof UIResource) { - // editor.setCursor(null); - // } - } - - protected void installKeyboardActions() { - // backward compatibility support... keymaps for the UI - // are now installed in the more friendly input map. - // editor.setKeymap(createKeymap()); - - InputMap km = getInputMap(); - if (km != null) { - SwingUtilities.replaceUIInputMap(editor, JComponent.WHEN_FOCUSED, km); - } - - ActionMap map = getActionMap(); - if (map != null) { - SwingUtilities.replaceUIActionMap(editor, map); - } - - // updateFocusAcceleratorBinding(false); - } - - /** - * Get the InputMap to use for the UI. - */ - InputMap getInputMap() { - InputMap map = new InputMapUIResource(); - - // InputMap shared = - // (InputMap)DefaultLookup.get(editor, this, - // getPropertyPrefix() + ".focusInputMap"); - // if (shared != null) { - // map.setParent(shared); - // } - return map; - } - - // /** - // * Invoked when the focus accelerator changes, this will update the - // * key bindings as necessary. - // */ - // void updateFocusAcceleratorBinding(boolean changed) { - // char accelerator = editor.getFocusAccelerator(); - // - // if (changed || accelerator != '\0') { - // InputMap km = SwingUtilities.getUIInputMap - // (editor, JComponent.WHEN_IN_FOCUSED_WINDOW); - // - // if (km == null && accelerator != '\0') { - // km = new ComponentInputMapUIResource(editor); - // SwingUtilities.replaceUIInputMap(editor, JComponent. - // WHEN_IN_FOCUSED_WINDOW, km); - // ActionMap am = getActionMap(); - // SwingUtilities.replaceUIActionMap(editor, am); - // } - // if (km != null) { - // km.clear(); - // if (accelerator != '\0') { - // km.put(KeyStroke.getKeyStroke(accelerator, - // ActionEvent.ALT_MASK), - // "requestFocus"); - // } - // } - // } - // } - // - // - // /** - // * Invoked when editable property is changed. - // * - // * removing 'TAB' and 'SHIFT-TAB' from traversalKeysSet in case - // * editor is editable - // * adding 'TAB' and 'SHIFT-TAB' to traversalKeysSet in case - // * editor is non editable - // */ - // - // void updateFocusTraversalKeys() { - // /* - // * Fix for 4514331 Non-editable JTextArea and similar - // * should allow Tab to keyboard - accessibility - // */ - // EditorKit editorKit = getEditorKit(editor); - // if ( editorKit != null - // && editorKit instanceof DefaultEditorKit) { - // Set storedForwardTraversalKeys = editor. - // getFocusTraversalKeys(KeyboardFocusManager. - // FORWARD_TRAVERSAL_KEYS); - // Set storedBackwardTraversalKeys = editor. - // getFocusTraversalKeys(KeyboardFocusManager. - // BACKWARD_TRAVERSAL_KEYS); - // Set forwardTraversalKeys = - // new HashSet(storedForwardTraversalKeys); - // Set backwardTraversalKeys = - // new HashSet(storedBackwardTraversalKeys); - // if (editor.isEditable()) { - // forwardTraversalKeys. - // remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)); - // backwardTraversalKeys. - // remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, - // InputEvent.SHIFT_MASK)); - // } else { - // forwardTraversalKeys.add(KeyStroke. - // getKeyStroke(KeyEvent.VK_TAB, 0)); - // backwardTraversalKeys. - // add(KeyStroke. - // getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK)); - // } - // LookAndFeel.installProperty(editor, - // "focusTraversalKeysForward", - // forwardTraversalKeys); - // LookAndFeel.installProperty(editor, - // "focusTraversalKeysBackward", - // backwardTraversalKeys); - // } - // - // } - - // /** - // * As needed updates cursor for the target editor. - // */ - // private void updateCursor() { - // if ((! editor.isCursorSet()) - // || editor.getCursor() instanceof UIResource) { - // Cursor cursor = (editor.isEditable()) ? textCursor : null; - // editor.setCursor(cursor); - // } - // } - // - // /** - // * Returns the TransferHandler that will be installed if - // * their isn't one installed on the JTextComponent. - // */ - // TransferHandler getTransferHandler() { - // return defaultTransferHandler; - // } - // - /** - * Fetch an action map to use. - */ - ActionMap getActionMap() { - String mapName = classID + ".actionMap"; - ActionMap map = (ActionMap) UIManager.get(mapName); - if (map == null) { - map = createActionMap(); - if (map != null) { - UIManager.getLookAndFeelDefaults().put(mapName, map); - } - } - return map; - } - // ActionMap componentMap = new ActionMapUIResource(); - // componentMap.put("requestFocus", new FocusAction()); - // /* - // * fix for bug 4515750 - // * JTextField & non-editable JTextArea bind return key - default btn not - // accessible - // * - // * Wrap the return action so that it is only enabled when the - // * component is editable. This allows the default button to be - // * processed when the text component has focus and isn't editable. - // * - // */ - // if (getEditorKit(editor) instanceof DefaultEditorKit) { - // if (map != null) { - // Object obj = map.get(DefaultEditorKit.insertBreakAction); - // if (obj != null - // && obj instanceof DefaultEditorKit.InsertBreakAction) { - // Action action = new TextActionWrapper((TextAction)obj); - // componentMap.put(action.getValue(Action.NAME),action); - // } - // } - // } - // if (map != null) { - // componentMap.setParent(map); - // } - // return componentMap; - // } - // - /** - * Create a default action map. This is basically the set of actions found - * exported by the component. - */ - /** - * @return - */ - ActionMap createActionMap() { - ActionMap map = new ActionMapUIResource(); - Action[] actions = editor.getActions();//defaultKit.getActions(); // SwingJS was editor.getEditorKit().getActions() - // System.out.println("building map for UI: " + getPropertyPrefix()); - int n = actions.length; - for (int i = 0; i < n; i++) { - Action a = actions[i]; - map.put(a.getValue(Action.NAME), a); - // System.out.println(" " + a.getValue(Action.NAME)); - } - // map.put(TransferHandler.getCutAction().getValue(Action.NAME), - // TransferHandler.getCutAction()); - // map.put(TransferHandler.getCopyAction().getValue(Action.NAME), - // TransferHandler.getCopyAction()); - // map.put(TransferHandler.getPasteAction().getValue(Action.NAME), - // TransferHandler.getPasteAction()); - return map; - } - - protected void uninstallKeyboardActions() { - editor.setKeymap(null); - SwingUtilities.replaceUIInputMap(editor, JComponent.WHEN_IN_FOCUSED_WINDOW, - null); - SwingUtilities.replaceUIActionMap(editor, null); - } - - // /** - // * Paints a background for the view. This will only be - // * called if isOpaque() on the associated component is - // * true. The default is to paint the background color - // * of the component. - // * - // * @param g the graphics context - // */ - // protected void paintBackground(Graphics g) { - // g.setColor(editor.getBackground()); - // g.fillRect(0, 0, editor.getWidth(), editor.getHeight()); - // } - // - /** - * Fetches the text component associated with this UI implementation. This - * will be null until the ui has been installed. - * - * @return the editor component - */ - protected final JTextComponent getComponent() { - return editor; - } - - // /** - // * Flags model changes. - // * This is called whenever the model has changed. - // * It is implemented to rebuild the view hierarchy - // * to represent the default root element of the - // * associated model. - // */ - // protected void modelChanged() { - // // create a view hierarchy - // ViewFactory f = rootView.getViewFactory(); - // Document doc = editor.getDocument(); - // Element elem = doc.getDefaultRootElement(); - // setView(f.create(elem)); - // } - // - // /** - // * Sets the current root of the view hierarchy and calls invalidate(). - // * If there were any child components, they will be removed (i.e. - // * there are assumed to have come from components embedded in views). - // * - // * @param v the root view - // */ - // protected final void setView(View v) { - // rootView.setView(v); - // painted = false; - // editor.revalidate(); - // editor.repaint(); - // } - // - // /** - // * Paints the interface safely with a guarantee that - // * the model won't change from the view of this thread. - // * This does the following things, rendering from - // * back to front. - // *

      - // *
    1. - // * If the component is marked as opaque, the background - // * is painted in the current background color of the - // * component. - // *
    2. - // * The highlights (if any) are painted. - // *
    3. - // * The view hierarchy is painted. - // *
    4. - // * The caret is painted. - // *
    - // * - // * @param g the graphics context - // */ - // protected void paintSafely(Graphics g) { - // painted = true; - // Highlighter highlighter = editor.getHighlighter(); - // Caret caret = editor.getCaret(); - // - // // paint the background - // if (editor.isOpaque()) { - // paintBackground(g); - // } - // - // // paint the highlights - // if (highlighter != null) { - // highlighter.paint(g); - // } - // - // // paint the view hierarchy - // Rectangle alloc = getVisibleEditorRect(); - // if (alloc != null) { - // rootView.paint(g, alloc); - // } - // - // // paint the caret - // if (caret != null) { - // caret.paint(g); - // } - // - // if (dropCaret != null) { - // dropCaret.paint(g); - // } - // } - - // --- ComponentUI methods -------------------------------------------- - - TextListener updateHandler; - - /** - * Installs the UI for a component. This does the following things. - *
      - *
    1. - * Set the associated component to opaque (can be changed easily by a subclass - * or on JTextComponent directly), which is the most common case. This will - * cause the component's background color to be painted. - *
    2. - * Install the default caret and highlighter into the associated component. - *
    3. - * Attach to the editor and model. If there is no model, a default one is - * created. - *
    4. - * create the view factory and the view hierarchy used to represent the model. - *
    - * - * @param c - * the editor component - * @see ComponentUI#installUI - */ - protected void installJSUI() { - editor = (JTextComponent) c; - updateHandler = new TextListener(this, editor); - - // install defaults - installDefaults(); - installDefaults2(); - - // // This is a workaround as these should not override what synth has - // // set them to - // if (!(this instanceof sun.swing.plaf.synth.SynthUI)){ - // // common case is background painted... this can - // // easily be changed by subclasses or from outside - // // of the component. - // LookAndFeel.installProperty(editor, "opaque", Boolean.TRUE); - // LookAndFeel.installProperty(editor, "autoscrolls", Boolean.TRUE); - // } - // - // attach to the model and editor - // Document doc = editor.getDocument(); - // if (doc == null) { - // // no model, create a default one. This will - // // fire a notification to the updateHandler - // // which takes care of the rest. - // editor.setDocument(getEditorKit(editor).createDefaultDocument()); - // } else { - // // doc.addDocumentListener(updateHandler); - // // modelChanged(); - // } - - // install keymap - installListeners(editor); - installKeyboardActions(); - - // LayoutManager oldLayout = editor.getLayout(); - // if ((oldLayout == null) || (oldLayout instanceof UIResource)) { - // // by default, use default LayoutManger implementation that - // // will position the components associated with a View object. - // editor.setLayout(updateHandler); - // } - // - // updateBackground(editor); - } - - /** - * Deinstalls the UI for a component. This removes the listeners, uninstalls - * the highlighter, removes views, and nulls out the keymap. - * - * @param c - * the editor component - * @see ComponentUI#uninstallUI - */ - public void uninstallJSUI() { - // detach from the model - // editor.removePropertyChangeListener(updateHandler); - // editor.getDocument().removeDocumentListener(updateHandler); - - // view part - // painted = false; - uninstallDefaults(); - // rootView.setView(null); - c.removeAll(); - LayoutManager lm = c.getLayout(); - if (lm instanceof UIResource) { - c.setLayout(null); - } - - // controller part - uninstallKeyboardActions(); - uninstallListeners(editor); - - editor = null; - updateHandler = null; - } - - protected void installListeners(JTextComponent b) { - TextListener listener = updateHandler; - b.addMouseListener(listener); - b.addMouseMotionListener(listener); - b.addFocusListener(listener); - b.addPropertyChangeListener(listener); - // SwingJS there won't be a document yet; this is in constructor - // b.getDocument().addDocumentListener(listener); - } - - protected void uninstallListeners(JTextComponent b) { - TextListener listener = updateHandler; - b.removeMouseListener(listener); - b.removeMouseMotionListener(listener); - b.removeFocusListener(listener); - b.removePropertyChangeListener(listener); - b.getDocument().removeDocumentListener(listener); - } - - // /** - // * Superclass paints background in an uncontrollable way - // * (i.e. one might want an image tiled into the background). - // * To prevent this from happening twice, this method is - // * reimplemented to simply paint. - // *

    - // * NOTE: Superclass is also not thread-safe in - // * it's rendering of the background, although that's not - // * an issue with the default rendering. - // */ - // public void update(Graphics g, JComponent c) { - // paint(g, c); - // } - // - // /** - // * Paints the interface. This is routed to the - // * paintSafely method under the guarantee that - // * the model won't change from the view of this thread - // * while it's rendering (if the associated model is - // * derived from AbstractDocument). This enables the - // * model to potentially be updated asynchronously. - // * - // * @param g the graphics context - // * @param c the editor component - // */ - // public final void paint(Graphics g, JComponent c) { - // if ((rootView.getViewCount() > 0) && (rootView.getView(0) != null)) { - // Document doc = editor.getDocument(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // paintSafely(g); - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // } - // } - - // /** - // * Gets the preferred size for the editor component. If the component - // * has been given a size prior to receiving this request, it will - // * set the size of the view hierarchy to reflect the size of the component - // * before requesting the preferred size of the view hierarchy. This - // * allows formatted views to format to the current component size before - // * answering the request. Other views don't care about currently formatted - // * size and give the same answer either way. - // * - // * @param c the editor component - // * @return the size - // */ - // public Dimension getPreferredSize(JComponent c) { - // Dimension d = c.getSize(); - // // Document doc = editor.getDocument(); - // // Insets i = c.getInsets(); - // // - // // if (doc instanceof AbstractDocument) { - // // ((AbstractDocument)doc).readLock(); - // // } - // // try { - // // if ((d.width > (i.left + i.right)) && (d.height > (i.top + i.bottom))) { - // // rootView.setSize(d.width - i.left - i.right, d.height - i.top - - // i.bottom); - // // } - // // else if (d.width == 0 && d.height == 0) { - // // // Probably haven't been layed out yet, force some sort of - // // // initial sizing. - // // rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE); - // // } - // // d.width = (int) Math.min((long) rootView.getPreferredSpan(View.X_AXIS) + - // // (long) i.left + (long) i.right, Integer.MAX_VALUE); - // // d.height = (int) Math.min((long) rootView.getPreferredSpan(View.Y_AXIS) - // + - // // (long) i.top + (long) i.bottom, Integer.MAX_VALUE); - // // } finally { - // // if (doc instanceof AbstractDocument) { - // // ((AbstractDocument)doc).readUnlock(); - // // } - // // } - // return d; - // } - - /** - * Gets the minimum size for the editor component. - * - * @param c - * the editor component - * @return the size - */ - public Dimension getMinimumSize(JComponent c) { - Dimension d = getPreferredSize();// new Dimension(); - // Document doc = editor.getDocument(); - Insets i = c.getInsets(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - - d.width += i.left + i.right; - d.height += i.top + i.bottom; - - // d.width = (int) rootView.getMinimumSpan(View.X_AXIS) + i.left + i.right; - // d.height = (int) rootView.getMinimumSpan(View.Y_AXIS) + i.top + i.bottom; - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - return d; - } - - /** - * Gets the maximum size for the editor component. - * - * @param c - * the editor component - * @return the size - */ - public Dimension getMaximumSize(JComponent c) { - // SwingJS TODO - return getMinimumSize(c); - - // Document doc = editor.getDocument(); - // Insets i = c.getInsets(); - // Dimension d = new Dimension(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // d.width = (int) Math.min((long) rootView.getMaximumSpan(View.X_AXIS) + - // (long) i.left + (long) i.right, Integer.MAX_VALUE); - // d.height = (int) Math.min((long) rootView.getMaximumSpan(View.Y_AXIS) + - // (long) i.top + (long) i.bottom, Integer.MAX_VALUE); - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // return d; - } - - // ---- TextUI methods ------------------------------------------- - - // - // /** - // * Gets the allocation to give the root View. Due - // * to an unfortunate set of historical events this - // * method is inappropriately named. The Rectangle - // * returned has nothing to do with visibility. - // * The component must have a non-zero positive size for - // * this translation to be computed. - // * - // * @return the bounding box for the root view - // */ - // protected Rectangle getVisibleEditorRect() { - // Rectangle alloc = editor.getBounds(); - // if ((alloc.width > 0) && (alloc.height > 0)) { - // alloc.x = alloc.y = 0; - // Insets insets = editor.getInsets(); - // alloc.x += insets.left; - // alloc.y += insets.top; - // alloc.width -= insets.left + insets.right; - // alloc.height -= insets.top + insets.bottom; - // return alloc; - // } - // return null; - // } - // - // /** - // * Converts the given location in the model to a place in - // * the view coordinate system. - // * The component must have a non-zero positive size for - // * this translation to be computed. - // * - // * @param tc the text component for which this UI is installed - // * @param pos the local location in the model to translate >= 0 - // * @return the coordinates as a rectangle, null if the model is not painted - // * @exception BadLocationException if the given position does not - // * represent a valid location in the associated document - // * @see TextUI#modelToView - // */ - // public Rectangle modelToView(JTextComponent tc, int pos) throws - // BadLocationException { - // return modelToView(tc, pos, Position.Bias.Forward); - // } - // - // /** - // * Converts the given location in the model to a place in - // * the view coordinate system. - // * The component must have a non-zero positive size for - // * this translation to be computed. - // * - // * @param tc the text component for which this UI is installed - // * @param pos the local location in the model to translate >= 0 - // * @return the coordinates as a rectangle, null if the model is not painted - // * @exception BadLocationException if the given position does not - // * represent a valid location in the associated document - // * @see TextUI#modelToView - // */ - // public Rectangle modelToView(JTextComponent tc, int pos, Position.Bias - // bias) throws BadLocationException { - // Document doc = editor.getDocument(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // Rectangle alloc = getVisibleEditorRect(); - // if (alloc != null) { - // rootView.setSize(alloc.width, alloc.height); - // Shape s = rootView.modelToView(pos, alloc, bias); - // if (s != null) { - // return s.getBounds(); - // } - // } - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // return null; - // } - // - // /** - // * Converts the given place in the view coordinate system - // * to the nearest representative location in the model. - // * The component must have a non-zero positive size for - // * this translation to be computed. - // * - // * @param tc the text component for which this UI is installed - // * @param pt the location in the view to translate. This - // * should be in the same coordinate system as the mouse events. - // * @return the offset from the start of the document >= 0, - // * -1 if not painted - // * @see TextUI#viewToModel - // */ - // public int viewToModel(JTextComponent tc, Point pt) { - // return viewToModel(tc, pt, discardBias); - // } - // - // /** - // * Converts the given place in the view coordinate system - // * to the nearest representative location in the model. - // * The component must have a non-zero positive size for - // * this translation to be computed. - // * - // * @param tc the text component for which this UI is installed - // * @param pt the location in the view to translate. This - // * should be in the same coordinate system as the mouse events. - // * @return the offset from the start of the document >= 0, - // * -1 if the component doesn't yet have a positive size. - // * @see TextUI#viewToModel - // */ - // public int viewToModel(JTextComponent tc, Point pt, - // Position.Bias[] biasReturn) { - // int offs = -1; - // Document doc = editor.getDocument(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // Rectangle alloc = getVisibleEditorRect(); - // if (alloc != null) { - // rootView.setSize(alloc.width, alloc.height); - // offs = rootView.viewToModel(pt.x, pt.y, alloc, biasReturn); - // } - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // return offs; - // } - - // /** - // * {@inheritDoc} - // */ - // public int getNextVisualPositionFrom(JTextComponent t, int pos, - // Position.Bias b, int direction, Position.Bias[] biasRet) - // throws BadLocationException{ - // Document doc = editor.getDocument(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // if (painted) { - // Rectangle alloc = getVisibleEditorRect(); - // if (alloc != null) { - // rootView.setSize(alloc.width, alloc.height); - // } - // return rootView.getNextVisualPositionFrom(pos, b, alloc, direction, - // biasRet); - // } - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // return -1; - // } - // - // /** - // * Causes the portion of the view responsible for the - // * given part of the model to be repainted. Does nothing if - // * the view is not currently painted. - // * - // * @param tc the text component for which this UI is installed - // * @param p0 the beginning of the range >= 0 - // * @param p1 the end of the range >= p0 - // * @see TextUI#damageRange - // */ - // public void damageRange(JTextComponent tc, int p0, int p1) { - // damageRange(tc, p0, p1, Position.Bias.Forward, Position.Bias.Backward); - // } - // - // /** - // * Causes the portion of the view responsible for the - // * given part of the model to be repainted. - // * - // * @param p0 the beginning of the range >= 0 - // * @param p1 the end of the range >= p0 - // */ - // public void damageRange(JTextComponent t, int p0, int p1, - // Position.Bias p0Bias, Position.Bias p1Bias) { - // if (painted) { - // Rectangle alloc = getVisibleEditorRect(); - // if (alloc != null) { - // Document doc = t.getDocument(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // rootView.setSize(alloc.width, alloc.height); - // Shape toDamage = rootView.modelToView(p0, p0Bias, - // p1, p1Bias, alloc); - // Rectangle rect = (toDamage instanceof Rectangle) ? - // (Rectangle)toDamage : toDamage.getBounds(); - // editor.repaint(rect.x, rect.y, rect.width, rect.height); - // } catch (BadLocationException e) { - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // } - // } - // } - - /** - * Fetches the EditorKit for the UI. - * - * @param tc - * the text component for which this UI is installed - * @return the editor capabilities - * @see TextUI#getEditorKit - */ - public EditorKit getEditorKit(JTextComponent tc) { - return defaultKit; - } - - // /** - // * Fetches a View with the allocation of the associated - // * text component (i.e. the root of the hierarchy) that - // * can be traversed to determine how the model is being - // * represented spatially. - // *

    - // * NOTE:The View hierarchy can - // * be traversed from the root view, and other things - // * can be done as well. Things done in this way cannot - // * be protected like simple method calls through the TextUI. - // * Therefore, proper operation in the presence of concurrency - // * must be arranged by any logic that calls this method! - // * - // * - // * @param tc the text component for which this UI is installed - // * @return the view - // * @see TextUI#getRootView - // */ - // public View getRootView(JTextComponent tc) { - // return rootView; - // } - - // /** - // * Returns the string to be used as the tooltip at the passed in location. - // * This forwards the method onto the root View. - // * - // * @see jsjavax.swing.text.JTextComponent#getToolTipText - // * @see jsjavax.swing.text.View#getToolTipText - // * @since 1.4 - // */ - // public String getToolTipText(JTextComponent t, Point pt) { - // if (!painted) { - // return null; - // } - // Document doc = editor.getDocument(); - // String tt = null; - // Rectangle alloc = getVisibleEditorRect(); - // - // if (alloc != null) { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // tt = rootView.getToolTipText(pt.x, pt.y, alloc); - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // } - // return tt; - // } - // - // --- ViewFactory methods ------------------------------ - // - // /** - // * Creates a view for an element. - // * If a subclass wishes to directly implement the factory - // * producing the view(s), it should reimplement this - // * method. By default it simply returns null indicating - // * it is unable to represent the element. - // * - // * @param elem the element - // * @return the view - // */ - // public View create(Element elem) { - // return null; - // } - // - // /** - // * Creates a view for an element. - // * If a subclass wishes to directly implement the factory - // * producing the view(s), it should reimplement this - // * method. By default it simply returns null indicating - // * it is unable to represent the part of the element. - // * - // * @param elem the element - // * @param p0 the starting offset >= 0 - // * @param p1 the ending offset >= p0 - // * @return the view - // */ - // public View create(Element elem, int p0, int p1) { - // return null; - // } - // - // public static class BasicCaret extends DefaultCaret implements UIResource - // {} - // - // public static class BasicHighlighter extends DefaultHighlighter implements - // UIResource {} - // - // static class BasicCursor extends Cursor implements UIResource { - // BasicCursor(int type) { - // super(type); - // } - // - // BasicCursor(String name) { - // super(name); - // } - // } - // - // private static BasicCursor textCursor = new - // BasicCursor(Cursor.TEXT_CURSOR); - // ----- member variables --------------------------------------- - - private static final EditorKit defaultKit = new DefaultEditorKit(); - transient JTextComponent editor; - protected boolean editable = true; - - // transient boolean painted; - // transient RootView rootView = new RootView(); - // transient UpdateHandler updateHandler = new UpdateHandler(); - // private static final TransferHandler defaultTransferHandler = new - // TextTransferHandler(); - // private final DragListener dragListener = getDragListener(); - // private static final Position.Bias[] discardBias = new Position.Bias[1]; - // private DefaultCaret dropCaret; - - // /** - // * Root view that acts as a gateway between the component - // * and the View hierarchy. - // */ - // class RootView extends View { - // - // RootView() { - // super(null); - // } - // - // void setView(View v) { - // View oldView = view; - // view = null; - // if (oldView != null) { - // // get rid of back reference so that the old - // // hierarchy can be garbage collected. - // oldView.setParent(null); - // } - // if (v != null) { - // v.setParent(this); - // } - // view = v; - // } - // - // /** - // * Fetches the attributes to use when rendering. At the root - // * level there are no attributes. If an attribute is resolved - // * up the view hierarchy this is the end of the line. - // */ - // public AttributeSet getAttributes() { - // return null; - // } - // - // /** - // * Determines the preferred span for this view along an axis. - // * - // * @param axis may be either X_AXIS or Y_AXIS - // * @return the span the view would like to be rendered into. - // * Typically the view is told to render into the span - // * that is returned, although there is no guarantee. - // * The parent may choose to resize or break the view. - // */ - // public float getPreferredSpan(int axis) { - // if (view != null) { - // return view.getPreferredSpan(axis); - // } - // return 10; - // } - // - // /** - // * Determines the minimum span for this view along an axis. - // * - // * @param axis may be either X_AXIS or Y_AXIS - // * @return the span the view would like to be rendered into. - // * Typically the view is told to render into the span - // * that is returned, although there is no guarantee. - // * The parent may choose to resize or break the view. - // */ - // public float getMinimumSpan(int axis) { - // if (view != null) { - // return view.getMinimumSpan(axis); - // } - // return 10; - // } - // - // /** - // * Determines the maximum span for this view along an axis. - // * - // * @param axis may be either X_AXIS or Y_AXIS - // * @return the span the view would like to be rendered into. - // * Typically the view is told to render into the span - // * that is returned, although there is no guarantee. - // * The parent may choose to resize or break the view. - // */ - // public float getMaximumSpan(int axis) { - // return Integer.MAX_VALUE; - // } - // - // /** - // * Specifies that a preference has changed. - // * Child views can call this on the parent to indicate that - // * the preference has changed. The root view routes this to - // * invalidate on the hosting component. - // *

    - // * This can be called on a different thread from the - // * event dispatching thread and is basically unsafe to - // * propagate into the component. To make this safe, - // * the operation is transferred over to the event dispatching - // * thread for completion. It is a design goal that all view - // * methods be safe to call without concern for concurrency, - // * and this behavior helps make that true. - // * - // * @param child the child view - // * @param width true if the width preference has changed - // * @param height true if the height preference has changed - // */ - // public void preferenceChanged(View child, boolean width, boolean height) { - // editor.revalidate(); - // } - // - // /** - // * Determines the desired alignment for this view along an axis. - // * - // * @param axis may be either X_AXIS or Y_AXIS - // * @return the desired alignment, where 0.0 indicates the origin - // * and 1.0 the full span away from the origin - // */ - // public float getAlignment(int axis) { - // if (view != null) { - // return view.getAlignment(axis); - // } - // return 0; - // } - // - // /** - // * Renders the view. - // * - // * @param g the graphics context - // * @param allocation the region to render into - // */ - // public void paint(Graphics g, Shape allocation) { - // if (view != null) { - // Rectangle alloc = (allocation instanceof Rectangle) ? - // (Rectangle)allocation : allocation.getBounds(); - // setSize(alloc.width, alloc.height); - // view.paint(g, allocation); - // } - // } - // - // /** - // * Sets the view parent. - // * - // * @param parent the parent view - // */ - // public void setParent(View parent) { - // throw new Error("Can't set parent on root view"); - // } - // - // /** - // * Returns the number of views in this view. Since - // * this view simply wraps the root of the view hierarchy - // * it has exactly one child. - // * - // * @return the number of views - // * @see #getView - // */ - // public int getViewCount() { - // return 1; - // } - // - // /** - // * Gets the n-th view in this container. - // * - // * @param n the number of the view to get - // * @return the view - // */ - // public View getView(int n) { - // return view; - // } - // - // /** - // * Returns the child view index representing the given position in - // * the model. This is implemented to return the index of the only - // * child. - // * - // * @param pos the position >= 0 - // * @return index of the view representing the given position, or - // * -1 if no view represents that position - // * @since 1.3 - // */ - // public int getViewIndex(int pos, Position.Bias b) { - // return 0; - // } - // - // /** - // * Fetches the allocation for the given child view. - // * This enables finding out where various views - // * are located, without assuming the views store - // * their location. This returns the given allocation - // * since this view simply acts as a gateway between - // * the view hierarchy and the associated component. - // * - // * @param index the index of the child - // * @param a the allocation to this view. - // * @return the allocation to the child - // */ - // public Shape getChildAllocation(int index, Shape a) { - // return a; - // } - // - // /** - // * Provides a mapping from the document model coordinate space - // * to the coordinate space of the view mapped to it. - // * - // * @param pos the position to convert - // * @param a the allocated region to render into - // * @return the bounding box of the given position - // */ - // public Shape modelToView(int pos, Shape a, Position.Bias b) throws - // BadLocationException { - // if (view != null) { - // return view.modelToView(pos, a, b); - // } - // return null; - // } - // - // /** - // * Provides a mapping from the document model coordinate space - // * to the coordinate space of the view mapped to it. - // * - // * @param p0 the position to convert >= 0 - // * @param b0 the bias toward the previous character or the - // * next character represented by p0, in case the - // * position is a boundary of two views. - // * @param p1 the position to convert >= 0 - // * @param b1 the bias toward the previous character or the - // * next character represented by p1, in case the - // * position is a boundary of two views. - // * @param a the allocated region to render into - // * @return the bounding box of the given position is returned - // * @exception BadLocationException if the given position does - // * not represent a valid location in the associated document - // * @exception IllegalArgumentException for an invalid bias argument - // * @see View#viewToModel - // */ - // public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias - // b1, Shape a) throws BadLocationException { - // if (view != null) { - // return view.modelToView(p0, b0, p1, b1, a); - // } - // return null; - // } - // - // /** - // * Provides a mapping from the view coordinate space to the logical - // * coordinate space of the model. - // * - // * @param x x coordinate of the view location to convert - // * @param y y coordinate of the view location to convert - // * @param a the allocated region to render into - // * @return the location within the model that best represents the - // * given point in the view - // */ - // public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) { - // if (view != null) { - // int retValue = view.viewToModel(x, y, a, bias); - // return retValue; - // } - // return -1; - // } - // - // /** - // * Provides a way to determine the next visually represented model - // * location that one might place a caret. Some views may not be visible, - // * they might not be in the same order found in the model, or they just - // * might not allow access to some of the locations in the model. - // * - // * @param pos the position to convert >= 0 - // * @param a the allocated region to render into - // * @param direction the direction from the current position that can - // * be thought of as the arrow keys typically found on a keyboard. - // * This may be SwingConstants.WEST, SwingConstants.EAST, - // * SwingConstants.NORTH, or SwingConstants.SOUTH. - // * @return the location within the model that best represents the next - // * location visual position. - // * @exception BadLocationException - // * @exception IllegalArgumentException for an invalid direction - // */ - // public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, - // int direction, - // Position.Bias[] biasRet) - // throws BadLocationException { - // if( view != null ) { - // int nextPos = view.getNextVisualPositionFrom(pos, b, a, - // direction, biasRet); - // if(nextPos != -1) { - // pos = nextPos; - // } - // else { - // biasRet[0] = b; - // } - // } - // return pos; - // } - // - // /** - // * Gives notification that something was inserted into the document - // * in a location that this view is responsible for. - // * - // * @param e the change information from the associated document - // * @param a the current allocation of the view - // * @param f the factory to use to rebuild if the view has children - // */ - // public void insertUpdate(DocumentEvent e, Shape a, ViewFactory f) { - // if (view != null) { - // view.insertUpdate(e, a, f); - // } - // } - // - // /** - // * Gives notification that something was removed from the document - // * in a location that this view is responsible for. - // * - // * @param e the change information from the associated document - // * @param a the current allocation of the view - // * @param f the factory to use to rebuild if the view has children - // */ - // public void removeUpdate(DocumentEvent e, Shape a, ViewFactory f) { - // if (view != null) { - // view.removeUpdate(e, a, f); - // } - // } - // - // /** - // * Gives notification from the document that attributes were changed - // * in a location that this view is responsible for. - // * - // * @param e the change information from the associated document - // * @param a the current allocation of the view - // * @param f the factory to use to rebuild if the view has children - // */ - // public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f) { - // if (view != null) { - // view.changedUpdate(e, a, f); - // } - // } - // - // /** - // * Returns the document model underlying the view. - // * - // * @return the model - // */ - // public Document getDocument() { - // return editor.getDocument(); - // } - // - // /** - // * Returns the starting offset into the model for this view. - // * - // * @return the starting offset - // */ - // public int getStartOffset() { - // if (view != null) { - // return view.getStartOffset(); - // } - // return getElement().getStartOffset(); - // } - // - // /** - // * Returns the ending offset into the model for this view. - // * - // * @return the ending offset - // */ - // public int getEndOffset() { - // if (view != null) { - // return view.getEndOffset(); - // } - // return getElement().getEndOffset(); - // } - // - // /** - // * Gets the element that this view is mapped to. - // * - // * @return the view - // */ - // public Element getElement() { - // if (view != null) { - // return view.getElement(); - // } - // return editor.getDocument().getDefaultRootElement(); - // } - // - // /** - // * Breaks this view on the given axis at the given length. - // * - // * @param axis may be either X_AXIS or Y_AXIS - // * @param len specifies where a break is desired in the span - // * @param the current allocation of the view - // * @return the fragment of the view that represents the given span - // * if the view can be broken, otherwise null - // */ - // public View breakView(int axis, float len, Shape a) { - // throw new Error("Can't break root view"); - // } - // - // /** - // * Determines the resizability of the view along the - // * given axis. A value of 0 or less is not resizable. - // * - // * @param axis may be either X_AXIS or Y_AXIS - // * @return the weight - // */ - // public int getResizeWeight(int axis) { - // if (view != null) { - // return view.getResizeWeight(axis); - // } - // return 0; - // } - // - // /** - // * Sets the view size. - // * - // * @param width the width - // * @param height the height - // */ - // public void setSize(float width, float height) { - // if (view != null) { - // view.setSize(width, height); - // } - // } - // - // /** - // * Fetches the container hosting the view. This is useful for - // * things like scheduling a repaint, finding out the host - // * components font, etc. The default implementation - // * of this is to forward the query to the parent view. - // * - // * @return the container - // */ - // public Container getContainer() { - // return editor; - // } - // - // /** - // * Fetches the factory to be used for building the - // * various view fragments that make up the view that - // * represents the model. This is what determines - // * how the model will be represented. This is implemented - // * to fetch the factory provided by the associated - // * EditorKit unless that is null, in which case this - // * simply returns the BasicTextUI itself which allows - // * subclasses to implement a simple factory directly without - // * creating extra objects. - // * - // * @return the factory - // */ - // public ViewFactory getViewFactory() { - // EditorKit kit = getEditorKit(editor); - // ViewFactory f = kit.getViewFactory(); - // if (f != null) { - // return f; - // } - // return BasicTextUI.this; - // } - // - // private View view; - // - // } - - // /** - // * Handles updates from various places. If the model is changed, - // * this class unregisters as a listener to the old model and - // * registers with the new model. If the document model changes, - // * the change is forwarded to the root view. If the focus - // * accelerator changes, a new keystroke is registered to request - // * focus. - // */ - // class UpdateHandler implements PropertyChangeListener, DocumentListener, - // LayoutManager2, UIResource { - // - // // --- PropertyChangeListener methods ----------------------- - // - // /** - // * This method gets called when a bound property is changed. - // * We are looking for document changes on the editor. - // */ - // public final void propertyChange(PropertyChangeEvent evt) { - // Object oldValue = evt.getOldValue(); - // Object newValue = evt.getNewValue(); - // String propertyName = evt.getPropertyName(); - // if ((oldValue instanceof Document) || (newValue instanceof Document)) { - // if (oldValue != null) { - // ((Document)oldValue).removeDocumentListener(this); - // i18nView = false; - // } - // if (newValue != null) { - // ((Document)newValue).addDocumentListener(this); - // if ("document" == propertyName) { - // setView(null); - // BasicTextUI.this.propertyChange(evt); - // modelChanged(); - // return; - // } - // } - // modelChanged(); - // } - // if ("focusAccelerator" == propertyName) { - // updateFocusAcceleratorBinding(true); - // } else if ("componentOrientation" == propertyName) { - // // Changes in ComponentOrientation require the views to be - // // rebuilt. - // modelChanged(); - // } else if ("font" == propertyName) { - // modelChanged(); - // } else if ("dropLocation" == propertyName) { - // dropIndexChanged(); - // } else if ("editable" == propertyName) { - // updateCursor(); - // modelChanged(); - // } - // BasicTextUI.this.propertyChange(evt); - // } - // - // private void dropIndexChanged() { - // if (editor.getDropMode() == DropMode.USE_SELECTION) { - // return; - // } - // - // JTextComponent.DropLocation dropLocation = editor.getDropLocation(); - // - // if (dropLocation == null) { - // if (dropCaret != null) { - // dropCaret.deinstall(editor); - // editor.repaint(dropCaret); - // dropCaret = null; - // } - // } else { - // if (dropCaret == null) { - // dropCaret = new BasicCaret(); - // dropCaret.install(editor); - // dropCaret.setVisible(true); - // } - // - // dropCaret.setDot(dropLocation.getIndex(), - // dropLocation.getBias()); - // } - // } - // - // // --- DocumentListener methods ----------------------- - // - // /** - // * The insert notification. Gets sent to the root of the view structure - // * that represents the portion of the model being represented by the - // * editor. The factory is added as an argument to the update so that - // * the views can update themselves in a dynamic (not hardcoded) way. - // * - // * @param e The change notification from the currently associated - // * document. - // * @see DocumentListener#insertUpdate - // */ - // public final void insertUpdate(DocumentEvent e) { - // Document doc = e.getDocument(); - // Object o = doc.getProperty("i18n"); - // if (o instanceof Boolean) { - // Boolean i18nFlag = (Boolean) o; - // if (i18nFlag.booleanValue() != i18nView) { - // // i18n flag changed, rebuild the view - // i18nView = i18nFlag.booleanValue(); - // modelChanged(); - // return; - // } - // } - // - // // normal insert update - // Rectangle alloc = (painted) ? getVisibleEditorRect() : null; - // rootView.insertUpdate(e, alloc, rootView.getViewFactory()); - // } - // - // /** - // * The remove notification. Gets sent to the root of the view structure - // * that represents the portion of the model being represented by the - // * editor. The factory is added as an argument to the update so that - // * the views can update themselves in a dynamic (not hardcoded) way. - // * - // * @param e The change notification from the currently associated - // * document. - // * @see DocumentListener#removeUpdate - // */ - // public final void removeUpdate(DocumentEvent e) { - // Rectangle alloc = (painted) ? getVisibleEditorRect() : null; - // rootView.removeUpdate(e, alloc, rootView.getViewFactory()); - // } - // - // /** - // * The change notification. Gets sent to the root of the view structure - // * that represents the portion of the model being represented by the - // * editor. The factory is added as an argument to the update so that - // * the views can update themselves in a dynamic (not hardcoded) way. - // * - // * @param e The change notification from the currently associated - // * document. - // * @see DocumentListener#changeUpdate - // */ - // public final void changedUpdate(DocumentEvent e) { - // Rectangle alloc = (painted) ? getVisibleEditorRect() : null; - // rootView.changedUpdate(e, alloc, rootView.getViewFactory()); - // } - // - // // --- LayoutManager2 methods -------------------------------- - // - // /** - // * Adds the specified component with the specified name to - // * the layout. - // * @param name the component name - // * @param comp the component to be added - // */ - // public void addLayoutComponent(String name, Component comp) { - // // not supported - // } - // - // /** - // * Removes the specified component from the layout. - // * @param comp the component to be removed - // */ - // public void removeLayoutComponent(Component comp) { - // if (constraints != null) { - // // remove the constraint record - // constraints.remove(comp); - // } - // } - // - // /** - // * Calculates the preferred size dimensions for the specified - // * panel given the components in the specified parent container. - // * @param parent the component to be laid out - // * - // * @see #minimumLayoutSize - // */ - // public Dimension preferredLayoutSize(Container parent) { - // // should not be called (JComponent uses UI instead) - // return null; - // } - // - // /** - // * Calculates the minimum size dimensions for the specified - // * panel given the components in the specified parent container. - // * @param parent the component to be laid out - // * @see #preferredLayoutSize - // */ - // public Dimension minimumLayoutSize(Container parent) { - // // should not be called (JComponent uses UI instead) - // return null; - // } - // - // /** - // * Lays out the container in the specified panel. This is - // * implemented to position all components that were added - // * with a View object as a constraint. The current allocation - // * of the associated View is used as the location of the - // * component. - // *

    - // * A read-lock is acquired on the document to prevent the - // * view tree from being modified while the layout process - // * is active. - // * - // * @param parent the component which needs to be laid out - // */ - // public void layoutContainer(Container parent) { - // if ((constraints != null) && (! constraints.isEmpty())) { - // Rectangle alloc = getVisibleEditorRect(); - // if (alloc != null) { - // Document doc = editor.getDocument(); - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readLock(); - // } - // try { - // rootView.setSize(alloc.width, alloc.height); - // Enumeration components = constraints.keys(); - // while (components.hasMoreElements()) { - // Component comp = (Component) components.nextElement(); - // View v = (View) constraints.get(comp); - // Shape ca = calculateViewPosition(alloc, v); - // if (ca != null) { - // Rectangle compAlloc = (ca instanceof Rectangle) ? - // (Rectangle) ca : ca.getBounds(); - // comp.setBounds(compAlloc); - // } - // } - // } finally { - // if (doc instanceof AbstractDocument) { - // ((AbstractDocument)doc).readUnlock(); - // } - // } - // } - // } - // } - // - // /** - // * Find the Shape representing the given view. - // */ - // Shape calculateViewPosition(Shape alloc, View v) { - // int pos = v.getStartOffset(); - // View child = null; - // for (View parent = rootView; (parent != null) && (parent != v); parent = - // child) { - // int index = parent.getViewIndex(pos, Position.Bias.Forward); - // alloc = parent.getChildAllocation(index, alloc); - // child = parent.getView(index); - // } - // return (child != null) ? alloc : null; - // } - // - // /** - // * Adds the specified component to the layout, using the specified - // * constraint object. We only store those components that were added - // * with a constraint that is of type View. - // * - // * @param comp the component to be added - // * @param constraint where/how the component is added to the layout. - // */ - // public void addLayoutComponent(Component comp, Object constraint) { - // if (constraint instanceof View) { - // if (constraints == null) { - // constraints = new Hashtable(7); - // } - // constraints.put(comp, constraint); - // } - // } - // - // /** - // * Returns the maximum size of this component. - // * @see jsjava.awt.Component#getMinimumSize() - // * @see jsjava.awt.Component#getPreferredSize() - // * @see LayoutManager - // */ - // public Dimension maximumLayoutSize(Container target) { - // // should not be called (JComponent uses UI instead) - // return null; - // } - // - // /** - // * Returns the alignment along the x axis. This specifies how - // * the component would like to be aligned relative to other - // * components. The value should be a number between 0 and 1 - // * where 0 represents alignment along the origin, 1 is aligned - // * the furthest away from the origin, 0.5 is centered, etc. - // */ - // public float getLayoutAlignmentX(Container target) { - // return 0.5f; - // } - // - // /** - // * Returns the alignment along the y axis. This specifies how - // * the component would like to be aligned relative to other - // * components. The value should be a number between 0 and 1 - // * where 0 represents alignment along the origin, 1 is aligned - // * the furthest away from the origin, 0.5 is centered, etc. - // */ - // public float getLayoutAlignmentY(Container target) { - // return 0.5f; - // } - // - // /** - // * Invalidates the layout, indicating that if the layout manager - // * has cached information it should be discarded. - // */ - // public void invalidateLayout(Container target) { - // } - // - // /** - // * The "layout constraints" for the LayoutManager2 implementation. - // * These are View objects for those components that are represented - // * by a View in the View tree. - // */ - // private Hashtable constraints; - // - // private boolean i18nView = false; - // } - - /** - * Wrapper for text actions to return isEnabled false in case editor is non - * editable - */ - class TextActionWrapper extends TextAction { - public TextActionWrapper(TextAction action) { - super((String) action.getValue(Action.NAME)); - this.action = action; - } - - /** - * The operation to perform when this action is triggered. - * - * @param e - * the action event - */ - public void actionPerformed(ActionEvent e) { - action.actionPerformed(e); - } - - public boolean isEnabled() { - return (editor == null || editor.isEditable()) ? action.isEnabled() - : false; - } - - TextAction action = null; - } - - /** - * Registered in the ActionMap. - */ - class FocusAction extends AbstractAction { - - public void actionPerformed(ActionEvent e) { - editor.requestFocus(); - } - - public boolean isEnabled() { - return editor.isEditable(); - } - } - - boolean handleEnter(int eventType) { - return false; - } - - String bgcolor0; - - public void setEditable(boolean editable) { - - this.editable = editable; - if (domNode == null) - return; - if (c.isBackgroundSet()) - bgcolor0 = JSToolkit.getCSSColor(c.getBackground()); - if (editable) { - domNode.removeAttribute("readOnly"); - if (bgcolor0 != null) - DOMNode.setStyles(domNode, "background-color", bgcolor0); - } else { - DOMNode.setAttr(domNode, "readOnly", "true"); - if (c.isBackgroundSet()) { - bgcolor0 = JSToolkit.getCSSColor(c.getBackground()); - } else { - if (bgcolor0 == null) - bgcolor0 = domNode.getStyle("background-color"); - } - DOMNode.setStyles(domNode, "background-color", "rgba(0,0,0,0)"); - } - - } - - // private static DragListener getDragListener() { - // synchronized(DragListener.class) { - // DragListener listener = - // (DragListener)AppContext.getAppContext(). - // get(DragListener.class); - // - // if (listener == null) { - // listener = new DragListener(); - // AppContext.getAppContext().put(DragListener.class, listener); - // } - // - // return listener; - // } - // } - // - // /** - // * Listens for mouse events for the purposes of detecting drag gestures. - // * BasicTextUI will maintain one of these per AppContext. - // */ - // static class DragListener extends MouseInputAdapter - // implements BeforeDrag { - // - // private boolean dragStarted; - // - // public void dragStarting(MouseEvent me) { - // dragStarted = true; - // } - // - // public void mousePressed(MouseEvent e) { - // JTextComponent c = (JTextComponent)e.getSource(); - // if (c.getDragEnabled()) { - // dragStarted = false; - // if (isDragPossible(e) && DragRecognitionSupport.mousePressed(e)) { - // e.consume(); - // } - // } - // } - // - // public void mouseReleased(MouseEvent e) { - // JTextComponent c = (JTextComponent)e.getSource(); - // if (c.getDragEnabled()) { - // if (dragStarted) { - // e.consume(); - // } - // - // DragRecognitionSupport.mouseReleased(e); - // } - // } - // - // public void mouseDragged(MouseEvent e) { - // JTextComponent c = (JTextComponent)e.getSource(); - // if (c.getDragEnabled()) { - // if (dragStarted || DragRecognitionSupport.mouseDragged(e, this)) { - // e.consume(); - // } - // } - // } - // - // /** - // * Determines if the following are true: - // *

      - // *
    • the component is enabled - // *
    • the press event is located over a selection - // *
    - // */ - // protected boolean isDragPossible(MouseEvent e) { - // JTextComponent c = (JTextComponent)e.getSource(); - // if (c.isEnabled()) { - // Caret caret = c.getCaret(); - // int dot = caret.getDot(); - // int mark = caret.getMark(); - // if (dot != mark) { - // Point p = new Point(e.getX(), e.getY()); - // int pos = c.viewToModel(p); - // - // int p0 = Math.min(dot, mark); - // int p1 = Math.max(dot, mark); - // if ((pos >= p0) && (pos < p1)) { - // return true; - // } - // } - // } - // return false; - // } - // } - - // static class TextTransferHandler extends TransferHandler implements - // UIResource { - // - // private JTextComponent exportComp; - // private boolean shouldRemove; - // private int p0; - // private int p1; - // - // /** - // * Whether or not this is a drop using - // * DropMode.INSERT. - // */ - // private boolean modeBetween = false; - // - // /** - // * Whether or not this is a drop. - // */ - // private boolean isDrop = false; - // - // /** - // * The drop action. - // */ - // private int dropAction = MOVE; - // - // /** - // * The drop bias. - // */ - // private Position.Bias dropBias; - // - // /** - // * Try to find a flavor that can be used to import a Transferable. - // * The set of usable flavors are tried in the following order: - // *
      - // *
    1. First, an attempt is made to find a flavor matching the content type - // * of the EditorKit for the component. - // *
    2. Second, an attempt to find a text/plain flavor is made. - // *
    3. Third, an attempt to find a flavor representing a String reference - // * in the same VM is made. - // *
    4. Lastly, DataFlavor.stringFlavor is searched for. - // *
    - // */ - // protected DataFlavor getImportFlavor(DataFlavor[] flavors, JTextComponent - // c) { - // DataFlavor plainFlavor = null; - // DataFlavor refFlavor = null; - // DataFlavor stringFlavor = null; - // - // if (c instanceof JEditorPane) { - // for (int i = 0; i < flavors.length; i++) { - // String mime = flavors[i].getMimeType(); - // if (mime.startsWith(((JEditorPane)c).getEditorKit().getContentType())) { - // return flavors[i]; - // } else if (plainFlavor == null && mime.startsWith("text/plain")) { - // plainFlavor = flavors[i]; - // } else if (refFlavor == null && - // mime.startsWith("application/x-java-jvm-local-objectref") - // && flavors[i].getRepresentationClass() == jsjava.lang.String.class) { - // refFlavor = flavors[i]; - // } else if (stringFlavor == null && - // flavors[i].equals(DataFlavor.stringFlavor)) { - // stringFlavor = flavors[i]; - // } - // } - // if (plainFlavor != null) { - // return plainFlavor; - // } else if (refFlavor != null) { - // return refFlavor; - // } else if (stringFlavor != null) { - // return stringFlavor; - // } - // return null; - // } - // - // - // for (int i = 0; i < flavors.length; i++) { - // String mime = flavors[i].getMimeType(); - // if (mime.startsWith("text/plain")) { - // return flavors[i]; - // } else if (refFlavor == null && - // mime.startsWith("application/x-java-jvm-local-objectref") - // && flavors[i].getRepresentationClass() == jsjava.lang.String.class) { - // refFlavor = flavors[i]; - // } else if (stringFlavor == null && - // flavors[i].equals(DataFlavor.stringFlavor)) { - // stringFlavor = flavors[i]; - // } - // } - // if (refFlavor != null) { - // return refFlavor; - // } else if (stringFlavor != null) { - // return stringFlavor; - // } - // return null; - // } - // - // /** - // * Import the given stream data into the text component. - // */ - // protected void handleReaderImport(Reader in, JTextComponent c, boolean - // useRead) - // throws BadLocationException, IOException { - // if (useRead) { - // int startPosition = c.getSelectionStart(); - // int endPosition = c.getSelectionEnd(); - // int length = endPosition - startPosition; - // EditorKit kit = c.getUI().getEditorKit(c); - // Document doc = c.getDocument(); - // if (length > 0) { - // doc.remove(startPosition, length); - // } - // kit.read(in, doc, startPosition); - // } else { - // char[] buff = new char[1024]; - // int nch; - // boolean lastWasCR = false; - // int last; - // StringBuffer sbuff = null; - // - // // Read in a block at a time, mapping \r\n to \n, as well as single - // // \r to \n. - // while ((nch = in.read(buff, 0, buff.length)) != -1) { - // if (sbuff == null) { - // sbuff = new StringBuffer(nch); - // } - // last = 0; - // for(int counter = 0; counter < nch; counter++) { - // switch(buff[counter]) { - // case '\r': - // if (lastWasCR) { - // if (counter == 0) { - // sbuff.append('\n'); - // } else { - // buff[counter - 1] = '\n'; - // } - // } else { - // lastWasCR = true; - // } - // break; - // case '\n': - // if (lastWasCR) { - // if (counter > (last + 1)) { - // sbuff.append(buff, last, counter - last - 1); - // } - // // else nothing to do, can skip \r, next write will - // // write \n - // lastWasCR = false; - // last = counter; - // } - // break; - // default: - // if (lastWasCR) { - // if (counter == 0) { - // sbuff.append('\n'); - // } else { - // buff[counter - 1] = '\n'; - // } - // lastWasCR = false; - // } - // break; - // } - // } - // if (last < nch) { - // if (lastWasCR) { - // if (last < (nch - 1)) { - // sbuff.append(buff, last, nch - last - 1); - // } - // } else { - // sbuff.append(buff, last, nch - last); - // } - // } - // } - // if (lastWasCR) { - // sbuff.append('\n'); - // } - // c.replaceSelection(sbuff != null ? sbuff.toString() : ""); - // } - // } - // - // // --- TransferHandler methods ------------------------------------ - // - // /** - // * This is the type of transfer actions supported by the source. Some models - // are - // * not mutable, so a transfer operation of COPY only should - // * be advertised in that case. - // * - // * @param c The component holding the data to be transfered. This - // * argument is provided to enable sharing of TransferHandlers by - // * multiple components. - // * @return This is implemented to return NONE if the component is a - // JPasswordField - // * since exporting data via user gestures is not allowed. If the text - // component is - // * editable, COPY_OR_MOVE is returned, otherwise just COPY is allowed. - // */ - // public int getSourceActions(JComponent c) { - // if (c instanceof JPasswordField && - // c.getClientProperty("JPasswordField.cutCopyAllowed") != - // Boolean.TRUE) { - // return NONE; - // } - // - // return ((JTextComponent)c).isEditable() ? COPY_OR_MOVE : COPY; - // } - // - // /** - // * Create a Transferable to use as the source for a data transfer. - // * - // * @param comp The component holding the data to be transfered. This - // * argument is provided to enable sharing of TransferHandlers by - // * multiple components. - // * @return The representation of the data to be transfered. - // * - // */ - // protected Transferable createTransferable(JComponent comp) { - // exportComp = (JTextComponent)comp; - // shouldRemove = true; - // p0 = exportComp.getSelectionStart(); - // p1 = exportComp.getSelectionEnd(); - // return (p0 != p1) ? (new TextTransferable(exportComp, p0, p1)) : null; - // } - // - // /** - // * This method is called after data has been exported. This method should - // remove - // * the data that was transfered if the action was MOVE. - // * - // * @param source The component that was the source of the data. - // * @param data The data that was transferred or possibly null - // * if the action is NONE. - // * @param action The actual action that was performed. - // */ - // protected void exportDone(JComponent source, Transferable data, int action) - // { - // // only remove the text if shouldRemove has not been set to - // // false by importData and only if the action is a move - // if (shouldRemove && action == MOVE) { - // TextTransferable t = (TextTransferable)data; - // t.removeText(); - // } - // - // exportComp = null; - // } - // - // public boolean importData(TransferSupport support) { - // isDrop = support.isDrop(); - // - // if (isDrop) { - // modeBetween = - // ((JTextComponent)support.getComponent()).getDropMode() == DropMode.INSERT; - // - // dropBias = - // ((JTextComponent.DropLocation)support.getDropLocation()).getBias(); - // - // dropAction = support.getDropAction(); - // } - // - // try { - // return super.importData(support); - // } finally { - // isDrop = false; - // modeBetween = false; - // dropBias = null; - // dropAction = MOVE; - // } - // } - // - // /** - // * This method causes a transfer to a component from a clipboard or a - // * DND drop operation. The Transferable represents the data to be - // * imported into the component. - // * - // * @param comp The component to receive the transfer. This - // * argument is provided to enable sharing of TransferHandlers by - // * multiple components. - // * @param t The data to import - // * @return true if the data was inserted into the component, false - // otherwise. - // */ - // public boolean importData(JComponent comp, Transferable t) { - // JTextComponent c = (JTextComponent)comp; - // - // int pos = modeBetween - // ? ((JTextComponent.DropLocation)c.getDropLocation()).getIndex() - // : c.getCaretPosition(); - // - // // if we are importing to the same component that we exported from - // // then don't actually do anything if the drop location is inside - // // the drag location and set shouldRemove to false so that exportDone - // // knows not to remove any data - // if (dropAction == MOVE && c == exportComp && pos >= p0 && pos <= p1) { - // shouldRemove = false; - // return true; - // } - // - // boolean imported = false; - // DataFlavor importFlavor = getImportFlavor(t.getTransferDataFlavors(), c); - // if (importFlavor != null) { - // try { - // boolean useRead = false; - // if (comp instanceof JEditorPane) { - // JEditorPane ep = (JEditorPane)comp; - // if (!ep.getContentType().startsWith("text/plain") && - // importFlavor.getMimeType().startsWith(ep.getContentType())) { - // useRead = true; - // } - // } - // InputContext ic = c.getInputContext(); - // if (ic != null) { - // ic.endComposition(); - // } - // Reader r = importFlavor.getReaderForText(t); - // - // if (modeBetween) { - // Caret caret = c.getCaret(); - // if (caret instanceof DefaultCaret) { - // ((DefaultCaret)caret).setDot(pos, dropBias); - // } else { - // c.setCaretPosition(pos); - // } - // } - // - // handleReaderImport(r, c, useRead); - // - // if (isDrop) { - // c.requestFocus(); - // Caret caret = c.getCaret(); - // if (caret instanceof DefaultCaret) { - // int newPos = caret.getDot(); - // Position.Bias newBias = ((DefaultCaret)caret).getDotBias(); - // - // ((DefaultCaret)caret).setDot(pos, dropBias); - // ((DefaultCaret)caret).moveDot(newPos, newBias); - // } else { - // c.select(pos, c.getCaretPosition()); - // } - // } - // - // imported = true; - // } catch (UnsupportedFlavorException ufe) { - // } catch (BadLocationException ble) { - // } catch (IOException ioe) { - // } - // } - // return imported; - // } - // - // /** - // * This method indicates if a component would accept an import of the given - // * set of data flavors prior to actually attempting to import it. - // * - // * @param comp The component to receive the transfer. This - // * argument is provided to enable sharing of TransferHandlers by - // * multiple components. - // * @param flavors The data formats available - // * @return true if the data can be inserted into the component, false - // otherwise. - // */ - // public boolean canImport(JComponent comp, DataFlavor[] flavors) { - // JTextComponent c = (JTextComponent)comp; - // if (!(c.isEditable() && c.isEnabled())) { - // return false; - // } - // return (getImportFlavor(flavors, c) != null); - // } - // - // /** - // * A possible implementation of the Transferable interface - // * for text components. For a JEditorPane with a rich set - // * of EditorKit implementations, conversions could be made - // * giving a wider set of formats. This is implemented to - // * offer up only the active content type and text/plain - // * (if that is not the active format) since that can be - // * extracted from other formats. - // */ - // static class TextTransferable extends BasicTransferable { - // - // TextTransferable(JTextComponent c, int start, int end) { - // super(null, null); - // - // this.c = c; - // - // Document doc = c.getDocument(); - // - // try { - // p0 = doc.createPosition(start); - // p1 = doc.createPosition(end); - // - // plainData = c.getSelectedText(); - // - // if (c instanceof JEditorPane) { - // JEditorPane ep = (JEditorPane)c; - // - // mimeType = ep.getContentType(); - // - // if (mimeType.startsWith("text/plain")) { - // return; - // } - // - // StringWriter sw = new StringWriter(p1.getOffset() - p0.getOffset()); - // ep.getEditorKit().write(sw, doc, p0.getOffset(), p1.getOffset() - - // p0.getOffset()); - // - // if (mimeType.startsWith("text/html")) { - // htmlData = sw.toString(); - // } else { - // richText = sw.toString(); - // } - // } - // } catch (BadLocationException ble) { - // } catch (IOException ioe) { - // } - // } - // - // void removeText() { - // if ((p0 != null) && (p1 != null) && (p0.getOffset() != p1.getOffset())) { - // try { - // Document doc = c.getDocument(); - // doc.remove(p0.getOffset(), p1.getOffset() - p0.getOffset()); - // } catch (BadLocationException e) { - // } - // } - // } - // - // // ---- EditorKit other than plain or HTML text ----------------------- - // - // /** - // * If the EditorKit is not for text/plain or text/html, that format - // * is supported through the "richer flavors" part of BasicTransferable. - // */ - // protected DataFlavor[] getRicherFlavors() { - // if (richText == null) { - // return null; - // } - // - // try { - // DataFlavor[] flavors = new DataFlavor[3]; - // flavors[0] = new DataFlavor(mimeType + ";class=java.lang.String"); - // flavors[1] = new DataFlavor(mimeType + ";class=java.io.Reader"); - // flavors[2] = new DataFlavor(mimeType + - // ";class=java.io.InputStream;charset=unicode"); - // return flavors; - // } catch (ClassNotFoundException cle) { - // // fall through to unsupported (should not happen) - // } - // - // return null; - // } - // - // /** - // * The only richer format supported is the file list flavor - // */ - // protected Object getRicherData(DataFlavor flavor) throws - // UnsupportedFlavorException { - // if (richText == null) { - // return null; - // } - // - // if (String.class.equals(flavor.getRepresentationClass())) { - // return richText; - // } else if (Reader.class.equals(flavor.getRepresentationClass())) { - // return new StringReader(richText); - // } else if (InputStream.class.equals(flavor.getRepresentationClass())) { - // return new StringBufferInputStream(richText); - // } - // throw new UnsupportedFlavorException(flavor); - // } - // - // Position p0; - // Position p1; - // String mimeType; - // String richText; - // JTextComponent c; - // } - // - // } - - // /** - // * Creates a new UI. - // */ - // public JSTextUI() { - // // painted = false; - // } - // - // /** - // * Creates the object to use for a caret. By default an - // * instance of BasicCaret is created. This method - // * can be redefined to provide something else that implements - // * the InputPosition interface or a subclass of JCaret. - // * - // * @return the caret object - // */ - // protected Caret createCaret() { - // return new BasicCaret(); - // } - // - // /** - // * Creates the object to use for adding highlights. By default - // * an instance of BasicHighlighter is created. This method - // * can be redefined to provide something else that implements - // * the Highlighter interface or a subclass of DefaultHighlighter. - // * - // * @return the highlighter - // */ - // protected Highlighter createHighlighter() { - // return new BasicHighlighter(); - // } - // - // /** - // * Fetches the name of the keymap that will be installed/used - // * by default for this UI. This is implemented to create a - // * name based upon the classname. The name is the the name - // * of the class with the package prefix removed. - // * - // * @return the name - // */ - // protected String getKeymapName() { - // String nm = getClass().getName(); - // int index = nm.lastIndexOf('.'); - // if (index >= 0) { - // nm = nm.substring(index+1, nm.length()); - // } - // return nm; - // } - // - // /** - // * Creates the keymap to use for the text component, and installs - // * any necessary bindings into it. By default, the keymap is - // * shared between all instances of this type of TextUI. The - // * keymap has the name defined by the getKeymapName method. If the - // * keymap is not found, then DEFAULT_KEYMAP from JTextComponent is used. - // *

    - // * The set of bindings used to create the keymap is fetched - // * from the UIManager using a key formed by combining the - // * {@link #getPropertyPrefix} method - // * and the string .keyBindings. The type is expected - // * to be JTextComponent.KeyBinding[]. - // * - // * @return the keymap - // * @see #getKeymapName - // * @see jsjavax.swing.text.JTextComponent - // */ - // protected Keymap createKeymap() { - // String nm = getKeymapName(); - // Keymap map = JTextComponent.getKeymap(nm); - // if (map == null) { - // Keymap parent = JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP); - // map = JTextComponent.addKeymap(nm, parent); - // String prefix = getPropertyPrefix(); - // Object o = DefaultLookup.get(editor, this, - // prefix + ".keyBindings"); - // if ((o != null) && (o instanceof JTextComponent.KeyBinding[])) { - // JTextComponent.KeyBinding[] bindings = (JTextComponent.KeyBinding[]) o; - // JTextComponent.loadKeymap(map, bindings, getComponent().getActions()); - // } - // } - // return map; - // } - // - // /** - // * This method gets called when a bound property is changed - // * on the associated JTextComponent. This is a hook - // * which UI implementations may change to reflect how the - // * UI displays bound properties of JTextComponent subclasses. - // * This is implemented to do nothing (i.e. the response to - // * properties in JTextComponent itself are handled prior - // * to calling this method). - // * - // * This implementation updates the background of the text - // * component if the editable and/or enabled state changes. - // * - // * @param evt the property change event - // */ - // protected void propertyChange(PropertyChangeEvent evt) { - // if (evt.getPropertyName().equals("editable") || - // evt.getPropertyName().equals("enabled")) { - // - // updateBackground((JTextComponent)evt.getSource()); - // } - // } - // - // /** - // * Updates the background of the text component based on whether the - // * text component is editable and/or enabled. - // * - // * @param c the JTextComponent that needs its background color updated - // */ - // private void updateBackground(JTextComponent c) { - // // This is a temporary workaround. - // // This code does not correctly deal with Synth (Synth doesn't use - // // properties like this), nor does it deal with the situation where - // // the developer grabs the color from a JLabel and sets it as - // // the background for a JTextArea in all look and feels. The problem - // // scenario results if the Color obtained for the Label and TextArea - // // is ==, which is the case for the windows look and feel. - // // Until an appropriate solution is found, the code is being - // // reverted to what it was before the original fix. - // if (this instanceof sun.swing.plaf.synth.SynthUI || - // (c instanceof JTextArea)) { - // return; - // } - // Color background = c.getBackground(); - // if (background instanceof UIResource) { - // String prefix = getPropertyPrefix(); - // - // Color disabledBG = - // DefaultLookup.getColor(c, this, prefix + ".disabledBackground", null); - // Color inactiveBG = - // DefaultLookup.getColor(c, this, prefix + ".inactiveBackground", null); - // Color bg = - // DefaultLookup.getColor(c, this, prefix + ".background", null); - // - // /* In an ideal situation, the following check would not be necessary - // * and we would replace the color any time the previous color was a - // * UIResouce. However, it turns out that there is existing code that - // * uses the following inadvisable pattern to turn a text area into - // * what appears to be a multi-line label: - // * - // * JLabel label = new JLabel(); - // * JTextArea area = new JTextArea(); - // * area.setBackground(label.getBackground()); - // * area.setEditable(false); - // * - // * JLabel's default background is a UIResource. As such, just - // * checking for UIResource would have us always changing the - // * background away from what the developer wanted. - // * - // * Therefore, for JTextArea/JEditorPane, we'll additionally check - // * that the color we're about to replace matches one that was - // * installed by us from the UIDefaults. - // */ - // if ((c instanceof JTextArea || c instanceof JEditorPane) - // && background != disabledBG - // && background != inactiveBG - // && background != bg) { - // - // return; - // } - // - // Color newColor = null; - // if (!c.isEnabled()) { - // newColor = disabledBG; - // } - // if (newColor == null && !c.isEditable()) { - // newColor = inactiveBG; - // } - // if (newColor == null) { - // newColor = bg; - // } - // if (newColor != null && newColor != background) { - // c.setBackground(newColor); - // } - // } - // } - // - // /** - // * Gets the name used as a key to look up properties through the - // * UIManager. This is used as a prefix to all the standard - // * text properties. - // * - // * @return the name - // */ - // protected abstract String getPropertyPrefix(); - -} +/* + * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package swingjs.plaf; + +import swingjs.JSToolkit; +import swingjs.api.DOMNode; +import swingjs.api.JQueryObject; +import swingjs.api.JSFunction; +import jsjava.awt.Dimension; +import jsjava.awt.Insets; +import jsjava.awt.LayoutManager; +import jsjava.awt.event.ActionEvent; +import jsjavax.swing.AbstractAction; +import jsjavax.swing.Action; +import jsjavax.swing.ActionMap; +import jsjavax.swing.InputMap; +import jsjavax.swing.JComponent; +import jsjavax.swing.SwingUtilities; +import jsjavax.swing.UIManager; +import jsjavax.swing.plaf.ActionMapUIResource; +import jsjavax.swing.plaf.ComponentUI; +import jsjavax.swing.plaf.InputMapUIResource; +import jsjavax.swing.plaf.TextUI; +import jsjavax.swing.plaf.UIResource; +import jsjavax.swing.text.Caret; +import jsjavax.swing.text.DefaultEditorKit; +import jsjavax.swing.text.EditorKit; +import jsjavax.swing.text.JTextComponent; +import jsjavax.swing.text.TextAction; +//import jsjava.awt.KeyboardFocusManager; +//import jsjava.awt.datatransfer.DataFlavor; +//import jsjava.awt.datatransfer.Transferable; +//import jsjava.awt.datatransfer.UnsupportedFlavorException; +//import jsjava.awt.im.InputContext; +//import jsjava.io.IOException; +//import jsjava.io.InputStream; +//import jsjava.io.Reader; +//import jsjava.io.StringBufferInputStream; +//import jsjava.io.StringReader; +//import jsjava.io.StringWriter; +//import jsjavax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag; + +/** + *

    + * Basis of a text components look-and-feel. This provides the basic editor view + * and controller services that may be useful when creating a look-and-feel for + * an extension of JTextComponent. + *

    + * Most state is held in the associated JTextComponent as bound + * properties, and the UI installs default values for the various properties. + * This default will install something for all of the properties. Typically, a + * LAF implementation will do more however. At a minimum, a LAF would generally + * install key bindings. + *

    + * This class also provides some concurrency support if the + * Document associated with the JTextComponent is a subclass of + * AbstractDocument. Access to the View (or View hierarchy) is + * serialized between any thread mutating the model and the Swing event thread + * (which is expected to render, do model/view coordinate translation, etc). + * Any access to the root view should first + * acquire a read-lock on the AbstractDocument and release that lock + * in a finally block. + *

    + * An important method to define is the {@link #getPropertyPrefix} method which + * is used as the basis of the keys used to fetch defaults from the UIManager. + * The string should reflect the type of TextUI (eg. TextField, TextArea, etc) + * without the particular LAF part of the name (eg Metal, Motif, etc). + *

    + * To build a view of the model, one of the following strategies can be + * employed. + *

      + *
    1. + * One strategy is to simply redefine the ViewFactory interface in the UI. By + * default, this UI itself acts as the factory for View implementations. This is + * useful for simple factories. To do this reimplement the {@link #create} + * method. + *
    2. + * A common strategy for creating more complex types of documents is to have the + * EditorKit implementation return a factory. Since the EditorKit ties all of + * the pieces necessary to maintain a type of document, the factory is typically + * an important part of that and should be produced by the EditorKit + * implementation. + *
    + *

    + * Warning: Serialized objects of this class will not be + * compatible with future Swing releases. The current serialization support is + * appropriate for short term storage or RMI between applications running the + * same version of Swing. As of 1.4, support for long term storage of all + * JavaBeansTM has been added to the + * java.beans package. Please see {@link jsjava.beans.XMLEncoder}. + * + * @author Timothy Prinzing + * @author Shannon Hickey (drag and drop) + */ +public abstract class JSTextUI extends JSComponentUI {// implements {ViewFactory + // { + @SuppressWarnings("unused") + protected void setFocusable() { + JQueryObject node = $(focusNode); + Object me = this; + + /** + * @j2sNative + * + * node.focus(function() {me.notifyFocus(true)}); + * node.blur(function() {me.notifyFocus(false)}); + */ + {} + } + + + protected String getComponentText() { + return currentText = ((JTextComponent) c).getText(); + } + + protected void bindKeys(DOMNode domNode) { + JSFunction f = null; + JSEventHandler me = this; + if (!((JTextComponent) c).isEditable()) + return; + /** + * @j2sNative + * + * f = function(event) { me.handleJSEvent(me.domNode, 401, event) + * } + */ + { + System.out.println(me); + } + $(domNode).bind("keydown keypress keyup", f); + + // TODO Auto-generated method stub + + } + + /** + * Initializes component properties, e.g. font, foreground, background, caret + * color, selection color, selected text color, disabled text color, and + * border color. The font, foreground, and background properties are only set + * if their current value is either null or a UIResource, other properties are + * set if the current value is null. + * + * @see #uninstallDefaults + * @see #installUI + */ + protected void installDefaults() { + // String prefix = getPropertyPrefix(); + // Font f = editor.getFont(); + // if ((f == null) || (f instanceof UIResource)) { + // editor.setFont(UIManager.getFont(prefix + ".font")); + // } + // + // Color bg = editor.getBackground(); + // if ((bg == null) || (bg instanceof UIResource)) { + // editor.setBackground(UIManager.getColor(prefix + ".background")); + // } + // + // Color fg = editor.getForeground(); + // if ((fg == null) || (fg instanceof UIResource)) { + // editor.setForeground(UIManager.getColor(prefix + ".foreground")); + // } + // + // Color color = editor.getCaretColor(); + // if ((color == null) || (color instanceof UIResource)) { + // editor.setCaretColor(UIManager.getColor(prefix + ".caretForeground")); + // } + // + // Color s = editor.getSelectionColor(); + // if ((s == null) || (s instanceof UIResource)) { + // editor.setSelectionColor(UIManager.getColor(prefix + + // ".selectionBackground")); + // } + // + // Color sfg = editor.getSelectedTextColor(); + // if ((sfg == null) || (sfg instanceof UIResource)) { + // editor.setSelectedTextColor(UIManager.getColor(prefix + + // ".selectionForeground")); + // } + // + // Color dfg = editor.getDisabledTextColor(); + // if ((dfg == null) || (dfg instanceof UIResource)) { + // editor.setDisabledTextColor(UIManager.getColor(prefix + + // ".inactiveForeground")); + // } + // + // Border b = editor.getBorder(); + // if ((b == null) || (b instanceof UIResource)) { + // editor.setBorder(UIManager.getBorder(prefix + ".border")); + // } + // + // Insets margin = editor.getMargin(); + // if (margin == null || margin instanceof UIResource) { + // editor.setMargin(UIManager.getInsets(prefix + ".margin")); + // } + // + // updateCursor(); + } + + private void installDefaults2() { + // editor.addMouseListener(dragListener); + // editor.addMouseMotionListener(dragListener); + // + // String prefix = getPropertyPrefix(); + + Caret caret = editor.getCaret(); + if (caret == null || caret instanceof UIResource) { + editor.setCaret(new JSCaret()); + } + // + // Highlighter highlighter = editor.getHighlighter(); + // if (highlighter == null || highlighter instanceof UIResource) { + // editor.setHighlighter(createHighlighter()); + // } + // + // TransferHandler th = editor.getTransferHandler(); + // if (th == null || th instanceof UIResource) { + // editor.setTransferHandler(getTransferHandler()); + // } + } + + /** + * called by JmolCore.js + * + * @return handled + */ + public boolean handleJSEvent(Object target, int eventType, Object jQueryEvent) { + System.out.println("Handling for " + id + " " + eventType + " " + + jQueryEvent); + return updateHandler.handleJSEvent(this, eventType, jQueryEvent); + } + + /** + * Sets the component properties that haven't been explicitly overridden to + * null. A property is considered overridden if its current value is not a + * UIResource. + * + * @see #installDefaults + * @see #uninstallUI + */ + protected void uninstallDefaults() { + // editor.removeMouseListener(dragListener); + // editor.removeMouseMotionListener(dragListener); + // + if (editor.getCaretColor() instanceof UIResource) { + editor.setCaretColor(null); + } + + if (editor.getSelectionColor() instanceof UIResource) { + editor.setSelectionColor(null); + } + + if (editor.getDisabledTextColor() instanceof UIResource) { + editor.setDisabledTextColor(null); + } + + if (editor.getSelectedTextColor() instanceof UIResource) { + editor.setSelectedTextColor(null); + } + + if (editor.getBorder() instanceof UIResource) { + editor.setBorder(null); + } + + if (editor.getMargin() instanceof UIResource) { + editor.setMargin(null); + } + + // if (editor.getCaret() instanceof UIResource) { + // editor.setCaret(null); + // } + // + // if (editor.getHighlighter() instanceof UIResource) { + // editor.setHighlighter(null); + // } + // + // if (editor.getTransferHandler() instanceof UIResource) { + // editor.setTransferHandler(null); + // } + // + // if (editor.getCursor() instanceof UIResource) { + // editor.setCursor(null); + // } + } + + protected void installKeyboardActions() { + // backward compatibility support... keymaps for the UI + // are now installed in the more friendly input map. + // editor.setKeymap(createKeymap()); + + InputMap km = getInputMap(); + if (km != null) { + SwingUtilities.replaceUIInputMap(editor, JComponent.WHEN_FOCUSED, km); + } + + ActionMap map = getActionMap(); + if (map != null) { + SwingUtilities.replaceUIActionMap(editor, map); + } + + // updateFocusAcceleratorBinding(false); + } + + /** + * Get the InputMap to use for the UI. + */ + InputMap getInputMap() { + InputMap map = new InputMapUIResource(); + + // InputMap shared = + // (InputMap)DefaultLookup.get(editor, this, + // getPropertyPrefix() + ".focusInputMap"); + // if (shared != null) { + // map.setParent(shared); + // } + return map; + } + + // /** + // * Invoked when the focus accelerator changes, this will update the + // * key bindings as necessary. + // */ + // void updateFocusAcceleratorBinding(boolean changed) { + // char accelerator = editor.getFocusAccelerator(); + // + // if (changed || accelerator != '\0') { + // InputMap km = SwingUtilities.getUIInputMap + // (editor, JComponent.WHEN_IN_FOCUSED_WINDOW); + // + // if (km == null && accelerator != '\0') { + // km = new ComponentInputMapUIResource(editor); + // SwingUtilities.replaceUIInputMap(editor, JComponent. + // WHEN_IN_FOCUSED_WINDOW, km); + // ActionMap am = getActionMap(); + // SwingUtilities.replaceUIActionMap(editor, am); + // } + // if (km != null) { + // km.clear(); + // if (accelerator != '\0') { + // km.put(KeyStroke.getKeyStroke(accelerator, + // ActionEvent.ALT_MASK), + // "requestFocus"); + // } + // } + // } + // } + // + // + // /** + // * Invoked when editable property is changed. + // * + // * removing 'TAB' and 'SHIFT-TAB' from traversalKeysSet in case + // * editor is editable + // * adding 'TAB' and 'SHIFT-TAB' to traversalKeysSet in case + // * editor is non editable + // */ + // + // void updateFocusTraversalKeys() { + // /* + // * Fix for 4514331 Non-editable JTextArea and similar + // * should allow Tab to keyboard - accessibility + // */ + // EditorKit editorKit = getEditorKit(editor); + // if ( editorKit != null + // && editorKit instanceof DefaultEditorKit) { + // Set storedForwardTraversalKeys = editor. + // getFocusTraversalKeys(KeyboardFocusManager. + // FORWARD_TRAVERSAL_KEYS); + // Set storedBackwardTraversalKeys = editor. + // getFocusTraversalKeys(KeyboardFocusManager. + // BACKWARD_TRAVERSAL_KEYS); + // Set forwardTraversalKeys = + // new HashSet(storedForwardTraversalKeys); + // Set backwardTraversalKeys = + // new HashSet(storedBackwardTraversalKeys); + // if (editor.isEditable()) { + // forwardTraversalKeys. + // remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)); + // backwardTraversalKeys. + // remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, + // InputEvent.SHIFT_MASK)); + // } else { + // forwardTraversalKeys.add(KeyStroke. + // getKeyStroke(KeyEvent.VK_TAB, 0)); + // backwardTraversalKeys. + // add(KeyStroke. + // getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK)); + // } + // LookAndFeel.installProperty(editor, + // "focusTraversalKeysForward", + // forwardTraversalKeys); + // LookAndFeel.installProperty(editor, + // "focusTraversalKeysBackward", + // backwardTraversalKeys); + // } + // + // } + + // /** + // * As needed updates cursor for the target editor. + // */ + // private void updateCursor() { + // if ((! editor.isCursorSet()) + // || editor.getCursor() instanceof UIResource) { + // Cursor cursor = (editor.isEditable()) ? textCursor : null; + // editor.setCursor(cursor); + // } + // } + // + // /** + // * Returns the TransferHandler that will be installed if + // * their isn't one installed on the JTextComponent. + // */ + // TransferHandler getTransferHandler() { + // return defaultTransferHandler; + // } + // + /** + * Fetch an action map to use. + */ + ActionMap getActionMap() { + String mapName = classID + ".actionMap"; + ActionMap map = (ActionMap) UIManager.get(mapName); + if (map == null) { + map = createActionMap(); + if (map != null) { + UIManager.getLookAndFeelDefaults().put(mapName, map); + } + } + return map; + } + // ActionMap componentMap = new ActionMapUIResource(); + // componentMap.put("requestFocus", new FocusAction()); + // /* + // * fix for bug 4515750 + // * JTextField & non-editable JTextArea bind return key - default btn not + // accessible + // * + // * Wrap the return action so that it is only enabled when the + // * component is editable. This allows the default button to be + // * processed when the text component has focus and isn't editable. + // * + // */ + // if (getEditorKit(editor) instanceof DefaultEditorKit) { + // if (map != null) { + // Object obj = map.get(DefaultEditorKit.insertBreakAction); + // if (obj != null + // && obj instanceof DefaultEditorKit.InsertBreakAction) { + // Action action = new TextActionWrapper((TextAction)obj); + // componentMap.put(action.getValue(Action.NAME),action); + // } + // } + // } + // if (map != null) { + // componentMap.setParent(map); + // } + // return componentMap; + // } + // + /** + * Create a default action map. This is basically the set of actions found + * exported by the component. + */ + /** + * @return + */ + ActionMap createActionMap() { + ActionMap map = new ActionMapUIResource(); + Action[] actions = editor.getActions();//defaultKit.getActions(); // SwingJS was editor.getEditorKit().getActions() + // System.out.println("building map for UI: " + getPropertyPrefix()); + int n = actions.length; + for (int i = 0; i < n; i++) { + Action a = actions[i]; + map.put(a.getValue(Action.NAME), a); + // System.out.println(" " + a.getValue(Action.NAME)); + } + // map.put(TransferHandler.getCutAction().getValue(Action.NAME), + // TransferHandler.getCutAction()); + // map.put(TransferHandler.getCopyAction().getValue(Action.NAME), + // TransferHandler.getCopyAction()); + // map.put(TransferHandler.getPasteAction().getValue(Action.NAME), + // TransferHandler.getPasteAction()); + return map; + } + + protected void uninstallKeyboardActions() { + editor.setKeymap(null); + SwingUtilities.replaceUIInputMap(editor, JComponent.WHEN_IN_FOCUSED_WINDOW, + null); + SwingUtilities.replaceUIActionMap(editor, null); + } + + // /** + // * Paints a background for the view. This will only be + // * called if isOpaque() on the associated component is + // * true. The default is to paint the background color + // * of the component. + // * + // * @param g the graphics context + // */ + // protected void paintBackground(Graphics g) { + // g.setColor(editor.getBackground()); + // g.fillRect(0, 0, editor.getWidth(), editor.getHeight()); + // } + // + /** + * Fetches the text component associated with this UI implementation. This + * will be null until the ui has been installed. + * + * @return the editor component + */ + protected final JTextComponent getComponent() { + return editor; + } + + // /** + // * Flags model changes. + // * This is called whenever the model has changed. + // * It is implemented to rebuild the view hierarchy + // * to represent the default root element of the + // * associated model. + // */ + // protected void modelChanged() { + // // create a view hierarchy + // ViewFactory f = rootView.getViewFactory(); + // Document doc = editor.getDocument(); + // Element elem = doc.getDefaultRootElement(); + // setView(f.create(elem)); + // } + // + // /** + // * Sets the current root of the view hierarchy and calls invalidate(). + // * If there were any child components, they will be removed (i.e. + // * there are assumed to have come from components embedded in views). + // * + // * @param v the root view + // */ + // protected final void setView(View v) { + // rootView.setView(v); + // painted = false; + // editor.revalidate(); + // editor.repaint(); + // } + // + // /** + // * Paints the interface safely with a guarantee that + // * the model won't change from the view of this thread. + // * This does the following things, rendering from + // * back to front. + // *

      + // *
    1. + // * If the component is marked as opaque, the background + // * is painted in the current background color of the + // * component. + // *
    2. + // * The highlights (if any) are painted. + // *
    3. + // * The view hierarchy is painted. + // *
    4. + // * The caret is painted. + // *
    + // * + // * @param g the graphics context + // */ + // protected void paintSafely(Graphics g) { + // painted = true; + // Highlighter highlighter = editor.getHighlighter(); + // Caret caret = editor.getCaret(); + // + // // paint the background + // if (editor.isOpaque()) { + // paintBackground(g); + // } + // + // // paint the highlights + // if (highlighter != null) { + // highlighter.paint(g); + // } + // + // // paint the view hierarchy + // Rectangle alloc = getVisibleEditorRect(); + // if (alloc != null) { + // rootView.paint(g, alloc); + // } + // + // // paint the caret + // if (caret != null) { + // caret.paint(g); + // } + // + // if (dropCaret != null) { + // dropCaret.paint(g); + // } + // } + + // --- ComponentUI methods -------------------------------------------- + + TextListener updateHandler; + + /** + * Installs the UI for a component. This does the following things. + *
      + *
    1. + * Set the associated component to opaque (can be changed easily by a subclass + * or on JTextComponent directly), which is the most common case. This will + * cause the component's background color to be painted. + *
    2. + * Install the default caret and highlighter into the associated component. + *
    3. + * Attach to the editor and model. If there is no model, a default one is + * created. + *
    4. + * create the view factory and the view hierarchy used to represent the model. + *
    + * + * @param c + * the editor component + * @see ComponentUI#installUI + */ + protected void installJSUI() { + editor = (JTextComponent) c; + updateHandler = new TextListener(this, editor); + + // install defaults + installDefaults(); + installDefaults2(); + + // // This is a workaround as these should not override what synth has + // // set them to + // if (!(this instanceof sun.swing.plaf.synth.SynthUI)){ + // // common case is background painted... this can + // // easily be changed by subclasses or from outside + // // of the component. + // LookAndFeel.installProperty(editor, "opaque", Boolean.TRUE); + // LookAndFeel.installProperty(editor, "autoscrolls", Boolean.TRUE); + // } + // + // attach to the model and editor + // Document doc = editor.getDocument(); + // if (doc == null) { + // // no model, create a default one. This will + // // fire a notification to the updateHandler + // // which takes care of the rest. + // editor.setDocument(getEditorKit(editor).createDefaultDocument()); + // } else { + // // doc.addDocumentListener(updateHandler); + // // modelChanged(); + // } + + // install keymap + installListeners(editor); + installKeyboardActions(); + + // LayoutManager oldLayout = editor.getLayout(); + // if ((oldLayout == null) || (oldLayout instanceof UIResource)) { + // // by default, use default LayoutManger implementation that + // // will position the components associated with a View object. + // editor.setLayout(updateHandler); + // } + // + // updateBackground(editor); + } + + /** + * Deinstalls the UI for a component. This removes the listeners, uninstalls + * the highlighter, removes views, and nulls out the keymap. + * + * @param c + * the editor component + * @see ComponentUI#uninstallUI + */ + public void uninstallJSUI() { + // detach from the model + // editor.removePropertyChangeListener(updateHandler); + // editor.getDocument().removeDocumentListener(updateHandler); + + // view part + // painted = false; + uninstallDefaults(); + // rootView.setView(null); + c.removeAll(); + LayoutManager lm = c.getLayout(); + if (lm instanceof UIResource) { + c.setLayout(null); + } + + // controller part + uninstallKeyboardActions(); + uninstallListeners(editor); + + editor = null; + updateHandler = null; + } + + protected void installListeners(JTextComponent b) { + TextListener listener = updateHandler; + b.addMouseListener(listener); + b.addMouseMotionListener(listener); + b.addFocusListener(listener); + b.addPropertyChangeListener(listener); + // SwingJS there won't be a document yet; this is in constructor + // b.getDocument().addDocumentListener(listener); + } + + protected void uninstallListeners(JTextComponent b) { + TextListener listener = updateHandler; + b.removeMouseListener(listener); + b.removeMouseMotionListener(listener); + b.removeFocusListener(listener); + b.removePropertyChangeListener(listener); + b.getDocument().removeDocumentListener(listener); + } + + // /** + // * Superclass paints background in an uncontrollable way + // * (i.e. one might want an image tiled into the background). + // * To prevent this from happening twice, this method is + // * reimplemented to simply paint. + // *

    + // * NOTE: Superclass is also not thread-safe in + // * it's rendering of the background, although that's not + // * an issue with the default rendering. + // */ + // public void update(Graphics g, JComponent c) { + // paint(g, c); + // } + // + // /** + // * Paints the interface. This is routed to the + // * paintSafely method under the guarantee that + // * the model won't change from the view of this thread + // * while it's rendering (if the associated model is + // * derived from AbstractDocument). This enables the + // * model to potentially be updated asynchronously. + // * + // * @param g the graphics context + // * @param c the editor component + // */ + // public final void paint(Graphics g, JComponent c) { + // if ((rootView.getViewCount() > 0) && (rootView.getView(0) != null)) { + // Document doc = editor.getDocument(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // paintSafely(g); + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // } + // } + + // /** + // * Gets the preferred size for the editor component. If the component + // * has been given a size prior to receiving this request, it will + // * set the size of the view hierarchy to reflect the size of the component + // * before requesting the preferred size of the view hierarchy. This + // * allows formatted views to format to the current component size before + // * answering the request. Other views don't care about currently formatted + // * size and give the same answer either way. + // * + // * @param c the editor component + // * @return the size + // */ + // public Dimension getPreferredSize(JComponent c) { + // Dimension d = c.getSize(); + // // Document doc = editor.getDocument(); + // // Insets i = c.getInsets(); + // // + // // if (doc instanceof AbstractDocument) { + // // ((AbstractDocument)doc).readLock(); + // // } + // // try { + // // if ((d.width > (i.left + i.right)) && (d.height > (i.top + i.bottom))) { + // // rootView.setSize(d.width - i.left - i.right, d.height - i.top - + // i.bottom); + // // } + // // else if (d.width == 0 && d.height == 0) { + // // // Probably haven't been layed out yet, force some sort of + // // // initial sizing. + // // rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE); + // // } + // // d.width = (int) Math.min((long) rootView.getPreferredSpan(View.X_AXIS) + + // // (long) i.left + (long) i.right, Integer.MAX_VALUE); + // // d.height = (int) Math.min((long) rootView.getPreferredSpan(View.Y_AXIS) + // + + // // (long) i.top + (long) i.bottom, Integer.MAX_VALUE); + // // } finally { + // // if (doc instanceof AbstractDocument) { + // // ((AbstractDocument)doc).readUnlock(); + // // } + // // } + // return d; + // } + + /** + * Gets the minimum size for the editor component. + * + * @param c + * the editor component + * @return the size + */ + public Dimension getMinimumSize(JComponent c) { + Dimension d = getPreferredSize();// new Dimension(); + // Document doc = editor.getDocument(); + Insets i = c.getInsets(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + + d.width += i.left + i.right; + d.height += i.top + i.bottom; + + // d.width = (int) rootView.getMinimumSpan(View.X_AXIS) + i.left + i.right; + // d.height = (int) rootView.getMinimumSpan(View.Y_AXIS) + i.top + i.bottom; + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + return d; + } + + /** + * Gets the maximum size for the editor component. + * + * @param c + * the editor component + * @return the size + */ + public Dimension getMaximumSize(JComponent c) { + // SwingJS TODO + return getMinimumSize(c); + + // Document doc = editor.getDocument(); + // Insets i = c.getInsets(); + // Dimension d = new Dimension(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // d.width = (int) Math.min((long) rootView.getMaximumSpan(View.X_AXIS) + + // (long) i.left + (long) i.right, Integer.MAX_VALUE); + // d.height = (int) Math.min((long) rootView.getMaximumSpan(View.Y_AXIS) + + // (long) i.top + (long) i.bottom, Integer.MAX_VALUE); + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // return d; + } + + // ---- TextUI methods ------------------------------------------- + + // + // /** + // * Gets the allocation to give the root View. Due + // * to an unfortunate set of historical events this + // * method is inappropriately named. The Rectangle + // * returned has nothing to do with visibility. + // * The component must have a non-zero positive size for + // * this translation to be computed. + // * + // * @return the bounding box for the root view + // */ + // protected Rectangle getVisibleEditorRect() { + // Rectangle alloc = editor.getBounds(); + // if ((alloc.width > 0) && (alloc.height > 0)) { + // alloc.x = alloc.y = 0; + // Insets insets = editor.getInsets(); + // alloc.x += insets.left; + // alloc.y += insets.top; + // alloc.width -= insets.left + insets.right; + // alloc.height -= insets.top + insets.bottom; + // return alloc; + // } + // return null; + // } + // + // /** + // * Converts the given location in the model to a place in + // * the view coordinate system. + // * The component must have a non-zero positive size for + // * this translation to be computed. + // * + // * @param tc the text component for which this UI is installed + // * @param pos the local location in the model to translate >= 0 + // * @return the coordinates as a rectangle, null if the model is not painted + // * @exception BadLocationException if the given position does not + // * represent a valid location in the associated document + // * @see TextUI#modelToView + // */ + // public Rectangle modelToView(JTextComponent tc, int pos) throws + // BadLocationException { + // return modelToView(tc, pos, Position.Bias.Forward); + // } + // + // /** + // * Converts the given location in the model to a place in + // * the view coordinate system. + // * The component must have a non-zero positive size for + // * this translation to be computed. + // * + // * @param tc the text component for which this UI is installed + // * @param pos the local location in the model to translate >= 0 + // * @return the coordinates as a rectangle, null if the model is not painted + // * @exception BadLocationException if the given position does not + // * represent a valid location in the associated document + // * @see TextUI#modelToView + // */ + // public Rectangle modelToView(JTextComponent tc, int pos, Position.Bias + // bias) throws BadLocationException { + // Document doc = editor.getDocument(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // Rectangle alloc = getVisibleEditorRect(); + // if (alloc != null) { + // rootView.setSize(alloc.width, alloc.height); + // Shape s = rootView.modelToView(pos, alloc, bias); + // if (s != null) { + // return s.getBounds(); + // } + // } + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // return null; + // } + // + // /** + // * Converts the given place in the view coordinate system + // * to the nearest representative location in the model. + // * The component must have a non-zero positive size for + // * this translation to be computed. + // * + // * @param tc the text component for which this UI is installed + // * @param pt the location in the view to translate. This + // * should be in the same coordinate system as the mouse events. + // * @return the offset from the start of the document >= 0, + // * -1 if not painted + // * @see TextUI#viewToModel + // */ + // public int viewToModel(JTextComponent tc, Point pt) { + // return viewToModel(tc, pt, discardBias); + // } + // + // /** + // * Converts the given place in the view coordinate system + // * to the nearest representative location in the model. + // * The component must have a non-zero positive size for + // * this translation to be computed. + // * + // * @param tc the text component for which this UI is installed + // * @param pt the location in the view to translate. This + // * should be in the same coordinate system as the mouse events. + // * @return the offset from the start of the document >= 0, + // * -1 if the component doesn't yet have a positive size. + // * @see TextUI#viewToModel + // */ + // public int viewToModel(JTextComponent tc, Point pt, + // Position.Bias[] biasReturn) { + // int offs = -1; + // Document doc = editor.getDocument(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // Rectangle alloc = getVisibleEditorRect(); + // if (alloc != null) { + // rootView.setSize(alloc.width, alloc.height); + // offs = rootView.viewToModel(pt.x, pt.y, alloc, biasReturn); + // } + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // return offs; + // } + + // /** + // * {@inheritDoc} + // */ + // public int getNextVisualPositionFrom(JTextComponent t, int pos, + // Position.Bias b, int direction, Position.Bias[] biasRet) + // throws BadLocationException{ + // Document doc = editor.getDocument(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // if (painted) { + // Rectangle alloc = getVisibleEditorRect(); + // if (alloc != null) { + // rootView.setSize(alloc.width, alloc.height); + // } + // return rootView.getNextVisualPositionFrom(pos, b, alloc, direction, + // biasRet); + // } + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // return -1; + // } + // + // /** + // * Causes the portion of the view responsible for the + // * given part of the model to be repainted. Does nothing if + // * the view is not currently painted. + // * + // * @param tc the text component for which this UI is installed + // * @param p0 the beginning of the range >= 0 + // * @param p1 the end of the range >= p0 + // * @see TextUI#damageRange + // */ + // public void damageRange(JTextComponent tc, int p0, int p1) { + // damageRange(tc, p0, p1, Position.Bias.Forward, Position.Bias.Backward); + // } + // + // /** + // * Causes the portion of the view responsible for the + // * given part of the model to be repainted. + // * + // * @param p0 the beginning of the range >= 0 + // * @param p1 the end of the range >= p0 + // */ + // public void damageRange(JTextComponent t, int p0, int p1, + // Position.Bias p0Bias, Position.Bias p1Bias) { + // if (painted) { + // Rectangle alloc = getVisibleEditorRect(); + // if (alloc != null) { + // Document doc = t.getDocument(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // rootView.setSize(alloc.width, alloc.height); + // Shape toDamage = rootView.modelToView(p0, p0Bias, + // p1, p1Bias, alloc); + // Rectangle rect = (toDamage instanceof Rectangle) ? + // (Rectangle)toDamage : toDamage.getBounds(); + // editor.repaint(rect.x, rect.y, rect.width, rect.height); + // } catch (BadLocationException e) { + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // } + // } + // } + + /** + * Fetches the EditorKit for the UI. + * + * @param tc + * the text component for which this UI is installed + * @return the editor capabilities + * @see TextUI#getEditorKit + */ + public EditorKit getEditorKit(JTextComponent tc) { + return defaultKit; + } + + // /** + // * Fetches a View with the allocation of the associated + // * text component (i.e. the root of the hierarchy) that + // * can be traversed to determine how the model is being + // * represented spatially. + // *

    + // * NOTE:The View hierarchy can + // * be traversed from the root view, and other things + // * can be done as well. Things done in this way cannot + // * be protected like simple method calls through the TextUI. + // * Therefore, proper operation in the presence of concurrency + // * must be arranged by any logic that calls this method! + // * + // * + // * @param tc the text component for which this UI is installed + // * @return the view + // * @see TextUI#getRootView + // */ + // public View getRootView(JTextComponent tc) { + // return rootView; + // } + + // /** + // * Returns the string to be used as the tooltip at the passed in location. + // * This forwards the method onto the root View. + // * + // * @see jsjavax.swing.text.JTextComponent#getToolTipText + // * @see jsjavax.swing.text.View#getToolTipText + // * @since 1.4 + // */ + // public String getToolTipText(JTextComponent t, Point pt) { + // if (!painted) { + // return null; + // } + // Document doc = editor.getDocument(); + // String tt = null; + // Rectangle alloc = getVisibleEditorRect(); + // + // if (alloc != null) { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // tt = rootView.getToolTipText(pt.x, pt.y, alloc); + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // } + // return tt; + // } + // + // --- ViewFactory methods ------------------------------ + // + // /** + // * Creates a view for an element. + // * If a subclass wishes to directly implement the factory + // * producing the view(s), it should reimplement this + // * method. By default it simply returns null indicating + // * it is unable to represent the element. + // * + // * @param elem the element + // * @return the view + // */ + // public View create(Element elem) { + // return null; + // } + // + // /** + // * Creates a view for an element. + // * If a subclass wishes to directly implement the factory + // * producing the view(s), it should reimplement this + // * method. By default it simply returns null indicating + // * it is unable to represent the part of the element. + // * + // * @param elem the element + // * @param p0 the starting offset >= 0 + // * @param p1 the ending offset >= p0 + // * @return the view + // */ + // public View create(Element elem, int p0, int p1) { + // return null; + // } + // + // public static class BasicCaret extends DefaultCaret implements UIResource + // {} + // + // public static class BasicHighlighter extends DefaultHighlighter implements + // UIResource {} + // + // static class BasicCursor extends Cursor implements UIResource { + // BasicCursor(int type) { + // super(type); + // } + // + // BasicCursor(String name) { + // super(name); + // } + // } + // + // private static BasicCursor textCursor = new + // BasicCursor(Cursor.TEXT_CURSOR); + // ----- member variables --------------------------------------- + + private static final EditorKit defaultKit = new DefaultEditorKit(); + transient JTextComponent editor; + protected boolean editable = true; + + // transient boolean painted; + // transient RootView rootView = new RootView(); + // transient UpdateHandler updateHandler = new UpdateHandler(); + // private static final TransferHandler defaultTransferHandler = new + // TextTransferHandler(); + // private final DragListener dragListener = getDragListener(); + // private static final Position.Bias[] discardBias = new Position.Bias[1]; + // private DefaultCaret dropCaret; + + // /** + // * Root view that acts as a gateway between the component + // * and the View hierarchy. + // */ + // class RootView extends View { + // + // RootView() { + // super(null); + // } + // + // void setView(View v) { + // View oldView = view; + // view = null; + // if (oldView != null) { + // // get rid of back reference so that the old + // // hierarchy can be garbage collected. + // oldView.setParent(null); + // } + // if (v != null) { + // v.setParent(this); + // } + // view = v; + // } + // + // /** + // * Fetches the attributes to use when rendering. At the root + // * level there are no attributes. If an attribute is resolved + // * up the view hierarchy this is the end of the line. + // */ + // public AttributeSet getAttributes() { + // return null; + // } + // + // /** + // * Determines the preferred span for this view along an axis. + // * + // * @param axis may be either X_AXIS or Y_AXIS + // * @return the span the view would like to be rendered into. + // * Typically the view is told to render into the span + // * that is returned, although there is no guarantee. + // * The parent may choose to resize or break the view. + // */ + // public float getPreferredSpan(int axis) { + // if (view != null) { + // return view.getPreferredSpan(axis); + // } + // return 10; + // } + // + // /** + // * Determines the minimum span for this view along an axis. + // * + // * @param axis may be either X_AXIS or Y_AXIS + // * @return the span the view would like to be rendered into. + // * Typically the view is told to render into the span + // * that is returned, although there is no guarantee. + // * The parent may choose to resize or break the view. + // */ + // public float getMinimumSpan(int axis) { + // if (view != null) { + // return view.getMinimumSpan(axis); + // } + // return 10; + // } + // + // /** + // * Determines the maximum span for this view along an axis. + // * + // * @param axis may be either X_AXIS or Y_AXIS + // * @return the span the view would like to be rendered into. + // * Typically the view is told to render into the span + // * that is returned, although there is no guarantee. + // * The parent may choose to resize or break the view. + // */ + // public float getMaximumSpan(int axis) { + // return Integer.MAX_VALUE; + // } + // + // /** + // * Specifies that a preference has changed. + // * Child views can call this on the parent to indicate that + // * the preference has changed. The root view routes this to + // * invalidate on the hosting component. + // *

    + // * This can be called on a different thread from the + // * event dispatching thread and is basically unsafe to + // * propagate into the component. To make this safe, + // * the operation is transferred over to the event dispatching + // * thread for completion. It is a design goal that all view + // * methods be safe to call without concern for concurrency, + // * and this behavior helps make that true. + // * + // * @param child the child view + // * @param width true if the width preference has changed + // * @param height true if the height preference has changed + // */ + // public void preferenceChanged(View child, boolean width, boolean height) { + // editor.revalidate(); + // } + // + // /** + // * Determines the desired alignment for this view along an axis. + // * + // * @param axis may be either X_AXIS or Y_AXIS + // * @return the desired alignment, where 0.0 indicates the origin + // * and 1.0 the full span away from the origin + // */ + // public float getAlignment(int axis) { + // if (view != null) { + // return view.getAlignment(axis); + // } + // return 0; + // } + // + // /** + // * Renders the view. + // * + // * @param g the graphics context + // * @param allocation the region to render into + // */ + // public void paint(Graphics g, Shape allocation) { + // if (view != null) { + // Rectangle alloc = (allocation instanceof Rectangle) ? + // (Rectangle)allocation : allocation.getBounds(); + // setSize(alloc.width, alloc.height); + // view.paint(g, allocation); + // } + // } + // + // /** + // * Sets the view parent. + // * + // * @param parent the parent view + // */ + // public void setParent(View parent) { + // throw new Error("Can't set parent on root view"); + // } + // + // /** + // * Returns the number of views in this view. Since + // * this view simply wraps the root of the view hierarchy + // * it has exactly one child. + // * + // * @return the number of views + // * @see #getView + // */ + // public int getViewCount() { + // return 1; + // } + // + // /** + // * Gets the n-th view in this container. + // * + // * @param n the number of the view to get + // * @return the view + // */ + // public View getView(int n) { + // return view; + // } + // + // /** + // * Returns the child view index representing the given position in + // * the model. This is implemented to return the index of the only + // * child. + // * + // * @param pos the position >= 0 + // * @return index of the view representing the given position, or + // * -1 if no view represents that position + // * @since 1.3 + // */ + // public int getViewIndex(int pos, Position.Bias b) { + // return 0; + // } + // + // /** + // * Fetches the allocation for the given child view. + // * This enables finding out where various views + // * are located, without assuming the views store + // * their location. This returns the given allocation + // * since this view simply acts as a gateway between + // * the view hierarchy and the associated component. + // * + // * @param index the index of the child + // * @param a the allocation to this view. + // * @return the allocation to the child + // */ + // public Shape getChildAllocation(int index, Shape a) { + // return a; + // } + // + // /** + // * Provides a mapping from the document model coordinate space + // * to the coordinate space of the view mapped to it. + // * + // * @param pos the position to convert + // * @param a the allocated region to render into + // * @return the bounding box of the given position + // */ + // public Shape modelToView(int pos, Shape a, Position.Bias b) throws + // BadLocationException { + // if (view != null) { + // return view.modelToView(pos, a, b); + // } + // return null; + // } + // + // /** + // * Provides a mapping from the document model coordinate space + // * to the coordinate space of the view mapped to it. + // * + // * @param p0 the position to convert >= 0 + // * @param b0 the bias toward the previous character or the + // * next character represented by p0, in case the + // * position is a boundary of two views. + // * @param p1 the position to convert >= 0 + // * @param b1 the bias toward the previous character or the + // * next character represented by p1, in case the + // * position is a boundary of two views. + // * @param a the allocated region to render into + // * @return the bounding box of the given position is returned + // * @exception BadLocationException if the given position does + // * not represent a valid location in the associated document + // * @exception IllegalArgumentException for an invalid bias argument + // * @see View#viewToModel + // */ + // public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias + // b1, Shape a) throws BadLocationException { + // if (view != null) { + // return view.modelToView(p0, b0, p1, b1, a); + // } + // return null; + // } + // + // /** + // * Provides a mapping from the view coordinate space to the logical + // * coordinate space of the model. + // * + // * @param x x coordinate of the view location to convert + // * @param y y coordinate of the view location to convert + // * @param a the allocated region to render into + // * @return the location within the model that best represents the + // * given point in the view + // */ + // public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) { + // if (view != null) { + // int retValue = view.viewToModel(x, y, a, bias); + // return retValue; + // } + // return -1; + // } + // + // /** + // * Provides a way to determine the next visually represented model + // * location that one might place a caret. Some views may not be visible, + // * they might not be in the same order found in the model, or they just + // * might not allow access to some of the locations in the model. + // * + // * @param pos the position to convert >= 0 + // * @param a the allocated region to render into + // * @param direction the direction from the current position that can + // * be thought of as the arrow keys typically found on a keyboard. + // * This may be SwingConstants.WEST, SwingConstants.EAST, + // * SwingConstants.NORTH, or SwingConstants.SOUTH. + // * @return the location within the model that best represents the next + // * location visual position. + // * @exception BadLocationException + // * @exception IllegalArgumentException for an invalid direction + // */ + // public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, + // int direction, + // Position.Bias[] biasRet) + // throws BadLocationException { + // if( view != null ) { + // int nextPos = view.getNextVisualPositionFrom(pos, b, a, + // direction, biasRet); + // if(nextPos != -1) { + // pos = nextPos; + // } + // else { + // biasRet[0] = b; + // } + // } + // return pos; + // } + // + // /** + // * Gives notification that something was inserted into the document + // * in a location that this view is responsible for. + // * + // * @param e the change information from the associated document + // * @param a the current allocation of the view + // * @param f the factory to use to rebuild if the view has children + // */ + // public void insertUpdate(DocumentEvent e, Shape a, ViewFactory f) { + // if (view != null) { + // view.insertUpdate(e, a, f); + // } + // } + // + // /** + // * Gives notification that something was removed from the document + // * in a location that this view is responsible for. + // * + // * @param e the change information from the associated document + // * @param a the current allocation of the view + // * @param f the factory to use to rebuild if the view has children + // */ + // public void removeUpdate(DocumentEvent e, Shape a, ViewFactory f) { + // if (view != null) { + // view.removeUpdate(e, a, f); + // } + // } + // + // /** + // * Gives notification from the document that attributes were changed + // * in a location that this view is responsible for. + // * + // * @param e the change information from the associated document + // * @param a the current allocation of the view + // * @param f the factory to use to rebuild if the view has children + // */ + // public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f) { + // if (view != null) { + // view.changedUpdate(e, a, f); + // } + // } + // + // /** + // * Returns the document model underlying the view. + // * + // * @return the model + // */ + // public Document getDocument() { + // return editor.getDocument(); + // } + // + // /** + // * Returns the starting offset into the model for this view. + // * + // * @return the starting offset + // */ + // public int getStartOffset() { + // if (view != null) { + // return view.getStartOffset(); + // } + // return getElement().getStartOffset(); + // } + // + // /** + // * Returns the ending offset into the model for this view. + // * + // * @return the ending offset + // */ + // public int getEndOffset() { + // if (view != null) { + // return view.getEndOffset(); + // } + // return getElement().getEndOffset(); + // } + // + // /** + // * Gets the element that this view is mapped to. + // * + // * @return the view + // */ + // public Element getElement() { + // if (view != null) { + // return view.getElement(); + // } + // return editor.getDocument().getDefaultRootElement(); + // } + // + // /** + // * Breaks this view on the given axis at the given length. + // * + // * @param axis may be either X_AXIS or Y_AXIS + // * @param len specifies where a break is desired in the span + // * @param the current allocation of the view + // * @return the fragment of the view that represents the given span + // * if the view can be broken, otherwise null + // */ + // public View breakView(int axis, float len, Shape a) { + // throw new Error("Can't break root view"); + // } + // + // /** + // * Determines the resizability of the view along the + // * given axis. A value of 0 or less is not resizable. + // * + // * @param axis may be either X_AXIS or Y_AXIS + // * @return the weight + // */ + // public int getResizeWeight(int axis) { + // if (view != null) { + // return view.getResizeWeight(axis); + // } + // return 0; + // } + // + // /** + // * Sets the view size. + // * + // * @param width the width + // * @param height the height + // */ + // public void setSize(float width, float height) { + // if (view != null) { + // view.setSize(width, height); + // } + // } + // + // /** + // * Fetches the container hosting the view. This is useful for + // * things like scheduling a repaint, finding out the host + // * components font, etc. The default implementation + // * of this is to forward the query to the parent view. + // * + // * @return the container + // */ + // public Container getContainer() { + // return editor; + // } + // + // /** + // * Fetches the factory to be used for building the + // * various view fragments that make up the view that + // * represents the model. This is what determines + // * how the model will be represented. This is implemented + // * to fetch the factory provided by the associated + // * EditorKit unless that is null, in which case this + // * simply returns the BasicTextUI itself which allows + // * subclasses to implement a simple factory directly without + // * creating extra objects. + // * + // * @return the factory + // */ + // public ViewFactory getViewFactory() { + // EditorKit kit = getEditorKit(editor); + // ViewFactory f = kit.getViewFactory(); + // if (f != null) { + // return f; + // } + // return BasicTextUI.this; + // } + // + // private View view; + // + // } + + // /** + // * Handles updates from various places. If the model is changed, + // * this class unregisters as a listener to the old model and + // * registers with the new model. If the document model changes, + // * the change is forwarded to the root view. If the focus + // * accelerator changes, a new keystroke is registered to request + // * focus. + // */ + // class UpdateHandler implements PropertyChangeListener, DocumentListener, + // LayoutManager2, UIResource { + // + // // --- PropertyChangeListener methods ----------------------- + // + // /** + // * This method gets called when a bound property is changed. + // * We are looking for document changes on the editor. + // */ + // public final void propertyChange(PropertyChangeEvent evt) { + // Object oldValue = evt.getOldValue(); + // Object newValue = evt.getNewValue(); + // String propertyName = evt.getPropertyName(); + // if ((oldValue instanceof Document) || (newValue instanceof Document)) { + // if (oldValue != null) { + // ((Document)oldValue).removeDocumentListener(this); + // i18nView = false; + // } + // if (newValue != null) { + // ((Document)newValue).addDocumentListener(this); + // if ("document" == propertyName) { + // setView(null); + // BasicTextUI.this.propertyChange(evt); + // modelChanged(); + // return; + // } + // } + // modelChanged(); + // } + // if ("focusAccelerator" == propertyName) { + // updateFocusAcceleratorBinding(true); + // } else if ("componentOrientation" == propertyName) { + // // Changes in ComponentOrientation require the views to be + // // rebuilt. + // modelChanged(); + // } else if ("font" == propertyName) { + // modelChanged(); + // } else if ("dropLocation" == propertyName) { + // dropIndexChanged(); + // } else if ("editable" == propertyName) { + // updateCursor(); + // modelChanged(); + // } + // BasicTextUI.this.propertyChange(evt); + // } + // + // private void dropIndexChanged() { + // if (editor.getDropMode() == DropMode.USE_SELECTION) { + // return; + // } + // + // JTextComponent.DropLocation dropLocation = editor.getDropLocation(); + // + // if (dropLocation == null) { + // if (dropCaret != null) { + // dropCaret.deinstall(editor); + // editor.repaint(dropCaret); + // dropCaret = null; + // } + // } else { + // if (dropCaret == null) { + // dropCaret = new BasicCaret(); + // dropCaret.install(editor); + // dropCaret.setVisible(true); + // } + // + // dropCaret.setDot(dropLocation.getIndex(), + // dropLocation.getBias()); + // } + // } + // + // // --- DocumentListener methods ----------------------- + // + // /** + // * The insert notification. Gets sent to the root of the view structure + // * that represents the portion of the model being represented by the + // * editor. The factory is added as an argument to the update so that + // * the views can update themselves in a dynamic (not hardcoded) way. + // * + // * @param e The change notification from the currently associated + // * document. + // * @see DocumentListener#insertUpdate + // */ + // public final void insertUpdate(DocumentEvent e) { + // Document doc = e.getDocument(); + // Object o = doc.getProperty("i18n"); + // if (o instanceof Boolean) { + // Boolean i18nFlag = (Boolean) o; + // if (i18nFlag.booleanValue() != i18nView) { + // // i18n flag changed, rebuild the view + // i18nView = i18nFlag.booleanValue(); + // modelChanged(); + // return; + // } + // } + // + // // normal insert update + // Rectangle alloc = (painted) ? getVisibleEditorRect() : null; + // rootView.insertUpdate(e, alloc, rootView.getViewFactory()); + // } + // + // /** + // * The remove notification. Gets sent to the root of the view structure + // * that represents the portion of the model being represented by the + // * editor. The factory is added as an argument to the update so that + // * the views can update themselves in a dynamic (not hardcoded) way. + // * + // * @param e The change notification from the currently associated + // * document. + // * @see DocumentListener#removeUpdate + // */ + // public final void removeUpdate(DocumentEvent e) { + // Rectangle alloc = (painted) ? getVisibleEditorRect() : null; + // rootView.removeUpdate(e, alloc, rootView.getViewFactory()); + // } + // + // /** + // * The change notification. Gets sent to the root of the view structure + // * that represents the portion of the model being represented by the + // * editor. The factory is added as an argument to the update so that + // * the views can update themselves in a dynamic (not hardcoded) way. + // * + // * @param e The change notification from the currently associated + // * document. + // * @see DocumentListener#changeUpdate + // */ + // public final void changedUpdate(DocumentEvent e) { + // Rectangle alloc = (painted) ? getVisibleEditorRect() : null; + // rootView.changedUpdate(e, alloc, rootView.getViewFactory()); + // } + // + // // --- LayoutManager2 methods -------------------------------- + // + // /** + // * Adds the specified component with the specified name to + // * the layout. + // * @param name the component name + // * @param comp the component to be added + // */ + // public void addLayoutComponent(String name, Component comp) { + // // not supported + // } + // + // /** + // * Removes the specified component from the layout. + // * @param comp the component to be removed + // */ + // public void removeLayoutComponent(Component comp) { + // if (constraints != null) { + // // remove the constraint record + // constraints.remove(comp); + // } + // } + // + // /** + // * Calculates the preferred size dimensions for the specified + // * panel given the components in the specified parent container. + // * @param parent the component to be laid out + // * + // * @see #minimumLayoutSize + // */ + // public Dimension preferredLayoutSize(Container parent) { + // // should not be called (JComponent uses UI instead) + // return null; + // } + // + // /** + // * Calculates the minimum size dimensions for the specified + // * panel given the components in the specified parent container. + // * @param parent the component to be laid out + // * @see #preferredLayoutSize + // */ + // public Dimension minimumLayoutSize(Container parent) { + // // should not be called (JComponent uses UI instead) + // return null; + // } + // + // /** + // * Lays out the container in the specified panel. This is + // * implemented to position all components that were added + // * with a View object as a constraint. The current allocation + // * of the associated View is used as the location of the + // * component. + // *

    + // * A read-lock is acquired on the document to prevent the + // * view tree from being modified while the layout process + // * is active. + // * + // * @param parent the component which needs to be laid out + // */ + // public void layoutContainer(Container parent) { + // if ((constraints != null) && (! constraints.isEmpty())) { + // Rectangle alloc = getVisibleEditorRect(); + // if (alloc != null) { + // Document doc = editor.getDocument(); + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readLock(); + // } + // try { + // rootView.setSize(alloc.width, alloc.height); + // Enumeration components = constraints.keys(); + // while (components.hasMoreElements()) { + // Component comp = (Component) components.nextElement(); + // View v = (View) constraints.get(comp); + // Shape ca = calculateViewPosition(alloc, v); + // if (ca != null) { + // Rectangle compAlloc = (ca instanceof Rectangle) ? + // (Rectangle) ca : ca.getBounds(); + // comp.setBounds(compAlloc); + // } + // } + // } finally { + // if (doc instanceof AbstractDocument) { + // ((AbstractDocument)doc).readUnlock(); + // } + // } + // } + // } + // } + // + // /** + // * Find the Shape representing the given view. + // */ + // Shape calculateViewPosition(Shape alloc, View v) { + // int pos = v.getStartOffset(); + // View child = null; + // for (View parent = rootView; (parent != null) && (parent != v); parent = + // child) { + // int index = parent.getViewIndex(pos, Position.Bias.Forward); + // alloc = parent.getChildAllocation(index, alloc); + // child = parent.getView(index); + // } + // return (child != null) ? alloc : null; + // } + // + // /** + // * Adds the specified component to the layout, using the specified + // * constraint object. We only store those components that were added + // * with a constraint that is of type View. + // * + // * @param comp the component to be added + // * @param constraint where/how the component is added to the layout. + // */ + // public void addLayoutComponent(Component comp, Object constraint) { + // if (constraint instanceof View) { + // if (constraints == null) { + // constraints = new Hashtable(7); + // } + // constraints.put(comp, constraint); + // } + // } + // + // /** + // * Returns the maximum size of this component. + // * @see jsjava.awt.Component#getMinimumSize() + // * @see jsjava.awt.Component#getPreferredSize() + // * @see LayoutManager + // */ + // public Dimension maximumLayoutSize(Container target) { + // // should not be called (JComponent uses UI instead) + // return null; + // } + // + // /** + // * Returns the alignment along the x axis. This specifies how + // * the component would like to be aligned relative to other + // * components. The value should be a number between 0 and 1 + // * where 0 represents alignment along the origin, 1 is aligned + // * the furthest away from the origin, 0.5 is centered, etc. + // */ + // public float getLayoutAlignmentX(Container target) { + // return 0.5f; + // } + // + // /** + // * Returns the alignment along the y axis. This specifies how + // * the component would like to be aligned relative to other + // * components. The value should be a number between 0 and 1 + // * where 0 represents alignment along the origin, 1 is aligned + // * the furthest away from the origin, 0.5 is centered, etc. + // */ + // public float getLayoutAlignmentY(Container target) { + // return 0.5f; + // } + // + // /** + // * Invalidates the layout, indicating that if the layout manager + // * has cached information it should be discarded. + // */ + // public void invalidateLayout(Container target) { + // } + // + // /** + // * The "layout constraints" for the LayoutManager2 implementation. + // * These are View objects for those components that are represented + // * by a View in the View tree. + // */ + // private Hashtable constraints; + // + // private boolean i18nView = false; + // } + + /** + * Wrapper for text actions to return isEnabled false in case editor is non + * editable + */ + class TextActionWrapper extends TextAction { + public TextActionWrapper(TextAction action) { + super((String) action.getValue(Action.NAME)); + this.action = action; + } + + /** + * The operation to perform when this action is triggered. + * + * @param e + * the action event + */ + public void actionPerformed(ActionEvent e) { + action.actionPerformed(e); + } + + public boolean isEnabled() { + return (editor == null || editor.isEditable()) ? action.isEnabled() + : false; + } + + TextAction action = null; + } + + /** + * Registered in the ActionMap. + */ + class FocusAction extends AbstractAction { + + public void actionPerformed(ActionEvent e) { + editor.requestFocus(); + } + + public boolean isEnabled() { + return editor.isEditable(); + } + } + + boolean handleEnter(int eventType) { + return false; + } + + String bgcolor0; + + public void setEditable(boolean editable) { + + this.editable = editable; + if (domNode == null) + return; + if (c.isBackgroundSet()) + bgcolor0 = JSToolkit.getCSSColor(c.getBackground()); + if (editable) { + domNode.removeAttribute("readOnly"); + if (bgcolor0 != null) + DOMNode.setStyles(domNode, "background-color", bgcolor0); + } else { + DOMNode.setAttr(domNode, "readOnly", "true"); + if (c.isBackgroundSet()) { + bgcolor0 = JSToolkit.getCSSColor(c.getBackground()); + } else { + if (bgcolor0 == null) + bgcolor0 = domNode.getStyle("background-color"); + } + DOMNode.setStyles(domNode, "background-color", "rgba(0,0,0,0)"); + } + + } + + // private static DragListener getDragListener() { + // synchronized(DragListener.class) { + // DragListener listener = + // (DragListener)AppContext.getAppContext(). + // get(DragListener.class); + // + // if (listener == null) { + // listener = new DragListener(); + // AppContext.getAppContext().put(DragListener.class, listener); + // } + // + // return listener; + // } + // } + // + // /** + // * Listens for mouse events for the purposes of detecting drag gestures. + // * BasicTextUI will maintain one of these per AppContext. + // */ + // static class DragListener extends MouseInputAdapter + // implements BeforeDrag { + // + // private boolean dragStarted; + // + // public void dragStarting(MouseEvent me) { + // dragStarted = true; + // } + // + // public void mousePressed(MouseEvent e) { + // JTextComponent c = (JTextComponent)e.getSource(); + // if (c.getDragEnabled()) { + // dragStarted = false; + // if (isDragPossible(e) && DragRecognitionSupport.mousePressed(e)) { + // e.consume(); + // } + // } + // } + // + // public void mouseReleased(MouseEvent e) { + // JTextComponent c = (JTextComponent)e.getSource(); + // if (c.getDragEnabled()) { + // if (dragStarted) { + // e.consume(); + // } + // + // DragRecognitionSupport.mouseReleased(e); + // } + // } + // + // public void mouseDragged(MouseEvent e) { + // JTextComponent c = (JTextComponent)e.getSource(); + // if (c.getDragEnabled()) { + // if (dragStarted || DragRecognitionSupport.mouseDragged(e, this)) { + // e.consume(); + // } + // } + // } + // + // /** + // * Determines if the following are true: + // *

      + // *
    • the component is enabled + // *
    • the press event is located over a selection + // *
    + // */ + // protected boolean isDragPossible(MouseEvent e) { + // JTextComponent c = (JTextComponent)e.getSource(); + // if (c.isEnabled()) { + // Caret caret = c.getCaret(); + // int dot = caret.getDot(); + // int mark = caret.getMark(); + // if (dot != mark) { + // Point p = new Point(e.getX(), e.getY()); + // int pos = c.viewToModel(p); + // + // int p0 = Math.min(dot, mark); + // int p1 = Math.max(dot, mark); + // if ((pos >= p0) && (pos < p1)) { + // return true; + // } + // } + // } + // return false; + // } + // } + + // static class TextTransferHandler extends TransferHandler implements + // UIResource { + // + // private JTextComponent exportComp; + // private boolean shouldRemove; + // private int p0; + // private int p1; + // + // /** + // * Whether or not this is a drop using + // * DropMode.INSERT. + // */ + // private boolean modeBetween = false; + // + // /** + // * Whether or not this is a drop. + // */ + // private boolean isDrop = false; + // + // /** + // * The drop action. + // */ + // private int dropAction = MOVE; + // + // /** + // * The drop bias. + // */ + // private Position.Bias dropBias; + // + // /** + // * Try to find a flavor that can be used to import a Transferable. + // * The set of usable flavors are tried in the following order: + // *
      + // *
    1. First, an attempt is made to find a flavor matching the content type + // * of the EditorKit for the component. + // *
    2. Second, an attempt to find a text/plain flavor is made. + // *
    3. Third, an attempt to find a flavor representing a String reference + // * in the same VM is made. + // *
    4. Lastly, DataFlavor.stringFlavor is searched for. + // *
    + // */ + // protected DataFlavor getImportFlavor(DataFlavor[] flavors, JTextComponent + // c) { + // DataFlavor plainFlavor = null; + // DataFlavor refFlavor = null; + // DataFlavor stringFlavor = null; + // + // if (c instanceof JEditorPane) { + // for (int i = 0; i < flavors.length; i++) { + // String mime = flavors[i].getMimeType(); + // if (mime.startsWith(((JEditorPane)c).getEditorKit().getContentType())) { + // return flavors[i]; + // } else if (plainFlavor == null && mime.startsWith("text/plain")) { + // plainFlavor = flavors[i]; + // } else if (refFlavor == null && + // mime.startsWith("application/x-java-jvm-local-objectref") + // && flavors[i].getRepresentationClass() == jsjava.lang.String.class) { + // refFlavor = flavors[i]; + // } else if (stringFlavor == null && + // flavors[i].equals(DataFlavor.stringFlavor)) { + // stringFlavor = flavors[i]; + // } + // } + // if (plainFlavor != null) { + // return plainFlavor; + // } else if (refFlavor != null) { + // return refFlavor; + // } else if (stringFlavor != null) { + // return stringFlavor; + // } + // return null; + // } + // + // + // for (int i = 0; i < flavors.length; i++) { + // String mime = flavors[i].getMimeType(); + // if (mime.startsWith("text/plain")) { + // return flavors[i]; + // } else if (refFlavor == null && + // mime.startsWith("application/x-java-jvm-local-objectref") + // && flavors[i].getRepresentationClass() == jsjava.lang.String.class) { + // refFlavor = flavors[i]; + // } else if (stringFlavor == null && + // flavors[i].equals(DataFlavor.stringFlavor)) { + // stringFlavor = flavors[i]; + // } + // } + // if (refFlavor != null) { + // return refFlavor; + // } else if (stringFlavor != null) { + // return stringFlavor; + // } + // return null; + // } + // + // /** + // * Import the given stream data into the text component. + // */ + // protected void handleReaderImport(Reader in, JTextComponent c, boolean + // useRead) + // throws BadLocationException, IOException { + // if (useRead) { + // int startPosition = c.getSelectionStart(); + // int endPosition = c.getSelectionEnd(); + // int length = endPosition - startPosition; + // EditorKit kit = c.getUI().getEditorKit(c); + // Document doc = c.getDocument(); + // if (length > 0) { + // doc.remove(startPosition, length); + // } + // kit.read(in, doc, startPosition); + // } else { + // char[] buff = new char[1024]; + // int nch; + // boolean lastWasCR = false; + // int last; + // StringBuffer sbuff = null; + // + // // Read in a block at a time, mapping \r\n to \n, as well as single + // // \r to \n. + // while ((nch = in.read(buff, 0, buff.length)) != -1) { + // if (sbuff == null) { + // sbuff = new StringBuffer(nch); + // } + // last = 0; + // for(int counter = 0; counter < nch; counter++) { + // switch(buff[counter]) { + // case '\r': + // if (lastWasCR) { + // if (counter == 0) { + // sbuff.append('\n'); + // } else { + // buff[counter - 1] = '\n'; + // } + // } else { + // lastWasCR = true; + // } + // break; + // case '\n': + // if (lastWasCR) { + // if (counter > (last + 1)) { + // sbuff.append(buff, last, counter - last - 1); + // } + // // else nothing to do, can skip \r, next write will + // // write \n + // lastWasCR = false; + // last = counter; + // } + // break; + // default: + // if (lastWasCR) { + // if (counter == 0) { + // sbuff.append('\n'); + // } else { + // buff[counter - 1] = '\n'; + // } + // lastWasCR = false; + // } + // break; + // } + // } + // if (last < nch) { + // if (lastWasCR) { + // if (last < (nch - 1)) { + // sbuff.append(buff, last, nch - last - 1); + // } + // } else { + // sbuff.append(buff, last, nch - last); + // } + // } + // } + // if (lastWasCR) { + // sbuff.append('\n'); + // } + // c.replaceSelection(sbuff != null ? sbuff.toString() : ""); + // } + // } + // + // // --- TransferHandler methods ------------------------------------ + // + // /** + // * This is the type of transfer actions supported by the source. Some models + // are + // * not mutable, so a transfer operation of COPY only should + // * be advertised in that case. + // * + // * @param c The component holding the data to be transfered. This + // * argument is provided to enable sharing of TransferHandlers by + // * multiple components. + // * @return This is implemented to return NONE if the component is a + // JPasswordField + // * since exporting data via user gestures is not allowed. If the text + // component is + // * editable, COPY_OR_MOVE is returned, otherwise just COPY is allowed. + // */ + // public int getSourceActions(JComponent c) { + // if (c instanceof JPasswordField && + // c.getClientProperty("JPasswordField.cutCopyAllowed") != + // Boolean.TRUE) { + // return NONE; + // } + // + // return ((JTextComponent)c).isEditable() ? COPY_OR_MOVE : COPY; + // } + // + // /** + // * Create a Transferable to use as the source for a data transfer. + // * + // * @param comp The component holding the data to be transfered. This + // * argument is provided to enable sharing of TransferHandlers by + // * multiple components. + // * @return The representation of the data to be transfered. + // * + // */ + // protected Transferable createTransferable(JComponent comp) { + // exportComp = (JTextComponent)comp; + // shouldRemove = true; + // p0 = exportComp.getSelectionStart(); + // p1 = exportComp.getSelectionEnd(); + // return (p0 != p1) ? (new TextTransferable(exportComp, p0, p1)) : null; + // } + // + // /** + // * This method is called after data has been exported. This method should + // remove + // * the data that was transfered if the action was MOVE. + // * + // * @param source The component that was the source of the data. + // * @param data The data that was transferred or possibly null + // * if the action is NONE. + // * @param action The actual action that was performed. + // */ + // protected void exportDone(JComponent source, Transferable data, int action) + // { + // // only remove the text if shouldRemove has not been set to + // // false by importData and only if the action is a move + // if (shouldRemove && action == MOVE) { + // TextTransferable t = (TextTransferable)data; + // t.removeText(); + // } + // + // exportComp = null; + // } + // + // public boolean importData(TransferSupport support) { + // isDrop = support.isDrop(); + // + // if (isDrop) { + // modeBetween = + // ((JTextComponent)support.getComponent()).getDropMode() == DropMode.INSERT; + // + // dropBias = + // ((JTextComponent.DropLocation)support.getDropLocation()).getBias(); + // + // dropAction = support.getDropAction(); + // } + // + // try { + // return super.importData(support); + // } finally { + // isDrop = false; + // modeBetween = false; + // dropBias = null; + // dropAction = MOVE; + // } + // } + // + // /** + // * This method causes a transfer to a component from a clipboard or a + // * DND drop operation. The Transferable represents the data to be + // * imported into the component. + // * + // * @param comp The component to receive the transfer. This + // * argument is provided to enable sharing of TransferHandlers by + // * multiple components. + // * @param t The data to import + // * @return true if the data was inserted into the component, false + // otherwise. + // */ + // public boolean importData(JComponent comp, Transferable t) { + // JTextComponent c = (JTextComponent)comp; + // + // int pos = modeBetween + // ? ((JTextComponent.DropLocation)c.getDropLocation()).getIndex() + // : c.getCaretPosition(); + // + // // if we are importing to the same component that we exported from + // // then don't actually do anything if the drop location is inside + // // the drag location and set shouldRemove to false so that exportDone + // // knows not to remove any data + // if (dropAction == MOVE && c == exportComp && pos >= p0 && pos <= p1) { + // shouldRemove = false; + // return true; + // } + // + // boolean imported = false; + // DataFlavor importFlavor = getImportFlavor(t.getTransferDataFlavors(), c); + // if (importFlavor != null) { + // try { + // boolean useRead = false; + // if (comp instanceof JEditorPane) { + // JEditorPane ep = (JEditorPane)comp; + // if (!ep.getContentType().startsWith("text/plain") && + // importFlavor.getMimeType().startsWith(ep.getContentType())) { + // useRead = true; + // } + // } + // InputContext ic = c.getInputContext(); + // if (ic != null) { + // ic.endComposition(); + // } + // Reader r = importFlavor.getReaderForText(t); + // + // if (modeBetween) { + // Caret caret = c.getCaret(); + // if (caret instanceof DefaultCaret) { + // ((DefaultCaret)caret).setDot(pos, dropBias); + // } else { + // c.setCaretPosition(pos); + // } + // } + // + // handleReaderImport(r, c, useRead); + // + // if (isDrop) { + // c.requestFocus(); + // Caret caret = c.getCaret(); + // if (caret instanceof DefaultCaret) { + // int newPos = caret.getDot(); + // Position.Bias newBias = ((DefaultCaret)caret).getDotBias(); + // + // ((DefaultCaret)caret).setDot(pos, dropBias); + // ((DefaultCaret)caret).moveDot(newPos, newBias); + // } else { + // c.select(pos, c.getCaretPosition()); + // } + // } + // + // imported = true; + // } catch (UnsupportedFlavorException ufe) { + // } catch (BadLocationException ble) { + // } catch (IOException ioe) { + // } + // } + // return imported; + // } + // + // /** + // * This method indicates if a component would accept an import of the given + // * set of data flavors prior to actually attempting to import it. + // * + // * @param comp The component to receive the transfer. This + // * argument is provided to enable sharing of TransferHandlers by + // * multiple components. + // * @param flavors The data formats available + // * @return true if the data can be inserted into the component, false + // otherwise. + // */ + // public boolean canImport(JComponent comp, DataFlavor[] flavors) { + // JTextComponent c = (JTextComponent)comp; + // if (!(c.isEditable() && c.isEnabled())) { + // return false; + // } + // return (getImportFlavor(flavors, c) != null); + // } + // + // /** + // * A possible implementation of the Transferable interface + // * for text components. For a JEditorPane with a rich set + // * of EditorKit implementations, conversions could be made + // * giving a wider set of formats. This is implemented to + // * offer up only the active content type and text/plain + // * (if that is not the active format) since that can be + // * extracted from other formats. + // */ + // static class TextTransferable extends BasicTransferable { + // + // TextTransferable(JTextComponent c, int start, int end) { + // super(null, null); + // + // this.c = c; + // + // Document doc = c.getDocument(); + // + // try { + // p0 = doc.createPosition(start); + // p1 = doc.createPosition(end); + // + // plainData = c.getSelectedText(); + // + // if (c instanceof JEditorPane) { + // JEditorPane ep = (JEditorPane)c; + // + // mimeType = ep.getContentType(); + // + // if (mimeType.startsWith("text/plain")) { + // return; + // } + // + // StringWriter sw = new StringWriter(p1.getOffset() - p0.getOffset()); + // ep.getEditorKit().write(sw, doc, p0.getOffset(), p1.getOffset() - + // p0.getOffset()); + // + // if (mimeType.startsWith("text/html")) { + // htmlData = sw.toString(); + // } else { + // richText = sw.toString(); + // } + // } + // } catch (BadLocationException ble) { + // } catch (IOException ioe) { + // } + // } + // + // void removeText() { + // if ((p0 != null) && (p1 != null) && (p0.getOffset() != p1.getOffset())) { + // try { + // Document doc = c.getDocument(); + // doc.remove(p0.getOffset(), p1.getOffset() - p0.getOffset()); + // } catch (BadLocationException e) { + // } + // } + // } + // + // // ---- EditorKit other than plain or HTML text ----------------------- + // + // /** + // * If the EditorKit is not for text/plain or text/html, that format + // * is supported through the "richer flavors" part of BasicTransferable. + // */ + // protected DataFlavor[] getRicherFlavors() { + // if (richText == null) { + // return null; + // } + // + // try { + // DataFlavor[] flavors = new DataFlavor[3]; + // flavors[0] = new DataFlavor(mimeType + ";class=java.lang.String"); + // flavors[1] = new DataFlavor(mimeType + ";class=java.io.Reader"); + // flavors[2] = new DataFlavor(mimeType + + // ";class=java.io.InputStream;charset=unicode"); + // return flavors; + // } catch (ClassNotFoundException cle) { + // // fall through to unsupported (should not happen) + // } + // + // return null; + // } + // + // /** + // * The only richer format supported is the file list flavor + // */ + // protected Object getRicherData(DataFlavor flavor) throws + // UnsupportedFlavorException { + // if (richText == null) { + // return null; + // } + // + // if (String.class.equals(flavor.getRepresentationClass())) { + // return richText; + // } else if (Reader.class.equals(flavor.getRepresentationClass())) { + // return new StringReader(richText); + // } else if (InputStream.class.equals(flavor.getRepresentationClass())) { + // return new StringBufferInputStream(richText); + // } + // throw new UnsupportedFlavorException(flavor); + // } + // + // Position p0; + // Position p1; + // String mimeType; + // String richText; + // JTextComponent c; + // } + // + // } + + // /** + // * Creates a new UI. + // */ + // public JSTextUI() { + // // painted = false; + // } + // + // /** + // * Creates the object to use for a caret. By default an + // * instance of BasicCaret is created. This method + // * can be redefined to provide something else that implements + // * the InputPosition interface or a subclass of JCaret. + // * + // * @return the caret object + // */ + // protected Caret createCaret() { + // return new BasicCaret(); + // } + // + // /** + // * Creates the object to use for adding highlights. By default + // * an instance of BasicHighlighter is created. This method + // * can be redefined to provide something else that implements + // * the Highlighter interface or a subclass of DefaultHighlighter. + // * + // * @return the highlighter + // */ + // protected Highlighter createHighlighter() { + // return new BasicHighlighter(); + // } + // + // /** + // * Fetches the name of the keymap that will be installed/used + // * by default for this UI. This is implemented to create a + // * name based upon the classname. The name is the the name + // * of the class with the package prefix removed. + // * + // * @return the name + // */ + // protected String getKeymapName() { + // String nm = getClass().getName(); + // int index = nm.lastIndexOf('.'); + // if (index >= 0) { + // nm = nm.substring(index+1, nm.length()); + // } + // return nm; + // } + // + // /** + // * Creates the keymap to use for the text component, and installs + // * any necessary bindings into it. By default, the keymap is + // * shared between all instances of this type of TextUI. The + // * keymap has the name defined by the getKeymapName method. If the + // * keymap is not found, then DEFAULT_KEYMAP from JTextComponent is used. + // *

    + // * The set of bindings used to create the keymap is fetched + // * from the UIManager using a key formed by combining the + // * {@link #getPropertyPrefix} method + // * and the string .keyBindings. The type is expected + // * to be JTextComponent.KeyBinding[]. + // * + // * @return the keymap + // * @see #getKeymapName + // * @see jsjavax.swing.text.JTextComponent + // */ + // protected Keymap createKeymap() { + // String nm = getKeymapName(); + // Keymap map = JTextComponent.getKeymap(nm); + // if (map == null) { + // Keymap parent = JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP); + // map = JTextComponent.addKeymap(nm, parent); + // String prefix = getPropertyPrefix(); + // Object o = DefaultLookup.get(editor, this, + // prefix + ".keyBindings"); + // if ((o != null) && (o instanceof JTextComponent.KeyBinding[])) { + // JTextComponent.KeyBinding[] bindings = (JTextComponent.KeyBinding[]) o; + // JTextComponent.loadKeymap(map, bindings, getComponent().getActions()); + // } + // } + // return map; + // } + // + // /** + // * This method gets called when a bound property is changed + // * on the associated JTextComponent. This is a hook + // * which UI implementations may change to reflect how the + // * UI displays bound properties of JTextComponent subclasses. + // * This is implemented to do nothing (i.e. the response to + // * properties in JTextComponent itself are handled prior + // * to calling this method). + // * + // * This implementation updates the background of the text + // * component if the editable and/or enabled state changes. + // * + // * @param evt the property change event + // */ + // protected void propertyChange(PropertyChangeEvent evt) { + // if (evt.getPropertyName().equals("editable") || + // evt.getPropertyName().equals("enabled")) { + // + // updateBackground((JTextComponent)evt.getSource()); + // } + // } + // + // /** + // * Updates the background of the text component based on whether the + // * text component is editable and/or enabled. + // * + // * @param c the JTextComponent that needs its background color updated + // */ + // private void updateBackground(JTextComponent c) { + // // This is a temporary workaround. + // // This code does not correctly deal with Synth (Synth doesn't use + // // properties like this), nor does it deal with the situation where + // // the developer grabs the color from a JLabel and sets it as + // // the background for a JTextArea in all look and feels. The problem + // // scenario results if the Color obtained for the Label and TextArea + // // is ==, which is the case for the windows look and feel. + // // Until an appropriate solution is found, the code is being + // // reverted to what it was before the original fix. + // if (this instanceof sun.swing.plaf.synth.SynthUI || + // (c instanceof JTextArea)) { + // return; + // } + // Color background = c.getBackground(); + // if (background instanceof UIResource) { + // String prefix = getPropertyPrefix(); + // + // Color disabledBG = + // DefaultLookup.getColor(c, this, prefix + ".disabledBackground", null); + // Color inactiveBG = + // DefaultLookup.getColor(c, this, prefix + ".inactiveBackground", null); + // Color bg = + // DefaultLookup.getColor(c, this, prefix + ".background", null); + // + // /* In an ideal situation, the following check would not be necessary + // * and we would replace the color any time the previous color was a + // * UIResouce. However, it turns out that there is existing code that + // * uses the following inadvisable pattern to turn a text area into + // * what appears to be a multi-line label: + // * + // * JLabel label = new JLabel(); + // * JTextArea area = new JTextArea(); + // * area.setBackground(label.getBackground()); + // * area.setEditable(false); + // * + // * JLabel's default background is a UIResource. As such, just + // * checking for UIResource would have us always changing the + // * background away from what the developer wanted. + // * + // * Therefore, for JTextArea/JEditorPane, we'll additionally check + // * that the color we're about to replace matches one that was + // * installed by us from the UIDefaults. + // */ + // if ((c instanceof JTextArea || c instanceof JEditorPane) + // && background != disabledBG + // && background != inactiveBG + // && background != bg) { + // + // return; + // } + // + // Color newColor = null; + // if (!c.isEnabled()) { + // newColor = disabledBG; + // } + // if (newColor == null && !c.isEditable()) { + // newColor = inactiveBG; + // } + // if (newColor == null) { + // newColor = bg; + // } + // if (newColor != null && newColor != background) { + // c.setBackground(newColor); + // } + // } + // } + // + // /** + // * Gets the name used as a key to look up properties through the + // * UIManager. This is used as a prefix to all the standard + // * text properties. + // * + // * @return the name + // */ + // protected abstract String getPropertyPrefix(); + +} diff --git a/site/j2s/swingjs/plaf/JSToolBarSeparatorUI.java b/site/j2s/swingjs/plaf/JSToolBarSeparatorUI.java index 4525aad..2f1c44b 100644 --- a/site/j2s/swingjs/plaf/JSToolBarSeparatorUI.java +++ b/site/j2s/swingjs/plaf/JSToolBarSeparatorUI.java @@ -1,53 +1,53 @@ -/* - * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package swingjs.plaf; - -import swingjs.api.DOMNode; -import jsjavax.swing.JLabel; - -public class JSToolBarSeparatorUI extends JSSeparatorUI { - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - textNode = domNode = createDOMObject("label", id); - vCenter(domNode, 10); - return setCssFont(DOMNode.setAttr(domNode, "innerHTML",((JLabel) c).getText()), c.getFont()); - } - - @Override - protected void installJSUI() { - // TODO Auto-generated method stub - - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +/* + * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package swingjs.plaf; + +import swingjs.api.DOMNode; +import jsjavax.swing.JLabel; + +public class JSToolBarSeparatorUI extends JSSeparatorUI { + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + textNode = domNode = createDOMObject("label", id); + vCenter(domNode, 10); + return setCssFont(DOMNode.setAttr(domNode, "innerHTML",((JLabel) c).getText()), c.getFont()); + } + + @Override + protected void installJSUI() { + // TODO Auto-generated method stub + + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/JSViewportUI.java b/site/j2s/swingjs/plaf/JSViewportUI.java index df90e45..056f882 100644 --- a/site/j2s/swingjs/plaf/JSViewportUI.java +++ b/site/j2s/swingjs/plaf/JSViewportUI.java @@ -1,51 +1,51 @@ -/* - * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package swingjs.plaf; - -import swingjs.api.DOMNode; - -public class JSViewportUI extends JSComponentUI { - - @Override - public DOMNode getDOMObject() { - if (domNode == null) - domNode = createDOMObject("div", id); - return domNode; - } - - @Override - protected void installJSUI() { - // TODO Auto-generated method stub - - } - - @Override - protected void uninstallJSUI() { - // TODO Auto-generated method stub - - } - -} +/* + * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package swingjs.plaf; + +import swingjs.api.DOMNode; + +public class JSViewportUI extends JSComponentUI { + + @Override + public DOMNode getDOMObject() { + if (domNode == null) + domNode = createDOMObject("div", id); + return domNode; + } + + @Override + protected void installJSUI() { + // TODO Auto-generated method stub + + } + + @Override + protected void uninstallJSUI() { + // TODO Auto-generated method stub + + } + +} diff --git a/site/j2s/swingjs/plaf/LazyActionMap.java b/site/j2s/swingjs/plaf/LazyActionMap.java index 3051d1e..494d645 100644 --- a/site/j2s/swingjs/plaf/LazyActionMap.java +++ b/site/j2s/swingjs/plaf/LazyActionMap.java @@ -1,175 +1,175 @@ -/* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package swingjs.plaf; - -import jsjavax.swing.Action; -import jsjavax.swing.ActionMap; -import jsjavax.swing.JComponent; -import jsjavax.swing.SwingUtilities; -import jsjavax.swing.UIManager; -import jsjavax.swing.plaf.ActionMapUIResource; - -/** - * An ActionMap that populates its contents as necessary. The - * contents are populated by invoking the loadActionMap - * method on the passed in Object. - * - * @author Scott Violet - */ -class LazyActionMap extends ActionMapUIResource { - /** - * Object to invoke loadActionMap on. This may be - * a Class object. - */ - private transient Object _loader; - - /** - * Installs an ActionMap that will be populated by invoking the - * loadActionMap method on the specified Class - * when necessary. - *

    - * This should be used if the ActionMap can be shared. - * - * @param c JComponent to install the ActionMap on. - * @param loaderClass Class object that gets loadActionMap invoked - * on. - * @param defaultsKey Key to use to defaults table to check for - * existing map and what resulting Map will be registered on. - */ - static void installLazyActionMap(JComponent c, Class loaderClass, - String defaultsKey) { - ActionMap map = (ActionMap)UIManager.get(defaultsKey); - if (map == null) { - map = new LazyActionMap(loaderClass); -// UIManager.getLookAndFeelDefaults().put(defaultsKey, map); - } - SwingUtilities.replaceUIActionMap(c, map); - } - - /** - * Returns an ActionMap that will be populated by invoking the - * loadActionMap method on the specified Class - * when necessary. - *

    - * This should be used if the ActionMap can be shared. - * - * @param c JComponent to install the ActionMap on. - * @param loaderClass Class object that gets loadActionMap invoked - * on. - * @param defaultsKey Key to use to defaults table to check for - * existing map and what resulting Map will be registered on. - */ - static ActionMap getActionMap(Class loaderClass, - String defaultsKey) { - ActionMap map = (ActionMap)UIManager.get(defaultsKey); - if (map == null) { - map = new LazyActionMap(loaderClass); -//SwingJS temp UIManager.getLookAndFeelDefaults().put(defaultsKey, map); - } - return map; - } - - - private LazyActionMap(Class loader) { - _loader = loader; - } - - public void put(Action action) { - put(action.getValue(Action.NAME), action); - } - - public void put(Object key, Action action) { - loadIfNecessary(); - super.put(key, action); - } - - public Action get(Object key) { - loadIfNecessary(); - return super.get(key); - } - - public void remove(Object key) { - loadIfNecessary(); - super.remove(key); - } - - public void clear() { - loadIfNecessary(); - super.clear(); - } - - public Object[] keys() { - loadIfNecessary(); - return super.keys(); - } - - public int size() { - loadIfNecessary(); - return super.size(); - } - - public Object[] allKeys() { - loadIfNecessary(); - return super.allKeys(); - } - - public void setParent(ActionMap map) { - loadIfNecessary(); - super.setParent(map); - } - - private void loadIfNecessary() { - if (_loader != null) { - /** - * @j2sNative - * - * this._loader.loadActionMap(this); - * this._loader = null; - */ - {} -// Object loader = _loader; -// -// _loader = null; -// Class klass = (Class)loader; -// try { -// Method method = klass.getDeclaredMethod("loadActionMap", -// new Class[] { LazyActionMap.class }); -// method.invoke(klass, new Object[] { this }); -// } catch (NoSuchMethodException nsme) { -// assert false : "LazyActionMap unable to load actions " + -// klass; -// } catch (IllegalAccessException iae) { -// assert false : "LazyActionMap unable to load actions " + -// iae; -// } catch (InvocationTargetException ite) { -// assert false : "LazyActionMap unable to load actions " + -// ite; -// } catch (IllegalArgumentException iae) { -// assert false : "LazyActionMap unable to load actions " + -// iae; -// } - } - } -} +/* + * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package swingjs.plaf; + +import jsjavax.swing.Action; +import jsjavax.swing.ActionMap; +import jsjavax.swing.JComponent; +import jsjavax.swing.SwingUtilities; +import jsjavax.swing.UIManager; +import jsjavax.swing.plaf.ActionMapUIResource; + +/** + * An ActionMap that populates its contents as necessary. The + * contents are populated by invoking the loadActionMap + * method on the passed in Object. + * + * @author Scott Violet + */ +class LazyActionMap extends ActionMapUIResource { + /** + * Object to invoke loadActionMap on. This may be + * a Class object. + */ + private transient Object _loader; + + /** + * Installs an ActionMap that will be populated by invoking the + * loadActionMap method on the specified Class + * when necessary. + *

    + * This should be used if the ActionMap can be shared. + * + * @param c JComponent to install the ActionMap on. + * @param loaderClass Class object that gets loadActionMap invoked + * on. + * @param defaultsKey Key to use to defaults table to check for + * existing map and what resulting Map will be registered on. + */ + static void installLazyActionMap(JComponent c, Class loaderClass, + String defaultsKey) { + ActionMap map = (ActionMap)UIManager.get(defaultsKey); + if (map == null) { + map = new LazyActionMap(loaderClass); +// UIManager.getLookAndFeelDefaults().put(defaultsKey, map); + } + SwingUtilities.replaceUIActionMap(c, map); + } + + /** + * Returns an ActionMap that will be populated by invoking the + * loadActionMap method on the specified Class + * when necessary. + *

    + * This should be used if the ActionMap can be shared. + * + * @param c JComponent to install the ActionMap on. + * @param loaderClass Class object that gets loadActionMap invoked + * on. + * @param defaultsKey Key to use to defaults table to check for + * existing map and what resulting Map will be registered on. + */ + static ActionMap getActionMap(Class loaderClass, + String defaultsKey) { + ActionMap map = (ActionMap)UIManager.get(defaultsKey); + if (map == null) { + map = new LazyActionMap(loaderClass); +//SwingJS temp UIManager.getLookAndFeelDefaults().put(defaultsKey, map); + } + return map; + } + + + private LazyActionMap(Class loader) { + _loader = loader; + } + + public void put(Action action) { + put(action.getValue(Action.NAME), action); + } + + public void put(Object key, Action action) { + loadIfNecessary(); + super.put(key, action); + } + + public Action get(Object key) { + loadIfNecessary(); + return super.get(key); + } + + public void remove(Object key) { + loadIfNecessary(); + super.remove(key); + } + + public void clear() { + loadIfNecessary(); + super.clear(); + } + + public Object[] keys() { + loadIfNecessary(); + return super.keys(); + } + + public int size() { + loadIfNecessary(); + return super.size(); + } + + public Object[] allKeys() { + loadIfNecessary(); + return super.allKeys(); + } + + public void setParent(ActionMap map) { + loadIfNecessary(); + super.setParent(map); + } + + private void loadIfNecessary() { + if (_loader != null) { + /** + * @j2sNative + * + * this._loader.loadActionMap(this); + * this._loader = null; + */ + {} +// Object loader = _loader; +// +// _loader = null; +// Class klass = (Class)loader; +// try { +// Method method = klass.getDeclaredMethod("loadActionMap", +// new Class[] { LazyActionMap.class }); +// method.invoke(klass, new Object[] { this }); +// } catch (NoSuchMethodException nsme) { +// assert false : "LazyActionMap unable to load actions " + +// klass; +// } catch (IllegalAccessException iae) { +// assert false : "LazyActionMap unable to load actions " + +// iae; +// } catch (InvocationTargetException ite) { +// assert false : "LazyActionMap unable to load actions " + +// ite; +// } catch (IllegalArgumentException iae) { +// assert false : "LazyActionMap unable to load actions " + +// iae; +// } + } + } +} diff --git a/site/j2s/swingjs/plaf/TextListener.java b/site/j2s/swingjs/plaf/TextListener.java index 9bce1b1..0371042 100644 --- a/site/j2s/swingjs/plaf/TextListener.java +++ b/site/j2s/swingjs/plaf/TextListener.java @@ -1,206 +1,206 @@ -/* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package swingjs.plaf; - -import jsjava.awt.event.FocusEvent; -import jsjava.awt.event.FocusListener; -import jsjava.awt.event.KeyEvent; -import jsjava.awt.event.MouseEvent; -import jsjava.awt.event.MouseListener; -import jsjava.awt.event.MouseMotionListener; -import jsjava.beans.PropertyChangeEvent; -import jsjava.beans.PropertyChangeListener; -import jsjavax.swing.SwingUtilities; -import jsjavax.swing.event.ChangeEvent; -import jsjavax.swing.event.ChangeListener; -import jsjavax.swing.event.DocumentEvent; -import jsjavax.swing.event.DocumentListener; -import jsjavax.swing.text.JTextComponent; - -public class TextListener implements MouseListener, MouseMotionListener, - FocusListener, ChangeListener, PropertyChangeListener, DocumentListener, JSEventHandler -{ - - private JTextComponent txtComp; - - boolean haveDocument; - - private JSTextUI ui; - - public TextListener(JSTextUI ui, JTextComponent txtComp) { - this.txtComp = txtComp; - this.ui = ui; - } - - void checkDocument() { - if (!haveDocument && txtComp.getDocument() != null) { - haveDocument = true; - txtComp.getDocument().addDocumentListener(this); - } - } - public void propertyChange(PropertyChangeEvent e) { - String prop = e.getPropertyName(); - System.out.println("JSTextListener property change: " + prop + " " + e.getSource()); - if ("font" == prop || "foreground" == prop || "preferredSize" == prop) { - JTextComponent txtComp = (JTextComponent) e.getSource(); - ((JSComponentUI) (Object) txtComp.getUI()).notifyPropertyChanged(prop); - } - if ("editable" == prop) - ui.setEditable(((Boolean) e.getNewValue()).booleanValue()); - } - - public void stateChanged(ChangeEvent e) { - JTextComponent txtComp = (JTextComponent) e.getSource(); - txtComp.repaint(); - } - - public void focusGained(FocusEvent e) { - } - - public void focusLost(FocusEvent e) { -// JTextComponent b = (JTextComponent) e.getSource(); - } - - public void mouseMoved(MouseEvent e) { - } - - - public void mouseDragged(MouseEvent e) { - } - - public void mouseClicked(MouseEvent e) { - } - - public void mousePressed(MouseEvent e) { - if (SwingUtilities.isLeftMouseButton(e)) { - JTextComponent txtComp = (JTextComponent) e.getSource(); - if (!txtComp.contains(e.getX(), e.getY())) - return; - if (!txtComp.hasFocus() && txtComp.isRequestFocusEnabled()) { - txtComp.requestFocus(); - } - } - }; - - public void mouseReleased(MouseEvent e) { - }; - - public void mouseEntered(MouseEvent e) { - }; - - public void mouseExited(MouseEvent e) { -// JTextComponent b = (JTextComponent) e.getSource(); -// ButtonModel model = b.getModel(); -// if(b.isRolloverEnabled()) { -// model.setRollover(false); -// } -// model.setArmed(false); - }; - - - @Override - public boolean handleJSEvent(Object target, int eventType, Object jQueryEvent) { - JSTextUI ui = (JSTextUI) target; - int dot = 0, mark = 0; - String evType = null; - int keyCode = 0; - /** - * @j2sNative - * - * mark = jQueryEvent.target.selectionStart; - * dot = jQueryEvent.target.selectionEnd; - * evType = jQueryEvent.type; - * keyCode = jQueryEvent.keyCode; - * if (keyCode == 13) keyCode = 10; - */ - { - } - - // HTML5 selection is always mark....dot - // but Java can be oldDot....oldMark - - int oldDot = ui.editor.getCaret().getDot(); - int oldMark = ui.editor.getCaret().getMark(); - if (dot != mark && oldMark == dot) { - dot = mark; - mark = oldMark; - } - switch (eventType) { - case MouseEvent.MOUSE_PRESSED: - case MouseEvent.MOUSE_RELEASED: - case MouseEvent.MOUSE_CLICKED: - break; - case KeyEvent.KEY_PRESSED: - case KeyEvent.KEY_RELEASED: - case KeyEvent.KEY_TYPED: - if (keyCode == KeyEvent.VK_ENTER && ui.handleEnter(eventType)) - break; - String val = ui.getJSTextValue(); - if (!val.equals(ui.currentText)) { - String oldval = ui.currentText; - ui.editor.setText(val); - // the text may have been filtered, but we should not change it yet - //val = ui.getComponentText(); - ui.editor.firePropertyChangeObject("text", oldval, val); - ui.domNode.setSelectionRange(dot, dot); - } - break; - } - if (dot != oldDot || mark != oldMark) { - ui.editor.getCaret().setDot(dot); - if (dot != mark) - ui.editor.getCaret().moveDot(mark); - ui.editor.caretEvent.fire(); - } - System.out.println(ui.id + " TextListener handling event " + evType + " " + eventType - + " " + ui.editor.getCaret() + " " + ui.getComponentText().length()); - return true; - } - - @Override - public void insertUpdate(DocumentEvent e) { - setText(); - } - - @Override - public void removeUpdate(DocumentEvent e) { - setText(); - } - - @Override - public void changedUpdate(DocumentEvent e) { - } - - private void setText() { - // this method will only be run in JavaScript; so as not to - // have to modify the actual javax.swing code so much, we use - // the double qualification to prevent Java compilation errors. - // Not a great idea in general.... - - ((JSComponentUI) (Object) txtComp.getUI()).notifyPropertyChanged("text"); - } -} +/* + * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package swingjs.plaf; + +import jsjava.awt.event.FocusEvent; +import jsjava.awt.event.FocusListener; +import jsjava.awt.event.KeyEvent; +import jsjava.awt.event.MouseEvent; +import jsjava.awt.event.MouseListener; +import jsjava.awt.event.MouseMotionListener; +import jsjava.beans.PropertyChangeEvent; +import jsjava.beans.PropertyChangeListener; +import jsjavax.swing.SwingUtilities; +import jsjavax.swing.event.ChangeEvent; +import jsjavax.swing.event.ChangeListener; +import jsjavax.swing.event.DocumentEvent; +import jsjavax.swing.event.DocumentListener; +import jsjavax.swing.text.JTextComponent; + +public class TextListener implements MouseListener, MouseMotionListener, + FocusListener, ChangeListener, PropertyChangeListener, DocumentListener, JSEventHandler +{ + + private JTextComponent txtComp; + + boolean haveDocument; + + private JSTextUI ui; + + public TextListener(JSTextUI ui, JTextComponent txtComp) { + this.txtComp = txtComp; + this.ui = ui; + } + + void checkDocument() { + if (!haveDocument && txtComp.getDocument() != null) { + haveDocument = true; + txtComp.getDocument().addDocumentListener(this); + } + } + public void propertyChange(PropertyChangeEvent e) { + String prop = e.getPropertyName(); + System.out.println("JSTextListener property change: " + prop + " " + e.getSource()); + if ("font" == prop || "foreground" == prop || "preferredSize" == prop) { + JTextComponent txtComp = (JTextComponent) e.getSource(); + ((JSComponentUI) (Object) txtComp.getUI()).notifyPropertyChanged(prop); + } + if ("editable" == prop) + ui.setEditable(((Boolean) e.getNewValue()).booleanValue()); + } + + public void stateChanged(ChangeEvent e) { + JTextComponent txtComp = (JTextComponent) e.getSource(); + txtComp.repaint(); + } + + public void focusGained(FocusEvent e) { + } + + public void focusLost(FocusEvent e) { +// JTextComponent b = (JTextComponent) e.getSource(); + } + + public void mouseMoved(MouseEvent e) { + } + + + public void mouseDragged(MouseEvent e) { + } + + public void mouseClicked(MouseEvent e) { + } + + public void mousePressed(MouseEvent e) { + if (SwingUtilities.isLeftMouseButton(e)) { + JTextComponent txtComp = (JTextComponent) e.getSource(); + if (!txtComp.contains(e.getX(), e.getY())) + return; + if (!txtComp.hasFocus() && txtComp.isRequestFocusEnabled()) { + txtComp.requestFocus(); + } + } + }; + + public void mouseReleased(MouseEvent e) { + }; + + public void mouseEntered(MouseEvent e) { + }; + + public void mouseExited(MouseEvent e) { +// JTextComponent b = (JTextComponent) e.getSource(); +// ButtonModel model = b.getModel(); +// if(b.isRolloverEnabled()) { +// model.setRollover(false); +// } +// model.setArmed(false); + }; + + + @Override + public boolean handleJSEvent(Object target, int eventType, Object jQueryEvent) { + JSTextUI ui = (JSTextUI) target; + int dot = 0, mark = 0; + String evType = null; + int keyCode = 0; + /** + * @j2sNative + * + * mark = jQueryEvent.target.selectionStart; + * dot = jQueryEvent.target.selectionEnd; + * evType = jQueryEvent.type; + * keyCode = jQueryEvent.keyCode; + * if (keyCode == 13) keyCode = 10; + */ + { + } + + // HTML5 selection is always mark....dot + // but Java can be oldDot....oldMark + + int oldDot = ui.editor.getCaret().getDot(); + int oldMark = ui.editor.getCaret().getMark(); + if (dot != mark && oldMark == dot) { + dot = mark; + mark = oldMark; + } + switch (eventType) { + case MouseEvent.MOUSE_PRESSED: + case MouseEvent.MOUSE_RELEASED: + case MouseEvent.MOUSE_CLICKED: + break; + case KeyEvent.KEY_PRESSED: + case KeyEvent.KEY_RELEASED: + case KeyEvent.KEY_TYPED: + if (keyCode == KeyEvent.VK_ENTER && ui.handleEnter(eventType)) + break; + String val = ui.getJSTextValue(); + if (!val.equals(ui.currentText)) { + String oldval = ui.currentText; + ui.editor.setText(val); + // the text may have been filtered, but we should not change it yet + //val = ui.getComponentText(); + ui.editor.firePropertyChangeObject("text", oldval, val); + ui.domNode.setSelectionRange(dot, dot); + } + break; + } + if (dot != oldDot || mark != oldMark) { + ui.editor.getCaret().setDot(dot); + if (dot != mark) + ui.editor.getCaret().moveDot(mark); + ui.editor.caretEvent.fire(); + } + System.out.println(ui.id + " TextListener handling event " + evType + " " + eventType + + " " + ui.editor.getCaret() + " " + ui.getComponentText().length()); + return true; + } + + @Override + public void insertUpdate(DocumentEvent e) { + setText(); + } + + @Override + public void removeUpdate(DocumentEvent e) { + setText(); + } + + @Override + public void changedUpdate(DocumentEvent e) { + } + + private void setText() { + // this method will only be run in JavaScript; so as not to + // have to modify the actual javax.swing code so much, we use + // the double qualification to prevent Java compilation errors. + // Not a great idea in general.... + + ((JSComponentUI) (Object) txtComp.getUI()).notifyPropertyChanged("text"); + } +} \ No newline at end of file diff --git a/site/js/JSmol.js b/site/js/JSmol.js index b9ab435..aa9751f 100644 --- a/site/js/JSmol.js +++ b/site/js/JSmol.js @@ -457,7 +457,6 @@ // called from apiPlatform Display.repaint() //alert("_repaint " + Clazz.getStackTrace()) - if (!applet || !applet._appletPanel)return; // asNewThread = false; diff --git a/site/js/SwingJS.js b/site/js/SwingJS.js index 42e819d..a9bac7c 100644 --- a/site/js/SwingJS.js +++ b/site/js/SwingJS.js @@ -1,5 +1,6 @@ // SwingJS.js +// BH 7/24/2015 9:09:39 AM allows setting Info.resourcePath // BH 4/28/2015 10:15:32 PM adds getAppletHtml // BH 4/2/2015 5:17:44 PM adds SwingJS.getJavaResource(path) @@ -17,17 +18,15 @@ if (typeof(SwingJS) == "undefined") { return SwingJS._Applet._get(id, Info, checkOnly); } - SwingJS.getJavaResource = function(path) { + SwingJS.getJavaResource = function(path, isJavaPath) { if (path.indexOf("http") != 0) { var applet = Jmol._applets[java.lang.Thread.currentThread().getName()]; - path = (applet.__Info.resourcePath || applet.__Info.j2sPath) + "/" + path + path = (!isJavaPath && applet.__Info.resourcePath || applet.__Info.j2sPath) + "/" + path } - System.out.println("Swingjs.js getJavaResource " + path); + System.out.println("Swingjs.js getJavaResource " + path) var s = Jmol._getFileData(path); - System.out.println(s); if (s.indexOf("[Exception") == 0) return null; - System.out.println("Swingjs.js getJavaResource len=" + s.length); if (path.lastIndexOf(".css") == path.length - 4) { path = path.substring(0, path.lastIndexOf("/") + 1) + "images/"; s = s.replace(/images\//g, path) diff --git a/site/js/SwingJSJavaExt.js b/site/js/SwingJSJavaExt.js new file mode 100644 index 0000000..dc1937b --- /dev/null +++ b/site/js/SwingJSJavaExt.js @@ -0,0 +1,2843 @@ +// SwingJSJavaExt.js + + +// This library will be wrapped by an additional anonymous function using ANT in +// build_03_tojs.xml. This task will also modify variable names. References +// to Clazz._ will not be changed, but other Clazz.xxx will be changed to +// (local scope) Clazz_xxx, allowing them to be further compressed using +// Google Closure Compiler in that same ANT task. + +// BH 7/24/2015 7:21:51 AM renamed from JSmolJavaExt.js +// BH 5/31/2015 5:53:04 PM Number.compareTo added +// BH 5/21/2015 5:46:30 PM Number("0xFFFFFFFF") is not -1 +// BH 4/23/2015 9:08:59 AM xx.getComponentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works +// BH 4/12/2015 1:37:44 PM adding Math.rint = Math.round +// BH 1/16/2015 10:09:38 AM Chrome failure jqGrig due to new String("x").toString() not being a simple string +// BH 8/14/2014 6:49:22 PM Character class efficiencies +// BH 7/24/2014 9:02:18 AM most browsers do not support String.codePointAt() +// BH 7/11/2014 4:17:22 PM fix for Boolean.valueOf("false") not being false +// BH 5/27/2014 6:29:59 AM ensure floats and doubles have decimal point in toString +// BH 4/1/2014 12:23:41 PM Encoding moved to Clazz._Encoding; +// BH 4/1/2014 7:51:46 AM removing java.lang.B00lean +// BH 3/7/2014 9:17:10 AM removing Array.toString; moving that code here from j2sJmol.js +// BH 1/30/2014 9:04:25 AM adding Throwable.getStackTrace() as a STRING +// BH 12/4/2013 9:20:44 PM fix for reassigning Date.prototype.toString() +// BH 12/3/2013 11:43:10 AM bizarre Safari bug in reassigning Boolean (OK, I admit, we shouldn't have done that...) +// BH 12/1/2013 6:50:16 AM evit Number.prototype.toString assignment removed! +// BH 11/30/2013 1:46:31 PM fixing Byte, Short, Long, Integer, Float, Double to reflect proper bounds and error conditions +// BH 11/29/2013 8:58:49 PM removing Boolean.toString(boolean) +// BH 11/4/2013 7:34:26 AM changing "var nativeClazz" to "var nativeClass" to avoid ANT replacement of "nativeClazz." to "nativeClazz_" +// BH 10/19/2013 1:29:27 PM fixed String.$replace() +// BH 10/18/2013 6:09:23 PM fixed (Double|Float).valueOf(NaN).valueOf(), which should return NaN, not throw an error +// BH 10/12/2013 11:18:44 AM fixed bug in Double(String) and Float(String) that was returning typeof "string" +// BH 10/10/2013 2:40:20 PM added Math.log10 +// BH 7/23/2013 7:24:01 AM fixing Number.shortValue() and Number.byteValue() for negative values +// BH 6/16/2013 1:31:30 PM adding /| in String.replace -- thank you David Koes +// BH 3/13/2013 12:49:23 PM setting Boolean.valueOf() "@" +// BH 3/2/2013 10:46:45 PM removed Double.valueOf(String) +// BH 11/6/2012 8:26:33 PM added instanceof Int32Array in String.instantialize +// BH 10/13/2012 11:38:07 PM corrected Integer.parseInt to allow only +-0123456789; created Integer.parseIntRadix +// BH 11/1/2012 added Short +// BH 9/10/2012 6:27:21 AM added java.net.URL... classes +// BH 1/7/2013 7:40:06 AM added Clazz.dateToString + +;(function(Clazz) { + +// moved here from package.js +// these classes will be created as objects prior to any others +// and are then available immediately + + Clazz._Loader.registerPackages("java", [ "io", "lang", "lang.reflect", "util" ]); + + var sJU = "java.util"; + + //var sJU = "JU"; + //Clazz._Loader.registerPackages (sJU, ["regex", "zip"]); + //var javautil = JU; + + var javautil = java.util; + + Clazz._Loader.ignore([ + "net.sf.j2s.ajax.HttpRequest", + sJU + ".MapEntry.Type", + //"java.net.UnknownServiceException", + "java.lang.Runtime", + "java.security.AccessController", + "java.security.PrivilegedExceptionAction", + "java.io.File", + "java.io.FileInputStream", + "java.io.FileWriter", + "java.io.OutputStreamWriter", +// sJU + ".Calendar", // bypassed in ModelCollection +// "java.text.SimpleDateFormat", // not used +// "java.text.DateFormat", // not used + sJU + ".concurrent.Executors" + ]) + +Math.rint = Math.round; + +Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046}); + +if(Clazz._supportsNativeObject){ + // Number and Array are special -- do not override prototype.toString -- "length - 2" here + for(var i=0;i 0 ? x - 0x10000 : x); +}); + +Clazz.defineMethod(Number,"byteValue", +function(){ +var x = Math.round(this)&0xff; +return (this < 0 && x > 0 ? x - 0x100 : x); +}); + +Clazz.defineMethod(Number,"intValue", +function(){ +return Math.round(this)&0xffffffff; +}); + +Clazz.defineMethod(Number,"longValue", +function(){ +return Math.round(this); +}); + +Clazz.defineMethod(Number,"floatValue", +function(){ +return this.valueOf(); +}); +Clazz.defineMethod(Number,"doubleValue", +function(){ +return parseFloat(this.valueOf()); +}); + +Clazz.overrideMethod(Number,"hashCode", +function(){ +return this.valueOf(); +}); + +java.lang.Integer=Integer=function(){ +Clazz.instantialize(this,arguments); +}; +Clazz.decorateAsType(Integer,"Integer",Number,Comparable,null,true); +Integer.prototype.valueOf=function(){return 0;}; +Integer.toString=Integer.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +} else if(this===Integer){ +return"class java.lang.Integer"; +} +return""+this.valueOf(); +}; + +/* + +Clazz.makeConstructor(Integer, +function(){ +this.valueOf=function(){ +return 0; +}; +}); +*/ + + +Clazz.overrideConstructor(Integer, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + this.valueOf=function(){return v;}; +}); //BH +/* +Clazz.makeConstructor(Integer, +function(s){ +var value=Integer.parseInt(s,10); +this.valueOf=function(){ +return value; +}; +},"String"); +*/ +Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000; +Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff; +Integer.TYPE=Integer.prototype.TYPE=Integer; + + +Clazz.defineMethod(Integer,"bitCount", +function(i) { + i = i - ((i >>> 1) & 0x55555555); + i = (i & 0x33333333) + ((i >>> 2) & 0x33333333); + i = (i + (i >>> 4)) & 0x0f0f0f0f; + i = i + (i >>> 8); + i = i + (i >>> 16); + return i & 0x3f; +},"Number"); +Integer.bitCount=Integer.prototype.bitCount; + +Clazz.defineMethod(Integer,"numberOfLeadingZeros", +function(i) { + if (i == 0) return 32; + var n = 1; + if (i >>> 16 == 0) { n += 16; i <<= 16; } + if (i >>> 24 == 0) { n += 8; i <<= 8; } + if (i >>> 28 == 0) { n += 4; i <<= 4; } + if (i >>> 30 == 0) { n += 2; i <<= 2; } + n -= i >>> 31; + return n; +},"Number"); +Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros; + +Clazz.defineMethod(Integer,"numberOfTrailingZeros", +function(i) { + if (i == 0) return 32; + var n = 31; + var y = i <<16; if (y != 0) { n = n -16; i = y; } + y = i << 8; if (y != 0) { n = n - 8; i = y; } + y = i << 4; if (y != 0) { n = n - 4; i = y; } + y = i << 2; if (y != 0) { n = n - 2; i = y; } + return n - ((i << 1) >>> 31); +},"Number"); +Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros; + +Clazz.defineMethod(Integer,"parseIntRadix", +function(s,radix){ +if(s==null){ +throw new NumberFormatException("null"); +}if(radix<2){ +throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX"); +}if(radix>36){ +throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX"); +} +if (radix == 10) { + for (var i = s.length; --i >= 0;) { + var c = s.charCodeAt(i); + if (c >= 48 && c <= 57) continue; + if (i > 0 || c != 43 && c != 45) + throw new NumberFormatException("Not a Number : "+s); + + } +} +var i=parseInt(s,radix); +if(isNaN(i)){ +throw new NumberFormatException("Not a Number : "+s); +} +return i; +},"String, Number"); +Integer.parseIntRadix=Integer.prototype.parseIntRadix; + +Clazz.defineMethod(Integer,"parseInt", +function(s){ +return Integer.parseIntRadix(s,10); +},"String"); +Integer.parseInt=Integer.prototype.parseInt; + +/* +Clazz.defineMethod(Integer,"$valueOf", +function(s){ +return new Integer(Integer.parseIntRadix(s,10)); +},"String"); +*/ + +Clazz.overrideMethod(Integer,"$valueOf", +function(s){ +return new Integer(s); +}); + +/* +Clazz.defineMethod(Integer,"$valueOf", +function(s,r){ +return new Integer(Integer.parseIntRadix(s,r)); +},"String, Number"); +*/ + +Integer.$valueOf=Integer.prototype.$valueOf; + + +Clazz.overrideMethod(Integer,"equals", +function(s){ +if(s==null||!Clazz.instanceOf(s,Integer)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Integer.toHexString=Integer.prototype.toHexString=function(d){ +if(d.valueOf)d=d.valueOf(); +if (d < 0) { +var b = d & 0xFFFFFF; +var c = ((d>>24)&0xFF); +return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6); +} +return d._numberToString(16);}; +Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);}; +Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);}; + +Integer.decodeRaw=Clazz.defineMethod(Integer,"decodeRaw", function(n){ +if (n.indexOf(".") >= 0)n = ""; +var i = (n.startsWith("-") ? 1 : 0); +n = n.replace(/\#/, "0x").toLowerCase(); +var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10); +// The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10. +// Number is strict, but Number("055") does not work, though ParseInt("055", 8) does. +// need to make sure negative numbers are negative +n = Number(n) & 0xFFFFFFFF; +return (radix == 8 ? parseInt(n, 8) : n); +},"~S"); + +Integer.decode=Clazz.defineMethod(Integer,"decode", function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE) + throw new NumberFormatException("Invalid Integer"); + return new Integer(n); +},"~S"); + +Clazz.overrideMethod(Integer,"hashCode", +function(){ +return this.valueOf(); +}); + +// Note that Long is problematic in JavaScript + +java.lang.Long=Long=function(){ +Clazz.instantialize(this,arguments); +}; +Clazz.decorateAsType(Long,"Long",Number,Comparable,null,true); +Long.prototype.valueOf=function(){return 0;}; +Long.toString=Long.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +}else if(this===Long){ +return"class java.lang.Long"; +} +return""+this.valueOf(); +}; + +Clazz.overrideConstructor(Long, function(v){ + v == null && (v = 0); + v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10)); +this.valueOf=function(){return v;}; +}); + +//Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000; +//Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff; +Long.TYPE=Long.prototype.TYPE=Long; + +Clazz.defineMethod(Long,"parseLong", +function(s,radix){ + return Integer.parseInt(s, radix || 10); +}); + +Long.parseLong=Long.prototype.parseLong; + +Clazz.overrideMethod(Long,"$valueOf", +function(s){ +return new Long(s); +}); +/* +Clazz.defineMethod(Long,"$valueOf", +function(s){ +return new Long(s); +},"Number"); + +Clazz.defineMethod(Long,"$valueOf", +function(s,r){ +return new Long(Long.parseLong(s,r)); +},"String, Number"); +*/ +Long.$valueOf=Long.prototype.$valueOf; +Clazz.overrideMethod(Long,"equals", +function(s){ +if(s==null||!Clazz.instanceOf(s,Long)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Long.toHexString=Long.prototype.toHexString=function(i){ +return i.toString(16); +}; +Long.toOctalString=Long.prototype.toOctalString=function(i){ +return i.toString(8); +}; +Long.toBinaryString=Long.prototype.toBinaryString=function(i){ +return i.toString(2); +}; + + +Long.decode=Clazz.defineMethod(Long,"decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n)) + throw new NumberFormatException("Invalid Long"); + return new Long(n); +},"~S"); + +java.lang.Short = Short = function () { +Clazz.instantialize (this, arguments); +}; +Clazz.decorateAsType (Short, "Short", Number, Comparable, null, true); +Short.prototype.valueOf = function () { return 0; }; +Short.toString = Short.prototype.toString = function () { + if (arguments.length != 0) { + return "" + arguments[0]; + } else if (this === Short) { + return "class java.lang.Short"; // Short.class.toString + } + return "" + this.valueOf (); +}; + +Clazz.overrideConstructor(Short, +function (v) { + v == null && (v = 0); + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + v = v.shortValue(); + this.valueOf = function () {return v;}; +}); + + +Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768; +Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767; +Short.TYPE = Short.prototype.TYPE = Short; + +Clazz.defineMethod(Short, "parseShortRadix", +function (s, radix) { +return Integer.parseIntRadix(s, radix).shortValue(); +}, "String, Number"); +Short.parseShortRadix = Short.prototype.parseShortRadix; + +Clazz.defineMethod(Short, "parseShort", +function (s) { +return Short.parseShortRadix (s, 10); +}, "String"); + +Short.parseShort = Short.prototype.parseShort; + +/* +Clazz.defineMethod(Short, "$valueOf", +function (s) { +return new Short(Short.parseShort (s, 10)); +}, "String"); + */ + +Clazz.overrideMethod(Short, "$valueOf", +function (s) { +return new Short(s); +}); + +/* +Clazz.defineMethod(Short, "$valueOf", +function (s, r) { +return new Short(Short.parseShort (s, r)); +}, "String, Number"); + */ + +Short.$valueOf = Short.prototype.$valueOf; +Clazz.overrideMethod(Short, "equals", +function (s) { +if(s == null || !Clazz.instanceOf(s, Short) ){ + return false; +} +return s.valueOf() == this.valueOf(); +}, "Object"); +Short.toHexString = Short.prototype.toHexString = function (i) { + return i.toString (16); +}; +Short.toOctalString = Short.prototype.toOctalString = function (i) { + return i.toString (8); +}; +Short.toBinaryString = Short.prototype.toBinaryString = function (i) { + return i.toString (2); +}; +Short.decode = Clazz.defineMethod(Short, "decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < -32768|| n > 32767) + throw new NumberFormatException("Invalid Short"); + return new Short(n); +}, "~S"); + +java.lang.Byte=Byte=function(){ +Clazz.instantialize(this,arguments); +}; +Clazz.decorateAsType(Byte,"Byte",Number,Comparable,null,true); +Byte.prototype.valueOf=function(){return 0;}; +Byte.toString=Byte.prototype.toString=function(){ +if(arguments.length!=0){ +return""+arguments[0]; +}else if(this===Byte){ +return"class java.lang.Byte"; +} +return""+this.valueOf(); +}; +Clazz.makeConstructor(Byte, +function(v){ + if (typeof v != "number") + v = Integer.parseIntRadix(v, 10); + v = v.byteValue(); +this.valueOf=function(){ +return v; +}; +}); + +Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828; +Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128; +Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127; +Byte.SIZE=Byte.prototype.SIZE=8; +Byte.TYPE=Byte.prototype.TYPE=Byte; + +Clazz.defineMethod(Byte,"parseByteRadix", +function(s,radix){ + return Integer.parseIntRadix(s, radix).byteValue(); +},"String, Number"); +Byte.parseByteRadix=Byte.prototype.parseByteRadix; + +Clazz.defineMethod(Byte,"parseByte", +function(s){ +return Byte.parseByte(s,10); +},"String"); + +Byte.parseByte=Byte.prototype.parseByte; + +Clazz.overrideMethod(Byte, "$valueOf", +function (s) { +return new Byte(s); +}); + +Byte.$valueOf=Byte.prototype.$valueOf; +Clazz.overrideMethod(Byte,"equals", +function(s){ +if(s==null||!Clazz.instanceOf(s,Byte)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); +Byte.toHexString=Byte.prototype.toHexString=function(i){ +return i.toString(16); +}; +Byte.toOctalString=Byte.prototype.toOctalString=function(i){ +return i.toString(8); +}; +Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){ +return i.toString(2); +}; +Byte.decode=Clazz.defineMethod(Byte,"decode", +function(n){ + n = Integer.decodeRaw(n); + if (isNaN(n) || n < -128|| n > 127) + throw new NumberFormatException("Invalid Byte"); +return new Byte(n); +},"~S"); + +Clazz._floatToString = function(f) { + var s = ""+f + if (s.indexOf(".") < 0 && s.indexOf("e") < 0) + s += ".0"; + return s; +} + +java.lang.Float=Float=function(){ +Clazz.instantialize(this,arguments); +}; +Clazz.decorateAsType(Float,"Float",Number,Comparable,null,true); +Float.prototype.valueOf=function(){return 0;}; +Float.toString=Float.prototype.toString=function(){ +if(arguments.length!=0){ +return Clazz._floatToString(arguments[0]); +}else if(this===Float){ +return"class java.lang.Float"; +} +return Clazz._floatToString(this.valueOf()); +}; + +Clazz.overrideConstructor(Float, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Number(v); + this.valueOf=function(){return v;} +}); + +Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028; +Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38; +Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45; +Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; +Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; +Float.NaN=Number.NaN; +Float.TYPE=Float.prototype.TYPE=Float; + +Clazz.defineMethod(Float,"parseFloat", +function(s){ +if(s==null){ +throw new NumberFormatException("null"); +} +if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here +var floatVal=Number(s); +if(isNaN(floatVal)){ +throw new NumberFormatException("Not a Number : "+s); +} +return floatVal; +},"String"); +Float.parseFloat=Float.prototype.parseFloat; + +Clazz.overrideMethod(Float,"$valueOf", +function(s){ +return new Float(s); +}); + +Float.$valueOf=Float.prototype.$valueOf; + +Clazz.defineMethod(Float,"isNaN", +function(num){ +return isNaN(num); +},"Number"); +Float.isNaN=Float.prototype.isNaN; +Clazz.defineMethod(Float,"isInfinite", +function(num){ +return!isFinite(num); +},"Number"); +Float.isInfinite=Float.prototype.isInfinite; + +Clazz.overrideMethod(Float,"equals", +function(s){ +if(s==null||!Clazz.instanceOf(s,Float)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); + +java.lang.Double=Double=function(){ +Clazz.instantialize(this,arguments); +}; +Clazz.decorateAsType(Double,"Double",Number,Comparable,null,true); +Double.prototype.valueOf=function(){return 0;}; +Double.toString=Double.prototype.toString=function(){ +if(arguments.length!=0){ +return Clazz._floatToString(arguments[0]); +}else if(this===Double){ +return"class java.lang.Double"; +} +return Clazz._floatToString(this.valueOf()); +}; + +Clazz.overrideConstructor(Double, function(v){ + v == null && (v = 0); + if (typeof v != "number") + v = Double.parseDouble(v); + this.valueOf=function(){return v;}; +}); // BH + +Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468; +Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324; +Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308; +Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY; +Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY; +Double.NaN=Number.NaN; +Double.TYPE=Double.prototype.TYPE=Double; + +Clazz.defineMethod(Double,"isNaN", +function(num){ +return isNaN(num); +},"Number"); +Double.isNaN=Double.prototype.isNaN; +Clazz.defineMethod(Double,"isInfinite", +function(num){ +return!isFinite(num); +},"Number"); +Double.isInfinite=Double.prototype.isInfinite; + +Clazz.defineMethod(Double,"parseDouble", +function(s){ +if(s==null){ +throw new NumberFormatException("null"); +} +if (typeof s == "number")return s; // important -- typeof NaN is "number" and is OK here +var doubleVal=Number(s); +if(isNaN(doubleVal)){ +throw new NumberFormatException("Not a Number : "+s); +} +return doubleVal; +},"String"); +Double.parseDouble=Double.prototype.parseDouble; + +/* +Clazz.defineMethod(Double,"$valueOf", +function(s){ +return new Double(this.parseDouble(s)); +},"String"); +*/ + +Clazz.defineMethod(Double,"$valueOf", +function(v){ +return new Double(v); +},"Number"); + +Double.$valueOf=Double.prototype.$valueOf; + +Clazz.overrideMethod(Double,"equals", +function(s){ +if(s==null||!Clazz.instanceOf(s,Double)){ +return false; +} +return s.valueOf()==this.valueOf(); +},"Object"); + + +//java.lang.B00lean = Boolean; ?? BH why this? +Boolean = java.lang.Boolean = Boolean || function () {Clazz.instantialize (this, arguments);}; +if (Clazz._supportsNativeObject) { + for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) { + var p = Clazz._extendedObjectMethods[i]; + Boolean.prototype[p] = Clazz._O.prototype[p]; + } +} +Boolean.__CLASS_NAME__="Boolean"; +Clazz.implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]); +Boolean.equals=Clazz._innerFunctions.equals; +Boolean.getName=Clazz._innerFunctions.getName; +Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530; + +//Clazz.makeConstructor(Boolean, +//function(value){ +//this.valueOf=function(){ +//return value; +//}; +//},"~B"); + +Clazz.overrideConstructor(Boolean, +function(s){ + var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false); + this.valueOf=function(){return b;}; +},"~O"); + +Boolean.parseBoolean=Clazz.defineMethod(Boolean,"parseBoolean", +function(s){ +return Boolean.toBoolean(s); +},"~S"); +Clazz.defineMethod(Boolean,"booleanValue", +function(){ +return this.valueOf(); +}); +Boolean.$valueOf=Clazz.overrideMethod(Boolean,"$valueOf", +function(b){ +return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE); +}); + +/* +Boolean.toString=Clazz.defineMethod(Boolean,"toString", +function(b){ +return b?"true":"false"; +},"~B"); +*/ + +Clazz.overrideMethod(Boolean,"toString", +function(){ +return this.valueOf()?"true":"false"; +}); +Clazz.overrideMethod(Boolean,"hashCode", +function(){ +return this.valueOf()?1231:1237; +}); +Clazz.overrideMethod(Boolean,"equals", +function(obj){ +if(Clazz.instanceOf(obj,Boolean)){ +return this.booleanValue()==obj.booleanValue(); +}return false; +},"~O"); +Boolean.getBoolean=Clazz.defineMethod(Boolean,"getBoolean", +function(name){ +var result=false; +try{ +result=Boolean.toBoolean(System.getProperty(name)); +}catch(e){ +if(Clazz.instanceOf(e,IllegalArgumentException)){ +}else if(Clazz.instanceOf(e,NullPointerException)){ +}else{ +throw e; +} +} +return result; +},"~S"); +Clazz.overrideMethod(Boolean,"compareTo", +function(b){ +return(b.value==this.value?0:(this.value?1:-1)); +},"Boolean"); +Boolean.toBoolean=Clazz.defineMethod(Boolean,"toBoolean", +($fz=function(name){ +return((name!=null)&&name.equalsIgnoreCase("true")); +},$fz.isPrivate=true,$fz),"~S"); +Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true); +Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false); +Boolean.TYPE=Boolean.prototype.TYPE=Boolean; + + +Clazz._Encoding=new Object(); + +(function(Encoding) { + +Encoding.UTF8="utf-8"; +Encoding.UTF16="utf-16"; +Encoding.ASCII="ascii"; + + +Encoding.guessEncoding=function(str){ +if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){ +return Encoding.UTF8; +}else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){ +return Encoding.UTF16; +}else{ +return Encoding.ASCII; +} +}; + +Encoding.readUTF8=function(str){ +var encoding=this.guessEncoding(str); +var startIdx=0; +if(encoding==Encoding.UTF8){ +startIdx=3; +}else if(encoding==Encoding.UTF16){ +startIdx=2; +} +var arrs=new Array(); +for(var i=startIdx;i0xc0&&charCode<0xe0){ +var c1=charCode&0x1f; +i++; +var c2=str.charCodeAt(i)&0x3f; +var c=(c1<<6)+c2; +arrs[arrs.length]=String.fromCharCode(c); +}else if(charCode>=0xe0){ +var c1=charCode&0x0f; +i++; +var c2=str.charCodeAt(i)&0x3f; +i++; +var c3=str.charCodeAt(i)&0x3f; +var c=(c1<<12)+(c2<<6)+c3; +arrs[arrs.length]=String.fromCharCode(c); +} +} +return arrs.join(''); +}; + +Encoding.convert2UTF8=function(str){ +var encoding=this.guessEncoding(str); +var startIdx=0; +if(encoding==Encoding.UTF8){ +return str; +}else if(encoding==Encoding.UTF16){ +startIdx=2; +} + +var offset=0; +var arrs=new Array(offset+str.length-startIdx); + +for(var i=startIdx;i>6); +var c2=0x80+(charCode&0x003f); +arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2); +}else{ +var c1=0xe0+((charCode&0xf000)>>12); +var c2=0x80+((charCode&0x0fc0)>>6); +var c3=0x80+(charCode&0x003f); +arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3); +} +} +return arrs.join(''); +}; +Encoding.base64Chars=new Array( +'A','B','C','D','E','F','G','H', +'I','J','K','L','M','N','O','P', +'Q','R','S','T','U','V','W','X', +'Y','Z','a','b','c','d','e','f', +'g','h','i','j','k','l','m','n', +'o','p','q','r','s','t','u','v', +'w','x','y','z','0','1','2','3', +'4','5','6','7','8','9','+','/' +); +Encoding.encodeBase64=function(str){ +if(str==null||str.length==0)return str; +var b64=Encoding.base64Chars; +var length=str.length; +var index=0; +var buf=[]; +var c0,c1,c2; +while(index>2]; +if(index>4)]; +if(index>6)]; +buf[buf.length]=b64[c2&0x3F]; +}else{ +buf[buf.length]=b64[((c1<<2)&0x3c)]; +buf[buf.length]='='; +} +}else{ +buf[buf.length]=b64[(c0<<4)&0x30]; +buf[buf.length]='='; +buf[buf.length]='='; +} +} +return buf.join(''); +}; +Encoding.decodeBase64=function(str){ +if(str==null||str.length==0)return str; +var b64=Encoding.base64Chars; +var xb64=Encoding.xBase64Chars; +if(Encoding.xBase64Chars==null){ +xb64=new Object(); +for(var i=0;i>4); +if(c2!=null){ +buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2); +if(c3!=null){ +buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3); +} +} +} +return buf.join(''); +}; + +if(String.prototype.$replace==null){ +java.lang.String=String; +if(Clazz._supportsNativeObject){ +for(var i=0;i= 0) c1 = "\\" + c1; + } else { + c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;}); + } + return this.replace(new RegExp(c1,"gm"),c2); +}; +sp.$generateExpFunction=function(str){ +var arr=[]; +var orders=[]; +var idx=0; +arr[0]=""; +var i=0; +for(;ithis.length-len)|| +(ooffset>other.length-len)){ +return false; +} +var s1=this.substring(toffset,toffset+len); +var s2=other.substring(ooffset,ooffset+len); +if(ignoreCase){ +s1=s1.toLowerCase(); +s2=s2.toLowerCase(); +} +return s1==s2; +}; + + + +sp.$plit=function(regex,limit){ +if (!limit && regex == " ") + return this.split(regex); + +if(limit!=null&&limit>0){ +if(limit==1){ +return this; +} +var regExp=new RegExp("("+regex+")","gm"); +var count=1; +var s=this.replace(regExp,function($0,$1){ +count++; +if(count==limit){ +return"@@_@@"; +}else if(count>limit){ +return $0; +}else{ +return $0; +} +}); +regExp=new RegExp(regex,"gm"); +var arr=this.split(regExp); +if(arr.length>limit){ +arr[limit-1]=s.substring(s.indexOf("@@_@@")+5); +arr.length=limit; +} +return arr; +}else{ +var regExp=new RegExp(regex,"gm"); +return this.split(regExp); +} +}; +/* +sp.trim=function(){ +var len=this.length; +var st=0; + +while((st0)||(lens.length-pc)){ +return false; +} +while(--pc>=0){ +if(s.charAt(to++)!=prefix.charAt(po++)){ +return false; +} +} +return true; +}; + +sp.startsWith=function(prefix){ +if(arguments.length==1){ +return sn(this,arguments[0],0); +}else if(arguments.length==2){ +return sn(this,arguments[0],arguments[1]); +}else{ +return false; +} +}; + +sp.endsWith=function(suffix){ +return sn(this, suffix,this.length-suffix.length); +}; + +} + +sp.equals=function(anObject){ +return this.valueOf()==anObject; +}; + +sp.equalsIgnoreCase=function(anotherString){ +return(anotherString==null)?false:(this==anotherString +||this.toLowerCase()==anotherString.toLowerCase()); +}; + + +sp.hash=0; + +sp.hashCode=function(){ +var h=this.hash; +if(h==0){ +var off=0; +var len=this.length; +for(var i=0;i255){ +arrs[ii]=0x1a; +arrs[ii+1]=c&0xff; +arrs[ii+2]=(c&0xff00)>>8; +ii+=2; +}else{ +arrs[ii]=c; +} +ii++; +} +return arrs; +}; + +/* +sp.compareTo=function(anotherString){ +if(anotherString==null){ +throw new java.lang.NullPointerException(); +} +var len1=this.length; +var len2=anotherString.length; +var n=Math.min(len1,len2); +var k=0; +while(k= 0} // bh added +sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added + + + +sp.toCharArray=function(){ +var result=new Array(this.length); +for(var i=0;is2){ +return 1; +}else{ +return-1; +} +} +}; + +sp.contentEquals=function(sb){ +if(this.length!=sb.length()){ +return false; +} +var v=sb.getValue(); +var i=0; +var j=0; +var n=this.length; +while(n--!=0){ +if(this.charCodeAt(i++)!=v[j++]){ +return false; +} +} +return true; +}; + +sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){ +if(srcBegin<0){ +throw new StringIndexOutOfBoundsException(srcBegin); +} +if(srcEnd>this.length){ +throw new StringIndexOutOfBoundsException(srcEnd); +} +if(srcBegin>srcEnd){ +throw new StringIndexOutOfBoundsException(srcEnd-srcBegin); +} +if(dst==null){ +throw new NullPointerException(); +} +for(var i=0;i=sourceCount){ +return(targetCount==0?sourceCount:-1); +} +if(fromIndex<0){ +fromIndex=0; +} +if(targetCount==0){ +return fromIndex; +} + +var first=target[targetOffset]; +var i=sourceOffset+fromIndex; +var max=sourceOffset+(sourceCount-targetCount); + +startSearchForFirstChar: +while(true){ + +while(i<=max&&source[i]!=first){ +i++; +} +if(i>max){ +return-1; +} + + +var j=i+1; +var end=j+targetCount-1; +var k=targetOffset+1; +while(j0&&typeof x[0]=="number"){ +var arr=new Array(x.length); +for(var i=0;ibytes.length){ +throw new IndexOutOfBoundsException(); +} +if(length>0){ +var isChar=(bytes[offset].length!=null); +if(isChar){ +for(var i=0;i0;){ +value[i]=String.fromCharCode(bytes[i+offset]&0xff); +} +}else{ +hibyte<<=8; +for(var i=count;i-->0;){ +value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); +} +} +return value.join(''); +} +}else{ +var s=""; +for(var i=0;ibytes.length){ + throw new IndexOutOfBoundsException(); + } + if(length>0){ + var isChar=(bytes[offset].length!=null); + if(isChar){ + for(var i=0;i0;){ + value[i]=String.fromCharCode(bytes[i+offset]&0xff); + } + }else{ + hibyte<<=8; + for(var i=count;i-->0;){ + value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff)); + } + } + return value.join(''); +default: + var s=""; + for(var i=0;i= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680 + || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000)); +},"~N"); +c$.isLetter=Clazz.defineMethod(c$,"isLetter", +function(c){ +c = c.charCodeAt(0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122); +},"~N"); +c$.isLetterOrDigit=Clazz.defineMethod(c$,"isLetterOrDigit", +function(c){ +c = c.charCodeAt(0); +return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57); +},"~N"); +c$.isSpaceChar=Clazz.defineMethod(c$,"isSpaceChar", +function(c){ + var i = c.charCodeAt(0); +if(i==0x20||i==0xa0||i==0x1680)return true; +if(i<0x2000)return false; +return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000; +},"~N"); +c$.digit=Clazz.defineMethod(c$,"digit", +function(c,radix){ +var i = c.charCodeAt(0); +if(radix >= 2 && radix <= 36){ + if(i < 128){ + var result = -1; + if(48 <= i && i <= 57){ + result = i - 48; + }else if(97 <= i && i <= 122){ + result = i - 87; + }else if(65 <= i && i <= 90){ + result=i-(55); + } + return (result < radix ? result : -1); + } +} +return -1; +},"~N,~N"); +Clazz.overrideMethod(c$,"toString", +function(){ +var buf=[this.value]; +return String.valueOf(buf); +}); +c$.toString=Clazz.overrideMethod(c$,"toString", +function(c){ +{ +if(this===Character){ +return"class java.lang.Character"; +} +}return String.valueOf(c); +},"~N"); +Clazz.defineStatics(c$, +"MIN_VALUE",'\u0000', +"MAX_VALUE",'\uffff', +"MIN_RADIX",2, +"MAX_RADIX",36, +"TYPE",null); + +java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character; + + + +Clazz._ArrayWrapper = function(a, type) { + return { + a: a, + __CLASS_NAME__:"Array", + superClazz: Array, + getComponentType: function() {return type}, + instanceOf: function(o) { return Clazz.instanceOf(type, o) }, + getName: function() { return this.__CLASS_NAME__ } + }; +} +c$=Clazz_declareType(java.lang.reflect,"Array"); +c$.newInstance=Clazz_defineMethod(c$,"newInstance", +function(componentType,size){ +var a = Clazz_newArray(size); + a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);}; +return a; +},"Class,~N"); + +javautil.Date=Date; +Date.TYPE="javautil.Date"; +Date.__CLASS_NAME__="Date"; +Clazz.implementOf(Date,[java.io.Serializable,java.lang.Comparable]); + +Clazz.defineMethod(javautil.Date,"clone", +function(){ +return new Date(this.getTime()); +}); + +Clazz.defineMethod(javautil.Date,"before", +function(when){ +return this.getTime()when.getTime(); +},"javautil.Date"); +Clazz.defineMethod(javautil.Date,"equals", +function(obj){ +return Clazz.instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime(); +},"Object"); +Clazz.defineMethod(javautil.Date,"compareTo", +function(anotherDate){ +var thisTime=this.getTime(); +var anotherTime=anotherDate.getTime(); +return(thisTime>32)); +}); + +c$=Clazz.decorateAsClass(function(){ +this.source=null; +Clazz.instantialize(this,arguments); +},javautil,"EventObject",null,java.io.Serializable); +Clazz.makeConstructor(c$, +function(source){ +if(source!=null)this.source=source; +else throw new IllegalArgumentException(); +},"~O"); +Clazz.defineMethod(c$,"getSource", +function(){ +return this.source; +}); +Clazz.overrideMethod(c$,"toString", +function(){ +return this.getClass().getName()+"[source="+String.valueOf(this.source)+']'; +}); +Clazz.declareInterface(javautil,"EventListener"); + +c$=Clazz.decorateAsClass(function(){ +this.listener=null; +Clazz.instantialize(this,arguments); +},javautil,"EventListenerProxy",null,javautil.EventListener); +Clazz.makeConstructor(c$, +function(listener){ +this.listener=listener; +},"javautil.EventListener"); +Clazz.defineMethod(c$,"getListener", +function(){ +return this.listener; +}); +Clazz.declareInterface(javautil,"Iterator"); + +Clazz.declareInterface(javautil,"ListIterator",javautil.Iterator); +Clazz.declareInterface(javautil,"Enumeration"); +Clazz.declareInterface(javautil,"Collection",Iterable); + +Clazz.declareInterface(javautil,"Set",javautil.Collection); +Clazz.declareInterface(javautil,"Map"); +Clazz.declareInterface(javautil.Map,"Entry"); + +Clazz.declareInterface(javautil,"List",javautil.Collection); + +Clazz.declareInterface(javautil,"Queue",javautil.Collection); +Clazz.declareInterface(javautil,"RandomAccess"); +c$=Clazz.decorateAsClass(function(){ +this.detailMessage=null; +this.cause=null; +this.stackTrace=null; +Clazz.instantialize(this,arguments); +},java.lang,"Throwable",null,java.io.Serializable); +Clazz.prepareFields(c$,function(){ +this.cause=this; +//alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller) +}); +Clazz.makeConstructor(c$, +function(){ +this.fillInStackTrace(); +}); +Clazz.makeConstructor(c$, +function(message){ +this.fillInStackTrace(); +this.detailMessage=message; +},"~S"); +Clazz.makeConstructor(c$, +function(message,cause){ +this.fillInStackTrace(); +this.detailMessage=message; +this.cause=cause; +},"~S,Throwable"); +Clazz.makeConstructor(c$, +function(cause){ +this.fillInStackTrace(); +this.detailMessage=(cause==null?null:cause.toString()); +this.cause=cause; +},"Throwable"); +Clazz.defineMethod(c$,"getMessage", +function(){ +return (this.message || this.detailMessage || this.toString()); +}); +Clazz.defineMethod(c$,"getLocalizedMessage", +function(){ +return this.getMessage(); +}); +Clazz.defineMethod(c$,"getCause", +function(){ +return(this.cause===this?null:this.cause); +}); +Clazz.defineMethod(c$,"initCause", +function(cause){ +if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause"); +if(cause===this)throw new IllegalArgumentException("Self-causation not permitted"); +this.cause=cause; +return this; +},"Throwable"); +Clazz.overrideMethod(c$,"toString", +function(){ +var s=this.getClass().getName(); +var message=this.message || this.detailMessage; +return(message ? s+": "+message : s); +}); +Clazz.defineMethod(c$,"printStackTrace", +function(){ +System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz.getStackTrace()); +}); + +Clazz.defineMethod(c$,"getStackTrace", +function(){ +var s = "" + this + "\n"; +for(var i=0;i-1||caller!=null){ +var clazzName=null; +var nativeClass=null; +if(!noLooping||caller==Clazz.tryToSearchAndExecute||caller==Clazz.superCall||caller==null){ +if(index<0){ +break; +} +noLooping=true; +superCaller=Clazz._callingStackTraces[index].caller; +nativeClass=Clazz._callingStackTraces[index].owner; +index--; +}else{ +superCaller=caller; +if(superCaller.claxxOwner!=null){ +nativeClass=superCaller.claxxOwner; +}else if(superCaller.exClazz!=null){ +nativeClass=superCaller.exClazz; +} +} +var st=new StackTraceElement( +((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)? +nativeClass.__CLASS_NAME__:"anonymous"), +((superCaller.exName==null)?"anonymous":superCaller.exName) ++" ("+Clazz.getParamsType(superCaller.arguments)+")", +null,-1); +st.nativeClazz=nativeClass; +this.stackTrace[this.stackTrace.length]=st; +for(var i=0;i":this.declaringClass; +}); +Clazz.defineMethod(c$,"getFileName", +function(){ +return this.fileName; +}); +Clazz.defineMethod(c$,"getLineNumber", +function(){ +return this.lineNumber; +}); +Clazz.defineMethod(c$,"getMethodName", +function(){ +return(this.methodName==null)?"":this.methodName; +}); +Clazz.overrideMethod(c$,"hashCode", +function(){ +if(this.methodName==null){ +return 0; +}return this.methodName.hashCode()^this.declaringClass.hashCode(); +}); +Clazz.defineMethod(c$,"isNativeMethod", +function(){ +return this.lineNumber==-2; +}); +Clazz.overrideMethod(c$,"toString", +function(){ +var buf=new StringBuilder(80); +buf.append(this.getClassName()); +buf.append('.'); +buf.append(this.getMethodName()); +if(this.isNativeMethod()){ +buf.append("(Native Method)"); +}else{ +var fName=this.getFileName(); +if(fName==null){ +buf.append("(Unknown Source)"); +}else{ +var lineNum=this.getLineNumber(); +buf.append('('); +buf.append(fName); +if(lineNum>=0){ +buf.append(':'); +buf.append(lineNum); +}buf.append(')'); +}}return buf.toString(); +}); +TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz.getStackTrace())}); +c$=Clazz.declareType(java.lang,"Error",Throwable); + +c$=Clazz.declareType(java.lang,"LinkageError",Error); + +c$=Clazz.declareType(java.lang,"IncompatibleClassChangeError",LinkageError); + +c$=Clazz.declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError); + +c$=Clazz.declareType(java.lang,"AssertionError",Error); +Clazz.makeConstructor(c$, +function(detailMessage){ +Clazz.superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz.instanceOf(detailMessage,Throwable)?detailMessage:null)]); +},"~O"); +Clazz.makeConstructor(c$, +function(detailMessage){ +this.construct("" + detailMessage); +},"~B"); +Clazz.makeConstructor(c$, +function(detailMessage){ +this.construct("" + detailMessage); +},"~N"); + +c$=Clazz.declareType(java.lang,"ClassCircularityError",LinkageError); + +c$=Clazz.declareType(java.lang,"ClassFormatError",LinkageError); + +c$=Clazz.decorateAsClass(function(){ +this.exception=null; +Clazz.instantialize(this,arguments); +},java.lang,"ExceptionInInitializerError",LinkageError); +Clazz.makeConstructor(c$, +function(){ +Clazz.superConstructor(this,ExceptionInInitializerError); +this.initCause(null); +}); +Clazz.makeConstructor(c$, +function(detailMessage){ +Clazz.superConstructor(this,ExceptionInInitializerError,[detailMessage]); +this.initCause(null); +},"~S"); +Clazz.makeConstructor(c$, +function(exception){ +Clazz.superConstructor(this,ExceptionInInitializerError); +this.exception=exception; +this.initCause(exception); +},"Throwable"); +Clazz.defineMethod(c$,"getException", +function(){ +return this.exception; +}); +Clazz.overrideMethod(c$,"getCause", +function(){ +return this.exception; +}); + +c$=Clazz.declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError); + +c$=Clazz.declareType(java.lang,"InstantiationError",IncompatibleClassChangeError); + +c$=Clazz.declareType(java.lang,"VirtualMachineError",Error); + +c$=Clazz.declareType(java.lang,"InternalError",VirtualMachineError); + +c$=Clazz.declareType(java.lang,"NoClassDefFoundError",LinkageError); + +c$=Clazz.declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError); + +c$=Clazz.declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError); + +c$=Clazz.declareType(java.lang,"OutOfMemoryError",VirtualMachineError); + +c$=Clazz.declareType(java.lang,"StackOverflowError",VirtualMachineError); + +c$=Clazz.declareType(java.lang,"UnknownError",VirtualMachineError); + +c$=Clazz.declareType(java.lang,"UnsatisfiedLinkError",LinkageError); + +c$=Clazz.declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError); + +c$=Clazz.declareType(java.lang,"VerifyError",LinkageError); + +c$=Clazz.declareType(java.lang,"ThreadDeath",Error); +Clazz.makeConstructor(c$, +function(){ +Clazz.superConstructor(this,ThreadDeath,[]); +}); + +c$=Clazz.declareType(java.lang,"Exception",Throwable); + +c$=Clazz.declareType(java.lang,"RuntimeException",Exception); + +c$=Clazz.declareType(java.lang,"ArithmeticException",RuntimeException); + +c$=Clazz.declareType(java.lang,"IndexOutOfBoundsException",RuntimeException); + +c$=Clazz.declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException); +Clazz.makeConstructor(c$, +function(index){ +Clazz.superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]); +},"~N"); + +c$=Clazz.declareType(java.lang,"ArrayStoreException",RuntimeException); + +c$=Clazz.declareType(java.lang,"ClassCastException",RuntimeException); + +c$=Clazz.decorateAsClass(function(){ +this.ex=null; +Clazz.instantialize(this,arguments); +},java.lang,"ClassNotFoundException",Exception); +Clazz.makeConstructor(c$, +function(){ +Clazz.superConstructor(this,ClassNotFoundException,[Clazz.castNullAs("Throwable")]); +}); +Clazz.makeConstructor(c$, +function(detailMessage){ +Clazz.superConstructor(this,ClassNotFoundException,[detailMessage,null]); +},"~S"); +Clazz.makeConstructor(c$, +function(detailMessage,exception){ +Clazz.superConstructor(this,ClassNotFoundException,[detailMessage]); +this.ex=exception; +},"~S,Throwable"); +Clazz.defineMethod(c$,"getException", +function(){ +return this.ex; +}); +Clazz.overrideMethod(c$,"getCause", +function(){ +return this.ex; +}); + +c$=Clazz.declareType(java.lang,"CloneNotSupportedException",Exception); + +c$=Clazz.declareType(java.lang,"IllegalAccessException",Exception); + +c$=Clazz.declareType(java.lang,"IllegalArgumentException",RuntimeException); +Clazz.makeConstructor(c$, +function(cause){ +Clazz.superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz.declareType(java.lang,"IllegalMonitorStateException",RuntimeException); + +c$=Clazz.declareType(java.lang,"IllegalStateException",RuntimeException); +Clazz.makeConstructor(c$, +function(cause){ +Clazz.superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz.declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException); + +c$=Clazz.declareType(java.lang,"InstantiationException",Exception); + +c$=Clazz.declareType(java.lang,"InterruptedException",Exception); + +c$=Clazz.declareType(java.lang,"NegativeArraySizeException",RuntimeException); + +c$=Clazz.declareType(java.lang,"NoSuchFieldException",Exception); + +c$=Clazz.declareType(java.lang,"NoSuchMethodException",Exception); + +c$=Clazz.declareType(java.lang,"NullPointerException",RuntimeException); + +c$=Clazz.declareType(java.lang,"NumberFormatException",IllegalArgumentException); + +c$=Clazz.declareType(java.lang,"SecurityException",RuntimeException); +Clazz.makeConstructor(c$, +function(cause){ +Clazz.superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz.declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException); +Clazz.makeConstructor(c$, +function(index){ +Clazz.superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]); +},"~N"); + +c$=Clazz.declareType(java.lang,"UnsupportedOperationException",RuntimeException); +Clazz.makeConstructor(c$, +function(){ +Clazz.superConstructor(this,UnsupportedOperationException,[]); +}); +Clazz.makeConstructor(c$, +function(cause){ +Clazz.superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]); +},"Throwable"); + +c$=Clazz.decorateAsClass(function(){ +this.target=null; +Clazz.instantialize(this,arguments); +},java.lang.reflect,"InvocationTargetException",Exception); +Clazz.makeConstructor(c$, +function(){ +Clazz.superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz.castNullAs("Throwable")]); +}); +Clazz.makeConstructor(c$, +function(exception){ +Clazz.superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]); +this.target=exception; +},"Throwable"); +Clazz.makeConstructor(c$, +function(exception,detailMessage){ +Clazz.superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]); +this.target=exception; +},"Throwable,~S"); +Clazz.defineMethod(c$,"getTargetException", +function(){ +return this.target; +}); +Clazz.overrideMethod(c$,"getCause", +function(){ +return this.target; +}); + +c$=Clazz.decorateAsClass(function(){ +this.undeclaredThrowable=null; +Clazz.instantialize(this,arguments); +},java.lang.reflect,"UndeclaredThrowableException",RuntimeException); +Clazz.makeConstructor(c$, +function(exception){ +Clazz.superConstructor(this,java.lang.reflect.UndeclaredThrowableException); +this.undeclaredThrowable=exception; +this.initCause(exception); +},"Throwable"); +Clazz.makeConstructor(c$, +function(exception,detailMessage){ +Clazz.superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]); +this.undeclaredThrowable=exception; +this.initCause(exception); +},"Throwable,~S"); +Clazz.defineMethod(c$,"getUndeclaredThrowable", +function(){ +return this.undeclaredThrowable; +}); +Clazz.overrideMethod(c$,"getCause", +function(){ +return this.undeclaredThrowable; +}); + +c$=Clazz.declareType(java.io,"IOException",Exception); + + +c$=Clazz.declareType(java.io,"CharConversionException",java.io.IOException); + +c$=Clazz.declareType(java.io,"EOFException",java.io.IOException); + +c$=Clazz.declareType(java.io,"FileNotFoundException",java.io.IOException); + +c$=Clazz.decorateAsClass(function(){ +this.bytesTransferred=0; +Clazz.instantialize(this,arguments); +},java.io,"InterruptedIOException",java.io.IOException); + +c$=Clazz.declareType(java.io,"ObjectStreamException",java.io.IOException); + +c$=Clazz.decorateAsClass(function(){ +this.classname=null; +Clazz.instantialize(this,arguments); +},java.io,"InvalidClassException",java.io.ObjectStreamException); +Clazz.makeConstructor(c$, +function(className,detailMessage){ +Clazz.superConstructor(this,java.io.InvalidClassException,[detailMessage]); +this.classname=className; +},"~S,~S"); +Clazz.defineMethod(c$,"getMessage", +function(){ +var msg=Clazz.superCall(this,java.io.InvalidClassException,"getMessage",[]); +if(this.classname!=null){ +msg=this.classname+';' + ' '+msg; +}return msg; +}); + +c$=Clazz.declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException); + +c$=Clazz.declareType(java.io,"NotActiveException",java.io.ObjectStreamException); + +c$=Clazz.declareType(java.io,"NotSerializableException",java.io.ObjectStreamException); + +c$=Clazz.decorateAsClass(function(){ +this.eof=false; +this.length=0; +Clazz.instantialize(this,arguments); +},java.io,"OptionalDataException",java.io.ObjectStreamException); + +c$=Clazz.declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException); + +c$=Clazz.declareType(java.io,"SyncFailedException",java.io.IOException); + +c$=Clazz.declareType(java.io,"UnsupportedEncodingException",java.io.IOException); + +c$=Clazz.declareType(java.io,"UTFDataFormatException",java.io.IOException); + +c$=Clazz.decorateAsClass(function(){ +this.detail=null; +Clazz.instantialize(this,arguments); +},java.io,"WriteAbortedException",java.io.ObjectStreamException); +Clazz.makeConstructor(c$, +function(detailMessage,rootCause){ +Clazz.superConstructor(this,java.io.WriteAbortedException,[detailMessage]); +this.detail=rootCause; +this.initCause(rootCause); +},"~S,Exception"); +Clazz.defineMethod(c$,"getMessage", +function(){ +var msg=Clazz.superCall(this,java.io.WriteAbortedException,"getMessage",[]); +return (this.detail ? msg + "; "+this.detail.toString() : msg); +}); +Clazz.overrideMethod(c$,"getCause", +function(){ +return this.detail; +}); + +c$=Clazz.declareType(javautil,"ConcurrentModificationException",RuntimeException); +Clazz.makeConstructor(c$, +function(){ +Clazz.superConstructor(this,javautil.ConcurrentModificationException,[]); +}); + +c$=Clazz.declareType(javautil,"EmptyStackException",RuntimeException); + +c$=Clazz.decorateAsClass(function(){ +this.className=null; +this.key=null; +Clazz.instantialize(this,arguments); +},javautil,"MissingResourceException",RuntimeException); +Clazz.makeConstructor(c$, +function(detailMessage,className,resourceName){ +Clazz.superConstructor(this,javautil.MissingResourceException,[detailMessage]); +this.className=className; +this.key=resourceName; +},"~S,~S,~S"); +Clazz.defineMethod(c$,"getClassName", +function(){ +return this.className; +}); +Clazz.defineMethod(c$,"getKey", +function(){ +return this.key; +}); + +c$=Clazz.declareType(javautil,"NoSuchElementException",RuntimeException); + +c$=Clazz.declareType(javautil,"TooManyListenersException",Exception); + +c$=Clazz.declareType(java.lang,"Void"); +Clazz.defineStatics(c$, +"TYPE",null); +{ +java.lang.Void.TYPE=java.lang.Void; +}Clazz.declareInterface(java.lang.reflect,"GenericDeclaration"); +Clazz.declareInterface(java.lang.reflect,"AnnotatedElement"); + +c$=Clazz.declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement); +Clazz.makeConstructor(c$, +function(){ +}); +Clazz.defineMethod(c$,"isAccessible", +function(){ +return false; +}); +c$.setAccessible=Clazz.defineMethod(c$,"setAccessible", +function(objects,flag){ +return; +},"~A,~B"); +Clazz.defineMethod(c$,"setAccessible", +function(flag){ +return; +},"~B"); +Clazz.overrideMethod(c$,"isAnnotationPresent", +function(annotationType){ +return false; +},"Class"); +Clazz.overrideMethod(c$,"getDeclaredAnnotations", +function(){ +return new Array(0); +}); +Clazz.overrideMethod(c$,"getAnnotations", +function(){ +return new Array(0); +}); +Clazz.overrideMethod(c$,"getAnnotation", +function(annotationType){ +return null; +},"Class"); +c$.marshallArguments=Clazz.defineMethod(c$,"marshallArguments", +function(parameterTypes,args){ +return null; +},"~A,~A"); +Clazz.defineMethod(c$,"invokeV", +function(receiver,args){ +return; +},"~O,~A"); +Clazz.defineMethod(c$,"invokeL", +function(receiver,args){ +return null; +},"~O,~A"); +Clazz.defineMethod(c$,"invokeI", +function(receiver,args){ +return 0; +},"~O,~A"); +Clazz.defineMethod(c$,"invokeJ", +function(receiver,args){ +return 0; +},"~O,~A"); +Clazz.defineMethod(c$,"invokeF", +function(receiver,args){ +return 0.0; +},"~O,~A"); +Clazz.defineMethod(c$,"invokeD", +function(receiver,args){ +return 0.0; +},"~O,~A"); +c$.emptyArgs=c$.prototype.emptyArgs=new Array(0); +Clazz.declareInterface(java.lang.reflect,"InvocationHandler"); +c$=Clazz.declareInterface(java.lang.reflect,"Member"); +Clazz.defineStatics(c$, +"PUBLIC",0, +"DECLARED",1); + +c$=Clazz.declareType(java.lang.reflect,"Modifier"); +Clazz.makeConstructor(c$, +function(){ +}); +c$.isAbstract=Clazz.defineMethod(c$,"isAbstract", +function(modifiers){ +return((modifiers&1024)!=0); +},"~N"); +c$.isFinal=Clazz.defineMethod(c$,"isFinal", +function(modifiers){ +return((modifiers&16)!=0); +},"~N"); +c$.isInterface=Clazz.defineMethod(c$,"isInterface", +function(modifiers){ +return((modifiers&512)!=0); +},"~N"); +c$.isNative=Clazz.defineMethod(c$,"isNative", +function(modifiers){ +return((modifiers&256)!=0); +},"~N"); +c$.isPrivate=Clazz.defineMethod(c$,"isPrivate", +function(modifiers){ +return((modifiers&2)!=0); +},"~N"); +c$.isProtected=Clazz.defineMethod(c$,"isProtected", +function(modifiers){ +return((modifiers&4)!=0); +},"~N"); +c$.isPublic=Clazz.defineMethod(c$,"isPublic", +function(modifiers){ +return((modifiers&1)!=0); +},"~N"); +c$.isStatic=Clazz.defineMethod(c$,"isStatic", +function(modifiers){ +return((modifiers&8)!=0); +},"~N"); +c$.isStrict=Clazz.defineMethod(c$,"isStrict", +function(modifiers){ +return((modifiers&2048)!=0); +},"~N"); +c$.isSynchronized=Clazz.defineMethod(c$,"isSynchronized", +function(modifiers){ +return((modifiers&32)!=0); +},"~N"); +c$.isTransient=Clazz.defineMethod(c$,"isTransient", +function(modifiers){ +return((modifiers&128)!=0); +},"~N"); +c$.isVolatile=Clazz.defineMethod(c$,"isVolatile", +function(modifiers){ +return((modifiers&64)!=0); +},"~N"); +c$.toString=Clazz.defineMethod(c$,"toString", +function(modifiers){ +var sb=new Array(0); +if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public"; +if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected"; +if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private"; +if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract"; +if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static"; +if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final"; +if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient"; +if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile"; +if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized"; +if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native"; +if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp"; +if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface"; +if(sb.length>0){ +return sb.join(" "); +}return""; +},"~N"); +Clazz.defineStatics(c$, +"PUBLIC",0x1, +"PRIVATE",0x2, +"PROTECTED",0x4, +"STATIC",0x8, +"FINAL",0x10, +"SYNCHRONIZED",0x20, +"VOLATILE",0x40, +"TRANSIENT",0x80, +"NATIVE",0x100, +"INTERFACE",0x200, +"ABSTRACT",0x400, +"STRICT",0x800, +"BRIDGE",0x40, +"VARARGS",0x80, +"SYNTHETIC",0x1000, +"ANNOTATION",0x2000, +"ENUM",0x4000); + +c$=Clazz.decorateAsClass(function(){ +this.clazz=null; +this.parameterTypes=null; +this.exceptionTypes=null; +this.modifiers=0; +Clazz.instantialize(this,arguments); +},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]); +Clazz.makeConstructor(c$, +function(declaringClass,parameterTypes,checkedExceptions,modifiers){ +Clazz.superConstructor(this,java.lang.reflect.Constructor,[]); +this.clazz=declaringClass; +this.parameterTypes=parameterTypes; +this.exceptionTypes=checkedExceptions; +this.modifiers=modifiers; +},"Class,~A,~A,~N"); +Clazz.overrideMethod(c$,"getTypeParameters", +function(){ +return null; +}); +Clazz.defineMethod(c$,"toGenericString", +function(){ +return null; +}); +Clazz.defineMethod(c$,"getGenericParameterTypes", +function(){ +return null; +}); +Clazz.defineMethod(c$,"getGenericExceptionTypes", +function(){ +return null; +}); +Clazz.defineMethod(c$,"getParameterAnnotations", +function(){ +return null; +}); +Clazz.defineMethod(c$,"isVarArgs", +function(){ +return false; +}); +Clazz.overrideMethod(c$,"isSynthetic", +function(){ +return false; +}); +Clazz.overrideMethod(c$,"equals", +function(object){ +if(object!=null&&Clazz.instanceOf(object,java.lang.reflect.Constructor)){ +var other=object; +if(this.getDeclaringClass()===other.getDeclaringClass()){ +var params1=this.parameterTypes; +var params2=other.parameterTypes; +if(params1.length==params2.length){ +for(var i=0;i= 0 || outside_event_name.indexOf("touchend") >= 0) && Jmol._setMouseOwner(null); + var elem = $(this); + if ( this !== event.target && !elem.has(event.target).length ) { + //BH: adds event to pass that along to our handler as well. + elem.triggerHandler( outside_event_name, [ event.target, event ] ); + } + }); + }; + }; +})(jQuery,document,"click mousemove mouseup touchmove touchend", "outjsmol"); diff --git a/site/js/j2sSwingJS.js b/site/js/j2sSwingJS.js new file mode 100644 index 0000000..c4e47ed --- /dev/null +++ b/site/js/j2sSwingJS.js @@ -0,0 +1,5427 @@ +// j2sjmol.js + +// latest author: Bob Hanson, St. Olaf College, hansonr@stolaf.edu + +// Requires JSmolCore.js and (for now; probably) JSmol.js +// This version of j2slib requires jQuery and works in both Chrome and MSIE locally, +// though Chrome cannot read local data files, and MSIE cannot read local binary data files. + +// Java programming notes by Bob Hanson: +// +// There are a few motifs to avoid when optimizing Java code to work smoothly +// with the J2S compiler: +// +// arrays: +// +// 1. an array with null elements cannot be typed and must be avoided. +// 2. instances of Java "instance of" involving arrays must be found and convered to calls to Clazz.isA... +// 3. new int[n][] must not be used. Use instead JU.AU.newInt2(n); +// 4. new int[] { 1, 2, 3 } has problems because it creates simply [ ] and not IntArray32 +// +// numbers: +// +// 1. Remember that EVERY number in JavaScript is a double -- doesn't matter if it is in IntArray32 or not. +// 2. You cannot reliably use Java long, because doubles consume bits for the exponent which cannot be tested. +// 3. Bit 31 of an integer is unreliable, since (int) -1 is now , not just 0zFFFFFFFF, and +// FFFFFFFF + 1 = 100000000, not 0. In JavaScript, 0xFFFFFFFF is 4294967295, not -1. +// This means that writeInt(b) will fail if b is negative. What you need is instead +// writeInt((int)(b & 0xFFFFFFFFl) so that JavaScript knocks off the high bits explicitly. +// +// general: +// +// 1. j2sRequireImport xxxx is needed if xxxx is a method used in a static function +// 2. URL.getContent() is not supported. Use other means based on URL.toString() +// 3. It is critical for performance to avoid any significant amount of function overloading. +// In particular, methods such as xxx(int a, int b) and xxx(float a, int b) MUST be renamed, +// because JavaScript only has Number, and there is absolutely no way to tell these apart. +// It's probably bad Java programming, anyway. +// 4. Calls to super(...) can almost always be avoided. These trigger the SAEM +// (searchAndExecuteMethod) call, and it is very destructive to performance. +// Just find another way to do it. + + // NOTES by Bob Hanson: + + // J2S class changes: + + // BH 7/24/2015 6:48:50 AM adding optional ?j2sdebug flag on page URL + // -- switches to using j2s/core/corexxx.js, not j2s/core/corexxx.z.js + // -- adds ";//# sourceURL="+file in eval(js) + // -- enables DebugJS.$(msg) call to debugger; + // see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger + // see https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Debug_eval_sources + // BH 7/23/2015 6:45:55 PM added sourceURL in each js class eval(), allowing full + // breakpoint debugging and code checking in Firefox and Chrome + // BH 7/19/2015 6:18:17 PM added os.name, line.separator, etc. to System.getProperty() + // BH 7/19/2015 5:39:10 PM added java.lang.System = System + // BH 7/19/2015 10:33:10 AM fix for SAEM equating "null" with number or boolean + // BH 7/18/2015 6:08:05 PM for Jmol I was able to remove the $private/$fx business, but now + // I see that in general that cannot be done. Thinking about a strategy... + // BH 7/18/2015 4:43:38 PM better handling of TypeError and InternalError for e.getMessage() and e.getStackTrace() + // BH 7/17/2015 11:51:15 AM adds class.getResource(name) and class.getResourceAsStream(name) + // BH 7/16/2015 7:56:49 PM general instantiation using any constructor (in Java here): + // BH x = class.forName("my.class.name").newInstance() + // BH or + // BH x = class.forName("my.class.name").getConstructor(String.class,String.class).newInstance(new Object[] {"test", "now"}) + // BH 7/15/2015 11:34:58 PM adding System.lineSeparator() + // BH 7/15/2015 7:32:41 AM adding class.getCanonicalName == getName + // BH 5/31/2015 5:38:14 PM NPEExceptionPredicate fix + // BH 4/25/2015 9:16:12 AM SAEM misrepresnting Number as Object in parameters and Integer as Number + // BH 4/24/2015 7:32:54 AM Object.hashCode() and System.getIdentityHashCode() fail. changed to: return this._$hashcode || (this._$hashcode = ++Clazz._hashCode) + // BH 4/23/2015 9:08:59 AM Clazz.instanceOf(a, b) needs to check for a == b. + // BH 4/23/2015 9:08:59 AM xx.getContentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works + // BH 4/12/2015 11:48:03 AM added Clazz.getStackTrace(-n) -- reports actual parameter values for n levels + // BH 4/10/2015 8:23:05 AM adding Int32Array.prototype.clone and Float64.prototype.clone + // BH 4/5/2015 8:12:57 AM refactoring j2slib (this file) to make private functions really private using var + // BH 4/3/2015 6:14:34 AM adding anonymous local "ClazzLoader" (Clazz._Loader) --> "_Loader" + // BH 4/3/2015 6:14:34 AM adding Clazz._Loader._classPending, Clazz._Loader._classCount + // BH 4/3/2015 6:14:34 AM adding Clazz._Loader._checkLoad + // -- forces asynchronous class loading + // -- builds Clazz._Loader._classPending and Clazz._classCount + // -- allows reporting + + // BH 3/24/2015 4:11:26 AM better file load failure message in _Loader.evaluate + // BH 2/28/2015 7:30:25 AM corrects newIntArray32() and newArray() for pre-defined arrays + // int[] a = new int[] {1,2,3,343}; + // int[][] b = new int[][] {new int[]{4,5},new int[]{5,6}}; + + // BH 9/29/2014 11:34:19 PM removing support for getClass().isArray() + // BH 8/29/2014 9:15:57 AM total reworking of Java2Script in preparation for all-asynchronous loading + // (currently sync loading is only for + // LOAD command and load() function without ASYNC + // getInterface() + // see JSmol.js and Jmol._isAsync flag + // BH 5/11/2015 5:58:42 AM adding __signatures for debugging SAEM issues + // BH 3/29/2015 8:12:44 PM System.getProperty(x, "") does not return "" + // BH 8/23/2014 10:04:19 AM cleaning up a few general methods; Clazz.removeArrayItem + // BH 6/1/2014 10:58:46 AM fix for Clazz.isAP() not working + // BH 5/26/2014 5:19:29 PM removing superConstructor call in creating Enum constants + // BH 4/1/2014 7:55:54 PM removing all $fz references and instances where sub/super classes have same private function names + // BH 4/1/2014 4:47:30 PM all $_X removed; this is taken care of by Google Closure Compiler + // BH 4/1/2014 6:40:08 AM removing ClassLoader -- equals Clazz._Loader + // BH 4/1/2014 6:40:08 AM removing ClassLoaderProgressMonitor -- equals _LoaderProgressMonitor + // BH 4/1/2014 6:17:21 AM removing Class -- only used for "Class.forName" in Jmol, which ANT will now change to "Clazz._4Name" + // BH 3/7/2014 9:05:06 AM Array.prototype.toString should not be aliased. -- http://sourceforge.net/p/jmol/bugs/560/ with Google Visualization + + // BH 1/30/2014 12:54:22 PM gave all field variables prefix underscore. This allows Google Closure Compiler to skip them. + // BH 12/3/2013 3:39:57 PM window["j2s.lib"].base implemented + // BH 12/1/2013 5:34:21 AM removed _LoaderProgressMonitor.initialize and all Clazz.event business; handled by Jmol.clearVars() + // BH 11/30/2013 12:43:58 PM adding Clazz.arrayIs() -- avoids Number.constructor.toString() infinite recursion + // BH 11/29/2013 6:33:51 AM adding Clazz._profiler -- reports use of SAEM + // BH 11/10/2013 9:02:20 AM fixing fading in MSIE + // BH 11/3/2013 7:21:39 AM additional wrapping functions for better compressibility + // BH 10/30/2013 8:10:58 AM added getClass().getResource() -- returning a relative string, not a URL + // BH 10/30/2013 6:43:00 AM removed second System def and added System.$props and default System.property "line.separator" + // BH 6/15/2013 8:02:07 AM corrections to Class.isAS to return true if first element is null + // BH 6/14/2013 4:41:09 PM corrections to Clazz.isAI and related methods to include check for null object + // BH 3/17/2013 11:54:28 AM adds stackTrace for ERROR + + // BH 3/13/2013 6:58:26 PM adds Clazz.clone(me) for BS clone + // BH 3/12/2013 6:30:53 AM fixes Clazz.exceptionOf for ERROR condition trapping + // BH 3/2/2013 9:09:53 AM delete globals c$ and $fz + // BH 3/2/2013 9:10:45 AM optimizing defineMethod using "look no further" "@" parameter designation (see "\\@" below -- removed 3/23/13) + // BH 2/27/2013 optimizing Clazz.getParamsType for common cases () and (Number) + // BH 2/27/2013 optimizing SAEM delegation for hashCode and equals -- disallows overloading of equals(Object) + + // BH 2/23/2013 found String.replaceAll does not work -- solution was to never call it. + // BH 2/9/2013 9:18:03 PM Int32Array/Float64Array fixed for MSIE9 + // BH 1/25/2013 1:55:31 AM moved package.js from j2s/java to j2s/core + // BH 1/17/2013 4:37:17 PM String.compareTo() added + // BH 1/17/2013 4:52:22 PM Int32Array and Float64Array may not have .prototype.sort method + // BH 1/16/2013 6:20:34 PM Float64Array not available in Safari 5.1 + // BH 1/14/2013 11:28:58 PM Going to all doubles in JavaScript (Float64Array, not Float32Array) + // so that (new float[] {13.48f})[0] == 13.48f, effectively + + // BH 1/14/2013 12:53:41 AM Fix for Opera 10 not loading any files + // BH 1/13/2013 11:50:11 PM Fix for MSIE not loading (nonbinary) files locally + + // BH 12/1/2012 9:52:26 AM Compiler note: Thread.start() cannot be executed within the constructor; + + // BH 11/24/2012 11:08:39 AM removed unneeded sections + // BH 11/24/2012 10:23:22 AM all XHR uses sync loading (_Loader.setLoadingMode) + // BH 11/21/2012 7:30:06 PM if (base) map["@" + pkg] = base; critical for multiple applets + + // BH 10/8/2012 3:27:41 PM if (clazzName.indexOf("Array") >= 0) return "Array"; in Clazz.getClassName for function + // BH removed Clazz.ie$plit = "\\2".split (/\\/).length == 1; unnecessary; using RegEx slows process significantly in all browsers + // BH 10/6/12 added Int32Array, Float32Array, newArrayBH, upgraded java.lang and java.io + // BH added Integer.bitCount in core.z.js + // BH changed alert to Clazz.alert in java.lang.Class.js *.ClassLoader.js, java.lang.thread.js + // BH removed toString from innerFunctionNames due to infinite recursion + // BH note: Logger.error(null, e) does not work -- get no constructor for (String) (TypeError) + // BH added j2s.lib.console + // BH allowed for alias="." + // BH removed alert def --> Clazz.alert + // BH added wrapper at line 2856 + // BH newArray fix at line 2205 + // BH System.getProperty fix at line 6693 + // BH added Enum .value() method at line 2183 + // BH added System.getSecurityManager() at end + // BH added String.contains() at end + // BH added System.gc() at end + // BH added Clazz.exceptionOf = updated + // BH added String.getBytes() at end + + +LoadClazz = function() { + +// BH This is the ONLY global used in J2S now. I do not think it is necessary, +// but it is created by the compiler, and I have not found a work-around. +// it is used as a local variable in class definitions to point to the +// current method. See Clazz.p0p and Clazz.pu$h + +c$ = null; + +if (!window["j2s.clazzloaded"]) + window["j2s.clazzloaded"] = false; + +if (window["j2s.clazzloaded"])return; + +window["j2s.clazzloaded"] = true; + +window["j2s.object.native"] = true; + + // Clazz changes: + + /* http://j2s.sf.net/ *//****************************************************************************** + * Copyright (c) 2007 java2script.org and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Zhou Renjian - initial API and implementation + *****************************************************************************/ +/******* + * @author zhou renjian + * @create Nov 5, 2005 + *******/ + + +/** + * Class Clazz. All the methods are static in this class. + */ +/* static */ +/*Class = */ Clazz = { + _isQuiet: false, + _debugging: false +}; + +;(function(Clazz, Jmol) { + + +try { +Clazz._debugging = (document.location.href.indexOf("j2sdebug") >= 0); +} catch (e) { +} +var __debuggingBH = false; +var _globals = ["j2s.clazzloaded", "j2s.object.native"]; +Clazz.setGlobal = function(a, v) { + _globals.push(a); + window[a] = v; +} + +Clazz.getGlobals = function() { + return _globals.sort().join("\n"); +} + +Clazz.setConsoleDiv = function(d) { + window["j2s.lib"] && (window["j2s.lib"].console = d); +}; + +// BH Clazz.getProfile monitors exactly what is being delegated with SAEM, +// which could be a bottle-neck for function calling. +// This is critical for performance optimization. + +// Jmol.getProfile() + +var _profile = (window["j2s.doProfile"] && self.JSON ? {} : null); + +NullObject = function () {}; + +/* protected */ +Clazz._supportsNativeObject = window["j2s.object.native"]; + +if (Clazz._supportsNativeObject) { + Clazz._O = function () {}; + Clazz._O.__CLASS_NAME__ = "Object"; + Clazz._O["getClass"] = function () { return Clazz._O; }; +} else { + Clazz._O = Object; +} + +Clazz.Console = {}; +Clazz.dateToString = Date.prototype.toString; +Clazz._hashCode = 0; + +var addProto = function(proto, name, func) { + return proto[name] = func; +}; + +;(function(proto) { + addProto(proto, "equals", function (obj) { + return this == obj; + }); + + addProto(proto, "hashCode", function () { + + return this._$hashcode || (this._$hashcode = ++Clazz._hashCode) + + + try { + return this.toString ().hashCode (); + } catch (e) { + var str = ":"; + for (var s in this) { + str += s + ":" + } + return str.hashCode (); + } + }); + + addProto(proto, "getClass", function () { return Clazz.getClass (this); }); + + addProto(proto, "clone", function () { return Clazz.clone(this); }); + + Clazz.clone = function(me) { + // BH allows @j2sNative access without super constructor + var o = new me.constructor(); + for (var i in me) { + o[i] = me[i]; + } + return o; + } +/* + * Methods for thread in Object + */ + addProto(proto, "finalize", function () {}); + addProto(proto, "notify", function () {}); + addProto(proto, "notifyAll", function () {}); + addProto(proto, "wait", function () {}); + addProto(proto, "to$tring", Object.prototype.toString); + addProto(proto, "toString", function () { return (this.__CLASS_NAME__ ? "[" + this.__CLASS_NAME__ + " object]" : this.to$tring.apply(this, arguments)); }); + Clazz._extendedObjectMethods = [ "equals", "hashCode", "getClass", "clone", "finalize", "notify", "notifyAll", "wait", "to$tring", "toString" ]; + +})(Clazz._O.prototype); + +Clazz.extendJO = function(c, name) { + if (name) + c.__CLASS_NAME__ = c.prototype.__CLASS_NAME__ = name; + if (Clazz._supportsNativeObject) { + for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) { + var p = Clazz._extendedObjectMethods[i]; + addProto(c.prototype, p, Clazz._O.prototype[p]); + } + } +}; + +/** + * Try to fix bug on Safari + */ +//InternalFunction = Object; + +Clazz.extractClassName = function(clazzStr) { + // [object Int32Array] + var clazzName = clazzStr.substring (1, clazzStr.length - 1); + return (clazzName.indexOf("Array") >= 0 ? "Array" // BH -- for Float64Array and Int32Array + : clazzName.indexOf ("object ") >= 0 ? clazzName.substring (7) // IE + : clazzName); +} +/** + * Return the class name of the given class or object. + * + * @param clazzHost given class or object + * @return class name + */ +/* public */ +Clazz.getClassName = function (obj) { + if (obj == null) + return "NullObject"; + if (obj instanceof Clazz.CastedNull) + return obj.clazzName; + switch(typeof obj) { + case "number": + return "n"; + case "boolean": + return "b"; + case "string": + // Always treat the constant string as String object. + // This will be compatiable with Java String instance. + return "String"; + case "function": + if (obj.__CLASS_NAME__) + return (arguments[1] ? obj.__CLASS_NAME__ : "Class"); /* user defined class name */ + var s = obj.toString(); + var idx0 = s.indexOf("function"); + if (idx0 < 0) + return (s.charAt(0) == '[' ? Clazz.extractClassName(s) : s.replace(/[^a-zA-Z0-9]/g, '')); + var idx1 = idx0 + 8; + var idx2 = s.indexOf ("(", idx1); + if (idx2 < 0) + return "Object"; + s = s.substring (idx1, idx2); + if (s.indexOf("Array") >= 0) + return "Array"; + s = s.replace (/^\s+/, "").replace (/\s+$/, ""); + return (s == "anonymous" || s == "" ? "Function" : s); + case "object": + if (obj.__CLASS_NAME__) // user defined class name + return obj.__CLASS_NAME__; + if (!obj.constructor) + return "Object"; // For HTML Element in IE + if (!obj.constructor.__CLASS_NAME__) { + if (obj instanceof Number) + return "Number"; + if (obj instanceof Boolean) + return "Boolean"; + if (obj instanceof Array) + return "Array"; + var s = obj.toString(); + // "[object Int32Array]" + if (s.charAt(0) == '[') + return Clazz.extractClassName(s); + } + return Clazz.getClassName (obj.constructor, true); + } + // some new, unidentified class + return "Object"; +}; +/** + * Return the class of the given class or object. + * + * @param clazzHost given class or object + * @return class name + */ +/* public */ +Clazz.getClass = function (clazzHost) { + if (!clazzHost) + return Clazz._O; // null/undefined is always treated as Object + if (typeof clazzHost == "function") + return clazzHost; + var clazzName; + if (clazzHost instanceof Clazz.CastedNull) { + clazzName = clazzHost.clazzName; + } else { + switch (typeof clazzHost) { + case "string": + return String; + case "object": + if (!clazzHost.__CLASS_NAME__) + return (clazzHost.constructor || Clazz._O); + clazzName = clazzHost.__CLASS_NAME__; + break; + default: + return clazzHost.constructor; + } + } + return Clazz.evalType(clazzName, true); +}; + + +/* private */ +var checkInnerFunction = function (hostSuper, funName) { + for (var k = 0; k < Clazz.innerFunctionNames.length; k++) + if (funName == Clazz.innerFunctionNames[k] && + Clazz._innerFunctions[funName] === hostSuper[funName]) + return true; + return false; +}; + +var args4InheritClass = function () {}; + +Clazz.inheritArgs = new args4InheritClass (); + +/** + * Inherit class with "extends" keyword and also copy those static members. + * Example, as in Java, if NAME is a static member of ClassA, and ClassB + * extends ClassA then ClassB.NAME can be accessed in some ways. + * + * @param clazzThis child class to be extended + * @param clazzSuper super class which is inherited from + * @param objSuper super class instance + */ +/* protected */ +Clazz.inheritClass = function (clazzThis, clazzSuper, objSuper) { + //var thisClassName = Clazz.getClassName (clazzThis); + for (var o in clazzSuper) { + if (o != "b$" && o != "prototype" && o != "superClazz" + && o != "__CLASS_NAME__" && o != "implementz" + && !checkInnerFunction (clazzSuper, o)) { + clazzThis[o] = clazzSuper[o]; + } + } + if (Clazz.unloadedClasses[Clazz.getClassName(clazzThis, true)]) { + // Don't change clazzThis.protoype! Keep it! + } else if (objSuper) { + // ! Unsafe reference prototype to an instance! + // Feb 19, 2006 --josson + // OK for this reference to an instance, as this is anonymous instance, + // which is not referenced elsewhere. + // March 13, 2006 + clazzThis.prototype = objSuper; + } else if (clazzSuper !== Number) { + clazzThis.prototype = new clazzSuper (Clazz.inheritArgs); + } else { // Number + clazzThis.prototype = new Number (); + } + clazzThis.superClazz = clazzSuper; + /* + * Is it necessary to reassign the class name? + * Mar 10, 2006 --josson + */ + //clazzThis.__CLASS_NAME__ = thisClassName; + clazzThis.prototype.__CLASS_NAME__ = clazzThis.__CLASS_NAME__; +}; + +/** + * Implementation of Java's keyword "implements". + * As in JavaScript there are on "implements" keyword implemented, a property + * of "implementz" is added to the class to record the interfaces the class + * is implemented. + * + * @param clazzThis the class to implement + * @param interfacez Array of interfaces + */ +/* public */ +Clazz.implementOf = function (clazzThis, interfacez) { + if (arguments.length >= 2) { + if (!clazzThis.implementz) + clazzThis.implementz = []; + var impls = clazzThis.implementz; + if (arguments.length == 2) { + if (typeof interfacez == "function") { + impls.push(interfacez); + copyProperties(clazzThis, interfacez); + } else if (interfacez instanceof Array) { + for (var i = 0; i < interfacez.length; i++) { + impls.push(interfacez[i]); + copyProperties(clazzThis, interfacez[i]); + } + } + } else { + for (var i = 1; i < arguments.length; i++) { + impls.push(arguments[i]); + copyProperties(clazzThis, arguments[i]); + } + } + } +}; + +/* + * Copy members of interface + */ +/* private */ +var copyProperties = function(clazzThis, clazzSuper) { + for (var o in clazzSuper) + if (o != "b$" + && o != "prototype" && o != "superClazz" + && o != "__CLASS_NAME__" && o != "implementz" + && (typeof clazzSuper[o] != "function" || !checkInnerFunction(clazzSuper, o))) + clazzThis[o] = clazzThis.prototype[o] = clazzSuper[o]; +}; + +/** + * TODO: More should be done for interface's inheritance + */ +/* public */ +Clazz.extendInterface = Clazz.implementOf; + +/* protected */ +Clazz.equalsOrExtendsLevel = function (clazzThis, clazzAncestor) { + if (clazzThis === clazzAncestor) + return 0; + if (clazzThis.implementz) { + var impls = clazzThis.implementz; + for (var i = 0; i < impls.length; i++) { + var level = Clazz.equalsOrExtendsLevel (impls[i], clazzAncestor); + if (level >= 0) + return level + 1; + } + } + return -1; +}; + +/* protected */ +Clazz.getInheritedLevel = function (clazzTarget, clazzBase) { + if (clazzTarget === clazzBase) + return 0; + var isTgtStr = (typeof clazzTarget == "string"); + if (isTgtStr && ("void" == clazzTarget || "unknown" == clazzTarget)) + return -1; + var isBaseStr = (typeof clazzBase == "string"); + if (isBaseStr && ("void" == clazzBase || "unknown" == clazzBase)) + return -1; + if (clazzTarget === (isTgtStr ? "NullObject" : NullObject)) { + switch (clazzBase) { + case "n": + case "b": + return -1; + case Number: + case Boolean: + case NullObject: + break; + default: + return 0; + } + } + if (isTgtStr) + clazzTarget = Clazz.evalType(clazzTarget); + if (isBaseStr) + clazzBase = Clazz.evalType(clazzBase); + if (!clazzBase || !clazzTarget) + return -1; + var level = 0; + var zzalc = clazzTarget; // zzalc <--> clazz + while (zzalc !== clazzBase && level < 10) { + /* maybe clazzBase is interface */ + if (zzalc.implementz) { + var impls = zzalc.implementz; + for (var i = 0; i < impls.length; i++) { + var implsLevel = Clazz.equalsOrExtendsLevel (impls[i], clazzBase); + if (implsLevel >= 0) + return level + implsLevel + 1; + } + } + zzalc = zzalc.superClazz; + if (!zzalc) + return (clazzBase === Object || clazzBase === Clazz._O ? + // getInheritedLevel(String, CharSequence) == 1 + // getInheritedLevel(String, Object) == 1.5 + // So if both #test(CharSequence) and #test(Object) existed, + // #test("hello") will correctly call #test(CharSequence) + // instead of #test(Object). + level + 1.5 // 1.5! Special! + : -1); + level++; + } + return level; +}; + + +/** + * Implements Java's keyword "instanceof" in JavaScript's way. + * As in JavaScript part of the object inheritance is implemented in only- + * JavaScript way. + * + * @param obj the object to be tested + * @param clazz the class to be checked + * @return whether the object is an instance of the class + */ +/* public */ +Clazz.instanceOf = function (obj, clazz) { + // allows obj to be a class already, from arrayX.getClass().isInstance(y) + return (obj != null && clazz && (obj == clazz || obj instanceof clazz || Clazz.getInheritedLevel(Clazz.getClassName(obj), clazz) >= 0)); +}; + +/** + * Call super method of the class. + * The same effect as Java's expression: + * super.* () + * + * @param objThis host object + * @param clazzThis class of declaring method scope. It's hard to determine + * which super class is right class for "super.*()" call when it's in runtime + * environment. For example, + * 1. ClasssA has method #run() + * 2. ClassB extends ClassA overriding method #run() with "super.run()" call + * 3. ClassC extends ClassB + * 4. objC is an instance of ClassC + * Now we have to decide which super #run() method is to be invoked. Without + * explicit clazzThis parameter, we only know that objC.getClass() is ClassC + * and current method scope is #run(). We do not known we are in scope + * ClassA#run() or scope of ClassB#run(). if ClassB is given, Clazz can search + * all super methods that are before ClassB and get the correct super method. + * This is the reason why there must be an extra clazzThis parameter. + * @param funName method name to be called + * @param funParams Array of method parameters + */ +/* public */ +Clazz.superCall = function (objThis, clazzThis, funName, funParams) { + var fx = null; + var i = -1; + var clazzFun = objThis[funName]; + if (clazzFun) { + if (clazzFun.claxxOwner) { + // claxxOwner is a mark for methods that is single. + if (clazzFun.claxxOwner !== clazzThis) { + // This is a single method, call directly! + fx = clazzFun; + + } + } else if (!clazzFun.stacks && !(clazzFun.lastClaxxRef + && clazzFun.lastClaxxRef.prototype[funName] + && clazzFun.lastClaxxRef.prototype[funName].stacks)) { // super.toString + fx = clazzFun; + } else { // normal wrapped method + var stacks = clazzFun.stacks; + if (!stacks) + stacks = clazzFun.lastClaxxRef.prototype[funName].stacks; + for (i = stacks.length; --i >= 0;) { + /* + * Once super call is computed precisely, there are no need + * to calculate the inherited level but just an equals + * comparision + */ + //var level = Clazz.getInheritedLevel (clazzThis, stacks[i]); + if (clazzThis === stacks[i]) { // level == 0 + if (i > 0) { + fx = stacks[--i].prototype[funName]; + } else { + /* + * Will this case be reachable? + * March 4, 2006 + * Should never reach here if all things are converted + * by Java2Script + */ + fx = stacks[0].prototype[funName]["\\unknown"]; + } + break; + } else if (Clazz.getInheritedLevel (clazzThis, stacks[i]) > 0) { + fx = stacks[i].prototype[funName]; + break; + } + } // end of for loop + } // end of normal wrapped method + } // end of clazzFun + if (!fx) { + if (funName != "construct") { + Clazz.alert (["j2slib","no class found",(funParams).typeString]) + newMethodNotFoundException(objThis, clazzThis, funName, + Clazz.getParamsType(funParams).typeString); + } + /* there are members which are initialized out of the constructor */ + /* No super constructor! */ + return; + } + /* there are members which are initialized out of the constructor */ + if (i == 0 && funName == "construct") { + var ss = clazzFun.stacks; + if (ss && !ss[0].superClazz && ss[0].con$truct) + ss[0].con$truct.apply (objThis, []); + } + /*# {$no.debug.support} >>x #*/ + /* not used in Jmol + if (Clazz.tracingCalling) { + var caller = arguments.callee.caller; + if (caller === Clazz.superConstructor) { + caller = caller.arguments.callee.caller; + } + Clazz._callingStackTraces.push(new Clazz.callingStack (caller, clazzThis)); + var ret = fx.apply (objThis, (funParams == null) ? [] : funParams); + Clazz._callingStackTraces.pop(); + return ret; + } + */ + /*# x<< #*/ + return fx.apply (objThis, funParams || []); +}; + +/** + * Call super constructor of the class. + * The same effect as Java's expression: + * super () + */ +/* public */ +Clazz.superConstructor = function (objThis, clazzThis, funParams) { + Clazz.superCall (objThis, clazzThis, "construct", funParams); + /* If there are members which are initialized out of the constructor */ + if (clazzThis.con$truct) { + clazzThis.con$truct.apply (objThis, []); + } +}; + +/** + * Class for null with a given class as to be casted. + * This class will be used as an implementation of Java's casting way. + * For example, + * this.call ((String) null); + */ +/* public */ +Clazz.CastedNull = function (asClazz) { + if (asClazz) { + if (asClazz instanceof String) { + this.clazzName = asClazz; + } else if (asClazz instanceof Function) { + this.clazzName = Clazz.getClassName (asClazz, true); + } else { + this.clazzName = "" + asClazz; + } + } else { + this.clazzName = "Object"; + } + this.toString = function () { + return null; + }; + this.valueOf = function () { + return null; + }; +}; + +/** + * API for Java's casting null. + * @see Clazz.CastedNull + * + * @param asClazz given class + * @return an instance of class Clazz.CastedNull + */ +/* public */ +Clazz.castNullAs = function (asClazz) { + return new Clazz.CastedNull (asClazz); +}; + +/////////////////////////// Exception handling //////////////////////////// + +/* + * Use to mark that the Throwable instance is created or not. + * + * Called from java.lang.Throwable, as defined in JSmolJavaExt.js + * + * The underscore is important - it tells the JSmol ANT task to NOT + * turn this into Clazz_initializingException, because coreBottom2.js does + * not include that call, and so Google Closure Compiler does not minify it. + * + */ +/* public */ +Clazz._initializingException = false; + +/** + * BH: used in Throwable + * + */ +/* public */ +Clazz._callingStackTraces = []; + +/** + * MethodException will be used as a signal to notify that the method is + * not found in the current clazz hierarchy. + */ +/* private */ +var MethodException = function () { + this.toString = function () { + return "J2S MethodException"; + }; +}; +/* private */ +//var MethodNotFoundException = function () { +// this.toString = function () { +// return "J2S MethodNotFoundException"; +// }; +//}; + + var _isNPEExceptionPredicate; + +/* super private */ +;(function() { + /* sgurin: native exception detection mechanism. Only NullPointerException detected and wrapped to java excepions */ + /** private utility method for creating a general regexp that can be used later + * for detecting a certain kind of native exceptions. use with error messages like "blabla IDENTIFIER blabla" + * @param msg String - the error message + * @param spliterName String, must be contained once in msg + * spliterRegex String, a string with the regexp literal for identifying the spitter in exception further error messages. + */ + // reproduce NullPointerException for knowing how to detect them, and create detector function Clazz._isNPEExceptionPredicate + var $$o$$ = null; + + try { + $$o$$.hello(); + } catch (e) { + var _ex_reg = function(msg, spliterName, spliterRegex) { + if(!spliterRegex) + spliterRegex="[^\\s]+"; + var idx = msg.indexOf (spliterName), + str = msg.substring (0, idx) + spliterRegex + msg.substring(idx + spliterName.length), + regexp = new RegExp("^"+str+"$"); + return regexp; + }; + if(/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {// opera throws an exception with fixed messages like "Statement on line 23: Cannot convert undefined or null to Object Backtrace: Line....long text... " + var idx1 = e.message.indexOf(":"), idx2 = e.message.indexOf(":", idx1+2); + var _NPEMsgFragment = e.message.substr(idx1+1, idx2-idx1-20); + _isNPEExceptionPredicate = function(e) { return e.message.indexOf(_NPEMsgFragment)!=-1; }; + } else if(navigator.userAgent.toLowerCase().indexOf("webkit")!=-1) { //webkit, google chrome prints the property name accessed. + var _exceptionNPERegExp = _ex_reg(e.message, "hello"); + _isNPEExceptionPredicate = function(e) { return _exceptionNPERegExp.test(e.message); }; + } else {// ie, firefox and others print the name of the object accessed: + var _exceptionNPERegExp = _ex_reg(e.message, "$$o$$"); + _isNPEExceptionPredicate = function(e) { return _exceptionNPERegExp.test(e.message); }; + } + }; +})(); + +/**sgurin + * Implements Java's keyword "instanceof" in JavaScript's way **for exception objects**. + * + * calls Clazz.instanceOf if e is a Java exception. If not, try to detect known native + * exceptions, like native NullPointerExceptions and wrap it into a Java exception and + * call Clazz.instanceOf again. if the native exception can't be wrapped, false is returned. + * + * @param obj the object to be tested + * @param clazz the class to be checked + * @return whether the object is an instance of the class + * @author: sgurin + */ +Clazz.exceptionOf = function(e, clazz) { + if(e.__CLASS_NAME__) + return Clazz.instanceOf(e, clazz); + if (!e.getMessage) { + e.getMessage = function() {return "" + this}; + } + if (!e.printStackTrace) { + e.printStackTrace = function(){}; + alert(e + " try/catch path:" + Clazz.getStackTrace(-10)); + } + if(clazz == Error) { + if (("" + e).indexOf("Error") < 0) + return false; + System.out.println (Clazz.getStackTrace()); + return true; + // everything here is a Java Exception, not a Java Error + } + return (clazz == Exception || clazz == Throwable + || clazz == NullPointerException && _isNPEExceptionPredicate(e)); +}; + +/** + * BH need to limit this, as JavaScript call stack may be recursive + */ +Clazz.getStackTrace = function(n) { + n || (n = 25); + // updateNode and updateParents cause infinite loop here + var s = "\n"; + var c = arguments.callee; + var showParams = (n < 0); + if (showParams) + n = -n; + for (var i = 0; i < n; i++) { + if (!(c = c.caller)) + break; + var sig = (c.toString ? c.toString().substring(0, c.toString().indexOf("{")) : ""); + s += i + " " + (c.exName ? (c.claxxOwner ? c.claxxOwner.__CLASS_NAME__ + "." : "") + c.exName + sig.replace(/function /,""): sig) + "\n"; + if (c == c.caller) { + s += "\n"; + break; + } + if (showParams) { + var args = c.arguments; + for (var j = 0; j < args.length; j++) { + var sa = "" + args[j]; + if (sa.length > 60) + sa = sa.substring(0, 60) + "..."; + s += " args[" + j + "]=" + sa.replace(/\s+/g," ") + "\n"; + } + } + } + return s; +} + +///////////////////// method creation //////////////////////////////// + +/** + * Make constructor for the class with the given function body and parameters + * signature. + * + * @param clazzThis host class + * @param funBody constructor body + * @param funParams constructor parameters signature + */ +/* public */ +Clazz.makeConstructor = function (clazzThis, funBody, funParams) { + Clazz.defineMethod (clazzThis, "construct", funBody, funParams); + if (clazzThis.con$truct) { + clazzThis.con$truct.index = clazzThis.con$truct.stacks.length; + } + //clazzThis.con$truct = clazzThis.prototype.con$truct = null; +}; + +/** + * Override constructor for the class with the given function body and + * parameters signature. + * + * @param clazzThis host class + * @param funBody constructor body + * @param funParams constructor parameters signature + */ +/* public */ +Clazz.overrideConstructor = function (clazzThis, funBody, funParams) { + Clazz.overrideMethod (clazzThis, "construct", funBody, funParams); + if (clazzThis.con$truct) { + clazzThis.con$truct.index = clazzThis.con$truct.stacks.length; + } + //clazzThis.con$truct = clazzThis.prototype.con$truct = null; +}; + + +/* + * Define method for the class with the given method name and method + * body and method parameter signature. + * + * @param clazzThis host class in which the method to be defined + * @param funName method name + * @param funBody function object, e.g function () { ... } + * @param funParams paramether signature, e.g ["string", "number"] + * @return method of the given name. The method may be funBody or a wrapper + * of the given funBody. + */ +/* public */ +Clazz.defineMethod = function (clazzThis, funName, funBody, funParams) { + if (Clazz.assureInnerClass) + Clazz.assureInnerClass(clazzThis, funBody); + funBody.exName = funName; + var fpName = formatParameters(funParams); + var proto = clazzThis.prototype; + var f$ = proto[funName]; + if (Clazz._Loader._checkLoad) + checkDuplicate(clazzThis, funName, fpName); + if (!f$ || (f$.claxxOwner === clazzThis && f$.funParams == fpName)) { + // property "funParams" will be used as a mark of only-one method + funBody.funParams = fpName; + funBody.claxxOwner = clazzThis; + funBody.exClazz = clazzThis; // make it traceable + return addProto(proto, funName, funBody); + } + // we have found a duplicate + var oldFun = null; + var oldStacks = f$.stacks; + if (!oldStacks) { + /* method is not defined by Clazz.defineMethod () */ + oldStacks = []; + oldFun = f$; + if (f$.claxxOwner) { + oldStacks[0] = oldFun.claxxOwner; + } + } + /* + * Method that is already defined in super class will be overridden + * with a new proxy method with class hierarchy stored in a stack. + * That is to say, the super methods are lost in this class' proxy + * method. + * When method are being called, methods defined in the new proxy + * method will be searched through first. And if no method fitted, + * it will then try to search method in the super class stacks. + */ + if (!f$.stacks || f$.claxxReference !== clazzThis) { + //Generate a new delegating method for the class + var id = ++SAEMid; + var delegate = function () { + return searchAndExecuteMethod(id, this, arguments.callee.claxxReference, arguments.callee.methodName, arguments); + }; + delegate.methodName = funName; + delegate.claxxReference = clazzThis; + f$ = addProto(proto, funName, delegate); + // Keep the class inheritance stacks + var arr = []; + for (var i = 0; i < oldStacks.length; i++) + arr[i] = oldStacks[i]; + f$.stacks = arr; + } + var ss = f$.stacks; + if (findArrayItem(ss, clazzThis) < 0) ss.push(clazzThis); + + if (oldFun) { + if (oldFun.claxxOwner === clazzThis) { + f$[oldFun.funParams] = oldFun; + oldFun.claxxOwner = null; + // property "funParams" will be used as a mark of only-one method + oldFun.funParams = null; // null ? safe ? // safe for != null + } else if (!oldFun.claxxOwner) { + /* + * The function is not defined Clazz.defineMethod (). + * Try to fixup the method ... + * As a matter of lost method information, I just suppose + * the method to be fixed is with void parameter! + */ + f$["\\unknown"] = oldFun; + } + } + funBody.exClazz = clazzThis; // make it traceable + f$[fpName] = funBody; + return f$; +}; + +duplicatedMethods = {}; + +var checkDuplicate = function(clazzThis, funName, fpName) { + var proto = clazzThis.prototype; + var f$ = proto[funName]; + if (f$ && (f$.claxxOwner || f$.claxxReference) === clazzThis) { + key = clazzThis.__CLASS_NAME__ + "." + funName + fpName; + var m = duplicatedMethods[key]; + if (m) { + var s = "Warning! Duplicate method found for " + key; + System.out.println(s); + Clazz.alert(s); + duplicatedMethods[key] = m + 1; + } else { + duplicatedMethods[key] = 1; + } + } +} + +Clazz.showDuplicates = function(quiet) { + var s = ""; + var a = duplicatedMethods; + var n = 0; + for (var key in a) + if (a[key] > 1) { + s += a[key] + "\t" + key + "\n"; + n++; + } + s = "Duplicates: " + n + "\n\n" + s; + System.out.println(s); + if (!quiet) + alert(s); +} + +var findArrayItem = function(arr, item) { + if (arr && item) + for (var i = arr.length; --i >= 0;) + if (arr[i] === item) + return i; + return -1; +} + +var removeArrayItem = function(arr, item) { + var i = findArrayItem(arr, item); + if (i >= 0) { + var n = arr.length - 1; + for (; i < n; i++) + arr[i] = arr[i + 1]; + arr.length--; + return true; + } +} + +/* + * Other developers may need to extend this formatParameters method + * to deal complicated situation. + */ +/* protected */ +var formatParameters = function (funParams) { + return (funParams ? funParams.replace (/~([NABSO])/g, + function ($0, $1) { + switch ($1) { + case 'N': + return "n"; + case 'B': + return "b"; + case 'S': + return "String"; + case 'O': + return "Object"; + case 'A': + return "Array"; + } + return "Unknown"; + }).replace (/\s+/g, "").replace (/^|,/g, "\\").replace (/\$/g, "org.eclipse.s") : "\\void"); +}; + +/* + * Override the existed methods which are in the same name. + * Overriding methods is provided for the purpose that the JavaScript + * does not need to search the whole hierarchied methods to find the + * correct method to execute. + * Be cautious about this method. Incorrectly using this method may + * break the inheritance system. + * + * @param clazzThis host class in which the method to be defined + * @param funName method name + * @param funBody function object, e.g function () { ... } + * @param funParams paramether signature, e.g ["string", "number"] + */ +/* public */ +Clazz.overrideMethod = function(clazzThis, funName, funBody, funParams) { + if (Clazz.assureInnerClass) Clazz.assureInnerClass (clazzThis, funBody); + funBody.exName = funName; + var fpName = formatParameters(funParams); + if (Clazz._Loader._checkLoad) + checkDuplicate(clazzThis, funName, fpName); + /* + * Replace old methods with new method. No super methods are kept. + */ + funBody.funParams = fpName; + funBody.claxxOwner = clazzThis; + return addProto(clazzThis.prototype, funName, funBody); +}; + +////////////// Overridden and Overloaded Java Method Handling ////////////////// +// SAEM (SearchAndExecuteMethod) +// adapted by BH +// + +/* + * BH Clazz.getProfile monitors exactly what is being delegated with SAEM, + * which could be a bottle-neck for function calling. + * This is critical for performance optimization. + */ + + var __signatures = ""; + +Clazz.getProfile = function() { + var s = ""; + if (_profile) { + var l = []; + for (var i in _profile) { + var n = "" + _profile[i]; + l.push(" ".substring(n.length) + n + "\t" + i); + } + s = l.sort().reverse().join("\r\n"); + _profile = {}; + } + return s + __signatures; +} + +var addProfile = function(c, f, p, id) { + var s = id + " " + c.__CLASS_NAME__ + " " + f + " ";// + JSON.stringify(p); + if (__signatures.indexOf(s) < 0) + __signatures += s + "\n"; + _profile[s] || (_profile[s] = 0); + _profile[s]++; +} + +/** + * Called also by Throwable + * +/* public */ +Clazz.getParamsType = function (funParams) { + // bh: optimization here for very common cases + var n = funParams.length; + switch (n) { + case 0: + var params = ["void"]; + params.typeString = "\\void"; + return params; + case 1: + // BH just so common + switch (typeof obj) { + case "number": + var params = ["n"]; + params.typeString = "\\n"; + return params; + case "boolean": + var params = ["b"]; + params.typeString = "\\b"; + return params; + } + } + + var params = []; + params.hasCastedNull = false; + if (funParams) { + for (var i = 0; i < n; i++) { + params[i] = Clazz.getClassName (funParams[i]); + if (funParams[i] instanceof Clazz.CastedNull) { + params.hasCastedNull = true; + } + } + } + params.typeString = "\\" + params.join ('\\'); + return params; +}; + +var SAEMid = 0; +xxxSAEMlist = ""; + +//var SAEMarray = []; +/** + * BH: OK, this was an idea that doesn't work. The idea was to tag SAEM calls + * and then refer back to an array. But the id number cannot be put in the right place. + * + * Say we have this: + * + * StringBuffer sb = new StringBuffer(); + * sb.append("").append(1); + * + * Here we have two different append methods to call. They are saved under two + * names: StringBuffer.prototype.append["\\String"] + * and StringBuffer.prototype.append["\\Number"] + * + * The job of generateDelegatingMethod is to discriminate between those two. We can do + * that, but the real issue is that we have to do that EVERY time a call is made. + * This is a problem that must be handled at compile time. There is no way to + * make .append("") to go one way the first time and another way the second time. + * What we need at run time is something like this: + * + * Clazz.delegate(sb.append,1,[""]) and Clazz.delegate(sb.append,2,[1]) + * The we would be able to log those numbers at run time and refer to them. + * + * The only real way to avoid SAEM is: + * + * 1) to never call super() -- always call a differently named function in a superclass. + * 2) don't overload functions + * + */ + + +/** + * Search the given class prototype, find the method with the same + * method name and the same parameter signatures by the given + * parameters, and then run the method with the given parameters. + * + * @param objThis the current host object + * @param claxxRef the current host object's class + * @param fxName the method name + * @param funParams the given arguments + * @return the result of the specified method of the host object, + * the return maybe void. + * @throws MethodNotFoundException if no matched method is found + */ +/* protected */ +var searchAndExecuteMethod = function (id, objThis, claxxRef, fxName, args, _saem) { + +// var fx = SAEMarray[id]; +// if (fx) { +// return fx.apply(objThis, args); +// } + + + fx = objThis[fxName]; + var params = Clazz.getParamsType(args); + + +var s = "SAEM " + claxxRef.__CLASS_NAME__ + "." + fxName + "(" + params+ ")\n"; +if (xxxSAEMlist.length > 300)xxxSAEMlist = ""; +xxxSAEMlist += s; + + + if (!fx) + try {System.out.println(Clazz.getStackTrace(5))} catch (e){} + _profile && addProfile(claxxRef, fxName, params, id); + // Cache last matched method + if (fx.lastParams == params.typeString && fx.lastClaxxRef === claxxRef) { + var methodParams; + if (params.hasCastedNull) { + methodParams = []; + // For Clazz.CastedNull instances, the type name is + // already used to indentified the method in searchMethod. + for (var k = 0; k < args.length; k++) + methodParams[k] = (args[k] instanceof Clazz.CastedNull ? null : args[k]); + } else { +// if (fx.lastMethod) SAEMarray[id] = fx.lastMethod; + methodParams = args; + } + return (fx.lastMethod ? fx.lastMethod.apply(objThis, methodParams) : null); + } + fx.lastParams = params.typeString; + fx.lastClaxxRef = claxxRef; + + var stacks = fx.stacks; + if (!stacks) + stacks = claxxRef.prototype[fxName].stacks; + var length = stacks.length; + + /* + * Search the inheritance stacks to get the given class' function + */ + var began = false; // began to search its super classes + for (var i = length; --i >= 0;) { + if (began || stacks[i] === claxxRef) { + /* + * First try to search method within the same class scope + * with stacks[i] === claxxRef + */ + var clazzFun = stacks[i].prototype[fxName]; + var ret = tryToSearchAndExecute(id, fxName, objThis, clazzFun, params, + args, fx); + if (!(ret instanceof MethodException)) { + return ret; + } + /* + * As there are no such methods in current class, Clazz will try + * to search its super class stacks. Here variable began indicates + * that super searchi is began, and there is no need checking + * stacks[i] === claxxRef + */ + began = true; + } // end of if + } // end of for + if ("construct" == fxName) { + /* + * For non existed constructors, just return without throwing + * exceptions. In Java codes, extending Object can call super + * default Object#constructor, which is not defined in JS. + */ + return; + } + newMethodNotFoundException(objThis, claxxRef, + fxName, params.typeString); +}; + + +/* private */ +var tryToSearchAndExecute = function(id, fxName, objThis, clazzFun, params, args, fx, _ttsaem) { + var method = []; + var generic = true; + for (var fn in clazzFun) { + if (fn.charCodeAt(0) == 92) { // 92 == '\\'.charCodeAt (0) + var ps = fn.substring(1).split("\\"); + (ps.length == params.length) && method.push(ps); + generic = false; + continue; + } + /* + * When there is only one method in the class, use the args + * to identify the parameter type. + * + * AbstractCollection.remove (Object) + * AbstractList.remove (int) + * ArrayList.remove (int) + * + * Then calling #remove (Object) method on ArrayList instance will + * need to search up to the AbstractCollection.remove (Object), + * which contains only one method. + */ + /* + * See Clazz#defineMethod --Mar 10, 2006, josson + */ + if (generic && fn == "funParams" && clazzFun.funParams) { + fn = clazzFun.funParams; + var ps = fn.substring(1).split ("\\"); + (ps.length == params.length) && (method[0] = ps); + break; + } + } + var debug = false;//(method.length > 1 && method.join().indexOf("Listen")< 0 && params.join().indexOf("Null") >= 0) + if (debug)alert(fxName + " -- " + method.join("|") + " -- searching for method with " + params) + if (method.length == 0 || !(method = searchMethod(method, params, debug))) + return new MethodException(); + if (debug) alert("OK: \\" + method) + var f = (generic ? clazzFun : clazzFun["\\" + method]); + //if (generic) + //{ /* Use the generic method */ + /* + * Will this case be reachable? + * March 4, 2006 josson + * + * Reachable for calling #remove (Object) method on + * ArrayList instance + * May 5, 2006 josson + */ + var methodParams = null; + if (params.hasCastedNull) { + methodParams = []; + for (var k = 0; k < args.length; k++) { + if (args[k] instanceof Clazz.CastedNull) { + /* + * For Clazz.CastedNull instances, the type name is + * already used to indentify the method in searchMethod. + */ + methodParams[k] = null; + } else { + methodParams[k] = args[k]; + } + } + } else { + methodParams = args; + } + fx.lastMethod = f; + //if (!params.hasCastedNull) SAEMarray[id] = f; + return f.apply(objThis, methodParams); +}; + +/** + * Search the existed polymorphic methods to get the matched method with + * the given parameter types. + * + * @param existedMethods Array of string which contains method parameters + * @param paramTypes Array of string that is parameter type. + * @return string of method parameters seperated by "\\" + */ +/* private */ +var searchMethod = function(roundOne, paramTypes, debug) { + +// Filter out all the fitted methods for the given parameters + var roundTwo = []; + var len = roundOne.length; + for (var i = 0; i < len; i++) { + var fittedLevel = []; + var isFitted = true; + var len2 = roundOne[i].length; + for (var j = 0; j < len2; j++) { + + fittedLevel[j] = Clazz.getInheritedLevel (paramTypes[j], + roundOne[i][j]); + //if (debug)alert([paramTypes[j],fittedLevel[j],roundOne[i][j]]) + if (fittedLevel[j] < 0) { + isFitted = false; + break; + } + } + if (isFitted) { + fittedLevel[paramTypes.length] = i; // Keep index for later use + roundTwo.push(fittedLevel); + } + } + if (roundTwo.length == 0) + return null; + // Find out the best method according to the inheritance. + var resultTwo = roundTwo; + var min = resultTwo[0]; + for (var i = 1; i < resultTwo.length; i++) { + var isVectorLesser = true; + for (var j = 0; j < paramTypes.length; j++) { + if (min[j] < resultTwo[i][j]) { + isVectorLesser = false;; + break; + } + } + if (isVectorLesser) + min = resultTwo[i]; + } + var index = min[paramTypes.length]; // Get the previously stored index + /* + * Return the method parameters' type string as indentifier of the + * choosen method. + */ + return roundOne[index].join ('\\'); +}; + +////////////////////////////////// package loading /////////////////////// + +/* + * all root packages. e.g. java.*, org.*, com.* + */ +/* protected */ +Clazz.allPackage = {}; + +/** + * Will be used to keep value of whether the class is defined or not. + */ +/* protected */ +Clazz.allClasses = {}; + +Clazz.lastPackageName = null; +Clazz.lastPackage = null; + +/* protected */ +Clazz.unloadedClasses = []; + +/* public */ +Clazz.declarePackage = function (pkgName) { + if (Clazz.lastPackageName == pkgName) + return Clazz.lastPackage; + if (pkgName && pkgName.length) { + var pkgFrags = pkgName.split (/\./); + var pkg = Clazz.allPackage; + for (var i = 0; i < pkgFrags.length; i++) { + if (!pkg[pkgFrags[i]]) { + pkg[pkgFrags[i]] = { + __PKG_NAME__ : (pkg.__PKG_NAME__ ? + pkg.__PKG_NAME__ + "." + pkgFrags[i] : pkgFrags[i]) + }; + // pkg[pkgFrags[i]] = {}; + if (i == 0) { + // eval ... + Clazz.setGlobal(pkgFrags[i], pkg[pkgFrags[i]]); + } + } + pkg = pkg[pkgFrags[i]] + } + Clazz.lastPackageName = pkgName; + Clazz.lastPackage = pkg; + return pkg; + } +}; + +/* protected */ +Clazz.evalType = function (typeStr, isQualified) { + var idx = typeStr.lastIndexOf("."); + if (idx != -1) { + var pkgName = typeStr.substring (0, idx); + var pkg = Clazz.declarePackage (pkgName); + var clazzName = typeStr.substring (idx + 1); + return pkg[clazzName]; + } + if (isQualified) + return window[typeStr]; + switch (typeStr) { + case "string": + return String; + case "number": + return Number; + case "object": + return Clazz._O; + case "boolean": + return Boolean; + case "function": + return Function; + case "void": + case "undefined": + case "unknown": + return typeStr; + case "NullObject": + return NullObject; + default: + return window[typeStr]; + } +}; + +/** + * Define a class or interface. + * + * @param qClazzName String presents the qualified name of the class + * @param clazzFun Function of the body + * @param clazzParent Clazz to inherit from, may be null + * @param interfacez Clazz may implement one or many interfaces + * interfacez can be Clazz object or Array of Clazz objects. + * @return Ruturn the modified Clazz object + */ +/* public */ +Clazz.defineType = function (qClazzName, clazzFun, clazzParent, interfacez) { + var cf = Clazz.unloadedClasses[qClazzName]; + if (cf) { + clazzFun = cf; + } + var idx = qClazzName.lastIndexOf ("."); + if (idx != -1) { + var pkgName = qClazzName.substring (0, idx); + var pkg = Clazz.declarePackage (pkgName); + var clazzName = qClazzName.substring (idx + 1); + if (pkg[clazzName]) { + // already defined! Should throw exception! + return pkg[clazzName]; + } + pkg[clazzName] = clazzFun; + } else { + if (window[qClazzName]) { + // already defined! Should throw exception! + return window[qClazzName]; + } + Clazz.setGlobal(qClazzName, clazzFun); + } + Clazz.decorateAsType(clazzFun, qClazzName, clazzParent, interfacez); + /*# {$no.javascript.support} >>x #*/ + var iFun = Clazz._innerFunctions; + clazzFun.defineMethod = iFun.defineMethod; + clazzFun.defineStaticMethod = iFun.defineStaticMethod; + clazzFun.makeConstructor = iFun.makeConstructor; + /*# x<< #*/ + return clazzFun; +}; + +var isSafari = (navigator.userAgent.indexOf ("Safari") != -1); +var isSafari4Plus = false; +if (isSafari) { + var ua = navigator.userAgent; + var verIdx = ua.indexOf("Version/"); + if (verIdx != -1) { + var verStr = ua.substring(verIdx + 8); + var verNumber = parseFloat(verStr); + isSafari4Plus = verNumber >= 4.0; + } +} + +/* public */ +Clazz.instantialize = function (objThis, args) { + + + if (args && args.length == 1 && args[0] + && args[0] instanceof args4InheritClass) { + return; + } + if (objThis instanceof Number) { + objThis.valueOf = function () { + return this; + }; + } + if (isSafari4Plus) { // Fix bug of Safari 4.0+'s over-optimization + var argsClone = []; + for (var k = 0; k < args.length; k++) { + argsClone[k] = args[k]; + } + args = argsClone; + } + + var c = objThis.construct; + if (c) { + if (!objThis.con$truct) { // no need to init fields + c.apply (objThis, args); + } else if (!objThis.getClass ().superClazz) { // the base class + objThis.con$truct.apply (objThis, []); + c.apply (objThis, args); + } else if ((c.claxxOwner + && c.claxxOwner === objThis.getClass ()) + || (c.stacks + && c.stacks[c.stacks.length - 1] == objThis.getClass ())) { + /* + * This #construct is defined by this class itself. + * #construct will call Clazz.superConstructor, which will + * call #con$truct back + */ + c.apply (objThis, args); + } else { // constructor is a super constructor + if (c.claxxOwner && !c.claxxOwner.superClazz + && c.claxxOwner.con$truct) { + c.claxxOwner.con$truct.apply (objThis, []); + } else if (c.stacks && c.stacks.length == 1 + && !c.stacks[0].superClazz) { + c.stacks[0].con$truct.apply (objThis, []); + } + c.apply (objThis, args); + objThis.con$truct.apply (objThis, []); + } + } else if (objThis.con$truct) { + objThis.con$truct.apply (objThis, []); + } +}; + +/** + * Once there are other methods registered to the Function.prototype, + * those method names should be add to the following Array. + */ +/* + * static final member of interface may be a class, which may + * be function. + */ +/* protected */ +Clazz.innerFunctionNames = [ + "isInstance", "equals", "hashCode", /*"toString",*/ "getName", "getCanonicalName", "getClassLoader", "getResource", "getResourceAsStream" /*# {$no.javascript.support} >>x #*/, "defineMethod", "defineStaticMethod", + "makeConstructor" /*# x<< #*/ +]; + +/* + * Static methods + */ +Clazz._innerFunctions = { + /* + * Similar to Object#equals + */ + + isInstance: function(c) { + return Clazz.instanceOf(c, this); + }, + + equals : function (aFun) { + return this === aFun; + }, + + hashCode : function () { + return this.getName ().hashCode (); + }, + + toString : function () { + return "class " + this.getName (); + }, + + /* + * Similar to Class#getName + */ + getName : function () { + return Clazz.getClassName (this, true); + }, + getCanonicalName : function () { + return this.__CLASS_NAME__; + }, + getClassLoader : function () { + var clazzName = this.__CLASS_NAME__; + var baseFolder = Clazz._Loader.getClasspathFor(clazzName); + var x = baseFolder.lastIndexOf (clazzName.replace (/\./g, "/")); + if (x != -1) { + baseFolder = baseFolder.substring (0, x); + } else { + baseFolder = Clazz._Loader.getClasspathFor(clazzName, true); + } + var loader = Clazz._Loader.requireLoaderByBase(baseFolder); + loader.getResourceAsStream = Clazz._innerFunctions.getResourceAsStream; + loader.getResource = Clazz._innerFunctions.getResource; // BH + return loader; + }, + + getResource : function(name) { + var stream = this.getResourceAsStream(name); + return (stream ? stream.url : null); + }, + + getResourceAsStream : function (name) { + if (!name) + return null; + name = name.replace (/\\/g, '/'); + var baseFolder = null; + var fname = name; + var clazzName = this.__CLASS_NAME__; + if (arguments.length == 2 && name.indexOf ('/') != 0) { // additional argument + name = "/" + name; + } + if (name.indexOf ('/') == 0) { + //is.url = name.substring (1); + if (arguments.length == 2) { // additional argument + baseFolder = arguments[1]; + if (!baseFolder) + baseFolder = Clazz.binaryFolders[0]; + } else if (Clazz._Loader) { + baseFolder = Clazz._Loader.getClasspathFor(clazzName, true); + } + if (!baseFolder) { + fname = name.substring (1); + } else { + baseFolder = baseFolder.replace (/\\/g, '/'); + var length = baseFolder.length; + var lastChar = baseFolder.charAt (length - 1); + if (lastChar != '/') { + baseFolder += "/"; + } + fname = baseFolder + name.substring (1); + } + } else { + if (this.base) { + baseFolder = this.base; + } else if (Clazz._Loader) { + baseFolder = Clazz._Loader.getClasspathFor(clazzName); + var x = baseFolder.lastIndexOf (clazzName.replace (/\./g, "/")); + if (x != -1) { + baseFolder = baseFolder.substring (0, x); + } else { + //baseFolder = null; + var y = -1; + if (baseFolder.indexOf (".z.js") == baseFolder.length - 5 + && (y = baseFolder.lastIndexOf ("/")) != -1) { + baseFolder = baseFolder.substring (0, y + 1); + var pkgs = clazzName.split (/\./); + for (var k = 1; k < pkgs.length; k++) { + var pkgURL = "/"; + for (var j = 0; j < k; j++) { + pkgURL += pkgs[j] + "/"; + } + if (pkgURL.length > baseFolder.length) { + break; + } + if (baseFolder.indexOf (pkgURL) == baseFolder.length - pkgURL.length) { + baseFolder = baseFolder.substring (0, baseFolder.length - pkgURL.length + 1); + break; + } + } + } else { + baseFolder = Clazz._Loader.getClasspathFor(clazzName, true); + } + } + } else { + var bins = Clazz.binaryFolders; + if (bins && bins.length) { + baseFolder = bins[0]; + } + } + if (!baseFolder) + baseFolder = "j2s/"; + baseFolder = baseFolder.replace (/\\/g, '/'); + var length = baseFolder.length; + var lastChar = baseFolder.charAt (length - 1); + if (lastChar != '/') { + baseFolder += "/"; + } + if (this.base) { + fname = baseFolder + name; + } else { + var idx = clazzName.lastIndexOf ('.'); + if (idx == -1 || this.base) { + fname = baseFolder + name; + } else { + fname = baseFolder + clazzName.substring (0, idx) + .replace (/\./g, '/') + "/" + name; + } + } + } + var url = null; + try { + if (fname.indexOf(":/") < 0) { + var d = document.location.href.split("?")[0].split("/"); + d[d.length - 1] = fname; + fname = d.join("/"); + } + url = new java.net.URL(fname); + } catch (e) { + } + var data = (url == null ? null : Jmol._getFileData(fname.toString())); + if (!data || data == "error" || data.indexOf("[Exception") == 0) + return null; + var bytes = new java.lang.String(data).getBytes(); + var is = new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes)); + is.url = url; + return is; + }/*# {$no.javascript.support} >>x #*/, + + /* + * For JavaScript programmers + */ + defineMethod : function (methodName, funBody, paramTypes) { + Clazz.defineMethod (this, methodName, funBody, paramTypes); + }, + + /* + * For JavaScript programmers + */ + defineStaticMethod : function (methodName, funBody, paramTypes) { + Clazz.defineMethod (this, methodName, funBody, paramTypes); + this[methodName] = this.prototype[methodName]; + }, + + /* + * For JavaScript programmers + */ + makeConstructor : function (funBody, paramTypes) { + Clazz.makeConstructor (this, funBody, paramTypes); + } + /*# x<< #*/ +}; + + +var cStack = []; + +/** + * BH: I would like to be able to remove "self.c$" here, but that is tricky. + */ + +Clazz.pu$h = function (c) { + c || (c = self.c$); // old style + c && cStack.push(c); +}; + +Clazz.p0p = function () { + return cStack.pop(); +}; + +/* protected */ +Clazz.decorateAsClass = function (clazzFun, prefix, name, clazzParent, + interfacez, parentClazzInstance, _decorateAsClass) { + + var prefixName = null; + if (prefix) { + prefixName = prefix.__PKG_NAME__; + if (!prefixName) + prefixName = prefix.__CLASS_NAME__; + } + var qName = (prefixName ? prefixName + "." : "") + name; + + if (Clazz._Loader._classPending[qName]) { + delete Clazz._Loader._classPending[qName]; + Clazz._Loader._classCountOK++; + Clazz._Loader._classCountPending--; + } + if (Clazz._Loader && Clazz._Loader._checkLoad) { + System.out.println("decorating class " + prefixName + "." + name); + } + var cf = Clazz.unloadedClasses[qName]; + if (cf) { + clazzFun = cf; + } + var qName = null; + decorateFunction(clazzFun, prefix, name); + if (parentClazzInstance) { + Clazz.inheritClass (clazzFun, clazzParent, parentClazzInstance); + } else if (clazzParent) { + Clazz.inheritClass (clazzFun, clazzParent); + } + if (interfacez) { + Clazz.implementOf (clazzFun, interfacez); + } + return clazzFun; +}; + +/* private */ +var decorateFunction = function (clazzFun, prefix, name, _decorateFunction) { + var qName; + if (!prefix) { + // e.g. Clazz.declareInterface (null, "ICorePlugin", org.eclipse.ui.IPlugin); + qName = name; + Clazz.setGlobal(name, clazzFun); + } else if (prefix.__PKG_NAME__) { + // e.g. Clazz.declareInterface (org.eclipse.ui, "ICorePlugin", org.eclipse.ui.IPlugin); + qName = prefix.__PKG_NAME__ + "." + name; + prefix[name] = clazzFun; + if (prefix === java.lang) + Clazz.setGlobal(name, clazzFun); + } else { + // e.g. Clazz.declareInterface (org.eclipse.ui.Plugin, "ICorePlugin", org.eclipse.ui.IPlugin); + qName = prefix.__CLASS_NAME__ + "." + name; + prefix[name] = clazzFun; + } + Clazz.extendJO(clazzFun, qName); + var inF = Clazz.innerFunctionNames; + for (var i = 0; i < inF.length; i++) { + clazzFun[inF[i]] = Clazz._innerFunctions[inF[i]]; + } + + if (Clazz._Loader) + Clazz._Loader.updateNodeForFunctionDecoration(qName); +}; + +/* protected */ +Clazz.declareInterface = function (prefix, name, interfacez, _declareInterface) { + var clazzFun = function () {}; + decorateFunction(clazzFun, prefix, name); + if (interfacez) { + Clazz.implementOf (clazzFun, interfacez); + } + return clazzFun; +}; + +/* public */ +Clazz.declareType = function (prefix, name, clazzParent, interfacez, + parentClazzInstance, _declareType) { + var f = function () { + Clazz.instantialize (this, arguments); + }; + return Clazz.decorateAsClass (f, prefix, name, clazzParent, interfacez, + parentClazzInstance); +}; + +/* public */ +Clazz.declareAnonymous = function (prefix, name, clazzParent, interfacez, + parentClazzInstance, _declareAnonymous) { + var f = function () { + Clazz.prepareCallback(this, arguments); + Clazz.instantialize (this, arguments); + }; + return Clazz.decorateAsClass (f, prefix, name, clazzParent, interfacez, + parentClazzInstance); +}; + +/* public */ +Clazz.decorateAsType = function (clazzFun, qClazzName, clazzParent, + interfacez, parentClazzInstance, inheritClazzFuns, _decorateAsType) { + Clazz.extendJO(clazzFun, qClazzName); + clazzFun.equals = Clazz._innerFunctions.equals; + clazzFun.getName = Clazz._innerFunctions.getName; + if (inheritClazzFuns) { + for (var i = 0; i < Clazz.innerFunctionNames.length; i++) { + var methodName = Clazz.innerFunctionNames[i]; + clazzFun[methodName] = Clazz._innerFunctions[methodName]; + } + } + if (parentClazzInstance) { + Clazz.inheritClass (clazzFun, clazzParent, parentClazzInstance); + } else if (clazzParent) { + Clazz.inheritClass (clazzFun, clazzParent); + } + if (interfacez) { + Clazz.implementOf (clazzFun, interfacez); + } + return clazzFun; +}; + + +////////////////////////// default package declarations //////////////////////// + +/* sgurin: preserve Number.prototype.toString */ +Number.prototype._numberToString=Number.prototype.toString; + + +Clazz.declarePackage ("java.io"); +//Clazz.declarePackage ("java.lang"); +Clazz.declarePackage ("java.lang.annotation"); // java.lang +Clazz.declarePackage ("java.lang.instrument"); // java.lang +Clazz.declarePackage ("java.lang.management"); // java.lang +Clazz.declarePackage ("java.lang.reflect"); // java.lang +Clazz.declarePackage ("java.lang.ref"); // java.lang.ref +java.lang.ref.reflect = java.lang.reflect; +Clazz.declarePackage ("java.util"); +//var reflect = Clazz.declarePackage ("java.lang.reflect"); +Clazz.declarePackage ("java.security"); + + +/* + * Consider these interfaces are basic! + */ +Clazz.declareInterface (java.io,"Closeable"); +Clazz.declareInterface (java.io,"DataInput"); +Clazz.declareInterface (java.io,"DataOutput"); +Clazz.declareInterface (java.io,"Externalizable"); +Clazz.declareInterface (java.io,"Flushable"); +Clazz.declareInterface (java.io,"Serializable"); +Clazz.declareInterface (java.lang,"Iterable"); +Clazz.declareInterface (java.lang,"CharSequence"); +Clazz.declareInterface (java.lang,"Cloneable"); +Clazz.declareInterface (java.lang,"Appendable"); +Clazz.declareInterface (java.lang,"Comparable"); +Clazz.declareInterface (java.lang,"Runnable"); +Clazz.declareInterface (java.util,"Comparator"); + +java.lang.ClassLoader = { + __CLASS_NAME__ : "ClassLoader" +}; + +/****************************************************************************** + * Copyright (c) 2007 java2script.org and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Zhou Renjian - initial API and implementation + *****************************************************************************/ +/******* + * @author zhou renjian + * @create March 10, 2006 + *******/ + +/** + * Once ClassExt.js is part of Class.js. + * In order to make the Class.js as small as possible, part of its content + * is moved into this ClassExt.js. + * + * See also http://j2s.sourceforge.net/j2sclazz/ + */ + +/** + * Clazz.MethodNotFoundException is used to notify the developer about calling + * methods with incorrect parameters. + */ +/* protected */ +// Override the Clazz.MethodNotFoundException in Class.js to give details +var newMethodNotFoundException = function (obj, clazz, method, params) { + var paramStr = ""; + if (params) { + paramStr = params.substring (1).replace (/\\/g, ","); + } + var leadingStr = ""; + if (method && method != "construct") { + leadingStr = "Method"; + } else { + leadingStr = "Constructor"; + } + var message = leadingStr + " " + Clazz.getClassName (clazz, true) + "." + + method + "(" + paramStr + ") is not found!"; + throw new java.lang.NoSuchMethodException(message); +}; + +/** + * Prepare "callback" for instance of anonymous Class. + * For example for the callback: + * this.callbacks.MyEditor.sayHello(); + * + * This is specifically for inner classes that are referring to + * outer class methods and fields. + * + * @param objThis the host object for callback + * @param args arguments object. args[0] will be classThisObj -- the "this" + * object to be hooked + * + * Attention: parameters should not be null! + */ +/* protected */ +Clazz.prepareCallback = function (innerObj, args) { + var outerObj = args[0]; + var cbName = "b$"; // "callbacks"; + if (innerObj && outerObj && outerObj !== window) { + var className = Clazz.getClassName(outerObj, true); + var obs = {}; + if (innerObj[cbName]) // must make a copy! + for (var s in innerObj[cbName]) + obs[s] = innerObj[cbName][s]; + innerObj[cbName] = obs; + + /* + * TODO: the following line is SWT-specific! Try to move it out! + */ + // obs[className.replace (/org\.eclipse\.swt\./, "$wt.")] = outerObj; + + // all references to outer class and its superclass objects must be here as well + obs[className] = outerObj; + var clazz = Clazz.getClass(outerObj); + while (clazz.superClazz) { + clazz = clazz.superClazz; + /* + * TODO: the following line is SWT-specific! Try to move it out! + */ + // obs[Clazz.getClassName (clazz, true) + // .replace (/org\.eclipse\.swt\./, "$wt.")] = outerObj; + obs[Clazz.getClassName(clazz, true)] = outerObj; + } + var cbs = outerObj[cbName]; + if (cbs) + for (var s in cbs) + obs[s] = cbs[s]; + } + // remove "this" argument + // note that args is an instance of arguments -- NOT an array; does not have the .shift() method! + for (var i = 0; i < args.length - 1; i++) + args[i] = args[i + 1]; + args.length--; +}; + +/** + * Construct instance of the given inner class. + * + * @param classInner given inner class, alway with name like "*$*" + * @param innerObj this instance which can be used to call back. + * @param finalVars final variables which the inner class may use + * @return the constructed object + * + * @see Clazz#cloneFinals + */ +/* public */ +Clazz.innerTypeInstance = function (clazzInner, innerObj, finalVars) { + if (!clazzInner) + clazzInner = arguments.callee.caller; + var obj; + if (finalVars || innerObj.$finals) { + obj = new clazzInner(innerObj, Clazz.inheritArgs); + // f$ is short for the once choosen "$finals" + if (finalVars) { + if (innerObj.f$) { + var o = {}; + for (var attr in innerObj.f$) + o[attr] = innerObj.f$[attr]; + for (var attr in finalVars) + o[attr] = finalVars[attr]; + obj.f$ = o; + } else { + obj.f$ = finalVars; + } + } else if (innerObj.f$) { + obj.f$ = innerObj.f$; + } + } else { + switch (arguments.length) { + case 3: + return new clazzInner(innerObj); + case 4: + return (innerObj.__CLASS_NAME__ == clazzInner.__CLASS_NAME__ + && arguments[3] === Clazz.inheritArgs ? innerObj : new clazzInner(innerObj, arguments[3])); + case 5: + return new clazzInner(innerObj, arguments[3], arguments[4]); + case 6: + return new clazzInner(innerObj, arguments[3], arguments[4], + arguments[5]); + case 7: + return new clazzInner(innerObj, arguments[3], arguments[4], + arguments[5], arguments[6]); + case 8: + return new clazzInner(innerObj, arguments[3], arguments[4], + arguments[5], arguments[6], arguments[7]); + case 9: + return new clazzInner(innerObj, arguments[3], arguments[4], + arguments[5], arguments[6], arguments[7], arguments[8]); + case 10: + return new clazzInner(innerObj, arguments[3], arguments[4], + arguments[5], arguments[6], arguments[7], arguments[8], + arguments[9]); + default: + //Should construct instance manually. + obj = new clazzInner(innerObj, Clazz.inheritArgs); + break; + } + } + var n = arguments.length - 3; + var args = new Array(n); + for (var i = n; --i >= 0;) + args[i] = arguments[i + 3]; + Clazz.instantialize(obj, args); + return obj; +}; + +/** + * Clone variables whose modifier is "final". + * Usage: var o = Clazz.cloneFinals ("name", name, "age", age); + * + * @return Object with all final variables + */ +/* public */ +Clazz.cloneFinals = function () { + var o = {}; + var len = arguments.length / 2; + for (var i = len; --i >= 0;) + o[arguments[i + i]] = arguments[i + i + 1]; + return o; +}; + +/* public */ +Clazz.isClassDefined = Clazz.isDefinedClass = function(clazzName) { + if (!clazzName) + return false; /* consider null or empty name as non-defined class */ + if (Clazz.allClasses[clazzName]) + return true; + var pkgFrags = clazzName.split (/\./); + var pkg = null; + for (var i = 0; i < pkgFrags.length; i++) + if (!(pkg = (pkg ? pkg[pkgFrags[i]] : Clazz.allPackage[pkgFrags[0]]))) { + return false; + } + return (pkg && (Clazz.allClasses[clazzName] = true)); +}; +/** + * Define the enum constant. + * @param classEnum enum type + * @param enumName enum constant + * @param enumOrdinal enum ordinal + * @param initialParams enum constant constructor parameters + * @return return defined enum constant + */ +/* public */ +Clazz.defineEnumConstant = function (clazzEnum, enumName, enumOrdinal, initialParams, clazzEnumExt) { + var o = (clazzEnumExt ? new clazzEnumExt() : new clazzEnum()); + // BH avoids unnecessary calls to SAEM + o.$name = enumName; + o.$ordinal = enumOrdinal; + //Clazz.superConstructor (o, clazzEnum, [enumName, enumOrdinal]); + if (initialParams && initialParams.length) + o.construct.apply (o, initialParams); + clazzEnum[enumName] = o; + clazzEnum.prototype[enumName] = o; + if (!clazzEnum["$ values"]) { // BH added + clazzEnum["$ values"] = [] // BH added + clazzEnum.values = function() { // BH added + return this["$ values"]; // BH added + }; // BH added + } + clazzEnum["$ values"].push(o); + return o; +}; + +//////// (int) conversions ////////// + +Clazz.floatToInt = function (x) { + return x < 0 ? Math.ceil(x) : Math.floor(x); +}; + +Clazz.floatToByte = Clazz.floatToShort = Clazz.floatToLong = Clazz.floatToInt; +Clazz.doubleToByte = Clazz.doubleToShort = Clazz.doubleToLong = Clazz.doubleToInt = Clazz.floatToInt; + +Clazz.floatToChar = function (x) { + return String.fromCharCode (x < 0 ? Math.ceil(x) : Math.floor(x)); +}; + +Clazz.doubleToChar = Clazz.floatToChar; + + + +///////////////////////////////// Array additions ////////////////////////////// +// +// BH: these are necessary for integer processing, especially +// +// + +var getArrayClone = function(nbits) { + return function() { + var me = this; + var n = me.length; + var a = (nbits == 32 ? new Int32Array(n) : new Float64Array(n)); + for (var i = n; --i >= 0;) + a[i] = me[i]; + return a; + } +} + +if (self.Int32Array && self.Int32Array != Array) { + Clazz.haveInt32 = true; + if (!Int32Array.prototype.sort) + Int32Array.prototype.sort = Array.prototype.sort + if (!Int32Array.prototype.clone) + Int32Array.prototype.clone = getArrayClone(32); +} else { + Int32Array = function(n) { + if (!n) n = 0; + var b = new Array(n); + b.toString = function(){return "[object Int32Array]"} + for (var i = 0; i < n; i++)b[i] = 0 + return b; + } + Clazz.haveInt32 = false; + Int32Array.prototype.sort = Array.prototype.sort + Int32Array.prototype.clone = getArrayClone(32); + Int32Array.prototype.int32Fake = function(){}; +} + +if (self.Float64Array && self.Float64Array != Array) { + Clazz.haveFloat64 = true; + if (!Float64Array.prototype.sort) + Float64Array.prototype.sort = Array.prototype.sort + if (!Float64Array.prototype.clone) + Float64Array.prototype.clone = getArrayClone(64); +} else { + Clazz.haveFloat64 = false; + Float64Array = function(n) { + if (!n) n = 0; + var b = new Array(n); + for (var i = 0; i < n; i++)b[i] = 0.0 + return b; + }; + Float64Array.prototype.sort = Array.prototype.sort + Float64Array.prototype.clone = getArrayClone(64); + Float64Array.prototype.float64Fake = function() {}; // "present" + Float64Array.prototype.toString = function() {return "[object Float64Array]"}; +// Darn! Mozilla makes this a double, not a float. It's 64-bit. +// and Safari 5.1 doesn't have Float64Array +} + +/** + * Make arrays. + * + * @return the created Array object + */ +/* public */ +Clazz.newArray = function () { + if (arguments[0] instanceof Array) { + // recursive, from newArray(n,m,value) + // as newArray([m, value], newInt32Array) + var args = arguments[0]; + var f = arguments[1]; + } else { + var args = arguments; + var f = Array; + } + var dim = args[0]; + if (typeof dim == "string") { + dim = dim.charCodeAt (0); // char + } + var len = args.length - 1; + var val = args[len]; + switch (args.length) { + case 0: // never + case 1: + return []; // maybe never? + case 2: + if (val == null) + return new Array(dim); + if (f === true && Clazz.haveInt32) return new Int32Array(dim); + if (f === false && Clazz.haveFloat64) return new Float64Array(dim); + var arr = (f === true ? new Int32Array() : f === false ? new Float64Array() : dim < 0 ? val : new Array(dim)); + for (var i = dim; --i >= 0;) + arr[i] = val; + return arr; + default: + var xargs = new Array (len); + for (var i = 0; i < len; i++) { + xargs[i] = args[i + 1]; + } + var arr = new Array (dim); + if (val == null || val >= 0 || len > 2) + for (var i = 0; i < dim; i++) { + // Call recursively! + arr[i] = Clazz.newArray (xargs, f); + } + return arr; + } +}; + +Clazz.newArray32 = function(args, isInt32) { + var dim = args[0]; + if (typeof dim == "string") + dim = dim.charCodeAt (0); // char + var len = args.length - 1; + var val = args[len]; + switch (args.length) { + case 0: + case 1: + alert ("ERROR IN newArray32 -- args.length < 2"); + return new Array(0); + case 2: + var isDefined = (dim < 0); + if (isDefined) + dim = val.length; + var a = (val < 0 ? new Array(dim) : isInt32 ? new Int32Array(dim) : new Float64Array(dim)); + if (isDefined) + for (var i = dim; --i >= 0;) + a[i] = val[i]; + return a; + } + var xargs = new Array(len); + for (var i = len; --i >= 0;) { + xargs[i] = args[i + 1]; + } + var arr = new Array (dim); + for (var i = 0; i < dim; i++) { + // Call newArray referencing this array type + // only for the final iteration, and only if val === 0 + arr[i] = Clazz.newArray (xargs, isInt32); + } + return arr; +}; + + +/** + * Make arrays. + * + * @return the created Array object + */ +/* public */ +Clazz.newInt32Array = function () { + return Clazz.newArray32(arguments, true); +} + +/** + * Make arrays. + * + * @return the created Array object + */ +/* public */ +Clazz.newFloat64Array = function () { + return Clazz.newArray32(arguments, false); +} + +Clazz.newFloatArray = Clazz.newDoubleArray = Clazz.newFloat64Array; +Clazz.newIntArray = Clazz.newLongArray = Clazz.newShortArray = Clazz.newByteArray = Clazz.newInt32Array; +Clazz.newCharArray = Clazz.newBooleanArray = Clazz.newArray; + +//$_AI=Clazz.newIntArray; +//$_AF=Clazz.newFloatArray; +//$_AD=Clazz.newDoubleArray; +//$_AL=Clazz.newLongArray; +//$_AS=Clazz.newShortArray; +//$_AB=Clazz.newByteArray; +//$_AC=Clazz.newCharArray; +//$_Ab=Clazz.newBooleanArray; + + +var arrayIs = function(a, what) { + // for some reason, Number.constructor.toString() now gives "too much recursion" + return a.constructor && a.constructor != Number && a.constructor.toString().indexOf(what) >= 0 +} + +Clazz.isAS = function(a) { // just checking first parameter + return (a && typeof a == "object" && arrayIs(a, " Array") && (typeof a[0] == "string" || typeof a[0] == "undefined")); +} + +Clazz.isASS = function(a) { + return (a && typeof a == "object" && Clazz.isAS(a[0])); +} + +Clazz.isAP = function(a) { + return (a && Clazz.getClassName(a[0]) == "JU.P3"); +} + +Clazz.isAI = function(a) { + return (a && typeof a == "object" && (Clazz.haveInt32 ? arrayIs(a, "Int32Array") : a.int32Fake ? true : false)); +} + +Clazz.isAII = function(a) { // assumes non-null a[0] + return (a && typeof a == "object" && Clazz.isAI(a[0])); +} + +Clazz.isAF = function(a) { + return (a && typeof a == "object" && (Clazz.haveFloat64 ? arrayIs(a, "Float64Array") : a.float64Fake ? true : false)); +} + +Clazz.isAFF = function(a) { // assumes non-null a[0] + return (a && typeof a == "object" && Clazz.isAF(a[0])); +} + +Clazz.isAFFF = function(a) { // assumes non-null a[0] + return (a && typeof a == "object" && Clazz.isAFF(a[0])); +} + +Clazz.isAFloat = function(a) { // just checking first parameter + return (a && typeof a == "object" && arrayIs(a, " Array") && Clazz.instanceOf(a[0], Float)); +} + + +/** + * Make the RunnableCompatiability instance as a JavaScript function. + * + * @param jsr Instance of RunnableCompatiability + * @return JavaScript function instance represents the method run of jsr. + */ +/* public */ +/* +Clazz.makeFunction = function (jsr) { +// never used in Jmol -- called by Enum, but not accessible to it -- part of SWT + return function(e) { + if (!e) + e = window.event; + if (jsr.setEvent) + jsr.setEvent(e); + jsr.run(); + switch (jsr.returnSet) { + case 1: + return jsr.returnNumber; + case 2: + return jsr.returnBoolean; + case 3: + return jsr.returnObject; + } + }; +}; +*/ + +/* protected */ +Clazz.defineStatics = function (clazz) { + for (var j = arguments.length, i = (j - 1) / 2; --i >= 0;) { + var val = arguments[--j] + var name = arguments[--j]; + clazz[name] = clazz.prototype[name] = val; + } +}; + +/* public */ +Clazz.prepareFields = function (clazz, fieldsFun) { + var stacks = []; + if (clazz.con$truct) { + var ss = clazz.con$truct.stacks; + var idx = 0;//clazz.con$truct.index; + for (var i = idx; i < ss.length; i++) { + stacks[i] = ss[i]; + } + } + addProto(clazz.prototype, "con$truct", clazz.con$truct = function () { + var stacks = arguments.callee.stacks; + if (stacks) { + for (var i = 0; i < stacks.length; i++) { + stacks[i].apply (this, []); + } + } + }); + stacks.push(fieldsFun); + clazz.con$truct.stacks = stacks; + clazz.con$truct.index = 0; +}; + +/* + * Serialize those public or protected fields in class + * net.sf.j2s.ajax.SimpleSerializable. + */ +/* protected */ +/* +Clazz.registerSerializableFields = function (clazz) { + var args = arguments; + var length = args.length; + var newArr = []; + if (clazz.declared$Fields) { + for (var i = 0; i < clazz.declared$Fields.length; i++) { + newArr[i] = clazz.declared$Fields[i]; + } + } + clazz.declared$Fields = newArr; + + if (length > 0 && length % 2 == 1) { + var fs = clazz.declared$Fields; + var n = (length - 1) / 2; + for (var i = 1; i <= n; i++) { + var o = { name : args[i + i - 1], type : args[i + i] }; + var existed = false; + for (var j = 0; j < fs.length; j++) { + if (fs[j].name == o.name) { // reloaded classes + fs[j].type = o.type; // update type + existed = true; + break; + } + } + if (!existed) + fs.push(o); + } + } +}; +*/ +/* + * Get the caller method for those methods that are wrapped by + * Clazz.searchAndExecuteMethod. + * + * @param args caller method's arguments + * @return caller method, null if there is not wrapped by + * Clazz.searchAndExecuteMethod or is called directly. + */ +/* protected */ +/* +Clazz.getMixedCallerMethod = function (args) { + var o = {}; + var argc = args.callee.caller; // tryToSearchAndExecute + if (argc && argc !== tryToSearchAndExecute) // inherited method's apply + argc = argc.arguments.callee.caller; + if (argc !== tryToSearchAndExecute + || (argc = argc.arguments.callee.caller) !== Clazz.searchAndExecuteMethod) + return null; + o.claxxRef = argc.arguments[1]; + o.fxName = argc.arguments[2]; + o.paramTypes = Clazz.getParamsType(argc.arguments[3]); + argc = argc.arguments.callee.caller // Clazz.generateDelegatingMethod + && argc.arguments.callee.caller; // the private method's caller + if (!argc) + return null; + o.caller = argc; + return o; +}; +*/ +/* BH -- The issue here is a subclass calling its private method FOO when + * there is also a private method of the same name in its super class. + * This can ALWAYS be avoided and, one could argue, is bad + * program design anyway. In Jmol, the presence of this possibility + * creates over 8000 references to the global $fx, which was only + * checked in a few rare cases. We can then also remove $fz references. + * + */ + +/* + * Check and return super private method. + * In order make private methods be executed correctly, some extra javascript + * must be inserted into the beggining of the method body of the non-private + * methods that with the same method signature as following: + * + * var $private = Clazz.checkPrivateMethod (arguments); + * if ($private) { + * return $private.apply (this, arguments); + * } + * + * Be cautious about this. The above codes should be insert by Java2Script + * compiler or with double checks to make sure things work correctly. + * + * @param args caller method's arguments + * @return private method if there are private method fitted for the current + * calling environment + */ +/* public */ + +Clazz.checkPrivateMethod = function () { + // get both this one and the one calling it + me = arguments.callee.caller; + caller = arguments.callee.caller.caller; + var stack = me.stacks; + // if their classes are the same, no issue + var mySig = "\\" + Clazz.getParamsType(arguments[0]).join("\\") + if (!me.privateNote) { + me.privateNote = "You are seeing this note because the method " + + me.exName + mySig + " in class " + + me.exClazz.__CLASS_NAME__ + + " has a superclass method by the same name (possibly with the same parameters) that is private and " + + " therefore might be called improperly from this class. If your " + + " code does not run properly, or you want to make it run faster, change the name of this method to something else." + System.out.println(me.privateNote); + alert(me.privateNote); + } + /* + alert([me.exClazz.__CLASS_NAME__, me.exName, + caller.exClazz.__CLASS_NAME__, caller.exName,stack,mySig]) + if (stack == null || caller.exClazz == me.exClazz) + return null; + // I am being called by a different class... + + for (var i = stack.length; --i >= 0;) { + if (stacks[i] != caller.claxxRef) + continue; + // and it is on MY class stack +// if ( + + } + */ + +/* var m = Clazz.getMixedCallerMethod (args); + if (m == null) return null; + var callerFx = m.claxxRef.prototype[m.caller.exName]; + if (callerFx == null) return null; // may not be in the class hierarchies + var ppFun = null; + if (callerFx.claxxOwner ) { + ppFun = callerFx.claxxOwner.prototype[m.fxName]; + } else { + var stacks = callerFx.stacks; + for (var i = stacks.length - 1; i >= 0; i--) { + var fx = stacks[i].prototype[m.caller.exName]; + if (fx === m.caller) { + ppFun = stacks[i].prototype[m.fxName]; + } else if (fx ) { + for (var fn in fx) { + if (fn.indexOf ('\\') == 0 && fx[fn] === m.caller) { + ppFun = stacks[i].prototype[m.fxName]; + break; + } + } + } + if (ppFun) { + break; + } + } + } + if (ppFun && ppFun.claxxOwner == null) { + ppFun = ppFun["\\" + m.paramTypes]; + } + if (ppFun && ppFun.isPrivate && ppFun !== args.callee) { + return ppFun; + } +*/ + return null; +}; + + +//$fz = null; // for private method declaration + + +// /*# {$no.debug.support} >>x #*/ +// /* +// * Option to switch on/off of stack traces. +// */ +// /* protect */ +//Clazz.tracingCalling = false; + +// /* private */ +// Clazz.callingStack = function (caller, owner) { +// this.caller = caller; +// this.owner = owner; +// }; + +/*# x<< #*/ + +/** + * The first folder is considered as the primary folder. + * And try to be compatiable with _Loader system. + */ +/* private */ + + +/*** not used in Jmol + * * +if (window["_Loader"] && _Loader.binaryFolders) { + Clazz.binaryFolders = _Loader.binaryFolders; +} else { + Clazz.binaryFolders = ["j2s/", "", "j2slib/"]; +} + +Clazz.addBinaryFolder = function (bin) { + if (bin) { + var bins = Clazz.binaryFolders; + for (var i = 0; i < bins.length; i++) { + if (bins[i] == bin) { + return ; + } + } + bins[bins.length] = bin; + } +}; +Clazz.removeBinaryFolder = function (bin) { + if (bin) { + var bins = Clazz.binaryFolders; + for (var i = 0; i < bins.length; i++) { + if (bins[i] == bin) { + for (var j = i; j < bins.length - 1; j++) { + bins[j] = bins[j + 1]; + } + bins.length--; + return bin; + } + } + } + return null; +}; +Clazz.setPrimaryFolder = function (bin) { + if (bin) { + Clazz.removeBinaryFolder (bin); + var bins = Clazz.binaryFolders; + for (var i = bins.length - 1; i >= 0; i--) { + bins[i + 1] = bins[i]; + } + bins[0] = bin; + } +}; + +***/ + + +///////////////// special definitions of standard Java class methods /////////// + +/** + * This is a simple implementation for Clazz#load. It just ignore dependencies + * of the class. This will be fine for jar *.z.js file. + * It will be overriden by _Loader#load. + * For more details, see _Loader.js + */ +/* protected */ +/* +Clazz.load = function (musts, clazz, optionals, declaration) { + // not used in Jmol + if (declaration) + declaration (); +}; +*/ + +/* + * Invade the Object prototype! + * TODO: make sure that invading Object prototype does not affect other + * existed library, such as Dojo, YUI, Prototype, ... + */ +java.lang.Object = Clazz._O; + +Clazz._O.getName = Clazz._innerFunctions.getName; + + +java.lang.System = System = { + props : null, //new java.util.Properties (), + $props : {}, + arraycopy : function (src, srcPos, dest, destPos, length) { + if (src !== dest) { + for (var i = 0; i < length; i++) { + dest[destPos + i] = src[srcPos + i]; + } + } else { + var swap = []; + for (var i = 0; i < length; i++) { + swap[i] = src[srcPos + i]; + } + for (var i = 0; i < length; i++) { + dest[destPos + i] = swap[i]; + } + } + }, + currentTimeMillis : function () { + return new Date ().getTime (); + }, + gc : function() {}, // bh + getProperties : function () { + return System.props; + }, + getProperty : function (key, def) { + if (System.props) + return System.props.getProperty (key, def); + var v = System.$props[key]; + if (typeof v != "undefined") + return v; + if (key.indexOf(".") > 0) { + v = null; + switch (key) { + case "java.version": + v = "1.6"; + case "file.separator": + case "path.separator": + v = "/"; + break; + case "line.separator": + v = (navigator.userAgent.indexOf("Windows") >= 0 ? "\r\n" : "\n"); + break; + case "os.name": + case "os.version": + v = navigator.userAgent; + break; + } + if (v) + return System.$props[key] = v; + } + return (arguments.length == 1 ? null : def == null ? key : def); // BH + }, + getSecurityManager : function() { return null }, // bh + setProperties : function (props) { + System.props = props; + }, + lineSeparator : function() { return '\n' }, // bh + setProperty : function (key, val) { + if (!System.props) + return System.$props[key] = val; // BH + System.props.setProperty (key, val); + } +}; + +System.identityHashCode=function(obj){ + if(obj==null) + return 0; + + return obj._$hashcode || (obj._$hashcode = ++Clazz._hashCode) + +/* + try{ + return obj.toString().hashCode(); + }catch(e){ + var str=":"; + for(var s in obj){ + str+=s+":" + } + return str.hashCode(); + } +*/ +} + +System.out = new Clazz._O (); +System.out.__CLASS_NAME__ = "java.io.PrintStream"; +System.out.print = function () {}; +System.out.printf = function () {}; +System.out.println = function () {}; +System.out.write = function () {}; + +System.err = new Clazz._O (); +System.err.__CLASS_NAME__ = "java.io.PrintStream"; +System.err.print = function () {}; +System.err.printf = function () {}; +System.err.println = function () {}; +System.err.write = function () {}; + +Clazz.popup = Clazz.assert = Clazz.log = Clazz.error = window.alert; + +Thread = function () {}; +Thread.J2S_THREAD = Thread.prototype.J2S_THREAD = new Thread (); +Thread.currentThread = Thread.prototype.currentThread = function () { + return this.J2S_THREAD; +}; + +/* not used in Jmol +Clazz.intCast = function (n) { // 32bit + var b1 = (n & 0xff000000) >> 24; + var b2 = (n & 0xff0000) >> 16; + var b3 = (n & 0xff00) >> 8; + var b4 = n & 0xff; + if ((b1 & 0x80) != 0) { + return -(((b1 & 0x7f) << 24) + (b2 << 16) + (b3 << 8) + b4 + 1); + } else { + return (b1 << 24) + (b2 << 16) + (b3 << 8) + b4; + } +}; +Clazz.shortCast = function (s) { // 16bit + var b1 = (n & 0xff00) >> 8; + var b2 = n & 0xff; + if ((b1 & 0x80) != 0) { + return -(((b1 & 0x7f) << 8) + b2 + 1); + } else { + return (b1 << 8) + b4; + } +}; + +Clazz.byteCast = function (b) { // 8bit + if ((b & 0x80) != 0) { + return -((b & 0x7f) + 1); + } else { + return b & 0xff; + } +}; + +Clazz.charCast = function (c) { // 8bit + return String.fromCharCode (c & 0xff).charAt (0); +}; + +Clazz.floatCast = function (f) { // 32bit + return f; +}; + +*/ + + +/* + * Try to fix JavaScript's shift operator defects on long type numbers. + */ + +/* not used in Jmol + +Clazz.longMasks = []; + +Clazz.longReverseMasks = []; + +Clazz.longBits = []; + +;(function () { + var arr = [1]; + for (var i = 1; i < 53; i++) { + arr[i] = arr[i - 1] + arr[i - 1]; // * 2 or << 1 + } + Clazz.longBits = arr; + Clazz.longMasks[52] = arr[52]; + for (var i = 51; i >= 0; i--) { + Clazz.longMasks[i] = Clazz.longMasks[i + 1] + arr[i]; + } + Clazz.longReverseMasks[0] = arr[0]; + for (var i = 1; i < 52; i++) { + Clazz.longReverseMasks[i] = Clazz.longReverseMasks[i - 1] + arr[i]; + } +}) (); + + +Clazz.longLeftShift = function (l, o) { // 64bit + if (o == 0) return l; + if (o >= 64) return 0; + if (o > 52) { + error ("[Java2Script] Error : JavaScript does not support long shift!"); + return l; + } + if ((l & Clazz.longMasks[o - 1]) != 0) { + error ("[Java2Script] Error : Such shift operator results in wrong calculation!"); + return l; + } + var high = l & Clazz.longMasks[52 - 32 + o]; + if (high != 0) { + return high * Clazz.longBits[o] + (l & Clazz.longReverseMasks[32 - o]) << 0; + } else { + return l << o; + } +}; + +Clazz.intLeftShift = function (n, o) { // 32bit + return (n << o) & 0xffffffff; +}; + +Clazz.longRightShift = function (l, o) { // 64bit + if ((l & Clazz.longMasks[52 - 32]) != 0) { + return Math.round((l & Clazz.longMasks[52 - 32]) / Clazz.longBits[32 - o]) + (l & Clazz.longReverseMasks[o]) >> o; + } else { + return l >> o; + } +}; + +Clazz.intRightShift = function (n, o) { // 32bit + return n >> o; // no needs for this shifting wrapper +}; + +Clazz.long0RightShift = function (l, o) { // 64bit + return l >>> o; +}; + +Clazz.int0RightShift = function (n, o) { // 64bit + return n >>> o; // no needs for this shifting wrapper +}; + +*/ +// Compress the common public API method in shorter name +//$_L=Clazz.load; +//$_W=Clazz.declareAnonymous;$_T=Clazz.declareType; +//$_J=Clazz.declarePackage;$_C=Clazz.decorateAsClass; +//$_Z=Clazz.instantialize;$_I=Clazz.declareInterface;$_D=Clazz.isClassDefined; +//$_H=Clazz.pu$h;$_P=Clazz.p0p;$_B=Clazz.prepareCallback; +//$_N=Clazz.innerTypeInstance;$_K=Clazz.makeConstructor;$_U=Clazz.superCall;$_R=Clazz.superConstructor; +//$_M=Clazz.defineMethod;$_V=Clazz.overrideMethod;$_S=Clazz.defineStatics; +//$_E=Clazz.defineEnumConstant; +//$_F=Clazz.cloneFinals; +//$_Y=Clazz.prepareFields;$_A=Clazz.newArray;$_O=Clazz.instanceOf; +//$_G=Clazz.inheritArgs;$_X=Clazz.checkPrivateMethod;$_Q=Clazz.makeFunction; +//$_s=Clazz.registerSerializableFields; +//$_k=Clazz.overrideConstructor; + + +/////////////////////// inner function support ///////////////////////////////// + +/* public */ +Clazz.innerFunctionNames = Clazz.innerFunctionNames.concat ([ + "getSuperclass", "isAssignableFrom", + "getConstructor", + "getDeclaredMethod", "getDeclaredMethods", + "getMethod", "getMethods", + "getModifiers", /*"isArray",*/ "newInstance"]); + +/* public */ +Clazz._innerFunctions.getSuperclass = function () { + return this.superClazz; +}; + +/* public */ +Clazz._innerFunctions.isAssignableFrom = function (clazz) { + return Clazz.getInheritedLevel (clazz, this) >= 0; +}; + +/* public */ +Clazz._innerFunctions.getConstructor = function () { + return new java.lang.reflect.Constructor (this, [], [], + java.lang.reflect.Modifier.PUBLIC); +}; +/** + * TODO: fix bug for polymorphic methods! + */ +/* public */ +Clazz._innerFunctions.getDeclaredMethods = Clazz._innerFunctions.getMethods = function () { + var ms = []; + var p = this.prototype; + for (var attr in p) { + if (typeof p[attr] == "function" && !p[attr].__CLASS_NAME__) { + /* there are polynormical methods. */ + ms.push(new java.lang.reflect.Method (this, attr, + [], java.lang.Void, [], java.lang.reflect.Modifier.PUBLIC)); + } + } + p = this; + for (var attr in p) { + if (typeof p[attr] == "function" && !p[attr].__CLASS_NAME__) { + ms.push(new java.lang.reflect.Method (this, attr, + [], java.lang.Void, [], java.lang.reflect.Modifier.PUBLIC + | java.lang.reflect.Modifier.STATIC)); + } + } + return ms; +}; +/* public */ +Clazz._innerFunctions.getDeclaredMethod = Clazz._innerFunctions.getMethod = function (name, clazzes) { + var p = this.prototype; + for (var attr in p) { + if (name == attr && typeof p[attr] == "function" + && !p[attr].__CLASS_NAME__) { + /* there are polynormical methods. */ + return new java.lang.reflect.Method (this, attr, + [], java.lang.Void, [], java.lang.reflect.Modifier.PUBLIC); + } + } + p = this; + for (var attr in p) { + if (name == attr && typeof p[attr] == "function" + && !p[attr].__CLASS_NAME__) { + return new java.lang.reflect.Method (this, attr, + [], java.lang.Void, [], java.lang.reflect.Modifier.PUBLIC + | java.lang.reflect.Modifier.STATIC); + } + } + return null; +}; +/* public */ +Clazz._innerFunctions.getModifiers = function () { + return java.lang.reflect.Modifier.PUBLIC; +}; + +Clazz._innerFunctions.newInstance = function (a) { + var clz = this; + switch(a == null ? 0 : a.length) { + case 0: + return new clz(); + case 1: + return new clz(a[0]); + case 2: + return new clz(a[0], a[1]); + case 3: + return new clz(a[0], a[1], a[2]); + case 4: + return new clz(a[0], a[1], a[2], a[3]); + default: + var x = "new " + clz.__CLASS_NAME__ + "("; + for (var i = 0; i < a.length; i++) + x += (i == 0 ? "" : ",") + "a[" + i + "]"; + x += ")"; + return eval(x); + } +}; + +//Object.newInstance = Clazz._innerFunctions.newInstance; +;(function(){ // BH added wrapper here + var inF = Clazz.innerFunctionNames; + for (var i = 0; i < inF.length; i++) { + Clazz._O[inF[i]] = Clazz._innerFunctions[inF[i]]; + Array[inF[i]] = Clazz._innerFunctions[inF[i]]; + } + //Array["isArray"] = function () { + // return true; + //}; +})(); + +//////////////////////////// hotspot and unloading ///////////////////////////// +/* For hotspot and unloading */ + +if (window["Clazz"] && !window["Clazz"].unloadClass) { + +/* public */ +Clazz.unloadClass = function (qClazzName) { + var cc = Clazz.evalType (qClazzName); + if (cc) { + Clazz.unloadedClasses[qClazzName] = cc; + var clazzName = qClazzName; + var pkgFrags = clazzName.split (/\./); + var pkg = null; + for (var i = 0; i < pkgFrags.length - 1; i++) + pkg = (pkg ? pkg[pkgFrags[i]] : Clazz.allPackage[pkgFrags[0]]); + if (!pkg) { + Clazz.allPackage[pkgFrags[0]] = null; + window[pkgFrags[0]] = null; + // also try to unload inner or anonymous classes + for (var c in window) { + if (c.indexOf (qClazzName + "$") == 0) { + Clazz.unloadClass (c); + window[c] = null; + } + } + } else { + pkg[pkgFrags[pkgFrags.length - 1]] = null; + // also try to unload inner or anonymous classes + for (var c in pkg) { + if (c.indexOf (pkgFrags[pkgFrags.length - 1] + "$") == 0) { + Clazz.unloadClass (pkg.__PKG_NAME__ + "." + c); + pkg[c] = null; + } + } + } + + if (Clazz.allClasses[qClazzName]) { + Clazz.allClasses[qClazzName] = false; + // also try to unload inner or anonymous classes + for (var c in Clazz.allClasses) { + if (c.indexOf (qClazzName + "$") == 0) { + Clazz.allClasses[c] = false; + } + } + } + + for (var m in cc) { + cleanDelegateMethod (cc[m]); + } + for (var m in cc.prototype) { + cleanDelegateMethod (cc.prototype[m]); + } + + if (Clazz._Loader) { + Clazz._Loader.unloadClassExt(qClazzName); + } + + return true; + } + return false; +}; + +/* private */ +var cleanDelegateMethod = function (m) { + if (!m) + return; + if (typeof m == "function" && m.lastMethod + && m.lastParams && m.lastClaxxRef) { + m.lastMethod = null; + m.lastParams = null; + m.lastClaxxRef = null; + } +}; + +} // if (window["Clazz"] && !window["Clazz"].unloadClass) + +/****************************************************************************** + * Copyright (c) 2007 java2script.org and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Zhou Renjian - initial API and implementation + *****************************************************************************/ +/******* + * @author zhou renjian + * @create July 10, 2006 + *******/ + +//if (window["ClazzNode"] == null) { +/** + * TODO: + * Make optimization over class dependency tree. + */ + +/* + * ClassLoader Summary + * + * ClassLoader creates SCRIPT elements and setup class path and onload + * callback to continue class loading. + * + * In the onload callbacks, _Loader will try to calculate the next-to-be- + * load *.js and load it. In *.js, it will contains some codes like + * Clazz.load (..., "$wt.widgets.Control", ...); + * to provide information to build up the class dependency tree. + * + * Some known problems of different browsers: + * 1. In IE, loading *.js through SCRIPT will first triggers onreadstatechange + * event, and then executes inner *.js source. + * 2. In Firefox, loading *.js will first executes *.js source and then + * triggers onload event. + * 3. In Opera, similar to IE, but trigger onload event. (TODO: More details + * should be studied. Currently, Opera supports no multiple-thread-loading) + * + * For class dependency tree, actually, it is not a tree. It is a reference + * net with nodes have n parents and n children. There is a root, which + * ClassLoader knows where to start searching and loading classes, for such + * a net. Each node is a class. Each class may require a set of must-classes, + * which must be loaded before itself getting initialized, and also need a set + * of optional classes, which also be loaded before being called. + * + * The class loading status will be in 6 stages. + * 1. Unknown, the class is newly introduced by other class. + * 2. Known, the class is already mentioned by other class. + * 3. Loaded, *.js source is in memory, but may not be initialized yet. It + * requires all its must-classes be intiailized, which is in the next stage. + * 4. Musts loaded, all must classes is already loaded and declared. + * 5. Delcared, the class is already declared (_Loader#isClassDefined). + * 6. Optionals loaded, all optional classes is loaded and declared. + * + * The ClassLoader tries to load all necessary classes in order, and intialize + * them in order. For such job, it will traverse the dependency tree, and try + * to next class to-be-loaded. Sometime, the class dependencies may be in one + * or more cycles, which must be broken down so classes is loaded in correct + * order. + * + * Loading order and intializing order is very important for the ClassLoader. + * The following technical options are considered: + * 1. SCRIPT is loading asynchronously, which means controling order must use + * callback methods to continue. + * 2. Multiple loading threads are later introduced, which requires the + * ClassLoader should use variables to record the class status. + * 3. Different browsers have different loading orders, which means extra tests + * should be tested to make sure loading order won't be broken. + * 4. Java2Script simulator itself have some loading orders that must be + * honored, which means it should be integrated seamlessly to Clazz system. + * 5. Packed *.z.js is introduced to avoid lots of small *.js which requires + * lots of HTTP connections, which means that packed *.z.js should be treated + * specially (There will be mappings for such packed classes). + * 6. *.js or *.css loading may fail according to network status, which means + * another loading try should be performed, so _Loader is more robust. + * 7. SWT lazy loading is later introduced, which means that class loading + * process may be paused and should be resumed later. + * + * Some known bugs: + * $_L(["$wt.graphics.Drawable","$wt.widgets.Widget"], + * "$wt.widgets.Control", ... + * has errors while must classes in different order such as + * $_L(["$wt.widgets.Widget", "$wt.graphics.Drawable"], + * "$wt.widgets.Control", ... + * has no error. + * + * Other maybe bug scenarios: + * 1. In _Loader.maxLoadingThreads = 1; single loading thread + * mode, there are no errors, but in default multiple thread loading mode, + * there are errors. + * 2. No errors in one browser, but has errors on other browsers (Browser + * script loading order differences). + * 3. First time loading has errors, but reloading it gets no errors (Maybe + * HTTP connections timeout, but should not accur in local file system, or it + * is a loading bug by using JavaScript timeout thread). + */ + +/* + * The following comments with "#" are special configurations for a much + * smaller *.js file size. + * + * @see net.sf.j2s.lib/src/net/sf/j2s/lib/build/SmartJSCompressor.java + */ +/** + * Static class loader class + */ +Clazz._Loader = Clazz.ClazzLoader = function () {}; + +/** + * Class dependency tree node + */ +/* private */ +var Node = function () { + this.parents = []; + this.musts = []; + this.optionals = []; + this.declaration = null; + this.name = null; // id + this.path = null; +// this.requires = null; +// this.requiresMap = null; + this.onLoaded = null; + this.status = 0; + this.random = 0.13412; +}; + + +;(function(Clazz, _Loader) { + +_Loader._checkLoad = Jmol._checkLoad; + +_Loader.updateNodeForFunctionDecoration = function(qName) { + var node = findNode(qName); + if (node && node.status == Node.STATUS_KNOWN) { + window.setTimeout((function(nnn) { + return function() { + updateNode(nnn); + }; + })(node), 1); + } +} + +Node.prototype.toString = function() { + return this.name || this.path || "ClazzNode"; +} + +Node.STATUS_UNKNOWN = 0; +Node.STATUS_KNOWN = 1; +Node.STATUS_CONTENT_LOADED = 2; +Node.STATUS_MUSTS_LOADED = 3; +Node.STATUS_DECLARED = 4; +Node.STATUS_LOAD_COMPLETE = 5; + + +var loaders = []; + +/* public */ +_Loader.requireLoaderByBase = function (base) { + for (var i = 0; i < loaders.length; i++) { + if (loaders[i].base == base) { + return loaders[i]; + } + } + var loader = new _Loader (); + loader.base = base; + loaders.push(loader); + return loader; +}; + +/** + * Class dependency tree + */ +var clazzTreeRoot = new Node(); + +/** + * Used to keep the status whether a given *.js path is loaded or not. + */ +/* private */ +var loadedScripts = {}; + +/** + * Multiple threads are used to speed up *.js loading. + */ +/* private */ +var inLoadingThreads = 0; + +/** + * Maximum of loading threads + */ +/* private */ +var maxLoadingThreads = 6; + +var userAgent = navigator.userAgent.toLowerCase (); +var isOpera = (userAgent.indexOf ("opera") != -1); +var isIE = (userAgent.indexOf ("msie") != -1) && !isOpera; +var isGecko = (userAgent.indexOf ("gecko") != -1); + +/* + * Opera has different loading order which will result in performance degrade! + * So just return to single thread loading in Opera! + * + * FIXME: This different loading order also causes bugs in single thread! + */ +if (isOpera) { + maxLoadingThreads = 1; + var index = userAgent.indexOf ("opera/"); + if (index != -1) { + var verNumber = 9.0; + try { + verNumber = parseFloat(userAgent.subString (index + 6)); + } catch (e) {} + if (verNumber >= 9.6) { + maxLoadingThreads = 6; + } + } +} + +/** + * Try to be compatiable with Clazz system. + * In original design _Loader and Clazz are independent! + * -- zhourenjian @ December 23, 2006 + */ +var isClassdefined; +var definedClasses; + +if (self.Clazz && Clazz.isClassDefined) { + isClassDefined = Clazz.isClassDefined; +} else { + definedClasses = {}; + isClassDefined = function (clazzName) { + return definedClasses[clazzName] == true; + }; +} + +/** + * Expand the shortened list of class names. + * For example: + * JU.Log, $.Display, $.Decorations + * will be expanded to + * JU.Log, JU.Display, JU.Decorations + * where "$." stands for the previous class name's package. + * + * This method will be used to unwrap the required/optional classes list and + * the ignored classes list. + */ +/* private */ +var unwrapArray = function (arr) { + if (!arr || arr.length == 0) + return []; + var last = null; + for (var i = 0; i < arr.length; i++) { + if (!arr[i]) + continue; + if (arr[i].charAt (0) == '$') { + if (arr[i].charAt (1) == '.') { + if (!last) + continue; + var idx = last.lastIndexOf ("."); + if (idx != -1) { + var prefix = last.substring (0, idx); + arr[i] = prefix + arr[i].substring (1); + } + } else { + arr[i] = "org.eclipse.s" + arr[i].substring (1); + } + } + last = arr[i]; + } + return arr; +}; + +/** + * Used to keep to-be-loaded classes. + */ +/* private */ +var classQueue = []; + +/* private */ +var classpathMap = {}; + +/* private */ +var pkgRefCount = 0; + +/* public */ +_Loader.loadPackageClasspath = function (pkg, base, isIndex, fSuccess, mode, pt) { + var map = classpathMap; + mode || (mode = 0); + fSuccess || (fSuccess = null); + pt || (pt = 0); + + /* + * In some situation, maybe, + * _Loader.packageClasspath ("java", ..., true); + * is called after other _Loader#packageClasspath, e.g. + * + * _Loader.packageClasspath ("org.eclipse.swt", "...", true); + * _Loader.packageClasspath ("java", "...", true); + * + * which is not recommended. But _Loader should try to adjust orders + * which requires "java" to be declared before normal _Loader + * #packageClasspath call before that line! And later that line + * should never initialize "java/package.js" again! + */ + var isPkgDeclared = (isIndex && map["@" + pkg]); + if (mode == 0 && isIndex && !map["@java"] && pkg.indexOf ("java") != 0 && needPackage("java")) { + _Loader.loadPackage("java", fSuccess ? function(_package){_Loader.loadPackageClasspath(pkg, base, isIndex, fSuccess, 1)} : null); + if (fSuccess) + return; + } + if (pkg instanceof Array) { + unwrapArray(pkg); + if (fSuccess) { + if (pt < pkg.length) + _Loader.loadPackageClasspath(pkg[pt], base, isIndex, function(_loadPackageClassPath){_Loader.loadPackageClasspath(pkg, base, isIndex, fSuccess, 1, pt + 1)}, 1); + else + fSuccess(); + } else { + for (var i = 0; i < pkg.length; i++) + _Loader.loadPackageClasspath(pkg[i], base, isIndex, null); + } + return; + } + switch (pkg) { + case "java.*": + pkg = "java"; + // fall through + case "java": + if (base) { + // support ajax for default + var key = "@net.sf.j2s.ajax"; + if (!map[key]) + map[key] = base; + key = "@net.sf.j2s"; + if (!map[key]) + map[key] = base; + } + break; + case "swt": + pkg = "org.eclipse.swt"; + break; + case "ajax": + pkg = "net.sf.j2s.ajax"; + break; + case "j2s": + pkg = "net.sf.j2s"; + break; + default: + if (pkg.lastIndexOf(".*") == pkg.length - 2) + pkg = pkg.substring(0, pkg.length - 2); + break; + } + if (base) // critical for multiple applets + map["@" + pkg] = base; + if (isIndex && !isPkgDeclared && !window[pkg + ".registered"]) { + pkgRefCount++; + if (pkg == "java") + pkg = "core" // JSmol -- moves java/package.js to core/package.js + _Loader.loadClass(pkg + ".package", function () { + if (--pkgRefCount == 0) + runtimeLoaded(); + //fSuccess && fSuccess(); + }, true, true, 1); + return; + } + fSuccess && fSuccess(); +}; + +/** + * BH: allows user/developer to load classes even though wrapping and Google + * Closure Compiler has not been run on the class. + * + */ +Clazz.loadClass = function (name, onLoaded, async) { + if (!self.Class) { + Class = Clazz; + Class.forName = Clazz._4Name; + JavaObject = Clazz._O; + // maybe more here + } + return (name && _Loader.loadClass(name, onLoaded, true, async, 1)); +} + +/** + * Load the given class ant its related classes. + */ +/* public */ +_Loader.loadClass = function (name, onLoaded, forced, async, mode) { + + mode || (mode = 0); // BH: not implemented + (async == null) && (async = false); + + if (typeof onLoaded == "boolean") + return Clazz.evalType(name); + + System.out.println("loadClass " + name) + + // Make sure that packageClasspath ("java", base, true); + // is called before any _Loader#loadClass is called. + + if (needPackage("java")) + _Loader.loadPackage("java"); + if (needPackage("core")) + _Loader.loadPackage("core"); + +// var swtPkg = "org.eclipse.swt"; +// if (name.indexOf (swtPkg) == 0 || name.indexOf ("$wt") == 0) { +// _Loader.assurePackageClasspath (swtPkg); +// } +// if (name.indexOf ("junit") == 0) { +// _Loader.assurePackageClasspath ("junit"); +// } + + // Any _Loader#loadClass calls will be queued until java.* core classes are loaded. + + _Loader.keepOnLoading = true; + + if (!forced && (pkgRefCount && name.lastIndexOf(".package") != name.length - 8 + || name.indexOf("java.") != 0 && !isClassDefined(runtimeKeyClass) + )) { + queueBe4KeyClazz.push([name, onLoaded]); + + + System.out.println("loadclass-queuing" + name+ runtimeKeyClass + " "+ isClassDefined(runtimeKeyClass)) + + return; + } + var b; + if ((b = isClassDefined(name)) || isClassExcluded(name)) { + if (b && onLoaded) { + var nn = findNode(name); + if (!nn || nn.status >= Node.STATUS_LOAD_COMPLETE) { + if (async) { + window.setTimeout(onLoaded, 25); + } else { + onLoaded(); + } + } + } + return; + } + var path = _Loader.getClasspathFor(name); + var existed = loadedScripts[path]; + var qq = classQueue; + if (!existed) + for (var i = qq.length; --i >= 0;) + if (qq[i].path == path || qq[i].name == name) { + existed = true; + break; + } + if (existed) { + if (onLoaded) { + var n = findNode(name); + if (n) { + if (!n.onLoaded) { + n.onLoaded = onLoaded; + } else if (onLoaded != n.onLoaded) { + n.onLoaded = (function (nF, oF) { return function () { nF(); oF() }; }) (n.onLoaded, onLoaded); + } + } + } + return; + } + + var n = (Clazz.unloadedClasses[name] && findNode(name) || new Node()); + n.name = name; + n.path = path; + n.isPackage = (path.lastIndexOf("package.js") == path.length - 10); + mappingPathNameNode(path, name, n); + n.onLoaded = onLoaded; + n.status = Node.STATUS_KNOWN; + var needBeingQueued = false; + for (var i = qq.length; --i >= 0;) { + if (qq[i].status != Node.STATUS_LOAD_COMPLETE) { + needBeingQueued = true; + break; + } + } + + if (n.isPackage) {//forced + // push class to queue + var pt = qq.length; + for (; --pt >= 0;) { + if (qq[pt].isPackage) + break; + qq[pt + 1] = qq[pt]; + } + qq[++pt] = n; + } else if (needBeingQueued) { + qq.push(n); + } + if (!needBeingQueued) { // can be loaded directly + var bSave = false; + if (onLoaded) { + bSave = isLoadingEntryClass; + isLoadingEntryClass = true; + } + if (forced)onLoaded = null; + addChildClassNode(clazzTreeRoot, n, true); + loadScript(n, n.path, n.requiredBy, false, onLoaded ? function(_loadClass){ isLoadingEntryClass = bSave; onLoaded()}: null); + } +}; + +/* + * Check whether given package's classpath is setup or not. + * Only "java" and "org.eclipse.swt" are accepted in argument. + */ +/* private */ +var needPackage = function(pkg) { + // note that false != null and true != null + return (window[pkg + ".registered"] != null && !classpathMap["@" + pkg]); +} + +/* private */ +_Loader.loadPackage = function(pkg, fSuccess) { + fSuccess || (fSuccess = null); + window[pkg + ".registered"] = false; + _Loader.loadPackageClasspath(pkg, + (_Loader.J2SLibBase || (_Loader.J2SLibBase = (_Loader.getJ2SLibBase() || "j2s/"))), + true, fSuccess); +}; + +/** + * Register classes to a given *.z.js path, so only a single *.z.js is loaded + * for all those classes. + */ +/* public */ +_Loader.jarClasspath = function (jar, clazzes) { + if (!(clazzes instanceof Array)) + clazzes = [classes]; + unwrapArray(clazzes); + for (var i = clazzes.length; --i >= 0;) + classpathMap["#" + clazzes[i]] = jar; + classpathMap["$" + jar] = clazzes; +}; + +/** + * Usually be used in .../package.js. All given packages will be registered + * to the same classpath of given prefix package. + */ +/* public */ +_Loader.registerPackages = function (prefix, pkgs) { + //_Loader.checkInteractive (); + var base = _Loader.getClasspathFor (prefix + ".*", true); + for (var i = 0; i < pkgs.length; i++) { + if (window["Clazz"]) { + Clazz.declarePackage (prefix + "." + pkgs[i]); + } + _Loader.loadPackageClasspath (prefix + "." + pkgs[i], base); + } +}; + +/** + * Using multiple sites to load *.js in multiple threads. Using multiple + * sites may avoid 2 HTTP 1.1 connections recommendation limit. + * Here is a default implementation for http://archive.java2script.org. + * In site archive.java2script.org, there are 6 sites: + * 1. http://archive.java2script.org or http://a.java2script.org + * 2. http://erchive.java2script.org or http://e.java2script.org + * 3. http://irchive.java2script.org or http://i.java2script.org + * 4. http://orchive.java2script.org or http://o.java2script.org + * 5. http://urchive.java2script.org or http://u.java2script.org + * 6. http://yrchive.java2script.org or http://y.java2script.org + */ +/* protected */ + /* +_Loader.multipleSites = function (path) { + var deltas = window["j2s.update.delta"]; + if (deltas && deltas instanceof Array && deltas.length >= 3) { + var lastOldVersion = null; + var lastNewVersion = null; + for (var i = 0; i < deltas.length / 3; i++) { + var oldVersion = deltas[i + i + i]; + if (oldVersion != "$") { + lastOldVersion = oldVersion; + } + var newVersion = deltas[i + i + i + 1]; + if (newVersion != "$") { + lastNewVersion = newVersion; + } + var relativePath = deltas[i + i + i + 2]; + var key = lastOldVersion + "/" + relativePath; + var idx = path.indexOf (key); + if (idx != -1 && idx == path.length - key.length) { + path = path.substring (0, idx) + lastNewVersion + "/" + relativePath; + break; + } + } + } + var length = path.length; + if (maxLoadingThreads > 1 + && ((length > 15 && path.substring (0, 15) == "http://archive.") + || (length > 9 && path.substring (0, 9) == "http://a."))) { + var index = path.lastIndexOf("/"); + if (index < length - 3) { + var arr = ['a', 'e', 'i', 'o', 'u', 'y']; + var c1 = path.charCodeAt (index + 1); + var c2 = path.charCodeAt (index + 2); + var idx = (length - index) * 3 + c1 * 5 + c2 * 7; // Hash + return path.substring (0, 7) + arr[idx % 6] + path.substring (8); + } + } + return path; +}; + */ + +/** + * Return the *.js path of the given class. Maybe the class is contained + * in a *.z.js jar file. + * @param clazz Given class that the path is to be calculated for. May + * be java.package, or java.lang.String + * @param forRoot Optional argument, if true, the return path will be root + * of the given classs' package root path. + * @param ext Optional argument, if given, it will replace the default ".js" + * extension. + */ +/* public */ +_Loader.getClasspathFor = function (clazz, forRoot, ext) { + var path = classpathMap["#" + clazz]; + if (!path || forRoot || ext) { + var base; + var idx; + if (path) { + clazz = clazz.replace(/\./g, "/"); + if ((idx = path.lastIndexOf(clazz)) >= 0 + || (idx = clazz.lastIndexOf("/")) >= 0 + && (idx = path.lastIndexOf(clazz.substring(0, idx))) >= 0) + base = path.substring(0, idx); + } else { + idx = clazz.length + 2; + while ((idx = clazz.lastIndexOf(".", idx - 2)) >= 0) + if ((base = classpathMap["@" + clazz.substring(0, idx)])) + break; + if (!forRoot) + clazz = clazz.replace (/\./g, "/"); + } + if (base == null) { + var bins = "binaryFolders"; + base = (window["Clazz"] && Clazz[bins] && Clazz[bins].length ? Clazz[bins][0] + : _Loader[bins] && _Loader[bins].length ? _Loader[bins][0] + : "j2s"); + } + path = (base.lastIndexOf("/") == base.length - 1 ? base : base + "/") + (forRoot ? "" + : clazz.lastIndexOf("/*") == clazz.length - 2 ? clazz.substring(0, idx + 1) + : clazz + (!ext ? ".js" : ext.charAt(0) != '.' ? "." + ext : ext)); + } + return path;//_Loader.multipleSites(path); +}; + +/** + * To ignore some classes. + */ +/* public */ +_Loader.ignore = function () { + var clazzes = (arguments.length == 1 && arguments[0] instanceof Array ? + clazzes = arguments[0] : null); + var n = (clazzes ? clazzes.length : arguments.length); + if (!clazzes) { + clazzes = new Array(n); + for (var i = 0; i < n; i++) + clazzes[i] = arguments[i]; + } + unwrapArray(clazzes); + for (var i = 0; i < n; i++) + excludeClassMap["@" + clazzes[i]] = 1; +}; + +/** + * The following *.script* can be overriden to indicate the + * status of classes loading. + * + * TODO: There should be a Java interface with name like INativeLoaderStatus + */ +/* public */ +_Loader.onScriptLoading = function (file){}; + +/* public */ +_Loader.onScriptLoaded = function (file, isError){}; + +/* public */ +_Loader.onScriptInitialized = function (file){}; + +/* public */ +_Loader.onScriptCompleted = function (file){}; + +/* public */ +_Loader.onClassUnloaded = function (clazz){}; + +/** + * After all the classes are loaded, this method will be called. + * Should be overriden to run *.main([]). + */ +/* public */ +_Loader.onGlobalLoaded = function () {}; + +/* public */ +_Loader.keepOnLoading = true; // never set false in this code + + +/* private */ +var mapPath2ClassNode = {}; + +/* private */ +var isClassExcluded = function (clazz) { + return excludeClassMap["@" + clazz]; +}; + +/* Used to keep ignored classes */ +/* private */ +var excludeClassMap = {}; + +/* private */ +var evaluate = function(file, file0, js) { + try { + eval(js + ";//# sourceURL="+file); + } catch (e) { + if (Clazz._isQuiet) + return; + var s = "[Java2Script] The required class file \n\n" + file + (js.indexOf("[Exception") == 0 && js.indexOf("data: no") ? + "\nwas not found.\n" + : "\ncould not be loaded. Script error: " + e.message + " \n\ndata:\n\n" + js) + "\n\n" + Clazz.getStackTrace(); + alert(s) + Clazz.alert(s); + throw e; + } + _Loader.onScriptLoaded(file, false); + tryToLoadNext(file0); +} + +/* private */ +var failedHandles = {}; + +/* private */ +var generateRemovingFunction = function (node) { + return function () { + if (node.readyState != "interactive") { + try { + if (node.parentNode) + node.parentNode.removeChild (node); + } catch (e) { } + node = null; + } + }; +}; + +/* private */ +var removeScriptNode = function (n) { + if (window["j2s.script.debugging"]) { + return; + } + // lazily remove script nodes. + window.setTimeout (generateRemovingFunction (n), 1); +}; + +/* public */ +Clazz._4Name = function(clazzName, applet, state) { + if (Clazz.isClassDefined(clazzName)) + return Clazz.evalType(clazzName); + var f = (Jmol._isAsync && applet ? applet._restoreState(clazzName, state) : null); + if (f == 1) + return null; // must be already being created + if (_Loader.setLoadingMode(f ? _Loader.MODE_SCRIPT : "xhr.sync")) { + _Loader.loadClass(clazzName, f, false, true, 1); + return null; // this will surely throw an error, but that is OK + } + //alert ("Using Java reflection: " + clazzName + " for " + applet._id + " \n"+ Clazz.getStackTrace()); + _Loader.loadClass(clazzName); + return Clazz.evalType(clazzName); +}; + +/** + * BH: possibly useful for debugging + */ +Clazz.currentPath= ""; + +/** + * Load *.js by adding script elements into head. Hook the onload event to + * load the next class in dependency tree. + */ +/* private */ +var loadScript = function (node, file, why, ignoreOnload, fSuccess, _loadScript) { + + Clazz.currentPath = file; + if (ignoreOnload)alert("WHY>>") +//BH removed // maybe some scripts are to be loaded without needs to know onload event. +// if (!ignoreOnload && loadedScripts[file]) { +// _Loader.tryToLoadNext(file); +// return; +// } + loadedScripts[file] = true; + // also remove from queue + removeArrayItem(classQueue, file); + + // forces not-found message + isUsingXMLHttpRequest = true; + isAsynchronousLoading = false; + if (_Loader._checkLoad) { + System.out.println("\t" + file + (why ? "\n -- required by " + why : "") + " ajax=" + isUsingXMLHttpRequest + " async=" + isAsynchronousLoading) + } + + var file0 = file; + if (Clazz._debugging) { + file = file.replace(/\.z\.js/,".js"); + } + + _Loader.onScriptLoading(file); + if (isUsingXMLHttpRequest && !isAsynchronousLoading) { + // alert("\t" + file + (why ? "\n -- required by " + why : "") + " ajax=" + isUsingXMLHttpRequest + " async=" + isAsynchronousLoading + " " + Clazz.getStackTrace()) + // synchronous loading + // works in MSIE locally unless a binary file :) + // from Jmol.api.Interface only + var data = Jmol._getFileData(file); + try{ + evaluate(file, file0, data); + }catch(e) { + alert(e + " loading file " + file + " " + node.name + " " + Clazz.getStackTrace()); + } + if (fSuccess) { +// System.out.println("firing in loadScript " + file + " " + (fSuccess && fSuccess.toString())) + fSuccess(); + } + return; + } + + +System.out.println("for file " + file +" fSuccess = " + (fSuccess ? fSuccess.toString() : "")) + var info = { + dataType:"script", + async:true, + type:"GET", + url:file, + success:W3CScriptOnCallback(file, false, fSuccess), + error:W3CScriptOnCallback(file, true, fSuccess) + }; + inLoadingThreads++; + Jmol.$ajax(info); +}; + +/* private */ +var W3CScriptOnCallback = function (path, forError, fSuccess) { + var s = Clazz.getStackTrace(); + // if (!fSuccess)alert("why no fSuccess?" + s) + return function () { + //System.out.println("returning " + (fSuccess ? fSuccess.toString() : "no function ") + s) + if (forError && __debuggingBH)Clazz.alert ("############ forError=" + forError + " path=" + path + " ####" + (forError ? "NOT" : "") + "LOADED###"); + if (isGecko && this.timeoutHandle) + window.clearTimeout(this.timeoutHandle), this.timeoutHandle = null; + if (inLoadingThreads > 0) + inLoadingThreads--; + //System.out.println("w3ccalback for " + path + " " + inLoadingThreads + " threads") + this.onload = null; + this.onerror = null; + if (forError) + alert ("There was a problem loading " + path); + _Loader.onScriptLoaded(path, true); + var node = this; + var f; + if (fSuccess) + f = function(_W3scriptFS){removeScriptNode(node);tryToLoadNext(path, fSuccess); }; + else + f = function(_W3script){removeScriptNode(node);tryToLoadNext(path)}; + if (loadingTimeLag >= 0) + window.setTimeout(function() { tryToLoadNext(path, f); }, loadingTimeLag); + else + tryToLoadNext(path, f); + }; +}; + +/* private */ +var isLoadingEntryClass = true; + +/* private */ +var besidesJavaPackage = false; + +/** + * After class is loaded, this method will be executed to check whether there + * are classes in the dependency tree that need to be loaded. + */ +/* private */ +var tryToLoadNext = function (file, fSuccess) { + var node = mapPath2ClassNode["@" + file]; + if (!node) // maybe class tree root + return; + var n; + // check for content loaded + var clazzes = classpathMap["$" + file]; + if (clazzes) { + for (var i = 0; i < clazzes.length; i++) { + var name = clazzes[i]; + if (name != node.name && (n = findNode(name))) { + if (n.status < Node.STATUS_CONTENT_LOADED) { + n.status = Node.STATUS_CONTENT_LOADED; + updateNode(n); + } + } else { + n = new Node(); + n.name = name; + var pp = classpathMap["#" + name]; + if (!pp) { + alert (name + " J2S error in tryToLoadNext"); + error("Java2Script implementation error! Please report this bug!"); + } + n.path = pp; + mappingPathNameNode (n.path, name, n); + n.status = Node.STATUS_CONTENT_LOADED; + addChildClassNode(clazzTreeRoot, n, false); + updateNode(n); + } + } + } + if (node instanceof Array) { + for (var i = 0; i < node.length; i++) { + if (node[i].status < Node.STATUS_CONTENT_LOADED) { + node[i].status = Node.STATUS_CONTENT_LOADED; + updateNode(node[i]); + } + } + } else if (node.status < Node.STATUS_CONTENT_LOADED) { + var stillLoading = false; + var ss = document.getElementsByTagName ("SCRIPT"); + for (var i = 0; i < ss.length; i++) { + if (isIE) { + if (ss[i].onreadystatechange && ss[i].onreadystatechange.path == node.path + && ss[i].readyState == "interactive") { + stillLoading = true; + break; + } + } else if (ss[i].onload && ss[i].onload.path == node.path) { + stillLoading = true; + break; + } + } + if (!stillLoading) { + node.status = Node.STATUS_CONTENT_LOADED; + updateNode(node); + } + } + /* + * Maybe in #optinalLoaded inside above _Loader#updateNode calls, + * _Loader.keepOnLoading is set false (Already loaded the wanted + * classes), so here check to stop. + */ + + if (!_Loader.keepOnLoading) // set externally + return; + + // check for a "must" class that has content and load it + var cq; + var working = true; + if ((n = findNextMustClass(Node.STATUS_KNOWN))) { + loadClassNode(n); + while (inLoadingThreads < maxLoadingThreads) { + if (!(n = findNextMustClass(Node.STATUS_KNOWN))) + break; + loadClassNode(n); // will increase inLoadingThreads! + } + } else if ((cq = classQueue).length != 0) { + /* queue must be loaded in order! */ + n = cq.shift(); + if (!loadedScripts[n.path] + || cq.length != 0 + || !isLoadingEntryClass + || n.musts.length + || n.optionals.length) { + addChildClassNode(clazzTreeRoot, n, true); + loadScript(n, n.path, n.requiredBy, false); + } else if (isLoadingEntryClass) { + /* + * The first time reaching here is the time when ClassLoader + * is trying to load entry class. Class with #main method and + * is to be executed is called Entry Class. + * + * Here when loading entry class, ClassLoader should not call + * the next following loading script. This is because, those + * scripts will try to mark the class as loaded directly and + * then continue to call #onLoaded callback method, + * which results in an script error! + */ + isLoadingEntryClass = false; + } + } else if ((n = findNextRequiredClass(Node.STATUS_KNOWN))) { + loadClassNode(n); + while (inLoadingThreads < maxLoadingThreads) { + if (!(n = findNextRequiredClass(Node.STATUS_KNOWN))) + break; + loadClassNode(n); // will increase inLoadingThreads! + } + } else { + working = false; + } + if (working || inLoadingThreads > 0) + return; + // + // now check all classes that MUST be loaded prior to initialization + // of some other class (static calls, extends, implements) + // and all classes REQUIRED somewhere in that class, possibly by the constructor + // (that is, "new xxxx()" called somewhere in code) and update them + // that have content but are not declared already + var f = [findNextMustClass,findNextRequiredClass]; + var lastNode = null; + for (var i = 0; i < 2; i++) + while ((n = f[i](Node.STATUS_CONTENT_LOADED))) { + if (i == 1 && lastNode === n) // Already existed cycle ? + n.status = Node.STATUS_LOAD_COMPLETE; + updateNode(n); + lastNode = n; + } + + // check for load cycles + + while (true) { + tracks = []; + if (!checkCycle(clazzTreeRoot, file)) + break; + } + + // and update all MUST and REQUIRED classes that are declared already + + for (var i = 0; i < 2; i++) { + lastNode = null; + while ((n = f[i](Node.STATUS_DECLARED))) { + if (lastNode === n) + break; + updateNode(lastNode = n); + } + } + var done = []; + for (var i = 0; i < 2; i++) + while ((n = f[i](Node.STATUS_DECLARED))) + done.push(n), n.status = Node.STATUS_LOAD_COMPLETE; + if (done.length) { + for (var i = 0; i < done.length; i++) + destroyClassNode(done[i]); + for (var i = 0; i < done.length; i++) + if ((f = done[i].onLoaded)) + done[i].onLoaded = null, f(); + } + + + + + + + + //System.out.println(node.name + " loaded completely" + _Loader.onGlobalLoaded + "\n\n") + if (fSuccess) { + //System.out.println("tryToLoadNext firing " + _Loader._classCountOK + "/" + _Loader._classCountPending + " " + fSuccess.toString() + " " + Clazz.getStackTrace()) + fSuccess(); + } else if (_Loader._classCountPending) { + for (var name in _Loader._classPending) { + var n = findNode(name); + System.out.println("class left pending " + name + " " + n); + if (n) { + updateNode(n); + break; + } + } + } else { + + // System.out.println("I think I'm done " + // + _Loader._classCountOK + "/" + _Loader._classCountPending + " " + //+ _Loader.onGlobalLoaded.toString() + " " + Clazz.getStackTrace() + // ) + if (_Loader._checkLoad) { + System.out.println("I think I'm done: SAEM call count: " + SAEMid); + Clazz.showDuplicates(true); + } + } + _Loader.onGlobalLoaded(); +}; + + +var tracks = []; + +/* + * There are classes reference cycles. Try to detect and break those cycles. + */ +/* private */ +var checkCycle = function (node, file) { + var ts = tracks; + var len = ts.length; + // add this node to tracks + ts.push(node); + var i = len; + for (; --i >= 0;) + if (ts[i] === node && ts[i].status >= Node.STATUS_DECLARED) + break; + if (i >= 0) { + // this node is already in tracks, and it has been declared already + // for each node in tracks, set its status to "LOAD_COMPLETE" + // update all parents, remove all parents, and fire its onLoaded function + // then clear tracks and return true (keep checking) + if (_Loader._checkLoad) { + var msg = "cycle found loading " + file + " for " + node; + System.out.println(msg) + } + for (; i < len; i++) { + var n = ts[i]; + n.status = Node.STATUS_LOAD_COMPLETE; + destroyClassNode(n); // Same as above + for (var k = 0; k < n.parents.length; k++) + updateNode(n.parents[k]); + n.parents = []; + var f = n.onLoaded; + if (_Loader._checkLoad) { + var msg = "cycle setting status to LOAD_COMPLETE for " + n.name + (f ? " firing " + f.toString() : ""); + System.out.println(msg) + } + if (f) + n.onLoaded = null, f(); + } + ts.length = 0; + return true; + } + var a = [node.musts, node.optionals]; + for (var j = 0; j < 2; j++) + for (var r = a[j], i = r.length; --i >= 0;) + if (r[i].status == Node.STATUS_DECLARED && checkCycle(r[i], file)) + return true; + // reset _tracks to its original length + ts.length = len; + return false; // done +}; + + +_Loader._classCountPending = 0; +_Loader._classCountOK = 0; +_Loader._classPending = {}; + +_Loader.showPending = function() { + var a = []; + for (var name in _Loader._classPending) { + var n = findNode(name); + if (!n) { + alert("No node for " + name); + continue; + } + a.push(n); + System.out.println(showNode("", "", n, "", 0)); + } + return a; +} + +var showNode = function(s, names, node, inset, level) { + names += "--" + node.name; + s += names + "\n"; + if (level > 5) { + s += inset + " ...\n"; + return s; + } + inset += "\t"; + s += inset + "status: " + node.status + "\n"; + if (node.parents && node.parents.length && node.parents[0] && node.parents[0].name) { + s += inset + "parents: " + node.parents.length + "\n"; + for (var i = 0; i < node.parents.length; i++) { + s = showNode(s, names, node.parents[i], inset + "\t", level+1); + } + s += "\n"; + } +// if (node.requiredBy) { +// s += inset + "requiredBy:\n"; +// s = showNode(s, names, node.requiredBy, inset + "\t", level+1); +// s += "\n"; +// } + return s; +} + +/** + * Update the dependency tree nodes recursively. + */ +/* private */ +updateNode = function(node, _updateNode) { + if (!node.name || node.status >= Node.STATUS_LOAD_COMPLETE) { + destroyClassNode(node); + return; + } + var ready = true; + // check for declared and also having MUSTS + if (node.musts.length && node.declaration) { + for (var mustLength = node.musts.length, i = mustLength; --i >= 0;) { + var n = node.musts[i]; + n.requiredBy = node; + if (n.status < Node.STATUS_DECLARED && isClassDefined (n.name)) { + var nns = []; // a stack for onLoaded events + n.status = Node.STATUS_LOAD_COMPLETE; + destroyClassNode(n); // Same as above + if (n.declaration && n.declaration.clazzList) { + // For those classes within one *.js file, update them synchronously. + for (var j = 0, list = n.declaration.clazzList, l = list.length; j < l; j++) { + var nn = findNode (list[j]); + if (nn && nn.status != Node.STATUS_LOAD_COMPLETE + && nn !== n) { + nn.status = n.status; + nn.declaration = null; + destroyClassNode(nn); + nn.onLoaded && nns.push(nn); + } + } + n.declaration = null; + } + // fire all onLoaded events + if (n.onLoaded) + nns.push(n); + for (var j = 0; j < nns.length; j++) { + var onLoaded = nns[j].onLoaded; + if (onLoaded) { + nns[j].onLoaded = null; + onLoaded(); + } + } + } else { + (n.status == Node.STATUS_CONTENT_LOADED) && updateNode(n); // musts may be changed + if (n.status < Node.STATUS_DECLARED) + ready = false; + } + if (node.musts.length != mustLength) { + // length changed -- restart! + i = mustLength = node.musts.length; + ready = true; + } + } + } + if (!ready) + return; + if (node.status < Node.STATUS_DECLARED) { + var decl = node.declaration; + if (decl) + decl(), decl.executed = true; + if(_Loader._checkLoad) { + if (_Loader._classPending[node.name]) { + delete _Loader._classPending[node.name]; + _Loader._classCountOK; + _Loader._classCountPending--; +// System.out.println("OK " + (_Loader._classCountOK) + " FOR " + node.name) + } + } + node.status = Node.STATUS_DECLARED; + if (definedClasses) + definedClasses[node.name] = true; + _Loader.onScriptInitialized(node.path); + if (node.declaration && node.declaration.clazzList) { + // For those classes within one *.js file, update them synchronously. + for (var j = 0, list = node.declaration.clazzList, l = list.length; j < l; j++) { + var nn = findNode(list[j]); + if (nn && nn.status != Node.STATUS_DECLARED + && nn !== node) { + nn.status = Node.STATUS_DECLARED; + if (definedClasses) + definedClasses[nn.name] = true; + _Loader.onScriptInitialized(nn.path); + } + } + } + } + var level = Node.STATUS_DECLARED; + if (node.optionals.length == 0 && node.musts.length == 0 + || node.status > Node.STATUS_KNOWN && !node.declaration + || checkStatusIs(node.musts, Node.STATUS_LOAD_COMPLETE) + && checkStatusIs(node.optionals, Node.STATUS_LOAD_COMPLETE)) { + level = Node.STATUS_LOAD_COMPLETE; + if (!doneLoading(node, level)) + return false; + // For those classes within one *.js file, update them synchronously. + if (node.declaration && node.declaration.clazzList) { + for (var j = 0, list = node.declaration.clazzList, l = list.length; j < l; j++) { + var nn = findNode(list[j]); + if (nn && nn.status != level && nn !== node) { + nn.declaration = null; + if (!doneLoading(nn, level)) + return false; + } + } + } + } + // _Loader.updateParents = function (node, level, _updateParents) + if (node.parents && node.parents.length) { + for (var i = 0; i < node.parents.length; i++) { + var p = node.parents[i]; + if (p.status < level) + updateNode(p, p.name); + } + if (level == Node.STATUS_LOAD_COMPLETE) + node.parents = []; + } +}; + +/* private */ +var checkStatusIs = function(arr, status){ + for (var i = arr.length; --i >= 0;) + if (arr[i].status < status) + return false; + return true; +} +/* private */ +var doneLoading = function(node, level, _doneLoading) { + node.status = level; + _Loader.onScriptCompleted(node.path); + + var onLoaded = node.onLoaded; + if (onLoaded) { + node.onLoaded = null; + onLoaded(); + if (!_Loader.keepOnLoading) + return false; + } + + destroyClassNode(node); + return true; +} + +/* + * Be used to record already used random numbers. And next new random + * number should not be in the property set. + */ +/* private */ +var usedRandoms = { + "r0.13412" : 1 +}; + +/* private */ +var getRnd = function() { + while (true) { // get a unique random number + var rnd = Math.random(); + var s = "r" + rnd; + if (!usedRandoms[s]) + return (usedRandoms[s] = 1, clazzTreeRoot.random = rnd); + } +} + +/* protected */ +var findNode = function(clazzName) { + getRnd(); + return findNodeUnderNode(clazzName, clazzTreeRoot); +}; + +/* private */ +var findNextRequiredClass = function(status) { + getRnd(); + return findNextRequiredNode(clazzTreeRoot, status); +}; + +/* private */ +var findNextMustClass = function(status) { + return findNextMustNode(clazzTreeRoot, status); +}; + +/* private */ +var findNodeUnderNode = function(clazzName, node) { + var n; + // node, then musts then optionals + return (node.name == clazzName ? node + : (n = findNodeWithin(clazzName, node.musts)) + || (n = findNodeWithin(clazzName, node.optionals)) + ? n : null); +}; + +/* private */ +var findNodeWithin = function(name, arr) { + var rnd = clazzTreeRoot.random; + for (var i = arr.length; --i >= 0;) { + var n = arr[i]; + if (n.name == name) + return n; + if (n.random != rnd) { + n.random = rnd; + if ((n = findNodeUnderNode(name, n))) + return n; + } + } + return null; +} + +/* private */ +var checkStatus = function(n, status) { + return (n.status == status + && (status != Node.STATUS_KNOWN || !loadedScripts[n.path]) + && (status == Node.STATUS_DECLARED || !isClassDefined (n.name))); +} + +/* private */ +var findNextMustNode = function(node, status) { + for (var i = node.musts.length; --i >= 0;) { + var n = node.musts[i]; + if (checkStatus(n, status) || (n = findNextMustNode(n, status))) + return n; + } + return (checkStatus(node, status) ? node : null); +}; + +/* private */ +var findNextRequiredNode = function (node, status) { + // search musts first + // search optionals second + // search itself last + var n; + return ((n = searchClassArray(node.musts, status)) + || (n = searchClassArray(node.optionals, status)) + || checkStatus(n = node, status) ? n : null); +}; + +/* private */ +var searchClassArray = function (arr, status) { + if (arr) { + var rnd = clazzTreeRoot.random; + for (var i = 0; i < arr.length; i++) { + var n = arr[i]; + if (checkStatus(n, status)) + return n; + if (n.random != rnd) { + n.random = rnd; // mark as visited! + if ((n = findNextRequiredNode(n, status))) + return n; + } + } + } + return null; +}; + +/** + * This map variable is used to mark that *.js is correctly loaded. + * In IE, _Loader has defects to detect whether a *.js is correctly + * loaded or not, so inner loading mark is used for detecting. + */ +/* private */ +var innerLoadedScripts = {}; + +/** + * This method will be called in almost every *.js generated by Java2Script + * compiler. + */ +/* public */ +var load = function (musts, name, optionals, declaration) { + // called as name.load in Jmol + if (name instanceof Array) { + unwrapArray(name); + for (var i = 0; i < name.length; i++) + load(musts, name[i], optionals, declaration, name); + return; + } + + if (_Loader._checkLoad) { + if (_Loader._classPending[name]) { + //alert("duplicate load for " + name) + } else { + _Loader._classPending[name] = 1; + if (_Loader._classCountPending++ == 0) + _Loader._classCountOK = 0; + System.out.println("Loading class " + name); + } + } + +// if (clazz.charAt (0) == '$') +// clazz = "org.eclipse.s" + clazz.substring (1); + var node = mapPath2ClassNode["#" + name]; + if (!node) { // load called inside *.z.js? + var n = findNode(name); + node = (n ? n : new Node()); + node.name = name; + node.path = classpathMap["#" + name] || "unknown"; + mappingPathNameNode(node.path, name, node); + node.status = Node.STATUS_KNOWN; + addChildClassNode(clazzTreeRoot, node, false); + } + processRequired(node, musts, true); + if (arguments.length == 5 && declaration) { + declaration.status = node.status; + declaration.clazzList = arguments[4]; + } + node.declaration = declaration; + if (declaration) + node.status = Node.STATUS_CONTENT_LOADED; + processRequired(node, optionals, false); +}; + +/* private */ +var processRequired = function(node, arr, isMust) { + if (arr && arr.length) { + unwrapArray(arr); + for (var i = 0; i < arr.length; i++) { + var name = arr[i]; + if (!name) + continue; + if (isClassDefined(name) + || isClassExcluded(name)) + continue; + var n = findNode(name); + if (!n) { + n = new Node(); + n.name = name; + n.status = Node.STATUS_KNOWN; + } + n.requiredBy = node; + addChildClassNode(node, n, isMust); + } + } +} + +/* + * Try to be compatiable of Clazz + */ +if (window["Clazz"]) { + Clazz.load = load; +} else { + _Loader.load = load; +} +/** + * Map different class to the same path! Many classes may be packed into + * a *.z.js already. + * + * @path *.js path + * @name class name + * @node Node object + */ +/* private */ +var mappingPathNameNode = function (path, name, node) { + var map = mapPath2ClassNode; + var keyPath = "@" + path; + var v = map[keyPath]; + if (v) { + if (v instanceof Array) { + var existed = false; + for (var i = 0; i < v.length; i++) { + if (v[i].name == name) { + existed = true; + break; + } + } + if (!existed) + v.push(node); + } else { + map[keyPath] = [v, node]; + } + } else { + map[keyPath] = node; + } + map["#" + name] = node; +}; + +/* protected */ +var loadClassNode = function (node) { + var name = node.name; + if (!isClassDefined (name) + && !isClassExcluded (name)) { + var path = _Loader.getClasspathFor (name/*, true*/); + node.path = path; + mappingPathNameNode (path, name, node); + if (!loadedScripts[path]) { + loadScript(node, path, node.requiredBy, false); + return true; + } + } + return false; +}; + + +/** + * Used in package +/* public */ +var runtimeKeyClass = _Loader.runtimeKeyClass = "java.lang.String"; + +/** + * Queue used to store classes before key class is loaded. + */ +/* private */ +var queueBe4KeyClazz = []; + +/* private */ +var J2sLibBase; + +/** + * Return J2SLib base path from existed SCRIPT src attribute. + */ +/* public */ +_Loader.getJ2SLibBase = function () { + var o = window["j2s.lib"]; + return (o ? o.base + (o.alias == "." ? "" : (o.alias ? o.alias : (o.version ? o.version : "1.0.0")) + "/") : null); +}; + +/** + * Indicate whether _Loader is loading script synchronously or + * asynchronously. + */ +/* private */ +var isAsynchronousLoading = true; + +/* private */ +var isUsingXMLHttpRequest = false; + +/* private */ +var loadingTimeLag = -1; + +_Loader.MODE_SCRIPT = 4; +_Loader.MODE_XHR = 2; +_Loader.MODE_SYNC = 1; + +/** + * String mode: + * asynchronous modes: + * async(...).script, async(...).xhr, async(...).xmlhttprequest, + * script.async(...), xhr.async(...), xmlhttprequest.async(...), + * script + * + * synchronous modes: + * sync(...).xhr, sync(...).xmlhttprequest, + * xhr.sync(...), xmlhttprequest.sync(...), + * xmlhttprequest, xhr + * + * Integer mode: + * Script 4; XHR 2; SYNC bit 1; + */ +/* public */ +_Loader.setLoadingMode = function (mode, timeLag) { + var async = true; + var ajax = true; + if (typeof mode == "string") { + mode = mode.toLowerCase(); + if (mode.indexOf("script") >= 0) + ajax = false; + else + async = (mode.indexOf("async") >=0); + async = false; // BH + } else { + if (mode & _Loader.MODE_SCRIPT) + ajax = false; + else + async = !(mode & _Loader.MODE_SYNC); + } + isUsingXMLHttpRequest = ajax; + isAsynchronousLoading = async; + loadingTimeLag = (async && timeLag >= 0 ? timeLag: -1); + return async; +}; + +/* private */ +var runtimeLoaded = function () { + if (pkgRefCount || !isClassDefined(runtimeKeyClass)) + return; + var qbs = queueBe4KeyClazz; + for (var i = 0; i < qbs.length; i++) + _Loader.loadClass(qbs[i][0], qbs[i][1]); + queueBe4KeyClazz = []; +}; + +/* + * Load those key *.z.js. This *.z.js will be surely loaded before other + * queued *.js. + */ +/* public */ +_Loader.loadZJar = function (zjarPath, keyClass) { +// used only by package.js for core.z.js + var f = null; + var isArr = (keyClass instanceof Array); + if (isArr) + keyClass = keyClass[keyClass.length - 1]; + else + f = (keyClass == runtimeKeyClass ? runtimeLoaded : null); + _Loader.jarClasspath(zjarPath, isArr ? keyClass : [keyClass]); + // BH note: runtimeKeyClass is java.lang.String + _Loader.loadClass(keyClass, f, true); +}; + +var NodeMap = {}; +var _allNodes = []; + +/** + * The method help constructing the multiple-binary class dependency tree. + */ +/* private */ +var addChildClassNode = function (parent, child, isMust) { + var existed = false; + var arr; + if (isMust) { + arr = parent.musts; + if (!child.requiredBy) + child.requiredBy = parent; +// if (!parent.requiresMap){ +// parent.requires = []; +// parent.requiresMap = {}; +// } +// if (!parent.requiresMap[child.name]) { +// parent.requiresMap[child.name] = 1; +// parent.requires.push[child]; +// } + } else { + arr = parent.optionals; + } + if (!NodeMap[child.name]) { + _allNodes.push(child) + NodeMap[child.name]=child + } + for (var i = 0; i < arr.length; i++) { + if (arr[i].name == child.name) { + existed = true; + break; + } + } + if (!existed) { + arr.push(child); + if (isLoadingEntryClass + && child.name.indexOf("java") != 0 + && child.name.indexOf("net.sf.j2s.ajax") != 0) { + if (besidesJavaPackage) + isLoadingEntryClass = false; + besidesJavaPackage = true; +// } else if (child.name.indexOf("org.eclipse.swt") == 0 +// || child.name.indexOf("$wt") == 0) { +// window["swt.lazy.loading.callback"] = swtLazyLoading; +// if (needPackage("org.eclipse.swt")) +// return _Loader.loadPackage("org.eclipse.swt", function() {addParentClassNode(child, parent)}); + } + } + addParentClassNode(child, parent); +}; + +/* private */ +var addParentClassNode = function(child, parent) { + if (parent.name && parent != clazzTreeRoot && parent != child) + for (var i = 0; i < child.parents.length; i++) + if (child.parents[i].name == parent.name) + return; + child.parents.push(parent); +} + +/* private */ +var destroyClassNode = function (node) { + var parents = node.parents; + if (parents) + for (var k = parents.length; --k >= 0;) + removeArrayItem(parents[k].musts, node) || removeArrayItem(parents[k].optionals, node); +}; + +/* public */ +_Loader.unloadClassExt = function (qClazzName) { + if (definedClasses) + definedClasses[qClazzName] = false; + if (classpathMap["#" + qClazzName]) { + var pp = classpathMap["#" + qClazzName]; + classpathMap["#" + qClazzName] = null; + var arr = classpathMap["$" + pp]; + removeArrayItem(arr, qClazzName) && (classpathMap["$" + pp] = arr); + } + var n = findNode(qClazzName); + if (n) { + n.status = Node.STATUS_KNOWN; + loadedScripts[n.path] = false; + } + var path = _Loader.getClasspathFor (qClazzName); + loadedScripts[path] = false; + innerLoadedScripts[path] && (innerLoadedScripts[path] = false); + _Loader.onClassUnloaded(qClazzName); +}; + +/* private */ +var assureInnerClass = function (clzz, fun) { + clzz = clzz.__CLASS_NAME__; + if (Clazz.unloadedClasses[clzz]) { + if (clzz.indexOf("$") >= 0) + return; + var list = []; + var key = clzz + "$"; + for (var s in Clazz.unloadedClasses) + if (Clazz.unloadedClasses[s] && s.indexOf(key) == 0) + list.push(s); + if (!list.length) + return; + fun = "" + fun; + var idx1, idx2; + if ((idx1 = fun.indexOf(key)) < 0 || (idx2 = fun.indexOf("\"", idx1 + key.length)) < 0) + return; + clzz = fun.substring(idx1, idx2); + if (!Clazz.unloadedClasses[clzz] || (idx1 = fun.indexOf("{", idx2) + 1) == 0) + return; + if ((idx2 = fun.indexOf("(" + clzz + ",", idx1 + 3)) < 0 + || (idx2 = fun.lastIndexOf("}", idx2 - 1)) < 0) + return; + eval(fun.substring(idx1, idx2)); + Clazz.unloadedClasses[clzz] = null; + } +}; + +Clazz.binaryFolders = _Loader.binaryFolders = [ _Loader.getJ2SLibBase() ]; + +})(Clazz, Clazz._Loader); + +//} +/****************************************************************************** + * Copyright (c) 2007 java2script.org and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Zhou Renjian - initial API and implementation + *****************************************************************************/ +/******* + * @author zhou renjian + * @create Jan 11, 2007 + *******/ + +Clazz._LoaderProgressMonitor = {}; + +;(function(CLPM, Jmol) { + +var fadeOutTimer = null; +var fadeAlpha = 0; +var monitorEl = null; +var lastScrollTop = 0; +var bindingParent = null; + +CLPM.DEFAULT_OPACITY = (Jmol && Jmol._j2sLoadMonitorOpacity ? Jmol._j2sLoadMonitorOpacity : 55); + +/* public */ +/*CLPM.initialize = function (parent) { + bindingParent = parent; + if (parent && !attached) { + attached = true; + //Clazz.addEvent (window, "unload", cleanup); + // window.attachEvent ("onunload", cleanup); + } +}; +*/ + +/* public */ +CLPM.hideMonitor = function () { + monitorEl.style.display = "none"; +} + +/* public */ +CLPM.showStatus = function (msg, fading) { + if (!monitorEl) { + createHandle (); + if (!attached) { + attached = true; + //Clazz.addEvent (window, "unload", cleanup); + // window.attachEvent ("onunload", cleanup); + } + } + clearChildren(monitorEl); + if (msg == null) { + if (fading) { + fadeOut(); + } else { + CLPM.hideMonitor(); + } + return; + } + + monitorEl.appendChild(document.createTextNode ("" + msg)); + if (monitorEl.style.display == "none") { + monitorEl.style.display = ""; + } + setAlpha(CLPM.DEFAULT_OPACITY); + var offTop = getFixedOffsetTop(); + if (lastScrollTop != offTop) { + lastScrollTop = offTop; + monitorEl.style.bottom = (lastScrollTop + 4) + "px"; + } + if (fading) { + fadeOut(); + } +}; + +/* private static */ +var clearChildren = function (el) { + if (!el) + return; + for (var i = el.childNodes.length; --i >= 0;) { + var child = el.childNodes[i]; + if (!child) + continue; + if (child.childNodes && child.childNodes.length) + clearChildren (child); + try { + el.removeChild (child); + } catch (e) {}; + } +}; +/* private */ +var setAlpha = function (alpha) { + if (fadeOutTimer && alpha == CLPM.DEFAULT_OPACITY) { + window.clearTimeout (fadeOutTimer); + fadeOutTimer = null; + } + fadeAlpha = alpha; + var ua = navigator.userAgent.toLowerCase(); + monitorEl.style.filter = "Alpha(Opacity=" + alpha + ")"; + monitorEl.style.opacity = alpha / 100.0; +}; +/* private */ +var hidingOnMouseOver = function () { + CLPM.hideMonitor(); +}; + +/* private */ +var attached = false; +/* private */ +var cleanup = function () { + //if (monitorEl) { + // monitorEl.onmouseover = null; + //} + monitorEl = null; + bindingParent = null; + //Clazz.removeEvent (window, "unload", cleanup); + //window.detachEvent ("onunload", cleanup); + attached = false; +}; +/* private */ +var createHandle = function () { + var div = document.createElement ("DIV"); + div.id = "_Loader-status"; + div.style.cssText = "position:absolute;bottom:4px;left:4px;padding:2px 8px;" + + "z-index:" + (window["j2s.lib"].monitorZIndex || 10000) + ";background-color:#8e0000;color:yellow;" + + "font-family:Arial, sans-serif;font-size:10pt;white-space:nowrap;"; + div.onmouseover = hidingOnMouseOver; + monitorEl = div; + if (bindingParent) { + bindingParent.appendChild(div); + } else { + document.body.appendChild(div); + } + return div; +}; +/* private */ + +var fadeOut = function () { + if (monitorEl.style.display == "none") return; + if (fadeAlpha == CLPM.DEFAULT_OPACITY) { + fadeOutTimer = window.setTimeout(function () { + fadeOut(); + }, 750); + fadeAlpha -= 5; + } else if (fadeAlpha - 10 >= 0) { + setAlpha(fadeAlpha - 10); + fadeOutTimer = window.setTimeout(function () { + fadeOut(); + }, 40); + } else { + monitorEl.style.display = "none"; + } +}; +/* private */ +var getFixedOffsetTop = function (){ + if (bindingParent) { + var b = bindingParent; + return b.scrollTop; + } + var dua = navigator.userAgent; + var b = document.body; + var p = b.parentNode; + var pcHeight = p.clientHeight; + var bcScrollTop = b.scrollTop + b.offsetTop; + var pcScrollTop = p.scrollTop + p.offsetTop; + return (dua.indexOf("Opera") < 0 && document.all ? (pcHeight == 0 ? bcScrollTop : pcScrollTop) + : dua.indexOf("Gecko") < 0 ? (pcHeight == p.offsetHeight + && pcHeight == p.scrollHeight ? bcScrollTop : pcScrollTop) : bcScrollTop); +}; + +/* not used in Jmol +if (window["ClazzLoader"]) { + _Loader.onScriptLoading = function(file) { + CLPM.showStatus("Loading " + file + "..."); + }; + _Loader.onScriptLoaded = function(file, isError) { + CLPM.showStatus(file + (isError ? " loading failed." : " loaded."), true); + }; + _Loader.onGlobalLoaded = function(file) { + CLPM.showStatus("Application loaded.", true); + }; + _Loader.onClassUnloaded = function(clazz) { + CLPM.showStatus("Class " + clazz + " is unloaded.", true); + }; +} +*/ + +})(Clazz._LoaderProgressMonitor, Jmol); + +//} +/****************************************************************************** + * Copyright (c) 2007 java2script.org and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Zhou Renjian - initial API and implementation + *****************************************************************************/ +/******* + * @author zhou renjian + * @create Nov 5, 2005 + *******/ + +;(function(Con, Sys) { +/** + * Setting maxTotalLines to -1 will not limit the console result + */ +/* protected */ +Con.maxTotalLines = 10000; + +/* protected */ +Con.setMaxTotalLines = function (lines) { + Con.maxTotalLines = (lines > 0 ? lines : 999999); +} + +/* protected */ +Con.maxLatency = 40; + +/* protected */ +Con.setMaxLatency = function (latency) { + Con.maxLatency = (latency > 0 ? latency : 40); +}; + +/* protected */ +Con.pinning = false; + +/* protected */ +Con.enablePinning = function (enabled) { + Con.pinning = enabled; +}; + +/* private */ +Con.linesCount = 0; + +/* private */ +Con.metLineBreak = false; + + +/* + * Give an extension point so external script can create and bind the console + * themself. + * + * TODO: provide more template of binding console window to browser. + */ +/* protected */ +Con.createConsoleWindow = function (parentEl) { + var console = document.createElement ("DIV"); + console.style.cssText = "font-family:monospace, Arial, sans-serif;"; + document.body.appendChild (console); + return console; +}; + +var c160 = String.fromCharCode(160); //nbsp; +c160 += c160+c160+c160; + +/* protected */ +Con.consoleOutput = function (s, color) { + var o = window["j2s.lib"]; + var console = (o && o.console); + if (console && typeof console == "string") + console = document.getElementById(console) + if (!console) + return false; // BH this just means we have turned off all console action + if (Con.linesCount > Con.maxTotalLines) { + for (var i = 0; i < Con.linesCount - Con.maxTotalLines; i++) { + if (console && console.childNodes.length > 0) { + console.removeChild (console.childNodes[0]); + } + } + Con.linesCount = Con.maxTotalLines; + } + + var willMeetLineBreak = false; + s = (typeof s == "undefined" ? "" : s == null ? "null" : "" + s); + s = s.replace (/\t/g, c160); + if (s.length > 0) + switch (s.charAt(s.length - 1)) { + case '\n': + case '\r': + s = (s.length > 1 ? s.substring (0, s.length - (s.charAt (s.length - 2) == '\r' ? 2 : 1)) : ""); + willMeetLineBreak = true; + break; + } + + var lines = null; + s = s.replace (/\t/g, c160); + lines = s.split(/\r\n|\r|\n/g); + for (var i = 0, last = lines.length - 1; i <= last; i++) { + var lastLineEl = null; + if (Con.metLineBreak || Con.linesCount == 0 + || console.childNodes.length < 1) { + lastLineEl = document.createElement ("DIV"); + console.appendChild (lastLineEl); + lastLineEl.style.whiteSpace = "nowrap"; + Con.linesCount++; + } else { + try { + lastLineEl = console.childNodes[console.childNodes.length - 1]; + } catch (e) { + lastLineEl = document.createElement ("DIV"); + console.appendChild (lastLineEl); + lastLineEl.style.whiteSpace = "nowrap"; + Con.linesCount++; + } + } + var el = document.createElement ("SPAN"); + lastLineEl.appendChild (el); + el.style.whiteSpace = "nowrap"; + if (color) + el.style.color = color; + var l = lines[i] + if (l.length == 0) + l = c160; + el.appendChild(document.createTextNode(l)); + if (!Con.pinning) + console.scrollTop += 100; + Con.metLineBreak = (i != last || willMeetLineBreak); + } + + var cssClazzName = console.parentNode.className; + if (!Con.pinning && cssClazzName + && cssClazzName.indexOf ("composite") != -1) { + console.parentNode.scrollTop = console.parentNode.scrollHeight; + } + Con.lastOutputTime = new Date ().getTime (); +}; + +/* + * Clear all contents inside the console. + */ +/* public */ +Con.clear = function () { + try { + Con.metLineBreak = true; + var o = window["j2s.lib"]; + var console = o && o.console; + if (!console || !(console = document.getElementById (console))) + return; + var childNodes = console.childNodes; + for (var i = childNodes.length; --i >= 0;) + console.removeChild (childNodes[i]); + Con.linesCount = 0; + } catch(e){}; +}; + +/* public */ +Clazz.alert = function (s) { + Con.consoleOutput (s + "\r\n"); +}; + + +/* public */ +Sys.out.print = function (s) { + Con.consoleOutput (s); +}; +/* public */ +Sys.out.println = function(s) { + Con.consoleOutput(typeof s == "undefined" ? "\r\n" : s == null ? s = "null\r\n" : s + "\r\n"); +}; + +Sys.out.write = function (buf, offset, len) { + Sys.out.print(String.instantialize(buf).substring(offset, offset+len)); +}; + +/* public */ +Sys.err.__CLASS_NAME__ = "java.io.PrintStream"; + +/* public */ +Sys.err.print = function (s) { + Con.consoleOutput (s, "red"); +}; + +/* public */ +Sys.err.println = function (s) { + Con.consoleOutput (typeof s == "undefined" ? "\r\n" : s == null ? s = "null\r\n" : s + "\r\n", "red"); +}; + +Sys.err.write = function (buf, offset, len) { + Sys.err.print(String.instantialize(buf).substring(offset, offset+len)); +}; + +})(Clazz.Console, System); + +})(Clazz, Jmol); // requires JSmolCore.js + +}; // called by external application diff --git a/site/test.htm b/site/test.htm index 4d1e632..eb74f2f 100644 --- a/site/test.htm +++ b/site/test.htm @@ -5,11 +5,11 @@ - + + + - - - + + + - -